All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Hanjun Guo <guohanjun@huawei.com>,
	Marc Zyngier <marc.zyngier@arm.com>,
	Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Fu Wei <fu.wei@linaro.org>,
	Ding Tianhong <dingtianhong@huawei.com>,
	linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linuxarm@huawei.com, Hanjun Guo <hanjun.guo@linaro.org>,
	mbrugger@suse.com, yousaf.kaukab@suse.com,
	sanil.kumar@huawei.com
Subject: Re: [PATCH 2/2] arch_timer: acpi: add hisi timer erratum data
Date: Thu, 16 Feb 2017 09:42:11 +0100	[thread overview]
Message-ID: <e2780793-a8ac-4d75-b095-a534e36f8bf7@suse.de> (raw)
In-Reply-To: <589D6776.2010400@huawei.com>



On 10/02/2017 08:10, Hanjun Guo wrote:
> Hi Marc,
>
> On 2017/1/24 19:32, Marc Zyngier wrote:
>> On 24/01/17 10:57, Mark Rutland wrote:
>>> On Tue, Jan 24, 2017 at 06:39:51PM +0800, Hanjun Guo wrote:
>>>> From: Hanjun Guo <hanjun.guo@linaro.org>
>>>>
>>>> Add hisilicon timer specific erratum fixes.
>>>>
>>>> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
>>>> ---
>>>>  drivers/clocksource/arm_arch_timer.c | 22 ++++++++++++++++++++++
>>>>  1 file changed, 22 insertions(+)
>>>>
>>>> diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
>>>> index 80d6f76..3e62a09 100644
>>>> --- a/drivers/clocksource/arm_arch_timer.c
>>>> +++ b/drivers/clocksource/arm_arch_timer.c
>>>> @@ -1156,10 +1156,32 @@ struct gtdt_arch_timer_fixup {
>>>>  	void *context;
>>>>  };
>>>>
>>>> +#ifdef CONFIG_HISILICON_ERRATUM_161010101
>>>> +static void __init hisi_erratum_workaroud_enable(void *context)
>>>> +{
>>>> +	int i;
>>>> +
>>>> +	for (i = 0; i < ARRAY_SIZE(ool_workarounds); i++) {
>>>> +		if (!strcmp(context, ool_workarounds[i].id)) {
>>>> +			timer_unstable_counter_workaround = &ool_workarounds[i];
>>>> +			static_branch_enable(&arch_timer_read_ool_enabled);
>>>> +			pr_info("arch_timer: Enabling workaround for %s\n",
>>>> +				timer_unstable_counter_workaround->id);
>>>> +			break;
>>>> +		}
>>>> +	}
>>>> +}
>>>> +#endif
>>>> +
>>>>  /* note: this needs to be updated according to the doc of OEM ID
>>>>   * and TABLE ID for different board.
>>>>   */
>>>>  static struct gtdt_arch_timer_fixup arch_timer_quirks[] __initdata = {
>>>> +#ifdef CONFIG_HISILICON_ERRATUM_161010101
>>>> +	{"HISI  ", "HIP05   ", 0, &hisi_erratum_workaroud_enable, "hisilicon,erratum-161010101"},
>>>> +	{"HISI  ", "HIP06   ", 0, &hisi_erratum_workaroud_enable, "hisilicon,erratum-161010101"},
>>>> +	{"HISI  ", "HIP07   ", 0, &hisi_erratum_workaroud_enable, "hisilicon,erratum-161010101"},
>>>> +#endif
>>>>  };
>>> NAK. This duplicates logic unnecessarily (for enabling the workaround),
>>> and (ab)uses the id, which was intended to be specific to DT (since it
>>> is a DT property name).
>> Agreed, that's properly revolting.
>>
>>> We should split the matching from the particular workaround (and
>>> enabling thereof), so that we can go straight from ACPI match to
>>> workaround (without having to use the DT id in this manner), and don't
>>> have to duplicate the logic to enable the workaround.
>>>
>>> I believe Marc is looking at some rework in this area which may enable
>>> this, so please wait for that to appear.
>> Yeah, I'm implementing a semi-flexible way to add new quirk types, and
>> the last thing I want to see is two (or more) tables describing the same
>> thing.
>
> Kindly ping, if you have patches in hand, I can test against our platforms,
> thank you very much.

