Re: [PATCH] clocksource: fix read and iounmap of incorrect variable

2017-06-09 Thread Fu Wei
ess frame > instead of address ioremap(frame->cntbase). > > Fixes: c389d701dfb70 ("clocksource: arm_arch_timer: split MMIO timer > probing.") > > Signed-off-by: Frank Rowand <frank.row...@sony.com> Reviewed-by: Fu Wei <fu@linaro.org> > --- > &g

Re: [PATCH] clocksource: fix read and iounmap of incorrect variable

2017-06-09 Thread Fu Wei
->cntbase). > > Fixes: c389d701dfb70 ("clocksource: arm_arch_timer: split MMIO timer > probing.") > > Signed-off-by: Frank Rowand Reviewed-by: Fu Wei > --- > > WARNING: CPU: 0 PID: 0 at mm/vmalloc.c:1514 iounmap+0x14/0x18 > Trying to vfree() nonexistent vm area (e

Re: [GIT PULL 00/16] clocksource: arm_arch_timer: GTDT-based MMIO timer support

2017-04-20 Thread Fu Wei
which >> > have now been addressed. > >> Hi Thomas, >> >> the series is ok for me. Is it possible to pull these changes directly in >> tip/timers/core? > > The tip-bot tells me it was. > > Many thanks for picking these up, it's much appreciated. Great

Re: [GIT PULL 00/16] clocksource: arm_arch_timer: GTDT-based MMIO timer support

2017-04-20 Thread Fu Wei
een addressed. > >> Hi Thomas, >> >> the series is ok for me. Is it possible to pull these changes directly in >> tip/timers/core? > > The tip-bot tells me it was. > > Many thanks for picking these up, it's much appreciated. Great thanks to all of you, I very appreciate all the help and suggestion from you :-) > > Mark. -- Best regards, Fu Wei Software Engineer Red Hat

[PATCH v24 10/11] clocksource: arm_arch_timer: add GTDT support for memory-mapped timer

2017-04-14 Thread fu . wei
From: Fu Wei <fu@linaro.org> The patch add memory-mapped timer register support by using the information provided by the new GTDT driver of ACPI. Signed-off-by: Fu Wei <fu@linaro.org> Reviewed-by: Hanjun Guo <hanjun@linaro.org> [Mark: verify CNTFRQ, only regist

[PATCH v24 10/11] clocksource: arm_arch_timer: add GTDT support for memory-mapped timer

2017-04-14 Thread fu . wei
From: Fu Wei The patch add memory-mapped timer register support by using the information provided by the new GTDT driver of ACPI. Signed-off-by: Fu Wei Reviewed-by: Hanjun Guo [Mark: verify CNTFRQ, only register the first frame] Signed-off-by: Mark Rutland --- drivers/clocksource

[PATCH v24 11/11] acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver

2017-04-14 Thread fu . wei
From: Fu Wei <fu@linaro.org> This driver adds support for parsing SBSA Generic Watchdog timer in GTDT, parse all info in SBSA Generic Watchdog Structure in GTDT, and creating a platform device with that information. This allows the operating system to obtain device data from the re

[PATCH v24 11/11] acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver

2017-04-14 Thread fu . wei
From: Fu Wei This driver adds support for parsing SBSA Generic Watchdog timer in GTDT, parse all info in SBSA Generic Watchdog Structure in GTDT, and creating a platform device with that information. This allows the operating system to obtain device data from the resource of platform device

[PATCH v24 09/11] acpi/arm64: Add memory-mapped timer support in GTDT driver

2017-04-14 Thread fu . wei
From: Fu Wei <fu@linaro.org> On platforms booting with ACPI, architected memory-mapped timers' configuration data is provided by firmware through the ACPI GTDT static table. The clocksource architected timer kernel driver requires a firmware interface to collect timer configu

[PATCH v24 09/11] acpi/arm64: Add memory-mapped timer support in GTDT driver

2017-04-14 Thread fu . wei
From: Fu Wei On platforms booting with ACPI, architected memory-mapped timers' configuration data is provided by firmware through the ACPI GTDT static table. The clocksource architected timer kernel driver requires a firmware interface to collect timer configuration and configure its driver

[PATCH v24 08/11] acpi: Introduce acpi_unregister_irq function

2017-04-14 Thread fu . wei
From: Fu Wei <fu@linaro.org> This patch introduces acpi_unregister_irq function to free a linux IRQ number<->GSI mapping by a given linux IRQ number. Even we have successfully registered the GSI, when some error occurs, we may need to unmap it for freeing the IRQ resource. But i

[PATCH v24 08/11] acpi: Introduce acpi_unregister_irq function

2017-04-14 Thread fu . wei
From: Fu Wei This patch introduces acpi_unregister_irq function to free a linux IRQ number<->GSI mapping by a given linux IRQ number. Even we have successfully registered the GSI, when some error occurs, we may need to unmap it for freeing the IRQ resource. But in some cases, we only ha

[PATCH v24 05/11] clocksource: arm_arch_timer: split MMIO timer probing.

2017-04-14 Thread fu . wei
From: Fu Wei <fu@linaro.org> Currently the code to probe MMIO architected timers mixes DT parsing with actual poking of hardware. This makes the code harder than necessary to understand, and makes it difficult to add support for probing via ACPI. This patch splits the DT parsing f

[PATCH v24 07/11] clocksource: arm_arch_timer: simplify ACPI support code.

2017-04-14 Thread fu . wei
From: Fu Wei <fu@linaro.org> The patch update arm_arch_timer driver to use the function provided by the new GTDT driver of ACPI. By this way, arm_arch_timer.c can be simplified, and separate all the ACPI GTDT knowledge from this timer driver. Signed-off-by: Fu Wei <fu@linaro.or

[PATCH v24 06/11] acpi/arm64: Add GTDT table parse driver

2017-04-14 Thread fu . wei
From: Fu Wei <fu@linaro.org> This patch adds support for parsing arch timer info in GTDT, provides some kernel APIs to parse all the PPIs and always-on info in GTDT and export them. By this driver, we can simplify arm_arch_timer drivers, and separate the ACPI GTDT knowledge from it.

[PATCH v24 05/11] clocksource: arm_arch_timer: split MMIO timer probing.

2017-04-14 Thread fu . wei
From: Fu Wei Currently the code to probe MMIO architected timers mixes DT parsing with actual poking of hardware. This makes the code harder than necessary to understand, and makes it difficult to add support for probing via ACPI. This patch splits the DT parsing from HW probing. The DT parsing

[PATCH v24 07/11] clocksource: arm_arch_timer: simplify ACPI support code.

2017-04-14 Thread fu . wei
From: Fu Wei The patch update arm_arch_timer driver to use the function provided by the new GTDT driver of ACPI. By this way, arm_arch_timer.c can be simplified, and separate all the ACPI GTDT knowledge from this timer driver. Signed-off-by: Fu Wei Signed-off-by: Hanjun Guo Tested

[PATCH v24 06/11] acpi/arm64: Add GTDT table parse driver

2017-04-14 Thread fu . wei
From: Fu Wei This patch adds support for parsing arch timer info in GTDT, provides some kernel APIs to parse all the PPIs and always-on info in GTDT and export them. By this driver, we can simplify arm_arch_timer drivers, and separate the ACPI GTDT knowledge from it. Signed-off-by: Fu Wei

[PATCH v24 03/11] clocksource: arm_arch_timer: move arch_timer_needs_of_probing into DT init call

2017-04-14 Thread fu . wei
From: Fu Wei <fu@linaro.org> To cleanly split code paths specific to ACPI or DT at a higher level, this patch removes arch_timer_init(), folding the relevant parts of its logic into existing callers. This paths the way for further rework, and saves a few lines. Signed-off-by: Fu W

[PATCH v24 04/11] clocksource: arm_arch_timer: add structs to describe MMIO timer

2017-04-14 Thread fu . wei
From: Fu Wei <fu@linaro.org> In preparation for ACPI GTDT support, this patch adds structs to describe the MMIO timers indepedent of the firmware interface. Subsequent patches will use these to split the FW/HW probing logic, so that the HW probing logic can be shared by ACPI and DT.

[PATCH v24 03/11] clocksource: arm_arch_timer: move arch_timer_needs_of_probing into DT init call

2017-04-14 Thread fu . wei
From: Fu Wei To cleanly split code paths specific to ACPI or DT at a higher level, this patch removes arch_timer_init(), folding the relevant parts of its logic into existing callers. This paths the way for further rework, and saves a few lines. Signed-off-by: Fu Wei Reviewed-by: Hanjun Guo

[PATCH v24 04/11] clocksource: arm_arch_timer: add structs to describe MMIO timer

2017-04-14 Thread fu . wei
From: Fu Wei In preparation for ACPI GTDT support, this patch adds structs to describe the MMIO timers indepedent of the firmware interface. Subsequent patches will use these to split the FW/HW probing logic, so that the HW probing logic can be shared by ACPI and DT. Signed-off-by: Fu Wei

[PATCH v24 02/11] clocksource: arm_arch_timer: refactor arch_timer_needs_probing

2017-04-14 Thread fu . wei
From: Fu Wei <fu@linaro.org> When booting with DT, it's possible for timer nodes to be probed in any order. Some common initialisation needs to occur after all nodes have been probed, and arch_timer_common_init() has code to detect when this has happened. This logic is DT-sp

[PATCH v24 02/11] clocksource: arm_arch_timer: refactor arch_timer_needs_probing

2017-04-14 Thread fu . wei
From: Fu Wei When booting with DT, it's possible for timer nodes to be probed in any order. Some common initialisation needs to occur after all nodes have been probed, and arch_timer_common_init() has code to detect when this has happened. This logic is DT-specific, and it would be best

[PATCH v24 01/11] clocksource: arm_arch_timer: split dt-only rate handling

2017-04-14 Thread fu . wei
From: Fu Wei <fu@linaro.org> For historical reasons, rate detection when probing via DT is somewhat convoluted. We tried to package this up in arch_timer_detect_rate(), but with the addition of ACPI worse, and gets in the way of stringent rate checking when ACPI is used. This patch

[PATCH v24 01/11] clocksource: arm_arch_timer: split dt-only rate handling

2017-04-14 Thread fu . wei
From: Fu Wei For historical reasons, rate detection when probing via DT is somewhat convoluted. We tried to package this up in arch_timer_detect_rate(), but with the addition of ACPI worse, and gets in the way of stringent rate checking when ACPI is used. This patch makes arch_timer_detect_rate

[PATCH v24 00/11] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer

2017-04-14 Thread fu . wei
From: Fu Wei <fu@linaro.org> This patchset: (1)Preparation for adding GTDT support in arm_arch_timer: 1. Introduce a MMIO CNTFRQ helper. 2. separate out device-tree code from arch_timer_detect_rate 3. replace arch_timer_detect_rate with arch_timer_of_configur

[PATCH v24 00/11] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer

2017-04-14 Thread fu . wei
From: Fu Wei This patchset: (1)Preparation for adding GTDT support in arm_arch_timer: 1. Introduce a MMIO CNTFRQ helper. 2. separate out device-tree code from arch_timer_detect_rate 3. replace arch_timer_detect_rate with arch_timer_of_configure_rate 4

Re: [PATCH v23 09/11] acpi/arm64: Add memory-mapped timer support in GTDT driver

2017-04-06 Thread Fu Wei
Hi Mark, On 7 April 2017 at 01:52, Mark Rutland <mark.rutl...@arm.com> wrote: > On Fri, Apr 07, 2017 at 01:39:09AM +0800, Fu Wei wrote: >> On 7 April 2017 at 01:24, Mark Rutland <mark.rutl...@arm.com> wrote: >> > On Fri, Apr 07, 2017 at 12:47:47AM +0800, Fu Wei wrot

Re: [PATCH v23 09/11] acpi/arm64: Add memory-mapped timer support in GTDT driver

2017-04-06 Thread Fu Wei
Hi Mark, On 7 April 2017 at 01:52, Mark Rutland wrote: > On Fri, Apr 07, 2017 at 01:39:09AM +0800, Fu Wei wrote: >> On 7 April 2017 at 01:24, Mark Rutland wrote: >> > On Fri, Apr 07, 2017 at 12:47:47AM +0800, Fu Wei wrote: >> >> On 6 April 2017 at 02:38, Mark Rutla

Re: [PATCH v23 09/11] acpi/arm64: Add memory-mapped timer support in GTDT driver

2017-04-06 Thread Fu Wei
Hi Mark On 7 April 2017 at 01:24, Mark Rutland <mark.rutl...@arm.com> wrote: > On Fri, Apr 07, 2017 at 12:47:47AM +0800, Fu Wei wrote: >> On 6 April 2017 at 02:38, Mark Rutland <mark.rutl...@arm.com> wrote: >> > On Sat, Apr 01, 2017 at 01:51:03AM

Re: [PATCH v23 09/11] acpi/arm64: Add memory-mapped timer support in GTDT driver

2017-04-06 Thread Fu Wei
Hi Mark On 7 April 2017 at 01:24, Mark Rutland wrote: > On Fri, Apr 07, 2017 at 12:47:47AM +0800, Fu Wei wrote: >> On 6 April 2017 at 02:38, Mark Rutland wrote: >> > On Sat, Apr 01, 2017 at 01:51:03AM +0800, fu@linaro.org wrote: >> >> + /* >> >

Re: [PATCH v23 09/11] acpi/arm64: Add memory-mapped timer support in GTDT driver

2017-04-06 Thread Fu Wei
Hi Lorenzo, On 3 April 2017 at 18:45, Lorenzo Pieralisi <lorenzo.pieral...@arm.com> wrote: > On Sat, Apr 01, 2017 at 01:51:03AM +0800, fu@linaro.org wrote: >> From: Fu Wei <fu@linaro.org> >> >> On platforms booting with ACPI, architected memory-map

Re: [PATCH v23 09/11] acpi/arm64: Add memory-mapped timer support in GTDT driver

2017-04-06 Thread Fu Wei
Hi Lorenzo, On 3 April 2017 at 18:45, Lorenzo Pieralisi wrote: > On Sat, Apr 01, 2017 at 01:51:03AM +0800, fu@linaro.org wrote: >> From: Fu Wei >> >> On platforms booting with ACPI, architected memory-mapped timers' >> configuration data is provided by fir

Re: [PATCH v23 09/11] acpi/arm64: Add memory-mapped timer support in GTDT driver

2017-04-06 Thread Fu Wei
return ret; >> + timer_mem++; >> + (*timer_count)++; >> + } >> + } > > If we were to have multiple GT blocks, this would leave timer_mem in an > inconsistent state. In gtdt_parse_timer_block we'll blat any existing > timer_mem->cntctlbase, and blat some arbitrary set of frames. however, > *some* frames may have been held over from a previous iteration. > > My understanding was that the system level timer had a single CNTCTLBase > frame, and hence we should only have a single GT block. > > Judging by ARM DDI 0487A.k_iss10775, I1.3 "Memory-mapped timer > components" and I3.4 "Generic Timer memory-mapped registers overview", > it does appear that the system should only have one CNTCTLBase frame. > > What's going on here? > > Thanks, > Mark. -- Best regards, Fu Wei Software Engineer Red Hat

Re: [PATCH v23 09/11] acpi/arm64: Add memory-mapped timer support in GTDT driver

2017-04-06 Thread Fu Wei
t;> + timer_mem++; >> + (*timer_count)++; >> + } >> + } > > If we were to have multiple GT blocks, this would leave timer_mem in an > inconsistent state. In gtdt_parse_timer_block we'll blat any existing > timer_mem->cntctlbase, and blat some arbitrary set of frames. however, > *some* frames may have been held over from a previous iteration. > > My understanding was that the system level timer had a single CNTCTLBase > frame, and hence we should only have a single GT block. > > Judging by ARM DDI 0487A.k_iss10775, I1.3 "Memory-mapped timer > components" and I3.4 "Generic Timer memory-mapped registers overview", > it does appear that the system should only have one CNTCTLBase frame. > > What's going on here? > > Thanks, > Mark. -- Best regards, Fu Wei Software Engineer Red Hat

Re: [PATCH v23 06/11] clocksource: arm_arch_timer: refactor MMIO timer probing.

2017-04-06 Thread Fu Wei
{ pr_err(FW_BUG "invalid MMIO frequency.\n"); iounmap(base); return -EINVAL; } Please correct me, if I miss something. Thanks :-) > > Thanks, > Mark. -- Best regards, Fu Wei Software Engineer Red Hat

Re: [PATCH v23 06/11] clocksource: arm_arch_timer: refactor MMIO timer probing.

2017-04-06 Thread Fu Wei
y.\n"); iounmap(base); return -EINVAL; } Please correct me, if I miss something. Thanks :-) > > Thanks, > Mark. -- Best regards, Fu Wei Software Engineer Red Hat

Re: [PATCH v23 00/11] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer

2017-03-31 Thread Fu Wei
Hi Xiongfeng Wang, On 1 April 2017 at 10:14, Xiongfeng Wang <wangxiongfe...@huawei.com> wrote: > > > On 2017/4/1 1:50, fu@linaro.org wrote: >> From: Fu Wei <fu@linaro.org> >> >> This patchset: >> (1)Preparation for adding GTDT support in a

Re: [PATCH v23 00/11] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer

2017-03-31 Thread Fu Wei
Hi Xiongfeng Wang, On 1 April 2017 at 10:14, Xiongfeng Wang wrote: > > > On 2017/4/1 1:50, fu@linaro.org wrote: >> From: Fu Wei >> >> This patchset: >> (1)Preparation for adding GTDT support in arm_arch_timer: >> 1. Introduce a MMIO CN

Re: [PATCH v22 00/11] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer

2017-03-31 Thread Fu Wei
Hi Mark, On 28 March 2017 at 22:53, Mark Rutland <mark.rutl...@arm.com> wrote: > Hi, > > On Tue, Mar 28, 2017 at 10:29:10PM +0800, Fu Wei wrote: >> On 28 March 2017 at 21:05, Mark Rutland <mark.rutl...@arm.com> wrote: >> > Sorry for the delay; I have not had

Re: [PATCH v22 00/11] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer

2017-03-31 Thread Fu Wei
Hi Mark, On 28 March 2017 at 22:53, Mark Rutland wrote: > Hi, > > On Tue, Mar 28, 2017 at 10:29:10PM +0800, Fu Wei wrote: >> On 28 March 2017 at 21:05, Mark Rutland wrote: >> > Sorry for the delay; I have not had the time to focus on this as I would >> > li

[PATCH v23 11/11] acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver

2017-03-31 Thread fu . wei
From: Fu Wei <fu@linaro.org> This driver adds support for parsing SBSA Generic Watchdog timer in GTDT, parse all info in SBSA Generic Watchdog Structure in GTDT, and creating a platform device with that information. This allows the operating system to obtain device data from the re

[PATCH v23 11/11] acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver

2017-03-31 Thread fu . wei
From: Fu Wei This driver adds support for parsing SBSA Generic Watchdog timer in GTDT, parse all info in SBSA Generic Watchdog Structure in GTDT, and creating a platform device with that information. This allows the operating system to obtain device data from the resource of platform device

[PATCH v23 10/11] clocksource: arm_arch_timer: add GTDT support for memory-mapped timer

2017-03-31 Thread fu . wei
From: Fu Wei <fu@linaro.org> The patch add memory-mapped timer register support by using the information provided by the new GTDT driver of ACPI. Signed-off-by: Fu Wei <fu@linaro.org> Reviewed-by: Hanjun Guo <hanjun@linaro.org> --- drivers/clocksource/arm

[PATCH v23 10/11] clocksource: arm_arch_timer: add GTDT support for memory-mapped timer

2017-03-31 Thread fu . wei
From: Fu Wei The patch add memory-mapped timer register support by using the information provided by the new GTDT driver of ACPI. Signed-off-by: Fu Wei Reviewed-by: Hanjun Guo --- drivers/clocksource/arm_arch_timer.c | 35 --- 1 file changed, 32 insertions

[PATCH v23 09/11] acpi/arm64: Add memory-mapped timer support in GTDT driver

2017-03-31 Thread fu . wei
From: Fu Wei <fu@linaro.org> On platforms booting with ACPI, architected memory-mapped timers' configuration data is provided by firmware through the ACPI GTDT static table. The clocksource architected timer kernel driver requires a firmware interface to collect timer configu

[PATCH v23 09/11] acpi/arm64: Add memory-mapped timer support in GTDT driver

2017-03-31 Thread fu . wei
From: Fu Wei On platforms booting with ACPI, architected memory-mapped timers' configuration data is provided by firmware through the ACPI GTDT static table. The clocksource architected timer kernel driver requires a firmware interface to collect timer configuration and configure its driver

[PATCH v23 08/11] clocksource: arm_arch_timer: simplify ACPI support code.

2017-03-31 Thread fu . wei
From: Fu Wei <fu@linaro.org> The patch update arm_arch_timer driver to use the function provided by the new GTDT driver of ACPI. By this way, arm_arch_timer.c can be simplified, and separate all the ACPI GTDT knowledge from this timer driver. Signed-off-by: Fu Wei <fu@linaro.or

[PATCH v23 07/11] acpi/arm64: Add GTDT table parse driver

2017-03-31 Thread fu . wei
From: Fu Wei <fu@linaro.org> This patch adds support for parsing arch timer info in GTDT, provides some kernel APIs to parse all the PPIs and always-on info in GTDT and export them. By this driver, we can simplify arm_arch_timer drivers, and separate the ACPI GTDT knowledge from it.

[PATCH v23 08/11] clocksource: arm_arch_timer: simplify ACPI support code.

2017-03-31 Thread fu . wei
From: Fu Wei The patch update arm_arch_timer driver to use the function provided by the new GTDT driver of ACPI. By this way, arm_arch_timer.c can be simplified, and separate all the ACPI GTDT knowledge from this timer driver. Signed-off-by: Fu Wei Signed-off-by: Hanjun Guo Tested

[PATCH v23 07/11] acpi/arm64: Add GTDT table parse driver

2017-03-31 Thread fu . wei
From: Fu Wei This patch adds support for parsing arch timer info in GTDT, provides some kernel APIs to parse all the PPIs and always-on info in GTDT and export them. By this driver, we can simplify arm_arch_timer drivers, and separate the ACPI GTDT knowledge from it. Signed-off-by: Fu Wei

[PATCH v23 06/11] clocksource: arm_arch_timer: refactor MMIO timer probing.

2017-03-31 Thread fu . wei
From: Fu Wei <fu@linaro.org> Currently the code to probe MMIO architected timers mixes DT parsing with actual poking of hardware. This makes the code harder than necessary to understand, and makes it difficult to add support for probing via ACPI. This patch factors all the DT-specific

[PATCH v23 06/11] clocksource: arm_arch_timer: refactor MMIO timer probing.

2017-03-31 Thread fu . wei
From: Fu Wei Currently the code to probe MMIO architected timers mixes DT parsing with actual poking of hardware. This makes the code harder than necessary to understand, and makes it difficult to add support for probing via ACPI. This patch factors all the DT-specific logic out

[PATCH v23 05/11] clocksource: arm_arch_timer: add structs to describe MMIO timer

2017-03-31 Thread fu . wei
From: Fu Wei <fu@linaro.org> In preparation for ACPI GTDT support, this patch adds structs to describe the MMIO timers indepedent of the firmware interface. Subsequent patches will use these to split the FW/HW probing logic, so that the HW probing logic can be shared by ACPI and DT.

[PATCH v23 03/11] clocksource: arm_arch_timer: refactor arch_timer_needs_probing

2017-03-31 Thread fu . wei
From: Fu Wei <fu@linaro.org> When booting with DT, it's possible for timer nodes to be probed in any order. Some common initialisation needs to occur after all nodes have been probed, and arch_timer_common_init() has code to detect when this has happened. This logic is DT-sp

[PATCH v23 05/11] clocksource: arm_arch_timer: add structs to describe MMIO timer

2017-03-31 Thread fu . wei
From: Fu Wei In preparation for ACPI GTDT support, this patch adds structs to describe the MMIO timers indepedent of the firmware interface. Subsequent patches will use these to split the FW/HW probing logic, so that the HW probing logic can be shared by ACPI and DT. [Mark: reword commit

[PATCH v23 03/11] clocksource: arm_arch_timer: refactor arch_timer_needs_probing

2017-03-31 Thread fu . wei
From: Fu Wei When booting with DT, it's possible for timer nodes to be probed in any order. Some common initialisation needs to occur after all nodes have been probed, and arch_timer_common_init() has code to detect when this has happened. This logic is DT-specific, and it would be best

[PATCH v23 04/11] clocksource: arm_arch_timer: move arch_timer_needs_of_probing into DT init call

2017-03-31 Thread fu . wei
From: Fu Wei <fu@linaro.org> To cleanly split code paths specific to ACPI or DT at a higher level, this patch removes arch_timer_init(), folding the relevant parts of its logic into existing callers. This patches the way for further rework, and saves a few lines. Signed-off-by: Fu W

[PATCH v23 04/11] clocksource: arm_arch_timer: move arch_timer_needs_of_probing into DT init call

2017-03-31 Thread fu . wei
From: Fu Wei To cleanly split code paths specific to ACPI or DT at a higher level, this patch removes arch_timer_init(), folding the relevant parts of its logic into existing callers. This patches the way for further rework, and saves a few lines. Signed-off-by: Fu Wei Reviewed-by: Hanjun Guo

[PATCH v23 00/11] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer

2017-03-31 Thread fu . wei
From: Fu Wei <fu@linaro.org> This patchset: (1)Preparation for adding GTDT support in arm_arch_timer: 1. Introduce a MMIO CNTFRQ helper. 2. separate out device-tree code from arch_timer_detect_rate 3. remove arch_timer_detect_rate use arch_timer_*get_

[PATCH v23 01/11] clocksource: arm_arch_timer: add MMIO CNTFRQ helper

2017-03-31 Thread fu . wei
From: Fu Wei <fu@linaro.org> We currently open-code the readl() for the MMIO time frequency. To avoid duplicating the logic with future rework, this patch adds a helepr to read the MMIO timer frequency, mirroring what we have for the sysreg timer frequency. Signed-off-by: Fu W

[PATCH v23 02/11] clocksource: arm_arch_timer: split dt-only rate handling

2017-03-31 Thread fu . wei
From: Fu Wei <fu@linaro.org> Currently Currently arch_timer_detect_rate() tried to handle both the sysreg timer and MMIO timer, with DT-specific fallback code. This gets in the way of implementing deterministic and correct rate probing when using ACPI. This patch moves this log

[PATCH v23 00/11] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer

2017-03-31 Thread fu . wei
From: Fu Wei This patchset: (1)Preparation for adding GTDT support in arm_arch_timer: 1. Introduce a MMIO CNTFRQ helper. 2. separate out device-tree code from arch_timer_detect_rate 3. remove arch_timer_detect_rate use arch_timer_*get_cntfrq directly 4

[PATCH v23 01/11] clocksource: arm_arch_timer: add MMIO CNTFRQ helper

2017-03-31 Thread fu . wei
From: Fu Wei We currently open-code the readl() for the MMIO time frequency. To avoid duplicating the logic with future rework, this patch adds a helepr to read the MMIO timer frequency, mirroring what we have for the sysreg timer frequency. Signed-off-by: Fu Wei [Mark: reword commit message

[PATCH v23 02/11] clocksource: arm_arch_timer: split dt-only rate handling

2017-03-31 Thread fu . wei
From: Fu Wei Currently Currently arch_timer_detect_rate() tried to handle both the sysreg timer and MMIO timer, with DT-specific fallback code. This gets in the way of implementing deterministic and correct rate probing when using ACPI. This patch moves this logic out into the (DT-specific

Re: [PATCH v22 11/11] acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver

2017-03-31 Thread Fu Wei
Hi Lorenzo, On 28 March 2017 at 23:41, Lorenzo Pieralisi <lorenzo.pieral...@arm.com> wrote: > On Wed, Mar 22, 2017 at 12:31:22AM +0800, fu@linaro.org wrote: >> From: Fu Wei <fu@linaro.org> >> >> This driver adds support for parsing SBSA Generic Watchdog

Re: [PATCH v22 11/11] acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver

2017-03-31 Thread Fu Wei
Hi Lorenzo, On 28 March 2017 at 23:41, Lorenzo Pieralisi wrote: > On Wed, Mar 22, 2017 at 12:31:22AM +0800, fu@linaro.org wrote: >> From: Fu Wei >> >> This driver adds support for parsing SBSA Generic Watchdog timer >> in GTDT, parse all info in SBSA Generic

Re: [PATCH v22 09/11] acpi/arm64: Add memory-mapped timer support in GTDT driver

2017-03-30 Thread Fu Wei
Hi Lorenzo, On 30 March 2017 at 00:47, Lorenzo Pieralisi <lorenzo.pieral...@arm.com> wrote: > On Wed, Mar 22, 2017 at 12:31:20AM +0800, fu@linaro.org wrote: >> From: Fu Wei <fu@linaro.org> >> >> On platforms booting with ACPI, architected memory-map

Re: [PATCH v22 09/11] acpi/arm64: Add memory-mapped timer support in GTDT driver

2017-03-30 Thread Fu Wei
Hi Lorenzo, On 30 March 2017 at 00:47, Lorenzo Pieralisi wrote: > On Wed, Mar 22, 2017 at 12:31:20AM +0800, fu@linaro.org wrote: >> From: Fu Wei >> >> On platforms booting with ACPI, architected memory-mapped timers' >> configuration data is provided by fir

Re: [PATCH v22 02/11] clocksource: arm_arch_timer: separate out device-tree code and remove arch_timer_detect_rate

2017-03-29 Thread Fu Wei
On 29 March 2017 at 22:41, Daniel Lezcano <daniel.lezc...@linaro.org> wrote: > On Wed, Mar 29, 2017 at 01:11:58PM +0800, Fu Wei wrote: >> Hi Daniel, >> >> On 29 March 2017 at 11:41, Fu Wei <fu@linaro.org> wrote: >> > Hi Daniel, >> > >>

Re: [PATCH v22 02/11] clocksource: arm_arch_timer: separate out device-tree code and remove arch_timer_detect_rate

2017-03-29 Thread Fu Wei
On 29 March 2017 at 22:41, Daniel Lezcano wrote: > On Wed, Mar 29, 2017 at 01:11:58PM +0800, Fu Wei wrote: >> Hi Daniel, >> >> On 29 March 2017 at 11:41, Fu Wei wrote: >> > Hi Daniel, >> > >> > Great thanks for your review, allow me to answer your

Re: [PATCH v22 07/11] acpi/arm64: Add GTDT table parse driver

2017-03-29 Thread Fu Wei
On 29 March 2017 at 22:29, Fu Wei <fu@linaro.org> wrote: > Hi Lorenzo, > > On 28 March 2017 at 19:35, Lorenzo Pieralisi <lorenzo.pieral...@arm.com> > wrote: >> On Wed, Mar 22, 2017 at 12:31:18AM +0800, fu....@linaro.org wrote: >>> From: Fu Wei <

Re: [PATCH v22 07/11] acpi/arm64: Add GTDT table parse driver

2017-03-29 Thread Fu Wei
On 29 March 2017 at 22:29, Fu Wei wrote: > Hi Lorenzo, > > On 28 March 2017 at 19:35, Lorenzo Pieralisi > wrote: >> On Wed, Mar 22, 2017 at 12:31:18AM +0800, fu@linaro.org wrote: >>> From: Fu Wei >>> >>> This patch adds support for parsing arch

Re: [PATCH v22 07/11] acpi/arm64: Add GTDT table parse driver

2017-03-29 Thread Fu Wei
Hi Lorenzo, On 28 March 2017 at 19:35, Lorenzo Pieralisi <lorenzo.pieral...@arm.com> wrote: > On Wed, Mar 22, 2017 at 12:31:18AM +0800, fu@linaro.org wrote: >> From: Fu Wei <fu@linaro.org> >> >> This patch adds support for parsing arch timer info in G

Re: [PATCH v22 07/11] acpi/arm64: Add GTDT table parse driver

2017-03-29 Thread Fu Wei
Hi Lorenzo, On 28 March 2017 at 19:35, Lorenzo Pieralisi wrote: > On Wed, Mar 22, 2017 at 12:31:18AM +0800, fu@linaro.org wrote: >> From: Fu Wei >> >> This patch adds support for parsing arch timer info in GTDT, >> provides some kernel APIs to parse all the

Re: [PATCH v22 07/11] acpi/arm64: Add GTDT table parse driver

2017-03-29 Thread Fu Wei
Hi Lorenzo, On 29 March 2017 at 19:33, Lorenzo Pieralisi <lorenzo.pieral...@arm.com> wrote: > On Wed, Mar 29, 2017 at 06:48:26PM +0800, Fu Wei wrote: >> Hi Lorenzo, >> >> On 29 March 2017 at 18:21, Lorenzo Pieralisi <lorenzo.pieral...@arm.com> >> wrote:

Re: [PATCH v22 07/11] acpi/arm64: Add GTDT table parse driver

2017-03-29 Thread Fu Wei
Hi Lorenzo, On 29 March 2017 at 19:33, Lorenzo Pieralisi wrote: > On Wed, Mar 29, 2017 at 06:48:26PM +0800, Fu Wei wrote: >> Hi Lorenzo, >> >> On 29 March 2017 at 18:21, Lorenzo Pieralisi >> wrote: >> > On Wed, Mar 29, 20

Re: [PATCH v22 07/11] acpi/arm64: Add GTDT table parse driver

2017-03-29 Thread Fu Wei
Hi Lorenzo, On 29 March 2017 at 18:21, Lorenzo Pieralisi <lorenzo.pieral...@arm.com> wrote: > On Wed, Mar 29, 2017 at 05:48:17PM +0800, Fu Wei wrote: > > [...] > >> * @platform_timer_count: It points to a integer variable which is used >> *

Re: [PATCH v22 07/11] acpi/arm64: Add GTDT table parse driver

2017-03-29 Thread Fu Wei
Hi Lorenzo, On 29 March 2017 at 18:21, Lorenzo Pieralisi wrote: > On Wed, Mar 29, 2017 at 05:48:17PM +0800, Fu Wei wrote: > > [...] > >> * @platform_timer_count: It points to a integer variable which is used >> * for storing the n

Re: [PATCH v22 07/11] acpi/arm64: Add GTDT table parse driver

2017-03-29 Thread Fu Wei
22, 2017 at 12:31:18AM +0800, fu@linaro.org wrote: >> From: Fu Wei <fu@linaro.org> >> >> This patch adds support for parsing arch timer info in GTDT, >> provides some kernel APIs to parse all the PPIs and >> always-on info in GTDT and export them. >>

Re: [PATCH v22 07/11] acpi/arm64: Add GTDT table parse driver

2017-03-29 Thread Fu Wei
fu@linaro.org wrote: >> From: Fu Wei >> >> This patch adds support for parsing arch timer info in GTDT, >> provides some kernel APIs to parse all the PPIs and >> always-on info in GTDT and export them. >> >> By this driver, we can simplify arm_arch

Re: [PATCH v22 02/11] clocksource: arm_arch_timer: separate out device-tree code and remove arch_timer_detect_rate

2017-03-28 Thread Fu Wei
Hi Daniel, On 29 March 2017 at 11:41, Fu Wei <fu@linaro.org> wrote: > Hi Daniel, > > Great thanks for your review, allow me to answer your question below: > > On 28 March 2017 at 22:58, Daniel Lezcano <daniel.lezc...@linaro.org> wrote: >> On Wed, Mar

Re: [PATCH v22 02/11] clocksource: arm_arch_timer: separate out device-tree code and remove arch_timer_detect_rate

2017-03-28 Thread Fu Wei
Hi Daniel, On 29 March 2017 at 11:41, Fu Wei wrote: > Hi Daniel, > > Great thanks for your review, allow me to answer your question below: > > On 28 March 2017 at 22:58, Daniel Lezcano wrote: >> On Wed, Mar 22, 2017 at 12:31:13AM +0800, fu@linaro.org wr

Re: [PATCH v22 02/11] clocksource: arm_arch_timer: separate out device-tree code and remove arch_timer_detect_rate

2017-03-28 Thread Fu Wei
Hi Daniel, Great thanks for your review, allow me to answer your question below: On 28 March 2017 at 22:58, Daniel Lezcano <daniel.lezc...@linaro.org> wrote: > On Wed, Mar 22, 2017 at 12:31:13AM +0800, fu@linaro.org wrote: >> From: Fu Wei <fu@linaro.org> >>

Re: [PATCH v22 02/11] clocksource: arm_arch_timer: separate out device-tree code and remove arch_timer_detect_rate

2017-03-28 Thread Fu Wei
Hi Daniel, Great thanks for your review, allow me to answer your question below: On 28 March 2017 at 22:58, Daniel Lezcano wrote: > On Wed, Mar 22, 2017 at 12:31:13AM +0800, fu@linaro.org wrote: >> From: Fu Wei >> >> Currently, the counter frequency detection call(a

Re: [PATCH v22 00/11] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer

2017-03-28 Thread Fu Wei
Hi Mark, On 28 March 2017 at 21:05, Mark Rutland <mark.rutl...@arm.com> wrote: > On Tue, Mar 28, 2017 at 08:34:12PM +0800, Fu Wei wrote: >> Hi Jon, >> >> Thanks for your email >> An hour ago, I just got some feedback from Lorenzo, will update my >> pa

Re: [PATCH v22 00/11] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer

2017-03-28 Thread Fu Wei
Hi Mark, On 28 March 2017 at 21:05, Mark Rutland wrote: > On Tue, Mar 28, 2017 at 08:34:12PM +0800, Fu Wei wrote: >> Hi Jon, >> >> Thanks for your email >> An hour ago, I just got some feedback from Lorenzo, will update my >> patchset ASAP according to his s

Re: [PATCH v22 00/11] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer

2017-03-28 Thread Fu Wei
wrote: >> From: Fu Wei <fu@linaro.org> >> >> This patchset: >> (1)Preparation for adding GTDT support in arm_arch_timer: >> 1. Introduce a wrapper function to get the frequency from mmio. >> 2. separate out device-t

Re: [PATCH v22 00/11] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer

2017-03-28 Thread Fu Wei
/gtdt I guess I should rebase my patchset to his gtdt branch for v23. So now, I am waiting for Mark's feedback to move on. On 28 March 2017 at 19:32, Jon Masters wrote: > Anyone got review comments for this series? > > On 03/21/2017 12:31 PM, fu@linaro.org wrote: >&g

[PATCH v22 08/11] clocksource: arm_arch_timer: simplify ACPI support code.

2017-03-21 Thread fu . wei
From: Fu Wei <fu@linaro.org> The patch update arm_arch_timer driver to use the function provided by the new GTDT driver of ACPI. By this way, arm_arch_timer.c can be simplified, and separate all the ACPI GTDT knowledge from this timer driver. Signed-off-by: Fu Wei <fu@linaro.or

[PATCH v22 08/11] clocksource: arm_arch_timer: simplify ACPI support code.

2017-03-21 Thread fu . wei
From: Fu Wei The patch update arm_arch_timer driver to use the function provided by the new GTDT driver of ACPI. By this way, arm_arch_timer.c can be simplified, and separate all the ACPI GTDT knowledge from this timer driver. Signed-off-by: Fu Wei Signed-off-by: Hanjun Guo Tested

[PATCH v22 09/11] acpi/arm64: Add memory-mapped timer support in GTDT driver

2017-03-21 Thread fu . wei
From: Fu Wei <fu@linaro.org> On platforms booting with ACPI, architected memory-mapped timers' configuration data is provided by firmware through the ACPI GTDT static table. The clocksource architected timer kernel driver requires a firmware interface to collect timer configu

[PATCH v22 09/11] acpi/arm64: Add memory-mapped timer support in GTDT driver

2017-03-21 Thread fu . wei
From: Fu Wei On platforms booting with ACPI, architected memory-mapped timers' configuration data is provided by firmware through the ACPI GTDT static table. The clocksource architected timer kernel driver requires a firmware interface to collect timer configuration and configure its driver

[PATCH v22 07/11] acpi/arm64: Add GTDT table parse driver

2017-03-21 Thread fu . wei
From: Fu Wei <fu@linaro.org> This patch adds support for parsing arch timer info in GTDT, provides some kernel APIs to parse all the PPIs and always-on info in GTDT and export them. By this driver, we can simplify arm_arch_timer drivers, and separate the ACPI GTDT knowledge from it.

[PATCH v22 07/11] acpi/arm64: Add GTDT table parse driver

2017-03-21 Thread fu . wei
From: Fu Wei This patch adds support for parsing arch timer info in GTDT, provides some kernel APIs to parse all the PPIs and always-on info in GTDT and export them. By this driver, we can simplify arm_arch_timer drivers, and separate the ACPI GTDT knowledge from it. Signed-off-by: Fu Wei

[PATCH v22 10/11] clocksource: arm_arch_timer: add GTDT support for memory-mapped timer

2017-03-21 Thread fu . wei
From: Fu Wei <fu@linaro.org> The patch add memory-mapped timer register support by using the information provided by the new GTDT driver of ACPI. Signed-off-by: Fu Wei <fu@linaro.org> Reviewed-by: Hanjun Guo <hanjun@linaro.org> --- drivers/clocksource/arm

[PATCH v22 10/11] clocksource: arm_arch_timer: add GTDT support for memory-mapped timer

2017-03-21 Thread fu . wei
From: Fu Wei The patch add memory-mapped timer register support by using the information provided by the new GTDT driver of ACPI. Signed-off-by: Fu Wei Reviewed-by: Hanjun Guo --- drivers/clocksource/arm_arch_timer.c | 35 --- 1 file changed, 32 insertions

[PATCH v22 11/11] acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver

2017-03-21 Thread fu . wei
From: Fu Wei <fu@linaro.org> This driver adds support for parsing SBSA Generic Watchdog timer in GTDT, parse all info in SBSA Generic Watchdog Structure in GTDT, and creating a platform device with that information. This allows the operating system to obtain device data from the re

[PATCH v22 11/11] acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver

2017-03-21 Thread fu . wei
From: Fu Wei This driver adds support for parsing SBSA Generic Watchdog timer in GTDT, parse all info in SBSA Generic Watchdog Structure in GTDT, and creating a platform device with that information. This allows the operating system to obtain device data from the resource of platform device

  1   2   3   4   5   6   7   8   9   10   >