[PATCH] ia64: fix noncoherent DMA API so devres builds

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b7de8e7e3c7b79a72c20c7fd58bd65df3d146b13
Commit: b7de8e7e3c7b79a72c20c7fd58bd65df3d146b13
Parent: ac98695d6c1508b724f246f38ce57fb4e3cec356
Author: Roland Dreier [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:32:53 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:51 2007 -0800

[PATCH] ia64: fix noncoherent DMA API so devres builds

On ia64, drivers/base/dma-mapping.c doesn't build because it calls
dma_alloc_noncoherent() and dma_free_noncoherent(), which appear to be
terminally broken; the calls end up generating errors like

drivers/base/dma-mapping.c: In function 'dmam_noncoherent_release':
drivers/base/dma-mapping.c:32: error: 'struct ia64_machine_vector' has 
no member named 'platform_dma_free_coherent'

because the multiple levels of macro expansion in asm/dma-mapping.h and
asm/machvec.h end up turning a call to dma_free_noncoherent() into
ia64_mv.platform_dma_free_coherent (instead of the intended
ia64_mv.dma_free_coherent).

This patch fixes this by converting dma_{alloc,free}_noncoherent() into
inline functions that call the corresponding coherent functions, instead of
trying to do this with macros.

Signed-off-by: Roland Dreier [EMAIL PROTECTED]
Acked-by: Tony Luck [EMAIL PROTECTED]
Cc: Al Viro [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/asm-ia64/dma-mapping.h |   15 +--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/include/asm-ia64/dma-mapping.h b/include/asm-ia64/dma-mapping.h
index ebd5887..6299b51 100644
--- a/include/asm-ia64/dma-mapping.h
+++ b/include/asm-ia64/dma-mapping.h
@@ -8,9 +8,20 @@
 #include asm/machvec.h
 
 #define dma_alloc_coherent platform_dma_alloc_coherent
-#define dma_alloc_noncoherent  platform_dma_alloc_coherent /* coherent 
mem. is cheap */
+/* coherent mem. is cheap */
+static inline void *
+dma_alloc_noncoherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
+ gfp_t flag)
+{
+   return dma_alloc_coherent(dev, size, dma_handle, flag);
+}
 #define dma_free_coherent  platform_dma_free_coherent
-#define dma_free_noncoherent   platform_dma_free_coherent
+static inline void
+dma_free_noncoherent(struct device *dev, size_t size, void *cpu_addr,
+dma_addr_t dma_handle)
+{
+   dma_free_coherent(dev, size, cpu_addr, dma_handle);
+}
 #define dma_map_single platform_dma_map_single
 #define dma_map_sg platform_dma_map_sg
 #define dma_unmap_single   platform_dma_unmap_single
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] search a little harder for mkimage

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8c7e4498adfdb4aea5a0d056590ec18d099ba062
Commit: 8c7e4498adfdb4aea5a0d056590ec18d099ba062
Parent: b7de8e7e3c7b79a72c20c7fd58bd65df3d146b13
Author: Mike Frysinger [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:32:54 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:51 2007 -0800

[PATCH] search a little harder for mkimage

Check to see if `${CROSS_COMPILE}mkimage` exists and if not, fall back to
the standard `mkimage`

The Blackfin toolchain includes mkimage, but we dont want to namespace
collide with any of the user's system setup, so we prefix it with our
toolchain name.

Signed-off-by: Mike Frysinger [EMAIL PROTECTED]
Cc: Sam Ravnborg [EMAIL PROTECTED]
Cc: Oleg Verych [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 scripts/mkuboot.sh |   11 +++
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/scripts/mkuboot.sh b/scripts/mkuboot.sh
index 52a17ab..4b06c5e 100755
--- a/scripts/mkuboot.sh
+++ b/scripts/mkuboot.sh
@@ -4,12 +4,15 @@
 # Build U-Boot image when `mkimage' tool is available.
 #
 
-MKIMAGE=$(type -path mkimage)
+MKIMAGE=$(type -path ${CROSS_COMPILE}mkimage)
 
 if [ -z ${MKIMAGE} ]; then
-   # Doesn't exist
-   echo 'mkimage command not found - U-Boot images will not be built' 2
-   exit 0;
+   MKIMAGE=$(type -path mkimage)
+   if [ -z ${MKIMAGE} ]; then
+   # Doesn't exist
+   echo 'mkimage command not found - U-Boot images will not be 
built' 2
+   exit 0;
+   fi
 fi
 
 # Call mkimage to create U-Boot image
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] Make mkcompile_h use LANG=C and LC_ALL=C for $CC -v

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=895a39a084e5478121a74752a291165c4502378f
Commit: 895a39a084e5478121a74752a291165c4502378f
Parent: 8c7e4498adfdb4aea5a0d056590ec18d099ba062
Author: s situert [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:32:55 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:51 2007 -0800

[PATCH] Make mkcompile_h use LANG=C and LC_ALL=C for $CC -v

Fix a minor bug in mkcompile_h.  As one can see, the current locale is used
while getting the version of gcc.  This produces problems when a locale
other than C or en_US is used.  As an example, my /proc/version contains
Turkish characters in iso-8859-9 encoding.

This patch fixes this issue by making sure that the C locale is used to get
gcc's version.

Cc: Sam Ravnborg [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 scripts/mkcompile_h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
index d7b8a38..82d0af4 100755
--- a/scripts/mkcompile_h
+++ b/scripts/mkcompile_h
@@ -58,7 +58,7 @@ UTS_TRUNCATE=sed -e s/\(.\{1,$UTS_LEN\}\).*/\1/
 echo \#define LINUX_COMPILE_DOMAIN
   fi
 
-  echo \#define LINUX_COMPILER \`$CC -v 21 | tail -n 1`\
+  echo \#define LINUX_COMPILER \`LC_ALL=C LANG=C $CC -v 21 | tail -n 1`\
 )  .tmpcompile
 
 # Only replace the real compile.h if the new one is different,
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] qconf: immediately update integer and string values in xconfig display

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=49e5646d6538f3a1c6697770f0bec2b2a0b7f30e
Commit: 49e5646d6538f3a1c6697770f0bec2b2a0b7f30e
Parent: e0ab1ec9fcd3799e874ff9086729a480f6c06cd3
Author: Karsten Wiese [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:32:57 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:51 2007 -0800

[PATCH] qconf: immediately update integer and string values in xconfig 
display

In xconfig's display integer and string values are also shown as part of
the config item's descriptive text.

This patch updates the descriptive text, when the corresponding value has
been changed.  Fix for http://bugzilla.kernel.org/show_bug.cgi?id=7744

Take2 uses updateList() so config values dependending on the changed value
see the change.

Signed-off-by: Karsten Wiese [EMAIL PROTECTED]
Cc: Roman Zippel [EMAIL PROTECTED]
Cc: Randy Dunlap [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 scripts/kconfig/qconf.cc |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index c0ae0a7..52a0367 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -89,6 +89,7 @@ void ConfigItem::okRename(int col)
 {
Parent::okRename(col);
sym_set_string_value(menu-sym, text(dataColIdx).latin1());
+   listView()-updateList(this);
 }
 #endif
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] add .mailmap for proper git-shortlog output

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e0ab1ec9fcd3799e874ff9086729a480f6c06cd3
Commit: e0ab1ec9fcd3799e874ff9086729a480f6c06cd3
Parent: 895a39a084e5478121a74752a291165c4502378f
Author: Nicolas Pitre [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:32:56 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:51 2007 -0800

[PATCH] add .mailmap for proper git-shortlog output

This list was built into the git-shortlog tool and has been removed in the
latest version.  It should be maintained separately so this is what this
patch does.

A couple more entries were added to the original list as well.

Signed-off-by: Nicolas Pitre [EMAIL PROTECTED]
Acked-by: Junio C Hamano [EMAIL PROTECTED]
Cc: Linus Torvalds [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 .mailmap |   96 ++
 1 files changed, 96 insertions(+), 0 deletions(-)

diff --git a/.mailmap b/.mailmap
new file mode 100644
index 000..bf62dbe
--- /dev/null
+++ b/.mailmap
@@ -0,0 +1,96 @@
+#
+# This list is used by git-shortlog to fix a few botched name translations
+# in the git archive, either because the author's full name was messed up
+# and/or not always written the same way, making contributions from the
+# same person appearing not to be so or badly displayed.
+#
+# repo-abbrev: /pub/scm/linux/kernel/git/
+#
+
+Aaron Durbin [EMAIL PROTECTED]
+Adam Oldham [EMAIL PROTECTED]
+Adam Radford [EMAIL PROTECTED]
+Adrian Bunk [EMAIL PROTECTED]
+Alan Cox [EMAIL PROTECTED]
+Alan Cox [EMAIL PROTECTED]
+Aleksey Gorelov [EMAIL PROTECTED]
+Al Viro [EMAIL PROTECTED]
+Al Viro [EMAIL PROTECTED]
+Andreas Herrmann [EMAIL PROTECTED]
+Andrew Morton [EMAIL PROTECTED]
+Andrew Vasquez [EMAIL PROTECTED]
+Andy Adamson [EMAIL PROTECTED]
+Arnaud Patard [EMAIL PROTECTED]
+Arnd Bergmann [EMAIL PROTECTED]
+Axel Dyks [EMAIL PROTECTED]
+Ben Gardner [EMAIL PROTECTED]
+Ben M Cahill [EMAIL PROTECTED]
+Björn Steinbrink [EMAIL PROTECTED]
+Brian Avery [EMAIL PROTECTED]
+Brian King [EMAIL PROTECTED]
+Christoph Hellwig [EMAIL PROTECTED]
+Corey Minyard [EMAIL PROTECTED]
+David Brownell [EMAIL PROTECTED]
+David Woodhouse [EMAIL PROTECTED]
+Domen Puncer [EMAIL PROTECTED]
+Douglas Gilbert [EMAIL PROTECTED]
+Ed L. Cashin [EMAIL PROTECTED]
+Evgeniy Polyakov [EMAIL PROTECTED]
+Felipe W Damasio [EMAIL PROTECTED]
+Felix Kuhling [EMAIL PROTECTED]
+Felix Moeller [EMAIL PROTECTED]
+Filipe Lautert [EMAIL PROTECTED]
+Franck Bui-Huu [EMAIL PROTECTED]
+Frank Zago [EMAIL PROTECTED]
+Greg Kroah-Hartman [EMAIL PROTECTED](none)
+Greg Kroah-Hartman [EMAIL PROTECTED]
+Greg Kroah-Hartman [EMAIL PROTECTED]
+Henk Vergonet [EMAIL PROTECTED]
+Henrik Kretzschmar [EMAIL PROTECTED]
+Herbert Xu [EMAIL PROTECTED]
+Jacob Shin [EMAIL PROTECTED]
+James Bottomley [EMAIL PROTECTED](none)
+James Bottomley [EMAIL PROTECTED]
+James E Wilson [EMAIL PROTECTED]
+James Ketrenos [EMAIL PROTECTED](none)
+Jean Tourrilhes [EMAIL PROTECTED]
+Jeff Garzik [EMAIL PROTECTED]
+Jens Axboe [EMAIL PROTECTED]
+Jens Osterkamp [EMAIL PROTECTED]
+John Stultz [EMAIL PROTECTED]
+Juha Yrjola at solidboot.com
+Juha Yrjola [EMAIL PROTECTED]
+Juha Yrjola [EMAIL PROTECTED]
+Kay Sievers [EMAIL PROTECTED]
+Kenneth W Chen [EMAIL PROTECTED]
+Koushik [EMAIL PROTECTED]
+Leonid I Ananiev [EMAIL PROTECTED]
+Linas Vepstas [EMAIL PROTECTED]
+Matthieu CASTET [EMAIL PROTECTED]
+Michel Dänzer [EMAIL PROTECTED]
+Mitesh shah [EMAIL PROTECTED]
+Morten Welinder [EMAIL PROTECTED]
+Morten Welinder [EMAIL PROTECTED]
+Morten Welinder [EMAIL PROTECTED]
+Morten Welinder [EMAIL PROTECTED]
+Nguyen Anh Quynh [EMAIL PROTECTED]
+Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED]
+Patrick Mochel [EMAIL PROTECTED]
+Peter A Jonsson [EMAIL PROTECTED]
+Praveen BP [EMAIL PROTECTED]
+Rajesh Shah [EMAIL PROTECTED]
+Ralf Baechle [EMAIL PROTECTED]
+Ralf Wildenhues [EMAIL PROTECTED]
+Rémi Denis-Courmont [EMAIL PROTECTED]
+Rudolf Marek [EMAIL PROTECTED]
+Rui Saraiva [EMAIL PROTECTED]
+Sachin P Sant [EMAIL PROTECTED]
+Sam Ravnborg [EMAIL PROTECTED]
+Simon Kelley [EMAIL PROTECTED]
+Stéphane Witzmann [EMAIL PROTECTED]
+Stephen Hemminger [EMAIL PROTECTED]
+Tejun Heo [EMAIL PROTECTED]
+Thomas Graf [EMAIL PROTECTED]
+Tony Luck [EMAIL PROTECTED]
+Tsuneo Yoshioka [EMAIL PROTECTED]
+Valdis Kletnieks [EMAIL PROTECTED]
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] qconf: relocate Search Command

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=66e7c7230fed159e138fc1292ee662b8bbdb74d6
Commit: 66e7c7230fed159e138fc1292ee662b8bbdb74d6
Parent: 49e5646d6538f3a1c6697770f0bec2b2a0b7f30e
Author: Shlomi Fish [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:32:58 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:51 2007 -0800

[PATCH] qconf: relocate Search Command

Relocate the qconf search command to the Edit-Find menu option.

This is per the discussion on my qconf search dialog patch.

Cc: Sam Ravnborg [EMAIL PROTECTED]
Cc: Roman Zippel [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 scripts/kconfig/qconf.cc |9 ++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 52a0367..83a2703 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -1317,7 +1317,7 @@ ConfigMainWindow::ConfigMainWindow(void)
conf_changed();
QAction *saveAsAction = new QAction(Save As..., Save As..., 0, 
this);
  connect(saveAsAction, SIGNAL(activated()), SLOT(saveConfigAs()));
-   QAction *searchAction = new QAction(Search, Search, CTRL+Key_F, 
this);
+   QAction *searchAction = new QAction(Find, Find, CTRL+Key_F, this);
  connect(searchAction, SIGNAL(activated()), SLOT(searchConfig()));
QAction *singleViewAction = new QAction(Single View, 
QPixmap(xpm_single_view), Split View, 0, this);
  connect(singleViewAction, SIGNAL(activated()), 
SLOT(showSingleView()));
@@ -1374,10 +1374,13 @@ ConfigMainWindow::ConfigMainWindow(void)
saveAction-addTo(config);
saveAsAction-addTo(config);
config-insertSeparator();
-   searchAction-addTo(config);
-   config-insertSeparator();
quitAction-addTo(config);
 
+   // create edit menu
+   QPopupMenu* editMenu = new QPopupMenu(this);
+   menu-insertItem(Edit, editMenu);
+   searchAction-addTo(editMenu);
+
// create options menu
QPopupMenu* optionMenu = new QPopupMenu(this);
menu-insertItem(Option, optionMenu);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] Kbuild: Remove references to deprecated prepare-all target from Makefile

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d395efb544aba803ffe42b16a1862be655aca369
Commit: d395efb544aba803ffe42b16a1862be655aca369
Parent: f253f3c3fed0355cf49482f24c56bc5dbea6
Author: Robert P. J. Day [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:01 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:52 2007 -0800

[PATCH] Kbuild: Remove references to deprecated prepare-all target from 
Makefile

Remove references to the deprecated make prepare-all target from the
top-level Makefile; use just make prepare instead.

Signed-off-by: Robert P. J. Day [EMAIL PROTECTED]
Cc: Sam Ravnborg [EMAIL PROTECTED]
Acked-by: Oleg Verych [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 Makefile |5 +
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 7e4968f..678119c 100644
--- a/Makefile
+++ b/Makefile
@@ -825,9 +825,6 @@ include/config/kernel.release: include/config/auto.conf 
FORCE
 # Listed in dependency order
 PHONY += prepare archprepare prepare0 prepare1 prepare2 prepare3
 
-# prepare-all is deprecated, use prepare as valid replacement
-PHONY += prepare-all
-
 # prepare3 is used to check if we are building in a separate output directory,
 # and if so do:
 # 1) Check that make has not been executed in the kernel src $(srctree)
@@ -860,7 +857,7 @@ prepare0: archprepare FORCE
$(Q)$(MAKE) $(build)=.
 
 # All the preparing..
-prepare prepare-all: prepare0
+prepare: prepare0
 
 # Leave this as default for preprocessing vmlinux.lds.S, which is now
 # done in arch/$(ARCH)/kernel/Makefile
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] new toplevel target: headers_check_all

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1f85712e6e1f2450ec4fd2ab18f8887bf7280f8e
Commit: 1f85712e6e1f2450ec4fd2ab18f8887bf7280f8e
Parent: d395efb544aba803ffe42b16a1862be655aca369
Author: Mike Frysinger [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:02 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:52 2007 -0800

[PATCH] new toplevel target: headers_check_all

Add new headers_check_all target for checking all arches in one go.

Useful for distros (and people with too much time on their hands) that 
support
a ton of architectures, headers_check_all is to headers_check as
headers_install_all is to headers_install

Signed-off-by: Mike Frysinger [EMAIL PROTECTED]
Cc: David Woodhouse [EMAIL PROTECTED]
Cc: Sam Ravnborg [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 Makefile |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index 678119c..b6c8790 100644
--- a/Makefile
+++ b/Makefile
@@ -928,6 +928,12 @@ headers_install: include/linux/version.h scripts_basic 
FORCE
$(Q)$(MAKE) $(build)=scripts scripts/unifdef
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.headersinst obj=include
 
+PHONY += headers_check_all
+headers_check_all: headers_install_all
+   $(Q)for arch in $(HDRARCHES); do \
+$(MAKE) ARCH=$$arch -f $(srctree)/scripts/Makefile.headersinst 
obj=include BIASMDIR=-bi-$$arch HDRCHECK=1 ;\
+done
+
 PHONY += headers_check
 headers_check: headers_install
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.headersinst obj=include 
HDRCHECK=1
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] qconf: Back button behaviour normalization

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f253f3c3fed0355cf49482f24c56bc5dbea6
Commit: f253f3c3fed0355cf49482f24c56bc5dbea6
Parent: 786fb18d015cc5f34284d426e055ddd7a3dbb53b
Author: Cyrill V. Gorcunov [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:00 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:52 2007 -0800

[PATCH] qconf: Back button behaviour normalization

Do Back button behaviour normalization so it is enabled starting from
second-level menu only.

Signed-off-by: Cyrill V. Gorcunov [EMAIL PROTECTED]
Cc: Roman Zippel [EMAIL PROTECTED]
Cc: Sam Ravnborg [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 scripts/kconfig/qconf.cc |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 9912445..0981d2a 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -1472,7 +1472,10 @@ void ConfigMainWindow::searchConfig(void)
 void ConfigMainWindow::changeMenu(struct menu *menu)
 {
configList-setRootMenu(menu);
-   backAction-setEnabled(TRUE);
+   if (configList-rootEntry-parent == rootmenu)
+   backAction-setEnabled(FALSE);
+   else
+   backAction-setEnabled(TRUE);
 }
 
 void ConfigMainWindow::setMenuLink(struct menu *menu)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] 8250 UART backup timer

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=40b36daad0ac704e6d5c1b75789f371ef5b053c1
Commit: 40b36daad0ac704e6d5c1b75789f371ef5b053c1
Parent: ed8b4d4d7a31923db32f4684535944d69eb43677
Author: Alex Williamson [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:04 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:52 2007 -0800

[PATCH] 8250 UART backup timer

The patch below works around a minor bug found in the UART of the remote
management card used in many HP ia64 and parisc servers (aka the Diva
UARTs).  The problem is that the UART does not reassert the THRE interrupt
if it has been previously cleared and the IIR THRI bit is re-enabled.  This
can produce a very annoying failure mode when used as a serial console,
allowing a boot/reboot to hang indefinitely until an RX interrupt kicks it
into working again (ie.  an unattended reboot could stall).

To solve this problem, a backup timer is introduced that runs alongside the
standard interrupt driven mechanism.  This timer wakes up periodically,
checks for a hang condition and gets characters moving again.  This backup
mechanism is only enabled if the UART is detected as having this problem,
so systems without these UARTs will have no additional overhead.

This version of the patch incorporates previous comments from Pavel and
removes races in the bug detection code.  The test is now done before the
irq linking to prevent races with interrupt handler clearing the THRE
interrupt.  Short delays and syncs are also added to ensure the device is
able to update register state before the result is tested.

Aristeu says:

  this was tested on the following HP machines and solved the problem:
  rx2600, rx2620, rx1600 and rx1620s.

hpa says:

  I have seen this same bug in soft UART IP from a major vendor.

Signed-off-by: Alex Williamson [EMAIL PROTECTED]
Cc: H. Peter Anvin [EMAIL PROTECTED]
Cc: Russell King [EMAIL PROTECTED]
Acked-by: Aristeu Sergio Rozanski Filho [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/serial/8250.c |  178 +
 1 files changed, 134 insertions(+), 44 deletions(-)

diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 2964ca9..98ec861 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -364,6 +364,23 @@ serial_out(struct uart_8250_port *up, int offset, int 
value)
}
 }
 
+static void
+serial_out_sync(struct uart_8250_port *up, int offset, int value)
+{
+   switch (up-port.iotype) {
+   case UPIO_MEM:
+   case UPIO_MEM32:
+#ifdef CONFIG_SERIAL_8250_AU1X00
+   case UPIO_AU:
+#endif
+   serial_out(up, offset, value);
+   serial_in(up, UART_LCR);/* safe, no side-effects */
+   break;
+   default:
+   serial_out(up, offset, value);
+   }
+}
+
 /*
  * We used to support using pause I/O for certain machines.  We
  * haven't supported this for a while, but just in case it's badly
@@ -1045,7 +1062,7 @@ static void autoconfig(struct uart_8250_port *up, 
unsigned int probeflags)
 #endif
serial_outp(up, UART_MCR, save_mcr);
serial8250_clear_fifos(up);
-   (void)serial_in(up, UART_RX);
+   serial_in(up, UART_RX);
if (up-capabilities  UART_CAP_UUE)
serial_outp(up, UART_IER, UART_IER_UUE);
else
@@ -1451,6 +1468,12 @@ static void serial_unlink_irq_chain(struct 
uart_8250_port *up)
serial_do_unlink(i, up);
 }
 
+/* Base timer interval for polling */
+static inline int poll_timeout(int timeout)
+{
+   return timeout  6 ? (timeout / 2 - 2) : 1;
+}
+
 /*
  * This function is used to handle ports that do not have an
  * interrupt.  This doesn't work very well for 16450's, but gives
@@ -1460,16 +1483,51 @@ static void serial_unlink_irq_chain(struct 
uart_8250_port *up)
 static void serial8250_timeout(unsigned long data)
 {
struct uart_8250_port *up = (struct uart_8250_port *)data;
-   unsigned int timeout;
unsigned int iir;
 
iir = serial_in(up, UART_IIR);
if (!(iir  UART_IIR_NO_INT))
serial8250_handle_port(up);
+   mod_timer(up-timer, jiffies + poll_timeout(up-port.timeout));
+}
+
+static void serial8250_backup_timeout(unsigned long data)
+{
+   struct uart_8250_port *up = (struct uart_8250_port *)data;
+   unsigned int iir, ier = 0;
+
+   /*
+* Must disable interrupts or else we risk racing with the interrupt
+* based handler.
+*/
+   if (is_real_interrupt(up-port.irq)) {
+   ier = serial_in(up, UART_IER);
+   serial_out(up, UART_IER, 0);
+   }
 
-   timeout = up-port.timeout;
-   timeout = timeout  

[PATCH] serial: trivial code flow simplification

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9b22271d4b8c1be8a81563c322d3f04e7cbe2153
Commit: 9b22271d4b8c1be8a81563c322d3f04e7cbe2153
Parent: 40b36daad0ac704e6d5c1b75789f371ef5b053c1
Author: Bjorn Helgaas [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:05 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:52 2007 -0800

[PATCH] serial: trivial code flow simplification

Return failure immediately, so we don't have to test it twice.

Signed-off-by: Bjorn Helgaas [EMAIL PROTECTED]
Cc: Adam Belay [EMAIL PROTECTED]
Cc: Russell King [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/serial/8250_pnp.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/serial/8250_pnp.c b/drivers/serial/8250_pnp.c
index d3d6b82..cde5db4 100644
--- a/drivers/serial/8250_pnp.c
+++ b/drivers/serial/8250_pnp.c
@@ -450,11 +450,11 @@ serial_pnp_probe(struct pnp_dev *dev, const struct 
pnp_device_id *dev_id)
port.dev = dev-dev;
 
line = serial8250_register_port(port);
+   if (line  0)
+   return -ENODEV;
 
-   if (line = 0)
-   pnp_set_drvdata(dev, (void *)((long)line + 1));
-   return line = 0 ? 0 : -ENODEV;
-
+   pnp_set_drvdata(dev, (void *)((long)line + 1));
+   return 0;
 }
 
 static void __devexit serial_pnp_remove(struct pnp_dev *dev)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] serial: make sure UART is powered up when dumping MCTRL status

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3689a0ec60bc8f56cc372c1dfa0d89dab48f7c9c
Commit: 3689a0ec60bc8f56cc372c1dfa0d89dab48f7c9c
Parent: 9b22271d4b8c1be8a81563c322d3f04e7cbe2153
Author: George G. Davis [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:06 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:52 2007 -0800

[PATCH] serial: make sure UART is powered up when dumping MCTRL status

Since serial devices are powered down when not in use and some of those
devices cannot be accessed when powered down, we need to enable power
around calls to get_mcrtl() when dumping port state via uart_line_info().
This resolves hangs observed on some machines while reading serial device
registers when a port is powered off.

Signed-off-by: George G. Davis [EMAIL PROTECTED]
Cc: Russell King [EMAIL PROTECTED]
Cc: Alan Cox [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/serial/serial_core.c |   11 +++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index f84982e..66fdd3b 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -1660,6 +1660,7 @@ static const char *uart_type(struct uart_port *port)
 static int uart_line_info(char *buf, struct uart_driver *drv, int i)
 {
struct uart_state *state = drv-state + i;
+   int pm_state;
struct uart_port *port = state-port;
char stat_buf[32];
unsigned int status;
@@ -1682,9 +1683,16 @@ static int uart_line_info(char *buf, struct uart_driver 
*drv, int i)
 
if(capable(CAP_SYS_ADMIN))
{
+   mutex_lock(state-mutex);
+   pm_state = state-pm_state;
+   if (pm_state)
+   uart_change_pm(state, 0);
spin_lock_irq(port-lock);
status = port-ops-get_mctrl(port);
spin_unlock_irq(port-lock);
+   if (pm_state)
+   uart_change_pm(state, pm_state);
+   mutex_unlock(state-mutex);
 
ret += sprintf(buf + ret,  tx:%d rx:%d,
port-icount.tx, port-icount.rx);
@@ -2100,6 +2108,9 @@ uart_configure_port(struct uart_driver *drv, struct 
uart_state *state,
 
uart_report_port(drv, port);
 
+   /* Power up port for set_mctrl() */
+   uart_change_pm(state, 0);
+
/*
 * Ensure that the modem control lines are de-activated.
 * We probably don't need a spinlock around this, but
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] serial: replace kmalloc+memset with kzalloc

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8f31bb39ec2a5622974666c72257e74c22492602
Commit: 8f31bb39ec2a5622974666c72257e74c22492602
Parent: 3689a0ec60bc8f56cc372c1dfa0d89dab48f7c9c
Author: Burman Yan [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:07 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:52 2007 -0800

[PATCH] serial: replace kmalloc+memset with kzalloc

Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/serial/8250_acorn.c |3 +--
 drivers/serial/8250_pci.c   |5 +
 drivers/serial/icom.c   |4 +---
 drivers/serial/ioc3_serial.c|6 ++
 drivers/serial/ioc4_serial.c|9 +++--
 drivers/serial/ip22zilog.c  |8 +---
 drivers/serial/jsm/jsm_driver.c |6 ++
 drivers/serial/jsm/jsm_tty.c|   12 
 drivers/serial/serial_core.c|7 ++-
 drivers/serial/serial_cs.c  |3 +--
 10 files changed, 18 insertions(+), 45 deletions(-)

diff --git a/drivers/serial/8250_acorn.c b/drivers/serial/8250_acorn.c
index ef8cc8a..562ba74 100644
--- a/drivers/serial/8250_acorn.c
+++ b/drivers/serial/8250_acorn.c
@@ -47,11 +47,10 @@ serial_card_probe(struct expansion_card *ec, const struct 
ecard_id *id)
unsigned long bus_addr;
unsigned int i;
 
-   info = kmalloc(sizeof(struct serial_card_info), GFP_KERNEL);
+   info = kzalloc(sizeof(struct serial_card_info), GFP_KERNEL);
if (!info)
return -ENOMEM;
 
-   memset(info, 0, sizeof(struct serial_card_info));
info-num_ports = type-num_ports;
 
bus_addr = ecard_resource_start(ec, type-type);
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c
index a2dac37..2989228 100644
--- a/drivers/serial/8250_pci.c
+++ b/drivers/serial/8250_pci.c
@@ -1628,7 +1628,7 @@ pciserial_init_ports(struct pci_dev *dev, struct 
pciserial_board *board)
nr_ports = rc;
}
 
-   priv = kmalloc(sizeof(struct serial_private) +
+   priv = kzalloc(sizeof(struct serial_private) +
   sizeof(unsigned int) * nr_ports,
   GFP_KERNEL);
if (!priv) {
@@ -1636,9 +1636,6 @@ pciserial_init_ports(struct pci_dev *dev, struct 
pciserial_board *board)
goto err_deinit;
}
 
-   memset(priv, 0, sizeof(struct serial_private) +
-   sizeof(unsigned int) * nr_ports);
-
priv-dev = dev;
priv-quirk = quirk;
 
diff --git a/drivers/serial/icom.c b/drivers/serial/icom.c
index 71e6a24..1c4c381 100644
--- a/drivers/serial/icom.c
+++ b/drivers/serial/icom.c
@@ -1417,14 +1417,12 @@ static int __devinit icom_alloc_adapter(struct 
icom_adapter
struct list_head *tmp;
 
icom_adapter = (struct icom_adapter *)
-   kmalloc(sizeof(struct icom_adapter), GFP_KERNEL);
+   kzalloc(sizeof(struct icom_adapter), GFP_KERNEL);
 
if (!icom_adapter) {
return -ENOMEM;
}
 
-   memset(icom_adapter, 0, sizeof(struct icom_adapter));
-
list_for_each(tmp, icom_adapter_head) {
cur_adapter_entry =
list_entry(tmp, struct icom_adapter,
diff --git a/drivers/serial/ioc3_serial.c b/drivers/serial/ioc3_serial.c
index 9cc0be9..168073f 100644
--- a/drivers/serial/ioc3_serial.c
+++ b/drivers/serial/ioc3_serial.c
@@ -2019,13 +2019,12 @@ ioc3uart_probe(struct ioc3_submodule *is, struct 
ioc3_driver_data *idd)
 
DPRINT_CONFIG((%s (0x%p, 0x%p)\n, __FUNCTION__, is, idd));
 
-   card_ptr = kmalloc(sizeof(struct ioc3_card), GFP_KERNEL);
+   card_ptr = kzalloc(sizeof(struct ioc3_card), GFP_KERNEL);
if (!card_ptr) {
printk(KERN_WARNING ioc3_attach_one
   : unable to get memory for the IOC3\n);
return -ENOMEM;
}
-   memset(card_ptr, 0, sizeof(struct ioc3_card));
idd-data[is-id] = card_ptr;
Submodule_slot = is-id;
 
@@ -2040,13 +2039,12 @@ ioc3uart_probe(struct ioc3_submodule *is, struct 
ioc3_driver_data *idd)
 
/* Create port structures for each port */
for (phys_port = 0; phys_port  PORTS_PER_CARD; phys_port++) {
-   port = kmalloc(sizeof(struct ioc3_port), GFP_KERNEL);
+   port = kzalloc(sizeof(struct ioc3_port), GFP_KERNEL);
if (!port) {
printk(KERN_WARNING
   IOC3 serial memory not available for port\n);
goto out4;
}
-   memset(port, 0, sizeof(struct ioc3_port));
spin_lock_init(port-ip_lock);
 
/* we need to remember the previous ones, to point back to
diff --git a/drivers/serial/ioc4_serial.c b/drivers/serial/ioc4_serial.c
index f540212..0c17938 100644
--- a/drivers/serial/ioc4_serial.c
+++ 

[PATCH] fix PNX8550 serial breakage

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e6fa0ba304f0642b5e9454c20b07740b8bf2c416
Commit: e6fa0ba304f0642b5e9454c20b07740b8bf2c416
Parent: 8f31bb39ec2a5622974666c72257e74c22492602
Author: Vitaly Wool [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:08 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:52 2007 -0800

[PATCH] fix PNX8550 serial breakage

Fix the serial header breakage for the PNX8550 MIPS platform.

Signed-off-by: Vitaly Wool [EMAIL PROTECTED]
Cc: Ralf Baechle [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/linux/serial_core.h|2 +-
 include/linux/serial_ip3106.h  |   81 
 include/linux/serial_pnx8xxx.h |   81 
 3 files changed, 82 insertions(+), 82 deletions(-)

diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index cf23813..586aaba 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -122,7 +122,7 @@
 /*Digi jsm */
 #define PORT_JSM69
 
-#define PORT_IP310670
+#define PORT_PNX8XXX   70
 
 /* Hilscher netx */
 #define PORT_NETX  71
diff --git a/include/linux/serial_ip3106.h b/include/linux/serial_ip3106.h
deleted file mode 100644
index f500ac6..000
--- a/include/linux/serial_ip3106.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Embedded Alley Solutions, [EMAIL PROTECTED]
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#ifndef _LINUX_SERIAL_IP3106_H
-#define _LINUX_SERIAL_IP3106_H
-
-#include linux/serial_core.h
-#include linux/device.h
-
-#define IP3106_NR_PORTS2
-
-struct ip3106_port {
-   struct uart_portport;
-   struct timer_list   timer;
-   unsigned intold_status;
-};
-
-/* register offsets */
-#define IP3106_LCR 0
-#define IP3106_MCR 0x004
-#define IP3106_BAUD0x008
-#define IP3106_CFG 0x00c
-#define IP3106_FIFO0x028
-#define IP3106_ISTAT   0xfe0
-#define IP3106_IEN 0xfe4
-#define IP3106_ICLR0xfe8
-#define IP3106_ISET0xfec
-#define IP3106_PD  0xff4
-#define IP3106_MID 0xffc
-
-#define IP3106_UART_LCR_TXBREAK(130)
-#define IP3106_UART_LCR_PAREVN 0x1000
-#define IP3106_UART_LCR_PAREN  0x0800
-#define IP3106_UART_LCR_2STOPB 0x0400
-#define IP3106_UART_LCR_8BIT   0x0100
-#define IP3106_UART_LCR_TX_RST 0x0004
-#define IP3106_UART_LCR_RX_RST 0x0002
-#define IP3106_UART_LCR_RX_NEXT0x0001
-
-#define IP3106_UART_MCR_SCR0xFF00
-#define IP3106_UART_MCR_DCD0x0080
-#define IP3106_UART_MCR_CTS0x0010
-#define IP3106_UART_MCR_LOOP   0x0010
-#define IP3106_UART_MCR_RTS0x0002
-#define IP3106_UART_MCR_DTR0x0001
-
-#define IP3106_UART_INT_TX 0x0080
-#define IP3106_UART_INT_EMPTY  0x0040
-#define IP3106_UART_INT_RCVTO  0x0020
-#define IP3106_UART_INT_RX 0x0010
-#define IP3106_UART_INT_RXOVRN 0x0008
-#define IP3106_UART_INT_FRERR  0x0004
-#define IP3106_UART_INT_BREAK  0x0002
-#define IP3106_UART_INT_PARITY 0x0001
-#define IP3106_UART_INT_ALLRX  0x003F
-#define IP3106_UART_INT_ALLTX  0x00C0
-
-#define IP3106_UART_FIFO_TXFIFO0x001F
-#define IP3106_UART_FIFO_TXFIFO_STA(0x1f16)
-#define IP3106_UART_FIFO_RXBRK 0x8000
-#define IP3106_UART_FIFO_RXFE  0x4000
-#define IP3106_UART_FIFO_RXPAR 0x2000
-#define IP3106_UART_FIFO_RXFIFO0x1F00
-#define IP3106_UART_FIFO_RBRTHR0x00FF
-
-#endif
diff --git a/include/linux/serial_pnx8xxx.h b/include/linux/serial_pnx8xxx.h
new file mode 100644
index 000..de6c19c
--- /dev/null
+++ b/include/linux/serial_pnx8xxx.h
@@ -0,0 +1,81 @@
+/*
+ * Embedded Alley Solutions, [EMAIL PROTECTED]
+ *
+ * This program is free software; you can redistribute it and/or 

[PATCH] PNX8550 UART driver

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=de8211b96b8491911bcb222d153c0986cb522bd6
Commit: de8211b96b8491911bcb222d153c0986cb522bd6
Parent: e6fa0ba304f0642b5e9454c20b07740b8bf2c416
Author: Vitaly Wool [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:09 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:52 2007 -0800

[PATCH] PNX8550 UART driver

Add UART support for PNX8330/8550/8950 Philips MIPS-based SoCs.

Signed-off-by: Vitaly Wool [EMAIL PROTECTED]
Cc: Russell King [EMAIL PROTECTED]
Cc: Alan Cox [EMAIL PROTECTED]
Cc: Ralf Baechle [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/serial/Kconfig|   16 +
 drivers/serial/Makefile   |1 +
 drivers/serial/pnx8xxx_uart.c |  852 +
 3 files changed, 869 insertions(+), 0 deletions(-)

diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index d0edbaa..e8dd71d 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -686,6 +686,22 @@ config SERIAL_SH_SCI_CONSOLE
depends on SERIAL_SH_SCI=y
select SERIAL_CORE_CONSOLE
 
+config SERIAL_PNX8XXX
+   bool Enable PNX8XXX SoCs' UART Support
+   depends on MIPS  SOC_PNX8550
+   select SERIAL_CORE
+   help
+ If you have a MIPS-based Philips SoC such as PNX8550 or PNX8330
+ and you want to use serial ports, say Y.  Otherwise, say N.
+
+config SERIAL_PNX8XXX_CONSOLE
+   bool Enable PNX8XX0 serial console
+   depends on SERIAL_PNX8XXX
+   select SERIAL_CORE_CONSOLE
+   help
+ If you have a MIPS-based Philips SoC such as PNX8550 or PNX8330
+ and you want to use serial console, say Y. Otherwise, say N.
+
 config SERIAL_CORE
tristate
 
diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
index f3f8258..6b3560c 100644
--- a/drivers/serial/Makefile
+++ b/drivers/serial/Makefile
@@ -25,6 +25,7 @@ obj-$(CONFIG_SERIAL_AMBA_PL010) += amba-pl010.o
 obj-$(CONFIG_SERIAL_AMBA_PL011) += amba-pl011.o
 obj-$(CONFIG_SERIAL_CLPS711X) += clps711x.o
 obj-$(CONFIG_SERIAL_PXA) += pxa.o
+obj-$(CONFIG_SERIAL_PNX8XXX) += pnx8xxx_uart.o
 obj-$(CONFIG_SERIAL_SA1100) += sa1100.o
 obj-$(CONFIG_SERIAL_S3C2410) += s3c2410.o
 obj-$(CONFIG_SERIAL_SUNCORE) += suncore.o
diff --git a/drivers/serial/pnx8xxx_uart.c b/drivers/serial/pnx8xxx_uart.c
new file mode 100644
index 000..8d01c59
--- /dev/null
+++ b/drivers/serial/pnx8xxx_uart.c
@@ -0,0 +1,852 @@
+/*
+ * UART driver for PNX8XXX SoCs
+ *
+ * Author: Per Hallsmark [EMAIL PROTECTED]
+ * Ported to 2.6 kernel by EmbeddedAlley
+ * Reworked by Vitaly Wool [EMAIL PROTECTED]
+ *
+ * Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
+ * Copyright (C) 2000 Deep Blue Solutions Ltd.
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2. This program is licensed as is without any warranty of
+ * any kind, whether express or implied.
+ *
+ */
+
+#if defined(CONFIG_SERIAL_PNX8XXX_CONSOLE)  defined(CONFIG_MAGIC_SYSRQ)
+#define SUPPORT_SYSRQ
+#endif
+
+#include linux/module.h
+#include linux/ioport.h
+#include linux/init.h
+#include linux/console.h
+#include linux/sysrq.h
+#include linux/device.h
+#include linux/platform_device.h
+#include linux/tty.h
+#include linux/tty_flip.h
+#include linux/serial_core.h
+#include linux/serial.h
+#include linux/serial_pnx8xxx.h
+
+#include asm/io.h
+#include asm/irq.h
+
+/* We'll be using StrongARM sa1100 serial port major/minor */
+#define SERIAL_PNX8XXX_MAJOR   204
+#define MINOR_START5
+
+#define NR_PORTS   2
+
+#define PNX8XXX_ISR_PASS_LIMIT 256
+
+/*
+ * Convert from ignore_status_mask or read_status_mask to FIFO
+ * and interrupt status bits
+ */
+#define SM_TO_FIFO(x)  ((x)  10)
+#define SM_TO_ISTAT(x) ((x)  0x01ff)
+#define FIFO_TO_SM(x)  ((x)  10)
+#define ISTAT_TO_SM(x) ((x)  0x01ff)
+
+/*
+ * This is the size of our serial port register set.
+ */
+#define UART_PORT_SIZE 0x1000
+
+/*
+ * This determines how often we check the modem status signals
+ * for any change.  They generally aren't connected to an IRQ
+ * so we have to poll them.  We also check immediately before
+ * filling the TX fifo incase CTS has been dropped.
+ */
+#define MCTRL_TIMEOUT  (250*HZ/1000)
+
+extern struct pnx8xxx_port pnx8xxx_ports[];
+
+static inline int serial_in(struct pnx8xxx_port *sport, int offset)
+{
+   return (__raw_readl(sport-port.membase + offset));
+}
+
+static inline void serial_out(struct pnx8xxx_port *sport, int offset, int 
value)
+{
+   __raw_writel(value, sport-port.membase + offset);
+}
+
+/*
+ * Handle any change of modem status signal since we were last called.
+ */
+static void pnx8xxx_mctrl_check(struct pnx8xxx_port *sport)
+{
+   unsigned int status, changed;
+
+   status = 

[PATCH] knfsd: fix return value for writes to some files in 'nfsd' filesystem

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8971a1016b9db4164c3c1b47ae1fde2818becf91
Commit: 8971a1016b9db4164c3c1b47ae1fde2818becf91
Parent: 754ce4f29937ba11f16afa41a648a30b0fc1f075
Author: NeilBrown [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:11 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:53 2007 -0800

[PATCH] knfsd: fix return value for writes to some files in 'nfsd' 
filesystem

Most files in the 'nfsd' filesystem are transactional.  When you write, a
reply is generated that can be read back only on the same 'file'.

If the reply has zero length, the 'write' will incorrectly return a value of
'0' instead of the length that was written.  This causes 'rpc.nfsd' to give 
an
annoying warning.

This patch fixes the test.

Signed-off-by: Neil Brown [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/nfsd/nfsctl.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index eedf2e3..71c686d 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -123,7 +123,7 @@ static ssize_t nfsctl_transaction_write(struct file *file, 
const char __user *bu
return PTR_ERR(data);
 
rv =  write_op[ino](file, data, size);
-   if (rv0) {
+   if (rv = 0) {
simple_transaction_set(file, rv);
rv = size;
}
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] SPI: atmel_spi driver

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=754ce4f29937ba11f16afa41a648a30b0fc1f075
Commit: 754ce4f29937ba11f16afa41a648a30b0fc1f075
Parent: de8211b96b8491911bcb222d153c0986cb522bd6
Author: Haavard Skinnemoen [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:09 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:53 2007 -0800

[PATCH] SPI: atmel_spi driver

Driver for the Atmel on-chip SPI master controller.

Tested primarily on AVR32/AT32AP7000/ATSTK1000 using mtd_dataflash and the
jffs2 filesystem.  Should also work fine on various AT91 ARM-based chips
like AT91SAM926x and AT91RM9200.

Hardware documentation can be found in the AT32AP7000 data sheet, or its
AT91 siblings, which can be downloaded from

http://www.atmel.com/dyn/products/datasheets.asp?family_id=682

Signed-off-by: Haavard Skinnemoen [EMAIL PROTECTED]
Signed-off-by: David Brownell [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 MAINTAINERS |5 +
 drivers/spi/Kconfig |7 +
 drivers/spi/Makefile|1 +
 drivers/spi/atmel_spi.c |  678 +++
 drivers/spi/atmel_spi.h |  167 
 5 files changed, 858 insertions(+), 0 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 93a338d..9e6c9ff 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -620,6 +620,11 @@ P: Haavard Skinnemoen
 M: [EMAIL PROTECTED]
 S: Supported
 
+ATMEL SPI DRIVER
+P: Haavard Skinnemoen
+M: [EMAIL PROTECTED]
+S: Supported
+
 ATMEL WIRELESS DRIVER
 P: Simon Kelley
 M: [EMAIL PROTECTED]
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index 9052f4c..7e54e48 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -51,6 +51,13 @@ config SPI_MASTER
 comment SPI Master Controller Drivers
depends on SPI_MASTER
 
+config SPI_ATMEL
+   tristate Atmel SPI Controller
+   depends on (ARCH_AT91 || AVR32)  SPI_MASTER
+   help
+ This selects a driver for the Atmel SPI Controller, present on
+ many AT32 (AVR32) and AT91 (ARM) chips.
+
 config SPI_BITBANG
tristate Bitbanging SPI master
depends on SPI_MASTER  EXPERIMENTAL
diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
index bf271fe..3c280ad 100644
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
@@ -12,6 +12,7 @@ obj-$(CONFIG_SPI_MASTER)  += spi.o
 
 # SPI master controller drivers (bus)
 obj-$(CONFIG_SPI_BITBANG)  += spi_bitbang.o
+obj-$(CONFIG_SPI_ATMEL)+= atmel_spi.o
 obj-$(CONFIG_SPI_BUTTERFLY)+= spi_butterfly.o
 obj-$(CONFIG_SPI_IMX)  += spi_imx.o
 obj-$(CONFIG_SPI_PXA2XX)   += pxa2xx_spi.o
diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
new file mode 100644
index 000..c2a9fef
--- /dev/null
+++ b/drivers/spi/atmel_spi.c
@@ -0,0 +1,678 @@
+/*
+ * Driver for Atmel AT32 and AT91 SPI Controllers
+ *
+ * Copyright (C) 2006 Atmel Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include linux/kernel.h
+#include linux/init.h
+#include linux/clk.h
+#include linux/module.h
+#include linux/platform_device.h
+#include linux/delay.h
+#include linux/dma-mapping.h
+#include linux/err.h
+#include linux/interrupt.h
+#include linux/spi/spi.h
+
+#include asm/io.h
+#include asm/arch/board.h
+#include asm/arch/gpio.h
+
+#include atmel_spi.h
+
+/*
+ * The core SPI transfer engine just talks to a register bank to set up
+ * DMA transfers; transfer queue progress is driven by IRQs.  The clock
+ * framework provides the base clock, subdivided for each spi_device.
+ *
+ * Newer controllers, marked with new_1 flag, have:
+ *  - CR.LASTXFER
+ *  - SPI_MR.DIV32 may become FDIV or must-be-zero (here: always zero)
+ *  - SPI_SR.TXEMPTY, SPI_SR.NSSR (and corresponding irqs)
+ *  - SPI_CSRx.CSAAT
+ *  - SPI_CSRx.SBCR allows faster clocking
+ */
+struct atmel_spi {
+   spinlock_t  lock;
+
+   void __iomem*regs;
+   int irq;
+   struct clk  *clk;
+   struct platform_device  *pdev;
+   unsignednew_1:1;
+
+   u8  stopping;
+   struct list_headqueue;
+   struct spi_transfer *current_transfer;
+   unsigned long   remaining_bytes;
+
+   void*buffer;
+   dma_addr_t  buffer_dma;
+};
+
+#define BUFFER_SIZEPAGE_SIZE
+#define INVALID_DMA_ADDRESS0x
+
+/*
+ * Earlier SPI controllers (e.g. on at91rm9200) have a design bug whereby
+ * they assume that spi slave device state will not change on deselect, 

[PATCH] knfsd: tidy up choice of filesystem-identifier when creating a filehandle

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=982aedfd091e6d9831216f8519f12242091be4fd
Commit: 982aedfd091e6d9831216f8519f12242091be4fd
Parent: 8971a1016b9db4164c3c1b47ae1fde2818becf91
Author: NeilBrown [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:11 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:53 2007 -0800

[PATCH] knfsd: tidy up choice of filesystem-identifier when creating a 
filehandle

If we are using the same version/fsid as a current filehandle, then there is
no need to verify the the numbers are valid for this export, and they must 
be
(we used them to find this export).

This allows us to simplify the fsid selection code.

Also change ref_fh_version and ref_fh_fsid_type to version and
fsid_type, as the important thing isn't that they are the version/type of
the reference filehandle, but they are the chosen type for the new 
filehandle.

And tidy up some indenting.

Signed-off-by: Neil Brown [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/nfsd/nfsfh.c |  124 ++
 1 files changed, 60 insertions(+), 64 deletions(-)

diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c
index a0b4282..12c5e74 100644
--- a/fs/nfsd/nfsfh.c
+++ b/fs/nfsd/nfsfh.c
@@ -212,7 +212,7 @@ fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, int 
type, int access)
fileid_type = 2;
} else
fileid_type = fh-fh_fileid_type;
-   
+
if (fileid_type == 0)
dentry = dget(exp-ex_dentry);
else {
@@ -292,7 +292,7 @@ static inline int _fh_update(struct dentry *dentry, struct 
svc_export *exp,
 __u32 *datap, int *maxsize)
 {
struct export_operations *nop = exp-ex_mnt-mnt_sb-s_export_op;
-   
+
if (dentry == exp-ex_dentry) {
*maxsize = 0;
return 0;
@@ -317,7 +317,8 @@ static inline void _fh_update_old(struct dentry *dentry,
 }
 
 __be32
-fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry, 
struct svc_fh *ref_fh)
+fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry,
+  struct svc_fh *ref_fh)
 {
/* ref_fh is a reference file handle.
 * if it is non-null and for the same filesystem, then we should compose
@@ -327,8 +328,8 @@ fh_compose(struct svc_fh *fhp, struct svc_export *exp, 
struct dentry *dentry, st
 *
 */
 
-   u8 ref_fh_version = 0;
-   u8 ref_fh_fsid_type = 0;
+   u8 version = 1;
+   u8 fsid_type = 0;
struct inode * inode = dentry-d_inode;
struct dentry *parent = dentry-d_parent;
__u32 *datap;
@@ -340,57 +341,52 @@ fh_compose(struct svc_fh *fhp, struct svc_export *exp, 
struct dentry *dentry, st
parent-d_name.name, dentry-d_name.name,
(inode ? inode-i_ino : 0));
 
+   /* Choose filehandle version and fsid type based on
+* the reference filehandle (if it is in the same export)
+* or the export options.
+*/
if (ref_fh  ref_fh-fh_export == exp) {
-   ref_fh_version = ref_fh-fh_handle.fh_version;
-   if (ref_fh_version == 0xca)
-   ref_fh_fsid_type = 0;
+   version = ref_fh-fh_handle.fh_version;
+   if (version == 0xca)
+   fsid_type = 0;
else
-   ref_fh_fsid_type = ref_fh-fh_handle.fh_fsid_type;
-   if (ref_fh_fsid_type  3)
-   ref_fh_fsid_type = 0;
-
-   /* make sure ref_fh type works for given export */
-   if (ref_fh_fsid_type == 1 
-   !(exp-ex_flags  NFSEXP_FSID)) {
-   /* if we don't have an fsid, we cannot provide one... */
-   ref_fh_fsid_type = 0;
-   }
+   fsid_type = ref_fh-fh_handle.fh_fsid_type;
+   /* We know this version/type works for this export
+* so there is no need for further checks.
+*/
} else if (exp-ex_flags  NFSEXP_FSID)
-   ref_fh_fsid_type = 1;
-
-   if (!old_valid_dev(ex_dev)  ref_fh_fsid_type == 0) {
+   fsid_type = 1;
+   else if (!old_valid_dev(ex_dev))
/* for newer device numbers, we must use a newer fsid format */
-   ref_fh_version = 1;
-   ref_fh_fsid_type = 3;
-   }
-   if (old_valid_dev(ex_dev) 
-   (ref_fh_fsid_type == 2 || ref_fh_fsid_type == 3))
-   /* must use type1 for smaller device numbers */
-   ref_fh_fsid_type = 0;
+   fsid_type = 3;
+   else
+   

[PATCH] knfsd: allow the server to provide a gid list when using AUTH_UNIX authentication

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3fc605a2aa38899c12180ca311f1eeb61a6d867e
Commit: 3fc605a2aa38899c12180ca311f1eeb61a6d867e
Parent: af6a4e280e3ff453653f39190b57b345ff0bec16
Author: NeilBrown [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:13 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:53 2007 -0800

[PATCH] knfsd: allow the server to provide a gid list when using AUTH_UNIX 
authentication

AUTH_UNIX authentication (the standard with NFS) has a limit of 16 groups 
ids.
 This causes problems for people in more than 16 groups.

So allow the server to map a uid into a list of group ids based on local
knowledge rather depending on the (possibly truncated) list from the client.

If there is no process on the server responding to upcalls, the gidlist in 
the
request will still be used.

Signed-off-by: Neil Brown [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 net/sunrpc/sunrpc_syms.c  |5 +-
 net/sunrpc/svcauth_unix.c |  225 -
 2 files changed, 224 insertions(+), 6 deletions(-)

diff --git a/net/sunrpc/sunrpc_syms.c b/net/sunrpc/sunrpc_syms.c
index d85fdde..d386526 100644
--- a/net/sunrpc/sunrpc_syms.c
+++ b/net/sunrpc/sunrpc_syms.c
@@ -137,7 +137,7 @@ EXPORT_SYMBOL(nlm_debug);
 
 extern int register_rpc_pipefs(void);
 extern void unregister_rpc_pipefs(void);
-extern struct cache_detail ip_map_cache;
+extern struct cache_detail ip_map_cache, unix_gid_cache;
 extern int init_socket_xprt(void);
 extern void cleanup_socket_xprt(void);
 
@@ -157,6 +157,7 @@ init_sunrpc(void)
rpc_proc_init();
 #endif
cache_register(ip_map_cache);
+   cache_register(unix_gid_cache);
init_socket_xprt();
 out:
return err;
@@ -170,6 +171,8 @@ cleanup_sunrpc(void)
rpc_destroy_mempool();
if (cache_unregister(ip_map_cache))
printk(KERN_ERR sunrpc: failed to unregister ip_map cache\n);
+   if (cache_unregister(unix_gid_cache))
+ printk(KERN_ERR sunrpc: failed to unregister unix_gid cache\n);
 #ifdef RPC_DEBUG
rpc_unregister_sysctl();
 #endif
diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c
index 4b775db..9bae409 100644
--- a/net/sunrpc/svcauth_unix.c
+++ b/net/sunrpc/svcauth_unix.c
@@ -418,6 +418,214 @@ svcauth_unix_info_release(void *info)
cache_put(ipm-h, ip_map_cache);
 }
 
+/
+ * auth.unix.gid cache
+ * simple cache to map a UID to a list of GIDs
+ * because AUTH_UNIX aka AUTH_SYS has a max of 16
+ */
+#defineGID_HASHBITS8
+#defineGID_HASHMAX (1GID_HASHBITS)
+#defineGID_HASHMASK(GID_HASHMAX - 1)
+
+struct unix_gid {
+   struct cache_head   h;
+   uid_t   uid;
+   struct group_info   *gi;
+};
+static struct cache_head   *gid_table[GID_HASHMAX];
+
+static void unix_gid_put(struct kref *kref)
+{
+   struct cache_head *item = container_of(kref, struct cache_head, ref);
+   struct unix_gid *ug = container_of(item, struct unix_gid, h);
+   if (test_bit(CACHE_VALID, item-flags) 
+   !test_bit(CACHE_NEGATIVE, item-flags))
+   put_group_info(ug-gi);
+   kfree(ug);
+}
+
+static int unix_gid_match(struct cache_head *corig, struct cache_head *cnew)
+{
+   struct unix_gid *orig = container_of(corig, struct unix_gid, h);
+   struct unix_gid *new = container_of(cnew, struct unix_gid, h);
+   return orig-uid == new-uid;
+}
+static void unix_gid_init(struct cache_head *cnew, struct cache_head *citem)
+{
+   struct unix_gid *new = container_of(cnew, struct unix_gid, h);
+   struct unix_gid *item = container_of(citem, struct unix_gid, h);
+   new-uid = item-uid;
+}
+static void unix_gid_update(struct cache_head *cnew, struct cache_head *citem)
+{
+   struct unix_gid *new = container_of(cnew, struct unix_gid, h);
+   struct unix_gid *item = container_of(citem, struct unix_gid, h);
+
+   get_group_info(item-gi);
+   new-gi = item-gi;
+}
+static struct cache_head *unix_gid_alloc(void)
+{
+   struct unix_gid *g = kmalloc(sizeof(*g), GFP_KERNEL);
+   if (g)
+   return g-h;
+   else
+   return NULL;
+}
+
+static void unix_gid_request(struct cache_detail *cd,
+struct cache_head *h,
+char **bpp, int *blen)
+{
+   char tuid[20];
+   struct unix_gid *ug = container_of(h, struct unix_gid, h);
+
+   snprintf(tuid, 20, %u, ug-uid);
+   qword_add(bpp, blen, tuid);
+   (*bpp)[-1] = '\n';
+}
+
+static struct unix_gid *unix_gid_lookup(uid_t uid);
+extern struct cache_detail unix_gid_cache;
+
+static int unix_gid_parse(struct cache_detail *cd,
+  

[PATCH] knfsd: add some new fsid types

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=af6a4e280e3ff453653f39190b57b345ff0bec16
Commit: af6a4e280e3ff453653f39190b57b345ff0bec16
Parent: 982aedfd091e6d9831216f8519f12242091be4fd
Author: NeilBrown [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:12 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:53 2007 -0800

[PATCH] knfsd: add some new fsid types

Add support for using a filesystem UUID to identify and export point in the
filehandle.

For NFSv2, this UUID is xor-ed down to 4 or 8 bytes so that it doesn't take 
up
too much room.  For NFSv3+, we use the full 16 bytes, and possibly also a
64bit inode number for exports beneath the root of a filesystem.

When generating an fsid to return in 'stat' information, use the UUID 
(hashed
down to size) if it is available and a small 'fsid' was not specifically
provided.

Signed-off-by: Neil Brown [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/nfsd/export.c|  106 ---
 fs/nfsd/nfs3xdr.c   |   31 +---
 fs/nfsd/nfs4xdr.c   |   10 +++-
 fs/nfsd/nfsfh.c |   88 +++-
 fs/nfsd/nfsxdr.c|   19 +++-
 include/linux/nfsd/export.h |7 ++-
 include/linux/nfsd/nfsd.h   |   12 -
 include/linux/nfsd/nfsfh.h  |   99 +++-
 8 files changed, 242 insertions(+), 130 deletions(-)

diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index 49c310b..bb3c314 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -190,18 +190,17 @@ static int expkey_show(struct seq_file *m,
   struct cache_head *h)
 {
struct svc_expkey *ek ;
+   int i;
 
if (h ==NULL) {
seq_puts(m, #domain fsidtype fsid [path]\n);
return 0;
}
ek = container_of(h, struct svc_expkey, h);
-   seq_printf(m, %s %d 0x%08x, ek-ek_client-name,
-  ek-ek_fsidtype, ek-ek_fsid[0]);
-   if (ek-ek_fsidtype != 1)
-   seq_printf(m, %08x, ek-ek_fsid[1]);
-   if (ek-ek_fsidtype == 2)
-   seq_printf(m, %08x, ek-ek_fsid[2]);
+   seq_printf(m, %s %d 0x, ek-ek_client-name,
+  ek-ek_fsidtype);
+   for (i=0; i  key_len(ek-ek_fsidtype)/4; i++)
+   seq_printf(m, %08x, ek-ek_fsid[i]);
if (test_bit(CACHE_VALID, h-flags)  
!test_bit(CACHE_NEGATIVE, h-flags)) {
seq_printf(m,  );
@@ -232,9 +231,8 @@ static inline void expkey_init(struct cache_head *cnew,
kref_get(item-ek_client-ref);
new-ek_client = item-ek_client;
new-ek_fsidtype = item-ek_fsidtype;
-   new-ek_fsid[0] = item-ek_fsid[0];
-   new-ek_fsid[1] = item-ek_fsid[1];
-   new-ek_fsid[2] = item-ek_fsid[2];
+
+   memcpy(new-ek_fsid, item-ek_fsid, sizeof(new-ek_fsid));
 }
 
 static inline void expkey_update(struct cache_head *cnew,
@@ -363,7 +361,7 @@ static struct svc_export *svc_export_update(struct 
svc_export *new,
struct svc_export *old);
 static struct svc_export *svc_export_lookup(struct svc_export *);
 
-static int check_export(struct inode *inode, int flags)
+static int check_export(struct inode *inode, int flags, unsigned char *uuid)
 {
 
/* We currently export only dirs and regular files.
@@ -376,12 +374,13 @@ static int check_export(struct inode *inode, int flags)
/* There are two requirements on a filesystem to be exportable.
 * 1:  We must be able to identify the filesystem from a number.
 *   either a device number (so FS_REQUIRES_DEV needed)
-*   or an FSID number (so NFSEXP_FSID needed).
+*   or an FSID number (so NFSEXP_FSID or -uuid is needed).
 * 2:  We must be able to find an inode from a filehandle.
 *   This means that s_export_op must be set.
 */
if (!(inode-i_sb-s_type-fs_flags  FS_REQUIRES_DEV) 
-   !(flags  NFSEXP_FSID)) {
+   !(flags  NFSEXP_FSID) 
+   uuid == NULL) {
dprintk(exp_export: export of non-dev fs without fsid\n);
return -EINVAL;
}
@@ -406,10 +405,6 @@ fsloc_parse(char **mesg, char *buf, struct 
nfsd4_fs_locations *fsloc)
int len;
int migrated, i, err;
 
-   len = qword_get(mesg, buf, PAGE_SIZE);
-   if (len != 5 || memcmp(buf, fsloc, 5))
-   return 0;
-
/* listsize */
err = get_int(mesg, fsloc-locations_count);
if (err)
@@ -520,6 +515,8 @@ static int svc_export_parse(struct cache_detail *cd, char 
*mesg, int mlen)
exp.ex_fslocs.locations_count = 0;
exp.ex_fslocs.migrated = 0;
 
+   exp.ex_uuid = NULL;
+
/* flags */

[PATCH] OSS: replace kmalloc()+memset() combos with kzalloc()

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3159f06dc2303630c02d1ad2eeaeaf341414c9df
Commit: 3159f06dc2303630c02d1ad2eeaeaf341414c9df
Parent: cd354f1ae75e6466a7e31b727faede57a1f89ca5
Author: Robert P. J. Day [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:16 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:54 2007 -0800

[PATCH] OSS: replace kmalloc()+memset() combos with kzalloc()

Replace kmalloc() + memset() pairs with the appropriate kzalloc() calls.

Signed-off-by: Robert P. J. Day [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 sound/oss/ac97_codec.c  |3 +--
 sound/oss/ad1889.c  |3 +--
 sound/oss/btaudio.c |3 +--
 sound/oss/cs46xx.c  |9 +++--
 sound/oss/dmasound/dac3550a.c   |3 +--
 sound/oss/dmasound/tas3001c.c   |3 +--
 sound/oss/dmasound/tas3004.c|3 +--
 sound/oss/dmasound/tas_common.c |3 +--
 sound/oss/emu10k1/main.c|   11 +++
 sound/oss/es1371.c  |3 +--
 sound/oss/hal2.c|3 +--
 sound/oss/i810_audio.c  |9 +++--
 sound/oss/kahlua.c  |3 +--
 sound/oss/nec_vrc5477.c |3 +--
 sound/oss/opl3.c|3 +--
 sound/oss/sb_card.c |6 ++
 sound/oss/swarm_cs4297a.c   |   13 +
 sound/oss/trident.c |9 +++--
 sound/oss/waveartist.c  |4 +---
 19 files changed, 32 insertions(+), 65 deletions(-)

diff --git a/sound/oss/ac97_codec.c b/sound/oss/ac97_codec.c
index 602db49..fef56ca 100644
--- a/sound/oss/ac97_codec.c
+++ b/sound/oss/ac97_codec.c
@@ -744,11 +744,10 @@ static int ac97_check_modem(struct ac97_codec *codec)
  
 struct ac97_codec *ac97_alloc_codec(void)
 {
-   struct ac97_codec *codec = kmalloc(sizeof(struct ac97_codec), 
GFP_KERNEL);
+   struct ac97_codec *codec = kzalloc(sizeof(struct ac97_codec), 
GFP_KERNEL);
if(!codec)
return NULL;
 
-   memset(codec, 0, sizeof(*codec));
spin_lock_init(codec-lock);
INIT_LIST_HEAD(codec-list);
return codec;
diff --git a/sound/oss/ad1889.c b/sound/oss/ad1889.c
index f072432..c0730a3 100644
--- a/sound/oss/ad1889.c
+++ b/sound/oss/ad1889.c
@@ -230,9 +230,8 @@ static ad1889_dev_t *ad1889_alloc_dev(struct pci_dev *pci)
struct dmabuf *dmabuf;
int i;
 
-   if ((dev = kmalloc(sizeof(ad1889_dev_t), GFP_KERNEL)) == NULL) 
+   if ((dev = kzalloc(sizeof(ad1889_dev_t), GFP_KERNEL)) == NULL)
return NULL;
-   memset(dev, 0, sizeof(ad1889_dev_t));
spin_lock_init(dev-lock);
dev-pci = pci;
 
diff --git a/sound/oss/btaudio.c b/sound/oss/btaudio.c
index f845528..f813ae9 100644
--- a/sound/oss/btaudio.c
+++ b/sound/oss/btaudio.c
@@ -915,12 +915,11 @@ static int __devinit btaudio_probe(struct pci_dev 
*pci_dev,
return -EBUSY;
}
 
-   bta = kmalloc(sizeof(*bta),GFP_ATOMIC);
+   bta = kzalloc(sizeof(*bta),GFP_ATOMIC);
if (!bta) {
rc = -ENOMEM;
goto fail0;
}
-   memset(bta,0,sizeof(*bta));
 
bta-pci  = pci_dev;
bta-irq  = pci_dev-irq;
diff --git a/sound/oss/cs46xx.c b/sound/oss/cs46xx.c
index 147c8a9..2a1f0d9 100644
--- a/sound/oss/cs46xx.c
+++ b/sound/oss/cs46xx.c
@@ -3048,10 +3048,9 @@ static int cs_open(struct inode *inode, struct file 
*file)
CS_DBGOUT(CS_WAVE_READ, 2, printk(cs46xx: cs_open() 
FMODE_READ\n) );
if (card-states[0] == NULL) {
state = card-states[0] =
-   kmalloc(sizeof(struct cs_state), GFP_KERNEL);
+   kzalloc(sizeof(struct cs_state), GFP_KERNEL);
if (state == NULL)
return -ENOMEM;
-   memset(state, 0, sizeof(struct cs_state));
mutex_init(state-sem);
dmabuf = state-dmabuf;
dmabuf-pbuf = (void *)get_zeroed_page(GFP_KERNEL | 
GFP_DMA);
@@ -3114,10 +3113,9 @@ static int cs_open(struct inode *inode, struct file 
*file)
CS_DBGOUT(CS_OPEN, 2, printk(cs46xx: cs_open() FMODE_WRITE\n) 
);
if (card-states[1] == NULL) {
state = card-states[1] =
-   kmalloc(sizeof(struct cs_state), GFP_KERNEL);
+   kzalloc(sizeof(struct cs_state), GFP_KERNEL);
if (state == NULL)
return -ENOMEM;
-   memset(state, 0, sizeof(struct cs_state));
mutex_init(state-sem);
dmabuf = state-dmabuf;
dmabuf-pbuf = (void 

[PATCH] Scheduled removal of SA_xxx interrupt flags fixups

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=38515e908ba3a9c467ad3bf347b9bce69216df94
Commit: 38515e908ba3a9c467ad3bf347b9bce69216df94
Parent: 3159f06dc2303630c02d1ad2eeaeaf341414c9df
Author: Thomas Gleixner [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:16 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:54 2007 -0800

[PATCH] Scheduled removal of SA_xxx interrupt flags fixups

The obsolete SA_xxx interrupt flags have been used despite the scheduled
removal.  Fixup the remaining users.

Signed-off-by: Thomas Gleixner [EMAIL PROTECTED]
Acked-by: Ingo Molnar [EMAIL PROTECTED]
Cc: Luck, Tony [EMAIL PROTECTED]
Cc: Roman Zippel [EMAIL PROTECTED]
Cc: Geert Uytterhoeven [EMAIL PROTECTED]
Cc: Jeff Garzik [EMAIL PROTECTED]
Cc: Wim Van Sebroeck [EMAIL PROTECTED]
Cc: Roland Dreier [EMAIL PROTECTED]
Cc: Alessandro Zummo [EMAIL PROTECTED]
Cc: James Bottomley [EMAIL PROTECTED]
Cc: Greg KH [EMAIL PROTECTED]
Cc: Dave Airlie [EMAIL PROTECTED]
Cc: James Simmons [EMAIL PROTECTED]
Cc: Antonino A. Daplas [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/ia64/kernel/irq_ia64.c  |2 +-
 arch/m68k/atari/stdma.c  |2 +-
 arch/ppc/syslib/i8259.c  |2 +-
 drivers/ata/pata_mpiix.c |2 +-
 drivers/ata/pata_pcmcia.c|2 +-
 drivers/ata/pata_pdc2027x.c  |2 +-
 drivers/char/watchdog/rm9k_wdt.c |2 +-
 drivers/infiniband/hw/amso1100/c2.c  |2 +-
 drivers/infiniband/hw/ehca/ehca_eq.c |4 ++--
 drivers/misc/tifm_7xx1.c |2 +-
 drivers/net/7990.c   |2 +-
 drivers/net/ehea/ehea_main.c |8 
 drivers/net/macb.c   |2 +-
 drivers/net/netxen/netxen_nic_main.c |4 ++--
 drivers/net/qla3xxx.c|4 ++--
 drivers/net/ucc_geth.c   |4 ++--
 drivers/pci/pcie/aer/aerdrv.c|2 +-
 drivers/rtc/rtc-omap.c   |4 ++--
 drivers/rtc/rtc-s3c.c|4 ++--
 drivers/scsi/aic94xx/aic94xx_init.c  |2 +-
 drivers/scsi/arcmsr/arcmsr_hba.c |2 +-
 drivers/scsi/ibmvscsi/ibmvstgt.c |2 +-
 drivers/scsi/qla4xxx/ql4_os.c|2 +-
 drivers/usb/gadget/pxa2xx_udc.c  |2 +-
 drivers/usb/host/ohci-ep93xx.c   |2 +-
 drivers/usb/host/ohci-pnx4008.c  |2 +-
 drivers/usb/host/ohci-pnx8550.c  |2 +-
 drivers/video/intelfb/intelfbhw.c|3 ++-
 kernel/irq/manage.c  |2 +-
 29 files changed, 39 insertions(+), 38 deletions(-)

diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c
index ba3ba8b..456f57b 100644
--- a/arch/ia64/kernel/irq_ia64.c
+++ b/arch/ia64/kernel/irq_ia64.c
@@ -275,7 +275,7 @@ static struct irqaction ipi_irqaction = {
 
 static struct irqaction resched_irqaction = {
.handler =  dummy_handler,
-   .flags =SA_INTERRUPT,
+   .flags =IRQF_DISABLED,
.name = resched
 };
 #endif
diff --git a/arch/m68k/atari/stdma.c b/arch/m68k/atari/stdma.c
index d01deb4..ab3fd52 100644
--- a/arch/m68k/atari/stdma.c
+++ b/arch/m68k/atari/stdma.c
@@ -174,7 +174,7 @@ int stdma_islocked(void)
 void __init stdma_init(void)
 {
stdma_isr = NULL;
-   request_irq(IRQ_MFP_FDC, stdma_int, IRQ_TYPE_SLOW | SA_SHIRQ,
+   request_irq(IRQ_MFP_FDC, stdma_int, IRQ_TYPE_SLOW | IRQF_SHARED,
ST-DMA: floppy/ACSI/IDE/Falcon-SCSI, stdma_int);
 }
 
diff --git a/arch/ppc/syslib/i8259.c b/arch/ppc/syslib/i8259.c
index a43dda5..1e5a00a 100644
--- a/arch/ppc/syslib/i8259.c
+++ b/arch/ppc/syslib/i8259.c
@@ -154,7 +154,7 @@ static struct resource pic_edgectrl_iores = {
 
 static struct irqaction i8259_irqaction = {
.handler = no_action,
-   .flags = SA_INTERRUPT,
+   .flags = IRQF_DISABLED,
.mask = CPU_MASK_NONE,
.name = 82c59 secondary cascade,
 };
diff --git a/drivers/ata/pata_mpiix.c b/drivers/ata/pata_mpiix.c
index ca8c965..f2e7115 100644
--- a/drivers/ata/pata_mpiix.c
+++ b/drivers/ata/pata_mpiix.c
@@ -241,7 +241,7 @@ static int mpiix_init_one(struct pci_dev *dev, const struct 
pci_device_id *id)
probe.port_ops = mpiix_port_ops;
probe.sht = mpiix_sht;
probe.pio_mask = 0x1F;
-   probe.irq_flags = SA_SHIRQ;
+   probe.irq_flags = IRQF_SHARED;
probe.port_flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST;
probe.n_ports = 1;
 
diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c
index acfc09f..36468ec 100644
--- a/drivers/ata/pata_pcmcia.c
+++ b/drivers/ata/pata_pcmcia.c
@@ -264,7 +264,7 @@ next_entry:
ae.n_ports = 1;
ae.pio_mask = 1;/* ISA so PIO 0 cycles */
ae.irq = pdev-irq.AssignedIRQ;
-   ae.irq_flags = SA_SHIRQ;
+

[PATCH] sysctl: x25: remove unnecessary insert_at_head from register_sysctl_table

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b402f06d6e31b8c3c74bfc3e7d2e292dd4a1b90a
Commit: b402f06d6e31b8c3c74bfc3e7d2e292dd4a1b90a
Parent: aa2e3e4f83590fa4c69fe95f01c1a52557859d19
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:21 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:55 2007 -0800

[PATCH] sysctl: x25: remove unnecessary insert_at_head from 
register_sysctl_table

There has not been much maintenance on sysctl in years, and as a result is
there is a lot to do to allow future interesting work to happen, and being
ambitious I'm trying to do it all at once :)

The patches in this series fall into several general categories.

- Removal of useless attempts to override the standard sysctls

- Registers of sysctl numbers in sysctl.h so someone else does not use
  the magic number and conflict.

- C99 conversions so it becomes possible to change the layout of
  struct ctl_table without breaking everything.

- Removal of useless claims of module ownership, in the proc dir entries

- Removal of sys_sysctl support where people had used conflicting sysctl
  numbers. Trying to break glibc or other applications by changing the
  ABI is not cool.  9 instances of this in the kernel seems a little
  extreme.

- General enhancements when I got the junk I could see out.

This patch:

Since x25 uses unique binary numbers inserting yourself at the head of the
search list for sysctls so you can override already registered sysctls is
pointless.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Cc: Ralf Baechle [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 net/x25/sysctl_net_x25.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/x25/sysctl_net_x25.c b/net/x25/sysctl_net_x25.c
index 5f63106..68300d4 100644
--- a/net/x25/sysctl_net_x25.c
+++ b/net/x25/sysctl_net_x25.c
@@ -106,7 +106,7 @@ static struct ctl_table x25_root_table[] = {
 
 void __init x25_register_sysctl(void)
 {
-   x25_table_header = register_sysctl_table(x25_root_table, 1);
+   x25_table_header = register_sysctl_table(x25_root_table, 0);
 }
 
 void x25_unregister_sysctl(void)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] scheduled removal of SA_XXX interrupt flags: ata fix

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=aa2e3e4f83590fa4c69fe95f01c1a52557859d19
Commit: aa2e3e4f83590fa4c69fe95f01c1a52557859d19
Parent: 2db6346f76ac5bd5b632373240e3e54828111837
Author: Andrew Morton [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:20 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:55 2007 -0800

[PATCH] scheduled removal of SA_XXX interrupt flags: ata fix

SA_SHIRQ is going away.

Cc: Jeff Garzik [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/ata/sata_inic162x.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/ata/sata_inic162x.c b/drivers/ata/sata_inic162x.c
index c5335f4..31b636f 100644
--- a/drivers/ata/sata_inic162x.c
+++ b/drivers/ata/sata_inic162x.c
@@ -710,7 +710,7 @@ static int inic_init_one(struct pci_dev *pdev, const struct 
pci_device_id *ent)
probe_ent-n_ports  = NR_PORTS;
 
probe_ent-irq = pdev-irq;
-   probe_ent-irq_flags = SA_SHIRQ;
+   probe_ent-irq_flags = IRQF_SHARED;
 
probe_ent-iomap = iomap;
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: move CTL_SUNRPC to sysctl.h where it belongs

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=50d851f7227cf9e7fcc4cd1d2b3c72ddd64c50e6
Commit: 50d851f7227cf9e7fcc4cd1d2b3c72ddd64c50e6
Parent: b402f06d6e31b8c3c74bfc3e7d2e292dd4a1b90a
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:22 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:55 2007 -0800

[PATCH] sysctl: move CTL_SUNRPC to sysctl.h where it belongs

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Cc: Trond Myklebust [EMAIL PROTECTED]
Cc: Neil Brown [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/linux/sunrpc/debug.h |1 -
 include/linux/sysctl.h   |3 ++-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/sunrpc/debug.h b/include/linux/sunrpc/debug.h
index 60fce3c..b7c7307 100644
--- a/include/linux/sunrpc/debug.h
+++ b/include/linux/sunrpc/debug.h
@@ -78,7 +78,6 @@ void  rpc_unregister_sysctl(void);
  * module currently registers its sysctl table dynamically, the sysctl path
  * for module FOO is CTL_SUNRPC, CTL_FOODEBUG.
  */
-#define CTL_SUNRPC 7249/* arbitrary and hopefully unused */
 
 enum {
CTL_RPCDEBUG = 1,
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 665412c..23a8f3c 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -69,7 +69,8 @@ enum
CTL_DEV=7,  /* Devices */
CTL_BUS=8,  /* Busses */
CTL_ABI=9,  /* Binary emulation */
-   CTL_CPU=10  /* CPU stuff (speed scaling, etc) */
+   CTL_CPU=10, /* CPU stuff (speed scaling, etc) */
+   CTL_SUNRPC=7249,/* sunrpc debug */
 };
 
 /* CTL_BUS names: */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: sunrpc: remove unnecessary insert_at_head flag

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7e35280e517c28b991667a608990227503dd2a30
Commit: 7e35280e517c28b991667a608990227503dd2a30
Parent: 50d851f7227cf9e7fcc4cd1d2b3c72ddd64c50e6
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:23 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:55 2007 -0800

[PATCH] sysctl: sunrpc: remove unnecessary insert_at_head flag

Because the sunrpc sysctls don't conflict with any other sysctls the setting
the insert at head flag to register_sysctl has no semantic meaning.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Cc: Trond Myklebust [EMAIL PROTECTED]
Cc: Neil Brown [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 net/sunrpc/sysctl.c   |2 +-
 net/sunrpc/xprtsock.c |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/sunrpc/sysctl.c b/net/sunrpc/sysctl.c
index 47d8df2..64ce709 100644
--- a/net/sunrpc/sysctl.c
+++ b/net/sunrpc/sysctl.c
@@ -36,7 +36,7 @@ void
 rpc_register_sysctl(void)
 {
if (!sunrpc_table_header) {
-   sunrpc_table_header = register_sysctl_table(sunrpc_table, 1);
+   sunrpc_table_header = register_sysctl_table(sunrpc_table, 0);
 #ifdef CONFIG_PROC_FS
if (sunrpc_table[0].de)
sunrpc_table[0].de-owner = THIS_MODULE;
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 95e03ad..389b118 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -1636,7 +1636,7 @@ int init_socket_xprt(void)
 {
 #ifdef RPC_DEBUG
if (!sunrpc_table_header) {
-   sunrpc_table_header = register_sysctl_table(sunrpc_table, 1);
+   sunrpc_table_header = register_sysctl_table(sunrpc_table, 0);
 #ifdef CONFIG_PROC_FS
if (sunrpc_table[0].de)
sunrpc_table[0].de-owner = THIS_MODULE;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: sunrpc: don't unnecessarily set ctl_table-de

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2b1bec5f52fec033ed0026e7d85f641e20e1cbb9
Commit: 2b1bec5f52fec033ed0026e7d85f641e20e1cbb9
Parent: 7e35280e517c28b991667a608990227503dd2a30
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:24 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:55 2007 -0800

[PATCH] sysctl: sunrpc: don't unnecessarily set ctl_table-de

We don't need this to prevent module unload races so remove the unnecessary
code.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Cc: Trond Myklebust [EMAIL PROTECTED]
Cc: Neil Brown [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 net/sunrpc/sysctl.c   |8 +---
 net/sunrpc/xprtsock.c |7 +--
 2 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/net/sunrpc/sysctl.c b/net/sunrpc/sysctl.c
index 64ce709..1169798 100644
--- a/net/sunrpc/sysctl.c
+++ b/net/sunrpc/sysctl.c
@@ -35,14 +35,8 @@ static ctl_table sunrpc_table[];
 void
 rpc_register_sysctl(void)
 {
-   if (!sunrpc_table_header) {
+   if (!sunrpc_table_header)
sunrpc_table_header = register_sysctl_table(sunrpc_table, 0);
-#ifdef CONFIG_PROC_FS
-   if (sunrpc_table[0].de)
-   sunrpc_table[0].de-owner = THIS_MODULE;
-#endif
-   }
-
 }
 
 void
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 389b118..5a9f6d8 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -1635,13 +1635,8 @@ struct rpc_xprt *xs_setup_tcp(struct sockaddr *addr, 
size_t addrlen, struct rpc_
 int init_socket_xprt(void)
 {
 #ifdef RPC_DEBUG
-   if (!sunrpc_table_header) {
+   if (!sunrpc_table_header)
sunrpc_table_header = register_sysctl_table(sunrpc_table, 0);
-#ifdef CONFIG_PROC_FS
-   if (sunrpc_table[0].de)
-   sunrpc_table[0].de-owner = THIS_MODULE;
-#endif
-   }
 #endif
 
return 0;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: netrom: remove unnecessary insert_at_head flag

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6fe6b1755c3d234af076c0d264dc8478acf4510c
Commit: 6fe6b1755c3d234af076c0d264dc8478acf4510c
Parent: 2d4381dec31865d7882312bef4cb8da2b12621ff
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:26 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:55 2007 -0800

[PATCH] sysctl: netrom: remove unnecessary insert_at_head flag

The sysctl numbers used are unique so setting the insert_at_head flag serves
no semantic purpose, so it is just confusing.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Acked-by: Ralf Baechle [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 net/netrom/sysctl_net_netrom.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/netrom/sysctl_net_netrom.c b/net/netrom/sysctl_net_netrom.c
index e4b27d7..6ca96a5 100644
--- a/net/netrom/sysctl_net_netrom.c
+++ b/net/netrom/sysctl_net_netrom.c
@@ -192,7 +192,7 @@ static ctl_table nr_root_table[] = {
 
 void __init nr_register_sysctl(void)
 {
-   nr_table_header = register_sysctl_table(nr_root_table, 1);
+   nr_table_header = register_sysctl_table(nr_root_table, 0);
 }
 
 void nr_unregister_sysctl(void)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: llc: remove unnecessary insert_at_head flag

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9fa7b46d73d2849a7234d0967152c39deb4e815f
Commit: 9fa7b46d73d2849a7234d0967152c39deb4e815f
Parent: 6fe6b1755c3d234af076c0d264dc8478acf4510c
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:26 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:55 2007 -0800

[PATCH] sysctl: llc: remove unnecessary insert_at_head flag

The sysctl numbers used are unique so setting the insert_at_head flag serves
no semantis purpose, and is just confusing.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Cc: Arnaldo Carvalho de Melo [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 net/llc/sysctl_net_llc.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/llc/sysctl_net_llc.c b/net/llc/sysctl_net_llc.c
index d047a3e..bcec7e1 100644
--- a/net/llc/sysctl_net_llc.c
+++ b/net/llc/sysctl_net_llc.c
@@ -116,7 +116,7 @@ static struct ctl_table_header *llc_table_header;
 
 int __init llc_sysctl_init(void)
 {
-   llc_table_header = register_sysctl_table(llc_root_table, 1);
+   llc_table_header = register_sysctl_table(llc_root_table, 0);
 
return llc_table_header ? 0 : -ENOMEM;
 }
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: ipx: remove unnecessary insert_at_head flag

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ecab963ac1aa7d92369564c5dd4ad04ec5853380
Commit: ecab963ac1aa7d92369564c5dd4ad04ec5853380
Parent: 9fa7b46d73d2849a7234d0967152c39deb4e815f
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:27 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:55 2007 -0800

[PATCH] sysctl: ipx: remove unnecessary insert_at_head flag

The sysctl numbers used are unique so setting the insert_at_head flag 
servers
no semantic purpose and is just confusing.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Cc: Arnaldo Carvalho de Melo [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 net/ipx/sysctl_net_ipx.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ipx/sysctl_net_ipx.c b/net/ipx/sysctl_net_ipx.c
index 85ae35f..0397b09 100644
--- a/net/ipx/sysctl_net_ipx.c
+++ b/net/ipx/sysctl_net_ipx.c
@@ -52,7 +52,7 @@ static struct ctl_table_header *ipx_table_header;
 
 void ipx_register_sysctl(void)
 {
-   ipx_table_header = register_sysctl_table(ipx_root_table, 1);
+   ipx_table_header = register_sysctl_table(ipx_root_table, 0);
 }
 
 void ipx_unregister_sysctl(void)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: decnet: remove unnecessary insert_at_head flag

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d87abf42762ee3e77b118ea96517cf8c7d33abc1
Commit: d87abf42762ee3e77b118ea96517cf8c7d33abc1
Parent: ecab963ac1aa7d92369564c5dd4ad04ec5853380
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:28 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:55 2007 -0800

[PATCH] sysctl: decnet: remove unnecessary insert_at_head flag

The sysctl numbers used are unique so setting the insert_at_head flag does 
not
succeed in overriding any sysctls, and is just confusing because it doesn't.
Clear the flag.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Cc: Patrick Caulfield [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 net/decnet/sysctl_net_decnet.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/decnet/sysctl_net_decnet.c b/net/decnet/sysctl_net_decnet.c
index a6c067b..70a8cf2 100644
--- a/net/decnet/sysctl_net_decnet.c
+++ b/net/decnet/sysctl_net_decnet.c
@@ -491,7 +491,7 @@ static ctl_table dn_root_table[] = {
 
 void dn_register_sysctl(void)
 {
-   dn_table_header = register_sysctl_table(dn_root_table, 1);
+   dn_table_header = register_sysctl_table(dn_root_table, 0);
 }
 
 void dn_unregister_sysctl(void)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: dccp: remove unnecessary insert_at_head flag

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f7d749fa0a4de0a5445a4f023023f9e702238653
Commit: f7d749fa0a4de0a5445a4f023023f9e702238653
Parent: d87abf42762ee3e77b118ea96517cf8c7d33abc1
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:29 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:55 2007 -0800

[PATCH] sysctl: dccp: remove unnecessary insert_at_head flag

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Cc: Arnaldo Carvalho de Melo [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 net/dccp/sysctl.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/dccp/sysctl.c b/net/dccp/sysctl.c
index fdcfca3..3391631 100644
--- a/net/dccp/sysctl.c
+++ b/net/dccp/sysctl.c
@@ -127,7 +127,7 @@ static struct ctl_table_header *dccp_table_header;
 
 int __init dccp_sysctl_init(void)
 {
-   dccp_table_header = register_sysctl_table(dccp_root_table, 1);
+   dccp_table_header = register_sysctl_table(dccp_root_table, 0);
 
return dccp_table_header != NULL ? 0 : -ENOMEM;
 }
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: ax25: remove unnecessary insert_at_head flag

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=28522366f0a2dcb2b1d3ef5eebcc65fcd7c2a422
Commit: 28522366f0a2dcb2b1d3ef5eebcc65fcd7c2a422
Parent: f7d749fa0a4de0a5445a4f023023f9e702238653
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:30 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:55 2007 -0800

[PATCH] sysctl: ax25: remove unnecessary insert_at_head flag

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Acked-by: Ralf Baechle [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 net/ax25/sysctl_net_ax25.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ax25/sysctl_net_ax25.c b/net/ax25/sysctl_net_ax25.c
index d23a27f..afdba04 100644
--- a/net/ax25/sysctl_net_ax25.c
+++ b/net/ax25/sysctl_net_ax25.c
@@ -245,7 +245,7 @@ void ax25_register_sysctl(void)
 
ax25_dir_table[0].child = ax25_table;
 
-   ax25_table_header = register_sysctl_table(ax25_root_table, 1);
+   ax25_table_header = register_sysctl_table(ax25_root_table, 0);
 }
 
 void ax25_unregister_sysctl(void)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: atalk: remove unnecessary insert_at_head flag

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=04c5acfb2413af1698ac27dca69b4d7233dc7249
Commit: 04c5acfb2413af1698ac27dca69b4d7233dc7249
Parent: 28522366f0a2dcb2b1d3ef5eebcc65fcd7c2a422
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:30 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:55 2007 -0800

[PATCH] sysctl: atalk: remove unnecessary insert_at_head flag

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Cc: Arnaldo Carvalho de Melo [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 net/appletalk/sysctl_net_atalk.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/appletalk/sysctl_net_atalk.c b/net/appletalk/sysctl_net_atalk.c
index 40b0af7..4f806b6 100644
--- a/net/appletalk/sysctl_net_atalk.c
+++ b/net/appletalk/sysctl_net_atalk.c
@@ -73,7 +73,7 @@ static struct ctl_table_header *atalk_table_header;
 
 void atalk_register_sysctl(void)
 {
-   atalk_table_header = register_sysctl_table(atalk_root_table, 1);
+   atalk_table_header = register_sysctl_table(atalk_root_table, 0);
 }
 
 void atalk_unregister_sysctl(void)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: scsi: remove unnecessary insert_at_head flag

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=01879db3f0f8205e04fbce06062349f258469247
Commit: 01879db3f0f8205e04fbce06062349f258469247
Parent: 04c5acfb2413af1698ac27dca69b4d7233dc7249
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:31 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:55 2007 -0800

[PATCH] sysctl: scsi: remove unnecessary insert_at_head flag

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Acked-by: James Bottomley [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/scsi/scsi_sysctl.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/scsi_sysctl.c b/drivers/scsi/scsi_sysctl.c
index 04d06c2..b16b775 100644
--- a/drivers/scsi/scsi_sysctl.c
+++ b/drivers/scsi/scsi_sysctl.c
@@ -41,7 +41,7 @@ static struct ctl_table_header *scsi_table_header;
 
 int __init scsi_init_sysctl(void)
 {
-   scsi_table_header = register_sysctl_table(scsi_root_table, 1);
+   scsi_table_header = register_sysctl_table(scsi_root_table, 0);
if (!scsi_table_header)
return -ENOMEM;
return 0;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: md: remove unnecessary insert_at_head flag

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ff1d28efc56432c57f8e46542b4bb2c290b801ad
Commit: ff1d28efc56432c57f8e46542b4bb2c290b801ad
Parent: 01879db3f0f8205e04fbce06062349f258469247
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:32 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:55 2007 -0800

[PATCH] sysctl: md: remove unnecessary insert_at_head flag

The sysctls used by the md driver are have unique binary numbers so remove 
the
insert_at_head flag as it serves no useful purpose.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Cc: Neil Brown [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/md/md.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/md/md.c b/drivers/md/md.c
index e85fa75..ee86df8 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -5581,7 +5581,7 @@ static int __init md_init(void)
md_probe, NULL, NULL);
 
register_reboot_notifier(md_notifier);
-   raid_table_header = register_sysctl_table(raid_root_table, 1);
+   raid_table_header = register_sysctl_table(raid_root_table, 0);
 
md_geninit();
return (0);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: mac_hid: remove unnecessary insert_at_head flag

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0a4b9b6ec175d17f35ace35bf6e7196a51562a00
Commit: 0a4b9b6ec175d17f35ace35bf6e7196a51562a00
Parent: ff1d28efc56432c57f8e46542b4bb2c290b801ad
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:32 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:56 2007 -0800

[PATCH] sysctl: mac_hid: remove unnecessary insert_at_head flag

With unique sysctl binary numbers setting insert_at_head is pointless.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Cc: Jiri Kosina [EMAIL PROTECTED]
Cc: Benjamin Herrenschmidt [EMAIL PROTECTED]
Cc: Dmitry Torokhov [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/macintosh/mac_hid.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/macintosh/mac_hid.c b/drivers/macintosh/mac_hid.c
index f632cec..038a910 100644
--- a/drivers/macintosh/mac_hid.c
+++ b/drivers/macintosh/mac_hid.c
@@ -138,7 +138,7 @@ int __init mac_hid_init(void)
return err;
 
 #if defined(CONFIG_SYSCTL)
-   mac_hid_sysctl_header = register_sysctl_table(mac_hid_root_dir, 1);
+   mac_hid_sysctl_header = register_sysctl_table(mac_hid_root_dir, 0);
 #endif /* CONFIG_SYSCTL */
 
return 0;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: ipmi: remove unnecessary insert_at_head flag

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bfe1a1e160f89a176efd871e68ef4cb8429bb582
Commit: bfe1a1e160f89a176efd871e68ef4cb8429bb582
Parent: 0a4b9b6ec175d17f35ace35bf6e7196a51562a00
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:33 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:56 2007 -0800

[PATCH] sysctl: ipmi: remove unnecessary insert_at_head flag

With unique sysctl binary numbers setting insert_at_head is pointless.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Cc: Corey Minyard [EMAIL PROTECTED]
Acked-by: Benjamin Herrenschmidt [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/char/ipmi/ipmi_poweroff.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/char/ipmi/ipmi_poweroff.c 
b/drivers/char/ipmi/ipmi_poweroff.c
index 9d23136..b3ae65e 100644
--- a/drivers/char/ipmi/ipmi_poweroff.c
+++ b/drivers/char/ipmi/ipmi_poweroff.c
@@ -686,7 +686,7 @@ static int ipmi_poweroff_init (void)
printk(KERN_INFO PFX Power cycle is enabled.\n);
 
 #ifdef CONFIG_PROC_FS
-   ipmi_table_header = register_sysctl_table(ipmi_root_table, 1);
+   ipmi_table_header = register_sysctl_table(ipmi_root_table, 0);
if (!ipmi_table_header) {
printk(KERN_ERR PFX Unable to register powercycle sysctl\n);
rv = -ENOMEM;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: cdrom: remove unnecessary insert_at_head flag

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=208367eeec8d6f6fcee1a0672af2149aeee7b658
Commit: 208367eeec8d6f6fcee1a0672af2149aeee7b658
Parent: bfe1a1e160f89a176efd871e68ef4cb8429bb582
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:34 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:56 2007 -0800

[PATCH] sysctl: cdrom: remove unnecessary insert_at_head flag

With unique binary sysctl numbers setting insert_at_head to override other
sysctl entries is pointless.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Acked-by: James Bottomley [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/cdrom/cdrom.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index 3105ddd..f0a6801 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -3553,7 +3553,7 @@ static void cdrom_sysctl_register(void)
if (initialized == 1)
return;
 
-   cdrom_sysctl_header = register_sysctl_table(cdrom_root_table, 1);
+   cdrom_sysctl_header = register_sysctl_table(cdrom_root_table, 0);
if (cdrom_root_table-ctl_name  cdrom_root_table-child-de)
cdrom_root_table-child-de-owner = THIS_MODULE;
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: move CTL_PM into sysctl.h where it belongs

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=462591b8868a18e52494e223d1a8f13311f50104
Commit: 462591b8868a18e52494e223d1a8f13311f50104
Parent: 4b998d4f6e559fb8eba8141263b2fddc9556391b
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:36 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:56 2007 -0800

[PATCH] sysctl: move CTL_PM into sysctl.h where it belongs

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/frv/kernel/pm.c   |1 -
 include/linux/sysctl.h |1 +
 2 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c
index ee677ce..6b76466 100644
--- a/arch/frv/kernel/pm.c
+++ b/arch/frv/kernel/pm.c
@@ -125,7 +125,6 @@ unsigned long sleep_phys_sp(void *sp)
  * Use a temporary sysctl number. Horrid, but will be cleaned up in 2.6
  * when all the PM interfaces exist nicely.
  */
-#define CTL_PM 9899
 #define CTL_PM_SUSPEND 1
 #define CTL_PM_CMODE 2
 #define CTL_PM_P0 4
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 23a8f3c..bb2a0e6 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -71,6 +71,7 @@ enum
CTL_ABI=9,  /* Binary emulation */
CTL_CPU=10, /* CPU stuff (speed scaling, etc) */
CTL_SUNRPC=7249,/* sunrpc debug */
+   CTL_PM=9899,/* frv power management */
 };
 
 /* CTL_BUS names: */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: frv: pm remove unnecessary insert_at_head flag

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=febe1c257901c766a938007ed3710e7d54618756
Commit: febe1c257901c766a938007ed3710e7d54618756
Parent: 462591b8868a18e52494e223d1a8f13311f50104
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:37 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:56 2007 -0800

[PATCH] sysctl: frv: pm remove unnecessary insert_at_head flag

With unique binary numbers setting insert_at_head to insert yourself at the
head of sysctl list and thus override existing sysctl entries serves no 
point.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Acked-by: David Howells [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/frv/kernel/pm.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c
index 6b76466..c1840d6 100644
--- a/arch/frv/kernel/pm.c
+++ b/arch/frv/kernel/pm.c
@@ -419,7 +419,7 @@ static struct ctl_table pm_dir_table[] =
  */
 static int __init pm_init(void)
 {
-   register_sysctl_table(pm_dir_table, 1);
+   register_sysctl_table(pm_dir_table, 0);
return 0;
 }
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: move CTL_FRV into sysctl.h where it belongs

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=77f6dfb1295cae6e4cbbb90fc6da88fdf27ee95e
Commit: 77f6dfb1295cae6e4cbbb90fc6da88fdf27ee95e
Parent: febe1c257901c766a938007ed3710e7d54618756
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:37 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:56 2007 -0800

[PATCH] sysctl: move CTL_FRV into sysctl.h where it belongs

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Acked-by: David Howells [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/frv/kernel/sysctl.c |1 -
 include/linux/sysctl.h   |1 +
 2 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/frv/kernel/sysctl.c b/arch/frv/kernel/sysctl.c
index ce67680..2f4da32 100644
--- a/arch/frv/kernel/sysctl.c
+++ b/arch/frv/kernel/sysctl.c
@@ -186,7 +186,6 @@ static struct ctl_table frv_table[] =
  * Use a temporary sysctl number. Horrid, but will be cleaned up in 2.6
  * when all the PM interfaces exist nicely.
  */
-#define CTL_FRV 9898
 static struct ctl_table frv_dir_table[] =
 {
{CTL_FRV, frv, NULL, 0, 0555, frv_table},
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index bb2a0e6..113b92b 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -72,6 +72,7 @@ enum
CTL_CPU=10, /* CPU stuff (speed scaling, etc) */
CTL_SUNRPC=7249,/* sunrpc debug */
CTL_PM=9899,/* frv power management */
+   CTL_FRV=9898,   /* frv specific sysctls */
 };
 
 /* CTL_BUS names: */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: frv: remove unnecessary insert_at_head flag

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c8d1a1ac160421fda233def89065149ba7b0a00a
Commit: c8d1a1ac160421fda233def89065149ba7b0a00a
Parent: 77f6dfb1295cae6e4cbbb90fc6da88fdf27ee95e
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:38 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:56 2007 -0800

[PATCH] sysctl: frv: remove unnecessary insert_at_head flag

Since the binary sysctl numbers are unique putting the registered sysctls at
the head of the sysctl list where they can override existing sysctls serves 
no
useful purpose.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Acked-by: David Howells [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/frv/kernel/sysctl.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/frv/kernel/sysctl.c b/arch/frv/kernel/sysctl.c
index 2f4da32..37528eb 100644
--- a/arch/frv/kernel/sysctl.c
+++ b/arch/frv/kernel/sysctl.c
@@ -197,7 +197,7 @@ static struct ctl_table frv_dir_table[] =
  */
 static int __init frv_sysctl_init(void)
 {
-   register_sysctl_table(frv_dir_table, 1);
+   register_sysctl_table(frv_dir_table, 0);
return 0;
 }
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: C99 convert arch/frv/kernel/pm.c

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dfd007a667982372bfb05583c17bf5d4124c3c50
Commit: dfd007a667982372bfb05583c17bf5d4124c3c50
Parent: c8d1a1ac160421fda233def89065149ba7b0a00a
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:39 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:56 2007 -0800

[PATCH] sysctl: C99 convert arch/frv/kernel/pm.c

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Acked-by: David Howells [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/frv/kernel/pm.c |   50 +++---
 1 files changed, 43 insertions(+), 7 deletions(-)

diff --git a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c
index c1840d6..aa50333 100644
--- a/arch/frv/kernel/pm.c
+++ b/arch/frv/kernel/pm.c
@@ -401,17 +401,53 @@ static int cm_sysctl(ctl_table *table, int __user *name, 
int nlen,
 
 static struct ctl_table pm_table[] =
 {
-   {CTL_PM_SUSPEND, suspend, NULL, 0, 0200, NULL, sysctl_pm_do_suspend},
-   {CTL_PM_CMODE, cmode, clock_cmode_current, sizeof(int), 0644, NULL, 
cmode_procctl, cmode_sysctl, NULL},
-   {CTL_PM_P0, p0, clock_p0_current, sizeof(int), 0644, NULL, 
p0_procctl, p0_sysctl, NULL},
-   {CTL_PM_CM, cm, clock_cm_current, sizeof(int), 0644, NULL, 
cm_procctl, cm_sysctl, NULL},
-   {0}
+   {
+   .ctl_name   = CTL_PM_SUSPEND,
+   .procname   = suspend,
+   .data   = NULL,
+   .maxlen = 0,
+   .mode   = 0200,
+   .proc_handler   = sysctl_pm_do_suspend,
+   },
+   {
+   .ctl_name   = CTL_PM_CMODE,
+   .procname   = cmode,
+   .data   = clock_cmode_current,
+   .maxlen = sizeof(int),
+   .mode   = 0644,
+   .proc_handler   = cmode_procctl,
+   .strategy   = cmode_sysctl,
+   },
+   {
+   .ctl_name   = CTL_PM_P0,
+   .procname   = p0,
+   .data   = clock_p0_current,
+   .maxlen = sizeof(int),
+   .mode   = 0644,
+   .proc_handler   = p0_procctl,
+   .strategy   = p0_sysctl,
+   },
+   {
+   .ctl_name   = CTL_PM_CM,
+   .procname   = cm,
+   .data   = clock_cm_current,
+   .maxlen = sizeof(int),
+   .mode   = 0644,
+   .proc_handler   = cm_procctl,
+   .strategy   = cm_sysctl,
+   },
+   { .ctl_name = 0}
 };
 
 static struct ctl_table pm_dir_table[] =
 {
-   {CTL_PM, pm, NULL, 0, 0555, pm_table},
-   {0}
+   {
+   .ctl_name   = CTL_PM,
+   .procname   = pm,
+   .mode   = 0555,
+   .child  = pm_table,
+   },
+   { .ctl_name = 0}
 };
 
 /*
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: C99 convert arch/frv/kernel/sysctl.c

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=317ed68c01cd936a3651c2eb63c47ef2a1ff54e5
Commit: 317ed68c01cd936a3651c2eb63c47ef2a1ff54e5
Parent: dfd007a667982372bfb05583c17bf5d4124c3c50
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:39 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:56 2007 -0800

[PATCH] sysctl: C99 convert arch/frv/kernel/sysctl.c

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Acked-by: David Howells [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/frv/kernel/sysctl.c |   29 -
 1 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/arch/frv/kernel/sysctl.c b/arch/frv/kernel/sysctl.c
index 37528eb..577ad16 100644
--- a/arch/frv/kernel/sysctl.c
+++ b/arch/frv/kernel/sysctl.c
@@ -175,11 +175,25 @@ static int procctl_frv_pin_cxnr(ctl_table *table, int 
write, struct file *filp,
  */
 static struct ctl_table frv_table[] =
 {
-   { 1, cache-mode,  NULL, 0, 0644, NULL, procctl_frv_cachemode },
+   {
+   .ctl_name   = 1,
+   .procname   = cache-mode,
+   .data   = NULL,
+   .maxlen = 0,
+   .mode   = 0644,
+   .proc_handler   = procctl_frv_cachemode,
+   },
 #ifdef CONFIG_MMU
-   { 2, pin-cxnr,NULL, 0, 0644, NULL, procctl_frv_pin_cxnr },
+   {
+   .ctl_name   = 2,
+   .procname   = pin-cxnr,
+   .data   = NULL,
+   .maxlen = 0,
+   .mode   = 0644,
+   .proc_handler   = procctl_frv_pin_cxnr
+   },
 #endif
-   { 0 }
+   {}
 };
 
 /*
@@ -188,8 +202,13 @@ static struct ctl_table frv_table[] =
  */
 static struct ctl_table frv_dir_table[] =
 {
-   {CTL_FRV, frv, NULL, 0, 0555, frv_table},
-   {0}
+   {
+   .ctl_name   = CTL_FRV,
+   .procname   = frv,
+   .mode   = 0555,
+   .child  = frv_table
+   },
+   {}
 };
 
 /*
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: sn: remove sysctl ABI BREAKAGE

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=79eec3d3d928e8ea20160c941236f11ecca99071
Commit: 79eec3d3d928e8ea20160c941236f11ecca99071
Parent: 317ed68c01cd936a3651c2eb63c47ef2a1ff54e5
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:40 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:56 2007 -0800

[PATCH] sysctl: sn: remove sysctl ABI BREAKAGE

By not using the enumeration in sysctl.h (or even understanding it) the SN
platform placed their arch specific xpc directory on top of CTL_KERN and 
only
because they didn't have 4 entries in their xpc directory got lucky and 
didn't
break glibc.

This is totally irresponsible.  So this patch entirely removes sys_sysctl
support from their sysctl code.  Hopefully they don't have ascii name
conflicts as well.

And now that they have no ABI numbers add them to the end instead of the
sysctl list instead of the head so nothing else will be overridden.

Cc: Tony Luck [EMAIL PROTECTED]
Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/ia64/sn/kernel/xpc_main.c |   12 ++--
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/ia64/sn/kernel/xpc_main.c b/arch/ia64/sn/kernel/xpc_main.c
index 7a387d2..24adb75 100644
--- a/arch/ia64/sn/kernel/xpc_main.c
+++ b/arch/ia64/sn/kernel/xpc_main.c
@@ -101,7 +101,7 @@ static int xpc_disengage_request_max_timelimit = 120;
 
 static ctl_table xpc_sys_xpc_hb_dir[] = {
{
-   1,
+   CTL_UNNUMBERED,
hb_interval,
xpc_hb_interval,
sizeof(int),
@@ -114,7 +114,7 @@ static ctl_table xpc_sys_xpc_hb_dir[] = {
xpc_hb_max_interval
},
{
-   2,
+   CTL_UNNUMBERED,
hb_check_interval,
xpc_hb_check_interval,
sizeof(int),
@@ -130,7 +130,7 @@ static ctl_table xpc_sys_xpc_hb_dir[] = {
 };
 static ctl_table xpc_sys_xpc_dir[] = {
{
-   1,
+   CTL_UNNUMBERED,
hb,
NULL,
0,
@@ -138,7 +138,7 @@ static ctl_table xpc_sys_xpc_dir[] = {
xpc_sys_xpc_hb_dir
},
{
-   2,
+   CTL_UNNUMBERED,
disengage_request_timelimit,
xpc_disengage_request_timelimit,
sizeof(int),
@@ -154,7 +154,7 @@ static ctl_table xpc_sys_xpc_dir[] = {
 };
 static ctl_table xpc_sys_dir[] = {
{
-   1,
+   CTL_UNNUMBERED,
xpc,
NULL,
0,
@@ -1251,7 +1251,7 @@ xpc_init(void)
snprintf(xpc_part-bus_id, BUS_ID_SIZE, part);
snprintf(xpc_chan-bus_id, BUS_ID_SIZE, chan);
 
-   xpc_sysctl = register_sysctl_table(xpc_sys_dir, 1);
+   xpc_sysctl = register_sysctl_table(xpc_sys_dir, 0);
 
/*
 * The first few fields of each entry of xpc_partitions[] need to
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: C99 convert the ctl_tables in arch/mips/au1000/common/power.c

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7ed744d1e8faed90aa027c08eeed21c4120e623d
Commit: 7ed744d1e8faed90aa027c08eeed21c4120e623d
Parent: ee404566f97f9254433399fbbcfa05390c7c55f7
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:43 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:57 2007 -0800

[PATCH] sysctl: C99 convert the ctl_tables in 
arch/mips/au1000/common/power.c

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Acked-by: Ralf Baechle [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/mips/au1000/common/power.c |   38 --
 1 files changed, 32 insertions(+), 6 deletions(-)

diff --git a/arch/mips/au1000/common/power.c b/arch/mips/au1000/common/power.c
index b531ab7..31256b8 100644
--- a/arch/mips/au1000/common/power.c
+++ b/arch/mips/au1000/common/power.c
@@ -419,15 +419,41 @@ static int pm_do_freq(ctl_table * ctl, int write, struct 
file *file,
 
 
 static struct ctl_table pm_table[] = {
-   {CTL_UNNUMBERED, suspend, NULL, 0, 0600, NULL, pm_do_suspend},
-   {CTL_UNNUMBERED, sleep, NULL, 0, 0600, NULL, pm_do_sleep},
-   {CTL_UNNUMBERED, freq, NULL, 0, 0600, NULL, pm_do_freq},
-   {0}
+   {
+   .ctl_name   = CTL_UNNUMBERED,
+   .procname   = suspend,
+   .data   = NULL,
+   .maxlen = 0,
+   .mode   = 0600,
+   .proc_handler   = pm_do_suspend
+   },
+   {
+   .ctl_name   = CTL_UNNUMBERED,
+   .procname   = sleep,
+   .data   = NULL,
+   .maxlen = 0,
+   .mode   = 0600,
+   .proc_handler   = pm_do_sleep
+   },
+   {
+   .ctl_name   = CTL_UNNUMBERED,
+   .procname   = freq,
+   .data   = NULL,
+   .maxlen = 0,
+   .mode   = 0600,
+   .proc_handler   = pm_do_freq
+   },
+   {}
 };
 
 static struct ctl_table pm_dir_table[] = {
-   {CTL_UNNUMBERED, pm, NULL, 0, 0555, pm_table},
-   {0}
+   {
+   .ctl_name   = CTL_UNNUMBERED,
+   .procname   = pm,
+   .mode   = 0555,
+   .child  = pm_table
+   },
+   {}
 };
 
 /*
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: C99 convert arch/mips/lasat/sysctl.c and remove ABI breakage

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8d8cb8a1bbd92a77208bdeaa25c3f17f5da9297d
Commit: 8d8cb8a1bbd92a77208bdeaa25c3f17f5da9297d
Parent: 7ed744d1e8faed90aa027c08eeed21c4120e623d
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:44 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:57 2007 -0800

[PATCH] sysctl: C99 convert arch/mips/lasat/sysctl.c and remove ABI breakage

While C99 converting the ctl_table initializers I realized that the binary
sysctl numbers were in conflict with the binary values under CTL_KERN.
Including CTL_KERN KERN_VERSION as used by glibc.  So I just removed the
sysctl binary interface for these values, as it was unsupportable.

Luckily these sysctl were inserted at the end of the sysctl list so this bug
was not visible to userspace.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Acked-by: Ralf Baechle [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/mips/lasat/sysctl.c |  145 -
 1 files changed, 116 insertions(+), 29 deletions(-)

diff --git a/arch/mips/lasat/sysctl.c b/arch/mips/lasat/sysctl.c
index 1287835..c04e82f 100644
--- a/arch/mips/lasat/sysctl.c
+++ b/arch/mips/lasat/sysctl.c
@@ -302,42 +302,129 @@ extern int lasat_boot_to_service;
 #ifdef CONFIG_SYSCTL
 
 static ctl_table lasat_table[] = {
-   {LASAT_CPU_HZ, cpu-hz, lasat_board_info.li_cpu_hz, sizeof(int),
-0444, NULL, proc_dointvec, sysctl_intvec},
-   {LASAT_BUS_HZ, bus-hz, lasat_board_info.li_bus_hz, sizeof(int),
-0444, NULL, proc_dointvec, sysctl_intvec},
-   {LASAT_MODEL, bmid, lasat_board_info.li_bmid, sizeof(int),
-0444, NULL, proc_dointvec, sysctl_intvec},
-   {LASAT_PRID, prid, lasat_board_info.li_prid, sizeof(int),
-0644, NULL, proc_lasat_eeprom_value, sysctl_lasat_eeprom_value},
+   {
+   .ctl_name   = CTL_UNNUMBERED,
+   .procname   = cpu-hz,
+   .data   = lasat_board_info.li_cpu_hz,
+   .maxlen = sizeof(int),
+   .mode   = 0444,
+   .proc_handler   = proc_dointvec,
+   .strategy   = sysctl_intvec
+   },
+   {
+   .ctl_name   = CTL_UNNUMBERED,
+   .procname   = bus-hz,
+   .data   = lasat_board_info.li_bus_hz,
+   .maxlen = sizeof(int),
+   .mode   = 0444,
+   .proc_handler   = proc_dointvec,
+   .strategy   = sysctl_intvec
+   },
+   {
+   .ctl_name   = CTL_UNNUMBERED,
+   .procname   = bmid,
+   .data   = lasat_board_info.li_bmid,
+   .maxlen = sizeof(int),
+   .mode   = 0444,
+   .proc_handler   = proc_dointvec,
+   .strategy   = sysctl_intvec
+   },
+   {
+   .ctl_name   = CTL_UNNUMBERED,
+   .procname   = prid,
+   .data   = lasat_board_info.li_prid,
+   .maxlen = sizeof(int),
+   .mode   = 0644,
+   .proc_handler   = proc_lasat_eeprom_value,
+   .strategy   = sysctl_lasat_eeprom_value
+   },
 #ifdef CONFIG_INET
-   {LASAT_IPADDR, ipaddr, lasat_board_info.li_eeprom_info.ipaddr, 
sizeof(int),
-0644, NULL, proc_lasat_ip, sysctl_lasat_intvec},
-   {LASAT_NETMASK, netmask, lasat_board_info.li_eeprom_info.netmask, 
sizeof(int),
-0644, NULL, proc_lasat_ip, sysctl_lasat_intvec},
-   {LASAT_BCAST, bcastaddr, lasat_bcastaddr,
-   sizeof(lasat_bcastaddr), 0600, NULL,
-   proc_dostring, sysctl_string},
+   {
+   .ctl_name   = CTL_UNNUMBERED,
+   .procname   = ipaddr,
+   .data   = lasat_board_info.li_eeprom_info.ipaddr,
+   .maxlen = sizeof(int),
+   .mode   = 0644,
+   .proc_handler   = proc_lasat_ip,
+   .strategy   = sysctl_lasat_intvec
+   },
+   {
+   .ctl_name   = LASAT_NETMASK,
+   .procname   = netmask,
+   .data   = lasat_board_info.li_eeprom_info.netmask,
+   .maxlen = sizeof(int),
+   .mode   = 0644,
+   .proc_handler   = proc_lasat_ip,
+   .strategy   = sysctl_lasat_intvec
+   },
+   {
+   .ctl_name   = CTL_UNNUMBERED,
+   .procname   = bcastaddr,
+   .data   = lasat_bcastaddr,
+   .maxlen = sizeof(lasat_bcastaddr),
+   .mode   = 0600,
+   

[PATCH] sysctl: s390: move sysctl definitions to sysctl.h

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=feceb63ec589380f2125edcb70127e6a635af1cc
Commit: feceb63ec589380f2125edcb70127e6a635af1cc
Parent: 8d8cb8a1bbd92a77208bdeaa25c3f17f5da9297d
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:45 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:57 2007 -0800

[PATCH] sysctl: s390: move sysctl definitions to sysctl.h

We need to have the the definition of all top level sysctl directories
registers in sysctl.h so we don't conflict by accident and cause abi 
problems.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Acked-by: Martin Schwidefsky [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/s390/appldata/appldata.h |3 +--
 arch/s390/kernel/debug.c  |1 -
 arch/s390/mm/cmm.c|4 
 include/linux/sysctl.h|7 +++
 4 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/arch/s390/appldata/appldata.h b/arch/s390/appldata/appldata.h
index 0429481..4069b81 100644
--- a/arch/s390/appldata/appldata.h
+++ b/arch/s390/appldata/appldata.h
@@ -21,8 +21,7 @@
 #define APPLDATA_RECORD_NET_SUM_ID 0x03/* must be  256 ! */
 #define APPLDATA_RECORD_PROC_ID0x04
 
-#define CTL_APPLDATA   2120/* sysctl IDs, must be unique */
-#define CTL_APPLDATA_TIMER 2121
+#define CTL_APPLDATA_TIMER 2121/* sysctl IDs, must be unique */
 #define CTL_APPLDATA_INTERVAL  2122
 #define CTL_APPLDATA_MEM   2123
 #define CTL_APPLDATA_OS2124
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c
index 51653d8..3fcde15 100644
--- a/arch/s390/kernel/debug.c
+++ b/arch/s390/kernel/debug.c
@@ -852,7 +852,6 @@ debug_finish_entry(debug_info_t * id, debug_entry_t* 
active, int level,
 static int debug_stoppable=1;
 static int debug_active=1;
 
-#define CTL_S390DBF 5677
 #define CTL_S390DBF_STOPPABLE 5678
 #define CTL_S390DBF_ACTIVE 5679
 
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c
index f93a056..ccb9ab5 100644
--- a/arch/s390/mm/cmm.c
+++ b/arch/s390/mm/cmm.c
@@ -256,10 +256,6 @@ cmm_skip_blanks(char *cp, char **endp)
 }
 
 #ifdef CONFIG_CMM_PROC
-/* These will someday get removed. */
-#define VM_CMM_PAGES   
-#define VM_CMM_TIMED_PAGES 1112
-#define VM_CMM_TIMEOUT 1113
 
 static struct ctl_table cmm_table[];
 
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 113b92b..76541a6 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -70,6 +70,8 @@ enum
CTL_BUS=8,  /* Busses */
CTL_ABI=9,  /* Binary emulation */
CTL_CPU=10, /* CPU stuff (speed scaling, etc) */
+   CTL_APPLDATA=2120,  /* s390 appldata */
+   CTL_S390DBF=5677,   /* s390 debug */
CTL_SUNRPC=7249,/* sunrpc debug */
CTL_PM=9899,/* frv power management */
CTL_FRV=9898,   /* frv specific sysctls */
@@ -205,6 +207,11 @@ enum
VM_PANIC_ON_OOM=33, /* panic at out-of-memory */
VM_VDSO_ENABLED=34, /* map VDSO into new processes? */
VM_MIN_SLAB=35,  /* Percent pages ignored by zone reclaim */
+
+   /* s390 vm cmm sysctls */
+   VM_CMM_PAGES=,
+   VM_CMM_TIMED_PAGES=1112,
+   VM_CMM_TIMEOUT=1113,
 };
 
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: s390: remove unnecessary use of insert_at_head

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=481f7337a1316c11b357ab838653f7f9254643be
Commit: 481f7337a1316c11b357ab838653f7f9254643be
Parent: feceb63ec589380f2125edcb70127e6a635af1cc
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:46 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:57 2007 -0800

[PATCH] sysctl: s390: remove unnecessary use of insert_at_head

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Acked-by: Martin Schwidefsky [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/s390/appldata/appldata_base.c |4 ++--
 arch/s390/kernel/debug.c   |2 +-
 arch/s390/mm/cmm.c |2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/s390/appldata/appldata_base.c 
b/arch/s390/appldata/appldata_base.c
index c9da7d1..58cefcf 100644
--- a/arch/s390/appldata/appldata_base.c
+++ b/arch/s390/appldata/appldata_base.c
@@ -506,7 +506,7 @@ int appldata_register_ops(struct appldata_ops *ops)
 
ops-ctl_table[3].ctl_name = 0;
 
-   ops-sysctl_header = register_sysctl_table(ops-ctl_table,1);
+   ops-sysctl_header = register_sysctl_table(ops-ctl_table,0);
 
P_INFO(%s-ops registered!\n, ops-name);
return 0;
@@ -606,7 +606,7 @@ static int __init appldata_init(void)
/* Register cpu hotplug notifier */
register_hotcpu_notifier(appldata_nb);
 
-   appldata_sysctl_header = register_sysctl_table(appldata_dir_table, 1);
+   appldata_sysctl_header = register_sysctl_table(appldata_dir_table, 0);
 #ifdef MODULE
appldata_dir_table[0].de-owner = THIS_MODULE;
appldata_table[0].de-owner = THIS_MODULE;
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c
index 3fcde15..1b95148 100644
--- a/arch/s390/kernel/debug.c
+++ b/arch/s390/kernel/debug.c
@@ -1053,7 +1053,7 @@ __init debug_init(void)
 {
int rc = 0;
 
-   s390dbf_sysctl_header = register_sysctl_table(s390dbf_dir_table, 1);
+   s390dbf_sysctl_header = register_sysctl_table(s390dbf_dir_table, 0);
down(debug_lock);
debug_debugfs_root_entry = debugfs_create_dir(DEBUG_DIR_ROOT,NULL);
printk(KERN_INFO debug: Initialization complete\n);
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c
index ccb9ab5..c6d6dde 100644
--- a/arch/s390/mm/cmm.c
+++ b/arch/s390/mm/cmm.c
@@ -418,7 +418,7 @@ cmm_init (void)
int rc = -ENOMEM;
 
 #ifdef CONFIG_CMM_PROC
-   cmm_sysctl_header = register_sysctl_table(cmm_dir_table, 1);
+   cmm_sysctl_header = register_sysctl_table(cmm_dir_table, 0);
if (!cmm_sysctl_header)
goto out;
 #endif
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: C99 convert ctl_tables entries in arch/ppc/kernel/ppc_htab.c

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ded2e9bdfc5ac09f29b9f73fc1b75b1080edef90
Commit: ded2e9bdfc5ac09f29b9f73fc1b75b1080edef90
Parent: f5f106784eba94a00bbe73be651e423386ebe6d4
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:47 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:57 2007 -0800

[PATCH] sysctl: C99 convert ctl_tables entries in arch/ppc/kernel/ppc_htab.c

And make the mode of the kernel directory 0555 no one is allowed to write to
sysctl directories.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Acked-by: Benjamin Herrenschmidt [EMAIL PROTECTED]
Cc: Paul Mackerras [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/ppc/kernel/ppc_htab.c |   11 ---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/arch/ppc/kernel/ppc_htab.c b/arch/ppc/kernel/ppc_htab.c
index bd129d3..77b20ff 100644
--- a/arch/ppc/kernel/ppc_htab.c
+++ b/arch/ppc/kernel/ppc_htab.c
@@ -442,11 +442,16 @@ static ctl_table htab_ctl_table[]={
.mode   = 0644,
.proc_handler   = proc_dol2crvec,
},
-   { 0, },
+   {}
 };
 static ctl_table htab_sysctl_root[] = {
-   { 1, kernel, NULL, 0, 0755, htab_ctl_table, },
-   { 0,},
+   {
+   .ctl_name   = CTL_KERN,
+   .procname   = kernel,
+   .mode   = 0555,
+   .child  = htab_ctl_table,
+   },
+   {}
 };
 
 static int __init
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: x86_64: remove unnecessary use of insert_at_head

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f3854517f3b4cf372d3d5a2a71969c9b26090b7a
Commit: f3854517f3b4cf372d3d5a2a71969c9b26090b7a
Parent: e3c6449dcdfa023ca45b7ef1f7dce102f34f25ad
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:49 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:57 2007 -0800

[PATCH] sysctl: x86_64: remove unnecessary use of insert_at_head

The only sysctl x86_64 provides are not provided elsewhere, so 
insert_at_head
is unnecessary.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Acked-by: Andi Kleen [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/x86_64/ia32/ia32_binfmt.c |2 +-
 arch/x86_64/mm/init.c  |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c
index 6efe04f..44c83be 100644
--- a/arch/x86_64/ia32/ia32_binfmt.c
+++ b/arch/x86_64/ia32/ia32_binfmt.c
@@ -357,7 +357,7 @@ static ctl_table abi_root_table2[] = {
 
 static __init int ia32_binfmt_init(void)
 { 
-   register_sysctl_table(abi_root_table2, 1);
+   register_sysctl_table(abi_root_table2, 0);
return 0;
 }
 __initcall(ia32_binfmt_init);
diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c
index 2968b90..65aa66c 100644
--- a/arch/x86_64/mm/init.c
+++ b/arch/x86_64/mm/init.c
@@ -724,7 +724,7 @@ static ctl_table debug_root_table2[] = {
 
 static __init int x8664_sysctl_init(void)
 { 
-   register_sysctl_table(debug_root_table2, 1);
+   register_sysctl_table(debug_root_table2, 0);
return 0;
 }
 __initcall(x8664_sysctl_init);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: C99 convert ctl_tables in arch/x86_64/ia32/ia32_binfmt.c

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=306421f387ccea0e8eeb04425e674910f100952b
Commit: 306421f387ccea0e8eeb04425e674910f100952b
Parent: f3854517f3b4cf372d3d5a2a71969c9b26090b7a
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:49 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:57 2007 -0800

[PATCH] sysctl: C99 convert ctl_tables in arch/x86_64/ia32/ia32_binfmt.c

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Acked-by: Andi Kleen [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/x86_64/ia32/ia32_binfmt.c |   30 --
 1 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c
index 44c83be..354a0a0 100644
--- a/arch/x86_64/ia32/ia32_binfmt.c
+++ b/arch/x86_64/ia32/ia32_binfmt.c
@@ -344,16 +344,26 @@ EXPORT_SYMBOL(ia32_setup_arg_pages);
 #include linux/sysctl.h
 
 static ctl_table abi_table2[] = {
-   { 99, vsyscall32, sysctl_vsyscall32, sizeof(int), 0644, NULL,
- proc_dointvec },
-   { 0, }
-}; 
-
-static ctl_table abi_root_table2[] = { 
-   { .ctl_name = CTL_ABI, .procname = abi, .mode = 0555, 
- .child = abi_table2 }, 
-   { 0 }, 
-}; 
+   {
+   .ctl_name   = 99,
+   .procname   = vsyscall32,
+   .data   = sysctl_vsyscall32,
+   .maxlen = sizeof(int),
+   .mode   = 0644,
+   .proc_handler   = proc_dointvec
+   },
+   {}
+};
+
+static ctl_table abi_root_table2[] = {
+   {
+   .ctl_name = CTL_ABI,
+   .procname = abi,
+   .mode = 0555,
+   .child = abi_table2
+   },
+   {}
+};
 
 static __init int ia32_binfmt_init(void)
 { 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: C99 convert arch/sh64/kernel/traps.c and remove ABI breakage

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e3c6449dcdfa023ca45b7ef1f7dce102f34f25ad
Commit: e3c6449dcdfa023ca45b7ef1f7dce102f34f25ad
Parent: ded2e9bdfc5ac09f29b9f73fc1b75b1080edef90
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:48 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:57 2007 -0800

[PATCH] sysctl: C99 convert arch/sh64/kernel/traps.c and remove ABI breakage

While doing the C99 conversion I notices that the top level sh64 directory 
was
using the binary number for CTL_KERN.  That is a no-no so I removed the
support for the sysctl binary interface only leaving sysctl /proc support.

At least the sysctl tables were placed at the end of the list so user space
did not see this mistake.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Acked-by: Paul Mundt [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/sh64/kernel/traps.c |   49 +++--
 1 files changed, 38 insertions(+), 11 deletions(-)

diff --git a/arch/sh64/kernel/traps.c b/arch/sh64/kernel/traps.c
index 224b7f5..02cca74 100644
--- a/arch/sh64/kernel/traps.c
+++ b/arch/sh64/kernel/traps.c
@@ -910,25 +910,52 @@ static int misaligned_fixup(struct pt_regs *regs)
 }
 
 static ctl_table unaligned_table[] = {
-   {1, kernel_reports, kernel_mode_unaligned_fixup_count,
-   sizeof(int), 0644, NULL, proc_dointvec},
+   {
+   .ctl_name   = CTL_UNNUMBERED,
+   .procname   = kernel_reports,
+   .data   = kernel_mode_unaligned_fixup_count,
+   .maxlen = sizeof(int),
+   .mode   = 0644,
+   .proc_handler   = proc_dointvec
+   },
 #if defined(CONFIG_SH64_USER_MISALIGNED_FIXUP)
-   {2, user_reports, user_mode_unaligned_fixup_count,
-   sizeof(int), 0644, NULL, proc_dointvec},
-   {3, user_enable, user_mode_unaligned_fixup_enable,
-   sizeof(int), 0644, NULL, proc_dointvec},
+   {
+   .ctl_name   = CTL_UNNUMBERED,
+   .procname   = user_reports,
+   .data   = user_mode_unaligned_fixup_count,
+   .maxlen = sizeof(int),
+   .mode   = 0644,
+   .proc_handler   = proc_dointvec
+   },
+   {
+   .ctl_name   = CTL_UNNUMBERED,
+   .procname   = user_enable,
+   .data   = user_mode_unaligned_fixup_enable,
+   .maxlen = sizeof(int),
+   .mode   = 0644,
+   .proc_handler   = proc_dointvec},
 #endif
-   {0}
+   {}
 };
 
 static ctl_table unaligned_root[] = {
-   {1, unaligned_fixup, NULL, 0, 0555, unaligned_table},
-   {0}
+   {
+   .ctl_name   = CTL_UNNUMBERED,
+   .procname   = unaligned_fixup,
+   .mode   = 0555,
+   unaligned_table
+   },
+   {}
 };
 
 static ctl_table sh64_root[] = {
-   {1, sh64, NULL, 0, 0555, unaligned_root},
-   {0}
+   {
+   .ctl_name   = CTL_UNNUMBERED,
+   .procname   = sh64,
+   .mode   = 0555,
+   .child  = unaligned_root
+   },
+   {}
 };
 static struct ctl_table_header *sysctl_header;
 static int __init init_sysctl(void)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: C99 convert ctl_tables in arch/powerpc/kernel/idle.c

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f5f106784eba94a00bbe73be651e423386ebe6d4
Commit: f5f106784eba94a00bbe73be651e423386ebe6d4
Parent: 481f7337a1316c11b357ab838653f7f9254643be
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:46 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:57 2007 -0800

[PATCH] sysctl: C99 convert ctl_tables in arch/powerpc/kernel/idle.c

This was partially done already and there was no ABI breakage what a relief.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Acked-by: Benjamin Herrenschmidt [EMAIL PROTECTED]
Cc: Paul Mackerras [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/powerpc/kernel/idle.c |   11 ---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c
index 8994af3..8b27bb1 100644
--- a/arch/powerpc/kernel/idle.c
+++ b/arch/powerpc/kernel/idle.c
@@ -110,11 +110,16 @@ static ctl_table powersave_nap_ctl_table[]={
.mode   = 0644,
.proc_handler   = proc_dointvec,
},
-   { 0, },
+   {}
 };
 static ctl_table powersave_nap_sysctl_root[] = {
-   { 1, kernel, NULL, 0, 0755, powersave_nap_ctl_table, },
-   { 0,},
+   {
+   .ctl_name   = CTL_KERN,
+   .procname   = kernel,
+   .mode   = 0755,
+   .child  = powersave_nap_ctl_table,
+   },
+   {}
 };
 
 static int __init
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: remove sys_sysctl support from drivers/char/rtc.c

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7735362ac32062725ba08ece014d669b9bede505
Commit: 7735362ac32062725ba08ece014d669b9bede505
Parent: 22943364cffd404e1bba4f097ac21bc74031eba3
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:52 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:57 2007 -0800

[PATCH] sysctl: remove sys_sysctl support from drivers/char/rtc.c

The real time clock driver was using the binary number reserved for cdroms 
in
the sysctl binary number interface, which is a no-no.  So since the sysctl
binary interface is wrong remove it.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Cc: Alessandro Zummo [EMAIL PROTECTED]
Acked-by: Ralf Baechle [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/char/rtc.c |6 ++
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c
index b6d3072..9620abb 100644
--- a/drivers/char/rtc.c
+++ b/drivers/char/rtc.c
@@ -282,7 +282,7 @@ irqreturn_t rtc_interrupt(int irq, void *dev_id)
  */
 static ctl_table rtc_table[] = {
{
-   .ctl_name   = 1,
+   .ctl_name   = CTL_UNNUMBERED,
.procname   = max-user-freq,
.data   = rtc_max_user_freq,
.maxlen = sizeof(int),
@@ -294,9 +294,8 @@ static ctl_table rtc_table[] = {
 
 static ctl_table rtc_root[] = {
{
-   .ctl_name   = 1,
+   .ctl_name   = CTL_UNNUMBERED,
.procname   = rtc,
-   .maxlen = 0,
.mode   = 0555,
.child  = rtc_table,
},
@@ -307,7 +306,6 @@ static ctl_table dev_root[] = {
{
.ctl_name   = CTL_DEV,
.procname   = dev,
-   .maxlen = 0,
.mode   = 0555,
.child  = rtc_root,
},
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: register the sysctl number used by the arlan driver

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=59fc5313b37328f850105d5f1caa18f11089c9ba
Commit: 59fc5313b37328f850105d5f1caa18f11089c9ba
Parent: 7735362ac32062725ba08ece014d669b9bede505
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:53 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:57 2007 -0800

[PATCH] sysctl: register the sysctl number used by the arlan driver

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Cc: John W. Linville [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/net/wireless/arlan-proc.c |2 +-
 include/linux/sysctl.h|1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/arlan-proc.c 
b/drivers/net/wireless/arlan-proc.c
index 5fa9854..20499a6 100644
--- a/drivers/net/wireless/arlan-proc.c
+++ b/drivers/net/wireless/arlan-proc.c
@@ -1216,7 +1216,7 @@ static ctl_table arlan_table[MAX_ARLANS + 1] =
 static ctl_table arlan_root_table[] =
 {
{
-   .ctl_name   = 254,
+   .ctl_name   = CTL_ARLAN,
.procname   = arlan,
.maxlen = 0,
.mode   = 0555,
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 76541a6..2eb3729 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -70,6 +70,7 @@ enum
CTL_BUS=8,  /* Busses */
CTL_ABI=9,  /* Binary emulation */
CTL_CPU=10, /* CPU stuff (speed scaling, etc) */
+   CTL_ARLAN=254,  /* arlan wireless driver */
CTL_APPLDATA=2120,  /* s390 appldata */
CTL_S390DBF=5677,   /* s390 debug */
CTL_SUNRPC=7249,/* sunrpc debug */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: C99 convert ctl_tables in drivers/parport/procfs.c

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2564b7bd9ba4b4bf941b90f1ccd5e2c00e0f83d3
Commit: 2564b7bd9ba4b4bf941b90f1ccd5e2c00e0f83d3
Parent: 59fc5313b37328f850105d5f1caa18f11089c9ba
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:54 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:57 2007 -0800

[PATCH] sysctl: C99 convert ctl_tables in drivers/parport/procfs.c

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/parport/procfs.c |  264 +-
 1 files changed, 189 insertions(+), 75 deletions(-)

diff --git a/drivers/parport/procfs.c b/drivers/parport/procfs.c
index 2e744a2..9a7f1d4 100644
--- a/drivers/parport/procfs.c
+++ b/drivers/parport/procfs.c
@@ -233,12 +233,12 @@ static int do_hardware_modes (ctl_table *table, int write,
return copy_to_user(result, buffer, len) ? -EFAULT : 0;
 }
 
-#define PARPORT_PORT_DIR(child) { 0, NULL, NULL, 0, 0555, child }
-#define PARPORT_PARPORT_DIR(child) { DEV_PARPORT, parport, \
- NULL, 0, 0555, child }
-#define PARPORT_DEV_DIR(child) { CTL_DEV, dev, NULL, 0, 0555, child }
-#define PARPORT_DEVICES_ROOT_DIR  { DEV_PARPORT_DEVICES, devices, \
-NULL, 0, 0555, NULL }
+#define PARPORT_PORT_DIR(CHILD) { .ctl_name = 0, .procname = NULL, .mode = 
0555, .child = CHILD }
+#define PARPORT_PARPORT_DIR(CHILD) { .ctl_name = DEV_PARPORT, .procname = 
parport, \
+ .mode = 0555, .child = CHILD }
+#define PARPORT_DEV_DIR(CHILD) { .ctl_name = CTL_DEV, .procname = dev, .mode 
= 0555, .child = CHILD }
+#define PARPORT_DEVICES_ROOT_DIR  { .ctl_name = DEV_PARPORT_DEVICES, .procname 
= devices, \
+.mode = 0555, .child = NULL }
 
 static const unsigned long parport_min_timeslice_value =
 PARPORT_MIN_TIMESLICE_VALUE;
@@ -263,50 +263,118 @@ struct parport_sysctl_table {
 };
 
 static const struct parport_sysctl_table parport_sysctl_template = {
-   NULL,
+   .sysctl_header = NULL,
 {
-   { DEV_PARPORT_SPINTIME, spintime,
- NULL, sizeof(int), 0644, NULL,
- proc_dointvec_minmax, NULL, NULL,
- (void*) parport_min_spintime_value,
- (void*) parport_max_spintime_value },
-   { DEV_PARPORT_BASE_ADDR, base-addr,
- NULL, 0, 0444, NULL,
- do_hardware_base_addr },
-   { DEV_PARPORT_IRQ, irq,
- NULL, 0, 0444, NULL,
- do_hardware_irq },
-   { DEV_PARPORT_DMA, dma,
- NULL, 0, 0444, NULL,
- do_hardware_dma },
-   { DEV_PARPORT_MODES, modes,
- NULL, 0, 0444, NULL,
- do_hardware_modes },
+   {
+   .ctl_name   = DEV_PARPORT_SPINTIME,
+   .procname   = spintime,
+   .data   = NULL,
+   .maxlen = sizeof(int),
+   .mode   = 0644,
+   .proc_handler   = proc_dointvec_minmax,
+   .extra1 = (void*) parport_min_spintime_value,
+   .extra2 = (void*) parport_max_spintime_value
+   },
+   {
+   .ctl_name   = DEV_PARPORT_BASE_ADDR,
+   .procname   = base-addr,
+   .data   = NULL,
+   .maxlen = 0,
+   .mode   = 0444,
+   .proc_handler   = do_hardware_base_addr
+   },
+   {
+   .ctl_name   = DEV_PARPORT_IRQ,
+   .procname   = irq,
+   .data   = NULL,
+   .maxlen = 0,
+   .mode   = 0444,
+   .proc_handler   = do_hardware_irq
+   },
+   {
+   .ctl_name   = DEV_PARPORT_DMA,
+   .procname   = dma,
+   .data   = NULL,
+   .maxlen = 0,
+   .mode   = 0444,
+   .proc_handler   = do_hardware_dma
+   },
+   {
+   .ctl_name   = DEV_PARPORT_MODES,
+   .procname   = modes,
+   .data   = NULL,
+   .maxlen = 0,
+   .mode   = 0444,
+   .proc_handler   = do_hardware_modes
+   },
PARPORT_DEVICES_ROOT_DIR,
 #ifdef 

[PATCH] sysctl: C99 convert coda ctl_tables and remove binary sysctls

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fd6065b4fdcb64c43e400278ebd0cb56989871c3
Commit: fd6065b4fdcb64c43e400278ebd0cb56989871c3
Parent: 2564b7bd9ba4b4bf941b90f1ccd5e2c00e0f83d3
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:55 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:58 2007 -0800

[PATCH] sysctl: C99 convert coda ctl_tables and remove binary sysctls

Will converting the coda sysctl initializers I discovered that it is yet
another user of sysctl that was stomping CTL_KERN.  So off with it's
sys_sysctl support since it wasn't done in a supportable way.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Cc: Jan Harkes [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/coda/sysctl.c |   58 -
 1 files changed, 48 insertions(+), 10 deletions(-)

diff --git a/fs/coda/sysctl.c b/fs/coda/sysctl.c
index db3b1a9..8e50642 100644
--- a/fs/coda/sysctl.c
+++ b/fs/coda/sysctl.c
@@ -33,8 +33,6 @@
 
 static struct ctl_table_header *fs_table_header;
 
-#define FS_CODA 1   /* Coda file system */
-
 #define CODA_TIMEOUT3   /* timeout on upcalls to become intrble */
 #define CODA_HARD   5   /* mount type hard or soft */
 #define CODA_VFS6   /* vfs statistics */
@@ -183,17 +181,57 @@ static const struct file_operations 
proc_cache_inv_stats_fops = {
 };
 
 static ctl_table coda_table[] = {
-   {CODA_TIMEOUT, timeout, coda_timeout, sizeof(int), 0644, NULL, 
proc_dointvec},
-   {CODA_HARD, hard, coda_hard, sizeof(int), 0644, NULL, 
proc_dointvec},
-   {CODA_VFS, vfs_stats, NULL, 0, 0644, NULL, do_reset_coda_vfs_stats},
-   {CODA_CACHE_INV, cache_inv_stats, NULL, 0, 0644, NULL, 
do_reset_coda_cache_inv_stats},
-   {CODA_FAKE_STATFS, fake_statfs, coda_fake_statfs, sizeof(int), 0600, 
NULL, proc_dointvec},
-   { 0 }
+   {
+   .ctl_name   = CTL_UNNUMBERED,
+   .procname   = timeout,
+   .data   = coda_timeout,
+   .maxlen = sizeof(int),
+   .mode   = 0644,
+   .proc_handler   = proc_dointvec
+   },
+   {
+   .ctl_name   = CTL_UNNUMBERED,
+   .procname   = hard,
+   .data   = coda_hard,
+   .maxlen = sizeof(int),
+   .mode   = 0644,
+   .proc_handler   = proc_dointvec
+   },
+   {
+   .ctl_name   = CTL_UNNUMBERED,
+   .procname   = vfs_stats,
+   .data   = NULL,
+   .maxlen = 0,
+   .mode   = 0644,
+   .proc_handler   = do_reset_coda_vfs_stats
+   },
+   {
+   .ctl_name   = CTL_UNNUMBERED,
+   .procname   = cache_inv_stats,
+   .data   = NULL,
+   .maxlen = 0,
+   .mode   = 0644,
+   .proc_handler   = do_reset_coda_cache_inv_stats
+   },
+   {
+   .ctl_name   = CTL_UNNUMBERED,
+   .procname   = fake_statfs,
+   .data   = coda_fake_statfs,
+   .maxlen = sizeof(int),
+   .mode   = 0600,
+   .proc_handler   = proc_dointvec
+   },
+   {}
 };
 
 static ctl_table fs_table[] = {
-   {FS_CODA, coda,NULL, 0, 0555, coda_table},
-   {0}
+   {
+   .ctl_name   = CTL_UNNUMBERED,
+   .procname   = coda,
+   .mode   = 0555,
+   .child  = coda_table
+   },
+   {}
 };
 
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: C99 convert ctl_tables in NTFS and remove sys_sysctl support

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4ed075e93bad97d0fdbb8a1be62f2449988496cb
Commit: 4ed075e93bad97d0fdbb8a1be62f2449988496cb
Parent: fd6065b4fdcb64c43e400278ebd0cb56989871c3
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:56 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:58 2007 -0800

[PATCH] sysctl: C99 convert ctl_tables in NTFS and remove sys_sysctl support

Putting ntfs-debug under FS_NRINODE was not a kosher thing to do so don't 
give
it any binary number.

[EMAIL PROTECTED]: build fix]
Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Cc: Anton Altaparmakov [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/ntfs/sysctl.c |   24 
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/fs/ntfs/sysctl.c b/fs/ntfs/sysctl.c
index 1c23138..4757f6b 100644
--- a/fs/ntfs/sysctl.c
+++ b/fs/ntfs/sysctl.c
@@ -33,20 +33,28 @@
 #include sysctl.h
 #include debug.h
 
-#define FS_NTFS1
-
 /* Definition of the ntfs sysctl. */
 static ctl_table ntfs_sysctls[] = {
-   { FS_NTFS, ntfs-debug,/* Binary and text IDs. */
- debug_msgs,sizeof(debug_msgs),   /* Data pointer and size. */
- 0644, NULL, proc_dointvec }, /* Mode, child, proc handler. */
-   { 0 }
+   {
+   .ctl_name   = CTL_UNNUMBERED,   /* Binary and text IDs. 
*/
+   .procname   = ntfs-debug,
+   .data   = debug_msgs,  /* Data pointer and 
size. */
+   .maxlen = sizeof(debug_msgs),
+   .mode   = 0644, /* Mode, proc handler. 
*/
+   .proc_handler   = proc_dointvec
+   },
+   {}
 };
 
 /* Define the parent directory /proc/sys/fs. */
 static ctl_table sysctls_root[] = {
-   { CTL_FS, fs, NULL, 0, 0555, ntfs_sysctls },
-   { 0 }
+   {
+   .ctl_name   = CTL_FS,
+   .procname   = fs,
+   .mode   = 0555,
+   .child  = ntfs_sysctls
+   },
+   {}
 };
 
 /* Storage for the sysctls header. */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: register the ocfs2 sysctl numbers

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0e03036c97b70b2602f7dedaa3a223ed7563c2c9
Commit: 0e03036c97b70b2602f7dedaa3a223ed7563c2c9
Parent: 4ed075e93bad97d0fdbb8a1be62f2449988496cb
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:57 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:58 2007 -0800

[PATCH] sysctl: register the ocfs2 sysctl numbers

ocfs2 was did not have the binary number it uses under CTL_FS registered in
sysctl.h.  Register it to avoid future conflicts, and change the name of the
definition to be in line with the rest of the sysctl numbers.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Acked-by: Mark Fasheh [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/ocfs2/cluster/nodemanager.c |4 ++--
 fs/ocfs2/cluster/nodemanager.h |3 +--
 include/linux/sysctl.h |1 +
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/ocfs2/cluster/nodemanager.c b/fs/ocfs2/cluster/nodemanager.c
index b17333a..df763c7 100644
--- a/fs/ocfs2/cluster/nodemanager.c
+++ b/fs/ocfs2/cluster/nodemanager.c
@@ -55,7 +55,7 @@ static ctl_table ocfs2_nm_table[] = {
 
 static ctl_table ocfs2_mod_table[] = {
{
-   .ctl_name   = KERN_OCFS2_NM,
+   .ctl_name   = FS_OCFS2_NM,
.procname   = nm,
.data   = NULL,
.maxlen = 0,
@@ -67,7 +67,7 @@ static ctl_table ocfs2_mod_table[] = {
 
 static ctl_table ocfs2_kern_table[] = {
{
-   .ctl_name   = KERN_OCFS2,
+   .ctl_name   = FS_OCFS2,
.procname   = ocfs2,
.data   = NULL,
.maxlen = 0,
diff --git a/fs/ocfs2/cluster/nodemanager.h b/fs/ocfs2/cluster/nodemanager.h
index 8fb23ca..0705221 100644
--- a/fs/ocfs2/cluster/nodemanager.h
+++ b/fs/ocfs2/cluster/nodemanager.h
@@ -33,8 +33,7 @@
 #include linux/configfs.h
 #include linux/rbtree.h
 
-#define KERN_OCFS2 988
-#define KERN_OCFS2_NM  1
+#define FS_OCFS2_NM1
 
 const char *o2nm_get_hb_ctl_path(void);
 
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 2eb3729..5b8af90 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -814,6 +814,7 @@ enum
FS_AIO_NR=18,   /* current system-wide number of aio requests */
FS_AIO_MAX_NR=19,   /* system-wide maximum number of aio requests */
FS_INOTIFY=20,  /* inotify submenu */
+   FS_OCFS2=988,   /* ocfs2 */
 };
 
 /* /proc/sys/fs/quota/ */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: move init_irq_proc into init/main where it belongs

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b04c3afb2b6e2f902b41bb62b73684d92d7e6c34
Commit: b04c3afb2b6e2f902b41bb62b73684d92d7e6c34
Parent: 0e03036c97b70b2602f7dedaa3a223ed7563c2c9
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:57 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:58 2007 -0800

[PATCH] sysctl: move init_irq_proc into init/main where it belongs

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 init/main.c |3 +++
 kernel/sysctl.c |3 ---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/init/main.c b/init/main.c
index 4e9e92b..a20a513 100644
--- a/init/main.c
+++ b/init/main.c
@@ -705,6 +705,9 @@ static void __init do_basic_setup(void)
 #ifdef CONFIG_SYSCTL
sysctl_init();
 #endif
+#ifdef CONFIG_PROC_FS
+   init_irq_proc();
+#endif
 
do_initcalls();
 }
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index e0ac6cd..7ba4b0c 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1177,8 +1177,6 @@ static ctl_table dev_table[] = {
{ .ctl_name = 0 }
 };
 
-extern void init_irq_proc (void);
-
 static DEFINE_SPINLOCK(sysctl_lock);
 
 /* called under sysctl_lock */
@@ -1224,7 +1222,6 @@ void __init sysctl_init(void)
 {
 #ifdef CONFIG_PROC_SYSCTL
register_proc_table(root_table, proc_sys_root, root_table_header);
-   init_irq_proc();
 #endif
 }
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: move utsname sysctls to their own file

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=39732acd968a007036ff3c504f1e6748024ef548
Commit: 39732acd968a007036ff3c504f1e6748024ef548
Parent: b04c3afb2b6e2f902b41bb62b73684d92d7e6c34
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:33:58 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:58 2007 -0800

[PATCH] sysctl: move utsname sysctls to their own file

This is just a simple cleanup to keep kernel/sysctl.c from getting to 
crowded
with special cases, and by keeping all of the utsname logic to together it
makes the code a little more readable.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Cc: Serge E. Hallyn [EMAIL PROTECTED]
Cc: Herbert Poetzl [EMAIL PROTECTED]
Cc: Kirill Korotaev [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 kernel/Makefile |1 +
 kernel/sysctl.c |  117 -
 kernel/utsname_sysctl.c |  146 +++
 3 files changed, 147 insertions(+), 117 deletions(-)

diff --git a/kernel/Makefile b/kernel/Makefile
index 14f4d45..ac6b27a 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -47,6 +47,7 @@ obj-$(CONFIG_GENERIC_HARDIRQS) += irq/
 obj-$(CONFIG_SECCOMP) += seccomp.o
 obj-$(CONFIG_RCU_TORTURE_TEST) += rcutorture.o
 obj-$(CONFIG_RELAY) += relay.o
+obj-$(CONFIG_SYSCTL) += utsname_sysctl.o
 obj-$(CONFIG_UTS_NS) += utsname.o
 obj-$(CONFIG_TASK_DELAY_ACCT) += delayacct.o
 obj-$(CONFIG_TASKSTATS) += taskstats.o tsacct.o
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 7ba4b0c..eff1d36 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -135,13 +135,6 @@ static int parse_table(int __user *, int, void __user *, 
size_t __user *,
void __user *, size_t, ctl_table *);
 #endif
 
-static int proc_do_uts_string(ctl_table *table, int write, struct file *filp,
- void __user *buffer, size_t *lenp, loff_t *ppos);
-
-static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen,
- void __user *oldval, size_t __user *oldlenp,
- void __user *newval, size_t newlen);
-
 #ifdef CONFIG_SYSVIPC
 static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen,
  void __user *oldval, size_t __user *oldlenp,
@@ -176,29 +169,6 @@ extern ctl_table inotify_table[];
 int sysctl_legacy_va_layout;
 #endif
 
-
-static void *get_uts(ctl_table *table, int write)
-{
-   char *which = table-data;
-#ifdef CONFIG_UTS_NS
-   struct uts_namespace *uts_ns = current-nsproxy-uts_ns;
-   which = (which - (char *)init_uts_ns) + (char *)uts_ns;
-#endif
-   if (!write)
-   down_read(uts_sem);
-   else
-   down_write(uts_sem);
-   return which;
-}
-
-static void put_uts(ctl_table *table, int write, void *which)
-{
-   if (!write)
-   up_read(uts_sem);
-   else
-   up_write(uts_sem);
-}
-
 #ifdef CONFIG_SYSVIPC
 static void *get_ipc(ctl_table *table, int write)
 {
@@ -278,51 +248,6 @@ static ctl_table root_table[] = {
 
 static ctl_table kern_table[] = {
{
-   .ctl_name   = KERN_OSTYPE,
-   .procname   = ostype,
-   .data   = init_uts_ns.name.sysname,
-   .maxlen = sizeof(init_uts_ns.name.sysname),
-   .mode   = 0444,
-   .proc_handler   = proc_do_uts_string,
-   .strategy   = sysctl_uts_string,
-   },
-   {
-   .ctl_name   = KERN_OSRELEASE,
-   .procname   = osrelease,
-   .data   = init_uts_ns.name.release,
-   .maxlen = sizeof(init_uts_ns.name.release),
-   .mode   = 0444,
-   .proc_handler   = proc_do_uts_string,
-   .strategy   = sysctl_uts_string,
-   },
-   {
-   .ctl_name   = KERN_VERSION,
-   .procname   = version,
-   .data   = init_uts_ns.name.version,
-   .maxlen = sizeof(init_uts_ns.name.version),
-   .mode   = 0444,
-   .proc_handler   = proc_do_uts_string,
-   .strategy   = sysctl_uts_string,
-   },
-   {
-   .ctl_name   = KERN_NODENAME,
-   .procname   = hostname,
-   .data   = init_uts_ns.name.nodename,
-   .maxlen = sizeof(init_uts_ns.name.nodename),
-   .mode   = 0644,
-   .proc_handler   = proc_do_uts_string,
-   .strategy   = sysctl_uts_string,
-   },
-   {
-   .ctl_name   = KERN_DOMAINNAME,
-   .procname   = domainname,
-   .data   = 

[PATCH] sysctl: move SYSV IPC sysctls to their own file

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a5494dcd8b92dce64317f2f7dd0d62747c54980b
Commit: a5494dcd8b92dce64317f2f7dd0d62747c54980b
Parent: 39732acd968a007036ff3c504f1e6748024ef548
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:34:06 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:59 2007 -0800

[PATCH] sysctl: move SYSV IPC sysctls to their own file

This is just a simple cleanup to keep kernel/sysctl.c from getting to 
crowded
with special cases, and by keeping all of the ipc logic to together it makes
the code a little more readable.

[EMAIL PROTECTED]: build fix]
Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Cc: Serge E. Hallyn [EMAIL PROTECTED]
Cc: Herbert Poetzl [EMAIL PROTECTED]
Cc: Kirill Korotaev [EMAIL PROTECTED]
Signed-off-by: Grant Coady [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 init/Kconfig |6 ++
 ipc/Makefile |1 +
 ipc/ipc_sysctl.c |  183 ++
 kernel/sysctl.c  |  176 ---
 4 files changed, 190 insertions(+), 176 deletions(-)

diff --git a/init/Kconfig b/init/Kconfig
index ad33c97..f977086 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -125,6 +125,12 @@ config IPC_NS
  environments, to use ipc namespaces to provide different ipc
  objects for different servers.  If unsure, say N.
 
+config SYSVIPC_SYSCTL
+   bool
+   depends on SYSVIPC
+   depends on SYSCTL
+   default y
+
 config POSIX_MQUEUE
bool POSIX Message Queues
depends on NET  EXPERIMENTAL
diff --git a/ipc/Makefile b/ipc/Makefile
index 0a6d626..b93bba6 100644
--- a/ipc/Makefile
+++ b/ipc/Makefile
@@ -4,6 +4,7 @@
 
 obj-$(CONFIG_SYSVIPC_COMPAT) += compat.o
 obj-$(CONFIG_SYSVIPC) += util.o msgutil.o msg.o sem.o shm.o
+obj-$(CONFIG_SYSVIPC_SYSCTL) += ipc_sysctl.o
 obj_mq-$(CONFIG_COMPAT) += compat_mq.o
 obj-$(CONFIG_POSIX_MQUEUE) += mqueue.o msgutil.o $(obj_mq-y)
 
diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c
new file mode 100644
index 000..2c17d83
--- /dev/null
+++ b/ipc/ipc_sysctl.c
@@ -0,0 +1,183 @@
+/*
+ *  Copyright (C) 2007
+ *
+ *  Author: Eric Biederman [EMAIL PROTECTED]
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License as
+ *  published by the Free Software Foundation, version 2 of the
+ *  License.
+ */
+
+#include linux/module.h
+#include linux/ipc.h
+#include linux/nsproxy.h
+#include linux/sysctl.h
+#include linux/uaccess.h
+
+#ifdef CONFIG_IPC_NS
+static void *get_ipc(ctl_table *table)
+{
+   char *which = table-data;
+   struct ipc_namespace *ipc_ns = current-nsproxy-ipc_ns;
+   which = (which - (char *)init_ipc_ns) + (char *)ipc_ns;
+   return which;
+}
+#else
+#define get_ipc(T) ((T)-data)
+#endif
+
+#ifdef CONFIG_PROC_FS
+static int proc_ipc_dointvec(ctl_table *table, int write, struct file *filp,
+   void __user *buffer, size_t *lenp, loff_t *ppos)
+{
+   struct ctl_table ipc_table;
+   memcpy(ipc_table, table, sizeof(ipc_table));
+   ipc_table.data = get_ipc(table);
+
+   return proc_dointvec(ipc_table, write, filp, buffer, lenp, ppos);
+}
+
+static int proc_ipc_doulongvec_minmax(ctl_table *table, int write,
+   struct file *filp, void __user *buffer, size_t *lenp, loff_t *ppos)
+{
+   struct ctl_table ipc_table;
+   memcpy(ipc_table, table, sizeof(ipc_table));
+   ipc_table.data = get_ipc(table);
+
+   return proc_doulongvec_minmax(ipc_table, write, filp, buffer,
+   lenp, ppos);
+}
+
+#else
+#define proc_ipc_doulongvec_minmax NULL
+#define proc_ipc_dointvec NULL
+#endif
+
+#ifdef CONFIG_SYSCTL_SYSCALL
+/* The generic sysctl ipc data routine. */
+static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen,
+   void __user *oldval, size_t __user *oldlenp,
+   void __user *newval, size_t newlen)
+{
+   size_t len;
+   void *data;
+
+   /* Get out of I don't have a variable */
+   if (!table-data || !table-maxlen)
+   return -ENOTDIR;
+
+   data = get_ipc(table);
+   if (!data)
+   return -ENOTDIR;
+
+   if (oldval  oldlenp) {
+   if (get_user(len, oldlenp))
+   return -EFAULT;
+   if (len) {
+   if (len  table-maxlen)
+   len = table-maxlen;
+   if (copy_to_user(oldval, data, len))
+   return -EFAULT;
+   if (put_user(len, oldlenp))
+   return -EFAULT;
+   }
+   }
+
+   if (newval  newlen) {
+   if (newlen  

[PATCH] sysctl: create sys/fs/binfmt_misc as an ordinary sysctl entry

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2abc26fc6b6f60fc70d6957b842ef4e5f805df7b
Commit: 2abc26fc6b6f60fc70d6957b842ef4e5f805df7b
Parent: a5494dcd8b92dce64317f2f7dd0d62747c54980b
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:34:07 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:59 2007 -0800

[PATCH] sysctl: create sys/fs/binfmt_misc as an ordinary sysctl entry

binfmt_misc has a mount point in the middle of the sysctl and that mount 
point
is created as a proc_generic directory.

Doing it that way gets in the way of cleaning up the sysctl proc support as 
it
continues the existence of a horrible hack.  So instead simply create the
directory as an ordinary sysctl directory.  At least that removes the magic
special case.

[EMAIL PROTECTED]: warning fix]
Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/proc/root.c  |4 
 kernel/sysctl.c |   14 ++
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/fs/proc/root.c b/fs/proc/root.c
index af15445..6ae222b 100644
--- a/fs/proc/root.c
+++ b/fs/proc/root.c
@@ -74,10 +74,6 @@ void __init proc_root_init(void)
 #ifdef CONFIG_SYSCTL
proc_sys_root = proc_mkdir(sys, NULL);
 #endif
-#if defined(CONFIG_BINFMT_MISC) || defined(CONFIG_BINFMT_MISC_MODULE)
-   proc_mkdir(sys/fs, NULL);
-   proc_mkdir(sys/fs/binfmt_misc, NULL);
-#endif
proc_root_fs = proc_mkdir(fs, NULL);
proc_root_driver = proc_mkdir(driver, NULL);
proc_mkdir(fs/nfsd, NULL); /* somewhere for the nfsd filesystem to be 
mounted */
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index ca376e7..fc2ce3d 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -881,6 +881,12 @@ static ctl_table vm_table[] = {
{ .ctl_name = 0 }
 };
 
+#if defined(CONFIG_BINFMT_MISC) || defined(CONFIG_BINFMT_MISC_MODULE)
+static ctl_table binfmt_misc_table[] = {
+   { .ctl_name = 0 }
+};
+#endif
+
 static ctl_table fs_table[] = {
{
.ctl_name   = FS_NRINODE,
@@ -1004,6 +1010,14 @@ static ctl_table fs_table[] = {
.mode   = 0644,
.proc_handler   = proc_dointvec,
},
+#if defined(CONFIG_BINFMT_MISC) || defined(CONFIG_BINFMT_MISC_MODULE)
+   {
+   .ctl_name   = CTL_UNNUMBERED,
+   .procname   = binfmt_misc,
+   .mode   = 0555,
+   .child  = binfmt_misc_table,
+   },
+#endif
{ .ctl_name = 0 }
 };
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: remove support for CTL_ANY

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6703ddfcce61ad66db606085a8d42dcab264f840
Commit: 6703ddfcce61ad66db606085a8d42dcab264f840
Parent: 2abc26fc6b6f60fc70d6957b842ef4e5f805df7b
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:34:07 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:59 2007 -0800

[PATCH] sysctl: remove support for CTL_ANY

There are currently no users in the kernel for CTL_ANY and it only has 
effect
on the binary interface which is practically unused.

So this complicates sysctl lookups for no good reason so just remove it.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/linux/sysctl.h |1 -
 kernel/sysctl.c|2 +-
 2 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 5b8af90..51acdec 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -53,7 +53,6 @@ struct __sysctl_args {
 
 /* For internal pattern-matching use only: */
 #ifdef __KERNEL__
-#define CTL_ANY-1  /* Matches any name */
 #define CTL_NONE   0
 #define CTL_UNNUMBERED CTL_NONE/* sysctl without a binary number */
 #endif
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index fc2ce3d..48708a7 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1170,7 +1170,7 @@ repeat:
for ( ; table-ctl_name || table-procname; table++) {
if (!table-ctl_name)
continue;
-   if (n == table-ctl_name || table-ctl_name == CTL_ANY) {
+   if (n == table-ctl_name) {
int error;
if (table-child) {
if (ctl_perm(table, 001))
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: remove support for directory strategy routines

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ae836810263509ff7a3c2c021754ce6f66b3fab6
Commit: ae836810263509ff7a3c2c021754ce6f66b3fab6
Parent: 6703ddfcce61ad66db606085a8d42dcab264f840
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:34:08 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:59 2007 -0800

[PATCH] sysctl: remove support for directory strategy routines

parse_table has support for calling a strategy routine when descending into 
a
directory.  To date no one has used this functionality and the /proc/sys
interface has no analog to it.

So no one is using this functionality kill it and make the binary sysctl 
code
easier to follow.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 kernel/sysctl.c |8 
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 48708a7..cb46d01 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1175,14 +1175,6 @@ repeat:
if (table-child) {
if (ctl_perm(table, 001))
return -EPERM;
-   if (table-strategy) {
-   error = table-strategy(
-   table, name, nlen,
-   oldval, oldlenp,
-   newval, newlen);
-   if (error)
-   return error;
-   }
name++;
nlen--;
table = table-child;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: remove insert_at_head from register_sysctl

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0b4d414714f0d2f922d39424b0c5c82ad900a381
Commit: 0b4d414714f0d2f922d39424b0c5c82ad900a381
Parent: ae836810263509ff7a3c2c021754ce6f66b3fab6
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:34:09 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:59 2007 -0800

[PATCH] sysctl: remove insert_at_head from register_sysctl

The semantic effect of insert_at_head is that it would allow new registered
sysctl entries to override existing sysctl entries of the same name.  Which 
is
pain for caching and the proc interface never implemented.

I have done an audit and discovered that none of the current users of
register_sysctl care as (excpet for directories) they do not register
duplicate sysctl entries.

So this patch simply removes the support for overriding existing entries in
the sys_sysctl interface since no one uses it or cares and it makes future
enhancments harder.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Acked-by: Ralf Baechle [EMAIL PROTECTED]
Acked-by: Martin Schwidefsky [EMAIL PROTECTED]
Cc: Russell King [EMAIL PROTECTED]
Cc: David Howells [EMAIL PROTECTED]
Cc: Luck, Tony [EMAIL PROTECTED]
Cc: Ralf Baechle [EMAIL PROTECTED]
Cc: Paul Mackerras [EMAIL PROTECTED]
Cc: Martin Schwidefsky [EMAIL PROTECTED]
Cc: Andi Kleen [EMAIL PROTECTED]
Cc: Jens Axboe [EMAIL PROTECTED]
Cc: Corey Minyard [EMAIL PROTECTED]
Cc: Neil Brown [EMAIL PROTECTED]
Cc: John W. Linville [EMAIL PROTECTED]
Cc: James Bottomley [EMAIL PROTECTED]
Cc: Jan Kara [EMAIL PROTECTED]
Cc: Trond Myklebust [EMAIL PROTECTED]
Cc: Mark Fasheh [EMAIL PROTECTED]
Cc: David Chinner [EMAIL PROTECTED]
Cc: David S. Miller [EMAIL PROTECTED]
Cc: Patrick McHardy [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/arm/kernel/isa.c|2 +-
 arch/frv/kernel/pm.c |2 +-
 arch/frv/kernel/sysctl.c |2 +-
 arch/ia64/kernel/crash.c |2 +-
 arch/ia64/kernel/perfmon.c   |2 +-
 arch/ia64/sn/kernel/xpc_main.c   |2 +-
 arch/mips/au1000/common/power.c  |2 +-
 arch/mips/lasat/sysctl.c |2 +-
 arch/powerpc/kernel/idle.c   |2 +-
 arch/ppc/kernel/ppc_htab.c   |2 +-
 arch/s390/appldata/appldata_base.c   |4 ++--
 arch/s390/kernel/debug.c |2 +-
 arch/s390/mm/cmm.c   |2 +-
 arch/sh64/kernel/traps.c |2 +-
 arch/x86_64/ia32/ia32_binfmt.c   |2 +-
 arch/x86_64/kernel/vsyscall.c|2 +-
 arch/x86_64/mm/init.c|2 +-
 drivers/cdrom/cdrom.c|2 +-
 drivers/char/hpet.c  |2 +-
 drivers/char/ipmi/ipmi_poweroff.c|2 +-
 drivers/char/rtc.c   |2 +-
 drivers/macintosh/mac_hid.c  |2 +-
 drivers/md/md.c  |2 +-
 drivers/net/wireless/arlan-proc.c|2 +-
 drivers/parport/procfs.c |6 +++---
 drivers/scsi/scsi_sysctl.c   |2 +-
 fs/coda/sysctl.c |2 +-
 fs/dquot.c   |2 +-
 fs/lockd/svc.c   |2 +-
 fs/nfs/sysctl.c  |2 +-
 fs/ntfs/sysctl.c |2 +-
 fs/ocfs2/cluster/nodemanager.c   |2 +-
 fs/xfs/linux-2.6/xfs_sysctl.c|2 +-
 include/linux/sysctl.h   |4 ++--
 ipc/ipc_sysctl.c |2 +-
 ipc/mqueue.c |2 +-
 kernel/sysctl.c  |9 ++---
 kernel/utsname_sysctl.c  |2 +-
 net/appletalk/sysctl_net_atalk.c |2 +-
 net/ax25/sysctl_net_ax25.c   |2 +-
 net/bridge/br_netfilter.c|2 +-
 net/core/neighbour.c |2 +-
 net/dccp/sysctl.c|2 +-
 net/decnet/dn_dev.c  |2 +-
 net/decnet/sysctl_net_decnet.c   |2 +-
 net/ipv4/devinet.c   |4 ++--
 net/ipv4/ipvs/ip_vs_ctl.c|2 +-
 net/ipv4/ipvs/ip_vs_lblc.c   |2 +-
 net/ipv4/ipvs/ip_vs_lblcr.c  |2 +-
 net/ipv4/netfilter/ip_conntrack_proto_sctp.c |2 +-
 net/ipv4/netfilter/ip_conntrack_standalone.c |2 +-
 net/ipv4/netfilter/ip_queue.c|2 +-
 

[PATCH] sysctl: factor out sysctl_head_next from do_sysctl

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=805b5d5e063e7fde5e2eb724e3f4cb18e47cab19
Commit: 805b5d5e063e7fde5e2eb724e3f4cb18e47cab19
Parent: 0b4d414714f0d2f922d39424b0c5c82ad900a381
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:34:11 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:59 2007 -0800

[PATCH] sysctl: factor out sysctl_head_next from do_sysctl

The current logic to walk through the list of sysctl table headers is 
slightly
painful and implement in a way it cannot be used by code outside sysctl.c

I am in the process of implementing a version of the sysctl proc support 
that
instead of using the proc generic non-caching monster, just uses the 
existing
sysctl data structure as backing store for building the dcache entries and 
for
doing directory reads.  To use the existing data structures however I need a
way to get at them.

[EMAIL PROTECTED]: warning fix]
Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/linux/sysctl.h |4 +++
 kernel/sysctl.c|   60 ++-
 2 files changed, 47 insertions(+), 17 deletions(-)

diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 396b8d9..72ba58b 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -924,6 +924,10 @@ enum
 #ifdef __KERNEL__
 #include linux/list.h
 
+/* For the /proc/sys support */
+extern struct ctl_table_header *sysctl_head_next(struct ctl_table_header 
*prev);
+extern void sysctl_head_finish(struct ctl_table_header *prev);
+
 extern void sysctl_init(void);
 
 typedef struct ctl_table ctl_table;
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 6ccb6cc..c3e2ac9 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1070,6 +1070,42 @@ static void start_unregistering(struct ctl_table_header 
*p)
list_del_init(p-ctl_entry);
 }
 
+void sysctl_head_finish(struct ctl_table_header *head)
+{
+   if (!head)
+   return;
+   spin_lock(sysctl_lock);
+   unuse_table(head);
+   spin_unlock(sysctl_lock);
+}
+
+struct ctl_table_header *sysctl_head_next(struct ctl_table_header *prev)
+{
+   struct ctl_table_header *head;
+   struct list_head *tmp;
+   spin_lock(sysctl_lock);
+   if (prev) {
+   tmp = prev-ctl_entry;
+   unuse_table(prev);
+   goto next;
+   }
+   tmp = root_table_header.ctl_entry;
+   for (;;) {
+   head = list_entry(tmp, struct ctl_table_header, ctl_entry);
+
+   if (!use_table(head))
+   goto next;
+   spin_unlock(sysctl_lock);
+   return head;
+   next:
+   tmp = tmp-next;
+   if (tmp == root_table_header.ctl_entry)
+   break;
+   }
+   spin_unlock(sysctl_lock);
+   return NULL;
+}
+
 void __init sysctl_init(void)
 {
 #ifdef CONFIG_PROC_SYSCTL
@@ -1081,7 +1117,7 @@ void __init sysctl_init(void)
 int do_sysctl(int __user *name, int nlen, void __user *oldval, size_t __user 
*oldlenp,
   void __user *newval, size_t newlen)
 {
-   struct list_head *tmp;
+   struct ctl_table_header *head;
int error = -ENOTDIR;
 
if (nlen = 0 || nlen = CTL_MAXNAME)
@@ -1091,26 +1127,16 @@ int do_sysctl(int __user *name, int nlen, void __user 
*oldval, size_t __user *ol
if (!oldlenp || get_user(old_len, oldlenp))
return -EFAULT;
}
-   spin_lock(sysctl_lock);
-   tmp = root_table_header.ctl_entry;
-   do {
-   struct ctl_table_header *head =
-   list_entry(tmp, struct ctl_table_header, ctl_entry);
-
-   if (!use_table(head))
-   continue;
-
-   spin_unlock(sysctl_lock);
 
+   for (head = sysctl_head_next(NULL); head;
+   head = sysctl_head_next(head)) {
error = parse_table(name, nlen, oldval, oldlenp, 
newval, newlen, head-ctl_table);
-
-   spin_lock(sysctl_lock);
-   unuse_table(head);
-   if (error != -ENOTDIR)
+   if (error != -ENOTDIR) {
+   sysctl_head_finish(head);
break;
-   } while ((tmp = tmp-next) != root_table_header.ctl_entry);
-   spin_unlock(sysctl_lock);
+   }
+   }
return error;
 }
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: allow sysctl_perm to be called from outside of sysctl.c

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1ff007eb8e8c7c44e9a384a67d0fdd0fd06ba811
Commit: 1ff007eb8e8c7c44e9a384a67d0fdd0fd06ba811
Parent: 805b5d5e063e7fde5e2eb724e3f4cb18e47cab19
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:34:11 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:09:59 2007 -0800

[PATCH] sysctl: allow sysctl_perm to be called from outside of sysctl.c

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/linux/sysctl.h |2 ++
 kernel/sysctl.c|   10 +-
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 72ba58b..9698ac3 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -925,8 +925,10 @@ enum
 #include linux/list.h
 
 /* For the /proc/sys support */
+struct ctl_table;
 extern struct ctl_table_header *sysctl_head_next(struct ctl_table_header 
*prev);
 extern void sysctl_head_finish(struct ctl_table_header *prev);
+extern int sysctl_perm(struct ctl_table *table, int op);
 
 extern void sysctl_init(void);
 
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index c3e2ac9..6bbac5c 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1157,7 +1157,7 @@ asmlinkage long sys_sysctl(struct __sysctl_args __user 
*args)
 #endif /* CONFIG_SYSCTL_SYSCALL */
 
 /*
- * ctl_perm does NOT grant the superuser all rights automatically, because
+ * sysctl_perm does NOT grant the superuser all rights automatically, because
  * some sysctl variables are readonly even to root.
  */
 
@@ -1172,7 +1172,7 @@ static int test_perm(int mode, int op)
return -EACCES;
 }
 
-static inline int ctl_perm(ctl_table *table, int op)
+int sysctl_perm(ctl_table *table, int op)
 {
int error;
error = security_sysctl(table, op);
@@ -1199,7 +1199,7 @@ repeat:
if (n == table-ctl_name) {
int error;
if (table-child) {
-   if (ctl_perm(table, 001))
+   if (sysctl_perm(table, 001))
return -EPERM;
name++;
nlen--;
@@ -1228,7 +1228,7 @@ int do_sysctl_strategy (ctl_table *table,
op |= 004;
if (newval) 
op |= 002;
-   if (ctl_perm(table, op))
+   if (sysctl_perm(table, op))
return -EPERM;
 
if (table-strategy) {
@@ -1498,7 +1498,7 @@ static ssize_t do_rw_proc(int write, struct file * file, 
char __user * buf,
goto out;
error = -EPERM;
op = (write ? 002 : 004);
-   if (ctl_perm(table, op))
+   if (sysctl_perm(table, op))
goto out;

/* careful: calling conventions are nasty here */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: reimplement the sysctl proc support

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=77b14db502cb85a031fe8fde6c85d52f3e0acb63
Commit: 77b14db502cb85a031fe8fde6c85d52f3e0acb63
Parent: 1ff007eb8e8c7c44e9a384a67d0fdd0fd06ba811
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:34:12 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:10:00 2007 -0800

[PATCH] sysctl: reimplement the sysctl proc support

With this change the sysctl inodes can be cached and nothing needs to be 
done
when removing a sysctl table.

For a cost of 2K code we will save about 4K of static tables (when we remove
de from ctl_table) and 70K in proc_dir_entries that we will not allocate, or
about half that on a 32bit arch.

The speed feels about the same, even though we can now cache the sysctl
dentries :(

We get the core advantage that we don't need to have a 1 to 1 mapping 
between
ctl table entries and proc files.  Making it possible to have /proc/sys vary
depending on the namespace you are in.  The currently merged namespaces 
don't
have an issue here but the network namespace under /proc/sys/net needs to 
have
different directories depending on which network adapters are visible.  By
simply being a cache different directories being visible depending on who 
you
are is trivial to implement.

[EMAIL PROTECTED]: fix uninitialised var]
[EMAIL PROTECTED]: fix ARM build]
[EMAIL PROTECTED]: make things static]
Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Cc: Russell King [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/proc/Makefile|2 +-
 fs/proc/generic.c   |2 +-
 fs/proc/inode.c |1 +
 fs/proc/internal.h  |2 +
 fs/proc/proc_sysctl.c   |  478 +++
 fs/proc/root.c  |   10 +-
 include/linux/proc_fs.h |2 -
 include/linux/sysctl.h  |2 -
 init/main.c |4 -
 kernel/sysctl.c |  182 --
 10 files changed, 486 insertions(+), 199 deletions(-)

diff --git a/fs/proc/Makefile b/fs/proc/Makefile
index f6c7762..a6b3a8f 100644
--- a/fs/proc/Makefile
+++ b/fs/proc/Makefile
@@ -8,7 +8,7 @@ proc-y  := nommu.o task_nommu.o
 proc-$(CONFIG_MMU) := mmu.o task_mmu.o
 
 proc-y   += inode.o root.o base.o generic.o array.o \
-   proc_tty.o proc_misc.o
+   proc_tty.o proc_misc.o proc_sysctl.o
 
 proc-$(CONFIG_PROC_KCORE)  += kcore.o
 proc-$(CONFIG_PROC_VMCORE) += vmcore.o
diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index 0cdc00d..775fb21 100644
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -32,7 +32,7 @@ static loff_t proc_file_lseek(struct file *, loff_t, int);
 
 DEFINE_SPINLOCK(proc_subdir_lock);
 
-int proc_match(int len, const char *name, struct proc_dir_entry *de)
+static int proc_match(int len, const char *name, struct proc_dir_entry *de)
 {
if (de-namelen != len)
return 0;
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index f6722be..c372eb1 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -161,6 +161,7 @@ struct inode *proc_get_inode(struct super_block *sb, 
unsigned int ino,
if (!inode)
goto out_ino;
 
+   PROC_I(inode)-fd = 0;
PROC_I(inode)-pde = de;
if (de) {
if (de-mode) {
diff --git a/fs/proc/internal.h b/fs/proc/internal.h
index 277dcd6..c932aa6 100644
--- a/fs/proc/internal.h
+++ b/fs/proc/internal.h
@@ -11,6 +11,8 @@
 
 #include linux/proc_fs.h
 
+extern int proc_sys_init(void);
+
 struct vmalloc_info {
unsigned long   used;
unsigned long   largest_chunk;
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
new file mode 100644
index 000..bb16a1e
--- /dev/null
+++ b/fs/proc/proc_sysctl.c
@@ -0,0 +1,478 @@
+/*
+ * /proc/sys support
+ */
+
+#include linux/sysctl.h
+#include linux/proc_fs.h
+#include linux/security.h
+#include internal.h
+
+static struct dentry_operations proc_sys_dentry_operations;
+static const struct file_operations proc_sys_file_operations;
+static struct inode_operations proc_sys_inode_operations;
+
+static void proc_sys_refresh_inode(struct inode *inode, struct ctl_table 
*table)
+{
+   /* Refresh the cached information bits in the inode */
+   if (table) {
+   inode-i_uid = 0;
+   inode-i_gid = 0;
+   inode-i_mode = table-mode;
+   if (table-proc_handler) {
+   inode-i_mode |= S_IFREG;
+   inode-i_nlink = 1;
+   } else {
+   inode-i_mode |= S_IFDIR;
+   inode-i_nlink = 0; /* It is too hard to figure out 
*/
+   }
+   }
+}
+
+static struct inode *proc_sys_make_inode(struct inode *dir, struct 

[PATCH] sysctl: add a parent entry to ctl_table and set the parent entry

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d912b0cc1a617d7c590d57b7ea971d50c7f02503
Commit: d912b0cc1a617d7c590d57b7ea971d50c7f02503
Parent: 77b14db502cb85a031fe8fde6c85d52f3e0acb63
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:34:13 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:10:00 2007 -0800

[PATCH] sysctl: add a parent entry to ctl_table and set the parent entry

Add a parent entry into the ctl_table so you can walk the list of parents 
and
find the entire path to a ctl_table entry.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Cc: Stephen Smalley [EMAIL PROTECTED]
Cc: James Morris [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/linux/sysctl.h |1 +
 kernel/sysctl.c|   18 ++
 2 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 8915049..1371d7b 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -1022,6 +1022,7 @@ struct ctl_table
int maxlen;
mode_t mode;
ctl_table *child;
+   ctl_table *parent;  /* Automatically set */
proc_handler *proc_handler; /* Callback for text formatting */
ctl_handler *strategy;  /* Callback function for all r/w */
struct proc_dir_entry *de;  /* /proc control block */
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index b3ee791..3ca1d5f 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1240,6 +1240,23 @@ int do_sysctl_strategy (ctl_table *table,
 }
 #endif /* CONFIG_SYSCTL_SYSCALL */
 
+static void sysctl_set_parent(struct ctl_table *parent, struct ctl_table 
*table)
+{
+   for (; table-ctl_name || table-procname; table++) {
+   table-parent = parent;
+   if (table-child)
+   sysctl_set_parent(table, table-child);
+   }
+}
+
+static __init int sysctl_init(void)
+{
+   sysctl_set_parent(NULL, root_table);
+   return 0;
+}
+
+core_initcall(sysctl_init);
+
 /**
  * register_sysctl_table - register a sysctl hierarchy
  * @table: the top-level table structure
@@ -1318,6 +1335,7 @@ struct ctl_table_header *register_sysctl_table(ctl_table 
* table)
INIT_LIST_HEAD(tmp-ctl_entry);
tmp-used = 0;
tmp-unregistering = NULL;
+   sysctl_set_parent(NULL, table);
spin_lock(sysctl_lock);
list_add_tail(tmp-ctl_entry, root_table_header.ctl_entry);
spin_unlock(sysctl_lock);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: remove the proc_dir_entry member for the sysctl tables

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3fbfa98112fc3962c416452a0baf2214381030e6
Commit: 3fbfa98112fc3962c416452a0baf2214381030e6
Parent: d912b0cc1a617d7c590d57b7ea971d50c7f02503
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:34:14 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:10:00 2007 -0800

[PATCH] sysctl: remove the proc_dir_entry member for the sysctl tables

It isn't needed anymore, all of the users are gone, and all of the ctl_table
initializers have been converted to use explicit names of the fields they 
are
initializing.

[EMAIL PROTECTED]: NTFS fix]
Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Acked-by: Stephen Smalley [EMAIL PROTECTED]
Cc: James Morris [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/ntfs/sysctl.c |8 
 include/linux/sysctl.h   |1 -
 net/decnet/dn_dev.c  |5 -
 net/ipv4/devinet.c   |5 -
 net/ipv6/addrconf.c  |5 -
 security/selinux/hooks.c |   39 +--
 6 files changed, 37 insertions(+), 26 deletions(-)

diff --git a/fs/ntfs/sysctl.c b/fs/ntfs/sysctl.c
index 1f1ee4c..4847fbf 100644
--- a/fs/ntfs/sysctl.c
+++ b/fs/ntfs/sysctl.c
@@ -73,14 +73,6 @@ int ntfs_sysctl(int add)
sysctls_root_table = register_sysctl_table(sysctls_root);
if (!sysctls_root_table)
return -ENOMEM;
-#ifdef CONFIG_PROC_FS
-   /*
-* If the proc filesystem is in use and we are a module, need
-* to set the owner of our proc entry to our module. In the
-* non-modular case, THIS_MODULE is NULL, so this is ok.
-*/
-   ntfs_sysctls[0].de-owner = THIS_MODULE;
-#endif
} else {
BUG_ON(!sysctls_root_table);
unregister_sysctl_table(sysctls_root_table);
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 1371d7b..2c5fb38 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -1025,7 +1025,6 @@ struct ctl_table
ctl_table *parent;  /* Automatically set */
proc_handler *proc_handler; /* Callback for text formatting */
ctl_handler *strategy;  /* Callback function for all r/w */
-   struct proc_dir_entry *de;  /* /proc control block */
void *extra1;
void *extra2;
 };
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c
index 0977df4..060d725 100644
--- a/net/decnet/dn_dev.c
+++ b/net/decnet/dn_dev.c
@@ -261,7 +261,6 @@ static void dn_dev_sysctl_register(struct net_device *dev, 
struct dn_dev_parms *
for(i = 0; i  ARRAY_SIZE(t-dn_dev_vars) - 1; i++) {
long offset = (long)t-dn_dev_vars[i].data;
t-dn_dev_vars[i].data = ((char *)parms) + offset;
-   t-dn_dev_vars[i].de = NULL;
}
 
if (dev) {
@@ -273,13 +272,9 @@ static void dn_dev_sysctl_register(struct net_device *dev, 
struct dn_dev_parms *
}
 
t-dn_dev_dev[0].child = t-dn_dev_vars;
-   t-dn_dev_dev[0].de = NULL;
t-dn_dev_conf_dir[0].child = t-dn_dev_dev;
-   t-dn_dev_conf_dir[0].de = NULL;
t-dn_dev_proto_dir[0].child = t-dn_dev_conf_dir;
-   t-dn_dev_proto_dir[0].de = NULL;
t-dn_dev_root_dir[0].child = t-dn_dev_proto_dir;
-   t-dn_dev_root_dir[0].de = NULL;
t-dn_dev_vars[0].extra1 = (void *)dev;
 
t-sysctl_header = register_sysctl_table(t-dn_dev_root_dir);
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index bf3eb2d..8a0ec10 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1576,7 +1576,6 @@ static void devinet_sysctl_register(struct in_device 
*in_dev,
return;
for (i = 0; i  ARRAY_SIZE(t-devinet_vars) - 1; i++) {
t-devinet_vars[i].data += (char *)p - (char *)ipv4_devconf;
-   t-devinet_vars[i].de = NULL;
}
 
if (dev) {
@@ -1598,13 +1597,9 @@ static void devinet_sysctl_register(struct in_device 
*in_dev,
 
t-devinet_dev[0].procname= dev_name;
t-devinet_dev[0].child   = t-devinet_vars;
-   t-devinet_dev[0].de  = NULL;
t-devinet_conf_dir[0].child  = t-devinet_dev;
-   t-devinet_conf_dir[0].de = NULL;
t-devinet_proto_dir[0].child = t-devinet_conf_dir;
-   t-devinet_proto_dir[0].de= NULL;
t-devinet_root_dir[0].child  = t-devinet_proto_dir;
-   t-devinet_root_dir[0].de = NULL;
 
t-sysctl_header = register_sysctl_table(t-devinet_root_dir);
if (!t-sysctl_header)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 34d80b4..569a37d 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -3998,7 +3998,6 @@ static void 

[PATCH] sysctl: fix the selinux_sysctl_get_sid

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b599fdfdb4bb4941e9076308efcf3bb89e577db5
Commit: b599fdfdb4bb4941e9076308efcf3bb89e577db5
Parent: 3fbfa98112fc3962c416452a0baf2214381030e6
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:34:15 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:10:00 2007 -0800

[PATCH] sysctl: fix the selinux_sysctl_get_sid

I goofed and when reenabling the fine grained selinux labels for
sysctls and forgot to add the /sys prefix before consulting
the policy database.  When computing the same path using
proc_dir_entries we got the /sys for free as it was part
of the tree, but it isn't true for clt_table trees.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Acked-by: Stephen Smalley [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 security/selinux/hooks.c |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 118ddfb..b8ede1c 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -1451,6 +1451,12 @@ static int selinux_sysctl_get_sid(ctl_table *table, u16 
tclass, u32 *sid)
path = end;
table = table-parent;
}
+   buflen -= 4;
+   if (buflen  0)
+   goto out_free;
+   end -= 4;
+   memcpy(end, /sys, 4);
+   path = end;
rc = security_genfs_sid(proc, path, tclass, sid);
 out_free:
free_page((unsigned long)buffer);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] selinux: enhance selinux to always ignore private inodes

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bbaca6c2e7ef0f663bc31be4dad7cf530f6c4962
Commit: bbaca6c2e7ef0f663bc31be4dad7cf530f6c4962
Parent: b599fdfdb4bb4941e9076308efcf3bb89e577db5
Author: Stephen Smalley [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:34:16 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:10:00 2007 -0800

[PATCH] selinux: enhance selinux to always ignore private inodes

Hmmm...turns out to not be quite enough, as the /proc/sys inodes aren't 
truly
private to the fs, so we can run into them in a variety of security hooks
beyond just the inode hooks, such as security_file_permission (when reading
and writing them via the vfs helpers), security_sb_mount (when mounting 
other
filesystems on directories in proc like binfmt_misc), and deeper within the
security module itself (as in flush_unauthorized_files upon inheritance 
across
execve).  So I think we have to add an IS_PRIVATE() guard within SELinux, as
below.  Note however that the use of the private flag here could be 
confusing,
as these inodes are _not_ private to the fs, are exposed to userspace, and
security modules must implement the sysctl hook to get any access control 
over
them.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Signed-off-by: Stephen Smalley [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 security/selinux/hooks.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index b8ede1c..b1ac22d 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -1077,6 +1077,9 @@ static int inode_has_perm(struct task_struct *tsk,
struct inode_security_struct *isec;
struct avc_audit_data ad;
 
+   if (unlikely (IS_PRIVATE (inode)))
+   return 0;
+
tsec = tsk-security;
isec = inode-i_security;
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: hide the sysctl proc inodes from selinux

2007-02-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=86a71dbd3e81e8870d0f0e56b87875f57e58222b
Commit: 86a71dbd3e81e8870d0f0e56b87875f57e58222b
Parent: bbaca6c2e7ef0f663bc31be4dad7cf530f6c4962
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:34:16 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 14 08:10:00 2007 -0800

[PATCH] sysctl: hide the sysctl proc inodes from selinux

Since the security checks are applied on each read and write of a sysctl 
file,
just like they are applied when calling sys_sysctl, they are redundant on 
the
standard VFS constructs.  Since it is difficult to compute the security 
labels
on the standard VFS constructs we just mark the sysctl inodes in proc 
private
so selinux won't even bother with them.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/proc/proc_sysctl.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index bb16a1e..20e8cbb 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -47,6 +47,7 @@ static struct inode *proc_sys_make_inode(struct inode *dir, 
struct ctl_table *ta
inode-i_mtime = inode-i_atime = inode-i_ctime = CURRENT_TIME;
inode-i_op = proc_sys_inode_operations;
inode-i_fop = proc_sys_file_operations;
+   inode-i_flags |= S_PRIVATE; /* tell selinux to ignore this inode */
proc_sys_refresh_inode(inode, table);
 out:
return inode;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html