[PATCH v6 0/7] Add support for memmap on memory feature on ppc64

2023-07-27 Thread Aneesh Kumar K.V
This patch series update memmap on memory feature to fall back to memmap allocation outside the memory block if the alignment rules are not met. This makes the feature more useful on architectures like ppc64 where alignment rules are different with 64K page size. This patch series is dependent on

[PATCH v6 1/7] mm/memory_hotplug: Simplify ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE kconfig

2023-07-27 Thread Aneesh Kumar K.V
Instead of adding menu entry with all supported architectures, add mm/Kconfig variable and select the same from supported architectures. No functional change in this patch. Acked-by: David Hildenbrand Signed-off-by: Aneesh Kumar K.V --- arch/arm64/Kconfig | 4 +--- arch/x86/Kconfig | 4 +---

[PATCH v6 3/7] mm/memory_hotplug: Allow architecture to override memmap on memory support check

2023-07-27 Thread Aneesh Kumar K.V
Some architectures would want different restrictions. Hence add an architecture-specific override. The PMD_SIZE check is moved there. Acked-by: David Hildenbrand Signed-off-by: Aneesh Kumar K.V --- mm/memory_hotplug.c | 24 1 file changed, 20 insertions(+), 4 deletions

[PATCH v6 4/7] mm/memory_hotplug: Support memmap_on_memory when memmap is not aligned to pageblocks

2023-07-27 Thread Aneesh Kumar K.V
Currently, memmap_on_memory feature is only supported with memory block sizes that result in vmemmap pages covering full page blocks. This is because memory onlining/offlining code requires applicable ranges to be pageblock-aligned, for example, to set the migratetypes properly. This patch helps t

[PATCH v6 2/7] mm/memory_hotplug: Allow memmap on memory hotplug request to fallback

2023-07-27 Thread Aneesh Kumar K.V
If not supported, fallback to not using memap on memmory. This avoids the need for callers to do the fallback. Acked-by: David Hildenbrand Signed-off-by: Aneesh Kumar K.V --- drivers/acpi/acpi_memhotplug.c | 3 +-- include/linux/memory_hotplug.h | 3 ++- mm/memory_hotplug.c| 13 ++

Re: [PATCH v2 27/28] dt-bindings: net: fsl,qmc-hdlc: Add framer support

2023-07-27 Thread Conor Dooley
On Wed, Jul 26, 2023 at 05:02:23PM +0200, Herve Codina wrote: > A framer can be connected to the QMC HDLC. > If present, this framer is the interface between the TDM used by the QMC > HDLC and the E1/T1 line. > The QMC HDLC can use this framer to get information about the line and > configure the l

Re: [PATCH v2 05/28] dt-bindings: net: Add support for QMC HDLC

2023-07-27 Thread Conor Dooley
On Wed, Jul 26, 2023 at 05:02:01PM +0200, Herve Codina wrote: > The QMC (QUICC mutichannel controller) is a controller present in some > PowerQUICC SoC such as MPC885. > The QMC HDLC uses the QMC controller to transfer HDLC data. > > Signed-off-by: Herve Codina > --- > .../devicetree/bindings/ne

[PATCH v6 6/7] mm/memory_hotplug: Embed vmem_altmap details in memory block

2023-07-27 Thread Aneesh Kumar K.V
With memmap on memory, some architecture needs more details w.r.t altmap such as base_pfn, end_pfn, etc to unmap vmemmap memory. Instead of computing them again when we remove a memory block, embed vmem_altmap details in struct memory_block if we are using memmap on memory block feature. No functi

[PATCH v6 5/7] powerpc/book3s64/memhotplug: Enable memmap on memory for radix

2023-07-27 Thread Aneesh Kumar K.V
Radix vmemmap mapping can map things correctly at the PMD level or PTE level based on different device boundary checks. Hence we skip the restrictions w.r.t vmemmap size to be multiple of PMD_SIZE. This also makes the feature widely useful because to use PMD_SIZE vmemmap area we require a memory bl

[PATCH v6 7/7] mm/memory_hotplug: Enable runtime update of memmap_on_memory parameter

2023-07-27 Thread Aneesh Kumar K.V
Acked-by: David Hildenbrand Signed-off-by: Aneesh Kumar K.V --- mm/memory_hotplug.c | 35 +++ 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index aa8724bd1d53..7c877756b363 100644 --- a/mm/memory_hotplug.

