All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Marc Zyngier <marc.zyngier@arm.com>,
	linux-samsung-soc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Cc: Will Deacon <will.deacon@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Inki Dae <inki.dae@samsung.com>,
	Mark Rutland <Mark.Rutland@arm.com>
Subject: Re: [PATCH 4/7] clocksource: arch_timer: Add support for not-fw-configured timer on ARM64
Date: Mon, 15 Oct 2018 14:12:42 +0200	[thread overview]
Message-ID: <20181015121243eucas1p1dd6093945310db315fc28092e2c91b6e~dxxpPrR4A1710517105eucas1p1W@eucas1p1.samsung.com> (raw)
In-Reply-To: <e9624612-4a94-b9bc-f5ec-0f16d5b12323@arm.com>

Hi All,

On 2018-10-08 15:17, Marc Zyngier wrote:
> + Mark Rutland
>
> Hi Marek,
>
> On 08/10/18 13:50, Marek Szyprowski wrote:
>> Use common infrastructure for ARM Architected Timers erratum to enable
>> support for systems with broken CPU firmware (timer registers not
>> properly configured). This mode has been already availabled on ARM
>> (32bits) architecture. This enables to run Linux kernel on ARM64 boards
>> using physical architected timers instead of the virtual ones. Examples
>> of such system with broken firmware are Samsung Exynos5433 SoC based
>> TM2(e) boards, which is already deployed for years and updating firmware
>> is not possible.
>>
>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>> ---
>>   drivers/clocksource/Kconfig          | 11 +++++++++++
>>   drivers/clocksource/arm_arch_timer.c | 15 ++++++++++++---
>>   2 files changed, 23 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
>> index a11f4ba98b05..a30752579b03 100644
>> --- a/drivers/clocksource/Kconfig
>> +++ b/drivers/clocksource/Kconfig
>> @@ -364,6 +364,17 @@ config ARM64_ERRATUM_858921
>>         The workaround will be dynamically enabled when an affected
>>         core is detected.
>>   +config ARCH_TIMER_REGISTERS_NOT_FW_CONFIGURED
>> +    bool "Workaround for arch timer registers not configured by
>> firmware"
>> +    default y
>> +    select ARM_ARCH_TIMER_OOL_WORKAROUND
>> +    depends on ARM_ARCH_TIMER && ARM64
>> +    help
>> +      This option enables a workaround for boards, on which arch timer
>> +      registers are not properly configured by the board firmware.
>> +      The workaround will be dynamically enabled when an affected
>> +      board is detected.
>> +
>
> I'm sorry, but I'm strongly pushing back on this.
>
> This horrible hack was accepted with the express condition that it
> would be limited to ARMv7 platforms (on the ground that we never
> really documented the arch timer boot requirements on that version of
> the architecture), and would never proliferate on arm64. From day 1,
> we established what the boot protocol was, and we mandated that either:
>
> - kernel is entered at EL2 on all CPUs
> - cntvoff_el2 is zeroed on all CPUs
>
> and we've got most people to fix their firmware, or live with the
> consequences. If these machines cannot receive a non-broken firmware,
> what are the odds that they will receive a mainline kernel?

Well, I know that the firmware is broken, but I cannot do anything about it.
On the other hand updating kernel is still possible and mainline runs fine
on TM2(e) boards. I will send v2 without this patch then.

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


WARNING: multiple messages have this Message-ID (diff)
From: m.szyprowski@samsung.com (Marek Szyprowski)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/7] clocksource: arch_timer: Add support for not-fw-configured timer on ARM64
Date: Mon, 15 Oct 2018 14:12:42 +0200	[thread overview]
Message-ID: <20181015121243eucas1p1dd6093945310db315fc28092e2c91b6e~dxxpPrR4A1710517105eucas1p1W@eucas1p1.samsung.com> (raw)
In-Reply-To: <e9624612-4a94-b9bc-f5ec-0f16d5b12323@arm.com>

Hi All,

On 2018-10-08 15:17, Marc Zyngier wrote:
> + Mark Rutland
>
> Hi Marek,
>
> On 08/10/18 13:50, Marek Szyprowski wrote:
>> Use common infrastructure for ARM Architected Timers erratum to enable
>> support for systems with broken CPU firmware (timer registers not
>> properly configured). This mode has been already availabled on ARM
>> (32bits) architecture. This enables to run Linux kernel on ARM64 boards
>> using physical architected timers instead of the virtual ones. Examples
>> of such system with broken firmware are Samsung Exynos5433 SoC based
>> TM2(e) boards, which is already deployed for years and updating firmware
>> is not possible.
>>
>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>> ---
>> ? drivers/clocksource/Kconfig????????? | 11 +++++++++++
>> ? drivers/clocksource/arm_arch_timer.c | 15 ++++++++++++---
>> ? 2 files changed, 23 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
>> index a11f4ba98b05..a30752579b03 100644
>> --- a/drivers/clocksource/Kconfig
>> +++ b/drivers/clocksource/Kconfig
>> @@ -364,6 +364,17 @@ config ARM64_ERRATUM_858921
>> ??????? The workaround will be dynamically enabled when an affected
>> ??????? core is detected.
>> ? +config ARCH_TIMER_REGISTERS_NOT_FW_CONFIGURED
>> +??? bool "Workaround for arch timer registers not configured by
>> firmware"
>> +??? default y
>> +??? select ARM_ARCH_TIMER_OOL_WORKAROUND
>> +??? depends on ARM_ARCH_TIMER && ARM64
>> +??? help
>> +????? This option enables a workaround for boards, on which arch timer
>> +????? registers are not properly configured by the board firmware.
>> +????? The workaround will be dynamically enabled when an affected
>> +????? board is detected.
>> +
>
> I'm sorry, but I'm strongly pushing back on this.
>
> This horrible hack was accepted with the express condition that it
> would be limited to ARMv7 platforms (on the ground that we never
> really documented the arch timer boot requirements on that version of
> the architecture), and would never proliferate on arm64. From day 1,
> we established what the boot protocol was, and we mandated that either:
>
> - kernel is entered at EL2 on all CPUs
> - cntvoff_el2 is zeroed on all CPUs
>
> and we've got most people to fix their firmware, or live with the
> consequences. If these machines cannot receive a non-broken firmware,
> what are the odds that they will receive a mainline kernel?

Well, I know that the firmware is broken, but I cannot do anything about it.
On the other hand updating kernel is still possible and mainline runs fine
on TM2(e) boards. I will send v2 without this patch then.

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

  reply	other threads:[~2018-10-15 12:12 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20181008125045eucas1p12e1d77f5f605556d4cf6c3b87832fae3@eucas1p1.samsung.com>
2018-10-08 12:50 ` [PATCH 0/7] Proper arch timer support for Exynos5433-based TM2(e) boards Marek Szyprowski
2018-10-08 12:50   ` Marek Szyprowski
     [not found]   ` <CGME20181008125046eucas1p1e0304c8c22a4ac128a8e507c86442a37@eucas1p1.samsung.com>
2018-10-08 12:50     ` [PATCH 1/7] clocksource: exynos_mct: Remove dead code Marek Szyprowski
2018-10-08 12:50       ` Marek Szyprowski
2018-10-09  8:11       ` Krzysztof Kozlowski
2018-10-09  8:11         ` Krzysztof Kozlowski
     [not found]   ` <CGME20181008125047eucas1p23e520d778ad5f18aba57b21641d4cb4c@eucas1p2.samsung.com>
2018-10-08 12:50     ` [PATCH 2/7] clocksource: exynos_mct: Add arch_timer cooperation mode for ARM64 Marek Szyprowski
2018-10-08 12:50       ` Marek Szyprowski
2018-10-09  8:19       ` Krzysztof Kozlowski
2018-10-09  8:19         ` Krzysztof Kozlowski
     [not found]   ` <CGME20181008125047eucas1p1bbd0c4759612b6df8fbe25f759e03130@eucas1p1.samsung.com>
2018-10-08 12:50     ` [PATCH 3/7] clocksource: Change CPU hotplug priority of exynos_mct driver Marek Szyprowski
2018-10-08 12:50       ` Marek Szyprowski
2018-10-09  8:19       ` Krzysztof Kozlowski
2018-10-09  8:19         ` Krzysztof Kozlowski
     [not found]   ` <CGME20181008125048eucas1p229a94c202596ddd0a65009c15d9e3001@eucas1p2.samsung.com>
2018-10-08 12:50     ` [PATCH 4/7] clocksource: arch_timer: Add support for not-fw-configured timer on ARM64 Marek Szyprowski
2018-10-08 12:50       ` Marek Szyprowski
2018-10-08 13:17       ` Marc Zyngier
2018-10-08 13:17         ` Marc Zyngier
2018-10-15 12:12         ` Marek Szyprowski [this message]
2018-10-15 12:12           ` Marek Szyprowski
2018-10-15 12:27           ` Daniel Lezcano
2018-10-15 12:27             ` Daniel Lezcano
     [not found]   ` <CGME20181008125049eucas1p21a186cd652f968a3609987d4dee2427f@eucas1p2.samsung.com>
2018-10-08 12:50     ` [PATCH 5/7] arm64: dts: exynos: Move arch-timer node to right place Marek Szyprowski
2018-10-08 12:50       ` Marek Szyprowski
     [not found]   ` <CGME20181008125050eucas1p1caae30a4e791190e6c731816e36832ab@eucas1p1.samsung.com>
2018-10-08 12:50     ` [PATCH 6/7] arm64: dts: exynos: Mark arch_timer device as not-fw-configured on TM2(e) Marek Szyprowski
2018-10-08 12:50       ` Marek Szyprowski
     [not found]   ` <CGME20181008125050eucas1p2da1c1ace904a331c149f5add71c72af2@eucas1p2.samsung.com>
2018-10-08 12:50     ` [PATCH 7/7] arm64: platform: Add enable Exynos Multi-Core Timer driver Marek Szyprowski
2018-10-08 12:50       ` Marek Szyprowski

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='20181015121243eucas1p1dd6093945310db315fc28092e2c91b6e~dxxpPrR4A1710517105eucas1p1W@eucas1p1.samsung.com' \
    --to=m.szyprowski@samsung.com \
    --cc=Mark.Rutland@arm.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=catalin.marinas@arm.com \
    --cc=cw00.choi@samsung.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=inki.dae@samsung.com \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=tglx@linutronix.de \
    --cc=will.deacon@arm.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.