diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-09-11 04:31:50 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-14 11:24:27 -0400 |
commit | 8308c54d7e312f7a03e2ce2057d0837e6fe3843f (patch) | |
tree | 452b32a3d2182c4d150d632f243e31f16b2ac0ce /arch/powerpc | |
parent | 947d0496cf3e12ebfa70b3eaf561c25403247ce9 (diff) |
generic: redefine resource_size_t as phys_addr_t
There's no good reason why a resource_size_t shouldn't just be a
physical address, so simply redefine it in terms of phys_addr_t.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/Kconfig.cputype | 1 | ||||
-rw-r--r-- | arch/powerpc/sysdev/ppc4xx_pci.c | 16 |
2 files changed, 6 insertions, 11 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 | } |