15 Dec, 2011

1 commit


21 Apr, 2011

1 commit


31 Mar, 2011

1 commit


17 Mar, 2011

1 commit


07 Jan, 2011

1 commit

  • Make the ->{get|set}_sdram_scrub_rate return the actual scrub rate
    bandwidth it succeeded setting and remove superfluous arg pointer used
    for that. A negative value returned still means that an error occurred
    while setting the scrubrate. Document this for future reference.

    Signed-off-by: Borislav Petkov

    Borislav Petkov
     

27 Oct, 2010

1 commit

  • * 'linux_next' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/i7core: (34 commits)
    i7core_edac: return -ENODEV when devices were already probed
    i7core_edac: properly terminate pci_dev_table
    i7core_edac: Avoid PCI refcount to reach zero on successive load/reload
    i7core_edac: Fix refcount error at PCI devices
    i7core_edac: it is safe to i7core_unregister_mci() when mci=NULL
    i7core_edac: Fix an oops at i7core probe
    i7core_edac: Remove unused member channels in i7core_pvt
    i7core_edac: Remove unused arg csrow from get_dimm_config
    i7core_edac: Reduce args of i7core_register_mci
    i7core_edac: Introduce i7core_unregister_mci
    i7core_edac: Use saved pointers
    i7core_edac: Check probe counter in i7core_remove
    i7core_edac: Call pci_dev_put() when alloc_i7core_dev() failed
    i7core_edac: Fix error path of i7core_register_mci
    i7core_edac: Fix order of lines in i7core_register_mci
    i7core_edac: Always do get/put for all devices
    i7core_edac: Introduce i7core_pci_ctl_create/release
    i7core_edac: Introduce free_i7core_dev
    i7core_edac: Introduce alloc_i7core_dev
    i7core_edac: Reduce args of i7core_get_onedevice
    ...

    Linus Torvalds
     

24 Oct, 2010

5 commits

  • This is a nasty bug. Since kobject count will be reduced by zero by
    edac_mc_del_mc(), and this triggers the kobj release method, the
    mci memory will be freed automatically. So, all we have left is ctl_name,
    as shown by enabling debug:

    [ 80.822186] EDAC DEBUG: in drivers/edac/edac_mc_sysfs.c, line at 1020: edac_remove_sysfs_mci_device() remove_link
    [ 80.832590] EDAC DEBUG: in drivers/edac/edac_mc_sysfs.c, line at 1024: edac_remove_sysfs_mci_device() remove_mci_instance
    [ 80.843776] EDAC DEBUG: in drivers/edac/edac_mc_sysfs.c, line at 640: edac_mci_control_release() mci instance idx=0 releasing
    [ 80.855163] EDAC MC: Removed device 0 for i7core_edac.c i7 core #0: DEV 0000:3f:03.0
    [ 80.862936] EDAC DEBUG: in drivers/edac/i7core_edac.c, line at 2089: (null): free structs
    [ 80.871134] EDAC DEBUG: in drivers/edac/edac_mc.c, line at 238: edac_mc_free()
    [ 80.878379] EDAC DEBUG: in drivers/edac/edac_mc_sysfs.c, line at 726: edac_mc_unregister_sysfs_main_kobj()
    [ 80.888043] EDAC DEBUG: in drivers/edac/i7core_edac.c, line at 1232: drivers/edac/i7core_edac.c: i7core_put_devices()

    Also, kfree(mci) shouldn't happen at the kobj.release, as it happens
    when edac_remove_sysfs_mci_device() is called, but the logic is:
    edac_remove_sysfs_mci_device(mci);
    edac_printk(KERN_INFO, EDAC_MC,
    "Removed device %d for %s %s: DEV %s\n", mci->mc_idx,
    mci->mod_name, mci->ctl_name, edac_dev_name(mci));
    So, as the edac_printk() needs the mci struct, this generates an OOPS.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • This is important to track a nasty bug at the free logic.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • A very nasty bug were happening on edac core, due to the way mci objects are
    freed. mci memory is freed when kobject count reaches zero, by
    edac_mci_control_release(). However, from the logs, this is clearly happening
    before the final usage of mci struct:

    [15799.607454] EDAC DEBUG: in drivers/edac/edac_mc_sysfs.c, line at 640: edac_mci_control_release() mci instance idx=0 releasing
    [15799.618773] EDAC DEBUG: in drivers/edac/edac_mc_sysfs.c, line at 769: edac_inst_grp_release()
    [15799.627326] EDAC DEBUG: in drivers/edac/edac_mc_sysfs.c, line at 894: edac_remove_mci_instance_attributes() end of seeking for group all_channel_counts
    [15799.640887] EDAC DEBUG: in drivers/edac/edac_mc_sysfs.c, line at 877: edac_remove_mci_instance_attributes() sysfs_attrib = ffffffffa01d7240
    [15799.653412] EDAC DEBUG: in drivers/edac/edac_mc_sysfs.c, line at 1020: edac_remove_sysfs_mci_device() remove_link
    [15799.663753] EDAC DEBUG: in drivers/edac/edac_mc_sysfs.c, line at 1024: edac_remove_sysfs_mci_device() remove_mci_instance

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Make sure we remove groups at the right order

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • There are two groups of sysfs attributes: one for rdimm and another
    for udimm. Instead of changing dynamically the unique static struct
    for handling udimm's, declare two vars and make them constant.

    This avoids the risk of having two or more memory controllers, each
    needing a different set of attributes.

    While here, use const on all places where it is applicable.

    Signed-off-by: Mauro Carvalho Chehab

    edac_core: use const for constant sysfs arguments

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

