leon: add SDK patches from buildroot-2022.02-1.2/5.10.175
[openwrt/staging/wigyori.git] / target / linux / leon / patches-5.15 / 0015-sparc-Make-PAGE_NONE-a-valid-PTE.patch
1 From 91bdb4d2a59aa7a7706c590ca98eb161c0751ee9 Mon Sep 17 00:00:00 2001
2 From: Daniel Cederman <cederman@gaisler.com>
3 Date: Wed, 10 Jun 2020 12:26:44 +0200
4 Subject: [PATCH 15/32] sparc: Make PAGE_NONE a valid PTE
5
6 Otherwise when exiting a program that has set a page to PROT_NONE
7 we get error messages about the page having a bad swap file mapping.
8 See for example struct-ret-3.c in GCC.
9 ---
10 arch/sparc/include/asm/pgtsrmmu.h | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13 diff --git a/arch/sparc/include/asm/pgtsrmmu.h b/arch/sparc/include/asm/pgtsrmmu.h
14 index 7708d015712b..117009b03cf4 100644
15 --- a/arch/sparc/include/asm/pgtsrmmu.h
16 +++ b/arch/sparc/include/asm/pgtsrmmu.h
17 @@ -74,7 +74,7 @@
18 * enforce all the protection levels that vma's can have.
19 * XXX But for now...
20 */
21 -#define SRMMU_PAGE_NONE __pgprot(SRMMU_CACHE | \
22 +#define SRMMU_PAGE_NONE __pgprot(SRMMU_VALID | SRMMU_CACHE | \
23 SRMMU_PRIV | SRMMU_REF)
24 #define SRMMU_PAGE_SHARED __pgprot(SRMMU_VALID | SRMMU_CACHE | \
25 SRMMU_EXEC | SRMMU_WRITE | SRMMU_REF)
26 --
27 2.34.1
28