Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge

This commit is contained in:
Linus Torvalds 2006-01-11 08:16:57 -08:00
commit 7e4e574c39
32 changed files with 375 additions and 126 deletions

View File

@ -71,15 +71,39 @@ config ARCH_MAY_HAVE_PC_FDC
bool bool
default y default y
config PPC_OF
def_bool y
config PPC_UDBG_16550
bool
default n
config CRASH_DUMP
bool "kernel crash dumps (EXPERIMENTAL)"
depends on PPC_MULTIPLATFORM
depends on EXPERIMENTAL
help
Build a kernel suitable for use as a kdump capture kernel.
The kernel will be linked at a different address than normal, and
so can only be used for Kdump.
Don't change this unless you know what you are doing.
config GENERIC_TBSYNC
bool
default y if PPC32 && SMP
default n
menu "Processor support" menu "Processor support"
choice choice
prompt "Processor Type" prompt "Processor Type"
depends on PPC32 depends on PPC32
default 6xx default 6xx
config 6xx config CLASSIC32
bool "6xx/7xx/74xx" bool "6xx/7xx/74xx"
select PPC_FPU select PPC_FPU
select 6xx
help help
There are four families of PowerPC chips supported. The more common There are four families of PowerPC chips supported. The more common
types (601, 603, 604, 740, 750, 7400), the Motorola embedded types (601, 603, 604, 740, 750, 7400), the Motorola embedded
@ -93,12 +117,20 @@ config 6xx
config PPC_52xx config PPC_52xx
bool "Freescale 52xx" bool "Freescale 52xx"
select 6xx
select PPC_FPU
config PPC_82xx config PPC_82xx
bool "Freescale 82xx" bool "Freescale 82xx"
select 6xx
select PPC_FPU
config PPC_83xx config PPC_83xx
bool "Freescale 83xx" bool "Freescale 83xx"
select 6xx
select FSL_SOC
select 83xx
select PPC_FPU
config 40x config 40x
bool "AMCC 40x" bool "AMCC 40x"
@ -134,6 +166,13 @@ config POWER4
depends on PPC64 depends on PPC64
def_bool y def_bool y
config 6xx
bool
# this is temp to handle compat with arch=ppc
config 83xx
bool
config PPC_FPU config PPC_FPU
bool bool
default y if PPC64 default y if PPC64
@ -166,7 +205,7 @@ config PHYS_64BIT
config ALTIVEC config ALTIVEC
bool "AltiVec Support" bool "AltiVec Support"
depends on 6xx || POWER4 depends on CLASSIC32 || POWER4
---help--- ---help---
This option enables kernel support for the Altivec extensions to the This option enables kernel support for the Altivec extensions to the
PowerPC processor. The kernel currently supports saving and restoring PowerPC processor. The kernel currently supports saving and restoring
@ -239,7 +278,7 @@ endmenu
source "init/Kconfig" source "init/Kconfig"
menu "Platform support" menu "Platform support"
depends on PPC64 || 6xx depends on PPC64 || CLASSIC32
choice choice
prompt "Machine type" prompt "Machine type"
@ -330,9 +369,6 @@ config PPC_CELL
select MMIO_NVRAM select MMIO_NVRAM
select PPC_UDBG_16550 select PPC_UDBG_16550
config PPC_OF
def_bool y
config XICS config XICS
depends on PPC_PSERIES depends on PPC_PSERIES
bool bool
@ -375,26 +411,11 @@ config MPIC_BROKEN_U3
depends on PPC_MAPLE depends on PPC_MAPLE
default y default y
config PPC_UDBG_16550
bool
default n
config CELL_IIC config CELL_IIC
depends on PPC_CELL depends on PPC_CELL
bool bool
default y default y
config CRASH_DUMP
bool "kernel crash dumps (EXPERIMENTAL)"
depends on PPC_MULTIPLATFORM
depends on EXPERIMENTAL
help
Build a kernel suitable for use as a kdump capture kernel.
The kernel will be linked at a different address than normal, and
so can only be used for Kdump.
Don't change this unless you know what you are doing.
config IBMVIO config IBMVIO
depends on PPC_PSERIES || PPC_ISERIES depends on PPC_PSERIES || PPC_ISERIES
bool bool
@ -410,11 +431,6 @@ config PPC_MPC106
bool bool
default n default n
config GENERIC_TBSYNC
bool
default y if PPC32 && SMP
default n
source "drivers/cpufreq/Kconfig" source "drivers/cpufreq/Kconfig"
config CPU_FREQ_PMAC config CPU_FREQ_PMAC
@ -495,6 +511,7 @@ endmenu
source arch/powerpc/platforms/embedded6xx/Kconfig source arch/powerpc/platforms/embedded6xx/Kconfig
source arch/powerpc/platforms/4xx/Kconfig source arch/powerpc/platforms/4xx/Kconfig
source arch/powerpc/platforms/83xx/Kconfig
source arch/powerpc/platforms/85xx/Kconfig source arch/powerpc/platforms/85xx/Kconfig
source arch/powerpc/platforms/8xx/Kconfig source arch/powerpc/platforms/8xx/Kconfig
source arch/powerpc/platforms/cell/Kconfig source arch/powerpc/platforms/cell/Kconfig
@ -718,7 +735,7 @@ config PPC_I8259
config PPC_INDIRECT_PCI config PPC_INDIRECT_PCI
bool bool
depends on PCI depends on PCI
default y if 40x || 44x || 85xx || 83xx default y if 40x || 44x || 85xx
default n default n
config EISA config EISA
@ -727,13 +744,16 @@ config EISA
config SBUS config SBUS
bool bool
config FSL_SOC
bool
# Yes MCA RS/6000s exist but Linux-PPC does not currently support any # Yes MCA RS/6000s exist but Linux-PPC does not currently support any
config MCA config MCA
bool bool
config PCI config PCI
bool "PCI support" if 40x || CPM2 || 83xx || 85xx || PPC_MPC52xx || (EMBEDDED && PPC_ISERIES) bool "PCI support" if 40x || CPM2 || PPC_83xx || 85xx || PPC_MPC52xx || (EMBEDDED && PPC_ISERIES)
default y if !40x && !CPM2 && !8xx && !APUS && !83xx && !85xx default y if !40x && !CPM2 && !8xx && !APUS && !PPC_83xx && !85xx
default PCI_PERMEDIA if !4xx && !CPM2 && !8xx && APUS default PCI_PERMEDIA if !4xx && !CPM2 && !8xx && APUS
default PCI_QSPAN if !4xx && !CPM2 && 8xx default PCI_QSPAN if !4xx && !CPM2 && 8xx
help help
@ -746,11 +766,6 @@ config PCI_DOMAINS
bool bool
default PCI default PCI
config MPC83xx_PCI2
bool " Supprt for 2nd PCI host controller"
depends on PCI && MPC834x
default y if MPC834x_SYS
config PCI_QSPAN config PCI_QSPAN
bool "QSpan PCI" bool "QSpan PCI"
depends on !4xx && !CPM2 && 8xx depends on !4xx && !CPM2 && 8xx

