diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-12 07:28:37 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-12 07:28:37 -0700 |
commit | 59b1c82500bb5d658891bc8e8a2308b76d58a4de (patch) | |
tree | 493aeea552ba7590b3652614b9caf2a5df11c69c /arch | |
parent | 454aa3899f0bebb5aa7f8788690668d106f9a34f (diff) | |
parent | a94a172d6c826232e623160ae134abbce181a41f (diff) | |
download | linux-59b1c82500bb5d658891bc8e8a2308b76d58a4de.tar.bz2 |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
sparc64: Work around memory probing bug in openfirmware.
sparc32: fix rtrap.S typo
sparc32: Fix build.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sparc/kernel/rtrap.S | 2 | ||||
-rw-r--r-- | arch/sparc64/mm/init.c | 16 |
2 files changed, 12 insertions, 6 deletions
diff --git a/arch/sparc/kernel/rtrap.S b/arch/sparc/kernel/rtrap.S index b27b5b56f77a..ab818cdc4cc0 100644 --- a/arch/sparc/kernel/rtrap.S +++ b/arch/sparc/kernel/rtrap.S @@ -139,7 +139,7 @@ ret_trap_userwins_ok: LOAD_PT_PRIV(sp, t_psr, t_pc, t_npc) or %t_pc, %t_npc, %g2 andcc %g2, 0x3, %g0 - sethi %hi(PSR_SYCALL), %g2 + sethi %hi(PSR_SYSCALL), %g2 be 1f andn %t_psr, %g2, %t_psr diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index ec3e2c72302a..a9828d748e2c 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c @@ -610,8 +610,6 @@ static void __init remap_kernel(void) static void __init inherit_prom_mappings(void) { - read_obp_translations(); - /* Now fixup OBP's idea about where we really are mapped. */ printk("Remapping the kernel... "); remap_kernel(); @@ -1747,7 +1745,17 @@ void __init paging_init(void) lmb_init(); - /* Find available physical memory... */ + /* Find available physical memory... + * + * Read it twice in order to work around a bug in openfirmware. + * The call to grab this table itself can cause openfirmware to + * allocate memory, which in turn can take away some space from + * the list of available memory. Reading it twice makes sure + * we really do get the final value. + */ + read_obp_translations(); + read_obp_memory("reg", &pall[0], &pall_ents); + read_obp_memory("available", &pavail[0], &pavail_ents); read_obp_memory("available", &pavail[0], &pavail_ents); phys_base = 0xffffffffffffffffUL; @@ -1788,8 +1796,6 @@ void __init paging_init(void) inherit_prom_mappings(); - read_obp_memory("reg", &pall[0], &pall_ents); - init_kpte_bitmap(); /* Ok, we can use our TLB miss and window trap handlers safely. */ |