From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6423C433E0 for ; Sat, 23 Jan 2021 13:45:51 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 992FB22AAD for ; Sat, 23 Jan 2021 13:45:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 992FB22AAD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wp39X0/XEnM/oEqGz9Pt39ALzMadSmiVAzloVEoksco=; b=002RBh/CyZLQITG1J7Rwo3gEi bTddiu40b0j0f3oWxTd/nlzvVe/lD7cWpB59T0M/mZy1uk93kYZYt6QERwLoCyJHdGUJf26thbDuL d+ts4n0kUt7gLzQMtFH7i7f/kbNUGn8qourJt1RARnKBKPT+gQfZVd6GJ4XUI88zkTpqG6r/LeJQI oXdGSRs6f47E5ZX4saTkdJnMUCGcNnoBx/XhZNirPBc2+matNRjBDkMry3QZGX+49+e11iRsng+5R ryr/QfGs6bOtD8VV9aNMHOqq5EWbB1B+i6mNIFm8LrlmOfjXwSDyODzw4XVUs8H4YjWrFaewcQzwO ntH+Ln6hQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l3JCt-0004Kx-Ur; Sat, 23 Jan 2021 13:44:03 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l3JCq-0004Ke-Tu for linux-arm-kernel@lists.infradead.org; Sat, 23 Jan 2021 13:44:01 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id C232C22AAD; Sat, 23 Jan 2021 13:43:55 +0000 (UTC) Date: Sat, 23 Jan 2021 13:43:52 +0000 From: Catalin Marinas To: Marc Zyngier Subject: Re: [PATCH v4 12/21] arm64: cpufeature: Add an early command-line cpufeature override facility Message-ID: References: <20210118094533.2874082-1-maz@kernel.org> <20210118094533.2874082-13-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210118094533.2874082-13-maz@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210123_084401_046271_CDA11F96 X-CRM114-Status: GOOD ( 10.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Jing Zhang , Prasad Sodagudi , Srinivas Ramana , Suzuki K Poulose , Alexandru Elisei , linux-kernel@vger.kernel.org, Ard Biesheuvel , James Morse , Julien Thierry , Ajay Patil , kernel-team@android.com, David Brazdil , Will Deacon , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jan 18, 2021 at 09:45:24AM +0000, Marc Zyngier wrote: > +struct reg_desc { > + const char * const name; > + u64 * const val; > + u64 * const mask; > + struct { > + const char * const name; > + u8 shift; > + } fields[]; > +}; Sorry, I didn't see this earlier. Do we need to add all these consts here? So you want the pointers to be const but why is 'shift' special and not a const then? Is it modified later? Would this not work: struct reg_desc { const char *name; u64 *val; u64 *mask; struct { const char *name; u8 shift; } fields[]; }; > +static const struct reg_desc * const regs[] __initdata = { as we already declare the whole struct reg_desc pointers here as const. I may have confused myself... -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel