···11#ifndef __ASM_SH_ATOMIC_IRQ_H22#define __ASM_SH_ATOMIC_IRQ_H3344+#include <linux/irqflags.h>55+46/*57 * To get proper branch prediction for the main line, we must branch68 * forward to code at the end of this object's .text section, then
···11+/*22+ * Copyright (C) 1999, 2000 Niibe Yutaka & Kaz Kojima33+ * Copyright (C) 2002 Paul Mundt44+ */55+#ifndef __ASM_SH_BARRIER_H66+#define __ASM_SH_BARRIER_H77+88+#if defined(CONFIG_CPU_SH4A) || defined(CONFIG_CPU_SH5)99+#include <asm/cache_insns.h>1010+#endif1111+1212+/*1313+ * A brief note on ctrl_barrier(), the control register write barrier.1414+ *1515+ * Legacy SH cores typically require a sequence of 8 nops after1616+ * modification of a control register in order for the changes to take1717+ * effect. On newer cores (like the sh4a and sh5) this is accomplished1818+ * with icbi.1919+ *2020+ * Also note that on sh4a in the icbi case we can forego a synco for the2121+ * write barrier, as it's not necessary for control registers.2222+ *2323+ * Historically we have only done this type of barrier for the MMUCR, but2424+ * it's also necessary for the CCR, so we make it generic here instead.2525+ */2626+#if defined(CONFIG_CPU_SH4A) || defined(CONFIG_CPU_SH5)2727+#define mb() __asm__ __volatile__ ("synco": : :"memory")2828+#define rmb() mb()2929+#define wmb() __asm__ __volatile__ ("synco": : :"memory")3030+#define ctrl_barrier() __icbi(PAGE_OFFSET)3131+#define read_barrier_depends() do { } while(0)3232+#else3333+#define mb() __asm__ __volatile__ ("": : :"memory")3434+#define rmb() mb()3535+#define wmb() __asm__ __volatile__ ("": : :"memory")3636+#define ctrl_barrier() __asm__ __volatile__ ("nop;nop;nop;nop;nop;nop;nop;nop")3737+#define read_barrier_depends() do { } while(0)3838+#endif3939+4040+#ifdef CONFIG_SMP4141+#define smp_mb() mb()4242+#define smp_rmb() rmb()4343+#define smp_wmb() wmb()4444+#define smp_read_barrier_depends() read_barrier_depends()4545+#else4646+#define smp_mb() barrier()4747+#define smp_rmb() barrier()4848+#define smp_wmb() barrier()4949+#define smp_read_barrier_depends() do { } while(0)5050+#endif5151+5252+#define set_mb(var, value) do { (void)xchg(&var, value); } while (0)5353+5454+#endif /* __ASM_SH_BARRIER_H */
-1
arch/sh/include/asm/bitops.h
···77#error only <linux/bitops.h> can be included directly88#endif991010-#include <asm/system.h>1110/* For __swab32 */1211#include <asm/byteorder.h>1312
+10
arch/sh/include/asm/bl_bit.h
···11+#ifndef __ASM_SH_BL_BIT_H22+#define __ASM_SH_BL_BIT_H33+44+#ifdef CONFIG_SUPERH3255+# include "bl_bit_32.h"66+#else77+# include "bl_bit_64.h"88+#endif99+1010+#endif /* __ASM_SH_BL_BIT_H */
···11+/*22+ * Copyright (C) 2000, 2001 Paolo Alberelli33+ * Copyright (C) 2003 Paul Mundt44+ * Copyright (C) 2004 Richard Curnow55+ *66+ * This file is subject to the terms and conditions of the GNU General Public77+ * License. See the file "COPYING" in the main directory of this archive88+ * for more details.99+ */1010+#ifndef __ASM_SH_BL_BIT_64_H1111+#define __ASM_SH_BL_BIT_64_H1212+1313+#include <asm/processor.h>1414+1515+#define SR_BL_LL 0x0000000010000000LL1616+1717+static inline void set_bl_bit(void)1818+{1919+ unsigned long long __dummy0, __dummy1 = SR_BL_LL;2020+2121+ __asm__ __volatile__("getcon " __SR ", %0\n\t"2222+ "or %0, %1, %0\n\t"2323+ "putcon %0, " __SR "\n\t"2424+ : "=&r" (__dummy0)2525+ : "r" (__dummy1));2626+2727+}2828+2929+static inline void clear_bl_bit(void)3030+{3131+ unsigned long long __dummy0, __dummy1 = ~SR_BL_LL;3232+3333+ __asm__ __volatile__("getcon " __SR ", %0\n\t"3434+ "and %0, %1, %0\n\t"3535+ "putcon %0, " __SR "\n\t"3636+ : "=&r" (__dummy0)3737+ : "r" (__dummy1));3838+}3939+4040+#endif /* __ASM_SH_BL_BIT_64_H */
···11+/*22+ * Copyright (C) 2000, 2001 Paolo Alberelli33+ * Copyright (C) 2003 Paul Mundt44+ * Copyright (C) 2004 Richard Curnow55+ *66+ * This file is subject to the terms and conditions of the GNU General Public77+ * License. See the file "COPYING" in the main directory of this archive88+ * for more details.99+ */1010+#ifndef __ASM_SH_CACHE_INSNS_64_H1111+#define __ASM_SH_CACHE_INSNS_64_H1212+1313+#define __icbi(addr) __asm__ __volatile__ ( "icbi %0, 0\n\t" : : "r" (addr))1414+#define __ocbp(addr) __asm__ __volatile__ ( "ocbp %0, 0\n\t" : : "r" (addr))1515+#define __ocbi(addr) __asm__ __volatile__ ( "ocbi %0, 0\n\t" : : "r" (addr))1616+#define __ocbwb(addr) __asm__ __volatile__ ( "ocbwb %0, 0\n\t" : : "r" (addr))1717+1818+static inline reg_size_t register_align(void *val)1919+{2020+ return (unsigned long long)(signed long long)(signed long)val;2121+}2222+2323+#endif /* __ASM_SH_CACHE_INSNS_64_H */
+2
arch/sh/include/asm/cmpxchg-irq.h
···11#ifndef __ASM_SH_CMPXCHG_IRQ_H22#define __ASM_SH_CMPXCHG_IRQ_H3344+#include <linux/irqflags.h>55+46static inline unsigned long xchg_u32(volatile u32 *m, unsigned long val)57{68 unsigned long flags, retval;
+70
arch/sh/include/asm/cmpxchg.h
···11+#ifndef __ASM_SH_CMPXCHG_H22+#define __ASM_SH_CMPXCHG_H33+44+/*55+ * Atomic operations that C can't guarantee us. Useful for66+ * resource counting etc..77+ */88+99+#include <linux/compiler.h>1010+#include <linux/types.h>1111+1212+#if defined(CONFIG_GUSA_RB)1313+#include <asm/cmpxchg-grb.h>1414+#elif defined(CONFIG_CPU_SH4A)1515+#include <asm/cmpxchg-llsc.h>1616+#else1717+#include <asm/cmpxchg-irq.h>1818+#endif1919+2020+extern void __xchg_called_with_bad_pointer(void);2121+2222+#define __xchg(ptr, x, size) \2323+({ \2424+ unsigned long __xchg__res; \2525+ volatile void *__xchg_ptr = (ptr); \2626+ switch (size) { \2727+ case 4: \2828+ __xchg__res = xchg_u32(__xchg_ptr, x); \2929+ break; \3030+ case 1: \3131+ __xchg__res = xchg_u8(__xchg_ptr, x); \3232+ break; \3333+ default: \3434+ __xchg_called_with_bad_pointer(); \3535+ __xchg__res = x; \3636+ break; \3737+ } \3838+ \3939+ __xchg__res; \4040+})4141+4242+#define xchg(ptr,x) \4343+ ((__typeof__(*(ptr)))__xchg((ptr),(unsigned long)(x), sizeof(*(ptr))))4444+4545+/* This function doesn't exist, so you'll get a linker error4646+ * if something tries to do an invalid cmpxchg(). */4747+extern void __cmpxchg_called_with_bad_pointer(void);4848+4949+#define __HAVE_ARCH_CMPXCHG 15050+5151+static inline unsigned long __cmpxchg(volatile void * ptr, unsigned long old,5252+ unsigned long new, int size)5353+{5454+ switch (size) {5555+ case 4:5656+ return __cmpxchg_u32(ptr, old, new);5757+ }5858+ __cmpxchg_called_with_bad_pointer();5959+ return old;6060+}6161+6262+#define cmpxchg(ptr,o,n) \6363+ ({ \6464+ __typeof__(*(ptr)) _o_ = (o); \6565+ __typeof__(*(ptr)) _n_ = (n); \6666+ (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_, \6767+ (unsigned long)_n_, sizeof(*(ptr))); \6868+ })6969+7070+#endif /* __ASM_SH_CMPXCHG_H */
···11+/*22+ * Copyright (C) 2000, 2001 Paolo Alberelli33+ * Copyright (C) 2003 Paul Mundt44+ * Copyright (C) 2004 Richard Curnow55+ *66+ * This file is subject to the terms and conditions of the GNU General Public77+ * License. See the file "COPYING" in the main directory of this archive88+ * for more details.99+ */1010+#ifndef __ASM_SH_SWITCH_TO_H1111+#define __ASM_SH_SWITCH_TO_H1212+1313+#ifdef CONFIG_SUPERH321414+# include "switch_to_32.h"1515+#else1616+# include "switch_to_64.h"1717+#endif1818+1919+#endif /* __ASM_SH_SWITCH_TO_H */
+35
arch/sh/include/asm/switch_to_64.h
···11+/*22+ * Copyright (C) 2000, 2001 Paolo Alberelli33+ * Copyright (C) 2003 Paul Mundt44+ * Copyright (C) 2004 Richard Curnow55+ *66+ * This file is subject to the terms and conditions of the GNU General Public77+ * License. See the file "COPYING" in the main directory of this archive88+ * for more details.99+ */1010+#ifndef __ASM_SH_SWITCH_TO_64_H1111+#define __ASM_SH_SWITCH_TO_64_H1212+1313+struct thread_struct;1414+struct task_struct;1515+1616+/*1717+ * switch_to() should switch tasks to task nr n, first1818+ */1919+struct task_struct *sh64_switch_to(struct task_struct *prev,2020+ struct thread_struct *prev_thread,2121+ struct task_struct *next,2222+ struct thread_struct *next_thread);2323+2424+#define switch_to(prev,next,last) \2525+do { \2626+ if (last_task_used_math != next) { \2727+ struct pt_regs *regs = next->thread.uregs; \2828+ if (regs) regs->sr |= SR_FD; \2929+ } \3030+ last = sh64_switch_to(prev, &prev->thread, next, \3131+ &next->thread); \3232+} while (0)3333+3434+3535+#endif /* __ASM_SH_SWITCH_TO_64_H */
+8-183
arch/sh/include/asm/system.h
···11-#ifndef __ASM_SH_SYSTEM_H22-#define __ASM_SH_SYSTEM_H33-44-/*55- * Copyright (C) 1999, 2000 Niibe Yutaka & Kaz Kojima66- * Copyright (C) 2002 Paul Mundt77- */88-99-#include <linux/irqflags.h>1010-#include <linux/compiler.h>1111-#include <linux/linkage.h>1212-#include <asm/types.h>1313-#include <asm/uncached.h>1414-1515-#define AT_VECTOR_SIZE_ARCH 5 /* entries in ARCH_DLINFO */1616-1717-/*1818- * A brief note on ctrl_barrier(), the control register write barrier.1919- *2020- * Legacy SH cores typically require a sequence of 8 nops after2121- * modification of a control register in order for the changes to take2222- * effect. On newer cores (like the sh4a and sh5) this is accomplished2323- * with icbi.2424- *2525- * Also note that on sh4a in the icbi case we can forego a synco for the2626- * write barrier, as it's not necessary for control registers.2727- *2828- * Historically we have only done this type of barrier for the MMUCR, but2929- * it's also necessary for the CCR, so we make it generic here instead.3030- */3131-#if defined(CONFIG_CPU_SH4A) || defined(CONFIG_CPU_SH5)3232-#define mb() __asm__ __volatile__ ("synco": : :"memory")3333-#define rmb() mb()3434-#define wmb() __asm__ __volatile__ ("synco": : :"memory")3535-#define ctrl_barrier() __icbi(PAGE_OFFSET)3636-#define read_barrier_depends() do { } while(0)3737-#else3838-#define mb() __asm__ __volatile__ ("": : :"memory")3939-#define rmb() mb()4040-#define wmb() __asm__ __volatile__ ("": : :"memory")4141-#define ctrl_barrier() __asm__ __volatile__ ("nop;nop;nop;nop;nop;nop;nop;nop")4242-#define read_barrier_depends() do { } while(0)4343-#endif4444-4545-#ifdef CONFIG_SMP4646-#define smp_mb() mb()4747-#define smp_rmb() rmb()4848-#define smp_wmb() wmb()4949-#define smp_read_barrier_depends() read_barrier_depends()5050-#else5151-#define smp_mb() barrier()5252-#define smp_rmb() barrier()5353-#define smp_wmb() barrier()5454-#define smp_read_barrier_depends() do { } while(0)5555-#endif5656-5757-#define set_mb(var, value) do { (void)xchg(&var, value); } while (0)5858-5959-#ifdef CONFIG_GUSA_RB6060-#include <asm/cmpxchg-grb.h>6161-#elif defined(CONFIG_CPU_SH4A)6262-#include <asm/cmpxchg-llsc.h>6363-#else6464-#include <asm/cmpxchg-irq.h>6565-#endif6666-6767-extern void __xchg_called_with_bad_pointer(void);6868-6969-#define __xchg(ptr, x, size) \7070-({ \7171- unsigned long __xchg__res; \7272- volatile void *__xchg_ptr = (ptr); \7373- switch (size) { \7474- case 4: \7575- __xchg__res = xchg_u32(__xchg_ptr, x); \7676- break; \7777- case 1: \7878- __xchg__res = xchg_u8(__xchg_ptr, x); \7979- break; \8080- default: \8181- __xchg_called_with_bad_pointer(); \8282- __xchg__res = x; \8383- break; \8484- } \8585- \8686- __xchg__res; \8787-})8888-8989-#define xchg(ptr,x) \9090- ((__typeof__(*(ptr)))__xchg((ptr),(unsigned long)(x), sizeof(*(ptr))))9191-9292-/* This function doesn't exist, so you'll get a linker error9393- * if something tries to do an invalid cmpxchg(). */9494-extern void __cmpxchg_called_with_bad_pointer(void);9595-9696-#define __HAVE_ARCH_CMPXCHG 19797-9898-static inline unsigned long __cmpxchg(volatile void * ptr, unsigned long old,9999- unsigned long new, int size)100100-{101101- switch (size) {102102- case 4:103103- return __cmpxchg_u32(ptr, old, new);104104- }105105- __cmpxchg_called_with_bad_pointer();106106- return old;107107-}108108-109109-#define cmpxchg(ptr,o,n) \110110- ({ \111111- __typeof__(*(ptr)) _o_ = (o); \112112- __typeof__(*(ptr)) _n_ = (n); \113113- (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_, \114114- (unsigned long)_n_, sizeof(*(ptr))); \115115- })116116-117117-struct pt_regs;118118-119119-extern void die(const char *str, struct pt_regs *regs, long err) __attribute__ ((noreturn));11+/* FILE TO BE DELETED. DO NOT ADD STUFF HERE! */22+#include <asm/barrier.h>33+#include <asm/bl_bit.h>44+#include <asm/cache_insns.h>55+#include <asm/cmpxchg.h>66+#include <asm/exec.h>77+#include <asm/switch_to.h>88+#include <asm/traps.h>1209void free_initmem(void);121121-void free_initrd_mem(unsigned long start, unsigned long end);122122-123123-extern void *set_exception_table_vec(unsigned int vec, void *handler);124124-125125-static inline void *set_exception_table_evt(unsigned int evt, void *handler)126126-{127127- return set_exception_table_vec(evt >> 5, handler);128128-}129129-130130-/*131131- * SH-2A has both 16 and 32-bit opcodes, do lame encoding checks.132132- */133133-#ifdef CONFIG_CPU_SH2A134134-extern unsigned int instruction_size(unsigned int insn);135135-#elif defined(CONFIG_SUPERH32)136136-#define instruction_size(insn) (2)137137-#else138138-#define instruction_size(insn) (4)139139-#endif140140-141141-void per_cpu_trap_init(void);142142-void default_idle(void);143143-void cpu_idle_wait(void);144144-void stop_this_cpu(void *);145145-146146-#ifdef CONFIG_SUPERH32147147-#define BUILD_TRAP_HANDLER(name) \148148-asmlinkage void name##_trap_handler(unsigned long r4, unsigned long r5, \149149- unsigned long r6, unsigned long r7, \150150- struct pt_regs __regs)151151-152152-#define TRAP_HANDLER_DECL \153153- struct pt_regs *regs = RELOC_HIDE(&__regs, 0); \154154- unsigned int vec = regs->tra; \155155- (void)vec;156156-#else157157-#define BUILD_TRAP_HANDLER(name) \158158-asmlinkage void name##_trap_handler(unsigned int vec, struct pt_regs *regs)159159-#define TRAP_HANDLER_DECL160160-#endif161161-162162-BUILD_TRAP_HANDLER(address_error);163163-BUILD_TRAP_HANDLER(debug);164164-BUILD_TRAP_HANDLER(bug);165165-BUILD_TRAP_HANDLER(breakpoint);166166-BUILD_TRAP_HANDLER(singlestep);167167-BUILD_TRAP_HANDLER(fpu_error);168168-BUILD_TRAP_HANDLER(fpu_state_restore);169169-BUILD_TRAP_HANDLER(nmi);170170-171171-#define arch_align_stack(x) (x)172172-173173-struct mem_access {174174- unsigned long (*from)(void *dst, const void __user *src, unsigned long cnt);175175- unsigned long (*to)(void __user *dst, const void *src, unsigned long cnt);176176-};177177-178178-#ifdef CONFIG_SUPERH32179179-# include "system_32.h"180180-#else181181-# include "system_64.h"182182-#endif183183-184184-#endif
···11-#ifndef __ASM_SH_SYSTEM_64_H22-#define __ASM_SH_SYSTEM_64_H33-44-/*55- * include/asm-sh/system_64.h66- *77- * Copyright (C) 2000, 2001 Paolo Alberelli88- * Copyright (C) 2003 Paul Mundt99- * Copyright (C) 2004 Richard Curnow1010- *1111- * This file is subject to the terms and conditions of the GNU General Public1212- * License. See the file "COPYING" in the main directory of this archive1313- * for more details.1414- */1515-#include <cpu/registers.h>1616-#include <asm/processor.h>1717-1818-/*1919- * switch_to() should switch tasks to task nr n, first2020- */2121-struct thread_struct;2222-struct task_struct *sh64_switch_to(struct task_struct *prev,2323- struct thread_struct *prev_thread,2424- struct task_struct *next,2525- struct thread_struct *next_thread);2626-2727-#define switch_to(prev,next,last) \2828-do { \2929- if (last_task_used_math != next) { \3030- struct pt_regs *regs = next->thread.uregs; \3131- if (regs) regs->sr |= SR_FD; \3232- } \3333- last = sh64_switch_to(prev, &prev->thread, next, \3434- &next->thread); \3535-} while (0)3636-3737-#define __icbi(addr) __asm__ __volatile__ ( "icbi %0, 0\n\t" : : "r" (addr))3838-#define __ocbp(addr) __asm__ __volatile__ ( "ocbp %0, 0\n\t" : : "r" (addr))3939-#define __ocbi(addr) __asm__ __volatile__ ( "ocbi %0, 0\n\t" : : "r" (addr))4040-#define __ocbwb(addr) __asm__ __volatile__ ( "ocbwb %0, 0\n\t" : : "r" (addr))4141-4242-static inline reg_size_t register_align(void *val)4343-{4444- return (unsigned long long)(signed long long)(signed long)val;4545-}4646-4747-extern void phys_stext(void);4848-4949-static inline void trigger_address_error(void)5050-{5151- phys_stext();5252-}5353-5454-#define SR_BL_LL 0x0000000010000000LL5555-5656-static inline void set_bl_bit(void)5757-{5858- unsigned long long __dummy0, __dummy1 = SR_BL_LL;5959-6060- __asm__ __volatile__("getcon " __SR ", %0\n\t"6161- "or %0, %1, %0\n\t"6262- "putcon %0, " __SR "\n\t"6363- : "=&r" (__dummy0)6464- : "r" (__dummy1));6565-6666-}6767-6868-static inline void clear_bl_bit(void)6969-{7070- unsigned long long __dummy0, __dummy1 = ~SR_BL_LL;7171-7272- __asm__ __volatile__("getcon " __SR ", %0\n\t"7373- "and %0, %1, %0\n\t"7474- "putcon %0, " __SR "\n\t"7575- : "=&r" (__dummy0)7676- : "r" (__dummy1));7777-}7878-7979-#endif /* __ASM_SH_SYSTEM_64_H */
+21
arch/sh/include/asm/traps.h
···11+#ifndef __ASM_SH_TRAPS_H22+#define __ASM_SH_TRAPS_H33+44+#include <linux/compiler.h>55+66+#ifdef CONFIG_SUPERH3277+# include "traps_32.h"88+#else99+# include "traps_64.h"1010+#endif1111+1212+BUILD_TRAP_HANDLER(address_error);1313+BUILD_TRAP_HANDLER(debug);1414+BUILD_TRAP_HANDLER(bug);1515+BUILD_TRAP_HANDLER(breakpoint);1616+BUILD_TRAP_HANDLER(singlestep);1717+BUILD_TRAP_HANDLER(fpu_error);1818+BUILD_TRAP_HANDLER(fpu_state_restore);1919+BUILD_TRAP_HANDLER(nmi);2020+2121+#endif /* __ASM_SH_TRAPS_H */
+68
arch/sh/include/asm/traps_32.h
···11+#ifndef __ASM_SH_TRAPS_32_H22+#define __ASM_SH_TRAPS_32_H33+44+#include <linux/types.h>55+#include <asm/mmu.h>66+77+#ifdef CONFIG_CPU_HAS_SR_RB88+#define lookup_exception_vector() \99+({ \1010+ unsigned long _vec; \1111+ \1212+ __asm__ __volatile__ ( \1313+ "stc r2_bank, %0\n\t" \1414+ : "=r" (_vec) \1515+ ); \1616+ \1717+ _vec; \1818+})1919+#else2020+#define lookup_exception_vector() \2121+({ \2222+ unsigned long _vec; \2323+ __asm__ __volatile__ ( \2424+ "mov r4, %0\n\t" \2525+ : "=r" (_vec) \2626+ ); \2727+ \2828+ _vec; \2929+})3030+#endif3131+3232+static inline void trigger_address_error(void)3333+{3434+ __asm__ __volatile__ (3535+ "ldc %0, sr\n\t"3636+ "mov.l @%1, %0"3737+ :3838+ : "r" (0x10000000), "r" (0x80000001)3939+ );4040+}4141+4242+asmlinkage void do_address_error(struct pt_regs *regs,4343+ unsigned long writeaccess,4444+ unsigned long address);4545+asmlinkage void do_divide_error(unsigned long r4, unsigned long r5,4646+ unsigned long r6, unsigned long r7,4747+ struct pt_regs __regs);4848+asmlinkage void do_reserved_inst(unsigned long r4, unsigned long r5,4949+ unsigned long r6, unsigned long r7,5050+ struct pt_regs __regs);5151+asmlinkage void do_illegal_slot_inst(unsigned long r4, unsigned long r5,5252+ unsigned long r6, unsigned long r7,5353+ struct pt_regs __regs);5454+asmlinkage void do_exception_error(unsigned long r4, unsigned long r5,5555+ unsigned long r6, unsigned long r7,5656+ struct pt_regs __regs);5757+5858+#define BUILD_TRAP_HANDLER(name) \5959+asmlinkage void name##_trap_handler(unsigned long r4, unsigned long r5, \6060+ unsigned long r6, unsigned long r7, \6161+ struct pt_regs __regs)6262+6363+#define TRAP_HANDLER_DECL \6464+ struct pt_regs *regs = RELOC_HIDE(&__regs, 0); \6565+ unsigned int vec = regs->tra; \6666+ (void)vec;6767+6868+#endif /* __ASM_SH_TRAPS_32_H */
+24
arch/sh/include/asm/traps_64.h
···11+/*22+ * Copyright (C) 2000, 2001 Paolo Alberelli33+ * Copyright (C) 2003 Paul Mundt44+ * Copyright (C) 2004 Richard Curnow55+ *66+ * This file is subject to the terms and conditions of the GNU General Public77+ * License. See the file "COPYING" in the main directory of this archive88+ * for more details.99+ */1010+#ifndef __ASM_SH_TRAPS_64_H1111+#define __ASM_SH_TRAPS_64_H1212+1313+extern void phys_stext(void);1414+1515+static inline void trigger_address_error(void)1616+{1717+ phys_stext();1818+}1919+2020+#define BUILD_TRAP_HANDLER(name) \2121+asmlinkage void name##_trap_handler(unsigned int vec, struct pt_regs *regs)2222+#define TRAP_HANDLER_DECL2323+2424+#endif /* __ASM_SH_TRAPS_64_H */
+14
arch/sh/include/asm/uaccess.h
···254254unsigned long search_exception_table(unsigned long addr);255255const struct exception_table_entry *search_exception_tables(unsigned long addr);256256257257+extern void *set_exception_table_vec(unsigned int vec, void *handler);258258+259259+static inline void *set_exception_table_evt(unsigned int evt, void *handler)260260+{261261+ return set_exception_table_vec(evt >> 5, handler);262262+}263263+264264+struct mem_access {265265+ unsigned long (*from)(void *dst, const void __user *src, unsigned long cnt);266266+ unsigned long (*to)(void __user *dst, const void *src, unsigned long cnt);267267+};268268+269269+int handle_unaligned_access(insn_size_t instruction, struct pt_regs *regs,270270+ struct mem_access *ma, int, unsigned long address);257271258272#endif /* __ASM_SH_UACCESS_H */
···1010 * for more details.1111 */1212#include <linux/kernel.h>1313-#include <asm/system.h>14131514/*1615 * Instructions on SH are generally fixed at 16-bits, however, SH-2A
-1
arch/sh/kernel/cpu/sh4/fpu.c
···1515#include <linux/io.h>1616#include <cpu/fpu.h>1717#include <asm/processor.h>1818-#include <asm/system.h>1918#include <asm/fpu.h>20192120/* The PR (precision) bit in the FP Status Register must be clear when
+1
arch/sh/kernel/hw_breakpoint.c
···2222#include <asm/hw_breakpoint.h>2323#include <asm/mmu_context.h>2424#include <asm/ptrace.h>2525+#include <asm/traps.h>25262627/*2728 * Stores the breakpoints currently in use on each breakpoint address
···11#include <linux/mm.h>22#include <asm/mmu_context.h>33#include <asm/cacheflush.h>44+#include <asm/traps.h>4556/*67 * Write back the dirty D-caches, but not invalidate them.