Skip to content

Commit

Permalink
[PATCH] Remove NACA fixed address constraint
Browse files Browse the repository at this point in the history
Comments in head.S suggest that the iSeries naca has a fixed address,
because tools expect to find it there.  The only tool which appears to
access the naca is addRamDisk, but both the in-kernel version and the
version used in RHEL and SuSE in fact locate the NACA the same way as
the hypervisor does, by following the pointer in the hvReleaseData
structure.

Since the requirement for a fixed address seems to be obsolete, this
patch removes the naca from head.S and replaces it with a normal C
initializer.

For good measure, it removes an old version of addRamDisk.c which was
sitting, unused, in the ppc32 tree.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
David Gibson authored and Paul Mackerras committed Aug 29, 2005
1 parent 19dbd0f commit 2e2446e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 226 deletions.
203 changes: 0 additions & 203 deletions arch/ppc/boot/utils/addRamDisk.c

This file was deleted.

11 changes: 11 additions & 0 deletions arch/ppc64/kernel/LparData.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@ struct HvReleaseData hvReleaseData = {
0xf4, 0x4b, 0xf6, 0xf4 },
};

/*
* The NACA. The first dword of the naca is required by the iSeries
* hypervisor to point to itVpdAreas. The hypervisor finds the NACA
* through the pointer in hvReleaseData.
*/
struct naca_struct naca = {
.xItVpdAreas = &itVpdAreas,
.xRamDisk = 0,
.xRamDiskSize = 0,
};

extern void system_reset_iSeries(void);
extern void machine_check_iSeries(void);
extern void data_access_iSeries(void);
Expand Down
17 changes: 1 addition & 16 deletions arch/ppc64/kernel/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include <asm/processor.h>
#include <asm/page.h>
#include <asm/mmu.h>
#include <asm/naca.h>
#include <asm/systemcfg.h>
#include <asm/ppc_asm.h>
#include <asm/offsets.h>
Expand Down Expand Up @@ -511,24 +510,10 @@ _GLOBAL(do_stab_bolted_pSeries)
mfspr r12,SPRG2
EXCEPTION_PROLOG_PSERIES(PACA_EXSLB, .do_stab_bolted)


/* Space for the naca. Architected to be located at real address
* NACA_PHYS_ADDR. Various tools rely on this location being fixed.
* The first dword of the naca is required by iSeries LPAR to
* point to itVpdAreas. On pSeries native, this value is not used.
*/
. = NACA_PHYS_ADDR
.globl __end_interrupts
__end_interrupts:
#ifdef CONFIG_PPC_ISERIES
.globl naca
naca:
.llong itVpdAreas
.llong 0 /* xRamDisk */
.llong 0 /* xRamDiskSize */

. = 0x6100

#ifdef CONFIG_PPC_ISERIES
/*** ISeries-LPAR interrupt handlers ***/

STD_EXCEPTION_ISERIES(0x200, machine_check, PACA_EXMC)
Expand Down
7 changes: 0 additions & 7 deletions include/asm-ppc64/naca.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@

#include <asm/types.h>

#ifndef __ASSEMBLY__

struct naca_struct {
/* Kernel only data - undefined for user space */
void *xItVpdAreas; /* VPD Data 0x00 */
Expand All @@ -23,9 +21,4 @@ struct naca_struct {

extern struct naca_struct naca;

#endif /* __ASSEMBLY__ */

#define NACA_PAGE 0x4
#define NACA_PHYS_ADDR (NACA_PAGE<<PAGE_SHIFT)

#endif /* _NACA_H */

0 comments on commit 2e2446e

Please sign in to comment.