Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1525654

Re: [PATCH v16 05/15] clocksource/drivers/arm_arch_timer: fix a bug in arch_timer_register about arch_timer_uses_ppi

From Mark Rutland <mark.rutland@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH v16 05/15] clocksource/drivers/arm_arch_timer: fix a bug in arch_timer_register about arch_timer_uses_ppi
Date 2016-11-18 20:00 +0100
Message-ID <sEWyf-2tW-59@gated-at.bofh.it> (permalink)
References <sE8L7-3uw-15@gated-at.bofh.it> <sE8UP-3xZ-63@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Nov 16, 2016 at 09:48:58PM +0800, fu.wei@linaro.org wrote:
> From: Fu Wei <fu.wei@linaro.org>
> 
> The patch fix a potential bug about arch_timer_uses_ppi in
> arch_timer_register.
> On ARM64, we don't use ARCH_TIMER_PHYS_SECURE_PPI in Linux, so we will
> just igorne it in init code. 

That's not currently the case. I assume you mean we will in later
patches? If so, please make that clear in the commit message.

> If arch_timer_uses_ppi is ARCH_TIMER_PHYS_NONSECURE_PPI, the orignal
> code of arch_timer_uses_ppi may go wrong.

How? What specifically happens?

We don't currently assign ARCH_TIMER_PHYS_NONSECURE_PPI to
arch_timer_uses_ppi, so I assume a later patch changes this. This change
should be folded into said patch; it doesn't make sense in isolation.

Thanks,
Mark.

> Signed-off-by: Fu Wei <fu.wei@linaro.org>
> ---
>  drivers/clocksource/arm_arch_timer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
> index dd1040d..6de164f 100644
> --- a/drivers/clocksource/arm_arch_timer.c
> +++ b/drivers/clocksource/arm_arch_timer.c
> @@ -699,7 +699,7 @@ static int __init arch_timer_register(void)
>  	case ARCH_TIMER_PHYS_NONSECURE_PPI:
>  		err = request_percpu_irq(ppi, arch_timer_handler_phys,
>  					 "arch_timer", arch_timer_evt);
> -		if (!err && arch_timer_ppi[ARCH_TIMER_PHYS_NONSECURE_PPI]) {
> +		if (!err && arch_timer_has_nonsecure_ppi()) {
>  			ppi = arch_timer_ppi[ARCH_TIMER_PHYS_NONSECURE_PPI];
>  			err = request_percpu_irq(ppi, arch_timer_handler_phys,
>  						 "arch_timer", arch_timer_evt);
> -- 
> 2.7.4
> 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v16 00/15] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer fu.wei@linaro.org - 2016-11-16 14:50 +0100
  [PATCH v16 07/15] clocksource/drivers/arm_arch_timer: Refactor arch_timer_detect_rate to keep dt code in *_of_init fu.wei@linaro.org - 2016-11-16 15:00 +0100
    Re: [PATCH v16 07/15] clocksource/drivers/arm_arch_timer: Refactor  arch_timer_detect_rate to keep dt code in *_of_init Mark Rutland <mark.rutland@arm.com> - 2016-11-18 21:00 +0100
      Re: [PATCH v16 07/15] clocksource/drivers/arm_arch_timer: Refactor  arch_timer_detect_rate to keep dt code in *_of_init Fu Wei <fu.wei@linaro.org> - 2016-11-21 15:10 +0100
  [PATCH v16 12/15] clocksource/drivers/arm_arch_timer: Simplify ACPI support code. fu.wei@linaro.org - 2016-11-16 15:00 +0100
  [PATCH v16 13/15] acpi/arm64: Add memory-mapped timer support in GTDT driver fu.wei@linaro.org - 2016-11-16 15:00 +0100
    Re: [PATCH v16 13/15] acpi/arm64: Add memory-mapped timer support in  GTDT driver Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2016-11-18 15:30 +0100
      Re: [PATCH v16 13/15] acpi/arm64: Add memory-mapped timer support in  GTDT driver Fu Wei <fu.wei@linaro.org> - 2016-11-23 13:00 +0100
        Re: [PATCH v16 13/15] acpi/arm64: Add memory-mapped timer support in  GTDT driver Fu Wei <fu.wei@linaro.org> - 2016-11-24 05:00 +0100
  [PATCH v16 10/15] clocksource/drivers/arm_arch_timer: Refactor the timer init code to prepare for GTDT fu.wei@linaro.org - 2016-11-16 15:00 +0100
    Re: [PATCH v16 10/15] clocksource/drivers/arm_arch_timer: Refactor  the timer init code to prepare for GTDT Mark Rutland <mark.rutland@arm.com> - 2016-11-18 21:10 +0100
      Re: [PATCH v16 10/15] clocksource/drivers/arm_arch_timer: Refactor  the timer init code to prepare for GTDT Fu Wei <fu.wei@linaro.org> - 2016-11-23 07:20 +0100
  [PATCH v16 11/15] acpi/arm64: Add GTDT table parse driver fu.wei@linaro.org - 2016-11-16 15:00 +0100
    Re: [PATCH v16 11/15] acpi/arm64: Add GTDT table parse driver Mark Rutland <mark.rutland@arm.com> - 2016-11-18 21:20 +0100
      Re: [PATCH v16 11/15] acpi/arm64: Add GTDT table parse driver Fu Wei <fu.wei@linaro.org> - 2016-11-23 13:10 +0100
  [PATCH v16 04/15] clocksource/drivers/arm_arch_timer: rename some enums and defines, and some cleanups. fu.wei@linaro.org - 2016-11-16 15:00 +0100
    Re: [PATCH v16 04/15] clocksource/drivers/arm_arch_timer: rename  some enums and defines, and some cleanups. Mark Rutland <mark.rutland@arm.com> - 2016-11-18 20:00 +0100
      Re: [PATCH v16 04/15] clocksource/drivers/arm_arch_timer: rename some  enums and defines, and some cleanups. Fu Wei <fu.wei@linaro.org> - 2016-11-21 07:20 +0100
  [PATCH v16 01/15] clocksource/drivers/arm_arch_timer: Move enums and defines to header file fu.wei@linaro.org - 2016-11-16 15:00 +0100
  [PATCH v16 15/15] acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver fu.wei@linaro.org - 2016-11-16 15:00 +0100
  [PATCH v16 14/15] clocksource/drivers/arm_arch_timer: Add GTDT support for memory-mapped timer fu.wei@linaro.org - 2016-11-16 15:00 +0100
    Re: [PATCH v16 14/15] clocksource/drivers/arm_arch_timer: Add GTDT  support for memory-mapped timer Mark Rutland <mark.rutland@arm.com> - 2016-11-18 21:30 +0100
      Re: [PATCH v16 14/15] clocksource/drivers/arm_arch_timer: Add GTDT  support for memory-mapped timer Fu Wei <fu.wei@linaro.org> - 2016-11-23 13:20 +0100
  [PATCH v16 08/15] clocksource/drivers/arm_arch_timer: Refactor arch_timer_needs_probing, and call it only if acpi disabled. fu.wei@linaro.org - 2016-11-16 15:00 +0100
    Re: [PATCH v16 08/15] clocksource/drivers/arm_arch_timer: Refactor  arch_timer_needs_probing, and call it only if acpi disabled. Mark Rutland <mark.rutland@arm.com> - 2016-11-18 21:00 +0100
      Re: [PATCH v16 08/15] clocksource/drivers/arm_arch_timer: Refactor  arch_timer_needs_probing, and call it only if acpi disabled. Fu Wei <fu.wei@linaro.org> - 2016-11-21 15:40 +0100
  [PATCH v16 06/15] clocksource/drivers/arm_arch_timer: separate out arch_timer_uses_ppi init code to prepare for GTDT. fu.wei@linaro.org - 2016-11-16 15:00 +0100
    Re: [PATCH v16 06/15] clocksource/drivers/arm_arch_timer: separate  out arch_timer_uses_ppi init code to prepare for GTDT. Mark Rutland <mark.rutland@arm.com> - 2016-11-18 20:40 +0100
      Re: [PATCH v16 06/15] clocksource/drivers/arm_arch_timer: separate  out arch_timer_uses_ppi init code to prepare for GTDT. Fu Wei <fu.wei@linaro.org> - 2016-11-21 10:50 +0100
  [PATCH v16 03/15] clocksource/drivers/arm_arch_timer: Improve printk relevant code fu.wei@linaro.org - 2016-11-16 15:00 +0100
  [PATCH v16 02/15] clocksource/drivers/arm_arch_timer: Add a new enum for spi type fu.wei@linaro.org - 2016-11-16 15:00 +0100
  [PATCH v16 09/15] clocksource/drivers/arm_arch_timer: Introduce some new structs to prepare for GTDT fu.wei@linaro.org - 2016-11-16 15:00 +0100
  [PATCH v16 05/15] clocksource/drivers/arm_arch_timer: fix a bug in arch_timer_register about arch_timer_uses_ppi fu.wei@linaro.org - 2016-11-16 15:00 +0100
    Re: [PATCH v16 05/15] clocksource/drivers/arm_arch_timer: fix a bug  in arch_timer_register about arch_timer_uses_ppi Mark Rutland <mark.rutland@arm.com> - 2016-11-18 20:00 +0100
      Re: [PATCH v16 05/15] clocksource/drivers/arm_arch_timer: fix a bug  in arch_timer_register about arch_timer_uses_ppi Fu Wei <fu.wei@linaro.org> - 2016-11-21 08:40 +0100
  Re: [PATCH v16 00/15] acpi, clocksource: add GTDT driver and GTDT  support in arm_arch_timer Xiongfeng Wang <wangxiongfeng2@huawei.com> - 2016-11-17 04:50 +0100
    Re: [PATCH v16 00/15] acpi, clocksource: add GTDT driver and GTDT  support in arm_arch_timer Xiongfeng Wang <wangxiongfeng2@huawei.com> - 2016-11-17 10:40 +0100
      Re: [PATCH v16 00/15] acpi, clocksource: add GTDT driver and GTDT  support in arm_arch_timer Fu Wei <fu.wei@linaro.org> - 2016-11-17 12:20 +0100
  Re: [PATCH v16 00/15] acpi, clocksource: add GTDT driver and GTDT  support in arm_arch_timer Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-11-17 10:50 +0100

csiph-web