diff options
author | Jan Beulich <JBeulich@suse.com> | 2011-09-15 03:52:40 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-09-15 04:39:46 -0400 |
commit | 61cca2fab7ecba18f9b9680cd736ef5fa82ad3b1 (patch) | |
tree | 9a7fe7390778f20bfadcd5ecb9679785b5380cf7 /arch | |
parent | 773659483685d652970583384a0294948e57f8b3 (diff) |
xen/i386: follow-up to "replace order-based range checking of M2P table by linear one"
The numbers obtained from the hypervisor really can't ever lead to an
overflow here, only the original calculation going through the order
of the range could have. This avoids the (as Jeremy points outs)
somewhat ugly NULL-based calculation here.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/xen/mmu.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 24abc1f50dc5..a3872f7632e8 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -1721,10 +1721,8 @@ void __init xen_setup_machphys_mapping(void) | |||
1721 | machine_to_phys_nr = MACH2PHYS_NR_ENTRIES; | 1721 | machine_to_phys_nr = MACH2PHYS_NR_ENTRIES; |
1722 | } | 1722 | } |
1723 | #ifdef CONFIG_X86_32 | 1723 | #ifdef CONFIG_X86_32 |
1724 | if ((machine_to_phys_mapping + machine_to_phys_nr) | 1724 | WARN_ON((machine_to_phys_mapping + (machine_to_phys_nr - 1)) |
1725 | < machine_to_phys_mapping) | 1725 | < machine_to_phys_mapping); |
1726 | machine_to_phys_nr = (unsigned long *)NULL | ||
1727 | - machine_to_phys_mapping; | ||
1728 | #endif | 1726 | #endif |
1729 | } | 1727 | } |
1730 | 1728 | ||