Re: [PATCH v12 11/12] open: openat2(2) syscall

2019-09-09 Thread Ingo Molnar
* Linus Torvalds wrote: > On Sat, Sep 7, 2019 at 10:42 AM Andy Lutomirski wrote: > > > > Linus, you rejected resolveat() because you wanted a *nice* API > > No. I rejected resoveat() because it was a completely broken garbage > API that couldn't do even basic stuff right (like O_CREAT). > >

[PATCH 1/2] libnvdimm/altmap: Track namespace boundaries in altmap

2019-09-09 Thread Aneesh Kumar K.V
With PFN_MODE_PMEM namespace, the memmap area is allocated from the device area. Some architectures map the memmap area with large page size. On architectures like ppc64, 16MB page for memap mapping can map 262144 pfns. This maps a namespace size of 16G. When populating memmap region with 16MB pag

[PATCH 2/2] powerpc/nvdimm: Update vmemmap_populated to check sub-section range

2019-09-09 Thread Aneesh Kumar K.V
With commit: 7cc7867fb061 ("mm/devm_memremap_pages: enable sub-section remap") pmem namespaces are remapped in 2M chunks. On architectures like ppc64 we can map the memmap area using 16MB hugepage size and that can cover a memory range of 16G. While enabling new pmem namespaces, since memory is ad

[PATCH] crypto: talitos - fix hash result for VMAP_STACK

2019-09-09 Thread Christophe Leroy
When VMAP_STACK is selected, stack cannot be DMA-mapped. Therefore, the hash result has to be DMA-mapped in the request context and copied into areq->result at completion. Signed-off-by: Christophe Leroy --- drivers/crypto/talitos.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) dif

[PATCH v2] PPC: Set reserved PCR bits

2019-09-09 Thread Alistair Popple
Currently the reserved bits of the Processor Compatibility Register (PCR) are cleared as per the Programming Note in Section 1.3.3 of version 3.0B of the Power ISA. This causes all new architecture features to be made available when running on newer processors with new architecture features added t

Re: [PATCH 1/1] mm/pgtable/debug: Add test validating architecture page table helpers

2019-09-09 Thread Anshuman Khandual
On 09/10/2019 10:15 AM, Christophe Leroy wrote: > > > On 09/10/2019 03:56 AM, Anshuman Khandual wrote: >> >> >> On 09/09/2019 08:43 PM, Kirill A. Shutemov wrote: >>> On Mon, Sep 09, 2019 at 11:56:50AM +0530, Anshuman Khandual wrote: On 09/07/2019 12:33 AM, Gerald Schaefer wrote:

Re: [PATCH v6 00/12] implement KASLR for powerpc/fsl_booke/32

2019-09-09 Thread Jason Yan
Hi Scott, On 2019/8/28 12:05, Scott Wood wrote: On Fri, 2019-08-09 at 18:07 +0800, Jason Yan wrote: This series implements KASLR for powerpc/fsl_booke/32, as a security feature that deters exploit attempts relying on knowledge of the location of kernel internals. Since CONFIG_RELOCATABLE has a

Re: [PATCH 1/1] mm/pgtable/debug: Add test validating architecture page table helpers

2019-09-09 Thread Christophe Leroy
On 09/10/2019 03:56 AM, Anshuman Khandual wrote: On 09/09/2019 08:43 PM, Kirill A. Shutemov wrote: On Mon, Sep 09, 2019 at 11:56:50AM +0530, Anshuman Khandual wrote: On 09/07/2019 12:33 AM, Gerald Schaefer wrote: On Fri, 6 Sep 2019 11:58:59 +0530 Anshuman Khandual wrote: On 09/05/201

Re: [PATCH 1/1] mm/pgtable/debug: Add test validating architecture page table helpers

2019-09-09 Thread Anshuman Khandual
On 09/09/2019 08:43 PM, Kirill A. Shutemov wrote: > On Mon, Sep 09, 2019 at 11:56:50AM +0530, Anshuman Khandual wrote: >> >> >> On 09/07/2019 12:33 AM, Gerald Schaefer wrote: >>> On Fri, 6 Sep 2019 11:58:59 +0530 >>> Anshuman Khandual wrote: >>> On 09/05/2019 10:36 PM, Gerald Schaefer wrot

RE: [EXT] Re: [PATCH 3/3] ASoC: fsl_asrc: Fix error with S24_3LE format bitstream in i.MX8

2019-09-09 Thread S.j. Wang
Hi > > On Mon, Sep 09, 2019 at 06:33:21PM -0400, Shengjiu Wang wrote: > > There is error "aplay: pcm_write:2023: write error: Input/output error" > > on i.MX8QM/i.MX8QXP platform for S24_3LE format. > > > > In i.MX8QM/i.MX8QXP, the DMA is EDMA, which don't support 24bit > > sample, but we didn'

RE: [EXT] Re: [PATCH 1/3] ASoC: fsl_asrc: Use in(out)put_format instead of in(out)put_word_width

2019-09-09 Thread S.j. Wang
Hi > > On Mon, Sep 09, 2019 at 06:33:19PM -0400, Shengjiu Wang wrote: > > snd_pcm_format_t is more formal than enum asrc_word_width, which > has > > two property, width and physical width, which is more accurate than > > enum asrc_word_width. So it is better to use in(out)put_format instead > > o

Re: [PATCH 2/3] ASoC: fsl_asrc: update supported sample format

2019-09-09 Thread S.j. Wang
Hi > > On Mon, Sep 09, 2019 at 06:33:20PM -0400, Shengjiu Wang wrote: > > The ASRC support 24bit/16bit/8bit input width, so S20_3LE format > > should not be supported, it is word width is 20bit. > > I thought 3LE used 24-bit physical width. And the driver assigns > ASRC_WIDTH_24_BIT to "width" f

Re: [PATCH 3/3] ASoC: fsl_asrc: Fix error with S24_3LE format bitstream in i.MX8

2019-09-09 Thread Nicolin Chen
On Mon, Sep 09, 2019 at 06:33:21PM -0400, Shengjiu Wang wrote: > There is error "aplay: pcm_write:2023: write error: Input/output error" > on i.MX8QM/i.MX8QXP platform for S24_3LE format. > > In i.MX8QM/i.MX8QXP, the DMA is EDMA, which don't support 24bit > sample, but we didn't add any constraint

Re: [PATCH 11/11] ocxl: Add PCI hotplug dependency to Kconfig

2019-09-09 Thread Alastair D'Silva
On Mon, 2019-09-09 at 17:46 +0200, Frederic Barrat wrote: > The PCI hotplug framework is used to update the devices when a new > image is written to the FPGA. > > Signed-off-by: Frederic Barrat > --- > drivers/misc/ocxl/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/mi

Re: [PATCH 10/11] pci/hotplug/pnv-php: Wrap warnings in macro

2019-09-09 Thread Alastair D'Silva
On Mon, 2019-09-09 at 17:45 +0200, Frederic Barrat wrote: > An opencapi slot doesn't have an associated bridge device. It's not > needed for operation, but any warning is displayed through pci_warn() > which uses the pci_dev struct of the assocated bridge device. So wrap > those warning so that a d

Re: [PATCH 09/11] pci/hotplug/pnv-php: Relax check when disabling slot

2019-09-09 Thread Alastair D'Silva
On Mon, 2019-09-09 at 17:45 +0200, Frederic Barrat wrote: > The driver only allows to disable a slot in the POPULATED > state. However, if an error occurs while enabling the slot, say > because the link couldn't be trained, then the POPULATED state may > not > be reached, yet the power state of the

Re: [PATCH 08/11] pci/hotplug/pnv-php: Register opencapi slots

2019-09-09 Thread Alastair D'Silva
On Mon, 2019-09-09 at 17:45 +0200, Frederic Barrat wrote: > Add the opencapi PHBs to the list of PHBs being scanned to look for > slots. > > Signed-off-by: Frederic Barrat > --- > drivers/pci/hotplug/pnv_php.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/

Re: [PATCH 07/11] pci/hotplug/pnv-php: Improve error msg on power state change failure

2019-09-09 Thread Alastair D'Silva
On Mon, 2019-09-09 at 17:45 +0200, Frederic Barrat wrote: > When changing the slot state, if opal hits an error and tells as such > in the asynchronous reply, the warning "Wrong msg" is logged, which > is > rather confusing. Instead we can reuse the better message which is > already used when we co

Re: [PATCH 06/11] pci/hotplug/pnv-php: Remove erroneous warning

2019-09-09 Thread Alastair D'Silva
On Mon, 2019-09-09 at 17:45 +0200, Frederic Barrat wrote: > On powernv, when removing a device through hotplug, the following > warning is logged: > > Invalid refcount <.> on <...> > > It may be incorrect, the refcount may be set to a higher value than 1 > and be valid. of_detach_node() can

Re: [PATCH 05/11] powerpc/powernv/ioda: Find opencapi slot for a device node

2019-09-09 Thread Alastair D'Silva
On Mon, 2019-09-09 at 17:45 +0200, Frederic Barrat wrote: > Unlike real PCI slots, opencapi slots are directly associated to > the (virtual) opencapi PHB, there's no intermediate bridge. So when > looking for a slot ID, we must start the search from the device node > itself and not its parent. > >

Re: [PATCH 04/11] powerpc/powernv/ioda: Release opencapi device

2019-09-09 Thread Alastair D'Silva
On Mon, 2019-09-09 at 17:45 +0200, Frederic Barrat wrote: > With hotplug, an opencapi device can now go away. It needs to be > released, mostly to clean up its PE state. We were previously not > defining any device callback. We can reuse the standard PCI release > callback, it does a bit too much f

Re: [PATCH 03/11] powerpc/powernv/ioda: set up PE on opencapi device when enabling

2019-09-09 Thread Alastair D'Silva
On Mon, 2019-09-09 at 17:45 +0200, Frederic Barrat wrote: > The PE for an opencapi device was set as part of a late PHB fixup > operation, when creating the PHB. To use the PCI hotplug framework, > this is not going to work, as the PHB stays the same, it's only the > devices underneath which are up

Re: [PATCH 02/11] powerpc/powernv/ioda: Protect PE list

2019-09-09 Thread Alastair D'Silva
On Mon, 2019-09-09 at 17:45 +0200, Frederic Barrat wrote: > Protect the PHB's list of PE. Probably not needed as long as it was > populated during PHB creation, but it feels right and will become > required once we can add/remove opencapi devices on hotplug. > > Signed-off-by: Frederic Barrat > -

Re: [PATCH 01/11] powerpc/powernv/ioda: Fix ref count for devices with their own PE

2019-09-09 Thread Alastair D'Silva
On Mon, 2019-09-09 at 17:45 +0200, Frederic Barrat wrote: > Taking a reference on the pci_dev structure was required with initial > commit 184cd4a3b962 ("powerpc/powernv: PCI support for p7IOC under > OPAL v2"), where we were storing the pci_dev in the pci_dn structure. > > However, the pci_dev wa

Re: [PATCH] net/ibmvnic: Fix missing { in __ibmvnic_reset

2019-09-09 Thread Juliet Kim
On 9/9/19 3:44 PM, Michal Suchanek wrote: > Commit 1c2977c09499 ("net/ibmvnic: free reset work of removed device from > queue") > adds a } without corresponding { causing build break. > > Fixes: 1c2977c09499 ("net/ibmvnic: free reset work of removed device from > queue") > Signed-off-by: Michal S

Re: [PATCH] net/ibmvnic: Fix missing { in __ibmvnic_reset

2019-09-09 Thread Tyrel Datwyler
On 9/9/19 1:44 PM, Michal Suchanek wrote: > Commit 1c2977c09499 ("net/ibmvnic: free reset work of removed device from > queue") > adds a } without corresponding { causing build break. > > Fixes: 1c2977c09499 ("net/ibmvnic: free reset work of removed device from > queue") > Signed-off-by: Michal

[PATCH] net/ibmvnic: Fix missing { in __ibmvnic_reset

2019-09-09 Thread Michal Suchanek
Commit 1c2977c09499 ("net/ibmvnic: free reset work of removed device from queue") adds a } without corresponding { causing build break. Fixes: 1c2977c09499 ("net/ibmvnic: free reset work of removed device from queue") Signed-off-by: Michal Suchanek --- drivers/net/ethernet/ibm/ibmvnic.c | 2 +-

Re: [PATCH 2/3] ASoC: fsl_asrc: update supported sample format

2019-09-09 Thread Nicolin Chen
On Mon, Sep 09, 2019 at 06:33:20PM -0400, Shengjiu Wang wrote: > The ASRC support 24bit/16bit/8bit input width, so S20_3LE format > should not be supported, it is word width is 20bit. I thought 3LE used 24-bit physical width. And the driver assigns ASRC_WIDTH_24_BIT to "width" for all non-16bit ca

Re: [PATCH 1/3] ASoC: fsl_asrc: Use in(out)put_format instead of in(out)put_word_width

2019-09-09 Thread Nicolin Chen
On Mon, Sep 09, 2019 at 06:33:19PM -0400, Shengjiu Wang wrote: > snd_pcm_format_t is more formal than enum asrc_word_width, which has > two property, width and physical width, which is more accurate than > enum asrc_word_width. So it is better to use in(out)put_format > instead of in(out)put_word_w

Re: [PATCH 1/1] mm/pgtable/debug: Add test validating architecture page table helpers

2019-09-09 Thread Gerald Schaefer
On Mon, 9 Sep 2019 11:56:50 +0530 Anshuman Khandual wrote: [..] > > > > Hmm, I simply used this on my system to make pud_clear_tests() work, not > > sure if it works on all archs: > > > > pud_val(*pudp) |= RANDOM_NZVALUE; > > Which compiles on arm64 but then fails on x86 because of the way p

[PATCH 06/11] pci/hotplug/pnv-php: Remove erroneous warning

2019-09-09 Thread Frederic Barrat
On powernv, when removing a device through hotplug, the following warning is logged: Invalid refcount <.> on <...> It may be incorrect, the refcount may be set to a higher value than 1 and be valid. of_detach_node() can drop more than one reference. As it doesn't seem trivial to assert the c

[PATCH 10/11] pci/hotplug/pnv-php: Wrap warnings in macro

2019-09-09 Thread Frederic Barrat
An opencapi slot doesn't have an associated bridge device. It's not needed for operation, but any warning is displayed through pci_warn() which uses the pci_dev struct of the assocated bridge device. So wrap those warning so that a different trace mechanism can be used if it's an opencapi slot. Si

[PATCH 08/11] pci/hotplug/pnv-php: Register opencapi slots

2019-09-09 Thread Frederic Barrat
Add the opencapi PHBs to the list of PHBs being scanned to look for slots. Signed-off-by: Frederic Barrat --- drivers/pci/hotplug/pnv_php.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/pci/hotplug/pnv_php.c b/drivers/pci/hotplug/pnv_php.c index 304bdbcdb77c..f0

[PATCH 09/11] pci/hotplug/pnv-php: Relax check when disabling slot

2019-09-09 Thread Frederic Barrat
The driver only allows to disable a slot in the POPULATED state. However, if an error occurs while enabling the slot, say because the link couldn't be trained, then the POPULATED state may not be reached, yet the power state of the slot is on. So allow to disable a slot in the REGISTERED state. Rem

[PATCH 07/11] pci/hotplug/pnv-php: Improve error msg on power state change failure

2019-09-09 Thread Frederic Barrat
When changing the slot state, if opal hits an error and tells as such in the asynchronous reply, the warning "Wrong msg" is logged, which is rather confusing. Instead we can reuse the better message which is already used when we couldn't submit the asynchronous opal request initially. Signed-off-b

[PATCH 11/11] ocxl: Add PCI hotplug dependency to Kconfig

2019-09-09 Thread Frederic Barrat
The PCI hotplug framework is used to update the devices when a new image is written to the FPGA. Signed-off-by: Frederic Barrat --- drivers/misc/ocxl/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/misc/ocxl/Kconfig b/drivers/misc/ocxl/Kconfig index 1916fa65f2f2..2d2266c1439e

[PATCH 05/11] powerpc/powernv/ioda: Find opencapi slot for a device node

2019-09-09 Thread Frederic Barrat
Unlike real PCI slots, opencapi slots are directly associated to the (virtual) opencapi PHB, there's no intermediate bridge. So when looking for a slot ID, we must start the search from the device node itself and not its parent. Also, the slot ID is not attached to a specific bdfn, so let's build

[PATCH 00/11] opencapi: enable card reset and link retraining

2019-09-09 Thread Frederic Barrat
This is the linux part of the work to use the PCI hotplug framework to control an opencapi card so that it can be reset and re-read after flashing a new FPGA image. I had posted it earlier as an RFC and this version is mostly similar, with just some minor editing. It needs support in skiboot: http

[PATCH 02/11] powerpc/powernv/ioda: Protect PE list

2019-09-09 Thread Frederic Barrat
Protect the PHB's list of PE. Probably not needed as long as it was populated during PHB creation, but it feels right and will become required once we can add/remove opencapi devices on hotplug. Signed-off-by: Frederic Barrat --- arch/powerpc/platforms/powernv/pci-ioda.c | 6 +- 1 file chang

[PATCH 04/11] powerpc/powernv/ioda: Release opencapi device

2019-09-09 Thread Frederic Barrat
With hotplug, an opencapi device can now go away. It needs to be released, mostly to clean up its PE state. We were previously not defining any device callback. We can reuse the standard PCI release callback, it does a bit too much for an opencapi device, but it's harmless, and only needs minor tun

[PATCH 03/11] powerpc/powernv/ioda: set up PE on opencapi device when enabling

2019-09-09 Thread Frederic Barrat
The PE for an opencapi device was set as part of a late PHB fixup operation, when creating the PHB. To use the PCI hotplug framework, this is not going to work, as the PHB stays the same, it's only the devices underneath which are updated. For regular PCI devices, it is done as part of the reconfig

[PATCH 01/11] powerpc/powernv/ioda: Fix ref count for devices with their own PE

2019-09-09 Thread Frederic Barrat
Taking a reference on the pci_dev structure was required with initial commit 184cd4a3b962 ("powerpc/powernv: PCI support for p7IOC under OPAL v2"), where we were storing the pci_dev in the pci_dn structure. However, the pci_dev was later removed from the pci_dn structure, but the reference was kep

Re: [PATCH v5 21/31] powernv/fadump: process architected register state data provided by firmware

2019-09-09 Thread Oliver O'Halloran
On Mon, Sep 9, 2019 at 11:23 PM Hari Bathini wrote: > > On 04/09/19 5:50 PM, Michael Ellerman wrote: > > Hari Bathini writes: > > > > [...] > > >> +/* > >> + * CPU state data is provided by f/w. Below are the definitions > >> + * provided in HDAT spec. Refer to latest HDAT specification for > >>

Re: [PATCH 1/1] mm/pgtable/debug: Add test validating architecture page table helpers

2019-09-09 Thread Kirill A. Shutemov
On Mon, Sep 09, 2019 at 11:56:50AM +0530, Anshuman Khandual wrote: > > > On 09/07/2019 12:33 AM, Gerald Schaefer wrote: > > On Fri, 6 Sep 2019 11:58:59 +0530 > > Anshuman Khandual wrote: > > > >> On 09/05/2019 10:36 PM, Gerald Schaefer wrote: > >>> On Thu, 5 Sep 2019 14:48:14 +0530 > >>> Anshum

[PATCH v3] powerpc/lockdep: fix a false positive warning

2019-09-09 Thread Qian Cai
The commit 108c14858b9e ("locking/lockdep: Add support for dynamic keys") introduced a boot warning on powerpc below, because since the commit 2d4f567103ff ("KVM: PPC: Introduce kvm_tmp framework") adds kvm_tmp[] into the .bss section and then free the rest of unused spaces back to the page allocat

Re: [PATCH v5 18/23] powerpc/pci: Handle BAR movement

2019-09-09 Thread Oliver O'Halloran
On Sat, Sep 7, 2019 at 2:25 AM Sergey Miroshnichenko wrote: > > Hi Oliver, > > On 9/4/19 8:37 AM, Oliver O'Halloran wrote: > > On Fri, 2019-08-16 at 19:50 +0300, Sergey Miroshnichenko wrote: > >> Add pcibios_rescan_prepare()/_done() hooks for the powerpc platform. Now if > >> the device's driver s

Re: [PATCH v5 21/31] powernv/fadump: process architected register state data provided by firmware

2019-09-09 Thread Hari Bathini
On 04/09/19 5:50 PM, Michael Ellerman wrote: > Hari Bathini writes: > [...] >> +/* >> + * CPU state data is provided by f/w. Below are the definitions >> + * provided in HDAT spec. Refer to latest HDAT specification for >> + * any update to this format. >> + */ > > How is this meant to work?

[PATCH 1/3] ASoC: fsl_asrc: Use in(out)put_format instead of in(out)put_word_width

2019-09-09 Thread Shengjiu Wang
snd_pcm_format_t is more formal than enum asrc_word_width, which has two property, width and physical width, which is more accurate than enum asrc_word_width. So it is better to use in(out)put_format instead of in(out)put_word_width. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_asrc.c | 56

[PATCH 3/3] ASoC: fsl_asrc: Fix error with S24_3LE format bitstream in i.MX8

2019-09-09 Thread Shengjiu Wang
There is error "aplay: pcm_write:2023: write error: Input/output error" on i.MX8QM/i.MX8QXP platform for S24_3LE format. In i.MX8QM/i.MX8QXP, the DMA is EDMA, which don't support 24bit sample, but we didn't add any constraint, that cause issues. So we need to query the caps of dma, then update th

[PATCH 0/3] update supported sample format

2019-09-09 Thread Shengjiu Wang
update supported sample format Shengjiu Wang (3): ASoC: fsl_asrc: Use in(out)put_format instead of in(out)put_word_width ASoC: fsl_asrc: update supported sample format ASoC: fsl_asrc: Fix error with S24_3LE format bitstream in i.MX8 sound/soc/fsl/fsl_asrc.c | 65 ---

[PATCH 2/3] ASoC: fsl_asrc: update supported sample format

2019-09-09 Thread Shengjiu Wang
The ASRC support 24bit/16bit/8bit input width, so S20_3LE format should not be supported, it is word width is 20bit. So replace S20_3LE with S24_3LE in supported list and add S8 format in TX supported list Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_asrc.c | 5 +++-- 1 file changed, 3 ins

Re: [PATCH v5 0/7] kexec: add generic support for elf kernel images

2019-09-09 Thread Michael Ellerman
Hi Helge, Sorry I meant to do something about this series but got swamped by other things, as always. Helge Deller writes: > Hi all, > > This kexec patch series is the groundwork for kexec on the parisc > architecture. > Since we want kexec on parisc, I've applied it to my for-next-kexec tree [

Re: [PATCH v2 1/1] powerpc/pci: Fix pcibios_setup_device() ordering

2019-09-09 Thread Alexey Kardashevskiy
On 06/09/2019 05:13, Shawn Anastasio wrote: > Move PCI device setup from pcibios_add_device() and pcibios_fixup_bus() to > pcibios_bus_add_device(). This ensures that platform-specific DMA and IOMMU > setup occurs after the device has been registered in sysfs, which is a > requirement for IOMMU

Re: [PATCH] powerpc/crashkernel: take mem option into account

2019-09-09 Thread Pingfan Liu
On Mon, Sep 9, 2019 at 12:05 PM Pingfan Liu wrote: > > 'mem=" option is an easy way to put high pressure on memory during some > test. Hence in stead of total mem, the effective usable memory size should > be considered when reserving mem for crashkernel. Otherwise the boot up may > experience oom