[PATCH v3 7/8] powerpc: Remove __USE_RTC()

2020-09-28 Thread Christophe Leroy
Now that PowerPC 601 is gone, __USE_RTC() is never true. Remove it. That also leads to removing get_rtc() and get_rtcl() Signed-off-by: Christophe Leroy --- v2: Also remove get_rtc() and get_rtcl() --- arch/powerpc/include/asm/time.h | 28 +- arch/powerpc/kernel/time.c | 5

[PATCH v3 6/8] powerpc: Tidy up a bit after removal of PowerPC 601.

2020-09-28 Thread Christophe Leroy
The removal of the 601 left some standalone blocks from former if/else. Drop the { } and re-indent. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/btext.c| 11 +++-- arch/powerpc/mm/book3s32/mmu.c | 45 +++--- 2 files changed, 24 insertions(+), 32 del

[PATCH v3 5/8] powerpc: Remove support for PowerPC 601

2020-09-28 Thread Christophe Leroy
PowerPC 601 has been retired. Remove all associated specific code. CPU_FTRS_PPC601 has CPU_FTR_COHERENT_ICACHE and CPU_FTR_COMMON. CPU_FTR_COMMON is already present via other CPU_FTRS. None of the remaining CPU selects CPU_FTR_COHERENT_ICACHE. So CPU_FTRS_PPC601 can be removed from the possible

[PATCH v3 3/8] powerpc: Drop SYNC_601() ISYNC_601() and SYNC()

2020-09-28 Thread Christophe Leroy
Those macros are now empty at all time. Drop them. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/ppc_asm.h | 4 arch/powerpc/kernel/entry_32.S | 17 + arch/powerpc/kernel/fpu.S | 1 - arch/powerpc/kernel/head_32.S | 9 - arch/p

[PATCH v3 2/8] powerpc: Remove CONFIG_PPC601_SYNC_FIX

2020-09-28 Thread Christophe Leroy
This config option isn't in any defconfig. The very first versions of Powerpc 601 have a bug which requires additional sync before and/or after some instructions. This was more than 25 years ago and time has come to retire those buggy versions of the 601 from the kernel. Signed-off-by: Christoph

[PATCH v3 1/8] powerpc: Remove SYNC on non 6xx

2020-09-28 Thread Christophe Leroy
SYNC is usefull for Powerpc 601 only. On everything else, SYNC is empty. Remove it from code that is not made to run on 6xx. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_40x.S | 1 - arch/powerpc/kernel/head_booke.h | 1 - arch/powerpc/kernel/misc_64.S| 1 - 3 files change

Re: [PATCH v2 1/7] powerpc: Remove SYNC on non 6xx

2020-09-28 Thread Christophe Leroy
Le 29/09/2020 à 08:09, Christophe Leroy a écrit : SYNC is usefull for Powerpc 601 only. On everything else, SYNC is empty. Remove it from code that is not made to run on 6xx. Signed-off-by: Christophe Leroy Oops, the last patch of the series is missing. Will resend, sorry for the noise.

Re: [PATCH] linux: configure CONFIG_I2C_OPAL as in-built.

2020-09-28 Thread Joel Stanley
On Fri, 25 Sep 2020 at 18:19, Mimi Zohar wrote: > > Hi Nayna, > > On Wed, 2020-09-23 at 14:25 -0400, Nayna Jain wrote: > > Currently, skiroot_defconfig CONFIG_I2C_OPAL is built as a loadable > > module rather than builtin, even if CONFIG_I2C=y is defined. This > > results in a delay in the TPM ini

[PATCH v2 6/7] powerpc: Tidy up a bit after removal of PowerPC 601.

2020-09-28 Thread Christophe Leroy
The removal of the 601 left some standalone blocks from former if/else. Drop the { } and re-indent. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/btext.c| 11 +++-- arch/powerpc/mm/book3s32/mmu.c | 45 +++--- 2 files changed, 24 insertions(+), 32 del

[PATCH v2 7/7] powerpc: Remove __USE_RTC()

2020-09-28 Thread Christophe Leroy
Now that PowerPC 601 is gone, __USE_RTC() is never true. Remove it. That also leads to removing get_rtc() and get_rtcl() Signed-off-by: Christophe Leroy --- v2: Also remove get_rtc() and get_rtcl() --- arch/powerpc/include/asm/time.h | 28 +- arch/powerpc/kernel/time.c | 5

[PATCH v2 2/7] powerpc: Remove CONFIG_PPC601_SYNC_FIX

2020-09-28 Thread Christophe Leroy
This config option isn't in any defconfig. The very first versions of Powerpc 601 have a bug which requires additional sync before and/or after some instructions. This was more than 25 years ago and time has come to retire those buggy versions of the 601 from the kernel. Signed-off-by: Christoph

[PATCH v2 5/7] powerpc: Remove support for PowerPC 601

2020-09-28 Thread Christophe Leroy
PowerPC 601 has been retired. Remove all associated specific code. CPU_FTRS_PPC601 has CPU_FTR_COHERENT_ICACHE and CPU_FTR_COMMON. CPU_FTR_COMMON is already present via other CPU_FTRS. None of the remaining CPU selects CPU_FTR_COHERENT_ICACHE. So CPU_FTRS_PPC601 can be removed from the possible

[PATCH v2 4/7] powerpc: Remove PowerPC 601

2020-09-28 Thread Christophe Leroy
Powerpc 601 is 25 years old. It is not selected by any defconfig. It requires a lot of special handling as it deviates from the standard 6xx. Retire it. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/cputable.c | 15 --- arch/powerpc/platforms/Kconfig.cputype | 11

[PATCH v2 3/7] powerpc: Drop SYNC_601() ISYNC_601() and SYNC()

2020-09-28 Thread Christophe Leroy
Those macros are now empty at all time. Drop them. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/ppc_asm.h | 4 arch/powerpc/kernel/entry_32.S | 17 + arch/powerpc/kernel/fpu.S | 1 - arch/powerpc/kernel/head_32.S | 9 - arch/p

[PATCH v2 1/7] powerpc: Remove SYNC on non 6xx

2020-09-28 Thread Christophe Leroy
SYNC is usefull for Powerpc 601 only. On everything else, SYNC is empty. Remove it from code that is not made to run on 6xx. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_40x.S | 1 - arch/powerpc/kernel/head_booke.h | 1 - arch/powerpc/kernel/misc_64.S| 1 - 3 files change

Re: [PATCH v2 23/25] powerpc/signal: Create 'unsafe' versions of copy_[ck][fpr/vsx]_to_user()

2020-09-28 Thread Christophe Leroy
Le 29/09/2020 à 07:22, Christophe Leroy a écrit : Le 29/09/2020 à 04:04, Christopher M. Riedl a écrit : On Tue Aug 18, 2020 at 12:19 PM CDT, Christophe Leroy wrote: For the non VSX version, that's trivial. Just use unsafe_copy_to_user() instead of __copy_to_user(). For the VSX version, re

Re: [PATCH v2 23/25] powerpc/signal: Create 'unsafe' versions of copy_[ck][fpr/vsx]_to_user()

2020-09-28 Thread Christophe Leroy
Le 29/09/2020 à 04:04, Christopher M. Riedl a écrit : On Tue Aug 18, 2020 at 12:19 PM CDT, Christophe Leroy wrote: For the non VSX version, that's trivial. Just use unsafe_copy_to_user() instead of __copy_to_user(). For the VSX version, remove the intermediate step through a buffer and use u

Re: [PATCH v2 25/25] powerpc/signal32: Transform save_user_regs() and save_tm_user_regs() in 'unsafe' version

2020-09-28 Thread Christophe Leroy
Le 29/09/2020 à 04:55, Christopher M. Riedl a écrit : On Tue Aug 18, 2020 at 12:19 PM CDT, Christophe Leroy wrote: Change those two functions to be used within a user access block. For that, change save_general_regs() to and unsafe_save_general_regs(), then replace all user accesses by unsaf

Re: [PATCH v2 07/14] powerpc/pseries/iommu: Add ddw_list_new_entry() helper

2020-09-28 Thread Alexey Kardashevskiy
On 12/09/2020 03:07, Leonardo Bras wrote: Cc: linuxppc-dev@lists.ozlabs.org, linux-ker...@vger.kernel.org, There are two functions creating direct_window_list entries in a similar way, so create a ddw_list_new_entry() to avoid duplicity and simplify those functions. Signed-off-by: Leonardo B

Re: [PATCH v2 03/14] powerpc/kernel/iommu: Align size for IOMMU_PAGE_SIZE() to save TCEs

2020-09-28 Thread Alexey Kardashevskiy
On 12/09/2020 03:07, Leonardo Bras wrote: Cc: linuxppc-dev@lists.ozlabs.org, linux-ker...@vger.kernel.org, Currently both iommu_alloc_coherent() and iommu_free_coherent() align the desired allocation size to PAGE_SIZE, and gets system pages and IOMMU mappings (TCEs) for that value. When IOMM

Re: [PATCH v2 02/14] powerpc/pseries/iommu: Makes sure IOMMU_PAGE_SIZE <= PAGE_SIZE

2020-09-28 Thread Alexey Kardashevskiy
On 12/09/2020 03:07, Leonardo Bras wrote: Cc: linuxppc-dev@lists.ozlabs.org, linux-ker...@vger.kernel.org, Having System pagesize < IOMMU pagesize may cause a page owned by another process/VM to be written by a buggy driver / device. As it's intended to use DDW for indirect mapping, it's pos

Re: [PATCH v2 05/14] powerpc/kernel/iommu: Add new iommu_table_in_use() helper

2020-09-28 Thread Alexey Kardashevskiy
On 12/09/2020 03:07, Leonardo Bras wrote: Cc: linuxppc-dev@lists.ozlabs.org, linux-ker...@vger.kernel.org, Having a function to check if the iommu table has any allocation helps deciding if a tbl can be reset for using a new DMA window. It should be enough to replace all instances of !bitmap

Re: [PATCH v2 01/14] powerpc/pseries/iommu: Replace hard-coded page shift

2020-09-28 Thread Alexey Kardashevskiy
On 12/09/2020 03:07, Leonardo Bras wrote: Cc: linuxppc-dev@lists.ozlabs.org, linux-ker...@vger.kernel.org, These normally go right before "signed-off-by". Some functions assume IOMMU page size can only be 4K (pageshift == 12). Update them to accept any page size passed, so we can use 64K

Re: [PATCH v2 09/14] powerpc/pseries/iommu: Add ddw_property_create() and refactor enable_ddw()

2020-09-28 Thread Alexey Kardashevskiy
On 12/09/2020 03:07, Leonardo Bras wrote: Cc: linuxppc-dev@lists.ozlabs.org, linux-ker...@vger.kernel.org, Code used to create a ddw property that was previously scattered in enable_ddw() is now gathered in ddw_property_create(), which deals with allocation and filling the property, letting i

Re: [PATCH v2 10/14] powerpc/pseries/iommu: Reorganize iommu_table_setparms*() with new helper

2020-09-28 Thread Alexey Kardashevskiy
On 12/09/2020 03:07, Leonardo Bras wrote: Cc: linuxppc-dev@lists.ozlabs.org, linux-ker...@vger.kernel.org, Add a new helper _iommu_table_setparms(), and use it in iommu_table_setparms() and iommu_table_setparms_lpar() to avoid duplicated code. Also, setting tbl->it_ops was happening outsite

Re: [PATCH v2 13/14] powerpc/pseries/iommu: Make use of DDW for indirect mapping

2020-09-28 Thread Alexey Kardashevskiy
On 12/09/2020 03:07, Leonardo Bras wrote: Cc: linuxppc-dev@lists.ozlabs.org, linux-ker...@vger.kernel.org, So far it's assumed possible to map the guest RAM 1:1 to the bus, which works with a small number of devices. SRIOV changes it as the user can configure hundreds VFs and since phyp preal

Re: [PATCH v2 11/14] powerpc/pseries/iommu: Update remove_dma_window() to accept property name