View File

@ -115,4 +115,46 @@ config PPC_OCP
depends on IBM_OCP || XILINX_OCP depends on IBM_OCP || XILINX_OCP
default y default y
choice
prompt "Early debugging (dangerous)"
bool
optional
help
Enable early debugging. Careful, if you enable debugging for the
wrong type of machine your kernel _will not boot_.
config PPC_EARLY_DEBUG_LPAR
bool "LPAR HV Console"
depends on PPC_PSERIES
help
Select this to enable early debugging for a machine with a HVC
console on vterm 0.
config PPC_EARLY_DEBUG_G5
bool "Apple G5"
depends on PPC_PMAC64
help
Select this to enable early debugging for Apple G5 machines.
config PPC_EARLY_DEBUG_RTAS
bool "RTAS Panel"
depends on PPC_RTAS
help
Select this to enable early debugging via the RTAS panel.
config PPC_EARLY_DEBUG_MAPLE
bool "Maple real mode"
depends on PPC_MAPLE
help
Select this to enable early debugging for Maple.
config PPC_EARLY_DEBUG_ISERIES
bool "iSeries HV Console"
depends on PPC_ISERIES
help
Select this to enable early debugging for legacy iSeries. You need
to hit "Ctrl-x Ctrl-x" to see the messages on the console.
endchoice
endmenu endmenu

20
arch/powerpc/boot/.gitignore vendored Normal file
View File

@ -0,0 +1,20 @@
addnote
infblock.c
infblock.h
infcodes.c
infcodes.h
inffast.c
inffast.h
inflate.c
inftrees.c
inftrees.h
infutil.c
infutil.h
kernel-vmlinux.strip.c
kernel-vmlinux.strip.gz
uImage
zImage
zImage.vmode
zconf.h
zlib.h
zutil.h

View File

@ -176,4 +176,4 @@ $(obj)/uImage: $(obj)/vmlinux.gz
install: $(CONFIGURE) $(BOOTIMAGE) install: $(CONFIGURE) $(BOOTIMAGE)
sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" "$(BOOTIMAGE)" sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" "$(BOOTIMAGE)"
clean-files := $(addprefix $(objtree)/, $(obj-boot) vmlinux.strip) clean-files += $(addprefix $(objtree)/, $(obj-boot) vmlinux.strip)

View File

@ -878,7 +878,7 @@ CONFIG_HVCS=m
# #
# CONFIG_WATCHDOG is not set # CONFIG_WATCHDOG is not set
# CONFIG_RTC is not set # CONFIG_RTC is not set
# CONFIG_GEN_RTC is not set CONFIG_GEN_RTC=y
# CONFIG_DTLK is not set # CONFIG_DTLK is not set
# CONFIG_R3964 is not set # CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set # CONFIG_APPLICOM is not set

View File

@ -61,9 +61,9 @@ obj-$(CONFIG_MODULES) += $(module-y)
pci64-$(CONFIG_PPC64) += pci_64.o pci_dn.o pci_iommu.o \ pci64-$(CONFIG_PPC64) += pci_64.o pci_dn.o pci_iommu.o \
pci_direct_iommu.o iomap.o pci_direct_iommu.o iomap.o
obj-$(CONFIG_PCI) += $(pci64-y) obj-$(CONFIG_PCI) += $(pci64-y)
kexec-$(CONFIG_PPC64) := machine_kexec_64.o kexec-$(CONFIG_PPC64) := machine_kexec_64.o crash.o
kexec-$(CONFIG_PPC32) := machine_kexec_32.o kexec-$(CONFIG_PPC32) := machine_kexec_32.o
obj-$(CONFIG_KEXEC) += machine_kexec.o crash.o $(kexec-y) obj-$(CONFIG_KEXEC) += machine_kexec.o $(kexec-y)
ifeq ($(CONFIG_PPC_ISERIES),y) ifeq ($(CONFIG_PPC_ISERIES),y)
$(obj)/head_64.o: $(obj)/lparmap.s $(obj)/head_64.o: $(obj)/lparmap.s

View File

@ -18,7 +18,6 @@
#include <linux/kexec.h> #include <linux/kexec.h>
#include <linux/bootmem.h> #include <linux/bootmem.h>
#include <linux/crash_dump.h> #include <linux/crash_dump.h>
#include <linux/irq.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/elf.h> #include <linux/elf.h>
#include <linux/elfcore.h> #include <linux/elfcore.h>
@ -30,6 +29,7 @@
#include <asm/kdump.h> #include <asm/kdump.h>
#include <asm/lmb.h> #include <asm/lmb.h>
#include <asm/firmware.h> #include <asm/firmware.h>
#include <asm/smp.h>
#ifdef DEBUG #ifdef DEBUG
#include <asm/udbg.h> #include <asm/udbg.h>

View File

