Re: provide generic page_to_phys and phys_to_page implementations v3

2024-10-25 Thread Arnd Bergmann
On Wed, Oct 23, 2024, at 05:36, Christoph Hellwig wrote: > page_to_phys is duplicated by all architectures, and from some strange > reason placed in where it doesn't fit at all. > > phys_to_page is only provided by a few architectures despite having a lot > of open coded users. > > Provide gene

Re: [PATCH v5 3/8] asm-generic: introduce text-patching.h

2024-10-10 Thread Arnd Bergmann
-patching.h and add an empty > header in asm-generic for architectures that do not support text patching. > > Signed-off-by: Mike Rapoport (Microsoft) Acked-by: Arnd Bergmann ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http:/

Re: [PATCH] asm-generic: provide generic page_to_phys and phys_to_page implementations

2024-10-09 Thread Arnd Bergmann
On Wed, Oct 9, 2024, at 11:43, Christoph Hellwig wrote: > page_to_phys is duplicated by all architectures, and from some strange > reason placed in where it doesn't fit at all. > > phys_to_page is only provided by a few architectures despite having a lot > of open coded users. > > Provide generic

Re: [PATCH RFC v3 1/2] mm: Add personality flag to limit address to 47 bits

2024-09-11 Thread Arnd Bergmann
On Wed, Sep 11, 2024, at 00:45, Charlie Jenkins wrote: > On Tue, Sep 10, 2024 at 03:08:14PM -0400, Liam R. Howlett wrote: > > I responded to Arnd in the other thread, but I am still not convinced > that the solution that x86 and arm64 have selected is the best solution. > The solution of defaulting

Re: [PATCH RFC v3 1/2] mm: Add personality flag to limit address to 47 bits

2024-09-10 Thread Arnd Bergmann
On Mon, Sep 9, 2024, at 23:22, Charlie Jenkins wrote: > On Fri, Sep 06, 2024 at 10:52:34AM +0100, Lorenzo Stoakes wrote: >> On Fri, Sep 06, 2024 at 09:14:08AM GMT, Arnd Bergmann wrote: >> The intent is to optionally be able to run a process that keeps higher bits >> free for t

Re: [PATCH RFC v3 1/2] mm: Add personality flag to limit address to 47 bits

2024-09-06 Thread Arnd Bergmann
On Fri, Sep 6, 2024, at 09:14, Guo Ren wrote: > On Fri, Sep 6, 2024 at 3:18 PM Arnd Bergmann wrote: >> >> It's also unclear to me how we want this flag to interact with >> the existing logic in arch_get_mmap_end(), which attempts to >> limit the default mapping t

Re: [PATCH RFC v3 1/2] mm: Add personality flag to limit address to 47 bits

2024-09-06 Thread Arnd Bergmann
On Fri, Sep 6, 2024, at 08:14, Lorenzo Stoakes wrote: > On Fri, Sep 06, 2024 at 07:17:44AM GMT, Arnd Bergmann wrote: >> On Thu, Sep 5, 2024, at 21:15, Charlie Jenkins wrote: >> > Create a personality flag ADDR_LIMIT_47BIT to support applications >> > that wish to

Re: [PATCH RFC v3 1/2] mm: Add personality flag to limit address to 47 bits

2024-09-06 Thread Arnd Bergmann
On Thu, Sep 5, 2024, at 21:15, Charlie Jenkins wrote: > Create a personality flag ADDR_LIMIT_47BIT to support applications > that wish to transition from running in environments that support at > most 47-bit VAs to environments that support larger VAs. This > personality can be set to cause all all

Re: [GIT PULL] asm-generic updates for 6.11

2024-07-17 Thread Arnd Bergmann
On Wed, Jul 17, 2024, at 12:54, Arnd Bergmann wrote: > > -$(obj)/syscall_table_%.h: $(syscalltbl) $(systbl) FORCE > +$(obj)/syscall_table_%.h: $(syscalltbl) $(systbl) > $(call if_changed,systbl) > > # Create output directory. Skip it if at least one old header exists

Re: [GIT PULL] asm-generic updates for 6.11

2024-07-17 Thread Arnd Bergmann
On Wed, Jul 17, 2024, at 11:36, Arnd Bergmann wrote: > On Wed, Jul 17, 2024, at 10:17, Johan Hovold wrote: >> On Wed, Jul 17, 2024 at 10:01:10AM +0200, Arnd Bergmann wrote: >> >> Yeah, that's not something I noticed at least (and I assume I would >> have). And I

Re: [GIT PULL] asm-generic updates for 6.11

2024-07-17 Thread Arnd Bergmann
On Wed, Jul 17, 2024, at 10:17, Johan Hovold wrote: > On Wed, Jul 17, 2024 at 10:01:10AM +0200, Arnd Bergmann wrote: > > Yeah, that's not something I noticed at least (and I assume I would > have). And I only did aarch64 builds on a 6.9 x86_64 host (make 4.4.1). Ok, I can repr

Re: [GIT PULL] asm-generic updates for 6.11

2024-07-17 Thread Arnd Bergmann
On Wed, Jul 17, 2024, at 08:41, Johan Hovold wrote: > On Wed, Jul 17, 2024 at 08:01:43AM +0200, Arnd Bergmann wrote: >> On Wed, Jul 17, 2024, at 07:08, Linus Torvalds wrote: >> > On Tue, 16 Jul 2024 at 21:57, Linus Torvalds >> > wrote: >> >> >> &

Re: [GIT PULL] asm-generic updates for 6.11

2024-07-17 Thread Arnd Bergmann
On Wed, Jul 17, 2024, at 07:08, Linus Torvalds wrote: > On Tue, 16 Jul 2024 at 21:57, Linus Torvalds > wrote: > > ./arch/arm64/include/generated/uapi/asm/unistd_64.h > ./arch/arm64/include/generated/asm/syscall_table_32.h > ./arch/arm64/include/generated/asm/syscall_table_64.h > ./arch/ar

Re: [GIT PULL] asm-generic updates for 6.11

2024-07-16 Thread Arnd Bergmann
On Wed, Jul 17, 2024, at 07:08, Linus Torvalds wrote: > On Tue, 16 Jul 2024 at 21:57, Linus Torvalds > wrote: >> >> Note, it really might be just 'allmodconfig'. We've had things that >> depend on config entries in the past, eg the whole >> CONFIG_HEADERS_INSTALL etc could affect things. I had tr

Re: [GIT PULL] asm-generic updates for 6.11

2024-07-16 Thread Arnd Bergmann
On Wed, Jul 17, 2024, at 06:02, Linus Torvalds wrote: > On Mon, 15 Jul 2024 at 14:07, Arnd Bergmann wrote: > > But that's not at all what I see. It rebuilds pretty much the whole > tree (not quite everything, but at an estimate it rebuilds the > majority of files). > >

[GIT PULL] asm-generic updates for 6.11

2024-07-15 Thread Arnd Bergmann
The other two patches are dead code removal and a warning fix. Arnd Bergmann (17): syscalls: add generic scripts/syscall.tbl csky: drop asm/gpio.h wrapper um: don't generate asm/bpf_perf_event.h loonga

Re: [PATCH 03/17] um: don't generate asm/bpf_perf_event.h

2024-07-12 Thread Arnd Bergmann
On Fri, Jul 12, 2024, at 10:37, Masahiro Yamada wrote: > On Thu, Jul 4, 2024 at 11:37 PM Arnd Bergmann wrote: >> --- a/arch/um/include/asm/Kbuild >> +++ b/arch/um/include/asm/Kbuild >> @@ -1,5 +1,4 @@ >> # SPDX-License-Identifier: GPL-2.0 >> -generic-y += bpf_pe

Re: [PATCH 01/17] syscalls: add generic scripts/syscall.tbl

2024-07-12 Thread Arnd Bergmann
On Fri, Jul 12, 2024, at 10:43, Masahiro Yamada wrote: > On Thu, Jul 4, 2024 at 11:36 PM Arnd Bergmann wrote: > > I know this is already written in this way > in include/uapi/asm-generic/unistd.h, but > the native and compat have the same function name. > > > Can we simpl

Re: [PATCH 12/17] csky: convert to generic syscall table

2024-07-10 Thread Arnd Bergmann
On Thu, Jul 4, 2024, at 16:36, Arnd Bergmann wrote: > - > -#define __NR_set_thread_area (__NR_arch_specific_syscall + 0) > -__SYSCALL(__NR_set_thread_area, sys_set_thread_area) > -#define __NR_cacheflush (__NR_arch_specific_syscall + 1) > -__SYSCALL(__NR_cacheflush,

Re: [PATCH 10/17] arm64: generate 64-bit syscall.tbl

2024-07-10 Thread Arnd Bergmann
On Tue, Jul 9, 2024, at 19:23, Mark Brown wrote: > On Thu, Jul 04, 2024 at 04:36:04PM +0200, Arnd Bergmann wrote: > >> #define __ARCH_WANT_SYS_CLONE >> +#define __ARCH_WANT_NEW_STAT >> >> -#ifndef __COMPAT_SYSCALL_NR >> -#include >> -#endif >&

Re: [PATCH 00/17] arch: convert everything to syscall.tbl

2024-07-05 Thread Arnd Bergmann
On Fri, Jul 5, 2024, at 12:18, Maciej W. Rozycki wrote: > On Thu, 4 Jul 2024, Arnd Bergmann wrote: > >> arch/alpha/include/asm/unistd.h | 1 + > > This seems out of sync with the actual changes, any idea what happened > here? Sorry about this, I w

[PATCH 17/17] riscv: convert to generic syscall table

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann The uapi/asm/unistd_{32,64}.h and asm/syscall_table_{32,64}.h headers can now be generated from scripts/syscall.tbl, which makes this consistent with the other architectures that have their own syscall.tbl. riscv has two extra system call that gets added to scripts

[PATCH 16/17] openrisc: convert to generic syscall table

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann The uapi/asm/unistd_32.h and asm/syscall_table_32.h headers can now be generated from scripts/syscall.tbl, which makes this consistent with the other architectures that have their own syscall.tbl. openrisc has one extra system call that gets added to scripts/syscall.tbl

[PATCH 15/17] nios2: convert to generic syscall table

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann The uapi/asm/unistd_32.h and asm/syscall_table_32.h headers can now be generated from scripts/syscall.tbl, which makes this consistent with the other architectures that have their own syscall.tbl. nios2 has one extra system call that gets added to scripts/syscall.tbl. The

[PATCH 14/17] loongarch: convert to generic syscall table

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann The uapi/asm/unistd_64.h and asm/syscall_table_64.h headers can now be generated from scripts/syscall.tbl, which makes this consistent with the other architectures that have their own syscall.tbl. Unlike the other architectures using the asm-generic header, loongarch uses

[PATCH 13/17] hexagon: use new system call table

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann The uapi/asm/unistd_32.h and asm/syscall_table_32.h headers can now be generated from scripts/syscall.tbl, which makes this consistent with the other architectures that have their own syscall.tbl. The time32, stat64, rlimit and renameat entries in the syscall_abis_32 line

[PATCH 12/17] csky: convert to generic syscall table

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann The uapi/asm/unistd_32.h and asm/syscall_table_32.h headers can now be generated from scripts/syscall.tbl, which makes this consistent with the other architectures that have their own syscall.tbl. csky has two architecture specific system calls, which I add to the generic

[PATCH 11/17] arm64: rework compat syscall macros

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann The generated asm/unistd_compat_32.h header file now contains macros that can be used directly in the vdso and the signal trampolines, so remove the duplicate definitions. Signed-off-by: Arnd Bergmann --- arch/arm64/include/asm/seccomp.h | 10 +- arch

[PATCH 10/17] arm64: generate 64-bit syscall.tbl

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann Change the asm/unistd.h header for arm64 to no longer include asm-generic/unistd.h itself, but instead generate both the asm/unistd.h contents and the list of entry points using the syscall.tbl scripts that we use on most other architectures. Once his is done for the

[PATCH 09/17] arm64: convert unistd_32.h to syscall.tbl format

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann This is a straight conversion from the old asm/unistd32.h into the format used by 32-bit arm and most other architectures, calling scripts to generate the asm/unistd32.h header and a new asm/syscalls32.h headers. I used a semi-automated text replacement method to do the

[PATCH 08/17] arc: convert to generic syscall table

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann The uapi/asm/unistd_32.h and asm/syscall_table_32.h headers can now be generated from scripts/syscall.tbl, which makes this consistent with the other architectures that have their own syscall.tbl. arc has a couple of architecture specific system calls, which I add to the

[PATCH 07/17] clone3: drop __ARCH_WANT_SYS_CLONE3 macro

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann When clone3() was introduced, it was not obvious how each architecture deals with setting up the stack and keeping the register contents in a fork()-like system call, so this was left for the architecture maintainers to implement, with __ARCH_WANT_SYS_CLONE3 defined by those

[PATCH 06/17] kbuild: add syscall table generation to scripts/Makefile.asm-headers

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann There are 11 copies of arch/*/kernel/syscalls/Makefile that all implement the same basic logic in a somewhat awkward way. I tried out various ways of unifying the existing copies and ended up with something that hooks into the logic for generating the redirections to asm

[PATCH 05/17] kbuild: verify asm-generic header list

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann In order to integrate the system call header generation with generating the asm-generic wrappers, restrict the generated headers to those that actually exist in include/asm-generic/. The path is already known, so add these as a dependency. The asm-generic/bugs.h header was

[PATCH 04/17] loongarch: avoid generating extra header files

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann The list of generated headers is rather outdated, some of these no longer exist, while others are already listed in include/asm-generic/Kbuild so there is no need to list them here. As we start validating the list of headers against the files that exist, the outdated ones

[PATCH 03/17] um: don't generate asm/bpf_perf_event.h

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann If we start validating the existence of the asm-generic side of generated headers, this one causes a warning: make[3]: *** No rule to make target 'arch/um/include/generated/asm/bpf_perf_event.h', needed by 'all'. Stop. The problem is that the asm

[PATCH 02/17] csky: drop asm/gpio.h wrapper

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann The asm/gpio.h header is gone now that all architectures just use gpiolib, and so the redirect is no longer valid. Signed-off-by: Arnd Bergmann --- arch/csky/include/asm/Kbuild | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/csky/include/asm/Kbuild b/arch/csky

[PATCH 01/17] syscalls: add generic scripts/syscall.tbl

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann The asm-generic/unistd.h header still follows the old style of defining system call numbers and the table. Most architectures got the new syscall.tbl format as part of the y2038 conversion back in 2018, but the newer architectures that share a single table never did. I did a

[PATCH 00/17] arch: convert everything to syscall.tbl

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann There are eight architectures using include/uapi/asm-generic/unistd.h, which is still in an old format and not easily parsed by scripts. In addition, arm64 uses the old format for the 32-bit arm compat syscalls, despite them using the modern syscall.tbl format for the native

Re: [PATCH v3 0/3] arch: Remove fbdev dependency from video helpers

2024-05-03 Thread Arnd Bergmann
On Fri, Apr 5, 2024, at 11:04, Thomas Zimmermann wrote: > Hi, > > if there are no further comments, can this series be merged through > asm-generic? Sorry for the delay, I've merged these for asm-generic now. Arnd ___ linux-snps-arc mailing list

Re: [PATCH RFC cmpxchg 3/8] ARC: Emulate one-byte and two-byte cmpxchg

2024-04-04 Thread Arnd Bergmann
On Thu, Apr 4, 2024, at 16:44, Paul E. McKenney wrote: > On Thu, Apr 04, 2024 at 01:57:32PM +0200, Arnd Bergmann wrote: >> On Tue, Apr 2, 2024, at 19:06, Paul E. McKenney wrote: >> > Or is your question specific to the 16-bit primitives? (Full disclosure: >> > I ha

Re: [PATCH RFC cmpxchg 3/8] ARC: Emulate one-byte and two-byte cmpxchg

2024-04-04 Thread Arnd Bergmann
On Tue, Apr 2, 2024, at 19:06, Paul E. McKenney wrote: > On Tue, Apr 02, 2024 at 10:14:08AM +0200, Arnd Bergmann wrote: >> On Mon, Apr 1, 2024, at 23:39, Paul E. McKenney wrote: >> > Use the new cmpxchg_emu_u8() and cmpxchg_emu_u16() to emulate one-byte >> > an

Re: [PATCH RFC cmpxchg 3/8] ARC: Emulate one-byte and two-byte cmpxchg

2024-04-02 Thread Arnd Bergmann
On Mon, Apr 1, 2024, at 23:39, Paul E. McKenney wrote: > Use the new cmpxchg_emu_u8() and cmpxchg_emu_u16() to emulate one-byte > and two-byte cmpxchg() on arc. > > Signed-off-by: Paul E. McKenney I'm missing the context here, is it now mandatory to have 16-bit cmpxchg() everywhere? I think we've

Re: [PATCH v2 3/3] arch: Rename fbdev header and source files

2024-03-28 Thread Arnd Bergmann
On Thu, Mar 28, 2024, at 13:46, Helge Deller wrote: > On 3/27/24 21:41, Thomas Zimmermann wrote: >> +++ b/arch/arc/include/asm/video.h >> @@ -0,0 +1,8 @@ >> +/* SPDX-License-Identifier: GPL-2.0 */ >> + >> +#ifndef _ASM_VIDEO_H_ >> +#define _ASM_VIDEO_H_ >> + >> +#include >> + >> +#endif /* _ASM_V

[PATCH v2 3/3] arch: define CONFIG_PAGE_SIZE_*KB on all architectures

2024-03-06 Thread Arnd Bergmann
From: Arnd Bergmann Most architectures only support a single hardcoded page size. In order to ensure that each one of these sets the corresponding Kconfig symbols, change over the PAGE_SHIFT definition to the common one and allow only the hardware page size to be selected. Acked-by: Guo Ren

[PATCH v2 2/3] arch: simplify architecture specific page size configuration

2024-03-06 Thread Arnd Bergmann
From: Arnd Bergmann arc, arm64, parisc and powerpc all have their own Kconfig symbols in place of the common CONFIG_PAGE_SIZE_4KB symbols. Change these so the common symbols are the ones that are actually used, while leaving the arhcitecture specific ones as the user visible place for

[PATCH v2 1/3] arch: consolidate existing CONFIG_PAGE_SIZE_*KB definitions

2024-03-06 Thread Arnd Bergmann
From: Arnd Bergmann These four architectures define the same Kconfig symbols for configuring the page size. Move the logic into a common place where it can be shared with all other architectures. Signed-off-by: Arnd Bergmann --- Changes from v1: - improve Kconfig help texts - fix Hexagon

[v2 PATCH 0/3] arch: mm, vdso: consolidate PAGE_SIZE definition

2024-03-06 Thread Arnd Bergmann
From: Arnd Bergmann Naresh noticed that the newly added usage of the PAGE_SIZE macro in include/vdso/datapage.h introduced a build regression. I had an older patch that I revived to have this defined through Kconfig rather than through including asm/page.h, which is not allowed in vdso code

Re: [PATCH 1/4] arch: consolidate existing CONFIG_PAGE_SIZE_*KB definitions

2024-02-27 Thread Arnd Bergmann
On Tue, Feb 27, 2024, at 16:44, Christophe Leroy wrote: > Le 27/02/2024 à 16:40, Arnd Bergmann a écrit : >> On Mon, Feb 26, 2024, at 17:55, Samuel Holland wrote: > > > For 256K pages, powerpc has the following help. I think you should have > it too: > > The kern

Re: [PATCH 1/4] arch: consolidate existing CONFIG_PAGE_SIZE_*KB definitions

2024-02-27 Thread Arnd Bergmann
On Tue, Feb 27, 2024, at 09:45, Geert Uytterhoeven wrote: > >> +config PAGE_SIZE_4KB >> + bool "4KB pages" > > Now you got rid of the 4000-byte ("4kB") pages and friends, please > do not replace these by Kelvin-bytes, and use the official binary > prefixes => "4 KiB". > Done, thanks. Ar

Re: [PATCH 1/4] arch: consolidate existing CONFIG_PAGE_SIZE_*KB definitions

2024-02-27 Thread Arnd Bergmann
On Mon, Feb 26, 2024, at 20:02, Christophe Leroy wrote: > Le 26/02/2024 à 17:14, Arnd Bergmann a écrit : >> From: Arnd Bergmann > > That's a nice re-factor. > > The only drawback I see is that we are loosing several interesting > arch-specific comments/help text. Do

Re: [PATCH 1/4] arch: consolidate existing CONFIG_PAGE_SIZE_*KB definitions

2024-02-27 Thread Arnd Bergmann
On Mon, Feb 26, 2024, at 17:55, Samuel Holland wrote: > On 2024-02-26 10:14 AM, Arnd Bergmann wrote: >> >> +config HAVE_PAGE_SIZE_4KB >> +bool >> + >> +config HAVE_PAGE_SIZE_8KB >> +bool >> + >> +config HAVE_PAGE_SIZE_16KB >> +

Re: [PATCH 3/4] arch: define CONFIG_PAGE_SIZE_*KB on all architectures

2024-02-27 Thread Arnd Bergmann
On Tue, Feb 27, 2024, at 12:12, Geert Uytterhoeven wrote: > On Tue, Feb 27, 2024 at 11:59 AM Arnd Bergmann wrote: >> On Tue, Feb 27, 2024, at 09:54, Geert Uytterhoeven wrote: >> I was a bit unsure about how to best do this since there >> is not really a need for a fixed page

Re: [PATCH 3/4] arch: define CONFIG_PAGE_SIZE_*KB on all architectures

2024-02-27 Thread Arnd Bergmann
On Tue, Feb 27, 2024, at 09:54, Geert Uytterhoeven wrote: > Hi Arnd, >> diff --git a/arch/m68k/Kconfig.cpu b/arch/m68k/Kconfig.cpu >> index 9dcf245c9cbf..c777a129768a 100644 >> --- a/arch/m68k/Kconfig.cpu >> +++ b/arch/m68k/Kconfig.cpu >> @@ -30,6 +30,7 @@ config COLDFIRE >> select GENERIC_

[PATCH 4/4] vdso: avoid including asm/page.h

2024-02-26 Thread Arnd Bergmann
From: Arnd Bergmann The recent change to the vdso_data_store broke building compat VDSO on at least arm64 because it includes headers outside of the include/vdso/ namespace: In file included from arch/arm64/include/asm/lse.h:5, from arch/arm64/include/asm/cmpxchg.h:14

[PATCH 3/4] arch: define CONFIG_PAGE_SIZE_*KB on all architectures

2024-02-26 Thread Arnd Bergmann
From: Arnd Bergmann Most architectures only support a single hardcoded page size. In order to ensure that each one of these sets the corresponding Kconfig symbols, change over the PAGE_SHIFT definition to the common one and allow only the hardware page size to be selected. Signed-off-by: Arnd

[PATCH 2/4] arch: simplify architecture specific page size configuration

2024-02-26 Thread Arnd Bergmann
From: Arnd Bergmann arc, arm64, parisc and powerpc all have their own Kconfig symbols in place of the common CONFIG_PAGE_SIZE_4KB symbols. Change these so the common symbols are the ones that are actually used, while leaving the arhcitecture specific ones as the user visible place for

[PATCH 1/4] arch: consolidate existing CONFIG_PAGE_SIZE_*KB definitions

2024-02-26 Thread Arnd Bergmann
From: Arnd Bergmann These four architectures define the same Kconfig symbols for configuring the page size. Move the logic into a common place where it can be shared with all other architectures. Signed-off-by: Arnd Bergmann --- arch/Kconfig | 58

[PATCH 0/4] arch: mm, vdso: consolidate PAGE_SIZE definition

2024-02-26 Thread Arnd Bergmann
From: Arnd Bergmann Naresh noticed that the newly added usage of the PAGE_SIZE macro in include/vdso/datapage.h introduced a build regression. I had an older patch that I revived to have this defined through Kconfig rather than through including asm/page.h, which is not allowed in vdso code. I

Re: [PATCH 08/22] [v2] arch: consolidate arch_irq_work_raise prototypes

2024-01-10 Thread Arnd Bergmann
On Wed, Jan 10, 2024, at 10:03, Geert Uytterhoeven wrote: > On Wed, Nov 8, 2023 at 2:01 PM Arnd Bergmann wrote: >> From: Arnd Bergmann >> >> The prototype was hidden in an #ifdef on x86, which causes a warning: >> >> kernel/irq_work.c:72:13:

Re: [PATCH 10/22] microblaze: include linux/cpu.h for trap_init() prototype

2023-11-08 Thread Arnd Bergmann
On Wed, Nov 8, 2023, at 21:42, Geert Uytterhoeven wrote: > > On Wed, Nov 8, 2023 at 2:01 PM Arnd Bergmann wrote: >> From: Arnd Bergmann >> >> Microblaze runs into a single -Wmissing-prototypes warning when that is >> enabled: >> >> arch/microblaze

