diff options
Diffstat (limited to 'arch/powerpc/kernel/head_64.S')
-rw-r--r-- | arch/powerpc/kernel/head_64.S | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 7e7f7d243304..a5ae04a57c78 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -1851,21 +1851,6 @@ _STATIC(start_here_multiplatform) | |||
1851 | bl .__save_cpu_setup | 1851 | bl .__save_cpu_setup |
1852 | sync | 1852 | sync |
1853 | 1853 | ||
1854 | /* Setup a valid physical PACA pointer in SPRG3 for early_setup | ||
1855 | * note that boot_cpuid can always be 0 nowadays since there is | ||
1856 | * nowhere it can be initialized differently before we reach this | ||
1857 | * code | ||
1858 | */ | ||
1859 | LOAD_REG_IMMEDIATE(r27, boot_cpuid) | ||
1860 | add r27,r27,r26 | ||
1861 | lwz r27,0(r27) | ||
1862 | |||
1863 | LOAD_REG_IMMEDIATE(r24, paca) /* Get base vaddr of paca array */ | ||
1864 | mulli r13,r27,PACA_SIZE /* Calculate vaddr of right paca */ | ||
1865 | add r13,r13,r24 /* for this processor. */ | ||
1866 | add r13,r13,r26 /* convert to physical addr */ | ||
1867 | mtspr SPRN_SPRG3,r13 | ||
1868 | |||
1869 | /* Do very early kernel initializations, including initial hash table, | 1854 | /* Do very early kernel initializations, including initial hash table, |
1870 | * stab and slb setup before we turn on relocation. */ | 1855 | * stab and slb setup before we turn on relocation. */ |
1871 | 1856 | ||
@@ -1934,6 +1919,17 @@ _STATIC(start_here_common) | |||
1934 | /* Not reached */ | 1919 | /* Not reached */ |
1935 | BUG_OPCODE | 1920 | BUG_OPCODE |
1936 | 1921 | ||
1922 | /* Put the paca pointer into r13 and SPRG3 */ | ||
1923 | _GLOBAL(setup_boot_paca) | ||
1924 | LOAD_REG_IMMEDIATE(r3, boot_cpuid) | ||
1925 | lwz r3,0(r3) | ||
1926 | LOAD_REG_IMMEDIATE(r4, paca) /* Get base vaddr of paca array */ | ||
1927 | mulli r3,r3,PACA_SIZE /* Calculate vaddr of right paca */ | ||
1928 | add r13,r3,r4 /* for this processor. */ | ||
1929 | mtspr SPRN_SPRG3,r13 | ||
1930 | |||
1931 | blr | ||
1932 | |||
1937 | /* | 1933 | /* |
1938 | * We put a few things here that have to be page-aligned. | 1934 | * We put a few things here that have to be page-aligned. |
1939 | * This stuff goes at the beginning of the bss, which is page-aligned. | 1935 | * This stuff goes at the beginning of the bss, which is page-aligned. |