1. Jul 01, 2013
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-cpufreq' · 2c843bd9
      Rafael J. Wysocki authored
      * pm-cpufreq:
        cpufreq: Fix cpufreq regression after suspend/resume
      2c843bd9
    • Srivatsa S. Bhat's avatar
      cpufreq: Fix cpufreq regression after suspend/resume · f51e1eb6
      Srivatsa S. Bhat authored
      Toralf Förster reported that the cpufreq ondemand governor behaves erratically
      (doesn't scale well) after a suspend/resume cycle. The problem was that the
      cpufreq subsystem's idea of the cpu frequencies differed from the actual
      frequencies set in the hardware after a suspend/resume cycle. Toralf bisected
      the problem to commit a66b2e50
      
       (cpufreq: Preserve sysfs files across
      suspend/resume).
      
      Among other (harmless) things, that commit skipped the call to
      cpufreq_update_policy() in the resume path. But cpufreq_update_policy() plays
      an important role during resume, because it is responsible for checking if
      the BIOS changed the cpu frequencies behind our back and resynchronize the
      cpufreq subsystem's knowledge of the cpu frequencies, and update them
      accordingly.
      
      So, restore the call to cpufreq_update_policy() in the resume path to fix
      the cpufreq regression.
      
      Reported-and-tested-by: default avatarToralf Förster <toralf.foerster@gmx.de>
      Signed-off-by: default avatarSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Cc: 3.10+ <stable@vger.kernel.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      f51e1eb6
  2. Jun 29, 2013
  3. Jun 28, 2013
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-assorted' · e52cff8b
      Rafael J. Wysocki authored
      * pm-assorted:
        PM / QoS: Add pm_qos and dev_pm_qos to events-power.txt
        PM / QoS: Add dev_pm_qos_request tracepoints
        PM / QoS: Add pm_qos_request tracepoints
        PM / QoS: Add pm_qos_update_target/flags tracepoints
        PM / QoS: Update Documentation/power/pm_qos_interface.txt
        PM / Sleep: Print last wakeup source on failed wakeup_count write
        PM / QoS: correct the valid range of pm_qos_class
        PM / wakeup: Adjust messaging for wake events during suspend
        PM / Runtime: Update .runtime_idle() callback documentation
        PM / Runtime: Rework the "runtime idle" helper routine
        PM / Hibernate: print physical addresses consistently with other parts of kernel
      e52cff8b
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-cpufreq' · 405a1086
      Rafael J. Wysocki authored
      * pm-cpufreq: (41 commits)
        cpufreq: tegra: call CPUFREQ_POSTCHANGE notfier in error cases
        cpufreq: s3c64xx: call CPUFREQ_POSTCHANGE notfier in error cases
        cpufreq: omap: call CPUFREQ_POSTCHANGE notfier in error cases
        cpufreq: imx6q: call CPUFREQ_POSTCHANGE notfier in error cases
        cpufreq: exynos: call CPUFREQ_POSTCHANGE notfier in error cases
        cpufreq: dbx500: call CPUFREQ_POSTCHANGE notfier in error cases
        cpufreq: davinci: call CPUFREQ_POSTCHANGE notfier in error cases
        cpufreq: arm-big-little: call CPUFREQ_POSTCHANGE notfier in error cases
        cpufreq: powernow-k8: call CPUFREQ_POSTCHANGE notfier in error cases
        cpufreq: pcc: call CPUFREQ_POSTCHANGE notfier in error cases
        cpufreq: e_powersaver: call CPUFREQ_POSTCHANGE notfier in error cases
        cpufreq: ACPI: call CPUFREQ_POSTCHANGE notfier in error cases
        cpufreq: s3c2416: fix forgotten driver_data conversions
        cpufreq: make __cpufreq_notify_transition() static
        cpufreq: Fix minor formatting issues
        cpufreq: Fix governor start/stop race condition
        cpufreq: Simplify userspace governor
        cpufreq: X86_AMD_FREQ_SENSITIVITY: select CPU_FREQ_TABLE
        cpufreq: tegra: create CONFIG_ARM_TEGRA_CPUFREQ
        cpufreq: S3C2416/S3C64XX: select CPU_FREQ_TABLE
        ...
      405a1086
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-omap' · 52388492
      Rafael J. Wysocki authored
      * pm-omap:
        PM / AVS: SmartReflex: use devm_* API to initialize SmartReflex
        PM / AVS: SmartReflex: use omap_sr * for enable/disable interface
        PM / AVS: SmartReflex: use omap_sr * for minmax interfaces
        PM / AVS: SmartReflex: use omap_sr * for errgen interfaces
        PM / AVS: SmartReflex: fix driver name
        PM / AVS: SmartReflex: disable runtime PM on driver remove
        PM / AVS: SmartReflex: disable errgen before vpbound disable
      52388492
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-devfreq' · ceaed1e3
      Rafael J. Wysocki authored
      * pm-devfreq:
        MAINTAINERS: update mailing list for devfreq(DVFS).
        PM / devfreq: fix typo "CPU_EXYNOS4.12" twice
        PM / devfreq: fix missing unlock on error in exynos4_busfreq_pm_notifier_event()
        PM / devfreq: add comments and Documentation
        PM / devfreq: account suspend/resume for stats
        PM / devfreq: Add Exynos5-bus devfreq driver for Exynos5250
        PM / devfreq: Move exynos4 devfreq driver into a new sub-directory
      ceaed1e3
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-cpuidle' · 93bc11c3
      Rafael J. Wysocki authored
      * pm-cpuidle:
        cpuidle: Fix ARCH_NEEDS_CPU_IDLE_COUPLED dependency warning
        cpuidle: Comment the driver's framework code
        cpuidle: simplify multiple driver support
        ARM: zynq: Add cpuidle support
        cpuidle: improve governor Kconfig options
      93bc11c3
    • Rafael J. Wysocki's avatar
      Merge branch 'pnp' · 3e79a8a6
      Rafael J. Wysocki authored
      * pnp:
        pnp: restore automatic resolution of DMA conflicts
      3e79a8a6
    • Rafael J. Wysocki's avatar
      Merge branch 'freezer' · 207bc118
      Rafael J. Wysocki authored
      * freezer:
        af_unix: use freezable blocking calls in read
        sigtimedwait: use freezable blocking call
        nanosleep: use freezable blocking call
        futex: use freezable blocking call
        select: use freezable blocking call
        epoll: use freezable blocking call
        binder: use freezable blocking calls
        freezer: add new freezable helpers using freezer_do_not_count()
        freezer: convert freezable helpers to static inline where possible
        freezer: convert freezable helpers to freezer_do_not_count()
        freezer: skip waking up tasks with PF_FREEZER_SKIP set
        freezer: shorten freezer sleep time using exponential backoff
        lockdep: check that no locks held at freeze time
        lockdep: remove task argument from debug_check_no_locks_held
        freezer: add unsafe versions of freezable helpers for CIFS
        freezer: add unsafe versions of freezable helpers for NFS
      207bc118
    • Rafael J. Wysocki's avatar
      Merge branch 'acpi-doc' · e8b6cb39
      Rafael J. Wysocki authored
      * acpi-doc:
        Documentation / CPU hotplug: Rephrase the outdated description for MADT entries
        ACPI / video: update video_extension.txt for backlight control
        ACPI / video: move video_extension.txt to Documentation/acpi
        ACPI / video: add description for brightness_switch_enabled
        ACPI: Add ACPI namespace documentation
        ACPI: Add sysfs ABI documentation
        ACPI: Update MAINTAINERS file to include Documentation/acpi
      e8b6cb39
    • Rafael J. Wysocki's avatar
      Merge branch 'acpi-assorted' · bdc8f096
      Rafael J. Wysocki authored
      * acpi-assorted:
        ACPI / EC: Add HP Folio 13 to ec_dmi_table in order to skip DSDT scan
        ACPI: Add CMOS RTC Operation Region handler support
        ACPI: Remove unused flags in acpi_device_flags
        ACPI: Remove useless initializers
        ACPI / battery: Make sure all spaces are in correct places
        ACPI: add _STA evaluation at do_acpi_find_child()
        ACPI / EC: access user space with get_user()/put_user()
      bdc8f096
    • Rafael J. Wysocki's avatar
      Merge branch 'acpi-lpss' · f4c9f402
      Rafael J. Wysocki authored
      * acpi-lpss:
        ACPI / LPSS: override SDIO private register space size from ACPI tables
        ACPI / LPSS: mask the UART TX completion interrupt
        ACPI / LPSS: add support for Intel BayTrail
      
      Conflicts:
      	drivers/acpi/acpi_lpss.c (with commit b9e95fc6)
      f4c9f402
    • Rafael J. Wysocki's avatar
      Merge branch 'acpi-pm' · 3b4550e0
      Rafael J. Wysocki authored
      * acpi-pm:
        ACPI / PM: Rework and clean up acpi_dev_pm_get_state()
        ACPI / PM: Replace ACPI_STATE_D3 with ACPI_STATE_D3_COLD in device_pm.c
        ACPI / PM: Rename function acpi_device_power_state() and make it static
        ACPI / PM: acpi_processor_suspend() can be static
        xen / ACPI / sleep: Register an acpi_suspend_lowlevel callback.
        x86 / ACPI / sleep: Provide registration for acpi_suspend_lowlevel.
      3b4550e0
    • Rafael J. Wysocki's avatar
      Merge branch 'acpi-scan' · 8e9914d5
      Rafael J. Wysocki authored
      * acpi-scan:
        ACPI / scan: Do not bind ACPI drivers to objects with scan handlers
        ACPI / ia64 / sba_iommu: Use ACPI scan handler for device discovery
        ACPI / scan: Simplify ACPI driver probing
      8e9914d5
    • Rafael J. Wysocki's avatar
      Merge branch 'acpica' · 80338681
      Rafael J. Wysocki authored
      * acpica: (21 commits)
        ACPICA: Update version to 20130517
        ACPICA: _CST repair: Handle null package entries
        ACPICA: Add several repairs for _CST predefined name
        ACPICA: Move _PRT repair into the standard complex repair module
        ACPICA: Clear events initialized flag upon event component termination
        ACPICA: Fix possible memory leak in GPE init error path
        ACPICA: ACPICA Termination: Delete global lock pending lock
        ACPICA: Update interface to acpi_ut_valid_acpi_name()
        ACPICA: Do not use extended sleep registers unless HW-reduced bit is set
        ACPICA: Split table print utilities to a new a separate file
        ACPICA: Add option to disable loading of SSDTs from the RSDT/XSDT
        ACPICA: Standardize all switch() blocks
        ACPICA: Split internal error msg routines to a separate file
        ACPICA: Split buffer dump routines into separate file
        ACPICA: Update version to 20130418
        ACPICA: Update for "orphan" embedded controller _REG method support
        ACPICA: Remove unused macros, no functional change
        ACPICA: Predefined name support: Remove unused local variable
        ACPICA: Add argument typechecking for all predefined ACPI names
        ACPICA: Add BIOS error interface for predefined name validation support
        ...
      80338681
    • Rafael J. Wysocki's avatar
      Merge branch 'acpi-hotplug' · a204dbc6
      Rafael J. Wysocki authored
      * acpi-hotplug:
        ACPI: Do not use CONFIG_ACPI_HOTPLUG_MEMORY_MODULE
        ACPI / cpufreq: Add ACPI processor device IDs to acpi-cpufreq
        Memory hotplug: Move alternative function definitions to header
        ACPI / processor: Fix potential NULL pointer dereference in acpi_processor_add()
        Memory hotplug / ACPI: Simplify memory removal
        ACPI / scan: Add second pass of companion offlining to hot-remove code
        Driver core / MM: Drop offline_memory_block()
        ACPI / processor: Pass processor object handle to acpi_bind_one()
        ACPI: Drop removal_type field from struct acpi_device
        Driver core / memory: Simplify __memory_block_change_state()
        ACPI / processor: Initialize per_cpu(processors, pr->id) properly
        CPU: Fix sysfs cpu/online of offlined CPUs
        Driver core: Introduce offline/online callbacks for memory blocks
        ACPI / memhotplug: Bind removable memory blocks to ACPI device nodes
        ACPI / processor: Use common hotplug infrastructure
        ACPI / hotplug: Use device offline/online for graceful hot-removal
        Driver core: Use generic offline/online for CPU offline/online
        Driver core: Add offline/online device operations
      a204dbc6
    • Rafael J. Wysocki's avatar
      ACPI / PM: Fix possible NULL pointer deref in acpi_pm_device_sleep_state() · 9b5c7a5a
      Rafael J. Wysocki authored
      After commit fa1675b5
      
       (ACPI / PM: Rework and clean up
      acpi_dev_pm_get_state()) a NULL pointer dereference will take place
      if NULL is passed to acpi_pm_device_sleep_state() as the second
      argument.
      
      Fix that by avoiding to use the pointer that may be NULL until
      it's necessary to store a return value at the location pointed to
      by it (if not NULL).
      
      Reported-and-tested-by: default avatarAaron Lu <aaron.lu@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      9b5c7a5a
    • Shuah Khan's avatar
      PM / Sleep: Warn about system time after resume with pm_trace · 9dceefe4
      Shuah Khan authored
      
      
      pm_trace uses the system's Real Time Clock (RTC) to save the magic
      number.  The reason for this is that the RTC is the only reliably
      available piece of hardware during resume operations where a value
      can be set that will survive a reboot.
      
      Consequence is that after a resume (even if it is successful) your
      system clock will have a value corresponding to the magic number
      instead of the correct date/time!  It is therefore advisable to use
      a program like ntp-date or rdate to reset the correct date/time from
      an external time source when using this trace option.
      
      There is no run-time message to warn users of the consequences of
      enabling pm_trace.  Adding a warning message to pm_trace_store()
      will serve as a reminder to users to set the system date and time
      after resume.
      
      Signed-off-by: default avatarShuah Khan <shuah.kh@samsung.com>
      Acked-by: default avatarPavel Machek <pavel@ucw.cz>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      9dceefe4
    • Jacob Shin's avatar
      cpufreq: don't leave stale policy pointer in cdbs->cur_policy · 419e1721
      Jacob Shin authored
      
      
      Clear ->cur_policy when stopping a governor, or the ->cur_policy
      pointer may be stale on systems with have_governor_per_policy when a
      new policy is allocated due to CPU hotplug offline/online.
      
      [rjw: Changelog]
      Suggested-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarJacob Shin <jacob.shin@amd.com>
      Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      419e1721
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-fixes' into pm-cpufreq · 874e628f
      Rafael J. Wysocki authored
      A subsequent commit depends on the 'pm-fixes' commits.
      874e628f
    • Lan Tianyu's avatar
      acpi-cpufreq: Add new sysfs attribute freqdomain_cpus · f4fd3797
      Lan Tianyu authored
      Commits fcf80582 (cpufreq: Simplify cpufreq_add_dev()) and aa77a527
      (cpufreq: acpi-cpufreq: Don't set policy->related_cpus from .init())
      changed the contents of the "related_cpus" sysfs attribute on systems
      where acpi-cpufreq is used and user space can't get the list of CPUs
      which are in the same hardware coordination CPU domain (provided by
      the ACPI AML method _PSD) via "related_cpus" any more.
      
      To make up for that loss add a new sysfs attribute "freqdomian_cpus"
      for the acpi-cpufreq driver which exposes the list of CPUs in the
      same domain regardless of whether it is coordinated by hardware or
      software.
      
      [rjw: Changelog, documentation]
      References: https://bugzilla.kernel.org/show_bug.cgi?id=58761
      
      
      Reported-by: default avatarJean-Philippe Halimi <jean-philippe.halimi@exascale-computing.eu>
      Signed-off-by: default avatarLan Tianyu <tianyu.lan@intel.com>
      Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      f4fd3797
    • Viresh Kumar's avatar
      cpufreq: make sure frequency transitions are serialized · 7c30ed53
      Viresh Kumar authored
      
      
      Whenever we are changing frequency of a cpu, we are calling PRECHANGE and
      POSTCHANGE notifiers. They must be serialized. i.e. PRECHANGE or POSTCHANGE
      shouldn't be called twice contiguously.
      
      This can happen due to bugs in users of __cpufreq_driver_target() or actual
      cpufreq drivers who are sending these notifiers.
      
      This patch adds some protection against this. Now, we keep track of the last
      transaction and see if something went wrong.
      
      Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      7c30ed53
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-cpufreq-arm' into pm-cpufreq · e11158c0
      Rafael J. Wysocki authored
      * pm-cpufreq-arm:
        cpufreq: tegra: call CPUFREQ_POSTCHANGE notfier in error cases
        cpufreq: s3c64xx: call CPUFREQ_POSTCHANGE notfier in error cases
        cpufreq: omap: call CPUFREQ_POSTCHANGE notfier in error cases
        cpufreq: imx6q: call CPUFREQ_POSTCHANGE notfier in error cases
        cpufreq: exynos: call CPUFREQ_POSTCHANGE notfier in error cases
        cpufreq: dbx500: call CPUFREQ_POSTCHANGE notfier in error cases
        cpufreq: davinci: call CPUFREQ_POSTCHANGE notfier in error cases
        cpufreq: arm-big-little: call CPUFREQ_POSTCHANGE notfier in error cases
        cpufreq: s3c2416: fix forgotten driver_data conversions
      e11158c0
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-cpufreq-assorted' into pm-cpufreq · 39a95f48
      Rafael J. Wysocki authored
      * pm-cpufreq-assorted: (21 commits)
        cpufreq: powernow-k8: call CPUFREQ_POSTCHANGE notfier in error cases
        cpufreq: pcc: call CPUFREQ_POSTCHANGE notfier in error cases
        cpufreq: e_powersaver: call CPUFREQ_POSTCHANGE notfier in error cases
        cpufreq: ACPI: call CPUFREQ_POSTCHANGE notfier in error cases
        cpufreq: make __cpufreq_notify_transition() static
        cpufreq: Fix minor formatting issues
        cpufreq: Fix governor start/stop race condition
        cpufreq: Simplify userspace governor
        cpufreq: powerpc: move cpufreq driver to drivers/cpufreq
        cpufreq: kirkwood: Select CPU_FREQ_TABLE option
        cpufreq: big.LITTLE needs cpufreq table
        cpufreq: SPEAr needs cpufreq table
        cpufreq: powerpc: Add cpufreq driver for Freescale e500mc SoCs
        cpufreq: remove unnecessary cpufreq_cpu_{get|put}() calls
        cpufreq: MAINTAINERS: Add git tree path for ARM specific updates
        cpufreq: rename index as driver_data in cpufreq_frequency_table
        cpufreq: Don't create empty /sys/devices/system/cpu/cpufreq directory
        cpufreq: Move get_cpu_idle_time() to cpufreq.c
        cpufreq: governors: Move get_governor_parent_kobj() to cpufreq.c
        cpufreq: Add EXPORT_SYMBOL_GPL for have_governor_per_policy
        ...
      39a95f48
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-cpufreq-Kconfig' into pm-cpufreq · 7ae9b27b
      Rafael J. Wysocki authored
      * pm-cpufreq-Kconfig:
        cpufreq: X86_AMD_FREQ_SENSITIVITY: select CPU_FREQ_TABLE
        cpufreq: tegra: create CONFIG_ARM_TEGRA_CPUFREQ
        cpufreq: S3C2416/S3C64XX: select CPU_FREQ_TABLE
        cpufreq: pxa: select CPU_FREQ_TABLE
        cpufreq: powerpc: CBE_RAS: select CPU_FREQ_TABLE
        cpufreq: imx: select CPU_FREQ_TABLE
        cpufreq: highbank: remove select CPU_FREQ_TABLE
        cpufreq: exynos: select CPU_FREQ_TABLE
        cpufreq: davinci: select CPU_FREQ_TABLE
        cpufreq: cris: select CPU_FREQ_TABLE
        cpufreq: blackfin: enable driver for CONFIG_BFIN_CPU_FREQ
      7ae9b27b
    • Mika Westerberg's avatar
      ACPI: implement acpi_os_get_timer() according the spec · 10619066
      Mika Westerberg authored
      
      
      ACPI Timer() opcode should return monotonically increasing clock with 100ns
      granularity according the ACPI 5.0 spec.
      
      Testing the current Timer() implementation with following ASL code (and an
      additional debug print in acpi_os_sleep() to get the sleep times dumped out
      to dmesg):
      
      	// Test: 10ms
      	Store(Timer, Local1)
      	Sleep(10)
      	Divide(Subtract(Timer, Local1), 10000,, Local1)
      	Sleep(Local1)
      
      	// Test: 200ms
      	Store(Timer, Local1)
      	Sleep(200)
      	Divide(Subtract(Timer, Local1), 10000,, Local1)
      	Sleep(Local1)
      
      	// Test 1300ms
      	Store(Timer, Local1)
      	Sleep(1300)
      	Divide(Subtract(Timer, Local1), 10000,, Local1)
      	Sleep(Local1)
      
      The second sleep value is calculated using Timer(). If the implementation
      is good enough we should be able to get the second value pretty close to
      the first.
      
      However, the current Timer() gives pretty bad sleep times:
      
      	[   11.488100] ACPI: acpi_os_get_timer() TBD
      	[   11.492150] ACPI: Sleep(10)
      	[   11.502993] ACPI: Sleep(0)
      	[   11.506315] ACPI: Sleep(200)
      	[   11.706237] ACPI: Sleep(0)
      	[   11.709550] ACPI: Sleep(1300)
      	[   13.008929] ACPI: Sleep(0)
      
      Fix this with the help of ktime_get(). Once the fix is applied and run
      against the same ASL code we get:
      
      	[   11.486786] ACPI: Sleep(10)
      	[   11.499029] ACPI: Sleep(12)
      	[   11.512350] ACPI: Sleep(200)
      	[   11.712282] ACPI: Sleep(200)
      	[   11.912170] ACPI: Sleep(1300)
      	[   13.211577] ACPI: Sleep(1300)
      
      That is much more closer to the values we expected.
      
      Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      10619066
    • Lan Tianyu's avatar
      ACPI / EC: Add HP Folio 13 to ec_dmi_table in order to skip DSDT scan · eff9a4b6
      Lan Tianyu authored
      HP Folio 13's BIOS defines CMOS RTC Operation Region and the EC's
      _REG method will access that region.  To allow the CMOS RTC region
      handler to be installed before the EC _REG method is first invoked,
      add ec_skip_dsdt_scan() as HP Folio 13's callback to ec_dmi_table.
      
      References: https://bugzilla.kernel.org/show_bug.cgi?id=54621
      
      
      Reported-and-tested-by: default avatarStefan Nagy <public@stefan-nagy.at>
      Signed-off-by: default avatarLan Tianyu <tianyu.lan@intel.com>
      Cc: 3.9+ <stable@vger.kernel.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      eff9a4b6
    • Lan Tianyu's avatar
      ACPI: Add CMOS RTC Operation Region handler support · 2fa97feb
      Lan Tianyu authored
      On HP Folio 13-2000, the BIOS defines a CMOS RTC Operation Region and
      the EC's _REG methord accesses that region.  Thus an appropriate
      address space handler must be registered for that region before the
      EC driver is loaded.
      
      Introduce a mechanism for adding CMOS RTC address space handlers.
      Register an ACPI scan handler for CMOS RTC devices such that, when
      a device of that kind is detected during an ACPI namespace scan, a
      common CMOS RTC operation region address space handler will be
      installed for it.
      
      References: https://bugzilla.kernel.org/show_bug.cgi?id=54621
      
      
      Reported-and-tested-by: default avatarStefan Nagy <public@stefan-nagy.at>
      Signed-off-by: default avatarLan Tianyu <tianyu.lan@intel.com>
      Cc: 3.9+ <stable@vger.kernel.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      2fa97feb
  4. Jun 26, 2013
  5. Jun 25, 2013
    • Aaron Lu's avatar
      libata-acpi: add back ACPI based hotplug functionality · 44521527
      Aaron Lu authored
      Commit 30dcf76a "libata: migrate ACPI code over to new bindings"
      mistakenly dropped the code to register hotplug notificaion handler
      for ATA port/devices, causing regression for people using ATA bay,
      as kernel bug #59871 shows.
      
      Fix this by adding back the hotplug notification handler registration
      code.  Since this code has to be run once and notification needs to
      be installed on every ATA port/devices handle no matter if there is
      actual device attached, we can't do this in binding time for ATA
      device ACPI handle, as the binding only occurs when a SCSI device is
      created, i.e. there is device attached.  So introduce the
      ata_acpi_hotplug_init() function to loop scan all ATA ACPI handles
      and if it is available, install the notificaion handler for it during
      ATA init time.
      
      With the ATA ACPI handle binding to SCSI device tree, it is possible
      now that when the SCSI hotplug work removes the SCSI device, the ACPI
      unbind function will find that the corresponding ACPI device has
      already been deleted by dock driver, causing a scaring message like:
      [  128.263966] scsi 4:0:0:0: Oops, 'acpi_handle' corrupt
      Fix this by waiting for SCSI hotplug task finish in our notificaion
      handler, so that the removal of ACPI device done in ACPI unbind
      function triggered by the removal of SCSI device is run earlier when
      ACPI device is still available.
      
      [rjw: Rebased]
      References: https://bugzilla.kernel.org/show_bug.cgi?id=59871
      
      
      Reported-bisected-and-tested-by: default avatarDirk Griesbach <spamthis@freenet.de>
      Signed-off-by: default avatarAaron Lu <aaron.lu@intel.com>
      Acked-by: default avatarTejun Heo <tj@kernel.org>
      Cc: 3.6+ <stable@vger.kernel.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      44521527
  6. Jun 24, 2013