From: Julien Grall <julien.grall@linaro.org>
To: Oleksandr Dmytryshyn <oleksandr.dmytryshyn@globallogic.com>,
Ian Campbell <ian.campbell@citrix.com>,
Stefano Stabellini <stefano.stabellini@citrix.com>,
Tim Deegan <tim@xen.org>,
xen-devel@lists.xen.org
Subject: Re: [RFC PATCH 7/7] xen/arm: cpufreq: add cpufreq driver
Date: Tue, 07 Oct 2014 16:57:12 +0100 [thread overview]
Message-ID: <54340D58.2020408@linaro.org> (raw)
In-Reply-To: <1412691618-7408-8-git-send-email-oleksandr.dmytryshyn@globallogic.com>
Hi Oleksandr,
On 10/07/2014 03:20 PM, Oleksandr Dmytryshyn wrote:
> Xen changes frequencies on CPUs using this driver.
>
> Signed-off-by: Oleksandr Dmytryshyn <oleksandr.dmytryshyn@globallogic.com>
> ---
> drivers/xen/Kconfig | 20 +
> drivers/xen/Makefile | 1 +
> drivers/xen/xen-cpufreq.c | 882 ++++++++++++++++++++++++++++++++++++++++++++
> include/xen/interface/xen.h | 1 +
> 4 files changed, 904 insertions(+)
> create mode 100644 drivers/xen/xen-cpufreq.c
>
> diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig
> index 254a5cc..bb2d3d5 100644
> --- a/drivers/xen/Kconfig
> +++ b/drivers/xen/Kconfig
> @@ -220,6 +220,26 @@ config XEN_ACPI_PROCESSOR
> called xen_acpi_processor If you do not know what to choose, select
> M here. If the CPUFREQ drivers are built in, select Y here.
>
> +config XEN_CPUFREQ
> + bool "Xen Cpufreq driver"
> + depends on XEN_DOM0 && !CPU_FREQ
Why xen-cpufreq is only available when CPU_FREQ is not present?
As said early, a same kernel should be able to run as Xen domain (DOM0
and other guests) and bare metal.
> + default n
> + help
> + This driver uploads Power Management information to the Xen
> + hypervisor and changes CPUs frequency using CPU Frequency scaling
> + drivers.
> +
> + To do that the driver uses CPU Frequency scaling drivers to parse
> + the Power Management data and uploads said information to the Xen
> + hypervisor. Then the Xen hypervisor can select the proper Pxx states.
> +
> + Then the Xen hypervisor can change CPUs frequency by giving commands
> + via this driver to the CPU Frequency scaling driver.
> +
> + To compile this driver as a module, choose M here: the module will be
> + called xen_acpi_processor If you do not know what to choose, select
Is guess you copied the config help from xen_acpi_processor?
> + M here. If the CPUFREQ drivers are built in, select Y here.
> +
> config XEN_MCE_LOG
> bool "Xen platform mcelog"
> depends on XEN_DOM0 && X86_64 && X86_MCE
> diff --git a/drivers/xen/Makefile b/drivers/xen/Makefile
> index b7c835f..0345d65 100644
> --- a/drivers/xen/Makefile
> +++ b/drivers/xen/Makefile
> @@ -33,6 +33,7 @@ obj-$(CONFIG_XEN_PRIVCMD) += xen-privcmd.o
> obj-$(CONFIG_XEN_ACPI_HOTPLUG_MEMORY) += xen-acpi-memhotplug.o
> obj-$(CONFIG_XEN_ACPI_HOTPLUG_CPU) += xen-acpi-cpuhotplug.o
> obj-$(CONFIG_XEN_ACPI_PROCESSOR) += xen-acpi-processor.o
> +obj-$(CONFIG_XEN_CPUFREQ) += xen-cpufreq.o
I think this new cpufreq driver should live in drivers/cpufreq, not in
drivers/xen.
> xen-evtchn-y := evtchn.o
> xen-gntdev-y := gntdev.o
> xen-gntalloc-y := gntalloc.o
> diff --git a/drivers/xen/xen-cpufreq.c b/drivers/xen/xen-cpufreq.c
> new file mode 100644
> index 0000000..a0d9adc
> --- /dev/null
> +++ b/drivers/xen/xen-cpufreq.c
[..]
> +#ifdef CONFIG_CPUMASK_OFFSTACK
> +#error CONFIG_CPUMASK_OFFSTACK config should not be used with this driver
> +#endif
hmmm. Why?
Regards,
--
Julien Grall
next prev parent reply other threads:[~2014-10-07 15:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-07 14:20 [RFC PATCH] xen_cpufreq implementation in kernel Oleksandr Dmytryshyn
2014-10-07 14:20 ` [RFC PATCH 1/7] PM / OPP: make cpufreq functions dependent on CONFIG_CPU_FREQ_TABLE Oleksandr Dmytryshyn
2014-10-08 13:52 ` Stefano Stabellini
2014-10-09 10:23 ` Oleksandr Dmytryshyn
2014-10-07 14:20 ` [RFC PATCH 2/7] xen/arm: implement HYPERVISOR_sysctl Oleksandr Dmytryshyn
2014-10-07 14:20 ` [RFC PATCH 3/7] xen/arm: implement HYPERVISOR_dom0_op Oleksandr Dmytryshyn
2014-10-07 14:20 ` [RFC PATCH 4/7] xen/arm: add XEN_SYSCTL_cpufreq_op definition Oleksandr Dmytryshyn
2014-10-07 14:20 ` [RFC PATCH 5/7] cpufreq: cpufreq-cpu0: change cpus data path in devtree for Dom0 kernel Oleksandr Dmytryshyn
2014-10-07 15:49 ` Julien Grall
2014-10-09 6:22 ` Oleksandr Dmytryshyn
2014-10-07 14:20 ` [RFC PATCH 6/7] cpufreq: make CPU Frequency scaling drivers visible for XEN_DOM0 config Oleksandr Dmytryshyn
2014-10-07 14:20 ` [RFC PATCH 7/7] xen/arm: cpufreq: add cpufreq driver Oleksandr Dmytryshyn
2014-10-07 15:57 ` Julien Grall [this message]
2014-10-09 13:01 ` Oleksandr Dmytryshyn
2014-10-07 15:44 ` [RFC PATCH] xen_cpufreq implementation in kernel Julien Grall
2014-10-09 6:21 ` Oleksandr Dmytryshyn
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=54340D58.2020408@linaro.org \
--to=julien.grall@linaro.org \
--cc=ian.campbell@citrix.com \
--cc=oleksandr.dmytryshyn@globallogic.com \
--cc=stefano.stabellini@citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.