[PATCH] powerpc/mm: Fix build error with FLATMEM book3s64 config

2019-04-02 Thread Aneesh Kumar K.V
The current value of MAX_PHYSMEM_BITS cannot work with 32 bit configs. We used to have MAX_PHYSMEM_BITS not defined without SPARSEMEM and 32 bit configs never expected a value to be set for MAX_PHYSMEM_BITS. Dependent code such as zsmalloc derived the right values based on other fields. Instead of

Re: VLC doesn't play videos anymore since the PowerPC fixes 5.1-3

2019-04-02 Thread Christophe Leroy
Le 03/04/2019 à 05:52, Christian Zigotzky a écrit : Please test VLC with the RC3 of kernel 5.1. The removing of the PowerPC fixes 5.1-3 has solved the VLC issue. Another user has already confirmed that [1]. This isn’t an April Fool‘s. ;-) Could you bisect to identify the guilty commit ? Than

Re: [PATCH 5/6] powerpc/mmu: drop mmap_sem now that locked_vm is atomic

2019-04-02 Thread Christophe Leroy
Le 02/04/2019 à 22:41, Daniel Jordan a écrit : With locked_vm now an atomic, there is no need to take mmap_sem as writer. Delete and refactor accordingly. Could you please detail the change ? It looks like this is not the only change. I'm wondering what the consequences are. Before we di

Re: [PATCH 1/6] mm: change locked_vm's type from unsigned long to atomic64_t

2019-04-02 Thread Christophe Leroy
Le 02/04/2019 à 22:41, Daniel Jordan a écrit : Taking and dropping mmap_sem to modify a single counter, locked_vm, is overkill when the counter could be synchronized separately. Make mmap_sem a little less coarse by changing locked_vm to an atomic, the 64-bit variety to avoid issues with over

Re: [PATCH stable v4.14 13/32] powerpc/fsl: Add barrier_nospec implementation for NXP PowerPC Book3E

2019-04-02 Thread Joakim Tjernlund
On Wed, 2019-04-03 at 11:53 +1100, Michael Ellerman wrote: > > Joakim Tjernlund writes: > > On Tue, 2019-04-02 at 17:19 +1100, Michael Ellerman wrote: > > > Joakim Tjernlund writes: > ... > > > > Can I compile it away? > > > > > > You can't actually, but you can disable it at runtime with > > >

Re: [PATCH] powerpc/xmon: add read-only mode

2019-04-02 Thread Christophe Leroy
Le 03/04/2019 à 05:38, Christopher M Riedl a écrit : On March 29, 2019 at 3:41 AM Christophe Leroy wrote: Le 29/03/2019 à 05:21, cmr a écrit : Operations which write to memory should be restricted on secure systems and optionally to avoid self-destructive behaviors. Add a config option,

[PATCH kernel v2 1/2] powerpc/mm_iommu: Fix potential deadlock

2019-04-02 Thread Alexey Kardashevskiy
Currently mm_iommu_do_alloc() is called in 2 cases: - VFIO_IOMMU_SPAPR_REGISTER_MEMORY ioctl() for normal memory: this locks &mem_list_mutex and then locks mm::mmap_sem several times when adjusting locked_vm or pinning pages; - vfio_pci_nvgpu_regops::mmap() for GPU memory: t

[PATCH kernel v2 2/2] powerpc/mm_iommu: Allow pinning large regions

2019-04-02 Thread Alexey Kardashevskiy
When called with vmas_arg==NULL, get_user_pages_longterm() allocates an array of nr_pages*8 which can easily get greater that the max order, for example, registering memory for a 256GB guest does this and fails in __alloc_pages_nodemask(). This adds a loop over chunks of entries to fit the max ord

[PATCH kernel v2 0/2] powerpc/mm_iommu: Fixes

2019-04-02 Thread Alexey Kardashevskiy
The patches do independent things but touch exact same code so the order in which they should apply matters. This supercedes: [PATCH kernel] powerpc/mm_iommu: Allow pinning large regions [PATCH kernel 1/2] powerpc/mm_iommu: Prepare for less locking [PATCH kernel 2/2] powerpc/mm_iommu: Fix potentia

VLC doesn't play videos anymore since the PowerPC fixes 5.1-3

2019-04-02 Thread Christian Zigotzky
Please test VLC with the RC3 of kernel 5.1. The removing of the PowerPC fixes 5.1-3 has solved the VLC issue. Another user has already confirmed that [1]. This isn’t an April Fool‘s. ;-) Thanks [1] http://forum.hyperion-entertainment.com/viewtopic.php?f=58&t=4256&start=20#p47561

Re: [PATCH] powerpc/xmon: add read-only mode

2019-04-02 Thread Christopher M Riedl
> On March 29, 2019 at 3:41 AM Christophe Leroy wrote: > > > > > Le 29/03/2019 à 05:21, cmr a écrit : > > Operations which write to memory should be restricted on secure systems > > and optionally to avoid self-destructive behaviors. > > > > Add a config option, XMON_RO, to control default xm

Re: [PATCH] powerpc/watchdog: Use hrtimers for per-CPU heartbeat

2019-04-02 Thread Ravi Bangoria
On 4/2/19 4:55 PM, Nicholas Piggin wrote: > Using a jiffies timer creates a dependency on the tick_do_timer_cpu > incrementing jiffies. If that CPU has locked up and jiffies is not > incrementing, the watchdog heartbeat timer for all CPUs stops and > creates false positives and confusing warning

Re: [PATCH 2/2] arch: add pidfd and io_uring syscalls everywhere

2019-04-02 Thread Michael Ellerman
Arnd Bergmann writes: > diff --git a/arch/powerpc/kernel/syscalls/syscall.tbl > b/arch/powerpc/kernel/syscalls/syscall.tbl > index b18abb0c3dae..00f5a63c8d9a 100644 > --- a/arch/powerpc/kernel/syscalls/syscall.tbl > +++ b/arch/powerpc/kernel/syscalls/syscall.tbl > @@ -505,3 +505,7 @@ > 421 32

Re: [PATCH 2/2] arch: add pidfd and io_uring syscalls everywhere

2019-04-02 Thread Michael Ellerman
Arnd Bergmann writes: > On Sun, Mar 31, 2019 at 5:47 PM Michael Ellerman wrote: >> >> Arnd Bergmann writes: >> > Add the io_uring and pidfd_send_signal system calls to all architectures. >> > >> > These system calls are designed to handle both native and compat tasks, >> > so all entries are the

Re: [PATCH stable v4.14 13/32] powerpc/fsl: Add barrier_nospec implementation for NXP PowerPC Book3E

2019-04-02 Thread Michael Ellerman
Joakim Tjernlund writes: > On Tue, 2019-04-02 at 17:19 +1100, Michael Ellerman wrote: >> Joakim Tjernlund writes: ... >> >> > Can I compile it away? >> >> You can't actually, but you can disable it at runtime with >> "nospectre_v1" on the kernel command line. >> >> We could make it a user sele

[PATCH] powerpc: config: skiroot: Add (back) MLX5 ethernet support

2019-04-02 Thread Joel Stanley
It turns out that some defconfig changes and kernel config option changes meant we accidentally dropped Ethernet support for Mellanox CLX5 cards. Reported-by: Carol L Soto Suggested-by: Carol L Soto Signed-off-by: Stewart Smith Signed-off-by: Joel Stanley --- arch/powerpc/configs/skiroot_defc

Re: [PATCH 1/6] mm: change locked_vm's type from unsigned long to atomic64_t

2019-04-02 Thread Davidlohr Bueso
On Tue, 02 Apr 2019, Andrew Morton wrote: Also, we didn't remove any down_write(mmap_sem)s from core code so I'm thinking that the benefit of removing a few mmap_sem-takings from a few obscure drivers (sorry ;)) is pretty small. afaik porting the remaining incorrect users of locked_vm to pinne

Re: [PATCH 0/4] Enabling secure boot on PowerNV systems

2019-04-02 Thread Claudio Carvalho
On 4/2/19 6:51 PM, Matthew Garrett wrote: > On Tue, Apr 2, 2019 at 2:11 PM Claudio Carvalho > wrote: >> We want to use the efivarfs for compatibility with existing userspace >> tools. We will track and match any EFI changes that affect us. > So you implement the full PK/KEK/db/dbx/dbt infrastru

Re: [PATCH v1 2/4] soc/fsl/guts: Add definition for LX2160A

2019-04-02 Thread Li Yang
On Tue, Feb 26, 2019 at 4:12 AM Vabhav Sharma wrote: > > Adding compatible string "lx2160a-dcfg" to > initialize guts driver for lx2160 and SoC die > attribute definition for LX2160A Applied to branch next. Thanks. Regards, Leo > > Signed-off-by: Vabhav Sharma > Signed-off-by: Yinbo Zhu > Ac

Re: [PATCH] soc/fsl/qe: Fix an error code in qe_pin_request()

2019-04-02 Thread Li Yang
On Thu, Mar 28, 2019 at 9:21 AM Dan Carpenter wrote: > > We forgot to set "err" on this error path. > > Fixes: 1a2d397a6eb5 ("gpio/powerpc: Eliminate duplication of > of_get_named_gpio_flags()") > Signed-off-by: Dan Carpenter Applied to fix branch. Thanks. Regards, Leo > --- > drivers/soc/fs

Re: [PATCH 0/4] Enabling secure boot on PowerNV systems

2019-04-02 Thread Matthew Garrett
On Tue, Apr 2, 2019 at 2:11 PM Claudio Carvalho wrote: > We want to use the efivarfs for compatibility with existing userspace > tools. We will track and match any EFI changes that affect us. So you implement the full PK/KEK/db/dbx/dbt infrastructure, and updates are signed in the same way? > Ou

[PATCH 0/6] convert locked_vm from unsigned long to atomic64_t

2019-04-02 Thread Daniel Jordan
Hi, >From patch 1: Taking and dropping mmap_sem to modify a single counter, locked_vm, is overkill when the counter could be synchronized separately. Make mmap_sem a little less coarse by changing locked_vm to an atomic, the 64-bit variety to avoid issues with overflow on 32-bit system

Re: [PATCH 1/6] mm: change locked_vm's type from unsigned long to atomic64_t

2019-04-02 Thread Andrew Morton
On Tue, 2 Apr 2019 16:41:53 -0400 Daniel Jordan wrote: > Taking and dropping mmap_sem to modify a single counter, locked_vm, is > overkill when the counter could be synchronized separately. > > Make mmap_sem a little less coarse by changing locked_vm to an atomic, > the 64-bit variety to avoid

[PATCH 6/6] kvm/book3s: drop mmap_sem now that locked_vm is atomic

2019-04-02 Thread Daniel Jordan
With locked_vm now an atomic, there is no need to take mmap_sem as writer. Delete and refactor accordingly. Signed-off-by: Daniel Jordan Cc: Alexey Kardashevskiy Cc: Andrew Morton Cc: Benjamin Herrenschmidt Cc: Christoph Lameter Cc: Davidlohr Bueso Cc: Michael Ellerman Cc: Paul Mackerras

Re: [PATCH 0/4] Enabling secure boot on PowerNV systems

2019-04-02 Thread Claudio Carvalho
On 4/2/19 4:36 PM, Matthew Garrett wrote: > On Tue, Apr 2, 2019 at 11:15 AM Claudio Carvalho > wrote: >> 1. Enable efivarfs by selecting CONFIG_EFI in the CONFIG_OPAL_SECVAR >>introduced in this patch set. With CONFIG_EFIVAR_FS, userspace tools can >>be used to manage the secure variabl

[PATCH 5/6] powerpc/mmu: drop mmap_sem now that locked_vm is atomic

2019-04-02 Thread Daniel Jordan
With locked_vm now an atomic, there is no need to take mmap_sem as writer. Delete and refactor accordingly. Signed-off-by: Daniel Jordan Cc: Alexey Kardashevskiy Cc: Andrew Morton Cc: Benjamin Herrenschmidt Cc: Christoph Lameter Cc: Davidlohr Bueso Cc: Michael Ellerman Cc: Paul Mackerras

[PATCH v3 5/5] Lib: sort.h: remove the size argument from the swap function

2019-04-02 Thread Andrey Abramov
Removes size argument from the swap function because: 1) It wasn't used. 2) Custom swap function knows what kind of objects it swaps, so it already knows their sizes. Signed-off-by: Andrey Abramov Reviewed by: George Spelvin --- arch/x86/kernel/unwind_orc.c | 2 +

[PATCH v3 4/5] ubifs: find.c: replace swap function with built-in one

2019-04-02 Thread Andrey Abramov
Replace swap_dirty_idx function with built-in one, because swap_dirty_idx does only a simple byte to byte swap. Since Spectre mitigations have made indirect function calls more expensive, and the default simple byte copies swap is implemented without them, an "optimized" custom swap function is no

[PATCH 1/6] mm: change locked_vm's type from unsigned long to atomic64_t

2019-04-02 Thread Daniel Jordan
Taking and dropping mmap_sem to modify a single counter, locked_vm, is overkill when the counter could be synchronized separately. Make mmap_sem a little less coarse by changing locked_vm to an atomic, the 64-bit variety to avoid issues with overflow on 32-bit systems. Signed-off-by: Daniel Jorda

[PATCH v3 3/5] ocfs2: dir, refcounttree, xattr: replace swap functions with built-in one

2019-04-02 Thread Andrey Abramov
Replace dx_leaf_sort_swap, swap_refcount_rec and swap_xe functions with built-in one, because they do only a simple byte to byte swap. Since Spectre mitigations have made indirect function calls more expensive, and the default simple byte copies swap is implemented without them, an "optimized" cus

[PATCH v3 2/5] powerpc: module_[32|64].c: replace swap function with built-in one

2019-04-02 Thread Andrey Abramov
Replace relaswap with built-in one, because relaswap does a simple byte to byte swap. Since Spectre mitigations have made indirect function calls more expensive, and the default simple byte copies swap is implemented without them, an "optimized" custom swap function is now a waste of time as well

[PATCH v3 1/5] arch/arc: unwind.c: replace swap function with built-in one

2019-04-02 Thread Andrey Abramov
Replace swap_eh_frame_hdr_table_entries with built-in one, because swap_eh_frame_hdr_table_entries does a simple byte to byte swap. Since Spectre mitigations have made indirect function calls more expensive, and the default simple byte copies swap is implemented without them, an "optimized" custom

[PATCH v3 0/5] simple sort swap function improvements

2019-04-02 Thread Andrey Abramov
This is the logical continuation of the "lib/sort & lib/list_sort: faster and smaller" series by George Spelvin (added to linux-next recently). Since Spectre mitigations have made indirect function calls more expensive, and the previous patch series implements the default simple byte copies withou

Re: [RFC PATCH v2 3/3] kasan: add interceptors for all string functions

2019-04-02 Thread Christophe Leroy
Le 02/04/2019 à 18:14, Andrey Ryabinin a écrit : On 4/2/19 12:43 PM, Christophe Leroy wrote: Hi Dmitry, Andrey and others, Do you have any comments to this series ? I don't see justification for adding all these non-instrumented functions. We need only some subset of these functions an

Re: [PATCH] ASoC: fsl_esai: Support synchronous mode

2019-04-02 Thread Nicolin Chen
> > On Mon, Apr 01, 2019 at 11:39:10AM +, S.j. Wang wrote: > > > In ESAI synchronous mode, the clock is generated by Tx, So we should > > > always set registers of Tx which relate with the bit clock and frame > > > clock generation (TCCR, TCR, ECR), even there is only Rx is working. > > > > > >

Re: [PATCH 2/5] powerpc: module_[32|64].c: replace swap function with built-in one

2019-04-02 Thread Andrey Abramov
01.04.2019, 13:11, "Michael Ellerman" : > This looks OK. It's a bit of a pity to replace the 8-byte-at-a-time copy > with a byte-at-a-time copy, but I suspect it's insignificant compared to > the overhead of calling the comparison and swap functions. > > And we could always add a generic 8-byte-at-

Re: [RFC PATCH] powerpc/mm: Reduce memory usage for mm_context_t for radix

2019-04-02 Thread Christophe Leroy
Le 02/04/2019 à 20:31, Christophe Leroy a écrit : Le 02/04/2019 à 16:34, Aneesh Kumar K.V a écrit : Currently, our mm_context_t on book3s64 include all hash specific context details like slice mask, subpage protection details. We can skip allocating those on radix. This will help us to save

Re: [RFC PATCH] powerpc/mm: Reduce memory usage for mm_context_t for radix

2019-04-02 Thread Christophe Leroy
Le 02/04/2019 à 17:42, Aneesh Kumar K.V a écrit : On 4/2/19 9:06 PM, Christophe Leroy wrote: Le 02/04/2019 à 16:34, Aneesh Kumar K.V a écrit : Currently, our mm_context_t on book3s64 include all hash specific context details like slice mask, subpage protection details. We can skip allocati

Re: [RFC PATCH] powerpc/mm: Reduce memory usage for mm_context_t for radix

2019-04-02 Thread Christophe Leroy
Le 02/04/2019 à 16:34, Aneesh Kumar K.V a écrit : Currently, our mm_context_t on book3s64 include all hash specific context details like slice mask, subpage protection details. We can skip allocating those on radix. This will help us to save 8K per mm_context with radix translation. With the

[PATCH 4/4] powerpc: Add support to initialize ima policy rules

2019-04-02 Thread Claudio Carvalho
From: Nayna Jain PowerNV secure boot relies on the kernel IMA security subsystem to perform the OS kernel image signature verification. Since each secure boot mode has different IMA policy requirements, dynamic definition of the policy rules based on the runtime secure boot mode of the system is

[PATCH 3/4] powerpc/powernv: Detect the secure boot mode of the system

2019-04-02 Thread Claudio Carvalho
From: Nayna Jain PowerNV secure boot defines different IMA policies based on the secure boot state of the system. This patch defines a function to detect the secure boot state of the system. Signed-off-by: Nayna Jain --- arch/powerpc/include/asm/secboot.h | 21 + arch/powerpc/pl

[PATCH 2/4] powerpc/powernv: Add support for OPAL secure variables

2019-04-02 Thread Claudio Carvalho
The X.509 certificates trusted by the platform and other information required to secure boot the host OS kernel are wrapped in secure variables, which are controlled by OPAL. The OPAL secure variables can be handled through the following OPAL calls. OPAL_SECVAR_GET: Returns the data for a given s

[PATCH 1/4] powerpc/include: Override unneeded early ioremap functions

2019-04-02 Thread Claudio Carvalho
When CONFIG_EFI is enabled, the EFI driver includes the generic early_ioremap header, which assumes that architectures may want to provide their own early ioremap functions. This patch overrides the ioremap functions in powerpc because they are not required for secure boot on powerpc systems. Sig

[PATCH 0/4] Enabling secure boot on PowerNV systems

2019-04-02 Thread Claudio Carvalho
This patch set is part of a series that implements secure boot on PowerNV systems. In order to verify the OS kernel on PowerNV, secure boot requires X.509 certificates trusted by the platform, the secure boot modes, and several other pieces of information. These are stored in secure variables cont

Re: [RFC PATCH v2 3/3] kasan: add interceptors for all string functions

2019-04-02 Thread Andrey Ryabinin
On 4/2/19 12:43 PM, Christophe Leroy wrote: > Hi Dmitry, Andrey and others, > > Do you have any comments to this series ? > I don't see justification for adding all these non-instrumented functions. We need only some subset of these functions and only on powerpc so far. Arches that don't use

Re: [PATCH stable v4.14 00/32] powerpc spectre backports for 4.14

2019-04-02 Thread Greg KH
On Tue, Apr 02, 2019 at 03:21:09PM +, Diana Madalina Craciun wrote: > On 3/31/2019 12:53 PM, Michael Ellerman wrote: > > Greg KH writes: > >> On Fri, Mar 29, 2019 at 03:51:16PM +0100, Greg KH wrote: > >>> On Fri, Mar 29, 2019 at 10:25:48PM +1100, Michael Ellerman wrote: > -BEGIN PGP S

Re: [RFC PATCH] powerpc/mm: Reduce memory usage for mm_context_t for radix

2019-04-02 Thread Aneesh Kumar K.V
On 4/2/19 9:06 PM, Christophe Leroy wrote: Le 02/04/2019 à 16:34, Aneesh Kumar K.V a écrit : Currently, our mm_context_t on book3s64 include all hash specific context details like slice mask, subpage protection details. We can skip allocating those on radix. This will help us to save 8K per mm

Re: [RFC PATCH] powerpc/mm: Reduce memory usage for mm_context_t for radix

2019-04-02 Thread Christophe Leroy
Le 02/04/2019 à 16:34, Aneesh Kumar K.V a écrit : Currently, our mm_context_t on book3s64 include all hash specific context details like slice mask, subpage protection details. We can skip allocating those on radix. This will help us to save 8K per mm_context with radix translation. With the

Re: [PATCH v2] mm: Fix modifying of page protection by insert_pfn_pmd()

2019-04-02 Thread Jan Kara
On Tue 02-04-19 17:21:25, Aneesh Kumar K.V wrote: > With some architectures like ppc64, set_pmd_at() cannot cope with > a situation where there is already some (different) valid entry present. > > Use pmdp_set_access_flags() instead to modify the pfn which is built to > deal with modifying existin

Re: [PATCH stable v4.14 00/32] powerpc spectre backports for 4.14

2019-04-02 Thread Diana Madalina Craciun
On 3/31/2019 12:53 PM, Michael Ellerman wrote: > Greg KH writes: >> On Fri, Mar 29, 2019 at 03:51:16PM +0100, Greg KH wrote: >>> On Fri, Mar 29, 2019 at 10:25:48PM +1100, Michael Ellerman wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Greg, Please queue up these powerpc patches

Re: [RFC PATCH v2 3/3] kasan: add interceptors for all string functions

2019-04-02 Thread Christophe Leroy
Le 02/04/2019 à 14:58, Dmitry Vyukov a écrit : On Tue, Apr 2, 2019 at 11:43 AM Christophe Leroy wrote: Hi Dmitry, Andrey and others, Do you have any comments to this series ? I'd like to know if this approach is ok or if it is better to keep doing as in https://patchwork.ozlabs.org/patch/

[RFC PATCH] powerpc/mm: Reduce memory usage for mm_context_t for radix

2019-04-02 Thread Aneesh Kumar K.V
Currently, our mm_context_t on book3s64 include all hash specific context details like slice mask, subpage protection details. We can skip allocating those on radix. This will help us to save 8K per mm_context with radix translation. With the patch applied we have sizeof(mm_context_t) = 136 size

[PATCH 3.16 92/99] block/swim3: Fix -EBUSY error when re-opening device after unmount

2019-04-02 Thread Ben Hutchings
3.16.65-rc1 review patch. If anyone has any objections, please let me know. -- From: Finn Thain commit 296dcc40f2f2e402facf7cd26cf3f2c8f4b17d47 upstream. When the block device is opened with FMODE_EXCL, ref_count is set to -1. This value doesn't get reset when the device is cl

VLC doesn't play videos anymore since the PowerPC fixes 5.1-3

2019-04-02 Thread Christian Zigotzky
Hi All, I figured out, that the VLC player doesn't play videos anymore since the PowerPC fixes 5.1-3 [1]. VLC plays videos with the RC1 of kernel 5.1 without any problems. VLC error messages: [100ea580] ts demux warning: first packet for pid=1104 cc=0xe [100ea580] ts demux warning: first pac

Re: powerpc/mm: Only define MAX_PHYSMEM_BITS in SPARSEMEM configurations

2019-04-02 Thread Aneesh Kumar K.V
Michael Ellerman writes: > Ben Hutchings writes: >> On Mon, 2019-03-25 at 01:03 +0100, Andreas Schwab wrote: >>> On Mär 24 2019, Ben Hutchings wrote: >>> >>> > Presumably you have CONFIG_PPC_BOOK3S_64 enabled and >>> > CONFIG_SPARSEMEM >>> > disabled? Was this configuration actually usable? >

[PATCH v2] mm: Fix modifying of page protection by insert_pfn_pmd()

