diff options
| -rw-r--r-- | arch/powerpc/platforms/Kconfig.cputype | 1 | ||||
| -rw-r--r-- | arch/powerpc/sysdev/ppc4xx_pci.c | 16 | ||||
| -rw-r--r-- | arch/x86/Kconfig | 1 | ||||
| -rw-r--r-- | arch/x86/kernel/e820.c | 4 | ||||
| -rw-r--r-- | drivers/pci/setup-bus.c | 9 | ||||
| -rw-r--r-- | include/linux/types.h | 8 |
6 files changed, 13 insertions, 26 deletions
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index 7f6512733862..be852fd407a8 100644 --- a/arch/powerpc/platforms/Kconfig.cputype +++ b/arch/powerpc/platforms/Kconfig.cputype | |||
| @@ -135,7 +135,6 @@ config PTE_64BIT | |||
| 135 | config PHYS_64BIT | 135 | config PHYS_64BIT |
| 136 | bool 'Large physical address support' if E500 | 136 | bool 'Large physical address support' if E500 |
| 137 | depends on 44x || E500 | 137 | depends on 44x || E500 |
| 138 | select RESOURCES_64BIT | ||
| 139 | default y if 44x | 138 | default y if 44x |
| 140 | ---help--- | 139 | ---help--- |
| 141 | This option enables kernel support for larger than 32-bit physical | 140 | This option enables kernel support for larger than 32-bit physical |
diff --git a/arch/powerpc/sysdev/ppc4xx_pci.c b/arch/powerpc/sysdev/ppc4xx_pci.c index fb368dfde5d4..e8a76d9539db 100644 --- a/arch/powerpc/sysdev/ppc4xx_pci.c +++ b/arch/powerpc/sysdev/ppc4xx_pci.c | |||
| @@ -41,13 +41,10 @@ extern unsigned long total_memory; | |||
| 41 | #define U64_TO_U32_LOW(val) ((u32)((val) & 0x00000000ffffffffULL)) | 41 | #define U64_TO_U32_LOW(val) ((u32)((val) & 0x00000000ffffffffULL)) |
| 42 | #define U64_TO_U32_HIGH(val) ((u32)((val) >> 32)) | 42 | #define U64_TO_U32_HIGH(val) ((u32)((val) >> 32)) |
| 43 | 43 | ||
| 44 | #ifdef CONFIG_RESOURCES_64BIT | 44 | #define RES_TO_U32_LOW(val) \ |
| 45 | #define RES_TO_U32_LOW(val) U64_TO_U32_LOW(val) | 45 | ((sizeof(resource_size_t) > sizeof(u32)) ? U64_TO_U32_LOW(val) : (val)) |
| 46 | #define RES_TO_U32_HIGH(val) U64_TO_U32_HIGH(val) | 46 | #define RES_TO_U32_HIGH(val) \ |
| 47 | #else | 47 | ((sizeof(resource_size_t) > sizeof(u32)) ? U64_TO_U32_HIGH(val) : (0)) |
| 48 | #define RES_TO_U32_LOW(val) (val) | ||
| 49 | #define RES_TO_U32_HIGH(val) (0) | ||
| 50 | #endif | ||
| 51 | 48 | ||
| 52 | static inline int ppc440spe_revA(void) | 49 | static inline int ppc440spe_revA(void) |
| 53 | { | 50 | { |
| @@ -145,12 +142,11 @@ static int __init ppc4xx_parse_dma_ranges(struct pci_controller *hose, | |||
| 145 | 142 | ||
| 146 | /* Use that */ | 143 | /* Use that */ |
| 147 | res->start = pci_addr; | 144 | res->start = pci_addr; |
| 148 | #ifndef CONFIG_RESOURCES_64BIT | ||
| 149 | /* Beware of 32 bits resources */ | 145 | /* Beware of 32 bits resources */ |
| 150 | if ((pci_addr + size) > 0x100000000ull) | 146 | if (sizeof(resource_size_t) == sizeof(u32) && |
| 147 | (pci_addr + size) > 0x100000000ull) | ||
| 151 | res->end = 0xffffffff; | 148 | res->end = 0xffffffff; |
| 152 | else | 149 | else |
| 153 | #endif | ||
| 154 | res->end = res->start + size - 1; | 150 | res->end = res->start + size - 1; |
| 155 | break; | 151 | break; |
| 156 | } | 152 | } |
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index a0ffb5188c8c..b4e1875f9861 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
| @@ -925,7 +925,6 @@ config X86_PAE | |||
| 925 | def_bool n | 925 | def_bool n |
| 926 | prompt "PAE (Physical Address Extension) Support" | 926 | prompt "PAE (Physical Address Extension) Support" |
| 927 | depends on X86_32 && !HIGHMEM4G | 927 | depends on X86_32 && !HIGHMEM4G |
| 928 | select RESOURCES_64BIT | ||
| 929 | help | 928 | help |
| 930 | PAE is required for NX support, and furthermore enables | 929 | PAE is required for NX support, and furthermore enables |
| 931 | larger swapspace support for non-overcommit purposes. It | 930 | larger swapspace support for non-overcommit purposes. It |
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index 66e48aa2dd1b..477f4bb7e552 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c | |||
| @@ -1276,12 +1276,10 @@ void __init e820_reserve_resources(void) | |||
| 1276 | res = alloc_bootmem_low(sizeof(struct resource) * e820.nr_map); | 1276 | res = alloc_bootmem_low(sizeof(struct resource) * e820.nr_map); |
| 1277 | for (i = 0; i < e820.nr_map; i++) { | 1277 | for (i = 0; i < e820.nr_map; i++) { |
| 1278 | end = e820.map[i].addr + e820.map[i].size - 1; | 1278 | end = e820.map[i].addr + e820.map[i].size - 1; |
| 1279 | #ifndef CONFIG_RESOURCES_64BIT | 1279 | if (end != (resource_size_t)end) { |
| 1280 | if (end > 0x100000000ULL) { | ||
| 1281 | res++; | 1280 | res++; |
| 1282 | continue; | 1281 | continue; |
| 1283 | } | 1282 | } |
| 1284 | #endif | ||
| 1285 | res->name = e820_type_to_string(e820.map[i].type); | 1283 | res->name = e820_type_to_string(e820.map[i].type); |
| 1286 | res->start = e820.map[i].addr; | 1284 | res->start = e820.map[i].addr; |
| 1287 | res->end = end; | 1285 | res->end = end; |
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 1aad599816f7..f250a90ee450 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c | |||
| @@ -378,11 +378,10 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask, unsigned long | |||
| 378 | align = 0; | 378 | align = 0; |
| 379 | min_align = 0; | 379 | min_align = 0; |
| 380 | for (order = 0; order <= max_order; order++) { | 380 | for (order = 0; order <= max_order; order++) { |
| 381 | #ifdef CONFIG_RESOURCES_64BIT | 381 | resource_size_t align1 = 1; |
| 382 | resource_size_t align1 = 1ULL << (order + 20); | 382 | |
| 383 | #else | 383 | align1 <<= (order + 20); |
| 384 | resource_size_t align1 = 1U << (order + 20); | 384 | |
| 385 | #endif | ||
| 386 | if (!align) | 385 | if (!align) |
| 387 | min_align = align1; | 386 | min_align = align1; |
| 388 | else if (ALIGN(align + min_align, min_align) < align1) | 387 | else if (ALIGN(align + min_align, min_align) < align1) |
diff --git a/include/linux/types.h b/include/linux/types.h index 022c668496da..f24f7beb47df 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
| @@ -191,18 +191,14 @@ typedef __u32 __bitwise __wsum; | |||
| 191 | #ifdef __KERNEL__ | 191 | #ifdef __KERNEL__ |
| 192 | typedef unsigned __bitwise__ gfp_t; | 192 | typedef unsigned __bitwise__ gfp_t; |
| 193 | 193 | ||
| 194 | #ifdef CONFIG_RESOURCES_64BIT | ||
| 195 | typedef u64 resource_size_t; | ||
| 196 | #else | ||
| 197 | typedef u32 resource_size_t; | ||
| 198 | #endif | ||
| 199 | |||
| 200 | #ifdef CONFIG_PHYS_ADDR_T_64BIT | 194 | #ifdef CONFIG_PHYS_ADDR_T_64BIT |
| 201 | typedef u64 phys_addr_t; | 195 | typedef u64 phys_addr_t; |
| 202 | #else | 196 | #else |
| 203 | typedef u32 phys_addr_t; | 197 | typedef u32 phys_addr_t; |
| 204 | #endif | 198 | #endif |
| 205 | 199 | ||
| 200 | typedef phys_addr_t resource_size_t; | ||
| 201 | |||
| 206 | struct ustat { | 202 | struct ustat { |
| 207 | __kernel_daddr_t f_tfree; | 203 | __kernel_daddr_t f_tfree; |
| 208 | __kernel_ino_t f_tinode; | 204 | __kernel_ino_t f_tinode; |
