[PATCH] powerpc/papr_scm: trivial: fix typo in a comment

2021-04-18 Thread Kajol Jain
There is a spelling mistake "byes" -> "bytes" in a comment of function drc_pmem_query_stats(). Fix that typo. Signed-off-by: Kajol Jain --- arch/powerpc/platforms/pseries/papr_scm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/pseries/papr_scm.c b/a

Re: [PATCH] powerpc/papr_scm: Reduce error severity if nvdimm stats inaccessible

2021-04-18 Thread kajoljain
On 4/15/21 5:18 PM, Vaibhav Jain wrote: > Ira Weiny writes: > >> On Wed, Apr 14, 2021 at 09:51:40PM +0530, Vaibhav Jain wrote: >>> Thanks for looking into this patch Ira, >>> >>> Ira Weiny writes: >>> On Wed, Apr 14, 2021 at 06:10:26PM +0530, Vaibhav Jain wrote: > Currently drc_pmem_

Re: mmu.c:undefined reference to `patch__hash_page_A0'

2021-04-18 Thread Christophe Leroy
Le 18/04/2021 à 02:02, Randy Dunlap a écrit : HI-- I no longer see this build error. Fixed by https://github.com/torvalds/linux/commit/acdad8fb4a1574323db88f98a38b630691574e16 However: On 2/27/21 2:24 AM, kernel test robot wrote: tree: https://git.kernel.org/pub/scm/linux/kernel/git/

Re: [PATCH 1/2] mm: Fix struct page layout on 32-bit systems

2021-04-18 Thread Ilias Apalodimas
On Sat, Apr 17, 2021 at 09:22:40PM +0100, Matthew Wilcox wrote: > On Sat, Apr 17, 2021 at 09:32:06PM +0300, Ilias Apalodimas wrote: > > > +static inline void page_pool_set_dma_addr(struct page *page, dma_addr_t > > > addr) > > > +{ > > > + page->dma_addr[0] = addr; > > > + if (sizeof(dma_addr_t) >

[PATCH] powerpc: Only define _TASK_CPU for 32-bit

2021-04-18 Thread Michael Ellerman
We have some interesting code in our Makefile to define _TASK_CPU, based on awk'ing the value out of asm-offsets.h. It exists to circumvent some circular header dependencies that prevent us from referring to task_struct in the relevant code. See the comment around _TASK_CPU in smp.h for more detail

[PATCH] powerpc/pseries: Stop calling printk in rtas_stop_self()

2021-04-18 Thread Michael Ellerman
RCU complains about us calling printk() from an offline CPU: = WARNING: suspicious RCU usage 5.12.0-rc7-02874-g7cf90e481cb8 #1 Not tainted - kernel/locking/lockdep.c:3568 RCU-list traversed in non-reader section!! other info that

Re: PPC_FPU, ALTIVEC: enable_kernel_fp, put_vr, get_vr

2021-04-18 Thread Christophe Leroy
Le 17/04/2021 à 22:17, Randy Dunlap a écrit : Hi, kernel test robot reports: drivers/cpufreq/pmac32-cpufreq.c:262:2: error: implicit declaration of function 'enable_kernel_fp' [-Werror,-Wimplicit-function-declaration] enable_kernel_fp(); ^ when # CONFIG_PPC_FPU is

Re: mmu.c:undefined reference to `patch__hash_page_A0'

2021-04-18 Thread Randy Dunlap
On 4/18/21 3:43 AM, Christophe Leroy wrote: > > > Le 18/04/2021 à 02:02, Randy Dunlap a écrit : >> HI-- >> >> I no longer see this build error. > > Fixed by > https://github.com/torvalds/linux/commit/acdad8fb4a1574323db88f98a38b630691574e16 > >> However: >> >> On 2/27/21 2:24 AM, kernel test r

Re: PPC_FPU, ALTIVEC: enable_kernel_fp, put_vr, get_vr

2021-04-18 Thread Segher Boessenkool
On Sun, Apr 18, 2021 at 06:24:29PM +0200, Christophe Leroy wrote: > Le 17/04/2021 à 22:17, Randy Dunlap a écrit : > >Should the code + Kconfigs/Makefiles handle that kind of > >kernel config or should ALTIVEC always mean PPC_FPU as well? > > As far as I understand, Altivec is completely independan

Re: PPC_FPU, ALTIVEC: enable_kernel_fp, put_vr, get_vr

2021-04-18 Thread Randy Dunlap
On 4/18/21 10:46 AM, Segher Boessenkool wrote: > On Sun, Apr 18, 2021 at 06:24:29PM +0200, Christophe Leroy wrote: >> Le 17/04/2021 à 22:17, Randy Dunlap a écrit : >>> Should the code + Kconfigs/Makefiles handle that kind of >>> kernel config or should ALTIVEC always mean PPC_FPU as well? >> >> As

Re: mmu.c:undefined reference to `patch__hash_page_A0'

2021-04-18 Thread Christophe Leroy
Le 18/04/2021 à 19:15, Randy Dunlap a écrit : On 4/18/21 3:43 AM, Christophe Leroy wrote: Le 18/04/2021 à 02:02, Randy Dunlap a écrit : HI-- I no longer see this build error. Fixed by https://github.com/torvalds/linux/commit/acdad8fb4a1574323db88f98a38b630691574e16 However: On 2/27/

[PATCH] Documentation/powerpc: Add proper links for manual and tests

2021-04-18 Thread Haren Myneni
The links that are mentioned in this document are no longer valid. So changed the proper links for NXGZIP user manual and test cases. Signed-off-by: Haren Myneni Reported-by: Bulent Abali --- Documentation/powerpc/vas-api.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --g

[PATCH 1/2] powerpc: add enable_kernel_fp() stub for ALTIVEC without PPC_FPU

2021-04-18 Thread Randy Dunlap
On a kernel config with ALTIVEC=y and PPC_FPU not set/enabled, there is a build error: drivers/cpufreq/pmac32-cpufreq.c:262:2: error: implicit declaration of function 'enable_kernel_fp' [-Werror,-Wimplicit-function-declaration] enable_kernel_fp(); so add a stub function for that when

[PATCH 2/2] powerpc: add ALTIVEC support to lib/ when PPC_FPU not set

2021-04-18 Thread Randy Dunlap
When PPC_FPU is not set and ALTIVEC=y, arch/powerpc/lib/ldstfp.c is not being built, but it is also needed when ALTIVEC=y for get_vr() and put_vr(). ../arch/powerpc/lib/sstep.c: In function 'do_vec_load': ../arch/powerpc/lib/sstep.c:637:3: error: implicit declaration of function 'put_vr' [-Werror

Re: [PATCH] perf vendor events: Initial json/events list for power10 platform

2021-04-18 Thread Paul A. Clarke
On Sat, Apr 17, 2021 at 02:48:50PM +0530, Kajol Jain wrote: > Patch adds initial json/events for POWER10. I was able to apply, build, and run perf with these changes, and every new event at least ran successfully with `perf stat`. Pedantically, there is a lot of inconsistency as to whether the `B

Re: [PATCH 1/3] powerpc/smp: Reintroduce cpu_core_mask

