s390: split TIF bits into CIF, PIF and TIF bits
The oi and ni instructions used in entry[64].S to set and clear bits in the thread-flags are not guaranteed to be atomic in regard to other CPUs. Split the TIF bits into CPU, pt_regs and thread-info specific bits. Updates on the TIF bits are done with atomic instructions, updates on CPU and pt_regs bits are done with non-atomic instructions. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
@@ -11,6 +11,13 @@
|
||||
#ifndef __ASM_S390_PROCESSOR_H
|
||||
#define __ASM_S390_PROCESSOR_H
|
||||
|
||||
#define CIF_MCCK_PENDING 0 /* machine check handling is pending */
|
||||
#define CIF_ASCE 1 /* user asce needs fixup / uaccess */
|
||||
|
||||
#define _CIF_MCCK_PENDING (1<<CIF_MCCK_PENDING)
|
||||
#define _CIF_ASCE (1<<CIF_ASCE)
|
||||
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#include <linux/linkage.h>
|
||||
@@ -21,6 +28,21 @@
|
||||
#include <asm/setup.h>
|
||||
#include <asm/runtime_instr.h>
|
||||
|
||||
static inline void set_cpu_flag(int flag)
|
||||
{
|
||||
S390_lowcore.cpu_flags |= (1U << flag);
|
||||
}
|
||||
|
||||
static inline void clear_cpu_flag(int flag)
|
||||
{
|
||||
S390_lowcore.cpu_flags &= ~(1U << flag);
|
||||
}
|
||||
|
||||
static inline int test_cpu_flag(int flag)
|
||||
{
|
||||
return !!(S390_lowcore.cpu_flags & (1U << flag));
|
||||
}
|
||||
|
||||
/*
|
||||
* Default implementation of macro that returns current
|
||||
* instruction pointer ("program counter").
|
||||
|
Reference in New Issue
Block a user