Re: [PATCH v6] numa: make node_to_cpumask_map() NUMA_NO_NODE aware

2019-09-24 Thread Michal Hocko
On Mon 23-09-19 22:34:10, Peter Zijlstra wrote: > On Mon, Sep 23, 2019 at 06:52:35PM +0200, Michal Hocko wrote: [...] > > I even the > > ACPI standard is considering this optional. Yunsheng Lin has referred to > > the specific part of the standard in one of the earlier discussions. > > Trying to gu

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

2019-09-24 Thread S.j. Wang
Hi > > One issue for error-out and some nit-pickings inline. Thanks. > > On Thu, Sep 19, 2019 at 08:11:42PM +0800, 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

Re: [PATCH v6] numa: make node_to_cpumask_map() NUMA_NO_NODE aware

2019-09-24 Thread Peter Zijlstra
On Tue, Sep 24, 2019 at 09:47:51AM +0200, Michal Hocko wrote: > On Mon 23-09-19 22:34:10, Peter Zijlstra wrote: > > On Mon, Sep 23, 2019 at 06:52:35PM +0200, Michal Hocko wrote: > [...] > > > I even the > > > ACPI standard is considering this optional. Yunsheng Lin has referred to > > > the specifi

Re: [PATCH v6] numa: make node_to_cpumask_map() NUMA_NO_NODE aware

2019-09-24 Thread Peter Zijlstra
On Tue, Sep 24, 2019 at 09:29:50AM +0800, Yunsheng Lin wrote: > On 2019/9/24 4:34, Peter Zijlstra wrote: > > I'm saying the ACPI standard is wrong. Explain to me how it is > > physically possible to have a device without NUMA affinity in a NUMA > > system? > > > > 1) The fundamental interconnect

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

2019-09-24 Thread Shengjiu Wang
The ASRC support 24bit/16bit/8bit input width, which is data width, not slot width. For the S20_3LE format, the data with is 20bit, slot width is 24bit, if we set ASRMCR1n.IWD to be 24bits, the result is the volume is lower than expected, it likes 24bit data right shift 4 bits So replace S20_3LE

[PATCH V4 0/4] update supported sample format

2019-09-24 Thread Shengjiu Wang
This patch serial is to update the supported format for fsl_asrc and fix some format issue. Shengjiu Wang (4): ASoC: fsl_asrc: Use in(out)put_format instead of in(out)put_word_width ASoC: fsl_asrc: update supported sample format ASoC: pcm_dmaengine: Extract snd_dmaengine_pcm_refine_runtime_h

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

2019-09-24 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 Acked-by: Nicolin Chen --- sound

[PATCH V4 3/4] ASoC: pcm_dmaengine: Extract snd_dmaengine_pcm_refine_runtime_hwparams

2019-09-24 Thread Shengjiu Wang
When set the runtime hardware parameters, we may need to query the capability of DMA to complete the parameters. This patch is to Extract this operation from dmaengine_pcm_set_runtime_hwparams function to a separate function snd_dmaengine_pcm_refine_runtime_hwparams, that other components which ne

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

2019-09-24 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

Re: [PATCH v6] numa: make node_to_cpumask_map() NUMA_NO_NODE aware

2019-09-24 Thread Michal Hocko
On Tue 24-09-19 11:17:14, Peter Zijlstra wrote: > On Tue, Sep 24, 2019 at 09:47:51AM +0200, Michal Hocko wrote: > > On Mon 23-09-19 22:34:10, Peter Zijlstra wrote: > > > On Mon, Sep 23, 2019 at 06:52:35PM +0200, Michal Hocko wrote: > > [...] > > > > I even the > > > > ACPI standard is considering t

Re: [PATCH v2 2/2] powerpc/nvdimm: use H_SCM_QUERY hcall on H_OVERLAP error

2019-09-24 Thread Aneesh Kumar K.V
Vaibhav Jain writes: >> +err_out: >> +dev_info(&p->pdev->dev, >> + "Failed to query, trying an unbind followed by bind"); >> +drc_pmem_unbind(p); >> +return drc_pmem_bind(p); >> +} > Would have preferred error handling for bind failure to be done at > single location i.e i

Re: [PATCH v2 1/2] powerpc/nvdimm: Use HCALL error as the return value

2019-09-24 Thread Aneesh Kumar K.V
Vaibhav Jain writes: > Hi Aneesh, > > Thanks for the patch. Minor review comments below: > > "Aneesh Kumar K.V" writes: > >> This simplifies the error handling and also enable us to switch to >> H_SCM_QUERY hcall in a later patch on H_OVERLAP error. >> >> We also do some kernel print formatting

Re: [PATCH v6] numa: make node_to_cpumask_map() NUMA_NO_NODE aware

2019-09-24 Thread Yunsheng Lin
On 2019/9/24 17:25, Peter Zijlstra wrote: > On Tue, Sep 24, 2019 at 09:29:50AM +0800, Yunsheng Lin wrote: >> On 2019/9/24 4:34, Peter Zijlstra wrote: > >>> I'm saying the ACPI standard is wrong. Explain to me how it is >>> physically possible to have a device without NUMA affinity in a NUMA >>> sy

Re: [PATCH v6] numa: make node_to_cpumask_map() NUMA_NO_NODE aware

2019-09-24 Thread Peter Zijlstra
On Tue, Sep 24, 2019 at 12:56:22PM +0200, Michal Hocko wrote: > On Tue 24-09-19 11:17:14, Peter Zijlstra wrote: > > On Tue, Sep 24, 2019 at 09:47:51AM +0200, Michal Hocko wrote: > > > On Mon 23-09-19 22:34:10, Peter Zijlstra wrote: > > > > On Mon, Sep 23, 2019 at 06:52:35PM +0200, Michal Hocko wrot

Re: [PATCH v6] numa: make node_to_cpumask_map() NUMA_NO_NODE aware

2019-09-24 Thread Peter Zijlstra
On Tue, Sep 24, 2019 at 07:07:36PM +0800, Yunsheng Lin wrote: > On 2019/9/24 17:25, Peter Zijlstra wrote: > > On Tue, Sep 24, 2019 at 09:29:50AM +0800, Yunsheng Lin wrote: > >> On 2019/9/24 4:34, Peter Zijlstra wrote: > > > >>> I'm saying the ACPI standard is wrong. Explain to me how it is > >>> p

Re: [PATCH v6] numa: make node_to_cpumask_map() NUMA_NO_NODE aware

2019-09-24 Thread Yunsheng Lin
On 2019/9/24 19:28, Peter Zijlstra wrote: > On Tue, Sep 24, 2019 at 07:07:36PM +0800, Yunsheng Lin wrote: >> On 2019/9/24 17:25, Peter Zijlstra wrote: >>> On Tue, Sep 24, 2019 at 09:29:50AM +0800, Yunsheng Lin wrote: On 2019/9/24 4:34, Peter Zijlstra wrote: >>> > I'm saying the ACPI standa

Re: [PATCH V3 0/2] mm/debug: Add tests for architecture exported page table helpers

2019-09-24 Thread Kirill A. Shutemov
On Fri, Sep 20, 2019 at 12:03:21PM +0530, Anshuman Khandual wrote: > This series adds a test validation for architecture exported page table > helpers. Patch in the series adds basic transformation tests at various > levels of the page table. Before that it exports gigantic page allocation > functi

Re: [PATCH v6] numa: make node_to_cpumask_map() NUMA_NO_NODE aware

2019-09-24 Thread Michal Hocko
On Tue 24-09-19 13:23:49, Peter Zijlstra wrote: > On Tue, Sep 24, 2019 at 12:56:22PM +0200, Michal Hocko wrote: [...] > > To be honest I really fail to see why to object to a simple semantic > > that NUMA_NO_NODE imply all usable cpus. Could you explain that please? > > Because it feels wrong. The

Re: [PATCH v6] numa: make node_to_cpumask_map() NUMA_NO_NODE aware

2019-09-24 Thread Peter Zijlstra
On Tue, Sep 24, 2019 at 07:44:28PM +0800, Yunsheng Lin wrote: > From [1], there is a lot of devices with node id of NUMA_NO_NODE with the > FW_BUG. > > [1] > https://lore.kernel.org/lkml/5a188e2b-6c07-a9db-fbaa-561e9362d...@huawei.com/ So aside of all the software devices which we can (and reall

Re: [PATCH v6] numa: make node_to_cpumask_map() NUMA_NO_NODE aware

2019-09-24 Thread Yunsheng Lin
On 2019/9/24 19:58, Peter Zijlstra wrote: > On Tue, Sep 24, 2019 at 07:44:28PM +0800, Yunsheng Lin wrote: >> From [1], there is a lot of devices with node id of NUMA_NO_NODE with the >> FW_BUG. >> >> [1] >> https://lore.kernel.org/lkml/5a188e2b-6c07-a9db-fbaa-561e9362d...@huawei.com/ > > So aside

Re: [PATCH v6] numa: make node_to_cpumask_map() NUMA_NO_NODE aware

2019-09-24 Thread Peter Zijlstra
On Tue, Sep 24, 2019 at 01:54:01PM +0200, Michal Hocko wrote: > On Tue 24-09-19 13:23:49, Peter Zijlstra wrote: > > On Tue, Sep 24, 2019 at 12:56:22PM +0200, Michal Hocko wrote: > [...] > > > To be honest I really fail to see why to object to a simple semantic > > > that NUMA_NO_NODE imply all usab

Re: [PATCH v6] numa: make node_to_cpumask_map() NUMA_NO_NODE aware

2019-09-24 Thread Michal Hocko
On Tue 24-09-19 14:09:43, Peter Zijlstra wrote: > On Tue, Sep 24, 2019 at 01:54:01PM +0200, Michal Hocko wrote: > > On Tue 24-09-19 13:23:49, Peter Zijlstra wrote: > > > On Tue, Sep 24, 2019 at 12:56:22PM +0200, Michal Hocko wrote: > > [...] > > > > To be honest I really fail to see why to object t

Re: [PATCH V3 0/2] mm/debug: Add tests for architecture exported page table helpers

2019-09-24 Thread Mike Rapoport
On Tue, Sep 24, 2019 at 02:51:01PM +0300, Kirill A. Shutemov wrote: > On Fri, Sep 20, 2019 at 12:03:21PM +0530, Anshuman Khandual wrote: > > This series adds a test validation for architecture exported page table > > helpers. Patch in the series adds basic transformation tests at various > > levels

Re: [PATCH v6] numa: make node_to_cpumask_map() NUMA_NO_NODE aware

2019-09-24 Thread Peter Zijlstra
On Tue, Sep 24, 2019 at 02:25:00PM +0200, Michal Hocko wrote: > On Tue 24-09-19 14:09:43, Peter Zijlstra wrote: > > We can push back and say we don't respect the specification because it > > is batshit insane ;-) > > Here is my fingers crossed. > > [...] > > > Now granted; there's a number of v

Re: [PATCH v6] numa: make node_to_cpumask_map() NUMA_NO_NODE aware

2019-09-24 Thread Peter Zijlstra
On Tue, Sep 24, 2019 at 02:43:25PM +0200, Peter Zijlstra wrote: > On Tue, Sep 24, 2019 at 02:25:00PM +0200, Michal Hocko wrote: > > On Tue 24-09-19 14:09:43, Peter Zijlstra wrote: > > > > We can push back and say we don't respect the specification because it > > > is batshit insane ;-) > > > > He

Re: [PATCH v6] numa: make node_to_cpumask_map() NUMA_NO_NODE aware

2019-09-24 Thread Michal Hocko
On Tue 24-09-19 14:59:36, Peter Zijlstra wrote: > On Tue, Sep 24, 2019 at 02:43:25PM +0200, Peter Zijlstra wrote: > > On Tue, Sep 24, 2019 at 02:25:00PM +0200, Michal Hocko wrote: > > > On Tue 24-09-19 14:09:43, Peter Zijlstra wrote: > > > > > > We can push back and say we don't respect the specif

Re: [PATCH 1/6] KVM: PPC: Book3S HV: XIVE: initialize private pointer when VPs are allocated

2019-09-24 Thread Greg Kurz
On Tue, 24 Sep 2019 15:28:55 +1000 Paul Mackerras wrote: > On Mon, Sep 23, 2019 at 05:43:37PM +0200, Greg Kurz wrote: > > From: Cédric Le Goater > > > > Do not assign the device private pointer before making sure the XIVE > > VPs are allocated in OPAL and test pointer validity when releasing >

RE: [v3,3/3] Documentation: dt: binding: fsl: Add 'fsl,ippdexpcr-alt-addr' property

2019-09-24 Thread Leo Li
> -Original Message- > From: Biwen Li > Sent: Monday, September 23, 2019 9:46 PM > To: Leo Li ; shawn...@kernel.org; > robh...@kernel.org; mark.rutl...@arm.com; Ran Wang > > Cc: linuxppc-dev@lists.ozlabs.org; linux-arm-ker...@lists.infradead.org; > linux-ker...@vger.kernel.org; devicet

[PATCH AUTOSEL 5.3 24/87] PCI: rpaphp: Avoid a sometimes-uninitialized warning

2019-09-24 Thread Sasha Levin
From: Nathan Chancellor [ Upstream commit 0df3e42167caaf9f8c7b64de3da40a459979afe8 ] When building with -Wsometimes-uninitialized, clang warns: drivers/pci/hotplug/rpaphp_core.c:243:14: warning: variable 'fndit' is used uninitialized whenever 'for' loop exits because its condition is false [-Ws

[PATCH AUTOSEL 5.3 34/87] powerpc/powernv/ioda2: Allocate TCE table levels on demand for default DMA window

2019-09-24 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit c37c792dec0929dbb6360a609fb00fa20bb16fc2 ] We allocate only the first level of multilevel TCE tables for KVM already (alloc_userspace_copy==true), and the rest is allocated on demand. This is not enabled though for bare metal. This removes the KVM li

[PATCH AUTOSEL 5.3 42/87] powerpc/xmon: Check for HV mode when dumping XIVE info from OPAL

2019-09-24 Thread Sasha Levin
From: Cédric Le Goater [ Upstream commit c3e0dbd7f780a58c4695f1cd8fc8afde80376737 ] Currently, the xmon 'dx' command calls OPAL to dump the XIVE state in the OPAL logs and also outputs some of the fields of the internal XIVE structures in Linux. The OPAL calls can only be done on baremetal (Powe

[PATCH AUTOSEL 5.3 43/87] powerpc/rtas: use device model APIs and serialization during LPM

2019-09-24 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit a6717c01ddc259f6f73364779df058e2c67309f8 ] The LPAR migration implementation and userspace-initiated cpu hotplug can interleave their executions like so: 1. Set cpu 7 offline via sysfs. 2. Begin a partition migration, whose implementation requires the OS

[PATCH AUTOSEL 5.3 44/87] powerpc/ptdump: fix walk_pagetables() address mismatch

2019-09-24 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit e033829d2aaad85cb7cf46986c3be0bcc72f791e ] walk_pagetables() always walk the entire pgdir from address 0 but considers PAGE_OFFSET or KERN_VIRT_START as the starting address of the walk, resulting in a possible mismatch in the displayed addresses. Ex: on

[PATCH AUTOSEL 5.3 45/87] powerpc/futex: Fix warning: 'oldval' may be used uninitialized in this function

2019-09-24 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 38a0d0cdb46d3f91534e5b9839ec2d67be14c59d ] We see warnings such as: kernel/futex.c: In function 'do_futex': kernel/futex.c:1676:17: warning: 'oldval' may be used uninitialized in this function [-Wmaybe-uninitialized] return oldval == cmparg;

[PATCH AUTOSEL 5.3 46/87] powerpc/64s/radix: Remove redundant pfn_pte bitop, add VM_BUG_ON

2019-09-24 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit 6bb25170d7a44ef0ed9677814600f0785e7421d1 ] pfn_pte is never given a pte above the addressable physical memory limit, so the masking is redundant. In case of a software bug, it is not obviously better to silently truncate the pfn than to corrupt the pte (ei

[PATCH AUTOSEL 5.3 47/87] powerpc/64s/radix: Fix memory hotplug section page table creation

2019-09-24 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit 8f51e3929470942e6a8744061254fdeef646cd36 ] create_physical_mapping expects physical addresses, but creating and splitting these mappings after boot is supplying virtual (effective) addresses. This can be irritated by booting with mem= to limit memory then

[PATCH AUTOSEL 5.3 48/87] powerpc/pseries/mobility: use cond_resched when updating device tree

2019-09-24 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit ccfb5bd71d3d1228090a8633800ae7cdf42a94ac ] After a partition migration, pseries_devicetree_update() processes changes to the device tree communicated from the platform to Linux. This is a relatively heavyweight operation, with multiple device tree searches, m

[PATCH AUTOSEL 5.3 49/87] powerpc/perf: fix imc allocation failure handling

2019-09-24 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit 10c4bd7cd28e77aeb8cfa65b23cb3c632ede2a49 ] The alloc_pages_node return value should be tested for failure before being passed to page_address. Tested-by: Anju T Sudhakar Signed-off-by: Nicholas Piggin Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michae

[PATCH AUTOSEL 5.3 51/87] powerpc/eeh: Clear stale EEH_DEV_NO_HANDLER flag

2019-09-24 Thread Sasha Levin
From: Sam Bobroff [ Upstream commit aa06e3d60e245284d1e55497eb3108828092818d ] The EEH_DEV_NO_HANDLER flag is used by the EEH system to prevent the use of driver callbacks in drivers that have been bound part way through the recovery process. This is necessary to prevent later stage handlers fro

[PATCH AUTOSEL 5.3 63/87] selftests/powerpc: Retry on host facility unavailable

2019-09-24 Thread Sasha Levin
From: Gustavo Romero [ Upstream commit 6652bf6408895b09d31fd4128a1589a1a0672823 ] TM test tm-unavailable must take into account aborts due to host aborting a transactin because of a facility unavailable exception, just like it already does for aborts on reschedules (TM_CAUSE_KVM_RESCHED). Repor

[PATCH AUTOSEL 5.3 66/87] powerpc/64s/exception: machine check use correct cfar for late handler

2019-09-24 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit 0b66370c61fcf5fcc1d6901013e110284da6e2bb ] Bare metal machine checks run an "early" handler in real mode before running the main handler which reports the event. The main handler runs exactly as a normal interrupt handler, after the "windup" which sets re

[PATCH AUTOSEL 5.3 68/87] powerpc/eeh: Clean up EEH PEs after recovery finishes

2019-09-24 Thread Sasha Levin
From: Oliver O'Halloran [ Upstream commit 799abe283e5103d48e079149579b4f167c95ea0e ] When the last device in an eeh_pe is removed the eeh_pe structure itself (and any empty parents) are freed since they are no longer needed. This results in a crash when a hotplug driver is involved since the fol

[PATCH AUTOSEL 5.3 69/87] powerpc/imc: Dont create debugfs files for cpu-less nodes

2019-09-24 Thread Sasha Levin
From: Madhavan Srinivasan [ Upstream commit 41ba17f20ea835c489e77bd54e2da73184e22060 ] Commit <684d984038aa> ('powerpc/powernv: Add debugfs interface for imc-mode and imc') added debugfs interface for the nest imc pmu devices to support changing of different ucode modes. Primarily adding this ca

[PATCH AUTOSEL 5.3 71/87] powerpc/pseries: correctly track irq state in default idle

2019-09-24 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit 92c94dfb69e350471473fd3075c74bc68150879e ] prep_irq_for_idle() is intended to be called before entering H_CEDE (and it is used by the pseries cpuidle driver). However the default pseries idle routine does not call it, leading to mismanaged lazy irq state when

[PATCH AUTOSEL 5.3 80/87] powerpc: dump kernel log before carrying out fadump or kdump

2019-09-24 Thread Sasha Levin
From: Ganesh Goudar [ Upstream commit e7ca44ed3ba77fc26cf32650bb71584896662474 ] Since commit 4388c9b3a6ee ("powerpc: Do not send system reset request through the oops path"), pstore dmesg file is not updated when dump is triggered from HMC. This commit modified system reset (sreset) handler to

[PATCH AUTOSEL 5.2 17/70] PCI: rpaphp: Avoid a sometimes-uninitialized warning

2019-09-24 Thread Sasha Levin
From: Nathan Chancellor [ Upstream commit 0df3e42167caaf9f8c7b64de3da40a459979afe8 ] When building with -Wsometimes-uninitialized, clang warns: drivers/pci/hotplug/rpaphp_core.c:243:14: warning: variable 'fndit' is used uninitialized whenever 'for' loop exits because its condition is false [-Ws

[PATCH AUTOSEL 5.2 25/70] powerpc/powernv/ioda2: Allocate TCE table levels on demand for default DMA window

2019-09-24 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit c37c792dec0929dbb6360a609fb00fa20bb16fc2 ] We allocate only the first level of multilevel TCE tables for KVM already (alloc_userspace_copy==true), and the rest is allocated on demand. This is not enabled though for bare metal. This removes the KVM li

[PATCH AUTOSEL 5.2 32/70] powerpc/xmon: Check for HV mode when dumping XIVE info from OPAL

2019-09-24 Thread Sasha Levin
From: Cédric Le Goater [ Upstream commit c3e0dbd7f780a58c4695f1cd8fc8afde80376737 ] Currently, the xmon 'dx' command calls OPAL to dump the XIVE state in the OPAL logs and also outputs some of the fields of the internal XIVE structures in Linux. The OPAL calls can only be done on baremetal (Powe

[PATCH AUTOSEL 5.2 33/70] powerpc/rtas: use device model APIs and serialization during LPM

2019-09-24 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit a6717c01ddc259f6f73364779df058e2c67309f8 ] The LPAR migration implementation and userspace-initiated cpu hotplug can interleave their executions like so: 1. Set cpu 7 offline via sysfs. 2. Begin a partition migration, whose implementation requires the OS

[PATCH AUTOSEL 5.2 34/70] powerpc/futex: Fix warning: 'oldval' may be used uninitialized in this function

2019-09-24 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 38a0d0cdb46d3f91534e5b9839ec2d67be14c59d ] We see warnings such as: kernel/futex.c: In function 'do_futex': kernel/futex.c:1676:17: warning: 'oldval' may be used uninitialized in this function [-Wmaybe-uninitialized] return oldval == cmparg;

[PATCH AUTOSEL 5.2 35/70] powerpc/64s/radix: Remove redundant pfn_pte bitop, add VM_BUG_ON

2019-09-24 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit 6bb25170d7a44ef0ed9677814600f0785e7421d1 ] pfn_pte is never given a pte above the addressable physical memory limit, so the masking is redundant. In case of a software bug, it is not obviously better to silently truncate the pfn than to corrupt the pte (ei

[PATCH AUTOSEL 5.2 36/70] powerpc/64s/radix: Fix memory hotplug section page table creation

2019-09-24 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit 8f51e3929470942e6a8744061254fdeef646cd36 ] create_physical_mapping expects physical addresses, but creating and splitting these mappings after boot is supplying virtual (effective) addresses. This can be irritated by booting with mem= to limit memory then

[PATCH AUTOSEL 5.2 37/70] powerpc/pseries/mobility: use cond_resched when updating device tree

2019-09-24 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit ccfb5bd71d3d1228090a8633800ae7cdf42a94ac ] After a partition migration, pseries_devicetree_update() processes changes to the device tree communicated from the platform to Linux. This is a relatively heavyweight operation, with multiple device tree searches, m

[PATCH AUTOSEL 5.2 38/70] powerpc/perf: fix imc allocation failure handling

2019-09-24 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit 10c4bd7cd28e77aeb8cfa65b23cb3c632ede2a49 ] The alloc_pages_node return value should be tested for failure before being passed to page_address. Tested-by: Anju T Sudhakar Signed-off-by: Nicholas Piggin Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michae

[PATCH AUTOSEL 5.2 40/70] powerpc/eeh: Clear stale EEH_DEV_NO_HANDLER flag

2019-09-24 Thread Sasha Levin
From: Sam Bobroff [ Upstream commit aa06e3d60e245284d1e55497eb3108828092818d ] The EEH_DEV_NO_HANDLER flag is used by the EEH system to prevent the use of driver callbacks in drivers that have been bound part way through the recovery process. This is necessary to prevent later stage handlers fro

[PATCH AUTOSEL 5.2 48/70] selftests/powerpc: Retry on host facility unavailable

2019-09-24 Thread Sasha Levin
From: Gustavo Romero [ Upstream commit 6652bf6408895b09d31fd4128a1589a1a0672823 ] TM test tm-unavailable must take into account aborts due to host aborting a transactin because of a facility unavailable exception, just like it already does for aborts on reschedules (TM_CAUSE_KVM_RESCHED). Repor

[PATCH AUTOSEL 5.2 50/70] powerpc/64s/exception: machine check use correct cfar for late handler

2019-09-24 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit 0b66370c61fcf5fcc1d6901013e110284da6e2bb ] Bare metal machine checks run an "early" handler in real mode before running the main handler which reports the event. The main handler runs exactly as a normal interrupt handler, after the "windup" which sets re

[PATCH AUTOSEL 5.2 52/70] powerpc/eeh: Clean up EEH PEs after recovery finishes

2019-09-24 Thread Sasha Levin
From: Oliver O'Halloran [ Upstream commit 799abe283e5103d48e079149579b4f167c95ea0e ] When the last device in an eeh_pe is removed the eeh_pe structure itself (and any empty parents) are freed since they are no longer needed. This results in a crash when a hotplug driver is involved since the fol

[PATCH AUTOSEL 5.2 53/70] powerpc/imc: Dont create debugfs files for cpu-less nodes

2019-09-24 Thread Sasha Levin
From: Madhavan Srinivasan [ Upstream commit 41ba17f20ea835c489e77bd54e2da73184e22060 ] Commit <684d984038aa> ('powerpc/powernv: Add debugfs interface for imc-mode and imc') added debugfs interface for the nest imc pmu devices to support changing of different ucode modes. Primarily adding this ca

[PATCH AUTOSEL 5.2 55/70] powerpc/pseries: correctly track irq state in default idle

2019-09-24 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit 92c94dfb69e350471473fd3075c74bc68150879e ] prep_irq_for_idle() is intended to be called before entering H_CEDE (and it is used by the pseries cpuidle driver). However the default pseries idle routine does not call it, leading to mismanaged lazy irq state when

[PATCH AUTOSEL 5.2 63/70] powerpc: dump kernel log before carrying out fadump or kdump

2019-09-24 Thread Sasha Levin
From: Ganesh Goudar [ Upstream commit e7ca44ed3ba77fc26cf32650bb71584896662474 ] Since commit 4388c9b3a6ee ("powerpc: Do not send system reset request through the oops path"), pstore dmesg file is not updated when dump is triggered from HMC. This commit modified system reset (sreset) handler to

[PATCH AUTOSEL 4.19 11/50] PCI: rpaphp: Avoid a sometimes-uninitialized warning

2019-09-24 Thread Sasha Levin
From: Nathan Chancellor [ Upstream commit 0df3e42167caaf9f8c7b64de3da40a459979afe8 ] When building with -Wsometimes-uninitialized, clang warns: drivers/pci/hotplug/rpaphp_core.c:243:14: warning: variable 'fndit' is used uninitialized whenever 'for' loop exits because its condition is false [-Ws

[PATCH AUTOSEL 4.19 17/50] powerpc/powernv/ioda2: Allocate TCE table levels on demand for default DMA window

2019-09-24 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit c37c792dec0929dbb6360a609fb00fa20bb16fc2 ] We allocate only the first level of multilevel TCE tables for KVM already (alloc_userspace_copy==true), and the rest is allocated on demand. This is not enabled though for bare metal. This removes the KVM li

[PATCH AUTOSEL 4.19 23/50] powerpc/xmon: Check for HV mode when dumping XIVE info from OPAL

2019-09-24 Thread Sasha Levin
From: Cédric Le Goater [ Upstream commit c3e0dbd7f780a58c4695f1cd8fc8afde80376737 ] Currently, the xmon 'dx' command calls OPAL to dump the XIVE state in the OPAL logs and also outputs some of the fields of the internal XIVE structures in Linux. The OPAL calls can only be done on baremetal (Powe

[PATCH AUTOSEL 4.19 24/50] powerpc/rtas: use device model APIs and serialization during LPM

2019-09-24 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit a6717c01ddc259f6f73364779df058e2c67309f8 ] The LPAR migration implementation and userspace-initiated cpu hotplug can interleave their executions like so: 1. Set cpu 7 offline via sysfs. 2. Begin a partition migration, whose implementation requires the OS

[PATCH AUTOSEL 4.19 25/50] powerpc/futex: Fix warning: 'oldval' may be used uninitialized in this function

2019-09-24 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 38a0d0cdb46d3f91534e5b9839ec2d67be14c59d ] We see warnings such as: kernel/futex.c: In function 'do_futex': kernel/futex.c:1676:17: warning: 'oldval' may be used uninitialized in this function [-Wmaybe-uninitialized] return oldval == cmparg;

[PATCH AUTOSEL 4.19 26/50] powerpc/64s/radix: Remove redundant pfn_pte bitop, add VM_BUG_ON

2019-09-24 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit 6bb25170d7a44ef0ed9677814600f0785e7421d1 ] pfn_pte is never given a pte above the addressable physical memory limit, so the masking is redundant. In case of a software bug, it is not obviously better to silently truncate the pfn than to corrupt the pte (ei

[PATCH AUTOSEL 4.19 27/50] powerpc/pseries/mobility: use cond_resched when updating device tree

2019-09-24 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit ccfb5bd71d3d1228090a8633800ae7cdf42a94ac ] After a partition migration, pseries_devicetree_update() processes changes to the device tree communicated from the platform to Linux. This is a relatively heavyweight operation, with multiple device tree searches, m

[PATCH AUTOSEL 4.19 29/50] powerpc/eeh: Clear stale EEH_DEV_NO_HANDLER flag

2019-09-24 Thread Sasha Levin
From: Sam Bobroff [ Upstream commit aa06e3d60e245284d1e55497eb3108828092818d ] The EEH_DEV_NO_HANDLER flag is used by the EEH system to prevent the use of driver callbacks in drivers that have been bound part way through the recovery process. This is necessary to prevent later stage handlers fro

[PATCH AUTOSEL 4.19 37/50] powerpc/64s/exception: machine check use correct cfar for late handler

2019-09-24 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit 0b66370c61fcf5fcc1d6901013e110284da6e2bb ] Bare metal machine checks run an "early" handler in real mode before running the main handler which reports the event. The main handler runs exactly as a normal interrupt handler, after the "windup" which sets re

[PATCH AUTOSEL 4.19 39/50] powerpc/imc: Dont create debugfs files for cpu-less nodes

2019-09-24 Thread Sasha Levin
From: Madhavan Srinivasan [ Upstream commit 41ba17f20ea835c489e77bd54e2da73184e22060 ] Commit <684d984038aa> ('powerpc/powernv: Add debugfs interface for imc-mode and imc') added debugfs interface for the nest imc pmu devices to support changing of different ucode modes. Primarily adding this ca

[PATCH AUTOSEL 4.19 41/50] powerpc/pseries: correctly track irq state in default idle

2019-09-24 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit 92c94dfb69e350471473fd3075c74bc68150879e ] prep_irq_for_idle() is intended to be called before entering H_CEDE (and it is used by the pseries cpuidle driver). However the default pseries idle routine does not call it, leading to mismanaged lazy irq state when

[PATCH AUTOSEL 4.19 45/50] powerpc: dump kernel log before carrying out fadump or kdump

2019-09-24 Thread Sasha Levin
From: Ganesh Goudar [ Upstream commit e7ca44ed3ba77fc26cf32650bb71584896662474 ] Since commit 4388c9b3a6ee ("powerpc: Do not send system reset request through the oops path"), pstore dmesg file is not updated when dump is triggered from HMC. This commit modified system reset (sreset) handler to

[PATCH AUTOSEL 4.14 14/28] powerpc/xmon: Check for HV mode when dumping XIVE info from OPAL

2019-09-24 Thread Sasha Levin
From: Cédric Le Goater [ Upstream commit c3e0dbd7f780a58c4695f1cd8fc8afde80376737 ] Currently, the xmon 'dx' command calls OPAL to dump the XIVE state in the OPAL logs and also outputs some of the fields of the internal XIVE structures in Linux. The OPAL calls can only be done on baremetal (Powe

[PATCH AUTOSEL 4.14 15/28] powerpc/rtas: use device model APIs and serialization during LPM

2019-09-24 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit a6717c01ddc259f6f73364779df058e2c67309f8 ] The LPAR migration implementation and userspace-initiated cpu hotplug can interleave their executions like so: 1. Set cpu 7 offline via sysfs. 2. Begin a partition migration, whose implementation requires the OS

[PATCH AUTOSEL 4.14 16/28] powerpc/futex: Fix warning: 'oldval' may be used uninitialized in this function

2019-09-24 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 38a0d0cdb46d3f91534e5b9839ec2d67be14c59d ] We see warnings such as: kernel/futex.c: In function 'do_futex': kernel/futex.c:1676:17: warning: 'oldval' may be used uninitialized in this function [-Wmaybe-uninitialized] return oldval == cmparg;

[PATCH AUTOSEL 4.14 17/28] powerpc/64s/radix: Remove redundant pfn_pte bitop, add VM_BUG_ON

2019-09-24 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit 6bb25170d7a44ef0ed9677814600f0785e7421d1 ] pfn_pte is never given a pte above the addressable physical memory limit, so the masking is redundant. In case of a software bug, it is not obviously better to silently truncate the pfn than to corrupt the pte (ei

[PATCH AUTOSEL 4.14 18/28] powerpc/pseries/mobility: use cond_resched when updating device tree

2019-09-24 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit ccfb5bd71d3d1228090a8633800ae7cdf42a94ac ] After a partition migration, pseries_devicetree_update() processes changes to the device tree communicated from the platform to Linux. This is a relatively heavyweight operation, with multiple device tree searches, m

[PATCH AUTOSEL 4.14 24/28] powerpc/pseries: correctly track irq state in default idle

2019-09-24 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit 92c94dfb69e350471473fd3075c74bc68150879e ] prep_irq_for_idle() is intended to be called before entering H_CEDE (and it is used by the pseries cpuidle driver). However the default pseries idle routine does not call it, leading to mismanaged lazy irq state when

[PATCH AUTOSEL 4.14 23/28] powerpc/64s/exception: machine check use correct cfar for late handler

2019-09-24 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit 0b66370c61fcf5fcc1d6901013e110284da6e2bb ] Bare metal machine checks run an "early" handler in real mode before running the main handler which reports the event. The main handler runs exactly as a normal interrupt handler, after the "windup" which sets re

[PATCH AUTOSEL 4.9 09/19] powerpc/rtas: use device model APIs and serialization during LPM

2019-09-24 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit a6717c01ddc259f6f73364779df058e2c67309f8 ] The LPAR migration implementation and userspace-initiated cpu hotplug can interleave their executions like so: 1. Set cpu 7 offline via sysfs. 2. Begin a partition migration, whose implementation requires the OS

[PATCH AUTOSEL 4.9 10/19] powerpc/futex: Fix warning: 'oldval' may be used uninitialized in this function

2019-09-24 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 38a0d0cdb46d3f91534e5b9839ec2d67be14c59d ] We see warnings such as: kernel/futex.c: In function 'do_futex': kernel/futex.c:1676:17: warning: 'oldval' may be used uninitialized in this function [-Wmaybe-uninitialized] return oldval == cmparg;

[PATCH AUTOSEL 4.9 11/19] powerpc/pseries/mobility: use cond_resched when updating device tree

2019-09-24 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit ccfb5bd71d3d1228090a8633800ae7cdf42a94ac ] After a partition migration, pseries_devicetree_update() processes changes to the device tree communicated from the platform to Linux. This is a relatively heavyweight operation, with multiple device tree searches, m

[PATCH AUTOSEL 4.9 15/19] powerpc/64s/exception: machine check use correct cfar for late handler

2019-09-24 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit 0b66370c61fcf5fcc1d6901013e110284da6e2bb ] Bare metal machine checks run an "early" handler in real mode before running the main handler which reports the event. The main handler runs exactly as a normal interrupt handler, after the "windup" which sets re

[PATCH AUTOSEL 4.9 16/19] powerpc/pseries: correctly track irq state in default idle

2019-09-24 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit 92c94dfb69e350471473fd3075c74bc68150879e ] prep_irq_for_idle() is intended to be called before entering H_CEDE (and it is used by the pseries cpuidle driver). However the default pseries idle routine does not call it, leading to mismanaged lazy irq state when

[PATCH AUTOSEL 4.4 06/14] powerpc/rtas: use device model APIs and serialization during LPM

2019-09-24 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit a6717c01ddc259f6f73364779df058e2c67309f8 ] The LPAR migration implementation and userspace-initiated cpu hotplug can interleave their executions like so: 1. Set cpu 7 offline via sysfs. 2. Begin a partition migration, whose implementation requires the OS

[PATCH AUTOSEL 4.4 07/14] powerpc/futex: Fix warning: 'oldval' may be used uninitialized in this function

