Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9c69481e authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull s390 fixes from Martin Schwidefsky:
 "One improvement for the zcrypt driver, the quality attribute for the
  hwrng device has been missing.  Without it the kernel entropy seeding
  will not happen automatically.

  And six bug fixes, the most important one is the fix for the vector
  register corruption due to machine checks"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/nmi: fix vector register corruption
  s390/process: fix sfpc inline assembly
  s390/dasd: fix kernel panic when alias is set offline
  s390/sclp: clear upper register halves in _sclp_print_early
  s390/oprofile: fix compile error
  s390/sclp: fix compile error
  s390/zcrypt: enable s390 hwrng to seed kernel entropy
parents 97d6e2b6 cad49cfc
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -57,7 +57,10 @@ union ctlreg0 {
		unsigned long lap  : 1; /* Low-address-protection control */
		unsigned long	   : 4;
		unsigned long edat : 1; /* Enhanced-DAT-enablement control */
		unsigned long	   : 23;
		unsigned long	   : 4;
		unsigned long afp  : 1; /* AFP-register control */
		unsigned long vx   : 1; /* Vector enablement control */
		unsigned long	   : 17;
	};
};

+8 −0
Original line number Diff line number Diff line
@@ -87,7 +87,15 @@ struct sf_raw_sample {
} __packed;

/* Perf hardware reserve and release functions */
#ifdef CONFIG_PERF_EVENTS
int perf_reserve_sampling(void);
void perf_release_sampling(void);
#else /* CONFIG_PERF_EVENTS */
static inline int perf_reserve_sampling(void)
{
	return 0;
}
static inline void perf_release_sampling(void) {}
#endif /* CONFIG_PERF_EVENTS */

#endif /* _ASM_S390_PERF_EVENT_H */
+30 −21
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
#include <asm/nmi.h>
#include <asm/crw.h>
#include <asm/switch_to.h>
#include <asm/ctl_reg.h>

struct mcck_struct {
	int kill_task;
@@ -129,6 +130,8 @@ static int notrace s390_revalidate_registers(struct mci *mci)
	} else
		asm volatile("lfpc 0(%0)" : : "a" (fpt_creg_save_area));

	if (!MACHINE_HAS_VX) {
		/* Revalidate floating point registers */
		asm volatile(
			"	ld	0,0(%0)\n"
			"	ld	1,8(%0)\n"
@@ -147,8 +150,10 @@ static int notrace s390_revalidate_registers(struct mci *mci)
			"	ld	14,112(%0)\n"
			"	ld	15,120(%0)\n"
			: : "a" (fpt_save_area));
	} else {
		/* Revalidate vector registers */
	if (MACHINE_HAS_VX && current->thread.vxrs) {
		union ctlreg0 cr0;

		if (!mci->vr) {
			/*
			 * Vector registers can't be restored and therefore
@@ -156,8 +161,12 @@ static int notrace s390_revalidate_registers(struct mci *mci)
			 */
			kill_task = 1;
		}
		cr0.val = S390_lowcore.cregs_save_area[0];
		cr0.afp = cr0.vx = 1;
		__ctl_load(cr0.val, 0, 0);
		restore_vx_regs((__vector128 *)
				S390_lowcore.vector_save_area_addr);
				&S390_lowcore.vector_save_area);
		__ctl_load(S390_lowcore.cregs_save_area[0], 0, 0);
	}
	/* Revalidate access registers */
	asm volatile(
+1 −1
Original line number Diff line number Diff line
@@ -163,7 +163,7 @@ int copy_thread(unsigned long clone_flags, unsigned long new_stackp,
asmlinkage void execve_tail(void)
{
	current->thread.fp_regs.fpc = 0;
	asm volatile("sfpc %0,%0" : : "d" (0));
	asm volatile("sfpc %0" : : "d" (0));
}

/*
+4 −0
Original line number Diff line number Diff line
@@ -270,6 +270,8 @@ ENTRY(_sclp_print_early)
	jno	.Lesa2
	ahi	%r15,-80
	stmh	%r6,%r15,96(%r15)		# store upper register halves
	basr	%r13,0
	lmh	%r0,%r15,.Lzeroes-.(%r13)	# clear upper register halves
.Lesa2:
	lr	%r10,%r2			# save string pointer
	lhi	%r2,0
@@ -291,6 +293,8 @@ ENTRY(_sclp_print_early)
.Lesa3:
	lm	%r6,%r15,120(%r15)		# restore registers
	br	%r14
.Lzeroes:
	.fill	64,4,0

.LwritedataS4:
	.long	0x00760005			# SCLP command for write data
Loading