diff options
author | Tim Wawrzynczak <twawrzynczak@chromium.org> | 2021-04-29 09:45:59 -0600 |
---|---|---|
committer | Tim Wawrzynczak <twawrzynczak@chromium.org> | 2021-05-03 16:28:42 +0000 |
commit | 93982c3a6ede0bdb8dd0e94597e4de7b09406947 (patch) | |
tree | 8c058b87b2adcd220d41a3530742c67b2426161e /src/drivers/wifi | |
parent | d87bbde169f84b8c723b0d5289f39df164251b52 (diff) |
device: Switch pci_dev_is_wake_source to take pci_devfn_t
With the recent switch to SMM module loader v2, the size of the SMM for
module google/volteer increased to above 64K in size, and thus failed to
install the permanent SMM handler. Turns out, the devicetree is all
pulled into the SMM build because of elog, which calls
`pci_dev_is_wake_source`, and is the only user of `struct device` in
SMM. Changing this function to take a pci_devfn_t instead allows the
linker to remove almost the entire devicetree from SMM (only usage left
is when disabling HECI via SMM).
BUG=b:186661594
TEST=Verify loaded program size of `smm.elf` for google/volteer is
almost ~50% smaller.
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: I4c39e5188321c8711d6479b15065e5aaedad8f38
Reviewed-on: https://review.coreboot.org/c/coreboot/+/52765
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/drivers/wifi')
-rw-r--r-- | src/drivers/wifi/generic/generic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/wifi/generic/generic.c b/src/drivers/wifi/generic/generic.c index 5429f6ba45..1ee7ab23ee 100644 --- a/src/drivers/wifi/generic/generic.c +++ b/src/drivers/wifi/generic/generic.c @@ -10,7 +10,7 @@ static void wifi_pci_dev_init(struct device *dev) { - if (pci_dev_is_wake_source(dev)) + if (pci_dev_is_wake_source(PCI_BDF(dev))) elog_add_event_wake(ELOG_WAKE_SOURCE_PME_WIFI, 0); } |