1. 12 12月, 2012 4 次提交
    • M
      MN10300: fix SMP synchronization between txdma and serial driver · 8f0bcbca
      Mark Salter 提交于
      The SoC serial port driver uses a high priority interrupt to handle tx of
      characters in the tx ring buffer. The driver needs to disable/enable this IRQ
      from outside of irq context. The original code to do this is not foolproof on
      SMP machines because the IRQ running on one core could still access the serial
      port for a short time after the driver running on another core disables the
      interrupt. This patch adds a flag to tell the IRQ handler that the driver
      wants to disable the interrupt. After seeing the flag, the IRQ handler will
      immediately disable the interrupt and exit. After setting the flag, the driver
      will wait for interrupt to be disabled by the IRQ handler.
      Signed-off-by: NMark Salter <msalter@redhat.com>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      8f0bcbca
    • M
      MN10300: fix serial port vdma irq setup for SMP · 8d160027
      Mark Salter 提交于
      The builtin SoC serial ports have no FIFOs and use a virtual DMA mechanism
      based on high priority IRQs to avoid overruns. These high priority interrupts
      are pinned to cpu#0 on SMP systems. This patch fixes a problem with SMP where
      the set_intr_level() interface is used to set the priority for these IRQs. The
      set_intr_level() function sets priority on the local cpu but on SMP systems,
      this code may be run on some other cpu than the one handling the interrupts.
      Instead of setting interrupt level explicitly, this patch uses a special
      irq_chip for these interrupts so that the mask/unmask methods can set the
      interrupt level implicitly.
      Signed-off-by: NMark Salter <msalter@redhat.com>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      8d160027
    • M
      MN10300: cleanup IRQ affinity setting · 7d361cb7
      Mark Salter 提交于
      The irq_set_affinity handler for the mn10300 cpu pic had some hard-coded IRQs
      which were not to be migrated from one cpu to another. This patch cleans those
      up by using a combination of IRQF_NOBALANCING and specialized irq chips with
      no irq_set_affinity handler. This maintains the previous behavior by using
      generic IRQ interfaces rather than hard coding IRQ numbers in the default
      irq_set_affinity handler.
      Signed-off-by: NMark Salter <msalter@redhat.com>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      7d361cb7
    • D
      MN10300: ttySM: Use memory barriers correctly in circular buffer logic · c98c406e
      David Howells 提交于
      Use memory barriers correctly in the circular buffer logic used in the driver,
      as documented in Documentation/circular-buffers.txt.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NMark Salter <msalter@redhat.com>
      c98c406e
  2. 29 11月, 2012 36 次提交