arm64: Dereference CPU operations indirectly
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest4 patches 5 repliesIn review
- v45 patches 9 repliesSuperseded
- v35 patches 3 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 4 patches | 3 replies | Superseded | |
| v1 | 4 patches | 2 replies | Superseded |
Changes in v5 from the cover letter
* Rebase to 5.6.rc6 and retest (Gavin Shan) * Improved commit log for PATCH[1] (Gavin Shan) * Add helper function __cpu_try_die() (Mark Rutland)
* Two pointers to track the operations for boot CPU
and the secondary CPUs separately (Mark Rutland)
* Drop PATCH[5] because @cpu parameter is still
needed by get_cpu_ops() (Gavin Shan)
Patches in v5 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | arm64: Declare ACPI parking protocol CPU operation if neededarch/ | +2 | 0 replies | |
| 2/4 | arm64: Rename cpu_read_ops() to init_cpu_ops()arch/ arch/ arch/ +1 more | +6 | 0 replies | |
| 3/4 | arm64: Introduce get_cpu_ops() helper functionarch/ arch/ arch/ +2 more | +62 | 1 reply | |
| 4/4 | arm64: Remove CPU operations dereferencing arrayarch/ | +39 | 2 replies |
Reviews trailers per patch
3 of 4 patches have a Reviewed-by or Acked-by.
| Patch | Mark Rutland |
|---|---|
| 1/4 | A-b |
| 2/4 | A-b |
| 3/4 | A-b |
| 4/4 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v5 0/4] arm64: Dereference CPU operations indirectly
The subject perhaps can't precisely indicate what this series does, but keep it same as before for consistency.
In current implementation, an array (@cpu_ops[NR_CPUS]) is maintained to dereference the CPU operations. 2KB memory are consumed when NR_CPUS is configured to 256. It's too much than what I expected. This series reworks the implementation to dereference the CPU operations by using two CPU operations pointer with assumption - all secondary CPUs should have unified CPU operations. With this, 16-bytes memory will be used for same purpose.
PATCH[1/4] isn't too much relevant, to declare ACPI parking protocol only when CONFIG_ARM64_ACPI_PARKING_PROTOCOL has been enabled. PATCH[2/4] renames cpu_read_ops() to init_cpu_ops(), which is obviously more precise because it's initializing the CPU operations. PATCH[3/4] introduces get_cpu_ops(), preparing for droping the array of CPU operations. PATCH[4/4] removes the CPU operations deferencing array and replaces it with two pointers with the assumption: all secondary CPUs should have same enablement method.
Changelog
=========
v5:
* Rebase to 5.6.rc6 and retest (Gavin Shan) * Improved commit log for PATCH[1] (Gavin Shan) * Add helper function __cpu_try_die() (Mark Rutland)
* Two pointers to track the operations for boot CPU
and the secondary CPUs separately (Mark Rutland)
* Drop PATCH[5] because @cpu parameter is still
needed by get_cpu_ops() (Gavin Shan)
v4:
* Rebase to 5.6.rc3 and retest (Gavin Shan)
* Improved commit log for PATCH[4/5] with link tag (Lorenzo Pieralisi)
* Using pointer instead of index to dereference the
unified CPU operations (Lorenzo Pieralisi)
* Merge logic of cpu_get_ops() to get_cpu_method() (Gavin Shan)
v3:
* Assume all CPUs have same enablement method. With this, the used memory is further squeezed from 64 bytes to 4 bytes (Lorenzo Pieralisi)
* Add PATCH[5/5] to remove argument of get_cpu_ops() (Gavin Shan)
v2:
* Pack 4 CPUs' indexes into one byte. 64 bytes are consumed in order
to get the CPU operations (Robin Murphy) * Use ARRAY_SIZE() to iterate @cpu_ops[] (Robin Murphy) * Make index-0 valid (Robin Murphy)
Gavin Shan (4):
arm64: Declare ACPI parking protocol CPU operation if needed
arm64: Rename cpu_read_ops() to init_cpu_ops()
arm64: Introduce get_cpu_ops() helper function
arm64: Remove CPU operations dereferencing array
arch/arm64/include/asm/cpu_ops.h | 8 +-- arch/arm64/kernel/cpu_ops.c | 84 +++++++++++++++++--------------- arch/arm64/kernel/cpuidle.c | 9 ++-- arch/arm64/kernel/setup.c | 8 +-- arch/arm64/kernel/smp.c | 72 +++++++++++++++++---------- 5 files changed, 107 insertions(+), 74 deletions(-)
Signature · 7 lines
2.23.0 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel