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

Commit 7d46af20 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull sparc fixes from David Miller:

 1) System call tracing doesn't handle register contents properly across
    the trace.  From Mike Frysinger.

 2) Hook up copy_file_range

 3) Build fix for 32-bit with newer tools.

 4) New sun4v watchdog driver, from Wim Coekaerts.

 5) Set context system call has to allow for servicable faults when we
    flush the register windows to memory

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc64: Fix sparc64_set_context stack handling.
  sparc32: Add -Wa,-Av8 to KBUILD_CFLAGS.
  Add sun4v_wdt watchdog driver
  sparc: Fix system call tracing register handling.
  sparc: Hook up copy_file_range syscall.
parents fc77dbd3 397d1533
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -400,3 +400,7 @@ wm8350_wdt:
nowayout: Watchdog cannot be stopped once started
	(default=kernel config parameter)
-------------------------------------------------
sun4v_wdt:
timeout_ms: Watchdog timeout in milliseconds 1..180000, default=60000)
nowayout: Watchdog cannot be stopped once started
-------------------------------------------------
+6 −0
Original line number Diff line number Diff line
@@ -24,7 +24,13 @@ LDFLAGS := -m elf32_sparc
export BITS    := 32
UTS_MACHINE    := sparc

# We are adding -Wa,-Av8 to KBUILD_CFLAGS to deal with a specs bug in some
# versions of gcc.  Some gcc versions won't pass -Av8 to binutils when you
# give -mcpu=v8.  This silently worked with older bintutils versions but
# does not any more.
KBUILD_CFLAGS  += -m32 -mcpu=v8 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
KBUILD_CFLAGS  += -Wa,-Av8

KBUILD_AFLAGS  += -m32 -Wa,-Av8

else
+2 −1
Original line number Diff line number Diff line
@@ -422,8 +422,9 @@
#define __NR_listen		354
#define __NR_setsockopt		355
#define __NR_mlock2		356
#define __NR_copy_file_range	357

#define NR_syscalls		357
#define NR_syscalls		358

/* Bitmask values returned from kern_features system call.  */
#define KERN_FEATURE_MIXED_MODE_STACK	0x00000001
+17 −0
Original line number Diff line number Diff line
@@ -948,7 +948,24 @@ linux_syscall_trace:
	cmp	%o0, 0
	bne	3f
	 mov	-ENOSYS, %o0

	/* Syscall tracing can modify the registers.  */
	ld	[%sp + STACKFRAME_SZ + PT_G1], %g1
	sethi	%hi(sys_call_table), %l7
	ld	[%sp + STACKFRAME_SZ + PT_I0], %i0
	or	%l7, %lo(sys_call_table), %l7
	ld	[%sp + STACKFRAME_SZ + PT_I1], %i1
	ld	[%sp + STACKFRAME_SZ + PT_I2], %i2
	ld	[%sp + STACKFRAME_SZ + PT_I3], %i3
	ld	[%sp + STACKFRAME_SZ + PT_I4], %i4
	ld	[%sp + STACKFRAME_SZ + PT_I5], %i5
	cmp	%g1, NR_syscalls
	bgeu	3f
	 mov	-ENOSYS, %o0

	sll	%g1, 2, %l4
	mov	%i0, %o0
	ld	[%l7 + %l4], %l7
	mov	%i1, %o1
	mov	%i2, %o2
	mov	%i3, %o3
+2 −1
Original line number Diff line number Diff line
@@ -338,8 +338,9 @@ ENTRY(sun4v_mach_set_watchdog)
	mov	%o1, %o4
	mov	HV_FAST_MACH_SET_WATCHDOG, %o5
	ta	HV_FAST_TRAP
	brnz,a,pn %o4, 0f
	stx	%o1, [%o4]
	retl
0:	retl
	 nop
ENDPROC(sun4v_mach_set_watchdog)

Loading