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

Disintegrate asm/system.h for CRIS

Disintegrate asm/system.h for CRIS.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
cc: linux-cris-kernel@axis.com

+127 -119
-1
arch/cris/arch-v10/drivers/ds1302.c
··· 24 24 #include <linux/capability.h> 25 25 26 26 #include <asm/uaccess.h> 27 - #include <asm/system.h> 28 27 #include <arch/svinto.h> 29 28 #include <asm/io.h> 30 29 #include <asm/rtc.h>
-1
arch/cris/arch-v10/drivers/gpio.c
··· 24 24 #include <asm/etraxgpio.h> 25 25 #include <arch/svinto.h> 26 26 #include <asm/io.h> 27 - #include <asm/system.h> 28 27 #include <asm/irq.h> 29 28 #include <arch/io_interface_mux.h> 30 29
-1
arch/cris/arch-v10/drivers/i2c.c
··· 22 22 23 23 #include <asm/etraxi2c.h> 24 24 25 - #include <asm/system.h> 26 25 #include <arch/svinto.h> 27 26 #include <asm/io.h> 28 27 #include <asm/delay.h>
-1
arch/cris/arch-v10/drivers/pcf8563.c
··· 29 29 #include <linux/mutex.h> 30 30 31 31 #include <asm/uaccess.h> 32 - #include <asm/system.h> 33 32 #include <asm/io.h> 34 33 #include <asm/rtc.h> 35 34
-1
arch/cris/arch-v10/drivers/sync_serial.c
··· 27 27 #include <asm/io.h> 28 28 #include <arch/svinto.h> 29 29 #include <asm/uaccess.h> 30 - #include <asm/system.h> 31 30 #include <asm/sync_serial.h> 32 31 #include <arch/io_interface_mux.h> 33 32
-1
arch/cris/arch-v10/kernel/debugport.c
··· 18 18 #include <linux/major.h> 19 19 #include <linux/delay.h> 20 20 #include <linux/tty.h> 21 - #include <asm/system.h> 22 21 #include <arch/svinto.h> 23 22 #include <asm/io.h> /* Get SIMCOUT. */ 24 23
+1
arch/cris/arch-v10/kernel/dma.c
··· 8 8 9 9 #include <asm/dma.h> 10 10 #include <arch/svinto.h> 11 + #include <arch/system.h> 11 12 12 13 /* Macro to access ETRAX 100 registers */ 13 14 #define SETS(var, reg, field, val) var = (var & ~IO_MASK_(reg##_, field##_)) | \
+1
arch/cris/arch-v10/kernel/io_interface_mux.c
··· 14 14 #include <arch/svinto.h> 15 15 #include <asm/io.h> 16 16 #include <arch/io_interface_mux.h> 17 + #include <arch/system.h> 17 18 18 19 19 20 #define DBG(s)
+1
arch/cris/arch-v10/kernel/process.c
··· 16 16 #include <linux/fs.h> 17 17 #include <arch/svinto.h> 18 18 #include <linux/init.h> 19 + #include <arch/system.h> 19 20 20 21 #ifdef CONFIG_ETRAX_GPIO 21 22 void etrax_gpio_wake_up_check(void); /* drivers/gpio.c */
-1
arch/cris/arch-v10/kernel/ptrace.c
··· 15 15 #include <asm/uaccess.h> 16 16 #include <asm/page.h> 17 17 #include <asm/pgtable.h> 18 - #include <asm/system.h> 19 18 #include <asm/processor.h> 20 19 21 20 /*
+1
arch/cris/arch-v10/kernel/setup.c
··· 14 14 #include <linux/proc_fs.h> 15 15 #include <linux/delay.h> 16 16 #include <linux/param.h> 17 + #include <arch/system.h> 17 18 18 19 #ifdef CONFIG_PROC_FS 19 20 #define HAS_FPU 0x0001
+1
arch/cris/arch-v10/kernel/signal.c
··· 27 27 #include <asm/processor.h> 28 28 #include <asm/ucontext.h> 29 29 #include <asm/uaccess.h> 30 + #include <arch/system.h> 30 31 31 32 #define DEBUG_SIG 0 32 33
+1
arch/cris/arch-v10/kernel/traps.c
··· 11 11 #include <linux/ptrace.h> 12 12 #include <asm/uaccess.h> 13 13 #include <arch/sv_addr_ag.h> 14 + #include <arch/system.h> 14 15 15 16 void 16 17 show_registers(struct pt_regs *regs)
-1
arch/cris/arch-v32/drivers/i2c.c
··· 36 36 37 37 #include <asm/etraxi2c.h> 38 38 39 - #include <asm/system.h> 40 39 #include <asm/io.h> 41 40 #include <asm/delay.h> 42 41
-1
arch/cris/arch-v32/drivers/mach-a3/gpio.c
··· 31 31 #include <hwregs/gio_defs.h> 32 32 #include <hwregs/intr_vect_defs.h> 33 33 #include <asm/io.h> 34 - #include <asm/system.h> 35 34 #include <asm/irq.h> 36 35 #include <mach/pinmux.h> 37 36
-1
arch/cris/arch-v32/drivers/mach-fs/gpio.c
··· 30 30 #include <hwregs/gio_defs.h> 31 31 #include <hwregs/intr_vect_defs.h> 32 32 #include <asm/io.h> 33 - #include <asm/system.h> 34 33 #include <asm/irq.h> 35 34 36 35 #ifdef CONFIG_ETRAX_VIRTUAL_GPIO
-1
arch/cris/arch-v32/kernel/debugport.c
··· 4 4 5 5 #include <linux/console.h> 6 6 #include <linux/init.h> 7 - #include <asm/system.h> 8 7 #include <hwregs/reg_rdwr.h> 9 8 #include <hwregs/reg_map.h> 10 9 #include <hwregs/ser_defs.h>
-1
arch/cris/arch-v32/kernel/fasttimer.c
··· 17 17 #include <linux/delay.h> 18 18 19 19 #include <asm/irq.h> 20 - #include <asm/system.h> 21 20 22 21 #include <hwregs/reg_map.h> 23 22 #include <hwregs/reg_rdwr.h>
-1
arch/cris/arch-v32/kernel/ptrace.c
··· 15 15 #include <asm/uaccess.h> 16 16 #include <asm/page.h> 17 17 #include <asm/pgtable.h> 18 - #include <asm/system.h> 19 18 #include <asm/processor.h> 20 19 #include <arch/hwregs/supp_reg.h> 21 20
-1
arch/cris/arch-v32/mach-a3/dma.c
··· 9 9 #include <hwregs/clkgen_defs.h> 10 10 #include <hwregs/strmux_defs.h> 11 11 #include <linux/errno.h> 12 - #include <asm/system.h> 13 12 #include <arbiter.h> 14 13 15 14 static char used_dma_channels[MAX_DMA_CHANNELS];
-1
arch/cris/arch-v32/mach-fs/dma.c
··· 9 9 #include <hwregs/config_defs.h> 10 10 #include <hwregs/strmux_defs.h> 11 11 #include <linux/errno.h> 12 - #include <asm/system.h> 13 12 #include <mach/arbiter.h> 14 13 15 14 static char used_dma_channels[MAX_DMA_CHANNELS];
+2
arch/cris/include/arch-v10/arch/elf.h
··· 1 1 #ifndef __ASMCRIS_ARCH_ELF_H 2 2 #define __ASMCRIS_ARCH_ELF_H 3 3 4 + #include <arch/system.h> 5 + 4 6 #define ELF_MACH EF_CRIS_VARIANT_ANY_V0_V10 5 7 6 8 /*
+2
arch/cris/include/arch-v32/arch/elf.h
··· 1 1 #ifndef _ASM_CRIS_ELF_H 2 2 #define _ASM_CRIS_ELF_H 3 3 4 + #include <arch/system.h> 5 + 4 6 #define ELF_CORE_EFLAGS EF_CRIS_VARIANT_V32 5 7 6 8 /*
-10
arch/cris/include/arch-v32/arch/system.h
··· 34 34 /* Write the user-mode stack pointer. */ 35 35 #define wrusp(usp) __asm__ __volatile__ ("move %0, $usp" : : "rm" (usp)) 36 36 37 - #define nop() __asm__ __volatile__ ("nop"); 38 - 39 - #define xchg(ptr,x) \ 40 - ((__typeof__(*(ptr)))__xchg((unsigned long) (x),(ptr),sizeof(*(ptr)))) 41 - 42 - #define tas(ptr) (xchg((ptr),1)) 43 - 44 - struct __xchg_dummy { unsigned long a[100]; }; 45 - #define __xg(x) ((struct __xchg_dummy *)(x)) 46 - 47 37 #endif /* _ASM_CRIS_ARCH_SYSTEM_H */
+1 -1
arch/cris/include/asm/atomic.h
··· 5 5 6 6 #include <linux/compiler.h> 7 7 #include <linux/types.h> 8 - #include <asm/system.h> 8 + #include <asm/cmpxchg.h> 9 9 #include <arch/atomic.h> 10 10 11 11 /*
+25
arch/cris/include/asm/barrier.h
··· 1 + #ifndef __ASM_CRIS_BARRIER_H 2 + #define __ASM_CRIS_BARRIER_H 3 + 4 + #define nop() __asm__ __volatile__ ("nop"); 5 + 6 + #define barrier() __asm__ __volatile__("": : :"memory") 7 + #define mb() barrier() 8 + #define rmb() mb() 9 + #define wmb() mb() 10 + #define read_barrier_depends() do { } while(0) 11 + #define set_mb(var, value) do { var = value; mb(); } while (0) 12 + 13 + #ifdef CONFIG_SMP 14 + #define smp_mb() mb() 15 + #define smp_rmb() rmb() 16 + #define smp_wmb() wmb() 17 + #define smp_read_barrier_depends() read_barrier_depends() 18 + #else 19 + #define smp_mb() barrier() 20 + #define smp_rmb() barrier() 21 + #define smp_wmb() barrier() 22 + #define smp_read_barrier_depends() do { } while(0) 23 + #endif 24 + 25 + #endif /* __ASM_CRIS_BARRIER_H */
-1
arch/cris/include/asm/bitops.h
··· 19 19 #endif 20 20 21 21 #include <arch/bitops.h> 22 - #include <asm/system.h> 23 22 #include <linux/atomic.h> 24 23 #include <linux/compiler.h> 25 24
+53
arch/cris/include/asm/cmpxchg.h
··· 1 + #ifndef __ASM_CRIS_CMPXCHG__ 2 + #define __ASM_CRIS_CMPXCHG__ 3 + 4 + #include <linux/irqflags.h> 5 + 6 + static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size) 7 + { 8 + /* since Etrax doesn't have any atomic xchg instructions, we need to disable 9 + irq's (if enabled) and do it with move.d's */ 10 + unsigned long flags,temp; 11 + local_irq_save(flags); /* save flags, including irq enable bit and shut off irqs */ 12 + switch (size) { 13 + case 1: 14 + *((unsigned char *)&temp) = x; 15 + x = *(unsigned char *)ptr; 16 + *(unsigned char *)ptr = *((unsigned char *)&temp); 17 + break; 18 + case 2: 19 + *((unsigned short *)&temp) = x; 20 + x = *(unsigned short *)ptr; 21 + *(unsigned short *)ptr = *((unsigned short *)&temp); 22 + break; 23 + case 4: 24 + temp = x; 25 + x = *(unsigned long *)ptr; 26 + *(unsigned long *)ptr = temp; 27 + break; 28 + } 29 + local_irq_restore(flags); /* restore irq enable bit */ 30 + return x; 31 + } 32 + 33 + #define xchg(ptr,x) \ 34 + ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) 35 + 36 + #define tas(ptr) (xchg((ptr),1)) 37 + 38 + #include <asm-generic/cmpxchg-local.h> 39 + 40 + /* 41 + * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make 42 + * them available. 43 + */ 44 + #define cmpxchg_local(ptr, o, n) \ 45 + ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\ 46 + (unsigned long)(n), sizeof(*(ptr)))) 47 + #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) 48 + 49 + #ifndef CONFIG_SMP 50 + #include <asm-generic/cmpxchg.h> 51 + #endif 52 + 53 + #endif /* __ASM_CRIS_CMPXCHG__ */
+6
arch/cris/include/asm/exec.h
··· 1 + #ifndef __ASM_CRIS_EXEC_H 2 + #define __ASM_CRIS_EXEC_H 3 + 4 + #define arch_align_stack(x) (x) 5 + 6 + #endif /* __ASM_CRIS_EXEC_H */
+10 -1
arch/cris/include/asm/processor.h
··· 10 10 #ifndef __ASM_CRIS_PROCESSOR_H 11 11 #define __ASM_CRIS_PROCESSOR_H 12 12 13 - #include <asm/system.h> 14 13 #include <asm/page.h> 15 14 #include <asm/ptrace.h> 16 15 #include <arch/processor.h> 16 + #include <arch/system.h> 17 17 18 18 struct task_struct; 19 19 ··· 71 71 #define init_stack (init_thread_union.stack) 72 72 73 73 #define cpu_relax() barrier() 74 + 75 + /* 76 + * disable hlt during certain critical i/o operations 77 + */ 78 + #define HAVE_DISABLE_HLT 79 + void disable_hlt(void); 80 + void enable_hlt(void); 81 + 82 + void default_idle(void); 74 83 75 84 #endif /* __ASM_CRIS_PROCESSOR_H */
+12
arch/cris/include/asm/switch_to.h
··· 1 + #ifndef __ASM_CRIS_SWITCH_TO_H 2 + #define __ASM_CRIS_SWITCH_TO_H 3 + 4 + /* the switch_to macro calls resume, an asm function in entry.S which does the actual 5 + * task switching. 6 + */ 7 + 8 + extern struct task_struct *resume(struct task_struct *prev, struct task_struct *next, int); 9 + #define switch_to(prev,next,last) last = resume(prev,next, \ 10 + (int)&((struct task_struct *)0)->thread) 11 + 12 + #endif /* __ASM_CRIS_SWITCH_TO_H */
+5 -89
arch/cris/include/asm/system.h
··· 1 - #ifndef __ASM_CRIS_SYSTEM_H 2 - #define __ASM_CRIS_SYSTEM_H 3 - 4 - #include <linux/irqflags.h> 5 - #include <arch/system.h> 6 - 7 - /* the switch_to macro calls resume, an asm function in entry.S which does the actual 8 - * task switching. 9 - */ 10 - 11 - extern struct task_struct *resume(struct task_struct *prev, struct task_struct *next, int); 12 - #define switch_to(prev,next,last) last = resume(prev,next, \ 13 - (int)&((struct task_struct *)0)->thread) 14 - 15 - #define barrier() __asm__ __volatile__("": : :"memory") 16 - #define mb() barrier() 17 - #define rmb() mb() 18 - #define wmb() mb() 19 - #define read_barrier_depends() do { } while(0) 20 - #define set_mb(var, value) do { var = value; mb(); } while (0) 21 - 22 - #ifdef CONFIG_SMP 23 - #define smp_mb() mb() 24 - #define smp_rmb() rmb() 25 - #define smp_wmb() wmb() 26 - #define smp_read_barrier_depends() read_barrier_depends() 27 - #else 28 - #define smp_mb() barrier() 29 - #define smp_rmb() barrier() 30 - #define smp_wmb() barrier() 31 - #define smp_read_barrier_depends() do { } while(0) 32 - #endif 33 - 34 - #define iret() 35 - 36 - /* 37 - * disable hlt during certain critical i/o operations 38 - */ 39 - #define HAVE_DISABLE_HLT 40 - void disable_hlt(void); 41 - void enable_hlt(void); 42 - 43 - static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size) 44 - { 45 - /* since Etrax doesn't have any atomic xchg instructions, we need to disable 46 - irq's (if enabled) and do it with move.d's */ 47 - unsigned long flags,temp; 48 - local_irq_save(flags); /* save flags, including irq enable bit and shut off irqs */ 49 - switch (size) { 50 - case 1: 51 - *((unsigned char *)&temp) = x; 52 - x = *(unsigned char *)ptr; 53 - *(unsigned char *)ptr = *((unsigned char *)&temp); 54 - break; 55 - case 2: 56 - *((unsigned short *)&temp) = x; 57 - x = *(unsigned short *)ptr; 58 - *(unsigned short *)ptr = *((unsigned short *)&temp); 59 - break; 60 - case 4: 61 - temp = x; 62 - x = *(unsigned long *)ptr; 63 - *(unsigned long *)ptr = temp; 64 - break; 65 - } 66 - local_irq_restore(flags); /* restore irq enable bit */ 67 - return x; 68 - } 69 - 70 - #include <asm-generic/cmpxchg-local.h> 71 - 72 - /* 73 - * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make 74 - * them available. 75 - */ 76 - #define cmpxchg_local(ptr, o, n) \ 77 - ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\ 78 - (unsigned long)(n), sizeof(*(ptr)))) 79 - #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) 80 - 81 - #ifndef CONFIG_SMP 82 - #include <asm-generic/cmpxchg.h> 83 - #endif 84 - 85 - #define arch_align_stack(x) (x) 86 - 87 - void default_idle(void); 88 - 89 - #endif 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/switch_to.h>
+1
arch/cris/kernel/irq.c
··· 36 36 #include <linux/spinlock.h> 37 37 38 38 #include <asm/io.h> 39 + #include <arch/system.h> 39 40 40 41 /* called by the assembler IRQ entry functions defined in irq.h 41 42 * to dispatch the interrupts to registered handlers
-1
arch/cris/kernel/process.c
··· 16 16 #include <asm/pgtable.h> 17 17 #include <asm/uaccess.h> 18 18 #include <asm/irq.h> 19 - #include <asm/system.h> 20 19 #include <linux/module.h> 21 20 #include <linux/spinlock.h> 22 21 #include <linux/init_task.h>
-1
arch/cris/kernel/ptrace.c
··· 21 21 #include <asm/uaccess.h> 22 22 #include <asm/page.h> 23 23 #include <asm/pgtable.h> 24 - #include <asm/system.h> 25 24 #include <asm/processor.h> 26 25 27 26
+1
arch/cris/kernel/setup.c
··· 20 20 #include <linux/pfn.h> 21 21 #include <linux/cpu.h> 22 22 #include <asm/setup.h> 23 + #include <arch/system.h> 23 24 24 25 /* 25 26 * Setup options
+1
arch/cris/kernel/traps.c
··· 17 17 18 18 #include <asm/pgtable.h> 19 19 #include <asm/uaccess.h> 20 + #include <arch/system.h> 20 21 21 22 extern void arch_enable_nmi(void); 22 23 extern void stop_watchdog(void);
+1
arch/cris/mm/fault.c
··· 9 9 #include <linux/module.h> 10 10 #include <linux/wait.h> 11 11 #include <asm/uaccess.h> 12 + #include <arch/system.h> 12 13 13 14 extern int find_fixup_code(struct pt_regs *); 14 15 extern void die_if_kernel(const char *, struct pt_regs *, long);
+1
drivers/tty/serial/crisv10.c
··· 37 37 #include <asm/system.h> 38 38 39 39 #include <arch/svinto.h> 40 + #include <arch/system.h> 40 41 41 42 /* non-arch dependent serial structures are in linux/serial.h */ 42 43 #include <linux/serial.h>