From: Randy Dunlap <randy.dunlap@oracle.com>
To: "Will Newton" <will.newton@gmail.com>
Cc: "Linux Kernel list" <linux-kernel@vger.kernel.org>,
linux-arch@vger.kernel.org
Subject: Re: [RFC] Introduce __ARCH_WANT_SYS_SYSFS
Date: Tue, 22 Apr 2008 08:12:11 -0700 [thread overview]
Message-ID: <20080422081211.e85989ec.randy.dunlap@oracle.com> (raw)
In-Reply-To: <87a5b0800804220513t75690ceao938a288596b5ad0c@mail.gmail.com>
On Tue, 22 Apr 2008 13:13:39 +0100 Will Newton wrote:
> Hi,
>
> This patch introduces a __ARCH_WANT_SYS_SYSFS #define for
> architectures that support the sysfs(2) system call. At the moment
> that's everybody but blackfin, but future architectures may want to
> save the (admittedly small) code size that it adds to the kernel as
> well.
>
> (patch attached as well as inline because gmail seems to mangle my whitespace)
>
> ---
> >From d0746366e8ccb5fbaa6c9945540cecbe0c421222 Mon Sep 17 00:00:00 2001
> From: Will Newton <will.newton@imgtec.com>
> Date: Tue, 22 Apr 2008 12:57:03 +0100
> Subject: [PATCH] Introduce __ARCH_WANT_SYS_SYSFS.
>
> Signed-off-by: Will Newton <will.newton@imgtec.com>
>
> All arches that want the sysfs(2) system call should define this symbol.
> Arches such as blackfin that do not implement the system call don't compile
> the code and save some small amount of space.
Is there any reason that this couldn't (and shouldn't) be done
in the Kconfig space and done as documented in
Documentation/kbuild/kconfig-language.txt ?
<quote:>
Adding common features and make the usage configurable
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It is a common idiom to implement a feature/functionality that are
relevant for some architectures but not all.
The recommended way to do so is to use a config variable named HAVE_*
that is defined in a common Kconfig file and selected by the relevant
architectures.
An example is the generic IOMAP functionality.
We would in lib/Kconfig see:
# Generic IOMAP is used to ...
config HAVE_GENERIC_IOMAP
config GENERIC_IOMAP
depends on HAVE_GENERIC_IOMAP && FOO
And in lib/Makefile we would see:
obj-$(CONFIG_GENERIC_IOMAP) += iomap.o
For each architecture using the generic IOMAP functionality we would see:
config X86
select ...
select HAVE_GENERIC_IOMAP
select ...
---
~Randy
next prev parent reply other threads:[~2008-04-22 15:13 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-22 12:13 Will Newton
2008-04-22 13:15 ` Arnd Bergmann
2008-04-23 21:16 ` Michal Simek
2008-04-23 21:38 ` Mike Frysinger
2008-04-24 11:11 ` microblaze syscall list Arnd Bergmann
2008-04-24 18:42 ` Michal Simek
2008-04-24 21:21 ` Arnd Bergmann
2008-04-25 9:36 ` [microblaze-uclinux] " John Williams
2008-04-25 10:06 ` Matthew Wilcox
2008-04-25 11:32 ` Geert Uytterhoeven
2008-04-27 2:04 ` John Williams
2008-04-27 15:52 ` Michal Simek
2008-04-27 16:50 ` Alan Cox
2008-04-27 20:15 ` Arnd Bergmann
2008-04-28 0:15 ` John Williams
2008-04-28 12:31 ` Arnd Bergmann
2008-05-01 19:17 ` Arnd Bergmann
2008-05-02 5:38 ` John Williams
2008-05-02 8:18 ` Michal Simek
2008-05-03 3:49 ` John Williams
2008-05-03 9:16 ` Arnd Bergmann
2008-05-03 15:56 ` Ulrich Drepper
2008-05-03 21:14 ` Arnd Bergmann
2008-05-05 1:09 ` John Williams
2008-05-05 14:08 ` Arnd Bergmann
2008-05-03 21:57 ` Arnd Bergmann
2008-05-04 9:12 ` Michal Simek
2008-05-04 19:37 ` Arnd Bergmann
2008-05-05 6:18 ` Michal Simek
2008-05-04 22:09 ` H. Peter Anvin
2008-05-04 22:54 ` Arnd Bergmann
2008-05-04 22:53 ` H. Peter Anvin
2008-05-06 8:33 ` Michal Simek
2008-04-24 20:51 ` Michal Simek
2008-04-24 21:37 ` Arnd Bergmann
2008-04-22 15:12 ` Randy Dunlap [this message]
2008-04-22 15:16 ` [RFC] Introduce __ARCH_WANT_SYS_SYSFS Will Newton
2008-04-22 15:24 ` Kyle McMartin
2008-04-22 15:34 ` Will Newton
2008-04-22 15:38 ` Kyle McMartin
2008-04-23 14:36 ` Will Newton
2008-04-23 14:59 ` Arnd Bergmann
2008-04-23 15:40 ` Kyle McMartin
2008-04-23 15:50 ` Will Newton
2008-04-23 16:05 ` Mike Frysinger
2008-04-23 17:59 ` Mike Frysinger
2008-04-24 9:18 ` Will Newton
2008-04-23 18:44 ` Sam Ravnborg
2008-04-24 14:51 ` Adrian Bunk
2008-04-22 15:21 ` Kyle McMartin
2008-04-22 15:38 ` Arnd Bergmann
2008-04-22 15:42 ` Kyle McMartin
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=20080422081211.e85989ec.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=will.newton@gmail.com \
/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
all inboxes | Powered by JetHome®