Re: [PATCH 15/22] arch: vdso: consolidate gettime prototypes

2023-11-08 Thread Arnd Bergmann
On Wed, Nov 8, 2023, at 19:31, Christophe Leroy wrote: > Le 08/11/2023 à 13:58, Arnd Bergmann a écrit : > powerpc has functions doing more or less the same, they are called > __c_kernel_clock_gettime() and alike with their prototypes siting in > arch/powerpc/include/asm/vdso/ge

[PATCH 17/22] powerpc: ps3: move udbg_shutdown_ps3gelic prototype

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann Allmodconfig kernels produce a missing-prototypes warning: arch/powerpc/platforms/ps3/gelic_udbg.c:239:6: error: no previous prototype for 'udbg_shutdown_ps3gelic' [-Werror=missing-prototypes] Move the declaration from a local header to asm/ps3.h where it can be

[PATCH 22/22] Makefile.extrawarn: turn on missing-prototypes globally

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann Over the years we went from > 1000 of warnings to under 100 earlier this year, and I sent patches to address all the ones that I saw with compile testing randcom configs on arm64, arm and x86 kernels. This is a really useful warning, as it catches real bugs when there

[PATCH 21/22] fbdev/fsl-diu-fb: mark wr_reg_wa() static

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann wr_reg_wa() is not an appropriate name for a global function, and doesn't need to be global anyway, so mark it static and avoid the warning: drivers/video/fbdev/fsl-diu-fb.c:493:6: error: no previous prototype for 'wr_reg_wa' [-Werror=missing-pro

