Re: search-a-little-harder-for-mkimage.patch

2007-02-07 Thread Oleg Verych
On Thu, Feb 08, 2007 at 02:40:28AM -0500, Mike Frysinger wrote:
[] 
> by this argument, why does mkuboot.sh exist at all then ?  let's
> simply delete mkuboot.sh and change all arch Makefile's like so:
> -$(CONFIG_SHELL) $(MKIMAGE) ...
> +-mkimage ...

Yes (with TOOLCHAIN prefix).

> i of course prefer the existing solution: call the mkuboot.sh script
> which checks for a few variations of the `mkimage` binary and if it
> does not exist, output a friendly message

so as `make' will, but better than patched "friendly message", which
doesn't reflect: neither change to toolchain prefix, nor possible
permission problems, or what ever it can be, preventing actual running
the command ;)


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: posix-timers overrun broken?

2007-02-07 Thread Milan Svoboda
> On Wed, 2007-02-07 at 14:36 +0100, Milan Svoboda wrote:
> > But if the next interrupt arrives before function collect_signal is 
called 
> > to actually deliver the
> > siginfo_t to userspace, the si.overrun is cleared in posix_timer_event 
and 
> > we have just forgotten
> > one overrun...
> > 
> > Am I wrong?
> 
> Yes. posix_timer_event() is only called when the timer expires the first
> time. When the signal has been queued, the timer is not rearmed and the
> overrun is calculated in the actual signal delivery path, which calls
> do_schedule_next_timer().

Ok understand.

So it seems to me that drivers/char/mmtimer.c is wrong. It is
driver to additional hardware timers and mmtimer exports them as a posix 
timer.
When interrupt happens, they call posix_timer_event and set hardware 
interrupt
to the next tick. I use the same practise in my driver and found
that overruns are reported wrongly.

How to plug "external" source of ticks to the posix timers?

As far as I know current HRT doesn't allow us to use more sources of
ticks together, only one is selected, correct?

Milan



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: PROBLEM: sata timeouts with intel 82801HB on amd64

2007-02-07 Thread Paolo Ornati
On Wed, 07 Feb 2007 22:56:45 -0600
Robert Hancock <[EMAIL PROTECTED]> wrote:

> Paolo Ornati wrote:
> > If mounting XFS with "nobarrier" fixes the problem it seems that more
> > than one Seagate disk cannot handle the Cache Flush command while other
> > commands are in fly...
> 
> It's not allowed to overlap NCQ (FPDMA read/write) commands with any 
> other commands such as cache flushes. libata core guarantees that this 
> doesn't happen by deferring such requests until the FPDMA commands are 
> complete. (At least, it's supposed to..)

I didn't know that. Anyway just mounting XFS with "nobarrier" fixes
the ploblem for me... so libata is buggy or I don't know!

-- 
Paolo Ornati
Linux 2.6.20 on x86_64
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [BUG][PATCH] fix mempolcy's check on a system with memory-less-node take2

2007-02-07 Thread Andi Kleen

> This panic(hang) was found by a numa test-set on a system with 3 nodes, where
> node(2) was memory-less-node.

I still think it's the wrong fix -- just get rid of the memory less node.
I expect you'll likely run into more problems with that setup anyways.

>  static struct mempolicy *mpol_new(int mode, nodemask_t *nodes)
>  {
>   struct mempolicy *policy;
> + void  *val;

Using void * here is nasty when it's a zonelist pointer.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[patch] export ufs_fs.h to userspace

2007-02-07 Thread Mike Frysinger
was ufs_fs.h purposefully not exported to userspace or did it just slip 
through the cracks ?  assuming the latter scenario, the attached patch 
touches up the relationship between ufs_fs.h and its sub headers (like 
ufs_fs_sb.h) so that we can export it ... the silo bootloader takes advantage 
of this header for example

Signed-off-by: Mike Frysinger <[EMAIL PROTECTED]>

---
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -324,6 +324,7 @@ unifdef-y += tty.h
 unifdef-y += types.h
 unifdef-y += udf_fs_i.h
 unifdef-y += udp.h
+unifdef-y += ufs_fs.h
 unifdef-y += uinput.h
 unifdef-y += uio.h
 unifdef-y += unistd.h
--- a/include/linux/ufs_fs.h
+++ b/include/linux/ufs_fs.h
@@ -45,8 +45,10 @@ typedef __u32 __bitwise __fs32;
 typedef __u16 __bitwise __fs16;
 #endif
 
+#ifdef __KERNEL__
 #include 
 #include 
+#endif
 
 #define UFS_BBLOCK 0
 #define UFS_BBSIZE 8192
@@ -303,7 +305,7 @@ typedef __u16 __bitwise __fs16;
 #define UFS_MAXMNTLEN 512
 #define UFS2_MAXMNTLEN 468
 #define UFS2_MAXVOLLEN 32
-/* #define UFS_MAXCSBUFS 31 */
+#define UFS_MAXCSBUFS 31
 #define UFS_LINK_MAX 32000
 /*
 #defineUFS2_NOCSPTRS   ((128 / sizeof(void *)) - 4)
--- a/include/linux/ufs_fs_sb.h
+++ b/include/linux/ufs_fs_sb.h
@@ -21,7 +21,6 @@
 struct ufs_sb_private_info;
 struct ufs_cg_private_info;
 struct ufs_csum;
-#define UFS_MAXCSBUFS 31
 
 struct ufs_sb_info {
struct ufs_sb_private_info * s_uspi;


pgprOxJHRmfOW.pgp
Description: PGP signature


Re: search-a-little-harder-for-mkimage.patch

2007-02-07 Thread Mike Frysinger

On 2/8/07, Oleg Verych <[EMAIL PROTECTED]> wrote:

On Thu, Feb 08, 2007 at 12:56:17AM -0500, Mike Frysinger wrote:
> On 2/8/07, Oleg Verych <[EMAIL PROTECTED]> wrote:
> >> Check to see if `${CROSS_COMPILE}mkimage` exists and if not, fall back to
> >> the standard `mkimage`
> >
> >Why this can't be done by
> >
> >  PATH=$CROSS_COMPILE:$PATH
> >
> >in your environment?
>
> because it wouldnt matter ?  the tool is called
> "$CROSS_COMPILE-mkimage", it isnt $CROSS_COMPILE_PATH/mkimage

Well, i mean search for your `mkimage'.

Let's see how all this used in Makefiles (avr32, ppc, sh are same)

../arch/arm/boot/Makefile:

   MKIMAGE := $(srctree)/scripts/mkuboot.sh
   ...
   quiet_cmd_uimage = UIMAGE  $@
 cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \
   -C none -a $(ZRELADDR) -e $(ZRELADDR) \
   -n 'Linux-$(KERNELRELEASE)' -d $< $@

type, which with bash or whatever, doesn't matter. All they need *your*
toolchain in $PATH, why not just to put "$CROSS_COMPILE-mkimage" instead
of $(CONFIG_SHELL) $(MKIMAGE) here? mkuboot.sh just searches $PATH for
mkimage and run it. Double overkill, no?


by this argument, why does mkuboot.sh exist at all then ?  let's
simply delete mkuboot.sh and change all arch Makefile's like so:
-$(CONFIG_SHELL) $(MKIMAGE) ...
+-mkimage ...

i of course prefer the existing solution: call the mkuboot.sh script
which checks for a few variations of the `mkimage` binary and if it
does not exist, output a friendly message
-mike
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[PATCH] ATA convert GSI to irq on ia64

2007-02-07 Thread Zhang, Yanmin
If an ATA drive uses legacy mode, ata driver will choose 14 and 15 as the
fixed irq number. On ia64 platform, such numbers are GSI and should be converted
to irq vector.

Below patch against kernel 2.6.20 fixes it.

Signed-off-by: Zhang Yanmin <[EMAIL PROTECTED]>

---

diff -Nraup linux-2.6.20/include/asm-generic/libata-portmap.h 
linux-2.6.20_fix/include/asm-generic/libata-portmap.h
--- linux-2.6.20/include/asm-generic/libata-portmap.h   2007-02-08 
15:13:44.0 +0800
+++ linux-2.6.20_fix/include/asm-generic/libata-portmap.h   2007-02-08 
15:20:13.0 +0800
@@ -3,10 +3,20 @@
 
 #define ATA_PRIMARY_CMD0x1F0
 #define ATA_PRIMARY_CTL0x3F6
+#if defined(__ia64__)
+#define ATA_PRIMARY_IRQ(dev)   isa_irq_to_vector(14)
+#else
 #define ATA_PRIMARY_IRQ(dev)   14
+#endif
+
 
 #define ATA_SECONDARY_CMD  0x170
 #define ATA_SECONDARY_CTL  0x376
+#if defined(__ia64__)
+#define ATA_SECONDARY_IRQ(dev) isa_irq_to_vector(15)
+#else
 #define ATA_SECONDARY_IRQ(dev) 15
+#endif
+
 
 #endif
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: mm snapshot broken-out-2007-02-06-16-59.tar.gz uploaded

2007-02-07 Thread Cedric Le Goater
Michal Piotrowski wrote:
> On 07/02/07, Andrew Morton <[EMAIL PROTECTED]> wrote:
>> I copied it to
>> http://userweb.kernel.org/~akpm/broken-out-2007-02-06-16-59.tar.gz but
>> there's really not much point in using it - it's ancient.
> 
> Cedric, here is an updated version
> http://www.stardust.webpages.pl/files/mm-snapshot/mm-snapshot-07-02-07-22-21.tar.bz2
> 
> 
> Without four patches
> 
> #swiotlb-uninlinings.patch
> #git-cryptodev-fixup.patch
> #add-vm_insert_pfn.patch
> #knfsd-fix-a-race-in-closing-nfsd-connections.patch

Thanks !

c.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: search-a-little-harder-for-mkimage.patch

2007-02-07 Thread Oleg Verych
On Thu, Feb 08, 2007 at 12:56:17AM -0500, Mike Frysinger wrote:
> On 2/8/07, Oleg Verych <[EMAIL PROTECTED]> wrote:
> >> Check to see if `${CROSS_COMPILE}mkimage` exists and if not, fall back to
> >> the standard `mkimage`
> >
> >Why this can't be done by
> >
> >  PATH=$CROSS_COMPILE:$PATH
> >
> >in your environment?
> 
> because it wouldnt matter ?  the tool is called
> "$CROSS_COMPILE-mkimage", it isnt $CROSS_COMPILE_PATH/mkimage

Well, i mean search for your `mkimage'.

Let's see how all this used in Makefiles (avr32, ppc, sh are same)

../arch/arm/boot/Makefile:

   MKIMAGE := $(srctree)/scripts/mkuboot.sh
   ...
   quiet_cmd_uimage = UIMAGE  $@
 cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \
   -C none -a $(ZRELADDR) -e $(ZRELADDR) \
   -n 'Linux-$(KERNELRELEASE)' -d $< $@

type, which with bash or whatever, doesn't matter. All they need *your*
toolchain in $PATH, why not just to put "$CROSS_COMPILE-mkimage" instead
of $(CONFIG_SHELL) $(MKIMAGE) here? mkuboot.sh just searches $PATH for
mkimage and run it. Double overkill, no?

> >> 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.
> >
> >If that matter, `type -path' is bashizm (BloAted SHell), and "blackbox"
> >with "dash" (very good `sh' equivalents) will fail. I would recomend to
> >use "which" command (btw, Debian has `sh' version of it), if you
> >concerned about size and performance.
> >
> >Nack + proposition to move from `bash' to `sh'.
> 
> the script already uses "#!/bin/bash" and the patch doesnt change any
> of the existing conventions ... so if you want to rewrite the existing
> code to be POSIX compliant, then do so so i can add back in support
> for $CROSS_COMPILE-mkimage

To run faster, but let me stop here.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch] Re: SCSI logging sucks

2007-02-07 Thread Volker Sameske
> There's a very convenient script called scsi_logging_level included in
> (of all things) the s390-tools package.
> 
> Maybe provide a pointer to it -- or even just include it.  It's not
> very big...
> 
> 
http://www-128.ibm.com/developerworks/linux/linux390/s390-tools-1.5.4.html

The scsi_logging_level script is described here in chapter 8:
http://download.boulder.ibm.com/ibmdl/pub/software/dw/linux390/docu/l26cts01.pdf

and here on page 312:
http://download.boulder.ibm.com/ibmdl/pub/software/dw/linux390/docu/l26cdd02.pdf

regards,
Volker
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: + search-a-little-harder-for-mkimage.patch

2007-02-07 Thread Mike Frysinger

On 2/8/07, Oleg Verych <[EMAIL PROTECTED]> wrote:

On Thu, Feb 08, 2007 at 12:58:26AM -0500, Mike Frysinger wrote:
> On 2/8/07, Oleg Verych <[EMAIL PROTECTED]> wrote:
> >Trivial shell scripts, especially for embedded archs (Blackfin is
> >one, IIRC), may be easily converted.
>
> yes, but Blackfin is no-mmu so converting the script to use POSIX
> shell is pointless to us since no-mmu is not a self-hosting
> environment

Heh, did i say POSIX?


/bin/sh is the POSIX shell ... if you want to switch off of /bin/bash,
then the only other sane option is /bin/sh which means rewriting the
code to be POSIX compliant


I said bloated shell, from man bash:

BUGS
   It's too big and too slow.


we get it, you dont like bash, why do you feel the need to keep making
these statements ?
-mike
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: + search-a-little-harder-for-mkimage.patch

2007-02-07 Thread Oleg Verych
On Thu, Feb 08, 2007 at 12:58:26AM -0500, Mike Frysinger wrote:
> On 2/8/07, Oleg Verych <[EMAIL PROTECTED]> wrote:
> >On Wed, Feb 07, 2007 at 09:19:21PM -0800, Andrew Morton wrote:
> >> On Thu, 8 Feb 2007 06:24:40 +0100 Oleg Verych <[EMAIL PROTECTED]> 
> >wrote:
> >>
> >> > If that matter, `type -path' is bashizm (BloAted SHell), and "blackbox"
> >> > with "dash" (very good `sh' equivalents) will fail.
> >>
> >> Does the kernel presently build with that shell?
> >
> >build - yes, with dash being `$(shell)'. All scripts with `#!/bin/bash'
> >of course use bash, example is gen_initramfs_list.sh.
> 
> which is what mkuboot.sh is using now
> 
> >Trivial shell scripts, especially for embedded archs (Blackfin is
> >one, IIRC), may be easily converted.
> 
> yes, but Blackfin is no-mmu so converting the script to use POSIX
> shell is pointless to us since no-mmu is not a self-hosting
> environment

Heh, did i say POSIX? I said bloated shell, from man bash:

BUGS
   It's too big and too slow.



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [git patches] net driver updates

2007-02-07 Thread Junio C Hamano
Jeff Garzik <[EMAIL PROTECTED]> writes:

>  mode change 100644 => 100755 drivers/net/qla3xxx.c
>  mode change 100644 => 100755 drivers/net/qla3xxx.h

Did you mean to have these?  Commit bd36b0ac appears to have
brought the mode bits change in.

Not trying to nitpick --- I am trying to find out if this was
caused by a git bug.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [2.6.20] tifm_7xx1/mmc not working

2007-02-07 Thread Pierre Ossman
Alex Dubov is the maintainer of tifm, not me.

Andreas Steinmetz wrote:
> Hi,
> I do have a problem with tifm_7xx1 and 2.6.20. First of all, the device
> is working with 2.6.18.2 and the out of tree tifm-0.6 release. In this
> case except for the first card insertion after suspend/reboot I do get
> the following messages:
> 
> tifm_7xx1: sd card detected in socket 3
> mmcblk0: mmc0:7d7f SD01G 1006080KiB
>  mmcblk0: p1
> 
> With 2.6.20, however, I always do get only the following which is the
> same as for 2.6.18.2 on first card insert after reboot/suspend:
> 
> tifm_7xx1: sd card detected in socket 3
> 
> Am I doing something wrong here or is there a problem?
> 
> Relevant modules loaded with 2.6.20:
> 
> mmc_block   7944  0
> tifm_sd10824  0
> tifm_7xx1   7296  0
> sdhci  17548  0
> tifm_core   7960  2 tifm_sd,tifm_7xx1
> mmc_core   24096  3 mmc_block,tifm_sd,sdhci
> 

Rgds
-- 
 -- Pierre Ossman

  Linux kernel, MMC maintainerhttp://www.kernel.org
  PulseAudio, core developer  http://pulseaudio.org
  rdesktop, core developer  http://www.rdesktop.org
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: + search-a-little-harder-for-mkimage.patch

2007-02-07 Thread Mike Frysinger

On 2/8/07, Oleg Verych <[EMAIL PROTECTED]> wrote:

On Wed, Feb 07, 2007 at 09:19:21PM -0800, Andrew Morton wrote:
> On Thu, 8 Feb 2007 06:24:40 +0100 Oleg Verych <[EMAIL PROTECTED]> wrote:
>
> > If that matter, `type -path' is bashizm (BloAted SHell), and "blackbox"
> > with "dash" (very good `sh' equivalents) will fail.
>
> Does the kernel presently build with that shell?

build - yes, with dash being `$(shell)'. All scripts with `#!/bin/bash'
of course use bash, example is gen_initramfs_list.sh.


which is what mkuboot.sh is using now


Trivial shell scripts, especially for embedded archs (Blackfin is
one, IIRC), may be easily converted.


yes, but Blackfin is no-mmu so converting the script to use POSIX
shell is pointless to us since no-mmu is not a self-hosting
environment
-mike
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: dd

2007-02-07 Thread Mike Frysinger

On 2/8/07, Oleg Verych <[EMAIL PROTECTED]> wrote:

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

Why this can't be done by

  PATH=$CROSS_COMPILE:$PATH

in your environment?


because it wouldnt matter ?  the tool is called
"$CROSS_COMPILE-mkimage", it isnt $CROSS_COMPILE_PATH/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.

