Re: RESEND: Re: Problem booting a PowerBook G4 Aluminum after commit cd08f109 with CONFIG_VMAP_STACK=y

2020-02-14 Thread Christophe Leroy
Le 15/02/2020 à 03:42, Larry Finger a écrit : Christophe, On 2/14/20 1:35 PM, Christophe Leroy wrote: --- a/arch/powerpc/kernel/head_32.S +++ b/arch/powerpc/kernel/head_32.S @@ -270,6 +270,9 @@ __secondary_hold_acknowledge:    * pointer when we take an exception from supervisor mode.)    *  

Re: [PATCH] selftests/vm: Fix map_hugetlb length used for testing read and write

2020-02-14 Thread Leonardo Bras
Hello Christophe, thank you for the patch. On Thu, 2020-02-06 at 08:42 +, Christophe Leroy wrote: > Commit fa7b9a805c79 ("tools/selftest/vm: allow choosing mem size and > page size in map_hugetlb") added the possibility to change the size > of memory mapped for the test, but left the read and

Re: [PATCH] powerpc/8xx: Fix clearing of bits 20-23 in ITLB miss

2020-02-14 Thread Leonardo Bras
On Sun, 2020-02-09 at 18:14 +, Christophe Leroy wrote: > In ITLB miss handled the line supposed to clear bits 20-23 on the > L2 ITLB entry is buggy and does indeed nothing, leading to undefined > value which could allow execution when it shouldn't. > > Properly do the clearing with the

Re: [PATCH] powerpc: fix hardware PMU exception bug on PowerVM compatibility mode systems

2020-02-14 Thread Leonardo Bras
Hello Desnes, thanks for the patch. On Thu, 2020-02-13 at 21:19 -0300, Desnes A. Nunes do Rosario wrote: > PowerVM systems running compatibility mode on a few Power8 revisions are > still vulnerable to the hardware defect that loses PMU exceptions arriving > prior to a context switch. > > The

Re: [PATCH] powerpc: Fix /proc/cpuinfo revision for POWER9P processors

2020-02-14 Thread Leonardo Bras
Mahesh Salgaonkar writes: Hello Mahesh, > POWER9P PVR bits are same as that of POWER9. Hence mask off only the > relevant bits for the major revision similar to POWER9. > > Without this patch the cpuinfo output shows 17.0 as revision: > > $ cat /proc/cpuinfo > processor : 0 > cpu

Re: [PATCH] powerpc: Fix /proc/cpuinfo revision for POWER9P processors

2020-02-14 Thread Leonardo Bras
Mahesh Salgaonkar writes: Hello Mahesh, > POWER9P PVR bits are same as that of POWER9. Hence mask off only the > relevant bits for the major revision similar to POWER9. > > Without this patch the cpuinfo output shows 17.0 as revision: > > $ cat /proc/cpuinfo > processor : 0 > cpu

Re: [PATCH] powerpc: fix hardware PMU exception bug on PowerVM compatibility mode systems

2020-02-14 Thread Leonardo Bras
Hello Desnes, thanks for the patch. "Desnes A. Nunes do Rosario" writes: > PowerVM systems running compatibility mode on a few Power8 revisions are > still vulnerable to the hardware defect that loses PMU exceptions arriving > prior to a context switch. > > The software fix for this issue is

[PATCH 1/1] powerpc/cputable: Remove unnecessary copy of cpu_spec->oprofile_type

2020-02-14 Thread Leonardo Bras
Before checking for cpu_type == NULL, this same copy happens, so doing it here will just write the same value to the t->oprofile_type again. Remove the repeated copy, as it is unnecessary. Signed-off-by: Leonardo Bras --- arch/powerpc/kernel/cputable.c | 1 - 1 file changed, 1 deletion(-)

Re: RESEND: Re: Problem booting a PowerBook G4 Aluminum after commit cd08f109 with CONFIG_VMAP_STACK=y

2020-02-14 Thread Larry Finger
Christophe, On 2/14/20 1:35 PM, Christophe Leroy wrote: --- a/arch/powerpc/kernel/head_32.S +++ b/arch/powerpc/kernel/head_32.S @@ -270,6 +270,9 @@ __secondary_hold_acknowledge:   * pointer when we take an exception from supervisor mode.)   *    -- paulus.   */ +#ifdef CONFIG_PPC_CHRP +1:   

Re: [PATCH v2 1/4] mm/memremap_pages: Introduce memremap_compat_align()

2020-02-14 Thread Dan Williams
On Fri, Feb 14, 2020 at 12:59 PM Jeff Moyer wrote: > > Dan Williams writes: > > > On Thu, Feb 13, 2020 at 8:58 AM Jeff Moyer wrote: > > >> I have just a couple of questions. > >> > >> First, can you please add a comment above the generic implementation of > >> memremap_compat_align describing

[PATCH 7/7] of/address: Support multiple 'dma-ranges' entries

2020-02-14 Thread Rob Herring
Currently, the DMA offset and mask for a device are set based only on the first 'dma-ranges' entry. We should really be using all the entries. The kernel doesn't yet support multiple offsets and sizes, so the best we can do is to find the biggest size for a single offset. The algorithm is copied

[PATCH 6/7] of/address: use range parser for of_dma_get_range

2020-02-14 Thread Rob Herring
of_dma_get_range() does the same ranges parsing as of_pci_range_parser_one(), so let's refactor of_dma_get_range() to use it instead. This commit is no functional change. Subsequent commits will parse more than the 1st dma-ranges entry. Signed-off-by: Rob Herring --- drivers/of/address.c | 38

[PATCH 5/7] of/address: Rework of_pci_range parsing for non-PCI buses

2020-02-14 Thread Rob Herring
The only PCI specific part of of_pci_range_parser_one() is the handling of the 3rd address cell. Rework it to work on regular 1 and 2 cell addresses. Use defines and a union to avoid a treewide renaming of the parsing helpers and struct. Signed-off-by: Rob Herring --- drivers/of/address.c

[PATCH 4/7] of: Drop struct of_pci_range.pci_space field

2020-02-14 Thread Rob Herring
There's no more users of struct of_pci_range.pci_space field, so remove it. Signed-off-by: Rob Herring --- drivers/of/address.c | 1 - include/linux/of_address.h | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/of/address.c b/drivers/of/address.c index

[PATCH 3/7] powerpc: Drop using struct of_pci_range.pci_space field

2020-02-14 Thread Rob Herring
Let's use the struct of_pci_range.flags field instead so we can remove the pci_space field. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Rob Herring --- arch/powerpc/kernel/pci-common.c | 2 +- 1 file changed, 1

[PATCH 2/7] microblaze: Drop using struct of_pci_range.pci_space field

2020-02-14 Thread Rob Herring
Let's use the struct of_pci_range.flags field instead so we can remove the pci_space field. Just drop the debug prints as there's plenty of debug output in drivers/of/address.c which can be enabled. Cc: Michal Simek Signed-off-by: Rob Herring --- arch/microblaze/pci/pci-common.c | 7 +--

[PATCH 1/7] of/address: Move range parser code out of CONFIG_PCI

2020-02-14 Thread Rob Herring
In preparation to make the range parsing code work for non-PCI buses, move the parsing functions out from the CONFIG_PCI #ifdef. Signed-off-by: Rob Herring --- drivers/of/address.c | 215 ++- 1 file changed, 109 insertions(+), 106 deletions(-) diff --git

[PATCH 0/7] of: Support multiple dma-ranges entries

2020-02-14 Thread Rob Herring
The DT DMA offset and mask/size setup for the DMA API only parses the first dma-ranges entry. This is not sufficient for some platforms. As we already support multiple ranges entries for the PCI specific parsing functions, let's refactor those to be general enough to handle both PCI and normal

Re: [PATCH v2 0/4] libnvdimm: Cross-arch compatible namespace alignment

2020-02-14 Thread Jeff Moyer
Dan Williams writes: > --- > > Explicit review requests, but any other feedback is of course > appreciated: > > Patch1 needs an ack from ppc arch maintainers, and I'd like a tested-by > from Aneesh that this still works to solve the ppc issue. Jeff, does > this look good to you? OK, I've

Re: [PATCH v2 1/4] mm/memremap_pages: Introduce memremap_compat_align()

2020-02-14 Thread Jeff Moyer
Dan Williams writes: > On Thu, Feb 13, 2020 at 8:58 AM Jeff Moyer wrote: >> I have just a couple of questions. >> >> First, can you please add a comment above the generic implementation of >> memremap_compat_align describing its purpose, and why a platform might >> want to override it? > >

Re: [PATCH AUTOSEL 4.9 003/141] soc: fsl: qe: change return type of cpm_muram_alloc() to s32

2020-02-14 Thread Rasmus Villemoes
On 14/02/2020 17.19, Sasha Levin wrote: > From: Rasmus Villemoes > > [ Upstream commit 800cd6fb76f0ec7711deb72a86c924db1ae42648 ] Hmm. Please note that these two autosel patches were part of a giant 48-patch series. While not all depending on each other, there are definitely some dependencies,

Re: [PATCH v2 4/4] libnvdimm/region: Introduce an 'align' attribute

2020-02-14 Thread Jeff Moyer
Dan Williams writes: > The align attribute applies an alignment constraint for namespace > creation in a region. Whereas the 'align' attribute of a namespace > applied alignment padding via an info block, the 'align' attribute > applies alignment constraints to the free space allocation. > > The

Re: RESEND: Re: Problem booting a PowerBook G4 Aluminum after commit cd08f109 with CONFIG_VMAP_STACK=y

2020-02-14 Thread Christophe Leroy
On 02/14/2020 06:24 PM, Larry Finger wrote: On 2/14/20 12:24 AM, Christophe Leroy wrote: Did you try with the patch at https://patchwork.ozlabs.org/patch/1237387/ ? Christophe, When I apply that patch, there is an error at --- a/arch/powerpc/kernel/head_32.S +++

Re: RESEND: Re: Problem booting a PowerBook G4 Aluminum after commit cd08f109 with CONFIG_VMAP_STACK=y

2020-02-14 Thread Larry Finger
On 2/14/20 12:24 AM, Christophe Leroy wrote: Did you try with the patch at https://patchwork.ozlabs.org/patch/1237387/ ? Christophe, When I apply that patch, there is an error at --- a/arch/powerpc/kernel/head_32.S +++ b/arch/powerpc/kernel/head_32.S @@ -301,6 +301,39 @@ MachineCheck:

Re: RESEND: Re: Problem booting a PowerBook G4 Aluminum after commit cd08f109 with CONFIG_VMAP_STACK=y

2020-02-14 Thread Larry Finger
On 2/14/20 12:24 AM, Christophe Leroy wrote: Did you try with the patch at https://patchwork.ozlabs.org/patch/1237387/ ? Christophe, When I apply that patch, there is an error at --- a/arch/powerpc/kernel/head_32.S +++ b/arch/powerpc/kernel/head_32.S @@ -301,6 +301,39 @@ MachineCheck:

Re: [PATCH v2 2/4] libnvdimm/namespace: Enforce memremap_compat_align()

2020-02-14 Thread Aneesh Kumar K.V
On 2/14/20 10:14 PM, Jeff Moyer wrote: Dan Williams writes: On Thu, Feb 13, 2020 at 1:55 PM Jeff Moyer wrote: Dan Williams writes: The pmem driver on PowerPC crashes with the following signature when instantiating misaligned namespaces that map their capacity via memremap_pages().

Re: [PATCH v2 2/4] libnvdimm/namespace: Enforce memremap_compat_align()

2020-02-14 Thread Jeff Moyer
Dan Williams writes: > On Thu, Feb 13, 2020 at 1:55 PM Jeff Moyer wrote: >> >> Dan Williams writes: >> >> > The pmem driver on PowerPC crashes with the following signature when >> > instantiating misaligned namespaces that map their capacity via >> > memremap_pages(). >> > >> > BUG: Unable

[PATCH AUTOSEL 4.4 074/100] ide: remove set but not used variable 'hwif'

2020-02-14 Thread Sasha Levin
From: Wang Hai [ Upstream commit 98949a1946d70771789def0c9dbc239497f9f138 ] Fix the following gcc warning: drivers/ide/pmac.c: In function pmac_ide_setup_device: drivers/ide/pmac.c:1027:14: warning: variable hwif set but not used [-Wunused-but-set-variable] Fixes: d58b0c39e32f

[PATCH AUTOSEL 4.9 114/141] powerpc/sriov: Remove VF eeh_dev state when disabling SR-IOV

2020-02-14 Thread Sasha Levin
From: Oliver O'Halloran [ Upstream commit 1fb4124ca9d456656a324f1ee29b7bf942f59ac8 ] When disabling virtual functions on an SR-IOV adapter we currently do not correctly remove the EEH state for the now-dead virtual functions. When removing the pci_dn that was created for the VF when SR-IOV was

[PATCH AUTOSEL 4.9 106/141] ide: remove set but not used variable 'hwif'

2020-02-14 Thread Sasha Levin
From: Wang Hai [ Upstream commit 98949a1946d70771789def0c9dbc239497f9f138 ] Fix the following gcc warning: drivers/ide/pmac.c: In function pmac_ide_setup_device: drivers/ide/pmac.c:1027:14: warning: variable hwif set but not used [-Wunused-but-set-variable] Fixes: d58b0c39e32f

[PATCH AUTOSEL 4.9 081/141] soc: fsl: qe: remove set but not used variable 'mm_gc'

