Re: [PATCH] cxl: don't manipulate the mm.mm_users field directly

2021-03-10 Thread Frederic Barrat
On 10/03/2021 18:44, Laurent Dufour wrote: It is better to rely on the API provided by the MM layer instead of directly manipulating the mm_users field. Signed-off-by: Laurent Dufour --- Thanks! Acked-by: Frederic Barrat drivers/misc/cxl/fault.c | 2 +- 1 file changed, 1

Re: Errant readings on LM81 with T2080 SoC

2021-03-10 Thread Guenter Roeck
On 3/10/21 1:48 PM, Chris Packham wrote: > > On 10/03/21 6:06 pm, Guenter Roeck wrote: >> On 3/9/21 6:19 PM, Chris Packham wrote: >>> On 9/03/21 9:27 am, Chris Packham wrote: On 8/03/21 5:59 pm, Guenter Roeck wrote: > Other than that, the only other real idea I have would be to monitor

Re: [PATCH v2 03/15] powerpc/align: Convert emulate_spe() to user_access_begin

2021-03-10 Thread Christophe Leroy
Le 10/03/2021 à 23:31, Daniel Axtens a écrit : Hi Christophe, This patch converts emulate_spe() to using user_access_being s/being/begin/ :) logic. Since commit 662bbcb2747c ("mm, sched: Allow uaccess in atomic with pagefault_disable()"), might_fault() doesn't fire when called from

Re: [PATCH v4 13/14] dt-bindings: of: Add restricted DMA pool

2021-03-10 Thread Florian Fainelli
On 3/10/2021 1:40 PM, Rob Herring wrote: > On Wed, Mar 10, 2021 at 9:08 AM Will Deacon wrote: >> >> Hi Claire, >> >> On Tue, Feb 09, 2021 at 02:21:30PM +0800, Claire Chang wrote: >>> Introduce the new compatible string, restricted-dma-pool, for restricted >>> DMA. One can specify the address

[PATCH] PCI: layerscape: Correct syntax by changing comma to semicolon

2021-03-10 Thread Krzysztof Wilczyński
Replace command with a semicolon to correct syntax and to prevent potential unspecified behaviour and/or unintended side effects. Related: https://lore.kernel.org/linux-pci/20201216131944.14990-1-zhengyongj...@huawei.com/ Co-authored-by: Zheng Yongjun Signed-off-by: Krzysztof Wilczyński ---

[powerpc:fixes-test] BUILD SUCCESS bd73758803c2eedc037c2268b65a19542a832594

2021-03-10 Thread kernel test robot
randconfig-a011-20210310 x86_64 randconfig-a016-20210310 x86_64 randconfig-a013-20210310 x86_64 randconfig-a015-20210310 x86_64 randconfig-a014-20210310 x86_64 randconfig-a012-20210310 i386 randconfig-a016

[PATCH] ibmvfc: free channel_setup_buf during device tear down

2021-03-10 Thread Tyrel Datwyler
The buffer for negotiating channel setup is DMA allocated at device probe time. However, the remove path fails to free this allocation which will prevent the hypervisor from releasing the virtual device in the case of a hotplug remove. Fix this issue by freeing the buffer allocation in

Re: PowerPC64 future proof kernel toc, revised for lld

2021-03-10 Thread Alan Modra
On Wed, Mar 10, 2021 at 01:44:57PM +0100, Christophe Leroy wrote: > > > Le 10/03/2021 à 13:25, Alan Modra a écrit : > > On Wed, Mar 10, 2021 at 08:33:37PM +1100, Alexey Kardashevskiy wrote: > > > One more question - the older version had a construct "DEFINED (.TOC.) ? > > > .TOC. : ..." in case

Re: [PATCH v2 04/15] powerpc/uaccess: Remove __get/put_user_inatomic()

2021-03-10 Thread Daniel Axtens
Hi Christophe, > Powerpc is the only architecture having _inatomic variants of > __get_user() and __put_user() accessors. They were introduced > by commit e68c825bb016 ("[POWERPC] Add inatomic versions of __get_user > and __put_user"). > > Those variants expand to the _nosleep macros instead of

Re: [PATCH v2 03/15] powerpc/align: Convert emulate_spe() to user_access_begin

2021-03-10 Thread Daniel Axtens
Hi Christophe, > This patch converts emulate_spe() to using user_access_being s/being/begin/ :) > logic. > > Since commit 662bbcb2747c ("mm, sched: Allow uaccess in atomic with > pagefault_disable()"), might_fault() doesn't fire when called from > sections where pagefaults are disabled, which

[PATCH] rpadlpar: fix potential drc_name corruption in store functions

2021-03-10 Thread Tyrel Datwyler
Both add_slot_store() and remove_slot_store() try to fix up the drc_name copied from the store buffer by placing a NULL terminator at nbyte + 1 or in place of a '\n' if present. However, the static buffer that we copy the drc_name data into is not zeored and can contain anything past the n-th

Re: Errant readings on LM81 with T2080 SoC

2021-03-10 Thread Chris Packham
On 10/03/21 6:06 pm, Guenter Roeck wrote: > On 3/9/21 6:19 PM, Chris Packham wrote: >> On 9/03/21 9:27 am, Chris Packham wrote: >>> On 8/03/21 5:59 pm, Guenter Roeck wrote: Other than that, the only other real idea I have would be to monitor the i2c bus. >>> I am in the fortunate

Re: [PATCH v2 01/15] powerpc/uaccess: Remove __get_user_allowed() and unsafe_op_wrap()

2021-03-10 Thread Daniel Axtens
Hi Christophe, Thanks for the answers to my questions on v1. This all looks good to me. Reviewed-by: Daniel Axtens Kind regards, Daniel > Those two macros have only one user which is unsafe_get_user(). > > Put everything in one place and remove them. > > Signed-off-by: Christophe Leroy >

Re: [PATCH v4 13/14] dt-bindings: of: Add restricted DMA pool

2021-03-10 Thread Rob Herring
On Wed, Mar 10, 2021 at 9:08 AM Will Deacon wrote: > > Hi Claire, > > On Tue, Feb 09, 2021 at 02:21:30PM +0800, Claire Chang wrote: > > Introduce the new compatible string, restricted-dma-pool, for restricted > > DMA. One can specify the address and length of the restricted DMA memory > > region

[PATCH] ALSA: ppc: keywest: remove outdated comment

2021-03-10 Thread Wolfram Sang
The I2C attach_adapter callback is gone. Remove this reference. Signed-off-by: Wolfram Sang --- sound/ppc/keywest.c | 5 - 1 file changed, 5 deletions(-) diff --git a/sound/ppc/keywest.c b/sound/ppc/keywest.c index a6c1905039de..a8915100d6bb 100644 --- a/sound/ppc/keywest.c +++

Re: [PATCH 14/17] iommu: remove DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE

2021-03-10 Thread Robin Murphy
On 2021-03-10 09:25, Christoph Hellwig wrote: On Wed, Mar 10, 2021 at 10:15:01AM +0100, Christoph Hellwig wrote: On Thu, Mar 04, 2021 at 03:25:27PM +, Robin Murphy wrote: On 2021-03-01 08:42, Christoph Hellwig wrote: Use explicit methods for setting and querying the information instead.

[PATCH v1 8/8] powerpc/ptrace: Convert gpr32_set_common() to user access block

2021-03-10 Thread Christophe Leroy
Use user access block in gpr32_set_common() instead of repetitive __get_user() which imply repetitive KUAP open/close. To get it clean, force inlining of the small set of tiny functions called inside the block. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/ptrace.h| 2

[PATCH v1 7/8] powerpc/futex: Switch to user_access block

2021-03-10 Thread Christophe Leroy
Use user_access_begin() instead of the access_ok/allow_access sequence. This brings the missing might_fault() check. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/futex.h | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git

[PATCH v1 6/8] powerpc/net: Switch csum_and_copy_{to/from}_user to user_access block

2021-03-10 Thread Christophe Leroy
Use user_access_begin() instead of the might_sleep/access_ok/allow_access sequence. Signed-off-by: Christophe Leroy --- arch/powerpc/lib/checksum_wrappers.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/arch/powerpc/lib/checksum_wrappers.c

[PATCH v1 5/8] powerpc/lib: Don't use __put_user_asm_goto() outside of uaccess.h

2021-03-10 Thread Christophe Leroy
__put_user_asm_goto() is internal to uaccess.h Use __put_kernel_nofault() instead. The generated code is identical. Signed-off-by: Christophe Leroy --- arch/powerpc/lib/code-patching.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git

[PATCH v1 2/8] powerpc/uaccess: Swap clear_user() and __clear_user()

2021-03-10 Thread Christophe Leroy
It is clear_user() which is expected to call __clear_user(), not the reverse. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/uaccess.h | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/include/asm/uaccess.h

[PATCH v1 4/8] powerpc/syscalls: Use sys_old_select() in ppc_select()

2021-03-10 Thread Christophe Leroy
Instead of opencodying the copy of parameters, use the generic sys_old_select(). Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/unistd.h | 1 + arch/powerpc/kernel/syscalls.c| 12 ++-- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git

[PATCH v1 3/8] powerpc/uaccess: Move copy_mc_xxx() functions down

2021-03-10 Thread Christophe Leroy
copy_mc_xxx() functions are in the middle of raw_copy functions. For clarity, move them out of the raw_copy functions block. They are using access_ok, so they need to be after the general functions in order to eventually allow the inclusion of asm-generic/uaccess.h in some future.

[PATCH v1 1/8] powerpc/uaccess: Also perform 64 bits copies in unsafe_copy_to_user() on ppc32

2021-03-10 Thread Christophe Leroy
ppc32 has an efficiant 64 bits __put_user(), so also use it in order to unroll loops more. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/uaccess.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/include/asm/uaccess.h

[PATCH v1 0/8] Miscellaneous user access improvement

2021-03-10 Thread Christophe Leroy
Patches 1-3 are cleaning parts of uaccess.h not related to put_user/get_user Patch 4 removes some usage of consecutives __get_user Patches 5 rewrite __patch_instruction to not use uaccess.h internals. Patches 6-8 switch some parts of code to user_access_begin/end blocks All patches are

[PATCH v2 14/15] powerpc/uaccess: Introduce __get_user_size_goto()

2021-03-10 Thread Christophe Leroy
We have got two places doing a goto based on the result of __get_user_size_allowed(). Refactor that into __get_user_size_goto(). Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/uaccess.h | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git

[PATCH v2 15/15] powerpc/uaccess: Use asm goto for get_user when compiler supports it

2021-03-10 Thread Christophe Leroy
clang 11 and future GCC are supporting asm goto with outputs. Use it to implement get_user in order to get better generated code. Note that clang requires to set x in the default branch of __get_user_size_goto() otherwise is compliant about x not being initialised :puzzled: Signed-off-by:

[PATCH v2 13/15] powerpc/uaccess: Refactor get/put_user() and __get/put_user()

2021-03-10 Thread Christophe Leroy
Make get_user() do the access_ok() check then call __get_user(). Make put_user() do the access_ok() check then call __put_user(). Then embed __get_user_size() and __put_user_size() in __get_user() and __put_user(). Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/uaccess.h | 66

[PATCH v2 12/15] powerpc/uaccess: Rename __get/put_user_check/nocheck

2021-03-10 Thread Christophe Leroy
__get_user_check() becomes get_user() __put_user_check() becomes put_user() __get_user_nocheck() becomes __get_user() __put_user_nocheck() becomes __put_user() Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/uaccess.h | 30 ++ 1 file changed, 10

[PATCH v2 11/15] powerpc/uaccess: Split out __get_user_nocheck()

2021-03-10 Thread Christophe Leroy
One part of __get_user_nocheck() is used for __get_user(), the other part for unsafe_get_user(). Move the part dedicated to unsafe_get_user() in it. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/uaccess.h | 22 -- 1 file changed, 12 insertions(+), 10

[PATCH v2 10/15] powerpc/uaccess: Remove calls to __get_user_bad() and __put_user_bad()

2021-03-10 Thread Christophe Leroy
__get_user_bad() and __put_user_bad() are functions that are declared but not defined, in order to make the link fail in case they are called. Nowadays, we have BUILD_BUG() and BUILD_BUG_ON() for that, and they have the advantage to break the build earlier as it breaks it at compile time instead

[PATCH v2 09/15] powerpc/uaccess: Remove __chk_user_ptr() in __get/put_user

2021-03-10 Thread Christophe Leroy
Commit d02f6b7dab82 ("powerpc/uaccess: Evaluate macro arguments once, before user access is allowed") changed the __chk_user_ptr() argument from the passed ptr pointer to the locally declared __gu_addr. But __gu_addr is locally defined as __user so the check is pointless. During kernel build

[PATCH v2 08/15] powerpc/uaccess: Remove __unsafe_put_user_goto()

2021-03-10 Thread Christophe Leroy
__unsafe_put_user_goto() is just an intermediate layer to __put_user_size_goto() without added value other than doing the __user pointer type checking. Do the __user pointer type checking in __put_user_size_goto() and remove __unsafe_put_user_goto(). Signed-off-by: Christophe Leroy ---

[PATCH v2 05/15] powerpc/uaccess: Move get_user_instr helpers in asm/inst.h

2021-03-10 Thread Christophe Leroy
Those helpers use get_user helpers but they don't participate in their implementation, so they do not belong to asm/uaccess.h Move them in asm/inst.h Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/inst.h| 34 ++ arch/powerpc/include/asm/uaccess.h |

[PATCH v2 07/15] powerpc/uaccess: Call might_fault() inconditionaly

2021-03-10 Thread Christophe Leroy
Commit 6bfd93c32a50 ("powerpc: Fix incorrect might_sleep in __get_user/__put_user on kernel addresses") added a check to not call might_sleep() on kernel addresses. This was to enable the use of __get_user() in the alignment exception handler for any address. Then commit 95156f0051cb ("lockdep,

[PATCH v2 06/15] powerpc/align: Don't use __get_user_instr() on kernel addresses

2021-03-10 Thread Christophe Leroy
In the old days, when we didn't have kernel userspace access protection and had set_fs(), it was wise to use __get_user() and friends to read kernel memory. Nowadays, get_user() is granting userspace access and is exclusively for userspace access. In alignment exception handler, use

[PATCH v2 03/15] powerpc/align: Convert emulate_spe() to user_access_begin

2021-03-10 Thread Christophe Leroy
This patch converts emulate_spe() to using user_access_being logic. Since commit 662bbcb2747c ("mm, sched: Allow uaccess in atomic with pagefault_disable()"), might_fault() doesn't fire when called from sections where pagefaults are disabled, which must be the case when using _inatomic variants

[PATCH v2 04/15] powerpc/uaccess: Remove __get/put_user_inatomic()

2021-03-10 Thread Christophe Leroy
Powerpc is the only architecture having _inatomic variants of __get_user() and __put_user() accessors. They were introduced by commit e68c825bb016 ("[POWERPC] Add inatomic versions of __get_user and __put_user"). Those variants expand to the _nosleep macros instead of expanding to the _nocheck

[PATCH v2 02/15] powerpc/uaccess: Define ___get_user_instr() for ppc32

2021-03-10 Thread Christophe Leroy
Define simple ___get_user_instr() for ppc32 instead of defining ppc32 versions of the three get_user_instr() helpers. Signed-off-by: Christophe Leroy Reviewed-by: Daniel Axtens --- arch/powerpc/include/asm/uaccess.h | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff

[PATCH v2 00/15] powerpc: Cleanup of uaccess.h and adding asm goto for get_user()

2021-03-10 Thread Christophe Leroy
This series cleans up uaccess.h and adds asm goto for get_user() v2: - Further clean ups - asm goto for get_user() - Move a few patches unrelated to put_user/get_user into another misc series. Christophe Leroy (15): powerpc/uaccess: Remove __get_user_allowed() and unsafe_op_wrap()

[PATCH v2 01/15] powerpc/uaccess: Remove __get_user_allowed() and unsafe_op_wrap()

2021-03-10 Thread Christophe Leroy
Those two macros have only one user which is unsafe_get_user(). Put everything in one place and remove them. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/uaccess.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/include/asm/uaccess.h

[PATCH] cxl: don't manipulate the mm.mm_users field directly

2021-03-10 Thread Laurent Dufour
It is better to rely on the API provided by the MM layer instead of directly manipulating the mm_users field. Signed-off-by: Laurent Dufour --- drivers/misc/cxl/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/cxl/fault.c b/drivers/misc/cxl/fault.c index

Re: [PATCH v1] powerpc: Include running function as first entry in save_stack_trace() and friends

2021-03-10 Thread Segher Boessenkool
Hi! On Wed, Mar 10, 2021 at 11:32:20AM +, Mark Rutland wrote: > On Tue, Mar 09, 2021 at 04:05:32PM -0600, Segher Boessenkool wrote: > > On Tue, Mar 09, 2021 at 04:05:23PM +, Mark Rutland wrote: > > > On Thu, Mar 04, 2021 at 03:54:48PM -0600, Segher Boessenkool wrote: > > > > On Thu, Mar

Re: [PATCH 3/9] powerpc/pseries: remove the ppc-cmm file system

2021-03-10 Thread Al Viro
On Tue, Mar 09, 2021 at 04:53:42PM +0100, Christoph Hellwig wrote: > Just use the generic anon_inode file system. Umm... The only problem I see here is the lifetime rules for that module, and that's not something introduced in this patchset. Said that, looks like the logics around that place is

Re: [PATCH 4/9] drm: remove the drm file system

2021-03-10 Thread Al Viro
On Tue, Mar 09, 2021 at 04:53:43PM +0100, Christoph Hellwig wrote: > Just use the generic anon_inode file system. Are you changing the lifetime rules for that module?

Re: PowerPC64 future proof kernel toc, revised for lld

2021-03-10 Thread Segher Boessenkool
On Wed, Mar 10, 2021 at 01:44:57PM +0100, Christophe Leroy wrote: > > > Le 10/03/2021 à 13:25, Alan Modra a écrit : > >On Wed, Mar 10, 2021 at 08:33:37PM +1100, Alexey Kardashevskiy wrote: > >>One more question - the older version had a construct "DEFINED (.TOC.) ? > >>.TOC. : ..." in case .TOC.

Re: [PATCH v4 13/14] dt-bindings: of: Add restricted DMA pool

2021-03-10 Thread Will Deacon
Hi Claire, On Tue, Feb 09, 2021 at 02:21:30PM +0800, Claire Chang wrote: > Introduce the new compatible string, restricted-dma-pool, for restricted > DMA. One can specify the address and length of the restricted DMA memory > region by restricted-dma-pool in the reserved-memory node. > >

Re: [PATCH V2 2/2] powerpc/perf: Add platform specific check_attr_config

2021-03-10 Thread Segher Boessenkool
On Thu, Mar 11, 2021 at 12:16:25AM +1100, Alexey Kardashevskiy wrote: > On 26/02/2021 17:50, Madhavan Srinivasan wrote: > >+int isa3_X_check_attr_config(struct perf_event *ev) > > "isa300" is used everywhere else to refer to ISA 3.00. And that itself is a misspelling, there is nothing called

Re: [PATCH] powerpc: Fix missing declaration of [en/dis]able_kernel_vsx()

2021-03-10 Thread Christophe Leroy
Hi Geert, Le 09/03/2021 à 11:55, Geert Uytterhoeven a écrit : Hi Christophe, On Tue, Mar 9, 2021 at 10:58 AM Christophe Leroy wrote: Le 09/03/2021 à 10:16, Geert Uytterhoeven a écrit : On Tue, Mar 9, 2021 at 9:52 AM Christophe Leroy wrote: Le 09/03/2021 à 09:45, Geert Uytterhoeven a écrit

Re: [PATCH V2 2/2] powerpc/perf: Add platform specific check_attr_config

2021-03-10 Thread Alexey Kardashevskiy
On 26/02/2021 17:50, Madhavan Srinivasan wrote: Add platform specific attr.config value checks. Patch includes checks for both power9 and power10. Signed-off-by: Madhavan Srinivasan --- Changelog v1: - No changes. arch/powerpc/perf/isa207-common.c | 41 +++

Re: PowerPC64 future proof kernel toc, revised for lld

2021-03-10 Thread Christophe Leroy
Le 10/03/2021 à 13:25, Alan Modra a écrit : On Wed, Mar 10, 2021 at 08:33:37PM +1100, Alexey Kardashevskiy wrote: One more question - the older version had a construct "DEFINED (.TOC.) ? .TOC. : ..." in case .TOC. is not defined (too old ld? too old gcc?) but the newer patch seems assuming

[PATCH] powerpc/Makefile: Remove workaround for gcc versions below 4.9

2021-03-10 Thread Christophe Leroy
Commit 6ec4476ac825 ("Raise gcc version requirement to 4.9") made it impossible to build with gcc 4.8 and under. Remove related workaround. Signed-off-by: Christophe Leroy --- arch/powerpc/Makefile | 6 -- 1 file changed, 6 deletions(-) diff --git a/arch/powerpc/Makefile

Re: PowerPC64 future proof kernel toc, revised for lld

2021-03-10 Thread Alan Modra
On Wed, Mar 10, 2021 at 08:33:37PM +1100, Alexey Kardashevskiy wrote: > One more question - the older version had a construct "DEFINED (.TOC.) ? > .TOC. : ..." in case .TOC. is not defined (too old ld? too old gcc?) but the > newer patch seems assuming it is always defined, when was it added? I

Re: [PATCH] powerpc/xmon: Check cpu id in commands "c#", "dp#" and "dx#"

2021-03-10 Thread Cédric Le Goater
On 3/9/21 7:11 PM, Greg Kurz wrote: > All these commands end up peeking into the PACA using the user originated > cpu id as an index. Check the cpu id is valid in order to prevent xmon to > crash. Instead of printing an error, this follows the same behavior as the > "lp s #" command : ignore the

[PATCH] powerpc: Force inlining of cpu_has_feature() to avoid build failure

2021-03-10 Thread Christophe Leroy
The code relies on constant folding of cpu_has_feature() based on possible and always true values as defined per CPU_FTRS_ALWAYS and CPU_FTRS_POSSIBLE. Build failure is encountered with for instance book3e_all_defconfig on kisskb in the AMDGPU driver which uses cpu_has_feature(CPU_FTR_VSX_COMP)

Re: [PATCH v1] powerpc: Include running function as first entry in save_stack_trace() and friends

2021-03-10 Thread Mark Rutland
On Tue, Mar 09, 2021 at 04:05:32PM -0600, Segher Boessenkool wrote: > Hi! > > On Tue, Mar 09, 2021 at 04:05:23PM +, Mark Rutland wrote: > > On Thu, Mar 04, 2021 at 03:54:48PM -0600, Segher Boessenkool wrote: > > > On Thu, Mar 04, 2021 at 02:57:30PM +, Mark Rutland wrote: > > > > It looks

Re: [Freedreno] [PATCH 16/17] iommu: remove DOMAIN_ATTR_IO_PGTABLE_CFG

2021-03-10 Thread Will Deacon
On Wed, Mar 10, 2021 at 09:58:06AM +0100, Christoph Hellwig wrote: > On Fri, Mar 05, 2021 at 10:00:12AM +, Will Deacon wrote: > > > But one thing I'm not sure about is whether > > > IO_PGTABLE_QUIRK_ARM_OUTER_WBWA is something that other devices > > > *should* be using as well, but just

Re: [PATCH v3] powerpc/32: remove bogus ppc_select syscall

2021-03-10 Thread Arnd Bergmann
On Tue, Mar 9, 2021 at 4:59 PM Christophe Leroy wrote: > Le 05/03/2021 à 13:03, Arnd Bergmann a écrit : > > On Fri, Mar 5, 2021 at 11:15 AM Christophe Leroy > > wrote: > >> Le 05/03/2021 à 11:06, Arnd Bergmann a écrit : > > I had another look. In fact x86, arm and m68k still have the #82

Re: [PATCH 2/9] fs: add an argument-less alloc_anon_inode

2021-03-10 Thread Christian Brauner
On Tue, Mar 09, 2021 at 04:53:41PM +0100, Christoph Hellwig wrote: > Add a new alloc_anon_inode helper that allocates an inode on > the anon_inode file system. > > Signed-off-by: Christoph Hellwig > --- Looks good! Reviewed-by: Christian Brauner

Re: PowerPC64 future proof kernel toc, revised for lld

2021-03-10 Thread Alexey Kardashevskiy
One more question - the older version had a construct "DEFINED (.TOC.) ? .TOC. : ..." in case .TOC. is not defined (too old ld? too old gcc?) but the newer patch seems assuming it is always defined, when was it added? I have the same check in SLOF, for example, do I still need it? On

Re: [PATCH 1/9] fs: rename alloc_anon_inode to alloc_anon_inode_sb

2021-03-10 Thread Christian Brauner
On Tue, Mar 09, 2021 at 04:53:40PM +0100, Christoph Hellwig wrote: > Rename alloc_inode to free the name for a new variant that does not > need boilerplate to create a super_block first. > > Signed-off-by: Christoph Hellwig > --- Looks good (with the metioned fix in

Re: PowerPC64 future proof kernel toc, revised for lld

2021-03-10 Thread Alexey Kardashevskiy
On 10/03/2021 14:48, Alan Modra wrote: This patch future-proofs the kernel against linker changes that might put the toc pointer at some location other than .got+0x8000, by replacing __toc_start+0x8000 with .TOC. throughout. If the kernel's idea of the toc pointer doesn't agree with the

Re: [PATCH 14/17] iommu: remove DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE

2021-03-10 Thread Christoph Hellwig
On Wed, Mar 10, 2021 at 10:15:01AM +0100, Christoph Hellwig wrote: > On Thu, Mar 04, 2021 at 03:25:27PM +, Robin Murphy wrote: > > On 2021-03-01 08:42, Christoph Hellwig wrote: > >> Use explicit methods for setting and querying the information instead. > > > > Now that everyone's using

Re: [PATCH] KVM: PPC: Book3S HV: Do not expose HFSCR sanitisation to nested hypervisor

2021-03-10 Thread Paul Mackerras
On Mon, Mar 08, 2021 at 06:18:47PM +1000, Nicholas Piggin wrote: > Excerpts from Fabiano Rosas's message of March 6, 2021 9:10 am: > > As one of the arguments of the H_ENTER_NESTED hypercall, the nested > > hypervisor (L1) prepares a structure containing the values of various > >

Re: [PATCH] powerpc/mm: Add cond_resched() while removing hpte mappings

2021-03-10 Thread Michael Ellerman
Vaibhav Jain writes: > While removing large number of mappings from hash page tables for > large memory systems as soft-lockup is reported because of the time > spent inside htap_remove_mapping() like one below: > > watchdog: BUG: soft lockup - CPU#8 stuck for 23s! > > NIP

Re: [PATCH 14/17] iommu: remove DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE

2021-03-10 Thread Christoph Hellwig
On Thu, Mar 04, 2021 at 03:25:27PM +, Robin Murphy wrote: > On 2021-03-01 08:42, Christoph Hellwig wrote: >> Use explicit methods for setting and querying the information instead. > > Now that everyone's using iommu-dma, is there any point in bouncing this > through the drivers at all? Seems

Re: [PATCH] powerpc/mm: Add cond_resched() while removing hpte mappings

2021-03-10 Thread Christophe Leroy
Le 10/03/2021 à 08:59, Vaibhav Jain a écrit : While removing large number of mappings from hash page tables for large memory systems as soft-lockup is reported because of the time spent inside htap_remove_mapping() like one below: watchdog: BUG: soft lockup - CPU#8 stuck for 23s! NIP

Re: [Freedreno] [PATCH 16/17] iommu: remove DOMAIN_ATTR_IO_PGTABLE_CFG

2021-03-10 Thread Christoph Hellwig
On Fri, Mar 05, 2021 at 10:00:12AM +, Will Deacon wrote: > > But one thing I'm not sure about is whether > > IO_PGTABLE_QUIRK_ARM_OUTER_WBWA is something that other devices > > *should* be using as well, but just haven't gotten around to yet. > > The intention is certainly that this would be

Re: [PATCH 14/17] iommu: remove DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE

2021-03-10 Thread Christoph Hellwig
On Thu, Mar 04, 2021 at 03:25:27PM +, Robin Murphy wrote: > On 2021-03-01 08:42, Christoph Hellwig wrote: >> Use explicit methods for setting and querying the information instead. > > Now that everyone's using iommu-dma, is there any point in bouncing this > through the drivers at all? Seems

Re: make alloc_anon_inode more useful

2021-03-10 Thread Christoph Hellwig
On Wed, Mar 10, 2021 at 04:05:45AM +, Matthew Wilcox wrote: > On Tue, Mar 09, 2021 at 04:53:39PM +0100, Christoph Hellwig wrote: > > this series first renames the existing alloc_anon_inode to > > alloc_anon_inode_sb to clearly mark it as requiring a superblock. > > > > It then adds a new

Re: make alloc_anon_inode more useful

2021-03-10 Thread Christoph Hellwig
On Tue, Mar 09, 2021 at 12:54:52PM -0400, Jason Gunthorpe wrote: > On Tue, Mar 09, 2021 at 04:53:39PM +0100, Christoph Hellwig wrote: > > Hi all, > > > > this series first renames the existing alloc_anon_inode to > > alloc_anon_inode_sb to clearly mark it as requiring a superblock. > > > > It

Re: [PATCH 1/9] fs: rename alloc_anon_inode to alloc_anon_inode_sb

2021-03-10 Thread Christoph Hellwig
On Tue, Mar 09, 2021 at 10:39:05PM -0800, Minchan Kim wrote: > > -struct inode *alloc_anon_inode(struct super_block *s) > > +struct inode *alloc_anon_inode_sb(struct super_block *s) > > { > > static const struct address_space_operations anon_aops = { > > .set_page_dirty =

Re: [PATCH v1 01/15] powerpc/uaccess: Remove __get_user_allowed() and unsafe_op_wrap()

2021-03-10 Thread Christophe Leroy
Le 01/03/2021 à 23:02, Daniel Axtens a écrit : Christophe Leroy writes: Those two macros have only one user which is unsafe_get_user(). Put everything in one place and remove them. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/uaccess.h | 10 +- 1 file

Re: [PATCH v1 03/15] powerpc/uaccess: Remove __get/put_user_inatomic()

2021-03-10 Thread Christophe Leroy
Le 01/03/2021 à 23:42, Daniel Axtens a écrit : Christophe Leroy writes: Since commit 662bbcb2747c ("mm, sched: Allow uaccess in atomic with pagefault_disable()"), __get/put_user() can be used in atomic parts of the code, therefore the __get/put_user_inatomic() introduced by commit

[PATCH] powerpc/mm: Add cond_resched() while removing hpte mappings

2021-03-10 Thread Vaibhav Jain
While removing large number of mappings from hash page tables for large memory systems as soft-lockup is reported because of the time spent inside htap_remove_mapping() like one below: watchdog: BUG: soft lockup - CPU#8 stuck for 23s! NIP plpar_hcall+0x38/0x58 LR