Tofu: support for barrier gate, kmalloc cache

Change-Id: I6f4cfec2ec404efd03b332fc3f449a775816230e
This commit is contained in:
Balazs Gerofi
2020-09-06 12:07:51 +09:00
committed by Masamichi Takagi
parent 5d784f3ea4
commit 1918df7765
13 changed files with 946 additions and 87 deletions

View File

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

View File

@ -0,0 +1,4 @@
struct {
void *bgs;
void *bch;
} reg;

View File

@ -0,0 +1,6 @@
struct {
bool enabled;
uint64_t bgmask[TOF_ICC_NTNIS];
uintptr_t iova;
void *kaddr;
} bch;

View 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;
};
};
};

View 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"
};
};
};

View File

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

View 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__