arch/x86: Replace some __SMM__ guards

We generally do not guard source in attempts to reduce
the final object sizes, but rely on garbage collection.

Most of the __unused attributes inserted here will be
removed when remaining __SIMPLE_DEVICE__ guards can
be removed.

Change-Id: I2440931fab4f41d7e8249c082e6c9b5a9cd0ef13
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36641
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Kyösti Mälkki
2019-11-05 18:50:38 +02:00
parent be5317f6d0
commit 21d6a27ac0
14 changed files with 72 additions and 91 deletions

View File

@@ -16,7 +16,9 @@
#include <stdint.h>
#include <arch/acpi.h>
#include <arch/io.h>
#include <device/device.h>
#include <device/mmio.h>
#include <device/pci.h>
#include <device/pci_ops.h>
#include <cbmem.h>
#include <console/console.h>
@@ -37,10 +39,7 @@ static inline pci_devfn_t get_pcu_dev(void)
return pcu_dev;
}
#else /* !__SMM__ */
#include <device/device.h>
#include <device/pci.h>
#else
static struct device *pcu_dev;
static struct device *get_pcu_dev(void)
{