Skip to content

ARM: Add support for Hisilicon Kunpeng L3 cache controller

Zhen Lei linux-arm-kernel linux-devicetree lkml 7 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest4 patches 4 repliesIn review
  2. v64 patches 5 repliesSuperseded
  3. v54 patches 18 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v43 patches0 repliesSuperseded
v33 patches7 repliesSuperseded
v21 patch2 repliesSuperseded
v11 patch10 repliesSuperseded

Changes in v7 from the cover letter

1. Change all readl()/writel() to _relaxed(), add the corresponding description to the code.
2. Delete the unnecessary spinlock protection in l3cache_init().

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4ARM: LPAE: Use phys_addr_t instead of unsigned long in outercache hooksarch/arm/include/asm/outercache.h arch/arm/mm/cache-feroceon-l2.c arch/arm/mm/cache-l2x0.c +3 more+75 -290 replies
2/4ARM: hisi: add support for Kunpeng50x SoCarch/arm/mach-hisi/Kconfig+6 -00 replies
3/4dt-bindings: arm: hisilicon: Add binding for Kunpeng L3 cache controllerDocumentation/devicetree/bindings/arm/hisilicon/kunpeng-l3cache.yaml+40 -01 reply
4/4ARM: Add support for Hisilicon Kunpeng L3 cache controllerarch/arm/mm/Kconfig arch/arm/mm/Makefile arch/arm/mm/cache-kunpeng-l3.c+189 -03 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchArnd BergmannRob Herring
1/4R-b
2/4R-b
3/4R-b R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v7 thread

Cover letter [PATCH v7 0/4] ARM: Add support for Hisilicon Kunpeng L3 cache controller

v6 --> v7:
1. Change all readl()/writel() to _relaxed(), add the corresponding description to the code.
2. Delete the unnecessary spinlock protection in l3cache_init().

v5 --> v6:
1. Use raw_spin_lock_irqsave() instead of spin_lock_irqsave()
2. Move the macros defined in cache-kunpeng-l3.h into cache-kunpeng-l3.c, and delete that header file.
3. In some places, replace readl()/writel() with readl_relaxed()/writel_relaxed() to improve performance without affecting functions.
4. Returns 0 instead of an error code when Kunpeng L3 Cache matching failed.

Thank you for Arnd's review comments and Russell's help.

v4 --> v5:
1. Add SoC macro ARCH_KUNPENG50X, and the Kunpeng L3 cache controller only enabled on that platform.
2. Require the compatible string of the Kunpeng L3 cache controller must have a relevant name on a specific SoC. For example:
compatible = "hisilicon,kunpeng509-l3cache", "hisilicon,kunpeng-l3cache";

v3 --> v4:
Rename the compatible string from "hisilicon,l3cache" to "hisilicon,kunpeng-l3cache". Then adjust the file name, configuration option name, and description accordingly.

v2 --> v3:
Add Hisilicon L3 cache controller driver and its document. That's: patch 2-3.

v1 --> v2:
Discard the middle-tier functions and do silent narrowing cast in the outcache hook functions. For example:
-static void l2c220_inv_range(unsigned long start, unsigned long end) +static void l2c220_inv_range(phys_addr_t pa_start, phys_addr_t pa_end)
{
+ unsigned long start = pa_start;
+ unsigned long end = pa_end;

v1:
Do cast phys_addr_t to unsigned long by adding a middle-tier function. For example:
-static void l2c220_inv_range(unsigned long start, unsigned long end) +static void __l2c220_inv_range(unsigned long start, unsigned long end)
{
...
}
+static void l2c220_inv_range(phys_addr_t start, phys_addr_t end) +{
+ __l2c220_inv_range(start, end);
+}

Zhen Lei (4):
ARM: LPAE: Use phys_addr_t instead of unsigned long in outercache
hooks
ARM: hisi: add support for Kunpeng50x SoC
dt-bindings: arm: hisilicon: Add binding for Kunpeng L3 cache
controller
ARM: Add support for Hisilicon Kunpeng L3 cache controller

 .../arm/hisilicon/kunpeng-l3cache.yaml        |  40 ++++
 arch/arm/include/asm/outercache.h             |   6 +-
 arch/arm/mach-hisi/Kconfig                    |   6 +
 arch/arm/mm/Kconfig                           |  10 +
 arch/arm/mm/Makefile                          |   1 +
 arch/arm/mm/cache-feroceon-l2.c               |  15 +-
 arch/arm/mm/cache-kunpeng-l3.c                | 178 ++++++++++++++++++
 arch/arm/mm/cache-l2x0.c                      |  50 +++--
 arch/arm/mm/cache-tauros2.c                   |  15 +-
 arch/arm/mm/cache-uniphier.c                  |   6 +-
 arch/arm/mm/cache-xsc3l2.c                    |  12 +-
 11 files changed, 310 insertions(+), 29 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/hisilicon/kunpeng-l3cache.yaml
 create mode 100644 arch/arm/mm/cache-kunpeng-l3.c
Signature · 1 line
2.26.0.106.g9fadedd