From 6403167d290da235a732bd2d6157aa2124fb403a Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Sat, 21 Apr 2018 14:45:32 -0600 Subject: compiler.h: add __weak macro Instead of writing out '__attribute__((weak))' use a shorter form. Change-Id: If418a1d55052780077febd2d8f2089021f414b91 Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/25767 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans Reviewed-by: Justin TerAvest --- src/soc/intel/common/block/systemagent/systemagent.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/soc/intel/common/block/systemagent') diff --git a/src/soc/intel/common/block/systemagent/systemagent.c b/src/soc/intel/common/block/systemagent/systemagent.c index 25b47737b1..54646c9595 100644 --- a/src/soc/intel/common/block/systemagent/systemagent.c +++ b/src/soc/intel/common/block/systemagent/systemagent.c @@ -15,6 +15,7 @@ #include #include +#include #include #include #include @@ -25,25 +26,25 @@ #include "systemagent_def.h" /* SoC override function */ -__attribute__((weak)) void soc_systemagent_init(struct device *dev) +__weak void soc_systemagent_init(struct device *dev) { /* no-op */ } -__attribute__((weak)) void soc_add_fixed_mmio_resources(struct device *dev, +__weak void soc_add_fixed_mmio_resources(struct device *dev, int *resource_cnt) { /* no-op */ } -__attribute__((weak)) int soc_get_uncore_prmmr_base_and_mask(uint64_t *base, +__weak int soc_get_uncore_prmmr_base_and_mask(uint64_t *base, uint64_t *mask) { /* return failure for this dummy API */ return -1; } -__attribute__((weak)) size_t soc_reserved_mmio_size(void) +__weak size_t soc_reserved_mmio_size(void) { return 0; } -- cgit v1.2.3