From 1b12050f17460dc312cfd8cc59c79e181b23062b Mon Sep 17 00:00:00 2001 From: Russell King Date: Wed, 16 Nov 2005 17:38:40 +0000 Subject: [PATCH] [ARM] Move zone adjustment for SA1111 on SA11x0 platforms Unfortunately, using PAGE_SHIFT in asm/arch/memory.h is unsafe, and we can't include asm/page.h into this file because then we have a circular dependency. Move the offending code to arch/arm/common/sa1111.c instead. Signed-off-by: Russell King --- arch/arm/common/sa1111.c | 11 +++++++++++ include/asm-arm/arch-sa1100/memory.h | 14 ++------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index 39a6eea..25387cf 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c @@ -132,6 +132,17 @@ static struct sa1111_dev_info sa1111_devices[] = { }, }; +void __init sa1111_adjust_zones(int node, unsigned long *size, unsigned long *holes) +{ + unsigned int sz = SZ_1M >> PAGE_SHIFT; + + if (node != 0) + sz = 0; + + size[1] = size[0] - sz; + size[0] = sz; +} + /* * SA1111 interrupt support. Since clearing an IRQ while there are * active IRQs causes the interrupt output to pulse, the upper levels diff --git a/include/asm-arm/arch-sa1100/memory.h b/include/asm-arm/arch-sa1100/memory.h index 0fc555b..018a9f0 100644 --- a/include/asm-arm/arch-sa1100/memory.h +++ b/include/asm-arm/arch-sa1100/memory.h @@ -18,20 +18,10 @@ #ifndef __ASSEMBLY__ #ifdef CONFIG_SA1111 -static inline void -__arch_adjust_zones(int node, unsigned long *size, unsigned long *holes) -{ - unsigned int sz = SZ_1M >> PAGE_SHIFT; - - if (node != 0) - sz = 0; - - size[1] = size[0] - sz; - size[0] = sz; -} +void sa1111_adjust_zones(int node, unsigned long *size, unsigned long *holes); #define arch_adjust_zones(node, size, holes) \ - __arch_adjust_zones(node, size, holes) + sa1111_adjust_zones(node, size, holes) #define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_1M - 1) -- 2.7.4