2019-09-24 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 38a0d0cdb46d3f91534e5b9839ec2d67be14c59d ] We see warnings such as: kernel/futex.c: In function 'do_futex': kernel/futex.c:1676:17: warning: 'oldval' may be used uninitialized in this function [-Wmaybe-uninitialized] return oldval == cmparg;

[PATCH AUTOSEL 4.4 08/14] powerpc/pseries/mobility: use cond_resched when updating device tree

2019-09-24 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit ccfb5bd71d3d1228090a8633800ae7cdf42a94ac ] After a partition migration, pseries_devicetree_update() processes changes to the device tree communicated from the platform to Linux. This is a relatively heavyweight operation, with multiple device tree searches, m

[PATCH AUTOSEL 4.4 10/14] powerpc/eeh: Clear stale EEH_DEV_NO_HANDLER flag

2019-09-24 Thread Sasha Levin
From: Sam Bobroff [ Upstream commit aa06e3d60e245284d1e55497eb3108828092818d ] The EEH_DEV_NO_HANDLER flag is used by the EEH system to prevent the use of driver callbacks in drivers that have been bound part way through the recovery process. This is necessary to prevent later stage handlers fro

[PATCH AUTOSEL 4.4 12/14] powerpc/64s/exception: machine check use correct cfar for late handler

2019-09-24 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit 0b66370c61fcf5fcc1d6901013e110284da6e2bb ] Bare metal machine checks run an "early" handler in real mode before running the main handler which reports the event. The main handler runs exactly as a normal interrupt handler, after the "windup" which sets re

[PATCH AUTOSEL 4.4 13/14] powerpc/pseries: correctly track irq state in default idle

2019-09-24 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit 92c94dfb69e350471473fd3075c74bc68150879e ] prep_irq_for_idle() is intended to be called before entering H_CEDE (and it is used by the pseries cpuidle driver). However the default pseries idle routine does not call it, leading to mismanaged lazy irq state when

Re: [PATCH] powerpc/book3s64: Export has_transparent_hugepage() related functions.

2019-09-24 Thread Dan Williams
On Mon, Sep 23, 2019 at 9:25 PM Aneesh Kumar K.V wrote: > > In later patch, we want to use hash_transparent_hugepage() in a kernel module. > Export two related functions. > Looks good, thanks.

Re: [PATCH 3/6] KVM: PPC: Book3S HV: XIVE: Ensure VP isn't already in use

2019-09-24 Thread Greg Kurz
On Tue, 24 Sep 2019 15:33:28 +1000 Paul Mackerras wrote: > On Mon, Sep 23, 2019 at 05:43:48PM +0200, Greg Kurz wrote: > > We currently prevent userspace to connect a new vCPU if we already have > > one with the same vCPU id. This is good but unfortunately not enough, > > because VP ids derive fro

Re: [PATCH v2 00/11] Introduces new count-based method for monitoring lockless pagetable wakls

2019-09-24 Thread Leonardo Bras
John Hubbard writes: > Also, which tree do these patches apply to, please? I will send a v3 that applies directly over v5.3, and make sure to include mm mailing list. Thanks! signature.asc Description: This is a digitally signed message part

Re: [PATCH v2 11/11] powerpc/mm/book3s64/pgtable: Uses counting method to skip serializing

2019-09-24 Thread Leonardo Bras
John Hubbard writes: >> Is that what you meant? > > Yes. > I am still trying to understand this issue. I am also analyzing some cases where interrupt disable is not done before the lockless pagetable walk (patch 3 discussion). But given I forgot to add the mm mailing list before, I think it wo

[PATCH v3 00/11] Introduces new count-based method for monitoring lockless pagetable walks

2019-09-24 Thread Leonardo Bras
If a process (qemu) with a lot of CPUs (128) try to munmap() a large chunk of memory (496GB) mapped with THP, it takes an average of 275 seconds, which can cause a lot of problems to the load (in qemu case, the guest will lock for this time). Trying to find the source of this bug, I found out most

[PATCH v3 01/11] powerpc/mm: Adds counting method to monitor lockless pgtable walks

2019-09-24 Thread Leonardo Bras
It's necessary to monitor lockless pagetable walks, in order to avoid doing THP splitting/collapsing during them. Some methods rely on local_irq_{save,restore}, but that can be slow on cases with a lot of cpus are used for the process. In order to speedup some cases, I propose a refcount-based ap

[PATCH v3 04/11] powerpc/mce_power: Applies counting method to monitor lockless pgtbl walks

2019-09-24 Thread Leonardo Bras
Applies the counting-based method for monitoring lockless pgtable walks on addr_to_pfn(). Signed-off-by: Leonardo Bras --- arch/powerpc/kernel/mce_power.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/mce_power.c b/arch/powerpc/kernel/mce_

[PATCH v3 02/11] asm-generic/pgtable: Adds dummy functions to monitor lockless pgtable walks

2019-09-24 Thread Leonardo Bras
There is a need to monitor lockless pagetable walks, in order to avoid doing THP splitting/collapsing during them. Some methods rely on local_irq_{save,restore}, but that can be slow on cases with a lot of cpus are used for the process. In order to speedup these cases, I propose a refcount-based

[PATCH v3 03/11] mm/gup: Applies counting method to monitor gup_pgd_range

2019-09-24 Thread Leonardo Bras
As decribed, gup_pgd_range is a lockless pagetable walk. So, in order to monitor against THP split/collapse with the couting method, it's necessary to bound it with {start,end}_lockless_pgtbl_walk. There are dummy functions, so it is not going to add any overhead on archs that don't use this metho

  1   2   >