diff --git a/kernel/file_ops.c b/kernel/file_ops.c index d2c3ed43..ba0d852f 100644 --- a/kernel/file_ops.c +++ b/kernel/file_ops.c @@ -430,6 +430,7 @@ ssize_t hfi1_aio_write(void *private_data, const struct iovec *iovec, unsigned l int done = 0, reqs = 0; kprintf("sizeof(struct hfi1_filedata) = %lu\n", sizeof(struct hfi1_filedata)); kprintf("sizeof(struct hfi1_devdata) = %lu\n", sizeof(struct hfi1_devdata)); + kprintf("sizeof(struct iowait) = %lu\n", sizeof(struct iowait)); kprintf("sizeof(struct hfi1_user_sdma_pkt_q) = %lu\n", sizeof(struct hfi1_user_sdma_pkt_q)); return 0; hfi1_cdbg(AIOWRITE, "+"); diff --git a/kernel/include/hfi1/ihk_hfi1_common.h b/kernel/include/hfi1/ihk_hfi1_common.h index 7af8f15e..07ee9b0d 100644 --- a/kernel/include/hfi1/ihk_hfi1_common.h +++ b/kernel/include/hfi1/ihk_hfi1_common.h @@ -74,11 +74,12 @@ typedef ihk_spinlock_t spinlock_t; #define spin_unlock_irqrestore(lock, flags) do {} while(0) #define ____cacheline_aligned_in_smp __attribute__((aligned(64))) #define __iomem -#define spin_lock(...) do {} while(0) -#define spin_unlock(...) do {} while(0) +/* double check */ +#define spin_lock ihk_mc_spinlock_lock_noirq +#define spin_unlock ihk_mc_spinlock_unlock_noirq +/***********************************************/ #define smp_wmb() barrier() #define smp_rmb() barrier() -/***********************************************/ #define __rcu #define __percpu diff --git a/kernel/include/hfi1/iowait.h b/kernel/include/hfi1/iowait.h index a1c79006..3bdefee3 100644 --- a/kernel/include/hfi1/iowait.h +++ b/kernel/include/hfi1/iowait.h @@ -90,11 +90,7 @@ struct sdma_engine; */ struct iowait; struct iowait_work { -#ifdef __HFI1_ORIG__ - struct work_struct iowork; -#else -//TODO: iowait_work -#endif /* __HFI1_ORIG__ */ + char iowork[32]; // struct work_struct iowork; struct list_head tx_head; struct iowait *iow; }; @@ -137,6 +133,7 @@ struct iowait_work { * Waiters explicity know that, but the destroy * code that unwaits QPs does not. */ +/* The original size on Linux is 240 */ struct iowait { struct list_head list; int (*sleep)( @@ -146,13 +143,9 @@ struct iowait { unsigned seq); void (*wakeup)(struct iowait *wait, int reason); void (*sdma_drained)(struct iowait *wait); -#ifdef __HFI1_ORIG__ seqlock_t *lock; - wait_queue_head_t wait_dma; - wait_queue_head_t wait_pio; -#else -//TODO: wait -#endif /* __HFI1_ORIG__ */ + char wait_dma[24]; // wait_queue_head_t wait_dma; + char wait_pio[24]; // wait_queue_head_t wait_pio; atomic_t sdma_busy; atomic_t pio_busy; u32 count; diff --git a/kernel/include/hfi1/user_sdma.h b/kernel/include/hfi1/user_sdma.h index 5f788bee..dd2d3763 100644 --- a/kernel/include/hfi1/user_sdma.h +++ b/kernel/include/hfi1/user_sdma.h @@ -113,7 +113,7 @@ extern uint extended_psn; #define KDETH_OM_LARGE 64 #define KDETH_OM_MAX_SIZE (1 << ((KDETH_OM_LARGE / KDETH_OM_SMALL) + 1)) -/* Original size on Linux is 376 Bytes */ +/* The original size on Linux is 376 B */ struct hfi1_user_sdma_pkt_q { struct list_head list; unsigned ctxt;