[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCH] plat/common/pci: register more then one pci per file
Hello Yuri, This patch looks fine.I like the idea of making the driver unique but since we decompose every components into smaller libraries do we expect multiple drivers within the library. Do we also intend to change the ukbus library and virtio library which have a similar macro? Thanks & Regards Sharan On 12/05/2018 05:42 PM, Yuri Volchkov wrote: So far it was possible to use PCI_REGISTER_DRIVER only once in one file. Add a counter to the generated function name, to avoid the name conflict. Signed-off-by: Yuri Volchkov <yuri.volchkov@xxxxxxxxx> --- plat/common/include/pci/pci_bus.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plat/common/include/pci/pci_bus.h b/plat/common/include/pci/pci_bus.h index 4e02282..be2ee1f 100644 --- a/plat/common/include/pci/pci_bus.h +++ b/plat/common/include/pci/pci_bus.h @@ -156,14 +156,14 @@ struct pci_device { UK_TAILQ_HEAD(pci_device_list, struct pci_device);-#define PCI_REGISTER_DRIVER(b) \- _PCI_REGISTER_DRIVER(__LIBNAME__, b) +#define PCI_REGISTER_DRIVER(b) \ + _PCI_REGISTER_DRIVER(__LIBNAME__, __COUNTER__, b)-#define _PCI_REGFNNAME(x, y) x##y+#define _PCI_REGFNNAME(x, y, z) x##y##z-#define _PCI_REGISTER_DRIVER(libname, b) \+#define _PCI_REGISTER_DRIVER(libname, id, b) \ static void __constructor_prio(103) \ - _PCI_REGFNNAME(libname, _pci_register_driver)(void) \ + _PCI_REGFNNAME(libname, id, _pci_register_driver)(void) \ { \ _pci_register_driver((b)); \ } _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |