All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xiongfeng Wang <wangxiongfeng2@huawei.com>
To: fu.wei@linaro.org, rjw@rjwysocki.net, lenb@kernel.org,
	daniel.lezcano@linaro.org, tglx@linutronix.de,
	marc.zyngier@arm.com, mark.rutland@arm.com,
	lorenzo.pieralisi@arm.com, sudeep.holla@arm.com,
	hanjun.guo@linaro.org
Cc: linaro-acpi@lists.linaro.org, catalin.marinas@arm.com,
	will.deacon@arm.com, linux-kernel@vger.kernel.org, wim@iguana.be,
	wei@redhat.com, al.stone@linaro.org, tn@semihalf.com,
	timur@codeaurora.org, linux-acpi@vger.kernel.org,
	linux@roeck-us.net, harba@codeaurora.org, julien.grall@arm.com,
	linux-watchdog@vger.kernel.org, arnd@arndb.de, jcm@redhat.com,
	cov@codeaurora.org, linux-arm-kernel@lists.infradead.org,
	graeme.gregory@linaro.org, rruigrok@codeaurora.org,
	leo.duran@amd.com, Suravee.Suthikulpanit@amd.com,
	christoffer.dall@linaro.org
Subject: Re: [PATCH v23 00/11] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer
Date: Sat, 1 Apr 2017 10:14:10 +0800	[thread overview]
Message-ID: <8c017a47-02d5-454d-f42c-a1b5bb29df1b@huawei.com> (raw)
In-Reply-To: <20170331175105.8370-1-fu.wei@linaro.org>



On 2017/4/1 1:50, fu.wei@linaro.org wrote:
> From: Fu Wei <fu.wei@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_cntfrq directly
>         4. Refactor arch_timer_needs_probing, and move it into DT init call
>         5. Introduce some new structs and refactor the MMIO timer init code
>         for reusing some common code.
> 
>     (2)Introduce ACPI GTDT parser: drivers/acpi/arm64/acpi_gtdt.c
>     Parse all kinds of timer in GTDT table of ACPI:arch timer,
>     memory-mapped timer and SBSA Generic Watchdog timer.
>     This driver can help to simplify all the relevant timer drivers,
>     and separate all the ACPI GTDT knowledge from them.
> 
>     (3)Simplify ACPI code for arm_arch_timer
> 
>     (4)Add GTDT support for ARM memory-mapped timer.
> 
> This patchset has been tested on the following platforms with ACPI enabled:
>     (1)ARM Foundation v8 model
> 

for arm_arch_timer(not memory-mapped) and sbsa watchdog part,  Tested-by: wangxiongfeng2@huawei.com





Thanks,

Wang Xiongfeng
.

