aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/kernel/pci.c4
-rw-r--r--arch/arm/kernel/bios32.c6
-rw-r--r--arch/arm/kernel/setup.c42
-rw-r--r--arch/cris/arch-v32/drivers/pci/bios.c4
-rw-r--r--arch/frv/mb93090-mb00/pci-frv.c4
-rw-r--r--arch/i386/Kconfig1
-rw-r--r--arch/i386/kernel/efi.c6
-rw-r--r--arch/i386/kernel/setup.c2
-rw-r--r--arch/i386/pci/i386.c4
-rw-r--r--arch/ia64/pci/pci.c2
-rw-r--r--arch/m68knommu/kernel/comempci.c3
-rw-r--r--arch/mips/pci/pci.c4
-rw-r--r--arch/mips/pmc-sierra/yosemite/ht.c4
-rw-r--r--arch/parisc/kernel/pci.c2
-rw-r--r--arch/powerpc/kernel/pci_32.c47
-rw-r--r--arch/powerpc/kernel/pci_64.c4
-rw-r--r--arch/powerpc/platforms/83xx/pci.c5
-rw-r--r--arch/powerpc/platforms/85xx/pci.c5
-rw-r--r--arch/powerpc/platforms/chrp/pci.c4
-rw-r--r--arch/powerpc/platforms/maple/pci.c5
-rw-r--r--arch/powerpc/platforms/powermac/pci.c5
-rw-r--r--arch/ppc/kernel/pci.c52
-rw-r--r--arch/sh/boards/mpc1211/pci.c4
-rw-r--r--arch/sh/boards/overdrive/galileo.c2
-rw-r--r--arch/sh/drivers/pci/pci.c6
-rw-r--r--arch/sh64/kernel/pcibios.c4
-rw-r--r--arch/sparc/kernel/ioport.c8
-rw-r--r--arch/sparc/kernel/pcic.c2
-rw-r--r--arch/sparc64/kernel/pci.c2
-rw-r--r--arch/v850/kernel/rte_mb_a_pci.c2
-rw-r--r--arch/xtensa/kernel/pci.c6
31 files changed, 151 insertions, 100 deletions
diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c
index 2a8b364c822e..4ea6711e55aa 100644
--- a/arch/alpha/kernel/pci.c
+++ b/arch/alpha/kernel/pci.c
@@ -124,12 +124,12 @@ DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, pcibios_fixup_final);
124 124
125void 125void
126pcibios_align_resource(void *data, struct resource *res, 126pcibios_align_resource(void *data, struct resource *res,
127 unsigned long size, unsigned long align) 127 resource_size_t size, resource_size_t align)
128{ 128{
129 struct pci_dev *dev = data; 129 struct pci_dev *dev = data;
130 struct pci_controller *hose = dev->sysdata; 130 struct pci_controller *hose = dev->sysdata;
131 unsigned long alignto; 131 unsigned long alignto;
132 unsigned long start = res->start; 132 resource_size_t start = res->start;
133 133
134 if (res->flags & IORESOURCE_IO) { 134 if (res->flags & IORESOURCE_IO) {
135 /* Make sure we start at our min on all hoses */ 135 /* Make sure we start at our min on all hoses */
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
index 302fc1401547..45da06fc1ba1 100644
--- a/arch/arm/kernel/bios32.c
+++ b/arch/arm/kernel/bios32.c
@@ -304,7 +304,7 @@ static inline int pdev_bad_for_parity(struct pci_dev *dev)
304static void __devinit 304static void __devinit
305pdev_fixup_device_resources(struct pci_sys_data *root, struct pci_dev *dev) 305pdev_fixup_device_resources(struct pci_sys_data *root, struct pci_dev *dev)
306{ 306{
307 unsigned long offset; 307 resource_size_t offset;
308 int i; 308 int i;
309 309
310 for (i = 0; i < PCI_NUM_RESOURCES; i++) { 310 for (i = 0; i < PCI_NUM_RESOURCES; i++) {
@@ -634,9 +634,9 @@ char * __init pcibios_setup(char *str)
634 * which might be mirrored at 0x0100-0x03ff.. 634 * which might be mirrored at 0x0100-0x03ff..
635 */ 635 */
636void pcibios_align_resource(void *data, struct resource *res, 636void pcibios_align_resource(void *data, struct resource *res,
637 unsigned long size, unsigned long align) 637 resource_size_t size, resource_size_t align)
638{ 638{
639 unsigned long start = res->start; 639 resource_size_t start = res->start;
640 640
641 if (res->flags & IORESOURCE_IO && start & 0x300) 641 if (res->flags & IORESOURCE_IO && start & 0x300)
642 start = (start + 0x3ff) & ~0x3ff; 642 start = (start + 0x3ff) & ~0x3ff;
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 093ccba0503c..6bdf70def01f 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -119,9 +119,24 @@ DEFINE_PER_CPU(struct cpuinfo_arm, cpu_data);
119 * Standard memory resources 119 * Standard memory resources
120 */ 120 */
121static struct resource mem_res[] = { 121static struct resource mem_res[] = {
122 { "Video RAM", 0, 0, IORESOURCE_MEM }, 122 {
123 { "Kernel text", 0, 0, IORESOURCE_MEM }, 123 .name = "Video RAM",
124 { "Kernel data", 0, 0, IORESOURCE_MEM } 124 .start = 0,
125 .end = 0,
126 .flags = IORESOURCE_MEM
127 },
128 {
129 .name = "Kernel text",
130 .start = 0,
131 .end = 0,
132 .flags = IORESOURCE_MEM
133 },
134 {
135 .name = "Kernel data",
136 .start = 0,
137 .end = 0,
138 .flags = IORESOURCE_MEM
139 }
125}; 140};
126 141
127#define video_ram mem_res[0] 142#define video_ram mem_res[0]
@@ -129,9 +144,24 @@ static struct resource mem_res[] = {
129#define kernel_data mem_res[2] 144#define kernel_data mem_res[2]
130 145
131static struct resource io_res[] = { 146static struct resource io_res[] = {
132 { "reserved", 0x3bc, 0x3be, IORESOURCE_IO | IORESOURCE_BUSY }, 147 {
133 { "reserved", 0x378, 0x37f, IORESOURCE_IO | IORESOURCE_BUSY }, 148 .name = "reserved",
134 { "reserved", 0x278, 0x27f, IORESOURCE_IO | IORESOURCE_BUSY } 149 .start = 0x3bc,
150 .end = 0x3be,
151 .flags = IORESOURCE_IO | IORESOURCE_BUSY
152 },
153 {
154 .name = "reserved",
155 .start = 0x378,
156 .end = 0x37f,
157 .flags = IORESOURCE_IO | IORESOURCE_BUSY
158 },
159 {
160 .name = "reserved",
161 .start = 0x278,
162 .end = 0x27f,
163 .flags = IORESOURCE_IO | IORESOURCE_BUSY
164 }
135}; 165};
136 166
137#define lp0 io_res[0] 167#define lp0 io_res[0]
diff --git a/arch/cris/arch-v32/drivers/pci/bios.c b/arch/cris/arch-v32/drivers/pci/bios.c
index 1e9d062103ae..a2b9c60c2777 100644
--- a/arch/cris/arch-v32/drivers/pci/bios.c
+++ b/arch/cris/arch-v32/drivers/pci/bios.c
@@ -43,10 +43,10 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
43 43
44void 44void
45pcibios_align_resource(void *data, struct resource *res, 45pcibios_align_resource(void *data, struct resource *res,
46 unsigned long size, unsigned long align) 46 resource_size_t size, resource_size_t align)
47{ 47{
48 if (res->flags & IORESOURCE_IO) { 48 if (res->flags & IORESOURCE_IO) {
49 unsigned long start = res->start; 49 resource_size_t start = res->start;
50 50
51 if (start & 0x300) { 51 if (start & 0x300) {
52 start = (start + 0x3ff) & ~0x3ff; 52 start = (start + 0x3ff) & ~0x3ff;
diff --git a/arch/frv/mb93090-mb00/pci-frv.c b/arch/frv/mb93090-mb00/pci-frv.c
index 0a26bf6f1cd4..4f165c93be42 100644
--- a/arch/frv/mb93090-mb00/pci-frv.c
+++ b/arch/frv/mb93090-mb00/pci-frv.c
@@ -64,10 +64,10 @@ pcibios_update_resource(struct pci_dev *dev, struct resource *root,
64 */ 64 */
65void 65void
66pcibios_align_resource(void *data, struct resource *res, 66pcibios_align_resource(void *data, struct resource *res,
67 unsigned long size, unsigned long align) 67 resource_size_t size, resource_size_t align)
68{ 68{
69 if (res->flags & IORESOURCE_IO) { 69 if (res->flags & IORESOURCE_IO) {
70 unsigned long start = res->start; 70 resource_size_t start = res->start;
71 71
72 if (start & 0x300) { 72 if (start & 0x300) {
73 start = (start + 0x3ff) & ~0x3ff; 73 start = (start + 0x3ff) & ~0x3ff;
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig
index 5fa3c671c937..0463f6335905 100644
--- a/arch/i386/Kconfig
+++ b/arch/i386/Kconfig
@@ -529,6 +529,7 @@ config X86_PAE
529 bool 529 bool
530 depends on HIGHMEM64G 530 depends on HIGHMEM64G
531 default y 531 default y
532 select RESOURCES_64BIT
532 533
533# Common NUMA Features 534# Common NUMA Features
534config NUMA 535config NUMA
diff --git a/arch/i386/kernel/efi.c b/arch/i386/kernel/efi.c
index 9202b67c4b2e..8beb0f07d999 100644
--- a/arch/i386/kernel/efi.c
+++ b/arch/i386/kernel/efi.c
@@ -601,8 +601,10 @@ efi_initialize_iomem_resources(struct resource *code_resource,
601 res->end = res->start + ((md->num_pages << EFI_PAGE_SHIFT) - 1); 601 res->end = res->start + ((md->num_pages << EFI_PAGE_SHIFT) - 1);
602 res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; 602 res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
603 if (request_resource(&iomem_resource, res) < 0) 603 if (request_resource(&iomem_resource, res) < 0)
604 printk(KERN_ERR PFX "Failed to allocate res %s : 0x%lx-0x%lx\n", 604 printk(KERN_ERR PFX "Failed to allocate res %s : "
605 res->name, res->start, res->end); 605 "0x%llx-0x%llx\n", res->name,
606 (unsigned long long)res->start,
607 (unsigned long long)res->end);
606 /* 608 /*
607 * We don't know which region contains kernel data so we try 609 * We don't know which region contains kernel data so we try
608 * it repeatedly and let the resource manager test it. 610 * it repeatedly and let the resource manager test it.
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
index 4a65040cc624..6712f0d2eb37 100644
--- a/arch/i386/kernel/setup.c
+++ b/arch/i386/kernel/setup.c
@@ -1314,8 +1314,10 @@ legacy_init_iomem_resources(struct resource *code_resource, struct resource *dat
1314 probe_roms(); 1314 probe_roms();
1315 for (i = 0; i < e820.nr_map; i++) { 1315 for (i = 0; i < e820.nr_map; i++) {
1316 struct resource *res; 1316 struct resource *res;
1317#ifndef CONFIG_RESOURCES_64BIT
1317 if (e820.map[i].addr + e820.map[i].size > 0x100000000ULL) 1318 if (e820.map[i].addr + e820.map[i].size > 0x100000000ULL)
1318 continue; 1319 continue;
1320#endif
1319 res = kzalloc(sizeof(struct resource), GFP_ATOMIC); 1321 res = kzalloc(sizeof(struct resource), GFP_ATOMIC);
1320 switch (e820.map[i].type) { 1322 switch (e820.map[i].type) {
1321 case E820_RAM: res->name = "System RAM"; break; 1323 case E820_RAM: res->name = "System RAM"; break;
diff --git a/arch/i386/pci/i386.c b/arch/i386/pci/i386.c
index a151f7a99f5e..10154a2cac68 100644
--- a/arch/i386/pci/i386.c
+++ b/arch/i386/pci/i386.c
@@ -48,10 +48,10 @@
48 */ 48 */
49void 49void
50pcibios_align_resource(void *data, struct resource *res, 50pcibios_align_resource(void *data, struct resource *res,
51 unsigned long size, unsigned long align) 51 resource_size_t size, resource_size_t align)
52{ 52{
53 if (res->flags & IORESOURCE_IO) { 53 if (res->flags & IORESOURCE_IO) {
54 unsigned long start = res->start; 54 resource_size_t start = res->start;
55 55
56 if (start & 0x300) { 56 if (start & 0x300) {
57 start = (start + 0x3ff) & ~0x3ff; 57 start = (start + 0x3ff) & ~0x3ff;
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
index 77375a55da31..5bef0e3603f2 100644
--- a/arch/ia64/pci/pci.c
+++ b/arch/ia64/pci/pci.c
@@ -568,7 +568,7 @@ pcibios_disable_device (struct pci_dev *dev)
568 568
569void 569void
570pcibios_align_resource (void *data, struct resource *res, 570pcibios_align_resource (void *data, struct resource *res,
571 unsigned long size, unsigned long align) 571 resource_size_t size, resource_size_t align)
572{ 572{
573} 573}
574 574
diff --git a/arch/m68knommu/kernel/comempci.c b/arch/m68knommu/kernel/comempci.c
index 8670938f1107..db7a0c1cebae 100644
--- a/arch/m68knommu/kernel/comempci.c
+++ b/arch/m68knommu/kernel/comempci.c
@@ -357,7 +357,8 @@ void pcibios_fixup_bus(struct pci_bus *b)
357 357
358/*****************************************************************************/ 358/*****************************************************************************/
359 359
360void pcibios_align_resource(void *data, struct resource *res, unsigned long size, unsigned long align) 360void pcibios_align_resource(void *data, struct resource *res,
361 resource_size_t size, resource_size_t align)
361{ 362{
362} 363}
363 364
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c
index 4dfce154d4af..ba66f8c9bd4e 100644
--- a/arch/mips/pci/pci.c
+++ b/arch/mips/pci/pci.c
@@ -51,11 +51,11 @@ unsigned long PCIBIOS_MIN_MEM = 0;
51 */ 51 */
52void 52void
53pcibios_align_resource(void *data, struct resource *res, 53pcibios_align_resource(void *data, struct resource *res,
54 unsigned long size, unsigned long align) 54 resource_size_t size, resource_size_t align)
55{ 55{
56 struct pci_dev *dev = data; 56 struct pci_dev *dev = data;
57 struct pci_controller *hose = dev->sysdata; 57 struct pci_controller *hose = dev->sysdata;
58 unsigned long start = res->start; 58 resource_size_t start = res->start;
59 59
60 if (res->flags & IORESOURCE_IO) { 60 if (res->flags & IORESOURCE_IO) {
61 /* Make sure we start at our min on all hoses */ 61 /* Make sure we start at our min on all hoses */
diff --git a/arch/mips/pmc-sierra/yosemite/ht.c b/arch/mips/pmc-sierra/yosemite/ht.c
index 54b65a80abf5..fb523ebcafa8 100644
--- a/arch/mips/pmc-sierra/yosemite/ht.c
+++ b/arch/mips/pmc-sierra/yosemite/ht.c
@@ -383,12 +383,12 @@ void pcibios_update_resource(struct pci_dev *dev, struct resource *root,
383 383
384 384
385void pcibios_align_resource(void *data, struct resource *res, 385void pcibios_align_resource(void *data, struct resource *res,
386 unsigned long size, unsigned long align) 386 resource_size_t size, resource_size_t align)
387{ 387{
388 struct pci_dev *dev = data; 388 struct pci_dev *dev = data;
389 389
390 if (res->flags & IORESOURCE_IO) { 390 if (res->flags & IORESOURCE_IO) {
391 unsigned long start = res->start; 391 resource_size_t start = res->start;
392 392
393 /* We need to avoid collisions with `mirrored' VGA ports 393 /* We need to avoid collisions with `mirrored' VGA ports
394 and other strange ISA hardware, so we always want the 394 and other strange ISA hardware, so we always want the
diff --git a/arch/parisc/kernel/pci.c b/arch/parisc/kernel/pci.c
index 79c7db2705fd..7d6967ee367c 100644
--- a/arch/parisc/kernel/pci.c
+++ b/arch/parisc/kernel/pci.c
@@ -289,7 +289,7 @@ EXPORT_SYMBOL(pcibios_bus_to_resource);
289 * than res->start. 289 * than res->start.
290 */ 290 */
291void pcibios_align_resource(void *data, struct resource *res, 291void pcibios_align_resource(void *data, struct resource *res,
292 unsigned long size, unsigned long alignment) 292 resource_size_t size, resource_size_t alignment)
293{ 293{
294 unsigned long mask, align; 294 unsigned long mask, align;
295 295
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index b5431ccf1147..8474355a1a4f 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -99,7 +99,7 @@ pcibios_fixup_resources(struct pci_dev *dev)
99 if (!res->flags) 99 if (!res->flags)
100 continue; 100 continue;
101 if (res->end == 0xffffffff) { 101 if (res->end == 0xffffffff) {
102 DBG("PCI:%s Resource %d [%08lx-%08lx] is unassigned\n", 102 DBG("PCI:%s Resource %d [%016llx-%016llx] is unassigned\n",
103 pci_name(dev), i, res->start, res->end); 103 pci_name(dev), i, res->start, res->end);
104 res->end -= res->start; 104 res->end -= res->start;
105 res->start = 0; 105 res->start = 0;
@@ -117,7 +117,7 @@ pcibios_fixup_resources(struct pci_dev *dev)
117 res->start += offset; 117 res->start += offset;
118 res->end += offset; 118 res->end += offset;
119#ifdef DEBUG 119#ifdef DEBUG
120 printk("Fixup res %d (%lx) of dev %s: %lx -> %lx\n", 120 printk("Fixup res %d (%lx) of dev %s: %llx -> %llx\n",
121 i, res->flags, pci_name(dev), 121 i, res->flags, pci_name(dev),
122 res->start - offset, res->start); 122 res->start - offset, res->start);
123#endif 123#endif
@@ -173,18 +173,18 @@ EXPORT_SYMBOL(pcibios_bus_to_resource);
173 * but we want to try to avoid allocating at 0x2900-0x2bff 173 * but we want to try to avoid allocating at 0x2900-0x2bff
174 * which might have be mirrored at 0x0100-0x03ff.. 174 * which might have be mirrored at 0x0100-0x03ff..
175 */ 175 */
176void pcibios_align_resource(void *data, struct resource *res, unsigned long size, 176void pcibios_align_resource(void *data, struct resource *res,
177 unsigned long align) 177 resource_size_t size, resource_size_t align)
178{ 178{
179 struct pci_dev *dev = data; 179 struct pci_dev *dev = data;
180 180
181 if (res->flags & IORESOURCE_IO) { 181 if (res->flags & IORESOURCE_IO) {
182 unsigned long start = res->start; 182 resource_size_t start = res->start;
183 183
184 if (size > 0x100) { 184 if (size > 0x100) {
185 printk(KERN_ERR "PCI: I/O Region %s/%d too large" 185 printk(KERN_ERR "PCI: I/O Region %s/%d too large"
186 " (%ld bytes)\n", pci_name(dev), 186 " (%lld bytes)\n", pci_name(dev),
187 dev->resource - res, size); 187 dev->resource - res, (unsigned long long)size);
188 } 188 }
189 189
190 if (start & 0x300) { 190 if (start & 0x300) {
@@ -255,8 +255,8 @@ pcibios_allocate_bus_resources(struct list_head *bus_list)
255 } 255 }
256 } 256 }
257 257
258 DBG("PCI: bridge rsrc %lx..%lx (%lx), parent %p\n", 258 DBG("PCI: bridge rsrc %llx..%llx (%lx), parent %p\n",
259 res->start, res->end, res->flags, pr); 259 res->start, res->end, res->flags, pr);
260 if (pr) { 260 if (pr) {
261 if (request_resource(pr, res) == 0) 261 if (request_resource(pr, res) == 0)
262 continue; 262 continue;
@@ -306,7 +306,7 @@ reparent_resources(struct resource *parent, struct resource *res)
306 *pp = NULL; 306 *pp = NULL;
307 for (p = res->child; p != NULL; p = p->sibling) { 307 for (p = res->child; p != NULL; p = p->sibling) {
308 p->parent = res; 308 p->parent = res;
309 DBG(KERN_INFO "PCI: reparented %s [%lx..%lx] under %s\n", 309 DBG(KERN_INFO "PCI: reparented %s [%llx..%llx] under %s\n",
310 p->name, p->start, p->end, res->name); 310 p->name, p->start, p->end, res->name);
311 } 311 }
312 return 0; 312 return 0;
@@ -362,13 +362,14 @@ pci_relocate_bridge_resource(struct pci_bus *bus, int i)
362 try = conflict->start - 1; 362 try = conflict->start - 1;
363 } 363 }
364 if (request_resource(pr, res)) { 364 if (request_resource(pr, res)) {
365 DBG(KERN_ERR "PCI: huh? couldn't move to %lx..%lx\n", 365 DBG(KERN_ERR "PCI: huh? couldn't move to %llx..%llx\n",
366 res->start, res->end); 366 res->start, res->end);
367 return -1; /* "can't happen" */ 367 return -1; /* "can't happen" */
368 } 368 }
369 update_bridge_base(bus, i); 369 update_bridge_base(bus, i);
370 printk(KERN_INFO "PCI: bridge %d resource %d moved to %lx..%lx\n", 370 printk(KERN_INFO "PCI: bridge %d resource %d moved to %llx..%llx\n",
371 bus->number, i, res->start, res->end); 371 bus->number, i, (unsigned long long)res->start,
372 (unsigned long long)res->end);
372 return 0; 373 return 0;
373} 374}
374 375
@@ -479,14 +480,14 @@ static inline void alloc_resource(struct pci_dev *dev, int idx)
479{ 480{
480 struct resource *pr, *r = &dev->resource[idx]; 481 struct resource *pr, *r = &dev->resource[idx];
481 482
482 DBG("PCI:%s: Resource %d: %08lx-%08lx (f=%lx)\n", 483 DBG("PCI:%s: Resource %d: %016llx-%016llx (f=%lx)\n",
483 pci_name(dev), idx, r->start, r->end, r->flags); 484 pci_name(dev), idx, r->start, r->end, r->flags);
484 pr = pci_find_parent_resource(dev, r); 485 pr = pci_find_parent_resource(dev, r);
485 if (!pr || request_resource(pr, r) < 0) { 486 if (!pr || request_resource(pr, r) < 0) {
486 printk(KERN_ERR "PCI: Cannot allocate resource region %d" 487 printk(KERN_ERR "PCI: Cannot allocate resource region %d"
487 " of device %s\n", idx, pci_name(dev)); 488 " of device %s\n", idx, pci_name(dev));
488 if (pr) 489 if (pr)
489 DBG("PCI: parent is %p: %08lx-%08lx (f=%lx)\n", 490 DBG("PCI: parent is %p: %016llx-%016llx (f=%lx)\n",
490 pr, pr->start, pr->end, pr->flags); 491 pr, pr->start, pr->end, pr->flags);
491 /* We'll assign a new address later */ 492 /* We'll assign a new address later */
492 r->flags |= IORESOURCE_UNSET; 493 r->flags |= IORESOURCE_UNSET;
@@ -956,7 +957,7 @@ pci_process_bridge_OF_ranges(struct pci_controller *hose,
956 res = &hose->io_resource; 957 res = &hose->io_resource;
957 res->flags = IORESOURCE_IO; 958 res->flags = IORESOURCE_IO;
958 res->start = ranges[2]; 959 res->start = ranges[2];
959 DBG("PCI: IO 0x%lx -> 0x%lx\n", 960 DBG("PCI: IO 0x%llx -> 0x%llx\n",
960 res->start, res->start + size - 1); 961 res->start, res->start + size - 1);
961 break; 962 break;
962 case 2: /* memory space */ 963 case 2: /* memory space */
@@ -978,7 +979,7 @@ pci_process_bridge_OF_ranges(struct pci_controller *hose,
978 if(ranges[0] & 0x40000000) 979 if(ranges[0] & 0x40000000)
979 res->flags |= IORESOURCE_PREFETCH; 980 res->flags |= IORESOURCE_PREFETCH;
980 res->start = ranges[na+2]; 981 res->start = ranges[na+2];
981 DBG("PCI: MEM[%d] 0x%lx -> 0x%lx\n", memno, 982 DBG("PCI: MEM[%d] 0x%llx -> 0x%llx\n", memno,
982 res->start, res->start + size - 1); 983 res->start, res->start + size - 1);
983 } 984 }
984 break; 985 break;
@@ -1074,7 +1075,7 @@ do_update_p2p_io_resource(struct pci_bus *bus, int enable_vga)
1074 DBG("Remapping Bus %d, bridge: %s\n", bus->number, pci_name(bridge)); 1075 DBG("Remapping Bus %d, bridge: %s\n", bus->number, pci_name(bridge));
1075 res.start -= ((unsigned long) hose->io_base_virt - isa_io_base); 1076 res.start -= ((unsigned long) hose->io_base_virt - isa_io_base);
1076 res.end -= ((unsigned long) hose->io_base_virt - isa_io_base); 1077 res.end -= ((unsigned long) hose->io_base_virt - isa_io_base);
1077 DBG(" IO window: %08lx-%08lx\n", res.start, res.end); 1078 DBG(" IO window: %016llx-%016llx\n", res.start, res.end);
1078 1079
1079 /* Set up the top and bottom of the PCI I/O segment for this bus. */ 1080 /* Set up the top and bottom of the PCI I/O segment for this bus. */
1080 pci_read_config_dword(bridge, PCI_IO_BASE, &l); 1081 pci_read_config_dword(bridge, PCI_IO_BASE, &l);
@@ -1223,8 +1224,8 @@ do_fixup_p2p_level(struct pci_bus *bus)
1223 continue; 1224 continue;
1224 if ((r->flags & IORESOURCE_IO) == 0) 1225 if ((r->flags & IORESOURCE_IO) == 0)
1225 continue; 1226 continue;
1226 DBG("Trying to allocate from %08lx, size %08lx from parent" 1227 DBG("Trying to allocate from %016llx, size %016llx from parent"
1227 " res %d: %08lx -> %08lx\n", 1228 " res %d: %016llx -> %016llx\n",
1228 res->start, res->end, i, r->start, r->end); 1229 res->start, res->end, i, r->start, r->end);
1229 1230
1230 if (allocate_resource(r, res, res->end + 1, res->start, max, 1231 if (allocate_resource(r, res, res->end + 1, res->start, max,
@@ -1574,8 +1575,8 @@ static pgprot_t __pci_mmap_set_pgprot(struct pci_dev *dev, struct resource *rp,
1574 else 1575 else
1575 prot |= _PAGE_GUARDED; 1576 prot |= _PAGE_GUARDED;
1576 1577
1577 printk("PCI map for %s:%lx, prot: %lx\n", pci_name(dev), rp->start, 1578 printk("PCI map for %s:%llx, prot: %lx\n", pci_name(dev),
1578 prot); 1579 (unsigned long long)rp->start, prot);
1579 1580
1580 return __pgprot(prot); 1581 return __pgprot(prot);
1581} 1582}
@@ -1755,7 +1756,7 @@ long sys_pciconfig_iobase(long which, unsigned long bus, unsigned long devfn)
1755 1756
1756void pci_resource_to_user(const struct pci_dev *dev, int bar, 1757void pci_resource_to_user(const struct pci_dev *dev, int bar,
1757 const struct resource *rsrc, 1758 const struct resource *rsrc,
1758 u64 *start, u64 *end) 1759 resource_size_t *start, resource_size_t *end)
1759{ 1760{
1760 struct pci_controller *hose = pci_bus_to_hose(dev->bus->number); 1761 struct pci_controller *hose = pci_bus_to_hose(dev->bus->number);
1761 unsigned long offset = 0; 1762 unsigned long offset = 0;
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 247937dd8b73..286aa52aae33 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -138,11 +138,11 @@ EXPORT_SYMBOL(pcibios_bus_to_resource);
138 * which might have be mirrored at 0x0100-0x03ff.. 138 * which might have be mirrored at 0x0100-0x03ff..
139 */ 139 */
140void pcibios_align_resource(void *data, struct resource *res, 140void pcibios_align_resource(void *data, struct resource *res,
141 unsigned long size, unsigned long align) 141 resource_size_t size, resource_size_t align)
142{ 142{
143 struct pci_dev *dev = data; 143 struct pci_dev *dev = data;
144 struct pci_controller *hose = pci_bus_to_host(dev->bus); 144 struct pci_controller *hose = pci_bus_to_host(dev->bus);
145 unsigned long start = res->start; 145 resource_size_t start = res->start;
146 unsigned long alignto; 146 unsigned long alignto;
147 147
148 if (res->flags & IORESOURCE_IO) { 148 if (res->flags & IORESOURCE_IO) {
diff --git a/arch/powerpc/platforms/83xx/pci.c b/arch/powerpc/platforms/83xx/pci.c
index 16f7d3b30e1d..3baceb00fefa 100644
--- a/arch/powerpc/platforms/83xx/pci.c
+++ b/arch/powerpc/platforms/83xx/pci.c
@@ -91,9 +91,10 @@ int __init add_bridge(struct device_node *dev)
91 mpc83xx_pci2_busno = hose->first_busno; 91 mpc83xx_pci2_busno = hose->first_busno;
92 } 92 }
93 93
94 printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%08lx. " 94 printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%016llx. "
95 "Firmware bus number: %d->%d\n", 95 "Firmware bus number: %d->%d\n",
96 rsrc.start, hose->first_busno, hose->last_busno); 96 (unsigned long long)rsrc.start, hose->first_busno,
97 hose->last_busno);
97 98
98 DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n", 99 DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
99 hose, hose->cfg_addr, hose->cfg_data); 100 hose, hose->cfg_addr, hose->cfg_data);
diff --git a/arch/powerpc/platforms/85xx/pci.c b/arch/powerpc/platforms/85xx/pci.c
index bad290110ed1..48c8849c07ca 100644
--- a/arch/powerpc/platforms/85xx/pci.c
+++ b/arch/powerpc/platforms/85xx/pci.c
@@ -79,9 +79,10 @@ int __init add_bridge(struct device_node *dev)
79 mpc85xx_pci2_busno = hose->first_busno; 79 mpc85xx_pci2_busno = hose->first_busno;
80 } 80 }
81 81
82 printk(KERN_INFO "Found MPC85xx PCI host bridge at 0x%08lx. " 82 printk(KERN_INFO "Found MPC85xx PCI host bridge at 0x%016llx. "
83 "Firmware bus number: %d->%d\n", 83 "Firmware bus number: %d->%d\n",
84 rsrc.start, hose->first_busno, hose->last_busno); 84 (unsigned long long)rsrc.start, hose->first_busno,
85 hose->last_busno);
85 86
86 DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n", 87 DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
87 hose, hose->cfg_addr, hose->cfg_data); 88 hose, hose->cfg_addr, hose->cfg_data);
diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c
index ac224876ce59..53515daf01b1 100644
--- a/arch/powerpc/platforms/chrp/pci.c
+++ b/arch/powerpc/platforms/chrp/pci.c
@@ -143,7 +143,7 @@ hydra_init(void)
143 if (np == NULL || of_address_to_resource(np, 0, &r)) 143 if (np == NULL || of_address_to_resource(np, 0, &r))
144 return 0; 144 return 0;
145 Hydra = ioremap(r.start, r.end-r.start); 145 Hydra = ioremap(r.start, r.end-r.start);
146 printk("Hydra Mac I/O at %lx\n", r.start); 146 printk("Hydra Mac I/O at %llx\n", (unsigned long long)r.start);
147 printk("Hydra Feature_Control was %x", 147 printk("Hydra Feature_Control was %x",
148 in_le32(&Hydra->Feature_Control)); 148 in_le32(&Hydra->Feature_Control));
149 out_le32(&Hydra->Feature_Control, (HYDRA_FC_SCC_CELL_EN | 149 out_le32(&Hydra->Feature_Control, (HYDRA_FC_SCC_CELL_EN |
@@ -267,7 +267,7 @@ chrp_find_bridges(void)
267 bus_range[0], bus_range[1]); 267 bus_range[0], bus_range[1]);
268 printk(" controlled by %s", dev->type); 268 printk(" controlled by %s", dev->type);
269 if (!is_longtrail) 269 if (!is_longtrail)
270 printk(" at %lx", r.start); 270 printk(" at %llx", (unsigned long long)r.start);
271 printk("\n"); 271 printk("\n");
272 272
273 hose = pcibios_alloc_controller(); 273 hose = pcibios_alloc_controller();
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c
index 9a4efc0c3b29..f7170ff86dab 100644
--- a/arch/powerpc/platforms/maple/pci.c
+++ b/arch/powerpc/platforms/maple/pci.c
@@ -376,9 +376,10 @@ static void __init maple_fixup_phb_resources(void)
376 unsigned long offset = (unsigned long)hose->io_base_virt - pci_io_base; 376 unsigned long offset = (unsigned long)hose->io_base_virt - pci_io_base;
377 hose->io_resource.start += offset; 377 hose->io_resource.start += offset;
378 hose->io_resource.end += offset; 378 hose->io_resource.end += offset;
379 printk(KERN_INFO "PCI Host %d, io start: %lx; io end: %lx\n", 379 printk(KERN_INFO "PCI Host %d, io start: %llx; io end: %llx\n",
380 hose->global_number, 380 hose->global_number,
381 hose->io_resource.start, hose->io_resource.end); 381 (unsigned long long)hose->io_resource.start,
382 (unsigned long long)hose->io_resource.end);
382 } 383 }
383} 384}
384 385
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c
index 80035853467b..d524a915aa86 100644
--- a/arch/powerpc/platforms/powermac/pci.c
+++ b/arch/powerpc/platforms/powermac/pci.c
@@ -939,9 +939,10 @@ static int __init add_bridge(struct device_node *dev)
939 disp_name = "Chaos"; 939 disp_name = "Chaos";
940 primary = 0; 940 primary = 0;
941 } 941 }
942 printk(KERN_INFO "Found %s PCI host bridge at 0x%08lx. " 942 printk(KERN_INFO "Found %s PCI host bridge at 0x%016llx. "
943 "Firmware bus number: %d->%d\n", 943 "Firmware bus number: %d->%d\n",
944 disp_name, rsrc.start, hose->first_busno, hose->last_busno); 944 disp_name, (unsigned long long)rsrc.start, hose->first_busno,
945 hose->last_busno);
945#endif /* CONFIG_PPC32 */ 946#endif /* CONFIG_PPC32 */
946 947
947 DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n", 948 DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
diff --git a/arch/ppc/kernel/pci.c b/arch/ppc/kernel/pci.c
index d20accf9650d..242bb052be67 100644
--- a/arch/ppc/kernel/pci.c
+++ b/arch/ppc/kernel/pci.c
@@ -95,8 +95,10 @@ pcibios_fixup_resources(struct pci_dev *dev)
95 if (!res->flags) 95 if (!res->flags)
96 continue; 96 continue;
97 if (res->end == 0xffffffff) { 97 if (res->end == 0xffffffff) {
98 DBG("PCI:%s Resource %d [%08lx-%08lx] is unassigned\n", 98 DBG("PCI:%s Resource %d [%016llx-%016llx] is unassigned\n",
99 pci_name(dev), i, res->start, res->end); 99 pci_name(dev), i,
100 (unsigned long long)res->start,
101 (unsigned long long)res->end);
100 res->end -= res->start; 102 res->end -= res->start;
101 res->start = 0; 103 res->start = 0;
102 res->flags |= IORESOURCE_UNSET; 104 res->flags |= IORESOURCE_UNSET;
@@ -169,18 +171,18 @@ EXPORT_SYMBOL(pcibios_bus_to_resource);
169 * but we want to try to avoid allocating at 0x2900-0x2bff 171 * but we want to try to avoid allocating at 0x2900-0x2bff
170 * which might have be mirrored at 0x0100-0x03ff.. 172 * which might have be mirrored at 0x0100-0x03ff..
171 */ 173 */
172void pcibios_align_resource(void *data, struct resource *res, unsigned long size, 174void pcibios_align_resource(void *data, struct resource *res,
173 unsigned long align) 175 resource_size_t size, resource_size_t align)
174{ 176{
175 struct pci_dev *dev = data; 177 struct pci_dev *dev = data;
176 178
177 if (res->flags & IORESOURCE_IO) { 179 if (res->flags & IORESOURCE_IO) {
178 unsigned long start = res->start; 180 resource_size_t start = res->start;
179 181
180 if (size > 0x100) { 182 if (size > 0x100) {
181 printk(KERN_ERR "PCI: I/O Region %s/%d too large" 183 printk(KERN_ERR "PCI: I/O Region %s/%d too large"
182 " (%ld bytes)\n", pci_name(dev), 184 " (%lld bytes)\n", pci_name(dev),
183 dev->resource - res, size); 185 dev->resource - res, (unsigned long long)size);
184 } 186 }
185 187
186 if (start & 0x300) { 188 if (start & 0x300) {
@@ -251,8 +253,9 @@ pcibios_allocate_bus_resources(struct list_head *bus_list)
251 } 253 }
252 } 254 }
253 255
254 DBG("PCI: bridge rsrc %lx..%lx (%lx), parent %p\n", 256 DBG("PCI: bridge rsrc %llx..%llx (%lx), parent %p\n",
255 res->start, res->end, res->flags, pr); 257 (unsigned long long)res->start,
258 (unsigned long long)res->end, res->flags, pr);
256 if (pr) { 259 if (pr) {
257 if (request_resource(pr, res) == 0) 260 if (request_resource(pr, res) == 0)
258 continue; 261 continue;
@@ -302,8 +305,9 @@ reparent_resources(struct resource *parent, struct resource *res)
302 *pp = NULL; 305 *pp = NULL;
303 for (p = res->child; p != NULL; p = p->sibling) { 306 for (p = res->child; p != NULL; p = p->sibling) {
304 p->parent = res; 307 p->parent = res;
305 DBG(KERN_INFO "PCI: reparented %s [%lx..%lx] under %s\n", 308 DBG(KERN_INFO "PCI: reparented %s [%llx..%llx] under %s\n",
306 p->name, p->start, p->end, res->name); 309 p->name, (unsigned long long)p->start,
310 (unsigned long long)p->end, res->name);
307 } 311 }
308 return 0; 312 return 0;
309} 313}
@@ -358,13 +362,15 @@ pci_relocate_bridge_resource(struct pci_bus *bus, int i)
358 try = conflict->start - 1; 362 try = conflict->start - 1;
359 } 363 }
360 if (request_resource(pr, res)) { 364 if (request_resource(pr, res)) {
361 DBG(KERN_ERR "PCI: huh? couldn't move to %lx..%lx\n", 365 DBG(KERN_ERR "PCI: huh? couldn't move to %llx..%llx\n",
362 res->start, res->end); 366 (unsigned long long)res->start,
367 (unsigned long long)res->end);
363 return -1; /* "can't happen" */ 368 return -1; /* "can't happen" */
364 } 369 }
365 update_bridge_base(bus, i); 370 update_bridge_base(bus, i);
366 printk(KERN_INFO "PCI: bridge %d resource %d moved to %lx..%lx\n", 371 printk(KERN_INFO "PCI: bridge %d resource %d moved to %llx..%llx\n",
367 bus->number, i, res->start, res->end); 372 bus->number, i, (unsigned long long)res->start,
373 (unsigned long long)res->end);
368 return 0; 374 return 0;
369} 375}
370 376
@@ -475,15 +481,17 @@ static inline void alloc_resource(struct pci_dev *dev, int idx)
475{ 481{
476 struct resource *pr, *r = &dev->resource[idx]; 482 struct resource *pr, *r = &dev->resource[idx];
477 483
478 DBG("PCI:%s: Resource %d: %08lx-%08lx (f=%lx)\n", 484 DBG("PCI:%s: Resource %d: %016llx-%016llx (f=%lx)\n",
479 pci_name(dev), idx, r->start, r->end, r->flags); 485 pci_name(dev), idx, (unsigned long long)r->start,
486 (unsigned long long)r->end, r->flags);
480 pr = pci_find_parent_resource(dev, r); 487 pr = pci_find_parent_resource(dev, r);
481 if (!pr || request_resource(pr, r) < 0) { 488 if (!pr || request_resource(pr, r) < 0) {
482 printk(KERN_ERR "PCI: Cannot allocate resource region %d" 489 printk(KERN_ERR "PCI: Cannot allocate resource region %d"
483 " of device %s\n", idx, pci_name(dev)); 490 " of device %s\n", idx, pci_name(dev));
484 if (pr) 491 if (pr)
485 DBG("PCI: parent is %p: %08lx-%08lx (f=%lx)\n", 492 DBG("PCI: parent is %p: %016llx-%016llx (f=%lx)\n",
486 pr, pr->start, pr->end, pr->flags); 493 pr, (unsigned long long)pr->start,
494 (unsigned long long)pr->end, pr->flags);
487 /* We'll assign a new address later */ 495 /* We'll assign a new address later */
488 r->flags |= IORESOURCE_UNSET; 496 r->flags |= IORESOURCE_UNSET;
489 r->end -= r->start; 497 r->end -= r->start;
@@ -952,8 +960,8 @@ static pgprot_t __pci_mmap_set_pgprot(struct pci_dev *dev, struct resource *rp,
952 else 960 else
953 prot |= _PAGE_GUARDED; 961 prot |= _PAGE_GUARDED;
954 962
955 printk("PCI map for %s:%lx, prot: %lx\n", pci_name(dev), rp->start, 963 printk("PCI map for %s:%llx, prot: %lx\n", pci_name(dev),
956 prot); 964 (unsigned long long)rp->start, prot);
957 965
958 return __pgprot(prot); 966 return __pgprot(prot);
959} 967}
@@ -1122,7 +1130,7 @@ long sys_pciconfig_iobase(long which, unsigned long bus, unsigned long devfn)
1122 1130
1123void pci_resource_to_user(const struct pci_dev *dev, int bar, 1131void pci_resource_to_user(const struct pci_dev *dev, int bar,
1124 const struct resource *rsrc, 1132 const struct resource *rsrc,
1125 u64 *start, u64 *end) 1133 resource_size_t *start, resource_size_t *end)
1126{ 1134{
1127 struct pci_controller *hose = pci_bus_to_hose(dev->bus->number); 1135 struct pci_controller *hose = pci_bus_to_hose(dev->bus->number);
1128 unsigned long offset = 0; 1136 unsigned long offset = 0;
diff --git a/arch/sh/boards/mpc1211/pci.c b/arch/sh/boards/mpc1211/pci.c
index ba3a65439752..9f7ccd33ffb6 100644
--- a/arch/sh/boards/mpc1211/pci.c
+++ b/arch/sh/boards/mpc1211/pci.c
@@ -273,9 +273,9 @@ void __init pcibios_fixup_irqs(void)
273} 273}
274 274
275void pcibios_align_resource(void *data, struct resource *res, 275void pcibios_align_resource(void *data, struct resource *res,
276 unsigned long size, unsigned long align) 276 resource_size_t size, resource_size_t align)
277{ 277{
278 unsigned long start = res->start; 278 resource_size_t start = res->start;
279 279
280 if (res->flags & IORESOURCE_IO) { 280 if (res->flags & IORESOURCE_IO) {
281 if (start >= 0x10000UL) { 281 if (start >= 0x10000UL) {
diff --git a/arch/sh/boards/overdrive/galileo.c b/arch/sh/boards/overdrive/galileo.c
index 276fa11ee4ce..b055809d2ac1 100644
--- a/arch/sh/boards/overdrive/galileo.c
+++ b/arch/sh/boards/overdrive/galileo.c
@@ -536,7 +536,7 @@ void __init pcibios_fixup_bus(struct pci_bus *bus)
536} 536}
537 537
538void pcibios_align_resource(void *data, struct resource *res, 538void pcibios_align_resource(void *data, struct resource *res,
539 unsigned long size) 539 resource_size_t size)
540{ 540{
541} 541}
542 542
diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c
index c1669905abe4..3d546ba329cf 100644
--- a/arch/sh/drivers/pci/pci.c
+++ b/arch/sh/drivers/pci/pci.c
@@ -75,7 +75,7 @@ pcibios_update_resource(struct pci_dev *dev, struct resource *root,
75} 75}
76 76
77void pcibios_align_resource(void *data, struct resource *res, 77void pcibios_align_resource(void *data, struct resource *res,
78 unsigned long size, unsigned long align) 78 resource_size_t size, resource_size_t align)
79 __attribute__ ((weak)); 79 __attribute__ ((weak));
80 80
81/* 81/*
@@ -85,10 +85,10 @@ void pcibios_align_resource(void *data, struct resource *res,
85 * modulo 0x400. 85 * modulo 0x400.
86 */ 86 */
87void pcibios_align_resource(void *data, struct resource *res, 87void pcibios_align_resource(void *data, struct resource *res,
88 unsigned long size, unsigned long align) 88 resource_size_t size, resource_size_t align)
89{ 89{
90 if (res->flags & IORESOURCE_IO) { 90 if (res->flags & IORESOURCE_IO) {
91 unsigned long start = res->start; 91 resource_size_t start = res->start;
92 92
93 if (start & 0x300) { 93 if (start & 0x300) {
94 start = (start + 0x3ff) & ~0x3ff; 94 start = (start + 0x3ff) & ~0x3ff;
diff --git a/arch/sh64/kernel/pcibios.c b/arch/sh64/kernel/pcibios.c
index 50c61dcb9fae..945920bc24db 100644
--- a/arch/sh64/kernel/pcibios.c
+++ b/arch/sh64/kernel/pcibios.c
@@ -69,10 +69,10 @@ pcibios_update_resource(struct pci_dev *dev, struct resource *root,
69 * modulo 0x400. 69 * modulo 0x400.
70 */ 70 */
71void pcibios_align_resource(void *data, struct resource *res, 71void pcibios_align_resource(void *data, struct resource *res,
72 unsigned long size, unsigned long align) 72 resource_size_t size, resource_size_t align)
73{ 73{
74 if (res->flags & IORESOURCE_IO) { 74 if (res->flags & IORESOURCE_IO) {
75 unsigned long start = res->start; 75 resource_size_t start = res->start;
76 76
77 if (start & 0x300) { 77 if (start & 0x300) {
78 start = (start + 0x3ff) & ~0x3ff; 78 start = (start + 0x3ff) & ~0x3ff;
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c
index ae4c667c906f..79d177149fdb 100644
--- a/arch/sparc/kernel/ioport.c
+++ b/arch/sparc/kernel/ioport.c
@@ -208,7 +208,7 @@ _sparc_ioremap(struct resource *res, u32 bus, u32 pa, int sz)
208 pa &= PAGE_MASK; 208 pa &= PAGE_MASK;
209 sparc_mapiorange(bus, pa, res->start, res->end - res->start + 1); 209 sparc_mapiorange(bus, pa, res->start, res->end - res->start + 1);
210 210
211 return (void __iomem *) (res->start + offset); 211 return (void __iomem *)(unsigned long)(res->start + offset);
212} 212}
213 213
214/* 214/*
@@ -325,7 +325,7 @@ void *sbus_alloc_consistent(struct sbus_dev *sdev, long len, u32 *dma_addrp)
325 res->name = sdev->prom_name; 325 res->name = sdev->prom_name;
326 } 326 }
327 327
328 return (void *)res->start; 328 return (void *)(unsigned long)res->start;
329 329
330err_noiommu: 330err_noiommu:
331 release_resource(res); 331 release_resource(res);
@@ -819,7 +819,9 @@ _sparc_io_get_info(char *buf, char **start, off_t fpos, int length, int *eof,
819 if (p + 32 >= e) /* Better than nothing */ 819 if (p + 32 >= e) /* Better than nothing */
820 break; 820 break;
821 if ((nm = r->name) == 0) nm = "???"; 821 if ((nm = r->name) == 0) nm = "???";
822 p += sprintf(p, "%08lx-%08lx: %s\n", r->start, r->end, nm); 822 p += sprintf(p, "%016llx-%016llx: %s\n",
823 (unsigned long long)r->start,
824 (unsigned long long)r->end, nm);
823 } 825 }
824 826
825 return p-buf; 827 return p-buf;
diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c
index bcfdddd0418a..5df3ebdc0ab1 100644
--- a/arch/sparc/kernel/pcic.c
+++ b/arch/sparc/kernel/pcic.c
@@ -860,7 +860,7 @@ char * __init pcibios_setup(char *str)
860} 860}
861 861
862void pcibios_align_resource(void *data, struct resource *res, 862void pcibios_align_resource(void *data, struct resource *res,
863 unsigned long size, unsigned long align) 863 resource_size_t size, resource_size_t align)
864{ 864{
865} 865}
866 866
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c
index 6c9e3e94abaa..20ca9ec8fd3b 100644
--- a/arch/sparc64/kernel/pci.c
+++ b/arch/sparc64/kernel/pci.c
@@ -357,7 +357,7 @@ void pcibios_update_irq(struct pci_dev *pdev, int irq)
357} 357}
358 358
359void pcibios_align_resource(void *data, struct resource *res, 359void pcibios_align_resource(void *data, struct resource *res,
360 unsigned long size, unsigned long align) 360 resource_size_t size, resource_size_t align)
361{ 361{
362} 362}
363 363
diff --git a/arch/v850/kernel/rte_mb_a_pci.c b/arch/v850/kernel/rte_mb_a_pci.c
index ffbb6d073bf2..3a7c5c9c3ac6 100644
--- a/arch/v850/kernel/rte_mb_a_pci.c
+++ b/arch/v850/kernel/rte_mb_a_pci.c
@@ -329,7 +329,7 @@ void pcibios_fixup_bus(struct pci_bus *b)
329 329
330void 330void
331pcibios_align_resource (void *data, struct resource *res, 331pcibios_align_resource (void *data, struct resource *res,
332 unsigned long size, unsigned long align) 332 resource_size_t size, resource_size_t align)
333{ 333{
334} 334}
335 335
diff --git a/arch/xtensa/kernel/pci.c b/arch/xtensa/kernel/pci.c
index c6f471b9eaa0..eda029fc8972 100644
--- a/arch/xtensa/kernel/pci.c
+++ b/arch/xtensa/kernel/pci.c
@@ -71,13 +71,13 @@ static int pci_bus_count;
71 * which might have be mirrored at 0x0100-0x03ff.. 71 * which might have be mirrored at 0x0100-0x03ff..
72 */ 72 */
73void 73void
74pcibios_align_resource(void *data, struct resource *res, unsigned long size, 74pcibios_align_resource(void *data, struct resource *res, resource_size_t size,
75 unsigned long align) 75 resource_size_t align)
76{ 76{
77 struct pci_dev *dev = data; 77 struct pci_dev *dev = data;
78 78
79 if (res->flags & IORESOURCE_IO) { 79 if (res->flags & IORESOURCE_IO) {
80 unsigned long start = res->start; 80 resource_size_t start = res->start;
81 81
82 if (size > 0x100) { 82 if (size > 0x100) {
83 printk(KERN_ERR "PCI: I/O Region %s/%d too large" 83 printk(KERN_ERR "PCI: I/O Region %s/%d too large"