Skip to content

Commit

Permalink
Merge tag 'pm+acpi-3.17-rc1' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/rafael/linux-pm

Pull ACPI and power management updates from Rafael Wysocki:
 "Again, ACPICA leads the pack (47 commits), followed by cpufreq (18
  commits) and system suspend/hibernation (9 commits).

  From the new code perspective, the ACPICA update brings ACPI 5.1 to
  the table, including a new device configuration object called _DSD
  (Device Specific Data) that will hopefully help us to operate device
  properties like Device Trees do (at least to some extent) and changes
  related to supporting ACPI on ARM.

  Apart from that we have hibernation changes making it use radix trees
  to store memory bitmaps which should speed up some operations carried
  out by it quite significantly.  We also have some power management
  changes related to suspend-to-idle (the "freeze" sleep state) support
  and more preliminary changes needed to support ACPI on ARM (outside of
  ACPICA).

  The rest is fixes and cleanups pretty much everywhere.

  Specifics:

   - ACPICA update to upstream version 20140724.  That includes ACPI 5.1
     material (support for the _CCA and _DSD predefined names, changes
     related to the DMAR and PCCT tables and ARM support among other
     things) and cleanups related to using ACPICA's header files.  A
     major part of it is related to acpidump and the core code used by
     that utility.  Changes from Bob Moore, David E Box, Lv Zheng,
     Sascha Wildner, Tomasz Nowicki, Hanjun Guo.

   - Radix trees for memory bitmaps used by the hibernation core from
     Joerg Roedel.

   - Support for waking up the system from suspend-to-idle (also known
     as the "freeze" sleep state) using ACPI-based PCI wakeup signaling
     (Rafael J Wysocki).

   - Fixes for issues related to ACPI button events (Rafael J Wysocki).

   - New device ID for an ACPI-enumerated device included into the
     Wildcat Point PCH from Jie Yang.

   - ACPI video updates related to backlight handling from Hans de Goede
     and Linus Torvalds.

   - Preliminary changes needed to support ACPI on ARM from Hanjun Guo
     and Graeme Gregory.

   - ACPI PNP core cleanups from Arjun Sreedharan and Zhang Rui.

   - Cleanups related to ACPI_COMPANION() and ACPI_HANDLE() macros
     (Rafael J Wysocki).

   - ACPI-based device hotplug cleanups from Wei Yongjun and Rafael J
     Wysocki.

   - Cleanups and improvements related to system suspend from Lan
     Tianyu, Randy Dunlap and Rafael J Wysocki.

   - ACPI battery cleanup from Wei Yongjun.

   - cpufreq core fixes from Viresh Kumar.

   - Elimination of a deadband effect from the cpufreq ondemand governor
     and intel_pstate driver cleanups from Stratos Karafotis.

   - 350MHz CPU support for the powernow-k6 cpufreq driver from Mikulas
     Patocka.

   - Fix for the imx6 cpufreq driver from Anson Huang.

   - cpuidle core and governor cleanups from Daniel Lezcano, Sandeep
     Tripathy and Mohammad Merajul Islam Molla.

   - Build fix for the big_little cpuidle driver from Sachin Kamat.

   - Configuration fix for the Operation Performance Points (OPP)
     framework from Mark Brown.

   - APM cleanup from Jean Delvare.

   - cpupower utility fixes and cleanups from Peter Senna Tschudin,
     Andrey Utkin, Himangi Saraogi, Rickard Strandqvist, Thomas
     Renninger"

* tag 'pm+acpi-3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (118 commits)
  ACPI / LPSS: add LPSS device for Wildcat Point PCH
  ACPI / PNP: Replace faulty is_hex_digit() by isxdigit()
  ACPICA: Update version to 20140724.
  ACPICA: ACPI 5.1: Update for PCCT table changes.
  ACPICA/ARM: ACPI 5.1: Update for GTDT table changes.
  ACPICA/ARM: ACPI 5.1: Update for MADT changes.
  ACPICA/ARM: ACPI 5.1: Update for FADT changes.
  ACPICA: ACPI 5.1: Support for the _CCA predifined name.
  ACPICA: ACPI 5.1: New notify value for System Affinity Update.
  ACPICA: ACPI 5.1: Support for the _DSD predefined name.
  ACPICA: Debug object: Add current value of Timer() to debug line prefix.
  ACPICA: acpihelp: Add UUID support, restructure some existing files.
  ACPICA: Utilities: Fix local printf issue.
  ACPICA: Tables: Update for DMAR table changes.
  ACPICA: Remove some extraneous printf arguments.
  ACPICA: Update for comments/formatting. No functional changes.
  ACPICA: Disassembler: Add support for the ToUUID opererator (macro).
  ACPICA: Remove a redundant cast to acpi_size for ACPI_OFFSET() macro.
  ACPICA: Work around an ancient GCC bug.
  ACPI / processor: Make it possible to get local x2apic id via _MAT
  ...
  • Loading branch information
Linus Torvalds committed Aug 7, 2014
2 parents 6b22df7 + 7ef97e0 commit 7725131
Show file tree
Hide file tree
Showing 120 changed files with 5,084 additions and 1,495 deletions.
3 changes: 0 additions & 3 deletions Documentation/power/opp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ Typical usage of the OPP library is as follows:
SoC framework -> modifies on required cases certain OPPs -> OPP layer
-> queries to search/retrieve information ->

Architectures that provide a SoC framework for OPP should select ARCH_HAS_OPP
to make the OPP layer available.

OPP layer expects each domain to be represented by a unique device pointer. SoC
framework registers a set of initial OPPs per device with the OPP layer. This
list is expected to be an optimally small number typically around 5 per device.
Expand Down
4 changes: 3 additions & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2556,8 +2556,8 @@ F: arch/x86/kernel/cpuid.c
F: arch/x86/kernel/msr.c

CPU POWER MONITORING SUBSYSTEM
M: Dominik Brodowski <linux@dominikbrodowski.net>
M: Thomas Renninger <trenn@suse.de>
L: linux-pm@vger.kernel.org
S: Maintained
F: tools/power/cpupower/

Expand Down Expand Up @@ -7066,8 +7066,10 @@ F: include/linux/timer*
F: kernel/time/*timer*

POWER SUPPLY CLASS/SUBSYSTEM and DRIVERS
M: Sebastian Reichel <sre@kernel.org>
M: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
M: David Woodhouse <dwmw2@infradead.org>
L: linux-pm@vger.kernel.org
T: git git://git.infradead.org/battery-2.6.git
S: Maintained
F: include/linux/power_supply.h
Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-exynos/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ config SOC_EXYNOS5440
default y
depends on ARCH_EXYNOS5
select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
select ARCH_HAS_OPP
select HAVE_ARM_ARCH_TIMER
select AUTO_ZRELADDR
select MIGHT_HAVE_PCI
Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-highbank/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ config ARCH_HIGHBANK
bool "Calxeda ECX-1000/2000 (Highbank/Midway)" if ARCH_MULTI_V7
select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
select ARCH_HAS_HOLES_MEMORYMODEL
select ARCH_HAS_OPP
select ARCH_SUPPORTS_BIG_ENDIAN
select ARM_AMBA
select ARM_ERRATA_764369 if SMP
Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-imx/Kconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
menuconfig ARCH_MXC
bool "Freescale i.MX family" if ARCH_MULTI_V4_V5 || ARCH_MULTI_V6_V7
select ARCH_HAS_OPP
select ARCH_REQUIRE_GPIOLIB
select ARM_CPU_SUSPEND if PM
select CLKSRC_MMIO
Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-omap2/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ config ARCH_OMAP3
bool "TI OMAP3"
depends on ARCH_MULTI_V7
select ARCH_OMAP2PLUS
select ARCH_HAS_OPP
select ARM_CPU_SUSPEND if PM
select OMAP_INTERCONNECT
select PM_OPP if PM
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/mach-shmobile/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ config ARCH_R8A73A4
select CPU_V7
select SH_CLK_CPG
select RENESAS_IRQC
select ARCH_HAS_OPP
select SYS_SUPPORTS_SH_CMT
select SYS_SUPPORTS_SH_TMU

Expand Down Expand Up @@ -263,7 +262,6 @@ config MACH_KOELSCH
config MACH_KZM9G
bool "KZM-A9-GT board"
depends on ARCH_SH73A0
select ARCH_HAS_OPP
select ARCH_REQUIRE_GPIOLIB
select REGULATOR_FIXED_VOLTAGE if REGULATOR
select SND_SOC_AK4642 if SND_SIMPLE_CARD
Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-vexpress/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ config ARCH_VEXPRESS_DCSCB

config ARCH_VEXPRESS_SPC
bool "Versatile Express Serial Power Controller (SPC)"
select ARCH_HAS_OPP
select PM_OPP
help
The TC2 (A15x2 A7x3) versatile express core tile integrates a logic
Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-zynq/Kconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
config ARCH_ZYNQ
bool "Xilinx Zynq ARM Cortex A9 Platform" if ARCH_MULTI_V7
select ARCH_HAS_OPP
select ARCH_SUPPORTS_BIG_ENDIAN
select ARM_AMBA
select ARM_GIC
Expand Down
1 change: 1 addition & 0 deletions arch/ia64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ config IA64
select ARCH_MIGHT_HAVE_PC_SERIO
select PCI if (!IA64_HP_SIM)
select ACPI if (!IA64_HP_SIM)
select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI
select PM if (!IA64_HP_SIM)
select HAVE_UNSTABLE_SCHED_CLOCK
select HAVE_IDE
Expand Down
4 changes: 0 additions & 4 deletions arch/ia64/include/asm/acenv.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

/* Asm macros */

#ifdef CONFIG_ACPI

static inline int
ia64_acpi_acquire_global_lock(unsigned int *lock)
{
Expand Down Expand Up @@ -51,6 +49,4 @@ ia64_acpi_release_global_lock(unsigned int *lock)
#define ACPI_RELEASE_GLOBAL_LOCK(facs, Acq) \
((Acq) = ia64_acpi_release_global_lock(&facs->global_lock))

#endif

#endif /* _ASM_IA64_ACENV_H */
5 changes: 5 additions & 0 deletions arch/ia64/include/asm/acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ extern int acpi_lapic;
#define acpi_noirq 0 /* ACPI always enabled on IA64 */
#define acpi_pci_disabled 0 /* ACPI PCI always enabled on IA64 */
#define acpi_strict 1 /* no ACPI spec workarounds on IA64 */

static inline bool acpi_has_cpu_in_madt(void)
{
return !!acpi_lapic;
}
#endif
#define acpi_processor_cstate_check(x) (x) /* no idle limits on IA64 :) */
static inline void disable_acpi(void) { }
Expand Down
2 changes: 2 additions & 0 deletions arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ config X86_64
### Arch settings
config X86
def_bool y
select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI
select ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
select ARCH_MIGHT_HAVE_PC_PARPORT
select ARCH_MIGHT_HAVE_PC_SERIO
Expand Down Expand Up @@ -133,6 +134,7 @@ config X86
select ARCH_SUPPORTS_ATOMIC_RMW
select HAVE_ACPI_APEI if ACPI
select HAVE_ACPI_APEI_NMI if ACPI
select ACPI_LEGACY_TABLES_LOOKUP if ACPI

config INSTRUCTION_DECODER
def_bool y
Expand Down
4 changes: 0 additions & 4 deletions arch/x86/include/asm/acenv.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

#define ACPI_FLUSH_CPU_CACHE() wbinvd()

#ifdef CONFIG_ACPI

int __acpi_acquire_global_lock(unsigned int *lock);
int __acpi_release_global_lock(unsigned int *lock);

Expand All @@ -44,6 +42,4 @@ int __acpi_release_global_lock(unsigned int *lock);
: "=r"(n_hi), "=r"(n_lo) \
: "0"(n_hi), "1"(n_lo))

#endif

#endif /* _ASM_X86_ACENV_H */
5 changes: 5 additions & 0 deletions arch/x86/include/asm/acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ static inline void arch_acpi_set_pdc_bits(u32 *buf)
buf[2] &= ~(ACPI_PDC_C_C2C3_FFH);
}

static inline bool acpi_has_cpu_in_madt(void)
{
return !!acpi_lapic;
}

#else /* !CONFIG_ACPI */

#define acpi_lapic 0
Expand Down
6 changes: 6 additions & 0 deletions drivers/acpi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ menuconfig ACPI

if ACPI

config ACPI_LEGACY_TABLES_LOOKUP
bool

