diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-29 13:49:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-29 13:49:17 -0400 |
commit | 1903ac54f8536b11478e4f01c339e10b538f59e0 (patch) | |
tree | ff5410f0539ab4aa09f964fa1d0c6dc26c614dc2 /arch/ppc/kernel | |
parent | 47c2a3aa4475d27073dd3c7e183fcc13f495c8f5 (diff) | |
parent | 87937472ff8e34ad5c7b798a8a52e4368af216df (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6:
[PATCH] i386: export memory more than 4G through /proc/iomem
[PATCH] 64bit Resource: finally enable 64bit resource sizes
[PATCH] 64bit Resource: convert a few remaining drivers to use resource_size_t where needed
[PATCH] 64bit resource: change pnp core to use resource_size_t
[PATCH] 64bit resource: change pci core and arch code to use resource_size_t
[PATCH] 64bit resource: change resource core to use resource_size_t
[PATCH] 64bit resource: introduce resource_size_t for the start and end of struct resource
[PATCH] 64bit resource: fix up printks for resources in misc drivers
[PATCH] 64bit resource: fix up printks for resources in arch and core code
[PATCH] 64bit resource: fix up printks for resources in pcmcia drivers
[PATCH] 64bit resource: fix up printks for resources in video drivers
[PATCH] 64bit resource: fix up printks for resources in ide drivers
[PATCH] 64bit resource: fix up printks for resources in mtd drivers
[PATCH] 64bit resource: fix up printks for resources in pci core and hotplug drivers
[PATCH] 64bit resource: fix up printks for resources in networks drivers
[PATCH] 64bit resource: fix up printks for resources in sound drivers
[PATCH] 64bit resource: C99 changes for struct resource declarations
Fixed up trivial conflict in drivers/ide/pci/cmd64x.c (the printk that
was changed by the 64-bit resources had been deleted in the meantime ;)
Diffstat (limited to 'arch/ppc/kernel')
-rw-r--r-- | arch/ppc/kernel/pci.c | 52 |
1 files changed, 30 insertions, 22 deletions
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 | */ |
172 | void pcibios_align_resource(void *data, struct resource *res, unsigned long size, | 174 | void 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 | ||
1123 | 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, |
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; |