diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-01-06 09:26:03 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-01-12 22:47:59 -0500 |
commit | fe333321e2a71f706b794d55b6a3dcb5ab240f65 (patch) | |
tree | 8fd95cb033c6deaa3471023213c70ebfa7949f4b /arch/powerpc/platforms | |
parent | 66c721e184e594d5761c5db804ade08fab81930d (diff) |
powerpc: Change u64/s64 to a long long integer type
Convert arch/powerpc/ over to long long based u64:
-#ifdef __powerpc64__
-# include <asm-generic/int-l64.h>
-#else
-# include <asm-generic/int-ll64.h>
-#endif
+#include <asm-generic/int-ll64.h>
This will avoid reoccuring spurious warnings in core kernel code that
comes when people test on their own hardware. (i.e. x86 in ~98% of the
cases) This is what x86 uses and it generally helps keep 64-bit code
32-bit clean too.
[Adjusted to not impact user mode (from paulus) - sfr]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/cell/beat_interrupt.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/celleb_scc_epci.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/iommu.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/ras.c | 8 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spu_base.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spu_callbacks.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/iommu.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/iommu.c | 35 |
8 files changed, 31 insertions, 32 deletions
diff --git a/arch/powerpc/platforms/cell/beat_interrupt.c b/arch/powerpc/platforms/cell/beat_interrupt.c index 192a93509372..72254848a228 100644 --- a/arch/powerpc/platforms/cell/beat_interrupt.c +++ b/arch/powerpc/platforms/cell/beat_interrupt.c | |||
@@ -99,7 +99,7 @@ static void beatic_end_irq(unsigned int irq_plug) | |||
99 | err = beat_downcount_of_interrupt(irq_plug); | 99 | err = beat_downcount_of_interrupt(irq_plug); |
100 | if (err != 0) { | 100 | if (err != 0) { |
101 | if ((err & 0xFFFFFFFF) != 0xFFFFFFF5) /* -11: wrong state */ | 101 | if ((err & 0xFFFFFFFF) != 0xFFFFFFF5) /* -11: wrong state */ |
102 | panic("Failed to downcount IRQ! Error = %16lx", err); | 102 | panic("Failed to downcount IRQ! Error = %16llx", err); |
103 | 103 | ||
104 | printk(KERN_ERR "IRQ over-downcounted, plug %d\n", irq_plug); | 104 | printk(KERN_ERR "IRQ over-downcounted, plug %d\n", irq_plug); |
105 | } | 105 | } |
diff --git a/arch/powerpc/platforms/cell/celleb_scc_epci.c b/arch/powerpc/platforms/cell/celleb_scc_epci.c index 08c285b10e30..48ec88a38a12 100644 --- a/arch/powerpc/platforms/cell/celleb_scc_epci.c +++ b/arch/powerpc/platforms/cell/celleb_scc_epci.c | |||
@@ -405,7 +405,7 @@ static int __init celleb_setup_epci(struct device_node *node, | |||
405 | hose->cfg_addr = ioremap(r.start, (r.end - r.start + 1)); | 405 | hose->cfg_addr = ioremap(r.start, (r.end - r.start + 1)); |
406 | if (!hose->cfg_addr) | 406 | if (!hose->cfg_addr) |
407 | goto error; | 407 | goto error; |
408 | pr_debug("EPCI: cfg_addr map 0x%016lx->0x%016lx + 0x%016lx\n", | 408 | pr_debug("EPCI: cfg_addr map 0x%016llx->0x%016lx + 0x%016llx\n", |
409 | r.start, (unsigned long)hose->cfg_addr, (r.end - r.start + 1)); | 409 | r.start, (unsigned long)hose->cfg_addr, (r.end - r.start + 1)); |
410 | 410 | ||
411 | if (of_address_to_resource(node, 2, &r)) | 411 | if (of_address_to_resource(node, 2, &r)) |
@@ -413,7 +413,7 @@ static int __init celleb_setup_epci(struct device_node *node, | |||
413 | hose->cfg_data = ioremap(r.start, (r.end - r.start + 1)); | 413 | hose->cfg_data = ioremap(r.start, (r.end - r.start + 1)); |
414 | if (!hose->cfg_data) | 414 | if (!hose->cfg_data) |
415 | goto error; | 415 | goto error; |
416 | pr_debug("EPCI: cfg_data map 0x%016lx->0x%016lx + 0x%016lx\n", | 416 | pr_debug("EPCI: cfg_data map 0x%016llx->0x%016lx + 0x%016llx\n", |
417 | r.start, (unsigned long)hose->cfg_data, (r.end - r.start + 1)); | 417 | r.start, (unsigned long)hose->cfg_data, (r.end - r.start + 1)); |
418 | 418 | ||
419 | hose->ops = &celleb_epci_ops; | 419 | hose->ops = &celleb_epci_ops; |
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c index 88d94b59a7cb..ee5033eddf01 100644 --- a/arch/powerpc/platforms/cell/iommu.c +++ b/arch/powerpc/platforms/cell/iommu.c | |||
@@ -855,7 +855,7 @@ static int __init cell_iommu_init_disabled(void) | |||
855 | */ | 855 | */ |
856 | if (np && size < lmb_end_of_DRAM()) { | 856 | if (np && size < lmb_end_of_DRAM()) { |
857 | printk(KERN_WARNING "iommu: force-enabled, dma window" | 857 | printk(KERN_WARNING "iommu: force-enabled, dma window" |
858 | " (%ldMB) smaller than total memory (%ldMB)\n", | 858 | " (%ldMB) smaller than total memory (%lldMB)\n", |
859 | size >> 20, lmb_end_of_DRAM() >> 20); | 859 | size >> 20, lmb_end_of_DRAM() >> 20); |
860 | return -ENODEV; | 860 | return -ENODEV; |
861 | } | 861 | } |
@@ -985,7 +985,7 @@ static void cell_dma_dev_setup_fixed(struct device *dev) | |||
985 | addr = cell_iommu_get_fixed_address(dev) + dma_iommu_fixed_base; | 985 | addr = cell_iommu_get_fixed_address(dev) + dma_iommu_fixed_base; |
986 | archdata->dma_data = (void *)addr; | 986 | archdata->dma_data = (void *)addr; |
987 | 987 | ||
988 | dev_dbg(dev, "iommu: fixed addr = %lx\n", addr); | 988 | dev_dbg(dev, "iommu: fixed addr = %llx\n", addr); |
989 | } | 989 | } |
990 | 990 | ||
991 | static void insert_16M_pte(unsigned long addr, unsigned long *ptab, | 991 | static void insert_16M_pte(unsigned long addr, unsigned long *ptab, |
diff --git a/arch/powerpc/platforms/cell/ras.c b/arch/powerpc/platforms/cell/ras.c index 7b4cefa2199b..5f961c464cc4 100644 --- a/arch/powerpc/platforms/cell/ras.c +++ b/arch/powerpc/platforms/cell/ras.c | |||
@@ -38,16 +38,16 @@ static void dump_fir(int cpu) | |||
38 | /* Todo: do some nicer parsing of bits and based on them go down | 38 | /* Todo: do some nicer parsing of bits and based on them go down |
39 | * to other sub-units FIRs and not only IIC | 39 | * to other sub-units FIRs and not only IIC |
40 | */ | 40 | */ |
41 | printk(KERN_ERR "Global Checkstop FIR : 0x%016lx\n", | 41 | printk(KERN_ERR "Global Checkstop FIR : 0x%016llx\n", |
42 | in_be64(&pregs->checkstop_fir)); | 42 | in_be64(&pregs->checkstop_fir)); |
43 | printk(KERN_ERR "Global Recoverable FIR : 0x%016lx\n", | 43 | printk(KERN_ERR "Global Recoverable FIR : 0x%016llx\n", |
44 | in_be64(&pregs->checkstop_fir)); | 44 | in_be64(&pregs->checkstop_fir)); |
45 | printk(KERN_ERR "Global MachineCheck FIR : 0x%016lx\n", | 45 | printk(KERN_ERR "Global MachineCheck FIR : 0x%016llx\n", |
46 | in_be64(&pregs->spec_att_mchk_fir)); | 46 | in_be64(&pregs->spec_att_mchk_fir)); |
47 | 47 | ||
48 | if (iregs == NULL) | 48 | if (iregs == NULL) |
49 | return; | 49 | return; |
50 | printk(KERN_ERR "IOC FIR : 0x%016lx\n", | 50 | printk(KERN_ERR "IOC FIR : 0x%016llx\n", |
51 | in_be64(&iregs->ioc_fir)); | 51 | in_be64(&iregs->ioc_fir)); |
52 | 52 | ||
53 | } | 53 | } |
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c index a5bdb89a17c3..e487ad68ac11 100644 --- a/arch/powerpc/platforms/cell/spu_base.c +++ b/arch/powerpc/platforms/cell/spu_base.c | |||
@@ -151,7 +151,7 @@ static inline void spu_load_slb(struct spu *spu, int slbe, struct spu_slb *slb) | |||
151 | { | 151 | { |
152 | struct spu_priv2 __iomem *priv2 = spu->priv2; | 152 | struct spu_priv2 __iomem *priv2 = spu->priv2; |
153 | 153 | ||
154 | pr_debug("%s: adding SLB[%d] 0x%016lx 0x%016lx\n", | 154 | pr_debug("%s: adding SLB[%d] 0x%016llx 0x%016llx\n", |
155 | __func__, slbe, slb->vsid, slb->esid); | 155 | __func__, slbe, slb->vsid, slb->esid); |
156 | 156 | ||
157 | out_be64(&priv2->slb_index_W, slbe); | 157 | out_be64(&priv2->slb_index_W, slbe); |
@@ -221,7 +221,7 @@ static int __spu_trap_data_map(struct spu *spu, unsigned long ea, u64 dsisr) | |||
221 | { | 221 | { |
222 | int ret; | 222 | int ret; |
223 | 223 | ||
224 | pr_debug("%s, %lx, %lx\n", __func__, dsisr, ea); | 224 | pr_debug("%s, %llx, %lx\n", __func__, dsisr, ea); |
225 | 225 | ||
226 | /* | 226 | /* |
227 | * Handle kernel space hash faults immediately. User hash | 227 | * Handle kernel space hash faults immediately. User hash |
diff --git a/arch/powerpc/platforms/cell/spu_callbacks.c b/arch/powerpc/platforms/cell/spu_callbacks.c index 19f6bfdbb933..fec1495e6b12 100644 --- a/arch/powerpc/platforms/cell/spu_callbacks.c +++ b/arch/powerpc/platforms/cell/spu_callbacks.c | |||
@@ -54,7 +54,7 @@ long spu_sys_callback(struct spu_syscall_block *s) | |||
54 | long (*syscall)(u64 a1, u64 a2, u64 a3, u64 a4, u64 a5, u64 a6); | 54 | long (*syscall)(u64 a1, u64 a2, u64 a3, u64 a4, u64 a5, u64 a6); |
55 | 55 | ||
56 | if (s->nr_ret >= ARRAY_SIZE(spu_syscall_table)) { | 56 | if (s->nr_ret >= ARRAY_SIZE(spu_syscall_table)) { |
57 | pr_debug("%s: invalid syscall #%ld", __func__, s->nr_ret); | 57 | pr_debug("%s: invalid syscall #%lld", __func__, s->nr_ret); |
58 | return -ENOSYS; | 58 | return -ENOSYS; |
59 | } | 59 | } |
60 | 60 | ||
diff --git a/arch/powerpc/platforms/iseries/iommu.c b/arch/powerpc/platforms/iseries/iommu.c index bbe828f1b885..6ed75bffc8ab 100644 --- a/arch/powerpc/platforms/iseries/iommu.c +++ b/arch/powerpc/platforms/iseries/iommu.c | |||
@@ -66,7 +66,7 @@ static int tce_build_iSeries(struct iommu_table *tbl, long index, long npages, | |||
66 | 66 | ||
67 | rc = HvCallXm_setTce((u64)tbl->it_index, (u64)index, tce); | 67 | rc = HvCallXm_setTce((u64)tbl->it_index, (u64)index, tce); |
68 | if (rc) | 68 | if (rc) |
69 | panic("PCI_DMA: HvCallXm_setTce failed, Rc: 0x%lx\n", | 69 | panic("PCI_DMA: HvCallXm_setTce failed, Rc: 0x%llx\n", |
70 | rc); | 70 | rc); |
71 | index++; | 71 | index++; |
72 | uaddr += TCE_PAGE_SIZE; | 72 | uaddr += TCE_PAGE_SIZE; |
@@ -81,7 +81,7 @@ static void tce_free_iSeries(struct iommu_table *tbl, long index, long npages) | |||
81 | while (npages--) { | 81 | while (npages--) { |
82 | rc = HvCallXm_setTce((u64)tbl->it_index, (u64)index, 0); | 82 | rc = HvCallXm_setTce((u64)tbl->it_index, (u64)index, 0); |
83 | if (rc) | 83 | if (rc) |
84 | panic("PCI_DMA: HvCallXm_setTce failed, Rc: 0x%lx\n", | 84 | panic("PCI_DMA: HvCallXm_setTce failed, Rc: 0x%llx\n", |
85 | rc); | 85 | rc); |
86 | index++; | 86 | index++; |
87 | } | 87 | } |
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index c90817acb472..3ee01b4f4257 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c | |||
@@ -127,10 +127,10 @@ static int tce_build_pSeriesLP(struct iommu_table *tbl, long tcenum, | |||
127 | } | 127 | } |
128 | 128 | ||
129 | if (rc && printk_ratelimit()) { | 129 | if (rc && printk_ratelimit()) { |
130 | printk("tce_build_pSeriesLP: plpar_tce_put failed. rc=%ld\n", rc); | 130 | printk("tce_build_pSeriesLP: plpar_tce_put failed. rc=%lld\n", rc); |
131 | printk("\tindex = 0x%lx\n", (u64)tbl->it_index); | 131 | printk("\tindex = 0x%llx\n", (u64)tbl->it_index); |
132 | printk("\ttcenum = 0x%lx\n", (u64)tcenum); | 132 | printk("\ttcenum = 0x%llx\n", (u64)tcenum); |
133 | printk("\ttce val = 0x%lx\n", tce ); | 133 | printk("\ttce val = 0x%llx\n", tce ); |
134 | show_stack(current, (unsigned long *)__get_SP()); | 134 | show_stack(current, (unsigned long *)__get_SP()); |
135 | } | 135 | } |
136 | 136 | ||
@@ -210,10 +210,10 @@ static int tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, | |||
210 | } | 210 | } |
211 | 211 | ||
212 | if (rc && printk_ratelimit()) { | 212 | if (rc && printk_ratelimit()) { |
213 | printk("tce_buildmulti_pSeriesLP: plpar_tce_put failed. rc=%ld\n", rc); | 213 | printk("tce_buildmulti_pSeriesLP: plpar_tce_put failed. rc=%lld\n", rc); |
214 | printk("\tindex = 0x%lx\n", (u64)tbl->it_index); | 214 | printk("\tindex = 0x%llx\n", (u64)tbl->it_index); |
215 | printk("\tnpages = 0x%lx\n", (u64)npages); | 215 | printk("\tnpages = 0x%llx\n", (u64)npages); |
216 | printk("\ttce[0] val = 0x%lx\n", tcep[0]); | 216 | printk("\ttce[0] val = 0x%llx\n", tcep[0]); |
217 | show_stack(current, (unsigned long *)__get_SP()); | 217 | show_stack(current, (unsigned long *)__get_SP()); |
218 | } | 218 | } |
219 | return ret; | 219 | return ret; |
@@ -227,9 +227,9 @@ static void tce_free_pSeriesLP(struct iommu_table *tbl, long tcenum, long npages | |||
227 | rc = plpar_tce_put((u64)tbl->it_index, (u64)tcenum << 12, 0); | 227 | rc = plpar_tce_put((u64)tbl->it_index, (u64)tcenum << 12, 0); |
228 | 228 | ||
229 | if (rc && printk_ratelimit()) { | 229 | if (rc && printk_ratelimit()) { |
230 | printk("tce_free_pSeriesLP: plpar_tce_put failed. rc=%ld\n", rc); | 230 | printk("tce_free_pSeriesLP: plpar_tce_put failed. rc=%lld\n", rc); |
231 | printk("\tindex = 0x%lx\n", (u64)tbl->it_index); | 231 | printk("\tindex = 0x%llx\n", (u64)tbl->it_index); |
232 | printk("\ttcenum = 0x%lx\n", (u64)tcenum); | 232 | printk("\ttcenum = 0x%llx\n", (u64)tcenum); |
233 | show_stack(current, (unsigned long *)__get_SP()); | 233 | show_stack(current, (unsigned long *)__get_SP()); |
234 | } | 234 | } |
235 | 235 | ||
@@ -246,9 +246,9 @@ static void tce_freemulti_pSeriesLP(struct iommu_table *tbl, long tcenum, long n | |||
246 | 246 | ||
247 | if (rc && printk_ratelimit()) { | 247 | if (rc && printk_ratelimit()) { |
248 | printk("tce_freemulti_pSeriesLP: plpar_tce_stuff failed\n"); | 248 | printk("tce_freemulti_pSeriesLP: plpar_tce_stuff failed\n"); |
249 | printk("\trc = %ld\n", rc); | 249 | printk("\trc = %lld\n", rc); |
250 | printk("\tindex = 0x%lx\n", (u64)tbl->it_index); | 250 | printk("\tindex = 0x%llx\n", (u64)tbl->it_index); |
251 | printk("\tnpages = 0x%lx\n", (u64)npages); | 251 | printk("\tnpages = 0x%llx\n", (u64)npages); |
252 | show_stack(current, (unsigned long *)__get_SP()); | 252 | show_stack(current, (unsigned long *)__get_SP()); |
253 | } | 253 | } |
254 | } | 254 | } |
@@ -261,10 +261,9 @@ static unsigned long tce_get_pSeriesLP(struct iommu_table *tbl, long tcenum) | |||
261 | rc = plpar_tce_get((u64)tbl->it_index, (u64)tcenum << 12, &tce_ret); | 261 | rc = plpar_tce_get((u64)tbl->it_index, (u64)tcenum << 12, &tce_ret); |
262 | 262 | ||
263 | if (rc && printk_ratelimit()) { | 263 | if (rc && printk_ratelimit()) { |
264 | printk("tce_get_pSeriesLP: plpar_tce_get failed. rc=%ld\n", | 264 | printk("tce_get_pSeriesLP: plpar_tce_get failed. rc=%lld\n", rc); |
265 | rc); | 265 | printk("\tindex = 0x%llx\n", (u64)tbl->it_index); |
266 | printk("\tindex = 0x%lx\n", (u64)tbl->it_index); | 266 | printk("\ttcenum = 0x%llx\n", (u64)tcenum); |
267 | printk("\ttcenum = 0x%lx\n", (u64)tcenum); | ||
268 | show_stack(current, (unsigned long *)__get_SP()); | 267 | show_stack(current, (unsigned long *)__get_SP()); |
269 | } | 268 | } |
270 | 269 | ||