Re: [PATCH 2/2] powerpc/mm: Warn if W+X pages found on boot

2019-05-01 Thread Russell Currey
> > > > + if (radix_enabled()) > > > > + st.start_address = PAGE_OFFSET; > > > > + else > > > + st.start_address = KERN_VIRT_START; > > > > > > KERN_VIRT_START doesn't exist on PPC32. > > > > > > Christophe > > > > > Thanks a lot for the review! Applied all

Re: [PATCH 2/2] powerpc/mm: Warn if W+X pages found on boot

2019-05-01 Thread Christophe Leroy
Le 01/05/2019 à 09:04, Russell Currey a écrit : On Wed, 2019-04-24 at 09:14 +0200, Christophe Leroy wrote: Le 24/04/2019 à 08:39, Russell Currey a écrit : Implement code to walk all pages and warn if any are found to be both writable and executable. Depends on STRICT_KERNEL_RWX enabled,

[PATCH] powerpc/64s: remplement power4_idle code in C

2019-05-01 Thread Nicholas Piggin
This implements the tricky tracing and soft irq handling bits in C, leaving the low level bit to asm. A functional difference is that this redirects the interrupt exit to a return stub to execute blr, rather than the lr address itself. This is probably irrelevant or barely measurable on real

[PATCH] powerpc/64: Don't trace code that runs with the soft irq mask unreconciled

2019-05-01 Thread Nicholas Piggin
"Reconciling" in terms of interrupt handling, is to bring the soft irq mask state in to synch with the hardware, after an interrupt causes MSR[EE] to be cleared (while the soft mask may be enabled, and hard irqs not marked disabled). General kernel code should not be called while unreconciled,

RE: [PATCH] crypto: caam/jr - Remove extra memory barrier during job ring dequeue

2019-05-01 Thread Michael Ellerman
Vakul Garg writes: >> -Original Message- >> From: Michael Ellerman >> Sent: Wednesday, May 1, 2019 11:20 AM >> To: Vakul Garg >> Cc: linux-cry...@vger.kernel.org; Aymen Sghaier >> ; da...@davemloft.net; >> herb...@gondor.apana.org.au; Horia Geanta ; >> linuxppc-dev@lists.ozlabs.org >>

Re: [PATCH v2 6/6] soc/fsl/qe: qe.c: fold qe_get_num_of_snums into qe_snums_init

2019-05-01 Thread Christophe Leroy
Le 01/05/2019 à 11:29, Rasmus Villemoes a écrit : The comment "No QE ever has fewer than 28 SNUMs" is false; e.g. the MPC8309 has 14. The code path returning -EINVAL is also a recipe for instant disaster, since the caller (qe_snums_init) uncritically assigns the return value to the unsigned

Re: [PATCH v2 5/6] soc/fsl/qe: qe.c: support fsl,qe-snums property

2019-05-01 Thread Christophe Leroy
Le 01/05/2019 à 11:29, Rasmus Villemoes a écrit : Add driver support for the newly introduced fsl,qe-snums property. Conveniently, of_property_read_variable_u8_array does exactly what we need: If the property fsl,qe-snums is found (and has an allowed size), the array of values get copied to

Re: [PATCH v2 2/6] soc/fsl/qe: qe.c: reduce static memory footprint by 1.7K

2019-05-01 Thread Christophe Leroy
Le 01/05/2019 à 11:29, Rasmus Villemoes a écrit : The current array of struct qe_snum use 256*4 bytes for just keeping track of the free/used state of each index, and the struct layout means there's another 768 bytes of padding. If we just unzip that structure, the array of snum values just

Re: [PATCH V5] ASoC: fsl_esai: Fix missing break in switch statement

2019-05-01 Thread Gustavo A. R. Silva
Mark, I wonder if you are going to take this patch. Thanks -- Gustavo On 4/11/19 3:43 AM, S.j. Wang wrote: > case ESAI_HCKT_EXTAL and case ESAI_HCKR_EXTAL should be > independent of each other, so replace fall-through with break. > > Fixes: 43d24e76b698 ("ASoC: fsl_esai: Add ESAI CPU DAI

Re: [PATCH 2/5] powerpc: don't use asm-generic/ptrace.h

2019-05-01 Thread Michael Ellerman
Christoph Hellwig writes: > Doing the indirection through macros for the regs accessors just > makes them harder to read, so implement the helpers directly. > > Note that only the helpers actually used are implemented now. > > Signed-off-by: Christoph Hellwig > --- >

Re: [PATCH V4] ASoC: fsl_esai: Add pm runtime function

2019-05-01 Thread Mark Brown
On Sun, Apr 28, 2019 at 02:24:54AM +, S.j. Wang wrote: > Add pm runtime support and move clock handling there. > Close the clocks at suspend to reduce the power consumption. > > fsl_esai_suspend is replaced by pm_runtime_force_suspend. > fsl_esai_resume is replaced by pm_runtime_force_resume.

Applied "ASoC: fsl_micfil: Remove set but not used variable 'osr'" to the asoc tree

2019-05-01 Thread Mark Brown
The patch ASoC: fsl_micfil: Remove set but not used variable 'osr' has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours)

Applied "ASoC: mpc5200_dma: Fix invalid license ID" to the asoc tree

2019-05-01 Thread Mark Brown
The patch ASoC: mpc5200_dma: Fix invalid license ID has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to

Applied "ASoC: mpc5200_psc_i2s: Fix invalid license ID" to the asoc tree

2019-05-01 Thread Mark Brown
The patch ASoC: mpc5200_psc_i2s: Fix invalid license ID has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent

Applied "ASoC: fsl_audmix: cache pdev->dev pointer" to the asoc tree

2019-05-01 Thread Mark Brown
The patch ASoC: fsl_audmix: cache pdev->dev pointer has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to

Applied "ASoC: fsl_esai: Fix missing break in switch statement" to the asoc tree

2019-05-01 Thread Mark Brown
The patch ASoC: fsl_esai: Fix missing break in switch statement has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.2 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24

[PATCH 3/3] ibmvscsi: fix tripping of blk_mq_run_hw_queue WARN_ON

2019-05-01 Thread Tyrel Datwyler
From: Tyrel Datwyler After a successful SRP login response we call scsi_unblock_requests() to kick any pending IO's. The callback to process this SRP response happens in a tasklet and therefore is in softirq context. The result of such is that when blk-mq is enabled it is no longer safe to call

[PATCH 2/3] ibmvscsi: redo driver work thread to use enum action states

2019-05-01 Thread Tyrel Datwyler
From: Tyrel Datwyler The current implemenation relies on two flags in the drivers private host structure to signal the need for a host reset or to reenable the CRQ after a LPAR migration. This patch does away with those flags and introduces a single action flag and defined enums for the

[PATCH 1/3] ibmvscsi: Wire up host_reset() in the drivers scsi_host_template

2019-05-01 Thread Tyrel Datwyler
From: Tyrel Datwyler Wire up the host_reset function in our driver_template to allow a user requested adpater reset via the host_reset sysfs attribute. Example: echo "adapter" > /sys/class/scsi_host/host0/host_reset Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvscsi.c | 13

Re: [PATCH v4] powerpc/pseries: Remove limit in wait for dying CPU

2019-05-01 Thread Nicholas Piggin
Nathan Lynch's on May 2, 2019 12:57 am: > Hi Thiago, > > Thiago Jung Bauermann writes: >> Nathan Lynch writes: >>> Thiago Jung Bauermann writes: + while (true) { cpu_status = smp_query_cpu_stopped(pcpu); if (cpu_status ==

Re: [PATCH 4/5] x86: don't use asm-generic/ptrace.h

2019-05-01 Thread Ingo Molnar
* Christoph Hellwig wrote: > Doing the indirection through macros for the regs accessors just > makes them harder to read, so implement the helpers directly. > > Note that only the helpers actually used are implemented now. > > Signed-off-by: Christoph Hellwig > --- >

Re: [PATCH v2 4/6] dt-bindings: soc/fsl: qe: document new fsl,qe-snums binding

2019-05-01 Thread Rob Herring
On Wed, 1 May 2019 09:29:08 +, Rasmus Villemoes wrote: > Reading table 4-30, and its footnotes, of the QUICC Engine Block > Reference Manual shows that the set of snum _values_ is not > necessarily just a function of the _number_ of snums, as given in the > fsl,qe-num-snums property. > > As

Re: [PATCH v2 1/9] soc/fsl/qman: fixup liodns only on ppc targets

2019-05-01 Thread Li Yang
On Sat, Apr 27, 2019 at 2:14 AM wrote: > > From: Laurentiu Tudor > > ARM SoCs use SMMU so the liodn fixup done in the qman driver is no > longer making sense and it also breaks the ICID settings inherited > from u-boot. Do the fixups only for PPC targets. > > Signed-off-by: Laurentiu Tudor

Re: [PATCH v2 2/9] soc/fsl/qbman_portals: add APIs to retrieve the probing status

2019-05-01 Thread Li Yang
On Sat, Apr 27, 2019 at 2:14 AM wrote: > > From: Laurentiu Tudor > > Add a couple of new APIs to check the probing status of the required > cpu bound qman and bman portals: > 'int bman_portals_probed()' and 'int qman_portals_probed()'. > They return the following values. > * 1 if qman/bman

Re: [PATCH v2 0/2] soc: fsl: dpio: Add support for memory backed QBMan portals

2019-05-01 Thread Li Yang
On Fri, Apr 5, 2019 at 9:42 AM Roy Pledge wrote: > > This patch series adds support for QBMan memory backed portals which is > avaialble in devices containing QBMan verion 5.0 and above (for example > NXP's LX2160A SoC). > > Memory backed portals can be mapped as normal cacheable/shareable memory

Re: [PATCH v2 4/6] dt-bindings: soc/fsl: qe: document new fsl,qe-snums binding

2019-05-01 Thread Rasmus Villemoes
On 01/05/2019 17.12, Joakim Tjernlund wrote: > On Wed, 2019-05-01 at 09:29 +, Rasmus Villemoes wrote: >> CAUTION: This email originated from outside of the organization. Do not >> click links or open attachments unless you recognize the sender and know the >> content is safe. >> >> >>

[PATCH 5/5] asm-generic: remove ptrace.h

2019-05-01 Thread Christoph Hellwig
No one is using this helper anymore. Signed-off-by: Christoph Hellwig --- MAINTAINERS| 1 - arch/mips/include/asm/ptrace.h | 5 --- include/asm-generic/ptrace.h | 74 -- 3 files changed, 80 deletions(-) delete mode 100644

[PATCH 4/5] x86: don't use asm-generic/ptrace.h

2019-05-01 Thread Christoph Hellwig
Doing the indirection through macros for the regs accessors just makes them harder to read, so implement the helpers directly. Note that only the helpers actually used are implemented now. Signed-off-by: Christoph Hellwig --- arch/x86/include/asm/ptrace.h | 29 - 1

[PATCH 3/5] sh: don't use asm-generic/ptrace.h

2019-05-01 Thread Christoph Hellwig
Doing the indirection through macros for the regs accessors just makes them harder to read, so implement the helpers directly. Note that only the helpers actually used are implemented now. Signed-off-by: Christoph Hellwig --- arch/sh/include/asm/ptrace.h | 29 + 1

[PATCH 2/5] powerpc: don't use asm-generic/ptrace.h

2019-05-01 Thread Christoph Hellwig
Doing the indirection through macros for the regs accessors just makes them harder to read, so implement the helpers directly. Note that only the helpers actually used are implemented now. Signed-off-by: Christoph Hellwig --- arch/powerpc/include/asm/ptrace.h | 29 ++---

[PATCH 1/5] arm64: don't use asm-generic/ptrace.h

2019-05-01 Thread Christoph Hellwig
Doing the indirection through macros for the regs accessors just makes them harder to read, so implement the helpers directly. Note that only the helpers actually used are implemented now. Signed-off-by: Christoph Hellwig --- arch/arm64/include/asm/ptrace.h | 31 +++

remove asm-generic/ptrace.h

2019-05-01 Thread Christoph Hellwig
Hi all, asm-generic/ptrace.h is a little weird in that it doesn't actually implement any functionality, but it provided multiple layers of macros that just implement trivial inline functions. We implement those directly in the few architectures and be off with a much simpler design.

Re: [PATCH v2] powerpc/32s: fix BATs setting with CONFIG_STRICT_KERNEL_RWX

2019-05-01 Thread christophe leroy
Le 01/05/2019 à 02:55, Michael Ellerman a écrit : Christophe Leroy writes: Serge reported some crashes with CONFIG_STRICT_KERNEL_RWX enabled on a book3s32 machine. Analysis shows two issues: - BATs addresses and sizes are not properly aligned. - There is a gap between the last address

Re: [PATCH v2 3/6] x86: clean up _TIF_SYSCALL_EMU handling using ptrace_syscall_enter hook

2019-05-01 Thread Sudeep Holla
On Wed, May 01, 2019 at 05:57:11PM +0200, Oleg Nesterov wrote: > On 04/30, Sudeep Holla wrote: > > > > On Mon, Mar 18, 2019 at 04:33:22PM +0100, Oleg Nesterov wrote: > > > > > > And it seems that _TIF_WORK_SYSCALL_ENTRY needs some cleanups too... We > > > don't need > > > "&

RE: [PATCH] crypto: caam/jr - Remove extra memory barrier during job ring dequeue

2019-05-01 Thread Vakul Garg
> -Original Message- > From: Michael Ellerman > Sent: Wednesday, May 1, 2019 11:20 AM > To: Vakul Garg > Cc: linux-cry...@vger.kernel.org; Aymen Sghaier > ; da...@davemloft.net; > herb...@gondor.apana.org.au; Horia Geanta ; > linuxppc-dev@lists.ozlabs.org > Subject: Re: [PATCH]

Re: [PATCH v2 3/6] x86: clean up _TIF_SYSCALL_EMU handling using ptrace_syscall_enter hook

2019-05-01 Thread Oleg Nesterov
On 04/30, Sudeep Holla wrote: > > On Mon, Mar 18, 2019 at 04:33:22PM +0100, Oleg Nesterov wrote: > > > > And it seems that _TIF_WORK_SYSCALL_ENTRY needs some cleanups too... We > > don't need > > "& _TIF_WORK_SYSCALL_ENTRY" in syscall_trace_enter, and > > _TIF_WORK_SYSCALL_ENTRY > > should not

Re: [PATCH v2 4/6] dt-bindings: soc/fsl: qe: document new fsl,qe-snums binding

2019-05-01 Thread Joakim Tjernlund
On Wed, 2019-05-01 at 09:29 +, Rasmus Villemoes wrote: > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you recognize the sender and know the > content is safe. > > > Reading table 4-30, and its footnotes, of the QUICC

Re: [PATCH v4] powerpc/pseries: Remove limit in wait for dying CPU

2019-05-01 Thread Nathan Lynch
Hi Thiago, Thiago Jung Bauermann writes: > Nathan Lynch writes: >> Thiago Jung Bauermann writes: >>> + while (true) { >>> cpu_status = smp_query_cpu_stopped(pcpu); >>> if (cpu_status == QCSS_STOPPED || >>> cpu_status ==

Re: [PATCH] x86/mpx: fix recursive munmap() corruption

2019-05-01 Thread Michael Ellerman
Laurent Dufour writes: > Le 23/04/2019 à 18:04, Dave Hansen a écrit : >> On 4/23/19 4:16 AM, Laurent Dufour wrote: ... >>> There are 2 assumptions here: >>> 1. 'start' and 'end' are page aligned (this is guaranteed by >>> __do_munmap(). >>> 2. the VDSO is 1 page (this is guaranteed by the

Re: [PATCH] powerpc/mm/radix: Fix kernel crash when running subpage protect test

2019-05-01 Thread Aneesh Kumar K.V
On 5/1/19 7:14 AM, Michael Ellerman wrote: "Aneesh Kumar K.V" writes: This patch fixes the below crash by making sure we touch the subpage protection related structures only if we know they are allocated on the platform. With radix translation we don't allocate hash context at all and trying

Re: [PATCH v5 00/23] Include linux ACPI docs into Sphinx TOC tree

2019-05-01 Thread Rafael J. Wysocki
On Thursday, April 25, 2019 5:20:35 PM CEST Changbin Du wrote: > On Thu, Apr 25, 2019 at 10:44:14AM +0200, Rafael J. Wysocki wrote: > > .On Wed, Apr 24, 2019 at 7:54 PM Changbin Du wrote: > > > > > > Hi All, > > > The kernel now uses Sphinx to generate intelligent and beautiful > > >

[PATCH v2 6/6] soc/fsl/qe: qe.c: fold qe_get_num_of_snums into qe_snums_init

2019-05-01 Thread Rasmus Villemoes
The comment "No QE ever has fewer than 28 SNUMs" is false; e.g. the MPC8309 has 14. The code path returning -EINVAL is also a recipe for instant disaster, since the caller (qe_snums_init) uncritically assigns the return value to the unsigned qe_num_of_snum, and would thus proceed to attempt to

[PATCH v2 1/6] soc/fsl/qe: qe.c: drop useless static qualifier

2019-05-01 Thread Rasmus Villemoes
The local variable snum_init has no reason to have static storage duration. Reviewed-by: Christophe Leroy Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/fsl/qe/qe.c b/drivers/soc/fsl/qe/qe.c index

[PATCH v2 5/6] soc/fsl/qe: qe.c: support fsl,qe-snums property

2019-05-01 Thread Rasmus Villemoes
Add driver support for the newly introduced fsl,qe-snums property. Conveniently, of_property_read_variable_u8_array does exactly what we need: If the property fsl,qe-snums is found (and has an allowed size), the array of values get copied to snums, and the return value is the number of snums - we

[PATCH v2 4/6] dt-bindings: soc/fsl: qe: document new fsl,qe-snums binding

2019-05-01 Thread Rasmus Villemoes
Reading table 4-30, and its footnotes, of the QUICC Engine Block Reference Manual shows that the set of snum _values_ is not necessarily just a function of the _number_ of snums, as given in the fsl,qe-num-snums property. As an alternative, to make it easier to add support for other variants of

[PATCH v2 3/6] soc/fsl/qe: qe.c: introduce qe_get_device_node helper

2019-05-01 Thread Rasmus Villemoes
The 'try of_find_compatible_node(NULL, NULL, "fsl,qe"), fall back to of_find_node_by_type(NULL, "qe")' pattern is repeated five times. Factor it into a common helper. Reviewed-by: Christophe Leroy Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe.c | 71

[PATCH v2 2/6] soc/fsl/qe: qe.c: reduce static memory footprint by 1.7K

2019-05-01 Thread Rasmus Villemoes
The current array of struct qe_snum use 256*4 bytes for just keeping track of the free/used state of each index, and the struct layout means there's another 768 bytes of padding. If we just unzip that structure, the array of snum values just use 256 bytes, while the free/inuse state can be tracked

[PATCH v2 0/6] soc/fsl/qe: cleanups and new DT binding

2019-05-01 Thread Rasmus Villemoes
This small series consists of some small cleanups and simplifications of the QUICC engine driver, and introduces a new DT binding that makes it much easier to support other variants of the QUICC engine IP block that appears in the wild: There's no reason to expect in general that the number of

Re: [PATCH kernel v2 0/2] powerpc/ioda2: Another attempt to allow DMA masks between 32 and 59

2019-05-01 Thread Alexey Kardashevskiy
On 01/05/2019 16:09, Alistair Popple wrote: > Hi Alexey, > > Do we need a seperate patch to allow this to be used? Last time I tried > calling dma_set_mask(52) on powernv it returned an error and there doesn't > seem to be anything obvious to me in this series to change that behaviour, >

Re: [PATCH] powerpc/tm: Avoid machine crash on rt_sigreturn

2019-05-01 Thread Michael Neuling
On Wed, 2019-01-16 at 14:47 -0200, Breno Leitao wrote: > There is a kernel crash that happens if rt_sigreturn is called inside a > transactional block. > > This crash happens if the kernel hits an in-kernel page fault when > accessing userspace memory, usually through copy_ckvsx_to_user(). A

Re: [PATCH 2/2] powerpc/mm: Warn if W+X pages found on boot

2019-05-01 Thread Russell Currey
On Wed, 2019-04-24 at 09:14 +0200, Christophe Leroy wrote: > > Le 24/04/2019 à 08:39, Russell Currey a écrit : > > Implement code to walk all pages and warn if any are found to be > > both > > writable and executable. Depends on STRICT_KERNEL_RWX enabled, and > > is > > behind the DEBUG_WX

Re: [PATCH] cxl: Add new kernel traces

2019-05-01 Thread Michael Ellerman
Christophe Lombard writes: > This patch adds new kernel traces in the current in-kernel 'library' > which can be called by other drivers to help interacting with an > IBM XSL on a POWER9 system. > > If some kernel traces exist in the 'normal path' to handle a page or a > segment fault, some

Re: [PATCH kernel v2 0/2] powerpc/ioda2: Another attempt to allow DMA masks between 32 and 59

2019-05-01 Thread Alistair Popple
Hi Alexey, Do we need a seperate patch to allow this to be used? Last time I tried calling dma_set_mask(52) on powernv it returned an error and there doesn't seem to be anything obvious to me in this series to change that behaviour, but perhaps I missed something. - Alistair On Wednesday, 1

Re: [PATCH 4/5] soc/fsl/qe: qe.c: support fsl,qe-snums property

2019-05-01 Thread Rasmus Villemoes
On 30/04/2019 19.19, Christophe Leroy wrote: > > > Le 30/04/2019 à 15:36, Rasmus Villemoes a écrit : >> The current code assumes that the set of snum _values_ to populate the >> snums[] array with is a function of the _number_ of snums >> alone. However, reading table 4-30, and its footnotes, of