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 /include | |
| 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 'include')
| -rw-r--r-- | include/asm-arm/mach/pci.h | 2 | ||||
| -rw-r--r-- | include/asm-powerpc/pci.h | 2 | ||||
| -rw-r--r-- | include/asm-ppc/pci.h | 2 | ||||
| -rw-r--r-- | include/linux/ioport.h | 27 | ||||
| -rw-r--r-- | include/linux/pci.h | 13 | ||||
| -rw-r--r-- | include/linux/pnp.h | 7 | ||||
| -rw-r--r-- | include/linux/types.h | 7 |
7 files changed, 38 insertions, 22 deletions
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/ioport.h b/include/linux/ioport.h index edfc733b1575..87a9fc039b47 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
| @@ -9,13 +9,15 @@ | |||
| 9 | #define _LINUX_IOPORT_H | 9 | #define _LINUX_IOPORT_H |
| 10 | 10 | ||
| 11 | #include <linux/compiler.h> | 11 | #include <linux/compiler.h> |
| 12 | #include <linux/types.h> | ||
| 12 | /* | 13 | /* |
| 13 | * Resources are tree-like, allowing | 14 | * Resources are tree-like, allowing |
| 14 | * nesting etc.. | 15 | * nesting etc.. |
| 15 | */ | 16 | */ |
| 16 | struct resource { | 17 | struct resource { |
| 18 | resource_size_t start; | ||
| 19 | resource_size_t end; | ||
| 17 | const char *name; | 20 | const char *name; |
| 18 | unsigned long start, end; | ||
| 19 | unsigned long flags; | 21 | unsigned long flags; |
| 20 | struct resource *parent, *sibling, *child; | 22 | struct resource *parent, *sibling, *child; |
| 21 | }; | 23 | }; |
| @@ -96,14 +98,13 @@ extern struct resource * ____request_resource(struct resource *root, struct reso | |||
| 96 | extern int release_resource(struct resource *new); | 98 | extern int release_resource(struct resource *new); |
| 97 | extern __deprecated_for_modules int insert_resource(struct resource *parent, struct resource *new); | 99 | extern __deprecated_for_modules int insert_resource(struct resource *parent, struct resource *new); |
| 98 | extern int allocate_resource(struct resource *root, struct resource *new, | 100 | extern int allocate_resource(struct resource *root, struct resource *new, |
| 99 | unsigned long size, | 101 | resource_size_t size, resource_size_t min, |
| 100 | unsigned long min, unsigned long max, | 102 | resource_size_t max, resource_size_t align, |
| 101 | unsigned long align, | ||
| 102 | void (*alignf)(void *, struct resource *, | 103 | void (*alignf)(void *, struct resource *, |
| 103 | unsigned long, unsigned long), | 104 | resource_size_t, resource_size_t), |
| 104 | void *alignf_data); | 105 | void *alignf_data); |
| 105 | int adjust_resource(struct resource *res, unsigned long start, | 106 | int adjust_resource(struct resource *res, resource_size_t start, |
| 106 | unsigned long size); | 107 | resource_size_t size); |
| 107 | 108 | ||
| 108 | /* get registered SYSTEM_RAM resources in specified area */ | 109 | /* get registered SYSTEM_RAM resources in specified area */ |
| 109 | extern int find_next_system_ram(struct resource *res); | 110 | extern int find_next_system_ram(struct resource *res); |
| @@ -113,17 +114,21 @@ extern int find_next_system_ram(struct resource *res); | |||
| 113 | #define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name)) | 114 | #define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name)) |
| 114 | #define rename_region(region, newname) do { (region)->name = (newname); } while (0) | 115 | #define rename_region(region, newname) do { (region)->name = (newname); } while (0) |
| 115 | 116 | ||
| 116 | extern struct resource * __request_region(struct resource *, unsigned long start, unsigned long n, const char *name); | 117 | extern struct resource * __request_region(struct resource *, |
| 118 | resource_size_t start, | ||
| 119 | resource_size_t n, const char *name); | ||
| 117 | 120 | ||
| 118 | /* Compatibility cruft */ | 121 | /* Compatibility cruft */ |
| 119 | #define release_region(start,n) __release_region(&ioport_resource, (start), (n)) | 122 | #define release_region(start,n) __release_region(&ioport_resource, (start), (n)) |
| 120 | #define check_mem_region(start,n) __check_region(&iomem_resource, (start), (n)) | 123 | #define check_mem_region(start,n) __check_region(&iomem_resource, (start), (n)) |
| 121 | #define release_mem_region(start,n) __release_region(&iomem_resource, (start), (n)) | 124 | #define release_mem_region(start,n) __release_region(&iomem_resource, (start), (n)) |
| 122 | 125 | ||
| 123 | extern int __check_region(struct resource *, unsigned long, unsigned long); | 126 | extern int __check_region(struct resource *, resource_size_t, resource_size_t); |
| 124 | extern void __release_region(struct resource *, unsigned long, unsigned long); | 127 | extern void __release_region(struct resource *, resource_size_t, |
| 128 | resource_size_t); | ||
| 125 | 129 | ||
| 126 | static inline int __deprecated check_region(unsigned long s, unsigned long n) | 130 | static inline int __deprecated check_region(resource_size_t s, |
| 131 | resource_size_t n) | ||
| 127 | { | 132 | { |
| 128 | return __check_region(&ioport_resource, s, n); | 133 | return __check_region(&ioport_resource, s, n); |
| 129 | } | 134 | } |
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; |
diff --git a/include/linux/pnp.h b/include/linux/pnp.h index 93b0959eb40f..ab8a8dd8d64c 100644 --- a/include/linux/pnp.h +++ b/include/linux/pnp.h | |||
| @@ -389,7 +389,8 @@ int pnp_start_dev(struct pnp_dev *dev); | |||
| 389 | int pnp_stop_dev(struct pnp_dev *dev); | 389 | int pnp_stop_dev(struct pnp_dev *dev); |
| 390 | int pnp_activate_dev(struct pnp_dev *dev); | 390 | int pnp_activate_dev(struct pnp_dev *dev); |
| 391 | int pnp_disable_dev(struct pnp_dev *dev); | 391 | int pnp_disable_dev(struct pnp_dev *dev); |
| 392 | void pnp_resource_change(struct resource *resource, unsigned long start, unsigned long size); | 392 | void pnp_resource_change(struct resource *resource, resource_size_t start, |
| 393 | resource_size_t size); | ||
| 393 | 394 | ||
| 394 | /* protocol helpers */ | 395 | /* protocol helpers */ |
| 395 | int pnp_is_active(struct pnp_dev * dev); | 396 | int pnp_is_active(struct pnp_dev * dev); |
| @@ -434,7 +435,9 @@ static inline int pnp_start_dev(struct pnp_dev *dev) { return -ENODEV; } | |||
| 434 | static inline int pnp_stop_dev(struct pnp_dev *dev) { return -ENODEV; } | 435 | static inline int pnp_stop_dev(struct pnp_dev *dev) { return -ENODEV; } |
| 435 | static inline int pnp_activate_dev(struct pnp_dev *dev) { return -ENODEV; } | 436 | static inline int pnp_activate_dev(struct pnp_dev *dev) { return -ENODEV; } |
| 436 | static inline int pnp_disable_dev(struct pnp_dev *dev) { return -ENODEV; } | 437 | static inline int pnp_disable_dev(struct pnp_dev *dev) { return -ENODEV; } |
| 437 | static inline void pnp_resource_change(struct resource *resource, unsigned long start, unsigned long size) { } | 438 | static inline void pnp_resource_change(struct resource *resource, |
| 439 | resource_size_t start, | ||
| 440 | resource_size_t size) { } | ||
| 438 | 441 | ||
| 439 | /* protocol helpers */ | 442 | /* protocol helpers */ |
| 440 | static inline int pnp_is_active(struct pnp_dev * dev) { return 0; } | 443 | static inline int pnp_is_active(struct pnp_dev * dev) { return 0; } |
diff --git a/include/linux/types.h b/include/linux/types.h index a5e46e783ffa..3f235660a3cd 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
| @@ -177,8 +177,15 @@ typedef __u64 __bitwise __be64; | |||
| 177 | 177 | ||
| 178 | #ifdef __KERNEL__ | 178 | #ifdef __KERNEL__ |
| 179 | typedef unsigned __bitwise__ gfp_t; | 179 | typedef unsigned __bitwise__ gfp_t; |
| 180 | |||
| 181 | #ifdef CONFIG_RESOURCES_64BIT | ||
| 182 | typedef u64 resource_size_t; | ||
| 183 | #else | ||
| 184 | typedef u32 resource_size_t; | ||
| 180 | #endif | 185 | #endif |
| 181 | 186 | ||
| 187 | #endif /* __KERNEL__ */ | ||
| 188 | |||
| 182 | struct ustat { | 189 | struct ustat { |
| 183 | __kernel_daddr_t f_tfree; | 190 | __kernel_daddr_t f_tfree; |
| 184 | __kernel_ino_t f_tinode; | 191 | __kernel_ino_t f_tinode; |
