1. 25 5月, 2012 3 次提交
  2. 21 5月, 2012 1 次提交
  3. 28 3月, 2012 1 次提交
  4. 21 3月, 2012 1 次提交
  5. 16 3月, 2012 1 次提交
  6. 14 3月, 2012 3 次提交
  7. 09 3月, 2012 3 次提交
  8. 27 1月, 2012 1 次提交
    • A
      serial: Kill off NO_IRQ · d4e33fac
      Alan Cox 提交于
      We transform the offenders into a test of irq <= 0 which will be ok while
      the ARM people get their platform sorted. Once that is done (or in a while
      if they don't do it anyway) then we will change them all to !irq checks.
      
      For arch specific drivers that are already using NO_IRQ = 0 we just test
      against zero so we don't need to re-review them later.
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d4e33fac
  9. 16 11月, 2011 1 次提交
    • S
      tty: hvc_dcc: Fix duplicate character inputs · c2a3e84f
      Stephen Boyd 提交于
      Reading from the DCC grabs a character from the buffer and
      clears the status bit. Since this is a context-changing
      operation, instructions following the character read that rely on
      the status bit being accurate need to be synchronized with an
      ISB.
      
      In this case, the status bit check needs to execute after the
      character read otherwise we run the risk of reading the character
      and checking the status bit before the read can clear the status
      bit in the first place. When this happens, the user will see the
      same character they typed twice, instead of once.
      
      Add an ISB after the read and the write, so that the status check
      is synchronized with the read/write operations.
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c2a3e84f
  10. 07 11月, 2011 2 次提交
  11. 01 11月, 2011 1 次提交
  12. 19 10月, 2011 1 次提交
  13. 23 9月, 2011 1 次提交
  14. 20 9月, 2011 2 次提交
  15. 26 8月, 2011 1 次提交
  16. 20 7月, 2011 1 次提交
  17. 19 7月, 2011 3 次提交
  18. 01 7月, 2011 1 次提交
  19. 29 6月, 2011 4 次提交
    • B
      powerpc/pseries: Move hvsi support into a library · 17bdc6c0
      Benjamin Herrenschmidt 提交于
      This will allow a different backend to share it
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      17bdc6c0
    • B
      powerpc/pseries: Re-implement HVSI as part of hvc_vio · 4d2bb3f5
      Benjamin Herrenschmidt 提交于
      On pseries machines, consoles are provided by the hypervisor using
      a low level get_chars/put_chars type interface. However, this is
      really just a transport to the service processor which implements
      them either as "raw" console (networked consoles, HMC, ...) or as
      "hvsi" serial ports.
      
      The later is a simple packet protocol on top of the raw character
      interface that is supposed to convey additional "serial port" style
      semantics. In practice however, all it does is provide a way to
      read the CD line and set/clear our DTR line, that's it.
      
      We currently implement the "raw" protocol as an hvc console backend
      (/dev/hvcN) and the "hvsi" protocol using a separate tty driver
      (/dev/hvsi0).
      
      However this is quite impractical. The arbitrary difference between
      the two type of devices has been a major source of user (and distro)
      confusion. Additionally, there's an additional mini -hvsi implementation
      in the pseries platform code for our low level debug console and early
      boot kernel messages, which means code duplication, though that low
      level variant is impractical as it's incapable of doing the initial
      protocol negociation to establish the link to the FSP.
      
      This essentially replaces the dedicated hvsi driver and the platform
      udbg code completely by extending the existing hvc_vio backend used
      in "raw" mode so that:
      
       - It now supports HVSI as well
       - We add support for hvc backend providing tiocm{get,set}
       - It also provides a udbg interface for early debug and boot console
      
      This is overall less code, though this will only be obvious once we
      remove the old "hvsi" driver, which is still available for now. When
      the old driver is enabled, the new code still kicks in for the low
      level udbg console, replacing the old mini implementation in the platform
      code, it just doesn't provide the higher level "hvc" interface.
      
      In addition to producing generally simler code, this has several benefits
      over our current situation:
      
       - The user/distro only has to deal with /dev/hvcN for the hypervisor
      console, avoiding all sort of confusion that has plagued us in the past
      
       - The tty, kernel and low level debug console all use the same code
      base which supports the full protocol establishment process, thus the
      console is now available much earlier than it used to be with the
      old HVSI driver. The kernel console works much earlier and udbg is
      available much earlier too. Hackers can enable a hard coded very-early
      debug console as well that works with HVSI (previously that was only
      supported for the "raw" mode).
      
      I've tried to keep the same semantics as hvsi relative to how I react
      to things like CD changes, with some subtle differences though:
      
       - I clear DTR on close if HUPCL is set
      
       - Current hvsi triggers a hangup if it detects a up->down transition
         on CD (you can still open a console with CD down). My new implementation
         triggers a hangup if the link to the FSP is severed, and severs it upon
         detecting a up->down transition on CD.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      4d2bb3f5
    • B
      powerpc/pseries: Factor HVSI header struct in packet definitions · 048bee77
      Benjamin Herrenschmidt 提交于
      Embed the struct hvsi_header in the various packet definitions
      rather than open coding it multiple times. Will help provide
      stronger type checking.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      048bee77
    • B
      powerpc/hvsi: Move HVSI protocol definitions to a header file · 725e789f
      Benjamin Herrenschmidt 提交于
      This moves various HVSI protocol definitions from the hvsi.c
      driver to a header file that can be used later on by a udbg
      implementation
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      725e789f
  20. 31 3月, 2011 1 次提交
  21. 29 3月, 2011 1 次提交
  22. 10 3月, 2011 1 次提交
    • K
      xen/hvc: Disable probe_irq_on/off from poking the hvc-console IRQ line. · bbd5a762
      Konrad Rzeszutek Wilk 提交于
      This fixes a particular nasty racing problem found when using
      Xen hypervisor with the console (hvc) output being routed to the
      serial port and the serial port receiving data when
      probe_irq_off(probe_irq_on) is running.
      
      Specifically the bug manifests itself with:
      
      [    4.470693] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
      [    4.470693] IP: [<ffffffff810a8c65>] handle_IRQ_event+0xe/0xc9
      ..snip..
      [    4.470693] Call Trace:
      [    4.470693]  <IRQ>
      [    4.470693]  [<ffffffff810aa645>] handle_percpu_irq+0x3c/0x69
      [    4.470693]  [<ffffffff8123cda7>] __xen_evtchn_do_upcall+0xfd/0x195
      [    4.470693]  [<ffffffff810308cf>] ? xen_restore_fl_direct_end+0x0/0x1
      [    4.470693]  [<ffffffff8123d873>] xen_evtchn_do_upcall+0x32/0x47
      [    4.470693]  [<ffffffff81034dfe>] xen_do_hypervisor_callback+0x1e/0x30
      [    4.470693]  <EOI>
      [    4.470693]  [<ffffffff8100922a>] ? hypercall_page+0x22a/0x1000
      [    4.470693]  [<ffffffff8100922a>] ? hypercall_page+0x22a/0x1000
      [    4.470693]  [<ffffffff810301c5>] ? xen_force_evtchn_callback+0xd/0xf
      [    4.470693]  [<ffffffff810308e2>] ? check_events+0x12/0x20
      [    4.470693]  [<ffffffff81030889>] ? xen_irq_enable_direct_end+0x0/0x7
      [    4.470693]  [<ffffffff810ab0a0>] ? probe_irq_on+0x8f/0x1d7
      [    4.470693]  [<ffffffff812b105e>] ? serial8250_config_port+0x7b7/0x9e6
      [    4.470693]  [<ffffffff812ad66c>] ? uart_add_one_port+0x11b/0x305
      
      The bug is trigged by three actors working together:
       A). serial_8250_config_port calling
      	probe_irq_off(probe_irq_on())
           wherein all of the IRQ handlers are being started and shut off.
           The functions utilize the sleep functions so the minimum time
           they are run is 120 msec.
       B). Xen hypervisor receiving on the serial line any character and
           setting the bits in the event channel - during this 120 msec timeframe.
       C). The hvc API makes a call to 'request_irq' (and hence setting desc->action
           to a valid value), much much later - when user space opens
           /dev/console (hvc_open). To make the console usable during bootup,
           the Xen HVC implementation sets the IRQ chip (and correspondingly
           the event channel) much earlier. The IRQ chip handler that is used
           is the handle_percpu_irq (aaca4964)
      
      Back to the issue. When A) is being called it ends up calling the
      xen_percpu_chip's chip->startup twice and chip->shutdown once. Those
      are set to the default_startup and mask_irq (events.c) respectivly.
      If (and this seems to depend on what serial concentrator you use), B)
      gets data from the serial port it sets in the event channel a pending bit.
      When A) calls chip->startup(), the masking of the pending bit, and
      unmasking of the event channel mask, and also setting of the upcall_pending
      flag is done (since there is data present on the event channel).
      If before the 120 msec has elapsed, any IRQ handler (Xen IRQ has one
      IRQ handler, which checks the event channels bitmap to figure which one
      to call) is called we end up calling the handle_percpu_irq. The
      handle_percpu_irq calls desc->action (which is NULL) and we blow up.
      
      Caveats: I could only reproduce this on 2.6.32 pvops. I am not sure
      why this is not showing up on 2.6.38 kernel.
      
      The probe_irq_on/off has code to disable poking specific IRQ lines. This is
      done by using the set_irq_noprobe() and then we do not have to
      worry about the handle_percpu_irq being called before the IRQ action
      handler has been installed.
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      bbd5a762
  23. 02 3月, 2011 1 次提交
    • B
      powerpc/pseries: Reduce HVCS driver insanity · c7704d35
      Benjamin Herrenschmidt 提交于
      The HVCS driver, for those who don't know, is a driver for the "server" side
      of the IBM virtual terminal mechanism allowing Linux partitions to act as
      terminal servers under IBM PowerVM hypervisor. It's almost never used on
      the field at the moment.
      
      However, it's part of our configs, and in its current incarnation, will
      allocate the tty driver & major (with 64 minors) and create a kernel thread
      whether it's used or not, ie, whether the hypervisor did put a virtual
      terminal server device node in the partition or not (or whether running on
      a pseries machine or not even).
      
      This in turns causes modern distro's udev's to start trying to open all
      those 64 minors at boot, which, since they aren't linked to anything,
      causes the driver to spew errors in the kernel log for each of them.
      
      Not nice.
      
      This moves all that initialization to a function which is now only called
      the first time a terminal server virtual IO device is actually probed
      (that is almost never).
      
      There's still a _LOT_ of cleanup that can be done in this driver, some
      simple (almost all printk's statements in there shall either just be
      removed or in some case turned into better written & more informative
      messages, including using the dev_* variants etc...). This is left as
      an exercise for whoever actually cares about that driver.
      
      One could also try to be smart and dispose of all the tty related
      resources when the last instance of the VIO server device
      is removed (Hotplug anybody ?).
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      c7704d35
  24. 23 2月, 2011 1 次提交
  25. 18 2月, 2011 3 次提交