mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 20:53:53 +08:00
9e9f601084
This adds (in req-gen/) a framework for defining gpci counter requests. It uses macro magic similar to ftrace. Also convert the existing hv-gpci request structures and enum values to use the new framework (and adjust old users of the structs and enum values to cope with changes in naming). In exchange for this macro disaster, we get autogenerated event listing for GPCI in sysfs, build time field offset checking, and zero duplication of information about GPCI requests. Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com> Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
16 lines
500 B
C
16 lines
500 B
C
|
|
#define REQUEST(r_contents) \
|
|
REQUEST_(REQUEST_NAME, REQUEST_NUM, REQUEST_IDX_KIND, I(r_contents))
|
|
|
|
#define __field(f_offset, f_bytes, f_name) \
|
|
__field_(REQUEST_NAME, REQUEST_NUM, REQUEST_IDX_KIND, \
|
|
f_offset, f_bytes, f_name)
|
|
|
|
#define __array(f_offset, f_bytes, f_name) \
|
|
__array_(REQUEST_NAME, REQUEST_NUM, REQUEST_IDX_KIND, \
|
|
f_offset, f_bytes, f_name)
|
|
|
|
#define __count(f_offset, f_bytes, f_name) \
|
|
__count_(REQUEST_NAME, REQUEST_NUM, REQUEST_IDX_KIND, \
|
|
f_offset, f_bytes, f_name)
|