[PATCH 01/13] powerpc/powernv: remove get_cxl_module

2021-01-28 Thread Christoph Hellwig
The static inline get_cxl_module function is entirely unused since commit 8bf6b91a5125a ("Revert "powerpc/powernv: Add support for the cxl kernel api on the real phb"), so remove it. Signed-off-by: Christoph Hellwig Reviewed-by: Andrew Donnellan --- arch/powerpc/platforms/powernv/pci-cxl.c |

[PATCH 10/13] module: pass struct find_symbol_args to find_symbol

2021-01-28 Thread Christoph Hellwig
Simplify the calling convention by passing the find_symbol_args structure to find_symbol instead of initializing it inside the function. Signed-off-by: Christoph Hellwig --- kernel/module.c | 113 ++-- 1 file changed, 52 insertions(+), 61 deletions(-)

Re: [PATCH 04/13] module: use RCU to synchronize find_module

2021-01-28 Thread Thiago Jung Bauermann
Hi Christoph, Christoph Hellwig writes: > diff --git a/kernel/module.c b/kernel/module.c > index 981302f616b411..6772fb2680eb3e 100644 > --- a/kernel/module.c > +++ b/kernel/module.c > @@ -668,7 +668,6 @@ static struct module *find_module_all(const char *name, > size_t len, > > struct

Re: [PATCH] vio: make remove callback return void

2021-01-28 Thread Uwe Kleine-König
Hello Sukadev, On 1/28/21 8:07 PM, Sukadev Bhattiprolu wrote: Slightly off-topic, should ndo_stop() also return a void? Its return value seems to be mostly ignored and [...] I don't know enough about the network stack to tell. Probably it's a good idea to start a separate thread for this and

Re: [PATCH 02/27] x86/syscalls: fix -Wmissing-prototypes warnings from COND_SYSCALL()

2021-01-28 Thread Sergei Shtylyov
Hello! On 28.01.2021 3:50, Masahiro Yamada wrote: Building kernel/sys_ni.c with W=1 omits tons of -Wmissing-prototypes Emits? warnings. $ make W=1 kernel/sys_ni.o [ snip ] CC kernel/sys_ni.o In file included from kernel/sys_ni.c:10:

Re: [PATCH 12/27] m68k: syscalls: switch to generic syscalltbl.sh

2021-01-28 Thread Geert Uytterhoeven
Hi Yamada-san, On Thu, Jan 28, 2021 at 1:54 AM Masahiro Yamada wrote: > As of v5.11-rc1, 12 architectures duplicate similar shell scripts in > order to generate syscall table headers. My goal is to unify them into > the single scripts/syscalltbl.sh. > > This commit converts m68k to use

Re: [PATCH 02/27] x86/syscalls: fix -Wmissing-prototypes warnings from COND_SYSCALL()

2021-01-28 Thread Sergei Shtylyov
On 28.01.2021 10:59, Sergei Shtylyov wrote: [...] Building kernel/sys_ni.c with W=1 omits tons of -Wmissing-prototypes    Emits? warnings. $ make W=1 kernel/sys_ni.o    [ snip ]    CC  kernel/sys_ni.o In file included from kernel/sys_ni.c:10:

Re: [PATCH v6 08/39] powerpc: rearrange do_page_fault error case to be inside exception_enter

2021-01-28 Thread Christophe Leroy
Le 15/01/2021 à 17:49, Nicholas Piggin a écrit : This keeps the context tracking over the entire interrupt handler which helps later with moving context tracking into interrupt wrappers. Signed-off-by: Nicholas Piggin --- arch/powerpc/mm/fault.c | 28 1 file

Re: [PATCH] PCI: dwc: layerscape: convert to builtin_platform_driver()

2021-01-28 Thread Tony Lindgren
* Geert Uytterhoeven [210128 09:32]: > It wasn't. The regression is that the driver no longer probes at first > try, because its dependencies are now probed later. The question is: > why are the dependencies now probed later? How to fix that? I'm afraid that may be unfixable.. It depends on

Re: [PATCH] PCI: dwc: layerscape: convert to builtin_platform_driver()

2021-01-28 Thread Geert Uytterhoeven
Hi Saravana, On Wed, Jan 27, 2021 at 6:11 PM Saravana Kannan wrote: > On Wed, Jan 27, 2021 at 8:56 AM Geert Uytterhoeven > wrote: > > On Wed, Jan 27, 2021 at 5:42 PM Saravana Kannan > > wrote: > > > On Tue, Jan 26, 2021 at 11:43 PM Geert Uytterhoeven > > > wrote: > > > > On Wed, Jan 27,

[PATCH v5 1/2] powerpc/mce: Reduce the size of event arrays

2021-01-28 Thread Ganesh Goudar
Maximum recursive depth of MCE is 4, Considering the maximum depth allowed reduce the size of event to 10 from 100. This saves us ~19kB of memory and has no fatal consequences. Signed-off-by: Ganesh Goudar --- v4: This patch is a fragment of the orignal patch which is split into two. v5:

[PATCH] ASoC: fsl_spdif: Utilize the defined parameter to clear code

2021-01-28 Thread Tang Bin
Utilize the defined parameter 'dev' to make the code cleaner. Signed-off-by: Tang Bin --- sound/soc/fsl/fsl_spdif.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c index 455f96908..b6d5563df 100644 ---

Re: [PATCH] PCI: dwc: layerscape: convert to builtin_platform_driver()

2021-01-28 Thread Tony Lindgren
Hi, * Michael Walle [210125 19:52]: > Although I do have the changes for the builtin_platform_driver_probe() > ready, I don't think it makes much sense to send these unless we agree > on the increased memory footprint. While there are just a few > builtin_platform_driver_probe() and memory

[PATCH v5 2/2] powerpc/mce: Remove per cpu variables from MCE handlers

2021-01-28 Thread Ganesh Goudar
Access to per-cpu variables requires translation to be enabled on pseries machine running in hash mmu mode, Since part of MCE handler runs in realmode and part of MCE handling code is shared between ppc architectures pseries and powernv, it becomes difficult to manage these variables differently

Re: [PATCH v4 2/2] powerpc/mce: Remove per cpu variables from MCE handlers

2021-01-28 Thread Ganesh
On 1/25/21 2:54 PM, Christophe Leroy wrote: Le 22/01/2021 à 13:32, Ganesh Goudar a écrit : Access to per-cpu variables requires translation to be enabled on pseries machine running in hash mmu mode, Since part of MCE handler runs in realmode and part of MCE handling code is shared between

RE: [PATCH v4 02/10] powerpc/signal: Add unsafe_copy_{vsx, fpr}_from_user()

2021-01-28 Thread David Laight
From: Christopher M. Riedl > Sent: 28 January 2021 04:04 > > Reuse the "safe" implementation from signal.c except for calling > unsafe_copy_from_user() to copy into a local buffer. > > Signed-off-by: Christopher M. Riedl > --- > arch/powerpc/kernel/signal.h | 33

Re: [PATCH 1/2] crypto: talitos - Work around SEC6 ERRATA (AES-CTR mode data size error)

2021-01-28 Thread Herbert Xu
On Wed, Jan 20, 2021 at 06:57:24PM +, Christophe Leroy wrote: > Talitos Security Engine AESU considers any input > data size that is not a multiple of 16 bytes to be an error. > This is not a problem in general, except for Counter mode > that is a stream cipher and can have an input of any

[PATCH net v2] ibmvnic: device remove has higher precedence over reset

2021-01-28 Thread Lijun Pan
Returning -EBUSY in ibmvnic_remove() does not actually hold the removal procedure since driver core doesn't care for the return value (see __device_release_driver() in drivers/base/dd.c calling dev->bus->remove()) though vio_bus_remove (in arch/powerpc/platforms/pseries/vio.c) records the return

Re: [PATCH 04/13] module: use RCU to synchronize find_module

2021-01-28 Thread Christoph Hellwig
On Thu, Jan 28, 2021 at 05:50:56PM -0300, Thiago Jung Bauermann wrote: > > struct module *find_module(const char *name) > > { > > - module_assert_mutex(); > > Does it make sense to replace the assert above with the warn below (untested)? > > RCU_LOCKDEP_WARN(rcu_read_lock_sched_held());

Re: [PATCH 13/13] module: remove EXPORY_UNUSED_SYMBOL*

2021-01-28 Thread Christoph Hellwig
On Wed, Jan 27, 2021 at 02:49:38PM +0100, Jessica Yu wrote: >> #ifdef CONFIG_MODULE_SIG >> /* Signature was verified. */ >> bool sig_ok; >> @@ -592,7 +580,6 @@ struct symsearch { >> GPL_ONLY, >> WILL_BE_GPL_ONLY, >> } license; >> -bool unused; >> }; >

[PATCH 06/13] kallsyms: only build {, module_}kallsyms_on_each_symbol when required

2021-01-28 Thread Christoph Hellwig
kallsyms_on_each_symbol and module_kallsyms_on_each_symbol are only used by the livepatching code, so don't build them if livepatching is not enabled. Signed-off-by: Christoph Hellwig --- include/linux/kallsyms.h | 17 - include/linux/module.h | 16

Re: [PATCH] vio: make remove callback return void

2021-01-28 Thread Sukadev Bhattiprolu
Uwe Kleine-König [u...@kleine-koenig.org] wrote: > The driver core ignores the return value of struct bus_type::remove() > because there is only little that can be done. To simplify the quest to > make this function return void, let struct vio_driver::remove() return > void, too. All users

Re: [PATCH] powerpc/sstep: Fix array out of bound warning

2021-01-28 Thread Naveen N. Rao
On 2021/01/15 11:46AM, Ravi Bangoria wrote: > Compiling kernel with -Warray-bounds throws below warning: > > In function 'emulate_vsx_store': > warning: array subscript is above array bounds [-Warray-bounds] > buf.d[2] = byterev_8(reg->d[1]); > ~^~~ > buf.d[3] =

[PATCH 04/13] module: use RCU to synchronize find_module

2021-01-28 Thread Christoph Hellwig
Allow for a RCU-sched critical section around find_module, following the lower level find_module_all helper, and switch the two callers outside of module.c to use such a RCU-sched critical section instead of module_mutex. Signed-off-by: Christoph Hellwig --- include/linux/module.h | 2 +-

[PATCH 07/13] module: mark module_mutex static

2021-01-28 Thread Christoph Hellwig
Except for two lockdep asserts module_mutex is only used in module.c. Remove the two asserts given that the functions they are in are not exported and just called from the module code, and mark module_mutex static. Signed-off-by: Christoph Hellwig --- include/linux/module.h | 2 --

[PATCH 13/13] module: remove EXPORT_UNUSED_SYMBOL*

2021-01-28 Thread Christoph Hellwig
EXPORT_UNUSED_SYMBOL* is not actually used anywhere. Remove the unused functionality as we generally just remove unused code anyway. Signed-off-by: Christoph Hellwig --- arch/arm/configs/bcm2835_defconfig | 1 - arch/arm/configs/mxs_defconfig | 1 -

Re: [PATCH 03/13] livepatch: refactor klp_init_object

2021-01-28 Thread Christoph Hellwig
On Wed, Jan 27, 2021 at 01:58:21PM +0100, Petr Mladek wrote: > > --- a/kernel/livepatch/core.c > > +++ b/kernel/livepatch/core.c > > @@ -54,9 +54,6 @@ static void klp_find_object_module(struct klp_object *obj) > > { > > struct module *mod; > > > > - if (!klp_is_module(obj)) > > -

[PATCH 08/13] module: remove each_symbol_in_section

2021-01-28 Thread Christoph Hellwig
each_symbol_in_section just contains a trivial loop over its arguments. Just open code the loop in the two callers. Signed-off-by: Christoph Hellwig --- kernel/module.c | 29 +++-- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/kernel/module.c

[PATCH 11/13] module: move struct symsearch to module.c

2021-01-28 Thread Christoph Hellwig
struct symsearch is only used inside of module.h, so move the definition out of module.h. Signed-off-by: Christoph Hellwig --- include/linux/module.h | 11 --- kernel/module.c| 11 +++ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git

Re: [PATCH 18/27] parisc: syscalls: switch to generic syscalltbl.sh

2021-01-28 Thread Helge Deller
On 1/28/21 1:51 AM, Masahiro Yamada wrote: > As of v5.11-rc1, 12 architectures duplicate similar shell scripts in > order to generate syscall table headers. My goal is to unify them into > the single scripts/syscalltbl.sh. > > This commit converts parisc to use scripts/syscalltbl.sh. This also >

Re: [PATCH 03/13] livepatch: refactor klp_init_object

2021-01-28 Thread Christoph Hellwig
On Thu, Jan 28, 2021 at 05:22:40PM +0100, Christoph Hellwig wrote: > > We need to either update the function description or keep this check. > > > > I prefer to keep the check. The function does the right thing also > > for the object "vmlinux". Also the livepatch code includes many > > similar

[PATCH 05/13] kallsyms: refactor {,module_}kallsyms_on_each_symbol

2021-01-28 Thread Christoph Hellwig
Require an explicit call to module_kallsyms_on_each_symbol to look for symbols in modules instead of the call from kallsyms_on_each_symbol, and acquire module_mutex inside of module_kallsyms_on_each_symbol instead of leaving that up to the caller. Signed-off-by: Christoph Hellwig ---

module loader dead code removal and cleanups v2

2021-01-28 Thread Christoph Hellwig
Hi all, this series removes support for long term unused export types and cleans up various loose ends in the module loader. Changes since v1: - move struct symsearch to module.c - rework drm to not call find_module at all - llow RCU-sched locking for find_module - keep find_module as a

[PATCH 03/13] module: unexport find_module and module_mutex

2021-01-28 Thread Christoph Hellwig
find_module is not used by modular code any more, and random driver code has no business calling it to start with. Signed-off-by: Christoph Hellwig --- kernel/module.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/module.c b/kernel/module.c index 4bf30e4b3eaaa1..981302f616b411

[PATCH 02/13] drm: remove drm_fb_helper_modinit

2021-01-28 Thread Christoph Hellwig
drm_fb_helper_modinit has a lot of boilerplate for what is not very simple functionality. Just open code it in the only caller using IS_ENABLED and IS_MODULE, and skip the find_module check as a request_module is harmless if the module is already loaded (and not other caller has this find_module

[PATCH 09/13] module: merge each_symbol_section into find_symbol

2021-01-28 Thread Christoph Hellwig
each_symbol_section is only called by find_symbol, so merge the two functions. Signed-off-by: Christoph Hellwig --- kernel/module.c | 148 ++-- 1 file changed, 69 insertions(+), 79 deletions(-) diff --git a/kernel/module.c b/kernel/module.c index

[PATCH 12/13] module: remove EXPORT_SYMBOL_GPL_FUTURE

2021-01-28 Thread Christoph Hellwig
As far as I can tell this has never been used at all, and certainly not any time recently. Signed-off-by: Christoph Hellwig --- arch/x86/tools/relocs.c | 4 ++-- include/asm-generic/vmlinux.lds.h | 14 -- include/linux/export.h| 1 - include/linux/module.h

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-01-28 Thread Zorro Lang
On Thu, Jan 28, 2021 at 03:44:21PM +0100, Christophe Leroy wrote: > > > Le 28/01/2021 à 15:42, Jens Axboe a écrit : > > On 1/28/21 6:52 AM, Zorro Lang wrote: > > > On Wed, Jan 27, 2021 at 08:06:37PM -0700, Jens Axboe wrote: > > > > On 1/27/21 8:13 PM, Zorro Lang wrote: > > > > > On Thu, Jan 28,

[PATCH v2] powerpc/sstep: Fix array out of bound warning

2021-01-28 Thread Ravi Bangoria
Compiling kernel with -Warray-bounds throws below warning: In function 'emulate_vsx_store': warning: array subscript is above array bounds [-Warray-bounds] buf.d[2] = byterev_8(reg->d[1]); ~^~~ buf.d[3] = byterev_8(reg->d[0]); ~^~~ Fix it by using temporary array variable

Re: [PATCH] powerpc/sstep: Fix array out of bound warning

2021-01-28 Thread Ravi Bangoria
On 1/28/21 10:50 PM, Naveen N. Rao wrote: On 2021/01/15 11:46AM, Ravi Bangoria wrote: Compiling kernel with -Warray-bounds throws below warning: In function 'emulate_vsx_store': warning: array subscript is above array bounds [-Warray-bounds] buf.d[2] = byterev_8(reg->d[1]);

Re: [PATCH v4 02/10] powerpc/signal: Add unsafe_copy_{vsx, fpr}_from_user()

2021-01-28 Thread Christophe Leroy
Le 28/01/2021 à 11:38, David Laight a écrit : From: Christopher M. Riedl Sent: 28 January 2021 04:04 Reuse the "safe" implementation from signal.c except for calling unsafe_copy_from_user() to copy into a local buffer. Signed-off-by: Christopher M. Riedl --- arch/powerpc/kernel/signal.h

[PATCH 3/3] sched/core: Update task_prio() function header

2021-01-28 Thread Dietmar Eggemann
The description of the RT offset and the values for 'normal' tasks needs update. Moreover there are DL tasks now. task_prio() has to stay like it is to guarantee compatibility with the /proc//stat priority field: # cat /proc//stat | awk '{ print $18; }' Signed-off-by: Dietmar Eggemann ---

[PATCH 2/3] sched: Remove USER_PRIO, TASK_USER_PRIO and MAX_USER_PRIO

2021-01-28 Thread Dietmar Eggemann
The only remaining use of MAX_USER_PRIO (and USER_PRIO) is the SCALE_PRIO() definition in the PowerPC Cell architecture's Synergistic Processor Unit (SPU) scheduler. TASK_USER_PRIO isn't used anymore. Commit fe443ef2ac42 ("[POWERPC] spusched: Dynamic timeslicing for SCHED_OTHER") copied

[PATCH 0/3] sched: Task priority related cleanups

2021-01-28 Thread Dietmar Eggemann
(1) Removing MAX_USER_RT_PRIO was already discussed here in April 2020: https://lkml.kernel.org/r/20200423094403.6f1d2...@gandalf.local.home (2) USER_PRIO() and related macros are not used anymore except in one case for powerpc where MAX_USER_PRIO can be replaced by NICE_WIDTH.

[PATCH 1/3] sched: Remove MAX_USER_RT_PRIO

2021-01-28 Thread Dietmar Eggemann
Commit d46523ea32a7 ("[PATCH] fix MAX_USER_RT_PRIO and MAX_RT_PRIO") was introduced due to a a small time period in which the realtime patch set was using different values for MAX_USER_RT_PRIO and MAX_RT_PRIO. This is no longer true, i.e. now MAX_RT_PRIO == MAX_USER_RT_PRIO. Get rid of

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-01-28 Thread Zorro Lang
On Wed, Jan 27, 2021 at 08:06:37PM -0700, Jens Axboe wrote: > On 1/27/21 8:13 PM, Zorro Lang wrote: > > On Thu, Jan 28, 2021 at 10:18:07AM +1000, Nicholas Piggin wrote: > >> Excerpts from Jens Axboe's message of January 28, 2021 5:29 am: > >>> On 1/27/21 9:38 AM, Christophe Leroy wrote: > >

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-01-28 Thread Zorro Lang
On Thu, Jan 28, 2021 at 03:44:21PM +0100, Christophe Leroy wrote: > > > Le 28/01/2021 à 15:42, Jens Axboe a écrit : > > On 1/28/21 6:52 AM, Zorro Lang wrote: > > > On Wed, Jan 27, 2021 at 08:06:37PM -0700, Jens Axboe wrote: > > > > On 1/27/21 8:13 PM, Zorro Lang wrote: > > > > > On Thu, Jan 28,

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-01-28 Thread Jens Axboe
On 1/28/21 6:52 AM, Zorro Lang wrote: > On Wed, Jan 27, 2021 at 08:06:37PM -0700, Jens Axboe wrote: >> On 1/27/21 8:13 PM, Zorro Lang wrote: >>> On Thu, Jan 28, 2021 at 10:18:07AM +1000, Nicholas Piggin wrote: Excerpts from Jens Axboe's message of January 28, 2021 5:29 am: > On 1/27/21

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-01-28 Thread Christophe Leroy
Le 28/01/2021 à 15:42, Jens Axboe a écrit : On 1/28/21 6:52 AM, Zorro Lang wrote: On Wed, Jan 27, 2021 at 08:06:37PM -0700, Jens Axboe wrote: On 1/27/21 8:13 PM, Zorro Lang wrote: On Thu, Jan 28, 2021 at 10:18:07AM +1000, Nicholas Piggin wrote: Excerpts from Jens Axboe's message of