1. 12 Dec, 2012 4 commits
    • Mark Salter's avatar
      MN10300: fix SMP synchronization between txdma and serial driver · 8f0bcbca
      Mark Salter authored
      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: default avatarMark Salter <msalter@redhat.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      8f0bcbca
    • Mark Salter's avatar
      MN10300: fix serial port vdma irq setup for SMP · 8d160027
      Mark Salter authored
      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: default avatarMark Salter <msalter@redhat.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      8d160027
    • Mark Salter's avatar
      MN10300: cleanup IRQ affinity setting · 7d361cb7
      Mark Salter authored
      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: default avatarMark Salter <msalter@redhat.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      7d361cb7
    • David Howells's avatar
      MN10300: ttySM: Use memory barriers correctly in circular buffer logic · c98c406e
      David Howells authored
      Use memory barriers correctly in the circular buffer logic used in the driver,
      as documented in Documentation/circular-buffers.txt.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarMark Salter <msalter@redhat.com>
      c98c406e
  2. 29 Nov, 2012 36 commits