Skip to content

Commit 374aeb9

Browse files
committed
Merge tag 'orphans-v5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull orphan section fixes from Kees Cook: "These two corner case fixes have been in -next for about a week: - Avoid orphan section in ARM cpuidle (Arnd Bergmann) - Avoid orphan section with !SMP (Nathan Chancellor)" * tag 'orphans-v5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: vmlinux.lds.h: Avoid orphan section with !SMP ARM: cpuidle: Avoid orphan section warning
2 parents 591a22c + d4c6399 commit 374aeb9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

arch/arm/include/asm/cpuidle.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
#ifdef CONFIG_CPU_IDLE
88
extern int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
99
struct cpuidle_driver *drv, int index);
10+
#define __cpuidle_method_section __used __section("__cpuidle_method_of_table")
1011
#else
1112
static inline int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
1213
struct cpuidle_driver *drv, int index) { return -ENODEV; }
14+
#define __cpuidle_method_section __maybe_unused /* drop silently */
1315
#endif
1416

1517
/* Common ARM WFI state */
@@ -42,8 +44,7 @@ struct of_cpuidle_method {
4244

4345
#define CPUIDLE_METHOD_OF_DECLARE(name, _method, _ops) \
4446
static const struct of_cpuidle_method __cpuidle_method_of_table_##name \
45-
__used __section("__cpuidle_method_of_table") \
46-
= { .method = _method, .ops = _ops }
47+
__cpuidle_method_section = { .method = _method, .ops = _ops }
4748

4849
extern int arm_cpuidle_suspend(int index);
4950

include/asm-generic/vmlinux.lds.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -960,6 +960,7 @@
960960
#ifdef CONFIG_AMD_MEM_ENCRYPT
961961
#define PERCPU_DECRYPTED_SECTION \
962962
. = ALIGN(PAGE_SIZE); \
963+
*(.data..decrypted) \
963964
*(.data..percpu..decrypted) \
964965
. = ALIGN(PAGE_SIZE);
965966
#else

0 commit comments

Comments
 (0)