2.6.22-rc6-mm1: Xen: WARNING: Absolute relocations present

Previous thread: [PATCH] PXA27x UDC driver. by Rodolfo Giometti on Thursday, June 28, 2007 - 3:36 am. (22 messages)

Next thread: Some NCQ numbers... by Michael Tokarev on Thursday, June 28, 2007 - 3:51 am. (17 messages)
From: Andrew Morton
Date: Thursday, June 28, 2007 - 3:43 am

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.22-rc6/2.6.22-rc6-mm1/

- NOTE (an uppercase one, indeed): there are a lot of menuconfig changes in
  here which break `make oldconfig' badly.  If you grab an old .config and run
  `make oldconfig', your kernel probably won't work.  I lost useful things
  like CONFIG_BLK_DEV and the whole SCSI system, because they were added after
  I generated my .config.

  So save yourself some hassle and check your .config carefully before
  building this kernel.  Make sure that everything you need is still enabled.

  I found that manually adding "CONFIG_BLK_DEV=y" to the .config before
  running oldconfig saved a large number of config items from getting lost.

  Those menuconfig changes have been a huge pain.

- Added the kgdb tree, as git-kgdb.patch (Jason Wessel
  <jason.wessel@windriver.com>)

  This is a large patch which unifies all the various kgdb stubs lying
  around various architectures and extends kgdb support to other
  architectures.  Supported architectures are at present arm, i386, ia64,
  mips, ppc32, ppc64, sh, and x86_64.

  Subject to review, we're aiming this at 2.6.24.

- Jean's hwmon git tree was dropped and was replaced by the new
  git-hwmon.patch (Mark M.  Hoffman <mhoffman@lightlink.com>)

- Added new git-ixgbe.patch: "10GbE driver for Intel 82598 based PCI Express
  adapters" (Ayyappan Veeraiyan <ayyappan.veeraiyan@intel.com>)

- I cannot persuade git to generate a sane diff out of git-wireless, so it
  is dropped.  Which is bad, because it contains a tremendous amount of stuff.

- Added x86_64 dynticks support

- Merged the dynamic commandline length patches - these remove Linux's
  hard-coded limit.



Boilerplate:

- See the `hot-fixes' directory for any important updates to this patchset.

- To fetch an -mm tree using git, use (for example)

  git-fetch git://git.kernel.org/pub/scm/linux/kernel/git/smurf/linux-trees.git tag v2.6.16-rc2-mm1
  git-checkout -b ...
From: Gabriel C
Date: Thursday, June 28, 2007 - 5:08 am

Compile error here.

...

Kernel: arch/i386/boot/bzImage is ready (#1)
ERROR: "check_signature" [drivers/input/misc/wistron_btns.ko] undefined!
ERROR: "check_signature" [drivers/block/xd.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2


...

http://frugalware.org/~crazy/other/kernel/config


Regards,

Gabriel C

-

From: Andrew Morton
Date: Thursday, June 28, 2007 - 10:54 am

grrr.

--- a/lib/Makefile~uninline-check_signature-fix
+++ a/lib/Makefile
@@ -5,8 +5,7 @@
 lib-y := ctype.o string.o vsprintf.o cmdline.o \
 	 rbtree.o radix-tree.o dump_stack.o \
 	 idr.o int_sqrt.o bitmap.o extable.o prio_tree.o \
-	 sha1.o irq_regs.o reciprocal_div.o argv_split.o \
-	 check_signature.o
+	 sha1.o irq_regs.o reciprocal_div.o argv_split.o
 
 lib-$(CONFIG_MMU) += ioremap.o pagewalk.o
 lib-$(CONFIG_SMP) += cpumask.o
@@ -14,7 +13,7 @@ lib-$(CONFIG_SMP) += cpumask.o
 lib-y	+= kobject.o kref.o kobject_uevent.o klist.o
 
 obj-y += div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \
-	 bust_spinlocks.o hexdump.o
+	 bust_spinlocks.o hexdump.o check_signature.o
 
 ifeq ($(CONFIG_DEBUG_KOBJECT),y)
 CFLAGS_kobject.o += -DDEBUG
_

-

From: Heiko Carstens
Date: Thursday, June 28, 2007 - 6:39 am

From: Heiko Carstens <heiko.carstens@de.ibm.com>

sched-cfs-v2.6.22-git-v18.patch introduces CPU_IDLE in sched.h.
This conflict with the already existing define in
include/asm-s390/processor.h
Just rename the s390 defines, since they will go away as soon as
we support CONFIG_NO_HZ instead of our own CONFIG_NO_IDLE_HZ.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 arch/s390/kernel/process.c   |    6 +++---
 arch/s390/kernel/time.c      |    4 ++--
 arch/s390/kernel/vtime.c     |    4 ++--
 include/asm-s390/processor.h |    4 ++--
 4 files changed, 9 insertions(+), 9 deletions(-)

Index: linux-2.6.22-rc6-mm1/arch/s390/kernel/process.c
===================================================================
--- linux-2.6.22-rc6-mm1.orig/arch/s390/kernel/process.c
+++ linux-2.6.22-rc6-mm1/arch/s390/kernel/process.c
@@ -93,8 +93,8 @@ void do_monitor_call(struct pt_regs *reg
 	/* disable monitor call class 0 */
 	__ctl_clear_bit(8, 15);
 
-	atomic_notifier_call_chain(&idle_chain, CPU_NOT_IDLE,
-			    (void *)(long) smp_processor_id());
+	atomic_notifier_call_chain(&idle_chain, S390_CPU_NOT_IDLE,
+				   (void *)(long) smp_processor_id());
 }
 
 extern void s390_handle_mcck(void);
@@ -115,7 +115,7 @@ static void default_idle(void)
 	}
 
 	rc = atomic_notifier_call_chain(&idle_chain,
-			CPU_IDLE, (void *)(long) cpu);
+					S390_CPU_IDLE, (void *)(long) cpu);
 	if (rc != NOTIFY_OK && rc != NOTIFY_DONE)
 		BUG();
 	if (rc != NOTIFY_OK) {
Index: linux-2.6.22-rc6-mm1/arch/s390/kernel/time.c
===================================================================
--- linux-2.6.22-rc6-mm1.orig/arch/s390/kernel/time.c
+++ linux-2.6.22-rc6-mm1/arch/s390/kernel/time.c
@@ -226,10 +226,10 @@ static int nohz_idle_notify(struct notif
 			    unsigned long action, void *hcpu)
 {
 	switch (action) {
-	case CPU_IDLE:
+	case S390_CPU_IDLE:
 		stop_hz_timer();
 		break;
-	case ...
From: Ingo Molnar
Date: Thursday, June 28, 2007 - 8:03 am

thanks for the fix. I _swear_ i did a grep for this new name when i 

	Ingo
-

From: Heiko Carstens
Date: Thursday, June 28, 2007 - 6:37 am

From: Heiko Carstens <heiko.carstens@de.ibm.com>

check_signature() uses readb() and therefore should only be build on
CONFIG_HAS_IOMEM.

Otherwise breaks s390:
lib/check_signature.c: In function `check_signature':
lib/check_signature.c:19: error: implicit declaration of function `readb'

Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 lib/Makefile |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

Index: linux-2.6.22-rc6-mm1/lib/Makefile
===================================================================
--- linux-2.6.22-rc6-mm1.orig/lib/Makefile
+++ linux-2.6.22-rc6-mm1/lib/Makefile
@@ -5,8 +5,7 @@
 lib-y := ctype.o string.o vsprintf.o cmdline.o \
 	 rbtree.o radix-tree.o dump_stack.o \
 	 idr.o int_sqrt.o bitmap.o extable.o prio_tree.o \
-	 sha1.o irq_regs.o reciprocal_div.o argv_split.o \
-	 check_signature.o
+	 sha1.o irq_regs.o reciprocal_div.o argv_split.o
 
 lib-$(CONFIG_MMU) += ioremap.o pagewalk.o
 lib-$(CONFIG_SMP) += cpumask.o
@@ -22,7 +21,7 @@ CFLAGS_kobject_uevent.o += -DDEBUG
 endif
 
 obj-$(CONFIG_GENERIC_IOMAP) += iomap.o
-obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o devres.o
+obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o devres.o check_signature.o
 obj-$(CONFIG_DEBUG_LOCKING_API_SELFTESTS) += locking-selftest.o
 obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock_debug.o
 lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o
-

From: Andrew Morton
Date: Thursday, June 28, 2007 - 11:06 am

We didn't think of that.

Alas, m68k `make allmodconfig' creates CONFIG_ISA=n, CONFIG_PCI=n,
CONFIG_HAS_IOMEM=y, so it will still be busted.

But this seems to be the correct fix.  Perhaps m68k config needs
attention?
-

From: Geert Uytterhoeven
Date: Thursday, June 28, 2007 - 11:27 am

Euh, I don't think this is the correct fix.

CONFIG_HAS_IOMEM is apparently used in two meanings:
  1. The architecture has support for memory mapped I/O (s390 obviously
     hasn't)
  2. The architecture has ISA/PCI-style memory mapped I/O (readb() and
     friends)

check_signature() falls under the second category.

Setting NO_IOMEM on m68k will make us loose some drivers (e.g.
drivers/video/Kconfig depends on HAS_IOMEM).
 
Apart from many Kconfig dependencies on HAS_IOMEM, CONFIG_HAS_IOMEM is
further only used to control the build of lib/iomap_copy.c, which
doesn't use readb() and friends, but the __raw*() operations.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds
-

From: Andrew Morton
Date: Thursday, June 28, 2007 - 11:38 am

Well this is fun.

How to fix? Should we add a new CONFIG_HAS_IO?  (IOPORTS?)
-

From: Geert Uytterhoeven
Date: Thursday, June 28, 2007 - 11:47 am

There already exists a CONFIG_HAS_IOPORT :-) (for ISA/PCI-style I/O port
access).

Just make check_signature() depend on ISA || PCI (and maybe || X86_32).
According to its comment, it's used to `find BIOS signatures', which is
a legacy PC thing. Please don't pollute non-legacy architectures with it ;-)

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds
-

From: Andrew Morton
Date: Thursday, June 28, 2007 - 1:29 pm

On Thu, 28 Jun 2007 20:47:33 +0200 (CEST)

I merged the below and will await the next explosion.


From: Andrew Morton <akpm@linux-foundation.org>

check_signature() needs readb() but with some setups (s390, m68k allmodconfig)
there is no implementation of readb.  This causes build errors with
-Werror-implicit-function-declaration.

So make check_signature.o dependent upon ISA||PCI.

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 lib/Kconfig  |    5 ++++-
 lib/Makefile |    3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff -puN lib/Kconfig~check_signature-needs-readb lib/Kconfig
--- a/lib/Kconfig~check_signature-needs-readb
+++ a/lib/Kconfig
@@ -110,11 +110,14 @@ config TEXTSEARCH_FSM
 	tristate
 
 #
