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/kernel | |
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/kernel')
-rw-r--r-- | arch/powerpc/kernel/dma-iommu.c | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/iommu.c | 12 | ||||
-rw-r--r-- | arch/powerpc/kernel/lparcfg.c | 10 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup_64.c | 6 |
4 files changed, 16 insertions, 16 deletions
diff --git a/arch/powerpc/kernel/dma-iommu.c b/arch/powerpc/kernel/dma-iommu.c index 14183af1b3fb..2983adac8cc3 100644 --- a/arch/powerpc/kernel/dma-iommu.c +++ b/arch/powerpc/kernel/dma-iommu.c | |||
@@ -79,10 +79,10 @@ static int dma_iommu_dma_supported(struct device *dev, u64 mask) | |||
79 | "Warning: IOMMU offset too big for device mask\n"); | 79 | "Warning: IOMMU offset too big for device mask\n"); |
80 | if (tbl) | 80 | if (tbl) |
81 | printk(KERN_INFO | 81 | printk(KERN_INFO |
82 | "mask: 0x%08lx, table offset: 0x%08lx\n", | 82 | "mask: 0x%08llx, table offset: 0x%08lx\n", |
83 | mask, tbl->it_offset); | 83 | mask, tbl->it_offset); |
84 | else | 84 | else |
85 | printk(KERN_INFO "mask: 0x%08lx, table unavailable\n", | 85 | printk(KERN_INFO "mask: 0x%08llx, table unavailable\n", |
86 | mask); | 86 | mask); |
87 | return 0; | 87 | return 0; |
88 | } else | 88 | } else |
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c index 1bfa706b96e7..fd51578e29dd 100644 --- a/arch/powerpc/kernel/iommu.c +++ b/arch/powerpc/kernel/iommu.c | |||
@@ -239,12 +239,12 @@ static void __iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr, | |||
239 | if (printk_ratelimit()) { | 239 | if (printk_ratelimit()) { |
240 | printk(KERN_INFO "iommu_free: invalid entry\n"); | 240 | printk(KERN_INFO "iommu_free: invalid entry\n"); |
241 | printk(KERN_INFO "\tentry = 0x%lx\n", entry); | 241 | printk(KERN_INFO "\tentry = 0x%lx\n", entry); |
242 | printk(KERN_INFO "\tdma_addr = 0x%lx\n", (u64)dma_addr); | 242 | printk(KERN_INFO "\tdma_addr = 0x%llx\n", (u64)dma_addr); |
243 | printk(KERN_INFO "\tTable = 0x%lx\n", (u64)tbl); | 243 | printk(KERN_INFO "\tTable = 0x%llx\n", (u64)tbl); |
244 | printk(KERN_INFO "\tbus# = 0x%lx\n", (u64)tbl->it_busno); | 244 | printk(KERN_INFO "\tbus# = 0x%llx\n", (u64)tbl->it_busno); |
245 | printk(KERN_INFO "\tsize = 0x%lx\n", (u64)tbl->it_size); | 245 | printk(KERN_INFO "\tsize = 0x%llx\n", (u64)tbl->it_size); |
246 | printk(KERN_INFO "\tstartOff = 0x%lx\n", (u64)tbl->it_offset); | 246 | printk(KERN_INFO "\tstartOff = 0x%llx\n", (u64)tbl->it_offset); |
247 | printk(KERN_INFO "\tindex = 0x%lx\n", (u64)tbl->it_index); | 247 | printk(KERN_INFO "\tindex = 0x%llx\n", (u64)tbl->it_index); |
248 | WARN_ON(1); | 248 | WARN_ON(1); |
249 | } | 249 | } |
250 | return; | 250 | return; |
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c index d051e8cbcd03..182e0f642f36 100644 --- a/arch/powerpc/kernel/lparcfg.c +++ b/arch/powerpc/kernel/lparcfg.c | |||
@@ -240,7 +240,7 @@ static void parse_ppp_data(struct seq_file *m) | |||
240 | if (rc) | 240 | if (rc) |
241 | return; | 241 | return; |
242 | 242 | ||
243 | seq_printf(m, "partition_entitled_capacity=%ld\n", | 243 | seq_printf(m, "partition_entitled_capacity=%lld\n", |
244 | ppp_data.entitlement); | 244 | ppp_data.entitlement); |
245 | seq_printf(m, "group=%d\n", ppp_data.group_num); | 245 | seq_printf(m, "group=%d\n", ppp_data.group_num); |
246 | seq_printf(m, "system_active_processors=%d\n", | 246 | seq_printf(m, "system_active_processors=%d\n", |
@@ -265,7 +265,7 @@ static void parse_ppp_data(struct seq_file *m) | |||
265 | ppp_data.unallocated_weight); | 265 | ppp_data.unallocated_weight); |
266 | seq_printf(m, "capacity_weight=%d\n", ppp_data.weight); | 266 | seq_printf(m, "capacity_weight=%d\n", ppp_data.weight); |
267 | seq_printf(m, "capped=%d\n", ppp_data.capped); | 267 | seq_printf(m, "capped=%d\n", ppp_data.capped); |
268 | seq_printf(m, "unallocated_capacity=%ld\n", | 268 | seq_printf(m, "unallocated_capacity=%lld\n", |
269 | ppp_data.unallocated_entitlement); | 269 | ppp_data.unallocated_entitlement); |
270 | } | 270 | } |
271 | 271 | ||
@@ -509,10 +509,10 @@ static ssize_t update_ppp(u64 *entitlement, u8 *weight) | |||
509 | } else | 509 | } else |
510 | return -EINVAL; | 510 | return -EINVAL; |
511 | 511 | ||
512 | pr_debug("%s: current_entitled = %lu, current_weight = %u\n", | 512 | pr_debug("%s: current_entitled = %llu, current_weight = %u\n", |
513 | __func__, ppp_data.entitlement, ppp_data.weight); | 513 | __func__, ppp_data.entitlement, ppp_data.weight); |
514 | 514 | ||
515 | pr_debug("%s: new_entitled = %lu, new_weight = %u\n", | 515 | pr_debug("%s: new_entitled = %llu, new_weight = %u\n", |
516 | __func__, new_entitled, new_weight); | 516 | __func__, new_entitled, new_weight); |
517 | 517 | ||
518 | retval = plpar_hcall_norets(H_SET_PPP, new_entitled, new_weight); | 518 | retval = plpar_hcall_norets(H_SET_PPP, new_entitled, new_weight); |
@@ -558,7 +558,7 @@ static ssize_t update_mpp(u64 *entitlement, u8 *weight) | |||
558 | pr_debug("%s: current_entitled = %lu, current_weight = %u\n", | 558 | pr_debug("%s: current_entitled = %lu, current_weight = %u\n", |
559 | __func__, mpp_data.entitled_mem, mpp_data.mem_weight); | 559 | __func__, mpp_data.entitled_mem, mpp_data.mem_weight); |
560 | 560 | ||
561 | pr_debug("%s: new_entitled = %lu, new_weight = %u\n", | 561 | pr_debug("%s: new_entitled = %llu, new_weight = %u\n", |
562 | __func__, new_entitled, new_weight); | 562 | __func__, new_entitled, new_weight); |
563 | 563 | ||
564 | rc = plpar_hcall_norets(H_SET_MPP, new_entitled, new_weight); | 564 | rc = plpar_hcall_norets(H_SET_MPP, new_entitled, new_weight); |
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index d8bd2161e738..2d34196bba8c 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -434,8 +434,8 @@ void __init setup_system(void) | |||
434 | printk("Starting Linux PPC64 %s\n", init_utsname()->version); | 434 | printk("Starting Linux PPC64 %s\n", init_utsname()->version); |
435 | 435 | ||
436 | printk("-----------------------------------------------------\n"); | 436 | printk("-----------------------------------------------------\n"); |
437 | printk("ppc64_pft_size = 0x%lx\n", ppc64_pft_size); | 437 | printk("ppc64_pft_size = 0x%llx\n", ppc64_pft_size); |
438 | printk("physicalMemorySize = 0x%lx\n", lmb_phys_mem_size()); | 438 | printk("physicalMemorySize = 0x%llx\n", lmb_phys_mem_size()); |
439 | if (ppc64_caches.dline_size != 0x80) | 439 | if (ppc64_caches.dline_size != 0x80) |
440 | printk("ppc64_caches.dcache_line_size = 0x%x\n", | 440 | printk("ppc64_caches.dcache_line_size = 0x%x\n", |
441 | ppc64_caches.dline_size); | 441 | ppc64_caches.dline_size); |
@@ -493,7 +493,7 @@ static void __init emergency_stack_init(void) | |||
493 | * bringup, we need to get at them in real mode. This means they | 493 | * bringup, we need to get at them in real mode. This means they |
494 | * must also be within the RMO region. | 494 | * must also be within the RMO region. |
495 | */ | 495 | */ |
496 | limit = min(0x10000000UL, lmb.rmo_size); | 496 | limit = min(0x10000000ULL, lmb.rmo_size); |
497 | 497 | ||
498 | for_each_possible_cpu(i) { | 498 | for_each_possible_cpu(i) { |
499 | unsigned long sp; | 499 | unsigned long sp; |