Re: [PATCH 2/7] powerpc/85xx: add HOTPLUG_CPU support
From: Scott Wood <hidden>
Date: 2011-11-09 16:12:44
On Wed, Nov 09, 2011 at 02:31:23AM -0600, Li Yang-R58472 wrote:
quoted
-----Original Message----- From: Wood Scott-B07421 Sent: Wednesday, November 09, 2011 4:58 AM To: Li Yang-R58472 Cc: Wood Scott-B07421; Zhao Chenhui-B35336; linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH 2/7] powerpc/85xx: add HOTPLUG_CPU support On 11/08/2011 04:05 AM, Li Yang-R58472 wrote:quoted
quoted
Subject: Re: [PATCH 2/7] powerpc/85xx: add HOTPLUG_CPU supportquoted
+ flush_disable_L1();You'll also need to take down L2 on e500mc.Right. E500mc support is beyond this patch series. We will work on itafter the e500v2 support is finalized. I saw some support with "is_corenet"... If we don't support e500mc, make sure the code doesn't try to run on e500mc.The is_corenet code is just a start of the e500mc support and is far from complete.quoted
This isn't an e500v2-only BSP you're putting the code into. :-)Yes, I know. But it will take quite some time to perfect the support for different type of cores.
That's fine, I'm just asking for it to be clearer that e500mc/corenet is TODO, and ideally for the code to reject hotplug if is_corenet is set, until it's supported.
quoted
quoted
quoted
quoted
+static int __cpuinit smp_85xx_map_bootpg(u32 page) { + __iomem u32 *bootpg_ptr; + u32 bptr; + + /* Get the BPTR */ + bootpg_ptr = ioremap(get_immrbase() + MPC85xx_BPTR_OFF, 4); + + /* Set the BPTR to the secondary boot page */ + bptr = MPC85xx_BPTR_EN | (page & MPC85xx_BPTR_BOOT_PAGE_MASK); + out_be32(bootpg_ptr, bptr); + + iounmap(bootpg_ptr); + return 0; +}Shouldn't the boot page already be set by U-Boot?The register should be lost after a deep sleep. Better to do it again.How can it be lost after a deep sleep if we're relying on it to hold our wakeup code?In order to wake up from deep sleep, the boot page has been set to the deep sleep restoration function. We need to set it back to the bootpage from u-boot.
Ah. That deserves a code comment.
quoted
It's not "better to do it again" if we're making a bad assumption about the code and the table being in the same page.Currently we are reusing the whole boot page including the spin-table from u-boot. Are you suggesting to move just the boot page to kernel?
Just that it might be better to make sure that we put the same value in BPTR that was in it when Linux booted, rather than assume that the page that holds the spin table itself is the right one. -Scott