From: Bjorn Helgaas <helgaas@kernel.org>
To: Zubin Mithra <zsm@chromium.org>
Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
hpa@zytor.com, hch@infradead.org, groeck@chromium.org,
keescook@chromium.org, linux-kernel@vger.kernel.org,
linux-pci@vger.kernel.org
Subject: Re: [RFC] x86/pci: Mark pci_root_ops as const
Date: Thu, 8 Nov 2018 17:51:35 -0600 [thread overview]
Message-ID: <20181108235134.GH41183@google.com> (raw)
In-Reply-To: <20181108171115.216060-1-zsm@chromium.org>
Hi Zubin,
On Thu, Nov 08, 2018 at 09:11:15AM -0800, Zubin Mithra wrote:
> pci_root_ops is only written to from within intel_mid_pci_init. This
> is linked in only when CONFIG_X86_INTEL_MID is set. If not for this,
> pci_root_ops could be marked as const.
>
> Fix this by replacing pci_root_ops usage with pci_root_ops_ptr. If
> CONFIG_X86_INTEL_MID is set, pci_root_ops_ptr will be set to
> intel_mid_pci_ops inside intel_mid_pci_init.
>
> Introduce pci_acpi_set_ops for intel_mid_pci_init to set
> acpi_pci_root_ops.pci_ops.
>
> This also means that intel_mid_pci_ops cannot be freed after init, hence
> remove __initconst.
>
> Signed-off-by: Zubin Mithra <zsm@chromium.org>
> ---
> arch/x86/include/asm/pci_x86.h | 4 +++-
> arch/x86/pci/acpi.c | 5 +++++
> arch/x86/pci/common.c | 5 +++--
> arch/x86/pci/intel_mid_pci.c | 5 +++--
> drivers/pci/access.c | 4 ++--
> drivers/pci/probe.c | 4 ++--
> include/linux/pci-acpi.h | 2 +-
> include/linux/pci.h | 11 ++++++-----
> 8 files changed, 25 insertions(+), 15 deletions(-)
Can you:
- Split this into an x86 patch and a PCI core patch (if possible)?
- Make the same fixes for other arches?
Bjorn
prev parent reply other threads:[~2018-11-08 23:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-08 17:11 [RFC] x86/pci: Mark pci_root_ops as const Zubin Mithra
2018-11-08 23:51 ` Bjorn Helgaas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181108235134.GH41183@google.com \
--to=helgaas@kernel.org \
--cc=bp@alien8.de \
--cc=groeck@chromium.org \
--cc=hch@infradead.org \
--cc=hpa@zytor.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=zsm@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.