1. 28 Jul, 2013 5 commits
    • Thomas Gleixner's avatar
      tick: Prevent uncontrolled switch to oneshot mode · 60a0c1a6
      Thomas Gleixner authored
      commit 1f73a980 upstream.
      
      When the system switches from periodic to oneshot mode, the broadcast
      logic causes a possibility that a CPU which has not yet switched to
      oneshot mode puts its own clock event device into oneshot mode without
      updating the state and the timer handler.
      
      CPU0				CPU1
      				per cpu tickdev is in periodic mode
      				and switched to broadcast
      
      Switch to oneshot mode
       tick_broadcast_switch_to_oneshot()
        cpumask_copy(tick_oneshot_broacast_mask,
      	       tick_broadcast_mask);
      
        broadcast device mode = oneshot
      
      				Timer interrupt
      
      				irq_enter()
      				 tick_check_oneshot_broadcast()
      				  dev->set_mode(ONESHOT);
      
      				tick_handle_periodic()
      				 if (dev->mode == ONESHOT)
      				   dev->next_event += period;
      				   FAIL.
      
      We fail, because dev->next_event contains KTIME_MAX, if the device was
      in periodic mode before the uncontrolled switch to oneshot happened.
      
      We must copy the broadcast bits over to the oneshot mask, because
      otherwise a CPU which relies on the broadcast would not been woken up
      anymore after the broadcast device switched to oneshot mode.
      
      So we need to verify in tick_check_oneshot_broadcast() whether the CPU
      has already switched to oneshot mode. If not, leave the device
      untouched and let the CPU switch controlled into oneshot mode.
      
      This is a long standing bug, which was never noticed, because the main
      user of the broadcast x86 cannot run into that scenario, AFAICT. The
      nonarchitected timer mess of ARM creates a gazillion of differently
      broken abominations which trigger the shortcomings of that broadcast
      code, which better had never been necessary in the first place.
      Reported-and-tested-by: default avatarStehle Vincent-B46079 <B46079@freescale.com>
      Reviewed-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      Cc: John Stultz <john.stultz@linaro.org>,
      Cc: Mark Rutland <mark.rutland@arm.com>
      Link: http://lkml.kernel.org/r/alpine.DEB.2.02.1307012153060.4013@ionos.tec.linutronix.deSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      60a0c1a6
    • Fabio Estevam's avatar
      ASoC: sglt5000: Fix SGTL5000_PLL_FRAC_DIV_MASK · 8899476b
      Fabio Estevam authored
      commit 5c78dfe8 upstream.
      
      SGTL5000_PLL_FRAC_DIV_MASK is used to mask bits 0-10 (11 bits in total) of
      register CHIP_PLL_CTRL, so fix the mask to accomodate all this bit range.
      Reported-by: default avatarOskar Schirmer <oskar@scara.com>
      Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8899476b
    • Seth Heasley's avatar
      ata_piix: IDE-mode SATA patch for Intel Coleto Creek DeviceIDs · 1b83171a
      Seth Heasley authored
      commit c7e8695b upstream.
      
      This patch adds the IDE-mode SATA DeviceIDs for the Intel Coleto Creek PCH.
      Signed-off-by: default avatarSeth Heasley <seth.heasley@intel.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1b83171a
    • Tejun Heo's avatar
      libata: skip SRST for all SIMG [34]7x port-multipliers · ad45d156
      Tejun Heo authored
      commit 7a87718d upstream.
      
      For some reason, a lot of port-multipliers have issues with softreset.
      SIMG [34]7x series port-multipliers have been quite erratic in this
      regard.  I recall that it was better with some firmware revisions and
      the current list of quirks worked fine for a while.  I think it got
      worse with later firmwares or maybe my test coverage wasn't good
      enough.  Anyways, HPA is reporting that his 3726 setup suffers SRST
      failures and then the PMP gets confused and fails to probe the last
      port.
      
      The hope was that we try to stick to the standard as much as possible
      and soonish the PMPs and their firmwares will improve in quality, so
      the quirk list was kept to minimum.  Well, it seems like that's never
      gonna happen.
      
      Let's set NO_SRST for all [34]7x PMPs so that whatever remaining
      userbase of the device suffer the least.  Maybe we should do the same
      for 57xx's but unfortunately I don't have any device left to test and
      I'm not even sure 57xx's have ever been made widely available, so
      let's leave those alone for now.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Reported-by: default avatar"H. Peter Anvin" <hpa@zytor.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ad45d156
    • Jan Kara's avatar
      ext3: fix data=journal fast mount/umount hang · 7fca9051
      Jan Kara authored
      commit e6436921 upstream.
      
      In data=journal mode, if we unmount the file system before a
      transaction has a chance to complete, when the journal inode is being
      evicted, we can end up calling into log_wait_commit() for the
      last transaction, after the journalling machinery has been shut down.
      That triggers the WARN_ONCE in __log_start_commit().
      
      Arguably we should adjust ext3_should_journal_data() to return FALSE
      for the journal inode, but the only place it matters is
      ext3_evict_inode(), and so it's to save a bit of CPU time, and to make
      the patch much more obviously correct by inspection(tm), we'll fix it
      by explicitly not trying to waiting for a journal commit when we are
      evicting the journal inode, since it's guaranteed to never succeed in
      this case.
      
      This can be easily replicated via:
      
           mount -t ext3 -o data=journal /dev/vdb /vdb ; umount /vdb
      
      This is a port of ext4 fix from Ted Ts'o.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Cc: Benjamin LaHaise <bcrl@kvack.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7fca9051
  2. 22 Jul, 2013 25 commits
  3. 13 Jul, 2013 10 commits