From: Arnd Bergmann <arnd.bergmann@de.ibm.com>
To: linuxppc-dev@ozlabs.org
Cc: stk@de.ibm.com, linux-kernel@vger.kernel.org,
Milton Miller <miltonm@bga.com>,
Paul Mackerras <paulus@samba.org>,
hpenner@de.ibm.com, Arnd Bergmann <abergman@de.ibm.com>,
cbe-oss-dev@ozlabs.org
Subject: [PATCH] powerpc: use guarded ioremap for on-chip mappings
Date: Fri, 24 Mar 2006 19:47:52 +0100 [thread overview]
Message-ID: <200603241947.53301.arnd.bergmann@de.ibm.com> (raw)
In-Reply-To: <1143152153.4257.28.camel@localhost.localdomain>
Subject: powerpc: use guarded ioremap for cell on-chip mappings
I'm not sure where the information came from, but I assumed
that doing cache-inhibited mappings for mmio regions was
sufficient.
It seems we also need the guarded bit set, like everyone
else, which is the default for ioremap.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
Index: linus-2.6/arch/powerpc/platforms/cell/interrupt.c
===================================================================
--- linus-2.6.orig/arch/powerpc/platforms/cell/interrupt.c
+++ linus-2.6/arch/powerpc/platforms/cell/interrupt.c
@@ -226,9 +226,7 @@ static int setup_iic_hardcoded(void)
regs += 0x20;
printk(KERN_INFO "IIC for CPU %d at %lx\n", cpu, regs);
- iic->regs = __ioremap(regs, sizeof(struct iic_regs),
- _PAGE_NO_CACHE);
-
+ iic->regs = ioremap(regs, sizeof(struct iic_regs));
iic->target_id = (nodeid << 4) + ((cpu & 1) ? 0xf : 0xe);
}
@@ -269,14 +267,12 @@ static int setup_iic(void)
}
iic = &per_cpu(iic, np[0]);
- iic->regs = __ioremap(regs[0], sizeof(struct iic_regs),
- _PAGE_NO_CACHE);
+ iic->regs = ioremap(regs[0], sizeof(struct iic_regs));
iic->target_id = ((np[0] & 2) << 3) + ((np[0] & 1) ? 0xf : 0xe);
printk("IIC for CPU %d at %lx mapped to %p\n", np[0], regs[0], iic->regs);
iic = &per_cpu(iic, np[1]);
- iic->regs = __ioremap(regs[2], sizeof(struct iic_regs),
- _PAGE_NO_CACHE);
+ iic->regs = ioremap(regs[2], sizeof(struct iic_regs));
iic->target_id = ((np[1] & 2) << 3) + ((np[1] & 1) ? 0xf : 0xe);
printk("IIC for CPU %d at %lx mapped to %p\n", np[1], regs[2], iic->regs);
Index: linus-2.6/arch/powerpc/platforms/cell/iommu.c
===================================================================
--- linus-2.6.orig/arch/powerpc/platforms/cell/iommu.c
+++ linus-2.6/arch/powerpc/platforms/cell/iommu.c
@@ -344,8 +344,8 @@ static int cell_map_iommu_hardcoded(int
/* node 0 */
iommu = &cell_iommus[0];
- iommu->mapped_base = __ioremap(0x20000511000, 0x1000, _PAGE_NO_CACHE);
- iommu->mapped_mmio_base = __ioremap(0x20000510000, 0x1000, _PAGE_NO_CACHE);
+ iommu->mapped_base = ioremap(0x20000511000, 0x1000);
+ iommu->mapped_mmio_base = ioremap(0x20000510000, 0x1000);
enable_mapping(iommu->mapped_base, iommu->mapped_mmio_base);
@@ -357,8 +357,8 @@ static int cell_map_iommu_hardcoded(int
/* node 1 */
iommu = &cell_iommus[1];
- iommu->mapped_base = __ioremap(0x30000511000, 0x1000, _PAGE_NO_CACHE);
- iommu->mapped_mmio_base = __ioremap(0x30000510000, 0x1000, _PAGE_NO_CACHE);
+ iommu->mapped_base = ioremap(0x30000511000, 0x1000);
+ iommu->mapped_mmio_base = ioremap(0x30000510000, 0x1000);
enable_mapping(iommu->mapped_base, iommu->mapped_mmio_base);
@@ -407,8 +407,8 @@ static int cell_map_iommu(void)
iommu->base = *base;
iommu->mmio_base = *mmio_base;
- iommu->mapped_base = __ioremap(*base, 0x1000, _PAGE_NO_CACHE);
- iommu->mapped_mmio_base = __ioremap(*mmio_base, 0x1000, _PAGE_NO_CACHE);
+ iommu->mapped_base = ioremap(*base, 0x1000);
+ iommu->mapped_mmio_base = ioremap(*mmio_base, 0x1000);
enable_mapping(iommu->mapped_base,
iommu->mapped_mmio_base);
Index: linus-2.6/arch/powerpc/platforms/cell/pervasive.c
===================================================================
--- linus-2.6.orig/arch/powerpc/platforms/cell/pervasive.c
+++ linus-2.6/arch/powerpc/platforms/cell/pervasive.c
@@ -203,7 +203,7 @@ found:
pr_debug("pervasive area for CPU %d at %lx, size %x\n",
cpu, real_address, size);
- p->regs = __ioremap(real_address, size, _PAGE_NO_CACHE);
+ p->regs = ioremap(real_address, size);
p->thread = thread;
return 0;
}
Index: linus-2.6/arch/powerpc/platforms/cell/spider-pic.c
===================================================================
--- linus-2.6.orig/arch/powerpc/platforms/cell/spider-pic.c
+++ linus-2.6/arch/powerpc/platforms/cell/spider-pic.c
@@ -159,7 +159,7 @@ void spider_init_IRQ_hardcoded(void)
for (node = 0; node < num_present_cpus()/2; node++) {
spiderpic = pics[node];
printk(KERN_DEBUG "SPIDER addr: %lx\n", spiderpic);
- spider_pics[node] = __ioremap(spiderpic, 0x800, _PAGE_NO_CACHE);
+ spider_pics[node] = ioremap(spiderpic, 0x800);
for (n = 0; n < IIC_NUM_EXT; n++) {
int irq = n + IIC_EXT_OFFSET + node * IIC_NODE_STRIDE;
get_irq_desc(irq)->handler = &spider_pic;
@@ -210,7 +210,7 @@ void spider_init_IRQ(void)
if ( n != 2)
printk("reg property with invalid number of elements \n");
- spider_pics[node] = __ioremap(spider_reg, 0x800, _PAGE_NO_CACHE);
+ spider_pics[node] = ioremap(spider_reg, 0x800);
printk("SPIDER addr: %lx with %i addr_cells mapped to %p\n",
spider_reg, n, spider_pics[node]);
next prev parent reply other threads:[~2006-03-24 18:47 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-23 20:34 [patch 00/13] Cell kernel updates Arnd Bergmann
2006-03-22 23:00 ` [patch 01/13] powerpc: hvc_console updates Arnd Bergmann
2006-03-27 4:00 ` Paul Mackerras
2006-03-27 19:25 ` [updated patch 1/2] " Arnd Bergmann
2006-03-28 5:23 ` Paul Mackerras
2006-03-27 19:26 ` [updated patch 2/2] powerpc: add hvc backend for rtas Arnd Bergmann
2006-03-22 23:00 ` [patch 02/13] " Arnd Bergmann
2006-03-23 21:32 ` Olof Johansson
2006-03-23 22:36 ` [Cbe-oss-dev] " Arnd Bergmann
2006-03-23 22:49 ` Olof Johansson
2006-03-24 18:58 ` powerpc: fix hvc-rtas comments Arnd Bergmann
2006-03-22 23:00 ` [patch 03/13] powerpc: update cell platform detection Arnd Bergmann
2006-03-22 23:00 ` [patch 04/13] powerpc: fix cell iommu setup Arnd Bergmann
2006-03-22 23:00 ` [patch 05/13] powerpc: update cell defconfig Arnd Bergmann
2006-03-22 23:00 ` [patch 06/13] powerpc: cell interrupt controller updates Arnd Bergmann
2006-03-23 22:15 ` Benjamin Herrenschmidt
2006-03-24 18:47 ` Arnd Bergmann [this message]
2006-03-24 17:43 ` Milton Miller
2006-03-24 18:05 ` Arnd Bergmann
2006-03-24 18:46 ` [PATCH] powerpc: fix spider-pic affinity setting Arnd Bergmann
2006-03-22 23:00 ` [patch 07/13] powerpc: work around a cell interrupt HW bug Arnd Bergmann
2006-03-22 23:00 ` [patch 08/13] powerpc: declare arch syscalls in <asm/syscalls.h> Arnd Bergmann
2006-03-22 23:00 ` [patch 09/13] spufs: allow SPU code to do syscalls Arnd Bergmann
2006-03-22 23:00 ` [patch 10/13] add sys_unshare to syscalls.h Arnd Bergmann
2006-03-22 23:00 ` [patch 11/13] spufs: implement mfc access for PPE-side DMA Arnd Bergmann
2006-03-22 23:00 ` [patch 12/13] spufs: enable SPE problem state MMIO access Arnd Bergmann
2006-03-22 23:00 ` [patch 13/13] spufs: initialize context correctly Arnd Bergmann
2006-03-24 18:49 ` [PATCH] spufs: Fix endless protection fault on LS writes by SPE Arnd Bergmann
2006-03-27 19:27 ` [PATCH] fix __init/__exit annotations for spufs Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200603241947.53301.arnd.bergmann@de.ibm.com \
--to=arnd.bergmann@de.ibm.com \
--cc=abergman@de.ibm.com \
--cc=cbe-oss-dev@ozlabs.org \
--cc=hpenner@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=miltonm@bga.com \
--cc=paulus@samba.org \
--cc=stk@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).