Commit 9ae24d5a authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull more s390 updates from Vasily Gorbik:

 - Add kretprobes framepointer verification and return address recovery
   in stacktrace.

 - Support control domain masks on custom zcrypt devices and filter
   admin requests.

 - Cleanup timer API usage.

 - Rework absolute lowcore access helpers.

 - Other various small improvements and fixes.

* tag 's390-5.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (26 commits)
  s390/alternatives: avoid using jgnop mnemonic
  s390/pci: rename get_zdev_by_bus() to zdev_from_bus()
  s390/pci: improve zpci_dev reference counting
  s390/smp: use physical address for SIGP_SET_PREFIX command
  s390: cleanup timer API use
  s390/zcrypt: fix using the correct variable for sizeof()
  s390/vfio-ap: fix kernel doc and signature of group notifier functions
  s390/maccess: rework absolute lowcore accessors
  s390/smp: cleanup control register update routines
  s390/smp: cleanup target CPU callback starting
  s390/test_unwind: verify __kretprobe_trampoline is replaced
  s390/unwind: avoid duplicated unwinding entries for kretprobes
  s390/unwind: recover kretprobe modified return address in stacktrace
  s390/kprobes: enable kretprobes framepointer verification
  s390/test_unwind: extend kretprobe test
  s390/ap: adjust whitespace
  s390/ap: use insn format for new instructions
  s390/alternatives: use insn format for new instructions
  s390/alternatives: use instructions instead of byte patterns
  s390/traps: improve panic message for translation-specification exception
  ...
parents ba2d6201 faf79934
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ config S390
	select ALTERNATE_USER_ADDRESS_SPACE
	select ARCH_32BIT_USTAT_F_TINODE
	select ARCH_BINFMT_ELF_STATE
	select ARCH_CORRECT_STACKTRACE_ON_KRETPROBE
	select ARCH_ENABLE_MEMORY_HOTPLUG if SPARSEMEM
	select ARCH_ENABLE_MEMORY_HOTREMOVE
	select ARCH_ENABLE_SPLIT_PMD_PTLOCK if PGTABLE_LEVELS > 2
+9 −3
Original line number Diff line number Diff line
@@ -37,9 +37,15 @@
 * a 2-byte nop if the size of the area is not divisible by 6.
 */
.macro alt_pad_fill bytes
	.fill	( \bytes ) / 6, 6, 0xc0040000
	.fill	( \bytes ) % 6 / 4, 4, 0x47000000
	.fill	( \bytes ) % 6 % 4 / 2, 2, 0x0700
	.rept	( \bytes ) / 6
	brcl	0,0
	.endr
	.rept	( \bytes ) % 6 / 4
	nop
	.endr
	.rept	( \bytes ) % 6 % 4 / 2
	nopr
	.endr
.endm

/*
+11 −4
Original line number Diff line number Diff line
@@ -71,11 +71,18 @@ void apply_alternatives(struct alt_instr *start, struct alt_instr *end);
	".if " oldinstr_pad_len(num) " > 6\n"				\
	"\tjg " e_oldinstr_pad_end "f\n"				\
	"6620:\n"							\
	"\t.fill (" oldinstr_pad_len(num) " - (6620b-662b)) / 2, 2, 0x0700\n" \
	"\t.rept (" oldinstr_pad_len(num) " - (6620b-662b)) / 2\n"	\
	"\tnopr\n"							\
	".else\n"							\
	"\t.fill " oldinstr_pad_len(num) " / 6, 6, 0xc0040000\n"	\
	"\t.fill " oldinstr_pad_len(num) " %% 6 / 4, 4, 0x47000000\n"	\
	"\t.fill " oldinstr_pad_len(num) " %% 6 %% 4 / 2, 2, 0x0700\n"	\
	"\t.rept " oldinstr_pad_len(num) " / 6\n"			\
	"\t.brcl 0,0\n"							\
	"\t.endr\n"							\
	"\t.rept " oldinstr_pad_len(num) " %% 6 / 4\n"			\
	"\tnop\n"							\
	"\t.endr\n"							\
	"\t.rept " oldinstr_pad_len(num) " %% 6 %% 4 / 2\n"		\
	"\tnopr\n"							\
	".endr\n"							\
	".endif\n"

#define OLDINSTR(oldinstr, num)						\
+30 −30
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ static inline bool ap_instructions_available(void)
		"	lgr	0,%[reg0]\n"		/* qid into gr0 */
		"	lghi	1,0\n"			/* 0 into gr1 */
		"	lghi	2,0\n"			/* 0 into gr2 */
		"	.long	0xb2af0000\n"  /* PQAP(TAPQ) */
		"	.insn	rre,0xb2af0000,0,0\n"	/* PQAP(TAPQ) */
		"0:	la	%[reg1],1\n"		/* 1 into reg1 */
		"1:\n"
		EX_TABLE(0b, 1b)
