Skip to content
  1. Jul 06, 2012
    • Rafael J. Wysocki's avatar
      PM / Domains: Allow device callbacks to be added at any time · 62d44902
      Rafael J. Wysocki authored
      
      
      Make it possible to modify device callbacks used by the generic PM
      domains core code at any time, not only after the device has been
      added to a domain.  This will allow device drivers to provide their
      own device PM domain callbacks even if they are registered before
      adding the devices to PM domains.
      
      For this purpose, use the observation that the struct
      generic_pm_domain_data object containing the relevant callback
      pointers may be allocated by pm_genpd_add_callbacks() and the
      callbacks may be set before __pm_genpd_add_device() is run for
      the given device.  This object will then be used by
      __pm_genpd_add_device(), but it has to be protected from
      premature removal by reference counting.
      
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      62d44902
    • Rafael J. Wysocki's avatar
      PM / Domains: Add device domain data reference counter · 1d5fcfec
      Rafael J. Wysocki authored
      
      
      Add a mechanism for counting references to the
      struct generic_pm_domain_data object pointed to by
      dev->power.subsys_data->domain_data if the device in question
      belongs to a generic PM domain.
      
      This change is necessary for a subsequent patch making it possible to
      allocate that object from within pm_genpd_add_callbacks(), so that
      drivers can attach their PM domain device callbacks to devices before
      those devices are added to PM domains.
      
      This patch has been tested on the SH7372 Mackerel board.
      
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      1d5fcfec
  2. Jul 04, 2012
    • Rafael J. Wysocki's avatar
      PM / Domains: Add preliminary support for cpuidle, v2 · cbc9ef02
      Rafael J. Wysocki authored
      
      
      On some systems there are CPU cores located in the same power
      domains as I/O devices.  Then, power can only be removed from the
      domain if all I/O devices in it are not in use and the CPU core
      is idle.  Add preliminary support for that to the generic PM domains
      framework.
      
      First, the platform is expected to provide a cpuidle driver with one
      extra state designated for use with the generic PM domains code.
      This state should be initially disabled and its exit_latency value
      should be set to whatever time is needed to bring up the CPU core
      itself after restoring power to it, not including the domain's
      power on latency.  Its .enter() callback should point to a procedure
      that will remove power from the domain containing the CPU core at
      the end of the CPU power transition.
      
      The remaining characteristics of the extra cpuidle state, referred to
      as the "domain" cpuidle state below, (e.g. power usage, target
      residency) should be populated in accordance with the properties of
      the hardware.
      
      Next, the platform should execute genpd_attach_cpuidle() on the PM
      domain containing the CPU core.  That will cause the generic PM
      domains framework to treat that domain in a special way such that:
      
       * When all devices in the domain have been suspended and it is about
         to be turned off, the states of the devices will be saved, but
         power will not be removed from the domain.  Instead, the "domain"
         cpuidle state will be enabled so that power can be removed from
         the domain when the CPU core is idle and the state has been chosen
         as the target by the cpuidle governor.
      
       * When the first I/O device in the domain is resumed and
         __pm_genpd_poweron(() is called for the first time after
         power has been removed from the domain, the "domain" cpuidle
         state will be disabled to avoid subsequent surprise power removals
         via cpuidle.
      
      The effective exit_latency value of the "domain" cpuidle state
      depends on the time needed to bring up the CPU core itself after
      restoring power to it as well as on the power on latency of the
      domain containing the CPU core.  Thus the "domain" cpuidle state's
      exit_latency has to be recomputed every time the domain's power on
      latency is updated, which may happen every time power is restored
      to the domain, if the measured power on latency is greater than
      the latency stored in the corresponding generic_pm_domain structure.
      
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Reviewed-by: default avatarKevin Hilman <khilman@ti.com>
      cbc9ef02
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-cpuidle' into pm-domains · e3b8cdd8
      Rafael J. Wysocki authored
      * pm-cpuidle:
        PM / cpuidle: Add driver reference counter
        cpuidle: move field disable from per-driver to per-cpu
      e3b8cdd8
    • Rafael J. Wysocki's avatar
      PM / cpuidle: Add driver reference counter · 6e797a07
      Rafael J. Wysocki authored
      
      
      Add a reference counter for the cpuidle driver, so that it can't
      be unregistered when it is in use.
      
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      6e797a07
    • ShuoX Liu's avatar
      cpuidle: move field disable from per-driver to per-cpu · dc7fd275
      ShuoX Liu authored
      
      
      Andrew J.Schorr raises a question.  When he changes the disable setting on
      a single CPU, it affects all the other CPUs.  Basically, currently, the
      disable field is per-driver instead of per-cpu.  All the C states of the
      same driver are shared by all CPU in the same machine.
      
      The patch changes the `disable' field to per-cpu, so we could set this
      separately for each cpu.
      
      Signed-off-by: default avatarShuoX Liu <shuox.liu@intel.com>
      Reported-by: default avatarAndrew J.Schorr <aschorr@telemetry-investments.com>
      Reviewed-by: default avatarYanmin Zhang <yanmin_zhang@intel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      dc7fd275
  3. Jul 01, 2012
    • Rafael J. Wysocki's avatar
      PM / Domains: Do not stop devices after restoring their states · 80de3d7f
      Rafael J. Wysocki authored
      
      
      While resuming a device belonging to a PM domain,
      pm_genpd_runtime_resume() calls __pm_genpd_restore_device() to
      restore its state, if necessary.  The latter starts the device,
      using genpd_start_dev(), restores its state, using
      genpd_restore_dev(), and then stops it, using genpd_stop_dev().
      However, this last operation is not necessary, because the
      device is supposed to be operational after pm_genpd_runtime_resume()
      has returned and because of it pm_genpd_runtime_resume() has to
      call genpd_start_dev() once again for the "restored" device, which
      is inefficient.
      
      To make things more efficient, remove the call to genpd_stop_dev()
      from __pm_genpd_restore_device() and the direct call to
      genpd_start_dev() from pm_genpd_runtime_resume().  [Of course,
      genpd_start_dev() still has to be called by it for devices with the
      power.irq_safe flag set, because __pm_genpd_restore_device() is not
      executed for them.]
      
      This change has been tested on the SH7372 Mackerel board.
      
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      80de3d7f
    • Rafael J. Wysocki's avatar
      PM / Domains: Use subsystem runtime suspend/resume callbacks by default · 0b589741
      Rafael J. Wysocki authored
      
      
      Currently, the default "save state" and "restore state" routines
      for generic PM domains, pm_genpd_default_save_state() and
      pm_genpd_default_restore_state(), respectively, only use runtime PM
      callbacks provided by device drivers, but in general those callbacks
      need not provide the entire necessary functionality.  Namely, in
      general it may be necessary to execute subsystem (i.e. device type,
      device class or bus type) callbacks that will carry out all of the
      necessary operations.
      
      For this reason, modify pm_genpd_default_save_state() and
      pm_genpd_default_restore_state() to execute subsystem callbacks,
      if they are provided, and fall back to driver callbacks otherwise.
      
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      0b589741
    • Linus Torvalds's avatar
      Linux 3.5-rc5 · 6887a413
      Linus Torvalds authored
      v3.5-rc5
      6887a413
    • Linus Torvalds's avatar
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · c07978b3
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "Another week, another batch of fixes.
      
        All are small, contained, targeted fixes for explicit problems --
        mostly build and boot failures across i.MX, OMAP, Renesas/Shmobile and
        Samsung."
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        ARM: imx6q: fix suspend regression caused by common clk migration
        ARM: OMAP4470: Fix OMAP4470 boot failure
        ARM: EXYNOS: Fix EXYNOS_DEV_DMA Kconfig entry
        ARM: OMAP2+: nand: fix build error when CONFIG_MTD_ONENAND_OMAP2=n
        ARM: shmobile: r8a7779: Route all interrupts to ARM
        ARM: shmobile: kzm9d: use late init machine hook
        ARM: shmobile: kzm9g: use late init machine hook
        ARM: mach-shmobile: armadillo800eva: Use late init machine hook
        ARM: SAMSUNG: Fix for S3C2412 EBI memory mapping
        ARM: mach-shmobile: add missing GPIO IRQ configuration on mackerel
        ARM: mach-shmobile: Fix build when SMP is enabled and EMEV2 is not enabled
        ARM: shmobile: sh7372: bugfix: chclr_offset base
        ARM: shmobile: sh73a0: bugfix: SY-DMAC number
        ARM: SAMSUNG: Should check for IS_ERR(clk) instead of NULL
      c07978b3
    • Randy Dunlap's avatar
      printk.c: fix kernel-doc warnings · 4f0f4af5
      Randy Dunlap authored
      
      
      Fix kernel-doc warnings in printk.c: use correct parameter name.
      
        Warning(kernel/printk.c:2429): No description found for parameter 'buf'
        Warning(kernel/printk.c:2429): Excess function parameter 'line' description in 'kmsg_dump_get_buffer'
      
      Signed-off-by: default avatarRandy Dunlap <rdunlap@xenotime.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4f0f4af5
    • Randy Dunlap's avatar
      linux/irq.h: fix kernel-doc warning · 87fac288
      Randy Dunlap authored
      Fix kernel-doc warning.  This struct member was removed in commit
      87568264
      
       ("irq: Remove irq_chip->release()") so remove its
      associated kernel-doc entry also.
      
        Warning(include/linux/irq.h:338): Excess struct/union/enum/typedef member 'release' description in 'irq_chip'
      
      Signed-off-by: default avatarRandy Dunlap <rdunlap@xenotime.net>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      87fac288
    • Olof Johansson's avatar
      Merge branch 'v3.5-samsung-fixes-1' of... · 5d5474df
      Olof Johansson authored
      Merge branch 'v3.5-samsung-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into fixes
      
      * 'v3.5-samsung-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
        ARM: EXYNOS: Fix EXYNOS_DEV_DMA Kconfig entry
        ARM: SAMSUNG: Fix for S3C2412 EBI memory mapping
        ARM: SAMSUNG: Should check for IS_ERR(clk) instead of NULL
      5d5474df
    • Shawn Guo's avatar
      ARM: imx6q: fix suspend regression caused by common clk migration · 5ae95aef
      Shawn Guo authored
      
      
      When moving to common clk framework, the imx6q clks rom and mmdc_ch1_axi
      get different on/off states than old clk driver, which breaks suspend
      function.  There might be a better way to manage these clocks, but let's
      takes the old clk driver approach to fix the regression first.
      
      Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      5ae95aef
    • Olof Johansson's avatar
      Merge tag 'omap-fixes-for-v3.5-rc4' of... · e5a5192a
      Olof Johansson authored
      Merge tag 'omap-fixes-for-v3.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
      
      From Tony Lindgren:
      "Here's one more regression fix that I missed earlier, and a
       trivial fix to get omap4470 booting."
      
      * tag 'omap-fixes-for-v3.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
        ARM: OMAP4470: Fix OMAP4470 boot failure
        ARM: OMAP2+: nand: fix build error when CONFIG_MTD_ONENAND_OMAP2=n
      e5a5192a
    • Linus Torvalds's avatar
      Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux · c7676092
      Linus Torvalds authored
      Pull ACPI & Power Management patches from Len Brown.
      
      * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
        acpi_pad: fix power_saving thread deadlock
        ACPI video: Still use ACPI backlight control if _DOS doesn't exist
        ACPI, APEI, Avoid too much error reporting in runtime
        ACPI: Add a quirk for "AMILO PRO V2030" to ignore the timer overriding
        ACPI: Remove one board specific WARN when ignoring timer overriding
        ACPI: Make acpi_skip_timer_override cover all source_irq==0 cases
        ACPI, x86: fix Dell M6600 ACPI reboot regression via DMI
        ACPI sysfs.c strlen fix
      c7676092
    • Linus Torvalds's avatar
      Merge tag 'driver-core-3.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core · 21f27291
      Linus Torvalds authored
      
      
      Pull driver Core fixes from Greg Kroah-Hartman:
       "Here is a number of printk() fixes, specifically a few reported by the
        crazy blog program that ships in SUSE releases (that's "boot log" and
        not "web log", it predates the general "blog" terminology by many
        years), and the restoration of the continuation line functionality
        reported by Stephen and others.  Yes, the changes seem a bit big this
        late in the cycle, but I've been beating on them for a while now, and
        Stephen has even optimized it a bit, so all looks good to me.
      
        The other change in here is a Documentation update for the stable
        kernel rules describing how some distro patches should be backported,
        to hopefully drive a bit more response from the distros to the stable
        kernel releases.
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org&gt;">
      
      * tag 'driver-core-3.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        printk: Optimize if statement logic where newline exists
        printk: flush continuation lines immediately to console
        syslog: fill buffer with more than a single message for SYSLOG_ACTION_READ
        Revert "printk: return -EINVAL if the message len is bigger than the buf size"
        printk: fix regression in SYSLOG_ACTION_CLEAR
        stable: Allow merging of backports for serious user-visible performance issues
      21f27291
  4. Jun 30, 2012
    • Len Brown's avatar
      Merge branches 'acpi_pad-bugzilla-42981', 'apei-bugzilla-43282',... · 6eca954e
      Len Brown authored
      Merge branches 'acpi_pad-bugzilla-42981', 'apei-bugzilla-43282', 'video-bugzilla-43168', 'bugzilla-40002' and 'bugfix-misc' into release
      
      bug fixes
      6eca954e
    • Stuart Hayes's avatar
      acpi_pad: fix power_saving thread deadlock · 5f160126
      Stuart Hayes authored
      
      
      The acpi_pad driver can get stuck in destroy_power_saving_task()
      waiting for kthread_stop() to stop a power_saving thread.  The problem
      is that the isolated_cpus_lock mutex is owned when
      destroy_power_saving_task() calls kthread_stop(), which waits for a
      power_saving thread to end, and the power_saving thread tries to
      acquire the isolated_cpus_lock when it calls round_robin_cpu().  This
      patch fixes the issue by making round_robin_cpu() use its own mutex.
      
      https://bugzilla.kernel.org/show_bug.cgi?id=42981
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarStuart Hayes <Stuart_Hayes@Dell.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      5f160126
    • Zhang Rui's avatar
      ACPI video: Still use ACPI backlight control if _DOS doesn't exist · b0373843
      Zhang Rui authored
      This fixes a regression in 3.4-rc1 caused by commit
      ea9f8856
      
      
      (ACPI video: Harden video bus adding.)
      
      Some platforms don't have _DOS control method, but the ACPI
      backlight still works.
      We should not invoke _DOS for these platforms.
      
      https://bugzilla.kernel.org/show_bug.cgi?id=43168
      
      Cc: Igor Murzov <intergalactic.anonymous@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      b0373843
    • Linus Torvalds's avatar
      Merge tag 'pm-for-3.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 02529ba2
      Linus Torvalds authored
      Pull power management fixes from Rafael J. Wysocki:
      
       * Fix for a bug in async suspend error code path causing parents to
         wait forever for their children in case of a suspend error from
         Mandeep Singh Baines (-stable metarial).
      
       * Fix for a suspend regression related to earlier changes in the ACPI
         cpuidle driver from Deepthi Dharwar.
      
      * tag 'pm-for-3.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        PM / ACPI: Fix suspend/resume regression caused by cpuidle cleanup.
        PM / Sleep: Prevent waiting forever on asynchronous suspend after abort
      02529ba2
    • Steven Rostedt's avatar
      printk: Optimize if statement logic where newline exists · d3620822
      Steven Rostedt authored
      
      
      In reviewing Kay's fix up patch: "printk: Have printk() never buffer its
      data", I found two if statements that could be combined and optimized.
      
      Put together the two 'cont.len && cont.owner == current' if statements
      into a single one, and check if we need to call cont_add(). This also
      removes the unneeded double cont_flush() calls.
      
      Link: http://lkml.kernel.org/r/1340869133.876.10.camel@mop
      
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Cc: Kay Sievers <kay@vrfy.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d3620822
    • Linus Torvalds's avatar
      Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc · 15114c7e
      Linus Torvalds authored
      Pull powerpc fixes from Benjamin Herrenschmidt:
       "Here are a few powerpc fixes.  Arguably some of this should have come
        to you earlier but I'm only just catching up after my medical leave.
      
        Mostly these fixes regressions, a couple are long standing bugs."
      
      * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
        powerpc/pseries: Fix software invalidate TCE
        powerpc: check_and_cede_processor() never cedes
        powerpc/ftrace: Do not trace restore_interrupts()
        powerpc: Fix Section mismatch warnings in prom_init.c
        ppc64: fix missing to check all bits of _TIF_USER_WORK_MASK in preempt
        powerpc: Fix uninitialised error in numa.c
        powerpc: Fix BPF_JIT code to link with multiple TOCs
      15114c7e
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 15b77435
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar.
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86, cpufeature: Remove stray %s, add -w to mkcapflags.pl
        x86, cpufeature: Catch duplicate CPU feature strings
        x86, cpufeature: Rename X86_FEATURE_DTS to X86_FEATURE_DTHERM
        x86: Fix kernel-doc warnings
        x86, compat: Use test_thread_flag(TIF_IA32) in compat signal delivery
      15b77435
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 62a75b99
      Linus Torvalds authored
      Pull oprofile fixlet from Ingo Molnar.
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        oprofile: perf: use NR_CPUS instead or nr_cpumask_bits for static array
      62a75b99
    • Linus Torvalds's avatar
      Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · efc9def8
      Linus Torvalds authored
      Pull RCU fix from Ingo Molnar.
      
      Fixes a bug introduced in this merge window by commit b1420f1c ("Make
      rcu_barrier() less disruptive")
      
      * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        rcu: Stop rcu_do_batch() from multiplexing the "count" variable
      efc9def8
  5. Jun 29, 2012