Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1086946imu; Mon, 5 Nov 2018 13:39:09 -0800 (PST) X-Google-Smtp-Source: AJdET5fAbqh0GUsV/we7+YbcahBLVm/LNXi6crJS6pCeEWJbJJDmP5gw9E9vYCdFT5ZWQ672X5fP X-Received: by 2002:a62:2782:: with SMTP id n124-v6mr23867745pfn.216.1541453949138; Mon, 05 Nov 2018 13:39:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541453949; cv=none; d=google.com; s=arc-20160816; b=VyZYFgvvbVJLedvbty/QTfw76yjqXKr/me8SgAnXSnmSi9ZK23ryO9g3wnPIF1Ftu6 f/tM4iSA85wBg0bwnHwDlBAw3pNeWFRLvncMfXz//jH/L2BMJfxDJPDV5dL2CpOljeiA KI2R+aR5yuYoNFeMx0667Di+tK7HOq2DQsxpLGJzcversd2MScTdngeQjGUMYqX2DSO8 1cAH3uiRIoLv2OkAoLrPdxipbOOnXU6TuVw08C0S5uyyZ0jUTsL7MdbdsHD+GGoAGYvE ONUcn3wpZiuEx+7JBgbKHab/kIYnz6N3LeBJX8cv/nOSGawGw0EhQPu2+rfYoMS6cuMA oYGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=HEvYyATV4BIO5vyNUvjREBOq1TMYhldERyl+U5PDLNI=; b=NWMmPOUxliF9dQpcJf3ACo2dxxO3/SXATl1hEoyBKJXQjLipdCy9okdOLQI1eLYyK1 OHIsZER3A9xz70+AK+dlGAc/UxZ7SQ3ThNYVLRvSdXE63nW5Hd2fBepYV81loz4NpVNi y7/JHigVp5BMCE3RFdGpe9B6H4pdwBlUBJNj43DJIuY+45/7cuhnjCvkQizeFc0Gs8gE 0ZKNUWv8OjvGK8TV8/n/YntLtLFdHoACbSH14t3d7uhXfCkilu3WnKjBdCm3ULuU50/v fRbo2SG8l67uWeEOIcfONLrNEa2ivHUQIvm0kUjcRTfoC3By+LnHfZG1QPc0h2nzqSxQ MjSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e63si23464679pgc.239.2018.11.05.13.38.53; Mon, 05 Nov 2018 13:39:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387775AbeKFHAO (ORCPT + 99 others); Tue, 6 Nov 2018 02:00:14 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:36105 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387441AbeKFHAO (ORCPT ); Tue, 6 Nov 2018 02:00:14 -0500 Received: from p5492fe24.dip0.t-ipconnect.de ([84.146.254.36] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1gJmZm-0005vk-FD; Mon, 05 Nov 2018 22:38:26 +0100 Date: Mon, 5 Nov 2018 22:38:25 +0100 (CET) From: Thomas Gleixner To: Zubin Mithra cc: mingo@redhat.com, Borislav Petkov , "H. Peter Anvin" , LKML , linux-pci@vger.kernel.org, groeck@chromium.org, Kees Cook , Bjorn Helgaas Subject: Re: [PATCH] x86/pci: Annotate 'pci_root_ops' with __ro_after_init In-Reply-To: <20181105201735.72026-1-zsm@chromium.org> Message-ID: References: <20181105201735.72026-1-zsm@chromium.org> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 5 Nov 2018, Zubin Mithra wrote: Cc+: Bjorn > When CONFIG_X86_INTEL_MID is set pci_root_ops is written to inside > intel_mid_pci_init(which is marked __init) and not modified after. This > makes pci_root_ops a suitable candidate for annotating as > __ro_after_init. This is confusing. What about CONFIG_X86_INTEL_MID=n? What you want to say is: pci_root_ops is only modified from intel_mid_pci_init() which is a init function, so it can be made __ro_after_init. or something like this. Hmm? Other than the nitpick above: Reviewed-by: Thomas Gleixner > Signed-off-by: Zubin Mithra > --- > arch/x86/pci/common.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c > index d4ec117c1142..204ee80cfa63 100644 > --- a/arch/x86/pci/common.c > +++ b/arch/x86/pci/common.c > @@ -67,7 +67,7 @@ static int pci_write(struct pci_bus *bus, unsigned int devfn, int where, int siz > devfn, where, size, value); > } > > -struct pci_ops pci_root_ops = { > +struct pci_ops pci_root_ops __ro_after_init = { > .read = pci_read, > .write = pci_write, > }; > -- > 2.19.1.930.g4563a0d9d0-goog > >