aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJisheng Zhang <jszhang@marvell.com>2016-06-27 06:07:17 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-06-27 18:04:04 -0400
commit29327c84baebec3549b9775dc8de3d26343720cb (patch)
tree7cee71344e0bc5a20a26284fdda367219d926ea5
parenteed436095e62351c9f6d6b3ac6cdd18e89a852d8 (diff)
intel_pstate: add __init/__initdata marker to some functions/variables
These functions/variables are not needed after booting, so mark them as __init or __initdata. Signed-off-by: Jisheng Zhang <jszhang@marvell.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/cpufreq/intel_pstate.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 6390d524a211..fc71f92cf016 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -1377,7 +1377,7 @@ static const struct x86_cpu_id intel_pstate_cpu_ids[] = {
1377}; 1377};
1378MODULE_DEVICE_TABLE(x86cpu, intel_pstate_cpu_ids); 1378MODULE_DEVICE_TABLE(x86cpu, intel_pstate_cpu_ids);
1379 1379
1380static const struct x86_cpu_id intel_pstate_cpu_oob_ids[] = { 1380static const struct x86_cpu_id intel_pstate_cpu_oob_ids[] __initconst = {
1381 ICPU(INTEL_FAM6_BROADWELL_XEON_D, core_params), 1381 ICPU(INTEL_FAM6_BROADWELL_XEON_D, core_params),
1382 {} 1382 {}
1383}; 1383};
@@ -1599,9 +1599,9 @@ static struct cpufreq_driver intel_pstate_driver = {
1599static int no_load __initdata; 1599static int no_load __initdata;
1600static int no_hwp __initdata; 1600static int no_hwp __initdata;
1601static int hwp_only __initdata; 1601static int hwp_only __initdata;
1602static unsigned int force_load; 1602static unsigned int force_load __initdata;
1603 1603
1604static int intel_pstate_msrs_not_valid(void) 1604static int __init intel_pstate_msrs_not_valid(void)
1605{ 1605{
1606 if (!pstate_funcs.get_max() || 1606 if (!pstate_funcs.get_max() ||
1607 !pstate_funcs.get_min() || 1607 !pstate_funcs.get_min() ||
@@ -1611,7 +1611,7 @@ static int intel_pstate_msrs_not_valid(void)
1611 return 0; 1611 return 0;
1612} 1612}
1613 1613
1614static void copy_pid_params(struct pstate_adjust_policy *policy) 1614static void __init copy_pid_params(struct pstate_adjust_policy *policy)
1615{ 1615{
1616 pid_params.sample_rate_ms = policy->sample_rate_ms; 1616 pid_params.sample_rate_ms = policy->sample_rate_ms;
1617 pid_params.sample_rate_ns = pid_params.sample_rate_ms * NSEC_PER_MSEC; 1617 pid_params.sample_rate_ns = pid_params.sample_rate_ms * NSEC_PER_MSEC;
@@ -1622,7 +1622,7 @@ static void copy_pid_params(struct pstate_adjust_policy *policy)
1622 pid_params.setpoint = policy->setpoint; 1622 pid_params.setpoint = policy->setpoint;
1623} 1623}
1624 1624
1625static void copy_cpu_funcs(struct pstate_funcs *funcs) 1625static void __init copy_cpu_funcs(struct pstate_funcs *funcs)
1626{ 1626{
1627 pstate_funcs.get_max = funcs->get_max; 1627 pstate_funcs.get_max = funcs->get_max;
1628 pstate_funcs.get_max_physical = funcs->get_max_physical; 1628 pstate_funcs.get_max_physical = funcs->get_max_physical;
@@ -1637,7 +1637,7 @@ static void copy_cpu_funcs(struct pstate_funcs *funcs)
1637 1637
1638#ifdef CONFIG_ACPI 1638#ifdef CONFIG_ACPI
1639 1639
1640static bool intel_pstate_no_acpi_pss(void) 1640static bool __init intel_pstate_no_acpi_pss(void)
1641{ 1641{
1642 int i; 1642 int i;
1643 1643
@@ -1666,7 +1666,7 @@ static bool intel_pstate_no_acpi_pss(void)
1666 return true; 1666 return true;
1667} 1667}
1668 1668
1669static bool intel_pstate_has_acpi_ppc(void) 1669static bool __init intel_pstate_has_acpi_ppc(void)
1670{ 1670{
1671 int i; 1671 int i;
1672 1672
@@ -1694,7 +1694,7 @@ struct hw_vendor_info {
1694}; 1694};
1695 1695
1696/* Hardware vendor-specific info that has its own power management modes */ 1696/* Hardware vendor-specific info that has its own power management modes */
1697static struct hw_vendor_info vendor_info[] = { 1697static struct hw_vendor_info vendor_info[] __initdata = {
1698 {1, "HP ", "ProLiant", PSS}, 1698 {1, "HP ", "ProLiant", PSS},
1699 {1, "ORACLE", "X4-2 ", PPC}, 1699 {1, "ORACLE", "X4-2 ", PPC},
1700 {1, "ORACLE", "X4-2L ", PPC}, 1700 {1, "ORACLE", "X4-2L ", PPC},
@@ -1713,7 +1713,7 @@ static struct hw_vendor_info vendor_info[] = {
1713 {0, "", ""}, 1713 {0, "", ""},
1714}; 1714};
1715 1715
1716static bool intel_pstate_platform_pwr_mgmt_exists(void) 1716static bool __init intel_pstate_platform_pwr_mgmt_exists(void)
1717{ 1717{
1718 struct acpi_table_header hdr; 1718 struct acpi_table_header hdr;
1719 struct hw_vendor_info *v_info; 1719 struct hw_vendor_info *v_info;