2021-04-18 Thread David Gibson
On Fri, Apr 16, 2021 at 11:15:49AM +0530, Srikar Dronamraju wrote: > * David Gibson [2021-04-16 13:21:34]: > > Thanks for having a look at the patches. > > > On Thu, Apr 15, 2021 at 05:39:32PM +0530, Srikar Dronamraju wrote: > > > Daniel reported that with Commit 4ca234a9cbd7 ("powerpc/smp: Stop

Re: [PATCH 3/3] powerpc/smp: Cache CPU to chip lookup

2021-04-18 Thread David Gibson
On Fri, Apr 16, 2021 at 09:27:48PM +0530, Gautham R Shenoy wrote: > On Thu, Apr 15, 2021 at 11:21:10PM +0530, Srikar Dronamraju wrote: > > * Gautham R Shenoy [2021-04-15 22:49:21]: > > > > > > > > > > +int *chip_id_lookup_table; > > > > + > > > > #ifdef CONFIG_PPC64 > > > > int __initdata iomm

[powerpc:merge] BUILD SUCCESS e4361a664ee985c1f54ddecf80b93159750d93d3

2021-04-18 Thread kernel test robot
onfig mips allyesconfig mips allmodconfig powerpc allyesconfig powerpc allmodconfig powerpc allnoconfig i386 randconfig-a003-20210418 i386 randconfig-a001-202

[powerpc:next] BUILD SUCCESS a38cb4171928f622c8c0ab7902971516540cacad

2021-04-18 Thread kernel test robot
onfig-a003-20210418 i386 randconfig-a001-20210418 i386 randconfig-a006-20210418 i386 randconfig-a005-20210418 i386 randconfig-a004-20210418 i386 randconfig-a002-20210418 x86_64 randconfig-a014-20210

[powerpc:next-test] BUILD SUCCESS a7724a4bae77ecbda157f4ee04ca9333e1bca678

2021-04-18 Thread kernel test robot
allyesconfig mips allmodconfig powerpc allyesconfig powerpc allmodconfig powerpc allnoconfig i386 randconfig-a003-20210418 i386 randconfig-a001

Re: [PATCH V2] mm/page_alloc: Ensure that HUGETLB_PAGE_ORDER is less than MAX_ORDER

2021-04-18 Thread Anshuman Khandual
On 4/12/21 2:17 PM, David Hildenbrand wrote: > On 12.04.21 10:06, Anshuman Khandual wrote: >> + linuxppc-dev@lists.ozlabs.org >> + linux-i...@vger.kernel.org >> >> On 4/12/21 9:18 AM, Anshuman Khandual wrote: >>> pageblock_order must always be less than MAX_ORDER, otherwise it might lead >>> to a

[powerpc:topic/ppc-kvm] BUILD SUCCESS 732f21a3053cf279eb6b85d19b7818a8f1dd2071

2021-04-18 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git topic/ppc-kvm branch HEAD: 732f21a3053cf279eb6b85d19b7818a8f1dd2071 KVM: PPC: Book3S HV: Ensure MSR[HV] is always clear in guest MSR elapsed time: 727m configs tested: 15 configs skipped: 95 The following configs h

Re: [PATCH 0/2] pseries: UNISOLATE DRCs to signal device removal error

2021-04-18 Thread David Gibson
On Fri, Apr 16, 2021 at 06:02:14PM -0300, Daniel Henrique Barboza wrote: > At this moment, PAPR [1] does not have a way to report errors during a device > removal operation. This puts a strain in the hypervisor, which needs extra > mechanisms to try to fallback and recover from an error that might

Re: [PATCH 1/2] dlpar.c: introduce dlpar_unisolate_drc()

2021-04-18 Thread David Gibson
On Fri, Apr 16, 2021 at 06:02:15PM -0300, Daniel Henrique Barboza wrote: > Next patch will execute a set-indicator call in hotplug-cpu.c. > > Create a dlpar_unisolate_drc() helper to avoid spreading more > rtas_set_indicator() calls outside of dlpar.c. > > Signed-off-by: Daniel Henrique Barboza

Re: [PATCH 2/2] hotplug-cpu.c: set UNISOLATE on dlpar_cpu_remove() failure

2021-04-18 Thread David Gibson
On Fri, Apr 16, 2021 at 06:02:16PM -0300, Daniel Henrique Barboza wrote: > The RTAS set-indicator call, when attempting to UNISOLATE a DRC that is > already UNISOLATED or CONFIGURED, returns RTAS_OK and does nothing else > for both QEMU and phyp. This gives us an opportunity to use this > behavior

Re: [PATCH 1/3] powerpc/modules: Load modules closer to kernel text

2021-04-18 Thread Michael Ellerman
On Thu, 1 Apr 2021 13:30:41 + (UTC), Christophe Leroy wrote: > On book3s/32, when STRICT_KERNEL_RWX is selected, modules are > allocated on the segment just before kernel text, ie on the > 0xb000-0xbfff when PAGE_OFFSET is 0xc000. > > On the 8xx, TASK_SIZE is 0x8000. The space

Re: [PATCH] powerpc/signal32: Fix build failure with CONFIG_SPE

2021-04-18 Thread Michael Ellerman
On Sun, 11 Apr 2021 16:39:53 + (UTC), Christophe Leroy wrote: > Add missing fault exit label in unsafe_copy_from_user() in order to > avoid following build failure with CONFIG_SPE > > CC arch/powerpc/kernel/signal_32.o > arch/powerpc/kernel/signal_32.c: In function 'restore_user_regs':

Re: [PATCH RESEND v1 0/4] powerpc/vdso: Add support for time namespaces

2021-04-18 Thread Michael Ellerman
On Wed, 31 Mar 2021 16:48:43 + (UTC), Christophe Leroy wrote: > [Sorry, resending with complete destination list, I used the wrong script on > the first delivery] > > This series adds support for time namespaces on powerpc. > > All timens selftests are successfull. > > Christophe Leroy (3):

Re: [PATCH v2 1/9] powerpc/mem: Move cache flushing functions into mm/cacheflush.c

2021-04-18 Thread Michael Ellerman
On Thu, 8 Apr 2021 15:30:24 + (UTC), Christophe Leroy wrote: > Cache flushing functions are in the middle of completely > unrelated stuff in mm/mem.c > > Create a dedicated mm/cacheflush.c for those functions. > > Also cleanup the list of included headers. Applied to powerpc/next. [1/9] pow

Re: [PATCH] powerpc/xive: Use the "ibm, chip-id" property only under PowerNV

2021-04-18 Thread Michael Ellerman
On Tue, 13 Apr 2021 15:03:52 +0200, Cédric Le Goater wrote: > The 'chip_id' field of the XIVE CPU structure is used to choose a > target for a source located on the same chip. For that, the XIVE > driver queries the chip identifier from the "ibm,chip-id" property > and compares it to a 'src_chip' f

Re: [PATCH v3 0/9] powerpc/xive: Map one IPI interrupt per node

2021-04-18 Thread Michael Ellerman
On Wed, 31 Mar 2021 16:45:05 +0200, Cédric Le Goater wrote: > ipistorm [*] can be used to benchmark the raw interrupt rate of an > interrupt controller by measuring the number of IPIs a system can > sustain. When applied to the XIVE interrupt controller of POWER9 and > POWER10 systems, a significan

Re: [PATCH -next] powerpc/perf/hv-24x7: Make some symbols static

2021-04-18 Thread Michael Ellerman
On Fri, 9 Apr 2021 17:01:24 +0800, Bixuan Cui wrote: > The sparse tool complains as follows: > > arch/powerpc/perf/hv-24x7.c:229:1: warning: > symbol '__pcpu_scope_hv_24x7_txn_flags' was not declared. Should it be > static? > arch/powerpc/perf/hv-24x7.c:230:1: warning: > symbol '__pcpu_scope_hv

Re: [PATCH -next] powerpc/perf: Make symbol 'isa207_pmu_format_attr' static

2021-04-18 Thread Michael Ellerman
On Fri, 9 Apr 2021 17:01:19 +0800, Bixuan Cui wrote: > The sparse tool complains as follows: > > arch/powerpc/perf/isa207-common.c:24:18: warning: > symbol 'isa207_pmu_format_attr' was not declared. Should it be static? > > This symbol is not used outside of isa207-common.c, so this > commit mar

Re: [PATCH -next] powerpc/powernv: make symbol 'mpipl_kobj' static

2021-04-18 Thread Michael Ellerman
On Fri, 9 Apr 2021 14:38:55 +0800, Bixuan Cui wrote: > The sparse tool complains as follows: > > arch/powerpc/platforms/powernv/opal-core.c:74:16: warning: > symbol 'mpipl_kobj' was not declared. > > This symbol is not used outside of opal-core.c, so marks it static. Applied to powerpc/next. [

Re: [PATCH -next] powerpc/pseries: Make symbol '__pcpu_scope_hcall_stats' static

2021-04-18 Thread Michael Ellerman
On Fri, 9 Apr 2021 17:01:09 +0800, Bixuan Cui wrote: > The sparse tool complains as follows: > > arch/powerpc/platforms/pseries/hvCall_inst.c:29:1: warning: > symbol '__pcpu_scope_hcall_stats' was not declared. Should it be static? > > This symbol is not used outside of hvCall_inst.c, so this >

Re: [PATCH -next] powerpc/pseries/pmem: Make symbol 'drc_pmem_match' static

2021-04-18 Thread Michael Ellerman
On Fri, 9 Apr 2021 17:01:14 +0800, Bixuan Cui wrote: > The sparse tool complains as follows: > > arch/powerpc/platforms/pseries/pmem.c:142:27: warning: > symbol 'drc_pmem_match' was not declared. Should it be static? > > This symbol is not used outside of pmem.c, so this > commit marks it static

Re: [PATCH] powerpc/vdso: Separate vvar vma from vdso

2021-04-18 Thread Michael Ellerman
On Fri, 26 Mar 2021 19:17:20 +, Dmitry Safonov wrote: > Since commit 511157ab641e ("powerpc/vdso: Move vdso datapage up front") > VVAR page is in front of the VDSO area. In result it breaks CRIU > (Checkpoint Restore In Userspace) [1], where CRIU expects that "[vdso]" > from /proc/../maps point

Re: [PATCH v3 1/1] powerpc/iommu: Enable remaining IOMMU Pagesizes present in LoPAR

2021-04-18 Thread Michael Ellerman
On Thu, 8 Apr 2021 17:19:16 -0300, Leonardo Bras wrote: > According to LoPAR, ibm,query-pe-dma-window output named "IO Page Sizes" > will let the OS know all possible pagesizes that can be used for creating a > new DDW. > > Currently Linux will only try using 3 of the 8 available options: > 4K, 64

Re: [PATCH -next] powerpc/mce: Make symbol 'mce_ue_event_work' static

2021-04-18 Thread Michael Ellerman
On Thu, 8 Apr 2021 11:58:02 +0800, Li Huafei wrote: > The sparse tool complains as follows: > > arch/powerpc/kernel/mce.c:43:1: warning: > symbol 'mce_ue_event_work' was not declared. Should it be static? > > This symbol is not used outside of mce.c, so this commit marks it > static. Applied to

Re: [PATCH -next] powerpc/security: Make symbol 'stf_barrier' static

2021-04-18 Thread Michael Ellerman
On Thu, 8 Apr 2021 11:39:51 +0800, Li Huafei wrote: > The sparse tool complains as follows: > > arch/powerpc/kernel/security.c:253:6: warning: > symbol 'stf_barrier' was not declared. Should it be static? > > This symbol is not used outside of security.c, so this commit marks it > static. Appli

Re: [PATCH v4 1/2] powerpc/perf: Infrastructure to support checking of attr.config*

2021-04-18 Thread Michael Ellerman
On Thu, 8 Apr 2021 13:15:03 +0530, Madhavan Srinivasan wrote: > Introduce code to support the checking of attr.config* for > values which are reserved for a given platform. > Performance Monitoring Unit (PMU) configuration registers > have fields that are reserved and some specific values for > bit

Re: [PATCH v2] powerpc/eeh: Fix EEH handling for hugepages in ioremap space.

2021-04-18 Thread Michael Ellerman
On Mon, 12 Apr 2021 13:22:50 +0530, Mahesh Salgaonkar wrote: > During the EEH MMIO error checking, the current implementation fails to map > the (virtual) MMIO address back to the pci device on radix with hugepage > mappings for I/O. This results into failure to dispatch EEH event with no > recover

Re: [PATCH v2 0/5] powerpc/rtas: miscellaneous cleanups

2021-04-18 Thread Michael Ellerman
On Thu, 8 Apr 2021 09:06:25 -0500, Nathan Lynch wrote: > This is a reroll of the series posted here: > https://lore.kernel.org/linuxppc-dev/20210114220004.1138993-1-nath...@linux.ibm.com/ > > Originally this work was prompted by failures on radix MMU PowerVM > guests when passing buffers to RTAS t

Re: [PATCH v1 00/12] minor KVM fixes and cleanups

2021-04-18 Thread Michael Ellerman
On Mon, 12 Apr 2021 11:48:33 +1000, Nicholas Piggin wrote: > Here is the first batch of patches are extracted from the patches of the > KVM C conversion series, plus one new fix (host CTRL not restored) since > v6 was posted. > > Please consider for merging. > > Thanks, > Nick > > [...] Applied

Re: [PATCH -next] powerpc/fadump: make symbol 'rtas_fadump_set_regval' static

2021-04-18 Thread Michael Ellerman
On Thu, 8 Apr 2021 14:20:12 +0800, Pu Lehui wrote: > Fix sparse warnings: > > arch/powerpc/platforms/pseries/rtas-fadump.c:250:6: warning: > symbol 'rtas_fadump_set_regval' was not declared. Should it be static? Applied to powerpc/next. [1/1] powerpc/fadump: make symbol 'rtas_fadump_set_regval'

Re: [PATCH 1/2] powerpc: syscalls: switch to generic syscalltbl.sh

2021-04-18 Thread Michael Ellerman
On Tue, 2 Mar 2021 00:30:18 +0900, Masahiro Yamada wrote: > Many architectures duplicate similar shell scripts. > > This commit converts powerpc to use scripts/syscalltbl.sh. This also > unifies syscall_table_32.h and syscall_table_c32.h. Applied to powerpc/next. [1/2] powerpc: syscalls: switch

Re: [PATCH] powerpc/powernv: Enable HAIL (HV AIL) for ISA v3.1 processors

2021-04-18 Thread Michael Ellerman
On Fri, 2 Apr 2021 12:41:24 +1000, Nicholas Piggin wrote: > Starting with ISA v3.1, LPCR[AIL] no longer controls the interrupt > mode for HV=1 interrupts. Instead, a new LPCR[HAIL] bit is defined > which behaves like AIL=3 for HV interrupts when set. > > Set HAIL on bare metal to give us mmu-on in

Re: [PATCH v2 00/11] Move 64e to new interrupt return code

2021-04-18 Thread Michael Ellerman
On Tue, 16 Mar 2021 20:41:54 +1000, Nicholas Piggin wrote: > Since RFC: > - Rebased on Christophe's v3 ppc32 conversion > - Fixed up small details, adds some powerpc-wide cleanups at the end. > > Since v1: > - Christophe's review comments accounted for: > - Split common code interrupt changes for

Re: [PATCH -next] powerpc/xmon: Make symbol 'spu_inst_dump' static

2021-04-18 Thread Michael Ellerman
On Fri, 9 Apr 2021 15:01:51 +0800, Pu Lehui wrote: > Fix sparse warning: > > arch/powerpc/xmon/xmon.c:4216:1: warning: > symbol 'spu_inst_dump' was not declared. Should it be static? > > This symbol is not used outside of xmon.c, so make it static. Applied to powerpc/next. [1/1] powerpc/xmon:

Re: [PATCH 0/3] Reintroduce cpu_core_mask

2021-04-18 Thread Michael Ellerman
On Thu, 15 Apr 2021 17:39:31 +0530, Srikar Dronamraju wrote: > Daniel had reported that > QEMU is now unable to see requested topologies in a multi socket single > NUMA node configurations. > -smp 8,maxcpus=8,cores=2,threads=2,sockets=2 > > This patchset reintroduces cpu_core_mask so that users

Re: [PATCH v3] powerpc/papr_scm: Implement support for H_SCM_FLUSH hcall

2021-04-18 Thread Michael Ellerman
On Mon, 29 Mar 2021 13:36:43 -0400, Shivaprasad G Bhat wrote: > Add support for ND_REGION_ASYNC capability if the device tree > indicates 'ibm,hcall-flush-required' property in the NVDIMM node. > Flush is done by issuing H_SCM_FLUSH hcall to the hypervisor. > > If the flush request failed, the hyp

Re: [PATCH 1/1] powerpc/smp: Set numa node before updating mask

2021-04-18 Thread Michael Ellerman
On Thu, 1 Apr 2021 21:12:00 +0530, Srikar Dronamraju wrote: > Geethika reported a trace when doing a dlpar CPU add. > > [ cut here ] > WARNING: CPU: 152 PID: 1134 at kernel/sched/topology.c:2057 > CPU: 152 PID: 1134 Comm: kworker/152:1 Not tainted 5.12.0-rc5-master #5 > Wor

Re: [PATCH v5] powerpc/traps: Enhance readability for trap types

2021-04-18 Thread Michael Ellerman
On Wed, 14 Apr 2021 19:00:33 +0800, Xiongwei Song wrote: > Define macros to list ppc interrupt types in interttupt.h, replace the > reference of the trap hex values with these macros. > > Referred the hex numbers in arch/powerpc/kernel/exceptions-64e.S, > arch/powerpc/kernel/exceptions-64s.S, arch

Re: [PATCH v3] powerpc: fix EDEADLOCK redefinition error in uapi/asm/errno.h

2021-04-18 Thread Michael Ellerman
On Thu, 17 Sep 2020 06:54:37 -0700, Tony Ambardar wrote: > A few archs like powerpc have different errno.h values for macros > EDEADLOCK and EDEADLK. In code including both libc and linux versions of > errno.h, this can result in multiple definitions of EDEADLOCK in the > include chain. Definitions

Re: [PATCH] powerpc/pseries: extract host bridge from pci_bus prior to bus removal

2021-04-18 Thread Michael Ellerman
On Thu, 11 Feb 2021 12:24:35 -0600, Tyrel Datwyler wrote: > The pci_bus->bridge reference may no longer be valid after > pci_bus_remove() resulting in passing a bad value to device_unregister() > for the associated bridge device. > > Store the host_bridge reference in a separate variable prior to

Re: [PATCH] macintosh/via-pmu: Make some symbols static

2021-04-18 Thread Michael Ellerman
On Wed, 7 Apr 2021 20:58:03 +0800, Yu Kuai wrote: > The sparse tool complains as follows: > > drivers/macintosh/via-pmu.c:183:5: warning: > symbol 'pmu_cur_battery' was not declared. Should it be static? > drivers/macintosh/via-pmu.c:190:5: warning: > symbol '__fake_sleep' was not declared. Shou

Re: [PATCH] macintosh/windfarm: Make symbol 'pm121_sys_state' static

2021-04-18 Thread Michael Ellerman
On Wed, 7 Apr 2021 20:57:12 +0800, Yu Kuai wrote: > The sparse tool complains as follows: > > drivers/macintosh/windfarm_pm121.c:436:24: warning: > symbol 'pm121_sys_state' was not declared. Should it be static? > > This symbol is not used outside of windfarm_pm121.c, so this > commit marks it s

Re: [PATCH v2] powerpc/mm: Add cond_resched() while removing hpte mappings

2021-04-18 Thread Michael Ellerman
On Sun, 4 Apr 2021 22:01:48 +0530, Vaibhav Jain wrote: > While removing large number of mappings from hash page tables for > large memory systems as soft-lockup is reported because of the time > spent inside htap_remove_mapping() like one below: > > watchdog: BUG: soft lockup - CPU#8 stuck for 23

Re: [PATCH] windfarm: make symbol 'wf_thread' static

2021-04-18 Thread Michael Ellerman
On Wed, 7 Apr 2021 20:57:38 +0800, Yu Kuai wrote: > The sparse tool complains as follows: > > drivers/macintosh/windfarm_core.c:59:20: warning: > symbol 'wf_thread' was not declared. Should it be static? > > This symbol is not used outside of windfarm_core.c, so this > commit marks it static. A

Re: [PATCH] powerpc/smp: Make some symbols static

2021-04-18 Thread Michael Ellerman
On Wed, 7 Apr 2021 20:59:03 +0800, Yu Kuai wrote: > The sparse tool complains as follows: > > arch/powerpc/kernel/smp.c:86:1: warning: > symbol '__pcpu_scope_cpu_coregroup_map' was not declared. Should it be > static? > arch/powerpc/kernel/smp.c:125:1: warning: > symbol '__pcpu_scope_thread_gro

Re: [PATCH 1/2] powerpc/configs: Add PAPR_SCM to pseries_defconfig

2021-04-18 Thread Michael Ellerman
On Fri, 16 Apr 2021 21:12:08 +1000, Michael Ellerman wrote: > This is a pseries only driver, it should be built by default as part of > pseries_defconfig to get some build coverage. Applied to powerpc/next. [1/2] powerpc/configs: Add PAPR_SCM to pseries_defconfig https://git.kernel.org/powe

Re: [PATCH] powerpc/64s: power4 nap fixup in C

2021-04-18 Thread Michael Ellerman
Michael Ellerman writes: > On Fri, 12 Mar 2021 11:20:44 +1000, Nicholas Piggin wrote: >> There is no need for this to be in asm, use the new intrrupt entry wrapper. > > Applied to powerpc/next. > > [1/1] powerpc/64s: power4 nap fixup in C > > https://git.kernel.org/powerpc/c/98db179a78dd837

Re: [PATCH 1/6] powerpc/mm/64s: Add _PAGE_KERNEL_ROX

2021-04-18 Thread Michael Ellerman
Michael Ellerman writes: > On Fri, 12 Feb 2021 00:51:25 +1100, Michael Ellerman wrote: >> In the past we had a fallback definition for _PAGE_KERNEL_ROX, but we >> removed that in commit d82fd29c5a8c ("powerpc/mm: Distribute platform >> specific PAGE and PMD flags and definitions") and added defin

Re: [PATCH 2/3] powerpc/mm/hash: Avoid multiple HPT resize-ups on memory hotplug

2021-04-18 Thread David Gibson
On Thu, Apr 08, 2021 at 11:51:36PM -0300, Leonardo Bras wrote: > Hello David, thanks for the feedback! > > On Mon, 2021-03-22 at 18:55 +1100, David Gibson wrote: > > > +void hash_memory_batch_expand_prepare(unsigned long newsize) > > > +{ > > > + /* > > > + * Resizing-up HPT should never fail, bu

Re: [PATCH 3/3] powerpc/mm/hash: Avoid multiple HPT resize-downs on memory hotunplug

2021-04-18 Thread David Gibson
On Fri, Apr 09, 2021 at 12:31:03AM -0300, Leonardo Bras wrote: > Hello David, thanks for commenting. > > On Tue, 2021-03-23 at 10:45 +1100, David Gibson wrote: > > > @@ -805,6 +808,10 @@ static int resize_hpt_for_hotplug(unsigned long > > > new_mem_size, bool shrinking) > > >   if (shrinking) { >

Re: [PATCH v3] powerpc/kexec_file: use current CPU info while setting up FDT

2021-04-18 Thread Hari Bathini
Hi Sourabh, Thanks for fixing this. Generating an FDT based on of_root (the latest unflattened device-tree) should be ideal as something similar to what is done for /cpus here applies to /memory@* & /ibm,dynamic-reconfiguration-memory nodes too (probably also applies to other nodes like pci@*

Re: [RFC/PATCH] powerpc/smp: Add SD_SHARE_PKG_RESOURCES flag to MC sched-domain

2021-04-18 Thread Gautham R Shenoy
Hello Mel, On Mon, Apr 12, 2021 at 11:48:19AM +0100, Mel Gorman wrote: > On Mon, Apr 12, 2021 at 11:06:19AM +0100, Valentin Schneider wrote: > > On 12/04/21 10:37, Mel Gorman wrote: > > > On Mon, Apr 12, 2021 at 11:54:36AM +0530, Srikar Dronamraju wrote: > > >> * Gautham R. Shenoy [2021-04-02 11:

[RFC v1 PATCH 0/3] support soc_device_match to return -EPROBE_DEFER

2021-04-18 Thread Alice Guo (OSS)
From: Alice Guo In patch "soc: imx8m: change to use platform driver", change soc-imx8m.c to use module platform driver and use NVMEM APIs to ocotp register, the reason is that directly reading ocotp egister causes kexec kernel hang because kernel will disable unused clks after kernel boots up. Th

[RFC v1 PATCH 1/3] drivers: soc: add support for soc_device_match returning -EPROBE_DEFER

2021-04-18 Thread Alice Guo (OSS)
From: Alice Guo In i.MX8M boards, the registration of SoC device is later than caam driver which needs it. Caam driver needs soc_device_match to provide -EPROBE_DEFER when no SoC device is registered and no early_soc_dev_attr. Signed-off-by: Alice Guo --- drivers/base/soc.c | 5 + 1 file c

[RFC v1 PATCH 2/3] caam: add defer probe when the caam driver cannot identify SoC

2021-04-18 Thread Alice Guo (OSS)
From: Alice Guo When imx8_soc_info_driver uses module_platform_driver() to regitser itself, the caam driver cannot identify the SoC in the machine because the SoC driver is probed later, so that add return -EPROBE_DEFER. Signed-off-by: Alice Guo --- drivers/crypto/caam/ctrl.c | 3 +++ 1 file c

[RFC v1 PATCH 3/3] driver: update all the code that use soc_device_match

2021-04-18 Thread Alice Guo (OSS)
From: Alice Guo Update all the code that use soc_device_match because add support for soc_device_match returning -EPROBE_DEFER. Signed-off-by: Alice Guo --- drivers/bus/ti-sysc.c | 2 +- drivers/clk/renesas/r8a7795-cpg-mssr.c| 4 +++- drivers/clk/renesas/rcar-

Re: [RFC v1 PATCH 1/3] drivers: soc: add support for soc_device_match returning -EPROBE_DEFER

2021-04-18 Thread Dominique MARTINET
First comment overall for the whole serie: Since it is the solution I had suggested when I reported the problem[1] I have no qualm on the approach, comments for individual patches follow. [1] http://lore.kernel.org/r/YGGZJjAxA1IO+/v...@atmark-techno.com Alice Guo (OSS) wrote on Mon, Apr 19, 2021

Re: [RFC v1 PATCH 3/3] driver: update all the code that use soc_device_match

2021-04-18 Thread Leon Romanovsky
On Mon, Apr 19, 2021 at 12:27:22PM +0800, Alice Guo (OSS) wrote: > From: Alice Guo > > Update all the code that use soc_device_match because add support for > soc_device_match returning -EPROBE_DEFER. > > Signed-off-by: Alice Guo > --- > drivers/bus/ti-sysc.c | 2 +- >

Re: [RFC v1 PATCH 3/3] driver: update all the code that use soc_device_match

2021-04-18 Thread Dominique MARTINET
Alice Guo (OSS) wrote on Mon, Apr 19, 2021 at 12:27:22PM +0800: > From: Alice Guo > > Update all the code that use soc_device_match A single patch might be difficult to accept for all components, a each maintainer will probably want to have a say on their subsystem? I would suggest to split the

Re: [PATCH 1/1] mm: Fix struct page layout on 32-bit systems

2021-04-18 Thread Christoph Hellwig
On Fri, Apr 16, 2021 at 04:27:55PM +0100, Matthew Wilcox wrote: > On Thu, Apr 15, 2021 at 08:08:32PM +0200, Jesper Dangaard Brouer wrote: > > See below patch. Where I swap32 the dma address to satisfy > > page->compound having bit zero cleared. (It is the simplest fix I could > > come up with). >