If that matter, `type -path' is bashizm (BloAted SHell), and "blackbox"
with "dash" (very good `sh' equivalents) will fail. I would recomend to
use "which" command (btw, Debian has `sh' version of it), if you
concerned about size and performance.

Nack + proposition to move from `bash' to `sh'.


the script already uses "#!/bin/bash" and the patch doesnt change any
of the existing conventions ... so if you want to rewrite the existing
code to be POSIX compliant, then do so so i can add back in support
for $CROSS_COMPILE-mkimage
-mike
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Multiple virtual bus instances

2007-02-07 Thread Greg KH
On Wed, Feb 07, 2007 at 02:15:08PM -0800, Simon White wrote:
> Hi,
> 
> I've been working through trying to create a virtual
> bus.

How does this differ from a "real" bus?

> I've successfuly made it work for a single instance but wanted to
> confirm how to create multiple instances of the virtual bus.

Why would you need that?

> I believe to do this you have only one instance of your new
> bus_type registered but register multiple instances of struct device
> for it.  I just wanted to confirm that was correct.

That would create multiple devices on the same bus.  Is that what you
need to do?

> Lastly how do you walk over all devices on a bus
> instance?

You usually do this in your bus-specific code somehow.

> I note bus_for_each_dev but that appears to take a bus_type rather
> than struct device instance, hence I assume it will return all devices
> from all instances.

No, it will walk the bus that you created.  If you need multiple busses,
create multiple 'struct bus_type' structures.

> I know I could compare each device to see if it is on a certain bus
> instance but wondered if there was a better way?

I think you will find that it works the way it is described.

Might I ask what you are trying to do with these multiple busses?

Note that you can have multiple trees of devices, all with the same
bus_type, yet not joined together in any other way.  Odds are, you
probably want to do that, right?

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.

2007-02-07 Thread Greg KH
On Wed, Feb 07, 2007 at 07:28:19PM -0800, Linus Torvalds wrote:
> 
> 
> On Wed, 7 Feb 2007, Trond Myklebust wrote:
> >
> > The latest pull from the git tree spews out a torrent of the above
> > warning on a recent Fedora Core 6 machine running gcc-4.1.1. config file
> > is attached...
> 
> Should hopefully be fixed already in current -git

It is, but now I'm getting this warning instead all over the place:
  CC  init/initramfs.o
In file included from include/asm/thread_info.h:17,
 from include/linux/thread_info.h:22,
 from include/linux/preempt.h:10,
 from include/linux/spinlock.h:50,
 from include/linux/capability.h:46,
 from include/linux/sched.h:47,
 from arch/i386/kernel/time.c:35:
include/asm/processor.h: In function 'cpuid_count':
include/asm/processor.h:611: warning: pointer targets in passing argument 1 of 
'native_cpuid' differ in signedness
include/asm/processor.h:611: warning: pointer targets in passing argument 2 of 
'native_cpuid' differ in signedness
include/asm/processor.h:611: warning: pointer targets in passing argument 3 of 
'native_cpuid' differ in signedness
include/asm/processor.h:611: warning: pointer targets in passing argument 4 of 
'native_cpuid' differ in signedness


I'm using gcc 4.1.1 here if that matters any...

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: + search-a-little-harder-for-mkimage.patch

2007-02-07 Thread Oleg Verych
On Wed, Feb 07, 2007 at 09:19:21PM -0800, Andrew Morton wrote:
> On Thu, 8 Feb 2007 06:24:40 +0100 Oleg Verych <[EMAIL PROTECTED]> wrote:
> 
> > If that matter, `type -path' is bashizm (BloAted SHell), and "blackbox"
> > with "dash" (very good `sh' equivalents) will fail.
> 
> Does the kernel presently build with that shell?

build - yes, with dash being `$(shell)'. All scripts with `#!/bin/bash'
of course use bash, example is gen_initramfs_list.sh.

Trivial shell scripts, especially for embedded archs (Blackfin is
one, IIRC), may be easily converted.

BTW, Debian shell policy is to be bashizms-clear. Purpose -- to have
compatibility with any `sh'. Shall we?


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.20 PCI Cannot allocate resource region 2

2007-02-07 Thread Manu Abraham

On 2/7/07, Grant Grundler <[EMAIL PROTECTED]> wrote:

On Tue, Feb 06, 2007 at 03:52:47PM +0400, Manu Abraham wrote:
> >attaching a dump of the regs (on 2.6.17.7) as well as the diff
>
> The device now works, used the demodulator driver alongwith the bridge
> driver.

Ok - thanks for the dmesg output and log. I suspect you've already
tried cycling power on the machine (If not, please do).
I have no idea what M$ XP was doing that might "fix" the problem.

I was just suspicious of our byte accesses to the same dword.
To answer you previous question, it's possible that M$ only
uses dword accesses. I don't know.


Does it sound too weird, if our PCI accesses could accidentally
overwrite EEPROM contents on cards that have the EEPROM, R/W ?

we came across with lot of issues on the same unfortunately under
Linux only this issues comes up, we used to sling mud at each other,
probably for bad I2C communications on a BT878 based chip.

Recently, somebody came across a strange case where, booting into
Windows , fixed his EEPROM contents. Since i have the driver sources
for the described card from the vendor for windows, i don't see how
any way in which the Windows driver does rewriting the EEPROM.

http://thread.gmane.org/gmane.linux.drivers.dvb/23911/focus=31185

Does this have any relation to the current situation ?

regards,
manu
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: forcedeth problems on 2.6.20-rc6-mm3

2007-02-07 Thread Andrew Morton
On Mon, 5 Feb 2007 16:52:24 -0800 Andrew Morton <[EMAIL PROTECTED]> wrote:

> On Mon, 05 Feb 2007 18:35:06 -0600
> Robert Hancock <[EMAIL PROTECTED]> wrote:
> 
> > Daniel Barkalow wrote:
> > > On Sun, 4 Feb 2007, Robert Hancock wrote:
> > > 
> > >> Something's busted with forcedeth in 2.6.20-rc6-mm3 for me relative to
> > >> 2.6.20-rc6. There's no errors in dmesg, but it seems no packets ever get
> > >> received and so the machine can't get an IP address. I tried reverting 
> > >> all the
> > >> -mm changes to drivers/net/forcedeth.c, which didn't help. The network
> > >> controller shares an IRQ with the USB OHCI controller which is receiving
> > >> interrupts, so it doesn't seem like an interrupt routing problem, though 
> > >> I
> > >> suppose something wierd could be happening there.
> > > 
> > > IIRC, forcedeth tries to use MSI by default. Perhaps the hardware is 
> > > using 
> > > it, but the kernel thinks enabling it didn't work? I think there's a 
> > > module option for forcedeth to disable MSI, which might be worth a try to 
> > > see if it has any effect.
> > 
> > I must have messed something up when testing before - reverting to 
> > forcedeth.c from 2.6.20-rc6 does indeed fix the problem. And it doesn't 
> > seem like no packets at all are received with the -mm3 version (driver 
> > version 0.60), either - if I do a tcpdump I can get Ethernet packets 
> > showing up, but I can't ping my router so it seems like something isn't 
> > getting through properly. With the 2.6.20-rc6 version (driver version 
> > 0.59) it works fine. I switched back and forth between versions and this 
> > seems repeatable.
> > 
> > I don't think it's MSI related, the CK804 version of these controllers 
> > doesn't support MSI and the driver shouldn't be trying to use it. I 
> > tried the MSI and MSI-X disable options on the 0.60 driver, but that 
> > didn't help.
> > 
> 
> OK, thanks.  Jeff, please note that the forcedeth changes in git-netdev-all
> have a problem.

Well all the forcedeth patches seems to have wandered into mainline anyway.

Please test current git (or tomorrow's git snapshot), see if it works?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


+ make-mkcompile_h-use-lang=c-and-lc_all=c-for-cc-v.patch

2007-02-07 Thread Oleg Verych
> make-mkcompile_h-use-lang=c-and-lc_all=c-for-cc-v.patch
[]
> 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.

Files in C must be in ASCII. Thus, my proposition is to
"export LC_ALL=C LANG=C" first, and remove any all other "LC_ALL=C
LANG=C", to have "compile.h" in it.


@@ -58,7 +58,7 @@ UTS_TRUNCATE="sed -e s/\(.\{1,$UTS_LEN\}
 echo \#define LINUX_COMPILE_DOMAIN
   fi
 
-  echo \#define LINUX_COMPILER \"`$CC -v 2>&1 | tail -n 1`\"
+  echo \#define LINUX_COMPILER \"`LC_ALL=C LANG=C $CC -v 2>&1 | tail -n 1`\"
 ) > .tmpcompile
 
 # Only replace the real compile.h if the new one is different,
_

Patches currently in -mm which might be from [EMAIL PROTECTED] are

make-mkcompile_h-use-lang=c-and-lc_all=c-for-cc-v.patch
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.20 PCI Cannot allocate resource region 2

2007-02-07 Thread Manu Abraham

On 2/7/07, Grant Grundler <[EMAIL PROTECTED]> wrote:

On Tue, Feb 06, 2007 at 03:52:47PM +0400, Manu Abraham wrote:
> >attaching a dump of the regs (on 2.6.17.7) as well as the diff
>
> The device now works, used the demodulator driver alongwith the bridge
> driver.

Ok - thanks for the dmesg output and log. I suspect you've already
tried cycling power on the machine (If not, please do).


I did power cycling on the machine .. did try pulling out the power
cord out for a while as well, to check whether it is some "fix that
just evaporated"



I have no idea what M$ XP was doing that might "fix" the problem.

I was just suspicious of our byte accesses to the same dword.
To answer you previous question, it's possible that M$ only
uses dword accesses. I don't know.




someone who has access to NT HAL inside ideas (maybe a too far deam) ,
could probably explain ?



> inlined the log

excellent - sounds like you are making forward progress even
if we can not reproduce the problem...worst case other users
(or customers) have a "work around" :^/


Sounds like a horrible workaround . :-)

I am thinking more in the direction of something wrong in the BIOS, as
that is the only dark area, where i can't see/understand anything.


regards,
manu
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[git pull] drm tree for 2.6.21-rc1

2007-02-07 Thread Dave Airlie


Hi Linus,

Please pull from the 'drm-patches' branch of
git://master.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git drm-patches

This contains the drm patches for the 2.6.21-rc1, and contains a cleanup of the
drm ioremap code to avoid some paravirt_op exports, fixes to the ioremap code 
to zero out vmalloced memory, a bunch of fixes to the via driver, and an update 
tothe simple memory manager used by sis and via drivers.

Dave.

 drivers/char/drm/drmP.h |   36 ++-
 drivers/char/drm/drm_bufs.c |   19 ++--
 drivers/char/drm/drm_memory.c   |   94 +++---
 drivers/char/drm/drm_memory.h   |   20 
 drivers/char/drm/drm_memory_debug.h |   70 -
 drivers/char/drm/drm_mm.c   |  183 +++
 drivers/char/drm/drm_pciids.h   |4 +
 drivers/char/drm/drm_proc.c |4 -
 drivers/char/drm/drm_sman.c |3 -
 drivers/char/drm/drm_vm.c   |   16 ++-
 drivers/char/drm/i810_dma.c |   34 ---
 drivers/char/drm/i810_drv.h |2
 drivers/char/drm/i830_dma.c |   32 --
 drivers/char/drm/i830_drv.h |2
 drivers/char/drm/via_dma.c  |9 ++
 drivers/char/drm/via_dmablit.c  |2
 drivers/char/drm/via_drv.h  |   11 +-
 drivers/char/drm/via_irq.c  |   16 ++-
 drivers/char/drm/via_map.c  |3 -
 drivers/char/drm/via_verifier.c |   50 +++---
 drivers/char/drm/via_verifier.h |1
 21 files changed, 304 insertions(+), 307 deletions(-)

commit 6e4296a85bb40854b2cb6eff125ff1906d47c66f
Author: Thomas Hellstrom 
Date:   Thu Feb 8 13:17:44 2007 +1100

drm: Allow for 44 bit user-tokens (or drm_file offsets)

commit 756db73df7b7d6b9f6421c1fb2e1cabeaede5846
Author: Thomas Hellstrom 
Date:   Thu Feb 8 12:57:40 2007 +1100

drm/via: Disable AGP DMA for chips with the new 3D engine.

commit 1d58420bad15d08f93bf1e0342c1b1d1234d69b7
Author: Thomas Hellstrom 
Date:   Mon Jan 8 22:25:47 2007 +1100

drm: update core memory manager from git drm tree

Remove the memory manager parameter from the put_block function, as this
makes the client code a lot cleaner. Prepare buffer manager for lock and
unlock calls.
Fix buggy aligned allocations.
Remove the stupid root_node field from the core memory manager.
Support multi-page buffer offset alignments
Add improved alignment functionality to the core memory manager.
This makes an allocated block actually align itself and returns any
wasted space to the manager.

Signed-off-by: Dave Airlie <[EMAIL PROTECTED]>

commit 004a7727421fd202bbdfcc0231a3359085199a52
Author: Christoph Hellwig <[EMAIL PROTECTED]>
Date:   Mon Jan 8 21:56:59 2007 +1100

drm: remove drm_ioremap and drm_ioremapfree

hch originally submitted this for paravirt ops work, airlied took it
and cleaned up a lot of unused code caused by using this.

Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]>
Signed-off-by: Dave Airlie <[EMAIL PROTECTED]>

commit b9094d3aaa9550e740b6fd12b68f485d9979ce27
Author: Dave Airlie <[EMAIL PROTECTED]>
Date:   Mon Jan 8 21:31:13 2007 +1100

i810/i830: use drm_core_ioremap instead of drm_ioremap

This makes the i810/i830 use the drm_core_ioremap functions.

Signed-off-by: Dave Airlie <[EMAIL PROTECTED]>

commit f239b7b0cac0682d582949087710a9663b1300d5
Author: Thomas Hellstrom 
Date:   Mon Jan 8 21:22:50 2007 +1100

drm: use vmalloc_user instead of vmalloc_32 for DRM_SHM

Signed-off-by: Dave Airlie <[EMAIL PROTECTED]>

commit 9b8d9d0e0181286c0608e6426da1eac45463ecd2
Author: Thomas Hellstrom 
Date:   Mon Jan 8 21:21:41 2007 +1100

via: allow for npot texture pitch alignment

Signed-off-by: Dave Airlie <[EMAIL PROTECTED]>

commit 689692e73ea4b95c9fa5d5913eade33147db2e5a
Author: Thomas Hellstrom 
Date:   Mon Jan 8 21:19:57 2007 +1100

via: add some new chipsets

Disable 3D functionality and AGP DMA for chipsets with the DX9 3D engine.

Signed-off-by: Dave Airlie <[EMAIL PROTECTED]>

commit 76f625511e61f9d5561885c77d2ff1436ed83797
Author: Thomas Hellstrom 
Date:   Mon Jan 8 21:03:23 2007 +1100

via: some PCI posting flushes

Signed-off-by: Dave Airlie <[EMAIL PROTECTED]>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: dd

2007-02-07 Thread Andrew Morton
On Thu, 8 Feb 2007 06:24:40 +0100 Oleg Verych <[EMAIL PROTECTED]> wrote:

> If that matter, `type -path' is bashizm (BloAted SHell), and "blackbox"
> with "dash" (very good `sh' equivalents) will fail.

Does the kernel presently build with that shell?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


dd

2007-02-07 Thread Oleg Verych
Hallo.

search-a-little-harder-for-mkimage.patch

--
Subject: search a little harder for mkimage
From: "Mike Frysinger" <[EMAIL PROTECTED]>

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

Why this can't be done by

  PATH=$CROSS_COMPILE:$PATH

in your environment?

> 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.

If that matter, `type -path' is bashizm (BloAted SHell), and "blackbox"
with "dash" (very good `sh' equivalents) will fail. I would recomend to
use "which" command (btw, Debian has `sh' version of it), if you
concerned about size and performance.

Nack + proposition to move from `bash' to `sh'.

-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


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] pata_acpi: take two

2007-02-07 Thread Robert Hancock

Alan wrote:

--- linux.vanilla-2.6.20-rc6-mm3/drivers/ata/pata_amd.c 2007-01-31 
14:20:10.0 +
+++ linux-2.6.20-rc6-mm3/drivers/ata/pata_amd.c 2007-02-06 17:04:19.0 
+
@@ -642,6 +642,11 @@
if (type == 1 && rev > 0x7)
type = 2;
 
+#if defined(CONFIG_ATA_ACPI)

+   /* Prefer the ACPI driver for Nvidia hardware */
+   if (pdev->vendor == PCI_VENDOR_ID_NVIDIA && ata_pata_acpi_present(pdev))
+   return -ENODEV;
+#endif 
/* Check for AMD7411 */
if (type == 3)
/* FIFO is broken */


Problem with this approach is it may break distro/initrd setups since 
the pata_amd driver appears to be the one that "should" work based on 
the PCI ID, so the initrd would end up containing only this driver, 
which will fail out with -ENODEV and cause a boot failure. If the root 
filesystem was on a disk driven by this controller, the mkinitrd stuff 
would have to "know" that it should also try loading pata_acpi.


Unless there are some Nvidia boxes out there which don't provide 
_GTM/_STM ACPI methods (which seems a bit unlikely given Allen Martin's 
comments) then we could potentially move the Nvidia PATA PCI IDs into 
the pata_acpi driver, at least if ACPI is enabled in the kernel build..


--
Robert Hancock  Saskatoon, SK, Canada
To email, remove "nospam" from [EMAIL PROTECTED]
Home Page: http://www.roberthancock.com/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: PROBLEM: sata timeouts with intel 82801HB on amd64

2007-02-07 Thread Robert Hancock

Paolo Ornati wrote:

If mounting XFS with "nobarrier" fixes the problem it seems that more
than one Seagate disk cannot handle the Cache Flush command while other
commands are in fly...


It's not allowed to overlap NCQ (FPDMA read/write) commands with any 
other commands such as cache flushes. libata core guarantees that this 
doesn't happen by deferring such requests until the FPDMA commands are 
complete. (At least, it's supposed to..)


--
Robert Hancock  Saskatoon, SK, Canada
To email, remove "nospam" from [EMAIL PROTECTED]
Home Page: http://www.roberthancock.com/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.20 BUG: soft lockup detected on CPU#0!

2007-02-07 Thread Andrew Morton
On Thu, 8 Feb 2007 00:02:10 +0100 (CET) Lukasz Trabinski <[EMAIL PROTECTED]> 
wrote:

> Hello
> 
> On 2.6.19 I had about 60 days uptime, on 2.6.20 2 days :(
> 

Did the machine actually fail?  Or did it just print these messages and
keep going?


> 
> oceanic:~$ uname -a
> Linux oceanic.wsisiz.edu.pl 2.6.20-oceanic #2 SMP Sun Feb 4 21:55:29 CET 
> 2007 x86_64 x86_64 x86_64 GNU/Linux
> 
> Feb  7 22:46:00 oceanic kernel: BUG: soft lockup detected on CPU#0! 
> Feb  7 22:46:00 oceanic kernel: 
> Feb  7 22:46:00 oceanic kernel: Call Trace: 
> Feb  7 22:46:00 oceanic kernel:[] 
> softlockup_tick+0xdb/0xed 
> Feb  7 22:46:00 oceanic kernel:  [] __do_softirq+0x55/0xc4 
> Feb  7 22:46:00 oceanic kernel:  [] 
> update_process_times+0x42/0x68 
> Feb  7 22:46:00 oceanic kernel:  [] 
> smp_local_timer_interrupt+0x34/0x55 
> Feb  7 22:46:00 oceanic kernel:  [] 
> smp_apic_timer_interrupt+0x51/0x68 
> Feb  7 22:46:00 oceanic kernel:  [] 
> apic_timer_interrupt+0x66/0x70 
> Feb  7 22:46:00 oceanic kernel:[] 
> _spin_unlock_irqrestore+0x8/0x9 
> Feb  7 22:46:00 oceanic kernel:  [] 
> _spin_unlock_irqrestore+0x8/0x9 
> Feb  7 22:46:00 oceanic kernel:  [] 
> hrtimer_try_to_cancel+0x4a/0x53 
> Feb  7 22:46:00 oceanic kernel:  [] hrtimer_cancel+0xc/0x16 
> Feb  7 22:46:00 oceanic kernel:  [] hrtimer_cancel+0xc/0x16 
> Feb  7 22:46:00 oceanic kernel:  [] do_exit+0x1c8/0x800 
> Feb  7 22:46:00 oceanic kernel:  [] sys_exit_group+0x0/0xe 
> Feb  7 22:46:00 oceanic kernel:  [] tracesys+0xdc/0xe1 
> Feb  7 22:46:00 oceanic kernel: 
> Feb  7 22:46:00 oceanic kernel: BUG: soft lockup detected on CPU#1! 
> Feb  7 22:46:00 oceanic kernel: 
> Feb  7 22:46:00 oceanic kernel: Call Trace: 
> Feb  7 22:46:00 oceanic kernel:[] 
> softlockup_tick+0xdb/0xed 
> Feb  7 22:46:00 oceanic kernel:  [] 
> update_process_times+0x42/0x68 
> Feb  7 22:46:00 oceanic kernel:  [] 
> smp_local_timer_interrupt+0x34/0x55 
> Feb  7 22:46:00 oceanic kernel:  [] 
> smp_apic_timer_interrupt+0x51/0x68 
> Feb  7 22:46:00 oceanic kernel:  [] 
> __group_send_sig_info+0x35/0x8b 
> Feb  7 22:46:00 oceanic kernel:  [] it_real_fn+0x0/0x4f 
> Feb  7 22:46:00 oceanic kernel:  [] 
> apic_timer_interrupt+0x66/0x70 
> Feb  7 22:46:00 oceanic kernel:  [] 
> flat_send_IPI_mask+0x0/0x3d 
> Feb  7 22:46:00 oceanic kernel:  [] 
> hrtimer_run_queues+0x105/0x164 
> Feb  7 22:46:00 oceanic kernel:  [] 
> run_timer_softirq+0x21/0x19f 
> Feb  7 22:46:00 oceanic kernel:  [] 
> tasklet_action+0x53/0x9d 
> Feb  7 22:46:00 oceanic kernel:  [] __do_softirq+0x55/0xc4 
> Feb  7 22:46:00 oceanic kernel:  [] call_softirq+0x1c/0x28 
> Feb  7 22:46:00 oceanic kernel:  [] do_softirq+0x2c/0x7d 
> Feb  7 22:46:00 oceanic kernel:  [] 
> smp_apic_timer_interrupt+0x56/0x68 
> Feb  7 22:46:00 oceanic kernel:  [] default_idle+0x0/0x3d 
> Feb  7 22:46:00 oceanic kernel:  [] 
> apic_timer_interrupt+0x66/0x70 
> Feb  7 22:46:00 oceanic kernel:[] 
> default_idle+0x29/0x3d 
> Feb  7 22:46:00 oceanic kernel:  [] cpu_idle+0x52/0x71 
> Feb  7 22:46:00 oceanic kernel:  [] 
> start_secondary+0x465/0x474
> 

The softlock detector has a long history of false positives and precious
few true positives, in my experience.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Re : Re : [PATCH] Compressed ia32 ELF file generation for loading by Gujin 1/3

2007-02-07 Thread Vivek Goyal
On Wed, Feb 07, 2007 at 02:55:39PM +, Etienne Lorrain wrote:
> Vivek Goyal wrote:
> >How do I know which program header is real mode code and the boot loader
> > is not supposed to load it? May be PT_LOAD header with physical addr 0?
> > What happens if changes happen and down the line we start compiling 
> > real mode code for non-zero address?
> 
>  Yes, any PT_LOAD below 64 Kbytes can only be real mode, and real-mode
> cannot be loaded higher, and cannot be bigger than 640 Kbytes, anything
> different (like with virtual address at 0xC000) is Linux protected mode.
> Considering the linker used it is always the 4th program header, before there
> were only 3 program header,third one stay the NOTE one.
> 

Well this is all a lot of speculation. This is not standard way of retrieving
information from ELF. Number of program headers finally created keep on
changing. Previously it was left to the linker and now people have changed
it to 3 by specifically using PHDR directive.
  
> > Hence I think keeping real mode code out of vmlinux might prove to be a 
> > good idea.
> 
>  Well, ELF is a format made to describe what to load, at which addres, and I 
> assume
> everyone recognise that some ELF section shall not be loaded, like the debug 
> information.
> Gujin accepts having the real-mode treated like a program text and so in the 
> program header,
> or like extra memory block with content like the symbol table used by a 
> debugger, I do not
> know what is best so have implemented the two.
> 
> > Secondly, if you compile real mode code with vmlinux, what would be the
> > entry point for this ELF file? Real mode entry? Then I have not way to
> > find out from ELF headers where is the protected mode entry point and
> > I can not do use this vmlinux with kexec/kdump.
> 
>  I did not touch the kernel entry point, the real mode entry point is at 
> offset zero
> in the real-mode program header/section table.
> 
> > OTOH, now bzImage is relocatable. Is this image going to be relocatable?
> > How do we take care of that?
> 
>  Just I did not completely understand why you need relocation (and the 
> announce
> was when I was in holidays far away). I know a simple kernel is needed to do
> some debugging when the main kernel has crashed, this kernel is better loaded
> at for instance 16 Mbytes. You probably do not want the same kernel as the 
> main
> one because it may crash the same way, and you start a loop - and even then
> if you have exactly the same kernel it is easier to use the same 
> write-protected
> block of memory with different data sections.
>  But I probably do not understand the problem so do not know what to write.
> 

As long as one can make sure that test kernel boots (commonly the case with
distros), same kernel can be used as capture kernel too. So the idea here
is to be able to use same kernel binary as production kernel and capture
kernel hence distros don't have to ship an additional kernel binary compiled
for a different physical addr just for dump capturing purposes.

Currently relocation information is extracted from vmlinux and packed in
final bzImage after some processing. After execution of real mode code
and once the image is decompressed, all the relocations are performed and
then control is transferred to kernel.

Thanks
Vivek
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [BUG?] ata disk running maximum at DMA33 with 2.6.20 and new pata driver, NV CK804 ide controller.

2007-02-07 Thread Robert Hancock

Alan wrote:

On Wed, 7 Feb 2007 01:19:36 +0100
Luigi Genoni <[EMAIL PROTECTED]> wrote:


Hi,
since upgrading to kernel 2.6.20 my pata disk, using new pata driver, is
initialized maximum  in DMA33 mode (and obviously performances drop 
consequently), as you can see from:


Interesting.


Willing to test any patch.


Firstly can you see if its consistently the case that booting 2.6.20
gives UDMA33 and 2.6.19 UDMA100 over a few reboots. If it is please drop
the 2.6.19 drivers/ata/pamd_amd into 2.6.20 and try that.


As an aside to this sort of problem, shouldn't we print some kind of 
loud message in dmesg when we force a high-UDMA-capable device down to 
UDMA33 due to a 40-wire cable detection? In the case where it truly is a 
40-wire cable the user may want to know that and replace the cable, if 
it isn't it gives more of a hint of why the drive isn't running at full 
speed..


--
Robert Hancock  Saskatoon, SK, Canada
To email, remove "nospam" from [EMAIL PROTECTED]
Home Page: http://www.roberthancock.com/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/3, try #4] Blackfin: serial driver for Blackfin architecture against Linux kernel 2.6.20

2007-02-07 Thread Wu, Bryan
Hi forks,

Aubrey update the patch according to Russell's review. Thanks Russell
Here is the change log:

a) arrange the driver to reflect the real settings in the termios
b) don't use __builtin_bfin_ssync(), directly use SSYNC() instead

Signed-off-by: Bryan Wu <[EMAIL PROTECTED]>
Reviewed-by: Alan Cox <[EMAIL PROTECTED]>
Reviewed-by: Russell King <[EMAIL PROTECTED]>
---
drivers/serial/Kconfig  |   94 
drivers/serial/Makefile |1
drivers/serial/bfin_5xx.c   |  997 
include/linux/serial_core.h |3
4 files changed, 1095 insertions(+)
Index: linux-2.6/drivers/serial/Kconfig 
===
--- linux-2.6.orig/drivers/serial/Kconfig   2007-02-08 11:30:35.0 
+0800
+++ linux-2.6/drivers/serial/Kconfig2007-02-08 12:02:42.0 +0800
@@ -498,6 +498,100 @@
  your boot loader (lilo or loadlin) about how to pass options to the
  kernel at boot time.)
 
+config SERIAL_BFIN
+   tristate "Blackfin serial port support (EXPERIMENTAL)"
+   depends on BFIN && EXPERIMENTAL
+   select SERIAL_CORE
+   select SERIAL_BFIN_UART0 if (BF531 || BF532 || BF533 || BF561)
+   help
+ Add support for the built-in UARTs on the Blackfin.
+
+ To compile this driver as a module, choose M here: the
+ module will be called bfin_5xx.
+
+config SERIAL_BFIN_CONSOLE
+   bool "Console on Blackfin serial port"
+   depends on SERIAL_BFIN
+   select SERIAL_CORE_CONSOLE
+
+choice
+   prompt  "Blackfin UART Mode"
+   depends on SERIAL_BFIN
+   default SERIAL_BFIN_DMA
+   help
+ This driver supports the built-in serial ports of the Blackfin family
+ of CPUs
+
+config SERIAL_BFIN_DMA
+   bool "Blackfin UART DMA mode"
+   depends on DMA_UNCACHED_1M
+   help
+ This driver works under DMA mode. If this option is selected, the
+ blackfin simple dma driver is also enabled.
+
+config SERIAL_BFIN_PIO
+   bool "Blackfin UART PIO mode"
+   help
+ This driver works under PIO mode.
+
+endchoice
+
+config SERIAL_BFIN_UART0
+   bool "Enable UART0"
+   depends on SERIAL_BFIN
+   help
+ Enable UART0
+
+config BFIN_UART0_CTSRTS
+   bool "Enable UART0 hardware flow control"
+   depends on SERIAL_BFIN_UART0
+   help
+ Enable hardware flow control in the driver. Using GPIO emulate the 
CTS/RTS
+ signal.
+
+config UART0_CTS_PIN
+   int "UART0 CTS pin"
+   depends on BFIN_UART0_CTSRTS
+   default 23
+   help
+ The default pin is GPIO_GP7.
+ Refer to ./include/asm-blackfin/gpio.h to see the GPIO map.
+
+config UART0_RTS_PIN
+   int "UART0 RTS pin"
+   depends on BFIN_UART0_CTSRTS
+   default 22
+   help
+ The default pin is GPIO_GP6.
+ Refer to ./include/asm-blackfin/gpio.h to see the GPIO map.
+
+config SERIAL_BFIN_UART1
+   bool "Enable UART1"
+   depends on SERIAL_BFIN && BF537
+   help
+ Enable UART1
+
+config BFIN_UART1_CTSRTS
+   bool "Enable UART1 hardware flow control"
+   depends on SERIAL_BFIN_UART1
+   help
+ Enable hardware flow control in the driver. Using GPIO emulate the 
CTS/RTS
+ signal.
+
+config UART1_CTS_PIN
+   int "UART1 CTS pin"
+   depends on BFIN_UART1_CTSRTS
+   default -1
+   help
+ Refer to ./include/asm-blackfin/gpio.h to see the GPIO map.
+
+config UART1_RTS_PIN
+   int "UART1 RTS pin"
+   depends on BFIN_UART1_CTSRTS
+   default -1
+   help
+ Refer to ./include/asm-blackfin/gpio.h to see the GPIO map.
+
 config SERIAL_IMX
bool "IMX serial port support"
depends on ARM && ARCH_IMX
Index: linux-2.6/drivers/serial/Makefile
===
--- linux-2.6.orig/drivers/serial/Makefile  2007-02-08 11:30:35.0 
+0800
+++ linux-2.6/drivers/serial/Makefile   2007-02-08 12:02:42.0 +0800
@@ -26,6 +26,7 @@
 obj-$(CONFIG_SERIAL_CLPS711X) += clps711x.o
 obj-$(CONFIG_SERIAL_PXA) += pxa.o
 obj-$(CONFIG_SERIAL_SA1100) += sa1100.o
+obj-$(CONFIG_SERIAL_BFIN) += bfin_5xx.o
 obj-$(CONFIG_SERIAL_S3C2410) += s3c2410.o
 obj-$(CONFIG_SERIAL_SUNCORE) += suncore.o
 obj-$(CONFIG_SERIAL_SUNHV) += sunhv.o
Index: linux-2.6/drivers/serial/bfin_5xx.c
===
--- /dev/null   1970-01-01 00:00:00.0 +
+++ linux-2.6/drivers/serial/bfin_5xx.c 2007-02-08 12:04:36.0 +0800
@@ -0,0 +1,997 @@
+/*
+ * File: drivers/serial/bfin_5xx.c
+ * Based on: Based on drivers/serial/sa1100.c
+ * Author:   Aubrey Li <[EMAIL PROTECTED]>
+ *
+ * Created:
+ * Description:  Driver for blackfin 5xx serial ports
+ *
+ * Rev:  $Id: bfin_5xx.c,v 1.19 2006/09/24 02:33:53 aubrey Exp $
+ *
+ * Modified:
+ *   Copyright 2006 Analog 

Re: [PATCH] fix cc-option-yn whitespace

2007-02-07 Thread Linus Torvalds


On Wed, 7 Feb 2007, Roland McGrath wrote:

> This change:
> 
>   commit 5de043f4bd11a9e0a3e8daec7d1905da575a76b7
>   Author: Oleg Verych <[EMAIL PROTECTED]>
>   Date:   Tue Feb 6 02:18:21 2007 +0100
> 
>   [PATCH] kbuild: improve option checking, Kbuild.include cleanup
> 
> introduced leading whitespace in the results of cc-option-yn and such.
> This breaks some of their uses, like HAS_MTUNE in arch/i386/Makefile.cpu.

Yes.. It doesn't seem to happen with make-3.81, for some reason, and I 
don't see why the leading space happens. Maybe somebody with deep GNU make 
knowledge knows.

I committed the hopefully equivalent patch (that also removes the 
symlinking to /dev/null that Roman objected to).

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] sk98lin: planned removal

2007-02-07 Thread Andrew Morton
On Wed, 7 Feb 2007 09:18:30 -0800 Stephen Hemminger <[EMAIL PROTECTED]> wrote:

> Document planned removal of sk98lin driver.
> 
> Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>
> ---
>  Documentation/feature-removal-schedule.txt |7 +++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/Documentation/feature-removal-schedule.txt 
> b/Documentation/feature-removal-schedule.txt
> index 0ba6af0..d08a4af 100644
> --- a/Documentation/feature-removal-schedule.txt
> +++ b/Documentation/feature-removal-schedule.txt
> @@ -325,3 +325,10 @@ Why: Unmaintained for years, superceded 
>  Who: Jeff Garzik <[EMAIL PROTECTED]>
>  
>  ---
> +
> +What:   sk98lin network driver
> +When:   July 2007
> +Why:In kernel tree version of driver is unmaintained. Sk98lin driver
> + replaced by the skge driver. 
> +Who:Stephen Hemminger <[EMAIL PROTECTED]>
> +

People don't read that file.  I'd suggest the addition of a warning printk
to the driver's open() method.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch, fix build regression] kbuild: Kbuild.include avoid using spaces in call arguments

2007-02-07 Thread Andrew Morton
On Wed, 7 Feb 2007 15:52:54 -0800 (PST) Linus Torvalds <[EMAIL PROTECTED]> 
wrote:

> On Thu, 8 Feb 2007, Roman Zippel wrote:
> > 
> > Sorry, it needs more changes, the patch simply wasn't ready.
> 
> One problem I find very problematic with all the Kbuild setup is that 
> people tend to be very quiet about any build issues until they simply go 
> in.
> 
> Things don't "get ready" on their own. In other areas, people comment on 
> why they don't like patches. In Kbuild, for some reason, we often seem to 
> have this situation where people don't react at all.
> 
> Sam is great about maintaining the kernel build stuff most of the time, 
> but because it's clearly a "secondary" thing, there tends to be some 
> periods when nothing happens. Which is problematic for me..
> 
> So I end up in a situation where I just basically will apply the patches 
> just becauseif I don't, nothing ever happens. The good news is that _once_ 
> I apply them, people will usually notice problems and send in fixes fairly 
> quickly. But this particular email was NOT useful, for example.  "needs 
> more changes" is the epitome of a "not useful" comment.

Yes, kbuild is a bit of a problem at present.

I'm sitting on these:

search-a-little-harder-for-mkimage.patch
make-mkcompile_h-use-lang=c-and-lc_all=c-for-cc-v.patch
add-mailmap-for-proper-git-shortlog-output.patch
qconf-immediately-update-integer-and-string-values-in-xconfig-display-take-2.patch
qconf-relocate-search-command.patch
qconf-fix-showing-help-info-on-failed-search.patch
qconf-back-button-behaviour-normalization.patch
kbuild-remove-references-to-deprecated-prepare-all-target.patch
new-toplevel-target-headers_check_all.patch

But I'm not sure that anyone has reviewed them much.

I'll probably just push 'em and see what happens.  They seem to work.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [GIT PATCH] ACPI patches for 2.6.21

2007-02-07 Thread Len Brown
On Wednesday 07 February 2007 16:55, Al Boldi wrote:
> Len Brown wrote:
> > ACPICA Core version 2070126 simplifies the ACPI table manager
> > code by consolidating multiple table definitions into one.
> > It also saves memory by mapping the tables where the BIOS provides them
> > rather than copying them into the kernel.
> 
> Thanks for the update, but does it fix the ISA VGA STR-regression in 2.6.20?

Unlikely.
But I'm not aware of an ISA VGA STR-regression in 2.6.20, so I can't really say.
In general, VGA STR issues are related to the BIOS and video drivers
and have nothing to do with ACPI support itself.

> Also, is there some dependency that requires a display card to be present for 
> STR to work?

ACPI doesn't care if you have VGA or not.

-Len
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [GIT PATCH] PCI patches for 2.6.20

2007-02-07 Thread Greg KH
On Wed, Feb 07, 2007 at 10:17:12PM -0500, Jeff Garzik wrote:
> Greg KH wrote:
> >Greg Kroah-Hartman (3):
> >  PCI: remove duplicate device id from ata_piix
> >  PCI: remove duplicate device id from ipr
> >  Revert "PCI: remove duplicate device id from ata_piix"
> 
> 
> If these are coming out of quilt, why add these commit-then-revert 
> changesets at all?

I commited them all out of quilt, and then realized that I had applied
one in the middle that I shouldn't have.  So I then used git to just
revert it.

Sorry for the confusion.

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [IA64] Include kexec.h in arch/ia64/kernel/process.c

2007-02-07 Thread Randy Dunlap
On Thu, 8 Feb 2007 11:19:03 +0900 Horms wrote:

> On Wed, Feb 07, 2007 at 09:07:40AM -0800, Luck, Tony wrote:
> > > kexec.h is needed by arch/ia64/kernel/process.c so for the
> > > declaration of kexec_disable_iosapic() which is used in
> > > machine_shutdown().
> > 
> > > +#include 
> > 
> > I merged this into your earlier change (moving machine_shutdown() into
> > process.c).  Linus pulled it last night.
> 
> Thanks
> 
> > I also added a "#ifdef CONFIG_KEXEC" around the call to
> > kexec_disable_iosapic() (because I first noticed that this was
> > undefined when building non-KEXEC kernels).  But perhaps it might have
> > been better to #define an empty stub for this function inside kexec.h
> > for the #ifndef CONFIG_KEXEC case?
> 
> Good catch :)

uh, every one of Andrew's commit emails now contains the line
at the end of my mail sig...  Try it sometimes^W often.


> I think that #define in the process.c vs an empty stub inside
> asm/kexec.h is really a style issue. I'm quite ok with things
> the way they are. But If you are more comfortable with the stub
> approach, I have no objections.


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] fix cc-option-yn whitespace

2007-02-07 Thread Roland McGrath
This change:

commit 5de043f4bd11a9e0a3e8daec7d1905da575a76b7
Author: Oleg Verych <[EMAIL PROTECTED]>
Date:   Tue Feb 6 02:18:21 2007 +0100

[PATCH] kbuild: improve option checking, Kbuild.include cleanup

introduced leading whitespace in the results of cc-option-yn and such.
This breaks some of their uses, like HAS_MTUNE in arch/i386/Makefile.cpu.

This patch fixes the regression.

Signed-off-by: Roland McGrath <[EMAIL PROTECTED]>
---
 scripts/Kbuild.include |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index 96926eb..931d52f 100644  
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -60,6 +60,7 @@ endef
 # Usage: option = $(call checker-shell, $(CC)...-o $$OUT, option-ok, otherwise)
 # Exit code chooses option. $$OUT is safe location for needless output.
 define checker-shell
+$(strip \
   $(shell set -e; \
 DIR=$(KBUILD_EXTMOD); \
 cd $${DIR:-$(objtree)}; \
@@ -70,7 +71,7 @@ define checker-shell
   then echo "$(2)"; \
   else echo "$(3)"; \
 fi; \
-rm -f $$OUT)
+rm -f $$OUT))
 endef
 
 # as-option
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.

2007-02-07 Thread Linus Torvalds


On Wed, 7 Feb 2007, Trond Myklebust wrote:
>
> The latest pull from the git tree spews out a torrent of the above
> warning on a recent Fedora Core 6 machine running gcc-4.1.1. config file
> is attached...

Should hopefully be fixed already in current -git

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [GIT PATCH] PCI patches for 2.6.20

2007-02-07 Thread Jeff Garzik

Greg KH wrote:

Greg Kroah-Hartman (3):
  PCI: remove duplicate device id from ata_piix
  PCI: remove duplicate device id from ipr
  Revert "PCI: remove duplicate device id from ata_piix"



If these are coming out of quilt, why add these commit-then-revert 
changesets at all?


Jeff


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [IA64] Include kexec.h in arch/ia64/kernel/process.c

2007-02-07 Thread Horms
On Wed, Feb 07, 2007 at 09:07:40AM -0800, Luck, Tony wrote:
> > kexec.h is needed by arch/ia64/kernel/process.c so for the
> > declaration of kexec_disable_iosapic() which is used in
> > machine_shutdown().
> 
> > +#include 
> 
> I merged this into your earlier change (moving machine_shutdown() into
> process.c).  Linus pulled it last night.

Thanks

> I also added a "#ifdef CONFIG_KEXEC" around the call to
> kexec_disable_iosapic() (because I first noticed that this was
> undefined when building non-KEXEC kernels).  But perhaps it might have
> been better to #define an empty stub for this function inside kexec.h
> for the #ifndef CONFIG_KEXEC case?

Good catch :)

I think that #define in the process.c vs an empty stub inside
asm/kexec.h is really a style issue. I'm quite ok with things
the way they are. But If you are more comfortable with the stub
approach, I have no objections.

-- 
Horms
  H: http://www.vergenet.net/~horms/
  W: http://www.valinux.co.jp/en/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 3/6] workqueue: make cancel_rearming_delayed_workqueue() work on idle dwork

2007-02-07 Thread Horms
On Wed, Feb 07, 2007 at 08:43:55PM +0300, Oleg Nesterov wrote:
> On 02/07, Oleg Nesterov wrote:
> > 
> > The following code
> > 
> > schedule_delayed_work(dw);
> > cancel_rearming_delayed_workqueue(dw);  // OK
> > cancel_rearming_delayed_workqueue(dw);  // HANGS!
> > 
> > still doesn't work.
> 
> I think we have another problem with delayed_works.
> 
> cancel_rearming_delayed_workqueue() doesn't garantee that the ->func() is not
> running upon return. I don't know if it is bug or not, the comment says 
> nothing
> about that.
> 
> However, we have the callers which seem to assume the opposite, example
> 
>   net/ipv4/ipvs/ip_vs_core.c
> 
>   module_exit
>   ip_vs_cleanup
>   ip_vs_control_cleanup
>   cancel_rearming_delayed_work
>   // done
> 
> This is unsafe. The module may be unloaded and the memory may be freed
> while defense_work_handler() is still running/preempted.
> 
> Unless I missed something, which side should be fixed?

Assuming the decision is to fix the ipvs side, is the fix
just to remove the call to cancel_rearming_delayed_work() in
ip_vs_control_cleanup() ?

-- 
Horms
  H: http://www.vergenet.net/~horms/
  W: http://www.valinux.co.jp/en/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Git backlight subsystem tree

2007-02-07 Thread Andrew Morton
On Thu, 08 Feb 2007 02:30:26 + Richard Purdie <[EMAIL PROTECTED]> wrote:

> I'm thinking of more officially volunteering to maintain the Linux
> backlight class/subsystem and have been trying to sort out the various
> pending patches. I've made a backlight tree available as:
> 
> http://git.o-hand.com/?p=linux-rpurdie-backlight;a=shortlog;h=for-mm
> 
> (or git://git.o-hand.com/linux-rpurdie-backlight)
> 
> This has a for-mm branch containing the backlight patches I've sorted
> out so far. I still have some others left to deal with which are
> probably more invasive and will need discussion and testing which I'll
> send some mails about soon.

No probs,  I added git://git.o-hand.com/linux-rpurdie-backlight#for-mm to
-mm as git-backlight.patch.

> I'm planning to setup an LED drivers/class tree too, I have a couple of
> pending patches for that.

ooh, patches!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH 1/5] scsi: megaraid_sas - stop cmd processing if hw_crit_error is set

2007-02-07 Thread Patro, Sumant
I will correct the formatting and will resubmit.

Regards,
Sumant 

-Original Message-
From: Andrew Morton [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 07, 2007 1:18 PM
To: Patro, Sumant
Cc: [EMAIL PROTECTED]; linux-scsi@vger.kernel.org;
linux-kernel@vger.kernel.org; Kolli, Neela; Yang, Bo; Patro, Sumant
Subject: Re: [PATCH 1/5] scsi: megaraid_sas - stop cmd processing if
hw_crit_error is set

On Tue, 06 Feb 2007 13:49:24 -0800
Sumant Patro <[EMAIL PROTECTED]> wrote:

> + /* Don't process if we have already declared adapter dead */
> + if(instance->hw_crit_error)

Preferred kernel coding style is "if (".

> [p1-crit_err.patch  text/x-patch (1.3KB)]

argh.  Please don't send two copies of the patch in the email.  Because
the result applies happily with `patch --dry-run' and then creates a
great mess when you try to apply the patch for real.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH 4/5] scsi: megaraid_sas - preallocate memory for ioctlprocessing

2007-02-07 Thread Patro, Sumant
Thanks.
I will resubmit the patch.

Regards,
Sumant 

-Original Message-
From: James Bottomley [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 07, 2007 2:02 PM
To: Andrew Morton
Cc: Patro, Sumant; linux-scsi@vger.kernel.org;
linux-kernel@vger.kernel.org; Kolli, Neela; Yang, Bo; Patro, Sumant
Subject: Re: [PATCH 4/5] scsi: megaraid_sas - preallocate memory for
ioctlprocessing

On Wed, 2007-02-07 at 13:30 -0800, Andrew Morton wrote:
> I suspect all this horror is due to stupidity in the DMA API.
> 
> pci_alloc_consistent() just goes and assumes GFP_ATOMIC, whereas the 
> caller (megasas_mgmt_fw_ioctl) would have been perfectly happy to use 
> GFP_KERNEL.
> 
> I bet this fixes it

It does, but the DMA API was expanded to cope with this exact case, so
use dma_alloc_coherent() directly in the megaraid code instead.  The dev
is just _dev->dev.

James


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: discussion of Kbuild fixes (kbuild: Kbuild.include avoid using spaces in call arguments)

2007-02-07 Thread Oleg Verych
On Thu, Feb 08, 2007 at 03:05:41AM +0100, Roman Zippel wrote:
> Hi,
> 
> On Thu, 8 Feb 2007, Oleg Verych wrote:
> 
> > -- `find | sort' in localversion (i insist on split between paths and
> > files)
> 
> make has dedicated functions for this.

