diff options
Diffstat (limited to 'src/southbridge/amd/sb600')
-rw-r--r-- | src/southbridge/amd/sb600/sb600_sm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/southbridge/amd/sb600/sb600_sm.c b/src/southbridge/amd/sb600/sb600_sm.c index 67d02dc891..97ad48f398 100644 --- a/src/southbridge/amd/sb600/sb600_sm.c +++ b/src/southbridge/amd/sb600/sb600_sm.c @@ -27,6 +27,7 @@ #include <bitops.h> #include <arch/io.h> #include <cpu/x86/lapic.h> +#include <stdlib.h> #include "sb600.h" #include "sb600_smbus.c" @@ -101,7 +102,7 @@ static void setup_ioapic(unsigned long ioapic_base) l = (unsigned long *)ioapic_base; - for (i = 0; i < sizeof(ioapicregvalues) / sizeof(ioapicregvalues[0]); + for (i = 0; i < ARRAY_SIZE(ioapicregvalues); i++, a++) { l[0] = (a->reg * 2) + 0x10; l[4] = a->value_low; |