01 Nov, 2011

1 commit

  • The pretty much brings in the kitchen sink along
    with it, so it should be avoided wherever reasonably possible in
    terms of being included from other commonly used
    files, as it results in a measureable increase on compile times.

    There doesn't appear to be any module specifics in this file.
    The obvious people who were relying on the presence of
    the vast amount of stuff module.h sucked in have been fixed.

    If other files are implicitly relying on it, then lets see who
    they are and fix them too.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

12 May, 2011

1 commit

  • Since suspend, resume and shutdown operations in struct sysdev_class
    and struct sysdev_driver are not used any more, remove them. Also
    drop sysdev_suspend(), sysdev_resume() and sysdev_shutdown() used
    for executing those operations and modify all of their users
    accordingly. This reduces kernel code size quite a bit and reduces
    its complexity.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Greg Kroah-Hartman

    Rafael J. Wysocki
     

31 Mar, 2011

1 commit


24 Mar, 2011

1 commit

  • Introduce Kconfig option allowing architectures where sysdev
    operations used during system suspend, resume and shutdown have been
    completely replaced with struct sycore_ops operations to avoid
    building sysdev code that will never be used.

    Make callbacks in struct sys_device and struct sysdev_driver depend
    on ARCH_NO_SYSDEV_OPS to allows us to verify if all of the references
    have been actually removed from the code the given architecture
    depends on.

    Make x86 select ARCH_NO_SYSDEV_OPS.

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     

08 Mar, 2010

3 commits

  • Allow to create/remove arrays of sysdev attributes

    Just wrappers around sysfs_create/move_files

    Will be used later to clean up some drivers.

    Signed-off-by: Andi Kleen
    Signed-off-by: Greg Kroah-Hartman

    Andi Kleen
     
  • Add a attribute array that is automatically registered and unregistered
    to struct sysdev_class. This is similar to what struct class has.

    A lot of drivers add list of attributes, so it's better to do
    this easily in the common sysdev layer.

    This adds a new field to struct sysdev_class. I audited the
    whole tree and there are no dynamically allocated sysdev classes,
    so this is fully compatible.

    Signed-off-by: Andi Kleen
    Signed-off-by: Greg Kroah-Hartman

    Andi Kleen
     
  • Passing the attribute to the low level IO functions allows all kinds
    of cleanups, by sharing low level IO code without requiring
    an own function for every piece of data.

    Also drivers can extend the attributes with own data fields
    and use that in the low level function.

    Similar to sysdev_attributes and normal attributes.

    This is a tree-wide sweep, converting everything in one go.

    No functional changes in this patch other than passing the new
    argument everywhere.

    Tested on x86, the non x86 parts are uncompiled.

    Signed-off-by: Andi Kleen
    Signed-off-by: Greg Kroah-Hartman

    Andi Kleen
     

22 Jul, 2008

2 commits

  • This adds a new sysdev_ext_attribute that stores a pointer to the variable
    it manages and some utility functions/macro to easily use them.

    Previously all users wrote custom macros to generate show/store
    functions for each variable, with this it is possible to avoid
    that in many cases.

    Signed-off-by: Andi Kleen
    Signed-off-by: Greg Kroah-Hartman

    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

    Andi Kleen
     

20 Apr, 2008

1 commit

  • * Add cpu_sysdev_class functions to display the following maps
    with cpulist_scnprintf().

    cpu_online_map
    cpu_present_map
    cpu_possible_map

    * Small change to include/linux/sysdev.h to allow the attribute
    name and label to be different (to avoid collision with the
    "attr_online" entry for bringing cpus on- and off-line.)

    Cc: H. Peter Anvin
    Signed-off-by: Mike Travis
    Signed-off-by: Ingo Molnar

    Mike Travis
     

25 Jan, 2008

1 commit


12 Jul, 2007

1 commit

  • sysfs is now completely out of driver/module lifetime game. After
    deletion, a sysfs node doesn't access anything outside sysfs proper,
    so there's no reason to hold onto the attribute owners. Note that
    often the wrong modules were accounted for as owners leading to
    accessing removed modules.

    This patch kills now unnecessary attribute->owner. Note that with
    this change, userland holding a sysfs node does not prevent the
    backing module from being unloaded.

    For more info regarding lifetime rule cleanup, please read the
    following message.

    http://article.gmane.org/gmane.linux.kernel/510293

    (tweaked by Greg to not delete the field just yet, to make it easier to
    merge things properly.)

    Signed-off-by: Tejun Heo
    Cc: Cornelia Huck
    Cc: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Tejun Heo
     

09 May, 2007

1 commit


07 Feb, 2007

1 commit

  • Introduce _SYSDEV_ATTR(), to be used to just define the struct, and not a
    named variable with the attribute. Useful for arrays of sysdev_attributes.

    Signed-off-by: Olof Johansson
    Signed-off-by: Greg Kroah-Hartman
    Signed-off-by: Paul Mackerras

    Olof Johansson
     

22 Jun, 2006

1 commit


17 Apr, 2005

2 commits

  • I thought I'm done with fixing u32 vs. pm_message_t ... unfortunately
    that turned out not to be the case as Russel King pointed out. Here are
    fixes for Documentation and common code (mainly system devices).

    Signed-off-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Machek
     
  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds