Tofu: support for barrier gate, kmalloc cache
Change-Id: I6f4cfec2ec404efd03b332fc3f449a775816230e
This commit is contained in:
committed by
Masamichi Takagi
parent
5d784f3ea4
commit
1918df7765
@ -15,9 +15,10 @@ if ! tar zxvf /lib/modules/`uname -r`+debug/extra/tof_module.tar.gz ${KMODULE} 2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
${DWARF_TOOL} ${KMODULE} tof_utofu_device enabled > tofu_generated-tof_utofu_device.h
|
||||
${DWARF_TOOL} ${KMODULE} tof_utofu_device enabled subnet gpid > tofu_generated-tof_utofu_device.h
|
||||
${DWARF_TOOL} ${KMODULE} tof_utofu_cq common tni cqid trans steering mb num_stag | sed "s/struct FILL_IN_MANUALLY trans;/#include \"tof_utofu_cq_trans.h\"/g" > tofu_generated-tof_utofu_cq.h
|
||||
${DWARF_TOOL} ${KMODULE} tof_utofu_mbpt ucq iova sg nsgents mbptstart pgsz kref > tofu_generated-tof_utofu_mbpt.h
|
||||
${DWARF_TOOL} ${KMODULE} tof_utofu_bg common tni bgid bch | sed "s/struct FILL_IN_MANUALLY bch;/#include \"tof_utofu_bg_bch.h\"/g" > tofu_generated-tof_utofu_bg.h
|
||||
rm ${KMODULE}
|
||||
|
||||
KMODULE=tof_core.ko
|
||||
@ -28,6 +29,7 @@ if ! tar zxvf /lib/modules/`uname -r`+debug/extra/tof_module.tar.gz ${KMODULE} 2
|
||||
fi
|
||||
|
||||
${DWARF_TOOL} ${KMODULE} tof_core_cq reg | sed "s/struct FILL_IN_MANUALLY reg;/#include \"tof_core_cq_reg.h\"/g" > tofu_generated-tof_core_cq.h
|
||||
${DWARF_TOOL} ${KMODULE} tof_core_bg lock reg irq subnet gpid sighandler | sed "s/struct FILL_IN_MANUALLY reg;/#include \"tof_core_bg_reg.h\"/g" > tofu_generated-tof_core_bg.h
|
||||
rm ${KMODULE}
|
||||
|
||||
#cat tofu_generated*.h
|
||||
|
||||
4
kernel/include/tofu/tof_core_bg_reg.h
Normal file
4
kernel/include/tofu/tof_core_bg_reg.h
Normal file
@ -0,0 +1,4 @@
|
||||
struct {
|
||||
void *bgs;
|
||||
void *bch;
|
||||
} reg;
|
||||
6
kernel/include/tofu/tof_utofu_bg_bch.h
Normal file
6
kernel/include/tofu/tof_utofu_bg_bch.h
Normal file
@ -0,0 +1,6 @@
|
||||
struct {
|
||||
bool enabled;
|
||||
uint64_t bgmask[TOF_ICC_NTNIS];
|
||||
uintptr_t iova;
|
||||
void *kaddr;
|
||||
} bch;
|
||||
29
kernel/include/tofu/tofu_generated-tof_core_bg.h
Normal file
29
kernel/include/tofu/tofu_generated-tof_core_bg.h
Normal file
@ -0,0 +1,29 @@
|
||||
struct tof_core_bg {
|
||||
union {
|
||||
char whole_struct[120];
|
||||
struct {
|
||||
char padding0[0];
|
||||
spinlock_t lock;
|
||||
};
|
||||
struct {
|
||||
char padding1[8];
|
||||
#include "tof_core_bg_reg.h"
|
||||
};
|
||||
struct {
|
||||
char padding2[24];
|
||||
struct tof_core_irq irq;
|
||||
};
|
||||
struct {
|
||||
char padding3[88];
|
||||
tof_core_signal_handler sighandler;
|
||||
};
|
||||
struct {
|
||||
char padding4[104];
|
||||
uint64_t subnet;
|
||||
};
|
||||
struct {
|
||||
char padding5[112];
|
||||
uint32_t gpid;
|
||||
};
|
||||
};
|
||||
};
|
||||
21
kernel/include/tofu/tofu_generated-tof_utofu_bg.h
Normal file
21
kernel/include/tofu/tofu_generated-tof_utofu_bg.h
Normal file
@ -0,0 +1,21 @@
|
||||
struct tof_utofu_bg {
|
||||
union {
|
||||
char whole_struct[160];
|
||||
struct {
|
||||
char padding0[0];
|
||||
struct tof_utofu_device common;
|
||||
};
|
||||
struct {
|
||||
char padding1[80];
|
||||
uint8_t tni;
|
||||
};
|
||||
struct {
|
||||
char padding2[81];
|
||||
uint8_t bgid;
|
||||
};
|
||||
struct {
|
||||
char padding3[88];
|
||||
#include "tof_utofu_bg_bch.h"
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -5,5 +5,13 @@ struct tof_utofu_device {
|
||||
char padding0[0];
|
||||
bool enabled;
|
||||
};
|
||||
struct {
|
||||
char padding1[12];
|
||||
uint32_t gpid;
|
||||
};
|
||||
struct {
|
||||
char padding2[24];
|
||||
uint64_t subnet;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
15
kernel/include/tofu/tofu_stag_range.h
Normal file
15
kernel/include/tofu/tofu_stag_range.h
Normal file
@ -0,0 +1,15 @@
|
||||
#ifndef __TOFU_STAG_RANGE_HEADER__
|
||||
#define __TOFU_STAG_RANGE_HEADER__
|
||||
|
||||
struct tof_utofu_cq;
|
||||
|
||||
struct tofu_stag_range {
|
||||
uintptr_t start, end;
|
||||
int stag;
|
||||
struct tof_utofu_cq *ucq;
|
||||
struct list_head list; // per-vm_range list
|
||||
struct list_head hash; // per-process stag hash
|
||||
};
|
||||
|
||||
#endif // __TOFU_STAG_RANGE_HEADER__
|
||||
|
||||
Reference in New Issue
Block a user