Commit 9ce0fdcf authored by Stephen Rothwell's avatar Stephen Rothwell Committed by Linus Torvalds

[PATCH] ppc64: remove the naca from all but iSeries

This patch finally removes the naca from all architectures except legacy
iSeries and in the process makes it a structure instead of a pointer.
Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 722f5b46
...@@ -44,7 +44,7 @@ struct HvReleaseData hvReleaseData = { ...@@ -44,7 +44,7 @@ struct HvReleaseData hvReleaseData = {
0xc8a5d9c4, /* desc = "HvRD" ebcdic */ 0xc8a5d9c4, /* desc = "HvRD" ebcdic */
sizeof(struct HvReleaseData), sizeof(struct HvReleaseData),
offsetof(struct naca_struct, xItVpdAreas), offsetof(struct naca_struct, xItVpdAreas),
(struct naca_struct *)(NACA_VIRT_ADDR), /* 64-bit Naca address */ &naca, /* 64-bit Naca address */
0x6000, /* offset of LparMap within loadarea (see head.S) */ 0x6000, /* offset of LparMap within loadarea (see head.S) */
0, 0,
1, /* tags inactive */ 1, /* tags inactive */
......
...@@ -512,17 +512,15 @@ _GLOBAL(do_stab_bolted_Pseries) ...@@ -512,17 +512,15 @@ _GLOBAL(do_stab_bolted_Pseries)
*/ */
. = NACA_PHYS_ADDR . = NACA_PHYS_ADDR
.globl __end_interrupts .globl __end_interrupts
.globl __start_naca
__end_interrupts: __end_interrupts:
__start_naca:
#ifdef CONFIG_PPC_ISERIES #ifdef CONFIG_PPC_ISERIES
.globl naca
naca:
.llong itVpdAreas .llong itVpdAreas
#endif #endif
. = SYSTEMCFG_PHYS_ADDR . = SYSTEMCFG_PHYS_ADDR
.globl __end_naca
.globl __start_systemcfg .globl __start_systemcfg
__end_naca:
__start_systemcfg: __start_systemcfg:
. = (SYSTEMCFG_PHYS_ADDR + PAGE_SIZE) . = (SYSTEMCFG_PHYS_ADDR + PAGE_SIZE)
.globl __end_systemcfg .globl __end_systemcfg
...@@ -1270,10 +1268,6 @@ _STATIC(__start_initialization_iSeries) ...@@ -1270,10 +1268,6 @@ _STATIC(__start_initialization_iSeries)
SET_REG_TO_CONST(r4, SYSTEMCFG_VIRT_ADDR) SET_REG_TO_CONST(r4, SYSTEMCFG_VIRT_ADDR)
std r4,0(r9) /* set the systemcfg pointer */ std r4,0(r9) /* set the systemcfg pointer */
LOADADDR(r9,naca)
SET_REG_TO_CONST(r4, NACA_VIRT_ADDR)
std r4,0(r9) /* set the naca pointer */
bl .iSeries_early_setup bl .iSeries_early_setup
/* relocation is on at this point */ /* relocation is on at this point */
...@@ -1873,12 +1867,6 @@ _STATIC(start_here_multiplatform) ...@@ -1873,12 +1867,6 @@ _STATIC(start_here_multiplatform)
li r27,SYSTEMCFG_PHYS_ADDR li r27,SYSTEMCFG_PHYS_ADDR
std r27,0(r6) /* set the value of systemcfg */ std r27,0(r6) /* set the value of systemcfg */
/* setup the naca pointer which is needed by *tab_initialize */
LOADADDR(r6,naca)
sub r6,r6,r26 /* addr of the variable naca */
li r27,NACA_PHYS_ADDR
std r27,0(r6) /* set the value of naca */
#ifdef CONFIG_HMT #ifdef CONFIG_HMT
/* Start up the second thread on cpu 0 */ /* Start up the second thread on cpu 0 */
mfspr r3,PVR mfspr r3,PVR
...@@ -2015,11 +2003,6 @@ _STATIC(start_here_common) ...@@ -2015,11 +2003,6 @@ _STATIC(start_here_common)
SET_REG_TO_CONST(r8, SYSTEMCFG_VIRT_ADDR) SET_REG_TO_CONST(r8, SYSTEMCFG_VIRT_ADDR)
std r8,0(r9) std r8,0(r9)
/* setup the naca pointer */
LOADADDR(r9,naca)
SET_REG_TO_CONST(r8, NACA_VIRT_ADDR)
std r8,0(r9) /* set the value of the naca ptr */
LOADADDR(r26, boot_cpuid) LOADADDR(r26, boot_cpuid)
lwz r26,0(r26) lwz r26,0(r26)
......
...@@ -314,13 +314,13 @@ static void __init iSeries_parse_cmdline(void) ...@@ -314,13 +314,13 @@ static void __init iSeries_parse_cmdline(void)
* If the init RAM disk has been configured and there is * If the init RAM disk has been configured and there is
* a non-zero starting address for it, set it up * a non-zero starting address for it, set it up
*/ */
if (naca->xRamDisk) { if (naca.xRamDisk) {
initrd_start = (unsigned long)__va(naca->xRamDisk); initrd_start = (unsigned long)__va(naca.xRamDisk);
initrd_end = initrd_start + naca->xRamDiskSize * PAGE_SIZE; initrd_end = initrd_start + naca.xRamDiskSize * PAGE_SIZE;
initrd_below_start_ok = 1; // ramdisk in kernel space initrd_below_start_ok = 1; // ramdisk in kernel space
ROOT_DEV = Root_RAM0; ROOT_DEV = Root_RAM0;
if (((rd_size * 1024) / PAGE_SIZE) < naca->xRamDiskSize) if (((rd_size * 1024) / PAGE_SIZE) < naca.xRamDiskSize)
rd_size = (naca->xRamDiskSize * PAGE_SIZE) / 1024; rd_size = (naca.xRamDiskSize * PAGE_SIZE) / 1024;
} else } else
#endif /* CONFIG_BLK_DEV_INITRD */ #endif /* CONFIG_BLK_DEV_INITRD */
{ {
...@@ -813,9 +813,9 @@ static void __init iSeries_fixup_klimit(void) ...@@ -813,9 +813,9 @@ static void __init iSeries_fixup_klimit(void)
* Change klimit to take into account any ram disk * Change klimit to take into account any ram disk
* that may be included * that may be included
*/ */
if (naca->xRamDisk) if (naca.xRamDisk)
klimit = KERNELBASE + (u64)naca->xRamDisk + klimit = KERNELBASE + (u64)naca.xRamDisk +
(naca->xRamDiskSize * PAGE_SIZE); (naca.xRamDiskSize * PAGE_SIZE);
else { else {
/* /*
* No ram disk was included - check and see if there * No ram disk was included - check and see if there
......
...@@ -18,11 +18,8 @@ ...@@ -18,11 +18,8 @@
#include <asm/iSeries/ItLpPaca.h> #include <asm/iSeries/ItLpPaca.h>
#include <asm/iSeries/ItLpQueue.h> #include <asm/iSeries/ItLpQueue.h>
#include <asm/naca.h>
#include <asm/paca.h> #include <asm/paca.h>
struct naca_struct *naca;
EXPORT_SYMBOL(naca);
struct systemcfg *systemcfg; struct systemcfg *systemcfg;
EXPORT_SYMBOL(systemcfg); EXPORT_SYMBOL(systemcfg);
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
// address of the OS's NACA). // address of the OS's NACA).
// //
#include <asm/types.h> #include <asm/types.h>
#include <asm/naca.h>
//============================================================================= //=============================================================================
// //
......
...@@ -21,12 +21,11 @@ struct naca_struct { ...@@ -21,12 +21,11 @@ struct naca_struct {
u64 xRamDiskSize; /* In pages 0x10 */ u64 xRamDiskSize; /* In pages 0x10 */
}; };
extern struct naca_struct *naca; extern struct naca_struct naca;
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#define NACA_PAGE 0x4 #define NACA_PAGE 0x4
#define NACA_PHYS_ADDR (NACA_PAGE<<PAGE_SHIFT) #define NACA_PHYS_ADDR (NACA_PAGE<<PAGE_SHIFT)
#define NACA_VIRT_ADDR (KERNELBASE+NACA_PHYS_ADDR)
#endif /* _NACA_H */ #endif /* _NACA_H */
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