···11+/*22+ * Copyright (C) 2006 Atmark Techno, Inc.33+ *44+ * This file is subject to the terms and conditions of the GNU General Public55+ * License. See the file "COPYING" in the main directory of this archive66+ * for more details.77+ */88+99+#ifndef _ASM_MICROBLAZE_BARRIER_H1010+#define _ASM_MICROBLAZE_BARRIER_H1111+1212+#define nop() asm volatile ("nop")1313+1414+#define smp_read_barrier_depends() do {} while (0)1515+#define read_barrier_depends() do {} while (0)1616+1717+#define mb() barrier()1818+#define rmb() mb()1919+#define wmb() mb()2020+#define set_mb(var, value) do { var = value; mb(); } while (0)2121+#define set_wmb(var, value) do { var = value; wmb(); } while (0)2222+2323+#define smp_mb() mb()2424+#define smp_rmb() rmb()2525+#define smp_wmb() wmb()2626+2727+#endif /* _ASM_MICROBLAZE_BARRIER_H */
+40
arch/microblaze/include/asm/cmpxchg.h
···11+#ifndef _ASM_MICROBLAZE_CMPXCHG_H22+#define _ASM_MICROBLAZE_CMPXCHG_H33+44+void __bad_xchg(volatile void *ptr, int size);55+66+static inline unsigned long __xchg(unsigned long x, volatile void *ptr,77+ int size)88+{99+ unsigned long ret;1010+ unsigned long flags;1111+1212+ switch (size) {1313+ case 1:1414+ local_irq_save(flags);1515+ ret = *(volatile unsigned char *)ptr;1616+ *(volatile unsigned char *)ptr = x;1717+ local_irq_restore(flags);1818+ break;1919+2020+ case 4:2121+ local_irq_save(flags);2222+ ret = *(volatile unsigned long *)ptr;2323+ *(volatile unsigned long *)ptr = x;2424+ local_irq_restore(flags);2525+ break;2626+ default:2727+ __bad_xchg(ptr, size), ret = 0;2828+ break;2929+ }3030+3131+ return ret;3232+}3333+3434+#define xchg(ptr, x) \3535+ ((__typeof__(*(ptr))) __xchg((unsigned long)(x), (ptr), sizeof(*(ptr))))3636+3737+#include <asm-generic/cmpxchg.h>3838+#include <asm-generic/cmpxchg-local.h>3939+4040+#endif /* _ASM_MICROBLAZE_CMPXCHG_H */
+14
arch/microblaze/include/asm/exec.h
···11+/*22+ * Copyright (C) 2006 Atmark Techno, Inc.33+ *44+ * This file is subject to the terms and conditions of the GNU General Public55+ * License. See the file "COPYING" in the main directory of this archive66+ * for more details.77+ */88+99+#ifndef _ASM_MICROBLAZE_EXEC_H1010+#define _ASM_MICROBLAZE_EXEC_H1111+1212+#define arch_align_stack(x) (x)1313+1414+#endif /* _ASM_MICROBLAZE_EXEC_H */
+10-1
arch/microblaze/include/asm/processor.h
···125125 .pgdir = swapper_pg_dir, \126126}127127128128-129128/* Free all resources held by a thread. */130129extern inline void release_thread(struct task_struct *dead_task)131130{···142143 ((tsk)->thread.regs ? (tsk)->thread.regs->r15 : 0)143144144145unsigned long get_wchan(struct task_struct *p);146146+147147+extern void ret_from_fork(void);145148146149/* The size allocated for kernel stacks. This _must_ be a power of two! */147150# define KERNEL_STACK_SIZE 0x2000···166165167166# define STACK_TOP TASK_SIZE168167# define STACK_TOP_MAX STACK_TOP168168+169169+void disable_hlt(void);170170+void enable_hlt(void);171171+void default_idle(void);172172+173173+#ifdef CONFIG_DEBUG_FS174174+extern struct dentry *of_debugfs_root;175175+#endif169176170177# endif /* __ASSEMBLY__ */171178# endif /* CONFIG_MMU */
···11+/*22+ * Copyright (C) 2006 Atmark Techno, Inc.33+ *44+ * This file is subject to the terms and conditions of the GNU General Public55+ * License. See the file "COPYING" in the main directory of this archive66+ * for more details.77+ */88+99+#ifndef _ASM_MICROBLAZE_SWITCH_TO_H1010+#define _ASM_MICROBLAZE_SWITCH_TO_H1111+1212+struct task_struct;1313+struct thread_info;1414+1515+extern struct task_struct *_switch_to(struct thread_info *prev,1616+ struct thread_info *next);1717+1818+#define switch_to(prev, next, last) \1919+ do { \2020+ (last) = _switch_to(task_thread_info(prev), \2121+ task_thread_info(next)); \2222+ } while (0)2323+2424+#endif /* _ASM_MICROBLAZE_SWITCH_TO_H */
+7-97
arch/microblaze/include/asm/system.h
···11-/*22- * Copyright (C) 2006 Atmark Techno, Inc.33- *44- * This file is subject to the terms and conditions of the GNU General Public55- * License. See the file "COPYING" in the main directory of this archive66- * for more details.77- */88-99-#ifndef _ASM_MICROBLAZE_SYSTEM_H1010-#define _ASM_MICROBLAZE_SYSTEM_H1111-1212-#include <asm/registers.h>1313-#include <asm/setup.h>1414-#include <asm/irqflags.h>1515-#include <asm/cache.h>1616-1717-#include <asm-generic/cmpxchg.h>1818-#include <asm-generic/cmpxchg-local.h>1919-2020-struct task_struct;2121-struct thread_info;2222-2323-extern struct task_struct *_switch_to(struct thread_info *prev,2424- struct thread_info *next);2525-2626-#define switch_to(prev, next, last) \2727- do { \2828- (last) = _switch_to(task_thread_info(prev), \2929- task_thread_info(next)); \3030- } while (0)3131-3232-#define smp_read_barrier_depends() do {} while (0)3333-#define read_barrier_depends() do {} while (0)3434-3535-#define nop() asm volatile ("nop")3636-#define mb() barrier()3737-#define rmb() mb()3838-#define wmb() mb()3939-#define set_mb(var, value) do { var = value; mb(); } while (0)4040-#define set_wmb(var, value) do { var = value; wmb(); } while (0)4141-4242-#define smp_mb() mb()4343-#define smp_rmb() rmb()4444-#define smp_wmb() wmb()4545-4646-void __bad_xchg(volatile void *ptr, int size);4747-4848-static inline unsigned long __xchg(unsigned long x, volatile void *ptr,4949- int size)5050-{5151- unsigned long ret;5252- unsigned long flags;5353-5454- switch (size) {5555- case 1:5656- local_irq_save(flags);5757- ret = *(volatile unsigned char *)ptr;5858- *(volatile unsigned char *)ptr = x;5959- local_irq_restore(flags);6060- break;6161-6262- case 4:6363- local_irq_save(flags);6464- ret = *(volatile unsigned long *)ptr;6565- *(volatile unsigned long *)ptr = x;6666- local_irq_restore(flags);6767- break;6868- default:6969- __bad_xchg(ptr, size), ret = 0;7070- break;7171- }7272-7373- return ret;7474-}7575-7676-void disable_hlt(void);7777-void enable_hlt(void);7878-void default_idle(void);7979-8080-#define xchg(ptr, x) \8181- ((__typeof__(*(ptr))) __xchg((unsigned long)(x), (ptr), sizeof(*(ptr))))8282-8383-void free_init_pages(char *what, unsigned long begin, unsigned long end);8484-void free_initmem(void);8585-extern char *klimit;8686-extern void ret_from_fork(void);8787-8888-extern void *alloc_maybe_bootmem(size_t size, gfp_t mask);8989-extern void *zalloc_maybe_bootmem(size_t size, gfp_t mask);9090-9191-#ifdef CONFIG_DEBUG_FS9292-extern struct dentry *of_debugfs_root;9393-#endif9494-9595-#define arch_align_stack(x) (x)9696-9797-#endif /* _ASM_MICROBLAZE_SYSTEM_H */11+/* FILE TO BE DELETED. DO NOT ADD STUFF HERE! */22+#include <asm/barrier.h>33+#include <asm/cmpxchg.h>44+#include <asm/exec.h>55+#include <asm/special_insns.h>66+#include <asm/switch_to.h>77+extern void free_initmem(void);