2020-02-14 Thread Sasha Levin
From: YueHaibing [ Upstream commit 6e62bd36e9ad85a22d92b1adce6a0336ea549733 ] drivers/soc/fsl/qe/gpio.c: In function qe_pin_request: drivers/soc/fsl/qe/gpio.c:163:26: warning: variable mm_gc set but not used [-Wunused-but-set-variable] commit 1e714e54b5ca ("powerpc: qe_lib-gpio: use gpiochip

[PATCH AUTOSEL 4.9 072/141] net/wan/fsl_ucc_hdlc: remove set but not used variables 'ut_info' and 'ret'

2020-02-14 Thread Sasha Levin
From: Chen Zhou [ Upstream commit 270fe2ceda66b6964d4c6f261d7f562a02c1c786 ] Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wan/fsl_ucc_hdlc.c: In function ucc_hdlc_irq_handler: drivers/net/wan/fsl_ucc_hdlc.c:643:23: warning: variable ut_info set but not used

[PATCH AUTOSEL 4.9 049/141] net/wan/fsl_ucc_hdlc: reject muram offsets above 64K

2020-02-14 Thread Sasha Levin
From: Rasmus Villemoes [ Upstream commit 148587a59f6b85831695e0497d9dd1af5f0495af ] Qiang Zhao points out that these offsets get written to 16-bit registers, and there are some QE platforms with more than 64K muram. So it is possible that qe_muram_alloc() gives us an allocation that can't

[PATCH AUTOSEL 4.9 012/141] powerpc/powernv/iov: Ensure the pdn for VFs always contains a valid PE number

2020-02-14 Thread Sasha Levin
From: Oliver O'Halloran [ Upstream commit 3b5b9997b331e77ce967eba2c4bc80dc3134a7fe ] On pseries there is a bug with adding hotplugged devices to an IOMMU group. For a number of dumb reasons fixing that bug first requires re-working how VFs are configured on PowerNV. For background, on PowerNV

[PATCH AUTOSEL 4.9 003/141] soc: fsl: qe: change return type of cpm_muram_alloc() to s32

2020-02-14 Thread Sasha Levin
From: Rasmus Villemoes [ Upstream commit 800cd6fb76f0ec7711deb72a86c924db1ae42648 ] There are a number of problems with cpm_muram_alloc() and its callers. Most callers assign the return value to some variable and then use IS_ERR_VALUE to check for allocation failure. However, when that variable

[PATCH AUTOSEL 4.14 155/186] powerpc/sriov: Remove VF eeh_dev state when disabling SR-IOV

2020-02-14 Thread Sasha Levin
From: Oliver O'Halloran [ Upstream commit 1fb4124ca9d456656a324f1ee29b7bf942f59ac8 ] When disabling virtual functions on an SR-IOV adapter we currently do not correctly remove the EEH state for the now-dead virtual functions. When removing the pci_dn that was created for the VF when SR-IOV was

[PATCH AUTOSEL 4.14 140/186] ide: remove set but not used variable 'hwif'

2020-02-14 Thread Sasha Levin
From: Wang Hai [ Upstream commit 98949a1946d70771789def0c9dbc239497f9f138 ] Fix the following gcc warning: drivers/ide/pmac.c: In function pmac_ide_setup_device: drivers/ide/pmac.c:1027:14: warning: variable hwif set but not used [-Wunused-but-set-variable] Fixes: d58b0c39e32f

[PATCH AUTOSEL 4.14 104/186] soc: fsl: qe: remove set but not used variable 'mm_gc'

2020-02-14 Thread Sasha Levin
From: YueHaibing [ Upstream commit 6e62bd36e9ad85a22d92b1adce6a0336ea549733 ] drivers/soc/fsl/qe/gpio.c: In function qe_pin_request: drivers/soc/fsl/qe/gpio.c:163:26: warning: variable mm_gc set but not used [-Wunused-but-set-variable] commit 1e714e54b5ca ("powerpc: qe_lib-gpio: use gpiochip

[PATCH AUTOSEL 4.14 091/186] net/wan/fsl_ucc_hdlc: remove set but not used variables 'ut_info' and 'ret'

2020-02-14 Thread Sasha Levin
From: Chen Zhou [ Upstream commit 270fe2ceda66b6964d4c6f261d7f562a02c1c786 ] Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wan/fsl_ucc_hdlc.c: In function ucc_hdlc_irq_handler: drivers/net/wan/fsl_ucc_hdlc.c:643:23: warning: variable ut_info set but not used

[PATCH AUTOSEL 4.14 063/186] net/wan/fsl_ucc_hdlc: reject muram offsets above 64K

2020-02-14 Thread Sasha Levin
From: Rasmus Villemoes [ Upstream commit 148587a59f6b85831695e0497d9dd1af5f0495af ] Qiang Zhao points out that these offsets get written to 16-bit registers, and there are some QE platforms with more than 64K muram. So it is possible that qe_muram_alloc() gives us an allocation that can't

[PATCH AUTOSEL 4.14 038/186] powerpc/pseries/vio: Fix iommu_table use-after-free refcount warning

2020-02-14 Thread Sasha Levin
From: Tyrel Datwyler [ Upstream commit aff8c8242bc638ba57247ae1ec5f272ac3ed3b92 ] Commit e5afdf9dd515 ("powerpc/vfio_spapr_tce: Add reference counting to iommu_table") missed an iommu_table allocation in the pseries vio code. The iommu_table is allocated with kzalloc and as a result the

[PATCH AUTOSEL 4.14 017/186] powerpc/powernv/iov: Ensure the pdn for VFs always contains a valid PE number

2020-02-14 Thread Sasha Levin
From: Oliver O'Halloran [ Upstream commit 3b5b9997b331e77ce967eba2c4bc80dc3134a7fe ] On pseries there is a bug with adding hotplugged devices to an IOMMU group. For a number of dumb reasons fixing that bug first requires re-working how VFs are configured on PowerNV. For background, on PowerNV

[PATCH AUTOSEL 4.14 004/186] soc: fsl: qe: change return type of cpm_muram_alloc() to s32

2020-02-14 Thread Sasha Levin
From: Rasmus Villemoes [ Upstream commit 800cd6fb76f0ec7711deb72a86c924db1ae42648 ] There are a number of problems with cpm_muram_alloc() and its callers. Most callers assign the return value to some variable and then use IS_ERR_VALUE to check for allocation failure. However, when that variable

[PATCH AUTOSEL 4.19 209/252] powerpc/sriov: Remove VF eeh_dev state when disabling SR-IOV

2020-02-14 Thread Sasha Levin
From: Oliver O'Halloran [ Upstream commit 1fb4124ca9d456656a324f1ee29b7bf942f59ac8 ] When disabling virtual functions on an SR-IOV adapter we currently do not correctly remove the EEH state for the now-dead virtual functions. When removing the pci_dn that was created for the VF when SR-IOV was

[PATCH AUTOSEL 4.19 190/252] ide: remove set but not used variable 'hwif'

2020-02-14 Thread Sasha Levin
From: Wang Hai [ Upstream commit 98949a1946d70771789def0c9dbc239497f9f138 ] Fix the following gcc warning: drivers/ide/pmac.c: In function pmac_ide_setup_device: drivers/ide/pmac.c:1027:14: warning: variable hwif set but not used [-Wunused-but-set-variable] Fixes: d58b0c39e32f

[PATCH AUTOSEL 4.19 137/252] soc: fsl: qe: remove set but not used variable 'mm_gc'

2020-02-14 Thread Sasha Levin
From: YueHaibing [ Upstream commit 6e62bd36e9ad85a22d92b1adce6a0336ea549733 ] drivers/soc/fsl/qe/gpio.c: In function qe_pin_request: drivers/soc/fsl/qe/gpio.c:163:26: warning: variable mm_gc set but not used [-Wunused-but-set-variable] commit 1e714e54b5ca ("powerpc: qe_lib-gpio: use gpiochip

[PATCH AUTOSEL 4.19 120/252] net/wan/fsl_ucc_hdlc: remove set but not used variables 'ut_info' and 'ret'

2020-02-14 Thread Sasha Levin
From: Chen Zhou [ Upstream commit 270fe2ceda66b6964d4c6f261d7f562a02c1c786 ] Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wan/fsl_ucc_hdlc.c: In function ucc_hdlc_irq_handler: drivers/net/wan/fsl_ucc_hdlc.c:643:23: warning: variable ut_info set but not used

[PATCH AUTOSEL 4.19 077/252] net/wan/fsl_ucc_hdlc: reject muram offsets above 64K

2020-02-14 Thread Sasha Levin
From: Rasmus Villemoes [ Upstream commit 148587a59f6b85831695e0497d9dd1af5f0495af ] Qiang Zhao points out that these offsets get written to 16-bit registers, and there are some QE platforms with more than 64K muram. So it is possible that qe_muram_alloc() gives us an allocation that can't

[PATCH AUTOSEL 4.19 043/252] powerpc/pseries/vio: Fix iommu_table use-after-free refcount warning

2020-02-14 Thread Sasha Levin
From: Tyrel Datwyler [ Upstream commit aff8c8242bc638ba57247ae1ec5f272ac3ed3b92 ] Commit e5afdf9dd515 ("powerpc/vfio_spapr_tce: Add reference counting to iommu_table") missed an iommu_table allocation in the pseries vio code. The iommu_table is allocated with kzalloc and as a result the

[PATCH AUTOSEL 4.19 040/252] powerpc/iov: Move VF pdev fixup into pcibios_fixup_iov()

2020-02-14 Thread Sasha Levin
From: Oliver O'Halloran [ Upstream commit 965c94f309be58fbcc6c8d3e4f123376c5970d79 ] An ioda_pe for each VF is allocated in pnv_pci_sriov_enable() before the pci_dev for the VF is created. We need to set the pe->pdev pointer at some point after the pci_dev is created. Currently we do that in:

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

2020-02-14 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 017/252] powerpc/powernv/iov: Ensure the pdn for VFs always contains a valid PE number

2020-02-14 Thread Sasha Levin
From: Oliver O'Halloran [ Upstream commit 3b5b9997b331e77ce967eba2c4bc80dc3134a7fe ] On pseries there is a bug with adding hotplugged devices to an IOMMU group. For a number of dumb reasons fixing that bug first requires re-working how VFs are configured on PowerNV. For background, on PowerNV

[PATCH AUTOSEL 4.19 004/252] soc: fsl: qe: change return type of cpm_muram_alloc() to s32

2020-02-14 Thread Sasha Levin
From: Rasmus Villemoes [ Upstream commit 800cd6fb76f0ec7711deb72a86c924db1ae42648 ] There are a number of problems with cpm_muram_alloc() and its callers. Most callers assign the return value to some variable and then use IS_ERR_VALUE to check for allocation failure. However, when that variable

[PATCH AUTOSEL 5.4 430/459] powerpc: Do not consider weak unresolved symbol relocations as bad

2020-02-14 Thread Sasha Levin
From: Alexandre Ghiti [ Upstream commit 43e76cd368fbb67e767da5363ffeaa3989993c8c ] Commit 8580ac9404f6 ("bpf: Process in-kernel BTF") introduced two weak symbols that may be unresolved at link time which result in an absolute relocation to 0. relocs_check.sh emits the following warning:

[PATCH AUTOSEL 5.4 416/459] powerpc/mm: Don't log user reads to 0xffffffff

2020-02-14 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 0f9aee0cb9da7db7d96f63cfa2dc5e4f1bffeb87 ] Running vdsotest leaves many times the following log: [ 79.629901] vdsotest[396]: User access of kernel address () - exploit attempt? (uid: 0) A pointer set to (-1) is likely a programming error

[PATCH AUTOSEL 5.4 401/459] selftests/eeh: Bump EEH wait time to 60s

2020-02-14 Thread Sasha Levin
From: Oliver O'Halloran [ Upstream commit 414f50434aa2463202a5b35e844f4125dd1a7101 ] Some newer cards supported by aacraid can take up to 40s to recover after an EEH event. This causes spurious failures in the basic EEH self-test since the current maximim timeout is only 30s. Fix the immediate

[PATCH AUTOSEL 5.4 400/459] powerpc/pseries/lparcfg: Fix display of Maximum Memory

2020-02-14 Thread Sasha Levin
From: Michael Bringmann [ Upstream commit f1dbc1c5c70d0d4c60b5d467ba941fba167c12f6 ] Correct overflow problem in calculation and display of Maximum Memory value to syscfg. Signed-off-by: Michael Bringmann [mpe: Only n_lmbs needs casting to unsigned long] Signed-off-by: Michael Ellerman Link:

[PATCH AUTOSEL 5.4 394/459] PCI/AER: Initialize aer_fifo

2020-02-14 Thread Sasha Levin
From: Dongdong Liu [ Upstream commit d95f20c4f07020ebc605f3b46af4b6db9eb5fc99 ] Previously we did not call INIT_KFIFO() for aer_fifo. This leads to kfifo_put() sometimes returning 0 (queue full) when in fact it is not. It is easy to reproduce the problem by using aer-inject: $ aer-inject

[PATCH AUTOSEL 5.4 383/459] powerpc/sriov: Remove VF eeh_dev state when disabling SR-IOV

2020-02-14 Thread Sasha Levin
From: Oliver O'Halloran [ Upstream commit 1fb4124ca9d456656a324f1ee29b7bf942f59ac8 ] When disabling virtual functions on an SR-IOV adapter we currently do not correctly remove the EEH state for the now-dead virtual functions. When removing the pci_dn that was created for the VF when SR-IOV was

[PATCH AUTOSEL 5.4 382/459] powerpc/ptdump: Only enable PPC_CHECK_WX with STRICT_KERNEL_RWX

2020-02-14 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit f509247b08f2dcf7754d9ed85ad69a7972aa132b ] ptdump_check_wx() is called from mark_rodata_ro() which only exists when CONFIG_STRICT_KERNEL_RWX is selected. Fixes: 453d87f6a8ae ("powerpc/mm: Warn if W+X pages found on boot") Signed-off-by: Christophe Leroy

