diff options
Diffstat (limited to 'arch/frv/include')
-rw-r--r-- | arch/frv/include/asm/atomic.h | 2 | ||||
-rw-r--r-- | arch/frv/include/asm/dma-mapping.h | 41 | ||||
-rw-r--r-- | arch/frv/include/asm/gdb-stub.h | 7 | ||||
-rw-r--r-- | arch/frv/include/asm/mem-layout.h | 4 | ||||
-rw-r--r-- | arch/frv/include/asm/pci.h | 45 | ||||
-rw-r--r-- | arch/frv/include/asm/pgtable.h | 2 | ||||
-rw-r--r-- | arch/frv/include/asm/ptrace.h | 2 | ||||
-rw-r--r-- | arch/frv/include/asm/scatterlist.h | 40 | ||||
-rw-r--r-- | arch/frv/include/asm/segment.h | 6 | ||||
-rw-r--r-- | arch/frv/include/asm/thread_info.h | 2 | ||||
-rw-r--r-- | arch/frv/include/asm/uaccess.h | 2 | ||||
-rw-r--r-- | arch/frv/include/asm/unistd.h | 1 |
12 files changed, 22 insertions, 132 deletions
diff --git a/arch/frv/include/asm/atomic.h b/arch/frv/include/asm/atomic.h index 00a57af79afc..fae32c7fdcb6 100644 --- a/arch/frv/include/asm/atomic.h +++ b/arch/frv/include/asm/atomic.h | |||
@@ -36,7 +36,7 @@ | |||
36 | #define smp_mb__after_atomic_inc() barrier() | 36 | #define smp_mb__after_atomic_inc() barrier() |
37 | 37 | ||
38 | #define ATOMIC_INIT(i) { (i) } | 38 | #define ATOMIC_INIT(i) { (i) } |
39 | #define atomic_read(v) ((v)->counter) | 39 | #define atomic_read(v) (*(volatile int *)&(v)->counter) |
40 | #define atomic_set(v, i) (((v)->counter) = (i)) | 40 | #define atomic_set(v, i) (((v)->counter) = (i)) |
41 | 41 | ||
42 | #ifndef CONFIG_FRV_OUTOFLINE_ATOMIC_OPS | 42 | #ifndef CONFIG_FRV_OUTOFLINE_ATOMIC_OPS |
diff --git a/arch/frv/include/asm/dma-mapping.h b/arch/frv/include/asm/dma-mapping.h index b2898877c07b..6af5d83e2fb2 100644 --- a/arch/frv/include/asm/dma-mapping.h +++ b/arch/frv/include/asm/dma-mapping.h | |||
@@ -7,6 +7,11 @@ | |||
7 | #include <asm/scatterlist.h> | 7 | #include <asm/scatterlist.h> |
8 | #include <asm/io.h> | 8 | #include <asm/io.h> |
9 | 9 | ||
10 | /* | ||
11 | * See Documentation/DMA-API.txt for the description of how the | ||
12 | * following DMA API should work. | ||
13 | */ | ||
14 | |||
10 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) | 15 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) |
11 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) | 16 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) |
12 | 17 | ||
@@ -16,24 +21,9 @@ extern unsigned long __nongprelbss dma_coherent_mem_end; | |||
16 | void *dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t gfp); | 21 | void *dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t gfp); |
17 | void dma_free_coherent(struct device *dev, size_t size, void *vaddr, dma_addr_t dma_handle); | 22 | void dma_free_coherent(struct device *dev, size_t size, void *vaddr, dma_addr_t dma_handle); |
18 | 23 | ||
19 | /* | ||
20 | * Map a single buffer of the indicated size for DMA in streaming mode. | ||
21 | * The 32-bit bus address to use is returned. | ||
22 | * | ||
23 | * Once the device is given the dma address, the device owns this memory | ||
24 | * until either pci_unmap_single or pci_dma_sync_single is performed. | ||
25 | */ | ||
26 | extern dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, | 24 | extern dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, |
27 | enum dma_data_direction direction); | 25 | enum dma_data_direction direction); |
28 | 26 | ||
29 | /* | ||
30 | * Unmap a single streaming mode DMA translation. The dma_addr and size | ||
31 | * must match what was provided for in a previous pci_map_single call. All | ||
32 | * other usages are undefined. | ||
33 | * | ||
34 | * After this call, reads by the cpu to the buffer are guarenteed to see | ||
35 | * whatever the device wrote there. | ||
36 | */ | ||
37 | static inline | 27 | static inline |
38 | void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, | 28 | void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, |
39 | enum dma_data_direction direction) | 29 | enum dma_data_direction direction) |
@@ -41,30 +31,9 @@ void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, | |||
41 | BUG_ON(direction == DMA_NONE); | 31 | BUG_ON(direction == DMA_NONE); |
42 | } | 32 | } |
43 | 33 | ||
44 | /* | ||
45 | * Map a set of buffers described by scatterlist in streaming | ||
46 | * mode for DMA. This is the scather-gather version of the | ||
47 | * above pci_map_single interface. Here the scatter gather list | ||
48 | * elements are each tagged with the appropriate dma address | ||
49 | * and length. They are obtained via sg_dma_{address,length}(SG). | ||
50 | * | ||
51 | * NOTE: An implementation may be able to use a smaller number of | ||
52 | * DMA address/length pairs than there are SG table elements. | ||
53 | * (for example via virtual mapping capabilities) | ||
54 | * The routine returns the number of addr/length pairs actually | ||
55 | * used, at most nents. | ||
56 | * | ||
57 | * Device ownership issues as mentioned above for pci_map_single are | ||
58 | * the same here. | ||
59 | */ | ||
60 | extern int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | 34 | extern int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, |
61 | enum dma_data_direction direction); | 35 | enum dma_data_direction direction); |
62 | 36 | ||
63 | /* | ||
64 | * Unmap a set of streaming mode DMA translations. | ||
65 | * Again, cpu read rules concerning calls here are the same as for | ||
66 | * pci_unmap_single() above. | ||
67 | */ | ||
68 | static inline | 37 | static inline |
69 | void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries, | 38 | void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries, |
70 | enum dma_data_direction direction) | 39 | enum dma_data_direction direction) |
diff --git a/arch/frv/include/asm/gdb-stub.h b/arch/frv/include/asm/gdb-stub.h index 2da716407ff2..e6bedd0cd9a5 100644 --- a/arch/frv/include/asm/gdb-stub.h +++ b/arch/frv/include/asm/gdb-stub.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #ifndef __ASM_GDB_STUB_H | 12 | #ifndef __ASM_GDB_STUB_H |
13 | #define __ASM_GDB_STUB_H | 13 | #define __ASM_GDB_STUB_H |
14 | 14 | ||
15 | #undef GDBSTUB_DEBUG_IO | ||
15 | #undef GDBSTUB_DEBUG_PROTOCOL | 16 | #undef GDBSTUB_DEBUG_PROTOCOL |
16 | 17 | ||
17 | #include <asm/ptrace.h> | 18 | #include <asm/ptrace.h> |
@@ -108,6 +109,12 @@ extern void gdbstub_printk(const char *fmt, ...); | |||
108 | extern void debug_to_serial(const char *p, int n); | 109 | extern void debug_to_serial(const char *p, int n); |
109 | extern void console_set_baud(unsigned baud); | 110 | extern void console_set_baud(unsigned baud); |
110 | 111 | ||
112 | #ifdef GDBSTUB_DEBUG_IO | ||
113 | #define gdbstub_io(FMT,...) gdbstub_printk(FMT, ##__VA_ARGS__) | ||
114 | #else | ||
115 | #define gdbstub_io(FMT,...) ({ 0; }) | ||
116 | #endif | ||
117 | |||
111 | #ifdef GDBSTUB_DEBUG_PROTOCOL | 118 | #ifdef GDBSTUB_DEBUG_PROTOCOL |
112 | #define gdbstub_proto(FMT,...) gdbstub_printk(FMT,##__VA_ARGS__) | 119 | #define gdbstub_proto(FMT,...) gdbstub_printk(FMT,##__VA_ARGS__) |
113 | #else | 120 | #else |
diff --git a/arch/frv/include/asm/mem-layout.h b/arch/frv/include/asm/mem-layout.h index 2947764fc0e0..ccae981876fa 100644 --- a/arch/frv/include/asm/mem-layout.h +++ b/arch/frv/include/asm/mem-layout.h | |||
@@ -35,8 +35,8 @@ | |||
35 | * the slab must be aligned such that load- and store-double instructions don't | 35 | * the slab must be aligned such that load- and store-double instructions don't |
36 | * fault if used | 36 | * fault if used |
37 | */ | 37 | */ |
38 | #define ARCH_KMALLOC_MINALIGN 8 | 38 | #define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES |
39 | #define ARCH_SLAB_MINALIGN 8 | 39 | #define ARCH_SLAB_MINALIGN L1_CACHE_BYTES |
40 | 40 | ||
41 | /*****************************************************************************/ | 41 | /*****************************************************************************/ |
42 | /* | 42 | /* |
diff --git a/arch/frv/include/asm/pci.h b/arch/frv/include/asm/pci.h index 492b5c4dfed6..0d5997909850 100644 --- a/arch/frv/include/asm/pci.h +++ b/arch/frv/include/asm/pci.h | |||
@@ -43,14 +43,6 @@ extern void pci_free_consistent(struct pci_dev *hwdev, size_t size, | |||
43 | /* Return the index of the PCI controller for device PDEV. */ | 43 | /* Return the index of the PCI controller for device PDEV. */ |
44 | #define pci_controller_num(PDEV) (0) | 44 | #define pci_controller_num(PDEV) (0) |
45 | 45 | ||
46 | /* pci_unmap_{page,single} is a nop so... */ | ||
47 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) | ||
48 | #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) | ||
49 | #define pci_unmap_addr(PTR, ADDR_NAME) (0) | ||
50 | #define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0) | ||
51 | #define pci_unmap_len(PTR, LEN_NAME) (0) | ||
52 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) | ||
53 | |||
54 | #ifdef CONFIG_PCI | 46 | #ifdef CONFIG_PCI |
55 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, | 47 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, |
56 | enum pci_dma_burst_strategy *strat, | 48 | enum pci_dma_burst_strategy *strat, |
@@ -68,41 +60,4 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev, | |||
68 | #define PCIBIOS_MIN_IO 0x100 | 60 | #define PCIBIOS_MIN_IO 0x100 |
69 | #define PCIBIOS_MIN_MEM 0x00010000 | 61 | #define PCIBIOS_MIN_MEM 0x00010000 |
70 | 62 | ||
71 | /* Make physical memory consistent for a single | ||
72 | * streaming mode DMA translation after a transfer. | ||
73 | * | ||
74 | * If you perform a pci_map_single() but wish to interrogate the | ||
75 | * buffer using the cpu, yet do not wish to teardown the PCI dma | ||
76 | * mapping, you must call this function before doing so. At the | ||
77 | * next point you give the PCI dma address back to the card, the | ||
78 | * device again owns the buffer. | ||
79 | */ | ||
80 | static inline void pci_dma_sync_single(struct pci_dev *hwdev, | ||
81 | dma_addr_t dma_handle, | ||
82 | size_t size, int direction) | ||
83 | { | ||
84 | BUG_ON(direction == PCI_DMA_NONE); | ||
85 | |||
86 | frv_cache_wback_inv((unsigned long)bus_to_virt(dma_handle), | ||
87 | (unsigned long)bus_to_virt(dma_handle) + size); | ||
88 | } | ||
89 | |||
90 | /* Make physical memory consistent for a set of streaming | ||
91 | * mode DMA translations after a transfer. | ||
92 | * | ||
93 | * The same as pci_dma_sync_single but for a scatter-gather list, | ||
94 | * same rules and usage. | ||
95 | */ | ||
96 | static inline void pci_dma_sync_sg(struct pci_dev *hwdev, | ||
97 | struct scatterlist *sg, | ||
98 | int nelems, int direction) | ||
99 | { | ||
100 | int i; | ||
101 | BUG_ON(direction == PCI_DMA_NONE); | ||
102 | |||
103 | for (i = 0; i < nelems; i++) | ||
104 | frv_cache_wback_inv(sg_dma_address(&sg[i]), | ||
105 | sg_dma_address(&sg[i])+sg_dma_len(&sg[i])); | ||
106 | } | ||
107 | |||
108 | #endif /* _ASM_FRV_PCI_H */ | 63 | #endif /* _ASM_FRV_PCI_H */ |
diff --git a/arch/frv/include/asm/pgtable.h b/arch/frv/include/asm/pgtable.h index 22c60692b551..c18b0d32e636 100644 --- a/arch/frv/include/asm/pgtable.h +++ b/arch/frv/include/asm/pgtable.h | |||
@@ -505,7 +505,7 @@ static inline int pte_file(pte_t pte) | |||
505 | /* | 505 | /* |
506 | * preload information about a newly instantiated PTE into the SCR0/SCR1 PGE cache | 506 | * preload information about a newly instantiated PTE into the SCR0/SCR1 PGE cache |
507 | */ | 507 | */ |
508 | static inline void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t pte) | 508 | static inline void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t *ptep) |
509 | { | 509 | { |
510 | struct mm_struct *mm; | 510 | struct mm_struct *mm; |
511 | unsigned long ampr; | 511 | unsigned long ampr; |
diff --git a/arch/frv/include/asm/ptrace.h b/arch/frv/include/asm/ptrace.h index a54b535c9e49..6bfad4cf1907 100644 --- a/arch/frv/include/asm/ptrace.h +++ b/arch/frv/include/asm/ptrace.h | |||
@@ -84,8 +84,6 @@ extern void show_regs(struct pt_regs *); | |||
84 | #define task_pt_regs(task) ((task)->thread.frame0) | 84 | #define task_pt_regs(task) ((task)->thread.frame0) |
85 | 85 | ||
86 | #define arch_has_single_step() (1) | 86 | #define arch_has_single_step() (1) |
87 | extern void user_enable_single_step(struct task_struct *); | ||
88 | extern void user_disable_single_step(struct task_struct *); | ||
89 | 87 | ||
90 | #endif /* !__ASSEMBLY__ */ | 88 | #endif /* !__ASSEMBLY__ */ |
91 | #endif /* __KERNEL__ */ | 89 | #endif /* __KERNEL__ */ |
diff --git a/arch/frv/include/asm/scatterlist.h b/arch/frv/include/asm/scatterlist.h index 4bca8a28546c..1614bfd7e3a4 100644 --- a/arch/frv/include/asm/scatterlist.h +++ b/arch/frv/include/asm/scatterlist.h | |||
@@ -1,45 +1,7 @@ | |||
1 | #ifndef _ASM_SCATTERLIST_H | 1 | #ifndef _ASM_SCATTERLIST_H |
2 | #define _ASM_SCATTERLIST_H | 2 | #define _ASM_SCATTERLIST_H |
3 | 3 | ||
4 | #include <asm/types.h> | 4 | #include <asm-generic/scatterlist.h> |
5 | |||
6 | /* | ||
7 | * Drivers must set either ->address or (preferred) page and ->offset | ||
8 | * to indicate where data must be transferred to/from. | ||
9 | * | ||
10 | * Using page is recommended since it handles highmem data as well as | ||
11 | * low mem. ->address is restricted to data which has a virtual mapping, and | ||
12 | * it will go away in the future. Updating to page can be automated very | ||
13 | * easily -- something like | ||
14 | * | ||
15 | * sg->address = some_ptr; | ||
16 | * | ||
17 | * can be rewritten as | ||
18 | * | ||
19 | * sg_set_buf(sg, some_ptr, length); | ||
20 | * | ||
21 | * and that's it. There's no excuse for not highmem enabling YOUR driver. /jens | ||
22 | */ | ||
23 | struct scatterlist { | ||
24 | #ifdef CONFIG_DEBUG_SG | ||
25 | unsigned long sg_magic; | ||
26 | #endif | ||
27 | unsigned long page_link; | ||
28 | unsigned int offset; /* for highmem, page offset */ | ||
29 | |||
30 | dma_addr_t dma_address; | ||
31 | unsigned int length; | ||
32 | }; | ||
33 | |||
34 | /* | ||
35 | * These macros should be used after a pci_map_sg call has been done | ||
36 | * to get bus addresses of each of the SG entries and their lengths. | ||
37 | * You should only work with the number of sg entries pci_map_sg | ||
38 | * returns, or alternatively stop on the first sg_dma_len(sg) which | ||
39 | * is 0. | ||
40 | */ | ||
41 | #define sg_dma_address(sg) ((sg)->dma_address) | ||
42 | #define sg_dma_len(sg) ((sg)->length) | ||
43 | 5 | ||
44 | #define ISA_DMA_THRESHOLD (0xffffffffUL) | 6 | #define ISA_DMA_THRESHOLD (0xffffffffUL) |
45 | 7 | ||
diff --git a/arch/frv/include/asm/segment.h b/arch/frv/include/asm/segment.h index e3616a6f941d..a2320a4a0042 100644 --- a/arch/frv/include/asm/segment.h +++ b/arch/frv/include/asm/segment.h | |||
@@ -21,12 +21,12 @@ typedef struct { | |||
21 | 21 | ||
22 | #define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) | 22 | #define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) |
23 | 23 | ||
24 | #define KERNEL_DS MAKE_MM_SEG(0xdfffffffUL) | ||
25 | |||
26 | #ifdef CONFIG_MMU | 24 | #ifdef CONFIG_MMU |
27 | #define USER_DS MAKE_MM_SEG(TASK_SIZE - 1) | 25 | #define USER_DS MAKE_MM_SEG(TASK_SIZE - 1) |
26 | #define KERNEL_DS MAKE_MM_SEG(0xdfffffffUL) | ||
28 | #else | 27 | #else |
29 | #define USER_DS KERNEL_DS | 28 | #define USER_DS MAKE_MM_SEG(memory_end) |
29 | #define KERNEL_DS MAKE_MM_SEG(0xe0000000UL) | ||
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | #define get_ds() (KERNEL_DS) | 32 | #define get_ds() (KERNEL_DS) |
diff --git a/arch/frv/include/asm/thread_info.h b/arch/frv/include/asm/thread_info.h index e608e056bb53..11f33ead29bf 100644 --- a/arch/frv/include/asm/thread_info.h +++ b/arch/frv/include/asm/thread_info.h | |||
@@ -113,7 +113,7 @@ register struct thread_info *__current_thread_info asm("gr15"); | |||
113 | #define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */ | 113 | #define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */ |
114 | #define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */ | 114 | #define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */ |
115 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 115 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
116 | #define TIF_MEMDIE 17 /* OOM killer killed process */ | 116 | #define TIF_MEMDIE 17 /* is terminating due to OOM killer */ |
117 | #define TIF_FREEZE 18 /* freezing for suspend */ | 117 | #define TIF_FREEZE 18 /* freezing for suspend */ |
118 | 118 | ||
119 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 119 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
diff --git a/arch/frv/include/asm/uaccess.h b/arch/frv/include/asm/uaccess.h index 53650c958f41..0b67ec5b4414 100644 --- a/arch/frv/include/asm/uaccess.h +++ b/arch/frv/include/asm/uaccess.h | |||
@@ -27,8 +27,6 @@ | |||
27 | #define VERIFY_READ 0 | 27 | #define VERIFY_READ 0 |
28 | #define VERIFY_WRITE 1 | 28 | #define VERIFY_WRITE 1 |
29 | 29 | ||
30 | #define __addr_ok(addr) ((unsigned long)(addr) < get_addr_limit()) | ||
31 | |||
32 | /* | 30 | /* |
33 | * check that a range of addresses falls within the current address limit | 31 | * check that a range of addresses falls within the current address limit |
34 | */ | 32 | */ |
diff --git a/arch/frv/include/asm/unistd.h b/arch/frv/include/asm/unistd.h index be6ef0f5cd42..b28da499e22a 100644 --- a/arch/frv/include/asm/unistd.h +++ b/arch/frv/include/asm/unistd.h | |||
@@ -354,6 +354,7 @@ | |||
354 | #define __ARCH_WANT_STAT64 | 354 | #define __ARCH_WANT_STAT64 |
355 | #define __ARCH_WANT_SYS_ALARM | 355 | #define __ARCH_WANT_SYS_ALARM |
356 | /* #define __ARCH_WANT_SYS_GETHOSTNAME */ | 356 | /* #define __ARCH_WANT_SYS_GETHOSTNAME */ |
357 | #define __ARCH_WANT_SYS_IPC | ||
357 | #define __ARCH_WANT_SYS_PAUSE | 358 | #define __ARCH_WANT_SYS_PAUSE |
358 | /* #define __ARCH_WANT_SYS_SGETMASK */ | 359 | /* #define __ARCH_WANT_SYS_SGETMASK */ |
359 | /* #define __ARCH_WANT_SYS_SIGNAL */ | 360 | /* #define __ARCH_WANT_SYS_SIGNAL */ |