2020-09-28 Thread Alexey Kardashevskiy
On 12/09/2020 03:07, Leonardo Bras wrote: Cc: linuxppc-dev@lists.ozlabs.org, linux-ker...@vger.kernel.org, Update remove_dma_window() so it can be used to remove DDW with a given property name. Out of context this seems useless. How about? === At the moment pseries stores information about

Re: [PATCH v2 14/14] powerpc/pseries/iommu: Rename "direct window" to "dma window"

2020-09-28 Thread Alexey Kardashevskiy
On 12/09/2020 03:07, Leonardo Bras wrote: Cc: linuxppc-dev@lists.ozlabs.org, linux-ker...@vger.kernel.org, A previous change introduced the usage of DDW as a bigger indirect DMA mapping when the DDW available size does not map the whole partition. As most of the code that manipulates direct

Re: [PATCH v2 23/25] powerpc/signal: Create 'unsafe' versions of copy_[ck][fpr/vsx]_to_user()

2020-09-28 Thread Christopher M. Riedl
On Tue Aug 18, 2020 at 12:19 PM CDT, Christophe Leroy wrote: > For the non VSX version, that's trivial. Just use unsafe_copy_to_user() > instead of __copy_to_user(). > > For the VSX version, remove the intermediate step through a buffer and > use unsafe_put_user() directly. This generates a far sma

Re: [PATCH v2 25/25] powerpc/signal32: Transform save_user_regs() and save_tm_user_regs() in 'unsafe' version

2020-09-28 Thread Christopher M. Riedl
On Tue Aug 18, 2020 at 12:19 PM CDT, Christophe Leroy wrote: > Change those two functions to be used within a user access block. > > For that, change save_general_regs() to and unsafe_save_general_regs(), > then replace all user accesses by unsafe_ versions. > > This series leads to a reduction fro

Re: [PATCH] rpadlpar_io:Add MODULE_DESCRIPTION entries to kernel modules

2020-09-28 Thread Oliver O'Halloran
On Tue, Sep 29, 2020 at 6:50 AM Tyrel Datwyler wrote: > > On 9/23/20 11:41 PM, Oliver O'Halloran wrote: > > On Thu, Sep 24, 2020 at 3:15 PM Mamatha Inamdar > > wrote: > >> > >> This patch adds a brief MODULE_DESCRIPTION to rpadlpar_io kernel modules > >> (descriptions taken from Kconfig file) > >

RE: [PATCH 1/5] Documentation: dt: binding: fsl: Add 'fsl,ippdexpcr1-alt-addr' property

2020-09-28 Thread Ran Wang
Hi Rob, On Monday, September 28, 2020 9:57 PM, Rob Herring wrote: > > On Wed, Sep 23, 2020 at 1:44 AM Ran Wang wrote: > > > > Hi Rob, > > > > On Wednesday, September 23, 2020 10:33 AM, Rob Herring wrote: > > > > > > On Wed, Sep 16, 2020 at 04:18:27PM +0800, Ran Wang wrote: > > > > From: Biwen Li

Re: [PATCH] rpadlpar_io:Add MODULE_DESCRIPTION entries to kernel modules

2020-09-28 Thread Tyrel Datwyler
On 9/23/20 11:41 PM, Oliver O'Halloran wrote: > On Thu, Sep 24, 2020 at 3:15 PM Mamatha Inamdar > wrote: >> >> This patch adds a brief MODULE_DESCRIPTION to rpadlpar_io kernel modules >> (descriptions taken from Kconfig file) >> >> Signed-off-by: Mamatha Inamdar >> --- >> drivers/pci/hotplug/rpa

Re: [PATCH v2 3/3] selftests/lkdtm: Enable selftest for SLB multihit

2020-09-28 Thread Ganesh
On 9/26/20 1:29 AM, Kees Cook wrote: On Fri, Sep 25, 2020 at 04:01:23PM +0530, Ganesh Goudar wrote: Add PPC_SLB_MULTIHIT to lkdtm selftest framework. Signed-off-by: Ganesh Goudar --- tools/testing/selftests/lkdtm/tests.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/s

Re: [PATCH v2 2/3] lkdtm/powerpc: Add SLB multihit test

