All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 00/25] x86: Enhance MTRR functionality to support multiple CPUs
@ 2020-07-17 14:48 Simon Glass
  2020-07-17 14:48 ` [PATCH v6 01/25] x86: mp_init: Switch to livetree Simon Glass
                   ` (25 more replies)
  0 siblings, 26 replies; 34+ messages in thread
From: Simon Glass @ 2020-07-17 14:48 UTC (permalink / raw)
  To: u-boot

At present MTRRs are mirrored to the secondary CPUs only once, as those
CPUs are started up. But U-Boot may add more MTRRs later, e.g. if it
decides that a video console must be set up.

This series enhances the x86 multi-processor support to allow MTRRs to
be updated at any time. It also updates the 'mtrr' command to support
setting the MTRRs on CPUs other than the boot CPU.

Changes in v6:
- Rebase to x86/master

Changes in v5:
- Drop timing in mp_park_aps()

Changes in v4:
- Update get_bsp() to return zero when SMP is not inited
- Add a Kconfig to control this feature, enabled only on APL
- Only enable this feature of CONFIG_SMP_AP_WORK is enabled
- Allow running on the BSP if SMP is not enabled
- Update mp_next_cpu() to stop if CONFIG_SMP_AP_WORK is not enabled

Changes in v3:
- Update bsp_do_flight_plan() to say 'on the BSP'
- s/slow/slot/
- Use C code instead of assembler to read/write callback pointers
- Update commit message to mention dropping of cpu_map
- Rename flag to GD_FLG_SMP_READY
- Rename flag to GD_FLG_SMP_READY
- Add a comment to run_ap_work()
- Rename flag to GD_FLG_SMP_READY
- Update the comment for run_ap_work() to explain logical_cpu_number
- Clarify meaning of @cpu_select in mp_run_on_cpus() comment
- Update the comment for mp_park_aps()
- Add more comments on how the iterators work
- Mention that the CPU number is in hex
- Remove stray asterisk from comments
- Drop mention of cpu_map which was handled in a previous patch

Changes in v2:
- Add comments to explain what start_aps() does
- Drop change to include/dm/uclass.h
- Mention error return in get_bsp()
- Add more comments
- Rename mtrr_save_all() to mtrr_read_all()
- Add a new patch to avoid enabling SMP in SPL
- Add new patch to add AP_DEFAULT_BASE to coral's memory map
- Rename function to mtrr_write_all()
- Keep things building by temporarily renaming the function in cmd/
- Drop the renamed mtrr_set_valid_() instead of mtrr_set_valid()
- Add a new patch with more comments

Simon Glass (25):
  x86: mp_init: Switch to livetree
  x86: Move MP code into mp_init
  x86: mp_init: Avoid declarations in header files
  x86: mp_init: Switch parameter names in start_aps()
  x86: mp_init: Drop the num_cpus static variable
  x86: mtrr: Fix 'ensable' typo
  x86: mp_init: Set up the CPU numbers at the start
  x86: mp_init: Adjust bsp_init() to return more information
  x86: cpu: Remove unnecessary #ifdefs
  x86: mp: Support APs waiting for instructions
  global_data: Add a generic global_data flag for SMP state
  x86: Set the SMP flag when MP init is complete
  x86: mp: Allow running functions on multiple CPUs
  x86: mp: Park CPUs before running the OS
  x86: mp: Add iterators for CPUs
  x86: mtrr: Use MP calls to list the MTRRs
  x86: Don't enable SMP in SPL
  x86: coral: Update the memory map
  x86: mtrr: Update MTRRs on all CPUs
  x86: mtrr: Add support for writing to MTRRs on any CPU
  x86: mtrr: Update the command to use the new mtrr calls
  x86: mtrr: Restructure so command execution is in one place
  x86: mtrr: Update 'mtrr' to allow setting MTRRs on any CPU
  x86: mp: Add more comments to the module
  x86: mtrr: Enhance 'mtrr' command to list MTRRs on any CPU

 arch/x86/Kconfig                      |   7 +
 arch/x86/cpu/Makefile                 |   2 +-
 arch/x86/cpu/apollolake/Kconfig       |   1 +
 arch/x86/cpu/cpu.c                    |  58 +--
 arch/x86/cpu/i386/cpu.c               |  26 +-
 arch/x86/cpu/mp_init.c                | 528 ++++++++++++++++++++++----
 arch/x86/cpu/mtrr.c                   | 149 ++++++++
 arch/x86/include/asm/mp.h             | 137 ++++++-
 arch/x86/include/asm/mtrr.h           |  51 +++
 cmd/x86/mtrr.c                        | 148 +++++---
 doc/board/google/chromebook_coral.rst |   1 +
 include/asm-generic/global_data.h     |   1 +
 12 files changed, 924 insertions(+), 185 deletions(-)

