aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-12-01 00:33:51 -0500
committerH. Peter Anvin <hpa@zytor.com>2009-12-01 00:33:51 -0500
commitccef086454d4c97e7b722e9303390207d681cb4c (patch)
tree2dce23edf190368aab9afa7af6b4abec99930089
parentdd4377b02d9f028006beed1b7b1695ee5d1498b6 (diff)
x86, mm: Correct the implementation of is_untracked_pat_range()
The semantics the PAT code expect of is_untracked_pat_range() is "is this range completely contained inside the untracked region." This means that checkin 8a27138924f64d2f30c1022f909f74480046bc3f was technically wrong, because the implementation needlessly confusing. The sane interface is for it to take a semiclosed range like just about everything else (as evidenced by the sheer number of "- 1"'s removed by that patch) so change the actual implementation to match. Reported-by: Suresh Siddha <suresh.b.siddha@intel.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Jack Steiner <steiner@sgi.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com> LKML-Reference: <20091119202341.GA4420@sgi.com>
-rw-r--r--arch/x86/include/asm/e820.h6
-rw-r--r--arch/x86/kernel/apic/x2apic_uv_x.c2
2 files changed, 6 insertions, 2 deletions
diff --git a/arch/x86/include/asm/e820.h b/arch/x86/include/asm/e820.h
index 68b4e0ec1950..761249e396fe 100644
--- a/arch/x86/include/asm/e820.h
+++ b/arch/x86/include/asm/e820.h
@@ -133,9 +133,13 @@ extern void e820_reserve_resources_late(void);
133extern void setup_memory_map(void); 133extern void setup_memory_map(void);
134extern char *default_machine_specific_memory_setup(void); 134extern char *default_machine_specific_memory_setup(void);
135 135
136/*
137 * Returns true iff the specified range [s,e) is completely contained inside
138 * the ISA region.
139 */
136static inline bool is_ISA_range(u64 s, u64 e) 140static inline bool is_ISA_range(u64 s, u64 e)
137{ 141{
138 return s >= ISA_START_ADDRESS && e < ISA_END_ADDRESS; 142 return s >= ISA_START_ADDRESS && e <= ISA_END_ADDRESS;
139} 143}
140 144
141#endif /* __KERNEL__ */ 145#endif /* __KERNEL__ */
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index 597a47b1cec6..1e09417c992f 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -39,7 +39,7 @@ static u64 gru_start_paddr, gru_end_paddr;
39 39
40static inline bool is_GRU_range(u64 start, u64 end) 40static inline bool is_GRU_range(u64 start, u64 end)
41{ 41{
42 return start >= gru_start_paddr && end < gru_end_paddr; 42 return start >= gru_start_paddr && end <= gru_end_paddr;
43} 43}
44 44
45static bool uv_is_untracked_pat_range(u64 start, u64 end) 45static bool uv_is_untracked_pat_range(u64 start, u64 end)