1. 14 12月, 2010 3 次提交
    • H
      ACPI, APEI, Report GHES error information via printk · 32c361f5
      Huang Ying 提交于
      printk is one of the methods to report hardware errors to user space.
      This patch implements hardware error reporting for GHES via printk.
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      32c361f5
    • H
      ACPI, APEI, Add APEI generic error status printing support · f59c55d0
      Huang Ying 提交于
      In APEI, Hardware error information reported by firmware to Linux
      kernel is in the data structure of APEI generic error status (struct
      acpi_hes_generic_status).  While now printk is used by Linux kernel to
      report hardware error information to user space.
      
      So, this patch adds printing support for the data structure, so that
      the corresponding hardware error information can be reported to user
      space via printk.
      
      PCIe AER information printing is not implemented yet.  Will refactor the
      original PCIe AER information printing code to avoid code duplicating.
      
      The output format is as follow:
      
      <error record> :=
      APEI generic hardware error status
      severity: <integer>, <severity string>
      section: <integer>, severity: <integer>, <severity string>
      flags: <integer>
      <section flags strings>
      fru_id: <uuid string>
      fru_text: <string>
      section_type: <section type string>
      <section data>
      
      <severity string>* := recoverable | fatal | corrected | info
      
      <section flags strings># :=
      [primary][, containment warning][, reset][, threshold exceeded]\
      [, resource not accessible][, latent error]
      
      <section type string> := generic processor error | memory error | \
      PCIe error | unknown, <uuid string>
      
      <section data> :=
      <generic processor section data> | <memory section data> | \
      <pcie section data> | <null>
      
      <generic processor section data> :=
      [processor_type: <integer>, <proc type string>]
      [processor_isa: <integer>, <proc isa string>]
      [error_type: <integer>
      <proc error type strings>]
      [operation: <integer>, <proc operation string>]
      [flags: <integer>
      <proc flags strings>]
      [level: <integer>]
      [version_info: <integer>]
      [processor_id: <integer>]
      [target_address: <integer>]
      [requestor_id: <integer>]
      [responder_id: <integer>]
      [IP: <integer>]
      
      <proc type string>* := IA32/X64 | IA64
      
      <proc isa string>* := IA32 | IA64 | X64
      
      <processor error type strings># :=
      [cache error][, TLB error][, bus error][, micro-architectural error]
      
      <proc operation string>* := unknown or generic | data read | data write | \
      instruction execution
      
      <proc flags strings># :=
      [restartable][, precise IP][, overflow][, corrected]
      
      <memory section data> :=
      [error_status: <integer>]
      [physical_address: <integer>]
      [physical_address_mask: <integer>]
      [node: <integer>]
      [card: <integer>]
      [module: <integer>]
      [bank: <integer>]
      [device: <integer>]
      [row: <integer>]
      [column: <integer>]
      [bit_position: <integer>]
      [requestor_id: <integer>]
      [responder_id: <integer>]
      [target_id: <integer>]
      [error_type: <integer>, <mem error type string>]
      
      <mem error type string>* :=
      unknown | no error | single-bit ECC | multi-bit ECC | \
      single-symbol chipkill ECC | multi-symbol chipkill ECC | master abort | \
      target abort | parity error | watchdog timeout | invalid address | \
      mirror Broken | memory sparing | scrub corrected error | \
      scrub uncorrected error
      
      <pcie section data> :=
      [port_type: <integer>, <pcie port type string>]
      [version: <integer>.<integer>]
      [command: <integer>, status: <integer>]
      [device_id: <integer>:<integer>:<integer>.<integer>
      slot: <integer>
      secondary_bus: <integer>
      vendor_id: <integer>, device_id: <integer>
      class_code: <integer>]
      [serial number: <integer>, <integer>]
      [bridge: secondary_status: <integer>, control: <integer>]
      
      <pcie port type string>* := PCIe end point | legacy PCI end point | \
      unknown | unknown | root port | upstream switch port | \
      downstream switch port | PCIe to PCI/PCI-X bridge | \
      PCI/PCI-X to PCIe bridge | root complex integrated endpoint device | \
      root complex event collector
      
      Where, [] designate corresponding content is optional
      
      All <field string> description with * has the following format:
      
      field: <integer>, <field string>
      
      Where value of <integer> should be the position of "string" in <field
      string> description. Otherwise, <field string> will be "unknown".
      
      All <field strings> description with # has the following format:
      
      field: <integer>
      <field strings>
      
      Where each string in <fields strings> corresponding to one set bit of
      <integer>. The bit position is the position of "string" in <field
      strings> description.
      
      For more detailed explanation of every field, please refer to UEFI
      specification version 2.3 or later, section Appendix N: Common
      Platform Error Record.
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      f59c55d0
    • H
      Add CPER PCIe error section structure and constants definition · c9aa308f
      Huang Ying 提交于
      On some machine, PCIe error is reported via APEI (ACPI Platform Error
      Interface).  The error data is passed from firmware to Linux via CPER
      PCIe error section structure.
      
      This patch adds CPER PCIe error section structure and constants
      definition.
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      c9aa308f
  2. 07 12月, 2010 7 次提交
  3. 06 12月, 2010 6 次提交
  4. 05 12月, 2010 4 次提交
    • G
      parisc: Fix GSC PS/2 driver name for keyboard and mouse · 7bfbeae9
      Guy Martin 提交于
      Fix kernel warnings caused by the driver name of GSC PS/2 containing '/'.
      
      The following warnings are observed on a K410 system :
      
      [   10.700000] name 'GSC PS/2 keyboard'
      [   10.732000] ------------[ cut here ]------------
      [   10.772000] WARNING: at fs/proc/generic.c:323
      [   10.828000] Modules linked in:
      [   10.916000]
      [   10.916000]      YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI
      [   10.936000] PSW: 00000000000001000000000000001111 Not tainted
      [   10.992000] r00-03  0004000f 104fe3e0 10201ea0 00000000
      [   11.060000] r04-07  4fc405c8 00000006 4fc405c8 4fc40694
      [   11.124000] r08-11  4fc40708 10438aa0 00000001 1043bfc8
      [   11.184000] r12-15  104ff2a0 104ff2a0 4fc38634 104ff2a0
      [   11.248000] r16-19  f0001570 10479af0 f000006c 1044fe50
      [   11.308000] r20-23  00000000 00000028 104cd858 00000000
      [   11.372000] r24-27  ffffffff 0000000e 1044fe10 1043bbe0
      [   11.436000] r28-31  0000002b 00000078 4fc40800 0000000d
      [   11.496000] sr00-03  00000000 00000000 00000000 00000000
      [   11.560000] sr04-07  00000000 00000000 00000000 00000000
      [   11.624000]
      [   11.688000] IASQ: 00000000 00000000 IAOQ: 10201ea0 10201ea4
      [   11.704000]  IIR: 03ffe01f    ISR: 00000000  IOR: 0000000d
      [   11.772000]  CPU:        0   CR30: 4fc40000 CR31: f01043b0
      [   11.836000]  ORIG_R28: 4fc40940
      [   11.904000]  IAOQ[0]: __xlate_proc_name+0x90/0xd0
      [   11.940000]  IAOQ[1]: __xlate_proc_name+0x94/0xd0
      [   11.996000]  RP(r2): __xlate_proc_name+0x90/0xd0
      [   12.052000] Backtrace:
      [   12.108000]  [<10257790>] vsnprintf+0x290/0x4f4
      [   12.136000]
      [   12.188000] ---[ end trace 91bf6ece17e322dd ]---
      [   12.208000] serio: GSC PS/2 keyboard port at 0x0001c000 irq 19 @ 10:12:7
      [   12.264000] name 'GSC PS/2 mouse'
      [   12.344000] ------------[ cut here ]------------
      [   12.384000] WARNING: at fs/proc/generic.c:323
      [   12.436000] Modules linked in:
      [   12.524000]
      [   12.528000]      YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI
      [   12.544000] PSW: 00000000000001000000000000001111 Tainted: G        W
      [   12.600000] r00-03  0004000f 104fe3e0 10201ea0 00000000
      [   12.680000] r04-07  4fc405c8 00000006 4fc405c8 4fc40694
      [   12.740000] r08-11  4fc40708 10438aa0 00000001 1043bfc8
      [   12.804000] r12-15  104ff2a0 104ff2a0 4fc38634 104ff2a0
      [   12.868000] r16-19  f0001570 10479af0 f000006c 1044fe50
      [   12.928000] r20-23  00000000 00000025 104cd858 00000000
      [   12.992000] r24-27  ffffffff 0000000e 1044fe10 1043bbe0
      [   13.056000] r28-31  00000028 00000078 4fc40800 0000000d
      [   13.116000] sr00-03  00000000 00000000 00000000 00000000
      [   13.180000] sr04-07  00000000 00000000 00000000 00000000
      [   13.244000]
      [   13.308000] IASQ: 00000000 00000000 IAOQ: 10201ea0 10201ea4
      [   13.324000]  IIR: 03ffe01f    ISR: 00000000  IOR: 0000000d
      [   13.392000]  CPU:        0   CR30: 4fc40000 CR31: f01043b0
      [   13.456000]  ORIG_R28: 4fc40940
      [   13.524000]  IAOQ[0]: __xlate_proc_name+0x90/0xd0
      [   13.560000]  IAOQ[1]: __xlate_proc_name+0x94/0xd0
      [   13.616000]  RP(r2): __xlate_proc_name+0x90/0xd0
      [   13.672000] Backtrace:
      [   13.728000]  [<10257790>] vsnprintf+0x290/0x4f4
      [   13.756000]
      [   13.808000] ---[ end trace 91bf6ece17e322de ]---
      [   13.828000] serio: GSC PS/2 mouse port at 0x00020100 irq 19 @ 10:12:8
      Signed-off-by: NGuy Martin <gmsoft@tuxicoman.be>
      Acked-by: NHelge Deller <deller@gmx.de>
      Signed-off-by: NKyle McMartin <kyle@mcmartin.ca>
      7bfbeae9
    • G
      parisc: KittyHawk LCD fix · 79a04296
      Guy Martin 提交于
      K class aka KittyHawk don't have LED support on their LCD. Installing
      HP-UX confirmed this. The current led_wq fills the LCD with black
      characters each time it runs.
      
      The patch prevents the led_wq workqueue and its proc entry to be
      created for KittyHawk machines.
      
      It also increase min_cmd_delay as currently, one character out of two
      is lost when a string is sent to the LCD.
      Signed-off-by: NGuy Martin <gmsoft@tuxicoman.be>
      Signed-off-by: NKyle McMartin <kyle@mcmartin.c>
      79a04296
    • J
      parisc: convert the rest of the irq handlers to simple/percpu · 51890613
      James Bottomley 提交于
      The generic conversion eliminates the spurious no_ack and no_end
      routines, converts all the cascaded handlers to handle_simple_irq() and
      makes iosapic use a modified handle_percpu_irq() to become the same as
      the CPU irq's.  This isn't an essential change, but it eliminates the
      mask/unmask overhead of handle_level_irq().
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      Tested-by: NHelge Deller <deller@gmx.de>
      Signed-off-by: NKyle McMartin <kyle@mcmartin.ca>
      51890613
    • J
      parisc: fix dino/gsc interrupts · d16cd297
      James Bottomley 提交于
      The essential problem we're currently having is that dino (and gsc) is a
      cascaded CPU interrupt.  Under the old __do_IRQ() handler, our CPU
      interrupts basically did an ack followed by an end.  In the new scheme,
      we replaced them with level handlers which do a mask, an ack and then an
      unmask (but no end).  Instead, with the renaming of end to eoi, we
      actually want to call the percpu flow handlers, because they actually
      have all the characteristics we want.
      
      This patch does the conversion and gets my C360 booting again.
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      Signed-off-by: NKyle McMartin <kyle@mcmartin.ca>
      d16cd297
  5. 04 12月, 2010 11 次提交
  6. 03 12月, 2010 9 次提交
    • A
      UBI: fix corrupted PEB detection for NOR flash · 7ac760c2
      Artem Bityutskiy 提交于
      My new shiny code for corrupted PEB detection has NOR specific bug.
      We tread PEB as corrupted and preserve it, if
      
      1. EC header is OK.
      2. VID header is corrupted.
      3. data area is not "all 0xFFs"
      
      In case of NOR we have 'nor_erase_prepare()' quirk, which invalidates
      the headers before erasing the PEB. And we invalidate first the VID
      header, and then the EC header. So if a power cut happens after we have
      invalidated the VID header, but before we have invalidated the EC
      header, we end up with a PEB which satisfies the above 3 conditions,
      and the scanning code will treat it as corrupted, and will print
      scary warnings, wrongly.
      
      This patch fixes the issue by firt invalidating the EC header, then
      invalidating the VID header. In case of power cut inbetween, we still
      just lose the EC header, and UBI can deal with this situation gracefully.
      
      Thanks to Anatolij Gustschin <agust@denx.de> for tracking this down.
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      Reported-by: NAnatolij Gustschin <agust@denx.de>
      Tested-by: NAnatolij Gustschin <agust@denx.de>
      7ac760c2
    • P
      Merge branch 'sh/urgent' into sh-fixes-for-linus · a9fc7492
      Paul Mundt 提交于
      a9fc7492
    • N
      sh: se/7724: Remove FSI/B of GPIO init code · c44352c5
      Nobuhiro Iwamatsu 提交于
      se7724 board does not have FSI/B.
      Signed-off-by: NNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      c44352c5
    • N
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid · 59e57c62
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
        HID: length resolution should be reported units/mm
        HID: add support for F430 Force Feedback Wheel
        HID: egalax: Use kzalloc
        HID: Remove KERN_DEBUG from dbg_hid use
      
      Manually fixed trivial conflict in drivers/hid/hid-input.c (due to
      removal of KERN_DEBUG from dbg_hid use clashing with new keycode
      interface switch)
      59e57c62
    • J
      xen: allocate irq descs on any NUMA node · 29dcbc5c
      Jeremy Fitzhardinge 提交于
      Allocate irq descs on any NUMA node (we don't care) rather than
      specifically node 0, which may not exist.
      
      (At the moment NUMA is meaningless within a domain, so any info
      the kernel has is just from an SRAT table we haven't suppressed/disabled.)
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      29dcbc5c
    • J
      xen: prevent crashes with non-HIGHMEM 32-bit kernels with largeish memory · 2a4c92fa
      Jeremy Fitzhardinge 提交于
      If this is a non-HIGHMEM 32-bit kernel, then the page structures only go
      up to the limit of addressable memory, even if more memory is physically
      present.  Don't try to add that extra memory to the balloon.
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      2a4c92fa
    • N
      do_exit(): make sure that we run with get_fs() == USER_DS · 33dd94ae
      Nelson Elhage 提交于
      If a user manages to trigger an oops with fs set to KERNEL_DS, fs is not
      otherwise reset before do_exit().  do_exit may later (via mm_release in
      fork.c) do a put_user to a user-controlled address, potentially allowing
      a user to leverage an oops into a controlled write into kernel memory.
      
      This is only triggerable in the presence of another bug, but this
      potentially turns a lot of DoS bugs into privilege escalations, so it's
      worth fixing.  I have proof-of-concept code which uses this bug along
      with CVE-2010-3849 to write a zero to an arbitrary kernel address, so
      I've tested that this is not theoretical.
      
      A more logical place to put this fix might be when we know an oops has
      occurred, before we call do_exit(), but that would involve changing
      every architecture, in multiple places.
      
      Let's just stick it in do_exit instead.
      
      [akpm@linux-foundation.org: update code comment]
      Signed-off-by: NNelson Elhage <nelhage@ksplice.com>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      33dd94ae
    • K
      ksm: annotate ksm_thread_mutex is no deadlock source · a0b0f58c
      KOSAKI Motohiro 提交于
      commit 62b61f61 ("ksm: memory hotremove migration only") caused the
      following new lockdep warning.
      
        =======================================================
        [ INFO: possible circular locking dependency detected ]
        -------------------------------------------------------
        bash/1621 is trying to acquire lock:
         ((memory_chain).rwsem){.+.+.+}, at: [<ffffffff81079339>]
        __blocking_notifier_call_chain+0x69/0xc0
      
        but task is already holding lock:
         (ksm_thread_mutex){+.+.+.}, at: [<ffffffff8113a3aa>]
        ksm_memory_callback+0x3a/0xc0
      
        which lock already depends on the new lock.
      
        the existing dependency chain (in reverse order) is:
      
        -> #1 (ksm_thread_mutex){+.+.+.}:
             [<ffffffff8108b70a>] lock_acquire+0xaa/0x140
             [<ffffffff81505d74>] __mutex_lock_common+0x44/0x3f0
             [<ffffffff81506228>] mutex_lock_nested+0x48/0x60
             [<ffffffff8113a3aa>] ksm_memory_callback+0x3a/0xc0
             [<ffffffff8150c21c>] notifier_call_chain+0x8c/0xe0
             [<ffffffff8107934e>] __blocking_notifier_call_chain+0x7e/0xc0
             [<ffffffff810793a6>] blocking_notifier_call_chain+0x16/0x20
             [<ffffffff813afbfb>] memory_notify+0x1b/0x20
             [<ffffffff81141b7c>] remove_memory+0x1cc/0x5f0
             [<ffffffff813af53d>] memory_block_change_state+0xfd/0x1a0
             [<ffffffff813afd62>] store_mem_state+0xe2/0xf0
             [<ffffffff813a0bb0>] sysdev_store+0x20/0x30
             [<ffffffff811bc116>] sysfs_write_file+0xe6/0x170
             [<ffffffff8114f398>] vfs_write+0xc8/0x190
             [<ffffffff8114fc14>] sys_write+0x54/0x90
             [<ffffffff810028b2>] system_call_fastpath+0x16/0x1b
      
        -> #0 ((memory_chain).rwsem){.+.+.+}:
             [<ffffffff8108b5ba>] __lock_acquire+0x155a/0x1600
             [<ffffffff8108b70a>] lock_acquire+0xaa/0x140
             [<ffffffff81506601>] down_read+0x51/0xa0
             [<ffffffff81079339>] __blocking_notifier_call_chain+0x69/0xc0
             [<ffffffff810793a6>] blocking_notifier_call_chain+0x16/0x20
             [<ffffffff813afbfb>] memory_notify+0x1b/0x20
             [<ffffffff81141f1e>] remove_memory+0x56e/0x5f0
             [<ffffffff813af53d>] memory_block_change_state+0xfd/0x1a0
             [<ffffffff813afd62>] store_mem_state+0xe2/0xf0
             [<ffffffff813a0bb0>] sysdev_store+0x20/0x30
             [<ffffffff811bc116>] sysfs_write_file+0xe6/0x170
             [<ffffffff8114f398>] vfs_write+0xc8/0x190
             [<ffffffff8114fc14>] sys_write+0x54/0x90
             [<ffffffff810028b2>] system_call_fastpath+0x16/0x1b
      
      But it's a false positive.  Both memory_chain.rwsem and ksm_thread_mutex
      have an outer lock (mem_hotplug_mutex).  So they cannot deadlock.
      
      Thus, This patch annotate ksm_thread_mutex is not deadlock source.
      
      [akpm@linux-foundation.org: update comment, from Hugh]
      Signed-off-by: NKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Acked-by: NHugh Dickins <hughd@google.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a0b0f58c