From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758066AbcATUeI (ORCPT ); Wed, 20 Jan 2016 15:34:08 -0500 Received: from mail-yk0-f172.google.com ([209.85.160.172]:36844 "EHLO mail-yk0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751985AbcATUeG (ORCPT ); Wed, 20 Jan 2016 15:34:06 -0500 MIME-Version: 1.0 In-Reply-To: <20160120201718.GC4769@char.us.oracle.com> References: <1450217797-19295-1-git-send-email-mcgrof@do-not-panic.com> <1450217797-19295-4-git-send-email-mcgrof@do-not-panic.com> <20160120201718.GC4769@char.us.oracle.com> From: "Luis R. Rodriguez" Date: Wed, 20 Jan 2016 12:33:46 -0800 X-Google-Sender-Auth: Ue9CDhKf_LlR0JzWlMNYXON1dbk Message-ID: Subject: Re: [RFC v1 3/8] x86/boot: add BIT() to boot/bitops.h To: Konrad Rzeszutek Wilk Cc: "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Rusty Russell , Andy Lutomirski , Boris Ostrovsky , mcb30@ipxe.org, Juergen Gross , Jan Beulich , joro@8bytes.org, Andrey Ryabinin , andreyknvl@google.com, long.wanglong@huawei.com, qiuxishi@huawei.com, aryabinin@virtuozzo.com, Mauro Carvalho Chehab , Valentin Rothberg , Peter Senna Tschudin , X86 ML , "xen-devel@lists.xensource.com" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 20, 2016 at 12:17 PM, Konrad Rzeszutek Wilk wrote: > Where? Could you paste in the name of the patch in the description? +x86_init_early(BIT(X86_SUBARCH_INTEL_MID), NULL, NULL, + x86_intel_mid_early_setup); Is an example, so users of the subarch. Likewise the macro helpers to make these smaller, see x86_init_early_all() on the patch "x86/init: add linker table support". And then of course the checkers: +static bool x86_init_fn_supports_subarch(struct x86_init_fn *fn) +{ + if (!fn->supp_hardware_subarch) { + pr_err("Init sequence fails to declares any supported subarchs: %pF\n", fn->early_init); + WARN_ON(1); + } + if (BIT(boot_params.hdr.hardware_subarch) & fn->supp_hardware_subarch) + return true; + return false; +} Luis