Re: [PATCH v2] rust: helpers: Remove volatile qualifier from io helpers

2025-04-15 Thread Arnd Bergmann
On Tue, Apr 15, 2025, at 18:28, Miguel Ojeda wrote: > On Sat, Apr 12, 2025 at 2:54 AM FUJITA Tomonori > wrote: >> >> /home/fujita/git/linux-rust/arch/um/include/asm/io.h:19:42: note: passing >> argument to parameter 'addr' here >>19 | static inline void iounmap(void __iomem *addr) >> |

Re: [PATCH v1] um: fix incompatible argument type in iounmap()

2025-04-10 Thread Arnd Bergmann
On Thu, Apr 10, 2025, at 09:30, Geert Uytterhoeven wrote: > On Wed, 9 Apr 2025 at 21:07, Arnd Bergmann wrote: >> On Wed, Apr 9, 2025, at 19:07, Geert Uytterhoeven wrote: >> > On Wed, 9 Apr 2025 at 16:48, Miguel Ojeda > >> In theory we could go through all the old dri

Re: [PATCH v1] um: fix incompatible argument type in iounmap()

2025-04-09 Thread Arnd Bergmann
On Wed, Apr 9, 2025, at 19:07, Geert Uytterhoeven wrote: > > On Wed, 9 Apr 2025 at 16:48, Miguel Ojeda > wrote: >> On Wed, Apr 9, 2025 at 8:16 AM FUJITA Tomonori >> wrote: >> > >> > Align iounmap() signature with other architectures. >> >> Most indeed have `volatile`, but nios2 and m68k don't --

Re: [PATCH v5 14/17] mm: pgtable: introduce generic __tlb_remove_table()

2025-01-08 Thread Arnd Bergmann
also make s390 > __tlb_remove_table() version generic. > > Signed-off-by: Qi Zheng > Reviewed-by: Kevin Brodsky > Acked-by: Andreas Larsson # sparc > Acked-by: Alexander Gordeev # s390 Acked-by: Arnd Bergmann # asm-generic

Re: [PATCH v5 03/17] asm-generic: pgalloc: Provide generic p4d_{alloc_one,free}

2025-01-08 Thread Arnd Bergmann
- > include/asm-generic/pgalloc.h| 45 ++++ > 4 files changed, 45 insertions(+), 58 deletions(-) Acked-by: Arnd Bergmann # asm-generic

Re: um linux: no previous prototype for ‘ioread64_lo_hi’ and friends

2024-12-06 Thread Arnd Bergmann
On Thu, Dec 5, 2024, at 11:33, Jani Nikula wrote: > There's this persistent build warning about missing prototypes with > ARCH=um: > > [12:21:20] Configuring KUnit Kernel ... > [12:21:20] Building KUnit Kernel ... > Populating config with: > $ make ARCH=um O=build.kunit olddefconfig > Building with

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

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 v8 01/14] Consolidate IO memcpy/memset into iomap_copy.c

2024-10-08 Thread Arnd Bergmann
On Tue, Oct 8, 2024, at 11:46, Christoph Hellwig wrote: > On Tue, Oct 08, 2024 at 09:50:09AM +0200, Julian Vetter wrote: >> lib/iomap_copy.c | 127 +++ > > On top of the previous comments: this really should be iomem_copy.c > instead. Right, I suggested

Re: [PATCH v8 01/14] Consolidate IO memcpy/memset into iomap_copy.c

