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 = {
0xc8a5d9c4, /* desc = "HvRD" ebcdic */
sizeof(struct HvReleaseData),
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) */
0,
1, /* tags inactive */
......
......@@ -512,17 +512,15 @@ _GLOBAL(do_stab_bolted_Pseries)
*/
. = NACA_PHYS_ADDR
.globl __end_interrupts
.globl __start_naca
__end_interrupts:
__start_naca:
#ifdef CONFIG_PPC_ISERIES
.globl naca
naca:
.llong itVpdAreas
#endif
. = SYSTEMCFG_PHYS_ADDR
.globl __end_naca
.globl __start_systemcfg
__end_naca:
__start_systemcfg:
. = (SYSTEMCFG_PHYS_ADDR + PAGE_SIZE)
.globl __end_systemcfg
......@@ -1270,10 +1268,6 @@ _STATIC(__start_initialization_iSeries)
SET_REG_TO_CONST(r4, SYSTEMCFG_VIRT_ADDR)
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
/* relocation is on at this point */
......@@ -1873,12 +1867,6 @@ _STATIC(start_here_multiplatform)
li r27,SYSTEMCFG_PHYS_ADDR
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
/* Start up the second thread on cpu 0 */
mfspr r3,PVR
......@@ -2015,11 +2003,6 @@ _STATIC(start_here_common)
SET_REG_TO_CONST(r8, SYSTEMCFG_VIRT_ADDR)
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)
lwz r26,0(r26)
......
......@@ -314,13 +314,13 @@ static void __init iSeries_parse_cmdline(void)
* If the init RAM disk has been configured and there is
* a non-zero starting address for it, set it up
*/
if (naca->xRamDisk) {
initrd_start = (unsigned long)__va(naca->xRamDisk);
initrd_end = initrd_start + naca->xRamDiskSize * PAGE_SIZE;
if (naca.xRamDisk) {
initrd_start = (unsigned long)__va(naca.xRamDisk);
initrd_end = initrd_start + naca.xRamDiskSize * PAGE_SIZE;
initrd_below_start_ok = 1; // ramdisk in kernel space
ROOT_DEV = Root_RAM0;
if (((rd_size * 1024) / PAGE_SIZE) < naca->xRamDiskSize)
rd_size = (naca->xRamDiskSize * PAGE_SIZE) / 1024;
if (((rd_size * 1024) / PAGE_SIZE) < naca.xRamDiskSize)
rd_size = (naca.xRamDiskSize * PAGE_SIZE) / 1024;
} else
#endif /* CONFIG_BLK_DEV_INITRD */
{
......@@ -813,9 +813,9 @@ static void __init iSeries_fixup_klimit(void)
* Change klimit to take into account any ram disk
* that may be included
*/
if (naca->xRamDisk)
klimit = KERNELBASE + (u64)naca->xRamDisk +
(naca->xRamDiskSize * PAGE_SIZE);
if (naca.xRamDisk)
klimit = KERNELBASE + (u64)naca.xRamDisk +
(naca.xRamDiskSize * PAGE_SIZE);
else {
/*
* No ram disk was included - check and see if there
......
......@@ -18,11 +18,8 @@
#include <asm/iSeries/ItLpPaca.h>
#include <asm/iSeries/ItLpQueue.h>
#include <asm/naca.h>
#include <asm/paca.h>
struct naca_struct *naca;
EXPORT_SYMBOL(naca);
struct systemcfg *systemcfg;
EXPORT_SYMBOL(systemcfg);
......
......@@ -26,6 +26,7 @@
// address of the OS's NACA).
//
#include <asm/types.h>
#include <asm/naca.h>
//=============================================================================
//
......
......@@ -21,12 +21,11 @@ struct naca_struct {
u64 xRamDiskSize; /* In pages 0x10 */
};
extern struct naca_struct *naca;
extern struct naca_struct naca;
#endif /* __ASSEMBLY__ */
#define NACA_PAGE 0x4
#define NACA_PHYS_ADDR (NACA_PAGE<<PAGE_SHIFT)
#define NACA_VIRT_ADDR (KERNELBASE+NACA_PHYS_ADDR)
#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