[PATCH AUTOSEL 5.4 381/459] powerpc/ptdump: Fix W+X verification call in mark_rodata_ro()

2020-02-14 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit e26ad936dd89d79f66c2b567f700e0c2a7103070 ] ptdump_check_wx() also have to be called when pages are mapped by blocks. Fixes: 453d87f6a8ae ("powerpc/mm: Warn if W+X pages found on boot") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman

[PATCH AUTOSEL 5.4 354/459] ide: remove set but not used variable 'hwif'

2020-02-14 Thread Sasha Levin
From: Wang Hai [ Upstream commit 98949a1946d70771789def0c9dbc239497f9f138 ] Fix the following gcc warning: drivers/ide/pmac.c: In function pmac_ide_setup_device: drivers/ide/pmac.c:1027:14: warning: variable hwif set but not used [-Wunused-but-set-variable] Fixes: d58b0c39e32f

[PATCH AUTOSEL 5.4 341/459] KVM: PPC: Remove set but not used variable 'ra', 'rs', 'rt'

2020-02-14 Thread Sasha Levin
From: zhengbin [ Upstream commit 4de0a8355463e068e443b48eb5ae32370155368b ] Fixes gcc '-Wunused-but-set-variable' warning: arch/powerpc/kvm/emulate_loadstore.c: In function kvmppc_emulate_loadstore: arch/powerpc/kvm/emulate_loadstore.c:87:6: warning: variable ra set but not used

