* [PATCH v2 0/2] W=1 fixes
@ 2021-08-23 9:00 Cédric Le Goater
2021-08-23 9:00 ` [PATCH v2 1/2] powerpc/prom: Fix unused variable ‘reserve_map’ when CONFIG_PPC32 is not set Cédric Le Goater
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Cédric Le Goater @ 2021-08-23 9:00 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Cédric Le Goater
Hello,
These are the remaining patches needed to compile the ppc kernel with
W=1. Audit issues are now being addressed by Christophe in patch :
[v2] powerpc/audit: Convert powerpc to AUDIT_ARCH_COMPAT_GENERIC
http://patchwork.ozlabs.org/project/linuxppc-dev/patch/dc14509a28a993738b1325211f412be72a4f9b1e.1629701132.git.christophe.leroy@csgroup.eu/
Thanks,
C.
Changes in v2:
- reworked early_reserve_mem_dt()
- removed asmlinkage
Cédric Le Goater (2):
powerpc/prom: Fix unused variable ‘reserve_map’ when CONFIG_PPC32 is
not set
powerpc/compat_sys: Declare syscalls
arch/powerpc/include/asm/syscalls.h | 30 +++++++++++++++++++++++++++++
arch/powerpc/kernel/prom.c | 5 +++--
2 files changed, 33 insertions(+), 2 deletions(-)
--
2.31.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 1/2] powerpc/prom: Fix unused variable ‘reserve_map’ when CONFIG_PPC32 is not set
2021-08-23 9:00 [PATCH v2 0/2] W=1 fixes Cédric Le Goater
@ 2021-08-23 9:00 ` Cédric Le Goater
2021-08-23 9:00 ` [PATCH v2 2/2] powerpc/compat_sys: Declare syscalls Cédric Le Goater
2021-08-27 13:15 ` [PATCH v2 0/2] W=1 fixes Michael Ellerman
2 siblings, 0 replies; 4+ messages in thread
From: Cédric Le Goater @ 2021-08-23 9:00 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Cédric Le Goater
This fixes a compile error with W=1.
arch/powerpc/kernel/prom.c: In function ‘early_reserve_mem’:
arch/powerpc/kernel/prom.c:625:10: error: variable ‘reserve_map’ set but not used [-Werror=unused-but-set-variable]
__be64 *reserve_map;
^~~~~~~~~~~
cc1: all warnings being treated as errors
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
arch/powerpc/kernel/prom.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index f620e04dc9bf..44b2cdc0aae3 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -640,7 +640,9 @@ static void __init early_reserve_mem(void)
}
#endif /* CONFIG_BLK_DEV_INITRD */
-#ifdef CONFIG_PPC32
+ if (!IS_ENABLED(CONFIG_PPC32))
+ return;
+
/*
* Handle the case where we might be booting from an old kexec
* image that setup the mem_rsvmap as pairs of 32-bit values
@@ -661,7 +663,6 @@ static void __init early_reserve_mem(void)
}
return;
}
-#endif
}
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
--
2.31.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 2/2] powerpc/compat_sys: Declare syscalls
2021-08-23 9:00 [PATCH v2 0/2] W=1 fixes Cédric Le Goater
2021-08-23 9:00 ` [PATCH v2 1/2] powerpc/prom: Fix unused variable ‘reserve_map’ when CONFIG_PPC32 is not set Cédric Le Goater
@ 2021-08-23 9:00 ` Cédric Le Goater
2021-08-27 13:15 ` [PATCH v2 0/2] W=1 fixes Michael Ellerman
2 siblings, 0 replies; 4+ messages in thread
From: Cédric Le Goater @ 2021-08-23 9:00 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Cédric Le Goater
This fixes a compile error with W=1.
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
arch/powerpc/include/asm/syscalls.h | 30 +++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/arch/powerpc/include/asm/syscalls.h b/arch/powerpc/include/asm/syscalls.h
index 398171fdcd9f..7ee66ae5444d 100644
--- a/arch/powerpc/include/asm/syscalls.h
+++ b/arch/powerpc/include/asm/syscalls.h
@@ -6,6 +6,7 @@
#include <linux/compiler.h>
#include <linux/linkage.h>
#include <linux/types.h>
+#include <linux/compat.h>
struct rtas_args;
@@ -18,5 +19,34 @@ asmlinkage long sys_mmap2(unsigned long addr, size_t len,
asmlinkage long ppc64_personality(unsigned long personality);
asmlinkage long sys_rtas(struct rtas_args __user *uargs);
+#ifdef CONFIG_COMPAT
+unsigned long compat_sys_mmap2(unsigned long addr, size_t len,
+ unsigned long prot, unsigned long flags,
+ unsigned long fd, unsigned long pgoff);
+
+compat_ssize_t compat_sys_pread64(unsigned int fd, char __user *ubuf, compat_size_t count,
+ u32 reg6, u32 pos1, u32 pos2);
+
+compat_ssize_t compat_sys_pwrite64(unsigned int fd, const char __user *ubuf, compat_size_t count,
+ u32 reg6, u32 pos1, u32 pos2);
+
+compat_ssize_t compat_sys_readahead(int fd, u32 r4, u32 offset1, u32 offset2, u32 count);
+
+int compat_sys_truncate64(const char __user *path, u32 reg4,
+ unsigned long len1, unsigned long len2);
+
+long compat_sys_fallocate(int fd, int mode, u32 offset1, u32 offset2, u32 len1, u32 len2);
+
+int compat_sys_ftruncate64(unsigned int fd, u32 reg4, unsigned long len1,
+ unsigned long len2);
+
+long ppc32_fadvise64(int fd, u32 unused, u32 offset1, u32 offset2,
+ size_t len, int advice);
+
+long compat_sys_sync_file_range2(int fd, unsigned int flags,
+ unsigned int offset1, unsigned int offset2,
+ unsigned int nbytes1, unsigned int nbytes2);
+#endif
+
#endif /* __KERNEL__ */
#endif /* __ASM_POWERPC_SYSCALLS_H */
--
2.31.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 0/2] W=1 fixes
2021-08-23 9:00 [PATCH v2 0/2] W=1 fixes Cédric Le Goater
2021-08-23 9:00 ` [PATCH v2 1/2] powerpc/prom: Fix unused variable ‘reserve_map’ when CONFIG_PPC32 is not set Cédric Le Goater
2021-08-23 9:00 ` [PATCH v2 2/2] powerpc/compat_sys: Declare syscalls Cédric Le Goater
@ 2021-08-27 13:15 ` Michael Ellerman
2 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2021-08-27 13:15 UTC (permalink / raw)
To: linuxppc-dev, Cédric Le Goater
On Mon, 23 Aug 2021 11:00:37 +0200, Cédric Le Goater wrote:
> These are the remaining patches needed to compile the ppc kernel with
> W=1. Audit issues are now being addressed by Christophe in patch :
>
> [v2] powerpc/audit: Convert powerpc to AUDIT_ARCH_COMPAT_GENERIC
> http://patchwork.ozlabs.org/project/linuxppc-dev/patch/dc14509a28a993738b1325211f412be72a4f9b1e.1629701132.git.christophe.leroy@csgroup.eu/
>
> Thanks,
>
> [...]
Applied to powerpc/next.
[1/2] powerpc/prom: Fix unused variable ‘reserve_map’ when CONFIG_PPC32 is not set
https://git.kernel.org/powerpc/c/3accc0faef081b6813967b34f7d05a3edb855cbd
[2/2] powerpc/compat_sys: Declare syscalls
https://git.kernel.org/powerpc/c/cc47ad409ba9cc950e9c492c8ba653dabd392148
cheers
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-08-27 13:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-23 9:00 [PATCH v2 0/2] W=1 fixes Cédric Le Goater
2021-08-23 9:00 ` [PATCH v2 1/2] powerpc/prom: Fix unused variable ‘reserve_map’ when CONFIG_PPC32 is not set Cédric Le Goater
2021-08-23 9:00 ` [PATCH v2 2/2] powerpc/compat_sys: Declare syscalls Cédric Le Goater
2021-08-27 13:15 ` [PATCH v2 0/2] W=1 fixes Michael Ellerman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.