[PATCH 20/22] usb: fsl-mph-dr-of: mark fsl_usb2_mpc5121_init() static

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann This function is only called locally and should always have been static: drivers/usb/host/fsl-mph-dr-of.c:291:5: error: no previous prototype for 'fsl_usb2_mpc5121_init' [-Werror=missing-prototypes] Fixes: 230f7ede6c2f ("USB: add USB EHCI support for MPC51

[PATCH 19/22] powerpc: powermac: mark smp_psurge_{give,take}_timebase static

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann These functions are only called locally and should be static like the other corresponding functions are: arch/powerpc/platforms/powermac/smp.c:416:13: error: no previous prototype for 'smp_psurge_take_timebase' [-Werror=missing-prototypes] 416 | v

[PATCH 18/22] powerpc: pasemi: mark pas_shutdown() static

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann Allmodconfig builds show a warning about one function that is accidentally marked global: arch/powerpc/platforms/pasemi/setup.c:67:6: error: no previous prototype for 'pas_shutdown' [-Werror=missing-prototypes] Fixes: 656fdf3ad8e0 ("powerpc/pasemi: Add Ne

[PATCH 16/22] bcachefs: mark bch2_target_to_text_sb() static

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann bch2_target_to_text_sb() is only called in the file it is defined in, and it has no extern prototype: fs/bcachefs/disk_groups.c:583:6: error: no previous prototype for 'bch2_target_to_text_sb' [-Werror=missing-prototypes] Mark it static to avoid the warning an

[PATCH 15/22] arch: vdso: consolidate gettime prototypes

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann The VDSO functions are defined as globals in the kernel sources but intended to be called from userspace, so there is no need to declare them in a kernel side header. Without a prototype, this now causes warnings such as arch/mips/vdso/vgettimeofday.c:14:5: error: no

[PATCH 14/22] arch: add missing prepare_ftrace_return() prototypes

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann The prototype for prepare_ftrace_return() is architecture specific and can't be in a global header. Since it's normally called from assembly, it doesn't really need a prototype, but we get a warning if it's missing: arch/csky/kernel/ftrace.c:147:6

[PATCH 13/22] arch: add do_page_fault prototypes

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann arch/alpha/mm/fault.c:85:1: error: no previous prototype for 'do_page_fault' [-Werror=missing-prototypes] arch/csky/mm/fault.c:187:17: error: no previous prototype for 'do_page_fault' [-Werror=missing-prototypes] arch/mips/mm/fault.c:323:17: error: no pr

[PATCH 12/22] csky: fix arch_jump_label_transform_static override

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann The arch_jump_label_transform_static() function in csky was originally meant to override the generic __weak function, but that got changed to an #ifndef check. This showed up as a missing-prototype warning: arch/csky/kernel/jump_label.c:43:6: error: no previous prototype for

[PATCH 11/22] x86: sta2x11: include header for sta2x11_get_instance() prototype

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann sta2x11_get_instance() is a global function declared in asm/sta2x11.h, but this header is not included before the definition, causing a warning: arch/x86/pci/sta2x11-fixup.c:95:26: error: no previous prototype for 'sta2x11_get_instance' [-Werror=missing-prototypes

[PATCH 10/22] microblaze: include linux/cpu.h for trap_init() prototype

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann Microblaze runs into a single -Wmissing-prototypes warning when that is enabled: arch/microblaze/kernel/traps.c:21:6: warning: no previous prototype for 'trap_init' [-Wmissing-prototypes] Include the right header to avoid this. Signed-off-by: Arnd Bergmann

[PATCH 09/22] [v2] arch: fix asm-offsets.c building with -Wmissing-prototypes

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann When -Wmissing-prototypes is enabled, the some asm-offsets.c files fail to build, even when this warning is disabled in the Makefile for normal files: arch/sparc/kernel/asm-offsets.c:22:5: error: no previous prototype for 'sparc32_foo' [-Werror=missing-protot

[PATCH 08/22] [v2] arch: consolidate arch_irq_work_raise prototypes

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann The prototype was hidden in an #ifdef on x86, which causes a warning: kernel/irq_work.c:72:13: error: no previous prototype for 'arch_irq_work_raise' [-Werror=missing-prototypes] Some architectures have a working prototype, while others don't. Fix this by

[PATCH 07/22] [RESEND] sched: fair: move unused stub functions to header

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann These four functions have a normal definition for CONFIG_FAIR_GROUP_SCHED, and empty one that is only referenced when FAIR_GROUP_SCHED is disabled but CGROUP_SCHED is still enabled. If both are turned off, the functions are still defined but the misisng prototype causes a W=1

[PATCH 06/22] [RESEND] stackleak: add declarations for global functions

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann With -Wmissing-prototypes enabled, the stackleak code produces a couple of warnings that have no declarations because they are only called from assembler: stackleak.c:127:25: error: no previous prototype for 'stackleak_erase' [-Werror=missing-prototypes] stacklea

[PATCH 05/22] [RESEND] parport: gsc: mark init function static

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann This is only used locally, so mark it static to avoid a warning: drivers/parport/parport_gsc.c:395:5: error: no previous prototype for 'parport_gsc_init' [-Werror=missing-prototypes] Acked-by: Helge Deller Acked-by: Sudip Mukherjee Signed-off-by: Arn

[PATCH 04/22] [RESEND] time: make sysfs_get_uname() function visible in header

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann This function is defined globally in clocksource.c and used conditionally in clockevent.c, which the declaration hidden when clockevent support is disabled. This causes a harmless warning in the definition: kernel/time/clocksource.c:1324:9: warning: no previous prototype for

[PATCH 03/22] [RESEND] kprobes: unify kprobes_exceptions_nofify() prototypes

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann Most architectures that support kprobes declare this function in their own asm/kprobes.h header and provide an override, but some are missing the prototype, which causes a warning for the __weak stub implementation: kernel/kprobes.c:1865:12: error: no previous prototype for

[PATCH 02/22] [RESEND^2] jffs2: mark __jffs2_dbg_superblock_counts() static

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann This function is only called locally and does not need to be global. Since there is no external prototype, gcc warns about the non-static definition: fs/jffs2/debug.c:160:6: error: no previous prototype for '__jffs2_dbg_superblock_counts' [-Werror=missing-

[PATCH 01/22] [RESEND^2] ida: make 'ida_dump' static

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann There is no global declaration for ida_dump() and no other callers, so make it static to avoid this warning: lib/test_ida.c:16:6: error: no previous prototype for 'ida_dump' Fixes: 8ab8ba38d488 ("ida: Start new test_ida module") Signed-off-by: Arn

[PATCH 00/22] -Wmissing-prototype warning fixes

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann I slightly dropped the ball on this since last sending the series in August, but a number of warning fixes have made it into the kernel in the meantime, both from my earlier submission and from architecture maintainers. I have none patches that remain from the previous

Re: [PATCH] treewide: drop CONFIG_EMBEDDED

2023-08-16 Thread Arnd Bergmann
sts.infradead.org > Cc: Arnd Bergmann > Cc: Jason A. Donenfeld Acked-by: Arnd Bergmann ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc

Re: [PATCH] ARC: -Wmissing-prototype warning fixes

2023-08-13 Thread Arnd Bergmann
kernel.org/lkml/20230810141947.1236730-1-a...@kernel.org > > Signed-off-by: Vineet Gupta Looks good to me, Reviewed-by: Arnd Bergmann ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc

Re: [PATCH 16/17] [RFC] arch: turn -Wmissing-prototypes off conditionally

2023-08-12 Thread Arnd Bergmann
On Fri, Aug 11, 2023, at 22:09, Stafford Horne wrote: > On Thu, Aug 10, 2023 at 04:19:34PM +0200, Arnd Bergmann wrote: >> From: Arnd Bergmann >> arch/openrisc/mm/fault.c:44:17: error: no previous prototype for >> 'do_page_fault' [-Werror=missing-prototypes] &

Re: [PATCH 16/17] [RFC] arch: turn -Wmissing-prototypes off conditionally

2023-08-10 Thread Arnd Bergmann
On Thu, Aug 10, 2023, at 17:59, Helge Deller wrote: > On 8/10/23 17:21, Arnd Bergmann wrote: >> On Thu, Aug 10, 2023, at 16:59, Christophe Leroy wrote: >> >> I did send other fixes for microblaze and parisc specific drivers, >> and I could also send patches for the two d

Re: [PATCH 16/17] [RFC] arch: turn -Wmissing-prototypes off conditionally

2023-08-10 Thread Arnd Bergmann
On Thu, Aug 10, 2023, at 16:59, Christophe Leroy wrote: > Le 10/08/2023 à 16:19, Arnd Bergmann a écrit : >> From: Arnd Bergmann >> >> I have cleaned up the -Wmissing-prototypes warnings for most of the major >> architectures >> as well as all drivers that get en

[PATCH 16/17] [RFC] arch: turn -Wmissing-prototypes off conditionally

2023-08-10 Thread Arnd Bergmann
From: Arnd Bergmann I have cleaned up the -Wmissing-prototypes warnings for most of the major architectures as well as all drivers that get enabled for CONFIG_COMPILE_TEST, so now these should be close to fixed on x86, arm, arm64, powerpc, s390, and riscv. The other architectures tend to have

[PATCH 14/17] kprobes: unify kprobes_exceptions_nofify() prototypes

2023-08-10 Thread Arnd Bergmann
From: Arnd Bergmann Most architectures that support kprobes declare this function in their own asm/kprobes.h header and provide an override, but some are missing the prototype, which causes a warning for the __weak stub implementation: kernel/kprobes.c:1865:12: error: no previous prototype for

[PATCH 00/17] -Wmissing-prototype warning fixes

2023-08-10 Thread Arnd Bergmann
From: Arnd Bergmann Most of the patches I sent so far for the -Wmissing-prototype warnings have made it into linux-next now. There are a few that I'm resending now as nobody has picked them up, and then a number of fixes that I found while test-building across all architectures rather than

Re: [v3,17/19] arch/sparc: Implement fb_is_primary_device() in source file

2023-06-28 Thread Arnd Bergmann
On Sat, Jun 24, 2023, at 16:21, Arnd Bergmann wrote: > On Sat, Jun 24, 2023, at 15:26, Guenter Roeck wrote: >> On 6/24/23 02:27, Arnd Bergmann wrote: >>> On Sat, Jun 24, 2023, at 03:55, Guenter Roeck wrote: >>>> >>>> ERROR: modpost: "__xchg

Re: [v3,17/19] arch/sparc: Implement fb_is_primary_device() in source file

2023-06-24 Thread Arnd Bergmann
On Sat, Jun 24, 2023, at 15:26, Guenter Roeck wrote: > On 6/24/23 02:27, Arnd Bergmann wrote: >> On Sat, Jun 24, 2023, at 03:55, Guenter Roeck wrote: >>> >>> On Mon, Apr 17, 2023 at 02:56:49PM +0200, Thomas Zimmermann wrote: >>>> Other architectures impl

Re: [v3,17/19] arch/sparc: Implement fb_is_primary_device() in source file

2023-06-24 Thread Arnd Bergmann
On Sat, Jun 24, 2023, at 03:55, Guenter Roeck wrote: > > On Mon, Apr 17, 2023 at 02:56:49PM +0200, Thomas Zimmermann wrote: >> Other architectures implment fb_is_primary_device() in a source >> file. Do the same on sparc. No functional changes, but allows to >> remove several include statement from

Re: [PATCH v6 5/6] fbdev: Move framebuffer I/O helpers into

2023-05-11 Thread Arnd Bergmann
On Thu, May 11, 2023, at 15:22, Artur Rojek wrote: > On 2023-05-11 14:35, Geert Uytterhoeven wrote: >> >> CC Artur, who's working on HP Jornada 680. > Thanks for CC'ing me - I faced this exact issue while working on my > (still not upstreamed) hd6446x PCMCIA controller driver. The PCMCIA > subsyst

Re: [PATCH v6 5/6] fbdev: Move framebuffer I/O helpers into

2023-05-11 Thread Arnd Bergmann
On Thu, May 11, 2023, at 14:35, Geert Uytterhoeven wrote: > CC Artur, who's working on HP Jornada 680. > > On Wed, May 10, 2023 at 5:55 PM Arnd Bergmann wrote: >> On Wed, May 10, 2023, at 16:27, Thomas Zimmermann wrote: >> > Am 10.05.23 um 16:15 schrieb Arnd Bergman

Re: [PATCH v6 5/6] fbdev: Move framebuffer I/O helpers into

2023-05-10 Thread Arnd Bergmann
On Wed, May 10, 2023, at 16:27, Thomas Zimmermann wrote: > Am 10.05.23 um 16:15 schrieb Arnd Bergmann: >> On Wed, May 10, 2023, at 16:03, kernel test robot wrote: >> I think that's a preexisting bug and I have no idea what the >> correct solution is. Looking for H

Re: [PATCH v6 5/6] fbdev: Move framebuffer I/O helpers into

2023-05-10 Thread Arnd Bergmann
On Wed, May 10, 2023, at 16:03, kernel test robot wrote: > >cc1: warning: arch/sh/include/mach-hp6xx: No such file or directory > [-Wmissing-include-dirs] >cc1: warning: arch/sh/include/mach-hp6xx: No such file or directory > [-Wmissing-include-dirs] >In file included from drivers/vi

  1   2   3   4   >