mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: linux-acpi@vger.kernel.org, "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Sudeep Holla <sudeep.holla@arm.com>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Hanjun Guo <hanjun.guo@linaro.org>, Al Stone <ahs3@redhat.com>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Subject: [PATCH RFC 2/5] ACPI / processor: always compile perflib if CONFIG_ACPI_PROCESSOR
Date: Wed,  6 May 2015 15:31:27 +0100	[thread overview]
Message-ID: <1430922690-6966-3-git-send-email-sudeep.holla@arm.com> (raw)
In-Reply-To: <1430922690-6966-1-git-send-email-sudeep.holla@arm.com>

Similar to the  idle, thermal and throttling libraries, always compile
the perflib if CONFIG_ACPI_PROCESSOR is enabled. This not only makes
perflib alligned with other libraries but also helps in some sanity
testing of these ACPI methods even when a particular feature is not
enabled in the kernel configuration.

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 drivers/acpi/Makefile    |  2 +-
 include/acpi/processor.h | 29 -----------------------------
 include/linux/cpufreq.h  |  4 ++++
 3 files changed, 5 insertions(+), 30 deletions(-)

diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile
index 8a063e276530..33aef9d8b260 100644
--- a/drivers/acpi/Makefile
+++ b/drivers/acpi/Makefile
@@ -84,7 +84,7 @@ obj-$(CONFIG_ACPI_BGRT)		+= bgrt.o
 # processor has its own "processor." module_param namespace
 processor-y			:= processor_driver.o processor_throttling.o
 processor-y			+= processor_idle.o processor_thermal.o
-processor-$(CONFIG_CPU_FREQ)	+= processor_perflib.o
+processor-y			+= processor_perflib.o
 
 obj-$(CONFIG_ACPI_PROCESSOR_AGGREGATOR) += acpi_pad.o
 
diff --git a/include/acpi/processor.h b/include/acpi/processor.h
index 4188a4d3b597..42a7ca744ff1 100644
--- a/include/acpi/processor.h
+++ b/include/acpi/processor.h
@@ -275,39 +275,10 @@ static inline void acpi_processor_ffh_cstate_enter(struct acpi_processor_cx
 
 /* in processor_perflib.c */
 
-#ifdef CONFIG_CPU_FREQ
 void acpi_processor_ppc_init(void);
 void acpi_processor_ppc_exit(void);
 int acpi_processor_ppc_has_changed(struct acpi_processor *pr, int event_flag);
 extern int acpi_processor_get_bios_limit(int cpu, unsigned int *limit);
-#else
-static inline void acpi_processor_ppc_init(void)
-{
-	return;
-}
-static inline void acpi_processor_ppc_exit(void)
-{
-	return;
-}
-static inline int acpi_processor_ppc_has_changed(struct acpi_processor *pr,
-								int event_flag)
-{
-	static unsigned int printout = 1;
-	if (printout) {
-		printk(KERN_WARNING
-		       "Warning: Processor Platform Limit event detected, but not handled.\n");
-		printk(KERN_WARNING
-		       "Consider compiling CPUfreq support into your kernel.\n");
-		printout = 0;
-	}
-	return 0;
-}
-static inline int acpi_processor_get_bios_limit(int cpu, unsigned int *limit)
-{
-	return -ENODEV;
-}
-
-#endif				/* CONFIG_CPU_FREQ */
 
 /* in processor_core.c */
 phys_cpuid_t acpi_get_phys_id(acpi_handle, int type, u32 acpi_id);
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 2ee4888c1f47..ee91b295350b 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -171,6 +171,10 @@ static inline unsigned int cpufreq_quick_get_max(unsigned int cpu)
 {
 	return 0;
 }
+static inline int cpufreq_update_policy(unsigned int cpu)
+{
+	return -ENODEV;
+}
 static inline void disable_cpufreq(void) { }
 #endif
 
-- 
1.9.1


  parent reply	other threads:[~2015-05-06 14:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-06 14:31 [PATCH RFC 0/5] ACPI / core : few cleanups and updates for LPI Sudeep Holla
2015-05-06 14:31 ` [PATCH RFC 1/5] ACPI / containers : add support for ACPI0010 processor container Sudeep Holla
2015-05-08  8:50   ` Hanjun Guo
2015-05-08 14:06     ` Rafael J. Wysocki
2015-05-08 15:32       ` Sudeep Holla
2015-05-08 20:33         ` Rafael J. Wysocki
2015-05-06 14:31 ` Sudeep Holla [this message]
2015-05-06 18:36   ` [PATCH RFC 2/5] ACPI / processor: always compile perflib if CONFIG_ACPI_PROCESSOR Ashwin Chaugule
2015-05-08  8:52     ` Hanjun Guo
2015-05-08 10:06       ` Sudeep Holla
2015-05-06 14:31 ` [PATCH RFC 3/5] ACPI / sleep: move acpi_processor_sleep to sleep.c Sudeep Holla
2015-05-06 14:31 ` [PATCH RFC 4/5] ACPI / processor_idle: replace PREFIX with pr_fmt Sudeep Holla
2015-05-06 14:31 ` [PATCH RFC 5/5] ACPI / processor_idle : introduce ARCH_SUPPORTS_ACPI_PROCESSOR_CSTATE Sudeep Holla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1430922690-6966-3-git-send-email-sudeep.holla@arm.com \
    --to=sudeep.holla@arm.com \
    --cc=ahs3@redhat.com \
    --cc=hanjun.guo@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=rjw@rjwysocki.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®