arch/s390/include/asm/processor.h
Source file repositories/reference/linux-study-clean/arch/s390/include/asm/processor.h
File Facts
- System
- Linux kernel
- Corpus path
arch/s390/include/asm/processor.h- Extension
.h- Size
- 11063 bytes
- Lines
- 422
- Domain
- Architecture Layer
- Bucket
- arch/s390
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bits.hlinux/cpumask.hlinux/linkage.hlinux/irqflags.hlinux/instruction_pointer.hlinux/bitops.hasm/vdso/processor.hasm/fpu-types.hasm/cpu.hasm/page.hasm/ptrace.hasm/setup.hasm/runtime_instr.hasm/irqflags.hasm/alternative.hasm/fault.h
Detected Declarations
struct pcpustruct thread_structstruct task_structstruct mm_structstruct seq_filestruct pt_regsfunction set_cpu_flagfunction clear_cpu_flagfunction test_cpu_flagfunction test_and_set_cpu_flagfunction test_and_clear_cpu_flagfunction test_cpu_flag_offunction get_cpu_idfunction get_cpu_timerfunction __stackleak_poisonfunction __current_stack_pointerfunction on_thread_stackfunction stapfunction __ecagfunction psw_set_keyfunction __load_pswfunction __load_psw_maskfunction __extract_pswfunction __local_mcck_savefunction local_mcck_restorefunction local_mcck_disablefunction local_mcck_enablefunction __rewind_pswfunction __forward_pswfunction disabled_waitfunction regs_irqs_disabledfunction bpon
Annotated Snippet
struct pcpu {
unsigned long ec_mask; /* bit mask for ec_xxx functions */
unsigned long ec_clk; /* sigp timestamp for ec_xxx */
unsigned long flags; /* per CPU flags */
unsigned long capacity; /* cpu capacity for scheduler */
signed char state; /* physical cpu state */
signed char polarization; /* physical polarization */
u16 address; /* physical cpu address */
};
DECLARE_PER_CPU(struct pcpu, pcpu_devices);
typedef long (*sys_call_ptr_t)(struct pt_regs *regs);
static __always_inline struct pcpu *this_pcpu(void)
{
return (struct pcpu *)(get_lowcore()->pcpu);
}
static __always_inline void set_cpu_flag(int flag)
{
set_bit(flag, &this_pcpu()->flags);
}
static __always_inline void clear_cpu_flag(int flag)
{
clear_bit(flag, &this_pcpu()->flags);
}
static __always_inline bool test_cpu_flag(int flag)
{
return test_bit(flag, &this_pcpu()->flags);
}
static __always_inline bool test_and_set_cpu_flag(int flag)
{
return test_and_set_bit(flag, &this_pcpu()->flags);
}
static __always_inline bool test_and_clear_cpu_flag(int flag)
{
return test_and_clear_bit(flag, &this_pcpu()->flags);
}
/*
* Test CIF flag of another CPU. The caller needs to ensure that
* CPU hotplug can not happen, e.g. by disabling preemption.
*/
static __always_inline bool test_cpu_flag_of(int flag, int cpu)
{
return test_bit(flag, &per_cpu(pcpu_devices, cpu).flags);
}
#define arch_needs_cpu() test_cpu_flag(CIF_NOHZ_DELAY)
static inline void get_cpu_id(struct cpuid *ptr)
{
asm volatile("stidp %0" : "=Q" (*ptr));
}
static __always_inline unsigned long get_cpu_timer(void)
{
unsigned long timer;
asm volatile("stpt %[timer]" : [timer] "=Q" (timer));
return timer;
}
void s390_adjust_jiffies(void);
void s390_update_cpu_mhz(void);
void cpu_detect_mhz_feature(void);
extern const struct seq_operations cpuinfo_op;
extern void execve_tail(void);
unsigned long vdso_text_size(void);
unsigned long vdso_size(void);
#define TASK_SIZE (TASK_SIZE_MAX)
#define TASK_UNMAPPED_BASE (_REGION2_SIZE >> 1)
#define TASK_SIZE_MAX (-PAGE_SIZE)
#define VDSO_BASE (STACK_TOP + PAGE_SIZE)
#define VDSO_LIMIT (_REGION2_SIZE)
#define STACK_TOP (VDSO_LIMIT - vdso_size() - PAGE_SIZE)
#define STACK_TOP_MAX (_REGION2_SIZE - vdso_size() - PAGE_SIZE)
#define HAVE_ARCH_PICK_MMAP_LAYOUT
#define __stackleak_poison __stackleak_poison
static __always_inline void __stackleak_poison(unsigned long erase_low,
Annotation
- Immediate include surface: `linux/bits.h`, `linux/cpumask.h`, `linux/linkage.h`, `linux/irqflags.h`, `linux/instruction_pointer.h`, `linux/bitops.h`, `asm/vdso/processor.h`, `asm/fpu-types.h`.
- Detected declarations: `struct pcpu`, `struct thread_struct`, `struct task_struct`, `struct mm_struct`, `struct seq_file`, `struct pt_regs`, `function set_cpu_flag`, `function clear_cpu_flag`, `function test_cpu_flag`, `function test_and_set_cpu_flag`.
- Atlas domain: Architecture Layer / arch/s390.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.