Commit 59b1c825 authored by Linus Torvalds's avatar Linus Torvalds

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.
parents 454aa389 a94a172d
...@@ -139,7 +139,7 @@ ret_trap_userwins_ok: ...@@ -139,7 +139,7 @@ ret_trap_userwins_ok:
LOAD_PT_PRIV(sp, t_psr, t_pc, t_npc) LOAD_PT_PRIV(sp, t_psr, t_pc, t_npc)
or %t_pc, %t_npc, %g2 or %t_pc, %t_npc, %g2
andcc %g2, 0x3, %g0 andcc %g2, 0x3, %g0
sethi %hi(PSR_SYCALL), %g2 sethi %hi(PSR_SYSCALL), %g2
be 1f be 1f
andn %t_psr, %g2, %t_psr andn %t_psr, %g2, %t_psr
......
...@@ -610,8 +610,6 @@ static void __init remap_kernel(void) ...@@ -610,8 +610,6 @@ static void __init remap_kernel(void)
static void __init inherit_prom_mappings(void) static void __init inherit_prom_mappings(void)
{ {
read_obp_translations();
/* Now fixup OBP's idea about where we really are mapped. */ /* Now fixup OBP's idea about where we really are mapped. */
printk("Remapping the kernel... "); printk("Remapping the kernel... ");
remap_kernel(); remap_kernel();
...@@ -1747,7 +1745,17 @@ void __init paging_init(void) ...@@ -1747,7 +1745,17 @@ void __init paging_init(void)
lmb_init(); 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); read_obp_memory("available", &pavail[0], &pavail_ents);
phys_base = 0xffffffffffffffffUL; phys_base = 0xffffffffffffffffUL;
...@@ -1788,8 +1796,6 @@ void __init paging_init(void) ...@@ -1788,8 +1796,6 @@ void __init paging_init(void)
inherit_prom_mappings(); inherit_prom_mappings();
read_obp_memory("reg", &pall[0], &pall_ents);
init_kpte_bitmap(); init_kpte_bitmap();
/* Ok, we can use our TLB miss and window trap handlers safely. */ /* Ok, we can use our TLB miss and window trap handlers safely. */
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#include <linux/types.h>
struct pt_regs { struct pt_regs {
unsigned long psr; unsigned long psr;
unsigned long pc; unsigned long pc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment