From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Message-ID: <1467909754.8880.56.camel@infradead.org> Subject: Re: [PATCH v21 3/8] arm64: kdump: implement machine_crash_shutdown() From: Geoff Levand Date: Thu, 07 Jul 2016 09:42:34 -0700 In-Reply-To: <20160707004330.GU20774@linaro.org> References: <20160706075226.27609-1-takahiro.akashi@linaro.org> <20160706075226.27609-4-takahiro.akashi@linaro.org> <1467826137.8880.35.camel@infradead.org> <20160707004330.GU20774@linaro.org> Mime-Version: 1.0 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" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: AKASHI Takahiro Cc: catalin.marinas@arm.com, will.deacon@arm.com, james.morse@arm.com, linux-arm-kernel@lists.infradead.org, kexec@lists.infradead.org Hi, On Thu, 2016-07-07 at 09:43 +0900, AKASHI Takahiro wrote: > On Wed, Jul 06, 2016 at 10:28:57AM -0700, Geoff Levand wrote: > > On Wed, 2016-07-06 at 16:52 +0900, AKASHI Takahiro wrote: > > > @@ -830,6 +855,14 @@ void handle_IPI(int ipinr, struct pt_regs > > > *regs) > > > > > > > > > > > > > > > > > > irq_exit(); > > > > > > > > > > > > > > > > > > break; > > > > > > +#ifdef CONFIG_KEXEC_CORE > > > +> > > > > > > > case IPI_CPU_CRASH_STOP: > > > +> > > > > > > > > > > > > > > irq_enter(); > > > +> > > > > > > > > > > > > > > ipi_cpu_crash_stop(cpu, regs); > > > + > > > +> > > > > > > > > > > > > > > unreachable(); > > > +#endif > > > > It seems like you could simplifiy with something like: > > > > > > case IPI_CPU_CRASH_STOP: > > > > > > if (IS_ENABLED(CONFIG_KEXEC_CORE) { > > > > > > > > irq_enter(); > > > > > > > > ipi_cpu_crash_stop(cpu, regs); > > > > > > > > unreachable(); > > > > > > } > > OK, I will take this. > > > Then move the CONFIG_KEXEC_CORE conditional around > > ipi_cpu_crash_stop to just around crash_save_cpu(). > > Yeah, we can do that, but I added these conditionals just because > the kernel size can be reduced (a bit, obviously) if kexec is > not needed. The linker will remove the unused ipi_cpu_crash_stop since it is static. atomic_t waiting_for_crash_ipi also becomes unused, and I think it will be removed also. The motivation for these changes is to get a build test of this code even when CONFIG_KEXEC_CORE=n. -Geoff _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec