From: "Will Newton" <will.newton-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Kyle McMartin <kyle-pfcGkIkfWfAsA/PxXw9srA@public.gmane.org>
Cc: Randy Dunlap
<randy.dunlap-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
Linux Kernel list
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [RFC] Introduce __ARCH_WANT_SYS_SYSFS
Date: Wed, 23 Apr 2008 15:36:23 +0100 [thread overview]
Message-ID: <87a5b0800804230736k340e7fe9mffbd72b5b8164015@mail.gmail.com> (raw)
In-Reply-To: <20080422153849.GH19802-EK4dZfYtfFRW/gs8oUvUg/d9D2ou9A/h@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 11072 bytes --]
On Tue, Apr 22, 2008 at 4:38 PM, Kyle McMartin <kyle-pfcGkIkfWfAsA/PxXw9srA@public.gmane.org> wrote:
> On Tue, Apr 22, 2008 at 04:34:03PM +0100, Will Newton wrote:
> > On Tue, Apr 22, 2008 at 4:24 PM, Kyle McMartin <kyle-pfcGkIkfWfAsA/PxXw9srA@public.gmane.org> wrote:
> > > On Tue, Apr 22, 2008 at 04:16:17PM +0100, Will Newton wrote:
> > > > It can be done with Kconfig. Whether it should be or not depends on
> > > > your point of view, hence RFC. Currently __ARCH_WANT macros is the way
> > > > syscalls are enabled and disabled across architectures. If there's
> > > > consensus that it should be done via Kconfig that could certainly be
> > > > implmented, but that's a different patch.
> > > >
> > >
> > > It's currently done in unistd.h for hysterical raisins. All new
> > > conditional syscalls have been done in Kconfig.
> >
> > Do you have a syscall in mind that does this in the correct way?
> >
>
> epoll is the most immediate example at hand, since it touches
> fs/compat.c similarly to how you would be touching fs/filesystem.c, and
> touches kernel/sys_ni.c and init/Kconfig in much the same way.
I implemented the approach you suggested - Kconfig symbol and
cond_syscall definition. I think I actually like the previous approach
better:
1. The arch Kconfig files are quite non-uniform compared to unistd.h
so the definitions wind up at different places in the file which is a
bit messy.
2. Changes to Kconfig may cause churn in defconfigs perhaps?
3. There is more churn in arch Kconfig than unistd.h so getting a
cross arch patch applied is likely to be more difficult.
4. The patch is about 4 times as many lines.
What do you think?
From 094cbe1ca2fa28ae845ef80da6dad02e90cfbe04 Mon Sep 17 00:00:00 2001
From: Will Newton <will.newton-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
Date: Wed, 23 Apr 2008 15:28:37 +0100
Subject: [PATCH] Introduce ARCH_HAS_SYS_SYSFS Kconfig symbol.
This symbol should be defined by all arches that implement the sysfs(2)
system call. Arches that do not wish to implement this legacy system call
can save a little bit of kernel code size. The only current architecture
to benefit from this is blackfin, but in the future other arches may wish
to do this as well.
---
arch/alpha/Kconfig | 4 ++++
arch/arm/Kconfig | 4 ++++
arch/avr32/Kconfig | 4 ++++
arch/cris/Kconfig | 4 ++++
arch/frv/Kconfig | 4 ++++
arch/h8300/Kconfig | 4 ++++
arch/ia64/Kconfig | 4 ++++
arch/m32r/Kconfig | 4 ++++
arch/m68k/Kconfig | 4 ++++
arch/m68knommu/Kconfig | 4 ++++
arch/mips/Kconfig | 4 ++++
arch/mn10300/Kconfig | 4 ++++
arch/parisc/Kconfig | 4 ++++
arch/powerpc/Kconfig | 4 ++++
arch/ppc/Kconfig | 4 ++++
arch/s390/Kconfig | 4 ++++
arch/sh/Kconfig | 4 ++++
arch/sparc/Kconfig | 4 ++++
arch/sparc64/Kconfig | 4 ++++
arch/um/Kconfig | 4 ++++
arch/v850/Kconfig | 4 ++++
arch/x86/Kconfig | 4 ++++
arch/xtensa/Kconfig | 4 ++++
fs/filesystems.c | 4 ++++
kernel/sys_ni.c | 1 +
25 files changed, 97 insertions(+), 0 deletions(-)
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 729cdbd..9b7b4d2 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -71,6 +71,10 @@ config AUTO_IRQ_AFFINITY
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
source "init/Kconfig"
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 4039a13..c806808 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -137,6 +137,10 @@ config ZONE_DMA
bool
default y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config GENERIC_ISA_DMA
bool
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig
index 28e0caf..2f9f01d 100644
--- a/arch/avr32/Kconfig
+++ b/arch/avr32/Kconfig
@@ -66,6 +66,10 @@ config GENERIC_BUG
def_bool y
depends on BUG
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
source "init/Kconfig"
menu "System Type and features"
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig
index 9389d38..7aec04b 100644
--- a/arch/cris/Kconfig
+++ b/arch/cris/Kconfig
@@ -32,6 +32,10 @@ config ARCH_HAS_ILOG2_U64
bool
default n
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config GENERIC_FIND_NEXT_BIT
bool
default y
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig
index a5aac1b..f08fb9a 100644
--- a/arch/frv/Kconfig
+++ b/arch/frv/Kconfig
@@ -58,6 +58,10 @@ config ARCH_HAS_ILOG2_U64
bool
default y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config HZ
int
default 1000
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig
index 085dc6e..8184c99 100644
--- a/arch/h8300/Kconfig
+++ b/arch/h8300/Kconfig
@@ -69,6 +69,10 @@ config TIME_LOW_RES
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config NO_IOPORT
def_bool y
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 8fa3faf..513d960 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -111,6 +111,10 @@ config AUDIT_ARCH
bool
default y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
choice
prompt "System type"
default IA64_GENERIC
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig
index de153de..79d6f79 100644
--- a/arch/m32r/Kconfig
+++ b/arch/m32r/Kconfig
@@ -39,6 +39,10 @@ config NO_DMA
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config HZ
int
default 100
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 65db226..26859b1 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -56,6 +56,10 @@ config NO_DMA
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config HZ
int
default 100
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
index 07eb4c4..d9240a6 100644
--- a/arch/m68knommu/Kconfig
+++ b/arch/m68knommu/Kconfig
@@ -68,6 +68,10 @@ config NO_IOPORT
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
source "init/Kconfig"
menu "Processor type and features"
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 8724ed3..0716726 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -752,6 +752,10 @@ config GENERIC_HARDIRQS_NO__DO_IRQ
bool
default n
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
#
# Select some configuration options automatically based on user selections.
#
diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig
index 6a6409a..3666f5f 100644
--- a/arch/mn10300/Kconfig
+++ b/arch/mn10300/Kconfig
@@ -63,6 +63,10 @@ config GENERIC_HARDIRQS
config HOTPLUG_CPU
def_bool n
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config HZ
int
default 1000
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index bc7a19d..c6f5139 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -91,6 +91,10 @@ config ARCH_MAY_HAVE_PC_FDC
depends on BROKEN
default y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
source "init/Kconfig"
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 1189d8d..21803f2 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -194,6 +194,10 @@ config PPC_OF_PLATFORM_PCI
depends on PPC64 # not supported on 32 bits yet
default n
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
source "init/Kconfig"
source "arch/powerpc/sysdev/Kconfig"
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig
index abc877f..0156eb2 100644
--- a/arch/ppc/Kconfig
+++ b/arch/ppc/Kconfig
@@ -72,6 +72,10 @@ config GENERIC_BUG
default y
depends on BUG
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
source "init/Kconfig"
menu "Processor"
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 1831833..c04b232 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -55,6 +55,10 @@ config GENERIC_LOCKBREAK
default y
depends on SMP && PREEMPT
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
mainmenu "Linux Kernel Configuration"
config S390
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 8d2cd1d..66b74dc 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -93,6 +93,10 @@ config ARCH_SUPPORTS_AOUT
config IO_TRAPPED
bool
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
source "init/Kconfig"
menu "System type"
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index c40343c..25c17e3 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -30,6 +30,10 @@ config OF
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config HZ
int
default 100
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig
index 463d1be..9f5d1ed 100644
--- a/arch/sparc64/Kconfig
+++ b/arch/sparc64/Kconfig
@@ -90,6 +90,10 @@ config GENERIC_HARDIRQS_NO__DO_IRQ
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
choice
prompt "Kernel page size"
default SPARC64_PAGE_SIZE_8KB
diff --git a/arch/um/Kconfig b/arch/um/Kconfig
index dba8e05..be0cb93 100644
--- a/arch/um/Kconfig
+++ b/arch/um/Kconfig
@@ -68,6 +68,10 @@ config IRQ_RELEASE_METHOD
bool
default y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config HZ
int
default 100
diff --git a/arch/v850/Kconfig b/arch/v850/Kconfig
index 4379f43..b54d1f4 100644
--- a/arch/v850/Kconfig
+++ b/arch/v850/Kconfig
@@ -56,6 +56,10 @@ config ARCH_HAS_ILOG2_U64
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
# Turn off some random 386 crap that can affect device config
config ISA
bool
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 6c70fed..e0b830b 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -155,6 +155,10 @@ config GENERIC_PENDING_IRQ
depends on GENERIC_HARDIRQS && SMP
default y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config X86_SMP
bool
depends on SMP && ((X86_32 && !X86_VOYAGER) || X86_64)
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index 9fc8551..7834ad7 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -50,6 +50,10 @@ config ARCH_HAS_ILOG2_U64
config NO_IOPORT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config HZ
int
default 100
diff --git a/fs/filesystems.c b/fs/filesystems.c
index f37f872..f6e1567 100644
--- a/fs/filesystems.c
+++ b/fs/filesystems.c
@@ -118,6 +118,8 @@ int unregister_filesystem(struct file_system_type * fs)
EXPORT_SYMBOL(unregister_filesystem);
+#ifdef CONFIG_ARCH_HAS_SYS_SYSFS
+
static int fs_index(const char __user * __name)
{
struct file_system_type * tmp;
@@ -197,6 +199,8 @@ asmlinkage long sys_sysfs(int option, unsigned
long arg1, unsigned long arg2)
return retval;
}
+#endif
+
int get_filesystem_list(char * buf)
{
int len = 0;
diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c
index 5b9b467..866ff4b 100644
--- a/kernel/sys_ni.c
+++ b/kernel/sys_ni.c
@@ -121,6 +121,7 @@ cond_syscall(sys_vm86old);
cond_syscall(sys_vm86);
cond_syscall(compat_sys_ipc);
cond_syscall(compat_sys_sysctl);
+cond_syscall(sys_sysfs);
/* arch-specific weak syscall entries */
cond_syscall(sys_pciconfig_read);
--
1.5.3.5
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Introduce-ARCH_HAS_SYS_SYSFS-Kconfig-symbol.patch --]
[-- Type: text/x-patch; name=0001-Introduce-ARCH_HAS_SYS_SYSFS-Kconfig-symbol.patch, Size: 9402 bytes --]
From 094cbe1ca2fa28ae845ef80da6dad02e90cfbe04 Mon Sep 17 00:00:00 2001
From: Will Newton <will.newton@imgtec.com>
Date: Wed, 23 Apr 2008 15:28:37 +0100
Subject: [PATCH] Introduce ARCH_HAS_SYS_SYSFS Kconfig symbol.
This symbol should be defined by all arches that implement the sysfs(2)
system call. Arches that do not wish to implement this legacy system call
can save a little bit of kernel code size. The only current architecture
to benefit from this is blackfin, but in the future other arches may wish
to do this as well.
---
arch/alpha/Kconfig | 4 ++++
arch/arm/Kconfig | 4 ++++
arch/avr32/Kconfig | 4 ++++
arch/cris/Kconfig | 4 ++++
arch/frv/Kconfig | 4 ++++
arch/h8300/Kconfig | 4 ++++
arch/ia64/Kconfig | 4 ++++
arch/m32r/Kconfig | 4 ++++
arch/m68k/Kconfig | 4 ++++
arch/m68knommu/Kconfig | 4 ++++
arch/mips/Kconfig | 4 ++++
arch/mn10300/Kconfig | 4 ++++
arch/parisc/Kconfig | 4 ++++
arch/powerpc/Kconfig | 4 ++++
arch/ppc/Kconfig | 4 ++++
arch/s390/Kconfig | 4 ++++
arch/sh/Kconfig | 4 ++++
arch/sparc/Kconfig | 4 ++++
arch/sparc64/Kconfig | 4 ++++
arch/um/Kconfig | 4 ++++
arch/v850/Kconfig | 4 ++++
arch/x86/Kconfig | 4 ++++
arch/xtensa/Kconfig | 4 ++++
fs/filesystems.c | 4 ++++
kernel/sys_ni.c | 1 +
25 files changed, 97 insertions(+), 0 deletions(-)
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 729cdbd..9b7b4d2 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -71,6 +71,10 @@ config AUTO_IRQ_AFFINITY
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
source "init/Kconfig"
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 4039a13..c806808 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -137,6 +137,10 @@ config ZONE_DMA
bool
default y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config GENERIC_ISA_DMA
bool
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig
index 28e0caf..2f9f01d 100644
--- a/arch/avr32/Kconfig
+++ b/arch/avr32/Kconfig
@@ -66,6 +66,10 @@ config GENERIC_BUG
def_bool y
depends on BUG
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
source "init/Kconfig"
menu "System Type and features"
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig
index 9389d38..7aec04b 100644
--- a/arch/cris/Kconfig
+++ b/arch/cris/Kconfig
@@ -32,6 +32,10 @@ config ARCH_HAS_ILOG2_U64
bool
default n
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config GENERIC_FIND_NEXT_BIT
bool
default y
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig
index a5aac1b..f08fb9a 100644
--- a/arch/frv/Kconfig
+++ b/arch/frv/Kconfig
@@ -58,6 +58,10 @@ config ARCH_HAS_ILOG2_U64
bool
default y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config HZ
int
default 1000
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig
index 085dc6e..8184c99 100644
--- a/arch/h8300/Kconfig
+++ b/arch/h8300/Kconfig
@@ -69,6 +69,10 @@ config TIME_LOW_RES
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config NO_IOPORT
def_bool y
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 8fa3faf..513d960 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -111,6 +111,10 @@ config AUDIT_ARCH
bool
default y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
choice
prompt "System type"
default IA64_GENERIC
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig
index de153de..79d6f79 100644
--- a/arch/m32r/Kconfig
+++ b/arch/m32r/Kconfig
@@ -39,6 +39,10 @@ config NO_DMA
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config HZ
int
default 100
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 65db226..26859b1 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -56,6 +56,10 @@ config NO_DMA
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config HZ
int
default 100
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
index 07eb4c4..d9240a6 100644
--- a/arch/m68knommu/Kconfig
+++ b/arch/m68knommu/Kconfig
@@ -68,6 +68,10 @@ config NO_IOPORT
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
source "init/Kconfig"
menu "Processor type and features"
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 8724ed3..0716726 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -752,6 +752,10 @@ config GENERIC_HARDIRQS_NO__DO_IRQ
bool
default n
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
#
# Select some configuration options automatically based on user selections.
#
diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig
index 6a6409a..3666f5f 100644
--- a/arch/mn10300/Kconfig
+++ b/arch/mn10300/Kconfig
@@ -63,6 +63,10 @@ config GENERIC_HARDIRQS
config HOTPLUG_CPU
def_bool n
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config HZ
int
default 1000
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index bc7a19d..c6f5139 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -91,6 +91,10 @@ config ARCH_MAY_HAVE_PC_FDC
depends on BROKEN
default y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
source "init/Kconfig"
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 1189d8d..21803f2 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -194,6 +194,10 @@ config PPC_OF_PLATFORM_PCI
depends on PPC64 # not supported on 32 bits yet
default n
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
source "init/Kconfig"
source "arch/powerpc/sysdev/Kconfig"
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig
index abc877f..0156eb2 100644
--- a/arch/ppc/Kconfig
+++ b/arch/ppc/Kconfig
@@ -72,6 +72,10 @@ config GENERIC_BUG
default y
depends on BUG
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
source "init/Kconfig"
menu "Processor"
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 1831833..c04b232 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -55,6 +55,10 @@ config GENERIC_LOCKBREAK
default y
depends on SMP && PREEMPT
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
mainmenu "Linux Kernel Configuration"
config S390
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 8d2cd1d..66b74dc 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -93,6 +93,10 @@ config ARCH_SUPPORTS_AOUT
config IO_TRAPPED
bool
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
source "init/Kconfig"
menu "System type"
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index c40343c..25c17e3 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -30,6 +30,10 @@ config OF
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config HZ
int
default 100
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig
index 463d1be..9f5d1ed 100644
--- a/arch/sparc64/Kconfig
+++ b/arch/sparc64/Kconfig
@@ -90,6 +90,10 @@ config GENERIC_HARDIRQS_NO__DO_IRQ
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
choice
prompt "Kernel page size"
default SPARC64_PAGE_SIZE_8KB
diff --git a/arch/um/Kconfig b/arch/um/Kconfig
index dba8e05..be0cb93 100644
--- a/arch/um/Kconfig
+++ b/arch/um/Kconfig
@@ -68,6 +68,10 @@ config IRQ_RELEASE_METHOD
bool
default y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config HZ
int
default 100
diff --git a/arch/v850/Kconfig b/arch/v850/Kconfig
index 4379f43..b54d1f4 100644
--- a/arch/v850/Kconfig
+++ b/arch/v850/Kconfig
@@ -56,6 +56,10 @@ config ARCH_HAS_ILOG2_U64
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
# Turn off some random 386 crap that can affect device config
config ISA
bool
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 6c70fed..e0b830b 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -155,6 +155,10 @@ config GENERIC_PENDING_IRQ
depends on GENERIC_HARDIRQS && SMP
default y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config X86_SMP
bool
depends on SMP && ((X86_32 && !X86_VOYAGER) || X86_64)
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index 9fc8551..7834ad7 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -50,6 +50,10 @@ config ARCH_HAS_ILOG2_U64
config NO_IOPORT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config HZ
int
default 100
diff --git a/fs/filesystems.c b/fs/filesystems.c
index f37f872..f6e1567 100644
--- a/fs/filesystems.c
+++ b/fs/filesystems.c
@@ -118,6 +118,8 @@ int unregister_filesystem(struct file_system_type * fs)
EXPORT_SYMBOL(unregister_filesystem);
+#ifdef CONFIG_ARCH_HAS_SYS_SYSFS
+
static int fs_index(const char __user * __name)
{
struct file_system_type * tmp;
@@ -197,6 +199,8 @@ asmlinkage long sys_sysfs(int option, unsigned long arg1, unsigned long arg2)
return retval;
}
+#endif
+
int get_filesystem_list(char * buf)
{
int len = 0;
diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c
index 5b9b467..866ff4b 100644
--- a/kernel/sys_ni.c
+++ b/kernel/sys_ni.c
@@ -121,6 +121,7 @@ cond_syscall(sys_vm86old);
cond_syscall(sys_vm86);
cond_syscall(compat_sys_ipc);
cond_syscall(compat_sys_sysctl);
+cond_syscall(sys_sysfs);
/* arch-specific weak syscall entries */
cond_syscall(sys_pciconfig_read);
--
1.5.3.5
WARNING: multiple messages have this Message-ID (diff)
From: "Will Newton" <will.newton@gmail.com>
To: Kyle McMartin <kyle@mcmartin.ca>
Cc: Randy Dunlap <randy.dunlap@oracle.com>,
Linux Kernel list <linux-kernel@vger.kernel.org>,
linux-arch@vger.kernel.org
Subject: Re: [RFC] Introduce __ARCH_WANT_SYS_SYSFS
Date: Wed, 23 Apr 2008 15:36:23 +0100 [thread overview]
Message-ID: <87a5b0800804230736k340e7fe9mffbd72b5b8164015@mail.gmail.com> (raw)
Message-ID: <20080423143623.VC7W_FEkS1JoC94OcWl2R9hWuo7l6PUgtuJTg33Xa8Q@z> (raw)
In-Reply-To: <20080422153849.GH19802@phobos.i.cabal.ca>
[-- Attachment #1: Type: text/plain, Size: 10987 bytes --]
On Tue, Apr 22, 2008 at 4:38 PM, Kyle McMartin <kyle@mcmartin.ca> wrote:
> On Tue, Apr 22, 2008 at 04:34:03PM +0100, Will Newton wrote:
> > On Tue, Apr 22, 2008 at 4:24 PM, Kyle McMartin <kyle@mcmartin.ca> wrote:
> > > On Tue, Apr 22, 2008 at 04:16:17PM +0100, Will Newton wrote:
> > > > It can be done with Kconfig. Whether it should be or not depends on
> > > > your point of view, hence RFC. Currently __ARCH_WANT macros is the way
> > > > syscalls are enabled and disabled across architectures. If there's
> > > > consensus that it should be done via Kconfig that could certainly be
> > > > implmented, but that's a different patch.
> > > >
> > >
> > > It's currently done in unistd.h for hysterical raisins. All new
> > > conditional syscalls have been done in Kconfig.
> >
> > Do you have a syscall in mind that does this in the correct way?
> >
>
> epoll is the most immediate example at hand, since it touches
> fs/compat.c similarly to how you would be touching fs/filesystem.c, and
> touches kernel/sys_ni.c and init/Kconfig in much the same way.
I implemented the approach you suggested - Kconfig symbol and
cond_syscall definition. I think I actually like the previous approach
better:
1. The arch Kconfig files are quite non-uniform compared to unistd.h
so the definitions wind up at different places in the file which is a
bit messy.
2. Changes to Kconfig may cause churn in defconfigs perhaps?
3. There is more churn in arch Kconfig than unistd.h so getting a
cross arch patch applied is likely to be more difficult.
4. The patch is about 4 times as many lines.
What do you think?
From 094cbe1ca2fa28ae845ef80da6dad02e90cfbe04 Mon Sep 17 00:00:00 2001
From: Will Newton <will.newton@imgtec.com>
Date: Wed, 23 Apr 2008 15:28:37 +0100
Subject: [PATCH] Introduce ARCH_HAS_SYS_SYSFS Kconfig symbol.
This symbol should be defined by all arches that implement the sysfs(2)
system call. Arches that do not wish to implement this legacy system call
can save a little bit of kernel code size. The only current architecture
to benefit from this is blackfin, but in the future other arches may wish
to do this as well.
---
arch/alpha/Kconfig | 4 ++++
arch/arm/Kconfig | 4 ++++
arch/avr32/Kconfig | 4 ++++
arch/cris/Kconfig | 4 ++++
arch/frv/Kconfig | 4 ++++
arch/h8300/Kconfig | 4 ++++
arch/ia64/Kconfig | 4 ++++
arch/m32r/Kconfig | 4 ++++
arch/m68k/Kconfig | 4 ++++
arch/m68knommu/Kconfig | 4 ++++
arch/mips/Kconfig | 4 ++++
arch/mn10300/Kconfig | 4 ++++
arch/parisc/Kconfig | 4 ++++
arch/powerpc/Kconfig | 4 ++++
arch/ppc/Kconfig | 4 ++++
arch/s390/Kconfig | 4 ++++
arch/sh/Kconfig | 4 ++++
arch/sparc/Kconfig | 4 ++++
arch/sparc64/Kconfig | 4 ++++
arch/um/Kconfig | 4 ++++
arch/v850/Kconfig | 4 ++++
arch/x86/Kconfig | 4 ++++
arch/xtensa/Kconfig | 4 ++++
fs/filesystems.c | 4 ++++
kernel/sys_ni.c | 1 +
25 files changed, 97 insertions(+), 0 deletions(-)
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 729cdbd..9b7b4d2 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -71,6 +71,10 @@ config AUTO_IRQ_AFFINITY
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
source "init/Kconfig"
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 4039a13..c806808 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -137,6 +137,10 @@ config ZONE_DMA
bool
default y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config GENERIC_ISA_DMA
bool
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig
index 28e0caf..2f9f01d 100644
--- a/arch/avr32/Kconfig
+++ b/arch/avr32/Kconfig
@@ -66,6 +66,10 @@ config GENERIC_BUG
def_bool y
depends on BUG
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
source "init/Kconfig"
menu "System Type and features"
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig
index 9389d38..7aec04b 100644
--- a/arch/cris/Kconfig
+++ b/arch/cris/Kconfig
@@ -32,6 +32,10 @@ config ARCH_HAS_ILOG2_U64
bool
default n
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config GENERIC_FIND_NEXT_BIT
bool
default y
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig
index a5aac1b..f08fb9a 100644
--- a/arch/frv/Kconfig
+++ b/arch/frv/Kconfig
@@ -58,6 +58,10 @@ config ARCH_HAS_ILOG2_U64
bool
default y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config HZ
int
default 1000
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig
index 085dc6e..8184c99 100644
--- a/arch/h8300/Kconfig
+++ b/arch/h8300/Kconfig
@@ -69,6 +69,10 @@ config TIME_LOW_RES
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config NO_IOPORT
def_bool y
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 8fa3faf..513d960 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -111,6 +111,10 @@ config AUDIT_ARCH
bool
default y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
choice
prompt "System type"
default IA64_GENERIC
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig
index de153de..79d6f79 100644
--- a/arch/m32r/Kconfig
+++ b/arch/m32r/Kconfig
@@ -39,6 +39,10 @@ config NO_DMA
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config HZ
int
default 100
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 65db226..26859b1 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -56,6 +56,10 @@ config NO_DMA
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config HZ
int
default 100
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
index 07eb4c4..d9240a6 100644
--- a/arch/m68knommu/Kconfig
+++ b/arch/m68knommu/Kconfig
@@ -68,6 +68,10 @@ config NO_IOPORT
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
source "init/Kconfig"
menu "Processor type and features"
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 8724ed3..0716726 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -752,6 +752,10 @@ config GENERIC_HARDIRQS_NO__DO_IRQ
bool
default n
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
#
# Select some configuration options automatically based on user selections.
#
diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig
index 6a6409a..3666f5f 100644
--- a/arch/mn10300/Kconfig
+++ b/arch/mn10300/Kconfig
@@ -63,6 +63,10 @@ config GENERIC_HARDIRQS
config HOTPLUG_CPU
def_bool n
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config HZ
int
default 1000
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index bc7a19d..c6f5139 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -91,6 +91,10 @@ config ARCH_MAY_HAVE_PC_FDC
depends on BROKEN
default y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
source "init/Kconfig"
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 1189d8d..21803f2 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -194,6 +194,10 @@ config PPC_OF_PLATFORM_PCI
depends on PPC64 # not supported on 32 bits yet
default n
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
source "init/Kconfig"
source "arch/powerpc/sysdev/Kconfig"
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig
index abc877f..0156eb2 100644
--- a/arch/ppc/Kconfig
+++ b/arch/ppc/Kconfig
@@ -72,6 +72,10 @@ config GENERIC_BUG
default y
depends on BUG
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
source "init/Kconfig"
menu "Processor"
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 1831833..c04b232 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -55,6 +55,10 @@ config GENERIC_LOCKBREAK
default y
depends on SMP && PREEMPT
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
mainmenu "Linux Kernel Configuration"
config S390
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 8d2cd1d..66b74dc 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -93,6 +93,10 @@ config ARCH_SUPPORTS_AOUT
config IO_TRAPPED
bool
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
source "init/Kconfig"
menu "System type"
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index c40343c..25c17e3 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -30,6 +30,10 @@ config OF
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config HZ
int
default 100
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig
index 463d1be..9f5d1ed 100644
--- a/arch/sparc64/Kconfig
+++ b/arch/sparc64/Kconfig
@@ -90,6 +90,10 @@ config GENERIC_HARDIRQS_NO__DO_IRQ
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
choice
prompt "Kernel page size"
default SPARC64_PAGE_SIZE_8KB
diff --git a/arch/um/Kconfig b/arch/um/Kconfig
index dba8e05..be0cb93 100644
--- a/arch/um/Kconfig
+++ b/arch/um/Kconfig
@@ -68,6 +68,10 @@ config IRQ_RELEASE_METHOD
bool
default y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config HZ
int
default 100
diff --git a/arch/v850/Kconfig b/arch/v850/Kconfig
index 4379f43..b54d1f4 100644
--- a/arch/v850/Kconfig
+++ b/arch/v850/Kconfig
@@ -56,6 +56,10 @@ config ARCH_HAS_ILOG2_U64
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
# Turn off some random 386 crap that can affect device config
config ISA
bool
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 6c70fed..e0b830b 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -155,6 +155,10 @@ config GENERIC_PENDING_IRQ
depends on GENERIC_HARDIRQS && SMP
default y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config X86_SMP
bool
depends on SMP && ((X86_32 && !X86_VOYAGER) || X86_64)
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index 9fc8551..7834ad7 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -50,6 +50,10 @@ config ARCH_HAS_ILOG2_U64
config NO_IOPORT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config HZ
int
default 100
diff --git a/fs/filesystems.c b/fs/filesystems.c
index f37f872..f6e1567 100644
--- a/fs/filesystems.c
+++ b/fs/filesystems.c
@@ -118,6 +118,8 @@ int unregister_filesystem(struct file_system_type * fs)
EXPORT_SYMBOL(unregister_filesystem);
+#ifdef CONFIG_ARCH_HAS_SYS_SYSFS
+
static int fs_index(const char __user * __name)
{
struct file_system_type * tmp;
@@ -197,6 +199,8 @@ asmlinkage long sys_sysfs(int option, unsigned
long arg1, unsigned long arg2)
return retval;
}
+#endif
+
int get_filesystem_list(char * buf)
{
int len = 0;
diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c
index 5b9b467..866ff4b 100644
--- a/kernel/sys_ni.c
+++ b/kernel/sys_ni.c
@@ -121,6 +121,7 @@ cond_syscall(sys_vm86old);
cond_syscall(sys_vm86);
cond_syscall(compat_sys_ipc);
cond_syscall(compat_sys_sysctl);
+cond_syscall(sys_sysfs);
/* arch-specific weak syscall entries */
cond_syscall(sys_pciconfig_read);
--
1.5.3.5
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Introduce-ARCH_HAS_SYS_SYSFS-Kconfig-symbol.patch --]
[-- Type: text/x-patch; name=0001-Introduce-ARCH_HAS_SYS_SYSFS-Kconfig-symbol.patch, Size: 9402 bytes --]
From 094cbe1ca2fa28ae845ef80da6dad02e90cfbe04 Mon Sep 17 00:00:00 2001
From: Will Newton <will.newton@imgtec.com>
Date: Wed, 23 Apr 2008 15:28:37 +0100
Subject: [PATCH] Introduce ARCH_HAS_SYS_SYSFS Kconfig symbol.
This symbol should be defined by all arches that implement the sysfs(2)
system call. Arches that do not wish to implement this legacy system call
can save a little bit of kernel code size. The only current architecture
to benefit from this is blackfin, but in the future other arches may wish
to do this as well.
---
arch/alpha/Kconfig | 4 ++++
arch/arm/Kconfig | 4 ++++
arch/avr32/Kconfig | 4 ++++
arch/cris/Kconfig | 4 ++++
arch/frv/Kconfig | 4 ++++
arch/h8300/Kconfig | 4 ++++
arch/ia64/Kconfig | 4 ++++
arch/m32r/Kconfig | 4 ++++
arch/m68k/Kconfig | 4 ++++
arch/m68knommu/Kconfig | 4 ++++
arch/mips/Kconfig | 4 ++++
arch/mn10300/Kconfig | 4 ++++
arch/parisc/Kconfig | 4 ++++
arch/powerpc/Kconfig | 4 ++++
arch/ppc/Kconfig | 4 ++++
arch/s390/Kconfig | 4 ++++
arch/sh/Kconfig | 4 ++++
arch/sparc/Kconfig | 4 ++++
arch/sparc64/Kconfig | 4 ++++
arch/um/Kconfig | 4 ++++
arch/v850/Kconfig | 4 ++++
arch/x86/Kconfig | 4 ++++
arch/xtensa/Kconfig | 4 ++++
fs/filesystems.c | 4 ++++
kernel/sys_ni.c | 1 +
25 files changed, 97 insertions(+), 0 deletions(-)
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 729cdbd..9b7b4d2 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -71,6 +71,10 @@ config AUTO_IRQ_AFFINITY
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
source "init/Kconfig"
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 4039a13..c806808 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -137,6 +137,10 @@ config ZONE_DMA
bool
default y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config GENERIC_ISA_DMA
bool
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig
index 28e0caf..2f9f01d 100644
--- a/arch/avr32/Kconfig
+++ b/arch/avr32/Kconfig
@@ -66,6 +66,10 @@ config GENERIC_BUG
def_bool y
depends on BUG
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
source "init/Kconfig"
menu "System Type and features"
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig
index 9389d38..7aec04b 100644
--- a/arch/cris/Kconfig
+++ b/arch/cris/Kconfig
@@ -32,6 +32,10 @@ config ARCH_HAS_ILOG2_U64
bool
default n
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config GENERIC_FIND_NEXT_BIT
bool
default y
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig
index a5aac1b..f08fb9a 100644
--- a/arch/frv/Kconfig
+++ b/arch/frv/Kconfig
@@ -58,6 +58,10 @@ config ARCH_HAS_ILOG2_U64
bool
default y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config HZ
int
default 1000
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig
index 085dc6e..8184c99 100644
--- a/arch/h8300/Kconfig
+++ b/arch/h8300/Kconfig
@@ -69,6 +69,10 @@ config TIME_LOW_RES
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config NO_IOPORT
def_bool y
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 8fa3faf..513d960 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -111,6 +111,10 @@ config AUDIT_ARCH
bool
default y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
choice
prompt "System type"
default IA64_GENERIC
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig
index de153de..79d6f79 100644
--- a/arch/m32r/Kconfig
+++ b/arch/m32r/Kconfig
@@ -39,6 +39,10 @@ config NO_DMA
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config HZ
int
default 100
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 65db226..26859b1 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -56,6 +56,10 @@ config NO_DMA
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config HZ
int
default 100
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
index 07eb4c4..d9240a6 100644
--- a/arch/m68knommu/Kconfig
+++ b/arch/m68knommu/Kconfig
@@ -68,6 +68,10 @@ config NO_IOPORT
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
source "init/Kconfig"
menu "Processor type and features"
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 8724ed3..0716726 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -752,6 +752,10 @@ config GENERIC_HARDIRQS_NO__DO_IRQ
bool
default n
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
#
# Select some configuration options automatically based on user selections.
#
diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig
index 6a6409a..3666f5f 100644
--- a/arch/mn10300/Kconfig
+++ b/arch/mn10300/Kconfig
@@ -63,6 +63,10 @@ config GENERIC_HARDIRQS
config HOTPLUG_CPU
def_bool n
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config HZ
int
default 1000
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index bc7a19d..c6f5139 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -91,6 +91,10 @@ config ARCH_MAY_HAVE_PC_FDC
depends on BROKEN
default y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
source "init/Kconfig"
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 1189d8d..21803f2 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -194,6 +194,10 @@ config PPC_OF_PLATFORM_PCI
depends on PPC64 # not supported on 32 bits yet
default n
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
source "init/Kconfig"
source "arch/powerpc/sysdev/Kconfig"
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig
index abc877f..0156eb2 100644
--- a/arch/ppc/Kconfig
+++ b/arch/ppc/Kconfig
@@ -72,6 +72,10 @@ config GENERIC_BUG
default y
depends on BUG
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
source "init/Kconfig"
menu "Processor"
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 1831833..c04b232 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -55,6 +55,10 @@ config GENERIC_LOCKBREAK
default y
depends on SMP && PREEMPT
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
mainmenu "Linux Kernel Configuration"
config S390
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 8d2cd1d..66b74dc 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -93,6 +93,10 @@ config ARCH_SUPPORTS_AOUT
config IO_TRAPPED
bool
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
source "init/Kconfig"
menu "System type"
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index c40343c..25c17e3 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -30,6 +30,10 @@ config OF
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config HZ
int
default 100
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig
index 463d1be..9f5d1ed 100644
--- a/arch/sparc64/Kconfig
+++ b/arch/sparc64/Kconfig
@@ -90,6 +90,10 @@ config GENERIC_HARDIRQS_NO__DO_IRQ
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
choice
prompt "Kernel page size"
default SPARC64_PAGE_SIZE_8KB
diff --git a/arch/um/Kconfig b/arch/um/Kconfig
index dba8e05..be0cb93 100644
--- a/arch/um/Kconfig
+++ b/arch/um/Kconfig
@@ -68,6 +68,10 @@ config IRQ_RELEASE_METHOD
bool
default y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config HZ
int
default 100
diff --git a/arch/v850/Kconfig b/arch/v850/Kconfig
index 4379f43..b54d1f4 100644
--- a/arch/v850/Kconfig
+++ b/arch/v850/Kconfig
@@ -56,6 +56,10 @@ config ARCH_HAS_ILOG2_U64
config ARCH_SUPPORTS_AOUT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
# Turn off some random 386 crap that can affect device config
config ISA
bool
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 6c70fed..e0b830b 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -155,6 +155,10 @@ config GENERIC_PENDING_IRQ
depends on GENERIC_HARDIRQS && SMP
default y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config X86_SMP
bool
depends on SMP && ((X86_32 && !X86_VOYAGER) || X86_64)
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index 9fc8551..7834ad7 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -50,6 +50,10 @@ config ARCH_HAS_ILOG2_U64
config NO_IOPORT
def_bool y
+config ARCH_HAS_SYS_SYSFS
+ bool
+ default y
+
config HZ
int
default 100
diff --git a/fs/filesystems.c b/fs/filesystems.c
index f37f872..f6e1567 100644
--- a/fs/filesystems.c
+++ b/fs/filesystems.c
@@ -118,6 +118,8 @@ int unregister_filesystem(struct file_system_type * fs)
EXPORT_SYMBOL(unregister_filesystem);
+#ifdef CONFIG_ARCH_HAS_SYS_SYSFS
+
static int fs_index(const char __user * __name)
{
struct file_system_type * tmp;
@@ -197,6 +199,8 @@ asmlinkage long sys_sysfs(int option, unsigned long arg1, unsigned long arg2)
return retval;
}
+#endif
+
int get_filesystem_list(char * buf)
{
int len = 0;
diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c
index 5b9b467..866ff4b 100644
--- a/kernel/sys_ni.c
+++ b/kernel/sys_ni.c
@@ -121,6 +121,7 @@ cond_syscall(sys_vm86old);
cond_syscall(sys_vm86);
cond_syscall(compat_sys_ipc);
cond_syscall(compat_sys_sysctl);
+cond_syscall(sys_sysfs);
/* arch-specific weak syscall entries */
cond_syscall(sys_pciconfig_read);
--
1.5.3.5
next prev parent reply other threads:[~2008-04-23 14:36 UTC|newest]
Thread overview: 91+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-22 12:13 [RFC] Introduce __ARCH_WANT_SYS_SYSFS Will Newton
2008-04-22 12:13 ` Will Newton
2008-04-22 13:15 ` Arnd Bergmann
2008-04-22 13:15 ` Arnd Bergmann
[not found] ` <200804221515.28075.arnd-r2nGTMty4D4@public.gmane.org>
2008-04-23 21:16 ` Michal Simek
2008-04-23 21:16 ` Michal Simek
[not found] ` <480FA729.3000406-9Vj9tDbzfuSlVyrhU4qvOw@public.gmane.org>
2008-04-23 21:38 ` Mike Frysinger
2008-04-23 21:38 ` Mike Frysinger
2008-04-24 11:11 ` microblaze syscall list Arnd Bergmann
2008-04-24 11:11 ` Arnd Bergmann
2008-04-24 18:42 ` Michal Simek
2008-04-24 18:42 ` Michal Simek
[not found] ` <4810D4A4.7050900-9Vj9tDbzfuSlVyrhU4qvOw@public.gmane.org>
2008-04-24 21:21 ` Arnd Bergmann
2008-04-24 21:21 ` Arnd Bergmann
2008-04-25 9:36 ` [microblaze-uclinux] " John Williams
2008-04-25 9:36 ` John Williams
[not found] ` <4811A623.80104-rVRm/Wmeqae7NGdpmJTKYQ@public.gmane.org>
2008-04-25 10:06 ` Matthew Wilcox
2008-04-25 10:06 ` Matthew Wilcox
[not found] ` <20080425100614.GB14990-6jwH94ZQLHl74goWV3ctuw@public.gmane.org>
2008-04-25 11:32 ` Geert Uytterhoeven
2008-04-25 11:32 ` Geert Uytterhoeven
2008-04-27 2:04 ` John Williams
2008-04-27 2:04 ` John Williams
[not found] ` <4813DF3E.6080800-rVRm/Wmeqae7NGdpmJTKYQ@public.gmane.org>
2008-04-27 15:52 ` Michal Simek
2008-04-27 15:52 ` Michal Simek
[not found] ` <4814A153.3040600-9Vj9tDbzfuSlVyrhU4qvOw@public.gmane.org>
2008-04-27 16:50 ` Alan Cox
2008-04-27 16:50 ` Alan Cox
2008-04-27 20:15 ` Arnd Bergmann
2008-04-27 20:15 ` Arnd Bergmann
[not found] ` <200804272215.32862.arnd-r2nGTMty4D4@public.gmane.org>
2008-04-28 0:15 ` John Williams
2008-04-28 0:15 ` John Williams
2008-04-28 12:31 ` Arnd Bergmann
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-02 8:18 ` Michal Simek
2008-05-03 3:49 ` John Williams
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-04 22:53 ` H. Peter Anvin
2008-05-06 8:33 ` Michal Simek
2008-04-28 3:58 ` Stephen Neuendorffer
[not found] ` <200804241311.09881.arnd-r2nGTMty4D4@public.gmane.org>
2008-04-24 20:51 ` Michal Simek
2008-04-24 20:51 ` Michal Simek
[not found] ` <4988.7968-24314-1195487808-1209070282-9Vj9tDbzfuSlVyrhU4qvOw@public.gmane.org>
2008-04-24 21:37 ` Arnd Bergmann
2008-04-24 21:37 ` Arnd Bergmann
[not found] ` <87a5b0800804220513t75690ceao938a288596b5ad0c-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-04-22 15:12 ` [RFC] Introduce __ARCH_WANT_SYS_SYSFS Randy Dunlap
2008-04-22 15:12 ` Randy Dunlap
[not found] ` <20080422081211.e85989ec.randy.dunlap-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2008-04-22 15:16 ` Will Newton
2008-04-22 15:16 ` Will Newton
[not found] ` <87a5b0800804220816y72a7f4f9gec2111df08a1a57f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-04-22 15:24 ` Kyle McMartin
2008-04-22 15:24 ` Kyle McMartin
[not found] ` <20080422152426.GG19802-EK4dZfYtfFRW/gs8oUvUg/d9D2ou9A/h@public.gmane.org>
2008-04-22 15:34 ` Will Newton
2008-04-22 15:34 ` Will Newton
[not found] ` <87a5b0800804220834q4d6daec1x4146d211115ab5c-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-04-22 15:38 ` Kyle McMartin
2008-04-22 15:38 ` Kyle McMartin
[not found] ` <20080422153849.GH19802-EK4dZfYtfFRW/gs8oUvUg/d9D2ou9A/h@public.gmane.org>
2008-04-23 14:36 ` Will Newton [this message]
2008-04-23 14:36 ` Will Newton
[not found] ` <87a5b0800804230736k340e7fe9mffbd72b5b8164015-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-04-23 14:59 ` Arnd Bergmann
2008-04-23 14:59 ` Arnd Bergmann
2008-04-23 15:40 ` Kyle McMartin
2008-04-23 15:40 ` Kyle McMartin
[not found] ` <20080423154038.GL19802-EK4dZfYtfFRW/gs8oUvUg/d9D2ou9A/h@public.gmane.org>
2008-04-23 15:50 ` Will Newton
2008-04-23 15:50 ` Will Newton
2008-04-23 16:05 ` Mike Frysinger
2008-04-23 16:05 ` Mike Frysinger
[not found] ` <8bd0f97a0804230905x19fd96aevc8f225d241e59369-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-04-23 17:59 ` Mike Frysinger
2008-04-23 17:59 ` Mike Frysinger
[not found] ` <8bd0f97a0804231059w76592878s3f6bf4a488b3ddea-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-04-24 9:18 ` Will Newton
2008-04-24 9:18 ` Will Newton
2008-04-23 18:44 ` Sam Ravnborg
2008-04-23 18:44 ` Sam Ravnborg
2008-04-24 14:51 ` Adrian Bunk
2008-04-24 14:51 ` Adrian Bunk
2008-04-22 15:21 ` Kyle McMartin
2008-04-22 15:21 ` Kyle McMartin
[not found] ` <20080422152122.GF19802-EK4dZfYtfFRW/gs8oUvUg/d9D2ou9A/h@public.gmane.org>
2008-04-22 15:38 ` Arnd Bergmann
2008-04-22 15:38 ` Arnd Bergmann
2008-04-22 15:42 ` Kyle McMartin
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=87a5b0800804230736k340e7fe9mffbd72b5b8164015@mail.gmail.com \
--to=will.newton-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=kyle-pfcGkIkfWfAsA/PxXw9srA@public.gmane.org \
--cc=linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=randy.dunlap-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.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).