Commit 509f806f authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull more s390 updates from Heiko Carstens:

 - Add swap entry for hugetlbfs support

 - Add PTE_MARKER support for hugetlbs mappings; this fixes a regression
   (possible page fault loop) which was introduced when support for
   UFFDIO_POISON for hugetlbfs was added

 - Add ARCH_HAS_PREEMPT_LAZY and PREEMPT_DYNAMIC support

 - Mark IRQ entries in entry code, so that stack tracers can filter out
   the non-IRQ parts of stack traces. This fixes stack depot capacity
   limit warnings, since without filtering the number of unique stack
   traces is huge

 - In PCI code fix leak of struct zpci_dev object, and fix potential
   double remove of hotplug slot

 - Fix pagefault_disable() / pagefault_enable() unbalance in
   arch_stack_user_walk_common()

 - A couple of inline assembly optimizations, more cmpxchg() to
   try_cmpxchg() conversions, and removal of usages of xchg() and
   cmpxchg() on one and two byte memory areas

 - Various other small improvements and cleanups

* tag 's390-6.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (27 commits)
  Revert "s390/mm: Allow large pages for KASAN shadow mapping"
  s390/spinlock: Use flag output constraint for arch_cmpxchg_niai8()
  s390/spinlock: Use R constraint for arch_load_niai4()
  s390/spinlock: Generate shorter code for arch_spin_unlock()
  s390/spinlock: Remove condition code clobber from arch_spin_unlock()
  s390/spinlock: Use symbolic names in inline assemblies
  s390: Support PREEMPT_DYNAMIC
  s390/pci: Fix potential double remove of hotplug slot
  s390/pci: Fix leak of struct zpci_dev when zpci_add_device() fails
  s390/mm/hugetlbfs: Add missing includes
  s390/mm: Add PTE_MARKER support for hugetlbfs mappings
  s390/mm: Introduce region-third and segment table swap entries
  s390/mm: Introduce region-third and segment table entry present bits
  s390/mm: Rearrange region-third and segment table entry SW bits
  KVM: s390: Increase size of union sca_utility to four bytes
  KVM: s390: Remove one byte cmpxchg() usage
  KVM: s390: Use try_cmpxchg() instead of cmpxchg() loops
  s390/ap: Replace xchg() with WRITE_ONCE()
  s390/mm: Allow large pages for KASAN shadow mapping
  s390: Add ARCH_HAS_PREEMPT_LAZY support
  ...
parents 63c81af1 cc00550b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -87,6 +87,7 @@ config S390
	select ARCH_HAS_MEMBARRIER_SYNC_CORE
	select ARCH_HAS_MEM_ENCRYPT
	select ARCH_HAS_NMI_SAFE_THIS_CPU_OPS
	select ARCH_HAS_PREEMPT_LAZY
	select ARCH_HAS_PTE_SPECIAL
	select ARCH_HAS_SCALED_CPUTIME
	select ARCH_HAS_SET_DIRECT_MAP
@@ -218,6 +219,7 @@ config S390
	select HAVE_PERF_EVENTS
	select HAVE_PERF_REGS
	select HAVE_PERF_USER_STACK_DUMP
	select HAVE_PREEMPT_DYNAMIC_KEY
	select HAVE_REGS_AND_STACK_ACCESS_API
	select HAVE_RELIABLE_STACKTRACE
	select HAVE_RETHOOK
+5 −3
Original line number Diff line number Diff line
@@ -66,14 +66,15 @@ typedef int (debug_header_proc_t) (debug_info_t *id,
				   struct debug_view *view,
				   int area,
				   debug_entry_t *entry,
				   char *out_buf);
				   char *out_buf, size_t out_buf_size);

typedef int (debug_format_proc_t) (debug_info_t *id,
				   struct debug_view *view, char *out_buf,
				   size_t out_buf_size,
				   const char *in_buf);
typedef int (debug_prolog_proc_t) (debug_info_t *id,
				   struct debug_view *view,
				   char *out_buf);
				   char *out_buf, size_t out_buf_size);
typedef int (debug_input_proc_t) (debug_info_t *id,
				  struct debug_view *view,
				  struct file *file,
@@ -81,7 +82,8 @@ typedef int (debug_input_proc_t) (debug_info_t *id,
				  size_t in_buf_size, loff_t *offset);

int debug_dflt_header_fn(debug_info_t *id, struct debug_view *view,
			 int area, debug_entry_t *entry, char *out_buf);
			 int area, debug_entry_t *entry,
			 char *out_buf, size_t out_buf_size);

struct debug_view {
	char name[DEBUG_MAX_NAME_LEN];
+2 −2
Original line number Diff line number Diff line
@@ -17,8 +17,8 @@
#define GMAP_NOTIFY_MPROT	0x1

/* Status bits only for huge segment entries */
#define _SEGMENT_ENTRY_GMAP_IN		0x8000	/* invalidation notify bit */
#define _SEGMENT_ENTRY_GMAP_UC		0x4000	/* dirty (migration) */
#define _SEGMENT_ENTRY_GMAP_IN		0x0800	/* invalidation notify bit */
#define _SEGMENT_ENTRY_GMAP_UC		0x0002	/* dirty (migration) */

/**
 * struct gmap_struct - guest address space
+3 −1
Original line number Diff line number Diff line
@@ -10,6 +10,8 @@
#define _ASM_S390_HUGETLB_H

#include <linux/pgtable.h>
#include <linux/swap.h>
#include <linux/swapops.h>
#include <asm/page.h>

#define hugepages_supported()			(MACHINE_HAS_EDAT1)
@@ -78,7 +80,7 @@ static inline int huge_pte_none(pte_t pte)
#define __HAVE_ARCH_HUGE_PTE_NONE_MOSTLY
static inline int huge_pte_none_mostly(pte_t pte)
{
	return huge_pte_none(pte);
	return huge_pte_none(pte) || is_pte_marker(pte);
}

#define __HAVE_ARCH_HUGE_PTE_MKUFFD_WP
+10 −5
Original line number Diff line number Diff line
@@ -94,11 +94,16 @@ union ipte_control {
	};
};

/*
 * Utility is defined as two bytes but having it four bytes wide
 * generates more efficient code. Since the following bytes are
 * reserved this makes no functional difference.
 */
union sca_utility {
	__u16 val;
	__u32 val;
	struct {
		__u16 mtcr : 1;
		__u16 reserved : 15;
		__u32 mtcr : 1;
		__u32	   : 31;
	};
};

@@ -107,7 +112,7 @@ struct bsca_block {
	__u64	reserved[5];
	__u64	mcn;
	union sca_utility utility;
	__u8	reserved2[6];
	__u8	reserved2[4];
	struct bsca_entry cpu[KVM_S390_BSCA_CPU_SLOTS];
};

@@ -115,7 +120,7 @@ struct esca_block {
	union ipte_control ipte_control;
	__u64   reserved1[6];
	union sca_utility utility;
	__u8	reserved2[6];
	__u8	reserved2[4];
	__u64   mcn[4];
	__u64   reserved3[20];
	struct esca_entry cpu[KVM_S390_ESCA_CPU_SLOTS];
Loading