@@ -88,7 +88,7 @@ static inline struct ap_queue_status ap_tapq(ap_qid_t qid, unsigned long *info)
	asm volatile(
		"	lgr	0,%[qid]\n"		/* qid into gr0 */
		"	lghi	2,0\n"			/* 0 into gr2 */
		"	.long	0xb2af0000\n"  /* PQAP(TAPQ) */
		"	.insn	rre,0xb2af0000,0,0\n"	/* PQAP(TAPQ) */
		"	lgr	%[reg1],1\n"		/* gr1 (status) into reg1 */
		"	lgr	%[reg2],2\n"		/* gr2 into reg2 */
		: [reg1] "=&d" (reg1), [reg2] "=&d" (reg2)
@@ -129,7 +129,7 @@ static inline struct ap_queue_status ap_rapq(ap_qid_t qid)

	asm volatile(
		"	lgr	0,%[reg0]\n"		/* qid arg into gr0 */
		"	.long	0xb2af0000\n" /* PQAP(RAPQ) */
		"	.insn	rre,0xb2af0000,0,0\n"	/* PQAP(RAPQ) */
		"	lgr	%[reg1],1\n"		/* gr1 (status) into reg1 */
		: [reg1] "=&d" (reg1)
		: [reg0] "d" (reg0)
@@ -150,7 +150,7 @@ static inline struct ap_queue_status ap_zapq(ap_qid_t qid)

	asm volatile(
		"	lgr	0,%[reg0]\n"		/* qid arg into gr0 */
		"	.long	0xb2af0000\n"  /* PQAP(ZAPQ) */
		"	.insn	rre,0xb2af0000,0,0\n"	/* PQAP(ZAPQ) */
		"	lgr	%[reg1],1\n"		/* gr1 (status) into reg1 */
		: [reg1] "=&d" (reg1)
		: [reg0] "d" (reg0)
@@ -192,7 +192,7 @@ static inline int ap_qci(struct ap_config_info *config)
	asm volatile(
		"	lgr	0,%[reg0]\n"		/* QCI fc into gr0 */
		"	lgr	2,%[reg2]\n"		/* ptr to config into gr2 */
		"	.long	0xb2af0000\n"  /* PQAP(QCI) */
		"	.insn	rre,0xb2af0000,0,0\n"	/* PQAP(QCI) */
		"0:	la	%[reg1],0\n"		/* good case, QCI fc available */
		"1:\n"
		EX_TABLE(0b, 1b)
@@ -249,7 +249,7 @@ static inline struct ap_queue_status ap_aqic(ap_qid_t qid,
		"	lgr	0,%[reg0]\n"		/* qid param into gr0 */
		"	lgr	1,%[reg1]\n"		/* irq ctrl into gr1 */
		"	lgr	2,%[reg2]\n"		/* ni addr into gr2 */
		"	.long	0xb2af0000\n"  /* PQAP(AQIC) */
		"	.insn	rre,0xb2af0000,0,0\n"	/* PQAP(AQIC) */
		"	lgr	%[reg1],1\n"		/* gr1 (status) into reg1 */
		: [reg1] "+&d" (reg1)
		: [reg0] "d" (reg0), [reg2] "d" (reg2)
@@ -299,7 +299,7 @@ static inline struct ap_queue_status ap_qact(ap_qid_t qid, int ifbit,
	asm volatile(
		"	lgr	0,%[reg0]\n"		/* qid param into gr0 */
		"	lgr	1,%[reg1]\n"		/* qact in info into gr1 */
		"	.long	0xb2af0000\n"  /* PQAP(QACT) */
		"	.insn	rre,0xb2af0000,0,0\n"	/* PQAP(QACT) */
		"	lgr	%[reg1],1\n"		/* gr1 (status) into reg1 */
		"	lgr	%[reg2],2\n"		/* qact out info into reg2 */
		: [reg1] "+&d" (reg1), [reg2] "=&d" (reg2)
+11 −5
Original line number Diff line number Diff line
@@ -74,8 +74,17 @@ static __always_inline void __ctl_clear_bit(unsigned int cr, unsigned int bit)
	__ctl_load(reg, cr, cr);
}

void smp_ctl_set_bit(int cr, int bit);
void smp_ctl_clear_bit(int cr, int bit);
void smp_ctl_set_clear_bit(int cr, int bit, bool set);

static inline void ctl_set_bit(int cr, int bit)
{
	smp_ctl_set_clear_bit(cr, bit, true);
}

static inline void ctl_clear_bit(int cr, int bit)
{
	smp_ctl_set_clear_bit(cr, bit, false);
}

union ctlreg0 {
	unsigned long val;
@@ -130,8 +139,5 @@ union ctlreg15 {
	};
};

#define ctl_set_bit(cr, bit) smp_ctl_set_bit(cr, bit)
#define ctl_clear_bit(cr, bit) smp_ctl_clear_bit(cr, bit)

#endif /* __ASSEMBLY__ */
#endif /* __ASM_CTL_REG_H */
Loading