I think, "make" (even whatever shiny new) that particular problem can't
handle. Regexp on *file name* is needed, while PATH must be untouched.
That what i meant with spliting tasks. Stripping strings of wildcards
by "make dedicated functions" is ugly, IMHO. 

Also, what do you think, if someone (very unlikely) will add port of build
system to something different? Clear logic for a "rule" is there, one can
easily make whole `include/config/kernel.release' with that.

> > -- symlinks to /dev/null in option checking -- isn't it better to not
> >have any (though cached) access to files on filesystem, instead of to
> >/dev/null? cont.:
> 
> symlinks are not much else than special files.

IMHO, cheap I/O. Yes, that isn't a big benefit, but i don't see anything
against, except, probably, filesystems without support of symlinks.

> > I wish to have more people to work on this (even with just comments),
> > because "Kbuild.include" was only first step to reduce bloated top
> > Makefile. Since then, it seems, Sam have more important things to do.
> 
> The problem is that you mix multiple changes into a single patch,

Yes, from whitespace-issue point of view, that was a huge change (:,

> but since kbuild is very central part that puts everything together,

and patch set didn't make a single release of -mm tree (:

> I don't think it's bad idea to be more conservative, especially if you
> just start to work on it.

 alone. I think it will be OK, Linus is with us!


Thanks, Roman.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Atmel SPI controller driver

2007-02-07 Thread David Brownell
On Wednesday 07 February 2007 8:15 am, Haavard Skinnemoen wrote:
> Driver for the Atmel on-chip SPI master controller.
> 
> Tested primarily on AVR32/AT32AP7000/ATSTK1000 using mtd_dataflash and
> the jffs2 filesystem.

Call me paranoid, but until such controller drivers can withstand
loads placed by filesystems I have a hard time trusting them!  ;)

Various drivers using smaller transfers (control for LCD or audio DAC,
sensors, EEPROM access) have also been reported to work.


> Should also work fine on various AT91 ARM-based 
> chips like AT91SAM926x.

And answering a question we had:  I did get confirmation from one person,
saying that they'd used a previous version of this driver on at91rm9200
with success.

I think that answers Andrew Victor's basic question about whether the
"legacy" at91 SPI driver is ready to go away ... the main unresolved
issue being a replacement for that old userspace interface.  (And that
issue is nearly resolved too.)


> Hardware documentation can be found in the AT32AP7000 data sheet,
> 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]>


> ---
> Note that this driver depends on the arch-neutral GPIO API patches
> currently in -mm.

So this should follow the merge of the AVR32 architecture updates, and
the AT91 GPIO patch, to prevent creation of configs that won't build.

ISTR that AT91 also needs some arch updates to make it _run_ properly
(to use the same board init conventions), but IMO this can merge before
those if that simplifies the process.  (That is, no need to wait for
AT91 patches to go from Andrew to Russell to Linus first.)

Thanks for making this driver happen!

- Dave

 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [autofs] Bad race condition in the new autofs protocol somewhere

2007-02-07 Thread Ian Kent
On Wed, 2007-02-07 at 19:18 +0100, Olivier Galibert wrote:
> On Thu, Feb 08, 2007 at 03:07:41AM +0900, Ian Kent wrote:
> > It may be better to update to a later kernel so I don't have to port the
> > patch to several different kernels. Is that possible?
> 
> Sure, 2.6.20 or -git?

2.6.20 has all the patches I've proposed so far except for the one we're
working on so that would be best for me.

Seems there may still be a problem with the patch so I'll let you know
what's happening as soon as I can.

Ian


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Git backlight subsystem tree

2007-02-07 Thread Richard Purdie
I'm thinking of more officially volunteering to maintain the Linux
backlight class/subsystem and have been trying to sort out the various
pending patches. I've made a backlight tree available as:

http://git.o-hand.com/?p=linux-rpurdie-backlight;a=shortlog;h=for-mm

(or git://git.o-hand.com/linux-rpurdie-backlight)

This has a for-mm branch containing the backlight patches I've sorted
out so far. I still have some others left to deal with which are
probably more invasive and will need discussion and testing which I'll
send some mails about soon.

I'm planning to setup an LED drivers/class tree too, I have a couple of
pending patches for that.

Cheers,

Richard



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: hdparm for lib_pata

2007-02-07 Thread Adam J. Richter
>>> = Stephen Clark
>> = Adam Richter
>  = Patrick Ale

>> Do you know if these drives were advertising less capability
>> than they were spec-ed at?  Do you recall if the IDE driver without
>> kernel arguments printed its rationale for reverting to the slower
>> setting?

[...]
>Then, after 2 hours, and resyncing RAID1 MD 1 devices, I started
>seeing things like:
>"Drive not ready"
>"DMA timeout on ..."

I was not asking about Patrick's desktop computer, which was already
established to be hardware problem that was fixed by replacing a
broken fan.  I was asking about Stephen Clark's two laptop computers,
which seemed like they might be examples of a need for user level
hdparm DMA setting, which is why I prefaced my question with the
following quotation:

>>On 2007-02-04 Stephen Clark wrote:
>>>I have had two different laptops that had to have boot time command line 
>>>overrides to get the
>>>driver to allow the hardware work at what it was spec-ed at.

Adam Richter
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.

2007-02-07 Thread Oleg Verych
> From: Trond Myklebust
> Newsgroups: gmane.linux.kernel
> Subject: `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
> Date: Wed, 07 Feb 2007 17:13:32 -0800
> Archived-At: 

Hallo, Trond.

> The latest pull from the git tree spews out a torrent of the above
> warning on a recent Fedora Core 6 machine running gcc-4.1.1. config file
> is attached...

Current situation isn't known, this change may be reverted or not, but
patch to fix this now was already posted and got to Linus.

Here it is for you. Thanks for testing.


---
 scripts/Kbuild.include |   40 
 1 file changed, 20 insertions(+), 20 deletions(-)

Index: linux-2.6.20/scripts/Kbuild.include
===
--- linux-2.6.20.orig/scripts/Kbuild.include2007-02-07 22:54:01.814467250 
+0100
+++ linux-2.6.20/scripts/Kbuild.include 2007-02-07 22:54:17.099422500 +0100
@@ -58,5 +58,5 @@ endef
 
 # checker-shell
-# Usage: option = $(call checker-shell, $(CC)...-o $$OUT, option-ok, otherwise)
+# Usage: option = $(call checker-shell,$(CC)...-o $$OUT,option-ok,otherwise)
 # Exit code chooses option. $$OUT is safe location for needless output.
 define checker-shell
@@ -75,21 +75,21 @@ endef
 
 # as-option
-# Usage: cflags-y += $(call as-option, -Wa$(comma)-isa=foo,)
-as-option = $(call checker-shell, \
-   $(CC) $(CFLAGS) $(1) -c -xassembler /dev/null -o $$OUT, $(1), $(2))
+# Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,)
+as-option = $(call checker-shell,\
+   $(CC) $(CFLAGS) $(1) -c -xassembler /dev/null -o $$OUT,$(1),$(2))
 
 # as-instr
-# Usage: cflags-y += $(call as-instr, instr, option1, option2)
-as-instr = $(call checker-shell, \
-   printf "$(1)" | $(CC) $(AFLAGS) -c -xassembler -o $$OUT -, $(2), $(3))
+# Usage: cflags-y += $(call as-instr,instr,option1,option2)
+as-instr = $(call checker-shell,\
+   printf "$(1)" | $(CC) $(AFLAGS) -c -xassembler -o $$OUT -,$(2),$(3))
 
 # cc-option
-# Usage: cflags-y += $(call cc-option, -march=winchip-c6, -march=i586)
-cc-option = $(call checker-shell, \
-   $(CC) $(CFLAGS) $(if $(3),$(3),$(1)) -S -xc /dev/null -o $$OUT, $(1), $(2))
+# Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586)
+cc-option = $(call checker-shell,\
+   $(CC) $(CFLAGS) $(if $(3),$(3),$(1)) -S -xc /dev/null -o $$OUT,$(1),$(2))
 
 # cc-option-yn
-# Usage: flag := $(call cc-option-yn, -march=winchip-c6)
-cc-option-yn = $(call cc-option, "y", "n", $(1))
+# Usage: flag := $(call cc-option-yn,-march=winchip-c6)
+cc-option-yn = $(call cc-option,"y","n",$(1))
 
 # cc-option-align
@@ -99,5 +99,5 @@ cc-option-align = $(subst -functions=0,,
 
 # cc-version
-# Usage gcc-ver := $(call cc-version, $(CC))
+# Usage gcc-ver := $(call cc-version,$(CC))
 cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC))
 
