aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sh')
-rw-r--r--include/asm-sh/irq.h9
-rw-r--r--include/asm-sh/thread_info.h12
2 files changed, 20 insertions, 1 deletions
diff --git a/include/asm-sh/irq.h b/include/asm-sh/irq.h
index dd05e102fc0e..0e5f365aff70 100644
--- a/include/asm-sh/irq.h
+++ b/include/asm-sh/irq.h
@@ -719,6 +719,15 @@ static inline int generic_irq_demux(int irq)
719#define irq_canonicalize(irq) (irq) 719#define irq_canonicalize(irq) (irq)
720#define irq_demux(irq) __irq_demux(sh_mv.mv_irq_demux(irq)) 720#define irq_demux(irq) __irq_demux(sh_mv.mv_irq_demux(irq))
721 721
722#ifdef CONFIG_4KSTACKS
723extern void irq_ctx_init(int cpu);
724extern void irq_ctx_exit(int cpu);
725# define __ARCH_HAS_DO_SOFTIRQ
726#else
727# define irq_ctx_init(cpu) do { } while (0)
728# define irq_ctx_exit(cpu) do { } while (0)
729#endif
730
722#if defined(CONFIG_CPU_SUBTYPE_SH73180) 731#if defined(CONFIG_CPU_SUBTYPE_SH73180)
723#include <asm/irq-sh73180.h> 732#include <asm/irq-sh73180.h>
724#endif 733#endif
diff --git a/include/asm-sh/thread_info.h b/include/asm-sh/thread_info.h
index 605259f88113..3ebc3f9039eb 100644
--- a/include/asm-sh/thread_info.h
+++ b/include/asm-sh/thread_info.h
@@ -9,8 +9,8 @@
9 * Copyright (C) 2002 David Howells (dhowells@redhat.com) 9 * Copyright (C) 2002 David Howells (dhowells@redhat.com)
10 * - Incorporating suggestions made by Linus Torvalds and Dave Miller 10 * - Incorporating suggestions made by Linus Torvalds and Dave Miller
11 */ 11 */
12
13#ifdef __KERNEL__ 12#ifdef __KERNEL__
13#include <asm/page.h>
14 14
15#ifndef __ASSEMBLY__ 15#ifndef __ASSEMBLY__
16#include <asm/processor.h> 16#include <asm/processor.h>
@@ -23,13 +23,20 @@ struct thread_info {
23 int preempt_count; /* 0 => preemptable, <0 => BUG */ 23 int preempt_count; /* 0 => preemptable, <0 => BUG */
24 mm_segment_t addr_limit; /* thread address space */ 24 mm_segment_t addr_limit; /* thread address space */
25 struct restart_block restart_block; 25 struct restart_block restart_block;
26 unsigned long previous_sp; /* sp of previous stack in case
27 of nested IRQ stacks */
26 __u8 supervisor_stack[0]; 28 __u8 supervisor_stack[0];
27}; 29};
28 30
29#endif 31#endif
30 32
31#define PREEMPT_ACTIVE 0x10000000 33#define PREEMPT_ACTIVE 0x10000000
34
35#ifdef CONFIG_4KSTACKS
36#define THREAD_SIZE (PAGE_SIZE)
37#else
32#define THREAD_SIZE (PAGE_SIZE * 2) 38#define THREAD_SIZE (PAGE_SIZE * 2)
39#endif
33#define STACK_WARN (THREAD_SIZE / 8) 40#define STACK_WARN (THREAD_SIZE / 8)
34 41
35/* 42/*
@@ -52,6 +59,9 @@ struct thread_info {
52#define init_thread_info (init_thread_union.thread_info) 59#define init_thread_info (init_thread_union.thread_info)
53#define init_stack (init_thread_union.stack) 60#define init_stack (init_thread_union.stack)
54 61
62/* how to get the current stack pointer from C */
63register unsigned long current_stack_pointer asm("r15") __attribute_used__;
64
55/* how to get the thread information struct from C */ 65/* how to get the thread information struct from C */
56static inline struct thread_info *current_thread_info(void) 66static inline struct thread_info *current_thread_info(void)
57{ 67{