[0/6,SRU,Zesty] Miscellaneous arm_arch_timer fixes

Message ID 20170830174128.32541-1-dann.frazier@canonical.com
State New
Headers show

Pull-request

git://git.launchpad.net/~dannf/ubuntu/+source/linux/+git/linux arm64-arch-timer-fixes-z

Message

dann frazier Aug. 30, 2017, 5:41 p.m.
BugLink: https://bugs.launchpad.net/bugs/1713821

I submitted an early version of the arm_arch_timer errata workaround series
back before zesty and, as promised[*], I've reviewed the changes that were
made to that series before landing to look for fixes we need to pick up.
One such fix was in this patch:
 "arm64: arch_timer: Enable CNTVCT_EL0 trap if workaround is enabled"
which could break the trapping if the user access bit was set at reset.
For that, I've reverted the early version and replaced it with the upstream
cherry-pick.

Another was in this patch:
 "arm64: arch_timer: Allows a CPU-specific erratum to only affect a subset of CPUs"
Which, while it doesn't impact Ubuntu today, could if we were to enable
CNOFIG_PREEMPT_TRACER.

We're also carrying a backport of the series that enables the SBSA
watchdog driver - there have been a few fixes to it since it was
merged, and those are included here as well.

[*] https://lists.ubuntu.com/archives/kernel-team/2017-March/083134.html

The following changes since commit 1bfb6eb7ecd64066f0ff2e2a5990ac6bbded1816:

  UBUNTU: Ubuntu-4.10.0-34.38 (2017-08-28 10:41:02 -0300)

are available in the git repository at:

  git://git.launchpad.net/~dannf/ubuntu/+source/linux/+git/linux arm64-arch-timer-fixes-z

for you to fetch changes up to 5c7cce8036222550a599ed584dce0aa5c6f314a1:

  clocksource/drivers/arm_arch_timer: Avoid infinite recursion when ftrace is enabled (2017-08-29 16:57:42 -0600)

----------------------------------------------------------------
Ding Tianhong (1):
      clocksource/drivers/arm_arch_timer: Avoid infinite recursion when ftrace is enabled

Frank Rowand (1):
      clocksource/drivers/arm_arch_timer: Fix read and iounmap of incorrect variable

Marc Zyngier (1):
      arm64: arch_timer: Enable CNTVCT_EL0 trap if workaround is enabled

Matthias Kaehlcke (1):
      clocksource/drivers/arm_arch_timer: Fix mem frame loop initialization

Sudeep Holla (1):
      clocksource/arm_arch_timer: Fix arch_timer_mem_find_best_frame()

dann frazier (1):
      Revert "UBUNTU: SAUCE: arm64: arch_timer: Enable CNTVCT_EL0 trap if workaround is enabled"

 arch/arm64/include/asm/arch_timer.h  |  4 ++--
 drivers/clocksource/arm_arch_timer.c | 11 ++++++-----
 2 files changed, 8 insertions(+), 7 deletions(-)

Comments

Stefan Bader Sept. 5, 2017, 12:26 p.m. | #1
On 30.08.2017 19:41, dann frazier wrote:
> BugLink: https://bugs.launchpad.net/bugs/1713821
> 
> I submitted an early version of the arm_arch_timer errata workaround series
> back before zesty and, as promised[*], I've reviewed the changes that were
> made to that series before landing to look for fixes we need to pick up.
> One such fix was in this patch:
>  "arm64: arch_timer: Enable CNTVCT_EL0 trap if workaround is enabled"
> which could break the trapping if the user access bit was set at reset.
> For that, I've reverted the early version and replaced it with the upstream
> cherry-pick.
> 
> Another was in this patch:
>  "arm64: arch_timer: Allows a CPU-specific erratum to only affect a subset of CPUs"
> Which, while it doesn't impact Ubuntu today, could if we were to enable
> CNOFIG_PREEMPT_TRACER.
> 
> We're also carrying a backport of the series that enables the SBSA
> watchdog driver - there have been a few fixes to it since it was
> merged, and those are included here as well.
> 
> [*] https://lists.ubuntu.com/archives/kernel-team/2017-March/083134.html
> 
> The following changes since commit 1bfb6eb7ecd64066f0ff2e2a5990ac6bbded1816:
> 
>   UBUNTU: Ubuntu-4.10.0-34.38 (2017-08-28 10:41:02 -0300)
> 
> are available in the git repository at:
> 
>   git://git.launchpad.net/~dannf/ubuntu/+source/linux/+git/linux arm64-arch-timer-fixes-z
> 
> for you to fetch changes up to 5c7cce8036222550a599ed584dce0aa5c6f314a1:
> 
>   clocksource/drivers/arm_arch_timer: Avoid infinite recursion when ftrace is enabled (2017-08-29 16:57:42 -0600)
> 
> ----------------------------------------------------------------
> Ding Tianhong (1):
>       clocksource/drivers/arm_arch_timer: Avoid infinite recursion when ftrace is enabled
> 
> Frank Rowand (1):
>       clocksource/drivers/arm_arch_timer: Fix read and iounmap of incorrect variable
> 
> Marc Zyngier (1):
>       arm64: arch_timer: Enable CNTVCT_EL0 trap if workaround is enabled
> 
> Matthias Kaehlcke (1):
>       clocksource/drivers/arm_arch_timer: Fix mem frame loop initialization
> 
> Sudeep Holla (1):
>       clocksource/arm_arch_timer: Fix arch_timer_mem_find_best_frame()
> 
> dann frazier (1):
>       Revert "UBUNTU: SAUCE: arm64: arch_timer: Enable CNTVCT_EL0 trap if workaround is enabled"
> 
>  arch/arm64/include/asm/arch_timer.h  |  4 ++--
>  drivers/clocksource/arm_arch_timer.c | 11 ++++++-----
>  2 files changed, 8 insertions(+), 7 deletions(-)
> 
Acked-by: Stefan Bader <stefan.bader@canonical.com>

Changes restricted to specific arch code which can be verified.
Colin King Sept. 5, 2017, 12:43 p.m. | #2
On 30/08/17 18:41, dann frazier wrote:
> BugLink: https://bugs.launchpad.net/bugs/1713821
> 
> I submitted an early version of the arm_arch_timer errata workaround series
> back before zesty and, as promised[*], I've reviewed the changes that were
> made to that series before landing to look for fixes we need to pick up.
> One such fix was in this patch:
>  "arm64: arch_timer: Enable CNTVCT_EL0 trap if workaround is enabled"
> which could break the trapping if the user access bit was set at reset.
> For that, I've reverted the early version and replaced it with the upstream
> cherry-pick.
> 
> Another was in this patch:
>  "arm64: arch_timer: Allows a CPU-specific erratum to only affect a subset of CPUs"
> Which, while it doesn't impact Ubuntu today, could if we were to enable
> CNOFIG_PREEMPT_TRACER.
> 
> We're also carrying a backport of the series that enables the SBSA
> watchdog driver - there have been a few fixes to it since it was
> merged, and those are included here as well.
> 
> [*] https://lists.ubuntu.com/archives/kernel-team/2017-March/083134.html
> 
> The following changes since commit 1bfb6eb7ecd64066f0ff2e2a5990ac6bbded1816:
> 
>   UBUNTU: Ubuntu-4.10.0-34.38 (2017-08-28 10:41:02 -0300)
> 
> are available in the git repository at:
> 
>   git://git.launchpad.net/~dannf/ubuntu/+source/linux/+git/linux arm64-arch-timer-fixes-z
> 
> for you to fetch changes up to 5c7cce8036222550a599ed584dce0aa5c6f314a1:
> 
>   clocksource/drivers/arm_arch_timer: Avoid infinite recursion when ftrace is enabled (2017-08-29 16:57:42 -0600)
> 
> ----------------------------------------------------------------
> Ding Tianhong (1):
>       clocksource/drivers/arm_arch_timer: Avoid infinite recursion when ftrace is enabled
> 
> Frank Rowand (1):
>       clocksource/drivers/arm_arch_timer: Fix read and iounmap of incorrect variable
> 
> Marc Zyngier (1):
>       arm64: arch_timer: Enable CNTVCT_EL0 trap if workaround is enabled
> 
> Matthias Kaehlcke (1):
>       clocksource/drivers/arm_arch_timer: Fix mem frame loop initialization
> 
> Sudeep Holla (1):
>       clocksource/arm_arch_timer: Fix arch_timer_mem_find_best_frame()
> 
> dann frazier (1):
>       Revert "UBUNTU: SAUCE: arm64: arch_timer: Enable CNTVCT_EL0 trap if workaround is enabled"
> 
>  arch/arm64/include/asm/arch_timer.h  |  4 ++--
>  drivers/clocksource/arm_arch_timer.c | 11 ++++++-----
>  2 files changed, 8 insertions(+), 7 deletions(-)
> 

These are limited to a single arch and are verifiable. All seem
reasonable fixes to me. Thanks Dann.

Acked-by: Colin Ian King <colin.king@canonical.com>
Stefan Bader Sept. 15, 2017, 12:34 p.m. | #3
On 30.08.2017 19:41, dann frazier wrote:
> BugLink: https://bugs.launchpad.net/bugs/1713821
> 
> I submitted an early version of the arm_arch_timer errata workaround series
> back before zesty and, as promised[*], I've reviewed the changes that were
> made to that series before landing to look for fixes we need to pick up.
> One such fix was in this patch:
>  "arm64: arch_timer: Enable CNTVCT_EL0 trap if workaround is enabled"
> which could break the trapping if the user access bit was set at reset.
> For that, I've reverted the early version and replaced it with the upstream
> cherry-pick.
> 
> Another was in this patch:
>  "arm64: arch_timer: Allows a CPU-specific erratum to only affect a subset of CPUs"
> Which, while it doesn't impact Ubuntu today, could if we were to enable
> CNOFIG_PREEMPT_TRACER.
> 
> We're also carrying a backport of the series that enables the SBSA
> watchdog driver - there have been a few fixes to it since it was
> merged, and those are included here as well.
> 
> [*] https://lists.ubuntu.com/archives/kernel-team/2017-March/083134.html
> 
> The following changes since commit 1bfb6eb7ecd64066f0ff2e2a5990ac6bbded1816:
> 
>   UBUNTU: Ubuntu-4.10.0-34.38 (2017-08-28 10:41:02 -0300)
> 
> are available in the git repository at:
> 
>   git://git.launchpad.net/~dannf/ubuntu/+source/linux/+git/linux arm64-arch-timer-fixes-z
> 
> for you to fetch changes up to 5c7cce8036222550a599ed584dce0aa5c6f314a1:
> 
>   clocksource/drivers/arm_arch_timer: Avoid infinite recursion when ftrace is enabled (2017-08-29 16:57:42 -0600)
> 
> ----------------------------------------------------------------
> Ding Tianhong (1):
>       clocksource/drivers/arm_arch_timer: Avoid infinite recursion when ftrace is enabled
> 
> Frank Rowand (1):
>       clocksource/drivers/arm_arch_timer: Fix read and iounmap of incorrect variable
> 
> Marc Zyngier (1):
>       arm64: arch_timer: Enable CNTVCT_EL0 trap if workaround is enabled
> 
> Matthias Kaehlcke (1):
>       clocksource/drivers/arm_arch_timer: Fix mem frame loop initialization
> 
> Sudeep Holla (1):
>       clocksource/arm_arch_timer: Fix arch_timer_mem_find_best_frame()
> 
> dann frazier (1):
>       Revert "UBUNTU: SAUCE: arm64: arch_timer: Enable CNTVCT_EL0 trap if workaround is enabled"
> 
>  arch/arm64/include/asm/arch_timer.h  |  4 ++--
>  drivers/clocksource/arm_arch_timer.c | 11 ++++++-----
>  2 files changed, 8 insertions(+), 7 deletions(-)
> 
Applied to master-next