aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2006-03-13 23:36:52 -0500
committerDmitry Torokhov <dtor_core@ameritech.net>2006-03-13 23:36:52 -0500
commit58a343f22e8ef987b90e34bbef7f1455e3bb5a15 (patch)
treefc811fb570639f2083df6d9191b6a8d7cff65352 /include
parent51c38f9bce274a1e8a90aa457fb433be738f7458 (diff)
parent3759fa9c55923f719ae944a3f8fbb029b36f759d (diff)
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/mman.h8
-rw-r--r--include/asm-arm/arch-at91rm9200/gpio.h1
-rw-r--r--include/asm-arm/arch-ixp4xx/nas100d.h4
-rw-r--r--include/asm-arm/fpstate.h4
-rw-r--r--include/asm-arm/mman.h31
-rw-r--r--include/asm-arm/smp.h5
-rw-r--r--include/asm-arm/thread_info.h2
-rw-r--r--include/asm-arm/tlbflush.h6
-rw-r--r--include/asm-arm/unistd.h6
-rw-r--r--include/asm-arm26/mman.h31
-rw-r--r--include/asm-cris/mman.h31
-rw-r--r--include/asm-frv/mman.h31
-rw-r--r--include/asm-generic/mman.h42
-rw-r--r--include/asm-generic/unaligned.h4
-rw-r--r--include/asm-h8300/mman.h31
-rw-r--r--include/asm-i386/apic.h2
-rw-r--r--include/asm-i386/desc.h6
-rw-r--r--include/asm-i386/kprobes.h7
-rw-r--r--include/asm-i386/mman.h31
-rw-r--r--include/asm-i386/thread_info.h4
-rw-r--r--include/asm-ia64/acpi.h2
-rw-r--r--include/asm-ia64/machvec_sn2.h7
-rw-r--r--include/asm-ia64/mman.h31
-rw-r--r--include/asm-ia64/sn/arch.h5
-rw-r--r--include/asm-ia64/sn/bte.h6
-rw-r--r--include/asm-ia64/sn/pcibr_provider.h14
-rw-r--r--include/asm-ia64/sn/sn_feature_sets.h3
-rw-r--r--include/asm-ia64/sn/xpc.h31
-rw-r--r--include/asm-ia64/timex.h2
-rw-r--r--include/asm-m32r/mman.h33
-rw-r--r--include/asm-m32r/system.h2
-rw-r--r--include/asm-m32r/uaccess.h8
-rw-r--r--include/asm-m68k/atomic.h35
-rw-r--r--include/asm-m68k/irq.h2
-rw-r--r--include/asm-m68k/mman.h31
-rw-r--r--include/asm-m68k/raw_io.h1
-rw-r--r--include/asm-mips/atomic.h12
-rw-r--r--include/asm-mips/io.h18
-rw-r--r--include/asm-mips/mman.h22
-rw-r--r--include/asm-mips/smp.h11
-rw-r--r--include/asm-mips/system.h8
-rw-r--r--include/asm-mips/uaccess.h6
-rw-r--r--include/asm-mips/unistd.h6
-rw-r--r--include/asm-mips/vga.h3
-rw-r--r--include/asm-parisc/mman.h8
-rw-r--r--include/asm-powerpc/cputable.h11
-rw-r--r--include/asm-powerpc/eeh.h6
-rw-r--r--include/asm-powerpc/kexec.h3
-rw-r--r--include/asm-powerpc/mman.h32
-rw-r--r--include/asm-powerpc/mmu.h1
-rw-r--r--include/asm-powerpc/pgalloc.h2
-rw-r--r--include/asm-powerpc/pgtable-4k.h2
-rw-r--r--include/asm-powerpc/reg.h33
-rw-r--r--include/asm-powerpc/thread_info.h12
-rw-r--r--include/asm-ppc/machdep.h13
-rw-r--r--include/asm-s390/dasd.h13
-rw-r--r--include/asm-s390/mman.h31
-rw-r--r--include/asm-s390/smp.h2
-rw-r--r--include/asm-s390/system.h2
-rw-r--r--include/asm-sh/mman.h31
-rw-r--r--include/asm-sparc/mman.h31
-rw-r--r--include/asm-sparc64/futex.h88
-rw-r--r--include/asm-sparc64/mman.h31
-rw-r--r--include/asm-sparc64/smp.h6
-rw-r--r--include/asm-sparc64/uaccess.h12
-rw-r--r--include/asm-v850/mman.h30
-rw-r--r--include/asm-x86_64/mman.h30
-rw-r--r--include/asm-x86_64/pci.h2
-rw-r--r--include/asm-x86_64/pgtable.h2
-rw-r--r--include/asm-x86_64/proto.h3
-rw-r--r--include/asm-xtensa/mman.h22
-rw-r--r--include/linux/acpi.h3
-rw-r--r--include/linux/compat_ioctl.h2
-rw-r--r--include/linux/file.h2
-rw-r--r--include/linux/fs.h6
-rw-r--r--include/linux/gfp.h4
-rw-r--r--include/linux/hrtimer.h4
-rw-r--r--include/linux/kernel.h6
-rw-r--r--include/linux/kmalloc_sizes.h4
-rw-r--r--include/linux/kobject.h6
-rw-r--r--include/linux/ktime.h10
-rw-r--r--include/linux/libata.h16
-rw-r--r--include/linux/memory_hotplug.h4
-rw-r--r--include/linux/mm.h6
-rw-r--r--include/linux/mmc/mmc.h2
-rw-r--r--include/linux/netfilter.h21
-rw-r--r--include/linux/netfilter_bridge/ebt_log.h1
-rw-r--r--include/linux/netfilter_ipv4.h2
-rw-r--r--include/linux/netfilter_ipv4/ipt_LOG.h3
-rw-r--r--include/linux/netfilter_ipv6/ip6t_LOG.h3
-rw-r--r--include/linux/nfs_fs.h2
-rw-r--r--include/linux/pci_ids.h2
-rw-r--r--include/linux/percpu_counter.h6
-rw-r--r--include/linux/ptrace.h1
-rw-r--r--include/linux/rcupdate.h6
-rw-r--r--include/linux/reiserfs_fs.h2
-rw-r--r--include/linux/sched.h6
-rw-r--r--include/linux/serial_reg.h4
-rw-r--r--include/linux/swap.h2
-rw-r--r--include/linux/syscalls.h2
-rw-r--r--include/linux/sysctl.h2
-rw-r--r--include/linux/timex.h3
-rw-r--r--include/net/ip.h1
-rw-r--r--include/net/xfrm.h7
-rw-r--r--include/pcmcia/device_id.h9
-rw-r--r--include/scsi/iscsi_if.h3
-rw-r--r--include/scsi/scsi.h2
-rw-r--r--include/scsi/scsi_transport_iscsi.h34
-rw-r--r--include/video/neomagic.h1
109 files changed, 521 insertions, 724 deletions
diff --git a/include/asm-alpha/mman.h b/include/asm-alpha/mman.h
index a21515c16a43..5f24c755f577 100644
--- a/include/asm-alpha/mman.h
+++ b/include/asm-alpha/mman.h
@@ -42,9 +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#define MADV_DONTFORK 0x30 /* dont inherit across fork */ 46/* common/generic parameters */
47#define MADV_DOFORK 0x31 /* do inherit across fork */ 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 */
48 50
49/* compatibility flags */ 51/* compatibility flags */
50#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);
183extern int at91_set_gpio_input(unsigned pin, int use_pullup); 183extern int at91_set_gpio_input(unsigned pin, int use_pullup);
184extern int at91_set_gpio_output(unsigned pin, int value); 184extern int at91_set_gpio_output(unsigned pin, int value);
185extern int at91_set_deglitch(unsigned pin, int is_on); 185extern int at91_set_deglitch(unsigned pin, int is_on);
186extern int at91_set_multi_drive(unsigned pin, int is_on);
186 187
187/* callable at any time */ 188/* callable at any time */
188extern int at91_set_gpio_value(unsigned pin, int value); 189extern 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/fpstate.h b/include/asm-arm/fpstate.h
index f7430e3aa55d..6246bf83627d 100644
--- a/include/asm-arm/fpstate.h
+++ b/include/asm-arm/fpstate.h
@@ -55,8 +55,10 @@ struct fp_soft_struct {
55 unsigned int save[FP_SOFT_SIZE]; /* undefined information */ 55 unsigned int save[FP_SOFT_SIZE]; /* undefined information */
56}; 56};
57 57
58#define IWMMXT_SIZE 0x98
59
58struct iwmmxt_struct { 60struct iwmmxt_struct {
59 unsigned int save[0x98/sizeof(int) + 1]; 61 unsigned int save[IWMMXT_SIZE / sizeof(unsigned int)];
60}; 62};
61 63
62union fp_state { 64union fp_state {
diff --git a/include/asm-arm/mman.h b/include/asm-arm/mman.h
index 693ed859e632..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,24 +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#define MADV_DONTFORK 0x30 /* dont inherit across fork */
40#define MADV_DOFORK 0x31 /* do inherit across fork */
41
42/* compatibility flags */
43#define MAP_ANON MAP_ANONYMOUS
44#define MAP_FILE 0
45
46#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);
42asmlinkage void do_IPI(struct pt_regs *regs); 42asmlinkage void do_IPI(struct pt_regs *regs);
43 43
44/* 44/*
45 * Setup the SMP cpu_possible_map
46 */
47extern 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 */
47extern void smp_store_cpu_info(unsigned int cpuid); 52extern void smp_store_cpu_info(unsigned int cpuid);
diff --git a/include/asm-arm/thread_info.h b/include/asm-arm/thread_info.h
index 33a33cbb6329..cfbccb63c67b 100644
--- a/include/asm-arm/thread_info.h
+++ b/include/asm-arm/thread_info.h
@@ -59,7 +59,7 @@ struct thread_info {
59 struct cpu_context_save cpu_context; /* cpu context */ 59 struct cpu_context_save cpu_context; /* cpu context */
60 __u8 used_cp[16]; /* thread used copro */ 60 __u8 used_cp[16]; /* thread used copro */
61 unsigned long tp_value; 61 unsigned long tp_value;
62 union fp_state fpstate; 62 union fp_state fpstate __attribute__((aligned(8)));
63 union vfp_state vfpstate; 63 union vfp_state vfpstate;
64 struct restart_block restart_block; 64 struct restart_block restart_block;
65}; 65};
diff --git a/include/asm-arm/tlbflush.h b/include/asm-arm/tlbflush.h
index 9387a5e1ffe0..0c2acc944a0a 100644
--- a/include/asm-arm/tlbflush.h
+++ b/include/asm-arm/tlbflush.h
@@ -340,6 +340,12 @@ static inline void local_flush_tlb_kernel_page(unsigned long kaddr)
340 asm("mcr%? p15, 0, %0, c8, c6, 1" : : "r" (kaddr)); 340 asm("mcr%? p15, 0, %0, c8, c6, 1" : : "r" (kaddr));
341 if (tlb_flag(TLB_V6_I_PAGE)) 341 if (tlb_flag(TLB_V6_I_PAGE))
342 asm("mcr%? p15, 0, %0, c8, c5, 1" : : "r" (kaddr)); 342 asm("mcr%? p15, 0, %0, c8, c5, 1" : : "r" (kaddr));
343
344 /* The ARM ARM states that the completion of a TLB maintenance
345 * operation is only guaranteed by a DSB instruction
346 */
347 if (tlb_flag(TLB_V6_U_PAGE | TLB_V6_D_PAGE | TLB_V6_I_PAGE))
348 asm("mcr%? p15, 0, %0, c7, c10, 4" : : "r" (zero));
343} 349}
344 350
345/* 351/*
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 2096c50df888..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,24 +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#define MADV_DONTFORK 0x30 /* dont inherit across fork */
40#define MADV_DOFORK 0x31 /* do inherit across fork */
41
42/* compatibility flags */
43#define MAP_ANON MAP_ANONYMOUS
44#define MAP_FILE 0
45
46#endif /* __ARM_MMAN_H__ */ 17#endif /* __ARM_MMAN_H__ */
diff --git a/include/asm-cris/mman.h b/include/asm-cris/mman.h
index deddfb239ff5..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,24 +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#define MADV_DONTFORK 0x30 /* dont inherit across fork */
42#define MADV_DOFORK 0x31 /* do inherit across fork */
43
44/* compatibility flags */
45#define MAP_ANON MAP_ANONYMOUS
46#define MAP_FILE 0
47
48#endif /* __CRIS_MMAN_H__ */ 19#endif /* __CRIS_MMAN_H__ */
diff --git a/include/asm-frv/mman.h b/include/asm-frv/mman.h
index d3bca306da82..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,25 +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#define MADV_DONTFORK 0x30 /* dont inherit across fork */
40#define MADV_DOFORK 0x31 /* do inherit across fork */
41
42/* compatibility flags */
43#define MAP_ANON MAP_ANONYMOUS
44#define MAP_FILE 0
45
46#endif /* __ASM_MMAN_H__ */ 17#endif /* __ASM_MMAN_H__ */
47 18
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-generic/unaligned.h b/include/asm-generic/unaligned.h
index 4dc8ddb401c1..09ec447fe2af 100644
--- a/include/asm-generic/unaligned.h
+++ b/include/asm-generic/unaligned.h
@@ -78,7 +78,7 @@ static inline void __ustw(__u16 val, __u16 *addr)
78 78
79#define __get_unaligned(ptr, size) ({ \ 79#define __get_unaligned(ptr, size) ({ \
80 const void *__gu_p = ptr; \ 80 const void *__gu_p = ptr; \
81 __typeof__(*(ptr)) val; \ 81 __u64 val; \
82 switch (size) { \ 82 switch (size) { \
83 case 1: \ 83 case 1: \
84 val = *(const __u8 *)__gu_p; \ 84 val = *(const __u8 *)__gu_p; \
@@ -95,7 +95,7 @@ static inline void __ustw(__u16 val, __u16 *addr)
95 default: \ 95 default: \
96 bad_unaligned_access_length(); \ 96 bad_unaligned_access_length(); \
97 }; \ 97 }; \
98 val; \ 98 (__typeof__(*(ptr)))val; \
99}) 99})
100 100
101#define __put_unaligned(val, ptr, size) \ 101#define __put_unaligned(val, ptr, size) \
diff --git a/include/asm-h8300/mman.h b/include/asm-h8300/mman.h
index ac0346f7d11d..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,24 +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#define MADV_DONTFORK 0x30 /* dont inherit across fork */
40#define MADV_DOFORK 0x31 /* do inherit across fork */
41
42/* compatibility flags */
43#define MAP_ANON MAP_ANONYMOUS
44#define MAP_FILE 0
45
46#endif /* __H8300_MMAN_H__ */ 17#endif /* __H8300_MMAN_H__ */
diff --git a/include/asm-i386/apic.h b/include/asm-i386/apic.h
index d30b8571573f..ff9ac8d19eb2 100644
--- a/include/asm-i386/apic.h
+++ b/include/asm-i386/apic.h
@@ -137,6 +137,8 @@ void switch_APIC_timer_to_ipi(void *cpumask);
137void switch_ipi_to_APIC_timer(void *cpumask); 137void switch_ipi_to_APIC_timer(void *cpumask);
138#define ARCH_APICTIMER_STOPS_ON_C3 1 138#define ARCH_APICTIMER_STOPS_ON_C3 1
139 139
140extern int timer_over_8254;
141
140#else /* !CONFIG_X86_LOCAL_APIC */ 142#else /* !CONFIG_X86_LOCAL_APIC */
141static inline void lapic_shutdown(void) { } 143static inline void lapic_shutdown(void) { }
142 144
diff --git a/include/asm-i386/desc.h b/include/asm-i386/desc.h
index 494e73bca095..89b8b82c82b3 100644
--- a/include/asm-i386/desc.h
+++ b/include/asm-i386/desc.h
@@ -24,11 +24,13 @@ struct Xgt_desc_struct {
24 unsigned short pad; 24 unsigned short pad;
25} __attribute__ ((packed)); 25} __attribute__ ((packed));
26 26
27extern struct Xgt_desc_struct idt_descr, cpu_gdt_descr[NR_CPUS]; 27extern struct Xgt_desc_struct idt_descr;
28DECLARE_PER_CPU(struct Xgt_desc_struct, cpu_gdt_descr);
29
28 30
29static inline struct desc_struct *get_cpu_gdt_table(unsigned int cpu) 31static inline struct desc_struct *get_cpu_gdt_table(unsigned int cpu)
30{ 32{
31 return ((struct desc_struct *)cpu_gdt_descr[cpu].address); 33 return (struct desc_struct *)per_cpu(cpu_gdt_descr, cpu).address;
32} 34}
33 35
34#define load_TR_desc() __asm__ __volatile__("ltr %w0"::"q" (GDT_ENTRY_TSS*8)) 36#define load_TR_desc() __asm__ __volatile__("ltr %w0"::"q" (GDT_ENTRY_TSS*8))
diff --git a/include/asm-i386/kprobes.h b/include/asm-i386/kprobes.h
index 27cac050a60e..a0d2d74a7dda 100644
--- a/include/asm-i386/kprobes.h
+++ b/include/asm-i386/kprobes.h
@@ -27,6 +27,9 @@
27#include <linux/types.h> 27#include <linux/types.h>
28#include <linux/ptrace.h> 28#include <linux/ptrace.h>
29 29
30#define __ARCH_WANT_KPROBES_INSN_SLOT
31
32struct kprobe;
30struct pt_regs; 33struct pt_regs;
31 34
32typedef u8 kprobe_opcode_t; 35typedef u8 kprobe_opcode_t;
@@ -40,14 +43,14 @@ typedef u8 kprobe_opcode_t;
40 43
41#define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry 44#define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry
42#define ARCH_SUPPORTS_KRETPROBES 45#define ARCH_SUPPORTS_KRETPROBES
43#define arch_remove_kprobe(p) do {} while (0)
44 46
47void arch_remove_kprobe(struct kprobe *p);
45void kretprobe_trampoline(void); 48void kretprobe_trampoline(void);
46 49
47/* Architecture specific copy of original instruction*/ 50/* Architecture specific copy of original instruction*/
48struct arch_specific_insn { 51struct arch_specific_insn {
49 /* copy of the original instruction */ 52 /* copy of the original instruction */
50 kprobe_opcode_t insn[MAX_INSN_SIZE]; 53 kprobe_opcode_t *insn;
51}; 54};
52 55
53struct prev_kprobe { 56struct prev_kprobe {
diff --git a/include/asm-i386/mman.h b/include/asm-i386/mman.h
index ab2339a1d807..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,24 +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#define MADV_DONTFORK 0x30 /* dont inherit across fork */
40#define MADV_DOFORK 0x31 /* do inherit across fork */
41
42/* compatibility flags */
43#define MAP_ANON MAP_ANONYMOUS
44#define MAP_FILE 0
45
46#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-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);
106extern unsigned int is_cpu_cpei_target(unsigned int cpu); 106extern unsigned int is_cpu_cpei_target(unsigned int cpu);
107extern void set_cpei_target_cpu(unsigned int cpu); 107extern void set_cpei_target_cpu(unsigned int cpu);
108extern unsigned int get_cpei_target_cpu(void); 108extern unsigned int get_cpei_target_cpu(void);
109extern void prefill_possible_map(void);
110extern 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 357ebb780cc0..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,24 +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#define MADV_DONTFORK 0x30 /* dont inherit across fork */
48#define MADV_DOFORK 0x31 /* do inherit across fork */
49
50/* compatibility flags */
51#define MAP_ANON MAP_ANONYMOUS
52#define MAP_FILE 0
53
54#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..16adc93d7a72 100644
--- a/include/asm-ia64/sn/arch.h
+++ b/include/asm-ia64/sn/arch.h
@@ -31,7 +31,8 @@
31 * to ACPI3.0, this limit will be removed. The notion of "compact nodes" 31 * to ACPI3.0, this limit will be removed. The notion of "compact nodes"
32 * should be deleted and TIOs should be included in MAX_NUMNODES. 32 * should be deleted and TIOs should be included in MAX_NUMNODES.
33 */ 33 */
34#define MAX_COMPACT_NODES 512 34#define MAX_TIO_NODES MAX_NUMNODES
35#define MAX_COMPACT_NODES (MAX_NUMNODES + MAX_TIO_NODES)
35 36
36/* 37/*
37 * Maximum number of nodes in all partitions and in all coherency domains. 38 * Maximum number of nodes in all partitions and in all coherency domains.
@@ -70,7 +71,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 71 * Compact node ID to nasid mappings kept in the per-cpu data areas of each
71 * cpu. 72 * cpu.
72 */ 73 */
73DECLARE_PER_CPU(short, __sn_cnodeid_to_nasid[MAX_NUMNODES]); 74DECLARE_PER_CPU(short, __sn_cnodeid_to_nasid[MAX_COMPACT_NODES]);
74#define sn_cnodeid_to_nasid (&__get_cpu_var(__sn_cnodeid_to_nasid[0])) 75#define sn_cnodeid_to_nasid (&__get_cpu_var(__sn_cnodeid_to_nasid[0]))
75 76
76 77
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 */
121inline static unsigned long
122pcibr_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
130extern int pcibr_init_provider(void); 118extern int pcibr_init_provider(void);
131extern void *pcibr_bus_fixup(struct pcibus_bussoft *, struct pci_controller *); 119extern void *pcibr_bus_fixup(struct pcibus_bussoft *, struct pci_controller *);
132extern dma_addr_t pcibr_dma_map(struct pci_dev *, unsigned long, size_t); 120extern 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 -----------------------------*/
19extern int sn_prom_feature_available(int id); 16extern 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
16typedef unsigned long cycles_t; 16typedef unsigned long cycles_t;
17 17
18extern 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 6b02fe3fcff2..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,24 +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#define MADV_DONTFORK 0x30 /* dont inherit across fork */
42#define MADV_DOFORK 0x31 /* do inherit across fork */
43
44/* compatibility flags */
45#define MAP_ANON MAP_ANONYMOUS
46#define MAP_FILE 0
47
48#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-m32r/uaccess.h b/include/asm-m32r/uaccess.h
index 0da7c47d2f01..e8ae61956a51 100644
--- a/include/asm-m32r/uaccess.h
+++ b/include/asm-m32r/uaccess.h
@@ -328,7 +328,7 @@ extern void __put_user_bad(void);
328 " .long 1b,4b\n" \ 328 " .long 1b,4b\n" \
329 " .long 2b,4b\n" \ 329 " .long 2b,4b\n" \
330 ".previous" \ 330 ".previous" \
331 : "=r"(err) \ 331 : "=&r"(err) \
332 : "r"(x), "r"(addr), "i"(-EFAULT), "0"(err) \ 332 : "r"(x), "r"(addr), "i"(-EFAULT), "0"(err) \
333 : "r14", "memory") 333 : "r14", "memory")
334 334
@@ -353,7 +353,7 @@ extern void __put_user_bad(void);
353 " .long 1b,4b\n" \ 353 " .long 1b,4b\n" \
354 " .long 2b,4b\n" \ 354 " .long 2b,4b\n" \
355 ".previous" \ 355 ".previous" \
356 : "=r"(err) \ 356 : "=&r"(err) \
357 : "r"(x), "r"(addr), "i"(-EFAULT), "0"(err) \ 357 : "r"(x), "r"(addr), "i"(-EFAULT), "0"(err) \
358 : "r14", "memory") 358 : "r14", "memory")
359#else 359#else
@@ -398,7 +398,7 @@ struct __large_struct { unsigned long buf[100]; };
398 " .balign 4\n" \ 398 " .balign 4\n" \
399 " .long 1b,3b\n" \ 399 " .long 1b,3b\n" \
400 ".previous" \ 400 ".previous" \
401 : "=r"(err) \ 401 : "=&r"(err) \
402 : "r"(x), "r"(addr), "i"(-EFAULT), "0"(err) \ 402 : "r"(x), "r"(addr), "i"(-EFAULT), "0"(err) \
403 : "r14", "memory") 403 : "r14", "memory")
404 404
@@ -442,7 +442,7 @@ do { \
442 " .balign 4\n" \ 442 " .balign 4\n" \
443 " .long 1b,3b\n" \ 443 " .long 1b,3b\n" \
444 ".previous" \ 444 ".previous" \
445 : "=r"(err), "=&r"(x) \ 445 : "=&r"(err), "=&r"(x) \
446 : "r"(addr), "i"(-EFAULT), "0"(err) \ 446 : "r"(addr), "i"(-EFAULT), "0"(err) \
447 : "r14", "memory") 447 : "r14", "memory")
448 448
diff --git a/include/asm-m68k/atomic.h b/include/asm-m68k/atomic.h
index a4a84d5c65d5..862e497c2645 100644
--- a/include/asm-m68k/atomic.h
+++ b/include/asm-m68k/atomic.h
@@ -55,6 +55,7 @@ static inline int atomic_inc_and_test(atomic_t *v)
55} 55}
56 56
57#ifdef CONFIG_RMW_INSNS 57#ifdef CONFIG_RMW_INSNS
58
58static inline int atomic_add_return(int i, atomic_t *v) 59static inline int atomic_add_return(int i, atomic_t *v)
59{ 60{
60 int t, tmp; 61 int t, tmp;
@@ -82,7 +83,12 @@ static inline int atomic_sub_return(int i, atomic_t *v)
82 : "g" (i), "2" (atomic_read(v))); 83 : "g" (i), "2" (atomic_read(v)));
83 return t; 84 return t;
84} 85}
86
87#define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n)))
88#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
89
85#else /* !CONFIG_RMW_INSNS */ 90#else /* !CONFIG_RMW_INSNS */
91
86static inline int atomic_add_return(int i, atomic_t * v) 92static inline int atomic_add_return(int i, atomic_t * v)
87{ 93{
88 unsigned long flags; 94 unsigned long flags;
@@ -110,6 +116,32 @@ static inline int atomic_sub_return(int i, atomic_t * v)
110 116
111 return t; 117 return t;
112} 118}
119
120static inline int atomic_cmpxchg(atomic_t *v, int old, int new)
121{
122 unsigned long flags;
123 int prev;
124
125 local_irq_save(flags);
126 prev = atomic_read(v);
127 if (prev == old)
128 atomic_set(v, new);
129 local_irq_restore(flags);
130 return prev;
131}
132
133static inline int atomic_xchg(atomic_t *v, int new)
134{
135 unsigned long flags;
136 int prev;
137
138 local_irq_save(flags);
139 prev = atomic_read(v);
140 atomic_set(v, new);
141 local_irq_restore(flags);
142 return prev;
143}
144
113#endif /* !CONFIG_RMW_INSNS */ 145#endif /* !CONFIG_RMW_INSNS */
114 146
115#define atomic_dec_return(v) atomic_sub_return(1, (v)) 147#define atomic_dec_return(v) atomic_sub_return(1, (v))
@@ -139,9 +171,6 @@ static inline void atomic_set_mask(unsigned long mask, unsigned long *v)
139 __asm__ __volatile__("orl %1,%0" : "+m" (*v) : "id" (mask)); 171 __asm__ __volatile__("orl %1,%0" : "+m" (*v) : "id" (mask));
140} 172}
141 173
142#define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n)))
143#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
144
145#define atomic_add_unless(v, a, u) \ 174#define atomic_add_unless(v, a, u) \
146({ \ 175({ \
147 int c, old; \ 176 int c, old; \
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
80extern void (*enable_irq)(unsigned int); 80extern void (*enable_irq)(unsigned int);
81extern void (*disable_irq)(unsigned int); 81extern void (*disable_irq)(unsigned int);
82#define enable_irq_nosync enable_irq 82#define disable_irq_nosync disable_irq
83 83
84struct pt_regs; 84struct pt_regs;
85 85
diff --git a/include/asm-m68k/mman.h b/include/asm-m68k/mman.h
index efd12bc4ccb7..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,24 +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#define MADV_DONTFORK 0x30 /* dont inherit across fork */
40#define MADV_DOFORK 0x31 /* do inherit across fork */
41
42/* compatibility flags */
43#define MAP_ANON MAP_ANONYMOUS
44#define MAP_FILE 0
45
46#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/atomic.h b/include/asm-mips/atomic.h
index 654b97d3e13a..2c8b853376c9 100644
--- a/include/asm-mips/atomic.h
+++ b/include/asm-mips/atomic.h
@@ -250,7 +250,10 @@ static __inline__ int atomic_sub_if_positive(int i, atomic_t * v)
250 " subu %0, %1, %3 \n" 250 " subu %0, %1, %3 \n"
251 " bltz %0, 1f \n" 251 " bltz %0, 1f \n"
252 " sc %0, %2 \n" 252 " sc %0, %2 \n"
253 " .set noreorder \n"
253 " beqzl %0, 1b \n" 254 " beqzl %0, 1b \n"
255 " subu %0, %1, %3 \n"
256 " .set reorder \n"
254 " sync \n" 257 " sync \n"
255 "1: \n" 258 "1: \n"
256 " .set mips0 \n" 259 " .set mips0 \n"
@@ -266,7 +269,10 @@ static __inline__ int atomic_sub_if_positive(int i, atomic_t * v)
266 " subu %0, %1, %3 \n" 269 " subu %0, %1, %3 \n"
267 " bltz %0, 1f \n" 270 " bltz %0, 1f \n"
268 " sc %0, %2 \n" 271 " sc %0, %2 \n"
272 " .set noreorder \n"
269 " beqz %0, 1b \n" 273 " beqz %0, 1b \n"
274 " subu %0, %1, %3 \n"
275 " .set reorder \n"
270 " sync \n" 276 " sync \n"
271 "1: \n" 277 "1: \n"
272 " .set mips0 \n" 278 " .set mips0 \n"
@@ -598,7 +604,10 @@ static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v)
598 " dsubu %0, %1, %3 \n" 604 " dsubu %0, %1, %3 \n"
599 " bltz %0, 1f \n" 605 " bltz %0, 1f \n"
600 " scd %0, %2 \n" 606 " scd %0, %2 \n"
607 " .set noreorder \n"
601 " beqzl %0, 1b \n" 608 " beqzl %0, 1b \n"
609 " dsubu %0, %1, %3 \n"
610 " .set reorder \n"
602 " sync \n" 611 " sync \n"
603 "1: \n" 612 "1: \n"
604 " .set mips0 \n" 613 " .set mips0 \n"
@@ -614,7 +623,10 @@ static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v)
614 " dsubu %0, %1, %3 \n" 623 " dsubu %0, %1, %3 \n"
615 " bltz %0, 1f \n" 624 " bltz %0, 1f \n"
616 " scd %0, %2 \n" 625 " scd %0, %2 \n"
626 " .set noreorder \n"
617 " beqz %0, 1b \n" 627 " beqz %0, 1b \n"
628 " dsubu %0, %1, %3 \n"
629 " .set reorder \n"
618 " sync \n" 630 " sync \n"
619 "1: \n" 631 "1: \n"
620 " .set mips0 \n" 632 " .set mips0 \n"
diff --git a/include/asm-mips/io.h b/include/asm-mips/io.h
index 5a4c8a54b8f4..8c011aa61afa 100644
--- a/include/asm-mips/io.h
+++ b/include/asm-mips/io.h
@@ -283,6 +283,24 @@ static inline void __iomem * __ioremap_mode(phys_t offset, unsigned long size,
283 __ioremap_mode((offset), (size), _CACHE_UNCACHED) 283 __ioremap_mode((offset), (size), _CACHE_UNCACHED)
284 284
285/* 285/*
286 * ioremap_cachable - map bus memory into CPU space
287 * @offset: bus address of the memory
288 * @size: size of the resource to map
289 *
290 * ioremap_nocache performs a platform specific sequence of operations to
291 * make bus memory CPU accessible via the readb/readw/readl/writeb/
292 * writew/writel functions and the other mmio helpers. The returned
293 * address is not guaranteed to be usable directly as a virtual
294 * address.
295 *
296 * This version of ioremap ensures that the memory is marked cachable by
297 * the CPU. Also enables full write-combining. Useful for some
298 * memory-like regions on I/O busses.
299 */
300#define ioremap_cachable(offset, size) \
301 __ioremap_mode((offset), (size), PAGE_CACHABLE_DEFAULT)
302
303/*
286 * These two are MIPS specific ioremap variant. ioremap_cacheable_cow 304 * These two are MIPS specific ioremap variant. ioremap_cacheable_cow
287 * requests a cachable mapping, ioremap_uncached_accelerated requests a 305 * requests a cachable mapping, ioremap_uncached_accelerated requests a
288 * mapping using the uncached accelerated mode which isn't supported on 306 * mapping using the uncached accelerated mode which isn't supported on
diff --git a/include/asm-mips/mman.h b/include/asm-mips/mman.h
index 6d01e26830fa..046cf686bee7 100644
--- a/include/asm-mips/mman.h
+++ b/include/asm-mips/mman.h
@@ -60,17 +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#define MADV_DONTFORK 0x30 /* dont inherit across fork */ 69/* common parameters: try to keep these consistent across architectures */
70#define MADV_DOFORK 0x31 /* do inherit across fork */ 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 */
71 73
72/* compatibility flags */ 74/* compatibility flags */
73#define MAP_ANON MAP_ANONYMOUS 75#define MAP_ANON MAP_ANONYMOUS
74#define MAP_FILE 0 76#define MAP_FILE 0
75 77
76#endif /* _ASM_MMAN_H */ 78#endif /* _ASM_MMAN_H */
diff --git a/include/asm-mips/smp.h b/include/asm-mips/smp.h
index 5618f1e12f40..75c6fe7c2126 100644
--- a/include/asm-mips/smp.h
+++ b/include/asm-mips/smp.h
@@ -58,7 +58,9 @@ static inline int num_booting_cpus(void)
58 return cpus_weight(cpu_callout_map); 58 return cpus_weight(cpu_callout_map);
59} 59}
60 60
61/* These are defined by the board-specific code. */ 61/*
62 * These are defined by the board-specific code.
63 */
62 64
63/* 65/*
64 * Cause the function described by call_data to be executed on the passed 66 * Cause the function described by call_data to be executed on the passed
@@ -79,7 +81,12 @@ extern void prom_boot_secondary(int cpu, struct task_struct *idle);
79extern void prom_init_secondary(void); 81extern void prom_init_secondary(void);
80 82
81/* 83/*
82 * Detect available CPUs, populate phys_cpu_present_map before smp_init 84 * Populate cpu_possible_map before smp_init, called from setup_arch.
85 */
86extern void plat_smp_setup(void);
87
88/*
89 * Called after init_IRQ but before __cpu_up.
83 */ 90 */
84extern void prom_prepare_cpus(unsigned int max_cpus); 91extern void prom_prepare_cpus(unsigned int max_cpus);
85 92
diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h
index e8e5d4143377..ddae9bae31af 100644
--- a/include/asm-mips/system.h
+++ b/include/asm-mips/system.h
@@ -322,7 +322,7 @@ static inline unsigned long __cmpxchg_u32(volatile int * m, unsigned long old,
322#endif 322#endif
323 "2: \n" 323 "2: \n"
324 " .set pop \n" 324 " .set pop \n"
325 : "=&r" (retval), "=m" (*m) 325 : "=&r" (retval), "=R" (*m)
326 : "R" (*m), "Jr" (old), "Jr" (new) 326 : "R" (*m), "Jr" (old), "Jr" (new)
327 : "memory"); 327 : "memory");
328 } else if (cpu_has_llsc) { 328 } else if (cpu_has_llsc) {
@@ -342,7 +342,7 @@ static inline unsigned long __cmpxchg_u32(volatile int * m, unsigned long old,
342#endif 342#endif
343 "2: \n" 343 "2: \n"
344 " .set pop \n" 344 " .set pop \n"
345 : "=&r" (retval), "=m" (*m) 345 : "=&r" (retval), "=R" (*m)
346 : "R" (*m), "Jr" (old), "Jr" (new) 346 : "R" (*m), "Jr" (old), "Jr" (new)
347 : "memory"); 347 : "memory");
348 } else { 348 } else {
@@ -379,7 +379,7 @@ static inline unsigned long __cmpxchg_u64(volatile int * m, unsigned long old,
379#endif 379#endif
380 "2: \n" 380 "2: \n"
381 " .set pop \n" 381 " .set pop \n"
382 : "=&r" (retval), "=m" (*m) 382 : "=&r" (retval), "=R" (*m)
383 : "R" (*m), "Jr" (old), "Jr" (new) 383 : "R" (*m), "Jr" (old), "Jr" (new)
384 : "memory"); 384 : "memory");
385 } else if (cpu_has_llsc) { 385 } else if (cpu_has_llsc) {
@@ -397,7 +397,7 @@ static inline unsigned long __cmpxchg_u64(volatile int * m, unsigned long old,
397#endif 397#endif
398 "2: \n" 398 "2: \n"
399 " .set pop \n" 399 " .set pop \n"
400 : "=&r" (retval), "=m" (*m) 400 : "=&r" (retval), "=R" (*m)
401 : "R" (*m), "Jr" (old), "Jr" (new) 401 : "R" (*m), "Jr" (old), "Jr" (new)
402 : "memory"); 402 : "memory");
403 } else { 403 } else {
diff --git a/include/asm-mips/uaccess.h b/include/asm-mips/uaccess.h
index 7a553e9d44d3..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/*
@@ -284,7 +284,7 @@ do { \
284 " .previous \n" \ 284 " .previous \n" \
285 : "=r" (__gu_err), "=&r" (__gu_tmp) \ 285 : "=r" (__gu_err), "=&r" (__gu_tmp) \
286 : "0" (0), "r" (addr), "i" (-EFAULT)); \ 286 : "0" (0), "r" (addr), "i" (-EFAULT)); \
287 (val) = __gu_tmp; \ 287 (val) = (__typeof__(*(addr))) __gu_tmp; \
288} 288}
289 289
290/* 290/*
diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h
index 769305d20108..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)
diff --git a/include/asm-mips/vga.h b/include/asm-mips/vga.h
index ca5cec97e167..34755c0a6398 100644
--- a/include/asm-mips/vga.h
+++ b/include/asm-mips/vga.h
@@ -26,6 +26,9 @@
26 * <linux/vt_buffer.h> has already done the right job for us. 26 * <linux/vt_buffer.h> has already done the right job for us.
27 */ 27 */
28 28
29#undef scr_writew
30#undef scr_readw
31
29static inline void scr_writew(u16 val, volatile u16 *addr) 32static inline void scr_writew(u16 val, volatile u16 *addr)
30{ 33{
31 *addr = cpu_to_le16(val); 34 *addr = cpu_to_le16(val);
diff --git a/include/asm-parisc/mman.h b/include/asm-parisc/mman.h
index a381cf5c8f55..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 */
@@ -49,8 +53,6 @@
49#define MADV_4M_PAGES 22 /* Use 4 Megabyte pages */ 53#define MADV_4M_PAGES 22 /* Use 4 Megabyte pages */
50#define MADV_16M_PAGES 24 /* Use 16 Megabyte pages */ 54#define MADV_16M_PAGES 24 /* Use 16 Megabyte pages */
51#define MADV_64M_PAGES 26 /* Use 64 Megabyte pages */ 55#define MADV_64M_PAGES 26 /* Use 64 Megabyte pages */
52#define MADV_DONTFORK 0x30 /* dont inherit across fork */
53#define MADV_DOFORK 0x31 /* do inherit across fork */
54 56
55/* compatibility flags */ 57/* compatibility flags */
56#define MAP_ANON MAP_ANONYMOUS 58#define MAP_ANON MAP_ANONYMOUS
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h
index 64210549f56b..5638518968c3 100644
--- a/include/asm-powerpc/cputable.h
+++ b/include/asm-powerpc/cputable.h
@@ -20,6 +20,8 @@
20#define PPC_FEATURE_POWER5_PLUS 0x00020000 20#define PPC_FEATURE_POWER5_PLUS 0x00020000
21#define PPC_FEATURE_CELL 0x00010000 21#define PPC_FEATURE_CELL 0x00010000
22#define PPC_FEATURE_BOOKE 0x00008000 22#define PPC_FEATURE_BOOKE 0x00008000
23#define PPC_FEATURE_SMT 0x00004000
24#define PPC_FEATURE_ICACHE_SNOOP 0x00002000
23 25
24#ifdef __KERNEL__ 26#ifdef __KERNEL__
25#ifndef __ASSEMBLY__ 27#ifndef __ASSEMBLY__
@@ -159,9 +161,11 @@ extern void do_cpu_ftr_fixups(unsigned long offset);
159#endif 161#endif
160 162
161/* We need to mark all pages as being coherent if we're SMP or we 163/* 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. 164 * have a 74[45]x and an MPC107 host bridge. Also 83xx requires
165 * it for PCI "streaming/prefetch" to work properly.
163 */ 166 */
164#if defined(CONFIG_SMP) || defined(CONFIG_MPC10X_BRIDGE) 167#if defined(CONFIG_SMP) || defined(CONFIG_MPC10X_BRIDGE) \
168 || defined(CONFIG_PPC_83xx)
165#define CPU_FTR_COMMON CPU_FTR_NEED_COHERENT 169#define CPU_FTR_COMMON CPU_FTR_NEED_COHERENT
166#else 170#else
167#define CPU_FTR_COMMON 0 171#define CPU_FTR_COMMON 0
@@ -277,7 +281,8 @@ enum {
277 CPU_FTRS_G2_LE = CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | 281 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, 282 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 | 283 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, 284 CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_HAS_HIGH_BATS |
285 CPU_FTR_COMMON,
281 CPU_FTRS_CLASSIC32 = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | 286 CPU_FTRS_CLASSIC32 = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE |
282 CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE, 287 CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE,
283 CPU_FTRS_POWER3_32 = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | 288 CPU_FTRS_POWER3_32 = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE |
diff --git a/include/asm-powerpc/eeh.h b/include/asm-powerpc/eeh.h
index b263fb2fa6e4..5207758a6dd9 100644
--- a/include/asm-powerpc/eeh.h
+++ b/include/asm-powerpc/eeh.h
@@ -27,6 +27,7 @@
27#include <linux/string.h> 27#include <linux/string.h>
28 28
29struct pci_dev; 29struct pci_dev;
30struct pci_bus;
30struct device_node; 31struct device_node;
31 32
32#ifdef CONFIG_EEH 33#ifdef CONFIG_EEH
@@ -60,8 +61,9 @@ void __init pci_addr_cache_build(void);
60 * to finish the eeh setup for this device. 61 * to finish the eeh setup for this device.
61 */ 62 */
62void eeh_add_device_early(struct device_node *); 63void eeh_add_device_early(struct device_node *);
64void eeh_add_device_late(struct pci_dev *dev);
63void eeh_add_device_tree_early(struct device_node *); 65void eeh_add_device_tree_early(struct device_node *);
64void eeh_add_device_late(struct pci_dev *); 66void eeh_add_device_tree_late(struct pci_bus *);
65 67
66/** 68/**
67 * eeh_remove_device - undo EEH setup for the indicated pci device 69 * eeh_remove_device - undo EEH setup for the indicated pci device
@@ -122,6 +124,8 @@ static inline void eeh_remove_device(struct pci_dev *dev) { }
122 124
123static inline void eeh_add_device_tree_early(struct device_node *dn) { } 125static inline void eeh_add_device_tree_early(struct device_node *dn) { }
124 126
127static inline void eeh_add_device_tree_late(struct pci_bus *bus) { }
128
125static inline void eeh_remove_bus_device(struct pci_dev *dev) { } 129static inline void eeh_remove_bus_device(struct pci_dev *dev) { }
126#define EEH_POSSIBLE_ERROR(val, type) (0) 130#define EEH_POSSIBLE_ERROR(val, type) (0)
127#define EEH_IO_ERROR_VALUE(size) (-1UL) 131#define EEH_IO_ERROR_VALUE(size) (-1UL)
diff --git a/include/asm-powerpc/kexec.h b/include/asm-powerpc/kexec.h
index bda2f217e6fe..6a2af2f6853b 100644
--- a/include/asm-powerpc/kexec.h
+++ b/include/asm-powerpc/kexec.h
@@ -93,7 +93,8 @@ static inline void crash_setup_regs(struct pt_regs *newregs,
93 "mfxer %0\n" 93 "mfxer %0\n"
94 "std %0, 296(%2)\n" 94 "std %0, 296(%2)\n"
95 : "=&r" (tmp1), "=&r" (tmp2) 95 : "=&r" (tmp1), "=&r" (tmp2)
96 : "b" (newregs)); 96 : "b" (newregs)
97 : "memory");
97 } 98 }
98} 99}
99#else 100#else
diff --git a/include/asm-powerpc/mman.h b/include/asm-powerpc/mman.h
index fcff25d13f13..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,27 +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#define MADV_DONTFORK 0x30 /* dont inherit across fork */
49#define MADV_DOFORK 0x31 /* do inherit across fork */
50
51/* compatibility flags */
52#define MAP_ANON MAP_ANONYMOUS
53#define MAP_FILE 0
54
55#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
114extern hpte_t *htab_address; 114extern hpte_t *htab_address;
115extern unsigned long htab_size_bytes;
115extern unsigned long htab_hash_mask; 116extern 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/pgtable-4k.h b/include/asm-powerpc/pgtable-4k.h
index e9590c06ad92..80a7832d2721 100644
--- a/include/asm-powerpc/pgtable-4k.h
+++ b/include/asm-powerpc/pgtable-4k.h
@@ -88,4 +88,4 @@
88 (((addr) >> PUD_SHIFT) & (PTRS_PER_PUD - 1))) 88 (((addr) >> PUD_SHIFT) & (PTRS_PER_PUD - 1)))
89 89
90#define pud_ERROR(e) \ 90#define pud_ERROR(e) \
91 printk("%s:%d: bad pmd %08lx.\n", __FILE__, __LINE__, pud_val(e)) 91 printk("%s:%d: bad pud %08lx.\n", __FILE__, __LINE__, pud_val(e))
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
618static inline void ppc64_runlatch_on(void) 618
619{ 619extern void ppc64_runlatch_on(void);
620 unsigned long ctrl; 620extern 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
629static 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
640extern unsigned long scom970_read(unsigned int address); 622extern unsigned long scom970_read(unsigned int address);
641extern void scom970_write(unsigned int address, unsigned long value); 623extern 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) \
651BEGIN_FTR_SECTION \
652 mfspr (REG),SPRN_CTRLF; \
653 ori (REG),(REG),CTRL_RUNLATCH; \
654 mtspr SPRN_CTRLT,(REG); \
655END_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..ffc7462d77ba 100644
--- a/include/asm-powerpc/thread_info.h
+++ b/include/asm-powerpc/thread_info.h
@@ -37,7 +37,6 @@ struct thread_info {
37 int preempt_count; /* 0 => preemptable, 37 int preempt_count; /* 0 => preemptable,
38 <0 => BUG */ 38 <0 => BUG */
39 struct restart_block restart_block; 39 struct restart_block restart_block;
40 void __user *nvgprs_frame;
41 /* low level flags - has atomic operations done on it */ 40 /* low level flags - has atomic operations done on it */
42 unsigned long flags ____cacheline_aligned_in_smp; 41 unsigned long flags ____cacheline_aligned_in_smp;
43}; 42};
@@ -113,14 +112,13 @@ static inline struct thread_info *current_thread_info(void)
113#define TIF_POLLING_NRFLAG 4 /* true if poll_idle() is polling 112#define TIF_POLLING_NRFLAG 4 /* true if poll_idle() is polling
114 TIF_NEED_RESCHED */ 113 TIF_NEED_RESCHED */
115#define TIF_32BIT 5 /* 32 bit binary */ 114#define TIF_32BIT 5 /* 32 bit binary */
116/* #define SPARE 6 */ 115#define TIF_RUNLATCH 6 /* Is the runlatch enabled? */
117#define TIF_ABI_PENDING 7 /* 32/64 bit switch needed */ 116#define TIF_ABI_PENDING 7 /* 32/64 bit switch needed */
118#define TIF_SYSCALL_AUDIT 8 /* syscall auditing active */ 117#define TIF_SYSCALL_AUDIT 8 /* syscall auditing active */
119#define TIF_SINGLESTEP 9 /* singlestepping active */ 118#define TIF_SINGLESTEP 9 /* singlestepping active */
120#define TIF_MEMDIE 10 119#define TIF_MEMDIE 10
121#define TIF_SECCOMP 11 /* secure computing */ 120#define TIF_SECCOMP 11 /* secure computing */
122#define TIF_RESTOREALL 12 /* Restore all regs (implies NOERROR) */ 121#define TIF_RESTOREALL 12 /* Restore all regs (implies NOERROR) */
123#define TIF_SAVE_NVGPRS 13 /* Save r14-r31 in signal frame */
124#define TIF_NOERROR 14 /* Force successful syscall return */ 122#define TIF_NOERROR 14 /* Force successful syscall return */
125#define TIF_RESTORE_SIGMASK 15 /* Restore signal mask in do_signal */ 123#define TIF_RESTORE_SIGMASK 15 /* Restore signal mask in do_signal */
126 124
@@ -131,21 +129,19 @@ static inline struct thread_info *current_thread_info(void)
131#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) 129#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
132#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) 130#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
133#define _TIF_32BIT (1<<TIF_32BIT) 131#define _TIF_32BIT (1<<TIF_32BIT)
134/* #define _SPARE (1<<SPARE) */ 132#define _TIF_RUNLATCH (1<<TIF_RUNLATCH)
135#define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING) 133#define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING)
136#define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) 134#define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT)
137#define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) 135#define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP)
138#define _TIF_SECCOMP (1<<TIF_SECCOMP) 136#define _TIF_SECCOMP (1<<TIF_SECCOMP)
139#define _TIF_RESTOREALL (1<<TIF_RESTOREALL) 137#define _TIF_RESTOREALL (1<<TIF_RESTOREALL)
140#define _TIF_SAVE_NVGPRS (1<<TIF_SAVE_NVGPRS)
141#define _TIF_NOERROR (1<<TIF_NOERROR) 138#define _TIF_NOERROR (1<<TIF_NOERROR)
142#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) 139#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
143#define _TIF_SYSCALL_T_OR_A (_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP) 140#define _TIF_SYSCALL_T_OR_A (_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP)
144 141
145#define _TIF_USER_WORK_MASK (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | \ 142#define _TIF_USER_WORK_MASK (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | \
146 _TIF_NEED_RESCHED | _TIF_RESTOREALL | \ 143 _TIF_NEED_RESCHED | _TIF_RESTORE_SIGMASK)
147 _TIF_RESTORE_SIGMASK) 144#define _TIF_PERSYSCALL_MASK (_TIF_RESTOREALL|_TIF_NOERROR)
148#define _TIF_PERSYSCALL_MASK (_TIF_RESTOREALL|_TIF_NOERROR|_TIF_SAVE_NVGPRS)
149 145
150#endif /* __KERNEL__ */ 146#endif /* __KERNEL__ */
151 147
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
155extern void setup_pci_ptrs(void); 155extern 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 */
161typedef 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
168extern sys_ctrler_t sys_ctrler;
169
170#ifdef CONFIG_SMP 157#ifdef CONFIG_SMP
171struct smp_ops_t { 158struct 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/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 d41ca1477010..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,24 +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#define MADV_DONTFORK 0x30 /* dont inherit across fork */
48#define MADV_DOFORK 0x31 /* do inherit across fork */
49
50/* compatibility flags */
51#define MAP_ANON MAP_ANONYMOUS
52#define MAP_FILE 0
53
54#endif /* __S390_MMAN_H__ */ 25#endif /* __S390_MMAN_H__ */
diff --git a/include/asm-s390/smp.h b/include/asm-s390/smp.h
index 9c6e9c300eb9..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
34extern void smp_setup_cpu_possible_map(void);
34extern int smp_call_function_on(void (*func) (void *info), void *info, 35extern 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 */
@@ -104,6 +105,7 @@ smp_call_function_on(void (*func) (void *info), void *info,
104#define smp_cpu_not_running(cpu) 1 105#define smp_cpu_not_running(cpu) 1
105#define smp_get_cpu(cpu) ({ 0; }) 106#define smp_get_cpu(cpu) ({ 0; })
106#define smp_put_cpu(cpu) ({ 0; }) 107#define smp_put_cpu(cpu) ({ 0; })
108#define smp_setup_cpu_possible_map()
107#endif 109#endif
108 110
109#endif 111#endif
diff --git a/include/asm-s390/system.h b/include/asm-s390/system.h
index b2e65e8bf812..6a89dbb03c1e 100644
--- a/include/asm-s390/system.h
+++ b/include/asm-s390/system.h
@@ -118,6 +118,8 @@ static inline void sched_cacheflush(void)
118extern void account_vtime(struct task_struct *); 118extern void account_vtime(struct task_struct *);
119extern void account_tick_vtime(struct task_struct *); 119extern void account_tick_vtime(struct task_struct *);
120extern void account_system_vtime(struct task_struct *); 120extern void account_system_vtime(struct task_struct *);
121#else
122#define account_vtime(x) do { /* empty */ } while (0)
121#endif 123#endif
122 124
123#define finish_arch_switch(prev) do { \ 125#define finish_arch_switch(prev) do { \
diff --git a/include/asm-sh/mman.h b/include/asm-sh/mman.h
index 0e08d0573abc..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,24 +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#define MADV_DONTFORK 0x30 /* dont inherit across fork */
40#define MADV_DOFORK 0x31 /* do inherit across fork */
41
42/* compatibility flags */
43#define MAP_ANON MAP_ANONYMOUS
44#define MAP_FILE 0
45
46#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 4a298b2be859..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/* SunOS'ified... */ 5#include <asm-generic/mman.h>
6 6
7#define PROT_READ 0x1 /* page can be read */ 7/* SunOS'ified... */
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 8
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,18 +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#define MADV_DONTFORK 0x30 /* dont inherit across fork */
59#define MADV_DOFORK 0x31 /* do inherit across fork */
60
61/* compatibility flags */
62#define MAP_ANON MAP_ANONYMOUS
63#define MAP_FILE 0
64 37
65#endif /* __SPARC_MMAN_H__ */ 38#endif /* __SPARC_MMAN_H__ */
diff --git a/include/asm-sparc64/futex.h b/include/asm-sparc64/futex.h
index 6a332a9f099c..34c4b43d3f98 100644
--- a/include/asm-sparc64/futex.h
+++ b/include/asm-sparc64/futex.h
@@ -1,6 +1,86 @@
1#ifndef _ASM_FUTEX_H 1#ifndef _SPARC64_FUTEX_H
2#define _ASM_FUTEX_H 2#define _SPARC64_FUTEX_H
3 3
4#include <asm-generic/futex.h> 4#include <linux/futex.h>
5#include <asm/errno.h>
6#include <asm/system.h>
7#include <asm/uaccess.h>
5 8
6#endif 9#define __futex_cas_op(insn, ret, oldval, uaddr, oparg) \
10 __asm__ __volatile__( \
11 "\n1: lduwa [%3] %%asi, %2\n" \
12 " " insn "\n" \
13 "2: casa [%3] %%asi, %2, %1\n" \
14 " cmp %2, %1\n" \
15 " bne,pn %%icc, 1b\n" \
16 " mov 0, %0\n" \
17 "3:\n" \
18 " .section .fixup,#alloc,#execinstr\n" \
19 " .align 4\n" \
20 "4: ba 3b\n" \
21 " mov %5, %0\n" \
22 " .previous\n" \
23 " .section __ex_table,\"a\"\n" \
24 " .align 4\n" \
25 " .word 1b, 4b\n" \
26 " .word 2b, 4b\n" \
27 " .previous\n" \
28 : "=&r" (ret), "=&r" (oldval), "=&r" (tem) \
29 : "r" (uaddr), "r" (oparg), "i" (-EFAULT) \
30 : "memory")
31
32static inline int futex_atomic_op_inuser(int encoded_op, int __user *uaddr)
33{
34 int op = (encoded_op >> 28) & 7;
35 int cmp = (encoded_op >> 24) & 15;
36 int oparg = (encoded_op << 8) >> 20;
37 int cmparg = (encoded_op << 20) >> 20;
38 int oldval = 0, ret, tem;
39
40 if (unlikely(!access_ok(VERIFY_WRITE, uaddr, sizeof(int))))
41 return -EFAULT;
42 if (unlikely((((unsigned long) uaddr) & 0x3UL)))
43 return -EINVAL;
44
45 if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
46 oparg = 1 << oparg;
47
48 inc_preempt_count();
49
50 switch (op) {
51 case FUTEX_OP_SET:
52 __futex_cas_op("mov\t%4, %1", ret, oldval, uaddr, oparg);
53 break;
54 case FUTEX_OP_ADD:
55 __futex_cas_op("add\t%2, %4, %1", ret, oldval, uaddr, oparg);
56 break;
57 case FUTEX_OP_OR:
58 __futex_cas_op("or\t%2, %4, %1", ret, oldval, uaddr, oparg);
59 break;
60 case FUTEX_OP_ANDN:
61 __futex_cas_op("and\t%2, %4, %1", ret, oldval, uaddr, oparg);
62 break;
63 case FUTEX_OP_XOR:
64 __futex_cas_op("xor\t%2, %4, %1", ret, oldval, uaddr, oparg);
65 break;
66 default:
67 ret = -ENOSYS;
68 }
69
70 dec_preempt_count();
71
72 if (!ret) {
73 switch (cmp) {
74 case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break;
75 case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break;
76 case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break;
77 case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break;
78 case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break;
79 case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break;
80 default: ret = -ENOSYS;
81 }
82 }
83 return ret;
84}
85
86#endif /* !(_SPARC64_FUTEX_H) */
diff --git a/include/asm-sparc64/mman.h b/include/asm-sparc64/mman.h
index d705ec92da8b..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/* SunOS'ified... */ 5#include <asm-generic/mman.h>
6 6
7#define PROT_READ 0x1 /* page can be read */ 7/* SunOS'ified... */
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 8
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,18 +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#define MADV_DONTFORK 0x30 /* dont inherit across fork */
59#define MADV_DOFORK 0x31 /* do inherit across fork */
60
61/* compatibility flags */
62#define MAP_ANON MAP_ANONYMOUS
63#define MAP_FILE 0
64 37
65#endif /* __SPARC64_MMAN_H__ */ 38#endif /* __SPARC64_MMAN_H__ */
diff --git a/include/asm-sparc64/smp.h b/include/asm-sparc64/smp.h
index 110a2de89123..473edb2603ec 100644
--- a/include/asm-sparc64/smp.h
+++ b/include/asm-sparc64/smp.h
@@ -66,8 +66,14 @@ static __inline__ int hard_smp_processor_id(void)
66 66
67#define raw_smp_processor_id() (current_thread_info()->cpu) 67#define raw_smp_processor_id() (current_thread_info()->cpu)
68 68
69extern void smp_setup_cpu_possible_map(void);
70
69#endif /* !(__ASSEMBLY__) */ 71#endif /* !(__ASSEMBLY__) */
70 72
73#else
74
75#define smp_setup_cpu_possible_map() do { } while (0)
76
71#endif /* !(CONFIG_SMP) */ 77#endif /* !(CONFIG_SMP) */
72 78
73#define NO_PROC_ID 0xFF 79#define NO_PROC_ID 0xFF
diff --git a/include/asm-sparc64/uaccess.h b/include/asm-sparc64/uaccess.h
index 203e8eee6351..c91d1e38eac6 100644
--- a/include/asm-sparc64/uaccess.h
+++ b/include/asm-sparc64/uaccess.h
@@ -136,7 +136,7 @@ __asm__ __volatile__( \
136 "b 2b\n\t" \ 136 "b 2b\n\t" \
137 " mov %3, %0\n\n\t" \ 137 " mov %3, %0\n\n\t" \
138 ".previous\n\t" \ 138 ".previous\n\t" \
139 ".section __ex_table,#alloc\n\t" \ 139 ".section __ex_table,\"a\"\n\t" \
140 ".align 4\n\t" \ 140 ".align 4\n\t" \
141 ".word 1b, 3b\n\t" \ 141 ".word 1b, 3b\n\t" \
142 ".previous\n\n\t" \ 142 ".previous\n\n\t" \
@@ -148,7 +148,7 @@ if (__builtin_constant_p(ret) && ret == -EFAULT) \
148__asm__ __volatile__( \ 148__asm__ __volatile__( \
149 "/* Put user asm ret, inline. */\n" \ 149 "/* Put user asm ret, inline. */\n" \
150"1:\t" "st"#size "a %1, [%2] %%asi\n\n\t" \ 150"1:\t" "st"#size "a %1, [%2] %%asi\n\n\t" \
151 ".section __ex_table,#alloc\n\t" \ 151 ".section __ex_table,\"a\"\n\t" \
152 ".align 4\n\t" \ 152 ".align 4\n\t" \
153 ".word 1b, __ret_efault\n\n\t" \ 153 ".word 1b, __ret_efault\n\n\t" \
154 ".previous\n\n\t" \ 154 ".previous\n\n\t" \
@@ -163,7 +163,7 @@ __asm__ __volatile__( \
163 "ret\n\t" \ 163 "ret\n\t" \
164 " restore %%g0, %3, %%o0\n\n\t" \ 164 " restore %%g0, %3, %%o0\n\n\t" \
165 ".previous\n\t" \ 165 ".previous\n\t" \
166 ".section __ex_table,#alloc\n\t" \ 166 ".section __ex_table,\"a\"\n\t" \
167 ".align 4\n\t" \ 167 ".align 4\n\t" \
168 ".word 1b, 3b\n\n\t" \ 168 ".word 1b, 3b\n\n\t" \
169 ".previous\n\n\t" \ 169 ".previous\n\n\t" \
@@ -206,7 +206,7 @@ __asm__ __volatile__( \
206 "b 2b\n\t" \ 206 "b 2b\n\t" \
207 " mov %3, %0\n\n\t" \ 207 " mov %3, %0\n\n\t" \
208 ".previous\n\t" \ 208 ".previous\n\t" \
209 ".section __ex_table,#alloc\n\t" \ 209 ".section __ex_table,\"a\"\n\t" \
210 ".align 4\n\t" \ 210 ".align 4\n\t" \
211 ".word 1b, 3b\n\n\t" \ 211 ".word 1b, 3b\n\n\t" \
212 ".previous\n\t" \ 212 ".previous\n\t" \
@@ -218,7 +218,7 @@ if (__builtin_constant_p(retval) && retval == -EFAULT) \
218__asm__ __volatile__( \ 218__asm__ __volatile__( \
219 "/* Get user asm ret, inline. */\n" \ 219 "/* Get user asm ret, inline. */\n" \
220"1:\t" "ld"#size "a [%1] %%asi, %0\n\n\t" \ 220"1:\t" "ld"#size "a [%1] %%asi, %0\n\n\t" \
221 ".section __ex_table,#alloc\n\t" \ 221 ".section __ex_table,\"a\"\n\t" \
222 ".align 4\n\t" \ 222 ".align 4\n\t" \
223 ".word 1b,__ret_efault\n\n\t" \ 223 ".word 1b,__ret_efault\n\n\t" \
224 ".previous\n\t" \ 224 ".previous\n\t" \
@@ -233,7 +233,7 @@ __asm__ __volatile__( \
233 "ret\n\t" \ 233 "ret\n\t" \
234 " restore %%g0, %2, %%o0\n\n\t" \ 234 " restore %%g0, %2, %%o0\n\n\t" \
235 ".previous\n\t" \ 235 ".previous\n\t" \
236 ".section __ex_table,#alloc\n\t" \ 236 ".section __ex_table,\"a\"\n\t" \
237 ".align 4\n\t" \ 237 ".align 4\n\t" \
238 ".word 1b, 3b\n\n\t" \ 238 ".word 1b, 3b\n\n\t" \
239 ".previous\n\t" \ 239 ".previous\n\t" \
diff --git a/include/asm-v850/mman.h b/include/asm-v850/mman.h
index 7b851c310e41..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,24 +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#define MADV_DONTFORK 0x30 /* dont inherit across fork */
37#define MADV_DOFORK 0x31 /* do inherit across fork */
38
39/* compatibility flags */
40#define MAP_ANON MAP_ANONYMOUS
41#define MAP_FILE 0
42
43#endif /* __V850_MMAN_H__ */ 15#endif /* __V850_MMAN_H__ */
diff --git a/include/asm-x86_64/mman.h b/include/asm-x86_64/mman.h
index b699a38c1c3c..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,24 +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#define MADV_DONTFORK 0x30 /* dont inherit across fork */
41#define MADV_DOFORK 0x31 /* do inherit across fork */
42
43/* compatibility flags */
44#define MAP_ANON MAP_ANONYMOUS
45#define MAP_FILE 0
46
47#endif 19#endif
diff --git a/include/asm-x86_64/pci.h b/include/asm-x86_64/pci.h
index fd03e15d7ea6..8a05af264d18 100644
--- a/include/asm-x86_64/pci.h
+++ b/include/asm-x86_64/pci.h
@@ -19,8 +19,6 @@ extern unsigned int pcibios_assign_all_busses(void);
19#endif 19#endif
20#define pcibios_scan_all_fns(a, b) 0 20#define pcibios_scan_all_fns(a, b) 0
21 21
22extern int no_iommu, force_iommu;
23
24extern unsigned long pci_mem_start; 22extern unsigned long pci_mem_start;
25#define PCIBIOS_MIN_IO 0x1000 23#define PCIBIOS_MIN_IO 0x1000
26#define PCIBIOS_MIN_MEM (pci_mem_start) 24#define PCIBIOS_MIN_MEM (pci_mem_start)
diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h
index 8fbf4dd72115..715fd94cf577 100644
--- a/include/asm-x86_64/pgtable.h
+++ b/include/asm-x86_64/pgtable.h
@@ -131,7 +131,7 @@ static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, unsigned long
131#define PGDIR_SIZE (1UL << PGDIR_SHIFT) 131#define PGDIR_SIZE (1UL << PGDIR_SHIFT)
132#define PGDIR_MASK (~(PGDIR_SIZE-1)) 132#define PGDIR_MASK (~(PGDIR_SIZE-1))
133 133
134#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE) 134#define USER_PTRS_PER_PGD ((TASK_SIZE-1)/PGDIR_SIZE+1)
135#define FIRST_USER_ADDRESS 0 135#define FIRST_USER_ADDRESS 0
136 136
137#ifndef __ASSEMBLY__ 137#ifndef __ASSEMBLY__
diff --git a/include/asm-x86_64/proto.h b/include/asm-x86_64/proto.h
index c99832e7bf3f..3ba8fd45fcb3 100644
--- a/include/asm-x86_64/proto.h
+++ b/include/asm-x86_64/proto.h
@@ -39,7 +39,6 @@ extern void config_acpi_tables(void);
39extern void ia32_syscall(void); 39extern void ia32_syscall(void);
40extern void iommu_hole_init(void); 40extern void iommu_hole_init(void);
41 41
42extern void time_init_gtod(void);
43extern int pmtimer_mark_offset(void); 42extern int pmtimer_mark_offset(void);
44extern void pmtimer_resume(void); 43extern void pmtimer_resume(void);
45extern void pmtimer_wait(unsigned); 44extern void pmtimer_wait(unsigned);
@@ -133,6 +132,8 @@ extern int fix_aperture;
133extern int force_iommu; 132extern int force_iommu;
134 133
135extern int reboot_force; 134extern int reboot_force;
135extern int notsc_setup(char *);
136extern int setup_additional_cpus(char *);
136 137
137extern void smp_local_timer_interrupt(struct pt_regs * regs); 138extern 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 e2d7afb679c8..ba394cbb4807 100644
--- a/include/asm-xtensa/mman.h
+++ b/include/asm-xtensa/mman.h
@@ -67,17 +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#define MADV_DONTFORK 0x30 /* dont inherit across fork */ 76/* common parameters: try to keep these consistent across architectures */
77#define MADV_DOFORK 0x31 /* do inherit across fork */ 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 */
78 80
79/* compatibility flags */ 81/* compatibility flags */
80#define MAP_ANON MAP_ANONYMOUS 82#define MAP_ANON MAP_ANONYMOUS
81#define MAP_FILE 0 83#define MAP_FILE 0
82 84
83#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;
427extern struct acpi_table_mcfg_config *pci_mmcfg_config; 427extern struct acpi_table_mcfg_config *pci_mmcfg_config;
428extern int pci_mmcfg_config_num; 428extern int pci_mmcfg_config_num;
429 429
430extern int sbf_port ; 430extern int sbf_port;
431extern unsigned long acpi_video_flags;
431 432
432#else /* !CONFIG_ACPI */ 433#else /* !CONFIG_ACPI */
433 434
diff --git a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h
index 8fad50f8e389..ae7dfb790df3 100644
--- a/include/linux/compat_ioctl.h
+++ b/include/linux/compat_ioctl.h
@@ -696,6 +696,8 @@ COMPATIBLE_IOCTL(MEMLOCK)
696COMPATIBLE_IOCTL(MEMUNLOCK) 696COMPATIBLE_IOCTL(MEMUNLOCK)
697COMPATIBLE_IOCTL(MEMGETREGIONCOUNT) 697COMPATIBLE_IOCTL(MEMGETREGIONCOUNT)
698COMPATIBLE_IOCTL(MEMGETREGIONINFO) 698COMPATIBLE_IOCTL(MEMGETREGIONINFO)
699COMPATIBLE_IOCTL(MEMGETBADBLOCK)
700COMPATIBLE_IOCTL(MEMSETBADBLOCK)
699/* NBD */ 701/* NBD */
700ULONG_IOCTL(NBD_SET_SOCK) 702ULONG_IOCTL(NBD_SET_SOCK)
701ULONG_IOCTL(NBD_SET_BLKSIZE) 703ULONG_IOCTL(NBD_SET_BLKSIZE)
diff --git a/include/linux/file.h b/include/linux/file.h
index 418b6101b59a..9901b850f2e4 100644
--- a/include/linux/file.h
+++ b/include/linux/file.h
@@ -60,8 +60,6 @@ extern void put_filp(struct file *);
60extern int get_unused_fd(void); 60extern int get_unused_fd(void);
61extern void FASTCALL(put_unused_fd(unsigned int fd)); 61extern void FASTCALL(put_unused_fd(unsigned int fd));
62struct kmem_cache; 62struct kmem_cache;
63extern void filp_ctor(void * objp, struct kmem_cache *cachep, unsigned long cflags);
64extern void filp_dtor(void * objp, struct kmem_cache *cachep, unsigned long dflags);
65 63
66extern struct file ** alloc_fd_array(int); 64extern struct file ** alloc_fd_array(int);
67extern void free_fd_array(struct file **, int); 65extern void free_fd_array(struct file **, int);
diff --git a/include/linux/fs.h b/include/linux/fs.h
index e059da947007..128d0082522c 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -35,6 +35,7 @@ struct files_stat_struct {
35 int max_files; /* tunable */ 35 int max_files; /* tunable */
36}; 36};
37extern struct files_stat_struct files_stat; 37extern struct files_stat_struct files_stat;
38extern int get_max_files(void);
38 39
39struct inodes_stat_t { 40struct inodes_stat_t {
40 int nr_inodes; 41 int nr_inodes;
@@ -1418,9 +1419,6 @@ extern int is_bad_inode(struct inode *);
1418extern struct file_operations read_fifo_fops; 1419extern struct file_operations read_fifo_fops;
1419extern struct file_operations write_fifo_fops; 1420extern struct file_operations write_fifo_fops;
1420extern struct file_operations rdwr_fifo_fops; 1421extern struct file_operations rdwr_fifo_fops;
1421extern struct file_operations read_pipe_fops;
1422extern struct file_operations write_pipe_fops;
1423extern struct file_operations rdwr_pipe_fops;
1424 1422
1425extern int fs_may_remount_ro(struct super_block *); 1423extern int fs_may_remount_ro(struct super_block *);
1426 1424
@@ -1666,6 +1664,8 @@ extern int vfs_follow_link(struct nameidata *, const char *);
1666extern int page_readlink(struct dentry *, char __user *, int); 1664extern int page_readlink(struct dentry *, char __user *, int);
1667extern void *page_follow_link_light(struct dentry *, struct nameidata *); 1665extern void *page_follow_link_light(struct dentry *, struct nameidata *);
1668extern void page_put_link(struct dentry *, struct nameidata *, void *); 1666extern void page_put_link(struct dentry *, struct nameidata *, void *);
1667extern int __page_symlink(struct inode *inode, const char *symname, int len,
1668 gfp_t gfp_mask);
1669extern int page_symlink(struct inode *inode, const char *symname, int len); 1669extern int page_symlink(struct inode *inode, const char *symname, int len);
1670extern struct inode_operations page_symlink_inode_operations; 1670extern struct inode_operations page_symlink_inode_operations;
1671extern int generic_readlink(struct dentry *, char __user *, int); 1671extern int generic_readlink(struct dentry *, char __user *, int);
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index 20f9148e38d9..7851e6b520cf 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -157,9 +157,9 @@ extern void FASTCALL(free_cold_page(struct page *page));
157 157
158void page_alloc_init(void); 158void page_alloc_init(void);
159#ifdef CONFIG_NUMA 159#ifdef CONFIG_NUMA
160void drain_remote_pages(void); 160void drain_node_pages(int node);
161#else 161#else
162static inline void drain_remote_pages(void) { }; 162static inline void drain_node_pages(int node) { };
163#endif 163#endif
164 164
165#endif /* __LINUX_GFP_H */ 165#endif /* __LINUX_GFP_H */
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 6361544bb6ae..6401c31d6add 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -116,6 +116,10 @@ extern int hrtimer_try_to_cancel(struct hrtimer *timer);
116extern ktime_t hrtimer_get_remaining(const struct hrtimer *timer); 116extern ktime_t hrtimer_get_remaining(const struct hrtimer *timer);
117extern int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp); 117extern int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp);
118 118
119#ifdef CONFIG_NO_IDLE_HZ
120extern ktime_t hrtimer_get_next_event(void);
121#endif
122
119static inline int hrtimer_active(const struct hrtimer *timer) 123static inline int hrtimer_active(const struct hrtimer *timer)
120{ 124{
121 return timer->state == HRTIMER_PENDING; 125 return timer->state == HRTIMER_PENDING;
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
330extern 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/kmalloc_sizes.h b/include/linux/kmalloc_sizes.h
index d82d4c05c12d..bda23e00ed71 100644
--- a/include/linux/kmalloc_sizes.h
+++ b/include/linux/kmalloc_sizes.h
@@ -19,8 +19,10 @@
19 CACHE(32768) 19 CACHE(32768)
20 CACHE(65536) 20 CACHE(65536)
21 CACHE(131072) 21 CACHE(131072)
22#ifndef CONFIG_MMU 22#if (NR_CPUS > 512) || (MAX_NUMNODES > 256) || !defined(CONFIG_MMU)
23 CACHE(262144) 23 CACHE(262144)
24#endif
25#ifndef CONFIG_MMU
24 CACHE(524288) 26 CACHE(524288)
25 CACHE(1048576) 27 CACHE(1048576)
26#ifdef CONFIG_LARGE_ALLOCS 28#ifdef CONFIG_LARGE_ALLOCS
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
48struct kobject { 50struct 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) 99static 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) 105static 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
559static inline struct scatterlist * 559static inline struct scatterlist *
560ata_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
569static inline struct scatterlist *
560ata_qc_next_sg(struct scatterlist *sg, struct ata_queued_cmd *qc) 570ata_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
572static inline unsigned int ata_tag_valid(unsigned int tag) 584static inline unsigned int ata_tag_valid(unsigned int tag)
573{ 585{
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
index 01f03bc06eff..968b1aa3732c 100644
--- a/include/linux/memory_hotplug.h
+++ b/include/linux/memory_hotplug.h
@@ -6,6 +6,10 @@
6#include <linux/mmzone.h> 6#include <linux/mmzone.h>
7#include <linux/notifier.h> 7#include <linux/notifier.h>
8 8
9struct page;
10struct zone;
11struct pglist_data;
12
9#ifdef CONFIG_MEMORY_HOTPLUG 13#ifdef CONFIG_MEMORY_HOTPLUG
10/* 14/*
11 * pgdat resizing functions 15 * pgdat resizing functions
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,
1051void drop_pagecache(void); 1051void drop_pagecache(void);
1052void drop_slab(void); 1052void drop_slab(void);
1053 1053
1054#ifndef CONFIG_MMU
1055#define randomize_va_space 0
1056#else
1057extern 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; \
227if ((__ret=nf_hook_thresh(pf, hook, &(skb), indev, outdev, okfn, thresh)) == 1)\ 230if ((__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; \
236if ((__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)
298static inline int nf_hook_thresh(int pf, unsigned int hook, 308static 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}
312static inline void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb) {} 323static inline void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb) {}
313struct flowi; 324struct flowi;
diff --git a/include/linux/netfilter_bridge/ebt_log.h b/include/linux/netfilter_bridge/ebt_log.h
index 358fbc84fb59..96e231ae7554 100644
--- a/include/linux/netfilter_bridge/ebt_log.h
+++ b/include/linux/netfilter_bridge/ebt_log.h
@@ -3,6 +3,7 @@
3 3
4#define EBT_LOG_IP 0x01 /* if the frame is made by ip, log the ip information */ 4#define EBT_LOG_IP 0x01 /* if the frame is made by ip, log the ip information */
5#define EBT_LOG_ARP 0x02 5#define EBT_LOG_ARP 0x02
6#define EBT_LOG_NFLOG 0x04
6#define EBT_LOG_MASK (EBT_LOG_IP | EBT_LOG_ARP) 7#define EBT_LOG_MASK (EBT_LOG_IP | EBT_LOG_ARP)
7#define EBT_LOG_PREFIX_SIZE 30 8#define EBT_LOG_PREFIX_SIZE 30
8#define EBT_LOG_WATCHER "log" 9#define EBT_LOG_WATCHER "log"
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__
81extern int ip_route_me_harder(struct sk_buff **pskb); 81extern int ip_route_me_harder(struct sk_buff **pskb);
82 82extern 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/netfilter_ipv4/ipt_LOG.h b/include/linux/netfilter_ipv4/ipt_LOG.h
index 22d16177319b..892f9a33fea8 100644
--- a/include/linux/netfilter_ipv4/ipt_LOG.h
+++ b/include/linux/netfilter_ipv4/ipt_LOG.h
@@ -6,7 +6,8 @@
6#define IPT_LOG_TCPOPT 0x02 /* Log TCP options */ 6#define IPT_LOG_TCPOPT 0x02 /* Log TCP options */
7#define IPT_LOG_IPOPT 0x04 /* Log IP options */ 7#define IPT_LOG_IPOPT 0x04 /* Log IP options */
8#define IPT_LOG_UID 0x08 /* Log UID owning local socket */ 8#define IPT_LOG_UID 0x08 /* Log UID owning local socket */
9#define IPT_LOG_MASK 0x0f 9#define IPT_LOG_NFLOG 0x10 /* Log using nf_log backend */
10#define IPT_LOG_MASK 0x1f
10 11
11struct ipt_log_info { 12struct ipt_log_info {
12 unsigned char level; 13 unsigned char level;
diff --git a/include/linux/netfilter_ipv6/ip6t_LOG.h b/include/linux/netfilter_ipv6/ip6t_LOG.h
index 9008ff5c40ae..060c1a1c6c60 100644
--- a/include/linux/netfilter_ipv6/ip6t_LOG.h
+++ b/include/linux/netfilter_ipv6/ip6t_LOG.h
@@ -6,7 +6,8 @@
6#define IP6T_LOG_TCPOPT 0x02 /* Log TCP options */ 6#define IP6T_LOG_TCPOPT 0x02 /* Log TCP options */
7#define IP6T_LOG_IPOPT 0x04 /* Log IP options */ 7#define IP6T_LOG_IPOPT 0x04 /* Log IP options */
8#define IP6T_LOG_UID 0x08 /* Log UID owning local socket */ 8#define IP6T_LOG_UID 0x08 /* Log UID owning local socket */
9#define IP6T_LOG_MASK 0x0f 9#define IP6T_LOG_NFLOG 0x10 /* Log using nf_log backend */
10#define IP6T_LOG_MASK 0x1f
10 11
11struct ip6t_log_info { 12struct ip6t_log_info {
12 unsigned char level; 13 unsigned char level;
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;
398extern int nfs_register_sysctl(void); 398extern int nfs_register_sysctl(void);
399extern void nfs_unregister_sysctl(void); 399extern 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 82b83da25d77..1709b5009d2e 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1752,6 +1752,8 @@
1752#define PCI_DEVICE_ID_CCD_B00B 0xb00b 1752#define PCI_DEVICE_ID_CCD_B00B 0xb00b
1753#define PCI_DEVICE_ID_CCD_B00C 0xb00c 1753#define PCI_DEVICE_ID_CCD_B00C 0xb00c
1754#define PCI_DEVICE_ID_CCD_B100 0xb100 1754#define PCI_DEVICE_ID_CCD_B100 0xb100
1755#define PCI_DEVICE_ID_CCD_B700 0xb700
1756#define PCI_DEVICE_ID_CCD_B701 0xb701
1755 1757
1756#define PCI_VENDOR_ID_EXAR 0x13a8 1758#define PCI_VENDOR_ID_EXAR 0x13a8
1757#define PCI_DEVICE_ID_EXAR_XR17C152 0x0152 1759#define PCI_DEVICE_ID_EXAR_XR17C152 0x0152
diff --git a/include/linux/percpu_counter.h b/include/linux/percpu_counter.h
index bd6708e2c027..682525511c9e 100644
--- a/include/linux/percpu_counter.h
+++ b/include/linux/percpu_counter.h
@@ -39,6 +39,7 @@ static inline void percpu_counter_destroy(struct percpu_counter *fbc)
39} 39}
40 40
41void percpu_counter_mod(struct percpu_counter *fbc, long amount); 41void percpu_counter_mod(struct percpu_counter *fbc, long amount);
42long percpu_counter_sum(struct percpu_counter *fbc);
42 43
43static inline long percpu_counter_read(struct percpu_counter *fbc) 44static inline long percpu_counter_read(struct percpu_counter *fbc)
44{ 45{
@@ -92,6 +93,11 @@ static inline long percpu_counter_read_positive(struct percpu_counter *fbc)
92 return fbc->count; 93 return fbc->count;
93} 94}
94 95
96static inline long percpu_counter_sum(struct percpu_counter *fbc)
97{
98 return percpu_counter_read_positive(fbc);
99}
100
95#endif /* CONFIG_SMP */ 101#endif /* CONFIG_SMP */
96 102
97static inline void percpu_counter_inc(struct percpu_counter *fbc) 103static inline void percpu_counter_inc(struct percpu_counter *fbc)
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
84extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len); 84extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len);
85extern int ptrace_attach(struct task_struct *tsk); 85extern int ptrace_attach(struct task_struct *tsk);
86extern int ptrace_detach(struct task_struct *, unsigned int); 86extern int ptrace_detach(struct task_struct *, unsigned int);
87extern void __ptrace_detach(struct task_struct *, unsigned int);
87extern void ptrace_disable(struct task_struct *); 88extern void ptrace_disable(struct task_struct *);
88extern int ptrace_check_attach(struct task_struct *task, int kill); 89extern int ptrace_check_attach(struct task_struct *task, int kill);
89extern int ptrace_request(struct task_struct *child, long request, long addr, long data); 90extern int ptrace_request(struct task_struct *child, long request, long addr, long data);
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index b87aefa082e2..c2ec6c77874e 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -98,13 +98,17 @@ struct rcu_data {
98 long batch; /* Batch # for current RCU batch */ 98 long batch; /* Batch # for current RCU batch */
99 struct rcu_head *nxtlist; 99 struct rcu_head *nxtlist;
100 struct rcu_head **nxttail; 100 struct rcu_head **nxttail;
101 long count; /* # of queued items */ 101 long qlen; /* # of queued callbacks */
102 struct rcu_head *curlist; 102 struct rcu_head *curlist;
103 struct rcu_head **curtail; 103 struct rcu_head **curtail;
104 struct rcu_head *donelist; 104 struct rcu_head *donelist;
105 struct rcu_head **donetail; 105 struct rcu_head **donetail;
106 long blimit; /* Upper limit on a processed batch */
106 int cpu; 107 int cpu;
107 struct rcu_head barrier; 108 struct rcu_head barrier;
109#ifdef CONFIG_SMP
110 long last_rs_qlen; /* qlen during the last resched */
111#endif
108}; 112};
109 113
110DECLARE_PER_CPU(struct rcu_data, rcu_data); 114DECLARE_PER_CPU(struct rcu_data, rcu_data);
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index 7d51149bd793..dad78cecfd20 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -1052,7 +1052,7 @@ struct reiserfs_dir_entry {
1052 int de_entrylen; 1052 int de_entrylen;
1053 int de_namelen; 1053 int de_namelen;
1054 char *de_name; 1054 char *de_name;
1055 char *de_gen_number_bit_string; 1055 unsigned long *de_gen_number_bit_string;
1056 1056
1057 __u32 de_dir_id; 1057 __u32 de_dir_id;
1058 __u32 de_objectid; 1058 __u32 de_objectid;
diff --git a/include/linux/sched.h b/include/linux/sched.h
index b6f51e3a38ec..62e6314382f0 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -298,8 +298,9 @@ struct mm_struct {
298 unsigned long addr, unsigned long len, 298 unsigned long addr, unsigned long len,
299 unsigned long pgoff, unsigned long flags); 299 unsigned long pgoff, unsigned long flags);
300 void (*unmap_area) (struct mm_struct *mm, unsigned long addr); 300 void (*unmap_area) (struct mm_struct *mm, unsigned long addr);
301 unsigned long mmap_base; /* base of mmap area */ 301 unsigned long mmap_base; /* base of mmap area */
302 unsigned long cached_hole_size; /* if non-zero, the largest hole below free_area_cache */ 302 unsigned long task_size; /* size of task vm space */
303 unsigned long cached_hole_size; /* if non-zero, the largest hole below free_area_cache */
303 unsigned long free_area_cache; /* first hole of size cached_hole_size or larger */ 304 unsigned long free_area_cache; /* first hole of size cached_hole_size or larger */
304 pgd_t * pgd; 305 pgd_t * pgd;
305 atomic_t mm_users; /* How many users with user space? */ 306 atomic_t mm_users; /* How many users with user space? */
@@ -891,7 +892,6 @@ static inline int pid_alive(struct task_struct *p)
891} 892}
892 893
893extern void free_task(struct task_struct *tsk); 894extern void free_task(struct task_struct *tsk);
894extern void __put_task_struct(struct task_struct *tsk);
895#define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) 895#define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0)
896 896
897extern void __put_task_struct_cb(struct rcu_head *rhp); 897extern void __put_task_struct_cb(struct rcu_head *rhp);
diff --git a/include/linux/serial_reg.h b/include/linux/serial_reg.h
index 6a2bb955844b..3c8a6aa77415 100644
--- a/include/linux/serial_reg.h
+++ b/include/linux/serial_reg.h
@@ -247,10 +247,10 @@
247#define UART_CTR 0xFF 247#define UART_CTR 0xFF
248 248
249/* 249/*
250 * The 16C950 Additional Control Reigster 250 * The 16C950 Additional Control Register
251 */ 251 */
252#define UART_ACR_RXDIS 0x01 /* Receiver disable */ 252#define UART_ACR_RXDIS 0x01 /* Receiver disable */
253#define UART_ACR_TXDIS 0x02 /* Receiver disable */ 253#define UART_ACR_TXDIS 0x02 /* Transmitter disable */
254#define UART_ACR_DSRFC 0x04 /* DSR Flow Control */ 254#define UART_ACR_DSRFC 0x04 /* DSR Flow Control */
255#define UART_ACR_TLENB 0x20 /* 950 trigger levels enable */ 255#define UART_ACR_TLENB 0x20 /* 950 trigger levels enable */
256#define UART_ACR_ICRRD 0x40 /* ICR Read enable */ 256#define UART_ACR_ICRRD 0x40 /* ICR Read enable */
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 */
150extern void out_of_memory(gfp_t gfp_mask, int order); 150extern 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 */
153extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct *); 153extern 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 d73501ba7e44..b9ea44ac0ddb 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -543,7 +543,7 @@ asmlinkage long sys_unlinkat(int dfd, const char __user * pathname, int flag);
543asmlinkage long sys_symlinkat(const char __user * oldname, 543asmlinkage long sys_symlinkat(const char __user * oldname,
544 int newdfd, const char __user * newname); 544 int newdfd, const char __user * newname);
545asmlinkage long sys_linkat(int olddfd, const char __user *oldname, 545asmlinkage long sys_linkat(int olddfd, const char __user *oldname,
546 int newdfd, const char __user *newname); 546 int newdfd, const char __user *newname, int flags);
547asmlinkage long sys_renameat(int olddfd, const char __user * oldname, 547asmlinkage long sys_renameat(int olddfd, const char __user * oldname,
548 int newdfd, const char __user * newname); 548 int newdfd, const char __user * newname);
549asmlinkage long sys_futimesat(int dfd, char __user *filename, 549asmlinkage long sys_futimesat(int dfd, char __user *filename,
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 32a4139c4ad8..bac61db26456 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -146,6 +146,8 @@ 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 */
150 KERN_IA64_UNALIGNED=72, /* int: ia64 unaligned userland trap enable */
149}; 151};
150 152
151 153
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). */
349extern 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/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
46struct ipcm_cookie 47struct ipcm_cookie
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index d09ca0e7d139..8d362c49b8a9 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -233,7 +233,6 @@ struct xfrm_type
233 int (*init_state)(struct xfrm_state *x); 233 int (*init_state)(struct xfrm_state *x);
234 void (*destructor)(struct xfrm_state *); 234 void (*destructor)(struct xfrm_state *);
235 int (*input)(struct xfrm_state *, struct xfrm_decap_state *, struct sk_buff *skb); 235 int (*input)(struct xfrm_state *, struct xfrm_decap_state *, struct sk_buff *skb);
236 int (*post_input)(struct xfrm_state *, struct xfrm_decap_state *, struct sk_buff *skb);
237 int (*output)(struct xfrm_state *, struct sk_buff *pskb); 236 int (*output)(struct xfrm_state *, struct sk_buff *pskb);
238 /* Estimate maximal size of result of transformation of a dgram */ 237 /* Estimate maximal size of result of transformation of a dgram */
239 u32 (*get_max_size)(struct xfrm_state *, int size); 238 u32 (*get_max_size)(struct xfrm_state *, int size);
@@ -403,6 +402,11 @@ unsigned xfrm_spi_hash(xfrm_address_t *addr, u32 spi, u8 proto, unsigned short f
403 402
404extern void __xfrm_state_destroy(struct xfrm_state *); 403extern void __xfrm_state_destroy(struct xfrm_state *);
405 404
405static inline void __xfrm_state_put(struct xfrm_state *x)
406{
407 atomic_dec(&x->refcnt);
408}
409
406static inline void xfrm_state_put(struct xfrm_state *x) 410static inline void xfrm_state_put(struct xfrm_state *x)
407{ 411{
408 if (atomic_dec_and_test(&x->refcnt)) 412 if (atomic_dec_and_test(&x->refcnt))
@@ -866,7 +870,6 @@ extern int xfrm_state_mtu(struct xfrm_state *x, int mtu);
866extern int xfrm_init_state(struct xfrm_state *x); 870extern int xfrm_init_state(struct xfrm_state *x);
867extern int xfrm4_rcv(struct sk_buff *skb); 871extern int xfrm4_rcv(struct sk_buff *skb);
868extern int xfrm4_output(struct sk_buff *skb); 872extern int xfrm4_output(struct sk_buff *skb);
869extern int xfrm4_output_finish(struct sk_buff *skb);
870extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler); 873extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler);
871extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler); 874extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler);
872extern int xfrm6_rcv_spi(struct sk_buff **pskb, u32 spi); 875extern int xfrm6_rcv_spi(struct sk_buff **pskb, u32 spi);
diff --git a/include/pcmcia/device_id.h b/include/pcmcia/device_id.h
index 346d81ece287..e04e0b0d9a25 100644
--- a/include/pcmcia/device_id.h
+++ b/include/pcmcia/device_id.h
@@ -72,6 +72,15 @@
72 .prod_id = { (v1), (v2), (v3), (v4) }, \ 72 .prod_id = { (v1), (v2), (v3), (v4) }, \
73 .prod_id_hash = { (vh1), (vh2), (vh3), (vh4) }, } 73 .prod_id_hash = { (vh1), (vh2), (vh3), (vh4) }, }
74 74
75#define PCMCIA_DEVICE_MANF_CARD_PROD_ID1(manf, card, v1, vh1) { \
76 .match_flags = PCMCIA_DEV_ID_MATCH_MANF_ID| \
77 PCMCIA_DEV_ID_MATCH_CARD_ID| \
78 PCMCIA_DEV_ID_MATCH_PROD_ID1, \
79 .manf_id = (manf), \
80 .card_id = (card), \
81 .prod_id = { (v1), NULL, NULL, NULL }, \
82 .prod_id_hash = { (vh1), 0, 0, 0 }, }
83
75 84
76/* multi-function devices */ 85/* multi-function devices */
77 86
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
166typedef uint64_t iscsi_sessionh_t; /* iSCSI Data-Path session handle */
167typedef 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
436int 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 */
96extern void iscsi_conn_error(iscsi_connh_t conn, enum iscsi_err error); 99extern void iscsi_conn_error(struct iscsi_cls_conn *conn, enum iscsi_err error);
97extern int iscsi_recv_pdu(iscsi_connh_t conn, struct iscsi_hdr *hdr, 100extern 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
100struct iscsi_cls_conn { 103struct 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
115struct iscsi_cls_session { 117struct 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;