1
linux/arch/x86/include/asm
Liang Li e67a807f3d x86: Fix 'reservetop=' functionality
When specifying the 'reservetop=0xbadc0de' kernel parameter,
the kernel will stop booting due to a early_ioremap bug that
relates to commit 8827247ff.

The root cause of boot failure problem is the value of
'slot_virt[i]' was initialized in setup_arch->early_ioremap_init().
But later in setup_arch, the function 'parse_early_param' will
modify 'FIXADDR_TOP' when 'reservetop=0xbadc0de' being specified.

The simplest fix might be use __fix_to_virt(idx0) to get updated
value of 'FIXADDR_TOP' in '__early_ioremap' instead of reference
old value from slot_virt[slot] directly.

Changelog since v0:

-v1: When reservetop being handled then FIXADDR_TOP get
     adjusted, Hence check prev_map then re-initialize slot_virt and
     PMD based on new FIXADDR_TOP.

-v2: place fixup_early_ioremap hence call early_ioremap_init in
     reserve_top_address  to re-initialize slot_virt and
     corresponding PMD when parse_reservertop

-v3: move fixup_early_ioremap out of reserve_top_address to make
     sure other clients of reserve_top_address like xen/lguest won't
     broken

Signed-off-by: Liang Li <liang.li@windriver.com>
Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Wang Chen <wangchen@cn.fujitsu.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <1272621711-8683-1-git-send-email-liang.li@windriver.com>
[ fixed three small cleanliness details in fixup_early_ioremap() ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-04-30 12:19:53 +02:00
..
uv Merge branch 'x86-uv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-02-28 11:00:55 -08:00
visws x86: Move pci init function to x86_init 2010-02-19 16:12:29 -08:00
xen
a.out-core.h
a.out.h
acpi.h ACPI: processor: finish unifying arch_acpi_processor_init_pdc() 2009-12-22 03:24:13 -05:00
aes.h
agp.h
alternative-asm.h
alternative.h Merge branch 'perf-probes-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-03-05 10:50:22 -08:00
amd_iommu_proto.h x86/amd-iommu: Fix IOMMU-API initialization for iommu=pt 2010-01-22 17:44:35 +01:00
amd_iommu_types.h x86/amd-iommu: warn when issuing command to uninitialized cmd buffer 2010-04-07 11:51:15 +02:00
amd_iommu.h
apb_timer.h x86, apbt: Moorestown APB system timer driver 2010-02-24 11:01:21 -08:00
apic.h
apicdef.h
apm.h
asm-offsets.h kbuild: move asm-offsets.h to include/generated 2009-12-12 13:08:14 +01:00
asm.h
atomic64_32.h x86: Split atomic64_t functions into seperate headers 2010-01-07 11:47:31 -08:00
atomic64_64.h x86: Split atomic64_t functions into seperate headers 2010-01-07 11:47:31 -08:00
atomic.h x86: Mark atomic irq ops raw for 32bit legacy 2010-02-16 17:19:11 +01:00
auxvec.h
bios_ebda.h
bitops.h
bitsperlong.h
boot.h
bootparam.h
bug.h x86: Convert BUG() to use unreachable() 2009-12-05 09:10:12 -08:00
bugs.h
byteorder.h
cache.h
cacheflush.h Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-12-08 13:27:33 -08:00
calgary.h
calling.h
checksum_32.h
checksum_64.h
checksum.h
cmpxchg_32.h Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-12-05 15:32:03 -08:00
cmpxchg_64.h
cmpxchg.h
compat.h improve sys_newuname() for compat architectures 2010-03-12 15:52:32 -08:00
cpu.h
cpufeature.h x86, cpu: Print AMD virtualization features in /proc/cpuinfo 2010-02-13 15:04:40 -08:00
cpumask.h
cputime.h
current.h
debugreg.h x86/debug: Clear reserved bits of DR6 in do_debug() 2010-01-29 02:26:10 +01:00
delay.h
desc_defs.h tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
desc.h
device.h
div64.h
dma-mapping.h dma-mapping: fix off-by-one error in dma_capable() 2009-12-16 07:20:12 -08:00
dma.h
dmi.h
ds.h
dwarf2.h
e820.h core: Move early_res from arch/x86 to kernel/ 2010-02-16 21:43:39 -08:00
edac.h
efi.h
elf.h x86: ELF_PLAT_INIT() shouldn't worry about TIF_IA32 2010-02-16 08:51:49 -08:00
emergency-restart.h
entry_arch.h
errno.h
fb.h x86-64: Allow fbdev primary video code 2010-02-16 21:22:26 -08:00
fcntl.h
fixmap.h x86: Fix placement of FIX_OHCI1394_BASE 2010-03-16 11:16:27 +01:00
floppy.h
frame.h
ftrace.h
futex.h
gart.h
genapic.h
geode.h cs5535: drop the Geode-specific MFGPT/GPIO code 2009-12-15 08:53:28 -08:00
gpio.h
hardirq.h Merge branch 'x86-uv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-12-08 13:38:21 -08:00
highmem.h x86, paravirt: Remove kmap_atomic_pte paravirt op. 2010-02-27 14:41:35 -08:00
hpet.h x86: Disable HPET MSI on ATI SB700/SB800 2010-01-23 06:21:58 +01:00
hugetlb.h
hw_breakpoint.h x86/hw-breakpoints: Remove the name field 2010-02-27 17:24:15 +01:00
hw_irq.h x86: Handle legacy PIC interrupts on all the cpu's 2010-03-16 06:36:35 +01:00
hypertransport.h
hyperv.h KVM: Add HYPER-V header file 2010-03-01 12:35:57 -03:00
hypervisor.h
i387.h x86, ptrace: regset extensions to support xstate 2010-02-11 15:08:17 -08:00
i8253.h
i8259.h Merge remote branch 'origin/x86/apic' into x86/mrst 2010-02-22 16:25:18 -08:00
ia32_unistd.h
ia32.h
idle.h
inat_types.h
inat.h
init.h
insn.h
inst.h
io_apic.h x86, ioapic: Add dummy ioapic functions 2010-02-23 23:14:07 -08:00
io.h x86: Fix 'reservetop=' functionality 2010-04-30 12:19:53 +02:00
ioctl.h
ioctls.h
iomap.h
iommu.h
ipcbuf.h
ipi.h
irq_regs.h
irq_remapping.h
irq_vectors.h x86, irq: Use 0x20 for the IRQ_MOVE_CLEANUP_VECTOR instead of 0x1f 2010-01-18 10:59:59 -08:00
irq.h x86, legacy_irq: Remove left over nr_legacy_irqs 2010-02-24 11:01:34 -08:00
irqflags.h
ist.h
k8.h
Kbuild KVM: export <asm/hyperv.h> 2010-03-01 12:36:01 -03:00
kdebug.h
kexec.h
kgdb.h
kmap_types.h
kmemcheck.h
kprobes.h kprobes/x86: Support kprobes jump optimization on x86 2010-02-25 17:49:26 +01:00
kvm_emulate.h KVM: x86 emulator: fix memory access during x86 emulation 2010-03-01 12:36:11 -03:00
kvm_host.h KVM: Fix segment descriptor loading 2010-03-01 12:36:14 -03:00
kvm_para.h KVM: Implement bare minimum of HYPER-V MSRs 2010-03-01 12:35:57 -03:00
kvm.h KVM: x86: Extend KVM_SET_VCPU_EVENTS with selective updates 2009-12-27 13:36:33 -02:00
ldt.h
lguest_hcall.h lguest: stop using KVM hypercall mechanism 2010-04-14 21:43:56 +09:30
lguest.h
linkage.h
local.h local_t: Remove cpu_local_xx macros 2010-01-05 15:34:49 +09:00
mach_timer.h
mach_traps.h
math_emu.h
mc146818rtc.h
mca_dma.h
mca.h
mce.h x86: mce.h: Fix warning in header checks 2010-01-13 10:41:22 +01:00
microcode.h Revert "x86: ucode-amd: Load ucode-patches once ..." 2010-01-23 06:21:59 +01:00
mman.h
mmconfig.h
mmu_context.h
mmu.h
mmx.h
mmzone_32.h tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
mmzone_64.h x86, numa: Add fixed node size option for numa emulation 2010-02-15 14:34:10 -08:00
mmzone.h
module.h
mpspec_def.h
mpspec.h Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-12-08 13:27:33 -08:00
mrst.h x86, mrst: Add vrtc platform data setup code 2010-02-23 23:15:19 -08:00
msgbuf.h
msidef.h
msr-index.h x86, amd: Restrict usage of c1e_idle() 2010-03-19 14:43:36 -07:00
msr.h x86, msr: msrs_alloc/free for CONFIG_SMP=n 2009-12-16 15:36:32 -08:00
mtrr.h
mutex_32.h
mutex_64.h
mutex.h
nmi.h x86, perfctr: Remove unused func avail_to_resrv_perfctr_nmi() 2009-12-28 09:36:46 +01:00
nops.h
numa_32.h
numa_64.h x86, numa: Add fixed node size option for numa emulation 2010-02-15 14:34:10 -08:00
numa.h
numaq.h Merge branch 'x86-mrst-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-03-07 15:59:39 -08:00
olpc.h x86, olpc: Use pci subarch init for OLPC 2010-02-25 19:26:23 -08:00
page_32_types.h
page_32.h
page_64_types.h
page_64.h
page_types.h x86: Use the generic page_is_ram() 2010-02-01 16:58:17 -08:00
page.h
param.h
paravirt_types.h x86, paravirt: Remove kmap_atomic_pte paravirt op. 2010-02-27 14:41:35 -08:00
paravirt.h x86, paravirt: Remove kmap_atomic_pte paravirt op. 2010-02-27 14:41:35 -08:00
parport.h
pat.h
pci_64.h x86: Only call dma32_reserve_bootmem 64bit !CONFIG_NUMA 2010-02-10 17:47:18 -08:00
pci_x86.h Merge branch 'x86-mrst-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-03-07 15:59:39 -08:00
pci-direct.h
pci-functions.h
pci.h pci-dma: add linux/pci-dma.h to linux/pci.h 2010-03-12 15:52:42 -08:00
percpu.h percpu, x86: Generic inc / dec percpu instructions 2010-01-05 15:34:50 +09:00
perf_event.h perf_events, x86: Fixup fixed counter constraints 2010-03-02 15:06:47 +01:00
pgalloc.h x86, mm: Allow highmem user page tables to be disabled at boot time 2010-02-25 10:28:19 +01:00
pgtable_32_types.h
pgtable_32.h x86: don't include slab.h from arch/x86/include/asm/pgtable_32.h 2010-03-30 22:02:21 +09:00
pgtable_64_types.h
pgtable_64.h MM: Pass a PTE pointer to update_mmu_cache() rather than the PTE itself 2010-02-20 16:41:46 +00:00
pgtable_types.h
pgtable-2level_types.h
pgtable-2level.h
pgtable-3level_types.h
pgtable-3level.h
pgtable.h
poll.h
posix_types_32.h
posix_types_64.h
posix_types.h
prctl.h
processor-cyrix.h
processor-flags.h
processor.h hw-breakpoint: Keep track of dr7 local enable bits 2010-02-19 19:06:48 +01:00
proto.h Move round_up/down to kernel.h 2010-02-12 09:42:39 -08:00
ptrace-abi.h
ptrace.h ptrace: move user_enable_single_step & co prototypes to linux/ptrace.h 2010-03-12 15:52:38 -08:00
pvclock-abi.h
pvclock.h
rdc321x_defs.h
reboot_fixups.h
reboot.h
required-features.h
resource.h
resume-trace.h
rio.h
rtc.h
rwlock.h
rwsem.h x86-64, rwsem: Avoid store forwarding hazard in __downgrade_write 2010-02-13 13:37:56 -08:00
scatterlist.h
seccomp_32.h
seccomp_64.h
seccomp.h
sections.h
segment.h
sembuf.h
serial.h
setup_arch.h
setup.h x86: Move pci init function to x86_init 2010-02-19 16:12:29 -08:00
shmbuf.h
shmparam.h
sigcontext32.h
sigcontext.h tree-wide: fix misspelling of "definition" in comments 2009-12-04 23:41:47 +01:00
sigframe.h
siginfo.h
signal.h
smp.h x86, lib: Add wbinvd smp helpers 2010-01-22 16:05:42 -08:00
smpboot_hooks.h
socket.h
sockios.h
sparsemem.h
spinlock_types.h locking: Convert raw_rwlock to arch_rwlock 2009-12-14 23:55:32 +01:00
spinlock.h locking: Convert raw_rwlock functions to arch_rwlock 2009-12-14 23:55:32 +01:00
srat.h
stackprotector.h
stacktrace.h perf: Drop useless check for ignored frame 2010-01-13 10:09:08 +01:00
stat.h
statfs.h
string_32.h
string_64.h
string.h
suspend_32.h
suspend_64.h
suspend.h
svm.h KVM: SVM: Fix SVM_CR0_SELECTIVE_MASK 2010-03-01 12:35:51 -03:00
swab.h
swiotlb.h x86: Split swiotlb initialization into two stages 2009-12-15 13:01:57 +01:00
sync_bitops.h
sys_ia32.h Add generic sys_olduname() 2010-03-12 15:52:32 -08:00
syscall.h tracing: Unify arch_syscall_addr() implementations 2010-02-17 13:07:21 +01:00
syscalls.h Add generic sys_olduname() 2010-03-12 15:52:32 -08:00
system_64.h
system.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2010-03-03 07:34:18 -08:00
tce.h
termbits.h
termios.h
thread_info.h x86: get rid of the insane TIF_ABI_PENDING bit 2010-01-29 08:22:01 -08:00
time.h
timer.h
timex.h
tlb.h
tlbflush.h
topology.h hugetlb: add generic definition of NUMA_NO_NODE 2009-12-15 08:53:12 -08:00
trampoline.h x86: Use find_e820() instead of hard coded trampoline address 2009-12-11 09:28:22 +01:00
traps.h
tsc.h
types.h
uaccess_32.h x86: copy_from_user() should not return -EFAULT 2010-01-05 13:45:06 -08:00
uaccess_64.h Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-02-28 10:35:09 -08:00
uaccess.h
ucontext.h
unaligned.h
unistd_32.h Add generic sys_olduname() 2010-03-12 15:52:32 -08:00
unistd_64.h Add generic sys_olduname() 2010-03-12 15:52:32 -08:00
unistd.h
user32.h
user_32.h
user_64.h
user.h x86, ptrace: regset extensions to support xstate 2010-02-11 15:08:17 -08:00
vdso.h
vga.h
vgtod.h
virtext.h
vm86.h
vmi_time.h
vmi.h
vmware.h
vmx.h KVM: VMX: Rename VMX_EPT_IGMT_BIT to VMX_EPT_IPAT_BIT 2010-03-01 12:36:09 -03:00
vsyscall.h
x86_init.h Merge branch 'x86-mrst-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-03-07 15:59:39 -08:00
xcr.h
xor_32.h
xor_64.h
xor.h
xsave.h x86, ptrace: regset extensions to support xstate 2010-02-11 15:08:17 -08:00