/* * Copyright 2016 Chandan Kumar, IBM Corporation. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ #include #include #include #include "../../util/unwind.h" #include "../../util/debug.h" int libunwind__arch_reg_id(int regnum) { switch (regnum) { case UNW_PPC64_R0: return PERF_REG_POWERPC_R0; case UNW_PPC64_R1: return PERF_REG_POWERPC_R1; case UNW_PPC64_R2: return PERF_REG_POWERPC_R2; case UNW_PPC64_R3: return PERF_REG_POWERPC_R3; case UNW_PPC64_R4: return PERF_REG_POWERPC_R4; case UNW_PPC64_R5: return PERF_REG_POWERPC_R5; case UNW_PPC64_R6: return PERF_REG_POWERPC_R6; case UNW_PPC64_R7: return PERF_REG_POWERPC_R7; case UNW_PPC64_R8: return PERF_REG_POWERPC_R8; case UNW_PPC64_R9: return PERF_REG_POWERPC_R9; case UNW_PPC64_R10: return PERF_REG_POWERPC_R10; case UNW_PPC64_R11: return PERF_REG_POWERPC_R11; case UNW_PPC64_R12: return PERF_REG_POWERPC_R12; case UNW_PPC64_R13: return PERF_REG_POWERPC_R13; case UNW_PPC64_R14: return PERF_REG_POWERPC_R14; case UNW_PPC64_R15: return PERF_REG_POWERPC_R15; case UNW_PPC64_R16: return PERF_REG_POWERPC_R16; case UNW_PPC64_R17: return PERF_REG_POWERPC_R17; case UNW_PPC64_R18: return PERF_REG_POWERPC_R18; case UNW_PPC64_R19: return PERF_REG_POWERPC_R19; case UNW_PPC64_R20: return PERF_REG_POWERPC_R20; case UNW_PPC64_R21: return PERF_REG_POWERPC_R21; case UNW_PPC64_R22: return PERF_REG_POWERPC_R22; case UNW_PPC64_R23: return PERF_REG_POWERPC_R23; case UNW_PPC64_R24: return PERF_REG_POWERPC_R24; case UNW_PPC64_R25: return PERF_REG_POWERPC_R25; case UNW_PPC64_R26: return PERF_REG_POWERPC_R26; case UNW_PPC64_R27: return PERF_REG_POWERPC_R27; case UNW_PPC64_R28: return PERF_REG_POWERPC_R28; case UNW_PPC64_R29: return PERF_REG_POWERPC_R29; case UNW_PPC64_R30: return PERF_REG_POWERPC_R30; case UNW_PPC64_R31: return PERF_REG_POWERPC_R31; case UNW_PPC64_LR: return PERF_REG_POWERPC_LINK; case UNW_PPC64_CTR: return PERF_REG_POWERPC_CTR; case UNW_PPC64_XER: return PERF_REG_POWERPC_XER; case UNW_PPC64_NIP: return PERF_REG_POWERPC_NIP; default: pr_err("unwind: invalid reg id %d\n", regnum); return -EINVAL; } return -EINVAL; } e='id' value='bf29bddf0417a4783da3b24e8c9e017ac649326f'/>
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2017-01-27 22:25:52 +0000
committerIngo Molnar <mingo@kernel.org>2017-01-28 09:18:56 +0100
commitbf29bddf0417a4783da3b24e8c9e017ac649326f (patch)
tree54a05a4883b73f80e4e1d8c4b15750aa01c39932 /kernel/tsacct.c
parent883af14e67e8b8702b5560aa64c888c0cd0bd66c (diff)
x86/efi: Always map the first physical page into the EFI pagetables
Commit: 129766708 ("x86/efi: Only map RAM into EFI page tables if in mixed-mode") stopped creating 1:1 mappings for all RAM, when running in native 64-bit mode. It turns out though that there are 64-bit EFI implementations in the wild (this particular problem has been reported on a Lenovo Yoga 710-11IKB), which still make use of the first physical page for their own private use, even though they explicitly mark it EFI_CONVENTIONAL_MEMORY in the memory map. In case there is no mapping for this particular frame in the EFI pagetables, as soon as firmware tries to make use of it, a triple fault occurs and the system reboots (in case of the Yoga 710-11IKB this is very early during bootup). Fix that by always mapping the first page of physical memory into the EFI pagetables. We're free to hand this page to the BIOS, as trim_bios_range() will reserve the first page and isolate it away from memory allocators anyway. Note that just reverting 129766708 alone is not enough on v4.9-rc1+ to fix the regression on affected hardware, as this commit: ab72a27da ("x86/efi: Consolidate region mapping logic") later made the first physical frame not to be mapped anyway. Reported-by: Hanka Pavlikova <hanka@ucw.cz> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Borislav Petkov <bp@suse.de> Cc: Laura Abbott <labbott@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vojtech Pavlik <vojtech@ucw.cz> Cc: Waiman Long <waiman.long@hpe.com> Cc: linux-efi@vger.kernel.org Cc: stable@kernel.org # v4.8+ Fixes: 129766708 ("x86/efi: Only map RAM into EFI page tables if in mixed-mode") Link: http://lkml.kernel.org/r/20170127222552.22336-1-matt@codeblueprint.co.uk [ Tidied up the changelog and the comment. ] Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/tsacct.c')