@ -55,6 +55,7 @@ void __init kdump_setup(void)
DBG(" <- kdump_setup()\n"); DBG(" <- kdump_setup()\n");
} }
#ifdef CONFIG_PROC_VMCORE
static int __init parse_elfcorehdr(char *p) static int __init parse_elfcorehdr(char *p)
{ {
if (p) if (p)
@ -63,6 +64,7 @@ static int __init parse_elfcorehdr(char *p)
return 0; return 0;
} }
__setup("elfcorehdr=", parse_elfcorehdr); __setup("elfcorehdr=", parse_elfcorehdr);
#endif
static int __init parse_savemaxmem(char *p) static int __init parse_savemaxmem(char *p)
{ {

View File

@ -14,12 +14,6 @@
#include <linux/threads.h> #include <linux/threads.h>
#include <asm/machdep.h> #include <asm/machdep.h>
/*
* Provide a dummy crash_notes definition until crash dump is implemented.
* This prevents breakage of crash_notes attribute in kernel/ksysfs.c.
*/
note_buf_t crash_notes[NR_CPUS];
void machine_crash_shutdown(struct pt_regs *regs) void machine_crash_shutdown(struct pt_regs *regs)
{ {
if (ppc_md.machine_crash_shutdown) if (ppc_md.machine_crash_shutdown)

View File

@ -271,6 +271,9 @@ void __devinit pcibios_claim_one_bus(struct pci_bus *b)
list_for_each_entry(child_bus, &b->children, node) list_for_each_entry(child_bus, &b->children, node)
pcibios_claim_one_bus(child_bus); pcibios_claim_one_bus(child_bus);
} }
#ifdef CONFIG_HOTPLUG
EXPORT_SYMBOL_GPL(pcibios_claim_one_bus);
#endif
#ifndef CONFIG_PPC_ISERIES #ifndef CONFIG_PPC_ISERIES
static void __init pcibios_claim_of_setup(void) static void __init pcibios_claim_of_setup(void)

View File

@ -29,6 +29,7 @@
#include <asm/delay.h> #include <asm/delay.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/lmb.h> #include <asm/lmb.h>
#include <asm/udbg.h>
struct rtas_t rtas = { struct rtas_t rtas = {
.lock = SPIN_LOCK_UNLOCKED .lock = SPIN_LOCK_UNLOCKED
@ -52,7 +53,7 @@ EXPORT_SYMBOL(rtas_flash_term_hook);
* are designed only for very early low-level debugging, which * are designed only for very early low-level debugging, which
* is why the token is hard-coded to 10. * is why the token is hard-coded to 10.
*/ */
void call_rtas_display_status(unsigned char c) static void call_rtas_display_status(char c)
{ {
struct rtas_args *args = &rtas.args; struct rtas_args *args = &rtas.args;
unsigned long s; unsigned long s;
@ -65,14 +66,14 @@ void call_rtas_display_status(unsigned char c)
args->nargs = 1; args->nargs = 1;
args->nret = 1; args->nret = 1;
args->rets = (rtas_arg_t *)&(args->args[1]); args->rets = (rtas_arg_t *)&(args->args[1]);
args->args[0] = (int)c; args->args[0] = (unsigned char)c;
enter_rtas(__pa(args)); enter_rtas(__pa(args));
spin_unlock_irqrestore(&rtas.lock, s); spin_unlock_irqrestore(&rtas.lock, s);
} }
void call_rtas_display_status_delay(unsigned char c) static void call_rtas_display_status_delay(char c)
{ {
static int pending_newline = 0; /* did last write end with unprinted newline? */ static int pending_newline = 0; /* did last write end with unprinted newline? */
static int width = 16; static int width = 16;
@ -96,6 +97,11 @@ void call_rtas_display_status_delay(unsigned char c)
} }
} }
void __init udbg_init_rtas(void)
{
udbg_putc = call_rtas_display_status_delay;
}
void rtas_progress(char *s, unsigned short hex) void rtas_progress(char *s, unsigned short hex)
{ {
struct device_node *root; struct device_node *root;

View File

@ -33,6 +33,7 @@
#include <linux/unistd.h> #include <linux/unistd.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/serial_8250.h> #include <linux/serial_8250.h>
#include <linux/bootmem.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/kdump.h> #include <asm/kdump.h>
#include <asm/prom.h> #include <asm/prom.h>
@ -70,33 +71,6 @@
#define DBG(fmt...) #define DBG(fmt...)
#endif #endif
/*
* Here are some early debugging facilities. You can enable one
* but your kernel will not boot on anything else if you do so
*/
/* This one is for use on LPAR machines that support an HVC console
* on vterm 0
*/
extern void udbg_init_debug_lpar(void);
/* This one is for use on Apple G5 machines
*/
extern void udbg_init_pmac_realmode(void);
/* That's RTAS panel debug */
extern void call_rtas_display_status_delay(unsigned char c);
/* Here's maple real mode debug */
extern void udbg_init_maple_realmode(void);
#define EARLY_DEBUG_INIT() do {} while(0)
#if 0
#define EARLY_DEBUG_INIT() udbg_init_debug_lpar()
#define EARLY_DEBUG_INIT() udbg_init_maple_realmode()
#define EARLY_DEBUG_INIT() udbg_init_pmac_realmode()
#define EARLY_DEBUG_INIT() \
do { udbg_putc = call_rtas_display_status_delay; } while(0)
#endif
int have_of = 1; int have_of = 1;
int boot_cpuid = 0; int boot_cpuid = 0;
int boot_cpuid_phys = 0; int boot_cpuid_phys = 0;
@ -237,11 +211,8 @@ void __init early_setup(unsigned long dt_ptr)
struct paca_struct *lpaca = get_paca(); struct paca_struct *lpaca = get_paca();
static struct machdep_calls **mach; static struct machdep_calls **mach;
/* /* Enable early debugging if any specified (see udbg.h) */
* Enable early debugging if any specified (see top of udbg_early_init();
* this file)
*/
EARLY_DEBUG_INIT();
DBG(" -> early_setup()\n"); DBG(" -> early_setup()\n");
@ -684,3 +655,28 @@ void cpu_die(void)
if (ppc_md.cpu_die) if (ppc_md.cpu_die)
ppc_md.cpu_die(); ppc_md.cpu_die();
} }
#ifdef CONFIG_SMP
void __init setup_per_cpu_areas(void)
{
int i;
unsigned long size;
char *ptr;
/* Copy section for each CPU (we discard the original) */
size = ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES);
#ifdef CONFIG_MODULES
if (size < PERCPU_ENOUGH_ROOM)
size = PERCPU_ENOUGH_ROOM;
#endif
for_each_cpu(i) {
ptr = alloc_bootmem_node(NODE_DATA(cpu_to_node(i)), size);
if (!ptr)
panic("Cannot allocate cpu data for CPU %d\n", i);
paca[i].data_offset = ptr - __per_cpu_start;
memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start);
}
}
#endif

View File

