Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 8 Jan 2009 01:23:53 +0000 (17:23 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 8 Jan 2009 01:23:53 +0000 (17:23 -0800)
* 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

28 files changed:
arch/sparc/include/asm/timer_64.h
arch/sparc/include/asm/types.h
arch/sparc/kernel/ds.c
arch/sparc/kernel/iommu.c
arch/sparc/kernel/ldc.c
arch/sparc/kernel/mdesc.c
arch/sparc/kernel/of_device_64.c
arch/sparc/kernel/pci.c
arch/sparc/kernel/pci_common.c
arch/sparc/kernel/pci_msi.c
arch/sparc/kernel/pci_schizo.c
arch/sparc/kernel/pci_sun4v.c
arch/sparc/kernel/power.c
arch/sparc/kernel/prom_irqtrans.c
arch/sparc/kernel/psycho_common.c
arch/sparc/kernel/smp_64.c
arch/sparc/kernel/time_64.c
arch/sparc/kernel/traps_64.c
arch/sparc/kernel/unaligned_64.c
arch/sparc/kernel/vio.c
arch/sparc/kernel/viohs.c
arch/sparc/mm/fault_32.c
arch/sparc/mm/init_64.c
drivers/block/sunvdc.c
drivers/char/hw_random/n2-drv.c
drivers/net/sunvnet.c
drivers/sbus/char/display7seg.c
sound/sparc/cs4231.c

index 5b779fd1f78828d123ea047164852b547263eeba..ef3c3682debfde331bed231af7e7466ad070d7a4 100644 (file)
@@ -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);
index 8c28fde5eaa2a794fd8b31fd4a95e9e00699f3f5..2237118825d029d260c18b8f46a735c5294899f8 100644 (file)
@@ -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__
 
index f52e0534d91d060c58445e483928c66099517cc7..57c39843fb2a446c68849e5326496d4e5756cd0d 100644 (file)
@@ -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;
index 1cc1995531e22d3f7e5066fadd2fc66df16e3a63..d8900e1d5aad0cbd2253079e0ef927c9465e4fe5 100644 (file)
@@ -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;
                }
index d68982330f66f7ed2da259232b5134bd3da5531d..6ce5d2598a09f938596fa2c74072e6bdb2d0e7f7 100644 (file)
@@ -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,
index 3c539a6d7c18095a68532221007e2a43dc4aee9d..3f79f0c23a084d4a80ae572be79db9e0f747d66c 100644 (file)
@@ -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
        {
index 4873f28905b082b07859d15389984b8f7dff55a8..b4a12c9aa5f823d7ed1b35de8ed8404df05bd807 100644 (file)
@@ -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);
 
index bdb7c0a6d83ddaf57cf01d78dde54887c827e982..923e9bbb9fe25e183d272a46702d2e6d5a3863dd 100644 (file)
@@ -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) {
index 23b88082d0b28d72c639f65582194094c84c2a24..64e6edf17b9d2ea860533766588235b6340e20b8 100644 (file)
@@ -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);
index 4ef282e8191208b4bc954614d8f1b9d675385177..f1be37a7b1239975492c1838fb1ec323a89946da 100644 (file)
@@ -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);
index 45d9dba1ba117a9d652727f9968dc13ee690b7cd..2b5cdde77af774942113f53f4eb66dec00659ee2 100644 (file)
@@ -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;
index 34a1fded39415cbbc863f39babe56bacd39d489a..0ef0ab3d47635083ed66a7cac72b813a165c6f02 100644 (file)
@@ -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);
index 076cad7f975766aaae812714de7613452d2978cf..ae88f06a7ec4c74838f514817d9c15a793eb1e5b 100644 (file)
@@ -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)) {
index 96958c4dce8ee1d531382b18a369cecba5fa5d40..5702ad4710cb17e758d01b26c98375df19e9ae41 100644 (file)
@@ -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);
        }
 
index 790996428c148ad1e7d01363472e755fa88253db..40689ae3c9b0c228b4591074528d6045f698319a 100644 (file)
@@ -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) {
index 46329799f3462bb4002024558be74f204e679f07..6cd1a5b650673c3a4ba0cb74f94fb32084d76aee 100644 (file)
@@ -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;
index 9df8f095a8b11a59e448bec001ac6aec852c480c..54405d3621484c1c7035efe572bf0b0c902fb3f2 100644 (file)
@@ -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];
index 4638af2f55a0bb5d50c9b0b8425001d7e0845279..bca3b4e09c41bd5c1edef9e3c18e0cb7a37bf6cc 100644 (file)
@@ -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);
 
index 203ddfad9f27f3c6067760916085624503eee9ff..f164d5a850f98b90a469b24e29cbaaae64f31525 100644 (file)
@@ -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
index 92b1f8ec01de3837572175f5062c28394327ea67..753d128ed15885ce6143d3c167859d00a5a3627f 100644 (file)
@@ -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;
        }
index 708fa1705fbe55fcfdf6b8c9b5d87de96f7653af..aa6ac70d4fd501099aa8082fd3da0f877e435291 100644 (file)
@@ -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)
index a507e1174662e2bd0072a739d217a7480bcd60c2..12e447fc8542c0c43f72220b779a74e7b3c08835 100644 (file)
@@ -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[];
index 6ea73da29312e7397363a1c05237453e7e725c49..c77c7ef5d5d4d51de8ac6dfe58a74c8336f83d14 100644 (file)
@@ -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;
index 953c0b83d758dac91a17b409d48d5636a7b62579..5861e33efe63589a2f974eee6a99172acc596bc9 100644 (file)
@@ -153,7 +153,7 @@ static int vdc_send_attr(struct vio_driver_state *vio)
        pkt.vdisk_block_size = port->vdisk_block_size;
        pkt.max_xfer_size = port->max_xfer_size;
 
-       viodbg(HS, "SEND ATTR xfer_mode[0x%x] blksz[%u] max_xfer[%lu]\n",
+       viodbg(HS, "SEND ATTR xfer_mode[0x%x] blksz[%u] max_xfer[%llu]\n",
               pkt.xfer_mode, pkt.vdisk_block_size, pkt.max_xfer_size);
 
        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)
        struct vdc_port *port = to_vdc_port(vio);
        struct vio_disk_attr_info *pkt = arg;
 
-       viodbg(HS, "GOT ATTR stype[0x%x] ops[%lx] disk_size[%lu] disk_type[%x] "
-              "xfer_mode[0x%x] blksz[%u] max_xfer[%lu]\n",
+       viodbg(HS, "GOT ATTR stype[0x%x] ops[%llx] disk_size[%llu] disk_type[%x] "
+              "xfer_mode[0x%x] blksz[%u] max_xfer[%llu]\n",
               pkt->tag.stype, pkt->operations,
               pkt->vdisk_size, pkt->vdisk_type,
               pkt->xfer_mode, pkt->vdisk_block_size,
@@ -753,7 +753,7 @@ static int __devinit vdc_port_probe(struct vio_dev *vdev,
 
        err = -ENODEV;
        if ((vdev->dev_no << PARTITION_SHIFT) & ~(u64)MINORMASK) {
-               printk(KERN_ERR PFX "Port id [%lu] too large.\n",
+               printk(KERN_ERR PFX "Port id [%llu] too large.\n",
                       vdev->dev_no);
                goto err_out_release_mdesc;
        }
index 8859aeac2d2510ef6a2a79ea13e364e47f301461..9b3e09cd41f9e5ef0dbe54534fed654352a43a43 100644 (file)
@@ -482,7 +482,7 @@ static void n2rng_dump_test_buffer(struct n2rng *np)
        int i;
 
        for (i = 0; i < SELFTEST_BUFFER_WORDS; i++)
-               dev_err(&np->op->dev, "Test buffer slot %d [0x%016lx]\n",
+               dev_err(&np->op->dev, "Test buffer slot %d [0x%016llx]\n",
                        i, np->test_buffer[i]);
 }
 
index 233f1cda36e52b425e952ba823a02bfe11c1ab81..611230fef2b67a6aa683191db70f19579e274fd5 100644 (file)
@@ -336,7 +336,7 @@ static int vnet_walk_rx_one(struct vnet_port *port,
        if (IS_ERR(desc))
                return PTR_ERR(desc);
 
-       viodbg(DATA, "vio_walk_rx_one desc[%02x:%02x:%08x:%08x:%lx:%lx]\n",
+       viodbg(DATA, "vio_walk_rx_one desc[%02x:%02x:%08x:%08x:%llx:%llx]\n",
               desc->hdr.state, desc->hdr.ack,
               desc->size, desc->ncookies,
               desc->cookies[0].cookie_addr,
@@ -394,14 +394,14 @@ static int vnet_rx(struct vnet_port *port, void *msgbuf)
        struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_RX_RING];
        struct vio_driver_state *vio = &port->vio;
 
-       viodbg(DATA, "vnet_rx stype_env[%04x] seq[%016lx] rcv_nxt[%016lx]\n",
+       viodbg(DATA, "vnet_rx stype_env[%04x] seq[%016llx] rcv_nxt[%016llx]\n",
               pkt->tag.stype_env, pkt->seq, dr->rcv_nxt);
 
        if (unlikely(pkt->tag.stype_env != VIO_DRING_DATA))
                return 0;
        if (unlikely(pkt->seq != dr->rcv_nxt)) {
-               printk(KERN_ERR PFX "RX out of sequence seq[0x%lx] "
-                      "rcv_nxt[0x%lx]\n", pkt->seq, dr->rcv_nxt);
+               printk(KERN_ERR PFX "RX out of sequence seq[0x%llx] "
+                      "rcv_nxt[0x%llx]\n", pkt->seq, dr->rcv_nxt);
                return 0;
        }
 
index 2550af4ae432a6bb6cd82c1fbf2c6eccbecb1e99..4431578d8c451fb7f11d60703221efe6548c5cd7 100644 (file)
@@ -214,7 +214,7 @@ static int __devinit d7s_probe(struct of_device *op,
 
        writeb(regs,  p->regs);
 
-       printk(KERN_INFO PFX "7-Segment Display%s at [%s:0x%lx] %s\n", 
+       printk(KERN_INFO PFX "7-Segment Display%s at [%s:0x%llx] %s\n",
               op->node->full_name,
               (regs & D7S_FLIP) ? " (FLIPPED)" : "",
               op->resource[0].start,
index d44bf98e965e6a5bd020f6d085dbcc2b763db670..41c387587474c9ccaef6ae1c228ad1dffde14977 100644 (file)
@@ -2057,7 +2057,7 @@ static int __devinit cs4231_ebus_probe(struct of_device *op, const struct of_dev
        if (err)
                return err;
 
-       sprintf(card->longname, "%s at 0x%lx, irq %d",
+       sprintf(card->longname, "%s at 0x%llx, irq %d",
                card->shortname,
                op->resource[0].start,
                op->irqs[0]);