diff options
| -rw-r--r-- | arch/blackfin/include/asm/hardirq.h | 42 | ||||
| -rw-r--r-- | arch/blackfin/include/asm/irq.h | 5 | ||||
| -rw-r--r-- | arch/blackfin/include/asm/processor.h | 35 | ||||
| -rw-r--r-- | arch/blackfin/kernel/process.c | 23 |
4 files changed, 30 insertions, 75 deletions
diff --git a/arch/blackfin/include/asm/hardirq.h b/arch/blackfin/include/asm/hardirq.h index 717181a1749b..cbd52f86bb9f 100644 --- a/arch/blackfin/include/asm/hardirq.h +++ b/arch/blackfin/include/asm/hardirq.h | |||
| @@ -1,47 +1,11 @@ | |||
| 1 | #ifndef __BFIN_HARDIRQ_H | 1 | #ifndef __BFIN_HARDIRQ_H |
| 2 | #define __BFIN_HARDIRQ_H | 2 | #define __BFIN_HARDIRQ_H |
| 3 | 3 | ||
| 4 | #include <linux/cache.h> | ||
| 5 | #include <linux/threads.h> | ||
| 6 | #include <asm/irq.h> | ||
| 7 | |||
| 8 | typedef struct { | ||
| 9 | unsigned int __softirq_pending; | ||
| 10 | unsigned int __syscall_count; | ||
| 11 | struct task_struct *__ksoftirqd_task; | ||
| 12 | } ____cacheline_aligned irq_cpustat_t; | ||
| 13 | |||
| 14 | #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ | ||
| 15 | |||
| 16 | /* | ||
| 17 | * We put the hardirq and softirq counter into the preemption | ||
| 18 | * counter. The bitmask has the following meaning: | ||
| 19 | * | ||
| 20 | * - bits 0-7 are the preemption count (max preemption depth: 256) | ||
| 21 | * - bits 8-15 are the softirq count (max # of softirqs: 256) | ||
| 22 | * - bits 16-23 are the hardirq count (max # of hardirqs: 256) | ||
| 23 | * | ||
| 24 | * - ( bit 26 is the PREEMPT_ACTIVE flag. ) | ||
| 25 | * | ||
| 26 | * PREEMPT_MASK: 0x000000ff | ||
| 27 | * HARDIRQ_MASK: 0x0000ff00 | ||
| 28 | * SOFTIRQ_MASK: 0x00ff0000 | ||
| 29 | */ | ||
| 30 | |||
| 31 | #if NR_IRQS > 256 | ||
| 32 | #define HARDIRQ_BITS 9 | ||
| 33 | #else | ||
| 34 | #define HARDIRQ_BITS 8 | ||
| 35 | #endif | ||
| 36 | |||
| 37 | #ifdef NR_IRQS | ||
| 38 | # if (1 << HARDIRQ_BITS) < NR_IRQS | ||
| 39 | # error HARDIRQ_BITS is too low! | ||
| 40 | # endif | ||
| 41 | #endif | ||
| 42 | |||
| 43 | #define __ARCH_IRQ_EXIT_IRQS_DISABLED 1 | 4 | #define __ARCH_IRQ_EXIT_IRQS_DISABLED 1 |
| 44 | 5 | ||
| 45 | extern void ack_bad_irq(unsigned int irq); | 6 | extern void ack_bad_irq(unsigned int irq); |
| 7 | #define ack_bad_irq ack_bad_irq | ||
| 8 | |||
| 9 | #include <asm-generic/hardirq.h> | ||
| 46 | 10 | ||
| 47 | #endif | 11 | #endif |
diff --git a/arch/blackfin/include/asm/irq.h b/arch/blackfin/include/asm/irq.h index 400bdd52ce87..9a7f63a83c47 100644 --- a/arch/blackfin/include/asm/irq.h +++ b/arch/blackfin/include/asm/irq.h | |||
| @@ -45,9 +45,6 @@ | |||
| 45 | : "d" (bfin_irq_flags) \ | 45 | : "d" (bfin_irq_flags) \ |
| 46 | ) | 46 | ) |
| 47 | 47 | ||
| 48 | static inline int irq_canonicalize(int irq) | 48 | #include <asm-generic/irq.h> |
| 49 | { | ||
| 50 | return irq; | ||
| 51 | } | ||
| 52 | 49 | ||
| 53 | #endif /* _BFIN_IRQ_H_ */ | 50 | #endif /* _BFIN_IRQ_H_ */ |
diff --git a/arch/blackfin/include/asm/processor.h b/arch/blackfin/include/asm/processor.h index 3040415523b2..d0be99be8308 100644 --- a/arch/blackfin/include/asm/processor.h +++ b/arch/blackfin/include/asm/processor.h | |||
| @@ -7,9 +7,8 @@ | |||
| 7 | */ | 7 | */ |
| 8 | #define current_text_addr() ({ __label__ _l; _l: &&_l;}) | 8 | #define current_text_addr() ({ __label__ _l; _l: &&_l;}) |
| 9 | 9 | ||
| 10 | #include <asm/ptrace.h> | ||
| 10 | #include <asm/blackfin.h> | 11 | #include <asm/blackfin.h> |
| 11 | #include <asm/segment.h> | ||
| 12 | #include <linux/compiler.h> | ||
| 13 | 12 | ||
| 14 | static inline unsigned long rdusp(void) | 13 | static inline unsigned long rdusp(void) |
| 15 | { | 14 | { |
| @@ -59,36 +58,8 @@ struct thread_struct { | |||
| 59 | PS_S, 0, 0 \ | 58 | PS_S, 0, 0 \ |
| 60 | } | 59 | } |
| 61 | 60 | ||
| 62 | /* | 61 | extern void start_thread(struct pt_regs *regs, unsigned long new_ip, |
| 63 | * Do necessary setup to start up a newly executed thread. | 62 | unsigned long new_sp); |
| 64 | * | ||
| 65 | * pass the data segment into user programs if it exists, | ||
| 66 | * it can't hurt anything as far as I can tell | ||
| 67 | */ | ||
| 68 | #ifndef CONFIG_SMP | ||
| 69 | #define start_thread(_regs, _pc, _usp) \ | ||
| 70 | do { \ | ||
| 71 | set_fs(USER_DS); \ | ||
| 72 | (_regs)->pc = (_pc); \ | ||
| 73 | if (current->mm) \ | ||
| 74 | (_regs)->p5 = current->mm->start_data; \ | ||
| 75 | task_thread_info(current)->l1_task_info.stack_start \ | ||
| 76 | = (void *)current->mm->context.stack_start; \ | ||
| 77 | task_thread_info(current)->l1_task_info.lowest_sp = (void *)(_usp); \ | ||
| 78 | memcpy(L1_SCRATCH_TASK_INFO, &task_thread_info(current)->l1_task_info, \ | ||
| 79 | sizeof(*L1_SCRATCH_TASK_INFO)); \ | ||
| 80 | wrusp(_usp); \ | ||
| 81 | } while(0) | ||
| 82 | #else | ||
| 83 | #define start_thread(_regs, _pc, _usp) \ | ||
| 84 | do { \ | ||
| 85 | set_fs(USER_DS); \ | ||
| 86 | (_regs)->pc = (_pc); \ | ||
| 87 | if (current->mm) \ | ||
| 88 | (_regs)->p5 = current->mm->start_data; \ | ||
| 89 | wrusp(_usp); \ | ||
| 90 | } while (0) | ||
| 91 | #endif | ||
| 92 | 63 | ||
| 93 | /* Forward declaration, a strange C thing */ | 64 | /* Forward declaration, a strange C thing */ |
| 94 | struct task_struct; | 65 | struct task_struct; |
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c index 30d0843ed701..3e1d86e456f6 100644 --- a/arch/blackfin/kernel/process.c +++ b/arch/blackfin/kernel/process.c | |||
| @@ -160,6 +160,29 @@ pid_t kernel_thread(int (*fn) (void *), void *arg, unsigned long flags) | |||
| 160 | } | 160 | } |
| 161 | EXPORT_SYMBOL(kernel_thread); | 161 | EXPORT_SYMBOL(kernel_thread); |
| 162 | 162 | ||
| 163 | /* | ||
| 164 | * Do necessary setup to start up a newly executed thread. | ||
| 165 | * | ||
| 166 | * pass the data segment into user programs if it exists, | ||
| 167 | * it can't hurt anything as far as I can tell | ||
| 168 | */ | ||
| 169 | void start_thread(struct pt_regs *regs, unsigned long new_ip, unsigned long new_sp) | ||
| 170 | { | ||
| 171 | set_fs(USER_DS); | ||
| 172 | regs->pc = new_ip; | ||
| 173 | if (current->mm) | ||
| 174 | regs->p5 = current->mm->start_data; | ||
| 175 | #ifdef CONFIG_SMP | ||
| 176 | task_thread_info(current)->l1_task_info.stack_start = | ||
| 177 | (void *)current->mm->context.stack_start; | ||
| 178 | task_thread_info(current)->l1_task_info.lowest_sp = (void *)new_sp; | ||
| 179 | memcpy(L1_SCRATCH_TASK_INFO, &task_thread_info(current)->l1_task_info, | ||
| 180 | sizeof(*L1_SCRATCH_TASK_INFO)); | ||
| 181 | #endif | ||
| 182 | wrusp(new_sp); | ||
| 183 | } | ||
| 184 | EXPORT_SYMBOL_GPL(start_thread); | ||
| 185 | |||
| 163 | void flush_thread(void) | 186 | void flush_thread(void) |
| 164 | { | 187 | { |
| 165 | } | 188 | } |
