* [PATCH 8/8] [POWERPC] Fix register labels on show_regs() message for 4xx/Book-E
From: Kumar Gala @ 2007-07-26 6:32 UTC (permalink / raw)
To: linuxppc-dev
In a show_regs() message The DEAR and ESR were reported as
DAR and DSISR which only exist on classic parts.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
arch/powerpc/kernel/process.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 84f000a..a83727b 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -423,7 +423,11 @@ void show_regs(struct pt_regs * regs)
printk(" CR: %08lx XER: %08lx\n", regs->ccr, regs->xer);
trap = TRAP(regs);
if (trap == 0x300 || trap == 0x600)
+#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
+ printk("DEAR: "REG", ESR: "REG"\n", regs->dar, regs->dsisr);
+#else
printk("DAR: "REG", DSISR: "REG"\n", regs->dar, regs->dsisr);
+#endif
printk("TASK = %p[%d] '%s' THREAD: %p",
current, current->pid, current->comm, task_thread_info(current));
--
1.5.2.2
^ permalink raw reply related
* [PATCH 7/8] [POWERPC] Only allow building of BootX text support on PPC_MULTIPLATFORM
From: Kumar Gala @ 2007-07-26 6:32 UTC (permalink / raw)
To: linuxppc-dev
BootX text code is only supported on systems with real OF at this point
which is PPC_OF && PPC_MULTIPLATFORM.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
arch/powerpc/Kconfig.debug | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug
index 346cd3b..5c71624 100644
--- a/arch/powerpc/Kconfig.debug
+++ b/arch/powerpc/Kconfig.debug
@@ -134,7 +134,7 @@ config BDI_SWITCH
config BOOTX_TEXT
bool "Support for early boot text console (BootX or OpenFirmware only)"
- depends PPC_OF
+ depends PPC_OF && PPC_MULTIPLATFORM
help
Say Y here to see progress messages from the boot firmware in text
mode. Requires either BootX or Open Firmware.
--
1.5.2.2
^ permalink raw reply related
* [PATCH 5/8] [POWERPC] Fix mpc7448hpc2 tsi108 device_type bug
From: Kumar Gala @ 2007-07-26 6:32 UTC (permalink / raw)
To: linuxppc-dev
From: Roy Zang <tie-fei.zang@freescale.com>
Fix mpc7448hpc2 tsi108 device_type bug.
Wrong device type will break the board startup.
Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
arch/powerpc/boot/dts/mpc7448hpc2.dts | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/boot/dts/mpc7448hpc2.dts b/arch/powerpc/boot/dts/mpc7448hpc2.dts
index 0e3d314..b9158eb 100644
--- a/arch/powerpc/boot/dts/mpc7448hpc2.dts
+++ b/arch/powerpc/boot/dts/mpc7448hpc2.dts
@@ -45,7 +45,7 @@
#address-cells = <1>;
#size-cells = <1>;
#interrupt-cells = <2>;
- device_type = "tsi108-bridge";
+ device_type = "tsi-bridge";
ranges = <00000000 c0000000 00010000>;
reg = <c0000000 00010000>;
bus-frequency = <0>;
--
1.5.2.2
^ permalink raw reply related
* [PATCH 4/8] [POWREPC] Fixup a number of modpost warnings on ppc32
From: Kumar Gala @ 2007-07-26 6:32 UTC (permalink / raw)
To: linuxppc-dev
Fixed the following warnings:
WARNING: vmlinux.o(.text+0x2934): Section mismatch: reference to .init.text:__alloc_bootmem (between 'irq_alloc_host' and 'irq_set_default_host')
WARNING: vmlinux.o(.text+0xb2aa): Section mismatch: reference to .init.data:boot_command_line (between 'register_early_udbg_console' and 'udbg_printf')
WARNING: vmlinux.o(.text+0xb2b2): Section mismatch: reference to .init.data:boot_command_line (between 'register_early_udbg_console' and 'udbg_printf')
WARNING: vmlinux.o(.text+0xe354): Section mismatch: reference to .init.text:__alloc_bootmem (between 'pcibios_alloc_controller' and 'pci_domain_nr')
WARNING: vmlinux.o(.text+0x12768): Section mismatch: reference to .init.text:update_bridge_resource (between 'quirk_fsl_pcie_transparent' and 'indirect_read_config')
WARNING: vmlinux.o(.text+0x127a8): Section mismatch: reference to .init.text:update_bridge_resource (between 'quirk_fsl_pcie_transparent' and 'indirect_read_config')
WARNING: vmlinux.o(.text+0x17566c): Section mismatch: reference to .init.text:pcibios_fixup_bus (between 'pci_scan_child_bus' and 'pci_scan_bus_parented')
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
arch/powerpc/kernel/irq.c | 8 ++++----
arch/powerpc/kernel/pci-common.c | 2 +-
arch/powerpc/kernel/pci_32.c | 2 +-
arch/powerpc/kernel/udbg.c | 2 +-
arch/powerpc/sysdev/fsl_pci.c | 2 +-
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 2fc8786..24bea97 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -418,10 +418,10 @@ irq_hw_number_t virq_to_hw(unsigned int virq)
}
EXPORT_SYMBOL_GPL(virq_to_hw);
-struct irq_host *irq_alloc_host(unsigned int revmap_type,
- unsigned int revmap_arg,
- struct irq_host_ops *ops,
- irq_hw_number_t inval_irq)
+__init_refok struct irq_host *irq_alloc_host(unsigned int revmap_type,
+ unsigned int revmap_arg,
+ struct irq_host_ops *ops,
+ irq_hw_number_t inval_irq)
{
struct irq_host *host;
unsigned int size = sizeof(struct irq_host);
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index fe7d125..7b41a99 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -65,7 +65,7 @@ static void __devinit pci_setup_pci_controller(struct pci_controller *hose)
spin_unlock(&hose_spinlock);
}
-struct pci_controller * pcibios_alloc_controller(struct device_node *dev)
+__init_refok struct pci_controller * pcibios_alloc_controller(struct device_node *dev)
{
struct pci_controller *phb;
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index 395086f..cd35c96 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -1247,7 +1247,7 @@ pcibios_init(void)
subsys_initcall(pcibios_init);
-void __init pcibios_fixup_bus(struct pci_bus *bus)
+void pcibios_fixup_bus(struct pci_bus *bus)
{
struct pci_controller *hose = (struct pci_controller *) bus->sysdata;
unsigned long io_offset;
diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c
index cbca1df..0f9b4ea 100644
--- a/arch/powerpc/kernel/udbg.c
+++ b/arch/powerpc/kernel/udbg.c
@@ -155,7 +155,7 @@ static int early_console_initialized;
* Called by setup_system after ppc_md->probe and ppc_md->early_init.
* Call it again after setting udbg_putc in ppc_md->setup_arch.
*/
-void register_early_udbg_console(void)
+void __init register_early_udbg_console(void)
{
if (early_console_initialized)
return;
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index 8712227..9fb0ce5 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -107,7 +107,7 @@ void __init setup_pci_cmd(struct pci_controller *hose)
}
}
-static void __devinit quirk_fsl_pcie_transparent(struct pci_dev *dev)
+static void __init quirk_fsl_pcie_transparent(struct pci_dev *dev)
{
struct resource *res;
int i, res_idx = PCI_BRIDGE_RESOURCES;
--
1.5.2.2
^ permalink raw reply related
* [PATCH 3/8] [POWERPC] Fix ethernet PHY support on MPC8544 DS
From: Kumar Gala @ 2007-07-26 6:32 UTC (permalink / raw)
To: linuxppc-dev
The MPC8544 dts needed to set the new phy-connection-type to rgmii-id
for the Vitesse PHY on the board to work properly.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
arch/powerpc/boot/dts/mpc8544ds.dts | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/boot/dts/mpc8544ds.dts b/arch/powerpc/boot/dts/mpc8544ds.dts
index 4a900c6..d8ee4a0 100644
--- a/arch/powerpc/boot/dts/mpc8544ds.dts
+++ b/arch/powerpc/boot/dts/mpc8544ds.dts
@@ -104,6 +104,7 @@
interrupts = <1d 2 1e 2 22 2>;
interrupt-parent = <&mpic>;
phy-handle = <&phy0>;
+ phy-connection-type = "rgmii-id";
};
ethernet@26000 {
@@ -117,6 +118,7 @@
interrupts = <1f 2 20 2 21 2>;
interrupt-parent = <&mpic>;
phy-handle = <&phy1>;
+ phy-connection-type = "rgmii-id";
};
serial@4500 {
--
1.5.2.2
^ permalink raw reply related
* [PATCH 2/8] [POWERPC] Don't try to allocate resources for a Freescale POWERPC PHB
From: Kumar Gala @ 2007-07-26 6:32 UTC (permalink / raw)
To: linuxppc-dev
The Freescale PCI PHBs actual report back values in the BAR registers
this causes issues in that we try to allocate resources for them
and will get error messages like the following on MPC8544 DS:
PCI: Failed to allocate mem resource #1:80000000@0 for 0000:00:00.0
To address this if we are class PCI_CLASS_PROCESSOR_POWERPC, a normal
header type, and the PHB we clear out all the resources.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
arch/powerpc/kernel/pci_32.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index 721a694..395086f 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -60,6 +60,24 @@ LIST_HEAD(hose_list);
static int pci_bus_count;
static void
+fixup_hide_host_resource_fsl(struct pci_dev* dev)
+{
+ int i, class = dev->class >> 8;
+
+ if ((class == PCI_CLASS_PROCESSOR_POWERPC) &&
+ (dev->hdr_type == PCI_HEADER_TYPE_NORMAL) &&
+ (dev->bus->parent == NULL)) {
+ for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
+ dev->resource[i].start = 0;
+ dev->resource[i].end = 0;
+ dev->resource[i].flags = 0;
+ }
+ }
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MOTOROLA, PCI_ANY_ID, fixup_hide_host_resource_fsl);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_FREESCALE, PCI_ANY_ID, fixup_hide_host_resource_fsl);
+
+static void
fixup_broken_pcnet32(struct pci_dev* dev)
{
if ((dev->class>>8 == PCI_CLASS_NETWORK_ETHERNET)) {
--
1.5.2.2
^ permalink raw reply related
* [PATCH 1/8] [POWERPC] Fix PCI indirect for big-endian cfg_addr
From: Kumar Gala @ 2007-07-26 6:32 UTC (permalink / raw)
To: linuxppc-dev
We didn't actually propogate the flag we pass into setup_indirect_pci()
to set indirect_type and thus were getting the wrong endianness if
PPC_INDIRECT_TYPE_BIG_ENDIAN was set.
Also, we need to or in additional flags rather than just doing a
direct assignment.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
arch/powerpc/sysdev/fsl_pci.c | 2 +-
arch/powerpc/sysdev/indirect_pci.c | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index 51c2233..8712227 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -216,7 +216,7 @@ int __init fsl_add_bridge(struct device_node *dev, int is_primary)
/* check PCI express link status */
if (early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP)) {
- hose->indirect_type = PPC_INDIRECT_TYPE_EXT_REG |
+ hose->indirect_type |= PPC_INDIRECT_TYPE_EXT_REG |
PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS;
if (fsl_pcie_check_link(hose))
hose->indirect_type |= PPC_INDIRECT_TYPE_NO_PCIE_LINK;
diff --git a/arch/powerpc/sysdev/indirect_pci.c b/arch/powerpc/sysdev/indirect_pci.c
index a8ac2df..5294560 100644
--- a/arch/powerpc/sysdev/indirect_pci.c
+++ b/arch/powerpc/sysdev/indirect_pci.c
@@ -160,4 +160,5 @@ setup_indirect_pci(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data, u32
mbase = ioremap(cfg_data & PAGE_MASK, PAGE_SIZE);
hose->cfg_data = mbase + (cfg_data & ~PAGE_MASK);
hose->ops = &indirect_pci_ops;
+ hose->indirect_type = flags;
}
--
1.5.2.2
^ permalink raw reply related
* [PATCH 0/8] Fixes for 2.6.23
From: Kumar Gala @ 2007-07-26 6:32 UTC (permalink / raw)
To: linuxppc-dev
Here are the individual patches in my for-2.6.23 branch. Posting them
here for completeness.
- k
^ permalink raw reply
* Please pull from 'fixes-2.6.23' branch
From: Kumar Gala @ 2007-07-26 6:28 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
Please pull from 'fixes-2.6.23' branch of
master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git fixes-2.6.23
to receive the following updates:
arch/powerpc/Kconfig.debug | 2 +-
arch/powerpc/boot/dts/mpc7448hpc2.dts | 2 +-
arch/powerpc/boot/dts/mpc8544ds.dts | 8 ++++++++
arch/powerpc/boot/dts/mpc8568mds.dts | 6 ++++++
arch/powerpc/kernel/irq.c | 8 ++++----
arch/powerpc/kernel/pci-common.c | 2 +-
arch/powerpc/kernel/pci_32.c | 20 +++++++++++++++++++-
arch/powerpc/kernel/process.c | 4 ++++
arch/powerpc/kernel/udbg.c | 2 +-
arch/powerpc/sysdev/fsl_pci.c | 4 ++--
arch/powerpc/sysdev/indirect_pci.c | 1 +
11 files changed, 48 insertions(+), 11 deletions(-)
Kumar Gala (6):
[POWERPC] Fix PCI indirect for big-endian cfg_addr
[POWERPC] Don't try to allocate resources for a Freescale POWERPC PHB
[POWERPC] Fix ethernet PHY support on MPC8544 DS
[POWREPC] Fixup a number of modpost warnings on ppc32
[POWERPC] Only allow building of BootX text support on PPC_MULTIPLATFORM
[POWERPC] Fix register labels on show_regs() message for 4xx/Book-E
Roy Zang (2):
[POWERPC] Fix mpc7448hpc2 tsi108 device_type bug
[POWERPC] Fix the ability to reset on MPC8544 DS and MPC8568 MDS boards
^ permalink raw reply
* Re: [PATCH] POWERPC: Fix definition of global-utilites structure for 86xx
From: Kumar Gala @ 2007-07-26 6:08 UTC (permalink / raw)
To: Timur Tabi; +Cc: linuxppc-dev
In-Reply-To: <11853846332917-git-send-email-timur@freescale.com>
On Jul 25, 2007, at 12:30 PM, Timur Tabi wrote:
> The current definition of struct ccsr_guts in immap_86xx.h was for
> 85xx.
> This patch fixes that and replaces the vague integer types with
> sized types
> of the correct endianness. The unused struct ccsr_pci is also
> deleted.
>
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
> include/asm-powerpc/immap_86xx.h | 151 +++++++++++
> +--------------------------
> 1 files changed, 46 insertions(+), 105 deletions(-)
Why don't we remove this completely, nothing uses it?
- k
^ permalink raw reply
* [PATCH] gfar: Fix modpost warning
From: Kumar Gala @ 2007-07-26 5:52 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev, linuxppc-dev
Fix the following modpost warning:
WARNING: vmlinux.o(.init.text+0x1aa6c): Section mismatch: reference to .exit.text:gfar_mdio_exit (between 'gfar_init' and 'gfar_mdio_init')
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
drivers/net/gianfar_mii.c | 2 +-
drivers/net/gianfar_mii.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/gianfar_mii.c b/drivers/net/gianfar_mii.c
index ac3596f..100bf41 100644
--- a/drivers/net/gianfar_mii.c
+++ b/drivers/net/gianfar_mii.c
@@ -245,7 +245,7 @@ int __init gfar_mdio_init(void)
return driver_register(&gianfar_mdio_driver);
}
-void __exit gfar_mdio_exit(void)
+void gfar_mdio_exit(void)
{
driver_unregister(&gianfar_mdio_driver);
}
diff --git a/drivers/net/gianfar_mii.h b/drivers/net/gianfar_mii.h
index 5d34004..b373091 100644
--- a/drivers/net/gianfar_mii.h
+++ b/drivers/net/gianfar_mii.h
@@ -42,5 +42,5 @@ struct gfar_mii {
int gfar_mdio_read(struct mii_bus *bus, int mii_id, int regnum);
int gfar_mdio_write(struct mii_bus *bus, int mii_id, int regnum, u16 value);
int __init gfar_mdio_init(void);
-void __exit gfar_mdio_exit(void);
+void gfar_mdio_exit(void);
#endif /* GIANFAR_PHY_H */
--
1.5.2.2
^ permalink raw reply related
* Re: [PATCH] fix ppc kernels after build-id addition
From: Paul Mackerras @ 2007-07-26 5:01 UTC (permalink / raw)
To: Meelis Roos; +Cc: linuxppc-dev, Linux Kernel list
In-Reply-To: <Pine.SOC.4.64.0707251301200.21641@math.ut.ee>
Meelis Roos writes:
> This patch fixes arch/ppc kernels, at least for prep subarch, after
> build-id addition. Without the patch, kernels were 3 times the size and
> bootloader refused to load them. Now they are back to normal again.
I just built an ARCH=ppc kernel for the prep subarch and the vmlinux
size was normal. Can you identify exactly why the kernels got so much
bigger, i.e. what is taking up all the space?
Paul.
^ permalink raw reply
* [PATCH 3/3] powerpc: Fix Maple platform ISA bus
From: Benjamin Herrenschmidt @ 2007-07-26 4:07 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
The Maple platform has ISA IOs but didn't call the new functions to
actually map those, thus crashing when trying to access the nvram.
This fixes Maple and js2x using SLOF
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
arch/powerpc/platforms/maple/pci.c | 3 +++
1 file changed, 3 insertions(+)
Index: linux-work/arch/powerpc/platforms/maple/pci.c
===================================================================
--- linux-work.orig/arch/powerpc/platforms/maple/pci.c 2007-07-25 16:29:22.000000000 +1000
+++ linux-work/arch/powerpc/platforms/maple/pci.c 2007-07-26 10:30:43.000000000 +1000
@@ -490,6 +490,9 @@ static int __init maple_add_bridge(struc
/* Fixup "bus-range" OF property */
fixup_bus_range(dev);
+ /* Check for legacy IOs */
+ isa_bridge_find_early(hose);
+
return 0;
}
^ permalink raw reply
* [PATCH 2/3] powerpc: Make pci_iounmap actually unmap things
From: Benjamin Herrenschmidt @ 2007-07-26 4:07 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
This patch uses the newly added functions for testing if an address is
an ISA or PCI IO port to properly unmap things in pci_iounmap that
aren't such ports. Without that, drivers using the iomap API will never
actually unmap resources which on IBM server machines will prevent
hot-unplug of the corresponding HW adapters.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
arch/powerpc/kernel/iomap.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
Index: linux-work/arch/powerpc/kernel/iomap.c
===================================================================
--- linux-work.orig/arch/powerpc/kernel/iomap.c 2007-07-26 13:44:23.000000000 +1000
+++ linux-work/arch/powerpc/kernel/iomap.c 2007-07-26 13:50:48.000000000 +1000
@@ -7,6 +7,7 @@
#include <linux/pci.h>
#include <linux/mm.h>
#include <asm/io.h>
+#include <asm/pci-bridge.h>
/*
* Here comes the ppc64 implementation of the IOMAP
@@ -136,7 +137,12 @@ void __iomem *pci_iomap(struct pci_dev *
void pci_iounmap(struct pci_dev *dev, void __iomem *addr)
{
- /* Nothing to do */
+ if (isa_vaddr_is_ioport(addr))
+ return;
+ if (pcibios_vaddr_is_ioport(addr))
+ return;
+ iounmap(addr);
}
+
EXPORT_SYMBOL(pci_iomap);
EXPORT_SYMBOL(pci_iounmap);
^ permalink raw reply
* [PATCH 1/3] powerpc: Add function to check if address is an IO port
From: Benjamin Herrenschmidt @ 2007-07-26 4:07 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
This adds a function that tells you if a given kernel virtual address
is hitting a PCI or ISA IO port permanent mapping or not. This is to
be used in the next patch to fix iomap APIs to properly unmap things.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
arch/powerpc/kernel/pci-common.c | 23 +++++++++++++++++++++++
include/asm-powerpc/pci-bridge.h | 20 ++++++++++++++++++++
2 files changed, 43 insertions(+)
Index: linux-work/arch/powerpc/kernel/pci-common.c
===================================================================
--- linux-work.orig/arch/powerpc/kernel/pci-common.c 2007-07-26 13:21:41.000000000 +1000
+++ linux-work/arch/powerpc/kernel/pci-common.c 2007-07-26 13:38:48.000000000 +1000
@@ -101,6 +101,29 @@ void pcibios_free_controller(struct pci_
kfree(phb);
}
+int pcibios_vaddr_is_ioport(void __iomem *address)
+{
+ int ret = 0;
+ struct pci_controller *hose;
+ unsigned long size;
+
+ spin_lock(&hose_spinlock);
+ list_for_each_entry(hose, &hose_list, list_node) {
+#ifdef CONFIG_PPC64
+ size = hose->pci_io_size;
+#else
+ size = hose->io_resource.end - hose->io_resource.start + 1;
+#endif
+ if (address >= hose->io_base_virt &&
+ address < (hose->io_base_virt + size)) {
+ ret = 1;
+ break;
+ }
+ }
+ spin_unlock(&hose_spinlock);
+ return ret;
+}
+
/*
* Return the domain number for this bus.
*/
Index: linux-work/include/asm-powerpc/pci-bridge.h
===================================================================
--- linux-work.orig/include/asm-powerpc/pci-bridge.h 2007-07-26 13:21:41.000000000 +1000
+++ linux-work/include/asm-powerpc/pci-bridge.h 2007-07-26 14:01:01.000000000 +1000
@@ -64,6 +64,14 @@ static inline struct pci_controller *pci
return bus->sysdata;
}
+static inline int isa_vaddr_is_ioport(void __iomem *address)
+{
+ /* No specific ISA handling on ppc32 at this stage, it
+ * all goes through PCI
+ */
+ return 0;
+}
+
/* These are used for config access before all the PCI probing
has been done. */
int early_read_config_byte(struct pci_controller *hose, int bus, int dev_fn,
@@ -231,6 +239,13 @@ extern void pcibios_free_controller(stru
extern void isa_bridge_find_early(struct pci_controller *hose);
+static inline int isa_vaddr_is_ioport(void __iomem *address)
+{
+ /* Check if address hits the reserved legacy IO range */
+ unsigned long ea = (unsigned long)address;
+ return ea >= ISA_IO_BASE && ea < ISA_IO_END;
+}
+
extern int pcibios_unmap_io_space(struct pci_bus *bus);
extern int pcibios_map_io_space(struct pci_bus *bus);
@@ -261,11 +276,16 @@ extern struct pci_controller *
pcibios_alloc_controller(struct device_node *dev);
#ifdef CONFIG_PCI
extern unsigned long pci_address_to_pio(phys_addr_t address);
+extern int pcibios_vaddr_is_ioport(void __iomem *address);
#else
static inline unsigned long pci_address_to_pio(phys_addr_t address)
{
return (unsigned long)-1;
}
+static inline int pcibios_vaddr_is_ioport(void __iomem *address)
+{
+ return 0;
+}
#endif
^ permalink raw reply
* [PATCH v2][POWERPC] Don't try to allocate resources for a POWERPC PHB
From: Kumar Gala @ 2007-07-26 3:47 UTC (permalink / raw)
To: linuxppc-dev
>From e314b31e4650c789829bf870f83ee7ae4be46426 Mon Sep 17 00:00:00 2001
From: Kumar Gala <galak@kernel.crashing.org>
Date: Wed, 25 Jul 2007 00:44:11 -0500
Subject: [PATCH] [POWERPC] Don't try to allocate resources for a POWERPC PHB
The Freescale PCI PHBs actual report back values in the BAR registers
this causes issues in that we try to allocate resources for them
and will get error messages like the following on MPC8544 DS:
PCI: Failed to allocate mem resource #1:80000000@0 for 0000:00:00.0
To address this if we are class PCI_CLASS_PROCESSOR_POWERPC, a normal
header type, and the PHB we clear out all the resources.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
Ben suggested to do this by a quirk and blow away the resources which I
like better.
- k
arch/powerpc/kernel/pci_32.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index 721a694..ec80779 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -60,6 +60,24 @@ LIST_HEAD(hose_list);
static int pci_bus_count;
static void
+fixup_broken_fsl(struct pci_dev* dev)
+{
+ int i, class = dev->class >> 8;
+
+ if ((class == PCI_CLASS_PROCESSOR_POWERPC) &&
+ (dev->hdr_type == PCI_HEADER_TYPE_NORMAL) &&
+ (dev->bus->parent == NULL)) {
+ for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
+ dev->resource[i].start = 0;
+ dev->resource[i].end = 0;
+ dev->resource[i].flags = 0;
+ }
+ }
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MOTOROLA, PCI_ANY_ID, fixup_broken_fsl);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_FREESCALE, PCI_ANY_ID, fixup_broken_fsl);
+
+static void
fixup_broken_pcnet32(struct pci_dev* dev)
{
if ((dev->class>>8 == PCI_CLASS_NETWORK_ETHERNET)) {
--
1.5.2.2
^ permalink raw reply related
* Re: [PATCH] Re: 2.6.22-git hangs during boot on PowerBook G3 in 0.0 seconds
From: Paul Mackerras @ 2007-07-26 3:42 UTC (permalink / raw)
To: Kim Phillips; +Cc: Rutger Nijlunsing, linuxppc-dev
In-Reply-To: <20070724185946.722f34b5.kim.phillips@freescale.com>
Kim Phillips writes:
> > In which circumstances are you trying to translate an address with no
> > size cell ?
>
> for the enumerated PHYs. As the original commit comment states, I was
> getting these messages:
>
> prom_parse: Bad cell count for /qe@e0100000/mdio@2120/ethernet-phy@00
> prom_parse: Bad cell count for /qe@e0100000/mdio@2120/ethernet-phy@01
Specifically, which of_address_to_resource or other call is producing
these error messages?
Paul.
^ permalink raw reply
* Re: [PATCH] Re: 2.6.22-git hangs during boot on PowerBook G3 in 0.0 seconds
From: Paul Mackerras @ 2007-07-26 3:31 UTC (permalink / raw)
To: Kim Phillips; +Cc: Rutger Nijlunsing, linuxppc-dev
In-Reply-To: <20070724185946.722f34b5.kim.phillips@freescale.com>
Kim Phillips writes:
> but yeah, size-cells should be allowed to be 0 (even address-cells) and
> it may be the case that the Lombard needs some fixup code.
So it turns out that the nvram is under the via-pmu node on the
Lombard. The via-pmu node has #size-cells == 0, which is correct
since things under the via-pmu aren't directly accessible. The nvram
driver code relies on not being able to translate an address for the
nvram nodes on machines where the nvram isn't directly accessible.
That is, it looks for "nvram" nodes, and if it can translate the
address, assumes it can access the nvram directly.
So nothing is incorrect here except your patch. :) I'll revert it.
Paul.
^ permalink raw reply
* Re: DTC 1.0.0 Release Coming?
From: David Gibson @ 2007-07-26 3:05 UTC (permalink / raw)
To: Jon Loeliger; +Cc: linuxppc-dev
In-Reply-To: <E1IDjSy-0003eC-T4@jdl.com>
On Wed, Jul 25, 2007 at 11:12:00AM -0500, Jon Loeliger wrote:
> Folks,
>
> I'd like to make an official DTC Version 1.0.0 release soon!
> To that end, I've published a repo on jdl.com with a v1.0.0-rc1
> tag on it. I anticipate some updates to the Documentation before
> a final 1.0.0 release still. However, if you have something
> you would like to have be in The Real 1.0.0 release, please
> let me know soon!
It would certainly be great to have a release, since dtc is becoming
necessary for more and more kernel builds.
Only thing I'm not really happy with in the current release is the
versioning stuff. For starters, it always reports my builds as
-dirty, even when they're not. It also seems a bit hideously
complicated for what it does. I'd prefer to see something simpler
using git-describe to derive the version strings directly from the git
tags themselves. Obviously we need some sort of cacheing mechanism to
make the versioning work for tarball releases without the git history,
but I think we can handle that with a suitable "make dist" target.
I'll see if I can make a patch or two in the next few days.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: [PATCH] [POWERPC] iSeries: fix section mismatch warnings
From: Stephen Rothwell @ 2007-07-26 1:56 UTC (permalink / raw)
To: will_schmidt; +Cc: ppc-dev, paulus
In-Reply-To: <1185382531.22237.46.camel@farscape.rchland.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 1180 bytes --]
Hi Will,
On Wed, 25 Jul 2007 11:55:31 -0500 Will Schmidt <will_schmidt@vnet.ibm.com> wrote:
>
> > cmpwi 0,r24,0 /* Are we processor 0? */
> > - beq .__start_initialization_iSeries /* Start up the first processor */
> > - mfspr r4,SPRN_CTRLF
> > + bne 1f
> > + b .__start_initialization_iSeries /* Start up the first processor */
> > +1: mfspr r4,SPRN_CTRLF
> > li r5,CTRL_RUNLATCH /* Turn off the run light */
>
> This part isnt clicking for me..
> How does changing a "beq" to a "bne" over a "b" fit into changing
> __start_initialization_iSeries static?
Because I moved __start_initialization_iSeries into another section, it
ends up too far away for a conditional branch so something adds a jump
table to the .text section and changes this branch to be via that table.
Unfortunately, the jump table ends up at the start of the .text and ruins
our carefully laid out kernel image. By inverting the test I can turn
the branch into an unconditional one which has a larger possible offse
(effectively building the jump table manually).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: [PATCH] Fix ibmvscsi client for multiplatform iSeries+pSeries kernel.
From: Michael Ellerman @ 2007-07-26 1:27 UTC (permalink / raw)
To: David Woodhouse; +Cc: Stephen Rothwell, Paul Mackerras, linuxppc-dev
In-Reply-To: <1185374509.14697.384.camel@pmac.infradead.org>
[-- Attachment #1: Type: text/plain, Size: 18694 bytes --]
On Wed, 2007-07-25 at 15:41 +0100, David Woodhouse wrote:
> If you build a multiplatform kernel for iSeries and pSeries, with
> ibmvscsic support, the resulting client doesn't work on iSeries.
>
> This patch should fix that, using the appropriate low-level operations
> for the machine detected at runtime.
>
> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Nice that someone finally fixed this up.
But I get:
drivers/scsi/ibmvscsi/ibmvscsi.c:1651: error: 'FW_FEATURE_ISERIES' undeclared (first use in this function)
drivers/scsi/ibmvscsi/ibmvscsi.c:1651: error: (Each undeclared identifier is reported only once
drivers/scsi/ibmvscsi/ibmvscsi.c:1651: error: for each function it appears in.)
drivers/scsi/ibmvscsi/ibmvscsi.c:1653: error: 'FW_FEATURE_VIO' undeclared (first use in this function)
Missing <asm/firmware.h> ?
cheers
> --- linux-2.6.19.ppc64/drivers/scsi/ibmvscsi/rpa_vscsi.c~ 2006-11-29 21:57:37.000000000 +0000
> +++ linux-2.6.19.ppc64/drivers/scsi/ibmvscsi/rpa_vscsi.c 2006-12-19 15:42:57.000000000 +0000
> @@ -42,14 +42,14 @@ static unsigned int partition_number = -
> * Routines for managing the command/response queue
> */
> /**
> - * ibmvscsi_handle_event: - Interrupt handler for crq events
> + * rpavscsi_handle_event: - Interrupt handler for crq events
> * @irq: number of irq to handle, not used
> * @dev_instance: ibmvscsi_host_data of host that received interrupt
> *
> * Disables interrupts and schedules srp_task
> * Always returns IRQ_HANDLED
> */
> -static irqreturn_t ibmvscsi_handle_event(int irq, void *dev_instance)
> +static irqreturn_t rpavscsi_handle_event(int irq, void *dev_instance)
> {
> struct ibmvscsi_host_data *hostdata =
> (struct ibmvscsi_host_data *)dev_instance;
> @@ -66,9 +66,9 @@ static irqreturn_t ibmvscsi_handle_event
> * Frees irq, deallocates a page for messages, unmaps dma, and unregisters
> * the crq with the hypervisor.
> */
> -void ibmvscsi_release_crq_queue(struct crq_queue *queue,
> - struct ibmvscsi_host_data *hostdata,
> - int max_requests)
> +static void rpavscsi_release_crq_queue(struct crq_queue *queue,
> + struct ibmvscsi_host_data *hostdata,
> + int max_requests)
> {
> long rc;
> struct vio_dev *vdev = to_vio_dev(hostdata->dev);
> @@ -108,12 +108,13 @@ static struct viosrp_crq *crq_queue_next
> }
>
> /**
> - * ibmvscsi_send_crq: - Send a CRQ
> + * rpavscsi_send_crq: - Send a CRQ
> * @hostdata: the adapter
> * @word1: the first 64 bits of the data
> * @word2: the second 64 bits of the data
> */
> -int ibmvscsi_send_crq(struct ibmvscsi_host_data *hostdata, u64 word1, u64 word2)
> +static int rpavscsi_send_crq(struct ibmvscsi_host_data *hostdata,
> + u64 word1, u64 word2)
> {
> struct vio_dev *vdev = to_vio_dev(hostdata->dev);
>
> @@ -121,10 +122,10 @@ int ibmvscsi_send_crq(struct ibmvscsi_ho
> }
>
> /**
> - * ibmvscsi_task: - Process srps asynchronously
> + * rpavscsi_task: - Process srps asynchronously
> * @data: ibmvscsi_host_data of host
> */
> -static void ibmvscsi_task(void *data)
> +static void rpavscsi_task(void *data)
> {
> struct ibmvscsi_host_data *hostdata = (struct ibmvscsi_host_data *)data;
> struct vio_dev *vdev = to_vio_dev(hostdata->dev);
> @@ -189,6 +190,42 @@ static void set_adapter_info(struct ibmv
> }
>
> /**
> + * reset_crq_queue: - resets a crq after a failure
> + * @queue: crq_queue to initialize and register
> + * @hostdata: ibmvscsi_host_data of host
> + *
> + */
> +static int rpavscsi_reset_crq_queue(struct crq_queue *queue,
> + struct ibmvscsi_host_data *hostdata)
> +{
> + int rc;
> + struct vio_dev *vdev = to_vio_dev(hostdata->dev);
> +
> + /* Close the CRQ */
> + do {
> + rc = plpar_hcall_norets(H_FREE_CRQ, vdev->unit_address);
> + } while ((rc == H_BUSY) || (H_IS_LONG_BUSY(rc)));
> +
> + /* Clean out the queue */
> + memset(queue->msgs, 0x00, PAGE_SIZE);
> + queue->cur = 0;
> +
> + set_adapter_info(hostdata);
> +
> + /* And re-open it again */
> + rc = plpar_hcall_norets(H_REG_CRQ,
> + vdev->unit_address,
> + queue->msg_token, PAGE_SIZE);
> + if (rc == 2) {
> + /* Adapter is good, but other end is not ready */
> + printk(KERN_WARNING "ibmvscsi: Partner adapter not ready\n");
> + } else if (rc != 0) {
> + printk(KERN_WARNING
> + "ibmvscsi: couldn't register crq--rc 0x%x\n", rc);
> + }
> + return rc;
> +}
> +/**
> * initialize_crq_queue: - Initializes and registers CRQ with hypervisor
> * @queue: crq_queue to initialize and register
> * @hostdata: ibmvscsi_host_data of host
> @@ -197,9 +234,9 @@ static void set_adapter_info(struct ibmv
> * the crq with the hypervisor.
> * Returns zero on success.
> */
> -int ibmvscsi_init_crq_queue(struct crq_queue *queue,
> - struct ibmvscsi_host_data *hostdata,
> - int max_requests)
> +static int rpavscsi_init_crq_queue(struct crq_queue *queue,
> + struct ibmvscsi_host_data *hostdata,
> + int max_requests)
> {
> int rc;
> int retrc;
> @@ -226,7 +263,7 @@ int ibmvscsi_init_crq_queue(struct crq_q
> queue->msg_token, PAGE_SIZE);
> if (rc == H_RESOURCE)
> /* maybe kexecing and resource is busy. try a reset */
> - rc = ibmvscsi_reset_crq_queue(queue,
> + rc = rpavscsi_reset_crq_queue(queue,
> hostdata);
>
> if (rc == 2) {
> @@ -239,7 +276,7 @@ int ibmvscsi_init_crq_queue(struct crq_q
> }
>
> if (request_irq(vdev->irq,
> - ibmvscsi_handle_event,
> + rpavscsi_handle_event,
> 0, "ibmvscsi", (void *)hostdata) != 0) {
> printk(KERN_ERR "ibmvscsi: couldn't register irq 0x%x\n",
> vdev->irq);
> @@ -256,7 +293,7 @@ int ibmvscsi_init_crq_queue(struct crq_q
> queue->cur = 0;
> spin_lock_init(&queue->lock);
>
> - tasklet_init(&hostdata->srp_task, (void *)ibmvscsi_task,
> + tasklet_init(&hostdata->srp_task, (void *)rpavscsi_task,
> (unsigned long)hostdata);
>
> return retrc;
> @@ -281,8 +318,8 @@ int ibmvscsi_init_crq_queue(struct crq_q
> * @hostdata: ibmvscsi_host_data of host
> *
> */
> -int ibmvscsi_reenable_crq_queue(struct crq_queue *queue,
> - struct ibmvscsi_host_data *hostdata)
> +static int rpavscsi_reenable_crq_queue(struct crq_queue *queue,
> + struct ibmvscsi_host_data *hostdata)
> {
> int rc;
> struct vio_dev *vdev = to_vio_dev(hostdata->dev);
> @@ -297,39 +334,10 @@ int ibmvscsi_reenable_crq_queue(struct c
> return rc;
> }
>
> -/**
> - * reset_crq_queue: - resets a crq after a failure
> - * @queue: crq_queue to initialize and register
> - * @hostdata: ibmvscsi_host_data of host
> - *
> - */
> -int ibmvscsi_reset_crq_queue(struct crq_queue *queue,
> - struct ibmvscsi_host_data *hostdata)
> -{
> - int rc;
> - struct vio_dev *vdev = to_vio_dev(hostdata->dev);
> -
> - /* Close the CRQ */
> - do {
> - rc = plpar_hcall_norets(H_FREE_CRQ, vdev->unit_address);
> - } while ((rc == H_BUSY) || (H_IS_LONG_BUSY(rc)));
> -
> - /* Clean out the queue */
> - memset(queue->msgs, 0x00, PAGE_SIZE);
> - queue->cur = 0;
> -
> - set_adapter_info(hostdata);
> -
> - /* And re-open it again */
> - rc = plpar_hcall_norets(H_REG_CRQ,
> - vdev->unit_address,
> - queue->msg_token, PAGE_SIZE);
> - if (rc == 2) {
> - /* Adapter is good, but other end is not ready */
> - printk(KERN_WARNING "ibmvscsi: Partner adapter not ready\n");
> - } else if (rc != 0) {
> - printk(KERN_WARNING
> - "ibmvscsi: couldn't register crq--rc 0x%x\n", rc);
> - }
> - return rc;
> -}
> +struct ibmvscsi_ops rpavscsi_ops = {
> + .init_crq_queue = rpavscsi_init_crq_queue,
> + .release_crq_queue = rpavscsi_release_crq_queue,
> + .reset_crq_queue = rpavscsi_reset_crq_queue,
> + .reenable_crq_queue = rpavscsi_reenable_crq_queue,
> + .send_crq = rpavscsi_send_crq,
> +};
> --- linux-2.6.19.ppc64/drivers/scsi/ibmvscsi/ibmvscsi.c~ 2006-11-29 21:57:37.000000000 +0000
> +++ linux-2.6.19.ppc64/drivers/scsi/ibmvscsi/ibmvscsi.c 2006-12-19 15:53:59.000000000 +0000
> @@ -89,6 +89,8 @@ static int max_requests = 50;
>
> #define IBMVSCSI_VERSION "1.5.8"
>
> +static struct ibmvscsi_ops *ibmvscsi_ops;
> +
> MODULE_DESCRIPTION("IBM Virtual SCSI");
> MODULE_AUTHOR("Dave Boutcher");
> MODULE_LICENSE("GPL");
> @@ -567,7 +569,7 @@ static int ibmvscsi_send_srp_event(struc
> list_add_tail(&evt_struct->list, &hostdata->sent);
>
> if ((rc =
> - ibmvscsi_send_crq(hostdata, crq_as_u64[0], crq_as_u64[1])) != 0) {
> + ibmvscsi_ops->send_crq(hostdata, crq_as_u64[0], crq_as_u64[1])) != 0) {
> list_del(&evt_struct->list);
>
> printk(KERN_ERR "ibmvscsi: send error %d\n",
> @@ -1183,8 +1185,8 @@ void ibmvscsi_handle_crq(struct viosrp_c
> case 0x01: /* Initialization message */
> printk(KERN_INFO "ibmvscsi: partner initialized\n");
> /* Send back a response */
> - if (ibmvscsi_send_crq(hostdata,
> - 0xC002000000000000LL, 0) == 0) {
> + if (ibmvscsi_ops->send_crq(hostdata,
> + 0xC002000000000000LL, 0) == 0) {
> /* Now login */
> send_srp_login(hostdata);
> } else {
> @@ -1212,10 +1214,10 @@ void ibmvscsi_handle_crq(struct viosrp_c
> printk(KERN_INFO
> "ibmvscsi: Re-enabling adapter!\n");
> purge_requests(hostdata, DID_REQUEUE);
> - if ((ibmvscsi_reenable_crq_queue(&hostdata->queue,
> - hostdata)) ||
> - (ibmvscsi_send_crq(hostdata,
> - 0xC001000000000000LL, 0))) {
> + if ((ibmvscsi_ops->reenable_crq_queue(&hostdata->queue,
> + hostdata)) ||
> + (ibmvscsi_ops->send_crq(hostdata,
> + 0xC001000000000000LL, 0))) {
> atomic_set(&hostdata->request_limit,
> -1);
> printk(KERN_ERR
> @@ -1228,10 +1230,10 @@ void ibmvscsi_handle_crq(struct viosrp_c
> crq->format);
>
> purge_requests(hostdata, DID_ERROR);
> - if ((ibmvscsi_reset_crq_queue(&hostdata->queue,
> - hostdata)) ||
> - (ibmvscsi_send_crq(hostdata,
> - 0xC001000000000000LL, 0))) {
> + if ((ibmvscsi_ops->reset_crq_queue(&hostdata->queue,
> + hostdata)) ||
> + (ibmvscsi_ops->send_crq(hostdata,
> + 0xC001000000000000LL, 0))) {
> atomic_set(&hostdata->request_limit,
> -1);
> printk(KERN_ERR
> @@ -1517,7 +1519,7 @@ static int ibmvscsi_probe(struct vio_dev
> atomic_set(&hostdata->request_limit, -1);
> hostdata->host->max_sectors = 32 * 8; /* default max I/O 32 pages */
>
> - rc = ibmvscsi_init_crq_queue(&hostdata->queue, hostdata, max_requests);
> + rc = ibmvscsi_ops->init_crq_queue(&hostdata->queue, hostdata, max_requests);
> if (rc != 0 && rc != H_RESOURCE) {
> printk(KERN_ERR "ibmvscsi: couldn't initialize crq\n");
> goto init_crq_failed;
> @@ -1538,7 +1540,7 @@ static int ibmvscsi_probe(struct vio_dev
> * to fail if the other end is not acive. In that case we don't
> * want to scan
> */
> - if (ibmvscsi_send_crq(hostdata, 0xC001000000000000LL, 0) == 0
> + if (ibmvscsi_ops->send_crq(hostdata, 0xC001000000000000LL, 0) == 0
> || rc == H_RESOURCE) {
> /*
> * Wait around max init_timeout secs for the adapter to finish
> @@ -1564,7 +1566,7 @@ static int ibmvscsi_probe(struct vio_dev
> add_host_failed:
> release_event_pool(&hostdata->pool, hostdata);
> init_pool_failed:
> - ibmvscsi_release_crq_queue(&hostdata->queue, hostdata, max_requests);
> + ibmvscsi_ops->release_crq_queue(&hostdata->queue, hostdata, max_requests);
> init_crq_failed:
> scsi_host_put(host);
> scsi_host_alloc_failed:
> @@ -1575,8 +1577,8 @@ static int ibmvscsi_remove(struct vio_de
> {
> struct ibmvscsi_host_data *hostdata = vdev->dev.driver_data;
> release_event_pool(&hostdata->pool, hostdata);
> - ibmvscsi_release_crq_queue(&hostdata->queue, hostdata,
> - max_requests);
> + ibmvscsi_ops->release_crq_queue(&hostdata->queue, hostdata,
> + max_requests);
>
> scsi_remove_host(hostdata->host);
> scsi_host_put(hostdata->host);
> @@ -1606,6 +1608,13 @@ static struct vio_driver ibmvscsi_driver
>
> int __init ibmvscsi_module_init(void)
> {
> + if (firmware_has_feature(FW_FEATURE_ISERIES))
> + ibmvscsi_ops = &iseriesvscsi_ops;
> + else if (firmware_has_feature(FW_FEATURE_VIO))
> + ibmvscsi_ops = &rpavscsi_ops;
> + else
> + return -ENODEV;
> +
> return vio_register_driver(&ibmvscsi_driver);
> }
>
> --- linux-2.6.19.ppc64/drivers/scsi/ibmvscsi/ibmvscsi.h~ 2006-11-29 21:57:37.000000000 +0000
> +++ linux-2.6.19.ppc64/drivers/scsi/ibmvscsi/ibmvscsi.h 2006-12-19 15:54:18.000000000 +0000
> @@ -94,21 +94,25 @@ struct ibmvscsi_host_data {
> };
>
> /* routines for managing a command/response queue */
> -int ibmvscsi_init_crq_queue(struct crq_queue *queue,
> - struct ibmvscsi_host_data *hostdata,
> - int max_requests);
> -void ibmvscsi_release_crq_queue(struct crq_queue *queue,
> - struct ibmvscsi_host_data *hostdata,
> - int max_requests);
> -int ibmvscsi_reset_crq_queue(struct crq_queue *queue,
> - struct ibmvscsi_host_data *hostdata);
> -
> -int ibmvscsi_reenable_crq_queue(struct crq_queue *queue,
> - struct ibmvscsi_host_data *hostdata);
> -
> void ibmvscsi_handle_crq(struct viosrp_crq *crq,
> struct ibmvscsi_host_data *hostdata);
> -int ibmvscsi_send_crq(struct ibmvscsi_host_data *hostdata,
> - u64 word1, u64 word2);
> +
> +struct ibmvscsi_ops {
> + int (*init_crq_queue)(struct crq_queue *queue,
> + struct ibmvscsi_host_data *hostdata,
> + int max_requests);
> + void (*release_crq_queue)(struct crq_queue *queue,
> + struct ibmvscsi_host_data *hostdata,
> + int max_requests);
> + int (*reset_crq_queue)(struct crq_queue *queue,
> + struct ibmvscsi_host_data *hostdata);
> + int (*reenable_crq_queue)(struct crq_queue *queue,
> + struct ibmvscsi_host_data *hostdata);
> + int (*send_crq)(struct ibmvscsi_host_data *hostdata,
> + u64 word1, u64 word2);
> +};
> +
> +extern struct ibmvscsi_ops iseriesvscsi_ops;
> +extern struct ibmvscsi_ops rpavscsi_ops;
>
> #endif /* IBMVSCSI_H */
> --- linux-2.6.19.ppc64/drivers/scsi/ibmvscsi/iseries_vscsi.c~ 2006-11-29 21:57:37.000000000 +0000
> +++ linux-2.6.19.ppc64/drivers/scsi/ibmvscsi/iseries_vscsi.c 2006-12-19 15:47:03.000000000 +0000
> @@ -53,7 +53,7 @@ struct srp_lp_event {
> /**
> * standard interface for handling logical partition events.
> */
> -static void ibmvscsi_handle_event(struct HvLpEvent *lpevt)
> +static void iseriesvscsi_handle_event(struct HvLpEvent *lpevt)
> {
> struct srp_lp_event *evt = (struct srp_lp_event *)lpevt;
>
> @@ -74,9 +74,9 @@ static void ibmvscsi_handle_event(struct
> /* ------------------------------------------------------------
> * Routines for driver initialization
> */
> -int ibmvscsi_init_crq_queue(struct crq_queue *queue,
> - struct ibmvscsi_host_data *hostdata,
> - int max_requests)
> +static int iseriesvscsi_init_crq_queue(struct crq_queue *queue,
> + struct ibmvscsi_host_data *hostdata,
> + int max_requests)
> {
> int rc;
>
> @@ -88,7 +88,7 @@ int ibmvscsi_init_crq_queue(struct crq_q
> goto viopath_open_failed;
> }
>
> - rc = vio_setHandler(viomajorsubtype_scsi, ibmvscsi_handle_event);
> + rc = vio_setHandler(viomajorsubtype_scsi, iseriesvscsi_handle_event);
> if (rc < 0) {
> printk("vio_setHandler failed with rc %d in open_event_path\n",
> rc);
> @@ -102,9 +102,9 @@ int ibmvscsi_init_crq_queue(struct crq_q
> return -1;
> }
>
> -void ibmvscsi_release_crq_queue(struct crq_queue *queue,
> - struct ibmvscsi_host_data *hostdata,
> - int max_requests)
> +static void iseriesvscsi_release_crq_queue(struct crq_queue *queue,
> + struct ibmvscsi_host_data *hostdata,
> + int max_requests)
> {
> vio_clearHandler(viomajorsubtype_scsi);
> viopath_close(viopath_hostLp, viomajorsubtype_scsi, max_requests);
> @@ -117,8 +117,8 @@ void ibmvscsi_release_crq_queue(struct c
> *
> * no-op for iSeries
> */
> -int ibmvscsi_reset_crq_queue(struct crq_queue *queue,
> - struct ibmvscsi_host_data *hostdata)
> +static int iseriesvscsi_reset_crq_queue(struct crq_queue *queue,
> + struct ibmvscsi_host_data *hostdata)
> {
> return 0;
> }
> @@ -130,19 +130,20 @@ int ibmvscsi_reset_crq_queue(struct crq_
> *
> * no-op for iSeries
> */
> -int ibmvscsi_reenable_crq_queue(struct crq_queue *queue,
> - struct ibmvscsi_host_data *hostdata)
> +static int iseriesvscsi_reenable_crq_queue(struct crq_queue *queue,
> + struct ibmvscsi_host_data *hostdata)
> {
> return 0;
> }
>
> /**
> - * ibmvscsi_send_crq: - Send a CRQ
> + * iseriesvscsi_send_crq: - Send a CRQ
> * @hostdata: the adapter
> * @word1: the first 64 bits of the data
> * @word2: the second 64 bits of the data
> */
> -int ibmvscsi_send_crq(struct ibmvscsi_host_data *hostdata, u64 word1, u64 word2)
> +static int iseriesvscsi_send_crq(struct ibmvscsi_host_data *hostdata,
> + u64 word1, u64 word2)
> {
> single_host_data = hostdata;
> return HvCallEvent_signalLpEventFast(viopath_hostLp,
> @@ -156,3 +157,11 @@ int ibmvscsi_send_crq(struct ibmvscsi_ho
> VIOVERSION << 16, word1, word2, 0,
> 0);
> }
> +
> +struct ibmvscsi_ops iseriesvscsi_ops = {
> + .init_crq_queue = iseriesvscsi_init_crq_queue,
> + .release_crq_queue = iseriesvscsi_release_crq_queue,
> + .reset_crq_queue = iseriesvscsi_reset_crq_queue,
> + .reenable_crq_queue = iseriesvscsi_reenable_crq_queue,
> + .send_crq = iseriesvscsi_send_crq,
> +};
> --- linux-2.6.19.ppc64/drivers/scsi/ibmvscsi/Makefile.orig 2007-01-01 20:06:26.000000000 +0000
> +++ linux-2.6.19.ppc64/drivers/scsi/ibmvscsi/Makefile 2007-01-01 20:06:35.000000000 +0000
> @@ -1,9 +1,7 @@
> obj-$(CONFIG_SCSI_IBMVSCSI) += ibmvscsic.o
>
> ibmvscsic-y += ibmvscsi.o
> -ifndef CONFIG_PPC_PSERIES
> ibmvscsic-$(CONFIG_PPC_ISERIES) += iseries_vscsi.o
> -endif
> ibmvscsic-$(CONFIG_PPC_PSERIES) += rpa_vscsi.o
>
> obj-$(CONFIG_SCSI_IBMVSCSIS) += ibmvstgt.o
>
>
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: [RFC 0/1] lro: Generic Large Receive Offload for TCP traffic
From: David Miller @ 2007-07-26 0:28 UTC (permalink / raw)
To: gallatin
Cc: tklein, jeff, themann, netdev, linux-kernel, raisch, linuxppc-dev,
ossthema, meder, stefan.roscher
In-Reply-To: <46A785C2.9090708@myri.com>
From: Andrew Gallatin <gallatin@myri.com>
Date: Wed, 25 Jul 2007 13:17:54 -0400
> I've ported myri10ge to use the new LRO interface. I have attached a
> preliminary patch to myri10ge. I'm very pleased to note that the
> performance is on-par with my own LRO used by our out-of-tree driver.
> (except when using mixed MTUS, see performance data below).
Thanks for posting this port and feedback on the generic LRO
code.
^ permalink raw reply
* Re: pte_offset_map for ppc assumes HIGHPTE
From: Benjamin Herrenschmidt @ 2007-07-26 0:18 UTC (permalink / raw)
To: Dave McCracken; +Cc: linux-mm, linux-kernel, linuxppc-dev
In-Reply-To: <200707251830.21944.dave.mccracken@oracle.com>
On Wed, 2007-07-25 at 18:30 -0500, Dave McCracken wrote:
> On Wednesday 25 July 2007, Benjamin Herrenschmidt wrote:
> > Depends... if you have CONFIG_HIGHMEM and not CONFIG_HIGHPTE, you are
> > wasting time going through kmap_atomic unnecessarily no ? it will probably
> > not do anything because the PTE page is in lowmem but still...
>
> Probably not much time. You still need to do the page to virtual translation,
> which kmap_atomic does for you.
Fair enough.
Ben.
^ permalink raw reply
* Re: pte_offset_map for ppc assumes HIGHPTE
From: Dave McCracken @ 2007-07-25 23:30 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linux-mm, linux-kernel, linuxppc-dev
In-Reply-To: <1185405765.5439.371.camel@localhost.localdomain>
On Wednesday 25 July 2007, Benjamin Herrenschmidt wrote:
> Depends... if you have CONFIG_HIGHMEM and not CONFIG_HIGHPTE, you are
> wasting time going through kmap_atomic unnecessarily no ? it will probably
> not do anything because the PTE page is in lowmem but still...
Probably not much time. You still need to do the page to virtual translation,
which kmap_atomic does for you.
Dave McCracken
^ permalink raw reply
* Re: pte_offset_map for ppc assumes HIGHPTE
From: Benjamin Herrenschmidt @ 2007-07-25 23:22 UTC (permalink / raw)
To: Andreas Schwab; +Cc: linuxppc-dev, linux-kernel, linux-mm
In-Reply-To: <jewswodqcn.fsf@sykes.suse.de>
On Thu, 2007-07-26 at 01:18 +0200, Andreas Schwab wrote:
> Satya <satyakiran@gmail.com> writes:
>
> > hello,
> > The implementation of pte_offset_map() for ppc assumes that PTEs are
> > kept in highmem (CONFIG_HIGHPTE). There is only one implmentation of
> > pte_offset_map() as follows (include/asm-ppc/pgtable.h):
> >
> > #define pte_offset_map(dir, addr) \
> > ((pte_t *) kmap_atomic(pmd_page(*(dir)), KM_PTE0) + pte_index(addr))
> >
> > Shouldn't this be made conditional according to CONFIG_HIGHPTE is
> > defined or not
>
> kmap_atomic is always defined with or without CONFIG_HIGHPTE.
>
> > (as implemented in include/asm-i386/pgtable.h) ?
>
> I don't think that needs it either.
Depends... if you have CONFIG_HIGHMEM and not CONFIG_HIGHPTE, you are wasting
time going through kmap_atomic unnecessarily no ? it will probably not do anything
because the PTE page is in lowmem but still...
Ben.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox