diff options
Diffstat (limited to 'arch/parisc')
-rw-r--r-- | arch/parisc/Kconfig | 4 | ||||
-rw-r--r-- | arch/parisc/Kconfig.debug | 14 | ||||
-rw-r--r-- | arch/parisc/include/asm/cacheflush.h | 12 | ||||
-rw-r--r-- | arch/parisc/include/asm/compat.h | 3 | ||||
-rw-r--r-- | arch/parisc/include/asm/param.h | 23 | ||||
-rw-r--r-- | arch/parisc/include/asm/pci.h | 14 | ||||
-rw-r--r-- | arch/parisc/include/asm/pgtable.h | 2 | ||||
-rw-r--r-- | arch/parisc/include/asm/ptrace.h | 5 | ||||
-rw-r--r-- | arch/parisc/include/asm/system.h | 2 | ||||
-rw-r--r-- | arch/parisc/include/asm/uaccess.h | 27 | ||||
-rw-r--r-- | arch/parisc/include/asm/unistd.h | 4 | ||||
-rw-r--r-- | arch/parisc/kernel/cache.c | 8 | ||||
-rw-r--r-- | arch/parisc/kernel/pci.c | 17 | ||||
-rw-r--r-- | arch/parisc/kernel/signal.c | 4 | ||||
-rw-r--r-- | arch/parisc/kernel/sys_parisc.c | 15 | ||||
-rw-r--r-- | arch/parisc/kernel/syscall_table.S | 4 | ||||
-rw-r--r-- | arch/parisc/kernel/time.c | 29 | ||||
-rw-r--r-- | arch/parisc/kernel/unaligned.c | 14 | ||||
-rw-r--r-- | arch/parisc/lib/fixup.S | 8 | ||||
-rw-r--r-- | arch/parisc/lib/memcpy.c | 3 |
20 files changed, 105 insertions, 107 deletions
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 524d9352f17e..9c4da3d63bfb 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig | |||
@@ -18,7 +18,6 @@ config PARISC | |||
18 | select BUG | 18 | select BUG |
19 | select HAVE_PERF_EVENTS | 19 | select HAVE_PERF_EVENTS |
20 | select GENERIC_ATOMIC64 if !64BIT | 20 | select GENERIC_ATOMIC64 if !64BIT |
21 | select HAVE_ARCH_TRACEHOOK | ||
22 | help | 21 | help |
23 | The PA-RISC microprocessor is designed by Hewlett-Packard and used | 22 | The PA-RISC microprocessor is designed by Hewlett-Packard and used |
24 | in many of their workstations & servers (HP9000 700 and 800 series, | 23 | in many of their workstations & servers (HP9000 700 and 800 series, |
@@ -96,6 +95,9 @@ config PM | |||
96 | config STACKTRACE_SUPPORT | 95 | config STACKTRACE_SUPPORT |
97 | def_bool y | 96 | def_bool y |
98 | 97 | ||
98 | config NEED_DMA_MAP_STATE | ||
99 | def_bool y | ||
100 | |||
99 | config ISA_DMA_API | 101 | config ISA_DMA_API |
100 | bool | 102 | bool |
101 | 103 | ||
diff --git a/arch/parisc/Kconfig.debug b/arch/parisc/Kconfig.debug index bc989e522a04..7305ac8f7f5b 100644 --- a/arch/parisc/Kconfig.debug +++ b/arch/parisc/Kconfig.debug | |||
@@ -12,4 +12,18 @@ config DEBUG_RODATA | |||
12 | portion of the kernel code won't be covered by a TLB anymore. | 12 | portion of the kernel code won't be covered by a TLB anymore. |
13 | If in doubt, say "N". | 13 | If in doubt, say "N". |
14 | 14 | ||
15 | config DEBUG_STRICT_USER_COPY_CHECKS | ||
16 | bool "Strict copy size checks" | ||
17 | depends on DEBUG_KERNEL && !TRACE_BRANCH_PROFILING | ||
18 | ---help--- | ||
19 | Enabling this option turns a certain set of sanity checks for user | ||
20 | copy operations into compile time failures. | ||
21 | |||
22 | The copy_from_user() etc checks are there to help test if there | ||
23 | are sufficient security checks on the length argument of | ||
24 | the copy operation, by having gcc prove that the argument is | ||
25 | within bounds. | ||
26 | |||
27 | If unsure, or if you run an older (pre 4.4) gcc, say N. | ||
28 | |||
15 | endmenu | 29 | endmenu |
diff --git a/arch/parisc/include/asm/cacheflush.h b/arch/parisc/include/asm/cacheflush.h index 7a73b615c23d..477277739da5 100644 --- a/arch/parisc/include/asm/cacheflush.h +++ b/arch/parisc/include/asm/cacheflush.h | |||
@@ -38,6 +38,18 @@ void flush_cache_mm(struct mm_struct *mm); | |||
38 | 38 | ||
39 | #define flush_kernel_dcache_range(start,size) \ | 39 | #define flush_kernel_dcache_range(start,size) \ |
40 | flush_kernel_dcache_range_asm((start), (start)+(size)); | 40 | flush_kernel_dcache_range_asm((start), (start)+(size)); |
41 | /* vmap range flushes and invalidates. Architecturally, we don't need | ||
42 | * the invalidate, because the CPU should refuse to speculate once an | ||
43 | * area has been flushed, so invalidate is left empty */ | ||
44 | static inline void flush_kernel_vmap_range(void *vaddr, int size) | ||
45 | { | ||
46 | unsigned long start = (unsigned long)vaddr; | ||
47 | |||
48 | flush_kernel_dcache_range_asm(start, start + size); | ||
49 | } | ||
50 | static inline void invalidate_kernel_vmap_range(void *vaddr, int size) | ||
51 | { | ||
52 | } | ||
41 | 53 | ||
42 | #define flush_cache_vmap(start, end) flush_cache_all() | 54 | #define flush_cache_vmap(start, end) flush_cache_all() |
43 | #define flush_cache_vunmap(start, end) flush_cache_all() | 55 | #define flush_cache_vunmap(start, end) flush_cache_all() |
diff --git a/arch/parisc/include/asm/compat.h b/arch/parisc/include/asm/compat.h index 7f32611a7a5e..02b77baa5da6 100644 --- a/arch/parisc/include/asm/compat.h +++ b/arch/parisc/include/asm/compat.h | |||
@@ -7,7 +7,8 @@ | |||
7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
8 | #include <linux/thread_info.h> | 8 | #include <linux/thread_info.h> |
9 | 9 | ||
10 | #define COMPAT_USER_HZ 100 | 10 | #define COMPAT_USER_HZ 100 |
11 | #define COMPAT_UTS_MACHINE "parisc\0\0" | ||
11 | 12 | ||
12 | typedef u32 compat_size_t; | 13 | typedef u32 compat_size_t; |
13 | typedef s32 compat_ssize_t; | 14 | typedef s32 compat_ssize_t; |
diff --git a/arch/parisc/include/asm/param.h b/arch/parisc/include/asm/param.h index 32e03d877858..965d45427975 100644 --- a/arch/parisc/include/asm/param.h +++ b/arch/parisc/include/asm/param.h | |||
@@ -1,22 +1 @@ | |||
1 | #ifndef _ASMPARISC_PARAM_H | #include <asm-generic/param.h> | |
2 | #define _ASMPARISC_PARAM_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | #define HZ CONFIG_HZ | ||
6 | #define USER_HZ 100 /* some user API use "ticks" */ | ||
7 | #define CLOCKS_PER_SEC (USER_HZ) /* like times() */ | ||
8 | #endif | ||
9 | |||
10 | #ifndef HZ | ||
11 | #define HZ 100 | ||
12 | #endif | ||
13 | |||
14 | #define EXEC_PAGESIZE 4096 | ||
15 | |||
16 | #ifndef NOGROUP | ||
17 | #define NOGROUP (-1) | ||
18 | #endif | ||
19 | |||
20 | #define MAXHOSTNAMELEN 64 /* max length of hostname */ | ||
21 | |||
22 | #endif | ||
diff --git a/arch/parisc/include/asm/pci.h b/arch/parisc/include/asm/pci.h index 64c7aa590ae5..2242a5c636c2 100644 --- a/arch/parisc/include/asm/pci.h +++ b/arch/parisc/include/asm/pci.h | |||
@@ -183,20 +183,6 @@ struct pci_bios_ops { | |||
183 | void (*fixup_bus)(struct pci_bus *bus); | 183 | void (*fixup_bus)(struct pci_bus *bus); |
184 | }; | 184 | }; |
185 | 185 | ||
186 | /* pci_unmap_{single,page} is not a nop, thus... */ | ||
187 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \ | ||
188 | dma_addr_t ADDR_NAME; | ||
189 | #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) \ | ||
190 | __u32 LEN_NAME; | ||
191 | #define pci_unmap_addr(PTR, ADDR_NAME) \ | ||
192 | ((PTR)->ADDR_NAME) | ||
193 | #define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) \ | ||
194 | (((PTR)->ADDR_NAME) = (VAL)) | ||
195 | #define pci_unmap_len(PTR, LEN_NAME) \ | ||
196 | ((PTR)->LEN_NAME) | ||
197 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) \ | ||
198 | (((PTR)->LEN_NAME) = (VAL)) | ||
199 | |||
200 | /* | 186 | /* |
201 | ** Stuff declared in arch/parisc/kernel/pci.c | 187 | ** Stuff declared in arch/parisc/kernel/pci.c |
202 | */ | 188 | */ |
diff --git a/arch/parisc/include/asm/pgtable.h b/arch/parisc/include/asm/pgtable.h index a27d2e200fb2..01c15035e783 100644 --- a/arch/parisc/include/asm/pgtable.h +++ b/arch/parisc/include/asm/pgtable.h | |||
@@ -410,7 +410,7 @@ extern void paging_init (void); | |||
410 | 410 | ||
411 | #define PG_dcache_dirty PG_arch_1 | 411 | #define PG_dcache_dirty PG_arch_1 |
412 | 412 | ||
413 | extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t); | 413 | extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t *); |
414 | 414 | ||
415 | /* Encode and de-code a swap entry */ | 415 | /* Encode and de-code a swap entry */ |
416 | 416 | ||
diff --git a/arch/parisc/include/asm/ptrace.h b/arch/parisc/include/asm/ptrace.h index aead40b16dd8..7f09533da771 100644 --- a/arch/parisc/include/asm/ptrace.h +++ b/arch/parisc/include/asm/ptrace.h | |||
@@ -47,13 +47,8 @@ struct pt_regs { | |||
47 | 47 | ||
48 | #define task_regs(task) ((struct pt_regs *) ((char *)(task) + TASK_REGS)) | 48 | #define task_regs(task) ((struct pt_regs *) ((char *)(task) + TASK_REGS)) |
49 | 49 | ||
50 | struct task_struct; | ||
51 | #define arch_has_single_step() 1 | 50 | #define arch_has_single_step() 1 |
52 | void user_disable_single_step(struct task_struct *task); | ||
53 | void user_enable_single_step(struct task_struct *task); | ||
54 | |||
55 | #define arch_has_block_step() 1 | 51 | #define arch_has_block_step() 1 |
56 | void user_enable_block_step(struct task_struct *task); | ||
57 | 52 | ||
58 | /* XXX should we use iaoq[1] or iaoq[0] ? */ | 53 | /* XXX should we use iaoq[1] or iaoq[0] ? */ |
59 | #define user_mode(regs) (((regs)->iaoq[0] & 3) ? 1 : 0) | 54 | #define user_mode(regs) (((regs)->iaoq[0] & 3) ? 1 : 0) |
diff --git a/arch/parisc/include/asm/system.h b/arch/parisc/include/asm/system.h index d91357bca5b4..4653c77bf9d1 100644 --- a/arch/parisc/include/asm/system.h +++ b/arch/parisc/include/asm/system.h | |||
@@ -160,7 +160,7 @@ static inline void set_eiem(unsigned long val) | |||
160 | ldcd). */ | 160 | ldcd). */ |
161 | 161 | ||
162 | #define __PA_LDCW_ALIGNMENT 4 | 162 | #define __PA_LDCW_ALIGNMENT 4 |
163 | #define __ldcw_align(a) ((volatile unsigned int *)a) | 163 | #define __ldcw_align(a) (&(a)->slock) |
164 | #define __LDCW "ldcw,co" | 164 | #define __LDCW "ldcw,co" |
165 | 165 | ||
166 | #endif /*!CONFIG_PA20*/ | 166 | #endif /*!CONFIG_PA20*/ |
diff --git a/arch/parisc/include/asm/uaccess.h b/arch/parisc/include/asm/uaccess.h index 7cf799d70b4c..ff4cf9dab8d2 100644 --- a/arch/parisc/include/asm/uaccess.h +++ b/arch/parisc/include/asm/uaccess.h | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <asm/page.h> | 7 | #include <asm/page.h> |
8 | #include <asm/system.h> | 8 | #include <asm/system.h> |
9 | #include <asm/cache.h> | 9 | #include <asm/cache.h> |
10 | #include <asm/errno.h> | ||
10 | #include <asm-generic/uaccess-unaligned.h> | 11 | #include <asm-generic/uaccess-unaligned.h> |
11 | 12 | ||
12 | #define VERIFY_READ 0 | 13 | #define VERIFY_READ 0 |
@@ -234,13 +235,35 @@ extern long lstrnlen_user(const char __user *,long); | |||
234 | 235 | ||
235 | unsigned long copy_to_user(void __user *dst, const void *src, unsigned long len); | 236 | unsigned long copy_to_user(void __user *dst, const void *src, unsigned long len); |
236 | #define __copy_to_user copy_to_user | 237 | #define __copy_to_user copy_to_user |
237 | unsigned long copy_from_user(void *dst, const void __user *src, unsigned long len); | 238 | unsigned long __copy_from_user(void *dst, const void __user *src, unsigned long len); |
238 | #define __copy_from_user copy_from_user | ||
239 | unsigned long copy_in_user(void __user *dst, const void __user *src, unsigned long len); | 239 | unsigned long copy_in_user(void __user *dst, const void __user *src, unsigned long len); |
240 | #define __copy_in_user copy_in_user | 240 | #define __copy_in_user copy_in_user |
241 | #define __copy_to_user_inatomic __copy_to_user | 241 | #define __copy_to_user_inatomic __copy_to_user |
242 | #define __copy_from_user_inatomic __copy_from_user | 242 | #define __copy_from_user_inatomic __copy_from_user |
243 | 243 | ||
244 | extern void copy_from_user_overflow(void) | ||
245 | #ifdef CONFIG_DEBUG_STRICT_USER_COPY_CHECKS | ||
246 | __compiletime_error("copy_from_user() buffer size is not provably correct") | ||
247 | #else | ||
248 | __compiletime_warning("copy_from_user() buffer size is not provably correct") | ||
249 | #endif | ||
250 | ; | ||
251 | |||
252 | static inline unsigned long __must_check copy_from_user(void *to, | ||
253 | const void __user *from, | ||
254 | unsigned long n) | ||
255 | { | ||
256 | int sz = __compiletime_object_size(to); | ||
257 | int ret = -EFAULT; | ||
258 | |||
259 | if (likely(sz == -1 || !__builtin_constant_p(n) || sz >= n)) | ||
260 | ret = __copy_from_user(to, from, n); | ||
261 | else | ||
262 | copy_from_user_overflow(); | ||
263 | |||
264 | return ret; | ||
265 | } | ||
266 | |||
244 | struct pt_regs; | 267 | struct pt_regs; |
245 | int fixup_exception(struct pt_regs *regs); | 268 | int fixup_exception(struct pt_regs *regs); |
246 | 269 | ||
diff --git a/arch/parisc/include/asm/unistd.h b/arch/parisc/include/asm/unistd.h index cda158318c62..1ce7d2851d90 100644 --- a/arch/parisc/include/asm/unistd.h +++ b/arch/parisc/include/asm/unistd.h | |||
@@ -811,8 +811,10 @@ | |||
811 | #define __NR_pwritev (__NR_Linux + 316) | 811 | #define __NR_pwritev (__NR_Linux + 316) |
812 | #define __NR_rt_tgsigqueueinfo (__NR_Linux + 317) | 812 | #define __NR_rt_tgsigqueueinfo (__NR_Linux + 317) |
813 | #define __NR_perf_event_open (__NR_Linux + 318) | 813 | #define __NR_perf_event_open (__NR_Linux + 318) |
814 | #define __NR_recvmmsg (__NR_Linux + 319) | ||
815 | #define __NR_accept4 (__NR_Linux + 320) | ||
814 | 816 | ||
815 | #define __NR_Linux_syscalls (__NR_perf_event_open + 1) | 817 | #define __NR_Linux_syscalls (__NR_accept4 + 1) |
816 | 818 | ||
817 | 819 | ||
818 | #define __IGNORE_select /* newselect */ | 820 | #define __IGNORE_select /* newselect */ |
diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c index b6ed34de14e1..d054f3da3ff5 100644 --- a/arch/parisc/kernel/cache.c +++ b/arch/parisc/kernel/cache.c | |||
@@ -68,9 +68,9 @@ flush_cache_all_local(void) | |||
68 | EXPORT_SYMBOL(flush_cache_all_local); | 68 | EXPORT_SYMBOL(flush_cache_all_local); |
69 | 69 | ||
70 | void | 70 | void |
71 | update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t pte) | 71 | update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t *ptep) |
72 | { | 72 | { |
73 | struct page *page = pte_page(pte); | 73 | struct page *page = pte_page(*ptep); |
74 | 74 | ||
75 | if (pfn_valid(page_to_pfn(page)) && page_mapping(page) && | 75 | if (pfn_valid(page_to_pfn(page)) && page_mapping(page) && |
76 | test_bit(PG_dcache_dirty, &page->flags)) { | 76 | test_bit(PG_dcache_dirty, &page->flags)) { |
@@ -171,14 +171,14 @@ parisc_cache_init(void) | |||
171 | cache_info.ic_conf.cc_cst, | 171 | cache_info.ic_conf.cc_cst, |
172 | cache_info.ic_conf.cc_hv); | 172 | cache_info.ic_conf.cc_hv); |
173 | 173 | ||
174 | printk("D-TLB conf: sh %d page %d cst %d aid %d pad1 %d \n", | 174 | printk("D-TLB conf: sh %d page %d cst %d aid %d pad1 %d\n", |
175 | cache_info.dt_conf.tc_sh, | 175 | cache_info.dt_conf.tc_sh, |
176 | cache_info.dt_conf.tc_page, | 176 | cache_info.dt_conf.tc_page, |
177 | cache_info.dt_conf.tc_cst, | 177 | cache_info.dt_conf.tc_cst, |
178 | cache_info.dt_conf.tc_aid, | 178 | cache_info.dt_conf.tc_aid, |
179 | cache_info.dt_conf.tc_pad1); | 179 | cache_info.dt_conf.tc_pad1); |
180 | 180 | ||
181 | printk("I-TLB conf: sh %d page %d cst %d aid %d pad1 %d \n", | 181 | printk("I-TLB conf: sh %d page %d cst %d aid %d pad1 %d\n", |
182 | cache_info.it_conf.tc_sh, | 182 | cache_info.it_conf.tc_sh, |
183 | cache_info.it_conf.tc_page, | 183 | cache_info.it_conf.tc_page, |
184 | cache_info.it_conf.tc_cst, | 184 | cache_info.it_conf.tc_cst, |
diff --git a/arch/parisc/kernel/pci.c b/arch/parisc/kernel/pci.c index f7064abc3bb6..38372e7cbb88 100644 --- a/arch/parisc/kernel/pci.c +++ b/arch/parisc/kernel/pci.c | |||
@@ -18,7 +18,6 @@ | |||
18 | 18 | ||
19 | #include <asm/io.h> | 19 | #include <asm/io.h> |
20 | #include <asm/system.h> | 20 | #include <asm/system.h> |
21 | #include <asm/cache.h> /* for L1_CACHE_BYTES */ | ||
22 | #include <asm/superio.h> | 21 | #include <asm/superio.h> |
23 | 22 | ||
24 | #define DEBUG_RESOURCES 0 | 23 | #define DEBUG_RESOURCES 0 |
@@ -123,6 +122,10 @@ static int __init pcibios_init(void) | |||
123 | } else { | 122 | } else { |
124 | printk(KERN_WARNING "pci_bios != NULL but init() is!\n"); | 123 | printk(KERN_WARNING "pci_bios != NULL but init() is!\n"); |
125 | } | 124 | } |
125 | |||
126 | /* Set the CLS for PCI as early as possible. */ | ||
127 | pci_cache_line_size = pci_dfl_cache_line_size; | ||
128 | |||
126 | return 0; | 129 | return 0; |
127 | } | 130 | } |
128 | 131 | ||
@@ -171,7 +174,7 @@ void pcibios_set_master(struct pci_dev *dev) | |||
171 | ** upper byte is PCI_LATENCY_TIMER. | 174 | ** upper byte is PCI_LATENCY_TIMER. |
172 | */ | 175 | */ |
173 | pci_write_config_word(dev, PCI_CACHE_LINE_SIZE, | 176 | pci_write_config_word(dev, PCI_CACHE_LINE_SIZE, |
174 | (0x80 << 8) | (L1_CACHE_BYTES / sizeof(u32))); | 177 | (0x80 << 8) | pci_cache_line_size); |
175 | } | 178 | } |
176 | 179 | ||
177 | 180 | ||
@@ -254,10 +257,10 @@ EXPORT_SYMBOL(pcibios_bus_to_resource); | |||
254 | * Since we are just checking candidates, don't use any fields other | 257 | * Since we are just checking candidates, don't use any fields other |
255 | * than res->start. | 258 | * than res->start. |
256 | */ | 259 | */ |
257 | void pcibios_align_resource(void *data, struct resource *res, | 260 | resource_size_t pcibios_align_resource(void *data, const struct resource *res, |
258 | resource_size_t size, resource_size_t alignment) | 261 | resource_size_t size, resource_size_t alignment) |
259 | { | 262 | { |
260 | resource_size_t mask, align; | 263 | resource_size_t mask, align, start = res->start; |
261 | 264 | ||
262 | DBG_RES("pcibios_align_resource(%s, (%p) [%lx,%lx]/%x, 0x%lx, 0x%lx)\n", | 265 | DBG_RES("pcibios_align_resource(%s, (%p) [%lx,%lx]/%x, 0x%lx, 0x%lx)\n", |
263 | pci_name(((struct pci_dev *) data)), | 266 | pci_name(((struct pci_dev *) data)), |
@@ -269,10 +272,10 @@ void pcibios_align_resource(void *data, struct resource *res, | |||
269 | 272 | ||
270 | /* Align to largest of MIN or input size */ | 273 | /* Align to largest of MIN or input size */ |
271 | mask = max(alignment, align) - 1; | 274 | mask = max(alignment, align) - 1; |
272 | res->start += mask; | 275 | start += mask; |
273 | res->start &= ~mask; | 276 | start &= ~mask; |
274 | 277 | ||
275 | /* The caller updates the end field, we don't. */ | 278 | return start; |
276 | } | 279 | } |
277 | 280 | ||
278 | 281 | ||
diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c index fb37ac52e46c..35c827e94e31 100644 --- a/arch/parisc/kernel/signal.c +++ b/arch/parisc/kernel/signal.c | |||
@@ -468,7 +468,9 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, | |||
468 | recalc_sigpending(); | 468 | recalc_sigpending(); |
469 | spin_unlock_irq(¤t->sighand->siglock); | 469 | spin_unlock_irq(¤t->sighand->siglock); |
470 | 470 | ||
471 | tracehook_signal_handler(sig, info, ka, regs, 0); | 471 | tracehook_signal_handler(sig, info, ka, regs, |
472 | test_thread_flag(TIF_SINGLESTEP) || | ||
473 | test_thread_flag(TIF_BLOCKSTEP)); | ||
472 | 474 | ||
473 | return 1; | 475 | return 1; |
474 | } | 476 | } |
diff --git a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c index 9147391afb03..c9b932260f47 100644 --- a/arch/parisc/kernel/sys_parisc.c +++ b/arch/parisc/kernel/sys_parisc.c | |||
@@ -234,18 +234,3 @@ long parisc_personality(unsigned long personality) | |||
234 | 234 | ||
235 | return err; | 235 | return err; |
236 | } | 236 | } |
237 | |||
238 | long parisc_newuname(struct new_utsname __user *name) | ||
239 | { | ||
240 | int err = sys_newuname(name); | ||
241 | |||
242 | #ifdef CONFIG_COMPAT | ||
243 | if (!err && personality(current->personality) == PER_LINUX32) { | ||
244 | if (__put_user(0, name->machine + 6) || | ||
245 | __put_user(0, name->machine + 7)) | ||
246 | err = -EFAULT; | ||
247 | } | ||
248 | #endif | ||
249 | |||
250 | return err; | ||
251 | } | ||
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S index 01c4fcf8f481..3d52c978738f 100644 --- a/arch/parisc/kernel/syscall_table.S +++ b/arch/parisc/kernel/syscall_table.S | |||
@@ -127,7 +127,7 @@ | |||
127 | ENTRY_SAME(socketpair) | 127 | ENTRY_SAME(socketpair) |
128 | ENTRY_SAME(setpgid) | 128 | ENTRY_SAME(setpgid) |
129 | ENTRY_SAME(send) | 129 | ENTRY_SAME(send) |
130 | ENTRY_OURS(newuname) | 130 | ENTRY_SAME(newuname) |
131 | ENTRY_SAME(umask) /* 60 */ | 131 | ENTRY_SAME(umask) /* 60 */ |
132 | ENTRY_SAME(chroot) | 132 | ENTRY_SAME(chroot) |
133 | ENTRY_COMP(ustat) | 133 | ENTRY_COMP(ustat) |
@@ -417,6 +417,8 @@ | |||
417 | ENTRY_COMP(pwritev) | 417 | ENTRY_COMP(pwritev) |
418 | ENTRY_COMP(rt_tgsigqueueinfo) | 418 | ENTRY_COMP(rt_tgsigqueueinfo) |
419 | ENTRY_SAME(perf_event_open) | 419 | ENTRY_SAME(perf_event_open) |
420 | ENTRY_COMP(recvmmsg) | ||
421 | ENTRY_SAME(accept4) /* 320 */ | ||
420 | 422 | ||
421 | /* Nothing yet */ | 423 | /* Nothing yet */ |
422 | 424 | ||
diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c index a79c6f9e7e2c..05511ccb61d2 100644 --- a/arch/parisc/kernel/time.c +++ b/arch/parisc/kernel/time.c | |||
@@ -250,9 +250,21 @@ static int __init rtc_init(void) | |||
250 | } | 250 | } |
251 | module_init(rtc_init); | 251 | module_init(rtc_init); |
252 | 252 | ||
253 | void __init time_init(void) | 253 | void read_persistent_clock(struct timespec *ts) |
254 | { | 254 | { |
255 | static struct pdc_tod tod_data; | 255 | static struct pdc_tod tod_data; |
256 | if (pdc_tod_read(&tod_data) == 0) { | ||
257 | ts->tv_sec = tod_data.tod_sec; | ||
258 | ts->tv_nsec = tod_data.tod_usec * 1000; | ||
259 | } else { | ||
260 | printk(KERN_ERR "Error reading tod clock\n"); | ||
261 | ts->tv_sec = 0; | ||
262 | ts->tv_nsec = 0; | ||
263 | } | ||
264 | } | ||
265 | |||
266 | void __init time_init(void) | ||
267 | { | ||
256 | unsigned long current_cr16_khz; | 268 | unsigned long current_cr16_khz; |
257 | 269 | ||
258 | clocktick = (100 * PAGE0->mem_10msec) / HZ; | 270 | clocktick = (100 * PAGE0->mem_10msec) / HZ; |
@@ -264,19 +276,4 @@ void __init time_init(void) | |||
264 | clocksource_cr16.mult = clocksource_khz2mult(current_cr16_khz, | 276 | clocksource_cr16.mult = clocksource_khz2mult(current_cr16_khz, |
265 | clocksource_cr16.shift); | 277 | clocksource_cr16.shift); |
266 | clocksource_register(&clocksource_cr16); | 278 | clocksource_register(&clocksource_cr16); |
267 | |||
268 | if (pdc_tod_read(&tod_data) == 0) { | ||
269 | unsigned long flags; | ||
270 | |||
271 | write_seqlock_irqsave(&xtime_lock, flags); | ||
272 | xtime.tv_sec = tod_data.tod_sec; | ||
273 | xtime.tv_nsec = tod_data.tod_usec * 1000; | ||
274 | set_normalized_timespec(&wall_to_monotonic, | ||
275 | -xtime.tv_sec, -xtime.tv_nsec); | ||
276 | write_sequnlock_irqrestore(&xtime_lock, flags); | ||
277 | } else { | ||
278 | printk(KERN_ERR "Error reading tod clock\n"); | ||
279 | xtime.tv_sec = 0; | ||
280 | xtime.tv_nsec = 0; | ||
281 | } | ||
282 | } | 279 | } |
diff --git a/arch/parisc/kernel/unaligned.c b/arch/parisc/kernel/unaligned.c index e6f4b7a4b7e3..92d977bb5ea8 100644 --- a/arch/parisc/kernel/unaligned.c +++ b/arch/parisc/kernel/unaligned.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
27 | #include <linux/signal.h> | 27 | #include <linux/signal.h> |
28 | #include <linux/ratelimit.h> | ||
28 | #include <asm/uaccess.h> | 29 | #include <asm/uaccess.h> |
29 | 30 | ||
30 | /* #define DEBUG_UNALIGNED 1 */ | 31 | /* #define DEBUG_UNALIGNED 1 */ |
@@ -446,8 +447,7 @@ static int emulate_std(struct pt_regs *regs, int frreg, int flop) | |||
446 | 447 | ||
447 | void handle_unaligned(struct pt_regs *regs) | 448 | void handle_unaligned(struct pt_regs *regs) |
448 | { | 449 | { |
449 | static unsigned long unaligned_count = 0; | 450 | static DEFINE_RATELIMIT_STATE(ratelimit, 5 * HZ, 5); |
450 | static unsigned long last_time = 0; | ||
451 | unsigned long newbase = R1(regs->iir)?regs->gr[R1(regs->iir)]:0; | 451 | unsigned long newbase = R1(regs->iir)?regs->gr[R1(regs->iir)]:0; |
452 | int modify = 0; | 452 | int modify = 0; |
453 | int ret = ERR_NOTHANDLED; | 453 | int ret = ERR_NOTHANDLED; |
@@ -460,14 +460,8 @@ void handle_unaligned(struct pt_regs *regs) | |||
460 | goto force_sigbus; | 460 | goto force_sigbus; |
461 | } | 461 | } |
462 | 462 | ||
463 | if (unaligned_count > 5 && | 463 | if (!(current->thread.flags & PARISC_UAC_NOPRINT) && |
464 | time_after(jiffies, last_time + 5 * HZ)) { | 464 | __ratelimit(&ratelimit)) { |
465 | unaligned_count = 0; | ||
466 | last_time = jiffies; | ||
467 | } | ||
468 | |||
469 | if (!(current->thread.flags & PARISC_UAC_NOPRINT) | ||
470 | && ++unaligned_count < 5) { | ||
471 | char buf[256]; | 465 | char buf[256]; |
472 | sprintf(buf, "%s(%d): unaligned access to 0x" RFMT " at ip=0x" RFMT "\n", | 466 | sprintf(buf, "%s(%d): unaligned access to 0x" RFMT " at ip=0x" RFMT "\n", |
473 | current->comm, task_pid_nr(current), regs->ior, regs->iaoq[0]); | 467 | current->comm, task_pid_nr(current), regs->ior, regs->iaoq[0]); |
diff --git a/arch/parisc/lib/fixup.S b/arch/parisc/lib/fixup.S index d172d4245cdc..f8c45cc2947d 100644 --- a/arch/parisc/lib/fixup.S +++ b/arch/parisc/lib/fixup.S | |||
@@ -36,8 +36,8 @@ | |||
36 | #endif | 36 | #endif |
37 | /* t2 = &__per_cpu_offset[smp_processor_id()]; */ | 37 | /* t2 = &__per_cpu_offset[smp_processor_id()]; */ |
38 | LDREGX \t2(\t1),\t2 | 38 | LDREGX \t2(\t1),\t2 |
39 | addil LT%per_cpu__exception_data,%r27 | 39 | addil LT%exception_data,%r27 |
40 | LDREG RT%per_cpu__exception_data(%r1),\t1 | 40 | LDREG RT%exception_data(%r1),\t1 |
41 | /* t1 = &__get_cpu_var(exception_data) */ | 41 | /* t1 = &__get_cpu_var(exception_data) */ |
42 | add,l \t1,\t2,\t1 | 42 | add,l \t1,\t2,\t1 |
43 | /* t1 = t1->fault_ip */ | 43 | /* t1 = t1->fault_ip */ |
@@ -46,8 +46,8 @@ | |||
46 | #else | 46 | #else |
47 | .macro get_fault_ip t1 t2 | 47 | .macro get_fault_ip t1 t2 |
48 | /* t1 = &__get_cpu_var(exception_data) */ | 48 | /* t1 = &__get_cpu_var(exception_data) */ |
49 | addil LT%per_cpu__exception_data,%r27 | 49 | addil LT%exception_data,%r27 |
50 | LDREG RT%per_cpu__exception_data(%r1),\t2 | 50 | LDREG RT%exception_data(%r1),\t2 |
51 | /* t1 = t2->fault_ip */ | 51 | /* t1 = t2->fault_ip */ |
52 | LDREG EXCDATA_IP(\t2), \t1 | 52 | LDREG EXCDATA_IP(\t2), \t1 |
53 | .endm | 53 | .endm |
diff --git a/arch/parisc/lib/memcpy.c b/arch/parisc/lib/memcpy.c index abf41f4632a9..1dbca5c31b3c 100644 --- a/arch/parisc/lib/memcpy.c +++ b/arch/parisc/lib/memcpy.c | |||
@@ -475,7 +475,8 @@ unsigned long copy_to_user(void __user *dst, const void *src, unsigned long len) | |||
475 | return pa_memcpy((void __force *)dst, src, len); | 475 | return pa_memcpy((void __force *)dst, src, len); |
476 | } | 476 | } |
477 | 477 | ||
478 | unsigned long copy_from_user(void *dst, const void __user *src, unsigned long len) | 478 | EXPORT_SYMBOL(__copy_from_user); |
479 | unsigned long __copy_from_user(void *dst, const void __user *src, unsigned long len) | ||
479 | { | 480 | { |
480 | mtsp(get_user_space(), 1); | 481 | mtsp(get_user_space(), 1); |
481 | mtsp(get_kernel_space(), 2); | 482 | mtsp(get_kernel_space(), 2); |