[PATCH 3/3] fs/core/vmcore: Move sev_active() reference to x86 arch code

2019-07-11 Thread Thiago Jung Bauermann
Secure Encrypted Virtualization is an x86-specific feature, so it shouldn't appear in generic kernel code because it forces non-x86 architectures to define the sev_active() function, which doesn't make a lot of sense. To solve this problem, add an x86 elfcorehdr_read() function to override the

[PATCH 2/3] DMA mapping: Move SME handling to x86-specific files

2019-07-11 Thread Thiago Jung Bauermann
Secure Memory Encryption is an x86-specific feature, so it shouldn't appear in generic kernel code. Introduce ARCH_HAS_DMA_CHECK_MASK so that x86 can define its own dma_check_mask() for the SME check. In SWIOTLB code, there's no need to mention which memory encryption feature is active. Also,

[PATCH 1/3] x86/Kconfig: Move ARCH_HAS_MEM_ENCRYPT to arch/Kconfig

2019-07-11 Thread Thiago Jung Bauermann
powerpc and s390 are going to use this feature as well, so put it in a generic location. Signed-off-by: Thiago Jung Bauermann --- arch/Kconfig | 3 +++ arch/x86/Kconfig | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index

[PATCH 0/3] Remove x86-specific code from generic headers

2019-07-11 Thread Thiago Jung Bauermann
Hello, Both powerpc¹ and s390² are adding headers. Currently, they have to supply definitions for functions and macros which only have a meaning on x86: sme_me_mask, sme_active() and sev_active(). Christoph Hellwig made a suggestion to "clean up the Kconfig and generic headers bits for memory

Re: [PATCH v2] powerpc/book3s/mm: Update Oops message to print the correct translation in use

2019-07-11 Thread Christophe Leroy
Le 11/07/2019 à 16:58, Aneesh Kumar K.V a écrit : Avoids confusion when printing Oops message like below Faulting instruction address: 0xc008bdb4 Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Radix MMU=Hash SMP NR_CPUS=2048 NUMA PowerNV This was because we

Re: [PATCH v9 05/10] namei: O_BENEATH-style path resolution flags