> Changelog:
> v23: https://lkml.org/lkml/2017/3/31/
>      Rebase to git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arch-timer/cleanup
>      Improve the data struct of arch_timer_mem and arch_timer_mem_frame to
>      improve the parser of GT blocks and arch_timer_mem initualization.
>      Improve arch_timer_rate detection: sysreg frequency is primary in DT boot
>      Improve some comments in GTDT parser driver.
>      Improve acpi_gtdt_init function, and make a comment for the multiple calls.
>      Improve the unwinding for the irq of timers, when an error occurs.
>      Handle the case of virtual timer GSIV is 0.
> 
> v22: https://lkml.org/lkml/2017/3/21/523
>      Rebase to git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arch-timer/cleanup
>      Only Introduce arch_timer_mem_get_cntfrq to get the frequency from mmio.
>      Merged patch 2,3(about arch_timer_detect_rate).
>      Keep arch_timer_rate, do NOT split it for different types of timer.
>      Improve  memory-mapped timer support by comments and variable name:
>          data-->timer_mem
>          frame-->gtdt_frame
>      Delete zero check for SBSA watchdog irq.
>      Skip secure SBSA watchdog in GTDT driver.
>      Delete Kconfig modification for SBSA watchdog driver.
>      Delete no_irq, using nr_res instead.
> 
> v21: https://lkml.org/lkml/2017/2/6/734
>      Introduce two functions to get the frequency from mmio and sysreg.
>      Remove arch_timer_detect_rate use arch_timer_get_*_freq directly
>      Split arch_timer_rate for different types of timer.
>      Skip secure timer frame in GTDT driver.
>      Rebase to git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arch-timer/cleanup
>      (The first 6 patches in v20 have been merged into arch-timer/cleanup branch)
> 
> v20: https://lkml.org/lkml/2017/1/18/534
>      Reorder the first 4 patches and split the 4th patches.
>      Leave CNTHCTL_* as they originally were.
>      Fix the bug in arch_timer_select_ppi.
>      Split "Rework counter frequency detection" patch.
>      Rework the arch_timer_detect_rate function.
>      Improve the commit message of "Refactor MMIO timer probing".
>      Rebase to 4.10.0-rc4
> 
> v19: https://lkml.org/lkml/2016/12/21/25
>      Fix a '\n' missing in a error message in arch_timer_mem_init.
>      Add "request_mem_region" for ioremapping cntbase, according to
>      f947ee1 clocksource/drivers/arm_arch_timer: Map frame with of_io_request_and_map()
>      Rebase to 4.9.0-gfb779ff
> 
> v18: https://lkml.org/lkml/2016/12/8/446
>      Fix 8/15 patch problem of "int ret;" in arch_timer_acpi_init.
>      Rebase to 4.9.0-rc8-g9269898
> 
> v17: https://lkml.org/lkml/2016/11/25/140
>      Take out some cleanups from 4/15.
>      Merge 5/15 and 6/15, improve PPI determination code,
>      improve commit message.
>      Rework counter frequency detection.
>      Move arch_timer_needs_of_probing into DT init call.
>      Move Platform Timer scan loop back to timer init call to avoid allocating
>      and free memory.
>      Improve all the exported functions' comment.
> 
> v16: https://lkml.org/lkml/2016/11/16/268
>      Fix patchset problem about static enum ppi_nr of 01/13 in v15.
>      Refactor arch_timer_detect_rate.
>      Refactor arch_timer_needs_probing.
> 
> v15: https://lkml.org/lkml/2016/11/15/366
>      Re-order patches
>      Add arm_arch_timer refactoring patches to prepare for GTDT:
>          1. rename some  enums and defines, and some cleanups
>          2. separate out arch_timer_uses_ppi init code and fix a potential bug
>          3. Improve some new structs, refactor the timer init code.
>      Since the some structs have been changed, GTDT parser for memory-mapped
>      timer and SBSA Generic Watchdog timer have been update.
> 
> v14: https://lkml.org/lkml/2016/9/28/573
>      Separate memory-mapped timer GTDT support into two patches
>          1. Refactor the timer init code to prepare for GTDT
>          2. Add GTDT support for memory-mapped timer
> 
> v13: http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1231717.html
>      Improve arm_arch_timer code for memory-mapped
>      timer GTDT support, refactor original memory-mapped timer
>      dt support for reusing some common code.
> 
> v12: https://lkml.org/lkml/2016/9/13/250
>      Rebase to latest Linux 4.8-rc6
>      Delete the confusing "skipping" in the error message.
> 
> V11: https://lkml.org/lkml/2016/9/6/354
>      Rebase to latest Linux 4.8-rc5
>      Delete typedef (suggested by checkpatch.pl)
> 
> V10: https://lkml.org/lkml/2016/7/26/215
>      Drop the "readq" patch.
>      Rebase to latest Linux 4.7.
> 
> V9: https://lkml.org/lkml/2016/7/25/345
>     Improve pr_err message in acpi gtdt driver.
>     Update Commit message for 7/9
>     shorten the irq mapping function name
>     Improve GTDT driver for memory-mapped timer
> 
> v8: https://lkml.org/lkml/2016/7/19/660
>     Improve "pr_fmt(fmt)" definition: add "ACPI" in front of "GTDT",
>     and also improve printk message.
>     Simplify is_timer_block and is_watchdog.
>     Merge acpi_gtdt_desc_init and gtdt_arch_timer_init into acpi_gtdt_init();
>     Delete __init in include/linux/acpi.h for GTDT API
>     Make ARM64 select GTDT.
>     Delete "#include <linux/module.h>" from acpi_gtdt.c
>     Simplify GT block parse code.
> 
> v7: https://lkml.org/lkml/2016/7/13/769
>     Move the GTDT driver to drivers/acpi/arm64
>     Add add the ARM64-specific ACPI Support maintainers in MAINTAINERS
>     Merge 3 patches of GTDT parser driver.
>     Fix the for_each_platform_timer bug.
> 
> v6: https://lkml.org/lkml/2016/6/29/580
>     split the GTDT driver to 4 parts: basic, arch_timer, memory-mapped timer,
>     and SBSA Generic Watchdog timer
>     Improve driver by suggestions and example code from Daniel Lezcano
> 
> v5: https://lkml.org/lkml/2016/5/24/356
>     Sorting out all patches, simplify the API of GTDT driver:
>     GTDT driver just fills the data struct for arm_arch_timer driver.
> 
> v4: https://lists.linaro.org/pipermail/linaro-acpi/2016-March/006667.html
>     Delete the kvm relevant patches
>     Separate two patches for sorting out the code for arm_arch_timer.
>     Improve irq info export code to allow missing irq info in GTDT table.
> 
> v3: https://lkml.org/lkml/2016/2/1/658
>     Improve GTDT driver code:
>       (1)improve pr_* by defining pr_fmt(fmt)
>       (2)simplify gtdt_sbsa_gwdt_init
>       (3)improve gtdt_arch_timer_data_init, if table is NULL, it will try
>       to get GTDT table.
>     Move enum ppi_nr to arm_arch_timer.h, and add enum spi_nr.
>     Add arm_arch_timer get ppi from DT and GTDT support for kvm.
> 
> v2: https://lkml.org/lkml/2015/12/2/10
>     Rebase to latest kernel version(4.4-rc3).
>     Fix the bug about the config problem,
>     use CONFIG_ACPI_GTDT instead of CONFIG_ACPI in arm_arch_timer.c
> 
> v1: The first upstreaming version: https://lkml.org/lkml/2015/10/28/553
> 
> Fu Wei (11):
>   clocksource: arm_arch_timer: add MMIO CNTFRQ helper
>   clocksource: arm_arch_timer: split dt-only rate handling
>   clocksource: arm_arch_timer: refactor arch_timer_needs_probing
>   clocksource: arm_arch_timer: move arch_timer_needs_of_probing into DT
>     init call
>   clocksource: arm_arch_timer: add structs to describe MMIO timer
>   clocksource: arm_arch_timer: refactor MMIO timer probing.
>   acpi/arm64: Add GTDT table parse driver
>   clocksource: arm_arch_timer: simplify ACPI support code.
>   acpi/arm64: Add memory-mapped timer support in GTDT driver
>   clocksource: arm_arch_timer: add GTDT support for memory-mapped timer
>   acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver
> 
>  arch/arm64/Kconfig                   |   1 +
>  drivers/acpi/arm64/Kconfig           |   3 +
>  drivers/acpi/arm64/Makefile          |   1 +
>  drivers/acpi/arm64/gtdt.c            | 406 +++++++++++++++++++++++++++++++++++
>  drivers/clocksource/arm_arch_timer.c | 338 ++++++++++++++++++-----------
>  include/clocksource/arm_arch_timer.h |  16 ++
>  include/linux/acpi.h                 |   7 +
>  7 files changed, 648 insertions(+), 124 deletions(-)
>  create mode 100644 drivers/acpi/arm64/gtdt.c
> 


WARNING: multiple messages have this Message-ID (diff)
From: Xiongfeng Wang <wangxiongfeng2@huawei.com>
To: <fu.wei@linaro.org>, <rjw@rjwysocki.net>, <lenb@kernel.org>,
	<daniel.lezcano@linaro.org>, <tglx@linutronix.de>,
	<marc.zyngier@arm.com>, <mark.rutland@arm.com>,
	<lorenzo.pieralisi@arm.com>, <sudeep.holla@arm.com>,
	<hanjun.guo@linaro.org>
Cc: <linaro-acpi@lists.linaro.org>, <catalin.marinas@arm.com>,
	<will.deacon@arm.com>, <linux-kernel@vger.kernel.org>,
	<wim@iguana.be>, <wei@redhat.com>, <al.stone@linaro.org>,
	<tn@semihalf.com>, <timur@codeaurora.org>,
	<linux-acpi@vger.kernel.org>, <linux@roeck-us.net>,
	<harba@codeaurora.org>, <julien.grall@arm.com>,
	<linux-watchdog@vger.kernel.org>, <arnd@arndb.de>,
	<jcm@redhat.com>, <cov@codeaurora.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<graeme.gregory@linaro.org>, <rruigrok@codeaurora.org>,
	<leo.duran@amd.com>, <Suravee.Suthikulpanit@amd.com>,
	<christoffer.dall@linaro.org>
Subject: Re: [PATCH v23 00/11] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer
Date: Sat, 1 Apr 2017 10:14:10 +0800	[thread overview]
Message-ID: <8c017a47-02d5-454d-f42c-a1b5bb29df1b@huawei.com> (raw)
In-Reply-To: <20170331175105.8370-1-fu.wei@linaro.org>



On 2017/4/1 1:50, fu.wei@linaro.org wrote:
> From: Fu Wei <fu.wei@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_cntfrq directly
>         4. Refactor arch_timer_needs_probing, and move it into DT init call
>         5. Introduce some new structs and refactor the MMIO timer init code
>         for reusing some common code.
> 
>     (2)Introduce ACPI GTDT parser: drivers/acpi/arm64/acpi_gtdt.c
>     Parse all kinds of timer in GTDT table of ACPI:arch timer,
>     memory-mapped timer and SBSA Generic Watchdog timer.
>     This driver can help to simplify all the relevant timer drivers,
>     and separate all the ACPI GTDT knowledge from them.
> 
>     (3)Simplify ACPI code for arm_arch_timer
> 
>     (4)Add GTDT support for ARM memory-mapped timer.
> 
> This patchset has been tested on the following platforms with ACPI enabled:
>     (1)ARM Foundation v8 model
> 

for arm_arch_timer(not memory-mapped) and sbsa watchdog part,  Tested-by: wangxiongfeng2@huawei.com





Thanks,

Wang Xiongfeng
.

> Changelog:
> v23: https://lkml.org/lkml/2017/3/31/
>      Rebase to git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arch-timer/cleanup
>      Improve the data struct of arch_timer_mem and arch_timer_mem_frame to
>      improve the parser of GT blocks and arch_timer_mem initualization.
>      Improve arch_timer_rate detection: sysreg frequency is primary in DT boot
>      Improve some comments in GTDT parser driver.
>      Improve acpi_gtdt_init function, and make a comment for the multiple calls.
>      Improve the unwinding for the irq of timers, when an error occurs.
>      Handle the case of virtual timer GSIV is 0.
> 
> v22: https://lkml.org/lkml/2017/3/21/523
>      Rebase to git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arch-timer/cleanup
>      Only Introduce arch_timer_mem_get_cntfrq to get the frequency from mmio.
>      Merged patch 2,3(about arch_timer_detect_rate).
>      Keep arch_timer_rate, do NOT split it for different types of timer.
>      Improve  memory-mapped timer support by comments and variable name:
>          data-->timer_mem
>          frame-->gtdt_frame
>      Delete zero check for SBSA watchdog irq.
>      Skip secure SBSA watchdog in GTDT driver.
>      Delete Kconfig modification for SBSA watchdog driver.
>      Delete no_irq, using nr_res instead.
> 
> v21: https://lkml.org/lkml/2017/2/6/734
>      Introduce two functions to get the frequency from mmio and sysreg.
>      Remove arch_timer_detect_rate use arch_timer_get_*_freq directly
>      Split arch_timer_rate for different types of timer.
>      Skip secure timer frame in GTDT driver.
>      Rebase to git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arch-timer/cleanup
>      (The first 6 patches in v20 have been merged into arch-timer/cleanup branch)
> 
> v20: https://lkml.org/lkml/2017/1/18/534
>      Reorder the first 4 patches and split the 4th patches.
>      Leave CNTHCTL_* as they originally were.
>      Fix the bug in arch_timer_select_ppi.
>      Split "Rework counter frequency detection" patch.
>      Rework the arch_timer_detect_rate function.
>      Improve the commit message of "Refactor MMIO timer probing".
>      Rebase to 4.10.0-rc4
> 
> v19: https://lkml.org/lkml/2016/12/21/25
>      Fix a '\n' missing in a error message in arch_timer_mem_init.
>      Add "request_mem_region" for ioremapping cntbase, according to
>      f947ee1 clocksource/drivers/arm_arch_timer: Map frame with of_io_request_and_map()
>      Rebase to 4.9.0-gfb779ff
> 
> v18: https://lkml.org/lkml/2016/12/8/446
>      Fix 8/15 patch problem of "int ret;" in arch_timer_acpi_init.
>      Rebase to 4.9.0-rc8-g9269898
> 
> v17: https://lkml.org/lkml/2016/11/25/140
>      Take out some cleanups from 4/15.
>      Merge 5/15 and 6/15, improve PPI determination code,
>      improve commit message.
>      Rework counter frequency detection.
>      Move arch_timer_needs_of_probing into DT init call.
>      Move Platform Timer scan loop back to timer init call to avoid allocating
>      and free memory.
>      Improve all the exported functions' comment.
> 
> v16: https://lkml.org/lkml/2016/11/16/268
>      Fix patchset problem about static enum ppi_nr of 01/13 in v15.
>      Refactor arch_timer_detect_rate.
>      Refactor arch_timer_needs_probing.
> 
> v15: https://lkml.org/lkml/2016/11/15/366
>      Re-order patches
>      Add arm_arch_timer refactoring patches to prepare for GTDT:
>          1. rename some  enums and defines, and some cleanups
>          2. separate out arch_timer_uses_ppi init code and fix a potential bug
>          3. Improve some new structs, refactor the timer init code.
>      Since the some structs have been changed, GTDT parser for memory-mapped
>      timer and SBSA Generic Watchdog timer have been update.
> 
> v14: https://lkml.org/lkml/2016/9/28/573
>      Separate memory-mapped timer GTDT support into two patches
>          1. Refactor the timer init code to prepare for GTDT
>          2. Add GTDT support for memory-mapped timer
> 
> v13: http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1231717.html
>      Improve arm_arch_timer code for memory-mapped
>      timer GTDT support, refactor original memory-mapped timer
>      dt support for reusing some common code.
> 
> v12: https://lkml.org/lkml/2016/9/13/250
>      Rebase to latest Linux 4.8-rc6
>      Delete the confusing "skipping" in the error message.
> 
> V11: https://lkml.org/lkml/2016/9/6/354
>      Rebase to latest Linux 4.8-rc5
>      Delete typedef (suggested by checkpatch.pl)
> 
> V10: https://lkml.org/lkml/2016/7/26/215
>      Drop the "readq" patch.
>      Rebase to latest Linux 4.7.
> 
> V9: https://lkml.org/lkml/2016/7/25/345
>     Improve pr_err message in acpi gtdt driver.
>     Update Commit message for 7/9
>     shorten the irq mapping function name
>     Improve GTDT driver for memory-mapped timer
> 
> v8: https://lkml.org/lkml/2016/7/19/660
>     Improve "pr_fmt(fmt)" definition: add "ACPI" in front of "GTDT",
>     and also improve printk message.
>     Simplify is_timer_block and is_watchdog.
>     Merge acpi_gtdt_desc_init and gtdt_arch_timer_init into acpi_gtdt_init();
>     Delete __init in include/linux/acpi.h for GTDT API
>     Make ARM64 select GTDT.
>     Delete "#include <linux/module.h>" from acpi_gtdt.c
>     Simplify GT block parse code.
> 
> v7: https://lkml.org/lkml/2016/7/13/769
>     Move the GTDT driver to drivers/acpi/arm64
>     Add add the ARM64-specific ACPI Support maintainers in MAINTAINERS
>     Merge 3 patches of GTDT parser driver.
>     Fix the for_each_platform_timer bug.
> 
> v6: https://lkml.org/lkml/2016/6/29/580
>     split the GTDT driver to 4 parts: basic, arch_timer, memory-mapped timer,
>     and SBSA Generic Watchdog timer
>     Improve driver by suggestions and example code from Daniel Lezcano
> 
> v5: https://lkml.org/lkml/2016/5/24/356
>     Sorting out all patches, simplify the API of GTDT driver:
>     GTDT driver just fills the data struct for arm_arch_timer driver.
> 
> v4: https://lists.linaro.org/pipermail/linaro-acpi/2016-March/006667.html
>     Delete the kvm relevant patches
>     Separate two patches for sorting out the code for arm_arch_timer.
>     Improve irq info export code to allow missing irq info in GTDT table.
> 
> v3: https://lkml.org/lkml/2016/2/1/658
>     Improve GTDT driver code:
>       (1)improve pr_* by defining pr_fmt(fmt)
>       (2)simplify gtdt_sbsa_gwdt_init
>       (3)improve gtdt_arch_timer_data_init, if table is NULL, it will try
>       to get GTDT table.
>     Move enum ppi_nr to arm_arch_timer.h, and add enum spi_nr.
>     Add arm_arch_timer get ppi from DT and GTDT support for kvm.
> 
> v2: https://lkml.org/lkml/2015/12/2/10
>     Rebase to latest kernel version(4.4-rc3).
>     Fix the bug about the config problem,
>     use CONFIG_ACPI_GTDT instead of CONFIG_ACPI in arm_arch_timer.c
> 
> v1: The first upstreaming version: https://lkml.org/lkml/2015/10/28/553
> 
> Fu Wei (11):
>   clocksource: arm_arch_timer: add MMIO CNTFRQ helper
>   clocksource: arm_arch_timer: split dt-only rate handling
>   clocksource: arm_arch_timer: refactor arch_timer_needs_probing
>   clocksource: arm_arch_timer: move arch_timer_needs_of_probing into DT
>     init call
>   clocksource: arm_arch_timer: add structs to describe MMIO timer
>   clocksource: arm_arch_timer: refactor MMIO timer probing.
>   acpi/arm64: Add GTDT table parse driver
>   clocksource: arm_arch_timer: simplify ACPI support code.
>   acpi/arm64: Add memory-mapped timer support in GTDT driver
>   clocksource: arm_arch_timer: add GTDT support for memory-mapped timer
>   acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver
> 
>  arch/arm64/Kconfig                   |   1 +
>  drivers/acpi/arm64/Kconfig           |   3 +
>  drivers/acpi/arm64/Makefile          |   1 +
>  drivers/acpi/arm64/gtdt.c            | 406 +++++++++++++++++++++++++++++++++++
>  drivers/clocksource/arm_arch_timer.c | 338 ++++++++++++++++++-----------
>  include/clocksource/arm_arch_timer.h |  16 ++
>  include/linux/acpi.h                 |   7 +
>  7 files changed, 648 insertions(+), 124 deletions(-)
>  create mode 100644 drivers/acpi/arm64/gtdt.c
> 

WARNING: multiple messages have this Message-ID (diff)
From: wangxiongfeng2@huawei.com (Xiongfeng Wang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v23 00/11] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer
Date: Sat, 1 Apr 2017 10:14:10 +0800	[thread overview]
Message-ID: <8c017a47-02d5-454d-f42c-a1b5bb29df1b@huawei.com> (raw)
In-Reply-To: <20170331175105.8370-1-fu.wei@linaro.org>



On 2017/4/1 1:50, fu.wei at linaro.org wrote:
> From: Fu Wei <fu.wei@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_cntfrq directly
>         4. Refactor arch_timer_needs_probing, and move it into DT init call
>         5. Introduce some new structs and refactor the MMIO timer init code
>         for reusing some common code.
> 
>     (2)Introduce ACPI GTDT parser: drivers/acpi/arm64/acpi_gtdt.c
>     Parse all kinds of timer in GTDT table of ACPI:arch timer,
>     memory-mapped timer and SBSA Generic Watchdog timer.
>     This driver can help to simplify all the relevant timer drivers,
>     and separate all the ACPI GTDT knowledge from them.
> 
>     (3)Simplify ACPI code for arm_arch_timer
> 
>     (4)Add GTDT support for ARM memory-mapped timer.
> 
> This patchset has been tested on the following platforms with ACPI enabled:
>     (1)ARM Foundation v8 model
> 

for arm_arch_timer(not memory-mapped) and sbsa watchdog part,  Tested-by: wangxiongfeng2 at huawei.com





Thanks,

Wang Xiongfeng
.

> Changelog:
> v23: https://lkml.org/lkml/2017/3/31/
>      Rebase to git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arch-timer/cleanup
>      Improve the data struct of arch_timer_mem and arch_timer_mem_frame to
>      improve the parser of GT blocks and arch_timer_mem initualization.
>      Improve arch_timer_rate detection: sysreg frequency is primary in DT boot
>      Improve some comments in GTDT parser driver.
>      Improve acpi_gtdt_init function, and make a comment for the multiple calls.
>      Improve the unwinding for the irq of timers, when an error occurs.
>      Handle the case of virtual timer GSIV is 0.
> 
> v22: https://lkml.org/lkml/2017/3/21/523
>      Rebase to git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arch-timer/cleanup
>      Only Introduce arch_timer_mem_get_cntfrq to get the frequency from mmio.
>      Merged patch 2,3(about arch_timer_detect_rate).
>      Keep arch_timer_rate, do NOT split it for different types of timer.
>      Improve  memory-mapped timer support by comments and variable name:
>          data-->timer_mem
>          frame-->gtdt_frame
>      Delete zero check for SBSA watchdog irq.
>      Skip secure SBSA watchdog in GTDT driver.
>      Delete Kconfig modification for SBSA watchdog driver.
>      Delete no_irq, using nr_res instead.
> 
> v21: https://lkml.org/lkml/2017/2/6/734
>      Introduce two functions to get the frequency from mmio and sysreg.
>      Remove arch_timer_detect_rate use arch_timer_get_*_freq directly
>      Split arch_timer_rate for different types of timer.
>      Skip secure timer frame in GTDT driver.
>      Rebase to git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arch-timer/cleanup
>      (The first 6 patches in v20 have been merged into arch-timer/cleanup branch)
> 
> v20: https://lkml.org/lkml/2017/1/18/534
>      Reorder the first 4 patches and split the 4th patches.
>      Leave CNTHCTL_* as they originally were.
>      Fix the bug in arch_timer_select_ppi.
>      Split "Rework counter frequency detection" patch.
>      Rework the arch_timer_detect_rate function.
>      Improve the commit message of "Refactor MMIO timer probing".
>      Rebase to 4.10.0-rc4
> 
> v19: https://lkml.org/lkml/2016/12/21/25
>      Fix a '\n' missing in a error message in arch_timer_mem_init.
>      Add "request_mem_region" for ioremapping cntbase, according to
>      f947ee1 clocksource/drivers/arm_arch_timer: Map frame with of_io_request_and_map()
>      Rebase to 4.9.0-gfb779ff
> 
> v18: https://lkml.org/lkml/2016/12/8/446
>      Fix 8/15 patch problem of "int ret;" in arch_timer_acpi_init.
>      Rebase to 4.9.0-rc8-g9269898
> 
> v17: https://lkml.org/lkml/2016/11/25/140
>      Take out some cleanups from 4/15.
>      Merge 5/15 and 6/15, improve PPI determination code,
>      improve commit message.
>      Rework counter frequency detection.
>      Move arch_timer_needs_of_probing into DT init call.
>      Move Platform Timer scan loop back to timer init call to avoid allocating
>      and free memory.
>      Improve all the exported functions' comment.
> 
> v16: https://lkml.org/lkml/2016/11/16/268
>      Fix patchset problem about static enum ppi_nr of 01/13 in v15.
>      Refactor arch_timer_detect_rate.
>      Refactor arch_timer_needs_probing.
> 
> v15: https://lkml.org/lkml/2016/11/15/366
>      Re-order patches
>      Add arm_arch_timer refactoring patches to prepare for GTDT:
>          1. rename some  enums and defines, and some cleanups
>          2. separate out arch_timer_uses_ppi init code and fix a potential bug
>          3. Improve some new structs, refactor the timer init code.
>      Since the some structs have been changed, GTDT parser for memory-mapped
>      timer and SBSA Generic Watchdog timer have been update.
> 
> v14: https://lkml.org/lkml/2016/9/28/573
>      Separate memory-mapped timer GTDT support into two patches
>          1. Refactor the timer init code to prepare for GTDT
>          2. Add GTDT support for memory-mapped timer
> 
> v13: http://www.mail-archive.com/linux-kernel at vger.kernel.org/msg1231717.html
>      Improve arm_arch_timer code for memory-mapped
>      timer GTDT support, refactor original memory-mapped timer
>      dt support for reusing some common code.
> 
> v12: https://lkml.org/lkml/2016/9/13/250
>      Rebase to latest Linux 4.8-rc6
>      Delete the confusing "skipping" in the error message.
> 
> V11: https://lkml.org/lkml/2016/9/6/354
>      Rebase to latest Linux 4.8-rc5
>      Delete typedef (suggested by checkpatch.pl)
> 
> V10: https://lkml.org/lkml/2016/7/26/215
>      Drop the "readq" patch.
>      Rebase to latest Linux 4.7.
> 
> V9: https://lkml.org/lkml/2016/7/25/345
>     Improve pr_err message in acpi gtdt driver.
>     Update Commit message for 7/9
>     shorten the irq mapping function name
>     Improve GTDT driver for memory-mapped timer
> 
> v8: https://lkml.org/lkml/2016/7/19/660
>     Improve "pr_fmt(fmt)" definition: add "ACPI" in front of "GTDT",
>     and also improve printk message.
>     Simplify is_timer_block and is_watchdog.
>     Merge acpi_gtdt_desc_init and gtdt_arch_timer_init into acpi_gtdt_init();
>     Delete __init in include/linux/acpi.h for GTDT API
>     Make ARM64 select GTDT.
>     Delete "#include <linux/module.h>" from acpi_gtdt.c
>     Simplify GT block parse code.
> 
> v7: https://lkml.org/lkml/2016/7/13/769
>     Move the GTDT driver to drivers/acpi/arm64
>     Add add the ARM64-specific ACPI Support maintainers in MAINTAINERS
>     Merge 3 patches of GTDT parser driver.
>     Fix the for_each_platform_timer bug.
> 
> v6: https://lkml.org/lkml/2016/6/29/580
>     split the GTDT driver to 4 parts: basic, arch_timer, memory-mapped timer,
>     and SBSA Generic Watchdog timer
>     Improve driver by suggestions and example code from Daniel Lezcano
> 
> v5: https://lkml.org/lkml/2016/5/24/356
>     Sorting out all patches, simplify the API of GTDT driver:
>     GTDT driver just fills the data struct for arm_arch_timer driver.
> 
> v4: https://lists.linaro.org/pipermail/linaro-acpi/2016-March/006667.html
>     Delete the kvm relevant patches
>     Separate two patches for sorting out the code for arm_arch_timer.
>     Improve irq info export code to allow missing irq info in GTDT table.
> 
> v3: https://lkml.org/lkml/2016/2/1/658
>     Improve GTDT driver code:
>       (1)improve pr_* by defining pr_fmt(fmt)
>       (2)simplify gtdt_sbsa_gwdt_init
>       (3)improve gtdt_arch_timer_data_init, if table is NULL, it will try
>       to get GTDT table.
>     Move enum ppi_nr to arm_arch_timer.h, and add enum spi_nr.
>     Add arm_arch_timer get ppi from DT and GTDT support for kvm.
> 
> v2: https://lkml.org/lkml/2015/12/2/10
>     Rebase to latest kernel version(4.4-rc3).
>     Fix the bug about the config problem,
>     use CONFIG_ACPI_GTDT instead of CONFIG_ACPI in arm_arch_timer.c
> 
> v1: The first upstreaming version: https://lkml.org/lkml/2015/10/28/553
> 
> Fu Wei (11):
>   clocksource: arm_arch_timer: add MMIO CNTFRQ helper
>   clocksource: arm_arch_timer: split dt-only rate handling
>   clocksource: arm_arch_timer: refactor arch_timer_needs_probing
>   clocksource: arm_arch_timer: move arch_timer_needs_of_probing into DT
>     init call
>   clocksource: arm_arch_timer: add structs to describe MMIO timer
>   clocksource: arm_arch_timer: refactor MMIO timer probing.
>   acpi/arm64: Add GTDT table parse driver
>   clocksource: arm_arch_timer: simplify ACPI support code.
>   acpi/arm64: Add memory-mapped timer support in GTDT driver
>   clocksource: arm_arch_timer: add GTDT support for memory-mapped timer
>   acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver
> 
>  arch/arm64/Kconfig                   |   1 +
>  drivers/acpi/arm64/Kconfig           |   3 +
>  drivers/acpi/arm64/Makefile          |   1 +
>  drivers/acpi/arm64/gtdt.c            | 406 +++++++++++++++++++++++++++++++++++
>  drivers/clocksource/arm_arch_timer.c | 338 ++++++++++++++++++-----------
>  include/clocksource/arm_arch_timer.h |  16 ++
>  include/linux/acpi.h                 |   7 +
>  7 files changed, 648 insertions(+), 124 deletions(-)
>  create mode 100644 drivers/acpi/arm64/gtdt.c
> 

  parent reply	other threads:[~2017-04-01  2:15 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-31 17:50 [PATCH v23 00/11] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer fu.wei
2017-03-31 17:50 ` fu.wei at linaro.org
2017-03-31 17:50 ` [PATCH v23 01/11] clocksource: arm_arch_timer: add MMIO CNTFRQ helper fu.wei
2017-03-31 17:50   ` fu.wei at linaro.org
2017-03-31 17:50 ` [PATCH v23 02/11] clocksource: arm_arch_timer: split dt-only rate handling fu.wei
2017-03-31 17:50   ` fu.wei at linaro.org
2017-03-31 17:50 ` [PATCH v23 03/11] clocksource: arm_arch_timer: refactor arch_timer_needs_probing fu.wei
2017-03-31 17:50   ` fu.wei at linaro.org
2017-03-31 17:50 ` [PATCH v23 04/11] clocksource: arm_arch_timer: move arch_timer_needs_of_probing into DT init call fu.wei
2017-03-31 17:50   ` fu.wei at linaro.org
2017-03-31 17:50 ` [PATCH v23 05/11] clocksource: arm_arch_timer: add structs to describe MMIO timer fu.wei
2017-03-31 17:50   ` fu.wei at linaro.org
2017-03-31 17:51 ` [PATCH v23 06/11] clocksource: arm_arch_timer: refactor MMIO timer probing fu.wei
2017-03-31 17:51   ` fu.wei at linaro.org
2017-04-05 18:42   ` Mark Rutland
2017-04-05 18:42     ` Mark Rutland
2017-04-06 10:45     ` Fu Wei
2017-04-06 10:45       ` Fu Wei
2017-04-06 10:45       ` Fu Wei
2017-03-31 17:51 ` [PATCH v23 07/11] acpi/arm64: Add GTDT table parse driver fu.wei
2017-03-31 17:51   ` fu.wei at linaro.org
2017-03-31 17:51 ` [PATCH v23 08/11] clocksource: arm_arch_timer: simplify ACPI support code fu.wei
2017-03-31 17:51   ` fu.wei at linaro.org
2017-03-31 17:51 ` [PATCH v23 09/11] acpi/arm64: Add memory-mapped timer support in GTDT driver fu.wei
2017-03-31 17:51   ` fu.wei at linaro.org
2017-04-03  9:49   ` Will Deacon
2017-04-03  9:49     ` Will Deacon
     [not found]   ` <20170331175105.8370-10-fu.wei-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-04-03 10:45     ` Lorenzo Pieralisi
2017-04-03 10:45       ` Lorenzo Pieralisi
2017-04-03 10:45       ` Lorenzo Pieralisi
2017-04-06 17:11       ` Fu Wei
2017-04-06 17:11         ` Fu Wei
2017-04-06 17:11         ` Fu Wei
2017-04-05 18:38     ` Mark Rutland
2017-04-05 18:38       ` Mark Rutland
2017-04-05 18:38       ` Mark Rutland
2017-04-06 10:07       ` Mark Rutland
2017-04-06 10:07         ` Mark Rutland
2017-04-06 16:47       ` Fu Wei
2017-04-06 16:47         ` Fu Wei
2017-04-06 16:47         ` Fu Wei
     [not found]         ` <CADyBb7sz6ongbyqR0FzBZybJBYwnLvqV+NsX1+W=6tv0_vLt1g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-06 17:24           ` Mark Rutland
2017-04-06 17:24             ` Mark Rutland
2017-04-06 17:24             ` Mark Rutland
2017-04-06 17:39             ` Fu Wei
2017-04-06 17:39               ` Fu Wei
2017-04-06 17:39               ` Fu Wei
2017-04-06 17:52               ` Mark Rutland
2017-04-06 17:52                 ` Mark Rutland
2017-04-06 17:52                 ` Mark Rutland
2017-04-06 18:07                 ` Fu Wei
2017-04-06 18:07                   ` Fu Wei
2017-04-06 18:07                   ` Fu Wei
2017-03-31 17:51 ` [PATCH v23 10/11] clocksource: arm_arch_timer: add GTDT support for memory-mapped timer fu.wei
2017-03-31 17:51   ` fu.wei at linaro.org
2017-03-31 17:51 ` [PATCH v23 11/11] acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver fu.wei
2017-03-31 17:51   ` fu.wei at linaro.org
2017-03-31 17:51   ` fu.wei
2017-04-01  2:14 ` Xiongfeng Wang [this message]
2017-04-01  2:14   ` [PATCH v23 00/11] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer Xiongfeng Wang
2017-04-01  2:14   ` Xiongfeng Wang
     [not found]   ` <8c017a47-02d5-454d-f42c-a1b5bb29df1b-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2017-04-01  3:49     ` Fu Wei
2017-04-01  3:49       ` Fu Wei
2017-04-01  3:49       ` Fu Wei
2017-04-04 20:39 ` Timur Tabi
2017-04-04 20:39   ` Timur Tabi

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=8c017a47-02d5-454d-f42c-a1b5bb29df1b@huawei.com \
    --to=wangxiongfeng2@huawei.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=mark.rutland@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.