Re: [PATCH] powerpc/pseries/vas: Don't print an error when VAS is unavailable

2021-11-29 Thread Haren Myneni
On Tue, 2021-11-30 at 10:25 +1100, Michael Ellerman wrote: > Nicholas Piggin writes: > > Excerpts from Cédric Le Goater's message of November 26, 2021 5:13 > > pm: > > > On 11/26/21 06:21, Nicholas Piggin wrote: > > > > KVM does not support VAS so guests always print a useless error > > > > on boo

[RFC PATCH] powerpc/signal: sanitise PT_NIP and sa_handler low bits

2021-11-29 Thread Nicholas Piggin
The bottom 2 bits of NIP are ignored when RFI returns with SRR0 = NIP, so regs->nip does not correspond to the actual return address if either of those bits are set. Further, these bits are reserved in SRR0 so they should not be set. Sanitize PT_NIP from signal handlers to ensure they can't be set

Re: [PATCH v5 5/5] powerpc/inst: Optimise copy_inst_from_kernel_nofault()

2021-11-29 Thread Christophe Leroy
Le 29/11/2021 à 23:55, kernel test robot a écrit : Hi Christophe, I love your patch! Perhaps something to improve: [auto build test WARNING on powerpc/next] [also build test WARNING on v5.16-rc3 next-20211129] [If your patch is applied to the wrong git tree, kindly drop us a note. And when

Re: [PATCH] powerpc/rtas: Introduce rtas_get_sensor_nonblocking() for pci hotplug driver.

2021-11-29 Thread Nathan Lynch
Mahesh Salgaonkar writes: > When certain PHB HW failure causes phyp to recover PHB, it marks the PE > state as temporarily unavailable until recovery is complete. This also > triggers an EEH handler in Linux which needs to notify drivers, and perform > recovery. But before notifying the driver abo

[powerpc:merge] BUILD SUCCESS 260ac081931897ee7f554740c6cfc01c475aa703

2021-11-29 Thread kernel test robot
onfig mips allmodconfig powerpc allyesconfig powerpc allmodconfig powerpc allnoconfig i386 randconfig-a001-20211129 i386 randconfig-a002-20211129 i386 randconfig-a00

[powerpc:fixes-test] BUILD SUCCESS 3dc709e518b47386e6af937eaec37bb36539edfd

2021-11-29 Thread kernel test robot
allyesconfig powerpc allmodconfig powerpc allnoconfig i386 randconfig-a001-20211129 i386 randconfig-a002-20211129 i386 randconfig-a006-20211129 i386 randconfig-a005-20211129 i386

[powerpc:next] BUILD SUCCESS af3fdce4ab0781ea183107c90de9cbf21d701c54

2021-11-29 Thread kernel test robot
fconfig sh rsk7203_defconfig arm u8500_defconfig armcerfcube_defconfig arm randconfig-c002-20211128 arm randconfig-c002-20211129 arm randconfig-c002-20211130 ia64 allmodc

[powerpc:next-test] BUILD SUCCESS aebd1fb45c622e9a2b06fb70665d084d3a8d6c78

2021-11-29 Thread kernel test robot
allnoconfig i386 randconfig-a001-20211129 i386 randconfig-a002-20211129 i386 randconfig-a006-20211129 i386 randconfig-a005-20211129 i386 randconfig-a004-20211129 i386 randconfig

Re: [PATCH] powerpc/rtas: Introduce rtas_get_sensor_nonblocking() for pci hotplug driver.

2021-11-29 Thread Tyrel Datwyler
On 11/29/21 5:06 PM, Nathan Lynch wrote: > Tyrel Datwyler writes: >> On 11/29/21 12:58 AM, Mahesh Salgaonkar wrote: >>> -int rtas_get_sensor_fast(int sensor, int index, int *state) >>> +static int >>> +__rtas_get_sensor(int sensor, int index, int *state, bool warn_on) >>> { >>> int token = rt

Re: [PATCH] powerpc/rtas: Introduce rtas_get_sensor_nonblocking() for pci hotplug driver.

2021-11-29 Thread Nathan Lynch
Tyrel Datwyler writes: > On 11/29/21 12:58 AM, Mahesh Salgaonkar wrote: >> -int rtas_get_sensor_fast(int sensor, int index, int *state) >> +static int >> +__rtas_get_sensor(int sensor, int index, int *state, bool warn_on) >> { >> int token = rtas_token("get-sensor-state"); >> int rc; >>

Re: [PATCH 0/2] of: remove reserved regions count restriction

2021-11-29 Thread Rob Herring
On Sun, Nov 21, 2021 at 08:43:47AM +0200, Mike Rapoport wrote: > On Fri, Nov 19, 2021 at 03:58:17PM +0800, Calvin Zhang wrote: > > The count of reserved regions in /reserved-memory was limited because > > the struct reserved_mem array was defined statically. This series sorts > > out reserved memor

Re: [PATCH 1/2] of: Sort reserved_mem related code

2021-11-29 Thread Rob Herring
On Fri, Nov 19, 2021 at 03:58:18PM +0800, Calvin Zhang wrote: > Move code about parsing /reserved-memory and initializing of > reserved_mems array to of_reserved_mem.c for better modularity. > > Rename array name from reserved_mem to reserved_mems to distinguish > from type definition. > > Signed

[PATCH] scsi: ibmvfc: replace snprintf with sysfs_emit

2021-11-29 Thread davidcomponentone
From: Yang Guang coccinelle report: ./drivers/scsi/ibmvscsi/ibmvfc.c:3453:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/ibmvscsi/ibmvfc.c:3416:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/ibmvscsi/ibmvfc.c:3436:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/ibmvscsi/ibm

RE: bug: usb: gadget: FSL_UDC_CORE Corrupted request list leads to unrecoverable loop.

2021-11-29 Thread Eugene Bordenkircher
Agreed, We are happy pick up the torch on this, but I'd like to try and hear from Joakim first before we do. The patch set is his, so I'd like to give him the opportunity. I think he's the only one that can add a truly proper description as well because he mentioned that this includes a "few

RE: bug: usb: gadget: FSL_UDC_CORE Corrupted request list leads to unrecoverable loop.

2021-11-29 Thread Leo Li
> -Original Message- > From: Eugene Bordenkircher > Sent: Monday, November 29, 2021 11:25 AM > To: Thorsten Leemhuis ; jo...@infinera.com > ; linuxppc-dev@lists.ozlabs.org; linux- > u...@vger.kernel.org > Cc: Leo Li ; gre...@linuxfoundation.org; > ba...@kernel.org > Subject: RE: bug: us

Re: [PATCH] powerpc/pseries/vas: Don't print an error when VAS is unavailable

2021-11-29 Thread Michael Ellerman
Nicholas Piggin writes: > Excerpts from Cédric Le Goater's message of November 26, 2021 5:13 pm: >> On 11/26/21 06:21, Nicholas Piggin wrote: >>> KVM does not support VAS so guests always print a useless error on boot >>> >>> vas: HCALL(398) error -2, query_type 0, result buffer 0x57f2000 >>

Re: [PATCH v5 5/5] powerpc/inst: Optimise copy_inst_from_kernel_nofault()

2021-11-29 Thread kernel test robot
Hi Christophe, I love your patch! Perhaps something to improve: [auto build test WARNING on powerpc/next] [also build test WARNING on v5.16-rc3 next-20211129] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--bas

Re: [PATCH RFC 0/4] mm: percpu: Cleanup percpu first chunk funciton

2021-11-29 Thread Dennis Zhou
Hello, On Sun, Nov 21, 2021 at 05:35:53PM +0800, Kefeng Wang wrote: > When support page mapping percpu first chunk allocator on arm64, we > found there are lots of duplicated codes in percpu embed/page first > chunk allocator. This patchset is aimed to cleanup them and should > no funciton change,

Re: [PATCH] powerpc/rtas: Introduce rtas_get_sensor_nonblocking() for pci hotplug driver.

2021-11-29 Thread Tyrel Datwyler
On 11/29/21 12:58 AM, Mahesh Salgaonkar wrote: > When certain PHB HW failure causes phyp to recover PHB, it marks the PE > state as temporarily unavailable until recovery is complete. This also > triggers an EEH handler in Linux which needs to notify drivers, and perform > recovery. But before noti

Re: [PATCH RFC 4/4] mm: percpu: Add generic pcpu_populate_pte() function

2021-11-29 Thread Dennis Zhou
On Sun, Nov 21, 2021 at 05:35:57PM +0800, Kefeng Wang wrote: > When NEED_PER_CPU_PAGE_FIRST_CHUNK enabled, we need a function to > populate pte, add a generic pcpu populate pte function and switch > to use it. > > Signed-off-by: Kefeng Wang > --- > arch/powerpc/kernel/setup_64.c | 47 +--

Re: [PATCH RFC 3/4] mm: percpu: Add generic pcpu_fc_alloc/free funciton

2021-11-29 Thread Dennis Zhou
On Sun, Nov 21, 2021 at 05:35:56PM +0800, Kefeng Wang wrote: > With previous patch, we could add a generic pcpu first chunk > allocation and free function to cleanup the duplicated definations > on each architecture. > > Signed-off-by: Kefeng Wang > --- > arch/mips/mm/init.c| 16 +---

Re: [PATCH RFC 2/4] mm: percpu: Add pcpu_fc_cpu_to_node_fn_t typedef

2021-11-29 Thread Dennis Zhou
On Sun, Nov 21, 2021 at 05:35:55PM +0800, Kefeng Wang wrote: > Add pcpu_fc_cpu_to_node_fn_t and pass it into pcpu_fc_alloc_fn_t, > pcpu first chunk allocation will call it to alloc memblock on the > corresponding node by it. > > Signed-off-by: Kefeng Wang > --- > arch/mips/mm/init.c|

Re: [PATCH RFC 1/4] mm: percpu: Generalize percpu related config

2021-11-29 Thread Dennis Zhou
Hello, On Sun, Nov 21, 2021 at 05:35:54PM +0800, Kefeng Wang wrote: > The HAVE_SETUP_PER_CPU_AREA/NEED_PER_CPU_EMBED_FIRST_CHUNK/ > NEED_PER_CPU_PAGE_FIRST_CHUNK/USE_PERCPU_NUMA_NODE_ID configs, > which has duplicate definitions on platforms that subscribe it. > > Move them into mm, drop these re

Re: [RFC PATCH 0/3] Use pageblock_order for cma and alloc_contig_range alignment.

2021-11-29 Thread Zi Yan
On 23 Nov 2021, at 12:32, Vlastimil Babka wrote: > On 11/23/21 17:35, Zi Yan wrote: >> On 19 Nov 2021, at 10:15, Zi Yan wrote: > From what my understanding, cma required alignment of > max(MAX_ORDER - 1, pageblock_order), because when MIGRATE_CMA was > introduced, > __free_one_pag

Re: [patch 05/22] genirq/msi: Fixup includes

2021-11-29 Thread Thomas Gleixner
Cedric, On Mon, Nov 29 2021 at 08:33, Cédric Le Goater wrote: > On 11/27/21 02:18, Thomas Gleixner wrote: >> Remove the kobject.h include from msi.h as it's not required and add a >> sysfs.h include to the core code instead. >> >> Signed-off-by: Thomas Gleixner > > > This patch breaks compile on

[Bug 215169] UBSAN: shift-out-of-bounds in arch/powerpc/mm/kasan/book3s_32.c:22:23

2021-11-29 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=215169 --- Comment #1 from Erhard F. (erhar...@mailbox.org) --- Created attachment 299779 --> https://bugzilla.kernel.org/attachment.cgi?id=299779&action=edit kernel .config (5.15.5, PowerMac G4 DP) -- You may reply to this email to add a comment. Y

[Bug 215169] New: UBSAN: shift-out-of-bounds in arch/powerpc/mm/kasan/book3s_32.c:22:23

2021-11-29 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=215169 Bug ID: 215169 Summary: UBSAN: shift-out-of-bounds in arch/powerpc/mm/kasan/book3s_32.c:22:23 Product: Platform Specific/Hardware Version: 2.5 Kernel Version: 5.15.5 Ha

[Bug 205099] KASAN hit at raid6_pq: BUG: Unable to handle kernel data access at 0x00f0fd0d

2021-11-29 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205099 --- Comment #45 from Erhard F. (erhar...@mailbox.org) --- Created attachment 299773 --> https://bugzilla.kernel.org/attachment.cgi?id=299773&action=edit kernel_page_tables (5.15.5, OUTLINE KASAN, LOWMEM_SIZE=0x3000, PowerMac G4 DP) Ah yes,

[Bug 205099] KASAN hit at raid6_pq: BUG: Unable to handle kernel data access at 0x00f0fd0d

2021-11-29 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205099 --- Comment #46 from Erhard F. (erhar...@mailbox.org) --- Created attachment 299775 --> https://bugzilla.kernel.org/attachment.cgi?id=299775&action=edit kernel_page_tables (5.15.5, INLINE KASAN, LOWMEM_SIZE=0x2000, PowerMac G4 DP) -- You m

Re: [PATCH] powerpc/pseries/vas: Don't print an error when VAS is unavailable

2021-11-29 Thread Tyrel Datwyler
On 11/26/21 2:31 AM, Nicholas Piggin wrote: > Excerpts from Cédric Le Goater's message of November 26, 2021 5:13 pm: >> On 11/26/21 06:21, Nicholas Piggin wrote: >>> KVM does not support VAS so guests always print a useless error on boot >>> >>> vas: HCALL(398) error -2, query_type 0, result b

[PATCH 11/11] locking: Allow to include asm/spinlock_types.h from linux/spinlock_types_raw.h

2021-11-29 Thread Sebastian Andrzej Siewior
The printk header file includes ratelimit_types.h for its __ratelimit() based usage. It is required for the static initializer used in printk_ratelimited(). It uses a raw_spinlock_t and includes the spinlock_types.h. PREEMPT_RT substitutes spinlock_t with a rtmutex based implementation and so its

Re: [PATCH] recordmcount: Support empty section from recent binutils

2021-11-29 Thread Christophe Leroy
Le 29/11/2021 à 18:43, Steven Rostedt a écrit : On Fri, 26 Nov 2021 08:43:23 + LEROY Christophe wrote: Le 24/11/2021 à 15:43, Christophe Leroy a écrit : Looks like recent binutils (2.36 and over ?) may empty some section, leading to failure like: Cannot find symbol for section

[PATCH 10/10] powerpc/pseries/vas: Write 'target_creds' for QoS credits change

2021-11-29 Thread Haren Myneni
PowerVM support two types of credits - Default (uses normal priority FIFO) and Qality of service (QoS uses high priproty FIFO). The user decides the number of QoS credits and sets this value with HMC interface. With the core add/removal, this value can be changed in HMC which invokes drmgr to com

[PATCH 09/10] powerpc/pseries/vas: sysfs interface to export capabilities

2021-11-29 Thread Haren Myneni
The hypervisor provides the available VAS GZIP capabilities such as default or QoS window type and the target available credits in each type. This patch creates sysfs entries and exports the target, used and the available credits for each feature. This interface can be used by the user space to

[PATCH 08/10] powerpc/vas: Return paste instruction failure if no active window

2021-11-29 Thread Haren Myneni
The VAS window may not be active if the system looses credits and the NX generates page fault when it receives request on unmap paste address. The kernel handles the fault by remap new paste address if the window is active again, Otherwise return the paste instruction failure if the executed ins

[PATCH 07/10] powerpc/vas: Add paste address mmap fault handler

2021-11-29 Thread Haren Myneni
The user space opens VAS windows and issues NX requests by pasting CRB on the corresponding paste address mmap. When the system looses credits due to core removal, the kernel has to close the window in the hypervisor and make the window inactive by unmapping this paste address. Also the OS has to

Re: [PATCH] recordmcount: Support empty section from recent binutils

2021-11-29 Thread Steven Rostedt
On Fri, 26 Nov 2021 08:43:23 + LEROY Christophe wrote: > Le 24/11/2021 à 15:43, Christophe Leroy a écrit : > > Looks like recent binutils (2.36 and over ?) may empty some section, > > leading to failure like: > > > > Cannot find symbol for section 11: .text.unlikely. > > kernel/kexec

[PATCH 06/10] powerpc/vas: Map paste address only if window is active

2021-11-29 Thread Haren Myneni
The paste address mapping is done with mmap() after the window is opened with ioctl. But the window can be closed due to lost credit due to core removal before mmap(). So if the window is not active, return mmap() failure with -EACCES and expects the user space reissue mmap() when the window is a

[PATCH 05/10] powerpc/pseries/vas: Close windows with DLPAR core removal

2021-11-29 Thread Haren Myneni
The hypervisor reduces the available credits if the core is removed from the LPAR. So there is possibility of using excessive credits (windows) in the LPAR and the hypervisor expects the system to close the excessive windows. Even though the user space can continue to use these windows to send co

[PATCH v5 2/5] powerpc/inst: Define ppc_inst_t

2021-11-29 Thread Christophe Leroy
In order to stop using 'struct ppc_inst' on PPC32, define a ppc_inst_t typedef. Signed-off-by: Christophe Leroy --- v3: Rebased and resolved conflicts v2: Anonymise the structure so that only the typedef can be used --- arch/powerpc/include/asm/code-patching.h | 18 +++ arch/powerpc/in

[PATCH v5 4/5] powerpc/inst: Move ppc_inst_t definition in asm/reg.h

2021-11-29 Thread Christophe Leroy
Because of circular inclusion of asm/hw_breakpoint.h, we need to move definition of asm/reg.h outside of inst.h so that asm/hw_breakpoint.h gets it without including asm/inst.h Also remove asm/inst.h from asm/uprobes.h as it's not needed anymore. Signed-off-by: Christophe Leroy --- v4: New to su

[PATCH v5 3/5] powerpc/inst: Define ppc_inst_t as u32 on PPC32

2021-11-29 Thread Christophe Leroy
Unlike PPC64 ABI, PPC32 uses the stack to pass a parameter defined as a struct, even when the struct has a single simple element. To avoid that, define ppc_inst_t as u32 on PPC32. Keep it as 'struct ppc_inst' when __CHECKER__ is defined so that sparse can perform type checking. Also revert commi

[PATCH v5 5/5] powerpc/inst: Optimise copy_inst_from_kernel_nofault()

2021-11-29 Thread Christophe Leroy
copy_inst_from_kernel_nofault() uses copy_from_kernel_nofault() to copy one or two 32bits words. This means calling an out-of-line function which itself calls back copy_from_kernel_nofault_allowed() then performs a generic copy with loops. Rewrite copy_inst_from_kernel_nofault() to do everything a

[PATCH v5 1/5] powerpc/inst: Refactor ___get_user_instr()

2021-11-29 Thread Christophe Leroy
PPC64 version of ___get_user_instr() can be used for PPC32 as well, by simply disabling the suffix part with IS_ENABLED(CONFIG_PPC64). Signed-off-by: Christophe Leroy --- v5: Force use of 'y' in ppc_inst_prefix on PPC32 to avoid 'use variable' warning with W=1 --- arch/powerpc/include/asm/inst.

[PATCH 04/10] powerpc/pseries/vas: Reopen windows with DLPAR core add

2021-11-29 Thread Haren Myneni
VAS windows can be closed in the hypervisor due to lost credits when the core is removed. If these credits are available later for core add, reopen these windows and set them active. When the kernel sees page fault on the paste address, it creates new mapping on the new paste address. Then the us

[PATCH 03/10] powerpc/pseries/vas: Save LPID in pseries_vas_window struct

2021-11-29 Thread Haren Myneni
The kernel sets the VAS window with partition PID when is opened in the hypervisor. During DLPAR operation, windows can be closed and reopened in the hypervisor when the credit is available. So saves this PID in pseries_vas_window struct when the window is opened initially and reuse it later duri

[PATCH 02/10] powerpc/pseries/vas: Add notifier for DLPAR core removal/add

2021-11-29 Thread Haren Myneni
The hypervisor assigns credits for each LPAR based on number of cores configured in that system. So expects to release credits (means windows) when the core is removed. This patch adds notifier for core removal/add so that the OS closes windows if the system looses credits due to core removal and

[PATCH 01/10] powerpc/pseries/vas: Use common names in VAS capability structure

2021-11-29 Thread Haren Myneni
target/used/avail_creds provides credits usage to user space via sysfs and the same interface can be used on PowerNV in future. Remove "lpar" from these names so that applicable on both PowerVM and PowerNV. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/pseries/vas.c | 10 +- a

[PATCH 00/10] powerpc/pseries/vas: NXGZIP support with DLPAR

2021-11-29 Thread Haren Myneni
PowerPC provides HW compression with NX coprocessor. This feature is available on both PowerNV and PowerVM and included in Linux. Since each powerpc chip has one NX coprocessor, the VAS introduces the concept of windows / credits to manage access to this hardware resource. On powerVM, these limit

RE: bug: usb: gadget: FSL_UDC_CORE Corrupted request list leads to unrecoverable loop.

2021-11-29 Thread Eugene Bordenkircher
The final result of our testing is that the patch set posted seems to address all known defects in the Linux kernel. The mentioned additional problems are entirely caused by the antivirus solution on the windows box. The antivirus solution blocks the disconnect messages from reaching the RNDIS

Re: [PATCH v4 1/5] powerpc/inst: Refactor ___get_user_instr()

2021-11-29 Thread kernel test robot
Hi Christophe, I love your patch! Yet something to improve: [auto build test ERROR on powerpc/next] [also build test ERROR on v5.16-rc3 next-20211129] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as doc

Re: [PATCH 1/2] tools/perf: Include global and local variants for p_stage_cyc sort key

2021-11-29 Thread Jiri Olsa
On Thu, Nov 25, 2021 at 08:18:50AM +0530, Athira Rajeev wrote: > Sort key p_stage_cyc is used to present the latency > cycles spend in pipeline stages. perf tool has local > p_stage_cyc sort key to display this info. There is no > global variant available for this sort key. local variant > shows la

Re: [PATCH v5 05/12] KVM: RISC-V: Use Makefile.kvm for common files

2021-11-29 Thread David Woodhouse
On Tue, 2021-11-23 at 14:42 +0530, Anup Patel wrote: > On Sun, Nov 21, 2021 at 6:25 PM David Woodhouse wrote: > > > From: David Woodhouse > > Signed-off-by: David Woodhouse > > Looks good to me. > > For KVM RISC-V, > > Acked-by: Anup Patel > Reviewed-by: Anup Patel Thanks. I've included t

Re: [PATCH 1/2] tools/perf: Include global and local variants for p_stage_cyc sort key

2021-11-29 Thread Jiri Olsa
On Mon, Nov 29, 2021 at 02:43:48PM +0530, Athira Rajeev wrote: > > > > On 28-Nov-2021, at 10:04 PM, Jiri Olsa wrote: > > > > On Thu, Nov 25, 2021 at 08:18:50AM +0530, Athira Rajeev wrote: > >> Sort key p_stage_cyc is used to present the latency > >> cycles spend in pipeline stages. perf tool ha

Re: [PATCH v4 1/5] powerpc/inst: Refactor ___get_user_instr()

2021-11-29 Thread kernel test robot
Hi Christophe, I love your patch! Perhaps something to improve: [auto build test WARNING on powerpc/next] [also build test WARNING on v5.16-rc3 next-20211129] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--bas

[PATCH v3 02/10] powerpc/mm: Move vma_mmu_pagesize() and hugetlb_get_unmapped_area() to slice.c

2021-11-29 Thread Christophe Leroy
vma_mmu_pagesize() is only required for slices, otherwise there is a generic weak version. hugetlb_get_unmapped_area() is dedicated to slices. radix__hugetlb_get_unmapped_area() as well. Move them to slice.c Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/64/hugetlb.h | 4

[PATCH v3 00/10] Convert powerpc to default topdown mmap layout

2021-11-29 Thread Christophe Leroy
Rebased on top of Nic's v5 series "powerpc: Make hash MMU code build configurable" This series converts powerpc to default topdown mmap layout. powerpc provides its own arch_get_unmapped_area() only when slices are needed, which is only for book3s/64. First part of the series moves slices into b

[PATCH v3 10/10] powerpc: Simplify and move arch_randomize_brk()

2021-11-29 Thread Christophe Leroy
arch_randomize_brk() is only needed for hash on book3s/64, for other platforms the one provided by the default mmap layout is good enough. Move it to hash_utils.c and use randomize_page() like the generic one. And properly opt out the radix case instead of making an assumption on mmu_highuser_ssi

[PATCH v3 03/10] powerpc/mm: Remove CONFIG_PPC_MM_SLICES

2021-11-29 Thread Christophe Leroy
CONFIG_PPC_MM_SLICES is always selected by hash book3s/64. CONFIG_PPC_MM_SLICES is never selected by other platforms. Remove it. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/64/hash.h | 4 ++-- arch/powerpc/include/asm/hugetlb.h| 2 +- arch/powerpc/include/asm/p

[PATCH v3 05/10] powerpc/mm: Call radix__arch_get_unmapped_area() from arch_get_unmapped_area()

2021-11-29 Thread Christophe Leroy
Instead of setting mm->get_unmapped_area() to either arch_get_unmapped_area() or radix__arch_get_unmapped_area(), always set it to arch_get_unmapped_area() and call radix__arch_get_unmapped_area() from there when radix is enabled. To keep radix__arch_get_unmapped_area() static, move it to slice.c

[PATCH v3 08/10] powerpc/mm: Properly randomise mmap with slices

2021-11-29 Thread Christophe Leroy
Now that powerpc switched to default topdown mmap layout, mm->mmap_base is properly randomised. However slice_find_area_bottomup() doesn't use mm->mmap_base but uses the fixed TASK_UNMAPPED_BASE instead. slice_find_area_bottomup() being used as a fallback to slice_find_area_topdown(), it can't us

[PATCH v3 04/10] powerpc/mm: Remove asm/slice.h

2021-11-29 Thread Christophe Leroy
Move necessary stuff in asm/book3s/64/slice.h and remove asm/slice.h Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/64/hash.h | 3 ++ arch/powerpc/include/asm/book3s/64/mmu-hash.h | 1 + arch/powerpc/include/asm/book3s/64/slice.h| 18 + arch/powerpc/include

[PATCH v3 06/10] mm: Allow arch specific arch_randomize_brk() with CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT

2021-11-29 Thread Christophe Leroy
Commit e7142bf5d231 ("arm64, mm: make randomization selected by generic topdown mmap layout") introduced a default version of arch_randomize_brk() provided when CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT is selected. powerpc could select CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT but needs to

[PATCH v3 09/10] sizes.h: Add SZ_1T macro

2021-11-29 Thread Christophe Leroy
Today drivers/pci/controller/pci-xgene.c defines SZ_1T Move it into linux/sizes.h so that it can be re-used elsewhere. Cc: Toan Le Cc: linux-...@vger.kernel.org Signed-off-by: Christophe Leroy --- v3: new --- drivers/pci/controller/pci-xgene.c | 1 - include/linux/sizes.h | 2 ++

[PATCH v3 01/10] powerpc/mm: Make slice specific to book3s/64

2021-11-29 Thread Christophe Leroy
Since commit 555904d07eef ("powerpc/8xx: MM_SLICE is not needed anymore") only book3s/64 selects CONFIG_PPC_MM_SLICES. Move slice.c into mm/book3s64/ Signed-off-by: Christophe Leroy --- v2: Remove now unnecessary #ifdef CONFIG_PPC_BOOK3S_64 in slice.c --- arch/powerpc/mm/Makefile

[PATCH v3 07/10] powerpc/mm: Convert to default topdown mmap layout

2021-11-29 Thread Christophe Leroy
Select CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT and remove arch/powerpc/mm/mmap.c This change provides standard randomisation of mmaps. See commit 8b8addf891de ("x86/mm/32: Enable full randomization on i386 and X86_32") for all the benefits of mmap randomisation. Signed-off-by: Christophe Le

Re: [PATCH v5 15/17] powerpc/64s: Make hash MMU support configurable

2021-11-29 Thread Fabiano Rosas
Nicholas Piggin writes: > This adds Kconfig selection which allows 64s hash MMU support to be > disabled. It can be disabled if radix support is enabled, the minimum > supported CPU type is POWER9 (or higher), and KVM is not selected. > > Signed-off-by: Nicholas Piggin > --- > arch/powerpc/Kcon

Re: [PATCH] powerpc/ftrace: Handle large kernel configs

2021-11-29 Thread Christophe Leroy
Hi Naveen, Le 16/10/2018 à 22:25, Naveen N. Rao a écrit : Currently, we expect to be able to reach ftrace_caller() from all ftrace-enabled functions through a single relative branch. With large kernel configs, we see functions outside of 32MB of ftrace_caller() causing ftrace_init() to bail. In

Re: [PATCH v2 28/45] mfd: rn5t618: Use devm_register_power_handler()

2021-11-29 Thread Dmitry Osipenko
29.11.2021 14:55, Lee Jones пишет: > On Thu, 28 Oct 2021, Dmitry Osipenko wrote: > >> Use devm_register_power_handler() that replaces global pm_power_off >> variable and allows to register multiple power-off handlers. It also >> provides restart-handler support, i.e. all in one API. >> >> Signed-o

Re: [PATCH v2 28/45] mfd: rn5t618: Use devm_register_power_handler()

2021-11-29 Thread Lee Jones
On Thu, 28 Oct 2021, Dmitry Osipenko wrote: > Use devm_register_power_handler() that replaces global pm_power_off > variable and allows to register multiple power-off handlers. It also > provides restart-handler support, i.e. all in one API. > > Signed-off-by: Dmitry Osipenko > --- > drivers/mf

Re: [PATCH v4 08/25] kernel: Add combined power-off+restart handler call chain API

2021-11-29 Thread Dmitry Osipenko
29.11.2021 03:36, Michał Mirosław пишет: > On Mon, Nov 29, 2021 at 12:53:51AM +0300, Dmitry Osipenko wrote: >> 29.11.2021 00:17, Michał Mirosław пишет: I'm having trouble with parsing this comment. Could you please try to rephrase it? I don't see how you could check whether power-off hand

[PATCH v4 2/5] powerpc/inst: Define ppc_inst_t

2021-11-29 Thread Christophe Leroy
In order to stop using 'struct ppc_inst' on PPC32, define a ppc_inst_t typedef. Signed-off-by: Christophe Leroy --- v3: Rebased and resolved conflicts v2: Anonymise the structure so that only the typedef can be used Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/code-patching.h

[PATCH v4 4/5] powerpc/inst: Move ppc_inst_t definition in asm/reg.h

2021-11-29 Thread Christophe Leroy
Because of circular inclusion of asm/hw_breakpoint.h, we need to move definition of asm/reg.h outside of inst.h so that asm/hw_breakpoint.h gets it without including asm/inst.h Also remove asm/inst.h from asm/uprobes.h as it's not needed anymore. Signed-off-by: Christophe Leroy --- v4: New to su

[PATCH v4 5/5] powerpc/inst: Optimise copy_inst_from_kernel_nofault()

2021-11-29 Thread Christophe Leroy
copy_inst_from_kernel_nofault() uses copy_from_kernel_nofault() to copy one or two 32bits words. This means calling an out-of-line function which itself calls back copy_from_kernel_nofault_allowed() then performs a generic copy with loops. Rewrite copy_inst_from_kernel_nofault() to do everything a

[PATCH v4 3/5] powerpc/inst: Define ppc_inst_t as u32 on PPC32

2021-11-29 Thread Christophe Leroy
Unlike PPC64 ABI, PPC32 uses the stack to pass a parameter defined as a struct, even when the struct has a single simple element. To avoid that, define ppc_inst_t as u32 on PPC32. Keep it as 'struct ppc_inst' when __CHECKER__ is defined so that sparse can perform type checking. Also revert commi

[PATCH v4 1/5] powerpc/inst: Refactor ___get_user_instr()

2021-11-29 Thread Christophe Leroy
PPC64 version of ___get_user_instr() can be used for PPC32 as well, by simply disabling the suffix part with IS_ENABLED(CONFIG_PPC64). Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/inst.h | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/arch/powerpc/

Re: [PATCH v4 05/25] reboot: Warn if restart handler has duplicated priority

2021-11-29 Thread Dmitry Osipenko
29.11.2021 03:26, Michał Mirosław пишет: > On Mon, Nov 29, 2021 at 12:06:19AM +0300, Dmitry Osipenko wrote: >> 28.11.2021 03:28, Michał Mirosław пишет: >>> On Fri, Nov 26, 2021 at 09:00:41PM +0300, Dmitry Osipenko wrote: Add sanity check which ensures that there are no two restart handlers >>>

Re: [linux-next] Read-only file system after boot (powerpc)

2021-11-29 Thread Sachin Sant
> On 29-Nov-2021, at 3:29 PM, Christoph Hellwig wrote: > > Can you check if your tree already includes this commit: > > https://git.kernel.dk/cgit/linux-block/commit/?h=for-5.17/block&id=3f39d47d7ad858c024bd777f5f2a86fa7f6a9f14 > > and if not see if that fixes the problem? Thanks. Yes, this

Re: [patch 09/22] MIPS: Octeon: Use arch_setup_msi_irq()

2021-11-29 Thread Thomas Bogendoerfer
On Sat, Nov 27, 2021 at 02:18:48AM +0100, Thomas Gleixner wrote: > The core code provides the same loop code except for the MSI-X reject. Move > that to arch_setup_msi_irq() and remove the duplicated code. > > No functional change. > > Signed-off-by: Thomas Gleixner > Cc: Thomas Bogendoerfer >

Re: [linux-next] Read-only file system after boot (powerpc)

2021-11-29 Thread Christoph Hellwig
Can you check if your tree already includes this commit: https://git.kernel.dk/cgit/linux-block/commit/?h=for-5.17/block&id=3f39d47d7ad858c024bd777f5f2a86fa7f6a9f14 and if not see if that fixes the problem?

Re: [patch 00/22] genirq/msi, PCI/MSI: Spring cleaning - Part 1

2021-11-29 Thread Cédric Le Goater
On 11/27/21 02:18, Thomas Gleixner wrote: The [PCI] MSI code has gained quite some warts over time. A recent discussion unearthed a shortcoming: the lack of support for expanding PCI/MSI-X vectors after initialization of MSI-X. PCI/MSI-X has no requirement to setup all vectors when MSI-X is enab

Re: [patch 10/22] genirq/msi, treewide: Use a named struct for PCI/MSI attributes

2021-11-29 Thread Kalle Valo
Thomas Gleixner writes: > The unnamed struct sucks and is in the way of further cleanups. Stick the > PCI related MSI data into a real data structure and cleanup all users. > > No functional change. > > Signed-off-by: Thomas Gleixner > Cc: Greg Kroah-Hartman > Cc: sparcli...@vger.kernel.org > C

Re: [PATCH 1/2] tools/perf: Include global and local variants for p_stage_cyc sort key

2021-11-29 Thread Athira Rajeev
> On 28-Nov-2021, at 10:04 PM, Jiri Olsa wrote: > > On Thu, Nov 25, 2021 at 08:18:50AM +0530, Athira Rajeev wrote: >> Sort key p_stage_cyc is used to present the latency >> cycles spend in pipeline stages. perf tool has local >> p_stage_cyc sort key to display this info. There is no >> global

[PATCH] powerpc/rtas: Introduce rtas_get_sensor_nonblocking() for pci hotplug driver.

2021-11-29 Thread Mahesh Salgaonkar
When certain PHB HW failure causes phyp to recover PHB, it marks the PE state as temporarily unavailable until recovery is complete. This also triggers an EEH handler in Linux which needs to notify drivers, and perform recovery. But before notifying the driver about the pci error it uses get_adapte

Re: [PATCH] powerpc/eeh: Delay slot presence check once driver is notified about the pci error.

2021-11-29 Thread Mahesh J Salgaonkar
On 2021-11-24 23:01:45 Wed, Oliver O'Halloran wrote: > On Wed, Nov 24, 2021 at 12:05 AM Mahesh Salgaonkar > wrote: > > > > *snip* > > > > This causes the EEH handler to get stuck for ~6 > > seconds before it could notify that the pci error has been detected and > > stop any active operations. Hen

Re: [patch 17/22] PCI/MSI: Split out !IRQDOMAIN code

2021-11-29 Thread Cédric Le Goater
On 11/27/21 02:19, Thomas Gleixner wrote: Split out the non irqdomain code into its own file. Signed-off-by: Thomas Gleixner --- drivers/pci/msi/Makefile |5 ++-- drivers/pci/msi/legacy.c | 51 +++ drivers/pci/msi/msi.c| 46 --