From: Len Brown <lenb@kernel.org>
To: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: linux-acpi@vger.kernel.org
Subject: Re: [PATCH 3/3] ACPI: move internal core declarations to private header
Date: Thu, 26 Feb 2009 16:00:01 -0500 (EST) [thread overview]
Message-ID: <alpine.LFD.2.00.0902261548580.6492@localhost.localdomain> (raw)
In-Reply-To: <200902241151.35935.bjorn.helgaas@hp.com>
On Tue, 24 Feb 2009, Bjorn Helgaas wrote:
> On Saturday 21 February 2009 09:21:14 pm Len Brown wrote:
> > On Thu, 19 Feb 2009, Bjorn Helgaas wrote:
> >
> > > A number of things that shouldn't be exposed outside the ACPI core
> > > were declared in include/acpi/acpi_drivers.h, where anybody can
> > > see them. This patch moves those declarations to a new "ospm.h"
> > > inside drivers/acpi.
> >
> > I'm not sure that we're using the same terminology.
>
> I'm sure we're not :-)
>
> > In ACPI I usually use the word "core" to refer to everything
> > that is now under drivers/acpi/acpica/
> > eg. the ACPI interpreter and the OS agnostic code in ACPICA.
> >
> > That is why dmesg prints this:
> >
> > ACPI: Core revision 20090123
> >
> > I use the word "Linux/ACPI" to refer to everything in
> > drivers/acpi/* and the ACPI stuff under arch/ etc.
>
> I think the common Linux usage of "core" is more along the lines
> of "bus infrastructure and implementation of stuff in the driver/
> kernel interface," e.g.,
> PCI core -> drivers/pci/*
> PNP core -> drivers/pnp/*
> So by analogy, I think the "ACPI core" should refer to the stuff
> in drivers/acpi. The stuff in drivers/acpi/acpica is something
> else that doesn't really appear in other subsystems, so using "core"
> to refer to the ACPICA makes ACPI unnecessarily different.
>
> But this is tangential, and I'll gladly remove "core" from the
> changelog!
Okay, lets stay away from the word core,
since it has two common conflicting uses.
> > I do want things that are private to drivers/acpi/ files
> > to be in drivers/acpi/, and not in include/acpi/
> >
> > so i guess I like what you're doing here,
> > but for some reason i'm not excited about the name "ospm.h",
> > maybe I"ll sleep on it and it will sound excellent tomorrow...
>
> I'm not married to "ospm.h", and you're right that it's not very
> descriptive and doesn't have much history in Linux. I tried "acpi.h"
> and "acpi_core.h" earlier, but those were duds as well. Here
> are some similar files in other parts of Linux:
>
> block/blk.h
> crypto/internal.h
> drivers/base/base.h
> drivers/pci/pci.h
> drivers/pnp/base.h
> drivers/scsi/scsi_priv.h
> fs/internal.h
> mm/internal.h
>
> What would you think of "drivers/acpi/internal.h"?
better.
I do like internal.h better than ospm.h because internal.h
sounds like something that drivers should not include,
while ospm.h sounds like something they should include.
The murkyness right now I think is because we still have two
different types of code in drivers/acpi/
acpi/ seems to be where we have some infrastructre code,
plus some "acpi drivers", such as battery.c that use the
infrastructure to implement OS policy. Maybe we should
have the infrastructure and the drivers in two different
directories?
acpi/acpica/ is a single place for the ACPICA C-code
and has its own private headers down there, finally.
include/linux/acpi.h
this is what other parts of the kernel use to talk
to the acpi sub-system
include/acpi/
this is here so that the above can include <acpi/acpi.h>
which bundles various public ACPICA headers
there is probably a more elegant way to do this.
drivers/platform/x86/
platform specific drivers that use acpi
rather than implement acpi, finally moved out
of the drivers/acpi/ directory
thanks,
-Len
next prev parent reply other threads:[~2009-02-26 21:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-19 19:51 [PATCH 0/3] ACPI: trim acpi_drivers.h Bjorn Helgaas
2009-02-19 19:51 ` [PATCH 1/3] ACPI: pci: make new pci.h header local to driver Bjorn Helgaas
2009-02-22 4:28 ` Len Brown
2009-02-24 19:06 ` Bjorn Helgaas
2009-02-26 19:45 ` Bjorn Helgaas
2009-02-19 19:51 ` [PATCH 2/3] ACPI: processor: make new processor.h " Bjorn Helgaas
2009-02-22 3:58 ` Len Brown
2009-02-19 19:51 ` [PATCH 3/3] ACPI: move internal core declarations to private header Bjorn Helgaas
2009-02-22 4:21 ` Len Brown
2009-02-24 18:51 ` Bjorn Helgaas
2009-02-26 21:00 ` Len Brown [this message]
2009-02-26 22:08 ` Bjorn Helgaas
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=alpine.LFD.2.00.0902261548580.6492@localhost.localdomain \
--to=lenb@kernel.org \
--cc=bjorn.helgaas@hp.com \
--cc=linux-acpi@vger.kernel.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