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

2019-09-19 Thread Anshuman Khandual
On 09/18/2019 11:52 PM, Gerald Schaefer wrote: > On Wed, 18 Sep 2019 18:26:03 +0200 > Christophe Leroy wrote: > > [..] >> My suggestion was not to completely drop the #ifdef but to do like you >> did in pgd_clear_tests() for instance, ie to add the following test on >> top of the function:

Re: [PATCH 1/1] powerpc: kvm: Reduce calls to get current->mm by storing the value locally

2019-09-19 Thread Leonardo Bras
Hello Paul, I sent this patch, but I have a question: On Thu, 2019-09-19 at 19:27 -0300, Leonardo Bras wrote: > Reduces the number of calls to get_current() in order to get the value of > current->mm by doing it once and storing the value, since it is not > supposed to change inside the same

Re: [PATCH v2 1/1] powerpc/pseries/hotplug-memory.c: Change rc variable to bool

2019-09-19 Thread Leonardo Bras
Hello Michael, Any feedback on this patch? Best regards, On Fri, 2019-08-02 at 15:45 +0200, David Hildenbrand wrote: > On 02.08.19 15:39, Leonardo Bras wrote: > > Changes the return variable to bool (as the return value) and > > avoids doing a ternary operation before returning. > > > >

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

2019-09-19 Thread Nicolin Chen
On Thu, Sep 19, 2019 at 08:11:40PM +0800, Shengjiu Wang wrote: > 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

Re: [PATCH v5 05/12] powerpc/eeh: EEH for pSeries hot plug

2019-09-19 Thread Nathan Lynch
"Oliver O'Halloran" writes: > On Fri, Sep 20, 2019 at 6:28 AM Nathan Lynch wrote: >> >> Hello Sam, >> >> Sam Bobroff writes: >> >> With this change, I get a crash (use after free by the looks of it) when >> I remove and then add a pci device in qemu: >> >> $ qemu-system-ppc64 -M pseries

Re: [PATCH v5 05/12] powerpc/eeh: EEH for pSeries hot plug

2019-09-19 Thread Oliver O'Halloran
On Fri, Sep 20, 2019 at 6:28 AM Nathan Lynch wrote: > > Hello Sam, > > Sam Bobroff writes: > > With this change, I get a crash (use after free by the looks of it) when > I remove and then add a pci device in qemu: > > $ qemu-system-ppc64 -M pseries -append 'debug console=hvc0' \ > -nographic

[PATCH] powerpc/pseries/hotplug-cpu: remove double free in error path

2019-09-19 Thread Nathan Lynch
In the unlikely event that the device tree lacks a /cpus node, find_dlpar_cpus_to_add() oddly frees the cpu_drcs buffer it has been passed before returning an error. Its only caller also frees the buffer on error. Remove the less conventional kfree() of a caller-supplied buffer from

[PATCH] powerpc/pseries: safely roll back failed DLPAR cpu add

2019-09-19 Thread Nathan Lynch
dlpar_online_cpu() attempts to online all threads of a core that has been added to an LPAR. If onlining a non-primary thread fails (e.g. due to an allocation failure), the core is left with at least one thread online. dlpar_cpu_add() attempts to roll back the whole operation, releasing the core

[PATCH 1/1] powerpc: kvm: Reduce calls to get current->mm by storing the value locally

2019-09-19 Thread Leonardo Bras
Reduces the number of calls to get_current() in order to get the value of current->mm by doing it once and storing the value, since it is not supposed to change inside the same process). Signed-off-by: Leonardo Bras --- arch/powerpc/kvm/book3s_64_mmu_hv.c | 11 ++- 1 file changed, 6

Re: [PATCH v5 05/12] powerpc/eeh: EEH for pSeries hot plug

2019-09-19 Thread Nathan Lynch
Hello Sam, Sam Bobroff writes: > On PowerNV and pSeries, devices currently acquire EEH support from > several different places: Boot-time devices from eeh_probe_devices() > and eeh_addr_cache_build(), Virtual Function devices from the pcibios > bus add device hooks and hot plugged devices from

Re: [PATCH v3 2/2] powerpc/irq: inline call_do_irq() and call_do_softirq()

2019-09-19 Thread Segher Boessenkool
On Thu, Sep 19, 2019 at 07:23:18AM +0200, Christophe Leroy wrote: > Le 18/09/2019 à 18:39, Segher Boessenkool a écrit : > >I realise the original code had this... Loading the old stack pointer > >value back from the stack creates a bottleneck (via the store->load > >forwarding it requires). It

Re: [PATCH v2 1/2] powperc/mm: read TLB Block Invalidate Characteristics

2019-09-19 Thread Laurent Dufour
Le 18/09/2019 à 15:42, Michael Ellerman a écrit : Hi Laurent, Comments below ... Hi Michael, Thanks for your review. One comment below (at the end). Laurent Dufour writes: The PAPR document specifies the TLB Block Invalidate Characteristics which tells for each couple segment base page

Re: [PATCH v2 2/2] powerpc/mm: call H_BLOCK_REMOVE when supported

2019-09-19 Thread Laurent Dufour
Le 18/09/2019 à 15:42, Michael Ellerman a écrit : Hi Laurent, Few comments ... Hi Michael, Thanks for the review and the nitpicking ;) Laurent Dufour writes: Now we do not call _BLOCK_REMOVE all the time when the feature is exhibited. This isn't true until after the patch is applied,

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

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

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

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

[PATCH V3 0/4] update supported sample format

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

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

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

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

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

Re: [PATCH] docs: powerpc: Add missing documentation reference

2019-09-19 Thread Michael Ellerman
On Sun, 2019-09-15 at 05:29:05 UTC, Adam Zerella wrote: > The documentation pages for 'elfnote' and 'ultravisor' > are not included in the powerpc documentation index, this > generates Sphinx warnings: > > WARNING: document isn't included in any toctree > > Additionally, when one includes these

Re: [PATCH] powerpc: improve prom_init_check rule

2019-09-19 Thread Michael Ellerman
On Thu, 2019-09-12 at 07:40:37 UTC, Masahiro Yamada wrote: > This slightly improves the prom_init_check rule. > > [1] Avoid needless check > > Currently, prom_init_check.sh is invoked every time you run 'make' > even if you have changed nothing in prom_init.c. With this commit, > the script is

Re: [PATCH v2] powerpc/xive: Fix bogus error code returned by OPAL

2019-09-19 Thread Michael Ellerman
On Wed, 2019-09-11 at 15:52:18 UTC, Greg Kurz wrote: > There's a bug in skiboot that causes the OPAL_XIVE_ALLOCATE_IRQ call > to return the 32-bit value 0x when OPAL has run out of IRQs. > Unfortunatelty, OPAL return values are signed 64-bit entities and > errors are supposed to be

Re: [PATCH v6 01/36] powerpc/fadump: move internal macros/definitions to a new header

2019-09-19 Thread Michael Ellerman
On Wed, 2019-09-11 at 14:46:21 UTC, Hari Bathini wrote: > Though asm/fadump.h is meant to be used by other components dealing > with FADump, it also has macros/definitions internal to FADump code. > Move them to a new header file used within FADump code. This also > makes way for refactoring

Re: [PATCH 1/4] powerpc/kvm: Move kvm_tmp into .text, shrink to 64K

2019-09-19 Thread Michael Ellerman
On Wed, 2019-09-11 at 11:57:43 UTC, Michael Ellerman wrote: > In some configurations of KVM, guests binary patch themselves to > avoid/reduce trapping into the hypervisor. For some instructions this > requires replacing one instruction with a sequence of instructions. > > For those cases we need

Re: [PATCH] powerpc/pseries: correctly track irq state in default idle

2019-09-19 Thread Michael Ellerman
On Tue, 2019-09-10 at 22:52:44 UTC, Nathan Lynch wrote: > 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 the cpuidle

Re: [PATCH v2] powerpc/watchpoint: Disable watchpoint hit by larx/stcx instructions

2019-09-19 Thread Michael Ellerman
On Tue, 2019-09-10 at 13:15:13 UTC, Ravi Bangoria wrote: > If watchpoint exception is generated by larx/stcx instructions, the > reservation created by larx gets lost while handling exception, and > thus stcx instruction always fails. Generally these instructions are > used in a while(1) loop, for

Re: [PATCH] powerpc: Add attributes for setjmp/longjmp

2019-09-19 Thread Michael Ellerman
On Wed, 2019-09-04 at 14:11:07 UTC, Segher Boessenkool wrote: > The setjmp function should be declared as "returns_twice", or bad > things can happen[1]. This does not actually change generated code > in my testing. > > The longjmp function should be declared as "noreturn", so that the >

Re: [PATCH 1/3] ftrace: Look up the address of return_to_handler() using helpers

2019-09-19 Thread Michael Ellerman
On Thu, 2019-09-05 at 18:20:28 UTC, "Naveen N. Rao" wrote: > This ensures that we use the right address on architectures that use > function descriptors. > > Signed-off-by: Naveen N. Rao Series applied to powerpc next, thanks.

Re: [PATCH 1/2] powerpc/xmon: Improve output of XIVE interrupts

2019-09-19 Thread Michael Ellerman
On Tue, 2019-09-10 at 08:18:49 UTC, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= wrote: > When looping on the list of interrupts, add the current value of the > PQ bits with a load on the ESB page. This has the side effect of > faulting the ESB page of all interrupts. > > Signed-off-by: Cédric Le

Re: [PATCH v2] powerpc: dump kernel log before carrying out fadump or kdump

2019-09-19 Thread Michael Ellerman
On Wed, 2019-09-04 at 07:59:49 UTC, Ganesh Goudar wrote: > 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 invoke fadump or

Re: [PATCH 1/2] powerpc/memcpy: Fix stack corruption for smaller sizes

2019-09-19 Thread Michael Ellerman
On Tue, 2019-09-03 at 21:43:58 UTC, Santosh Sivaraj wrote: > For sizes lesser than 128 bytes, the code branches out early without saving > the stack frame, which when restored later drops frame of the caller. > > Tested-by: Aneesh Kumar K.V > Signed-off-by: Santosh Sivaraj Series applied to

Re: [PATCH] powerpc/powernv: remove the unused pnv_npu_try_dma_set_bypass function

2019-09-19 Thread Michael Ellerman
On Tue, 2019-09-03 at 16:51:47 UTC, Christoph Hellwig wrote: > Neither pnv_npu_try_dma_set_bypass nor the pnv_npu_dma_set_32 and > pnv_npu_dma_set_bypass helpers called by it are used anywhere in the > kernel tree, so remove them. > > Signed-off-by: Christoph Hellwig Applied to powerpc next,

Re: [PATCH 01/14] powerpc/eeh: Clean up EEH PEs after recovery finishes

2019-09-19 Thread Michael Ellerman
On Tue, 2019-09-03 at 10:15:52 UTC, Oliver O'Halloran wrote: > 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 following > may occur:

Re: [PATCH 1/6] powerpc/64s: remove register_process_table callback

2019-09-19 Thread Michael Ellerman
On Mon, 2019-09-02 at 15:29:26 UTC, Nicholas Piggin wrote: > This callback is only required because the partition table init comes > before process table allocation on powernv (aka bare metal aka native). > > Change the order to allocate the process table first, and remove the > callback. > >

Re: [PATCH v3] powerpc/imc: Dont create debugfs files for cpu-less nodes

2019-09-19 Thread Michael Ellerman
On Tue, 2019-08-27 at 10:16:35 UTC, Madhavan Srinivasan wrote: > 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 capability for >

Re: [PATCH v4 1/2] powerpc/powernv: Enhance opal message read interface

2019-09-19 Thread Michael Ellerman
On Mon, 2019-08-26 at 06:57:00 UTC, Vasant Hegde wrote: > Use "opal-msg-size" device tree property to allocate memory for "opal_msg". > > Cc: Mahesh Salgaonkar > Cc: Jeremy Kerr > Signed-off-by: Vasant Hegde Series applied to powerpc next, thanks.

Re: [PATCH] powerpc: Remove empty comment

2019-09-19 Thread Michael Ellerman
On Tue, 2019-08-13 at 05:12:12 UTC, Jordan Niethe wrote: > Commit 2874c5fd2842 ("treewide: Replace GPLv2 boilerplate/reference with > SPDX - rule 152") left an empty comment in machdep.h, as the boilerplate > was the only text in the comment. Remove the empty comment. > > Signed-off-by: Jordan

Re: [PATCH] powerpc/mm/radix: remove useless kernel messages

2019-09-19 Thread Michael Ellerman
On Fri, 2019-08-23 at 14:22:00 UTC, Qian Cai wrote: > Booting a POWER9 PowerNV system generates a few messages below with > "ptrval" due to the pointers printed without a specifier > extension (i.e unadorned %p) are hashed to prevent leaking information > about the kernel memory layout. >

Re: [PATCH 3/5] ocxl: Tally up the LPC memory on a link & allow it to be mapped

2019-09-19 Thread Frederic Barrat
Le 19/09/2019 à 06:55, Alastair D'Silva a écrit : On Wed, 2019-09-18 at 16:02 +0200, Frederic Barrat wrote: Le 17/09/2019 à 03:42, Alastair D'Silva a écrit : From: Alastair D'Silva Tally up the LPC memory on an OpenCAPI link & allow it to be mapped Signed-off-by: Alastair D'Silva ---

Re: [PATCH 2/5] powerpc: Map & release OpenCAPI LPC memory

2019-09-19 Thread Frederic Barrat
Le 19/09/2019 à 02:58, Alastair D'Silva a écrit : On Wed, 2019-09-18 at 16:03 +0200, Frederic Barrat wrote: Le 17/09/2019 à 03:42, Alastair D'Silva a écrit : From: Alastair D'Silva Map & release OpenCAPI LPC memory. Signed-off-by: Alastair D'Silva ---

Re: [PATCH?] powerpc: Hard wire PT_SOFTE value to 1 in gpr_get() too

2019-09-19 Thread Michael Ellerman
Hi Oleg, Thanks for the patch. Oleg Nesterov writes: > I don't have a ppc machine, this patch wasn't even compile tested, > could you please review? > > The commit a8a4b03ab95f ("powerpc: Hard wire PT_SOFTE value to 1 in > ptrace & signals") changed ptrace_get_reg(PT_SOFTE) to report 0x1, > but