2024-10-08 Thread Arnd Bergmann
On Tue, Oct 8, 2024, at 07:50, Julian Vetter wrote: > diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h > index 80de699bf6af..f14655ed4d9d 100644 > --- a/include/asm-generic/io.h > +++ b/include/asm-generic/io.h > @@ -102,6 +102,12 @@ static inline void log_post_read_mmio(u64 val, u8

[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 86/87] fs: switch timespec64 fields in inode to discrete integers

2023-09-29 Thread Arnd Bergmann
On Thu, Sep 28, 2023, at 13:40, Jeff Layton wrote: > On Thu, 2023-09-28 at 10:19 -0700, Darrick J. Wong wrote: >> >> > I remember seeing those patches go by. I don't remember that change >> > being NaK'ed, but I wasn't paying close attention at the time >> > >> > Looking at it objectively now, I

Re: [PATCH 86/87] fs: switch timespec64 fields in inode to discrete integers

2023-09-29 Thread Arnd Bergmann
On Thu, Sep 28, 2023, at 07:05, Jeff Layton wrote: > This shaves 8 bytes off struct inode, according to pahole. > > Signed-off-by: Jeff Layton FWIW, this is similar to the approach that Deepa suggested back in 2016: https://lore.kernel.org/lkml/1452144972-15802-3-git-send-email-deepa.ker...@gmai

Re: Arches that don't support PREEMPT

2023-09-21 Thread Arnd Bergmann
On Tue, Sep 19, 2023, at 10:16, Peter Zijlstra wrote: > On Tue, Sep 19, 2023 at 03:48:09PM +0200, John Paul Adrian Glaubitz wrote: >> On Tue, 2023-09-19 at 15:42 +0200, Peter Zijlstra wrote: >> > > The agreement to kill off ia64 wasn't an invitation to kill off other >> > > stuff >> > > that peopl

Re: [PATCH 1/2] asm-generic: current: Don't include thread-info.h if building asm

2023-08-19 Thread Arnd Bergmann
ion includes linux/thread-info.h unconditionally, which > leads to errors when either C code or non-asm-compatible preprocessor > directives are included. > > Just wrap the contents behind an #ifndef __ASSEMBLY__ to avoid any C > code making its way in. > > Signed-off-by: Da

Re: [PATCH v3 01/38] Kconfig: introduce HAS_IOPORT option and select it as necessary

2023-03-14 Thread Arnd Bergmann
OPORT specific sections will be added in subsequent patches on > a per subsystem basis. I think it would be helpful to enumerate which architectures do not get HAS_IOPORT added, as they will be affected more. > Co-developed-by: Arnd Bergmann > Signed-off-by: Niklas Schnelle If there ar

Re: [PATCH 3/3] mm, arch: add generic implementation of pfn_valid() for FLATMEM

2023-01-25 Thread Arnd Bergmann
mented as static inline as a generic > implementation of pfn_valid() and drop its per-architecture definitions > > Signed-off-by: Mike Rapoport (IBM) Acked-by: Arnd Bergmann I assume this can best go through the mm tree, let me know if I should pick it up in the

Re: [PATCH 3/3] compiler: inline does not imply notrace

2022-11-22 Thread Arnd Bergmann
On Tue, Nov 22, 2022, at 20:53, Nadav Amit wrote: > From: Nadav Amit > > Functions that are marked as "inline" are currently also not tracable. > Apparently, this has been done to prevent differences between different > configs that caused different functions to be tracable on different > platform

Re: [PATCH v8 27/31] Kbuild: add Rust support

2022-08-17 Thread Arnd Bergmann
On Wed, Aug 17, 2022 at 5:13 PM Miguel Ojeda wrote: > On Wed, Aug 17, 2022 at 4:40 PM Arnd Bergmann wrote: > > > > I tried enabling rust support in the gcc builds I provide at > > https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/arm64/12.1.0/ > > Thanks f

Re: [PATCH v8 27/31] Kbuild: add Rust support

2022-08-17 Thread Arnd Bergmann
On Tue, Aug 2, 2022 at 3:50 AM Miguel Ojeda wrote: > > +# These flags apply to all Rust code in the tree, including the kernel and > +# host programs. > +export rust_common_flags := --edition=2021 \ > + -Zbinary_dep_depinfo=y \ > + -Dunsafe_op_in

[PATCH] treewide: defconfig: address renamed CONFIG_DEBUG_INFO=y

2022-08-11 Thread Arnd Bergmann
From: Arnd Bergmann CONFIG_DEBUG_INFO is now implicitly selected if one picks one of the explicit options that could be DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT, DEBUG_INFO_DWARF4, DEBUG_INFO_DWARF5. This was actually not what I had in mind when I suggested making it a 'choice' statement

Re: [PATCH v3 2/2] asm-generic: Add new pci.h and use it

2022-07-22 Thread Arnd Bergmann
On Fri, Jul 22, 2022 at 6:36 PM Rob Herring wrote: > On Fri, Jul 22, 2022 at 9:27 AM Palmer Dabbelt wrote: > > From fu740: >ranges = <0x8100 0x0 0x6008 0x0 > 0x6008 0x0 0x1>, /* I/O */ ... > So again, how does one get a 0 address handed out when that

Re: [PATCH v3 2/2] asm-generic: Add new pci.h and use it

2022-07-22 Thread Arnd Bergmann
On Fri, Jul 22, 2022 at 1:06 AM Rob Herring wrote: > On Tue, Jul 19, 2022 at 9:59 AM Palmer Dabbelt wrote: > > On Sun, 17 Jul 2022 17:41:14 PDT (-0700), sho...@gmail.com wrote: > > > diff --git a/arch/riscv/include/asm/pci.h b/arch/riscv/include/asm/pci.h > > > index 7fd52a30e605..12ce8150cfb0 1

Re: [PATCH v5 4/4] asm-generic: Add new pci.h and use it

2022-07-22 Thread Arnd Bergmann
On Thu, Jul 21, 2022 at 11:58 PM Stafford Horne wrote: > On Thu, Jul 21, 2022 at 12:37:33PM -0500, Bjorn Helgaas wrote: > > Thanks, you are right, I think some of the earlier functions may have needed > it, > which is why I had it earlier. But now that we have removed those we should > be > ab

Re: [PATCH v4 3/3] asm-generic: Add new pci.h and use it

2022-07-20 Thread Arnd Bergmann
sky does not define this so we >undefine it after including asm-generic/pci.h. Why doesn't csky >define it? If you want to resolve this, I think the easiest way is to add a patch that sets this in csky, I'm quite sure this was just a mistake on their end. > Su

Re: [PATCH v2 2/2] asm-generic: Add new pci.h and use it

2022-07-19 Thread Arnd Bergmann
On Tue, Jul 19, 2022 at 3:05 PM Stafford Horne wrote: > On Tue, Jul 19, 2022 at 09:23:36PM +0900, Stafford Horne wrote: > > On Tue, Jul 19, 2022 at 01:55:03PM +0200, Arnd Bergmann wrote: > > And this is the result, I will get this into the series and create a v4 > tomor

Re: [PATCH v2 2/2] asm-generic: Add new pci.h and use it

2022-07-19 Thread Arnd Bergmann
On Tue, Jul 19, 2022 at 12:55 PM Stafford Horne wrote: > diff --git a/drivers/comedi/drivers/comedi_isadma.c > b/drivers/comedi/drivers/comedi_isadma.c > index 700982464c53..508421809128 100644 > --- a/drivers/comedi/drivers/comedi_isadma.c > +++ b/drivers/comedi/drivers/comedi_isadma.c > @@ -10

Re: [PATCH v2 2/2] asm-generic: Add new pci.h and use it

2022-07-19 Thread Arnd Bergmann
On Tue, Jul 19, 2022 at 1:19 AM Stafford Horne wrote: > On Mon, Jul 18, 2022, 3:56 PM Arnd Bergmann wrote: >> >> As mentioned before, it would be even better to just remove it >> entirely from everything except x86, and enclose the four >> references in an explicit &q

Re: [PATCH v2 2/2] asm-generic: Add new pci.h and use it

2022-07-17 Thread Arnd Bergmann
On Mon, Jul 18, 2022 at 6:37 AM Christoph Hellwig wrote: > > On Sun, Jul 17, 2022 at 12:34:53PM +0900, Stafford Horne wrote: > > Two things to note are: > > > > - isa_dma_bridge_buggy, traditionally this is defined in asm/dma.h but > >these architectures avoid creating that file and add the d

Re: [RFC PATCH 2/2] asm-generic: Add new pci.h and use it

2022-07-15 Thread Arnd Bergmann
On Thu, Jul 14, 2022 at 11:46 PM Stafford Horne wrote: > > The asm/pci.h used for many newer architectures share similar > definitions. Move the common parts to asm-generic/pci.h to allow for > sharing code. This looks very nice, thanks for doing it! > Two things to note are: > > - isa_dma_bri

Re: [PATCH 3/6] M68K: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK

2022-07-14 Thread Arnd Bergmann
On Thu, Jul 14, 2022 at 4:07 AM Huacai Chen wrote: > On Tue, Jul 12, 2022 at 6:15 PM WANG Xuerui wrote: > > On 2022/7/12 17:13, Geert Uytterhoeven wrote: > > > > But judging from the intent of this patch series (fixing WARNs on > > certain configs), and that the triggering condition is currently

Re: [PATCH V6 00/26] mm/mmap: Drop __SXXX/__PXXX macros from across platforms

2022-07-06 Thread Arnd Bergmann
On Wed, Jul 6, 2022 at 8:33 AM Christophe Leroy wrote: > As far as I can see in Kconfig, CONFIG_MMU is user selectable on the > following architectures: > - ARM > - M68K > - RISCV > - SH > > And is disabled by default on XTENSA. Right, the list is complete, though it's also default-enabled for e

Re: [PATCH 20/36] arch/idle: Change arch_cpu_idle() IRQ behaviour

2022-06-08 Thread Arnd Bergmann
On Wed, Jun 8, 2022 at 4:27 PM Peter Zijlstra wrote: > > Current arch_cpu_idle() is called with IRQs disabled, but will return > with IRQs enabled. > > However, the very first thing the generic code does after calling > arch_cpu_idle() is raw_local_irq_disable(). This means that > architectures th

Re: [PATCH 33/36] cpuidle,omap3: Use WFI for omap3_pm_idle()

2022-06-08 Thread Arnd Bergmann
On Wed, Jun 8, 2022 at 4:27 PM Peter Zijlstra wrote: > > arch_cpu_idle() is a very simple idle interface and exposes only a > single idle state and is expected to not require RCU and not do any > tracing/instrumentation. > > As such, omap_sram_idle() is not a valid implementation. Replace it > wit