@ -15,11 +15,36 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/console.h> #include <linux/console.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/udbg.h>
void (*udbg_putc)(char c); void (*udbg_putc)(char c);
int (*udbg_getc)(void); int (*udbg_getc)(void);
int (*udbg_getc_poll)(void); int (*udbg_getc_poll)(void);
/*
* Early debugging facilities. You can enable _one_ of these via .config,
* if you do so your kernel _will not boot_ on anything else. Be careful.
*/
void __init udbg_early_init(void)
{
#if defined(CONFIG_PPC_EARLY_DEBUG_LPAR)
/* For LPAR machines that have an HVC console on vterm 0 */
udbg_init_debug_lpar();
#elif defined(CONFIG_PPC_EARLY_DEBUG_G5)
/* For use on Apple G5 machines */
udbg_init_pmac_realmode();
#elif defined(CONFIG_PPC_EARLY_DEBUG_RTAS)
/* RTAS panel debug */
udbg_init_rtas();
#elif defined(CONFIG_PPC_EARLY_DEBUG_MAPLE)
/* Maple real mode debug */
udbg_init_maple_realmode();
#elif defined(CONFIG_PPC_EARLY_DEBUG_ISERIES)
/* For iSeries - hit Ctrl-x Ctrl-x to see the output */
udbg_init_iseries();
#endif
}
/* udbg library, used by xmon et al */ /* udbg library, used by xmon et al */
void udbg_puts(const char *s) void udbg_puts(const char *s)
{ {

View File

@ -155,7 +155,7 @@ void udbg_maple_real_putc(unsigned char c)
} }
} }
void udbg_init_maple_realmode(void) void __init udbg_init_maple_realmode(void)
{ {
udbg_comport = (volatile struct NS16550 __iomem *)0xf40003f8; udbg_comport = (volatile struct NS16550 __iomem *)0xf40003f8;

1
arch/powerpc/kernel/vdso32/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
vdso32.lds

1
arch/powerpc/kernel/vdso64/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
vdso64.lds

View File

@ -0,0 +1,26 @@
menu "Platform support"
depends on PPC_83xx
choice
prompt "Machine Type"
default MPC834x_SYS
config MPC834x_SYS
bool "Freescale MPC834x SYS"
help
This option enables support for the MPC 834x SYS evaluation board.
Be aware that PCI buses can only function when SYS board is plugged
into the PIB (Platform IO Board) board from Freescale which provide
3 PCI slots. The PIBs PCI initialization is the bootloader's
responsiblilty.
endchoice
config MPC834x
bool
select PPC_UDBG_16550
select PPC_INDIRECT_PCI
default y if MPC834x_SYS
endmenu

View File

@ -0,0 +1,4 @@
#
# Makefile for the PowerPC 83xx linux kernel.
#
obj-$(CONFIG_MPC834x_SYS) += mpc834x_sys.o pci.o

View File

@ -7,6 +7,7 @@ endif
endif endif
obj-$(CONFIG_PPC_CHRP) += chrp/ obj-$(CONFIG_PPC_CHRP) += chrp/
obj-$(CONFIG_4xx) += 4xx/ obj-$(CONFIG_4xx) += 4xx/
obj-$(CONFIG_PPC_83xx) += 83xx/
obj-$(CONFIG_85xx) += 85xx/ obj-$(CONFIG_85xx) += 85xx/
obj-$(CONFIG_PPC_PSERIES) += pseries/ obj-$(CONFIG_PPC_PSERIES) += pseries/
obj-$(CONFIG_PPC_ISERIES) += iseries/ obj-$(CONFIG_PPC_ISERIES) += iseries/

View File

@ -169,11 +169,33 @@ static inline void save_mfc_cntl(struct spu_state *csa, struct spu *spu)
struct spu_priv2 __iomem *priv2 = spu->priv2; struct spu_priv2 __iomem *priv2 = spu->priv2;
/* Save, Step 8: /* Save, Step 8:
* Read and save MFC_CNTL[Ss]. * Suspend DMA and save MFC_CNTL.
*/ */
switch (in_be64(&priv2->mfc_control_RW) &
MFC_CNTL_SUSPEND_DMA_STATUS_MASK) {
case MFC_CNTL_SUSPEND_IN_PROGRESS:
POLL_WHILE_FALSE((in_be64(&priv2->mfc_control_RW) &
MFC_CNTL_SUSPEND_DMA_STATUS_MASK) ==
MFC_CNTL_SUSPEND_COMPLETE);
/* fall through */
case MFC_CNTL_SUSPEND_COMPLETE:
if (csa) { if (csa) {
csa->priv2.mfc_control_RW = in_be64(&priv2->mfc_control_RW) & csa->priv2.mfc_control_RW =
MFC_CNTL_SUSPEND_DMA_STATUS_MASK; in_be64(&priv2->mfc_control_RW) |
MFC_CNTL_SUSPEND_DMA_QUEUE;
}
break;
case MFC_CNTL_NORMAL_DMA_QUEUE_OPERATION:
out_be64(&priv2->mfc_control_RW, MFC_CNTL_SUSPEND_DMA_QUEUE);
POLL_WHILE_FALSE((in_be64(&priv2->mfc_control_RW) &
MFC_CNTL_SUSPEND_DMA_STATUS_MASK) ==
MFC_CNTL_SUSPEND_COMPLETE);
if (csa) {
csa->priv2.mfc_control_RW =
in_be64(&priv2->mfc_control_RW) &
~MFC_CNTL_SUSPEND_DMA_QUEUE;
}
break;
} }
} }
@ -237,6 +259,8 @@ static inline void save_mfc_decr(struct spu_state *csa, struct spu *spu)
eieio(); eieio();
csa->spu_chnldata_RW[7] = in_be64(&priv2->spu_chnldata_RW); csa->spu_chnldata_RW[7] = in_be64(&priv2->spu_chnldata_RW);
eieio(); eieio();
} else {
csa->priv2.mfc_control_RW &= ~MFC_CNTL_DECREMENTER_RUNNING;
} }
} }

View File

@ -144,16 +144,6 @@ config LITE5200
much but it's only been tested on this board version. I think this much but it's only been tested on this board version. I think this
board is also known as IceCube. board is also known as IceCube.
config MPC834x_SYS
bool "Freescale MPC834x SYS"
help
This option enables support for the MPC 834x SYS evaluation board.
Be aware that PCI buses can only function when SYS board is plugged
into the PIB (Platform IO Board) board from Freescale which provide
3 PCI slots. The PIBs PCI initialization is the bootloader's
responsiblilty.
config EV64360 config EV64360
bool "Marvell-EV64360BP" bool "Marvell-EV64360BP"
help help
@ -192,14 +182,6 @@ config 8272
The MPC8272 CPM has a different internal dpram setup than other CPM2 The MPC8272 CPM has a different internal dpram setup than other CPM2
devices devices
config 83xx
bool
default y if MPC834x_SYS
config MPC834x
bool
default y if MPC834x_SYS
config CPM2 config CPM2
bool bool
depends on 8260 || MPC8560 || MPC8555 depends on 8260 || MPC8560 || MPC8555

View File

@ -52,6 +52,7 @@
#include <asm/iseries/mf.h> #include <asm/iseries/mf.h>
#include <asm/iseries/hv_lp_event.h> #include <asm/iseries/hv_lp_event.h>
#include <asm/iseries/lpar_map.h> #include <asm/iseries/lpar_map.h>
#include <asm/udbg.h>
#include "naca.h" #include "naca.h"
#include "setup.h" #include "setup.h"
@ -62,10 +63,8 @@
#include "call_sm.h" #include "call_sm.h"
#include "call_hpt.h" #include "call_hpt.h"
extern void hvlog(char *fmt, ...);
#ifdef DEBUG #ifdef DEBUG
#define DBG(fmt...) hvlog(fmt) #define DBG(fmt...) udbg_printf(fmt)
#else #else
#define DBG(fmt...) #define DBG(fmt...)
#endif #endif
@ -474,14 +473,6 @@ static unsigned long __init build_iSeries_Memory_Map(void)
printk("HPT absolute addr = %016lx, size = %dK\n", printk("HPT absolute addr = %016lx, size = %dK\n",
chunk_to_addr(hptFirstChunk), hptSizeChunks * 256); chunk_to_addr(hptFirstChunk), hptSizeChunks * 256);
ppc64_pft_size = __ilog2(hptSizePages * HW_PAGE_SIZE);
/*
* The actual hashed page table is in the hypervisor,
* we have no direct access
*/
htab_address = NULL;
/* /*
* Determine if absolute memory has any * Determine if absolute memory has any
* holes so that we can interpret the * holes so that we can interpret the
@ -861,6 +852,11 @@ void dt_prop_u64_list(struct iseries_flat_dt *dt, char *name, u64 *data, int n)
dt_prop(dt, name, (char *)data, sizeof(u64) * n); dt_prop(dt, name, (char *)data, sizeof(u64) * n);
} }
void dt_prop_u32_list(struct iseries_flat_dt *dt, char *name, u32 *data, int n)
{
dt_prop(dt, name, (char *)data, sizeof(u32) * n);
}
void dt_prop_empty(struct iseries_flat_dt *dt, char *name) void dt_prop_empty(struct iseries_flat_dt *dt, char *name)
{ {
dt_prop(dt, name, NULL, 0); dt_prop(dt, name, NULL, 0);
@ -872,6 +868,7 @@ void dt_cpus(struct iseries_flat_dt *dt)
unsigned char *p; unsigned char *p;
unsigned int i, index; unsigned int i, index;
struct IoHriProcessorVpd *d; struct IoHriProcessorVpd *d;
u32 pft_size[2];
/* yuck */ /* yuck */
snprintf(buf, 32, "PowerPC,%s", cur_cpu_spec->cpu_name); snprintf(buf, 32, "PowerPC,%s", cur_cpu_spec->cpu_name);
@ -882,6 +879,9 @@ void dt_cpus(struct iseries_flat_dt *dt)
dt_prop_u32(dt, "#address-cells", 1); dt_prop_u32(dt, "#address-cells", 1);
dt_prop_u32(dt, "#size-cells", 0); dt_prop_u32(dt, "#size-cells", 0);
pft_size[0] = 0; /* NUMA CEC cookie, 0 for non NUMA */
pft_size[1] = __ilog2(HvCallHpt_getHptPages() * HW_PAGE_SIZE);
for (i = 0; i < NR_CPUS; i++) { for (i = 0; i < NR_CPUS; i++) {
if (paca[i].lppaca.dyn_proc_status >= 2) if (paca[i].lppaca.dyn_proc_status >= 2)
continue; continue;
@ -908,6 +908,8 @@ void dt_cpus(struct iseries_flat_dt *dt)
dt_prop_u32(dt, "reg", i); dt_prop_u32(dt, "reg", i);
dt_prop_u32_list(dt, "ibm,pft-size", pft_size, 2);
dt_end_node(dt); dt_end_node(dt);
} }
@ -984,3 +986,16 @@ static int __init early_parsemem(char *p)
return 0; return 0;
} }
early_param("mem", early_parsemem); early_param("mem", early_parsemem);
static void hvputc(char c)
{
if (c == '\n')
hvputc('\r');
HvCall_writeLogBuffer(&c, 1);
}
void __init udbg_init_iseries(void)
{
udbg_putc = hvputc;
}

View File

@ -153,7 +153,7 @@ static void udbg_real_scc_putc(char c)
udbg_real_scc_putc('\r'); udbg_real_scc_putc('\r');
} }
void udbg_init_pmac_realmode(void) void __init udbg_init_pmac_realmode(void)
{ {
sccc = (volatile u8 __iomem *)0x80013020ul; sccc = (volatile u8 __iomem *)0x80013020ul;
sccd = (volatile u8 __iomem *)0x80013030ul; sccd = (volatile u8 __iomem *)0x80013030ul;

View File

@ -6,4 +6,4 @@ obj-$(CONFIG_BOOKE) += dcr.o
obj-$(CONFIG_40x) += dcr.o obj-$(CONFIG_40x) += dcr.o
obj-$(CONFIG_U3_DART) += dart_iommu.o obj-$(CONFIG_U3_DART) += dart_iommu.o
obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o
obj-$(CONFIG_83xx) += ipic.o obj-$(CONFIG_PPC_83xx) += ipic.o

View File

@ -743,6 +743,10 @@ config MPC834x
bool bool
default y if MPC834x_SYS default y if MPC834x_SYS
config PPC_83xx
bool
default y if 83xx
config CPM1 config CPM1
bool bool
depends on 8xx depends on 8xx

View File

@ -131,7 +131,7 @@ static void initDataEvent(struct viocharlpevent *viochar, HvLpIndex lp);
static struct tty_driver *viotty_driver; static struct tty_driver *viotty_driver;
void hvlog(char *fmt, ...) static void hvlog(char *fmt, ...)
{ {
int i; int i;
unsigned long flags; unsigned long flags;
@ -147,7 +147,7 @@ void hvlog(char *fmt, ...)
spin_unlock_irqrestore(&consoleloglock, flags); spin_unlock_irqrestore(&consoleloglock, flags);
} }
void hvlogOutput(const char *buf, int count) static void hvlogOutput(const char *buf, int count)
{ {
unsigned long flags; unsigned long flags;
int begin; int begin;
@ -904,6 +904,7 @@ static void vioHandleData(struct HvLpEvent *event)
struct viocharlpevent *cevent = (struct viocharlpevent *)event; struct viocharlpevent *cevent = (struct viocharlpevent *)event;
struct port_info *pi; struct port_info *pi;
int index; int index;
int num_pushed;
u8 port = cevent->virtual_device; u8 port = cevent->virtual_device;
if (port >= VTTY_PORTS) { if (port >= VTTY_PORTS) {
@ -964,6 +965,7 @@ static void vioHandleData(struct HvLpEvent *event)
* functionality will only work if built into the kernel and * functionality will only work if built into the kernel and
* then only if sysrq is enabled through the proc filesystem. * then only if sysrq is enabled through the proc filesystem.
*/ */
num_pushed = 0;
for (index = 0; index < cevent->len; index++) { for (index = 0; index < cevent->len; index++) {
#ifdef CONFIG_MAGIC_SYSRQ #ifdef CONFIG_MAGIC_SYSRQ
if (sysrq_enabled) { if (sysrq_enabled) {
@ -997,11 +999,10 @@ static void vioHandleData(struct HvLpEvent *event)
printk(VIOCONS_KERN_WARN "input buffer overflow!\n"); printk(VIOCONS_KERN_WARN "input buffer overflow!\n");
break; break;
} }
num_pushed++;
} }
/* if cevent->len == 0 then no data was added to the buffer and flip.count == 0 */ if (num_pushed)
if (tty->flip.count)
/* The next call resets flip.count when the data is flushed. */
tty_flip_buffer_push(tty); tty_flip_buffer_push(tty);
} }

View File

@ -65,6 +65,7 @@ struct paca_struct {
u64 stab_real; /* Absolute address of segment table */ u64 stab_real; /* Absolute address of segment table */
u64 stab_addr; /* Virtual address of segment table */ u64 stab_addr; /* Virtual address of segment table */
void *emergency_sp; /* pointer to emergency stack */ void *emergency_sp; /* pointer to emergency stack */
u64 data_offset; /* per cpu data offset */
s16 hw_cpu_id; /* Physical processor number */ s16 hw_cpu_id; /* Physical processor number */
u8 cpu_start; /* At startup, processor spins until */ u8 cpu_start; /* At startup, processor spins until */
/* this becomes non-zero. */ /* this becomes non-zero. */

View File

@ -178,7 +178,7 @@ typedef unsigned long pmd_t;
#define pmd_val(x) (x) #define pmd_val(x) (x)
#define __pmd(x) (x) #define __pmd(x) (x)
#ifndef CONFIG_PPC_64K_PAGES #if defined(CONFIG_PPC64) && !defined(CONFIG_PPC_64K_PAGES)
typedef unsigned long pud_t; typedef unsigned long pud_t;
#define pud_val(x) (x) #define pud_val(x) (x)
#define __pud(x) (x) #define __pud(x) (x)

View File

@ -10,10 +10,34 @@
#define _ASM_POWERPC_PARPORT_H #define _ASM_POWERPC_PARPORT_H
#ifdef __KERNEL__ #ifdef __KERNEL__
static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma); #include <asm/prom.h>
extern struct parport *parport_pc_probe_port (unsigned long int base,
unsigned long int base_hi,
int irq, int dma,
struct pci_dev *dev);
static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma) static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma)
{ {
return parport_pc_find_isa_ports (autoirq, autodma); struct device_node *np;
u32 *prop;
u32 io1, io2;
int propsize;
int count = 0;
for (np = NULL; (np = of_find_compatible_node(np,
"parallel",
"pnpPNP,400")) != NULL;) {
prop = (u32 *)get_property(np, "reg", &propsize);
if (!prop || propsize > 6*sizeof(u32))
continue;
io1 = prop[1]; io2 = prop[2];
prop = (u32 *)get_property(np, "interrupts", NULL);
if (!prop)
continue;
if (parport_pc_probe_port(io1, io2, prop[0], autodma, NULL) != NULL)
count++;
}
return count;
} }
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */

View File

@ -1 +1,57 @@
#ifndef _ASM_POWERPC_PERCPU_H_
#define _ASM_POWERPC_PERCPU_H_
#ifdef __powerpc64__
#include <linux/compiler.h>
/*
* Same as asm-generic/percpu.h, except that we store the per cpu offset
* in the paca. Based on the x86-64 implementation.
*/
#ifdef CONFIG_SMP
#include <asm/paca.h>
#define __per_cpu_offset(cpu) (paca[cpu].data_offset)
#define __my_cpu_offset() get_paca()->data_offset
/* Separate out the type, so (int[3], foo) works. */
#define DEFINE_PER_CPU(type, name) \
__attribute__((__section__(".data.percpu"))) __typeof__(type) per_cpu__##name
/* var is in discarded region: offset to particular copy we want */
#define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset(cpu)))
#define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __my_cpu_offset()))
/* A macro to avoid #include hell... */
#define percpu_modcopy(pcpudst, src, size) \
do { \
unsigned int __i; \
for (__i = 0; __i < NR_CPUS; __i++) \
if (cpu_possible(__i)) \
memcpy((pcpudst)+__per_cpu_offset(__i), \
(src), (size)); \
} while (0)
extern void setup_per_cpu_areas(void);
#else /* ! SMP */
#define DEFINE_PER_CPU(type, name) \
__typeof__(type) per_cpu__##name
#define per_cpu(var, cpu) (*((void)(cpu), &per_cpu__##var))
#define __get_cpu_var(var) per_cpu__##var
#endif /* SMP */
#define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name
#define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var)
#define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var)
#else
#include <asm-generic/percpu.h> #include <asm-generic/percpu.h>
#endif
#endif /* _ASM_POWERPC_PERCPU_H_ */

View File

@ -161,7 +161,6 @@ extern struct rtas_t rtas;
extern void enter_rtas(unsigned long); extern void enter_rtas(unsigned long);
extern int rtas_token(const char *service); extern int rtas_token(const char *service);
extern int rtas_call(int token, int, int, int *, ...); extern int rtas_call(int token, int, int, int *, ...);
extern void call_rtas_display_status(unsigned char);
extern void rtas_restart(char *cmd); extern void rtas_restart(char *cmd);
extern void rtas_power_off(void); extern void rtas_power_off(void);
extern void rtas_halt(void); extern void rtas_halt(void);

View File

@ -1,5 +1,5 @@
/* /*
* c 2001 PPC 64 Team, IBM Corp * (c) 2001, 2006 IBM Corporation.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -36,5 +36,12 @@ extern void udbg_scc_init(int force_scc);
extern int udbg_adb_init(int force_btext); extern int udbg_adb_init(int force_btext);
extern void udbg_adb_init_early(void); extern void udbg_adb_init_early(void);
extern void __init udbg_early_init(void);
extern void __init udbg_init_debug_lpar(void);
extern void __init udbg_init_pmac_realmode(void);
extern void __init udbg_init_maple_realmode(void);
extern void __init udbg_init_iseries(void);
extern void __init udbg_init_rtas(void);
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_UDBG_H */ #endif /* _ASM_POWERPC_UDBG_H */