Updated and confirmed struct iowait{} and struct hfi1_user_sdma_pkt_q {}

Conflicts:
	kernel/include/hfi1/ihk_hfi1_common.h
This commit is contained in:
Aram Santogidis
2017-08-08 09:47:57 +09:00
committed by Balazs Gerofi
parent c4ca4ae3ab
commit 7005110697
4 changed files with 10 additions and 15 deletions

View File

@ -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, "+");

View File

@ -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

View File

@ -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;

View File

@ -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;