25 Dec, 2016

1 commit


15 Dec, 2016

2 commits


02 Feb, 2016

3 commits


11 Dec, 2015

2 commits

  • Hide the EDAC workqueue pointer in a separate compilation unit and add
    accessors for the workqueue manipulations needed.

    Remove edac_pci_reset_delay_period() which wasn't used by anything. It
    seems it got added without a user with

    91b99041c1d5 ("drivers/edac: updated PCI monitoring")

    Signed-off-by: Borislav Petkov

    Borislav Petkov
     
  • EDAC workqueue destruction is really fragile. We cancel delayed work
    but if it is still running and requeues itself, we still go ahead and
    destroy the workqueue and the queued work explodes when workqueue core
    attempts to run it.

    Make the destruction more robust by switching op_state to offline so
    that requeuing stops. Cancel any pending work *synchronously* too.

    EDAC i7core: Driver loaded.
    general protection fault: 0000 [#1] SMP
    CPU 12
    Modules linked in:
    Supported: Yes
    Pid: 0, comm: kworker/0:1 Tainted: G IE 3.0.101-0-default #1 HP ProLiant DL380 G7
    RIP: 0010:[] [] __queue_work+0x17/0x3f0
    < ... regs ...>
    Process kworker/0:1 (pid: 0, threadinfo ffff88019def6000, task ffff88019def4600)
    Stack:
    ...
    Call Trace:
    call_timer_fn
    run_timer_softirq
    __do_softirq
    call_softirq
    do_softirq
    irq_exit
    smp_apic_timer_interrupt
    apic_timer_interrupt
    intel_idle
    cpuidle_idle_call
    cpu_idle
    Code: ...
    RIP __queue_work
    RSP

    Signed-off-by: Borislav Petkov
    Cc:

    Borislav Petkov
     

18 Nov, 2015

1 commit


05 Nov, 2013

1 commit


28 Nov, 2012

1 commit


12 Jun, 2012

2 commits

  • Use a more common debugging style.

    Remove __FILE__ uses, add missing newlines,
    coalesce formats and align arguments.

    Signed-off-by: Joe Perches
    Signed-off-by: Mauro Carvalho Chehab

    Joe Perches
     
  • The debug macro already adds that. Most of the work here was
    made by this small script:

    $f .=$_ while (<>);

    $f =~ s/(debugf[0-9]\s*\(\s*)__FILE__\s*": /\1"/g;
    $f =~ s/(debugf[0-9]\s*\(\s*)__FILE__\s*/\1/g;
    $f =~ s/(debugf[0-9]\s*\(\s*)__FILE__\s*"MC: /\1"/g;

    $f =~ s/(debugf[0-9]\s*\(\")\%s[\:\,\(\)]*\s*([^\"]*\s*[^\)]+)__func__\s*\,\s*/\1\2/g;
    $f =~ s/(debugf[0-9]\s*\(\")\%s[\:\,\(\)]*\s*([^\"]*\s*[^\)]+),\s*__func__\s*\)/\1\2)/g;
    $f =~ s/(debugf[0-9]\s*\(\"MC\:\s*)\%s[\:\,\(\)]*\s*([^\"]*\s*[^\)]+)__func__\s*\,\s*/\1\2/g;
    $f =~ s/(debugf[0-9]\s*\(\"MC\:\s*)\%s[\:\,\(\)]*\s*([^\"]*\s*[^\)]+),\s*__func__\s*\)/\1\2)/g;

    $f =~ s/\"MC\: \\n\"/"MC:\\n"/g;

    print $f;

    After running the script, manual cleanups were done to fix it the remaining
    places.

    While here, removed the __LINE__ on most places, as it doesn't actually give
    useful info on most places.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

29 May, 2012

1 commit

  • The edac_align_ptr() function is used to prepare data for a single
    memory allocation kzalloc() call. It counts how many bytes are needed
    by some data structure.

    Using it as-is is not that trivial, as the quantity of memory elements
    reserved is not there, but, instead, it is on a next call.

    In order to avoid mistakes when using it, move the number of allocated
    elements into it, making easier to use it.

    Reviewed-by: Borislav Petkov
    Cc: Aristeu Rozanski
    Cc: Doug Thompson
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

15 Dec, 2011

1 commit


27 May, 2011

1 commit


24 Sep, 2009

1 commit

  • Module edac_core.ko uses call_rcu() callbacks in edac_device.c, edac_mc.c
    and edac_pci.c.

    They all use a wait_for_completion() scheme, but this scheme it not 100%
    safe on multiple CPUs. See the _rcu_barrier() implementation which
    explains why extra precausion is needed.

    The patch adds a comment about rcu_barrier() and as a precausion calls
    rcu_barrier(). A maintainer needs to look at removing the
    wait_for_completion code.

    [dougthompson@xmission.com: remove the wait_for_completion code]
    Signed-off-by Jesper Dangaard Brouer
    Signed-off-by: Doug Thompson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Dangaard Brouer
     

14 Apr, 2009

1 commit

  • The edac-core driver includes code which assumes that the work_struct
    which is included in every delayed_work is the first member of that
    structure. This is currently the case but might change in the future, so
    use to_delayed_work() instead, which doesn't make such an assumption.

    linux-2.6.30-rc1 has the to_delayed_work() function that will allow this
    patch to work

    Signed-off-by: Jean Delvare
    Signed-off-by: Doug Thompson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jean Delvare
     

03 Apr, 2009

1 commit

  • Add edac_pci_alloc_index(), because for MAPLE platform there may exist
    several EDAC driver modules that could make use of edac_pci_ctl_info
    structure at the same time. The index allocation for these structures
    should be taken care of by EDAC core.

    Signed-off-by: Harry Ciao
    Cc: Doug Thompson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Harry Ciao
     

07 Jan, 2009

1 commit

  • This patch is part of a larger patch series which will remove the "char
    bus_id[20]" name string from struct device. The device name is managed in
    the kobject anyway, and without any size limitation, and just needlessly
    copied into "struct device".

    [akpm@linux-foundation.org: coding-style fixes]
    Acked-by: Greg Kroah-Hartman
    Acked-by: Doug Thompson
    Signed-off-by: Kay Sievers
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kay Sievers
     

06 May, 2008

1 commit

  • Commit 06916639e2fed9ee475efef2747a1b7429f8fe76 ("driver-core: add
    dev_name() to help transition away from using bus_id") added a static
    inline dev_name() and used it in dev_printk.

    Unfortunately, drivers/edac/edac_core.h defines a macro called
    dev_name(). Rename the latter.

    Diagnosis by Tony Breeds and Michael Ellerman.

    Signed-off-by: Stephen Rothwell
    Acked-by: Doug Thompson
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     

29 Apr, 2008

2 commits

  • Collection of patches, merged into one, from Adrian that do the following:

    1) This patch makes the following needlessly global functions static:
    - edac_pci_get_log_pe()
    - edac_pci_get_log_npe()
    - edac_pci_get_panic_on_pe()
    - edac_pci_unregister_sysfs_instance_kobj()
    - edac_pci_main_kobj_setup()

    2) Remove unneeded function edac_device_find()

    3) Added #if 0 around function edac_pci_find()

    4) make the needlessly global edac_pci_generic_check() static

    5) Removed function edac_check_mc_devices()

    Doug Thompson modified Adrian's patches, to bettern represent
    the direction of EDAC, and make them one patch.

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

    Adrian Bunk
     
  • Signed-off-by: Robert P. J. Day
    Acked-by: Doug Thompson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     

08 Feb, 2008

1 commit


03 Feb, 2008

1 commit


27 Jul, 2007

1 commit

  • This patch fixes sysfs exit code for the EDAC PCI device in a similiar manner
    and the previous fixes for EDAC_MC and EDAC_DEVICE.

    It removes the old (and incorrect) completion model and uses reference counts
    on per instance kobjects and on the edac core module.

    This pattern was applied to the edac_mc and edac_device code, but the EDAC PCI
    code was missed. In addition, this fixes a system hang after a low level
    driver was unloaded. (A cleanup function was called twice, which really
    screwed things up)

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

    Doug Thompson
     

20 Jul, 2007

7 commits