mirror of https://gitee.com/openkylin/linux.git
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Thomas Gleixner: "A small set of x86 fixes: - prevent the kernel from using the EFI reboot method when EFI is disabled. - two patches addressing clang issues" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/boot: Disable the address-of-packed-member compiler warning x86/efi: Fix reboot_mode when EFI runtime services are disabled x86/boot: #undef memcpy() et al in string.c
This commit is contained in:
commit
f137e0b0c5
|
@ -34,6 +34,7 @@ KBUILD_CFLAGS += $(cflags-y)
|
||||||
KBUILD_CFLAGS += -mno-mmx -mno-sse
|
KBUILD_CFLAGS += -mno-mmx -mno-sse
|
||||||
KBUILD_CFLAGS += $(call cc-option,-ffreestanding)
|
KBUILD_CFLAGS += $(call cc-option,-ffreestanding)
|
||||||
KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector)
|
KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector)
|
||||||
|
KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
|
||||||
|
|
||||||
KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
|
KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
|
||||||
GCOV_PROFILE := n
|
GCOV_PROFILE := n
|
||||||
|
|
|
@ -16,6 +16,15 @@
|
||||||
#include "ctype.h"
|
#include "ctype.h"
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Undef these macros so that the functions that we provide
|
||||||
|
* here will have the correct names regardless of how string.h
|
||||||
|
* may have chosen to #define them.
|
||||||
|
*/
|
||||||
|
#undef memcpy
|
||||||
|
#undef memset
|
||||||
|
#undef memcmp
|
||||||
|
|
||||||
int memcmp(const void *s1, const void *s2, size_t len)
|
int memcmp(const void *s1, const void *s2, size_t len)
|
||||||
{
|
{
|
||||||
bool diff;
|
bool diff;
|
||||||
|
|
|
@ -471,12 +471,12 @@ static int __init reboot_init(void)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The DMI quirks table takes precedence. If no quirks entry
|
* The DMI quirks table takes precedence. If no quirks entry
|
||||||
* matches and the ACPI Hardware Reduced bit is set, force EFI
|
* matches and the ACPI Hardware Reduced bit is set and EFI
|
||||||
* reboot.
|
* runtime services are enabled, force EFI reboot.
|
||||||
*/
|
*/
|
||||||
rv = dmi_check_system(reboot_dmi_table);
|
rv = dmi_check_system(reboot_dmi_table);
|
||||||
|
|
||||||
if (!rv && efi_reboot_required())
|
if (!rv && efi_reboot_required() && !efi_runtime_disabled())
|
||||||
reboot_type = BOOT_EFI;
|
reboot_type = BOOT_EFI;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue