[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v4 04/10] vpci: Refactor REGISTER_VPCI_INIT
On 19.05.2025 08:56, Chen, Jiqian wrote: > On 2025/5/18 22:34, Jan Beulich wrote: >> On 09.05.2025 11:05, Jiqian Chen wrote: >>> --- a/xen/drivers/vpci/msi.c >>> +++ b/xen/drivers/vpci/msi.c >>> @@ -270,7 +270,7 @@ static int cf_check init_msi(struct pci_dev *pdev) >>> >>> return 0; >>> } >>> -REGISTER_VPCI_INIT(init_msi, VPCI_PRIORITY_LOW); >>> +REGISTER_VPCI_LEGACY_CAP(PCI_CAP_ID_MSI, init_msi, NULL); >> >> To keep identifier length bounded, how about REGISTER_VPCI_CAP() here >> and ... >> >>> --- a/xen/drivers/vpci/rebar.c >>> +++ b/xen/drivers/vpci/rebar.c >>> @@ -118,7 +118,7 @@ static int cf_check init_rebar(struct pci_dev *pdev) >>> >>> return 0; >>> } >>> -REGISTER_VPCI_INIT(init_rebar, VPCI_PRIORITY_LOW); >>> +REGISTER_VPCI_EXTENDED_CAP(PCI_EXT_CAP_ID_REBAR, init_rebar, NULL); >> >> ... and REGISTER_VPCI_EXTCAP() here? > > If so, I need to change the name of REGISTER_VPCI_CAP to be > _REGISTER_VPCI_CAP ? > > #define REGISTER_VPCI_CAP(cap, finit, fclean, ext) \ > static vpci_capability_t finit##_t = { \ > .id = (cap), \ > .init = (finit), \ > .cleanup = (fclean), \ > .is_ext = (ext), \ > }; \ > static vpci_capability_t *const finit##_entry \ > __used_section(".data.vpci") = &finit##_t That's a reserved name then. Since it's used only twice (to produce the other two macros), REGISTER_PCI_CAPABILITY() maybe? Or one of REGISTER_PCI__CAP() / REGISTER_PCI_CAP_()? Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |