# This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2005/02/08 11:04:57-08:00 djiang@plexity.net # [PATCH] PCI: more 64bit resource fixes # # Here are all the driver updates I have so far. # # Signed-off-by: Dave Jiang # Signed-off-by: Greg Kroah-Hartman # # drivers/net/e100.c # 2005/02/03 12:23:08-08:00 djiang@plexity.net +2 -2 # PCI: more 64bit resource fixes # # drivers/net/8139too.c # 2005/02/03 12:23:08-08:00 djiang@plexity.net +2 -2 # PCI: more 64bit resource fixes # # drivers/net/8139cp.c # 2005/02/03 12:23:08-08:00 djiang@plexity.net +6 -5 # PCI: more 64bit resource fixes # # drivers/mtd/maps/scx200_docflash.c # 2005/02/03 12:23:08-08:00 djiang@plexity.net +3 -2 # PCI: more 64bit resource fixes # # drivers/mtd/maps/ichxrom.c # 2005/02/03 12:23:08-08:00 djiang@plexity.net +3 -2 # PCI: more 64bit resource fixes # # drivers/mtd/maps/amd76xrom.c # 2005/02/03 12:23:08-08:00 djiang@plexity.net +3 -2 # PCI: more 64bit resource fixes # # drivers/mtd/devices/pmc551.c # 2005/02/03 12:23:08-08:00 djiang@plexity.net +4 -4 # PCI: more 64bit resource fixes # # drivers/message/i2o/iop.c # 2005/02/03 12:23:08-08:00 djiang@plexity.net +8 -6 # PCI: more 64bit resource fixes # # drivers/ieee1394/ohci1394.c # 2005/02/03 12:23:08-08:00 djiang@plexity.net +10 -8 # PCI: more 64bit resource fixes # # drivers/ide/pci/aec62xx.c # 2005/02/03 12:23:08-08:00 djiang@plexity.net +1 -1 # PCI: more 64bit resource fixes # # drivers/char/applicom.c # 2005/02/03 12:23:08-08:00 djiang@plexity.net +5 -3 # PCI: more 64bit resource fixes # # drivers/block/sx8.c # 2005/02/03 12:23:08-08:00 djiang@plexity.net +3 -2 # PCI: more 64bit resource fixes # # ChangeSet # 2005/02/07 15:12:55-08:00 greg@kroah.com # [PATCH] PCI Hotplug: fix up warnings caused by 64bit resource change. # # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/hotplug/shpchp_hpc.c # 2005/02/07 12:51:45-08:00 greg@kroah.com +7 -5 # PCI Hotplug: fix up warnings caused by 64bit resource change. # # drivers/pci/hotplug/pciehp_hpc.c # 2005/02/07 12:51:45-08:00 greg@kroah.com +3 -2 # PCI Hotplug: fix up warnings caused by 64bit resource change. # # drivers/pci/hotplug/cpqphp_core.c # 2005/02/07 12:51:45-08:00 greg@kroah.com +5 -5 # PCI Hotplug: fix up warnings caused by 64bit resource change. # # drivers/pci/hotplug/cpcihp_zt5550.c # 2005/02/07 12:51:45-08:00 greg@kroah.com +5 -4 # PCI Hotplug: fix up warnings caused by 64bit resource change. # # ChangeSet # 2005/02/07 15:12:29-08:00 dave.jiang@gmail.com # [PATCH] resource: arm arch updates for u64 resource # # ARM arch changes for converting resources to u64 from unsigned long. # # Signed-off-by: Dave Jiang # Signed-off-by: Greg Kroah-Hartman # # arch/arm/kernel/setup.c # 2005/02/07 12:52:28-08:00 dave.jiang@gmail.com +35 -6 # resource: arm arch updates for u64 resource # # arch/arm/kernel/bios32.c # 2005/02/07 12:52:28-08:00 dave.jiang@gmail.com +3 -3 # resource: arm arch updates for u64 resource # # ChangeSet # 2005/02/07 15:12:00-08:00 dave.jiang@gmail.com # [PATCH] resource: ppc arch updates for u64 resource # # PPC arch update for using u64 resources. # # Signed-off-by: Dave Jiang # Signed-off-by: Matt Porter # Signed-off-by: Greg Kroah-Hartman # # arch/ppc/kernel/pci.c # 2005/02/07 12:52:32-08:00 dave.jiang@gmail.com +14 -14 # resource: ppc arch updates for u64 resource # # ChangeSet # 2005/02/07 15:11:34-08:00 dave.jiang@gmail.com # [PATCH] resource: i386 arch fixes for u64 resources # # i386 arch update to changing resource from unsigned long to u64 # # Signed-off-by: Dave Jiang # Signed-off-by: Greg Kroah-Hartman # # arch/i386/pci/i386.c # 2005/02/07 12:52:36-08:00 dave.jiang@gmail.com +1 -1 # resource: i386 arch fixes for u64 resources # # ChangeSet # 2005/02/07 15:11:05-08:00 dave.jiang@gmail.com # [PATCH] resource: some driver updates for u64 resource # # Some driver updates for changing resource from unsigned long to u64. # Mostly printk updates. Also applied suggestion by Andreas Dilger to # remove the case where u64 division would occur in 8250 UART code. # # Updated driver patch with the proper unsigned long long printk typecast. # # Signed-off-by: Dave Jiang # Signed-off-by: Greg Kroah-Hartman # # drivers/video/console/vgacon.c # 2005/02/07 12:52:41-08:00 dave.jiang@gmail.com +6 -6 # resource: some driver updates for u64 resource # # drivers/serial/8250_pci.c # 2005/02/07 12:52:41-08:00 dave.jiang@gmail.com +2 -2 # resource: some driver updates for u64 resource # # drivers/ide/pci/pdc202xx_old.c # 2005/02/07 12:52:41-08:00 dave.jiang@gmail.com +2 -2 # resource: some driver updates for u64 resource # # drivers/ide/pci/pdc202xx_new.c # 2005/02/07 12:52:41-08:00 dave.jiang@gmail.com +2 -2 # resource: some driver updates for u64 resource # # drivers/ide/pci/hpt34x.c # 2005/02/07 12:52:41-08:00 dave.jiang@gmail.com +2 -2 # resource: some driver updates for u64 resource # # drivers/ide/pci/cmd64x.c # 2005/02/07 12:52:41-08:00 dave.jiang@gmail.com +2 -1 # resource: some driver updates for u64 resource # # ChangeSet # 2005/02/07 15:10:38-08:00 dave.jiang@gmail.com # [PATCH] resource: core changes to update u64 to unsigned long # # Here's the rework per Andrew and others' comments. Attempt to change # resource.start and resource.end to u64 from unsigned long. # # Here's the prink's with the proper cast I think. Should only be change # in core and driver. The arch patches are fine. # # Signed-off-by: Dave Jiang # Signed-off-by: Greg Kroah-Hartman # # kernel/resource.c # 2005/02/07 12:52:45-08:00 dave.jiang@gmail.com +21 -21 # resource: core changes to update u64 to unsigned long # # include/linux/pnp.h # 2005/02/07 12:52:45-08:00 dave.jiang@gmail.com +2 -2 # resource: core changes to update u64 to unsigned long # # include/linux/pci.h # 2005/02/07 12:52:45-08:00 dave.jiang@gmail.com +4 -4 # resource: core changes to update u64 to unsigned long # # include/linux/ioport.h # 2005/02/07 12:52:45-08:00 dave.jiang@gmail.com +12 -11 # resource: core changes to update u64 to unsigned long # # include/asm-arm/mach/pci.h # 2005/02/07 12:52:45-08:00 dave.jiang@gmail.com +1 -1 # resource: core changes to update u64 to unsigned long # # drivers/pnp/resource.c # 2005/02/07 12:52:45-08:00 dave.jiang@gmail.com +4 -4 # resource: core changes to update u64 to unsigned long # # drivers/pnp/manager.c # 2005/02/07 12:52:45-08:00 dave.jiang@gmail.com +9 -5 # resource: core changes to update u64 to unsigned long # # drivers/pci/setup-res.c # 2005/02/07 12:52:45-08:00 dave.jiang@gmail.com +15 -11 # resource: core changes to update u64 to unsigned long # # drivers/pci/setup-bus.c # 2005/02/07 12:52:45-08:00 dave.jiang@gmail.com +3 -2 # resource: core changes to update u64 to unsigned long # # drivers/pci/proc.c # 2005/02/07 12:52:45-08:00 dave.jiang@gmail.com +6 -12 # resource: core changes to update u64 to unsigned long # # drivers/pci/pci.h # 2005/02/07 12:52:45-08:00 dave.jiang@gmail.com +3 -3 # resource: core changes to update u64 to unsigned long # # drivers/pci/pci.c # 2005/02/07 12:52:45-08:00 dave.jiang@gmail.com +2 -2 # resource: core changes to update u64 to unsigned long # # drivers/pci/pci-sysfs.c # 2005/02/07 12:52:45-08:00 dave.jiang@gmail.com +3 -3 # resource: core changes to update u64 to unsigned long # # drivers/pci/bus.c # 2005/02/07 12:52:45-08:00 dave.jiang@gmail.com +2 -2 # resource: core changes to update u64 to unsigned long # diff -Nru a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c --- a/arch/arm/kernel/bios32.c 2005-02-08 14:47:46 -08:00 +++ b/arch/arm/kernel/bios32.c 2005-02-08 14:47:46 -08:00 @@ -304,7 +304,7 @@ static void __devinit pdev_fixup_device_resources(struct pci_sys_data *root, struct pci_dev *dev) { - unsigned long offset; + u64 offset; int i; for (i = 0; i < PCI_NUM_RESOURCES; i++) { @@ -619,9 +619,9 @@ * which might be mirrored at 0x0100-0x03ff.. */ void pcibios_align_resource(void *data, struct resource *res, - unsigned long size, unsigned long align) + u64 size, u64 align) { - unsigned long start = res->start; + u64 start = res->start; if (res->flags & IORESOURCE_IO && start & 0x300) start = (start + 0x3ff) & ~0x3ff; diff -Nru a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c --- a/arch/arm/kernel/setup.c 2005-02-08 14:47:46 -08:00 +++ b/arch/arm/kernel/setup.c 2005-02-08 14:47:46 -08:00 @@ -115,9 +115,23 @@ * Standard memory resources */ static struct resource mem_res[] = { - { "Video RAM", 0, 0, IORESOURCE_MEM }, - { "Kernel text", 0, 0, IORESOURCE_MEM }, - { "Kernel data", 0, 0, IORESOURCE_MEM } + { + .name = "Video RAM", + .start = 0, + .end = 0, + .flags = IORESOURCE_MEM + }, + { + .name = "Kernel text", + .start = 0, + .end = 0, + .flags = IORESOURCE_MEM + }, + { + .name = "Kernel data", + .start = 0, + .end = 0, + .flags = IORESOURCE_MEM } }; #define video_ram mem_res[0] @@ -125,9 +139,24 @@ #define kernel_data mem_res[2] static struct resource io_res[] = { - { "reserved", 0x3bc, 0x3be, IORESOURCE_IO | IORESOURCE_BUSY }, - { "reserved", 0x378, 0x37f, IORESOURCE_IO | IORESOURCE_BUSY }, - { "reserved", 0x278, 0x27f, IORESOURCE_IO | IORESOURCE_BUSY } + { + .name = "reserved", + .start = 0x3bc, + .end = 0x3be, + .flags = IORESOURCE_IO | IORESOURCE_BUSY + }, + { + .name = "reserved", + .start = 0x378, + .end = 0x37f, + .flags = IORESOURCE_IO | IORESOURCE_BUSY + }, + { + .name = "reserved", + .start = 0x278, + .end = 0x27f, + .flags = IORESOURCE_IO | IORESOURCE_BUSY + } }; #define lp0 io_res[0] diff -Nru a/arch/i386/pci/i386.c b/arch/i386/pci/i386.c --- a/arch/i386/pci/i386.c 2005-02-08 14:47:46 -08:00 +++ b/arch/i386/pci/i386.c 2005-02-08 14:47:46 -08:00 @@ -48,7 +48,7 @@ */ void pcibios_align_resource(void *data, struct resource *res, - unsigned long size, unsigned long align) + u64 size, u64 align) { if (res->flags & IORESOURCE_IO) { unsigned long start = res->start; diff -Nru a/arch/ppc/kernel/pci.c b/arch/ppc/kernel/pci.c --- a/arch/ppc/kernel/pci.c 2005-02-08 14:47:46 -08:00 +++ b/arch/ppc/kernel/pci.c 2005-02-08 14:47:46 -08:00 @@ -114,7 +114,7 @@ if (!res->flags) continue; if (res->end == 0xffffffff) { - DBG("PCI:%s Resource %d [%08lx-%08lx] is unassigned\n", + DBG("PCI:%s Resource %d [%08Lx-%08Lx] is unassigned\n", pci_name(dev), i, res->start, res->end); res->end -= res->start; res->start = 0; @@ -173,17 +173,17 @@ * but we want to try to avoid allocating at 0x2900-0x2bff * which might have be mirrored at 0x0100-0x03ff.. */ -void pcibios_align_resource(void *data, struct resource *res, unsigned long size, - unsigned long align) +void pcibios_align_resource(void *data, struct resource *res, u64 size, + u64 align) { struct pci_dev *dev = data; if (res->flags & IORESOURCE_IO) { - unsigned long start = res->start; + u64 start = res->start; if (size > 0x100) { printk(KERN_ERR "PCI: I/O Region %s/%d too large" - " (%ld bytes)\n", pci_name(dev), + " (%Ld bytes)\n", pci_name(dev), dev->resource - res, size); } @@ -255,7 +255,7 @@ } } - DBG("PCI: bridge rsrc %lx..%lx (%lx), parent %p\n", + DBG("PCI: bridge rsrc %Lx..%Lx (%lx), parent %p\n", res->start, res->end, res->flags, pr); if (pr) { if (request_resource(pr, res) == 0) @@ -306,7 +306,7 @@ *pp = NULL; for (p = res->child; p != NULL; p = p->sibling) { p->parent = res; - DBG(KERN_INFO "PCI: reparented %s [%lx..%lx] under %s\n", + DBG(KERN_INFO "PCI: reparented %s [%Lx..%Lx] under %s\n", p->name, p->start, p->end, res->name); } return 0; @@ -362,12 +362,12 @@ try = conflict->start - 1; } if (request_resource(pr, res)) { - DBG(KERN_ERR "PCI: huh? couldn't move to %lx..%lx\n", + DBG(KERN_ERR "PCI: huh? couldn't move to %Lx..%Lx\n", res->start, res->end); return -1; /* "can't happen" */ } update_bridge_base(bus, i); - printk(KERN_INFO "PCI: bridge %d resource %d moved to %lx..%lx\n", + printk(KERN_INFO "PCI: bridge %d resource %d moved to %Lx..%Lx\n", bus->number, i, res->start, res->end); return 0; } @@ -479,14 +479,14 @@ { struct resource *pr, *r = &dev->resource[idx]; - DBG("PCI:%s: Resource %d: %08lx-%08lx (f=%lx)\n", + DBG("PCI:%s: Resource %d: %016Lx-%016Lx (f=%lx)\n", pci_name(dev), idx, r->start, r->end, r->flags); pr = pci_find_parent_resource(dev, r); if (!pr || request_resource(pr, r) < 0) { printk(KERN_ERR "PCI: Cannot allocate resource region %d" " of device %s\n", idx, pci_name(dev)); if (pr) - DBG("PCI: parent is %p: %08lx-%08lx (f=%lx)\n", + DBG("PCI: parent is %p: %016Lx-%016Lx (f=%lx)\n", pr, pr->start, pr->end, pr->flags); /* We'll assign a new address later */ r->flags |= IORESOURCE_UNSET; @@ -1061,7 +1061,7 @@ DBG("Remapping Bus %d, bridge: %s\n", bus->number, bridge->slot_name); res.start -= ((unsigned long) hose->io_base_virt - isa_io_base); res.end -= ((unsigned long) hose->io_base_virt - isa_io_base); - DBG(" IO window: %08lx-%08lx\n", res.start, res.end); + DBG(" IO window: %016Lx-%016Lx\n", res.start, res.end); /* Set up the top and bottom of the PCI I/O segment for this bus. */ pci_read_config_dword(bridge, PCI_IO_BASE, &l); @@ -1209,8 +1209,8 @@ continue; if ((r->flags & IORESOURCE_IO) == 0) continue; - DBG("Trying to allocate from %08lx, size %08lx from parent" - " res %d: %08lx -> %08lx\n", + DBG("Trying to allocate from %016Lx, size %016Lx from parent" + " res %d: %016Lx -> %016Lx\n", res->start, res->end, i, r->start, r->end); if (allocate_resource(r, res, res->end + 1, res->start, max, diff -Nru a/drivers/block/sx8.c b/drivers/block/sx8.c --- a/drivers/block/sx8.c 2005-02-08 14:47:46 -08:00 +++ b/drivers/block/sx8.c 2005-02-08 14:47:46 -08:00 @@ -1689,9 +1689,10 @@ DPRINTK("waiting for probe_sem\n"); down(&host->probe_sem); - 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); diff -Nru a/drivers/char/applicom.c b/drivers/char/applicom.c --- a/drivers/char/applicom.c 2005-02-08 14:47:46 -08:00 +++ b/drivers/char/applicom.c 2005-02-08 14:47:46 -08:00 @@ -215,13 +215,15 @@ 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); diff -Nru a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c --- a/drivers/ide/pci/aec62xx.c 2005-02-08 14:47:46 -08:00 +++ b/drivers/ide/pci/aec62xx.c 2005-02-08 14:47:46 -08:00 @@ -301,7 +301,7 @@ if (dev->resource[PCI_ROM_RESOURCE].start) { pci_write_config_dword(dev, PCI_ROM_ADDRESS, dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE); - printk(KERN_INFO "%s: ROM enabled at 0x%08lx\n", name, dev->resource[PCI_ROM_RESOURCE].start); + printk(KERN_INFO "%s: ROM enabled at 0x%16llx\n", name, (unsigned long long)dev->resource[PCI_ROM_RESOURCE].start); } if (bus_speed <= 33) diff -Nru a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c --- a/drivers/ide/pci/cmd64x.c 2005-02-08 14:47:46 -08:00 +++ b/drivers/ide/pci/cmd64x.c 2005-02-08 14:47:46 -08:00 @@ -609,7 +609,8 @@ #ifdef __i386__ if (dev->resource[PCI_ROM_RESOURCE].start) { pci_write_config_byte(dev, PCI_ROM_ADDRESS, dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE); - printk(KERN_INFO "%s: ROM enabled at 0x%08lx\n", name, dev->resource[PCI_ROM_RESOURCE].start); + printk(KERN_INFO "%s: ROM enabled at 0x%16llx\n", name, + (unsigned long long)dev->resource[PCI_ROM_RESOURCE].start); } #endif diff -Nru a/drivers/ide/pci/hpt34x.c b/drivers/ide/pci/hpt34x.c --- a/drivers/ide/pci/hpt34x.c 2005-02-08 14:47:46 -08:00 +++ b/drivers/ide/pci/hpt34x.c 2005-02-08 14:47:46 -08:00 @@ -175,8 +175,8 @@ if (pci_resource_start(dev, PCI_ROM_RESOURCE)) { pci_write_config_byte(dev, PCI_ROM_ADDRESS, dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE); - printk(KERN_INFO "HPT345: ROM enabled at 0x%08lx\n", - dev->resource[PCI_ROM_RESOURCE].start); + printk(KERN_INFO "HPT345: ROM enabled at 0x%16llx\n", + (unsigned long long)dev->resource[PCI_ROM_RESOURCE].start); } pci_write_config_byte(dev, PCI_LATENCY_TIMER, 0xF0); } else { diff -Nru a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c --- a/drivers/ide/pci/pdc202xx_new.c 2005-02-08 14:47:46 -08:00 +++ b/drivers/ide/pci/pdc202xx_new.c 2005-02-08 14:47:46 -08:00 @@ -313,8 +313,8 @@ if (dev->resource[PCI_ROM_RESOURCE].start) { pci_write_config_dword(dev, PCI_ROM_ADDRESS, dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE); - printk(KERN_INFO "%s: ROM enabled at 0x%08lx\n", - name, dev->resource[PCI_ROM_RESOURCE].start); + printk(KERN_INFO "%s: ROM enabled at 0x%16llx\n", + name, (unsigned long long)dev->resource[PCI_ROM_RESOURCE].start); } #ifdef CONFIG_PPC_PMAC diff -Nru a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c --- a/drivers/ide/pci/pdc202xx_old.c 2005-02-08 14:47:46 -08:00 +++ b/drivers/ide/pci/pdc202xx_old.c 2005-02-08 14:47:46 -08:00 @@ -580,8 +580,8 @@ if (dev->resource[PCI_ROM_RESOURCE].start) { pci_write_config_dword(dev, PCI_ROM_ADDRESS, dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE); - printk(KERN_INFO "%s: ROM enabled at 0x%08lx\n", - name, dev->resource[PCI_ROM_RESOURCE].start); + printk(KERN_INFO "%s: ROM enabled at 0x%16llx\n", + name, (unsigned long long)dev->resource[PCI_ROM_RESOURCE].start); } /* diff -Nru a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c --- a/drivers/ieee1394/ohci1394.c 2005-02-08 14:47:46 -08:00 +++ b/drivers/ieee1394/ohci1394.c 2005-02-08 14:47:46 -08:00 @@ -581,11 +581,12 @@ sprintf (irq_buf, "%s", __irq_itoa(ohci->dev->irq)); #endif PRINT(KERN_INFO, "OHCI-1394 %d.%d (PCI): IRQ=[%s] " - "MMIO=[%lx-%lx] Max Packet=[%d]", + "MMIO=[%llx-%llx] Max Packet=[%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); /* Check all of our ports to make sure that if anything is @@ -3187,7 +3188,7 @@ struct hpsb_host *host; struct ti_ohci *ohci; /* shortcut to currently handled device */ - unsigned long ohci_base; + u64 ohci_base; if (version_printed++ == 0) PRINT_G(KERN_INFO, "%s", version); @@ -3243,15 +3244,16 @@ * 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, "Unexpected PCI resource length of %lx!", - pci_resource_len(dev, 0)); + PRINT(KERN_WARNING, "Unexpected PCI resource length of %llx!", + (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; diff -Nru a/drivers/message/i2o/iop.c b/drivers/message/i2o/iop.c --- a/drivers/message/i2o/iop.c 2005-02-08 14:47:46 -08:00 +++ b/drivers/message/i2o/iop.c 2005-02-08 14:47:46 -08:00 @@ -767,9 +767,10 @@ c->mem_alloc = 1; sb->current_mem_size = 1 + res->end - res->start; sb->current_mem_base = res->start; - printk(KERN_INFO "%s: allocated %ld bytes of PCI memory" - " at 0x%08lX.\n", c->name, - 1 + res->end - res->start, res->start); + printk(KERN_INFO "%s: allocated %llu bytes of PCI memory" + " at 0x%16llx.\n", c->name, + (unsigned long long)(1 + res->end - res->start), + (unsigned long long)res->start); } } @@ -790,9 +791,10 @@ c->io_alloc = 1; sb->current_io_size = 1 + res->end - res->start; sb->current_mem_base = res->start; - printk(KERN_INFO "%s: allocated %ld bytes of PCI I/O at" - " 0x%08lX.\n", c->name, - 1 + res->end - res->start, res->start); + printk(KERN_INFO "%s: allocated %llu bytes of PCI I/O at" + " 0x%16llx.\n", c->name, + (unsigned long long)(1 + res->end - res->start), + (unsigned long long)res->start); } } diff -Nru a/drivers/mtd/devices/pmc551.c b/drivers/mtd/devices/pmc551.c --- a/drivers/mtd/devices/pmc551.c 2005-02-08 14:47:46 -08:00 +++ b/drivers/mtd/devices/pmc551.c 2005-02-08 14:47:46 -08:00 @@ -552,11 +552,11 @@ /* * Some screen fun */ - printk(KERN_DEBUG "pmc551: %d%c (0x%x) of %sprefetchable memory at 0x%lx\n", + printk(KERN_DEBUG "pmc551: %d%c (0x%x) of %sprefetchable memory at 0x%llx\n", (size<1024)?size:(size<1048576)?size>>10:size>>20, (size<1024)?'B':(size<1048576)?'K':'M', size, ((dcmd&(0x1<<3)) == 0)?"non-":"", - (dev->resource[0].start)&PCI_BASE_ADDRESS_MEM_MASK ); + (unsigned long long)((dev->resource[0].start)&PCI_BASE_ADDRESS_MEM_MASK) ); /* * Check to see the state of the memory @@ -686,8 +686,8 @@ break; } - printk(KERN_NOTICE "pmc551: Found PCI V370PDC at 0x%lX\n", - PCI_Device->resource[0].start); + printk(KERN_NOTICE "pmc551: Found PCI V370PDC at 0x%llx\n", + (unsigned long long)PCI_Device->resource[0].start); /* * The PMC551 device acts VERY weird if you don't init it diff -Nru a/drivers/mtd/maps/amd76xrom.c b/drivers/mtd/maps/amd76xrom.c --- a/drivers/mtd/maps/amd76xrom.c 2005-02-08 14:47:46 -08:00 +++ b/drivers/mtd/maps/amd76xrom.c 2005-02-08 14:47:46 -08:00 @@ -123,9 +123,10 @@ window->rsrc.parent = NULL; printk(KERN_ERR MOD_NAME " %s(): Unable to register resource" - " 0x%.08lx-0x%.08lx - kernel bug?\n", + " 0x%.16llx-0x%.16llx - kernel bug?\n", __func__, - window->rsrc.start, window->rsrc.end); + (unsigned long long)window->rsrc.start, + (unsigned long long)window->rsrc.end); } #if 0 diff -Nru a/drivers/mtd/maps/ichxrom.c b/drivers/mtd/maps/ichxrom.c --- a/drivers/mtd/maps/ichxrom.c 2005-02-08 14:47:46 -08:00 +++ b/drivers/mtd/maps/ichxrom.c 2005-02-08 14:47:46 -08:00 @@ -177,9 +177,10 @@ window->rsrc.parent = NULL; printk(KERN_DEBUG MOD_NAME ": %s(): Unable to register resource" - " 0x%.08lx-0x%.08lx - kernel bug?\n", + " 0x%.16llx-0x%.16llx - kernel bug?\n", __func__, - window->rsrc.start, window->rsrc.end); + (unsigned long long)window->rsrc.start, + (unsigned long long)window->rsrc.end); } /* Map the firmware hub into my address space. */ diff -Nru a/drivers/mtd/maps/scx200_docflash.c b/drivers/mtd/maps/scx200_docflash.c --- a/drivers/mtd/maps/scx200_docflash.c 2005-02-08 14:47:46 -08:00 +++ b/drivers/mtd/maps/scx200_docflash.c 2005-02-08 14:47:46 -08:00 @@ -165,8 +165,9 @@ outl(pmr, SCx200_CB_BASE + SCx200_PMR); } - printk(KERN_INFO NAME ": DOCCS mapped at 0x%lx-0x%lx, width %d\n", - docmem.start, docmem.end, width); + printk(KERN_INFO NAME ": DOCCS mapped at 0x%llx-0x%llx, width %d\n", + (unsigned long long)docmem.start, + (unsigned long long)docmem.end, width); scx200_docflash_map.size = size; if (width == 8) diff -Nru a/drivers/net/8139cp.c b/drivers/net/8139cp.c --- a/drivers/net/8139cp.c 2005-02-08 14:47:46 -08:00 +++ b/drivers/net/8139cp.c 2005-02-08 14:47:46 -08:00 @@ -1634,7 +1634,7 @@ struct cp_private *cp; int rc; void __iomem *regs; - long pciaddr; + u64 pciaddr; unsigned int addr_len, i, pci_using_dac; u8 pci_rev; @@ -1694,8 +1694,8 @@ } if (pci_resource_len(pdev, 1) < CP_REGS_SIZE) { rc = -EIO; - printk(KERN_ERR PFX "MMIO resource (%lx) too small on pci dev %s\n", - pci_resource_len(pdev, 1), pci_name(pdev)); + printk(KERN_ERR PFX "MMIO resource (%llx) too small on pci dev %s\n", + (unsigned long long)pci_resource_len(pdev, 1), pci_name(pdev)); goto err_out_res; } @@ -1727,8 +1727,9 @@ regs = ioremap(pciaddr, CP_REGS_SIZE); if (!regs) { rc = -EIO; - printk(KERN_ERR PFX "Cannot map PCI MMIO (%lx@%lx) on pci dev %s\n", - pci_resource_len(pdev, 1), pciaddr, pci_name(pdev)); + printk(KERN_ERR PFX "Cannot map PCI MMIO (%llx@%llx) on pci dev %s\n", + (unsigned long long)pci_resource_len(pdev, 1), + (unsigned long long)pciaddr, pci_name(pdev)); goto err_out_res; } dev->base_addr = (unsigned long) regs; diff -Nru a/drivers/net/8139too.c b/drivers/net/8139too.c --- a/drivers/net/8139too.c 2005-02-08 14:47:46 -08:00 +++ b/drivers/net/8139too.c 2005-02-08 14:47:46 -08:00 @@ -1353,9 +1353,9 @@ netif_start_queue (dev); if (netif_msg_ifup(tp)) - printk(KERN_DEBUG "%s: rtl8139_open() ioaddr %#lx IRQ %d" + printk(KERN_DEBUG "%s: rtl8139_open() ioaddr %#llx IRQ %d" " GP Pins %2.2x %s-duplex.\n", - dev->name, pci_resource_start (tp->pci_dev, 1), + dev->name, (unsigned long long)pci_resource_start (tp->pci_dev, 1), dev->irq, RTL_R8 (MediaStatus), tp->mii.full_duplex ? "full" : "half"); diff -Nru a/drivers/net/e100.c b/drivers/net/e100.c --- a/drivers/net/e100.c 2005-02-08 14:47:46 -08:00 +++ b/drivers/net/e100.c 2005-02-08 14:47:46 -08:00 @@ -2271,9 +2271,9 @@ goto err_out_free; } - DPRINTK(PROBE, INFO, "addr 0x%lx, irq %d, " + DPRINTK(PROBE, INFO, "addr 0x%llx, irq %d, " "MAC addr %02X:%02X:%02X:%02X:%02X:%02X\n", - pci_resource_start(pdev, 0), pdev->irq, + (unsigned long long)pci_resource_start(pdev, 0), pdev->irq, netdev->dev_addr[0], netdev->dev_addr[1], netdev->dev_addr[2], netdev->dev_addr[3], netdev->dev_addr[4], netdev->dev_addr[5]); diff -Nru a/drivers/pci/bus.c b/drivers/pci/bus.c --- a/drivers/pci/bus.c 2005-02-08 14:47:46 -08:00 +++ b/drivers/pci/bus.c 2005-02-08 14:47:46 -08:00 @@ -34,10 +34,10 @@ */ int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, - unsigned long size, unsigned long align, unsigned long min, + u64 size, u64 align, u64 min, unsigned int type_mask, void (*alignf)(void *, struct resource *, - unsigned long, unsigned long), + u64, u64), void *alignf_data) { int i, ret = -ENOMEM; diff -Nru a/drivers/pci/hotplug/cpcihp_zt5550.c b/drivers/pci/hotplug/cpcihp_zt5550.c --- a/drivers/pci/hotplug/cpcihp_zt5550.c 2005-02-08 14:47:46 -08:00 +++ b/drivers/pci/hotplug/cpcihp_zt5550.c 2005-02-08 14:47:46 -08:00 @@ -85,8 +85,8 @@ } hc_dev = pdev; dbg("hc_dev = %p", hc_dev); - dbg("pci resource start %lx", pci_resource_start(hc_dev, 1)); - dbg("pci resource len %lx", pci_resource_len(hc_dev, 1)); + dbg("pci resource start %llx", (unsigned long long)pci_resource_start(hc_dev, 1)); + dbg("pci resource len %llx", (unsigned long long)pci_resource_len(hc_dev, 1)); if(!request_mem_region(pci_resource_start(hc_dev, 1), pci_resource_len(hc_dev, 1), MY_NAME)) { @@ -97,8 +97,9 @@ hc_registers = ioremap(pci_resource_start(hc_dev, 1), pci_resource_len(hc_dev, 1)); if(!hc_registers) { - err("cannot remap MMIO region %lx @ %lx", - pci_resource_len(hc_dev, 1), pci_resource_start(hc_dev, 1)); + err("cannot remap MMIO region %llx @ %llx", + (unsigned long long)pci_resource_len(hc_dev, 1), + (unsigned long long)pci_resource_start(hc_dev, 1)); release_mem_region(pci_resource_start(hc_dev, 1), pci_resource_len(hc_dev, 1)); return -ENODEV; diff -Nru a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c --- a/drivers/pci/hotplug/cpqphp_core.c 2005-02-08 14:47:46 -08:00 +++ b/drivers/pci/hotplug/cpqphp_core.c 2005-02-08 14:47:46 -08:00 @@ -1066,8 +1066,8 @@ } dbg("pdev = %p\n", pdev); - dbg("pci resource start %lx\n", pci_resource_start(pdev, 0)); - dbg("pci resource len %lx\n", pci_resource_len(pdev, 0)); + dbg("pci resource start %llx\n", (unsigned long long)pci_resource_start(pdev, 0)); + dbg("pci resource len %llx\n", (unsigned long long)pci_resource_len(pdev, 0)); if (!request_mem_region(pci_resource_start(pdev, 0), pci_resource_len(pdev, 0), MY_NAME)) { @@ -1079,9 +1079,9 @@ ctrl->hpc_reg = ioremap(pci_resource_start(pdev, 0), pci_resource_len(pdev, 0)); if (!ctrl->hpc_reg) { - err("cannot remap MMIO region %lx @ %lx\n", - pci_resource_len(pdev, 0), - pci_resource_start(pdev, 0)); + err("cannot remap MMIO region %llx @ %llx\n", + (unsigned long long)pci_resource_len(pdev, 0), + (unsigned long long)pci_resource_start(pdev, 0)); rc = -ENODEV; goto err_free_mem_region; } diff -Nru a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c --- a/drivers/pci/hotplug/pciehp_hpc.c 2005-02-08 14:47:46 -08:00 +++ b/drivers/pci/hotplug/pciehp_hpc.c 2005-02-08 14:47:46 -08:00 @@ -1343,8 +1343,9 @@ PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn), dev->irq); for ( rc = 0; rc < DEVICE_COUNT_RESOURCE; rc++) if (pci_resource_len(pdev, rc) > 0) - dbg("pci resource[%d] start=0x%lx(len=0x%lx)\n", rc, - pci_resource_start(pdev, rc), pci_resource_len(pdev, rc)); + dbg("pci resource[%d] start=0x%llx(len=0x%llx)\n", rc, + (unsigned long long)pci_resource_start(pdev, rc), + (unsigned long long)pci_resource_len(pdev, rc)); info("HPC vendor_id %x device_id %x ss_vid %x ss_did %x\n", pdev->vendor, pdev->device, pdev->subsystem_vendor, pdev->subsystem_device); diff -Nru a/drivers/pci/hotplug/shpchp_hpc.c b/drivers/pci/hotplug/shpchp_hpc.c --- a/drivers/pci/hotplug/shpchp_hpc.c 2005-02-08 14:47:46 -08:00 +++ b/drivers/pci/hotplug/shpchp_hpc.c 2005-02-08 14:47:46 -08:00 @@ -1482,8 +1482,9 @@ PCI_FUNC(pdev->devfn), pdev->irq); for ( rc = 0; rc < DEVICE_COUNT_RESOURCE; rc++) if (pci_resource_len(pdev, rc) > 0) - dbg("pci resource[%d] start=0x%lx(len=0x%lx), shpc_base_offset %x\n", rc, - pci_resource_start(pdev, rc), pci_resource_len(pdev, rc), shpc_base_offset); + dbg("pci resource[%d] start=0x%llx(len=0x%llx), shpc_base_offset %x\n", rc, + (unsigned long long)pci_resource_start(pdev, rc), + (unsigned long long)pci_resource_len(pdev, rc), shpc_base_offset); info("HPC vendor_id %x device_id %x ss_vid %x ss_did %x\n", pdev->vendor, pdev->device, pdev->subsystem_vendor, pdev->subsystem_device); @@ -1498,13 +1499,14 @@ php_ctlr->creg = ioremap(pci_resource_start(pdev, 0) + shpc_base_offset, pci_resource_len(pdev, 0)); if (!php_ctlr->creg) { - err("%s: cannot remap MMIO region %lx @ %lx\n", __FUNCTION__, pci_resource_len(pdev, 0), - pci_resource_start(pdev, 0) + shpc_base_offset); + err("%s: cannot remap MMIO region %llx @ %llx\n", __FUNCTION__, + (unsigned long long)pci_resource_len(pdev, 0), + (unsigned long long)pci_resource_start(pdev, 0) + shpc_base_offset); release_mem_region(pci_resource_start(pdev, 0) + shpc_base_offset, pci_resource_len(pdev, 0)); goto abort_free_ctlr; } dbg("%s: php_ctlr->creg %p\n", __FUNCTION__, php_ctlr->creg); - dbg("%s: physical addr %p\n", __FUNCTION__, (void*)pci_resource_start(pdev, 0)); + dbg("%s: physical addr %llx\n", __FUNCTION__, (unsigned long long)pci_resource_start(pdev, 0)); init_MUTEX(&ctrl->crit_sect); /* Setup wait queue */ diff -Nru a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c --- a/drivers/pci/pci-sysfs.c 2005-02-08 14:47:46 -08:00 +++ b/drivers/pci/pci-sysfs.c 2005-02-08 14:47:46 -08:00 @@ -65,9 +65,9 @@ max = DEVICE_COUNT_RESOURCE; for (i = 0; i < max; i++) { - str += sprintf(str,"0x%016lx 0x%016lx 0x%016lx\n", - pci_resource_start(pci_dev,i), - pci_resource_end(pci_dev,i), + str += sprintf(str,"0x%016llx 0x%016llx 0x%016lx\n", + (unsigned long long)pci_resource_start(pci_dev,i), + (unsigned long long)pci_resource_end(pci_dev,i), pci_resource_flags(pci_dev,i)); } return (str - buf); diff -Nru a/drivers/pci/pci.c b/drivers/pci/pci.c --- a/drivers/pci/pci.c 2005-02-08 14:47:46 -08:00 +++ b/drivers/pci/pci.c 2005-02-08 14:47:46 -08:00 @@ -564,10 +564,10 @@ return 0; err_out: - printk (KERN_WARNING "PCI: Unable to reserve %s region #%d:%lx@%lx for device %s\n", + printk (KERN_WARNING "PCI: Unable to reserve %s region #%d:%llx@%llx for device %s\n", pci_resource_flags(pdev, bar) & IORESOURCE_IO ? "I/O" : "mem", bar + 1, /* PCI BAR # */ - pci_resource_len(pdev, bar), pci_resource_start(pdev, bar), + (unsigned long long)pci_resource_len(pdev, bar), (unsigned long long)pci_resource_start(pdev, bar), pci_name(pdev)); return -EBUSY; } diff -Nru a/drivers/pci/pci.h b/drivers/pci/pci.h --- a/drivers/pci/pci.h 2005-02-08 14:47:46 -08:00 +++ b/drivers/pci/pci.h 2005-02-08 14:47:46 -08:00 @@ -6,10 +6,10 @@ extern void pci_remove_sysfs_dev_files(struct pci_dev *pdev); extern void pci_cleanup_rom(struct pci_dev *dev); extern int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, - unsigned long size, unsigned long align, - unsigned long min, unsigned int type_mask, + u64 size, u64 align, + u64 min, unsigned int type_mask, void (*alignf)(void *, struct resource *, - unsigned long, unsigned long), + u64, u64), void *alignf_data); /* PCI /proc functions */ #ifdef CONFIG_PROC_FS diff -Nru a/drivers/pci/proc.c b/drivers/pci/proc.c --- a/drivers/pci/proc.c 2005-02-08 14:47:46 -08:00 +++ b/drivers/pci/proc.c 2005-02-08 14:47:46 -08:00 @@ -301,12 +301,6 @@ #endif /* HAVE_PCI_MMAP */ }; -#if BITS_PER_LONG == 32 -#define LONG_FORMAT "\t%08lx" -#else -#define LONG_FORMAT "\t%16lx" -#endif - /* iterator */ static void *pci_seq_start(struct seq_file *m, loff_t *pos) { @@ -358,13 +352,13 @@ dev->irq); /* Here should be 7 and not PCI_NUM_RESOURCES as we need to preserve compatibility */ for(i=0; i<7; i++) - seq_printf(m, LONG_FORMAT, - dev->resource[i].start | - (dev->resource[i].flags & PCI_REGION_FLAG_MASK)); + seq_printf(m, "\t%16llx", + (unsigned long long)(dev->resource[i].start | + (dev->resource[i].flags & PCI_REGION_FLAG_MASK))); for(i=0; i<7; i++) - seq_printf(m, LONG_FORMAT, - dev->resource[i].start < dev->resource[i].end ? - dev->resource[i].end - dev->resource[i].start + 1 : 0); + seq_printf(m, "\t%16llx", + (unsigned long long)(dev->resource[i].start < dev->resource[i].end ? + dev->resource[i].end - dev->resource[i].start + 1 : 0)); seq_putc(m, '\t'); if (drv) seq_printf(m, "%s", drv->name); diff -Nru a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c --- a/drivers/pci/setup-bus.c 2005-02-08 14:47:46 -08:00 +++ b/drivers/pci/setup-bus.c 2005-02-08 14:47:46 -08:00 @@ -357,8 +357,9 @@ order = __ffs(align) - 20; if (order > 11) { printk(KERN_WARNING "PCI: region %s/%d " - "too large: %lx-%lx\n", - pci_name(dev), i, r->start, r->end); + "too large: %llx-%llx\n", + pci_name(dev), i, (unsigned long long)r->start, + (unsigned long long)r->end); r->flags = 0; continue; } diff -Nru a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c --- a/drivers/pci/setup-res.c 2005-02-08 14:47:46 -08:00 +++ b/drivers/pci/setup-res.c 2005-02-08 14:47:46 -08:00 @@ -42,8 +42,9 @@ pcibios_resource_to_bus(dev, ®ion, res); - DBGC((KERN_ERR " got res [%lx:%lx] bus [%lx:%lx] flags %lx for " - "BAR %d of %s\n", res->start, res->end, + DBGC((KERN_ERR " got res [%llx:%llx] bus [%lx:%lx] flags %lx for " + "BAR %d of %s\n", + (unsigned long long)res->start, (unsigned long long)res->end, region.start, region.end, res->flags, resno, pci_name(dev))); @@ -108,10 +109,11 @@ err = insert_resource(root, res); if (err) { - printk(KERN_ERR "PCI: %s region %d of %s %s [%lx:%lx]\n", + printk(KERN_ERR "PCI: %s region %d of %s %s [%llx:%llx]\n", root ? "Address space collision on" : "No parent found for", - resource, dtype, pci_name(dev), res->start, res->end); + resource, dtype, pci_name(dev), + (unsigned long long)res->start, (unsigned long long)res->end); } return err; @@ -121,7 +123,7 @@ { struct pci_bus *bus = dev->bus; struct resource *res = dev->resource + resno; - unsigned long size, min, align; + u64 size, min, align; int ret; size = res->end - res->start + 1; @@ -148,9 +150,10 @@ } if (ret) { - printk(KERN_ERR "PCI: Failed to allocate %s resource #%d:%lx@%lx for %s\n", + printk(KERN_ERR "PCI: Failed to allocate %s resource #%d:%llx@%llx for %s\n", res->flags & IORESOURCE_IO ? "I/O" : "mem", - resno, size, res->start, pci_name(dev)); + resno, (unsigned long long)size, + (unsigned long long)res->start, pci_name(dev)); } else if (resno < PCI_BRIDGE_RESOURCES) { pci_update_resource(dev, res, resno); } @@ -167,7 +170,7 @@ for (i = 0; i < PCI_NUM_RESOURCES; i++) { struct resource *r; struct resource_list *list, *tmp; - unsigned long r_align; + u64 r_align; r = &dev->resource[i]; r_align = r->end - r->start; @@ -176,13 +179,14 @@ continue; if (!r_align) { printk(KERN_WARNING "PCI: Ignore bogus resource %d " - "[%lx:%lx] of %s\n", - i, r->start, r->end, pci_name(dev)); + "[%llx:%llx] of %s\n", + i, (unsigned long long)r->start, + (unsigned long long)r->end, pci_name(dev)); continue; } r_align = (i < PCI_BRIDGE_RESOURCES) ? r_align + 1 : r->start; for (list = head; ; list = list->next) { - unsigned long align = 0; + u64 align = 0; struct resource_list *ln = list->next; int idx; diff -Nru a/drivers/pnp/manager.c b/drivers/pnp/manager.c --- a/drivers/pnp/manager.c 2005-02-08 14:47:46 -08:00 +++ b/drivers/pnp/manager.c 2005-02-08 14:47:46 -08:00 @@ -25,7 +25,8 @@ static int pnp_assign_port(struct pnp_dev *dev, struct pnp_port *rule, int idx) { - unsigned long *start, *end, *flags; + u64 *start, *end; + unsigned long *flags; if (!dev || !rule) return -EINVAL; @@ -68,7 +69,8 @@ static int pnp_assign_mem(struct pnp_dev *dev, struct pnp_mem *rule, int idx) { - unsigned long *start, *end, *flags; + u64 *start, *end; + unsigned long *flags; if (!dev || !rule) return -EINVAL; @@ -121,7 +123,8 @@ static int pnp_assign_irq(struct pnp_dev * dev, struct pnp_irq *rule, int idx) { - unsigned long *start, *end, *flags; + u64 *start, *end; + unsigned long *flags; int i; /* IRQ priority: this table is good for i386 */ @@ -173,7 +176,8 @@ static int pnp_assign_dma(struct pnp_dev *dev, struct pnp_dma *rule, int idx) { - unsigned long *start, *end, *flags; + u64 *start, *end; + unsigned long *flags; int i; /* DMA priority: this table is good for i386 */ @@ -548,7 +552,7 @@ * @size: size of region * */ -void pnp_resource_change(struct resource *resource, unsigned long start, unsigned long size) +void pnp_resource_change(struct resource *resource, u64 start, u64 size) { if (resource == NULL) return; diff -Nru a/drivers/pnp/resource.c b/drivers/pnp/resource.c --- a/drivers/pnp/resource.c 2005-02-08 14:47:46 -08:00 +++ b/drivers/pnp/resource.c 2005-02-08 14:47:46 -08:00 @@ -242,7 +242,7 @@ { int tmp; struct pnp_dev *tdev; - unsigned long *port, *end, *tport, *tend; + u64 *port, *end, *tport, *tend; port = &dev->res.port_resource[idx].start; end = &dev->res.port_resource[idx].end; @@ -298,7 +298,7 @@ { int tmp; struct pnp_dev *tdev; - unsigned long *addr, *end, *taddr, *tend; + u64 *addr, *end, *taddr, *tend; addr = &dev->res.mem_resource[idx].start; end = &dev->res.mem_resource[idx].end; @@ -359,7 +359,7 @@ { int tmp; struct pnp_dev *tdev; - unsigned long * irq = &dev->res.irq_resource[idx].start; + u64 * irq = &dev->res.irq_resource[idx].start; /* if the resource doesn't exist, don't complain about it */ if (cannot_compare(dev->res.irq_resource[idx].flags)) @@ -424,7 +424,7 @@ #ifndef CONFIG_IA64 int tmp; struct pnp_dev *tdev; - unsigned long * dma = &dev->res.dma_resource[idx].start; + u64 * dma = &dev->res.dma_resource[idx].start; /* if the resource doesn't exist, don't complain about it */ if (cannot_compare(dev->res.dma_resource[idx].flags)) diff -Nru a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c --- a/drivers/serial/8250_pci.c 2005-02-08 14:47:46 -08:00 +++ b/drivers/serial/8250_pci.c 2005-02-08 14:47:46 -08:00 @@ -589,8 +589,8 @@ else offset += idx * board->uart_offset; - maxnr = (pci_resource_len(dev, bar) - board->first_offset) / - (8 << board->reg_shift); + maxnr = (pci_resource_len(dev, bar) - board->first_offset) >> + (board->reg_shift + 3); if (board->flags & FL_REGION_SZ_CAP && idx >= maxnr) return 1; diff -Nru a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c --- a/drivers/video/console/vgacon.c 2005-02-08 14:47:46 -08:00 +++ b/drivers/video/console/vgacon.c 2005-02-08 14:47:46 -08:00 @@ -192,7 +192,7 @@ vga_video_port_val = VGA_CRT_DM; if ((ORIG_VIDEO_EGA_BX & 0xff) != 0x10) { static struct resource ega_console_resource = - { "ega", 0x3B0, 0x3BF }; + { .name = "ega", .start = 0x3B0, .end = 0x3BF }; vga_video_type = VIDEO_TYPE_EGAM; vga_vram_end = 0xb8000; display_desc = "EGA+"; @@ -200,9 +200,9 @@ &ega_console_resource); } else { static struct resource mda1_console_resource = - { "mda", 0x3B0, 0x3BB }; + { .name = "mda", .start = 0x3B0, .end = 0x3BB }; static struct resource mda2_console_resource = - { "mda", 0x3BF, 0x3BF }; + { .name = "mda", .start = 0x3BF, .end = 0x3BF }; vga_video_type = VIDEO_TYPE_MDA; vga_vram_end = 0xb2000; display_desc = "*MDA"; @@ -225,14 +225,14 @@ if (!ORIG_VIDEO_ISVGA) { static struct resource ega_console_resource - = { "ega", 0x3C0, 0x3DF }; + = { .name = "ega", .start = 0x3C0, .end = 0x3DF }; vga_video_type = VIDEO_TYPE_EGAC; display_desc = "EGA"; request_resource(&ioport_resource, &ega_console_resource); } else { static struct resource vga_console_resource - = { "vga+", 0x3C0, 0x3DF }; + = { .name = "vga+", .start = 0x3C0, .end = 0x3DF }; vga_video_type = VIDEO_TYPE_VGAC; display_desc = "VGA+"; request_resource(&ioport_resource, @@ -276,7 +276,7 @@ } } else { static struct resource cga_console_resource = - { "cga", 0x3D4, 0x3D5 }; + { .name = "cga", .start = 0x3D4, .end = 0x3D5 }; vga_video_type = VIDEO_TYPE_CGA; vga_vram_end = 0xba000; display_desc = "*CGA"; diff -Nru a/include/asm-arm/mach/pci.h b/include/asm-arm/mach/pci.h --- a/include/asm-arm/mach/pci.h 2005-02-08 14:47:46 -08:00 +++ b/include/asm-arm/mach/pci.h 2005-02-08 14:47:46 -08:00 @@ -28,7 +28,7 @@ struct pci_sys_data { struct list_head node; int busnr; /* primary bus number */ - unsigned long mem_offset; /* bus->cpu memory mapping offset */ + u64 mem_offset; /* bus->cpu memory mapping offset */ unsigned long io_offset; /* bus->cpu IO mapping offset */ struct pci_bus *bus; /* PCI bus */ struct resource *resource[3]; /* Primary PCI bus resources */ diff -Nru a/include/linux/ioport.h b/include/linux/ioport.h --- a/include/linux/ioport.h 2005-02-08 14:47:46 -08:00 +++ b/include/linux/ioport.h 2005-02-08 14:47:46 -08:00 @@ -9,13 +9,14 @@ #define _LINUX_IOPORT_H #include +#include /* * Resources are tree-like, allowing * nesting etc.. */ struct resource { + u64 start, end; const char *name; - unsigned long start, end; unsigned long flags; struct resource *parent, *sibling, *child; }; @@ -98,31 +99,31 @@ extern int release_resource(struct resource *new); extern int insert_resource(struct resource *parent, struct resource *new); extern int allocate_resource(struct resource *root, struct resource *new, - unsigned long size, - unsigned long min, unsigned long max, - unsigned long align, + u64 size, + u64 min, u64 max, + u64 align, void (*alignf)(void *, struct resource *, - unsigned long, unsigned long), + u64, u64), void *alignf_data); -int adjust_resource(struct resource *res, unsigned long start, - unsigned long size); +int adjust_resource(struct resource *res, u64 start, + u64 size); /* Convenience shorthand with allocation */ #define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name)) #define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name)) #define rename_region(region, newname) do { (region)->name = (newname); } while (0) -extern struct resource * __request_region(struct resource *, unsigned long start, unsigned long n, const char *name); +extern struct resource * __request_region(struct resource *, u64 start, u64 n, const char *name); /* Compatibility cruft */ #define release_region(start,n) __release_region(&ioport_resource, (start), (n)) #define check_mem_region(start,n) __check_region(&iomem_resource, (start), (n)) #define release_mem_region(start,n) __release_region(&iomem_resource, (start), (n)) -extern int __check_region(struct resource *, unsigned long, unsigned long); -extern void __release_region(struct resource *, unsigned long, unsigned long); +extern int __check_region(struct resource *, u64, u64); +extern void __release_region(struct resource *, u64, u64); -static inline int __deprecated check_region(unsigned long s, unsigned long n) +static inline int __deprecated check_region(u64 s, u64 n) { return __check_region(&ioport_resource, s, n); } diff -Nru a/include/linux/pci.h b/include/linux/pci.h --- a/include/linux/pci.h 2005-02-08 14:47:46 -08:00 +++ b/include/linux/pci.h 2005-02-08 14:47:46 -08:00 @@ -726,7 +726,7 @@ /* Used only when drivers/pci/setup.c is used */ void pcibios_align_resource(void *, struct resource *, - unsigned long, unsigned long); + u64, u64); void pcibios_update_irq(struct pci_dev *, int irq); /* Generic PCI functions used internally */ @@ -843,10 +843,10 @@ /* drivers/pci/bus.c */ int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, - unsigned long size, unsigned long align, - unsigned long min, unsigned int type_mask, + u64 size, u64 align, + u64 min, unsigned int type_mask, void (*alignf)(void *, struct resource *, - unsigned long, unsigned long), + u64, u64), void *alignf_data); void pci_enable_bridges(struct pci_bus *bus); diff -Nru a/include/linux/pnp.h b/include/linux/pnp.h --- a/include/linux/pnp.h 2005-02-08 14:47:46 -08:00 +++ b/include/linux/pnp.h 2005-02-08 14:47:46 -08:00 @@ -384,7 +384,7 @@ int pnp_validate_config(struct pnp_dev *dev); int pnp_activate_dev(struct pnp_dev *dev); int pnp_disable_dev(struct pnp_dev *dev); -void pnp_resource_change(struct resource *resource, unsigned long start, unsigned long size); +void pnp_resource_change(struct resource *resource, u64 start, u64 size); /* protocol helpers */ int pnp_is_active(struct pnp_dev * dev); @@ -429,7 +429,7 @@ static inline int pnp_validate_config(struct pnp_dev *dev) { return -ENODEV; } static inline int pnp_activate_dev(struct pnp_dev *dev) { return -ENODEV; } static inline int pnp_disable_dev(struct pnp_dev *dev) { return -ENODEV; } -static inline void pnp_resource_change(struct resource *resource, unsigned long start, unsigned long size) { } +static inline void pnp_resource_change(struct resource *resource, u64 start, u64 size) { } /* protocol helpers */ static inline int pnp_is_active(struct pnp_dev * dev) { return 0; } diff -Nru a/kernel/resource.c b/kernel/resource.c --- a/kernel/resource.c 2005-02-08 14:47:46 -08:00 +++ b/kernel/resource.c 2005-02-08 14:47:46 -08:00 @@ -23,7 +23,7 @@ struct resource ioport_resource = { .name = "PCI IO", - .start = 0x0000, + .start = 0x0000ULL, .end = IO_SPACE_LIMIT, .flags = IORESOURCE_IO, }; @@ -32,8 +32,8 @@ struct resource iomem_resource = { .name = "PCI mem", - .start = 0UL, - .end = ~0UL, + .start = 0ULL, + .end = ~0ULL, .flags = IORESOURCE_MEM, }; @@ -83,7 +83,7 @@ for (depth = 0, p = r; depth < MAX_IORES_LEVEL; depth++, p = p->parent) if (p->parent == root) break; - seq_printf(m, "%*s%0*lx-%0*lx : %s\n", + seq_printf(m, "%*s%0*llx-%0*llx : %s\n", depth * 2, "", width, r->start, width, r->end, @@ -151,8 +151,8 @@ /* Return the conflict entry if you can't request it */ static struct resource * __request_resource(struct resource *root, struct resource *new) { - unsigned long start = new->start; - unsigned long end = new->end; + u64 start = new->start; + u64 end = new->end; struct resource *tmp, **p; if (end < start) @@ -236,11 +236,11 @@ * Find empty slot in the resource tree given range and alignment. */ static int find_resource(struct resource *root, struct resource *new, - unsigned long size, - unsigned long min, unsigned long max, - unsigned long align, + u64 size, + u64 min, u64 max, + u64 align, void (*alignf)(void *, struct resource *, - unsigned long, unsigned long), + u64, u64), void *alignf_data) { struct resource *this = root->child; @@ -282,11 +282,11 @@ * Allocate empty slot in the resource tree given range and alignment. */ int allocate_resource(struct resource *root, struct resource *new, - unsigned long size, - unsigned long min, unsigned long max, - unsigned long align, + u64 size, + u64 min, u64 max, + u64 align, void (*alignf)(void *, struct resource *, - unsigned long, unsigned long), + u64, u64), void *alignf_data) { int err; @@ -378,10 +378,10 @@ * arguments. Returns -EBUSY if it can't fit. Existing children of * the resource are assumed to be immutable. */ -int adjust_resource(struct resource *res, unsigned long start, unsigned long size) +int adjust_resource(struct resource *res, u64 start, u64 size) { struct resource *tmp, *parent = res->parent; - unsigned long end = start + size - 1; + u64 end = start + size - 1; int result = -EBUSY; write_lock(&resource_lock); @@ -428,7 +428,7 @@ * * Release-region releases a matching busy region. */ -struct resource * __request_region(struct resource *parent, unsigned long start, unsigned long n, const char *name) +struct resource * __request_region(struct resource *parent, u64 start, u64 n, const char *name) { struct resource *res = kmalloc(sizeof(*res), GFP_KERNEL); @@ -465,7 +465,7 @@ EXPORT_SYMBOL(__request_region); -int __deprecated __check_region(struct resource *parent, unsigned long start, unsigned long n) +int __deprecated __check_region(struct resource *parent, u64 start, u64 n) { struct resource * res; @@ -480,10 +480,10 @@ EXPORT_SYMBOL(__check_region); -void __release_region(struct resource *parent, unsigned long start, unsigned long n) +void __release_region(struct resource *parent, u64 start, u64 n) { struct resource **p; - unsigned long end; + u64 end; p = &parent->child; end = start + n - 1; @@ -512,7 +512,7 @@ write_unlock(&resource_lock); - printk(KERN_WARNING "Trying to free nonexistent resource <%08lx-%08lx>\n", start, end); + printk(KERN_WARNING "Trying to free nonexistent resource <%16llx-%16llx>\n", start, end); } EXPORT_SYMBOL(__release_region);