27 Mar, 2013

1 commit


01 Mar, 2013

1 commit

  • Pull EDAC fixes and ghes-edac from Mauro Carvalho Chehab:
    "For:

    - Some fixes at edac drivers (i7core_edac, sb_edac, i3200_edac);
    - error injection support for i5100, when EDAC debug is enabled;
    - fix edac when it is loaded builtin (early init for the subsystem);
    - a "Firmware First" EDAC driver, allowing ghes to report errors via
    EDAC (ghes-edac).

    With regards to ghes-edac, this fixes a longstanding BZ at Red Hat
    that happens with Nehalem and Sandy Bridge CPUs: when both GHES and
    i7core_edac or sb_edac are running, the error reports are
    unpredictable, as both BIOS and OS race to access the registers. With
    ghes-edac, the EDAC core will refuse to register any other concurrent
    memory error driver.

    This patchset moves the ghes struct definitions to a separate header
    file (include/acpi/ghes.h) and adds 3 hooks at apei/ghes.c to
    register/unregister and to report errors via ghes-edac. Those changes
    were acked by ghes driver maintainer (Huang)."

    * 'linux_next' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac: (30 commits)
    i5100_edac: convert to use simple_open()
    ghes_edac: fix to use list_for_each_entry_safe() when delete list items
    ghes_edac: Fix RAS tracing
    ghes_edac: Make it compliant with UEFI spec 2.3.1
    ghes_edac: Improve driver's printk messages
    ghes_edac: Don't credit the same memory dimm twice
    ghes_edac: do a better job of filling EDAC DIMM info
    ghes_edac: add support for reporting errors via EDAC
    ghes_edac: Register at EDAC core the BIOS report
    ghes: add the needed hooks for EDAC error report
    ghes: move structures/enum to a header file
    edac: add support for error type "Info"
    edac: add support for raw error reports
    edac: reduce stack pressure by using a pre-allocated buffer
    edac: lock module owner to avoid error report conflicts
    edac: remove proc_name from mci structure
    edac: add a new memory layer type
    edac: initialize the core earlier
    edac: better report error conditions in debug mode
    i5100_edac: Remove two checkpatch warnings
    ...

    Linus Torvalds
     

26 Feb, 2013

1 commit

  • In order to allow reporting errors via EDAC, add hooks for:

    1) register an EDAC driver;
    2) unregister an EDAC driver;
    3) report errors via EDAC.

    As the EDAC driver will need to access the ghes structure, adds it
    as one of the parameters for ghes_do_proc.

    Acked-by: Huang Ying
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

23 Feb, 2013

2 commits

  • * acpi-cleanup:
    ACPI / APEI: Fix crash in apei_hest_parse() for acpi=off

    Rafael J. Wysocki
     
  • After commit 92ef2a2 (ACPI: Change the ordering of PCI root bridge
    driver registrarion), acpi_hest_init() is never called for acpi=off
    (acpi_disabled), so hest_disable is not set, but hest_tab is NULL,
    which causes apei_hest_parse() to crash when it is called from
    aer_acpi_firmware_first().

    Fix that by making apei_hest_parse() check if hest_tab is not NULL
    in addition to checking hest_disable. Also remove the now useless
    acpi_disabled check from apei_hest_parse().

    Reported-by: Thomas Gleixner
    Tested-by: Thomas Gleixner
    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     

22 Feb, 2013

1 commit


20 Feb, 2013

1 commit

  • Pull perf changes from Ingo Molnar:
    "There are lots of improvements, the biggest changes are:

    Main kernel side changes:

    - Improve uprobes performance by adding 'pre-filtering' support, by
    Oleg Nesterov.

    - Make some POWER7 events available in sysfs, equivalent to what was
    done on x86, from Sukadev Bhattiprolu.

    - tracing updates by Steve Rostedt - mostly misc fixes and smaller
    improvements.

    - Use perf/event tracing to report PCI Express advanced errors, by
    Tony Luck.

    - Enable northbridge performance counters on AMD family 15h, by Jacob
    Shin.

    - This tracing commit:

    tracing: Remove the extra 4 bytes of padding in events

    changes the ABI. All involved parties (PowerTop in particular)
    seem to agree that it's safe to do now with the introduction of
    libtraceevent, but the devil is in the details ...

    Main tooling side changes:

    - Add 'event group view', from Namyung Kim:

    To use it, 'perf record' should group events when recording. And
    then perf report parses the saved group relation from file header
    and prints them together if --group option is provided. You can
    use the 'perf evlist' command to see event group information:

    $ perf record -e '{ref-cycles,cycles}' noploop 1
    [ perf record: Woken up 2 times to write data ]
    [ perf record: Captured and wrote 0.385 MB perf.data (~16807 samples) ]

    $ perf evlist --group
    {ref-cycles,cycles}

    With this example, default perf report will show you each event
    separately.

    You can use --group option to enable event group view:

    $ perf report --group
    ...
    # group: {ref-cycles,cycles}
    # ========
    # Samples: 7K of event 'anon group { ref-cycles, cycles }'
    # Event count (approx.): 6876107743
    #
    # Overhead Command Shared Object Symbol
    # ................ ....... ................. ..........................
    99.84% 99.76% noploop noploop [.] main
    0.07% 0.00% noploop ld-2.15.so [.] strcmp
    0.03% 0.00% noploop [kernel.kallsyms] [k] timerqueue_del
    0.03% 0.03% noploop [kernel.kallsyms] [k] sched_clock_cpu
    0.02% 0.00% noploop [kernel.kallsyms] [k] account_user_time
    0.01% 0.00% noploop [kernel.kallsyms] [k] __alloc_pages_nodemask
    0.00% 0.00% noploop [kernel.kallsyms] [k] native_write_msr_safe
    0.00% 0.11% noploop [kernel.kallsyms] [k] _raw_spin_lock
    0.00% 0.06% noploop [kernel.kallsyms] [k] find_get_page
    0.00% 0.02% noploop [kernel.kallsyms] [k] rcu_check_callbacks
    0.00% 0.02% noploop [kernel.kallsyms] [k] __current_kernel_time

    As you can see the Overhead column now contains both of ref-cycles
    and cycles and header line shows group information also - 'anon
    group { ref-cycles, cycles }'. The output is sorted by period of
    group leader first.

    - Initial GTK+ annotate browser, from Namhyung Kim.

    - Add option for runtime switching perf data file in perf report,
    just press 's' and a menu with the valid files found in the current
    directory will be presented, from Feng Tang.

    - Add support to display whole group data for raw columns, from Jiri
    Olsa.

    - Add per processor socket count aggregation in perf stat, from
    Stephane Eranian.

    - Add interval printing in 'perf stat', from Stephane Eranian.

    - 'perf test' improvements

    - Add support for wildcards in tracepoint system name, from Jiri
    Olsa.

    - Add anonymous huge page recognition, from Joshua Zhu.

    - perf build-id cache now can show DSOs present in a perf.data file
    that are not in the cache, to integrate with build-id servers being
    put in place by organizations such as Fedora.

    - perf top now shares more of the evsel config/creation routines with
    'record', paving the way for further integration like 'top'
    snapshots, etc.

    - perf top now supports DWARF callchains.

    - Fix mmap limitations on 32-bit, fix from David Miller.

    - 'perf bench numa mem' NUMA performance measurement suite

    - ... and lots of fixes, performance improvements, cleanups and other
    improvements I failed to list - see the shortlog and git log for
    details."

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (270 commits)
    perf/x86/amd: Enable northbridge performance counters on AMD family 15h
    perf/hwbp: Fix cleanup in case of kzalloc failure
    perf tools: Fix build with bison 2.3 and older.
    perf tools: Limit unwind support to x86 archs
    perf annotate: Make it to be able to skip unannotatable symbols
    perf gtk/annotate: Fail early if it can't annotate
    perf gtk/annotate: Show source lines with gray color
    perf gtk/annotate: Support multiple event annotation
    perf ui/gtk: Implement basic GTK2 annotation browser
    perf annotate: Fix warning message on a missing vmlinux
    perf buildid-cache: Add --update option
    uprobes/perf: Avoid uprobe_apply() whenever possible
    uprobes/perf: Teach trace_uprobe/perf code to use UPROBE_HANDLER_REMOVE
    uprobes/perf: Teach trace_uprobe/perf code to pre-filter
    uprobes/perf: Teach trace_uprobe/perf code to track the active perf_event's
    uprobes: Introduce uprobe_apply()
    perf: Introduce hw_perf_event->tp_target and ->tp_list
    uprobes/perf: Always increment trace_uprobe->nhit
    uprobes/tracing: Kill uprobe_trace_consumer, embed uprobe_consumer into trace_uprobe
    uprobes/tracing: Introduce is_trace_uprobe_enabled()
    ...

    Linus Torvalds
     

