aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/ppc_mmu_32.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-04-21 15:50:49 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-21 15:50:49 -0700
commit9a64388d83f6ef08dfff405a9d122e3dbcb6bf38 (patch)
treea77532ce4d6d56be6c6c7f405cd901a0184250fb /arch/powerpc/mm/ppc_mmu_32.c
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6 (diff)
parent[POWERPC] Fix compile breakage for 64-bit UP configs (diff)
downloadlinux-dev-9a64388d83f6ef08dfff405a9d122e3dbcb6bf38.tar.xz
linux-dev-9a64388d83f6ef08dfff405a9d122e3dbcb6bf38.zip
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (202 commits) [POWERPC] Fix compile breakage for 64-bit UP configs [POWERPC] Define copy_siginfo_from_user32 [POWERPC] Add compat handler for PTRACE_GETSIGINFO [POWERPC] i2c: Fix build breakage introduced by OF helpers [POWERPC] Optimize fls64() on 64-bit processors [POWERPC] irqtrace support for 64-bit powerpc [POWERPC] Stacktrace support for lockdep [POWERPC] Move stackframe definitions to common header [POWERPC] Fix device-tree locking vs. interrupts [POWERPC] Make pci_bus_to_host()'s struct pci_bus * argument const [POWERPC] Remove unused __max_memory variable [POWERPC] Simplify xics direct/lpar irq_host setup [POWERPC] Use pseries_setup_i8259_cascade() in pseries_mpic_init_IRQ() [POWERPC] Turn xics_setup_8259_cascade() into a generic pseries_setup_i8259_cascade() [POWERPC] Move xics_setup_8259_cascade() into platforms/pseries/setup.c [POWERPC] Use asm-generic/bitops/find.h in bitops.h [POWERPC] 83xx: mpc8315 - fix USB UTMI Host setup [POWERPC] 85xx: Fix the size of qe muram for MPC8568E [POWERPC] 86xx: mpc86xx_hpcn - Temporarily accept old dts node identifier. [POWERPC] 86xx: mark functions static, other minor cleanups ...
Diffstat (limited to 'arch/powerpc/mm/ppc_mmu_32.c')
-rw-r--r--arch/powerpc/mm/ppc_mmu_32.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/arch/powerpc/mm/ppc_mmu_32.c b/arch/powerpc/mm/ppc_mmu_32.c
index 5c45d474cfcc..cef9f156874b 100644
--- a/arch/powerpc/mm/ppc_mmu_32.c
+++ b/arch/powerpc/mm/ppc_mmu_32.c
@@ -26,11 +26,11 @@
#include <linux/mm.h>
#include <linux/init.h>
#include <linux/highmem.h>
+#include <linux/lmb.h>
#include <asm/prom.h>
#include <asm/mmu.h>
#include <asm/machdep.h>
-#include <asm/lmb.h>
#include "mmu_decl.h"
@@ -82,7 +82,6 @@ unsigned long __init mmu_mapin_ram(void)
#else
unsigned long tot, bl, done;
unsigned long max_size = (256<<20);
- unsigned long align;
if (__map_without_bats) {
printk(KERN_DEBUG "RAM mapped without BATs\n");
@@ -93,19 +92,13 @@ unsigned long __init mmu_mapin_ram(void)
/* Make sure we don't map a block larger than the
smallest alignment of the physical address. */
- /* alignment of PPC_MEMSTART */
- align = ~(PPC_MEMSTART-1) & PPC_MEMSTART;
- /* set BAT block size to MIN(max_size, align) */
- if (align && align < max_size)
- max_size = align;
-
tot = total_lowmem;
for (bl = 128<<10; bl < max_size; bl <<= 1) {
if (bl * 2 > tot)
break;
}
- setbat(2, KERNELBASE, PPC_MEMSTART, bl, _PAGE_RAM);
+ setbat(2, KERNELBASE, 0, bl, _PAGE_RAM);
done = (unsigned long)bat_addrs[2].limit - KERNELBASE + 1;
if ((done < tot) && !bat_addrs[3].limit) {
/* use BAT3 to cover a bit more */
@@ -113,7 +106,7 @@ unsigned long __init mmu_mapin_ram(void)
for (bl = 128<<10; bl < max_size; bl <<= 1)
if (bl * 2 > tot)
break;
- setbat(3, KERNELBASE+done, PPC_MEMSTART+done, bl, _PAGE_RAM);
+ setbat(3, KERNELBASE+done, done, bl, _PAGE_RAM);
done = (unsigned long)bat_addrs[3].limit - KERNELBASE + 1;
}
@@ -240,7 +233,7 @@ void __init MMU_init_hw(void)
*/
if ( ppc_md.progress ) ppc_md.progress("hash:find piece", 0x322);
Hash = __va(lmb_alloc_base(Hash_size, Hash_size,
- __initial_memory_limit));
+ __initial_memory_limit_addr));
cacheable_memzero(Hash, Hash_size);
_SDR1 = __pa(Hash) | SDR1_LOW_BITS;