[PATCH AUTOSEL 5.4 263/459] soc: fsl: qe: remove set but not used variable 'mm_gc'

2020-02-14 Thread Sasha Levin
From: YueHaibing [ Upstream commit 6e62bd36e9ad85a22d92b1adce6a0336ea549733 ] drivers/soc/fsl/qe/gpio.c: In function qe_pin_request: drivers/soc/fsl/qe/gpio.c:163:26: warning: variable mm_gc set but not used [-Wunused-but-set-variable] commit 1e714e54b5ca ("powerpc: qe_lib-gpio: use gpiochip

[PATCH AUTOSEL 5.4 230/459] net/wan/fsl_ucc_hdlc: remove set but not used variables 'ut_info' and 'ret'

2020-02-14 Thread Sasha Levin
From: Chen Zhou [ Upstream commit 270fe2ceda66b6964d4c6f261d7f562a02c1c786 ] Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wan/fsl_ucc_hdlc.c: In function ucc_hdlc_irq_handler: drivers/net/wan/fsl_ucc_hdlc.c:643:23: warning: variable ut_info set but not used

[PATCH AUTOSEL 5.4 154/459] net/wan/fsl_ucc_hdlc: reject muram offsets above 64K

2020-02-14 Thread Sasha Levin
From: Rasmus Villemoes [ Upstream commit 148587a59f6b85831695e0497d9dd1af5f0495af ] Qiang Zhao points out that these offsets get written to 16-bit registers, and there are some QE platforms with more than 64K muram. So it is possible that qe_muram_alloc() gives us an allocation that can't

[PATCH AUTOSEL 5.4 089/459] powerpc/pseries/vio: Fix iommu_table use-after-free refcount warning

2020-02-14 Thread Sasha Levin
From: Tyrel Datwyler [ Upstream commit aff8c8242bc638ba57247ae1ec5f272ac3ed3b92 ] Commit e5afdf9dd515 ("powerpc/vfio_spapr_tce: Add reference counting to iommu_table") missed an iommu_table allocation in the pseries vio code. The iommu_table is allocated with kzalloc and as a result the

[PATCH AUTOSEL 5.4 088/459] powerpc/papr_scm: Fix leaking 'bus_desc.provider_name' in some paths

2020-02-14 Thread Sasha Levin
From: Vaibhav Jain [ Upstream commit 5649607a8d0b0e019a4db14aab3de1e16c3a2b4f ] String 'bus_desc.provider_name' allocated inside papr_scm_nvdimm_init() will leaks in case call to nvdimm_bus_register() fails or when papr_scm_remove() is called. This minor patch ensures that

[PATCH AUTOSEL 5.4 084/459] powerpc/iov: Move VF pdev fixup into pcibios_fixup_iov()

2020-02-14 Thread Sasha Levin
From: Oliver O'Halloran [ Upstream commit 965c94f309be58fbcc6c8d3e4f123376c5970d79 ] An ioda_pe for each VF is allocated in pnv_pci_sriov_enable() before the pci_dev for the VF is created. We need to set the pe->pdev pointer at some point after the pci_dev is created. Currently we do that in:

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

2020-02-14 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 042/459] powerpc/powernv/iov: Ensure the pdn for VFs always contains a valid PE number

2020-02-14 Thread Sasha Levin
From: Oliver O'Halloran [ Upstream commit 3b5b9997b331e77ce967eba2c4bc80dc3134a7fe ] On pseries there is a bug with adding hotplugged devices to an IOMMU group. For a number of dumb reasons fixing that bug first requires re-working how VFs are configured on PowerNV. For background, on PowerNV

[PATCH AUTOSEL 5.4 009/459] soc: fsl: qe: change return type of cpm_muram_alloc() to s32

2020-02-14 Thread Sasha Levin
From: Rasmus Villemoes [ Upstream commit 800cd6fb76f0ec7711deb72a86c924db1ae42648 ] There are a number of problems with cpm_muram_alloc() and its callers. Most callers assign the return value to some variable and then use IS_ERR_VALUE to check for allocation failure. However, when that variable

[PATCH AUTOSEL 5.5 502/542] powerpc: Do not consider weak unresolved symbol relocations as bad

2020-02-14 Thread Sasha Levin
From: Alexandre Ghiti [ Upstream commit 43e76cd368fbb67e767da5363ffeaa3989993c8c ] Commit 8580ac9404f6 ("bpf: Process in-kernel BTF") introduced two weak symbols that may be unresolved at link time which result in an absolute relocation to 0. relocs_check.sh emits the following warning:

[PATCH AUTOSEL 5.5 493/542] KVM: PPC: Book3S HV: Release lock on page-out failure path

2020-02-14 Thread Sasha Levin
From: Bharata B Rao [ Upstream commit e032e3b55b6f487e48c163c5dca74086f147a169 ] When migrate_vma_setup() fails in kvmppc_svm_page_out(), release kvm->arch.uvmem_lock before returning. Fixes: ca9f4942670 ("KVM: PPC: Book3S HV: Support for running secure guests") Signed-off-by: Bharata B Rao

[PATCH AUTOSEL 5.5 483/542] powerpc/mm: Don't log user reads to 0xffffffff

2020-02-14 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 0f9aee0cb9da7db7d96f63cfa2dc5e4f1bffeb87 ] Running vdsotest leaves many times the following log: [ 79.629901] vdsotest[396]: User access of kernel address () - exploit attempt? (uid: 0) A pointer set to (-1) is likely a programming error

[PATCH AUTOSEL 5.5 465/542] selftests/eeh: Bump EEH wait time to 60s

2020-02-14 Thread Sasha Levin
From: Oliver O'Halloran [ Upstream commit 414f50434aa2463202a5b35e844f4125dd1a7101 ] Some newer cards supported by aacraid can take up to 40s to recover after an EEH event. This causes spurious failures in the basic EEH self-test since the current maximim timeout is only 30s. Fix the immediate

[PATCH AUTOSEL 5.5 464/542] powerpc/pseries/lparcfg: Fix display of Maximum Memory

2020-02-14 Thread Sasha Levin
From: Michael Bringmann [ Upstream commit f1dbc1c5c70d0d4c60b5d467ba941fba167c12f6 ] Correct overflow problem in calculation and display of Maximum Memory value to syscfg. Signed-off-by: Michael Bringmann [mpe: Only n_lmbs needs casting to unsigned long] Signed-off-by: Michael Ellerman Link:

[PATCH AUTOSEL 5.5 457/542] PCI/AER: Initialize aer_fifo

2020-02-14 Thread Sasha Levin
From: Dongdong Liu [ Upstream commit d95f20c4f07020ebc605f3b46af4b6db9eb5fc99 ] Previously we did not call INIT_KFIFO() for aer_fifo. This leads to kfifo_put() sometimes returning 0 (queue full) when in fact it is not. It is easy to reproduce the problem by using aer-inject: $ aer-inject

[PATCH AUTOSEL 5.5 445/542] powerpc/ptdump: Only enable PPC_CHECK_WX with STRICT_KERNEL_RWX

2020-02-14 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit f509247b08f2dcf7754d9ed85ad69a7972aa132b ] ptdump_check_wx() is called from mark_rodata_ro() which only exists when CONFIG_STRICT_KERNEL_RWX is selected. Fixes: 453d87f6a8ae ("powerpc/mm: Warn if W+X pages found on boot") Signed-off-by: Christophe Leroy

[PATCH AUTOSEL 5.5 446/542] powerpc/sriov: Remove VF eeh_dev state when disabling SR-IOV

2020-02-14 Thread Sasha Levin
From: Oliver O'Halloran [ Upstream commit 1fb4124ca9d456656a324f1ee29b7bf942f59ac8 ] When disabling virtual functions on an SR-IOV adapter we currently do not correctly remove the EEH state for the now-dead virtual functions. When removing the pci_dn that was created for the VF when SR-IOV was

[PATCH AUTOSEL 5.5 444/542] powerpc/ptdump: Fix W+X verification call in mark_rodata_ro()

2020-02-14 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit e26ad936dd89d79f66c2b567f700e0c2a7103070 ] ptdump_check_wx() also have to be called when pages are mapped by blocks. Fixes: 453d87f6a8ae ("powerpc/mm: Warn if W+X pages found on boot") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman

[PATCH AUTOSEL 5.5 414/542] ide: remove set but not used variable 'hwif'

2020-02-14 Thread Sasha Levin
From: Wang Hai [ Upstream commit 98949a1946d70771789def0c9dbc239497f9f138 ] Fix the following gcc warning: drivers/ide/pmac.c: In function pmac_ide_setup_device: drivers/ide/pmac.c:1027:14: warning: variable hwif set but not used [-Wunused-but-set-variable] Fixes: d58b0c39e32f

[PATCH AUTOSEL 5.5 395/542] KVM: PPC: Remove set but not used variable 'ra', 'rs', 'rt'

2020-02-14 Thread Sasha Levin
From: zhengbin [ Upstream commit 4de0a8355463e068e443b48eb5ae32370155368b ] Fixes gcc '-Wunused-but-set-variable' warning: arch/powerpc/kvm/emulate_loadstore.c: In function kvmppc_emulate_loadstore: arch/powerpc/kvm/emulate_loadstore.c:87:6: warning: variable ra set but not used

[PATCH AUTOSEL 5.5 302/542] soc: fsl: qe: remove set but not used variable 'mm_gc'

