Re: [PATCH v2 1/2] powerpc/code-patching: add patch_memory() for writing RO text

2021-12-12 Thread Christophe Leroy
Le 12/12/2021 à 02:03, Russell Currey a écrit : > powerpc allocates a text poke area of one page that is used by > patch_instruction() to modify read-only text when STRICT_KERNEL_RWX > is enabled. > > patch_instruction() is only designed for instructions, > so writing data using the text poke ar

Re: [PATCH v2 2/2] powerpc/module_64: Use patch_memory() to apply relocations to loaded modules

2021-12-12 Thread Christophe Leroy
Le 12/12/2021 à 02:03, Russell Currey a écrit : > Livepatching a loaded module involves applying relocations through > apply_relocate_add(), which attempts to write to read-only memory when > CONFIG_STRICT_MODULE_RWX=y. Work around this by performing these > writes through the text poke area by

Re: Fail to boot 5.15 on mpc8347 with either debug_pagealloc or nobats

2021-12-12 Thread Maxime Bizon
On Tuesday 07 Dec 2021 à 07:11:40 (+0100), Christophe Leroy wrote: Hello Christophe, With all your recent patches, I was able to boot a kernel with every CONFIG_DEBUG enabled. After modprobing an empty module (probe just return 0), I get this new one: [ 15.351649] BUG: spinlock recursion on

Re: [PATCH v2 0/2] kdump: simplify code

2021-12-12 Thread Matthew Wilcox
On Sat, Dec 11, 2021 at 05:53:46PM +, David Laight wrote: > From: Tiezhu Yang > > Sent: 11 December 2021 03:33 > > > > v2: > > -- add copy_to_user_or_kernel() in lib/usercopy.c > > -- define userbuf as bool type > > Instead of having a flag to indicate whether the buffer is user or kernel

Re: [RFC PATCH v2 0/7] Use pageblock_order for cma and alloc_contig_range alignment.

2021-12-12 Thread Eric Ren
Hi Zi Yan, On 2021/12/10 07:04, Zi Yan wrote: From: Zi Yan Hi all, This patchset tries to remove the MAX_ORDER - 1 alignment requirement for CMA and alloc_contig_range(). It prepares for my upcoming changes to make MAX_ORDER adjustable at boot time[1]. The MAX_ORDER - 1 alignment requirement

Re: [RFC PATCH v2 1/7] mm: page_alloc: avoid merging non-fallbackable pageblocks with others.

2021-12-12 Thread Eric Ren
Hi, On 2021/12/10 07:04, Zi Yan wrote: From: Zi Yan This is done in addition to MIGRATE_ISOLATE pageblock merge avoidance. It prepares for the upcoming removal of the MAX_ORDER-1 alignment requirement for CMA and alloc_contig_range(). MIGRARTE_HIGHATOMIC should not merge with other migratetyp

Re: [RFC PATCH v2 3/7] mm: migrate: allocate the right size of non hugetlb or THP compound pages.

2021-12-12 Thread Eric Ren
Hi, On 2021/12/10 07:04, Zi Yan wrote: From: Zi Yan alloc_migration_target() is used by alloc_contig_range() and non-LRU movable compound pages can be migrated. Current code does not allocate the right page size for such pages. Check THP precisely using is_transparent_huge() and add allocation

Re: [RFC PATCH v2 4/7] mm: make alloc_contig_range work at pageblock granularity

2021-12-12 Thread Eric Ren
Hi, On 2021/12/10 07:04, Zi Yan wrote: From: Zi Yan alloc_contig_range() worked at MAX_ORDER-1 granularity to avoid merging pageblocks with different migratetypes. It might unnecessarily convert extra pageblocks at the beginning and at the end of the range. Change alloc_contig_range() to work

Re: [RFC PATCH v2 3/7] mm: migrate: allocate the right size of non hugetlb or THP compound pages.

