aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/arch-pxa/entry-macro.S2
-rw-r--r--include/asm-arm/arch-pxa/pxa-regs.h3
-rw-r--r--include/asm-arm/arch-pxa/regs-ssp.h1
-rw-r--r--include/asm-arm/kexec.h2
-rw-r--r--include/asm-arm/kprobes.h1
-rw-r--r--include/asm-arm/mach/arch.h2
-rw-r--r--include/asm-arm/unaligned.h8
-rw-r--r--include/asm-avr32/pgtable.h1
-rw-r--r--include/asm-blackfin/gptimers.h7
-rw-r--r--include/asm-blackfin/irq.h2
-rw-r--r--include/asm-blackfin/mach-bf527/bfin_serial_5xx.h22
-rw-r--r--include/asm-blackfin/mach-bf533/bfin_serial_5xx.h24
-rw-r--r--include/asm-blackfin/mach-bf537/bfin_serial_5xx.h22
-rw-r--r--include/asm-blackfin/mach-bf548/bfin_serial_5xx.h7
-rw-r--r--include/asm-blackfin/mach-bf561/bfin_serial_5xx.h24
-rw-r--r--include/asm-blackfin/mach-bf561/blackfin.h3
-rw-r--r--include/asm-blackfin/mach-bf561/cdefBF561.h2
-rw-r--r--include/asm-blackfin/mmu_context.h2
-rw-r--r--include/asm-blackfin/unistd.h6
-rw-r--r--include/asm-cris/uaccess.h53
-rw-r--r--include/asm-cris/unistd.h6
-rw-r--r--include/asm-frv/unistd.h4
-rw-r--r--include/asm-generic/percpu.h2
-rw-r--r--include/asm-generic/vmlinux.lds.h3
-rw-r--r--include/asm-h8300/hardirq.h2
-rw-r--r--include/asm-h8300/irq.h19
-rw-r--r--include/asm-h8300/uaccess.h4
-rw-r--r--include/asm-ia64/Kbuild2
-rw-r--r--include/asm-ia64/hw_irq.h12
-rw-r--r--include/asm-ia64/kprobes.h7
-rw-r--r--include/asm-ia64/ptrace.h9
-rw-r--r--include/asm-ia64/sal.h4
-rw-r--r--include/asm-m68k/unistd.h6
-rw-r--r--include/asm-m68knommu/machdep.h2
-rw-r--r--include/asm-m68knommu/unistd.h6
-rw-r--r--include/asm-mips/mach-db1x00/db1200.h1
-rw-r--r--include/asm-mips/mach-db1x00/db1x00.h1
-rw-r--r--include/asm-mips/mach-ip27/dma-coherence.h2
-rw-r--r--include/asm-mips/mach-pb1x00/pb1200.h1
-rw-r--r--include/asm-mips/mach-pb1x00/pb1550.h1
-rw-r--r--include/asm-mips/qemu.h30
-rw-r--r--include/asm-mips/sni.h7
-rw-r--r--include/asm-mips/unistd.h21
-rw-r--r--include/asm-mn10300/Kbuild4
-rw-r--r--include/asm-mn10300/param.h2
-rw-r--r--include/asm-mn10300/socket.h2
-rw-r--r--include/asm-powerpc/kprobes.h1
-rw-r--r--include/asm-powerpc/percpu.h2
-rw-r--r--include/asm-powerpc/reg.h3
-rw-r--r--include/asm-powerpc/spu.h3
-rw-r--r--include/asm-s390/bitops.h20
-rw-r--r--include/asm-s390/kprobes.h1
-rw-r--r--include/asm-sh/cpu-sh3/cache.h2
-rw-r--r--include/asm-sh/delay.h5
-rw-r--r--include/asm-sh/entry-macros.S4
-rw-r--r--include/asm-sparc/system.h2
-rw-r--r--include/asm-sparc64/kprobes.h2
-rw-r--r--include/asm-sparc64/ptrace.h2
-rw-r--r--include/asm-sparc64/reboot.h6
-rw-r--r--include/asm-sparc64/syscalls.h13
-rw-r--r--include/asm-sparc64/system.h3
-rw-r--r--include/asm-x86/Kbuild1
-rw-r--r--include/asm-x86/desc_64.h1
-rw-r--r--include/asm-x86/futex.h7
-rw-r--r--include/asm-x86/i387.h1
-rw-r--r--include/asm-x86/kprobes.h1
-rw-r--r--include/asm-x86/lguest.h11
-rw-r--r--include/asm-x86/nops.h66
-rw-r--r--include/asm-x86/page_64.h8
-rw-r--r--include/asm-x86/pgtable_64.h2
-rw-r--r--include/asm-x86/processor.h5
-rw-r--r--include/asm-x86/ptrace-abi.h8
-rw-r--r--include/asm-xtensa/cacheflush.h2
-rw-r--r--include/asm-xtensa/coprocessor.h214
-rw-r--r--include/asm-xtensa/elf.h110
-rw-r--r--include/asm-xtensa/module.h4
-rw-r--r--include/asm-xtensa/pgalloc.h2
-rw-r--r--include/asm-xtensa/pgtable.h8
-rw-r--r--include/asm-xtensa/processor.h13
-rw-r--r--include/asm-xtensa/ptrace.h44
-rw-r--r--include/asm-xtensa/regs.h9
-rw-r--r--include/asm-xtensa/sigcontext.h4
-rw-r--r--include/asm-xtensa/stat.h36
-rw-r--r--include/asm-xtensa/system.h39
-rw-r--r--include/asm-xtensa/thread_info.h21
-rw-r--r--include/asm-xtensa/timex.h8
-rw-r--r--include/asm-xtensa/uaccess.h99
-rw-r--r--include/asm-xtensa/variant-fsf/tie-asm.h70
-rw-r--r--include/asm-xtensa/variant-fsf/tie.h75
-rw-r--r--include/linux/Kbuild3
-rw-r--r--include/linux/aio.h1
-rw-r--r--include/linux/ata.h5
-rw-r--r--include/linux/bio.h1
-rw-r--r--include/linux/blkdev.h10
-rw-r--r--include/linux/cgroup.h50
-rw-r--r--include/linux/cgroup_subsys.h2
-rw-r--r--include/linux/compiler.h6
-rw-r--r--include/linux/connector.h2
-rw-r--r--include/linux/debugfs.h5
-rw-r--r--include/linux/delay.h8
-rw-r--r--include/linux/dm9000.h2
-rw-r--r--include/linux/dmaengine.h2
-rw-r--r--include/linux/efs_dir.h42
-rw-r--r--include/linux/efs_fs.h56
-rw-r--r--include/linux/efs_fs_i.h68
-rw-r--r--include/linux/elfcore-compat.h4
-rw-r--r--include/linux/ext4_fs_extents.h1
-rw-r--r--include/linux/fs.h1
-rw-r--r--include/linux/futex.h1
-rw-r--r--include/linux/genhd.h5
-rw-r--r--include/linux/gpio.h95
-rw-r--r--include/linux/hardirq.h10
-rw-r--r--include/linux/hdsmart.h4
-rw-r--r--include/linux/i2c.h11
-rw-r--r--include/linux/init.h2
-rw-r--r--include/linux/iocontext.h2
-rw-r--r--include/linux/iommu-helper.h3
-rw-r--r--include/linux/kprobes.h6
-rw-r--r--include/linux/kvm.h4
-rw-r--r--include/linux/kvm_host.h1
-rw-r--r--include/linux/libata.h31
-rw-r--r--include/linux/maple.h1
-rw-r--r--include/linux/marker.h8
-rw-r--r--include/linux/memcontrol.h44
-rw-r--r--include/linux/mm.h8
-rw-r--r--include/linux/mm_types.h9
-rw-r--r--include/linux/netdevice.h8
-rw-r--r--include/linux/netfilter.h4
-rw-r--r--include/linux/netfilter/Kbuild2
-rw-r--r--include/linux/netfilter/xt_hashlimit.h1
-rw-r--r--include/linux/netpoll.h7
-rw-r--r--include/linux/nfs_fs.h1
-rw-r--r--include/linux/page-flags.h4
-rw-r--r--include/linux/pci.h10
-rw-r--r--include/linux/pci_ids.h7
-rw-r--r--include/linux/pm.h9
-rw-r--r--include/linux/raid/bitmap.h2
-rw-r--r--include/linux/raid/md_k.h1
-rw-r--r--include/linux/rcuclassic.h3
-rw-r--r--include/linux/rcupreempt.h22
-rw-r--r--include/linux/sched.h11
-rw-r--r--include/linux/security.h99
-rw-r--r--include/linux/serial_sci.h (renamed from include/asm-sh/sci.h)10
-rw-r--r--include/linux/skbuff.h2
-rw-r--r--include/linux/slab_def.h4
-rw-r--r--include/linux/slub_def.h4
-rw-r--r--include/linux/sm501-regs.h3
-rw-r--r--include/linux/sm501.h3
-rw-r--r--include/linux/ssb/ssb.h12
-rw-r--r--include/linux/ssb/ssb_driver_chipcommon.h18
-rw-r--r--include/linux/ssb/ssb_driver_extif.h18
-rw-r--r--include/linux/ssb/ssb_driver_pci.h5
-rw-r--r--include/linux/ssb/ssb_embedded.h18
-rw-r--r--include/linux/usb.h12
-rw-r--r--include/linux/videodev.h1
-rw-r--r--include/linux/videodev2.h1
-rw-r--r--include/linux/vmstat.h3
-rw-r--r--include/media/ir-common.h1
-rw-r--r--include/media/v4l2-common.h2
-rw-r--r--include/media/v4l2-dev.h2
-rw-r--r--include/media/videobuf-core.h2
-rw-r--r--include/media/videobuf-vmalloc.h2
-rw-r--r--include/net/ax25.h2
-rw-r--r--include/net/inet_sock.h3
-rw-r--r--include/net/ip6_tunnel.h2
-rw-r--r--include/net/ndisc.h1
-rw-r--r--include/net/sctp/user.h10
-rw-r--r--include/net/sock.h1
-rw-r--r--include/net/xfrm.h5
-rw-r--r--include/scsi/libsas.h1
-rw-r--r--include/scsi/scsi_transport_iscsi.h2
-rw-r--r--include/sound/opl3.h9
172 files changed, 1263 insertions, 893 deletions
diff --git a/include/asm-arm/arch-pxa/entry-macro.S b/include/asm-arm/arch-pxa/entry-macro.S
index b7e730851461..c145bb01bc8f 100644
--- a/include/asm-arm/arch-pxa/entry-macro.S
+++ b/include/asm-arm/arch-pxa/entry-macro.S
@@ -35,7 +35,7 @@
351004: 351004:
36 mrc p6, 0, \irqstat, c6, c0, 0 @ ICIP2 36 mrc p6, 0, \irqstat, c6, c0, 0 @ ICIP2
37 mrc p6, 0, \irqnr, c7, c0, 0 @ ICMR2 37 mrc p6, 0, \irqnr, c7, c0, 0 @ ICMR2
38 ands \irqstat, \irqstat, \irqnr 38 ands \irqnr, \irqstat, \irqnr
39 beq 1003f 39 beq 1003f
40 rsb \irqstat, \irqnr, #0 40 rsb \irqstat, \irqnr, #0
41 and \irqstat, \irqstat, \irqnr 41 and \irqstat, \irqstat, \irqnr
diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h
index ac175b4d10cb..2357a73340d4 100644
--- a/include/asm-arm/arch-pxa/pxa-regs.h
+++ b/include/asm-arm/arch-pxa/pxa-regs.h
@@ -520,6 +520,9 @@
520#define MCCR_FSRIE (1 << 1) /* FIFO Service Request Interrupt Enable */ 520#define MCCR_FSRIE (1 << 1) /* FIFO Service Request Interrupt Enable */
521 521
522#define GCR __REG(0x4050000C) /* Global Control Register */ 522#define GCR __REG(0x4050000C) /* Global Control Register */
523#ifdef CONFIG_PXA3xx
524#define GCR_CLKBPB (1 << 31) /* Internal clock enable */
525#endif
523#define GCR_nDMAEN (1 << 24) /* non DMA Enable */ 526#define GCR_nDMAEN (1 << 24) /* non DMA Enable */
524#define GCR_CDONE_IE (1 << 19) /* Command Done Interrupt Enable */ 527#define GCR_CDONE_IE (1 << 19) /* Command Done Interrupt Enable */
525#define GCR_SDONE_IE (1 << 18) /* Status Done Interrupt Enable */ 528#define GCR_SDONE_IE (1 << 18) /* Status Done Interrupt Enable */
diff --git a/include/asm-arm/arch-pxa/regs-ssp.h b/include/asm-arm/arch-pxa/regs-ssp.h
index 991cb688db75..0255328c3c18 100644
--- a/include/asm-arm/arch-pxa/regs-ssp.h
+++ b/include/asm-arm/arch-pxa/regs-ssp.h
@@ -85,6 +85,7 @@
85#define SSCR1_RSRE (1 << 20) /* Receive Service Request Enable */ 85#define SSCR1_RSRE (1 << 20) /* Receive Service Request Enable */
86#define SSCR1_TINTE (1 << 19) /* Receiver Time-out Interrupt enable */ 86#define SSCR1_TINTE (1 << 19) /* Receiver Time-out Interrupt enable */
87#define SSCR1_PINTE (1 << 18) /* Peripheral Trailing Byte Interupt Enable */ 87#define SSCR1_PINTE (1 << 18) /* Peripheral Trailing Byte Interupt Enable */
88#define SSCR1_IFS (1 << 16) /* Invert Frame Signal */
88#define SSCR1_STRF (1 << 15) /* Select FIFO or EFWR */ 89#define SSCR1_STRF (1 << 15) /* Select FIFO or EFWR */
89#define SSCR1_EFWR (1 << 14) /* Enable FIFO Write/Read */ 90#define SSCR1_EFWR (1 << 14) /* Enable FIFO Write/Read */
90 91
diff --git a/include/asm-arm/kexec.h b/include/asm-arm/kexec.h
index 1ee17b6951d0..47fe34d692da 100644
--- a/include/asm-arm/kexec.h
+++ b/include/asm-arm/kexec.h
@@ -8,7 +8,7 @@
8/* Maximum address we can reach in physical address mode */ 8/* Maximum address we can reach in physical address mode */
9#define KEXEC_DESTINATION_MEMORY_LIMIT (-1UL) 9#define KEXEC_DESTINATION_MEMORY_LIMIT (-1UL)
10/* Maximum address we can use for the control code buffer */ 10/* Maximum address we can use for the control code buffer */
11#define KEXEC_CONTROL_MEMORY_LIMIT TASK_SIZE 11#define KEXEC_CONTROL_MEMORY_LIMIT (-1UL)
12 12
13#define KEXEC_CONTROL_CODE_SIZE 4096 13#define KEXEC_CONTROL_CODE_SIZE 4096
14 14
diff --git a/include/asm-arm/kprobes.h b/include/asm-arm/kprobes.h
index 4e7bd32288ae..c042194d3ab5 100644
--- a/include/asm-arm/kprobes.h
+++ b/include/asm-arm/kprobes.h
@@ -20,7 +20,6 @@
20#include <linux/ptrace.h> 20#include <linux/ptrace.h>
21#include <linux/percpu.h> 21#include <linux/percpu.h>
22 22
23#define ARCH_SUPPORTS_KRETPROBES
24#define __ARCH_WANT_KPROBES_INSN_SLOT 23#define __ARCH_WANT_KPROBES_INSN_SLOT
25#define MAX_INSN_SIZE 2 24#define MAX_INSN_SIZE 2
26#define MAX_STACK_SIZE 64 /* 32 would probably be OK */ 25#define MAX_STACK_SIZE 64 /* 32 would probably be OK */
diff --git a/include/asm-arm/mach/arch.h b/include/asm-arm/mach/arch.h
index c59fad18e73b..bcc8aed7c9a9 100644
--- a/include/asm-arm/mach/arch.h
+++ b/include/asm-arm/mach/arch.h
@@ -17,7 +17,7 @@ struct sys_timer;
17struct machine_desc { 17struct machine_desc {
18 /* 18 /*
19 * Note! The first four elements are used 19 * Note! The first four elements are used
20 * by assembler code in head-armv.S 20 * by assembler code in head.S, head-common.S
21 */ 21 */
22 unsigned int nr; /* architecture number */ 22 unsigned int nr; /* architecture number */
23 unsigned int phys_io; /* start of physical io */ 23 unsigned int phys_io; /* start of physical io */
diff --git a/include/asm-arm/unaligned.h b/include/asm-arm/unaligned.h
index 8431f6eed5c6..5db03cf3b905 100644
--- a/include/asm-arm/unaligned.h
+++ b/include/asm-arm/unaligned.h
@@ -40,16 +40,16 @@ extern int __bug_unaligned_x(const void *ptr);
40 */ 40 */
41 41
42#define __get_unaligned_2_le(__p) \ 42#define __get_unaligned_2_le(__p) \
43 (__p[0] | __p[1] << 8) 43 (unsigned int)(__p[0] | __p[1] << 8)
44 44
45#define __get_unaligned_2_be(__p) \ 45#define __get_unaligned_2_be(__p) \
46 (__p[0] << 8 | __p[1]) 46 (unsigned int)(__p[0] << 8 | __p[1])
47 47
48#define __get_unaligned_4_le(__p) \ 48#define __get_unaligned_4_le(__p) \
49 (__p[0] | __p[1] << 8 | __p[2] << 16 | __p[3] << 24) 49 (unsigned int)(__p[0] | __p[1] << 8 | __p[2] << 16 | __p[3] << 24)
50 50
51#define __get_unaligned_4_be(__p) \ 51#define __get_unaligned_4_be(__p) \
52 (__p[0] << 24 | __p[1] << 16 | __p[2] << 8 | __p[3]) 52 (unsigned int)(__p[0] << 24 | __p[1] << 16 | __p[2] << 8 | __p[3])
53 53
54#define __get_unaligned_8_le(__p) \ 54#define __get_unaligned_8_le(__p) \
55 ((unsigned long long)__get_unaligned_4_le((__p+4)) << 32 | \ 55 ((unsigned long long)__get_unaligned_4_le((__p+4)) << 32 | \
diff --git a/include/asm-avr32/pgtable.h b/include/asm-avr32/pgtable.h
index 018f6e2a0242..3ae7b548fce7 100644
--- a/include/asm-avr32/pgtable.h
+++ b/include/asm-avr32/pgtable.h
@@ -157,6 +157,7 @@ extern struct page *empty_zero_page;
157#define _PAGE_S(x) _PAGE_NORMAL(x) 157#define _PAGE_S(x) _PAGE_NORMAL(x)
158 158
159#define PAGE_COPY _PAGE_P(PAGE_WRITE | PAGE_READ) 159#define PAGE_COPY _PAGE_P(PAGE_WRITE | PAGE_READ)
160#define PAGE_SHARED _PAGE_S(PAGE_WRITE | PAGE_READ)
160 161
161#ifndef __ASSEMBLY__ 162#ifndef __ASSEMBLY__
162/* 163/*
diff --git a/include/asm-blackfin/gptimers.h b/include/asm-blackfin/gptimers.h
index 8265ea473d5b..4f318f1fd2d9 100644
--- a/include/asm-blackfin/gptimers.h
+++ b/include/asm-blackfin/gptimers.h
@@ -1,12 +1,11 @@
1/* 1/*
2 * include/asm/bf5xx_timers.h 2 * gptimers.h - Blackfin General Purpose Timer structs/defines/prototypes
3 *
4 * This file contains the major Data structures and constants
5 * used for General Purpose Timer Implementation in BF5xx
6 * 3 *
4 * Copyright (c) 2005-2008 Analog Devices Inc.
7 * Copyright (C) 2005 John DeHority 5 * Copyright (C) 2005 John DeHority
8 * Copyright (C) 2006 Hella Aglaia GmbH (awe@aglaia-gmbh.de) 6 * Copyright (C) 2006 Hella Aglaia GmbH (awe@aglaia-gmbh.de)
9 * 7 *
8 * Licensed under the GPL-2.
10 */ 9 */
11 10
12#ifndef _BLACKFIN_TIMERS_H_ 11#ifndef _BLACKFIN_TIMERS_H_
diff --git a/include/asm-blackfin/irq.h b/include/asm-blackfin/irq.h
index 65480dab244e..86b67834354d 100644
--- a/include/asm-blackfin/irq.h
+++ b/include/asm-blackfin/irq.h
@@ -67,4 +67,6 @@ static __inline__ int irq_canonicalize(int irq)
67#define NO_IRQ ((unsigned int)(-1)) 67#define NO_IRQ ((unsigned int)(-1))
68#endif 68#endif
69 69
70#define SIC_SYSIRQ(irq) (irq - (IRQ_CORETMR + 1))
71
70#endif /* _BFIN_IRQ_H_ */ 72#endif /* _BFIN_IRQ_H_ */
diff --git a/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h
index 15dbc21eed8b..c0694ecd2ecd 100644
--- a/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h
+++ b/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h
@@ -23,7 +23,6 @@
23#define UART_GET_DLH(uart) bfin_read16(((uart)->port.membase + OFFSET_DLH)) 23#define UART_GET_DLH(uart) bfin_read16(((uart)->port.membase + OFFSET_DLH))
24#define UART_GET_IIR(uart) bfin_read16(((uart)->port.membase + OFFSET_IIR)) 24#define UART_GET_IIR(uart) bfin_read16(((uart)->port.membase + OFFSET_IIR))
25#define UART_GET_LCR(uart) bfin_read16(((uart)->port.membase + OFFSET_LCR)) 25#define UART_GET_LCR(uart) bfin_read16(((uart)->port.membase + OFFSET_LCR))
26#define UART_GET_LSR(uart) bfin_read16(((uart)->port.membase + OFFSET_LSR))
27#define UART_GET_GCTL(uart) bfin_read16(((uart)->port.membase + OFFSET_GCTL)) 26#define UART_GET_GCTL(uart) bfin_read16(((uart)->port.membase + OFFSET_GCTL))
28 27
29#define UART_PUT_CHAR(uart, v) bfin_write16(((uart)->port.membase + OFFSET_THR), v) 28#define UART_PUT_CHAR(uart, v) bfin_write16(((uart)->port.membase + OFFSET_THR), v)
@@ -58,6 +57,7 @@
58struct bfin_serial_port { 57struct bfin_serial_port {
59 struct uart_port port; 58 struct uart_port port;
60 unsigned int old_status; 59 unsigned int old_status;
60 unsigned int lsr;
61#ifdef CONFIG_SERIAL_BFIN_DMA 61#ifdef CONFIG_SERIAL_BFIN_DMA
62 int tx_done; 62 int tx_done;
63 int tx_count; 63 int tx_count;
@@ -67,15 +67,31 @@ struct bfin_serial_port {
67 unsigned int tx_dma_channel; 67 unsigned int tx_dma_channel;
68 unsigned int rx_dma_channel; 68 unsigned int rx_dma_channel;
69 struct work_struct tx_dma_workqueue; 69 struct work_struct tx_dma_workqueue;
70#else
71 struct work_struct cts_workqueue;
72#endif 70#endif
73#ifdef CONFIG_SERIAL_BFIN_CTSRTS 71#ifdef CONFIG_SERIAL_BFIN_CTSRTS
72 struct work_struct cts_workqueue;
74 int cts_pin; 73 int cts_pin;
75 int rts_pin; 74 int rts_pin;
76#endif 75#endif
77}; 76};
78 77
78/* The hardware clears the LSR bits upon read, so we need to cache
79 * some of the more fun bits in software so they don't get lost
80 * when checking the LSR in other code paths (TX).
81 */
82static inline unsigned int UART_GET_LSR(struct bfin_serial_port *uart)
83{
84 unsigned int lsr = bfin_read16(uart->port.membase + OFFSET_LSR);
85 uart->lsr |= (lsr & (BI|FE|PE|OE));
86 return lsr | uart->lsr;
87}
88
89static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
90{
91 uart->lsr = 0;
92 bfin_write16(uart->port.membase + OFFSET_LSR, -1);
93}
94
79struct bfin_serial_port bfin_serial_ports[NR_PORTS]; 95struct bfin_serial_port bfin_serial_ports[NR_PORTS];
80struct bfin_serial_res { 96struct bfin_serial_res {
81 unsigned long uart_base_addr; 97 unsigned long uart_base_addr;
diff --git a/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h
index 7871d4313f49..b6f513bee56e 100644
--- a/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h
+++ b/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h
@@ -23,7 +23,6 @@
23#define UART_GET_DLH(uart) bfin_read16(((uart)->port.membase + OFFSET_DLH)) 23#define UART_GET_DLH(uart) bfin_read16(((uart)->port.membase + OFFSET_DLH))
24#define UART_GET_IIR(uart) bfin_read16(((uart)->port.membase + OFFSET_IIR)) 24#define UART_GET_IIR(uart) bfin_read16(((uart)->port.membase + OFFSET_IIR))
25#define UART_GET_LCR(uart) bfin_read16(((uart)->port.membase + OFFSET_LCR)) 25#define UART_GET_LCR(uart) bfin_read16(((uart)->port.membase + OFFSET_LCR))
26#define UART_GET_LSR(uart) bfin_read16(((uart)->port.membase + OFFSET_LSR))
27#define UART_GET_GCTL(uart) bfin_read16(((uart)->port.membase + OFFSET_GCTL)) 26#define UART_GET_GCTL(uart) bfin_read16(((uart)->port.membase + OFFSET_GCTL))
28 27
29#define UART_PUT_CHAR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_THR),v) 28#define UART_PUT_CHAR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_THR),v)
@@ -46,6 +45,7 @@
46struct bfin_serial_port { 45struct bfin_serial_port {
47 struct uart_port port; 46 struct uart_port port;
48 unsigned int old_status; 47 unsigned int old_status;
48 unsigned int lsr;
49#ifdef CONFIG_SERIAL_BFIN_DMA 49#ifdef CONFIG_SERIAL_BFIN_DMA
50 int tx_done; 50 int tx_done;
51 int tx_count; 51 int tx_count;
@@ -56,14 +56,34 @@ struct bfin_serial_port {
56 unsigned int rx_dma_channel; 56 unsigned int rx_dma_channel;
57 struct work_struct tx_dma_workqueue; 57 struct work_struct tx_dma_workqueue;
58#else 58#else
59 struct work_struct cts_workqueue; 59# if ANOMALY_05000230
60 unsigned int anomaly_threshold;
61# endif
60#endif 62#endif
61#ifdef CONFIG_SERIAL_BFIN_CTSRTS 63#ifdef CONFIG_SERIAL_BFIN_CTSRTS
64 struct work_struct cts_workqueue;
62 int cts_pin; 65 int cts_pin;
63 int rts_pin; 66 int rts_pin;
64#endif 67#endif
65}; 68};
66 69
70/* The hardware clears the LSR bits upon read, so we need to cache
71 * some of the more fun bits in software so they don't get lost
72 * when checking the LSR in other code paths (TX).
73 */
74static inline unsigned int UART_GET_LSR(struct bfin_serial_port *uart)
75{
76 unsigned int lsr = bfin_read16(uart->port.membase + OFFSET_LSR);
77 uart->lsr |= (lsr & (BI|FE|PE|OE));
78 return lsr | uart->lsr;
79}
80
81static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
82{
83 uart->lsr = 0;
84 bfin_write16(uart->port.membase + OFFSET_LSR, -1);
85}
86
67struct bfin_serial_port bfin_serial_ports[NR_PORTS]; 87struct bfin_serial_port bfin_serial_ports[NR_PORTS];
68struct bfin_serial_res { 88struct bfin_serial_res {
69 unsigned long uart_base_addr; 89 unsigned long uart_base_addr;
diff --git a/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h
index 86e45c379838..8fc672d31057 100644
--- a/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h
+++ b/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h
@@ -23,7 +23,6 @@
23#define UART_GET_DLH(uart) bfin_read16(((uart)->port.membase + OFFSET_DLH)) 23#define UART_GET_DLH(uart) bfin_read16(((uart)->port.membase + OFFSET_DLH))
24#define UART_GET_IIR(uart) bfin_read16(((uart)->port.membase + OFFSET_IIR)) 24#define UART_GET_IIR(uart) bfin_read16(((uart)->port.membase + OFFSET_IIR))
25#define UART_GET_LCR(uart) bfin_read16(((uart)->port.membase + OFFSET_LCR)) 25#define UART_GET_LCR(uart) bfin_read16(((uart)->port.membase + OFFSET_LCR))
26#define UART_GET_LSR(uart) bfin_read16(((uart)->port.membase + OFFSET_LSR))
27#define UART_GET_GCTL(uart) bfin_read16(((uart)->port.membase + OFFSET_GCTL)) 26#define UART_GET_GCTL(uart) bfin_read16(((uart)->port.membase + OFFSET_GCTL))
28 27
29#define UART_PUT_CHAR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_THR),v) 28#define UART_PUT_CHAR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_THR),v)
@@ -58,6 +57,7 @@
58struct bfin_serial_port { 57struct bfin_serial_port {
59 struct uart_port port; 58 struct uart_port port;
60 unsigned int old_status; 59 unsigned int old_status;
60 unsigned int lsr;
61#ifdef CONFIG_SERIAL_BFIN_DMA 61#ifdef CONFIG_SERIAL_BFIN_DMA
62 int tx_done; 62 int tx_done;
63 int tx_count; 63 int tx_count;
@@ -67,15 +67,31 @@ struct bfin_serial_port {
67 unsigned int tx_dma_channel; 67 unsigned int tx_dma_channel;
68 unsigned int rx_dma_channel; 68 unsigned int rx_dma_channel;
69 struct work_struct tx_dma_workqueue; 69 struct work_struct tx_dma_workqueue;
70#else
71 struct work_struct cts_workqueue;
72#endif 70#endif
73#ifdef CONFIG_SERIAL_BFIN_CTSRTS 71#ifdef CONFIG_SERIAL_BFIN_CTSRTS
72 struct work_struct cts_workqueue;
74 int cts_pin; 73 int cts_pin;
75 int rts_pin; 74 int rts_pin;
76#endif 75#endif
77}; 76};
78 77
78/* The hardware clears the LSR bits upon read, so we need to cache
79 * some of the more fun bits in software so they don't get lost
80 * when checking the LSR in other code paths (TX).
81 */
82static inline unsigned int UART_GET_LSR(struct bfin_serial_port *uart)
83{
84 unsigned int lsr = bfin_read16(uart->port.membase + OFFSET_LSR);
85 uart->lsr |= (lsr & (BI|FE|PE|OE));
86 return lsr | uart->lsr;
87}
88
89static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
90{
91 uart->lsr = 0;
92 bfin_write16(uart->port.membase + OFFSET_LSR, -1);
93}
94
79struct bfin_serial_port bfin_serial_ports[NR_PORTS]; 95struct bfin_serial_port bfin_serial_ports[NR_PORTS];
80struct bfin_serial_res { 96struct bfin_serial_res {
81 unsigned long uart_base_addr; 97 unsigned long uart_base_addr;
diff --git a/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h
index 3770aa38ee9f..7e6339f62a50 100644
--- a/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h
+++ b/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h
@@ -24,6 +24,8 @@
24#define UART_GET_LCR(uart) bfin_read16(((uart)->port.membase + OFFSET_LCR)) 24#define UART_GET_LCR(uart) bfin_read16(((uart)->port.membase + OFFSET_LCR))
25#define UART_GET_LSR(uart) bfin_read16(((uart)->port.membase + OFFSET_LSR)) 25#define UART_GET_LSR(uart) bfin_read16(((uart)->port.membase + OFFSET_LSR))
26#define UART_GET_GCTL(uart) bfin_read16(((uart)->port.membase + OFFSET_GCTL)) 26#define UART_GET_GCTL(uart) bfin_read16(((uart)->port.membase + OFFSET_GCTL))
27#define UART_GET_MSR(uart) bfin_read16(((uart)->port.membase + OFFSET_MSR))
28#define UART_GET_MCR(uart) bfin_read16(((uart)->port.membase + OFFSET_MCR))
27 29
28#define UART_PUT_CHAR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_THR),v) 30#define UART_PUT_CHAR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_THR),v)
29#define UART_PUT_DLL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLL),v) 31#define UART_PUT_DLL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLL),v)
@@ -32,7 +34,9 @@
32#define UART_PUT_DLH(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLH),v) 34#define UART_PUT_DLH(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLH),v)
33#define UART_PUT_LSR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_LSR),v) 35#define UART_PUT_LSR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_LSR),v)
34#define UART_PUT_LCR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_LCR),v) 36#define UART_PUT_LCR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_LCR),v)
37#define UART_CLEAR_LSR(uart) bfin_write16(((uart)->port.membase + OFFSET_LSR), -1)
35#define UART_PUT_GCTL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_GCTL),v) 38#define UART_PUT_GCTL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_GCTL),v)
39#define UART_PUT_MCR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_MCR),v)
36 40
37#if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) 41#if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS)
38# define CONFIG_SERIAL_BFIN_CTSRTS 42# define CONFIG_SERIAL_BFIN_CTSRTS
@@ -68,10 +72,9 @@ struct bfin_serial_port {
68 unsigned int tx_dma_channel; 72 unsigned int tx_dma_channel;
69 unsigned int rx_dma_channel; 73 unsigned int rx_dma_channel;
70 struct work_struct tx_dma_workqueue; 74 struct work_struct tx_dma_workqueue;
71#else
72 struct work_struct cts_workqueue;
73#endif 75#endif
74#ifdef CONFIG_SERIAL_BFIN_CTSRTS 76#ifdef CONFIG_SERIAL_BFIN_CTSRTS
77 struct work_struct cts_workqueue;
75 int cts_pin; 78 int cts_pin;
76 int rts_pin; 79 int rts_pin;
77#endif 80#endif
diff --git a/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h
index 7871d4313f49..b6f513bee56e 100644
--- a/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h
+++ b/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h
@@ -23,7 +23,6 @@
23#define UART_GET_DLH(uart) bfin_read16(((uart)->port.membase + OFFSET_DLH)) 23#define UART_GET_DLH(uart) bfin_read16(((uart)->port.membase + OFFSET_DLH))
24#define UART_GET_IIR(uart) bfin_read16(((uart)->port.membase + OFFSET_IIR)) 24#define UART_GET_IIR(uart) bfin_read16(((uart)->port.membase + OFFSET_IIR))
25#define UART_GET_LCR(uart) bfin_read16(((uart)->port.membase + OFFSET_LCR)) 25#define UART_GET_LCR(uart) bfin_read16(((uart)->port.membase + OFFSET_LCR))
26#define UART_GET_LSR(uart) bfin_read16(((uart)->port.membase + OFFSET_LSR))
27#define UART_GET_GCTL(uart) bfin_read16(((uart)->port.membase + OFFSET_GCTL)) 26#define UART_GET_GCTL(uart) bfin_read16(((uart)->port.membase + OFFSET_GCTL))
28 27
29#define UART_PUT_CHAR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_THR),v) 28#define UART_PUT_CHAR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_THR),v)
@@ -46,6 +45,7 @@
46struct bfin_serial_port { 45struct bfin_serial_port {
47 struct uart_port port; 46 struct uart_port port;
48 unsigned int old_status; 47 unsigned int old_status;
48 unsigned int lsr;
49#ifdef CONFIG_SERIAL_BFIN_DMA 49#ifdef CONFIG_SERIAL_BFIN_DMA
50 int tx_done; 50 int tx_done;
51 int tx_count; 51 int tx_count;
@@ -56,14 +56,34 @@ struct bfin_serial_port {
56 unsigned int rx_dma_channel; 56 unsigned int rx_dma_channel;
57 struct work_struct tx_dma_workqueue; 57 struct work_struct tx_dma_workqueue;
58#else 58#else
59 struct work_struct cts_workqueue; 59# if ANOMALY_05000230
60 unsigned int anomaly_threshold;
61# endif
60#endif 62#endif
61#ifdef CONFIG_SERIAL_BFIN_CTSRTS 63#ifdef CONFIG_SERIAL_BFIN_CTSRTS
64 struct work_struct cts_workqueue;
62 int cts_pin; 65 int cts_pin;
63 int rts_pin; 66 int rts_pin;
64#endif 67#endif
65}; 68};
66 69
70/* The hardware clears the LSR bits upon read, so we need to cache
71 * some of the more fun bits in software so they don't get lost
72 * when checking the LSR in other code paths (TX).
73 */
74static inline unsigned int UART_GET_LSR(struct bfin_serial_port *uart)
75{
76 unsigned int lsr = bfin_read16(uart->port.membase + OFFSET_LSR);
77 uart->lsr |= (lsr & (BI|FE|PE|OE));
78 return lsr | uart->lsr;
79}
80
81static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
82{
83 uart->lsr = 0;
84 bfin_write16(uart->port.membase + OFFSET_LSR, -1);
85}
86
67struct bfin_serial_port bfin_serial_ports[NR_PORTS]; 87struct bfin_serial_port bfin_serial_ports[NR_PORTS];
68struct bfin_serial_res { 88struct bfin_serial_res {
69 unsigned long uart_base_addr; 89 unsigned long uart_base_addr;
diff --git a/include/asm-blackfin/mach-bf561/blackfin.h b/include/asm-blackfin/mach-bf561/blackfin.h
index 362617f93845..3a16df2c86d8 100644
--- a/include/asm-blackfin/mach-bf561/blackfin.h
+++ b/include/asm-blackfin/mach-bf561/blackfin.h
@@ -49,7 +49,8 @@
49#define bfin_read_FIO_INEN() bfin_read_FIO0_INEN() 49#define bfin_read_FIO_INEN() bfin_read_FIO0_INEN()
50#define bfin_write_FIO_INEN(val) bfin_write_FIO0_INEN(val) 50#define bfin_write_FIO_INEN(val) bfin_write_FIO0_INEN(val)
51 51
52 52#define SIC_IWR0 SICA_IWR0
53#define SIC_IWR1 SICA_IWR1
53#define SIC_IAR0 SICA_IAR0 54#define SIC_IAR0 SICA_IAR0
54#define bfin_write_SIC_IMASK0 bfin_write_SICA_IMASK0 55#define bfin_write_SIC_IMASK0 bfin_write_SICA_IMASK0
55#define bfin_write_SIC_IMASK1 bfin_write_SICA_IMASK1 56#define bfin_write_SIC_IMASK1 bfin_write_SICA_IMASK1
diff --git a/include/asm-blackfin/mach-bf561/cdefBF561.h b/include/asm-blackfin/mach-bf561/cdefBF561.h
index d667816486c0..1bc8d2f89ccc 100644
--- a/include/asm-blackfin/mach-bf561/cdefBF561.h
+++ b/include/asm-blackfin/mach-bf561/cdefBF561.h
@@ -559,6 +559,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val)
559#define bfin_write_PPI0_CONTROL(val) bfin_write16(PPI0_CONTROL,val) 559#define bfin_write_PPI0_CONTROL(val) bfin_write16(PPI0_CONTROL,val)
560#define bfin_read_PPI0_STATUS() bfin_read16(PPI0_STATUS) 560#define bfin_read_PPI0_STATUS() bfin_read16(PPI0_STATUS)
561#define bfin_write_PPI0_STATUS(val) bfin_write16(PPI0_STATUS,val) 561#define bfin_write_PPI0_STATUS(val) bfin_write16(PPI0_STATUS,val)
562#define bfin_clear_PPI0_STATUS() bfin_read_PPI0_STATUS()
562#define bfin_read_PPI0_COUNT() bfin_read16(PPI0_COUNT) 563#define bfin_read_PPI0_COUNT() bfin_read16(PPI0_COUNT)
563#define bfin_write_PPI0_COUNT(val) bfin_write16(PPI0_COUNT,val) 564#define bfin_write_PPI0_COUNT(val) bfin_write16(PPI0_COUNT,val)
564#define bfin_read_PPI0_DELAY() bfin_read16(PPI0_DELAY) 565#define bfin_read_PPI0_DELAY() bfin_read16(PPI0_DELAY)
@@ -570,6 +571,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val)
570#define bfin_write_PPI1_CONTROL(val) bfin_write16(PPI1_CONTROL,val) 571#define bfin_write_PPI1_CONTROL(val) bfin_write16(PPI1_CONTROL,val)
571#define bfin_read_PPI1_STATUS() bfin_read16(PPI1_STATUS) 572#define bfin_read_PPI1_STATUS() bfin_read16(PPI1_STATUS)
572#define bfin_write_PPI1_STATUS(val) bfin_write16(PPI1_STATUS,val) 573#define bfin_write_PPI1_STATUS(val) bfin_write16(PPI1_STATUS,val)
574#define bfin_clear_PPI1_STATUS() bfin_read_PPI1_STATUS()
573#define bfin_read_PPI1_COUNT() bfin_read16(PPI1_COUNT) 575#define bfin_read_PPI1_COUNT() bfin_read16(PPI1_COUNT)
574#define bfin_write_PPI1_COUNT(val) bfin_write16(PPI1_COUNT,val) 576#define bfin_write_PPI1_COUNT(val) bfin_write16(PPI1_COUNT,val)
575#define bfin_read_PPI1_DELAY() bfin_read16(PPI1_DELAY) 577#define bfin_read_PPI1_DELAY() bfin_read16(PPI1_DELAY)
diff --git a/include/asm-blackfin/mmu_context.h b/include/asm-blackfin/mmu_context.h
index b5eb67596ad5..f55ec3c23a92 100644
--- a/include/asm-blackfin/mmu_context.h
+++ b/include/asm-blackfin/mmu_context.h
@@ -73,7 +73,7 @@ static inline void destroy_context(struct mm_struct *mm)
73 struct sram_list_struct *tmp; 73 struct sram_list_struct *tmp;
74 74
75 if (current_l1_stack_save == mm->context.l1_stack_save) 75 if (current_l1_stack_save == mm->context.l1_stack_save)
76 current_l1_stack_save = 0; 76 current_l1_stack_save = NULL;
77 if (mm->context.l1_stack_save) 77 if (mm->context.l1_stack_save)
78 free_l1stack(); 78 free_l1stack();
79 79
diff --git a/include/asm-blackfin/unistd.h b/include/asm-blackfin/unistd.h
index e98167358d26..c18a399f6e3e 100644
--- a/include/asm-blackfin/unistd.h
+++ b/include/asm-blackfin/unistd.h
@@ -361,7 +361,7 @@
361#define __NR_epoll_pwait 346 361#define __NR_epoll_pwait 346
362#define __NR_utimensat 347 362#define __NR_utimensat 347
363#define __NR_signalfd 348 363#define __NR_signalfd 348
364#define __NR_timerfd 349 364#define __NR_timerfd_create 349
365#define __NR_eventfd 350 365#define __NR_eventfd 350
366#define __NR_pread64 351 366#define __NR_pread64 351
367#define __NR_pwrite64 352 367#define __NR_pwrite64 352
@@ -370,8 +370,10 @@
370#define __NR_get_robust_list 355 370#define __NR_get_robust_list 355
371#define __NR_fallocate 356 371#define __NR_fallocate 356
372#define __NR_semtimedop 357 372#define __NR_semtimedop 357
373#define __NR_timerfd_settime 358
374#define __NR_timerfd_gettime 359
373 375
374#define __NR_syscall 358 376#define __NR_syscall 360
375#define NR_syscalls __NR_syscall 377#define NR_syscalls __NR_syscall
376 378
377/* Old optional stuff no one actually uses */ 379/* Old optional stuff no one actually uses */
diff --git a/include/asm-cris/uaccess.h b/include/asm-cris/uaccess.h
index 69d48a2dc8e1..ea11eaf0e922 100644
--- a/include/asm-cris/uaccess.h
+++ b/include/asm-cris/uaccess.h
@@ -1,43 +1,6 @@
1/* 1/*
2 * Authors: Bjorn Wesen (bjornw@axis.com) 2 * Authors: Bjorn Wesen (bjornw@axis.com)
3 * Hans-Peter Nilsson (hp@axis.com) 3 * Hans-Peter Nilsson (hp@axis.com)
4 *
5 * $Log: uaccess.h,v $
6 * Revision 1.8 2001/10/29 13:01:48 bjornw
7 * Removed unused variable tmp2 in strnlen_user
8 *
9 * Revision 1.7 2001/10/02 12:44:52 hp
10 * Add support for 64-bit put_user/get_user
11 *
12 * Revision 1.6 2001/10/01 14:51:17 bjornw
13 * Added register prefixes and removed underscores
14 *
15 * Revision 1.5 2000/10/25 03:33:21 hp
16 * - Provide implementation for everything else but get_user and put_user;
17 * copying inline to/from user for constant length 0..16, 20, 24, and
18 * clearing for 0..4, 8, 12, 16, 20, 24, strncpy_from_user and strnlen_user
19 * always inline.
20 * - Constraints for destination addr in get_user cannot be memory, only reg.
21 * - Correct labels for PC at expected fault points.
22 * - Nits with assembly code.
23 * - Don't use statement expressions without value; use "do {} while (0)".
24 * - Return correct values from __generic_... functions.
25 *
26 * Revision 1.4 2000/09/12 16:28:25 bjornw
27 * * Removed comments from the get/put user asm code
28 * * Constrains for destination addr in put_user cannot be memory, only reg
29 *
30 * Revision 1.3 2000/09/12 14:30:20 bjornw
31 * MAX_ADDR_USER does not exist anymore
32 *
33 * Revision 1.2 2000/07/13 15:52:48 bjornw
34 * New user-access functions
35 *
36 * Revision 1.1.1.1 2000/07/10 16:32:31 bjornw
37 * CRIS architecture, working draft
38 *
39 *
40 *
41 */ 4 */
42 5
43/* Asm:s have been tweaked (within the domain of correctness) to give 6/* Asm:s have been tweaked (within the domain of correctness) to give
@@ -209,9 +172,9 @@ extern long __get_user_bad(void);
209/* More complex functions. Most are inline, but some call functions that 172/* More complex functions. Most are inline, but some call functions that
210 live in lib/usercopy.c */ 173 live in lib/usercopy.c */
211 174
212extern unsigned long __copy_user(void *to, const void *from, unsigned long n); 175extern unsigned long __copy_user(void __user *to, const void *from, unsigned long n);
213extern unsigned long __copy_user_zeroing(void *to, const void *from, unsigned long n); 176extern unsigned long __copy_user_zeroing(void *to, const void __user *from, unsigned long n);
214extern unsigned long __do_clear_user(void *to, unsigned long n); 177extern unsigned long __do_clear_user(void __user *to, unsigned long n);
215 178
216static inline unsigned long 179static inline unsigned long
217__generic_copy_to_user(void __user *to, const void *from, unsigned long n) 180__generic_copy_to_user(void __user *to, const void *from, unsigned long n)
@@ -253,7 +216,7 @@ strncpy_from_user(char *dst, const char __user *src, long count)
253} 216}
254 217
255 218
256/* Note that if these expand awfully if made into switch constructs, so 219/* Note that these expand awfully if made into switch constructs, so
257 don't do that. */ 220 don't do that. */
258 221
259static inline unsigned long 222static inline unsigned long
@@ -407,19 +370,21 @@ __constant_clear_user(void __user *to, unsigned long n)
407 */ 370 */
408 371
409static inline unsigned long 372static inline unsigned long
410__generic_copy_from_user_nocheck(void *to, const void *from, unsigned long n) 373__generic_copy_from_user_nocheck(void *to, const void __user *from,
374 unsigned long n)
411{ 375{
412 return __copy_user_zeroing(to,from,n); 376 return __copy_user_zeroing(to,from,n);
413} 377}
414 378
415static inline unsigned long 379static inline unsigned long
416__generic_copy_to_user_nocheck(void *to, const void *from, unsigned long n) 380__generic_copy_to_user_nocheck(void __user *to, const void *from,
381 unsigned long n)
417{ 382{
418 return __copy_user(to,from,n); 383 return __copy_user(to,from,n);
419} 384}
420 385
421static inline unsigned long 386static inline unsigned long
422__generic_clear_user_nocheck(void *to, unsigned long n) 387__generic_clear_user_nocheck(void __user *to, unsigned long n)
423{ 388{
424 return __do_clear_user(to,n); 389 return __do_clear_user(to,n);
425} 390}
diff --git a/include/asm-cris/unistd.h b/include/asm-cris/unistd.h
index 007cb16a6b5b..76398ef87e9b 100644
--- a/include/asm-cris/unistd.h
+++ b/include/asm-cris/unistd.h
@@ -329,12 +329,12 @@
329#define __NR_timerfd_create 322 329#define __NR_timerfd_create 322
330#define __NR_eventfd 323 330#define __NR_eventfd 323
331#define __NR_fallocate 324 331#define __NR_fallocate 324
332#define __NR_timerfd_settime 315 332#define __NR_timerfd_settime 325
333#define __NR_timerfd_gettime 316 333#define __NR_timerfd_gettime 326
334 334
335#ifdef __KERNEL__ 335#ifdef __KERNEL__
336 336
337#define NR_syscalls 325 337#define NR_syscalls 327
338 338
339#include <asm/arch/unistd.h> 339#include <asm/arch/unistd.h>
340 340
diff --git a/include/asm-frv/unistd.h b/include/asm-frv/unistd.h
index e8c986667532..f184eb8c047c 100644
--- a/include/asm-frv/unistd.h
+++ b/include/asm-frv/unistd.h
@@ -328,9 +328,11 @@
328#define __NR_epoll_pwait 319 328#define __NR_epoll_pwait 319
329#define __NR_utimensat 320 329#define __NR_utimensat 320
330#define __NR_signalfd 321 330#define __NR_signalfd 321
331/* #define __NR_timerfd 322 removed */ 331#define __NR_timerfd_create 322
332#define __NR_eventfd 323 332#define __NR_eventfd 323
333#define __NR_fallocate 324 333#define __NR_fallocate 324
334#define __NR_timerfd_settime 325
335#define __NR_timerfd_gettime 326
334 336
335#ifdef __KERNEL__ 337#ifdef __KERNEL__
336 338
diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h
index 4b8d31cda1a0..b0e63c672ebd 100644
--- a/include/asm-generic/percpu.h
+++ b/include/asm-generic/percpu.h
@@ -32,6 +32,8 @@ extern unsigned long __per_cpu_offset[NR_CPUS];
32 */ 32 */
33#ifndef __my_cpu_offset 33#ifndef __my_cpu_offset
34#define __my_cpu_offset per_cpu_offset(raw_smp_processor_id()) 34#define __my_cpu_offset per_cpu_offset(raw_smp_processor_id())
35#endif
36#ifdef CONFIG_DEBUG_PREEMPT
35#define my_cpu_offset per_cpu_offset(smp_processor_id()) 37#define my_cpu_offset per_cpu_offset(smp_processor_id())
36#else 38#else
37#define my_cpu_offset __my_cpu_offset 39#define my_cpu_offset __my_cpu_offset
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index f784d2f34149..f054778e916c 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -238,6 +238,9 @@
238 *(.kprobes.text) \ 238 *(.kprobes.text) \
239 VMLINUX_SYMBOL(__kprobes_text_end) = .; 239 VMLINUX_SYMBOL(__kprobes_text_end) = .;
240 240
241/* Section used for early init (in .S files) */
242#define HEAD_TEXT *(.head.text)
243
241/* init and exit section handling */ 244/* init and exit section handling */
242#define INIT_DATA \ 245#define INIT_DATA \
243 *(.init.data) \ 246 *(.init.data) \
diff --git a/include/asm-h8300/hardirq.h b/include/asm-h8300/hardirq.h
index 18fa7931e09f..9d7f7a7462b2 100644
--- a/include/asm-h8300/hardirq.h
+++ b/include/asm-h8300/hardirq.h
@@ -12,6 +12,8 @@ typedef struct {
12 12
13#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ 13#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
14 14
15extern void ack_bad_irq(unsigned int irq);
16
15#define HARDIRQ_BITS 8 17#define HARDIRQ_BITS 8
16 18
17/* 19/*
diff --git a/include/asm-h8300/irq.h b/include/asm-h8300/irq.h
index 56eec28cc2c4..13d7c601cd0a 100644
--- a/include/asm-h8300/irq.h
+++ b/include/asm-h8300/irq.h
@@ -3,7 +3,7 @@
3 3
4#include <asm/ptrace.h> 4#include <asm/ptrace.h>
5 5
6#if defined(__H8300H__) 6#if defined(CONFIG_CPU_H8300H)
7#define NR_IRQS 64 7#define NR_IRQS 64
8#define EXT_IRQ0 12 8#define EXT_IRQ0 12
9#define EXT_IRQ1 13 9#define EXT_IRQ1 13
@@ -14,14 +14,6 @@
14#define EXT_IRQ6 18 14#define EXT_IRQ6 18
15#define EXT_IRQ7 19 15#define EXT_IRQ7 19
16#define EXT_IRQS 5 16#define EXT_IRQS 5
17
18#include <asm/regs306x.h>
19#define h8300_clear_isr(irq) \
20do { \
21 if (irq >= EXT_IRQ0 && irq <= EXT_IRQ5) \
22 *(volatile unsigned char *)ISR &= ~(1 << (irq - EXT_IRQ0)); \
23} while(0)
24
25#define IER_REGS *(volatile unsigned char *)IER 17#define IER_REGS *(volatile unsigned char *)IER
26#endif 18#endif
27#if defined(CONFIG_CPU_H8S) 19#if defined(CONFIG_CPU_H8S)
@@ -44,13 +36,6 @@ do { \
44#define EXT_IRQ15 31 36#define EXT_IRQ15 31
45#define EXT_IRQS 15 37#define EXT_IRQS 15
46 38
47#include <asm/regs267x.h>
48#define h8300_clear_isr(irq) \
49do { \
50 if (irq >= EXT_IRQ0 && irq <= EXT_IRQ15) \
51 *(volatile unsigned short *)ISR &= ~(1 << (irq - EXT_IRQ0)); \
52} while(0)
53
54#define IER_REGS *(volatile unsigned short *)IER 39#define IER_REGS *(volatile unsigned short *)IER
55#endif 40#endif
56 41
@@ -59,4 +44,6 @@ static __inline__ int irq_canonicalize(int irq)
59 return irq; 44 return irq;
60} 45}
61 46
47typedef void (*h8300_vector)(void);
48
62#endif /* _H8300_IRQ_H_ */ 49#endif /* _H8300_IRQ_H_ */
diff --git a/include/asm-h8300/uaccess.h b/include/asm-h8300/uaccess.h
index ebe58c6c8387..a22350ec271a 100644
--- a/include/asm-h8300/uaccess.h
+++ b/include/asm-h8300/uaccess.h
@@ -91,7 +91,7 @@ extern int __put_user_bad(void);
91#define get_user(x, ptr) \ 91#define get_user(x, ptr) \
92({ \ 92({ \
93 int __gu_err = 0; \ 93 int __gu_err = 0; \
94 typeof(*(ptr)) __gu_val = 0; \ 94 uint32_t __gu_val = 0; \
95 switch (sizeof(*(ptr))) { \ 95 switch (sizeof(*(ptr))) { \
96 case 1: \ 96 case 1: \
97 case 2: \ 97 case 2: \
@@ -106,7 +106,7 @@ extern int __put_user_bad(void);
106 __gu_err = __get_user_bad(); \ 106 __gu_err = __get_user_bad(); \
107 break; \ 107 break; \
108 } \ 108 } \
109 (x) = __gu_val; \ 109 (x) = (typeof(*(ptr)))__gu_val; \
110 __gu_err; \ 110 __gu_err; \
111}) 111})
112#define __get_user(x, ptr) get_user(x, ptr) 112#define __get_user(x, ptr) get_user(x, ptr)
diff --git a/include/asm-ia64/Kbuild b/include/asm-ia64/Kbuild
index 4a1e48b9f403..eb24a3f47caa 100644
--- a/include/asm-ia64/Kbuild
+++ b/include/asm-ia64/Kbuild
@@ -3,7 +3,6 @@ include include/asm-generic/Kbuild.asm
3header-y += break.h 3header-y += break.h
4header-y += fpu.h 4header-y += fpu.h
5header-y += fpswa.h 5header-y += fpswa.h
6header-y += gcc_intrin.h
7header-y += ia64regs.h 6header-y += ia64regs.h
8header-y += intel_intrin.h 7header-y += intel_intrin.h
9header-y += intrinsics.h 8header-y += intrinsics.h
@@ -12,5 +11,6 @@ header-y += ptrace_offsets.h
12header-y += rse.h 11header-y += rse.h
13header-y += ucontext.h 12header-y += ucontext.h
14 13
14unifdef-y += gcc_intrin.h
15unifdef-y += perfmon.h 15unifdef-y += perfmon.h
16unifdef-y += ustack.h 16unifdef-y += ustack.h
diff --git a/include/asm-ia64/hw_irq.h b/include/asm-ia64/hw_irq.h
index 7e6e3779670a..76366dc9c1a0 100644
--- a/include/asm-ia64/hw_irq.h
+++ b/include/asm-ia64/hw_irq.h
@@ -93,6 +93,9 @@ extern __u8 isa_irq_to_vector_map[16];
93struct irq_cfg { 93struct irq_cfg {
94 ia64_vector vector; 94 ia64_vector vector;
95 cpumask_t domain; 95 cpumask_t domain;
96 cpumask_t old_domain;
97 unsigned move_cleanup_count;
98 u8 move_in_progress : 1;
96}; 99};
97extern spinlock_t vector_lock; 100extern spinlock_t vector_lock;
98extern struct irq_cfg irq_cfg[NR_IRQS]; 101extern struct irq_cfg irq_cfg[NR_IRQS];
@@ -106,12 +109,19 @@ extern int assign_irq_vector (int irq); /* allocate a free vector */
106extern void free_irq_vector (int vector); 109extern void free_irq_vector (int vector);
107extern int reserve_irq_vector (int vector); 110extern int reserve_irq_vector (int vector);
108extern void __setup_vector_irq(int cpu); 111extern void __setup_vector_irq(int cpu);
109extern int reassign_irq_vector(int irq, int cpu);
110extern void ia64_send_ipi (int cpu, int vector, int delivery_mode, int redirect); 112extern void ia64_send_ipi (int cpu, int vector, int delivery_mode, int redirect);
111extern void register_percpu_irq (ia64_vector vec, struct irqaction *action); 113extern void register_percpu_irq (ia64_vector vec, struct irqaction *action);
112extern int check_irq_used (int irq); 114extern int check_irq_used (int irq);
113extern void destroy_and_reserve_irq (unsigned int irq); 115extern void destroy_and_reserve_irq (unsigned int irq);
114 116
117#if defined(CONFIG_SMP) && (defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_DIG))
118extern int irq_prepare_move(int irq, int cpu);
119extern void irq_complete_move(unsigned int irq);
120#else
121static inline int irq_prepare_move(int irq, int cpu) { return 0; }
122static inline void irq_complete_move(unsigned int irq) {}
123#endif
124
115static inline void ia64_resend_irq(unsigned int vector) 125static inline void ia64_resend_irq(unsigned int vector)
116{ 126{
117 platform_send_ipi(smp_processor_id(), vector, IA64_IPI_DM_INT, 0); 127 platform_send_ipi(smp_processor_id(), vector, IA64_IPI_DM_INT, 0);
diff --git a/include/asm-ia64/kprobes.h b/include/asm-ia64/kprobes.h
index a93ce9ef07ff..d03bf9ff68e3 100644
--- a/include/asm-ia64/kprobes.h
+++ b/include/asm-ia64/kprobes.h
@@ -82,7 +82,6 @@ struct kprobe_ctlblk {
82 struct prev_kprobe prev_kprobe[ARCH_PREV_KPROBE_SZ]; 82 struct prev_kprobe prev_kprobe[ARCH_PREV_KPROBE_SZ];
83}; 83};
84 84
85#define ARCH_SUPPORTS_KRETPROBES
86#define kretprobe_blacklist_size 0 85#define kretprobe_blacklist_size 0
87 86
88#define SLOT0_OPCODE_SHIFT (37) 87#define SLOT0_OPCODE_SHIFT (37)
@@ -118,14 +117,10 @@ struct arch_specific_insn {
118 unsigned short slot; 117 unsigned short slot;
119}; 118};
120 119
121extern int kprobes_fault_handler(struct pt_regs *regs, int trapnr); 120extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
122extern int kprobe_exceptions_notify(struct notifier_block *self, 121extern int kprobe_exceptions_notify(struct notifier_block *self,
123 unsigned long val, void *data); 122 unsigned long val, void *data);
124 123
125/* ia64 does not need this */
126static inline void jprobe_return(void)
127{
128}
129extern void invalidate_stacked_regs(void); 124extern void invalidate_stacked_regs(void);
130extern void flush_register_stack(void); 125extern void flush_register_stack(void);
131extern void arch_remove_kprobe(struct kprobe *p); 126extern void arch_remove_kprobe(struct kprobe *p);
diff --git a/include/asm-ia64/ptrace.h b/include/asm-ia64/ptrace.h
index 0bdce7dde1b0..4b2a8d40ebc5 100644
--- a/include/asm-ia64/ptrace.h
+++ b/include/asm-ia64/ptrace.h
@@ -233,8 +233,6 @@ struct switch_stack {
233#include <asm/current.h> 233#include <asm/current.h>
234#include <asm/page.h> 234#include <asm/page.h>
235 235
236#define __ARCH_SYS_PTRACE 1
237
238/* 236/*
239 * We use the ia64_psr(regs)->ri to determine which of the three 237 * We use the ia64_psr(regs)->ri to determine which of the three
240 * instructions in bundle (16 bytes) took the sample. Generate 238 * instructions in bundle (16 bytes) took the sample. Generate
@@ -314,6 +312,13 @@ struct switch_stack {
314 #define arch_ptrace_attach(child) \ 312 #define arch_ptrace_attach(child) \
315 ptrace_attach_sync_user_rbs(child) 313 ptrace_attach_sync_user_rbs(child)
316 314
315 #define arch_has_single_step() (1)
316 extern void user_enable_single_step(struct task_struct *);
317 extern void user_disable_single_step(struct task_struct *);
318
319 #define arch_has_block_step() (1)
320 extern void user_enable_block_step(struct task_struct *);
321
317#endif /* !__KERNEL__ */ 322#endif /* !__KERNEL__ */
318 323
319/* pt_all_user_regs is used for PTRACE_GETREGS PTRACE_SETREGS */ 324/* pt_all_user_regs is used for PTRACE_GETREGS PTRACE_SETREGS */
diff --git a/include/asm-ia64/sal.h b/include/asm-ia64/sal.h
index 2251118894ae..f4904db3b057 100644
--- a/include/asm-ia64/sal.h
+++ b/include/asm-ia64/sal.h
@@ -807,6 +807,10 @@ static inline s64
807ia64_sal_physical_id_info(u16 *splid) 807ia64_sal_physical_id_info(u16 *splid)
808{ 808{
809 struct ia64_sal_retval isrv; 809 struct ia64_sal_retval isrv;
810
811 if (sal_revision < SAL_VERSION_CODE(3,2))
812 return -1;
813
810 SAL_CALL(isrv, SAL_PHYSICAL_ID_INFO, 0, 0, 0, 0, 0, 0, 0); 814 SAL_CALL(isrv, SAL_PHYSICAL_ID_INFO, 0, 0, 0, 0, 0, 0, 0);
811 if (splid) 815 if (splid)
812 *splid = isrv.v0; 816 *splid = isrv.v0;
diff --git a/include/asm-m68k/unistd.h b/include/asm-m68k/unistd.h
index 87f77b119317..e72ba563f102 100644
--- a/include/asm-m68k/unistd.h
+++ b/include/asm-m68k/unistd.h
@@ -320,13 +320,15 @@
320#define __NR_epoll_pwait 315 320#define __NR_epoll_pwait 315
321#define __NR_utimensat 316 321#define __NR_utimensat 316
322#define __NR_signalfd 317 322#define __NR_signalfd 317
323#define __NR_timerfd 318 323#define __NR_timerfd_create 318
324#define __NR_eventfd 319 324#define __NR_eventfd 319
325#define __NR_fallocate 320 325#define __NR_fallocate 320
326#define __NR_timerfd_settime 321
327#define __NR_timerfd_gettime 322
326 328
327#ifdef __KERNEL__ 329#ifdef __KERNEL__
328 330
329#define NR_syscalls 321 331#define NR_syscalls 323
330 332
331#define __ARCH_WANT_IPC_PARSE_VERSION 333#define __ARCH_WANT_IPC_PARSE_VERSION
332#define __ARCH_WANT_OLD_READDIR 334#define __ARCH_WANT_OLD_READDIR
diff --git a/include/asm-m68knommu/machdep.h b/include/asm-m68knommu/machdep.h
index 1cf26d240d83..de9f47a51cc2 100644
--- a/include/asm-m68knommu/machdep.h
+++ b/include/asm-m68knommu/machdep.h
@@ -21,4 +21,6 @@ extern void (*mach_power_off)( void );
21 21
22extern void config_BSP(char *command, int len); 22extern void config_BSP(char *command, int len);
23 23
24extern void do_IRQ(int irq, struct pt_regs *fp);
25
24#endif /* _M68KNOMMU_MACHDEP_H */ 26#endif /* _M68KNOMMU_MACHDEP_H */
diff --git a/include/asm-m68knommu/unistd.h b/include/asm-m68knommu/unistd.h
index 27c2f9bb4dbd..4ba98b9c5d79 100644
--- a/include/asm-m68knommu/unistd.h
+++ b/include/asm-m68knommu/unistd.h
@@ -321,13 +321,15 @@
321#define __NR_epoll_pwait 315 321#define __NR_epoll_pwait 315
322#define __NR_utimensat 316 322#define __NR_utimensat 316
323#define __NR_signalfd 317 323#define __NR_signalfd 317
324#define __NR_timerfd 318 324#define __NR_timerfd_create 318
325#define __NR_eventfd 319 325#define __NR_eventfd 319
326#define __NR_fallocate 320 326#define __NR_fallocate 320
327#define __NR_timerfd_settime 321
328#define __NR_timerfd_gettime 322
327 329
328#ifdef __KERNEL__ 330#ifdef __KERNEL__
329 331
330#define NR_syscalls 321 332#define NR_syscalls 323
331 333
332#define __ARCH_WANT_IPC_PARSE_VERSION 334#define __ARCH_WANT_IPC_PARSE_VERSION
333#define __ARCH_WANT_OLD_READDIR 335#define __ARCH_WANT_OLD_READDIR
diff --git a/include/asm-mips/mach-db1x00/db1200.h b/include/asm-mips/mach-db1x00/db1200.h
index 050eae87ff01..a6bdac61ab49 100644
--- a/include/asm-mips/mach-db1x00/db1200.h
+++ b/include/asm-mips/mach-db1x00/db1200.h
@@ -25,6 +25,7 @@
25#define __ASM_DB1200_H 25#define __ASM_DB1200_H
26 26
27#include <linux/types.h> 27#include <linux/types.h>
28#include <asm/mach-au1x00/au1xxx_psc.h>
28 29
29// This is defined in au1000.h with bogus value 30// This is defined in au1000.h with bogus value
30#undef AU1X00_EXTERNAL_INT 31#undef AU1X00_EXTERNAL_INT
diff --git a/include/asm-mips/mach-db1x00/db1x00.h b/include/asm-mips/mach-db1x00/db1x00.h
index 0f5f4c29f4e8..e7a88ba35833 100644
--- a/include/asm-mips/mach-db1x00/db1x00.h
+++ b/include/asm-mips/mach-db1x00/db1x00.h
@@ -28,6 +28,7 @@
28#ifndef __ASM_DB1X00_H 28#ifndef __ASM_DB1X00_H
29#define __ASM_DB1X00_H 29#define __ASM_DB1X00_H
30 30
31#include <asm/mach-au1x00/au1xxx_psc.h>
31 32
32#ifdef CONFIG_MIPS_DB1550 33#ifdef CONFIG_MIPS_DB1550
33 34
diff --git a/include/asm-mips/mach-ip27/dma-coherence.h b/include/asm-mips/mach-ip27/dma-coherence.h
index 3fdbbf68e952..ed7e6222dc15 100644
--- a/include/asm-mips/mach-ip27/dma-coherence.h
+++ b/include/asm-mips/mach-ip27/dma-coherence.h
@@ -35,7 +35,7 @@ static dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page)
35 35
36static unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr) 36static unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr)
37{ 37{
38 return dma_addr & (0xffUL << 56); 38 return dma_addr & ~(0xffUL << 56);
39} 39}
40 40
41static inline void plat_unmap_dma_mem(dma_addr_t dma_addr) 41static inline void plat_unmap_dma_mem(dma_addr_t dma_addr)
diff --git a/include/asm-mips/mach-pb1x00/pb1200.h b/include/asm-mips/mach-pb1x00/pb1200.h
index d9f384acfea9..ed5fd7390678 100644
--- a/include/asm-mips/mach-pb1x00/pb1200.h
+++ b/include/asm-mips/mach-pb1x00/pb1200.h
@@ -25,6 +25,7 @@
25#define __ASM_PB1200_H 25#define __ASM_PB1200_H
26 26
27#include <linux/types.h> 27#include <linux/types.h>
28#include <asm/mach-au1x00/au1xxx_psc.h>
28 29
29// This is defined in au1000.h with bogus value 30// This is defined in au1000.h with bogus value
30#undef AU1X00_EXTERNAL_INT 31#undef AU1X00_EXTERNAL_INT
diff --git a/include/asm-mips/mach-pb1x00/pb1550.h b/include/asm-mips/mach-pb1x00/pb1550.h
index 9a4955ce3b4a..c2ab0e2df4ae 100644
--- a/include/asm-mips/mach-pb1x00/pb1550.h
+++ b/include/asm-mips/mach-pb1x00/pb1550.h
@@ -28,6 +28,7 @@
28#define __ASM_PB1550_H 28#define __ASM_PB1550_H
29 29
30#include <linux/types.h> 30#include <linux/types.h>
31#include <asm/mach-au1x00/au1xxx_psc.h>
31 32
32#define DBDMA_AC97_TX_CHAN DSCR_CMD0_PSC1_TX 33#define DBDMA_AC97_TX_CHAN DSCR_CMD0_PSC1_TX
33#define DBDMA_AC97_RX_CHAN DSCR_CMD0_PSC1_RX 34#define DBDMA_AC97_RX_CHAN DSCR_CMD0_PSC1_RX
diff --git a/include/asm-mips/qemu.h b/include/asm-mips/qemu.h
deleted file mode 100644
index 487ced4a40de..000000000000
--- a/include/asm-mips/qemu.h
+++ /dev/null
@@ -1,30 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2005 by Ralf Baechle (ralf@linux-mips.org)
7 */
8#ifndef __ASM_QEMU_H
9#define __ASM_QEMU_H
10
11/*
12 * Interrupt numbers
13 */
14#define Q_PIC_IRQ_BASE 0
15#define Q_COUNT_COMPARE_IRQ 23
16
17/*
18 * Qemu clock rate. Unlike on real MIPS this has no relation to the
19 * instruction issue rate, so the choosen value is pure fiction, just needs
20 * to match the value in Qemu itself.
21 */
22#define QEMU_C0_COUNTER_CLOCK 100000000
23
24/*
25 * Magic qemu system control location.
26 */
27#define QEMU_RESTART_REG 0xBFBF0000
28#define QEMU_HALT_REG 0xBFBF0004
29
30#endif /* __ASM_QEMU_H */
diff --git a/include/asm-mips/sni.h b/include/asm-mips/sni.h
index e716447e5e03..8c1eb02c6d16 100644
--- a/include/asm-mips/sni.h
+++ b/include/asm-mips/sni.h
@@ -228,7 +228,14 @@ extern void sni_pcimt_irq_init(void);
228extern void sni_cpu_time_init(void); 228extern void sni_cpu_time_init(void);
229 229
230/* eisa init for RM200/400 */ 230/* eisa init for RM200/400 */
231#ifdef CONFIG_EISA
231extern int sni_eisa_root_init(void); 232extern int sni_eisa_root_init(void);
233#else
234static inline int sni_eisa_root_init(void)
235{
236 return 0;
237}
238#endif
232 239
233/* common irq stuff */ 240/* common irq stuff */
234extern void (*sni_hwint)(void); 241extern void (*sni_hwint)(void);
diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h
index fa9a587b3bf1..4964c82f85f9 100644
--- a/include/asm-mips/unistd.h
+++ b/include/asm-mips/unistd.h
@@ -341,16 +341,19 @@
341#define __NR_timerfd (__NR_Linux + 318) 341#define __NR_timerfd (__NR_Linux + 318)
342#define __NR_eventfd (__NR_Linux + 319) 342#define __NR_eventfd (__NR_Linux + 319)
343#define __NR_fallocate (__NR_Linux + 320) 343#define __NR_fallocate (__NR_Linux + 320)
344#define __NR_timerfd_create (__NR_Linux + 321)
345#define __NR_timerfd_gettime (__NR_Linux + 322)
346#define __NR_timerfd_settime (__NR_Linux + 323)
344 347
345/* 348/*
346 * Offset of the last Linux o32 flavoured syscall 349 * Offset of the last Linux o32 flavoured syscall
347 */ 350 */
348#define __NR_Linux_syscalls 320 351#define __NR_Linux_syscalls 323
349 352
350#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ 353#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
351 354
352#define __NR_O32_Linux 4000 355#define __NR_O32_Linux 4000
353#define __NR_O32_Linux_syscalls 320 356#define __NR_O32_Linux_syscalls 323
354 357
355#if _MIPS_SIM == _MIPS_SIM_ABI64 358#if _MIPS_SIM == _MIPS_SIM_ABI64
356 359
@@ -638,16 +641,19 @@
638#define __NR_timerfd (__NR_Linux + 277) 641#define __NR_timerfd (__NR_Linux + 277)
639#define __NR_eventfd (__NR_Linux + 278) 642#define __NR_eventfd (__NR_Linux + 278)
640#define __NR_fallocate (__NR_Linux + 279) 643#define __NR_fallocate (__NR_Linux + 279)
644#define __NR_timerfd_create (__NR_Linux + 280)
645#define __NR_timerfd_gettime (__NR_Linux + 281)
646#define __NR_timerfd_settime (__NR_Linux + 282)
641 647
642/* 648/*
643 * Offset of the last Linux 64-bit flavoured syscall 649 * Offset of the last Linux 64-bit flavoured syscall
644 */ 650 */
645#define __NR_Linux_syscalls 279 651#define __NR_Linux_syscalls 282
646 652
647#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ 653#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
648 654
649#define __NR_64_Linux 5000 655#define __NR_64_Linux 5000
650#define __NR_64_Linux_syscalls 279 656#define __NR_64_Linux_syscalls 282
651 657
652#if _MIPS_SIM == _MIPS_SIM_NABI32 658#if _MIPS_SIM == _MIPS_SIM_NABI32
653 659
@@ -939,16 +945,19 @@
939#define __NR_timerfd (__NR_Linux + 281) 945#define __NR_timerfd (__NR_Linux + 281)
940#define __NR_eventfd (__NR_Linux + 282) 946#define __NR_eventfd (__NR_Linux + 282)
941#define __NR_fallocate (__NR_Linux + 283) 947#define __NR_fallocate (__NR_Linux + 283)
948#define __NR_timerfd_create (__NR_Linux + 284)
949#define __NR_timerfd_gettime (__NR_Linux + 285)
950#define __NR_timerfd_settime (__NR_Linux + 286)
942 951
943/* 952/*
944 * Offset of the last N32 flavoured syscall 953 * Offset of the last N32 flavoured syscall
945 */ 954 */
946#define __NR_Linux_syscalls 283 955#define __NR_Linux_syscalls 286
947 956
948#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ 957#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
949 958
950#define __NR_N32_Linux 6000 959#define __NR_N32_Linux 6000
951#define __NR_N32_Linux_syscalls 283 960#define __NR_N32_Linux_syscalls 286
952 961
953#ifdef __KERNEL__ 962#ifdef __KERNEL__
954 963
diff --git a/include/asm-mn10300/Kbuild b/include/asm-mn10300/Kbuild
index 79384c537dc6..c68e1680da01 100644
--- a/include/asm-mn10300/Kbuild
+++ b/include/asm-mn10300/Kbuild
@@ -1,5 +1 @@
1include include/asm-generic/Kbuild.asm include include/asm-generic/Kbuild.asm
2
3unifdef-y += termios.h
4unifdef-y += ptrace.h
5unifdef-y += page.h
diff --git a/include/asm-mn10300/param.h b/include/asm-mn10300/param.h
index 54b883ec3906..789b1df41fcb 100644
--- a/include/asm-mn10300/param.h
+++ b/include/asm-mn10300/param.h
@@ -12,7 +12,7 @@
12#define _ASM_PARAM_H 12#define _ASM_PARAM_H
13 13
14#ifdef __KERNEL__ 14#ifdef __KERNEL__
15#define HZ 1000 /* Internal kernel timer frequency */ 15#define HZ CONFIG_HZ /* Internal kernel timer frequency */
16#define USER_HZ 100 /* .. some user interfaces are in 16#define USER_HZ 100 /* .. some user interfaces are in
17 * "ticks" */ 17 * "ticks" */
18#define CLOCKS_PER_SEC (USER_HZ) /* like times() */ 18#define CLOCKS_PER_SEC (USER_HZ) /* like times() */
diff --git a/include/asm-mn10300/socket.h b/include/asm-mn10300/socket.h
index 99ca648b94c5..80af9c4ccad7 100644
--- a/include/asm-mn10300/socket.h
+++ b/include/asm-mn10300/socket.h
@@ -52,4 +52,6 @@
52#define SO_TIMESTAMPNS 35 52#define SO_TIMESTAMPNS 35
53#define SCM_TIMESTAMPNS SO_TIMESTAMPNS 53#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
54 54
55#define SO_MARK 36
56
55#endif /* _ASM_SOCKET_H */ 57#endif /* _ASM_SOCKET_H */
diff --git a/include/asm-powerpc/kprobes.h b/include/asm-powerpc/kprobes.h
index afabad230dbb..d0e7701fa1f6 100644
--- a/include/asm-powerpc/kprobes.h
+++ b/include/asm-powerpc/kprobes.h
@@ -80,7 +80,6 @@ typedef unsigned int kprobe_opcode_t;
80#define is_trap(instr) (IS_TW(instr) || IS_TWI(instr)) 80#define is_trap(instr) (IS_TW(instr) || IS_TWI(instr))
81#endif 81#endif
82 82
83#define ARCH_SUPPORTS_KRETPROBES
84#define flush_insn_slot(p) do { } while (0) 83#define flush_insn_slot(p) do { } while (0)
85#define kretprobe_blacklist_size 0 84#define kretprobe_blacklist_size 0
86 85
diff --git a/include/asm-powerpc/percpu.h b/include/asm-powerpc/percpu.h
index ccb0523eb3b4..f879252b7ea6 100644
--- a/include/asm-powerpc/percpu.h
+++ b/include/asm-powerpc/percpu.h
@@ -13,7 +13,7 @@
13#include <asm/paca.h> 13#include <asm/paca.h>
14 14
15#define __per_cpu_offset(cpu) (paca[cpu].data_offset) 15#define __per_cpu_offset(cpu) (paca[cpu].data_offset)
16#define __my_cpu_offset get_paca()->data_offset 16#define __my_cpu_offset local_paca->data_offset
17#define per_cpu_offset(x) (__per_cpu_offset(x)) 17#define per_cpu_offset(x) (__per_cpu_offset(x))
18 18
19#endif /* CONFIG_SMP */ 19#endif /* CONFIG_SMP */
diff --git a/include/asm-powerpc/reg.h b/include/asm-powerpc/reg.h
index 0d6238987df8..edc0cfd7f6e2 100644
--- a/include/asm-powerpc/reg.h
+++ b/include/asm-powerpc/reg.h
@@ -153,6 +153,9 @@
153#define CTRL_RUNLATCH 0x1 153#define CTRL_RUNLATCH 0x1
154#define SPRN_DABR 0x3F5 /* Data Address Breakpoint Register */ 154#define SPRN_DABR 0x3F5 /* Data Address Breakpoint Register */
155#define DABR_TRANSLATION (1UL << 2) 155#define DABR_TRANSLATION (1UL << 2)
156#define SPRN_DABRX 0x3F7 /* Data Address Breakpoint Register Extension */
157#define DABRX_USER (1UL << 0)
158#define DABRX_KERNEL (1UL << 1)
156#define SPRN_DAR 0x013 /* Data Address Register */ 159#define SPRN_DAR 0x013 /* Data Address Register */
157#define SPRN_DSISR 0x012 /* Data Storage Interrupt Status Register */ 160#define SPRN_DSISR 0x012 /* Data Storage Interrupt Status Register */
158#define DSISR_NOHPTE 0x40000000 /* no translation found */ 161#define DSISR_NOHPTE 0x40000000 /* no translation found */
diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h
index f07c99ba5d13..e3c845b0f764 100644
--- a/include/asm-powerpc/spu.h
+++ b/include/asm-powerpc/spu.h
@@ -98,9 +98,8 @@
98#define MFC_PRIV_ATTN_EVENT 0x00000800 98#define MFC_PRIV_ATTN_EVENT 0x00000800
99#define MFC_MULTI_SRC_EVENT 0x00001000 99#define MFC_MULTI_SRC_EVENT 0x00001000
100 100
101/* Flags indicating progress during context switch. */ 101/* Flag indicating progress during context switch. */
102#define SPU_CONTEXT_SWITCH_PENDING 0UL 102#define SPU_CONTEXT_SWITCH_PENDING 0UL
103#define SPU_CONTEXT_SWITCH_ACTIVE 1UL
104 103
105struct spu_context; 104struct spu_context;
106struct spu_runqueue; 105struct spu_runqueue;
diff --git a/include/asm-s390/bitops.h b/include/asm-s390/bitops.h
index ab83c844d04c..965394e69452 100644
--- a/include/asm-s390/bitops.h
+++ b/include/asm-s390/bitops.h
@@ -456,16 +456,18 @@ static inline unsigned long __ffz_word_loop(const unsigned long *addr,
456 456
457 asm volatile( 457 asm volatile(
458#ifndef __s390x__ 458#ifndef __s390x__
459 " ahi %1,31\n" 459 " ahi %1,-1\n"
460 " srl %1,5\n" 460 " sra %1,5\n"
461 " jz 1f\n"
461 "0: c %2,0(%0,%3)\n" 462 "0: c %2,0(%0,%3)\n"
462 " jne 1f\n" 463 " jne 1f\n"
463 " la %0,4(%0)\n" 464 " la %0,4(%0)\n"
464 " brct %1,0b\n" 465 " brct %1,0b\n"
465 "1:\n" 466 "1:\n"
466#else 467#else
467 " aghi %1,63\n" 468 " aghi %1,-1\n"
468 " srlg %1,%1,6\n" 469 " srag %1,%1,6\n"
470 " jz 1f\n"
469 "0: cg %2,0(%0,%3)\n" 471 "0: cg %2,0(%0,%3)\n"
470 " jne 1f\n" 472 " jne 1f\n"
471 " la %0,8(%0)\n" 473 " la %0,8(%0)\n"
@@ -491,16 +493,18 @@ static inline unsigned long __ffs_word_loop(const unsigned long *addr,
491 493
492 asm volatile( 494 asm volatile(
493#ifndef __s390x__ 495#ifndef __s390x__
494 " ahi %1,31\n" 496 " ahi %1,-1\n"
495 " srl %1,5\n" 497 " sra %1,5\n"
498 " jz 1f\n"
496 "0: c %2,0(%0,%3)\n" 499 "0: c %2,0(%0,%3)\n"
497 " jne 1f\n" 500 " jne 1f\n"
498 " la %0,4(%0)\n" 501 " la %0,4(%0)\n"
499 " brct %1,0b\n" 502 " brct %1,0b\n"
500 "1:\n" 503 "1:\n"
501#else 504#else
502 " aghi %1,63\n" 505 " aghi %1,-1\n"
503 " srlg %1,%1,6\n" 506 " srag %1,%1,6\n"
507 " jz 1f\n"
504 "0: cg %2,0(%0,%3)\n" 508 "0: cg %2,0(%0,%3)\n"
505 " jne 1f\n" 509 " jne 1f\n"
506 " la %0,8(%0)\n" 510 " la %0,8(%0)\n"
diff --git a/include/asm-s390/kprobes.h b/include/asm-s390/kprobes.h
index 948db3d0d05c..330f68caffe4 100644
--- a/include/asm-s390/kprobes.h
+++ b/include/asm-s390/kprobes.h
@@ -46,7 +46,6 @@ typedef u16 kprobe_opcode_t;
46 ? (MAX_STACK_SIZE) \ 46 ? (MAX_STACK_SIZE) \
47 : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) 47 : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR)))
48 48
49#define ARCH_SUPPORTS_KRETPROBES
50#define kretprobe_blacklist_size 0 49#define kretprobe_blacklist_size 0
51 50
52#define KPROBE_SWAP_INST 0x10 51#define KPROBE_SWAP_INST 0x10
diff --git a/include/asm-sh/cpu-sh3/cache.h b/include/asm-sh/cpu-sh3/cache.h
index 56bd838b7db4..bee2d81c56bf 100644
--- a/include/asm-sh/cpu-sh3/cache.h
+++ b/include/asm-sh/cpu-sh3/cache.h
@@ -35,7 +35,7 @@
35 defined(CONFIG_CPU_SUBTYPE_SH7710) || \ 35 defined(CONFIG_CPU_SUBTYPE_SH7710) || \
36 defined(CONFIG_CPU_SUBTYPE_SH7720) || \ 36 defined(CONFIG_CPU_SUBTYPE_SH7720) || \
37 defined(CONFIG_CPU_SUBTYPE_SH7721) 37 defined(CONFIG_CPU_SUBTYPE_SH7721)
38#define CCR3 0xa40000b4 38#define CCR3_REG 0xa40000b4
39#define CCR_CACHE_16KB 0x00010000 39#define CCR_CACHE_16KB 0x00010000
40#define CCR_CACHE_32KB 0x00020000 40#define CCR_CACHE_32KB 0x00020000
41#endif 41#endif
diff --git a/include/asm-sh/delay.h b/include/asm-sh/delay.h
index d5d464041003..4b16bf9b56bd 100644
--- a/include/asm-sh/delay.h
+++ b/include/asm-sh/delay.h
@@ -15,7 +15,6 @@ extern void __ndelay(unsigned long nsecs);
15extern void __const_udelay(unsigned long xloops); 15extern void __const_udelay(unsigned long xloops);
16extern void __delay(unsigned long loops); 16extern void __delay(unsigned long loops);
17 17
18#ifdef CONFIG_SUPERH32
19#define udelay(n) (__builtin_constant_p(n) ? \ 18#define udelay(n) (__builtin_constant_p(n) ? \
20 ((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c6ul)) : \ 19 ((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c6ul)) : \
21 __udelay(n)) 20 __udelay(n))
@@ -23,9 +22,5 @@ extern void __delay(unsigned long loops);
23#define ndelay(n) (__builtin_constant_p(n) ? \ 22#define ndelay(n) (__builtin_constant_p(n) ? \
24 ((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5ul)) : \ 23 ((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5ul)) : \
25 __ndelay(n)) 24 __ndelay(n))
26#else
27extern void udelay(unsigned long usecs);
28extern void ndelay(unsigned long nsecs);
29#endif
30 25
31#endif /* __ASM_SH_DELAY_H */ 26#endif /* __ASM_SH_DELAY_H */
diff --git a/include/asm-sh/entry-macros.S b/include/asm-sh/entry-macros.S
index 500030eae7aa..2dab0b8d9454 100644
--- a/include/asm-sh/entry-macros.S
+++ b/include/asm-sh/entry-macros.S
@@ -12,7 +12,7 @@
12 not r11, r11 12 not r11, r11
13 stc sr, r10 13 stc sr, r10
14 and r11, r10 14 and r11, r10
15#ifdef CONFIG_HAS_SR_RB 15#ifdef CONFIG_CPU_HAS_SR_RB
16 stc k_g_imask, r11 16 stc k_g_imask, r11
17 or r11, r10 17 or r11, r10
18#endif 18#endif
@@ -20,7 +20,7 @@
20 .endm 20 .endm
21 21
22 .macro get_current_thread_info, ti, tmp 22 .macro get_current_thread_info, ti, tmp
23#ifdef CONFIG_HAS_SR_RB 23#ifdef CONFIG_CPU_HAS_SR_RB
24 stc r7_bank, \ti 24 stc r7_bank, \ti
25#else 25#else
26 mov #((THREAD_SIZE - 1) >> 10) ^ 0xff, \tmp 26 mov #((THREAD_SIZE - 1) >> 10) ^ 0xff, \tmp
diff --git a/include/asm-sparc/system.h b/include/asm-sparc/system.h
index 45e47c159a6e..4e08210cd4c2 100644
--- a/include/asm-sparc/system.h
+++ b/include/asm-sparc/system.h
@@ -44,6 +44,8 @@ extern enum sparc_cpu sparc_cpu_model;
44 44
45#define SUN4M_NCPUS 4 /* Architectural limit of sun4m. */ 45#define SUN4M_NCPUS 4 /* Architectural limit of sun4m. */
46 46
47extern char reboot_command[];
48
47extern struct thread_info *current_set[NR_CPUS]; 49extern struct thread_info *current_set[NR_CPUS];
48 50
49extern unsigned long empty_bad_page; 51extern unsigned long empty_bad_page;
diff --git a/include/asm-sparc64/kprobes.h b/include/asm-sparc64/kprobes.h
index 7237dd87663e..5879d71afdaa 100644
--- a/include/asm-sparc64/kprobes.h
+++ b/include/asm-sparc64/kprobes.h
@@ -14,8 +14,6 @@ typedef u32 kprobe_opcode_t;
14 14
15#define arch_remove_kprobe(p) do {} while (0) 15#define arch_remove_kprobe(p) do {} while (0)
16 16
17#define ARCH_SUPPORTS_KRETPROBES
18
19#define flush_insn_slot(p) \ 17#define flush_insn_slot(p) \
20do { flushi(&(p)->ainsn.insn[0]); \ 18do { flushi(&(p)->ainsn.insn[0]); \
21 flushi(&(p)->ainsn.insn[1]); \ 19 flushi(&(p)->ainsn.insn[1]); \
diff --git a/include/asm-sparc64/ptrace.h b/include/asm-sparc64/ptrace.h
index 8617c3a5143b..6da197803efc 100644
--- a/include/asm-sparc64/ptrace.h
+++ b/include/asm-sparc64/ptrace.h
@@ -102,12 +102,14 @@ do { current_thread_info()->syscall_noerror = 1; \
102} while (0) 102} while (0)
103#define user_mode(regs) (!((regs)->tstate & TSTATE_PRIV)) 103#define user_mode(regs) (!((regs)->tstate & TSTATE_PRIV))
104#define instruction_pointer(regs) ((regs)->tpc) 104#define instruction_pointer(regs) ((regs)->tpc)
105#define regs_return_value(regs) ((regs)->u_regs[UREG_I0])
105#ifdef CONFIG_SMP 106#ifdef CONFIG_SMP
106extern unsigned long profile_pc(struct pt_regs *); 107extern unsigned long profile_pc(struct pt_regs *);
107#else 108#else
108#define profile_pc(regs) instruction_pointer(regs) 109#define profile_pc(regs) instruction_pointer(regs)
109#endif 110#endif
110extern void show_regs(struct pt_regs *); 111extern void show_regs(struct pt_regs *);
112extern void __show_regs(struct pt_regs *);
111#endif 113#endif
112 114
113#else /* __ASSEMBLY__ */ 115#else /* __ASSEMBLY__ */
diff --git a/include/asm-sparc64/reboot.h b/include/asm-sparc64/reboot.h
new file mode 100644
index 000000000000..3f3f43f5be5e
--- /dev/null
+++ b/include/asm-sparc64/reboot.h
@@ -0,0 +1,6 @@
1#ifndef _SPARC64_REBOOT_H
2#define _SPARC64_REBOOT_H
3
4extern void machine_alt_power_off(void);
5
6#endif /* _SPARC64_REBOOT_H */
diff --git a/include/asm-sparc64/syscalls.h b/include/asm-sparc64/syscalls.h
new file mode 100644
index 000000000000..45a43f637a14
--- /dev/null
+++ b/include/asm-sparc64/syscalls.h
@@ -0,0 +1,13 @@
1#ifndef _SPARC64_SYSCALLS_H
2#define _SPARC64_SYSCALLS_H
3
4struct pt_regs;
5
6extern asmlinkage long sparc_do_fork(unsigned long clone_flags,
7 unsigned long stack_start,
8 struct pt_regs *regs,
9 unsigned long stack_size);
10
11extern asmlinkage int sparc_execve(struct pt_regs *regs);
12
13#endif /* _SPARC64_SYSCALLS_H */
diff --git a/include/asm-sparc64/system.h b/include/asm-sparc64/system.h
index 1faefa6d3708..53eae091a171 100644
--- a/include/asm-sparc64/system.h
+++ b/include/asm-sparc64/system.h
@@ -30,6 +30,8 @@ enum sparc_cpu {
30#define ARCH_SUN4C_SUN4 0 30#define ARCH_SUN4C_SUN4 0
31#define ARCH_SUN4 0 31#define ARCH_SUN4 0
32 32
33extern char reboot_command[];
34
33/* These are here in an effort to more fully work around Spitfire Errata 35/* These are here in an effort to more fully work around Spitfire Errata
34 * #51. Essentially, if a memory barrier occurs soon after a mispredicted 36 * #51. Essentially, if a memory barrier occurs soon after a mispredicted
35 * branch, the chip can stop executing instructions until a trap occurs. 37 * branch, the chip can stop executing instructions until a trap occurs.
@@ -117,6 +119,7 @@ do { __asm__ __volatile__("ba,pt %%xcc, 1f\n\t" \
117extern void sun_do_break(void); 119extern void sun_do_break(void);
118extern int stop_a_enabled; 120extern int stop_a_enabled;
119 121
122extern void fault_in_user_windows(void);
120extern void synchronize_user_stack(void); 123extern void synchronize_user_stack(void);
121 124
122extern void __flushw_user(void); 125extern void __flushw_user(void);
diff --git a/include/asm-x86/Kbuild b/include/asm-x86/Kbuild
index b04a7ff46df1..3b8160a2b47e 100644
--- a/include/asm-x86/Kbuild
+++ b/include/asm-x86/Kbuild
@@ -16,7 +16,6 @@ unifdef-y += ist.h
16unifdef-y += mce.h 16unifdef-y += mce.h
17unifdef-y += msr.h 17unifdef-y += msr.h
18unifdef-y += mtrr.h 18unifdef-y += mtrr.h
19unifdef-y += page.h
20unifdef-y += posix_types_32.h 19unifdef-y += posix_types_32.h
21unifdef-y += posix_types_64.h 20unifdef-y += posix_types_64.h
22unifdef-y += ptrace.h 21unifdef-y += ptrace.h
diff --git a/include/asm-x86/desc_64.h b/include/asm-x86/desc_64.h
deleted file mode 100644
index 8b137891791f..000000000000
--- a/include/asm-x86/desc_64.h
+++ /dev/null
@@ -1 +0,0 @@
1
diff --git a/include/asm-x86/futex.h b/include/asm-x86/futex.h
index cd9f894dd2d7..c9952ea9f698 100644
--- a/include/asm-x86/futex.h
+++ b/include/asm-x86/futex.h
@@ -102,6 +102,13 @@ futex_atomic_op_inuser(int encoded_op, int __user *uaddr)
102static inline int 102static inline int
103futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) 103futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
104{ 104{
105
106#if defined(CONFIG_X86_32) && !defined(CONFIG_X86_BSWAP)
107 /* Real i386 machines have no cmpxchg instruction */
108 if (boot_cpu_data.x86 == 3)
109 return -ENOSYS;
110#endif
111
105 if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int))) 112 if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
106 return -EFAULT; 113 return -EFAULT;
107 114
diff --git a/include/asm-x86/i387.h b/include/asm-x86/i387.h
index 6b1895ccd6b7..f377b76b2f34 100644
--- a/include/asm-x86/i387.h
+++ b/include/asm-x86/i387.h
@@ -20,7 +20,6 @@
20#include <asm/uaccess.h> 20#include <asm/uaccess.h>
21 21
22extern void fpu_init(void); 22extern void fpu_init(void);
23extern unsigned int mxcsr_feature_mask;
24extern void mxcsr_feature_mask_init(void); 23extern void mxcsr_feature_mask_init(void);
25extern void init_fpu(struct task_struct *child); 24extern void init_fpu(struct task_struct *child);
26extern asmlinkage void math_state_restore(void); 25extern asmlinkage void math_state_restore(void);
diff --git a/include/asm-x86/kprobes.h b/include/asm-x86/kprobes.h
index 143476a3cb52..61ad7b5d142e 100644
--- a/include/asm-x86/kprobes.h
+++ b/include/asm-x86/kprobes.h
@@ -42,7 +42,6 @@ typedef u8 kprobe_opcode_t;
42 : (((unsigned long)current_thread_info()) + THREAD_SIZE \ 42 : (((unsigned long)current_thread_info()) + THREAD_SIZE \
43 - (unsigned long)(ADDR))) 43 - (unsigned long)(ADDR)))
44 44
45#define ARCH_SUPPORTS_KRETPROBES
46#define flush_insn_slot(p) do { } while (0) 45#define flush_insn_slot(p) do { } while (0)
47 46
48extern const int kretprobe_blacklist_size; 47extern const int kretprobe_blacklist_size;
diff --git a/include/asm-x86/lguest.h b/include/asm-x86/lguest.h
index 4d9367b72976..9b17571e9bc3 100644
--- a/include/asm-x86/lguest.h
+++ b/include/asm-x86/lguest.h
@@ -23,6 +23,17 @@
23/* Found in switcher.S */ 23/* Found in switcher.S */
24extern unsigned long default_idt_entries[]; 24extern unsigned long default_idt_entries[];
25 25
26/* Declarations for definitions in lguest_guest.S */
27extern char lguest_noirq_start[], lguest_noirq_end[];
28extern const char lgstart_cli[], lgend_cli[];
29extern const char lgstart_sti[], lgend_sti[];
30extern const char lgstart_popf[], lgend_popf[];
31extern const char lgstart_pushf[], lgend_pushf[];
32extern const char lgstart_iret[], lgend_iret[];
33
34extern void lguest_iret(void);
35extern void lguest_init(void);
36
26struct lguest_regs 37struct lguest_regs
27{ 38{
28 /* Manually saved part. */ 39 /* Manually saved part. */
diff --git a/include/asm-x86/nops.h b/include/asm-x86/nops.h
index fec025c7f58c..e3b2bce0aff8 100644
--- a/include/asm-x86/nops.h
+++ b/include/asm-x86/nops.h
@@ -3,17 +3,29 @@
3 3
4/* Define nops for use with alternative() */ 4/* Define nops for use with alternative() */
5 5
6/* generic versions from gas */ 6/* generic versions from gas
7#define GENERIC_NOP1 ".byte 0x90\n" 7 1: nop
8#define GENERIC_NOP2 ".byte 0x89,0xf6\n" 8 2: movl %esi,%esi
9#define GENERIC_NOP3 ".byte 0x8d,0x76,0x00\n" 9 3: leal 0x00(%esi),%esi
10#define GENERIC_NOP4 ".byte 0x8d,0x74,0x26,0x00\n" 10 4: leal 0x00(,%esi,1),%esi
11#define GENERIC_NOP5 GENERIC_NOP1 GENERIC_NOP4 11 6: leal 0x00000000(%esi),%esi
12#define GENERIC_NOP6 ".byte 0x8d,0xb6,0x00,0x00,0x00,0x00\n" 12 7: leal 0x00000000(,%esi,1),%esi
13#define GENERIC_NOP7 ".byte 0x8d,0xb4,0x26,0x00,0x00,0x00,0x00\n" 13*/
14#define GENERIC_NOP8 GENERIC_NOP1 GENERIC_NOP7 14#define GENERIC_NOP1 ".byte 0x90\n"
15#define GENERIC_NOP2 ".byte 0x89,0xf6\n"
16#define GENERIC_NOP3 ".byte 0x8d,0x76,0x00\n"
17#define GENERIC_NOP4 ".byte 0x8d,0x74,0x26,0x00\n"
18#define GENERIC_NOP5 GENERIC_NOP1 GENERIC_NOP4
19#define GENERIC_NOP6 ".byte 0x8d,0xb6,0x00,0x00,0x00,0x00\n"
20#define GENERIC_NOP7 ".byte 0x8d,0xb4,0x26,0x00,0x00,0x00,0x00\n"
21#define GENERIC_NOP8 GENERIC_NOP1 GENERIC_NOP7
15 22
16/* Opteron 64bit nops */ 23/* Opteron 64bit nops
24 1: nop
25 2: osp nop
26 3: osp osp nop
27 4: osp osp osp nop
28*/
17#define K8_NOP1 GENERIC_NOP1 29#define K8_NOP1 GENERIC_NOP1
18#define K8_NOP2 ".byte 0x66,0x90\n" 30#define K8_NOP2 ".byte 0x66,0x90\n"
19#define K8_NOP3 ".byte 0x66,0x66,0x90\n" 31#define K8_NOP3 ".byte 0x66,0x66,0x90\n"
@@ -23,19 +35,35 @@
23#define K8_NOP7 K8_NOP4 K8_NOP3 35#define K8_NOP7 K8_NOP4 K8_NOP3
24#define K8_NOP8 K8_NOP4 K8_NOP4 36#define K8_NOP8 K8_NOP4 K8_NOP4
25 37
26/* K7 nops */ 38/* K7 nops
27/* uses eax dependencies (arbitary choice) */ 39 uses eax dependencies (arbitary choice)
28#define K7_NOP1 GENERIC_NOP1 40 1: nop
41 2: movl %eax,%eax
42 3: leal (,%eax,1),%eax
43 4: leal 0x00(,%eax,1),%eax
44 6: leal 0x00000000(%eax),%eax
45 7: leal 0x00000000(,%eax,1),%eax
46*/
47#define K7_NOP1 GENERIC_NOP1
29#define K7_NOP2 ".byte 0x8b,0xc0\n" 48#define K7_NOP2 ".byte 0x8b,0xc0\n"
30#define K7_NOP3 ".byte 0x8d,0x04,0x20\n" 49#define K7_NOP3 ".byte 0x8d,0x04,0x20\n"
31#define K7_NOP4 ".byte 0x8d,0x44,0x20,0x00\n" 50#define K7_NOP4 ".byte 0x8d,0x44,0x20,0x00\n"
32#define K7_NOP5 K7_NOP4 ASM_NOP1 51#define K7_NOP5 K7_NOP4 ASM_NOP1
33#define K7_NOP6 ".byte 0x8d,0x80,0,0,0,0\n" 52#define K7_NOP6 ".byte 0x8d,0x80,0,0,0,0\n"
34#define K7_NOP7 ".byte 0x8D,0x04,0x05,0,0,0,0\n" 53#define K7_NOP7 ".byte 0x8D,0x04,0x05,0,0,0,0\n"
35#define K7_NOP8 K7_NOP7 ASM_NOP1 54#define K7_NOP8 K7_NOP7 ASM_NOP1
36 55
37/* P6 nops */ 56/* P6 nops
38/* uses eax dependencies (Intel-recommended choice) */ 57 uses eax dependencies (Intel-recommended choice)
58 1: nop
59 2: osp nop
60 3: nopl (%eax)
61 4: nopl 0x00(%eax)
62 5: nopl 0x00(%eax,%eax,1)
63 6: osp nopl 0x00(%eax,%eax,1)
64 7: nopl 0x00000000(%eax)
65 8: nopl 0x00000000(%eax,%eax,1)
66*/
39#define P6_NOP1 GENERIC_NOP1 67#define P6_NOP1 GENERIC_NOP1
40#define P6_NOP2 ".byte 0x66,0x90\n" 68#define P6_NOP2 ".byte 0x66,0x90\n"
41#define P6_NOP3 ".byte 0x0f,0x1f,0x00\n" 69#define P6_NOP3 ".byte 0x0f,0x1f,0x00\n"
@@ -63,9 +91,7 @@
63#define ASM_NOP6 K7_NOP6 91#define ASM_NOP6 K7_NOP6
64#define ASM_NOP7 K7_NOP7 92#define ASM_NOP7 K7_NOP7
65#define ASM_NOP8 K7_NOP8 93#define ASM_NOP8 K7_NOP8
66#elif defined(CONFIG_M686) || defined(CONFIG_MPENTIUMII) || \ 94#elif defined(CONFIG_X86_P6_NOP)
67 defined(CONFIG_MPENTIUMIII) || defined(CONFIG_MPENTIUMM) || \
68 defined(CONFIG_MCORE2) || defined(CONFIG_PENTIUM4)
69#define ASM_NOP1 P6_NOP1 95#define ASM_NOP1 P6_NOP1
70#define ASM_NOP2 P6_NOP2 96#define ASM_NOP2 P6_NOP2
71#define ASM_NOP3 P6_NOP3 97#define ASM_NOP3 P6_NOP3
diff --git a/include/asm-x86/page_64.h b/include/asm-x86/page_64.h
index f7393bc516ef..143546073b95 100644
--- a/include/asm-x86/page_64.h
+++ b/include/asm-x86/page_64.h
@@ -47,8 +47,12 @@
47#define __PHYSICAL_MASK_SHIFT 46 47#define __PHYSICAL_MASK_SHIFT 46
48#define __VIRTUAL_MASK_SHIFT 48 48#define __VIRTUAL_MASK_SHIFT 48
49 49
50#define KERNEL_TEXT_SIZE (40*1024*1024) 50/*
51#define KERNEL_TEXT_START _AC(0xffffffff80000000, UL) 51 * Kernel image size is limited to 128 MB (see level2_kernel_pgt in
52 * arch/x86/kernel/head_64.S), and it is mapped here:
53 */
54#define KERNEL_IMAGE_SIZE (128*1024*1024)
55#define KERNEL_IMAGE_START _AC(0xffffffff80000000, UL)
52 56
53#ifndef __ASSEMBLY__ 57#ifndef __ASSEMBLY__
54void clear_page(void *page); 58void clear_page(void *page);
diff --git a/include/asm-x86/pgtable_64.h b/include/asm-x86/pgtable_64.h
index bd4740a60f29..0a0b77bc736a 100644
--- a/include/asm-x86/pgtable_64.h
+++ b/include/asm-x86/pgtable_64.h
@@ -188,6 +188,7 @@ static inline unsigned long pmd_bad(pmd_t pmd)
188#define pgd_offset(mm, addr) ((mm)->pgd + pgd_index(addr)) 188#define pgd_offset(mm, addr) ((mm)->pgd + pgd_index(addr))
189#define pgd_offset_k(address) (init_level4_pgt + pgd_index(address)) 189#define pgd_offset_k(address) (init_level4_pgt + pgd_index(address))
190#define pgd_present(pgd) (pgd_val(pgd) & _PAGE_PRESENT) 190#define pgd_present(pgd) (pgd_val(pgd) & _PAGE_PRESENT)
191static inline int pgd_large(pgd_t pgd) { return 0; }
191#define mk_kernel_pgd(address) ((pgd_t){ (address) | _KERNPG_TABLE }) 192#define mk_kernel_pgd(address) ((pgd_t){ (address) | _KERNPG_TABLE })
192 193
193/* PUD - Level3 access */ 194/* PUD - Level3 access */
@@ -246,6 +247,7 @@ static inline int pud_large(pud_t pte)
246#define __swp_entry_to_pte(x) ((pte_t) { .pte = (x).val }) 247#define __swp_entry_to_pte(x) ((pte_t) { .pte = (x).val })
247 248
248extern int kern_addr_valid(unsigned long addr); 249extern int kern_addr_valid(unsigned long addr);
250extern void cleanup_highmap(void);
249 251
250#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ 252#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \
251 remap_pfn_range(vma, vaddr, pfn, size, prot) 253 remap_pfn_range(vma, vaddr, pfn, size, prot)
diff --git a/include/asm-x86/processor.h b/include/asm-x86/processor.h
index 149920dcd341..45a2f0ab33d0 100644
--- a/include/asm-x86/processor.h
+++ b/include/asm-x86/processor.h
@@ -302,10 +302,6 @@ union i387_union {
302}; 302};
303 303
304#ifdef CONFIG_X86_32 304#ifdef CONFIG_X86_32
305/*
306 * the following now lives in the per cpu area:
307 * extern int cpu_llc_id[NR_CPUS];
308 */
309DECLARE_PER_CPU(u8, cpu_llc_id); 305DECLARE_PER_CPU(u8, cpu_llc_id);
310#else 306#else
311DECLARE_PER_CPU(struct orig_ist, orig_ist); 307DECLARE_PER_CPU(struct orig_ist, orig_ist);
@@ -671,7 +667,6 @@ extern void init_gdt(int cpu);
671extern unsigned int machine_id; 667extern unsigned int machine_id;
672extern unsigned int machine_submodel_id; 668extern unsigned int machine_submodel_id;
673extern unsigned int BIOS_revision; 669extern unsigned int BIOS_revision;
674extern unsigned int mca_pentium_flag;
675 670
676/* Boot loader type from the setup header */ 671/* Boot loader type from the setup header */
677extern int bootloader_type; 672extern int bootloader_type;
diff --git a/include/asm-x86/ptrace-abi.h b/include/asm-x86/ptrace-abi.h
index 81a8ee4c55fc..f224eb3c3157 100644
--- a/include/asm-x86/ptrace-abi.h
+++ b/include/asm-x86/ptrace-abi.h
@@ -89,13 +89,13 @@
89*/ 89*/
90struct ptrace_bts_config { 90struct ptrace_bts_config {
91 /* requested or actual size of BTS buffer in bytes */ 91 /* requested or actual size of BTS buffer in bytes */
92 u32 size; 92 __u32 size;
93 /* bitmask of below flags */ 93 /* bitmask of below flags */
94 u32 flags; 94 __u32 flags;
95 /* buffer overflow signal */ 95 /* buffer overflow signal */
96 u32 signal; 96 __u32 signal;
97 /* actual size of bts_struct in bytes */ 97 /* actual size of bts_struct in bytes */
98 u32 bts_size; 98 __u32 bts_size;
99}; 99};
100#endif 100#endif
101 101
diff --git a/include/asm-xtensa/cacheflush.h b/include/asm-xtensa/cacheflush.h
index b773c57e75a5..94c4c53a099e 100644
--- a/include/asm-xtensa/cacheflush.h
+++ b/include/asm-xtensa/cacheflush.h
@@ -70,6 +70,8 @@ extern void __flush_invalidate_dcache_page_alias(unsigned long, unsigned long);
70#endif 70#endif
71#if (ICACHE_WAY_SIZE > PAGE_SIZE) 71#if (ICACHE_WAY_SIZE > PAGE_SIZE)
72extern void __invalidate_icache_page_alias(unsigned long, unsigned long); 72extern void __invalidate_icache_page_alias(unsigned long, unsigned long);
73#else
74# define __invalidate_icache_page_alias(v,p) do { } while(0)
73#endif 75#endif
74 76
75/* 77/*
diff --git a/include/asm-xtensa/coprocessor.h b/include/asm-xtensa/coprocessor.h
index aa2121034558..1cbcf9001a41 100644
--- a/include/asm-xtensa/coprocessor.h
+++ b/include/asm-xtensa/coprocessor.h
@@ -5,81 +5,173 @@
5 * License. See the file "COPYING" in the main directory of this archive 5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details. 6 * for more details.
7 * 7 *
8 * Copyright (C) 2003 - 2005 Tensilica Inc. 8 * Copyright (C) 2003 - 2007 Tensilica Inc.
9 */ 9 */
10 10
11
11#ifndef _XTENSA_COPROCESSOR_H 12#ifndef _XTENSA_COPROCESSOR_H
12#define _XTENSA_COPROCESSOR_H 13#define _XTENSA_COPROCESSOR_H
13 14
14#include <asm/variant/core.h> 15#include <linux/stringify.h>
15#include <asm/variant/tie.h> 16#include <asm/variant/tie.h>
17#include <asm/types.h>
18
19#ifdef __ASSEMBLY__
20# include <asm/variant/tie-asm.h>
21
22.macro xchal_sa_start a b
23 .set .Lxchal_pofs_, 0
24 .set .Lxchal_ofs_, 0
25.endm
26
27.macro xchal_sa_align ptr minofs maxofs ofsalign totalign
28 .set .Lxchal_ofs_, .Lxchal_ofs_ + .Lxchal_pofs_ + \totalign - 1
29 .set .Lxchal_ofs_, (.Lxchal_ofs_ & -\totalign) - .Lxchal_pofs_
30.endm
31
32#define _SELECT ( XTHAL_SAS_TIE | XTHAL_SAS_OPT \
33 | XTHAL_SAS_CC \
34 | XTHAL_SAS_CALR | XTHAL_SAS_CALE )
35
36.macro save_xtregs_opt ptr clb at1 at2 at3 at4 offset
37 .if XTREGS_OPT_SIZE > 0
38 addi \clb, \ptr, \offset
39 xchal_ncp_store \clb \at1 \at2 \at3 \at4 select=_SELECT
40 .endif
41.endm
42
43.macro load_xtregs_opt ptr clb at1 at2 at3 at4 offset
44 .if XTREGS_OPT_SIZE > 0
45 addi \clb, \ptr, \offset
46 xchal_ncp_load \clb \at1 \at2 \at3 \at4 select=_SELECT
47 .endif
48.endm
49#undef _SELECT
50
51#define _SELECT ( XTHAL_SAS_TIE | XTHAL_SAS_OPT \
52 | XTHAL_SAS_NOCC \
53 | XTHAL_SAS_CALR | XTHAL_SAS_CALE | XTHAL_SAS_GLOB )
54
55.macro save_xtregs_user ptr clb at1 at2 at3 at4 offset
56 .if XTREGS_USER_SIZE > 0
57 addi \clb, \ptr, \offset
58 xchal_ncp_store \clb \at1 \at2 \at3 \at4 select=_SELECT
59 .endif
60.endm
61
62.macro load_xtregs_user ptr clb at1 at2 at3 at4 offset
63 .if XTREGS_USER_SIZE > 0
64 addi \clb, \ptr, \offset
65 xchal_ncp_load \clb \at1 \at2 \at3 \at4 select=_SELECT
66 .endif
67.endm
68#undef _SELECT
69
70
71
72#endif /* __ASSEMBLY__ */
16 73
17#if !XCHAL_HAVE_CP
18
19#define XTENSA_CP_EXTRA_OFFSET 0
20#define XTENSA_CP_EXTRA_ALIGN 1 /* must be a power of 2 */
21#define XTENSA_CP_EXTRA_SIZE 0
22
23#else
24
25#define XTOFS(last_start,last_size,align) \
26 ((last_start+last_size+align-1) & -align)
27
28#define XTENSA_CP_EXTRA_OFFSET 0
29#define XTENSA_CP_EXTRA_ALIGN XCHAL_EXTRA_SA_ALIGN
30
31#define XTENSA_CPE_CP0_OFFSET \
32 XTOFS(XTENSA_CP_EXTRA_OFFSET, XCHAL_EXTRA_SA_SIZE, XCHAL_CP0_SA_ALIGN)
33#define XTENSA_CPE_CP1_OFFSET \
34 XTOFS(XTENSA_CPE_CP0_OFFSET, XCHAL_CP0_SA_SIZE, XCHAL_CP1_SA_ALIGN)
35#define XTENSA_CPE_CP2_OFFSET \
36 XTOFS(XTENSA_CPE_CP1_OFFSET, XCHAL_CP1_SA_SIZE, XCHAL_CP2_SA_ALIGN)
37#define XTENSA_CPE_CP3_OFFSET \
38 XTOFS(XTENSA_CPE_CP2_OFFSET, XCHAL_CP2_SA_SIZE, XCHAL_CP3_SA_ALIGN)
39#define XTENSA_CPE_CP4_OFFSET \
40 XTOFS(XTENSA_CPE_CP3_OFFSET, XCHAL_CP3_SA_SIZE, XCHAL_CP4_SA_ALIGN)
41#define XTENSA_CPE_CP5_OFFSET \
42 XTOFS(XTENSA_CPE_CP4_OFFSET, XCHAL_CP4_SA_SIZE, XCHAL_CP5_SA_ALIGN)
43#define XTENSA_CPE_CP6_OFFSET \
44 XTOFS(XTENSA_CPE_CP5_OFFSET, XCHAL_CP5_SA_SIZE, XCHAL_CP6_SA_ALIGN)
45#define XTENSA_CPE_CP7_OFFSET \
46 XTOFS(XTENSA_CPE_CP6_OFFSET, XCHAL_CP6_SA_SIZE, XCHAL_CP7_SA_ALIGN)
47#define XTENSA_CP_EXTRA_SIZE \
48 XTOFS(XTENSA_CPE_CP7_OFFSET, XCHAL_CP7_SA_SIZE, 16)
49
50#if XCHAL_CP_NUM > 0
51# ifndef __ASSEMBLY__
52/* 74/*
53 * Tasks that own contents of (last user) each coprocessor. 75 * XTENSA_HAVE_COPROCESSOR(x) returns 1 if coprocessor x is configured.
54 * Entries are 0 for not-owned or non-existent coprocessors. 76 *
55 * Note: The size of this structure is fixed to 8 bytes in entry.S 77 * XTENSA_HAVE_IO_PORT(x) returns 1 if io-port x is configured.
78 *
56 */ 79 */
57typedef struct {
58 struct task_struct *owner; /* owner */
59 int offset; /* offset in cpextra space. */
60} coprocessor_info_t;
61# else
62# define COPROCESSOR_INFO_OWNER 0
63# define COPROCESSOR_INFO_OFFSET 4
64# define COPROCESSOR_INFO_SIZE 8
65# endif
66#endif
67#endif /* XCHAL_HAVE_CP */
68 80
81#define XTENSA_HAVE_COPROCESSOR(x) \
82 ((XCHAL_CP_MASK ^ XCHAL_CP_PORT_MASK) & (1 << (x)))
83#define XTENSA_HAVE_COPROCESSORS \
84 (XCHAL_CP_MASK ^ XCHAL_CP_PORT_MASK)
85#define XTENSA_HAVE_IO_PORT(x) \
86 (XCHAL_CP_PORT_MASK & (1 << (x)))
87#define XTENSA_HAVE_IO_PORTS \
88 XCHAL_CP_PORT_MASK
69 89
70#ifndef __ASSEMBLY__ 90#ifndef __ASSEMBLY__
71# if XCHAL_CP_NUM > 0
72struct task_struct;
73extern void release_coprocessors (struct task_struct*);
74extern void save_coprocessor_registers(void*, int);
75# else
76# define release_coprocessors(task)
77# endif
78 91
79typedef unsigned char cp_state_t[XTENSA_CP_EXTRA_SIZE]
80 __attribute__ ((aligned (XTENSA_CP_EXTRA_ALIGN)));
81 92
82#endif /* !__ASSEMBLY__ */ 93#if XCHAL_HAVE_CP
94
95#define RSR_CPENABLE(x) do { \
96 __asm__ __volatile__("rsr %0," __stringify(CPENABLE) : "=a" (x)); \
97 } while(0);
98#define WSR_CPENABLE(x) do { \
99 __asm__ __volatile__("wsr %0," __stringify(CPENABLE) "; rsync" \
100 :: "a" (x)); \
101 } while(0);
83 102
103#endif /* XCHAL_HAVE_CP */
84 104
105
106/*
107 * Additional registers.
108 * We define three types of additional registers:
109 * ext: extra registers that are used by the compiler
110 * cpn: optional registers that can be used by a user application
111 * cpX: coprocessor registers that can only be used if the corresponding
112 * CPENABLE bit is set.
113 */
114
115#define XCHAL_SA_REG(list,cc,abi,type,y,name,z,align,size,...) \
116 __REG ## list (cc, abi, type, name, size, align)
117
118#define __REG0(cc,abi,t,name,s,a) __REG0_ ## cc (abi,name)
119#define __REG1(cc,abi,t,name,s,a) __REG1_ ## cc (name)
120#define __REG2(cc,abi,type,...) __REG2_ ## type (__VA_ARGS__)
121
122#define __REG0_0(abi,name)
123#define __REG0_1(abi,name) __REG0_1 ## abi (name)
124#define __REG0_10(name) __u32 name;
125#define __REG0_11(name) __u32 name;
126#define __REG0_12(name)
127
128#define __REG1_0(name) __u32 name;
129#define __REG1_1(name)
130
131#define __REG2_0(n,s,a) __u32 name;
132#define __REG2_1(n,s,a) unsigned char n[s] __attribute__ ((aligned(a)));
133#define __REG2_2(n,s,a) unsigned char n[s] __attribute__ ((aligned(a)));
134
135typedef struct { XCHAL_NCP_SA_LIST(0) } xtregs_opt_t
136 __attribute__ ((aligned (XCHAL_NCP_SA_ALIGN)));
137typedef struct { XCHAL_NCP_SA_LIST(1) } xtregs_user_t
138 __attribute__ ((aligned (XCHAL_NCP_SA_ALIGN)));
139
140#if XTENSA_HAVE_COPROCESSORS
141
142typedef struct { XCHAL_CP0_SA_LIST(2) } xtregs_cp0_t
143 __attribute__ ((aligned (XCHAL_CP0_SA_ALIGN)));
144typedef struct { XCHAL_CP1_SA_LIST(2) } xtregs_cp1_t
145 __attribute__ ((aligned (XCHAL_CP1_SA_ALIGN)));
146typedef struct { XCHAL_CP2_SA_LIST(2) } xtregs_cp2_t
147 __attribute__ ((aligned (XCHAL_CP2_SA_ALIGN)));
148typedef struct { XCHAL_CP3_SA_LIST(2) } xtregs_cp3_t
149 __attribute__ ((aligned (XCHAL_CP3_SA_ALIGN)));
150typedef struct { XCHAL_CP4_SA_LIST(2) } xtregs_cp4_t
151 __attribute__ ((aligned (XCHAL_CP4_SA_ALIGN)));
152typedef struct { XCHAL_CP5_SA_LIST(2) } xtregs_cp5_t
153 __attribute__ ((aligned (XCHAL_CP5_SA_ALIGN)));
154typedef struct { XCHAL_CP6_SA_LIST(2) } xtregs_cp6_t
155 __attribute__ ((aligned (XCHAL_CP6_SA_ALIGN)));
156typedef struct { XCHAL_CP7_SA_LIST(2) } xtregs_cp7_t
157 __attribute__ ((aligned (XCHAL_CP7_SA_ALIGN)));
158
159extern struct thread_info* coprocessor_owner[XCHAL_CP_MAX];
160extern void coprocessor_save(void*, int);
161extern void coprocessor_load(void*, int);
162extern void coprocessor_flush(struct thread_info*, int);
163extern void coprocessor_restore(struct thread_info*, int);
164
165extern void coprocessor_release_all(struct thread_info*);
166extern void coprocessor_flush_all(struct thread_info*);
167
168static inline void coprocessor_clear_cpenable(void)
169{
170 unsigned long i = 0;
171 WSR_CPENABLE(i);
172}
173
174#endif /* XTENSA_HAVE_COPROCESSORS */
175
176#endif /* !__ASSEMBLY__ */
85#endif /* _XTENSA_COPROCESSOR_H */ 177#endif /* _XTENSA_COPROCESSOR_H */
diff --git a/include/asm-xtensa/elf.h b/include/asm-xtensa/elf.h
index 467384542502..ca6e5101a2cb 100644
--- a/include/asm-xtensa/elf.h
+++ b/include/asm-xtensa/elf.h
@@ -72,115 +72,32 @@
72 72
73/* ELF register definitions. This is needed for core dump support. */ 73/* ELF register definitions. This is needed for core dump support. */
74 74
75/*
76 * elf_gregset_t contains the application-level state in the following order:
77 * Processor info: config_version, cpuxy
78 * Processor state: pc, ps, exccause, excvaddr, wb, ws,
79 * lbeg, lend, lcount, sar
80 * GP regs: ar0 - arXX
81 */
82
83typedef unsigned long elf_greg_t; 75typedef unsigned long elf_greg_t;
84 76
85typedef struct { 77typedef struct {
86 elf_greg_t xchal_config_id0;
87 elf_greg_t xchal_config_id1;
88 elf_greg_t cpux;
89 elf_greg_t cpuy;
90 elf_greg_t pc; 78 elf_greg_t pc;
91 elf_greg_t ps; 79 elf_greg_t ps;
92 elf_greg_t exccause;
93 elf_greg_t excvaddr;
94 elf_greg_t windowbase;
95 elf_greg_t windowstart;
96 elf_greg_t lbeg; 80 elf_greg_t lbeg;
97 elf_greg_t lend; 81 elf_greg_t lend;
98 elf_greg_t lcount; 82 elf_greg_t lcount;
99 elf_greg_t sar; 83 elf_greg_t sar;
100 elf_greg_t syscall; 84 elf_greg_t windowstart;
101 elf_greg_t ar[64]; 85 elf_greg_t windowbase;
86 elf_greg_t reserved[8+48];
87 elf_greg_t a[64];
102} xtensa_gregset_t; 88} xtensa_gregset_t;
103 89
104#define ELF_NGREG (sizeof(xtensa_gregset_t) / sizeof(elf_greg_t)) 90#define ELF_NGREG (sizeof(xtensa_gregset_t) / sizeof(elf_greg_t))
105 91
106typedef elf_greg_t elf_gregset_t[ELF_NGREG]; 92typedef elf_greg_t elf_gregset_t[ELF_NGREG];
107 93
108/* 94#define ELF_NFPREG 18
109 * Compute the size of the coprocessor and extra state layout (register info)
110 * table (in bytes).
111 * This is actually the maximum size of the table, as opposed to the size,
112 * which is available from the _xtensa_reginfo_table_size global variable.
113 *
114 * (See also arch/xtensa/kernel/coprocessor.S)
115 *
116 */
117
118#ifndef XCHAL_EXTRA_SA_CONTENTS_LIBDB_NUM
119# define XTENSA_CPE_LTABLE_SIZE 0
120#else
121# define XTENSA_CPE_SEGMENT(num) (num ? (1+num) : 0)
122# define XTENSA_CPE_LTABLE_ENTRIES \
123 ( XTENSA_CPE_SEGMENT(XCHAL_EXTRA_SA_CONTENTS_LIBDB_NUM) \
124 + XTENSA_CPE_SEGMENT(XCHAL_CP0_SA_CONTENTS_LIBDB_NUM) \
125 + XTENSA_CPE_SEGMENT(XCHAL_CP1_SA_CONTENTS_LIBDB_NUM) \
126 + XTENSA_CPE_SEGMENT(XCHAL_CP2_SA_CONTENTS_LIBDB_NUM) \
127 + XTENSA_CPE_SEGMENT(XCHAL_CP3_SA_CONTENTS_LIBDB_NUM) \
128 + XTENSA_CPE_SEGMENT(XCHAL_CP4_SA_CONTENTS_LIBDB_NUM) \
129 + XTENSA_CPE_SEGMENT(XCHAL_CP5_SA_CONTENTS_LIBDB_NUM) \
130 + XTENSA_CPE_SEGMENT(XCHAL_CP6_SA_CONTENTS_LIBDB_NUM) \
131 + XTENSA_CPE_SEGMENT(XCHAL_CP7_SA_CONTENTS_LIBDB_NUM) \
132 + 1 /* final entry */ \
133 )
134# define XTENSA_CPE_LTABLE_SIZE (XTENSA_CPE_LTABLE_ENTRIES * 8)
135#endif
136
137
138/*
139 * Instantiations of the elf_fpregset_t type contain, in most
140 * architectures, the floating point (FPU) register set.
141 * For Xtensa, this type is extended to contain all custom state,
142 * ie. coprocessor and "extra" (non-coprocessor) state (including,
143 * for example, TIE-defined states and register files; as well
144 * as other optional processor state).
145 * This includes FPU state if a floating-point coprocessor happens
146 * to have been configured within the Xtensa processor.
147 *
148 * TOTAL_FPREGS_SIZE is the required size (without rounding)
149 * of elf_fpregset_t. It provides space for the following:
150 *
151 * a) 32-bit mask of active coprocessors for this task (similar
152 * to CPENABLE in single-threaded Xtensa processor systems)
153 *
154 * b) table describing the layout of custom states (ie. of
155 * individual registers, etc) within the save areas
156 *
157 * c) save areas for each coprocessor and for non-coprocessor
158 * ("extra") state
159 *
160 * Note that save areas may require up to 16-byte alignment when
161 * accessed by save/restore sequences. We do not need to ensure
162 * such alignment in an elf_fpregset_t structure because custom
163 * state is not directly loaded/stored into it; rather, save area
164 * contents are copied to elf_fpregset_t from the active save areas
165 * (see 'struct task_struct' definition in processor.h for that)
166 * using memcpy(). But we do allow space for such alignment,
167 * to allow optimizations of layout and copying.
168 */
169#if 0
170#define TOTAL_FPREGS_SIZE \
171 (4 + XTENSA_CPE_LTABLE_SIZE + XTENSA_CP_EXTRA_SIZE)
172#define ELF_NFPREG \
173 ((TOTAL_FPREGS_SIZE + sizeof(elf_fpreg_t) - 1) / sizeof(elf_fpreg_t))
174#else
175#define TOTAL_FPREGS_SIZE 0
176#define ELF_NFPREG 0
177#endif
178 95
179typedef unsigned int elf_fpreg_t; 96typedef unsigned int elf_fpreg_t;
180typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; 97typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
181 98
182#define ELF_CORE_COPY_REGS(_eregs, _pregs) \ 99#define ELF_CORE_COPY_REGS(_eregs, _pregs) \
183 xtensa_elf_core_copy_regs (&_eregs, _pregs); 100 xtensa_elf_core_copy_regs ((xtensa_gregset_t*)&(_eregs), _pregs);
184 101
185extern void xtensa_elf_core_copy_regs (xtensa_gregset_t *, struct pt_regs *); 102extern void xtensa_elf_core_copy_regs (xtensa_gregset_t *, struct pt_regs *);
186 103
@@ -257,6 +174,21 @@ extern void xtensa_elf_core_copy_regs (xtensa_gregset_t *, struct pt_regs *);
257 _r->areg[12]=0; _r->areg[13]=0; _r->areg[14]=0; _r->areg[15]=0; \ 174 _r->areg[12]=0; _r->areg[13]=0; _r->areg[14]=0; _r->areg[15]=0; \
258 } while (0) 175 } while (0)
259 176
177typedef struct {
178 xtregs_opt_t opt;
179 xtregs_user_t user;
180#if XTENSA_HAVE_COPROCESSORS
181 xtregs_cp0_t cp0;
182 xtregs_cp1_t cp1;
183 xtregs_cp2_t cp2;
184 xtregs_cp3_t cp3;
185 xtregs_cp4_t cp4;
186 xtregs_cp5_t cp5;
187 xtregs_cp6_t cp6;
188 xtregs_cp7_t cp7;
189#endif
190} elf_xtregs_t;
191
260#define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX_32BIT) 192#define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX_32BIT)
261 193
262struct task_struct; 194struct task_struct;
diff --git a/include/asm-xtensa/module.h b/include/asm-xtensa/module.h
index ffb25bfdf6a1..d9b34bee4d42 100644
--- a/include/asm-xtensa/module.h
+++ b/include/asm-xtensa/module.h
@@ -15,9 +15,11 @@
15 15
16struct mod_arch_specific 16struct mod_arch_specific
17{ 17{
18 /* Module support is not completely implemented. */ 18 /* No special elements, yet. */
19}; 19};
20 20
21#define MODULE_ARCH_VERMAGIC "xtensa-" __stringify(XCHAL_CORE_ID) " "
22
21#define Elf_Shdr Elf32_Shdr 23#define Elf_Shdr Elf32_Shdr
22#define Elf_Sym Elf32_Sym 24#define Elf_Sym Elf32_Sym
23#define Elf_Ehdr Elf32_Ehdr 25#define Elf_Ehdr Elf32_Ehdr
diff --git a/include/asm-xtensa/pgalloc.h b/include/asm-xtensa/pgalloc.h
index 8d1544eb461e..4f4a7987eded 100644
--- a/include/asm-xtensa/pgalloc.h
+++ b/include/asm-xtensa/pgalloc.h
@@ -47,7 +47,7 @@ static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
47 return kmem_cache_alloc(pgtable_cache, GFP_KERNEL|__GFP_REPEAT); 47 return kmem_cache_alloc(pgtable_cache, GFP_KERNEL|__GFP_REPEAT);
48} 48}
49 49
50static inline pte_token_t pte_alloc_one(struct mm_struct *mm, 50static inline pgtable_t pte_alloc_one(struct mm_struct *mm,
51 unsigned long addr) 51 unsigned long addr)
52{ 52{
53 struct page *page; 53 struct page *page;
diff --git a/include/asm-xtensa/pgtable.h b/include/asm-xtensa/pgtable.h
index c0fcc1c9660c..c8b024a48b4d 100644
--- a/include/asm-xtensa/pgtable.h
+++ b/include/asm-xtensa/pgtable.h
@@ -66,11 +66,9 @@
66 */ 66 */
67 67
68#define VMALLOC_START 0xC0000000 68#define VMALLOC_START 0xC0000000
69#define VMALLOC_END 0xC6FEFFFF 69#define VMALLOC_END 0xC7FEFFFF
70#define TLBTEMP_BASE_1 0xC6FF0000 70#define TLBTEMP_BASE_1 0xC7FF0000
71#define TLBTEMP_BASE_2 0xC6FF8000 71#define TLBTEMP_BASE_2 0xC7FF8000
72#define MODULE_START 0xC7000000
73#define MODULE_END 0xC7FFFFFF
74 72
75/* 73/*
76 * Xtensa Linux config PTE layout (when present): 74 * Xtensa Linux config PTE layout (when present):
diff --git a/include/asm-xtensa/processor.h b/include/asm-xtensa/processor.h
index 96408f436624..4918a4e96d42 100644
--- a/include/asm-xtensa/processor.h
+++ b/include/asm-xtensa/processor.h
@@ -103,10 +103,6 @@ struct thread_struct {
103 unsigned long dbreaka[XCHAL_NUM_DBREAK]; 103 unsigned long dbreaka[XCHAL_NUM_DBREAK];
104 unsigned long dbreakc[XCHAL_NUM_DBREAK]; 104 unsigned long dbreakc[XCHAL_NUM_DBREAK];
105 105
106 /* Allocate storage for extra state and coprocessor state. */
107 unsigned char cp_save[XTENSA_CP_EXTRA_SIZE]
108 __attribute__ ((aligned(XTENSA_CP_EXTRA_ALIGN)));
109
110 /* Make structure 16 bytes aligned. */ 106 /* Make structure 16 bytes aligned. */
111 int align[0] __attribute__ ((aligned(16))); 107 int align[0] __attribute__ ((aligned(16)));
112}; 108};
@@ -162,21 +158,16 @@ struct thread_struct {
162struct task_struct; 158struct task_struct;
163struct mm_struct; 159struct mm_struct;
164 160
165// FIXME: do we need release_thread for CP??
166/* Free all resources held by a thread. */ 161/* Free all resources held by a thread. */
167#define release_thread(thread) do { } while(0) 162#define release_thread(thread) do { } while(0)
168 163
169// FIXME: do we need prepare_to_copy (lazy status) for CP??
170/* Prepare to copy thread state - unlazy all lazy status */ 164/* Prepare to copy thread state - unlazy all lazy status */
171#define prepare_to_copy(tsk) do { } while (0) 165extern void prepare_to_copy(struct task_struct*);
172 166
173/* 167/* Create a kernel thread without removing it from tasklists */
174 * create a kernel thread without removing it from tasklists
175 */
176extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); 168extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
177 169
178/* Copy and release all segment info associated with a VM */ 170/* Copy and release all segment info associated with a VM */
179
180#define copy_segments(p, mm) do { } while(0) 171#define copy_segments(p, mm) do { } while(0)
181#define release_segments(mm) do { } while(0) 172#define release_segments(mm) do { } while(0)
182#define forget_segments() do { } while (0) 173#define forget_segments() do { } while (0)
diff --git a/include/asm-xtensa/ptrace.h b/include/asm-xtensa/ptrace.h
index 77ff02d307bb..422c73e26937 100644
--- a/include/asm-xtensa/ptrace.h
+++ b/include/asm-xtensa/ptrace.h
@@ -53,33 +53,30 @@
53 53
54/* Registers used by strace */ 54/* Registers used by strace */
55 55
56#define REG_A_BASE 0xfc000000 56#define REG_A_BASE 0x0000
57#define REG_AR_BASE 0x04000000 57#define REG_AR_BASE 0x0100
58#define REG_PC 0x14000000 58#define REG_PC 0x0020
59#define REG_PS 0x080000e6 59#define REG_PS 0x02e6
60#define REG_WB 0x08000048 60#define REG_WB 0x0248
61#define REG_WS 0x08000049 61#define REG_WS 0x0249
62#define REG_LBEG 0x08000000 62#define REG_LBEG 0x0200
63#define REG_LEND 0x08000001 63#define REG_LEND 0x0201
64#define REG_LCOUNT 0x08000002 64#define REG_LCOUNT 0x0202
65#define REG_SAR 0x08000003 65#define REG_SAR 0x0203
66#define REG_DEPC 0x080000c0 66
67#define REG_EXCCAUSE 0x080000e8 67#define SYSCALL_NR 0x00ff
68#define REG_EXCVADDR 0x080000ee
69#define SYSCALL_NR 0x1
70
71#define AR_REGNO_TO_A_REGNO(ar, wb) (ar - wb*4) & ~(XCHAL_NUM_AREGS - 1)
72 68
73/* Other PTRACE_ values defined in <linux/ptrace.h> using values 0-9,16,17,24 */ 69/* Other PTRACE_ values defined in <linux/ptrace.h> using values 0-9,16,17,24 */
74 70
75#define PTRACE_GETREGS 12 71#define PTRACE_GETREGS 12
76#define PTRACE_SETREGS 13 72#define PTRACE_SETREGS 13
77#define PTRACE_GETFPREGS 14 73#define PTRACE_GETXTREGS 18
78#define PTRACE_SETFPREGS 15 74#define PTRACE_SETXTREGS 19
79#define PTRACE_GETFPREGSIZE 18
80 75
81#ifndef __ASSEMBLY__ 76#ifndef __ASSEMBLY__
82 77
78#ifdef __KERNEL__
79
83/* 80/*
84 * This struct defines the way the registers are stored on the 81 * This struct defines the way the registers are stored on the
85 * kernel stack during a system call or other kernel entry. 82 * kernel stack during a system call or other kernel entry.
@@ -102,6 +99,9 @@ struct pt_regs {
102 unsigned long icountlevel; /* 60 */ 99 unsigned long icountlevel; /* 60 */
103 int reserved[1]; /* 64 */ 100 int reserved[1]; /* 64 */
104 101
102 /* Additional configurable registers that are used by the compiler. */
103 xtregs_opt_t xtregs_opt;
104
105 /* Make sure the areg field is 16 bytes aligned. */ 105 /* Make sure the areg field is 16 bytes aligned. */
106 int align[0] __attribute__ ((aligned(16))); 106 int align[0] __attribute__ ((aligned(16)));
107 107
@@ -111,8 +111,6 @@ struct pt_regs {
111 unsigned long areg[16]; /* 128 (64) */ 111 unsigned long areg[16]; /* 128 (64) */
112}; 112};
113 113
114#ifdef __KERNEL__
115
116#include <asm/variant/core.h> 114#include <asm/variant/core.h>
117 115
118# define task_pt_regs(tsk) ((struct pt_regs*) \ 116# define task_pt_regs(tsk) ((struct pt_regs*) \
diff --git a/include/asm-xtensa/regs.h b/include/asm-xtensa/regs.h
index c913d259faaa..d4baed246928 100644
--- a/include/asm-xtensa/regs.h
+++ b/include/asm-xtensa/regs.h
@@ -100,7 +100,14 @@
100#define EXCCAUSE_DTLB_SIZE_RESTRICTION 27 100#define EXCCAUSE_DTLB_SIZE_RESTRICTION 27
101#define EXCCAUSE_LOAD_CACHE_ATTRIBUTE 28 101#define EXCCAUSE_LOAD_CACHE_ATTRIBUTE 28
102#define EXCCAUSE_STORE_CACHE_ATTRIBUTE 29 102#define EXCCAUSE_STORE_CACHE_ATTRIBUTE 29
103#define EXCCAUSE_FLOATING_POINT 40 103#define EXCCAUSE_COPROCESSOR0_DISABLED 32
104#define EXCCAUSE_COPROCESSOR1_DISABLED 33
105#define EXCCAUSE_COPROCESSOR2_DISABLED 34
106#define EXCCAUSE_COPROCESSOR3_DISABLED 35
107#define EXCCAUSE_COPROCESSOR4_DISABLED 36
108#define EXCCAUSE_COPROCESSOR5_DISABLED 37
109#define EXCCAUSE_COPROCESSOR6_DISABLED 38
110#define EXCCAUSE_COPROCESSOR7_DISABLED 39
104 111
105/* PS register fields. */ 112/* PS register fields. */
106 113
diff --git a/include/asm-xtensa/sigcontext.h b/include/asm-xtensa/sigcontext.h
index e3381cee5059..03383af8c3b7 100644
--- a/include/asm-xtensa/sigcontext.h
+++ b/include/asm-xtensa/sigcontext.h
@@ -13,9 +13,6 @@
13 13
14 14
15struct sigcontext { 15struct sigcontext {
16 unsigned long oldmask;
17
18 /* CPU registers */
19 unsigned long sc_pc; 16 unsigned long sc_pc;
20 unsigned long sc_ps; 17 unsigned long sc_ps;
21 unsigned long sc_lbeg; 18 unsigned long sc_lbeg;
@@ -25,6 +22,7 @@ struct sigcontext {
25 unsigned long sc_acclo; 22 unsigned long sc_acclo;
26 unsigned long sc_acchi; 23 unsigned long sc_acchi;
27 unsigned long sc_a[16]; 24 unsigned long sc_a[16];
25 void *sc_xtregs;
28}; 26};
29 27
30#endif /* _XTENSA_SIGCONTEXT_H */ 28#endif /* _XTENSA_SIGCONTEXT_H */
diff --git a/include/asm-xtensa/stat.h b/include/asm-xtensa/stat.h
index 149f4bce092f..c4992038cee0 100644
--- a/include/asm-xtensa/stat.h
+++ b/include/asm-xtensa/stat.h
@@ -5,25 +5,23 @@
5 * License. See the file "COPYING" in the main directory of this archive 5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details. 6 * for more details.
7 * 7 *
8 * Copyright (C) 2001 - 2005 Tensilica Inc. 8 * Copyright (C) 2001 - 2007 Tensilica Inc.
9 */ 9 */
10 10
11#ifndef _XTENSA_STAT_H 11#ifndef _XTENSA_STAT_H
12#define _XTENSA_STAT_H 12#define _XTENSA_STAT_H
13 13
14#include <linux/types.h>
15
16#define STAT_HAVE_NSEC 1 14#define STAT_HAVE_NSEC 1
17 15
18struct stat { 16struct stat {
19 unsigned long st_dev; 17 unsigned long st_dev;
20 ino_t st_ino; 18 unsigned long st_ino;
21 mode_t st_mode; 19 unsigned int st_mode;
22 nlink_t st_nlink; 20 unsigned int st_nlink;
23 uid_t st_uid; 21 unsigned int st_uid;
24 gid_t st_gid; 22 unsigned int st_gid;
25 unsigned int st_rdev; 23 unsigned long st_rdev;
26 off_t st_size; 24 long st_size;
27 unsigned long st_blksize; 25 unsigned long st_blksize;
28 unsigned long st_blocks; 26 unsigned long st_blocks;
29 unsigned long st_atime; 27 unsigned long st_atime;
@@ -36,8 +34,6 @@ struct stat {
36 unsigned long __unused5; 34 unsigned long __unused5;
37}; 35};
38 36
39/* This matches struct stat64 in glibc-2.3 */
40
41struct stat64 { 37struct stat64 {
42 unsigned long long st_dev; /* Device */ 38 unsigned long long st_dev; /* Device */
43 unsigned long long st_ino; /* File serial number */ 39 unsigned long long st_ino; /* File serial number */
@@ -47,20 +43,14 @@ struct stat64 {
47 unsigned int st_gid; /* Group ID of the file's group. */ 43 unsigned int st_gid; /* Group ID of the file's group. */
48 unsigned long long st_rdev; /* Device number, if device. */ 44 unsigned long long st_rdev; /* Device number, if device. */
49 long long st_size; /* Size of file, in bytes. */ 45 long long st_size; /* Size of file, in bytes. */
50 long st_blksize; /* Optimal block size for I/O. */ 46 unsigned long st_blksize; /* Optimal block size for I/O. */
51 unsigned long __unused2; 47 unsigned long __unused2;
52#ifdef __XTENSA_EB__ 48 unsigned long long st_blocks; /* Number 512-byte blocks allocated. */
53 unsigned long __unused3; 49 unsigned long st_atime; /* Time of last access. */
54 long st_blocks; /* Number 512-byte blocks allocated. */
55#else
56 long st_blocks; /* Number 512-byte blocks allocated. */
57 unsigned long __unused3;
58#endif
59 long st_atime; /* Time of last access. */
60 unsigned long st_atime_nsec; 50 unsigned long st_atime_nsec;
61 long st_mtime; /* Time of last modification. */ 51 unsigned long st_mtime; /* Time of last modification. */
62 unsigned long st_mtime_nsec; 52 unsigned long st_mtime_nsec;
63 long st_ctime; /* Time of last status change. */ 53 unsigned long st_ctime; /* Time of last status change. */
64 unsigned long st_ctime_nsec; 54 unsigned long st_ctime_nsec;
65 unsigned long __unused4; 55 unsigned long __unused4;
66 unsigned long __unused5; 56 unsigned long __unused5;
diff --git a/include/asm-xtensa/system.h b/include/asm-xtensa/system.h
index e0cb9116d8ab..62b1e8f3c13c 100644
--- a/include/asm-xtensa/system.h
+++ b/include/asm-xtensa/system.h
@@ -46,42 +46,6 @@ static inline int irqs_disabled(void)
46 return flags & 0xf; 46 return flags & 0xf;
47} 47}
48 48
49#define RSR_CPENABLE(x) do { \
50 __asm__ __volatile__("rsr %0," __stringify(CPENABLE) : "=a" (x)); \
51 } while(0);
52#define WSR_CPENABLE(x) do { \
53 __asm__ __volatile__("wsr %0," __stringify(CPENABLE)";rsync" \
54 :: "a" (x));} while(0);
55
56#define clear_cpenable() __clear_cpenable()
57
58static inline void __clear_cpenable(void)
59{
60#if XCHAL_HAVE_CP
61 unsigned long i = 0;
62 WSR_CPENABLE(i);
63#endif
64}
65
66static inline void enable_coprocessor(int i)
67{
68#if XCHAL_HAVE_CP
69 int cp;
70 RSR_CPENABLE(cp);
71 cp |= 1 << i;
72 WSR_CPENABLE(cp);
73#endif
74}
75
76static inline void disable_coprocessor(int i)
77{
78#if XCHAL_HAVE_CP
79 int cp;
80 RSR_CPENABLE(cp);
81 cp &= ~(1 << i);
82 WSR_CPENABLE(cp);
83#endif
84}
85 49
86#define smp_read_barrier_depends() do { } while(0) 50#define smp_read_barrier_depends() do { } while(0)
87#define read_barrier_depends() do { } while(0) 51#define read_barrier_depends() do { } while(0)
@@ -111,7 +75,6 @@ extern void *_switch_to(void *last, void *next);
111 75
112#define switch_to(prev,next,last) \ 76#define switch_to(prev,next,last) \
113do { \ 77do { \
114 clear_cpenable(); \
115 (last) = _switch_to(prev, next); \ 78 (last) = _switch_to(prev, next); \
116} while(0) 79} while(0)
117 80
@@ -244,7 +207,7 @@ static inline void spill_registers(void)
244 "wsr a13," __stringify(SAR) "\n\t" 207 "wsr a13," __stringify(SAR) "\n\t"
245 "wsr a14," __stringify(PS) "\n\t" 208 "wsr a14," __stringify(PS) "\n\t"
246 :: "a" (&a0), "a" (&ps) 209 :: "a" (&a0), "a" (&ps)
247 : "a2", "a3", "a12", "a13", "a14", "a15", "memory"); 210 : "a2", "a3", "a4", "a7", "a11", "a12", "a13", "a14", "a15", "memory");
248} 211}
249 212
250#define arch_align_stack(x) (x) 213#define arch_align_stack(x) (x)
diff --git a/include/asm-xtensa/thread_info.h b/include/asm-xtensa/thread_info.h
index 52c958285bcb..a2c640682ed9 100644
--- a/include/asm-xtensa/thread_info.h
+++ b/include/asm-xtensa/thread_info.h
@@ -27,6 +27,21 @@
27 27
28#ifndef __ASSEMBLY__ 28#ifndef __ASSEMBLY__
29 29
30#if XTENSA_HAVE_COPROCESSORS
31
32typedef struct xtregs_coprocessor {
33 xtregs_cp0_t cp0;
34 xtregs_cp1_t cp1;
35 xtregs_cp2_t cp2;
36 xtregs_cp3_t cp3;
37 xtregs_cp4_t cp4;
38 xtregs_cp5_t cp5;
39 xtregs_cp6_t cp6;
40 xtregs_cp7_t cp7;
41} xtregs_coprocessor_t;
42
43#endif
44
30struct thread_info { 45struct thread_info {
31 struct task_struct *task; /* main task structure */ 46 struct task_struct *task; /* main task structure */
32 struct exec_domain *exec_domain; /* execution domain */ 47 struct exec_domain *exec_domain; /* execution domain */
@@ -38,7 +53,13 @@ struct thread_info {
38 mm_segment_t addr_limit; /* thread address space */ 53 mm_segment_t addr_limit; /* thread address space */
39 struct restart_block restart_block; 54 struct restart_block restart_block;
40 55
56 unsigned long cpenable;
41 57
58 /* Allocate storage for extra user states and coprocessor states. */
59#if XTENSA_HAVE_COPROCESSORS
60 xtregs_coprocessor_t xtregs_cp;
61#endif
62 xtregs_user_t xtregs_user;
42}; 63};
43 64
44#else /* !__ASSEMBLY__ */ 65#else /* !__ASSEMBLY__ */
diff --git a/include/asm-xtensa/timex.h b/include/asm-xtensa/timex.h
index a5fca59fba9e..b83a8181d448 100644
--- a/include/asm-xtensa/timex.h
+++ b/include/asm-xtensa/timex.h
@@ -63,10 +63,10 @@ extern cycles_t cacheflush_time;
63 * Register access. 63 * Register access.
64 */ 64 */
65 65
66#define WSR_CCOUNT(r) __asm__("wsr %0,"__stringify(CCOUNT) :: "a" (r)) 66#define WSR_CCOUNT(r) asm volatile ("wsr %0,"__stringify(CCOUNT) :: "a" (r))
67#define RSR_CCOUNT(r) __asm__("rsr %0,"__stringify(CCOUNT) : "=a" (r)) 67#define RSR_CCOUNT(r) asm volatile ("rsr %0,"__stringify(CCOUNT) : "=a" (r))
68#define WSR_CCOMPARE(x,r) __asm__("wsr %0,"__stringify(CCOMPARE)"+"__stringify(x) :: "a"(r)) 68#define WSR_CCOMPARE(x,r) asm volatile ("wsr %0,"__stringify(CCOMPARE)"+"__stringify(x) :: "a"(r))
69#define RSR_CCOMPARE(x,r) __asm__("rsr %0,"__stringify(CCOMPARE)"+"__stringify(x) : "=a"(r)) 69#define RSR_CCOMPARE(x,r) asm volatile ("rsr %0,"__stringify(CCOMPARE)"+"__stringify(x) : "=a"(r))
70 70
71static inline unsigned long get_ccount (void) 71static inline unsigned long get_ccount (void)
72{ 72{
diff --git a/include/asm-xtensa/uaccess.h b/include/asm-xtensa/uaccess.h
index d6352da05b10..b8528426ab1f 100644
--- a/include/asm-xtensa/uaccess.h
+++ b/include/asm-xtensa/uaccess.h
@@ -26,6 +26,7 @@
26#include <asm/current.h> 26#include <asm/current.h>
27#include <asm/asm-offsets.h> 27#include <asm/asm-offsets.h>
28#include <asm/processor.h> 28#include <asm/processor.h>
29#include <asm/types.h>
29 30
30/* 31/*
31 * These assembly macros mirror the C macros that follow below. They 32 * These assembly macros mirror the C macros that follow below. They
@@ -118,7 +119,7 @@
118 * <at> destroyed (actually, (TASK_SIZE + 1 - size)) 119 * <at> destroyed (actually, (TASK_SIZE + 1 - size))
119 */ 120 */
120 .macro user_ok aa, as, at, error 121 .macro user_ok aa, as, at, error
121 movi \at, (TASK_SIZE+1) 122 movi \at, __XTENSA_UL_CONST(TASK_SIZE)
122 bgeu \as, \at, \error 123 bgeu \as, \at, \error
123 sub \at, \at, \as 124 sub \at, \at, \as
124 bgeu \aa, \at, \error 125 bgeu \aa, \at, \error
@@ -226,20 +227,21 @@ extern long __put_user_bad(void);
226 __pu_err; \ 227 __pu_err; \
227}) 228})
228 229
229#define __put_user_size(x,ptr,size,retval) \ 230#define __put_user_size(x,ptr,size,retval) \
230do { \ 231do { \
231 retval = 0; \ 232 int __cb; \
232 switch (size) { \ 233 retval = 0; \
233 case 1: __put_user_asm(x,ptr,retval,1,"s8i"); break; \ 234 switch (size) { \
234 case 2: __put_user_asm(x,ptr,retval,2,"s16i"); break; \ 235 case 1: __put_user_asm(x,ptr,retval,1,"s8i",__cb); break; \
235 case 4: __put_user_asm(x,ptr,retval,4,"s32i"); break; \ 236 case 2: __put_user_asm(x,ptr,retval,2,"s16i",__cb); break; \
236 case 8: { \ 237 case 4: __put_user_asm(x,ptr,retval,4,"s32i",__cb); break; \
237 __typeof__(*ptr) __v64 = x; \ 238 case 8: { \
238 retval = __copy_to_user(ptr,&__v64,8); \ 239 __typeof__(*ptr) __v64 = x; \
239 break; \ 240 retval = __copy_to_user(ptr,&__v64,8); \
240 } \ 241 break; \
241 default: __put_user_bad(); \ 242 } \
242 } \ 243 default: __put_user_bad(); \
244 } \
243} while (0) 245} while (0)
244 246
245 247
@@ -267,14 +269,14 @@ do { \
267#define __check_align_1 "" 269#define __check_align_1 ""
268 270
269#define __check_align_2 \ 271#define __check_align_2 \
270 " _bbci.l %2, 0, 1f \n" \ 272 " _bbci.l %3, 0, 1f \n" \
271 " movi %0, %3 \n" \ 273 " movi %0, %4 \n" \
272 " _j 2f \n" 274 " _j 2f \n"
273 275
274#define __check_align_4 \ 276#define __check_align_4 \
275 " _bbsi.l %2, 0, 0f \n" \ 277 " _bbsi.l %3, 0, 0f \n" \
276 " _bbci.l %2, 1, 1f \n" \ 278 " _bbci.l %3, 1, 1f \n" \
277 "0: movi %0, %3 \n" \ 279 "0: movi %0, %4 \n" \
278 " _j 2f \n" 280 " _j 2f \n"
279 281
280 282
@@ -286,24 +288,24 @@ do { \
286 * WARNING: If you modify this macro at all, verify that the 288 * WARNING: If you modify this macro at all, verify that the
287 * __check_align_* macros still work. 289 * __check_align_* macros still work.
288 */ 290 */
289#define __put_user_asm(x, addr, err, align, insn) \ 291#define __put_user_asm(x, addr, err, align, insn, cb) \
290 __asm__ __volatile__( \ 292 __asm__ __volatile__( \
291 __check_align_##align \ 293 __check_align_##align \
292 "1: "insn" %1, %2, 0 \n" \ 294 "1: "insn" %2, %3, 0 \n" \
293 "2: \n" \ 295 "2: \n" \
294 " .section .fixup,\"ax\" \n" \ 296 " .section .fixup,\"ax\" \n" \
295 " .align 4 \n" \ 297 " .align 4 \n" \
296 "4: \n" \ 298 "4: \n" \
297 " .long 2b \n" \ 299 " .long 2b \n" \
298 "5: \n" \ 300 "5: \n" \
299 " l32r %2, 4b \n" \ 301 " l32r %1, 4b \n" \
300 " movi %0, %3 \n" \ 302 " movi %0, %4 \n" \
301 " jx %2 \n" \ 303 " jx %1 \n" \
302 " .previous \n" \ 304 " .previous \n" \
303 " .section __ex_table,\"a\" \n" \ 305 " .section __ex_table,\"a\" \n" \
304 " .long 1b, 5b \n" \ 306 " .long 1b, 5b \n" \
305 " .previous" \ 307 " .previous" \
306 :"=r" (err) \ 308 :"=r" (err), "=r" (cb) \
307 :"r" ((int)(x)), "r" (addr), "i" (-EFAULT), "0" (err)) 309 :"r" ((int)(x)), "r" (addr), "i" (-EFAULT), "0" (err))
308 310
309#define __get_user_nocheck(x,ptr,size) \ 311#define __get_user_nocheck(x,ptr,size) \
@@ -328,11 +330,12 @@ extern long __get_user_bad(void);
328 330
329#define __get_user_size(x,ptr,size,retval) \ 331#define __get_user_size(x,ptr,size,retval) \
330do { \ 332do { \
333 int __cb; \
331 retval = 0; \ 334 retval = 0; \
332 switch (size) { \ 335 switch (size) { \
333 case 1: __get_user_asm(x,ptr,retval,1,"l8ui"); break; \ 336 case 1: __get_user_asm(x,ptr,retval,1,"l8ui",__cb); break; \
334 case 2: __get_user_asm(x,ptr,retval,2,"l16ui"); break; \ 337 case 2: __get_user_asm(x,ptr,retval,2,"l16ui",__cb); break; \
335 case 4: __get_user_asm(x,ptr,retval,4,"l32i"); break; \ 338 case 4: __get_user_asm(x,ptr,retval,4,"l32i",__cb); break; \
336 case 8: retval = __copy_from_user(&x,ptr,8); break; \ 339 case 8: retval = __copy_from_user(&x,ptr,8); break; \
337 default: (x) = __get_user_bad(); \ 340 default: (x) = __get_user_bad(); \
338 } \ 341 } \
@@ -343,25 +346,25 @@ do { \
343 * WARNING: If you modify this macro at all, verify that the 346 * WARNING: If you modify this macro at all, verify that the
344 * __check_align_* macros still work. 347 * __check_align_* macros still work.
345 */ 348 */
346#define __get_user_asm(x, addr, err, align, insn) \ 349#define __get_user_asm(x, addr, err, align, insn, cb) \
347 __asm__ __volatile__( \ 350 __asm__ __volatile__( \
348 __check_align_##align \ 351 __check_align_##align \
349 "1: "insn" %1, %2, 0 \n" \ 352 "1: "insn" %2, %3, 0 \n" \
350 "2: \n" \ 353 "2: \n" \
351 " .section .fixup,\"ax\" \n" \ 354 " .section .fixup,\"ax\" \n" \
352 " .align 4 \n" \ 355 " .align 4 \n" \
353 "4: \n" \ 356 "4: \n" \
354 " .long 2b \n" \ 357 " .long 2b \n" \
355 "5: \n" \ 358 "5: \n" \
356 " l32r %2, 4b \n" \ 359 " l32r %1, 4b \n" \
357 " movi %1, 0 \n" \ 360 " movi %2, 0 \n" \
358 " movi %0, %3 \n" \ 361 " movi %0, %4 \n" \
359 " jx %2 \n" \ 362 " jx %1 \n" \
360 " .previous \n" \ 363 " .previous \n" \
361 " .section __ex_table,\"a\" \n" \ 364 " .section __ex_table,\"a\" \n" \
362 " .long 1b, 5b \n" \ 365 " .long 1b, 5b \n" \
363 " .previous" \ 366 " .previous" \
364 :"=r" (err), "=r" (x) \ 367 :"=r" (err), "=r" (cb), "=r" (x) \
365 :"r" (addr), "i" (-EFAULT), "0" (err)) 368 :"r" (addr), "i" (-EFAULT), "0" (err))
366 369
367 370
diff --git a/include/asm-xtensa/variant-fsf/tie-asm.h b/include/asm-xtensa/variant-fsf/tie-asm.h
new file mode 100644
index 000000000000..68a73bf4ffc5
--- /dev/null
+++ b/include/asm-xtensa/variant-fsf/tie-asm.h
@@ -0,0 +1,70 @@
1/*
2 * This header file contains assembly-language definitions (assembly
3 * macros, etc.) for this specific Xtensa processor's TIE extensions
4 * and options. It is customized to this Xtensa processor configuration.
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 *
10 * Copyright (C) 1999-2008 Tensilica Inc.
11 */
12
13#ifndef _XTENSA_CORE_TIE_ASM_H
14#define _XTENSA_CORE_TIE_ASM_H
15
16/* Selection parameter values for save-area save/restore macros: */
17/* Option vs. TIE: */
18#define XTHAL_SAS_TIE 0x0001 /* custom extension or coprocessor */
19#define XTHAL_SAS_OPT 0x0002 /* optional (and not a coprocessor) */
20/* Whether used automatically by compiler: */
21#define XTHAL_SAS_NOCC 0x0004 /* not used by compiler w/o special opts/code */
22#define XTHAL_SAS_CC 0x0008 /* used by compiler without special opts/code */
23/* ABI handling across function calls: */
24#define XTHAL_SAS_CALR 0x0010 /* caller-saved */
25#define XTHAL_SAS_CALE 0x0020 /* callee-saved */
26#define XTHAL_SAS_GLOB 0x0040 /* global across function calls (in thread) */
27/* Misc */
28#define XTHAL_SAS_ALL 0xFFFF /* include all default NCP contents */
29
30
31
32/* Macro to save all non-coprocessor (extra) custom TIE and optional state
33 * (not including zero-overhead loop registers).
34 * Save area ptr (clobbered): ptr (1 byte aligned)
35 * Scratch regs (clobbered): at1..at4 (only first XCHAL_NCP_NUM_ATMPS needed)
36 */
37 .macro xchal_ncp_store ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL
38 xchal_sa_start \continue, \ofs
39 .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_GLOB) & ~\select
40 xchal_sa_align \ptr, 0, 1024-4, 4, 4
41 rur \at1, THREADPTR // threadptr option
42 s32i \at1, \ptr, .Lxchal_ofs_ + 0
43 .set .Lxchal_ofs_, .Lxchal_ofs_ + 4
44 .endif
45 .endm // xchal_ncp_store
46
47/* Macro to save all non-coprocessor (extra) custom TIE and optional state
48 * (not including zero-overhead loop registers).
49 * Save area ptr (clobbered): ptr (1 byte aligned)
50 * Scratch regs (clobbered): at1..at4 (only first XCHAL_NCP_NUM_ATMPS needed)
51 */
52 .macro xchal_ncp_load ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL
53 xchal_sa_start \continue, \ofs
54 .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_GLOB) & ~\select
55 xchal_sa_align \ptr, 0, 1024-4, 4, 4
56 l32i \at1, \ptr, .Lxchal_ofs_ + 0
57 wur \at1, THREADPTR // threadptr option
58 .set .Lxchal_ofs_, .Lxchal_ofs_ + 4
59 .endif
60 .endm // xchal_ncp_load
61
62
63
64#define XCHAL_NCP_NUM_ATMPS 1
65
66
67#define XCHAL_SA_NUM_ATMPS 1
68
69#endif /*_XTENSA_CORE_TIE_ASM_H*/
70
diff --git a/include/asm-xtensa/variant-fsf/tie.h b/include/asm-xtensa/variant-fsf/tie.h
index a73c71664918..bf4020116df5 100644
--- a/include/asm-xtensa/variant-fsf/tie.h
+++ b/include/asm-xtensa/variant-fsf/tie.h
@@ -1,22 +1,77 @@
1/* 1/*
2 * Xtensa processor core configuration information. 2 * This header file describes this specific Xtensa processor's TIE extensions
3 * that extend basic Xtensa core functionality. It is customized to this
4 * Xtensa processor configuration.
3 * 5 *
4 * This file is subject to the terms and conditions of the GNU General Public 6 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive 7 * License. See the file "COPYING" in the main directory of this archive
6 * for more details. 8 * for more details.
7 * 9 *
8 * Copyright (C) 1999-2006 Tensilica Inc. 10 * Copyright (C) 1999-2007 Tensilica Inc.
9 */ 11 */
10 12
11#ifndef XTENSA_TIE_H 13#ifndef _XTENSA_CORE_TIE_H
12#define XTENSA_TIE_H 14#define _XTENSA_CORE_TIE_H
13
14/*----------------------------------------------------------------------
15 COPROCESSORS and EXTRA STATE
16 ----------------------------------------------------------------------*/
17 15
18#define XCHAL_CP_NUM 0 /* number of coprocessors */ 16#define XCHAL_CP_NUM 0 /* number of coprocessors */
19#define XCHAL_CP_MASK 0x00 17#define XCHAL_CP_MAX 0 /* max CP ID + 1 (0 if none) */
18#define XCHAL_CP_MASK 0x00 /* bitmask of all CPs by ID */
19#define XCHAL_CP_PORT_MASK 0x00 /* bitmask of only port CPs */
20
21/* Basic parameters of each coprocessor: */
22#define XCHAL_CP7_NAME "XTIOP"
23#define XCHAL_CP7_IDENT XTIOP
24#define XCHAL_CP7_SA_SIZE 0 /* size of state save area */
25#define XCHAL_CP7_SA_ALIGN 1 /* min alignment of save area */
26#define XCHAL_CP_ID_XTIOP 7 /* coprocessor ID (0..7) */
27
28/* Filler info for unassigned coprocessors, to simplify arrays etc: */
29#define XCHAL_NCP_SA_SIZE 0
30#define XCHAL_NCP_SA_ALIGN 1
31#define XCHAL_CP0_SA_SIZE 0
32#define XCHAL_CP0_SA_ALIGN 1
33#define XCHAL_CP1_SA_SIZE 0
34#define XCHAL_CP1_SA_ALIGN 1
35#define XCHAL_CP2_SA_SIZE 0
36#define XCHAL_CP2_SA_ALIGN 1
37#define XCHAL_CP3_SA_SIZE 0
38#define XCHAL_CP3_SA_ALIGN 1
39#define XCHAL_CP4_SA_SIZE 0
40#define XCHAL_CP4_SA_ALIGN 1
41#define XCHAL_CP5_SA_SIZE 0
42#define XCHAL_CP5_SA_ALIGN 1
43#define XCHAL_CP6_SA_SIZE 0
44#define XCHAL_CP6_SA_ALIGN 1
45
46/* Save area for non-coprocessor optional and custom (TIE) state: */
47#define XCHAL_NCP_SA_SIZE 0
48#define XCHAL_NCP_SA_ALIGN 1
49
50/* Total save area for optional and custom state (NCP + CPn): */
51#define XCHAL_TOTAL_SA_SIZE 0 /* with 16-byte align padding */
52#define XCHAL_TOTAL_SA_ALIGN 1 /* actual minimum alignment */
53
54#define XCHAL_NCP_SA_NUM 0
55#define XCHAL_NCP_SA_LIST(s)
56#define XCHAL_CP0_SA_NUM 0
57#define XCHAL_CP0_SA_LIST(s)
58#define XCHAL_CP1_SA_NUM 0
59#define XCHAL_CP1_SA_LIST(s)
60#define XCHAL_CP2_SA_NUM 0
61#define XCHAL_CP2_SA_LIST(s)
62#define XCHAL_CP3_SA_NUM 0
63#define XCHAL_CP3_SA_LIST(s)
64#define XCHAL_CP4_SA_NUM 0
65#define XCHAL_CP4_SA_LIST(s)
66#define XCHAL_CP5_SA_NUM 0
67#define XCHAL_CP5_SA_LIST(s)
68#define XCHAL_CP6_SA_NUM 0
69#define XCHAL_CP6_SA_LIST(s)
70#define XCHAL_CP7_SA_NUM 0
71#define XCHAL_CP7_SA_LIST(s)
72
73/* Byte length of instruction from its first nibble (op0 field), per FLIX. */
74#define XCHAL_OP0_FORMAT_LENGTHS 3,3,3,3,3,3,3,3,2,2,2,2,2,2,3,3
20 75
21#endif /*XTENSA_CONFIG_TIE_H*/ 76#endif /*_XTENSA_CORE_TIE_H*/
22 77
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 5cae9b5960ea..994df3780007 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -61,6 +61,7 @@ header-y += efs_fs_sb.h
61header-y += elf-fdpic.h 61header-y += elf-fdpic.h
62header-y += elf-em.h 62header-y += elf-em.h
63header-y += fadvise.h 63header-y += fadvise.h
64header-y += falloc.h
64header-y += fd.h 65header-y += fd.h
65header-y += fdreg.h 66header-y += fdreg.h
66header-y += fib_rules.h 67header-y += fib_rules.h
@@ -70,7 +71,6 @@ header-y += fuse.h
70header-y += genetlink.h 71header-y += genetlink.h
71header-y += gen_stats.h 72header-y += gen_stats.h
72header-y += gigaset_dev.h 73header-y += gigaset_dev.h
73header-y += hdsmart.h
74header-y += hysdn_if.h 74header-y += hysdn_if.h
75header-y += i2o-dev.h 75header-y += i2o-dev.h
76header-y += i8k.h 76header-y += i8k.h
@@ -211,6 +211,7 @@ unifdef-y += hayesesp.h
211unifdef-y += hdlcdrv.h 211unifdef-y += hdlcdrv.h
212unifdef-y += hdlc.h 212unifdef-y += hdlc.h
213unifdef-y += hdreg.h 213unifdef-y += hdreg.h
214unifdef-y += hdsmart.h
214unifdef-y += hiddev.h 215unifdef-y += hiddev.h
215unifdef-y += hpet.h 216unifdef-y += hpet.h
216unifdef-y += i2c.h 217unifdef-y += i2c.h
diff --git a/include/linux/aio.h b/include/linux/aio.h
index a9931e2e5624..0d0b7f629bd3 100644
--- a/include/linux/aio.h
+++ b/include/linux/aio.h
@@ -105,7 +105,6 @@ struct kiocb {
105 wait_queue_t ki_wait; 105 wait_queue_t ki_wait;
106 loff_t ki_pos; 106 loff_t ki_pos;
107 107
108 atomic_t ki_bio_count; /* num bio used for this iocb */
109 void *private; 108 void *private;
110 /* State that we remember to be able to restart/retry */ 109 /* State that we remember to be able to restart/retry */
111 unsigned short ki_opcode; 110 unsigned short ki_opcode;
diff --git a/include/linux/ata.h b/include/linux/ata.h
index 78bbacaed8c4..1c622e2b0504 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -659,6 +659,11 @@ static inline int atapi_command_packet_set(const u16 *dev_id)
659 return (dev_id[0] >> 8) & 0x1f; 659 return (dev_id[0] >> 8) & 0x1f;
660} 660}
661 661
662static inline int atapi_id_dmadir(const u16 *dev_id)
663{
664 return ata_id_major_version(dev_id) >= 7 && (dev_id[62] & 0x8000);
665}
666
662static inline int is_multi_taskfile(struct ata_taskfile *tf) 667static inline int is_multi_taskfile(struct ata_taskfile *tf)
663{ 668{
664 return (tf->command == ATA_CMD_READ_MULTI) || 669 return (tf->command == ATA_CMD_READ_MULTI) ||
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 4da441337d6e..4c59bdccd3ee 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -326,7 +326,6 @@ extern struct bio *bio_map_kern(struct request_queue *, void *, unsigned int,
326 gfp_t); 326 gfp_t);
327extern void bio_set_pages_dirty(struct bio *bio); 327extern void bio_set_pages_dirty(struct bio *bio);
328extern void bio_check_pages_dirty(struct bio *bio); 328extern void bio_check_pages_dirty(struct bio *bio);
329extern void bio_release_pages(struct bio *bio);
330extern struct bio *bio_copy_user(struct request_queue *, unsigned long, unsigned int, int); 329extern struct bio *bio_copy_user(struct request_queue *, unsigned long, unsigned int, int);
331extern int bio_uncopy_user(struct bio *); 330extern int bio_uncopy_user(struct bio *);
332void zero_fill_bio(struct bio *bio); 331void zero_fill_bio(struct bio *bio);
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index e1888cc5b8ae..6f79d40dd3c0 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -217,6 +217,7 @@ struct request {
217 unsigned char cmd[BLK_MAX_CDB]; 217 unsigned char cmd[BLK_MAX_CDB];
218 218
219 unsigned int data_len; 219 unsigned int data_len;
220 unsigned int extra_len; /* length of alignment and padding */
220 unsigned int sense_len; 221 unsigned int sense_len;
221 void *data; 222 void *data;
222 void *sense; 223 void *sense;
@@ -258,6 +259,7 @@ struct bio_vec;
258typedef int (merge_bvec_fn) (struct request_queue *, struct bio *, struct bio_vec *); 259typedef int (merge_bvec_fn) (struct request_queue *, struct bio *, struct bio_vec *);
259typedef void (prepare_flush_fn) (struct request_queue *, struct request *); 260typedef void (prepare_flush_fn) (struct request_queue *, struct request *);
260typedef void (softirq_done_fn)(struct request *); 261typedef void (softirq_done_fn)(struct request *);
262typedef int (dma_drain_needed_fn)(struct request *);
261 263
262enum blk_queue_state { 264enum blk_queue_state {
263 Queue_down, 265 Queue_down,
@@ -294,6 +296,7 @@ struct request_queue
294 merge_bvec_fn *merge_bvec_fn; 296 merge_bvec_fn *merge_bvec_fn;
295 prepare_flush_fn *prepare_flush_fn; 297 prepare_flush_fn *prepare_flush_fn;
296 softirq_done_fn *softirq_done_fn; 298 softirq_done_fn *softirq_done_fn;
299 dma_drain_needed_fn *dma_drain_needed;
297 300
298 /* 301 /*
299 * Dispatch queue sorting 302 * Dispatch queue sorting
@@ -359,6 +362,7 @@ struct request_queue
359 unsigned long seg_boundary_mask; 362 unsigned long seg_boundary_mask;
360 void *dma_drain_buffer; 363 void *dma_drain_buffer;
361 unsigned int dma_drain_size; 364 unsigned int dma_drain_size;
365 unsigned int dma_pad_mask;
362 unsigned int dma_alignment; 366 unsigned int dma_alignment;
363 367
364 struct blk_queue_tag *queue_tags; 368 struct blk_queue_tag *queue_tags;
@@ -698,8 +702,10 @@ extern void blk_queue_max_hw_segments(struct request_queue *, unsigned short);
698extern void blk_queue_max_segment_size(struct request_queue *, unsigned int); 702extern void blk_queue_max_segment_size(struct request_queue *, unsigned int);
699extern void blk_queue_hardsect_size(struct request_queue *, unsigned short); 703extern void blk_queue_hardsect_size(struct request_queue *, unsigned short);
700extern void blk_queue_stack_limits(struct request_queue *t, struct request_queue *b); 704extern void blk_queue_stack_limits(struct request_queue *t, struct request_queue *b);
701extern int blk_queue_dma_drain(struct request_queue *q, void *buf, 705extern void blk_queue_dma_pad(struct request_queue *, unsigned int);
702 unsigned int size); 706extern int blk_queue_dma_drain(struct request_queue *q,
707 dma_drain_needed_fn *dma_drain_needed,
708 void *buf, unsigned int size);
703extern void blk_queue_segment_boundary(struct request_queue *, unsigned long); 709extern void blk_queue_segment_boundary(struct request_queue *, unsigned long);
704extern void blk_queue_prep_rq(struct request_queue *, prep_rq_fn *pfn); 710extern void blk_queue_prep_rq(struct request_queue *, prep_rq_fn *pfn);
705extern void blk_queue_merge_bvec(struct request_queue *, merge_bvec_fn *); 711extern void blk_queue_merge_bvec(struct request_queue *, merge_bvec_fn *);
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index ff9055fc3d2a..028ba3b523b1 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -175,7 +175,7 @@ struct css_set {
175 * 175 *
176 * 176 *
177 * When reading/writing to a file: 177 * When reading/writing to a file:
178 * - the cgroup to use in file->f_dentry->d_parent->d_fsdata 178 * - the cgroup to use is file->f_dentry->d_parent->d_fsdata
179 * - the 'cftype' of the file is file->f_dentry->d_fsdata 179 * - the 'cftype' of the file is file->f_dentry->d_fsdata
180 */ 180 */
181 181
@@ -186,15 +186,15 @@ struct cftype {
186 char name[MAX_CFTYPE_NAME]; 186 char name[MAX_CFTYPE_NAME];
187 int private; 187 int private;
188 int (*open) (struct inode *inode, struct file *file); 188 int (*open) (struct inode *inode, struct file *file);
189 ssize_t (*read) (struct cgroup *cont, struct cftype *cft, 189 ssize_t (*read) (struct cgroup *cgrp, struct cftype *cft,
190 struct file *file, 190 struct file *file,
191 char __user *buf, size_t nbytes, loff_t *ppos); 191 char __user *buf, size_t nbytes, loff_t *ppos);
192 /* 192 /*
193 * read_uint() is a shortcut for the common case of returning a 193 * read_uint() is a shortcut for the common case of returning a
194 * single integer. Use it in place of read() 194 * single integer. Use it in place of read()
195 */ 195 */
196 u64 (*read_uint) (struct cgroup *cont, struct cftype *cft); 196 u64 (*read_uint) (struct cgroup *cgrp, struct cftype *cft);
197 ssize_t (*write) (struct cgroup *cont, struct cftype *cft, 197 ssize_t (*write) (struct cgroup *cgrp, struct cftype *cft,
198 struct file *file, 198 struct file *file,
199 const char __user *buf, size_t nbytes, loff_t *ppos); 199 const char __user *buf, size_t nbytes, loff_t *ppos);
200 200
@@ -203,7 +203,7 @@ struct cftype {
203 * a single integer (as parsed by simple_strtoull) from 203 * a single integer (as parsed by simple_strtoull) from
204 * userspace. Use in place of write(); return 0 or error. 204 * userspace. Use in place of write(); return 0 or error.
205 */ 205 */
206 int (*write_uint) (struct cgroup *cont, struct cftype *cft, u64 val); 206 int (*write_uint) (struct cgroup *cgrp, struct cftype *cft, u64 val);
207 207
208 int (*release) (struct inode *inode, struct file *file); 208 int (*release) (struct inode *inode, struct file *file);
209}; 209};
@@ -218,41 +218,41 @@ struct cgroup_scanner {
218 218
219/* Add a new file to the given cgroup directory. Should only be 219/* Add a new file to the given cgroup directory. Should only be
220 * called by subsystems from within a populate() method */ 220 * called by subsystems from within a populate() method */
221int cgroup_add_file(struct cgroup *cont, struct cgroup_subsys *subsys, 221int cgroup_add_file(struct cgroup *cgrp, struct cgroup_subsys *subsys,
222 const struct cftype *cft); 222 const struct cftype *cft);
223 223
224/* Add a set of new files to the given cgroup directory. Should 224/* Add a set of new files to the given cgroup directory. Should
225 * only be called by subsystems from within a populate() method */ 225 * only be called by subsystems from within a populate() method */
226int cgroup_add_files(struct cgroup *cont, 226int cgroup_add_files(struct cgroup *cgrp,
227 struct cgroup_subsys *subsys, 227 struct cgroup_subsys *subsys,
228 const struct cftype cft[], 228 const struct cftype cft[],
229 int count); 229 int count);
230 230
231int cgroup_is_removed(const struct cgroup *cont); 231int cgroup_is_removed(const struct cgroup *cgrp);
232 232
233int cgroup_path(const struct cgroup *cont, char *buf, int buflen); 233int cgroup_path(const struct cgroup *cgrp, char *buf, int buflen);
234 234
235int cgroup_task_count(const struct cgroup *cont); 235int cgroup_task_count(const struct cgroup *cgrp);
236 236
237/* Return true if the cgroup is a descendant of the current cgroup */ 237/* Return true if the cgroup is a descendant of the current cgroup */
238int cgroup_is_descendant(const struct cgroup *cont); 238int cgroup_is_descendant(const struct cgroup *cgrp);
239 239
240/* Control Group subsystem type. See Documentation/cgroups.txt for details */ 240/* Control Group subsystem type. See Documentation/cgroups.txt for details */
241 241
242struct cgroup_subsys { 242struct cgroup_subsys {
243 struct cgroup_subsys_state *(*create)(struct cgroup_subsys *ss, 243 struct cgroup_subsys_state *(*create)(struct cgroup_subsys *ss,
244 struct cgroup *cont); 244 struct cgroup *cgrp);
245 void (*pre_destroy)(struct cgroup_subsys *ss, struct cgroup *cont); 245 void (*pre_destroy)(struct cgroup_subsys *ss, struct cgroup *cgrp);
246 void (*destroy)(struct cgroup_subsys *ss, struct cgroup *cont); 246 void (*destroy)(struct cgroup_subsys *ss, struct cgroup *cgrp);
247 int (*can_attach)(struct cgroup_subsys *ss, 247 int (*can_attach)(struct cgroup_subsys *ss,
248 struct cgroup *cont, struct task_struct *tsk); 248 struct cgroup *cgrp, struct task_struct *tsk);
249 void (*attach)(struct cgroup_subsys *ss, struct cgroup *cont, 249 void (*attach)(struct cgroup_subsys *ss, struct cgroup *cgrp,
250 struct cgroup *old_cont, struct task_struct *tsk); 250 struct cgroup *old_cgrp, struct task_struct *tsk);
251 void (*fork)(struct cgroup_subsys *ss, struct task_struct *task); 251 void (*fork)(struct cgroup_subsys *ss, struct task_struct *task);
252 void (*exit)(struct cgroup_subsys *ss, struct task_struct *task); 252 void (*exit)(struct cgroup_subsys *ss, struct task_struct *task);
253 int (*populate)(struct cgroup_subsys *ss, 253 int (*populate)(struct cgroup_subsys *ss,
254 struct cgroup *cont); 254 struct cgroup *cgrp);
255 void (*post_clone)(struct cgroup_subsys *ss, struct cgroup *cont); 255 void (*post_clone)(struct cgroup_subsys *ss, struct cgroup *cgrp);
256 void (*bind)(struct cgroup_subsys *ss, struct cgroup *root); 256 void (*bind)(struct cgroup_subsys *ss, struct cgroup *root);
257 int subsys_id; 257 int subsys_id;
258 int active; 258 int active;
@@ -273,9 +273,9 @@ struct cgroup_subsys {
273#undef SUBSYS 273#undef SUBSYS
274 274
275static inline struct cgroup_subsys_state *cgroup_subsys_state( 275static inline struct cgroup_subsys_state *cgroup_subsys_state(
276 struct cgroup *cont, int subsys_id) 276 struct cgroup *cgrp, int subsys_id)
277{ 277{
278 return cont->subsys[subsys_id]; 278 return cgrp->subsys[subsys_id];
279} 279}
280 280
281static inline struct cgroup_subsys_state *task_subsys_state( 281static inline struct cgroup_subsys_state *task_subsys_state(
@@ -290,8 +290,6 @@ static inline struct cgroup* task_cgroup(struct task_struct *task,
290 return task_subsys_state(task, subsys_id)->cgroup; 290 return task_subsys_state(task, subsys_id)->cgroup;
291} 291}
292 292
293int cgroup_path(const struct cgroup *cont, char *buf, int buflen);
294
295int cgroup_clone(struct task_struct *tsk, struct cgroup_subsys *ss); 293int cgroup_clone(struct task_struct *tsk, struct cgroup_subsys *ss);
296 294
297/* A cgroup_iter should be treated as an opaque object */ 295/* A cgroup_iter should be treated as an opaque object */
@@ -313,10 +311,10 @@ struct cgroup_iter {
313 * - cgroup_scan_tasks() holds the css_set_lock when calling the test_task() 311 * - cgroup_scan_tasks() holds the css_set_lock when calling the test_task()
314 * callback, but not while calling the process_task() callback. 312 * callback, but not while calling the process_task() callback.
315 */ 313 */
316void cgroup_iter_start(struct cgroup *cont, struct cgroup_iter *it); 314void cgroup_iter_start(struct cgroup *cgrp, struct cgroup_iter *it);
317struct task_struct *cgroup_iter_next(struct cgroup *cont, 315struct task_struct *cgroup_iter_next(struct cgroup *cgrp,
318 struct cgroup_iter *it); 316 struct cgroup_iter *it);
319void cgroup_iter_end(struct cgroup *cont, struct cgroup_iter *it); 317void cgroup_iter_end(struct cgroup *cgrp, struct cgroup_iter *it);
320int cgroup_scan_tasks(struct cgroup_scanner *scan); 318int cgroup_scan_tasks(struct cgroup_scanner *scan);
321int cgroup_attach_task(struct cgroup *, struct task_struct *); 319int cgroup_attach_task(struct cgroup *, struct task_struct *);
322 320
diff --git a/include/linux/cgroup_subsys.h b/include/linux/cgroup_subsys.h
index ac6aad98b607..1ddebfc52565 100644
--- a/include/linux/cgroup_subsys.h
+++ b/include/linux/cgroup_subsys.h
@@ -37,7 +37,7 @@ SUBSYS(cpuacct)
37 37
38/* */ 38/* */
39 39
40#ifdef CONFIG_CGROUP_MEM_CONT 40#ifdef CONFIG_CGROUP_MEM_RES_CTLR
41SUBSYS(mem_cgroup) 41SUBSYS(mem_cgroup)
42#endif 42#endif
43 43
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index d0e17e1657dc..dcae0c8d97e6 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -138,6 +138,12 @@ extern void __chk_io_ptr(const volatile void __iomem *);
138#define noinline 138#define noinline
139#endif 139#endif
140 140
141/*
142 * Rather then using noinline to prevent stack consumption, use
143 * noinline_for_stack instead. For documentaiton reasons.
144 */
145#define noinline_for_stack noinline
146
141#ifndef __always_inline 147#ifndef __always_inline
142#define __always_inline inline 148#define __always_inline inline
143#endif 149#endif
diff --git a/include/linux/connector.h b/include/linux/connector.h
index da6dd957f908..96a89d3d6727 100644
--- a/include/linux/connector.h
+++ b/include/linux/connector.h
@@ -170,7 +170,5 @@ int cn_cb_equal(struct cb_id *, struct cb_id *);
170 170
171void cn_queue_wrapper(struct work_struct *work); 171void cn_queue_wrapper(struct work_struct *work);
172 172
173extern int cn_already_initialized;
174
175#endif /* __KERNEL__ */ 173#endif /* __KERNEL__ */
176#endif /* __CONNECTOR_H */ 174#endif /* __CONNECTOR_H */
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
index f592d6de3b97..7266124361b4 100644
--- a/include/linux/debugfs.h
+++ b/include/linux/debugfs.h
@@ -27,6 +27,11 @@ struct debugfs_blob_wrapper {
27}; 27};
28 28
29#if defined(CONFIG_DEBUG_FS) 29#if defined(CONFIG_DEBUG_FS)
30
31/* declared over in file.c */
32extern const struct file_operations debugfs_file_operations;
33extern const struct inode_operations debugfs_link_operations;
34
30struct dentry *debugfs_create_file(const char *name, mode_t mode, 35struct dentry *debugfs_create_file(const char *name, mode_t mode,
31 struct dentry *parent, void *data, 36 struct dentry *parent, void *data,
32 const struct file_operations *fops); 37 const struct file_operations *fops);
diff --git a/include/linux/delay.h b/include/linux/delay.h
index 17ddb55430ae..54552d21296e 100644
--- a/include/linux/delay.h
+++ b/include/linux/delay.h
@@ -7,6 +7,8 @@
7 * Delay routines, using a pre-computed "loops_per_jiffy" value. 7 * Delay routines, using a pre-computed "loops_per_jiffy" value.
8 */ 8 */
9 9
10#include <linux/kernel.h>
11
10extern unsigned long loops_per_jiffy; 12extern unsigned long loops_per_jiffy;
11 13
12#include <asm/delay.h> 14#include <asm/delay.h>
@@ -32,7 +34,11 @@ extern unsigned long loops_per_jiffy;
32#endif 34#endif
33 35
34#ifndef ndelay 36#ifndef ndelay
35#define ndelay(x) udelay(((x)+999)/1000) 37static inline void ndelay(unsigned long x)
38{
39 udelay(DIV_ROUND_UP(x, 1000));
40}
41#define ndelay(x) ndelay(x)
36#endif 42#endif
37 43
38void calibrate_delay(void); 44void calibrate_delay(void);
diff --git a/include/linux/dm9000.h b/include/linux/dm9000.h
index 0008e2ad0c9f..a3750462f9e3 100644
--- a/include/linux/dm9000.h
+++ b/include/linux/dm9000.h
@@ -19,6 +19,8 @@
19#define DM9000_PLATF_8BITONLY (0x0001) 19#define DM9000_PLATF_8BITONLY (0x0001)
20#define DM9000_PLATF_16BITONLY (0x0002) 20#define DM9000_PLATF_16BITONLY (0x0002)
21#define DM9000_PLATF_32BITONLY (0x0004) 21#define DM9000_PLATF_32BITONLY (0x0004)
22#define DM9000_PLATF_EXT_PHY (0x0008)
23#define DM9000_PLATF_NO_EEPROM (0x0010)
22 24
23/* platfrom data for platfrom device structure's platfrom_data field */ 25/* platfrom data for platfrom device structure's platfrom_data field */
24 26
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index acbb364674ff..261e43a4c873 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -366,7 +366,7 @@ __dma_has_cap(enum dma_transaction_type tx_type, dma_cap_mask_t *srcp)
366 */ 366 */
367static inline void dma_async_issue_pending(struct dma_chan *chan) 367static inline void dma_async_issue_pending(struct dma_chan *chan)
368{ 368{
369 return chan->device->device_issue_pending(chan); 369 chan->device->device_issue_pending(chan);
370} 370}
371 371
372#define dma_async_memcpy_issue_pending(chan) dma_async_issue_pending(chan) 372#define dma_async_memcpy_issue_pending(chan) dma_async_issue_pending(chan)
diff --git a/include/linux/efs_dir.h b/include/linux/efs_dir.h
deleted file mode 100644
index a09ec010569c..000000000000
--- a/include/linux/efs_dir.h
+++ /dev/null
@@ -1,42 +0,0 @@
1/*
2 * efs_dir.h
3 *
4 * Copyright (c) 1999 Al Smith
5 */
6
7#ifndef __EFS_DIR_H__
8#define __EFS_DIR_H__
9
10#define EFS_DIRBSIZE_BITS EFS_BLOCKSIZE_BITS
11#define EFS_DIRBSIZE (1 << EFS_DIRBSIZE_BITS)
12
13struct efs_dentry {
14 __be32 inode;
15 unsigned char namelen;
16 char name[3];
17};
18
19#define EFS_DENTSIZE (sizeof(struct efs_dentry) - 3 + 1)
20#define EFS_MAXNAMELEN ((1 << (sizeof(char) * 8)) - 1)
21
22#define EFS_DIRBLK_HEADERSIZE 4
23#define EFS_DIRBLK_MAGIC 0xbeef /* moo */
24
25struct efs_dir {
26 __be16 magic;
27 unsigned char firstused;
28 unsigned char slots;
29
30 unsigned char space[EFS_DIRBSIZE - EFS_DIRBLK_HEADERSIZE];
31};
32
33#define EFS_MAXENTS \
34 ((EFS_DIRBSIZE - EFS_DIRBLK_HEADERSIZE) / \
35 (EFS_DENTSIZE + sizeof(char)))
36
37#define EFS_SLOTAT(dir, slot) EFS_REALOFF((dir)->space[slot])
38
39#define EFS_REALOFF(offset) ((offset << 1))
40
41#endif /* __EFS_DIR_H__ */
42
diff --git a/include/linux/efs_fs.h b/include/linux/efs_fs.h
deleted file mode 100644
index a695d63a07af..000000000000
--- a/include/linux/efs_fs.h
+++ /dev/null
@@ -1,56 +0,0 @@
1/*
2 * efs_fs.h
3 *
4 * Copyright (c) 1999 Al Smith
5 *
6 * Portions derived from work (c) 1995,1996 Christian Vogelgsang.
7 */
8
9#ifndef __EFS_FS_H__
10#define __EFS_FS_H__
11
12#define EFS_VERSION "1.0a"
13
14static const char cprt[] = "EFS: "EFS_VERSION" - (c) 1999 Al Smith <Al.Smith@aeschi.ch.eu.org>";
15
16#include <asm/uaccess.h>
17
18/* 1 block is 512 bytes */
19#define EFS_BLOCKSIZE_BITS 9
20#define EFS_BLOCKSIZE (1 << EFS_BLOCKSIZE_BITS)
21
22#include <linux/fs.h>
23#include <linux/efs_fs_i.h>
24#include <linux/efs_fs_sb.h>
25#include <linux/efs_dir.h>
26
27static inline struct efs_inode_info *INODE_INFO(struct inode *inode)
28{
29 return container_of(inode, struct efs_inode_info, vfs_inode);
30}
31
32static inline struct efs_sb_info *SUPER_INFO(struct super_block *sb)
33{
34 return sb->s_fs_info;
35}
36
37struct statfs;
38struct fid;
39
40extern const struct inode_operations efs_dir_inode_operations;
41extern const struct file_operations efs_dir_operations;
42extern const struct address_space_operations efs_symlink_aops;
43
44extern struct inode *efs_iget(struct super_block *, unsigned long);
45extern efs_block_t efs_map_block(struct inode *, efs_block_t);
46extern int efs_get_block(struct inode *, sector_t, struct buffer_head *, int);
47
48extern struct dentry *efs_lookup(struct inode *, struct dentry *, struct nameidata *);
49extern struct dentry *efs_fh_to_dentry(struct super_block *sb, struct fid *fid,
50 int fh_len, int fh_type);
51extern struct dentry *efs_fh_to_parent(struct super_block *sb, struct fid *fid,
52 int fh_len, int fh_type);
53extern struct dentry *efs_get_parent(struct dentry *);
54extern int efs_bmap(struct inode *, int);
55
56#endif /* __EFS_FS_H__ */
diff --git a/include/linux/efs_fs_i.h b/include/linux/efs_fs_i.h
deleted file mode 100644
index 617c474ca659..000000000000
--- a/include/linux/efs_fs_i.h
+++ /dev/null
@@ -1,68 +0,0 @@
1/*
2 * efs_fs_i.h
3 *
4 * Copyright (c) 1999 Al Smith
5 *
6 * Portions derived from IRIX header files (c) 1988 Silicon Graphics
7 */
8
9#ifndef __EFS_FS_I_H__
10#define __EFS_FS_I_H__
11
12typedef int32_t efs_block_t;
13typedef uint32_t efs_ino_t;
14
15#define EFS_DIRECTEXTENTS 12
16
17/*
18 * layout of an extent, in memory and on disk. 8 bytes exactly.
19 */
20typedef union extent_u {
21 unsigned char raw[8];
22 struct extent_s {
23 unsigned int ex_magic:8; /* magic # (zero) */
24 unsigned int ex_bn:24; /* basic block */
25 unsigned int ex_length:8; /* numblocks in this extent */
26 unsigned int ex_offset:24; /* logical offset into file */
27 } cooked;
28} efs_extent;
29
30typedef struct edevs {
31 __be16 odev;
32 __be32 ndev;
33} efs_devs;
34
35/*
36 * extent based filesystem inode as it appears on disk. The efs inode
37 * is exactly 128 bytes long.
38 */
39struct efs_dinode {
40 __be16 di_mode; /* mode and type of file */
41 __be16 di_nlink; /* number of links to file */
42 __be16 di_uid; /* owner's user id */
43 __be16 di_gid; /* owner's group id */
44 __be32 di_size; /* number of bytes in file */
45 __be32 di_atime; /* time last accessed */
46 __be32 di_mtime; /* time last modified */
47 __be32 di_ctime; /* time created */
48 __be32 di_gen; /* generation number */
49 __be16 di_numextents; /* # of extents */
50 u_char di_version; /* version of inode */
51 u_char di_spare; /* spare - used by AFS */
52 union di_addr {
53 efs_extent di_extents[EFS_DIRECTEXTENTS];
54 efs_devs di_dev; /* device for IFCHR/IFBLK */
55 } di_u;
56};
57
58/* efs inode storage in memory */
59struct efs_inode_info {
60 int numextents;
61 int lastextent;
62
63 efs_extent extents[EFS_DIRECTEXTENTS];
64 struct inode vfs_inode;
65};
66
67#endif /* __EFS_FS_I_H__ */
68
diff --git a/include/linux/elfcore-compat.h b/include/linux/elfcore-compat.h
index 532d13adabc4..0a90e1c3a422 100644
--- a/include/linux/elfcore-compat.h
+++ b/include/linux/elfcore-compat.h
@@ -45,8 +45,8 @@ struct compat_elf_prpsinfo
45 char pr_zomb; 45 char pr_zomb;
46 char pr_nice; 46 char pr_nice;
47 compat_ulong_t pr_flag; 47 compat_ulong_t pr_flag;
48 compat_uid_t pr_uid; 48 __compat_uid_t pr_uid;
49 compat_gid_t pr_gid; 49 __compat_gid_t pr_gid;
50 compat_pid_t pr_pid, pr_ppid, pr_pgrp, pr_sid; 50 compat_pid_t pr_pid, pr_ppid, pr_pgrp, pr_sid;
51 char pr_fname[16]; 51 char pr_fname[16];
52 char pr_psargs[ELF_PRARGSZ]; 52 char pr_psargs[ELF_PRARGSZ];
diff --git a/include/linux/ext4_fs_extents.h b/include/linux/ext4_fs_extents.h
index 697da4bce6c5..1285c583b2d8 100644
--- a/include/linux/ext4_fs_extents.h
+++ b/include/linux/ext4_fs_extents.h
@@ -227,5 +227,6 @@ extern int ext4_ext_search_left(struct inode *, struct ext4_ext_path *,
227 ext4_lblk_t *, ext4_fsblk_t *); 227 ext4_lblk_t *, ext4_fsblk_t *);
228extern int ext4_ext_search_right(struct inode *, struct ext4_ext_path *, 228extern int ext4_ext_search_right(struct inode *, struct ext4_ext_path *,
229 ext4_lblk_t *, ext4_fsblk_t *); 229 ext4_lblk_t *, ext4_fsblk_t *);
230extern void ext4_ext_drop_refs(struct ext4_ext_path *);
230#endif /* _LINUX_EXT4_EXTENTS */ 231#endif /* _LINUX_EXT4_EXTENTS */
231 232
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 98ffb6ead434..b84b848431f2 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1590,7 +1590,6 @@ extern void bd_set_size(struct block_device *, loff_t size);
1590extern void bd_forget(struct inode *inode); 1590extern void bd_forget(struct inode *inode);
1591extern void bdput(struct block_device *); 1591extern void bdput(struct block_device *);
1592extern struct block_device *open_by_devnum(dev_t, unsigned); 1592extern struct block_device *open_by_devnum(dev_t, unsigned);
1593extern const struct address_space_operations def_blk_aops;
1594#else 1593#else
1595static inline void bd_forget(struct inode *inode) {} 1594static inline void bd_forget(struct inode *inode) {}
1596#endif 1595#endif
diff --git a/include/linux/futex.h b/include/linux/futex.h
index 90048fb28a38..586ab56a3ec3 100644
--- a/include/linux/futex.h
+++ b/include/linux/futex.h
@@ -167,6 +167,7 @@ union futex_key {
167#ifdef CONFIG_FUTEX 167#ifdef CONFIG_FUTEX
168extern void exit_robust_list(struct task_struct *curr); 168extern void exit_robust_list(struct task_struct *curr);
169extern void exit_pi_state_list(struct task_struct *curr); 169extern void exit_pi_state_list(struct task_struct *curr);
170extern int futex_cmpxchg_enabled;
170#else 171#else
171static inline void exit_robust_list(struct task_struct *curr) 172static inline void exit_robust_list(struct task_struct *curr)
172{ 173{
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 09a3b18918c7..32c2ac49a070 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -18,11 +18,13 @@
18#define dev_to_disk(device) container_of(device, struct gendisk, dev) 18#define dev_to_disk(device) container_of(device, struct gendisk, dev)
19#define dev_to_part(device) container_of(device, struct hd_struct, dev) 19#define dev_to_part(device) container_of(device, struct hd_struct, dev)
20 20
21extern struct device_type disk_type;
22extern struct device_type part_type; 21extern struct device_type part_type;
23extern struct kobject *block_depr; 22extern struct kobject *block_depr;
24extern struct class block_class; 23extern struct class block_class;
25 24
25extern const struct seq_operations partitions_op;
26extern const struct seq_operations diskstats_op;
27
26enum { 28enum {
27/* These three have identical behaviour; use the second one if DOS FDISK gets 29/* These three have identical behaviour; use the second one if DOS FDISK gets
28 confused about extended/logical partitions starting past cylinder 1023. */ 30 confused about extended/logical partitions starting past cylinder 1023. */
@@ -556,7 +558,6 @@ extern struct gendisk *alloc_disk_node(int minors, int node_id);
556extern struct gendisk *alloc_disk(int minors); 558extern struct gendisk *alloc_disk(int minors);
557extern struct kobject *get_disk(struct gendisk *disk); 559extern struct kobject *get_disk(struct gendisk *disk);
558extern void put_disk(struct gendisk *disk); 560extern void put_disk(struct gendisk *disk);
559extern void genhd_media_change_notify(struct gendisk *disk);
560extern void blk_register_region(dev_t devt, unsigned long range, 561extern void blk_register_region(dev_t devt, unsigned long range,
561 struct module *module, 562 struct module *module,
562 struct kobject *(*probe)(dev_t, int *, void *), 563 struct kobject *(*probe)(dev_t, int *, void *),
diff --git a/include/linux/gpio.h b/include/linux/gpio.h
new file mode 100644
index 000000000000..4987a84078ef
--- /dev/null
+++ b/include/linux/gpio.h
@@ -0,0 +1,95 @@
1#ifndef __LINUX_GPIO_H
2#define __LINUX_GPIO_H
3
4/* see Documentation/gpio.txt */
5
6#ifdef CONFIG_GENERIC_GPIO
7#include <asm/gpio.h>
8
9#else
10
11/*
12 * Some platforms don't support the GPIO programming interface.
13 *
14 * In case some driver uses it anyway (it should normally have
15 * depended on GENERIC_GPIO), these routines help the compiler
16 * optimize out much GPIO-related code ... or trigger a runtime
17 * warning when something is wrongly called.
18 */
19
20static inline int gpio_is_valid(int number)
21{
22 return 0;
23}
24
25static inline int gpio_request(unsigned gpio, const char *label)
26{
27 return -ENOSYS;
28}
29
30static inline void gpio_free(unsigned gpio)
31{
32 /* GPIO can never have been requested */
33 WARN_ON(1);
34}
35
36static inline int gpio_direction_input(unsigned gpio)
37{
38 return -ENOSYS;
39}
40
41static inline int gpio_direction_output(unsigned gpio, int value)
42{
43 return -ENOSYS;
44}
45
46static inline int gpio_get_value(unsigned gpio)
47{
48 /* GPIO can never have been requested or set as {in,out}put */
49 WARN_ON(1);
50 return 0;
51}
52
53static inline void gpio_set_value(unsigned gpio, int value)
54{
55 /* GPIO can never have been requested or set as output */
56 WARN_ON(1);
57}
58
59static inline int gpio_cansleep(unsigned gpio)
60{
61 /* GPIO can never have been requested or set as {in,out}put */
62 WARN_ON(1);
63 return 0;
64}
65
66static inline int gpio_get_value_cansleep(unsigned gpio)
67{
68 /* GPIO can never have been requested or set as {in,out}put */
69 WARN_ON(1);
70 return 0;
71}
72
73static inline void gpio_set_value_cansleep(unsigned gpio, int value)
74{
75 /* GPIO can never have been requested or set as output */
76 WARN_ON(1);
77}
78
79static inline int gpio_to_irq(unsigned gpio)
80{
81 /* GPIO can never have been requested or set as input */
82 WARN_ON(1);
83 return -EINVAL;
84}
85
86static inline int irq_to_gpio(unsigned irq)
87{
88 /* irq can never have been returned from gpio_to_irq() */
89 WARN_ON(1);
90 return -EINVAL;
91}
92
93#endif
94
95#endif /* __LINUX_GPIO_H */
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h
index 2961ec788046..49829988bfa0 100644
--- a/include/linux/hardirq.h
+++ b/include/linux/hardirq.h
@@ -109,6 +109,14 @@ static inline void account_system_vtime(struct task_struct *tsk)
109} 109}
110#endif 110#endif
111 111
112#if defined(CONFIG_PREEMPT_RCU) && defined(CONFIG_NO_HZ)
113extern void rcu_irq_enter(void);
114extern void rcu_irq_exit(void);
115#else
116# define rcu_irq_enter() do { } while (0)
117# define rcu_irq_exit() do { } while (0)
118#endif /* CONFIG_PREEMPT_RCU */
119
112/* 120/*
113 * It is safe to do non-atomic ops on ->hardirq_context, 121 * It is safe to do non-atomic ops on ->hardirq_context,
114 * because NMI handlers may not preempt and the ops are 122 * because NMI handlers may not preempt and the ops are
@@ -117,6 +125,7 @@ static inline void account_system_vtime(struct task_struct *tsk)
117 */ 125 */
118#define __irq_enter() \ 126#define __irq_enter() \
119 do { \ 127 do { \
128 rcu_irq_enter(); \
120 account_system_vtime(current); \ 129 account_system_vtime(current); \
121 add_preempt_count(HARDIRQ_OFFSET); \ 130 add_preempt_count(HARDIRQ_OFFSET); \
122 trace_hardirq_enter(); \ 131 trace_hardirq_enter(); \
@@ -135,6 +144,7 @@ extern void irq_enter(void);
135 trace_hardirq_exit(); \ 144 trace_hardirq_exit(); \
136 account_system_vtime(current); \ 145 account_system_vtime(current); \
137 sub_preempt_count(HARDIRQ_OFFSET); \ 146 sub_preempt_count(HARDIRQ_OFFSET); \
147 rcu_irq_exit(); \
138 } while (0) 148 } while (0)
139 149
140/* 150/*
diff --git a/include/linux/hdsmart.h b/include/linux/hdsmart.h
index e69192159d40..4f4faf9d4238 100644
--- a/include/linux/hdsmart.h
+++ b/include/linux/hdsmart.h
@@ -17,7 +17,7 @@
17#ifndef _LINUX_HDSMART_H 17#ifndef _LINUX_HDSMART_H
18#define _LINUX_HDSMART_H 18#define _LINUX_HDSMART_H
19 19
20#ifndef __KERNEL 20#ifndef __KERNEL__
21#define OFFLINE_FULL_SCAN 0 21#define OFFLINE_FULL_SCAN 0
22#define SHORT_SELF_TEST 1 22#define SHORT_SELF_TEST 1
23#define EXTEND_SELF_TEST 2 23#define EXTEND_SELF_TEST 2
@@ -121,6 +121,6 @@ typedef struct ata_smart_selftestlog_s {
121 unsigned char resevered[2]; 121 unsigned char resevered[2];
122 unsigned char chksum; 122 unsigned char chksum;
123} __attribute__ ((packed)) ata_smart_selftestlog_t; 123} __attribute__ ((packed)) ata_smart_selftestlog_t;
124#endif /* __KERNEL__ * 124#endif /* __KERNEL__ */
125 125
126#endif /* _LINUX_HDSMART_H */ 126#endif /* _LINUX_HDSMART_H */
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 76014f8f3c60..365e0df3646b 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -271,9 +271,16 @@ extern void i2c_unregister_device(struct i2c_client *);
271 * This is done at arch_initcall time, before declaring any i2c adapters. 271 * This is done at arch_initcall time, before declaring any i2c adapters.
272 * Modules for add-on boards must use other calls. 272 * Modules for add-on boards must use other calls.
273 */ 273 */
274#ifdef CONFIG_I2C_BOARDINFO
274extern int 275extern int
275i2c_register_board_info(int busnum, struct i2c_board_info const *info, unsigned n); 276i2c_register_board_info(int busnum, struct i2c_board_info const *info, unsigned n);
276 277#else
278static inline int
279i2c_register_board_info(int busnum, struct i2c_board_info const *info, unsigned n)
280{
281 return 0;
282}
283#endif
277 284
278/* 285/*
279 * The following structs are for those who like to implement new bus drivers: 286 * The following structs are for those who like to implement new bus drivers:
@@ -598,7 +605,7 @@ I2C_CLIENT_MODULE_PARM(probe, "List of adapter,address pairs to scan " \
598 "additionally"); \ 605 "additionally"); \
599I2C_CLIENT_MODULE_PARM(ignore, "List of adapter,address pairs not to " \ 606I2C_CLIENT_MODULE_PARM(ignore, "List of adapter,address pairs not to " \
600 "scan"); \ 607 "scan"); \
601const static struct i2c_client_address_data addr_data = { \ 608static const struct i2c_client_address_data addr_data = { \
602 .normal_i2c = normal_i2c, \ 609 .normal_i2c = normal_i2c, \
603 .probe = probe, \ 610 .probe = probe, \
604 .ignore = ignore, \ 611 .ignore = ignore, \
diff --git a/include/linux/init.h b/include/linux/init.h
index a404a0055dd7..fb58c0493cf2 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -42,6 +42,7 @@
42 discard it in modules) */ 42 discard it in modules) */
43#define __init __section(.init.text) __cold 43#define __init __section(.init.text) __cold
44#define __initdata __section(.init.data) 44#define __initdata __section(.init.data)
45#define __initconst __section(.init.rodata)
45#define __exitdata __section(.exit.data) 46#define __exitdata __section(.exit.data)
46#define __exit_call __used __section(.exitcall.exit) 47#define __exit_call __used __section(.exitcall.exit)
47 48
@@ -106,6 +107,7 @@
106#define __memexitconst __section(.memexit.rodata) 107#define __memexitconst __section(.memexit.rodata)
107 108
108/* For assembly routines */ 109/* For assembly routines */
110#define __HEAD .section ".head.text","ax"
109#define __INIT .section ".init.text","ax" 111#define __INIT .section ".init.text","ax"
110#define __FINIT .previous 112#define __FINIT .previous
111 113
diff --git a/include/linux/iocontext.h b/include/linux/iocontext.h
index 593b222d9dcc..1b4ccf25b4d2 100644
--- a/include/linux/iocontext.h
+++ b/include/linux/iocontext.h
@@ -50,6 +50,7 @@ struct cfq_io_context {
50 sector_t seek_mean; 50 sector_t seek_mean;
51 51
52 struct list_head queue_list; 52 struct list_head queue_list;
53 struct hlist_node cic_list;
53 54
54 void (*dtor)(struct io_context *); /* destructor */ 55 void (*dtor)(struct io_context *); /* destructor */
55 void (*exit)(struct io_context *); /* called on task exit */ 56 void (*exit)(struct io_context *); /* called on task exit */
@@ -77,6 +78,7 @@ struct io_context {
77 78
78 struct as_io_context *aic; 79 struct as_io_context *aic;
79 struct radix_tree_root radix_root; 80 struct radix_tree_root radix_root;
81 struct hlist_head cic_list;
80 void *ioc_data; 82 void *ioc_data;
81}; 83};
82 84
diff --git a/include/linux/iommu-helper.h b/include/linux/iommu-helper.h
index 4dd4c04ff2f4..c975caf75385 100644
--- a/include/linux/iommu-helper.h
+++ b/include/linux/iommu-helper.h
@@ -1,3 +1,6 @@
1extern int iommu_is_span_boundary(unsigned int index, unsigned int nr,
2 unsigned long shift,
3 unsigned long boundary_size);
1extern unsigned long iommu_area_alloc(unsigned long *map, unsigned long size, 4extern unsigned long iommu_area_alloc(unsigned long *map, unsigned long size,
2 unsigned long start, unsigned int nr, 5 unsigned long start, unsigned int nr,
3 unsigned long shift, 6 unsigned long shift,
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
index 4a6ce82ba039..0f28486f6360 100644
--- a/include/linux/kprobes.h
+++ b/include/linux/kprobes.h
@@ -125,11 +125,11 @@ struct jprobe {
125DECLARE_PER_CPU(struct kprobe *, current_kprobe); 125DECLARE_PER_CPU(struct kprobe *, current_kprobe);
126DECLARE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); 126DECLARE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk);
127 127
128#ifdef ARCH_SUPPORTS_KRETPROBES 128#ifdef CONFIG_KRETPROBES
129extern void arch_prepare_kretprobe(struct kretprobe_instance *ri, 129extern void arch_prepare_kretprobe(struct kretprobe_instance *ri,
130 struct pt_regs *regs); 130 struct pt_regs *regs);
131extern int arch_trampoline_kprobe(struct kprobe *p); 131extern int arch_trampoline_kprobe(struct kprobe *p);
132#else /* ARCH_SUPPORTS_KRETPROBES */ 132#else /* CONFIG_KRETPROBES */
133static inline void arch_prepare_kretprobe(struct kretprobe *rp, 133static inline void arch_prepare_kretprobe(struct kretprobe *rp,
134 struct pt_regs *regs) 134 struct pt_regs *regs)
135{ 135{
@@ -138,7 +138,7 @@ static inline int arch_trampoline_kprobe(struct kprobe *p)
138{ 138{
139 return 0; 139 return 0;
140} 140}
141#endif /* ARCH_SUPPORTS_KRETPROBES */ 141#endif /* CONFIG_KRETPROBES */
142/* 142/*
143 * Function-return probe - 143 * Function-return probe -
144 * Note: 144 * Note:
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index 4de4fd2d8607..c1ec04fd000d 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -221,6 +221,7 @@ struct kvm_vapic_addr {
221 * Get size for mmap(vcpu_fd) 221 * Get size for mmap(vcpu_fd)
222 */ 222 */
223#define KVM_GET_VCPU_MMAP_SIZE _IO(KVMIO, 0x04) /* in bytes */ 223#define KVM_GET_VCPU_MMAP_SIZE _IO(KVMIO, 0x04) /* in bytes */
224#define KVM_GET_SUPPORTED_CPUID _IOWR(KVMIO, 0x05, struct kvm_cpuid2)
224 225
225/* 226/*
226 * Extension capability list. 227 * Extension capability list.
@@ -230,8 +231,8 @@ struct kvm_vapic_addr {
230#define KVM_CAP_MMU_SHADOW_CACHE_CONTROL 2 231#define KVM_CAP_MMU_SHADOW_CACHE_CONTROL 2
231#define KVM_CAP_USER_MEMORY 3 232#define KVM_CAP_USER_MEMORY 3
232#define KVM_CAP_SET_TSS_ADDR 4 233#define KVM_CAP_SET_TSS_ADDR 4
233#define KVM_CAP_EXT_CPUID 5
234#define KVM_CAP_VAPIC 6 234#define KVM_CAP_VAPIC 6
235#define KVM_CAP_EXT_CPUID 7
235 236
236/* 237/*
237 * ioctls for VM fds 238 * ioctls for VM fds
@@ -249,7 +250,6 @@ struct kvm_vapic_addr {
249#define KVM_CREATE_VCPU _IO(KVMIO, 0x41) 250#define KVM_CREATE_VCPU _IO(KVMIO, 0x41)
250#define KVM_GET_DIRTY_LOG _IOW(KVMIO, 0x42, struct kvm_dirty_log) 251#define KVM_GET_DIRTY_LOG _IOW(KVMIO, 0x42, struct kvm_dirty_log)
251#define KVM_SET_MEMORY_ALIAS _IOW(KVMIO, 0x43, struct kvm_memory_alias) 252#define KVM_SET_MEMORY_ALIAS _IOW(KVMIO, 0x43, struct kvm_memory_alias)
252#define KVM_GET_SUPPORTED_CPUID _IOWR(KVMIO, 0x48, struct kvm_cpuid2)
253/* Device model IOC */ 253/* Device model IOC */
254#define KVM_CREATE_IRQCHIP _IO(KVMIO, 0x60) 254#define KVM_CREATE_IRQCHIP _IO(KVMIO, 0x60)
255#define KVM_IRQ_LINE _IOW(KVMIO, 0x61, struct kvm_irq_level) 255#define KVM_IRQ_LINE _IOW(KVMIO, 0x61, struct kvm_irq_level)
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index ea4764b0a2f4..928b0d59e9ba 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -107,6 +107,7 @@ struct kvm_memory_slot {
107struct kvm { 107struct kvm {
108 struct mutex lock; /* protects the vcpus array and APIC accesses */ 108 struct mutex lock; /* protects the vcpus array and APIC accesses */
109 spinlock_t mmu_lock; 109 spinlock_t mmu_lock;
110 struct rw_semaphore slots_lock;
110 struct mm_struct *mm; /* userspace tied to this vm */ 111 struct mm_struct *mm; /* userspace tied to this vm */
111 int nmemslots; 112 int nmemslots;
112 struct kvm_memory_slot memslots[KVM_MEMORY_SLOTS + 113 struct kvm_memory_slot memslots[KVM_MEMORY_SLOTS +
diff --git a/include/linux/libata.h b/include/linux/libata.h
index bc5a8d0c7090..a05f60013642 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -138,6 +138,7 @@ enum {
138 ATA_DFLAG_AN = (1 << 7), /* AN configured */ 138 ATA_DFLAG_AN = (1 << 7), /* AN configured */
139 ATA_DFLAG_HIPM = (1 << 8), /* device supports HIPM */ 139 ATA_DFLAG_HIPM = (1 << 8), /* device supports HIPM */
140 ATA_DFLAG_DIPM = (1 << 9), /* device supports DIPM */ 140 ATA_DFLAG_DIPM = (1 << 9), /* device supports DIPM */
141 ATA_DFLAG_DMADIR = (1 << 10), /* device requires DMADIR */
141 ATA_DFLAG_CFG_MASK = (1 << 12) - 1, 142 ATA_DFLAG_CFG_MASK = (1 << 12) - 1,
142 143
143 ATA_DFLAG_PIO = (1 << 12), /* device limited to PIO mode */ 144 ATA_DFLAG_PIO = (1 << 12), /* device limited to PIO mode */
@@ -278,7 +279,6 @@ enum {
278 279
279 /* size of buffer to pad xfers ending on unaligned boundaries */ 280 /* size of buffer to pad xfers ending on unaligned boundaries */
280 ATA_DMA_PAD_SZ = 4, 281 ATA_DMA_PAD_SZ = 4,
281 ATA_DMA_PAD_BUF_SZ = ATA_DMA_PAD_SZ * ATA_MAX_QUEUE,
282 282
283 /* ering size */ 283 /* ering size */
284 ATA_ERING_SIZE = 32, 284 ATA_ERING_SIZE = 32,
@@ -457,24 +457,18 @@ struct ata_queued_cmd {
457 unsigned long flags; /* ATA_QCFLAG_xxx */ 457 unsigned long flags; /* ATA_QCFLAG_xxx */
458 unsigned int tag; 458 unsigned int tag;
459 unsigned int n_elem; 459 unsigned int n_elem;
460 unsigned int mapped_n_elem;
461 460
462 int dma_dir; 461 int dma_dir;
463 462
464 unsigned int pad_len;
465 unsigned int sect_size; 463 unsigned int sect_size;
466 464
467 unsigned int nbytes; 465 unsigned int nbytes;
468 unsigned int raw_nbytes;
469 unsigned int curbytes; 466 unsigned int curbytes;
470 467
471 struct scatterlist *cursg; 468 struct scatterlist *cursg;
472 unsigned int cursg_ofs; 469 unsigned int cursg_ofs;
473 470
474 struct scatterlist *last_sg;
475 struct scatterlist saved_last_sg;
476 struct scatterlist sgent; 471 struct scatterlist sgent;
477 struct scatterlist extra_sg[2];
478 472
479 struct scatterlist *sg; 473 struct scatterlist *sg;
480 474
@@ -619,9 +613,6 @@ struct ata_port {
619 struct ata_prd *prd; /* our SG list */ 613 struct ata_prd *prd; /* our SG list */
620 dma_addr_t prd_dma; /* and its DMA mapping */ 614 dma_addr_t prd_dma; /* and its DMA mapping */
621 615
622 void *pad; /* array of DMA pad buffers */
623 dma_addr_t pad_dma;
624
625 struct ata_ioports ioaddr; /* ATA cmd/ctl/dma register blocks */ 616 struct ata_ioports ioaddr; /* ATA cmd/ctl/dma register blocks */
626 617
627 u8 ctl; /* cache of ATA control register */ 618 u8 ctl; /* cache of ATA control register */
@@ -1207,7 +1198,7 @@ static inline struct ata_link *ata_port_next_link(struct ata_link *link)
1207 return ap->pmp_link; 1198 return ap->pmp_link;
1208 } 1199 }
1209 1200
1210 if (++link - ap->pmp_link < ap->nr_pmp_links) 1201 if (++link < ap->nr_pmp_links + ap->pmp_link)
1211 return link; 1202 return link;
1212 return NULL; 1203 return NULL;
1213} 1204}
@@ -1363,12 +1354,9 @@ static inline void ata_qc_reinit(struct ata_queued_cmd *qc)
1363 qc->flags = 0; 1354 qc->flags = 0;
1364 qc->cursg = NULL; 1355 qc->cursg = NULL;
1365 qc->cursg_ofs = 0; 1356 qc->cursg_ofs = 0;
1366 qc->nbytes = qc->raw_nbytes = qc->curbytes = 0; 1357 qc->nbytes = qc->curbytes = 0;
1367 qc->n_elem = 0; 1358 qc->n_elem = 0;
1368 qc->mapped_n_elem = 0;
1369 qc->err_mask = 0; 1359 qc->err_mask = 0;
1370 qc->pad_len = 0;
1371 qc->last_sg = NULL;
1372 qc->sect_size = ATA_SECT_SIZE; 1360 qc->sect_size = ATA_SECT_SIZE;
1373 1361
1374 ata_tf_init(qc->dev, &qc->tf); 1362 ata_tf_init(qc->dev, &qc->tf);
@@ -1423,19 +1411,6 @@ static inline unsigned int __ac_err_mask(u8 status)
1423 return mask; 1411 return mask;
1424} 1412}
1425 1413
1426static inline int ata_pad_alloc(struct ata_port *ap, struct device *dev)
1427{
1428 ap->pad_dma = 0;
1429 ap->pad = dmam_alloc_coherent(dev, ATA_DMA_PAD_BUF_SZ,
1430 &ap->pad_dma, GFP_KERNEL);
1431 return (ap->pad == NULL) ? -ENOMEM : 0;
1432}
1433
1434static inline void ata_pad_free(struct ata_port *ap, struct device *dev)
1435{
1436 dmam_free_coherent(dev, ATA_DMA_PAD_BUF_SZ, ap->pad, ap->pad_dma);
1437}
1438
1439static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host) 1414static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host)
1440{ 1415{
1441 return *(struct ata_port **)&host->hostdata[0]; 1416 return *(struct ata_port **)&host->hostdata[0];
diff --git a/include/linux/maple.h b/include/linux/maple.h
index 3f01e2bae1a1..d31e36ebb436 100644
--- a/include/linux/maple.h
+++ b/include/linux/maple.h
@@ -64,7 +64,6 @@ struct maple_driver {
64 int (*connect) (struct maple_device * dev); 64 int (*connect) (struct maple_device * dev);
65 void (*disconnect) (struct maple_device * dev); 65 void (*disconnect) (struct maple_device * dev);
66 struct device_driver drv; 66 struct device_driver drv;
67 int registered;
68}; 67};
69 68
70void maple_getcond_callback(struct maple_device *dev, 69void maple_getcond_callback(struct maple_device *dev,
diff --git a/include/linux/marker.h b/include/linux/marker.h
index 5df879dc3776..430f6adf9762 100644
--- a/include/linux/marker.h
+++ b/include/linux/marker.h
@@ -104,10 +104,16 @@ static inline void marker_update_probe_range(struct marker *begin,
104#define MARK_NOARGS " " 104#define MARK_NOARGS " "
105 105
106/* To be used for string format validity checking with gcc */ 106/* To be used for string format validity checking with gcc */
107static inline void __printf(1, 2) __mark_check_format(const char *fmt, ...) 107static inline void __printf(1, 2) ___mark_check_format(const char *fmt, ...)
108{ 108{
109} 109}
110 110
111#define __mark_check_format(format, args...) \
112 do { \
113 if (0) \
114 ___mark_check_format(format, ## args); \
115 } while (0)
116
111extern marker_probe_func __mark_empty_function; 117extern marker_probe_func __mark_empty_function;
112 118
113extern void marker_probe_cb(const struct marker *mdata, 119extern void marker_probe_cb(const struct marker *mdata,
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 925d57b236aa..8b1c4295848b 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -20,26 +20,25 @@
20#ifndef _LINUX_MEMCONTROL_H 20#ifndef _LINUX_MEMCONTROL_H
21#define _LINUX_MEMCONTROL_H 21#define _LINUX_MEMCONTROL_H
22 22
23#include <linux/rcupdate.h>
24#include <linux/mm.h>
25
26struct mem_cgroup; 23struct mem_cgroup;
27struct page_cgroup; 24struct page_cgroup;
28struct page; 25struct page;
29struct mm_struct; 26struct mm_struct;
30 27
31#ifdef CONFIG_CGROUP_MEM_CONT 28#ifdef CONFIG_CGROUP_MEM_RES_CTLR
32 29
33extern void mm_init_cgroup(struct mm_struct *mm, struct task_struct *p); 30extern void mm_init_cgroup(struct mm_struct *mm, struct task_struct *p);
34extern void mm_free_cgroup(struct mm_struct *mm); 31extern void mm_free_cgroup(struct mm_struct *mm);
35extern void page_assign_page_cgroup(struct page *page, 32
36 struct page_cgroup *pc); 33#define page_reset_bad_cgroup(page) ((page)->page_cgroup = 0)
34
37extern struct page_cgroup *page_get_page_cgroup(struct page *page); 35extern struct page_cgroup *page_get_page_cgroup(struct page *page);
38extern int mem_cgroup_charge(struct page *page, struct mm_struct *mm, 36extern int mem_cgroup_charge(struct page *page, struct mm_struct *mm,
39 gfp_t gfp_mask); 37 gfp_t gfp_mask);
40extern void mem_cgroup_uncharge(struct page_cgroup *pc); 38extern int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm,
39 gfp_t gfp_mask);
41extern void mem_cgroup_uncharge_page(struct page *page); 40extern void mem_cgroup_uncharge_page(struct page *page);
42extern void mem_cgroup_move_lists(struct page_cgroup *pc, bool active); 41extern void mem_cgroup_move_lists(struct page *page, bool active);
43extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, 42extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan,
44 struct list_head *dst, 43 struct list_head *dst,
45 unsigned long *scanned, int order, 44 unsigned long *scanned, int order,
@@ -47,11 +46,9 @@ extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan,
47 struct mem_cgroup *mem_cont, 46 struct mem_cgroup *mem_cont,
48 int active); 47 int active);
49extern void mem_cgroup_out_of_memory(struct mem_cgroup *mem, gfp_t gfp_mask); 48extern void mem_cgroup_out_of_memory(struct mem_cgroup *mem, gfp_t gfp_mask);
50extern int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm,
51 gfp_t gfp_mask);
52int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem); 49int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem);
53 50
54#define vm_match_cgroup(mm, cgroup) \ 51#define mm_match_cgroup(mm, cgroup) \
55 ((cgroup) == rcu_dereference((mm)->mem_cgroup)) 52 ((cgroup) == rcu_dereference((mm)->mem_cgroup))
56 53
57extern int mem_cgroup_prepare_migration(struct page *page); 54extern int mem_cgroup_prepare_migration(struct page *page);
@@ -75,7 +72,7 @@ extern long mem_cgroup_calc_reclaim_active(struct mem_cgroup *mem,
75extern long mem_cgroup_calc_reclaim_inactive(struct mem_cgroup *mem, 72extern long mem_cgroup_calc_reclaim_inactive(struct mem_cgroup *mem,
76 struct zone *zone, int priority); 73 struct zone *zone, int priority);
77 74
78#else /* CONFIG_CGROUP_MEM_CONT */ 75#else /* CONFIG_CGROUP_MEM_RES_CTLR */
79static inline void mm_init_cgroup(struct mm_struct *mm, 76static inline void mm_init_cgroup(struct mm_struct *mm,
80 struct task_struct *p) 77 struct task_struct *p)
81{ 78{
@@ -85,8 +82,7 @@ static inline void mm_free_cgroup(struct mm_struct *mm)
85{ 82{
86} 83}
87 84
88static inline void page_assign_page_cgroup(struct page *page, 85static inline void page_reset_bad_cgroup(struct page *page)
89 struct page_cgroup *pc)
90{ 86{
91} 87}
92 88
@@ -95,33 +91,27 @@ static inline struct page_cgroup *page_get_page_cgroup(struct page *page)
95 return NULL; 91 return NULL;
96} 92}
97 93
98static inline int mem_cgroup_charge(struct page *page, struct mm_struct *mm, 94static inline int mem_cgroup_charge(struct page *page,
99 gfp_t gfp_mask) 95 struct mm_struct *mm, gfp_t gfp_mask)
100{ 96{
101 return 0; 97 return 0;
102} 98}
103 99
104static inline void mem_cgroup_uncharge(struct page_cgroup *pc) 100static inline int mem_cgroup_cache_charge(struct page *page,
101 struct mm_struct *mm, gfp_t gfp_mask)
105{ 102{
103 return 0;
106} 104}
107 105
108static inline void mem_cgroup_uncharge_page(struct page *page) 106static inline void mem_cgroup_uncharge_page(struct page *page)
109{ 107{
110} 108}
111 109
112static inline void mem_cgroup_move_lists(struct page_cgroup *pc, 110static inline void mem_cgroup_move_lists(struct page *page, bool active)
113 bool active)
114{ 111{
115} 112}
116 113
117static inline int mem_cgroup_cache_charge(struct page *page, 114static inline int mm_match_cgroup(struct mm_struct *mm, struct mem_cgroup *mem)
118 struct mm_struct *mm,
119 gfp_t gfp_mask)
120{
121 return 0;
122}
123
124static inline int vm_match_cgroup(struct mm_struct *mm, struct mem_cgroup *mem)
125{ 115{
126 return 1; 116 return 1;
127} 117}
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 26c7124b841a..3f3ccfe42de0 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -235,6 +235,7 @@ static inline int get_page_unless_zero(struct page *page)
235struct page *vmalloc_to_page(const void *addr); 235struct page *vmalloc_to_page(const void *addr);
236unsigned long vmalloc_to_pfn(const void *addr); 236unsigned long vmalloc_to_pfn(const void *addr);
237 237
238#ifdef CONFIG_MMU
238/* Determine if an address is within the vmalloc range */ 239/* Determine if an address is within the vmalloc range */
239static inline int is_vmalloc_addr(const void *x) 240static inline int is_vmalloc_addr(const void *x)
240{ 241{
@@ -242,6 +243,7 @@ static inline int is_vmalloc_addr(const void *x)
242 243
243 return addr >= VMALLOC_START && addr < VMALLOC_END; 244 return addr >= VMALLOC_START && addr < VMALLOC_END;
244} 245}
246#endif
245 247
246static inline struct page *compound_head(struct page *page) 248static inline struct page *compound_head(struct page *page)
247{ 249{
@@ -1171,12 +1173,18 @@ static inline void enable_debug_pagealloc(void)
1171{ 1173{
1172 debug_pagealloc_enabled = 1; 1174 debug_pagealloc_enabled = 1;
1173} 1175}
1176#ifdef CONFIG_HIBERNATION
1177extern bool kernel_page_present(struct page *page);
1178#endif /* CONFIG_HIBERNATION */
1174#else 1179#else
1175static inline void 1180static inline void
1176kernel_map_pages(struct page *page, int numpages, int enable) {} 1181kernel_map_pages(struct page *page, int numpages, int enable) {}
1177static inline void enable_debug_pagealloc(void) 1182static inline void enable_debug_pagealloc(void)
1178{ 1183{
1179} 1184}
1185#ifdef CONFIG_HIBERNATION
1186static inline bool kernel_page_present(struct page *page) { return true; }
1187#endif /* CONFIG_HIBERNATION */
1180#endif 1188#endif
1181 1189
1182extern struct vm_area_struct *get_gate_vma(struct task_struct *tsk); 1190extern struct vm_area_struct *get_gate_vma(struct task_struct *tsk);
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index bfee0bd1d435..af190ceab971 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -64,10 +64,7 @@ struct page {
64#if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS 64#if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS
65 spinlock_t ptl; 65 spinlock_t ptl;
66#endif 66#endif
67 struct { 67 struct kmem_cache *slab; /* SLUB: Pointer to slab */
68 struct kmem_cache *slab; /* SLUB: Pointer to slab */
69 void *end; /* SLUB: end marker */
70 };
71 struct page *first_page; /* Compound tail pages */ 68 struct page *first_page; /* Compound tail pages */
72 }; 69 };
73 union { 70 union {
@@ -91,7 +88,7 @@ struct page {
91 void *virtual; /* Kernel virtual address (NULL if 88 void *virtual; /* Kernel virtual address (NULL if
92 not kmapped, ie. highmem) */ 89 not kmapped, ie. highmem) */
93#endif /* WANT_PAGE_VIRTUAL */ 90#endif /* WANT_PAGE_VIRTUAL */
94#ifdef CONFIG_CGROUP_MEM_CONT 91#ifdef CONFIG_CGROUP_MEM_RES_CTLR
95 unsigned long page_cgroup; 92 unsigned long page_cgroup;
96#endif 93#endif
97}; 94};
@@ -225,7 +222,7 @@ struct mm_struct {
225 /* aio bits */ 222 /* aio bits */
226 rwlock_t ioctx_list_lock; 223 rwlock_t ioctx_list_lock;
227 struct kioctx *ioctx_list; 224 struct kioctx *ioctx_list;
228#ifdef CONFIG_CGROUP_MEM_CONT 225#ifdef CONFIG_CGROUP_MEM_RES_CTLR
229 struct mem_cgroup *mem_cgroup; 226 struct mem_cgroup *mem_cgroup;
230#endif 227#endif
231}; 228};
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 7128a02f1d37..a2f003239c85 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -604,6 +604,10 @@ struct net_device
604 604
605 unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ 605 unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */
606 606
607 /* ingress path synchronizer */
608 spinlock_t ingress_lock;
609 struct Qdisc *qdisc_ingress;
610
607/* 611/*
608 * Cache line mostly used on queue transmit path (qdisc) 612 * Cache line mostly used on queue transmit path (qdisc)
609 */ 613 */
@@ -617,10 +621,6 @@ struct net_device
617 /* Partially transmitted GSO packet. */ 621 /* Partially transmitted GSO packet. */
618 struct sk_buff *gso_skb; 622 struct sk_buff *gso_skb;
619 623
620 /* ingress path synchronizer */
621 spinlock_t ingress_lock;
622 struct Qdisc *qdisc_ingress;
623
624/* 624/*
625 * One part is mostly used on xmit path (device) 625 * One part is mostly used on xmit path (device)
626 */ 626 */
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index d74e79bacd2d..f0680c2bee73 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -31,7 +31,7 @@
31#define NF_VERDICT_QMASK 0xffff0000 31#define NF_VERDICT_QMASK 0xffff0000
32#define NF_VERDICT_QBITS 16 32#define NF_VERDICT_QBITS 16
33 33
34#define NF_QUEUE_NR(x) (((x << NF_VERDICT_QBITS) & NF_VERDICT_QMASK) | NF_QUEUE) 34#define NF_QUEUE_NR(x) ((((x) << NF_VERDICT_BITS) & NF_VERDICT_QMASK) | NF_QUEUE)
35 35
36/* only for userspace compatibility */ 36/* only for userspace compatibility */
37#ifndef __KERNEL__ 37#ifndef __KERNEL__
@@ -51,7 +51,7 @@ enum nf_inet_hooks {
51}; 51};
52 52
53union nf_inet_addr { 53union nf_inet_addr {
54 u_int32_t all[4]; 54 __u32 all[4];
55 __be32 ip; 55 __be32 ip;
56 __be32 ip6[4]; 56 __be32 ip6[4];
57 struct in_addr in; 57 struct in_addr in;
diff --git a/include/linux/netfilter/Kbuild b/include/linux/netfilter/Kbuild
index 91fef0cae42f..3aff513d12c8 100644
--- a/include/linux/netfilter/Kbuild
+++ b/include/linux/netfilter/Kbuild
@@ -30,7 +30,6 @@ header-y += xt_mark.h
30header-y += xt_multiport.h 30header-y += xt_multiport.h
31header-y += xt_owner.h 31header-y += xt_owner.h
32header-y += xt_pkttype.h 32header-y += xt_pkttype.h
33header-y += xt_policy.h
34header-y += xt_rateest.h 33header-y += xt_rateest.h
35header-y += xt_realm.h 34header-y += xt_realm.h
36header-y += xt_sctp.h 35header-y += xt_sctp.h
@@ -47,3 +46,4 @@ unifdef-y += nfnetlink.h
47unifdef-y += nfnetlink_compat.h 46unifdef-y += nfnetlink_compat.h
48unifdef-y += x_tables.h 47unifdef-y += x_tables.h
49unifdef-y += xt_physdev.h 48unifdef-y += xt_physdev.h
49unifdef-y += xt_policy.h
diff --git a/include/linux/netfilter/xt_hashlimit.h b/include/linux/netfilter/xt_hashlimit.h
index 58b818ee41ca..51b18d83b477 100644
--- a/include/linux/netfilter/xt_hashlimit.h
+++ b/include/linux/netfilter/xt_hashlimit.h
@@ -61,7 +61,6 @@ struct xt_hashlimit_mtinfo1 {
61 61
62 /* Used internally by the kernel */ 62 /* Used internally by the kernel */
63 struct xt_hashlimit_htable *hinfo __attribute__((aligned(8))); 63 struct xt_hashlimit_htable *hinfo __attribute__((aligned(8)));
64 struct xt_hashlimit_mtinfo1 *master __attribute__((aligned(8)));
65}; 64};
66 65
67#endif /*_XT_HASHLIMIT_H*/ 66#endif /*_XT_HASHLIMIT_H*/
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h
index a0525a1f4715..e3d79593fb3a 100644
--- a/include/linux/netpoll.h
+++ b/include/linux/netpoll.h
@@ -25,6 +25,7 @@ struct netpoll {
25 25
26struct netpoll_info { 26struct netpoll_info {
27 atomic_t refcnt; 27 atomic_t refcnt;
28 int rx_flags;
28 spinlock_t rx_lock; 29 spinlock_t rx_lock;
29 struct netpoll *rx_np; /* netpoll that registered an rx_hook */ 30 struct netpoll *rx_np; /* netpoll that registered an rx_hook */
30 struct sk_buff_head arp_tx; /* list of arp requests to reply to */ 31 struct sk_buff_head arp_tx; /* list of arp requests to reply to */
@@ -50,12 +51,12 @@ static inline int netpoll_rx(struct sk_buff *skb)
50 unsigned long flags; 51 unsigned long flags;
51 int ret = 0; 52 int ret = 0;
52 53
53 if (!npinfo || !npinfo->rx_np) 54 if (!npinfo || (!npinfo->rx_np && !npinfo->rx_flags))
54 return 0; 55 return 0;
55 56
56 spin_lock_irqsave(&npinfo->rx_lock, flags); 57 spin_lock_irqsave(&npinfo->rx_lock, flags);
57 /* check rx_np again with the lock held */ 58 /* check rx_flags again with the lock held */
58 if (npinfo->rx_np && __netpoll_rx(skb)) 59 if (npinfo->rx_flags && __netpoll_rx(skb))
59 ret = 1; 60 ret = 1;
60 spin_unlock_irqrestore(&npinfo->rx_lock, flags); 61 spin_unlock_irqrestore(&npinfo->rx_lock, flags);
61 62
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index a69ba80f2dfe..f4a0e4c218df 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -195,6 +195,7 @@ struct nfs_inode {
195#define NFS_INO_ADVISE_RDPLUS (1) /* advise readdirplus */ 195#define NFS_INO_ADVISE_RDPLUS (1) /* advise readdirplus */
196#define NFS_INO_STALE (2) /* possible stale inode */ 196#define NFS_INO_STALE (2) /* possible stale inode */
197#define NFS_INO_ACL_LRU_SET (3) /* Inode is on the LRU list */ 197#define NFS_INO_ACL_LRU_SET (3) /* Inode is on the LRU list */
198#define NFS_INO_MOUNTPOINT (4) /* inode is remote mountpoint */
198 199
199static inline struct nfs_inode *NFS_I(const struct inode *inode) 200static inline struct nfs_inode *NFS_I(const struct inode *inode)
200{ 201{
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index bbad43fb8181..b5b30f1c1e59 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -266,7 +266,7 @@ static inline void SetPageUptodate(struct page *page)
266 266
267#define PG_head_tail_mask ((1L << PG_compound) | (1L << PG_reclaim)) 267#define PG_head_tail_mask ((1L << PG_compound) | (1L << PG_reclaim))
268 268
269#define PageTail(page) ((page->flags & PG_head_tail_mask) \ 269#define PageTail(page) (((page)->flags & PG_head_tail_mask) \
270 == PG_head_tail_mask) 270 == PG_head_tail_mask)
271 271
272static inline void __SetPageTail(struct page *page) 272static inline void __SetPageTail(struct page *page)
@@ -279,7 +279,7 @@ static inline void __ClearPageTail(struct page *page)
279 page->flags &= ~PG_head_tail_mask; 279 page->flags &= ~PG_head_tail_mask;
280} 280}
281 281
282#define PageHead(page) ((page->flags & PG_head_tail_mask) \ 282#define PageHead(page) (((page)->flags & PG_head_tail_mask) \
283 == (1L << PG_compound)) 283 == (1L << PG_compound))
284#define __SetPageHead(page) __SetPageCompound(page) 284#define __SetPageHead(page) __SetPageCompound(page)
285#define __ClearPageHead(page) __ClearPageCompound(page) 285#define __ClearPageHead(page) __ClearPageCompound(page)
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 87195b62de52..f3165e7ac431 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -389,6 +389,16 @@ struct pci_driver {
389#define to_pci_driver(drv) container_of(drv, struct pci_driver, driver) 389#define to_pci_driver(drv) container_of(drv, struct pci_driver, driver)
390 390
391/** 391/**
392 * DECLARE_PCI_DEVICE_TABLE - macro used to describe a pci device table
393 * @_table: device table name
394 *
395 * This macro is used to create a struct pci_device_id array (a device table)
396 * in a generic manner.
397 */
398#define DECLARE_PCI_DEVICE_TABLE(_table) \
399 const struct pci_device_id _table[] __devinitconst
400
401/**
392 * PCI_DEVICE - macro used to describe a specific pci device 402 * PCI_DEVICE - macro used to describe a specific pci device
393 * @vend: the 16 bit PCI Vendor ID 403 * @vend: the 16 bit PCI Vendor ID
394 * @dev: the 16 bit PCI Device ID 404 * @dev: the 16 bit PCI Device ID
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index df6dd79a0d3b..effdb558a588 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1351,6 +1351,7 @@
1351#define PCI_DEVICE_ID_VIA_8231_4 0x8235 1351#define PCI_DEVICE_ID_VIA_8231_4 0x8235
1352#define PCI_DEVICE_ID_VIA_8365_1 0x8305 1352#define PCI_DEVICE_ID_VIA_8365_1 0x8305
1353#define PCI_DEVICE_ID_VIA_CX700 0x8324 1353#define PCI_DEVICE_ID_VIA_CX700 0x8324
1354#define PCI_DEVICE_ID_VIA_CX700_IDE 0x0581
1354#define PCI_DEVICE_ID_VIA_VX800 0x8353 1355#define PCI_DEVICE_ID_VIA_VX800 0x8353
1355#define PCI_DEVICE_ID_VIA_8371_1 0x8391 1356#define PCI_DEVICE_ID_VIA_8371_1 0x8391
1356#define PCI_DEVICE_ID_VIA_82C598_1 0x8598 1357#define PCI_DEVICE_ID_VIA_82C598_1 0x8598
@@ -2373,6 +2374,12 @@
2373#define PCI_DEVICE_ID_INTEL_MCH_PC1 0x359a 2374#define PCI_DEVICE_ID_INTEL_MCH_PC1 0x359a
2374#define PCI_DEVICE_ID_INTEL_E7525_MCH 0x359e 2375#define PCI_DEVICE_ID_INTEL_E7525_MCH 0x359e
2375#define PCI_DEVICE_ID_INTEL_IOAT_CNB 0x360b 2376#define PCI_DEVICE_ID_INTEL_IOAT_CNB 0x360b
2377#define PCI_DEVICE_ID_INTEL_ICH10_0 0x3a14
2378#define PCI_DEVICE_ID_INTEL_ICH10_1 0x3a16
2379#define PCI_DEVICE_ID_INTEL_ICH10_2 0x3a18
2380#define PCI_DEVICE_ID_INTEL_ICH10_3 0x3a1a
2381#define PCI_DEVICE_ID_INTEL_ICH10_4 0x3a30
2382#define PCI_DEVICE_ID_INTEL_ICH10_5 0x3a60
2376#define PCI_DEVICE_ID_INTEL_IOAT_SNB 0x402f 2383#define PCI_DEVICE_ID_INTEL_IOAT_SNB 0x402f
2377#define PCI_DEVICE_ID_INTEL_IOAT_SCNB 0x65ff 2384#define PCI_DEVICE_ID_INTEL_IOAT_SCNB 0x65ff
2378#define PCI_DEVICE_ID_INTEL_TOLAPAI_0 0x5031 2385#define PCI_DEVICE_ID_INTEL_TOLAPAI_0 0x5031
diff --git a/include/linux/pm.h b/include/linux/pm.h
index eccf59ea2a77..015b735811b4 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -143,6 +143,9 @@ typedef struct pm_message {
143 * the upcoming system state (such as PCI_D3hot), and enable 143 * the upcoming system state (such as PCI_D3hot), and enable
144 * wakeup events as appropriate. 144 * wakeup events as appropriate.
145 * 145 *
146 * HIBERNATE Enter a low power device state appropriate for the hibernation
147 * state (eg. ACPI S4) and enable wakeup events as appropriate.
148 *
146 * FREEZE Quiesce operations so that a consistent image can be saved; 149 * FREEZE Quiesce operations so that a consistent image can be saved;
147 * but do NOT otherwise enter a low power device state, and do 150 * but do NOT otherwise enter a low power device state, and do
148 * NOT emit system wakeup events. 151 * NOT emit system wakeup events.
@@ -166,11 +169,15 @@ typedef struct pm_message {
166#define PM_EVENT_ON 0 169#define PM_EVENT_ON 0
167#define PM_EVENT_FREEZE 1 170#define PM_EVENT_FREEZE 1
168#define PM_EVENT_SUSPEND 2 171#define PM_EVENT_SUSPEND 2
169#define PM_EVENT_PRETHAW 3 172#define PM_EVENT_HIBERNATE 4
173#define PM_EVENT_PRETHAW 8
174
175#define PM_EVENT_SLEEP (PM_EVENT_SUSPEND | PM_EVENT_HIBERNATE)
170 176
171#define PMSG_FREEZE ((struct pm_message){ .event = PM_EVENT_FREEZE, }) 177#define PMSG_FREEZE ((struct pm_message){ .event = PM_EVENT_FREEZE, })
172#define PMSG_PRETHAW ((struct pm_message){ .event = PM_EVENT_PRETHAW, }) 178#define PMSG_PRETHAW ((struct pm_message){ .event = PM_EVENT_PRETHAW, })
173#define PMSG_SUSPEND ((struct pm_message){ .event = PM_EVENT_SUSPEND, }) 179#define PMSG_SUSPEND ((struct pm_message){ .event = PM_EVENT_SUSPEND, })
180#define PMSG_HIBERNATE ((struct pm_message){ .event = PM_EVENT_HIBERNATE, })
174#define PMSG_ON ((struct pm_message){ .event = PM_EVENT_ON, }) 181#define PMSG_ON ((struct pm_message){ .event = PM_EVENT_ON, })
175 182
176struct dev_pm_info { 183struct dev_pm_info {
diff --git a/include/linux/raid/bitmap.h b/include/linux/raid/bitmap.h
index e51b531cd0b2..47fbcba11850 100644
--- a/include/linux/raid/bitmap.h
+++ b/include/linux/raid/bitmap.h
@@ -235,6 +235,8 @@ struct bitmap {
235 235
236 unsigned long flags; 236 unsigned long flags;
237 237
238 int allclean;
239
238 unsigned long max_write_behind; /* write-behind mode */ 240 unsigned long max_write_behind; /* write-behind mode */
239 atomic_t behind_writes; 241 atomic_t behind_writes;
240 242
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h
index 85a068bab625..7bb6d1abf71e 100644
--- a/include/linux/raid/md_k.h
+++ b/include/linux/raid/md_k.h
@@ -83,6 +83,7 @@ struct mdk_rdev_s
83#define BarriersNotsupp 5 /* BIO_RW_BARRIER is not supported */ 83#define BarriersNotsupp 5 /* BIO_RW_BARRIER is not supported */
84#define AllReserved 6 /* If whole device is reserved for 84#define AllReserved 6 /* If whole device is reserved for
85 * one array */ 85 * one array */
86#define AutoDetected 7 /* added by auto-detect */
86 87
87 int desc_nr; /* descriptor index in the superblock */ 88 int desc_nr; /* descriptor index in the superblock */
88 int raid_disk; /* role of device in array */ 89 int raid_disk; /* role of device in array */
diff --git a/include/linux/rcuclassic.h b/include/linux/rcuclassic.h
index 4d6624260b4c..b3dccd68629e 100644
--- a/include/linux/rcuclassic.h
+++ b/include/linux/rcuclassic.h
@@ -160,5 +160,8 @@ extern void rcu_restart_cpu(int cpu);
160extern long rcu_batches_completed(void); 160extern long rcu_batches_completed(void);
161extern long rcu_batches_completed_bh(void); 161extern long rcu_batches_completed_bh(void);
162 162
163#define rcu_enter_nohz() do { } while (0)
164#define rcu_exit_nohz() do { } while (0)
165
163#endif /* __KERNEL__ */ 166#endif /* __KERNEL__ */
164#endif /* __LINUX_RCUCLASSIC_H */ 167#endif /* __LINUX_RCUCLASSIC_H */
diff --git a/include/linux/rcupreempt.h b/include/linux/rcupreempt.h
index 60c2a033b19e..01152ed532c8 100644
--- a/include/linux/rcupreempt.h
+++ b/include/linux/rcupreempt.h
@@ -82,5 +82,27 @@ extern struct rcupreempt_trace *rcupreempt_trace_cpu(int cpu);
82 82
83struct softirq_action; 83struct softirq_action;
84 84
85#ifdef CONFIG_NO_HZ
86DECLARE_PER_CPU(long, dynticks_progress_counter);
87
88static inline void rcu_enter_nohz(void)
89{
90 __get_cpu_var(dynticks_progress_counter)++;
91 WARN_ON(__get_cpu_var(dynticks_progress_counter) & 0x1);
92 mb();
93}
94
95static inline void rcu_exit_nohz(void)
96{
97 mb();
98 __get_cpu_var(dynticks_progress_counter)++;
99 WARN_ON(!(__get_cpu_var(dynticks_progress_counter) & 0x1));
100}
101
102#else /* CONFIG_NO_HZ */
103#define rcu_enter_nohz() do { } while (0)
104#define rcu_exit_nohz() do { } while (0)
105#endif /* CONFIG_NO_HZ */
106
85#endif /* __KERNEL__ */ 107#endif /* __KERNEL__ */
86#endif /* __LINUX_RCUPREEMPT_H */ 108#endif /* __LINUX_RCUPREEMPT_H */
diff --git a/include/linux/sched.h b/include/linux/sched.h
index e217d188a102..11d8e9a74eff 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -242,6 +242,7 @@ struct task_struct;
242 242
243extern void sched_init(void); 243extern void sched_init(void);
244extern void sched_init_smp(void); 244extern void sched_init_smp(void);
245extern asmlinkage void schedule_tail(struct task_struct *prev);
245extern void init_idle(struct task_struct *idle, int cpu); 246extern void init_idle(struct task_struct *idle, int cpu);
246extern void init_idle_bootup_task(struct task_struct *idle); 247extern void init_idle_bootup_task(struct task_struct *idle);
247 248
@@ -898,6 +899,10 @@ struct sched_class {
898 int running); 899 int running);
899 void (*prio_changed) (struct rq *this_rq, struct task_struct *task, 900 void (*prio_changed) (struct rq *this_rq, struct task_struct *task,
900 int oldprio, int running); 901 int oldprio, int running);
902
903#ifdef CONFIG_FAIR_GROUP_SCHED
904 void (*moved_group) (struct task_struct *p);
905#endif
901}; 906};
902 907
903struct load_weight { 908struct load_weight {
@@ -1189,7 +1194,7 @@ struct task_struct {
1189 int softirq_context; 1194 int softirq_context;
1190#endif 1195#endif
1191#ifdef CONFIG_LOCKDEP 1196#ifdef CONFIG_LOCKDEP
1192# define MAX_LOCK_DEPTH 30UL 1197# define MAX_LOCK_DEPTH 48UL
1193 u64 curr_chain_key; 1198 u64 curr_chain_key;
1194 int lockdep_depth; 1199 int lockdep_depth;
1195 struct held_lock held_locks[MAX_LOCK_DEPTH]; 1200 struct held_lock held_locks[MAX_LOCK_DEPTH];
@@ -1541,10 +1546,6 @@ extern unsigned int sysctl_sched_child_runs_first;
1541extern unsigned int sysctl_sched_features; 1546extern unsigned int sysctl_sched_features;
1542extern unsigned int sysctl_sched_migration_cost; 1547extern unsigned int sysctl_sched_migration_cost;
1543extern unsigned int sysctl_sched_nr_migrate; 1548extern unsigned int sysctl_sched_nr_migrate;
1544#if defined(CONFIG_FAIR_GROUP_SCHED) && defined(CONFIG_SMP)
1545extern unsigned int sysctl_sched_min_bal_int_shares;
1546extern unsigned int sysctl_sched_max_bal_int_shares;
1547#endif
1548 1549
1549int sched_nr_latency_handler(struct ctl_table *table, int write, 1550int sched_nr_latency_handler(struct ctl_table *table, int write,
1550 struct file *file, void __user *buffer, size_t *length, 1551 struct file *file, void __user *buffer, size_t *length,
diff --git a/include/linux/security.h b/include/linux/security.h
index fe52cdeab0a6..b07357ca2137 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -34,12 +34,6 @@
34#include <linux/xfrm.h> 34#include <linux/xfrm.h>
35#include <net/flow.h> 35#include <net/flow.h>
36 36
37/* only a char in selinux superblock security struct flags */
38#define FSCONTEXT_MNT 0x01
39#define CONTEXT_MNT 0x02
40#define ROOTCONTEXT_MNT 0x04
41#define DEFCONTEXT_MNT 0x08
42
43extern unsigned securebits; 37extern unsigned securebits;
44 38
45struct ctl_table; 39struct ctl_table;
@@ -114,6 +108,32 @@ struct request_sock;
114 108
115#ifdef CONFIG_SECURITY 109#ifdef CONFIG_SECURITY
116 110
111struct security_mnt_opts {
112 char **mnt_opts;
113 int *mnt_opts_flags;
114 int num_mnt_opts;
115};
116
117static inline void security_init_mnt_opts(struct security_mnt_opts *opts)
118{
119 opts->mnt_opts = NULL;
120 opts->mnt_opts_flags = NULL;
121 opts->num_mnt_opts = 0;
122}
123
124static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
125{
126 int i;
127 if (opts->mnt_opts)
128 for(i = 0; i < opts->num_mnt_opts; i++)
129 kfree(opts->mnt_opts[i]);
130 kfree(opts->mnt_opts);
131 opts->mnt_opts = NULL;
132 kfree(opts->mnt_opts_flags);
133 opts->mnt_opts_flags = NULL;
134 opts->num_mnt_opts = 0;
135}
136
117/** 137/**
118 * struct security_operations - main security structure 138 * struct security_operations - main security structure
119 * 139 *
@@ -262,19 +282,19 @@ struct request_sock;
262 * @sb_get_mnt_opts: 282 * @sb_get_mnt_opts:
263 * Get the security relevant mount options used for a superblock 283 * Get the security relevant mount options used for a superblock
264 * @sb the superblock to get security mount options from 284 * @sb the superblock to get security mount options from
265 * @mount_options array for pointers to mount options 285 * @opts binary data structure containing all lsm mount data
266 * @mount_flags array of ints specifying what each mount options is
267 * @num_opts number of options in the arrays
268 * @sb_set_mnt_opts: 286 * @sb_set_mnt_opts:
269 * Set the security relevant mount options used for a superblock 287 * Set the security relevant mount options used for a superblock
270 * @sb the superblock to set security mount options for 288 * @sb the superblock to set security mount options for
271 * @mount_options array for pointers to mount options 289 * @opts binary data structure containing all lsm mount data
272 * @mount_flags array of ints specifying what each mount options is
273 * @num_opts number of options in the arrays
274 * @sb_clone_mnt_opts: 290 * @sb_clone_mnt_opts:
275 * Copy all security options from a given superblock to another 291 * Copy all security options from a given superblock to another
276 * @oldsb old superblock which contain information to clone 292 * @oldsb old superblock which contain information to clone
277 * @newsb new superblock which needs filled in 293 * @newsb new superblock which needs filled in
294 * @sb_parse_opts_str:
295 * Parse a string of security data filling in the opts structure
296 * @options string containing all mount options known by the LSM
297 * @opts binary data structure usable by the LSM
278 * 298 *
279 * Security hooks for inode operations. 299 * Security hooks for inode operations.
280 * 300 *
@@ -1238,8 +1258,7 @@ struct security_operations {
1238 1258
1239 int (*sb_alloc_security) (struct super_block * sb); 1259 int (*sb_alloc_security) (struct super_block * sb);
1240 void (*sb_free_security) (struct super_block * sb); 1260 void (*sb_free_security) (struct super_block * sb);
1241 int (*sb_copy_data)(struct file_system_type *type, 1261 int (*sb_copy_data)(char *orig, char *copy);
1242 void *orig, void *copy);
1243 int (*sb_kern_mount) (struct super_block *sb, void *data); 1262 int (*sb_kern_mount) (struct super_block *sb, void *data);
1244 int (*sb_statfs) (struct dentry *dentry); 1263 int (*sb_statfs) (struct dentry *dentry);
1245 int (*sb_mount) (char *dev_name, struct nameidata * nd, 1264 int (*sb_mount) (char *dev_name, struct nameidata * nd,
@@ -1257,12 +1276,12 @@ struct security_operations {
1257 void (*sb_post_pivotroot) (struct nameidata * old_nd, 1276 void (*sb_post_pivotroot) (struct nameidata * old_nd,
1258 struct nameidata * new_nd); 1277 struct nameidata * new_nd);
1259 int (*sb_get_mnt_opts) (const struct super_block *sb, 1278 int (*sb_get_mnt_opts) (const struct super_block *sb,
1260 char ***mount_options, int **flags, 1279 struct security_mnt_opts *opts);
1261 int *num_opts); 1280 int (*sb_set_mnt_opts) (struct super_block *sb,
1262 int (*sb_set_mnt_opts) (struct super_block *sb, char **mount_options, 1281 struct security_mnt_opts *opts);
1263 int *flags, int num_opts);
1264 void (*sb_clone_mnt_opts) (const struct super_block *oldsb, 1282 void (*sb_clone_mnt_opts) (const struct super_block *oldsb,
1265 struct super_block *newsb); 1283 struct super_block *newsb);
1284 int (*sb_parse_opts_str) (char *options, struct security_mnt_opts *opts);
1266 1285
1267 int (*inode_alloc_security) (struct inode *inode); 1286 int (*inode_alloc_security) (struct inode *inode);
1268 void (*inode_free_security) (struct inode *inode); 1287 void (*inode_free_security) (struct inode *inode);
@@ -1507,7 +1526,7 @@ int security_bprm_check(struct linux_binprm *bprm);
1507int security_bprm_secureexec(struct linux_binprm *bprm); 1526int security_bprm_secureexec(struct linux_binprm *bprm);
1508int security_sb_alloc(struct super_block *sb); 1527int security_sb_alloc(struct super_block *sb);
1509void security_sb_free(struct super_block *sb); 1528void security_sb_free(struct super_block *sb);
1510int security_sb_copy_data(struct file_system_type *type, void *orig, void *copy); 1529int security_sb_copy_data(char *orig, char *copy);
1511int security_sb_kern_mount(struct super_block *sb, void *data); 1530int security_sb_kern_mount(struct super_block *sb, void *data);
1512int security_sb_statfs(struct dentry *dentry); 1531int security_sb_statfs(struct dentry *dentry);
1513int security_sb_mount(char *dev_name, struct nameidata *nd, 1532int security_sb_mount(char *dev_name, struct nameidata *nd,
@@ -1520,12 +1539,12 @@ void security_sb_post_remount(struct vfsmount *mnt, unsigned long flags, void *d
1520void security_sb_post_addmount(struct vfsmount *mnt, struct nameidata *mountpoint_nd); 1539void security_sb_post_addmount(struct vfsmount *mnt, struct nameidata *mountpoint_nd);
1521int security_sb_pivotroot(struct nameidata *old_nd, struct nameidata *new_nd); 1540int security_sb_pivotroot(struct nameidata *old_nd, struct nameidata *new_nd);
1522void security_sb_post_pivotroot(struct nameidata *old_nd, struct nameidata *new_nd); 1541void security_sb_post_pivotroot(struct nameidata *old_nd, struct nameidata *new_nd);
1523int security_sb_get_mnt_opts(const struct super_block *sb, char ***mount_options, 1542int security_sb_get_mnt_opts(const struct super_block *sb,
1524 int **flags, int *num_opts); 1543 struct security_mnt_opts *opts);
1525int security_sb_set_mnt_opts(struct super_block *sb, char **mount_options, 1544int security_sb_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts);
1526 int *flags, int num_opts);
1527void security_sb_clone_mnt_opts(const struct super_block *oldsb, 1545void security_sb_clone_mnt_opts(const struct super_block *oldsb,
1528 struct super_block *newsb); 1546 struct super_block *newsb);
1547int security_sb_parse_opts_str(char *options, struct security_mnt_opts *opts);
1529 1548
1530int security_inode_alloc(struct inode *inode); 1549int security_inode_alloc(struct inode *inode);
1531void security_inode_free(struct inode *inode); 1550void security_inode_free(struct inode *inode);
@@ -1635,6 +1654,16 @@ int security_secctx_to_secid(char *secdata, u32 seclen, u32 *secid);
1635void security_release_secctx(char *secdata, u32 seclen); 1654void security_release_secctx(char *secdata, u32 seclen);
1636 1655
1637#else /* CONFIG_SECURITY */ 1656#else /* CONFIG_SECURITY */
1657struct security_mnt_opts {
1658};
1659
1660static inline void security_init_mnt_opts(struct security_mnt_opts *opts)
1661{
1662}
1663
1664static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
1665{
1666}
1638 1667
1639/* 1668/*
1640 * This is the default capabilities functionality. Most of these functions 1669 * This is the default capabilities functionality. Most of these functions
@@ -1762,8 +1791,7 @@ static inline int security_sb_alloc (struct super_block *sb)
1762static inline void security_sb_free (struct super_block *sb) 1791static inline void security_sb_free (struct super_block *sb)
1763{ } 1792{ }
1764 1793
1765static inline int security_sb_copy_data (struct file_system_type *type, 1794static inline int security_sb_copy_data (char *orig, char *copy)
1766 void *orig, void *copy)
1767{ 1795{
1768 return 0; 1796 return 0;
1769} 1797}
@@ -1819,6 +1847,27 @@ static inline int security_sb_pivotroot (struct nameidata *old_nd,
1819static inline void security_sb_post_pivotroot (struct nameidata *old_nd, 1847static inline void security_sb_post_pivotroot (struct nameidata *old_nd,
1820 struct nameidata *new_nd) 1848 struct nameidata *new_nd)
1821{ } 1849{ }
1850static inline int security_sb_get_mnt_opts(const struct super_block *sb,
1851 struct security_mnt_opts *opts)
1852{
1853 security_init_mnt_opts(opts);
1854 return 0;
1855}
1856
1857static inline int security_sb_set_mnt_opts(struct super_block *sb,
1858 struct security_mnt_opts *opts)
1859{
1860 return 0;
1861}
1862
1863static inline void security_sb_clone_mnt_opts(const struct super_block *oldsb,
1864 struct super_block *newsb)
1865{ }
1866
1867static inline int security_sb_parse_opts_str(char *options, struct security_mnt_opts *opts)
1868{
1869 return 0;
1870}
1822 1871
1823static inline int security_inode_alloc (struct inode *inode) 1872static inline int security_inode_alloc (struct inode *inode)
1824{ 1873{
diff --git a/include/asm-sh/sci.h b/include/linux/serial_sci.h
index 52e73660c129..893cc53486bc 100644
--- a/include/asm-sh/sci.h
+++ b/include/linux/serial_sci.h
@@ -1,12 +1,10 @@
1#ifndef __ASM_SH_SCI_H 1#ifndef __LINUX_SERIAL_SCI_H
2#define __ASM_SH_SCI_H 2#define __LINUX_SERIAL_SCI_H
3 3
4#include <linux/serial_core.h> 4#include <linux/serial_core.h>
5 5
6/* 6/*
7 * Generic header for SuperH SCI(F) 7 * Generic header for SuperH SCI(F) (used by sh/sh64/h8300 and related parts)
8 *
9 * Do not place SH-specific parts in here, sh64 and h8300 depend on this too.
10 */ 8 */
11 9
12/* Offsets into the sci_port->irqs array */ 10/* Offsets into the sci_port->irqs array */
@@ -31,4 +29,4 @@ struct plat_sci_port {
31 29
32int early_sci_setup(struct uart_port *port); 30int early_sci_setup(struct uart_port *port);
33 31
34#endif /* __ASM_SH_SCI_H */ 32#endif /* __LINUX_SERIAL_SCI_H */
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 412672a79e8a..bbd8d0027e2f 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -232,6 +232,8 @@ typedef unsigned char *sk_buff_data_t;
232 * @mark: Generic packet mark 232 * @mark: Generic packet mark
233 * @nfct: Associated connection, if any 233 * @nfct: Associated connection, if any
234 * @ipvs_property: skbuff is owned by ipvs 234 * @ipvs_property: skbuff is owned by ipvs
235 * @peeked: this packet has been seen already, so stats have been
236 * done for it, don't do them again
235 * @nf_trace: netfilter packet trace flag 237 * @nf_trace: netfilter packet trace flag
236 * @nfctinfo: Relationship of this skb to the connection 238 * @nfctinfo: Relationship of this skb to the connection
237 * @nfct_reasm: netfilter conntrack re-assembly pointer 239 * @nfct_reasm: netfilter conntrack re-assembly pointer
diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h
index fcc48096ee64..39c3a5eb8ebe 100644
--- a/include/linux/slab_def.h
+++ b/include/linux/slab_def.h
@@ -41,7 +41,7 @@ static inline void *kmalloc(size_t size, gfp_t flags)
41 goto found; \ 41 goto found; \
42 else \ 42 else \
43 i++; 43 i++;
44#include "kmalloc_sizes.h" 44#include <linux/kmalloc_sizes.h>
45#undef CACHE 45#undef CACHE
46 { 46 {
47 extern void __you_cannot_kmalloc_that_much(void); 47 extern void __you_cannot_kmalloc_that_much(void);
@@ -75,7 +75,7 @@ static inline void *kmalloc_node(size_t size, gfp_t flags, int node)
75 goto found; \ 75 goto found; \
76 else \ 76 else \
77 i++; 77 i++;
78#include "kmalloc_sizes.h" 78#include <linux/kmalloc_sizes.h>
79#undef CACHE 79#undef CACHE
80 { 80 {
81 extern void __you_cannot_kmalloc_that_much(void); 81 extern void __you_cannot_kmalloc_that_much(void);
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
index 57deecc79d52..b00c1c73eb0a 100644
--- a/include/linux/slub_def.h
+++ b/include/linux/slub_def.h
@@ -61,7 +61,7 @@ struct kmem_cache {
61 int size; /* The size of an object including meta data */ 61 int size; /* The size of an object including meta data */
62 int objsize; /* The size of an object without meta data */ 62 int objsize; /* The size of an object without meta data */
63 int offset; /* Free pointer offset. */ 63 int offset; /* Free pointer offset. */
64 int order; 64 int order; /* Current preferred allocation order */
65 65
66 /* 66 /*
67 * Avoid an extra cache line for UP, SMP and for the node local to 67 * Avoid an extra cache line for UP, SMP and for the node local to
@@ -138,11 +138,11 @@ static __always_inline int kmalloc_index(size_t size)
138 if (size <= 512) return 9; 138 if (size <= 512) return 9;
139 if (size <= 1024) return 10; 139 if (size <= 1024) return 10;
140 if (size <= 2 * 1024) return 11; 140 if (size <= 2 * 1024) return 11;
141 if (size <= 4 * 1024) return 12;
141/* 142/*
142 * The following is only needed to support architectures with a larger page 143 * The following is only needed to support architectures with a larger page
143 * size than 4k. 144 * size than 4k.
144 */ 145 */
145 if (size <= 4 * 1024) return 12;
146 if (size <= 8 * 1024) return 13; 146 if (size <= 8 * 1024) return 13;
147 if (size <= 16 * 1024) return 14; 147 if (size <= 16 * 1024) return 14;
148 if (size <= 32 * 1024) return 15; 148 if (size <= 32 * 1024) return 15;
diff --git a/include/linux/sm501-regs.h b/include/linux/sm501-regs.h
index 64236b73c724..d53642d2d899 100644
--- a/include/linux/sm501-regs.h
+++ b/include/linux/sm501-regs.h
@@ -129,11 +129,14 @@
129 129
130#define SM501_DEVICEID_SM501 (0x05010000) 130#define SM501_DEVICEID_SM501 (0x05010000)
131#define SM501_DEVICEID_IDMASK (0xffff0000) 131#define SM501_DEVICEID_IDMASK (0xffff0000)
132#define SM501_DEVICEID_REVMASK (0x000000ff)
132 133
133#define SM501_PLLCLOCK_COUNT (0x000064) 134#define SM501_PLLCLOCK_COUNT (0x000064)
134#define SM501_MISC_TIMING (0x000068) 135#define SM501_MISC_TIMING (0x000068)
135#define SM501_CURRENT_SDRAM_CLOCK (0x00006C) 136#define SM501_CURRENT_SDRAM_CLOCK (0x00006C)
136 137
138#define SM501_PROGRAMMABLE_PLL_CONTROL (0x000074)
139
137/* GPIO base */ 140/* GPIO base */
138#define SM501_GPIO (0x010000) 141#define SM501_GPIO (0x010000)
139#define SM501_GPIO_DATA_LOW (0x00) 142#define SM501_GPIO_DATA_LOW (0x00)
diff --git a/include/linux/sm501.h b/include/linux/sm501.h
index 932a9efee8a5..bca134544700 100644
--- a/include/linux/sm501.h
+++ b/include/linux/sm501.h
@@ -24,7 +24,8 @@ extern int sm501_unit_power(struct device *dev,
24extern unsigned long sm501_set_clock(struct device *dev, 24extern unsigned long sm501_set_clock(struct device *dev,
25 int clksrc, unsigned long freq); 25 int clksrc, unsigned long freq);
26 26
27extern unsigned long sm501_find_clock(int clksrc, unsigned long req_freq); 27extern unsigned long sm501_find_clock(struct device *dev,
28 int clksrc, unsigned long req_freq);
28 29
29/* sm501_misc_control 30/* sm501_misc_control
30 * 31 *
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h
index 9d5da8b2ccf9..20add65215af 100644
--- a/include/linux/ssb/ssb.h
+++ b/include/linux/ssb/ssb.h
@@ -282,6 +282,13 @@ struct ssb_bus {
282 struct ssb_boardinfo boardinfo; 282 struct ssb_boardinfo boardinfo;
283 /* Contents of the SPROM. */ 283 /* Contents of the SPROM. */
284 struct ssb_sprom sprom; 284 struct ssb_sprom sprom;
285 /* If the board has a cardbus slot, this is set to true. */
286 bool has_cardbus_slot;
287
288#ifdef CONFIG_SSB_EMBEDDED
289 /* Lock for GPIO register access. */
290 spinlock_t gpio_lock;
291#endif /* EMBEDDED */
285 292
286 /* Internal-only stuff follows. Do not touch. */ 293 /* Internal-only stuff follows. Do not touch. */
287 struct list_head list; 294 struct list_head list;
@@ -294,8 +301,13 @@ struct ssb_bus {
294 301
295/* The initialization-invariants. */ 302/* The initialization-invariants. */
296struct ssb_init_invariants { 303struct ssb_init_invariants {
304 /* Versioning information about the PCB. */
297 struct ssb_boardinfo boardinfo; 305 struct ssb_boardinfo boardinfo;
306 /* The SPROM information. That's either stored in an
307 * EEPROM or NVRAM on the board. */
298 struct ssb_sprom sprom; 308 struct ssb_sprom sprom;
309 /* If the board has a cardbus slot, this is set to true. */
310 bool has_cardbus_slot;
299}; 311};
300/* Type of function to fetch the invariants. */ 312/* Type of function to fetch the invariants. */
301typedef int (*ssb_invariants_func_t)(struct ssb_bus *bus, 313typedef int (*ssb_invariants_func_t)(struct ssb_bus *bus,
diff --git a/include/linux/ssb/ssb_driver_chipcommon.h b/include/linux/ssb/ssb_driver_chipcommon.h
index 4cb995494662..536851b946f6 100644
--- a/include/linux/ssb/ssb_driver_chipcommon.h
+++ b/include/linux/ssb/ssb_driver_chipcommon.h
@@ -51,9 +51,12 @@
51#define SSB_CHIPCO_CAP_JTAGM 0x00400000 /* JTAG master present */ 51#define SSB_CHIPCO_CAP_JTAGM 0x00400000 /* JTAG master present */
52#define SSB_CHIPCO_CAP_BROM 0x00800000 /* Internal boot ROM active */ 52#define SSB_CHIPCO_CAP_BROM 0x00800000 /* Internal boot ROM active */
53#define SSB_CHIPCO_CAP_64BIT 0x08000000 /* 64-bit Backplane */ 53#define SSB_CHIPCO_CAP_64BIT 0x08000000 /* 64-bit Backplane */
54#define SSB_CHIPCO_CAP_PMU 0x10000000 /* PMU available (rev >= 20) */
55#define SSB_CHIPCO_CAP_ECI 0x20000000 /* ECI available (rev >= 20) */
54#define SSB_CHIPCO_CORECTL 0x0008 56#define SSB_CHIPCO_CORECTL 0x0008
55#define SSB_CHIPCO_CORECTL_UARTCLK0 0x00000001 /* Drive UART with internal clock */ 57#define SSB_CHIPCO_CORECTL_UARTCLK0 0x00000001 /* Drive UART with internal clock */
56#define SSB_CHIPCO_CORECTL_SE 0x00000002 /* sync clk out enable (corerev >= 3) */ 58#define SSB_CHIPCO_CORECTL_SE 0x00000002 /* sync clk out enable (corerev >= 3) */
59#define SSB_CHIPCO_CORECTL_UARTCLKEN 0x00000008 /* UART clock enable (rev >= 21) */
57#define SSB_CHIPCO_BIST 0x000C 60#define SSB_CHIPCO_BIST 0x000C
58#define SSB_CHIPCO_OTPS 0x0010 /* OTP status */ 61#define SSB_CHIPCO_OTPS 0x0010 /* OTP status */
59#define SSB_CHIPCO_OTPS_PROGFAIL 0x80000000 62#define SSB_CHIPCO_OTPS_PROGFAIL 0x80000000
@@ -357,6 +360,11 @@ struct ssb_chipcommon {
357 u16 fast_pwrup_delay; 360 u16 fast_pwrup_delay;
358}; 361};
359 362
363static inline bool ssb_chipco_available(struct ssb_chipcommon *cc)
364{
365 return (cc->dev != NULL);
366}
367
360extern void ssb_chipcommon_init(struct ssb_chipcommon *cc); 368extern void ssb_chipcommon_init(struct ssb_chipcommon *cc);
361 369
362#include <linux/pm.h> 370#include <linux/pm.h>
@@ -382,11 +390,13 @@ extern void ssb_chipco_set_clockmode(struct ssb_chipcommon *cc,
382extern void ssb_chipco_watchdog_timer_set(struct ssb_chipcommon *cc, 390extern void ssb_chipco_watchdog_timer_set(struct ssb_chipcommon *cc,
383 u32 ticks); 391 u32 ticks);
384 392
393/* Chipcommon GPIO pin access. */
385u32 ssb_chipco_gpio_in(struct ssb_chipcommon *cc, u32 mask); 394u32 ssb_chipco_gpio_in(struct ssb_chipcommon *cc, u32 mask);
386 395u32 ssb_chipco_gpio_out(struct ssb_chipcommon *cc, u32 mask, u32 value);
387void ssb_chipco_gpio_out(struct ssb_chipcommon *cc, u32 mask, u32 value); 396u32 ssb_chipco_gpio_outen(struct ssb_chipcommon *cc, u32 mask, u32 value);
388 397u32 ssb_chipco_gpio_control(struct ssb_chipcommon *cc, u32 mask, u32 value);
389void ssb_chipco_gpio_outen(struct ssb_chipcommon *cc, u32 mask, u32 value); 398u32 ssb_chipco_gpio_intmask(struct ssb_chipcommon *cc, u32 mask, u32 value);
399u32 ssb_chipco_gpio_polarity(struct ssb_chipcommon *cc, u32 mask, u32 value);
390 400
391#ifdef CONFIG_SSB_SERIAL 401#ifdef CONFIG_SSB_SERIAL
392extern int ssb_chipco_serial_init(struct ssb_chipcommon *cc, 402extern int ssb_chipco_serial_init(struct ssb_chipcommon *cc,
diff --git a/include/linux/ssb/ssb_driver_extif.h b/include/linux/ssb/ssb_driver_extif.h
index a9164357b5ae..91161f0aa22b 100644
--- a/include/linux/ssb/ssb_driver_extif.h
+++ b/include/linux/ssb/ssb_driver_extif.h
@@ -171,11 +171,15 @@ extern void ssb_extif_get_clockcontrol(struct ssb_extif *extif,
171extern void ssb_extif_timing_init(struct ssb_extif *extif, 171extern void ssb_extif_timing_init(struct ssb_extif *extif,
172 unsigned long ns); 172 unsigned long ns);
173 173
174u32 ssb_extif_gpio_in(struct ssb_extif *extif, u32 mask); 174extern void ssb_extif_watchdog_timer_set(struct ssb_extif *extif,
175 175 u32 ticks);
176void ssb_extif_gpio_out(struct ssb_extif *extif, u32 mask, u32 value);
177 176
178void ssb_extif_gpio_outen(struct ssb_extif *extif, u32 mask, u32 value); 177/* Extif GPIO pin access */
178u32 ssb_extif_gpio_in(struct ssb_extif *extif, u32 mask);
179u32 ssb_extif_gpio_out(struct ssb_extif *extif, u32 mask, u32 value);
180u32 ssb_extif_gpio_outen(struct ssb_extif *extif, u32 mask, u32 value);
181u32 ssb_extif_gpio_polarity(struct ssb_extif *extif, u32 mask, u32 value);
182u32 ssb_extif_gpio_intmask(struct ssb_extif *extif, u32 mask, u32 value);
179 183
180#ifdef CONFIG_SSB_SERIAL 184#ifdef CONFIG_SSB_SERIAL
181extern int ssb_extif_serial_init(struct ssb_extif *extif, 185extern int ssb_extif_serial_init(struct ssb_extif *extif,
@@ -200,5 +204,11 @@ void ssb_extif_get_clockcontrol(struct ssb_extif *extif,
200{ 204{
201} 205}
202 206
207static inline
208void ssb_extif_watchdog_timer_set(struct ssb_extif *extif,
209 u32 ticks)
210{
211}
212
203#endif /* CONFIG_SSB_DRIVER_EXTIF */ 213#endif /* CONFIG_SSB_DRIVER_EXTIF */
204#endif /* LINUX_SSB_EXTIFCORE_H_ */ 214#endif /* LINUX_SSB_EXTIFCORE_H_ */
diff --git a/include/linux/ssb/ssb_driver_pci.h b/include/linux/ssb/ssb_driver_pci.h
index 9cfffb7b1a27..5e25bac4ed31 100644
--- a/include/linux/ssb/ssb_driver_pci.h
+++ b/include/linux/ssb/ssb_driver_pci.h
@@ -51,6 +51,11 @@
51#define SSB_PCICORE_SBTOPCI1_MASK 0xFC000000 51#define SSB_PCICORE_SBTOPCI1_MASK 0xFC000000
52#define SSB_PCICORE_SBTOPCI2 0x0108 /* Backplane to PCI translation 2 (sbtopci2) */ 52#define SSB_PCICORE_SBTOPCI2 0x0108 /* Backplane to PCI translation 2 (sbtopci2) */
53#define SSB_PCICORE_SBTOPCI2_MASK 0xC0000000 53#define SSB_PCICORE_SBTOPCI2_MASK 0xC0000000
54#define SSB_PCICORE_PCICFG0 0x0400 /* PCI config space 0 (rev >= 8) */
55#define SSB_PCICORE_PCICFG1 0x0500 /* PCI config space 1 (rev >= 8) */
56#define SSB_PCICORE_PCICFG2 0x0600 /* PCI config space 2 (rev >= 8) */
57#define SSB_PCICORE_PCICFG3 0x0700 /* PCI config space 3 (rev >= 8) */
58#define SSB_PCICORE_SPROM(wordoffset) (0x0800 + ((wordoffset) * 2)) /* SPROM shadow area (72 bytes) */
54 59
55/* SBtoPCIx */ 60/* SBtoPCIx */
56#define SSB_PCICORE_SBTOPCI_MEM 0x00000000 61#define SSB_PCICORE_SBTOPCI_MEM 0x00000000
diff --git a/include/linux/ssb/ssb_embedded.h b/include/linux/ssb/ssb_embedded.h
new file mode 100644
index 000000000000..8d8dedff059d
--- /dev/null
+++ b/include/linux/ssb/ssb_embedded.h
@@ -0,0 +1,18 @@
1#ifndef LINUX_SSB_EMBEDDED_H_
2#define LINUX_SSB_EMBEDDED_H_
3
4#include <linux/types.h>
5#include <linux/ssb/ssb.h>
6
7
8extern int ssb_watchdog_timer_set(struct ssb_bus *bus, u32 ticks);
9
10/* Generic GPIO API */
11u32 ssb_gpio_in(struct ssb_bus *bus, u32 mask);
12u32 ssb_gpio_out(struct ssb_bus *bus, u32 mask, u32 value);
13u32 ssb_gpio_outen(struct ssb_bus *bus, u32 mask, u32 value);
14u32 ssb_gpio_control(struct ssb_bus *bus, u32 mask, u32 value);
15u32 ssb_gpio_intmask(struct ssb_bus *bus, u32 mask, u32 value);
16u32 ssb_gpio_polarity(struct ssb_bus *bus, u32 mask, u32 value);
17
18#endif /* LINUX_SSB_EMBEDDED_H_ */
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 2372e2e6b527..583e0481dfa0 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -94,10 +94,9 @@ enum usb_interface_condition {
94 * @altsetting: array of interface structures, one for each alternate 94 * @altsetting: array of interface structures, one for each alternate
95 * setting that may be selected. Each one includes a set of 95 * setting that may be selected. Each one includes a set of
96 * endpoint configurations. They will be in no particular order. 96 * endpoint configurations. They will be in no particular order.
97 * @num_altsetting: number of altsettings defined.
98 * @cur_altsetting: the current altsetting. 97 * @cur_altsetting: the current altsetting.
98 * @num_altsetting: number of altsettings defined.
99 * @intf_assoc: interface association descriptor 99 * @intf_assoc: interface association descriptor
100 * @driver: the USB driver that is bound to this interface.
101 * @minor: the minor number assigned to this interface, if this 100 * @minor: the minor number assigned to this interface, if this
102 * interface is bound to a driver that uses the USB major number. 101 * interface is bound to a driver that uses the USB major number.
103 * If this interface does not use the USB major, this field should 102 * If this interface does not use the USB major, this field should
@@ -781,8 +780,7 @@ static inline int usb_endpoint_is_isoc_out(
781 .idVendor = (vend), \ 780 .idVendor = (vend), \
782 .idProduct = (prod) 781 .idProduct = (prod)
783/** 782/**
784 * USB_DEVICE_VER - macro used to describe a specific usb device with a 783 * USB_DEVICE_VER - describe a specific usb device with a version range
785 * version range
786 * @vend: the 16 bit USB Vendor ID 784 * @vend: the 16 bit USB Vendor ID
787 * @prod: the 16 bit USB Product ID 785 * @prod: the 16 bit USB Product ID
788 * @lo: the bcdDevice_lo value 786 * @lo: the bcdDevice_lo value
@@ -799,8 +797,7 @@ static inline int usb_endpoint_is_isoc_out(
799 .bcdDevice_hi = (hi) 797 .bcdDevice_hi = (hi)
800 798
801/** 799/**
802 * USB_DEVICE_INTERFACE_PROTOCOL - macro used to describe a usb 800 * USB_DEVICE_INTERFACE_PROTOCOL - describe a usb device with a specific interface protocol
803 * device with a specific interface protocol
804 * @vend: the 16 bit USB Vendor ID 801 * @vend: the 16 bit USB Vendor ID
805 * @prod: the 16 bit USB Product ID 802 * @prod: the 16 bit USB Product ID
806 * @pr: bInterfaceProtocol value 803 * @pr: bInterfaceProtocol value
@@ -846,8 +843,7 @@ static inline int usb_endpoint_is_isoc_out(
846 .bInterfaceProtocol = (pr) 843 .bInterfaceProtocol = (pr)
847 844
848/** 845/**
849 * USB_DEVICE_AND_INTERFACE_INFO - macro used to describe a specific usb device 846 * USB_DEVICE_AND_INTERFACE_INFO - describe a specific usb device with a class of usb interfaces
850 * with a class of usb interfaces
851 * @vend: the 16 bit USB Vendor ID 847 * @vend: the 16 bit USB Vendor ID
852 * @prod: the 16 bit USB Product ID 848 * @prod: the 16 bit USB Product ID
853 * @cl: bInterfaceClass value 849 * @cl: bInterfaceClass value
diff --git a/include/linux/videodev.h b/include/linux/videodev.h
index 52e3d5fd5be4..9385a566aed8 100644
--- a/include/linux/videodev.h
+++ b/include/linux/videodev.h
@@ -12,6 +12,7 @@
12#ifndef __LINUX_VIDEODEV_H 12#ifndef __LINUX_VIDEODEV_H
13#define __LINUX_VIDEODEV_H 13#define __LINUX_VIDEODEV_H
14 14
15#include <linux/ioctl.h>
15#include <linux/videodev2.h> 16#include <linux/videodev2.h>
16 17
17#if defined(CONFIG_VIDEO_V4L1_COMPAT) || !defined (__KERNEL__) 18#if defined(CONFIG_VIDEO_V4L1_COMPAT) || !defined (__KERNEL__)
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 439474f24e34..17a80177a674 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -62,6 +62,7 @@
62#define __user 62#define __user
63#include <sys/time.h> 63#include <sys/time.h>
64#endif 64#endif
65#include <linux/ioctl.h>
65#include <linux/types.h> 66#include <linux/types.h>
66 67
67/* 68/*
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h
index 75370ec0923e..9f1b4b46151e 100644
--- a/include/linux/vmstat.h
+++ b/include/linux/vmstat.h
@@ -246,8 +246,7 @@ static inline void __dec_zone_state(struct zone *zone, enum zone_stat_item item)
246static inline void __dec_zone_page_state(struct page *page, 246static inline void __dec_zone_page_state(struct page *page,
247 enum zone_stat_item item) 247 enum zone_stat_item item)
248{ 248{
249 atomic_long_dec(&page_zone(page)->vm_stat[item]); 249 __dec_zone_state(page_zone(page), item);
250 atomic_long_dec(&vm_stat[item]);
251} 250}
252 251
253/* 252/*
diff --git a/include/media/ir-common.h b/include/media/ir-common.h
index 831547d79683..a4274203f252 100644
--- a/include/media/ir-common.h
+++ b/include/media/ir-common.h
@@ -142,6 +142,7 @@ extern IR_KEYTAB_TYPE ir_codes_tt_1500[IR_KEYTAB_SIZE];
142extern IR_KEYTAB_TYPE ir_codes_fusionhdtv_mce[IR_KEYTAB_SIZE]; 142extern IR_KEYTAB_TYPE ir_codes_fusionhdtv_mce[IR_KEYTAB_SIZE];
143extern IR_KEYTAB_TYPE ir_codes_behold[IR_KEYTAB_SIZE]; 143extern IR_KEYTAB_TYPE ir_codes_behold[IR_KEYTAB_SIZE];
144extern IR_KEYTAB_TYPE ir_codes_pinnacle_pctv_hd[IR_KEYTAB_SIZE]; 144extern IR_KEYTAB_TYPE ir_codes_pinnacle_pctv_hd[IR_KEYTAB_SIZE];
145extern IR_KEYTAB_TYPE ir_codes_genius_tvgo_a11mce[IR_KEYTAB_SIZE];
145 146
146#endif 147#endif
147 148
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h
index 475d0d8275e0..316a58453134 100644
--- a/include/media/v4l2-common.h
+++ b/include/media/v4l2-common.h
@@ -61,8 +61,6 @@
61 v4l_client_printk(KERN_DEBUG, client, fmt , ## arg); \ 61 v4l_client_printk(KERN_DEBUG, client, fmt , ## arg); \
62 } while (0) 62 } while (0)
63 63
64/* Prints the ioctl in a human-readable format */
65extern void v4l_printk_ioctl(unsigned int cmd);
66 64
67/* Use this macro for non-I2C drivers. Pass the driver name as the first arg. */ 65/* Use this macro for non-I2C drivers. Pass the driver name as the first arg. */
68#define v4l_print_ioctl(name, cmd) \ 66#define v4l_print_ioctl(name, cmd) \
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
index c544c6f90893..f2114459995d 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -44,6 +44,8 @@ extern unsigned int v4l2_video_std_fps(struct v4l2_standard *vs);
44extern char *v4l2_norm_to_name(v4l2_std_id id); 44extern char *v4l2_norm_to_name(v4l2_std_id id);
45extern int v4l2_video_std_construct(struct v4l2_standard *vs, 45extern int v4l2_video_std_construct(struct v4l2_standard *vs,
46 int id, char *name); 46 int id, char *name);
47/* Prints the ioctl in a human-readable format */
48extern void v4l_printk_ioctl(unsigned int cmd);
47 49
48/* prority handling */ 50/* prority handling */
49struct v4l2_prio_state { 51struct v4l2_prio_state {
diff --git a/include/media/videobuf-core.h b/include/media/videobuf-core.h
index 97f14d469595..99033945cdee 100644
--- a/include/media/videobuf-core.h
+++ b/include/media/videobuf-core.h
@@ -149,7 +149,7 @@ struct videobuf_qtype_ops {
149}; 149};
150 150
151struct videobuf_queue { 151struct videobuf_queue {
152 struct mutex lock; 152 struct mutex vb_lock;
153 spinlock_t *irqlock; 153 spinlock_t *irqlock;
154 void *dev; /* on pci, points to struct pci_dev */ 154 void *dev; /* on pci, points to struct pci_dev */
155 155
diff --git a/include/media/videobuf-vmalloc.h b/include/media/videobuf-vmalloc.h
index 26a8958d23d1..ec63ab0fab93 100644
--- a/include/media/videobuf-vmalloc.h
+++ b/include/media/videobuf-vmalloc.h
@@ -17,7 +17,7 @@
17 17
18/* --------------------------------------------------------------------- */ 18/* --------------------------------------------------------------------- */
19 19
20struct videbuf_vmalloc_memory 20struct videobuf_vmalloc_memory
21{ 21{
22 u32 magic; 22 u32 magic;
23 23
diff --git a/include/net/ax25.h b/include/net/ax25.h
index 32a57e1dee3a..717e2192d521 100644
--- a/include/net/ax25.h
+++ b/include/net/ax25.h
@@ -324,6 +324,7 @@ extern void ax25_dama_on(ax25_cb *);
324extern void ax25_dama_off(ax25_cb *); 324extern void ax25_dama_off(ax25_cb *);
325 325
326/* ax25_ds_timer.c */ 326/* ax25_ds_timer.c */
327extern void ax25_ds_setup_timer(ax25_dev *);
327extern void ax25_ds_set_timer(ax25_dev *); 328extern void ax25_ds_set_timer(ax25_dev *);
328extern void ax25_ds_del_timer(ax25_dev *); 329extern void ax25_ds_del_timer(ax25_dev *);
329extern void ax25_ds_timer(ax25_cb *); 330extern void ax25_ds_timer(ax25_cb *);
@@ -416,6 +417,7 @@ extern void ax25_calculate_rtt(ax25_cb *);
416extern void ax25_disconnect(ax25_cb *, int); 417extern void ax25_disconnect(ax25_cb *, int);
417 418
418/* ax25_timer.c */ 419/* ax25_timer.c */
420extern void ax25_setup_timers(ax25_cb *);
419extern void ax25_start_heartbeat(ax25_cb *); 421extern void ax25_start_heartbeat(ax25_cb *);
420extern void ax25_start_t1timer(ax25_cb *); 422extern void ax25_start_t1timer(ax25_cb *);
421extern void ax25_start_t2timer(ax25_cb *); 423extern void ax25_start_t2timer(ax25_cb *);
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h
index 70013c5f4e59..89cd011edb99 100644
--- a/include/net/inet_sock.h
+++ b/include/net/inet_sock.h
@@ -175,7 +175,8 @@ extern void build_ehash_secret(void);
175static inline unsigned int inet_ehashfn(const __be32 laddr, const __u16 lport, 175static inline unsigned int inet_ehashfn(const __be32 laddr, const __u16 lport,
176 const __be32 faddr, const __be16 fport) 176 const __be32 faddr, const __be16 fport)
177{ 177{
178 return jhash_2words((__force __u32) laddr ^ (__force __u32) faddr, 178 return jhash_3words((__force __u32) laddr,
179 (__force __u32) faddr,
179 ((__u32) lport) << 16 | (__force __u32)fport, 180 ((__u32) lport) << 16 | (__force __u32)fport,
180 inet_ehash_secret); 181 inet_ehash_secret);
181} 182}
diff --git a/include/net/ip6_tunnel.h b/include/net/ip6_tunnel.h
index c17fa1fdc356..6512d85f11b3 100644
--- a/include/net/ip6_tunnel.h
+++ b/include/net/ip6_tunnel.h
@@ -14,8 +14,6 @@
14/* capable of receiving packets */ 14/* capable of receiving packets */
15#define IP6_TNL_F_CAP_RCV 0x20000 15#define IP6_TNL_F_CAP_RCV 0x20000
16 16
17#define IP6_TNL_MAX 128
18
19/* IPv6 tunnel */ 17/* IPv6 tunnel */
20 18
21struct ip6_tnl { 19struct ip6_tnl {
diff --git a/include/net/ndisc.h b/include/net/ndisc.h
index 6684f7efbeeb..59b70624b056 100644
--- a/include/net/ndisc.h
+++ b/include/net/ndisc.h
@@ -103,7 +103,6 @@ extern void ndisc_send_redirect(struct sk_buff *skb,
103extern int ndisc_mc_map(struct in6_addr *addr, char *buf, struct net_device *dev, int dir); 103extern int ndisc_mc_map(struct in6_addr *addr, char *buf, struct net_device *dev, int dir);
104 104
105 105
106struct rt6_info * dflt_rt_lookup(void);
107 106
108/* 107/*
109 * IGMP 108 * IGMP
diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h
index 9462d6ae2f37..9619b9d35c9e 100644
--- a/include/net/sctp/user.h
+++ b/include/net/sctp/user.h
@@ -411,6 +411,7 @@ struct sctp_event_subscribe {
411 __u8 sctp_shutdown_event; 411 __u8 sctp_shutdown_event;
412 __u8 sctp_partial_delivery_event; 412 __u8 sctp_partial_delivery_event;
413 __u8 sctp_adaptation_layer_event; 413 __u8 sctp_adaptation_layer_event;
414 __u8 sctp_authentication_event;
414}; 415};
415 416
416/* 417/*
@@ -587,7 +588,7 @@ struct sctp_authchunk {
587 * endpoint requires the peer to use. 588 * endpoint requires the peer to use.
588*/ 589*/
589struct sctp_hmacalgo { 590struct sctp_hmacalgo {
590 __u16 shmac_num_idents; 591 __u32 shmac_num_idents;
591 __u16 shmac_idents[]; 592 __u16 shmac_idents[];
592}; 593};
593 594
@@ -600,7 +601,7 @@ struct sctp_hmacalgo {
600struct sctp_authkey { 601struct sctp_authkey {
601 sctp_assoc_t sca_assoc_id; 602 sctp_assoc_t sca_assoc_id;
602 __u16 sca_keynumber; 603 __u16 sca_keynumber;
603 __u16 sca_keylen; 604 __u16 sca_keylength;
604 __u8 sca_key[]; 605 __u8 sca_key[];
605}; 606};
606 607
@@ -693,8 +694,9 @@ struct sctp_status {
693 * the peer requires to be received authenticated only. 694 * the peer requires to be received authenticated only.
694 */ 695 */
695struct sctp_authchunks { 696struct sctp_authchunks {
696 sctp_assoc_t gauth_assoc_id; 697 sctp_assoc_t gauth_assoc_id;
697 uint8_t gauth_chunks[]; 698 __u32 gauth_number_of_chunks;
699 uint8_t gauth_chunks[];
698}; 700};
699 701
700/* 702/*
diff --git a/include/net/sock.h b/include/net/sock.h
index 8a7889b35810..fd9876087651 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -180,6 +180,7 @@ struct sock_common {
180 * @sk_sndmsg_off: cached offset for sendmsg 180 * @sk_sndmsg_off: cached offset for sendmsg
181 * @sk_send_head: front of stuff to transmit 181 * @sk_send_head: front of stuff to transmit
182 * @sk_security: used by security modules 182 * @sk_security: used by security modules
183 * @sk_mark: generic packet mark
183 * @sk_write_pending: a write to stream socket waits to start 184 * @sk_write_pending: a write to stream socket waits to start
184 * @sk_state_change: callback to indicate change in the state of the sock 185 * @sk_state_change: callback to indicate change in the state of the sock
185 * @sk_data_ready: callback to indicate there is data to be processed 186 * @sk_data_ready: callback to indicate there is data to be processed
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index ac72116636ca..eea7785cc757 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -508,7 +508,10 @@ struct xfrm_skb_cb {
508 } header; 508 } header;
509 509
510 /* Sequence number for replay protection. */ 510 /* Sequence number for replay protection. */
511 u64 seq; 511 union {
512 u64 output;
513 __be32 input;
514 } seq;
512}; 515};
513 516
514#define XFRM_SKB_CB(__skb) ((struct xfrm_skb_cb *)&((__skb)->cb[0])) 517#define XFRM_SKB_CB(__skb) ((struct xfrm_skb_cb *)&((__skb)->cb[0]))
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index 3ffd6b582a97..39e1cac24bb7 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -675,5 +675,6 @@ extern int sas_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy,
675 675
676extern void sas_ssp_task_response(struct device *dev, struct sas_task *task, 676extern void sas_ssp_task_response(struct device *dev, struct sas_task *task,
677 struct ssp_response_iu *iu); 677 struct ssp_response_iu *iu);
678struct sas_phy *sas_find_local_phy(struct domain_device *dev);
678 679
679#endif /* _SASLIB_H_ */ 680#endif /* _SASLIB_H_ */
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h
index dbc96ef4cc72..aab1eae2ec4c 100644
--- a/include/scsi/scsi_transport_iscsi.h
+++ b/include/scsi/scsi_transport_iscsi.h
@@ -177,6 +177,8 @@ struct iscsi_cls_session {
177 struct list_head host_list; 177 struct list_head host_list;
178 struct iscsi_transport *transport; 178 struct iscsi_transport *transport;
179 spinlock_t lock; 179 spinlock_t lock;
180 struct work_struct block_work;
181 struct work_struct unblock_work;
180 struct work_struct scan_work; 182 struct work_struct scan_work;
181 struct work_struct unbind_work; 183 struct work_struct unbind_work;
182 184
diff --git a/include/sound/opl3.h b/include/sound/opl3.h
index a0c5febdc4ea..6ba670707831 100644
--- a/include/sound/opl3.h
+++ b/include/sound/opl3.h
@@ -370,12 +370,13 @@ int snd_opl3_hwdep_new(struct snd_opl3 * opl3, int device, int seq_device,
370int snd_opl3_open(struct snd_hwdep * hw, struct file *file); 370int snd_opl3_open(struct snd_hwdep * hw, struct file *file);
371int snd_opl3_ioctl(struct snd_hwdep * hw, struct file *file, 371int snd_opl3_ioctl(struct snd_hwdep * hw, struct file *file,
372 unsigned int cmd, unsigned long arg); 372 unsigned int cmd, unsigned long arg);
373long snd_opl3_write(struct snd_hwdep *hw, const char __user *buf, long count,
374 loff_t *offset);
375int snd_opl3_release(struct snd_hwdep * hw, struct file *file); 373int snd_opl3_release(struct snd_hwdep * hw, struct file *file);
376 374
377void snd_opl3_reset(struct snd_opl3 * opl3); 375void snd_opl3_reset(struct snd_opl3 * opl3);
378 376
377#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)
378long snd_opl3_write(struct snd_hwdep *hw, const char __user *buf, long count,
379 loff_t *offset);
379int snd_opl3_load_patch(struct snd_opl3 *opl3, 380int snd_opl3_load_patch(struct snd_opl3 *opl3,
380 int prog, int bank, int type, 381 int prog, int bank, int type,
381 const char *name, 382 const char *name,
@@ -384,5 +385,9 @@ int snd_opl3_load_patch(struct snd_opl3 *opl3,
384struct fm_patch *snd_opl3_find_patch(struct snd_opl3 *opl3, int prog, int bank, 385struct fm_patch *snd_opl3_find_patch(struct snd_opl3 *opl3, int prog, int bank,
385 int create_patch); 386 int create_patch);
386void snd_opl3_clear_patches(struct snd_opl3 *opl3); 387void snd_opl3_clear_patches(struct snd_opl3 *opl3);
388#else
389#define snd_opl3_write NULL
390static inline void snd_opl3_clear_patches(struct snd_opl3 *opl3) {}
391#endif
387 392
388#endif /* __SOUND_OPL3_H */ 393#endif /* __SOUND_OPL3_H */