linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Bharata B Rao <bharata@linux.vnet.ibm.com>,
	linuxppc-dev@lists.ozlabs.org
Cc: nfont@linux.vnet.ibm.com, aneesh.kumar@linux.vnet.ibm.com,
	david@gibson.dropbear.id.au, anton@samba.org,
	Bharata B Rao <bharata@linux.vnet.ibm.com>
Subject: Re: [RFC FIX v1 1/2] powerpc: Discover radix availability before scanning the memory nodes
Date: Sat, 06 Jan 2018 10:28:00 +1100	[thread overview]
Message-ID: <87shbj3myn.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <1515150321-24894-2-git-send-email-bharata@linux.vnet.ibm.com>

Bharata B Rao <bharata@linux.vnet.ibm.com> writes:

> Currently device tree nodes for memory are scanned before the
> radix feature is discovered in mmu_early_init_devtree(). Move this
> routine ahead of scanning memory nodes so that we know if the
> guest is radix or not when scanning ibm,dynamic-reconfiguration-memory.

Sorry this doesn't work.

> diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
> index b15bae2..079d893 100644
> --- a/arch/powerpc/kernel/prom.c
> +++ b/arch/powerpc/kernel/prom.c
> @@ -722,6 +722,8 @@ void __init early_init_devtree(void *params)
>  	 */
>  	of_scan_flat_dt(early_init_dt_scan_chosen_ppc, boot_command_line);
>  
> +	mmu_early_init_devtree();
> +

You've moved this above parse_early_param(), but
mmu_early_init_devtree() uses disable_radix, which is an early param. So
this will break disable_radix handling.

It will probably break other things too because the ordering of this
init code is very fragile - bootstrapping is hard :)

>  	/* Scan memory nodes and rebuild MEMBLOCKs */
>  	of_scan_flat_dt(early_init_dt_scan_root, NULL);
>  	of_scan_flat_dt(early_init_dt_scan_memory_ppc, NULL);
> @@ -783,8 +785,6 @@ void __init early_init_devtree(void *params)
>  	spinning_secondaries = boot_cpu_count - 1;
>  #endif
>  
> -	mmu_early_init_devtree();
> -
>  #ifdef CONFIG_PPC_POWERNV
>  	/* Scan and build the list of machine check recoverable ranges */
>  	of_scan_flat_dt(early_init_dt_scan_recoverable_ranges, NULL);

cheers

  parent reply	other threads:[~2018-01-05 23:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-05 11:05 [RFC FIX v1 0/2] powerpc: Fix memory unplug failure for radix guests Bharata B Rao
2018-01-05 11:05 ` [RFC FIX v1 1/2] powerpc: Discover radix availability before scanning the memory nodes Bharata B Rao
2018-01-05 11:16   ` Aneesh Kumar K.V
2018-01-05 23:28   ` Michael Ellerman [this message]
2018-01-08  9:16     ` Bharata B Rao
2018-01-05 11:05 ` [RFC FIX v1 2/2] powerpc: Fix memory unplug failure on radix guest Bharata B Rao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87shbj3myn.fsf@concordia.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=anton@samba.org \
    --cc=bharata@linux.vnet.ibm.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=nfont@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).