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

Commit 033dbbde authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull s390 updates from Martin Schwidefsky:
 "One performance improvement and a few bug fixes.  Two of the fixes
  deal with the clock related problems we have seen on recent kernels"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/mm: handle asce-type exceptions as normal page fault
  s390,time: revert direct ktime path for s390 clockevent device
  s390/time,vdso: convert to the new update_vsyscall interface
  s390/uaccess: add missing page table walk range check
  s390/mm: optimize copy_page
  s390/dasd: validate request size before building CCW/TCW request
  s390/signal: always restore saved runtime instrumentation psw bit
parents dc418f6e 127581b6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ config S390
	select GENERIC_CPU_DEVICES if !SMP
	select GENERIC_FIND_FIRST_BIT
	select GENERIC_SMP_IDLE_THREAD
	select GENERIC_TIME_VSYSCALL_OLD
	select GENERIC_TIME_VSYSCALL
	select HAVE_ALIGNED_STRUCT_PAGE if SLUB
	select HAVE_ARCH_JUMP_LABEL if !MARCH_G5
	select HAVE_ARCH_SECCOMP_FILTER
+13 −25
Original line number Diff line number Diff line
@@ -48,33 +48,21 @@ static inline void clear_page(void *page)
		: "memory", "cc");
}

/*
 * copy_page uses the mvcl instruction with 0xb0 padding byte in order to
 * bypass caches when copying a page. Especially when copying huge pages
 * this keeps L1 and L2 data caches alive.
 */
static inline void copy_page(void *to, void *from)
{
	if (MACHINE_HAS_MVPG) {
		register unsigned long reg0 asm ("0") = 0;
		asm volatile(
			"	mvpg	%0,%1"
			: : "a" (to), "a" (from), "d" (reg0)
			: "memory", "cc");
	} else
	register void *reg2 asm ("2") = to;
	register unsigned long reg3 asm ("3") = 0x1000;
	register void *reg4 asm ("4") = from;
	register unsigned long reg5 asm ("5") = 0xb0001000;
	asm volatile(
			"	mvc	0(256,%0),0(%1)\n"
			"	mvc	256(256,%0),256(%1)\n"
			"	mvc	512(256,%0),512(%1)\n"
			"	mvc	768(256,%0),768(%1)\n"
			"	mvc	1024(256,%0),1024(%1)\n"
			"	mvc	1280(256,%0),1280(%1)\n"
			"	mvc	1536(256,%0),1536(%1)\n"
			"	mvc	1792(256,%0),1792(%1)\n"
			"	mvc	2048(256,%0),2048(%1)\n"
			"	mvc	2304(256,%0),2304(%1)\n"
			"	mvc	2560(256,%0),2560(%1)\n"
			"	mvc	2816(256,%0),2816(%1)\n"
			"	mvc	3072(256,%0),3072(%1)\n"
			"	mvc	3328(256,%0),3328(%1)\n"
			"	mvc	3584(256,%0),3584(%1)\n"
			"	mvc	3840(256,%0),3840(%1)\n"
			: : "a" (to), "a" (from) : "memory");
		"	mvcl	2,4"
		: "+d" (reg2), "+d" (reg3), "+d" (reg4), "+d" (reg5)
		: : "memory", "cc");
}

#define clear_user_page(page, vaddr, pg)	clear_page(page)
+3 −2
Original line number Diff line number Diff line
@@ -26,8 +26,9 @@ struct vdso_data {
	__u64 wtom_clock_nsec;		/*				0x28 */
	__u32 tz_minuteswest;		/* Minutes west of Greenwich	0x30 */
	__u32 tz_dsttime;		/* Type of dst correction	0x34 */
	__u32 ectg_available;
	__u32 ntp_mult;			/* NTP adjusted multiplier	0x3C */
	__u32 ectg_available;		/* ECTG instruction present	0x38 */
	__u32 tk_mult;			/* Mult. used for xtime_nsec	0x3c */
	__u32 tk_shift;			/* Shift used for xtime_nsec	0x40 */
};

struct vdso_per_cpu_data {
+2 −1
Original line number Diff line number Diff line
@@ -65,7 +65,8 @@ int main(void)
	DEFINE(__VDSO_WTOM_NSEC, offsetof(struct vdso_data, wtom_clock_nsec));
	DEFINE(__VDSO_TIMEZONE, offsetof(struct vdso_data, tz_minuteswest));
	DEFINE(__VDSO_ECTG_OK, offsetof(struct vdso_data, ectg_available));
	DEFINE(__VDSO_NTP_MULT, offsetof(struct vdso_data, ntp_mult));
	DEFINE(__VDSO_TK_MULT, offsetof(struct vdso_data, tk_mult));
	DEFINE(__VDSO_TK_SHIFT, offsetof(struct vdso_data, tk_shift));
	DEFINE(__VDSO_ECTG_BASE, offsetof(struct vdso_per_cpu_data, ectg_timer_base));
	DEFINE(__VDSO_ECTG_USER, offsetof(struct vdso_per_cpu_data, ectg_user_time));
	/* constants used by the vdso */
+1 −1
Original line number Diff line number Diff line
@@ -194,7 +194,7 @@ static int restore_sigregs32(struct pt_regs *regs,_sigregs32 __user *sregs)
		return -EINVAL;

	/* Use regs->psw.mask instead of PSW_USER_BITS to preserve PER bit. */
	regs->psw.mask = (regs->psw.mask & ~PSW_MASK_USER) |
	regs->psw.mask = (regs->psw.mask & ~(PSW_MASK_USER | PSW_MASK_RI)) |
		(__u64)(user_sregs.regs.psw.mask & PSW32_MASK_USER) << 32 |
		(__u64)(user_sregs.regs.psw.mask & PSW32_MASK_RI) << 32 |
		(__u64)(user_sregs.regs.psw.addr & PSW32_ADDR_AMODE);
Loading