[PATCH v1 1/1] lib: s390x: add smp_cpu_setup_cur_psw_mask

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since a lot of code starts new CPUs using the current PSW mask, add a
wrapper to streamline the operation and hopefully make the code of the
tests more readable.

Signed-off-by: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>
---
 lib/s390x/smp.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/s390x/smp.h b/lib/s390x/smp.h
index f4ae973d..0bcb1999 100644
--- a/lib/s390x/smp.h
+++ b/lib/s390x/smp.h
@@ -47,4 +47,13 @@ void smp_setup(void);
 int smp_sigp(uint16_t idx, uint8_t order, unsigned long parm, uint32_t *status);
 struct lowcore *smp_get_lowcore(uint16_t idx);
 
+static inline void smp_cpu_setup_cur_psw_mask(uint16_t idx, void *addr)
+{
+	struct psw psw = {
+		.mask = extract_psw_mask(),
+		.addr = (unsigned long)addr,
+	};
+	smp_cpu_setup(idx, psw);
+}
+
 #endif
-- 
2.38.1




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux