aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa
diff options
context:
space:
mode:
Diffstat (limited to 'arch/xtensa')
-rw-r--r--arch/xtensa/Kconfig4
-rw-r--r--arch/xtensa/boot/lib/Makefile2
-rw-r--r--arch/xtensa/kernel/entry.S2
-rw-r--r--arch/xtensa/kernel/pci.c12
-rw-r--r--arch/xtensa/kernel/signal.c12
5 files changed, 8 insertions, 24 deletions
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index dbeb3504c3c8..848f173db257 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -34,10 +34,6 @@ config GENERIC_HARDIRQS
34 bool 34 bool
35 default y 35 default y
36 36
37config RWSEM_GENERIC_SPINLOCK
38 bool
39 default y
40
41source "init/Kconfig" 37source "init/Kconfig"
42 38
43menu "Processor type and features" 39menu "Processor type and features"
diff --git a/arch/xtensa/boot/lib/Makefile b/arch/xtensa/boot/lib/Makefile
index 9e73bb8aeb7a..d3d2aa2d883a 100644
--- a/arch/xtensa/boot/lib/Makefile
+++ b/arch/xtensa/boot/lib/Makefile
@@ -2,7 +2,7 @@
2# Makefile for some libs needed by zImage. 2# Makefile for some libs needed by zImage.
3# 3#
4 4
5zlib := infblock.c infcodes.c inffast.c inflate.c inftrees.c infutil.c 5zlib := inffast.c inflate.c inftrees.c
6 6
7lib-y += $(zlib:.c=.o) zmem.o 7lib-y += $(zlib:.c=.o) zmem.o
8 8
diff --git a/arch/xtensa/kernel/entry.S b/arch/xtensa/kernel/entry.S
index 5c018c503dfa..89e409e9e0de 100644
--- a/arch/xtensa/kernel/entry.S
+++ b/arch/xtensa/kernel/entry.S
@@ -1102,7 +1102,7 @@ ENTRY(fast_syscall_sysxtensa)
1102 s32i a7, a2, PT_AREG7 1102 s32i a7, a2, PT_AREG7
1103 1103
1104 movi a7, 4 # sizeof(unsigned int) 1104 movi a7, 4 # sizeof(unsigned int)
1105 verify_area a3, a7, a0, a2, .Leac 1105 access_ok a0, a3, a7, a2, .Leac
1106 1106
1107 _beqi a6, SYSXTENSA_ATOMIC_SET, .Lset 1107 _beqi a6, SYSXTENSA_ATOMIC_SET, .Lset
1108 _beqi a6, SYSXTENSA_ATOMIC_EXG_ADD, .Lexg 1108 _beqi a6, SYSXTENSA_ATOMIC_EXG_ADD, .Lexg
diff --git a/arch/xtensa/kernel/pci.c b/arch/xtensa/kernel/pci.c
index de19501aa809..c6f471b9eaa0 100644
--- a/arch/xtensa/kernel/pci.c
+++ b/arch/xtensa/kernel/pci.c
@@ -350,17 +350,6 @@ __pci_mmap_make_offset(struct pci_dev *dev, struct vm_area_struct *vma,
350} 350}
351 351
352/* 352/*
353 * Set vm_flags of VMA, as appropriate for this architecture, for a pci device
354 * mapping.
355 */
356static __inline__ void
357__pci_mmap_set_flags(struct pci_dev *dev, struct vm_area_struct *vma,
358 enum pci_mmap_state mmap_state)
359{
360 vma->vm_flags |= VM_SHM | VM_LOCKED | VM_IO;
361}
362
363/*
364 * Set vm_page_prot of VMA, as appropriate for this architecture, for a pci 353 * Set vm_page_prot of VMA, as appropriate for this architecture, for a pci
365 * device mapping. 354 * device mapping.
366 */ 355 */
@@ -399,7 +388,6 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
399 if (ret < 0) 388 if (ret < 0)
400 return ret; 389 return ret;
401 390
402 __pci_mmap_set_flags(dev, vma, mmap_state);
403 __pci_mmap_set_pgprot(dev, vma, mmap_state, write_combine); 391 __pci_mmap_set_pgprot(dev, vma, mmap_state, write_combine);
404 392
405 ret = io_remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, 393 ret = io_remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
diff --git a/arch/xtensa/kernel/signal.c b/arch/xtensa/kernel/signal.c
index e252b61e45a5..c494f0826fc5 100644
--- a/arch/xtensa/kernel/signal.c
+++ b/arch/xtensa/kernel/signal.c
@@ -104,7 +104,7 @@ sys_sigaction(int sig, const struct old_sigaction *act,
104 104
105 if (act) { 105 if (act) {
106 old_sigset_t mask; 106 old_sigset_t mask;
107 if (verify_area(VERIFY_READ, act, sizeof(*act)) || 107 if (!access_ok(VERIFY_READ, act, sizeof(*act)) ||
108 __get_user(new_ka.sa.sa_handler, &act->sa_handler) || 108 __get_user(new_ka.sa.sa_handler, &act->sa_handler) ||
109 __get_user(new_ka.sa.sa_restorer, &act->sa_restorer)) 109 __get_user(new_ka.sa.sa_restorer, &act->sa_restorer))
110 return -EFAULT; 110 return -EFAULT;
@@ -116,7 +116,7 @@ sys_sigaction(int sig, const struct old_sigaction *act,
116 ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); 116 ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
117 117
118 if (!ret && oact) { 118 if (!ret && oact) {
119 if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) || 119 if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) ||
120 __put_user(old_ka.sa.sa_handler, &oact->sa_handler) || 120 __put_user(old_ka.sa.sa_handler, &oact->sa_handler) ||
121 __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer)) 121 __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer))
122 return -EFAULT; 122 return -EFAULT;
@@ -236,7 +236,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc)
236 err |= __copy_from_user (regs->areg, sc->sc_areg, XCHAL_NUM_AREGS*4); 236 err |= __copy_from_user (regs->areg, sc->sc_areg, XCHAL_NUM_AREGS*4);
237 err |= __get_user(buf, &sc->sc_cpstate); 237 err |= __get_user(buf, &sc->sc_cpstate);
238 if (buf) { 238 if (buf) {
239 if (verify_area(VERIFY_READ, buf, sizeof(*buf))) 239 if (!access_ok(VERIFY_READ, buf, sizeof(*buf)))
240 goto badframe; 240 goto badframe;
241 err |= restore_cpextra(buf); 241 err |= restore_cpextra(buf);
242 } 242 }
@@ -357,7 +357,7 @@ asmlinkage int sys_sigreturn(struct pt_regs *regs)
357 if (regs->depc > 64) 357 if (regs->depc > 64)
358 panic ("Double exception sys_sigreturn\n"); 358 panic ("Double exception sys_sigreturn\n");
359 359
360 if (verify_area(VERIFY_READ, frame, sizeof(*frame))) 360 if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
361 goto badframe; 361 goto badframe;
362 362
363 if (__get_user(set.sig[0], &frame->sc.oldmask) 363 if (__get_user(set.sig[0], &frame->sc.oldmask)
@@ -394,7 +394,7 @@ asmlinkage int sys_rt_sigreturn(struct pt_regs *regs)
394 return 0; 394 return 0;
395 } 395 }
396 396
397 if (verify_area(VERIFY_READ, frame, sizeof(*frame))) 397 if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
398 goto badframe; 398 goto badframe;
399 399
400 if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) 400 if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
@@ -433,7 +433,7 @@ badframe:
433static inline void * 433static inline void *
434get_sigframe(struct k_sigaction *ka, unsigned long sp, size_t frame_size) 434get_sigframe(struct k_sigaction *ka, unsigned long sp, size_t frame_size)
435{ 435{
436 if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && ! on_sig_stack(sp)) 436 if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && ! sas_ss_flags(sp))
437 sp = current->sas_ss_sp + current->sas_ss_size; 437 sp = current->sas_ss_sp + current->sas_ss_size;
438 438
439 return (void *)((sp - frame_size) & -16ul); 439 return (void *)((sp - frame_size) & -16ul);