diff options
31 files changed, 76 insertions, 74 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 | ||
125 | void | 125 | void |
126 | pcibios_align_resource(void *data, struct resource *res, | 126 | pcibios_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) | |||
304 | static void __devinit | 304 | static void __devinit |
305 | pdev_fixup_device_resources(struct pci_sys_data *root, struct pci_dev *dev) | 305 | pdev_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 | */ |
636 | void pcibios_align_resource(void *data, struct resource *res, | 636 | void 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/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 | ||
44 | void | 44 | void |
45 | pcibios_align_resource(void *data, struct resource *res, | 45 | pcibios_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 | */ |
65 | void | 65 | void |
66 | pcibios_align_resource(void *data, struct resource *res, | 66 | pcibios_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/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 | */ |
49 | void | 49 | void |
50 | pcibios_align_resource(void *data, struct resource *res, | 50 | pcibios_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 | ||
569 | void | 569 | void |
570 | pcibios_align_resource (void *data, struct resource *res, | 570 | pcibios_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 | ||
360 | void pcibios_align_resource(void *data, struct resource *res, unsigned long size, unsigned long align) | 360 | void 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 | */ |
52 | void | 52 | void |
53 | pcibios_align_resource(void *data, struct resource *res, | 53 | pcibios_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 | ||
385 | void pcibios_align_resource(void *data, struct resource *res, | 385 | void 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 | */ |
291 | void pcibios_align_resource(void *data, struct resource *res, | 291 | void 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 d9e2506db5f7..8474355a1a4f 100644 --- a/arch/powerpc/kernel/pci_32.c +++ b/arch/powerpc/kernel/pci_32.c | |||
@@ -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 | */ |
176 | void pcibios_align_resource(void *data, struct resource *res, unsigned long size, | 176 | void 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 | " (%lld 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) { |
@@ -1756,7 +1756,7 @@ long sys_pciconfig_iobase(long which, unsigned long bus, unsigned long devfn) | |||
1756 | 1756 | ||
1757 | void pci_resource_to_user(const struct pci_dev *dev, int bar, | 1757 | void pci_resource_to_user(const struct pci_dev *dev, int bar, |
1758 | const struct resource *rsrc, | 1758 | const struct resource *rsrc, |
1759 | u64 *start, u64 *end) | 1759 | resource_size_t *start, resource_size_t *end) |
1760 | { | 1760 | { |
1761 | struct pci_controller *hose = pci_bus_to_hose(dev->bus->number); | 1761 | struct pci_controller *hose = pci_bus_to_hose(dev->bus->number); |
1762 | 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 | */ |
140 | void pcibios_align_resource(void *data, struct resource *res, | 140 | void 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/ppc/kernel/pci.c b/arch/ppc/kernel/pci.c index 8544e100d713..242bb052be67 100644 --- a/arch/ppc/kernel/pci.c +++ b/arch/ppc/kernel/pci.c | |||
@@ -171,13 +171,13 @@ EXPORT_SYMBOL(pcibios_bus_to_resource); | |||
171 | * but we want to try to avoid allocating at 0x2900-0x2bff | 171 | * but we want to try to avoid allocating at 0x2900-0x2bff |
172 | * which might have be mirrored at 0x0100-0x03ff.. | 172 | * which might have be mirrored at 0x0100-0x03ff.. |
173 | */ | 173 | */ |
174 | void pcibios_align_resource(void *data, struct resource *res, unsigned long size, | 174 | void pcibios_align_resource(void *data, struct resource *res, |
175 | unsigned long align) | 175 | resource_size_t size, resource_size_t align) |
176 | { | 176 | { |
177 | struct pci_dev *dev = data; | 177 | struct pci_dev *dev = data; |
178 | 178 | ||
179 | if (res->flags & IORESOURCE_IO) { | 179 | if (res->flags & IORESOURCE_IO) { |
180 | unsigned long start = res->start; | 180 | resource_size_t start = res->start; |
181 | 181 | ||
182 | if (size > 0x100) { | 182 | if (size > 0x100) { |
183 | printk(KERN_ERR "PCI: I/O Region %s/%d too large" | 183 | printk(KERN_ERR "PCI: I/O Region %s/%d too large" |
@@ -960,8 +960,8 @@ static pgprot_t __pci_mmap_set_pgprot(struct pci_dev *dev, struct resource *rp, | |||
960 | else | 960 | else |
961 | prot |= _PAGE_GUARDED; | 961 | prot |= _PAGE_GUARDED; |
962 | 962 | ||
963 | printk("PCI map for %s:%llx, prot: %llx\n", pci_name(dev), rp->start, | 963 | printk("PCI map for %s:%llx, prot: %lx\n", pci_name(dev), |
964 | prot); | 964 | (unsigned long long)rp->start, prot); |
965 | 965 | ||
966 | return __pgprot(prot); | 966 | return __pgprot(prot); |
967 | } | 967 | } |
@@ -1130,7 +1130,7 @@ long sys_pciconfig_iobase(long which, unsigned long bus, unsigned long devfn) | |||
1130 | 1130 | ||
1131 | void pci_resource_to_user(const struct pci_dev *dev, int bar, | 1131 | void pci_resource_to_user(const struct pci_dev *dev, int bar, |
1132 | const struct resource *rsrc, | 1132 | const struct resource *rsrc, |
1133 | u64 *start, u64 *end) | 1133 | resource_size_t *start, resource_size_t *end) |
1134 | { | 1134 | { |
1135 | struct pci_controller *hose = pci_bus_to_hose(dev->bus->number); | 1135 | struct pci_controller *hose = pci_bus_to_hose(dev->bus->number); |
1136 | 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 | ||
275 | void pcibios_align_resource(void *data, struct resource *res, | 275 | void 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 | ||
538 | void pcibios_align_resource(void *data, struct resource *res, | 538 | void 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 | ||
77 | void pcibios_align_resource(void *data, struct resource *res, | 77 | void 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 | */ |
87 | void pcibios_align_resource(void *data, struct resource *res, | 87 | void 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 | */ |
71 | void pcibios_align_resource(void *data, struct resource *res, | 71 | void 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/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 | ||
862 | void pcibios_align_resource(void *data, struct resource *res, | 862 | void 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 | ||
359 | void pcibios_align_resource(void *data, struct resource *res, | 359 | void 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 | ||
330 | void | 330 | void |
331 | pcibios_align_resource (void *data, struct resource *res, | 331 | pcibios_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 | */ |
73 | void | 73 | void |
74 | pcibios_align_resource(void *data, struct resource *res, unsigned long size, | 74 | pcibios_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" |
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index 723092682023..5f7db9d2436e 100644 --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c | |||
@@ -34,11 +34,11 @@ | |||
34 | */ | 34 | */ |
35 | int | 35 | int |
36 | pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, | 36 | pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, |
37 | unsigned long size, unsigned long align, unsigned long min, | 37 | resource_size_t size, resource_size_t align, |
38 | unsigned int type_mask, | 38 | resource_size_t min, unsigned int type_mask, |
39 | void (*alignf)(void *, struct resource *, | 39 | void (*alignf)(void *, struct resource *, resource_size_t, |
40 | unsigned long, unsigned long), | 40 | resource_size_t), |
41 | void *alignf_data) | 41 | void *alignf_data) |
42 | { | 42 | { |
43 | int i, ret = -ENOMEM; | 43 | int i, ret = -ENOMEM; |
44 | 44 | ||
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index bc405c035ce3..606f9b6f70eb 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c | |||
@@ -87,7 +87,7 @@ resource_show(struct device * dev, struct device_attribute *attr, char * buf) | |||
87 | char * str = buf; | 87 | char * str = buf; |
88 | int i; | 88 | int i; |
89 | int max = 7; | 89 | int max = 7; |
90 | u64 start, end; | 90 | resource_size_t start, end; |
91 | 91 | ||
92 | if (pci_dev->subordinate) | 92 | if (pci_dev->subordinate) |
93 | max = DEVICE_COUNT_RESOURCE; | 93 | max = DEVICE_COUNT_RESOURCE; |
@@ -365,7 +365,7 @@ pci_mmap_resource(struct kobject *kobj, struct bin_attribute *attr, | |||
365 | struct device, kobj)); | 365 | struct device, kobj)); |
366 | struct resource *res = (struct resource *)attr->private; | 366 | struct resource *res = (struct resource *)attr->private; |
367 | enum pci_mmap_state mmap_type; | 367 | enum pci_mmap_state mmap_type; |
368 | u64 start, end; | 368 | resource_size_t start, end; |
369 | int i; | 369 | int i; |
370 | 370 | ||
371 | for (i = 0; i < PCI_ROM_RESOURCE; i++) | 371 | for (i = 0; i < PCI_ROM_RESOURCE; i++) |
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 29bdeca031a8..9cc842b666eb 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h | |||
@@ -6,10 +6,10 @@ extern int pci_create_sysfs_dev_files(struct pci_dev *pdev); | |||
6 | extern void pci_remove_sysfs_dev_files(struct pci_dev *pdev); | 6 | extern void pci_remove_sysfs_dev_files(struct pci_dev *pdev); |
7 | extern void pci_cleanup_rom(struct pci_dev *dev); | 7 | extern void pci_cleanup_rom(struct pci_dev *dev); |
8 | extern int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, | 8 | extern int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, |
9 | unsigned long size, unsigned long align, | 9 | resource_size_t size, resource_size_t align, |
10 | unsigned long min, unsigned int type_mask, | 10 | resource_size_t min, unsigned int type_mask, |
11 | void (*alignf)(void *, struct resource *, | 11 | void (*alignf)(void *, struct resource *, |
12 | unsigned long, unsigned long), | 12 | resource_size_t, resource_size_t), |
13 | void *alignf_data); | 13 | void *alignf_data); |
14 | /* Firmware callbacks */ | 14 | /* Firmware callbacks */ |
15 | extern int (*platform_pci_choose_state)(struct pci_dev *dev, pm_message_t state); | 15 | extern int (*platform_pci_choose_state)(struct pci_dev *dev, pm_message_t state); |
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c index 20dfd77bd8c2..99cf33379769 100644 --- a/drivers/pci/proc.c +++ b/drivers/pci/proc.c | |||
@@ -350,14 +350,14 @@ static int show_device(struct seq_file *m, void *v) | |||
350 | dev->irq); | 350 | dev->irq); |
351 | /* Here should be 7 and not PCI_NUM_RESOURCES as we need to preserve compatibility */ | 351 | /* Here should be 7 and not PCI_NUM_RESOURCES as we need to preserve compatibility */ |
352 | for (i=0; i<7; i++) { | 352 | for (i=0; i<7; i++) { |
353 | u64 start, end; | 353 | resource_size_t start, end; |
354 | pci_resource_to_user(dev, i, &dev->resource[i], &start, &end); | 354 | pci_resource_to_user(dev, i, &dev->resource[i], &start, &end); |
355 | seq_printf(m, "\t%16llx", | 355 | seq_printf(m, "\t%16llx", |
356 | (unsigned long long)(start | | 356 | (unsigned long long)(start | |
357 | (dev->resource[i].flags & PCI_REGION_FLAG_MASK))); | 357 | (dev->resource[i].flags & PCI_REGION_FLAG_MASK))); |
358 | } | 358 | } |
359 | for (i=0; i<7; i++) { | 359 | for (i=0; i<7; i++) { |
360 | u64 start, end; | 360 | resource_size_t start, end; |
361 | pci_resource_to_user(dev, i, &dev->resource[i], &start, &end); | 361 | pci_resource_to_user(dev, i, &dev->resource[i], &start, &end); |
362 | seq_printf(m, "\t%16llx", | 362 | seq_printf(m, "\t%16llx", |
363 | dev->resource[i].start < dev->resource[i].end ? | 363 | dev->resource[i].start < dev->resource[i].end ? |
diff --git a/drivers/pci/rom.c b/drivers/pci/rom.c index 598a115cd00e..cbb69cf41311 100644 --- a/drivers/pci/rom.c +++ b/drivers/pci/rom.c | |||
@@ -80,8 +80,8 @@ void __iomem *pci_map_rom(struct pci_dev *pdev, size_t *size) | |||
80 | } else { | 80 | } else { |
81 | if (res->flags & IORESOURCE_ROM_COPY) { | 81 | if (res->flags & IORESOURCE_ROM_COPY) { |
82 | *size = pci_resource_len(pdev, PCI_ROM_RESOURCE); | 82 | *size = pci_resource_len(pdev, PCI_ROM_RESOURCE); |
83 | return (void __iomem *)pci_resource_start(pdev, | 83 | return (void __iomem *)(unsigned long) |
84 | PCI_ROM_RESOURCE); | 84 | pci_resource_start(pdev, PCI_ROM_RESOURCE); |
85 | } else { | 85 | } else { |
86 | /* assign the ROM an address if it doesn't have one */ | 86 | /* assign the ROM an address if it doesn't have one */ |
87 | if (res->parent == NULL && | 87 | if (res->parent == NULL && |
@@ -170,11 +170,11 @@ void __iomem *pci_map_rom_copy(struct pci_dev *pdev, size_t *size) | |||
170 | return rom; | 170 | return rom; |
171 | 171 | ||
172 | res->end = res->start + *size; | 172 | res->end = res->start + *size; |
173 | memcpy_fromio((void*)res->start, rom, *size); | 173 | memcpy_fromio((void*)(unsigned long)res->start, rom, *size); |
174 | pci_unmap_rom(pdev, rom); | 174 | pci_unmap_rom(pdev, rom); |
175 | res->flags |= IORESOURCE_ROM_COPY; | 175 | res->flags |= IORESOURCE_ROM_COPY; |
176 | 176 | ||
177 | return (void __iomem *)res->start; | 177 | return (void __iomem *)(unsigned long)res->start; |
178 | } | 178 | } |
179 | 179 | ||
180 | /** | 180 | /** |
@@ -227,7 +227,7 @@ void pci_cleanup_rom(struct pci_dev *pdev) | |||
227 | { | 227 | { |
228 | struct resource *res = &pdev->resource[PCI_ROM_RESOURCE]; | 228 | struct resource *res = &pdev->resource[PCI_ROM_RESOURCE]; |
229 | if (res->flags & IORESOURCE_ROM_COPY) { | 229 | if (res->flags & IORESOURCE_ROM_COPY) { |
230 | kfree((void*)res->start); | 230 | kfree((void*)(unsigned long)res->start); |
231 | res->flags &= ~IORESOURCE_ROM_COPY; | 231 | res->flags &= ~IORESOURCE_ROM_COPY; |
232 | res->start = 0; | 232 | res->start = 0; |
233 | res->end = 0; | 233 | res->end = 0; |
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c index f5ff0d3ba620..ab78e4bbdd83 100644 --- a/drivers/pci/setup-res.c +++ b/drivers/pci/setup-res.c | |||
@@ -121,7 +121,7 @@ int pci_assign_resource(struct pci_dev *dev, int resno) | |||
121 | { | 121 | { |
122 | struct pci_bus *bus = dev->bus; | 122 | struct pci_bus *bus = dev->bus; |
123 | struct resource *res = dev->resource + resno; | 123 | struct resource *res = dev->resource + resno; |
124 | unsigned long size, min, align; | 124 | resource_size_t size, min, align; |
125 | int ret; | 125 | int ret; |
126 | 126 | ||
127 | size = res->end - res->start + 1; | 127 | size = res->end - res->start + 1; |
@@ -209,7 +209,7 @@ pdev_sort_resources(struct pci_dev *dev, struct resource_list *head) | |||
209 | for (i = 0; i < PCI_NUM_RESOURCES; i++) { | 209 | for (i = 0; i < PCI_NUM_RESOURCES; i++) { |
210 | struct resource *r; | 210 | struct resource *r; |
211 | struct resource_list *list, *tmp; | 211 | struct resource_list *list, *tmp; |
212 | unsigned long r_align; | 212 | resource_size_t r_align; |
213 | 213 | ||
214 | r = &dev->resource[i]; | 214 | r = &dev->resource[i]; |
215 | r_align = r->end - r->start; | 215 | r_align = r->end - r->start; |
@@ -225,7 +225,7 @@ pdev_sort_resources(struct pci_dev *dev, struct resource_list *head) | |||
225 | } | 225 | } |
226 | r_align = (i < PCI_BRIDGE_RESOURCES) ? r_align + 1 : r->start; | 226 | r_align = (i < PCI_BRIDGE_RESOURCES) ? r_align + 1 : r->start; |
227 | for (list = head; ; list = list->next) { | 227 | for (list = head; ; list = list->next) { |
228 | unsigned long align = 0; | 228 | resource_size_t align = 0; |
229 | struct resource_list *ln = list->next; | 229 | struct resource_list *ln = list->next; |
230 | int idx; | 230 | int idx; |
231 | 231 | ||
diff --git a/include/asm-arm/mach/pci.h b/include/asm-arm/mach/pci.h index 25d540ed0079..923e0ca66200 100644 --- a/include/asm-arm/mach/pci.h +++ b/include/asm-arm/mach/pci.h | |||
@@ -28,7 +28,7 @@ struct hw_pci { | |||
28 | struct pci_sys_data { | 28 | struct pci_sys_data { |
29 | struct list_head node; | 29 | struct list_head node; |
30 | int busnr; /* primary bus number */ | 30 | int busnr; /* primary bus number */ |
31 | unsigned long mem_offset; /* bus->cpu memory mapping offset */ | 31 | u64 mem_offset; /* bus->cpu memory mapping offset */ |
32 | unsigned long io_offset; /* bus->cpu IO mapping offset */ | 32 | unsigned long io_offset; /* bus->cpu IO mapping offset */ |
33 | struct pci_bus *bus; /* PCI bus */ | 33 | struct pci_bus *bus; /* PCI bus */ |
34 | struct resource *resource[3]; /* Primary PCI bus resources */ | 34 | struct resource *resource[3]; /* Primary PCI bus resources */ |
diff --git a/include/asm-powerpc/pci.h b/include/asm-powerpc/pci.h index 5d2c9e6c4be2..46afd29b904e 100644 --- a/include/asm-powerpc/pci.h +++ b/include/asm-powerpc/pci.h | |||
@@ -242,7 +242,7 @@ extern pgprot_t pci_phys_mem_access_prot(struct file *file, | |||
242 | #define HAVE_ARCH_PCI_RESOURCE_TO_USER | 242 | #define HAVE_ARCH_PCI_RESOURCE_TO_USER |
243 | extern void pci_resource_to_user(const struct pci_dev *dev, int bar, | 243 | extern void pci_resource_to_user(const struct pci_dev *dev, int bar, |
244 | const struct resource *rsrc, | 244 | const struct resource *rsrc, |
245 | u64 *start, u64 *end); | 245 | resource_size_t *start, resource_size_t *end); |
246 | #endif /* CONFIG_PPC_MULTIPLATFORM || CONFIG_PPC32 */ | 246 | #endif /* CONFIG_PPC_MULTIPLATFORM || CONFIG_PPC32 */ |
247 | 247 | ||
248 | #endif /* __KERNEL__ */ | 248 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-ppc/pci.h b/include/asm-ppc/pci.h index 61434edbad7b..11ffaaa5da16 100644 --- a/include/asm-ppc/pci.h +++ b/include/asm-ppc/pci.h | |||
@@ -133,7 +133,7 @@ extern pgprot_t pci_phys_mem_access_prot(struct file *file, | |||
133 | #define HAVE_ARCH_PCI_RESOURCE_TO_USER | 133 | #define HAVE_ARCH_PCI_RESOURCE_TO_USER |
134 | extern void pci_resource_to_user(const struct pci_dev *dev, int bar, | 134 | extern void pci_resource_to_user(const struct pci_dev *dev, int bar, |
135 | const struct resource *rsrc, | 135 | const struct resource *rsrc, |
136 | u64 *start, u64 *end); | 136 | resource_size_t *start, resource_size_t *end); |
137 | 137 | ||
138 | 138 | ||
139 | #endif /* __KERNEL__ */ | 139 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 62a8c22f5f60..983fca251b25 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -404,8 +404,8 @@ int pcibios_enable_device(struct pci_dev *, int mask); | |||
404 | char *pcibios_setup (char *str); | 404 | char *pcibios_setup (char *str); |
405 | 405 | ||
406 | /* Used only when drivers/pci/setup.c is used */ | 406 | /* Used only when drivers/pci/setup.c is used */ |
407 | void pcibios_align_resource(void *, struct resource *, | 407 | void pcibios_align_resource(void *, struct resource *, resource_size_t, |
408 | unsigned long, unsigned long); | 408 | resource_size_t); |
409 | void pcibios_update_irq(struct pci_dev *, int irq); | 409 | void pcibios_update_irq(struct pci_dev *, int irq); |
410 | 410 | ||
411 | /* Generic PCI functions used internally */ | 411 | /* Generic PCI functions used internally */ |
@@ -532,10 +532,10 @@ void pci_release_region(struct pci_dev *, int); | |||
532 | 532 | ||
533 | /* drivers/pci/bus.c */ | 533 | /* drivers/pci/bus.c */ |
534 | int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, | 534 | int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, |
535 | unsigned long size, unsigned long align, | 535 | resource_size_t size, resource_size_t align, |
536 | unsigned long min, unsigned int type_mask, | 536 | resource_size_t min, unsigned int type_mask, |
537 | void (*alignf)(void *, struct resource *, | 537 | void (*alignf)(void *, struct resource *, |
538 | unsigned long, unsigned long), | 538 | resource_size_t, resource_size_t), |
539 | void *alignf_data); | 539 | void *alignf_data); |
540 | void pci_enable_bridges(struct pci_bus *bus); | 540 | void pci_enable_bridges(struct pci_bus *bus); |
541 | 541 | ||
@@ -730,7 +730,8 @@ static inline char *pci_name(struct pci_dev *pdev) | |||
730 | */ | 730 | */ |
731 | #ifndef HAVE_ARCH_PCI_RESOURCE_TO_USER | 731 | #ifndef HAVE_ARCH_PCI_RESOURCE_TO_USER |
732 | static inline void pci_resource_to_user(const struct pci_dev *dev, int bar, | 732 | static inline void pci_resource_to_user(const struct pci_dev *dev, int bar, |
733 | const struct resource *rsrc, u64 *start, u64 *end) | 733 | const struct resource *rsrc, resource_size_t *start, |
734 | resource_size_t *end) | ||
734 | { | 735 | { |
735 | *start = rsrc->start; | 736 | *start = rsrc->start; |
736 | *end = rsrc->end; | 737 | *end = rsrc->end; |