From: Mark Rutland <mark.rutland@arm.com>
To: fu.wei@linaro.org
Cc: rjw@rjwysocki.net, lenb@kernel.org, daniel.lezcano@linaro.org,
tglx@linutronix.de, marc.zyngier@arm.com,
lorenzo.pieralisi@arm.com, sudeep.holla@arm.com,
hanjun.guo@linaro.org, linux-arm-kernel@lists.infradead.org,
linaro-acpi@lists.linaro.org, linux-kernel@vger.kernel.org,
linux-acpi@vger.kernel.org, rruigrok@codeaurora.org,
harba@codeaurora.org, cov@codeaurora.org, timur@codeaurora.org,
graeme.gregory@linaro.org, al.stone@linaro.org, jcm@redhat.com,
wei@redhat.com, arnd@arndb.de, catalin.marinas@arm.com,
will.deacon@arm.com, Suravee.Suthikulpanit@amd.com,
leo.duran@amd.com, wim@iguana.be, linux@roeck-us.net,
linux-watchdog@vger.kernel.org, tn@semihalf.com,
christoffer.dall@linaro.org, julien.grall@arm.com
Subject: Re: [PATCH v16 05/15] clocksource/drivers/arm_arch_timer: fix a bug in arch_timer_register about arch_timer_uses_ppi
Date: Fri, 18 Nov 2016 18:52:52 +0000 [thread overview]
Message-ID: <20161118185252.GI1197@leverpostej> (raw)
In-Reply-To: <1479304148-2965-6-git-send-email-fu.wei@linaro.org>
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
>
WARNING: multiple messages have this Message-ID (diff)
From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v16 05/15] clocksource/drivers/arm_arch_timer: fix a bug in arch_timer_register about arch_timer_uses_ppi
Date: Fri, 18 Nov 2016 18:52:52 +0000 [thread overview]
Message-ID: <20161118185252.GI1197@leverpostej> (raw)
In-Reply-To: <1479304148-2965-6-git-send-email-fu.wei@linaro.org>
On Wed, Nov 16, 2016 at 09:48:58PM +0800, fu.wei at 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
>
next prev parent reply other threads:[~2016-11-18 18:53 UTC|newest]
Thread overview: 96+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-16 13:48 [PATCH v16 00/15] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer fu.wei
2016-11-16 13:48 ` fu.wei at linaro.org
2016-11-16 13:48 ` [PATCH v16 01/15] clocksource/drivers/arm_arch_timer: Move enums and defines to header file fu.wei
2016-11-16 13:48 ` fu.wei at linaro.org
2016-11-16 13:48 ` [PATCH v16 02/15] clocksource/drivers/arm_arch_timer: Add a new enum for spi type fu.wei
2016-11-16 13:48 ` fu.wei at linaro.org
2016-11-16 13:48 ` [PATCH v16 03/15] clocksource/drivers/arm_arch_timer: Improve printk relevant code fu.wei
2016-11-16 13:48 ` fu.wei at linaro.org
2016-11-16 13:48 ` [PATCH v16 04/15] clocksource/drivers/arm_arch_timer: rename some enums and defines, and some cleanups fu.wei
2016-11-16 13:48 ` fu.wei at linaro.org
2016-11-18 18:49 ` Mark Rutland
2016-11-18 18:49 ` Mark Rutland
2016-11-21 6:11 ` Fu Wei
2016-11-21 6:11 ` Fu Wei
2016-11-21 6:11 ` Fu Wei
2016-11-16 13:48 ` [PATCH v16 05/15] clocksource/drivers/arm_arch_timer: fix a bug in arch_timer_register about arch_timer_uses_ppi fu.wei
2016-11-16 13:48 ` fu.wei at linaro.org
2016-11-18 18:52 ` Mark Rutland [this message]
2016-11-18 18:52 ` Mark Rutland
2016-11-21 7:32 ` Fu Wei
2016-11-21 7:32 ` Fu Wei
2016-11-21 7:32 ` Fu Wei
2016-11-16 13:48 ` [PATCH v16 06/15] clocksource/drivers/arm_arch_timer: separate out arch_timer_uses_ppi init code to prepare for GTDT fu.wei
2016-11-16 13:48 ` fu.wei at linaro.org
[not found] ` <1479304148-2965-7-git-send-email-fu.wei-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-11-18 19:30 ` Mark Rutland
2016-11-18 19:30 ` Mark Rutland
2016-11-18 19:30 ` Mark Rutland
2016-11-21 9:45 ` Fu Wei
2016-11-21 9:45 ` Fu Wei
2016-11-21 9:45 ` Fu Wei
[not found] ` <1479304148-2965-1-git-send-email-fu.wei-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-11-16 13:49 ` [PATCH v16 07/15] clocksource/drivers/arm_arch_timer: Refactor arch_timer_detect_rate to keep dt code in *_of_init fu.wei-QSEj5FYQhm4dnm+yROfE0A
2016-11-16 13:49 ` fu.wei at linaro.org
2016-11-16 13:49 ` fu.wei
2016-11-18 19:52 ` Mark Rutland
2016-11-18 19:52 ` Mark Rutland
2016-11-21 14:08 ` Fu Wei
2016-11-21 14:08 ` Fu Wei
2016-11-21 14:08 ` Fu Wei
2016-11-16 13:49 ` [PATCH v16 08/15] clocksource/drivers/arm_arch_timer: Refactor arch_timer_needs_probing, and call it only if acpi disabled fu.wei
2016-11-16 13:49 ` fu.wei at linaro.org
2016-11-18 19:56 ` Mark Rutland
2016-11-18 19:56 ` Mark Rutland
2016-11-21 14:38 ` Fu Wei
2016-11-21 14:38 ` Fu Wei
2016-11-21 14:38 ` Fu Wei
2016-11-16 13:49 ` [PATCH v16 09/15] clocksource/drivers/arm_arch_timer: Introduce some new structs to prepare for GTDT fu.wei
2016-11-16 13:49 ` fu.wei at linaro.org
2016-11-16 13:49 ` [PATCH v16 10/15] clocksource/drivers/arm_arch_timer: Refactor the timer init code " fu.wei
2016-11-16 13:49 ` fu.wei at linaro.org
2016-11-18 20:03 ` Mark Rutland
2016-11-18 20:03 ` Mark Rutland
2016-11-23 6:10 ` Fu Wei
2016-11-23 6:10 ` Fu Wei
2016-11-23 6:10 ` Fu Wei
2016-11-16 13:49 ` [PATCH v16 11/15] acpi/arm64: Add GTDT table parse driver fu.wei
2016-11-16 13:49 ` fu.wei at linaro.org
2016-11-18 20:12 ` Mark Rutland
2016-11-18 20:12 ` Mark Rutland
2016-11-23 12:06 ` Fu Wei
2016-11-23 12:06 ` Fu Wei
2016-11-23 12:06 ` Fu Wei
2016-11-16 13:49 ` [PATCH v16 12/15] clocksource/drivers/arm_arch_timer: Simplify ACPI support code fu.wei
2016-11-16 13:49 ` fu.wei at linaro.org
2016-11-16 13:49 ` [PATCH v16 13/15] acpi/arm64: Add memory-mapped timer support in GTDT driver fu.wei
2016-11-16 13:49 ` fu.wei at linaro.org
2016-11-16 13:49 ` fu.wei
2016-11-18 14:22 ` Lorenzo Pieralisi
2016-11-18 14:22 ` Lorenzo Pieralisi
2016-11-18 14:22 ` Lorenzo Pieralisi
2016-11-23 11:53 ` Fu Wei
2016-11-23 11:53 ` Fu Wei
2016-11-23 11:53 ` Fu Wei
2016-11-24 3:57 ` Fu Wei
2016-11-24 3:57 ` Fu Wei
2016-11-24 3:57 ` Fu Wei
2016-11-16 13:49 ` [PATCH v16 14/15] clocksource/drivers/arm_arch_timer: Add GTDT support for memory-mapped timer fu.wei
2016-11-16 13:49 ` fu.wei at linaro.org
2016-11-18 20:20 ` Mark Rutland
2016-11-18 20:20 ` Mark Rutland
2016-11-23 12:15 ` Fu Wei
2016-11-23 12:15 ` Fu Wei
2016-11-23 12:15 ` Fu Wei
2016-11-16 13:49 ` [PATCH v16 15/15] acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver fu.wei
2016-11-16 13:49 ` fu.wei at linaro.org
2016-11-16 13:49 ` fu.wei
2016-11-17 3:34 ` [PATCH v16 00/15] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer Xiongfeng Wang
2016-11-17 3:34 ` Xiongfeng Wang
2016-11-17 3:34 ` Xiongfeng Wang
2016-11-17 9:25 ` Xiongfeng Wang
2016-11-17 9:25 ` Xiongfeng Wang
2016-11-17 9:25 ` Xiongfeng Wang
2016-11-17 11:13 ` Fu Wei
2016-11-17 11:13 ` Fu Wei
2016-11-17 11:13 ` Fu Wei
2016-11-17 9:47 ` Daniel Lezcano
2016-11-17 9:47 ` Daniel Lezcano
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=20161118185252.GI1197@leverpostej \
--to=mark.rutland@arm.com \
--cc=Suravee.Suthikulpanit@amd.com \
--cc=al.stone@linaro.org \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=christoffer.dall@linaro.org \
--cc=cov@codeaurora.org \
--cc=daniel.lezcano@linaro.org \
--cc=fu.wei@linaro.org \
--cc=graeme.gregory@linaro.org \
--cc=hanjun.guo@linaro.org \
--cc=harba@codeaurora.org \
--cc=jcm@redhat.com \
--cc=julien.grall@arm.com \
--cc=lenb@kernel.org \
--cc=leo.duran@amd.com \
--cc=linaro-acpi@lists.linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=lorenzo.pieralisi@arm.com \
--cc=marc.zyngier@arm.com \
--cc=rjw@rjwysocki.net \
--cc=rruigrok@codeaurora.org \
--cc=sudeep.holla@arm.com \
--cc=tglx@linutronix.de \
--cc=timur@codeaurora.org \
--cc=tn@semihalf.com \
--cc=wei@redhat.com \
--cc=will.deacon@arm.com \
--cc=wim@iguana.be \
/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.