Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 's390-6.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull more s390 updates from Alexander Gordeev:

- Support MMIO read/write tracing

- Enable THP swapping and THP migration

- Unmask SLCF bit ("stateless command filtering") introduced with CEX8
cards, so that user space applications like lszcrypt could evaluate
and list this feature

- Fix the value of high_memory variable, so it considers possible
tailing offline memory blocks

- Make vmem_pte_alloc() consistent and always allocate memory of
PAGE_SIZE for page tables. This ensures a page table occupies the
whole page, as the rest of the code assumes

- Fix kernel image end address in the decompressor debug output

- Fix a typo in debug_sprintf_format_fn() comment

* tag 's390-6.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
s390/debug: Fix typo in debug_sprintf_format_fn() comment
s390/boot: Fix startup debugging log
s390/mm: Allocate page table with PAGE_SIZE granularity
s390/mm: Enable THP_SWAP and THP_MIGRATION
s390: Support CONFIG_TRACE_MMIO_ACCESS
s390/mm: Set high_memory at the end of the identity mapping
s390/ap: Unmask SLCF bit in card and queue ap functions sysfs

+60 -7
+3
arch/s390/Kconfig
··· 74 74 select ARCH_ENABLE_MEMORY_HOTPLUG if SPARSEMEM 75 75 select ARCH_ENABLE_MEMORY_HOTREMOVE 76 76 select ARCH_ENABLE_SPLIT_PMD_PTLOCK if PGTABLE_LEVELS > 2 77 + select ARCH_ENABLE_THP_MIGRATION if TRANSPARENT_HUGEPAGE 77 78 select ARCH_HAS_CPU_FINALIZE_INIT 78 79 select ARCH_HAS_CURRENT_STACK_POINTER 79 80 select ARCH_HAS_DEBUG_VIRTUAL ··· 103 102 select ARCH_HAS_UBSAN 104 103 select ARCH_HAS_VDSO_TIME_DATA 105 104 select ARCH_HAVE_NMI_SAFE_CMPXCHG 105 + select ARCH_HAVE_TRACE_MMIO_ACCESS 106 106 select ARCH_INLINE_READ_LOCK 107 107 select ARCH_INLINE_READ_LOCK_BH 108 108 select ARCH_INLINE_READ_LOCK_IRQ ··· 152 150 select ARCH_WANT_KERNEL_PMD_MKWRITE 153 151 select ARCH_WANT_LD_ORPHAN_WARN 154 152 select ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP 153 + select ARCH_WANTS_THP_SWAP 155 154 select BUILDTIME_TABLE_SORT 156 155 select CLONE_BACKWARDS2 157 156 select DCACHE_WORD_ACCESS if !KMSAN
+1 -1
arch/s390/boot/startup.c
··· 384 384 kernel_start = round_down(kernel_end - kernel_size, THREAD_SIZE); 385 385 boot_debug("Randomization range: 0x%016lx-0x%016lx\n", vmax - kaslr_len, vmax); 386 386 boot_debug("kernel image: 0x%016lx-0x%016lx (kaslr)\n", kernel_start, 387 - kernel_size + kernel_size); 387 + kernel_start + kernel_size); 388 388 } else if (vmax < __NO_KASLR_END_KERNEL || vsize > __NO_KASLR_END_KERNEL) { 389 389 kernel_start = round_down(vmax - kernel_size, THREAD_SIZE); 390 390 boot_debug("kernel image: 0x%016lx-0x%016lx (constrained)\n", kernel_start,
+1 -1
arch/s390/include/asm/ap.h
··· 103 103 unsigned int accel : 1; /* A */ 104 104 unsigned int ep11 : 1; /* X */ 105 105 unsigned int apxa : 1; /* APXA */ 106 - unsigned int : 1; 106 + unsigned int slcf : 1; /* Cmd filtering avail. */ 107 107 unsigned int class : 8; 108 108 unsigned int bs : 2; /* SE bind/assoc */ 109 109 unsigned int : 14;
+45
arch/s390/include/asm/pgtable.h
··· 963 963 return clear_pmd_bit(pmd, __pgprot(_SEGMENT_ENTRY_SOFT_DIRTY)); 964 964 } 965 965 966 + #ifdef CONFIG_ARCH_ENABLE_THP_MIGRATION 967 + #define pmd_swp_soft_dirty(pmd) pmd_soft_dirty(pmd) 968 + #define pmd_swp_mksoft_dirty(pmd) pmd_mksoft_dirty(pmd) 969 + #define pmd_swp_clear_soft_dirty(pmd) pmd_clear_soft_dirty(pmd) 970 + #endif 971 + 966 972 /* 967 973 * query functions pte_write/pte_dirty/pte_young only work if 968 974 * pte_present() is true. Undefined behaviour if not.. ··· 1984 1978 } 1985 1979 1986 1980 #define __rste_to_swp_entry(rste) ((swp_entry_t) { rste }) 1981 + 1982 + /* 1983 + * s390 has different layout for PTE and region / segment table entries (RSTE). 1984 + * This is also true for swap entries, and their swap type and offset encoding. 1985 + * For hugetlbfs PTE_MARKER support, s390 has internal __swp_type_rste() and 1986 + * __swp_offset_rste() helpers to correctly handle RSTE swap entries. 1987 + * 1988 + * But common swap code does not know about this difference, and only uses 1989 + * __swp_type(), __swp_offset() and __swp_entry() helpers for conversion between 1990 + * arch-dependent and arch-independent representation of swp_entry_t for all 1991 + * pagetable levels. On s390, those helpers only work for PTE swap entries. 1992 + * 1993 + * Therefore, implement __pmd_to_swp_entry() to build a fake PTE swap entry 1994 + * and return the arch-dependent representation of that. Correspondingly, 1995 + * implement __swp_entry_to_pmd() to convert that into a proper PMD swap 1996 + * entry again. With this, the arch-dependent swp_entry_t representation will 1997 + * always look like a PTE swap entry in common code. 1998 + * 1999 + * This is somewhat similar to fake PTEs in hugetlbfs code for s390, but only 2000 + * requires conversion of the swap type and offset, and not all the possible 2001 + * PTE bits. 2002 + */ 2003 + static inline swp_entry_t __pmd_to_swp_entry(pmd_t pmd) 2004 + { 2005 + swp_entry_t arch_entry; 2006 + pte_t pte; 2007 + 2008 + arch_entry = __rste_to_swp_entry(pmd_val(pmd)); 2009 + pte = mk_swap_pte(__swp_type_rste(arch_entry), __swp_offset_rste(arch_entry)); 2010 + return __pte_to_swp_entry(pte); 2011 + } 2012 + 2013 + static inline pmd_t __swp_entry_to_pmd(swp_entry_t arch_entry) 2014 + { 2015 + pmd_t pmd; 2016 + 2017 + pmd = __pmd(mk_swap_rste(__swp_type(arch_entry), __swp_offset(arch_entry))); 2018 + return pmd; 2019 + } 1987 2020 1988 2021 extern int vmem_add_mapping(unsigned long start, unsigned long size); 1989 2022 extern void vmem_remove_mapping(unsigned long start, unsigned long size);
+1 -1
arch/s390/kernel/debug.c
··· 1677 1677 1678 1678 /* 1679 1679 * prints debug data sprintf-formatted: 1680 - * debug_sprinf_event/exception calls must be used together with this view 1680 + * debug_sprintf_event/exception calls must be used together with this view 1681 1681 */ 1682 1682 1683 1683 #define DEBUG_SPRINTF_MAX_ARGS 10
+6
arch/s390/kernel/setup.c
··· 719 719 memblock_set_node(0, ULONG_MAX, &memblock.memory, 0); 720 720 } 721 721 722 + static void __init setup_high_memory(void) 723 + { 724 + high_memory = __va(ident_map_size); 725 + } 726 + 722 727 /* 723 728 * Reserve memory used for lowcore. 724 729 */ ··· 956 951 957 952 free_physmem_info(); 958 953 setup_memory_end(); 954 + setup_high_memory(); 959 955 memblock_dump_all(); 960 956 setup_memory(); 961 957
+2 -3
arch/s390/mm/vmem.c
··· 64 64 65 65 pte_t __ref *vmem_pte_alloc(void) 66 66 { 67 - unsigned long size = PTRS_PER_PTE * sizeof(pte_t); 68 67 pte_t *pte; 69 68 70 69 if (slab_is_available()) 71 - pte = (pte_t *) page_table_alloc(&init_mm); 70 + pte = (pte_t *)page_table_alloc(&init_mm); 72 71 else 73 - pte = (pte_t *) memblock_alloc(size, size); 72 + pte = (pte_t *)memblock_alloc(PAGE_SIZE, PAGE_SIZE); 74 73 if (!pte) 75 74 return NULL; 76 75 memset64((u64 *)pte, _PAGE_INVALID, PTRS_PER_PTE);
+1 -1
drivers/s390/crypto/ap_bus.h
··· 180 180 atomic64_t total_request_count; /* # requests ever for this AP device.*/ 181 181 }; 182 182 183 - #define TAPQ_CARD_HWINFO_MASK 0xFEFF0000FFFF0F0FUL 183 + #define TAPQ_CARD_HWINFO_MASK 0xFFFF0000FFFF0F0FUL 184 184 #define ASSOC_IDX_INVALID 0x10000 185 185 186 186 #define to_ap_card(x) container_of((x), struct ap_card, ap_dev.device)