Any progress on this? I'm not a big fan of stalling erratum fixes 
upstream because of potential future refactoring.


Alex

WARNING: multiple messages have this Message-ID (diff)
From: agraf@suse.de (Alexander Graf)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] arch_timer: acpi: add hisi timer erratum data
Date: Thu, 16 Feb 2017 09:42:11 +0100	[thread overview]
Message-ID: <e2780793-a8ac-4d75-b095-a534e36f8bf7@suse.de> (raw)
In-Reply-To: <589D6776.2010400@huawei.com>



On 10/02/2017 08:10, Hanjun Guo wrote:
> Hi Marc,
>
> On 2017/1/24 19:32, Marc Zyngier wrote:
>> On 24/01/17 10:57, Mark Rutland wrote:
>>> On Tue, Jan 24, 2017 at 06:39:51PM +0800, Hanjun Guo wrote:
>>>> From: Hanjun Guo <hanjun.guo@linaro.org>
>>>>
>>>> Add hisilicon timer specific erratum fixes.
>>>>
>>>> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
>>>> ---
>>>>  drivers/clocksource/arm_arch_timer.c | 22 ++++++++++++++++++++++
>>>>  1 file changed, 22 insertions(+)
>>>>
>>>> diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
>>>> index 80d6f76..3e62a09 100644
>>>> --- a/drivers/clocksource/arm_arch_timer.c
>>>> +++ b/drivers/clocksource/arm_arch_timer.c
>>>> @@ -1156,10 +1156,32 @@ struct gtdt_arch_timer_fixup {
>>>>  	void *context;
>>>>  };
>>>>
>>>> +#ifdef CONFIG_HISILICON_ERRATUM_161010101
>>>> +static void __init hisi_erratum_workaroud_enable(void *context)
>>>> +{
>>>> +	int i;
>>>> +
>>>> +	for (i = 0; i < ARRAY_SIZE(ool_workarounds); i++) {
>>>> +		if (!strcmp(context, ool_workarounds[i].id)) {
>>>> +			timer_unstable_counter_workaround = &ool_workarounds[i];
>>>> +			static_branch_enable(&arch_timer_read_ool_enabled);
>>>> +			pr_info("arch_timer: Enabling workaround for %s\n",
>>>> +				timer_unstable_counter_workaround->id);
>>>> +			break;
>>>> +		}
>>>> +	}
>>>> +}
>>>> +#endif
>>>> +
>>>>  /* note: this needs to be updated according to the doc of OEM ID
>>>>   * and TABLE ID for different board.
>>>>   */
>>>>  static struct gtdt_arch_timer_fixup arch_timer_quirks[] __initdata = {
>>>> +#ifdef CONFIG_HISILICON_ERRATUM_161010101
>>>> +	{"HISI  ", "HIP05   ", 0, &hisi_erratum_workaroud_enable, "hisilicon,erratum-161010101"},
>>>> +	{"HISI  ", "HIP06   ", 0, &hisi_erratum_workaroud_enable, "hisilicon,erratum-161010101"},
>>>> +	{"HISI  ", "HIP07   ", 0, &hisi_erratum_workaroud_enable, "hisilicon,erratum-161010101"},
>>>> +#endif
>>>>  };
>>> NAK. This duplicates logic unnecessarily (for enabling the workaround),
>>> and (ab)uses the id, which was intended to be specific to DT (since it
>>> is a DT property name).
>> Agreed, that's properly revolting.
>>
>>> We should split the matching from the particular workaround (and
>>> enabling thereof), so that we can go straight from ACPI match to
>>> workaround (without having to use the DT id in this manner), and don't
>>> have to duplicate the logic to enable the workaround.
>>>
>>> I believe Marc is looking at some rework in this area which may enable
>>> this, so please wait for that to appear.
>> Yeah, I'm implementing a semi-flexible way to add new quirk types, and
>> the last thing I want to see is two (or more) tables describing the same
>> thing.
>
> Kindly ping, if you have patches in hand, I can test against our platforms,
> thank you very much.

