Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 915ee0da authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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 pile of x86 updates:

   - Prevent exceeding he valid physical address space in the /dev/mem
     limit checks.

   - Move all header content inside the header guard to prevent compile
     failures.

   - Fix the bogus __percpu annotation in this_cpu_has() which makes
     sparse very noisy.

   - Disable switch jump tables completely when retpolines are enabled.

   - Prevent leaking the trampoline address"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/realmode: Make set_real_mode_mem() static inline
  x86/cpufeature: Fix __percpu annotation in this_cpu_has()
  x86/mm: Don't exceed the valid physical address space
  x86/retpolines: Disable switch jump tables when retpolines are enabled
  x86/realmode: Don't leak the trampoline kernel address
  x86/boot: Fix incorrect ifdeffery scope
  x86/resctrl: Remove unused variable
parents 590627f7 f560bd19
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -219,8 +219,12 @@ ifdef CONFIG_RETPOLINE
  # Additionally, avoid generating expensive indirect jumps which
  # Additionally, avoid generating expensive indirect jumps which
  # are subject to retpolines for small number of switch cases.
  # are subject to retpolines for small number of switch cases.
  # clang turns off jump table generation by default when under
  # clang turns off jump table generation by default when under
  # retpoline builds, however, gcc does not for x86.
  # retpoline builds, however, gcc does not for x86. This has
  KBUILD_CFLAGS += $(call cc-option,--param=case-values-threshold=20)
  # only been fixed starting from gcc stable version 8.4.0 and
  # onwards, but not for older ones. See gcc bug #86952.
  ifndef CONFIG_CC_IS_CLANG
    KBUILD_CFLAGS += $(call cc-option,-fno-jump-tables)
  endif
endif
endif


archscripts: scripts_basic
archscripts: scripts_basic
+2 −2
Original line number Original line Diff line number Diff line
@@ -120,8 +120,6 @@ static inline void console_init(void)


void set_sev_encryption_mask(void);
void set_sev_encryption_mask(void);


#endif

/* acpi.c */
/* acpi.c */
#ifdef CONFIG_ACPI
#ifdef CONFIG_ACPI
acpi_physical_address get_rsdp_addr(void);
acpi_physical_address get_rsdp_addr(void);
@@ -135,3 +133,5 @@ int count_immovable_mem_regions(void);
#else
#else
static inline int count_immovable_mem_regions(void) { return 0; }
static inline int count_immovable_mem_regions(void) { return 0; }
#endif
#endif

#endif /* BOOT_COMPRESSED_MISC_H */
+3 −2
Original line number Original line Diff line number Diff line
@@ -113,7 +113,8 @@ extern const char * const x86_bug_flags[NBUGINTS*32];


#define this_cpu_has(bit)						\
#define this_cpu_has(bit)						\
	(__builtin_constant_p(bit) && REQUIRED_MASK_BIT_SET(bit) ? 1 :	\
	(__builtin_constant_p(bit) && REQUIRED_MASK_BIT_SET(bit) ? 1 :	\
	 x86_this_cpu_test_bit(bit, (unsigned long *)&cpu_info.x86_capability))
	 x86_this_cpu_test_bit(bit,					\
		(unsigned long __percpu *)&cpu_info.x86_capability))


/*
/*
 * This macro is for detection of features which need kernel
 * This macro is for detection of features which need kernel
+5 −1
Original line number Original line Diff line number Diff line
@@ -77,7 +77,11 @@ static inline size_t real_mode_size_needed(void)
	return ALIGN(real_mode_blob_end - real_mode_blob, PAGE_SIZE);
	return ALIGN(real_mode_blob_end - real_mode_blob, PAGE_SIZE);
}
}


void set_real_mode_mem(phys_addr_t mem, size_t size);
static inline void set_real_mode_mem(phys_addr_t mem)
{
	real_mode_header = (struct real_mode_header *) __va(mem);
}

void reserve_real_mode(void);
void reserve_real_mode(void);


#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLY__ */
+0 −3
Original line number Original line Diff line number Diff line
@@ -501,11 +501,8 @@ void cqm_handle_limbo(struct work_struct *work)
void cqm_setup_limbo_handler(struct rdt_domain *dom, unsigned long delay_ms)
void cqm_setup_limbo_handler(struct rdt_domain *dom, unsigned long delay_ms)
{
{
	unsigned long delay = msecs_to_jiffies(delay_ms);
	unsigned long delay = msecs_to_jiffies(delay_ms);
	struct rdt_resource *r;
	int cpu;
	int cpu;


	r = &rdt_resources_all[RDT_RESOURCE_L3];

	cpu = cpumask_any(&dom->cpu_mask);
	cpu = cpumask_any(&dom->cpu_mask);
	dom->cqm_work_cpu = cpu;
	dom->cqm_work_cpu = cpu;


Loading