diff options
author | Paul Mackerras <paulus@samba.org> | 2006-02-23 22:05:47 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-02-23 22:05:47 -0500 |
commit | a00428f5b149e36b8225b2a0812742a6dfb07b8c (patch) | |
tree | a78869cd67cf78a0eb091fb0ea5d397734bd6738 /include | |
parent | 774fee58c465ea1c7e9775e347ec307bcf2deeb3 (diff) | |
parent | fb5c594c2acc441f0d2d8f457484a0e0e9285db3 (diff) |
Merge ../powerpc-merge
Diffstat (limited to 'include')
106 files changed, 582 insertions, 741 deletions
diff --git a/include/asm-alpha/mman.h b/include/asm-alpha/mman.h index f6439532a262..5f24c755f577 100644 --- a/include/asm-alpha/mman.h +++ b/include/asm-alpha/mman.h | |||
@@ -42,7 +42,11 @@ | |||
42 | #define MADV_WILLNEED 3 /* will need these pages */ | 42 | #define MADV_WILLNEED 3 /* will need these pages */ |
43 | #define MADV_SPACEAVAIL 5 /* ensure resources are available */ | 43 | #define MADV_SPACEAVAIL 5 /* ensure resources are available */ |
44 | #define MADV_DONTNEED 6 /* don't need these pages */ | 44 | #define MADV_DONTNEED 6 /* don't need these pages */ |
45 | #define MADV_REMOVE 7 /* remove these pages & resources */ | 45 | |
46 | /* common/generic parameters */ | ||
47 | #define MADV_REMOVE 9 /* remove these pages & resources */ | ||
48 | #define MADV_DONTFORK 10 /* don't inherit across fork */ | ||
49 | #define MADV_DOFORK 11 /* do inherit across fork */ | ||
46 | 50 | ||
47 | /* compatibility flags */ | 51 | /* compatibility flags */ |
48 | #define MAP_ANON MAP_ANONYMOUS | 52 | #define MAP_ANON MAP_ANONYMOUS |
diff --git a/include/asm-arm/arch-at91rm9200/gpio.h b/include/asm-arm/arch-at91rm9200/gpio.h index 0f0a61e2f129..6176ab2dc417 100644 --- a/include/asm-arm/arch-at91rm9200/gpio.h +++ b/include/asm-arm/arch-at91rm9200/gpio.h | |||
@@ -183,6 +183,7 @@ extern int at91_set_B_periph(unsigned pin, int use_pullup); | |||
183 | extern int at91_set_gpio_input(unsigned pin, int use_pullup); | 183 | extern int at91_set_gpio_input(unsigned pin, int use_pullup); |
184 | extern int at91_set_gpio_output(unsigned pin, int value); | 184 | extern int at91_set_gpio_output(unsigned pin, int value); |
185 | extern int at91_set_deglitch(unsigned pin, int is_on); | 185 | extern int at91_set_deglitch(unsigned pin, int is_on); |
186 | extern int at91_set_multi_drive(unsigned pin, int is_on); | ||
186 | 187 | ||
187 | /* callable at any time */ | 188 | /* callable at any time */ |
188 | extern int at91_set_gpio_value(unsigned pin, int value); | 189 | extern int at91_set_gpio_value(unsigned pin, int value); |
diff --git a/include/asm-arm/arch-ixp4xx/nas100d.h b/include/asm-arm/arch-ixp4xx/nas100d.h index 51ac0180427c..84467a5190d0 100644 --- a/include/asm-arm/arch-ixp4xx/nas100d.h +++ b/include/asm-arm/arch-ixp4xx/nas100d.h | |||
@@ -19,8 +19,8 @@ | |||
19 | #error "Do not include this directly, instead #include <asm/hardware.h>" | 19 | #error "Do not include this directly, instead #include <asm/hardware.h>" |
20 | #endif | 20 | #endif |
21 | 21 | ||
22 | #define NAS100D_SDA_PIN 6 | 22 | #define NAS100D_SDA_PIN 5 |
23 | #define NAS100D_SCL_PIN 5 | 23 | #define NAS100D_SCL_PIN 6 |
24 | 24 | ||
25 | /* | 25 | /* |
26 | * NAS100D PCI IRQs | 26 | * NAS100D PCI IRQs |
diff --git a/include/asm-arm/arch-s3c2410/h1940-latch.h b/include/asm-arm/arch-s3c2410/h1940-latch.h new file mode 100644 index 000000000000..c5802411f43d --- /dev/null +++ b/include/asm-arm/arch-s3c2410/h1940-latch.h | |||
@@ -0,0 +1,64 @@ | |||
1 | /* linux/include/asm-arm/arch-s3c2410/h1940-latch.h | ||
2 | * | ||
3 | * (c) 2005 Simtec Electronics | ||
4 | * http://armlinux.simtec.co.uk/ | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * | ||
7 | * iPAQ H1940 series - latch definitions | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARCH_H1940_LATCH_H | ||
15 | #define __ASM_ARCH_H1940_LATCH_H | ||
16 | |||
17 | |||
18 | #ifndef __ASSEMBLY__ | ||
19 | #define H1940_LATCH ((void __iomem *)0xF8000000) | ||
20 | #else | ||
21 | #define H1940_LATCH 0xF8000000 | ||
22 | #endif | ||
23 | |||
24 | #define H1940_PA_LATCH (S3C2410_CS2) | ||
25 | |||
26 | /* SD layer latch */ | ||
27 | |||
28 | #define H1940_LATCH_SDQ1 (1<<16) | ||
29 | #define H1940_LATCH_LCD_P1 (1<<17) | ||
30 | #define H1940_LATCH_LCD_P2 (1<<18) | ||
31 | #define H1940_LATCH_LCD_P3 (1<<19) | ||
32 | #define H1940_LATCH_MAX1698_nSHUTDOWN (1<<20) /* LCD backlight */ | ||
33 | #define H1940_LATCH_LED_RED (1<<21) | ||
34 | #define H1940_LATCH_SDQ7 (1<<22) | ||
35 | #define H1940_LATCH_USB_DP (1<<23) | ||
36 | |||
37 | /* CPU layer latch */ | ||
38 | |||
39 | #define H1940_LATCH_UDA_POWER (1<<24) | ||
40 | #define H1940_LATCH_AUDIO_POWER (1<<25) | ||
41 | #define H1940_LATCH_SM803_ENABLE (1<<26) | ||
42 | #define H1940_LATCH_LCD_P4 (1<<27) | ||
43 | #define H1940_LATCH_CPUQ5 (1<<28) /* untraced */ | ||
44 | #define H1940_LATCH_BLUETOOTH_POWER (1<<29) /* active high */ | ||
45 | #define H1940_LATCH_LED_GREEN (1<<30) | ||
46 | #define H1940_LATCH_LED_FLASH (1<<31) | ||
47 | |||
48 | /* default settings */ | ||
49 | |||
50 | #define H1940_LATCH_DEFAULT \ | ||
51 | H1940_LATCH_LCD_P4 | \ | ||
52 | H1940_LATCH_SM803_ENABLE | \ | ||
53 | H1940_LATCH_SDQ1 | \ | ||
54 | H1940_LATCH_LCD_P1 | \ | ||
55 | H1940_LATCH_LCD_P2 | \ | ||
56 | H1940_LATCH_LCD_P3 | \ | ||
57 | H1940_LATCH_MAX1698_nSHUTDOWN | \ | ||
58 | H1940_LATCH_CPUQ5 | ||
59 | |||
60 | /* control functions */ | ||
61 | |||
62 | extern void h1940_latch_control(unsigned int clear, unsigned int set); | ||
63 | |||
64 | #endif /* __ASM_ARCH_H1940_LATCH_H */ | ||
diff --git a/include/asm-arm/mman.h b/include/asm-arm/mman.h index f0bebca2ac21..54570d2e95b7 100644 --- a/include/asm-arm/mman.h +++ b/include/asm-arm/mman.h | |||
@@ -1,19 +1,7 @@ | |||
1 | #ifndef __ARM_MMAN_H__ | 1 | #ifndef __ARM_MMAN_H__ |
2 | #define __ARM_MMAN_H__ | 2 | #define __ARM_MMAN_H__ |
3 | 3 | ||
4 | #define PROT_READ 0x1 /* page can be read */ | 4 | #include <asm-generic/mman.h> |
5 | #define PROT_WRITE 0x2 /* page can be written */ | ||
6 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
7 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
8 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
9 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
10 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
11 | |||
12 | #define MAP_SHARED 0x01 /* Share changes */ | ||
13 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
14 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
15 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
16 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
17 | 5 | ||
18 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
19 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -23,22 +11,7 @@ | |||
23 | #define MAP_POPULATE 0x8000 /* populate (prefault) page tables */ | 11 | #define MAP_POPULATE 0x8000 /* populate (prefault) page tables */ |
24 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 12 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
25 | 13 | ||
26 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
27 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
28 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
29 | |||
30 | #define MCL_CURRENT 1 /* lock all current mappings */ | 14 | #define MCL_CURRENT 1 /* lock all current mappings */ |
31 | #define MCL_FUTURE 2 /* lock all future mappings */ | 15 | #define MCL_FUTURE 2 /* lock all future mappings */ |
32 | 16 | ||
33 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
34 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
35 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
36 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
37 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
38 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
39 | |||
40 | /* compatibility flags */ | ||
41 | #define MAP_ANON MAP_ANONYMOUS | ||
42 | #define MAP_FILE 0 | ||
43 | |||
44 | #endif /* __ARM_MMAN_H__ */ | 17 | #endif /* __ARM_MMAN_H__ */ |
diff --git a/include/asm-arm/smp.h b/include/asm-arm/smp.h index 5a72e50ca9fc..fe45f7f61223 100644 --- a/include/asm-arm/smp.h +++ b/include/asm-arm/smp.h | |||
@@ -42,6 +42,11 @@ extern void show_ipi_list(struct seq_file *p); | |||
42 | asmlinkage void do_IPI(struct pt_regs *regs); | 42 | asmlinkage void do_IPI(struct pt_regs *regs); |
43 | 43 | ||
44 | /* | 44 | /* |
45 | * Setup the SMP cpu_possible_map | ||
46 | */ | ||
47 | extern void smp_init_cpus(void); | ||
48 | |||
49 | /* | ||
45 | * Move global data into per-processor storage. | 50 | * Move global data into per-processor storage. |
46 | */ | 51 | */ |
47 | extern void smp_store_cpu_info(unsigned int cpuid); | 52 | extern void smp_store_cpu_info(unsigned int cpuid); |
diff --git a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h index 77430d6178ae..8f331bbd39a8 100644 --- a/include/asm-arm/unistd.h +++ b/include/asm-arm/unistd.h | |||
@@ -309,7 +309,7 @@ | |||
309 | #define __NR_mq_getsetattr (__NR_SYSCALL_BASE+279) | 309 | #define __NR_mq_getsetattr (__NR_SYSCALL_BASE+279) |
310 | #define __NR_waitid (__NR_SYSCALL_BASE+280) | 310 | #define __NR_waitid (__NR_SYSCALL_BASE+280) |
311 | 311 | ||
312 | #if 0 /* reserve these for un-muxing socketcall */ | 312 | #if defined(__ARM_EABI__) /* reserve these for un-muxing socketcall */ |
313 | #define __NR_socket (__NR_SYSCALL_BASE+281) | 313 | #define __NR_socket (__NR_SYSCALL_BASE+281) |
314 | #define __NR_bind (__NR_SYSCALL_BASE+282) | 314 | #define __NR_bind (__NR_SYSCALL_BASE+282) |
315 | #define __NR_connect (__NR_SYSCALL_BASE+283) | 315 | #define __NR_connect (__NR_SYSCALL_BASE+283) |
@@ -329,7 +329,7 @@ | |||
329 | #define __NR_recvmsg (__NR_SYSCALL_BASE+297) | 329 | #define __NR_recvmsg (__NR_SYSCALL_BASE+297) |
330 | #endif | 330 | #endif |
331 | 331 | ||
332 | #if 0 /* reserve these for un-muxing ipc */ | 332 | #if defined(__ARM_EABI__) /* reserve these for un-muxing ipc */ |
333 | #define __NR_semop (__NR_SYSCALL_BASE+298) | 333 | #define __NR_semop (__NR_SYSCALL_BASE+298) |
334 | #define __NR_semget (__NR_SYSCALL_BASE+299) | 334 | #define __NR_semget (__NR_SYSCALL_BASE+299) |
335 | #define __NR_semctl (__NR_SYSCALL_BASE+300) | 335 | #define __NR_semctl (__NR_SYSCALL_BASE+300) |
@@ -347,7 +347,7 @@ | |||
347 | #define __NR_request_key (__NR_SYSCALL_BASE+310) | 347 | #define __NR_request_key (__NR_SYSCALL_BASE+310) |
348 | #define __NR_keyctl (__NR_SYSCALL_BASE+311) | 348 | #define __NR_keyctl (__NR_SYSCALL_BASE+311) |
349 | 349 | ||
350 | #if 0 /* reserved for un-muxing ipc */ | 350 | #if defined(__ARM_EABI__) /* reserved for un-muxing ipc */ |
351 | #define __NR_semtimedop (__NR_SYSCALL_BASE+312) | 351 | #define __NR_semtimedop (__NR_SYSCALL_BASE+312) |
352 | #endif | 352 | #endif |
353 | 353 | ||
diff --git a/include/asm-arm26/mman.h b/include/asm-arm26/mman.h index 0ed7780541fa..4000a6c1b76b 100644 --- a/include/asm-arm26/mman.h +++ b/include/asm-arm26/mman.h | |||
@@ -1,19 +1,7 @@ | |||
1 | #ifndef __ARM_MMAN_H__ | 1 | #ifndef __ARM_MMAN_H__ |
2 | #define __ARM_MMAN_H__ | 2 | #define __ARM_MMAN_H__ |
3 | 3 | ||
4 | #define PROT_READ 0x1 /* page can be read */ | 4 | #include <asm-generic/mman.h> |
5 | #define PROT_WRITE 0x2 /* page can be written */ | ||
6 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
7 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
8 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
9 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
10 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
11 | |||
12 | #define MAP_SHARED 0x01 /* Share changes */ | ||
13 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
14 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
15 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
16 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
17 | 5 | ||
18 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
19 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -23,22 +11,7 @@ | |||
23 | #define MAP_POPULATE 0x8000 /* populate (prefault) page tables */ | 11 | #define MAP_POPULATE 0x8000 /* populate (prefault) page tables */ |
24 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 12 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
25 | 13 | ||
26 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
27 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
28 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
29 | |||
30 | #define MCL_CURRENT 1 /* lock all current mappings */ | 14 | #define MCL_CURRENT 1 /* lock all current mappings */ |
31 | #define MCL_FUTURE 2 /* lock all future mappings */ | 15 | #define MCL_FUTURE 2 /* lock all future mappings */ |
32 | 16 | ||
33 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
34 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
35 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
36 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
37 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
38 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
39 | |||
40 | /* compatibility flags */ | ||
41 | #define MAP_ANON MAP_ANONYMOUS | ||
42 | #define MAP_FILE 0 | ||
43 | |||
44 | #endif /* __ARM_MMAN_H__ */ | 17 | #endif /* __ARM_MMAN_H__ */ |
diff --git a/include/asm-cris/mman.h b/include/asm-cris/mman.h index 5a382b8bf3f7..1c35e1b66b46 100644 --- a/include/asm-cris/mman.h +++ b/include/asm-cris/mman.h | |||
@@ -3,19 +3,7 @@ | |||
3 | 3 | ||
4 | /* verbatim copy of asm-i386/ version */ | 4 | /* verbatim copy of asm-i386/ version */ |
5 | 5 | ||
6 | #define PROT_READ 0x1 /* page can be read */ | 6 | #include <asm-generic/mman.h> |
7 | #define PROT_WRITE 0x2 /* page can be written */ | ||
8 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
9 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
10 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
11 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
12 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
13 | |||
14 | #define MAP_SHARED 0x01 /* Share changes */ | ||
15 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
16 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
17 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
18 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
19 | 7 | ||
20 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 8 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
21 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 9 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -25,22 +13,7 @@ | |||
25 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 13 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
26 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 14 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
27 | 15 | ||
28 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
29 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
30 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
31 | |||
32 | #define MCL_CURRENT 1 /* lock all current mappings */ | 16 | #define MCL_CURRENT 1 /* lock all current mappings */ |
33 | #define MCL_FUTURE 2 /* lock all future mappings */ | 17 | #define MCL_FUTURE 2 /* lock all future mappings */ |
34 | 18 | ||
35 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
36 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
37 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
38 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
39 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
40 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
41 | |||
42 | /* compatibility flags */ | ||
43 | #define MAP_ANON MAP_ANONYMOUS | ||
44 | #define MAP_FILE 0 | ||
45 | |||
46 | #endif /* __CRIS_MMAN_H__ */ | 19 | #endif /* __CRIS_MMAN_H__ */ |
diff --git a/include/asm-frv/atomic.h b/include/asm-frv/atomic.h index a59f684b4f33..5d9f84bfdcad 100644 --- a/include/asm-frv/atomic.h +++ b/include/asm-frv/atomic.h | |||
@@ -220,9 +220,9 @@ extern unsigned long atomic_test_and_XOR_mask(unsigned long mask, volatile unsig | |||
220 | switch (sizeof(__xg_orig)) { \ | 220 | switch (sizeof(__xg_orig)) { \ |
221 | case 4: \ | 221 | case 4: \ |
222 | asm volatile( \ | 222 | asm volatile( \ |
223 | "swap%I0 %2,%M0" \ | 223 | "swap%I0 %M0,%1" \ |
224 | : "+m"(*__xg_ptr), "=&r"(__xg_orig) \ | 224 | : "+m"(*__xg_ptr), "=r"(__xg_orig) \ |
225 | : "r"(x) \ | 225 | : "1"(x) \ |
226 | : "memory" \ | 226 | : "memory" \ |
227 | ); \ | 227 | ); \ |
228 | break; \ | 228 | break; \ |
diff --git a/include/asm-frv/cacheflush.h b/include/asm-frv/cacheflush.h index 3007deccb490..eaa5826bc1c8 100644 --- a/include/asm-frv/cacheflush.h +++ b/include/asm-frv/cacheflush.h | |||
@@ -87,5 +87,17 @@ static inline void flush_icache_page(struct vm_area_struct *vma, struct page *pa | |||
87 | flush_icache_user_range(vma, page, page_to_phys(page), PAGE_SIZE); | 87 | flush_icache_user_range(vma, page, page_to_phys(page), PAGE_SIZE); |
88 | } | 88 | } |
89 | 89 | ||
90 | /* | ||
91 | * permit ptrace to access another process's address space through the icache | ||
92 | * and the dcache | ||
93 | */ | ||
94 | #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ | ||
95 | do { \ | ||
96 | memcpy((dst), (src), (len)); \ | ||
97 | flush_icache_user_range((vma), (page), (vaddr), (len)); \ | ||
98 | } while(0) | ||
99 | |||
100 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ | ||
101 | memcpy((dst), (src), (len)) | ||
90 | 102 | ||
91 | #endif /* _ASM_CACHEFLUSH_H */ | 103 | #endif /* _ASM_CACHEFLUSH_H */ |
diff --git a/include/asm-frv/io.h b/include/asm-frv/io.h index 075369b1a34b..01247cb2bc39 100644 --- a/include/asm-frv/io.h +++ b/include/asm-frv/io.h | |||
@@ -251,7 +251,6 @@ static inline void writel(uint32_t datum, volatile void __iomem *addr) | |||
251 | #define IOMAP_WRITETHROUGH 3 | 251 | #define IOMAP_WRITETHROUGH 3 |
252 | 252 | ||
253 | extern void __iomem *__ioremap(unsigned long physaddr, unsigned long size, int cacheflag); | 253 | extern void __iomem *__ioremap(unsigned long physaddr, unsigned long size, int cacheflag); |
254 | extern void __iounmap(void __iomem *addr, unsigned long size); | ||
255 | 254 | ||
256 | static inline void __iomem *ioremap(unsigned long physaddr, unsigned long size) | 255 | static inline void __iomem *ioremap(unsigned long physaddr, unsigned long size) |
257 | { | 256 | { |
diff --git a/include/asm-frv/mman.h b/include/asm-frv/mman.h index 8af4a41c255e..b4371e928683 100644 --- a/include/asm-frv/mman.h +++ b/include/asm-frv/mman.h | |||
@@ -1,19 +1,7 @@ | |||
1 | #ifndef __ASM_MMAN_H__ | 1 | #ifndef __ASM_MMAN_H__ |
2 | #define __ASM_MMAN_H__ | 2 | #define __ASM_MMAN_H__ |
3 | 3 | ||
4 | #define PROT_READ 0x1 /* page can be read */ | 4 | #include <asm-generic/mman.h> |
5 | #define PROT_WRITE 0x2 /* page can be written */ | ||
6 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
7 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
8 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
9 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
10 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
11 | |||
12 | #define MAP_SHARED 0x01 /* Share changes */ | ||
13 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
14 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
15 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
16 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
17 | 5 | ||
18 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
19 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -23,23 +11,8 @@ | |||
23 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 11 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
24 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 12 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
25 | 13 | ||
26 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
27 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
28 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
29 | |||
30 | #define MCL_CURRENT 1 /* lock all current mappings */ | 14 | #define MCL_CURRENT 1 /* lock all current mappings */ |
31 | #define MCL_FUTURE 2 /* lock all future mappings */ | 15 | #define MCL_FUTURE 2 /* lock all future mappings */ |
32 | 16 | ||
33 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
34 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
35 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
36 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
37 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
38 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
39 | |||
40 | /* compatibility flags */ | ||
41 | #define MAP_ANON MAP_ANONYMOUS | ||
42 | #define MAP_FILE 0 | ||
43 | |||
44 | #endif /* __ASM_MMAN_H__ */ | 17 | #endif /* __ASM_MMAN_H__ */ |
45 | 18 | ||
diff --git a/include/asm-frv/spr-regs.h b/include/asm-frv/spr-regs.h index ef472f058d9c..c2a541ef828d 100644 --- a/include/asm-frv/spr-regs.h +++ b/include/asm-frv/spr-regs.h | |||
@@ -98,6 +98,7 @@ | |||
98 | #define TBR_TT_TRAP0 (0x80 << 4) | 98 | #define TBR_TT_TRAP0 (0x80 << 4) |
99 | #define TBR_TT_TRAP1 (0x81 << 4) | 99 | #define TBR_TT_TRAP1 (0x81 << 4) |
100 | #define TBR_TT_TRAP2 (0x82 << 4) | 100 | #define TBR_TT_TRAP2 (0x82 << 4) |
101 | #define TBR_TT_TRAP3 (0x83 << 4) | ||
101 | #define TBR_TT_TRAP126 (0xfe << 4) | 102 | #define TBR_TT_TRAP126 (0xfe << 4) |
102 | #define TBR_TT_BREAK (0xff << 4) | 103 | #define TBR_TT_BREAK (0xff << 4) |
103 | 104 | ||
diff --git a/include/asm-frv/system.h b/include/asm-frv/system.h index d2aea70a5f64..f72ff0c4dc0b 100644 --- a/include/asm-frv/system.h +++ b/include/asm-frv/system.h | |||
@@ -40,8 +40,84 @@ do { \ | |||
40 | 40 | ||
41 | /* | 41 | /* |
42 | * interrupt flag manipulation | 42 | * interrupt flag manipulation |
43 | * - use virtual interrupt management since touching the PSR is slow | ||
44 | * - ICC2.Z: T if interrupts virtually disabled | ||
45 | * - ICC2.C: F if interrupts really disabled | ||
46 | * - if Z==1 upon interrupt: | ||
47 | * - C is set to 0 | ||
48 | * - interrupts are really disabled | ||
49 | * - entry.S returns immediately | ||
50 | * - uses TIHI (TRAP if Z==0 && C==0) #2 to really reenable interrupts | ||
51 | * - if taken, the trap: | ||
52 | * - sets ICC2.C | ||
53 | * - enables interrupts | ||
43 | */ | 54 | */ |
44 | #define local_irq_disable() \ | 55 | #define local_irq_disable() \ |
56 | do { \ | ||
57 | /* set Z flag, but don't change the C flag */ \ | ||
58 | asm volatile(" andcc gr0,gr0,gr0,icc2 \n" \ | ||
59 | : \ | ||
60 | : \ | ||
61 | : "memory", "icc2" \ | ||
62 | ); \ | ||
63 | } while(0) | ||
64 | |||
65 | #define local_irq_enable() \ | ||
66 | do { \ | ||
67 | /* clear Z flag and then test the C flag */ \ | ||
68 | asm volatile(" oricc gr0,#1,gr0,icc2 \n" \ | ||
69 | " tihi icc2,gr0,#2 \n" \ | ||
70 | : \ | ||
71 | : \ | ||
72 | : "memory", "icc2" \ | ||
73 | ); \ | ||
74 | } while(0) | ||
75 | |||
76 | #define local_save_flags(flags) \ | ||
77 | do { \ | ||
78 | typecheck(unsigned long, flags); \ | ||
79 | asm volatile("movsg ccr,%0" \ | ||
80 | : "=r"(flags) \ | ||
81 | : \ | ||
82 | : "memory"); \ | ||
83 | \ | ||
84 | /* shift ICC2.Z to bit 0 */ \ | ||
85 | flags >>= 26; \ | ||
86 | \ | ||
87 | /* make flags 1 if interrupts disabled, 0 otherwise */ \ | ||
88 | flags &= 1UL; \ | ||
89 | } while(0) | ||
90 | |||
91 | #define irqs_disabled() \ | ||
92 | ({unsigned long flags; local_save_flags(flags); flags; }) | ||
93 | |||
94 | #define local_irq_save(flags) \ | ||
95 | do { \ | ||
96 | typecheck(unsigned long, flags); \ | ||
97 | local_save_flags(flags); \ | ||
98 | local_irq_disable(); \ | ||
99 | } while(0) | ||
100 | |||
101 | #define local_irq_restore(flags) \ | ||
102 | do { \ | ||
103 | typecheck(unsigned long, flags); \ | ||
104 | \ | ||
105 | /* load the Z flag by turning 1 if disabled into 0 if disabled \ | ||
106 | * and thus setting the Z flag but not the C flag */ \ | ||
107 | asm volatile(" xoricc %0,#1,gr0,icc2 \n" \ | ||
108 | /* then test Z=0 and C=0 */ \ | ||
109 | " tihi icc2,gr0,#2 \n" \ | ||
110 | : \ | ||
111 | : "r"(flags) \ | ||
112 | : "memory", "icc2" \ | ||
113 | ); \ | ||
114 | \ | ||
115 | } while(0) | ||
116 | |||
117 | /* | ||
118 | * real interrupt flag manipulation | ||
119 | */ | ||
120 | #define __local_irq_disable() \ | ||
45 | do { \ | 121 | do { \ |
46 | unsigned long psr; \ | 122 | unsigned long psr; \ |
47 | asm volatile(" movsg psr,%0 \n" \ | 123 | asm volatile(" movsg psr,%0 \n" \ |
@@ -53,7 +129,7 @@ do { \ | |||
53 | : "memory"); \ | 129 | : "memory"); \ |
54 | } while(0) | 130 | } while(0) |
55 | 131 | ||
56 | #define local_irq_enable() \ | 132 | #define __local_irq_enable() \ |
57 | do { \ | 133 | do { \ |
58 | unsigned long psr; \ | 134 | unsigned long psr; \ |
59 | asm volatile(" movsg psr,%0 \n" \ | 135 | asm volatile(" movsg psr,%0 \n" \ |
@@ -64,7 +140,7 @@ do { \ | |||
64 | : "memory"); \ | 140 | : "memory"); \ |
65 | } while(0) | 141 | } while(0) |
66 | 142 | ||
67 | #define local_save_flags(flags) \ | 143 | #define __local_save_flags(flags) \ |
68 | do { \ | 144 | do { \ |
69 | typecheck(unsigned long, flags); \ | 145 | typecheck(unsigned long, flags); \ |
70 | asm("movsg psr,%0" \ | 146 | asm("movsg psr,%0" \ |
@@ -73,7 +149,7 @@ do { \ | |||
73 | : "memory"); \ | 149 | : "memory"); \ |
74 | } while(0) | 150 | } while(0) |
75 | 151 | ||
76 | #define local_irq_save(flags) \ | 152 | #define __local_irq_save(flags) \ |
77 | do { \ | 153 | do { \ |
78 | unsigned long npsr; \ | 154 | unsigned long npsr; \ |
79 | typecheck(unsigned long, flags); \ | 155 | typecheck(unsigned long, flags); \ |
@@ -86,7 +162,7 @@ do { \ | |||
86 | : "memory"); \ | 162 | : "memory"); \ |
87 | } while(0) | 163 | } while(0) |
88 | 164 | ||
89 | #define local_irq_restore(flags) \ | 165 | #define __local_irq_restore(flags) \ |
90 | do { \ | 166 | do { \ |
91 | typecheck(unsigned long, flags); \ | 167 | typecheck(unsigned long, flags); \ |
92 | asm volatile(" movgs %0,psr \n" \ | 168 | asm volatile(" movgs %0,psr \n" \ |
@@ -95,7 +171,7 @@ do { \ | |||
95 | : "memory"); \ | 171 | : "memory"); \ |
96 | } while(0) | 172 | } while(0) |
97 | 173 | ||
98 | #define irqs_disabled() \ | 174 | #define __irqs_disabled() \ |
99 | ((__get_PSR() & PSR_PIL) >= PSR_PIL_14) | 175 | ((__get_PSR() & PSR_PIL) >= PSR_PIL_14) |
100 | 176 | ||
101 | /* | 177 | /* |
diff --git a/include/asm-frv/uaccess.h b/include/asm-frv/uaccess.h index b6bcbe01f6ee..a1d140438863 100644 --- a/include/asm-frv/uaccess.h +++ b/include/asm-frv/uaccess.h | |||
@@ -306,7 +306,4 @@ extern long strnlen_user(const char *src, long count); | |||
306 | 306 | ||
307 | extern unsigned long search_exception_table(unsigned long addr); | 307 | extern unsigned long search_exception_table(unsigned long addr); |
308 | 308 | ||
309 | #define copy_to_user_page(vma, page, vaddr, dst, src, len) memcpy(dst, src, len) | ||
310 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) memcpy(dst, src, len) | ||
311 | |||
312 | #endif /* _ASM_UACCESS_H */ | 309 | #endif /* _ASM_UACCESS_H */ |
diff --git a/include/asm-frv/unistd.h b/include/asm-frv/unistd.h index 4d994d2e99e3..322531caa484 100644 --- a/include/asm-frv/unistd.h +++ b/include/asm-frv/unistd.h | |||
@@ -295,13 +295,29 @@ | |||
295 | #define __NR_add_key 286 | 295 | #define __NR_add_key 286 |
296 | #define __NR_request_key 287 | 296 | #define __NR_request_key 287 |
297 | #define __NR_keyctl 288 | 297 | #define __NR_keyctl 288 |
298 | #define __NR_vperfctr_open 289 | 298 | #define __NR_ioprio_set 289 |
299 | #define __NR_vperfctr_control (__NR_perfctr_info+1) | 299 | #define __NR_ioprio_get 290 |
300 | #define __NR_vperfctr_unlink (__NR_perfctr_info+2) | 300 | #define __NR_inotify_init 291 |
301 | #define __NR_vperfctr_iresume (__NR_perfctr_info+3) | 301 | #define __NR_inotify_add_watch 292 |
302 | #define __NR_vperfctr_read (__NR_perfctr_info+4) | 302 | #define __NR_inotify_rm_watch 293 |
303 | #define __NR_migrate_pages 294 | ||
304 | #define __NR_openat 295 | ||
305 | #define __NR_mkdirat 296 | ||
306 | #define __NR_mknodat 297 | ||
307 | #define __NR_fchownat 298 | ||
308 | #define __NR_futimesat 299 | ||
309 | #define __NR_newfstatat 300 | ||
310 | #define __NR_unlinkat 301 | ||
311 | #define __NR_renameat 302 | ||
312 | #define __NR_linkat 303 | ||
313 | #define __NR_symlinkat 304 | ||
314 | #define __NR_readlinkat 305 | ||
315 | #define __NR_fchmodat 306 | ||
316 | #define __NR_faccessat 307 | ||
317 | #define __NR_pselect6 308 | ||
318 | #define __NR_ppoll 309 | ||
303 | 319 | ||
304 | #define NR_syscalls 294 | 320 | #define NR_syscalls 310 |
305 | 321 | ||
306 | /* | 322 | /* |
307 | * process the return value of a syscall, consigning it to one of two possible fates | 323 | * process the return value of a syscall, consigning it to one of two possible fates |
diff --git a/include/asm-generic/mman.h b/include/asm-generic/mman.h new file mode 100644 index 000000000000..3b41d2bb70da --- /dev/null +++ b/include/asm-generic/mman.h | |||
@@ -0,0 +1,42 @@ | |||
1 | #ifndef _ASM_GENERIC_MMAN_H | ||
2 | #define _ASM_GENERIC_MMAN_H | ||
3 | |||
4 | /* | ||
5 | Author: Michael S. Tsirkin <mst@mellanox.co.il>, Mellanox Technologies Ltd. | ||
6 | Based on: asm-xxx/mman.h | ||
7 | */ | ||
8 | |||
9 | #define PROT_READ 0x1 /* page can be read */ | ||
10 | #define PROT_WRITE 0x2 /* page can be written */ | ||
11 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
12 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
13 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
14 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
15 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
16 | |||
17 | #define MAP_SHARED 0x01 /* Share changes */ | ||
18 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
19 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
20 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
21 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
22 | |||
23 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
24 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
25 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
26 | |||
27 | #define MADV_NORMAL 0 /* no further special treatment */ | ||
28 | #define MADV_RANDOM 1 /* expect random page references */ | ||
29 | #define MADV_SEQUENTIAL 2 /* expect sequential page references */ | ||
30 | #define MADV_WILLNEED 3 /* will need these pages */ | ||
31 | #define MADV_DONTNEED 4 /* don't need these pages */ | ||
32 | |||
33 | /* common parameters: try to keep these consistent across architectures */ | ||
34 | #define MADV_REMOVE 9 /* remove these pages & resources */ | ||
35 | #define MADV_DONTFORK 10 /* don't inherit across fork */ | ||
36 | #define MADV_DOFORK 11 /* do inherit across fork */ | ||
37 | |||
38 | /* compatibility flags */ | ||
39 | #define MAP_ANON MAP_ANONYMOUS | ||
40 | #define MAP_FILE 0 | ||
41 | |||
42 | #endif | ||
diff --git a/include/asm-h8300/mman.h b/include/asm-h8300/mman.h index 744a8fb485c2..b9f104f22a36 100644 --- a/include/asm-h8300/mman.h +++ b/include/asm-h8300/mman.h | |||
@@ -1,19 +1,7 @@ | |||
1 | #ifndef __H8300_MMAN_H__ | 1 | #ifndef __H8300_MMAN_H__ |
2 | #define __H8300_MMAN_H__ | 2 | #define __H8300_MMAN_H__ |
3 | 3 | ||
4 | #define PROT_READ 0x1 /* page can be read */ | 4 | #include <asm-generic/mman.h> |
5 | #define PROT_WRITE 0x2 /* page can be written */ | ||
6 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
7 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
8 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
9 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
10 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
11 | |||
12 | #define MAP_SHARED 0x01 /* Share changes */ | ||
13 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
14 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
15 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
16 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
17 | 5 | ||
18 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
19 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -23,22 +11,7 @@ | |||
23 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 11 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
24 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 12 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
25 | 13 | ||
26 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
27 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
28 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
29 | |||
30 | #define MCL_CURRENT 1 /* lock all current mappings */ | 14 | #define MCL_CURRENT 1 /* lock all current mappings */ |
31 | #define MCL_FUTURE 2 /* lock all future mappings */ | 15 | #define MCL_FUTURE 2 /* lock all future mappings */ |
32 | 16 | ||
33 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
34 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
35 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
36 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
37 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
38 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
39 | |||
40 | /* compatibility flags */ | ||
41 | #define MAP_ANON MAP_ANONYMOUS | ||
42 | #define MAP_FILE 0 | ||
43 | |||
44 | #endif /* __H8300_MMAN_H__ */ | 17 | #endif /* __H8300_MMAN_H__ */ |
diff --git a/include/asm-i386/mman.h b/include/asm-i386/mman.h index ba4941e6f643..8fd9d7ab7faf 100644 --- a/include/asm-i386/mman.h +++ b/include/asm-i386/mman.h | |||
@@ -1,19 +1,7 @@ | |||
1 | #ifndef __I386_MMAN_H__ | 1 | #ifndef __I386_MMAN_H__ |
2 | #define __I386_MMAN_H__ | 2 | #define __I386_MMAN_H__ |
3 | 3 | ||
4 | #define PROT_READ 0x1 /* page can be read */ | 4 | #include <asm-generic/mman.h> |
5 | #define PROT_WRITE 0x2 /* page can be written */ | ||
6 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
7 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
8 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
9 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
10 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
11 | |||
12 | #define MAP_SHARED 0x01 /* Share changes */ | ||
13 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
14 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
15 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
16 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
17 | 5 | ||
18 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
19 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -23,22 +11,7 @@ | |||
23 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 11 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
24 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 12 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
25 | 13 | ||
26 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
27 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
28 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
29 | |||
30 | #define MCL_CURRENT 1 /* lock all current mappings */ | 14 | #define MCL_CURRENT 1 /* lock all current mappings */ |
31 | #define MCL_FUTURE 2 /* lock all future mappings */ | 15 | #define MCL_FUTURE 2 /* lock all future mappings */ |
32 | 16 | ||
33 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
34 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
35 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
36 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
37 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
38 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
39 | |||
40 | /* compatibility flags */ | ||
41 | #define MAP_ANON MAP_ANONYMOUS | ||
42 | #define MAP_FILE 0 | ||
43 | |||
44 | #endif /* __I386_MMAN_H__ */ | 17 | #endif /* __I386_MMAN_H__ */ |
diff --git a/include/asm-i386/thread_info.h b/include/asm-i386/thread_info.h index e20e99551d71..1f7d48c9ba3f 100644 --- a/include/asm-i386/thread_info.h +++ b/include/asm-i386/thread_info.h | |||
@@ -158,8 +158,8 @@ register unsigned long current_stack_pointer asm("esp") __attribute_used__; | |||
158 | 158 | ||
159 | /* work to do on interrupt/exception return */ | 159 | /* work to do on interrupt/exception return */ |
160 | #define _TIF_WORK_MASK \ | 160 | #define _TIF_WORK_MASK \ |
161 | (0x0000FFFF & ~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP|\ | 161 | (0x0000FFFF & ~(_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | \ |
162 | _TIF_SECCOMP|_TIF_SYSCALL_EMU)) | 162 | _TIF_SECCOMP | _TIF_SYSCALL_EMU)) |
163 | /* work to do on any return to u-space */ | 163 | /* work to do on any return to u-space */ |
164 | #define _TIF_ALLWORK_MASK (0x0000FFFF & ~_TIF_SECCOMP) | 164 | #define _TIF_ALLWORK_MASK (0x0000FFFF & ~_TIF_SECCOMP) |
165 | 165 | ||
diff --git a/include/asm-i386/topology.h b/include/asm-i386/topology.h index af503a122b23..aa958c6ee83e 100644 --- a/include/asm-i386/topology.h +++ b/include/asm-i386/topology.h | |||
@@ -27,7 +27,7 @@ | |||
27 | #ifndef _ASM_I386_TOPOLOGY_H | 27 | #ifndef _ASM_I386_TOPOLOGY_H |
28 | #define _ASM_I386_TOPOLOGY_H | 28 | #define _ASM_I386_TOPOLOGY_H |
29 | 29 | ||
30 | #ifdef CONFIG_SMP | 30 | #ifdef CONFIG_X86_HT |
31 | #define topology_physical_package_id(cpu) \ | 31 | #define topology_physical_package_id(cpu) \ |
32 | (phys_proc_id[cpu] == BAD_APICID ? -1 : phys_proc_id[cpu]) | 32 | (phys_proc_id[cpu] == BAD_APICID ? -1 : phys_proc_id[cpu]) |
33 | #define topology_core_id(cpu) \ | 33 | #define topology_core_id(cpu) \ |
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h index cf6f2cd9c514..dc81a55dd94d 100644 --- a/include/asm-i386/unistd.h +++ b/include/asm-i386/unistd.h | |||
@@ -305,7 +305,7 @@ | |||
305 | #define __NR_mknodat 297 | 305 | #define __NR_mknodat 297 |
306 | #define __NR_fchownat 298 | 306 | #define __NR_fchownat 298 |
307 | #define __NR_futimesat 299 | 307 | #define __NR_futimesat 299 |
308 | #define __NR_newfstatat 300 | 308 | #define __NR_fstatat64 300 |
309 | #define __NR_unlinkat 301 | 309 | #define __NR_unlinkat 301 |
310 | #define __NR_renameat 302 | 310 | #define __NR_renameat 302 |
311 | #define __NR_linkat 303 | 311 | #define __NR_linkat 303 |
diff --git a/include/asm-ia64/acpi.h b/include/asm-ia64/acpi.h index 3a544ffc5008..f7a517654308 100644 --- a/include/asm-ia64/acpi.h +++ b/include/asm-ia64/acpi.h | |||
@@ -106,6 +106,8 @@ extern unsigned int can_cpei_retarget(void); | |||
106 | extern unsigned int is_cpu_cpei_target(unsigned int cpu); | 106 | extern unsigned int is_cpu_cpei_target(unsigned int cpu); |
107 | extern void set_cpei_target_cpu(unsigned int cpu); | 107 | extern void set_cpei_target_cpu(unsigned int cpu); |
108 | extern unsigned int get_cpei_target_cpu(void); | 108 | extern unsigned int get_cpei_target_cpu(void); |
109 | extern void prefill_possible_map(void); | ||
110 | extern int additional_cpus; | ||
109 | 111 | ||
110 | #ifdef CONFIG_ACPI_NUMA | 112 | #ifdef CONFIG_ACPI_NUMA |
111 | /* Proximity bitmap length; _PXM is at most 255 (8 bit)*/ | 113 | /* Proximity bitmap length; _PXM is at most 255 (8 bit)*/ |
diff --git a/include/asm-ia64/machvec_sn2.h b/include/asm-ia64/machvec_sn2.h index e1b6cd63f49e..03d00faf03b5 100644 --- a/include/asm-ia64/machvec_sn2.h +++ b/include/asm-ia64/machvec_sn2.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2002-2003 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2002-2003, 2006 Silicon Graphics, Inc. All Rights Reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms of version 2 of the GNU General Public License | 5 | * under the terms of version 2 of the GNU General Public License |
@@ -20,11 +20,6 @@ | |||
20 | * License along with this program; if not, write the Free Software | 20 | * License along with this program; if not, write the Free Software |
21 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | 21 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. |
22 | * | 22 | * |
23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
24 | * Mountain View, CA 94043, or: | ||
25 | * | ||
26 | * http://www.sgi.com | ||
27 | * | ||
28 | * For further information regarding this notice, see: | 23 | * For further information regarding this notice, see: |
29 | * | 24 | * |
30 | * http://oss.sgi.com/projects/GenInfo/NoticeExplan | 25 | * http://oss.sgi.com/projects/GenInfo/NoticeExplan |
diff --git a/include/asm-ia64/mman.h b/include/asm-ia64/mman.h index 828beb24a20e..6ba179f12718 100644 --- a/include/asm-ia64/mman.h +++ b/include/asm-ia64/mman.h | |||
@@ -8,19 +8,7 @@ | |||
8 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co | 8 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #define PROT_READ 0x1 /* page can be read */ | 11 | #include <asm-generic/mman.h> |
12 | #define PROT_WRITE 0x2 /* page can be written */ | ||
13 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
14 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
15 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
16 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
17 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
18 | |||
19 | #define MAP_SHARED 0x01 /* Share changes */ | ||
20 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
21 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
22 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
23 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
24 | 12 | ||
25 | #define MAP_GROWSDOWN 0x00100 /* stack-like segment */ | 13 | #define MAP_GROWSDOWN 0x00100 /* stack-like segment */ |
26 | #define MAP_GROWSUP 0x00200 /* register stack-like segment */ | 14 | #define MAP_GROWSUP 0x00200 /* register stack-like segment */ |
@@ -31,22 +19,7 @@ | |||
31 | #define MAP_POPULATE 0x08000 /* populate (prefault) pagetables */ | 19 | #define MAP_POPULATE 0x08000 /* populate (prefault) pagetables */ |
32 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 20 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
33 | 21 | ||
34 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
35 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
36 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
37 | |||
38 | #define MCL_CURRENT 1 /* lock all current mappings */ | 22 | #define MCL_CURRENT 1 /* lock all current mappings */ |
39 | #define MCL_FUTURE 2 /* lock all future mappings */ | 23 | #define MCL_FUTURE 2 /* lock all future mappings */ |
40 | 24 | ||
41 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
42 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
43 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
44 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
45 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
46 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
47 | |||
48 | /* compatibility flags */ | ||
49 | #define MAP_ANON MAP_ANONYMOUS | ||
50 | #define MAP_FILE 0 | ||
51 | |||
52 | #endif /* _ASM_IA64_MMAN_H */ | 25 | #endif /* _ASM_IA64_MMAN_H */ |
diff --git a/include/asm-ia64/sn/arch.h b/include/asm-ia64/sn/arch.h index 1a3831c04af6..91c31be87b13 100644 --- a/include/asm-ia64/sn/arch.h +++ b/include/asm-ia64/sn/arch.h | |||
@@ -70,7 +70,7 @@ DECLARE_PER_CPU(struct sn_hub_info_s, __sn_hub_info); | |||
70 | * Compact node ID to nasid mappings kept in the per-cpu data areas of each | 70 | * Compact node ID to nasid mappings kept in the per-cpu data areas of each |
71 | * cpu. | 71 | * cpu. |
72 | */ | 72 | */ |
73 | DECLARE_PER_CPU(short, __sn_cnodeid_to_nasid[MAX_NUMNODES]); | 73 | DECLARE_PER_CPU(short, __sn_cnodeid_to_nasid[MAX_COMPACT_NODES]); |
74 | #define sn_cnodeid_to_nasid (&__get_cpu_var(__sn_cnodeid_to_nasid[0])) | 74 | #define sn_cnodeid_to_nasid (&__get_cpu_var(__sn_cnodeid_to_nasid[0])) |
75 | 75 | ||
76 | 76 | ||
diff --git a/include/asm-ia64/sn/bte.h b/include/asm-ia64/sn/bte.h index 01e5b4103235..5335d87ca5f8 100644 --- a/include/asm-ia64/sn/bte.h +++ b/include/asm-ia64/sn/bte.h | |||
@@ -46,7 +46,7 @@ | |||
46 | #define BTES_PER_NODE (is_shub2() ? 4 : 2) | 46 | #define BTES_PER_NODE (is_shub2() ? 4 : 2) |
47 | #define MAX_BTES_PER_NODE 4 | 47 | #define MAX_BTES_PER_NODE 4 |
48 | 48 | ||
49 | #define BTE2OFF_CTRL (0) | 49 | #define BTE2OFF_CTRL 0 |
50 | #define BTE2OFF_SRC (SH2_BT_ENG_SRC_ADDR_0 - SH2_BT_ENG_CSR_0) | 50 | #define BTE2OFF_SRC (SH2_BT_ENG_SRC_ADDR_0 - SH2_BT_ENG_CSR_0) |
51 | #define BTE2OFF_DEST (SH2_BT_ENG_DEST_ADDR_0 - SH2_BT_ENG_CSR_0) | 51 | #define BTE2OFF_DEST (SH2_BT_ENG_DEST_ADDR_0 - SH2_BT_ENG_CSR_0) |
52 | #define BTE2OFF_NOTIFY (SH2_BT_ENG_NOTIF_ADDR_0 - SH2_BT_ENG_CSR_0) | 52 | #define BTE2OFF_NOTIFY (SH2_BT_ENG_NOTIF_ADDR_0 - SH2_BT_ENG_CSR_0) |
@@ -75,11 +75,11 @@ | |||
75 | : base + (BTEOFF_NOTIFY/8)) | 75 | : base + (BTEOFF_NOTIFY/8)) |
76 | 76 | ||
77 | /* Define hardware modes */ | 77 | /* Define hardware modes */ |
78 | #define BTE_NOTIFY (IBCT_NOTIFY) | 78 | #define BTE_NOTIFY IBCT_NOTIFY |
79 | #define BTE_NORMAL BTE_NOTIFY | 79 | #define BTE_NORMAL BTE_NOTIFY |
80 | #define BTE_ZERO_FILL (BTE_NOTIFY | IBCT_ZFIL_MODE) | 80 | #define BTE_ZERO_FILL (BTE_NOTIFY | IBCT_ZFIL_MODE) |
81 | /* Use a reserved bit to let the caller specify a wait for any BTE */ | 81 | /* Use a reserved bit to let the caller specify a wait for any BTE */ |
82 | #define BTE_WACQUIRE (0x4000) | 82 | #define BTE_WACQUIRE 0x4000 |
83 | /* Use the BTE on the node with the destination memory */ | 83 | /* Use the BTE on the node with the destination memory */ |
84 | #define BTE_USE_DEST (BTE_WACQUIRE << 1) | 84 | #define BTE_USE_DEST (BTE_WACQUIRE << 1) |
85 | /* Use any available BTE interface on any node for the transfer */ | 85 | /* Use any available BTE interface on any node for the transfer */ |
diff --git a/include/asm-ia64/sn/pcibr_provider.h b/include/asm-ia64/sn/pcibr_provider.h index 9334078b089a..a601d3af39b6 100644 --- a/include/asm-ia64/sn/pcibr_provider.h +++ b/include/asm-ia64/sn/pcibr_provider.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 1992-1997,2000-2004 Silicon Graphics, Inc. All rights reserved. | 6 | * Copyright (C) 1992-1997,2000-2006 Silicon Graphics, Inc. All rights reserved. |
7 | */ | 7 | */ |
8 | #ifndef _ASM_IA64_SN_PCI_PCIBR_PROVIDER_H | 8 | #ifndef _ASM_IA64_SN_PCI_PCIBR_PROVIDER_H |
9 | #define _ASM_IA64_SN_PCI_PCIBR_PROVIDER_H | 9 | #define _ASM_IA64_SN_PCI_PCIBR_PROVIDER_H |
@@ -115,18 +115,6 @@ struct pcibus_info { | |||
115 | spinlock_t pbi_lock; | 115 | spinlock_t pbi_lock; |
116 | }; | 116 | }; |
117 | 117 | ||
118 | /* | ||
119 | * pcibus_info structure locking macros | ||
120 | */ | ||
121 | inline static unsigned long | ||
122 | pcibr_lock(struct pcibus_info *pcibus_info) | ||
123 | { | ||
124 | unsigned long flag; | ||
125 | spin_lock_irqsave(&pcibus_info->pbi_lock, flag); | ||
126 | return(flag); | ||
127 | } | ||
128 | #define pcibr_unlock(pcibus_info, flag) spin_unlock_irqrestore(&pcibus_info->pbi_lock, flag) | ||
129 | |||
130 | extern int pcibr_init_provider(void); | 118 | extern int pcibr_init_provider(void); |
131 | extern void *pcibr_bus_fixup(struct pcibus_bussoft *, struct pci_controller *); | 119 | extern void *pcibr_bus_fixup(struct pcibus_bussoft *, struct pci_controller *); |
132 | extern dma_addr_t pcibr_dma_map(struct pci_dev *, unsigned long, size_t); | 120 | extern dma_addr_t pcibr_dma_map(struct pci_dev *, unsigned long, size_t); |
diff --git a/include/asm-ia64/sn/sn_feature_sets.h b/include/asm-ia64/sn/sn_feature_sets.h index 9ca642cad338..ff33e3bd3f8e 100644 --- a/include/asm-ia64/sn/sn_feature_sets.h +++ b/include/asm-ia64/sn/sn_feature_sets.h | |||
@@ -12,9 +12,6 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | 14 | ||
15 | #include <asm/types.h> | ||
16 | #include <asm/bitops.h> | ||
17 | |||
18 | /* --------------------- PROM Features -----------------------------*/ | 15 | /* --------------------- PROM Features -----------------------------*/ |
19 | extern int sn_prom_feature_available(int id); | 16 | extern int sn_prom_feature_available(int id); |
20 | 17 | ||
diff --git a/include/asm-ia64/sn/xpc.h b/include/asm-ia64/sn/xpc.h index 0c36928ffd8b..df7f5f4f3cde 100644 --- a/include/asm-ia64/sn/xpc.h +++ b/include/asm-ia64/sn/xpc.h | |||
@@ -508,19 +508,24 @@ struct xpc_channel { | |||
508 | #define XPC_C_OPENREQUEST 0x00000010 /* local open channel request */ | 508 | #define XPC_C_OPENREQUEST 0x00000010 /* local open channel request */ |
509 | 509 | ||
510 | #define XPC_C_SETUP 0x00000020 /* channel's msgqueues are alloc'd */ | 510 | #define XPC_C_SETUP 0x00000020 /* channel's msgqueues are alloc'd */ |
511 | #define XPC_C_CONNECTCALLOUT 0x00000040 /* channel connected callout made */ | 511 | #define XPC_C_CONNECTEDCALLOUT 0x00000040 /* connected callout initiated */ |
512 | #define XPC_C_CONNECTED 0x00000080 /* local channel is connected */ | 512 | #define XPC_C_CONNECTEDCALLOUT_MADE \ |
513 | #define XPC_C_CONNECTING 0x00000100 /* channel is being connected */ | 513 | 0x00000080 /* connected callout completed */ |
514 | 514 | #define XPC_C_CONNECTED 0x00000100 /* local channel is connected */ | |
515 | #define XPC_C_RCLOSEREPLY 0x00000200 /* remote close channel reply */ | 515 | #define XPC_C_CONNECTING 0x00000200 /* channel is being connected */ |
516 | #define XPC_C_CLOSEREPLY 0x00000400 /* local close channel reply */ | 516 | |
517 | #define XPC_C_RCLOSEREQUEST 0x00000800 /* remote close channel request */ | 517 | #define XPC_C_RCLOSEREPLY 0x00000400 /* remote close channel reply */ |
518 | #define XPC_C_CLOSEREQUEST 0x00001000 /* local close channel request */ | 518 | #define XPC_C_CLOSEREPLY 0x00000800 /* local close channel reply */ |
519 | 519 | #define XPC_C_RCLOSEREQUEST 0x00001000 /* remote close channel request */ | |
520 | #define XPC_C_DISCONNECTED 0x00002000 /* channel is disconnected */ | 520 | #define XPC_C_CLOSEREQUEST 0x00002000 /* local close channel request */ |
521 | #define XPC_C_DISCONNECTING 0x00004000 /* channel is being disconnected */ | 521 | |
522 | #define XPC_C_DISCONNECTCALLOUT 0x00008000 /* chan disconnected callout made */ | 522 | #define XPC_C_DISCONNECTED 0x00004000 /* channel is disconnected */ |
523 | #define XPC_C_WDISCONNECT 0x00010000 /* waiting for channel disconnect */ | 523 | #define XPC_C_DISCONNECTING 0x00008000 /* channel is being disconnected */ |
524 | #define XPC_C_DISCONNECTINGCALLOUT \ | ||
525 | 0x00010000 /* disconnecting callout initiated */ | ||
526 | #define XPC_C_DISCONNECTINGCALLOUT_MADE \ | ||
527 | 0x00020000 /* disconnecting callout completed */ | ||
528 | #define XPC_C_WDISCONNECT 0x00040000 /* waiting for channel disconnect */ | ||
524 | 529 | ||
525 | 530 | ||
526 | 531 | ||
diff --git a/include/asm-ia64/timex.h b/include/asm-ia64/timex.h index 414aae060440..05a6baf8a472 100644 --- a/include/asm-ia64/timex.h +++ b/include/asm-ia64/timex.h | |||
@@ -15,6 +15,8 @@ | |||
15 | 15 | ||
16 | typedef unsigned long cycles_t; | 16 | typedef unsigned long cycles_t; |
17 | 17 | ||
18 | extern void (*ia64_udelay)(unsigned long usecs); | ||
19 | |||
18 | /* | 20 | /* |
19 | * For performance reasons, we don't want to define CLOCK_TICK_TRATE as | 21 | * For performance reasons, we don't want to define CLOCK_TICK_TRATE as |
20 | * local_cpu_data->itc_rate. Fortunately, we don't have to, either: according to George | 22 | * local_cpu_data->itc_rate. Fortunately, we don't have to, either: according to George |
diff --git a/include/asm-m32r/mman.h b/include/asm-m32r/mman.h index 12e29747bc84..695a860c024f 100644 --- a/include/asm-m32r/mman.h +++ b/include/asm-m32r/mman.h | |||
@@ -1,21 +1,9 @@ | |||
1 | #ifndef __M32R_MMAN_H__ | 1 | #ifndef __M32R_MMAN_H__ |
2 | #define __M32R_MMAN_H__ | 2 | #define __M32R_MMAN_H__ |
3 | 3 | ||
4 | /* orig : i386 2.6.0-test6 */ | 4 | #include <asm-generic/mman.h> |
5 | |||
6 | #define PROT_READ 0x1 /* page can be read */ | ||
7 | #define PROT_WRITE 0x2 /* page can be written */ | ||
8 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
9 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
10 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
11 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
12 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
13 | 5 | ||
14 | #define MAP_SHARED 0x01 /* Share changes */ | 6 | /* orig : i386 2.6.0-test6 */ |
15 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
16 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
17 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
18 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
19 | 7 | ||
20 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 8 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
21 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 9 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -25,22 +13,7 @@ | |||
25 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 13 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
26 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 14 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
27 | 15 | ||
28 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
29 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
30 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
31 | |||
32 | #define MCL_CURRENT 1 /* lock all current mappings */ | 16 | #define MCL_CURRENT 1 /* lock all current mappings */ |
33 | #define MCL_FUTURE 2 /* lock all future mappings */ | 17 | #define MCL_FUTURE 2 /* lock all future mappings */ |
34 | 18 | ||
35 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
36 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
37 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
38 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
39 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
40 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
41 | |||
42 | /* compatibility flags */ | ||
43 | #define MAP_ANON MAP_ANONYMOUS | ||
44 | #define MAP_FILE 0 | ||
45 | |||
46 | #endif /* __M32R_MMAN_H__ */ | 19 | #endif /* __M32R_MMAN_H__ */ |
diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h index 06c12a037cba..d6a2c613be68 100644 --- a/include/asm-m32r/system.h +++ b/include/asm-m32r/system.h | |||
@@ -239,7 +239,7 @@ __cmpxchg_u32(volatile unsigned int *p, unsigned int old, unsigned int new) | |||
239 | " bra 2f; \n" | 239 | " bra 2f; \n" |
240 | " .fillinsn \n" | 240 | " .fillinsn \n" |
241 | "1:" | 241 | "1:" |
242 | M32R_UNLOCK" %2, @%1; \n" | 242 | M32R_UNLOCK" %0, @%1; \n" |
243 | " .fillinsn \n" | 243 | " .fillinsn \n" |
244 | "2:" | 244 | "2:" |
245 | : "=&r" (retval) | 245 | : "=&r" (retval) |
diff --git a/include/asm-m68k/irq.h b/include/asm-m68k/irq.h index 325c86f8512d..9ac047c400c4 100644 --- a/include/asm-m68k/irq.h +++ b/include/asm-m68k/irq.h | |||
@@ -79,7 +79,7 @@ static __inline__ int irq_canonicalize(int irq) | |||
79 | 79 | ||
80 | extern void (*enable_irq)(unsigned int); | 80 | extern void (*enable_irq)(unsigned int); |
81 | extern void (*disable_irq)(unsigned int); | 81 | extern void (*disable_irq)(unsigned int); |
82 | #define enable_irq_nosync enable_irq | 82 | #define disable_irq_nosync disable_irq |
83 | 83 | ||
84 | struct pt_regs; | 84 | struct pt_regs; |
85 | 85 | ||
diff --git a/include/asm-m68k/mman.h b/include/asm-m68k/mman.h index ea262ab88b3b..1626d37f4898 100644 --- a/include/asm-m68k/mman.h +++ b/include/asm-m68k/mman.h | |||
@@ -1,19 +1,7 @@ | |||
1 | #ifndef __M68K_MMAN_H__ | 1 | #ifndef __M68K_MMAN_H__ |
2 | #define __M68K_MMAN_H__ | 2 | #define __M68K_MMAN_H__ |
3 | 3 | ||
4 | #define PROT_READ 0x1 /* page can be read */ | 4 | #include <asm-generic/mman.h> |
5 | #define PROT_WRITE 0x2 /* page can be written */ | ||
6 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
7 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
8 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
9 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
10 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
11 | |||
12 | #define MAP_SHARED 0x01 /* Share changes */ | ||
13 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
14 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
15 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
16 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
17 | 5 | ||
18 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
19 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -23,22 +11,7 @@ | |||
23 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 11 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
24 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 12 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
25 | 13 | ||
26 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
27 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
28 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
29 | |||
30 | #define MCL_CURRENT 1 /* lock all current mappings */ | 14 | #define MCL_CURRENT 1 /* lock all current mappings */ |
31 | #define MCL_FUTURE 2 /* lock all future mappings */ | 15 | #define MCL_FUTURE 2 /* lock all future mappings */ |
32 | 16 | ||
33 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
34 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
35 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
36 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
37 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
38 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
39 | |||
40 | /* compatibility flags */ | ||
41 | #define MAP_ANON MAP_ANONYMOUS | ||
42 | #define MAP_FILE 0 | ||
43 | |||
44 | #endif /* __M68K_MMAN_H__ */ | 17 | #endif /* __M68K_MMAN_H__ */ |
diff --git a/include/asm-m68k/raw_io.h b/include/asm-m68k/raw_io.h index 5439bcaa57c6..811ccd25d4a6 100644 --- a/include/asm-m68k/raw_io.h +++ b/include/asm-m68k/raw_io.h | |||
@@ -336,6 +336,7 @@ static inline void raw_outsw_swapw(volatile u16 __iomem *port, const u16 *buf, | |||
336 | : "d0", "a0", "a1", "d6"); | 336 | : "d0", "a0", "a1", "d6"); |
337 | } | 337 | } |
338 | 338 | ||
339 | #define __raw_writel raw_outl | ||
339 | 340 | ||
340 | #endif /* __KERNEL__ */ | 341 | #endif /* __KERNEL__ */ |
341 | 342 | ||
diff --git a/include/asm-mips/cpu.h b/include/asm-mips/cpu.h index 934e063e79f1..818b9a97e214 100644 --- a/include/asm-mips/cpu.h +++ b/include/asm-mips/cpu.h | |||
@@ -204,9 +204,9 @@ | |||
204 | */ | 204 | */ |
205 | #define MIPS_CPU_ISA_I 0x00000001 | 205 | #define MIPS_CPU_ISA_I 0x00000001 |
206 | #define MIPS_CPU_ISA_II 0x00000002 | 206 | #define MIPS_CPU_ISA_II 0x00000002 |
207 | #define MIPS_CPU_ISA_III 0x00000003 | 207 | #define MIPS_CPU_ISA_III 0x00000004 |
208 | #define MIPS_CPU_ISA_IV 0x00000004 | 208 | #define MIPS_CPU_ISA_IV 0x00000008 |
209 | #define MIPS_CPU_ISA_V 0x00000005 | 209 | #define MIPS_CPU_ISA_V 0x00000010 |
210 | #define MIPS_CPU_ISA_M32R1 0x00000020 | 210 | #define MIPS_CPU_ISA_M32R1 0x00000020 |
211 | #define MIPS_CPU_ISA_M32R2 0x00000040 | 211 | #define MIPS_CPU_ISA_M32R2 0x00000040 |
212 | #define MIPS_CPU_ISA_M64R1 0x00000080 | 212 | #define MIPS_CPU_ISA_M64R1 0x00000080 |
diff --git a/include/asm-mips/gcc/sgidefs.h b/include/asm-mips/gcc/sgidefs.h deleted file mode 100644 index 05994371a2af..000000000000 --- a/include/asm-mips/gcc/sgidefs.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | /* | ||
2 | * include/sgidefs.h | ||
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) 1996 by Ralf Baechle | ||
9 | * | ||
10 | * This file is here to satisfy GCC's expectations. | ||
11 | */ | ||
12 | #ifndef __SGIDEFS_H | ||
13 | #define __SGIDEFS_H | ||
14 | |||
15 | #include <asm/sgidefs.h> | ||
16 | |||
17 | #endif /* __SGIDEFS_H */ | ||
diff --git a/include/asm-mips/mach-generic/timex.h b/include/asm-mips/mach-generic/timex.h index c6a2e5f0574a..48b4cfaa0d50 100644 --- a/include/asm-mips/mach-generic/timex.h +++ b/include/asm-mips/mach-generic/timex.h | |||
@@ -3,20 +3,11 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 2003 by Ralf Baechle | 6 | * Copyright (C) 2003, 2005 by Ralf Baechle |
7 | */ | 7 | */ |
8 | #ifndef __ASM_MACH_GENERIC_TIMEX_H | 8 | #ifndef __ASM_MACH_GENERIC_TIMEX_H |
9 | #define __ASM_MACH_GENERIC_TIMEX_H | 9 | #define __ASM_MACH_GENERIC_TIMEX_H |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | |||
13 | /* | ||
14 | * Last remaining user of the i8254 PIC, will be converted, too ... | ||
15 | */ | ||
16 | #ifdef CONFIG_SNI_RM200_PCI | ||
17 | #define CLOCK_TICK_RATE 1193182 | ||
18 | #else | ||
19 | #define CLOCK_TICK_RATE 500000 | 11 | #define CLOCK_TICK_RATE 500000 |
20 | #endif | ||
21 | 12 | ||
22 | #endif /* __ASM_MACH_GENERIC_TIMEX_H */ | 13 | #endif /* __ASM_MACH_GENERIC_TIMEX_H */ |
diff --git a/include/asm-mips/mach-rm200/timex.h b/include/asm-mips/mach-rm200/timex.h new file mode 100644 index 000000000000..11ff6cb0f214 --- /dev/null +++ b/include/asm-mips/mach-rm200/timex.h | |||
@@ -0,0 +1,13 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2003, 2005 by Ralf Baechle | ||
7 | */ | ||
8 | #ifndef __ASM_MACH_RM200_TIMEX_H | ||
9 | #define __ASM_MACH_RM200_TIMEX_H | ||
10 | |||
11 | #define CLOCK_TICK_RATE 1193182 | ||
12 | |||
13 | #endif /* __ASM_MACH_RM200_TIMEX_H */ | ||
diff --git a/include/asm-mips/mman.h b/include/asm-mips/mman.h index dd17c8bd62a1..046cf686bee7 100644 --- a/include/asm-mips/mman.h +++ b/include/asm-mips/mman.h | |||
@@ -60,15 +60,19 @@ | |||
60 | #define MCL_CURRENT 1 /* lock all current mappings */ | 60 | #define MCL_CURRENT 1 /* lock all current mappings */ |
61 | #define MCL_FUTURE 2 /* lock all future mappings */ | 61 | #define MCL_FUTURE 2 /* lock all future mappings */ |
62 | 62 | ||
63 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | 63 | #define MADV_NORMAL 0 /* no further special treatment */ |
64 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | 64 | #define MADV_RANDOM 1 /* expect random page references */ |
65 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | 65 | #define MADV_SEQUENTIAL 2 /* expect sequential page references */ |
66 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | 66 | #define MADV_WILLNEED 3 /* will need these pages */ |
67 | #define MADV_DONTNEED 0x4 /* discard these pages */ | 67 | #define MADV_DONTNEED 4 /* don't need these pages */ |
68 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | 68 | |
69 | /* common parameters: try to keep these consistent across architectures */ | ||
70 | #define MADV_REMOVE 9 /* remove these pages & resources */ | ||
71 | #define MADV_DONTFORK 10 /* don't inherit across fork */ | ||
72 | #define MADV_DOFORK 11 /* do inherit across fork */ | ||
69 | 73 | ||
70 | /* compatibility flags */ | 74 | /* compatibility flags */ |
71 | #define MAP_ANON MAP_ANONYMOUS | 75 | #define MAP_ANON MAP_ANONYMOUS |
72 | #define MAP_FILE 0 | 76 | #define MAP_FILE 0 |
73 | 77 | ||
74 | #endif /* _ASM_MMAN_H */ | 78 | #endif /* _ASM_MMAN_H */ |
diff --git a/include/asm-mips/r4kcache.h b/include/asm-mips/r4kcache.h index cc53196efa40..9632c27dad15 100644 --- a/include/asm-mips/r4kcache.h +++ b/include/asm-mips/r4kcache.h | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include <asm/asm.h> | 15 | #include <asm/asm.h> |
16 | #include <asm/cacheops.h> | 16 | #include <asm/cacheops.h> |
17 | #include <asm/cpu-features.h> | ||
17 | 18 | ||
18 | /* | 19 | /* |
19 | * This macro return a properly sign-extended address suitable as base address | 20 | * This macro return a properly sign-extended address suitable as base address |
@@ -78,22 +79,25 @@ static inline void flush_scache_line(unsigned long addr) | |||
78 | cache_op(Hit_Writeback_Inv_SD, addr); | 79 | cache_op(Hit_Writeback_Inv_SD, addr); |
79 | } | 80 | } |
80 | 81 | ||
82 | #define protected_cache_op(op,addr) \ | ||
83 | __asm__ __volatile__( \ | ||
84 | " .set push \n" \ | ||
85 | " .set noreorder \n" \ | ||
86 | " .set mips3 \n" \ | ||
87 | "1: cache %0, (%1) \n" \ | ||
88 | "2: .set pop \n" \ | ||
89 | " .section __ex_table,\"a\" \n" \ | ||
90 | " "STR(PTR)" 1b, 2b \n" \ | ||
91 | " .previous" \ | ||
92 | : \ | ||
93 | : "i" (op), "r" (addr)) | ||
94 | |||
81 | /* | 95 | /* |
82 | * The next two are for badland addresses like signal trampolines. | 96 | * The next two are for badland addresses like signal trampolines. |
83 | */ | 97 | */ |
84 | static inline void protected_flush_icache_line(unsigned long addr) | 98 | static inline void protected_flush_icache_line(unsigned long addr) |
85 | { | 99 | { |
86 | __asm__ __volatile__( | 100 | protected_cache_op(Hit_Invalidate_I, addr); |
87 | " .set push \n" | ||
88 | " .set noreorder \n" | ||
89 | " .set mips3 \n" | ||
90 | "1: cache %0, (%1) \n" | ||
91 | "2: .set pop \n" | ||
92 | " .section __ex_table,\"a\" \n" | ||
93 | " "STR(PTR)" 1b, 2b \n" | ||
94 | " .previous" | ||
95 | : | ||
96 | : "i" (Hit_Invalidate_I), "r" (addr)); | ||
97 | } | 101 | } |
98 | 102 | ||
99 | /* | 103 | /* |
@@ -104,32 +108,12 @@ static inline void protected_flush_icache_line(unsigned long addr) | |||
104 | */ | 108 | */ |
105 | static inline void protected_writeback_dcache_line(unsigned long addr) | 109 | static inline void protected_writeback_dcache_line(unsigned long addr) |
106 | { | 110 | { |
107 | __asm__ __volatile__( | 111 | protected_cache_op(Hit_Writeback_Inv_D, addr); |
108 | " .set push \n" | ||
109 | " .set noreorder \n" | ||
110 | " .set mips3 \n" | ||
111 | "1: cache %0, (%1) \n" | ||
112 | "2: .set pop \n" | ||
113 | " .section __ex_table,\"a\" \n" | ||
114 | " "STR(PTR)" 1b, 2b \n" | ||
115 | " .previous" | ||
116 | : | ||
117 | : "i" (Hit_Writeback_Inv_D), "r" (addr)); | ||
118 | } | 112 | } |
119 | 113 | ||
120 | static inline void protected_writeback_scache_line(unsigned long addr) | 114 | static inline void protected_writeback_scache_line(unsigned long addr) |
121 | { | 115 | { |
122 | __asm__ __volatile__( | 116 | protected_cache_op(Hit_Writeback_Inv_SD, addr); |
123 | " .set push \n" | ||
124 | " .set noreorder \n" | ||
125 | " .set mips3 \n" | ||
126 | "1: cache %0, (%1) \n" | ||
127 | "2: .set pop \n" | ||
128 | " .section __ex_table,\"a\" \n" | ||
129 | " "STR(PTR)" 1b, 2b \n" | ||
130 | " .previous" | ||
131 | : | ||
132 | : "i" (Hit_Writeback_Inv_SD), "r" (addr)); | ||
133 | } | 117 | } |
134 | 118 | ||
135 | /* | 119 | /* |
@@ -295,4 +279,28 @@ __BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 64) | |||
295 | __BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 64) | 279 | __BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 64) |
296 | __BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 128) | 280 | __BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 128) |
297 | 281 | ||
282 | /* build blast_xxx_range, protected_blast_xxx_range */ | ||
283 | #define __BUILD_BLAST_CACHE_RANGE(pfx, desc, hitop, prot) \ | ||
284 | static inline void prot##blast_##pfx##cache##_range(unsigned long start, \ | ||
285 | unsigned long end) \ | ||
286 | { \ | ||
287 | unsigned long lsize = cpu_##desc##_line_size(); \ | ||
288 | unsigned long addr = start & ~(lsize - 1); \ | ||
289 | unsigned long aend = (end - 1) & ~(lsize - 1); \ | ||
290 | while (1) { \ | ||
291 | prot##cache_op(hitop, addr); \ | ||
292 | if (addr == aend) \ | ||
293 | break; \ | ||
294 | addr += lsize; \ | ||
295 | } \ | ||
296 | } | ||
297 | |||
298 | __BUILD_BLAST_CACHE_RANGE(d, dcache, Hit_Writeback_Inv_D, protected_) | ||
299 | __BUILD_BLAST_CACHE_RANGE(s, scache, Hit_Writeback_Inv_SD, protected_) | ||
300 | __BUILD_BLAST_CACHE_RANGE(i, icache, Hit_Invalidate_I, protected_) | ||
301 | __BUILD_BLAST_CACHE_RANGE(d, dcache, Hit_Writeback_Inv_D, ) | ||
302 | __BUILD_BLAST_CACHE_RANGE(s, scache, Hit_Writeback_Inv_SD, ) | ||
303 | /* blast_inv_dcache_range */ | ||
304 | __BUILD_BLAST_CACHE_RANGE(inv_d, dcache, Hit_Invalidate_D, ) | ||
305 | |||
298 | #endif /* _ASM_R4KCACHE_H */ | 306 | #endif /* _ASM_R4KCACHE_H */ |
diff --git a/include/asm-mips/uaccess.h b/include/asm-mips/uaccess.h index 91d813a37823..b96f3e0f3933 100644 --- a/include/asm-mips/uaccess.h +++ b/include/asm-mips/uaccess.h | |||
@@ -233,7 +233,7 @@ do { \ | |||
233 | #define __get_user_check(x,ptr,size) \ | 233 | #define __get_user_check(x,ptr,size) \ |
234 | ({ \ | 234 | ({ \ |
235 | long __gu_err = -EFAULT; \ | 235 | long __gu_err = -EFAULT; \ |
236 | const void __user * __gu_ptr = (ptr); \ | 236 | const __typeof__(*(ptr)) __user * __gu_ptr = (ptr); \ |
237 | \ | 237 | \ |
238 | if (likely(access_ok(VERIFY_READ, __gu_ptr, size))) \ | 238 | if (likely(access_ok(VERIFY_READ, __gu_ptr, size))) \ |
239 | __get_user_common((x), size, __gu_ptr); \ | 239 | __get_user_common((x), size, __gu_ptr); \ |
@@ -258,7 +258,7 @@ do { \ | |||
258 | : "=r" (__gu_err), "=r" (__gu_tmp) \ | 258 | : "=r" (__gu_err), "=r" (__gu_tmp) \ |
259 | : "0" (0), "o" (__m(addr)), "i" (-EFAULT)); \ | 259 | : "0" (0), "o" (__m(addr)), "i" (-EFAULT)); \ |
260 | \ | 260 | \ |
261 | (val) = (__typeof__(val)) __gu_tmp; \ | 261 | (val) = (__typeof__(*(addr))) __gu_tmp; \ |
262 | } | 262 | } |
263 | 263 | ||
264 | /* | 264 | /* |
@@ -266,6 +266,8 @@ do { \ | |||
266 | */ | 266 | */ |
267 | #define __get_user_asm_ll32(val, addr) \ | 267 | #define __get_user_asm_ll32(val, addr) \ |
268 | { \ | 268 | { \ |
269 | unsigned long long __gu_tmp; \ | ||
270 | \ | ||
269 | __asm__ __volatile__( \ | 271 | __asm__ __volatile__( \ |
270 | "1: lw %1, (%3) \n" \ | 272 | "1: lw %1, (%3) \n" \ |
271 | "2: lw %D1, 4(%3) \n" \ | 273 | "2: lw %D1, 4(%3) \n" \ |
@@ -280,8 +282,9 @@ do { \ | |||
280 | " " __UA_ADDR " 1b, 4b \n" \ | 282 | " " __UA_ADDR " 1b, 4b \n" \ |
281 | " " __UA_ADDR " 2b, 4b \n" \ | 283 | " " __UA_ADDR " 2b, 4b \n" \ |
282 | " .previous \n" \ | 284 | " .previous \n" \ |
283 | : "=r" (__gu_err), "=&r" (val) \ | 285 | : "=r" (__gu_err), "=&r" (__gu_tmp) \ |
284 | : "0" (0), "r" (addr), "i" (-EFAULT)); \ | 286 | : "0" (0), "r" (addr), "i" (-EFAULT)); \ |
287 | (val) = (__typeof__(*(addr))) __gu_tmp; \ | ||
285 | } | 288 | } |
286 | 289 | ||
287 | /* | 290 | /* |
diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h index e7ff9b187783..b5c78a4a0192 100644 --- a/include/asm-mips/unistd.h +++ b/include/asm-mips/unistd.h | |||
@@ -313,7 +313,7 @@ | |||
313 | #define __NR_mknodat (__NR_Linux + 290) | 313 | #define __NR_mknodat (__NR_Linux + 290) |
314 | #define __NR_fchownat (__NR_Linux + 291) | 314 | #define __NR_fchownat (__NR_Linux + 291) |
315 | #define __NR_futimesat (__NR_Linux + 292) | 315 | #define __NR_futimesat (__NR_Linux + 292) |
316 | #define __NR_newfstatat (__NR_Linux + 293) | 316 | #define __NR_fstatat (__NR_Linux + 293) |
317 | #define __NR_unlinkat (__NR_Linux + 294) | 317 | #define __NR_unlinkat (__NR_Linux + 294) |
318 | #define __NR_renameat (__NR_Linux + 295) | 318 | #define __NR_renameat (__NR_Linux + 295) |
319 | #define __NR_linkat (__NR_Linux + 296) | 319 | #define __NR_linkat (__NR_Linux + 296) |
@@ -593,7 +593,7 @@ | |||
593 | #define __NR_mknodat (__NR_Linux + 249) | 593 | #define __NR_mknodat (__NR_Linux + 249) |
594 | #define __NR_fchownat (__NR_Linux + 250) | 594 | #define __NR_fchownat (__NR_Linux + 250) |
595 | #define __NR_futimesat (__NR_Linux + 251) | 595 | #define __NR_futimesat (__NR_Linux + 251) |
596 | #define __NR_newfstatat (__NR_Linux + 252) | 596 | #define __NR_fstatat (__NR_Linux + 252) |
597 | #define __NR_unlinkat (__NR_Linux + 253) | 597 | #define __NR_unlinkat (__NR_Linux + 253) |
598 | #define __NR_renameat (__NR_Linux + 254) | 598 | #define __NR_renameat (__NR_Linux + 254) |
599 | #define __NR_linkat (__NR_Linux + 255) | 599 | #define __NR_linkat (__NR_Linux + 255) |
@@ -877,7 +877,7 @@ | |||
877 | #define __NR_mknodat (__NR_Linux + 253) | 877 | #define __NR_mknodat (__NR_Linux + 253) |
878 | #define __NR_fchownat (__NR_Linux + 254) | 878 | #define __NR_fchownat (__NR_Linux + 254) |
879 | #define __NR_futimesat (__NR_Linux + 255) | 879 | #define __NR_futimesat (__NR_Linux + 255) |
880 | #define __NR_newfstatat (__NR_Linux + 256) | 880 | #define __NR_fstatat (__NR_Linux + 256) |
881 | #define __NR_unlinkat (__NR_Linux + 257) | 881 | #define __NR_unlinkat (__NR_Linux + 257) |
882 | #define __NR_renameat (__NR_Linux + 258) | 882 | #define __NR_renameat (__NR_Linux + 258) |
883 | #define __NR_linkat (__NR_Linux + 259) | 883 | #define __NR_linkat (__NR_Linux + 259) |
@@ -1184,10 +1184,8 @@ type name (atype a,btype b,ctype c,dtype d,etype e,ftype f) \ | |||
1184 | #define __ARCH_WANT_SYS_SIGPENDING | 1184 | #define __ARCH_WANT_SYS_SIGPENDING |
1185 | #define __ARCH_WANT_SYS_SIGPROCMASK | 1185 | #define __ARCH_WANT_SYS_SIGPROCMASK |
1186 | #define __ARCH_WANT_SYS_RT_SIGACTION | 1186 | #define __ARCH_WANT_SYS_RT_SIGACTION |
1187 | # ifndef __mips64 | ||
1188 | # define __ARCH_WANT_STAT64 | ||
1189 | # endif | ||
1190 | # ifdef CONFIG_32BIT | 1187 | # ifdef CONFIG_32BIT |
1188 | # define __ARCH_WANT_STAT64 | ||
1191 | # define __ARCH_WANT_SYS_TIME | 1189 | # define __ARCH_WANT_SYS_TIME |
1192 | # endif | 1190 | # endif |
1193 | # ifdef CONFIG_MIPS32_O32 | 1191 | # ifdef CONFIG_MIPS32_O32 |
diff --git a/include/asm-parisc/mman.h b/include/asm-parisc/mman.h index 736b0abcac05..0ef15ee0f17e 100644 --- a/include/asm-parisc/mman.h +++ b/include/asm-parisc/mman.h | |||
@@ -38,7 +38,11 @@ | |||
38 | #define MADV_SPACEAVAIL 5 /* insure that resources are reserved */ | 38 | #define MADV_SPACEAVAIL 5 /* insure that resources are reserved */ |
39 | #define MADV_VPS_PURGE 6 /* Purge pages from VM page cache */ | 39 | #define MADV_VPS_PURGE 6 /* Purge pages from VM page cache */ |
40 | #define MADV_VPS_INHERIT 7 /* Inherit parents page size */ | 40 | #define MADV_VPS_INHERIT 7 /* Inherit parents page size */ |
41 | #define MADV_REMOVE 8 /* remove these pages & resources */ | 41 | |
42 | /* common/generic parameters */ | ||
43 | #define MADV_REMOVE 9 /* remove these pages & resources */ | ||
44 | #define MADV_DONTFORK 10 /* don't inherit across fork */ | ||
45 | #define MADV_DOFORK 11 /* do inherit across fork */ | ||
42 | 46 | ||
43 | /* The range 12-64 is reserved for page size specification. */ | 47 | /* The range 12-64 is reserved for page size specification. */ |
44 | #define MADV_4K_PAGES 12 /* Use 4K pages */ | 48 | #define MADV_4K_PAGES 12 /* Use 4K pages */ |
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h index 64210549f56b..90d005bb4d1c 100644 --- a/include/asm-powerpc/cputable.h +++ b/include/asm-powerpc/cputable.h | |||
@@ -159,9 +159,11 @@ extern void do_cpu_ftr_fixups(unsigned long offset); | |||
159 | #endif | 159 | #endif |
160 | 160 | ||
161 | /* We need to mark all pages as being coherent if we're SMP or we | 161 | /* We need to mark all pages as being coherent if we're SMP or we |
162 | * have a 74[45]x and an MPC107 host bridge. | 162 | * have a 74[45]x and an MPC107 host bridge. Also 83xx requires |
163 | * it for PCI "streaming/prefetch" to work properly. | ||
163 | */ | 164 | */ |
164 | #if defined(CONFIG_SMP) || defined(CONFIG_MPC10X_BRIDGE) | 165 | #if defined(CONFIG_SMP) || defined(CONFIG_MPC10X_BRIDGE) \ |
166 | || defined(CONFIG_PPC_83xx) | ||
165 | #define CPU_FTR_COMMON CPU_FTR_NEED_COHERENT | 167 | #define CPU_FTR_COMMON CPU_FTR_NEED_COHERENT |
166 | #else | 168 | #else |
167 | #define CPU_FTR_COMMON 0 | 169 | #define CPU_FTR_COMMON 0 |
@@ -277,7 +279,8 @@ enum { | |||
277 | CPU_FTRS_G2_LE = CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | | 279 | CPU_FTRS_G2_LE = CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | |
278 | CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_HAS_HIGH_BATS, | 280 | CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_HAS_HIGH_BATS, |
279 | CPU_FTRS_E300 = CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | | 281 | CPU_FTRS_E300 = CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | |
280 | CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_HAS_HIGH_BATS, | 282 | CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_HAS_HIGH_BATS | |
283 | CPU_FTR_COMMON, | ||
281 | CPU_FTRS_CLASSIC32 = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | | 284 | CPU_FTRS_CLASSIC32 = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | |
282 | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE, | 285 | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE, |
283 | CPU_FTRS_POWER3_32 = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | | 286 | CPU_FTRS_POWER3_32 = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | |
diff --git a/include/asm-powerpc/mman.h b/include/asm-powerpc/mman.h index a2e34c21b44f..24cf664a8295 100644 --- a/include/asm-powerpc/mman.h +++ b/include/asm-powerpc/mman.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _ASM_POWERPC_MMAN_H | 1 | #ifndef _ASM_POWERPC_MMAN_H |
2 | #define _ASM_POWERPC_MMAN_H | 2 | #define _ASM_POWERPC_MMAN_H |
3 | 3 | ||
4 | #include <asm-generic/mman.h> | ||
5 | |||
4 | /* | 6 | /* |
5 | * This program is free software; you can redistribute it and/or | 7 | * This program is free software; you can redistribute it and/or |
6 | * modify it under the terms of the GNU General Public License | 8 | * modify it under the terms of the GNU General Public License |
@@ -8,19 +10,6 @@ | |||
8 | * 2 of the License, or (at your option) any later version. | 10 | * 2 of the License, or (at your option) any later version. |
9 | */ | 11 | */ |
10 | 12 | ||
11 | #define PROT_READ 0x1 /* page can be read */ | ||
12 | #define PROT_WRITE 0x2 /* page can be written */ | ||
13 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
14 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
15 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
16 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
17 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
18 | |||
19 | #define MAP_SHARED 0x01 /* Share changes */ | ||
20 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
21 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
22 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
23 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
24 | #define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */ | 13 | #define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */ |
25 | #define MAP_NORESERVE 0x40 /* don't reserve swap pages */ | 14 | #define MAP_NORESERVE 0x40 /* don't reserve swap pages */ |
26 | #define MAP_LOCKED 0x80 | 15 | #define MAP_LOCKED 0x80 |
@@ -29,25 +18,10 @@ | |||
29 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 18 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
30 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ | 19 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ |
31 | 20 | ||
32 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
33 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
34 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
35 | |||
36 | #define MCL_CURRENT 0x2000 /* lock all currently mapped pages */ | 21 | #define MCL_CURRENT 0x2000 /* lock all currently mapped pages */ |
37 | #define MCL_FUTURE 0x4000 /* lock all additions to address space */ | 22 | #define MCL_FUTURE 0x4000 /* lock all additions to address space */ |
38 | 23 | ||
39 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 24 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
40 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 25 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
41 | 26 | ||
42 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
43 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
44 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
45 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
46 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
47 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
48 | |||
49 | /* compatibility flags */ | ||
50 | #define MAP_ANON MAP_ANONYMOUS | ||
51 | #define MAP_FILE 0 | ||
52 | |||
53 | #endif /* _ASM_POWERPC_MMAN_H */ | 27 | #endif /* _ASM_POWERPC_MMAN_H */ |
diff --git a/include/asm-powerpc/mmu.h b/include/asm-powerpc/mmu.h index d096d9e76ad7..b0b9a3f8cdc2 100644 --- a/include/asm-powerpc/mmu.h +++ b/include/asm-powerpc/mmu.h | |||
@@ -112,6 +112,7 @@ typedef struct { | |||
112 | } hpte_t; | 112 | } hpte_t; |
113 | 113 | ||
114 | extern hpte_t *htab_address; | 114 | extern hpte_t *htab_address; |
115 | extern unsigned long htab_size_bytes; | ||
115 | extern unsigned long htab_hash_mask; | 116 | extern unsigned long htab_hash_mask; |
116 | 117 | ||
117 | /* | 118 | /* |
diff --git a/include/asm-powerpc/pgalloc.h b/include/asm-powerpc/pgalloc.h index 9f5b052784a5..a00ee002cd11 100644 --- a/include/asm-powerpc/pgalloc.h +++ b/include/asm-powerpc/pgalloc.h | |||
@@ -146,7 +146,7 @@ extern void pgtable_free_tlb(struct mmu_gather *tlb, pgtable_free_t pgf); | |||
146 | pgtable_free_tlb(tlb, pgtable_free_cache(pmd, \ | 146 | pgtable_free_tlb(tlb, pgtable_free_cache(pmd, \ |
147 | PMD_CACHE_NUM, PMD_TABLE_SIZE-1)) | 147 | PMD_CACHE_NUM, PMD_TABLE_SIZE-1)) |
148 | #ifndef CONFIG_PPC_64K_PAGES | 148 | #ifndef CONFIG_PPC_64K_PAGES |
149 | #define __pud_free_tlb(tlb, pmd) \ | 149 | #define __pud_free_tlb(tlb, pud) \ |
150 | pgtable_free_tlb(tlb, pgtable_free_cache(pud, \ | 150 | pgtable_free_tlb(tlb, pgtable_free_cache(pud, \ |
151 | PUD_CACHE_NUM, PUD_TABLE_SIZE-1)) | 151 | PUD_CACHE_NUM, PUD_TABLE_SIZE-1)) |
152 | #endif /* CONFIG_PPC_64K_PAGES */ | 152 | #endif /* CONFIG_PPC_64K_PAGES */ |
diff --git a/include/asm-powerpc/reg.h b/include/asm-powerpc/reg.h index 12ecc9b9f285..72bfe3af0460 100644 --- a/include/asm-powerpc/reg.h +++ b/include/asm-powerpc/reg.h | |||
@@ -615,27 +615,9 @@ | |||
615 | #define proc_trap() asm volatile("trap") | 615 | #define proc_trap() asm volatile("trap") |
616 | 616 | ||
617 | #ifdef CONFIG_PPC64 | 617 | #ifdef CONFIG_PPC64 |
618 | static inline void ppc64_runlatch_on(void) | 618 | |
619 | { | 619 | extern void ppc64_runlatch_on(void); |
620 | unsigned long ctrl; | 620 | extern void ppc64_runlatch_off(void); |
621 | |||
622 | if (cpu_has_feature(CPU_FTR_CTRL)) { | ||
623 | ctrl = mfspr(SPRN_CTRLF); | ||
624 | ctrl |= CTRL_RUNLATCH; | ||
625 | mtspr(SPRN_CTRLT, ctrl); | ||
626 | } | ||
627 | } | ||
628 | |||
629 | static inline void ppc64_runlatch_off(void) | ||
630 | { | ||
631 | unsigned long ctrl; | ||
632 | |||
633 | if (cpu_has_feature(CPU_FTR_CTRL)) { | ||
634 | ctrl = mfspr(SPRN_CTRLF); | ||
635 | ctrl &= ~CTRL_RUNLATCH; | ||
636 | mtspr(SPRN_CTRLT, ctrl); | ||
637 | } | ||
638 | } | ||
639 | 621 | ||
640 | extern unsigned long scom970_read(unsigned int address); | 622 | extern unsigned long scom970_read(unsigned int address); |
641 | extern void scom970_write(unsigned int address, unsigned long value); | 623 | extern void scom970_write(unsigned int address, unsigned long value); |
@@ -645,15 +627,6 @@ extern void scom970_write(unsigned int address, unsigned long value); | |||
645 | #define __get_SP() ({unsigned long sp; \ | 627 | #define __get_SP() ({unsigned long sp; \ |
646 | asm volatile("mr %0,1": "=r" (sp)); sp;}) | 628 | asm volatile("mr %0,1": "=r" (sp)); sp;}) |
647 | 629 | ||
648 | #else /* __ASSEMBLY__ */ | ||
649 | |||
650 | #define RUNLATCH_ON(REG) \ | ||
651 | BEGIN_FTR_SECTION \ | ||
652 | mfspr (REG),SPRN_CTRLF; \ | ||
653 | ori (REG),(REG),CTRL_RUNLATCH; \ | ||
654 | mtspr SPRN_CTRLT,(REG); \ | ||
655 | END_FTR_SECTION_IFSET(CPU_FTR_CTRL) | ||
656 | |||
657 | #endif /* __ASSEMBLY__ */ | 630 | #endif /* __ASSEMBLY__ */ |
658 | #endif /* __KERNEL__ */ | 631 | #endif /* __KERNEL__ */ |
659 | #endif /* _ASM_POWERPC_REG_H */ | 632 | #endif /* _ASM_POWERPC_REG_H */ |
diff --git a/include/asm-powerpc/thread_info.h b/include/asm-powerpc/thread_info.h index c044ec16a879..237fc2b72974 100644 --- a/include/asm-powerpc/thread_info.h +++ b/include/asm-powerpc/thread_info.h | |||
@@ -113,7 +113,7 @@ static inline struct thread_info *current_thread_info(void) | |||
113 | #define TIF_POLLING_NRFLAG 4 /* true if poll_idle() is polling | 113 | #define TIF_POLLING_NRFLAG 4 /* true if poll_idle() is polling |
114 | TIF_NEED_RESCHED */ | 114 | TIF_NEED_RESCHED */ |
115 | #define TIF_32BIT 5 /* 32 bit binary */ | 115 | #define TIF_32BIT 5 /* 32 bit binary */ |
116 | /* #define SPARE 6 */ | 116 | #define TIF_RUNLATCH 6 /* Is the runlatch enabled? */ |
117 | #define TIF_ABI_PENDING 7 /* 32/64 bit switch needed */ | 117 | #define TIF_ABI_PENDING 7 /* 32/64 bit switch needed */ |
118 | #define TIF_SYSCALL_AUDIT 8 /* syscall auditing active */ | 118 | #define TIF_SYSCALL_AUDIT 8 /* syscall auditing active */ |
119 | #define TIF_SINGLESTEP 9 /* singlestepping active */ | 119 | #define TIF_SINGLESTEP 9 /* singlestepping active */ |
@@ -131,7 +131,7 @@ static inline struct thread_info *current_thread_info(void) | |||
131 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 131 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
132 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 132 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
133 | #define _TIF_32BIT (1<<TIF_32BIT) | 133 | #define _TIF_32BIT (1<<TIF_32BIT) |
134 | /* #define _SPARE (1<<SPARE) */ | 134 | #define _TIF_RUNLATCH (1<<TIF_RUNLATCH) |
135 | #define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING) | 135 | #define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING) |
136 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) | 136 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) |
137 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) | 137 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) |
diff --git a/include/asm-ppc/machdep.h b/include/asm-ppc/machdep.h index 39200def8d11..a3e8a45e45a9 100644 --- a/include/asm-ppc/machdep.h +++ b/include/asm-ppc/machdep.h | |||
@@ -154,19 +154,6 @@ extern char cmd_line[COMMAND_LINE_SIZE]; | |||
154 | 154 | ||
155 | extern void setup_pci_ptrs(void); | 155 | extern void setup_pci_ptrs(void); |
156 | 156 | ||
157 | /* | ||
158 | * Power macintoshes have either a CUDA or a PMU controlling | ||
159 | * system reset, power, NVRAM, RTC. | ||
160 | */ | ||
161 | typedef enum sys_ctrler_kind { | ||
162 | SYS_CTRLER_UNKNOWN = 0, | ||
163 | SYS_CTRLER_CUDA = 1, | ||
164 | SYS_CTRLER_PMU = 2, | ||
165 | SYS_CTRLER_SMU = 3, | ||
166 | } sys_ctrler_t; | ||
167 | |||
168 | extern sys_ctrler_t sys_ctrler; | ||
169 | |||
170 | #ifdef CONFIG_SMP | 157 | #ifdef CONFIG_SMP |
171 | struct smp_ops_t { | 158 | struct smp_ops_t { |
172 | void (*message_pass)(int target, int msg); | 159 | void (*message_pass)(int target, int msg); |
diff --git a/include/asm-s390/bitops.h b/include/asm-s390/bitops.h index 61232760cc3b..3628899f48bb 100644 --- a/include/asm-s390/bitops.h +++ b/include/asm-s390/bitops.h | |||
@@ -518,8 +518,8 @@ static inline int __test_bit(unsigned long nr, const volatile unsigned long *ptr | |||
518 | 518 | ||
519 | static inline int | 519 | static inline int |
520 | __constant_test_bit(unsigned long nr, const volatile unsigned long *addr) { | 520 | __constant_test_bit(unsigned long nr, const volatile unsigned long *addr) { |
521 | return ((((volatile char *) addr) | 521 | return (((volatile char *) addr) |
522 | [(nr^(__BITOPS_WORDSIZE-8))>>3] & (1<<(nr&7)))) != 0; | 522 | [(nr^(__BITOPS_WORDSIZE-8))>>3] & (1<<(nr&7))) != 0; |
523 | } | 523 | } |
524 | 524 | ||
525 | #define test_bit(nr,addr) \ | 525 | #define test_bit(nr,addr) \ |
diff --git a/include/asm-s390/dasd.h b/include/asm-s390/dasd.h index c744ff33b1df..1630c26e8f45 100644 --- a/include/asm-s390/dasd.h +++ b/include/asm-s390/dasd.h | |||
@@ -204,8 +204,7 @@ typedef struct attrib_data_t { | |||
204 | * | 204 | * |
205 | * Here ist how the ioctl-nr should be used: | 205 | * Here ist how the ioctl-nr should be used: |
206 | * 0 - 31 DASD driver itself | 206 | * 0 - 31 DASD driver itself |
207 | * 32 - 229 still open | 207 | * 32 - 239 still open |
208 | * 230 - 239 DASD extended error reporting | ||
209 | * 240 - 255 reserved for EMC | 208 | * 240 - 255 reserved for EMC |
210 | *******************************************************************************/ | 209 | *******************************************************************************/ |
211 | 210 | ||
@@ -237,22 +236,12 @@ typedef struct attrib_data_t { | |||
237 | #define BIODASDPSRD _IOR(DASD_IOCTL_LETTER,4,dasd_rssd_perf_stats_t) | 236 | #define BIODASDPSRD _IOR(DASD_IOCTL_LETTER,4,dasd_rssd_perf_stats_t) |
238 | /* Get Attributes (cache operations) */ | 237 | /* Get Attributes (cache operations) */ |
239 | #define BIODASDGATTR _IOR(DASD_IOCTL_LETTER,5,attrib_data_t) | 238 | #define BIODASDGATTR _IOR(DASD_IOCTL_LETTER,5,attrib_data_t) |
240 | /* retrieve extended error-reporting value */ | ||
241 | #define BIODASDEERGET _IOR(DASD_IOCTL_LETTER,6,int) | ||
242 | 239 | ||
243 | 240 | ||
244 | /* #define BIODASDFORMAT _IOW(IOCTL_LETTER,0,format_data_t) , deprecated */ | 241 | /* #define BIODASDFORMAT _IOW(IOCTL_LETTER,0,format_data_t) , deprecated */ |
245 | #define BIODASDFMT _IOW(DASD_IOCTL_LETTER,1,format_data_t) | 242 | #define BIODASDFMT _IOW(DASD_IOCTL_LETTER,1,format_data_t) |
246 | /* Set Attributes (cache operations) */ | 243 | /* Set Attributes (cache operations) */ |
247 | #define BIODASDSATTR _IOW(DASD_IOCTL_LETTER,2,attrib_data_t) | 244 | #define BIODASDSATTR _IOW(DASD_IOCTL_LETTER,2,attrib_data_t) |
248 | /* retrieve extended error-reporting value */ | ||
249 | #define BIODASDEERSET _IOW(DASD_IOCTL_LETTER,3,int) | ||
250 | |||
251 | |||
252 | /* remove all records from the eer buffer */ | ||
253 | #define DASD_EER_PURGE _IO(DASD_IOCTL_LETTER,230) | ||
254 | /* set the number of pages that are used for the internal eer buffer */ | ||
255 | #define DASD_EER_SETBUFSIZE _IOW(DASD_IOCTL_LETTER,230,int) | ||
256 | 245 | ||
257 | 246 | ||
258 | #endif /* DASD_H */ | 247 | #endif /* DASD_H */ |
diff --git a/include/asm-s390/mman.h b/include/asm-s390/mman.h index c8d5409b5d56..7839767d837e 100644 --- a/include/asm-s390/mman.h +++ b/include/asm-s390/mman.h | |||
@@ -9,19 +9,7 @@ | |||
9 | #ifndef __S390_MMAN_H__ | 9 | #ifndef __S390_MMAN_H__ |
10 | #define __S390_MMAN_H__ | 10 | #define __S390_MMAN_H__ |
11 | 11 | ||
12 | #define PROT_READ 0x1 /* page can be read */ | 12 | #include <asm-generic/mman.h> |
13 | #define PROT_WRITE 0x2 /* page can be written */ | ||
14 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
15 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
16 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
17 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
18 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
19 | |||
20 | #define MAP_SHARED 0x01 /* Share changes */ | ||
21 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
22 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
23 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
24 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
25 | 13 | ||
26 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 14 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
27 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 15 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -31,22 +19,7 @@ | |||
31 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 19 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
32 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 20 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
33 | 21 | ||
34 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
35 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
36 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
37 | |||
38 | #define MCL_CURRENT 1 /* lock all current mappings */ | 22 | #define MCL_CURRENT 1 /* lock all current mappings */ |
39 | #define MCL_FUTURE 2 /* lock all future mappings */ | 23 | #define MCL_FUTURE 2 /* lock all future mappings */ |
40 | 24 | ||
41 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
42 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
43 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
44 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
45 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
46 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
47 | |||
48 | /* compatibility flags */ | ||
49 | #define MAP_ANON MAP_ANONYMOUS | ||
50 | #define MAP_FILE 0 | ||
51 | |||
52 | #endif /* __S390_MMAN_H__ */ | 25 | #endif /* __S390_MMAN_H__ */ |
diff --git a/include/asm-s390/setup.h b/include/asm-s390/setup.h index 348a88137445..da3fd4a7bb32 100644 --- a/include/asm-s390/setup.h +++ b/include/asm-s390/setup.h | |||
@@ -8,6 +8,8 @@ | |||
8 | #ifndef _ASM_S390_SETUP_H | 8 | #ifndef _ASM_S390_SETUP_H |
9 | #define _ASM_S390_SETUP_H | 9 | #define _ASM_S390_SETUP_H |
10 | 10 | ||
11 | #ifdef __KERNEL__ | ||
12 | |||
11 | #include <asm/types.h> | 13 | #include <asm/types.h> |
12 | 14 | ||
13 | #define PARMAREA 0x10400 | 15 | #define PARMAREA 0x10400 |
@@ -114,7 +116,7 @@ extern u16 ipl_devno; | |||
114 | IPL_PARMBLOCK_ORIGIN) | 116 | IPL_PARMBLOCK_ORIGIN) |
115 | #define IPL_PARMBLOCK_SIZE (IPL_PARMBLOCK_START->hdr.length) | 117 | #define IPL_PARMBLOCK_SIZE (IPL_PARMBLOCK_START->hdr.length) |
116 | 118 | ||
117 | #else | 119 | #else /* __ASSEMBLY__ */ |
118 | 120 | ||
119 | #ifndef __s390x__ | 121 | #ifndef __s390x__ |
120 | #define IPL_DEVICE 0x10404 | 122 | #define IPL_DEVICE 0x10404 |
@@ -127,6 +129,6 @@ extern u16 ipl_devno; | |||
127 | #endif /* __s390x__ */ | 129 | #endif /* __s390x__ */ |
128 | #define COMMAND_LINE 0x10480 | 130 | #define COMMAND_LINE 0x10480 |
129 | 131 | ||
130 | #endif | 132 | #endif /* __ASSEMBLY__ */ |
131 | 133 | #endif /* __KERNEL__ */ | |
132 | #endif | 134 | #endif /* _ASM_S390_SETUP_H */ |
diff --git a/include/asm-s390/smp.h b/include/asm-s390/smp.h index a2ae7628bbaa..444dae5912e6 100644 --- a/include/asm-s390/smp.h +++ b/include/asm-s390/smp.h | |||
@@ -31,6 +31,7 @@ typedef struct | |||
31 | __u16 cpu; | 31 | __u16 cpu; |
32 | } sigp_info; | 32 | } sigp_info; |
33 | 33 | ||
34 | extern void smp_setup_cpu_possible_map(void); | ||
34 | extern int smp_call_function_on(void (*func) (void *info), void *info, | 35 | extern int smp_call_function_on(void (*func) (void *info), void *info, |
35 | int nonatomic, int wait, int cpu); | 36 | int nonatomic, int wait, int cpu); |
36 | #define NO_PROC_ID 0xFF /* No processor magic marker */ | 37 | #define NO_PROC_ID 0xFF /* No processor magic marker */ |
@@ -101,8 +102,10 @@ smp_call_function_on(void (*func) (void *info), void *info, | |||
101 | func(info); | 102 | func(info); |
102 | return 0; | 103 | return 0; |
103 | } | 104 | } |
105 | #define smp_cpu_not_running(cpu) 1 | ||
104 | #define smp_get_cpu(cpu) ({ 0; }) | 106 | #define smp_get_cpu(cpu) ({ 0; }) |
105 | #define smp_put_cpu(cpu) ({ 0; }) | 107 | #define smp_put_cpu(cpu) ({ 0; }) |
108 | #define smp_setup_cpu_possible_map() | ||
106 | #endif | 109 | #endif |
107 | 110 | ||
108 | #endif | 111 | #endif |
diff --git a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h index 29a9f357eb9e..657d582e8149 100644 --- a/include/asm-s390/unistd.h +++ b/include/asm-s390/unistd.h | |||
@@ -285,7 +285,7 @@ | |||
285 | #define __NR_mknodat 290 | 285 | #define __NR_mknodat 290 |
286 | #define __NR_fchownat 291 | 286 | #define __NR_fchownat 291 |
287 | #define __NR_futimesat 292 | 287 | #define __NR_futimesat 292 |
288 | #define __NR_newfstatat 293 | 288 | #define __NR_fstatat64 293 |
289 | #define __NR_unlinkat 294 | 289 | #define __NR_unlinkat 294 |
290 | #define __NR_renameat 295 | 290 | #define __NR_renameat 295 |
291 | #define __NR_linkat 296 | 291 | #define __NR_linkat 296 |
@@ -295,8 +295,9 @@ | |||
295 | #define __NR_faccessat 300 | 295 | #define __NR_faccessat 300 |
296 | #define __NR_pselect6 301 | 296 | #define __NR_pselect6 301 |
297 | #define __NR_ppoll 302 | 297 | #define __NR_ppoll 302 |
298 | #define __NR_unshare 303 | ||
298 | 299 | ||
299 | #define NR_syscalls 303 | 300 | #define NR_syscalls 304 |
300 | 301 | ||
301 | /* | 302 | /* |
302 | * There are some system calls that are not present on 64 bit, some | 303 | * There are some system calls that are not present on 64 bit, some |
@@ -358,6 +359,7 @@ | |||
358 | #undef __NR_fcntl64 | 359 | #undef __NR_fcntl64 |
359 | #undef __NR_sendfile64 | 360 | #undef __NR_sendfile64 |
360 | #undef __NR_fadvise64_64 | 361 | #undef __NR_fadvise64_64 |
362 | #undef __NR_fstatat64 | ||
361 | 363 | ||
362 | #define __NR_select 142 | 364 | #define __NR_select 142 |
363 | #define __NR_getrlimit 191 /* SuS compliant getrlimit */ | 365 | #define __NR_getrlimit 191 /* SuS compliant getrlimit */ |
@@ -380,6 +382,7 @@ | |||
380 | #define __NR_setgid 214 | 382 | #define __NR_setgid 214 |
381 | #define __NR_setfsuid 215 | 383 | #define __NR_setfsuid 215 |
382 | #define __NR_setfsgid 216 | 384 | #define __NR_setfsgid 216 |
385 | #define __NR_newfstatat 293 | ||
383 | 386 | ||
384 | #endif | 387 | #endif |
385 | 388 | ||
diff --git a/include/asm-sh/mman.h b/include/asm-sh/mman.h index 693bd55a3710..156eb0225cf6 100644 --- a/include/asm-sh/mman.h +++ b/include/asm-sh/mman.h | |||
@@ -1,19 +1,7 @@ | |||
1 | #ifndef __ASM_SH_MMAN_H | 1 | #ifndef __ASM_SH_MMAN_H |
2 | #define __ASM_SH_MMAN_H | 2 | #define __ASM_SH_MMAN_H |
3 | 3 | ||
4 | #define PROT_READ 0x1 /* page can be read */ | 4 | #include <asm-generic/mman.h> |
5 | #define PROT_WRITE 0x2 /* page can be written */ | ||
6 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
7 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
8 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
9 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
10 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
11 | |||
12 | #define MAP_SHARED 0x01 /* Share changes */ | ||
13 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
14 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
15 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
16 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
17 | 5 | ||
18 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
19 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -23,22 +11,7 @@ | |||
23 | #define MAP_POPULATE 0x8000 /* populate (prefault) page tables */ | 11 | #define MAP_POPULATE 0x8000 /* populate (prefault) page tables */ |
24 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 12 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
25 | 13 | ||
26 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
27 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
28 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
29 | |||
30 | #define MCL_CURRENT 1 /* lock all current mappings */ | 14 | #define MCL_CURRENT 1 /* lock all current mappings */ |
31 | #define MCL_FUTURE 2 /* lock all future mappings */ | 15 | #define MCL_FUTURE 2 /* lock all future mappings */ |
32 | 16 | ||
33 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
34 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
35 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
36 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
37 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
38 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
39 | |||
40 | /* compatibility flags */ | ||
41 | #define MAP_ANON MAP_ANONYMOUS | ||
42 | #define MAP_FILE 0 | ||
43 | |||
44 | #endif /* __ASM_SH_MMAN_H */ | 17 | #endif /* __ASM_SH_MMAN_H */ |
diff --git a/include/asm-sparc/mman.h b/include/asm-sparc/mman.h index 98435ad8619e..88d1886abf3b 100644 --- a/include/asm-sparc/mman.h +++ b/include/asm-sparc/mman.h | |||
@@ -2,21 +2,10 @@ | |||
2 | #ifndef __SPARC_MMAN_H__ | 2 | #ifndef __SPARC_MMAN_H__ |
3 | #define __SPARC_MMAN_H__ | 3 | #define __SPARC_MMAN_H__ |
4 | 4 | ||
5 | #include <asm-generic/mman.h> | ||
6 | |||
5 | /* SunOS'ified... */ | 7 | /* SunOS'ified... */ |
6 | 8 | ||
7 | #define PROT_READ 0x1 /* page can be read */ | ||
8 | #define PROT_WRITE 0x2 /* page can be written */ | ||
9 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
10 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
11 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
12 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
13 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
14 | |||
15 | #define MAP_SHARED 0x01 /* Share changes */ | ||
16 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
17 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
18 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
19 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
20 | #define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */ | 9 | #define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */ |
21 | #define MAP_NORESERVE 0x40 /* don't reserve swap pages */ | 10 | #define MAP_NORESERVE 0x40 /* don't reserve swap pages */ |
22 | #define MAP_INHERIT 0x80 /* SunOS doesn't do this, but... */ | 11 | #define MAP_INHERIT 0x80 /* SunOS doesn't do this, but... */ |
@@ -27,10 +16,6 @@ | |||
27 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 16 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
28 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ | 17 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ |
29 | 18 | ||
30 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
31 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
32 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
33 | |||
34 | #define MCL_CURRENT 0x2000 /* lock all currently mapped pages */ | 19 | #define MCL_CURRENT 0x2000 /* lock all currently mapped pages */ |
35 | #define MCL_FUTURE 0x4000 /* lock all additions to address space */ | 20 | #define MCL_FUTURE 0x4000 /* lock all additions to address space */ |
36 | 21 | ||
@@ -48,16 +33,6 @@ | |||
48 | #define MC_LOCKAS 5 /* Lock an entire address space of the calling process */ | 33 | #define MC_LOCKAS 5 /* Lock an entire address space of the calling process */ |
49 | #define MC_UNLOCKAS 6 /* Unlock entire address space of calling process */ | 34 | #define MC_UNLOCKAS 6 /* Unlock entire address space of calling process */ |
50 | 35 | ||
51 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
52 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
53 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
54 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
55 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
56 | #define MADV_FREE 0x5 /* (Solaris) contents can be freed */ | 36 | #define MADV_FREE 0x5 /* (Solaris) contents can be freed */ |
57 | #define MADV_REMOVE 0x6 /* remove these pages & resources */ | ||
58 | |||
59 | /* compatibility flags */ | ||
60 | #define MAP_ANON MAP_ANONYMOUS | ||
61 | #define MAP_FILE 0 | ||
62 | 37 | ||
63 | #endif /* __SPARC_MMAN_H__ */ | 38 | #endif /* __SPARC_MMAN_H__ */ |
diff --git a/include/asm-sparc/unistd.h b/include/asm-sparc/unistd.h index 0615d601a7c6..64ec640a40ee 100644 --- a/include/asm-sparc/unistd.h +++ b/include/asm-sparc/unistd.h | |||
@@ -305,7 +305,7 @@ | |||
305 | #define __NR_mknodat 286 | 305 | #define __NR_mknodat 286 |
306 | #define __NR_fchownat 287 | 306 | #define __NR_fchownat 287 |
307 | #define __NR_futimesat 288 | 307 | #define __NR_futimesat 288 |
308 | #define __NR_newfstatat 289 | 308 | #define __NR_fstatat64 289 |
309 | #define __NR_unlinkat 290 | 309 | #define __NR_unlinkat 290 |
310 | #define __NR_renameat 291 | 310 | #define __NR_renameat 291 |
311 | #define __NR_linkat 292 | 311 | #define __NR_linkat 292 |
diff --git a/include/asm-sparc64/mman.h b/include/asm-sparc64/mman.h index cb4b6156194d..6fd878e61435 100644 --- a/include/asm-sparc64/mman.h +++ b/include/asm-sparc64/mman.h | |||
@@ -2,21 +2,10 @@ | |||
2 | #ifndef __SPARC64_MMAN_H__ | 2 | #ifndef __SPARC64_MMAN_H__ |
3 | #define __SPARC64_MMAN_H__ | 3 | #define __SPARC64_MMAN_H__ |
4 | 4 | ||
5 | #include <asm-generic/mman.h> | ||
6 | |||
5 | /* SunOS'ified... */ | 7 | /* SunOS'ified... */ |
6 | 8 | ||
7 | #define PROT_READ 0x1 /* page can be read */ | ||
8 | #define PROT_WRITE 0x2 /* page can be written */ | ||
9 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
10 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
11 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
12 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
13 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
14 | |||
15 | #define MAP_SHARED 0x01 /* Share changes */ | ||
16 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
17 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
18 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
19 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
20 | #define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */ | 9 | #define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */ |
21 | #define MAP_NORESERVE 0x40 /* don't reserve swap pages */ | 10 | #define MAP_NORESERVE 0x40 /* don't reserve swap pages */ |
22 | #define MAP_INHERIT 0x80 /* SunOS doesn't do this, but... */ | 11 | #define MAP_INHERIT 0x80 /* SunOS doesn't do this, but... */ |
@@ -27,10 +16,6 @@ | |||
27 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 16 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
28 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ | 17 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ |
29 | 18 | ||
30 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
31 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
32 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
33 | |||
34 | #define MCL_CURRENT 0x2000 /* lock all currently mapped pages */ | 19 | #define MCL_CURRENT 0x2000 /* lock all currently mapped pages */ |
35 | #define MCL_FUTURE 0x4000 /* lock all additions to address space */ | 20 | #define MCL_FUTURE 0x4000 /* lock all additions to address space */ |
36 | 21 | ||
@@ -48,16 +33,6 @@ | |||
48 | #define MC_LOCKAS 5 /* Lock an entire address space of the calling process */ | 33 | #define MC_LOCKAS 5 /* Lock an entire address space of the calling process */ |
49 | #define MC_UNLOCKAS 6 /* Unlock entire address space of calling process */ | 34 | #define MC_UNLOCKAS 6 /* Unlock entire address space of calling process */ |
50 | 35 | ||
51 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
52 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
53 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
54 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
55 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
56 | #define MADV_FREE 0x5 /* (Solaris) contents can be freed */ | 36 | #define MADV_FREE 0x5 /* (Solaris) contents can be freed */ |
57 | #define MADV_REMOVE 0x6 /* remove these pages & resources */ | ||
58 | |||
59 | /* compatibility flags */ | ||
60 | #define MAP_ANON MAP_ANONYMOUS | ||
61 | #define MAP_FILE 0 | ||
62 | 37 | ||
63 | #endif /* __SPARC64_MMAN_H__ */ | 38 | #endif /* __SPARC64_MMAN_H__ */ |
diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h index c58ba8a096cf..a284986b1541 100644 --- a/include/asm-sparc64/unistd.h +++ b/include/asm-sparc64/unistd.h | |||
@@ -307,7 +307,7 @@ | |||
307 | #define __NR_mknodat 286 | 307 | #define __NR_mknodat 286 |
308 | #define __NR_fchownat 287 | 308 | #define __NR_fchownat 287 |
309 | #define __NR_futimesat 288 | 309 | #define __NR_futimesat 288 |
310 | #define __NR_newfstatat 289 | 310 | #define __NR_fstatat64 289 |
311 | #define __NR_unlinkat 290 | 311 | #define __NR_unlinkat 290 |
312 | #define __NR_renameat 291 | 312 | #define __NR_renameat 291 |
313 | #define __NR_linkat 292 | 313 | #define __NR_linkat 292 |
diff --git a/include/asm-v850/mman.h b/include/asm-v850/mman.h index edc79965193a..edbf6edbfb37 100644 --- a/include/asm-v850/mman.h +++ b/include/asm-v850/mman.h | |||
@@ -1,18 +1,7 @@ | |||
1 | #ifndef __V850_MMAN_H__ | 1 | #ifndef __V850_MMAN_H__ |
2 | #define __V850_MMAN_H__ | 2 | #define __V850_MMAN_H__ |
3 | 3 | ||
4 | #define PROT_READ 0x1 /* page can be read */ | 4 | #include <asm-generic/mman.h> |
5 | #define PROT_WRITE 0x2 /* page can be written */ | ||
6 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
7 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
8 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
9 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
10 | |||
11 | #define MAP_SHARED 0x01 /* Share changes */ | ||
12 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
13 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
14 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
15 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
16 | 5 | ||
17 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
18 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -20,22 +9,7 @@ | |||
20 | #define MAP_LOCKED 0x2000 /* pages are locked */ | 9 | #define MAP_LOCKED 0x2000 /* pages are locked */ |
21 | #define MAP_NORESERVE 0x4000 /* don't check for reservations */ | 10 | #define MAP_NORESERVE 0x4000 /* don't check for reservations */ |
22 | 11 | ||
23 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
24 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
25 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
26 | |||
27 | #define MCL_CURRENT 1 /* lock all current mappings */ | 12 | #define MCL_CURRENT 1 /* lock all current mappings */ |
28 | #define MCL_FUTURE 2 /* lock all future mappings */ | 13 | #define MCL_FUTURE 2 /* lock all future mappings */ |
29 | 14 | ||
30 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
31 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
32 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
33 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
34 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
35 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
36 | |||
37 | /* compatibility flags */ | ||
38 | #define MAP_ANON MAP_ANONYMOUS | ||
39 | #define MAP_FILE 0 | ||
40 | |||
41 | #endif /* __V850_MMAN_H__ */ | 15 | #endif /* __V850_MMAN_H__ */ |
diff --git a/include/asm-x86_64/hpet.h b/include/asm-x86_64/hpet.h index c20c28f5c7a0..08b75c15269a 100644 --- a/include/asm-x86_64/hpet.h +++ b/include/asm-x86_64/hpet.h | |||
@@ -55,6 +55,8 @@ extern int is_hpet_enabled(void); | |||
55 | extern int hpet_rtc_timer_init(void); | 55 | extern int hpet_rtc_timer_init(void); |
56 | extern int oem_force_hpet_timer(void); | 56 | extern int oem_force_hpet_timer(void); |
57 | 57 | ||
58 | extern int hpet_use_timer; | ||
59 | |||
58 | #ifdef CONFIG_HPET_EMULATE_RTC | 60 | #ifdef CONFIG_HPET_EMULATE_RTC |
59 | extern int hpet_mask_rtc_irq_bit(unsigned long bit_mask); | 61 | extern int hpet_mask_rtc_irq_bit(unsigned long bit_mask); |
60 | extern int hpet_set_rtc_irq_bit(unsigned long bit_mask); | 62 | extern int hpet_set_rtc_irq_bit(unsigned long bit_mask); |
diff --git a/include/asm-x86_64/ia32_unistd.h b/include/asm-x86_64/ia32_unistd.h index 20468983d453..eeb2bcd635de 100644 --- a/include/asm-x86_64/ia32_unistd.h +++ b/include/asm-x86_64/ia32_unistd.h | |||
@@ -305,7 +305,7 @@ | |||
305 | #define __NR_ia32_mknodat 297 | 305 | #define __NR_ia32_mknodat 297 |
306 | #define __NR_ia32_fchownat 298 | 306 | #define __NR_ia32_fchownat 298 |
307 | #define __NR_ia32_futimesat 299 | 307 | #define __NR_ia32_futimesat 299 |
308 | #define __NR_ia32_newfstatat 300 | 308 | #define __NR_ia32_fstatat64 300 |
309 | #define __NR_ia32_unlinkat 301 | 309 | #define __NR_ia32_unlinkat 301 |
310 | #define __NR_ia32_renameat 302 | 310 | #define __NR_ia32_renameat 302 |
311 | #define __NR_ia32_linkat 303 | 311 | #define __NR_ia32_linkat 303 |
diff --git a/include/asm-x86_64/mman.h b/include/asm-x86_64/mman.h index d0e97b74f735..dd5cb0534d37 100644 --- a/include/asm-x86_64/mman.h +++ b/include/asm-x86_64/mman.h | |||
@@ -1,19 +1,8 @@ | |||
1 | #ifndef __X8664_MMAN_H__ | 1 | #ifndef __X8664_MMAN_H__ |
2 | #define __X8664_MMAN_H__ | 2 | #define __X8664_MMAN_H__ |
3 | 3 | ||
4 | #define PROT_READ 0x1 /* page can be read */ | 4 | #include <asm-generic/mman.h> |
5 | #define PROT_WRITE 0x2 /* page can be written */ | ||
6 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
7 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
8 | #define PROT_SEM 0x8 | ||
9 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
10 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
11 | 5 | ||
12 | #define MAP_SHARED 0x01 /* Share changes */ | ||
13 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
14 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
15 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
16 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
17 | #define MAP_32BIT 0x40 /* only give out 32bit addresses */ | 6 | #define MAP_32BIT 0x40 /* only give out 32bit addresses */ |
18 | 7 | ||
19 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 8 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
@@ -24,22 +13,7 @@ | |||
24 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 13 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
25 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 14 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
26 | 15 | ||
27 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
28 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
29 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
30 | |||
31 | #define MCL_CURRENT 1 /* lock all current mappings */ | 16 | #define MCL_CURRENT 1 /* lock all current mappings */ |
32 | #define MCL_FUTURE 2 /* lock all future mappings */ | 17 | #define MCL_FUTURE 2 /* lock all future mappings */ |
33 | 18 | ||
34 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
35 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
36 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
37 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
38 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
39 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
40 | |||
41 | /* compatibility flags */ | ||
42 | #define MAP_ANON MAP_ANONYMOUS | ||
43 | #define MAP_FILE 0 | ||
44 | |||
45 | #endif | 19 | #endif |
diff --git a/include/asm-x86_64/proto.h b/include/asm-x86_64/proto.h index c99832e7bf3f..eca3f2d633db 100644 --- a/include/asm-x86_64/proto.h +++ b/include/asm-x86_64/proto.h | |||
@@ -133,6 +133,7 @@ extern int fix_aperture; | |||
133 | extern int force_iommu; | 133 | extern int force_iommu; |
134 | 134 | ||
135 | extern int reboot_force; | 135 | extern int reboot_force; |
136 | extern int notsc_setup(char *); | ||
136 | 137 | ||
137 | extern void smp_local_timer_interrupt(struct pt_regs * regs); | 138 | extern void smp_local_timer_interrupt(struct pt_regs * regs); |
138 | 139 | ||
diff --git a/include/asm-xtensa/mman.h b/include/asm-xtensa/mman.h index 082a7504925e..ba394cbb4807 100644 --- a/include/asm-xtensa/mman.h +++ b/include/asm-xtensa/mman.h | |||
@@ -67,15 +67,19 @@ | |||
67 | #define MCL_CURRENT 1 /* lock all current mappings */ | 67 | #define MCL_CURRENT 1 /* lock all current mappings */ |
68 | #define MCL_FUTURE 2 /* lock all future mappings */ | 68 | #define MCL_FUTURE 2 /* lock all future mappings */ |
69 | 69 | ||
70 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | 70 | #define MADV_NORMAL 0 /* no further special treatment */ |
71 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | 71 | #define MADV_RANDOM 1 /* expect random page references */ |
72 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | 72 | #define MADV_SEQUENTIAL 2 /* expect sequential page references */ |
73 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | 73 | #define MADV_WILLNEED 3 /* will need these pages */ |
74 | #define MADV_DONTNEED 0x4 /* discard these pages */ | 74 | #define MADV_DONTNEED 4 /* don't need these pages */ |
75 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | 75 | |
76 | /* common parameters: try to keep these consistent across architectures */ | ||
77 | #define MADV_REMOVE 9 /* remove these pages & resources */ | ||
78 | #define MADV_DONTFORK 10 /* don't inherit across fork */ | ||
79 | #define MADV_DOFORK 11 /* do inherit across fork */ | ||
76 | 80 | ||
77 | /* compatibility flags */ | 81 | /* compatibility flags */ |
78 | #define MAP_ANON MAP_ANONYMOUS | 82 | #define MAP_ANON MAP_ANONYMOUS |
79 | #define MAP_FILE 0 | 83 | #define MAP_FILE 0 |
80 | 84 | ||
81 | #endif /* _XTENSA_MMAN_H */ | 85 | #endif /* _XTENSA_MMAN_H */ |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 84d3d9f034ce..d3bc25e6d27d 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -427,7 +427,8 @@ extern int acpi_mp_config; | |||
427 | extern struct acpi_table_mcfg_config *pci_mmcfg_config; | 427 | extern struct acpi_table_mcfg_config *pci_mmcfg_config; |
428 | extern int pci_mmcfg_config_num; | 428 | extern int pci_mmcfg_config_num; |
429 | 429 | ||
430 | extern int sbf_port ; | 430 | extern int sbf_port; |
431 | extern unsigned long acpi_video_flags; | ||
431 | 432 | ||
432 | #else /* !CONFIG_ACPI */ | 433 | #else /* !CONFIG_ACPI */ |
433 | 434 | ||
diff --git a/include/linux/compat.h b/include/linux/compat.h index f9ca534787e2..c9ab2a26348c 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -161,5 +161,25 @@ int copy_siginfo_to_user32(struct compat_siginfo __user *to, siginfo_t *from); | |||
161 | int get_compat_sigevent(struct sigevent *event, | 161 | int get_compat_sigevent(struct sigevent *event, |
162 | const struct compat_sigevent __user *u_event); | 162 | const struct compat_sigevent __user *u_event); |
163 | 163 | ||
164 | static inline int compat_timeval_compare(struct compat_timeval *lhs, | ||
165 | struct compat_timeval *rhs) | ||
166 | { | ||
167 | if (lhs->tv_sec < rhs->tv_sec) | ||
168 | return -1; | ||
169 | if (lhs->tv_sec > rhs->tv_sec) | ||
170 | return 1; | ||
171 | return lhs->tv_usec - rhs->tv_usec; | ||
172 | } | ||
173 | |||
174 | static inline int compat_timespec_compare(struct compat_timespec *lhs, | ||
175 | struct compat_timespec *rhs) | ||
176 | { | ||
177 | if (lhs->tv_sec < rhs->tv_sec) | ||
178 | return -1; | ||
179 | if (lhs->tv_sec > rhs->tv_sec) | ||
180 | return 1; | ||
181 | return lhs->tv_nsec - rhs->tv_nsec; | ||
182 | } | ||
183 | |||
164 | #endif /* CONFIG_COMPAT */ | 184 | #endif /* CONFIG_COMPAT */ |
165 | #endif /* _LINUX_COMPAT_H */ | 185 | #endif /* _LINUX_COMPAT_H */ |
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 20b446f26ecd..60e56c6e03dd 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
@@ -328,7 +328,7 @@ static inline void __cpus_remap(cpumask_t *dstp, const cpumask_t *srcp, | |||
328 | * bitmap of size NR_CPUS. | 328 | * bitmap of size NR_CPUS. |
329 | * | 329 | * |
330 | * #ifdef CONFIG_HOTPLUG_CPU | 330 | * #ifdef CONFIG_HOTPLUG_CPU |
331 | * cpu_possible_map - all NR_CPUS bits set | 331 | * cpu_possible_map - has bit 'cpu' set iff cpu is populatable |
332 | * cpu_present_map - has bit 'cpu' set iff cpu is populated | 332 | * cpu_present_map - has bit 'cpu' set iff cpu is populated |
333 | * cpu_online_map - has bit 'cpu' set iff cpu available to scheduler | 333 | * cpu_online_map - has bit 'cpu' set iff cpu available to scheduler |
334 | * #else | 334 | * #else |
diff --git a/include/linux/jbd.h b/include/linux/jbd.h index 0fe4aa891ddc..41ee79962bb2 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h | |||
@@ -498,12 +498,6 @@ struct transaction_s | |||
498 | struct journal_head *t_checkpoint_list; | 498 | struct journal_head *t_checkpoint_list; |
499 | 499 | ||
500 | /* | 500 | /* |
501 | * Doubly-linked circular list of all buffers submitted for IO while | ||
502 | * checkpointing. [j_list_lock] | ||
503 | */ | ||
504 | struct journal_head *t_checkpoint_io_list; | ||
505 | |||
506 | /* | ||
507 | * Doubly-linked circular list of temporary buffers currently undergoing | 501 | * Doubly-linked circular list of temporary buffers currently undergoing |
508 | * IO in the log [j_list_lock] | 502 | * IO in the log [j_list_lock] |
509 | */ | 503 | */ |
@@ -852,7 +846,7 @@ extern void journal_commit_transaction(journal_t *); | |||
852 | 846 | ||
853 | /* Checkpoint list management */ | 847 | /* Checkpoint list management */ |
854 | int __journal_clean_checkpoint_list(journal_t *journal); | 848 | int __journal_clean_checkpoint_list(journal_t *journal); |
855 | int __journal_remove_checkpoint(struct journal_head *); | 849 | void __journal_remove_checkpoint(struct journal_head *); |
856 | void __journal_insert_checkpoint(struct journal_head *, transaction_t *); | 850 | void __journal_insert_checkpoint(struct journal_head *, transaction_t *); |
857 | 851 | ||
858 | /* Buffer IO */ | 852 | /* Buffer IO */ |
diff --git a/include/linux/kbd_kern.h b/include/linux/kbd_kern.h index 3aed37314ab8..e87c32a5c86a 100644 --- a/include/linux/kbd_kern.h +++ b/include/linux/kbd_kern.h | |||
@@ -153,8 +153,10 @@ static inline void con_schedule_flip(struct tty_struct *t) | |||
153 | { | 153 | { |
154 | unsigned long flags; | 154 | unsigned long flags; |
155 | spin_lock_irqsave(&t->buf.lock, flags); | 155 | spin_lock_irqsave(&t->buf.lock, flags); |
156 | if (t->buf.tail != NULL) | 156 | if (t->buf.tail != NULL) { |
157 | t->buf.tail->active = 0; | 157 | t->buf.tail->active = 0; |
158 | t->buf.tail->commit = t->buf.tail->used; | ||
159 | } | ||
158 | spin_unlock_irqrestore(&t->buf.lock, flags); | 160 | spin_unlock_irqrestore(&t->buf.lock, flags); |
159 | schedule_work(&t->buf.work); | 161 | schedule_work(&t->buf.work); |
160 | } | 162 | } |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index b49affa0ac5a..3b507bf05d09 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -326,12 +326,6 @@ struct sysinfo { | |||
326 | /* Force a compilation error if condition is true */ | 326 | /* Force a compilation error if condition is true */ |
327 | #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) | 327 | #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) |
328 | 328 | ||
329 | #ifdef CONFIG_SYSCTL | ||
330 | extern int randomize_va_space; | ||
331 | #else | ||
332 | #define randomize_va_space 1 | ||
333 | #endif | ||
334 | |||
335 | /* Trap pasters of __FUNCTION__ at compile-time */ | 329 | /* Trap pasters of __FUNCTION__ at compile-time */ |
336 | #define __FUNCTION__ (__func__) | 330 | #define __FUNCTION__ (__func__) |
337 | 331 | ||
diff --git a/include/linux/kexec.h b/include/linux/kexec.h index a311f58c8a7c..cfb3410e32b1 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/list.h> | 6 | #include <linux/list.h> |
7 | #include <linux/linkage.h> | 7 | #include <linux/linkage.h> |
8 | #include <linux/compat.h> | 8 | #include <linux/compat.h> |
9 | #include <linux/ioport.h> | ||
9 | #include <asm/kexec.h> | 10 | #include <asm/kexec.h> |
10 | 11 | ||
11 | /* Verify architecture specific macros are defined */ | 12 | /* Verify architecture specific macros are defined */ |
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 2a8d8da70961..c374b5fa8d3b 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -41,8 +41,10 @@ enum kobject_action { | |||
41 | KOBJ_ADD = (__force kobject_action_t) 0x01, /* exclusive to core */ | 41 | KOBJ_ADD = (__force kobject_action_t) 0x01, /* exclusive to core */ |
42 | KOBJ_REMOVE = (__force kobject_action_t) 0x02, /* exclusive to core */ | 42 | KOBJ_REMOVE = (__force kobject_action_t) 0x02, /* exclusive to core */ |
43 | KOBJ_CHANGE = (__force kobject_action_t) 0x03, /* device state change */ | 43 | KOBJ_CHANGE = (__force kobject_action_t) 0x03, /* device state change */ |
44 | KOBJ_OFFLINE = (__force kobject_action_t) 0x04, /* device offline */ | 44 | KOBJ_MOUNT = (__force kobject_action_t) 0x04, /* mount event for block devices (broken) */ |
45 | KOBJ_ONLINE = (__force kobject_action_t) 0x05, /* device online */ | 45 | KOBJ_UMOUNT = (__force kobject_action_t) 0x05, /* umount event for block devices (broken) */ |
46 | KOBJ_OFFLINE = (__force kobject_action_t) 0x06, /* device offline */ | ||
47 | KOBJ_ONLINE = (__force kobject_action_t) 0x07, /* device online */ | ||
46 | }; | 48 | }; |
47 | 49 | ||
48 | struct kobject { | 50 | struct kobject { |
diff --git a/include/linux/ktime.h b/include/linux/ktime.h index 6aca67a569a2..f3dec45ef874 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h | |||
@@ -96,10 +96,16 @@ static inline ktime_t ktime_set(const long secs, const unsigned long nsecs) | |||
96 | ({ (ktime_t){ .tv64 = (kt).tv64 + (nsval) }; }) | 96 | ({ (ktime_t){ .tv64 = (kt).tv64 + (nsval) }; }) |
97 | 97 | ||
98 | /* convert a timespec to ktime_t format: */ | 98 | /* convert a timespec to ktime_t format: */ |
99 | #define timespec_to_ktime(ts) ktime_set((ts).tv_sec, (ts).tv_nsec) | 99 | static inline ktime_t timespec_to_ktime(struct timespec ts) |
100 | { | ||
101 | return ktime_set(ts.tv_sec, ts.tv_nsec); | ||
102 | } | ||
100 | 103 | ||
101 | /* convert a timeval to ktime_t format: */ | 104 | /* convert a timeval to ktime_t format: */ |
102 | #define timeval_to_ktime(tv) ktime_set((tv).tv_sec, (tv).tv_usec * 1000) | 105 | static inline ktime_t timeval_to_ktime(struct timeval tv) |
106 | { | ||
107 | return ktime_set(tv.tv_sec, tv.tv_usec * NSEC_PER_USEC); | ||
108 | } | ||
103 | 109 | ||
104 | /* Map the ktime_t to timespec conversion to ns_to_timespec function */ | 110 | /* Map the ktime_t to timespec conversion to ns_to_timespec function */ |
105 | #define ktime_to_timespec(kt) ns_to_timespec((kt).tv64) | 111 | #define ktime_to_timespec(kt) ns_to_timespec((kt).tv64) |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 9e5db2949c58..c91be5e64ede 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -557,17 +557,29 @@ ata_sg_is_last(struct scatterlist *sg, struct ata_queued_cmd *qc) | |||
557 | } | 557 | } |
558 | 558 | ||
559 | static inline struct scatterlist * | 559 | static inline struct scatterlist * |
560 | ata_qc_first_sg(struct ata_queued_cmd *qc) | ||
561 | { | ||
562 | if (qc->n_elem) | ||
563 | return qc->__sg; | ||
564 | if (qc->pad_len) | ||
565 | return &qc->pad_sgent; | ||
566 | return NULL; | ||
567 | } | ||
568 | |||
569 | static inline struct scatterlist * | ||
560 | ata_qc_next_sg(struct scatterlist *sg, struct ata_queued_cmd *qc) | 570 | ata_qc_next_sg(struct scatterlist *sg, struct ata_queued_cmd *qc) |
561 | { | 571 | { |
562 | if (sg == &qc->pad_sgent) | 572 | if (sg == &qc->pad_sgent) |
563 | return NULL; | 573 | return NULL; |
564 | if (++sg - qc->__sg < qc->n_elem) | 574 | if (++sg - qc->__sg < qc->n_elem) |
565 | return sg; | 575 | return sg; |
566 | return qc->pad_len ? &qc->pad_sgent : NULL; | 576 | if (qc->pad_len) |
577 | return &qc->pad_sgent; | ||
578 | return NULL; | ||
567 | } | 579 | } |
568 | 580 | ||
569 | #define ata_for_each_sg(sg, qc) \ | 581 | #define ata_for_each_sg(sg, qc) \ |
570 | for (sg = qc->__sg; sg; sg = ata_qc_next_sg(sg, qc)) | 582 | for (sg = ata_qc_first_sg(qc); sg; sg = ata_qc_next_sg(sg, qc)) |
571 | 583 | ||
572 | static inline unsigned int ata_tag_valid(unsigned int tag) | 584 | static inline unsigned int ata_tag_valid(unsigned int tag) |
573 | { | 585 | { |
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index 920766cea79c..ef21ed296039 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
@@ -149,7 +149,7 @@ struct nlm_rqst * nlmclnt_alloc_call(void); | |||
149 | int nlmclnt_prepare_block(struct nlm_rqst *req, struct nlm_host *host, struct file_lock *fl); | 149 | int nlmclnt_prepare_block(struct nlm_rqst *req, struct nlm_host *host, struct file_lock *fl); |
150 | void nlmclnt_finish_block(struct nlm_rqst *req); | 150 | void nlmclnt_finish_block(struct nlm_rqst *req); |
151 | long nlmclnt_block(struct nlm_rqst *req, long timeout); | 151 | long nlmclnt_block(struct nlm_rqst *req, long timeout); |
152 | u32 nlmclnt_grant(struct nlm_lock *); | 152 | u32 nlmclnt_grant(const struct sockaddr_in *addr, const struct nlm_lock *); |
153 | void nlmclnt_recovery(struct nlm_host *, u32); | 153 | void nlmclnt_recovery(struct nlm_host *, u32); |
154 | int nlmclnt_reclaim(struct nlm_host *, struct file_lock *); | 154 | int nlmclnt_reclaim(struct nlm_host *, struct file_lock *); |
155 | int nlmclnt_setgrantargs(struct nlm_rqst *, struct nlm_lock *); | 155 | int nlmclnt_setgrantargs(struct nlm_rqst *, struct nlm_lock *); |
@@ -204,7 +204,7 @@ nlmsvc_file_inode(struct nlm_file *file) | |||
204 | * Compare two host addresses (needs modifying for ipv6) | 204 | * Compare two host addresses (needs modifying for ipv6) |
205 | */ | 205 | */ |
206 | static __inline__ int | 206 | static __inline__ int |
207 | nlm_cmp_addr(struct sockaddr_in *sin1, struct sockaddr_in *sin2) | 207 | nlm_cmp_addr(const struct sockaddr_in *sin1, const struct sockaddr_in *sin2) |
208 | { | 208 | { |
209 | return sin1->sin_addr.s_addr == sin2->sin_addr.s_addr; | 209 | return sin1->sin_addr.s_addr == sin2->sin_addr.s_addr; |
210 | } | 210 | } |
@@ -214,7 +214,7 @@ nlm_cmp_addr(struct sockaddr_in *sin1, struct sockaddr_in *sin2) | |||
214 | * When the second lock is of type F_UNLCK, this acts like a wildcard. | 214 | * When the second lock is of type F_UNLCK, this acts like a wildcard. |
215 | */ | 215 | */ |
216 | static __inline__ int | 216 | static __inline__ int |
217 | nlm_compare_locks(struct file_lock *fl1, struct file_lock *fl2) | 217 | nlm_compare_locks(const struct file_lock *fl1, const struct file_lock *fl2) |
218 | { | 218 | { |
219 | return fl1->fl_pid == fl2->fl_pid | 219 | return fl1->fl_pid == fl2->fl_pid |
220 | && fl1->fl_start == fl2->fl_start | 220 | && fl1->fl_start == fl2->fl_start |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 75e9f0724997..498ff8778fb6 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1051,5 +1051,11 @@ int shrink_slab(unsigned long scanned, gfp_t gfp_mask, | |||
1051 | void drop_pagecache(void); | 1051 | void drop_pagecache(void); |
1052 | void drop_slab(void); | 1052 | void drop_slab(void); |
1053 | 1053 | ||
1054 | #ifndef CONFIG_MMU | ||
1055 | #define randomize_va_space 0 | ||
1056 | #else | ||
1057 | extern int randomize_va_space; | ||
1058 | #endif | ||
1059 | |||
1054 | #endif /* __KERNEL__ */ | 1060 | #endif /* __KERNEL__ */ |
1055 | #endif /* _LINUX_MM_H */ | 1061 | #endif /* _LINUX_MM_H */ |
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index f38872abc126..bdc556d88498 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
@@ -49,7 +49,7 @@ struct mmc_command { | |||
49 | /* | 49 | /* |
50 | * These are the command types. | 50 | * These are the command types. |
51 | */ | 51 | */ |
52 | #define mmc_cmd_type(cmd) ((cmd)->flags & MMC_CMD_TYPE) | 52 | #define mmc_cmd_type(cmd) ((cmd)->flags & MMC_CMD_MASK) |
53 | 53 | ||
54 | unsigned int retries; /* max number of retries */ | 54 | unsigned int retries; /* max number of retries */ |
55 | unsigned int error; /* command error */ | 55 | unsigned int error; /* command error */ |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index 4cf6088625c1..468896939843 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -184,8 +184,11 @@ static inline int nf_hook_thresh(int pf, unsigned int hook, | |||
184 | struct sk_buff **pskb, | 184 | struct sk_buff **pskb, |
185 | struct net_device *indev, | 185 | struct net_device *indev, |
186 | struct net_device *outdev, | 186 | struct net_device *outdev, |
187 | int (*okfn)(struct sk_buff *), int thresh) | 187 | int (*okfn)(struct sk_buff *), int thresh, |
188 | int cond) | ||
188 | { | 189 | { |
190 | if (!cond) | ||
191 | return 1; | ||
189 | #ifndef CONFIG_NETFILTER_DEBUG | 192 | #ifndef CONFIG_NETFILTER_DEBUG |
190 | if (list_empty(&nf_hooks[pf][hook])) | 193 | if (list_empty(&nf_hooks[pf][hook])) |
191 | return 1; | 194 | return 1; |
@@ -197,7 +200,7 @@ static inline int nf_hook(int pf, unsigned int hook, struct sk_buff **pskb, | |||
197 | struct net_device *indev, struct net_device *outdev, | 200 | struct net_device *indev, struct net_device *outdev, |
198 | int (*okfn)(struct sk_buff *)) | 201 | int (*okfn)(struct sk_buff *)) |
199 | { | 202 | { |
200 | return nf_hook_thresh(pf, hook, pskb, indev, outdev, okfn, INT_MIN); | 203 | return nf_hook_thresh(pf, hook, pskb, indev, outdev, okfn, INT_MIN, 1); |
201 | } | 204 | } |
202 | 205 | ||
203 | /* Activate hook; either okfn or kfree_skb called, unless a hook | 206 | /* Activate hook; either okfn or kfree_skb called, unless a hook |
@@ -224,7 +227,13 @@ static inline int nf_hook(int pf, unsigned int hook, struct sk_buff **pskb, | |||
224 | 227 | ||
225 | #define NF_HOOK_THRESH(pf, hook, skb, indev, outdev, okfn, thresh) \ | 228 | #define NF_HOOK_THRESH(pf, hook, skb, indev, outdev, okfn, thresh) \ |
226 | ({int __ret; \ | 229 | ({int __ret; \ |
227 | if ((__ret=nf_hook_thresh(pf, hook, &(skb), indev, outdev, okfn, thresh)) == 1)\ | 230 | if ((__ret=nf_hook_thresh(pf, hook, &(skb), indev, outdev, okfn, thresh, 1)) == 1)\ |
231 | __ret = (okfn)(skb); \ | ||
232 | __ret;}) | ||
233 | |||
234 | #define NF_HOOK_COND(pf, hook, skb, indev, outdev, okfn, cond) \ | ||
235 | ({int __ret; \ | ||
236 | if ((__ret=nf_hook_thresh(pf, hook, &(skb), indev, outdev, okfn, INT_MIN, cond)) == 1)\ | ||
228 | __ret = (okfn)(skb); \ | 237 | __ret = (okfn)(skb); \ |
229 | __ret;}) | 238 | __ret;}) |
230 | 239 | ||
@@ -295,11 +304,13 @@ extern struct proc_dir_entry *proc_net_netfilter; | |||
295 | 304 | ||
296 | #else /* !CONFIG_NETFILTER */ | 305 | #else /* !CONFIG_NETFILTER */ |
297 | #define NF_HOOK(pf, hook, skb, indev, outdev, okfn) (okfn)(skb) | 306 | #define NF_HOOK(pf, hook, skb, indev, outdev, okfn) (okfn)(skb) |
307 | #define NF_HOOK_COND(pf, hook, skb, indev, outdev, okfn, cond) (okfn)(skb) | ||
298 | static inline int nf_hook_thresh(int pf, unsigned int hook, | 308 | static inline int nf_hook_thresh(int pf, unsigned int hook, |
299 | struct sk_buff **pskb, | 309 | struct sk_buff **pskb, |
300 | struct net_device *indev, | 310 | struct net_device *indev, |
301 | struct net_device *outdev, | 311 | struct net_device *outdev, |
302 | int (*okfn)(struct sk_buff *), int thresh) | 312 | int (*okfn)(struct sk_buff *), int thresh, |
313 | int cond) | ||
303 | { | 314 | { |
304 | return okfn(*pskb); | 315 | return okfn(*pskb); |
305 | } | 316 | } |
@@ -307,7 +318,7 @@ static inline int nf_hook(int pf, unsigned int hook, struct sk_buff **pskb, | |||
307 | struct net_device *indev, struct net_device *outdev, | 318 | struct net_device *indev, struct net_device *outdev, |
308 | int (*okfn)(struct sk_buff *)) | 319 | int (*okfn)(struct sk_buff *)) |
309 | { | 320 | { |
310 | return okfn(*pskb); | 321 | return 1; |
311 | } | 322 | } |
312 | static inline void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb) {} | 323 | static inline void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb) {} |
313 | struct flowi; | 324 | struct flowi; |
diff --git a/include/linux/netfilter_ipv4.h b/include/linux/netfilter_ipv4.h index fdc4a9527343..43c09d790b83 100644 --- a/include/linux/netfilter_ipv4.h +++ b/include/linux/netfilter_ipv4.h | |||
@@ -79,7 +79,7 @@ enum nf_ip_hook_priorities { | |||
79 | 79 | ||
80 | #ifdef __KERNEL__ | 80 | #ifdef __KERNEL__ |
81 | extern int ip_route_me_harder(struct sk_buff **pskb); | 81 | extern int ip_route_me_harder(struct sk_buff **pskb); |
82 | 82 | extern int ip_xfrm_me_harder(struct sk_buff **pskb); | |
83 | #endif /*__KERNEL__*/ | 83 | #endif /*__KERNEL__*/ |
84 | 84 | ||
85 | #endif /*__LINUX_IP_NETFILTER_H*/ | 85 | #endif /*__LINUX_IP_NETFILTER_H*/ |
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 6a2ccf78a356..c256ebe2a7b4 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
@@ -160,7 +160,8 @@ extern int netlink_unregister_notifier(struct notifier_block *nb); | |||
160 | 160 | ||
161 | /* finegrained unicast helpers: */ | 161 | /* finegrained unicast helpers: */ |
162 | struct sock *netlink_getsockbyfilp(struct file *filp); | 162 | struct sock *netlink_getsockbyfilp(struct file *filp); |
163 | int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock, long timeo); | 163 | int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock, |
164 | long timeo, struct sock *ssk); | ||
164 | void netlink_detachskb(struct sock *sk, struct sk_buff *skb); | 165 | void netlink_detachskb(struct sock *sk, struct sk_buff *skb); |
165 | int netlink_sendskb(struct sock *sk, struct sk_buff *skb, int protocol); | 166 | int netlink_sendskb(struct sock *sk, struct sk_buff *skb, int protocol); |
166 | 167 | ||
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 547d649b274e..b4dc6e2e10c9 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -398,7 +398,7 @@ extern struct inode_operations nfs_symlink_inode_operations; | |||
398 | extern int nfs_register_sysctl(void); | 398 | extern int nfs_register_sysctl(void); |
399 | extern void nfs_unregister_sysctl(void); | 399 | extern void nfs_unregister_sysctl(void); |
400 | #else | 400 | #else |
401 | #define nfs_register_sysctl() do { } while(0) | 401 | #define nfs_register_sysctl() 0 |
402 | #define nfs_unregister_sysctl() do { } while(0) | 402 | #define nfs_unregister_sysctl() do { } while(0) |
403 | #endif | 403 | #endif |
404 | 404 | ||
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 7a61ccdcbc4b..82b83da25d77 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1087,6 +1087,7 @@ | |||
1087 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440_8X 0x0181 | 1087 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440_8X 0x0181 |
1088 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440SE_8X 0x0182 | 1088 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440SE_8X 0x0182 |
1089 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_420_8X 0x0183 | 1089 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_420_8X 0x0183 |
1090 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_4000 0x0185 | ||
1090 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_448_GO 0x0186 | 1091 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_448_GO 0x0186 |
1091 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_488_GO 0x0187 | 1092 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_488_GO 0x0187 |
1092 | #define PCI_DEVICE_ID_NVIDIA_QUADRO4_580_XGL 0x0188 | 1093 | #define PCI_DEVICE_ID_NVIDIA_QUADRO4_580_XGL 0x0188 |
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index 9d5cd106b344..0d36750fc0f1 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
@@ -84,6 +84,7 @@ extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __us | |||
84 | extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len); | 84 | extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len); |
85 | extern int ptrace_attach(struct task_struct *tsk); | 85 | extern int ptrace_attach(struct task_struct *tsk); |
86 | extern int ptrace_detach(struct task_struct *, unsigned int); | 86 | extern int ptrace_detach(struct task_struct *, unsigned int); |
87 | extern void __ptrace_detach(struct task_struct *, unsigned int); | ||
87 | extern void ptrace_disable(struct task_struct *); | 88 | extern void ptrace_disable(struct task_struct *); |
88 | extern int ptrace_check_attach(struct task_struct *task, int kill); | 89 | extern int ptrace_check_attach(struct task_struct *task, int kill); |
89 | extern int ptrace_request(struct task_struct *child, long request, long addr, long data); | 90 | extern int ptrace_request(struct task_struct *child, long request, long addr, long data); |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 9c1da0269a18..b6f51e3a38ec 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -697,12 +697,9 @@ struct task_struct { | |||
697 | 697 | ||
698 | int lock_depth; /* BKL lock depth */ | 698 | int lock_depth; /* BKL lock depth */ |
699 | 699 | ||
700 | #if defined(CONFIG_SMP) | 700 | #if defined(CONFIG_SMP) && defined(__ARCH_WANT_UNLOCKED_CTXSW) |
701 | int last_waker_cpu; /* CPU that last woke this task up */ | ||
702 | #if defined(__ARCH_WANT_UNLOCKED_CTXSW) | ||
703 | int oncpu; | 701 | int oncpu; |
704 | #endif | 702 | #endif |
705 | #endif | ||
706 | int prio, static_prio; | 703 | int prio, static_prio; |
707 | struct list_head run_list; | 704 | struct list_head run_list; |
708 | prio_array_t *array; | 705 | prio_array_t *array; |
diff --git a/include/linux/swap.h b/include/linux/swap.h index f3e17d5963c3..d572b19afb7d 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -147,7 +147,7 @@ struct swap_list_t { | |||
147 | #define vm_swap_full() (nr_swap_pages*2 < total_swap_pages) | 147 | #define vm_swap_full() (nr_swap_pages*2 < total_swap_pages) |
148 | 148 | ||
149 | /* linux/mm/oom_kill.c */ | 149 | /* linux/mm/oom_kill.c */ |
150 | extern void out_of_memory(gfp_t gfp_mask, int order); | 150 | extern void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order); |
151 | 151 | ||
152 | /* linux/mm/memory.c */ | 152 | /* linux/mm/memory.c */ |
153 | extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct *); | 153 | extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct *); |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 3877209d23c3..d73501ba7e44 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -557,6 +557,8 @@ asmlinkage long sys_openat(int dfd, const char __user *filename, int flags, | |||
557 | int mode); | 557 | int mode); |
558 | asmlinkage long sys_newfstatat(int dfd, char __user *filename, | 558 | asmlinkage long sys_newfstatat(int dfd, char __user *filename, |
559 | struct stat __user *statbuf, int flag); | 559 | struct stat __user *statbuf, int flag); |
560 | asmlinkage long sys_fstatat64(int dfd, char __user *filename, | ||
561 | struct stat64 __user *statbuf, int flag); | ||
560 | asmlinkage long sys_readlinkat(int dfd, const char __user *path, char __user *buf, | 562 | asmlinkage long sys_readlinkat(int dfd, const char __user *path, char __user *buf, |
561 | int bufsiz); | 563 | int bufsiz); |
562 | asmlinkage long compat_sys_futimesat(unsigned int dfd, char __user *filename, | 564 | asmlinkage long compat_sys_futimesat(unsigned int dfd, char __user *filename, |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 32a4139c4ad8..0e92bf7ec28e 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -146,6 +146,7 @@ enum | |||
146 | KERN_RANDOMIZE=68, /* int: randomize virtual address space */ | 146 | KERN_RANDOMIZE=68, /* int: randomize virtual address space */ |
147 | KERN_SETUID_DUMPABLE=69, /* int: behaviour of dumps for setuid core */ | 147 | KERN_SETUID_DUMPABLE=69, /* int: behaviour of dumps for setuid core */ |
148 | KERN_SPIN_RETRY=70, /* int: number of spinlock retries */ | 148 | KERN_SPIN_RETRY=70, /* int: number of spinlock retries */ |
149 | KERN_ACPI_VIDEO_FLAGS=71, /* int: flags for setting up video after ACPI sleep */ | ||
149 | }; | 150 | }; |
150 | 151 | ||
151 | 152 | ||
diff --git a/include/linux/time.h b/include/linux/time.h index 7b4dc36532bb..d9cdba54b789 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -33,11 +33,34 @@ struct timezone { | |||
33 | #define NSEC_PER_SEC 1000000000L | 33 | #define NSEC_PER_SEC 1000000000L |
34 | #define NSEC_PER_USEC 1000L | 34 | #define NSEC_PER_USEC 1000L |
35 | 35 | ||
36 | static __inline__ int timespec_equal(struct timespec *a, struct timespec *b) | 36 | static inline int timespec_equal(struct timespec *a, struct timespec *b) |
37 | { | 37 | { |
38 | return (a->tv_sec == b->tv_sec) && (a->tv_nsec == b->tv_nsec); | 38 | return (a->tv_sec == b->tv_sec) && (a->tv_nsec == b->tv_nsec); |
39 | } | 39 | } |
40 | 40 | ||
41 | /* | ||
42 | * lhs < rhs: return <0 | ||
43 | * lhs == rhs: return 0 | ||
44 | * lhs > rhs: return >0 | ||
45 | */ | ||
46 | static inline int timespec_compare(struct timespec *lhs, struct timespec *rhs) | ||
47 | { | ||
48 | if (lhs->tv_sec < rhs->tv_sec) | ||
49 | return -1; | ||
50 | if (lhs->tv_sec > rhs->tv_sec) | ||
51 | return 1; | ||
52 | return lhs->tv_nsec - rhs->tv_nsec; | ||
53 | } | ||
54 | |||
55 | static inline int timeval_compare(struct timeval *lhs, struct timeval *rhs) | ||
56 | { | ||
57 | if (lhs->tv_sec < rhs->tv_sec) | ||
58 | return -1; | ||
59 | if (lhs->tv_sec > rhs->tv_sec) | ||
60 | return 1; | ||
61 | return lhs->tv_usec - rhs->tv_usec; | ||
62 | } | ||
63 | |||
41 | extern unsigned long mktime(const unsigned int year, const unsigned int mon, | 64 | extern unsigned long mktime(const unsigned int year, const unsigned int mon, |
42 | const unsigned int day, const unsigned int hour, | 65 | const unsigned int day, const unsigned int hour, |
43 | const unsigned int min, const unsigned int sec); | 66 | const unsigned int min, const unsigned int sec); |
diff --git a/include/linux/timex.h b/include/linux/timex.h index 04a4a8cb4ed3..b7ca1204e42a 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h | |||
@@ -345,6 +345,9 @@ time_interpolator_reset(void) | |||
345 | 345 | ||
346 | #endif /* !CONFIG_TIME_INTERPOLATION */ | 346 | #endif /* !CONFIG_TIME_INTERPOLATION */ |
347 | 347 | ||
348 | /* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */ | ||
349 | extern u64 current_tick_length(void); | ||
350 | |||
348 | #endif /* KERNEL */ | 351 | #endif /* KERNEL */ |
349 | 352 | ||
350 | #endif /* LINUX_TIMEX_H */ | 353 | #endif /* LINUX_TIMEX_H */ |
diff --git a/include/linux/tty.h b/include/linux/tty.h index a7bd3b4558d2..f45cd74e6f24 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -58,6 +58,8 @@ struct tty_buffer { | |||
58 | int used; | 58 | int used; |
59 | int size; | 59 | int size; |
60 | int active; | 60 | int active; |
61 | int commit; | ||
62 | int read; | ||
61 | /* Data points here */ | 63 | /* Data points here */ |
62 | unsigned long data[0]; | 64 | unsigned long data[0]; |
63 | }; | 65 | }; |
diff --git a/include/linux/tty_flip.h b/include/linux/tty_flip.h index 82961eb19888..222faf97d5f9 100644 --- a/include/linux/tty_flip.h +++ b/include/linux/tty_flip.h | |||
@@ -29,8 +29,10 @@ _INLINE_ void tty_schedule_flip(struct tty_struct *tty) | |||
29 | { | 29 | { |
30 | unsigned long flags; | 30 | unsigned long flags; |
31 | spin_lock_irqsave(&tty->buf.lock, flags); | 31 | spin_lock_irqsave(&tty->buf.lock, flags); |
32 | if (tty->buf.tail != NULL) | 32 | if (tty->buf.tail != NULL) { |
33 | tty->buf.tail->active = 0; | 33 | tty->buf.tail->active = 0; |
34 | tty->buf.tail->commit = tty->buf.tail->used; | ||
35 | } | ||
34 | spin_unlock_irqrestore(&tty->buf.lock, flags); | 36 | spin_unlock_irqrestore(&tty->buf.lock, flags); |
35 | schedule_delayed_work(&tty->buf.work, 1); | 37 | schedule_delayed_work(&tty->buf.work, 1); |
36 | } | 38 | } |
diff --git a/include/net/bluetooth/rfcomm.h b/include/net/bluetooth/rfcomm.h index bbfac86734ec..89d743cfdfdf 100644 --- a/include/net/bluetooth/rfcomm.h +++ b/include/net/bluetooth/rfcomm.h | |||
@@ -33,7 +33,7 @@ | |||
33 | #define RFCOMM_DEFAULT_MTU 127 | 33 | #define RFCOMM_DEFAULT_MTU 127 |
34 | #define RFCOMM_DEFAULT_CREDITS 7 | 34 | #define RFCOMM_DEFAULT_CREDITS 7 |
35 | 35 | ||
36 | #define RFCOMM_MAX_L2CAP_MTU 1024 | 36 | #define RFCOMM_MAX_L2CAP_MTU 1013 |
37 | #define RFCOMM_MAX_CREDITS 40 | 37 | #define RFCOMM_MAX_CREDITS 40 |
38 | 38 | ||
39 | #define RFCOMM_SKB_HEAD_RESERVE 8 | 39 | #define RFCOMM_SKB_HEAD_RESERVE 8 |
diff --git a/include/net/ip.h b/include/net/ip.h index 8de0697b364c..fab3d5b3ab1c 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -41,6 +41,7 @@ struct inet_skb_parm | |||
41 | #define IPSKB_XFRM_TUNNEL_SIZE 2 | 41 | #define IPSKB_XFRM_TUNNEL_SIZE 2 |
42 | #define IPSKB_XFRM_TRANSFORMED 4 | 42 | #define IPSKB_XFRM_TRANSFORMED 4 |
43 | #define IPSKB_FRAG_COMPLETE 8 | 43 | #define IPSKB_FRAG_COMPLETE 8 |
44 | #define IPSKB_REROUTED 16 | ||
44 | }; | 45 | }; |
45 | 46 | ||
46 | struct ipcm_cookie | 47 | struct ipcm_cookie |
diff --git a/include/net/irda/irda.h b/include/net/irda/irda.h index 05a840837fe7..1880e46ecc9b 100644 --- a/include/net/irda/irda.h +++ b/include/net/irda/irda.h | |||
@@ -82,9 +82,9 @@ do { if(!(expr)) { \ | |||
82 | #define IRDA_ASSERT_LABEL(label) | 82 | #define IRDA_ASSERT_LABEL(label) |
83 | #endif /* CONFIG_IRDA_DEBUG */ | 83 | #endif /* CONFIG_IRDA_DEBUG */ |
84 | 84 | ||
85 | #define IRDA_WARNING(args...) printk(KERN_WARNING args) | 85 | #define IRDA_WARNING(args...) do { if (net_ratelimit()) printk(KERN_WARNING args); } while (0) |
86 | #define IRDA_MESSAGE(args...) printk(KERN_INFO args) | 86 | #define IRDA_MESSAGE(args...) do { if (net_ratelimit()) printk(KERN_INFO args); } while (0) |
87 | #define IRDA_ERROR(args...) printk(KERN_ERR args) | 87 | #define IRDA_ERROR(args...) do { if (net_ratelimit()) printk(KERN_ERR args); } while (0) |
88 | 88 | ||
89 | /* | 89 | /* |
90 | * Magic numbers used by Linux-IrDA. Random numbers which must be unique to | 90 | * Magic numbers used by Linux-IrDA. Random numbers which must be unique to |
diff --git a/include/net/irda/irlap.h b/include/net/irda/irlap.h index f55e86e75030..2127cae1e0a6 100644 --- a/include/net/irda/irlap.h +++ b/include/net/irda/irlap.h | |||
@@ -50,6 +50,9 @@ | |||
50 | /* May be different when we get VFIR */ | 50 | /* May be different when we get VFIR */ |
51 | #define LAP_MAX_HEADER (LAP_ADDR_HEADER + LAP_CTRL_HEADER) | 51 | #define LAP_MAX_HEADER (LAP_ADDR_HEADER + LAP_CTRL_HEADER) |
52 | 52 | ||
53 | /* Each IrDA device gets a random 32 bits IRLAP device address */ | ||
54 | #define LAP_ALEN 4 | ||
55 | |||
53 | #define BROADCAST 0xffffffff /* Broadcast device address */ | 56 | #define BROADCAST 0xffffffff /* Broadcast device address */ |
54 | #define CBROADCAST 0xfe /* Connection broadcast address */ | 57 | #define CBROADCAST 0xfe /* Connection broadcast address */ |
55 | #define XID_FORMAT 0x01 /* Discovery XID format */ | 58 | #define XID_FORMAT 0x01 /* Discovery XID format */ |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index d09ca0e7d139..d6111a2f0a23 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -866,7 +866,6 @@ extern int xfrm_state_mtu(struct xfrm_state *x, int mtu); | |||
866 | extern int xfrm_init_state(struct xfrm_state *x); | 866 | extern int xfrm_init_state(struct xfrm_state *x); |
867 | extern int xfrm4_rcv(struct sk_buff *skb); | 867 | extern int xfrm4_rcv(struct sk_buff *skb); |
868 | extern int xfrm4_output(struct sk_buff *skb); | 868 | extern int xfrm4_output(struct sk_buff *skb); |
869 | extern int xfrm4_output_finish(struct sk_buff *skb); | ||
870 | extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler); | 869 | extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler); |
871 | extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler); | 870 | extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler); |
872 | extern int xfrm6_rcv_spi(struct sk_buff **pskb, u32 spi); | 871 | extern int xfrm6_rcv_spi(struct sk_buff **pskb, u32 spi); |
diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h index 3e5cb5ab2d34..e5618b90996e 100644 --- a/include/scsi/iscsi_if.h +++ b/include/scsi/iscsi_if.h | |||
@@ -163,9 +163,6 @@ enum iscsi_param { | |||
163 | }; | 163 | }; |
164 | #define ISCSI_PARAM_MAX 14 | 164 | #define ISCSI_PARAM_MAX 14 |
165 | 165 | ||
166 | typedef uint64_t iscsi_sessionh_t; /* iSCSI Data-Path session handle */ | ||
167 | typedef uint64_t iscsi_connh_t; /* iSCSI Data-Path connection handle */ | ||
168 | |||
169 | #define iscsi_ptr(_handle) ((void*)(unsigned long)_handle) | 166 | #define iscsi_ptr(_handle) ((void*)(unsigned long)_handle) |
170 | #define iscsi_handle(_ptr) ((uint64_t)(unsigned long)_ptr) | 167 | #define iscsi_handle(_ptr) ((uint64_t)(unsigned long)_ptr) |
171 | #define hostdata_session(_hostdata) (iscsi_ptr(*(unsigned long *)_hostdata)) | 168 | #define hostdata_session(_hostdata) (iscsi_ptr(*(unsigned long *)_hostdata)) |
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index c60b8ff2f5e4..9c331258bc27 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h | |||
@@ -433,4 +433,6 @@ struct scsi_lun { | |||
433 | /* Used to obtain the PCI location of a device */ | 433 | /* Used to obtain the PCI location of a device */ |
434 | #define SCSI_IOCTL_GET_PCI 0x5387 | 434 | #define SCSI_IOCTL_GET_PCI 0x5387 |
435 | 435 | ||
436 | int scsi_execute_in_process_context(void (*fn)(void *data), void *data); | ||
437 | |||
436 | #endif /* _SCSI_SCSI_H */ | 438 | #endif /* _SCSI_SCSI_H */ |
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h index 16602a547a63..b41cf077e54b 100644 --- a/include/scsi/scsi_transport_iscsi.h +++ b/include/scsi/scsi_transport_iscsi.h | |||
@@ -63,25 +63,28 @@ struct iscsi_transport { | |||
63 | int max_lun; | 63 | int max_lun; |
64 | unsigned int max_conn; | 64 | unsigned int max_conn; |
65 | unsigned int max_cmd_len; | 65 | unsigned int max_cmd_len; |
66 | struct Scsi_Host *(*create_session) (struct scsi_transport_template *t, | 66 | struct iscsi_cls_session *(*create_session) |
67 | uint32_t initial_cmdsn); | 67 | (struct scsi_transport_template *t, uint32_t sn, uint32_t *sid); |
68 | void (*destroy_session) (struct Scsi_Host *shost); | 68 | void (*destroy_session) (struct iscsi_cls_session *session); |
69 | struct iscsi_cls_conn *(*create_conn) (struct Scsi_Host *shost, | 69 | struct iscsi_cls_conn *(*create_conn) (struct iscsi_cls_session *sess, |
70 | uint32_t cid); | 70 | uint32_t cid); |
71 | int (*bind_conn) (iscsi_sessionh_t session, iscsi_connh_t conn, | 71 | int (*bind_conn) (struct iscsi_cls_session *session, |
72 | struct iscsi_cls_conn *cls_conn, | ||
72 | uint32_t transport_fd, int is_leading); | 73 | uint32_t transport_fd, int is_leading); |
73 | int (*start_conn) (iscsi_connh_t conn); | 74 | int (*start_conn) (struct iscsi_cls_conn *conn); |
74 | void (*stop_conn) (iscsi_connh_t conn, int flag); | 75 | void (*stop_conn) (struct iscsi_cls_conn *conn, int flag); |
75 | void (*destroy_conn) (struct iscsi_cls_conn *conn); | 76 | void (*destroy_conn) (struct iscsi_cls_conn *conn); |
76 | int (*set_param) (iscsi_connh_t conn, enum iscsi_param param, | 77 | int (*set_param) (struct iscsi_cls_conn *conn, enum iscsi_param param, |
77 | uint32_t value); | 78 | uint32_t value); |
78 | int (*get_conn_param) (void *conndata, enum iscsi_param param, | 79 | int (*get_conn_param) (struct iscsi_cls_conn *conn, |
80 | enum iscsi_param param, | ||
79 | uint32_t *value); | 81 | uint32_t *value); |
80 | int (*get_session_param) (struct Scsi_Host *shost, | 82 | int (*get_session_param) (struct iscsi_cls_session *session, |
81 | enum iscsi_param param, uint32_t *value); | 83 | enum iscsi_param param, uint32_t *value); |
82 | int (*send_pdu) (iscsi_connh_t conn, struct iscsi_hdr *hdr, | 84 | int (*send_pdu) (struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr, |
83 | char *data, uint32_t data_size); | 85 | char *data, uint32_t data_size); |
84 | void (*get_stats) (iscsi_connh_t conn, struct iscsi_stats *stats); | 86 | void (*get_stats) (struct iscsi_cls_conn *conn, |
87 | struct iscsi_stats *stats); | ||
85 | }; | 88 | }; |
86 | 89 | ||
87 | /* | 90 | /* |
@@ -93,15 +96,14 @@ extern int iscsi_unregister_transport(struct iscsi_transport *tt); | |||
93 | /* | 96 | /* |
94 | * control plane upcalls | 97 | * control plane upcalls |
95 | */ | 98 | */ |
96 | extern void iscsi_conn_error(iscsi_connh_t conn, enum iscsi_err error); | 99 | extern void iscsi_conn_error(struct iscsi_cls_conn *conn, enum iscsi_err error); |
97 | extern int iscsi_recv_pdu(iscsi_connh_t conn, struct iscsi_hdr *hdr, | 100 | extern int iscsi_recv_pdu(struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr, |
98 | char *data, uint32_t data_size); | 101 | char *data, uint32_t data_size); |
99 | 102 | ||
100 | struct iscsi_cls_conn { | 103 | struct iscsi_cls_conn { |
101 | struct list_head conn_list; /* item in connlist */ | 104 | struct list_head conn_list; /* item in connlist */ |
102 | void *dd_data; /* LLD private data */ | 105 | void *dd_data; /* LLD private data */ |
103 | struct iscsi_transport *transport; | 106 | struct iscsi_transport *transport; |
104 | iscsi_connh_t connh; | ||
105 | int active; /* must be accessed with the connlock */ | 107 | int active; /* must be accessed with the connlock */ |
106 | struct device dev; /* sysfs transport/container device */ | 108 | struct device dev; /* sysfs transport/container device */ |
107 | struct mempool_zone *z_error; | 109 | struct mempool_zone *z_error; |
@@ -113,7 +115,7 @@ struct iscsi_cls_conn { | |||
113 | container_of(_dev, struct iscsi_cls_conn, dev) | 115 | container_of(_dev, struct iscsi_cls_conn, dev) |
114 | 116 | ||
115 | struct iscsi_cls_session { | 117 | struct iscsi_cls_session { |
116 | struct list_head list; /* item in session_list */ | 118 | struct list_head sess_list; /* item in session_list */ |
117 | struct iscsi_transport *transport; | 119 | struct iscsi_transport *transport; |
118 | struct device dev; /* sysfs transport/container device */ | 120 | struct device dev; /* sysfs transport/container device */ |
119 | }; | 121 | }; |
diff --git a/include/video/neomagic.h b/include/video/neomagic.h index 1d69049bd4c1..78b1f15a538f 100644 --- a/include/video/neomagic.h +++ b/include/video/neomagic.h | |||
@@ -159,6 +159,7 @@ struct neofb_par { | |||
159 | unsigned char PanelDispCntlReg1; | 159 | unsigned char PanelDispCntlReg1; |
160 | unsigned char PanelDispCntlReg2; | 160 | unsigned char PanelDispCntlReg2; |
161 | unsigned char PanelDispCntlReg3; | 161 | unsigned char PanelDispCntlReg3; |
162 | unsigned char PanelDispCntlRegRead; | ||
162 | unsigned char PanelVertCenterReg1; | 163 | unsigned char PanelVertCenterReg1; |
163 | unsigned char PanelVertCenterReg2; | 164 | unsigned char PanelVertCenterReg2; |
164 | unsigned char PanelVertCenterReg3; | 165 | unsigned char PanelVertCenterReg3; |