Commit 2c24cc13 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ppc64: preliminary iseries support, from Paul Mackerras

From: Anton Blanchard <anton@samba.org>

Preliminary iSeries support.  Still a bit hackish in parts but it does
compile.  The viodasd driver is almost completely untested so don't trust it
with your data.
parent 228ab0bd
...@@ -10,21 +10,26 @@ obj-y := setup.o entry.o traps.o irq.o idle.o \ ...@@ -10,21 +10,26 @@ obj-y := setup.o entry.o traps.o irq.o idle.o \
align.o semaphore.o bitops.o stab.o htab.o pacaData.o \ align.o semaphore.o bitops.o stab.o htab.o pacaData.o \
udbg.o binfmt_elf32.o sys_ppc32.o ioctl32.o \ udbg.o binfmt_elf32.o sys_ppc32.o ioctl32.o \
ptrace32.o signal32.o pmc.o rtc.o init_task.o \ ptrace32.o signal32.o pmc.o rtc.o init_task.o \
lmb.o pci.o pci_dn.o pci_dma.o cputable.o lmb.o cputable.o
obj-$(CONFIG_PPC_ISERIES) += iSeries_pci.o iSeries_pci_reset.o \ obj-$(CONFIG_PCI) += pci.o pci_dn.o pci_dma.o
iSeries_IoMmTable.o iSeries_irq.o \
iSeries_VpdInfo.o XmPciLpEvent.o \ ifdef CONFIG_PPC_ISERIES
obj-$(CONFIG_PCI) += iSeries_pci.o iSeries_pci_reset.o \
iSeries_IoMmTable.o
endif
obj-$(CONFIG_PPC_ISERIES) += iSeries_irq.o \
iSeries_VpdInfo.o XmPciLpEvent.o \
HvCall.o HvLpConfig.o LparData.o mf_proc.o \ HvCall.o HvLpConfig.o LparData.o mf_proc.o \
iSeries_setup.o ItLpQueue.o hvCall.o \ iSeries_setup.o ItLpQueue.o hvCall.o \
mf.o HvLpEvent.o iSeries_proc.o mf.o HvLpEvent.o iSeries_proc.o iSeries_htab.o \
proc_pmc.o
obj-$(CONFIG_PPC_PSERIES) += pSeries_pci.o pSeries_lpar.o pSeries_hvCall.o \ obj-$(CONFIG_PPC_PSERIES) += pSeries_pci.o pSeries_lpar.o pSeries_hvCall.o \
eeh.o nvram.o rtasd.o ras.o eeh.o nvram.o rtasd.o ras.o \
open_pic.o xics.o pSeries_htab.o rtas.o \
# Change this to pSeries only once we've got iSeries up to date chrp_setup.o i8259.o prom.o
obj-y += open_pic.o xics.o pSeries_htab.o rtas.o \
chrp_setup.o i8259.o prom.o
obj-$(CONFIG_PROC_FS) += proc_ppc64.o obj-$(CONFIG_PROC_FS) += proc_ppc64.o
obj-$(CONFIG_RTAS_FLASH) += rtas_flash.o obj-$(CONFIG_RTAS_FLASH) += rtas_flash.o
...@@ -32,5 +37,6 @@ obj-$(CONFIG_SMP) += smp.o ...@@ -32,5 +37,6 @@ obj-$(CONFIG_SMP) += smp.o
obj-$(CONFIG_MODULES) += module.o ppc_ksyms.o obj-$(CONFIG_MODULES) += module.o ppc_ksyms.o
obj-$(CONFIG_PPC_RTAS) += rtas-proc.o obj-$(CONFIG_PPC_RTAS) += rtas-proc.o
obj-$(CONFIG_SCANLOG) += scanlog.o obj-$(CONFIG_SCANLOG) += scanlog.o
obj-$(CONFIG_VIOPATH) += viopath.o
CFLAGS_ioctl32.o += -Ifs/ CFLAGS_ioctl32.o += -Ifs/
...@@ -65,8 +65,6 @@ ...@@ -65,8 +65,6 @@
#include <asm/ppcdebug.h> #include <asm/ppcdebug.h>
#include <asm/cputable.h> #include <asm/cputable.h>
extern volatile unsigned char *chrp_int_ack_special;
void chrp_progress(char *, unsigned short); void chrp_progress(char *, unsigned short);
extern void openpic_init_IRQ(void); extern void openpic_init_IRQ(void);
......
...@@ -275,15 +275,6 @@ _GLOBAL(_switch) ...@@ -275,15 +275,6 @@ _GLOBAL(_switch)
addi r6,r4,-THREAD /* Convert THREAD to 'current' */ addi r6,r4,-THREAD /* Convert THREAD to 'current' */
std r6,PACACURRENT(r13) /* Set new 'current' */ std r6,PACACURRENT(r13) /* Set new 'current' */
#ifdef CONFIG_PPC_ISERIES
#error fixme
ld r7,TI_FLAGS(r4) /* Get run light flag */
mfspr r9,CTRLF
srdi r7,r7,1 /* Align to run light bit in CTRL reg */
insrdi r9,r7,1,63 /* Insert run light into CTRL */
mtspr CTRLT,r9
#endif
ld r1,KSP(r4) /* Load new stack pointer */ ld r1,KSP(r4) /* Load new stack pointer */
ld r6,_CCR(r1) ld r6,_CCR(r1)
mtcrf 0xFF,r6 mtcrf 0xFF,r6
...@@ -291,6 +282,15 @@ _GLOBAL(_switch) ...@@ -291,6 +282,15 @@ _GLOBAL(_switch)
REST_8GPRS(14, r1) REST_8GPRS(14, r1)
REST_10GPRS(22, r1) REST_10GPRS(22, r1)
#ifdef CONFIG_PPC_ISERIES
clrrdi r7,r1,THREAD_SHIFT /* get current_thread_info() */
ld r7,TI_FLAGS(r7) /* Get run light flag */
mfspr r9,CTRLF
srdi r7,r7,TIF_RUN_LIGHT
insrdi r9,r7,1,63 /* Insert run light into CTRL */
mtspr CTRLT,r9
#endif
/* convert old thread to its task_struct for return value */ /* convert old thread to its task_struct for return value */
addi r3,r3,-THREAD addi r3,r3,-THREAD
ld r7,_NIP(r1) /* Return to _switch caller in new task */ ld r7,_NIP(r1) /* Return to _switch caller in new task */
...@@ -308,39 +308,16 @@ _GLOBAL(ret_from_fork) ...@@ -308,39 +308,16 @@ _GLOBAL(ret_from_fork)
b .ret_from_except b .ret_from_except
_GLOBAL(ret_from_except) _GLOBAL(ret_from_except)
#ifdef CONFIG_PPC_ISERIES
ld r5,SOFTE(r1)
cmpdi 0,r5,0
beq 4f
irq_recheck:
/* Check for pending interrupts (iSeries) */
CHECKANYINT(r3,r4)
beq+ 4f /* skip do_IRQ if no interrupts */
#warning FIX ISERIES
mfspr r5,SPRG3
li r3,0
stb r3,PACAPROCENABLED(r5) /* ensure we are disabled */
addi r3,r1,STACK_FRAME_OVERHEAD
bl .do_IRQ
b irq_recheck /* loop back and handle more */
4:
#endif
/* /*
* Disable interrupts so that current_thread_info()->flags * Disable interrupts so that current_thread_info()->flags
* can't change between when we test it and when we return * can't change between when we test it and when we return
* from the interrupt. * from the interrupt.
*/ */
recheck:
mfmsr r10 /* Get current interrupt state */ mfmsr r10 /* Get current interrupt state */
li r4,0 li r4,0
ori r4,r4,MSR_EE ori r4,r4,MSR_EE
andc r10,r10,r4 /* clear MSR_EE */ andc r9,r10,r4 /* clear MSR_EE */
mtmsrd r10,1 /* Update machine state */ mtmsrd r9,1 /* Update machine state */
#ifdef CONFIG_PPC_ISERIES
#error fix iSeries soft disable
#endif
ld r3,_MSR(r1) /* Returning to user mode? */ ld r3,_MSR(r1) /* Returning to user mode? */
andi. r3,r3,MSR_PR andi. r3,r3,MSR_PR
...@@ -364,6 +341,28 @@ recheck: ...@@ -364,6 +341,28 @@ recheck:
REST_GPR(13,r1) REST_GPR(13,r1)
restore: restore:
#ifdef CONFIG_PPC_ISERIES
ld r5,SOFTE(r1)
mfspr r4,SPRG3 /* get paca address */
cmpdi 0,r5,0
beq 4f
/* Check for pending interrupts (iSeries) */
/* this is CHECKANYINT except that we already have the paca address */
ld r3,PACALPPACA+LPPACAANYINT(r4)
cmpdi r3,0
beq+ 4f /* skip do_IRQ if no interrupts */
mfspr r13,SPRG3 /* get paca pointer back */
li r3,0
stb r3,PACAPROCENABLED(r13) /* ensure we are soft-disabled */
mtmsrd r10 /* hard-enable again */
addi r3,r1,STACK_FRAME_OVERHEAD
bl .do_IRQ
b .ret_from_except /* loop back and handle more */
4: stb r5,PACAPROCENABLED(r4)
#endif
ld r3,_CTR(r1) ld r3,_CTR(r1)
ld r0,_LINK(r1) ld r0,_LINK(r1)
mtctr r3 mtctr r3
...@@ -377,12 +376,6 @@ restore: ...@@ -377,12 +376,6 @@ restore:
stdcx. r0,0,r1 /* to clear the reservation */ stdcx. r0,0,r1 /* to clear the reservation */
#ifdef DO_SOFT_DISABLE
/* XXX do this in do_work, r13 isnt valid here */
ld r0,SOFTE(r1)
stb r0,PACAPROCENABLED(r13)
#endif
mfmsr r0 mfmsr r0
li r2, MSR_RI li r2, MSR_RI
andc r0,r0,r2 andc r0,r0,r2
...@@ -407,21 +400,21 @@ restore: ...@@ -407,21 +400,21 @@ restore:
/* Note: this must change if we start using the TIF_NOTIFY_RESUME bit */ /* Note: this must change if we start using the TIF_NOTIFY_RESUME bit */
do_work: do_work:
/* Enable interrupts */ /* Enable interrupts */
ori r10,r10,MSR_EE
mtmsrd r10,1 mtmsrd r10,1
andi. r0,r3,_TIF_NEED_RESCHED andi. r0,r3,_TIF_NEED_RESCHED
beq 1f beq 1f
bl .schedule bl .schedule
b recheck b .ret_from_except
1: andi. r0,r3,_TIF_SIGPENDING 1: andi. r0,r3,_TIF_SIGPENDING
beq recheck beq .ret_from_except
li r3,0 li r3,0
addi r4,r1,STACK_FRAME_OVERHEAD addi r4,r1,STACK_FRAME_OVERHEAD
bl .do_signal bl .do_signal
b recheck b .ret_from_except
#ifdef CONFIG_PPC_PSERIES
/* /*
* On CHRP, the Run-Time Abstraction Services (RTAS) have to be * On CHRP, the Run-Time Abstraction Services (RTAS) have to be
* called with the MMU off. * called with the MMU off.
...@@ -632,3 +625,4 @@ _GLOBAL(enter_prom) ...@@ -632,3 +625,4 @@ _GLOBAL(enter_prom)
mtlr r0 mtlr r0
blr /* return to caller */ blr /* return to caller */
#endif /* defined(CONFIG_PPC_PSERIES) */
...@@ -91,20 +91,26 @@ ...@@ -91,20 +91,26 @@
.text .text
.globl _stext .globl _stext
_stext: _stext:
#ifdef CONFIG_PPC_PSERIES
_STATIC(__start) _STATIC(__start)
b .__start_initialization_pSeries b .__start_initialization_pSeries
#endif
#ifdef CONFIG_PPC_ISERIES #ifdef CONFIG_PPC_ISERIES
/* At offset 0x20, there is a pointer to iSeries LPAR data. /*
* This is required by the hypervisor */ * At offset 0x20, there is a pointer to iSeries LPAR data.
* This is required by the hypervisor
*/
. = 0x20 . = 0x20
.llong hvReleaseData-KERNELBASE .llong hvReleaseData-KERNELBASE
/* At offset 0x28 and 0x30 are offsets to the msChunks /*
* At offset 0x28 and 0x30 are offsets to the msChunks
* array (used by the iSeries LPAR debugger to do translation * array (used by the iSeries LPAR debugger to do translation
* between physical addresses and absolute addresses) and * between physical addresses and absolute addresses) and
* to the pidhash table (also used by the debugger) */ * to the pidhash table (also used by the debugger)
*/
.llong msChunks-KERNELBASE .llong msChunks-KERNELBASE
.llong pidhash-KERNELBASE .llong 0 /* pidhash-KERNELBASE SFRXXX */
/* Offset 0x38 - Pointer to start of embedded System.map */ /* Offset 0x38 - Pointer to start of embedded System.map */
.globl embedded_sysmap_start .globl embedded_sysmap_start
...@@ -114,7 +120,7 @@ embedded_sysmap_start: ...@@ -114,7 +120,7 @@ embedded_sysmap_start:
.globl embedded_sysmap_end .globl embedded_sysmap_end
embedded_sysmap_end: embedded_sysmap_end:
.llong 0 .llong 0
#endif #else
/* Secondary processors spin on this value until it goes to 1. */ /* Secondary processors spin on this value until it goes to 1. */
.globl __secondary_hold_spinloop .globl __secondary_hold_spinloop
...@@ -164,6 +170,7 @@ _GLOBAL(__secondary_hold) ...@@ -164,6 +170,7 @@ _GLOBAL(__secondary_hold)
BUG_OPCODE BUG_OPCODE
#endif #endif
#endif #endif
#endif
/* /*
* The following macros define the code that appears as * The following macros define the code that appears as
...@@ -245,6 +252,14 @@ _GLOBAL(__secondary_hold) ...@@ -245,6 +252,14 @@ _GLOBAL(__secondary_hold)
std r22,EX_SRR0(r21); /* save SRR0 in exc. frame */ \ std r22,EX_SRR0(r21); /* save SRR0 in exc. frame */ \
ld r23,LPPACA+LPPACASRR1(r20); /* Get SRR1 from ItLpPaca */ \ ld r23,LPPACA+LPPACASRR1(r20); /* Get SRR1 from ItLpPaca */ \
std r23,EX_SRR1(r21); /* save SRR1 in exc. frame */ \ std r23,EX_SRR1(r21); /* save SRR1 in exc. frame */ \
\
mfspr r23,DAR; /* Save DAR in exc. frame */ \
std r23,EX_DAR(r21); \
mfspr r23,DSISR; /* Save DSISR in exc. frame */ \
stw r23,EX_DSISR(r21); \
mfspr r23,SPRG2; /* Save r20 in exc. frame */ \
std r23,EX_R20(r21); \
\
mfcr r23; /* save CR in r23 */ mfcr r23; /* save CR in r23 */
/* /*
...@@ -1114,7 +1129,6 @@ _GLOBAL(save_remaining_regs) ...@@ -1114,7 +1129,6 @@ _GLOBAL(save_remaining_regs)
SET_REG_TO_CONST(r22, MSR_KERNEL) SET_REG_TO_CONST(r22, MSR_KERNEL)
#ifdef DO_SOFT_DISABLE #ifdef DO_SOFT_DISABLE
#warning FIX ISERIES
stb r20,PACAPROCENABLED(r13) /* possibly soft enable */ stb r20,PACAPROCENABLED(r13) /* possibly soft enable */
ori r22,r22,MSR_EE /* always hard enable */ ori r22,r22,MSR_EE /* always hard enable */
#else #else
...@@ -1220,6 +1234,7 @@ _GLOBAL(__start_initialization_iSeries) ...@@ -1220,6 +1234,7 @@ _GLOBAL(__start_initialization_iSeries)
b .start_here_common b .start_here_common
#endif #endif
#ifdef CONFIG_PPC_PSERIES
_GLOBAL(__start_initialization_pSeries) _GLOBAL(__start_initialization_pSeries)
mr r31,r3 /* save parameters */ mr r31,r3 /* save parameters */
mr r30,r4 mr r30,r4
...@@ -1329,6 +1344,7 @@ _STATIC(__after_prom_start) ...@@ -1329,6 +1344,7 @@ _STATIC(__after_prom_start)
sub r5,r5,r27 sub r5,r5,r27
bl .copy_and_flush /* copy the rest */ bl .copy_and_flush /* copy the rest */
b .start_here_pSeries b .start_here_pSeries
#endif
/* /*
* Copy routine used to copy the kernel to start at physical address 0 * Copy routine used to copy the kernel to start at physical address 0
...@@ -1595,6 +1611,7 @@ _GLOBAL(enable_32b_mode) ...@@ -1595,6 +1611,7 @@ _GLOBAL(enable_32b_mode)
isync isync
blr blr
#ifdef CONFIG_PPC_PSERIES
/* /*
* This is where the main kernel code starts. * This is where the main kernel code starts.
*/ */
...@@ -1730,6 +1747,7 @@ _STATIC(start_here_pSeries) ...@@ -1730,6 +1747,7 @@ _STATIC(start_here_pSeries)
mtspr SRR0,r3 mtspr SRR0,r3
mtspr SRR1,r4 mtspr SRR1,r4
rfid rfid
#endif /* CONFIG_PPC_PSERIES */
/* This is where all platforms converge execution */ /* This is where all platforms converge execution */
_STATIC(start_here_common) _STATIC(start_here_common)
...@@ -1804,10 +1822,8 @@ _STATIC(start_here_common) ...@@ -1804,10 +1822,8 @@ _STATIC(start_here_common)
/* Load up the kernel context */ /* Load up the kernel context */
5: 5:
#ifdef DO_SOFT_DISABLE #ifdef DO_SOFT_DISABLE
#warning FIX ISERIES
mfspr r4,SPRG3
li r5,0 li r5,0
stb r5,PACAPROCENABLED(r4) /* Soft Disabled */ stb r5,PACAPROCENABLED(r13) /* Soft Disabled */
mfmsr r5 mfmsr r5
ori r5,r5,MSR_EE /* Hard Enabled */ ori r5,r5,MSR_EE /* Hard Enabled */
mtmsrd r5 mtmsrd r5
......
...@@ -75,6 +75,7 @@ loop_forever(void) ...@@ -75,6 +75,7 @@ loop_forever(void)
; ;
} }
#ifdef CONFIG_PPC_PSERIES
static inline void static inline void
create_pte_mapping(unsigned long start, unsigned long end, create_pte_mapping(unsigned long start, unsigned long end,
unsigned long mode, int large) unsigned long mode, int large)
...@@ -181,6 +182,7 @@ htab_initialize(void) ...@@ -181,6 +182,7 @@ htab_initialize(void)
} }
#undef KB #undef KB
#undef MB #undef MB
#endif
/* /*
* find_linux_pte returns the address of a linux pte for a given * find_linux_pte returns the address of a linux pte for a given
......
#define PCIFR(...)
/************************************************************************/ /************************************************************************/
/* This module supports the iSeries I/O Address translation mapping */ /* This module supports the iSeries I/O Address translation mapping */
/* Copyright (C) 20yy <Allan H Trautman> <IBM Corp> */ /* Copyright (C) 20yy <Allan H Trautman> <IBM Corp> */
......
/*
* iSeries hashtable management.
* Derived from pSeries_htab.c
*
* SMP scalability work:
* Copyright (C) 2001 Anton Blanchard <anton@au.ibm.com>, IBM
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#include <asm/machdep.h>
#include <asm/pgtable.h>
#include <asm/mmu.h>
#include <asm/mmu_context.h>
#include <asm/iSeries/HvCallHpt.h>
#include <asm/abs_addr.h>
#if 0
#include <linux/spinlock.h>
#include <linux/bitops.h>
#include <linux/threads.h>
#include <linux/smp.h>
#include <asm/tlbflush.h>
#include <asm/tlb.h>
#include <asm/cputable.h>
#endif
static long iSeries_hpte_insert(unsigned long hpte_group, unsigned long va,
unsigned long prpn, int secondary,
unsigned long hpteflags, int bolted, int large)
{
long slot;
HPTE lhpte;
/*
* The hypervisor tries both primary and secondary.
* If we are being called to insert in the secondary,
* it means we have already tried both primary and secondary,
* so we return failure immediately.
*/
if (secondary)
return -1;
slot = HvCallHpt_findValid(&lhpte, va >> PAGE_SHIFT);
if (lhpte.dw0.dw0.v)
panic("select_hpte_slot found entry already valid\n");
if (slot == -1) /* No available entry found in either group */
return -1;
if (slot < 0) { /* MSB set means secondary group */
secondary = 1;
slot &= 0x7fffffffffffffff;
}
lhpte.dw1.dword1 = 0;
lhpte.dw1.dw1.rpn = physRpn_to_absRpn(prpn);
lhpte.dw1.flags.flags = hpteflags;
lhpte.dw0.dword0 = 0;
lhpte.dw0.dw0.avpn = va >> 23;
lhpte.dw0.dw0.h = secondary;
lhpte.dw0.dw0.bolted = bolted;
lhpte.dw0.dw0.v = 1;
/* Now fill in the actual HPTE */
HvCallHpt_addValidate(slot, secondary, &lhpte);
return (secondary << 3) | (slot & 7);
}
static unsigned long iSeries_hpte_getword0(unsigned long slot)
{
unsigned long dword0;
HPTE hpte;
HvCallHpt_get(&hpte, slot);
dword0 = hpte.dw0.dword0;
return dword0;
}
static long iSeries_hpte_remove(unsigned long hpte_group)
{
unsigned long slot_offset;
int i;
HPTE lhpte;
/* Pick a random slot to start at */
slot_offset = mftb() & 0x7;
for (i = 0; i < HPTES_PER_GROUP; i++) {
lhpte.dw0.dword0 =
iSeries_hpte_getword0(hpte_group + slot_offset);
if (!lhpte.dw0.dw0.bolted) {
HvCallHpt_invalidateSetSwBitsGet(hpte_group +
slot_offset, 0, 0);
return i;
}
slot_offset++;
slot_offset &= 0x7;
}
return -1;
}
static long iSeries_hpte_updatepp(unsigned long slot, unsigned long newpp,
unsigned long va, int large, int local)
{
HPTE hpte;
unsigned long avpn = va >> 23;
HvCallHpt_get(&hpte, slot);
if ((hpte.dw0.dw0.avpn == avpn) && (hpte.dw0.dw0.v)) {
HvCallHpt_setPp(slot, newpp);
return 0;
}
return -1;
}
/*
* Functions used to find the PTE for a particular virtual address.
* Only used during boot when bolting pages.
*
* Input : vpn : virtual page number
* Output: PTE index within the page table of the entry
* -1 on failure
*/
static long iSeries_hpte_find(unsigned long vpn)
{
HPTE hpte;
long slot;
/*
* The HvCallHpt_findValid interface is as follows:
* 0xffffffffffffffff : No entry found.
* 0x00000000xxxxxxxx : Entry found in primary group, slot x
* 0x80000000xxxxxxxx : Entry found in secondary group, slot x
*/
slot = HvCallHpt_findValid(&hpte, vpn);
if (hpte.dw0.dw0.v) {
if (slot < 0) {
slot &= 0x7fffffffffffffff;
slot = -slot;
}
} else
slot = -1;
return slot;
}
/*
* Update the page protection bits. Intended to be used to create
* guard pages for kernel data structures on pages which are bolted
* in the HPT. Assumes pages being operated on will not be stolen.
* Does not work on large pages.
*
* No need to lock here because we should be the only user.
*/
static void iSeries_hpte_updateboltedpp(unsigned long newpp, unsigned long ea)
{
unsigned long vsid,va,vpn;
long slot;
vsid = get_kernel_vsid(ea);
va = (vsid << 28) | (ea & 0x0fffffff);
vpn = va >> PAGE_SHIFT;
slot = iSeries_hpte_find(vpn);
if (slot == -1)
panic("updateboltedpp: Could not find page to bolt\n");
HvCallHpt_setPp(slot, newpp);
}
static void iSeries_hpte_invalidate(unsigned long slot, unsigned long va,
int large, int local)
{
HPTE lhpte;
unsigned long avpn = va >> 23;
lhpte.dw0.dword0 = iSeries_hpte_getword0(slot);
if ((lhpte.dw0.dw0.avpn == avpn) && lhpte.dw0.dw0.v)
HvCallHpt_invalidateSetSwBitsGet(slot, 0, 0);
}
void hpte_init_iSeries(void)
{
ppc_md.hpte_invalidate = iSeries_hpte_invalidate;
ppc_md.hpte_updatepp = iSeries_hpte_updatepp;
ppc_md.hpte_updateboltedpp = iSeries_hpte_updateboltedpp;
ppc_md.hpte_insert = iSeries_hpte_insert;
ppc_md.hpte_remove = iSeries_hpte_remove;
}
This diff is collapsed.
This diff is collapsed.
#define PCIFR(...)
/************************************************************************/ /************************************************************************/
/* File iSeries_pci_reset.c created by Allan Trautman on Mar 21 2001. */ /* File iSeries_pci_reset.c created by Allan Trautman on Mar 21 2001. */
/************************************************************************/ /************************************************************************/
......
...@@ -27,9 +27,8 @@ ...@@ -27,9 +27,8 @@
#include <asm/iSeries/iSeries_proc.h> #include <asm/iSeries/iSeries_proc.h>
#endif #endif
static struct proc_dir_entry *iSeries_proc_root;
static struct proc_dir_entry * iSeries_proc_root = NULL; static int iSeries_proc_initializationDone;
static int iSeries_proc_initializationDone = 0;
static spinlock_t iSeries_proc_lock; static spinlock_t iSeries_proc_lock;
struct iSeries_proc_registration struct iSeries_proc_registration
...@@ -96,21 +95,22 @@ void iSeries_proc_create(void) ...@@ -96,21 +95,22 @@ void iSeries_proc_create(void)
{ {
unsigned long flags; unsigned long flags;
struct iSeries_proc_registration *reg = NULL; struct iSeries_proc_registration *reg = NULL;
spin_lock_irqsave(&iSeries_proc_lock, flags);
printk("iSeries_proc: Creating /proc/iSeries\n"); printk("iSeries_proc: Creating /proc/iSeries\n");
spin_lock_irqsave(&iSeries_proc_lock, flags);
iSeries_proc_root = proc_mkdir("iSeries", 0); iSeries_proc_root = proc_mkdir("iSeries", 0);
if (!iSeries_proc_root) return; if (!iSeries_proc_root)
goto out;
MYQUEUEDEQ(&iSeries_queued, reg); MYQUEUEDEQ(&iSeries_queued, reg);
while (reg != NULL) { while (reg != NULL) {
(*(reg->functionMember))(iSeries_proc_root); (*(reg->functionMember))(iSeries_proc_root);
MYQUEUEDEQ(&iSeries_queued, reg); MYQUEUEDEQ(&iSeries_queued, reg);
} }
iSeries_proc_initializationDone = 1; iSeries_proc_initializationDone = 1;
out:
spin_unlock_irqrestore(&iSeries_proc_lock, flags); spin_unlock_irqrestore(&iSeries_proc_lock, flags);
} }
......
This diff is collapsed.
...@@ -19,25 +19,24 @@ ...@@ -19,25 +19,24 @@
#ifndef __ISERIES_SETUP_H__ #ifndef __ISERIES_SETUP_H__
#define __ISERIES_SETUP_H__ #define __ISERIES_SETUP_H__
extern void iSeries_init_early(void); extern void iSeries_init_early(void);
extern void iSeries_init(unsigned long r3, extern void iSeries_init(unsigned long r3, unsigned long ird_start,
unsigned long ird_start, unsigned long ird_end, unsigned long cline_start,
unsigned long ird_end, unsigned long cline_end);
unsigned long cline_start, extern void iSeries_setup_arch(void);
unsigned long cline_end); extern void iSeries_setup_residual(struct seq_file *m, int cpu_id);
extern void iSeries_setup_arch(void); extern void iSeries_get_cpuinfo(struct seq_file *m);
extern void iSeries_setup_residual(struct seq_file *m); extern void iSeries_init_IRQ(void);
extern void iSeries_get_cpuinfo(struct seq_file *m); extern void iSeries_init_irq_desc(irq_desc_t *);
extern void iSeries_init_IRQ(void); extern int iSeries_get_irq(struct pt_regs *regs);
extern int iSeries_get_irq(struct pt_regs *regs); extern void iSeries_restart(char *cmd);
extern void iSeries_restart(char *cmd); extern void iSeries_power_off(void);
extern void iSeries_power_off(void); extern void iSeries_halt(void);
extern void iSeries_halt(void); extern void iSeries_time_init(void);
extern void iSeries_time_init(void); extern void iSeries_get_boot_time(struct rtc_time *tm);
extern void iSeries_get_boot_time(struct rtc_time *tm); extern int iSeries_set_rtc_time(struct rtc_time *tm);
extern int iSeries_set_rtc_time(unsigned long now); extern void iSeries_get_rtc_time(struct rtc_time *tm);
extern unsigned long iSeries_get_rtc_time(void); extern void iSeries_calibrate_decr(void);
extern void iSeries_calibrate_decr(void); extern void iSeries_progress( char *, unsigned short );
extern void iSeries_progress( char *, unsigned short );
#endif /* __ISERIES_SETUP_H__ */ #endif /* __ISERIES_SETUP_H__ */
...@@ -70,7 +70,7 @@ static void yield_shared_processor(void) ...@@ -70,7 +70,7 @@ static void yield_shared_processor(void)
lpaca->next_jiffy_update_tb); lpaca->next_jiffy_update_tb);
lpaca->yielded = 0; /* Back to IPI's */ lpaca->yielded = 0; /* Back to IPI's */
locale_irq_enable(); local_irq_enable();
/* /*
* The decrementer stops during the yield. Force a fake * The decrementer stops during the yield. Force a fake
...@@ -89,16 +89,14 @@ int iSeries_idle(void) ...@@ -89,16 +89,14 @@ int iSeries_idle(void)
long oldval; long oldval;
unsigned long CTRL; unsigned long CTRL;
/* endless loop with no priority at all */
current->nice = 20;
current->counter = -100;
/* ensure iSeries run light will be out when idle */ /* ensure iSeries run light will be out when idle */
current->thread.flags &= ~PPC_FLAG_RUN_LIGHT; clear_thread_flag(TIF_RUN_LIGHT);
CTRL = mfspr(CTRLF); CTRL = mfspr(CTRLF);
CTRL &= ~RUNLATCH; CTRL &= ~RUNLATCH;
mtspr(CTRLT, CTRL); mtspr(CTRLT, CTRL);
#if 0
init_idle(); init_idle();
#endif
lpaca = get_paca(); lpaca = get_paca();
...@@ -106,26 +104,29 @@ int iSeries_idle(void) ...@@ -106,26 +104,29 @@ int iSeries_idle(void)
if (lpaca->xLpPaca.xSharedProc) { if (lpaca->xLpPaca.xSharedProc) {
if (ItLpQueue_isLpIntPending(lpaca->lpQueuePtr)) if (ItLpQueue_isLpIntPending(lpaca->lpQueuePtr))
process_iSeries_events(); process_iSeries_events();
if (!current->need_resched) if (!need_resched())
yield_shared_processor(); yield_shared_processor();
} else { } else {
/* Avoid an IPI by setting need_resched */ oldval = test_and_clear_thread_flag(TIF_NEED_RESCHED);
oldval = xchg(&current->need_resched, -1);
if (!oldval) { if (!oldval) {
while(current->need_resched == -1) { set_thread_flag(TIF_POLLING_NRFLAG);
while (!need_resched()) {
HMT_medium(); HMT_medium();
if (ItLpQueue_isLpIntPending(lpaca->lpQueuePtr)) if (ItLpQueue_isLpIntPending(lpaca->lpQueuePtr))
process_iSeries_events(); process_iSeries_events();
HMT_low(); HMT_low();
} }
HMT_medium();
clear_thread_flag(TIF_POLLING_NRFLAG);
} else {
set_need_resched();
} }
} }
HMT_medium();
if (current->need_resched) { schedule();
lpaca->xLpPaca.xIdle = 0;
schedule();
check_pgt_cache();
}
} }
return 0; return 0;
} }
...@@ -158,10 +159,11 @@ int default_idle(void) ...@@ -158,10 +159,11 @@ int default_idle(void)
return 0; return 0;
} }
#ifdef CONFIG_PPC_PSERIES
int dedicated_idle(void) int dedicated_idle(void)
{ {
long oldval; long oldval;
struct paca_struct *lpaca = get_paca(), *ppaca;; struct paca_struct *lpaca = get_paca(), *ppaca;
unsigned long start_snooze; unsigned long start_snooze;
ppaca = &paca[(lpaca->xPacaIndex) ^ 1]; ppaca = &paca[(lpaca->xPacaIndex) ^ 1];
...@@ -274,6 +276,7 @@ int shared_idle(void) ...@@ -274,6 +276,7 @@ int shared_idle(void)
return 0; return 0;
} }
#endif
int cpu_idle(void) int cpu_idle(void)
{ {
......
...@@ -59,7 +59,6 @@ ...@@ -59,7 +59,6 @@
extern void iSeries_smp_message_recv( struct pt_regs * ); extern void iSeries_smp_message_recv( struct pt_regs * );
#endif #endif
volatile unsigned char *chrp_int_ack_special;
static void register_irq_proc (unsigned int irq); static void register_irq_proc (unsigned int irq);
irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned = { irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned = {
...@@ -561,17 +560,14 @@ void ppc_irq_dispatch_handler(struct pt_regs *regs, int irq) ...@@ -561,17 +560,14 @@ void ppc_irq_dispatch_handler(struct pt_regs *regs, int irq)
spin_unlock(&desc->lock); spin_unlock(&desc->lock);
} }
#ifdef CONFIG_PPC_ISERIES
int do_IRQ(struct pt_regs *regs) int do_IRQ(struct pt_regs *regs)
{ {
int irq, first = 1;
#ifdef CONFIG_PPC_ISERIES
struct paca_struct *lpaca; struct paca_struct *lpaca;
struct ItLpQueue *lpq; struct ItLpQueue *lpq;
#endif
irq_enter(); irq_enter();
#ifdef CONFIG_PPC_ISERIES
lpaca = get_paca(); lpaca = get_paca();
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
if (lpaca->xLpPaca.xIntDword.xFields.xIpiCnt) { if (lpaca->xLpPaca.xIntDword.xFields.xIpiCnt) {
...@@ -582,7 +578,24 @@ int do_IRQ(struct pt_regs *regs) ...@@ -582,7 +578,24 @@ int do_IRQ(struct pt_regs *regs)
lpq = lpaca->lpQueuePtr; lpq = lpaca->lpQueuePtr;
if (lpq && ItLpQueue_isLpIntPending(lpq)) if (lpq && ItLpQueue_isLpIntPending(lpq))
lpEvent_count += ItLpQueue_process(lpq, regs); lpEvent_count += ItLpQueue_process(lpq, regs);
#else
irq_exit();
if (lpaca->xLpPaca.xIntDword.xFields.xDecrInt) {
lpaca->xLpPaca.xIntDword.xFields.xDecrInt = 0;
/* Signal a fake decrementer interrupt */
timer_interrupt(regs);
}
return 1; /* lets ret_from_int know we can do checks */
}
#else /* CONFIG_PPC_ISERIES */
int do_IRQ(struct pt_regs *regs)
{
int irq, first = 1;
irq_enter();
/* /*
* Every arch is required to implement ppc_md.get_irq. * Every arch is required to implement ppc_md.get_irq.
* This function will either return an irq number or -1 to * This function will either return an irq number or -1 to
...@@ -598,20 +611,12 @@ int do_IRQ(struct pt_regs *regs) ...@@ -598,20 +611,12 @@ int do_IRQ(struct pt_regs *regs)
if (irq != -2 && first) if (irq != -2 && first)
/* That's not SMP safe ... but who cares ? */ /* That's not SMP safe ... but who cares ? */
ppc_spurious_interrupts++; ppc_spurious_interrupts++;
#endif
irq_exit(); irq_exit();
#ifdef CONFIG_PPC_ISERIES
if (lpaca->xLpPaca.xIntDword.xFields.xDecrInt) {
lpaca->xLpPaca.xIntDword.xFields.xDecrInt = 0;
/* Signal a fake decrementer interrupt */
timer_interrupt(regs);
}
#endif
return 1; /* lets ret_from_int know we can do checks */ return 1; /* lets ret_from_int know we can do checks */
} }
#endif /* CONFIG_PPC_ISERIES */
unsigned long probe_irq_on (void) unsigned long probe_irq_on (void)
{ {
...@@ -636,10 +641,10 @@ void __init init_IRQ(void) ...@@ -636,10 +641,10 @@ void __init init_IRQ(void)
{ {
static int once = 0; static int once = 0;
if ( once ) if (once)
return; return;
else
once++; once++;
ppc_md.init_IRQ(); ppc_md.init_IRQ();
} }
......
This diff is collapsed.
...@@ -66,32 +66,31 @@ _GLOBAL(get_sp) ...@@ -66,32 +66,31 @@ _GLOBAL(get_sp)
blr blr
#ifdef CONFIG_PPC_ISERIES #ifdef CONFIG_PPC_ISERIES
/* unsigned long __no_use_save_flags(void) */ /* unsigned long local_save_flags(void) */
_GLOBAL(__no_use_save_flags) _GLOBAL(local_get_flags)
#warning FIX ISERIES lbz r3,PACAPROCENABLED(r13)
mfspr r4,SPRG3
lbz r3,PACAPROCENABLED(r4)
blr blr
/* void __no_use_restore_flags(unsigned long flags) */ /* unsigned long local_irq_disable(void) */
_GLOBAL(__no_use_restore_flags) _GLOBAL(local_irq_disable)
/* lbz r3,PACAPROCENABLED(r13)
* Just set/clear the MSR_EE bit through restore/flags but do not li r4,0
* change anything else. This is needed by the RT system and makes stb r4,PACAPROCENABLED(r13)
* sense anyway. blr /* Done */
* -- Cort
*/ /* void local_irq_restore(unsigned long flags) */
#warning FIX ISERIES _GLOBAL(local_irq_restore)
mfspr r6,SPRG3 lbz r5,PACAPROCENABLED(r13)
lbz r5,PACAPROCENABLED(r6)
/* Check if things are setup the way we want _already_. */ /* Check if things are setup the way we want _already_. */
cmpw 0,r3,r5 cmpw 0,r3,r5
beqlr beqlr
/* are we enabling interrupts? */ /* are we enabling interrupts? */
cmpi 0,r3,0 cmpi 0,r3,0
stb r3,PACAPROCENABLED(r6) stb r3,PACAPROCENABLED(r13)
beqlr beqlr
/* Check pending interrupts */ /* Check pending interrupts */
/* A decrementer, IPI or PMC interrupt may have occurred
* while we were in the hypervisor (which enables) */
CHECKANYINT(r4,r5) CHECKANYINT(r4,r5)
beqlr beqlr
...@@ -101,35 +100,8 @@ _GLOBAL(__no_use_restore_flags) ...@@ -101,35 +100,8 @@ _GLOBAL(__no_use_restore_flags)
li r0,0x5555 li r0,0x5555
sc sc
blr blr
#endif /* CONFIG_PPC_ISERIES */
_GLOBAL(__no_use_cli)
#warning FIX ISERIES
mfspr r5,SPRG3
lbz r3,PACAPROCENABLED(r5)
li r4,0
stb r4,PACAPROCENABLED(r5)
blr /* Done */
_GLOBAL(__no_use_sti)
#warning FIX ISERIES
mfspr r6,SPRG3
li r3,1
stb r3,PACAPROCENABLED(r6)
/* Check for pending interrupts
* A decrementer, IPI or PMC interrupt may have occurred
* while we were in the hypervisor (which enables)
*/
CHECKANYINT(r4,r5)
beqlr
/*
* Handle pending interrupts in interrupt context
*/
li r0,0x5555
sc
blr
#endif
/* /*
* Flush instruction cache. * Flush instruction cache.
*/ */
...@@ -595,6 +567,10 @@ SYSCALL(dup) ...@@ -595,6 +567,10 @@ SYSCALL(dup)
SYSCALL(execve) SYSCALL(execve)
SYSCALL(waitpid) SYSCALL(waitpid)
#ifdef CONFIG_PPC_ISERIES /* hack hack hack */
#define ppc_rtas sys_ni_syscall
#endif
/* Why isn't this a) automatic, b) written in 'C'? */ /* Why isn't this a) automatic, b) written in 'C'? */
.balign 8 .balign 8
_GLOBAL(sys_call_table32) _GLOBAL(sys_call_table32)
......
...@@ -48,11 +48,13 @@ ...@@ -48,11 +48,13 @@
/* #define MONITOR_TCE 1 */ /* Turn on to sanity check TCE generation. */ /* #define MONITOR_TCE 1 */ /* Turn on to sanity check TCE generation. */
#ifdef CONFIG_PPC_PSERIES
/* Initialize so this guy does not end up in the BSS section. /* Initialize so this guy does not end up in the BSS section.
* Only used to pass OF initialization data set in prom.c into the main * Only used to pass OF initialization data set in prom.c into the main
* kernel code -- data ultimately copied into tceTables[]. * kernel code -- data ultimately copied into tceTables[].
*/ */
extern struct _of_tce_table of_tce_table[]; extern struct _of_tce_table of_tce_table[];
#endif
extern struct pci_controller* hose_head; extern struct pci_controller* hose_head;
extern struct pci_controller** hose_tail; extern struct pci_controller** hose_tail;
...@@ -98,7 +100,7 @@ void free_tce_range_nolock(struct TceTable *, ...@@ -98,7 +100,7 @@ void free_tce_range_nolock(struct TceTable *,
unsigned order ); unsigned order );
/* allocates a range of tces and sets them to the pages */ /* allocates a range of tces and sets them to the pages */
inline dma_addr_t get_tces( struct TceTable *, static inline dma_addr_t get_tces( struct TceTable *,
unsigned order, unsigned order,
void *page, void *page,
unsigned numPages, unsigned numPages,
...@@ -210,7 +212,7 @@ static void tce_build_pSeries(struct TceTable *tbl, long tcenum, ...@@ -210,7 +212,7 @@ static void tce_build_pSeries(struct TceTable *tbl, long tcenum,
* Build a TceTable structure. This contains a multi-level bit map which * Build a TceTable structure. This contains a multi-level bit map which
* is used to manage allocation of the tce space. * is used to manage allocation of the tce space.
*/ */
struct TceTable *build_tce_table( struct TceTable * tbl ) static struct TceTable *build_tce_table( struct TceTable * tbl )
{ {
unsigned long bits, bytes, totalBytes; unsigned long bits, bytes, totalBytes;
unsigned long numBits[NUM_TCE_LEVELS], numBytes[NUM_TCE_LEVELS]; unsigned long numBits[NUM_TCE_LEVELS], numBytes[NUM_TCE_LEVELS];
...@@ -518,7 +520,7 @@ static long test_tce_range( struct TceTable *tbl, long tcenum, unsigned order ) ...@@ -518,7 +520,7 @@ static long test_tce_range( struct TceTable *tbl, long tcenum, unsigned order )
return retval; return retval;
} }
inline dma_addr_t get_tces( struct TceTable *tbl, unsigned order, void *page, unsigned numPages, int direction ) static inline dma_addr_t get_tces( struct TceTable *tbl, unsigned order, void *page, unsigned numPages, int direction )
{ {
long tcenum; long tcenum;
unsigned long uaddr; unsigned long uaddr;
...@@ -581,7 +583,7 @@ static void tce_free_one_pSeries( struct TceTable *tbl, long tcenum ) ...@@ -581,7 +583,7 @@ static void tce_free_one_pSeries( struct TceTable *tbl, long tcenum )
} }
#endif #endif
void tce_free(struct TceTable *tbl, dma_addr_t dma_addr, static void tce_free(struct TceTable *tbl, dma_addr_t dma_addr,
unsigned order, unsigned num_pages) unsigned order, unsigned num_pages)
{ {
long tcenum, total_tces, free_tce; long tcenum, total_tces, free_tce;
...@@ -701,6 +703,7 @@ void create_tce_tables_for_buses(struct list_head *bus_list) ...@@ -701,6 +703,7 @@ void create_tce_tables_for_buses(struct list_head *bus_list)
} }
} }
#ifdef CONFIG_PPC_PSERIES
void create_tce_tables_for_busesLP(struct list_head *bus_list) void create_tce_tables_for_busesLP(struct list_head *bus_list)
{ {
struct list_head *ln; struct list_head *ln;
...@@ -722,15 +725,19 @@ void create_tce_tables_for_busesLP(struct list_head *bus_list) ...@@ -722,15 +725,19 @@ void create_tce_tables_for_busesLP(struct list_head *bus_list)
create_tce_tables_for_busesLP(&bus->children); create_tce_tables_for_busesLP(&bus->children);
} }
} }
#endif
void create_tce_tables(void) { void create_tce_tables(void) {
struct pci_dev *dev = NULL; struct pci_dev *dev = NULL;
struct device_node *dn, *mydn; struct device_node *dn, *mydn;
#ifdef CONFIG_PPC_PSERIES
if (systemcfg->platform == PLATFORM_PSERIES_LPAR) { if (systemcfg->platform == PLATFORM_PSERIES_LPAR) {
create_tce_tables_for_busesLP(&pci_root_buses); create_tce_tables_for_busesLP(&pci_root_buses);
} }
else { else
#endif
{
create_tce_tables_for_buses(&pci_root_buses); create_tce_tables_for_buses(&pci_root_buses);
} }
/* Now copy the tce_table ptr from the bus devices down to every /* Now copy the tce_table ptr from the bus devices down to every
...@@ -884,6 +891,7 @@ static void getTceTableParmsiSeries(struct iSeries_Device_Node* DevNode, ...@@ -884,6 +891,7 @@ static void getTceTableParmsiSeries(struct iSeries_Device_Node* DevNode,
static void getTceTableParmsPSeries(struct pci_controller *phb, static void getTceTableParmsPSeries(struct pci_controller *phb,
struct device_node *dn, struct device_node *dn,
struct TceTable *newTceTable ) { struct TceTable *newTceTable ) {
#ifdef CONFIG_PPC_PSERIES
phandle node; phandle node;
unsigned long i; unsigned long i;
...@@ -953,6 +961,7 @@ static void getTceTableParmsPSeries(struct pci_controller *phb, ...@@ -953,6 +961,7 @@ static void getTceTableParmsPSeries(struct pci_controller *phb,
} }
i++; i++;
} }
#endif
} }
/* /*
...@@ -970,6 +979,7 @@ static void getTceTableParmsPSeries(struct pci_controller *phb, ...@@ -970,6 +979,7 @@ static void getTceTableParmsPSeries(struct pci_controller *phb,
static void getTceTableParmsPSeriesLP(struct pci_controller *phb, static void getTceTableParmsPSeriesLP(struct pci_controller *phb,
struct device_node *dn, struct device_node *dn,
struct TceTable *newTceTable ) { struct TceTable *newTceTable ) {
#ifdef CONFIG_PPC_PSERIES
u32 *dma_window = (u32 *)get_property(dn, "ibm,dma-window", 0); u32 *dma_window = (u32 *)get_property(dn, "ibm,dma-window", 0);
if (!dma_window) { if (!dma_window) {
panic("PCI_DMA: getTceTableParmsPSeriesLP: device %s has no ibm,dma-window property!\n", dn->full_name); panic("PCI_DMA: getTceTableParmsPSeriesLP: device %s has no ibm,dma-window property!\n", dn->full_name);
...@@ -985,6 +995,7 @@ static void getTceTableParmsPSeriesLP(struct pci_controller *phb, ...@@ -985,6 +995,7 @@ static void getTceTableParmsPSeriesLP(struct pci_controller *phb,
PPCDBG(PPCDBG_TCEINIT, "\tnewTceTable->index = 0x%lx\n", newTceTable->index); PPCDBG(PPCDBG_TCEINIT, "\tnewTceTable->index = 0x%lx\n", newTceTable->index);
PPCDBG(PPCDBG_TCEINIT, "\tnewTceTable->startOffset = 0x%lx\n", newTceTable->startOffset); PPCDBG(PPCDBG_TCEINIT, "\tnewTceTable->startOffset = 0x%lx\n", newTceTable->startOffset);
PPCDBG(PPCDBG_TCEINIT, "\tnewTceTable->size = 0x%lx\n", newTceTable->size); PPCDBG(PPCDBG_TCEINIT, "\tnewTceTable->size = 0x%lx\n", newTceTable->size);
#endif
} }
/* Allocates a contiguous real buffer and creates TCEs over it. /* Allocates a contiguous real buffer and creates TCEs over it.
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
static void * __init static void * __init
update_dn_pci_info(struct device_node *dn, void *data) update_dn_pci_info(struct device_node *dn, void *data)
{ {
#ifdef CONFIG_PPC_PSERIES
struct pci_controller *phb = (struct pci_controller *)data; struct pci_controller *phb = (struct pci_controller *)data;
u32 *regs; u32 *regs;
char *device_type = get_property(dn, "device_type", 0); char *device_type = get_property(dn, "device_type", 0);
...@@ -64,6 +65,7 @@ update_dn_pci_info(struct device_node *dn, void *data) ...@@ -64,6 +65,7 @@ update_dn_pci_info(struct device_node *dn, void *data)
dn->devfn = (regs[0] >> 8) & 0xff; dn->devfn = (regs[0] >> 8) & 0xff;
} }
} }
#endif
return NULL; return NULL;
} }
...@@ -97,6 +99,7 @@ void *traverse_pci_devices(struct device_node *start, traverse_func pre, travers ...@@ -97,6 +99,7 @@ void *traverse_pci_devices(struct device_node *start, traverse_func pre, travers
return ret; return ret;
for (dn = start->child; dn; dn = nextdn) { for (dn = start->child; dn; dn = nextdn) {
nextdn = NULL; nextdn = NULL;
#ifdef CONFIG_PPC_PSERIES
if (get_property(dn, "class-code", 0)) { if (get_property(dn, "class-code", 0)) {
if (pre && (ret = pre(dn, data)) != NULL) if (pre && (ret = pre(dn, data)) != NULL)
return ret; return ret;
...@@ -112,6 +115,7 @@ void *traverse_pci_devices(struct device_node *start, traverse_func pre, travers ...@@ -112,6 +115,7 @@ void *traverse_pci_devices(struct device_node *start, traverse_func pre, travers
post(dn, data); post(dn, data);
} }
} }
#endif
if (!nextdn) { if (!nextdn) {
/* Walk up to next valid sibling. */ /* Walk up to next valid sibling. */
do { do {
......
...@@ -170,15 +170,15 @@ EXPORT_SYMBOL(flush_icache_user_range); ...@@ -170,15 +170,15 @@ EXPORT_SYMBOL(flush_icache_user_range);
EXPORT_SYMBOL(flush_dcache_page); EXPORT_SYMBOL(flush_dcache_page);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
#ifdef CONFIG_PPC_ISERIES #ifdef CONFIG_PPC_ISERIES
EXPORT_SYMBOL(__no_use_restore_flags); EXPORT_SYMBOL(local_get_flags);
EXPORT_SYMBOL(__no_use_save_flags); EXPORT_SYMBOL(local_irq_disable);
EXPORT_SYMBOL(__no_use_sti); EXPORT_SYMBOL(local_irq_restore);
EXPORT_SYMBOL(__no_use_cli);
#endif #endif
#endif #endif
EXPORT_SYMBOL(ppc_md); EXPORT_SYMBOL(ppc_md);
#ifdef CONFIG_PPC_PSERIES
EXPORT_SYMBOL(find_devices); EXPORT_SYMBOL(find_devices);
EXPORT_SYMBOL(find_type_devices); EXPORT_SYMBOL(find_type_devices);
EXPORT_SYMBOL(find_compatible_devices); EXPORT_SYMBOL(find_compatible_devices);
...@@ -187,6 +187,7 @@ EXPORT_SYMBOL(device_is_compatible); ...@@ -187,6 +187,7 @@ EXPORT_SYMBOL(device_is_compatible);
EXPORT_SYMBOL(machine_is_compatible); EXPORT_SYMBOL(machine_is_compatible);
EXPORT_SYMBOL(find_all_nodes); EXPORT_SYMBOL(find_all_nodes);
EXPORT_SYMBOL(get_property); EXPORT_SYMBOL(get_property);
#endif
EXPORT_SYMBOL_NOVERS(memcpy); EXPORT_SYMBOL_NOVERS(memcpy);
......
...@@ -80,8 +80,8 @@ int proc_pmc_set_pmc6( struct file *file, const char *buffer, unsigned long cou ...@@ -80,8 +80,8 @@ int proc_pmc_set_pmc6( struct file *file, const char *buffer, unsigned long cou
int proc_pmc_set_pmc7( struct file *file, const char *buffer, unsigned long count, void *data); int proc_pmc_set_pmc7( struct file *file, const char *buffer, unsigned long count, void *data);
int proc_pmc_set_pmc8( struct file *file, const char *buffer, unsigned long count, void *data); int proc_pmc_set_pmc8( struct file *file, const char *buffer, unsigned long count, void *data);
#if 0
void proc_ppc64_init(void) int proc_ppc64_init(void)
{ {
unsigned long i; unsigned long i;
struct proc_dir_entry *ent = NULL; struct proc_dir_entry *ent = NULL;
...@@ -184,6 +184,7 @@ void proc_ppc64_init(void) ...@@ -184,6 +184,7 @@ void proc_ppc64_init(void)
ent->write_proc = NULL; ent->write_proc = NULL;
} }
} }
#endif
/* /*
* Find the requested 'file' given a proc token. * Find the requested 'file' given a proc token.
......
...@@ -55,6 +55,7 @@ static struct file_operations page_map_fops = { ...@@ -55,6 +55,7 @@ static struct file_operations page_map_fops = {
.mmap = page_map_mmap .mmap = page_map_mmap
}; };
#ifdef CONFIG_PPC_PSERIES
/* routines for /proc/ppc64/ofdt */ /* routines for /proc/ppc64/ofdt */
static ssize_t ofdt_write(struct file *, const char __user *, size_t, loff_t *); static ssize_t ofdt_write(struct file *, const char __user *, size_t, loff_t *);
static void proc_ppc64_create_ofdt(struct proc_dir_entry *); static void proc_ppc64_create_ofdt(struct proc_dir_entry *);
...@@ -66,6 +67,7 @@ static char * parse_next_property(char *, char *, char **, int *, unsigned char* ...@@ -66,6 +67,7 @@ static char * parse_next_property(char *, char *, char **, int *, unsigned char*
static struct file_operations ofdt_fops = { static struct file_operations ofdt_fops = {
.write = ofdt_write .write = ofdt_write
}; };
#endif
int __init proc_ppc64_init(void) int __init proc_ppc64_init(void)
{ {
...@@ -108,6 +110,7 @@ int __init proc_ppc64_init(void) ...@@ -108,6 +110,7 @@ int __init proc_ppc64_init(void)
} }
} }
#ifdef CONFIG_PPC_PSERIES
/* Placeholder for rtas interfaces. */ /* Placeholder for rtas interfaces. */
if (proc_ppc64.rtas == NULL) if (proc_ppc64.rtas == NULL)
proc_ppc64.rtas = proc_mkdir("rtas", proc_ppc64.root); proc_ppc64.rtas = proc_mkdir("rtas", proc_ppc64.root);
...@@ -116,6 +119,7 @@ int __init proc_ppc64_init(void) ...@@ -116,6 +119,7 @@ int __init proc_ppc64_init(void)
proc_symlink("rtas", 0, "ppc64/rtas"); proc_symlink("rtas", 0, "ppc64/rtas");
proc_ppc64_create_ofdt(proc_ppc64.root); proc_ppc64_create_ofdt(proc_ppc64.root);
#endif
return 0; return 0;
} }
...@@ -197,6 +201,7 @@ static int page_map_mmap( struct file *file, struct vm_area_struct *vma ) ...@@ -197,6 +201,7 @@ static int page_map_mmap( struct file *file, struct vm_area_struct *vma )
return 0; return 0;
} }
#ifdef CONFIG_PPC_PSERIES
/* create /proc/ppc64/ofdt write-only by root */ /* create /proc/ppc64/ofdt write-only by root */
static void proc_ppc64_create_ofdt(struct proc_dir_entry *parent) static void proc_ppc64_create_ofdt(struct proc_dir_entry *parent)
{ {
...@@ -417,5 +422,6 @@ static void release_prop_list(const struct property *prop) ...@@ -417,5 +422,6 @@ static void release_prop_list(const struct property *prop)
} }
} }
#endif /* defined(CONFIG_PPC_PSERIES) */
fs_initcall(proc_ppc64_init); fs_initcall(proc_ppc64_init);
...@@ -188,6 +188,7 @@ void setup_system(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -188,6 +188,7 @@ void setup_system(unsigned long r3, unsigned long r4, unsigned long r5,
#endif #endif
} }
#ifdef CONFIG_PPC_PSERIES
if (systemcfg->platform & PLATFORM_PSERIES) { if (systemcfg->platform & PLATFORM_PSERIES) {
early_console_initialized = 1; early_console_initialized = 1;
register_console(&udbg_console); register_console(&udbg_console);
...@@ -209,6 +210,7 @@ void setup_system(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -209,6 +210,7 @@ void setup_system(unsigned long r3, unsigned long r4, unsigned long r5,
} }
#endif #endif
} }
#endif
printk("Starting Linux PPC64 %s\n", UTS_RELEASE); printk("Starting Linux PPC64 %s\n", UTS_RELEASE);
...@@ -228,7 +230,7 @@ void setup_system(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -228,7 +230,7 @@ void setup_system(unsigned long r3, unsigned long r4, unsigned long r5,
mm_init_ppc64(); mm_init_ppc64();
#ifdef CONFIG_SMP #if defined(CONFIG_SMP) && defined(CONFIG_PPC_PSERIES)
if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) { if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) {
vpa_init(boot_cpuid); vpa_init(boot_cpuid);
} }
...@@ -310,6 +312,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) ...@@ -310,6 +312,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
seq_printf(m, "\n"); seq_printf(m, "\n");
#ifdef CONFIG_PPC_PSERIES
/* /*
* Assume here that all clock rates are the same in a * Assume here that all clock rates are the same in a
* smp system. -- Cort * smp system. -- Cort
...@@ -328,6 +331,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) ...@@ -328,6 +331,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
of_node_put(cpu_node); of_node_put(cpu_node);
} }
} }
#endif
if (ppc_md.setup_residual != NULL) if (ppc_md.setup_residual != NULL)
ppc_md.setup_residual(m, cpu_id); ppc_md.setup_residual(m, cpu_id);
...@@ -362,9 +366,6 @@ struct seq_operations cpuinfo_op = { ...@@ -362,9 +366,6 @@ struct seq_operations cpuinfo_op = {
void parse_cmd_line(unsigned long r3, unsigned long r4, unsigned long r5, void parse_cmd_line(unsigned long r3, unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7) unsigned long r6, unsigned long r7)
{ {
struct device_node *chosen;
char *p;
#ifdef CONFIG_BLK_DEV_INITRD #ifdef CONFIG_BLK_DEV_INITRD
if ((initrd_start == 0) && r3 && r4 && r4 != 0xdeadbeef) { if ((initrd_start == 0) && r3 && r4 && r4 != 0xdeadbeef) {
initrd_start = (r3 >= KERNELBASE) ? r3 : (unsigned long)__va(r3); initrd_start = (r3 >= KERNELBASE) ? r3 : (unsigned long)__va(r3);
...@@ -380,13 +381,20 @@ void parse_cmd_line(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -380,13 +381,20 @@ void parse_cmd_line(unsigned long r3, unsigned long r4, unsigned long r5,
strlcpy(cmd_line, CONFIG_CMDLINE, sizeof(cmd_line)); strlcpy(cmd_line, CONFIG_CMDLINE, sizeof(cmd_line));
#endif /* CONFIG_CMDLINE */ #endif /* CONFIG_CMDLINE */
#ifdef CONFIG_PPC_PSERIES
{
struct device_node *chosen;
chosen = of_find_node_by_name(NULL, "chosen"); chosen = of_find_node_by_name(NULL, "chosen");
if (chosen != NULL) { if (chosen != NULL) {
char *p;
p = get_property(chosen, "bootargs", NULL); p = get_property(chosen, "bootargs", NULL);
if (p != NULL && p[0] != 0) if (p != NULL && p[0] != 0)
strlcpy(cmd_line, p, sizeof(cmd_line)); strlcpy(cmd_line, p, sizeof(cmd_line));
of_node_put(chosen); of_node_put(chosen);
} }
}
#endif
/* Look for mem= option on command line */ /* Look for mem= option on command line */
if (strstr(cmd_line, "mem=")) { if (strstr(cmd_line, "mem=")) {
...@@ -412,28 +420,7 @@ void parse_cmd_line(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -412,28 +420,7 @@ void parse_cmd_line(unsigned long r3, unsigned long r4, unsigned long r5,
} }
char *bi_tag2str(unsigned long tag) #ifdef CONFIG_PPC_PSERIES
{
switch (tag) {
case BI_FIRST:
return "BI_FIRST";
case BI_LAST:
return "BI_LAST";
case BI_CMD_LINE:
return "BI_CMD_LINE";
case BI_BOOTLOADER_ID:
return "BI_BOOTLOADER_ID";
case BI_INITRD:
return "BI_INITRD";
case BI_SYSMAP:
return "BI_SYSMAP";
case BI_MACHTYPE:
return "BI_MACHTYPE";
default:
return "BI_UNKNOWN";
}
}
int parse_bootinfo(void) int parse_bootinfo(void)
{ {
struct bi_record *rec; struct bi_record *rec;
...@@ -467,6 +454,7 @@ int parse_bootinfo(void) ...@@ -467,6 +454,7 @@ int parse_bootinfo(void)
return 0; return 0;
} }
#endif
int __init ppc_init(void) int __init ppc_init(void)
{ {
......
...@@ -141,7 +141,7 @@ static int smp_iSeries_probe(void) ...@@ -141,7 +141,7 @@ static int smp_iSeries_probe(void)
for (i=0; i < NR_CPUS; ++i) { for (i=0; i < NR_CPUS; ++i) {
lpPaca = paca[i].xLpPacaPtr; lpPaca = paca[i].xLpPacaPtr;
if (lpPaca->xDynProcStatus < 2) { if (lpPaca->xDynProcStatus < 2) {
paca[i].active = 1; /*paca[i].active = 1;*/
++np; ++np;
} }
} }
...@@ -187,7 +187,6 @@ void __init smp_init_iSeries(void) ...@@ -187,7 +187,6 @@ void __init smp_init_iSeries(void)
smp_ops->probe = smp_iSeries_probe; smp_ops->probe = smp_iSeries_probe;
smp_ops->kick_cpu = smp_iSeries_kick_cpu; smp_ops->kick_cpu = smp_iSeries_kick_cpu;
smp_ops->setup_cpu = smp_iSeries_setup_cpu; smp_ops->setup_cpu = smp_iSeries_setup_cpu;
#warning fix for iseries
systemcfg->processorCount = smp_iSeries_numProcs(); systemcfg->processorCount = smp_iSeries_numProcs();
} }
#endif #endif
...@@ -689,9 +688,11 @@ int __devinit start_secondary(void *unused) ...@@ -689,9 +688,11 @@ int __devinit start_secondary(void *unused)
get_paca()->yielded = 0; get_paca()->yielded = 0;
#ifdef CONFIG_PPC_PSERIES
if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) { if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) {
vpa_init(cpu); vpa_init(cpu);
} }
#endif
local_irq_enable(); local_irq_enable();
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
* This file handles the architecture-dependent parts of hardware exceptions * This file handles the architecture-dependent parts of hardware exceptions
*/ */
#include <linux/config.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/kernel.h> #include <linux/kernel.h>
...@@ -26,7 +27,6 @@ ...@@ -26,7 +27,6 @@
#include <linux/user.h> #include <linux/user.h>
#include <linux/a.out.h> #include <linux/a.out.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/config.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/module.h> #include <linux/module.h>
...@@ -40,8 +40,10 @@ ...@@ -40,8 +40,10 @@
extern int fix_alignment(struct pt_regs *); extern int fix_alignment(struct pt_regs *);
extern void bad_page_fault(struct pt_regs *, unsigned long, int); extern void bad_page_fault(struct pt_regs *, unsigned long, int);
#ifdef CONFIG_PPC_PSERIES
/* This is true if we are using the firmware NMI handler (typically LPAR) */ /* This is true if we are using the firmware NMI handler (typically LPAR) */
extern int fwnmi_active; extern int fwnmi_active;
#endif
#ifdef CONFIG_DEBUG_KERNEL #ifdef CONFIG_DEBUG_KERNEL
void (*debugger)(struct pt_regs *regs); void (*debugger)(struct pt_regs *regs);
...@@ -96,6 +98,7 @@ _exception(int signr, siginfo_t *info, struct pt_regs *regs) ...@@ -96,6 +98,7 @@ _exception(int signr, siginfo_t *info, struct pt_regs *regs)
force_sig_info(signr, info, current); force_sig_info(signr, info, current);
} }
#ifdef CONFIG_PPC_PSERIES
/* Get the error information for errors coming through the /* Get the error information for errors coming through the
* FWNMI vectors. The pt_regs' r3 will be updated to reflect * FWNMI vectors. The pt_regs' r3 will be updated to reflect
* the actual r3 if possible, and a ptr to the error log entry * the actual r3 if possible, and a ptr to the error log entry
...@@ -128,10 +131,12 @@ static void FWNMI_release_errinfo(void) ...@@ -128,10 +131,12 @@ static void FWNMI_release_errinfo(void)
if (ret != 0) if (ret != 0)
printk("FWNMI: nmi-interlock failed: %ld\n", ret); printk("FWNMI: nmi-interlock failed: %ld\n", ret);
} }
#endif
void void
SystemResetException(struct pt_regs *regs) SystemResetException(struct pt_regs *regs)
{ {
#ifdef CONFIG_PPC_PSERIES
if (fwnmi_active) { if (fwnmi_active) {
struct rtas_error_log *errhdr = FWNMI_get_errinfo(regs); struct rtas_error_log *errhdr = FWNMI_get_errinfo(regs);
if (errhdr) { if (errhdr) {
...@@ -139,6 +144,7 @@ SystemResetException(struct pt_regs *regs) ...@@ -139,6 +144,7 @@ SystemResetException(struct pt_regs *regs)
} }
FWNMI_release_errinfo(); FWNMI_release_errinfo();
} }
#endif
#ifdef CONFIG_DEBUG_KERNEL #ifdef CONFIG_DEBUG_KERNEL
if (debugger) if (debugger)
...@@ -154,6 +160,7 @@ SystemResetException(struct pt_regs *regs) ...@@ -154,6 +160,7 @@ SystemResetException(struct pt_regs *regs)
/* What should we do here? We could issue a shutdown or hard reset. */ /* What should we do here? We could issue a shutdown or hard reset. */
} }
#ifdef CONFIG_PPC_PSERIES
/* /*
* See if we can recover from a machine check exception. * See if we can recover from a machine check exception.
* This is only called on power4 (or above) and only via * This is only called on power4 (or above) and only via
...@@ -190,6 +197,7 @@ static int recover_mce(struct pt_regs *regs, struct rtas_error_log err) ...@@ -190,6 +197,7 @@ static int recover_mce(struct pt_regs *regs, struct rtas_error_log err)
} }
return 0; return 0;
} }
#endif
/* /*
* Handle a machine check. * Handle a machine check.
...@@ -207,6 +215,7 @@ static int recover_mce(struct pt_regs *regs, struct rtas_error_log err) ...@@ -207,6 +215,7 @@ static int recover_mce(struct pt_regs *regs, struct rtas_error_log err)
void void
MachineCheckException(struct pt_regs *regs) MachineCheckException(struct pt_regs *regs)
{ {
#ifdef CONFIG_PPC_PSERIES
struct rtas_error_log err, *errp; struct rtas_error_log err, *errp;
if (fwnmi_active) { if (fwnmi_active) {
...@@ -217,6 +226,7 @@ MachineCheckException(struct pt_regs *regs) ...@@ -217,6 +226,7 @@ MachineCheckException(struct pt_regs *regs)
if (errp && recover_mce(regs, err)) if (errp && recover_mce(regs, err))
return; return;
} }
#endif
#ifdef CONFIG_DEBUG_KERNEL #ifdef CONFIG_DEBUG_KERNEL
if (debugger_fault_handler) { if (debugger_fault_handler) {
......
This diff is collapsed.
...@@ -23,25 +23,16 @@ ...@@ -23,25 +23,16 @@
// drive the hypervisor from the OS. // drive the hypervisor from the OS.
// //
//=========================================================================== //===========================================================================
#ifndef _HVCALL_H
#define _HVCALL_H
//------------------------------------------------------------------- //-------------------------------------------------------------------
// Standard Includes // Standard Includes
//------------------------------------------------------------------- //-------------------------------------------------------------------
#ifndef _HVCALLSC_H #include <asm/iSeries/HvCallSc.h>
#include "HvCallSc.h"
#endif
#ifndef _HVTYPES_H
#include <asm/iSeries/HvTypes.h> #include <asm/iSeries/HvTypes.h>
#endif
#include <asm/paca.h> #include <asm/paca.h>
//-------------------------------------------------------------------
// Constants
//-------------------------------------------------------------------
#ifndef _HVCALL_H
#define _HVCALL_H
/* /*
enum HvCall_ReturnCode enum HvCall_ReturnCode
{ {
...@@ -211,5 +202,4 @@ static inline void HvCall_setDebugBus(unsigned long val) ...@@ -211,5 +202,4 @@ static inline void HvCall_setDebugBus(unsigned long val)
HvCall1(HvCallBaseSetDebugBus, val); HvCall1(HvCallBaseSetDebugBus, val);
} }
#endif // _HVCALL_H #endif /* _HVCALL_H */
...@@ -23,23 +23,18 @@ ...@@ -23,23 +23,18 @@
// drive the hypervisor from the OS. // drive the hypervisor from the OS.
// //
//===================================================================================== //=====================================================================================
#ifndef _HVCALLCFG_H
#define _HVCALLCFG_H
//------------------------------------------------------------------- //-------------------------------------------------------------------
// Standard Includes // Standard Includes
//------------------------------------------------------------------- //-------------------------------------------------------------------
#ifndef _HVCALLSC_H #include <asm/iSeries/HvCallSc.h>
#include "HvCallSc.h"
#endif
#ifndef _HVTYPES_H
#include <asm/iSeries/HvTypes.h> #include <asm/iSeries/HvTypes.h>
#endif
//------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------
// Constants // Constants
//------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------
#ifndef _HVCALLCFG_H
#define _HVCALLCFG_H
enum HvCallCfg_ReqQual enum HvCallCfg_ReqQual
{ {
...@@ -215,5 +210,4 @@ static inline HvLpIndex HvCallCfg_getHostingLpIndex(HvLpIndex lp) ...@@ -215,5 +210,4 @@ static inline HvLpIndex HvCallCfg_getHostingLpIndex(HvLpIndex lp)
} }
#endif // _HVCALLCFG_H #endif /* _HVCALLCFG_H */
This diff is collapsed.
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef _HVCALLHPT_H
#define _HVCALLHPT_H
//============================================================================ //============================================================================
// //
...@@ -24,30 +26,13 @@ ...@@ -24,30 +26,13 @@
// //
//============================================================================ //============================================================================
//------------------------------------------------------------------- #include <asm/iSeries/HvCallSc.h>
// Standard Includes
//-------------------------------------------------------------------
#ifndef _HVCALLSC_H
#include "HvCallSc.h"
#endif
#ifndef _HVTYPES_H
#include <asm/iSeries/HvTypes.h> #include <asm/iSeries/HvTypes.h>
#endif
//-------------------------------------------------------------------
// Other Includes
//-------------------------------------------------------------------
#ifndef _PPC_MMU_H
#include <asm/mmu.h> #include <asm/mmu.h>
#endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Constants // Constants
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#ifndef _HVCALLHPT_H
#define _HVCALLHPT_H
#define HvCallHptGetHptAddress HvCallHpt + 0 #define HvCallHptGetHptAddress HvCallHpt + 0
#define HvCallHptGetHptPages HvCallHpt + 1 #define HvCallHptGetHptPages HvCallHpt + 1
...@@ -139,5 +124,4 @@ static inline void HvCallHpt_addValidate( u32 hpteIndex, ...@@ -139,5 +124,4 @@ static inline void HvCallHpt_addValidate( u32 hpteIndex,
//============================================================================= //=============================================================================
#endif // _HVCALLHPT_H #endif /* _HVCALLHPT_H */
...@@ -31,6 +31,8 @@ ...@@ -31,6 +31,8 @@
// drive the hypervisor from SLIC. // drive the hypervisor from SLIC.
// //
//============================================================================ //============================================================================
#ifndef _HVCALLPCI_H
#define _HVCALLPCI_H
//------------------------------------------------------------------- //-------------------------------------------------------------------
// Forward declarations // Forward declarations
...@@ -39,24 +41,12 @@ ...@@ -39,24 +41,12 @@
//------------------------------------------------------------------- //-------------------------------------------------------------------
// Standard Includes // Standard Includes
//------------------------------------------------------------------- //-------------------------------------------------------------------
#ifndef _HVCALLSC_H #include <asm/iSeries/HvCallSc.h>
#include "HvCallSc.h"
#endif
#ifndef _HVTYPES_H
#include <asm/iSeries/HvTypes.h> #include <asm/iSeries/HvTypes.h>
#endif
//-------------------------------------------------------------------
// Other Includes
//-------------------------------------------------------------------
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Constants // Constants
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#ifndef _HVCALLPCI_H
#define _HVCALLPCI_H
struct HvCallPci_DsaAddr { // make sure this struct size is 64-bits total struct HvCallPci_DsaAddr { // make sure this struct size is 64-bits total
u16 busNumber; u16 busNumber;
...@@ -694,4 +684,4 @@ static inline int HvCallPci_getBusAdapterVpd(u16 busNumParm, u64 destParm, u16 s ...@@ -694,4 +684,4 @@ static inline int HvCallPci_getBusAdapterVpd(u16 busNumParm, u64 destParm, u16 s
return xRetSize; return xRetSize;
} }
//============================================================================ //============================================================================
#endif // _HVCALLPCI_H #endif /* _HVCALLPCI_H */
...@@ -16,14 +16,11 @@ ...@@ -16,14 +16,11 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef _HVTYPES_H
#include <asm/iSeries/HvTypes.h>
#endif
#ifndef _HVCALLSC_H #ifndef _HVCALLSC_H
#define _HVCALLSC_H #define _HVCALLSC_H
#include <asm/iSeries/HvTypes.h>
#define HvCallBase 0x8000000000000000 #define HvCallBase 0x8000000000000000
#define HvCallCc 0x8001000000000000 #define HvCallCc 0x8001000000000000
#define HvCallCfg 0x8002000000000000 #define HvCallCfg 0x8002000000000000
......
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef _HVCALLSM_H
#define _HVCALLSM_H
//============================================================================ //============================================================================
// //
...@@ -27,19 +29,12 @@ ...@@ -27,19 +29,12 @@
//------------------------------------------------------------------- //-------------------------------------------------------------------
// Standard Includes // Standard Includes
//------------------------------------------------------------------- //-------------------------------------------------------------------
#ifndef _HVCALLSC_H #include <asm/iSeries/HvCallSc.h>
#include "HvCallSc.h"
#endif
#ifndef _HVTYPES_H
#include <asm/iSeries/HvTypes.h> #include <asm/iSeries/HvTypes.h>
#endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Constants // Constants
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#ifndef _HVCALLSM_H
#define _HVCALLSM_H
#define HvCallSmGet64BitsOfAccessMap HvCallSm + 11 #define HvCallSmGet64BitsOfAccessMap HvCallSm + 11
...@@ -54,5 +49,4 @@ static inline u64 HvCallSm_get64BitsOfAccessMap( ...@@ -54,5 +49,4 @@ static inline u64 HvCallSm_get64BitsOfAccessMap(
return retval; return retval;
} }
//============================================================================ //============================================================================
#endif // _HVCALLSM_H #endif /* _HVCALLSM_H */
This diff is collapsed.
This diff is collapsed.
...@@ -28,10 +28,7 @@ ...@@ -28,10 +28,7 @@
#include <asm/types.h> #include <asm/types.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/iSeries/HvTypes.h> #include <asm/iSeries/HvTypes.h>
#ifndef _HVCALLEVENT_H
#include <asm/iSeries/HvCallEvent.h> #include <asm/iSeries/HvCallEvent.h>
#endif
//===================================================================== //=====================================================================
// //
......
This diff is collapsed.
This diff is collapsed.
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef _ITEXTVPDPANEL_H
#define _ITEXTVPDPANEL_H
/* /*
* *
...@@ -31,12 +33,8 @@ ...@@ -31,12 +33,8 @@
* Standard Includes * Standard Includes
*------------------------------------------------------------------- *-------------------------------------------------------------------
*/ */
#ifndef _PPC_TYPES_H #include <asm/types.h>
#include <asm/types.h>
#endif
#ifndef _ITEXTVPDPANEL_H
#define _ITEXTVPDPANEL_H
struct ItExtVpdPanel struct ItExtVpdPanel
{ {
// Definition of the Extended Vpd On Panel Data Area // Definition of the Extended Vpd On Panel Data Area
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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