21 Oct, 2010

2 commits


03 Aug, 2010

1 commit

  • Fortify the interface to not accept negative values, remove
    memctrl_int_store() as a result. Also, sanitize bandwidth setting by
    making the argument a simple u32 instead of strange u32 pointer being
    passed around for no obvious reason. Then, fix error handling and teach
    it to return proper error values. Finally, make code more readable,
    simplify debug messages.

    Cc: Mauro Carvalho Chehab
    Cc: Arthur Jones
    Signed-off-by: Borislav Petkov
    Acked-by: Doug Thompson

    Borislav Petkov
     

10 May, 2010

4 commits


30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

08 Mar, 2010

1 commit

  • Constify struct sysfs_ops.

    This is part of the ops structure constification
    effort started by Arjan van de Ven et al.

    Benefits of this constification:

    * prevents modification of data that is shared
    (referenced) by many other structure instances
    at runtime

    * detects/prevents accidental (but not intentional)
    modification attempts on archs that enforce
    read-only kernel data at runtime

    * potentially better optimized code as the compiler
    can assume that the const data cannot be changed

    * the compiler/linker move const data into .rodata
    and therefore exclude them from false sharing

    Signed-off-by: Emese Revfy
    Acked-by: David Teigland
    Acked-by: Matt Domsch
    Acked-by: Maciej Sosnowski
    Acked-by: Hans J. Koch
    Acked-by: Pekka Enberg
    Acked-by: Jens Axboe
    Acked-by: Stephen Hemminger
    Signed-off-by: Greg Kroah-Hartman

    Emese Revfy
     

01 Jul, 2009

1 commit


26 Jul, 2008

