diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /arch/xtensa/include | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'arch/xtensa/include')
-rw-r--r-- | arch/xtensa/include/asm/bitops.h | 3 | ||||
-rw-r--r-- | arch/xtensa/include/asm/dma.h | 2 | ||||
-rw-r--r-- | arch/xtensa/include/asm/ioctls.h | 2 | ||||
-rw-r--r-- | arch/xtensa/include/asm/irqflags.h | 58 | ||||
-rw-r--r-- | arch/xtensa/include/asm/mman.h | 3 | ||||
-rw-r--r-- | arch/xtensa/include/asm/page.h | 4 | ||||
-rw-r--r-- | arch/xtensa/include/asm/pgtable.h | 3 | ||||
-rw-r--r-- | arch/xtensa/include/asm/rwsem.h | 37 | ||||
-rw-r--r-- | arch/xtensa/include/asm/system.h | 33 | ||||
-rw-r--r-- | arch/xtensa/include/asm/types.h | 4 | ||||
-rw-r--r-- | arch/xtensa/include/asm/uaccess.h | 2 | ||||
-rw-r--r-- | arch/xtensa/include/asm/unistd.h | 4 |
12 files changed, 70 insertions, 85 deletions
diff --git a/arch/xtensa/include/asm/bitops.h b/arch/xtensa/include/asm/bitops.h index 6c3930397bd3..c8fac8d8190d 100644 --- a/arch/xtensa/include/asm/bitops.h +++ b/arch/xtensa/include/asm/bitops.h | |||
@@ -106,7 +106,7 @@ static inline unsigned long __fls(unsigned long word) | |||
106 | 106 | ||
107 | #include <asm-generic/bitops/fls64.h> | 107 | #include <asm-generic/bitops/fls64.h> |
108 | #include <asm-generic/bitops/find.h> | 108 | #include <asm-generic/bitops/find.h> |
109 | #include <asm-generic/bitops/ext2-non-atomic.h> | 109 | #include <asm-generic/bitops/le.h> |
110 | 110 | ||
111 | #ifdef __XTENSA_EL__ | 111 | #ifdef __XTENSA_EL__ |
112 | # define ext2_set_bit_atomic(lock,nr,addr) \ | 112 | # define ext2_set_bit_atomic(lock,nr,addr) \ |
@@ -125,7 +125,6 @@ static inline unsigned long __fls(unsigned long word) | |||
125 | #include <asm-generic/bitops/hweight.h> | 125 | #include <asm-generic/bitops/hweight.h> |
126 | #include <asm-generic/bitops/lock.h> | 126 | #include <asm-generic/bitops/lock.h> |
127 | #include <asm-generic/bitops/sched.h> | 127 | #include <asm-generic/bitops/sched.h> |
128 | #include <asm-generic/bitops/minix.h> | ||
129 | 128 | ||
130 | #endif /* __KERNEL__ */ | 129 | #endif /* __KERNEL__ */ |
131 | 130 | ||
diff --git a/arch/xtensa/include/asm/dma.h b/arch/xtensa/include/asm/dma.h index 137ca3945b07..bb099a373b5a 100644 --- a/arch/xtensa/include/asm/dma.h +++ b/arch/xtensa/include/asm/dma.h | |||
@@ -37,7 +37,7 @@ | |||
37 | * the size of the statically mapped kernel segment | 37 | * the size of the statically mapped kernel segment |
38 | * (XCHAL_KSEG_{CACHED,BYPASS}_SIZE), ie. 128 MB. | 38 | * (XCHAL_KSEG_{CACHED,BYPASS}_SIZE), ie. 128 MB. |
39 | * | 39 | * |
40 | * NOTE: When the entire KSEG area is DMA capable, we substract | 40 | * NOTE: When the entire KSEG area is DMA capable, we subtract |
41 | * one from the max address so that the virt_to_phys() macro | 41 | * one from the max address so that the virt_to_phys() macro |
42 | * works correctly on the address (otherwise the address | 42 | * works correctly on the address (otherwise the address |
43 | * enters another area, and virt_to_phys() may not return | 43 | * enters another area, and virt_to_phys() may not return |
diff --git a/arch/xtensa/include/asm/ioctls.h b/arch/xtensa/include/asm/ioctls.h index ab1800012ed9..fd1d1369a407 100644 --- a/arch/xtensa/include/asm/ioctls.h +++ b/arch/xtensa/include/asm/ioctls.h | |||
@@ -98,7 +98,9 @@ | |||
98 | #define TCSETSF2 _IOW('T', 45, struct termios2) | 98 | #define TCSETSF2 _IOW('T', 45, struct termios2) |
99 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 99 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
100 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | 100 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ |
101 | #define TIOCGDEV _IOR('T',0x32, unsigned int) /* Get primary device node of /dev/console */ | ||
101 | #define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ | 102 | #define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ |
103 | #define TIOCVHANGUP _IO('T', 0x37) | ||
102 | 104 | ||
103 | #define TIOCSERCONFIG _IO('T', 83) | 105 | #define TIOCSERCONFIG _IO('T', 83) |
104 | #define TIOCSERGWILD _IOR('T', 84, int) | 106 | #define TIOCSERGWILD _IOR('T', 84, int) |
diff --git a/arch/xtensa/include/asm/irqflags.h b/arch/xtensa/include/asm/irqflags.h new file mode 100644 index 000000000000..dae9a8bdcb17 --- /dev/null +++ b/arch/xtensa/include/asm/irqflags.h | |||
@@ -0,0 +1,58 @@ | |||
1 | /* | ||
2 | * Xtensa IRQ flags handling functions | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | * | ||
8 | * Copyright (C) 2001 - 2005 Tensilica Inc. | ||
9 | */ | ||
10 | |||
11 | #ifndef _XTENSA_IRQFLAGS_H | ||
12 | #define _XTENSA_IRQFLAGS_H | ||
13 | |||
14 | #include <linux/types.h> | ||
15 | |||
16 | static inline unsigned long arch_local_save_flags(void) | ||
17 | { | ||
18 | unsigned long flags; | ||
19 | asm volatile("rsr %0,"__stringify(PS) : "=a" (flags)); | ||
20 | return flags; | ||
21 | } | ||
22 | |||
23 | static inline unsigned long arch_local_irq_save(void) | ||
24 | { | ||
25 | unsigned long flags; | ||
26 | asm volatile("rsil %0, "__stringify(LOCKLEVEL) | ||
27 | : "=a" (flags) :: "memory"); | ||
28 | return flags; | ||
29 | } | ||
30 | |||
31 | static inline void arch_local_irq_disable(void) | ||
32 | { | ||
33 | arch_local_irq_save(); | ||
34 | } | ||
35 | |||
36 | static inline void arch_local_irq_enable(void) | ||
37 | { | ||
38 | unsigned long flags; | ||
39 | asm volatile("rsil %0, 0" : "=a" (flags) :: "memory"); | ||
40 | } | ||
41 | |||
42 | static inline void arch_local_irq_restore(unsigned long flags) | ||
43 | { | ||
44 | asm volatile("wsr %0, "__stringify(PS)" ; rsync" | ||
45 | :: "a" (flags) : "memory"); | ||
46 | } | ||
47 | |||
48 | static inline bool arch_irqs_disabled_flags(unsigned long flags) | ||
49 | { | ||
50 | return (flags & 0xf) != 0; | ||
51 | } | ||
52 | |||
53 | static inline bool arch_irqs_disabled(void) | ||
54 | { | ||
55 | return arch_irqs_disabled_flags(arch_local_save_flags()); | ||
56 | } | ||
57 | |||
58 | #endif /* _XTENSA_IRQFLAGS_H */ | ||
diff --git a/arch/xtensa/include/asm/mman.h b/arch/xtensa/include/asm/mman.h index fca4db425f6e..30789010733d 100644 --- a/arch/xtensa/include/asm/mman.h +++ b/arch/xtensa/include/asm/mman.h | |||
@@ -83,6 +83,9 @@ | |||
83 | #define MADV_MERGEABLE 12 /* KSM may merge identical pages */ | 83 | #define MADV_MERGEABLE 12 /* KSM may merge identical pages */ |
84 | #define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */ | 84 | #define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */ |
85 | 85 | ||
86 | #define MADV_HUGEPAGE 14 /* Worth backing with hugepages */ | ||
87 | #define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages */ | ||
88 | |||
86 | /* compatibility flags */ | 89 | /* compatibility flags */ |
87 | #define MAP_FILE 0 | 90 | #define MAP_FILE 0 |
88 | 91 | ||
diff --git a/arch/xtensa/include/asm/page.h b/arch/xtensa/include/asm/page.h index 161bb89e98c8..7a5591a71f85 100644 --- a/arch/xtensa/include/asm/page.h +++ b/arch/xtensa/include/asm/page.h | |||
@@ -171,10 +171,6 @@ extern void copy_user_page(void*, void*, unsigned long, struct page*); | |||
171 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) | 171 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) |
172 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) | 172 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) |
173 | 173 | ||
174 | #ifdef CONFIG_MMU | ||
175 | #define WANT_PAGE_VIRTUAL | ||
176 | #endif | ||
177 | |||
178 | #endif /* __ASSEMBLY__ */ | 174 | #endif /* __ASSEMBLY__ */ |
179 | 175 | ||
180 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 176 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |
diff --git a/arch/xtensa/include/asm/pgtable.h b/arch/xtensa/include/asm/pgtable.h index 76bf35554117..b03c043ce75b 100644 --- a/arch/xtensa/include/asm/pgtable.h +++ b/arch/xtensa/include/asm/pgtable.h | |||
@@ -324,10 +324,7 @@ ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep) | |||
324 | #define pte_offset_kernel(dir,addr) \ | 324 | #define pte_offset_kernel(dir,addr) \ |
325 | ((pte_t*) pmd_page_vaddr(*(dir)) + pte_index(addr)) | 325 | ((pte_t*) pmd_page_vaddr(*(dir)) + pte_index(addr)) |
326 | #define pte_offset_map(dir,addr) pte_offset_kernel((dir),(addr)) | 326 | #define pte_offset_map(dir,addr) pte_offset_kernel((dir),(addr)) |
327 | #define pte_offset_map_nested(dir,addr) pte_offset_kernel((dir),(addr)) | ||
328 | |||
329 | #define pte_unmap(pte) do { } while (0) | 327 | #define pte_unmap(pte) do { } while (0) |
330 | #define pte_unmap_nested(pte) do { } while (0) | ||
331 | 328 | ||
332 | 329 | ||
333 | /* | 330 | /* |
diff --git a/arch/xtensa/include/asm/rwsem.h b/arch/xtensa/include/asm/rwsem.h index e39edf5c86f2..249619e7e7f2 100644 --- a/arch/xtensa/include/asm/rwsem.h +++ b/arch/xtensa/include/asm/rwsem.h | |||
@@ -17,44 +17,12 @@ | |||
17 | #error "Please don't include <asm/rwsem.h> directly, use <linux/rwsem.h> instead." | 17 | #error "Please don't include <asm/rwsem.h> directly, use <linux/rwsem.h> instead." |
18 | #endif | 18 | #endif |
19 | 19 | ||
20 | #include <linux/list.h> | ||
21 | #include <linux/spinlock.h> | ||
22 | #include <asm/atomic.h> | ||
23 | #include <asm/system.h> | ||
24 | |||
25 | /* | ||
26 | * the semaphore definition | ||
27 | */ | ||
28 | struct rw_semaphore { | ||
29 | signed long count; | ||
30 | #define RWSEM_UNLOCKED_VALUE 0x00000000 | 20 | #define RWSEM_UNLOCKED_VALUE 0x00000000 |
31 | #define RWSEM_ACTIVE_BIAS 0x00000001 | 21 | #define RWSEM_ACTIVE_BIAS 0x00000001 |
32 | #define RWSEM_ACTIVE_MASK 0x0000ffff | 22 | #define RWSEM_ACTIVE_MASK 0x0000ffff |
33 | #define RWSEM_WAITING_BIAS (-0x00010000) | 23 | #define RWSEM_WAITING_BIAS (-0x00010000) |
34 | #define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS | 24 | #define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS |
35 | #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) | 25 | #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) |
36 | spinlock_t wait_lock; | ||
37 | struct list_head wait_list; | ||
38 | }; | ||
39 | |||
40 | #define __RWSEM_INITIALIZER(name) \ | ||
41 | { RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, \ | ||
42 | LIST_HEAD_INIT((name).wait_list) } | ||
43 | |||
44 | #define DECLARE_RWSEM(name) \ | ||
45 | struct rw_semaphore name = __RWSEM_INITIALIZER(name) | ||
46 | |||
47 | extern struct rw_semaphore *rwsem_down_read_failed(struct rw_semaphore *sem); | ||
48 | extern struct rw_semaphore *rwsem_down_write_failed(struct rw_semaphore *sem); | ||
49 | extern struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem); | ||
50 | extern struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem); | ||
51 | |||
52 | static inline void init_rwsem(struct rw_semaphore *sem) | ||
53 | { | ||
54 | sem->count = RWSEM_UNLOCKED_VALUE; | ||
55 | spin_lock_init(&sem->wait_lock); | ||
56 | INIT_LIST_HEAD(&sem->wait_list); | ||
57 | } | ||
58 | 26 | ||
59 | /* | 27 | /* |
60 | * lock for reading | 28 | * lock for reading |
@@ -160,9 +128,4 @@ static inline int rwsem_atomic_update(int delta, struct rw_semaphore *sem) | |||
160 | return atomic_add_return(delta, (atomic_t *)(&sem->count)); | 128 | return atomic_add_return(delta, (atomic_t *)(&sem->count)); |
161 | } | 129 | } |
162 | 130 | ||
163 | static inline int rwsem_is_locked(struct rw_semaphore *sem) | ||
164 | { | ||
165 | return (sem->count != 0); | ||
166 | } | ||
167 | |||
168 | #endif /* _XTENSA_RWSEM_H */ | 131 | #endif /* _XTENSA_RWSEM_H */ |
diff --git a/arch/xtensa/include/asm/system.h b/arch/xtensa/include/asm/system.h index 62b1e8f3c13c..1e7e09ab6cd7 100644 --- a/arch/xtensa/include/asm/system.h +++ b/arch/xtensa/include/asm/system.h | |||
@@ -12,41 +12,10 @@ | |||
12 | #define _XTENSA_SYSTEM_H | 12 | #define _XTENSA_SYSTEM_H |
13 | 13 | ||
14 | #include <linux/stringify.h> | 14 | #include <linux/stringify.h> |
15 | #include <linux/irqflags.h> | ||
15 | 16 | ||
16 | #include <asm/processor.h> | 17 | #include <asm/processor.h> |
17 | 18 | ||
18 | /* interrupt control */ | ||
19 | |||
20 | #define local_save_flags(x) \ | ||
21 | __asm__ __volatile__ ("rsr %0,"__stringify(PS) : "=a" (x)); | ||
22 | #define local_irq_restore(x) do { \ | ||
23 | __asm__ __volatile__ ("wsr %0, "__stringify(PS)" ; rsync" \ | ||
24 | :: "a" (x) : "memory"); } while(0); | ||
25 | #define local_irq_save(x) do { \ | ||
26 | __asm__ __volatile__ ("rsil %0, "__stringify(LOCKLEVEL) \ | ||
27 | : "=a" (x) :: "memory");} while(0); | ||
28 | |||
29 | static inline void local_irq_disable(void) | ||
30 | { | ||
31 | unsigned long flags; | ||
32 | __asm__ __volatile__ ("rsil %0, "__stringify(LOCKLEVEL) | ||
33 | : "=a" (flags) :: "memory"); | ||
34 | } | ||
35 | static inline void local_irq_enable(void) | ||
36 | { | ||
37 | unsigned long flags; | ||
38 | __asm__ __volatile__ ("rsil %0, 0" : "=a" (flags) :: "memory"); | ||
39 | |||
40 | } | ||
41 | |||
42 | static inline int irqs_disabled(void) | ||
43 | { | ||
44 | unsigned long flags; | ||
45 | local_save_flags(flags); | ||
46 | return flags & 0xf; | ||
47 | } | ||
48 | |||
49 | |||
50 | #define smp_read_barrier_depends() do { } while(0) | 19 | #define smp_read_barrier_depends() do { } while(0) |
51 | #define read_barrier_depends() do { } while(0) | 20 | #define read_barrier_depends() do { } while(0) |
52 | 21 | ||
diff --git a/arch/xtensa/include/asm/types.h b/arch/xtensa/include/asm/types.h index c89569a8da0c..b1c981e39b52 100644 --- a/arch/xtensa/include/asm/types.h +++ b/arch/xtensa/include/asm/types.h | |||
@@ -32,10 +32,6 @@ typedef unsigned short umode_t; | |||
32 | 32 | ||
33 | #define BITS_PER_LONG 32 | 33 | #define BITS_PER_LONG 32 |
34 | 34 | ||
35 | /* Dma addresses are 32-bits wide. */ | ||
36 | |||
37 | typedef u32 dma_addr_t; | ||
38 | |||
39 | #endif /* __KERNEL__ */ | 35 | #endif /* __KERNEL__ */ |
40 | #endif | 36 | #endif |
41 | 37 | ||
diff --git a/arch/xtensa/include/asm/uaccess.h b/arch/xtensa/include/asm/uaccess.h index b8528426ab1f..5b0c18c1cce1 100644 --- a/arch/xtensa/include/asm/uaccess.h +++ b/arch/xtensa/include/asm/uaccess.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * User space memory access functions | 4 | * User space memory access functions |
5 | * | 5 | * |
6 | * These routines provide basic accessing functions to the user memory | 6 | * These routines provide basic accessing functions to the user memory |
7 | * space for the kernel. This header file provides fuctions such as: | 7 | * space for the kernel. This header file provides functions such as: |
8 | * | 8 | * |
9 | * This file is subject to the terms and conditions of the GNU General Public | 9 | * This file is subject to the terms and conditions of the GNU General Public |
10 | * License. See the file "COPYING" in the main directory of this archive | 10 | * License. See the file "COPYING" in the main directory of this archive |
diff --git a/arch/xtensa/include/asm/unistd.h b/arch/xtensa/include/asm/unistd.h index 528042c2951e..a6f934f37f1a 100644 --- a/arch/xtensa/include/asm/unistd.h +++ b/arch/xtensa/include/asm/unistd.h | |||
@@ -683,8 +683,10 @@ __SYSCALL(305, sys_ni_syscall, 0) | |||
683 | __SYSCALL(306, sys_eventfd, 1) | 683 | __SYSCALL(306, sys_eventfd, 1) |
684 | #define __NR_recvmmsg 307 | 684 | #define __NR_recvmmsg 307 |
685 | __SYSCALL(307, sys_recvmmsg, 5) | 685 | __SYSCALL(307, sys_recvmmsg, 5) |
686 | #define __NR_setns 308 | ||
687 | __SYSCALL(308, sys_setns, 2) | ||
686 | 688 | ||
687 | #define __NR_syscall_count 308 | 689 | #define __NR_syscall_count 309 |
688 | 690 | ||
689 | /* | 691 | /* |
690 | * sysxtensa syscall handler | 692 | * sysxtensa syscall handler |