orphan section fixes for v5.13-rc6

- Avoid orphan section in ARM cpuidle (Arnd Bergmann)
 
 - Avoid orphan section with !SMP (Nathan Chancellor)
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEpcP2jyKd1g9yPm4TiXL039xtwCYFAmC/pqgACgkQiXL039xt
 wCbecA/+NbwT9NXdxtgQdCsSQxB2bv+LHHyhIhVcBHMtWgVO8Wc37s9bKRBH8Aiz
 FGANuL7h5meXSZ6gDzfuoSO2SMGJeGGIXqb29jGCkwSb64H2Jy7wt9shYkwvSbnE
 EAlznZkmg/GsCwrvSgKmWM5xYLIPTNfNj1ujlpp85f7x5LzZNQK0VD7DOFVUOp7x
 3z+S+gcLK1HW9KlXUhmekqCl1ut0YSRrZ0NMLOROjdCy2EqID6nRkj8jvogNLqAq
 30UMZe7QBZhd1cvRDvAkUxN/7jwhVXxdT6y1ybb9Rqom9krb1idRap6pS8VJZskB
 fO9i0n5zpHKsNqLQMCWLyyWcTEFmZaQfrwoZ2kmxUhAkPus9Hw8GfJ2y1dFgKlq8
 dGcn+EhyvdDwBErplcqugqFuqxQlkNNAhuqbEe9uSfc5JvIRjBsDUq4lovmFpH4H
 RYc0nmDFb+Y0+wg5/KNKRNE4BUqWcYDKFg7dXhMAohpqycpyJkNkov0gV4Xkl2Tw
 CBOQy9GjAKY6Wl1C1TLPsytc6ttbynSHaNHSrEcmv5pRQAY3WP8BT6wciJgQLZ5M
 hHx20uLaw1cFanxzhkU5yS4uTplrFz6QlETr747YqEuiXGc/sK7qdmYusTUOaUj9
 ziD8Lo00uEk+oQNIRuMKMdO/UrPNTlGp3C4B8B12lrOa3VM8fbg=
 =ZvIL
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Linus Torvalds 2021-06-08 10:25:20 -07:00
commit 374aeb91db
2 changed files with 4 additions and 2 deletions

View File

@ -7,9 +7,11 @@
#ifdef CONFIG_CPU_IDLE
extern int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
struct cpuidle_driver *drv, int index);
#define __cpuidle_method_section __used __section("__cpuidle_method_of_table")
#else
static inline int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
struct cpuidle_driver *drv, int index) { return -ENODEV; }
#define __cpuidle_method_section __maybe_unused /* drop silently */
#endif
/* Common ARM WFI state */
@ -42,8 +44,7 @@ struct of_cpuidle_method {
#define CPUIDLE_METHOD_OF_DECLARE(name, _method, _ops) \
static const struct of_cpuidle_method __cpuidle_method_of_table_##name \
__used __section("__cpuidle_method_of_table") \
= { .method = _method, .ops = _ops }
__cpuidle_method_section = { .method = _method, .ops = _ops }
extern int arm_cpuidle_suspend(int index);

View File

@ -960,6 +960,7 @@
#ifdef CONFIG_AMD_MEM_ENCRYPT
#define PERCPU_DECRYPTED_SECTION \
. = ALIGN(PAGE_SIZE); \
*(.data..decrypted) \
*(.data..percpu..decrypted) \
. = ALIGN(PAGE_SIZE);
#else