mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-05-24 10:39:52 +00:00

Some Power9 revisions can run in a mode where TM operates without suspended state. If we find ourself on a CPU that might be in this mode, we query OPAL to check, and if so we reenable TM in CPU features, and enable a new user feature to signal to userspace that we are in this mode. We do not enable the "normal" user feature, PPC_FEATURE2_HTM, but we do enable PPC_FEATURE2_HTM_NOSC because that indicates to userspace that the kernel will abort transactions on syscall entry, which is true regardless of the suspend mode. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
24 lines
706 B
C
24 lines
706 B
C
/*
|
|
* Transactional memory support routines to reclaim and recheckpoint
|
|
* transactional process state.
|
|
*
|
|
* Copyright 2012 Matt Evans & Michael Neuling, IBM Corporation.
|
|
*/
|
|
|
|
#include <uapi/asm/tm.h>
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
extern void tm_enable(void);
|
|
extern void tm_reclaim(struct thread_struct *thread,
|
|
unsigned long orig_msr, uint8_t cause);
|
|
extern void tm_reclaim_current(uint8_t cause);
|
|
extern void tm_recheckpoint(struct thread_struct *thread,
|
|
unsigned long orig_msr);
|
|
extern void tm_abort(uint8_t cause);
|
|
extern void tm_save_sprs(struct thread_struct *thread);
|
|
extern void tm_restore_sprs(struct thread_struct *thread);
|
|
|
|
extern bool tm_suspend_disabled;
|
|
|
|
#endif /* __ASSEMBLY__ */
|