2021-12-12 Thread Yang Shi
On Fri, Dec 10, 2021 at 8:08 AM Zi Yan wrote: > > On 10 Dec 2021, at 2:53, Eric Ren wrote: > > > Hi, > > > > On 2021/12/10 07:04, Zi Yan wrote: > >> From: Zi Yan > >> > >> alloc_migration_target() is used by alloc_contig_range() and non-LRU > >> movable compound pages can be migrated. Current cod

Re: [PATCH v4 07/25] reboot: Remove extern annotation from function prototypes

2021-12-12 Thread Rafael J. Wysocki
On Fri, Nov 26, 2021 at 7:02 PM Dmitry Osipenko wrote: > > There is no need to annotate function prototypes with 'extern', it makes > code less readable. Remove unnecessary annotations from . > > Signed-off-by: Dmitry Osipenko I'm not sure that this is really useful. Personally, I tend to respe

Re: [PATCH v4 02/25] notifier: Add blocking_notifier_call_chain_is_empty()

2021-12-12 Thread Rafael J. Wysocki
On Fri, Nov 26, 2021 at 7:01 PM Dmitry Osipenko wrote: > > Add blocking_notifier_call_chain_is_empty() that returns true if call > chain is empty. > > Signed-off-by: Dmitry Osipenko > --- > include/linux/notifier.h | 2 ++ > kernel/notifier.c| 14 ++ > 2 files changed, 16 in

Re: [PATCH v4 07/25] reboot: Remove extern annotation from function prototypes

2021-12-12 Thread Dmitry Osipenko
10.12.2021 21:09, Rafael J. Wysocki пишет: > On Fri, Nov 26, 2021 at 7:02 PM Dmitry Osipenko wrote: >> >> There is no need to annotate function prototypes with 'extern', it makes >> code less readable. Remove unnecessary annotations from . >> >> Signed-off-by: Dmitry Osipenko > > I'm not sure th

Re: [PATCH v4 02/25] notifier: Add blocking_notifier_call_chain_is_empty()

2021-12-12 Thread Dmitry Osipenko
10.12.2021 21:14, Rafael J. Wysocki пишет: > On Fri, Nov 26, 2021 at 7:01 PM Dmitry Osipenko wrote: >> >> Add blocking_notifier_call_chain_is_empty() that returns true if call >> chain is empty. >> >> Signed-off-by: Dmitry Osipenko >> --- >> include/linux/notifier.h | 2 ++ >> kernel/notifier.c

Re: [PATCH v4 03/25] notifier: Add atomic/blocking_notifier_has_unique_priority()

2021-12-12 Thread Rafael J. Wysocki
On Fri, Nov 26, 2021 at 7:02 PM Dmitry Osipenko wrote: > > Add atomic/blocking_notifier_has_unique_priority() helpers which return > true if given handler has unique priority. > > Signed-off-by: Dmitry Osipenko > --- > include/linux/notifier.h | 5 +++ > kernel/notifier.c| 69 ++

Re: [PATCH v4 04/25] reboot: Correct typo in a comment

2021-12-12 Thread Rafael J. Wysocki
On Fri, Nov 26, 2021 at 7:02 PM Dmitry Osipenko wrote: > > Correct s/implemenations/implementations/ in . > > Signed-off-by: Dmitry Osipenko This patch clearly need not be part of this series. > --- > include/linux/reboot.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH v4 05/25] reboot: Warn if restart handler has duplicated priority

2021-12-12 Thread Rafael J. Wysocki
On Mon, Nov 29, 2021 at 12:34 PM Dmitry Osipenko wrote: > > 29.11.2021 03:26, Michał Mirosław пишет: > > On Mon, Nov 29, 2021 at 12:06:19AM +0300, Dmitry Osipenko wrote: > >> 28.11.2021 03:28, Michał Mirosław пишет: > >>> On Fri, Nov 26, 2021 at 09:00:41PM +0300, Dmitry Osipenko wrote: > Add

Re: [PATCH v4 06/25] reboot: Warn if unregister_restart_handler() fails

2021-12-12 Thread Rafael J. Wysocki
On Fri, Nov 26, 2021 at 7:02 PM Dmitry Osipenko wrote: > > Emit warning if unregister_restart_handler() fails since it never should > fail. This will ease further API development by catching mistakes early. > > Signed-off-by: Dmitry Osipenko > --- > kernel/reboot.c | 2 +- > 1 file changed, 1 in

Re: [PATCH v4 07/25] reboot: Remove extern annotation from function prototypes

2021-12-12 Thread Rafael J. Wysocki
On Fri, Dec 10, 2021 at 7:16 PM Dmitry Osipenko wrote: > > 10.12.2021 21:09, Rafael J. Wysocki пишет: > > On Fri, Nov 26, 2021 at 7:02 PM Dmitry Osipenko wrote: > >> > >> There is no need to annotate function prototypes with 'extern', it makes > >> code less readable. Remove unnecessary annotatio

Re: [PATCH v4 03/25] notifier: Add atomic/blocking_notifier_has_unique_priority()

2021-12-12 Thread Dmitry Osipenko
10.12.2021 21:19, Rafael J. Wysocki пишет: ... >> +bool atomic_notifier_has_unique_priority(struct atomic_notifier_head *nh, >> + struct notifier_block *n) >> +{ >> + unsigned long flags; >> + bool ret; >> + >> + spin_lock_irqsave(&nh->lock, flags); >> + ret =

Re: [PATCH v4 06/25] reboot: Warn if unregister_restart_handler() fails

2021-12-12 Thread Dmitry Osipenko
10.12.2021 21:32, Rafael J. Wysocki пишет: > On Fri, Nov 26, 2021 at 7:02 PM Dmitry Osipenko wrote: >> >> Emit warning if unregister_restart_handler() fails since it never should >> fail. This will ease further API development by catching mistakes early. >> >> Signed-off-by: Dmitry Osipenko >> --

Re: [PATCH v4 07/25] reboot: Remove extern annotation from function prototypes

2021-12-12 Thread Dmitry Osipenko
10.12.2021 21:35, Rafael J. Wysocki пишет: > On Fri, Dec 10, 2021 at 7:16 PM Dmitry Osipenko wrote: >> >> 10.12.2021 21:09, Rafael J. Wysocki пишет: >>> On Fri, Nov 26, 2021 at 7:02 PM Dmitry Osipenko wrote: There is no need to annotate function prototypes with 'extern', it makes c

Re: [PATCH v4 05/25] reboot: Warn if restart handler has duplicated priority

2021-12-12 Thread Dmitry Osipenko
10.12.2021 21:27, Rafael J. Wysocki пишет: > On Mon, Nov 29, 2021 at 12:34 PM Dmitry Osipenko wrote: >> >> 29.11.2021 03:26, Michał Mirosław пишет: >>> On Mon, Nov 29, 2021 at 12:06:19AM +0300, Dmitry Osipenko wrote: 28.11.2021 03:28, Michał Mirosław пишет: > On Fri, Nov 26, 2021 at 09:00

Re: [PATCH v4 03/25] notifier: Add atomic/blocking_notifier_has_unique_priority()

2021-12-12 Thread Rafael J. Wysocki
On Fri, Dec 10, 2021 at 7:52 PM Dmitry Osipenko wrote: > > 10.12.2021 21:19, Rafael J. Wysocki пишет: > ... > >> +bool atomic_notifier_has_unique_priority(struct atomic_notifier_head *nh, > >> + struct notifier_block *n) > >> +{ > >> + unsigned long flags; > >> + bool ret

Re: [PATCH v4 06/25] reboot: Warn if unregister_restart_handler() fails

2021-12-12 Thread Rafael J. Wysocki
On Fri, Dec 10, 2021 at 7:54 PM Dmitry Osipenko wrote: > > 10.12.2021 21:32, Rafael J. Wysocki пишет: > > On Fri, Nov 26, 2021 at 7:02 PM Dmitry Osipenko wrote: > >> > >> Emit warning if unregister_restart_handler() fails since it never should > >> fail. This will ease further API development by

Re: [PATCH v4 05/25] reboot: Warn if restart handler has duplicated priority

2021-12-12 Thread Rafael J. Wysocki
On Fri, Dec 10, 2021 at 8:04 PM Dmitry Osipenko wrote: > > 10.12.2021 21:27, Rafael J. Wysocki пишет: > > On Mon, Nov 29, 2021 at 12:34 PM Dmitry Osipenko wrote: > >> > >> 29.11.2021 03:26, Michał Mirosław пишет: > >>> On Mon, Nov 29, 2021 at 12:06:19AM +0300, Dmitry Osipenko wrote: > 28.11.

Re: [PATCH v4 03/25] notifier: Add atomic/blocking_notifier_has_unique_priority()

2021-12-12 Thread Dmitry Osipenko
10.12.2021 22:05, Rafael J. Wysocki пишет: > On Fri, Dec 10, 2021 at 7:52 PM Dmitry Osipenko wrote: >> >> 10.12.2021 21:19, Rafael J. Wysocki пишет: >> ... +bool atomic_notifier_has_unique_priority(struct atomic_notifier_head *nh, + struct notifier_block *n) +{ +

Re: [PATCH v4 06/25] reboot: Warn if unregister_restart_handler() fails

2021-12-12 Thread Dmitry Osipenko
10.12.2021 22:08, Rafael J. Wysocki пишет: > On Fri, Dec 10, 2021 at 7:54 PM Dmitry Osipenko wrote: >> >> 10.12.2021 21:32, Rafael J. Wysocki пишет: >>> On Fri, Nov 26, 2021 at 7:02 PM Dmitry Osipenko wrote: Emit warning if unregister_restart_handler() fails since it never should f

Re: [PATCH v4 05/25] reboot: Warn if restart handler has duplicated priority

2021-12-12 Thread Dmitry Osipenko
10.12.2021 22:14, Rafael J. Wysocki пишет: > On Fri, Dec 10, 2021 at 8:04 PM Dmitry Osipenko wrote: >> >> 10.12.2021 21:27, Rafael J. Wysocki пишет: >>> On Mon, Nov 29, 2021 at 12:34 PM Dmitry Osipenko wrote: 29.11.2021 03:26, Michał Mirosław пишет: > On Mon, Nov 29, 2021 at 12:06:1

Re: [PATCH v4 05/25] reboot: Warn if restart handler has duplicated priority

2021-12-12 Thread Dmitry Osipenko
10.12.2021 22:42, Dmitry Osipenko пишет: ... >>> There is no strong requirement for priorities to be unique, the reboot.c >>> code will work properly. >> >> In which case adding the WARN() is not appropriate IMV. >> >> Also I've looked at the existing code and at least in some cases the >> order in

Re: [PATCH v4 05/25] reboot: Warn if restart handler has duplicated priority

2021-12-12 Thread Dmitry Osipenko
10.12.2021 22:44, Dmitry Osipenko пишет: > 10.12.2021 22:42, Dmitry Osipenko пишет: > ... There is no strong requirement for priorities to be unique, the reboot.c code will work properly. >>> >>> In which case adding the WARN() is not appropriate IMV. >>> >>> Also I've looked at the exist

Re: [PATCH v4 03/25] notifier: Add atomic/blocking_notifier_has_unique_priority()

2021-12-12 Thread Dmitry Osipenko
10.12.2021 22:33, Dmitry Osipenko пишет: >> Not really, they only prevent the race from occurring while >> notifier_has_unique_priority() is running. >> >> If anyone depends on this check for correctness, they need to lock the >> rwsem, do the check, do the thing depending on the check while holdin

Re: [PATCH v2 2/6] powerpc/kexec_file: Add KEXEC_SIG support.

2021-12-12 Thread Nayna
On 11/25/21 13:02, Michal Suchanek wrote: Copy the code from s390x Signed-off-by: Michal Suchanek --- arch/powerpc/Kconfig| 11 +++ arch/powerpc/kexec/elf_64.c | 36 2 files changed, 47 insertions(+) diff --git a/arch/powerpc/Kconfig b/a

[PATCH] powerpc: mpc52xx_gpt: fix a potential memory leak

2021-12-12 Thread xkernel
When some internal memory errors happend in of_iomap(), we should free gpt to prevent memory leak. Signed-off-by: xkernel --- arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c b/arch/powerpc

Re: [PATCH 3/7] Documentation, arch: Remove leftovers from CIFS_WEAK_PW_HASH

2021-12-12 Thread Steve French
You can add my RB is you would like to this. Also note an additional typo in the existing config description "laintext" instead of "plaintext" On Fri, Nov 5, 2021 at 11:11 AM Alexandre Ghiti wrote: > > This config was removed so remove all references to it. > > Fixes: 76a3c92ec9e0 ("cifs: remove

[PATCH v5 00/21] Introduce power-off+restart call chain API

2021-12-12 Thread Dmitry Osipenko
Problem --- SoC devices require power-off call chaining functionality from kernel. We have a widely used restart chaining provided by restart notifier API, but nothing for power-off. Solution Introduce new API that provides both restart and power-off call chains. Why combine restar

[PATCH v5 01/21] notifier: Add blocking_notifier_call_chain_is_empty()

2021-12-12 Thread Dmitry Osipenko
Add blocking_notifier_call_chain_is_empty() that returns true if call chain is empty. Signed-off-by: Dmitry Osipenko --- include/linux/notifier.h | 2 ++ kernel/notifier.c| 13 + 2 files changed, 15 insertions(+) diff --git a/include/linux/notifier.h b/include/linux/notifie

[PATCH v5 02/21] notifier: Add atomic/blocking_notifier_chain_register_unique_prio()

2021-12-12 Thread Dmitry Osipenko
Add variant of atomic/blocking_notifier_chain_register() functions that doesn't allow to register notifier using a duplicated priority. The -EBUSY error code is returned in this case by the new API functions. Signed-off-by: Dmitry Osipenko --- include/linux/notifier.h | 5 +++ kernel/notifier.c

[PATCH v5 03/21] reboot: Print error message if restart handler has duplicated priority

2021-12-12 Thread Dmitry Osipenko
Add sanity check which ensures that there are no two restart handlers registered using the same priority. This requirement will become mandatory once all drivers will be converted to the new API and such errors will be fixed. Signed-off-by: Dmitry Osipenko --- kernel/reboot.c | 15 ++

[PATCH v5 04/21] kernel: Add combined power-off+restart handler call chain API

2021-12-12 Thread Dmitry Osipenko
SoC platforms often have multiple ways of how to perform system's power-off and restart operations. Meanwhile today's kernel is limited to a single option. Add combined power-off+restart handler call chain API, which is inspired by the restart API. The new API provides both power-off and restart fu

[PATCH v5 05/21] ARM: Use do_kernel_power_off()

2021-12-12 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new power-off API. Reviewed-by: Russell King (Oracle) Signed-off-by: Dm

[PATCH v5 06/21] csky: Use do_kernel_power_off()

2021-12-12 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new power-off API. Acked-by: Guo Ren Signed-off-by: Dmitry Osipenko --

[PATCH v5 07/21] riscv: Use do_kernel_power_off()

2021-12-12 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new power-off API. Acked-by: Palmer Dabbelt Signed-off-by: Dmitry Osipe

[PATCH v5 08/21] arm64: Use do_kernel_power_off()

2021-12-12 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new power-off API. Acked-by: Catalin Marinas Signed-off-by: Dmitry Osip

[PATCH v5 09/21] parisc: Use do_kernel_power_off()

2021-12-12 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new power-off API. Acked-by: Helge Deller # parisc Signed-off-by: Dmitr

[PATCH v5 10/21] xen/x86: Use do_kernel_power_off()

2021-12-12 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new power-off API. Acked-by: Juergen Gross Signed-off-by: Dmitry Osipen

[PATCH v5 11/21] powerpc: Use do_kernel_power_off()

2021-12-12 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new power-off API. Acked-by: Michael Ellerman Signed-off-by: Dmitry Osi

[PATCH v5 12/21] m68k: Switch to new sys-off handler API

2021-12-12 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use register_power_off_handler() that registers power-off handlers and do_kernel_power_off() that invokes chained power-off handlers. Legacy pm_power_off() will be removed once all drivers will be converted to the new power-off API. Normally arch cod

[PATCH v5 13/21] sh: Use do_kernel_power_off()

2021-12-12 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new power-off API. Signed-off-by: Dmitry Osipenko --- arch/sh/kernel/r

[PATCH v5 14/21] x86: Use do_kernel_power_off()

2021-12-12 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new power-off API. Signed-off-by: Dmitry Osipenko --- arch/x86/kernel/

[PATCH v5 15/21] ia64: Use do_kernel_power_off()

2021-12-12 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new power-off API. Signed-off-by: Dmitry Osipenko --- arch/ia64/kernel

[PATCH v5 16/21] mips: Use do_kernel_power_off()

2021-12-12 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new power-off API. Signed-off-by: Dmitry Osipenko --- arch/mips/kernel

[PATCH v5 17/21] nds32: Use do_kernel_power_off()

2021-12-12 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new power-off API. Signed-off-by: Dmitry Osipenko --- arch/nds32/kerne

[PATCH v5 18/21] memory: emif: Use kernel_can_power_off()

2021-12-12 Thread Dmitry Osipenko
Replace legacy pm_power_off with kernel_can_power_off() helper that is aware about chained power-off handlers. Signed-off-by: Dmitry Osipenko --- drivers/memory/emif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c index 762d0c0f

[PATCH v5 19/21] ACPI: power: Switch to sys-off handler API

2021-12-12 Thread Dmitry Osipenko
Switch to sys-off API that replaces legacy pm_power_off callbacks. Signed-off-by: Dmitry Osipenko --- drivers/acpi/sleep.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index eaa47753b758..2e613fddd614

[PATCH v5 20/21] regulator: pfuze100: Use devm_register_sys_off_handler()

2021-12-12 Thread Dmitry Osipenko
Use devm_register_sys_off_handler() that replaces global pm_power_off_prepare variable and allows to register multiple power-off handlers. Acked-by: Mark Brown Signed-off-by: Dmitry Osipenko --- drivers/regulator/pfuze100-regulator.c | 38 ++ 1 file changed, 14 insertion

[PATCH v5 21/21] reboot: Remove pm_power_off_prepare()

2021-12-12 Thread Dmitry Osipenko
All pm_power_off_prepare() users were converted to sys-off handler API. Remove the obsolete callback. Signed-off-by: Dmitry Osipenko --- include/linux/pm.h | 1 - kernel/reboot.c| 11 --- 2 files changed, 12 deletions(-) diff --git a/include/linux/pm.h b/include/linux/pm.h index 1d

Re: [PATCH v2 2/6] powerpc/kexec_file: Add KEXEC_SIG support.

2021-12-12 Thread Nayna
On 11/25/21 13:02, Michal Suchanek wrote: Copy the code from s390x Signed-off-by: Michal Suchanek --- arch/powerpc/Kconfig| 11 +++ arch/powerpc/kexec/elf_64.c | 36 2 files changed, 47 insertions(+) diff --git a/arch/powerpc/Kconfig b

Re: [PATCH] powerpc: mpc52xx_gpt: fix a potential memory leak

2021-12-12 Thread Michael Ellerman
xkernel writes: > When some internal memory errors happend in of_iomap(), we should free > gpt to prevent memory leak. But it's allocated with devm_kzalloc(), so the devres core is meant to free it for us isn't it? cheers > diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c > b/arch/powerp

Re: [PATCH] powerpc: mpc52xx_gpt: fix a potential memory leak

2021-12-12 Thread xkernel.w...@foxmail.com
Michael Ellerman wrote: > > When some internal memory errors happend in of_iomap(), we should free > > gpt to prevent memory leak. > > But it's allocated with devm_kzalloc(), so the devres core is meant to > free it for us isn't it? Yes, maybe you are right. I did that as I mentioned when gpt-reg

Re: [PATCH] powerpc: Add set_memory_{p/np}() and remove set_memory_attr()

2021-12-12 Thread Russell Currey
On Fri, 2021-12-10 at 08:09 +, Christophe Leroy wrote: > set_memory_attr() was implemented by commit 4d1755b6a762 > ("powerpc/mm: > implement set_memory_attr()") because the set_memory_xx() couldn't > be used at that time to modify memory "on the fly" as explained it > the commit. > > But set_

Re: [patch V3 29/35] dmaengine: mv_xor_v2: Get rid of msi_desc abuse

2021-12-12 Thread Vinod Koul
On 10-12-21, 23:19, Thomas Gleixner wrote: > From: Thomas Gleixner > > Storing a pointer to the MSI descriptor just to keep track of the Linux > interrupt number is daft. Use msi_get_virq() instead. Acked-By: Vinod Koul -- ~Vinod

Re: [patch V3 35/35] dmaengine: qcom_hidma: Cleanup MSI handling

2021-12-12 Thread Vinod Koul
On 10-12-21, 23:19, Thomas Gleixner wrote: > From: Thomas Gleixner > > There is no reason to walk the MSI descriptors to retrieve the interrupt > number for a device. Use msi_get_virq() instead. Acked-By: Vinod Koul -- ~Vinod

Re: [patch V3 34/35] soc: ti: ti_sci_inta_msi: Get rid of ti_sci_inta_msi_get_virq()

2021-12-12 Thread Vinod Koul
On 10-12-21, 23:19, Thomas Gleixner wrote: > From: Thomas Gleixner > > Just use the core function msi_get_virq(). Acked-By: Vinod Koul -- ~Vinod

Re: [PATCH v2 1/2] powerpc/code-patching: add patch_memory() for writing RO text

2021-12-12 Thread Russell Currey
On Sun, 2021-12-12 at 09:08 +, Christophe Leroy wrote: > Le 12/12/2021 à 02:03, Russell Currey a écrit : > > +static int do_patch_memory(void *dest, const void *src, size_t > > size, unsigned long poke_addr) > > +{ > > +   unsigned long patch_addr = poke_addr + > > offset_in_page(dest); > >

Re: [PATCH v2 2/2] powerpc/module_64: Use patch_memory() to apply relocations to loaded modules

2021-12-12 Thread Russell Currey
On Sun, 2021-12-12 at 10:41 +, Christophe Leroy wrote: > > > Le 12/12/2021 à 02:03, Russell Currey a écrit : > > Livepatching a loaded module involves applying relocations through > > apply_relocate_add(), which attempts to write to read-only memory > > when > > CONFIG_STRICT_MODULE_RWX=y.  W

Re: ppc64le STRICT_MODULE_RWX and livepatch apply_relocate_add() crashes

2021-12-12 Thread Christophe Leroy
Le 01/11/2021 à 14:48, Joe Lawrence a écrit : > On 11/1/21 5:20 AM, Russell Currey wrote: >> I'm looking into this now, will update when there's progress. I >> personally wasn't aware but Jordan flagged this as an issue back in >> August [0]. Are the selftests in the klp-convert tree sufficient