Commit 4157368e authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile

Pull arch/tile bug fixes from Chris Metcalf:
 "This includes Paul Gortmaker's change to fix the <asm/system.h>
  disintegration issues on tile, a fix to unbreak the tilepro ethernet
  driver, and a backlog of bugfix-only changes from internal Tilera
  development over the last few months.

  They have all been to LKML and on linux-next for the last few days.
  The EDAC change to MAINTAINERS is an oddity but discussion on the
  linux-edac list suggested I ask you to pull that change through my
  tree since they don't have a tree to pull edac changes from at the
  moment."

* 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: (39 commits)
  drivers/net/ethernet/tile: fix netdev_alloc_skb() bombing
  MAINTAINERS: update EDAC information
  tilepro ethernet driver: fix a few minor issues
  tile-srom.c driver: minor code cleanup
  edac: say "TILEGx" not "TILEPro" for the tilegx edac driver
  arch/tile: avoid accidentally unmasking NMI-type interrupt accidentally
  arch/tile: remove bogus performance optimization
  arch/tile: return SIGBUS for addresses that are unaligned AND invalid
  arch/tile: fix finv_buffer_remote() for tilegx
  arch/tile: use atomic exchange in arch_write_unlock()
  arch/tile: stop mentioning the "kvm" subdirectory
  arch/tile: export the page_home() function.
  arch/tile: fix pointer cast in cacheflush.c
  arch/tile: fix single-stepping over swint1 instructions on tilegx
  arch/tile: implement panic_smp_self_stop()
  arch/tile: add "nop" after "nap" to help GX idle power draw
  arch/tile: use proper memparse() for "maxmem" options
  arch/tile: fix up locking in pgtable.c slightly
  arch/tile: don't leak kernel memory when we unload modules
  arch/tile: fix bug in delay_backoff()
  ...
parents 9479f0f8 00a62d4b
...@@ -2450,17 +2450,17 @@ F: fs/ecryptfs/ ...@@ -2450,17 +2450,17 @@ F: fs/ecryptfs/
EDAC-CORE EDAC-CORE
M: Doug Thompson <dougthompson@xmission.com> M: Doug Thompson <dougthompson@xmission.com>
L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers) L: linux-edac@vger.kernel.org
W: bluesmoke.sourceforge.net W: bluesmoke.sourceforge.net
S: Supported S: Supported
F: Documentation/edac.txt F: Documentation/edac.txt
F: drivers/edac/edac_* F: drivers/edac/
F: include/linux/edac.h F: include/linux/edac.h
EDAC-AMD64 EDAC-AMD64
M: Doug Thompson <dougthompson@xmission.com> M: Doug Thompson <dougthompson@xmission.com>
M: Borislav Petkov <borislav.petkov@amd.com> M: Borislav Petkov <borislav.petkov@amd.com>
L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers) L: linux-edac@vger.kernel.org
W: bluesmoke.sourceforge.net W: bluesmoke.sourceforge.net
S: Supported S: Supported
F: drivers/edac/amd64_edac* F: drivers/edac/amd64_edac*
...@@ -2468,35 +2468,35 @@ F: drivers/edac/amd64_edac* ...@@ -2468,35 +2468,35 @@ F: drivers/edac/amd64_edac*
EDAC-E752X EDAC-E752X
M: Mark Gross <mark.gross@intel.com> M: Mark Gross <mark.gross@intel.com>
M: Doug Thompson <dougthompson@xmission.com> M: Doug Thompson <dougthompson@xmission.com>
L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers) L: linux-edac@vger.kernel.org
W: bluesmoke.sourceforge.net W: bluesmoke.sourceforge.net
S: Maintained S: Maintained
F: drivers/edac/e752x_edac.c F: drivers/edac/e752x_edac.c
EDAC-E7XXX EDAC-E7XXX
M: Doug Thompson <dougthompson@xmission.com> M: Doug Thompson <dougthompson@xmission.com>
L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers) L: linux-edac@vger.kernel.org
W: bluesmoke.sourceforge.net W: bluesmoke.sourceforge.net
S: Maintained S: Maintained
F: drivers/edac/e7xxx_edac.c F: drivers/edac/e7xxx_edac.c
EDAC-I82443BXGX EDAC-I82443BXGX
M: Tim Small <tim@buttersideup.com> M: Tim Small <tim@buttersideup.com>
L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers) L: linux-edac@vger.kernel.org
W: bluesmoke.sourceforge.net W: bluesmoke.sourceforge.net
S: Maintained S: Maintained
F: drivers/edac/i82443bxgx_edac.c F: drivers/edac/i82443bxgx_edac.c
EDAC-I3000 EDAC-I3000
M: Jason Uhlenkott <juhlenko@akamai.com> M: Jason Uhlenkott <juhlenko@akamai.com>
L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers) L: linux-edac@vger.kernel.org
W: bluesmoke.sourceforge.net W: bluesmoke.sourceforge.net
S: Maintained S: Maintained
F: drivers/edac/i3000_edac.c F: drivers/edac/i3000_edac.c
EDAC-I5000 EDAC-I5000
M: Doug Thompson <dougthompson@xmission.com> M: Doug Thompson <dougthompson@xmission.com>
L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers) L: linux-edac@vger.kernel.org
W: bluesmoke.sourceforge.net W: bluesmoke.sourceforge.net
S: Maintained S: Maintained
F: drivers/edac/i5000_edac.c F: drivers/edac/i5000_edac.c
...@@ -2525,21 +2525,21 @@ F: drivers/edac/i7core_edac.c ...@@ -2525,21 +2525,21 @@ F: drivers/edac/i7core_edac.c
EDAC-I82975X EDAC-I82975X
M: Ranganathan Desikan <ravi@jetztechnologies.com> M: Ranganathan Desikan <ravi@jetztechnologies.com>
M: "Arvind R." <arvino55@gmail.com> M: "Arvind R." <arvino55@gmail.com>
L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers) L: linux-edac@vger.kernel.org
W: bluesmoke.sourceforge.net W: bluesmoke.sourceforge.net
S: Maintained S: Maintained
F: drivers/edac/i82975x_edac.c F: drivers/edac/i82975x_edac.c
EDAC-PASEMI EDAC-PASEMI
M: Egor Martovetsky <egor@pasemi.com> M: Egor Martovetsky <egor@pasemi.com>
L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers) L: linux-edac@vger.kernel.org
W: bluesmoke.sourceforge.net W: bluesmoke.sourceforge.net
S: Maintained S: Maintained
F: drivers/edac/pasemi_edac.c F: drivers/edac/pasemi_edac.c
EDAC-R82600 EDAC-R82600
M: Tim Small <tim@buttersideup.com> M: Tim Small <tim@buttersideup.com>
L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers) L: linux-edac@vger.kernel.org
W: bluesmoke.sourceforge.net W: bluesmoke.sourceforge.net
S: Maintained S: Maintained
F: drivers/edac/r82600_edac.c F: drivers/edac/r82600_edac.c
......
...@@ -12,7 +12,7 @@ config TILE ...@@ -12,7 +12,7 @@ config TILE
select GENERIC_PENDING_IRQ if SMP select GENERIC_PENDING_IRQ if SMP
select GENERIC_IRQ_SHOW select GENERIC_IRQ_SHOW
select SYS_HYPERVISOR select SYS_HYPERVISOR
select ARCH_HAVE_NMI_SAFE_CMPXCHG if !M386 select ARCH_HAVE_NMI_SAFE_CMPXCHG
# FIXME: investigate whether we need/want these options. # FIXME: investigate whether we need/want these options.
# select HAVE_IOREMAP_PROT # select HAVE_IOREMAP_PROT
...@@ -69,6 +69,9 @@ config ARCH_PHYS_ADDR_T_64BIT ...@@ -69,6 +69,9 @@ config ARCH_PHYS_ADDR_T_64BIT
config ARCH_DMA_ADDR_T_64BIT config ARCH_DMA_ADDR_T_64BIT
def_bool y def_bool y
config NEED_DMA_MAP_STATE
def_bool y
config LOCKDEP_SUPPORT config LOCKDEP_SUPPORT
def_bool y def_bool y
...@@ -118,7 +121,7 @@ config 64BIT ...@@ -118,7 +121,7 @@ config 64BIT
config ARCH_DEFCONFIG config ARCH_DEFCONFIG
string string
default "arch/tile/configs/tile_defconfig" if !TILEGX default "arch/tile/configs/tilepro_defconfig" if !TILEGX
default "arch/tile/configs/tilegx_defconfig" if TILEGX default "arch/tile/configs/tilegx_defconfig" if TILEGX
source "init/Kconfig" source "init/Kconfig"
...@@ -240,6 +243,7 @@ endchoice ...@@ -240,6 +243,7 @@ endchoice
config PAGE_OFFSET config PAGE_OFFSET
hex hex
depends on !64BIT
default 0xF0000000 if VMSPLIT_3_75G default 0xF0000000 if VMSPLIT_3_75G
default 0xE0000000 if VMSPLIT_3_5G default 0xE0000000 if VMSPLIT_3_5G
default 0xB0000000 if VMSPLIT_2_75G default 0xB0000000 if VMSPLIT_2_75G
......
...@@ -30,7 +30,8 @@ ifneq ($(CONFIG_DEBUG_EXTRA_FLAGS),"") ...@@ -30,7 +30,8 @@ ifneq ($(CONFIG_DEBUG_EXTRA_FLAGS),"")
KBUILD_CFLAGS += $(CONFIG_DEBUG_EXTRA_FLAGS) KBUILD_CFLAGS += $(CONFIG_DEBUG_EXTRA_FLAGS)
endif endif
LIBGCC_PATH := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) LIBGCC_PATH := \
$(shell $(CC) $(KBUILD_CFLAGS) $(KCFLAGS) -print-libgcc-file-name)
# Provide the path to use for "make defconfig". # Provide the path to use for "make defconfig".
KBUILD_DEFCONFIG := $(ARCH)_defconfig KBUILD_DEFCONFIG := $(ARCH)_defconfig
...@@ -53,8 +54,6 @@ libs-y += $(LIBGCC_PATH) ...@@ -53,8 +54,6 @@ libs-y += $(LIBGCC_PATH)
# See arch/tile/Kbuild for content of core part of the kernel # See arch/tile/Kbuild for content of core part of the kernel
core-y += arch/tile/ core-y += arch/tile/
core-$(CONFIG_KVM) += arch/tile/kvm/
ifdef TILERA_ROOT ifdef TILERA_ROOT
INSTALL_PATH ?= $(TILERA_ROOT)/tile/boot INSTALL_PATH ?= $(TILERA_ROOT)/tile/boot
endif endif
......
...@@ -60,8 +60,8 @@ ...@@ -60,8 +60,8 @@
_concat4(SPR_IPI_EVENT_, CONFIG_KERNEL_PL,,) _concat4(SPR_IPI_EVENT_, CONFIG_KERNEL_PL,,)
#define SPR_IPI_EVENT_RESET_K \ #define SPR_IPI_EVENT_RESET_K \
_concat4(SPR_IPI_EVENT_RESET_, CONFIG_KERNEL_PL,,) _concat4(SPR_IPI_EVENT_RESET_, CONFIG_KERNEL_PL,,)
#define SPR_IPI_MASK_SET_K \ #define SPR_IPI_EVENT_SET_K \
_concat4(SPR_IPI_MASK_SET_, CONFIG_KERNEL_PL,,) _concat4(SPR_IPI_EVENT_SET_, CONFIG_KERNEL_PL,,)
#define INT_IPI_K \ #define INT_IPI_K \
_concat4(INT_IPI_, CONFIG_KERNEL_PL,,) _concat4(INT_IPI_, CONFIG_KERNEL_PL,,)
......
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
#ifndef _ASM_TILE_ATOMIC_H #ifndef _ASM_TILE_ATOMIC_H
#define _ASM_TILE_ATOMIC_H #define _ASM_TILE_ATOMIC_H
#include <asm/cmpxchg.h>
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#include <linux/compiler.h> #include <linux/compiler.h>
...@@ -121,54 +123,6 @@ static inline int atomic_read(const atomic_t *v) ...@@ -121,54 +123,6 @@ static inline int atomic_read(const atomic_t *v)
*/ */
#define atomic_add_negative(i, v) (atomic_add_return((i), (v)) < 0) #define atomic_add_negative(i, v) (atomic_add_return((i), (v)) < 0)
/* Nonexistent functions intended to cause link errors. */
extern unsigned long __xchg_called_with_bad_pointer(void);
extern unsigned long __cmpxchg_called_with_bad_pointer(void);
#define xchg(ptr, x) \
({ \
typeof(*(ptr)) __x; \
switch (sizeof(*(ptr))) { \
case 4: \
__x = (typeof(__x))(typeof(__x-__x))atomic_xchg( \
(atomic_t *)(ptr), \
(u32)(typeof((x)-(x)))(x)); \
break; \
case 8: \
__x = (typeof(__x))(typeof(__x-__x))atomic64_xchg( \
(atomic64_t *)(ptr), \
(u64)(typeof((x)-(x)))(x)); \
break; \
default: \
__xchg_called_with_bad_pointer(); \
} \
__x; \
})
#define cmpxchg(ptr, o, n) \
({ \
typeof(*(ptr)) __x; \
switch (sizeof(*(ptr))) { \
case 4: \
__x = (typeof(__x))(typeof(__x-__x))atomic_cmpxchg( \
(atomic_t *)(ptr), \
(u32)(typeof((o)-(o)))(o), \
(u32)(typeof((n)-(n)))(n)); \
break; \
case 8: \
__x = (typeof(__x))(typeof(__x-__x))atomic64_cmpxchg( \
(atomic64_t *)(ptr), \
(u64)(typeof((o)-(o)))(o), \
(u64)(typeof((n)-(n)))(n)); \
break; \
default: \
__cmpxchg_called_with_bad_pointer(); \
} \
__x; \
})
#define tas(ptr) (xchg((ptr), 1))
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#ifndef __tilegx__ #ifndef __tilegx__
......
...@@ -200,7 +200,7 @@ static inline u64 atomic64_add_return(u64 i, atomic64_t *v) ...@@ -200,7 +200,7 @@ static inline u64 atomic64_add_return(u64 i, atomic64_t *v)
* @u: ...unless v is equal to u. * @u: ...unless v is equal to u.
* *
* Atomically adds @a to @v, so long as @v was not already @u. * Atomically adds @a to @v, so long as @v was not already @u.
* Returns the old value of @v. * Returns non-zero if @v was not @u, and zero otherwise.
*/ */
static inline u64 atomic64_add_unless(atomic64_t *v, u64 a, u64 u) static inline u64 atomic64_add_unless(atomic64_t *v, u64 a, u64 u)
{ {
......
...@@ -38,10 +38,10 @@ static inline void clear_bit(unsigned nr, volatile unsigned long *addr) ...@@ -38,10 +38,10 @@ static inline void clear_bit(unsigned nr, volatile unsigned long *addr)
static inline void change_bit(unsigned nr, volatile unsigned long *addr) static inline void change_bit(unsigned nr, volatile unsigned long *addr)
{ {
unsigned long old, mask = (1UL << (nr % BITS_PER_LONG)); unsigned long mask = (1UL << (nr % BITS_PER_LONG));
long guess, oldval; unsigned long guess, oldval;
addr += nr / BITS_PER_LONG; addr += nr / BITS_PER_LONG;
old = *addr; oldval = *addr;
do { do {
guess = oldval; guess = oldval;
oldval = atomic64_cmpxchg((atomic64_t *)addr, oldval = atomic64_cmpxchg((atomic64_t *)addr,
...@@ -85,7 +85,7 @@ static inline int test_and_change_bit(unsigned nr, ...@@ -85,7 +85,7 @@ static inline int test_and_change_bit(unsigned nr,
volatile unsigned long *addr) volatile unsigned long *addr)
{ {
unsigned long mask = (1UL << (nr % BITS_PER_LONG)); unsigned long mask = (1UL << (nr % BITS_PER_LONG));
long guess, oldval = *addr; unsigned long guess, oldval;
addr += nr / BITS_PER_LONG; addr += nr / BITS_PER_LONG;
oldval = *addr; oldval = *addr;
do { do {
......
/*
* cmpxchg.h -- forked from asm/atomic.h with this copyright:
*
* Copyright 2010 Tilera Corporation. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation, version 2.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
* NON INFRINGEMENT. See the GNU General Public License for
* more details.
*
*/
#ifndef _ASM_TILE_CMPXCHG_H
#define _ASM_TILE_CMPXCHG_H
#ifndef __ASSEMBLY__
/* Nonexistent functions intended to cause link errors. */
extern unsigned long __xchg_called_with_bad_pointer(void);
extern unsigned long __cmpxchg_called_with_bad_pointer(void);
#define xchg(ptr, x) \
({ \
typeof(*(ptr)) __x; \
switch (sizeof(*(ptr))) { \
case 4: \
__x = (typeof(__x))(typeof(__x-__x))atomic_xchg( \
(atomic_t *)(ptr), \
(u32)(typeof((x)-(x)))(x)); \
break; \
case 8: \
__x = (typeof(__x))(typeof(__x-__x))atomic64_xchg( \
(atomic64_t *)(ptr), \
(u64)(typeof((x)-(x)))(x)); \
break; \
default: \
__xchg_called_with_bad_pointer(); \
} \
__x; \
})
#define cmpxchg(ptr, o, n) \
({ \
typeof(*(ptr)) __x; \
switch (sizeof(*(ptr))) { \
case 4: \
__x = (typeof(__x))(typeof(__x-__x))atomic_cmpxchg( \
(atomic_t *)(ptr), \
(u32)(typeof((o)-(o)))(o), \
(u32)(typeof((n)-(n)))(n)); \
break; \
case 8: \
__x = (typeof(__x))(typeof(__x-__x))atomic64_cmpxchg( \
(atomic64_t *)(ptr), \
(u64)(typeof((o)-(o)))(o), \
(u64)(typeof((n)-(n)))(n)); \
break; \
default: \
__cmpxchg_called_with_bad_pointer(); \
} \
__x; \
})
#define tas(ptr) (xchg((ptr), 1))
#endif /* __ASSEMBLY__ */
#endif /* _ASM_TILE_CMPXCHG_H */
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#define NR_IRQS 32 #define NR_IRQS 32
/* IRQ numbers used for linux IPIs. */ /* IRQ numbers used for linux IPIs. */
#define IRQ_RESCHEDULE 1 #define IRQ_RESCHEDULE 0
#define irq_canonicalize(irq) (irq) #define irq_canonicalize(irq) (irq)
......
...@@ -137,7 +137,7 @@ static inline void arch_read_unlock(arch_rwlock_t *rw) ...@@ -137,7 +137,7 @@ static inline void arch_read_unlock(arch_rwlock_t *rw)
static inline void arch_write_unlock(arch_rwlock_t *rw) static inline void arch_write_unlock(arch_rwlock_t *rw)
{ {
__insn_mf(); __insn_mf();
rw->lock = 0; __insn_exch4(&rw->lock, 0); /* Avoid waiting in the write buffer. */
} }
static inline int arch_read_trylock(arch_rwlock_t *rw) static inline int arch_read_trylock(arch_rwlock_t *rw)
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
struct KBacktraceIterator { struct KBacktraceIterator {
BacktraceIterator it; BacktraceIterator it;
struct task_struct *task; /* task we are backtracing */ struct task_struct *task; /* task we are backtracing */
pte_t *pgtable; /* page table for user space access */
int end; /* iteration complete. */ int end; /* iteration complete. */
int new_context; /* new context is starting */ int new_context; /* new context is starting */
int profile; /* profiling, so stop on async intrpt */ int profile; /* profiling, so stop on async intrpt */
......
...@@ -64,7 +64,11 @@ void do_breakpoint(struct pt_regs *, int fault_num); ...@@ -64,7 +64,11 @@ void do_breakpoint(struct pt_regs *, int fault_num);
#ifdef __tilegx__ #ifdef __tilegx__
/* kernel/single_step.c */
void gx_singlestep_handle(struct pt_regs *, int fault_num); void gx_singlestep_handle(struct pt_regs *, int fault_num);
/* kernel/intvec_64.S */
void fill_ra_stack(void);
#endif #endif
#endif /* _ASM_TILE_SYSCALLS_H */ #endif /* _ASM_TILE_TRAPS_H */
...@@ -85,6 +85,7 @@ STD_ENTRY(cpu_idle_on_new_stack) ...@@ -85,6 +85,7 @@ STD_ENTRY(cpu_idle_on_new_stack)
/* Loop forever on a nap during SMP boot. */ /* Loop forever on a nap during SMP boot. */
STD_ENTRY(smp_nap) STD_ENTRY(smp_nap)
nap nap
nop /* avoid provoking the icache prefetch with a jump */
j smp_nap /* we are not architecturally guaranteed not to exit nap */ j smp_nap /* we are not architecturally guaranteed not to exit nap */
jrp lr /* clue in the backtracer */ jrp lr /* clue in the backtracer */
STD_ENDPROC(smp_nap) STD_ENDPROC(smp_nap)
...@@ -105,5 +106,6 @@ STD_ENTRY(_cpu_idle) ...@@ -105,5 +106,6 @@ STD_ENTRY(_cpu_idle)
.global _cpu_idle_nap .global _cpu_idle_nap
_cpu_idle_nap: _cpu_idle_nap:
nap nap
nop /* avoid provoking the icache prefetch with a jump */
jrp lr jrp lr
STD_ENDPROC(_cpu_idle) STD_ENDPROC(_cpu_idle)
...@@ -799,6 +799,10 @@ handle_interrupt: ...@@ -799,6 +799,10 @@ handle_interrupt:
* This routine takes a boolean in r30 indicating if this is an NMI. * This routine takes a boolean in r30 indicating if this is an NMI.
* If so, we also expect a boolean in r31 indicating whether to * If so, we also expect a boolean in r31 indicating whether to
* re-enable the oprofile interrupts. * re-enable the oprofile interrupts.
*
* Note that .Lresume_userspace is jumped to directly in several
* places, and we need to make sure r30 is set correctly in those
* callers as well.
*/ */
STD_ENTRY(interrupt_return) STD_ENTRY(interrupt_return)
/* If we're resuming to kernel space, don't check thread flags. */ /* If we're resuming to kernel space, don't check thread flags. */
...@@ -1237,7 +1241,10 @@ handle_syscall: ...@@ -1237,7 +1241,10 @@ handle_syscall:
bzt r30, 1f bzt r30, 1f
jal do_syscall_trace jal do_syscall_trace
FEEDBACK_REENTER(handle_syscall) FEEDBACK_REENTER(handle_syscall)
1: j .Lresume_userspace /* jump into middle of interrupt_return */ 1: {
movei r30, 0 /* not an NMI */
j .Lresume_userspace /* jump into middle of interrupt_return */
}
.Linvalid_syscall: .Linvalid_syscall:
/* Report an invalid syscall back to the user program */ /* Report an invalid syscall back to the user program */
...@@ -1246,7 +1253,10 @@ handle_syscall: ...@@ -1246,7 +1253,10 @@ handle_syscall:
movei r28, -ENOSYS movei r28, -ENOSYS
} }
sw r29, r28 sw r29, r28
j .Lresume_userspace /* jump into middle of interrupt_return */ {
movei r30, 0 /* not an NMI */
j .Lresume_userspace /* jump into middle of interrupt_return */
}
STD_ENDPROC(handle_syscall) STD_ENDPROC(handle_syscall)
/* Return the address for oprofile to suppress in backtraces. */ /* Return the address for oprofile to suppress in backtraces. */
...@@ -1262,7 +1272,10 @@ STD_ENTRY(ret_from_fork) ...@@ -1262,7 +1272,10 @@ STD_ENTRY(ret_from_fork)
jal sim_notify_fork jal sim_notify_fork
jal schedule_tail jal schedule_tail
FEEDBACK_REENTER(ret_from_fork) FEEDBACK_REENTER(ret_from_fork)
j .Lresume_userspace /* jump into middle of interrupt_return */ {
movei r30, 0 /* not an NMI */
j .Lresume_userspace /* jump into middle of interrupt_return */
}
STD_ENDPROC(ret_from_fork) STD_ENDPROC(ret_from_fork)
/* /*
...@@ -1376,7 +1389,10 @@ handle_ill: ...@@ -1376,7 +1389,10 @@ handle_ill:
jal send_sigtrap /* issue a SIGTRAP */ jal send_sigtrap /* issue a SIGTRAP */
FEEDBACK_REENTER(handle_ill) FEEDBACK_REENTER(handle_ill)
j .Lresume_userspace /* jump into middle of interrupt_return */ {
movei r30, 0 /* not an NMI */
j .Lresume_userspace /* jump into middle of interrupt_return */
}
.Ldispatch_normal_ill: .Ldispatch_normal_ill:
{ {
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <asm/irqflags.h> #include <asm/irqflags.h>
#include <asm/asm-offsets.h> #include <asm/asm-offsets.h>
#include <asm/types.h> #include <asm/types.h>
#include <asm/signal.h>
#include <hv/hypervisor.h> #include <hv/hypervisor.h>
#include <arch/abi.h> #include <arch/abi.h>
#include <arch/interrupts.h> #include <arch/interrupts.h>
...@@ -605,6 +606,10 @@ handle_interrupt: ...@@ -605,6 +606,10 @@ handle_interrupt:
* This routine takes a boolean in r30 indicating if this is an NMI. * This routine takes a boolean in r30 indicating if this is an NMI.
* If so, we also expect a boolean in r31 indicating whether to * If so, we also expect a boolean in r31 indicating whether to
* re-enable the oprofile interrupts. * re-enable the oprofile interrupts.
*
* Note that .Lresume_userspace is jumped to directly in several
* places, and we need to make sure r30 is set correctly in those
* callers as well.
*/ */
STD_ENTRY(interrupt_return) STD_ENTRY(interrupt_return)
/* If we're resuming to kernel space, don't check thread flags. */ /* If we're resuming to kernel space, don't check thread flags. */
...@@ -1039,11 +1044,28 @@ handle_syscall: ...@@ -1039,11 +1044,28 @@ handle_syscall:
/* Do syscall trace again, if requested. */