Commit 682f7bba authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'x86_cleanups_for_v6.4_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 cleanups from Borislav Petkov:

 - Unify duplicated __pa() and __va() definitions

 - Simplify sysctl tables registration

 - Remove unused symbols

 - Correct function name in comment

* tag 'x86_cleanups_for_v6.4_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/boot: Centralize __pa()/__va() definitions
  x86: Simplify one-level sysctl registration for itmt_kern_table
  x86: Simplify one-level sysctl registration for abi_table2
  x86/platform/intel-mid: Remove unused definitions from intel-mid.h
  x86/uaccess: Remove memcpy_page_flushcache()
  x86/entry: Change stale function name in comment to error_return()
parents 33afd4b7 5462ade6
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -8,14 +8,6 @@
 * Copyright (C)      2016  Kees Cook
 */

/*
 * Since we're dealing with identity mappings, physical and virtual
 * addresses are the same, so override these defines which are ultimately
 * used by the headers in misc.h.
 */
#define __pa(x)  ((unsigned long)(x))
#define __va(x)  ((void *)((unsigned long)(x)))

/* No PAGE_TABLE_ISOLATION support needed either: */
#undef CONFIG_PAGE_TABLE_ISOLATION

+9 −0
Original line number Diff line number Diff line
@@ -19,6 +19,15 @@
/* cpu_feature_enabled() cannot be used this early */
#define USE_EARLY_PGTABLE_L5

/*
 * Boot stub deals with identity mappings, physical and virtual addresses are
 * the same, so override these defines.
 *
 * <asm/page.h> will not define them if they are already defined.
 */
#define __pa(x)  ((unsigned long)(x))
#define __va(x)  ((void *)((unsigned long)(x)))

#include <linux/linkage.h>
#include <linux/screen_info.h>
#include <linux/elf.h>
+0 −2
Original line number Diff line number Diff line
@@ -104,9 +104,7 @@ static enum es_result vc_read_mem(struct es_em_ctxt *ctxt,
}

#undef __init
#undef __pa
#define __init
#define __pa(x)	((unsigned long)(x))

#define __BOOT_COMPRESSED

+1 −1
Original line number Diff line number Diff line
@@ -1027,7 +1027,7 @@ SYM_CODE_START_LOCAL(paranoid_exit)
	 *
	 * NB to anyone to try to optimize this code: this code does
	 * not execute at all for exceptions from user mode. Those
	 * exceptions go through error_exit instead.
	 * exceptions go through error_return instead.
	 */
	RESTORE_CR3	scratch_reg=%rax save_reg=%r14

+1 −10
Original line number Diff line number Diff line
@@ -70,18 +70,9 @@ static struct ctl_table abi_table2[] = {
	{}
};

static struct ctl_table abi_root_table2[] = {
	{
		.procname = "abi",
		.mode = 0555,
		.child = abi_table2
	},
	{}
};

static __init int ia32_binfmt_init(void)
{
	register_sysctl_table(abi_root_table2);
	register_sysctl("abi", abi_table2);
	return 0;
}
__initcall(ia32_binfmt_init);
Loading