1. 16 10月, 2010 7 次提交
    • N
      PCI: add quirk for non-symmetric-mode irq routing to versions 0 and 4 of the MCP55 northbridge · 66db60ea
      Neil Horman 提交于
      A long time ago I worked on a RHEL5 bug in which kdump hung during boot
      on a set of systems.  The systems hung because they never received timer
      interrupts during calibrate_delay.  These systems also all had Opteron
      processors on a hypertransport bus, bridged to a pci bus via an Nvidia
      MCP55 northbridge chip.  After much wrangling I managed to learn from
      Nvidia that they have an undocumented register in some versions of that
      chip which control how legacy interrupts are send to the cpu complex
      when the ioapic isn't active.  Nvidia defaults this register to only
      send legacy interrupts to the BSP, so if kdump happens to boot on an AP,
      we never get timer interrupts and boom.  I had initially used this quirk
      as a workaround, with my intent being to move apic initalization to an
      earlier point in the boot process, so the setting of the register would
      be irrelevant.  Given the work involved in doing that however, the
      fragile nature of the apic initalization code, and the fact that, over
      the 2 years since we found this bug, the MCP55 is the only chip which
      seems to have this issue, I've figure at this point its likely safer to
      just carry the quirk around.  By setting the referenced bits in this
      hidden register, interrupts will be broadcast to all cpus when the
      ioapic isn't active on the above described systems.
      Acked-by: NSimon Horman <horms@verge.net.au>
      Acked-by: NVivek Goyal <vgoyal@redhat.com>
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      66db60ea
    • R
      PCI/PCIe/AER: Disable native AER service if BIOS has precedence · b22c3d82
      Rafael J. Wysocki 提交于
      There is a design issue related to PCIe AER and _OSC that the BIOS
      may be asked to grant control of the AER service even if some
      Hardware Error Source Table (HEST) entries contain information
      meaning that the BIOS really should control it.  Namely,
      pcie_port_acpi_setup() calls pcie_aer_get_firmware_first() that
      determines whether or not the AER service should be controlled by
      the BIOS on the basis of the HEST information for the given PCIe
      port.  The BIOS is asked to grant control of the AER service for
      a PCIe Root Complex if pcie_aer_get_firmware_first() returns 'false'
      for at least one root port in that complex, even if all of the other
      root ports' HEST entries have the FIRMWARE_FIRST flag set (and none
      of them has the GLOBAL flag set).  However, if the AER service is
      controlled by the kernel, that may interfere with the BIOS' handling
      of the error sources having the FIRMWARE_FIRST flag.  Moreover,
      there may be PCIe endpoints that have the FIRMWARE_FIRST flag set in
      HEST and are attached to the root ports in question, in which case it
      also may be unsafe to ask the BIOS for control of the AER service.
      
      For this reason, introduce a function checking if there's at least
      one PCIe-related HEST entry with the FIRMWARE_FIRST flag set and
      disable the native AER service altogether if this function returns
      'true'.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      b22c3d82
    • S
      PCI: pci_driver make name const · 42b21932
      Stephen Hemminger 提交于
      The name field in pci_driver should be const, it is not
      modified by PCI subsystem.
      Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      42b21932
    • T
      PCI hotplug: ibmphp-hpc: semaphore cleanup · 5a37f138
      Thomas Gleixner 提交于
      Get rid of init_MUTEX[_LOCKED]() and use sema_init() instead.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      5a37f138
    • B
      PCI: aerdrv: fix uninitialized variable warning · 50c1126e
      Bill Pemberton 提交于
      quiet the warning about use of uninitialized e_src in
      aer_isr()  e_src is initialized by get_e_source()
      Signed-off-by: NBill Pemberton <wfp5p@virginia.edu>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      50c1126e
    • A
      PCI: kill BKL in /proc/pci · 991f7395
      Arnd Bergmann 提交于
      All operations in the pci procfs ioctl functions are
      atomic, so no lock is needed here.
      
      Also add a compat_ioctl method, since all the commands
      are compatible in 32 bit mode.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: linux-pci@vger.kernel.org
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      991f7395
    • J
      PCI: Adjust confusing if indentation in pcie_get_readrq · 93e75fab
      Julia Lawall 提交于
      Indent the branch of an if.
      
      The semantic match that finds this problem is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r disable braces4@
      position p1,p2;
      statement S1,S2;
      @@
      
      (
      if (...) { ... }
      |
      if (...) S1@p1 S2@p2
      )
      
      @script:python@
      p1 << r.p1;
      p2 << r.p2;
      @@
      
      if (p1[0].column == p2[0].column):
        cocci.print_main("branch",p1)
        cocci.print_secs("after",p2)
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      93e75fab
  2. 15 10月, 2010 5 次提交
  3. 14 10月, 2010 11 次提交
  4. 13 10月, 2010 5 次提交
    • R
      ARM: relax ioremap prohibition (309caa9c) for -final and -stable · 06c10884
      Russell King 提交于
      ... but produce a big warning about the problem as encouragement
      for people to fix their drivers.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      06c10884
    • R
    • M
      ARM: 6440/1: ep93xx: DMA: fix channel_disable · 10d48b39
      Mika Westerberg 提交于
      When channel_disable() is called, it disables per channel interrupts and
      waits until channels state becomes STATE_STALL, and then disables the
      channel. Now, if the DMA transfer is disabled while the channel is in
      STATE_NEXT we will not wait anything and disable the channel immediately.
      This seems to cause weird data corruption for example in audio transfers.
      
      Fix is to wait while we are in STATE_NEXT or STATE_ON and only then
      disable the channel.
      Signed-off-by: NMika Westerberg <mika.westerberg@iki.fi>
      Acked-by: NRyan Mallon <ryan@bluewatersys.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      10d48b39
    • L
      Merge branch 'kvm-updates/2.6.36' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 0acc1b2a
      Linus Torvalds 提交于
      * 'kvm-updates/2.6.36' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: x86: Move TSC reset out of vmcb_init
        KVM: x86: Fix SVM VMCB reset
      0acc1b2a
    • S
      ring-buffer: Fix typo of time extends per page · d0134324
      Steven Rostedt 提交于
      Time stamps for the ring buffer are created by the difference between
      two events. Each page of the ring buffer holds a full 64 bit timestamp.
      Each event has a 27 bit delta stamp from the last event. The unit of time
      is nanoseconds, so 27 bits can hold ~134 milliseconds. If two events
      happen more than 134 milliseconds apart, a time extend is inserted
      to add more bits for the delta. The time extend has 59 bits, which
      is good for ~18 years.
      
      Currently the time extend is committed separately from the event.
      If an event is discarded before it is committed, due to filtering,
      the time extend still exists. If all events are being filtered, then
      after ~134 milliseconds a new time extend will be added to the buffer.
      
      This can only happen till the end of the page. Since each page holds
      a full timestamp, there is no reason to add a time extend to the
      beginning of a page. Time extends can only fill a page that has actual
      data at the beginning, so there is no fear that time extends will fill
      more than a page without any data.
      
      When reading an event, a loop is made to skip over time extends
      since they are only used to maintain the time stamp and are never
      given to the caller. As a paranoid check to prevent the loop running
      forever, with the knowledge that time extends may only fill a page,
      a check is made that tests the iteration of the loop, and if the
      iteration is more than the number of time extends that can fit in a page
      a warning is printed and the ring buffer is disabled (all of ftrace
      is also disabled with it).
      
      There is another event type that is called a TIMESTAMP which can
      hold 64 bits of data in the theoretical case that two events happen
      18 years apart. This code has not been implemented, but the name
      of this event exists, as well as the structure for it. The
      size of a TIMESTAMP is 16 bytes, where as a time extend is only
      8 bytes. The macro used to calculate how many time extends can fit on
      a page used the TIMESTAMP size instead of the time extend size
      cutting the amount in half.
      
      The following test case can easily trigger the warning since we only
      need to have half the page filled with time extends to trigger the
      warning:
      
       # cd /sys/kernel/debug/tracing/
       # echo function > current_tracer
       # echo 'common_pid < 0' > events/ftrace/function/filter
       # echo > trace
       # echo 1 > trace_marker
       # sleep 120
       # cat trace
      
      Enabling the function tracer and then setting the filter to only trace
      functions where the process id is negative (no events), then clearing
      the trace buffer to ensure that we have nothing in the buffer,
      then write to trace_marker to add an event to the beginning of a page,
      sleep for 2 minutes (only 35 seconds is probably needed, but this
      guarantees the bug), and then finally reading the trace which will
      trigger the bug.
      
      This patch fixes the typo and prevents the false positive of that warning.
      Reported-by: NHans J. Koch <hjk@linutronix.de>
      Tested-by: NHans J. Koch <hjk@linutronix.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Stable Kernel <stable@kernel.org>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      d0134324
  5. 12 10月, 2010 12 次提交