1. 27 Jan, 2013 5 commits
    • Frederic Weisbecker's avatar
      cputime: Use accessors to read task cputime stats · 6fac4829
      Frederic Weisbecker authored
      This is in preparation for the full dynticks feature. While
      remotely reading the cputime of a task running in a full
      dynticks CPU, we'll need to do some extra-computation. This
      way we can account the time it spent tickless in userspace
      since its last cputime snapshot.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Li Zhong <zhong@linux.vnet.ibm.com>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      6fac4829
    • Frederic Weisbecker's avatar
      cputime: Allow dynamic switch between tick/virtual based cputime accounting · 3f4724ea
      Frederic Weisbecker authored
      Allow to dynamically switch between tick and virtual based
      cputime accounting. This way we can provide a kind of "on-demand"
      virtual based cputime accounting. In this mode, the kernel relies
      on the context tracking subsystem to dynamically probe on kernel
      boundaries.
      
      This is in preparation for being able to stop the timer tick in
      more places than just the idle state. Doing so will depend on
      CONFIG_VIRT_CPU_ACCOUNTING_GEN which makes it possible to account
      the cputime without the tick by hooking on kernel/user boundaries.
      
      Depending whether the tick is stopped or not, we can switch between
      tick and vtime based accounting anytime in order to minimize the
      overhead associated to user hooks.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Li Zhong <zhong@linux.vnet.ibm.com>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      3f4724ea
    • Frederic Weisbecker's avatar
      cputime: Generic on-demand virtual cputime accounting · abf917cd
      Frederic Weisbecker authored
      If we want to stop the tick further idle, we need to be
      able to account the cputime without using the tick.
      
      Virtual based cputime accounting solves that problem by
      hooking into kernel/user boundaries.
      
      However implementing CONFIG_VIRT_CPU_ACCOUNTING require
      low level hooks and involves more overhead. But we already
      have a generic context tracking subsystem that is required
      for RCU needs by archs which plan to shut down the tick
      outside idle.
      
      This patch implements a generic virtual based cputime
      accounting that relies on these generic kernel/user hooks.
      
      There are some upsides of doing this:
      
      - This requires no arch code to implement CONFIG_VIRT_CPU_ACCOUNTING
      if context tracking is already built (already necessary for RCU in full
      tickless mode).
      
      - We can rely on the generic context tracking subsystem to dynamically
      (de)activate the hooks, so that we can switch anytime between virtual
      and tick based accounting. This way we don't have the overhead
      of the virtual accounting when the tick is running periodically.
      
      And one downside:
      
      - There is probably more overhead than a native virtual based cputime
      accounting. But this relies on hooks that are already set anyway.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Li Zhong <zhong@linux.vnet.ibm.com>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      abf917cd
    • Frederic Weisbecker's avatar
      cputime: Move default nsecs_to_cputime() to jiffies based cputime file · ae8dda5c
      Frederic Weisbecker authored
      If the architecture doesn't provide an implementation of
      nsecs_to_cputime(), the cputime accounting core uses a
      default one that converts the nanoseconds to jiffies. However
      this only makes sense if we use the jiffies based cputime.
      
      For now it doesn't matter much because this API is only
      called on code that uses jiffies based cputime accounting.
      
      But the code may evolve and this API may be used more
      broadly in the future. Keeping this default implementation
      around is very error prone as it may introduce a bug and
      hide it on architectures that don't override this API.
      
      Fix this by moving this definition to the jiffies based
      cputime headers as it is the only place where it belongs to.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Li Zhong <zhong@linux.vnet.ibm.com>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      ae8dda5c
    • Frederic Weisbecker's avatar
      cputime: Librarize per nsecs resolution cputime definitions · 39613766
      Frederic Weisbecker authored
      The full dynticks cputime accounting that we'll soon introduce
      will rely on sched_clock(). And its clock can have a per
      nanosecond granularity.
      
      To prepare for this, we need to have a cputime_t implementation
      that has this precision.
      
      ia64 virtual cputime accounting already uses that granularity
      so all we need is to librarize its implementation in the asm
      generic headers.
      
      Also librarize the default per jiffy granularity cputime_t
      as well so that we can easily pick either implementation
      depending on the cputime accounting config we choose.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Li Zhong <zhong@linux.vnet.ibm.com>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      39613766
  2. 26 Jan, 2013 1 commit
    • Frederic Weisbecker's avatar
      context_tracking: Export context state for generic vtime · 95a79fd4
      Frederic Weisbecker authored
      Export the context state: whether we run in user / kernel
      from the context tracking subsystem point of view.
      
      This is going to be used by the generic virtual cputime
      accounting subsystem that is needed to implement the full
      dynticks.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Li Zhong <zhong@linux.vnet.ibm.com>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      95a79fd4
  3. 18 Jan, 2013 1 commit
  4. 17 Jan, 2013 2 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 72ffaa48
      Linus Torvalds authored
      Pull more s390 patches from Martin Schwidefsky:
       "A couple of bug fixes: one of the transparent huge page primitives is
        broken, the sched_clock function overflows after 417 days, the XFS
        module has grown too large for -fpic and the new pci code has broken
        normal channel subsystem notifications."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/chsc: fix SEI usage
        s390/time: fix sched_clock() overflow
        s390: use -fPIC for module compile
        s390/mm: fix pmd_pfn() for thp
      72ffaa48
    • Linus Torvalds's avatar
      Merge tag 'for-linus-v3.8-rc4' of git://oss.sgi.com/xfs/xfs · dfdebc24
      Linus Torvalds authored
      Pull xfs bugfixes from Ben Myers:
      
       - fix(es) for compound buffers
      
       - fix for dquot soft timer asserts due to overflow of d_blk_softlimit
      
       - fix for regression in dir v2 code introduced in commit 20f7e9f3
         ("xfs: factor dir2 block read operations")
      
      * tag 'for-linus-v3.8-rc4' of git://oss.sgi.com/xfs/xfs:
        xfs: recalculate leaf entry pointer after compacting a dir2 block
        xfs: remove int casts from debug dquot soft limit timer asserts
        xfs: fix the multi-segment log buffer format
        xfs: fix segment in xfs_buf_item_format_segment
        xfs: rename bli_format to avoid confusion with bli_formats
        xfs: use b_maps[] for discontiguous buffers
      dfdebc24
  5. 16 Jan, 2013 24 commits
  6. 15 Jan, 2013 7 commits
    • Will Deacon's avatar
      arm64: compat: add syscall table entries for new syscalls · 72d0ac04
      Will Deacon authored
      There have been a number of new syscalls introduced to arch/arm/ since
      the compat layer was implemented for arm64, so add pointers to the
      relevant functions to the compat syscall table.
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      72d0ac04
    • Takashi Iwai's avatar
      ALSA: hda/hdmi - Work around "alsactl restore" errors · 6f54c361
      Takashi Iwai authored
      When "alsactl restore" is performed on HDMI codecs, it tries to
      restore the channel map value since the channel map controls are
      writable.  But hdmi_chmap_ctl_put() returns -EBADFD when no PCM stream
      is assigned yet, and this results in an error message from alsactl.
      Although the error is harmless, it's certainly ugly and can be
      regarded as a regression.
      
      As a workaround, this patch changes the return code in such a case to
      be zero for making others happy.  (A slight excuse is: when the chmap
      is changed through the proper alsa-lib API, the PCM status is checked
      there anyway, so we don't have to be too strict in the kernel side.)
      
      Cc: <stable@vger.kernel.org> [v3.7+]
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      6f54c361
    • Daniel Lezcano's avatar
      cpuidle: remove the power_specified field in the driver · 8aef33a7
      Daniel Lezcano authored
      We realized that the power usage field is never filled and when it
      is filled for tegra, the power_specified flag is not set causing all
      of these values to be reset when the driver is initialized with
      set_power_state().
      
      However, the power_specified flag can be simply removed under the
      assumption that the states are always backward sorted, which is the
      case with the current code.
      
      This change allows the menu governor select function and the
      cpuidle_play_dead() to be simplified.  Moreover, the
      set_power_states() function can removed as it does not make sense
      any more.
      
      Drop the power_specified flag from struct cpuidle_driver and make
      the related changes as described above.
      
      As a consequence, this also fixes the bug where on the dynamic
      C-states system, the power fields are not initialized.
      
      [rjw: Changelog]
      References: https://bugzilla.kernel.org/show_bug.cgi?id=42870
      References: https://bugzilla.kernel.org/show_bug.cgi?id=43349
      References: https://lkml.org/lkml/2012/10/16/518Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      8aef33a7
    • Takashi Iwai's avatar
      Merge tag 'asoc-atmel-pinctrl' of... · 2e4c4dbe
      Takashi Iwai authored
      Merge tag 'asoc-atmel-pinctrl' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
      
      ASoC: atmel: Fixes for pinctrl
      
      Due to a series of problems with the handling of Atmel, a combination of
      making changes that make other branches instantly buggy and a general
      failure to deal with the resulting issues effectively, v3.8 Atmel audio
      currently won't work at all for DT boards without adding pinctrl
      definitions and a request for those.
      2e4c4dbe
    • Linus Torvalds's avatar
      Merge tag 'trace-3.8-rc3-regression-fix' of... · 406089d0
      Linus Torvalds authored
      Merge tag 'trace-3.8-rc3-regression-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
      
      Pull tracing regression fixes from Steven Rostedt:
       "The clean up patch commit 0fb9656d "tracing: Make tracing_enabled
        be equal to tracing_on" caused two regressions.
      
         1) The irqs off latency tracer no longer starts if tracing_on is off
            when the tracer is set, and then tracing_on is enabled.  The
            tracing_on file needs the hook that tracing_enabled had to enable
            tracers if they request it (call the tracer's start() method).
      
         2) That commit had a separate change that really should have been a
            separate patch, but it must have been added accidently with the -a
            option of git commit.  But as the change is still related to the
            commit it wasn't noticed in review.  That change, changed the way
            blocking is done by the trace_pipe file with respect to the
            tracing_on settings.  I've been told that this change breaks
            current userspace, and this specific change is being reverted."
      
      * tag 'trace-3.8-rc3-regression-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        tracing: Fix regression of trace_pipe
        tracing: Fix regression with irqsoff tracer and tracing_on file
      406089d0
    • Linus Torvalds's avatar
      Merge tag 'regmap-debugfs-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap · 7dea1ff3
      Linus Torvalds authored
      Pull regmap debugfs optimisation fixes from Mark Brown:
       "The debugfs optimisations merged in v3.8 weren't my finest hour, there
        were a number of cases that the more complex algorithm made worse
        especially around the error handling.  This patch series should
        address those issues."
      
      * tag 'regmap-debugfs-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
        regmap: debugfs: Make sure we store the last entry in the offset cache
        regmap: debugfs: Ensure a correct return value for empty caches
        regmap: debugfs: Discard the cache if we fail to allocate an entry
        regmap: debugfs: Fix check for block start in cached seeks
        regmap: debugfs: Fix attempts to read nonexistant register blocks
      7dea1ff3
    • Linus Torvalds's avatar
      Merge tag 'regulator-3.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator · 2ac1e664
      Linus Torvalds authored
      Pull regulator fixes from Mark Brown:
       "A few fixes for the regulator subsystems, a few driver specific things
        plus a fix for the interaction between regultor_can_change_voltage()
        and continuous voltage ranges both of which were added for this
        release."
      
      * tag 'regulator-3.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        regulator: max8998: Ensure enough delay time for max8998_set_voltage_buck_time_sel
        regulator: max8998: Use uV in voltage_map_desc
        regulator: max8997: Use uV in voltage_map_desc
        regulator: core: Fix comment for regulator_register()
        regulator: core: Fix continuous_voltage_range case in regulator_can_change_voltage
        regulator: s5m8767: Fix probe failure due to stack corruption
      2ac1e664