@@ -108,6 +108,6 @@ cc-ifversion = $(shell [ $(call cc-versi
 # ld-option
 # Usage: ldflags += $(call ld-option, -Wl$(comma)--hash-style=both)
-ld-option = $(call checker-shell, \
-   $(CC) $(1) -nostdlib -xc /dev/null -o $$OUT, $(1), $(2))
+ld-option = $(call checker-shell,\
+   $(CC) $(1) -nostdlib -xc /dev/null -o $$OUT,$(1),$(2))
 
 ##
@@ -121,13 +121,13 @@ build := -f $(if $(KBUILD_SRC),$(srctree
 # add original to the end
 addtree = $(if \
-   $(filter-out -I/%, $(1)), $(patsubst -I%,-I$(srctree)/%,$(1))) $(1)
+   $(filter-out -I/%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1))) $(1)
 
 # Find all -I options and call addtree
-flags = $(foreach o,$($(1)), \
-   $(if $(filter -I%,$(o)), $(call addtree, $(o)), $(o)))
+flags = $(foreach o,$($(1)),\
+   $(if $(filter -I%,$(o)),$(call addtree,$(o)),$(o)))
 
 # echo command.
 # Short version is used, if $(quiet) equals `quiet_', otherwise full one.
-echo-cmd = $(if $($(quiet)cmd_$(1)), \
+echo-cmd = $(if $($(quiet)cmd_$(1)),\
echo '  $(call escsq,$($(quiet)cmd_$(1)))$(echo-why)';)
 
@@ -136,5 +136,5 @@ cmd = @$(echo-cmd) $(cmd_$(1))
 
 # Add $(obj)/ for paths that are not absolute
-objectify = $(foreach o,$(1), $(if $(filter /%,$(o)), $(o), $(obj)/$(o)))
+objectify = $(foreach o,$(1),$(if $(filter /%,$(o)),$(o),$(obj)/$(o)))
 
 ###
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: nobh_truncate_page question

2007-02-07 Thread Andrew Morton
On Thu, 08 Feb 2007 01:45:10 +0300
Dmitriy Monakhov <[EMAIL PROTECTED]> wrote:

> Could some one please explain me what's happens with nobh_truncate_page?
> 
> int nobh_truncate_page(struct address_space *mapping, loff_t from)
> {
> 
>  if ((offset & (blocksize - 1)) == 0)
> goto out;
> 
> ret = -ENOMEM;
> page = grab_cache_page(mapping, index);
> if (!page)
> goto out;
> 
> to = (offset + blocksize) & ~(blocksize - 1);
> ret = a_ops->prepare_write(NULL, page, offset, to);
> < This prepare_write() not balanced by appropriate commit_write()
> < Currently this not is fatal because this function used only
> < by ext2 and jfs witch  unbalanced prepare/commit operations
> < not painful.  

See that comment at the top of nobh_truncate_page()?

> if (ret == 0) {
> kaddr = kmap_atomic(page, KM_USER0);
> memset(kaddr + offset, 0, PAGE_CACHE_SIZE - offset);
> flush_dcache_page(page);
> kunmap_atomic(kaddr, KM_USER0);
> set_page_dirty(page);
> }
> unlock_page(page);
> page_cache_release(page);
> out:
> return ret;
> }
> 
> But we can't just call commit_write after all job done because this result in
> i_size increasing till block end. Where are two possible solutions:
> a) Call ->commit_write() and then restore i_size to old value.
> b) Leave code as it is now, but add warning comment about prepare/commit
>balance violation.

It just happens that nobh_prepare_write() does all the things which
nobh_truncate_page() wants done.

If you need to change nobh_prepare_write(), you'll need to change
nobh_truncate_page().

Or something.  You haven't told us what you're trying to do.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Add PM_TRACE x86_64 support.

2007-02-07 Thread Nigel Cunningham
On Wed, 2007-02-07 at 23:18 -0200, Otavio Salvador wrote:
> Nigel Cunningham <[EMAIL PROTECTED]> writes:
> 
> > -   for (tracedata = &__tracedata_start ; tracedata < &__tracedata_end ; 
> > tracedata += 6) {
> > +   for (tracedata = &__tracedata_start ; tracedata < &__tracedata_end ; 
> > tracedata += 2 + sizeof(unsigned long)) {
> 
> Could you split this line?

Sure.

-- New version -- (What's the right way to do this?)

This patch add x86_64 support for PM_TRACE, and shifts per-arch code to
the appropriate subdirectories.

Symbol exports are added so tracing can be used from drivers built as
modules too.

Please apply.

Signed-off-by: Nigel Cunningham <[EMAIL PROTECTED]>

 arch/x86_64/kernel/vmlinux.lds.S  |7 +++
 drivers/base/power/trace.c|5 -
 include/asm-i386/resume-trace.h   |   21 +
 include/asm-x86_64/resume-trace.h |   21 +
 include/linux/resume-trace.h  |   24 ++--
 kernel/power/Kconfig  |2 +-
 6 files changed, 60 insertions(+), 20 deletions(-)
diff -ruNp 160-PM_TRACE.patch-old/arch/x86_64/kernel/vmlinux.lds.S 
160-PM_TRACE.patch-new/arch/x86_64/kernel/vmlinux.lds.S
--- 160-PM_TRACE.patch-old/arch/x86_64/kernel/vmlinux.lds.S 2007-02-08 
13:05:09.0 +1100
+++ 160-PM_TRACE.patch-new/arch/x86_64/kernel/vmlinux.lds.S 2007-02-07 
23:32:23.0 +1100
@@ -54,6 +54,13 @@ SECTIONS
 
   BUG_TABLE
 
+  . = ALIGN(4);
+  .tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) {
+   __tracedata_start = .;
+   *(.tracedata)
+   __tracedata_end = .;
+  }
+
   . = ALIGN(PAGE_SIZE);/* Align data segment to page size boundary */
/* Data */
   .data : AT(ADDR(.data) - LOAD_OFFSET) {
diff -ruNp 160-PM_TRACE.patch-old/drivers/base/power/trace.c 
160-PM_TRACE.patch-new/drivers/base/power/trace.c
--- 160-PM_TRACE.patch-old/drivers/base/power/trace.c   2007-02-06 
14:48:31.0 +1100
+++ 160-PM_TRACE.patch-new/drivers/base/power/trace.c   2007-02-08 
13:04:51.0 +1100
@@ -142,6 +142,7 @@ void set_trace_device(struct device *dev
 {
dev_hash_value = hash_string(DEVSEED, dev->bus_id, DEVHASH);
 }
+EXPORT_SYMBOL(set_trace_device);
 
 /*
  * We could just take the "tracedata" index into the .tracedata
@@ -162,6 +163,7 @@ void generate_resume_trace(void *traceda
file_hash_value = hash_string(lineno, file, FILEHASH);
set_magic_time(user_hash_value, file_hash_value, dev_hash_value);
 }
+EXPORT_SYMBOL(generate_resume_trace);
 
 extern char __tracedata_start, __tracedata_end;
 static int show_file_hash(unsigned int value)
@@ -170,7 +172,8 @@ static int show_file_hash(unsigned int v
char *tracedata;
 
match = 0;
-   for (tracedata = &__tracedata_start ; tracedata < &__tracedata_end ; 
tracedata += 6) {
+   for (tracedata = &__tracedata_start ; tracedata < &__tracedata_end ;
+   tracedata += 2 + sizeof(unsigned long)) {
unsigned short lineno = *(unsigned short *)tracedata;
const char *file = *(const char **)(tracedata + 2);
unsigned int hash = hash_string(lineno, file, FILEHASH);
diff -ruNp 160-PM_TRACE.patch-old/include/asm-i386/resume-trace.h 
160-PM_TRACE.patch-new/include/asm-i386/resume-trace.h
--- 160-PM_TRACE.patch-old/include/asm-i386/resume-trace.h  1970-01-01 
10:00:00.0 +1000
+++ 160-PM_TRACE.patch-new/include/asm-i386/resume-trace.h  2007-02-07 
23:32:23.0 +1100
@@ -0,0 +1,21 @@
+#ifndef ARCH_RESUME_TRACE_H
+#define ARCH_RESUME_TRACE_H
+
+#ifdef CONFIG_PM_TRACE
+#define TRACE_RESUME(user) do {\
+   if (pm_trace_enabled) { \
+   void *tracedata;\
+   asm volatile("movl $1f,%0\n"\
+   ".section .tracedata,\"a\"\n"   \
+   "1:\t.word %c1\n"   \
+   "\t.long %c2\n" \
+   ".previous" \
+   :"=r" (tracedata)   \
+   : "i" (__LINE__), "i" (__FILE__));  \
+   generate_resume_trace(tracedata, user); \
+   }   \
+} while (0)
+#else
+#define TRACE_RESUME(user) do { } while (0)
+#endif
+#endif
diff -ruNp 160-PM_TRACE.patch-old/include/asm-x86_64/resume-trace.h 
160-PM_TRACE.patch-new/include/asm-x86_64/resume-trace.h
--- 160-PM_TRACE.patch-old/include/asm-x86_64/resume-trace.h1970-01-01 
10:00:00.0 +1000
+++ 160-PM_TRACE.patch-new/include/asm-x86_64/resume-trace.h2007-02-07 
23:32:23.0 +1100
@@ -0,0 +1,21 @@
+#ifndef ARCH_RESUME_TRACE_H
+#define ARCH_RESUME_TRACE_H
+
+#ifdef CONFIG_PM_TRACE
+#define TRACE_RESUME(user) do {  

[BUG][PATCH] fix mempolcy's check on a system with memory-less-node take2

2007-02-07 Thread KAMEZAWA Hiroyuki
Hi, This is much easier fix than previous one...
--
following is back trace of NULL pointer access in slab_node().
This patch fix this.
== backtrace from crash (linux-2.6.20) ==
 #0 [BSP:e00121f412d8] schedule at a0010061ccc0
 #1 [BSP:e00121f41280] rwsem_down_failed_common at a00100290490
 #2 [BSP:e00121f41260] rwsem_down_read_failed at a00100620d30
 #3 [BSP:e00121f41240] down_read at a001000b01a0
 #4 [BSP:e00121f411e8] ia64_do_page_fault at a00100625710
 #5 [BSP:e00121f411e8] ia64_leave_kernel at a001c660
  EFRAME: e00121f47100
  B0: a0010013cc40  CR_IIP: a0010012aa30
 CR_IPSR: 101008022018  CR_IFS: 8205
  AR_PFS: 0309  AR_RSC: 0003
 AR_UNAT:  AR_RNAT: 
  AR_CCV:  AR_FPSR: 0009804c8a70033f
  LOADRS:  AR_BSPSTORE: 
  B6: a0010003f040  B7: a001ccd0
  PR: 0055a9a5  R1: a00100d5a5b0
  R2: e0010c50df7c  R3: 0030
  R8:   R9: e0011dc52930
 R10: e0011dc52928 R11: e0010c50df80
 R12: e00121f472c0 R13: e00121f4
 R14: 0002 R15: 3f00
 R16: 1040 R17: e00121f4
 R18: a00100b5a9d0 R19: e00121f40018
 R20: e00121f40c84 R21: 
 R22: e00121f47330 R23: e00121f47334
 R24: e00121f40b88 R25: e00121f47340
 R26: e00121f47334 R27: 
 R28:  R29: e00121f47338
 R30: 7fff R31: a00100b5b5e0
  F6: 1003eccd55056199632ec F7: 1003e9e3779b97f4a7c16
  F8: 1003e0a0010001422 F9: 1003e0fa0
 F10: 1003e3b9aca00F11: 1003e431bde82d7b634db
 #6 [BSP:e00121f411c0] slab_node at a0010012aa30
 #7 [BSP:e00121f41190] alternate_node_alloc at a0010013cc40
 #8 [BSP:e00121f41160] kmem_cache_alloc at a0010013dc40
 #9 [BSP:e00121f41100] desc_prologue at a0010003ee00
#10 [BSP:e00121f410c0] unw_decode_r2 at a0010003f0c0
#11 [BSP:e00121f41068] find_save_locs at a0010003fbf0
#12 [BSP:e00121f41038] unw_init_frame_info at a00100040900
#13 [BSP:e00121f41010] unw_init_running at a001ccf0
==
This panic(hang) was found by a numa test-set on a system with 3 nodes, where
node(2) was memory-less-node.

This patch fixes zero-length zonelist problem in MPOL_MBIND.
If the length of zonelist is zero, just returns -EINVAL.

Changelog: v1 -> v2
- avoid extra pgdat scanningit is not necessary.

Signed-Off-By: KAMEZAWA Hiroyuki <[EMAIL PROTECTED]>


Index: linux-2.6.20/mm/mempolicy.c
===
--- linux-2.6.20.orig/mm/mempolicy.c2007-02-08 09:50:45.0 +0900
+++ linux-2.6.20/mm/mempolicy.c 2007-02-08 10:35:53.0 +0900
@@ -144,7 +144,7 @@
max++;  /* space for zlcache_ptr (see mmzone.h) */
zl = kmalloc(sizeof(struct zone *) * max, GFP_KERNEL);
if (!zl)
-   return NULL;
+   return PTR_ERR(-ENOMEM);
zl->zlcache_ptr = NULL;
num = 0;
/* First put in the highest zones from all nodes, then all the next 
@@ -162,6 +162,10 @@
break;
k--;
}
+   if (!num) {
+   kfree(zl);
+   return PTR_ERR(-EINVAL);
+   }
zl->zones[num] = NULL;
return zl;
 }
@@ -170,6 +174,7 @@
 static struct mempolicy *mpol_new(int mode, nodemask_t *nodes)
 {
struct mempolicy *policy;
+   void  *val;
 
PDprintk("setting mode %d nodes[0] %lx\n", mode, nodes_addr(*nodes)[0]);
if (mode == MPOL_DEFAULT)
@@ -192,11 +197,12 @@
policy->v.preferred_node = -1;
break;
case MPOL_BIND:
-   policy->v.zonelist = bind_zonelist(nodes);
-   if (policy->v.zonelist == NULL) {
+   val = bind_zonelist(nodes);
+   if (IS_ERR(val)) {
kmem_cache_free(policy_cache, policy);
-   return ERR_PTR(-ENOMEM);
+   return val;
}
+   policy->v.zonelist = val;
break;
}
policy->policy = mode;
@@ -1662,12 +1668,12 @@
 
zonelist = bind_zonelist();
 
-   /* If no mem, then zonelist is NULL and we keep old zonelist.
+   /* If no mem, then zonelist is ERR_PTR and we keep old zonelist.
 * If that old zonelist has no remaining mems_allowed nodes,
 * then zonelist_policy() will "FALL THROUGH" to MPOL_DEFAULT.
 */
 
-   if (zonelist) {
+   if 

Re: discussion of Kbuild fixes (kbuild: Kbuild.include avoid using spaces in call arguments)

2007-02-07 Thread Roman Zippel
Hi,

On Thu, 8 Feb 2007, Oleg Verych wrote:

> -- `find | sort' in localversion (i insist on split between paths and
> files)

make has dedicated functions for this.

> -- symlinks to /dev/null in option checking -- isn't it better to not
>have any (though cached) access to files on filesystem, instead of to
>/dev/null? cont.:

symlinks are not much else than special files.

> I wish to have more people to work on this (even with just comments),
> because "Kbuild.include" was only first step to reduce bloated top
> Makefile. Since then, it seems, Sam have more important things to do.

The problem is that you mix multiple changes into a single patch, but 
since kbuild is very central part that puts everything together, I don't 
think it's bad idea to be more conservative, especially if you just start 
to work on it.

bye, Roman
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] sysctl: Restore the selinux path based label lookup for sysctls.

2007-02-07 Thread Eric W. Biederman
Stephen Smalley <[EMAIL PROTECTED]> writes:

>
> One related but separate issue is that the /proc/sys inode labeling is
> also affected by the sysctl patch series.  Those inodes used to be
> labeled by selinux_proc_get_sid (from selinux_d_instantiate), but that
> no longer works, so they now fall back to the superblock SID (generic
> proc label).  That changes the inode permission checks on an attempt to
> access a /proc/sys node and will likely cause denials under current
> policy for confined domains since one wouldn't generally be writing to
> the generic proc label. If you always called sysctl_perm from the proc
> sysctl code, we could possibly dispense with inode permission checking
> on those inodes, e.g. marking them private.

Like this?

It seems a little weird but I'm happy with it if you are.

Eric

diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index b9d59c0..7d6f7c7 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 = _sys_inode_operations;
inode->i_fop = _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 linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 3/3] rcutorture: Remove redundant assignment to cur_ops in for loop

2007-02-07 Thread Josh Triplett
Andrew Morton wrote:
> On Wed, 7 Feb 2007 16:22:28 -0800
> Andrew Morton <[EMAIL PROTECTED]> wrote:
>> I suspect we can do better than that...
[...]

Much better; please go ahead and replace my patch with this one.

Signed-off-by: Josh Triplett <[EMAIL PROTECTED]>

- Josh Triplett

> --- a/kernel/rcutorture.c~rcutorture-remove-redundant-assignment-to-cur_ops-in
> +++ a/kernel/rcutorture.c
> @@ -569,10 +569,6 @@ static struct rcu_torture_ops sched_ops 
>   .name = "sched"
>  };
>  
> -static struct rcu_torture_ops *torture_ops[] =
> - { _ops, _sync_ops, _bh_ops, _bh_sync_ops,
> -   _ops, _ops, _ops, NULL };
> -
>  /*
>   * RCU torture writer kthread.  Repeatedly substitutes a new structure
>   * for that pointed to by rcu_torture_current, freeing the old structure
> @@ -939,16 +935,17 @@ rcu_torture_init(void)
>   int i;
>   int cpu;
>   int firsterr = 0;
> + static struct rcu_torture_ops *torture_ops[] =
> + { _ops, _sync_ops, _bh_ops, _bh_sync_ops,
> +   _ops, _ops, _ops, };
>  
>   /* Process args and tell the world that the torturer is on the job. */
> -
> - for (i = 0; cur_ops = torture_ops[i], cur_ops; i++) {
> + for (i = 0; i < ARRAY_SIZE(torture_ops); i++) {
>   cur_ops = torture_ops[i];
> - if (strcmp(torture_type, cur_ops->name) == 0) {
> + if (strcmp(torture_type, cur_ops->name) == 0)
>   break;
> - }
>   }
> - if (cur_ops == NULL) {
> + if (i == ARRAY_SIZE(torture_ops)) {
>   printk(KERN_ALERT "rcutorture: invalid torture type: \"%s\"\n",
>  torture_type);
>   return (-EINVAL);
> _
> 
> 
> 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 3/28] Driver core: convert SPI code to use struct device

2007-02-07 Thread David Brownell
NAK.  This wasn't supposed to go upstream Greg; and it also
conflicts with other pending SPI patches.

- Dave


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Add PM_TRACE x86_64 support.

2007-02-07 Thread Otavio Salvador
Nigel Cunningham <[EMAIL PROTECTED]> writes:

> - for (tracedata = &__tracedata_start ; tracedata < &__tracedata_end ; 
> tracedata += 6) {
> + for (tracedata = &__tracedata_start ; tracedata < &__tracedata_end ; 
> tracedata += 2 + sizeof(unsigned long)) {

Could you split this line?

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
"Microsoft sells you Windows ... Linux gives
 you the whole house."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2.6.19.2] r8169: support RTL8169SC/8110SC

2007-02-07 Thread 許恆嘉
Francois Romieu 提到:

>許恆嘉 <[EMAIL PROTECTED]> :
>  
>
>>Dear Francois:
>>
>>I think I didn't make it clear about the programming manuals for PCI-E ICs.
>>
>>Due to several legal issues, Realtek won't put the programming guide on 
>>its website. However, Realtek does offer the programming guide if the 
>>customers need it. If you want to have a copy of it, please contact 
>>Realtek FAE<[EMAIL PROTECTED]>.
>>
>>
>
>Does it mean that the documentation is NDAed ?
>  
>
ANS:
No, you don't have to sign anything.

>On an unrelated topic, revision 8.001.00 of your 8168 driver includes
>a workaround for an rx fifo overflow issue. Is it an event which can
>happen at any time, repeteadly if some rare conditions are met or is
>it enough to whack the device once for all when the problem happens ?
>  
>
ANS:
No, it seldom happens. It does happen in a few rare conditions. When
this event happens, the nic works improperly and I do the patch to
rescue the device.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.

2007-02-07 Thread Trond Myklebust
The latest pull from the git tree spews out a torrent of the above
warning on a recent Fedora Core 6 machine running gcc-4.1.1. config file
is attached...

Cheers,
  Trond

#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.20
# Wed Feb  7 19:52:47 2007
#
CONFIG_X86_32=y
CONFIG_GENERIC_TIME=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_SEMAPHORE_SLEEPERS=y
CONFIG_X86=y
CONFIG_MMU=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_IOMAP=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_DMI=y
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"

#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32

#
# General setup
#
CONFIG_LOCALVERSION="-smp"
CONFIG_LOCALVERSION_AUTO=y
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
# CONFIG_IPC_NS is not set
CONFIG_POSIX_MQUEUE=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_BSD_PROCESS_ACCT_V3=y
# CONFIG_TASKSTATS is not set
# CONFIG_UTS_NS is not set
CONFIG_AUDIT=y
CONFIG_AUDITSYSCALL=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_CPUSETS=y
CONFIG_SYSFS_DEPRECATED=y
CONFIG_RELAY=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
# CONFIG_EMBEDDED is not set
CONFIG_UID16=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_EXTRA_PASS=y
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_SHMEM=y
CONFIG_SLAB=y
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_RT_MUTEXES=y
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0
# CONFIG_SLOB is not set

#
# Loadable module support
#
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
CONFIG_MODVERSIONS=y
CONFIG_MODULE_SRCVERSION_ALL=y
CONFIG_KMOD=y
CONFIG_STOP_MACHINE=y

#
# Block layer
#
CONFIG_BLOCK=y
CONFIG_LBD=y
# CONFIG_BLK_DEV_IO_TRACE is not set
CONFIG_LSF=y

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
CONFIG_DEFAULT_AS=y
# CONFIG_DEFAULT_DEADLINE is not set
# CONFIG_DEFAULT_CFQ is not set
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="anticipatory"

#
# Processor type and features
#
CONFIG_SMP=y
CONFIG_X86_PC=y
# CONFIG_X86_ELAN is not set
# CONFIG_X86_VOYAGER is not set
# CONFIG_X86_NUMAQ is not set
# CONFIG_X86_SUMMIT is not set
# CONFIG_X86_BIGSMP is not set
# CONFIG_X86_VISWS is not set
# CONFIG_X86_GENERICARCH is not set
# CONFIG_X86_ES7000 is not set
# CONFIG_PARAVIRT is not set
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
# CONFIG_M586MMX is not set
# CONFIG_M686 is not set
# CONFIG_MPENTIUMII is not set
# CONFIG_MPENTIUMIII is not set
# CONFIG_MPENTIUMM is not set
# CONFIG_MCORE2 is not set
CONFIG_MPENTIUM4=y
# CONFIG_MK6 is not set
# CONFIG_MK7 is not set
# CONFIG_MK8 is not set
# CONFIG_MCRUSOE is not set
# CONFIG_MEFFICEON is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP2 is not set
# CONFIG_MWINCHIP3D is not set
# CONFIG_MGEODEGX1 is not set
# CONFIG_MGEODE_LX is not set
# CONFIG_MCYRIXIII is not set
# CONFIG_MVIAC3_2 is not set
CONFIG_X86_GENERIC=y
CONFIG_X86_CMPXCHG=y
CONFIG_X86_XADD=y
CONFIG_X86_L1_CACHE_SHIFT=7
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_X86_CMPXCHG64=y
CONFIG_X86_GOOD_APIC=y
CONFIG_X86_INTEL_USERCOPY=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
CONFIG_X86_TSC=y
CONFIG_HPET_TIMER=y
CONFIG_NR_CPUS=8
CONFIG_SCHED_SMT=y
# CONFIG_SCHED_MC is not set
# CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set
CONFIG_PREEMPT=y
CONFIG_PREEMPT_BKL=y
CONFIG_X86_LOCAL_APIC=y
CONFIG_X86_IO_APIC=y
CONFIG_X86_MCE=y
CONFIG_X86_MCE_NONFATAL=y
CONFIG_X86_MCE_P4THERMAL=y
CONFIG_VM86=y
CONFIG_TOSHIBA=m
CONFIG_I8K=m
# CONFIG_X86_REBOOTFIXUPS is not set
CONFIG_MICROCODE=m
CONFIG_MICROCODE_OLD_INTERFACE=y
CONFIG_X86_MSR=m
CONFIG_X86_CPUID=m

#
# Firmware Drivers
#
CONFIG_EDD=m
CONFIG_DELL_RBU=m
CONFIG_DCDBAS=m
# CONFIG_NOHIGHMEM is not set
CONFIG_HIGHMEM4G=y
# CONFIG_HIGHMEM64G is not set
CONFIG_PAGE_OFFSET=0xC000
CONFIG_HIGHMEM=y
CONFIG_ARCH_FLATMEM_ENABLE=y
CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
CONFIG_ARCH_POPULATES_NODE_MAP=y
CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y
# CONFIG_DISCONTIGMEM_MANUAL is not set
# CONFIG_SPARSEMEM_MANUAL is not set
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
CONFIG_SPARSEMEM_STATIC=y
CONFIG_SPLIT_PTLOCK_CPUS=4
# CONFIG_RESOURCES_64BIT is not set
CONFIG_HIGHPTE=y
# CONFIG_MATH_EMULATION is not set
CONFIG_MTRR=y
# CONFIG_EFI is not set
CONFIG_IRQBALANCE=y
CONFIG_SECCOMP=y
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
# CONFIG_HZ_300 is not set
# CONFIG_HZ_1000 is not set
CONFIG_HZ=250
CONFIG_KEXEC=y
# CONFIG_CRASH_DUMP is not set
CONFIG_PHYSICAL_START=0x10
CONFIG_RELOCATABLE=y
CONFIG_PHYSICAL_ALIGN=0x10

discussion of Kbuild fixes (kbuild: Kbuild.include avoid using spaces in call arguments)

2007-02-07 Thread Oleg Verych
On Thu, Feb 08, 2007 at 01:00:44AM +0100, Roman Zippel wrote:
> Hi,
> 
> On Wed, 7 Feb 2007, Randy Dunlap wrote:
> 
> > > > > Linus, please revert. Thanks.
> > > >  
> > > > Roman, while it went so fast to Linus, i didn't expect that, let me
> > > > try to fix all this with this little patch.
> > > 
> > > Sorry, it needs more changes, the patch simply wasn't ready.
> > 
> > Can you be more explicit?  and then it should get some time
> > in -mm, hopefully.
> 
> I did already. It needs to be splitted,

i did that patch for ultrasonic testers of Linus's tree. Shame on me,
because, i was sure, that... whatever. This is where i thought, that i
almost understand it all, but another huge level of complexity was
revealed (even it's just a whitespace ;).

I've started to split changes,

> lose the symlink stuff and be more careful with whitespace. It probably
> could use a better name than checker-shell, e.g. autoconf calls this
> TRY_RUN, so something like this.

but i can't understand you, Roman, against:

-- `find | sort' in localversion (i insist on split between paths and
files)

-- symlinks to /dev/null in option checking -- isn't it better to not
   have any (though cached) access to files on filesystem, instead of to
   /dev/null? cont.:
 
Anyway, i think, it's better than before, that now all is one place, and
can be named as you wish. Any further changes, like common `tmp'
directory are easy to fix. Readable form, easy to test/debug:

add `-x' to `set' or `echo >gcc-checks.txt', and you will get output, you wish.

IMHO it's good, while arch specific gcc checking already done (:

I wish to have more people to work on this (even with just comments),
because "Kbuild.include" was only first step to reduce bloated top
Makefile. Since then, it seems, Sam have more important things to do.

If further work is useful, i will be glad if you think so.

Thanks.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/3, try #3] Blackfin: serial driver for Blackfinarchitecture against Linux kernel 2.6.20

2007-02-07 Thread Aubrey Li

On 2/8/07, Russell King <[EMAIL PROTECTED]> wrote:

On Wed, Feb 07, 2007 at 06:49:58PM +0800, Wu, Bryan wrote:
> Thanks Russell's review, we update the serial core driver according to
> Russell's comments.  Here is the change log:
>
> a) use "ttyBF" as blackfin serial name and use new serial major/minor number
> b) can accept command line serial setting like "console=ttyBF0,115200", 
delete the baud rate setting macros
> c) termios can be changed on the fly

Since you're not implementing the ability to handle INPCK, BRKINT, PARMRK,
IGNPAR and IGNBRK, please arrange for your driver to reflect the real
settings in the termios.

In other words:

> +static void
> +bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios,
> +struct ktermios *old)
> +{
> + struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
> + unsigned long flags;
> + unsigned int baud, quot;
> + unsigned short val, ier, lcr = 0;
> +
> + switch (termios->c_cflag & CSIZE) {
> + case CS8:
> + lcr = WLS(8);
> + break;
> + case CS7:
> + lcr = WLS(7);
> + break;
> + case CS6:
> + lcr = WLS(6);
> + break;
> + case CS5:
> + lcr = WLS(5);
> + break;
> + default:
> + printk(KERN_ERR "%s: word lengh not supported\n",
> + __FUNCTION__);
> + }
> +
> + if (termios->c_cflag & CSTOPB);
> + lcr |= STB;
> + if (termios->c_cflag & PARENB) {
> + lcr |= PEN;
> + if (!(termios->c_cflag & PARODD))
> + lcr |= EPS;
> + }

Insert here:
termios->c_iflag |= INPCK | BRKINT | PARMRK;
termios->c_iflag &= ~(IGNPAR | IGNBRK);

This way applications will know that these controls are not implemented
for this port.


Thanks a lot to point it out. I'll fix this and re-send the patch.

Regards,
-Aubrey
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/2] Video: fb, kzalloc changes

2007-02-07 Thread Jiri Slaby
video/fb, kzalloc changes

Use kzalloc instead of kmalloc + memset(0).

Signed-off-by: Jiri Slaby <[EMAIL PROTECTED]>

---
commit 1e7333622e9abbe0c980c3d42c4691d026be61bb
tree d8029a264c0a2ef88d64d82b760d2c41458d3ce8
parent fd6de4a65b2d83db766a9ad3c137c44e361d6e0d
author Jiri Slaby <[EMAIL PROTECTED]> Thu, 08 Feb 2007 01:48:59 +0100
committer Jiri Slaby <[EMAIL PROTECTED]> Thu, 08 Feb 2007 01:48:59 +0100

 drivers/video/au1100fb.c   |6 ++
 drivers/video/controlfb.c  |3 +--
 drivers/video/i810/i810_main.c |3 +--
 drivers/video/igafb.c  |7 ++-
 drivers/video/intelfb/intelfbdrv.c |3 +--
 drivers/video/nvidia/nvidia.c  |4 +---
 drivers/video/riva/fbdev.c |3 +--
 7 files changed, 9 insertions(+), 20 deletions(-)

diff --git a/drivers/video/au1100fb.c b/drivers/video/au1100fb.c
index ef5c16f..80a81ec 100644
--- a/drivers/video/au1100fb.c
+++ b/drivers/video/au1100fb.c
@@ -468,11 +468,10 @@ int au1100fb_drv_probe(struct device *dev)
return -EINVAL;
 
/* Allocate new device private */
-   if (!(fbdev = kmalloc(sizeof(struct au1100fb_device), GFP_KERNEL))) {
+   if (!(fbdev = kzalloc(sizeof(struct au1100fb_device), GFP_KERNEL))) {
print_err("fail to allocate device private record");
return -ENOMEM;
}
-   memset((void*)fbdev, 0, sizeof(struct au1100fb_device));
 
fbdev->panel = _lcd_panels[drv_info.panel_idx];
 
@@ -549,10 +548,9 @@ int au1100fb_drv_probe(struct device *dev)
fbdev->info.fbops = _ops;
fbdev->info.fix = au1100fb_fix;
 
-   if (!(fbdev->info.pseudo_palette = kmalloc(sizeof(u32) * 16, 
GFP_KERNEL))) {
+   if (!(fbdev->info.pseudo_palette = kzalloc(sizeof(u32) * 16, 
GFP_KERNEL))) {
return -ENOMEM;
}
-   memset(fbdev->info.pseudo_palette, 0, sizeof(u32) * 16);
 
if (fb_alloc_cmap(>info.cmap, AU1100_LCD_NBR_PALETTE_ENTRIES, 0) 
< 0) {
print_err("Fail to allocate colormap (%d entries)",
diff --git a/drivers/video/controlfb.c b/drivers/video/controlfb.c
index 04c6d92..fd60dba 100644
--- a/drivers/video/controlfb.c
+++ b/drivers/video/controlfb.c
@@ -696,11 +696,10 @@ static int __init control_of_init(struct device_node *dp)
printk(KERN_ERR "can't get 2 addresses for control\n");
return -ENXIO;
}
-   p = kmalloc(sizeof(*p), GFP_KERNEL);
+   p = kzalloc(sizeof(*p), GFP_KERNEL);
if (p == 0)
return -ENXIO;
control_fb = p; /* save it for cleanups */
-   memset(p, 0, sizeof(*p));
 
/* Map in frame buffer and registers */
p->fb_orig_base = fb_res.start;
diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c
index e343c0d..29f89db 100644
--- a/drivers/video/i810/i810_main.c
+++ b/drivers/video/i810/i810_main.c
@@ -2021,11 +2021,10 @@ static int __devinit i810fb_init_pci (struct pci_dev 
*dev,
par = info->par;
par->dev = dev;
 
-   if (!(info->pixmap.addr = kmalloc(8*1024, GFP_KERNEL))) {
+   if (!(info->pixmap.addr = kzalloc(8*1024, GFP_KERNEL))) {
i810fb_release_resource(info, par);
return -ENOMEM;
}
-   memset(info->pixmap.addr, 0, 8*1024);
info->pixmap.size = 8*1024;
info->pixmap.buf_align = 8;
info->pixmap.access_align = 32;
diff --git a/drivers/video/igafb.c b/drivers/video/igafb.c
index 51355c8..90592fb 100644
--- a/drivers/video/igafb.c
+++ b/drivers/video/igafb.c
@@ -401,12 +401,11 @@ int __init igafb_init(void)

size = sizeof(struct fb_info) + sizeof(struct iga_par) + sizeof(u32)*16;
 
-info = kmalloc(size, GFP_ATOMIC);
+info = kzalloc(size, GFP_ATOMIC);
 if (!info) {
 printk("igafb_init: can't alloc fb_info\n");
 return -ENOMEM;
 }
-memset(info, 0, size);
 
par = (struct iga_par *) (info + 1);

@@ -465,7 +464,7 @@ int __init igafb_init(void)
 * one additional region with size == 0. 
 */
 
-   par->mmap_map = kmalloc(4 * sizeof(*par->mmap_map), GFP_ATOMIC);
+   par->mmap_map = kzalloc(4 * sizeof(*par->mmap_map), GFP_ATOMIC);
if (!par->mmap_map) {
printk("igafb_init: can't alloc mmap_map\n");
iounmap((void *)par->io_base);
@@ -474,8 +473,6 @@ int __init igafb_init(void)
return -ENOMEM;
}
 
-   memset(par->mmap_map, 0, 4 * sizeof(*par->mmap_map));
-
/*
 * Set default vmode and cmode from PROM properties.
 */
diff --git a/drivers/video/intelfb/intelfbdrv.c 
b/drivers/video/intelfb/intelfbdrv.c
index 664fc5c..b75eda8 100644
--- a/drivers/video/intelfb/intelfbdrv.c
+++ b/drivers/video/intelfb/intelfbdrv.c
@@ -540,12 +540,11 @@ intelfb_pci_register(struct pci_dev *pdev, const struct 
pci_device_id *ent)
dinfo->pdev  = pdev;
 

[PATCH 1/2] Video: fb, add true ref_count atomicity

2007-02-07 Thread Jiri Slaby
video/fb, add true ref_count atomicity

Some of fb drivers uses atomic_t in bad manner, since there are still some
race-prone gaps. Use mutexes to protect open/close code sections with
ref_count testing and finally use simple uint.

Signed-off-by: Jiri Slaby <[EMAIL PROTECTED]>

---
commit fd6de4a65b2d83db766a9ad3c137c44e361d6e0d
tree a4573d343d20988b931313c5fa35d9c370f36a05
parent e8d5617886087b5c8eee9df2c73381495672e23c
author Jiri Slaby <[EMAIL PROTECTED]> Thu, 08 Feb 2007 01:39:50 +0100
committer Jiri Slaby <[EMAIL PROTECTED]> Thu, 08 Feb 2007 01:39:50 +0100

 drivers/video/i810/i810.h  |3 ++-
 drivers/video/i810/i810_main.c |   25 +++--
 drivers/video/neofb.c  |   21 ++---
 drivers/video/riva/fbdev.c |   19 ---
 drivers/video/riva/rivafb.h|3 ++-
 drivers/video/vga16fb.c|   23 +++
 include/video/neomagic.h   |3 ++-
 7 files changed, 62 insertions(+), 35 deletions(-)

diff --git a/drivers/video/i810/i810.h b/drivers/video/i810/i810.h
index 579195c..aa65ffc 100644
--- a/drivers/video/i810/i810.h
+++ b/drivers/video/i810/i810.h
@@ -264,7 +264,8 @@ struct i810fb_par {
struct heap_data cursor_heap;
struct vgastate  state;
struct i810fb_i2c_chan   chan[3];
-   atomic_t use_count;
+   struct mutex open_lock;
+   unsigned int use_count;
u32 pseudo_palette[17];
unsigned long mmio_start_phys;
u8 __iomem *mmio_start_virtual;
diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c
index b55a12d..e343c0d 100644
--- a/drivers/video/i810/i810_main.c
+++ b/drivers/video/i810/i810_main.c
@@ -1235,9 +1235,9 @@ static int i810fb_getcolreg(u8 regno, u8 *red, u8 *green, 
u8 *blue,
 static int i810fb_open(struct fb_info *info, int user)
 {
struct i810fb_par *par = info->par;
-   u32 count = atomic_read(>use_count);
-   
-   if (count == 0) {
+
+   mutex_lock(>open_lock);
+   if (par->use_count == 0) {
memset(>state, 0, sizeof(struct vgastate));
par->state.flags = VGA_SAVE_CMAP;
par->state.vgabase = par->mmio_start_virtual;
@@ -1246,7 +1246,8 @@ static int i810fb_open(struct fb_info *info, int user)
i810_save_vga_state(par);
}
 
-   atomic_inc(>use_count);
+   par->use_count++;
+   mutex_unlock(>open_lock);

return 0;
 }
@@ -1254,18 +1255,20 @@ static int i810fb_open(struct fb_info *info, int user)
 static int i810fb_release(struct fb_info *info, int user)
 {
struct i810fb_par *par = info->par;
-   u32 count;
-   
-   count = atomic_read(>use_count);
-   if (count == 0)
+
+   mutex_lock(>open_lock);
+   if (par->use_count == 0) {
+   mutex_unlock(>open_lock);
return -EINVAL;
+   }
 
-   if (count == 1) {
+   if (par->use_count == 1) {
i810_restore_vga_state(par);
restore_vga(>state);
}
 
-   atomic_dec(>use_count);
+   par->use_count--;
+   mutex_unlock(>open_lock);

return 0;
 }
@@ -1752,6 +1755,8 @@ static void __devinit i810_init_monspecs(struct fb_info 
*info)
 static void __devinit i810_init_defaults(struct i810fb_par *par, 
  struct fb_info *info)
 {
+   mutex_init(>open_lock);
+
if (voffset) 
v_offset_default = voffset;
else if (par->aperture.size > 32 * 1024 * 1024)
diff --git a/drivers/video/neofb.c b/drivers/video/neofb.c
index 459ca55..395cced 100644
--- a/drivers/video/neofb.c
+++ b/drivers/video/neofb.c
@@ -556,14 +556,16 @@ static int
 neofb_open(struct fb_info *info, int user)
 {
struct neofb_par *par = info->par;
-   int cnt = atomic_read(>ref_count);
 
-   if (!cnt) {
+   mutex_lock(>open_lock);
+   if (!par->ref_count) {
memset(>state, 0, sizeof(struct vgastate));
par->state.flags = VGA_SAVE_MODE | VGA_SAVE_FONTS;
save_vga(>state);
}
-   atomic_inc(>ref_count);
+   par->ref_count++;
+   mutex_unlock(>open_lock);
+
return 0;
 }
 
@@ -571,14 +573,18 @@ static int
 neofb_release(struct fb_info *info, int user)
 {
struct neofb_par *par = info->par;
-   int cnt = atomic_read(>ref_count);
 
-   if (!cnt)
+   mutex_lock(>open_lock);
+   if (!par->ref_count) {
+   mutex_unlock(>open_lock);
return -EINVAL;
-   if (cnt == 1) {
+   }
+   if (par->ref_count == 1) {
restore_vga(>state);
}
-   atomic_dec(>ref_count);
+   par->ref_count--;
+   mutex_unlock(>open_lock);
+
return 0;
 }
 
@@ -2047,6 +2053,7 @@ static struct fb_info *__devinit neo_alloc_fb_info(struct 
pci_dev *dev, const st
 
info->fix.accel = id->driver_data;
 
+ 

Re: Free Linux Driver Development!

2007-02-07 Thread David Lang

On Tue, 6 Feb 2007, Akemi Yagi wrote:


On Tue, 06 Feb 2007 19:07:50 +0530, Sunil Naidu wrote:


On 2/5/07, Stefan Seyfried <[EMAIL PROTECTED]> wrote:

On Wed, Jan 31, 2007 at 03:14:31AM +0100, Adrian Bunk wrote:

On Tue, Jan 30, 2007 at 05:24:28PM -0800, Greg KH wrote:


Wrong. I abandoned all floppy drives some years ago. I'd actually vote
for removing the floppy driver from the kernel completely.


I don't think time has come for that yet, still millions of people do use
Floppy on Linux ;-)


So, I am not the only person on earth who still makes sure the floppy gets
included when building a new custom PC?


No, I've avoided useing vendors that don't offer it as an option.

David Lang
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Add PM_TRACE x86_64 support.

2007-02-07 Thread Nigel Cunningham
This patch add x86_64 support for PM_TRACE, and shifts per-arch code to
the appropriate subdirectories.

Symbol exports are added so tracing can be used from drivers built as
modules too.

Please apply.

Signed-off-by: Nigel Cunningham <[EMAIL PROTECTED]>

 arch/x86_64/kernel/vmlinux.lds.S  |7 +++
 drivers/base/power/trace.c|4 +++-
 include/asm-i386/resume-trace.h   |   21 +
 include/asm-x86_64/resume-trace.h |   21 +
 include/linux/resume-trace.h  |   24 ++--
 kernel/power/Kconfig  |2 +-
 6 files changed, 59 insertions(+), 20 deletions(-)
diff -ruNp 930-PM_TRACE.patch-old/arch/x86_64/kernel/vmlinux.lds.S 
930-PM_TRACE.patch-new/arch/x86_64/kernel/vmlinux.lds.S
--- 930-PM_TRACE.patch-old/arch/x86_64/kernel/vmlinux.lds.S 2007-01-19 
10:47:25.0 +1100
+++ 930-PM_TRACE.patch-new/arch/x86_64/kernel/vmlinux.lds.S 2007-01-15 
00:00:08.0 +1100
@@ -54,6 +54,13 @@ SECTIONS
 
   BUG_TABLE
 
+  . = ALIGN(4);
+  .tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) {
+   __tracedata_start = .;
+   *(.tracedata)
+   __tracedata_end = .;
+  }
+
   . = ALIGN(PAGE_SIZE);/* Align data segment to page size boundary */
/* Data */
   .data : AT(ADDR(.data) - LOAD_OFFSET) {
diff -ruNp 930-PM_TRACE.patch-old/drivers/base/power/trace.c 
930-PM_TRACE.patch-new/drivers/base/power/trace.c
--- 930-PM_TRACE.patch-old/drivers/base/power/trace.c   2007-01-11 
18:25:02.0 +1100
+++ 930-PM_TRACE.patch-new/drivers/base/power/trace.c   2007-01-15 
00:00:08.0 +1100
@@ -142,6 +142,7 @@ void set_trace_device(struct device *dev
 {
dev_hash_value = hash_string(DEVSEED, dev->bus_id, DEVHASH);
 }
+EXPORT_SYMBOL(set_trace_device);
 
 /*
  * We could just take the "tracedata" index into the .tracedata
@@ -162,6 +163,7 @@ void generate_resume_trace(void *traceda
file_hash_value = hash_string(lineno, file, FILEHASH);
set_magic_time(user_hash_value, file_hash_value, dev_hash_value);
 }
+EXPORT_SYMBOL(generate_resume_trace);
 
 extern char __tracedata_start, __tracedata_end;
 static int show_file_hash(unsigned int value)
@@ -170,7 +172,7 @@ static int show_file_hash(unsigned int v
char *tracedata;
 
match = 0;
-   for (tracedata = &__tracedata_start ; tracedata < &__tracedata_end ; 
tracedata += 6) {
+   for (tracedata = &__tracedata_start ; tracedata < &__tracedata_end ; 
tracedata += 2 + sizeof(unsigned long)) {
unsigned short lineno = *(unsigned short *)tracedata;
const char *file = *(const char **)(tracedata + 2);
unsigned int hash = hash_string(lineno, file, FILEHASH);
diff -ruNp 930-PM_TRACE.patch-old/include/asm-i386/resume-trace.h 
930-PM_TRACE.patch-new/include/asm-i386/resume-trace.h
--- 930-PM_TRACE.patch-old/include/asm-i386/resume-trace.h  1970-01-01 
10:00:00.0 +1000
+++ 930-PM_TRACE.patch-new/include/asm-i386/resume-trace.h  2007-01-15 
22:00:33.0 +1100
@@ -0,0 +1,21 @@
+#ifndef ARCH_RESUME_TRACE_H
+#define ARCH_RESUME_TRACE_H
+
+#ifdef CONFIG_PM_TRACE
+#define TRACE_RESUME(user) do {\
+   if (pm_trace_enabled) { \
+   void *tracedata;\
+   asm volatile("movl $1f,%0\n"\
+   ".section .tracedata,\"a\"\n"   \
+   "1:\t.word %c1\n"   \
+   "\t.long %c2\n" \
+   ".previous" \
+   :"=r" (tracedata)   \
+   : "i" (__LINE__), "i" (__FILE__));  \
+   generate_resume_trace(tracedata, user); \
+   }   \
+} while (0)
+#else
+#define TRACE_RESUME(user) do { } while (0)
+#endif
+#endif
diff -ruNp 930-PM_TRACE.patch-old/include/asm-x86_64/resume-trace.h 
930-PM_TRACE.patch-new/include/asm-x86_64/resume-trace.h
--- 930-PM_TRACE.patch-old/include/asm-x86_64/resume-trace.h1970-01-01 
10:00:00.0 +1000
+++ 930-PM_TRACE.patch-new/include/asm-x86_64/resume-trace.h2007-01-15 
22:00:16.0 +1100
@@ -0,0 +1,21 @@
+#ifndef ARCH_RESUME_TRACE_H
+#define ARCH_RESUME_TRACE_H
+
+#ifdef CONFIG_PM_TRACE
+#define TRACE_RESUME(user) do {\
+   if (pm_trace_enabled) { \
+   void *tracedata;\
+   asm volatile("movq $1f,%0\n"\
+   ".section .tracedata,\"a\"\n"   \
+   "1:\t.word %c1\n"   \
+   "\t.quad %c2\n" \
+   ".previous"   

[PATCH 5/28] driver core: Remove device_is_registered() in device_move().

2007-02-07 Thread Greg KH
From: Cornelia Huck <[EMAIL PROTECTED]>

device_is_registered() will always be false for a device with no bus. Remove
this check and trust the caller to know what they're doing.

Signed-off-by: Cornelia Huck <[EMAIL PROTECTED]>
Cc: Marcel Holtmann <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/base/core.c |4 
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/drivers/base/core.c b/drivers/base/core.c
index 67b79a7..36eedfd 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -1004,10 +1004,6 @@ int device_move(struct device *dev, struct device 
*new_parent)
if (!dev)
return -EINVAL;
 
-   if (!device_is_registered(dev)) {
-   error = -EINVAL;
-   goto out;
-   }
new_parent = get_device(new_parent);
if (!new_parent) {
error = -EINVAL;
-- 
1.4.4.4

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 7/28] MODULES: add the module name for built in kernel drivers

2007-02-07 Thread Greg KH
From: Kay Sievers <[EMAIL PROTECTED]>

Signed-off-by: Kay Sievers <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 include/linux/device.h |1 +
 include/linux/module.h |2 +-
 kernel/module.c|   33 -
 kernel/params.c|   12 +---
 4 files changed, 31 insertions(+), 17 deletions(-)

diff --git a/include/linux/device.h b/include/linux/device.h
index f44247f..da72219 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -126,6 +126,7 @@ struct device_driver {
struct klist_node   knode_bus;
 
struct module   * owner;
+   const char  * mod_name; /* used for built-in modules */
 
int (*probe)(struct device * dev);
int (*remove)   (struct device * dev);
diff --git a/include/linux/module.h b/include/linux/module.h
index 10f771a..90dc254 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -58,6 +58,7 @@ struct module_kobject
 {
struct kobject kobj;
struct module *mod;
+   struct kobject *drivers_dir;
 };
 
 /* These are either module local, or the kernel's dummy ones. */
@@ -263,7 +264,6 @@ struct module
struct module_attribute *modinfo_attrs;
const char *version;
const char *srcversion;
-   struct kobject *drivers_dir;
 
/* Exported symbols */
const struct kernel_symbol *syms;
diff --git a/kernel/module.c b/kernel/module.c
index d0f2260..0f4489a 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1131,8 +1131,8 @@ static int mod_sysfs_setup(struct module *mod,
if (err)
goto out;
 
-   mod->drivers_dir = kobject_add_dir(>mkobj.kobj, "drivers");
-   if (!mod->drivers_dir) {
+   mod->mkobj.drivers_dir = kobject_add_dir(>mkobj.kobj, "drivers");
+   if (!mod->mkobj.drivers_dir) {
err = -ENOMEM;
goto out_unreg;
}
@@ -1151,7 +1151,7 @@ static int mod_sysfs_setup(struct module *mod,
 out_unreg_param:
module_param_sysfs_remove(mod);
 out_unreg_drivers:
-   kobject_unregister(mod->drivers_dir);
+   kobject_unregister(mod->mkobj.drivers_dir);
 out_unreg:
kobject_del(>mkobj.kobj);
kobject_put(>mkobj.kobj);
@@ -1163,7 +1163,7 @@ static void mod_kobject_remove(struct module *mod)
 {
module_remove_modinfo_attrs(mod);
module_param_sysfs_remove(mod);
-   kobject_unregister(mod->drivers_dir);
+   kobject_unregister(mod->mkobj.drivers_dir);
 
kobject_unregister(>mkobj.kobj);
 }
@@ -2344,15 +2344,30 @@ void module_add_driver(struct module *mod, struct 
device_driver *drv)
 {
char *driver_name;
int no_warn;
+   struct module_kobject *mk = NULL;
 
-   if (!mod || !drv)
+   if (!drv)
+   return;
+
+   if (mod)
+   mk = >mkobj;
+   else if (drv->mod_name) {
+   struct kobject *mkobj;
+
+   /* Lookup built-in module entry in /sys/modules */
+   mkobj = kset_find_obj(_subsys.kset, drv->mod_name);
+   if (mkobj)
+   mk = container_of(mkobj, struct module_kobject, kobj);
+   }
+
+   if (!mk)
return;
 
/* Don't check return codes; these calls are idempotent */
-   no_warn = sysfs_create_link(>kobj, >mkobj.kobj, "module");
+   no_warn = sysfs_create_link(>kobj, >kobj, "module");
driver_name = make_driver_name(drv);
if (driver_name) {
-   no_warn = sysfs_create_link(mod->drivers_dir, >kobj,
+   no_warn = sysfs_create_link(mk->drivers_dir, >kobj,
driver_name);
kfree(driver_name);
}
@@ -2367,10 +2382,10 @@ void module_remove_driver(struct device_driver *drv)
return;
 
sysfs_remove_link(>kobj, "module");
-   if (drv->owner && drv->owner->drivers_dir) {
+   if (drv->owner && drv->owner->mkobj.drivers_dir) {
driver_name = make_driver_name(drv);
if (driver_name) {
-   sysfs_remove_link(drv->owner->drivers_dir,
+   sysfs_remove_link(drv->owner->mkobj.drivers_dir,
  driver_name);
kfree(driver_name);
}
diff --git a/kernel/params.c b/kernel/params.c
index 718945d..737b7c5 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -561,14 +561,12 @@ static void __init kernel_param_sysfs_setup(const char 
*name,
mk->mod = THIS_MODULE;
kobj_set_kset_s(mk, module_subsys);
kobject_set_name(>kobj, name);
-   ret = kobject_register(>kobj);
+   kobject_init(>kobj);
+   ret = kobject_add(>kobj);
BUG_ON(ret < 0);
-
-   /* no need to keep the kobject if no parameter is exported */
-   if (!param_sysfs_setup(mk, kparam, num_params, name_skip)) {
-   

[PATCH 6/28] driver core: Allow device_move(dev, NULL).

2007-02-07 Thread Greg KH
From: Cornelia Huck <[EMAIL PROTECTED]>

If we allow NULL as the new parent in device_move(), we need to make sure
that the device is placed into the same place as it would if it was
newly registered:

- Consider the device virtual tree. In order to be able to reuse code,
  setup_parent() has been tweaked a bit.
- kobject_move() can fall back to the kset's kobject.
- sysfs_move_dir() uses the sysfs root dir as fallback.

Signed-off-by: Cornelia Huck <[EMAIL PROTECTED]>
Cc: Marcel Holtmann <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/base/core.c |   76 +++---
 fs/sysfs/dir.c  |6 +---
 lib/kobject.c   |6 ++--
 3 files changed, 52 insertions(+), 36 deletions(-)

diff --git a/drivers/base/core.c b/drivers/base/core.c
index 36eedfd..c60114d 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -390,22 +390,23 @@ void device_initialize(struct device *dev)
 }
 
 #ifdef CONFIG_SYSFS_DEPRECATED
-static int setup_parent(struct device *dev, struct device *parent)
+static struct kobject * get_device_parent(struct device *dev,
+ struct device *parent)
 {
/* Set the parent to the class, not the parent device */
/* this keeps sysfs from having a symlink to make old udevs happy */
if (dev->class)
-   dev->kobj.parent = >class->subsys.kset.kobj;
+   return >class->subsys.kset.kobj;
else if (parent)
-   dev->kobj.parent = >kobj;
+   return >kobj;
 
-   return 0;
+   return NULL;
 }
 #else
-static int virtual_device_parent(struct device *dev)
+static struct kobject * virtual_device_parent(struct device *dev)
 {
if (!dev->class)
-   return -ENODEV;
+   return ERR_PTR(-ENODEV);
 
if (!dev->class->virtual_dir) {
static struct kobject *virtual_dir = NULL;
@@ -415,25 +416,31 @@ static int virtual_device_parent(struct device *dev)
dev->class->virtual_dir = kobject_add_dir(virtual_dir, 
dev->class->name);
}
 
-   dev->kobj.parent = dev->class->virtual_dir;
-   return 0;
+   return dev->class->virtual_dir;
 }
 
-static int setup_parent(struct device *dev, struct device *parent)
+static struct kobject * get_device_parent(struct device *dev,
+ struct device *parent)
 {
-   int error;
-
/* if this is a class device, and has no parent, create one */
if ((dev->class) && (parent == NULL)) {
-   error = virtual_device_parent(dev);
-   if (error)
-   return error;
+   return virtual_device_parent(dev);
} else if (parent)
-   dev->kobj.parent = >kobj;
+   return >kobj;
+   return NULL;
+}
 
+#endif
+static int setup_parent(struct device *dev, struct device *parent)
+{
+   struct kobject *kobj;
+   kobj = get_device_parent(dev, parent);
+   if (IS_ERR(kobj))
+   return PTR_ERR(kobj);
+   if (kobj)
+   dev->kobj.parent = kobj;
return 0;
 }
-#endif
 
 /**
  * device_add - add device to device hierarchy.
@@ -976,12 +983,18 @@ static int device_move_class_links(struct device *dev,
sysfs_remove_link(>kobj, "device");
sysfs_remove_link(_parent->kobj, class_name);
}
-   error = sysfs_create_link(>kobj, _parent->kobj, "device");
-   if (error)
-   goto out;
-   error = sysfs_create_link(_parent->kobj, >kobj, class_name);
-   if (error)
-   sysfs_remove_link(>kobj, "device");
+   if (new_parent) {
+   error = sysfs_create_link(>kobj, _parent->kobj,
+ "device");
+   if (error)
+   goto out;
+   error = sysfs_create_link(_parent->kobj, >kobj,
+ class_name);
+   if (error)
+   sysfs_remove_link(>kobj, "device");
+   }
+   else
+   error = 0;
 out:
kfree(class_name);
return error;
@@ -993,25 +1006,28 @@ out:
 /**
  * device_move - moves a device to a new parent
  * @dev: the pointer to the struct device to be moved
- * @new_parent: the new parent of the device
+ * @new_parent: the new parent of the device (can by NULL)
  */
 int device_move(struct device *dev, struct device *new_parent)
 {
int error;
struct device *old_parent;
+   struct kobject *new_parent_kobj;
 
dev = get_device(dev);
if (!dev)
return -EINVAL;
 
new_parent = get_device(new_parent);
-   if (!new_parent) {
-   error = -EINVAL;
+   new_parent_kobj = get_device_parent (dev, new_parent);
+   if (IS_ERR(new_parent_kobj)) {
+   error = PTR_ERR(new_parent_kobj);
+   

[PATCH 8/28] Modules: only add drivers/ direcory if needed

2007-02-07 Thread Greg KH
From: Greg Kroah-Hartman <[EMAIL PROTECTED]>

This changes the module core to only create the drivers/ directory if we
are going to put something in it.

Cc: Kay Sievers <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 kernel/module.c |   20 +++-
 kernel/params.c |1 -
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/kernel/module.c b/kernel/module.c
index 0f4489a..9de4209 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1131,12 +1131,6 @@ static int mod_sysfs_setup(struct module *mod,
if (err)
goto out;
 
-   mod->mkobj.drivers_dir = kobject_add_dir(>mkobj.kobj, "drivers");
-   if (!mod->mkobj.drivers_dir) {
-   err = -ENOMEM;
-   goto out_unreg;
-   }
-
err = module_param_sysfs_setup(mod, kparam, num_params);
if (err)
goto out_unreg_drivers;
@@ -1151,8 +1145,6 @@ static int mod_sysfs_setup(struct module *mod,
 out_unreg_param:
module_param_sysfs_remove(mod);
 out_unreg_drivers:
-   kobject_unregister(mod->mkobj.drivers_dir);
-out_unreg:
kobject_del(>mkobj.kobj);
kobject_put(>mkobj.kobj);
 out:
@@ -1163,7 +1155,8 @@ static void mod_kobject_remove(struct module *mod)
 {
module_remove_modinfo_attrs(mod);
module_param_sysfs_remove(mod);
-   kobject_unregister(mod->mkobj.drivers_dir);
+   if (mod->mkobj.drivers_dir)
+   kobject_unregister(mod->mkobj.drivers_dir);
 
kobject_unregister(>mkobj.kobj);
 }
@@ -2340,6 +2333,14 @@ static char *make_driver_name(struct device_driver *drv)
return driver_name;
 }
 
+static void module_create_drivers_dir(struct module_kobject *mk)
+{
+   if (!mk || mk->drivers_dir)
+   return;
+
+   mk->drivers_dir = kobject_add_dir(>kobj, "drivers");
+}
+
 void module_add_driver(struct module *mod, struct device_driver *drv)
 {
char *driver_name;
@@ -2367,6 +2368,7 @@ void module_add_driver(struct module *mod, struct 
device_driver *drv)
no_warn = sysfs_create_link(>kobj, >kobj, "module");
driver_name = make_driver_name(drv);
if (driver_name) {
+   module_create_drivers_dir(mk);
no_warn = sysfs_create_link(mk->drivers_dir, >kobj,
driver_name);
kfree(driver_name);
diff --git a/kernel/params.c b/kernel/params.c
index 737b7c5..cbaac85 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -565,7 +565,6 @@ static void __init kernel_param_sysfs_setup(const char 
*name,
ret = kobject_add(>kobj);
BUG_ON(ret < 0);
param_sysfs_setup(mk, kparam, num_params, name_skip);
-   mk->drivers_dir = kobject_add_dir(>kobj, "drivers");
kobject_uevent(>kobj, KOBJ_ADD);
 }
 
-- 
1.4.4.4

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 16/28] driver core: Change function call order in device_bind_driver().

2007-02-07 Thread Greg KH
From: Cornelia Huck <[EMAIL PROTECTED]>

Change function call order in device_bind_driver().

If we create symlinks (which might fail) before adding the device to the list
we don't have to clean up afterwards (which we didn't).

Signed-off-by: Cornelia Huck <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/base/dd.c |8 ++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index f705137..b5bf243 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -86,8 +86,12 @@ static void driver_sysfs_remove(struct device *dev)
  */
 int device_bind_driver(struct device *dev)
 {
-   driver_bound(dev);
-   return driver_sysfs_add(dev);
+   int ret;
+
+   ret = driver_sysfs_add(dev);
+   if (!ret)
+   driver_bound(dev);
+   return ret;
 }
 
 struct stupid_thread_structure {
-- 
1.4.4.4

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [2.6.20][PATCH] fix mempolicy error check on a system with memory-less-node

2007-02-07 Thread KAMEZAWA Hiroyuki
On Wed, 7 Feb 2007 09:43:44 -0800
Andrew Morton <[EMAIL PROTECTED]> wrote:

> > > and to 
> > > accurately present the machine's topology to the user without us having to
> > > go adding falsehoods like this?
> > 
> > a node is a piece of memory. Without memory it doesn't make sense.
> 
> Who said?  I can pick up a piece of circuitry which has four CPUs and no
> RAM, wave it about then stick it in a computer.  The kernel is just wrong,
> surely?
> 
As far as I remember, this was the first e-mail which tells me that there are
- cpu only node
- device only node
- memory only node
during node-hot-plug discussion.

http://www.gelato.unsw.edu.au/archives/linux-ia64/0405/9679.html

Thanks,
-Kame

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 14/28] driver core fixes: device_register() retval check in platform.c

2007-02-07 Thread Greg KH
From: Cornelia Huck <[EMAIL PROTECTED]>

Check the return value of device_register() in platform_bus_init().

Signed-off-by: Cornelia Huck <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/base/platform.c |   11 +--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index f9c903b..30480f6 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -611,8 +611,15 @@ EXPORT_SYMBOL_GPL(platform_bus_type);
 
 int __init platform_bus_init(void)
 {
-   device_register(_bus);
-   return bus_register(_bus_type);
+   int error;
+
+   error = device_register(_bus);
+   if (error)
+   return error;
+   error =  bus_register(_bus_type);
+   if (error)
+   device_unregister(_bus);
+   return error;
 }
 
 #ifndef ARCH_HAS_DMA_GET_REQUIRED_MASK
-- 
1.4.4.4

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 17/28] Driver core: fix race in sysfs between sysfs_remove_file() and read()/write()

2007-02-07 Thread Greg KH
From: Oliver Neukum <[EMAIL PROTECTED]>

This patch prevents a race between IO and removing a file from sysfs.
It introduces a list of sysfs_buffers associated with a file at the inode.
Upon removal of a file the list is walked and the buffers marked orphaned.
IO to orphaned buffers fails with -ENODEV. The driver can safely free
associated data structures or be unloaded.

Signed-off-by: Oliver Neukum <[EMAIL PROTECTED]>
Acked-by: Maneesh Soni <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 fs/sysfs/bin.c |1 +
 fs/sysfs/dir.c |1 +
 fs/sysfs/file.c|   67 ++-
 fs/sysfs/group.c   |1 +
 fs/sysfs/inode.c   |   24 ++
 fs/sysfs/mount.c   |9 +++
 fs/sysfs/symlink.c |1 +
 fs/sysfs/sysfs.h   |   16 
 8 files changed, 103 insertions(+), 17 deletions(-)

diff --git a/fs/sysfs/bin.c b/fs/sysfs/bin.c
index e8f540d..9ec1c85 100644
--- a/fs/sysfs/bin.c
+++ b/fs/sysfs/bin.c
@@ -16,6 +16,7 @@
 #include 
 
 #include 
+#include 
 
 #include "sysfs.h"
 
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index 2bab1b4..9ff0449 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -9,6 +9,7 @@
 #include 
 #include 
 #include 
+#include 
 #include "sysfs.h"
 
 DECLARE_RWSEM(sysfs_rename_sem);
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index 9cfe53e..cba4c1c 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -7,6 +7,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -50,17 +51,29 @@ static struct sysfs_ops subsys_sysfs_ops = {
.store  = subsys_attr_store,
 };
 
+/**
+ * add_to_collection - add buffer to a collection
+ * @buffer:buffer to be added
+ * @node   inode of set to add to
+ */
 
-struct sysfs_buffer {
-   size_t  count;
-   loff_t  pos;
-   char* page;
-   struct sysfs_ops* ops;
-   struct semaphoresem;
-   int needs_read_fill;
-   int event;
-};
+static inline void
+add_to_collection(struct sysfs_buffer *buffer, struct inode *node)
+{
+   struct sysfs_buffer_collection *set = node->i_private;
 
+   mutex_lock(>i_mutex);
+   list_add(>associates, >associates);
+   mutex_unlock(>i_mutex);
+}
+
+static inline void
+remove_from_collection(struct sysfs_buffer *buffer, struct inode *node)
+{
+   mutex_lock(>i_mutex);
+   list_del(>associates);
+   mutex_unlock(>i_mutex);
+}
 
 /**
  * fill_read_buffer - allocate and fill buffer from object.
@@ -153,6 +166,10 @@ sysfs_read_file(struct file *file, char __user *buf, 
size_t count, loff_t *ppos)
ssize_t retval = 0;
 
down(>sem);
+   if (buffer->orphaned) {
+   retval = -ENODEV;
+   goto out;
+   }
if (buffer->needs_read_fill) {
if ((retval = fill_read_buffer(file->f_path.dentry,buffer)))
goto out;
@@ -165,7 +182,6 @@ out:
return retval;
 }
 
-
 /**
  * fill_write_buffer - copy buffer from userspace.
  * @buffer:data buffer for file.
@@ -243,19 +259,25 @@ sysfs_write_file(struct file *file, const char __user 
*buf, size_t count, loff_t
ssize_t len;
 
down(>sem);
+   if (buffer->orphaned) {
+   len = -ENODEV;
+   goto out;
+   }
len = fill_write_buffer(buffer, buf, count);
if (len > 0)
len = flush_write_buffer(file->f_path.dentry, buffer, len);
if (len > 0)
*ppos += len;
+out:
up(>sem);
return len;
 }
 
-static int check_perm(struct inode * inode, struct file * file)
+static int sysfs_open_file(struct inode *inode, struct file *file)
 {
struct kobject *kobj = sysfs_get_kobject(file->f_path.dentry->d_parent);
struct attribute * attr = to_attr(file->f_path.dentry);
+   struct sysfs_buffer_collection *set;
struct sysfs_buffer * buffer;
struct sysfs_ops * ops = NULL;
int error = 0;
@@ -285,6 +307,18 @@ static int check_perm(struct inode * inode, struct file * 
file)
if (!ops)
goto Eaccess;
 
+   /* make sure we have a collection to add our buffers to */
+   mutex_lock(>i_mutex);
+   if (!(set = inode->i_private)) {
+   if (!(set = inode->i_private = kmalloc(sizeof(struct 
sysfs_buffer_collection), GFP_KERNEL))) {
+   error = -ENOMEM;
+   goto Done;
+   } else {
+   INIT_LIST_HEAD(>associates);
+   }
+   }
+   mutex_unlock(>i_mutex);
+
/* File needs write support.
 * The inode's perms must say it's ok, 
 * and we must have a store method.
@@ -310,9 +344,11 @@ static int check_perm(struct inode * inode, struct file * 
file)
 */
buffer = kzalloc(sizeof(struct 

[PATCH 13/28] driver core fixes: make_class_name() retval checks

2007-02-07 Thread Greg KH
From: Cornelia Huck <[EMAIL PROTECTED]>

Make make_class_name() return NULL on error and fixup callers in the
driver core.

Signed-off-by: Cornelia Huck <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/base/class.c |   21 ++---
 drivers/base/core.c  |   17 +++--
 2 files changed, 25 insertions(+), 13 deletions(-)

diff --git a/drivers/base/class.c b/drivers/base/class.c
index 8bf2ca2..96def1d 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -364,7 +364,7 @@ char *make_class_name(const char *name, struct kobject 
*kobj)
 
class_name = kmalloc(size, GFP_KERNEL);
if (!class_name)
-   return ERR_PTR(-ENOMEM);
+   return NULL;
 
strcpy(class_name, name);
strcat(class_name, ":");
@@ -411,8 +411,11 @@ static int make_deprecated_class_device_links(struct 
class_device *class_dev)
return 0;
 
class_name = make_class_name(class_dev->class->name, _dev->kobj);
-   error = sysfs_create_link(_dev->dev->kobj, _dev->kobj,
- class_name);
+   if (class_name)
+   error = sysfs_create_link(_dev->dev->kobj,
+ _dev->kobj, class_name);
+   else
+   error = -ENOMEM;
kfree(class_name);
return error;
 }
@@ -425,7 +428,8 @@ static void remove_deprecated_class_device_links(struct 
class_device *class_dev)
return;
 
class_name = make_class_name(class_dev->class->name, _dev->kobj);
-   sysfs_remove_link(_dev->dev->kobj, class_name);
+   if (class_name)
+   sysfs_remove_link(_dev->dev->kobj, class_name);
kfree(class_name);
 }
 #else
@@ -863,9 +867,12 @@ int class_device_rename(struct class_device *class_dev, 
char *new_name)
if (class_dev->dev) {
new_class_name = make_class_name(class_dev->class->name,
 _dev->kobj);
-   sysfs_create_link(_dev->dev->kobj, _dev->kobj,
- new_class_name);
-   sysfs_remove_link(_dev->dev->kobj, old_class_name);
+   if (new_class_name)
+   sysfs_create_link(_dev->dev->kobj,
+ _dev->kobj, new_class_name);
+   if (old_class_name)
+   sysfs_remove_link(_dev->dev->kobj,
+   old_class_name);
}
 #endif
class_device_put(class_dev);
diff --git a/drivers/base/core.c b/drivers/base/core.c
index c60114d..6fee3e6 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -527,9 +527,13 @@ int device_add(struct device *dev)
  >kobj, dev->bus_id);
 #ifdef CONFIG_SYSFS_DEPRECATED
if (parent) {
-   sysfs_create_link(>kobj, >parent->kobj, 
"device");
-   class_name = make_class_name(dev->class->name, 
>kobj);
-   sysfs_create_link(>parent->kobj, >kobj, 
class_name);
+   sysfs_create_link(>kobj, >parent->kobj,
+   "device");
+   class_name = make_class_name(dev->class->name,
+   >kobj);
+   if (class_name)
+   sysfs_create_link(>parent->kobj,
+ >kobj, class_name);
}
 #endif
}
@@ -672,7 +676,9 @@ void device_del(struct device * dev)
if (parent) {
char *class_name = make_class_name(dev->class->name,
   >kobj);
-   sysfs_remove_link(>parent->kobj, class_name);
+   if (class_name)
+   sysfs_remove_link(>parent->kobj,
+ class_name);
kfree(class_name);
sysfs_remove_link(>kobj, "device");
}
@@ -975,8 +981,7 @@ static int device_move_class_links(struct device *dev,
 
class_name = make_class_name(dev->class->name, >kobj);
if (!class_name) {
-   error = PTR_ERR(class_name);
-   class_name = NULL;
+   error = -ENOMEM;
goto out;
}
if (old_parent) {
-- 
1.4.4.4

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 10/28] SERIO: add the sysfs driver name to all modules

2007-02-07 Thread Greg KH
From: Greg Kroah-Hartman <[EMAIL PROTECTED]>

This adds the module name to all SERIO drivers, if they are built into
the kernel or not.  It will show up in /sys/modules/MODULE_NAME/drivers/

Cc: Kay Sievers <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/input/serio/serio.c |6 --
 include/linux/serio.h   |5 +
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c
index f0ce822..17c8c63 100644
--- a/drivers/input/serio/serio.c
+++ b/drivers/input/serio/serio.c
@@ -45,7 +45,7 @@ EXPORT_SYMBOL(serio_interrupt);
 EXPORT_SYMBOL(__serio_register_port);
 EXPORT_SYMBOL(serio_unregister_port);
 EXPORT_SYMBOL(serio_unregister_child_port);
-EXPORT_SYMBOL(serio_register_driver);
+EXPORT_SYMBOL(__serio_register_driver);
 EXPORT_SYMBOL(serio_unregister_driver);
 EXPORT_SYMBOL(serio_open);
 EXPORT_SYMBOL(serio_close);
@@ -789,12 +789,14 @@ static void serio_attach_driver(struct serio_driver *drv)
drv->driver.name, error);
 }
 
-int serio_register_driver(struct serio_driver *drv)
+int __serio_register_driver(struct serio_driver *drv, struct module *owner, 
const char *mod_name)
 {
int manual_bind = drv->manual_bind;
int error;
 
drv->driver.bus = _bus;
+   drv->driver.owner = owner;
+   drv->driver.mod_name = mod_name;
 
/*
 * Temporarily disable automatic binding because probing
diff --git a/include/linux/serio.h b/include/linux/serio.h
index 0f478a8..ac2c70e 100644
--- a/include/linux/serio.h
+++ b/include/linux/serio.h
@@ -86,6 +86,11 @@ static inline void serio_register_port(struct serio *serio)
 void serio_unregister_port(struct serio *serio);
 void serio_unregister_child_port(struct serio *serio);
 
+int __serio_register_driver(struct serio_driver *drv, struct module *owner, 
const char *mod_name);
+static inline int serio_register_driver(struct serio_driver *drv)
+{
+   return __serio_register_driver(drv, THIS_MODULE, KBUILD_MODNAME);
+}
 int serio_register_driver(struct serio_driver *drv);
 void serio_unregister_driver(struct serio_driver *drv);
 
-- 
1.4.4.4

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 26/28] Driver core: allow to delay the uevent at device creation time

2007-02-07 Thread Greg KH
From: Kay Sievers <[EMAIL PROTECTED]>

For the block subsystem, we want to delay all uevents until the
disk has been scanned and allpartitons are already created before
the first event is sent out.

Signed-off-by: Kay Sievers <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/base/core.c|3 ++-
 include/linux/device.h |3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/base/core.c b/drivers/base/core.c
index 34ac187..e136142 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -589,7 +589,8 @@ int device_add(struct device *dev)
goto PMError;
if ((error = bus_add_device(dev)))
goto BusError;
-   kobject_uevent(>kobj, KOBJ_ADD);
+   if (!dev->uevent_suppress)
+   kobject_uevent(>kobj, KOBJ_ADD);
if ((error = bus_attach_device(dev)))
goto AttachError;
if (parent)
diff --git a/include/linux/device.h b/include/linux/device.h
index e1e164f..5ca1cdb 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -399,9 +399,10 @@ struct device {
 
/* class_device migration path */
struct list_headnode;
-   struct class*class; /* optional*/
+   struct class*class;
dev_t   devt;   /* dev_t, creates the sysfs 
"dev" */
struct attribute_group  **groups;   /* optional groups */
+   int uevent_suppress;
 
void(*release)(struct device * dev);
 };
-- 
1.4.4.4

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 9/28] PCI: add the sysfs driver name to all modules

2007-02-07 Thread Greg KH
From: Greg Kroah-Hartman <[EMAIL PROTECTED]>

This adds the module name to all PCI drivers, if they are built into the
kernel or not.  It will show up in /sys/modules/MODULE_NAME/drivers/

It also fixes up the IDE core, which was calling __pci_register_driver()
directly.

Cc: Kay Sievers <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/ide/setup-pci.c  |7 ---
 drivers/pci/pci-driver.c |4 +++-
 include/linux/ide.h  |4 ++--
 include/linux/pci.h  |5 +++--
 4 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c
index 695e239..a52c80f 100644
--- a/drivers/ide/setup-pci.c
+++ b/drivers/ide/setup-pci.c
@@ -783,10 +783,11 @@ static LIST_HEAD(ide_pci_drivers);
  * Returns are the same as for pci_register_driver
  */
 
-int __ide_pci_register_driver(struct pci_driver *driver, struct module *module)
+int __ide_pci_register_driver(struct pci_driver *driver, struct module *module,
+ const char *mod_name)
 {
if(!pre_init)
-   return __pci_register_driver(driver, module);
+   return __pci_register_driver(driver, module, mod_name);
driver->driver.owner = module;
list_add_tail(>node, _pci_drivers);
return 0;
@@ -862,6 +863,6 @@ void __init ide_scan_pcibus (int scan_direction)
{
list_del(l);
d = list_entry(l, struct pci_driver, node);
-   __pci_register_driver(d, d->driver.owner);
+   __pci_register_driver(d, d->driver.owner, d->driver.mod_name);
}
 }
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 92d5e8d..3587668 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -422,7 +422,8 @@ static struct kobj_type pci_driver_kobj_type = {
  * If no error occurred, the driver remains registered even if 
  * no device was claimed during registration.
  */
-int __pci_register_driver(struct pci_driver *drv, struct module *owner)
+int __pci_register_driver(struct pci_driver *drv, struct module *owner,
+ const char *mod_name)
 {
int error;
 
@@ -430,6 +431,7 @@ int __pci_register_driver(struct pci_driver *drv, struct 
module *owner)
drv->driver.name = drv->name;
drv->driver.bus = _bus_type;
drv->driver.owner = owner;
+   drv->driver.mod_name = mod_name;
drv->driver.kobj.ktype = _driver_kobj_type;
 
if (pci_multithread_probe)
diff --git a/include/linux/ide.h b/include/linux/ide.h
index e26a039..827688f 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1192,8 +1192,8 @@ void ide_init_disk(struct gendisk *, ide_drive_t *);
 extern int ideprobe_init(void);
 
 extern void ide_scan_pcibus(int scan_direction) __init;
-extern int __ide_pci_register_driver(struct pci_driver *driver, struct module 
*owner);
-#define ide_pci_register_driver(d) __ide_pci_register_driver(d, THIS_MODULE)
+extern int __ide_pci_register_driver(struct pci_driver *driver, struct module 
*owner, const char *mod_name);
+#define ide_pci_register_driver(d) __ide_pci_register_driver(d, THIS_MODULE, 
KBUILD_MODNAME)
 void ide_pci_setup_ports(struct pci_dev *, struct ide_pci_device_s *, int, 
ata_index_t *);
 extern void ide_setup_pci_noise (struct pci_dev *dev, struct ide_pci_device_s 
*d);
 
diff --git a/include/linux/pci.h b/include/linux/pci.h
index f3c617e..cb899eb 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -573,10 +573,11 @@ int __must_check pci_bus_alloc_resource(struct pci_bus 
*bus,
 void pci_enable_bridges(struct pci_bus *bus);
 
 /* Proper probing supporting hot-pluggable devices */
-int __must_check __pci_register_driver(struct pci_driver *, struct module *);
+int __must_check __pci_register_driver(struct pci_driver *, struct module *,
+  const char *mod_name);
 static inline int __must_check pci_register_driver(struct pci_driver *driver)
 {
-   return __pci_register_driver(driver, THIS_MODULE);
+   return __pci_register_driver(driver, THIS_MODULE, KBUILD_MODNAME);
 }
 
 void pci_unregister_driver(struct pci_driver *);
-- 
1.4.4.4

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 25/28] Driver core: add device_type to struct device

2007-02-07 Thread Greg KH
From: Kay Sievers <[EMAIL PROTECTED]>

This allows us to add type specific attributes, uevent vars and
release funtions.

A subsystem can carry different types of devices like the "block"
subsys has disks and partitions. Both types create a different set
of attributes, but belong to the same subsystem.

This corresponds to the low level objects:
  kobject   -> device   (object/device data)
  kobj_type -> device_type  (type of object/device we are embedded in)
  kset  -> class/bus(list of objects/devices of a subsystem)

Signed-off-by: Kay Sievers <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/base/core.c  |   57 -
 drivers/usb/input/hid-lgff.c |4 +-
 include/linux/device.h   |8 ++
 3 files changed, 49 insertions(+), 20 deletions(-)

diff --git a/drivers/base/core.c b/drivers/base/core.c
index 7a5336f..34ac187 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -95,6 +95,8 @@ static void device_release(struct kobject * kobj)
 
if (dev->release)
dev->release(dev);
+   else if (dev->type && dev->type->release)
+   dev->type->release(dev);
else if (dev->class && dev->class->dev_release)
dev->class->dev_release(dev);
else {
@@ -206,19 +208,25 @@ static int dev_uevent(struct kset *kset, struct kobject 
*kobj, char **envp,
if (dev->bus && dev->bus->uevent) {
/* have the bus specific function add its stuff */
retval = dev->bus->uevent(dev, envp, num_envp, buffer, 
buffer_size);
-   if (retval) {
-   pr_debug ("%s - uevent() returned %d\n",
+   if (retval)
+   pr_debug ("%s: bus uevent() returned %d\n",
  __FUNCTION__, retval);
-   }
}
 
if (dev->class && dev->class->dev_uevent) {
/* have the class specific function add its stuff */
retval = dev->class->dev_uevent(dev, envp, num_envp, buffer, 
buffer_size);
-   if (retval) {
-   pr_debug("%s - dev_uevent() returned %d\n",
-__FUNCTION__, retval);
-   }
+   if (retval)
+   pr_debug("%s: class uevent() returned %d\n",
+__FUNCTION__, retval);
+   }
+
+   if (dev->type && dev->type->uevent) {
+   /* have the device type specific fuction add its stuff */
+   retval = dev->type->uevent(dev, envp, num_envp, buffer, 
buffer_size);
+   if (retval)
+   pr_debug("%s: dev_type uevent() returned %d\n",
+__FUNCTION__, retval);
}
 
return retval;
@@ -269,37 +277,50 @@ static void device_remove_groups(struct device *dev)
 static int device_add_attrs(struct device *dev)
 {
struct class *class = dev->class;
+   struct device_type *type = dev->type;
int error = 0;
int i;
 
-   if (!class)
-   return 0;
-
-   if (class->dev_attrs) {
+   if (class && class->dev_attrs) {
for (i = 0; attr_name(class->dev_attrs[i]); i++) {
error = device_create_file(dev, >dev_attrs[i]);
if (error)
break;
}
+   if (error)
+   while (--i >= 0)
+   device_remove_file(dev, >dev_attrs[i]);
}
-   if (error)
-   while (--i >= 0)
-   device_remove_file(dev, >dev_attrs[i]);
+
+   if (type && type->attrs) {
+   for (i = 0; attr_name(type->attrs[i]); i++) {
+   error = device_create_file(dev, >attrs[i]);
+   if (error)
+   break;
+   }
+   if (error)
+   while (--i >= 0)
+   device_remove_file(dev, >attrs[i]);
+   }
+
return error;
 }
 
 static void device_remove_attrs(struct device *dev)
 {
struct class *class = dev->class;
+   struct device_type *type = dev->type;
int i;
 
-   if (!class)
-   return;
-
-   if (class->dev_attrs) {
+   if (class && class->dev_attrs) {
for (i = 0; attr_name(class->dev_attrs[i]); i++)
device_remove_file(dev, >dev_attrs[i]);
}
+
+   if (type && type->attrs) {
+   for (i = 0; attr_name(type->attrs[i]); i++)
+   device_remove_file(dev, >attrs[i]);
+   }
 }
 
 
diff --git a/drivers/usb/input/hid-lgff.c b/drivers/usb/input/hid-lgff.c
index e474662..4f4fc3b 100644
--- a/drivers/usb/input/hid-lgff.c
+++ b/drivers/usb/input/hid-lgff.c
@@ -32,7 +32,7 @@
 #include 
 

[PATCH 28/28] sysfs: Shadow directory support

2007-02-07 Thread Greg KH
From: Eric W. Biederman <[EMAIL PROTECTED]>

The problem.  When implementing a network namespace I need to be able
to have multiple network devices with the same name.  Currently this
is a problem for /sys/class/net/*.

What I want is a separate /sys/class/net directory in sysfs for each
network namespace, and I want to name each of them /sys/class/net.

I looked and the VFS actually allows that.  All that is needed is
for /sys/class/net to implement a follow link method to redirect
lookups to the real directory you want.

Implementing a follow link method that is sensitive to the current
network namespace turns out to be 3 lines of code so it looks like a
clean approach.  Modifying sysfs so it doesn't get in my was is a bit
trickier.

I am calling the concept of multiple directories all at the same path
in the filesystem shadow directories.  With the directory entry really
at that location the shadow master.

The following patch modifies sysfs so it can handle a directory
structure slightly different from the kobject tree so I can implement
the shadow directories for handling /sys/class/net/.

Signed-off-by: Eric W. Biederman <[EMAIL PROTECTED]>
Cc: Maneesh Soni <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 fs/sysfs/dir.c  |  207 +++
 fs/sysfs/group.c|1 +
 fs/sysfs/inode.c|   10 +++
 fs/sysfs/mount.c|2 +-
 fs/sysfs/sysfs.h|5 +
 include/linux/kobject.h |4 +
 include/linux/sysfs.h   |   23 +-
 lib/kobject.c   |   42 +-
 8 files changed, 249 insertions(+), 45 deletions(-)

diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index 9ff0449..9dcdf55 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -33,8 +33,7 @@ static struct dentry_operations sysfs_dentry_ops = {
 /*
  * Allocates a new sysfs_dirent and links it to the parent sysfs_dirent
  */
-static struct sysfs_dirent * sysfs_new_dirent(struct sysfs_dirent * parent_sd,
-   void * element)
+static struct sysfs_dirent * __sysfs_new_dirent(void * element)
 {
struct sysfs_dirent * sd;
 
@@ -46,12 +45,28 @@ static struct sysfs_dirent * sysfs_new_dirent(struct 
sysfs_dirent * parent_sd,
atomic_set(>s_count, 1);
atomic_set(>s_event, 1);
INIT_LIST_HEAD(>s_children);
-   list_add(>s_sibling, _sd->s_children);
+   INIT_LIST_HEAD(>s_sibling);
sd->s_element = element;
 
return sd;
 }
 
+static void __sysfs_list_dirent(struct sysfs_dirent *parent_sd,
+ struct sysfs_dirent *sd)
+{
+   if (sd)
+   list_add(>s_sibling, _sd->s_children);
+}
+
+static struct sysfs_dirent * sysfs_new_dirent(struct sysfs_dirent *parent_sd,
+   void * element)
+{
+   struct sysfs_dirent *sd;
+   sd = __sysfs_new_dirent(element);
+   __sysfs_list_dirent(parent_sd, sd);
+   return sd;
+}
+
 /*
  *
  * Return -EEXIST if there is already a sysfs element with the same name for
@@ -78,14 +93,14 @@ int sysfs_dirent_exist(struct sysfs_dirent *parent_sd,
 }
 
 
-int sysfs_make_dirent(struct sysfs_dirent * parent_sd, struct dentry * dentry,
-   void * element, umode_t mode, int type)
+static struct sysfs_dirent *
+__sysfs_make_dirent(struct dentry *dentry, void *element, mode_t mode, int 
type)
 {
struct sysfs_dirent * sd;
 
-   sd = sysfs_new_dirent(parent_sd, element);
+   sd = __sysfs_new_dirent(element);
if (!sd)
-   return -ENOMEM;
+   goto out;
 
sd->s_mode = mode;
sd->s_type = type;
@@ -95,7 +110,19 @@ int sysfs_make_dirent(struct sysfs_dirent * parent_sd, 
struct dentry * dentry,
dentry->d_op = _dentry_ops;
}
 
-   return 0;
+out:
+   return sd;
+}
+
+int sysfs_make_dirent(struct sysfs_dirent * parent_sd, struct dentry * dentry,
+   void * element, umode_t mode, int type)
+{
+   struct sysfs_dirent *sd;
+
+   sd = __sysfs_make_dirent(dentry, element, mode, type);
+   __sysfs_list_dirent(parent_sd, sd);
+
+   return sd ? 0 : -ENOMEM;
 }
 
 static int init_dir(struct inode * inode)
@@ -166,11 +193,11 @@ int sysfs_create_subdir(struct kobject * k, const char * 
n, struct dentry ** d)
 
 /**
  * sysfs_create_dir - create a directory for an object.
- * @parent:parent parent object.
  * @kobj:  object we're creating directory for. 
+ * @shadow_parent: parent parent object.
  */
 
-int sysfs_create_dir(struct kobject * kobj)
+int sysfs_create_dir(struct kobject * kobj, struct dentry *shadow_parent)
 {
struct dentry * dentry = NULL;
struct dentry * parent;
@@ -178,7 +205,9 @@ int sysfs_create_dir(struct kobject * kobj)
 
BUG_ON(!kobj);
 
-   if (kobj->parent)
+   if (shadow_parent)
+   parent = shadow_parent;
+   else if 

[PATCH 22/28] HOWTO: Add a reference to Harbison and Steele

2007-02-07 Thread Greg KH
From: Robert P. J. Day <[EMAIL PROTECTED]>

Add a reference to Harbison and Steele's C book.

Signed-off-by: Robert P. J. Day <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 Documentation/HOWTO |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/Documentation/HOWTO b/Documentation/HOWTO
index 8d51c14..48123db 100644
--- a/Documentation/HOWTO
+++ b/Documentation/HOWTO
@@ -30,6 +30,7 @@ are not a good substitute for a solid C education and/or 
years of
 experience, the following books are good for, if anything, reference:
  - "The C Programming Language" by Kernighan and Ritchie [Prentice Hall]
  - "Practical C Programming" by Steve Oualline [O'Reilly]
+ - "C:  A Reference Manual" by Harbison and Steele [Prentice Hall]
 
 The kernel is written using GNU C and the GNU toolchain.  While it
 adheres to the ISO C89 standard, it uses a number of extensions that are
-- 
1.4.4.4

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 24/28] Driver core: add uevent vars for devices of a class

2007-02-07 Thread Greg KH
From: Kay Sievers <[EMAIL PROTECTED]>

Devices converted from class_device to device should have
the same uevent keys as the original class_device had. We
search up the parents until we find the first bus device and
add the (already deprecated) PHYDEV* values.

Signed-off-by: Kay Sievers <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/base/core.c |   46 ++
 1 files changed, 34 insertions(+), 12 deletions(-)

diff --git a/drivers/base/core.c b/drivers/base/core.c
index 6fee3e6..7a5336f 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -154,25 +154,47 @@ static int dev_uevent(struct kset *kset, struct kobject 
*kobj, char **envp,
   "MINOR=%u", MINOR(dev->devt));
}
 
-#ifdef CONFIG_SYSFS_DEPRECATED
-   /* add bus name (same as SUBSYSTEM, deprecated) */
-   if (dev->bus)
-   add_uevent_var(envp, num_envp, ,
-  buffer, buffer_size, ,
-  "PHYSDEVBUS=%s", dev->bus->name);
-#endif
-
-   /* add driver name (PHYSDEV* values are deprecated)*/
-   if (dev->driver) {
+   if (dev->driver)
add_uevent_var(envp, num_envp, ,
   buffer, buffer_size, ,
   "DRIVER=%s", dev->driver->name);
+
 #ifdef CONFIG_SYSFS_DEPRECATED
+   if (dev->class) {
+   struct device *parent = dev->parent;
+
+   /* find first bus device in parent chain */
+   while (parent && !parent->bus)
+   parent = parent->parent;
+   if (parent && parent->bus) {
+   const char *path;
+
+   path = kobject_get_path(>kobj, GFP_KERNEL);
+   add_uevent_var(envp, num_envp, ,
+  buffer, buffer_size, ,
+  "PHYSDEVPATH=%s", path);
+   kfree(path);
+
+   add_uevent_var(envp, num_envp, ,
+  buffer, buffer_size, ,
+  "PHYSDEVBUS=%s", parent->bus->name);
+
+   if (parent->driver)
+   add_uevent_var(envp, num_envp, ,
+  buffer, buffer_size, ,
+  "PHYSDEVDRIVER=%s", 
parent->driver->name);
+   }
+   } else if (dev->bus) {
add_uevent_var(envp, num_envp, ,
   buffer, buffer_size, ,
-  "PHYSDEVDRIVER=%s", dev->driver->name);
-#endif
+  "PHYSDEVBUS=%s", dev->bus->name);
+
+   if (dev->driver)
+   add_uevent_var(envp, num_envp, ,
+  buffer, buffer_size, ,
+  "PHYSDEVDRIVER=%s", dev->driver->name);
}
+#endif
 
/* terminate, set to next free slot, shrink available space */
envp[i] = NULL;
-- 
1.4.4.4

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 23/28] SYSFS: Fix missing include of list.h in sysfs.h

2007-02-07 Thread Greg KH
From: Frank Haverkamp <[EMAIL PROTECTED]>

Sysfs.h uses definitions (e.g. struct list_head s_sibling) from list.h
but does not include it.

Signed-off-by: Frank Haverkamp <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 include/linux/sysfs.h |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index 2129d1b..eee4859 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -11,6 +11,7 @@
 #define _SYSFS_H_
 
 #include 
+#include 
 #include 
 
 struct kobject;
-- 
1.4.4.4

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 19/28] sysfs: kobject_put cleanup

2007-02-07 Thread Greg KH
From: Mariusz Kozlowski <[EMAIL PROTECTED]>

This patch removes redundant argument checks for kobject_put().

Signed-off-by: Mariusz Kozlowski <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 fs/sysfs/bin.c  |5 ++---
 fs/sysfs/file.c |5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/fs/sysfs/bin.c b/fs/sysfs/bin.c
index 9ec1c85..d3b9f5f 100644
--- a/fs/sysfs/bin.c
+++ b/fs/sysfs/bin.c
@@ -147,7 +147,7 @@ static int open(struct inode * inode, struct file * file)
  Error:
module_put(attr->attr.owner);
  Done:
-   if (error && kobj)
+   if (error)
kobject_put(kobj);
return error;
 }
@@ -158,8 +158,7 @@ static int release(struct inode * inode, struct file * file)
struct bin_attribute * attr = to_bin_attr(file->f_path.dentry);
u8 * buffer = file->private_data;
 
-   if (kobj) 
-   kobject_put(kobj);
+   kobject_put(kobj);
module_put(attr->attr.owner);
kfree(buffer);
return 0;
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index cba4c1c..46618f8 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -361,7 +361,7 @@ static int sysfs_open_file(struct inode *inode, struct file 
*file)
error = -EACCES;
module_put(attr->owner);
  Done:
-   if (error && kobj)
+   if (error)
kobject_put(kobj);
return error;
 }
@@ -375,8 +375,7 @@ static int sysfs_release(struct inode * inode, struct file 
* filp)
 
if (buffer)
remove_from_collection(buffer, inode);
-   if (kobj) 
-   kobject_put(kobj);
+   kobject_put(kobj);
/* After this point, attr should not be accessed. */
module_put(owner);
 
-- 
1.4.4.4

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 21/28] sysfs: error handling in sysfs, fill_read_buffer()

2007-02-07 Thread Greg KH
From: Oliver Neukum <[EMAIL PROTECTED]>

if a driver returns an error in fill_read_buffer(), the buffer will be
marked as filled. Subsequent reads will return eof. But there is
no data because of an error, not because it has been read.
Not marking the buffer filled is the obvious fix.

Signed-off-by: Oliver Neukum <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 fs/sysfs/file.c |   10 ++
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index 46618f8..c0e1176 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -83,7 +83,8 @@ remove_from_collection(struct sysfs_buffer *buffer, struct 
inode *node)
  * Allocate @buffer->page, if it hasn't been already, then call the
  * kobject's show() method to fill the buffer with this attribute's 
  * data. 
- * This is called only once, on the file's first read. 
+ * This is called only once, on the file's first read unless an error
+ * is returned.
  */
 static int fill_read_buffer(struct dentry * dentry, struct sysfs_buffer * 
buffer)
 {
@@ -101,12 +102,13 @@ static int fill_read_buffer(struct dentry * dentry, 
struct sysfs_buffer * buffer
 
buffer->event = atomic_read(>s_event);
count = ops->show(kobj,attr,buffer->page);
-   buffer->needs_read_fill = 0;
BUG_ON(count > (ssize_t)PAGE_SIZE);
-   if (count >= 0)
+   if (count >= 0) {
+   buffer->needs_read_fill = 0;
buffer->count = count;
-   else
+   } else {
ret = count;
+   }
return ret;
 }
 
-- 
1.4.4.4

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 20/28] kobject: kobject_put cleanup

2007-02-07 Thread Greg KH
From: Mariusz Kozlowski <[EMAIL PROTECTED]>

This patch removes redundant argument checks for kobject_put().

Signed-off-by: Mariusz Kozlowski <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 lib/kobject.c |6 ++
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/lib/kobject.c b/lib/kobject.c
index c033dc8..74b8dbc 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -195,8 +195,7 @@ int kobject_add(struct kobject * kobj)
if (error) {
/* unlink does the kobject_put() for us */
unlink(kobj);
-   if (parent)
-   kobject_put(parent);
+   kobject_put(parent);
 
/* be noisy on error issues */
if (error == -EEXIST)
@@ -420,8 +419,7 @@ void kobject_cleanup(struct kobject * kobj)
t->release(kobj);
if (s)
kset_put(s);
-   if (parent) 
-   kobject_put(parent);
+   kobject_put(parent);
 }
 
 static void kobject_release(struct kref *kref)
-- 
1.4.4.4

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 27/28] Driver Core: Increase the default timeout value of the firmware subsystem

2007-02-07 Thread Greg KH
From: Dave Jones <[EMAIL PROTECTED]>

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=174589

The ipw driver sometimes takes a long time to load its firmware.
Whilst the ipw driver should be using the async interface of
the firmware loader to make this a non-issue, this is a minimal fix.

Signed-off-by: Dave Jones <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/base/firmware_class.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 64558f4..c0a979a 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -35,7 +35,7 @@ enum {
FW_STATUS_READY_NOHOTPLUG,
 };
 
-static int loading_timeout = 10;   /* In seconds */
+static int loading_timeout = 60;   /* In seconds */
 
 /* fw_lock could be moved to 'struct firmware_priv' but since it is just
  * guarding for corner cases a global lock should be OK */
-- 
1.4.4.4

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 18/28] sysfs: suppress lockdep warnings

2007-02-07 Thread Greg KH
From: Frederik Deweerdt <[EMAIL PROTECTED]>

Lockdep issues the following warning:
[9.064000] =
[9.064000] [ INFO: possible recursive locking detected ]
[9.064000] 2.6.20-rc3-mm1 #3
[9.064000] -
[9.064000] init/1 is trying to acquire lock:
[9.064000]  (_inode_imutex_key){--..}, at: [] 
mutex_lock+0x1c/0x1f
[9.064000]
[9.064000] but task is already holding lock:
[9.064000]  (_inode_imutex_key){--..}, at: [] 
mutex_lock+0x1c/0x1f
[9.065000]
[9.065000] other info that might help us debug this:
[9.065000] 2 locks held by init/1:
[9.065000]  #0:  (tty_mutex){--..}, at: [] mutex_lock+0x1c/0x1f
[9.065000]  #1:  (_inode_imutex_key){--..}, at: [] 
mutex_lock+0x1c/0x1f
[9.065000]
[9.065000] stack backtrace:
[9.065000]  [] show_trace_log_lvl+0x1a/0x30
[9.066000]  [] show_trace+0x12/0x14
[9.066000]  [] dump_stack+0x16/0x18
[9.066000]  [] print_deadlock_bug+0xb9/0xc3
[9.066000]  [] check_deadlock+0x55/0x5a
[9.066000]  [] __lock_acquire+0x371/0xbf0
[9.066000]  [] lock_acquire+0x69/0x83
[9.066000]  [] __mutex_lock_slowpath+0x75/0x2d1
[9.066000]  [] mutex_lock+0x1c/0x1f
[9.066000]  [] sysfs_drop_dentry+0xb1/0x133
[9.066000]  [] sysfs_hash_and_remove+0xb3/0x142
[9.066000]  [] sysfs_remove_file+0xd/0x10
[9.067000]  [] device_remove_file+0x23/0x2e
[9.067000]  [] device_del+0x188/0x1e6
[9.067000]  [] device_unregister+0xb/0x15
[9.067000]  [] device_destroy+0x9c/0xa9
[9.067000]  [] vcs_remove_sysfs+0x1c/0x3b
[9.067000]  [] con_close+0x5e/0x6b
[9.067000]  [] release_dev+0x4c4/0x6e5
[9.067000]  [] tty_release+0x12/0x1c
[9.067000]  [] __fput+0x177/0x1a0
[9.067000]  [] fput+0x3b/0x41
[9.068000]  [] filp_close+0x36/0x65
[9.068000]  [] sys_close+0x63/0xa4
[9.068000]  [] sysenter_past_esp+0x5f/0x99
[9.068000]  ===

This is due to sysfs_hash_and_remove() holding dir->d_inode->i_mutex
before calling sysfs_drop_dentry() which calls orphan_all_buffers()
which in turn takes node->i_mutex.

Signed-off-by: Frederik Deweerdt <[EMAIL PROTECTED]>
Cc: Oliver Neukum <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 fs/sysfs/inode.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
index 1a81ebc..dbd820f 100644
--- a/fs/sysfs/inode.c
+++ b/fs/sysfs/inode.c
@@ -215,7 +215,7 @@ static inline void orphan_all_buffers(struct inode *node)
struct sysfs_buffer_collection *set = node->i_private;
struct sysfs_buffer *buf;
 
-   mutex_lock(>i_mutex);
+   mutex_lock_nested(>i_mutex, I_MUTEX_CHILD);
if (node->i_private) {
list_for_each_entry(buf, >associates, associates) {
down(>sem);
@@ -272,7 +272,7 @@ int sysfs_hash_and_remove(struct dentry * dir, const char * 
name)
return -ENOENT;
 
parent_sd = dir->d_fsdata;
-   mutex_lock(>d_inode->i_mutex);
+   mutex_lock_nested(>d_inode->i_mutex, I_MUTEX_PARENT);
list_for_each_entry(sd, _sd->s_children, s_sibling) {
if (!sd->s_element)
continue;
-- 
1.4.4.4

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 11/28] USB: add the sysfs driver name to all modules

2007-02-07 Thread Greg KH
From: Greg Kroah-Hartman <[EMAIL PROTECTED]>

This adds the module name to all USB drivers, if they are built into the
kernel or not.  It will show up in /sys/modules/MODULE_NAME/drivers/

Cc: Kay Sievers <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/usb/core/driver.c |4 +++-
 include/linux/usb.h   |5 +++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index d6eb5ce..d505926 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -750,7 +750,8 @@ EXPORT_SYMBOL_GPL(usb_deregister_device_driver);
  * usb_register_dev() to enable that functionality.  This function no longer
  * takes care of that.
  */
-int usb_register_driver(struct usb_driver *new_driver, struct module *owner)
+int usb_register_driver(struct usb_driver *new_driver, struct module *owner,
+   const char *mod_name)
 {
int retval = 0;
 
@@ -763,6 +764,7 @@ int usb_register_driver(struct usb_driver *new_driver, 
struct module *owner)
new_driver->drvwrap.driver.probe = usb_probe_interface;
new_driver->drvwrap.driver.remove = usb_unbind_interface;
new_driver->drvwrap.driver.owner = owner;
+   new_driver->drvwrap.driver.mod_name = mod_name;
spin_lock_init(_driver->dynids.lock);
INIT_LIST_HEAD(_driver->dynids.list);
 
diff --git a/include/linux/usb.h b/include/linux/usb.h
index aab5b1b..733f38d 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -868,10 +868,11 @@ struct usb_class_driver {
  * use these in module_init()/module_exit()
  * and don't forget MODULE_DEVICE_TABLE(usb, ...)
  */
-extern int usb_register_driver(struct usb_driver *, struct module *);
+extern int usb_register_driver(struct usb_driver *, struct module *,
+  const char *);
 static inline int usb_register(struct usb_driver *driver)
 {
-   return usb_register_driver(driver, THIS_MODULE);
+   return usb_register_driver(driver, THIS_MODULE, KBUILD_MODNAME);
 }
 extern void usb_deregister(struct usb_driver *);
 
-- 
1.4.4.4

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 12/28] /sys/modules/*/holders

2007-02-07 Thread Greg KH
From: Kay Sievers <[EMAIL PROTECTED]>

  /sys/module/usbcore/
  |-- drivers
  |   |-- usb:hub -> ../../../subsystem/usb/drivers/hub
  |   |-- usb:usb -> ../../../subsystem/usb/drivers/usb
  |   `-- usb:usbfs -> ../../../subsystem/usb/drivers/usbfs
  |-- holders
  |   |-- ehci_hcd -> ../../../module/ehci_hcd
  |   |-- uhci_hcd -> ../../../module/uhci_hcd
  |   |-- usb_storage -> ../../../module/usb_storage
  |   `-- usbhid -> ../../../module/usbhid
  |-- initstate

Signed-off-by: Kay Sievers <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 include/linux/module.h |1 +
 kernel/module.c|   37 +++--
 kernel/params.c|   17 -
 3 files changed, 48 insertions(+), 7 deletions(-)

diff --git a/include/linux/module.h b/include/linux/module.h
index 90dc254..419d3ef 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -264,6 +264,7 @@ struct module
struct module_attribute *modinfo_attrs;
const char *version;
const char *srcversion;
+   struct kobject *holders_dir;
 
/* Exported symbols */
const struct kernel_symbol *syms;
diff --git a/kernel/module.c b/kernel/module.c
index 9de4209..8a94e05 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -537,6 +537,8 @@ static int already_uses(struct module *a, struct module *b)
 static int use_module(struct module *a, struct module *b)
 {
struct module_use *use;
+   int no_warn;
+
if (b == NULL || already_uses(a, b)) return 1;
 
if (!strong_try_module_get(b))
@@ -552,6 +554,7 @@ static int use_module(struct module *a, struct module *b)
 
use->module_which_uses = a;
list_add(>list, >modules_which_use_me);
+   no_warn = sysfs_create_link(b->holders_dir, >mkobj.kobj, a->name);
return 1;
 }
 
@@ -569,6 +572,7 @@ static void module_unload_free(struct module *mod)
module_put(i);
list_del(>list);
kfree(use);
+   sysfs_remove_link(i->holders_dir, mod->name);
/* There can be at most one match. */
break;
}
@@ -1106,9 +1110,7 @@ static void module_remove_modinfo_attrs(struct module 
*mod)
kfree(mod->modinfo_attrs);
 }
 
-static int mod_sysfs_setup(struct module *mod,
-  struct kernel_param *kparam,
-  unsigned int num_params)
+static int mod_sysfs_init(struct module *mod)
 {
int err;
 
@@ -1125,15 +1127,30 @@ static int mod_sysfs_setup(struct module *mod,
kobj_set_kset_s(>mkobj, module_subsys);
mod->mkobj.mod = mod;
 
-   /* delay uevent until full sysfs population */
kobject_init(>mkobj.kobj);
+
+out:
+   return err;
+}
+
+static int mod_sysfs_setup(struct module *mod,
+  struct kernel_param *kparam,
+  unsigned int num_params)
+{
+   int err;
+
+   /* delay uevent until full sysfs population */
err = kobject_add(>mkobj.kobj);
if (err)
goto out;
 
+   mod->holders_dir = kobject_add_dir(>mkobj.kobj, "holders");
+   if (!mod->holders_dir)
+   goto out_unreg;
+
err = module_param_sysfs_setup(mod, kparam, num_params);
if (err)
-   goto out_unreg_drivers;
+   goto out_unreg_holders;
 
err = module_add_modinfo_attrs(mod);
if (err)
@@ -1144,7 +1161,9 @@ static int mod_sysfs_setup(struct module *mod,
 
 out_unreg_param:
module_param_sysfs_remove(mod);
-out_unreg_drivers:
+out_unreg_holders:
+   kobject_unregister(mod->holders_dir);
+out_unreg:
kobject_del(>mkobj.kobj);
kobject_put(>mkobj.kobj);
 out:
@@ -1157,6 +1176,8 @@ static void mod_kobject_remove(struct module *mod)
module_param_sysfs_remove(mod);
if (mod->mkobj.drivers_dir)
kobject_unregister(mod->mkobj.drivers_dir);
+   if (mod->holders_dir)
+   kobject_unregister(mod->holders_dir);
 
kobject_unregister(>mkobj.kobj);
 }
@@ -1761,6 +1782,10 @@ static struct module *load_module(void __user *umod,
/* Now we've moved module, initialize linked lists, etc. */
module_unload_init(mod);
 
+   /* Initialize kobject, so we can reference it. */
+   if (mod_sysfs_init(mod) != 0)
+   goto cleanup;
+
/* Set up license info based on the info section */
set_license(mod, get_modinfo(sechdrs, infoindex, "license"));
 
diff --git a/kernel/params.c b/kernel/params.c
index cbaac85..553cf7d 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -30,6 +30,8 @@
 #define DEBUGP(fmt, a...)
 #endif
 
+static struct kobj_type module_ktype;
+
 static inline char dash2underscore(char c)
 {
if (c == '-')
@@ -671,6 +673,19 @@ static struct sysfs_ops 

[PATCH 2/28] Driver core: convert pcmcia code to use struct device

2007-02-07 Thread Greg KH
From: Greg Kroah-Hartman <[EMAIL PROTECTED]>

Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.

Cc: 
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/pcmcia/cs.c  |   34 ++--
 drivers/pcmcia/cs_internal.h |4 +-
 drivers/pcmcia/ds.c  |   14 +++---
 drivers/pcmcia/i82092.c  |2 +-
 drivers/pcmcia/i82365.c  |2 +-
 drivers/pcmcia/pcmcia_ioctl.c|1 -
 drivers/pcmcia/pcmcia_resource.c |1 -
 drivers/pcmcia/pd6729.c  |2 +-
 drivers/pcmcia/rsrc_nonstatic.c  |   56 +++-
 drivers/pcmcia/soc_common.c  |6 +-
 drivers/pcmcia/socket_sysfs.c|  104 ++
 drivers/pcmcia/tcic.c|2 +-
 drivers/pcmcia/yenta_socket.c|2 +-
 include/pcmcia/ss.h  |2 +-
 14 files changed, 127 insertions(+), 105 deletions(-)

diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index 606a467..ac00424 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -110,7 +110,7 @@ int pcmcia_socket_dev_suspend(struct device *dev, 
pm_message_t state)
 
down_read(_socket_list_rwsem);
list_for_each_entry(socket, _socket_list, socket_list) {
-   if (socket->dev.dev != dev)
+   if (socket->dev.parent != dev)
continue;
mutex_lock(>skt_mutex);
socket_suspend(socket);
@@ -128,7 +128,7 @@ int pcmcia_socket_dev_resume(struct device *dev)
 
down_read(_socket_list_rwsem);
list_for_each_entry(socket, _socket_list, socket_list) {
-   if (socket->dev.dev != dev)
+   if (socket->dev.parent != dev)
continue;
mutex_lock(>skt_mutex);
socket_resume(socket);
@@ -143,12 +143,12 @@ EXPORT_SYMBOL(pcmcia_socket_dev_resume);
 
 struct pcmcia_socket * pcmcia_get_socket(struct pcmcia_socket *skt)
 {
-   struct class_device *cl_dev = class_device_get(>dev);
-   if (!cl_dev)
+   struct device *dev = get_device(>dev);
+   if (!dev)
return NULL;
-   skt = class_get_devdata(cl_dev);
+   skt = dev_get_drvdata(dev);
if (!try_module_get(skt->owner)) {
-   class_device_put(>dev);
+   put_device(>dev);
return NULL;
}
return (skt);
@@ -159,14 +159,14 @@ EXPORT_SYMBOL(pcmcia_get_socket);
 void pcmcia_put_socket(struct pcmcia_socket *skt)
 {
module_put(skt->owner);
-   class_device_put(>dev);
+   put_device(>dev);
 }
 EXPORT_SYMBOL(pcmcia_put_socket);
 
 
-static void pcmcia_release_socket(struct class_device *class_dev)
+static void pcmcia_release_socket(struct device *dev)
 {
-   struct pcmcia_socket *socket = class_get_devdata(class_dev);
+   struct pcmcia_socket *socket = dev_get_drvdata(dev);
 
complete(>socket_released);
 }
@@ -181,7 +181,7 @@ int pcmcia_register_socket(struct pcmcia_socket *socket)
struct task_struct *tsk;
int ret;
 
-   if (!socket || !socket->ops || !socket->dev.dev || 
!socket->resource_ops)
+   if (!socket || !socket->ops || !socket->dev.parent || 
!socket->resource_ops)
return -EINVAL;
 
cs_dbg(socket, 0, "pcmcia_register_socket(0x%p)\n", socket->ops);
@@ -226,9 +226,9 @@ int pcmcia_register_socket(struct pcmcia_socket *socket)
 #endif
 
/* set proper values in socket->dev */
-   socket->dev.class_data = socket;
+   dev_set_drvdata(>dev, socket);
socket->dev.class = _socket_class;
-   snprintf(socket->dev.class_id, BUS_ID_SIZE, "pcmcia_socket%u", 
socket->sock);
+   snprintf(socket->dev.bus_id, BUS_ID_SIZE, "pcmcia_socket%u", 
socket->sock);
 
/* base address = 0, map = 0 */
socket->cis_mem.flags = 0;
@@ -640,7 +640,7 @@ static int pccardd(void *__skt)
skt->ops->set_socket(skt, >socket);
 
/* register with the device core */
-   ret = class_device_register(>dev);
+   ret = device_register(>dev);
if (ret) {
printk(KERN_WARNING "PCMCIA: unable to register socket 0x%p\n",
skt);
@@ -689,7 +689,7 @@ static int pccardd(void *__skt)
remove_wait_queue(>thread_wait, );
 
/* remove from the device core */
-   class_device_unregister(>dev);
+   device_unregister(>dev);
 
return 0;
 }
@@ -904,7 +904,7 @@ int pcmcia_insert_card(struct pcmcia_socket *skt)
 EXPORT_SYMBOL(pcmcia_insert_card);
 
 
-static int pcmcia_socket_uevent(struct class_device *dev, char **envp,
+static int pcmcia_socket_uevent(struct device *dev, char **envp,
int num_envp, char *buffer, int buffer_size)
 {
struct pcmcia_socket *s = container_of(dev, struct pcmcia_socket, dev);
@@ -930,8 +930,8 @@ static void 

[PATCH 15/28] driver core: Don't stop probing on ->probe errors.

2007-02-07 Thread Greg KH
From: Cornelia Huck <[EMAIL PROTECTED]>

Don't stop on the first ->probe error that is not -ENODEV/-ENXIO.

There might be a driver registered returning an unresonable return code, and
this stops probing completely even though it may make sense to try the next
possible driver. At worst, we may end up with an unbound device.

Signed-off-by: Cornelia Huck <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/base/dd.c |   13 ++---
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index 510e788..f705137 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -136,18 +136,17 @@ probe_failed:
driver_sysfs_remove(dev);
dev->driver = NULL;
 
-   if (ret == -ENODEV || ret == -ENXIO) {
-   /* Driver matched, but didn't support device
-* or device not found.
-* Not an error; keep going.
-*/
-   ret = 0;
-   } else {
+   if (ret != -ENODEV && ret != -ENXIO) {
/* driver matched but the probe failed */
printk(KERN_WARNING
   "%s: probe of %s failed with error %d\n",
   drv->name, dev->bus_id, ret);
}
+   /*
+* Ignore errors returned by ->probe so that the next driver can try
+* its luck.
+*/
+   ret = 0;
 done:
kfree(data);
atomic_dec(_count);
-- 
1.4.4.4

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 3/28] Driver core: convert SPI code to use struct device

2007-02-07 Thread Greg KH
From: Greg Kroah-Hartman <[EMAIL PROTECTED]>

Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.

Cc: <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/spi/pxa2xx_spi.c|2 +-
 drivers/spi/spi.c   |   32 
 drivers/spi/spi_bitbang.c   |6 +++---
 drivers/spi/spi_butterfly.c |4 ++--
 include/linux/spi/spi.h |   10 +-
 5 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/drivers/spi/pxa2xx_spi.c b/drivers/spi/pxa2xx_spi.c
index 8b41f9c..dccdc50 100644
--- a/drivers/spi/pxa2xx_spi.c
+++ b/drivers/spi/pxa2xx_spi.c
@@ -1234,7 +1234,7 @@ static int init_queue(struct driver_data *drv_data)
 
INIT_WORK(_data->pump_messages, pump_messages);
drv_data->workqueue = create_singlethread_workqueue(
-   drv_data->master->cdev.dev->bus_id);
+   drv_data->master->dev.parent->bus_id);
if (drv_data->workqueue == NULL)
return -EBUSY;
 
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 6307428..35d8c01 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -193,7 +193,7 @@ struct spi_device *__init_or_module
 spi_new_device(struct spi_master *master, struct spi_board_info *chip)
 {
struct spi_device   *proxy;
-   struct device   *dev = master->cdev.dev;
+   struct device   *dev = >dev;
int status;
 
/* NOTE:  caller did any chip->bus_num checks necessary */
@@ -215,7 +215,7 @@ spi_new_device(struct spi_master *master, struct 
spi_board_info *chip)
proxy->modalias = chip->modalias;
 
snprintf(proxy->dev.bus_id, sizeof proxy->dev.bus_id,
-   "%s.%u", master->cdev.class_id,
+   "%s.%u", master->dev.bus_id,
chip->chip_select);
proxy->dev.parent = dev;
proxy->dev.bus = _bus_type;
@@ -290,7 +290,7 @@ static void __init_or_module
 scan_boardinfo(struct spi_master *master)
 {
struct boardinfo*bi;
-   struct device   *dev = master->cdev.dev;
+   struct device   *dev = master->dev.parent;
 
down(_lock);
list_for_each_entry(bi, _list, list) {
@@ -319,18 +319,18 @@ scan_boardinfo(struct spi_master *master)
 
 /*-*/
 
-static void spi_master_release(struct class_device *cdev)
+static void spi_master_release(struct device *dev)
 {
struct spi_master *master;
 
-   master = container_of(cdev, struct spi_master, cdev);
+   master = container_of(dev, struct spi_master, dev);
kfree(master);
 }
 
 static struct class spi_master_class = {
.name   = "spi_master",
.owner  = THIS_MODULE,
-   .release= spi_master_release,
+   .dev_release= spi_master_release,
 };
 
 
@@ -364,9 +364,9 @@ spi_alloc_master(struct device *dev, unsigned size)
if (!master)
return NULL;
 
-   class_device_initialize(>cdev);
-   master->cdev.class = _master_class;
-   master->cdev.dev = get_device(dev);
+   device_initialize(>dev);
+   master->dev.class = _master_class;
+   master->dev.parent = get_device(dev);
spi_master_set_devdata(master, [1]);
 
return master;
@@ -396,7 +396,7 @@ int __init_or_module
 spi_register_master(struct spi_master *master)
 {
static atomic_t dyn_bus_id = ATOMIC_INIT((1<<16) - 1);
-   struct device   *dev = master->cdev.dev;
+   struct device   *dev = master->dev.parent;
int status = -ENODEV;
int dynamic = 0;
 
@@ -412,12 +412,12 @@ spi_register_master(struct spi_master *master)
/* register the device, then userspace will see it.
 * registration fails if the bus ID is in use.
 */
-   snprintf(master->cdev.class_id, sizeof master->cdev.class_id,
+   snprintf(master->dev.bus_id, sizeof master->dev.bus_id,
"spi%u", master->bus_num);
-   status = class_device_add(>cdev);
+   status = device_add(>dev);
if (status < 0)
goto done;
-   dev_dbg(dev, "registered master %s%s\n", master->cdev.class_id,
+   dev_dbg(dev, "registered master %s%s\n", master->dev.bus_id,
dynamic ? " (dynamic)" : "");
 
/* populate children from any spi device tables */
@@ -449,8 +449,8 @@ void spi_unregister_master(struct spi_master *master)
 {
int dummy;
 
-   dummy = device_for_each_child(master->cdev.dev, NULL, __unregister);
-   class_device_unregister(>cdev);
+   dummy = device_for_each_child(>dev, NULL, __unregister);
+   device_unregister(>dev);
 }
 

[PATCH 1/28] Kobject: make kobject apis more robust in handling NULL pointers

2007-02-07 Thread Greg KH
From: Greg Kroah-Hartman <[EMAIL PROTECTED]>

It should be ok to pass in NULL for some kobject functions, so add error
checking for all exported kobject functions to be more robust.

Cc: Kay Sievers <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 lib/kobject.c |   19 +++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/lib/kobject.c b/lib/kobject.c
index 7ce6dc1..9aed594 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -126,6 +126,8 @@ EXPORT_SYMBOL_GPL(kobject_get_path);
  */
 void kobject_init(struct kobject * kobj)
 {
+   if (!kobj)
+   return;
kref_init(>kref);
INIT_LIST_HEAD(>entry);
init_waitqueue_head(>poll);
@@ -366,6 +368,8 @@ out:
 
 void kobject_del(struct kobject * kobj)
 {
+   if (!kobj)
+   return;
sysfs_remove_dir(kobj);
unlink(kobj);
 }
@@ -377,6 +381,8 @@ void kobject_del(struct kobject * kobj)
 
 void kobject_unregister(struct kobject * kobj)
 {
+   if (!kobj)
+   return;
pr_debug("kobject %s: unregistering\n",kobject_name(kobj));
kobject_uevent(kobj, KOBJ_REMOVE);
kobject_del(kobj);
@@ -523,6 +529,8 @@ int kset_add(struct kset * k)
 
 int kset_register(struct kset * k)
 {
+   if (!k)
+   return -EINVAL;
kset_init(k);
return kset_add(k);
 }
@@ -535,6 +543,8 @@ int kset_register(struct kset * k)
 
 void kset_unregister(struct kset * k)
 {
+   if (!k)
+   return;
kobject_unregister(>kobj);
 }
 
@@ -586,6 +596,9 @@ int subsystem_register(struct subsystem * s)
 {
int error;
 
+   if (!s)
+   return -EINVAL;
+
subsystem_init(s);
pr_debug("subsystem %s: registering\n",s->kset.kobj.name);
 
@@ -598,6 +611,8 @@ int subsystem_register(struct subsystem * s)
 
 void subsystem_unregister(struct subsystem * s)
 {
+   if (!s)
+   return;
pr_debug("subsystem %s: unregistering\n",s->kset.kobj.name);
kset_unregister(>kset);
 }
@@ -612,6 +627,10 @@ void subsystem_unregister(struct subsystem * s)
 int subsys_create_file(struct subsystem * s, struct subsys_attribute * a)
 {
int error = 0;
+
+   if (!s || !a)
+   return -EINVAL;
+
if (subsys_get(s)) {
error = sysfs_create_file(>kset.kobj,>attr);
subsys_put(s);
-- 
1.4.4.4

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[GIT PATCH] USB patches for 2.6.20

2007-02-07 Thread Greg KH
Here are a bunch of USB patches against 2.6.20-git

They include some new drivers (including PS3 support), some new features
(dynamic id support for usb-serial drivers), and loads of other stuff.

All of these have been in the -mm releases for quite some time.

Please pull from:
master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6.git/

The full patches will be sent to the linux-usb-devel mailing list, if
anyone wants to see them.

thanks,

greg k-h


 Documentation/usb/proc_usb_info.txt|   21 +-
 Documentation/usb/usbmon.txt   |  152 -
 arch/powerpc/Kconfig   |5 +
 drivers/i2c/chips/isp1301_omap.c   |2 +-
 drivers/media/video/zc0301/zc0301_sensor.h |1 -
 drivers/usb/atm/speedtch.c |2 +-
 drivers/usb/class/usblp.c  |   16 +-
 drivers/usb/core/Kconfig   |   13 -
 drivers/usb/core/buffer.c  |   36 +-
 drivers/usb/core/devices.c |   22 +-
 drivers/usb/core/devio.c   |   25 +-
 drivers/usb/core/driver.c  |   35 +-
 drivers/usb/core/file.c|   13 +-
 drivers/usb/core/generic.c |   28 +-
 drivers/usb/core/hcd.c |  137 
 drivers/usb/core/hcd.h |6 -
 drivers/usb/core/hub.c |   64 +-
 drivers/usb/core/message.c |6 +-
 drivers/usb/core/sysfs.c   |   98 ++--
 drivers/usb/core/urb.c |   21 +-
 drivers/usb/core/usb.c |   96 ++--
 drivers/usb/gadget/at91_udc.c  |   21 +-
 drivers/usb/gadget/at91_udc.h  |1 +
 drivers/usb/gadget/config.c|2 +-
 drivers/usb/gadget/epautoconf.c|2 +-
 drivers/usb/gadget/ether.c |  148 +++-
 drivers/usb/gadget/file_storage.c  |   33 +-
 drivers/usb/gadget/gadget_chips.h  |8 +
 drivers/usb/gadget/gmidi.c |2 +-
 drivers/usb/gadget/goku_udc.c  |2 +-
 drivers/usb/gadget/inode.c |  240 +++
 drivers/usb/gadget/lh7a40x_udc.h   |2 +-
 drivers/usb/gadget/net2280.c   |2 +-
 drivers/usb/gadget/omap_udc.c  |2 +-
 drivers/usb/gadget/pxa2xx_udc.c|2 +-
 drivers/usb/gadget/serial.c|2 +-
 drivers/usb/gadget/usbstring.c |2 +-
 drivers/usb/gadget/zero.c  |2 +-
 drivers/usb/host/Kconfig   |   38 +-
 drivers/usb/host/ehci-dbg.c|   24 +-
 drivers/usb/host/ehci-fsl.c|8 +-
 drivers/usb/host/ehci-hcd.c|  127 ++-
 drivers/usb/host/ehci-hub.c|  324 ++---
 drivers/usb/host/ehci-pci.c|   38 +-
 drivers/usb/host/ehci-ps3.c|  193 +
 drivers/usb/host/ehci-q.c  |   16 +-
 drivers/usb/host/ehci-sched.c  |   22 +-
 drivers/usb/host/ehci.h|   46 ++-
 drivers/usb/host/ohci-at91.c   |   23 +-
 drivers/usb/host/ohci-au1xxx.c |   16 -
 drivers/usb/host/ohci-ep93xx.c |   12 -
 drivers/usb/host/ohci-hcd.c|  128 +++-
 drivers/usb/host/ohci-lh7a404.c|   16 -
 drivers/usb/host/ohci-omap.c   |   19 -
 drivers/usb/host/ohci-pci.c|  219 --
 drivers/usb/host/ohci-pnx4008.c|   12 -
 drivers/usb/host/ohci-pnx8550.c|   16 -
 drivers/usb/host/ohci-ppc-of.c |  232 ++
 drivers/usb/host/ohci-ppc-soc.c|   18 +-
 drivers/usb/host/ohci-ps3.c|  196 +
 drivers/usb/host/ohci-pxa27x.c |   16 -
 drivers/usb/host/ohci-s3c2410.c|   12 -
 drivers/usb/host/ohci-sa.c |   16 -
 drivers/usb/host/ohci.h|  155 +++--
 drivers/usb/host/uhci-debug.c  |   71 ++-
 drivers/usb/host/uhci-hcd.c|   51 +-
 drivers/usb/host/uhci-hcd.h|8 +
 drivers/usb/host/uhci-q.c  |  258 +--
 drivers/usb/image/mdc800.c |4 +
 drivers/usb/input/Kconfig  |   12 +
 drivers/usb/input/Makefile |1 +
 drivers/usb/input/gtco.c   | 1104 ++
 drivers/usb/input/hid-core.c   |   35 +
 drivers/usb/misc/idmouse.c |   10 +-
 drivers/usb/misc/rio500.c  |   54 +-
 drivers/usb/mon/Makefile   |2 +-
 drivers/usb/mon/mon_bin.c  | 1172 
 drivers/usb/mon/mon_dma.c  |   39 +-
 drivers/usb/mon/mon_main.c |   97 ++--
 drivers/usb/mon/mon_text.c |   67 ++-
 drivers/usb/mon/usb_mon.h  |   30 +-
 drivers/usb/net/Kconfig|6 +-
 

[GIT PATCH] PCI patches for 2.6.20

2007-02-07 Thread Greg KH
Here are a bunch of PCI patches against 2.6.20-git

They have a lot of PCI hotplug driver fixes and reworks, MSI cleanups
and fixes, and a number of other things.  See the full log below for
details.

All of these have been in the -mm tree for a while.

Please pull from:
master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6.git/

The full patches will be sent to the linux-pci mailing list, if anyone
wants to see it

thanks,

greg k-h


 arch/alpha/kernel/pci.c   |4 +
 arch/i386/kernel/io_apic.c|   17 +-
 arch/ia64/kernel/msi_ia64.c   |   19 +-
 arch/ia64/sn/kernel/msi_sn.c  |   20 +-
 arch/powerpc/kernel/pci_64.c  |2 -
 arch/x86_64/kernel/io_apic.c  |   17 +-
 drivers/net/bnx2.c|3 +-
 drivers/net/e1000/e1000_main.c|2 +-
 drivers/net/ixgb/ixgb_main.c  |2 +-
 drivers/pci/hotplug/Kconfig   |9 -
 drivers/pci/hotplug/pciehp.h  |  194 +++--
 drivers/pci/hotplug/pciehp_core.c |  292 +++---
 drivers/pci/hotplug/pciehp_ctrl.c |  223 +++
 drivers/pci/hotplug/pciehp_hpc.c  |  827 ++---
 drivers/pci/hotplug/shpchp.h  |4 +-
 drivers/pci/hotplug/shpchp_core.c |4 -
 drivers/pci/hotplug/shpchp_ctrl.c |   20 +-
 drivers/pci/hotplug/shpchp_hpc.c  |  185 ++---
 drivers/pci/msi.c |  325 ++--
 drivers/pci/pci-driver.c  |3 +-
 drivers/pci/pci.c |  171 +---
 drivers/pci/pci.h |   14 +-
 drivers/pci/probe.c   |   70 +++-
 drivers/pci/quirks.c  |  113 +++---
 drivers/pci/search.c  |   38 --
 drivers/scsi/ipr.c|3 -
 include/asm-alpha/pci.h   |2 +
 include/asm-ia64/machvec.h|3 +-
 include/linux/irq.h   |4 +
 include/linux/msi.h   |5 +-
 include/linux/pci.h   |   22 +-
 kernel/irq/chip.c |   28 ++
 32 files changed, 1073 insertions(+), 1572 deletions(-)

---

Adrian Bunk (5):
  PCI: quirks.c: cleanup
  PCI: remove pci_find_device_reverse()
  PCI: mark pci_find_device() as __deprecated
  PCI: remove quirk_sis_96x_compatible()
  PCI: make isa_bridge Alpha-only

Daniel Yeisley (1):
  PCI Quirk: 1k I/O space IOBL_ADR fix on P64H2

Eric W. Biederman (6):
  msi: Kill msi_lookup_irq
  msi: Remove msi_lock.
  msi: Fix msi_remove_pci_irq_vectors.
  msi: Remove attach_msi_entry.
  msi: Kill the msi_desc array.
  msi: Make MSI useable more architectures

Greg Kroah-Hartman (3):
  PCI: remove duplicate device id from ata_piix
  PCI: remove duplicate device id from ipr
  Revert "PCI: remove duplicate device id from ata_piix"

Hidetoshi Seto (4):
  PCI : remove too specialized __pci_enable_device for default resume
  PCI : Move pci_fixup_device and is_enabled (originally intended change)
  PCI : add extremely specialized __pci_reenable_device for default resume
  PCI : Add selected_regions funcs

Jean Delvare (1):
  PCI: Speed up the Intel SMBus unhiding quirk

Kenji Kaneshige (12):
  pciehp: cleanup init_slot()
  pciehp: cleanup slot list
  pciehp: remove unnecessary php_ctlr
  pciehp: remove unused pci_bus from struct controller
  pciehp: cleanup register access
  pciehp: cleanup pciehp.h
  pciehp: remove unused pcie_cap_base
  pciehp: cleanup wait command completion
  pciehp: fix wait command completion
  shpchp: remove CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE
  shpchp: remove DBG_XXX_ROUTINE
  shpchp: delete trailing whitespace

Kristen Carlson Accardi (1):
  PCIEHP: Add Electro Mechanical Interlock (EMI) support to the PCIE 
hotplug driver.

Linas Vepstas (2):
  PCI: define inline for test of channel error state
  PCI: Use newly defined PCI channel offline routine

Michael Ellerman (3):
  MSI: Replace pci_msi_quirk with calls to pci_no_msi()
  MSI: Remove pci_scan_msi_device()
  MSI: Combine pci_(save|restore)_msi/msix_state

Pavel Machek (1):
  PCI: power management: remove noise on non-manageable hw

Satoru Takeuchi (1):
  PCI: cleanup MSI code

Yinghai Lu (1):
  PCI: check szhi when sz is 0 when 64 bit iomem bigger than 4G

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[GIT PATCH] Driver core patches for 2.6.20

2007-02-07 Thread Greg KH
Here are a bunch of Driver core, sysfs, and driver model patches for
2.6.20-git

They include the conversion of the network drivers to use 'struct
device' instead of 'struct class' (the patch has been in -mm for over 6
months and was acked by David Miller) some module sysfs additions to
make userspace tools simpler, and lots of cleanups and fixes.  See the
full log below for details.

All of these have been in the -mm tree for quite a while.

Please pull from:
master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6.git/

Patches will be sent as a follow-on to this message to lkml for people
to see.

thanks,

greg k-h

 Documentation/HOWTO   |1 +
 drivers/base/class.c  |   21 ++-
 drivers/base/core.c   |  203 +---
 drivers/base/dd.c |   21 ++-
 drivers/base/firmware_class.c |2 +-
 drivers/base/platform.c   |   11 +-
 drivers/ide/setup-pci.c   |7 +-
 drivers/infiniband/ulp/ipoib/ipoib_main.c |   33 ++--
 drivers/infiniband/ulp/ipoib/ipoib_vlan.c |   11 +-
 drivers/input/serio/serio.c   |6 +-
 drivers/net/arm/at91_ether.c  |2 +-
 drivers/net/arm/etherh.c  |2 +-
 drivers/net/bonding/bond_sysfs.c  |  287 +---
 drivers/net/iseries_veth.c|2 +-
 drivers/net/macb.c|   36 ++--
 drivers/net/smc911x.c |2 +-
 drivers/net/smc91x.c  |2 +-
 drivers/net/wireless/hostap/hostap_main.c |2 +-
 drivers/net/wireless/orinoco.c|4 +-
 drivers/net/wireless/orinoco_cs.c |2 +-
 drivers/net/wireless/spectrum_cs.c|2 +-
 drivers/pci/pci-driver.c  |4 +-
 drivers/pcmcia/cs.c   |   34 ++--
 drivers/pcmcia/cs_internal.h  |4 +-
 drivers/pcmcia/ds.c   |   14 +-
 drivers/pcmcia/i82092.c   |2 +-
 drivers/pcmcia/i82365.c   |2 +-
 drivers/pcmcia/pcmcia_ioctl.c |1 -
 drivers/pcmcia/pcmcia_resource.c  |1 -
 drivers/pcmcia/pd6729.c   |2 +-
 drivers/pcmcia/rsrc_nonstatic.c   |   56 +++---
 drivers/pcmcia/soc_common.c   |6 +-
 drivers/pcmcia/socket_sysfs.c |  104 ++-
 drivers/pcmcia/tcic.c |2 +-
 drivers/pcmcia/yenta_socket.c |2 +-
 drivers/spi/pxa2xx_spi.c  |2 +-
 drivers/spi/spi.c |   32 ++--
 drivers/spi/spi_bitbang.c |6 +-
 drivers/spi/spi_butterfly.c   |4 +-
 drivers/usb/core/driver.c |4 +-
 drivers/usb/input/hid-lgff.c  |4 +-
 fs/sysfs/bin.c|6 +-
 fs/sysfs/dir.c|  214 ++
 fs/sysfs/file.c   |   82 ++---
 fs/sysfs/group.c  |2 +
 fs/sysfs/inode.c  |   36 -
 fs/sysfs/mount.c  |   11 +-
 fs/sysfs/symlink.c|1 +
 fs/sysfs/sysfs.h  |   21 ++
 include/linux/device.h|   12 +-
 include/linux/ide.h   |4 +-
 include/linux/kobject.h   |4 +
 include/linux/module.h|3 +-
 include/linux/netdevice.h |5 +-
 include/linux/pci.h   |5 +-
 include/linux/serio.h |5 +
 include/linux/spi/spi.h   |   10 +-
 include/linux/sysfs.h |   24 ++-
 include/linux/usb.h   |5 +-
 include/pcmcia/ss.h   |2 +-
 kernel/module.c   |   76 ++--
 kernel/params.c   |   28 ++-
 lib/kobject.c |   73 ++--
 net/bridge/br_if.c|2 +-
 net/bridge/br_sysfs_br.c  |  234 +---
 net/bridge/br_sysfs_if.c  |2 +-
 net/core/dev.c|6 +-
 net/core/net-sysfs.c  |  175 ++
 net/core/skbuff.c |2 +-
 69 files changed, 1286 insertions(+), 709 deletions(-)

---

Cornelia Huck (6):
  driver core: Remove device_is_registered() in device_move().
  driver core: Allow device_move(dev, NULL).
  driver core fixes: make_class_name() retval checks
  driver core fixes: device_register() retval check in platform.c
  driver core: Don't stop probing on ->probe errors.
  driver core: Change function call order in device_bind_driver().

Dave Jones (1):
  Driver Core: Increase the default timeout value of the firmware 

Re: [PATCH] pata_acpi: take two

2007-02-07 Thread Andrew Morton
On Wed, 7 Feb 2007 17:22:20 +
Alan <[EMAIL PROTECTED]> wrote:

> This is a driver for motherboard SFF style PATA ports that have ACPI
> control methods. 

It needs some work against the current libata tree. 

drivers/ata/pata_acpi.c: In function 'pacpi_port_start':
drivers/ata/pata_acpi.c:259: warning: implicit declaration of function 
'ata_port_stop'
drivers/ata/pata_acpi.c: At top level:
drivers/ata/pata_acpi.c:327: error: 'ata_pio_data_xfer' undeclared here (not in 
a function)
drivers/ata/pata_acpi.c:336: error: 'ata_host_stop' undeclared here (not in a 
function)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


  1   2   3   4   5   6   7   8   >