Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Disintegrate asm/system.h for Microblaze

Disintegrate asm/system.h for Microblaze. Not compiled.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: microblaze-uclinux@itee.uq.edu.au

+129 -107
+1
arch/microblaze/include/asm/atomic.h
··· 1 1 #ifndef _ASM_MICROBLAZE_ATOMIC_H 2 2 #define _ASM_MICROBLAZE_ATOMIC_H 3 3 4 + #include <asm/cmpxchg.h> 4 5 #include <asm-generic/atomic.h> 5 6 #include <asm-generic/atomic64.h> 6 7
+27
arch/microblaze/include/asm/barrier.h
··· 1 + /* 2 + * Copyright (C) 2006 Atmark Techno, Inc. 3 + * 4 + * This file is subject to the terms and conditions of the GNU General Public 5 + * License. See the file "COPYING" in the main directory of this archive 6 + * for more details. 7 + */ 8 + 9 + #ifndef _ASM_MICROBLAZE_BARRIER_H 10 + #define _ASM_MICROBLAZE_BARRIER_H 11 + 12 + #define nop() asm volatile ("nop") 13 + 14 + #define smp_read_barrier_depends() do {} while (0) 15 + #define read_barrier_depends() do {} while (0) 16 + 17 + #define mb() barrier() 18 + #define rmb() mb() 19 + #define wmb() mb() 20 + #define set_mb(var, value) do { var = value; mb(); } while (0) 21 + #define set_wmb(var, value) do { var = value; wmb(); } while (0) 22 + 23 + #define smp_mb() mb() 24 + #define smp_rmb() rmb() 25 + #define smp_wmb() wmb() 26 + 27 + #endif /* _ASM_MICROBLAZE_BARRIER_H */
+40
arch/microblaze/include/asm/cmpxchg.h
··· 1 + #ifndef _ASM_MICROBLAZE_CMPXCHG_H 2 + #define _ASM_MICROBLAZE_CMPXCHG_H 3 + 4 + void __bad_xchg(volatile void *ptr, int size); 5 + 6 + static inline unsigned long __xchg(unsigned long x, volatile void *ptr, 7 + int size) 8 + { 9 + unsigned long ret; 10 + unsigned long flags; 11 + 12 + switch (size) { 13 + case 1: 14 + local_irq_save(flags); 15 + ret = *(volatile unsigned char *)ptr; 16 + *(volatile unsigned char *)ptr = x; 17 + local_irq_restore(flags); 18 + break; 19 + 20 + case 4: 21 + local_irq_save(flags); 22 + ret = *(volatile unsigned long *)ptr; 23 + *(volatile unsigned long *)ptr = x; 24 + local_irq_restore(flags); 25 + break; 26 + default: 27 + __bad_xchg(ptr, size), ret = 0; 28 + break; 29 + } 30 + 31 + return ret; 32 + } 33 + 34 + #define xchg(ptr, x) \ 35 + ((__typeof__(*(ptr))) __xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))) 36 + 37 + #include <asm-generic/cmpxchg.h> 38 + #include <asm-generic/cmpxchg-local.h> 39 + 40 + #endif /* _ASM_MICROBLAZE_CMPXCHG_H */
+14
arch/microblaze/include/asm/exec.h
··· 1 + /* 2 + * Copyright (C) 2006 Atmark Techno, Inc. 3 + * 4 + * This file is subject to the terms and conditions of the GNU General Public 5 + * License. See the file "COPYING" in the main directory of this archive 6 + * for more details. 7 + */ 8 + 9 + #ifndef _ASM_MICROBLAZE_EXEC_H 10 + #define _ASM_MICROBLAZE_EXEC_H 11 + 12 + #define arch_align_stack(x) (x) 13 + 14 + #endif /* _ASM_MICROBLAZE_EXEC_H */
+10 -1
arch/microblaze/include/asm/processor.h
··· 125 125 .pgdir = swapper_pg_dir, \ 126 126 } 127 127 128 - 129 128 /* Free all resources held by a thread. */ 130 129 extern inline void release_thread(struct task_struct *dead_task) 131 130 { ··· 142 143 ((tsk)->thread.regs ? (tsk)->thread.regs->r15 : 0) 143 144 144 145 unsigned long get_wchan(struct task_struct *p); 146 + 147 + extern void ret_from_fork(void); 145 148 146 149 /* The size allocated for kernel stacks. This _must_ be a power of two! */ 147 150 # define KERNEL_STACK_SIZE 0x2000 ··· 166 165 167 166 # define STACK_TOP TASK_SIZE 168 167 # define STACK_TOP_MAX STACK_TOP 168 + 169 + void disable_hlt(void); 170 + void enable_hlt(void); 171 + void default_idle(void); 172 + 173 + #ifdef CONFIG_DEBUG_FS 174 + extern struct dentry *of_debugfs_root; 175 + #endif 169 176 170 177 # endif /* __ASSEMBLY__ */ 171 178 # endif /* CONFIG_MMU */
+6
arch/microblaze/include/asm/setup.h
··· 20 20 21 21 extern char cmd_line[COMMAND_LINE_SIZE]; 22 22 23 + extern char *klimit; 24 + 23 25 void early_printk(const char *fmt, ...); 24 26 25 27 int setup_early_printk(char *opt); ··· 47 45 void machine_shutdown(void); 48 46 void machine_halt(void); 49 47 void machine_power_off(void); 48 + 49 + void free_init_pages(char *what, unsigned long begin, unsigned long end); 50 + extern void *alloc_maybe_bootmem(size_t size, gfp_t mask); 51 + extern void *zalloc_maybe_bootmem(size_t size, gfp_t mask); 50 52 51 53 # endif/* __KERNEL__ */ 52 54 # endif /* __ASSEMBLY__ */
+24
arch/microblaze/include/asm/switch_to.h
··· 1 + /* 2 + * Copyright (C) 2006 Atmark Techno, Inc. 3 + * 4 + * This file is subject to the terms and conditions of the GNU General Public 5 + * License. See the file "COPYING" in the main directory of this archive 6 + * for more details. 7 + */ 8 + 9 + #ifndef _ASM_MICROBLAZE_SWITCH_TO_H 10 + #define _ASM_MICROBLAZE_SWITCH_TO_H 11 + 12 + struct task_struct; 13 + struct thread_info; 14 + 15 + extern struct task_struct *_switch_to(struct thread_info *prev, 16 + struct thread_info *next); 17 + 18 + #define switch_to(prev, next, last) \ 19 + do { \ 20 + (last) = _switch_to(task_thread_info(prev), \ 21 + task_thread_info(next)); \ 22 + } while (0) 23 + 24 + #endif /* _ASM_MICROBLAZE_SWITCH_TO_H */
+7 -97
arch/microblaze/include/asm/system.h
··· 1 - /* 2 - * Copyright (C) 2006 Atmark Techno, Inc. 3 - * 4 - * This file is subject to the terms and conditions of the GNU General Public 5 - * License. See the file "COPYING" in the main directory of this archive 6 - * for more details. 7 - */ 8 - 9 - #ifndef _ASM_MICROBLAZE_SYSTEM_H 10 - #define _ASM_MICROBLAZE_SYSTEM_H 11 - 12 - #include <asm/registers.h> 13 - #include <asm/setup.h> 14 - #include <asm/irqflags.h> 15 - #include <asm/cache.h> 16 - 17 - #include <asm-generic/cmpxchg.h> 18 - #include <asm-generic/cmpxchg-local.h> 19 - 20 - struct task_struct; 21 - struct thread_info; 22 - 23 - extern struct task_struct *_switch_to(struct thread_info *prev, 24 - struct thread_info *next); 25 - 26 - #define switch_to(prev, next, last) \ 27 - do { \ 28 - (last) = _switch_to(task_thread_info(prev), \ 29 - task_thread_info(next)); \ 30 - } while (0) 31 - 32 - #define smp_read_barrier_depends() do {} while (0) 33 - #define read_barrier_depends() do {} while (0) 34 - 35 - #define nop() asm volatile ("nop") 36 - #define mb() barrier() 37 - #define rmb() mb() 38 - #define wmb() mb() 39 - #define set_mb(var, value) do { var = value; mb(); } while (0) 40 - #define set_wmb(var, value) do { var = value; wmb(); } while (0) 41 - 42 - #define smp_mb() mb() 43 - #define smp_rmb() rmb() 44 - #define smp_wmb() wmb() 45 - 46 - void __bad_xchg(volatile void *ptr, int size); 47 - 48 - static inline unsigned long __xchg(unsigned long x, volatile void *ptr, 49 - int size) 50 - { 51 - unsigned long ret; 52 - unsigned long flags; 53 - 54 - switch (size) { 55 - case 1: 56 - local_irq_save(flags); 57 - ret = *(volatile unsigned char *)ptr; 58 - *(volatile unsigned char *)ptr = x; 59 - local_irq_restore(flags); 60 - break; 61 - 62 - case 4: 63 - local_irq_save(flags); 64 - ret = *(volatile unsigned long *)ptr; 65 - *(volatile unsigned long *)ptr = x; 66 - local_irq_restore(flags); 67 - break; 68 - default: 69 - __bad_xchg(ptr, size), ret = 0; 70 - break; 71 - } 72 - 73 - return ret; 74 - } 75 - 76 - void disable_hlt(void); 77 - void enable_hlt(void); 78 - void default_idle(void); 79 - 80 - #define xchg(ptr, x) \ 81 - ((__typeof__(*(ptr))) __xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))) 82 - 83 - void free_init_pages(char *what, unsigned long begin, unsigned long end); 84 - void free_initmem(void); 85 - extern char *klimit; 86 - extern void ret_from_fork(void); 87 - 88 - extern void *alloc_maybe_bootmem(size_t size, gfp_t mask); 89 - extern void *zalloc_maybe_bootmem(size_t size, gfp_t mask); 90 - 91 - #ifdef CONFIG_DEBUG_FS 92 - extern struct dentry *of_debugfs_root; 93 - #endif 94 - 95 - #define arch_align_stack(x) (x) 96 - 97 - #endif /* _ASM_MICROBLAZE_SYSTEM_H */ 1 + /* FILE TO BE DELETED. DO NOT ADD STUFF HERE! */ 2 + #include <asm/barrier.h> 3 + #include <asm/cmpxchg.h> 4 + #include <asm/exec.h> 5 + #include <asm/special_insns.h> 6 + #include <asm/switch_to.h> 7 + extern void free_initmem(void);
-1
arch/microblaze/kernel/cpu/pvr.c
··· 12 12 13 13 #include <linux/kernel.h> 14 14 #include <linux/compiler.h> 15 - #include <asm/system.h> 16 15 #include <asm/exceptions.h> 17 16 #include <asm/pvr.h> 18 17
-1
arch/microblaze/kernel/microblaze_ksyms.c
··· 18 18 #include <asm/cacheflush.h> 19 19 #include <linux/io.h> 20 20 #include <asm/page.h> 21 - #include <asm/system.h> 22 21 #include <linux/ftrace.h> 23 22 #include <linux/uaccess.h> 24 23
-1
arch/microblaze/kernel/process.c
··· 13 13 #include <linux/pm.h> 14 14 #include <linux/tick.h> 15 15 #include <linux/bitops.h> 16 - #include <asm/system.h> 17 16 #include <asm/pgalloc.h> 18 17 #include <asm/uaccess.h> /* for USER_DS macros */ 19 18 #include <asm/cacheflush.h>
-1
arch/microblaze/kernel/prom.c
··· 36 36 #include <asm/processor.h> 37 37 #include <asm/irq.h> 38 38 #include <linux/io.h> 39 - #include <asm/system.h> 40 39 #include <asm/mmu.h> 41 40 #include <asm/pgtable.h> 42 41 #include <asm/sections.h>
-1
arch/microblaze/kernel/setup.c
··· 30 30 #include <asm/entry.h> 31 31 #include <asm/cpuinfo.h> 32 32 33 - #include <asm/system.h> 34 33 #include <asm/prom.h> 35 34 #include <asm/pgtable.h> 36 35
-1
arch/microblaze/kernel/timer.c
··· 27 27 #include <asm/setup.h> 28 28 #include <asm/prom.h> 29 29 #include <asm/irq.h> 30 - #include <asm/system.h> 31 30 #include <linux/cnt32_to_63.h> 32 31 33 32 #ifdef CONFIG_SELFMOD_TIMER
-1
arch/microblaze/kernel/traps.c
··· 15 15 #include <linux/debug_locks.h> 16 16 17 17 #include <asm/exceptions.h> 18 - #include <asm/system.h> 19 18 #include <asm/unwind.h> 20 19 21 20 void trap_init(void)
-1
arch/microblaze/lib/memcpy.c
··· 30 30 #include <linux/module.h> 31 31 32 32 #include <linux/string.h> 33 - #include <asm/system.h> 34 33 35 34 #ifdef __HAVE_ARCH_MEMCPY 36 35 #ifndef CONFIG_OPT_LIB_FUNCTION
-1
arch/microblaze/mm/fault.c
··· 33 33 #include <asm/pgtable.h> 34 34 #include <asm/mmu.h> 35 35 #include <asm/mmu_context.h> 36 - #include <asm/system.h> 37 36 #include <linux/uaccess.h> 38 37 #include <asm/exceptions.h> 39 38