Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751065Ab3EBHeK (ORCPT ); Thu, 2 May 2013 03:34:10 -0400 Received: from mail-ee0-f53.google.com ([74.125.83.53]:57954 "EHLO mail-ee0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750769Ab3EBHeF (ORCPT ); Thu, 2 May 2013 03:34:05 -0400 Date: Thu, 2 May 2013 09:34:00 +0200 From: Ingo Molnar To: Robin Holt Cc: Andrew Morton , "H. Peter Anvin" , Russell King , Guan Xuetao , Miguel Boton , Russ Anderson , Linux Kernel Mailing List , the arch/x86 maintainers , Arm Mailing List Subject: Re: [PATCH -v7 11/11] Move arch/x86 reboot= handling to generic kernel. Message-ID: <20130502073400.GD26361@gmail.com> References: <1367428011-17123-1-git-send-email-holt@sgi.com> <1367428011-17123-12-git-send-email-holt@sgi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1367428011-17123-12-git-send-email-holt@sgi.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1416 Lines: 54 * Robin Holt wrote: > Merge together the unicore32, arm, and x86 reboot= command line > parameter handling. Nice! > + switch (*str) { > +#if defined(CONFIG_X86) || defined(CONFIG_X86_64) > + case 'w': > + reboot_mode = REBOOT_WARM; > + break; > + > + case 'c': > + reboot_mode = REBOOT_COLD; > + break; > + > +#ifdef CONFIG_SMP > + case 's': > + if (isdigit(*(str+1))) { > + reboot_cpu = (int) (*(str+1) - '0'); > + if (isdigit(*(str+2))) > + reboot_cpu = reboot_cpu*10 + (int)(*(str+2) - '0'); > + } > + /* > + * We will leave sorting out the final value > + * when we are ready to reboot, since we might not > + * have detected BSP APIC ID or smp_num_cpu > + */ > + break; > +#endif /* CONFIG_SMP */ > + > +#else > + case 's': > + reboot_mode = REBOOT_WARM; > + case 'h': > + reboot_mode = REBOOT_COLD; > +#endif This architecture dependent bit is not so nice. I doubt the 's' parameter is used widely at all on x86 [it's more like a debug/hack parameter], so might as well just pick up a new character (for example capital 'S'?) and have the same parameters on every architecture. Thanks, Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/