-- 
2.28.0.rc0.105.gf9edc3c819-goog

^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2020-07-20  1:46 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-17 14:48 [PATCH v6 00/25] x86: Enhance MTRR functionality to support multiple CPUs Simon Glass
2020-07-17 14:48 ` [PATCH v6 01/25] x86: mp_init: Switch to livetree Simon Glass
2020-07-17 14:48 ` [PATCH v6 02/25] x86: Move MP code into mp_init Simon Glass
2020-07-17 14:48 ` [PATCH v6 03/25] x86: mp_init: Avoid declarations in header files Simon Glass
2020-07-17 14:48 ` [PATCH v6 04/25] x86: mp_init: Switch parameter names in start_aps() Simon Glass
2020-07-17 14:48 ` [PATCH v6 05/25] x86: mp_init: Drop the num_cpus static variable Simon Glass
2020-07-17 14:48 ` [PATCH v6 06/25] x86: mtrr: Fix 'ensable' typo Simon Glass
2020-07-17 14:48 ` [PATCH v6 07/25] x86: mp_init: Set up the CPU numbers at the start Simon Glass
2020-07-17 14:48 ` [PATCH v6 08/25] x86: mp_init: Adjust bsp_init() to return more information Simon Glass
2020-07-17 14:48 ` [PATCH v6 09/25] x86: cpu: Remove unnecessary #ifdefs Simon Glass
2020-07-17 14:48 ` [PATCH v6 10/25] x86: mp: Support APs waiting for instructions Simon Glass
2020-07-20  1:22   ` Bin Meng
2020-07-17 14:48 ` [PATCH v6 11/25] global_data: Add a generic global_data flag for SMP state Simon Glass
2020-07-20  1:23   ` Bin Meng
2020-07-17 14:48 ` [PATCH v6 12/25] x86: Set the SMP flag when MP init is complete Simon Glass
2020-07-17 14:48 ` [PATCH v6 13/25] x86: mp: Allow running functions on multiple CPUs Simon Glass
2020-07-20  1:25   ` Bin Meng
2020-07-17 14:48 ` [PATCH v6 14/25] x86: mp: Park CPUs before running the OS Simon Glass
2020-07-20  1:26   ` Bin Meng
2020-07-17 14:48 ` [PATCH v6 15/25] x86: mp: Add iterators for CPUs Simon Glass
2020-07-20  1:26   ` Bin Meng
2020-07-17 14:48 ` [PATCH v6 16/25] x86: mtrr: Use MP calls to list the MTRRs Simon Glass
2020-07-17 14:48 ` [PATCH v6 17/25] x86: Don't enable SMP in SPL Simon Glass
2020-07-17 14:48 ` [PATCH v6 18/25] x86: coral: Update the memory map Simon Glass
2020-07-17 14:48 ` [PATCH v6 19/25] x86: mtrr: Update MTRRs on all CPUs Simon Glass
2020-07-20  1:27   ` Bin Meng
2020-07-17 14:48 ` [PATCH v6 20/25] x86: mtrr: Add support for writing to MTRRs on any CPU Simon Glass
2020-07-17 14:48 ` [PATCH v6 21/25] x86: mtrr: Update the command to use the new mtrr calls Simon Glass
2020-07-17 14:48 ` [PATCH v6 22/25] x86: mtrr: Restructure so command execution is in one place Simon Glass
2020-07-17 14:48 ` [PATCH v6 23/25] x86: mtrr: Update 'mtrr' to allow setting MTRRs on any CPU Simon Glass
2020-07-17 14:48 ` [PATCH v6 24/25] x86: mp: Add more comments to the module Simon Glass
2020-07-17 14:48 ` [PATCH v6 25/25] x86: mtrr: Enhance 'mtrr' command to list MTRRs on any CPU Simon Glass
2020-07-20  1:28   ` Bin Meng
2020-07-20  1:46 ` [PATCH v6 00/25] x86: Enhance MTRR functionality to support multiple CPUs Bin Meng

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.