Skip to content

Commit

Permalink
[ARM] Move zone adjustment for SA1111 on SA11x0 platforms
Browse files Browse the repository at this point in the history
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 <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King authored and Russell King committed Nov 16, 2005
1 parent 8dc39b8 commit 1b12050
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
11 changes: 11 additions & 0 deletions arch/arm/common/sa1111.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 2 additions & 12 deletions include/asm-arm/arch-sa1100/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 1b12050

Please sign in to comment.