Re: [PATCH 18/19] KVM: PPC: Book3S HV: add passthrough support

2019-01-22 Thread Benjamin Herrenschmidt
On Tue, 2019-01-22 at 16:26 +1100, Paul Mackerras wrote: > On Mon, Jan 07, 2019 at 08:10:05PM +0100, Cédric Le Goater wrote: > > Clear the ESB pages from the VMA of the IRQ being pass through to the > > guest and let the fault handler repopulate the VMA when the ESB pages > > are accessed for an

[PATCH] arch/powerpc/radix: Fix kernel crash with mremap

2019-01-22 Thread Aneesh Kumar K.V
With support for split pmd lock, we use pmd page pmd_huge_pte pointer to store the deposited page table. In those config when we move page tables we need to make sure we move the depoisted page table to the right pmd page. Otherwise this can result in crash when we withdraw of deposited page table

Re: [PATCH kernel] vfio-pci/nvlink2: Fix ancient gcc warnings

2019-01-22 Thread Alex Williamson
Hi Geert, The below patch comes about from the build regressions and improvements list you've sent out, but something doesn't add up that we'd be testing with an old compiler where initialization with { 0 } generates a "missing braces around initialization" warning. Is this really the case or

[PATCH kernel] vfio-pci/nvlink2: Fix ancient gcc warnings

2019-01-22 Thread Alexey Kardashevskiy
Using the {0} construct as a generic initializer is perfectly fine in C, however due to a bug in old gcc there is a warning: + /kisskb/src/drivers/vfio/pci/vfio_pci_nvlink2.c: warning: (near initialization for 'cap.header') [-Wmissing-braces]: => 181:9 Since for whatever reason we still want

Re: [PATCH v9 00/22] Re-use nvram module

2019-01-22 Thread Finn Thain
On Tue, 22 Jan 2019, Greg Kroah-Hartman wrote: > On Tue, Jan 15, 2019 at 03:18:56PM +1100, Finn Thain wrote: > > The "generic" NVRAM module, drivers/char/generic_nvram.c, implements a > > /dev/nvram misc device. This module is used only by 32-bit PowerPC > > platforms. > > > > The RTC "CMOS"

Re: [PATCH] PCI: Use of_node_name_eq for node name comparisons

2019-01-22 Thread Bjorn Helgaas
[+cc Michael B] On Wed, Dec 05, 2018 at 01:50:34PM -0600, Rob Herring wrote: > Convert string compares of DT node names to use of_node_name_eq helper > instead. This removes direct access to the node name pointer. > > Cc: Benjamin Herrenschmidt > Cc: Paul Mackerras > Cc: Michael Ellerman >

Re: [RFC 5/6] powerpc/pci/hotplug: Use common drcinfo parsing

2019-01-22 Thread Bjorn Helgaas
On Mon, Jan 14, 2019 at 06:28:57PM -0600, Bjorn Helgaas wrote: > On Fri, Dec 14, 2018 at 02:51:31PM -0600, Michael Bringmann wrote: > > The implementation of the pseries-specific drc info properties > > is currently implemented in pseries-specific and non-pseries-specific > > files. This patch

Re: [PATCH v13 00/10] powerpc: Switch to CONFIG_THREAD_INFO_IN_TASK

2019-01-22 Thread Christophe Leroy
Le 19/01/2019 à 11:23, Michael Ellerman a écrit : Christophe Leroy writes: The purpose of this serie is to activate CONFIG_THREAD_INFO_IN_TASK which moves the thread_info into task_struct. Moving thread_info into task_struct has the following advantages: - It protects thread_info from

[PATCH 4/4] powerpc/livepatch: return -ERRNO values in save_stack_trace_tsk_reliable()

2019-01-22 Thread Joe Lawrence
To match its x86 counterpart, save_stack_trace_tsk_reliable() should return -EINVAL in cases that it is currently returning 1. No caller is currently differentiating non-zero error codes, but let's keep the arch-specific implementations consistent. Signed-off-by: Joe Lawrence ---

[PATCH 3/4] powerpc/livepatch: small cleanups in save_stack_trace_tsk_reliable()

2019-01-22 Thread Joe Lawrence
Mostly cosmetic changes: - Group common stack pointer code at the top - Simplify the first frame logic - Code stackframe iteration into for...loop construct - Check for trace->nr_entries overflow before adding any into the array Suggested-by: Nicolai Stange Signed-off-by: Joe Lawrence ---

[PATCH 2/4] powerpc/livepatch: relax reliable stack tracer checks for first-frame

2019-01-22 Thread Joe Lawrence
The bottom-most stack frame (the first to be unwound) may be largely uninitialized, for the "Power Architecture 64-Bit ELF V2 ABI" only requires its backchain pointer to be set. The reliable stack tracer should be careful when verifying this frame: skip checks on STACK_FRAME_LR_SAVE and

[PATCH 1/4] powerpc/64s: Clear on-stack exception marker upon exception return

2019-01-22 Thread Joe Lawrence
From: Nicolai Stange The ppc64 specific implementation of the reliable stacktracer, save_stack_trace_tsk_reliable(), bails out and reports an "unreliable trace" whenever it finds an exception frame on the stack. Stack frames are classified as exception frames if the STACK_FRAME_REGS_MARKER

[PATCH 0/4] powerpc/livepatch: reliable stack unwinder fixes

2019-01-22 Thread Joe Lawrence
This patchset fixes a false negative report (ie, unreliable) from the ppc64 reliable stack unwinder, discussed here [1] when it may inadvertently trip over a stale exception marker left on the stack. The first two patches fix this bug. Nicolai's change clears the marker from the stack when an

[PATCH v4 3/3] powerpc/32: Add KASAN support

2019-01-22 Thread Christophe Leroy
This patch adds KASAN support for PPC32. Note that on book3s it will only work on the 603 because the other ones use hash table and can therefore not share a single PTE table covering the entire early KASAN shadow area. Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig

[PATCH v4 2/3] powerpc/32: Move early_init() in a separate file

2019-01-22 Thread Christophe Leroy
In preparation of KASAN, move early_init() into a separate file in order to allow deactivation of KASAN for that function. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/Makefile | 2 +- arch/powerpc/kernel/early_32.c | 35 +++

[PATCH v4 1/3] powerpc/mm: prepare kernel for KAsan on PPC32

2019-01-22 Thread Christophe Leroy
In kernel/cputable.c, explicitly use memcpy() in order to allow GCC to replace it with __memcpy() when KASAN is selected. Since commit 400c47d81ca38 ("powerpc32: memset: only use dcbz once cache is enabled"), memset() can be used before activation of the cache, so no need to use memset_io() for

[PATCH v4 0/3] KASAN for powerpc/32

2019-01-22 Thread Christophe Leroy
This serie adds KASAN support to powerpc/32 Tested on nohash/32 (8xx) and book3s/32 (mpc832x ie 603) Changes in v4: - Comments from Andrey (DISABLE_BRANCH_PROFILING, Activation of reports) - Proper initialisation of shadow area in kasan_init() - Panic in case Hash table is required. - Added

[PATCH] powerpc/traps: fix recoverability of machine check handling on book3s/32

2019-01-22 Thread Christophe Leroy
Looks like book3s/32 doesn't set RI on machine check, so checking RI before calling die() will always be fatal allthought this is not an issue in most cases. Fixes: b96672dd840f ("powerpc: Machine check interrupt is a non-maskable interrupt") Fixes: daf00ae71dad ("powerpc/traps: restore

[PATCH] powerpc/selftest: fix type of mftb() in null_syscall

2019-01-22 Thread Christophe Leroy
All callers of mftb() expect 'unsigned long', and the function itself only returns lower part of the TB so it really is 'unsigned long' not 'unsigned long long' Signed-off-by: Christophe Leroy --- tools/testing/selftests/powerpc/benchmarks/null_syscall.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH] powerpc/32: Fix CONFIG_VIRT_CPU_ACCOUNTING_NATIVE for 40x/booke

2019-01-22 Thread Christophe Leroy
40x/booke have another path to reach 3f from transfer_to_handler, so ACCOUNT_CPU_USER_ENTRY() have to be moved there. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/entry_32.S | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git

[PATCH] powerpc/32: Remove unneccessary MSR[RI] clearing for 8xx

2019-01-22 Thread Christophe Leroy
MSR[RI] has already been cleared a few lines above. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/entry_32.S | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index 0768dfd8a64e..c2b66fbbf7f0 100644 ---

Re: [PATCH v3 0/4] Add NXP AUDMIX device and machine drivers

2019-01-22 Thread Viorel Suman
Hi Rob, On Lu, 2019-01-21 at 09:23 -0600, Rob Herring wrote: > On Fri, Jan 18, 2019 at 11:46:42AM -0800, Nicolin Chen wrote: > > > > On Fri, Jan 18, 2019 at 01:16:24PM +, Viorel Suman wrote: > > > > > > > > > > > > > > > > > 1. Moved "dais" node from machine driver DTS node to device > >

Re: [PATCH v3 0/4] Add NXP AUDMIX device and machine drivers

2019-01-22 Thread Viorel Suman
Hi Nicolin, On Vi, 2019-01-18 at 11:46 -0800, Nicolin Chen wrote: > On Fri, Jan 18, 2019 at 01:16:24PM +, Viorel Suman wrote: > > > > > > > > > > > > > 1. Moved "dais" node from machine driver DTS node to device > > > > driver > > > > DTS node > > > >   as suggested by Rob. > > > That was

[PATCH v4 3/3] ASoC: fsl: Add Audio Mixer machine driver

2019-01-22 Thread Viorel Suman
This patch implements Audio Mixer machine driver for NXP iMX8 SOCs. It connects together Audio Mixer and related SAI instances. Signed-off-by: Viorel Suman --- sound/soc/fsl/Kconfig | 9 ++ sound/soc/fsl/Makefile | 2 + sound/soc/fsl/imx-audmix.c | 327

[PATCH v4 0/3] Add NXP AUDMIX device and machine drivers

2019-01-22 Thread Viorel Suman
The patchset adds NXP Audio Mixer (AUDMIX) device and machine drivers and related DT bindings documentation. Changes since V3: 1. Removed machine driver DT bindings documentation. 2. Trigger machine driver probe from device driver as suggested by Nicolin. Changes since V2: 1. Moved "dais" node

[PATCH v4 2/3] ASoC: add fsl_audmix DT binding documentation

2019-01-22 Thread Viorel Suman
Add the DT binding documentation for NXP Audio Mixer CPU DAI driver. Signed-off-by: Viorel Suman --- .../devicetree/bindings/sound/fsl,audmix.txt | 54 ++ 1 file changed, 54 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/fsl,audmix.txt diff

[PATCH v4 1/3] ASoC: fsl: Add Audio Mixer CPU DAI driver

2019-01-22 Thread Viorel Suman
This patch implements Audio Mixer CPU DAI driver for NXP iMX8 SOCs. The Audio Mixer is a on-chip functional module that allows mixing of two audio streams into a single audio stream. Audio Mixer datasheet is available here: https://www.nxp.com/docs/en/reference-manual/IMX8DQXPRM.pdf

Re: [PATCH 4/4] powerpc/64s: Fix data interrupts vs d-side MCE reentrancy

2019-01-22 Thread kbuild test robot
/commits/Nicholas-Piggin/Fixes-for-3-separate-NMI-reentrancy-bugs/20190122-154328 base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next config: powerpc-defconfig (attached as .config) compiler: powerpc64-linux-gnu-gcc (Debian 8.2.0-11) 8.2.0 reproduce: wget https

Re: [PATCH v9 00/22] Re-use nvram module

2019-01-22 Thread Greg Kroah-Hartman
On Tue, Jan 15, 2019 at 03:18:56PM +1100, Finn Thain wrote: > The "generic" NVRAM module, drivers/char/generic_nvram.c, implements a > /dev/nvram misc device. This module is used only by 32-bit PowerPC > platforms. > > The RTC "CMOS" NVRAM module, drivers/char/nvram.c, also implements a >

Re: [PATCH v9 15/22] m68k: Dispatch nvram_ops calls to Atari or Mac functions

2019-01-22 Thread Greg Kroah-Hartman
On Tue, Jan 22, 2019 at 10:19:17AM +0100, Greg Kroah-Hartman wrote: > On Tue, Jan 15, 2019 at 03:18:56PM +1100, Finn Thain wrote: > > A multi-platform kernel binary has to decide at run-time how to dispatch > > the arch_nvram_ops calls. Add a platform-independent arch_nvram_ops > > struct for

Re: [PATCH v9 15/22] m68k: Dispatch nvram_ops calls to Atari or Mac functions

2019-01-22 Thread Greg Kroah-Hartman
On Tue, Jan 15, 2019 at 03:18:56PM +1100, Finn Thain wrote: > A multi-platform kernel binary has to decide at run-time how to dispatch > the arch_nvram_ops calls. Add a platform-independent arch_nvram_ops > struct for this, to replace the atari-specific one. > > Enable CONFIG_HAVE_ARCH_NVRAM_OPS