4 commits

  • The channel DIMM label does not seem to be used much in the edac code.
    However, where it is used (in the core code), it is assumed to not have a
    newline embedded. This leaves the sysfs file newline free which looks
    funny when cat'ing it. Here we just add the trailing newline to the sysfs
    chX_dimm_label output...

    [Doug Thompson note: the DIMM label is one of the primary uses of EDAC.
    User space daemon scripts, edac-utils@sourceforge, populate the DIMM label
    fields, via /sys/devices/system/edac attributes, with the silk screen
    labels of the motherboard in use. dmidecode access BIOS tables, but BIOS
    tables are well known to be incorrect and useless in these respects.
    edac-utils will strip off any newlines before its use of the output, when
    displaying DIMM slot silk screen labels.

    Signed-off-by: Arthur Jones
    Signed-off-by: Doug Thompson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arthur Jones
     
  • Static kobjects and ksets are not supported in Linux kernel. Convert the
    mc_kset from static to dynamic. This patch depends on my previous patch
    to remove the module parameter attributes from mc...

    Signed-off-by: Arthur Jones
    Signed-off-by: Doug Thompson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arthur Jones
     
  • /sys/devices/system/edac/mc has a few files which are duplicated in
    /sys/module/edac_core/parameters. Now that all the functionality is
    duplicated between these two locations, we remove the former kobject
    attributes and update the documentation.

    Signed-off-by: Arthur Jones
    Signed-off-by: Doug Thompson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arthur Jones
     
  • When updating the edac_mc_poll_msec module parameter from the sysfs
    /sys/module/edac_core/parameters/edac_mc_poll_msec file, we don't update
    the workq timers. So that, if we move from a big poll time to a small
    one, the small one won't take effect until the big one has timed out.

    Here we provide a new module parameter set method to call out to the
    update routine. This brings the /sys/module/edac_core/parameters
    functionality up to that provided by the /sys/drivers/system/edac/mc sysfs
    module parameter files so that we can remove them or at least link to the
    /sys/module files...

    Signed-off-by: Arthur Jones
    Signed-off-by: Doug Thompson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arthur Jones
     

08 Feb, 2008

1 commit


25 Jan, 2008

3 commits


13 Oct, 2007

1 commit


27 Jul, 2007

1 commit

  • This fixes a deadlock that could occur on a 'setup' and 'teardown' sequence of
    the workq for a edac_mc control structure instance. A similiar fix was
    previously implemented for the edac_device code.

    In addition, the edac_mc device code there was missing code to allow the workq
    period valu to be altered via sysfs control.

    This patch adds that fix on the code, and allows for the changing of the
    period value as well.

    Cc: Alan Cox
    Signed-off-by: Doug Thompson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Doug Thompson
     

20 Jul, 2007

9 commits

  • This patch refactors the 'releasing' of kobjects for the edac_mc type of
    device. The correct pattern of kobject release is followed.

    As internal kobjs are allocated they bump a ref count on the top level kobj.
    It in turn has a module ref count on the edac_core module. When internal
    kobjects are released, they dec the ref count on the top level kobj. When the
    top level kobj reaches zero, it decrements the ref count on the edac_core
    object, allow it to be unloaded, as all resources have all now been released.

    Cc: Alan Cox alan@lxorguk.ukuu.org.uk
    Signed-off-by: Doug Thompson
    Acked-by: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Doug Thompson
     
  • Patches to conform to coding style, namely static don't need to be initialized
    to NULL nor '0', as that is the default

    Signed-off-by: Douglas Thompson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Douglas Thompson
     
  • This patch fixes some remnant spaces inserted by the use of Lindent.
    Seems Lindent adds some spaces when it shoulded. These have been fixed.
    In addition, goto targets have issues, these have been fixed
    in this patch.

    Signed-off-by: Douglas Thompson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Douglas Thompson
     
  • Added new controls for the edac_device and edac_mc sysfs folder.
    These can be initialized by the low level driver to provide misc
    controls into the low level driver for its use

    Signed-off-by: Douglas Thompson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Douglas Thompson
     
  • Run the EDAC CORE files through Lindent for cleanup

    Signed-off-by: Douglas Thompson
    Signed-off-by: Dave Jiang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Douglas Thompson
     
  • Fixup poll values for MC and PCI.
    Also make mc function names unique to mc.

    Signed-off-by: Dave Jiang
    Signed-off-by: Douglas Thompson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Jiang
     
  • Move the memory controller object to work queue based implementation from the
    kernel thread based.

    Signed-off-by: Dave Jiang
    Signed-off-by: Douglas Thompson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Jiang
     
  • In the refactoring of edac_mc.c into several subsystem files,
    the header file edac_mc.h became meaningless. A new header file
    edac_core.h was created. All the files that previously included
    "edac_mc.h" are changed to include "edac_core.h".

    Signed-off-by: Douglas Thompson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Douglas Thompson
     
  • Adding missing mem types for use in the sysfs presentation file for
    Memory Controller device objects.

    Signed-off-by: Dave Jiang
    Signed-off-by: Doug Thompson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Jiang