aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/irq_64.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/kernel/irq_64.c')
-rw-r--r--arch/sparc/kernel/irq_64.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c
index 454ce3a25273..830d70a3e20b 100644
--- a/arch/sparc/kernel/irq_64.c
+++ b/arch/sparc/kernel/irq_64.c
@@ -22,6 +22,7 @@
22#include <linux/seq_file.h> 22#include <linux/seq_file.h>
23#include <linux/ftrace.h> 23#include <linux/ftrace.h>
24#include <linux/irq.h> 24#include <linux/irq.h>
25#include <linux/kmemleak.h>
25 26
26#include <asm/ptrace.h> 27#include <asm/ptrace.h>
27#include <asm/processor.h> 28#include <asm/processor.h>
@@ -46,6 +47,7 @@
46 47
47#include "entry.h" 48#include "entry.h"
48#include "cpumap.h" 49#include "cpumap.h"
50#include "kstack.h"
49 51
50#define NUM_IVECS (IMAP_INR + 1) 52#define NUM_IVECS (IMAP_INR + 1)
51 53
@@ -712,24 +714,6 @@ void ack_bad_irq(unsigned int virt_irq)
712void *hardirq_stack[NR_CPUS]; 714void *hardirq_stack[NR_CPUS];
713void *softirq_stack[NR_CPUS]; 715void *softirq_stack[NR_CPUS];
714 716
715static __attribute__((always_inline)) void *set_hardirq_stack(void)
716{
717 void *orig_sp, *sp = hardirq_stack[smp_processor_id()];
718
719 __asm__ __volatile__("mov %%sp, %0" : "=r" (orig_sp));
720 if (orig_sp < sp ||
721 orig_sp > (sp + THREAD_SIZE)) {
722 sp += THREAD_SIZE - 192 - STACK_BIAS;
723 __asm__ __volatile__("mov %0, %%sp" : : "r" (sp));
724 }
725
726 return orig_sp;
727}
728static __attribute__((always_inline)) void restore_hardirq_stack(void *orig_sp)
729{
730 __asm__ __volatile__("mov %0, %%sp" : : "r" (orig_sp));
731}
732
733void __irq_entry handler_irq(int irq, struct pt_regs *regs) 717void __irq_entry handler_irq(int irq, struct pt_regs *regs)
734{ 718{
735 unsigned long pstate, bucket_pa; 719 unsigned long pstate, bucket_pa;