diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-07 17:23:53 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-07 17:23:53 -0800 |
commit | 9e42d0cf5020aaf217433cad1a224745241d212a (patch) | |
tree | 8d64537c600024a4220d1309873ac3467726c3b0 /arch/sparc | |
parent | 97c440ba41d4e7cddb8e14c7c7ec49dad2560709 (diff) | |
parent | 18b8e08e290e9df588f51f5a7df50555f5a25664 (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
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/include/asm/timer_64.h | 2 | ||||
-rw-r--r-- | arch/sparc/include/asm/types.h | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/ds.c | 34 | ||||
-rw-r--r-- | arch/sparc/kernel/iommu.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/ldc.c | 23 | ||||
-rw-r--r-- | arch/sparc/kernel/mdesc.c | 14 | ||||
-rw-r--r-- | arch/sparc/kernel/of_device_64.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/pci.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_common.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_msi.c | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_schizo.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_sun4v.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/power.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/prom_irqtrans.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/psycho_common.c | 14 | ||||
-rw-r--r-- | arch/sparc/kernel/smp_64.c | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/time_64.c | 12 | ||||
-rw-r--r-- | arch/sparc/kernel/traps_64.c | 20 | ||||
-rw-r--r-- | arch/sparc/kernel/unaligned_64.c | 8 | ||||
-rw-r--r-- | arch/sparc/kernel/vio.c | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/viohs.c | 6 | ||||
-rw-r--r-- | arch/sparc/mm/fault_32.c | 3 | ||||
-rw-r--r-- | arch/sparc/mm/init_64.c | 48 |
23 files changed, 116 insertions, 98 deletions
diff --git a/arch/sparc/include/asm/timer_64.h b/arch/sparc/include/asm/timer_64.h index 5b779fd1f78..ef3c3682deb 100644 --- a/arch/sparc/include/asm/timer_64.h +++ b/arch/sparc/include/asm/timer_64.h @@ -10,7 +10,7 @@ #include <linux/init.h> struct sparc64_tick_ops { - unsigned long (*get_tick)(void); + unsigned long long (*get_tick)(void); int (*add_compare)(unsigned long); unsigned long softint_mask; void (*disable_irq)(void); diff --git a/arch/sparc/include/asm/types.h b/arch/sparc/include/asm/types.h index 8c28fde5eaa..2237118825d 100644 --- a/arch/sparc/include/asm/types.h +++ b/arch/sparc/include/asm/types.h @@ -11,7 +11,7 @@ #if defined(__sparc__) && defined(__arch64__) /*** SPARC 64 bit ***/ -#include <asm-generic/int-l64.h> +#include <asm-generic/int-ll64.h> #ifndef __ASSEMBLY__ diff --git a/arch/sparc/kernel/ds.c b/arch/sparc/kernel/ds.c index f52e0534d91..57c39843fb2 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, rp = (struct ds_md_update_req *) (dpkt + 1); - printk(KERN_INFO "ds-%lu: Machine description update.\n", dp->id); + printk(KERN_INFO "ds-%llu: Machine description update.\n", dp->id); mdesc_update(); @@ -325,7 +325,7 @@ static void domain_shutdown_data(struct ds_info *dp, rp = (struct ds_shutdown_req *) (dpkt + 1); - printk(KERN_ALERT "ds-%lu: Shutdown request from " + printk(KERN_ALERT "ds-%llu: Shutdown request from " "LDOM manager received.\n", dp->id); memset(&pkt, 0, sizeof(pkt)); @@ -365,7 +365,7 @@ static void domain_panic_data(struct ds_info *dp, rp = (struct ds_panic_req *) (dpkt + 1); - printk(KERN_ALERT "ds-%lu: Panic request from " + printk(KERN_ALERT "ds-%llu: Panic request from " "LDOM manager received.\n", dp->id); memset(&pkt, 0, sizeof(pkt)); @@ -549,7 +549,7 @@ static int __cpuinit dr_cpu_configure(struct ds_info *dp, for_each_cpu_mask(cpu, *mask) { int err; - printk(KERN_INFO "ds-%lu: Starting cpu %d...\n", + printk(KERN_INFO "ds-%llu: Starting cpu %d...\n", dp->id, cpu); err = cpu_up(cpu); if (err) { @@ -565,7 +565,7 @@ static int __cpuinit dr_cpu_configure(struct ds_info *dp, res = DR_CPU_RES_CPU_NOT_RESPONDING; } - printk(KERN_INFO "ds-%lu: CPU startup failed err=%d\n", + printk(KERN_INFO "ds-%llu: CPU startup failed err=%d\n", dp->id, err); dr_cpu_mark(resp, cpu, ncpus, res, stat); } @@ -605,7 +605,7 @@ static int dr_cpu_unconfigure(struct ds_info *dp, for_each_cpu_mask(cpu, *mask) { int err; - printk(KERN_INFO "ds-%lu: Shutting down cpu %d...\n", + printk(KERN_INFO "ds-%llu: Shutting down cpu %d...\n", dp->id, cpu); err = cpu_down(cpu); if (err) @@ -684,7 +684,7 @@ static void ds_pri_data(struct ds_info *dp, rp = (struct ds_pri_msg *) (dpkt + 1); - printk(KERN_INFO "ds-%lu: PRI REQ [%lx:%lx], len=%d\n", + printk(KERN_INFO "ds-%llu: PRI REQ [%llx:%llx], len=%d\n", dp->id, rp->req_num, rp->type, len); } @@ -816,7 +816,7 @@ void ldom_set_var(const char *var, const char *value) if (ds_var_doorbell == 0 || ds_var_response != DS_VAR_SUCCESS) - printk(KERN_ERR "ds-%lu: var-config [%s:%s] " + printk(KERN_ERR "ds-%llu: var-config [%s:%s] " "failed, response(%d).\n", dp->id, var, value, ds_var_response); @@ -850,7 +850,7 @@ void ldom_power_off(void) static void ds_conn_reset(struct ds_info *dp) { - printk(KERN_ERR "ds-%lu: ds_conn_reset() from %p\n", + printk(KERN_ERR "ds-%llu: ds_conn_reset() from %p\n", dp->id, __builtin_return_address(0)); } @@ -912,11 +912,11 @@ static int ds_handshake(struct ds_info *dp, struct ds_msg_tag *pkt) struct ds_cap_state *cp = find_cap(dp, ap->handle); if (!cp) { - printk(KERN_ERR "ds-%lu: REG ACK for unknown " - "handle %lx\n", dp->id, ap->handle); + printk(KERN_ERR "ds-%llu: REG ACK for unknown " + "handle %llx\n", dp->id, ap->handle); return 0; } - printk(KERN_INFO "ds-%lu: Registered %s service.\n", + printk(KERN_INFO "ds-%llu: Registered %s service.\n", dp->id, cp->service_id); cp->state = CAP_STATE_REGISTERED; } else if (pkt->type == DS_REG_NACK) { @@ -924,8 +924,8 @@ static int ds_handshake(struct ds_info *dp, struct ds_msg_tag *pkt) struct ds_cap_state *cp = find_cap(dp, np->handle); if (!cp) { - printk(KERN_ERR "ds-%lu: REG NACK for " - "unknown handle %lx\n", + printk(KERN_ERR "ds-%llu: REG NACK for " + "unknown handle %llx\n", dp->id, np->handle); return 0; } @@ -982,8 +982,8 @@ static void process_ds_work(void) int req_len = qp->req_len; if (!cp) { - printk(KERN_ERR "ds-%lu: Data for unknown " - "handle %lu\n", + printk(KERN_ERR "ds-%llu: Data for unknown " + "handle %llu\n", dp->id, dpkt->handle); spin_lock_irqsave(&ds_lock, flags); @@ -1085,7 +1085,7 @@ static void ds_event(void *arg, int event) } if (event != LDC_EVENT_DATA_READY) { - printk(KERN_WARNING "ds-%lu: Unexpected LDC event %d\n", + printk(KERN_WARNING "ds-%llu: Unexpected LDC event %d\n", dp->id, event); spin_unlock_irqrestore(&ds_lock, flags); return; diff --git a/arch/sparc/kernel/iommu.c b/arch/sparc/kernel/iommu.c index 1cc1995531e..d8900e1d5aa 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, val = iommu_read(matchreg); if (unlikely(val)) { printk(KERN_WARNING "strbuf_flush: ctx flush " - "timeout matchreg[%lx] ctx[%lx]\n", + "timeout matchreg[%llx] ctx[%lx]\n", val, ctx); goto do_page_flush; } diff --git a/arch/sparc/kernel/ldc.c b/arch/sparc/kernel/ldc.c index d68982330f6..6ce5d2598a0 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) static int process_ver_nack(struct ldc_channel *lp, struct ldc_version *vp) { struct ldc_version *vap; + struct ldc_packet *p; + unsigned long new_tail; - if ((vp->major == 0 && vp->minor == 0) || - !(vap = find_by_major(vp->major))) { + if (vp->major == 0 && vp->minor == 0) + return ldc_abort(lp); + + vap = find_by_major(vp->major); + if (!vap) return ldc_abort(lp); - } else { - struct ldc_packet *p; - unsigned long new_tail; - p = handshake_compose_ctrl(lp, LDC_INFO, LDC_VERS, + p = handshake_compose_ctrl(lp, LDC_INFO, LDC_VERS, vap, sizeof(*vap), &new_tail); - if (p) - return send_tx_packet(lp, p, new_tail); - else - return ldc_abort(lp); - } + if (!p) + return ldc_abort(lp); + + return send_tx_packet(lp, p, new_tail); } static int process_version(struct ldc_channel *lp, diff --git a/arch/sparc/kernel/mdesc.c b/arch/sparc/kernel/mdesc.c index 3c539a6d7c1..3f79f0c23a0 100644 --- a/arch/sparc/kernel/mdesc.c +++ b/arch/sparc/kernel/mdesc.c @@ -536,24 +536,24 @@ static void __init report_platform_properties(void) v = mdesc_get_property(hp, pn, "hostid", NULL); if (v) - printk("PLATFORM: hostid [%08lx]\n", *v); + printk("PLATFORM: hostid [%08llx]\n", *v); v = mdesc_get_property(hp, pn, "serial#", NULL); if (v) - printk("PLATFORM: serial# [%08lx]\n", *v); + printk("PLATFORM: serial# [%08llx]\n", *v); v = mdesc_get_property(hp, pn, "stick-frequency", NULL); - printk("PLATFORM: stick-frequency [%08lx]\n", *v); + printk("PLATFORM: stick-frequency [%08llx]\n", *v); v = mdesc_get_property(hp, pn, "mac-address", NULL); if (v) - printk("PLATFORM: mac-address [%lx]\n", *v); + printk("PLATFORM: mac-address [%llx]\n", *v); v = mdesc_get_property(hp, pn, "watchdog-resolution", NULL); if (v) - printk("PLATFORM: watchdog-resolution [%lu ms]\n", *v); + printk("PLATFORM: watchdog-resolution [%llu ms]\n", *v); v = mdesc_get_property(hp, pn, "watchdog-max-timeout", NULL); if (v) - printk("PLATFORM: watchdog-max-timeout [%lu ms]\n", *v); + printk("PLATFORM: watchdog-max-timeout [%llu ms]\n", *v); v = mdesc_get_property(hp, pn, "max-cpus", NULL); if (v) - printk("PLATFORM: max-cpus [%lu]\n", *v); + printk("PLATFORM: max-cpus [%llu]\n", *v); #ifdef CONFIG_SMP { diff --git a/arch/sparc/kernel/of_device_64.c b/arch/sparc/kernel/of_device_64.c index 4873f28905b..b4a12c9aa5f 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, memset(r, 0, sizeof(*r)); if (of_resource_verbose) - printk("%s reg[%d] -> %lx\n", + printk("%s reg[%d] -> %llx\n", op->node->full_name, index, result); diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c index bdb7c0a6d83..923e9bbb9fe 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, continue; i = addrs[0] & 0xff; if (ofpci_verbose) - printk(" start: %lx, end: %lx, i: %x\n", + printk(" start: %llx, end: %llx, i: %x\n", op_res->start, op_res->end, i); 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 23b88082d0b..64e6edf17b9 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) prom_halt(); } - printk("%s: PCI IO[%lx] MEM[%lx]\n", + printk("%s: PCI IO[%llx] MEM[%llx]\n", pbm->name, pbm->io_space.start, pbm->mem_space.start); diff --git a/arch/sparc/kernel/pci_msi.c b/arch/sparc/kernel/pci_msi.c index 4ef282e8191..f1be37a7b12 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, pbm->name, pbm->msi_first, pbm->msi_num, pbm->msi_data_mask, pbm->msix_data_width); - printk(KERN_INFO "%s: MSI addr32[0x%lx:0x%x] " - "addr64[0x%lx:0x%x]\n", + printk(KERN_INFO "%s: MSI addr32[0x%llx:0x%x] " + "addr64[0x%llx:0x%x]\n", pbm->name, pbm->msi32_start, pbm->msi32_len, pbm->msi64_start, pbm->msi64_len); diff --git a/arch/sparc/kernel/pci_schizo.c b/arch/sparc/kernel/pci_schizo.c index 45d9dba1ba1..2b5cdde77af 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) pbm->controller_regs + SCHIZO_SAFARI_ERRLOG); if (!(errlog & BUS_ERROR_UNMAP)) { - printk("%s: Unexpected Safari/JBUS error interrupt, errlog[%016lx]\n", + printk("%s: Unexpected Safari/JBUS error interrupt, errlog[%016llx]\n", pbm->name, errlog); return IRQ_HANDLED; diff --git a/arch/sparc/kernel/pci_sun4v.c b/arch/sparc/kernel/pci_sun4v.c index 34a1fded394..0ef0ab3d476 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) if (unlikely(num < 0)) { if (printk_ratelimit()) printk("iommu_batch_flush: IOMMU map of " - "[%08lx:%08lx:%lx:%lx:%lx] failed with " + "[%08lx:%08llx:%lx:%lx:%lx] failed with " "status %ld\n", devhandle, HV_PCI_TSBID(0, entry), npages, prot, __pa(pglist), num); diff --git a/arch/sparc/kernel/power.c b/arch/sparc/kernel/power.c index 076cad7f975..ae88f06a7ec 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 power_reg = of_ioremap(res, 0, 0x4, "power"); - printk(KERN_INFO "%s: Control reg at %lx\n", + printk(KERN_INFO "%s: Control reg at %llx\n", op->node->name, res->start); if (has_button_interrupt(irq, op->node)) { diff --git a/arch/sparc/kernel/prom_irqtrans.c b/arch/sparc/kernel/prom_irqtrans.c index 96958c4dce8..5702ad4710c 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) break; } if (limit <= 0) { - printk("tomatillo_wsync_handler: DMA won't sync [%lx:%lx]\n", + printk("tomatillo_wsync_handler: DMA won't sync [%llx:%llx]\n", val, mask); } diff --git a/arch/sparc/kernel/psycho_common.c b/arch/sparc/kernel/psycho_common.c index 790996428c1..40689ae3c9b 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) if (saw_error != 0) { u64 tagval = stc_tag_buf[i]; u64 lineval = stc_line_buf[i]; - printk(KERN_ERR "%s: STC_TAG(%d)[PA(%016lx)VA(%08lx)" + printk(KERN_ERR "%s: STC_TAG(%d)[PA(%016llx)VA(%08llx)" "V(%d)W(%d)]\n", pbm->name, i, @@ -102,8 +102,8 @@ static void psycho_check_stc_error(struct pci_pbm_info *pbm) (tagval & PSYCHO_STCTAG_VPN), ((tagval & PSYCHO_STCTAG_VALID) ? 1 : 0), ((tagval & PSYCHO_STCTAG_WRITE) ? 1 : 0)); - printk(KERN_ERR "%s: STC_LINE(%d)[LIDX(%lx)SP(%lx)" - "LADDR(%lx)EP(%lx)V(%d)FOFN(%d)]\n", + printk(KERN_ERR "%s: STC_LINE(%d)[LIDX(%llx)SP(%llx)" + "LADDR(%llx)EP(%llx)V(%d)FOFN(%d)]\n", pbm->name, i, ((lineval & PSYCHO_STCLINE_LINDX) >> 21UL), @@ -179,14 +179,14 @@ static void psycho_dump_iommu_tags_and_data(struct pci_pbm_info *pbm, } printk(KERN_ERR "%s: IOMMU TAG(%d)[error(%s) wr(%d) " - "str(%d) sz(%dK) vpg(%08lx)]\n", + "str(%d) sz(%dK) vpg(%08llx)]\n", pbm->name, i, type_str, ((tag_val & PSYCHO_IOMMU_TAG_WRITE) ? 1 : 0), ((tag_val & PSYCHO_IOMMU_TAG_STREAM) ? 1 : 0), ((tag_val & PSYCHO_IOMMU_TAG_SIZE) ? 64 : 8), (tag_val & PSYCHO_IOMMU_TAG_VPAGE) << IOMMU_PAGE_SHIFT); printk(KERN_ERR "%s: IOMMU DATA(%d)[valid(%d) cache(%d) " - "ppg(%016lx)]\n", + "ppg(%016llx)]\n", pbm->name, i, ((data_val & PSYCHO_IOMMU_DATA_VALID) ? 1 : 0), ((data_val & PSYCHO_IOMMU_DATA_CACHE) ? 1 : 0), @@ -326,12 +326,12 @@ irqreturn_t psycho_pcierr_intr(int irq, void *dev_id) "Excessive Retries" : ((error_bits & PSYCHO_PCIAFSR_PPERR) ? "Parity Error" : "???")))))); - printk(KERN_ERR "%s: bytemask[%04lx] UPA_MID[%02lx] was_block(%d)\n", + printk(KERN_ERR "%s: bytemask[%04llx] UPA_MID[%02llx] was_block(%d)\n", pbm->name, (afsr & PSYCHO_PCIAFSR_BMSK) >> 32UL, (afsr & PSYCHO_PCIAFSR_MID) >> 25UL, (afsr & PSYCHO_PCIAFSR_BLK) ? 1 : 0); - printk(KERN_ERR "%s: PCI AFAR [%016lx]\n", pbm->name, afar); + printk(KERN_ERR "%s: PCI AFAR [%016llx]\n", pbm->name, afar); printk(KERN_ERR "%s: PCI Secondary errors [", pbm->name); reported = 0; if (afsr & PSYCHO_PCIAFSR_SMA) { diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c index 46329799f34..6cd1a5b6506 100644 --- a/arch/sparc/kernel/smp_64.c +++ b/arch/sparc/kernel/smp_64.c @@ -449,7 +449,7 @@ again: __asm__ __volatile__("wrpr %0, 0x0, %%pstate" : : "r" (pstate)); if (stuck == 0) { - printk("CPU[%d]: mondo stuckage result[%016lx]\n", + printk("CPU[%d]: mondo stuckage result[%016llx]\n", smp_processor_id(), result); } else { udelay(2); @@ -584,7 +584,7 @@ retry: /* Busy bits will not clear, continue instead * of freezing up on this cpu. */ - printk("CPU[%d]: mondo stuckage result[%016lx]\n", + printk("CPU[%d]: mondo stuckage result[%016llx]\n", smp_processor_id(), dispatch_stat); } else { int i, this_busy_nack = 0; diff --git a/arch/sparc/kernel/time_64.c b/arch/sparc/kernel/time_64.c index 9df8f095a8b..54405d36214 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) tick_disable_irq(); } -static unsigned long tick_get_tick(void) +static unsigned long long tick_get_tick(void) { unsigned long ret; @@ -208,7 +208,7 @@ static void stick_init_tick(void) stick_disable_irq(); } -static unsigned long stick_get_tick(void) +static unsigned long long stick_get_tick(void) { unsigned long ret; @@ -352,7 +352,7 @@ static void hbtick_init_tick(void) hbtick_disable_irq(); } -static unsigned long hbtick_get_tick(void) +static unsigned long long hbtick_get_tick(void) { return __hbird_read_stick() & ~TICK_PRIV_BIT; } @@ -422,7 +422,7 @@ static int __devinit rtc_probe(struct of_device *op, const struct of_device_id * { struct resource *r; - printk(KERN_INFO "%s: RTC regs at 0x%lx\n", + printk(KERN_INFO "%s: RTC regs at 0x%llx\n", op->node->full_name, op->resource[0].start); /* The CMOS RTC driver only accepts IORESOURCE_IO, so cons @@ -478,7 +478,7 @@ static struct platform_device rtc_bq4802_device = { static int __devinit bq4802_probe(struct of_device *op, const struct of_device_id *match) { - printk(KERN_INFO "%s: BQ4802 regs at 0x%lx\n", + printk(KERN_INFO "%s: BQ4802 regs at 0x%llx\n", op->node->full_name, op->resource[0].start); 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 strcmp(dp->parent->parent->name, "central") != 0) return -ENODEV; - printk(KERN_INFO "%s: Mostek regs at 0x%lx\n", + printk(KERN_INFO "%s: Mostek regs at 0x%llx\n", dp->full_name, op->resource[0].start); m48t59_rtc.resource = &op->resource[0]; diff --git a/arch/sparc/kernel/traps_64.c b/arch/sparc/kernel/traps_64.c index 4638af2f55a..bca3b4e09c4 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 } /* Now dump the cache snapshots. */ - printk("%s" "ERROR(%d): D-cache idx[%x] tag[%016lx] utag[%016lx] stag[%016lx]\n", + printk("%s" "ERROR(%d): D-cache idx[%x] tag[%016llx] utag[%016llx] stag[%016llx]\n", (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), (int) info->dcache_index, info->dcache_tag, info->dcache_utag, info->dcache_stag); - printk("%s" "ERROR(%d): D-cache data0[%016lx] data1[%016lx] data2[%016lx] data3[%016lx]\n", + printk("%s" "ERROR(%d): D-cache data0[%016llx] data1[%016llx] data2[%016llx] data3[%016llx]\n", (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), info->dcache_data[0], info->dcache_data[1], info->dcache_data[2], info->dcache_data[3]); - printk("%s" "ERROR(%d): I-cache idx[%x] tag[%016lx] utag[%016lx] stag[%016lx] " - "u[%016lx] l[%016lx]\n", + printk("%s" "ERROR(%d): I-cache idx[%x] tag[%016llx] utag[%016llx] stag[%016llx] " + "u[%016llx] l[%016llx]\n", (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), (int) info->icache_index, info->icache_tag, @@ -1189,22 +1189,22 @@ static void cheetah_log_errors(struct pt_regs *regs, struct cheetah_err_info *in info->icache_stag, info->icache_upper, info->icache_lower); - printk("%s" "ERROR(%d): I-cache INSN0[%016lx] INSN1[%016lx] INSN2[%016lx] INSN3[%016lx]\n", + printk("%s" "ERROR(%d): I-cache INSN0[%016llx] INSN1[%016llx] INSN2[%016llx] INSN3[%016llx]\n", (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), info->icache_data[0], info->icache_data[1], info->icache_data[2], info->icache_data[3]); - printk("%s" "ERROR(%d): I-cache INSN4[%016lx] INSN5[%016lx] INSN6[%016lx] INSN7[%016lx]\n", + printk("%s" "ERROR(%d): I-cache INSN4[%016llx] INSN5[%016llx] INSN6[%016llx] INSN7[%016llx]\n", (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), info->icache_data[4], info->icache_data[5], info->icache_data[6], info->icache_data[7]); - printk("%s" "ERROR(%d): E-cache idx[%x] tag[%016lx]\n", + printk("%s" "ERROR(%d): E-cache idx[%x] tag[%016llx]\n", (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), (int) info->ecache_index, info->ecache_tag); - printk("%s" "ERROR(%d): E-cache data0[%016lx] data1[%016lx] data2[%016lx] data3[%016lx]\n", + printk("%s" "ERROR(%d): E-cache data0[%016llx] data1[%016llx] data2[%016llx] data3[%016llx]\n", (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), info->ecache_data[0], info->ecache_data[1], @@ -1794,7 +1794,7 @@ static void sun4v_log_error(struct pt_regs *regs, struct sun4v_error_entry *ent, int cnt; printk("%s: Reporting on cpu %d\n", pfx, cpu); - printk("%s: err_handle[%lx] err_stick[%lx] err_type[%08x:%s]\n", + printk("%s: err_handle[%llx] err_stick[%llx] err_type[%08x:%s]\n", pfx, ent->err_handle, ent->err_stick, ent->err_type, @@ -1818,7 +1818,7 @@ static void sun4v_log_error(struct pt_regs *regs, struct sun4v_error_entry *ent, "privileged" : ""), ((ent->err_attrs & SUN4V_ERR_ATTRS_RES_QUEUE_FULL) ? "queue-full" : "")); - printk("%s: err_raddr[%016lx] err_size[%u] err_cpu[%u]\n", + printk("%s: err_raddr[%016llx] err_size[%u] err_cpu[%u]\n", pfx, ent->err_raddr, ent->err_size, ent->err_cpu); diff --git a/arch/sparc/kernel/unaligned_64.c b/arch/sparc/kernel/unaligned_64.c index 203ddfad9f2..f164d5a850f 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 pc = (u32)pc; if (get_user(insn, (u32 __user *) pc) != -EFAULT) { int asi = decode_asi(insn, regs); + int err; + if ((asi > ASI_SNFL) || (asi < ASI_P)) goto daex; - if (get_user(first, (u32 __user *)sfar) || - get_user(second, (u32 __user *)(sfar + 4))) { + err = get_user(first, (u32 __user *)sfar); + if (!err) + err = get_user(second, (u32 __user *)(sfar + 4)); + if (err) { if (asi & 0x2) /* NF */ { first = 0; second = 0; } else diff --git a/arch/sparc/kernel/vio.c b/arch/sparc/kernel/vio.c index 92b1f8ec01d..753d128ed15 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, dev_set_name(&vdev->dev, "%s", bus_id_name); vdev->dev_no = ~(u64)0; } else if (!cfg_handle) { - dev_set_name(&vdev->dev, "%s-%lu", bus_id_name, *id); + dev_set_name(&vdev->dev, "%s-%llu", bus_id_name, *id); vdev->dev_no = *id; } else { - dev_set_name(&vdev->dev, "%s-%lu-%lu", bus_id_name, + dev_set_name(&vdev->dev, "%s-%llu-%llu", bus_id_name, *cfg_handle, *id); vdev->dev_no = *cfg_handle; } diff --git a/arch/sparc/kernel/viohs.c b/arch/sparc/kernel/viohs.c index 708fa1705fb..aa6ac70d4fd 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, viodbg(HS, "GOT VERSION NACK maj[%u] min[%u] devclass[%u]\n", pkt->major, pkt->minor, pkt->dev_class); - if ((pkt->major == 0 && pkt->minor == 0) || - !(nver = find_by_major(vio, pkt->major))) + if (pkt->major == 0 && pkt->minor == 0) + return handshake_failure(vio); + nver = find_by_major(vio, pkt->major); + if (!nver) return handshake_failure(vio); 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 a507e117466..12e447fc854 100644 --- a/arch/sparc/mm/fault_32.c +++ b/arch/sparc/mm/fault_32.c @@ -283,7 +283,8 @@ bad_area_nosemaphore: /* Is this in ex_table? */ no_context: g2 = regs->u_regs[UREG_G2]; - if (!from_user && (fixup = search_extables_range(regs->pc, &g2))) { + if (!from_user) { + fixup = search_extables_range(regs->pc, &g2); if (fixup > 10) { /* Values below are reserved for other things */ extern const unsigned __memset_start[]; extern const unsigned __memset_end[]; diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c index 6ea73da2931..c77c7ef5d5d 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 unsigned long _PAGE_ALL_SZ_BITS __read_mostly; unsigned long _PAGE_SZBITS __read_mostly; -void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t pte) +static void flush_dcache(unsigned long pfn) { - struct mm_struct *mm; - struct tsb *tsb; - unsigned long tag, flags; - unsigned long tsb_index, tsb_hash_shift; + struct page *page; - if (tlb_type != hypervisor) { - unsigned long pfn = pte_pfn(pte); + page = pfn_to_page(pfn); + if (page && page_mapping(page)) { unsigned long pg_flags; - struct page *page; - if (pfn_valid(pfn) && - (page = pfn_to_page(pfn), page_mapping(page)) && - ((pg_flags = page->flags) & (1UL << PG_dcache_dirty))) { + pg_flags = page->flags; + if (pg_flags & (1UL << PG_dcache_dirty)) { int cpu = ((pg_flags >> PG_dcache_cpu_shift) & PG_dcache_cpu_mask); int this_cpu = get_cpu(); @@ -290,6 +285,21 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t p put_cpu(); } } +} + +void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t pte) +{ + struct mm_struct *mm; + struct tsb *tsb; + unsigned long tag, flags; + unsigned long tsb_index, tsb_hash_shift; + + if (tlb_type != hypervisor) { + unsigned long pfn = pte_pfn(pte); + + if (pfn_valid(pfn)) + flush_dcache(pfn); + } mm = vma->vm_mm; @@ -769,8 +779,8 @@ static int find_node(unsigned long addr) return -1; } -static unsigned long nid_range(unsigned long start, unsigned long end, - int *nid) +static unsigned long long nid_range(unsigned long long start, + unsigned long long end, int *nid) { *nid = find_node(start); start += PAGE_SIZE; @@ -788,8 +798,8 @@ static unsigned long nid_range(unsigned long start, unsigned long end, return start; } #else -static unsigned long nid_range(unsigned long start, unsigned long end, - int *nid) +static unsigned long long nid_range(unsigned long long start, + unsigned long long end, int *nid) { *nid = 0; return end; @@ -1016,8 +1026,8 @@ static int __init grab_mlgroups(struct mdesc_handle *md) val = mdesc_get_property(md, node, "address-mask", NULL); m->mask = *val; - numadbg("MLGROUP[%d]: node[%lx] latency[%lx] " - "match[%lx] mask[%lx]\n", + numadbg("MLGROUP[%d]: node[%llx] latency[%llx] " + "match[%llx] mask[%llx]\n", count - 1, m->node, m->latency, m->match, m->mask); } @@ -1056,7 +1066,7 @@ static int __init grab_mblocks(struct mdesc_handle *md) "address-congruence-offset", NULL); m->offset = *val; - numadbg("MBLOCK[%d]: base[%lx] size[%lx] offset[%lx]\n", + numadbg("MBLOCK[%d]: base[%llx] size[%llx] offset[%llx]\n", count - 1, m->base, m->size, m->offset); } @@ -1127,7 +1137,7 @@ static int __init numa_attach_mlgroup(struct mdesc_handle *md, u64 grp, n->mask = candidate->mask; n->val = candidate->match; - numadbg("NUMA NODE[%d]: mask[%lx] val[%lx] (latency[%lx])\n", + numadbg("NUMA NODE[%d]: mask[%lx] val[%lx] (latency[%llx])\n", index, n->mask, n->val, candidate->latency); return 0; |