2019-07-11 Thread Al Viro
On Sun, Jul 07, 2019 at 12:57:32AM +1000, Aleksa Sarai wrote: > @@ -1442,8 +1464,11 @@ static int follow_dotdot_rcu(struct nameidata *nd) > struct inode *inode = nd->inode; > > while (1) { > - if (path_equal(>path, >root)) > + if (path_equal(>path, >root)) {

Re: [PATCH v6] cpufreq/pasemi: fix an use-after-free inpas_cpufreq_cpu_init()

2019-07-11 Thread wen.yang99
> > The cpu variable is still being used in the of_get_property() call > > after the of_node_put() call, which may result in use-after-free. > > > > Fixes: a9acc26b75f6 ("cpufreq/pasemi: fix possible object reference leak") > > Signed-off-by: Wen Yang > > Cc: "Rafael J. Wysocki" > > Cc: Viresh

Re: [PATCH v9 04/10] namei: split out nd->dfd handling to dirfd_path_init

2019-07-11 Thread Al Viro
On Sun, Jul 07, 2019 at 12:57:31AM +1000, Aleksa Sarai wrote: > Previously, path_init's handling of *at(dfd, ...) was only done once, > but with LOOKUP_BENEATH (and LOOKUP_IN_ROOT) we have to parse the > initial nd->path at different times (before or after absolute path > handling) depending on

Re: [PATCH v9 01/10] namei: obey trailing magic-link DAC permissions

2019-07-11 Thread Al Viro
On Sun, Jul 07, 2019 at 12:57:28AM +1000, Aleksa Sarai wrote: > @@ -514,7 +516,14 @@ static void set_nameidata(struct nameidata *p, int dfd, > struct filename *name) > p->stack = p->internal; > p->dfd = dfd; > p->name = name; > - p->total_link_count = old ?

Re: [PATCH v6] cpufreq/pasemi: fix an use-after-free in pas_cpufreq_cpu_init()

2019-07-11 Thread Viresh Kumar
On 12-07-19, 10:44, Wen Yang wrote: > The cpu variable is still being used in the of_get_property() call > after the of_node_put() call, which may result in use-after-free. > > Fixes: a9acc26b75f6 ("cpufreq/pasemi: fix possible object reference leak") > Signed-off-by: Wen Yang > Cc: "Rafael J.

[PATCH] cpufreq: Make cpufreq_generic_init() return void

2019-07-11 Thread Viresh Kumar
It always returns 0 (success) and its return type should really be void. Over that, many drivers have added error handling code based on its return value, which is not required at all. change its return type to void and update all the callers. Signed-off-by: Viresh Kumar ---

[PATCH 03/12] Documentation/ia64: repointer docs to Documentation/arch/ia64

2019-07-11 Thread Alex Shi
Since we move 'ia64' docs to Documentation/arch/ia64 dir, redirect the doc pointer to them. Signed-off-by: Alex Shi Cc: Ard Biesheuvel Cc: Tony Luck Cc: Fenghua Yu Cc: linux-ker...@vger.kernel.org Cc: linux-i...@vger.kernel.org --- MAINTAINERS | 2 +- arch/ia64/kernel/efi.c | 2

[PATCH 05/12] Documentation/s390: repointer docs to Documentation/arch/

2019-07-11 Thread Alex Shi
Since we move Documentation/s390 docs to Documentation/arch/s390 dir, redirect the doc pointer to them. Signed-off-by: Alex Shi Cc: Jonathan Corbet Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: linux-...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Cc:

[PATCH 08/12] Dcumentation/powerpc: repointer docs to Documentation/arch/

2019-07-11 Thread Alex Shi
Since we move Documentation/powerpc docs to Documentation/arch/powerpc dir, redirect the doc pointer to them. Signed-off-by: Alex Shi Cc: Sam Bobroff Cc: Jonathan Corbet Cc: "Manoj N. Kumar" Cc: "Matthew R. Ochs" Cc: Uma Krishnan Cc: linuxppc-dev@lists.ozlabs.org Cc:

[PATCH 04/12] Documentation/m68k: repointer docs to Documentation/arch/

2019-07-11 Thread Alex Shi
Since we move Documentation/m68k docs to Documentation/arch/m68k dir, redirect the doc pointer to them. Signed-off-by: Alex Shi Cc: Jonathan Corbet Cc: Will Deacon Cc: linux-...@vger.kernel.org Cc: linux-ker...@vger.kernel.org --- Documentation/admin-guide/kernel-parameters.rst | 2 +- 1 file

[PATCH 11/12] Documentation/x86: repointer docs to Documentation/arch/

2019-07-11 Thread Alex Shi
Since we move Documentation/x86 docs to Documentation/arch/x86 dir, redirect the doc pointer to them. Signed-off-by: Alex Shi Cc: Jonathan Corbet Cc: Tony Luck Cc: "H. Peter Anvin" Cc: x...@kernel.org Cc: Peter Zijlstra Cc: Changbin Du Cc: linux-...@vger.kernel.org Cc:

[PATCH 10/12] Documentation/sparc: repointer docs to Documentation/arch/

2019-07-11 Thread Alex Shi
Since we move Documentation/sparc docs to Documentation/arch/sparc dir, redirect the doc pointer to them. Signed-off-by: Alex Shi Cc: Jonathan Corbet Cc: linux-...@vger.kernel.org Cc: sparcli...@vger.kernel.org Cc: linux-ker...@vger.kernel.org --- drivers/sbus/char/oradax.c | 2 +- 1 file

[PATCH 06/12] Documentation/mips: repointer docs to Documentation/arch/

2019-07-11 Thread Alex Shi
Since we move Documentation/mips docs to Documentation/arch/mips dir, redirect the doc pointer to them. Signed-off-by: Alex Shi Cc: Mauro Carvalho Chehab Cc: "David S. Miller" Cc: linux-ker...@vger.kernel.org --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 01/12] Documentation: move architectures together

2019-07-11 Thread Alex Shi
There are many different archs in Documentation/ dir, it's better to move them together in 'Documentation/arch' which follows from kernel source. Signed-off-by: Alex Shi Cc: Jonathan Corbet Cc: linux-...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Cc:

[PATCH 12/12] Documentation/xtensa: repointer docs to Documentation/arch/

2019-07-11 Thread Alex Shi
Since we move Documentation/xtensa docs to Documentation/arch/xtensa dir, redirect the doc pointer to them. Signed-off-by: Alex Shi Cc: Jonathan Corbet Cc: linux-...@vger.kernel.org Cc: Chris Zankel Cc: Max Filippov Cc: linux-xte...@linux-xtensa.org Cc: linux-ker...@vger.kernel.org ---

[PATCH 02/12] Documentation/arm: repointer docs to Documentation/arch/arm

2019-07-11 Thread Alex Shi
Since we move 'arm/arm64' docs to Documentation/arch/{arm,arm64} dir, redirect the doc pointer to them. Signed-off-by: Alex Shi Cc: Jonathan Corbet Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: linux-...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Cc: linux-arm-ker...@lists.infradead.org

[PATCH 09/12] Dcumentation/sh: repointer docs to Documentation/arch/

2019-07-11 Thread Alex Shi
Since we move Documentation/sh docs to Documentation/arch/sh dir, redirect the doc pointer to them. Signed-off-by: Alex Shi Cc: Jonathan Corbet Cc: linux-...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Cc: linux...@vger.kernel.org --- Documentation/conf.py | 2 +- MAINTAINERS |

[PATCH 07/12] Documentation/parisc: repointer docs to Documentation/arch/

2019-07-11 Thread Alex Shi
Since we move Documentation/parisc docs to Documentation/arch/parisc dir, redirect the doc pointer to them. Signed-off-by: Alex Shi Cc: Mauro Carvalho Chehab Cc: linux-ker...@vger.kernel.org --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS

[PATCH v6] cpufreq/pasemi: fix an use-after-free in pas_cpufreq_cpu_init()

2019-07-11 Thread Wen Yang
The cpu variable is still being used in the of_get_property() call after the of_node_put() call, which may result in use-after-free. Fixes: a9acc26b75f6 ("cpufreq/pasemi: fix possible object reference leak") Signed-off-by: Wen Yang Cc: "Rafael J. Wysocki" Cc: Viresh Kumar Cc: Michael Ellerman

Re: [PATCH v2 0/5] mm: Enable CONFIG_NODES_SPAN_OTHER_NODES by default for NUMA

2019-07-11 Thread Matthew Wilcox
On Thu, Jul 11, 2019 at 11:25:44PM +, Hoan Tran OS wrote: > In NUMA layout which nodes have memory ranges that span across other nodes, > the mm driver can detect the memory node id incorrectly. > > For example, with layout below > Node 0 address: > Node 1 address:

[Bug 204125] FTBFS on ppc64 big endian and gcc9 because of -mcall-aixdesc and missing __linux__

2019-07-11 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204125 --- Comment #7 from Daniel Kolesa (li...@octaforge.org) --- Btw, turns out an ELFv2 BE kernel requires little to no changes, these two commits produce a working kernel:

Re: [PATCH v4 7/8] KVM: PPC: Ultravisor: Enter a secure guest

2019-07-11 Thread Nicholas Piggin
Claudio Carvalho's on June 29, 2019 6:08 am: > From: Sukadev Bhattiprolu > > To enter a secure guest, we have to go through the ultravisor, therefore > we do a ucall when we are entering a secure guest. > > This change is needed for any sort of entry to the secure guest from the > hypervisor,

[Bug 204125] FTBFS on ppc64 big endian and gcc9 because of -mcall-aixdesc and missing __linux__

2019-07-11 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204125 --- Comment #6 from Daniel Kolesa (li...@octaforge.org) --- This appears to be the actual reason why the kernel fails to link without -mcall-aixdesc: specifically it's the -mcall-aixdesc that's problematic. but removing it breaks

Re: [PATCH v4 3/8] KVM: PPC: Ultravisor: Add generic ultravisor call handler

2019-07-11 Thread Nicholas Piggin
Claudio Carvalho's on June 29, 2019 6:08 am: > From: Ram Pai > > Add the ucall() function, which can be used to make ultravisor calls > with varied number of in and out arguments. Ultravisor calls can be made > from the host or guests. > > This copies the implementation of plpar_hcall(). > >

Re: [PATCH v4 1/8] KVM: PPC: Ultravisor: Introduce the MSR_S bit

2019-07-11 Thread Nicholas Piggin
Michael Ellerman's on July 11, 2019 10:57 pm: > Claudio Carvalho writes: >> From: Sukadev Bhattiprolu >> >> The ultravisor processor mode is introduced in POWER platforms that >> supports the Protected Execution Facility (PEF). Ultravisor is higher >> privileged than hypervisor mode. >> >> In

Re: [PATCH v4 1/8] KVM: PPC: Ultravisor: Introduce the MSR_S bit

2019-07-11 Thread Nicholas Piggin
Claudio Carvalho's on June 29, 2019 6:08 am: > From: Sukadev Bhattiprolu > > The ultravisor processor mode is introduced in POWER platforms that > supports the Protected Execution Facility (PEF). Ultravisor is higher > privileged than hypervisor mode. > > In PEF enabled platforms, the MSR_S bit

Re: [PATCH v2] powerpc/book3s/mm: Update Oops message to print the correct translation in use

2019-07-11 Thread Nicholas Piggin
Aneesh Kumar K.V's on July 12, 2019 12:58 am: > Avoids confusion when printing Oops message like below > > Faulting instruction address: 0xc008bdb4 > Oops: Kernel access of bad area, sig: 11 [#1] > LE PAGE_SIZE=64K MMU=Radix MMU=Hash SMP NR_CPUS=2048 NUMA PowerNV > > This was because

[PATCH v2 5/5] s390: Kconfig: Remove CONFIG_NODES_SPAN_OTHER_NODES

2019-07-11 Thread Hoan Tran OS
Remove CONFIG_NODES_SPAN_OTHER_NODES as it's enabled by default with NUMA. Signed-off-by: Hoan Tran --- arch/s390/Kconfig | 8 1 file changed, 8 deletions(-) diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 109243f..788a8e9 100644 --- a/arch/s390/Kconfig +++

[PATCH v2 4/5] sparc: Kconfig: Remove CONFIG_NODES_SPAN_OTHER_NODES

2019-07-11 Thread Hoan Tran OS
Remove CONFIG_NODES_SPAN_OTHER_NODES as it's enabled by default with NUMA. Signed-off-by: Hoan Tran --- arch/sparc/Kconfig | 9 - 1 file changed, 9 deletions(-) diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 26ab6f5..13449ea 100644 --- a/arch/sparc/Kconfig +++

[PATCH v2 3/5] x86: Kconfig: Remove CONFIG_NODES_SPAN_OTHER_NODES

2019-07-11 Thread Hoan Tran OS
Remove CONFIG_NODES_SPAN_OTHER_NODES as it's enabled by default with NUMA. Signed-off-by: Hoan Tran --- arch/x86/Kconfig | 9 - 1 file changed, 9 deletions(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 2bbbd4d..fa9318c 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@

[PATCH v2 2/5] powerpc: Kconfig: Remove CONFIG_NODES_SPAN_OTHER_NODES

2019-07-11 Thread Hoan Tran OS
Remove CONFIG_NODES_SPAN_OTHER_NODES as it's enabled by default with NUMA. Signed-off-by: Hoan Tran --- arch/powerpc/Kconfig | 9 - 1 file changed, 9 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 8c1c636..bdde8bc 100644 --- a/arch/powerpc/Kconfig +++

[PATCH v2 1/5] mm: Enable CONFIG_NODES_SPAN_OTHER_NODES by default for NUMA

2019-07-11 Thread Hoan Tran OS
In NUMA layout which nodes have memory ranges that span across other nodes, the mm driver can detect the memory node id incorrectly. For example, with layout below Node 0 address: Node 1 address: Note: - Memory from low to high - 0/1: Node id - x:

[PATCH v2 0/5] mm: Enable CONFIG_NODES_SPAN_OTHER_NODES by default for NUMA

2019-07-11 Thread Hoan Tran OS
In NUMA layout which nodes have memory ranges that span across other nodes, the mm driver can detect the memory node id incorrectly. For example, with layout below Node 0 address: Node 1 address: Note: - Memory from low to high - 0/1: Node id - x:

Re: [PATCH] mm/kprobes: Add generic kprobe_fault_handler() fallback definition

2019-07-11 Thread Masami Hiramatsu
Hi Anshuman, On Mon, 8 Jul 2019 09:03:13 +0530 Anshuman Khandual wrote: > >> Architectures like parisc enable CONFIG_KROBES without having a definition > >> for kprobe_fault_handler() which results in a build failure. > > > > Hmm, as far as I can see, kprobe_fault_handler() is closed inside

Re: [PATCH v3] tpm: tpm_ibm_vtpm: Fix unallocated banks

2019-07-11 Thread Jarkko Sakkinen
On Thu, Jul 11, 2019 at 11:28:24PM +0300, Jarkko Sakkinen wrote: > On Thu, Jul 11, 2019 at 12:13:35PM -0400, Nayna Jain wrote: > > The nr_allocated_banks and allocated banks are initialized as part of > > tpm_chip_register. Currently, this is done as part of auto startup > > function. However,

Re: [PATCH] treewide: Rename rcu_dereference_raw_notrace to _check

2019-07-11 Thread Joel Fernandes
On Thu, Jul 11, 2019 at 4:45 PM Joel Fernandes (Google) wrote: > > The rcu_dereference_raw_notrace() API name is confusing. > It is equivalent to rcu_dereference_raw() except that it also does > sparse pointer checking. > > There are only a few users of rcu_dereference_raw_notrace(). This >

[PATCH] treewide: Rename rcu_dereference_raw_notrace to _check

2019-07-11 Thread Joel Fernandes (Google)
The rcu_dereference_raw_notrace() API name is confusing. It is equivalent to rcu_dereference_raw() except that it also does sparse pointer checking. There are only a few users of rcu_dereference_raw_notrace(). This patches renames all of them to be rcu_dereference_raw_check with the "check"

Re: [PATCH v3] tpm: tpm_ibm_vtpm: Fix unallocated banks

2019-07-11 Thread Jarkko Sakkinen
On Thu, Jul 11, 2019 at 12:13:35PM -0400, Nayna Jain wrote: > The nr_allocated_banks and allocated banks are initialized as part of > tpm_chip_register. Currently, this is done as part of auto startup > function. However, some drivers, like the ibm vtpm driver, do not run > auto startup during

Re: [PATCH v2] tpm: tpm_ibm_vtpm: Fix unallocated banks

2019-07-11 Thread Nayna
Hi Jarkko, On 07/09/2019 12:38 PM, Jarkko Sakkinen wrote: On Mon, Jul 08, 2019 at 03:43:04PM -0700, Christoph Hellwig wrote: On Mon, Jul 08, 2019 at 06:24:04PM -0400, Mimi Zohar wrote: static int tpm_get_pcr_allocation(struct tpm_chip *chip) { int rc; rc = (chip->flags &

Re: [PATCH V4 2/2] ASoC: fsl_esai: recover the channel swap after xrun

2019-07-11 Thread Nicolin Chen
On Thu, Jul 11, 2019 at 06:49:46PM +0800, shengjiu.w...@nxp.com wrote: > From: Shengjiu Wang > > There is chip errata ERR008000, the reference doc is > (https://www.nxp.com/docs/en/errata/IMX6DQCE.pdf), > > The issue is "While using ESAI transmit or receive and > an underrun/overrun happens,

[PATCH v3] tpm: tpm_ibm_vtpm: Fix unallocated banks

2019-07-11 Thread Nayna Jain
The nr_allocated_banks and allocated banks are initialized as part of tpm_chip_register. Currently, this is done as part of auto startup function. However, some drivers, like the ibm vtpm driver, do not run auto startup during initialization. This results in uninitialized memory issue and causes a

[PATCH v2] powerpc/book3s/mm: Update Oops message to print the correct translation in use

2019-07-11 Thread Aneesh Kumar K.V
Avoids confusion when printing Oops message like below Faulting instruction address: 0xc008bdb4 Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Radix MMU=Hash SMP NR_CPUS=2048 NUMA PowerNV This was because we never clear the MMU_FTR_HPTE_TABLE feature flag even if

[PATCH] powerpc/nvdimm: Pick the nearby online node if the device node is not online

2019-07-11 Thread Aneesh Kumar K.V
This is similar to what ACPI does. Nvdimm layer doesn't bring the SCM device numa node online. Hence we need to make sure we always use an online node as ndr_desc.numa_node. Otherwise this result in kernel crashes. The target node is used by dax/kmem and that will bring up the numa node online

Re: Coccinelle: Checking of_node_put() calls with SmPL

2019-07-11 Thread Tyrel Datwyler
On 07/10/2019 11:35 PM, wen.yan...@zte.com.cn wrote: >>> we developed a coccinelle script to detect such problems. >> >> Would you find the implementation of the function “dt_init_idle_driver” >> suspicious according to discussed source code search patterns? >>

[PATCH -next] powerpc/powernv/ioda: using kfree_rcu() to simplify the code

2019-07-11 Thread YueHaibing
The callback function of call_rcu() just calls a kfree(), so we can use kfree_rcu() instead of call_rcu() + callback function. Signed-off-by: YueHaibing --- arch/powerpc/platforms/powernv/pci-ioda-tce.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git

Re: [PATCH v4 8/8] KVM: PPC: Ultravisor: Check for MSR_S during hv_reset_msr

2019-07-11 Thread Michael Ellerman
Claudio Carvalho writes: > From: Michael Anderson > > - Check for MSR_S so that kvmppc_set_msr will include it. Prior to this >change return to guest would not have the S bit set. That sounds like it would be bad? Please spell out what the practical impact of the patch is, ie. somewhere

Re: [PATCH v4 7/8] KVM: PPC: Ultravisor: Enter a secure guest

2019-07-11 Thread Michael Ellerman
Claudio Carvalho writes: > From: Sukadev Bhattiprolu > > To enter a secure guest, we have to go through the ultravisor, therefore > we do a ucall when we are entering a secure guest. > > This change is needed for any sort of entry to the secure guest from the > hypervisor, whether it is a return

Re: [PATCH v4 6/8] KVM: PPC: Ultravisor: Restrict LDBAR access

2019-07-11 Thread Michael Ellerman
Claudio Carvalho writes: > When the ultravisor firmware is available, it takes control over the > LDBAR register. In this case, thread-imc updates and save/restore > operations on the LDBAR register are handled by ultravisor. Please roll up the replies to Alexey's question about LDBAR into the

Re: [PATCH v4 4/8] KVM: PPC: Ultravisor: Use UV_WRITE_PATE ucall to register a PATE

2019-07-11 Thread Michael Ellerman
Claudio Carvalho writes: > From: Michael Anderson > > When running under an ultravisor, the ultravisor controls the real > partition table and has it in secure memory where the hypervisor can't > access it, and therefore we (the HV) have to do a ucall whenever we want > to update an entry. > >

Re: [PATCH v4 2/8] powerpc: Introduce FW_FEATURE_ULTRAVISOR

2019-07-11 Thread Michael Ellerman
Claudio Carvalho writes: > diff --git a/arch/powerpc/include/asm/ultravisor.h > b/arch/powerpc/include/asm/ultravisor.h > new file mode 100644 > index ..e5009b0d84ea > --- /dev/null > +++ b/arch/powerpc/include/asm/ultravisor.h > @@ -0,0 +1,15 @@ > +/* SPDX-License-Identifier:

Re: [PATCH v4 3/8] KVM: PPC: Ultravisor: Add generic ultravisor call handler

2019-07-11 Thread Michael Ellerman
Claudio Carvalho writes: > From: Ram Pai > > Add the ucall() function, which can be used to make ultravisor calls > with varied number of in and out arguments. Ultravisor calls can be made > from the host or guests. > > This copies the implementation of plpar_hcall(). .. with quite a few

Re: [PATCH v4 1/8] KVM: PPC: Ultravisor: Introduce the MSR_S bit

2019-07-11 Thread Michael Ellerman
Claudio Carvalho writes: > From: Sukadev Bhattiprolu > > The ultravisor processor mode is introduced in POWER platforms that > supports the Protected Execution Facility (PEF). Ultravisor is higher > privileged than hypervisor mode. > > In PEF enabled platforms, the MSR_S bit is used to indicate

Re: [PATCH v3 5/7] kexec_elf: remove elf_addr_to_cpu macro

2019-07-11 Thread Michael Ellerman
Sven Schnelle writes: > On Wed, Jul 10, 2019 at 05:09:29PM +0200, Christophe Leroy wrote: >> Le 10/07/2019 à 16:29, Sven Schnelle a écrit : >> > It had only one definition, so just use the function directly. >> >> It had only one definition because it was for ppc64 only. >> But as far as I

[PATCH V4 1/2] ASoC: fsl_esai: Wrap some operations to be functions

2019-07-11 Thread shengjiu . wang
From: Shengjiu Wang Extract the operation to be functions, to improve the readability. In this patch, fsl_esai_hw_init, fsl_esai_register_restore, fsl_esai_trigger_start and fsl_esai_trigger_stop are extracted. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen --- sound/soc/fsl/fsl_esai.c

[PATCH V4 2/2] ASoC: fsl_esai: recover the channel swap after xrun

2019-07-11 Thread shengjiu . wang
From: Shengjiu Wang There is chip errata ERR008000, the reference doc is (https://www.nxp.com/docs/en/errata/IMX6DQCE.pdf), The issue is "While using ESAI transmit or receive and an underrun/overrun happens, channel swap may occur. The only recovery mechanism is to reset the ESAI." This issue

[PATCH V4 0/2] recover the channel swap after xrun

2019-07-11 Thread shengjiu . wang
From: Shengjiu Wang recover the channel swap after xrun Shengjiu Wang (2): ASoC: fsl_esai: Wrap some operations to be functions ASoC: fsl_esai: recover the channel swap after xrun sound/soc/fsl/fsl_esai.c | 266 --- 1 file changed, 193 insertions(+), 73

Re: [PATCH] mm/kprobes: Add generic kprobe_fault_handler() fallback definition

2019-07-11 Thread Anshuman Khandual
On 07/05/2019 11:00 AM, Anshuman Khandual wrote: > Architectures like parisc enable CONFIG_KROBES without having a definition > for kprobe_fault_handler() which results in a build failure. Arch needs to > provide kprobe_fault_handler() as it is platform specific and cannot have > a generic

Re: [v5 5/6] powerpc/mce: Handle UE event for memcpy_mcsafe

2019-07-11 Thread Nicholas Piggin
Santosh Sivaraj's on July 9, 2019 10:15 pm: > If we take a UE on one of the instructions with a fixup entry, set nip > to continue execution at the fixup entry. Stop processing the event > further or print it. So... what happens if we take a machine check while we happen to be executing some

Re: [v5 3/6] powerpc/memcpy: Add memcpy_mcsafe for pmem

2019-07-11 Thread Nicholas Piggin
Santosh Sivaraj's on July 9, 2019 10:15 pm: > From: Balbir Singh > > The pmem infrastructure uses memcpy_mcsafe in the pmem layer so as to > convert machine check exceptions into a return value on failure in case > a machine check exception is encountered during the memcpy. The return > value is

Re: [v5 4/6] extable: Add function to search only kernel exception table

2019-07-11 Thread Nicholas Piggin
Santosh Sivaraj's on July 9, 2019 10:15 pm: > In real mode, the search_exception tables cannot be called because > it also searches the module exception tables if entry is not found > in the kernel exception tables. This is a patch for generic kernel code, it may not go through powerpc tree and

Re: [v5 2/6] powerpc/mce: Fix MCE handling for huge pages

2019-07-11 Thread Nicholas Piggin
Santosh Sivaraj's on July 9, 2019 10:15 pm: > From: Balbir Singh > > The current code would fail on huge pages addresses, since the shift > would be incorrect. Use the correct page shift value returned by > __find_linux_pte() to get the correct pfn. The code is more generic > and can handle both

Re: Coccinelle: Checking of_node_put() calls with SmPL

2019-07-11 Thread Markus Elfring
> In my experience, when you start looking at these of_node_put things, > all sorts of strange things appear... How much will this situation influence the achievement of further improvements also for your software? Regards, Markus

Re: Coccinelle: Checking of_node_put() calls with SmPL

2019-07-11 Thread Markus Elfring
> 180 break; ---> Jump out of > the loop without releasing it The device node reference is released behind this for loop. > 183 if (!of_device_is_available(state_node)) { > 184 of_node_put(state_node);

Re: [PATCH] powerpc/eeh: Handle hugepages in ioremap space

2019-07-11 Thread Sachin Sant
> On 10-Jul-2019, at 8:35 PM, Oliver O'Halloran wrote: > > In commit 4a7b06c157a2 ("powerpc/eeh: Handle hugepages in ioremap > space") support for using hugepages in the vmalloc and ioremap areas was > enabled for radix. Unfortunately this broke EEH MMIO error checking. > > Detection works by

Re: Coccinelle: Checking of_node_put() calls with SmPL

2019-07-11 Thread Julia Lawall
On Thu, 11 Jul 2019, wen.yan...@zte.com.cn wrote: > > > we developed a coccinelle script to detect such problems. > > > > Would you find the implementation of the function “dt_init_idle_driver” > > suspicious according to discussed source code search patterns? > >

Re: Coccinelle: Checking of_node_put() calls with SmPL

2019-07-11 Thread wen.yang99
> > we developed a coccinelle script to detect such problems. > > Would you find the implementation of the function “dt_init_idle_driver” > suspicious according to discussed source code search patterns? >

Re: [PATCH V3 2/2] ASoC: fsl_esai: recover the channel swap after xrun

2019-07-11 Thread S.j. Wang
> > Hi Shengjiu, > > Mostly looks good to me, just some small comments. > > On Mon, Jul 08, 2019 at 02:38:52PM +0800, shengjiu.w...@nxp.com wrote: > > > +static void fsl_esai_hw_reset(unsigned long arg) { > > + struct fsl_esai *esai_priv = (struct fsl_esai *)arg; > > + u32 saisr,