|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 07/15] xen: generate hypercall interface related code
On 01.11.21 16:20, Juergen Gross wrote: Instead of repeating similar data multiple times use a single source file and a generator script for producing prototypes and call sequences of the hypercalls. As the script already knows the number of parameters used add generating a macro for populating an array with the number of parameters per hypercall. Signed-off-by: Juergen Gross <jgross@xxxxxxxx> --- V2: - split platform_op for doe and compat prefixes (Jan Beulich) - add "addline:" directive - add priorities to handlers (Jan Beulich) --- .gitignore | 1 + xen/Makefile | 10 ++ xen/include/hypercall-defs.c | 285 +++++++++++++++++++++++++++++++ xen/scripts/gen_hypercall.awk | 306 ++++++++++++++++++++++++++++++++++ 4 files changed, 602 insertions(+) create mode 100644 xen/include/hypercall-defs.c create mode 100644 xen/scripts/gen_hypercall.awk ... diff --git a/xen/scripts/gen_hypercall.awk b/xen/scripts/gen_hypercall.awk new file mode 100644 index 0000000000..26017c0900 --- /dev/null +++ b/xen/scripts/gen_hypercall.awk ... I've found another optimization for the case of 2 hypercalls with the same priority: in this case "if ( ) ... else ..." is the better choice. Here a "delete p_list;" is missing in order to avoid stale array elements in the next round. I'll send an update of this patch. Juergen Attachment:
OpenPGP_0xB0DE9DD628BF132F.asc Attachment:
OpenPGP_signature
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |