Re: [PATCH 2/3] powerpc/mce: Add debugfs interface to inject MCE

2020-09-17 Thread kernel test robot
suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Ganesh-Goudar/powerpc-mce-Fix-mce-handler-and-add-selftest/20200917-092355 base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next config

Re: [PATCH 2/3] powerpc/mce: Add debugfs interface to inject MCE

2020-09-17 Thread kernel test robot
patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Ganesh-Goudar/powerpc-mce-Fix-mce-handler-and-add-selftest/20200917-092355 base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next

Re: [PATCH 1/2] ASoC: fsl_xcvr: Add XCVR ASoC CPU DAI driver

2020-09-17 Thread Nicolin Chen
Hi Viorel, It looks pretty clean to me, though some small comments inline. On Wed, Sep 16, 2020 at 12:17:55PM +0300, Viorel Suman (OSS) wrote: > From: Viorel Suman > > XCVR (Audio Transceiver) is a on-chip functional module found > on i.MX8MP. It support HDMI2.1 eARC, HDMI1.4 ARC and SPDIF. >

[powerpc:next-test] BUILD SUCCESS 10ea0d6512bcf308ed3d00b93571452448cea06c

2020-09-17 Thread kernel test robot
i386 randconfig-a005-20200916 i386 randconfig-a004-20200917 i386 randconfig-a006-20200917 i386 randconfig-a003-20200917 i386 randconfig-a001-20200917 i386 randconfig-a002-20200917 i386

Re: [oss-drivers] [trivial PATCH] treewide: Convert switch/case fallthrough; to break;

2020-09-17 Thread Simon Horman
On Wed, Sep 09, 2020 at 01:06:39PM -0700, Joe Perches wrote: > fallthrough to a separate case/default label break; isn't very readable. > > Convert pseudo-keyword fallthrough; statements to a simple break; when > the next label is case or default and the only statement in the next > label block

linux-next: manual merge of the akpm-current tree with the powerpc tree