2020-09-28 Thread Ganesh
On 9/26/20 1:27 AM, Kees Cook wrote: On Fri, Sep 25, 2020 at 04:01:22PM +0530, Ganesh Goudar wrote: Add support to inject slb multihit errors, to test machine check handling. Thank you for more tests in here! Based on work by Mahesh Salgaonkar and Michal Suchánek. Cc: Mahesh Salgaonkar Cc

Re: [PATCH] powerpc/papr_scm: Support dynamic enable/disable of performance statistics

2020-09-28 Thread Ira Weiny
On Mon, Sep 14, 2020 at 02:51:15AM +0530, Vaibhav Jain wrote: > Collection of performance statistics of an NVDIMM can be dynamically > enabled/disabled from the Hypervisor Management Console even when the > guest lpar is running. The current implementation however will check if > the performance st

Re: [PATCH] powerpc/papr_scm: Add PAPR command family to pass-through command-set

2020-09-28 Thread Ira Weiny
On Mon, Sep 28, 2020 at 06:44:52PM +0530, Vaibhav Jain wrote: > Hi Dan, Ira and Vishal, > > Can you please take a look at this patch. Without it the functionality > to report nvdimm health via ndctl breaks on 5.9 Sorry... > > Thanks, > ~ Vaibhav > > Vaibhav Jain writes: > > > Add NVDIMM_FAMI

Re: [PATCH v8 2/8] powerpc/vdso: Remove __kernel_datapage_offset and simplify __get_datapage()

2020-09-28 Thread Dmitry Safonov
On 9/27/20 8:43 AM, Christophe Leroy wrote: > > > Le 21/09/2020 à 13:26, Will Deacon a écrit : >> On Fri, Aug 28, 2020 at 12:14:28PM +1000, Michael Ellerman wrote: >>> Dmitry Safonov <0x7f454...@gmail.com> writes: [..] I'll cook a patch for vm_special_mapping if you don't mind :-) >>> >>> Th

Re: [PATCH] tpm: of: avoid __va() translation for event log address

2020-09-28 Thread Jarkko Sakkinen
On Mon, Sep 28, 2020 at 08:20:18AM +0200, Ard Biesheuvel wrote: > On Mon, 28 Sep 2020 at 07:56, Christophe Leroy > wrote: > > > > > > > > Le 28/09/2020 à 01:44, Jarkko Sakkinen a écrit : > > > On Fri, Sep 25, 2020 at 09:00:18AM -0300, Jason Gunthorpe wrote: > > >> On Fri, Sep 25, 2020 at 01:29:20P

Re: [PATCH 1/5] Documentation: dt: binding: fsl: Add 'fsl,ippdexpcr1-alt-addr' property

2020-09-28 Thread Rob Herring
On Wed, Sep 23, 2020 at 1:44 AM Ran Wang wrote: > > Hi Rob, > > On Wednesday, September 23, 2020 10:33 AM, Rob Herring wrote: > > > > On Wed, Sep 16, 2020 at 04:18:27PM +0800, Ran Wang wrote: > > > From: Biwen Li > > > > > > The 'fsl,ippdexpcr1-alt-addr' property is used to handle an errata > > >

Re: [PATCH] powerpc/papr_scm: Add PAPR command family to pass-through command-set

2020-09-28 Thread Vaibhav Jain
Hi Dan, Ira and Vishal, Can you please take a look at this patch. Without it the functionality to report nvdimm health via ndctl breaks on 5.9 Thanks, ~ Vaibhav Vaibhav Jain writes: > Add NVDIMM_FAMILY_PAPR to the list of valid 'dimm_family_mask' > acceptable by papr_scm. This is needed as sin

[PATCH] powerpc: net: bpf_jit_comp: Fix misuse of fallthrough

2020-09-28 Thread zhe.he
From: He Zhe The user defined label following "fallthrough" is not considered by GCC and causes build failure. kernel-source/include/linux/compiler_attributes.h:208:41: error: attribute 'fallthrough' not preceding a case label or default label [-Werror] 208 define fallthrough _attribute((fall