2020-02-14 Thread Sasha Levin
From: YueHaibing [ Upstream commit 6e62bd36e9ad85a22d92b1adce6a0336ea549733 ] drivers/soc/fsl/qe/gpio.c: In function qe_pin_request: drivers/soc/fsl/qe/gpio.c:163:26: warning: variable mm_gc set but not used [-Wunused-but-set-variable] commit 1e714e54b5ca ("powerpc: qe_lib-gpio: use gpiochip

[PATCH AUTOSEL 5.5 266/542] net/wan/fsl_ucc_hdlc: remove set but not used variables 'ut_info' and 'ret'

2020-02-14 Thread Sasha Levin
From: Chen Zhou [ Upstream commit 270fe2ceda66b6964d4c6f261d7f562a02c1c786 ] Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wan/fsl_ucc_hdlc.c: In function ucc_hdlc_irq_handler: drivers/net/wan/fsl_ucc_hdlc.c:643:23: warning: variable ut_info set but not used

[PATCH AUTOSEL 5.5 177/542] net/wan/fsl_ucc_hdlc: reject muram offsets above 64K

2020-02-14 Thread Sasha Levin
From: Rasmus Villemoes [ Upstream commit 148587a59f6b85831695e0497d9dd1af5f0495af ] Qiang Zhao points out that these offsets get written to 16-bit registers, and there are some QE platforms with more than 64K muram. So it is possible that qe_muram_alloc() gives us an allocation that can't

[PATCH AUTOSEL 5.5 104/542] powerpc/pseries/vio: Fix iommu_table use-after-free refcount warning

2020-02-14 Thread Sasha Levin
From: Tyrel Datwyler [ Upstream commit aff8c8242bc638ba57247ae1ec5f272ac3ed3b92 ] Commit e5afdf9dd515 ("powerpc/vfio_spapr_tce: Add reference counting to iommu_table") missed an iommu_table allocation in the pseries vio code. The iommu_table is allocated with kzalloc and as a result the

[PATCH AUTOSEL 5.5 103/542] powerpc/papr_scm: Fix leaking 'bus_desc.provider_name' in some paths

2020-02-14 Thread Sasha Levin
From: Vaibhav Jain [ Upstream commit 5649607a8d0b0e019a4db14aab3de1e16c3a2b4f ] String 'bus_desc.provider_name' allocated inside papr_scm_nvdimm_init() will leaks in case call to nvdimm_bus_register() fails or when papr_scm_remove() is called. This minor patch ensures that

[PATCH AUTOSEL 5.5 097/542] powerpc/iov: Move VF pdev fixup into pcibios_fixup_iov()

2020-02-14 Thread Sasha Levin
From: Oliver O'Halloran [ Upstream commit 965c94f309be58fbcc6c8d3e4f123376c5970d79 ] An ioda_pe for each VF is allocated in pnv_pci_sriov_enable() before the pci_dev for the VF is created. We need to set the pe->pdev pointer at some point after the pci_dev is created. Currently we do that in:

[PATCH AUTOSEL 5.5 096/542] powerpc/powernv/ioda: Fix ref count for devices with their own PE

2020-02-14 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.5 048/542] powerpc/powernv/iov: Ensure the pdn for VFs always contains a valid PE number

2020-02-14 Thread Sasha Levin
From: Oliver O'Halloran [ Upstream commit 3b5b9997b331e77ce967eba2c4bc80dc3134a7fe ] On pseries there is a bug with adding hotplugged devices to an IOMMU group. For a number of dumb reasons fixing that bug first requires re-working how VFs are configured on PowerNV. For background, on PowerNV

[PATCH AUTOSEL 5.5 012/542] soc: fsl: qe: change return type of cpm_muram_alloc() to s32

2020-02-14 Thread Sasha Levin
From: Rasmus Villemoes [ Upstream commit 800cd6fb76f0ec7711deb72a86c924db1ae42648 ] There are a number of problems with cpm_muram_alloc() and its callers. Most callers assign the return value to some variable and then use IS_ERR_VALUE to check for allocation failure. However, when that variable

Re: [PATCH] powerpc/kprobes: Fix trap address when trap happened in real mode

2020-02-14 Thread Masami Hiramatsu
Hi, On Fri, 14 Feb 2020 12:47:49 + (UTC) Christophe Leroy wrote: > When a program check exception happens while MMU translation is > disabled, following Oops happens in kprobe_handler() in the following > test: > > } else if (*addr != BREAKPOINT_INSTRUCTION) { Thanks for the

[PATCH 2/2] powerpc/kprobes: Reduce depth of a test

2020-02-14 Thread Christophe Leroy
if (a) { if (b) do_something(); } Is equivalent to if (a & b) do_something(); Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/kprobes.c | 58 +-- 1 file changed, 28

[PATCH 1/2] powerpc/kprobes: Remove redundant code

2020-02-14 Thread Christophe Leroy
At the time being we have something like if (something) { p = get(); if (p) { if (something_wrong) goto out; ... return; } else if (a !=

[Bug 206527] Kernel 5.6-rc1 w. CONFIG_VMAP_STACK=y + CONFIG_KASAN=y fails to boot on a PowerMac G4 3,6

2020-02-14 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206527 --- Comment #2 from Erhard F. (erhar...@mailbox.org) --- Excellent, with v3 KASAN (outline + inline) now work together with CONFIG_VMAP_STACK=y! -- You are receiving this mail because: You are watching the assignee of the bug.

[PATCH] powerpc/kprobes: Fix trap address when trap happened in real mode

2020-02-14 Thread Christophe Leroy
When a program check exception happens while MMU translation is disabled, following Oops happens in kprobe_handler() in the following test: } else if (*addr != BREAKPOINT_INSTRUCTION) { [ 33.098554] BUG: Unable to handle kernel data access on read at 0xe268 [ 33.105091]

Re: [PATCH v2 05/27] powerpc: Map & release OpenCAPI LPC memory

2020-02-14 Thread Frederic Barrat
Le 03/12/2019 à 04:46, Alastair D'Silva a écrit : From: Alastair D'Silva This patch adds platform support to map & release LPC memory. Signed-off-by: Alastair D'Silva --- arch/powerpc/include/asm/pnv-ocxl.h | 2 ++ arch/powerpc/platforms/powernv/ocxl.c | 42

[PATCH 8/8] perf/tools/pmu-events/powerpc: Add hv_24x7 socket/chip level metric events

2020-02-14 Thread Kajol Jain
The hv_24×7 feature in IBM® POWER9™ processor-based servers provide the facility to continuously collect large numbers of hardware performance metrics efficiently and accurately. This patch adds hv_24x7 json metric file for different Socket/chip resources. Result: power9 platform: command:#

[PATCH 7/8] tools/perf: Enable Hz/hz prinitg for --metric-only option

2020-02-14 Thread Kajol Jain
Commit 54b5091606c18 ("perf stat: Implement --metric-only mode") added function 'valid_only_metric()' which drops "Hz" or "hz", if it is part of "ScaleUnit". This patch enable it since hv_24x7 supports couple of frequency events. Signed-off-by: Kajol Jain --- tools/perf/util/stat-display.c | 2

  1   2   >