2020-09-17 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the akpm-current tree got a conflict in: arch/powerpc/mm/kasan/kasan_init_32.c between commit: 4c42dc5c69a8 ("powerpc/kasan: Fix CONFIG_KASAN_VMALLOC for 8xx") from the powerpc tree and commit: 76713c119a9d ("arch, drivers: replace for_each_membock()

[powerpc:next] BUILD SUCCESS b5c8a2934eecbba3d688a911b98e92f8670ff462

2020-09-17 Thread kernel test robot
randconfig-a002-20200916 i386 randconfig-a005-20200916 i386 randconfig-a004-20200917 i386 randconfig-a006-20200917 i386 randconfig-a003-20200917 i386 randconfig-a001-20200917 i386

Re: [PATCH] ASoC: fsl_audmix: make clock and output src write only

2020-09-17 Thread Mark Brown
On Mon, 14 Sep 2020 20:24:34 +0300, Viorel Suman (OSS) wrote: > "alsactl -f state.conf store/restore" sequence fails because setting > "mixing clock source" and "output source" requires active TDM clock > being started for configuration propagation. Make these two controls > write only so that

Re: [trivial PATCH] treewide: Convert switch/case fallthrough; to break;

2020-09-17 Thread Jacob Keller
On 9/9/2020 1:55 PM, Keith Busch wrote: > On Wed, Sep 09, 2020 at 01:06:39PM -0700, Joe Perches wrote: >> diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c >> index eea0f453cfb6..8aac5bc60f4c 100644 >> --- a/crypto/tcrypt.c >> +++ b/crypto/tcrypt.c >> @@ -2464,7 +2464,7 @@ static int do_test(const

Re: [PATCH -next] ide: Fix symbol undeclared warnings

2020-09-17 Thread David Miller
From: Michael Ellerman Date: Thu, 17 Sep 2020 22:01:00 +1000 > Wang Wensheng writes: >> Build the object file with `C=2` and get the following warnings: >> make allmodconfig ARCH=powerpc CROSS_COMPILE=powerpc64-linux-gnu- >> make C=2 drivers/ide/pmac.o ARCH=powerpc64 >>

Re: [PATCH] selftests/seccomp: fix ptrace tests on powerpc

2020-09-17 Thread Kees Cook
On Sun, Sep 13, 2020 at 10:34:23PM +1000, Michael Ellerman wrote: > Thadeu Lima de Souza Cascardo writes: > > On Tue, Sep 08, 2020 at 04:18:17PM -0700, Kees Cook wrote: > >> On Tue, Jun 30, 2020 at 01:47:39PM -0300, Thadeu Lima de Souza Cascardo > >> wrote: > ... > >> > @@ -1809,10 +1818,15 @@

Re: [PATCH] selftests/seccomp: fix ptrace tests on powerpc

2020-09-17 Thread Thadeu Lima de Souza Cascardo
On Thu, Sep 17, 2020 at 03:37:16PM -0700, Kees Cook wrote: > On Sun, Sep 13, 2020 at 10:34:23PM +1000, Michael Ellerman wrote: > > Thadeu Lima de Souza Cascardo writes: > > > On Tue, Sep 08, 2020 at 04:18:17PM -0700, Kees Cook wrote: > > >> On Tue, Jun 30, 2020 at 01:47:39PM -0300, Thadeu Lima de

Re: [PATCH v2 1/4] powerpc/percpu: Update percpu bootmem allocator

2020-09-17 Thread Michael Ellerman
On Mon, 8 Jun 2020 12:39:01 +0530, Aneesh Kumar K.V wrote: > This update the ppc64 version to be closer to x86/sparc. Applied to powerpc/next. [1/4] powerpc/percpu: Update percpu bootmem allocator https://git.kernel.org/powerpc/c/2a32abac8860aa1c3a1fc99973ce67179575b36c [2/4]

Re: [PATCH] powerpc/uaccess: Add pre-update addressing to __put_user_asm_goto()

2020-09-17 Thread Michael Ellerman
On Fri, 4 Sep 2020 10:46:47 + (UTC), Christophe Leroy wrote: > Enable pre-update addressing mode in __put_user_asm_goto() Applied to powerpc/next. [1/1] powerpc/uaccess: Add pre-update addressing to __put_user_asm_goto()

Re: [PATCH v1] powerpc/process: Replace an #ifdef CONFIG_PPC_BOOK3S_64 by IS_ENABLED()

2020-09-17 Thread Michael Ellerman
On Mon, 17 Aug 2020 05:46:42 + (UTC), Christophe Leroy wrote: > This #ifdef CONFIG_PPC_BOOK3S_64 calls preload_new_slb_context() > when radix is not enabled. > > radix_enabled() is always defined, and the prototype for > preload_new_slb_context() is always present, so the #ifdef > is

Re: [PATCH 0/5] powerpc/tau: TAU driver fixes

2020-09-17 Thread Michael Ellerman
On Sat, 05 Sep 2020 09:02:20 +1000, Finn Thain wrote: > This patch series fixes various bugs in the Thermal Assist Unit driver. > It was tested on 266 MHz and 292 MHz PowerBook G3 laptops. > > > Finn Thain (5): > powerpc/tau: Use appropriate temperature sample interval > powerpc/tau: Convert

Re: [PATCH 1/3] powerpc/uaccess: Switch __put_user_size_allowed() to __put_user_asm_goto()

2020-09-17 Thread Michael Ellerman
On Fri, 4 Sep 2020 11:01:30 + (UTC), Christophe Leroy wrote: > __put_user_asm_goto() provides more flexibility to GCC and avoids using > a local variable to tell if the write succeeded or not. > GCC can then avoid implementing a cmp in the fast path. > > See the difference for a small

Re: [PATCH v1] powerpc/process: Replace an #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) by IS_ENABLED()

2020-09-17 Thread Michael Ellerman
On Mon, 17 Aug 2020 05:46:43 + (UTC), Christophe Leroy wrote: > The #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) encloses some > printk which can be compiled in all cases. > > Replace by IS_ENABLED(). Applied to powerpc/next. [1/1] powerpc/process: Replace an #if defined(CONFIG_4xx) ||

Re: [PATCH v2] powerpc/pci: unmap legacy INTx interrupts when a PHB is removed

2020-09-17 Thread Michael Ellerman
On Fri, 7 Aug 2020 12:18:54 +0200, Cédric Le Goater wrote: > When a passthrough IO adapter is removed from a pseries machine using > hash MMU and the XIVE interrupt mode, the POWER hypervisor expects the > guest OS to clear all page table entries related to the adapter. If > some are still

Re: [PATCH] powerpc/powernv/idle: add a basic stop 0-3 driver for POWER10

2020-09-17 Thread Michael Ellerman
On Wed, 19 Aug 2020 19:47:00 +1000, Nicholas Piggin wrote: > This driver does not restore stop > 3 state, so it limits itself > to states which do not lose full state or TB. > > The POWER10 SPRs are sufficiently different from P9 that it seems > easier to split out the P10 code. The POWER10 deep

[PATCH v2 2/2] powerpc/64s: Convert some cpu_setup() and cpu_restore() functions to C

2020-09-17 Thread Jordan Niethe
The only thing keeping the cpu_setup() and cpu_restore() functions used in the cputable entries for Power7, Power8, Power9 and Power10 in assembly was cpu_restore() being called before there was a stack in generic_secondary_smp_init(). Commit ("powerpc/64: Set up a kernel stack for secondaries

[PATCH v2 1/2] powerpc/64: Set up a kernel stack for secondaries before cpu_restore()

2020-09-17 Thread Jordan Niethe
Currently in generic_secondary_smp_init(), cur_cpu_spec->cpu_restore() is called before a stack has been set up in r1. This was previously fine as the cpu_restore() functions were implemented in assembly and did not use a stack. However commit 5a61ef74f269 ("powerpc/64s: Support new device tree

Re: [PATCH] powerepc/book3s64/hash: Align start/end address correctly with bolt mapping

2020-09-17 Thread Michael Ellerman
On Mon, 7 Sep 2020 12:55:39 +0530, Aneesh Kumar K.V wrote: > This ensures we don't do a partial mapping of memory. With nvdimm, when > creating namespaces with size not aligned to 16MB, the kernel ends up > partially > mapping the pages. This can result in kernel adding multiple hash page table >

Re: [PATCH 1/2] powerpc/8xx: Refactor calculation of number of entries per PTE in page tables

2020-09-17 Thread Michael Ellerman
On Mon, 31 Aug 2020 08:30:43 + (UTC), Christophe Leroy wrote: > On 8xx, the number of entries occupied by a PTE in the page tables > depends on the size of the page. At the time being, this calculation > is done in two places: in pte_update() and in set_huge_pte_at() > > Refactor this

Re: [PATCH 1/2] powerpc/32: Fix vmap stack - Do not activate MMU before reading task struct

2020-09-17 Thread Michael Ellerman
On Mon, 7 Sep 2020 13:42:09 + (UTC), Christophe Leroy wrote: > We need r1 to be properly set before activating MMU, so > reading task_struct->stack must be done with MMU off. > > This means we need an additional register to play with MSR > bits while r11 now points to the stack. For that,

Re: [PATCH] powerpc: Fix random segfault when freeing hugetlb range

2020-09-17 Thread Michael Ellerman
On Mon, 31 Aug 2020 07:58:19 + (UTC), Christophe Leroy wrote: > The following random segfault is observed from time to time with > map_hugetlb selftest: > > root@localhost:~# ./map_hugetlb 1 19 > 524288 kB hugepages > Mapping 1 Mbytes > Segmentation fault > > [...] Applied to powerpc/next.

Re: [PATCH v1] powerpc/process: Tag an #endif to help locate the matching #ifdef.

2020-09-17 Thread Michael Ellerman
On Mon, 17 Aug 2020 05:46:45 + (UTC), Christophe Leroy wrote: > That #endif is more than 100 lines after the matching #ifdef, > and there are several #ifdef/#else/#endif inbetween. > > Tag it as /* CONFIG_PPC_BOOK3S_64 */ to help locate the > matching #ifdef. Applied to powerpc/next. [1/1]

Re: [PATCH v1] powerpc/process: Replace #ifdef CONFIG_KALLSYMS by IS_ENABLED()

2020-09-17 Thread Michael Ellerman
On Mon, 17 Aug 2020 05:46:44 + (UTC), Christophe Leroy wrote: > The #ifdef CONFIG_KALLSYMS encloses some printk which can > compile in all cases. > > Replace by IS_ENABLED(). Applied to powerpc/next. [1/1] powerpc/process: Replace #ifdef CONFIG_KALLSYMS by IS_ENABLED()

Re: [PATCH v3] powerpc/numa: Restrict possible nodes based on platform

2020-09-17 Thread Michael Ellerman
On Mon, 17 Aug 2020 11:22:57 +0530, Srikar Dronamraju wrote: > As per draft LoPAPR (Revision 2.9_pre7), section B.5.3 "Run Time Abstaction > Services (RTAS) Node at > https://openpowerfoundation.org/wp-content/uploads/2020/07/LoPAR-20200611.pdf, > there are 2 device tree property

Re: [PATCH v3] powerpc/pseries/svm: Allocate SWIOTLB buffer anywhere in memory

2020-09-17 Thread Michael Ellerman
On Tue, 18 Aug 2020 19:11:26 -0300, Thiago Jung Bauermann wrote: > POWER secure guests (i.e., guests which use the Protection Execution > Facility) need to use SWIOTLB to be able to do I/O with the hypervisor, but > they don't need the SWIOTLB memory to be in low addresses since the > hypervisor

Re: [PATCH v1 1/4] powerpc/process: Remove useless #ifdef CONFIG_VSX

2020-09-17 Thread Michael Ellerman
On Mon, 17 Aug 2020 05:47:55 + (UTC), Christophe Leroy wrote: > cpu_has_feature(CPU_FTR_VSX) returns false when CONFIG_VSX is > not set. > > There is no need to enclose the test in an #ifdef CONFIG_VSX. > Remove it. Applied to powerpc/next. [1/4] powerpc/process: Remove useless #ifdef

Re: [PATCH v1] powerpc/process: Replace an #ifdef CONFIG_PPC_47x by IS_ENABLED()

2020-09-17 Thread Michael Ellerman
On Mon, 17 Aug 2020 05:46:41 + (UTC), Christophe Leroy wrote: > isync() is always defined, no need for an #ifdef. > > Replace it by IS_ENABLED(CONFIG_PPC_47x). Applied to powerpc/next. [1/1] powerpc/process: Replace an #ifdef CONFIG_PPC_47x by IS_ENABLED()

Re: [PATCH -next] macintosh: windfarm: use for_each_child_of_node() macro

2020-09-17 Thread Michael Ellerman
On Mon, 14 Sep 2020 14:14:11 +0800, Qinglang Miao wrote: > Use for_each_child_of_node() macro instead of open coding it. Applied to powerpc/next. [1/1] macintosh: windfarm: use for_each_child_of_node() macro https://git.kernel.org/powerpc/c/8f7e57e8e29c4fc788811dd4db96126272b8df91 cheers

Re: [PATCH v6 0/8] powerpc/watchpoint: Bug fixes plus new feature flag

2020-09-17 Thread Michael Ellerman
On Wed, 2 Sep 2020 09:59:37 +0530, Ravi Bangoria wrote: > Patch #1 fixes issue for quardword instruction on p10 predecessors. > Patch #2 fixes issue for vector instructions. > Patch #3 fixes a bug about watchpoint not firing when created with > ptrace PPC_PTRACE_SETHWDEBUG and

Re: [PATCH v2 1/2] sched/topology: Allow archs to override cpu_smt_mask

2020-09-17 Thread Michael Ellerman
On Fri, 7 Aug 2020 13:15:16 +0530, Srikar Dronamraju wrote: > cpu_smt_mask tracks topology_sibling_cpumask. This would be good for > most architectures. One of the users of cpu_smt_mask(), would be to > identify idle-cores. On Power9, a pair of SMT4 cores can be presented by > the firmware as a

Re: [PATCH v5 00/10] Coregroup support on Powerpc

2020-09-17 Thread Michael Ellerman
On Mon, 10 Aug 2020 12:48:24 +0530, Srikar Dronamraju wrote: > Changelog v4->v5: > v4: > http://lore.kernel.org/lkml/20200727053230.19753-1-sri...@linux.vnet.ibm.com/t/#u > > Changelog v4 ->v5: > powerpc/smp: Optimize start_secondary > Retain cache domain, no need for generalization >

[PATCH AUTOSEL 5.4 224/330] powerpc/perf: Implement a global lock to avoid races between trace, core and thread imc events.

2020-09-17 Thread Sasha Levin
From: Anju T Sudhakar [ Upstream commit a36e8ba60b991d563677227f172db69e030797e6 ] IMC(In-memory Collection Counters) does performance monitoring in two different modes, i.e accumulation mode(core-imc and thread-imc events), and trace mode(trace-imc events). A cpu thread can either be in

[PATCH AUTOSEL 4.19 055/206] powerpc/powernv/ioda: Fix ref count for devices with their own PE

2020-09-17 Thread Sasha Levin
From: Frederic Barrat [ Upstream commit 05dd7da76986937fb288b4213b1fa10dbe0d1b33 ] The pci_dn structure used to store a pointer to the struct pci_dev, so taking a reference on the device was required. However, the pci_dev pointer was later removed from the pci_dn structure, but the reference

[PATCH AUTOSEL 4.19 165/206] powerpc/traps: Make unrecoverable NMIs die instead of panic

2020-09-17 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit 265d6e588d87194c2fe2d6c240247f0264e0c19b ] System Reset and Machine Check interrupts that are not recoverable due to being nested or interrupting when RI=0 currently panic. This is not necessary, and can often just kill the current context and recover.

[PATCH AUTOSEL 4.14 102/127] powerpc/traps: Make unrecoverable NMIs die instead of panic

2020-09-17 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit 265d6e588d87194c2fe2d6c240247f0264e0c19b ] System Reset and Machine Check interrupts that are not recoverable due to being nested or interrupting when RI=0 currently panic. This is not necessary, and can often just kill the current context and recover.

RE: [PATCHv7 00/12]PCI: dwc: Add the multiple PF support for DWC and Layerscape

2020-09-17 Thread Z.q. Hou
Hi Lorenzo, Thanks a lot for your comments! > -Original Message- > From: Lorenzo Pieralisi > Sent: 2020年9月18日 0:20 > To: Z.q. Hou > Cc: linux-...@vger.kernel.org; devicet...@vger.kernel.org; > linux-ker...@vger.kernel.org; linux-arm-ker...@lists.infradead.org; >

[PATCH AUTOSEL 5.4 030/330] powerpc/64s: Always disable branch profiling for prom_init.o

2020-09-17 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit 6266a4dadb1d0976490fdf5af4f7941e36f64e80 ] Otherwise the build fails because prom_init is calling symbols it's not allowed to, eg: Error: External symbol 'ftrace_likely_update' referenced from prom_init.c make[3]: ***

[PATCH AUTOSEL 5.4 102/330] powerpc/eeh: Only dump stack once if an MMIO loop is detected

2020-09-17 Thread Sasha Levin
From: Oliver O'Halloran [ Upstream commit 4e0942c0302b5ad76b228b1a7b8c09f658a1d58a ] Many drivers don't check for errors when they get a 0xFFs response from an MMIO load. As a result after an EEH event occurs a driver can get stuck in a polling loop unless it some kind of internal timeout

[PATCH AUTOSEL 5.4 270/330] powerpc/traps: Make unrecoverable NMIs die instead of panic

2020-09-17 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit 265d6e588d87194c2fe2d6c240247f0264e0c19b ] System Reset and Machine Check interrupts that are not recoverable due to being nested or interrupting when RI=0 currently panic. This is not necessary, and can often just kill the current context and recover.

[PATCH AUTOSEL 5.4 290/330] KVM: PPC: Book3S HV: Close race with page faults around memslot flushes

2020-09-17 Thread Sasha Levin
From: Paul Mackerras [ Upstream commit 11362b1befeadaae4d159a8cddcdaf6b8afe08f9 ] There is a potential race condition between hypervisor page faults and flushing a memslot. It is possible for a page fault to read the memslot before a memslot is updated and then write a PTE to the

[PATCH AUTOSEL 4.19 114/206] KVM: PPC: Book3S HV: Treat TM-related invalid form instructions on P9 like the valid ones

2020-09-17 Thread Sasha Levin
From: Gustavo Romero [ Upstream commit 1dff3064c764b5a51c367b949b341d2e38972bec ] On P9 DD2.2 due to a CPU defect some TM instructions need to be emulated by KVM. This is handled at first by the hardware raising a softpatch interrupt when certain TM instructions that need KVM assistance are

[PATCH AUTOSEL 5.4 101/330] powerpc/powernv/ioda: Fix ref count for devices with their own PE

2020-09-17 Thread Sasha Levin
From: Frederic Barrat [ Upstream commit 05dd7da76986937fb288b4213b1fa10dbe0d1b33 ] The pci_dn structure used to store a pointer to the struct pci_dev, so taking a reference on the device was required. However, the pci_dev pointer was later removed from the pci_dn structure, but the reference

[PATCH AUTOSEL 5.4 153/330] powerpc/book3s64: Fix error handling in mm_iommu_do_alloc()

2020-09-17 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit c4b78169e3667413184c9a20e11b5832288a109f ] The last jump to free_exit in mm_iommu_do_alloc() happens after page pointers in struct mm_iommu_table_group_mem_t were already converted to physical addresses. Thus calling put_page() on these physical

[PATCH AUTOSEL 5.4 180/330] KVM: PPC: Book3S HV: Treat TM-related invalid form instructions on P9 like the valid ones

2020-09-17 Thread Sasha Levin
From: Gustavo Romero [ Upstream commit 1dff3064c764b5a51c367b949b341d2e38972bec ] On P9 DD2.2 due to a CPU defect some TM instructions need to be emulated by KVM. This is handled at first by the hardware raising a softpatch interrupt when certain TM instructions that need KVM assistance are

[PATCH AUTOSEL 4.19 056/206] powerpc/eeh: Only dump stack once if an MMIO loop is detected

2020-09-17 Thread Sasha Levin
From: Oliver O'Halloran [ Upstream commit 4e0942c0302b5ad76b228b1a7b8c09f658a1d58a ] Many drivers don't check for errors when they get a 0xFFs response from an MMIO load. As a result after an EEH event occurs a driver can get stuck in a polling loop unless it some kind of internal timeout

[PATCH AUTOSEL 4.14 031/127] powerpc/eeh: Only dump stack once if an MMIO loop is detected

2020-09-17 Thread Sasha Levin
From: Oliver O'Halloran [ Upstream commit 4e0942c0302b5ad76b228b1a7b8c09f658a1d58a ] Many drivers don't check for errors when they get a 0xFFs response from an MMIO load. As a result after an EEH event occurs a driver can get stuck in a polling loop unless it some kind of internal timeout

Re: [PATCH] powerpc/tm: Save and restore AMR on treclaim and trechkpt

2020-09-17 Thread Aneesh Kumar K.V
On 9/18/20 9:35 AM, Gustavo Romero wrote: Althought AMR is stashed on the checkpoint area, currently we don't save it to the per thread checkpoint struct after a treclaim and so we don't restore it either from that struct when we trechkpt. As a consequence when the transaction is later rolled

[PATCH] powerpc/tm: Save and restore AMR on treclaim and trechkpt

2020-09-17 Thread Gustavo Romero
Althought AMR is stashed on the checkpoint area, currently we don't save it to the per thread checkpoint struct after a treclaim and so we don't restore it either from that struct when we trechkpt. As a consequence when the transaction is later rolled back kernel space AMR value when the trechkpt

Re: [PATCH v2] powerpc/papr_scm: Fix warning triggered by perf_stats_show()

2020-09-17 Thread Michael Ellerman
On Sat, 12 Sep 2020 13:44:51 +0530, Vaibhav Jain wrote: > A warning is reported by the kernel in case perf_stats_show() returns > an error code. The warning is of the form below: > > papr_scm ibm,persistent-memory:ibm,pmemory@4411: > Failed to query performance stats, Err:-10 >

[Bug 209297] New: powerpc: MPC10X_BRIDGE violates Kconfig dependency of PPC_INDIRECT_PCI on PCI

2020-09-17 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=209297 Bug ID: 209297 Summary: powerpc: MPC10X_BRIDGE violates Kconfig dependency of PPC_INDIRECT_PCI on PCI Product: Platform Specific/Hardware Version: 2.5 Kernel Version: 5.9-rc4

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

2020-09-17 Thread Michael Ellerman
[ Cc += linux-arch & Arnd ] Hi Tony, This looks OK to me, but I'm always a bit nervous about changes in uapi. I've Cc'ed linux-arch and Arnd who look after the asm-generic headers, which this is slightly related to, just in case. One minor comment below. Tony Ambardar writes: > A few archs

Re: [PATCH] powerpc/perf: Exclude pmc5/6 from the irrelevant PMU group constraints

2020-09-17 Thread Michael Ellerman
Athira Rajeev writes: > PMU counter support functions enforces event constraints for group of > events to check if all events in a group can be monitored. Incase of > event codes using PMC5 and PMC6 ( 500fa and 600f4 respectively ), > not all constraints are applicable, say the threshold or

Re: [PATCH v6 6/8] powerpc/watchpoint: Add hw_len wherever missing

2020-09-17 Thread Rogerio Alves
On 9/2/20 1:29 AM, Ravi Bangoria wrote: There are couple of places where we set len but not hw_len. For ptrace/perf watchpoints, when CONFIG_HAVE_HW_BREAKPOINT=Y, hw_len will be calculated and set internally while parsing watchpoint. But when CONFIG_HAVE_HW_BREAKPOINT=N, we need to manually

Re: [PATCH -next] drivers/macintosh/smu.c: Fix undeclared symbol warning

2020-09-17 Thread Michael Ellerman
On Mon, 14 Sep 2020 12:26:15 +, Wang Wensheng wrote: > Make kernel with `C=2`: > drivers/macintosh/smu.c:1018:30: warning: symbol > '__smu_get_sdb_partition' was not declared. Should it be static? Applied to powerpc/next. [1/1] drivers/macintosh/smu.c: Fix undeclared symbol warning

Re: [PATCH -next] ide: Fix symbol undeclared warnings

2020-09-17 Thread Michael Ellerman
Wang Wensheng writes: > Build the object file with `C=2` and get the following warnings: > make allmodconfig ARCH=powerpc CROSS_COMPILE=powerpc64-linux-gnu- > make C=2 drivers/ide/pmac.o ARCH=powerpc64 > CROSS_COMPILE=powerpc64-linux-gnu- > > drivers/ide/pmac.c:228:23: warning: symbol

Re: [PATCH v2 6/7] powerpc/perf: Remove unused variable 'target' in trace_imc_event_init()

2020-09-17 Thread Athira Rajeev
> On 15-Sep-2020, at 2:40 AM, Cédric Le Goater wrote: > > This fixes a compile error with W=1. > > CC arch/powerpc/perf/imc-pmu.o > ../arch/powerpc/perf/imc-pmu.c: In function ‘trace_imc_event_init’: > ../arch/powerpc/perf/imc-pmu.c:1429:22: error: variable ‘target’ set but not > used

Re: [PATCH 1/3] powerpc/mce: remove nmi_enter/exit from real mode handler

2020-09-17 Thread Michal Suchánek
Hello, On Wed, Sep 16, 2020 at 10:52:26PM +0530, Ganesh Goudar wrote: > Use of nmi_enter/exit in real mode handler causes the kernel to panic > and reboot on injecting slb mutihit on pseries machine running in hash > mmu mode, As these calls try to accesses memory outside RMO region in > real

Re: [PATCH 0/3] powerpc/mce: Fix mce handler and add selftest

2020-09-17 Thread Michal Suchánek
Hello, On Wed, Sep 16, 2020 at 10:52:25PM +0530, Ganesh Goudar wrote: > This patch series fixes mce handling for pseries, provides debugfs > interface for mce injection and adds selftest to test mce handling > on pseries/powernv machines running in hash mmu mode. > debugfs interface and sleftest

Re: [PATCH] powerpc/perf: Exclude pmc5/6 from the irrelevant PMU group constraints

2020-09-17 Thread Athira Rajeev
> On 17-Sep-2020, at 5:43 PM, Michael Ellerman wrote: > > Athira Rajeev writes: >> PMU counter support functions enforces event constraints for group of >> events to check if all events in a group can be monitored. Incase of >> event codes using PMC5 and PMC6 ( 500fa and 600f4 respectively

Re: [PATCH v6 0/8] powerpc/watchpoint: Bug fixes plus new feature flag

2020-09-17 Thread Rogerio Alves
On 9/2/20 1:29 AM, Ravi Bangoria wrote: Patch #1 fixes issue for quardword instruction on p10 predecessors. Patch #2 fixes issue for vector instructions. Patch #3 fixes a bug about watchpoint not firing when created with ptrace PPC_PTRACE_SETHWDEBUG and CONFIG_HAVE_HW_BREAKPOINT=N.

Re: [PATCH v6 2/8] powerpc/watchpoint: Fix handling of vector instructions

2020-09-17 Thread Rogerio Alves
On 9/2/20 1:29 AM, Ravi Bangoria wrote: Vector load/store instructions are special because they are always aligned. Thus unaligned EA needs to be aligned down before comparing it with watch ranges. Otherwise we might consider valid event as invalid. Fixes: 74c6881019b7 ("powerpc/watchpoint:

Re: [PATCH v6 7/8] powerpc/watchpoint/ptrace: Introduce PPC_DEBUG_FEATURE_DATA_BP_ARCH_31

2020-09-17 Thread Rogerio Alves
On 9/2/20 1:29 AM, Ravi Bangoria wrote: PPC_DEBUG_FEATURE_DATA_BP_ARCH_31 can be used to determine whether we are running on an ISA 3.1 compliant machine. Which is needed to determine DAR behaviour, 512 byte boundary limit etc. This was requested by Pedro Miraglia Franco de Carvalho for

Re: [PATCH v6 8/8] powerpc/watchpoint/selftests: Tests for kernel accessing user memory

2020-09-17 Thread Rogerio Alves
On 9/2/20 1:29 AM, Ravi Bangoria wrote: Introduce tests to cover simple scenarios where user is watching memory which can be accessed by kernel as well. We also support _MODE_EXACT with _SETHWDEBUG interface. Move those testcases out- side of _BP_RANGE condition. This will help to test

Re: [PATCH v6 0/3] Offline memoryless cpuless node 0

2020-09-17 Thread Michael Ellerman
On Tue, 18 Aug 2020 13:41:01 +0530, Srikar Dronamraju wrote: > Changelog v5:->v6: > - Now the fix is Powerpc specific. > (David Hildenbrand, Michal Hocko, Christopher Lamater) > - rebased to v5.8 > link v5: >

Re: [PATCH] powerpc/ps3: make two symbols static

2020-09-17 Thread Michael Ellerman
On Fri, 11 Sep 2020 10:01:21 +0800, Jason Yan wrote: > This addresses the following sparse warning: > > arch/powerpc/platforms/ps3/spu.c:451:33: warning: symbol > 'spu_management_ps3_ops' was not declared. Should it be static? > arch/powerpc/platforms/ps3/spu.c:592:28: warning: symbol >

Re: [PATCH] powerpc/64: Make VDSO32 track COMPAT on 64-bit

2020-09-17 Thread Michael Ellerman
On Tue, 8 Sep 2020 22:58:50 +1000, Michael Ellerman wrote: > When we added the VDSO32 kconfig symbol, which controls building of > the 32-bit VDSO, we made it depend on CPU_BIG_ENDIAN (for 64-bit). > > That was because back then COMPAT was always enabled for 64-bit, so > depending on it would

Re: [PATCH 2/3] powerpc/mce: Add debugfs interface to inject MCE

2020-09-17 Thread Michal Suchánek
Hello, On Wed, Sep 16, 2020 at 10:52:27PM +0530, Ganesh Goudar wrote: > To test machine check handling, add debugfs interface to inject > slb multihit errors. > > To inject slb multihit: > #echo 1 > /sys/kernel/debug/powerpc/mce_error_inject/inject_slb_multihit > > Signed-off-by: Ganesh Goudar

Re: [PATCH] fsl: imx-audmix : Replace seq_printf with seq_puts

2020-09-17 Thread Mark Brown
On Wed, Sep 16, 2020 at 06:14:20AM +, Xu Wang wrote: > A multiplication for the size determination of a memory allocation > indicated that an array data structure should be processed. > Thus use the corresponding function "devm_kcalloc". This looks fine but the subject says it's about

Re: [PATCH v6 1/8] powerpc/watchpoint: Fix quarword instruction handling on p10 predecessors

2020-09-17 Thread Rogerio Alves
On 9/2/20 1:29 AM, Ravi Bangoria wrote: On p10 predecessors, watchpoint with quarword access is compared at quardword length. If the watch range is doubleword or less than that in a first half of quarword aligned 16 bytes, and if there is any unaligned quadword access which will access only

Re: [PATCH v6 4/8] powerpc/watchpoint: Move DAWR detection logic outside of hw_breakpoint.c

2020-09-17 Thread Rogerio Alves
On 9/2/20 1:29 AM, Ravi Bangoria wrote: Power10 hw has multiple DAWRs but hw doesn't tell which DAWR caused the exception. So we have a sw logic to detect that in hw_breakpoint.c. But hw_breakpoint.c gets compiled only with CONFIG_HAVE_HW_BREAKPOINT=Y. Move DAWR detection logic outside of

Re: [PATCH v6 3/8] powerpc/watchpoint/ptrace: Fix SETHWDEBUG when CONFIG_HAVE_HW_BREAKPOINT=N

2020-09-17 Thread Rogerio Alves
On 9/2/20 1:29 AM, Ravi Bangoria wrote: When kernel is compiled with CONFIG_HAVE_HW_BREAKPOINT=N, user can still create watchpoint using PPC_PTRACE_SETHWDEBUG, with limited functionalities. But, such watchpoints are never firing because of the missing privilege settings. Fix that. It's safe

Re: [PATCH v6 5/8] powerpc/watchpoint: Fix exception handling for CONFIG_HAVE_HW_BREAKPOINT=N

2020-09-17 Thread Rogerio Alves
On 9/2/20 1:29 AM, Ravi Bangoria wrote: On powerpc, ptrace watchpoint works in one-shot mode. i.e. kernel disables event every time it fires and user has to re-enable it. Also, in case of ptrace watchpoint, kernel notifies ptrace user before executing instruction. With

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

2020-09-17 Thread Tony Ambardar
On Thu, 17 Sep 2020 at 04:55, Michael Ellerman wrote: > > [ Cc += linux-arch & Arnd ] > > Hi Tony, > > This looks OK to me, but I'm always a bit nervous about changes in uapi. > I've Cc'ed linux-arch and Arnd who look after the asm-generic headers, > which this is slightly related to, just in

Re: [PATCHv7 00/12]PCI: dwc: Add the multiple PF support for DWC and Layerscape

2020-09-17 Thread Lorenzo Pieralisi
On Tue, Aug 11, 2020 at 05:54:29PM +0800, Zhiqiang Hou wrote: > From: Hou Zhiqiang > > Add the PCIe EP multiple PF support for DWC and Layerscape, and use > a list to manage the PFs of each PCIe controller; add the doorbell > MSIX function for DWC; and refactor the Layerscape EP driver due to >

Re: [PATCH] powerpc/kasan: Fix CONFIG_KASAN_VMALLOC for 8xx

2020-09-17 Thread Michael Ellerman
On Fri, 11 Sep 2020 05:05:38 + (UTC), Christophe Leroy wrote: > Before the commit identified below, pages tables allocation was > performed after the allocation of final shadow area for linear memory. > But that commit switched the order, leading to page tables being > already allocated at the

Re: [PATCH v2] powerpc/powermac: Fix low_sleep_handler with KUAP and KUEP

2020-09-17 Thread Michael Ellerman
On Fri, 11 Sep 2020 10:29:15 + (UTC), Christophe Leroy wrote: > low_sleep_handler() has an hardcoded restore of segment registers > that doesn't take KUAP and KUEP into account. > > Use head_32's load_segment_registers() routine instead. Applied to powerpc/next. [1/1] powerpc/powermac: Fix

Re: [PATCH 1/2] ASoC: fsl_xcvr: Add XCVR ASoC CPU DAI driver

2020-09-17 Thread Mark Brown
On Wed, Sep 16, 2020 at 12:17:55PM +0300, Viorel Suman (OSS) wrote: This looks mostly good, a few smallish things below but nothing major. > +static int fsl_xcvr_load_firmware(struct fsl_xcvr *xcvr) > +{ > + struct device *dev = >pdev->dev; > + const struct firmware *fw; > + int ret

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

2020-09-17 Thread Arnd Bergmann
On Thu, Sep 17, 2020 at 1:55 PM Michael Ellerman wrote: > > [ Cc += linux-arch & Arnd ] > > Hi Tony, > > This looks OK to me, but I'm always a bit nervous about changes in uapi. > I've Cc'ed linux-arch and Arnd who look after the asm-generic headers, > which this is slightly related to, just in

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

2020-09-17 Thread Andreas Schwab
On Sep 17 2020, Arnd Bergmann wrote: > The errno man page says they are supposed to be synonyms, > and glibc defines it that way, while musl uses the numbers > from the kernel. glibc also uses whatever the kernel defines. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint =

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

2020-09-17 Thread Tony Ambardar
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 to the same value (e.g. seen with mips) do not raise warnings,

Re: [PATCH v4] pseries/hotplug-memory: hot-add: skip redundant LMB lookup

2020-09-17 Thread Laurent Dufour
Le 16/09/2020 à 16:51, Scott Cheloha a écrit : During memory hot-add, dlpar_add_lmb() calls memory_add_physaddr_to_nid() to determine which node id (nid) to use when later calling __add_memory(). This is wasteful. On pseries, memory_add_physaddr_to_nid() finds an appropriate nid for a given

Re: [PATCH -next] PCI: rpadlpar: use for_each_child_of_node() and for_each_node_by_name

2020-09-17 Thread Bjorn Helgaas
On Wed, Sep 16, 2020 at 02:21:28PM +0800, Qinglang Miao wrote: > Use for_each_child_of_node() and for_each_node_by_name macro > instead of open coding it. > > Signed-off-by: Qinglang Miao Applied to pci/hotplug for v5.10, thanks! > --- > drivers/pci/hotplug/rpadlpar_core.c | 8 > 1