config ARCH_MIGHT_HAVE_ACPI_PDC
bool

config ACPI_SLEEP
bool
depends on SUSPEND || HIBERNATION
Expand Down
1 change: 1 addition & 0 deletions drivers/acpi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ acpi-y += scan.o
acpi-y += resource.o
acpi-y += acpi_processor.o
acpi-y += processor_core.o
acpi-$(CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC) += processor_pdc.o
acpi-y += ec.o
acpi-$(CONFIG_ACPI_DOCK) += dock.o
acpi-y += pci_root.o pci_link.o pci_irq.o
Expand Down
18 changes: 9 additions & 9 deletions drivers/acpi/acpi_extlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ static u32 l1_percpu_entry;
#define ELOG_ENTRY_ADDR(phyaddr) \
(phyaddr - elog_base + (u8 *)elog_addr)

static struct acpi_generic_status *extlog_elog_entry_check(int cpu, int bank)
static struct acpi_hest_generic_status *extlog_elog_entry_check(int cpu, int bank)
{
int idx;
u64 data;
struct acpi_generic_status *estatus;
struct acpi_hest_generic_status *estatus;

WARN_ON(cpu < 0);
idx = ELOG_IDX(cpu, bank);
Expand All @@ -84,7 +84,7 @@ static struct acpi_generic_status *extlog_elog_entry_check(int cpu, int bank)
return NULL;

data &= EXT_ELOG_ENTRY_MASK;
estatus = (struct acpi_generic_status *)ELOG_ENTRY_ADDR(data);
estatus = (struct acpi_hest_generic_status *)ELOG_ENTRY_ADDR(data);

/* if no valid data in elog entry, just return */
if (estatus->block_status == 0)
Expand All @@ -94,7 +94,7 @@ static struct acpi_generic_status *extlog_elog_entry_check(int cpu, int bank)
}

static void __print_extlog_rcd(const char *pfx,
struct acpi_generic_status *estatus, int cpu)
struct acpi_hest_generic_status *estatus, int cpu)
{
static atomic_t seqno;
unsigned int curr_seqno;
Expand All @@ -113,7 +113,7 @@ static void __print_extlog_rcd(const char *pfx,
}

static int print_extlog_rcd(const char *pfx,
struct acpi_generic_status *estatus, int cpu)
struct acpi_hest_generic_status *estatus, int cpu)
{
/* Not more than 2 messages every 5 seconds */
static DEFINE_RATELIMIT_STATE(ratelimit_corrected, 5*HZ, 2);
Expand All @@ -139,8 +139,8 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
struct mce *mce = (struct mce *)data;
int bank = mce->bank;
int cpu = mce->extcpu;
struct acpi_generic_status *estatus, *tmp;
struct acpi_generic_data *gdata;
struct acpi_hest_generic_status *estatus, *tmp;
struct acpi_hest_generic_data *gdata;
const uuid_le *fru_id = &NULL_UUID_LE;
char *fru_text = "";
uuid_le *sec_type;
Expand All @@ -154,7 +154,7 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
/* clear record status to enable BIOS to update it again */
estatus->block_status = 0;

tmp = (struct acpi_generic_status *)elog_buf;
tmp = (struct acpi_hest_generic_status *)elog_buf;

if (!ras_userspace_consumers()) {
print_extlog_rcd(NULL, tmp, cpu);
Expand All @@ -163,7 +163,7 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,

/* log event via trace */
err_seq++;
gdata = (struct acpi_generic_data *)(tmp + 1);
gdata = (struct acpi_hest_generic_data *)(tmp + 1);
if (gdata->validation_bits & CPER_SEC_VALID_FRU_ID)
fru_id = (uuid_le *)gdata->fru_id;
if (gdata->validation_bits & CPER_SEC_VALID_FRU_TEXT)
Expand Down
10 changes: 10 additions & 0 deletions drivers/acpi/acpi_lpss.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,14 @@ static void lpss_i2c_setup(struct lpss_private_data *pdata)
writel(val, pdata->mmio_base + offset);
}

static struct lpss_device_desc wpt_dev_desc = {
.clk_required = true,
.prv_offset = 0x800,
.ltr_required = true,
.clk_divider = true,
.clk_gate = true,
};

static struct lpss_device_desc lpt_dev_desc = {
.clk_required = true,
.prv_offset = 0x800,
Expand Down Expand Up @@ -226,6 +234,8 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = {
{ "INT3436", LPSS_ADDR(lpt_sdio_dev_desc) },
{ "INT3437", },

{ "INT3438", LPSS_ADDR(wpt_dev_desc) },

{ }
};

Expand Down
8 changes: 2 additions & 6 deletions drivers/acpi/acpi_pnp.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include <linux/acpi.h>
#include <linux/module.h>
#include <linux/ctype.h>

static const struct acpi_device_id acpi_pnp_device_ids[] = {
/* soc_button_array */
Expand Down Expand Up @@ -320,11 +321,6 @@ static const struct acpi_device_id acpi_pnp_device_ids[] = {
{""},
};

static bool is_hex_digit(char c)
{
return (c >= 0 && c <= '9') || (c >= 'A' && c <= 'F');
}

static bool matching_id(char *idstr, char *list_id)
{
int i;
Expand All @@ -335,7 +331,7 @@ static bool matching_id(char *idstr, char *list_id)
for (i = 3; i < 7; i++) {
char c = toupper(idstr[i]);

if (!is_hex_digit(c)
if (!isxdigit(c)
|| (list_id[i] != 'X' && c != toupper(list_id[i])))
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpi_processor.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ static int acpi_processor_get_info(struct acpi_device *device)
pr->apic_id = apic_id;

cpu_index = acpi_map_cpuid(pr->apic_id, pr->acpi_id);
if (!cpu0_initialized && !acpi_lapic) {
if (!cpu0_initialized && !acpi_has_cpu_in_madt()) {
cpu0_initialized = 1;
/* Handle UP system running SMP kernel, with no LAPIC in MADT */
if ((cpu_index == -1) && (num_online_cpus() == 1))
Expand Down
10 changes: 8 additions & 2 deletions drivers/acpi/acpica/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Makefile for ACPICA Core interpreter
#

ccflags-y := -Os
ccflags-y := -Os -DBUILDING_ACPICA
ccflags-$(CONFIG_ACPI_DEBUG) += -DACPI_DEBUG_OUTPUT

# use acpi.o to put all files here into acpi.o modparam namespace
Expand Down Expand Up @@ -157,6 +157,7 @@ acpi-y += \
uterror.o \
uteval.o \
utglobal.o \
uthex.o \
utids.o \
utinit.o \
utlock.o \
Expand All @@ -175,5 +176,10 @@ acpi-y += \
utxferror.o \
utxfmutex.o

acpi-$(ACPI_FUTURE_USAGE) += uttrack.o utcache.o
acpi-$(ACPI_FUTURE_USAGE) += \
utcache.o \
utfileio.o \
utprint.o \
uttrack.o \
utuuid.o

9 changes: 6 additions & 3 deletions drivers/acpi/acpica/acapps.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,13 @@
/* Macros for usage messages */

#define ACPI_USAGE_HEADER(usage) \
printf ("Usage: %s\nOptions:\n", usage);
acpi_os_printf ("Usage: %s\nOptions:\n", usage);

#define ACPI_USAGE_TEXT(description) \
acpi_os_printf (description);

#define ACPI_OPTION(name, description) \
printf (" %-18s%s\n", name, description);
acpi_os_printf (" %-18s%s\n", name, description);

#define FILE_SUFFIX_DISASSEMBLY "dsl"
#define ACPI_TABLE_FILE_SUFFIX ".dat"
Expand All @@ -102,7 +105,7 @@ extern char *acpi_gbl_optarg;
/*
* cmfsize - Common get file size function
*/
u32 cm_get_file_size(FILE * file);
u32 cm_get_file_size(ACPI_FILE file);

#ifndef ACPI_DUMP_APP
/*
Expand Down
3 changes: 0 additions & 3 deletions drivers/acpi/acpica/acdebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,6 @@ acpi_status acpi_db_load_acpi_table(char *filename);
acpi_status
acpi_db_get_table_from_file(char *filename, struct acpi_table_header **table);

acpi_status
acpi_db_read_table_from_file(char *filename, struct acpi_table_header **table);

/*
* dbhistry - debugger HISTORY command
*/
Expand Down
Loading

0 comments on commit 7725131

Please sign in to comment.