Skip to content

Commit e29419f

Browse files
committed
[PATCH] 64bit resource: fix up printks for resources in misc drivers
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>
1 parent 685143a commit e29419f

14 files changed

Lines changed: 54 additions & 42 deletions

File tree

‎drivers/amba/bus.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,9 @@ static DEVICE_ATTR(name, S_IRUGO, show_##name, NULL)
180180
amba_attr(id, "%08x\n", dev->periphid);
181181
amba_attr(irq0, "%u\n", dev->irq[0]);
182182
amba_attr(irq1, "%u\n", dev->irq[1]);
183-
amba_attr(resource, "\t%08lx\t%08lx\t%08lx\n",
184-
dev->res.start, dev->res.end, dev->res.flags);
183+
amba_attr(resource, "\t%016llx\t%016llx\t%016lx\n",
184+
(unsigned long long)dev->res.start, (unsigned long long)dev->res.end,
185+
dev->res.flags);
185186

186187
/**
187188
* amba_device_register - register an AMBA device

‎drivers/atm/ambassador.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2257,7 +2257,8 @@ static int __devinit amb_probe(struct pci_dev *pci_dev, const struct pci_device_
22572257
}
22582258

22592259
PRINTD (DBG_INFO, "found Madge ATM adapter (amb) at"
2260-
" IO %lx, IRQ %u, MEM %p", pci_resource_start(pci_dev, 1),
2260+
" IO %llx, IRQ %u, MEM %p",
2261+
(unsigned long long)pci_resource_start(pci_dev, 1),
22612262
irq, bus_to_virt(pci_resource_start(pci_dev, 0)));
22622263

22632264
// check IO region

‎drivers/atm/firestream.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1657,9 +1657,10 @@ static int __devinit fs_init (struct fs_dev *dev)
16571657
func_enter ();
16581658
pci_dev = dev->pci_dev;
16591659

1660-
printk (KERN_INFO "found a FireStream %d card, base %08lx, irq%d.\n",
1660+
printk (KERN_INFO "found a FireStream %d card, base %16llx, irq%d.\n",
16611661
IS_FS50(dev)?50:155,
1662-
pci_resource_start(pci_dev, 0), dev->pci_dev->irq);
1662+
(unsigned long long)pci_resource_start(pci_dev, 0),
1663+
dev->pci_dev->irq);
16631664

16641665
if (fs_debug & FS_DEBUG_INIT)
16651666
my_hd ((unsigned char *) dev, sizeof (*dev));

‎drivers/block/sx8.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1694,9 +1694,10 @@ static int carm_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
16941694
DPRINTK("waiting for probe_comp\n");
16951695
wait_for_completion(&host->probe_comp);
16961696

1697-
printk(KERN_INFO "%s: pci %s, ports %d, io %lx, irq %u, major %d\n",
1697+
printk(KERN_INFO "%s: pci %s, ports %d, io %llx, irq %u, major %d\n",
16981698
host->name, pci_name(pdev), (int) CARM_MAX_PORTS,
1699-
pci_resource_start(pdev, 0), pdev->irq, host->major);
1699+
(unsigned long long)pci_resource_start(pdev, 0),
1700+
pdev->irq, host->major);
17001701

17011702
carm_host_id++;
17021703
pci_set_drvdata(pdev, host);

‎drivers/char/applicom.c‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,13 +209,16 @@ static int __init applicom_init(void)
209209
RamIO = ioremap(dev->resource[0].start, LEN_RAM_IO);
210210

211211
if (!RamIO) {
212-
printk(KERN_INFO "ac.o: Failed to ioremap PCI memory space at 0x%lx\n", dev->resource[0].start);
212+
printk(KERN_INFO "ac.o: Failed to ioremap PCI memory "
213+
"space at 0x%llx\n",
214+
(unsigned long long)dev->resource[0].start);
213215
pci_disable_device(dev);
214216
return -EIO;
215217
}
216218

217-
printk(KERN_INFO "Applicom %s found at mem 0x%lx, irq %d\n",
218-
applicom_pci_devnames[dev->device-1], dev->resource[0].start,
219+
printk(KERN_INFO "Applicom %s found at mem 0x%llx, irq %d\n",
220+
applicom_pci_devnames[dev->device-1],
221+
(unsigned long long)dev->resource[0].start,
219222
dev->irq);
220223

221224
boardno = ac_register_board(dev->resource[0].start, RamIO,0);

‎drivers/ieee1394/ohci1394.c‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -590,11 +590,11 @@ static void ohci_initialize(struct ti_ohci *ohci)
590590
buf = reg_read(ohci, OHCI1394_Version);
591591
sprintf (irq_buf, "%d", ohci->dev->irq);
592592
PRINT(KERN_INFO, "OHCI-1394 %d.%d (PCI): IRQ=[%s] "
593-
"MMIO=[%lx-%lx] Max Packet=[%d] IR/IT contexts=[%d/%d]",
593+
"MMIO=[%llx-%llx] Max Packet=[%d] IR/IT contexts=[%d/%d]",
594594
((((buf) >> 16) & 0xf) + (((buf) >> 20) & 0xf) * 10),
595595
((((buf) >> 4) & 0xf) + ((buf) & 0xf) * 10), irq_buf,
596-
pci_resource_start(ohci->dev, 0),
597-
pci_resource_start(ohci->dev, 0) + OHCI1394_REGISTER_SIZE - 1,
596+
(unsigned long long)pci_resource_start(ohci->dev, 0),
597+
(unsigned long long)pci_resource_start(ohci->dev, 0) + OHCI1394_REGISTER_SIZE - 1,
598598
ohci->max_packet_size,
599599
ohci->nb_iso_rcv_ctx, ohci->nb_iso_xmit_ctx);
600600

@@ -3270,15 +3270,16 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev,
32703270
* clearly says it's 2kb, so this shouldn't be a problem. */
32713271
ohci_base = pci_resource_start(dev, 0);
32723272
if (pci_resource_len(dev, 0) < OHCI1394_REGISTER_SIZE)
3273-
PRINT(KERN_WARNING, "PCI resource length of %lx too small!",
3274-
pci_resource_len(dev, 0));
3273+
PRINT(KERN_WARNING, "PCI resource length of 0x%llx too small!",
3274+
(unsigned long long)pci_resource_len(dev, 0));
32753275

32763276
/* Seems PCMCIA handles this internally. Not sure why. Seems
32773277
* pretty bogus to force a driver to special case this. */
32783278
#ifndef PCMCIA
32793279
if (!request_mem_region (ohci_base, OHCI1394_REGISTER_SIZE, OHCI1394_DRIVER_NAME))
3280-
FAIL(-ENOMEM, "MMIO resource (0x%lx - 0x%lx) unavailable",
3281-
ohci_base, ohci_base + OHCI1394_REGISTER_SIZE);
3280+
FAIL(-ENOMEM, "MMIO resource (0x%llx - 0x%llx) unavailable",
3281+
(unsigned long long)ohci_base,
3282+
(unsigned long long)ohci_base + OHCI1394_REGISTER_SIZE);
32823283
#endif
32833284
ohci->init_state = OHCI_INIT_HAVE_MEM_REGION;
32843285

‎drivers/infiniband/hw/ipath/ipath_driver.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -460,10 +460,10 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
460460
for (j = 0; j < 6; j++) {
461461
if (!pdev->resource[j].start)
462462
continue;
463-
ipath_cdbg(VERBOSE, "BAR %d start %lx, end %lx, len %lx\n",
464-
j, pdev->resource[j].start,
465-
pdev->resource[j].end,
466-
pci_resource_len(pdev, j));
463+
ipath_cdbg(VERBOSE, "BAR %d start %llx, end %llx, len %llx\n",
464+
j, (unsigned long long)pdev->resource[j].start,
465+
(unsigned long long)pdev->resource[j].end,
466+
(unsigned long long)pci_resource_len(pdev, j));
467467
}
468468

469469
if (!addr) {

‎drivers/infiniband/hw/mthca/mthca_main.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,9 @@ static int __devinit mthca_dev_lim(struct mthca_dev *mdev, struct mthca_dev_lim
172172

173173
if (dev_lim->uar_size > pci_resource_len(mdev->pdev, 2)) {
174174
mthca_err(mdev, "HCA reported UAR size of 0x%x bigger than "
175-
"PCI resource 2 size of 0x%lx, aborting.\n",
176-
dev_lim->uar_size, pci_resource_len(mdev->pdev, 2));
175+
"PCI resource 2 size of 0x%llx, aborting.\n",
176+
dev_lim->uar_size,
177+
(unsigned long long)pci_resource_len(mdev->pdev, 2));
177178
return -ENODEV;
178179
}
179180

‎drivers/input/serio/ct82c710.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ static int __devinit ct82c710_probe(struct platform_device *dev)
189189
strlcpy(ct82c710_port->name, "C&T 82c710 mouse port",
190190
sizeof(ct82c710_port->name));
191191
snprintf(ct82c710_port->phys, sizeof(ct82c710_port->phys),
192-
"isa%04lx/serio0", CT82C710_DATA);
192+
"isa%16llx/serio0", (unsigned long long)CT82C710_DATA);
193193

194194
serio_register_port(ct82c710_port);
195195

@@ -241,8 +241,8 @@ static int __init ct82c710_init(void)
241241

242242
serio_register_port(ct82c710_port);
243243

244-
printk(KERN_INFO "serio: C&T 82c710 mouse port at %#lx irq %d\n",
245-
CT82C710_DATA, CT82C710_IRQ);
244+
printk(KERN_INFO "serio: C&T 82c710 mouse port at %#llx irq %d\n",
245+
(unsigned long long)CT82C710_DATA, CT82C710_IRQ);
246246

247247
return 0;
248248

‎drivers/isdn/hisax/telespci.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,9 @@ setup_telespci(struct IsdnCard *card)
311311
}
312312
cs->hw.teles0.membase = ioremap(pci_resource_start(dev_tel, 0),
313313
PAGE_SIZE);
314-
printk(KERN_INFO "Found: Zoran, base-address: 0x%lx, irq: 0x%x\n",
315-
pci_resource_start(dev_tel, 0), dev_tel->irq);
314+
printk(KERN_INFO "Found: Zoran, base-address: 0x%llx, irq: 0x%x\n",
315+
(unsigned long long)pci_resource_start(dev_tel, 0),
316+
dev_tel->irq);
316317
} else {
317318
printk(KERN_WARNING "TelesPCI: No PCI card found\n");
318319
return(0);

0 commit comments

Comments
 (0)