aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-01-07 20:23:53 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-07 20:23:53 -0500
commit9e42d0cf5020aaf217433cad1a224745241d212a (patch)
tree8d64537c600024a4220d1309873ac3467726c3b0
parent97c440ba41d4e7cddb8e14c7c7ec49dad2560709 (diff)
parent18b8e08e290e9df588f51f5a7df50555f5a25664 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: sparc64: Work around branch tracer warning. sparc64: Fix unsigned long long warnings in drivers. sparc64: Use unsigned long long for u64. sparc: refactor code in fault_32.c sparc64: refactor code in init_64.c sparc64: refactor code in viohs.c sparc: make proces_ver_nack a bit more readable
-rw-r--r--arch/sparc/include/asm/timer_64.h2
-rw-r--r--arch/sparc/include/asm/types.h2
-rw-r--r--arch/sparc/kernel/ds.c34
-rw-r--r--arch/sparc/kernel/iommu.c2
-rw-r--r--arch/sparc/kernel/ldc.c23
-rw-r--r--arch/sparc/kernel/mdesc.c14
-rw-r--r--arch/sparc/kernel/of_device_64.c2
-rw-r--r--arch/sparc/kernel/pci.c2
-rw-r--r--arch/sparc/kernel/pci_common.c2
-rw-r--r--arch/sparc/kernel/pci_msi.c4
-rw-r--r--arch/sparc/kernel/pci_schizo.c2
-rw-r--r--arch/sparc/kernel/pci_sun4v.c2
-rw-r--r--arch/sparc/kernel/power.c2
-rw-r--r--arch/sparc/kernel/prom_irqtrans.c2
-rw-r--r--arch/sparc/kernel/psycho_common.c14
-rw-r--r--arch/sparc/kernel/smp_64.c4
-rw-r--r--arch/sparc/kernel/time_64.c12
-rw-r--r--arch/sparc/kernel/traps_64.c20
-rw-r--r--arch/sparc/kernel/unaligned_64.c8
-rw-r--r--arch/sparc/kernel/vio.c4
-rw-r--r--arch/sparc/kernel/viohs.c6
-rw-r--r--arch/sparc/mm/fault_32.c3
-rw-r--r--arch/sparc/mm/init_64.c48
-rw-r--r--drivers/block/sunvdc.c8
-rw-r--r--drivers/char/hw_random/n2-drv.c2
-rw-r--r--drivers/net/sunvnet.c8
-rw-r--r--drivers/sbus/char/display7seg.c2
-rw-r--r--sound/sparc/cs4231.c2
28 files changed, 127 insertions, 109 deletions
diff --git a/arch/sparc/include/asm/timer_64.h b/arch/sparc/include/asm/timer_64.h
index 5b779fd1f788..ef3c3682debf 100644
--- a/arch/sparc/include/asm/timer_64.h
+++ b/arch/sparc/include/asm/timer_64.h
@@ -10,7 +10,7 @@
10#include <linux/init.h> 10#include <linux/init.h>
11 11
12struct sparc64_tick_ops { 12struct sparc64_tick_ops {
13 unsigned long (*get_tick)(void); 13 unsigned long long (*get_tick)(void);
14 int (*add_compare)(unsigned long); 14 int (*add_compare)(unsigned long);
15 unsigned long softint_mask; 15 unsigned long softint_mask;
16 void (*disable_irq)(void); 16 void (*disable_irq)(void);
diff --git a/arch/sparc/include/asm/types.h b/arch/sparc/include/asm/types.h
index 8c28fde5eaa2..2237118825d0 100644
--- a/arch/sparc/include/asm/types.h
+++ b/arch/sparc/include/asm/types.h
@@ -11,7 +11,7 @@
11#if defined(__sparc__) && defined(__arch64__) 11#if defined(__sparc__) && defined(__arch64__)
12 12
13/*** SPARC 64 bit ***/ 13/*** SPARC 64 bit ***/
14#include <asm-generic/int-l64.h> 14#include <asm-generic/int-ll64.h>
15 15
16#ifndef __ASSEMBLY__ 16#ifndef __ASSEMBLY__
17 17
diff --git a/arch/sparc/kernel/ds.c b/arch/sparc/kernel/ds.c
index f52e0534d91d..57c39843fb2a 100644
--- a/arch/sparc/kernel/ds.c
+++ b/arch/sparc/kernel/ds.c
@@ -286,7 +286,7 @@ static void md_update_data(struct ds_info *dp,
286 286
287 rp = (struct ds_md_update_req *) (dpkt + 1); 287 rp = (struct ds_md_update_req *) (dpkt + 1);
288 288
289 printk(KERN_INFO "ds-%lu: Machine description update.\n", dp->id); 289 printk(KERN_INFO "ds-%llu: Machine description update.\n", dp->id);
290 290
291 mdesc_update(); 291 mdesc_update();
292 292
@@ -325,7 +325,7 @@ static void domain_shutdown_data(struct ds_info *dp,
325 325
326 rp = (struct ds_shutdown_req *) (dpkt + 1); 326 rp = (struct ds_shutdown_req *) (dpkt + 1);
327 327
328 printk(KERN_ALERT "ds-%lu: Shutdown request from " 328 printk(KERN_ALERT "ds-%llu: Shutdown request from "
329 "LDOM manager received.\n", dp->id); 329 "LDOM manager received.\n", dp->id);
330 330
331 memset(&pkt, 0, sizeof(pkt)); 331 memset(&pkt, 0, sizeof(pkt));
@@ -365,7 +365,7 @@ static void domain_panic_data(struct ds_info *dp,
365 365
366 rp = (struct ds_panic_req *) (dpkt + 1); 366 rp = (struct ds_panic_req *) (dpkt + 1);
367 367
368 printk(KERN_ALERT "ds-%lu: Panic request from " 368 printk(KERN_ALERT "ds-%llu: Panic request from "
369 "LDOM manager received.\n", dp->id); 369 "LDOM manager received.\n", dp->id);
370 370
371 memset(&pkt, 0, sizeof(pkt)); 371 memset(&pkt, 0, sizeof(pkt));
@@ -549,7 +549,7 @@ static int __cpuinit dr_cpu_configure(struct ds_info *dp,
549 for_each_cpu_mask(cpu, *mask) { 549 for_each_cpu_mask(cpu, *mask) {
550 int err; 550 int err;
551 551
552 printk(KERN_INFO "ds-%lu: Starting cpu %d...\n", 552 printk(KERN_INFO "ds-%llu: Starting cpu %d...\n",
553 dp->id, cpu); 553 dp->id, cpu);
554 err = cpu_up(cpu); 554 err = cpu_up(cpu);
555 if (err) { 555 if (err) {
@@ -565,7 +565,7 @@ static int __cpuinit dr_cpu_configure(struct ds_info *dp,
565 res = DR_CPU_RES_CPU_NOT_RESPONDING; 565 res = DR_CPU_RES_CPU_NOT_RESPONDING;
566 } 566 }
567 567
568 printk(KERN_INFO "ds-%lu: CPU startup failed err=%d\n", 568 printk(KERN_INFO "ds-%llu: CPU startup failed err=%d\n",
569 dp->id, err); 569 dp->id, err);
570 dr_cpu_mark(resp, cpu, ncpus, res, stat); 570 dr_cpu_mark(resp, cpu, ncpus, res, stat);
571 } 571 }
@@ -605,7 +605,7 @@ static int dr_cpu_unconfigure(struct ds_info *dp,
605 for_each_cpu_mask(cpu, *mask) { 605 for_each_cpu_mask(cpu, *mask) {
606 int err; 606 int err;
607 607
608 printk(KERN_INFO "ds-%lu: Shutting down cpu %d...\n", 608 printk(KERN_INFO "ds-%llu: Shutting down cpu %d...\n",
609 dp->id, cpu); 609 dp->id, cpu);
610 err = cpu_down(cpu); 610 err = cpu_down(cpu);
611 if (err) 611 if (err)
@@ -684,7 +684,7 @@ static void ds_pri_data(struct ds_info *dp,
684 684
685 rp = (struct ds_pri_msg *) (dpkt + 1); 685 rp = (struct ds_pri_msg *) (dpkt + 1);
686 686
687 printk(KERN_INFO "ds-%lu: PRI REQ [%lx:%lx], len=%d\n", 687 printk(KERN_INFO "ds-%llu: PRI REQ [%llx:%llx], len=%d\n",
688 dp->id, rp->req_num, rp->type, len); 688 dp->id, rp->req_num, rp->type, len);
689} 689}
690 690
@@ -816,7 +816,7 @@ void ldom_set_var(const char *var, const char *value)
816 816
817 if (ds_var_doorbell == 0 || 817 if (ds_var_doorbell == 0 ||
818 ds_var_response != DS_VAR_SUCCESS) 818 ds_var_response != DS_VAR_SUCCESS)
819 printk(KERN_ERR "ds-%lu: var-config [%s:%s] " 819 printk(KERN_ERR "ds-%llu: var-config [%s:%s] "
820 "failed, response(%d).\n", 820 "failed, response(%d).\n",
821 dp->id, var, value, 821 dp->id, var, value,
822 ds_var_response); 822 ds_var_response);
@@ -850,7 +850,7 @@ void ldom_power_off(void)
850 850
851static void ds_conn_reset(struct ds_info *dp) 851static void ds_conn_reset(struct ds_info *dp)
852{ 852{
853 printk(KERN_ERR "ds-%lu: ds_conn_reset() from %p\n", 853 printk(KERN_ERR "ds-%llu: ds_conn_reset() from %p\n",
854 dp->id, __builtin_return_address(0)); 854 dp->id, __builtin_return_address(0));
855} 855}
856 856
@@ -912,11 +912,11 @@ static int ds_handshake(struct ds_info *dp, struct ds_msg_tag *pkt)
912 struct ds_cap_state *cp = find_cap(dp, ap->handle); 912 struct ds_cap_state *cp = find_cap(dp, ap->handle);
913 913
914 if (!cp) { 914 if (!cp) {
915 printk(KERN_ERR "ds-%lu: REG ACK for unknown " 915 printk(KERN_ERR "ds-%llu: REG ACK for unknown "
916 "handle %lx\n", dp->id, ap->handle); 916 "handle %llx\n", dp->id, ap->handle);
917 return 0; 917 return 0;
918 } 918 }
919 printk(KERN_INFO "ds-%lu: Registered %s service.\n", 919 printk(KERN_INFO "ds-%llu: Registered %s service.\n",
920 dp->id, cp->service_id); 920 dp->id, cp->service_id);
921 cp->state = CAP_STATE_REGISTERED; 921 cp->state = CAP_STATE_REGISTERED;
922 } else if (pkt->type == DS_REG_NACK) { 922 } else if (pkt->type == DS_REG_NACK) {
@@ -924,8 +924,8 @@ static int ds_handshake(struct ds_info *dp, struct ds_msg_tag *pkt)
924 struct ds_cap_state *cp = find_cap(dp, np->handle); 924 struct ds_cap_state *cp = find_cap(dp, np->handle);
925 925
926 if (!cp) { 926 if (!cp) {
927 printk(KERN_ERR "ds-%lu: REG NACK for " 927 printk(KERN_ERR "ds-%llu: REG NACK for "
928 "unknown handle %lx\n", 928 "unknown handle %llx\n",
929 dp->id, np->handle); 929 dp->id, np->handle);
930 return 0; 930 return 0;
931 } 931 }
@@ -982,8 +982,8 @@ static void process_ds_work(void)
982 int req_len = qp->req_len; 982 int req_len = qp->req_len;
983 983
984 if (!cp) { 984 if (!cp) {
985 printk(KERN_ERR "ds-%lu: Data for unknown " 985 printk(KERN_ERR "ds-%llu: Data for unknown "
986 "handle %lu\n", 986 "handle %llu\n",
987 dp->id, dpkt->handle); 987 dp->id, dpkt->handle);
988 988
989 spin_lock_irqsave(&ds_lock, flags); 989 spin_lock_irqsave(&ds_lock, flags);
@@ -1085,7 +1085,7 @@ static void ds_event(void *arg, int event)
1085 } 1085 }
1086 1086
1087 if (event != LDC_EVENT_DATA_READY) { 1087 if (event != LDC_EVENT_DATA_READY) {
1088 printk(KERN_WARNING "ds-%lu: Unexpected LDC event %d\n", 1088 printk(KERN_WARNING "ds-%llu: Unexpected LDC event %d\n",
1089 dp->id, event); 1089 dp->id, event);
1090 spin_unlock_irqrestore(&ds_lock, flags); 1090 spin_unlock_irqrestore(&ds_lock, flags);
1091 return; 1091 return;
diff --git a/arch/sparc/kernel/iommu.c b/arch/sparc/kernel/iommu.c
index 1cc1995531e2..d8900e1d5aad 100644
--- a/arch/sparc/kernel/iommu.c
+++ b/arch/sparc/kernel/iommu.c
@@ -434,7 +434,7 @@ static void strbuf_flush(struct strbuf *strbuf, struct iommu *iommu,
434 val = iommu_read(matchreg); 434 val = iommu_read(matchreg);
435 if (unlikely(val)) { 435 if (unlikely(val)) {
436 printk(KERN_WARNING "strbuf_flush: ctx flush " 436 printk(KERN_WARNING "strbuf_flush: ctx flush "
437 "timeout matchreg[%lx] ctx[%lx]\n", 437 "timeout matchreg[%llx] ctx[%lx]\n",
438 val, ctx); 438 val, ctx);
439 goto do_page_flush; 439 goto do_page_flush;
440 } 440 }
diff --git a/arch/sparc/kernel/ldc.c b/arch/sparc/kernel/ldc.c
index d68982330f66..6ce5d2598a09 100644
--- a/arch/sparc/kernel/ldc.c
+++ b/arch/sparc/kernel/ldc.c
@@ -625,22 +625,23 @@ static int process_ver_ack(struct ldc_channel *lp, struct ldc_version *vp)
625static int process_ver_nack(struct ldc_channel *lp, struct ldc_version *vp) 625static int process_ver_nack(struct ldc_channel *lp, struct ldc_version *vp)
626{ 626{
627 struct ldc_version *vap; 627 struct ldc_version *vap;
628 struct ldc_packet *p;
629 unsigned long new_tail;
628 630
629 if ((vp->major == 0 && vp->minor == 0) || 631 if (vp->major == 0 && vp->minor == 0)
630 !(vap = find_by_major(vp->major))) { 632 return ldc_abort(lp);
633
634 vap = find_by_major(vp->major);
635 if (!vap)
631 return ldc_abort(lp); 636 return ldc_abort(lp);
632 } else {
633 struct ldc_packet *p;
634 unsigned long new_tail;
635 637
636 p = handshake_compose_ctrl(lp, LDC_INFO, LDC_VERS, 638 p = handshake_compose_ctrl(lp, LDC_INFO, LDC_VERS,
637 vap, sizeof(*vap), 639 vap, sizeof(*vap),
638 &new_tail); 640 &new_tail);
639 if (p) 641 if (!p)
640 return send_tx_packet(lp, p, new_tail); 642 return ldc_abort(lp);
641 else 643
642 return ldc_abort(lp); 644 return send_tx_packet(lp, p, new_tail);
643 }
644} 645}
645 646
646static int process_version(struct ldc_channel *lp, 647static int process_version(struct ldc_channel *lp,
diff --git a/arch/sparc/kernel/mdesc.c b/arch/sparc/kernel/mdesc.c
index 3c539a6d7c18..3f79f0c23a08 100644
--- a/arch/sparc/kernel/mdesc.c
+++ b/arch/sparc/kernel/mdesc.c
@@ -536,24 +536,24 @@ static void __init report_platform_properties(void)
536 536
537 v = mdesc_get_property(hp, pn, "hostid", NULL); 537 v = mdesc_get_property(hp, pn, "hostid", NULL);
538 if (v) 538 if (v)
539 printk("PLATFORM: hostid [%08lx]\n", *v); 539 printk("PLATFORM: hostid [%08llx]\n", *v);
540 v = mdesc_get_property(hp, pn, "serial#", NULL); 540 v = mdesc_get_property(hp, pn, "serial#", NULL);
541 if (v) 541 if (v)
542 printk("PLATFORM: serial# [%08lx]\n", *v); 542 printk("PLATFORM: serial# [%08llx]\n", *v);
543 v = mdesc_get_property(hp, pn, "stick-frequency", NULL); 543 v = mdesc_get_property(hp, pn, "stick-frequency", NULL);
544 printk("PLATFORM: stick-frequency [%08lx]\n", *v); 544 printk("PLATFORM: stick-frequency [%08llx]\n", *v);
545 v = mdesc_get_property(hp, pn, "mac-address", NULL); 545 v = mdesc_get_property(hp, pn, "mac-address", NULL);
546 if (v) 546 if (v)
547 printk("PLATFORM: mac-address [%lx]\n", *v); 547 printk("PLATFORM: mac-address [%llx]\n", *v);
548 v = mdesc_get_property(hp, pn, "watchdog-resolution", NULL); 548 v = mdesc_get_property(hp, pn, "watchdog-resolution", NULL);
549 if (v) 549 if (v)
550 printk("PLATFORM: watchdog-resolution [%lu ms]\n", *v); 550 printk("PLATFORM: watchdog-resolution [%llu ms]\n", *v);
551 v = mdesc_get_property(hp, pn, "watchdog-max-timeout", NULL); 551 v = mdesc_get_property(hp, pn, "watchdog-max-timeout", NULL);
552 if (v) 552 if (v)
553 printk("PLATFORM: watchdog-max-timeout [%lu ms]\n", *v); 553 printk("PLATFORM: watchdog-max-timeout [%llu ms]\n", *v);
554 v = mdesc_get_property(hp, pn, "max-cpus", NULL); 554 v = mdesc_get_property(hp, pn, "max-cpus", NULL);
555 if (v) 555 if (v)
556 printk("PLATFORM: max-cpus [%lu]\n", *v); 556 printk("PLATFORM: max-cpus [%llu]\n", *v);
557 557
558#ifdef CONFIG_SMP 558#ifdef CONFIG_SMP
559 { 559 {
diff --git a/arch/sparc/kernel/of_device_64.c b/arch/sparc/kernel/of_device_64.c
index 4873f28905b0..b4a12c9aa5f8 100644
--- a/arch/sparc/kernel/of_device_64.c
+++ b/arch/sparc/kernel/of_device_64.c
@@ -554,7 +554,7 @@ static void __init build_device_resources(struct of_device *op,
554 memset(r, 0, sizeof(*r)); 554 memset(r, 0, sizeof(*r));
555 555
556 if (of_resource_verbose) 556 if (of_resource_verbose)
557 printk("%s reg[%d] -> %lx\n", 557 printk("%s reg[%d] -> %llx\n",
558 op->node->full_name, index, 558 op->node->full_name, index,
559 result); 559 result);
560 560
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
index bdb7c0a6d83d..923e9bbb9fe2 100644
--- a/arch/sparc/kernel/pci.c
+++ b/arch/sparc/kernel/pci.c
@@ -223,7 +223,7 @@ static void pci_parse_of_addrs(struct of_device *op,
223 continue; 223 continue;
224 i = addrs[0] & 0xff; 224 i = addrs[0] & 0xff;
225 if (ofpci_verbose) 225 if (ofpci_verbose)
226 printk(" start: %lx, end: %lx, i: %x\n", 226 printk(" start: %llx, end: %llx, i: %x\n",
227 op_res->start, op_res->end, i); 227 op_res->start, op_res->end, i);
228 228
229 if (PCI_BASE_ADDRESS_0 <= i && i <= PCI_BASE_ADDRESS_5) { 229 if (PCI_BASE_ADDRESS_0 <= i && i <= PCI_BASE_ADDRESS_5) {
diff --git a/arch/sparc/kernel/pci_common.c b/arch/sparc/kernel/pci_common.c
index 23b88082d0b2..64e6edf17b9d 100644
--- a/arch/sparc/kernel/pci_common.c
+++ b/arch/sparc/kernel/pci_common.c
@@ -457,7 +457,7 @@ void pci_determine_mem_io_space(struct pci_pbm_info *pbm)
457 prom_halt(); 457 prom_halt();
458 } 458 }
459 459
460 printk("%s: PCI IO[%lx] MEM[%lx]\n", 460 printk("%s: PCI IO[%llx] MEM[%llx]\n",
461 pbm->name, 461 pbm->name,
462 pbm->io_space.start, 462 pbm->io_space.start,
463 pbm->mem_space.start); 463 pbm->mem_space.start);
diff --git a/arch/sparc/kernel/pci_msi.c b/arch/sparc/kernel/pci_msi.c
index 4ef282e81912..f1be37a7b123 100644
--- a/arch/sparc/kernel/pci_msi.c
+++ b/arch/sparc/kernel/pci_msi.c
@@ -426,8 +426,8 @@ void sparc64_pbm_msi_init(struct pci_pbm_info *pbm,
426 pbm->name, 426 pbm->name,
427 pbm->msi_first, pbm->msi_num, pbm->msi_data_mask, 427 pbm->msi_first, pbm->msi_num, pbm->msi_data_mask,
428 pbm->msix_data_width); 428 pbm->msix_data_width);
429 printk(KERN_INFO "%s: MSI addr32[0x%lx:0x%x] " 429 printk(KERN_INFO "%s: MSI addr32[0x%llx:0x%x] "
430 "addr64[0x%lx:0x%x]\n", 430 "addr64[0x%llx:0x%x]\n",
431 pbm->name, 431 pbm->name,
432 pbm->msi32_start, pbm->msi32_len, 432 pbm->msi32_start, pbm->msi32_len,
433 pbm->msi64_start, pbm->msi64_len); 433 pbm->msi64_start, pbm->msi64_len);
diff --git a/arch/sparc/kernel/pci_schizo.c b/arch/sparc/kernel/pci_schizo.c
index 45d9dba1ba11..2b5cdde77af7 100644
--- a/arch/sparc/kernel/pci_schizo.c
+++ b/arch/sparc/kernel/pci_schizo.c
@@ -794,7 +794,7 @@ static irqreturn_t schizo_safarierr_intr(int irq, void *dev_id)
794 pbm->controller_regs + SCHIZO_SAFARI_ERRLOG); 794 pbm->controller_regs + SCHIZO_SAFARI_ERRLOG);
795 795
796 if (!(errlog & BUS_ERROR_UNMAP)) { 796 if (!(errlog & BUS_ERROR_UNMAP)) {
797 printk("%s: Unexpected Safari/JBUS error interrupt, errlog[%016lx]\n", 797 printk("%s: Unexpected Safari/JBUS error interrupt, errlog[%016llx]\n",
798 pbm->name, errlog); 798 pbm->name, errlog);
799 799
800 return IRQ_HANDLED; 800 return IRQ_HANDLED;
diff --git a/arch/sparc/kernel/pci_sun4v.c b/arch/sparc/kernel/pci_sun4v.c
index 34a1fded3941..0ef0ab3d4763 100644
--- a/arch/sparc/kernel/pci_sun4v.c
+++ b/arch/sparc/kernel/pci_sun4v.c
@@ -73,7 +73,7 @@ static long iommu_batch_flush(struct iommu_batch *p)
73 if (unlikely(num < 0)) { 73 if (unlikely(num < 0)) {
74 if (printk_ratelimit()) 74 if (printk_ratelimit())
75 printk("iommu_batch_flush: IOMMU map of " 75 printk("iommu_batch_flush: IOMMU map of "
76 "[%08lx:%08lx:%lx:%lx:%lx] failed with " 76 "[%08lx:%08llx:%lx:%lx:%lx] failed with "
77 "status %ld\n", 77 "status %ld\n",
78 devhandle, HV_PCI_TSBID(0, entry), 78 devhandle, HV_PCI_TSBID(0, entry),
79 npages, prot, __pa(pglist), num); 79 npages, prot, __pa(pglist), num);
diff --git a/arch/sparc/kernel/power.c b/arch/sparc/kernel/power.c
index 076cad7f9757..ae88f06a7ec4 100644
--- a/arch/sparc/kernel/power.c
+++ b/arch/sparc/kernel/power.c
@@ -40,7 +40,7 @@ static int __devinit power_probe(struct of_device *op, const struct of_device_id
40 40
41 power_reg = of_ioremap(res, 0, 0x4, "power"); 41 power_reg = of_ioremap(res, 0, 0x4, "power");
42 42
43 printk(KERN_INFO "%s: Control reg at %lx\n", 43 printk(KERN_INFO "%s: Control reg at %llx\n",
44 op->node->name, res->start); 44 op->node->name, res->start);
45 45
46 if (has_button_interrupt(irq, op->node)) { 46 if (has_button_interrupt(irq, op->node)) {
diff --git a/arch/sparc/kernel/prom_irqtrans.c b/arch/sparc/kernel/prom_irqtrans.c
index 96958c4dce8e..5702ad4710cb 100644
--- a/arch/sparc/kernel/prom_irqtrans.c
+++ b/arch/sparc/kernel/prom_irqtrans.c
@@ -346,7 +346,7 @@ static void tomatillo_wsync_handler(unsigned int ino, void *_arg1, void *_arg2)
346 break; 346 break;
347 } 347 }
348 if (limit <= 0) { 348 if (limit <= 0) {
349 printk("tomatillo_wsync_handler: DMA won't sync [%lx:%lx]\n", 349 printk("tomatillo_wsync_handler: DMA won't sync [%llx:%llx]\n",
350 val, mask); 350 val, mask);
351 } 351 }
352 352
diff --git a/arch/sparc/kernel/psycho_common.c b/arch/sparc/kernel/psycho_common.c
index 790996428c14..40689ae3c9b0 100644
--- a/arch/sparc/kernel/psycho_common.c
+++ b/arch/sparc/kernel/psycho_common.c
@@ -94,7 +94,7 @@ static void psycho_check_stc_error(struct pci_pbm_info *pbm)
94 if (saw_error != 0) { 94 if (saw_error != 0) {
95 u64 tagval = stc_tag_buf[i]; 95 u64 tagval = stc_tag_buf[i];
96 u64 lineval = stc_line_buf[i]; 96 u64 lineval = stc_line_buf[i];
97 printk(KERN_ERR "%s: STC_TAG(%d)[PA(%016lx)VA(%08lx)" 97 printk(KERN_ERR "%s: STC_TAG(%d)[PA(%016llx)VA(%08llx)"
98 "V(%d)W(%d)]\n", 98 "V(%d)W(%d)]\n",
99 pbm->name, 99 pbm->name,
100 i, 100 i,
@@ -102,8 +102,8 @@ static void psycho_check_stc_error(struct pci_pbm_info *pbm)
102 (tagval & PSYCHO_STCTAG_VPN), 102 (tagval & PSYCHO_STCTAG_VPN),
103 ((tagval & PSYCHO_STCTAG_VALID) ? 1 : 0), 103 ((tagval & PSYCHO_STCTAG_VALID) ? 1 : 0),
104 ((tagval & PSYCHO_STCTAG_WRITE) ? 1 : 0)); 104 ((tagval & PSYCHO_STCTAG_WRITE) ? 1 : 0));
105 printk(KERN_ERR "%s: STC_LINE(%d)[LIDX(%lx)SP(%lx)" 105 printk(KERN_ERR "%s: STC_LINE(%d)[LIDX(%llx)SP(%llx)"
106 "LADDR(%lx)EP(%lx)V(%d)FOFN(%d)]\n", 106 "LADDR(%llx)EP(%llx)V(%d)FOFN(%d)]\n",
107 pbm->name, 107 pbm->name,
108 i, 108 i,
109 ((lineval & PSYCHO_STCLINE_LINDX) >> 21UL), 109 ((lineval & PSYCHO_STCLINE_LINDX) >> 21UL),
@@ -179,14 +179,14 @@ static void psycho_dump_iommu_tags_and_data(struct pci_pbm_info *pbm,
179 } 179 }
180 180
181 printk(KERN_ERR "%s: IOMMU TAG(%d)[error(%s) wr(%d) " 181 printk(KERN_ERR "%s: IOMMU TAG(%d)[error(%s) wr(%d) "
182 "str(%d) sz(%dK) vpg(%08lx)]\n", 182 "str(%d) sz(%dK) vpg(%08llx)]\n",
183 pbm->name, i, type_str, 183 pbm->name, i, type_str,
184 ((tag_val & PSYCHO_IOMMU_TAG_WRITE) ? 1 : 0), 184 ((tag_val & PSYCHO_IOMMU_TAG_WRITE) ? 1 : 0),
185 ((tag_val & PSYCHO_IOMMU_TAG_STREAM) ? 1 : 0), 185 ((tag_val & PSYCHO_IOMMU_TAG_STREAM) ? 1 : 0),
186 ((tag_val & PSYCHO_IOMMU_TAG_SIZE) ? 64 : 8), 186 ((tag_val & PSYCHO_IOMMU_TAG_SIZE) ? 64 : 8),
187 (tag_val & PSYCHO_IOMMU_TAG_VPAGE) << IOMMU_PAGE_SHIFT); 187 (tag_val & PSYCHO_IOMMU_TAG_VPAGE) << IOMMU_PAGE_SHIFT);
188 printk(KERN_ERR "%s: IOMMU DATA(%d)[valid(%d) cache(%d) " 188 printk(KERN_ERR "%s: IOMMU DATA(%d)[valid(%d) cache(%d) "
189 "ppg(%016lx)]\n", 189 "ppg(%016llx)]\n",
190 pbm->name, i, 190 pbm->name, i,
191 ((data_val & PSYCHO_IOMMU_DATA_VALID) ? 1 : 0), 191 ((data_val & PSYCHO_IOMMU_DATA_VALID) ? 1 : 0),
192 ((data_val & PSYCHO_IOMMU_DATA_CACHE) ? 1 : 0), 192 ((data_val & PSYCHO_IOMMU_DATA_CACHE) ? 1 : 0),
@@ -326,12 +326,12 @@ irqreturn_t psycho_pcierr_intr(int irq, void *dev_id)
326 "Excessive Retries" : 326 "Excessive Retries" :
327 ((error_bits & PSYCHO_PCIAFSR_PPERR) ? 327 ((error_bits & PSYCHO_PCIAFSR_PPERR) ?
328 "Parity Error" : "???")))))); 328 "Parity Error" : "???"))))));
329 printk(KERN_ERR "%s: bytemask[%04lx] UPA_MID[%02lx] was_block(%d)\n", 329 printk(KERN_ERR "%s: bytemask[%04llx] UPA_MID[%02llx] was_block(%d)\n",
330 pbm->name, 330 pbm->name,
331 (afsr & PSYCHO_PCIAFSR_BMSK) >> 32UL, 331 (afsr & PSYCHO_PCIAFSR_BMSK) >> 32UL,
332 (afsr & PSYCHO_PCIAFSR_MID) >> 25UL, 332 (afsr & PSYCHO_PCIAFSR_MID) >> 25UL,
333 (afsr & PSYCHO_PCIAFSR_BLK) ? 1 : 0); 333 (afsr & PSYCHO_PCIAFSR_BLK) ? 1 : 0);
334 printk(KERN_ERR "%s: PCI AFAR [%016lx]\n", pbm->name, afar); 334 printk(KERN_ERR "%s: PCI AFAR [%016llx]\n", pbm->name, afar);
335 printk(KERN_ERR "%s: PCI Secondary errors [", pbm->name); 335 printk(KERN_ERR "%s: PCI Secondary errors [", pbm->name);
336 reported = 0; 336 reported = 0;
337 if (afsr & PSYCHO_PCIAFSR_SMA) { 337 if (afsr & PSYCHO_PCIAFSR_SMA) {
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c
index 46329799f346..6cd1a5b65067 100644
--- a/arch/sparc/kernel/smp_64.c
+++ b/arch/sparc/kernel/smp_64.c
@@ -449,7 +449,7 @@ again:
449 __asm__ __volatile__("wrpr %0, 0x0, %%pstate" 449 __asm__ __volatile__("wrpr %0, 0x0, %%pstate"
450 : : "r" (pstate)); 450 : : "r" (pstate));
451 if (stuck == 0) { 451 if (stuck == 0) {
452 printk("CPU[%d]: mondo stuckage result[%016lx]\n", 452 printk("CPU[%d]: mondo stuckage result[%016llx]\n",
453 smp_processor_id(), result); 453 smp_processor_id(), result);
454 } else { 454 } else {
455 udelay(2); 455 udelay(2);
@@ -584,7 +584,7 @@ retry:
584 /* Busy bits will not clear, continue instead 584 /* Busy bits will not clear, continue instead
585 * of freezing up on this cpu. 585 * of freezing up on this cpu.
586 */ 586 */
587 printk("CPU[%d]: mondo stuckage result[%016lx]\n", 587 printk("CPU[%d]: mondo stuckage result[%016llx]\n",
588 smp_processor_id(), dispatch_stat); 588 smp_processor_id(), dispatch_stat);
589 } else { 589 } else {
590 int i, this_busy_nack = 0; 590 int i, this_busy_nack = 0;
diff --git a/arch/sparc/kernel/time_64.c b/arch/sparc/kernel/time_64.c
index 9df8f095a8b1..54405d362148 100644
--- a/arch/sparc/kernel/time_64.c
+++ b/arch/sparc/kernel/time_64.c
@@ -106,7 +106,7 @@ static void tick_init_tick(void)
106 tick_disable_irq(); 106 tick_disable_irq();
107} 107}
108 108
109static unsigned long tick_get_tick(void) 109static unsigned long long tick_get_tick(void)
110{ 110{
111 unsigned long ret; 111 unsigned long ret;
112 112
@@ -208,7 +208,7 @@ static void stick_init_tick(void)
208 stick_disable_irq(); 208 stick_disable_irq();
209} 209}
210 210
211static unsigned long stick_get_tick(void) 211static unsigned long long stick_get_tick(void)
212{ 212{
213 unsigned long ret; 213 unsigned long ret;
214 214
@@ -352,7 +352,7 @@ static void hbtick_init_tick(void)
352 hbtick_disable_irq(); 352 hbtick_disable_irq();
353} 353}
354 354
355static unsigned long hbtick_get_tick(void) 355static unsigned long long hbtick_get_tick(void)
356{ 356{
357 return __hbird_read_stick() & ~TICK_PRIV_BIT; 357 return __hbird_read_stick() & ~TICK_PRIV_BIT;
358} 358}
@@ -422,7 +422,7 @@ static int __devinit rtc_probe(struct of_device *op, const struct of_device_id *
422{ 422{
423 struct resource *r; 423 struct resource *r;
424 424
425 printk(KERN_INFO "%s: RTC regs at 0x%lx\n", 425 printk(KERN_INFO "%s: RTC regs at 0x%llx\n",
426 op->node->full_name, op->resource[0].start); 426 op->node->full_name, op->resource[0].start);
427 427
428 /* The CMOS RTC driver only accepts IORESOURCE_IO, so cons 428 /* The CMOS RTC driver only accepts IORESOURCE_IO, so cons
@@ -478,7 +478,7 @@ static struct platform_device rtc_bq4802_device = {
478static int __devinit bq4802_probe(struct of_device *op, const struct of_device_id *match) 478static int __devinit bq4802_probe(struct of_device *op, const struct of_device_id *match)
479{ 479{
480 480
481 printk(KERN_INFO "%s: BQ4802 regs at 0x%lx\n", 481 printk(KERN_INFO "%s: BQ4802 regs at 0x%llx\n",
482 op->node->full_name, op->resource[0].start); 482 op->node->full_name, op->resource[0].start);
483 483
484 rtc_bq4802_device.resource = &op->resource[0]; 484 rtc_bq4802_device.resource = &op->resource[0];
@@ -542,7 +542,7 @@ static int __devinit mostek_probe(struct of_device *op, const struct of_device_i
542 strcmp(dp->parent->parent->name, "central") != 0) 542 strcmp(dp->parent->parent->name, "central") != 0)
543 return -ENODEV; 543 return -ENODEV;
544 544
545 printk(KERN_INFO "%s: Mostek regs at 0x%lx\n", 545 printk(KERN_INFO "%s: Mostek regs at 0x%llx\n",
546 dp->full_name, op->resource[0].start); 546 dp->full_name, op->resource[0].start);
547 547
548 m48t59_rtc.resource = &op->resource[0]; 548 m48t59_rtc.resource = &op->resource[0];
diff --git a/arch/sparc/kernel/traps_64.c b/arch/sparc/kernel/traps_64.c
index 4638af2f55a0..bca3b4e09c41 100644
--- a/arch/sparc/kernel/traps_64.c
+++ b/arch/sparc/kernel/traps_64.c
@@ -1168,20 +1168,20 @@ static void cheetah_log_errors(struct pt_regs *regs, struct cheetah_err_info *in
1168 } 1168 }
1169 1169
1170 /* Now dump the cache snapshots. */ 1170 /* Now dump the cache snapshots. */
1171 printk("%s" "ERROR(%d): D-cache idx[%x] tag[%016lx] utag[%016lx] stag[%016lx]\n", 1171 printk("%s" "ERROR(%d): D-cache idx[%x] tag[%016llx] utag[%016llx] stag[%016llx]\n",
1172 (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), 1172 (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(),
1173 (int) info->dcache_index, 1173 (int) info->dcache_index,
1174 info->dcache_tag, 1174 info->dcache_tag,
1175 info->dcache_utag, 1175 info->dcache_utag,
1176 info->dcache_stag); 1176 info->dcache_stag);
1177 printk("%s" "ERROR(%d): D-cache data0[%016lx] data1[%016lx] data2[%016lx] data3[%016lx]\n", 1177 printk("%s" "ERROR(%d): D-cache data0[%016llx] data1[%016llx] data2[%016llx] data3[%016llx]\n",
1178 (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), 1178 (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(),
1179 info->dcache_data[0], 1179 info->dcache_data[0],
1180 info->dcache_data[1], 1180 info->dcache_data[1],
1181 info->dcache_data[2], 1181 info->dcache_data[2],
1182 info->dcache_data[3]); 1182 info->dcache_data[3]);
1183 printk("%s" "ERROR(%d): I-cache idx[%x] tag[%016lx] utag[%016lx] stag[%016lx] " 1183 printk("%s" "ERROR(%d): I-cache idx[%x] tag[%016llx] utag[%016llx] stag[%016llx] "
1184 "u[%016lx] l[%016lx]\n", 1184 "u[%016llx] l[%016llx]\n",
1185 (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), 1185 (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(),
1186 (int) info->icache_index, 1186 (int) info->icache_index,
1187 info->icache_tag, 1187 info->icache_tag,
@@ -1189,22 +1189,22 @@ static void cheetah_log_errors(struct pt_regs *regs, struct cheetah_err_info *in
1189 info->icache_stag, 1189 info->icache_stag,
1190 info->icache_upper, 1190 info->icache_upper,
1191 info->icache_lower); 1191 info->icache_lower);
1192 printk("%s" "ERROR(%d): I-cache INSN0[%016lx] INSN1[%016lx] INSN2[%016lx] INSN3[%016lx]\n", 1192 printk("%s" "ERROR(%d): I-cache INSN0[%016llx] INSN1[%016llx] INSN2[%016llx] INSN3[%016llx]\n",
1193 (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), 1193 (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(),
1194 info->icache_data[0], 1194 info->icache_data[0],
1195 info->icache_data[1], 1195 info->icache_data[1],
1196 info->icache_data[2], 1196 info->icache_data[2],
1197 info->icache_data[3]); 1197 info->icache_data[3]);
1198 printk("%s" "ERROR(%d): I-cache INSN4[%016lx] INSN5[%016lx] INSN6[%016lx] INSN7[%016lx]\n", 1198 printk("%s" "ERROR(%d): I-cache INSN4[%016llx] INSN5[%016llx] INSN6[%016llx] INSN7[%016llx]\n",
1199 (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), 1199 (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(),
1200 info->icache_data[4], 1200 info->icache_data[4],
1201 info->icache_data[5], 1201 info->icache_data[5],
1202 info->icache_data[6], 1202 info->icache_data[6],
1203 info->icache_data[7]); 1203 info->icache_data[7]);
1204 printk("%s" "ERROR(%d): E-cache idx[%x] tag[%016lx]\n", 1204 printk("%s" "ERROR(%d): E-cache idx[%x] tag[%016llx]\n",
1205 (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), 1205 (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(),
1206 (int) info->ecache_index, info->ecache_tag); 1206 (int) info->ecache_index, info->ecache_tag);
1207 printk("%s" "ERROR(%d): E-cache data0[%016lx] data1[%016lx] data2[%016lx] data3[%016lx]\n", 1207 printk("%s" "ERROR(%d): E-cache data0[%016llx] data1[%016llx] data2[%016llx] data3[%016llx]\n",
1208 (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), 1208 (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(),
1209 info->ecache_data[0], 1209 info->ecache_data[0],
1210 info->ecache_data[1], 1210 info->ecache_data[1],
@@ -1794,7 +1794,7 @@ static void sun4v_log_error(struct pt_regs *regs, struct sun4v_error_entry *ent,
1794 int cnt; 1794 int cnt;
1795 1795
1796 printk("%s: Reporting on cpu %d\n", pfx, cpu); 1796 printk("%s: Reporting on cpu %d\n", pfx, cpu);
1797 printk("%s: err_handle[%lx] err_stick[%lx] err_type[%08x:%s]\n", 1797 printk("%s: err_handle[%llx] err_stick[%llx] err_type[%08x:%s]\n",
1798 pfx, 1798 pfx,
1799 ent->err_handle, ent->err_stick, 1799 ent->err_handle, ent->err_stick,
1800 ent->err_type, 1800 ent->err_type,
@@ -1818,7 +1818,7 @@ static void sun4v_log_error(struct pt_regs *regs, struct sun4v_error_entry *ent,
1818 "privileged" : ""), 1818 "privileged" : ""),
1819 ((ent->err_attrs & SUN4V_ERR_ATTRS_RES_QUEUE_FULL) ? 1819 ((ent->err_attrs & SUN4V_ERR_ATTRS_RES_QUEUE_FULL) ?
1820 "queue-full" : "")); 1820 "queue-full" : ""));
1821 printk("%s: err_raddr[%016lx] err_size[%u] err_cpu[%u]\n", 1821 printk("%s: err_raddr[%016llx] err_size[%u] err_cpu[%u]\n",
1822 pfx, 1822 pfx,
1823 ent->err_raddr, ent->err_size, ent->err_cpu); 1823 ent->err_raddr, ent->err_size, ent->err_cpu);
1824 1824
diff --git a/arch/sparc/kernel/unaligned_64.c b/arch/sparc/kernel/unaligned_64.c
index 203ddfad9f27..f164d5a850f9 100644
--- a/arch/sparc/kernel/unaligned_64.c
+++ b/arch/sparc/kernel/unaligned_64.c
@@ -601,11 +601,15 @@ void handle_lddfmna(struct pt_regs *regs, unsigned long sfar, unsigned long sfsr
601 pc = (u32)pc; 601 pc = (u32)pc;
602 if (get_user(insn, (u32 __user *) pc) != -EFAULT) { 602 if (get_user(insn, (u32 __user *) pc) != -EFAULT) {
603 int asi = decode_asi(insn, regs); 603 int asi = decode_asi(insn, regs);
604 int err;
605
604 if ((asi > ASI_SNFL) || 606 if ((asi > ASI_SNFL) ||
605 (asi < ASI_P)) 607 (asi < ASI_P))
606 goto daex; 608 goto daex;
607 if (get_user(first, (u32 __user *)sfar) || 609 err = get_user(first, (u32 __user *)sfar);
608 get_user(second, (u32 __user *)(sfar + 4))) { 610 if (!err)
611 err = get_user(second, (u32 __user *)(sfar + 4));
612 if (err) {
609 if (asi & 0x2) /* NF */ { 613 if (asi & 0x2) /* NF */ {
610 first = 0; second = 0; 614 first = 0; second = 0;
611 } else 615 } else
diff --git a/arch/sparc/kernel/vio.c b/arch/sparc/kernel/vio.c
index 92b1f8ec01de..753d128ed158 100644
--- a/arch/sparc/kernel/vio.c
+++ b/arch/sparc/kernel/vio.c
@@ -263,10 +263,10 @@ static struct vio_dev *vio_create_one(struct mdesc_handle *hp, u64 mp,
263 dev_set_name(&vdev->dev, "%s", bus_id_name); 263 dev_set_name(&vdev->dev, "%s", bus_id_name);
264 vdev->dev_no = ~(u64)0; 264 vdev->dev_no = ~(u64)0;
265 } else if (!cfg_handle) { 265 } else if (!cfg_handle) {
266 dev_set_name(&vdev->dev, "%s-%lu", bus_id_name, *id); 266 dev_set_name(&vdev->dev, "%s-%llu", bus_id_name, *id);
267 vdev->dev_no = *id; 267 vdev->dev_no = *id;
268 } else { 268 } else {
269 dev_set_name(&vdev->dev, "%s-%lu-%lu", bus_id_name, 269 dev_set_name(&vdev->dev, "%s-%llu-%llu", bus_id_name,
270 *cfg_handle, *id); 270 *cfg_handle, *id);
271 vdev->dev_no = *cfg_handle; 271 vdev->dev_no = *cfg_handle;
272 } 272 }
diff --git a/arch/sparc/kernel/viohs.c b/arch/sparc/kernel/viohs.c
index 708fa1705fbe..aa6ac70d4fd5 100644
--- a/arch/sparc/kernel/viohs.c
+++ b/arch/sparc/kernel/viohs.c
@@ -337,8 +337,10 @@ static int process_ver_nack(struct vio_driver_state *vio,
337 viodbg(HS, "GOT VERSION NACK maj[%u] min[%u] devclass[%u]\n", 337 viodbg(HS, "GOT VERSION NACK maj[%u] min[%u] devclass[%u]\n",
338 pkt->major, pkt->minor, pkt->dev_class); 338 pkt->major, pkt->minor, pkt->dev_class);
339 339
340 if ((pkt->major == 0 && pkt->minor == 0) || 340 if (pkt->major == 0 && pkt->minor == 0)
341 !(nver = find_by_major(vio, pkt->major))) 341 return handshake_failure(vio);
342 nver = find_by_major(vio, pkt->major);
343 if (!nver)
342 return handshake_failure(vio); 344 return handshake_failure(vio);
343 345
344 if (send_version(vio, nver->major, nver->minor) < 0) 346 if (send_version(vio, nver->major, nver->minor) < 0)
diff --git a/arch/sparc/mm/fault_32.c b/arch/sparc/mm/fault_32.c
index a507e1174662..12e447fc8542 100644
--- a/arch/sparc/mm/fault_32.c
+++ b/arch/sparc/mm/fault_32.c
@@ -283,7 +283,8 @@ bad_area_nosemaphore:
283 /* Is this in ex_table? */ 283 /* Is this in ex_table? */
284no_context: 284no_context:
285 g2 = regs->u_regs[UREG_G2]; 285 g2 = regs->u_regs[UREG_G2];
286 if (!from_user && (fixup = search_extables_range(regs->pc, &g2))) { 286 if (!from_user) {
287 fixup = search_extables_range(regs->pc, &g2);
287 if (fixup > 10) { /* Values below are reserved for other things */ 288 if (fixup > 10) { /* Values below are reserved for other things */
288 extern const unsigned __memset_start[]; 289 extern const unsigned __memset_start[];
289 extern const unsigned __memset_end[]; 290 extern const unsigned __memset_end[];
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index 6ea73da29312..c77c7ef5d5d4 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -258,21 +258,16 @@ static inline void tsb_insert(struct tsb *ent, unsigned long tag, unsigned long
258unsigned long _PAGE_ALL_SZ_BITS __read_mostly; 258unsigned long _PAGE_ALL_SZ_BITS __read_mostly;
259unsigned long _PAGE_SZBITS __read_mostly; 259unsigned long _PAGE_SZBITS __read_mostly;
260 260
261void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t pte) 261static void flush_dcache(unsigned long pfn)
262{ 262{
263 struct mm_struct *mm; 263 struct page *page;
264 struct tsb *tsb;
265 unsigned long tag, flags;
266 unsigned long tsb_index, tsb_hash_shift;
267 264
268 if (tlb_type != hypervisor) { 265 page = pfn_to_page(pfn);
269 unsigned long pfn = pte_pfn(pte); 266 if (page && page_mapping(page)) {
270 unsigned long pg_flags; 267 unsigned long pg_flags;
271 struct page *page;
272 268
273 if (pfn_valid(pfn) && 269 pg_flags = page->flags;
274 (page = pfn_to_page(pfn), page_mapping(page)) && 270 if (pg_flags & (1UL << PG_dcache_dirty)) {
275 ((pg_flags = page->flags) & (1UL << PG_dcache_dirty))) {
276 int cpu = ((pg_flags >> PG_dcache_cpu_shift) & 271 int cpu = ((pg_flags >> PG_dcache_cpu_shift) &
277 PG_dcache_cpu_mask); 272 PG_dcache_cpu_mask);
278 int this_cpu = get_cpu(); 273 int this_cpu = get_cpu();
@@ -290,6 +285,21 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t p
290 put_cpu(); 285 put_cpu();
291 } 286 }
292 } 287 }
288}
289
290void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t pte)
291{
292 struct mm_struct *mm;
293 struct tsb *tsb;
294 unsigned long tag, flags;
295 unsigned long tsb_index, tsb_hash_shift;
296
297 if (tlb_type != hypervisor) {
298 unsigned long pfn = pte_pfn(pte);
299
300 if (pfn_valid(pfn))
301 flush_dcache(pfn);
302 }
293 303
294 mm = vma->vm_mm; 304 mm = vma->vm_mm;
295 305
@@ -769,8 +779,8 @@ static int find_node(unsigned long addr)
769 return -1; 779 return -1;
770} 780}
771 781
772static unsigned long nid_range(unsigned long start, unsigned long end, 782static unsigned long long nid_range(unsigned long long start,
773 int *nid) 783 unsigned long long end, int *nid)
774{ 784{
775 *nid = find_node(start); 785 *nid = find_node(start);
776 start += PAGE_SIZE; 786 start += PAGE_SIZE;
@@ -788,8 +798,8 @@ static unsigned long nid_range(unsigned long start, unsigned long end,
788 return start; 798 return start;
789} 799}
790#else 800#else
791static unsigned long nid_range(unsigned long start, unsigned long end, 801static unsigned long long nid_range(unsigned long long start,
792 int *nid) 802 unsigned long long end, int *nid)
793{ 803{
794 *nid = 0; 804 *nid = 0;
795 return end; 805 return end;
@@ -1016,8 +1026,8 @@ static int __init grab_mlgroups(struct mdesc_handle *md)
1016 val = mdesc_get_property(md, node, "address-mask", NULL); 1026 val = mdesc_get_property(md, node, "address-mask", NULL);
1017 m->mask = *val; 1027 m->mask = *val;
1018 1028
1019 numadbg("MLGROUP[%d]: node[%lx] latency[%lx] " 1029 numadbg("MLGROUP[%d]: node[%llx] latency[%llx] "
1020 "match[%lx] mask[%lx]\n", 1030 "match[%llx] mask[%llx]\n",
1021 count - 1, m->node, m->latency, m->match, m->mask); 1031 count - 1, m->node, m->latency, m->match, m->mask);
1022 } 1032 }
1023 1033
@@ -1056,7 +1066,7 @@ static int __init grab_mblocks(struct mdesc_handle *md)
1056 "address-congruence-offset", NULL); 1066 "address-congruence-offset", NULL);
1057 m->offset = *val; 1067 m->offset = *val;
1058 1068
1059 numadbg("MBLOCK[%d]: base[%lx] size[%lx] offset[%lx]\n", 1069 numadbg("MBLOCK[%d]: base[%llx] size[%llx] offset[%llx]\n",
1060 count - 1, m->base, m->size, m->offset); 1070 count - 1, m->base, m->size, m->offset);
1061 } 1071 }
1062 1072
@@ -1127,7 +1137,7 @@ static int __init numa_attach_mlgroup(struct mdesc_handle *md, u64 grp,
1127 n->mask = candidate->mask; 1137 n->mask = candidate->mask;
1128 n->val = candidate->match; 1138 n->val = candidate->match;
1129 1139
1130 numadbg("NUMA NODE[%d]: mask[%lx] val[%lx] (latency[%lx])\n", 1140 numadbg("NUMA NODE[%d]: mask[%lx] val[%lx] (latency[%llx])\n",
1131 index, n->mask, n->val, candidate->latency); 1141 index, n->mask, n->val, candidate->latency);
1132 1142
1133 return 0; 1143 return 0;
diff --git a/drivers/block/sunvdc.c b/drivers/block/sunvdc.c
index 953c0b83d758..5861e33efe63 100644
--- a/drivers/block/sunvdc.c
+++ b/drivers/block/sunvdc.c
@@ -153,7 +153,7 @@ static int vdc_send_attr(struct vio_driver_state *vio)
153 pkt.vdisk_block_size = port->vdisk_block_size; 153 pkt.vdisk_block_size = port->vdisk_block_size;
154 pkt.max_xfer_size = port->max_xfer_size; 154 pkt.max_xfer_size = port->max_xfer_size;
155 155
156 viodbg(HS, "SEND ATTR xfer_mode[0x%x] blksz[%u] max_xfer[%lu]\n", 156 viodbg(HS, "SEND ATTR xfer_mode[0x%x] blksz[%u] max_xfer[%llu]\n",
157 pkt.xfer_mode, pkt.vdisk_block_size, pkt.max_xfer_size); 157 pkt.xfer_mode, pkt.vdisk_block_size, pkt.max_xfer_size);
158 158
159 return vio_ldc_send(&port->vio, &pkt, sizeof(pkt)); 159 return vio_ldc_send(&port->vio, &pkt, sizeof(pkt));
@@ -164,8 +164,8 @@ static int vdc_handle_attr(struct vio_driver_state *vio, void *arg)
164 struct vdc_port *port = to_vdc_port(vio); 164 struct vdc_port *port = to_vdc_port(vio);
165 struct vio_disk_attr_info *pkt = arg; 165 struct vio_disk_attr_info *pkt = arg;
166 166
167 viodbg(HS, "GOT ATTR stype[0x%x] ops[%lx] disk_size[%lu] disk_type[%x] " 167 viodbg(HS, "GOT ATTR stype[0x%x] ops[%llx] disk_size[%llu] disk_type[%x] "
168 "xfer_mode[0x%x] blksz[%u] max_xfer[%lu]\n", 168 "xfer_mode[0x%x] blksz[%u] max_xfer[%llu]\n",
169 pkt->tag.stype, pkt->operations, 169 pkt->tag.stype, pkt->operations,
170 pkt->vdisk_size, pkt->vdisk_type, 170 pkt->vdisk_size, pkt->vdisk_type,
171 pkt->xfer_mode, pkt->vdisk_block_size, 171 pkt->xfer_mode, pkt->vdisk_block_size,
@@ -753,7 +753,7 @@ static int __devinit vdc_port_probe(struct vio_dev *vdev,
753 753
754 err = -ENODEV; 754 err = -ENODEV;
755 if ((vdev->dev_no << PARTITION_SHIFT) & ~(u64)MINORMASK) { 755 if ((vdev->dev_no << PARTITION_SHIFT) & ~(u64)MINORMASK) {
756 printk(KERN_ERR PFX "Port id [%lu] too large.\n", 756 printk(KERN_ERR PFX "Port id [%llu] too large.\n",
757 vdev->dev_no); 757 vdev->dev_no);
758 goto err_out_release_mdesc; 758 goto err_out_release_mdesc;
759 } 759 }
diff --git a/drivers/char/hw_random/n2-drv.c b/drivers/char/hw_random/n2-drv.c
index 8859aeac2d25..9b3e09cd41f9 100644
--- a/drivers/char/hw_random/n2-drv.c
+++ b/drivers/char/hw_random/n2-drv.c
@@ -482,7 +482,7 @@ static void n2rng_dump_test_buffer(struct n2rng *np)
482 int i; 482 int i;
483 483
484 for (i = 0; i < SELFTEST_BUFFER_WORDS; i++) 484 for (i = 0; i < SELFTEST_BUFFER_WORDS; i++)
485 dev_err(&np->op->dev, "Test buffer slot %d [0x%016lx]\n", 485 dev_err(&np->op->dev, "Test buffer slot %d [0x%016llx]\n",
486 i, np->test_buffer[i]); 486 i, np->test_buffer[i]);
487} 487}
488 488
diff --git a/drivers/net/sunvnet.c b/drivers/net/sunvnet.c
index 233f1cda36e5..611230fef2b6 100644
--- a/drivers/net/sunvnet.c
+++ b/drivers/net/sunvnet.c
@@ -336,7 +336,7 @@ static int vnet_walk_rx_one(struct vnet_port *port,
336 if (IS_ERR(desc)) 336 if (IS_ERR(desc))
337 return PTR_ERR(desc); 337 return PTR_ERR(desc);
338 338
339 viodbg(DATA, "vio_walk_rx_one desc[%02x:%02x:%08x:%08x:%lx:%lx]\n", 339 viodbg(DATA, "vio_walk_rx_one desc[%02x:%02x:%08x:%08x:%llx:%llx]\n",
340 desc->hdr.state, desc->hdr.ack, 340 desc->hdr.state, desc->hdr.ack,
341 desc->size, desc->ncookies, 341 desc->size, desc->ncookies,
342 desc->cookies[0].cookie_addr, 342 desc->cookies[0].cookie_addr,
@@ -394,14 +394,14 @@ static int vnet_rx(struct vnet_port *port, void *msgbuf)
394 struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_RX_RING]; 394 struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_RX_RING];
395 struct vio_driver_state *vio = &port->vio; 395 struct vio_driver_state *vio = &port->vio;
396 396
397 viodbg(DATA, "vnet_rx stype_env[%04x] seq[%016lx] rcv_nxt[%016lx]\n", 397 viodbg(DATA, "vnet_rx stype_env[%04x] seq[%016llx] rcv_nxt[%016llx]\n",
398 pkt->tag.stype_env, pkt->seq, dr->rcv_nxt); 398 pkt->tag.stype_env, pkt->seq, dr->rcv_nxt);
399 399
400 if (unlikely(pkt->tag.stype_env != VIO_DRING_DATA)) 400 if (unlikely(pkt->tag.stype_env != VIO_DRING_DATA))
401 return 0; 401 return 0;
402 if (unlikely(pkt->seq != dr->rcv_nxt)) { 402 if (unlikely(pkt->seq != dr->rcv_nxt)) {
403 printk(KERN_ERR PFX "RX out of sequence seq[0x%lx] " 403 printk(KERN_ERR PFX "RX out of sequence seq[0x%llx] "
404 "rcv_nxt[0x%lx]\n", pkt->seq, dr->rcv_nxt); 404 "rcv_nxt[0x%llx]\n", pkt->seq, dr->rcv_nxt);
405 return 0; 405 return 0;
406 } 406 }
407 407
diff --git a/drivers/sbus/char/display7seg.c b/drivers/sbus/char/display7seg.c
index 2550af4ae432..4431578d8c45 100644
--- a/drivers/sbus/char/display7seg.c
+++ b/drivers/sbus/char/display7seg.c
@@ -214,7 +214,7 @@ static int __devinit d7s_probe(struct of_device *op,
214 214
215 writeb(regs, p->regs); 215 writeb(regs, p->regs);
216 216
217 printk(KERN_INFO PFX "7-Segment Display%s at [%s:0x%lx] %s\n", 217 printk(KERN_INFO PFX "7-Segment Display%s at [%s:0x%llx] %s\n",
218 op->node->full_name, 218 op->node->full_name,
219 (regs & D7S_FLIP) ? " (FLIPPED)" : "", 219 (regs & D7S_FLIP) ? " (FLIPPED)" : "",
220 op->resource[0].start, 220 op->resource[0].start,
diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c
index d44bf98e965e..41c387587474 100644
--- a/sound/sparc/cs4231.c
+++ b/sound/sparc/cs4231.c
@@ -2057,7 +2057,7 @@ static int __devinit cs4231_ebus_probe(struct of_device *op, const struct of_dev
2057 if (err) 2057 if (err)
2058 return err; 2058 return err;
2059 2059
2060 sprintf(card->longname, "%s at 0x%lx, irq %d", 2060 sprintf(card->longname, "%s at 0x%llx, irq %d",
2061 card->shortname, 2061 card->shortname,
2062 op->resource[0].start, 2062 op->resource[0].start,
2063 op->irqs[0]); 2063 op->irqs[0]);