kernel-ark/arch/x86/platform
Matt Fleming 6d3e32e63f x86, efi: Make efi_call_phys_{prelog,epilog} CONFIG_RELOCATABLE-aware
efi_call_phys_prelog() sets up a 1:1 mapping of the physical address
range in swapper_pg_dir. Instead of replacing then restoring entries
in swapper_pg_dir we should be using initial_page_table which already
contains the 1:1 mapping.

It's safe to blindly switch back to swapper_pg_dir in the epilog
because the physical EFI routines are only called before
efi_enter_virtual_mode(), e.g. before any user processes have been
forked. Therefore, we don't need to track which pgd was in %cr3 when
we entered the prelog.

The previous code actually contained a bug because it assumed that the
kernel was loaded at a physical address within the first 8MB of ram,
usually at 0x100000. However, this isn't the case with a
CONFIG_RELOCATABLE=y kernel which could have been loaded anywhere in
the physical address space.

Also delete the ancient (and bogus) comments about the page table
being restored after the lock is released. There is no locking.

Cc: Matthew Garrett <mjg@redhat.com>
Cc: Darrent Hart <dvhart@linux.intel.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Link: http://lkml.kernel.org/r/1323346250.3894.74.camel@mfleming-mobl1.ger.corp.intel.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2011-12-09 16:39:11 -08:00
..
ce4100 ce4100: fix a build error 2011-11-11 23:58:58 -02:00
efi x86, efi: Make efi_call_phys_{prelog,epilog} CONFIG_RELOCATABLE-aware 2011-12-09 16:39:11 -08:00
geode x86: geode: New PCEngines Alix system driver 2011-09-21 11:19:42 +02:00
iris x86: platform: Move iris to x86/platform where it belongs 2010-11-20 10:37:05 +01:00
mrst x86, mrst: Change the pmic_gpio device type to IPC 2011-12-05 12:42:15 +01:00
olpc x86: Fix files explicitly requiring export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:30:35 -04:00
scx200
sfi Merge branch 'linus' into x86/apic-cleanups 2011-01-07 14:14:15 +01:00
uv x86: Fix files explicitly requiring export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:30:35 -04:00
visws x86: visws: Fixup irq overhaul fallout 2011-04-04 16:51:15 +02:00
Makefile x86: geode: New PCEngines Alix system driver 2011-09-21 11:19:42 +02:00