arch/s390/include/asm/page-states.h
Source file repositories/reference/linux-study-clean/arch/s390/include/asm/page-states.h
File Facts
- System
- Linux kernel
- Corpus path
arch/s390/include/asm/page-states.h- Extension
.h- Size
- 1787 bytes
- Lines
- 80
- 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.
Dependency Surface
asm/page.h
Detected Declarations
function essafunction __set_page_statefunction __set_page_unusedfunction __set_page_stable_datfunction __set_page_stable_nodatfunction __arch_set_page_nodatfunction __arch_set_page_dat
Annotated Snippet
#ifndef PAGE_STATES_H
#define PAGE_STATES_H
#include <asm/page.h>
#define ESSA_GET_STATE 0
#define ESSA_SET_STABLE 1
#define ESSA_SET_UNUSED 2
#define ESSA_SET_VOLATILE 3
#define ESSA_SET_POT_VOLATILE 4
#define ESSA_SET_STABLE_RESIDENT 5
#define ESSA_SET_STABLE_IF_RESIDENT 6
#define ESSA_SET_STABLE_NODAT 7
#define ESSA_MAX ESSA_SET_STABLE_NODAT
extern int cmma_flag;
static __always_inline unsigned long essa(unsigned long paddr, unsigned char cmd)
{
unsigned long rc;
asm volatile(
" .insn rrf,0xb9ab0000,%[rc],%[paddr],%[cmd],0"
: [rc] "=d" (rc)
: [paddr] "d" (paddr),
[cmd] "i" (cmd));
return rc;
}
static __always_inline void __set_page_state(void *addr, unsigned long num_pages, unsigned char cmd)
{
unsigned long paddr = __pa(addr) & PAGE_MASK;
while (num_pages--) {
essa(paddr, cmd);
paddr += PAGE_SIZE;
}
}
static inline void __set_page_unused(void *addr, unsigned long num_pages)
{
__set_page_state(addr, num_pages, ESSA_SET_UNUSED);
}
static inline void __set_page_stable_dat(void *addr, unsigned long num_pages)
{
__set_page_state(addr, num_pages, ESSA_SET_STABLE);
}
static inline void __set_page_stable_nodat(void *addr, unsigned long num_pages)
{
__set_page_state(addr, num_pages, ESSA_SET_STABLE_NODAT);
}
static inline void __arch_set_page_nodat(void *addr, unsigned long num_pages)
{
if (!cmma_flag)
return;
if (cmma_flag < 2)
__set_page_stable_dat(addr, num_pages);
else
__set_page_stable_nodat(addr, num_pages);
}
static inline void __arch_set_page_dat(void *addr, unsigned long num_pages)
{
if (!cmma_flag)
return;
__set_page_stable_dat(addr, num_pages);
}
#endif
Annotation
- Immediate include surface: `asm/page.h`.
- Detected declarations: `function essa`, `function __set_page_state`, `function __set_page_unused`, `function __set_page_stable_dat`, `function __set_page_stable_nodat`, `function __arch_set_page_nodat`, `function __arch_set_page_dat`.
- 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.