projects/linux·commit 3aed77bc

Merge master.kernel.org:/pub/scm/linux/kernel/git/paulus/ppc64-2.6

3aed77bc · Linus Torvalds <[email protected]> · 2005-09-09 10:38:02 -07:00

Commit
3aed77bc84013fced136977b7cc17fff60eddf7a
Parents
0b968d23 · b2ad7b5e

Merge commit. Changes below are compared with the first parent: 0b968d23.

Changes

65 files changed · +530 −529

FileStatusAddDelContent
arch/ppc/kernel/syscalls.cmodified+0−4View file
arch/ppc64/Makefilemodified+12−9View file
arch/ppc64/boot/Makefilemodified+33−20View file
arch/ppc64/boot/main.cmodified+26−5View file
arch/ppc64/kernel/bpa_iic.cmodified+21−7View file
arch/ppc64/kernel/eeh.cmodified+32−23View file
arch/ppc64/kernel/iomap.cmodified+20−0View file
arch/ppc64/kernel/iommu.cmodified+2−1View file
arch/ppc64/kernel/maple_pci.cmodified+2−2View file
arch/ppc64/kernel/misc.Smodified+3−3View file
arch/ppc64/kernel/pSeries_iommu.cmodified+41−31View file
arch/ppc64/kernel/pci.cmodified+64−2View file
arch/ppc64/kernel/pci.hmodified+0−1View file
arch/ppc64/kernel/pci_dn.cmodified+33−14View file
arch/ppc64/kernel/pci_iommu.cmodified+1−1View file
arch/ppc64/kernel/pmac_feature.cmodified+5−3View file
arch/ppc64/kernel/pmac_pci.cmodified+3−3View file
arch/ppc64/kernel/prom.cmodified+1−0View file
arch/ppc64/kernel/rtas_pci.cmodified+23−16View file
arch/ppc64/kernel/sys_ppc32.cmodified+1−54View file
arch/ppc64/kernel/syscalls.cmodified+0−4View file
arch/ppc64/kernel/u3_iommu.cmodified+2−2View file
arch/ppc64/kernel/udbg.cmodified+6−0View file
arch/ppc64/mm/init.cmodified+2−2View file
drivers/pci/hotplug/rpadlpar_core.cmodified+12−8View file
drivers/pci/hotplug/rpaphp_pci.cmodified+5−3View file
drivers/video/offb.cmodified+1−1View file
include/asm-powerpc/8253pit.hmodified+4−4View file
include/asm-powerpc/agp.hmodified+3−5View file
include/asm-powerpc/bugs.hmodified+4−4View file
include/asm-powerpc/errno.hmodified+3−3View file
include/asm-powerpc/ioctl.hmodified+3−3View file
include/asm-powerpc/ioctls.hmodified+3−3View file
include/asm-powerpc/linkage.hmodified+3−3View file
include/asm-powerpc/mc146818rtc.hmodified+3−3View file
include/asm-powerpc/mman.hmodified+3−3View file
include/asm-powerpc/module.hmodified+3−3View file
include/asm-ppc/msgbuf.h → include/asm-powerpc/msgbuf.hrenamed+12−4View file
include/asm-powerpc/namei.hmodified+7−7View file
include/asm-ppc/param.h → include/asm-powerpc/param.hrenamed+4−4View file
include/asm-powerpc/poll.hmodified+3−3View file
include/asm-powerpc/sembuf.hmodified+3−3View file
include/asm-powerpc/setup.hadded+9−0View file
include/asm-powerpc/shmbuf.hmodified+7−7View file
include/asm-powerpc/shmparam.hmodified+3−3View file
include/asm-powerpc/siginfo.hmodified+3−3View file
include/asm-powerpc/socket.hmodified+3−3View file
include/asm-powerpc/sockios.hmodified+3−3View file
include/asm-powerpc/string.hmodified+3−3View file
include/asm-powerpc/termbits.hmodified+3−3View file
include/asm-powerpc/termios.hmodified+3−3View file
include/asm-ppc/timex.h → include/asm-powerpc/timex.hrenamed+23−14View file
include/asm-ppc64/topology.h → include/asm-powerpc/topology.hrenamed+5−4View file
include/asm-powerpc/unaligned.hmodified+5−4View file
include/asm-ppc/user.h → include/asm-powerpc/user.hrenamed+8−7View file
include/asm-ppc/setup.hdeleted+0−14View before deletion
include/asm-ppc/topology.hdeleted+0−6View before deletion
include/asm-ppc64/msgbuf.hdeleted+0−27View before deletion
include/asm-ppc64/param.hdeleted+0−31View before deletion
include/asm-ppc64/pci-bridge.hmodified+39−6View file
include/asm-ppc64/prom.hmodified+1−18View file
include/asm-ppc64/segment.hdeleted+0−6View before deletion
include/asm-ppc64/setup.hdeleted+0−6View before deletion
include/asm-ppc64/timex.hdeleted+0−26View before deletion
include/asm-ppc64/user.hdeleted+0−58View before deletion

Only the first 600 diff lines are shown. Download the complete patch.

arch/ppc/kernel/syscalls.c

View file
diff --git a/arch/ppc/kernel/syscalls.c b/arch/ppc/kernel/syscalls.c
index 124313c..127f040 100644
--- a/arch/ppc/kernel/syscalls.c
+++ b/arch/ppc/kernel/syscalls.c
@@ -41,10 +41,6 @@
#include <asm/ipc.h>
#include <asm/semaphore.h>
-void
-check_bugs(void)
-{
-}
/*
* sys_ipc() is the de-multiplexer for the SysV IPC calls..

arch/ppc64/Makefile

View file
diff --git a/arch/ppc64/Makefile b/arch/ppc64/Makefile
index 8189953..a91daa3 100644
--- a/arch/ppc64/Makefile
+++ b/arch/ppc64/Makefile
@@ -89,11 +89,12 @@ drivers-$(CONFIG_OPROFILE) += arch/ppc64/oprofile/
boot := arch/ppc64/boot
-boottarget-$(CONFIG_PPC_PSERIES) := zImage zImage.initrd
-boottarget-$(CONFIG_PPC_MAPLE) := zImage zImage.initrd
-boottarget-$(CONFIG_PPC_ISERIES) := vmlinux.sminitrd vmlinux.initrd vmlinux.sm
-boottarget-$(CONFIG_PPC_BPA) := zImage zImage.initrd
-$(boottarget-y): vmlinux
+boottargets-$(CONFIG_PPC_PSERIES) += zImage zImage.initrd
+boottargets-$(CONFIG_PPC_PMAC) += zImage.vmode zImage.initrd.vmode
+boottargets-$(CONFIG_PPC_MAPLE) += zImage zImage.initrd
+boottargets-$(CONFIG_PPC_ISERIES) += vmlinux.sminitrd vmlinux.initrd vmlinux.sm
+boottargets-$(CONFIG_PPC_BPA) += zImage zImage.initrd
+$(boottargets-y): vmlinux
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
bootimage-$(CONFIG_PPC_PSERIES) := $(boot)/zImage
@@ -131,10 +132,12 @@ include3/asm:
$(Q)ln -fsn $(srctree)/include/asm-powerpc include3/asm
define archhelp
- echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
- echo ' zImage.initrd- Compressed kernel image with initrd attached,'
- echo ' sourced from arch/$(ARCH)/boot/ramdisk.image.gz'
- echo ' (arch/$(ARCH)/boot/zImage.initrd)'
+ echo ' zImage.vmode - Compressed kernel image (arch/$(ARCH)/boot/zImage.vmode)'
+ echo ' zImage.initrd.vmode - Compressed kernel image with initrd attached,'
+ echo ' sourced from arch/$(ARCH)/boot/ramdisk.image.gz'
+ echo ' (arch/$(ARCH)/boot/zImage.initrd.vmode)'
+ echo ' zImage - zImage for pSeries machines'
+ echo ' zImage.initrd - zImage with initrd for pSeries machines'
endef
CLEAN_FILES += include/asm-ppc64/offsets.h

arch/ppc64/boot/Makefile

View file
diff --git a/arch/ppc64/boot/Makefile b/arch/ppc64/boot/Makefile
index 2c5f5e7..33fdc87 100644
--- a/arch/ppc64/boot/Makefile
+++ b/arch/ppc64/boot/Makefile
@@ -37,6 +37,9 @@ quiet_cmd_bootcc = BOOTCC $@
quiet_cmd_bootas = BOOTAS $@
cmd_bootas = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTAFLAGS) -c -o $@ $<
+quiet_cmd_bootld = BOOTLD $@
+ cmd_bootld = $(CROSS32LD) $(BOOTLFLAGS) -o $@ $(2)
+
$(patsubst %.c,%.o, $(filter %.c, $(src-boot))): %.o: %.c
$(call if_changed_dep,bootcc)
$(patsubst %.S,%.o, $(filter %.S, $(src-boot))): %.o: %.S
@@ -53,7 +56,7 @@ src-sec = $(foreach section, $(1), $(patsubst %,$(obj)/kernel-%.c, $(section)))
gz-sec = $(foreach section, $(1), $(patsubst %,$(obj)/kernel-%.gz, $(section)))
hostprogs-y := addnote addRamDisk
-targets += zImage zImage.initrd imagesize.c \
+targets += zImage.vmode zImage.initrd.vmode zImage zImage.initrd imagesize.c \
$(patsubst $(obj)/%,%, $(call obj-sec, $(required) $(initrd))) \
$(patsubst $(obj)/%,%, $(call src-sec, $(required) $(initrd))) \
$(patsubst $(obj)/%,%, $(call gz-sec, $(required) $(initrd))) \
@@ -63,7 +66,7 @@ extra-y := initrd.o
quiet_cmd_ramdisk = RAMDISK $@
cmd_ramdisk = $(obj)/addRamDisk $(obj)/ramdisk.image.gz $< $@
-quiet_cmd_stripvm = STRIP $@
+quiet_cmd_stripvm = STRIP $@
cmd_stripvm = $(STRIP) -s $< -o $@
vmlinux.strip: vmlinux FORCE
@@ -71,12 +74,20 @@ vmlinux.strip: vmlinux FORCE
$(obj)/vmlinux.initrd: vmlinux.strip $(obj)/addRamDisk $(obj)/ramdisk.image.gz FORCE
$(call if_changed,ramdisk)
-addsection = $(CROSS32OBJCOPY) $(1) \
- --add-section=.kernel:$(strip $(patsubst $(obj)/kernel-%.o,%, $(1)))=$(patsubst %.o,%.gz, $(1)) \
- --set-section-flags=.kernel:$(strip $(patsubst $(obj)/kernel-%.o,%, $(1)))=$(OBJCOPYFLAGS)
+quiet_cmd_addsection = ADDSEC $@
+ cmd_addsection = $(CROSS32OBJCOPY) $@ \
+ --add-section=.kernel:$(strip $(patsubst $(obj)/kernel-%.o,%, $@))=$(patsubst %.o,%.gz, $@) \
+ --set-section-flags=.kernel:$(strip $(patsubst $(obj)/kernel-%.o,%, $@))=$(OBJCOPYFLAGS)
+
+quiet_cmd_imagesize = GENSIZE $@
+ cmd_imagesize = ls -l vmlinux.strip | \
+ awk '{printf "/* generated -- do not edit! */\n" "unsigned long vmlinux_filesize = %d;\n", $$5}' \
+ > $(obj)/imagesize.c && \
+ $(CROSS_COMPILE)nm -n vmlinux | tail -n 1 | \
+ awk '{printf "unsigned long vmlinux_memsize = 0x%s;\n", substr($$1,8)}' >> $(obj)/imagesize.c
-quiet_cmd_addnote = ADDNOTE $@
- cmd_addnote = $(CROSS32LD) $(BOOTLFLAGS) -o $@ $(obj-boot) && $(obj)/addnote $@
+quiet_cmd_addnote = ADDNOTE $@
+ cmd_addnote = $(obj)/addnote $@
$(call gz-sec, $(required)): $(obj)/kernel-%.gz: % FORCE
$(call if_changed,gzip)
@@ -85,28 +96,30 @@ $(obj)/kernel-initrd.gz: $(obj)/ramdisk.image.gz
cp -f $(obj)/ramdisk.image.gz $@
$(call src-sec, $(required) $(initrd)): $(obj)/kernel-%.c: $(obj)/kernel-%.gz FORCE
- touch $@
+ @touch $@
$(call obj-sec, $(required) $(initrd)): $(obj)/kernel-%.o: $(obj)/kernel-%.c FORCE
$(call if_changed_dep,bootcc)
- $(call addsection, $@)
+ $(call cmd,addsection)
+
+$(obj)/zImage.vmode: obj-boot += $(call obj-sec, $(required))
+$(obj)/zImage.vmode: $(call obj-sec, $(required)) $(obj-boot) FORCE
+ $(call cmd,bootld,$(obj-boot))
+
+$(obj)/zImage.initrd.vmode: obj-boot += $(call obj-sec, $(required) $(initrd))
+$(obj)/zImage.initrd.vmode: $(call obj-sec, $(required) $(initrd)) $(obj-boot) FORCE
+ $(call cmd,bootld,$(obj-boot))
-$(obj)/zImage: obj-boot += $(call obj-sec, $(required))
-$(obj)/zImage: $(call obj-sec, $(required)) $(obj-boot) $(obj)/addnote FORCE
+$(obj)/zImage: $(obj)/zImage.vmode $(obj)/addnote FORCE
+ @cp -f $< $@
$(call if_changed,addnote)
-$(obj)/zImage.initrd: obj-boot += $(call obj-sec, $(required) $(initrd))
-$(obj)/zImage.initrd: $(call obj-sec, $(required) $(initrd)) $(obj-boot) $(obj)/addnote FORCE
+$(obj)/zImage.initrd: $(obj)/zImage.initrd.vmode $(obj)/addnote FORCE
+ @cp -f $< $@
$(call if_changed,addnote)
$(obj)/imagesize.c: vmlinux.strip
- @echo Generating $@
- ls -l vmlinux.strip | \
- awk '{printf "/* generated -- do not edit! */\n" \
- "unsigned long vmlinux_filesize = %d;\n", $$5}' > $(obj)/imagesize.c
- $(CROSS_COMPILE)nm -n vmlinux | tail -n 1 | \
- awk '{printf "unsigned long vmlinux_memsize = 0x%s;\n", substr($$1,8)}' \
- >> $(obj)/imagesize.c
+ $(call cmd,imagesize)
install: $(CONFIGURE) $(BOOTIMAGE)
sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" "$(BOOTIMAGE)"

arch/ppc64/boot/main.c

View file
diff --git a/arch/ppc64/boot/main.c b/arch/ppc64/boot/main.c
index 99e68cf..f7ec19a 100644
--- a/arch/ppc64/boot/main.c
+++ b/arch/ppc64/boot/main.c
@@ -23,7 +23,8 @@ extern void flush_cache(void *, unsigned long);
/* Value picked to match that used by yaboot */
#define PROG_START 0x01400000
-#define RAM_END (256<<20) // Fixme: use OF */
+#define RAM_END (512<<20) // Fixme: use OF */
+#define ONE_MB 0x100000
static char *avail_ram;
static char *begin_avail, *end_avail;
@@ -32,6 +33,7 @@ static unsigned int heap_use;
static unsigned int heap_max;
extern char _start[];
+extern char _end[];
extern char _vmlinux_start[];
extern char _vmlinux_end[];
extern char _initrd_start[];
@@ -58,13 +60,13 @@ typedef void (*kernel_entry_t)( unsigned long,
#undef DEBUG
-static unsigned long claim_base = PROG_START;
+static unsigned long claim_base;
static unsigned long try_claim(unsigned long size)
{
unsigned long addr = 0;
- for(; claim_base < RAM_END; claim_base += 0x100000) {
+ for(; claim_base < RAM_END; claim_base += ONE_MB) {
#ifdef DEBUG
printf(" trying: 0x%08lx\n\r", claim_base);
#endif
@@ -95,7 +97,26 @@ void start(unsigned long a1, unsigned long a2, void *promptr)
if (getprop(chosen_handle, "stdin", &stdin, sizeof(stdin)) != 4)
exit();
- printf("\n\rzImage starting: loaded at 0x%x\n\r", (unsigned)_start);
+ printf("\n\rzImage starting: loaded at 0x%lx\n\r", (unsigned long) _start);
+
+ /*
+ * The first available claim_base must be above the end of the
+ * the loaded kernel wrapper file (_start to _end includes the
+ * initrd image if it is present) and rounded up to a nice
+ * 1 MB boundary for good measure.
+ */
+
+ claim_base = _ALIGN_UP((unsigned long)_end, ONE_MB);
+
+#if defined(PROG_START)
+ /*
+ * Maintain a "magic" minimum address. This keeps some older
+ * firmware platforms running.
+ */
+
+ if (claim_base < PROG_START)
+ claim_base = PROG_START;
+#endif
/*
* Now we try to claim some memory for the kernel itself
@@ -105,7 +126,7 @@ void start(unsigned long a1, unsigned long a2, void *promptr)
* size... In practice we add 1Mb, that is enough, but we should really
* consider fixing the Makefile to put a _raw_ kernel in there !
*/
- vmlinux_memsize += 0x100000;
+ vmlinux_memsize += ONE_MB;
printf("Allocating 0x%lx bytes for kernel ...\n\r", vmlinux_memsize);
vmlinux.addr = try_claim(vmlinux_memsize);
if (vmlinux.addr == 0) {

arch/ppc64/kernel/bpa_iic.c

View file
diff --git a/arch/ppc64/kernel/bpa_iic.c b/arch/ppc64/kernel/bpa_iic.c
index c8f3dc3..0aaa878 100644
--- a/arch/ppc64/kernel/bpa_iic.c
+++ b/arch/ppc64/kernel/bpa_iic.c
@@ -205,6 +205,18 @@ static struct iic_regs __iomem *find_iic(int cpu)
}
#ifdef CONFIG_SMP
+
+/* Use the highest interrupt priorities for IPI */
+static inline int iic_ipi_to_irq(int ipi)
+{
+ return IIC_IPI_OFFSET + IIC_NUM_IPIS - 1 - ipi;
+}
+
+static inline int iic_irq_to_ipi(int irq)
+{
+ return IIC_NUM_IPIS - 1 - (irq - IIC_IPI_OFFSET);
+}
+
void iic_setup_cpu(void)
{
out_be64(&__get_cpu_var(iic).regs->prio, 0xff);
@@ -212,18 +224,20 @@ void iic_setup_cpu(void)
void iic_cause_IPI(int cpu, int mesg)
{
- out_be64(&per_cpu(iic, cpu).regs->generate, mesg);
+ out_be64(&per_cpu(iic, cpu).regs->generate, (IIC_NUM_IPIS - 1 - mesg) << 4);
}
static irqreturn_t iic_ipi_action(int irq, void *dev_id, struct pt_regs *regs)
{
-
- smp_message_recv(irq - IIC_IPI_OFFSET, regs);
+ smp_message_recv(iic_irq_to_ipi(irq), regs);
return IRQ_HANDLED;
}
-static void iic_request_ipi(int irq, const char *name)
+static void iic_request_ipi(int ipi, const char *name)
{
+ int irq;
+
+ irq = iic_ipi_to_irq(ipi);
/* IPIs are marked SA_INTERRUPT as they must run with irqs
* disabled */
get_irq_desc(irq)->handler = &iic_pic;
@@ -233,10 +247,10 @@ static void iic_request_ipi(int irq, const char *name)
void iic_request_IPIs(void)
{
- iic_request_ipi(IIC_IPI_OFFSET + PPC_MSG_CALL_FUNCTION, "IPI-call");
- iic_request_ipi(IIC_IPI_OFFSET + PPC_MSG_RESCHEDULE, "IPI-resched");
+ iic_request_ipi(PPC_MSG_CALL_FUNCTION, "IPI-call");
+ iic_request_ipi(PPC_MSG_RESCHEDULE, "IPI-resched");
#ifdef CONFIG_DEBUGGER
- iic_request_ipi(IIC_IPI_OFFSET + PPC_MSG_DEBUGGER_BREAK, "IPI-debug");
+ iic_request_ipi(PPC_MSG_DEBUGGER_BREAK, "IPI-debug");
#endif /* CONFIG_DEBUGGER */
}
#endif /* CONFIG_SMP */

arch/ppc64/kernel/eeh.c

View file
diff --git a/arch/ppc64/kernel/eeh.c b/arch/ppc64/kernel/eeh.c
index 4c857a6..ba93fd7 100644
--- a/arch/ppc64/kernel/eeh.c
+++ b/arch/ppc64/kernel/eeh.c
@@ -254,6 +254,7 @@ pci_addr_cache_insert(struct pci_dev *dev, unsigned long alo,
static void __pci_addr_cache_insert_device(struct pci_dev *dev)
{
struct device_node *dn;
+ struct pci_dn *pdn;
int i;
int inserted = 0;
@@ -265,8 +266,9 @@ static void __pci_addr_cache_insert_device(struct pci_dev *dev)
}
/* Skip any devices for which EEH is not enabled. */
- if (!(dn->eeh_mode & EEH_MODE_SUPPORTED) ||
- dn->eeh_mode & EEH_MODE_NOCHECK) {
+ pdn = dn->data;
+ if (!(pdn->eeh_mode & EEH_MODE_SUPPORTED) ||
+ pdn->eeh_mode & EEH_MODE_NOCHECK) {
#ifdef DEBUG
printk(KERN_INFO "PCI: skip building address cache for=%s\n",
pci_name(dev));
@@ -415,6 +417,7 @@ int eeh_unregister_notifier(struct notifier_block *nb)
static int read_slot_reset_state(struct device_node *dn, int rets[])
{
int token, outputs;
+ struct pci_dn *pdn = dn->data;
if (ibm_read_slot_reset_state2 != RTAS_UNKNOWN_SERVICE) {
token = ibm_read_slot_reset_state2;
@@ -424,8 +427,8 @@ static int read_slot_reset_state(struct device_node *dn, int rets[])
outputs = 3;
}
- return rtas_call(token, 3, outputs, rets, dn->eeh_config_addr,
- BUID_HI(dn->phb->buid), BUID_LO(dn->phb->buid));
+ return rtas_call(token, 3, outputs, rets, pdn->eeh_config_addr,
+ BUID_HI(pdn->phb->buid), BUID_LO(pdn->phb->buid));
}
/**
@@ -534,6 +537,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
unsigned long flags;
int rc, reset_state;
struct eeh_event *event;
+ struct pci_dn *pdn;
__get_cpu_var(total_mmio_ffs)++;
@@ -542,14 +546,15 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
if (!dn)
return 0;
+ pdn = dn->data;
/* Access to IO BARs might get this far and still not want checking. */
- if (!(dn->eeh_mode & EEH_MODE_SUPPORTED) ||
- dn->eeh_mode & EEH_MODE_NOCHECK) {
+ if (!pdn->eeh_capable || !(pdn->eeh_mode & EEH_MODE_SUPPORTED) ||
+ pdn->eeh_mode & EEH_MODE_NOCHECK) {
return 0;
}
- if (!dn->eeh_config_addr) {
+ if (!pdn->eeh_config_addr) {
return 0;
}
@@ -557,7 +562,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
* If we already have a pending isolation event for this
* slot, we know it's bad already, we don't need to check...
*/
- if (dn->eeh_mode & EEH_MODE_ISOLATED) {
+ if (pdn->eeh_mode & EEH_MODE_ISOLATED) {
atomic_inc(&eeh_fail_count);
if (atomic_read(&eeh_fail_count) >= EEH_MAX_FAILS) {
/* re-read the slot reset state */
@@ -582,7 +587,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
}
/* prevent repeated reports of this failure */
- dn->eeh_mode |= EEH_MODE_ISOLATED;
+ pdn->eeh_mode |= EEH_MODE_ISOLATED;
reset_state = rets[0];
@@ -590,9 +595,9 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
memset(slot_errbuf, 0, eeh_error_buf_size);
rc = rtas_call(ibm_slot_error_detail,
- 8, 1, NULL, dn->eeh_config_addr,
- BUID_HI(dn->phb->buid),
- BUID_LO(dn->phb->buid), NULL, 0,
+ 8, 1, NULL, pdn->eeh_config_addr,
+ BUID_HI(pdn->phb->buid),
+ BUID_LO(pdn->phb->buid), NULL, 0,
virt_to_phys(slot_errbuf),
eeh_error_buf_size,
1 /* Temporary Error */);
@@ -679,8 +684,9 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
u32 *device_id = (u32 *)get_property(dn, "device-id", NULL);
u32 *regs;
int enable;
+ struct pci_dn *pdn = dn->data;
- dn->eeh_mode = 0;
+ pdn->eeh_mode = 0;
if (status && strcmp(status, "ok") != 0)
return NULL; /* ignore devices with bad status */
@@ -691,7 +697,7 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
/* There is nothing to check on PCI to ISA bridges */
if (dn->type && !strcmp(dn->type, "isa")) {
- dn->eeh_mode |= EEH_MODE_NOCHECK;
+ pdn->eeh_mode |= EEH_MODE_NOCHECK;
return NULL;
}
@@ -708,7 +714,7 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
enable = 0;
if (!enable)
- dn->eeh_mode |= EEH_MODE_NOCHECK;
+ pdn->eeh_mode |= EEH_MODE_NOCHECK;
/* Ok... see if this device supports EEH. Some do, some don't,
* and the only way to find out is to check each and every one. */
@@ -721,8 +727,8 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
EEH_ENABLE);
if (ret == 0) {
eeh_subsystem_enabled = 1;
- dn->eeh_mode |= EEH_MODE_SUPPORTED;
- dn->eeh_config_addr = regs[0];
+ pdn->eeh_mode |= EEH_MODE_SUPPORTED;
+ pdn->eeh_config_addr = regs[0];
#ifdef DEBUG
printk(KERN_DEBUG "EEH: %s: eeh enabled\n", dn->full_name);
#endif
@@ -730,10 +736,11 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
/* This device doesn't support EEH, but it may have an
* EEH parent, in which case we mark it as supported. */
- if (dn->parent && (dn->parent->eeh_mode & EEH_MODE_SUPPORTED)) {
+ if (dn->parent && dn->parent->data
+ && (PCI_DN(dn->parent)->eeh_mode & EEH_MODE_SUPPORTED)) {
/* Parent supports EEH. */
- dn->eeh_mode |= EEH_MODE_SUPPORTED;
- dn->eeh_config_addr = dn->parent->eeh_config_addr;
+ pdn->eeh_mode |= EEH_MODE_SUPPORTED;
+ pdn->eeh_config_addr = PCI_DN(dn->parent)->eeh_config_addr;
return NULL;
}
}
@@ -790,11 +797,13 @@ void __init eeh_init(void)
for (phb = of_find_node_by_name(NULL, "pci"); phb;
phb = of_find_node_by_name(phb, "pci")) {
unsigned long buid;
+ struct pci_dn *pci;
buid = get_phb_buid(phb);
- if (buid == 0)
+ if (buid == 0 || phb->data == NULL)
continue;
+ pci = phb->data;
info.buid_lo = BUID_LO(buid);
info.buid_hi = BUID_HI(buid);
traverse_pci_devices(phb, early_enable_eeh, &info);
@@ -823,9 +832,9 @@ void eeh_add_device_early(struct device_node *dn)
struct pci_controller *phb;
struct eeh_early_enable_info info;
- if (!dn)
+ if (!dn || !dn->data)
return;
- phb = dn->phb;
+ phb = PCI_DN(dn)->phb;
if (NULL == phb || 0 == phb->buid) {
printk(KERN_WARNING "EEH: Expected buid but found none\n");
return;

arch/ppc64/kernel/iomap.c

View file
diff --git a/arch/ppc64/kernel/iomap.c b/arch/ppc64/kernel/iomap.c
index 09a3062..6160c8d 100644
--- a/arch/ppc64/kernel/iomap.c
+++ b/arch/ppc64/kernel/iomap.c
@@ -22,13 +22,23 @@ unsigned int fastcall ioread16(void __iomem *addr)
{
return readw(addr);
}
+unsigned int fastcall ioread16be(void __iomem *addr)
+{
+ return in_be16(addr);
+}
unsigned int fastcall ioread32(void __iomem *addr)
{
return readl(addr);
}
+unsigned int fastcall ioread32be(void __iomem *addr)
+{
+ return in_be32(addr);
+}
EXPORT_SYMBOL(ioread8);
EXPORT_SYMBOL(ioread16);
+EXPORT_SYMBOL(ioread16be);
EXPORT_SYMBOL(ioread32);
+EXPORT_SYMBOL(ioread32be);
void fastcall iowrite8(u8 val, void __iomem *addr)
{
@@ -38,13 +48,23 @@ void fastcall iowrite16(u16 val, void __iomem *addr)
{
writew(val, addr);
}
+void fastcall iowrite16be(u16 val, void __iomem *addr)
+{
+ out_be16(addr, val);
+}
void fastcall iowrite32(u32 val, void __iomem *addr)
{
writel(val, addr);
}
+void fastcall iowrite32be(u32 val, void __iomem *addr)
+{
+ out_be32(addr, val);
+}
EXPORT_SYMBOL(iowrite8);
EXPORT_SYMBOL(iowrite16);
+EXPORT_SYMBOL(iowrite16be);
EXPORT_SYMBOL(iowrite32);
+EXPORT_SYMBOL(iowrite32be);
/*
* These are the "repeat read/write" functions. Note the

arch/ppc64/kernel/iommu.c

View file
diff --git a/arch/ppc64/kernel/iommu.c b/arch/ppc64/kernel/iommu.c
index 845eebd..9032b6b 100644
--- a/arch/ppc64/kernel/iommu.c
+++ b/arch/ppc64/kernel/iommu.c
@@ -438,7 +438,8 @@ struct iommu_table *iommu_init_table(struct iommu_table *tbl)
void iommu_free_table(struct device_node *dn)
{
- struct iommu_table *tbl = dn->iommu_table;
+ struct pci_dn *pdn = dn->data;
+ struct iommu_table *tbl = pdn->iommu_table;
unsigned long bitmap_sz, i;
unsigned int order;

arch/ppc64/kernel/maple_pci.c

View file
diff --git a/arch/ppc64/kernel/maple_pci.c b/arch/ppc64/kernel/maple_pci.c
index 5399399..5a8b4d8 100644
--- a/arch/ppc64/kernel/maple_pci.c
+++ b/arch/ppc64/kernel/maple_pci.c
@@ -447,9 +447,9 @@ void __init maple_pci_init(void)
*/
if (u3_agp) {
struct device_node *np = u3_agp->arch_data;
- np->busno = 0xf0;
+ PCI_DN(np)->busno = 0xf0;
for (np = np->child; np; np = np->sibling)
- np->busno = 0xf0;
+ PCI_DN(np)->busno = 0xf0;
}
/* Tell pci.c to use the common resource allocation mecanism */

arch/ppc64/kernel/misc.S

View file
diff --git a/arch/ppc64/kernel/misc.S b/arch/ppc64/kernel/misc.S
index 6d860c1..c047663 100644
--- a/arch/ppc64/kernel/misc.S
+++ b/arch/ppc64/kernel/misc.S
@@ -1431,9 +1431,9 @@ _GLOBAL(sys_call_table)
.llong .sys_ni_syscall /* 195 - 32bit only stat64 */
.llong .sys_ni_syscall /* 32bit only lstat64 */
.llong .sys_ni_syscall /* 32bit only fstat64 */
- .llong .sys_ni_syscall /* 32bit only pciconfig_read */
- .llong .sys_ni_syscall /* 32bit only pciconfig_write */
- .llong .sys_ni_syscall /* 32bit only pciconfig_iobase */
+ .llong .sys_pciconfig_read
+ .llong .sys_pciconfig_write
+ .llong .sys_pciconfig_iobase /* 200 - pciconfig_iobase */
.llong .sys_ni_syscall /* reserved for MacOnLinux */
.llong .sys_getdents64
.llong .sys_pivot_root

arch/ppc64/kernel/pSeries_iommu.c

View file
diff --git a/arch/ppc64/kernel/pSeries_iommu.c b/arch/ppc64/kernel/pSeries_iommu.c
index 9d5e1e7..f0fd7fb 100644
--- a/arch/ppc64/kernel/pSeries_iommu.c
+++ b/arch/ppc64/kernel/pSeries_iommu.c
@@ -295,7 +295,7 @@ static void iommu_table_setparms_lpar(struct pci_controller *phb,
struct iommu_table *tbl,
unsigned int *dma_window)
{
- tbl->it_busno = dn->bussubno;
+ tbl->it_busno = PCI_DN(dn)->bussubno;
/* TODO: Parse field size properties properly. */
tbl->it_size = (((unsigned long)dma_window[4] << 32) |
@@ -311,6 +311,7 @@ static void iommu_table_setparms_lpar(struct pci_controller *phb,
static void iommu_bus_setup_pSeries(struct pci_bus *bus)
{
struct device_node *dn, *pdn;
+ struct pci_dn *pci;
struct iommu_table *tbl;
DBG("iommu_bus_setup_pSeries, bus %p, bus->self %p\n", bus, bus->self);
@@ -325,6 +326,7 @@ static void iommu_bus_setup_pSeries(struct pci_bus *bus)
*/
dn = pci_bus_to_OF_node(bus);

This diff is incomplete. Download the complete patch.

arch/ppc64/kernel/pci.c

View file

This diff is incomplete. Download the complete patch.

arch/ppc64/kernel/pci.h

View file

This diff is incomplete. Download the complete patch.

arch/ppc64/kernel/pci_dn.c

View file

This diff is incomplete. Download the complete patch.

arch/ppc64/kernel/pci_iommu.c

View file

This diff is incomplete. Download the complete patch.

arch/ppc64/kernel/pmac_feature.c

View file

This diff is incomplete. Download the complete patch.

arch/ppc64/kernel/pmac_pci.c

View file

This diff is incomplete. Download the complete patch.

arch/ppc64/kernel/prom.c

View file

This diff is incomplete. Download the complete patch.

arch/ppc64/kernel/rtas_pci.c

View file

This diff is incomplete. Download the complete patch.

arch/ppc64/kernel/sys_ppc32.c

View file

This diff is incomplete. Download the complete patch.

arch/ppc64/kernel/syscalls.c

View file

This diff is incomplete. Download the complete patch.

arch/ppc64/kernel/u3_iommu.c

View file

This diff is incomplete. Download the complete patch.

arch/ppc64/kernel/udbg.c

View file

This diff is incomplete. Download the complete patch.

arch/ppc64/mm/init.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/hotplug/rpadlpar_core.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/hotplug/rpaphp_pci.c

View file

This diff is incomplete. Download the complete patch.

drivers/video/offb.c

View file

This diff is incomplete. Download the complete patch.

include/asm-powerpc/8253pit.h

View file

This diff is incomplete. Download the complete patch.

include/asm-powerpc/agp.h

View file

This diff is incomplete. Download the complete patch.

include/asm-powerpc/bugs.h

View file

This diff is incomplete. Download the complete patch.

include/asm-powerpc/errno.h

View file

This diff is incomplete. Download the complete patch.

include/asm-powerpc/ioctl.h

View file

This diff is incomplete. Download the complete patch.

include/asm-powerpc/ioctls.h

View file

This diff is incomplete. Download the complete patch.

include/asm-powerpc/linkage.h

View file

This diff is incomplete. Download the complete patch.

include/asm-powerpc/mc146818rtc.h

View file

This diff is incomplete. Download the complete patch.

include/asm-powerpc/mman.h

View file

This diff is incomplete. Download the complete patch.

include/asm-powerpc/module.h

View file

This diff is incomplete. Download the complete patch.

include/asm-powerpc/msgbuf.h

View file

This diff is incomplete. Download the complete patch.

include/asm-powerpc/namei.h

View file

This diff is incomplete. Download the complete patch.

include/asm-powerpc/param.h

View file

This diff is incomplete. Download the complete patch.

include/asm-powerpc/poll.h

View file

This diff is incomplete. Download the complete patch.

include/asm-powerpc/sembuf.h

View file

This diff is incomplete. Download the complete patch.

include/asm-powerpc/setup.h

View file

This diff is incomplete. Download the complete patch.

include/asm-powerpc/shmbuf.h

View file

This diff is incomplete. Download the complete patch.

include/asm-powerpc/shmparam.h

View file

This diff is incomplete. Download the complete patch.

include/asm-powerpc/siginfo.h

View file

This diff is incomplete. Download the complete patch.

include/asm-powerpc/socket.h

View file

This diff is incomplete. Download the complete patch.

include/asm-powerpc/sockios.h

View file

This diff is incomplete. Download the complete patch.

include/asm-powerpc/string.h

View file

This diff is incomplete. Download the complete patch.

include/asm-powerpc/termbits.h

View file

This diff is incomplete. Download the complete patch.

include/asm-powerpc/termios.h

View file

This diff is incomplete. Download the complete patch.

include/asm-powerpc/timex.h

View file

This diff is incomplete. Download the complete patch.

include/asm-powerpc/topology.h

View file

This diff is incomplete. Download the complete patch.

include/asm-powerpc/unaligned.h

View file

This diff is incomplete. Download the complete patch.

include/asm-powerpc/user.h

View file

This diff is incomplete. Download the complete patch.

include/asm-ppc/setup.h

View before deletion

This diff is incomplete. Download the complete patch.

include/asm-ppc/topology.h

View before deletion

This diff is incomplete. Download the complete patch.

include/asm-ppc64/msgbuf.h

View before deletion

This diff is incomplete. Download the complete patch.

include/asm-ppc64/param.h

View before deletion

This diff is incomplete. Download the complete patch.

include/asm-ppc64/pci-bridge.h

View file

This diff is incomplete. Download the complete patch.

include/asm-ppc64/prom.h

View file

This diff is incomplete. Download the complete patch.

include/asm-ppc64/segment.h

View before deletion

This diff is incomplete. Download the complete patch.

include/asm-ppc64/setup.h

View before deletion

This diff is incomplete. Download the complete patch.

include/asm-ppc64/timex.h

View before deletion

This diff is incomplete. Download the complete patch.

include/asm-ppc64/user.h

View before deletion

This diff is incomplete. Download the complete patch.