24 Jan, 2013

1 commit


19 Jan, 2013

1 commit

  • The bit width check was introduced by 15afae60 (ACPI, APEI: Fix
    incorrect APEI register bit width check and usage), and a fixup
    for incorrect 32-bit width memory address was given by f712c71
    (ACPI, APEI: Fixup common access width firmware bug). Now there
    is a similar symptom:

    [Firmware Bug]: APEI: Invalid bit width + offset in GAR [0x12345000/64/0/3/0]

    Another bogus BIOS reports an incorrect 64-bit width in trigger table.
    Thus, apply to a similar workaround for 64-bit width memory address.

    Signed-off-by: Lans Zhang
    Acked-by: Gary Hade
    Acked-by: Myron Stowe
    Acked-by: Jean Delvare
    Signed-off-by: Rafael J. Wysocki

    Lans Zhang
     

04 Jan, 2013

1 commit

  • This patch will provide a more reliable and easy way for user-space
    applications to have access to AER logs rather than reading them from the
    message buffer. It also provides a way to notify user-space when an AER
    event occurs.

    The aer driver is updated to generate a trace event of function 'aer_event'
    when a PCIe error is reported over the AER interface. The trace event was
    added to both the interrupt based aer path and the firmware first path.

    Signed-off-by: Lance Ortiz
    Acked-by: Mauro Carvalho Chehab
    Acked-by: Boris Petkov
    Signed-off-by: Tony Luck

    Lance Ortiz
     

03 Jan, 2013

1 commit


12 Dec, 2012

3 commits

  • Pull ACPI5 error injection fix from Tony Luck:
    "Trivial fix for error injection code using ACPI5 version of EINJ"

    * tag 'please-pull-einj-fix-for-acpi5' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
    ACPI, APEI, EINJ: Add missed ACPI5 support for error trigger table

    Linus Torvalds
     
  • Pull pstore fixes from Tony Luck:
    "Patch series to allow EFI variable backend to pstore to hold multiple
    records."

    * tag 'please-pull-pstore_mevent' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux:
    efi_pstore: Add a format check for an existing variable name at erasing time
    efi_pstore: Add a format check for an existing variable name at reading time
    efi_pstore: Add a sequence counter to a variable name
    efi_pstore: Add ctime to argument of erase callback
    efi_pstore: Remove a logic erasing entries from a write callback to hold multiple logs
    efi_pstore: Add a logic erasing entries to an erase callback
    efi_pstore: Check remaining space with QueryVariableInfo() before writing data

    Linus Torvalds
     
  • Pull driver core updates from Greg Kroah-Hartman:
    "Here's the large driver core updates for 3.8-rc1.

    The biggest thing here is the various __dev* marking removals. This
    is going to be a pain for the merge with different subsystem trees, I
    know, but all of the patches included here have been ACKed by their
    various subsystem maintainers, as they wanted them to go through here.

    If this is too much of a pain, I can pull all of them out of this tree
    and just send you one with the other fixes/updates and then, after
    3.8-rc1 is out, do the rest of the removals to ensure we catch them
    all, it's up to you. The merges should all be trivial, and Stephen
    has been doing them all in linux-next for a few weeks now quite
    easily.

    Other than the __dev* marking removals, there's nothing major here,
    some firmware loading updates and other minor things in the driver
    core.

    All of these have (much to Stephen's annoyance), been in linux-next
    for a while.

    Signed-off-by: Greg Kroah-Hartman "

    Fixed up trivial conflicts in drivers/gpio/gpio-{em,stmpe}.c due to gpio
    update.

    * tag 'driver-core-3.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (93 commits)
    modpost.c: Stop checking __dev* section mismatches
    init.h: Remove __dev* sections from the kernel
    acpi: remove use of __devinit
    PCI: Remove __dev* markings
    PCI: Always build setup-bus when PCI is enabled
    PCI: Move pci_uevent into pci-driver.c
    PCI: Remove CONFIG_HOTPLUG ifdefs
    unicore32/PCI: Remove CONFIG_HOTPLUG ifdefs
    sh/PCI: Remove CONFIG_HOTPLUG ifdefs
    powerpc/PCI: Remove CONFIG_HOTPLUG ifdefs
    mips/PCI: Remove CONFIG_HOTPLUG ifdefs
    microblaze/PCI: Remove CONFIG_HOTPLUG ifdefs
    dma: remove use of __devinit
    dma: remove use of __devexit_p
    firewire: remove use of __devinitdata
    firewire: remove use of __devinit
    leds: remove use of __devexit
    leds: remove use of __devinit
    leds: remove use of __devexit_p
    mmc: remove use of __devexit
    ...

    Linus Torvalds
     

08 Dec, 2012

1 commit

  • To handle error trigger table correctly, memory region must be
    removed from request region. We had a series of patches to do this
    culminating in:
    commit b4e008dc5
    ACPI, APEI, EINJ, Refine the fix of resource conflict

    but when ACPI5 support was added, we missed updating this area. So
    when using EINJ table on an ACPI5 enabled machine, we get following error:

    APEI: Can not request [mem 0x526b80000-0x526b80007] for APEI EINJ
    Trigger registers

    Fix this by checking for the acpi5 case and using the same code
    that was added earlier.

    Signed-off-by: Chen Gong
    Signed-off-by: Tony Luck

    Chen Gong
     

29 Nov, 2012

1 commit


27 Nov, 2012

2 commits

  • [Issue]

    Currently, a variable name, which identifies each entry, consists of type, id and ctime.
    But if multiple events happens in a short time, a second/third event may fail to log because
    efi_pstore can't distinguish each event with current variable name.

    [Solution]

    A reasonable way to identify all events precisely is introducing a sequence counter to
    the variable name.

    The sequence counter has already supported in a pstore layer with "oopscount".
    So, this patch adds it to a variable name.
    Also, it is passed to read/erase callbacks of platform drivers in accordance with
    the modification of the variable name.


    a variable name of first event: dump-type0-1-12345678
    a variable name of second event: dump-type0-1-12345678

    type:0
    id:1
    ctime:12345678

    If multiple events happen in a short time, efi_pstore can't distinguish them because
    variable names are same among them.

    it can be distinguishable by adding a sequence counter as follows.

    a variable name of first event: dump-type0-1-1-12345678
    a variable name of Second event: dump-type0-1-2-12345678

    type:0
    id:1
    sequence counter: 1(first event), 2(second event)
    ctime:12345678

    In case of a write callback executed in pstore_console_write(), "0" is added to
    an argument of the write callback because it just logs all kernel messages and
    doesn't need to care about multiple events.

    Signed-off-by: Seiji Aguchi
    Acked-by: Rafael J. Wysocki
    Acked-by: Mike Waychison
    Signed-off-by: Tony Luck

    Seiji Aguchi
     
  • [Issue]

    Currently, a variable name, which is used to identify each log entry, consists of type,
    id and ctime. But an erase callback does not use ctime.

    If efi_pstore supported just one log, type and id were enough.
    However, in case of supporting multiple logs, it doesn't work because
    it can't distinguish each entry without ctime at erasing time.

    As you can see below, efi_pstore can't differentiate first event from second one without ctime.

    a variable name of first event: dump-type0-1-12345678
    a variable name of second event: dump-type0-1-23456789

    type:0
    id:1
    ctime:12345678, 23456789

    [Solution]

    This patch adds ctime to an argument of an erase callback.

    It works across reboots because ctime of pstore means the date that the record was originally stored.
    To do this, efi_pstore saves the ctime to variable name at writing time and passes it to pstore
    at reading time.

    Signed-off-by: Seiji Aguchi
    Acked-by: Mike Waychison
    Signed-off-by: Tony Luck

    Seiji Aguchi
     

22 Nov, 2012

1 commit


14 Jul, 2012

1 commit

  • Many firmwares have a common register definition bug where 8-bit
    access width is specified for a 32-bit register. Ideally this should
    be fixed in the BIOS, but earlier versions of the kernel did not
    complain, so fix that up silently.

    This closes kernel bug #43282:
    https://bugzilla.kernel.org/show_bug.cgi?id=43282

    Signed-off-by: Jean Delvare
    Acked-by: Huang Ying
    Acked-by: Gary Hade
    Cc: stable@vger.kernel.org [3.4+]
    Signed-off-by: Len Brown

    Jean Delvare
     

12 Jun, 2012

1 commit

  • This patch fixed the following bug.

    https://bugzilla.kernel.org/show_bug.cgi?id=43282

    This is caused by a firmware bug checking (checking generic address
    register provided by firmware) in runtime. The checking should be
    done in address mapping time instead of runtime to avoid too much
    error reporting in runtime.

    Reported-by: Pawel Sikora
    Signed-off-by: Huang Ying
    Tested-by: Jean Delvare
    Cc: stable@vger.kernel.org
    Signed-off-by: Len Brown

    Huang Ying
     

31 Mar, 2012

1 commit

  • Conflicts:
    drivers/acpi/apei/apei-base.c

    This was a conflict between

    15afae604651d4e17652d2ffb56f5e36f991cfef
    (CPI, APEI: Fix incorrect APEI register bit width check and usage)

    and

    653f4b538f66d37db560e0f56af08117136d29b7
    (ACPICA: Expand OSL memory read/write interfaces to 64 bits)

    The former changed a parameter in the call to acpi_os_read_memory64()
    and the later replaced all calls to acpi_os_read_memory64()
    with calls to acpi_os_read_memory().

    Signed-off-by: Len Brown

    Len Brown
     

30 Mar, 2012

5 commits

  • The function apei_estatus_print() and apei_estatus_check() forget to move ahead
    the gdata pointer when dealing with multiple generic error data sections.

    Signed-off-by: Jiang Liu
    Signed-off-by: Len Brown

    Jiang Liu
     
  • The current code incorrectly assumes that
    (1) the APEI register bit width is always 8, 16, 32, or 64 and
    (2) the APEI register bit width is always equal to the APEI
    register access width.

    ERST serialization instructions entries such as:

    [030h 0048 1] Action : 00 [Begin Write Operation]
    [031h 0049 1] Instruction : 03 [Write Register Value]
    [032h 0050 1] Flags (decoded below) : 01
    Preserve Register Bits : 1
    [033h 0051 1] Reserved : 00

    [034h 0052 12] Register Region : [Generic Address Structure]
    [034h 0052 1] Space ID : 00 [SystemMemory]
    [035h 0053 1] Bit Width : 03
    [036h 0054 1] Bit Offset : 00
    [037h 0055 1] Encoded Access Width : 03 [DWord Access:32]
    [038h 0056 8] Address : 000000007F2D7038

    [040h 0064 8] Value : 0000000000000001
    [048h 0072 8] Mask : 0000000000000007

    break this assumption by yielding:
    [Firmware Bug]: APEI: Invalid bit width in GAR [0x7f2d7038/3/0]

    I have found no ACPI specification requirements corresponding
    with the above assumptions. There is even a good example in
    the Serialization Instruction Entries section (ACPI 4.0 section
    17.4,1.2, ACPI 4.0a section 2.5.1.2, ACPI 5.0 section 18.5.1.2)
    that mentions a serialization instruction with a bit range of
    [6:2] which is 5 bits wide, _not_ 8, 16, 32, or 64 bits wide.

    Compile and boot tested with 3.3.0-rc7 on a IBM HX5.

    Signed-off-by: Gary Hade
    Signed-off-by: Len Brown

    Gary Hade
     
  • Some APEI firmware implementation will access injected address
    specified in param1 to trigger the error when injecting memory
    error, which means if one SRAR error is injected, the crash
    always happens because it is executed in kernel context. This
    new parameter can disable trigger action and control is taken
    over by the user. In this way, an SRAR error can happen in user
    context instead of crashing the system. This function is highly
    depended on BIOS implementation so please ensure you know the
    BIOS trigger procedure before you enable this switch.

    v2:
    notrigger should be created together with param1/param2

    Tested-by: Tony Luck
    Signed-off-by: Chen Gong
    Signed-off-by: Len Brown

    Chen Gong
     
  • On the platforms with ACPI4.x support, parameter extension
    is not always doable, which means only parameter extension
    is enabled, einj_param can take effect.

    v2->v1: stopping early in einj_get_parameter_address for einj_param

    Signed-off-by: Chen Gong
    Acked-by: Tony Luck
    Signed-off-by: Len Brown

    Chen Gong
     
  • This fixes a trivial copy & paste error in ERST header length check.
    It's just for future safety because sizeof(struct acpi_table_einj)
    equals to sizeof(struct acpi_table_erst) with current ACPI5.0
    specification. It applies to v3.3-rc6.

    Signed-off-by: Jiang Liu
    Acked-by: Huang Ying
    Signed-off-by: Len Brown

    Jiang Liu
     

22 Mar, 2012

1 commit

  • This change expands acpi_os_read_memory and acpi_os_write_memory to a
    full 64 bits. This allows 64 bit transfers via the acpi_read and
    acpi_write interfaces. Note: The internal acpi_hw_read and acpi_hw_write
    interfaces remain at 32 bits, because 64 bits is not needed to
    access the standard ACPI registers.

    Signed-off-by: Bob Moore
    Signed-off-by: Lin Ming
    Signed-off-by: Len Brown

    Bob Moore
     

24 Jan, 2012

3 commits

  • ioremap() has become more picky and is now spitting out console messages like:

    ioremap error for 0xbddbd000-0xbddbe000, requested 0x10, got 0x0

    when loading the einj driver. What we are trying to so here is map
    a couple of data structures that the EINJ table points to. Perhaps
    acpi_os_map_memory() is a better tool for this?
    Most importantly it works, but as a side benefit it maps the structures
    into kernel virtual space so we can access them with normal C memory
    dereferences, so instead of using:
    writel(param1, &v5param->apicid);
    we can use the more natural:
    v5param->apicid = param1;

    Signed-off-by: Tony Luck
    Signed-off-by: Len Brown

    Luck, Tony
     
  • This function is returning pointers. Sparse complains here:
    drivers/acpi/apei/einj.c:262:32: warning:
    Using plain integer as NULL pointer

    Signed-off-by: Dan Carpenter
    Acked-by: Huang Ying
    Signed-off-by: Len Brown

    Dan Carpenter
     
  • According to the ACPI spec [1] section 18.6.4 the TRIGGER_ERROR action
    table can consists of zero elements.

    [1] Advanced Configuration and Power Interface Specification
    Revision 5.0, December 6, 2011
    http://www.acpi.info/DOWNLOADS/ACPIspec50.pdf

    Signed-off-by: Niklas Söderlund
    Acked-by: Huang Ying
    Signed-off-by: Len Brown

    Niklas Söderlund
     

21 Jan, 2012

1 commit

  • Base ACPI (CA) currently does not support atomic 64-bit reads and writes
    (acpi_read() and acpi_write() split 64-bit loads/stores into two
    32-bit transfers) yet APEI expects 64-bit transfer capability, even
    when running on 32-bit systems.

    This patch implements 64-bit read and write routines for APEI usage.

    This patch re-factors similar functionality introduced in commit
    04c25997c97, bringing it into the ACPI subsystem in preparation for
    removing ./drivers/acpi/atomicio.[ch]. In the implementation I have
    replicated acpi_os_read_memory() and acpi_os_write_memory(), creating
    64-bit versions for APEI to utilize, as opposed to something more
    elegant. My thinking is that we should attempt to see if we can get
    ACPI's CA/OSL changed so that the existing acpi_read() and acpi_write()
    interfaces are natively 64-bit capable and then subsequently remove the
    replication.

    Signed-off-by: Myron Stowe
    Signed-off-by: Len Brown

    Myron Stowe
     

19 Jan, 2012

1 commit

  • This includes initial support for the recently published ACPI 5.0 spec.
    In particular, support for the "hardware-reduced" bit that eliminates
    the dependency on legacy hardware.

    APEI has patches resulting from testing on real hardware.

    Plus other random fixes.

    * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (52 commits)
    acpi/apei/einj: Add extensions to EINJ from rev 5.0 of acpi spec
    intel_idle: Split up and provide per CPU initialization func
    ACPI processor: Remove unneeded variable passed by acpi_processor_hotadd_init V2
    ACPI processor: Remove unneeded cpuidle_unregister_driver call
    intel idle: Make idle driver more robust
    intel_idle: Fix a cast to pointer from integer of different size warning in intel_idle
    ACPI: kernel-parameters.txt : Add intel_idle.max_cstate
    intel_idle: remove redundant local_irq_disable() call
    ACPI processor: Fix error path, also remove sysdev link
    ACPI: processor: fix acpi_get_cpuid for UP processor
    intel_idle: fix API misuse
    ACPI APEI: Convert atomicio routines
    ACPI: Export interfaces for ioremapping/iounmapping ACPI registers
    ACPI: Fix possible alignment issues with GAS 'address' references
    ACPI, ia64: Use SRAT table rev to use 8bit or 16/32bit PXM fields (ia64)
    ACPI, x86: Use SRAT table rev to use 8bit or 32bit PXM fields (x86/x86-64)
    ACPI: Store SRAT table revision
    ACPI, APEI, Resolve false conflict between ACPI NVS and APEI
    ACPI, Record ACPI NVS regions
    ACPI, APEI, EINJ, Refine the fix of resource conflict
    ...

    Linus Torvalds
     

18 Jan, 2012

2 commits


17 Jan, 2012

5 commits

  • APEI needs memory access in interrupt context. The obvious choice is
    acpi_read(), but originally it couldn't be used in interrupt context
    because it makes temporary mappings with ioremap(). Therefore, we added
    drivers/acpi/atomicio.c, which provides:
    acpi_pre_map_gar() -- ioremap in process context
    acpi_atomic_read() -- memory access in interrupt context
    acpi_post_unmap_gar() -- iounmap

    Later we added acpi_os_map_generic_address() (2971852) and enhanced
    acpi_read() so it works in interrupt context as long as the address has
    been previously mapped (620242a). Now this sequence:
    acpi_os_map_generic_address() -- ioremap in process context
    acpi_read()/apei_read() -- now OK in interrupt context
    acpi_os_unmap_generic_address()
    is equivalent to what atomicio.c provides.

    This patch introduces apei_read() and apei_write(), which currently are
    functional equivalents of acpi_read() and acpi_write(). This is mainly
    proactive, to prevent APEI breakages if acpi_read() and acpi_write()
    are ever augmented to support the 'bit_offset' field of GAS, as APEI's
    __apei_exec_write_register() precludes splitting up functionality
    related to 'bit_offset' and APEI's 'mask' (see its
    APEI_EXEC_PRESERVE_REGISTER block).

    With apei_read() and apei_write() in place, usages of atomicio routines
    are converted to apei_read()/apei_write() and existing calls within
    osl.c and the CA, based on the re-factoring that was done in an earlier
    patch series - http://marc.info/?l=linux-acpi&m=128769263327206&w=2:
    acpi_pre_map_gar() --> acpi_os_map_generic_address()
    acpi_post_unmap_gar() --> acpi_os_unmap_generic_address()
    acpi_atomic_read() --> apei_read()
    acpi_atomic_write() --> apei_write()

    Note that acpi_read() and acpi_write() currently use 'bit_width'
    for accessing GARs which seems incorrect. 'bit_width' is the size of
    the register, while 'access_width' is the size of the access the
    processor must generate on the bus. The 'access_width' may be larger,
    for example, if the hardware only supports 32-bit or 64-bit reads. I
    wanted to minimize any possible impacts with this patch series so I
    did *not* change this behavior.

    Signed-off-by: Myron Stowe
    Signed-off-by: Len Brown

    Myron Stowe
     
  • Some firmware will access memory in ACPI NVS region via APEI. That
    is, instructions in APEI ERST/EINJ table will read/write ACPI NVS
    region. The original resource conflict checking in APEI code will
    check memory/ioport accessed by APEI via general resource management
    mech. But ACPI NVS region is marked as busy already, so that the
    false resource conflict will prevent APEI ERST/EINJ to work.

    To fix this, this patch excludes ACPI NVS regions when APEI components
    request resources. So that they will not conflict with ACPI NVS
    regions.

    Reported-and-tested-by: Pavel Ivanov
    Signed-off-by: Huang Ying
    Signed-off-by: Len Brown

    Huang Ying
     
  • Current fix for resource conflict is to remove the address region from trigger resource, which is highly relies on valid user
    input. This patch is trying to avoid such potential issues by fetching the
    exact address region from trigger action table entry.

    Signed-off-by: Xiao, Hui
    Signed-off-by: Huang Ying
    Signed-off-by: Len Brown

    Xiao, Hui
     
  • Some APEI firmware implementation will access injected address
    specified in param1 to trigger the error when injecting memory error.
    This will cause resource conflict with RAM.

    On one of our testing machine, if injecting at memory address
    0x10000000, the following error will be reported in dmesg:

    APEI: Can not request iomem region for GARs.

    This patch removes the injecting memory address range from trigger
    table resources to avoid conflict.

    Signed-off-by: Huang Ying
    Tested-by: Tony Luck
    Signed-off-by: Len Brown

    Huang Ying
     
  • Because printk is not safe inside NMI handler, the recoverable error
    records received in NMI handler will be queued to be printked in a
    delayed IRQ context via irq_work. If a fatal error occurs after the
    recoverable error and before the irq_work processed, we lost a error
    report.

    To solve the issue, the queued error records are printked in NMI
    handler if system will go panic.

    Signed-off-by: Huang Ying
    Signed-off-by: Len Brown

    Huang Ying