linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Huacai Chen <chenhuacai@loongson.cn>,
	Andy Lutomirski <luto@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	David Airlie <airlied@linux.ie>, Jonathan Corbet <corbet@lwn.net>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-arch <linux-arch@vger.kernel.org>,
	"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
	Xuefeng Li <lixuefeng@loongson.cn>,
	Yanteng Si <siyanteng@loongson.cn>,
	Huacai Chen <chenhuacai@gmail.com>,
	Jiaxun Yang <jiaxun.yang@flygoat.com>,
	linux-pci <linux-pci@vger.kernel.org>
Subject: Re: [PATCH V2 18/22] LoongArch: Add PCI controller support
Date: Thu, 9 Sep 2021 09:10:42 -0500	[thread overview]
Message-ID: <CAL_JsqJh3b9BxRU3ye=Qtmip+XE9gJxUKvPKuKNpxfOvmq08pg@mail.gmail.com> (raw)
In-Reply-To: <CAK8P3a3sY63WN6Mn6_xNqDYmdhv1PN6CFRfQGNDRO4dHtSjE7Q@mail.gmail.com>

On Wed, Sep 8, 2021 at 11:39 AM Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Wed, Sep 8, 2021 at 5:48 PM Rob Herring <robh@kernel.org> wrote:
> > On Fri, Sep 03, 2021 at 05:52:09PM +0800, Huacai Chen wrote:
>
> > > diff --git a/arch/loongarch/pci/acpi.c b/arch/loongarch/pci/acpi.c
> > > new file mode 100644
> > > index 000000000000..d6e2f69b9503
> > > --- /dev/null
> > > +++ b/arch/loongarch/pci/acpi.c
> > > @@ -0,0 +1,174 @@
> > > +// SPDX-License-Identifier: GPL-2.0
>
> A lot of this file appears to duplicate what we already have on other
> architectures.
> I would suggest moving the other architecture specific code into
> drivers/acpi/pci*.c and share as much as possible to make it easier to
> make modifications in the future.

Yes. I was sad to see after I replied you already said this for v1.

> > It might be time for default implementations here that can be shared
> > with arm64. The functions look the same or similar to the arm64
> > version in many cases and why they are different isn't that clear to me
> > not being all that familar with the ACPI code.
>
> I think it can be simplified quite a bit if we restructure the acpi pci
> code to behave like a normal pci host bridge driver.

That is exactly what I want to see happen! I'm not that familiar with
the ACPI device probing piece of it or I probably would have done that
by now. I gather there's not a normal acpi_device (or platform_device
with ACPI matching?) so we'd have to create the device(s) based on the
MCFG table.

Rob

  reply	other threads:[~2021-09-09 14:11 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-03  9:51 [PATCH V2 00/22] arch: Add basic LoongArch support Huacai Chen
2021-09-03  9:51 ` [PATCH V2 01/22] Documentation: LoongArch: Add basic documentations Huacai Chen
2021-09-03  9:51 ` [PATCH V2 02/22] Documentation/zh_CN: Add basic LoongArch documentations Huacai Chen
2021-09-14  7:26   ` teng sterling
2021-09-16  8:29     ` Huacai Chen
2021-09-03  9:51 ` [PATCH V2 03/22] LoongArch: Add elf-related definitions Huacai Chen
2021-09-03  9:51 ` [PATCH V2 04/22] LoongArch: Add writecombine support for drm Huacai Chen
2021-09-03  9:51 ` [PATCH V2 05/22] LoongArch: Add build infrastructure Huacai Chen
2021-09-03  9:51 ` [PATCH V2 06/22] LoongArch: Add CPU definition headers Huacai Chen
2021-09-03  9:51 ` [PATCH V2 07/22] LoongArch: Add atomic/locking headers Huacai Chen
2021-09-03  9:51 ` [PATCH V2 08/22] LoongArch: Add other common headers Huacai Chen
2021-09-03  9:52 ` [PATCH V2 09/22] LoongArch: Add boot and setup routines Huacai Chen
2021-09-03  9:52 ` [PATCH V2 10/22] LoongArch: Add exception/interrupt handling Huacai Chen
2021-09-03  9:52 ` [PATCH V2 11/22] LoongArch: Add process management Huacai Chen
2021-09-03  9:52 ` [PATCH V2 12/22] LoongArch: Add memory management Huacai Chen
2021-09-03  9:52 ` [PATCH V2 13/22] LoongArch: Add system call support Huacai Chen
2021-09-03  9:52 ` [PATCH V2 14/22] LoongArch: Add signal handling support Huacai Chen
2021-09-03  9:52 ` [PATCH V2 15/22] LoongArch: Add elf and module support Huacai Chen
2021-09-03  9:52 ` [PATCH V2 16/22] LoongArch: Add misc common routines Huacai Chen
2021-09-03  9:52 ` [PATCH V2 17/22] LoongArch: Add some library functions Huacai Chen
2021-09-03  9:52 ` [PATCH V2 18/22] LoongArch: Add PCI controller support Huacai Chen
2021-09-08 15:48   ` Rob Herring
2021-09-08 16:39     ` Arnd Bergmann
2021-09-09 14:10       ` Rob Herring [this message]
2021-09-09 14:38         ` Arnd Bergmann
2021-09-10  7:43     ` Huacai Chen
2021-09-10 10:10       ` Arnd Bergmann
2021-09-10 10:32     ` Christoph Hellwig
2021-09-11  2:38       ` Huacai Chen
2021-09-03  9:52 ` [PATCH V2 19/22] LoongArch: Add VDSO and VSYSCALL support Huacai Chen
2021-09-03  9:52 ` [PATCH V2 20/22] LoongArch: Add multi-processor (SMP) support Huacai Chen
2021-09-03  9:52 ` [PATCH V2 21/22] LoongArch: Add Non-Uniform Memory Access (NUMA) support Huacai Chen
2021-09-03  9:52 ` [PATCH V2 22/22] LoongArch: Add Loongson-3 default config file Huacai Chen

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='CAL_JsqJh3b9BxRU3ye=Qtmip+XE9gJxUKvPKuKNpxfOvmq08pg@mail.gmail.com' \
    --to=robh@kernel.org \
    --cc=airlied@linux.ie \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=chenhuacai@gmail.com \
    --cc=chenhuacai@loongson.cn \
    --cc=corbet@lwn.net \
    --cc=jiaxun.yang@flygoat.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lixuefeng@loongson.cn \
    --cc=luto@kernel.org \
    --cc=peterz@infradead.org \
    --cc=siyanteng@loongson.cn \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).