diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-26 11:48:49 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-26 11:48:49 -0400 |
commit | c3cc99ff5d24e2eeaf7ec2032e720681916990e3 (patch) | |
tree | c3e74171bbbd2adde9d60b9db1c440415c8d2831 /include/asm-x86 | |
parent | 38ffbe66d59051fd9cfcfc8545f164700e2fa3bc (diff) | |
parent | 024e8ac04453b3525448c31ef39848cf675ba6db (diff) |
Merge branch 'linus' into x86/xen
Diffstat (limited to 'include/asm-x86')
-rw-r--r-- | include/asm-x86/Kbuild | 2 | ||||
-rw-r--r-- | include/asm-x86/gpio.h | 56 | ||||
-rw-r--r-- | include/asm-x86/hugetlb.h | 10 | ||||
-rw-r--r-- | include/asm-x86/i387.h | 54 | ||||
-rw-r--r-- | include/asm-x86/ide.h | 65 | ||||
-rw-r--r-- | include/asm-x86/io_32.h | 2 | ||||
-rw-r--r-- | include/asm-x86/io_64.h | 2 | ||||
-rw-r--r-- | include/asm-x86/page.h | 3 | ||||
-rw-r--r-- | include/asm-x86/processor-flags.h | 2 | ||||
-rw-r--r-- | include/asm-x86/semaphore.h | 1 | ||||
-rw-r--r-- | include/asm-x86/thread_info.h | 2 | ||||
-rw-r--r-- | include/asm-x86/unistd_32.h | 6 | ||||
-rw-r--r-- | include/asm-x86/unistd_64.h | 14 |
13 files changed, 91 insertions, 128 deletions
diff --git a/include/asm-x86/Kbuild b/include/asm-x86/Kbuild index 1e3554596f72..4a8e80cdcfa5 100644 --- a/include/asm-x86/Kbuild +++ b/include/asm-x86/Kbuild | |||
@@ -3,7 +3,6 @@ include include/asm-generic/Kbuild.asm | |||
3 | header-y += boot.h | 3 | header-y += boot.h |
4 | header-y += bootparam.h | 4 | header-y += bootparam.h |
5 | header-y += debugreg.h | 5 | header-y += debugreg.h |
6 | header-y += kvm.h | ||
7 | header-y += ldt.h | 6 | header-y += ldt.h |
8 | header-y += msr-index.h | 7 | header-y += msr-index.h |
9 | header-y += prctl.h | 8 | header-y += prctl.h |
@@ -19,7 +18,6 @@ unifdef-y += msr.h | |||
19 | unifdef-y += mtrr.h | 18 | unifdef-y += mtrr.h |
20 | unifdef-y += posix_types_32.h | 19 | unifdef-y += posix_types_32.h |
21 | unifdef-y += posix_types_64.h | 20 | unifdef-y += posix_types_64.h |
22 | unifdef-y += ptrace.h | ||
23 | unifdef-y += unistd_32.h | 21 | unifdef-y += unistd_32.h |
24 | unifdef-y += unistd_64.h | 22 | unifdef-y += unistd_64.h |
25 | unifdef-y += vm86.h | 23 | unifdef-y += vm86.h |
diff --git a/include/asm-x86/gpio.h b/include/asm-x86/gpio.h index ff87fca0caf9..116e9147fe66 100644 --- a/include/asm-x86/gpio.h +++ b/include/asm-x86/gpio.h | |||
@@ -1,6 +1,62 @@ | |||
1 | /* | ||
2 | * Generic GPIO API implementation for x86. | ||
3 | * | ||
4 | * Derived from the generic GPIO API for powerpc: | ||
5 | * | ||
6 | * Copyright (c) 2007-2008 MontaVista Software, Inc. | ||
7 | * | ||
8 | * Author: Anton Vorontsov <avorontsov@ru.mvista.com> | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | */ | ||
15 | |||
1 | #ifndef _ASM_I386_GPIO_H | 16 | #ifndef _ASM_I386_GPIO_H |
2 | #define _ASM_I386_GPIO_H | 17 | #define _ASM_I386_GPIO_H |
3 | 18 | ||
19 | #ifdef CONFIG_X86_RDC321X | ||
4 | #include <gpio.h> | 20 | #include <gpio.h> |
21 | #else /* CONFIG_X86_RDC321X */ | ||
22 | |||
23 | #include <asm-generic/gpio.h> | ||
24 | |||
25 | #ifdef CONFIG_GPIOLIB | ||
26 | |||
27 | /* | ||
28 | * Just call gpiolib. | ||
29 | */ | ||
30 | static inline int gpio_get_value(unsigned int gpio) | ||
31 | { | ||
32 | return __gpio_get_value(gpio); | ||
33 | } | ||
34 | |||
35 | static inline void gpio_set_value(unsigned int gpio, int value) | ||
36 | { | ||
37 | __gpio_set_value(gpio, value); | ||
38 | } | ||
39 | |||
40 | static inline int gpio_cansleep(unsigned int gpio) | ||
41 | { | ||
42 | return __gpio_cansleep(gpio); | ||
43 | } | ||
44 | |||
45 | /* | ||
46 | * Not implemented, yet. | ||
47 | */ | ||
48 | static inline int gpio_to_irq(unsigned int gpio) | ||
49 | { | ||
50 | return -ENOSYS; | ||
51 | } | ||
52 | |||
53 | static inline int irq_to_gpio(unsigned int irq) | ||
54 | { | ||
55 | return -EINVAL; | ||
56 | } | ||
57 | |||
58 | #endif /* CONFIG_GPIOLIB */ | ||
59 | |||
60 | #endif /* CONFIG_X86_RDC321X */ | ||
5 | 61 | ||
6 | #endif /* _ASM_I386_GPIO_H */ | 62 | #endif /* _ASM_I386_GPIO_H */ |
diff --git a/include/asm-x86/hugetlb.h b/include/asm-x86/hugetlb.h index 14171a4924f6..439a9acc132d 100644 --- a/include/asm-x86/hugetlb.h +++ b/include/asm-x86/hugetlb.h | |||
@@ -14,11 +14,13 @@ static inline int is_hugepage_only_range(struct mm_struct *mm, | |||
14 | * If the arch doesn't supply something else, assume that hugepage | 14 | * If the arch doesn't supply something else, assume that hugepage |
15 | * size aligned regions are ok without further preparation. | 15 | * size aligned regions are ok without further preparation. |
16 | */ | 16 | */ |
17 | static inline int prepare_hugepage_range(unsigned long addr, unsigned long len) | 17 | static inline int prepare_hugepage_range(struct file *file, |
18 | unsigned long addr, unsigned long len) | ||
18 | { | 19 | { |
19 | if (len & ~HPAGE_MASK) | 20 | struct hstate *h = hstate_file(file); |
21 | if (len & ~huge_page_mask(h)) | ||
20 | return -EINVAL; | 22 | return -EINVAL; |
21 | if (addr & ~HPAGE_MASK) | 23 | if (addr & ~huge_page_mask(h)) |
22 | return -EINVAL; | 24 | return -EINVAL; |
23 | return 0; | 25 | return 0; |
24 | } | 26 | } |
@@ -26,7 +28,7 @@ static inline int prepare_hugepage_range(unsigned long addr, unsigned long len) | |||
26 | static inline void hugetlb_prefault_arch_hook(struct mm_struct *mm) { | 28 | static inline void hugetlb_prefault_arch_hook(struct mm_struct *mm) { |
27 | } | 29 | } |
28 | 30 | ||
29 | static inline void hugetlb_free_pgd_range(struct mmu_gather **tlb, | 31 | static inline void hugetlb_free_pgd_range(struct mmu_gather *tlb, |
30 | unsigned long addr, unsigned long end, | 32 | unsigned long addr, unsigned long end, |
31 | unsigned long floor, | 33 | unsigned long floor, |
32 | unsigned long ceiling) | 34 | unsigned long ceiling) |
diff --git a/include/asm-x86/i387.h b/include/asm-x86/i387.h index 37672f79dcc8..96fa8449ff11 100644 --- a/include/asm-x86/i387.h +++ b/include/asm-x86/i387.h | |||
@@ -137,60 +137,6 @@ static inline void __save_init_fpu(struct task_struct *tsk) | |||
137 | task_thread_info(tsk)->status &= ~TS_USEDFPU; | 137 | task_thread_info(tsk)->status &= ~TS_USEDFPU; |
138 | } | 138 | } |
139 | 139 | ||
140 | /* | ||
141 | * Signal frame handlers. | ||
142 | */ | ||
143 | |||
144 | static inline int save_i387(struct _fpstate __user *buf) | ||
145 | { | ||
146 | struct task_struct *tsk = current; | ||
147 | int err = 0; | ||
148 | |||
149 | BUILD_BUG_ON(sizeof(struct user_i387_struct) != | ||
150 | sizeof(tsk->thread.xstate->fxsave)); | ||
151 | |||
152 | if ((unsigned long)buf % 16) | ||
153 | printk("save_i387: bad fpstate %p\n", buf); | ||
154 | |||
155 | if (!used_math()) | ||
156 | return 0; | ||
157 | clear_used_math(); /* trigger finit */ | ||
158 | if (task_thread_info(tsk)->status & TS_USEDFPU) { | ||
159 | err = save_i387_checking((struct i387_fxsave_struct __user *) | ||
160 | buf); | ||
161 | if (err) | ||
162 | return err; | ||
163 | task_thread_info(tsk)->status &= ~TS_USEDFPU; | ||
164 | stts(); | ||
165 | } else { | ||
166 | if (__copy_to_user(buf, &tsk->thread.xstate->fxsave, | ||
167 | sizeof(struct i387_fxsave_struct))) | ||
168 | return -1; | ||
169 | } | ||
170 | return 1; | ||
171 | } | ||
172 | |||
173 | /* | ||
174 | * This restores directly out of user space. Exceptions are handled. | ||
175 | */ | ||
176 | static inline int restore_i387(struct _fpstate __user *buf) | ||
177 | { | ||
178 | struct task_struct *tsk = current; | ||
179 | int err; | ||
180 | |||
181 | if (!used_math()) { | ||
182 | err = init_fpu(tsk); | ||
183 | if (err) | ||
184 | return err; | ||
185 | } | ||
186 | |||
187 | if (!(task_thread_info(current)->status & TS_USEDFPU)) { | ||
188 | clts(); | ||
189 | task_thread_info(current)->status |= TS_USEDFPU; | ||
190 | } | ||
191 | return restore_fpu_checking((__force struct i387_fxsave_struct *)buf); | ||
192 | } | ||
193 | |||
194 | #else /* CONFIG_X86_32 */ | 140 | #else /* CONFIG_X86_32 */ |
195 | 141 | ||
196 | extern void finit(void); | 142 | extern void finit(void); |
diff --git a/include/asm-x86/ide.h b/include/asm-x86/ide.h deleted file mode 100644 index cf9c98e5bdb5..000000000000 --- a/include/asm-x86/ide.h +++ /dev/null | |||
@@ -1,65 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 1994-1996 Linus Torvalds & authors | ||
3 | */ | ||
4 | |||
5 | /* | ||
6 | * This file contains the i386 architecture specific IDE code. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASMi386_IDE_H | ||
10 | #define __ASMi386_IDE_H | ||
11 | |||
12 | #ifdef __KERNEL__ | ||
13 | |||
14 | |||
15 | #ifndef MAX_HWIFS | ||
16 | # ifdef CONFIG_BLK_DEV_IDEPCI | ||
17 | #define MAX_HWIFS 10 | ||
18 | # else | ||
19 | #define MAX_HWIFS 6 | ||
20 | # endif | ||
21 | #endif | ||
22 | |||
23 | static __inline__ int ide_default_irq(unsigned long base) | ||
24 | { | ||
25 | switch (base) { | ||
26 | case 0x1f0: return 14; | ||
27 | case 0x170: return 15; | ||
28 | case 0x1e8: return 11; | ||
29 | case 0x168: return 10; | ||
30 | case 0x1e0: return 8; | ||
31 | case 0x160: return 12; | ||
32 | default: | ||
33 | return 0; | ||
34 | } | ||
35 | } | ||
36 | |||
37 | static __inline__ unsigned long ide_default_io_base(int index) | ||
38 | { | ||
39 | /* | ||
40 | * If PCI is present then it is not safe to poke around | ||
41 | * the other legacy IDE ports. Only 0x1f0 and 0x170 are | ||
42 | * defined compatibility mode ports for PCI. A user can | ||
43 | * override this using ide= but we must default safe. | ||
44 | */ | ||
45 | if (no_pci_devices()) { | ||
46 | switch(index) { | ||
47 | case 2: return 0x1e8; | ||
48 | case 3: return 0x168; | ||
49 | case 4: return 0x1e0; | ||
50 | case 5: return 0x160; | ||
51 | } | ||
52 | } | ||
53 | switch (index) { | ||
54 | case 0: return 0x1f0; | ||
55 | case 1: return 0x170; | ||
56 | default: | ||
57 | return 0; | ||
58 | } | ||
59 | } | ||
60 | |||
61 | #include <asm-generic/ide_iops.h> | ||
62 | |||
63 | #endif /* __KERNEL__ */ | ||
64 | |||
65 | #endif /* __ASMi386_IDE_H */ | ||
diff --git a/include/asm-x86/io_32.h b/include/asm-x86/io_32.h index 4df44ed54077..e876d89ac156 100644 --- a/include/asm-x86/io_32.h +++ b/include/asm-x86/io_32.h | |||
@@ -110,6 +110,8 @@ static inline void *phys_to_virt(unsigned long address) | |||
110 | */ | 110 | */ |
111 | extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size); | 111 | extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size); |
112 | extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size); | 112 | extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size); |
113 | extern void __iomem *ioremap_prot(resource_size_t offset, unsigned long size, | ||
114 | unsigned long prot_val); | ||
113 | 115 | ||
114 | /* | 116 | /* |
115 | * The default ioremap() behavior is non-cached: | 117 | * The default ioremap() behavior is non-cached: |
diff --git a/include/asm-x86/io_64.h b/include/asm-x86/io_64.h index ddd8058a5026..22995c5c5adc 100644 --- a/include/asm-x86/io_64.h +++ b/include/asm-x86/io_64.h | |||
@@ -175,6 +175,8 @@ extern void early_iounmap(void *addr, unsigned long size); | |||
175 | */ | 175 | */ |
176 | extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size); | 176 | extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size); |
177 | extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size); | 177 | extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size); |
178 | extern void __iomem *ioremap_prot(resource_size_t offset, unsigned long size, | ||
179 | unsigned long prot_val); | ||
178 | 180 | ||
179 | /* | 181 | /* |
180 | * The default ioremap() behavior is non-cached: | 182 | * The default ioremap() behavior is non-cached: |
diff --git a/include/asm-x86/page.h b/include/asm-x86/page.h index 6c846228948d..49982110e4d9 100644 --- a/include/asm-x86/page.h +++ b/include/asm-x86/page.h | |||
@@ -32,8 +32,7 @@ | |||
32 | #define HPAGE_MASK (~(HPAGE_SIZE - 1)) | 32 | #define HPAGE_MASK (~(HPAGE_SIZE - 1)) |
33 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) | 33 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) |
34 | 34 | ||
35 | /* to align the pointer to the (next) page boundary */ | 35 | #define HUGE_MAX_HSTATE 2 |
36 | #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) | ||
37 | 36 | ||
38 | #ifndef __ASSEMBLY__ | 37 | #ifndef __ASSEMBLY__ |
39 | #include <linux/types.h> | 38 | #include <linux/types.h> |
diff --git a/include/asm-x86/processor-flags.h b/include/asm-x86/processor-flags.h index 092b39b3a7e6..eff2ecd7fff0 100644 --- a/include/asm-x86/processor-flags.h +++ b/include/asm-x86/processor-flags.h | |||
@@ -88,10 +88,12 @@ | |||
88 | #define CX86_ARR_BASE 0xc4 | 88 | #define CX86_ARR_BASE 0xc4 |
89 | #define CX86_RCR_BASE 0xdc | 89 | #define CX86_RCR_BASE 0xdc |
90 | 90 | ||
91 | #ifdef __KERNEL__ | ||
91 | #ifdef CONFIG_VM86 | 92 | #ifdef CONFIG_VM86 |
92 | #define X86_VM_MASK X86_EFLAGS_VM | 93 | #define X86_VM_MASK X86_EFLAGS_VM |
93 | #else | 94 | #else |
94 | #define X86_VM_MASK 0 /* No VM86 support */ | 95 | #define X86_VM_MASK 0 /* No VM86 support */ |
95 | #endif | 96 | #endif |
97 | #endif | ||
96 | 98 | ||
97 | #endif /* __ASM_I386_PROCESSOR_FLAGS_H */ | 99 | #endif /* __ASM_I386_PROCESSOR_FLAGS_H */ |
diff --git a/include/asm-x86/semaphore.h b/include/asm-x86/semaphore.h deleted file mode 100644 index d9b2034ed1d2..000000000000 --- a/include/asm-x86/semaphore.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <linux/semaphore.h> | ||
diff --git a/include/asm-x86/thread_info.h b/include/asm-x86/thread_info.h index 3f2de1050988..da0a675adf94 100644 --- a/include/asm-x86/thread_info.h +++ b/include/asm-x86/thread_info.h | |||
@@ -152,6 +152,8 @@ struct thread_info { | |||
152 | #define THREAD_FLAGS GFP_KERNEL | 152 | #define THREAD_FLAGS GFP_KERNEL |
153 | #endif | 153 | #endif |
154 | 154 | ||
155 | #define __HAVE_ARCH_THREAD_INFO_ALLOCATOR | ||
156 | |||
155 | #define alloc_thread_info(tsk) \ | 157 | #define alloc_thread_info(tsk) \ |
156 | ((struct thread_info *)__get_free_pages(THREAD_FLAGS, THREAD_ORDER)) | 158 | ((struct thread_info *)__get_free_pages(THREAD_FLAGS, THREAD_ORDER)) |
157 | 159 | ||
diff --git a/include/asm-x86/unistd_32.h b/include/asm-x86/unistd_32.h index 8317d94771d3..d7394673b772 100644 --- a/include/asm-x86/unistd_32.h +++ b/include/asm-x86/unistd_32.h | |||
@@ -332,6 +332,12 @@ | |||
332 | #define __NR_fallocate 324 | 332 | #define __NR_fallocate 324 |
333 | #define __NR_timerfd_settime 325 | 333 | #define __NR_timerfd_settime 325 |
334 | #define __NR_timerfd_gettime 326 | 334 | #define __NR_timerfd_gettime 326 |
335 | #define __NR_signalfd4 327 | ||
336 | #define __NR_eventfd2 328 | ||
337 | #define __NR_epoll_create1 329 | ||
338 | #define __NR_dup3 330 | ||
339 | #define __NR_pipe2 331 | ||
340 | #define __NR_inotify_init1 332 | ||
335 | 341 | ||
336 | #ifdef __KERNEL__ | 342 | #ifdef __KERNEL__ |
337 | 343 | ||
diff --git a/include/asm-x86/unistd_64.h b/include/asm-x86/unistd_64.h index 9c1a4a3470d9..3a341d791792 100644 --- a/include/asm-x86/unistd_64.h +++ b/include/asm-x86/unistd_64.h | |||
@@ -639,6 +639,20 @@ __SYSCALL(__NR_fallocate, sys_fallocate) | |||
639 | __SYSCALL(__NR_timerfd_settime, sys_timerfd_settime) | 639 | __SYSCALL(__NR_timerfd_settime, sys_timerfd_settime) |
640 | #define __NR_timerfd_gettime 287 | 640 | #define __NR_timerfd_gettime 287 |
641 | __SYSCALL(__NR_timerfd_gettime, sys_timerfd_gettime) | 641 | __SYSCALL(__NR_timerfd_gettime, sys_timerfd_gettime) |
642 | #define __NR_paccept 288 | ||
643 | __SYSCALL(__NR_paccept, sys_paccept) | ||
644 | #define __NR_signalfd4 289 | ||
645 | __SYSCALL(__NR_signalfd4, sys_signalfd4) | ||
646 | #define __NR_eventfd2 290 | ||
647 | __SYSCALL(__NR_eventfd2, sys_eventfd2) | ||
648 | #define __NR_epoll_create1 291 | ||
649 | __SYSCALL(__NR_epoll_create1, sys_epoll_create1) | ||
650 | #define __NR_dup3 292 | ||
651 | __SYSCALL(__NR_dup3, sys_dup3) | ||
652 | #define __NR_pipe2 293 | ||
653 | __SYSCALL(__NR_pipe2, sys_pipe2) | ||
654 | #define __NR_inotify_init1 294 | ||
655 | __SYSCALL(__NR_inotify_init1, sys_inotify_init1) | ||
642 | 656 | ||
643 | 657 | ||
644 | #ifndef __NO_STUBS | 658 | #ifndef __NO_STUBS |