Any progress on this? I'm not a big fan of stalling erratum fixes 
upstream because of potential future refactoring.


Alex

  reply	other threads:[~2017-02-16  8:42 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-24 10:39 [PATCH 0/2] arch_timer: acpi: Add workaround for hisilicon-161010101 erratum Hanjun Guo
2017-01-24 10:39 ` Hanjun Guo
2017-01-24 10:39 ` [PATCH 1/2] arm64: arch_timer: acpi: Introduce a generic aquirk framework for erratum Hanjun Guo
2017-01-24 10:39   ` Hanjun Guo
2017-01-24 10:39 ` [PATCH 2/2] arch_timer: acpi: add hisi timer erratum data Hanjun Guo
2017-01-24 10:39   ` Hanjun Guo
2017-01-24 10:57   ` Mark Rutland
2017-01-24 10:57     ` Mark Rutland
2017-01-24 11:32     ` Marc Zyngier
2017-01-24 11:32       ` Marc Zyngier
2017-01-24 12:35       ` John Garry
2017-01-24 12:35         ` John Garry
2017-01-24 13:08         ` Marc Zyngier
2017-01-24 13:08           ` Marc Zyngier
2017-01-24 13:28           ` Shameerali Kolothum Thodi
2017-01-24 13:28             ` Shameerali Kolothum Thodi
2017-01-24 13:22       ` Hanjun Guo
2017-01-24 13:22         ` Hanjun Guo
2017-02-10  7:10       ` Hanjun Guo
2017-02-10  7:10         ` Hanjun Guo
2017-02-16  8:42         ` Alexander Graf [this message]
2017-02-16  8:42           ` Alexander Graf
2017-02-16  9:14           ` Daniel Lezcano
2017-02-16  9:14             ` Daniel Lezcano
2017-02-16  9:32             ` Alexander Graf
2017-02-16  9:32               ` Alexander Graf
2017-02-16  9:41               ` Ding Tianhong
2017-02-16  9:41                 ` Ding Tianhong
2017-02-16  9:46                 ` Sanil Kumar
2017-02-16  9:46                   ` Sanil Kumar
2017-02-16  9:49                   ` Daniel Lezcano
2017-02-16  9:49                     ` Daniel Lezcano
2017-02-16  9:42             ` Hanjun Guo
2017-02-16  9:42               ` Hanjun Guo
2017-02-16 10:04         ` Marc Zyngier
2017-02-16 10:04           ` Marc Zyngier
2017-02-20 19:00         ` Marc Zyngier
2017-02-20 19:00           ` Marc Zyngier
2017-02-21 11:56           ` Hanjun Guo
2017-02-21 11:56             ` Hanjun Guo
2017-02-21 15:22             ` Marc Zyngier
2017-02-21 15:22               ` Marc Zyngier
2017-02-22  4:08               ` Alexander Graf
2017-02-22  4:08                 ` Alexander Graf
2017-02-22  9:29                 ` Marc Zyngier
2017-02-22  9:29                   ` Marc Zyngier
2017-02-22  7:41               ` Hanjun Guo
2017-02-22  7:41                 ` Hanjun Guo
2017-02-21 12:46           ` Ding Tianhong
2017-02-21 12:46             ` Ding Tianhong
2017-01-24 13:50     ` Hanjun Guo
2017-01-24 13:50       ` Hanjun Guo
2017-01-24 10:49 ` [PATCH 0/2] arch_timer: acpi: Add workaround for hisilicon-161010101 erratum Hanjun Guo
2017-01-24 10:49   ` Hanjun Guo

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=e2780793-a8ac-4d75-b095-a534e36f8bf7@suse.de \
    --to=agraf@suse.de \
    --cc=daniel.lezcano@linaro.org \
    --cc=dingtianhong@huawei.com \
    --cc=fu.wei@linaro.org \
    --cc=guohanjun@huawei.com \
    --cc=hanjun.guo@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linuxarm@huawei.com \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=marc.zyngier@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=mbrugger@suse.com \
    --cc=rafael@kernel.org \
    --cc=sanil.kumar@huawei.com \
    --cc=will.deacon@arm.com \
    --cc=yousaf.kaukab@suse.com \
    /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.