From 05dc7b613481c695bb4fc476c6fbb46364b63f62 Mon Sep 17 00:00:00 2001 From: Alexander Beregalov Date: Tue, 12 May 2009 13:28:23 +0200 Subject: viocd: needs to depend on BLOCK Fix this build error when CONFIG_BLOCK is not set: drivers/cdrom/viocd.c: In function 'viocd_blk_open': drivers/cdrom/viocd.c:156: error: dereferencing pointer to incomplete type drivers/cdrom/viocd.c: In function 'viocd_blk_release': drivers/cdrom/viocd.c:162: error: dereferencing pointer to incomplete type drivers/cdrom/viocd.c: In function 'viocd_blk_ioctl': drivers/cdrom/viocd.c:170: error: dereferencing pointer to incomplete type drivers/cdrom/viocd.c: In function 'viocd_blk_media_changed': drivers/cdrom/viocd.c:176: error: dereferencing pointer to incomplete type ... Signed-off-by: Alexander Beregalov Signed-off-by: Jens Axboe --- arch/powerpc/platforms/iseries/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/powerpc/platforms') diff --git a/arch/powerpc/platforms/iseries/Kconfig b/arch/powerpc/platforms/iseries/Kconfig index 647e8778743..47a20cfb448 100644 --- a/arch/powerpc/platforms/iseries/Kconfig +++ b/arch/powerpc/platforms/iseries/Kconfig @@ -17,6 +17,7 @@ config VIODASD config VIOCD tristate "iSeries Virtual I/O CD support" + depends on BLOCK select VIOPATH help If you are running Linux on an IBM iSeries system and you want to -- cgit v1.2.3-70-g09d2 From 514a30d95f3277b9abed6044272ea97431bb9658 Mon Sep 17 00:00:00 2001 From: Grant Likely Date: Thu, 14 May 2009 10:23:10 -0600 Subject: powerpc/virtex: Add uImage to the default images list It is common to use U-Boot on Xilinx Virtex platforms. This patch ensures that CONFIG_DEFAULT_UIMAGE is selected for virtex Signed-off-by: Grant Likely --- arch/powerpc/platforms/40x/Kconfig | 1 + arch/powerpc/platforms/44x/Kconfig | 1 + 2 files changed, 2 insertions(+) (limited to 'arch/powerpc/platforms') diff --git a/arch/powerpc/platforms/40x/Kconfig b/arch/powerpc/platforms/40x/Kconfig index 14e027f5be6..f39c953d535 100644 --- a/arch/powerpc/platforms/40x/Kconfig +++ b/arch/powerpc/platforms/40x/Kconfig @@ -153,6 +153,7 @@ config 405GPR config XILINX_VIRTEX bool + select DEFAULT_UIMAGE config XILINX_VIRTEX_II_PRO bool diff --git a/arch/powerpc/platforms/44x/Kconfig b/arch/powerpc/platforms/44x/Kconfig index bf5c7ff2e6e..0d83a6a0397 100644 --- a/arch/powerpc/platforms/44x/Kconfig +++ b/arch/powerpc/platforms/44x/Kconfig @@ -246,6 +246,7 @@ config IBM440EP_ERR42 # Xilinx specific config options. config XILINX_VIRTEX bool + select DEFAULT_UIMAGE # Xilinx Virtex 5 FXT FPGA architecture, selected by a Xilinx board above config XILINX_VIRTEX_5_FXT -- cgit v1.2.3-70-g09d2 From 397717c578a5e02cf76b6c99c68f50fee94b59f8 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell x Date: Wed, 6 May 2009 14:07:52 +0000 Subject: powerpc/iseries: Fix pci breakage due to bad dma_data initialization Commit 4fc665b88a79a45bae8bbf3a05563c27c7337c3d "powerpc: Merge 32 and 64-bit dma code" made changes to the PCI initialisation code that added an assignment to archdata.dma_data but only for 32 bit code. Commit 7eef440a545c7f812ed10b49d4a10a351df9cad6 "powerpc/pci: Cosmetic cleanups of pci-common.c" removed the conditional compilation. Unfortunately, the iSeries code setup the archdata.dma_data before that assignment was done - effectively overwriting the dma_data with NULL. Fix this up by moving the iSeries setup of dma_data into a pci_dma_dev_setup callback. Signed-off-by: Stephen Rothwell Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/include/asm/iseries/iommu.h | 4 ---- arch/powerpc/platforms/iseries/iommu.c | 6 +++++- arch/powerpc/platforms/iseries/pci.c | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) (limited to 'arch/powerpc/platforms') diff --git a/arch/powerpc/include/asm/iseries/iommu.h b/arch/powerpc/include/asm/iseries/iommu.h index c59ee7e4bed..1b9692c6089 100644 --- a/arch/powerpc/include/asm/iseries/iommu.h +++ b/arch/powerpc/include/asm/iseries/iommu.h @@ -26,10 +26,6 @@ struct vio_dev; struct device_node; struct iommu_table; -/* Creates table for an individual device node */ -extern void iommu_devnode_init_iSeries(struct pci_dev *pdev, - struct device_node *dn); - /* Get table parameters from HV */ extern void iommu_table_getparms_iSeries(unsigned long busno, unsigned char slotno, unsigned char virtbus, diff --git a/arch/powerpc/platforms/iseries/iommu.c b/arch/powerpc/platforms/iseries/iommu.c index ff43f1fd834..40219823d9b 100644 --- a/arch/powerpc/platforms/iseries/iommu.c +++ b/arch/powerpc/platforms/iseries/iommu.c @@ -174,9 +174,10 @@ static struct iommu_table *iommu_table_find(struct iommu_table * tbl) } -void iommu_devnode_init_iSeries(struct pci_dev *pdev, struct device_node *dn) +static void pci_dma_dev_setup_iseries(struct pci_dev *pdev) { struct iommu_table *tbl; + struct device_node *dn = pdev->sysdata; struct pci_dn *pdn = PCI_DN(dn); const u32 *lsn = of_get_property(dn, "linux,logical-slot-number", NULL); @@ -194,6 +195,8 @@ void iommu_devnode_init_iSeries(struct pci_dev *pdev, struct device_node *dn) kfree(tbl); pdev->dev.archdata.dma_data = pdn->iommu_table; } +#else +#define pci_dma_dev_setup_iseries NULL #endif static struct iommu_table veth_iommu_table; @@ -251,5 +254,6 @@ void iommu_init_early_iSeries(void) ppc_md.tce_build = tce_build_iSeries; ppc_md.tce_free = tce_free_iSeries; + ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_iseries; set_pci_dma_ops(&dma_iommu_ops); } diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c index 02a634faedb..21cddc30220 100644 --- a/arch/powerpc/platforms/iseries/pci.c +++ b/arch/powerpc/platforms/iseries/pci.c @@ -444,7 +444,6 @@ void __init iSeries_pcibios_fixup_resources(struct pci_dev *pdev) pdev->sysdata = node; allocate_device_bars(pdev); iseries_device_information(pdev, bus, *sub_bus); - iommu_devnode_init_iSeries(pdev, node); } /* -- cgit v1.2.3-70-g09d2 From 37cd8ed90fc5b11941110d2d0cea6807f86d4787 Mon Sep 17 00:00:00 2001 From: Gerhard Stenzel Date: Wed, 13 May 2009 05:50:46 +0000 Subject: powerpc/cell: Make ptcal more reliable There have been a series of checkstops on QS21 related to ptcal being set up incorrectly. On systems that only have memory on a single node, ptcal fails when it gets a pointer to memory on the remote node. Moreover, agressive prefetching in memcpy and other functions may accidentally touch the first cache line of the page that we reserve for ptcal, which causes an ECC checkstop. We now allocate pages only from the specified node, moves the ptcal area into the middle of the allocated page to avoid potential prefetch problems and prints the address of the ptcal area to facilitate diagnostics. Signed-off-by: Gerhard Stenzel Signed-off-by: Arnd Bergmann Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/platforms/cell/ras.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'arch/powerpc/platforms') diff --git a/arch/powerpc/platforms/cell/ras.c b/arch/powerpc/platforms/cell/ras.c index 5f961c464cc..296b5268754 100644 --- a/arch/powerpc/platforms/cell/ras.c +++ b/arch/powerpc/platforms/cell/ras.c @@ -122,12 +122,23 @@ static int __init cbe_ptcal_enable_on_node(int nid, int order) area->nid = nid; area->order = order; - area->pages = alloc_pages_node(area->nid, GFP_KERNEL, area->order); + area->pages = alloc_pages_node(area->nid, GFP_KERNEL | GFP_THISNODE, + area->order); - if (!area->pages) + if (!area->pages) { + printk(KERN_WARNING "%s: no page on node %d\n", + __func__, area->nid); goto out_free_area; + } - addr = __pa(page_address(area->pages)); + /* + * We move the ptcal area to the middle of the allocated + * page, in order to avoid prefetches in memcpy and similar + * functions stepping on it. + */ + addr = __pa(page_address(area->pages)) + (PAGE_SIZE >> 1); + printk(KERN_DEBUG "%s: enabling PTCAL on node %d address=0x%016lx\n", + __func__, area->nid, addr); ret = -EIO; if (rtas_call(ptcal_start_tok, 3, 1, NULL, area->nid, -- cgit v1.2.3-70-g09d2