2019-04-02 Thread Aneesh Kumar K.V
With some architectures like ppc64, set_pmd_at() cannot cope with a situation where there is already some (different) valid entry present. Use pmdp_set_access_flags() instead to modify the pfn which is built to deal with modifying existing PMD entries. This is similar to commit cae85cb8add3 ("mm/

[PATCH v2 3/3] powernv/mce: print additional information about mce error.

2019-04-02 Thread Mahesh J Salgaonkar
From: Mahesh Salgaonkar Print more information about mce error whether it is an hardware or software error. Some of the mce errors can be easily categorized as hardware or software errors e.g. UEs are due to hardware error, where as error triggered due to invalid usage of tlbie is a pure softwar

[PATCH] powerpc/watchdog: Use hrtimers for per-CPU heartbeat

2019-04-02 Thread Nicholas Piggin
Using a jiffies timer creates a dependency on the tick_do_timer_cpu incrementing jiffies. If that CPU has locked up and jiffies is not incrementing, the watchdog heartbeat timer for all CPUs stops and creates false positives and confusing warnings on local CPUs, and also causes the SMP detector to

[PATCH v2 1/3] powernv/mce: reduce mce console logs to lesser lines.

2019-04-02 Thread Mahesh J Salgaonkar
From: Mahesh Salgaonkar Also add cpu number while displaying mce log. This will help cleaner logs when mce hits on multiple cpus simultaneously. before the changes the mce o/p was: [ 127.223515] Severe Machine check interrupt [Recovered] [ 127.223530] NIP [dba80280]: insert_slb_ent

[PATCH v2 2/3] powernv/mce: Print correct severity for mce error.

2019-04-02 Thread Mahesh J Salgaonkar
From: Mahesh Salgaonkar Currently all machine check errors are printed as severe errors which isn't correct. Print soft errors as warning instead of severe errors. Signed-off-by: Mahesh Salgaonkar --- change in v2: - Use kernel types i.e. u8, u64 etc. - Define sync_error as bool. --- arch/powe

RE: [PATCH] ASoC: fsl_esai: Support synchronous mode

2019-04-02 Thread S.j. Wang
Hi > > Shengjiu, > > On Mon, Apr 01, 2019 at 11:39:10AM +, S.j. Wang wrote: > > In ESAI synchronous mode, the clock is generated by Tx, So we should > > always set registers of Tx which relate with the bit clock and frame > > clock generation (TCCR, TCR, ECR), even there is only Rx is workin

Re: [RFC PATCH v2 3/3] kasan: add interceptors for all string functions

2019-04-02 Thread Christophe Leroy
Hi Dmitry, Andrey and others, Do you have any comments to this series ? I'd like to know if this approach is ok or if it is better to keep doing as in https://patchwork.ozlabs.org/patch/1055788/ Thanks Christophe Le 28/03/2019 à 16:00, Christophe Leroy a écrit : In the same spirit as commit

[PATCH 9/9] powerpc: use generic CMDLINE manipulations

2019-04-02 Thread Christophe Leroy
This patch moves powerpc to the centraly defined CMDLINE options. Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig | 48 +++- 1 file changed, 3 insertions(+), 45 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 22d6a

[PATCH 8/9] Gives arches opportunity to use generically defined boot cmdline manipulation

2019-04-02 Thread Christophe Leroy
Most arches have similar boot command line manipulation options. This patchs adds the definition in init/Kconfig, gated by CONFIG_HAVE_CMDLINE that the arches can select to use them. In order to use this, a few arches will have to change their CONFIG options: - riscv has to replace CMDLINE_FALLBAC

[PATCH 5/9] powerpc: convert to generic builtin command line

2019-04-02 Thread Christophe Leroy
This updates the powerpc code to use the new cmdline building function. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/prom_init.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c i

[PATCH 7/9] powerpc: add capability to prepend default command line

2019-04-02 Thread Christophe Leroy
This patch activates the capability to prepend default arguments to the command line. Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 2972348e52be..22d6a48bd2ca 100644 --- a/arch/

[PATCH 6/9] Add capability to prepend the command line

2019-04-02 Thread Christophe Leroy
This patchs adds an option of prepend a text to the command line instead of appending it. Signed-off-by: Christophe Leroy --- include/linux/cmdline.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/linux/cmdline.h b/include/linux/cmdline.h index afcc00d7628d..5caf

[PATCH 4/9] powerpc/prom_init: get rid of PROM_SCRATCH_SIZE

2019-04-02 Thread Christophe Leroy
PROM_SCRATCH_SIZE is same as sizeof(prom_scratch) Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/prom_init.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index a6cd52240c58..d4

[PATCH 3/9] drivers: of: use cmdline building function

2019-04-02 Thread Christophe Leroy
This patch uses the new cmdline building function to concatenate the of provided cmdline with built-in parts based on compile-time options. Signed-off-by: Christophe Leroy --- drivers/of/fdt.c| 23 --- include/linux/cmdline.h | 2 +- 2 files changed, 5 insertions(+),

[PATCH 1/9] powerpc: enable appending of CONFIG_CMDLINE to bootloader's cmdline.

2019-04-02 Thread Christophe Leroy
Today, powerpc defined CONFIG_CMDLINE for when bootloader doesn't provide a command line or for overriding it. On same way as ARM, this patch adds the option of appending the CONFIG_CMDLINE to bootloader's provided command line. Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig

[PATCH 2/9] Add generic function to build command line.

2019-04-02 Thread Christophe Leroy
This code provides architectures with a way to build command line based on what is built in the kernel and what is handed over by the bootloader, based on selected compile-time options. Signed-off-by: Christophe Leroy --- include/linux/cmdline.h | 34 ++ 1 file ch

[PATCH 0/9] Improve boot command line handling

2019-04-02 Thread Christophe Leroy
The purpose of this series is to improve and enhance the handling of kernel boot arguments. It is first focussed on powerpc but also extends the capability for other arches. This is based on suggestion from Daniel Walker Christophe Leroy (9): powerpc: enable appending of CONFIG_CMDLINE to boo

Re: [PATCH 2/5] powerpc: Fix vDSO clock_getres()

2019-04-02 Thread Vincenzo Frascino
On 02/04/2019 07:14, Christophe Leroy wrote: > > > On 04/01/2019 11:51 AM, Vincenzo Frascino wrote: >> clock_getres in the vDSO library has to preserve the same behaviour >> of posix_get_hrtimer_res(). >> >> In particular, posix_get_hrtimer_res() does: >> sec = 0; >> ns = hrtimer_resolu

Re: [PATCH 2/5] powerpc: Fix vDSO clock_getres()

2019-04-02 Thread Vincenzo Frascino
Hi Christophe, thank you for your review. On 02/04/2019 06:54, Christophe Leroy wrote: > > > On 04/01/2019 11:51 AM, Vincenzo Frascino wrote: >> clock_getres in the vDSO library has to preserve the same behaviour >> of posix_get_hrtimer_res(). >> >> In particular, posix_get_hrtimer_res() does:

Re: [PATCH stable v4.14 13/32] powerpc/fsl: Add barrier_nospec implementation for NXP PowerPC Book3E

2019-04-02 Thread Joakim Tjernlund
On Tue, 2019-04-02 at 17:19 +1100, Michael Ellerman wrote: > > Joakim Tjernlund writes: > > On Fri, 2019-03-29 at 22:26 +1100, Michael Ellerman wrote: > > > From: Diana Craciun > > > > > > commit ebcd1bfc33c7a90df941df68a6e5d4018c022fba upstream. > > > > > > Implement the barrier_nospec as a i

[PATCH v10 18/18] LS1021A: dtsi: add ftm quad decoder entries

2019-04-02 Thread William Breathitt Gray
From: Patrick Havelange Add the 4 Quadrature counters for this board. Reviewed-by: Esben Haabendal Signed-off-by: Patrick Havelange Signed-off-by: William Breathitt Gray --- arch/arm/boot/dts/ls1021a.dtsi | 28 1 file changed, 28 insertions(+) diff --git a/arch/

[PATCH v10 17/18] counter: ftm-quaddec: Documentation: Add specific counter sysfs documentation

2019-04-02 Thread William Breathitt Gray
From: Patrick Havelange This adds documentation for the specific prescaler entry. Signed-off-by: Patrick Havelange Signed-off-by: William Breathitt Gray --- .../ABI/testing/sysfs-bus-counter-ftm-quaddec| 16 1 file changed, 16 insertions(+) create mode 100644 Documentati