fec: adapt to lx_kit/lx_emul update

This commit is contained in:
Josef Söntgen 2018-06-28 13:51:00 +02:00 committed by Christian Helmuth
parent ced585fd5e
commit 05179409be
6 changed files with 45 additions and 11 deletions

View File

@ -0,0 +1,28 @@
diff --git a/include/net/sock.h b/include/net/sock.h
index 14d3c07..818a1d1 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -2148,8 +2148,8 @@ sock_recv_timestamp(struct msghdr *msg, struct sock *sk, struct sk_buff *skb)
*/
if (sock_flag(sk, SOCK_RCVTSTAMP) ||
(sk->sk_tsflags & SOF_TIMESTAMPING_RX_SOFTWARE) ||
- (kt.tv64 && sk->sk_tsflags & SOF_TIMESTAMPING_SOFTWARE) ||
- (hwtstamps->hwtstamp.tv64 &&
+ (kt && sk->sk_tsflags & SOF_TIMESTAMPING_SOFTWARE) ||
+ (hwtstamps->hwtstamp &&
(sk->sk_tsflags & SOF_TIMESTAMPING_RAW_HARDWARE)))
__sock_recv_timestamp(msg, sk, skb);
else
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index b2df375..02c065f 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -4212,7 +4212,7 @@ EXPORT_SYMBOL(skb_try_coalesce);
*/
void skb_scrub_packet(struct sk_buff *skb, bool xnet)
{
- skb->tstamp.tv64 = 0;
+ skb->tstamp = 0;
skb->pkt_type = PACKET_HOST;
skb->skb_iif = 0;
skb->ignore_df = 0;

View File

@ -1 +1 @@
e124b91dec837347bbc7af31ac7eb488ab8c171b
55b39b5a0abadfe7027a5128d9d439d586d7a830

View File

@ -203,5 +203,6 @@ PATCH_OPT(patches/intel_fb_backlight.patch) := -p1 -d$(SRC_DIR_INTEL_FB)
# Freescale NIC
PATCH_OPT(patches/fec_skbuff_cast.patch) := -p1 -d$(SRC_DIR_FEC)
PATCH_OPT(patches/fec_tx_bounce_dma.patch) := -p1 -d$(SRC_DIR_FEC)
PATCH_OPT(patches/fec_tv64.patch) := -p1 -d$(SRC_DIR_FEC)
# vi: set ft=make :

View File

@ -193,12 +193,6 @@ int regulator_disable(struct regulator *r)
return -1;
}
resource_size_t resource_size(const struct resource *res)
{
TRACE_AND_STOP;
return -1;
}
bool page_is_pfmemalloc(struct page *page)
{
TRACE_AND_STOP;

View File

@ -728,9 +728,9 @@ void reinit_completion(struct completion *work)
}
static void _completion_timeout(unsigned long t)
static void _completion_timeout(struct timer_list *t)
{
Lx::Task *task = (Lx::Task *)t;
Lx::Task *task = (Lx::Task *)t->data;
task->unblock();
}
@ -742,7 +742,8 @@ long __wait_completion(struct completion *work, unsigned long timeout)
unsigned long j = timeout ? jiffies + timeout : 0;
if (timeout) {
setup_timer(&t, _completion_timeout, (unsigned long)Lx::scheduler().current());
timer_setup(&t, _completion_timeout, 0u);
t.data = (unsigned long) Lx::scheduler().current();
mod_timer(&t, j);
}

View File

@ -109,6 +109,10 @@ size_t iov_iter_count(struct iov_iter *i);
#include <lx_emul/jiffies.h>
#include <lx_emul/time.h>
#include <lx_emul/timer.h>
#define from_timer(var, callback_timer, timer_fieldname) \
container_of(callback_timer, typeof(*var), timer_fieldname)
#include <lx_emul/mutex.h>
#include <lx_emul/bitops.h>
#include <lx_emul/atomic.h>
@ -119,6 +123,12 @@ size_t iov_iter_count(struct iov_iter *i);
#include <lx_emul/module.h>
#include <lx_emul/bug.h>
#include <lx_emul/gfp.h>
enum {
__GFP_COLD = 0x00000100u,
__GFP_REPEAT = 0x00000400u,
};
#include <lx_emul/barrier.h>
#include <uapi/linux/swab.h>
#include <lx_emul/byteorder.h>
@ -192,7 +202,7 @@ static inline s64 timespec64_to_ns(const struct timespec64 *ts)
return ((s64) ts->tv_sec * NSEC_PER_SEC) + ts->tv_nsec;
}
#define ktime_to_ns(kt) ((kt).tv64)
#define ktime_to_ns(kt) ((kt))
ktime_t ns_to_ktime(u64 ns);