blob: 85c016c706d1ca840c662e6085dc035c3e0e95d8 [file] [log] [blame]
#include <linux/tables.h>
#include <asm/x86_init_fn.h>
#include <asm/bootparam.h>
#include <linux/pci.h>
DECLARE_LINKTABLE_RO(struct pci_fixup, pci_fixup_early);
void early_init_pci(void) {
const struct pci_fixup *fixup;
unsigned int tbl_size = LINKTABLE_SIZE(pci_fixup_early);
pr_info("PCI fixup size: %d\n", tbl_size);
sleep(1);
pr_info("Demo: Using LINKTABLE_FOR_EACH\n");
LINKTABLE_FOR_EACH(fixup, pci_fixup_early)
fixup->hook();
pr_info("Demo: Using LINKTABLE_RUN_ALL\n");
LINKTABLE_RUN_ALL(pci_fixup_early, hook,);
}
bool detect_pci(void) {
return true;
}
X86_INIT_EARLY_ALL(pci, detect_pci, NULL, early_init_pci, NULL, NULL);