From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Date: Sun, 23 Dec 2012 11:06:02 +0000 From: Will Deacon Subject: Re: [PATCH] kexec: disable non-boot CPUs Message-ID: <20121223110602.GA16237@mudshark.cambridge.arm.com> References: <1355960681-32015-1-git-send-email-swarren@wwwdotorg.org> <20121220104945.GC16887@mudshark.cambridge.arm.com> <50D34934.9070106@wwwdotorg.org> <20121220173611.GC5387@mudshark.cambridge.arm.com> <50D35214.4090008@wwwdotorg.org> <50D371E2.1030807@wwwdotorg.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <50D371E2.1030807@wwwdotorg.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: kexec-bounces@lists.infradead.org Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: Stephen Warren Cc: Stephen Warren , Peter De Schrijver , "kexec@lists.infradead.org" , Eric Biederman , Joseph Lo , "linux-tegra@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" On Thu, Dec 20, 2012 at 08:15:30PM +0000, Stephen Warren wrote: > On 12/20/2012 10:59 AM, Stephen Warren wrote: > > On 12/20/2012 10:36 AM, Will Deacon wrote: > >> I think you're better off using what we currently have and hanging your code > >> off platform_cpu_kill. > > > > OK, I'll look into that. Joseph Lo just posted patches to implement > > cpu_kill() on Tegra, which was needed to fix some issues in our hotplug > > code anyway. Perhaps that will remove the need for any other changes... > > Will, Hi Stephen, > I just remembered one other advantage of disable_nonboot_cpus(); it > always makes the kexec happen on the boot CPU. Without this, I believe > it's random whether CPU0 or CPU1 performs the kexec. I suspect it's most > likely to work if we can always kexec on the boot CPU rather than a > random CPU? It will be the same CPU as the one which made the kexec system call. If you need to invoke this from a specific CPU, you currently have to do this in userspace using something like the `taskset' utility. Linux can actually boot on any physical CPU for ARM now (thanks to the logical map) but most platforms have restrictions related to secure firmware. Will _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec From mboxrd@z Thu Jan 1 00:00:00 1970 From: Will Deacon Subject: Re: [PATCH] kexec: disable non-boot CPUs Date: Sun, 23 Dec 2012 11:06:02 +0000 Message-ID: <20121223110602.GA16237@mudshark.cambridge.arm.com> References: <1355960681-32015-1-git-send-email-swarren@wwwdotorg.org> <20121220104945.GC16887@mudshark.cambridge.arm.com> <50D34934.9070106@wwwdotorg.org> <20121220173611.GC5387@mudshark.cambridge.arm.com> <50D35214.4090008@wwwdotorg.org> <50D371E2.1030807@wwwdotorg.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <50D371E2.1030807-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> Sender: linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Stephen Warren Cc: Joseph Lo , Peter De Schrijver , "linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Stephen Warren , "kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" , Eric Biederman , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" List-Id: linux-tegra@vger.kernel.org On Thu, Dec 20, 2012 at 08:15:30PM +0000, Stephen Warren wrote: > On 12/20/2012 10:59 AM, Stephen Warren wrote: > > On 12/20/2012 10:36 AM, Will Deacon wrote: > >> I think you're better off using what we currently have and hanging your code > >> off platform_cpu_kill. > > > > OK, I'll look into that. Joseph Lo just posted patches to implement > > cpu_kill() on Tegra, which was needed to fix some issues in our hotplug > > code anyway. Perhaps that will remove the need for any other changes... > > Will, Hi Stephen, > I just remembered one other advantage of disable_nonboot_cpus(); it > always makes the kexec happen on the boot CPU. Without this, I believe > it's random whether CPU0 or CPU1 performs the kexec. I suspect it's most > likely to work if we can always kexec on the boot CPU rather than a > random CPU? It will be the same CPU as the one which made the kexec system call. If you need to invoke this from a specific CPU, you currently have to do this in userspace using something like the `taskset' utility. Linux can actually boot on any physical CPU for ARM now (thanks to the logical map) but most platforms have restrictions related to secure firmware. Will From mboxrd@z Thu Jan 1 00:00:00 1970 From: will.deacon@arm.com (Will Deacon) Date: Sun, 23 Dec 2012 11:06:02 +0000 Subject: [PATCH] kexec: disable non-boot CPUs In-Reply-To: <50D371E2.1030807@wwwdotorg.org> References: <1355960681-32015-1-git-send-email-swarren@wwwdotorg.org> <20121220104945.GC16887@mudshark.cambridge.arm.com> <50D34934.9070106@wwwdotorg.org> <20121220173611.GC5387@mudshark.cambridge.arm.com> <50D35214.4090008@wwwdotorg.org> <50D371E2.1030807@wwwdotorg.org> Message-ID: <20121223110602.GA16237@mudshark.cambridge.arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thu, Dec 20, 2012 at 08:15:30PM +0000, Stephen Warren wrote: > On 12/20/2012 10:59 AM, Stephen Warren wrote: > > On 12/20/2012 10:36 AM, Will Deacon wrote: > >> I think you're better off using what we currently have and hanging your code > >> off platform_cpu_kill. > > > > OK, I'll look into that. Joseph Lo just posted patches to implement > > cpu_kill() on Tegra, which was needed to fix some issues in our hotplug > > code anyway. Perhaps that will remove the need for any other changes... > > Will, Hi Stephen, > I just remembered one other advantage of disable_nonboot_cpus(); it > always makes the kexec happen on the boot CPU. Without this, I believe > it's random whether CPU0 or CPU1 performs the kexec. I suspect it's most > likely to work if we can always kexec on the boot CPU rather than a > random CPU? It will be the same CPU as the one which made the kexec system call. If you need to invoke this from a specific CPU, you currently have to do this in userspace using something like the `taskset' utility. Linux can actually boot on any physical CPU for ARM now (thanks to the logical map) but most platforms have restrictions related to secure firmware. Will