Skip to contentSkip to conversation

s390 patches for 3.19-rc5

GIT PULL Martin Schwidefsky 1 participant 1 message Jan 14, 2015

Subsystems (6)
BPF s390 s390 MM uprobes +2 more subsystems
lore
Share & tools
lore
#0 lore raw

Hi Linus,

please pull from the 'for-linus' branch of

git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git for-linus

to receive the following updates:
Two small performance tweaks, the plumbing for the execveat system call and a couple of bug fixes.

Chen Gang (1):
s390/timex: fix get_tod_clock_ext() inline assembly

Christian Borntraeger (2):
s390/vtime: Get rid of redundant WARN_ON s390/kernel: use stnsm 255 instead of stosm 0

Harald Freudenberger (1):
s390/zcrypt: kernel oops at insmod of the z90crypt device driver

Heiko Carstens (1):
s390: wire up execveat syscall

Jan Willeke (1):
s390/uprobes: fix user space PER events

Martin Schwidefsky (1):
s390/mm: avoid using pmd_to_page for !USE_SPLIT_PMD_PTLOCKS

Michael Holzheu (2):

      s390/bpf: Fix ALU_NEG (A = -A)
      s390/bpf: Fix JMP_JGE_X (A > X) and JMP_JGT_X (A >= X)
 arch/s390/hypfs/hypfs_vm.c          |  2 +-
 arch/s390/include/asm/irqflags.h    |  2 +-
 arch/s390/include/asm/timex.h       | 10 +++---
 arch/s390/include/uapi/asm/unistd.h |  3 +-
 arch/s390/kernel/syscalls.S         |  1 +
 arch/s390/kernel/uprobes.c          | 69 ++++++++++++++++++++++++++++++++-----
 arch/s390/kernel/vtime.c            |  2 --
 arch/s390/mm/pgtable.c              |  5 +--
 arch/s390/net/bpf_jit_comp.c        |  8 ++---
 drivers/s390/crypto/ap_bus.c        | 10 ++++--
 10 files changed, 85 insertions(+), 27 deletions(-)
arch/s390/hypfs/hypfs_vm.c +1 -1
index 32040ac..afbe079 100644
@@ -231,7 +231,7 @@ failed:
 struct dbfs_d2fc_hdr {
 	u64	len;		/* Length of d2fc buffer without header */
 	u16	version;	/* Version of header */
-	char	tod_ext[16];	/* TOD clock for d2fc */
+	char	tod_ext[STORE_CLOCK_EXT_SIZE]; /* TOD clock for d2fc */
 	u64	count;		/* Number of VM guests in d2fc buffer */
 	char	reserved[30];
 } __attribute__ ((packed));
arch/s390/include/asm/irqflags.h +1 -1
index 37b9091..16aa0c7 100644
@@ -36,7 +36,7 @@ static inline notrace void __arch_local_irq_ssm(unsigned long flags)
 
 static inline notrace unsigned long arch_local_save_flags(void)
 {
-	return __arch_local_irq_stosm(0x00);
+	return __arch_local_irq_stnsm(0xff);
 }
 
 static inline notrace unsigned long arch_local_irq_save(void)
arch/s390/include/asm/timex.h +6 -4
index 8beee1c..98eb2a5 100644
@@ -67,20 +67,22 @@ static inline void local_tick_enable(unsigned long long comp)
 	set_clock_comparator(S390_lowcore.clock_comparator);
 }
 
-#define CLOCK_TICK_RATE	1193180 /* Underlying HZ */
+#define CLOCK_TICK_RATE		1193180 /* Underlying HZ */
+#define STORE_CLOCK_EXT_SIZE	16	/* stcke writes 16 bytes */
 
 typedef unsigned long long cycles_t;
 
-static inline void get_tod_clock_ext(char clk[16])
+static inline void get_tod_clock_ext(char *clk)
 {
-	typedef struct { char _[sizeof(clk)]; } addrtype;
+	typedef struct { char _[STORE_CLOCK_EXT_SIZE]; } addrtype;
 
 	asm volatile("stcke %0" : "=Q" (*(addrtype *) clk) : : "cc");
 }
 
 static inline unsigned long long get_tod_clock(void)
 {
-	unsigned char clk[16];
+	unsigned char clk[STORE_CLOCK_EXT_SIZE];
+
 	get_tod_clock_ext(clk);
 	return *((unsigned long long *)&clk[1]);
 }
arch/s390/include/uapi/asm/unistd.h +2 -1
index 2b446cf..67878af 100644
@@ -289,7 +289,8 @@
 #define __NR_bpf		351
 #define __NR_s390_pci_mmio_write	352
 #define __NR_s390_pci_mmio_read		353
-#define NR_syscalls 354
+#define __NR_execveat		354
+#define NR_syscalls 355
 
 /* 
  * There are some system calls that are not present on 64 bit, some
arch/s390/kernel/syscalls.S +1 -0
index a298724..939ec47 100644
@@ -362,3 +362,4 @@ SYSCALL(sys_memfd_create,sys_memfd_create,compat_sys_memfd_create) /* 350 */
 SYSCALL(sys_bpf,sys_bpf,compat_sys_bpf)
 SYSCALL(sys_ni_syscall,sys_s390_pci_mmio_write,compat_sys_s390_pci_mmio_write)
 SYSCALL(sys_ni_syscall,sys_s390_pci_mmio_read,compat_sys_s390_pci_mmio_read)
+SYSCALL(sys_execveat,sys_execveat,compat_sys_execveat)
arch/s390/kernel/uprobes.c +60 -9

117 lines not on this page · raw message

arch/s390/kernel/vtime.c +0 -2
index 7f0089d..e34122e5 100644
@@ -128,8 +128,6 @@ void vtime_account_irq_enter(struct task_struct *tsk)
 	struct thread_info *ti = task_thread_info(tsk);
 	u64 timer, system;
 
-	WARN_ON_ONCE(!irqs_disabled());
-
 	timer = S390_lowcore.last_update_timer;
 	S390_lowcore.last_update_timer = get_vtimer();
 	S390_lowcore.system_timer += timer - S390_lowcore.last_update_timer;
arch/s390/mm/pgtable.c +3 -2
index 71c7eff..601deb8 100644
@@ -322,11 +322,12 @@ static int gmap_alloc_table(struct gmap *gmap, unsigned long *table,
 static unsigned long __gmap_segment_gaddr(unsigned long *entry)
 {
 	struct page *page;
-	unsigned long offset;
+	unsigned long offset, mask;
 
 	offset = (unsigned long) entry / sizeof(unsigned long);
 	offset = (offset & (PTRS_PER_PMD - 1)) * PMD_SIZE;
-	page = pmd_to_page((pmd_t *) entry);
+	mask = ~(PTRS_PER_PMD * sizeof(pmd_t) - 1);
+	page = virt_to_page((void *)((unsigned long) entry & mask));
 	return page->index + offset;
 }
 
arch/s390/net/bpf_jit_comp.c +4 -4
index c52ac77..524496d 100644
@@ -431,8 +431,8 @@ static int bpf_jit_insn(struct bpf_jit *jit, struct sock_filter *filter,
 		EMIT4_DISP(0x88500000, K);
 		break;
 	case BPF_ALU | BPF_NEG: /* A = -A */
-		/* lnr %r5,%r5 */
-		EMIT2(0x1155);
+		/* lcr %r5,%r5 */
+		EMIT2(0x1355);
 		break;
 	case BPF_JMP | BPF_JA: /* ip += K */
 		offset = addrs[i + K] + jit->start - jit->prg;
@@ -502,8 +502,8 @@ branch:		if (filter->jt == filter->jf) {
 xbranch:	/* Emit compare if the branch targets are different */
 		if (filter->jt != filter->jf) {
 			jit->seen |= SEEN_XREG;
-			/* cr %r5,%r12 */
-			EMIT2(0x195c);
+			/* clr %r5,%r12 */
+			EMIT2(0x155c);
 		}
 		goto branch;
 	case BPF_JMP | BPF_JSET | BPF_X: /* ip += (A & X) ? jt : jf */
drivers/s390/crypto/ap_bus.c +7 -3
index 91e97ec..4d41bf7 100644
@@ -1163,9 +1163,13 @@ static inline int ap_test_config_card_id(unsigned int id)
  */
 static inline int ap_test_config_domain(unsigned int domain)
 {
-	if (!ap_configuration)
-		return 1;
-	return ap_test_config(ap_configuration->aqm, domain);
+	if (!ap_configuration)	  /* QCI not supported */
+		if (domain < 16)
+			return 1; /* then domains 0...15 are configured */
+		else
+			return 0;
+	else
+		return ap_test_config(ap_configuration->aqm, domain);
 }
 
 /**