[PATCH V5 7/7] mm/mmap: Drop arch_vm_get_page_pgprot()

2022-04-11 Thread Anshuman Khandual
There are no platforms left which use arch_vm_get_page_prot(). Just drop generic arch_vm_get_page_prot(). Cc: Andrew Morton Cc: linux...@kvack.org Cc: linux-ker...@vger.kernel.org Reviewed-by: Catalin Marinas Signed-off-by: Anshuman Khandual --- include/linux/mman.h | 4 mm/mmap.c

[PATCH V5 6/7] mm/mmap: Drop arch_filter_pgprot()

2022-04-11 Thread Anshuman Khandual
There are no platforms left which subscribe ARCH_HAS_FILTER_PGPROT. Hence drop generic arch_filter_pgprot() and also config ARCH_HAS_FILTER_PGPROT. Cc: Andrew Morton Cc: linux...@kvack.org Cc: linux-ker...@vger.kernel.org Reviewed-by: Catalin Marinas Signed-off-by: Anshuman Khandual ---

[PATCH V5 5/7] x86/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-04-11 Thread Anshuman Khandual
From: Christoph Hellwig This defines and exports a platform specific custom vm_get_page_prot() via subscribing ARCH_HAS_VM_GET_PAGE_PROT. This also unsubscribes from config ARCH_HAS_FILTER_PGPROT, after dropping off arch_filter_pgprot() and arch_vm_get_page_prot(). Cc: Thomas Gleixner Cc: Ingo

[PATCH V5 4/7] sparc/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-04-11 Thread Anshuman Khandual
This defines and exports a platform specific custom vm_get_page_prot() via subscribing ARCH_HAS_VM_GET_PAGE_PROT. It localizes arch_vm_get_page_prot() as sparc_vm_get_page_prot() and moves near vm_get_page_prot(). Cc: "David S. Miller" Cc: Khalid Aziz Cc: sparcli...@vger.kernel.org Cc:

[PATCH V5 3/7] arm64/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-04-11 Thread Anshuman Khandual
This defines and exports a platform specific custom vm_get_page_prot() via subscribing ARCH_HAS_VM_GET_PAGE_PROT. It localizes arch_vm_get_page_prot() and moves it near vm_get_page_prot(). Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-ker...@lists.infradead.org Cc:

[PATCH V5 2/7] powerpc/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-04-11 Thread Anshuman Khandual
This defines and exports a platform specific custom vm_get_page_prot() via subscribing ARCH_HAS_VM_GET_PAGE_PROT. While here, this also localizes arch_vm_get_page_prot() as __vm_get_page_prot() and moves it near vm_get_page_prot(). Cc: Michael Ellerman Cc: Paul Mackerras Cc:

[PATCH V5 1/7] mm/mmap: Add new config ARCH_HAS_VM_GET_PAGE_PROT

2022-04-11 Thread Anshuman Khandual
Add a new config ARCH_HAS_VM_GET_PAGE_PROT, which when subscribed enables a given platform to define its own vm_get_page_prot() but still utilizing the generic protection_map[] array. Cc: Andrew Morton Cc: linux...@kvack.org Cc: linux-ker...@vger.kernel.org Reviewed-by: Catalin Marinas

[PATCH V5 0/7] mm/mmap: Drop arch_vm_get_page_prot() and arch_filter_pgprot()

2022-04-11 Thread Anshuman Khandual
protection_map[] is an array based construct that translates given vm_flags combination. This array contains page protection map, which is populated by the platform via [__S000 .. __S111] and [__P000 .. __P111] exported macros. Primary usage for protection_map[] is for vm_get_page_prot(), which is

[PATCH AUTOSEL 5.4 17/21] powerpc: Fix virt_addr_valid() for 64-bit Book3E & 32-bit

2022-04-11 Thread Sasha Levin
From: Kefeng Wang [ Upstream commit ffa0b64e3be58519ae472ea29a1a1ad681e32f48 ] mpe: On 64-bit Book3E vmalloc space starts at 0x8000. Because of the way __pa() works we have: __pa(0x8000) == 0, and therefore virt_to_pfn(0x8000) == 0, and therefore

[PATCH AUTOSEL 5.10 25/30] powerpc: Fix virt_addr_valid() for 64-bit Book3E & 32-bit

2022-04-11 Thread Sasha Levin
From: Kefeng Wang [ Upstream commit ffa0b64e3be58519ae472ea29a1a1ad681e32f48 ] mpe: On 64-bit Book3E vmalloc space starts at 0x8000. Because of the way __pa() works we have: __pa(0x8000) == 0, and therefore virt_to_pfn(0x8000) == 0, and therefore

[PATCH AUTOSEL 5.15 33/41] powerpc: Fix virt_addr_valid() for 64-bit Book3E & 32-bit

2022-04-11 Thread Sasha Levin
From: Kefeng Wang [ Upstream commit ffa0b64e3be58519ae472ea29a1a1ad681e32f48 ] mpe: On 64-bit Book3E vmalloc space starts at 0x8000. Because of the way __pa() works we have: __pa(0x8000) == 0, and therefore virt_to_pfn(0x8000) == 0, and therefore

[PATCH AUTOSEL 5.17 40/49] powerpc: Fix virt_addr_valid() for 64-bit Book3E & 32-bit

2022-04-11 Thread Sasha Levin
From: Kefeng Wang [ Upstream commit ffa0b64e3be58519ae472ea29a1a1ad681e32f48 ] mpe: On 64-bit Book3E vmalloc space starts at 0x8000. Because of the way __pa() works we have: __pa(0x8000) == 0, and therefore virt_to_pfn(0x8000) == 0, and therefore

[PATCH AUTOSEL 5.17 27/49] static_call: Properly initialise DEFINE_STATIC_CALL_RET0()

2022-04-11 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 5517d500829c683a358a8de04ecb2e28af629ae5 ] When a static call is updated with __static_call_return0() as target, arch_static_call_transform() set it to use an optimised set of instructions which are meant to lay in the same cacheline. But when

[PATCH AUTOSEL 5.17 01/49] KVM: PPC: Book3S HV P9: Fix "lost kick" race

2022-04-11 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit c7fa848ff01dad9ed3146a6b1a7d3622131bcedd ] When new work is created that requires attention from the hypervisor (e.g., to inject an interrupt into the guest), fast_vcpu_kick is used to pull the target vcpu out of the guest if it may have been running.

Re: [PATCH] powerpc/numa: Associate numa node to its cpu earlier

2022-04-11 Thread Michael Ellerman
Oscar Salvador writes: > On Mon, Apr 11, 2022 at 02:28:08PM +0530, Srikar Dronamraju wrote: >> Given that my patch got accepted into powerpc tree >> https://git.kernel.org/powerpc/c/e4ff77598a109bd36789ad5e80aba66fc53d0ffb >> is now part of Linus tree, this line may need a slight tweak. > >

Re: [PATCH v2 4/4] tools/perf: Fix perf bench numa testcase to check if CPU used to bind task is online

2022-04-11 Thread Athira Rajeev
> On 09-Apr-2022, at 8:50 PM, Arnaldo Carvalho de Melo wrote: > > Em Wed, Apr 06, 2022 at 11:21:13PM +0530, Athira Rajeev escreveu: >> Perf numa bench test fails with error: >> >> Testcase: >> ./perf bench numa mem -p 2 -t 1 -P 1024 -C 0,8 -M 1,0 -s 20 -zZq >> --thp 1 --no-data_rand_walk >>

Re: [PATCH] powerpc/numa: Associate numa node to its cpu earlier

2022-04-11 Thread Oscar Salvador
On Mon, Apr 11, 2022 at 02:28:08PM +0530, Srikar Dronamraju wrote: > Given that my patch got accepted into powerpc tree > https://git.kernel.org/powerpc/c/e4ff77598a109bd36789ad5e80aba66fc53d0ffb > is now part of Linus tree, this line may need a slight tweak. Right. @Michael: Will you resolve

Re: False positive kmemleak report for dtb properties names on powerpc

2022-04-11 Thread Christophe Leroy
Hi Ariel Le 09/04/2022 à 15:47, Ariel Marcovitch a écrit : > Hi Christophe, did you get the chance to look at this? I tested something this morning, it works for me, see below > > On 23/03/2022 21:06, Mike Rapoport wrote: >> Hi Catalin, >> >> On Wed, Mar 23, 2022 at 05:22:38PM +, Catalin

Re: [PATCH] powerpc/numa: Associate numa node to its cpu earlier

2022-04-11 Thread Srikar Dronamraju
* Oscar Salvador [2022-04-11 09:49:34]: > powerpc is the only platform that do not rely on > cpu_up()->try_online_node() to bring up a numa node, > and special cases it, instead, deep in its own machinery: > > dlpar_online_cpu > find_and_online_cpu_nid > try_online_node > > This should not

[RFC v4 PATCH 5/5] powerpc/crash hp: add crash hotplug support for kexec_load

2022-04-11 Thread Sourabh Jain
The kernel changes needed for crash hotplug support for kexec_load system calls are similar to kexec_file_load (which has already been implemented in earlier patches) except for finding the index of the FDT segment in the kexec segment array. Since the kexec segment array is prepared by the kexec

[RFC v4 PATCH 0/5] In kernel handling of CPU hotplug events for crash kernel

2022-04-11 Thread Sourabh Jain
This patch series implements the crash hotplug handler on PowerPC introduced by https://lkml.org/lkml/2022/3/3/674 patch series. The Problem: Post hotplug/DLPAR events the capture kernel holds stale information about the system. Dump collection with stale capture kernel might end up

[RFC v4 PATCH 1/5] powerpc/kexec: make update_cpus_node non-static

2022-04-11 Thread Sourabh Jain
Make the update_cpus_node function non-static and export it for usage in other kexec components. The update_cpus_node definition is moved to core_64.c so that it can be used with both kexec_load and kexec_file_load system calls. Signed-off-by: Sourabh Jain --- arch/powerpc/include/asm/kexec.h

[RFC v4 PATCH 4/5] powerpc/crash hp: add crash hotplug support for kexec_file_load

2022-04-11 Thread Sourabh Jain
Two major changes are done to enable the crash CPU hotplug handler. Firstly, updated the kexec load path to prepare kimage for hotplug changes, and secondly, implemented the crash hotplug handler. On the kexec load path, the memsz allocation of the crash FDT segment is updated to ensure that it

[RFC v4 PATCH 2/5] powerpc/crash hp: introduce a new config option CRASH_HOTPLUG

2022-04-11 Thread Sourabh Jain
The option CRASH_HOTPLUG enables, in kernel update to kexec segments on hotplug events. All the updates needed on the capture kernel load path in the kernel for both kexec_load and kexec_file_load system will be kept under this config. Signed-off-by: Sourabh Jain Reviewed-by: Eric DeVolder ---

[RFC v4 PATCH 3/5] powrepc/crash hp: update kimage_arch struct

2022-04-11 Thread Sourabh Jain
Two new members fdt_index and fdt_index_valid are added in kimage_arch struct to track the FDT kexec segment. These new members of kimage_arch struct will help the crash hotplug handler to easily access the FDT segment from the kexec segment array. Otherwise, we have to loop through all kexec

[PATCH v3 08/12] serial: General support for multipoint addresses

2022-04-11 Thread Ilpo Järvinen
Add generic support for serial multipoint addressing. Two new ioctls are added. TIOCSADDR is used to indicate the destination/receive address. TIOCGADDR returns the current address in use. The driver should implement set_addr and get_addr to support addressing mode. Adjust ADDRB clearing to

[PATCH v3 07/12] serial: termbits: ADDRB to indicate 9th bit addressing mode

2022-04-11 Thread Ilpo Järvinen
Add ADDRB to termbits to indicate 9th bit addressing mode. This change is necessary for supporting devices with RS485 multipoint addressing [*]. A later patch in the patch series adds support for Synopsys Designware UART capable for 9th bit addressing mode. In this mode, 9th bit is used to

Re: [PATCH] powerpc/numa: Handle partially initialized numa nodes

2022-04-11 Thread Geetika Moolchandani1
From: Srikar Dronamraju Sent: Friday, April 8, 2022 5:55 PM To: Oscar Salvador Cc: Michael Ellerman ; linuxppc-dev ; linux...@kvack.org ; Michal Hocko ; Geetika Moolchandani1 Subject: Re: [PATCH] powerpc/numa: Handle partially initialized numa nodes *

Re: [PATCH v2] macintosh: via-pmu and via-cuda need RTC_LIB

2022-04-11 Thread Arnd Bergmann
On Sun, Apr 10, 2022 at 6:10 PM Randy Dunlap wrote: > > Fix build when RTC_LIB is not set/enabled. > Eliminates these build errors: > > m68k-linux-ld: drivers/macintosh/via-pmu.o: in function `pmu_set_rtc_time': > drivers/macintosh/via-pmu.c:1769: undefined reference to `rtc_tm_to_time64' >

Re: [PATCH] powerpc/numa: Handle partially initialized numa nodes

2022-04-11 Thread Oscar Salvador
On Sun, Apr 10, 2022 at 09:28:38PM +1000, Michael Ellerman wrote: > Yeah agreed, thanks for getting to the root of the problem. > > Can you resend as a standalone patch. Because you sent it as a reply it > won't be recognised by patchwork[1] which means it risks getting lost. Hi Michael, It's

[PATCH] powerpc/numa: Associate numa node to its cpu earlier

2022-04-11 Thread Oscar Salvador
powerpc is the only platform that do not rely on cpu_up()->try_online_node() to bring up a numa node, and special cases it, instead, deep in its own machinery: dlpar_online_cpu find_and_online_cpu_nid try_online_node This should not be needed, but the thing is that the try_online_node() from