Re: [PATCH v2 05/28] dt-bindings: net: Add support for QMC HDLC

2023-07-27 Thread Herve Codina
Hi Conor, On Thu, 27 Jul 2023 09:19:59 +0100 Conor Dooley wrote: > On Wed, Jul 26, 2023 at 05:02:01PM +0200, Herve Codina wrote: > > The QMC (QUICC mutichannel controller) is a controller present in some > > PowerQUICC SoC such as MPC885. > > The QMC HDLC uses the QMC controller to transfer HDLC

Re: [PATCH v2 27/28] dt-bindings: net: fsl,qmc-hdlc: Add framer support

2023-07-27 Thread Herve Codina
Hi Conor, On Thu, 27 Jul 2023 09:12:01 +0100 Conor Dooley wrote: > On Wed, Jul 26, 2023 at 05:02:23PM +0200, Herve Codina wrote: > > A framer can be connected to the QMC HDLC. > > If present, this framer is the interface between the TDM used by the QMC > > HDLC and the E1/T1 line. > > The QMC HD

Re: [PATCH v2 22/28] mfd: core: Ensure disabled devices are skiped without aborting

2023-07-27 Thread Lee Jones
On Wed, 26 Jul 2023, Herve Codina wrote: > The loop searching for a matching device based on its compatible > string is aborted when a matching disabled device is found. > This abort avoid to add devices as soon as one disabled device > is found. > > Continue searching for an other device instead

Re: [PATCH v6 4/7] mm/memory_hotplug: Support memmap_on_memory when memmap is not aligned to pageblocks

2023-07-27 Thread Michal Hocko
On Thu 27-07-23 13:32:29, Aneesh Kumar K.V wrote: [...] > + if (mode == MEMMAP_ON_MEMORY_FORCE) { > + unsigned long memmap_pages = > memory_block_memmap_on_memory_pages(); > + > + pr_info_once("Memory hotplug will reserve %ld pages in each > memory block\n", > +

Re: [PATCH v6 6/7] mm/memory_hotplug: Embed vmem_altmap details in memory block

2023-07-27 Thread Michal Hocko
On Thu 27-07-23 13:32:31, Aneesh Kumar K.V wrote: > With memmap on memory, some architecture needs more details w.r.t altmap > such as base_pfn, end_pfn, etc to unmap vmemmap memory. Instead of > computing them again when we remove a memory block, embed vmem_altmap > details in struct memory_block

Re: [PATCH v6 7/7] mm/memory_hotplug: Enable runtime update of memmap_on_memory parameter

2023-07-27 Thread Michal Hocko
ENOCHANGELOG. Considering this is a user visible change then it is really due. On Thu 27-07-23 13:32:32, Aneesh Kumar K.V wrote: > Acked-by: David Hildenbrand > Signed-off-by: Aneesh Kumar K.V > --- > mm/memory_hotplug.c | 35 +++ > 1 file changed, 19 insertions(

Re: [PATCH v6 4/7] mm/memory_hotplug: Support memmap_on_memory when memmap is not aligned to pageblocks

2023-07-27 Thread Aneesh Kumar K V
On 7/27/23 2:53 PM, Michal Hocko wrote: > On Thu 27-07-23 13:32:29, Aneesh Kumar K.V wrote: > [...] >> +if (mode == MEMMAP_ON_MEMORY_FORCE) { >> +unsigned long memmap_pages = >> memory_block_memmap_on_memory_pages(); >> + >> +pr_info_once("Memory hotplug will reserve %l

Re: [PATCH v6 6/7] mm/memory_hotplug: Embed vmem_altmap details in memory block

2023-07-27 Thread Aneesh Kumar K V
On 7/27/23 2:55 PM, Michal Hocko wrote: > On Thu 27-07-23 13:32:31, Aneesh Kumar K.V wrote: >> With memmap on memory, some architecture needs more details w.r.t altmap >> such as base_pfn, end_pfn, etc to unmap vmemmap memory. Instead of >> computing them again when we remove a memory block, embed

Re: [PATCH v2 05/28] dt-bindings: net: Add support for QMC HDLC

2023-07-27 Thread Conor Dooley
On Thu, Jul 27, 2023 at 11:09:48AM +0200, Herve Codina wrote: > On Thu, 27 Jul 2023 09:19:59 +0100 > Conor Dooley wrote: > > On Wed, Jul 26, 2023 at 05:02:01PM +0200, Herve Codina wrote: > If needed, I can change to: > title: QMC (QUICC Multichannel Controller) HDLC > Let me known if it is bett

Re: [PATCH v2 22/28] mfd: core: Ensure disabled devices are skiped without aborting

2023-07-27 Thread Herve Codina
Hi Lee, On Thu, 27 Jul 2023 10:22:09 +0100 Lee Jones wrote: > On Wed, 26 Jul 2023, Herve Codina wrote: > > > The loop searching for a matching device based on its compatible > > string is aborted when a matching disabled device is found. > > This abort avoid to add devices as soon as one disabl

Re: Add fchmodat2() - or add a more general syscall?

2023-07-27 Thread Christian Brauner
On Wed, Jul 26, 2023 at 08:57:10PM -0700, Eric Biggers wrote: > On Tue, Jul 25, 2023 at 04:58:34PM +0100, David Howells wrote: > > Rather than adding a fchmodat2() syscall, should we add a "set_file_attrs()" > > syscall that takes a mask and allows you to set a bunch of stuff all in one > > go? Ba

Re: [PATCH v2 05/28] dt-bindings: net: Add support for QMC HDLC

2023-07-27 Thread Herve Codina
Hi Conor, On Thu, 27 Jul 2023 10:53:15 +0100 Conor Dooley wrote: > On Thu, Jul 27, 2023 at 11:09:48AM +0200, Herve Codina wrote: > > On Thu, 27 Jul 2023 09:19:59 +0100 > > Conor Dooley wrote: > > > On Wed, Jul 26, 2023 at 05:02:01PM +0200, Herve Codina wrote: > > > If needed, I can change

Re: [PATCH v6 4/7] mm/memory_hotplug: Support memmap_on_memory when memmap is not aligned to pageblocks

2023-07-27 Thread Michal Hocko
On Thu 27-07-23 14:57:17, Aneesh Kumar K V wrote: > On 7/27/23 2:53 PM, Michal Hocko wrote: > > On Thu 27-07-23 13:32:29, Aneesh Kumar K.V wrote: > > [...] > >> + if (mode == MEMMAP_ON_MEMORY_FORCE) { > >> + unsigned long memmap_pages = > >> memory_block_memmap_on_memory_pages(); > >> +

Re: [PATCH v6 6/7] mm/memory_hotplug: Embed vmem_altmap details in memory block

2023-07-27 Thread Michal Hocko
On Thu 27-07-23 15:02:12, Aneesh Kumar K V wrote: > On 7/27/23 2:55 PM, Michal Hocko wrote: > > On Thu 27-07-23 13:32:31, Aneesh Kumar K.V wrote: > >> With memmap on memory, some architecture needs more details w.r.t altmap > >> such as base_pfn, end_pfn, etc to unmap vmemmap memory. Instead of > >

Re: [PATCH v6 6/7] mm/memory_hotplug: Embed vmem_altmap details in memory block

2023-07-27 Thread David Hildenbrand
+ /* +* Now that we are tracking alloc and free correctly +* we can add check to verify altmap free pages. +*/ Better remove the history lesson from the comment. "Verify that all vmemmap pages have actually been freed." + if (altmap) { + WA

Re: [PATCH v6 7/7] mm/memory_hotplug: Enable runtime update of memmap_on_memory parameter

2023-07-27 Thread David Hildenbrand
On 27.07.23 10:02, Aneesh Kumar K.V wrote: Acked-by: David Hildenbrand Signed-off-by: Aneesh Kumar K.V --- mm/memory_hotplug.c | 35 +++ 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index aa8724bd1d5

RE: [PATCH v4 2/5] fs: Add fchmodat2()

2023-07-27 Thread David Laight
From: Aleksa Sarai > Sent: 25 July 2023 17:36 ... > We almost certainly want to support AT_EMPTY_PATH at the same time. > Otherwise userspace will still need to go through /proc when trying to > chmod a file handle they have. That can't be allowed. Just because a process has a file open and write

Re: [PATCH v4 2/5] fs: Add fchmodat2()

2023-07-27 Thread Christian Brauner
> > I think it'd be much neater to do the conversion of AT_ flags here and > > pass 0 as a flags argument for all of the wrappers (this is how most of > > the other xyz(), fxyz(), fxyzat() syscall wrappers are done IIRC). I've fixed that up in-tree.

Re: [PATCH v4 3/5] arch: Register fchmodat2, usually as syscall 452

2023-07-27 Thread Christian Brauner
On Wed, Jul 26, 2023 at 02:43:41AM +1000, Aleksa Sarai wrote: > On 2023-07-11, Alexey Gladkov wrote: > > From: Palmer Dabbelt > > > > This registers the new fchmodat2 syscall in most places as nuber 452, > > with alpha being the exception where it's 562. I found all these sites > > by grepping

Re: [RFC PATCH v11 12/29] KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory

2023-07-27 Thread Fuad Tabba
Hi Sean, ... > @@ -5134,6 +5167,16 @@ static long kvm_vm_ioctl(struct file *filp, > case KVM_GET_STATS_FD: > r = kvm_vm_ioctl_get_stats_fd(kvm); > break; > + case KVM_CREATE_GUEST_MEMFD: { > + struct kvm_create_guest_memfd guest_memfd;

[PATCH] dma-mapping: move arch_dma_set_mask() declaration to header

2023-07-27 Thread Arnd Bergmann
From: Arnd Bergmann This function has a __weak definition and an override that is only used on freescale powerpc chips. The powerpc definition however does not see the declaration that is in a .c file: arch/powerpc/kernel/dma-mask.c:7:6: error: no previous prototype for 'arch_dma_set_mask' [-We

[PATCH] powerpc: address missing-prototypes warnings

2023-07-27 Thread Arnd Bergmann
From: Arnd Bergmann There are a few warnings in powerpc64 defconfig builds after -Wmissing-prototypes gets promoted from W=1 to the default warning set: arch/powerpc/mm/book3s64/pgtable.c:422:6: error: no previous prototype for 'arch_report_meminfo' [-Werror=missing-prototypes] arch/powerpc/mm

Re: [PATCH v4 2/5] fs: Add fchmodat2()

2023-07-27 Thread Aleksa Sarai
On 2023-07-26, Alexey Gladkov wrote: > On Wed, Jul 26, 2023 at 02:36:25AM +1000, Aleksa Sarai wrote: > > On 2023-07-11, Alexey Gladkov wrote: > > > On the userspace side fchmodat(3) is implemented as a wrapper > > > function which implements the POSIX-specified interface. This > > > interface dif

Re: [RFC PATCH v11 12/29] KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory

2023-07-27 Thread Sean Christopherson
On Thu, Jul 27, 2023, Fuad Tabba wrote: > Hi Sean, > > > ... > > > @@ -5134,6 +5167,16 @@ static long kvm_vm_ioctl(struct file *filp, > > case KVM_GET_STATS_FD: > > r = kvm_vm_ioctl_get_stats_fd(kvm); > > break; > > + case KVM_CREATE_GUEST_MEMFD: { >

Re: [PATCH v4 2/5] fs: Add fchmodat2()

2023-07-27 Thread Aleksa Sarai
On 2023-07-28, Aleksa Sarai wrote: > On 2023-07-26, Alexey Gladkov wrote: > > On Wed, Jul 26, 2023 at 02:36:25AM +1000, Aleksa Sarai wrote: > > > On 2023-07-11, Alexey Gladkov wrote: > > > > On the userspace side fchmodat(3) is implemented as a wrapper > > > > function which implements the POSIX

Re: [PATCH net-next v3] net: Explicitly include correct DT includes

2023-07-27 Thread Simon Horman
On Wed, Jul 26, 2023 at 07:49:39PM -0600, Rob Herring wrote: > The DT of_device.h and of_platform.h date back to the separate > of_platform_bus_type before it as merged into the regular platform bus. > As part of that merge prepping Arm DT support 13 years ago, they > "temporarily" include each oth

Re: [PATCH v4 2/5] fs: Add fchmodat2()

2023-07-27 Thread dal...@libc.org
On Thu, Jul 27, 2023 at 09:01:06AM +, David Laight wrote: > From: Aleksa Sarai > > Sent: 25 July 2023 17:36 > > > We almost certainly want to support AT_EMPTY_PATH at the same time. > > Otherwise userspace will still need to go through /proc when trying to > > chmod a file handle they have

Re: [PATCH v4 2/5] fs: Add fchmodat2()

2023-07-27 Thread Andreas Schwab
On Jul 27 2023, David Laight wrote: > From: Aleksa Sarai >> Sent: 25 July 2023 17:36 > ... >> We almost certainly want to support AT_EMPTY_PATH at the same time. >> Otherwise userspace will still need to go through /proc when trying to >> chmod a file handle they have. > > That can't be allowed.

Re: [PATCH v4 2/5] fs: Add fchmodat2()

2023-07-27 Thread Christian Brauner
On Thu, Jul 27, 2023 at 06:28:53PM +0200, Andreas Schwab wrote: > On Jul 27 2023, David Laight wrote: > > > From: Aleksa Sarai > >> Sent: 25 July 2023 17:36 > > ... > >> We almost certainly want to support AT_EMPTY_PATH at the same time. > >> Otherwise userspace will still need to go through /proc

Re: [PATCH v4 2/5] fs: Add fchmodat2()

2023-07-27 Thread dal...@libc.org
On Thu, Jul 27, 2023 at 07:02:53PM +0200, Christian Brauner wrote: > On Thu, Jul 27, 2023 at 06:28:53PM +0200, Andreas Schwab wrote: > > On Jul 27 2023, David Laight wrote: > > > > > From: Aleksa Sarai > > >> Sent: 25 July 2023 17:36 > > > ... > > >> We almost certainly want to support AT_EMPTY_PA

Re: [PATCH v4 2/5] fs: Add fchmodat2()

2023-07-27 Thread Christian Brauner
On Thu, Jul 27, 2023 at 01:13:37PM -0400, dal...@libc.org wrote: > On Thu, Jul 27, 2023 at 07:02:53PM +0200, Christian Brauner wrote: > > On Thu, Jul 27, 2023 at 06:28:53PM +0200, Andreas Schwab wrote: > > > On Jul 27 2023, David Laight wrote: > > > > > > > From: Aleksa Sarai > > > >> Sent: 25 Jul

Re: [PATCH v4 3/5] arch: Register fchmodat2, usually as syscall 452

2023-07-27 Thread Aleksa Sarai
On 2023-07-27, Christian Brauner wrote: > On Wed, Jul 26, 2023 at 02:43:41AM +1000, Aleksa Sarai wrote: > > On 2023-07-11, Alexey Gladkov wrote: > > > From: Palmer Dabbelt > > > > > > This registers the new fchmodat2 syscall in most places as nuber 452, > > > with alpha being the exception wher

Algorithmic P-4000i, looking for the board manual

2023-07-27 Thread cp
hi guys I am looking for board manual of the old Algorithmic P-4000i. the purpose is to restore an old board for educational. Does anyone happen to have the manual or info on the board? let me know C.

[PATCH] ASoC: fsl_micfil: refactor deprecated strncpy

2023-07-27 Thread Justin Stitt
rncpy(micfil->name, np->name, sizeof(micfil->name) - 1); + strscpy(micfil->name, np->name, sizeof(micfil->name)); micfil->soc = of_device_get_match_data(&pdev->dev); --- base-commit: 57012c57536f8814dec92e74197ee96c3498d24e change-id: 20230727-sound

Login broken with old userspace (was Re: [PATCH v2] selinux: introduce an initial SID for early boot processes)

2023-07-27 Thread Michael Ellerman
Ondrej Mosnacek writes: > Currently, SELinux doesn't allow distinguishing between kernel threads > and userspace processes that are started before the policy is first > loaded - both get the label corresponding to the kernel SID. The only > way a process that persists from early boot can get a mea

Re: [PATCH] docs: move powerpc under arch

2023-07-27 Thread Michael Ellerman
Costa Shulyupin writes: > and fix all in-tree references. > > Architecture-specific documentation is being moved into Documentation/arch/ > as a way of cleaning up the top-level documentation directory and making > the docs hierarchy more closely match the source hierarchy. > > Signed-off-by: Cost

Re: [PATCH] powerpc: Use shared font data

2023-07-27 Thread Michael Ellerman
li...@treblig.org writes: > From: "Dr. David Alan Gilbert" > > PowerPC has a 'btext' font used for the console which is almost identical > to the shared font_sun8x16, so use it rather than duplicating the data. > > They were actually identical until about a decade ago when >commit bcfbeecea11c

Re: [PATCH net-next v3] net: Explicitly include correct DT includes

2023-07-27 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski : On Wed, 26 Jul 2023 19:49:39 -0600 you wrote: > The DT of_device.h and of_platform.h date back to the separate > of_platform_bus_type before it as merged into the regular platform bus. > As part of that merge prepping