Re: + kernel-locking-lockdepc-make-lockdep-initialize-itself-on-demand.patch added to -mm tree

From: Michael Ellerman
Date: Mon Feb 08 2016 - 04:34:11 EST


On Thu, 2016-02-04 at 16:13 +0300, Andrey Ryabinin wrote:
> On 02/04/2016 12:44 AM, Andrew Morton wrote:
> > Probably lockdep_init() and lockdep_initialized can be done away with now.
>
> Yup, it probably should be folded into your patch, or we could hold this off for 4.6.
>
> From: Andrey Ryabinin <aryabinin@xxxxxxxxxxxxx>
>
> Subject: kernel/lockdep: eliminate lockdep_init()
>
> Lockdep is initialized at compile time now. Get rid of lockdep_init().
>
> Signed-off-by: Andrey Ryabinin <aryabinin@xxxxxxxxxxxxx>

> diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
> index ad8c9db..d544fa3 100644
> --- a/arch/powerpc/kernel/setup_32.c
> +++ b/arch/powerpc/kernel/setup_32.c
> @@ -114,8 +114,6 @@ extern unsigned int memset_nocache_branch; /* Insn to be replaced by NOP */
>
> notrace void __init machine_init(u64 dt_ptr)
> {
> - lockdep_init();
> -
> /* Enable early debugging if any specified (see udbg.h) */
> udbg_early_init();
>
> diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
> index 5c03a6a..f98be83 100644
> --- a/arch/powerpc/kernel/setup_64.c
> +++ b/arch/powerpc/kernel/setup_64.c
> @@ -255,9 +255,6 @@ void __init early_setup(unsigned long dt_ptr)
> setup_paca(&boot_paca);
> fixup_boot_paca();
>
> - /* Initialize lockdep early or else spinlocks will blow */
> - lockdep_init();
> -
> /* -------- printk is now safe to use ------- */
>
> /* Enable early debugging if any specified (see udbg.h) */

Yes please. That has been a royal pain over the years and is still fragile,
very happy to see the back of it.

Acked-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx> (powerpc)

cheers