-# plist support is select#ed if needed
+# plist support is selected if needed
 #
 config PLIST
 	boolean
 
+config CHECK_SIGNATURE
+	def_bool ISA || PCI
+
 config HAS_IOMEM
 	boolean
 	depends on !NO_IOMEM
diff -puN lib/Makefile~check_signature-needs-readb lib/Makefile
--- a/lib/Makefile~check_signature-needs-readb
+++ a/lib/Makefile
@@ -13,7 +13,7 @@ lib-$(CONFIG_SMP) += cpumask.o
 lib-y	+= kobject.o kref.o kobject_uevent.o klist.o
 
 obj-y += div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \
-	 bust_spinlocks.o hexdump.o check_signature.o
+	 bust_spinlocks.o hexdump.o
 
 ifeq ($(CONFIG_DEBUG_KOBJECT),y)
 CFLAGS_kobject.o += -DDEBUG
@@ -33,6 +33,7 @@ obj-$(CONFIG_LOCK_KERNEL) += kernel_lock
 obj-$(CONFIG_PLIST) += plist.o
 obj-$(CONFIG_DEBUG_PREEMPT) += smp_processor_id.o
 obj-$(CONFIG_DEBUG_LIST) += list_debug.o
+obj-$(CONFIG_CHECK_SIGNATURE) += check_signature.o
 
 ifneq ($(CONFIG_HAVE_DEC_LOCK),y)
   lib-y += dec_and_lock.o
_

-

From: Alan Cox
Date: Thursday, June 28, 2007 - 3:25 pm

This completely bogus. readb() should be present on M68K, fix the
platform to implement readb() for MMIO, even if your MMIO readb is a
moveb instruction.

check_signature is relevant for anything with MMIO space (for example you
can legitimately want to check_signature a MAC68K Nubus ROM).

S/390 is a bit of a special case as no S/390 usage of check_signature
appears sane but equally it isn't used so you can stub it out.

Alan
-

From: Jeff Dike
Date: Thursday, June 28, 2007 - 3:45 pm

This is a problem for UML too.

I have a patch in my tree, which basically stubs readb, waiting to see
how this is fixed for the other arches.

				Jeff

-- 
Work email - jdike at linux dot intel dot com
-

From: Andrew Morton
Date: Thursday, June 28, 2007 - 4:01 pm

On Thu, 28 Jun 2007 18:45:11 -0400

What a mess.

I guess we could add an empty readb() implementation to lib/lib.a so the
arch will pick that up if all else fails.  But it's pretty stinky.  And
it won't work either because we don't know at compile-time to declare
the prototype for that thing appropriately.

So... what's the proper fix here?  "The arch must implement readb"?  That's
bad: if the arch really cannot implement readb(), we want builds to fail
if someone tries to use it.

I think I'll go shopping instead.
-

From: Roman Zippel
Date: Thursday, June 28, 2007 - 3:51 pm

Hi,


A generic check_signature() is a little difficult if we have separate io 
functions for every bus.

bye, Roman
-

From: Alan Cox
Date: Thursday, June 28, 2007 - 4:12 pm

Does M68K implement iomap() and pci_iomap and friends yet ?
check_signature has fairly few users so moving to be iomap based wouldn't
be hard if that was a problem. The other option would seem to be
bus->check_signature() ?

Alan
-

From: Roman Zippel
Date: Thursday, June 28, 2007 - 5:06 pm

Hi,



IMO the first question would be whether that function is really this 
important. We can also just leave it as a PCI/ISA template and other bus 
specific header can implement when necessary.

bye, Roman
-

From: Geert Uytterhoeven
Date: Friday, June 29, 2007 - 6:08 am

To make it more generic, it should probably use the raw*() version, and
the caller should handle bus address conversion. But even that
isn't possible, as there's no guarantee readb(x+1) == raw_readb(x+1).

Anyway, here's a list of its users, as I responded to Andrew in a private
mail before this thread was started:

| drivers/block/xd.c: config BLK_DEV_XD depends on ISA && ISA_DMA_API
| drivers/input/misc/wistron_btns.c: config INPUT_WISTRON_BTNS depends on X86 && !X86_64

That should be X86_32 these days?

| drivers/scsi/aha152x.c: config SCSI_AHA152X depends on ISA && SCSI && !64BIT
| drivers/scsi/dtc.c: config SCSI_DTC3280 depends on ISA && SCSI
| drivers/scsi/fdomain.c: config SCSI_FUTURE_DOMAIN depends on (ISA || PCI) && SCSI
| drivers/scsi/seagate.c: config SCSI_SEAGATE depends on X86 && ISA && SCSI
| drivers/scsi/t128.c: config SCSI_T128 depends on ISA && SCSI
| drivers/scsi/wd7000.c: config SCSI_7000FASST depends on ISA && SCSI && ISA_DMA_API

BTW, include/asm-arm/io.h looks interesting:

| #elif !defined(readb)
| 
| #define readb(c)                        (__readwrite_bug("readb"),0)
| #define readw(c)                        (__readwrite_bug("readw"),0)
| #define readl(c)                        (__readwrite_bug("readl"),0)
| #define writeb(v,c)                     __readwrite_bug("writeb")
| #define writew(v,c)                     __readwrite_bug("writew")
| #define writel(v,c)                     __readwrite_bug("writel")
| 
| #define check_signature(io,sig,len)     (0)
| 
| #endif  /* __mem_pci */

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds
-

From: Heiko Carstens
Date: Thursday, June 28, 2007 - 6:39 am

From: Heiko Carstens <heiko.carstens@de.ibm.com>

git-acpi contains a patch that adds 'struct bin_attribute *' to
the read method of struct bin_attribute. This breaks s390:

  CC      arch/s390/kernel/ipl.o
arch/s390/kernel/ipl.c:317:
 warning: initialization from incompatible pointer type
arch/s390/kernel/ipl.c:340:
  warning: initialization from incompatible pointer type

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Greg KH <greg@kroah.com>
Cc: Len Brown <len.brown@intel.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 arch/s390/kernel/ipl.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

Index: linux-2.6.22-rc6-mm1/arch/s390/kernel/ipl.c
===================================================================
--- linux-2.6.22-rc6-mm1.orig/arch/s390/kernel/ipl.c
+++ linux-2.6.22-rc6-mm1/arch/s390/kernel/ipl.c
@@ -295,8 +295,9 @@ static ssize_t sys_ipl_device_show(struc
 static struct subsys_attribute sys_ipl_device_attr =
 	__ATTR(device, S_IRUGO, sys_ipl_device_show, NULL);
 
-static ssize_t ipl_parameter_read(struct kobject *kobj, char *buf, loff_t off,
-				  size_t count)
+static ssize_t ipl_parameter_read(struct kobject *kobj,
+				  struct bin_attribute *attr,
+				  char *buf, loff_t off, size_t count)
 {
 	unsigned int size = IPL_PARMBLOCK_SIZE;
 
@@ -317,8 +318,9 @@ static struct bin_attribute ipl_paramete
 	.read = &ipl_parameter_read,
 };
 
-static ssize_t ipl_scp_data_read(struct kobject *kobj, char *buf, loff_t off,
-	size_t count)
+static ssize_t ipl_scp_data_read(struct kobject *kobj,
+				 struct bin_attribute *attr,
+				 char *buf, loff_t off, size_t count)
 {
 	unsigned int size = IPL_PARMBLOCK_START->ipl_info.fcp.scp_data_len;
 	void *scp_data = &IPL_PARMBLOCK_START->ipl_info.fcp.scp_data;
-

From: Zhang, Rui
Date: Thursday, June 28, 2007 - 9:04 am

Oops. Sorry.
Thanks for fixing it.

Best regards,
Rui

-----Original Message-----
From: Heiko Carstens [mailto:heiko.carstens@de.ibm.com] 
Sent: 2007年6月28日 21:39
To: Andrew Morton
Cc: linux-kernel@vger.kernel.org; Martin Schwidefsky; Zhang, Rui; Greg KH; Brown, Len
Subject: [patch -mm] s390: struct bin_attribute changes

From: Heiko Carstens <heiko.carstens@de.ibm.com>

git-acpi contains a patch that adds 'struct bin_attribute *' to
the read method of struct bin_attribute. This breaks s390:

  CC      arch/s390/kernel/ipl.o
arch/s390/kernel/ipl.c:317:
 warning: initialization from incompatible pointer type
arch/s390/kernel/ipl.c:340:
  warning: initialization from incompatible pointer type

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Greg KH <greg@kroah.com>
Cc: Len Brown <len.brown@intel.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 arch/s390/kernel/ipl.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

Index: linux-2.6.22-rc6-mm1/arch/s390/kernel/ipl.c
===================================================================
--- linux-2.6.22-rc6-mm1.orig/arch/s390/kernel/ipl.c
+++ linux-2.6.22-rc6-mm1/arch/s390/kernel/ipl.c
@@ -295,8 +295,9 @@ static ssize_t sys_ipl_device_show(struc
 static struct subsys_attribute sys_ipl_device_attr =
 	__ATTR(device, S_IRUGO, sys_ipl_device_show, NULL);
 
-static ssize_t ipl_parameter_read(struct kobject *kobj, char *buf, loff_t off,
-				  size_t count)
+static ssize_t ipl_parameter_read(struct kobject *kobj,
+				  struct bin_attribute *attr,
+				  char *buf, loff_t off, size_t count)
 {
 	unsigned int size = IPL_PARMBLOCK_SIZE;
 
@@ -317,8 +318,9 @@ static struct bin_attribute ipl_paramete
 	.read = &ipl_parameter_read,
 };
 
-static ssize_t ipl_scp_data_read(struct kobject *kobj, char *buf, loff_t off,
-	size_t count)
+static ssize_t ipl_scp_data_read(struct kobject *kobj,
+				 struct bin_attribute *attr,
+				 char *buf, loff_t ...
From: Greg KH
Date: Thursday, June 28, 2007 - 2:08 pm

Thanks, I've merged this with the original patch so that nothing breaks
when applied to Linus's tree.

greg k-h
-

From: Dave Kleikamp
Date: Thursday, June 28, 2007 - 7:49 am

I got this compile error:

  LD      drivers/md/built-in.o
drivers/md/dm-multipath.o: In function `dm_path_event':
drivers/md/dm-netlink.h:56: multiple definition of `dm_path_event'
drivers/md/dm-mod.o:drivers/md/dm-netlink.h:56: first defined here
drivers/md/dm-multipath.o: In function `dm_netlink_send_events':
drivers/md/dm-netlink.h:51: multiple definition of `dm_netlink_send_events'
drivers/md/dm-mod.o:drivers/md/dm-netlink.h:51: first defined here
make[2]: *** [drivers/md/built-in.o] Error 1

I was able to fix it by making the dummy inline functions static.

Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>

diff -Nurp linux-2.6.22-rc6-mm1/drivers/md/dm-netlink.h linux/drivers/md/dm-netlink.h
--- linux-2.6.22-rc6-mm1/drivers/md/dm-netlink.h	2007-06-28 05:50:38.000000000 -0500
+++ linux/drivers/md/dm-netlink.h	2007-06-28 09:10:15.000000000 -0500
@@ -47,10 +47,10 @@ static inline int __init dm_netlink_init
 static inline void dm_netlink_exit(void)
 {
 }
-void inline dm_netlink_send_events(struct list_head *events)
+static void inline dm_netlink_send_events(struct list_head *events)
 {
 }
-void inline dm_path_event(enum dm_netlink_event_type evt_type,
+static void inline dm_path_event(enum dm_netlink_event_type evt_type,
 			  struct dm_table *t, const char *path,
 			  int nr_valid_paths)
 {

-- 
David Kleikamp
IBM Linux Technology Center

-

From: Alasdair G Kergon
Date: Thursday, June 28, 2007 - 8:34 am

Sorry for that - I've added your fix to dm-netlink-add-to-core.patch.
Of course I forgot to test with the new option disabled:-(

Alasdair
-- 
agk@redhat.com
-

From: Adrian Bunk
Date: Thursday, June 28, 2007 - 12:29 pm

<--  snip  -->

...
  LD      drivers/built-in.o
drivers/isdn/built-in.o: In function `check_reset': (.text+0xab974):
multiple definition of `check_reset'
drivers/scsi/built-in.o:(.data+0xdba8): first defined here
ld: Warning: size of symbol `check_reset' changed from 4 in drivers/scsi/built-in.o to 214 in drivers/isdn/built-in.o
ld: Warning: type of symbol `check_reset' changed from 1 to 2 in drivers/isdn/built-in.o
make[2]: *** [drivers/built-in.o] Error 1

<--  snip  -->


cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


-

From: Andrew Morton
Date: Thursday, June 28, 2007 - 1:01 pm

On Thu, 28 Jun 2007 21:29:50 +0200

check_reset wasn't a great choice of identifier...


diff -puN drivers/scsi/aacraid/aachba.c~aacraid-rename-check_reset drivers/scsi/aacraid/aachba.c
--- a/drivers/scsi/aacraid/aachba.c~aacraid-rename-check_reset
+++ a/drivers/scsi/aacraid/aachba.c
@@ -177,9 +177,9 @@ int check_interval = 24 * 60 * 60;
 module_param(check_interval, int, S_IRUGO|S_IWUSR);
 MODULE_PARM_DESC(check_interval, "Interval in seconds between adapter health checks.");
 
-int check_reset = 1;
-module_param(check_reset, int, S_IRUGO|S_IWUSR);
-MODULE_PARM_DESC(check_reset, "If adapter fails health check, reset the adapter.");
+int aacraid_check_reset = 1;
+module_param_named(check_reset, aacraid_check_reset, int, S_IRUGO|S_IWUSR);
+MODULE_PARM_DESC(aacraid_check_reset, "If adapter fails health check, reset the adapter.");
 
 int expose_physicals = -1;
 module_param(expose_physicals, int, S_IRUGO|S_IWUSR);
@@ -1211,7 +1211,7 @@ int aac_get_adapter_info(struct aac_dev*
 			  (int)sizeof(dev->supplement_adapter_info.VpdInfo.Tsid),
 			  dev->supplement_adapter_info.VpdInfo.Tsid);
 		}
-		if (!check_reset ||
+		if (!aacraid_check_reset ||
 		  (dev->supplement_adapter_info.SupportedOptions2 &
 		  le32_to_cpu(AAC_OPTION_IGNORE_RESET))) {
 			printk(KERN_INFO "%s%d: Reset Adapter Ignored\n",
diff -puN drivers/scsi/aacraid/aacraid.h~aacraid-rename-check_reset drivers/scsi/aacraid/aacraid.h
--- a/drivers/scsi/aacraid/aacraid.h~aacraid-rename-check_reset
+++ a/drivers/scsi/aacraid/aacraid.h
@@ -1857,4 +1857,4 @@ extern int aac_reset_devices;
 extern int aac_commit;
 extern int update_interval;
 extern int check_interval;
-extern int check_reset;
+extern int aacraid_check_reset;
diff -puN drivers/scsi/aacraid/commsup.c~aacraid-rename-check_reset drivers/scsi/aacraid/commsup.c
--- a/drivers/scsi/aacraid/commsup.c~aacraid-rename-check_reset
+++ a/drivers/scsi/aacraid/commsup.c
@@ -1370,8 +1370,9 @@ int aac_check_health(struct aac_dev * aa
 
 	printk(KERN_ERR "%s: Host ...
From: Randy Dunlap
Date: Thursday, June 28, 2007 - 1:09 pm

on x86_64, with CONFIG_PCI disabled, CONFIG_PM disabled,
hence CONFIG_ACPI disabled:


arch/x86_64/kernel/built-in.o: In function `setup_IO_APIC':
(.init.text+0x4ef7): undefined reference to `mp_apic_pin_to_gsi'
make: *** [.tmp_vmlinux1] Error 1

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
From: Andrew Morton
Date: Thursday, June 28, 2007 - 1:23 pm

On Thu, 28 Jun 2007 13:09:21 -0700

hm, it's not immediately obvious how to fix that so I'll ask John to do
repairs, please. 
-

From: John Keller
Date: Thursday, June 28, 2007 - 2:47 pm

OK, I'll take a look.

John
-

From: Zan Lynx
Date: Thursday, June 28, 2007 - 1:40 pm

I believe the above patch set is causing the problem.  On my first try
with rc6-mm1 I said Yes to the CONFIG_DMAR options. (I'm nearly as good
as random option selection :-)

The system panicked during boot, I believe it was trying to detect an
Intel IOMMU.  Later when I have a camera, I will try to post a
screenshot of the backtrace. (I can't seem to get netconsole to work on
boot, only in a module).

When I recompiled without DMAR set, things seem to be working great.  I
seem to be getting better disk read throughput than rc3-mm1, by the way.

This laptop is an AMD Athlon64 on a NForce3 running a 64-bit Gentoo
build.

I'll provide more details on request, and when I get the chance.  This
is a heads-up on the BUG in case someone has an "ah ha!" moment.
--=20
Zan Lynx <zlynx@acm.org>
From: Zach Carter
Date: Thursday, June 28, 2007 - 4:50 pm

I believe I have also reproduced this bug.   I have an ABIT K9 Ultra 
motherboard with NFORCE hardware.   My serial console cannot 
seem to capture it, but removing the DMAR options definately takes 
away the problem and allows me to boot.

If anyone would like me to gather other info or test out patches, 
please let me know.  

Linux hoth 2.6.22-rc6-mm1 #8 SMP Thu Jun 28 16:18:17 PDT 2007 x86_64 x86_64 x86_64 GNU/Linux
 
Gnu C                  4.1.2
Gnu make               3.81
binutils               2.17.50.0.12-4
util-linux             2.13-pre7
mount                  2.13-pre7
module-init-tools      3.3-pre11
e2fsprogs              1.39
pcmciautils            014
quota-tools            3.14.
PPP                    2.4.4
isdn4k-utils           3.9
Linux C Library        > libc.2.6
Dynamic linker (ldd)   2.6
Procps                 3.2.7
Net-tools              1.60
Kbd                    1.12
oprofile               0.9.2
Sh-utils               6.9
udev                   106
wireless-tools         28
Modules Loaded         tun ppdev ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 xt_state nf_conntrack nfnetlink ipt_REJECT xt_tcpudp iptable_filter ip_tables x_tables bridge llc hidp l2cap bluetooth ipv6 dm_mirror dm_multipath dm_mod raid10 raid0 video output sbs button dock battery ac lp loop kvm_amd kvm parport_serial snd_hda_intel snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd parport_pc parport soundcore snd_page_alloc usblp k8temp serio_raw hwmon forcedeth shpchp i2c_nforce2 i2c_core sr_mod cdrom floppy sg pata_amd sata_nv libata sd_mod scsi_mod raid456 async_xor async_memcpy async_tx xor raid1 ext3 jbd mbcache ehci_hcd ohci_hcd uhci_hcd

[root@hoth ~]# cat /proc/cpuinfo
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 15
model           : 75
model name      : AMD Athlon(tm) 64 X2 Dual Core Processor 3800+
stepping        : 2
cpu MHz         : 1000.000
cache size      : 512 ...
From: Adrian Bunk
Date: Thursday, June 28, 2007 - 1:40 pm

<--  snip  -->

...
  RELOCS  arch/i386/boot/compressed/vmlinux.relocs
WARNING: Absolute relocations present
Offset     Info     Type     Sym.Value Sym.Name
c0101f80 020c6501   R_386_32 00000000  xen_irq_disable_direct_reloc
c0101f9a 0221ea01   R_386_32 00000000  xen_save_fl_direct_reloc
...

<--  snip  -->

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

-

From: Jeremy Fitzhardinge
Date: Thursday, June 28, 2007 - 1:49 pm

Hm.  Those are false alarms.  I guess I could do something to hide them, 
but there's nothing inherently wrong with correctly used abs symbols.  
Is there someway to whitelist them?

    J

-

From: Eric W. Biederman
Date: Sunday, July 1, 2007 - 8:37 am

Yes.  Just add them to arch/i386/boot/compressed/relocs.c safe_abs_syms.

Eric
-

From: Jeremy Fitzhardinge
Date: Sunday, July 1, 2007 - 9:33 am

OK, how's this?

Subject: xen: suppress abs symbol warnings for unused reloc pointers

The Xen code generates some abs symbols which are OK from a relocation
perspective.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Adrian Bunk <bunk@stusta.de>

---
 arch/i386/boot/compressed/relocs.c |    2 ++
 1 file changed, 2 insertions(+)

===================================================================
--- a/arch/i386/boot/compressed/relocs.c
+++ b/arch/i386/boot/compressed/relocs.c
@@ -31,6 +31,8 @@ static const char* safe_abs_relocs[] = {
 		"__kernel_rt_sigreturn",
 		"__kernel_sigreturn",
 		"SYSENTER_RETURN",
+		"xen_irq_disable_direct_reloc",
+		"xen_save_fl_direct_reloc",
 };
 
 static int is_safe_abs_reloc(const char* sym_name)


-

From: Adrian Bunk
Date: Sunday, July 1, 2007 - 1:23 pm

Thanks, works for me.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

-

From: Eric W. Biederman
Date: Sunday, July 1, 2007 - 1:31 pm

Actually I have to ask.  How in the world are these absolute symbols
ok from a relocation perspective.

If the kernel is not running at 0xc0100000 the offset value looks like
it will be completely bogus.

Maybe those are ok, but if you could please explain why those are
false positives I would appreciate it. (Especially in your patch
description).

If these are indeed false positives the patch looks ok.

Eric
-

From: Jeremy Fitzhardinge
Date: Sunday, July 1, 2007 - 3:13 pm

Subject: xen: suppress abs symbol warnings for unused reloc pointers

arch/i386/xen/xen-asm.S defines some small pieces of code which are
used to implement a few paravirt_ops.  They're designed so they can be
used either in-place, or be inline patched into their callsites if
there's enough space.

Some of those operations need to make calls out (specifically, if you
re-enable events [interrupts], and there's a pending event at that
time).  These calls need the call instruction to be relocated if the
code is patched inline.  In this case xen_foo_reloc is a section-relative
symbol which points to xen_foo's required relocation.

Other operations have no need of a relocation, and so their
corresponding xen_bar_reloc is absolute 0.  These are the cases which
are triggering the warning.

This patch adds those symbols to the list of safe abs symbols.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Adrian Bunk <bunk@stusta.de>

---
 arch/i386/boot/compressed/relocs.c |    2 ++
 1 file changed, 2 insertions(+)

===================================================================
--- a/arch/i386/boot/compressed/relocs.c
+++ b/arch/i386/boot/compressed/relocs.c
@@ -31,6 +31,8 @@ static const char* safe_abs_relocs[] = {
 		"__kernel_rt_sigreturn",
 		"__kernel_sigreturn",
 		"SYSENTER_RETURN",
+		"xen_irq_disable_direct_reloc",
+		"xen_save_fl_direct_reloc",
 };
 
 static int is_safe_abs_reloc(const char* sym_name)


-

From: Mariusz Kozlowski
Date: Friday, June 29, 2007 - 5:32 am

Hello,

	allmodconfig on powerpc (iMac g3) fails due to
git-kgdb.patch. allmodconfig defaults should be changed?

  CC      arch/powerpc/kernel/kgdb.o
arch/powerpc/kernel/kgdb.c:485:2: error: #error Both XMON and KGDB selected 
in .config. Unselect one of them.
make[1]: *** [arch/powerpc/kernel/kgdb.o] Blad 1
make: *** [arch/powerpc/kernel] Blad 2

anyway after unselecting XMON we can see:

  CC [M]  fs/xfs/linux-2.6/xfs_ioctl32.o
fs/xfs/linux-2.6/xfs_ioctl32.c: In function 'xfs_ioc_bulkstat_compat':
fs/xfs/linux-2.6/xfs_ioctl32.c:334: error: 'xfs_inumbers_fmt_compat' 
undeclared (first use in this function)
fs/xfs/linux-2.6/xfs_ioctl32.c:334: error: (Each undeclared identifier is 
reported only once
fs/xfs/linux-2.6/xfs_ioctl32.c:334: error: for each function it appears in.)
make[2]: *** [fs/xfs/linux-2.6/xfs_ioctl32.o] Blad 1
make[1]: *** [fs/xfs] Blad 2

This is just allmodconfig - not a .config that's used daily by users but I'm 
used to compiling the kernel using it anyway 8)

Regards,

	Mariusz
-

From: Sergei Shtylyov
Date: Friday, June 29, 2007 - 5:54 am

Hello.


    I'm not sure if this will work out but maybe it's worth to disable XMON if 
KGDB is selected, like this?

config XMON
	bool "Include xmon kernel debugger"

WBR, Sergei
-

From: Jason Wessel
Date: Monday, July 2, 2007 - 6:49 am

It did not seem that you can make a radio button / multi-select kernel 
config option unless the options are in the same Kconfig file.  Given 
that xmon and kgdb are mutually exclusive at the moment.

What Sergei mentioned is the fix that needs to be used for the time being. 

Attached is the patch I put in the for_mm branch in the linux-2.6-kgdb 
git tree.

Jason.


From: Sergei Shtylyov
Date: Monday, July 2, 2007 - 7:23 am

Hello.


    This patch does not seem complete as the #error that was tiggering has not 
been deleleted from arch/powerpc/kernel/kgdb.c (and not it's useless)

WBR, Sergei
-

From: Jason Wessel
Date: Monday, July 2, 2007 - 7:45 am

I suppose the argument could be made to remove the check in the compiled 
file, but it does serve as a way to protect kgdb for now if someone 
tries to hard compile in xmon and kgdb.  Completely unpredictable 
results will occur with the debugger unless some pieces are fixed.  I 
would rather make sure until that happens there is no way head down the 
rat hole.

That issue aside would it be useful to have xmon+kgdb?  After having 
looked at the hook points for xmon, if a command was added to xmon to 
provide an "detach" it would be easy enough to have kgdb and xmon in the 
same kernel.  Obviously only one or the other can be used at any given time.

Jason.
-

From: Paul Mackerras
Date: Monday, July 2, 2007 - 4:21 pm

It should all work provided kgdb plays nicely.  We used to be able to
compile in both xmon and kdb and select at runtime which one gets

Well, xmon_init(0) will do a detach.  However, I don't see that it is
needed; there is plenty of flexibility to choose to have xmon or not
using the CONFIG_XMON_DEFAULT config option and the xmon= boot command
line option.

Paul.
-

From: Andrew Morton
Date: Friday, June 29, 2007 - 1:47 pm

On Fri, 29 Jun 2007 14:32:09 +0200


Michal cc'ed.  I think this is the one which was already reported but
I haven't seen a fix yet?
-

From: Michal Marek
Date: Saturday, June 30, 2007 - 1:40 am

Hi, I sent you an updated patch yesterday (should I've changed the
subject / started a new thread? This was my first patch so bear with
me... :)). Anyway, the mail with the fix is here:
http://lkml.org/lkml/2007/6/29/87

Michal
-

From: Roman Zippel
Date: Friday, June 29, 2007 - 7:17 am

Hi,


This patch should help for this, so that this isn't done when Kconfig or 
.config has been changed and they are not in sync.

bye, Roman


Reset generates values only if Kconfig and .config agree.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>

---
 scripts/kconfig/confdata.c |   37 ++++++++++++++++++++++++++-----------
 1 file changed, 26 insertions(+), 11 deletions(-)

Index: linux-2.6/scripts/kconfig/confdata.c
===================================================================
--- linux-2.6.orig/scripts/kconfig/confdata.c
+++ linux-2.6/scripts/kconfig/confdata.c
@@ -341,27 +341,42 @@ int conf_read(const char *name)
 		conf_unsaved++;
 		/* maybe print value in verbose mode... */
 	sym_ok:
+		if (!sym_is_choice(sym))
+			continue;
+		/* The choice symbol only has a set value (and thus is not new)
+		 * if all its visible childs have values.
+		 */
+		prop = sym_get_choice_prop(sym);
+		flags = sym->flags;
+		for (e = prop->expr; e; e = e->left.expr)
+			if (e->right.sym->visible != no)
+				flags &= e->right.sym->flags;
+		sym->flags &= flags | ~SYMBOL_DEF_USER;
+	}
+
+	for_all_symbols(i, sym) {
 		if (sym_has_value(sym) && !sym_is_choice_value(sym)) {
-			if (sym->visible == no)
+			/* Reset values of generates values, so they'll appear
+			 * as new, if they should become visible, but that
+			 * doesn't quite work if the Kconfig and the saved
+			 * configuration disagree.
+			 */
+			if (sym->visible == no && !conf_unsaved)
 				sym->flags &= ~SYMBOL_DEF_USER;
 			switch (sym->type) {
 			case S_STRING:
 			case S_INT:
 			case S_HEX:
-				if (!sym_string_within_range(sym, sym->def[S_DEF_USER].val))
-					sym->flags &= ~(SYMBOL_VALID|SYMBOL_DEF_USER);
+				/* Reset a string value if it's out of range */
+				if (sym_string_within_range(sym, sym->def[S_DEF_USER].val))
+					break;
+				sym->flags &= ~(SYMBOL_VALID|SYMBOL_DEF_USER);
+				conf_unsaved++;
+				break;
 			default:
 				break;
 			}
 		}
-		if ...
From: Andrew Morton
Date: Friday, June 29, 2007 - 1:58 pm

On Fri, 29 Jun 2007 16:17:38 +0200 (CEST)

unclear.  Could you please explain further what this change does?

Thanks.
-

From: Roman Zippel
Date: Saturday, June 30, 2007 - 6:48 pm

Hi,


Normally generated values (Kconfig entries without a prompt) are cleared 
as they are regenerated anyway and so they appear as new should they 
become visible and defaults work as expected (once a value is set defaults 
aren't used anymore).
The detection whether a value is generated or not is only based on its 
visibility status, which can quickly change for a lot of symbols by just 
removing a single line from .config or adding a dependency to Kconfig as 
you noticed.
The patch now suppresses this logic when .config and Kconfig aren't in 
sync and .config needs to be updated, so that you can remove now a random 
value from .config and oldconfig won't reask for many other values.

bye, Roman
-

From: Valdis.Kletnieks
Date: Friday, June 29, 2007 - 7:50 am

Configures, builds, boots on first try.  Dell Latitude D820 laptop, T7200 CPU,

Odd - just for grins, I checked what 'make oldconfig' did when handed a .config
from 22-rc4-mm2, and it behaved just fine, much to my surprise.

I can't comment on the DMAR issues, my .config didn't include PCI_MSI so I never
got asked about that one by oldconfig.  Maybe if I get brave this afternoon. :)
From: Andrew Morton
Date: Friday, June 29, 2007 - 2:01 pm

On Fri, 29 Jun 2007 10:50:30 -0400

That's probably because your old config file was relatively recent, and
had things like CONFIG_BLK_DEV=y in it.

But those people who are still dragging around old config files which
predate the introduction of CONFIG_BLK_DEV will find that 2.6.22-rc6-mm1
oldconfig will give them CONFIG_BLK_DEV=n instead of current mainline's
deafult of CONFIG_BLK_DEV=y.

I think making BLK_DEV deafult to n was a bit dumb, so I dropped the
offending patches.

-

From: Valdis.Kletnieks
Date: Friday, June 29, 2007 - 9:17 pm

Ahh... <light bulb goes on> Yeah, it gets a 'make oldconfig' for pretty
much every single -mm, I suck at any regression testing other than "since
the last -mm".
From: Andrew Morton
Date: Friday, June 29, 2007 - 10:15 pm

All my .configs have mouldered since I lost the ability to have .config be
a symlink to a revision-controlled file (used to carry a custom patch for
this, but it died).

I continue to believe that kbuild's lets-trash-your-symlink behaviour is
obnoxious, but I was unable to persuade anyone else of this.

-

From: Jeremy Fitzhardinge
Date: Saturday, June 30, 2007 - 9:22 am

That's pretty awful, but it hasn't really affected me much since I 
started using separate object directories for pretty much everything.

    J
-

From: Sam Ravnborg
Date: Saturday, June 30, 2007 - 2:10 pm

I thought we fixed that long time ago?!?!
I am heading for vacation for 20 days without Internet (real vacation :-))
and have properly forget most about Linux and everything about this
issue when I return.
In the unlikely event that I recall it I will take a look when I'm back.

By the way - kbuild.git is lacking behind on patches.
I have several queded from other peopel and have more in the works myself.
This will not be looked into until I'm back.

	Sam
-

From: Andrew Morton
Date: Saturday, June 30, 2007 - 2:39 pm

No probs - it's been like that for all time.
-

From: Roman Zippel
Date: Saturday, June 30, 2007 - 6:53 pm

Hi,


KCONFIG_OVERWRITECONFIG was added especially for you. :-)

bye, Roman
-

From: Andrew Morton
Date: Tuesday, July 3, 2007 - 1:36 pm

On Sun, 1 Jul 2007 03:53:08 +0200 (CEST)

But nobody told me!

It works, thanks ;)
-

From: Satyam Sharma
Date: Saturday, June 30, 2007 - 10:31 pm

... is http://lkml.org/lkml/2007/6/23/116/ one of those queued up too?

Note that that patch is also:
Tested-by: Adrian McMenamin <adrian@newgolddream.dyndns.info>

As you can see from:
http://readlist.com/lists/vger.kernel.org/linux-kernel/72/361641.html

[ I think I'll utilize the next few days going through my patches-to-do
list and resurrecting old patches-that-fell-into-lkml-blackhole ... ]

Satyam
-

From: Sam Ravnborg
Date: Saturday, June 30, 2007 - 11:52 pm

Nope. I usually does not include section mismatch fixes in the kbuild.git
tree but leave that to the maintainers in the particular areas.

This patch should go in via SH maintainer since this is sh specific
driver(s).

	Sam
-

From: Adrian Bunk
Date: Sunday, July 1, 2007 - 1:22 pm

Contrary to popular belief, two identical Makefile lines don't bring any 
advantages.   ;-)

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---
--- linux-2.6.22-rc6-mm1/drivers/pci/Makefile.old	2007-06-30 03:33:54.000000000 +0200
+++ linux-2.6.22-rc6-mm1/drivers/pci/Makefile	2007-06-30 03:34:04.000000000 +0200
@@ -23,9 +23,6 @@
 # Build Intel IOMMU support
 obj-$(CONFIG_DMAR) += dmar.o iova.o intel-iommu.o
 
-#Build Intel-IOMMU support
-obj-$(CONFIG_DMAR) += iova.o dmar.o intel-iommu.o
-
 #
 # Some architectures use the generic PCI setup functions
 #

-

From: Keshavamurthy, Anil S
Date: Monday, July 2, 2007 - 5:30 pm

From: Adrian Bunk
Date: Sunday, July 1, 2007 - 1:22 pm

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---
--- linux-2.6.22-rc6-mm1/include/asm-m68k/fb.h.old	2007-06-30 02:40:16.000000000 +0200
+++ linux-2.6.22-rc6-mm1/include/asm-m68k/fb.h	2007-06-30 02:40:25.000000000 +0200
@@ -15,6 +15,7 @@
 #else
 static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
 				unsigned long off)
+{
 	if (CPU_IS_020_OR_030)
 		pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE030;
 	if (CPU_IS_040_OR_060) {

-

From: Adrian Bunk
Date: Sunday, July 1, 2007 - 1:23 pm

bprm_mm_init doesn't have any modular users.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---
--- linux-2.6.22-rc6-mm1/fs/exec.c.old	2007-06-30 04:18:22.000000000 +0200
+++ linux-2.6.22-rc6-mm1/fs/exec.c	2007-06-30 04:18:36.000000000 +0200
@@ -379,7 +379,6 @@
 
 	return err;
 }
-EXPORT_SYMBOL(bprm_mm_init);
 
 /*
  * count() counts the number of strings in array ARGV.

-

From: Adrian Bunk
Date: Sunday, July 1, 2007 - 1:23 pm

The following doesn't make much sense:

drivers/media/video/Kconfig:
...
config TUNER_TEA5761
        tristate "TEA 5761 radio tuner (EXPERIMENTAL)"
...

drivers/media/video/Makefile:
...
ifneq ($(CONFIG_TUNER_TEA5761),)
  tuner-objs += tea5761.o
endif
...

With this setup, TUNER_TEA5761=m is equivalent to TUNER_TEA5761=y.

This patch therefore changes TUNER_TEA5761 to a bool.

The missing dependency on EXPERIMENTAL the prompt text indicates also 
gets added by this patch.

Additionally, the Makefile entry can now be written in a more compact way.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

BTW: tea5761.c is currently completely unused.

 drivers/media/video/Kconfig  |    3 ++-
 drivers/media/video/Makefile |    4 +---
 2 files changed, 3 insertions(+), 4 deletions(-)

--- linux-2.6.22-rc6-mm1/drivers/media/video/Kconfig.old	2007-06-30 03:51:13.000000000 +0200
+++ linux-2.6.22-rc6-mm1/drivers/media/video/Kconfig	2007-06-30 03:51:40.000000000 +0200
@@ -490,7 +490,8 @@
 	  If in doubt, say N.
 
 config TUNER_TEA5761
-	tristate "TEA 5761 radio tuner (EXPERIMENTAL)"
+	bool "TEA 5761 radio tuner (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
 	depends on I2C
 	select VIDEO_TUNER
 	help
--- linux-2.6.22-rc6-mm1/drivers/media/video/Makefile.old	2007-06-30 03:52:00.000000000 +0200
+++ linux-2.6.22-rc6-mm1/drivers/media/video/Makefile	2007-06-30 03:53:25.000000000 +0200
@@ -7,9 +7,7 @@
 tuner-objs	:=	tuner-core.o tuner-types.o tuner-simple.o \
 			mt20xx.o tda8290.o tea5767.o tda9887.o
 
-ifneq ($(CONFIG_TUNER_TEA5761),)
-  tuner-objs += tea5761.o
-endif
+tuner-$(CONFIG_TUNER_TEA5761)	+= tea5761.o
 
 msp3400-objs	:=	msp3400-driver.o msp3400-kthreads.o
 
-

From: Michael Krufky
Date: Sunday, July 1, 2007 - 2:29 pm

Acked-by: Michael Krufky <mkrufky@linuxtv.org>

Thanks, Adrian


-

From: Adrian Bunk
Date: Sunday, July 1, 2007 - 1:23 pm

Struct dccp_li_cachep can become static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---
--- linux-2.6.22-rc6-mm1/net/dccp/ccids/lib/loss_interval.c.old	2007-07-01 00:38:12.000000000 +0200
+++ linux-2.6.22-rc6-mm1/net/dccp/ccids/lib/loss_interval.c	2007-07-01 00:38:21.000000000 +0200
@@ -27,7 +27,7 @@
 	u32		 dccplih_interval;
 };
 
-struct kmem_cache *dccp_li_cachep __read_mostly;
+static struct kmem_cache *dccp_li_cachep __read_mostly;
 
 static inline struct dccp_li_hist_entry *dccp_li_hist_entry_new(const gfp_t prio)
 {

-

From: Adrian Bunk
Date: Sunday, July 1, 2007 - 1:23 pm

This patch makes the needlessly global cpuidle_replace_governor() static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---
--- linux-2.6.22-rc6-mm1/drivers/cpuidle/governor.c.old	2007-06-30 03:37:06.000000000 +0200
+++ linux-2.6.22-rc6-mm1/drivers/cpuidle/governor.c	2007-06-30 03:37:14.000000000 +0200
@@ -147,7 +147,7 @@
  * @exclude_rating: the rating that will be skipped while looking for
  * new governor.
  */
-struct cpuidle_governor *cpuidle_replace_governor(int exclude_rating)
+static struct cpuidle_governor *cpuidle_replace_governor(int exclude_rating)
 {
 	struct cpuidle_governor *gov;
 	struct cpuidle_governor *ret_gov = NULL;

-

From: Adrian Bunk
Date: Sunday, July 1, 2007 - 1:23 pm

Unneeded export.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---
--- linux-2.6.22-rc6-mm1/security/security.c.old	2007-07-01 21:28:34.000000000 +0200
+++ linux-2.6.22-rc6-mm1/security/security.c	2007-07-01 21:28:41.000000000 +0200
@@ -177,5 +177,4 @@
 EXPORT_SYMBOL_GPL(unregister_security);
 EXPORT_SYMBOL_GPL(mod_reg_security);
 EXPORT_SYMBOL_GPL(mod_unreg_security);
-EXPORT_SYMBOL_GPL(mmap_min_addr);
 EXPORT_SYMBOL(security_ops);

-

From: James Morris
Date: Sunday, July 1, 2007 - 3:38 pm

Thanks, applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6.git#for-akpm


-- 
James Morris
<jmorris@namei.org>
-

From: Adrian Bunk
Date: Sunday, July 1, 2007 - 1:23 pm

Some code can now become static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 include/linux/pm.h   |    1 -
 kernel/power/main.c  |    4 ++--
 kernel/power/power.h |    1 -
 3 files changed, 2 insertions(+), 4 deletions(-)

--- linux-2.6.22-rc6-mm1/kernel/power/power.h.old	2007-07-01 00:21:34.000000000 +0200
+++ linux-2.6.22-rc6-mm1/kernel/power/power.h	2007-07-01 00:21:41.000000000 +0200
@@ -177,7 +177,6 @@
 				unsigned int, char *);
 
 /* kernel/power/main.c */
-extern int suspend_enter(suspend_state_t state);
 extern int suspend_devices_and_enter(suspend_state_t state);
 extern struct blocking_notifier_head pm_chain_head;
 
--- linux-2.6.22-rc6-mm1/include/linux/pm.h.old	2007-07-01 00:22:53.000000000 +0200
+++ linux-2.6.22-rc6-mm1/include/linux/pm.h	2007-07-01 00:23:04.000000000 +0200
@@ -138,7 +138,6 @@
  * @pm_ops: The new power management operations to set.
  */
 extern void pm_set_ops(struct pm_ops *pm_ops);
-extern struct pm_ops *pm_ops;
 extern int pm_suspend(suspend_state_t state);
 
 extern int pm_valid_only_mem(suspend_state_t state);
--- linux-2.6.22-rc6-mm1/kernel/power/main.c.old	2007-07-01 00:21:49.000000000 +0200
+++ linux-2.6.22-rc6-mm1/kernel/power/main.c	2007-07-01 00:23:11.000000000 +0200
@@ -31,7 +31,7 @@
 
 DEFINE_MUTEX(pm_mutex);
 
-struct pm_ops *pm_ops;
+static struct pm_ops *pm_ops;
 
 /**
  *	pm_set_ops - Set the global power method table. 
@@ -127,7 +127,7 @@
  *
  *	This function should be called after devices have been suspended.
  */
-int suspend_enter(suspend_state_t state)
+static int suspend_enter(suspend_state_t state)
 {
 	int error = 0;
 

-

From: Rafael J. Wysocki
Date: Sunday, July 1, 2007 - 4:12 pm

This clashes and partially overlaps with some patches that I have in the works.

Greetings,
Rafael


-- 
"Premature optimization is the root of all evil." - Donald Knuth
-

From: Adrian Bunk
Date: Sunday, July 1, 2007 - 1:23 pm

This became dead code.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 security/selinux/hooks.c |    7 -------
 1 file changed, 7 deletions(-)

--- linux-2.6.22-rc6-mm1/security/selinux/hooks.c.old	2007-07-01 21:35:36.000000000 +0200
+++ linux-2.6.22-rc6-mm1/security/selinux/hooks.c	2007-07-01 21:35:48.000000000 +0200
@@ -112,9 +112,6 @@
 /* Original (dummy) security module. */
 static struct security_operations *original_ops = NULL;
 
-/* Did we enable minimum mmap address checking? */
-static int enabled_mmap_min_addr;
-
 /* Minimal support for a secondary security module,
    just to allow the use of the dummy or capability modules.
    The owlsm module can alternatively be used as a secondary
@@ -5079,10 +5076,6 @@
 	selinux_disabled = 1;
 	selinux_enabled = 0;
 
-	/* Disable minimum mmap address check only if we enabled it */
-	if (enabled_mmap_min_addr)
-		mmap_min_addr = 0;
-
 	/* Reset security_ops to the secondary module, dummy or capability. */
 	security_ops = secondary_ops;
 

-

From: James Morris
Date: Sunday, July 1, 2007 - 3:39 pm

Thanks, it was already fixed in my tree.


- James
-- 
James Morris
<jmorris@namei.org>
-

From: Adrian Bunk
Date: Sunday, July 1, 2007 - 1:23 pm

This patch makes some needlessly global functions static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 fs/unionfs/lookup.c |    4 +++-
 fs/unionfs/mmap.c   |   14 +++++++-------
 fs/unionfs/union.h  |    1 -
 3 files changed, 10 insertions(+), 9 deletions(-)

--- linux-2.6.22-rc6-mm1/fs/unionfs/union.h.old	2007-07-01 00:01:19.000000000 +0200
+++ linux-2.6.22-rc6-mm1/fs/unionfs/union.h	2007-07-01 00:01:26.000000000 +0200
@@ -242,7 +242,6 @@
 	unionfs_lock_dentry(d2);
 }
 
-extern int realloc_dentry_private_data(struct dentry *dentry);
 extern int new_dentry_private_data(struct dentry *dentry);
 extern void free_dentry_private_data(struct dentry *dentry);
 extern void update_bstart(struct dentry *dentry);
--- linux-2.6.22-rc6-mm1/fs/unionfs/lookup.c.old	2007-07-01 00:05:02.000000000 +0200
+++ linux-2.6.22-rc6-mm1/fs/unionfs/lookup.c	2007-07-01 00:06:05.000000000 +0200
@@ -18,6 +18,8 @@
 
 #include "union.h"
 
+static int realloc_dentry_private_data(struct dentry *dentry);
+
 /* is the filename valid == !(whiteout for a file or opaque dir marker) */
 static int is_validname(const char *name)
 {
@@ -488,7 +490,7 @@
 }
 
 /* UNIONFS_D(dentry)->lock must be locked */
-int realloc_dentry_private_data(struct dentry *dentry)
+static int realloc_dentry_private_data(struct dentry *dentry)
 {
 	if (!__realloc_dentry_private_data(dentry))
 		return 0;
--- linux-2.6.22-rc6-mm1/fs/unionfs/mmap.c.old	2007-07-01 00:08:07.000000000 +0200
+++ linux-2.6.22-rc6-mm1/fs/unionfs/mmap.c	2007-07-01 00:12:05.000000000 +0200
@@ -52,7 +52,7 @@
  * such day as Linux can better support address_space_ops in a stackable
  * fashion.
  */
-int unionfs_writepage(struct page *page, struct writeback_control *wbc)
+static int unionfs_writepage(struct page *page, struct writeback_control *wbc)
 {
 	int err = -EIO;
 	struct inode *inode;
@@ -198,7 +198,7 @@
 	return err;
 }
 
-int unionfs_readpage(struct file *file, struct page *page)
+static int unionfs_readpage(struct file *file, ...
From: Josef Sipek
Date: Sunday, July 1, 2007 - 6:42 pm

I forget who said it, but someone wasn't very happy with prototypes like
that in .c files. What's the prefered way - are they ok for static symbols?

Josef "Jeff" Sipek.

-- 
We have joy, we have fun, we have Linux on a Sun...
-

From: Satyam Sharma
Date: Sunday, July 1, 2007 - 7:21 pm

Hi,

[ Cc:'s trimmed ]


The preferred way is to push static functions' definitions above the
callsites (caller functions) in the same file, if possible.
Perhaps Adrian was in a hurry so didn't do that ...

Satyam
-

From: Adrian Bunk
Date: Sunday, July 1, 2007 - 7:27 pm

It might have even been me who said this - but about global functions.

For global functions, prototypes in header files allow gcc to check 
whether the prototype matches the actual function. With a prototype
in the C file of the caller that's not possible, and if they are 
different it can result in nasty runtime errors.

For static functions that's not an issue since gcc sees both the 

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

-

From: Josef Sipek
Date: Monday, July 2, 2007 - 1:38 pm

Ok, fair enough. Applied & pushed to korg tree.

Thanks.

Josef "Jeff" Sipek.

-- 
Once you have their hardware. Never give it back.
(The First Rule of Hardware Acquisition)
-

From: Adrian Bunk
Date: Sunday, July 1, 2007 - 1:24 pm

Now that it's static, it should no longer be exported to modules...

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---
--- linux-2.6.22-rc6-mm1/drivers/media/dvb/frontends/dvb-pll.c.old	2007-07-01 21:42:17.000000000 +0200
+++ linux-2.6.22-rc6-mm1/drivers/media/dvb/frontends/dvb-pll.c	2007-07-01 21:42:25.000000000 +0200
@@ -587,7 +587,6 @@
 	// calculate the frequency we set it to
 	return (div * desc->entries[i].stepsize) - desc->iffreq;
 }
-EXPORT_SYMBOL(dvb_pll_configure);
 
 static int dvb_pll_release(struct dvb_frontend *fe)
 {

-

From: Michael Krufky
Date: Sunday, July 1, 2007 - 2:29 pm

Thanks, Adrian... I'm not sure how I missed that one ;-)

Acked-by: Michael Krufky <mkrufky@linuxtv.org>


Mauro,  I'll push this into hg and send you a pull request.

Cheers,
Mike
-

From: Adrian Bunk
Date: Wednesday, July 4, 2007 - 12:00 pm

<--  snip  -->

...
  CC      arch/i386/xen/enlighten.o
/home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/arch/i386/xen/enlighten.c: In function ‘xen_alloc_pt_init’:
/home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/arch/i386/xen/enlighten.c:657: error: ‘mem_map’ undeclared (first use in this function)
...
make[2]: *** [arch/i386/xen/enlighten.o] Error 1

<--  snip  -->

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


-

From: Jeremy Fitzhardinge
Date: Wednesday, July 4, 2007 - 5:32 pm

Xen currently relies on contigious memory (ie, no numa, discontig or
sparse memory).  Specifically it uses mem_map, which is only available
if CONFIG_NEED_MULTIPLE_NODES is not defined.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Adrian Bunk <bunk@stusta.de>
Cc: Andi Kleen <ak@suse.de>

---
 arch/i386/xen/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

===================================================================
--- a/arch/i386/xen/Kconfig
+++ b/arch/i386/xen/Kconfig
@@ -4,7 +4,7 @@
 
 config XEN
 	bool "Enable support for Xen hypervisor"
-	depends on PARAVIRT && X86_CMPXCHG && X86_TSC
+	depends on PARAVIRT && X86_CMPXCHG && X86_TSC && !NEED_MULTIPLE_NODES
 	help
 	  This is the Linux Xen port.  Enabling this will allow the
 	  kernel to boot in a paravirtualized environment under the



-

From: Adrian Bunk
Date: Thursday, July 5, 2007 - 4:22 pm

Every file should include the headers containing the prototypes for
its global functions.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---
--- linux-2.6.22-rc6-mm1/arch/i386/xen/events.c.old	2007-07-03 04:26:28.000000000 +0200
+++ linux-2.6.22-rc6-mm1/arch/i386/xen/events.c	2007-07-03 04:26:59.000000000 +0200
@@ -31,6 +31,7 @@
 #include <asm/irq.h>
 #include <asm/sync_bitops.h>
 #include <asm/xen/hypercall.h>
+#include <asm/xen/hypervisor.h>
 
 #include <xen/events.h>
 #include <xen/interface/xen.h>

-

From: Jeremy Fitzhardinge
Date: Thursday, July 5, 2007 - 5:10 pm

OK.

    J
-

From: Adrian Bunk
Date: Thursday, July 5, 2007 - 4:22 pm

This patch fixes the following compile error:

<--  snip  -->

...
  CC      arch/i386/xen/mmu.o
In file included from 
/home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/arch/i386/xen/mmu.c:46:
include2/asm/mmu_context.h: In function ‘switch_mm’:
include2/asm/mmu_context.h:45: error: dereferencing pointer to incomplete type
include2/asm/mmu_context.h:50: error: dereferencing pointer to incomplete type
include2/asm/mmu_context.h:53: error: dereferencing pointer to incomplete type
include2/asm/mmu_context.h:58: error: dereferencing pointer to incomplete type
include2/asm/mmu_context.h:58: error: dereferencing pointer to incomplete type
include2/asm/mmu_context.h:59: error: dereferencing pointer to incomplete type
include2/asm/mmu_context.h:66: error: dereferencing pointer to incomplete type
include2/asm/mmu_context.h:70: error: dereferencing pointer to incomplete type
include2/asm/mmu_context.h:71: error: dereferencing pointer to incomplete type
...
make[2]: *** [arch/i386/xen/mmu.o] Error 1

<--  snip  -->

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---
--- linux-2.6.22-rc6-mm1/arch/i386/xen/mmu.c.old	2007-07-04 00:11:28.000000000 +0200
+++ linux-2.6.22-rc6-mm1/arch/i386/xen/mmu.c	2007-07-04 00:11:39.000000000 +0200
@@ -39,6 +39,7 @@
  * Jeremy Fitzhardinge <jeremy@xensource.com>, XenSource Inc, 2007
  */
 #include <linux/highmem.h>
+#include <linux/sched.h>
 
 #include <asm/bug.h>
 #include <asm/pgtable.h>

-

From: Jeremy Fitzhardinge
Date: Thursday, July 5, 2007 - 5:08 pm

Hm, OK.  What .config?

    J
-

From: Adrian Bunk
Date: Thursday, July 5, 2007 - 4:22 pm

xen_pgd_pin() can become static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 arch/i386/xen/mmu.c |    2 +-
 arch/i386/xen/mmu.h |    3 ---
 2 files changed, 1 insertion(+), 4 deletions(-)

--- linux-2.6.22-rc6-mm1/arch/i386/xen/mmu.h.old	2007-07-04 20:42:44.000000000 +0200
+++ linux-2.6.22-rc6-mm1/arch/i386/xen/mmu.h	2007-07-04 20:42:54.000000000 +0200
@@ -27,9 +27,6 @@
 void xen_dup_mmap(struct mm_struct *oldmm, struct mm_struct *mm);
 void xen_exit_mmap(struct mm_struct *mm);
 
-void xen_pgd_pin(pgd_t *pgd);
-//void xen_pgd_unpin(pgd_t *pgd);
-
 #ifdef CONFIG_X86_PAE
 unsigned long long xen_pte_val(pte_t);
 unsigned long long xen_pmd_val(pmd_t);
--- linux-2.6.22-rc6-mm1/arch/i386/xen/mmu.c.old	2007-07-04 20:43:00.000000000 +0200
+++ linux-2.6.22-rc6-mm1/arch/i386/xen/mmu.c	2007-07-04 20:43:06.000000000 +0200
@@ -408,7 +408,7 @@
 /* This is called just after a mm has been created, but it has not
    been used yet.  We need to make sure that its pagetable is all
    read-only, and can be pinned. */
-void xen_pgd_pin(pgd_t *pgd)
+static void xen_pgd_pin(pgd_t *pgd)
 {
 	struct multicall_space mcs;
 	struct mmuext_op *op;

-

From: Jeremy Fitzhardinge
Date: Thursday, July 5, 2007 - 5:09 pm

Hold off on that for now.  I have some local patches which add other 
xen/ files which use it.

    J
-

From: Adrian Bunk
Date: Thursday, July 5, 2007 - 4:23 pm

This patch makes the following needlessly global functions static:
- load_balance_start()
- load_balance_next()

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 kernel/sched.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-2.6.22-rc6-mm1/kernel/sched.c.old	2007-07-05 16:39:42.000000000 +0200
+++ linux-2.6.22-rc6-mm1/kernel/sched.c	2007-07-05 16:43:38.000000000 +0200
@@ -2011,7 +2011,7 @@
  * classes, starting with the highest-prio one:
  */
 
-struct task_struct * load_balance_start(struct rq *rq)
+static struct task_struct * load_balance_start(struct rq *rq)
 {
 	struct sched_class *class = sched_class_highest;
 	struct task_struct *p;
@@ -2028,7 +2028,7 @@
 	return NULL;
 }
 
-struct task_struct * load_balance_next(struct rq *rq)
+static struct task_struct * load_balance_next(struct rq *rq)
 {
 	struct sched_class *class = rq->load_balance_class;
 	struct task_struct *p;

-

From: Tilman Schmidt
Date: Friday, July 6, 2007 - 7:03 am

Built a kernel with this just for fun on a Pentium D 940 system running
a 32 bit install of SuSE 10.2. It complained thusly relatively early
during startup:

--------8<--------8<--------8<--------8<--------8<--------8<--------8<
Bad IO access at port 10000 (outb(val,port))
WARNING: at lib/iomap.c:44 bad_io_access()
 [dump_trace+99/475] dump_trace+0x63/0x1db
 [show_trace_log_lvl+26/47] show_trace_log_lvl+0x1a/0x2f
 [show_trace+18/20] show_trace+0x12/0x14
 [dump_stack+22/24] dump_stack+0x16/0x18
 [bad_io_access+84/86] bad_io_access+0x54/0x56
 [iowrite8+52/54] iowrite8+0x34/0x36
 [kgdb8250_uart_init+164/609] kgdb8250_uart_init+0xa4/0x261
 [kgdb_init_io+172/200] kgdb_init_io+0xac/0xc8
 [kgdb_late_entry+54/164] kgdb_late_entry+0x36/0xa4
 [kernel_init+346/732] kernel_init+0x15a/0x2dc
 [kernel_thread_helper+7/16] kernel_thread_helper+0x7/0x10
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Bad IO access at port 10000 (return inb(port))
WARNING: at lib/iomap.c:44 bad_io_access()
 [dump_trace+99/475] dump_trace+0x63/0x1db
 [show_trace_log_lvl+26/47] show_trace_log_lvl+0x1a/0x2f
 [show_trace+18/20] show_trace+0x12/0x14
 [dump_stack+22/24] dump_stack+0x16/0x18
 [bad_io_access+84/86] bad_io_access+0x54/0x56
 [ioread8+40/47] ioread8+0x28/0x2f
 [kgdb8250_uart_init+334/609] kgdb8250_uart_init+0x14e/0x261
 [kgdb_init_io+172/200] kgdb_init_io+0xac/0xc8
input: AT Translated Set 2 keyboard as /class/input/input1
 [kgdb_late_entry+54/164] kgdb_late_entry+0x36/0xa4
 [kernel_init+346/732] kernel_init+0x15a/0x2dc
 [kernel_thread_helper+7/16] kernel_thread_helper+0x7/0x10
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Bad IO access at port 10000 (outb(val,port))
WARNING: at lib/iomap.c:44 bad_io_access()
 [dump_trace+99/475] dump_trace+0x63/0x1db
 [show_trace_log_lvl+26/47] show_trace_log_lvl+0x1a/0x2f
 [show_trace+18/20] show_trace+0x12/0x14
 [dump_stack+22/24] dump_stack+0x16/0x18
 [bad_io_access+84/86] bad_io_access+0x54/0x56
 ...
From: Andrew Morton
Date: Friday, July 6, 2007 - 9:45 am

hm.  It _looks_ like kgdb hasn't been told the uart address and it's
defaulting to something silly.  But a) it should guess better than that and
b) the addresses should differ at least a little bit.

Maybe Jason can tell us what went wrong?
-

From: Jason Wessel
Date: Friday, July 6, 2007 - 10:33 am

Hi Tilman,

Perhaps you could send me your entire .config as well as the entire 
output of the dmesg after your boot, or the entire boot log?

One of the kgdb patches does slightly modify the rs232 registration.  If 
your system did not have a second serial port, or if the virtual second 
line is some kind of other device that "simple configuration" detect 
needs further modification.  Hopefully the full output of the boot will 
shed some light as to what is going on.

Thanks,
Jason.
-

From: Jason Wessel
Date: Friday, July 6, 2007 - 10:51 am

Do you have something that is more than subjective as a measure?  Some 
app runs slower, or it boots x seconds slower?

The only place I could foresee that kgdb could be eating extra cycles in 
the runtime case is from the die_notifier processing.  Any kind of 
exception such as a page fault, trap etc... will have a few extra ops 
and checks of variables so as to determine if the debugger should take 
the exception.  It looks to me like it would even benefit to add the 
check at the top of the notify hook for kgdb to exit immediately if the 
debugger is not attached.

I have contemplated making some changes to KGDB so as to make the 
registration to the die_notifier to be dynamic with attaching and 
detaching of the debugger.  If this is done, I would also make a change 
to allow for the case where the kernel would wait for the debugger to 
attach on any fatal fault.

Jason.



-

From: Jan Kiszka
Date: Friday, July 6, 2007 - 11:15 am

At this chance... Reminds me that this old issue still seems to be
unsolved in current kgdb:

http://www.mail-archive.com/kgdb-bugreport@lists.sourceforge.net/msg00442=
=2Ehtml

I'm only looking at that spot in kgdb right now and /may/ oversee new
border conditions elsewhere. But my feeling is there are none.

Jan (looking forward to see kgdb merged)

From: Jason Wessel
Date: Friday, July 6, 2007 - 11:24 am

Hi Jan,

This issue was fixed in a generic way in the patch set that is in the 
-mm tree.  Had you tried your test case in the current -mm tree?

The problem you mentioned was fixed by saving and restoring the preempt 
count as a part of the fault handling from the kgdb core and not in the 
arch specific portion.

Jason.
-

From: Jan Kiszka
Date: Friday, July 6, 2007 - 12:19 pm

Ah, OK, that was the piece I missed.

Then /me is just curious to finally learn why that hack I once proposed
(which unfortunately never received some feedback) is not the right way
to go. In other words, what is the reason for this special
fault_setjmp/fault_longjmp?

Jan

From: Badari Pulavarty
Date: Friday, July 6, 2007 - 2:31 pm

fs/xfs/linux-2.6/xfs_ioctl32.c: In function ‘xfs_ioc_bulkstat_compat’:
fs/xfs/linux-2.6/xfs_ioctl32.c:334: error: ‘xfs_inumbers_fmt_compat’
undeclared (first use in this
function)fs/xfs/linux-2.6/xfs_ioctl32.c:334: error: (Each undeclared
identifier is reported only once
fs/xfs/linux-2.6/xfs_ioctl32.c:334: error: for each function it appears
in.)
make[2]: *** [fs/xfs/linux-2.6/xfs_ioctl32.o] Error 1




-

From: Adrian Bunk
Date: Friday, July 6, 2007 - 6:50 pm

Tip of the day:
Also test the compilation of the configuration you are changing.

With CONFIG_SLUB_DEBUG=n:

<--  snip  -->

...
  CC      mm/slub.o
/home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/mm/slub.c: In function ‘init_kmem_cache_node’:
/home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/mm/slub.c:1873: error: ‘struct kmem_cache_node’ has no member named ‘full’
...
make[2]: *** [mm/slub.o] Error 1

<--  snip  -->


Another problem with this patch are the added inline's:

gcc already automatically inlines static functions with only one caller, 
and decides for other static functions based on the size of the function.


cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

-

From: Christoph Lameter
Date: Friday, July 6, 2007 - 7:03 pm

Why switch CONFIG_SLUB_DEBUG off? This is an option for embedded systems.=
=20

A fix for this is already in Andrew's tree.
From: Adrian Bunk
Date: Friday, July 6, 2007 - 7:09 pm

???

Thanks.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

-

From: Christoph Lameter
Date: Friday, July 6, 2007 - 7:13 pm

Ah. the init_kmem_cache_node() code was moved outside of CONFIG_NUMA. 
Sigh.

Only the other issue in early_kmem_cache_node is NUMA related but you did 
not encounter this since CONFIG_NUMA was not set.

-

From: Adrian Bunk
Date: Friday, July 6, 2007 - 7:01 pm

CONFIG_UNION_FS=y, CONFIG_BLOCK=n results in the following compile error:

<--  snip  -->

...
  CC      fs/unionfs/file.o
/home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/fs/unionfs/file.c:147: error: ‘file_fsync’ undeclared here (not in a function)
make[3]: *** [fs/unionfs/file.o] Error 1
...

<--  snip  -->

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

-

From: Erez Zadok
Date: Sunday, July 8, 2007 - 4:58 am

I'm adding Jens Axboe to the CC list (BLOCK layer maintainer).

> /home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/fs/unionfs/file.c:147: error: 
From: Adrian Bunk
Date: Saturday, July 7, 2007 - 1:03 am

This tree adds to include/asm-sh/system.h code that already exists in 
the same file a few lines above resulting in compile errors.

Please remove the include/asm-sh/system.h part from the git tree.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

-

From: Jason Wessel
Date: Saturday, July 7, 2007 - 10:10 pm

Adrian,

This is fixed in the for_mm branch of the kgdb git repository so it will 
be fixed on next pull into the -mm tree.

I also cleaned up the sh-lite.patch to comply with checkpatch.pl

Thanks,
Jason.
-

From: Adrian Bunk
Date: Saturday, July 7, 2007 - 2:11 pm

This patch fixes the following compile error on powerpc
with CONFIG_COMPAT=y:

<--  snip  -->

...
  CC [M]  fs/xfs/linux-2.6/xfs_ioctl32.o
/home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/fs/xfs/linux-2.6/xfs_ioctl32.c: In function 'xfs_ioc_bulkstat_compat':
/home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/fs/xfs/linux-2.6/xfs_ioctl32.c:334: error: 'xfs_inumbers_fmt_compat' undeclared (first use in this function)
/home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/fs/xfs/linux-2.6/xfs_ioctl32.c:334: error: (Each undeclared identifier is reported only once
/home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/fs/xfs/linux-2.6/xfs_ioctl32.c:334: error: for each function it appears in.)
make[3]: *** [fs/xfs/linux-2.6/xfs_ioctl32.o] Error 1

<--  snip  -->

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---
--- linux-2.6.22-rc6-mm1/fs/xfs/linux-2.6/xfs_ioctl32.c.old	2007-07-07 07:14:36.000000000 +0200
+++ linux-2.6.22-rc6-mm1/fs/xfs/linux-2.6/xfs_ioctl32.c	2007-07-07 07:14:49.000000000 +0200
@@ -153,7 +153,7 @@
 
 #else
 
-#define xfs_inumbers_fmt_compat(a, b, c, d) xfs_inumbers_fmt(a, b, c, d)
+#define xfs_inumbers_fmt_compat xfs_inumbers_fmt
 #define _PACKED
 
 #endif

-

From: Adrian Bunk
Date: Monday, July 9, 2007 - 3:56 pm

This patch fixes the following compile error with
CONFIG_SND_CS5530=y, CONFIG_ISA=n:

<--  snip  -->

...
  LD      .tmp_vmlinux1
sound/built-in.o: In function `snd_sb16_capture_trigger':
sb16_main.c:(.text+0x212ad): undefined reference to `snd_sbdsp_command'
sb16_main.c:(.text+0x212cc): undefined reference to `snd_sbdsp_command'
sb16_main.c:(.text+0x212f7): undefined reference to `snd_sbdsp_command'
sound/built-in.o: In function `snd_sb16_playback_trigger':
sb16_main.c:(.text+0x2136d): undefined reference to `snd_sbdsp_command'
sb16_main.c:(.text+0x2138c): undefined reference to `snd_sbdsp_command'
sound/built-in.o:sb16_main.c:(.text+0x213b7): more undefined references to `snd_sbdsp_command' follow
sound/built-in.o: In function `snd_sb16dsp_configure':
(.text+0x21c40): undefined reference to `snd_sbmixer_read'
sound/built-in.o: In function `snd_sb16dsp_configure':
(.text+0x21ccd): undefined reference to `snd_sbmixer_write'
sound/built-in.o: In function `snd_sb16dsp_configure':
(.text+0x21cd9): undefined reference to `snd_sbmixer_read'
sound/built-in.o: In function `snd_sb16dsp_configure':
(.text+0x21cf3): undefined reference to `snd_sbmixer_write'
sound/built-in.o: In function `snd_sb16dsp_configure':
(.text+0x21cff): undefined reference to `snd_sbmixer_read'
sound/built-in.o: In function `snd_sb16dsp_configure':
(.text+0x21d17): undefined reference to `snd_sbmixer_write'
sound/built-in.o: In function `snd_sb16dsp_configure':
(.text+0x21d23): undefined reference to `snd_sbmixer_read'
sound/built-in.o: In function `snd_sb16dsp_interrupt':
(.text+0x21e90): undefined reference to `snd_sbmixer_read'
sound/built-in.o: In function `snd_sb16dsp_interrupt':
(.text+0x21f49): undefined reference to `snd_sbdsp_command'
sound/built-in.o: In function `snd_sb16dsp_interrupt':
(.text+0x21f80): undefined reference to `snd_sbdsp_command'
sound/built-in.o: In function `snd_sb16_playback_prepare':
sb16_main.c:(.text+0x220a5): undefined reference to ...
From: Takashi Iwai
Date: Tuesday, July 10, 2007 - 2:35 am

At Tue, 10 Jul 2007 00:56:26 +0200,

Thanks, applied to ALSA tree now.


Takashi
-

From: Nish Aravamudan
Date: Friday, July 13, 2007 - 5:58 pm

On the one ppc64 machine I have to test on for memoryless nodes, I
found I had to add back in CONFIG_BLK_DEV=y and
CONFIG_SCSI_LOWLEVEL=y. Just for reference as other folks pull out

Yes.

Thanks,
Nish
-

From: J.A.
Date: Sunday, July 22, 2007 - 2:48 pm

I have noticed a funny problem.
Lets say 666 is not an uid used on you system. This oopses:

rm -f dummy
touch dummy
chown 666 dummy
touch dummy

Oops:

BUG: unable to handle kernel NULL pointer dereference at virtual address 0000006a
 printing eip:
c0165281
*pde = 00000000
Oops: 0000 [#2]
PREEMPT SMP 
Modules linked in: w83627hf hwmon_vid hwmon i2c_dev loop floppy udf microcode snd_emu10k1 snd_rawmidi snd_ac97_codec ac97_bus snd_pcm nvidia(P) snd_timer 3c59x snd_page_alloc snd_util_mem snd_hwdep snd usblp ohci1394 e1000 ieee1394 sata_promise emu10k1_gp gameport intel_agp i2c_i801 agpgart evdev sg
CPU:    3
EIP:    0060:[<c0165281>]    Tainted: P      D VLI
EFLAGS: 00210297   (2.6.21-jam12 #1)
EIP is at permission+0x4/0xa1
eax: 00000000   ebx: c5785aa0   ecx: c43a1f04   edx: 00000002
esi: 00000000   edi: 00000000   ebp: c3442c00   esp: c43a1ef0
ds: 007b   es: 007b   fs: 00d8  gs: 0033  ss: 0068
Process touch (pid: 8401, ti=c43a1000 task=c25d69b0 task.ti=c43a1000)
Stack: c5785aa0 fffffff3 c017ba84 c43e9c50 c55c52a8 c43e9c50 c344ab7c 000000c9 
       00000000 00000000 c3442c00 00000000 b7f14f70 c4f574d0 c2ea5400 c03ef580 
       00000000 00000004 b7f14f70 c0125cac ffffffff 00000000 00000000 c4f574d0 
Call Trace:
 [<c017ba84>] do_utimes+0x174/0x1b9
 [<c0125cac>] __atomic_notifier_call_chain+0x27/0x4d
 [<c0111a06>] do_page_fault+0x523/0x68d
 [<c017bbb3>] sys_utimensat+0x22/0x92
 [<c01114e3>] do_page_fault+0x0/0x68d
 [<c0102902>] sysenter_past_esp+0x5f/0x85
 [<c0300000>] packet_setsockopt+0x279/0x325
 =======================
Code: eb b1 66 c1 ee 06 8d 74 26 00 eb 8c 83 e7 02 75 c5 b8 02 00 00 00 8d 74 26 00 e8 16 bf fb ff 85 c0 74 b3 31 c0 eb c9 56 53 89 c6 <0f> b7 58 6a f6 c2 02 74 31 8b 80 a4 00 00 00 f6 40 30 01 74 1c 
EIP: [<c0165281>] permission+0x4/0xa1 SS:ESP 0068:c43a1ef0

Any ideas ?

--
J.A. Magallon <jamagallon()ono!com>     \               Software is like sex:
                                         \         It's better when it's free
Mandriva Linux ...
From: Randy Dunlap
Date: Sunday, July 22, 2007 - 4:41 pm

so is this 2.6.22-rc6-mm1 or is it as Oops says:  2.6.21-jam12 ?

I tested 2.6.22-rc6-mm1 and couldn't reproduce this.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-

From: Andrew Morton
Date: Sunday, July 22, 2007 - 11:12 pm

Does Linus's fix fix it?

commit 1e5de2837c166535f9bb4232bfe97ea1f9fc7a1c
Author: Linus Torvalds <torvalds@woody.linux-foundation.org>
Date:   Sun Jul 8 12:02:55 2007 -0700

    Fix permission checking for the new utimensat() system call
    
    Commit 1c710c896eb461895d3c399e15bb5f20b39c9073 added the utimensat()
    system call, but didn't handle the case of checking for the writability
    of the target right, when the target was a file descriptor, not a
    filename.
    
    We cannot use vfs_permission(MAY_WRITE) for that case, and need to
    simply check whether the file descriptor is writable.  The oops from
    using the wrong function was noticed and narrowed down by Markus
    Trippelsdorf.
    
    Cc: Ulrich Drepper <drepper@redhat.com>
    Cc: Markus Trippelsdorf <markus@trippelsdorf.de>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Acked-by: Al Viro <viro@ftp.linux.org.uk>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

diff --git a/fs/utimes.c b/fs/utimes.c
index 480f7c8..b3c8895 100644
--- a/fs/utimes.c
+++ b/fs/utimes.c
@@ -106,9 +106,16 @@ long do_utimes(int dfd, char __user *fil
                 if (IS_IMMUTABLE(inode))
                         goto dput_and_out;
 
-		if (current->fsuid != inode->i_uid &&
-		    (error = vfs_permission(&nd, MAY_WRITE)) != 0)
-			goto dput_and_out;
+		if (current->fsuid != inode->i_uid) {
+			if (f) {
+				if (!(f->f_mode & FMODE_WRITE))
+					goto dput_and_out;
+			} else {
+				error = vfs_permission(&nd, MAY_WRITE);
+				if (error)
+					goto dput_and_out;
+			}
+		}
 	}
 	mutex_lock(&inode->i_mutex);
 	error = notify_change(dentry, &newattrs);

-

Previous thread: [PATCH] PXA27x UDC driver. by Rodolfo Giometti on Thursday, June 28, 2007 - 3:36 am. (22 messages)

Next thread: Some NCQ numbers... by Michael Tokarev on Thursday, June 28, 2007 - 3:51 am. (17 messages)