diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /arch/frv | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'arch/frv')
26 files changed, 39 insertions, 443 deletions
diff --git a/arch/frv/include/asm/asm-offsets.h b/arch/frv/include/asm/asm-offsets.h new file mode 100644 index 000000000000..d370ee36a182 --- /dev/null +++ b/arch/frv/include/asm/asm-offsets.h | |||
@@ -0,0 +1 @@ | |||
#include <generated/asm-offsets.h> | |||
diff --git a/arch/frv/include/asm/cacheflush.h b/arch/frv/include/asm/cacheflush.h index 432a69e7f3d4..edbac54ae015 100644 --- a/arch/frv/include/asm/cacheflush.h +++ b/arch/frv/include/asm/cacheflush.h | |||
@@ -47,6 +47,7 @@ static inline void __flush_cache_all(void) | |||
47 | } | 47 | } |
48 | 48 | ||
49 | /* dcache/icache coherency... */ | 49 | /* dcache/icache coherency... */ |
50 | #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 1 | ||
50 | #ifdef CONFIG_MMU | 51 | #ifdef CONFIG_MMU |
51 | extern void flush_dcache_page(struct page *page); | 52 | extern void flush_dcache_page(struct page *page); |
52 | #else | 53 | #else |
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/elf.h b/arch/frv/include/asm/elf.h index 7bbf6e47f8c8..c3819804a74b 100644 --- a/arch/frv/include/asm/elf.h +++ b/arch/frv/include/asm/elf.h | |||
@@ -115,7 +115,6 @@ do { \ | |||
115 | __kernel_frame0_ptr->gr29 = 0; \ | 115 | __kernel_frame0_ptr->gr29 = 0; \ |
116 | } while(0) | 116 | } while(0) |
117 | 117 | ||
118 | #define USE_ELF_CORE_DUMP | ||
119 | #define CORE_DUMP_USE_REGSET | 118 | #define CORE_DUMP_USE_REGSET |
120 | #define ELF_FDPIC_CORE_EFLAGS EF_FRV_FDPIC | 119 | #define ELF_FDPIC_CORE_EFLAGS EF_FRV_FDPIC |
121 | #define ELF_EXEC_PAGESIZE 16384 | 120 | #define ELF_EXEC_PAGESIZE 16384 |
diff --git a/arch/frv/include/asm/page.h b/arch/frv/include/asm/page.h index 25c6a5002355..8c97068ac8fc 100644 --- a/arch/frv/include/asm/page.h +++ b/arch/frv/include/asm/page.h | |||
@@ -63,12 +63,10 @@ extern unsigned long max_pfn; | |||
63 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) | 63 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) |
64 | 64 | ||
65 | 65 | ||
66 | #ifdef CONFIG_MMU | ||
67 | #define VM_DATA_DEFAULT_FLAGS \ | 66 | #define VM_DATA_DEFAULT_FLAGS \ |
68 | (VM_READ | VM_WRITE | \ | 67 | (VM_READ | VM_WRITE | \ |
69 | ((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \ | 68 | ((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \ |
70 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | 69 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) |
71 | #endif | ||
72 | 70 | ||
73 | #endif /* __ASSEMBLY__ */ | 71 | #endif /* __ASSEMBLY__ */ |
74 | 72 | ||
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/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/socket.h b/arch/frv/include/asm/socket.h index 2dea726095c2..a6b26880c1ec 100644 --- a/arch/frv/include/asm/socket.h +++ b/arch/frv/include/asm/socket.h | |||
@@ -60,5 +60,7 @@ | |||
60 | #define SO_PROTOCOL 38 | 60 | #define SO_PROTOCOL 38 |
61 | #define SO_DOMAIN 39 | 61 | #define SO_DOMAIN 39 |
62 | 62 | ||
63 | #define SO_RXQ_OVFL 40 | ||
64 | |||
63 | #endif /* _ASM_SOCKET_H */ | 65 | #endif /* _ASM_SOCKET_H */ |
64 | 66 | ||
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 */ |
diff --git a/arch/frv/kernel/irq.c b/arch/frv/kernel/irq.c index af3e824b91b3..625136625a7f 100644 --- a/arch/frv/kernel/irq.c +++ b/arch/frv/kernel/irq.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/ioport.h> | 16 | #include <linux/ioport.h> |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/timex.h> | 18 | #include <linux/timex.h> |
19 | #include <linux/slab.h> | ||
20 | #include <linux/random.h> | 19 | #include <linux/random.h> |
21 | #include <linux/init.h> | 20 | #include <linux/init.h> |
22 | #include <linux/kernel_stat.h> | 21 | #include <linux/kernel_stat.h> |
@@ -69,7 +68,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
69 | } | 68 | } |
70 | 69 | ||
71 | if (i < NR_IRQS) { | 70 | if (i < NR_IRQS) { |
72 | spin_lock_irqsave(&irq_desc[i].lock, flags); | 71 | raw_spin_lock_irqsave(&irq_desc[i].lock, flags); |
73 | action = irq_desc[i].action; | 72 | action = irq_desc[i].action; |
74 | if (action) { | 73 | if (action) { |
75 | seq_printf(p, "%3d: ", i); | 74 | seq_printf(p, "%3d: ", i); |
@@ -85,7 +84,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
85 | seq_putc(p, '\n'); | 84 | seq_putc(p, '\n'); |
86 | } | 85 | } |
87 | 86 | ||
88 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); | 87 | raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags); |
89 | } else if (i == NR_IRQS) { | 88 | } else if (i == NR_IRQS) { |
90 | seq_printf(p, "Err: %10u\n", atomic_read(&irq_err_count)); | 89 | seq_printf(p, "Err: %10u\n", atomic_read(&irq_err_count)); |
91 | } | 90 | } |
diff --git a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c index 0d4d3e3a4cfc..5fa3889d858b 100644 --- a/arch/frv/kernel/pm.c +++ b/arch/frv/kernel/pm.c | |||
@@ -211,37 +211,6 @@ static int cmode_procctl(ctl_table *ctl, int write, | |||
211 | return try_set_cmode(new_cmode)?:*lenp; | 211 | return try_set_cmode(new_cmode)?:*lenp; |
212 | } | 212 | } |
213 | 213 | ||
214 | static int cmode_sysctl(ctl_table *table, | ||
215 | void __user *oldval, size_t __user *oldlenp, | ||
216 | void __user *newval, size_t newlen) | ||
217 | { | ||
218 | if (oldval && oldlenp) { | ||
219 | size_t oldlen; | ||
220 | |||
221 | if (get_user(oldlen, oldlenp)) | ||
222 | return -EFAULT; | ||
223 | |||
224 | if (oldlen != sizeof(int)) | ||
225 | return -EINVAL; | ||
226 | |||
227 | if (put_user(clock_cmode_current, (unsigned __user *)oldval) || | ||
228 | put_user(sizeof(int), oldlenp)) | ||
229 | return -EFAULT; | ||
230 | } | ||
231 | if (newval && newlen) { | ||
232 | int new_cmode; | ||
233 | |||
234 | if (newlen != sizeof(int)) | ||
235 | return -EINVAL; | ||
236 | |||
237 | if (get_user(new_cmode, (int __user *)newval)) | ||
238 | return -EFAULT; | ||
239 | |||
240 | return try_set_cmode(new_cmode)?:1; | ||
241 | } | ||
242 | return 1; | ||
243 | } | ||
244 | |||
245 | static int try_set_p0(int new_p0) | 214 | static int try_set_p0(int new_p0) |
246 | { | 215 | { |
247 | unsigned long flags, clkc; | 216 | unsigned long flags, clkc; |
@@ -314,37 +283,6 @@ static int p0_procctl(ctl_table *ctl, int write, | |||
314 | return try_set_p0(new_p0)?:*lenp; | 283 | return try_set_p0(new_p0)?:*lenp; |
315 | } | 284 | } |
316 | 285 | ||
317 | static int p0_sysctl(ctl_table *table, | ||
318 | void __user *oldval, size_t __user *oldlenp, | ||
319 | void __user *newval, size_t newlen) | ||
320 | { | ||
321 | if (oldval && oldlenp) { | ||
322 | size_t oldlen; | ||
323 | |||
324 | if (get_user(oldlen, oldlenp)) | ||
325 | return -EFAULT; | ||
326 | |||
327 | if (oldlen != sizeof(int)) | ||
328 | return -EINVAL; | ||
329 | |||
330 | if (put_user(clock_p0_current, (unsigned __user *)oldval) || | ||
331 | put_user(sizeof(int), oldlenp)) | ||
332 | return -EFAULT; | ||
333 | } | ||
334 | if (newval && newlen) { | ||
335 | int new_p0; | ||
336 | |||
337 | if (newlen != sizeof(int)) | ||
338 | return -EINVAL; | ||
339 | |||
340 | if (get_user(new_p0, (int __user *)newval)) | ||
341 | return -EFAULT; | ||
342 | |||
343 | return try_set_p0(new_p0)?:1; | ||
344 | } | ||
345 | return 1; | ||
346 | } | ||
347 | |||
348 | static int cm_procctl(ctl_table *ctl, int write, | 286 | static int cm_procctl(ctl_table *ctl, int write, |
349 | void __user *buffer, size_t *lenp, loff_t *fpos) | 287 | void __user *buffer, size_t *lenp, loff_t *fpos) |
350 | { | 288 | { |
@@ -358,87 +296,47 @@ static int cm_procctl(ctl_table *ctl, int write, | |||
358 | return try_set_cm(new_cm)?:*lenp; | 296 | return try_set_cm(new_cm)?:*lenp; |
359 | } | 297 | } |
360 | 298 | ||
361 | static int cm_sysctl(ctl_table *table, | ||
362 | void __user *oldval, size_t __user *oldlenp, | ||
363 | void __user *newval, size_t newlen) | ||
364 | { | ||
365 | if (oldval && oldlenp) { | ||
366 | size_t oldlen; | ||
367 | |||
368 | if (get_user(oldlen, oldlenp)) | ||
369 | return -EFAULT; | ||
370 | |||
371 | if (oldlen != sizeof(int)) | ||
372 | return -EINVAL; | ||
373 | |||
374 | if (put_user(clock_cm_current, (unsigned __user *)oldval) || | ||
375 | put_user(sizeof(int), oldlenp)) | ||
376 | return -EFAULT; | ||
377 | } | ||
378 | if (newval && newlen) { | ||
379 | int new_cm; | ||
380 | |||
381 | if (newlen != sizeof(int)) | ||
382 | return -EINVAL; | ||
383 | |||
384 | if (get_user(new_cm, (int __user *)newval)) | ||
385 | return -EFAULT; | ||
386 | |||
387 | return try_set_cm(new_cm)?:1; | ||
388 | } | ||
389 | return 1; | ||
390 | } | ||
391 | |||
392 | |||
393 | static struct ctl_table pm_table[] = | 299 | static struct ctl_table pm_table[] = |
394 | { | 300 | { |
395 | { | 301 | { |
396 | .ctl_name = CTL_PM_SUSPEND, | ||
397 | .procname = "suspend", | 302 | .procname = "suspend", |
398 | .data = NULL, | 303 | .data = NULL, |
399 | .maxlen = 0, | 304 | .maxlen = 0, |
400 | .mode = 0200, | 305 | .mode = 0200, |
401 | .proc_handler = &sysctl_pm_do_suspend, | 306 | .proc_handler = sysctl_pm_do_suspend, |
402 | }, | 307 | }, |
403 | { | 308 | { |
404 | .ctl_name = CTL_PM_CMODE, | ||
405 | .procname = "cmode", | 309 | .procname = "cmode", |
406 | .data = &clock_cmode_current, | 310 | .data = &clock_cmode_current, |
407 | .maxlen = sizeof(int), | 311 | .maxlen = sizeof(int), |
408 | .mode = 0644, | 312 | .mode = 0644, |
409 | .proc_handler = &cmode_procctl, | 313 | .proc_handler = cmode_procctl, |
410 | .strategy = &cmode_sysctl, | ||
411 | }, | 314 | }, |
412 | { | 315 | { |
413 | .ctl_name = CTL_PM_P0, | ||
414 | .procname = "p0", | 316 | .procname = "p0", |
415 | .data = &clock_p0_current, | 317 | .data = &clock_p0_current, |
416 | .maxlen = sizeof(int), | 318 | .maxlen = sizeof(int), |
417 | .mode = 0644, | 319 | .mode = 0644, |
418 | .proc_handler = &p0_procctl, | 320 | .proc_handler = p0_procctl, |
419 | .strategy = &p0_sysctl, | ||
420 | }, | 321 | }, |
421 | { | 322 | { |
422 | .ctl_name = CTL_PM_CM, | ||
423 | .procname = "cm", | 323 | .procname = "cm", |
424 | .data = &clock_cm_current, | 324 | .data = &clock_cm_current, |
425 | .maxlen = sizeof(int), | 325 | .maxlen = sizeof(int), |
426 | .mode = 0644, | 326 | .mode = 0644, |
427 | .proc_handler = &cm_procctl, | 327 | .proc_handler = cm_procctl, |
428 | .strategy = &cm_sysctl, | ||
429 | }, | 328 | }, |
430 | { .ctl_name = 0} | 329 | { } |
431 | }; | 330 | }; |
432 | 331 | ||
433 | static struct ctl_table pm_dir_table[] = | 332 | static struct ctl_table pm_dir_table[] = |
434 | { | 333 | { |
435 | { | 334 | { |
436 | .ctl_name = CTL_PM, | ||
437 | .procname = "pm", | 335 | .procname = "pm", |
438 | .mode = 0555, | 336 | .mode = 0555, |
439 | .child = pm_table, | 337 | .child = pm_table, |
440 | }, | 338 | }, |
441 | { .ctl_name = 0} | 339 | { } |
442 | }; | 340 | }; |
443 | 341 | ||
444 | /* | 342 | /* |
diff --git a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c index 904255938216..21d0fd19276d 100644 --- a/arch/frv/kernel/process.c +++ b/arch/frv/kernel/process.c | |||
@@ -255,15 +255,12 @@ asmlinkage int sys_execve(char __user *name, char __user * __user *argv, char __ | |||
255 | int error; | 255 | int error; |
256 | char * filename; | 256 | char * filename; |
257 | 257 | ||
258 | lock_kernel(); | ||
259 | filename = getname(name); | 258 | filename = getname(name); |
260 | error = PTR_ERR(filename); | 259 | error = PTR_ERR(filename); |
261 | if (IS_ERR(filename)) | 260 | if (IS_ERR(filename)) |
262 | goto out; | 261 | return error; |
263 | error = do_execve(filename, argv, envp, __frame); | 262 | error = do_execve(filename, argv, envp, __frame); |
264 | putname(filename); | 263 | putname(filename); |
265 | out: | ||
266 | unlock_kernel(); | ||
267 | return error; | 264 | return error; |
268 | } | 265 | } |
269 | 266 | ||
diff --git a/arch/frv/kernel/setup.c b/arch/frv/kernel/setup.c index 55e4fab7c0bc..75cf7f4b2fa8 100644 --- a/arch/frv/kernel/setup.c +++ b/arch/frv/kernel/setup.c | |||
@@ -10,7 +10,7 @@ | |||
10 | * 2 of the License, or (at your option) any later version. | 10 | * 2 of the License, or (at your option) any later version. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/utsrelease.h> | 13 | #include <generated/utsrelease.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
16 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
diff --git a/arch/frv/kernel/sys_frv.c b/arch/frv/kernel/sys_frv.c index 2b6b5289cdcc..9c4980825bbb 100644 --- a/arch/frv/kernel/sys_frv.c +++ b/arch/frv/kernel/sys_frv.c | |||
@@ -31,9 +31,6 @@ asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, | |||
31 | unsigned long prot, unsigned long flags, | 31 | unsigned long prot, unsigned long flags, |
32 | unsigned long fd, unsigned long pgoff) | 32 | unsigned long fd, unsigned long pgoff) |
33 | { | 33 | { |
34 | int error = -EBADF; | ||
35 | struct file * file = NULL; | ||
36 | |||
37 | /* As with sparc32, make sure the shift for mmap2 is constant | 34 | /* As with sparc32, make sure the shift for mmap2 is constant |
38 | (12), no matter what PAGE_SIZE we have.... */ | 35 | (12), no matter what PAGE_SIZE we have.... */ |
39 | 36 | ||
@@ -41,155 +38,7 @@ asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, | |||
41 | trying to map something we can't */ | 38 | trying to map something we can't */ |
42 | if (pgoff & ((1 << (PAGE_SHIFT - 12)) - 1)) | 39 | if (pgoff & ((1 << (PAGE_SHIFT - 12)) - 1)) |
43 | return -EINVAL; | 40 | return -EINVAL; |
44 | pgoff >>= PAGE_SHIFT - 12; | ||
45 | |||
46 | flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); | ||
47 | if (!(flags & MAP_ANONYMOUS)) { | ||
48 | file = fget(fd); | ||
49 | if (!file) | ||
50 | goto out; | ||
51 | } | ||
52 | |||
53 | down_write(¤t->mm->mmap_sem); | ||
54 | error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff); | ||
55 | up_write(¤t->mm->mmap_sem); | ||
56 | |||
57 | if (file) | ||
58 | fput(file); | ||
59 | out: | ||
60 | return error; | ||
61 | } | ||
62 | |||
63 | #if 0 /* DAVIDM - do we want this */ | ||
64 | struct mmap_arg_struct64 { | ||
65 | __u32 addr; | ||
66 | __u32 len; | ||
67 | __u32 prot; | ||
68 | __u32 flags; | ||
69 | __u64 offset; /* 64 bits */ | ||
70 | __u32 fd; | ||
71 | }; | ||
72 | |||
73 | asmlinkage long sys_mmap64(struct mmap_arg_struct64 *arg) | ||
74 | { | ||
75 | int error = -EFAULT; | ||
76 | struct file * file = NULL; | ||
77 | struct mmap_arg_struct64 a; | ||
78 | unsigned long pgoff; | ||
79 | |||
80 | if (copy_from_user(&a, arg, sizeof(a))) | ||
81 | return -EFAULT; | ||
82 | |||
83 | if ((long)a.offset & ~PAGE_MASK) | ||
84 | return -EINVAL; | ||
85 | |||
86 | pgoff = a.offset >> PAGE_SHIFT; | ||
87 | if ((a.offset >> PAGE_SHIFT) != pgoff) | ||
88 | return -EINVAL; | ||
89 | |||
90 | if (!(a.flags & MAP_ANONYMOUS)) { | ||
91 | error = -EBADF; | ||
92 | file = fget(a.fd); | ||
93 | if (!file) | ||
94 | goto out; | ||
95 | } | ||
96 | a.flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); | ||
97 | |||
98 | down_write(¤t->mm->mmap_sem); | ||
99 | error = do_mmap_pgoff(file, a.addr, a.len, a.prot, a.flags, pgoff); | ||
100 | up_write(¤t->mm->mmap_sem); | ||
101 | if (file) | ||
102 | fput(file); | ||
103 | out: | ||
104 | return error; | ||
105 | } | ||
106 | #endif | ||
107 | |||
108 | /* | ||
109 | * sys_ipc() is the de-multiplexer for the SysV IPC calls.. | ||
110 | * | ||
111 | * This is really horribly ugly. | ||
112 | */ | ||
113 | asmlinkage long sys_ipc(unsigned long call, | ||
114 | unsigned long first, | ||
115 | unsigned long second, | ||
116 | unsigned long third, | ||
117 | void __user *ptr, | ||
118 | unsigned long fifth) | ||
119 | { | ||
120 | int version, ret; | ||
121 | |||
122 | version = call >> 16; /* hack for backward compatibility */ | ||
123 | call &= 0xffff; | ||
124 | |||
125 | switch (call) { | ||
126 | case SEMOP: | ||
127 | return sys_semtimedop(first, (struct sembuf __user *)ptr, second, NULL); | ||
128 | case SEMTIMEDOP: | ||
129 | return sys_semtimedop(first, (struct sembuf __user *)ptr, second, | ||
130 | (const struct timespec __user *)fifth); | ||
131 | |||
132 | case SEMGET: | ||
133 | return sys_semget (first, second, third); | ||
134 | case SEMCTL: { | ||
135 | union semun fourth; | ||
136 | if (!ptr) | ||
137 | return -EINVAL; | ||
138 | if (get_user(fourth.__pad, (void * __user *) ptr)) | ||
139 | return -EFAULT; | ||
140 | return sys_semctl (first, second, third, fourth); | ||
141 | } | ||
142 | |||
143 | case MSGSND: | ||
144 | return sys_msgsnd (first, (struct msgbuf __user *) ptr, | ||
145 | second, third); | ||
146 | case MSGRCV: | ||
147 | switch (version) { | ||
148 | case 0: { | ||
149 | struct ipc_kludge tmp; | ||
150 | if (!ptr) | ||
151 | return -EINVAL; | ||
152 | |||
153 | if (copy_from_user(&tmp, | ||
154 | (struct ipc_kludge __user *) ptr, | ||
155 | sizeof (tmp))) | ||
156 | return -EFAULT; | ||
157 | return sys_msgrcv (first, tmp.msgp, second, | ||
158 | tmp.msgtyp, third); | ||
159 | } | ||
160 | default: | ||
161 | return sys_msgrcv (first, | ||
162 | (struct msgbuf __user *) ptr, | ||
163 | second, fifth, third); | ||
164 | } | ||
165 | case MSGGET: | ||
166 | return sys_msgget ((key_t) first, second); | ||
167 | case MSGCTL: | ||
168 | return sys_msgctl (first, second, (struct msqid_ds __user *) ptr); | ||
169 | 41 | ||
170 | case SHMAT: | 42 | return sys_mmap_pgoff(addr, len, prot, flags, fd, |
171 | switch (version) { | 43 | pgoff >> (PAGE_SHIFT - 12)); |
172 | default: { | ||
173 | ulong raddr; | ||
174 | ret = do_shmat (first, (char __user *) ptr, second, &raddr); | ||
175 | if (ret) | ||
176 | return ret; | ||
177 | return put_user (raddr, (ulong __user *) third); | ||
178 | } | ||
179 | case 1: /* iBCS2 emulator entry point */ | ||
180 | if (!segment_eq(get_fs(), get_ds())) | ||
181 | return -EINVAL; | ||
182 | /* The "(ulong *) third" is valid _only_ because of the kernel segment thing */ | ||
183 | return do_shmat (first, (char __user *) ptr, second, (ulong *) third); | ||
184 | } | ||
185 | case SHMDT: | ||
186 | return sys_shmdt ((char __user *)ptr); | ||
187 | case SHMGET: | ||
188 | return sys_shmget (first, second, third); | ||
189 | case SHMCTL: | ||
190 | return sys_shmctl (first, second, | ||
191 | (struct shmid_ds __user *) ptr); | ||
192 | default: | ||
193 | return -ENOSYS; | ||
194 | } | ||
195 | } | 44 | } |
diff --git a/arch/frv/kernel/sysctl.c b/arch/frv/kernel/sysctl.c index 3e9d7e03fb95..71abd1510a59 100644 --- a/arch/frv/kernel/sysctl.c +++ b/arch/frv/kernel/sysctl.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * 2 of the License, or (at your option) any later version. | 9 | * 2 of the License, or (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/slab.h> | ||
13 | #include <linux/sysctl.h> | 12 | #include <linux/sysctl.h> |
14 | #include <linux/proc_fs.h> | 13 | #include <linux/proc_fs.h> |
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
@@ -176,21 +175,19 @@ static int procctl_frv_pin_cxnr(ctl_table *table, int write, struct file *filp, | |||
176 | static struct ctl_table frv_table[] = | 175 | static struct ctl_table frv_table[] = |
177 | { | 176 | { |
178 | { | 177 | { |
179 | .ctl_name = 1, | ||
180 | .procname = "cache-mode", | 178 | .procname = "cache-mode", |
181 | .data = NULL, | 179 | .data = NULL, |
182 | .maxlen = 0, | 180 | .maxlen = 0, |
183 | .mode = 0644, | 181 | .mode = 0644, |
184 | .proc_handler = &procctl_frv_cachemode, | 182 | .proc_handler = procctl_frv_cachemode, |
185 | }, | 183 | }, |
186 | #ifdef CONFIG_MMU | 184 | #ifdef CONFIG_MMU |
187 | { | 185 | { |
188 | .ctl_name = 2, | ||
189 | .procname = "pin-cxnr", | 186 | .procname = "pin-cxnr", |
190 | .data = NULL, | 187 | .data = NULL, |
191 | .maxlen = 0, | 188 | .maxlen = 0, |
192 | .mode = 0644, | 189 | .mode = 0644, |
193 | .proc_handler = &procctl_frv_pin_cxnr | 190 | .proc_handler = procctl_frv_pin_cxnr |
194 | }, | 191 | }, |
195 | #endif | 192 | #endif |
196 | {} | 193 | {} |
@@ -203,7 +200,6 @@ static struct ctl_table frv_table[] = | |||
203 | static struct ctl_table frv_dir_table[] = | 200 | static struct ctl_table frv_dir_table[] = |
204 | { | 201 | { |
205 | { | 202 | { |
206 | .ctl_name = CTL_FRV, | ||
207 | .procname = "frv", | 203 | .procname = "frv", |
208 | .mode = 0555, | 204 | .mode = 0555, |
209 | .child = frv_table | 205 | .child = frv_table |
diff --git a/arch/frv/mb93090-mb00/pci-dma-nommu.c b/arch/frv/mb93090-mb00/pci-dma-nommu.c index 4e1ba0b15443..e47857f889b6 100644 --- a/arch/frv/mb93090-mb00/pci-dma-nommu.c +++ b/arch/frv/mb93090-mb00/pci-dma-nommu.c | |||
@@ -106,13 +106,6 @@ void dma_free_coherent(struct device *hwdev, size_t size, void *vaddr, dma_addr_ | |||
106 | 106 | ||
107 | EXPORT_SYMBOL(dma_free_coherent); | 107 | EXPORT_SYMBOL(dma_free_coherent); |
108 | 108 | ||
109 | /* | ||
110 | * Map a single buffer of the indicated size for DMA in streaming mode. | ||
111 | * The 32-bit bus address to use is returned. | ||
112 | * | ||
113 | * Once the device is given the dma address, the device owns this memory | ||
114 | * until either dma_unmap_single or pci_dma_sync_single is performed. | ||
115 | */ | ||
116 | dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, | 109 | dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, |
117 | enum dma_data_direction direction) | 110 | enum dma_data_direction direction) |
118 | { | 111 | { |
@@ -125,22 +118,6 @@ dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, | |||
125 | 118 | ||
126 | EXPORT_SYMBOL(dma_map_single); | 119 | EXPORT_SYMBOL(dma_map_single); |
127 | 120 | ||
128 | /* | ||
129 | * Map a set of buffers described by scatterlist in streaming | ||
130 | * mode for DMA. This is the scather-gather version of the | ||
131 | * above dma_map_single interface. Here the scatter gather list | ||
132 | * elements are each tagged with the appropriate dma address | ||
133 | * and length. They are obtained via sg_dma_{address,length}(SG). | ||
134 | * | ||
135 | * NOTE: An implementation may be able to use a smaller number of | ||
136 | * DMA address/length pairs than there are SG table elements. | ||
137 | * (for example via virtual mapping capabilities) | ||
138 | * The routine returns the number of addr/length pairs actually | ||
139 | * used, at most nents. | ||
140 | * | ||
141 | * Device ownership issues as mentioned above for dma_map_single are | ||
142 | * the same here. | ||
143 | */ | ||
144 | int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | 121 | int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, |
145 | enum dma_data_direction direction) | 122 | enum dma_data_direction direction) |
146 | { | 123 | { |
@@ -157,13 +134,6 @@ int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | |||
157 | 134 | ||
158 | EXPORT_SYMBOL(dma_map_sg); | 135 | EXPORT_SYMBOL(dma_map_sg); |
159 | 136 | ||
160 | /* | ||
161 | * Map a single page of the indicated size for DMA in streaming mode. | ||
162 | * The 32-bit bus address to use is returned. | ||
163 | * | ||
164 | * Device ownership issues as mentioned above for dma_map_single are | ||
165 | * the same here. | ||
166 | */ | ||
167 | dma_addr_t dma_map_page(struct device *dev, struct page *page, unsigned long offset, | 137 | dma_addr_t dma_map_page(struct device *dev, struct page *page, unsigned long offset, |
168 | size_t size, enum dma_data_direction direction) | 138 | size_t size, enum dma_data_direction direction) |
169 | { | 139 | { |
diff --git a/arch/frv/mb93090-mb00/pci-dma.c b/arch/frv/mb93090-mb00/pci-dma.c index 45954f0813dc..85d110b71cf7 100644 --- a/arch/frv/mb93090-mb00/pci-dma.c +++ b/arch/frv/mb93090-mb00/pci-dma.c | |||
@@ -10,7 +10,6 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <linux/slab.h> | ||
14 | #include <linux/dma-mapping.h> | 13 | #include <linux/dma-mapping.h> |
15 | #include <linux/list.h> | 14 | #include <linux/list.h> |
16 | #include <linux/pci.h> | 15 | #include <linux/pci.h> |
@@ -38,13 +37,6 @@ void dma_free_coherent(struct device *hwdev, size_t size, void *vaddr, dma_addr_ | |||
38 | 37 | ||
39 | EXPORT_SYMBOL(dma_free_coherent); | 38 | EXPORT_SYMBOL(dma_free_coherent); |
40 | 39 | ||
41 | /* | ||
42 | * Map a single buffer of the indicated size for DMA in streaming mode. | ||
43 | * The 32-bit bus address to use is returned. | ||
44 | * | ||
45 | * Once the device is given the dma address, the device owns this memory | ||
46 | * until either pci_unmap_single or pci_dma_sync_single is performed. | ||
47 | */ | ||
48 | dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, | 40 | dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, |
49 | enum dma_data_direction direction) | 41 | enum dma_data_direction direction) |
50 | { | 42 | { |
@@ -57,22 +49,6 @@ dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, | |||
57 | 49 | ||
58 | EXPORT_SYMBOL(dma_map_single); | 50 | EXPORT_SYMBOL(dma_map_single); |
59 | 51 | ||
60 | /* | ||
61 | * Map a set of buffers described by scatterlist in streaming | ||
62 | * mode for DMA. This is the scather-gather version of the | ||
63 | * above dma_map_single interface. Here the scatter gather list | ||
64 | * elements are each tagged with the appropriate dma address | ||
65 | * and length. They are obtained via sg_dma_{address,length}(SG). | ||
66 | * | ||
67 | * NOTE: An implementation may be able to use a smaller number of | ||
68 | * DMA address/length pairs than there are SG table elements. | ||
69 | * (for example via virtual mapping capabilities) | ||
70 | * The routine returns the number of addr/length pairs actually | ||
71 | * used, at most nents. | ||
72 | * | ||
73 | * Device ownership issues as mentioned above for dma_map_single are | ||
74 | * the same here. | ||
75 | */ | ||
76 | int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | 52 | int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, |
77 | enum dma_data_direction direction) | 53 | enum dma_data_direction direction) |
78 | { | 54 | { |
@@ -103,13 +79,6 @@ int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | |||
103 | 79 | ||
104 | EXPORT_SYMBOL(dma_map_sg); | 80 | EXPORT_SYMBOL(dma_map_sg); |
105 | 81 | ||
106 | /* | ||
107 | * Map a single page of the indicated size for DMA in streaming mode. | ||
108 | * The 32-bit bus address to use is returned. | ||
109 | * | ||
110 | * Device ownership issues as mentioned above for dma_map_single are | ||
111 | * the same here. | ||
112 | */ | ||
113 | dma_addr_t dma_map_page(struct device *dev, struct page *page, unsigned long offset, | 82 | dma_addr_t dma_map_page(struct device *dev, struct page *page, unsigned long offset, |
114 | size_t size, enum dma_data_direction direction) | 83 | size_t size, enum dma_data_direction direction) |
115 | { | 84 | { |
diff --git a/arch/frv/mb93090-mb00/pci-frv.c b/arch/frv/mb93090-mb00/pci-frv.c index 566bdeb499d1..6b4fb28e9f99 100644 --- a/arch/frv/mb93090-mb00/pci-frv.c +++ b/arch/frv/mb93090-mb00/pci-frv.c | |||
@@ -32,18 +32,16 @@ | |||
32 | * but we want to try to avoid allocating at 0x2900-0x2bff | 32 | * but we want to try to avoid allocating at 0x2900-0x2bff |
33 | * which might have be mirrored at 0x0100-0x03ff.. | 33 | * which might have be mirrored at 0x0100-0x03ff.. |
34 | */ | 34 | */ |
35 | void | 35 | resource_size_t |
36 | pcibios_align_resource(void *data, struct resource *res, | 36 | pcibios_align_resource(void *data, const struct resource *res, |
37 | resource_size_t size, resource_size_t align) | 37 | resource_size_t size, resource_size_t align) |
38 | { | 38 | { |
39 | if (res->flags & IORESOURCE_IO) { | 39 | resource_size_t start = res->start; |
40 | resource_size_t start = res->start; | ||
41 | 40 | ||
42 | if (start & 0x300) { | 41 | if ((res->flags & IORESOURCE_IO) && (start & 0x300)) |
43 | start = (start + 0x3ff) & ~0x3ff; | 42 | start = (start + 0x3ff) & ~0x3ff; |
44 | res->start = start; | 43 | |
45 | } | 44 | return start; |
46 | } | ||
47 | } | 45 | } |
48 | 46 | ||
49 | 47 | ||
@@ -96,8 +94,7 @@ static void __init pcibios_allocate_bus_resources(struct list_head *bus_list) | |||
96 | r = &dev->resource[idx]; | 94 | r = &dev->resource[idx]; |
97 | if (!r->start) | 95 | if (!r->start) |
98 | continue; | 96 | continue; |
99 | if (pci_claim_resource(dev, idx) < 0) | 97 | pci_claim_resource(dev, idx); |
100 | printk(KERN_ERR "PCI: Cannot allocate resource region %d of bridge %s\n", idx, pci_name(dev)); | ||
101 | } | 98 | } |
102 | } | 99 | } |
103 | pcibios_allocate_bus_resources(&bus->children); | 100 | pcibios_allocate_bus_resources(&bus->children); |
@@ -127,7 +124,6 @@ static void __init pcibios_allocate_resources(int pass) | |||
127 | DBG("PCI: Resource %08lx-%08lx (f=%lx, d=%d, p=%d)\n", | 124 | DBG("PCI: Resource %08lx-%08lx (f=%lx, d=%d, p=%d)\n", |
128 | r->start, r->end, r->flags, disabled, pass); | 125 | r->start, r->end, r->flags, disabled, pass); |
129 | if (pci_claim_resource(dev, idx) < 0) { | 126 | if (pci_claim_resource(dev, idx) < 0) { |
130 | printk(KERN_ERR "PCI: Cannot allocate resource region %d of device %s\n", idx, pci_name(dev)); | ||
131 | /* We'll assign a new address later */ | 127 | /* We'll assign a new address later */ |
132 | r->end -= r->start; | 128 | r->end -= r->start; |
133 | r->start = 0; | 129 | r->start = 0; |
diff --git a/arch/frv/mb93090-mb00/pci-irq.c b/arch/frv/mb93090-mb00/pci-irq.c index ba587523c015..20f6497b2cd5 100644 --- a/arch/frv/mb93090-mb00/pci-irq.c +++ b/arch/frv/mb93090-mb00/pci-irq.c | |||
@@ -9,7 +9,6 @@ | |||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/pci.h> | 10 | #include <linux/pci.h> |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/slab.h> | ||
13 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
14 | #include <linux/irq.h> | 13 | #include <linux/irq.h> |
15 | 14 | ||
diff --git a/arch/frv/mb93090-mb00/pci-vdk.c b/arch/frv/mb93090-mb00/pci-vdk.c index c0dcec65c6b7..f8dd37e49535 100644 --- a/arch/frv/mb93090-mb00/pci-vdk.c +++ b/arch/frv/mb93090-mb00/pci-vdk.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/ioport.h> | 17 | #include <linux/ioport.h> |
18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <linux/slab.h> | ||
20 | 19 | ||
21 | #include <asm/segment.h> | 20 | #include <asm/segment.h> |
22 | #include <asm/io.h> | 21 | #include <asm/io.h> |
diff --git a/arch/frv/mm/dma-alloc.c b/arch/frv/mm/dma-alloc.c index 44840e73e907..7a73aaeae3ac 100644 --- a/arch/frv/mm/dma-alloc.c +++ b/arch/frv/mm/dma-alloc.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/init.h> | 37 | #include <linux/init.h> |
38 | #include <linux/pci.h> | 38 | #include <linux/pci.h> |
39 | #include <linux/hardirq.h> | 39 | #include <linux/hardirq.h> |
40 | #include <linux/gfp.h> | ||
40 | 41 | ||
41 | #include <asm/pgalloc.h> | 42 | #include <asm/pgalloc.h> |
42 | #include <asm/io.h> | 43 | #include <asm/io.h> |
diff --git a/arch/frv/mm/init.c b/arch/frv/mm/init.c index 0708284f85fb..ed64588ac3a7 100644 --- a/arch/frv/mm/init.c +++ b/arch/frv/mm/init.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/signal.h> | 19 | #include <linux/signal.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/pagemap.h> | 21 | #include <linux/pagemap.h> |
22 | #include <linux/gfp.h> | ||
22 | #include <linux/swap.h> | 23 | #include <linux/swap.h> |
23 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
24 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
diff --git a/arch/frv/mm/pgalloc.c b/arch/frv/mm/pgalloc.c index 66f616fb4860..c42c83d507bc 100644 --- a/arch/frv/mm/pgalloc.c +++ b/arch/frv/mm/pgalloc.c | |||
@@ -10,7 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/slab.h> | 13 | #include <linux/gfp.h> |
14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
15 | #include <linux/highmem.h> | 15 | #include <linux/highmem.h> |
16 | #include <linux/quicklist.h> | 16 | #include <linux/quicklist.h> |