linux/arch/s390/mm
Heiko Carstens a51324c430 s390/cmma: rework no-dat handling
Rework the way physical pages are set no-dat / dat:

The old way is:

- Rely on that all pages are initially marked "dat"
- Allocate page tables for the kernel mapping
- Enable dat
- Walk the whole kernel mapping and set PG_arch_1 bit in all struct pages
  that belong to pages of kernel page tables
- Walk all struct pages and test and clear the PG_arch_1 bit. If the bit is
  not set, set the page state to no-dat
- For all subsequent page table allocations, set the page state to dat
  (remove the no-dat state) on allocation time

Change this rather complex logic to a simpler approach:

- Set the whole physical memory (all pages) to "no-dat"
- Explicitly set those page table pages to "dat" which are part of the
  kernel image (e.g. swapper_pg_dir)
- For all subsequent page table allocations, set the page state to dat
  (remove the no-dat state) on allocation time

In result the code is simpler, and this also allows to get rid of one
odd usage of the PG_arch_1 bit.

Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2023-11-05 22:34:58 +01:00
..
cmm.c S390: Remove now superfluous sentinel elem from ctl_table arrays 2023-10-10 15:22:02 -07:00
dump_pagetables.c s390/ctlreg: add struct ctlreg 2023-09-19 13:26:56 +02:00
extable.c s390: add support for DCACHE_WORD_ACCESS 2023-10-16 13:04:09 +02:00
extmem.c s390/extmem: improve reporting of -ERANGE error 2023-07-24 12:12:24 +02:00
fault.c s390/mm,fault: move VM_FAULT_ERROR handling to do_exception() 2023-10-23 18:21:23 +02:00
gmap.c s390/cmma: move arch_set_page_dat() to header file 2023-11-05 22:34:58 +01:00
hugetlbpage.c mm: hugetlb: add huge page size param to set_huge_pte_at() 2023-09-29 17:20:47 -07:00
init.c s390/cmma: rework no-dat handling 2023-11-05 22:34:58 +01:00
maccess.c s390/ctlreg: rename ctl_reg.h to ctlreg.h 2023-09-19 13:26:56 +02:00
Makefile s390/mm: move pfault code to own C file 2023-07-29 14:57:18 +02:00
mmap.c mm: move 'mmap_min_addr' logic from callers into vm_unmapped_area() 2023-04-21 14:52:05 -07:00
page-states.c s390/cmma: rework no-dat handling 2023-11-05 22:34:58 +01:00
pageattr.c s390/ctlreg: add struct ctlreg 2023-09-19 13:26:56 +02:00
pfault.c s390/pfault: use consistent comment style 2023-07-29 14:57:18 +02:00
pgalloc.c s390/cmma: move arch_set_page_dat() to header file 2023-11-05 22:34:58 +01:00
pgtable.c s390: allow pte_offset_map_lock() to fail 2023-06-19 16:19:09 -07:00
vmem.c s390/cmma: rework no-dat handling 2023-11-05 22:34:58 +01:00