All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/7] riscv: Correctly handle IPIs already pending upon boot
@ 2020-09-14 14:22 Sean Anderson
  2020-09-14 14:22 ` [PATCH v2 1/7] Revert "riscv: Clear pending interrupts before enabling IPIs" Sean Anderson
                   ` (6 more replies)
  0 siblings, 7 replies; 25+ messages in thread
From: Sean Anderson @ 2020-09-14 14:22 UTC (permalink / raw)
  To: u-boot

On the K210, the prior stage bootloader does not clear IPIs. This presents
a problem, because U-Boot up until this point assumes (with one exception)
that IPIs are cleared when it starts. This series attempts to fix this in a
robust manner, and fix several concurrency bugs I noticed while fixing
these other areas. Heinrich previously submitted a patch addressing part of
this problem in [1].

[1] https://patchwork.ozlabs.org/project/uboot/patch/20200811035648.3284-1-xypron.glpk at gmx.de/

Changes in v2:
- Use a valid bit instead of addr to validate IPIs
- Make riscv_ipi_init_secondary_hart static
- Remove fences after amoswaps
- Set gp early with XIP
- Clarify comments regarding tp

Sean Anderson (7):
  Revert "riscv: Clear pending interrupts before enabling IPIs"
  riscv: Match memory barriers between send_ipi_many and handle_ipi
  riscv: Use a valid bit to ignore already-pending IPIs
  riscv: Clear pending IPIs on initialization
  riscv: Consolidate fences into AMOs for available_harts_lock
  riscv: Ensure gp is NULL or points to valid data
  riscv: Add some comments to start.S

 arch/riscv/cpu/cpu.c         | 18 ++++++++++++
 arch/riscv/cpu/start.S       | 56 +++++++++++++++++++++++++++---------
 arch/riscv/include/asm/smp.h |  7 +++++
 arch/riscv/lib/interrupts.c  |  3 +-
 arch/riscv/lib/smp.c         | 16 ++++++++++-
 5 files changed, 85 insertions(+), 15 deletions(-)

-- 
2.28.0

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

end of thread, other threads:[~2020-09-17 11:15 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-14 14:22 [PATCH v2 0/7] riscv: Correctly handle IPIs already pending upon boot Sean Anderson
2020-09-14 14:22 ` [PATCH v2 1/7] Revert "riscv: Clear pending interrupts before enabling IPIs" Sean Anderson
2020-09-15  6:31   ` Bin Meng
2020-09-14 14:22 ` [PATCH v2 2/7] riscv: Match memory barriers between send_ipi_many and handle_ipi Sean Anderson
2020-09-15  8:40   ` Rick Chen
2020-09-17 11:12   ` Leo Liang
2020-09-14 14:22 ` [PATCH v2 3/7] riscv: Use a valid bit to ignore already-pending IPIs Sean Anderson
2020-09-15  6:35   ` Bin Meng
2020-09-15  8:45   ` Rick Chen
2020-09-17 11:14   ` Leo Liang
2020-09-14 14:23 ` [PATCH v2 4/7] riscv: Clear pending IPIs on initialization Sean Anderson
2020-09-15  9:15   ` Rick Chen
2020-09-15 10:11     ` Sean Anderson
2020-09-16  1:11       ` Rick Chen
2020-09-14 14:23 ` [PATCH v2 5/7] riscv: Consolidate fences into AMOs for available_harts_lock Sean Anderson
2020-09-15  6:36   ` Bin Meng
2020-09-16  1:13   ` Rick Chen
2020-09-14 14:23 ` [PATCH v2 6/7] riscv: Ensure gp is NULL or points to valid data Sean Anderson
2020-09-15  6:50   ` Bin Meng
     [not found]   ` <752D002CFF5D0F4FA35C0100F1D73F3FA4743806@ATCPCS16.andestech.com>
2020-09-16  2:23     ` Rick Chen
2020-09-16 10:56       ` Sean Anderson
2020-09-14 14:23 ` [PATCH v2 7/7] riscv: Add some comments to start.S Sean Anderson
2020-09-15  6:52   ` Bin Meng
2020-09-16  7:17   ` Rick Chen
2020-09-17 11:15   ` Leo Liang

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.