[GIT PATCH] driver core patches against 2.6.26 - Kernel

This is a discussion on [GIT PATCH] driver core patches against 2.6.26 - Kernel ; From: Richard Kennedy reorder kobject to save space on 64 bit builds. shrinks from 72 to 64 bytes & moves allocated kobject to a smaller slab. Signed-off-by: Richard Kennedy Signed-off-by: Greg Kroah-Hartman --- include/linux/kobject.h | 2 +- 1 files changed, ...

+ Reply to Thread
Page 4 of 4 FirstFirst ... 2 3 4
Results 61 to 79 of 79

Thread: [GIT PATCH] driver core patches against 2.6.26

  1. [PATCH 60/79] kobject: reorder kobject to save space on 64 bit builds

    From: Richard Kennedy

    reorder kobject to save space on 64 bit builds.
    shrinks from 72 to 64 bytes & moves allocated kobject to a smaller
    slab.

    Signed-off-by: Richard Kennedy
    Signed-off-by: Greg Kroah-Hartman
    ---
    include/linux/kobject.h | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/include/linux/kobject.h b/include/linux/kobject.h
    index d542faa..60f0d41 100644
    --- a/include/linux/kobject.h
    +++ b/include/linux/kobject.h
    @@ -58,12 +58,12 @@ enum kobject_action {

    struct kobject {
    const char *name;
    - struct kref kref;
    struct list_head entry;
    struct kobject *parent;
    struct kset *kset;
    struct kobj_type *ktype;
    struct sysfs_dirent *sd;
    + struct kref kref;
    unsigned int state_initialized:1;
    unsigned int state_in_sysfs:1;
    unsigned int state_add_uevent_sent:1;
    --
    1.5.6.3

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

  2. [PATCH 56/79] UIO: fix UIO Kconfig dependencies

    From: Uwe Kleine-König

    ae210f188614bb3d1ee3f19c64e28e3cdd44877c introduced a big "if UIO"/"endif"
    where all uio drivers are defined. So know there is no need for them to
    depend explicitly on UIO.

    Signed-off-by: Uwe Kleine-König
    Signed-off-by: Hans J. Koch
    Signed-off-by: Greg Kroah-Hartman
    ---
    drivers/uio/Kconfig | 3 +--
    1 files changed, 1 insertions(+), 2 deletions(-)

    diff --git a/drivers/uio/Kconfig b/drivers/uio/Kconfig
    index a4aaab9..78e139c 100644
    --- a/drivers/uio/Kconfig
    +++ b/drivers/uio/Kconfig
    @@ -15,7 +15,7 @@ if UIO

    config UIO_CIF
    tristate "generic Hilscher CIF Card driver"
    - depends on UIO && PCI
    + depends on PCI
    default n
    help
    Driver for Hilscher CIF DeviceNet and Profibus cards. This
    @@ -28,7 +28,6 @@ config UIO_CIF

    config UIO_SMX
    tristate "SMX cryptengine UIO interface"
    - depends on UIO
    default n
    help
    Userspace IO interface to the Cryptography engine found on the
    --
    1.5.6.3

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

  3. Re: [PATCH 02/79] kobject: replace '/' with '!' in name

    Greg Kroah-Hartman writes in gmane.linux.kernel:

    > From: Kay Sievers
    >
    > Some (block) devices have a '/' in the name, and need special
    > handling. Let's have that rule to the core, so we can remove it
    > from the block class.
    >
    > Signed-off-by: Kay Sievers
    > Signed-off-by: Greg Kroah-Hartman
    > ---
    > lib/kobject.c | 10 ++++++++--
    > 1 files changed, 8 insertions(+), 2 deletions(-)
    >
    > diff --git a/lib/kobject.c b/lib/kobject.c
    > index dcade05..7444015 100644
    > --- a/lib/kobject.c
    > +++ b/lib/kobject.c
    > @@ -216,13 +216,19 @@ static int kobject_add_internal(struct kobject *kobj)
    > static int kobject_set_name_vargs(struct kobject *kobj, const char *fmt,
    > va_list vargs)
    > {
    > - /* Free the old name, if necessary. */
    > - kfree(kobj->name);
    > + const char *old_name = kobj->name;
    > + char *s;
    >
    > kobj->name = kvasprintf(GFP_KERNEL, fmt, vargs);
    > if (!kobj->name)
    > return -ENOMEM;


    Is this leaking old_name if kvasprintf returns NULL ?

    kobj->name is that point to set NULL and old value
    of kobj->name (old_name) is not free'ed

    > + /* ewww... some of these buggers have '/' in the name ... */
    > + s = strchr(kobj->name, '/');
    > + if (s)
    > + s[0] = '!';
    > +
    > + kfree(old_name);
    > return 0;
    > }
    >
    > --
    > 1.5.6.3


    / Kari Hurtta

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

  4. Re: [PATCH 58/79] UIO: add generic UIO platform driver

    Hi Greg,

    I posted two minor updates to that patch some days ago.

    If you don't find them in your mailbox anymore, you can find them at:

    http://thread.gmane.org/gmane.linux.kernel/705243

    IMHO they are obvious and already have Hans' Acked-by.

    Can you please take them?

    Best regards,
    Uwe

    --
    Uwe Kleine-Knig, Software Engineer
    Digi International GmbH Branch Breisach, Kferstrasse 8, 79206 Breisach, Germany
    Tax: 315/5781/0242 / VAT: DE153662976 / Reg. Amtsgericht Dortmund HRB 13962
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  5. RE: [PATCH 75/79] HP iLO driver

    Greg Kroah-Hartman wrote:
    > diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
    > index 1921b8d..ce67d97 100644
    > --- a/drivers/misc/Kconfig
    > +++ b/drivers/misc/Kconfig
    > @@ -420,4 +420,17 @@ config SGI_XP
    > this feature will allow for direct communication between SSIs
    > based on a network adapter and DMA messaging.
    >
    > +config HP_ILO
    > + tristate "Channel interface driver for HP iLO/iLO2 processor"
    > + default n


    Heiko Carstens submitted a Kconfig "depend on PCI" patch to linux-next,
    and that should be included with this series. His mail is below.
    Outlook might well mangle the diff, but that's my fault, not his.

    ----

    Subject: [PATCH] Let HP iLO driver depend on PCI

    From: Heiko Carstens

    "HP iLO driver" causes this:

    drivers/misc/hpilo.c: In function 'doorbell_set':
    drivers/misc/hpilo.c:147: error: implicit declaration of function 'iowrite8'
    drivers/misc/hpilo.c: In function 'ilo_ccb_close':
    drivers/misc/hpilo.c:204: error: implicit declaration of function 'iowrite32'
    drivers/misc/hpilo.c:204: error: implicit declaration of function 'ioread32'
    drivers/misc/hpilo.c:222: error: implicit declaration of function 'memset_io'
    drivers/misc/hpilo.c:225: error: implicit declaration of function 'pci_free_consistent'
    drivers/misc/hpilo.c: In function 'ilo_ccb_open':
    drivers/misc/hpilo.c:244: error: implicit declaration of function 'pci_alloc_consistent'
    drivers/misc/hpilo.c:245: warning: assignment makes pointer from integer without a cast
    drivers/misc/hpilo.c:296: error: implicit declaration of function 'memcpy_toio'
    drivers/misc/hpilo.c: In function 'ilo_unmap_device':
    drivers/misc/hpilo.c:575: error: implicit declaration of function 'pci_iounmap'
    drivers/misc/hpilo.c: In function 'ilo_map_device':
    drivers/misc/hpilo.c:585: error: implicit declaration of function 'pci_iomap'
    drivers/misc/hpilo.c:585: warning: assignment makes pointer from integer without a cast
    drivers/misc/hpilo.c:592: warning: assignment makes pointer from integer without a cast
    drivers/misc/hpilo.c:599: warning: assignment makes pointer from integer without a cast
    make[2]: *** [drivers/misc/hpilo.o] Error 1

    Just let it depend on PCI.

    Signed-off-by: Heiko Carstens
    ---

    Greg, this came in via one of your git trees. Please merge/apply. Thanks.

    drivers/misc/Kconfig | 1 +
    1 file changed, 1 insertion(+)

    Index: linux-next/drivers/misc/Kconfig
    ================================================== =================
    --- linux-next.orig/drivers/misc/Kconfig
    +++ linux-next/drivers/misc/Kconfig
    @@ -423,6 +423,7 @@ config SGI_XP
    config HP_ILO
    tristate "Channel interface driver for HP iLO/iLO2 processor"
    default n
    + depends on PCI
    help
    The channel interface driver allows applications to communicate
    with iLO/iLO2 management processors present on HP ProLiant
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  6. Re: [PATCH 58/79] UIO: add generic UIO platform driver

    On Tue, Jul 22, 2008 at 01:34:40PM +0200, Uwe Kleine-Knig wrote:
    > Hi Greg,
    >
    > I posted two minor updates to that patch some days ago.
    >
    > If you don't find them in your mailbox anymore, you can find them at:
    >
    > http://thread.gmane.org/gmane.linux.kernel/705243
    >
    > IMHO they are obvious and already have Hans' Acked-by.
    >
    > Can you please take them?


    Yes, I'm slowly catching up on stuff right now, I wanted to get the
    patches that had a lot of testing to Linus for -rc1, as that was most
    important at this moment in time. Your other patches are still in my
    queue for review, should get to them in a few days, but as OSCON is this
    week, I'm not guaranteeing anything...

    thanks for your patience,

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

  7. Re: [PATCH 75/79] HP iLO driver

    On Tue, Jul 22, 2008 at 05:11:16PM +0000, Altobelli, David wrote:
    > Greg Kroah-Hartman wrote:
    > > diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
    > > index 1921b8d..ce67d97 100644
    > > --- a/drivers/misc/Kconfig
    > > +++ b/drivers/misc/Kconfig
    > > @@ -420,4 +420,17 @@ config SGI_XP
    > > this feature will allow for direct communication between SSIs
    > > based on a network adapter and DMA messaging.
    > >
    > > +config HP_ILO
    > > + tristate "Channel interface driver for HP iLO/iLO2 processor"
    > > + default n

    >
    > Heiko Carstens submitted a Kconfig "depend on PCI" patch to linux-next,
    > and that should be included with this series. His mail is below.
    > Outlook might well mangle the diff, but that's my fault, not his.


    Thanks, sorry I missed that one, I'll add it to my queue for the next
    patch series to go to Linus.

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

  8. Re: [PATCH 02/79] kobject: replace '/' with '!' in name

    Hi Greg,
    hi Kay,

    On Tuesday 22 July 2008, Greg Kroah-Hartman wrote:
    > From: Kay Sievers
    >
    > Some (block) devices have a '/' in the name, and need special
    > handling. Let's have that rule to the core, so we can remove it
    > from the block class.


    Yes, but why replace only one?

    > diff --git a/lib/kobject.c b/lib/kobject.c
    > index dcade05..7444015 100644
    > --- a/lib/kobject.c
    > +++ b/lib/kobject.c
    > @@ -216,13 +216,19 @@ static int kobject_add_internal(struct kobject *kobj)
    > static int kobject_set_name_vargs(struct kobject *kobj, const char *fmt,
    > va_list vargs)
    > {
    > - /* Free the old name, if necessary. */
    > - kfree(kobj->name);
    > + const char *old_name = kobj->name;
    > + char *s;
    >
    > kobj->name = kvasprintf(GFP_KERNEL, fmt, vargs);
    > if (!kobj->name)
    > return -ENOMEM;
    >
    > + /* ewww... some of these buggers have '/' in the name ... */
    > + s = strchr(kobj->name, '/');
    > + if (s)
    > + s[0] = '!';
    > +
    > + kfree(old_name);
    > return 0;
    > }


    while (s = strchr(kobj->name, '/')) {
    s[0] = '!';
    }

    instead?


    Best Regards

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

  9. Re: [PATCH 72/79] sysdev: Pass the attribute to the low level sysdev show/store function

    On Mon, 21 Jul 2008 22:19:36 -0700
    Greg Kroah-Hartman wrote:

    > From: Andi Kleen
    >
    > This allow to dynamically generate attributes and share show/store
    > functions between attributes. Right now most attributes are generated
    > by special macros and lots of duplicated code. With the attribute
    > passed it's instead possible to attach some data to the attribute
    > and then use that in shared low level functions to do different things.
    >
    > I need this for the dynamically generated bank attributes in the x86
    > machine check code, but it'll allow some further cleanups.
    >
    > I converted all users in tree to the new show/store prototype. It's a single
    > huge patch to avoid unbisectable sections.
    >
    > Runtime tested: x86-32, x86-64
    > Compiled only: ia64, powerpc
    > Not compile tested/only grep converted: sh, arm, avr32
    >
    > Signed-off-by: Andi Kleen
    > Signed-off-by: Greg Kroah-Hartman
    >
    > ...
    >
    > kernel/sched.c | 8 ++++-


    This wrecks use-sysdev_class-in-schedc.patch (below), which I merged a
    week ago and will now drop.

    Why did this patch from Andi just turn up in linux-next now, halfway
    through the merge window? It has a commit date of July 1 yet it has
    never before been sighted in linux-next.




    From: Takashi Iwai

    The power_saving* attributes are really sysdev_class stuff, so we must
    create them via sysdev_class_create_file(). The parameters of callback
    functions must be also fixed.

    Signed-off-by: Takashi Iwai
    Cc:
    Cc: Ingo Molnar
    Cc: Stephen Rothwell
    Signed-off-by: Andrew Morton
    ---

    kernel/sched.c | 28 ++++++++++++++++------------
    1 file changed, 16 insertions(+), 12 deletions(-)

    diff -puN kernel/sched.c~use-sysdev_class-in-schedc kernel/sched.c
    --- a/kernel/sched.c~use-sysdev_class-in-schedc
    +++ a/kernel/sched.c
    @@ -7732,31 +7732,35 @@ static ssize_t sched_power_savings_store
    }

    #ifdef CONFIG_SCHED_MC
    -static ssize_t sched_mc_power_savings_show(struct sys_device *dev, char *page)
    +static ssize_t sched_mc_power_savings_show(struct sysdev_class *cls,
    + char *page)
    {
    return sprintf(page, "%u\n", sched_mc_power_savings);
    }
    -static ssize_t sched_mc_power_savings_store(struct sys_device *dev,
    +static ssize_t sched_mc_power_savings_store(struct sysdev_class *cls,
    const char *buf, size_t count)
    {
    return sched_power_savings_store(buf, count, 0);
    }
    -static SYSDEV_ATTR(sched_mc_power_savings, 0644, sched_mc_power_savings_show,
    - sched_mc_power_savings_store);
    +static SYSDEV_CLASS_ATTR(sched_mc_power_savings, 0644,
    + sched_mc_power_savings_show,
    + sched_mc_power_savings_store);
    #endif

    #ifdef CONFIG_SCHED_SMT
    -static ssize_t sched_smt_power_savings_show(struct sys_device *dev, char *page)
    +static ssize_t sched_smt_power_savings_show(struct sysdev_class *cls,
    + char *page)
    {
    return sprintf(page, "%u\n", sched_smt_power_savings);
    }
    -static ssize_t sched_smt_power_savings_store(struct sys_device *dev,
    +static ssize_t sched_smt_power_savings_store(struct sysdv_class *cls,
    const char *buf, size_t count)
    {
    return sched_power_savings_store(buf, count, 1);
    }
    -static SYSDEV_ATTR(sched_smt_power_savings, 0644, sched_smt_power_savings_show,
    - sched_smt_power_savings_store);
    +static SYSDEV_CLASS_ATTR(sched_smt_power_savings, 0644,
    + sched_smt_power_savings_show,
    + sched_smt_power_savings_store);
    #endif

    int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls)
    @@ -7765,13 +7769,13 @@ int sched_create_sysfs_power_savings_ent

    #ifdef CONFIG_SCHED_SMT
    if (smt_capable())
    - err = sysfs_create_file(&cls->kset.kobj,
    - &attr_sched_smt_power_savings.attr);
    + err = sysdev_class_create_file(cls,
    + &attr_sched_smt_power_savings);
    #endif
    #ifdef CONFIG_SCHED_MC
    if (!err && mc_capable())
    - err = sysfs_create_file(&cls->kset.kobj,
    - &attr_sched_mc_power_savings.attr);
    + err = sysdev_class_create_file(cls,
    + &attr_sched_mc_power_savings);
    #endif
    return err;
    }
    _

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

  10. Re: [PATCH 72/79] sysdev: Pass the attribute to the low level sysdev show/store function

    On Tue, Jul 22, 2008 at 01:40:45PM -0700, Andrew Morton wrote:
    > On Mon, 21 Jul 2008 22:19:36 -0700
    > Greg Kroah-Hartman wrote:
    >
    > > From: Andi Kleen
    > >
    > > This allow to dynamically generate attributes and share show/store
    > > functions between attributes. Right now most attributes are generated
    > > by special macros and lots of duplicated code. With the attribute
    > > passed it's instead possible to attach some data to the attribute
    > > and then use that in shared low level functions to do different things.
    > >
    > > I need this for the dynamically generated bank attributes in the x86
    > > machine check code, but it'll allow some further cleanups.
    > >
    > > I converted all users in tree to the new show/store prototype. It's a single
    > > huge patch to avoid unbisectable sections.
    > >
    > > Runtime tested: x86-32, x86-64
    > > Compiled only: ia64, powerpc
    > > Not compile tested/only grep converted: sh, arm, avr32
    > >
    > > Signed-off-by: Andi Kleen
    > > Signed-off-by: Greg Kroah-Hartman
    > >
    > > ...
    > >
    > > kernel/sched.c | 8 ++++-

    >
    > This wrecks use-sysdev_class-in-schedc.patch (below), which I merged a
    > week ago and will now drop.
    >
    > Why did this patch from Andi just turn up in linux-next now, halfway
    > through the merge window? It has a commit date of July 1 yet it has
    > never before been sighted in linux-next.


    What? It's been in linux-next for a while now as it's been in my tree
    for quite some time. Unless it somehow got reverted in -next and I
    didn't realize it? Which I kind of doubt as it was causing problems
    with the sparc build and I got reports of that.

    This should be a simple merge, the show/store functions of sysdev now
    just got an additional parameter, like we've done for a while with other
    types of attributes.

    thanks,

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

  11. Re: [PATCH 02/79] kobject: replace '/' with '!' in name

    On Tue, Jul 22, 2008 at 08:12:38PM +0200, Ingo Oeser wrote:
    > Hi Greg,
    > hi Kay,
    >
    > On Tuesday 22 July 2008, Greg Kroah-Hartman wrote:
    > > From: Kay Sievers
    > >
    > > Some (block) devices have a '/' in the name, and need special
    > > handling. Let's have that rule to the core, so we can remove it
    > > from the block class.

    >
    > Yes, but why replace only one?


    Do you know of block devices with more than one?

    > > diff --git a/lib/kobject.c b/lib/kobject.c
    > > index dcade05..7444015 100644
    > > --- a/lib/kobject.c
    > > +++ b/lib/kobject.c
    > > @@ -216,13 +216,19 @@ static int kobject_add_internal(struct kobject *kobj)
    > > static int kobject_set_name_vargs(struct kobject *kobj, const char *fmt,
    > > va_list vargs)
    > > {
    > > - /* Free the old name, if necessary. */
    > > - kfree(kobj->name);
    > > + const char *old_name = kobj->name;
    > > + char *s;
    > >
    > > kobj->name = kvasprintf(GFP_KERNEL, fmt, vargs);
    > > if (!kobj->name)
    > > return -ENOMEM;
    > >
    > > + /* ewww... some of these buggers have '/' in the name ... */
    > > + s = strchr(kobj->name, '/');
    > > + if (s)
    > > + s[0] = '!';
    > > +
    > > + kfree(old_name);
    > > return 0;
    > > }

    >
    > while (s = strchr(kobj->name, '/')) {
    > s[0] = '!';
    > }
    >
    > instead?


    Nice, care to send a follow-on patch for this?

    thanks,

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

  12. Re: [PATCH 72/79] sysdev: Pass the attribute to the low level sysdev show/store function

    On Tue, 22 Jul 2008 13:49:39 -0700
    Greg KH wrote:

    > On Tue, Jul 22, 2008 at 01:40:45PM -0700, Andrew Morton wrote:
    > > On Mon, 21 Jul 2008 22:19:36 -0700
    > > Greg Kroah-Hartman wrote:
    > >
    > > > From: Andi Kleen
    > > >
    > > > This allow to dynamically generate attributes and share show/store
    > > > functions between attributes. Right now most attributes are generated
    > > > by special macros and lots of duplicated code. With the attribute
    > > > passed it's instead possible to attach some data to the attribute
    > > > and then use that in shared low level functions to do different things.
    > > >
    > > > I need this for the dynamically generated bank attributes in the x86
    > > > machine check code, but it'll allow some further cleanups.
    > > >
    > > > I converted all users in tree to the new show/store prototype. It's a single
    > > > huge patch to avoid unbisectable sections.
    > > >
    > > > Runtime tested: x86-32, x86-64
    > > > Compiled only: ia64, powerpc
    > > > Not compile tested/only grep converted: sh, arm, avr32
    > > >
    > > > Signed-off-by: Andi Kleen
    > > > Signed-off-by: Greg Kroah-Hartman
    > > >
    > > > ...
    > > >
    > > > kernel/sched.c | 8 ++++-

    > >
    > > This wrecks use-sysdev_class-in-schedc.patch (below), which I merged a
    > > week ago and will now drop.
    > >
    > > Why did this patch from Andi just turn up in linux-next now, halfway
    > > through the merge window? It has a commit date of July 1 yet it has
    > > never before been sighted in linux-next.

    >
    > What? It's been in linux-next for a while now as it's been in my tree
    > for quite some time. Unless it somehow got reverted in -next and I
    > didn't realize it? Which I kind of doubt as it was causing problems
    > with the sparc build and I got reports of that.
    >
    > This should be a simple merge, the show/store functions of sysdev now
    > just got an additional parameter, like we've done for a while with other
    > types of attributes.
    >


    Well the changelog for yesterday's linux-next lists this change, but
    the diff to kernel/sched.c (below) does not contain it. No idea what
    caused that.

    A whole pile of greggish stuff just turned up in linux-next and I'm
    fixing and dropping stuff left, right and centre over here.

    diff -puN kernel/sched.c~linux-next kernel/sched.c
    --- a/kernel/sched.c~linux-next
    +++ a/kernel/sched.c
    @@ -2108,7 +2108,7 @@ find_idlest_group(struct sched_domain *s
    /* Tally up the load of all CPUs in the group */
    avg_load = 0;

    - for_each_cpu_mask(i, group->cpumask) {
    + for_each_cpu_mask_nr(i, group->cpumask) {
    /* Bias balancing toward cpus of our domain */
    if (local_group)
    load = source_load(i, load_idx);
    @@ -2150,7 +2150,7 @@ find_idlest_cpu(struct sched_group *grou
    /* Traverse only the allowed CPUs */
    cpus_and(*tmp, group->cpumask, p->cpus_allowed);

    - for_each_cpu_mask(i, *tmp) {
    + for_each_cpu_mask_nr(i, *tmp) {
    load = weighted_cpuload(i);

    if (load < min_load || (load == min_load && i == this_cpu)) {
    @@ -3168,7 +3168,7 @@ find_busiest_group(struct sched_domain *
    max_cpu_load = 0;
    min_cpu_load = ~0UL;

    - for_each_cpu_mask(i, group->cpumask) {
    + for_each_cpu_mask_nr(i, group->cpumask) {
    struct rq *rq;

    if (!cpu_isset(i, *cpus))
    @@ -3447,7 +3447,7 @@ find_busiest_queue(struct sched_group *g
    unsigned long max_load = 0;
    int i;

    - for_each_cpu_mask(i, group->cpumask) {
    + for_each_cpu_mask_nr(i, group->cpumask) {
    unsigned long wl;

    if (!cpu_isset(i, *cpus))
    @@ -3989,7 +3989,7 @@ static void run_rebalance_domains(struct
    int balance_cpu;

    cpu_clear(this_cpu, cpus);
    - for_each_cpu_mask(balance_cpu, cpus) {
    + for_each_cpu_mask_nr(balance_cpu, cpus) {
    /*
    * If this cpu gets work to do, stop the load balancing
    * work being done for other cpus. Next load
    @@ -5663,12 +5663,7 @@ void sched_show_task(struct task_struct
    printk(KERN_CONT " %016lx ", thread_saved_pc(p));
    #endif
    #ifdef CONFIG_DEBUG_STACK_USAGE
    - {
    - unsigned long *n = end_of_stack(p);
    - while (!*n)
    - n++;
    - free = (unsigned long)n - (unsigned long)end_of_stack(p);
    - }
    + free = stack_not_used(p);
    #endif
    printk(KERN_CONT "%5lu %5d %6d\n", free,
    task_pid_nr(p), task_pid_nr(p->real_parent));
    @@ -6802,7 +6797,7 @@ init_sched_build_groups(const cpumask_t

    cpus_clear(*covered);

    - for_each_cpu_mask(i, *span) {
    + for_each_cpu_mask_nr(i, *span) {
    struct sched_group *sg;
    int group = group_fn(i, cpu_map, &sg, tmpmask);
    int j;
    @@ -6813,7 +6808,7 @@ init_sched_build_groups(const cpumask_t
    cpus_clear(sg->cpumask);
    sg->__cpu_power = 0;

    - for_each_cpu_mask(j, *span) {
    + for_each_cpu_mask_nr(j, *span) {
    if (group_fn(j, cpu_map, NULL, tmpmask) != group)
    continue;

    @@ -7013,7 +7008,7 @@ static void init_numa_sched_groups_power
    if (!sg)
    return;
    do {
    - for_each_cpu_mask(j, sg->cpumask) {
    + for_each_cpu_mask_nr(j, sg->cpumask) {
    struct sched_domain *sd;

    sd = &per_cpu(phys_domains, j);
    @@ -7038,7 +7033,7 @@ static void free_sched_groups(const cpum
    {
    int cpu, i;

    - for_each_cpu_mask(cpu, *cpu_map) {
    + for_each_cpu_mask_nr(cpu, *cpu_map) {
    struct sched_group **sched_group_nodes
    = sched_group_nodes_bycpu[cpu];

    @@ -7277,7 +7272,7 @@ static int __build_sched_domains(const c
    /*
    * Set up domains for cpus specified by the cpu_map.
    */
    - for_each_cpu_mask(i, *cpu_map) {
    + for_each_cpu_mask_nr(i, *cpu_map) {
    struct sched_domain *sd = NULL, *p;
    SCHED_CPUMASK_VAR(nodemask, allmasks);

    @@ -7344,7 +7339,7 @@ static int __build_sched_domains(const c

    #ifdef CONFIG_SCHED_SMT
    /* Set up CPU (sibling) groups */
    - for_each_cpu_mask(i, *cpu_map) {
    + for_each_cpu_mask_nr(i, *cpu_map) {
    SCHED_CPUMASK_VAR(this_sibling_map, allmasks);
    SCHED_CPUMASK_VAR(send_covered, allmasks);

    @@ -7361,7 +7356,7 @@ static int __build_sched_domains(const c

    #ifdef CONFIG_SCHED_MC
    /* Set up multi-core groups */
    - for_each_cpu_mask(i, *cpu_map) {
    + for_each_cpu_mask_nr(i, *cpu_map) {
    SCHED_CPUMASK_VAR(this_core_map, allmasks);
    SCHED_CPUMASK_VAR(send_covered, allmasks);

    @@ -7428,7 +7423,7 @@ static int __build_sched_domains(const c
    goto error;
    }
    sched_group_nodes[i] = sg;
    - for_each_cpu_mask(j, *nodemask) {
    + for_each_cpu_mask_nr(j, *nodemask) {
    struct sched_domain *sd;

    sd = &per_cpu(node_domains, j);
    @@ -7474,21 +7469,21 @@ static int __build_sched_domains(const c

    /* Calculate CPU power for physical packages and nodes */
    #ifdef CONFIG_SCHED_SMT
    - for_each_cpu_mask(i, *cpu_map) {
    + for_each_cpu_mask_nr(i, *cpu_map) {
    struct sched_domain *sd = &per_cpu(cpu_domains, i);

    init_sched_groups_power(i, sd);
    }
    #endif
    #ifdef CONFIG_SCHED_MC
    - for_each_cpu_mask(i, *cpu_map) {
    + for_each_cpu_mask_nr(i, *cpu_map) {
    struct sched_domain *sd = &per_cpu(core_domains, i);

    init_sched_groups_power(i, sd);
    }
    #endif

    - for_each_cpu_mask(i, *cpu_map) {
    + for_each_cpu_mask_nr(i, *cpu_map) {
    struct sched_domain *sd = &per_cpu(phys_domains, i);

    init_sched_groups_power(i, sd);
    @@ -7508,7 +7503,7 @@ static int __build_sched_domains(const c
    #endif

    /* Attach the domains */
    - for_each_cpu_mask(i, *cpu_map) {
    + for_each_cpu_mask_nr(i, *cpu_map) {
    struct sched_domain *sd;
    #ifdef CONFIG_SCHED_SMT
    sd = &per_cpu(cpu_domains, i);
    @@ -7603,7 +7598,7 @@ static void detach_destroy_domains(const

    unregister_sched_domain_sysctl();

    - for_each_cpu_mask(i, *cpu_map)
    + for_each_cpu_mask_nr(i, *cpu_map)
    cpu_attach_domain(NULL, &def_root_domain, i);
    synchronize_sched();
    arch_destroy_sched_domains(cpu_map, &tmpmask);

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

  13. Re: [PATCH 72/79] sysdev: Pass the attribute to the low level sysdev show/store function

    On Tue, Jul 22, 2008 at 02:03:01PM -0700, Andrew Morton wrote:
    > On Tue, 22 Jul 2008 13:49:39 -0700
    > Greg KH wrote:
    >
    > > On Tue, Jul 22, 2008 at 01:40:45PM -0700, Andrew Morton wrote:
    > > > On Mon, 21 Jul 2008 22:19:36 -0700
    > > > Greg Kroah-Hartman wrote:
    > > >
    > > > > From: Andi Kleen
    > > > >
    > > > > This allow to dynamically generate attributes and share show/store
    > > > > functions between attributes. Right now most attributes are generated
    > > > > by special macros and lots of duplicated code. With the attribute
    > > > > passed it's instead possible to attach some data to the attribute
    > > > > and then use that in shared low level functions to do different things.
    > > > >
    > > > > I need this for the dynamically generated bank attributes in the x86
    > > > > machine check code, but it'll allow some further cleanups.
    > > > >
    > > > > I converted all users in tree to the new show/store prototype. It's a single
    > > > > huge patch to avoid unbisectable sections.
    > > > >
    > > > > Runtime tested: x86-32, x86-64
    > > > > Compiled only: ia64, powerpc
    > > > > Not compile tested/only grep converted: sh, arm, avr32
    > > > >
    > > > > Signed-off-by: Andi Kleen
    > > > > Signed-off-by: Greg Kroah-Hartman
    > > > >
    > > > > ...
    > > > >
    > > > > kernel/sched.c | 8 ++++-
    > > >
    > > > This wrecks use-sysdev_class-in-schedc.patch (below), which I merged a
    > > > week ago and will now drop.
    > > >
    > > > Why did this patch from Andi just turn up in linux-next now, halfway
    > > > through the merge window? It has a commit date of July 1 yet it has
    > > > never before been sighted in linux-next.

    > >
    > > What? It's been in linux-next for a while now as it's been in my tree
    > > for quite some time. Unless it somehow got reverted in -next and I
    > > didn't realize it? Which I kind of doubt as it was causing problems
    > > with the sparc build and I got reports of that.
    > >
    > > This should be a simple merge, the show/store functions of sysdev now
    > > just got an additional parameter, like we've done for a while with other
    > > types of attributes.
    > >

    >
    > Well the changelog for yesterday's linux-next lists this change, but
    > the diff to kernel/sched.c (below) does not contain it. No idea what
    > caused that.


    Andi any thoughts?


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

  14. Re: [PATCH 18/79] device create: macintosh: convert device_create to device_create_drvdata

    On Mon, 2008-07-21 at 22:18 -0700, Greg Kroah-Hartman wrote:
    > device_create() is race-prone, so use the race-free
    > device_create_drvdata() instead as device_create() is going away.


    Acked-by: Benjamin Herrenschmidt
    > Signed-off-by: Greg Kroah-Hartman


    > ---
    > drivers/macintosh/adb.c | 3 ++-
    > 1 files changed, 2 insertions(+), 1 deletions(-)
    >
    > diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c
    > index e5d4468..cae5248 100644
    > --- a/drivers/macintosh/adb.c
    > +++ b/drivers/macintosh/adb.c
    > @@ -862,7 +862,8 @@ adbdev_init(void)
    > adb_dev_class = class_create(THIS_MODULE, "adb");
    > if (IS_ERR(adb_dev_class))
    > return;
    > - device_create(adb_dev_class, NULL, MKDEV(ADB_MAJOR, 0), "adb");
    > + device_create_drvdata(adb_dev_class, NULL, MKDEV(ADB_MAJOR, 0), NULL,
    > + "adb");
    >
    > platform_device_register(&adb_pfdev);
    > platform_driver_probe(&adb_pfdrv, adb_dummy_probe);


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

  15. [PATCH] kobject: Replace ALL occurrences of '/' with '!' instead of only the first one.

    From: Ingo Oeser

    A recent patch from Kay Sievers
    replaced the first occurrence of '/' with '!' as needed for block devices.

    Now do some cheap defensive coding and replace all of them to avoid future
    issues in this area.

    Signed-off-by: Ingo Oeser
    ---

    To answer your questions:
    > Do you know of block devices with more than one?


    No, just defensive coding :-)

    > Nice, care to send a follow-on patch for this?


    Linus just pulled, so I generated it against his latest tree.


    lib/kobject.c | 3 +--
    1 files changed, 1 insertions(+), 2 deletions(-)

    diff --git a/lib/kobject.c b/lib/kobject.c
    index 7444015..ce2cf43 100644
    --- a/lib/kobject.c
    +++ b/lib/kobject.c
    @@ -224,8 +224,7 @@ static int kobject_set_name_vargs(struct kobject *kobj, const char *fmt,
    return -ENOMEM;

    /* ewww... some of these buggers have '/' in the name ... */
    - s = strchr(kobj->name, '/');
    - if (s)
    + while (s = strchr(kobj->name, '/'))
    s[0] = '!';

    kfree(old_name);
    --
    1.5.4.3

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

  16. Re: [PATCH 72/79] sysdev: Pass the attribute to the low level sysdev show/store function

    Hi Greg,

    On Tue, 22 Jul 2008 14:19:19 -0700 Greg KH wrote:
    >
    > Andi any thoughts?


    The patch
    (sysdev-pass-the-attribute-to-the-low-level-sysdev-show-store-function.patch)
    has existed in the driver-core part of linux-next since July 4, but the
    kernel/sched.c part only got added yesterday.

    --
    Cheers,
    Stephen Rothwell sfr@canb.auug.org.au
    http://www.canb.auug.org.au/~sfr/

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.9 (GNU/Linux)

    iEYEARECAAYFAkiGn8MACgkQjjKRsyhoI8xeRwCghlA1czotSe +Ap51YfX7OVAnU
    5ncAnjrSIAeVXjNJT51nSKYrpRR88sfN
    =YxNb
    -----END PGP SIGNATURE-----


  17. Re: [PATCH 72/79] sysdev: Pass the attribute to the low level sysdev show/store function

    On Wed, Jul 23, 2008 at 01:04:35PM +1000, Stephen Rothwell wrote:
    > Hi Greg,
    >
    > On Tue, 22 Jul 2008 14:19:19 -0700 Greg KH wrote:
    > >
    > > Andi any thoughts?

    >
    > The patch
    > (sysdev-pass-the-attribute-to-the-low-level-sysdev-show-store-function.patch)
    > has existed in the driver-core part of linux-next since July 4, but the
    > kernel/sched.c part only got added yesterday.


    That came from the updated version that Andi sent me to fix the sparc64
    build problems the original version had.

    Stephen, thanks for diging this out.

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

  18. Re: [PATCH 72/79] sysdev: Pass the attribute to the low level sysdev show/store function


    * Greg KH wrote:

    > On Wed, Jul 23, 2008 at 01:04:35PM +1000, Stephen Rothwell wrote:
    > > Hi Greg,
    > >
    > > On Tue, 22 Jul 2008 14:19:19 -0700 Greg KH wrote:

    [...]
    > > > * Andrew Morton wrote:
    > > >
    > > > > This wrecks use-sysdev_class-in-schedc.patch (below), which I
    > > > > merged a week ago and will now drop.
    > > > >
    > > > > Why did this patch from Andi just turn up in linux-next now,
    > > > > halfway through the merge window? It has a commit date of July
    > > > > 1 yet it has never before been sighted in linux-next.

    [...]
    > > >
    > > > Andi any thoughts?

    > >
    > > The patch
    > > (sysdev-pass-the-attribute-to-the-low-level-sysdev-show-store-function.patch)
    > > has existed in the driver-core part of linux-next since July 4, but the
    > > kernel/sched.c part only got added yesterday.

    >
    > That came from the updated version that Andi sent me to fix the
    > sparc64 build problems the original version had.
    >
    > Stephen, thanks for diging this out.


    ok, lemme do a bit of merge window flaming here, in defense of Andrew.

    This commit history:

    commit 4a0b2b4dbe1335b8b9886ba3dc85a145d5d938ed
    Author: Andi Kleen
    AuthorDate: Tue Jul 1 18:48:41 2008 +0200
    Commit: Greg Kroah-Hartman
    CommitDate: Mon Jul 21 21:55:02 2008 -0700

    sysdev: Pass the attribute to the low level sysdev show/store function

    [...]

    I converted all users in tree to the new show/store prototype. It's
    a single huge patch to avoid unbisectable sections.

    Runtime tested: x86-32, x86-64
    Compiled only: ia64, powerpc
    Not compile tested/only grep converted: sh, arm, avr32

    covers a relatively trivial patch that we'd normally not notice, but it
    is ... a ... misrepresentation of the true situation on several levels:

    1) The changelog. The updated patch Andi sent did not declare the other
    incremental changes (to sched.c) it also included freshly.

    2) The date. This patch did not originate on Jul 1 - if Andi sent a
    material update yesterday it should say Jul 21, not Jul 1.

    3) The justification. Huge atomic patches are fine and can indeed be
    much simpler than a gradual switchover, _iff_ they are done
    perfectly. If there's any doubt then they are by far not the only
    option to pursue - we've done finegrained API changeovers for years.

    .... which all we still wouldnt worry much about (the whole change is
    relatively trivial), if it had been done more carefully without wrecking
    Andrew's workflow in the middle of the merge window.

    If every upstream pull - no matter how trivial - caused such work flow
    problems for Andrew (who is sitting at the _end_ of all linux-next stuff
    so is particularly hard hit by last-minute updates - especially if they
    are not append-only) then Andrew would never be able to get his stuff
    from -mm into -git.

    If Andi cannot be bothered to do a proper finegrained workflow _or_ at
    least make it damned sure that he does not mess up other people's work
    via one huge patch modified on the last day (instead of at least sending
    an incremental patch for the last delta) then he should not be doing
    such complex changes.

    Grmbl!

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

  19. Re: [PATCH 72/79] sysdev: Pass the attribute to the low level sysdev show/store function

    On Wed, Jul 23, 2008 at 11:03:10AM +0200, Ingo Molnar wrote:
    > ok, lemme do a bit of merge window flaming here, in defense of Andrew.
    >
    > This commit history:
    >
    > commit 4a0b2b4dbe1335b8b9886ba3dc85a145d5d938ed
    > Author: Andi Kleen
    > AuthorDate: Tue Jul 1 18:48:41 2008 +0200
    > Commit: Greg Kroah-Hartman
    > CommitDate: Mon Jul 21 21:55:02 2008 -0700
    >
    > sysdev: Pass the attribute to the low level sysdev show/store function
    >
    > [...]
    >
    > I converted all users in tree to the new show/store prototype. It's
    > a single huge patch to avoid unbisectable sections.
    >
    > Runtime tested: x86-32, x86-64
    > Compiled only: ia64, powerpc
    > Not compile tested/only grep converted: sh, arm, avr32
    >
    > covers a relatively trivial patch that we'd normally not notice, but it
    > is ... a ... misrepresentation of the true situation on several levels:
    >
    > 1) The changelog. The updated patch Andi sent did not declare the other
    > incremental changes (to sched.c) it also included freshly.


    Andi's original patch that he sent me _did_ declare that he had updated
    the patch, I didn't change the changelog as it didn't make sense to do
    so.

    > 2) The date. This patch did not originate on Jul 1 - if Andi sent a
    > material update yesterday it should say Jul 21, not Jul 1.


    Again, my fault, I kept the original email headers and just updated the
    patch portion. It's easier for me to do that using quilt, hence the
    lack of the date change.

    > 3) The justification. Huge atomic patches are fine and can indeed be
    > much simpler than a gradual switchover, _iff_ they are done
    > perfectly. If there's any doubt then they are by far not the only
    > option to pursue - we've done finegrained API changeovers for years.


    This kind of API change is atomic, sorry. It was tiny enough that it
    didn't justify a big rework (like I did on the recent device_create()
    stuff for example) to get it modified.

    > ... which all we still wouldnt worry much about (the whole change is
    > relatively trivial), if it had been done more carefully without wrecking
    > Andrew's workflow in the middle of the merge window.


    I understand, and I apologize.

    thanks,

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

+ Reply to Thread
Page 4 of 4 FirstFirst ... 2 3 4