[PATCH] 64bit resource: fix up printks for resources in misc drivers
authorGreg Kroah-Hartman <gregkh@suse.de>
Mon, 12 Jun 2006 22:20:16 +0000 (15:20 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 27 Jun 2006 16:23:59 +0000 (09:23 -0700)
This is needed if we wish to change the size of the resource structures.

Based on an original patch from Vivek Goyal <vgoyal@in.ibm.com>

Cc: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 files changed:
drivers/amba/bus.c
drivers/atm/ambassador.c
drivers/atm/firestream.c
drivers/block/sx8.c
drivers/char/applicom.c
drivers/ieee1394/ohci1394.c
drivers/infiniband/hw/ipath/ipath_driver.c
drivers/infiniband/hw/mthca/mthca_main.c
drivers/input/serio/ct82c710.c
drivers/isdn/hisax/telespci.c
drivers/macintosh/macio_asic.c
drivers/message/i2o/iop.c
drivers/mmc/mmci.c
drivers/scsi/sata_via.c

index 889855d8d9f9080ee9b98c3a1a1bcd0691006f59..9e3e2a69c03a6dedd375b32666e94b0989ed1566 100644 (file)
@@ -180,8 +180,9 @@ static DEVICE_ATTR(name, S_IRUGO, show_##name, NULL)
 amba_attr(id, "%08x\n", dev->periphid);
 amba_attr(irq0, "%u\n", dev->irq[0]);
 amba_attr(irq1, "%u\n", dev->irq[1]);
-amba_attr(resource, "\t%08lx\t%08lx\t%08lx\n",
-         dev->res.start, dev->res.end, dev->res.flags);
+amba_attr(resource, "\t%016llx\t%016llx\t%016lx\n",
+        (unsigned long long)dev->res.start, (unsigned long long)dev->res.end,
+        dev->res.flags);
 
 /**
  *     amba_device_register - register an AMBA device
index 4b6bf19c39c004d4b2277f11e68ac2ea59a4b753..4048681f36d503ca2030d0954311ce97327cc183 100644 (file)
@@ -2257,7 +2257,8 @@ static int __devinit amb_probe(struct pci_dev *pci_dev, const struct pci_device_
        }
 
        PRINTD (DBG_INFO, "found Madge ATM adapter (amb) at"
-               " IO %lx, IRQ %u, MEM %p", pci_resource_start(pci_dev, 1),
+               " IO %llx, IRQ %u, MEM %p",
+               (unsigned long long)pci_resource_start(pci_dev, 1),
                irq, bus_to_virt(pci_resource_start(pci_dev, 0)));
 
        // check IO region
index f2eeaf9dc56a4fffe9dff197a5899588d02f5098..e1177169d57a4e9bdf12d0271ca96debbbaa0002 100644 (file)
@@ -1657,9 +1657,10 @@ static int __devinit fs_init (struct fs_dev *dev)
        func_enter ();
        pci_dev = dev->pci_dev;
 
-       printk (KERN_INFO "found a FireStream %d card, base %08lx, irq%d.\n", 
+       printk (KERN_INFO "found a FireStream %d card, base %16llx, irq%d.\n",
                IS_FS50(dev)?50:155,
-               pci_resource_start(pci_dev, 0), dev->pci_dev->irq);
+               (unsigned long long)pci_resource_start(pci_dev, 0),
+               dev->pci_dev->irq);
 
        if (fs_debug & FS_DEBUG_INIT)
                my_hd ((unsigned char *) dev, sizeof (*dev));
index 2ae08b343b935518c86098959866299e73f213e8..8144ce9f4df0543555aa71573ad1c69a43748013 100644 (file)
@@ -1694,9 +1694,10 @@ static int carm_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
        DPRINTK("waiting for probe_comp\n");
        wait_for_completion(&host->probe_comp);
 
-       printk(KERN_INFO "%s: pci %s, ports %d, io %lx, irq %u, major %d\n",
+       printk(KERN_INFO "%s: pci %s, ports %d, io %llx, irq %u, major %d\n",
               host->name, pci_name(pdev), (int) CARM_MAX_PORTS,
-              pci_resource_start(pdev, 0), pdev->irq, host->major);
+              (unsigned long long)pci_resource_start(pdev, 0),
+                  pdev->irq, host->major);
 
        carm_host_id++;
        pci_set_drvdata(pdev, host);
index 9275d5e52e6de63d86309c82096f19ac5776592e..72fb60765c45a4f973c77ae67c916e85aff80485 100644 (file)
@@ -209,13 +209,16 @@ static int __init applicom_init(void)
                RamIO = ioremap(dev->resource[0].start, LEN_RAM_IO);
 
                if (!RamIO) {
-                       printk(KERN_INFO "ac.o: Failed to ioremap PCI memory space at 0x%lx\n", dev->resource[0].start);
+                       printk(KERN_INFO "ac.o: Failed to ioremap PCI memory "
+                               "space at 0x%llx\n",
+                               (unsigned long long)dev->resource[0].start);
                        pci_disable_device(dev);
                        return -EIO;
                }
 
-               printk(KERN_INFO "Applicom %s found at mem 0x%lx, irq %d\n",
-                      applicom_pci_devnames[dev->device-1], dev->resource[0].start, 
+               printk(KERN_INFO "Applicom %s found at mem 0x%llx, irq %d\n",
+                      applicom_pci_devnames[dev->device-1],
+                          (unsigned long long)dev->resource[0].start,
                       dev->irq);
 
                boardno = ac_register_board(dev->resource[0].start, RamIO,0);
index 3d278412e1ca07f46b9e69887864d1d076c91a26..f0d5f2b7de8728748e276bda385800aff9b5e7eb 100644 (file)
@@ -590,11 +590,11 @@ static void ohci_initialize(struct ti_ohci *ohci)
        buf = reg_read(ohci, OHCI1394_Version);
        sprintf (irq_buf, "%d", ohci->dev->irq);
        PRINT(KERN_INFO, "OHCI-1394 %d.%d (PCI): IRQ=[%s]  "
-             "MMIO=[%lx-%lx]  Max Packet=[%d]  IR/IT contexts=[%d/%d]",
+             "MMIO=[%llx-%llx]  Max Packet=[%d]  IR/IT contexts=[%d/%d]",
              ((((buf) >> 16) & 0xf) + (((buf) >> 20) & 0xf) * 10),
              ((((buf) >> 4) & 0xf) + ((buf) & 0xf) * 10), irq_buf,
-             pci_resource_start(ohci->dev, 0),
-             pci_resource_start(ohci->dev, 0) + OHCI1394_REGISTER_SIZE - 1,
+             (unsigned long long)pci_resource_start(ohci->dev, 0),
+             (unsigned long long)pci_resource_start(ohci->dev, 0) + OHCI1394_REGISTER_SIZE - 1,
              ohci->max_packet_size,
              ohci->nb_iso_rcv_ctx, ohci->nb_iso_xmit_ctx);
 
@@ -3270,15 +3270,16 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev,
         * clearly says it's 2kb, so this shouldn't be a problem. */
        ohci_base = pci_resource_start(dev, 0);
        if (pci_resource_len(dev, 0) < OHCI1394_REGISTER_SIZE)
-               PRINT(KERN_WARNING, "PCI resource length of %lx too small!",
-                     pci_resource_len(dev, 0));
+               PRINT(KERN_WARNING, "PCI resource length of 0x%llx too small!",
+                     (unsigned long long)pci_resource_len(dev, 0));
 
        /* Seems PCMCIA handles this internally. Not sure why. Seems
         * pretty bogus to force a driver to special case this.  */
 #ifndef PCMCIA
        if (!request_mem_region (ohci_base, OHCI1394_REGISTER_SIZE, OHCI1394_DRIVER_NAME))
-               FAIL(-ENOMEM, "MMIO resource (0x%lx - 0x%lx) unavailable",
-                    ohci_base, ohci_base + OHCI1394_REGISTER_SIZE);
+               FAIL(-ENOMEM, "MMIO resource (0x%llx - 0x%llx) unavailable",
+                       (unsigned long long)ohci_base,
+                       (unsigned long long)ohci_base + OHCI1394_REGISTER_SIZE);
 #endif
        ohci->init_state = OHCI_INIT_HAVE_MEM_REGION;
 
index dddcdae736ac89151d659a65e8521e98523890fb..e4b897fa569a5e945841fee575e1db1706f4ecd4 100644 (file)
@@ -460,10 +460,10 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
        for (j = 0; j < 6; j++) {
                if (!pdev->resource[j].start)
                        continue;
-               ipath_cdbg(VERBOSE, "BAR %d start %lx, end %lx, len %lx\n",
-                          j, pdev->resource[j].start,
-                          pdev->resource[j].end,
-                          pci_resource_len(pdev, j));
+               ipath_cdbg(VERBOSE, "BAR %d start %llx, end %llx, len %llx\n",
+                          j, (unsigned long long)pdev->resource[j].start,
+                          (unsigned long long)pdev->resource[j].end,
+                          (unsigned long long)pci_resource_len(pdev, j));
        }
 
        if (!addr) {
index 9b9ff7bff357a2ea8a4d9ab8d6747eea373ade95..465fd220569c651a1cb7499daa1f970b5241811a 100644 (file)
@@ -172,8 +172,9 @@ static int __devinit mthca_dev_lim(struct mthca_dev *mdev, struct mthca_dev_lim
 
        if (dev_lim->uar_size > pci_resource_len(mdev->pdev, 2)) {
                mthca_err(mdev, "HCA reported UAR size of 0x%x bigger than "
-                         "PCI resource 2 size of 0x%lx, aborting.\n",
-                         dev_lim->uar_size, pci_resource_len(mdev->pdev, 2));
+                         "PCI resource 2 size of 0x%llx, aborting.\n",
+                         dev_lim->uar_size,
+                         (unsigned long long)pci_resource_len(mdev->pdev, 2));
                return -ENODEV;
        }
 
index 096b6a0b5ccad6598702233350322d71f28860a6..1ac739ef2ffa53a41053b5bd02218f9073c33281 100644 (file)
@@ -189,7 +189,7 @@ static int __devinit ct82c710_probe(struct platform_device *dev)
        strlcpy(ct82c710_port->name, "C&T 82c710 mouse port",
                sizeof(ct82c710_port->name));
        snprintf(ct82c710_port->phys, sizeof(ct82c710_port->phys),
-                "isa%04lx/serio0", CT82C710_DATA);
+                "isa%16llx/serio0", (unsigned long long)CT82C710_DATA);
 
        serio_register_port(ct82c710_port);
 
@@ -241,8 +241,8 @@ static int __init ct82c710_init(void)
 
        serio_register_port(ct82c710_port);
 
-       printk(KERN_INFO "serio: C&T 82c710 mouse port at %#lx irq %d\n",
-               CT82C710_DATA, CT82C710_IRQ);
+       printk(KERN_INFO "serio: C&T 82c710 mouse port at %#llx irq %d\n",
+               (unsigned long long)CT82C710_DATA, CT82C710_IRQ);
 
        return 0;
 
index e2bb4fd8e25e7602e9c69fd0151edb739a119daa..e82ab2251b825089b9f0a28ad68b007c6dbfd0f9 100644 (file)
@@ -311,8 +311,9 @@ setup_telespci(struct IsdnCard *card)
                }
                cs->hw.teles0.membase = ioremap(pci_resource_start(dev_tel, 0),
                        PAGE_SIZE);
-               printk(KERN_INFO "Found: Zoran, base-address: 0x%lx, irq: 0x%x\n",
-                       pci_resource_start(dev_tel, 0), dev_tel->irq);
+               printk(KERN_INFO "Found: Zoran, base-address: 0x%llx, irq: 0x%x\n",
+                       (unsigned long long)pci_resource_start(dev_tel, 0),
+                       dev_tel->irq);
        } else {
                printk(KERN_WARNING "TelesPCI: No PCI card found\n");
                return(0);
index 431bd37225a13a05be8891b44de545e88b5802c1..c687ac703941f514af7c352ab456e72be2fc18e2 100644 (file)
@@ -428,10 +428,10 @@ static struct macio_dev * macio_add_one_device(struct macio_chip *chip,
 
        /* MacIO itself has a different reg, we use it's PCI base */
        if (np == chip->of_node) {
-               sprintf(dev->ofdev.dev.bus_id, "%1d.%08lx:%.*s",
+               sprintf(dev->ofdev.dev.bus_id, "%1d.%016llx:%.*s",
                        chip->lbus.index,
 #ifdef CONFIG_PCI
-                       pci_resource_start(chip->lbus.pdev, 0),
+                       (unsigned long long)pci_resource_start(chip->lbus.pdev, 0),
 #else
                        0, /* NuBus may want to do something better here */
 #endif
index febbdd4e0605ddeed250f534ebeda84ac77682ac..64cc92560b8d34bb8432b3722f8e3e39c0889a25 100644 (file)
@@ -683,9 +683,10 @@ static int i2o_iop_systab_set(struct i2o_controller *c)
                        c->mem_alloc = 1;
                        sb->current_mem_size = 1 + res->end - res->start;
                        sb->current_mem_base = res->start;
-                       osm_info("%s: allocated %ld bytes of PCI memory at "
-                                "0x%08lX.\n", c->name,
-                                1 + res->end - res->start, res->start);
+                       osm_info("%s: allocated %llu bytes of PCI memory at "
+                               "0x%016llX.\n", c->name,
+                               (unsigned long long)(1 + res->end - res->start),
+                               (unsigned long long)res->start);
                }
        }
 
@@ -704,9 +705,10 @@ static int i2o_iop_systab_set(struct i2o_controller *c)
                        c->io_alloc = 1;
                        sb->current_io_size = 1 + res->end - res->start;
                        sb->current_mem_base = res->start;
-                       osm_info("%s: allocated %ld bytes of PCI I/O at 0x%08lX"
-                                ".\n", c->name, 1 + res->end - res->start,
-                                res->start);
+                       osm_info("%s: allocated %llu bytes of PCI I/O at "
+                               "0x%016llX.\n", c->name,
+                               (unsigned long long)(1 + res->end - res->start),
+                               (unsigned long long)res->start);
                }
        }
 
index da8e4d7339cc42f6d2cc7c58106e6bf9604ffe40..8576a65ca1c3383fbdf2c74ff895fbc8b75e7ba7 100644 (file)
@@ -546,9 +546,9 @@ static int mmci_probe(struct amba_device *dev, void *id)
 
        mmc_add_host(mmc);
 
-       printk(KERN_INFO "%s: MMCI rev %x cfg %02x at 0x%08lx irq %d,%d\n",
+       printk(KERN_INFO "%s: MMCI rev %x cfg %02x at 0x%016llx irq %d,%d\n",
                mmc_hostname(mmc), amba_rev(dev), amba_config(dev),
-               dev->res.start, dev->irq[0], dev->irq[1]);
+               (unsigned long long)dev->res.start, dev->irq[0], dev->irq[1]);
 
        init_timer(&host->timer);
        host->timer.data = (unsigned long)host;
index 322890b400a6000a9d627fa44d69fcabdfe9f131..75c4f0cbda1147c1eea01925fd432f52cbaa3a20 100644 (file)
@@ -335,10 +335,10 @@ static int svia_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
                if ((pci_resource_start(pdev, i) == 0) ||
                    (pci_resource_len(pdev, i) < bar_sizes[i])) {
                        dev_printk(KERN_ERR, &pdev->dev,
-                                  "invalid PCI BAR %u (sz 0x%lx, val 0x%lx)\n",
-                                  i,
-                                  pci_resource_start(pdev, i),
-                                  pci_resource_len(pdev, i));
+                               "invalid PCI BAR %u (sz 0x%llx, val 0x%llx)\n",
+                               i,
+                               (unsigned long long)pci_resource_start(pdev, i),
+                               (unsigned long long)pci_resource_len(pdev, i));
                        rc = -ENODEV;
                        goto err_out_regions;
                }