diff options
author | Yinghai Lu <yinghai@kernel.org> | 2010-02-10 04:20:08 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-02-10 20:47:17 -0500 |
commit | b74fd238a9cf39a81d94152f375b756bf795b4af (patch) | |
tree | bc079edf756701dd64f210791a03faee25e58404 /arch/x86/pci/bus_numa.c | |
parent | 27811d8cabe56e0c3622251b049086f49face4ff (diff) |
x86/pci: Use resource_size_t in update_res
Prepare to enable 32bit intel and amd bus.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <1265793639-15071-5-git-send-email-yinghai@kernel.org>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/pci/bus_numa.c')
-rw-r--r-- | arch/x86/pci/bus_numa.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/x86/pci/bus_numa.c b/arch/x86/pci/bus_numa.c index f939d603adfa..30f65cecd65f 100644 --- a/arch/x86/pci/bus_numa.c +++ b/arch/x86/pci/bus_numa.c | |||
@@ -51,8 +51,8 @@ void x86_pci_root_bus_res_quirks(struct pci_bus *b) | |||
51 | } | 51 | } |
52 | } | 52 | } |
53 | 53 | ||
54 | void __devinit update_res(struct pci_root_info *info, size_t start, | 54 | void __devinit update_res(struct pci_root_info *info, resource_size_t start, |
55 | size_t end, unsigned long flags, int merge) | 55 | resource_size_t end, unsigned long flags, int merge) |
56 | { | 56 | { |
57 | int i; | 57 | int i; |
58 | struct resource *res; | 58 | struct resource *res; |
@@ -65,20 +65,20 @@ void __devinit update_res(struct pci_root_info *info, size_t start, | |||
65 | 65 | ||
66 | /* try to merge it with old one */ | 66 | /* try to merge it with old one */ |
67 | for (i = 0; i < info->res_num; i++) { | 67 | for (i = 0; i < info->res_num; i++) { |
68 | size_t final_start, final_end; | 68 | resource_size_t final_start, final_end; |
69 | size_t common_start, common_end; | 69 | resource_size_t common_start, common_end; |
70 | 70 | ||
71 | res = &info->res[i]; | 71 | res = &info->res[i]; |
72 | if (res->flags != flags) | 72 | if (res->flags != flags) |
73 | continue; | 73 | continue; |
74 | 74 | ||
75 | common_start = max((size_t)res->start, start); | 75 | common_start = max(res->start, start); |
76 | common_end = min((size_t)res->end, end); | 76 | common_end = min(res->end, end); |
77 | if (common_start > common_end + 1) | 77 | if (common_start > common_end + 1) |
78 | continue; | 78 | continue; |
79 | 79 | ||
80 | final_start = min((size_t)res->start, start); | 80 | final_start = min(res->start, start); |
81 | final_end = max((size_t)res->end, end); | 81 | final_end = max(res->end, end); |
82 | 82 | ||
83 | res->start = final_start; | 83 | res->start = final_start; |
84 | res->end = final_end; | 84 | res->end = final_end; |