From: Julien Grall <julien.grall@linaro.org>
To: Oleksandr Dmytryshyn <oleksandr.dmytryshyn@globallogic.com>
Cc: Stefano Stabellini <stefano.stabellini@citrix.com>,
Tim Deegan <tim@xen.org>, Ian Campbell <ian.campbell@citrix.com>,
xen-devel <xen-devel@lists.xen.org>
Subject: Re: [RFC PATCH v3 10/12] cpufreq: add hwdom-cpufreq driver
Date: Fri, 24 Oct 2014 14:08:41 +0100 [thread overview]
Message-ID: <544A4F59.1040503@linaro.org> (raw)
In-Reply-To: <CAN58jitj+1MristNGaxnS4AX79v1cEHwaB_0dBLa9o_2zc16mg@mail.gmail.com>
On 10/24/2014 02:05 PM, Oleksandr Dmytryshyn wrote:
> On Fri, Oct 24, 2014 at 2:45 PM, Julien Grall <julien.grall@linaro.org> wrote:
>> On 10/24/2014 11:30 AM, Oleksandr Dmytryshyn wrote:
>>> On Thu, Oct 23, 2014 at 7:42 PM, Julien Grall <julien.grall@linaro.org> wrote:
>>>> Hi Oleksandr,
>>>>
>>>> On 10/23/2014 04:07 PM, Oleksandr Dmytryshyn wrote:
>>>>> This driver uses hwdom to change frequencies on CPUs
>>>>>
>>>>> Signed-off-by: Oleksandr Dmytryshyn <oleksandr.dmytryshyn@globallogic.com>
>>>>> ---
>>>>> xen/Rules.mk | 1 +
>>>>> xen/drivers/cpufreq/Makefile | 1 +
>>>>> xen/drivers/cpufreq/hwdom-cpufreq.c | 220 ++++++++++++++++++++++++++++++++++++
>>>>> xen/include/public/xen.h | 1 +
>>>>> 4 files changed, 223 insertions(+)
>>>>> create mode 100644 xen/drivers/cpufreq/hwdom-cpufreq.c
>>>>>
>>>>> diff --git a/xen/Rules.mk b/xen/Rules.mk
>>>>> index 3b0b89b..cccbc72 100644
>>>>> --- a/xen/Rules.mk
>>>>> +++ b/xen/Rules.mk
>>>>> @@ -56,6 +56,7 @@ CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS
>>>>> CFLAGS-$(lock_profile) += -DLOCK_PROFILE
>>>>> CFLAGS-$(HAS_ACPI) += -DHAS_ACPI
>>>>> CFLAGS-$(HAS_CPUFREQ) += -DHAS_CPUFREQ
>>>>> +CFLAGS-$(HAS_HWDOM_CPUFREQ) += -DHAS_HWDOM_CPUFREQ
>>>>> CFLAGS-$(HAS_PM) += -DHAS_PM
>>>>> CFLAGS-$(HAS_CPU_TURBO) += -DHAS_CPU_TURBO
>>>>> CFLAGS-$(HAS_GDBSX) += -DHAS_GDBSX
>>>>> diff --git a/xen/drivers/cpufreq/Makefile b/xen/drivers/cpufreq/Makefile
>>>>> index b87d127..891997c 100644
>>>>> --- a/xen/drivers/cpufreq/Makefile
>>>>> +++ b/xen/drivers/cpufreq/Makefile
>>>>> @@ -2,3 +2,4 @@ obj-y += cpufreq.o
>>>>> obj-y += cpufreq_ondemand.o
>>>>> obj-y += cpufreq_misc_governors.o
>>>>> obj-y += utility.o
>>>>> +obj-$(HAS_HWDOM_CPUFREQ) += hwdom-cpufreq.o
>>>>> diff --git a/xen/drivers/cpufreq/hwdom-cpufreq.c b/xen/drivers/cpufreq/hwdom-cpufreq.c
>>>>> new file mode 100644
>>>>> index 0000000..67c9e1d
>>>>> --- /dev/null
>>>>> +++ b/xen/drivers/cpufreq/hwdom-cpufreq.c
>>>>> @@ -0,0 +1,220 @@
>>>>> +/*
>>>>> + * Copyright (C) 2014 GlobalLogic Inc.
>>>>
>>>> A part of this file has been copied from xen/arch/x86/acpi/cpufreq.c. I
>>>> would keep the copyright from this file and add yours.
>>> I'll do this in the next patch-set.
>>>
>>>> Maybe we could share the initialization code (and others parts?) with
>>>> this file? For instance the structure looks the same...
>>> I don't think that we could simple share the initialization code and
>>> others parts.
>>> A lot of code looks the same. But I've introduced a new structure
>>> hwdom_cpufreq_data which has different field names (non-ACPI meaning).
>>
>> Except the name, the type of each fields are the same (except the third
>> one which doesn't exist here).
>>
>> IHMO, those names could be renamed if it could avoid to duplicate tens
>> lines of code.
>>
>> It would be easier for maintaining the code later.
> In this case I'll back to the 'acpi_cpufreq_data' structure and I'll try
> to create an additional file with common code for those drivers.
I'm not the maintainers, so I would wait any input from maintainers
before doing a such big change :).
Regards,
--
Julien Grall
next prev parent reply other threads:[~2014-10-24 13:08 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-23 15:07 [RFC PATCH v3 00/12]xen_cpufreq implementation in Xen hypervisor Oleksandr Dmytryshyn
2014-10-23 15:07 ` [RFC PATCH v3 01/12] cpufreq: move cpufreq.h file to the xen/include/xen location Oleksandr Dmytryshyn
2014-10-23 15:07 ` [RFC PATCH v3 02/12] pm: move processor_perf.h " Oleksandr Dmytryshyn
2014-10-23 15:07 ` [RFC PATCH v3 03/12] pmstat: move pmstat.c file to the xen/drivers/pm/stat.c location Oleksandr Dmytryshyn
2014-10-23 15:07 ` [RFC PATCH v3 04/12] cpufreq: make turbo settings to be configurable Oleksandr Dmytryshyn
2014-10-23 15:07 ` [RFC PATCH v3 05/12] pmstat: make pmstat functions more generalizable Oleksandr Dmytryshyn
2014-10-23 15:07 ` [RFC PATCH v3 06/12] cpufreq: make cpufreq driver " Oleksandr Dmytryshyn
2014-10-23 15:07 ` [RFC PATCH v3 07/12] arch/arm: create device tree nodes for hwdom cpufreq cpu driver Oleksandr Dmytryshyn
2014-10-23 15:49 ` Julien Grall
2014-10-24 10:24 ` Oleksandr Dmytryshyn
2014-10-27 10:52 ` Oleksandr Dmytryshyn
2014-10-27 13:15 ` Julien Grall
2014-10-27 13:32 ` Oleksandr Dmytryshyn
2014-10-23 15:07 ` [RFC PATCH v3 08/12] xsm: enable xsm_platform_op hook for all architectures Oleksandr Dmytryshyn
2014-10-23 16:11 ` Julien Grall
2014-10-24 10:24 ` Oleksandr Dmytryshyn
2014-10-24 10:27 ` Oleksandr Dmytryshyn
2014-10-24 11:38 ` Julien Grall
2014-10-23 15:07 ` [RFC PATCH v3 09/12] xen: arm: implement platform hypercall Oleksandr Dmytryshyn
2014-10-23 15:07 ` [RFC PATCH v3 10/12] cpufreq: add hwdom-cpufreq driver Oleksandr Dmytryshyn
2014-10-23 16:42 ` Julien Grall
2014-10-24 10:30 ` Oleksandr Dmytryshyn
2014-10-24 11:45 ` Julien Grall
2014-10-24 13:05 ` Oleksandr Dmytryshyn
2014-10-24 13:08 ` Julien Grall [this message]
2014-10-27 13:29 ` Oleksandr Dmytryshyn
2014-10-23 15:07 ` [RFC PATCH v3 11/12] xen: arm: implement XEN_SYSCTL_cpufreq_op Oleksandr Dmytryshyn
2014-10-23 16:27 ` Julien Grall
2014-10-24 10:37 ` Oleksandr Dmytryshyn
2014-10-26 17:41 ` Stefano Stabellini
2014-10-27 16:27 ` Oleksandr Dmytryshyn
2014-10-23 15:07 ` [RFC PATCH v3 12/12] xen/arm: enable cpufreq functionality for ARM 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=544A4F59.1040503@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.