diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-09-13 09:55:09 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-09-13 09:55:09 -0400 |
commit | 0bc0748dfbefacce9c6b67ab23f2c80133b598f7 (patch) | |
tree | 76946adc08a26973fcdb39fe0eb3ef5e1f8f121d | |
parent | b6397893a5ed81970e803d61ee2f1a0e79f87438 (diff) | |
parent | 95064a75ebf8744e1ff595e8cd7ff9b6c851523e (diff) |
Merge branch 'master' into gfs2
189 files changed, 1399 insertions, 966 deletions
@@ -1,7 +1,7 @@ | |||
1 | VERSION = 2 | 1 | VERSION = 2 |
2 | PATCHLEVEL = 6 | 2 | PATCHLEVEL = 6 |
3 | SUBLEVEL = 18 | 3 | SUBLEVEL = 18 |
4 | EXTRAVERSION = -rc6 | 4 | EXTRAVERSION = -rc7 |
5 | NAME=Crazed Snow-Weasel | 5 | NAME=Crazed Snow-Weasel |
6 | 6 | ||
7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
diff --git a/arch/arm/mach-ixp4xx/nslu2-pci.c b/arch/arm/mach-ixp4xx/nslu2-pci.c index 0de639d6e60a..04661fef97f5 100644 --- a/arch/arm/mach-ixp4xx/nslu2-pci.c +++ b/arch/arm/mach-ixp4xx/nslu2-pci.c | |||
@@ -17,6 +17,7 @@ | |||
17 | 17 | ||
18 | #include <linux/pci.h> | 18 | #include <linux/pci.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/irq.h> | ||
20 | 21 | ||
21 | #include <asm/mach/pci.h> | 22 | #include <asm/mach/pci.h> |
22 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
diff --git a/arch/arm/mach-ixp4xx/nslu2-power.c b/arch/arm/mach-ixp4xx/nslu2-power.c index e2a2230b69f0..a29b3b2b61b6 100644 --- a/arch/arm/mach-ixp4xx/nslu2-power.c +++ b/arch/arm/mach-ixp4xx/nslu2-power.c | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/reboot.h> | 21 | #include <linux/reboot.h> |
22 | #include <linux/irq.h> | ||
22 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
23 | #include <linux/reboot.h> | 24 | #include <linux/reboot.h> |
24 | 25 | ||
diff --git a/arch/arm/mach-s3c2410/Makefile b/arch/arm/mach-s3c2410/Makefile index 273e05f2b8de..0eadec916214 100644 --- a/arch/arm/mach-s3c2410/Makefile +++ b/arch/arm/mach-s3c2410/Makefile | |||
@@ -28,6 +28,7 @@ obj-$(CONFIG_PM_SIMTEC) += pm-simtec.o | |||
28 | 28 | ||
29 | # S3C2412 support | 29 | # S3C2412 support |
30 | obj-$(CONFIG_CPU_S3C2412) += s3c2412.o | 30 | obj-$(CONFIG_CPU_S3C2412) += s3c2412.o |
31 | obj-$(CONFIG_CPU_S3C2412) += s3c2412-irq.o | ||
31 | obj-$(CONFIG_CPU_S3C2412) += s3c2412-clock.o | 32 | obj-$(CONFIG_CPU_S3C2412) += s3c2412-clock.o |
32 | 33 | ||
33 | # | 34 | # |
diff --git a/arch/arm/mach-s3c2410/cpu.h b/arch/arm/mach-s3c2410/cpu.h index b0ed9d2d141b..be42e4032a6d 100644 --- a/arch/arm/mach-s3c2410/cpu.h +++ b/arch/arm/mach-s3c2410/cpu.h | |||
@@ -8,16 +8,6 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | ||
12 | * Modifications: | ||
13 | * 24-Aug-2004 BJD Start of generic S3C24XX support | ||
14 | * 18-Oct-2004 BJD Moved board struct into this file | ||
15 | * 04-Jan-2005 BJD New uart initialisation | ||
16 | * 10-Jan-2005 BJD Moved generic init here, specific to cpu headers | ||
17 | * 14-Jan-2005 BJD Added s3c24xx_init_clocks() call | ||
18 | * 10-Mar-2005 LCVR Changed S3C2410_{VA,SZ} to S3C24XX_{VA,SZ} & IODESC_ENT | ||
19 | * 14-Mar-2005 BJD Updated for __iomem | ||
20 | * 15-Jan-2006 LCVR Updated S3C2410_PA_##x to new S3C24XX_PA_##x macro | ||
21 | */ | 11 | */ |
22 | 12 | ||
23 | /* todo - fix when rmk changes iodescs to use `void __iomem *` */ | 13 | /* todo - fix when rmk changes iodescs to use `void __iomem *` */ |
diff --git a/arch/arm/mach-s3c2410/devs.c b/arch/arm/mach-s3c2410/devs.c index ad3845e329ba..cae35ff76f33 100644 --- a/arch/arm/mach-s3c2410/devs.c +++ b/arch/arm/mach-s3c2410/devs.c | |||
@@ -1,22 +1,14 @@ | |||
1 | /* linux/arch/arm/mach-s3c2410/devs.c | 1 | /* linux/arch/arm/mach-s3c2410/devs.c |
2 | * | 2 | * |
3 | * Copyright (c) 2004 Simtec Electronics | 3 | * Copyright (c) 2004 Simtec Electronics |
4 | * Ben Dooks <ben@simtec.co.uk> | 4 | * Ben Dooks <ben@simtec.co.uk> |
5 | * | 5 | * |
6 | * Base S3C2410 platform device definitions | 6 | * Base S3C24XX platform device definitions |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | 11 | * |
12 | * Modifications: | ||
13 | * 15-Jan-2006 LCVR Using S3C24XX_PA_##x macro for common S3C24XX devices | ||
14 | * 10-Mar-2005 LCVR Changed S3C2410_{VA,SZ} to S3C24XX_{VA,SZ} | ||
15 | * 10-Feb-2005 BJD Added camera from guillaume.gourat@nexvision.tv | ||
16 | * 29-Aug-2004 BJD Added timers 0 through 3 | ||
17 | * 29-Aug-2004 BJD Changed index of devices we only have one of to -1 | ||
18 | * 21-Aug-2004 BJD Added IRQ_TICK to RTC resources | ||
19 | * 18-Aug-2004 BJD Created initial version | ||
20 | */ | 12 | */ |
21 | 13 | ||
22 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
diff --git a/arch/arm/mach-s3c2410/irq.c b/arch/arm/mach-s3c2410/irq.c index 6822dc7f7799..cd6139b35999 100644 --- a/arch/arm/mach-s3c2410/irq.c +++ b/arch/arm/mach-s3c2410/irq.c | |||
@@ -86,7 +86,7 @@ unsigned long s3c_irqwake_intmask = 0xffffffffL; | |||
86 | unsigned long s3c_irqwake_eintallow = 0x0000fff0L; | 86 | unsigned long s3c_irqwake_eintallow = 0x0000fff0L; |
87 | unsigned long s3c_irqwake_eintmask = 0xffffffffL; | 87 | unsigned long s3c_irqwake_eintmask = 0xffffffffL; |
88 | 88 | ||
89 | static int | 89 | int |
90 | s3c_irq_wake(unsigned int irqno, unsigned int state) | 90 | s3c_irq_wake(unsigned int irqno, unsigned int state) |
91 | { | 91 | { |
92 | unsigned long irqbit = 1 << (irqno - IRQ_EINT0); | 92 | unsigned long irqbit = 1 << (irqno - IRQ_EINT0); |
@@ -260,7 +260,7 @@ s3c_irqext_unmask(unsigned int irqno) | |||
260 | s3c_irq_unmask((irqno <= (IRQ_EINT7 - EXTINT_OFF)) ? IRQ_EINT4t7 : IRQ_EINT8t23); | 260 | s3c_irq_unmask((irqno <= (IRQ_EINT7 - EXTINT_OFF)) ? IRQ_EINT4t7 : IRQ_EINT8t23); |
261 | } | 261 | } |
262 | 262 | ||
263 | static int | 263 | int |
264 | s3c_irqext_type(unsigned int irq, unsigned int type) | 264 | s3c_irqext_type(unsigned int irq, unsigned int type) |
265 | { | 265 | { |
266 | void __iomem *extint_reg; | 266 | void __iomem *extint_reg; |
diff --git a/arch/arm/mach-s3c2410/irq.h b/arch/arm/mach-s3c2410/irq.h index 4abf0ca14e00..f7cc4c983de5 100644 --- a/arch/arm/mach-s3c2410/irq.h +++ b/arch/arm/mach-s3c2410/irq.h | |||
@@ -97,3 +97,8 @@ s3c_irqsub_ack(unsigned int irqno, unsigned int parentmask, unsigned int group) | |||
97 | __raw_writel(parentmask, S3C2410_INTPND); | 97 | __raw_writel(parentmask, S3C2410_INTPND); |
98 | } | 98 | } |
99 | } | 99 | } |
100 | |||
101 | /* exported for use in arch/arm/mach-s3c2410 */ | ||
102 | |||
103 | extern int s3c_irq_wake(unsigned int irqno, unsigned int state); | ||
104 | extern int s3c_irqext_type(unsigned int irq, unsigned int type); | ||
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c index 947234df8160..2968fb235f95 100644 --- a/arch/arm/mach-s3c2410/mach-bast.c +++ b/arch/arm/mach-s3c2410/mach-bast.c | |||
@@ -8,31 +8,6 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | ||
12 | * Modifications: | ||
13 | * 14-Sep-2004 BJD USB power control | ||
14 | * 20-Aug-2004 BJD Added s3c2410_board struct | ||
15 | * 18-Aug-2004 BJD Added platform devices from default set | ||
16 | * 16-May-2003 BJD Created initial version | ||
17 | * 16-Aug-2003 BJD Fixed header files and copyright, added URL | ||
18 | * 05-Sep-2003 BJD Moved to v2.6 kernel | ||
19 | * 06-Jan-2003 BJD Updates for <arch/map.h> | ||
20 | * 18-Jan-2003 BJD Added serial port configuration | ||
21 | * 05-Oct-2004 BJD Power management code | ||
22 | * 04-Nov-2004 BJD Updated serial port clocks | ||
23 | * 04-Jan-2005 BJD New uart init call | ||
24 | * 10-Jan-2005 BJD Removed include of s3c2410.h | ||
25 | * 14-Jan-2005 BJD Add support for muitlple NAND devices | ||
26 | * 03-Mar-2005 BJD Ensured that bast-cpld.h is included | ||
27 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
28 | * 14-Mar-2005 BJD Updated for __iomem changes | ||
29 | * 22-Jun-2005 BJD Added DM9000 platform information | ||
30 | * 28-Jun-2005 BJD Moved pm functionality out to common code | ||
31 | * 17-Jul-2005 BJD Changed to platform device for SuperIO 16550s | ||
32 | * 25-Jul-2005 BJD Removed ASIX static mappings | ||
33 | * 27-Jul-2005 BJD Ensure maximum frequency of i2c bus | ||
34 | * 20-Sep-2005 BJD Added static to non-exported items | ||
35 | * 26-Oct-2005 BJD Added FB platform data | ||
36 | */ | 11 | */ |
37 | 12 | ||
38 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c index aec431b2830a..8c895c077d22 100644 --- a/arch/arm/mach-s3c2410/mach-h1940.c +++ b/arch/arm/mach-s3c2410/mach-h1940.c | |||
@@ -9,23 +9,6 @@ | |||
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | 11 | * |
12 | * Modifications: | ||
13 | * 16-May-2003 BJD Created initial version | ||
14 | * 16-Aug-2003 BJD Fixed header files and copyright, added URL | ||
15 | * 05-Sep-2003 BJD Moved to v2.6 kernel | ||
16 | * 06-Jan-2003 BJD Updates for <arch/map.h> | ||
17 | * 18-Jan-2003 BJD Added serial port configuration | ||
18 | * 17-Feb-2003 BJD Copied to mach-ipaq.c | ||
19 | * 21-Aug-2004 BJD Added struct s3c2410_board | ||
20 | * 04-Sep-2004 BJD Changed uart init, renamed ipaq_ -> h1940_ | ||
21 | * 18-Oct-2004 BJD Updated new board structure name | ||
22 | * 04-Nov-2004 BJD Change for new serial clock | ||
23 | * 04-Jan-2005 BJD Updated uart init call | ||
24 | * 10-Jan-2005 BJD Removed include of s3c2410.h | ||
25 | * 14-Jan-2005 BJD Added clock init | ||
26 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
27 | * 20-Sep-2005 BJD Added static to non-exported items | ||
28 | * 26-Oct-2005 BJD Changed name of fb init call | ||
29 | */ | 12 | */ |
30 | 13 | ||
31 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
diff --git a/arch/arm/mach-s3c2410/mach-rx3715.c b/arch/arm/mach-s3c2410/mach-rx3715.c index 306afc1d7cd3..23d7c052013c 100644 --- a/arch/arm/mach-s3c2410/mach-rx3715.c +++ b/arch/arm/mach-s3c2410/mach-rx3715.c | |||
@@ -9,15 +9,6 @@ | |||
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | 11 | * |
12 | * Modifications: | ||
13 | * 16-Sep-2004 BJD Copied from mach-h1940.c | ||
14 | * 25-Oct-2004 BJD Updates for 2.6.10-rc1 | ||
15 | * 10-Jan-2005 BJD Removed include of s3c2410.h s3c2440.h | ||
16 | * 14-Jan-2005 BJD Added new clock init | ||
17 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
18 | * 14-Mar-2005 BJD Fixed __iomem warnings | ||
19 | * 20-Sep-2005 BJD Added static to non-exported items | ||
20 | * 31-Oct-2005 BJD Added LCD setup for framebuffer | ||
21 | */ | 12 | */ |
22 | 13 | ||
23 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
diff --git a/arch/arm/mach-s3c2410/mach-smdk2410.c b/arch/arm/mach-s3c2410/mach-smdk2410.c index 25f7e9f4dcee..b3b0171d5052 100644 --- a/arch/arm/mach-s3c2410/mach-smdk2410.c +++ b/arch/arm/mach-s3c2410/mach-smdk2410.c | |||
@@ -27,10 +27,6 @@ | |||
27 | * derived from linux/arch/arm/mach-s3c2410/mach-bast.c, written by | 27 | * derived from linux/arch/arm/mach-s3c2410/mach-bast.c, written by |
28 | * Ben Dooks <ben@simtec.co.uk> | 28 | * Ben Dooks <ben@simtec.co.uk> |
29 | * | 29 | * |
30 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
31 | * 20-Sep-2005 BJD Added static to non-exported items | ||
32 | * 01-Apr-2006 BJD Moved init code to common smdk | ||
33 | * | ||
34 | ***********************************************************************/ | 30 | ***********************************************************************/ |
35 | 31 | ||
36 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
diff --git a/arch/arm/mach-s3c2410/mach-smdk2413.c b/arch/arm/mach-s3c2410/mach-smdk2413.c index b7ef7d3c54a9..3a4ca7f6f7b9 100644 --- a/arch/arm/mach-s3c2410/mach-smdk2413.c +++ b/arch/arm/mach-s3c2410/mach-smdk2413.c | |||
@@ -112,7 +112,20 @@ static void __init smdk2413_machine_init(void) | |||
112 | smdk_machine_init(); | 112 | smdk_machine_init(); |
113 | } | 113 | } |
114 | 114 | ||
115 | MACHINE_START(S3C2413, "SMDK2413") | 115 | MACHINE_START(S3C2413, "S3C2413") |
116 | /* Maintainer: Ben Dooks <ben@fluff.org> */ | ||
117 | .phys_io = S3C2410_PA_UART, | ||
118 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | ||
119 | .boot_params = S3C2410_SDRAM_PA + 0x100, | ||
120 | |||
121 | .fixup = smdk2413_fixup, | ||
122 | .init_irq = s3c24xx_init_irq, | ||
123 | .map_io = smdk2413_map_io, | ||
124 | .init_machine = smdk2413_machine_init, | ||
125 | .timer = &s3c24xx_timer, | ||
126 | MACHINE_END | ||
127 | |||
128 | MACHINE_START(SMDK2413, "SMDK2413") | ||
116 | /* Maintainer: Ben Dooks <ben@fluff.org> */ | 129 | /* Maintainer: Ben Dooks <ben@fluff.org> */ |
117 | .phys_io = S3C2410_PA_UART, | 130 | .phys_io = S3C2410_PA_UART, |
118 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | 131 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, |
diff --git a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c index d18efb279d3d..a0d7692cdb2b 100644 --- a/arch/arm/mach-s3c2410/mach-vr1000.c +++ b/arch/arm/mach-s3c2410/mach-vr1000.c | |||
@@ -10,25 +10,6 @@ | |||
10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | * | 12 | * |
13 | * Modifications: | ||
14 | * 14-Sep-2004 BJD USB Power control | ||
15 | * 04-Sep-2004 BJD Added new uart init, and io init | ||
16 | * 21-Aug-2004 BJD Added struct s3c2410_board | ||
17 | * 06-Aug-2004 BJD Fixed call to time initialisation | ||
18 | * 05-Apr-2004 BJD Copied to make mach-vr1000.c | ||
19 | * 18-Oct-2004 BJD Updated board struct | ||
20 | * 04-Nov-2004 BJD Clock and serial configuration update | ||
21 | * | ||
22 | * 04-Jan-2005 BJD Updated uart init call | ||
23 | * 10-Jan-2005 BJD Removed include of s3c2410.h | ||
24 | * 14-Jan-2005 BJD Added clock init | ||
25 | * 15-Jan-2005 BJD Add serial port device definition | ||
26 | * 20-Jan-2005 BJD Use UPF_IOREMAP for ports | ||
27 | * 10-Feb-2005 BJD Added power-off capability | ||
28 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
29 | * 14-Mar-2006 BJD void __iomem fixes | ||
30 | * 22-Jun-2006 BJD Added DM9000 platform information | ||
31 | * 20-Sep-2005 BJD Added static to non-exported items | ||
32 | */ | 13 | */ |
33 | 14 | ||
34 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
diff --git a/arch/arm/mach-s3c2410/s3c2400-gpio.c b/arch/arm/mach-s3c2410/s3c2400-gpio.c index 5127f39fa9bf..f2a78175a70a 100644 --- a/arch/arm/mach-s3c2410/s3c2400-gpio.c +++ b/arch/arm/mach-s3c2410/s3c2400-gpio.c | |||
@@ -17,10 +17,7 @@ | |||
17 | * You should have received a copy of the GNU General Public License | 17 | * You should have received a copy of the GNU General Public License |
18 | * along with this program; if not, write to the Free Software | 18 | * along with this program; if not, write to the Free Software |
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | * | 20 | */ |
21 | * Changelog | ||
22 | * 15-Jan-2006 LCVR Splitted from gpio.c, adding support for the S3C2400 | ||
23 | */ | ||
24 | 21 | ||
25 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
26 | #include <linux/init.h> | 23 | #include <linux/init.h> |
diff --git a/arch/arm/mach-s3c2410/s3c2410.h b/arch/arm/mach-s3c2410/s3c2410.h index 73f1a2474a61..fbed084f26d0 100644 --- a/arch/arm/mach-s3c2410/s3c2410.h +++ b/arch/arm/mach-s3c2410/s3c2410.h | |||
@@ -9,14 +9,6 @@ | |||
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | 11 | * |
12 | * Modifications: | ||
13 | * 18-Aug-2004 BJD Created initial version | ||
14 | * 20-Aug-2004 BJD Added s3c2410_board struct | ||
15 | * 04-Sep-2004 BJD Added s3c2410_init_uarts() call | ||
16 | * 17-Oct-2004 BJD Moved board out to cpu | ||
17 | * 04-Jan-2005 BJD Changed uart init | ||
18 | * 10-Jan-2005 BJD Removed timer to cpu.h, moved 2410 specific bits here | ||
19 | * 14-Jan-2005 BJD Added s3c2410_init_clocks call | ||
20 | */ | 12 | */ |
21 | 13 | ||
22 | #ifdef CONFIG_CPU_S3C2410 | 14 | #ifdef CONFIG_CPU_S3C2410 |
diff --git a/arch/arm/mach-s3c2410/s3c2412-irq.c b/arch/arm/mach-s3c2410/s3c2412-irq.c new file mode 100644 index 000000000000..c80ec93dfea9 --- /dev/null +++ b/arch/arm/mach-s3c2410/s3c2412-irq.c | |||
@@ -0,0 +1,130 @@ | |||
1 | /* linux/arch/arm/mach-s3c2412/s3c2412-irq.c | ||
2 | * | ||
3 | * Copyright (c) 2006 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | * | ||
20 | */ | ||
21 | |||
22 | #include <linux/init.h> | ||
23 | #include <linux/module.h> | ||
24 | #include <linux/interrupt.h> | ||
25 | #include <linux/ioport.h> | ||
26 | #include <linux/ptrace.h> | ||
27 | #include <linux/sysdev.h> | ||
28 | |||
29 | #include <asm/hardware.h> | ||
30 | #include <asm/irq.h> | ||
31 | #include <asm/io.h> | ||
32 | |||
33 | #include <asm/mach/irq.h> | ||
34 | |||
35 | #include <asm/arch/regs-irq.h> | ||
36 | #include <asm/arch/regs-gpio.h> | ||
37 | |||
38 | #include "cpu.h" | ||
39 | #include "irq.h" | ||
40 | |||
41 | /* the s3c2412 changes the behaviour of IRQ_EINT0 through IRQ_EINT3 by | ||
42 | * having them turn up in both the INT* and the EINT* registers. Whilst | ||
43 | * both show the status, they both now need to be acked when the IRQs | ||
44 | * go off. | ||
45 | */ | ||
46 | |||
47 | static void | ||
48 | s3c2412_irq_mask(unsigned int irqno) | ||
49 | { | ||
50 | unsigned long bitval = 1UL << (irqno - IRQ_EINT0); | ||
51 | unsigned long mask; | ||
52 | |||
53 | mask = __raw_readl(S3C2410_INTMSK); | ||
54 | __raw_writel(mask | bitval, S3C2410_INTMSK); | ||
55 | |||
56 | mask = __raw_readl(S3C2412_EINTMASK); | ||
57 | __raw_writel(mask | bitval, S3C2412_EINTMASK); | ||
58 | } | ||
59 | |||
60 | static inline void | ||
61 | s3c2412_irq_ack(unsigned int irqno) | ||
62 | { | ||
63 | unsigned long bitval = 1UL << (irqno - IRQ_EINT0); | ||
64 | |||
65 | __raw_writel(bitval, S3C2412_EINTPEND); | ||
66 | __raw_writel(bitval, S3C2410_SRCPND); | ||
67 | __raw_writel(bitval, S3C2410_INTPND); | ||
68 | } | ||
69 | |||
70 | static inline void | ||
71 | s3c2412_irq_maskack(unsigned int irqno) | ||
72 | { | ||
73 | unsigned long bitval = 1UL << (irqno - IRQ_EINT0); | ||
74 | unsigned long mask; | ||
75 | |||
76 | mask = __raw_readl(S3C2410_INTMSK); | ||
77 | __raw_writel(mask|bitval, S3C2410_INTMSK); | ||
78 | |||
79 | mask = __raw_readl(S3C2412_EINTMASK); | ||
80 | __raw_writel(mask | bitval, S3C2412_EINTMASK); | ||
81 | |||
82 | __raw_writel(bitval, S3C2412_EINTPEND); | ||
83 | __raw_writel(bitval, S3C2410_SRCPND); | ||
84 | __raw_writel(bitval, S3C2410_INTPND); | ||
85 | } | ||
86 | |||
87 | static void | ||
88 | s3c2412_irq_unmask(unsigned int irqno) | ||
89 | { | ||
90 | unsigned long bitval = 1UL << (irqno - IRQ_EINT0); | ||
91 | unsigned long mask; | ||
92 | |||
93 | mask = __raw_readl(S3C2412_EINTMASK); | ||
94 | __raw_writel(mask & ~bitval, S3C2412_EINTMASK); | ||
95 | |||
96 | mask = __raw_readl(S3C2410_INTMSK); | ||
97 | __raw_writel(mask & ~bitval, S3C2410_INTMSK); | ||
98 | } | ||
99 | |||
100 | static struct irqchip s3c2412_irq_eint0t4 = { | ||
101 | .ack = s3c2412_irq_ack, | ||
102 | .mask = s3c2412_irq_mask, | ||
103 | .unmask = s3c2412_irq_unmask, | ||
104 | .set_wake = s3c_irq_wake, | ||
105 | .set_type = s3c_irqext_type, | ||
106 | }; | ||
107 | |||
108 | static int s3c2412_irq_add(struct sys_device *sysdev) | ||
109 | { | ||
110 | unsigned int irqno; | ||
111 | |||
112 | for (irqno = IRQ_EINT0; irqno <= IRQ_EINT3; irqno++) { | ||
113 | set_irq_chip(irqno, &s3c2412_irq_eint0t4); | ||
114 | set_irq_handler(irqno, do_edge_IRQ); | ||
115 | set_irq_flags(irqno, IRQF_VALID); | ||
116 | } | ||
117 | |||
118 | return 0; | ||
119 | } | ||
120 | |||
121 | static struct sysdev_driver s3c2412_irq_driver = { | ||
122 | .add = s3c2412_irq_add, | ||
123 | }; | ||
124 | |||
125 | static int s3c2412_irq_init(void) | ||
126 | { | ||
127 | return sysdev_driver_register(&s3c2412_sysclass, &s3c2412_irq_driver); | ||
128 | } | ||
129 | |||
130 | arch_initcall(s3c2412_irq_init); | ||
diff --git a/arch/arm/mach-s3c2410/s3c2440-irq.c b/arch/arm/mach-s3c2410/s3c2440-irq.c index acfe3870727b..1667ba1fa43d 100644 --- a/arch/arm/mach-s3c2410/s3c2440-irq.c +++ b/arch/arm/mach-s3c2410/s3c2440-irq.c | |||
@@ -17,9 +17,6 @@ | |||
17 | * along with this program; if not, write to the Free Software | 17 | * along with this program; if not, write to the Free Software |
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | * | 19 | * |
20 | * Changelog: | ||
21 | * 25-Jul-2005 BJD Split from irq.c | ||
22 | * | ||
23 | */ | 20 | */ |
24 | 21 | ||
25 | #include <linux/init.h> | 22 | #include <linux/init.h> |
diff --git a/arch/arm/mach-s3c2410/s3c244x-irq.c b/arch/arm/mach-s3c2410/s3c244x-irq.c index 2aadca1ce7eb..44c5affa9b89 100644 --- a/arch/arm/mach-s3c2410/s3c244x-irq.c +++ b/arch/arm/mach-s3c2410/s3c244x-irq.c | |||
@@ -17,9 +17,6 @@ | |||
17 | * along with this program; if not, write to the Free Software | 17 | * along with this program; if not, write to the Free Software |
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | * | 19 | * |
20 | * Changelog: | ||
21 | * 25-Jul-2005 BJD Split from irq.c | ||
22 | * | ||
23 | */ | 20 | */ |
24 | 21 | ||
25 | #include <linux/init.h> | 22 | #include <linux/init.h> |
@@ -122,21 +119,24 @@ static int s3c244x_irq_add(struct sys_device *sysdev) | |||
122 | return 0; | 119 | return 0; |
123 | } | 120 | } |
124 | 121 | ||
125 | static struct sysdev_driver s3c244x_irq_driver = { | 122 | static struct sysdev_driver s3c2440_irq_driver = { |
126 | .add = s3c244x_irq_add, | 123 | .add = s3c244x_irq_add, |
127 | }; | 124 | }; |
128 | 125 | ||
129 | static int s3c2440_irq_init(void) | 126 | static int s3c2440_irq_init(void) |
130 | { | 127 | { |
131 | return sysdev_driver_register(&s3c2440_sysclass, &s3c244x_irq_driver); | 128 | return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_irq_driver); |
132 | } | 129 | } |
133 | 130 | ||
134 | arch_initcall(s3c2440_irq_init); | 131 | arch_initcall(s3c2440_irq_init); |
135 | 132 | ||
133 | static struct sysdev_driver s3c2442_irq_driver = { | ||
134 | .add = s3c244x_irq_add, | ||
135 | }; | ||
136 | 136 | ||
137 | static int s3c2442_irq_init(void) | 137 | static int s3c2442_irq_init(void) |
138 | { | 138 | { |
139 | return sysdev_driver_register(&s3c2442_sysclass, &s3c244x_irq_driver); | 139 | return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_irq_driver); |
140 | } | 140 | } |
141 | 141 | ||
142 | arch_initcall(s3c2442_irq_init); | 142 | arch_initcall(s3c2442_irq_init); |
diff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S index 1e89d4080474..44a7a652d625 100644 --- a/arch/arm/mm/proc-arm926.S +++ b/arch/arm/mm/proc-arm926.S | |||
@@ -480,7 +480,7 @@ __arm926_proc_info: | |||
480 | b __arm926_setup | 480 | b __arm926_setup |
481 | .long cpu_arch_name | 481 | .long cpu_arch_name |
482 | .long cpu_elf_name | 482 | .long cpu_elf_name |
483 | .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP|HWCAP_JAVA | 483 | .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_VFP|HWCAP_EDSP|HWCAP_JAVA |
484 | .long cpu_arm926_name | 484 | .long cpu_arm926_name |
485 | .long arm926_processor_functions | 485 | .long arm926_processor_functions |
486 | .long v4wbi_tlb_fns | 486 | .long v4wbi_tlb_fns |
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig index 95a3892b8d1b..a601a17cf568 100644 --- a/arch/frv/Kconfig +++ b/arch/frv/Kconfig | |||
@@ -29,6 +29,10 @@ config GENERIC_HARDIRQS | |||
29 | bool | 29 | bool |
30 | default n | 30 | default n |
31 | 31 | ||
32 | config GENERIC_TIME | ||
33 | bool | ||
34 | default y | ||
35 | |||
32 | config TIME_LOW_RES | 36 | config TIME_LOW_RES |
33 | bool | 37 | bool |
34 | default y | 38 | default y |
diff --git a/arch/frv/kernel/time.c b/arch/frv/kernel/time.c index d5b64e193d92..68a77fe3bb40 100644 --- a/arch/frv/kernel/time.c +++ b/arch/frv/kernel/time.c | |||
@@ -32,8 +32,6 @@ | |||
32 | 32 | ||
33 | #define TICK_SIZE (tick_nsec / 1000) | 33 | #define TICK_SIZE (tick_nsec / 1000) |
34 | 34 | ||
35 | extern unsigned long wall_jiffies; | ||
36 | |||
37 | unsigned long __nongprelbss __clkin_clock_speed_HZ; | 35 | unsigned long __nongprelbss __clkin_clock_speed_HZ; |
38 | unsigned long __nongprelbss __ext_bus_clock_speed_HZ; | 36 | unsigned long __nongprelbss __ext_bus_clock_speed_HZ; |
39 | unsigned long __nongprelbss __res_bus_clock_speed_HZ; | 37 | unsigned long __nongprelbss __res_bus_clock_speed_HZ; |
@@ -145,85 +143,6 @@ void time_init(void) | |||
145 | } | 143 | } |
146 | 144 | ||
147 | /* | 145 | /* |
148 | * This version of gettimeofday has near microsecond resolution. | ||
149 | */ | ||
150 | void do_gettimeofday(struct timeval *tv) | ||
151 | { | ||
152 | unsigned long seq; | ||
153 | unsigned long usec, sec; | ||
154 | unsigned long max_ntp_tick; | ||
155 | |||
156 | do { | ||
157 | unsigned long lost; | ||
158 | |||
159 | seq = read_seqbegin(&xtime_lock); | ||
160 | |||
161 | usec = 0; | ||
162 | lost = jiffies - wall_jiffies; | ||
163 | |||
164 | /* | ||
165 | * If time_adjust is negative then NTP is slowing the clock | ||
166 | * so make sure not to go into next possible interval. | ||
167 | * Better to lose some accuracy than have time go backwards.. | ||
168 | */ | ||
169 | if (unlikely(time_adjust < 0)) { | ||
170 | max_ntp_tick = (USEC_PER_SEC / HZ) - tickadj; | ||
171 | usec = min(usec, max_ntp_tick); | ||
172 | |||
173 | if (lost) | ||
174 | usec += lost * max_ntp_tick; | ||
175 | } | ||
176 | else if (unlikely(lost)) | ||
177 | usec += lost * (USEC_PER_SEC / HZ); | ||
178 | |||
179 | sec = xtime.tv_sec; | ||
180 | usec += (xtime.tv_nsec / 1000); | ||
181 | } while (read_seqretry(&xtime_lock, seq)); | ||
182 | |||
183 | while (usec >= 1000000) { | ||
184 | usec -= 1000000; | ||
185 | sec++; | ||
186 | } | ||
187 | |||
188 | tv->tv_sec = sec; | ||
189 | tv->tv_usec = usec; | ||
190 | } | ||
191 | |||
192 | EXPORT_SYMBOL(do_gettimeofday); | ||
193 | |||
194 | int do_settimeofday(struct timespec *tv) | ||
195 | { | ||
196 | time_t wtm_sec, sec = tv->tv_sec; | ||
197 | long wtm_nsec, nsec = tv->tv_nsec; | ||
198 | |||
199 | if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC) | ||
200 | return -EINVAL; | ||
201 | |||
202 | write_seqlock_irq(&xtime_lock); | ||
203 | /* | ||
204 | * This is revolting. We need to set "xtime" correctly. However, the | ||
205 | * value in this location is the value at the most recent update of | ||
206 | * wall time. Discover what correction gettimeofday() would have | ||
207 | * made, and then undo it! | ||
208 | */ | ||
209 | nsec -= 0 * NSEC_PER_USEC; | ||
210 | nsec -= (jiffies - wall_jiffies) * TICK_NSEC; | ||
211 | |||
212 | wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec); | ||
213 | wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec); | ||
214 | |||
215 | set_normalized_timespec(&xtime, sec, nsec); | ||
216 | set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec); | ||
217 | |||
218 | ntp_clear(); | ||
219 | write_sequnlock_irq(&xtime_lock); | ||
220 | clock_was_set(); | ||
221 | return 0; | ||
222 | } | ||
223 | |||
224 | EXPORT_SYMBOL(do_settimeofday); | ||
225 | |||
226 | /* | ||
227 | * Scheduler clock - returns current time in nanosec units. | 146 | * Scheduler clock - returns current time in nanosec units. |
228 | */ | 147 | */ |
229 | unsigned long long sched_clock(void) | 148 | unsigned long long sched_clock(void) |
diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile index ab98fc21a541..5427a842e841 100644 --- a/arch/i386/kernel/Makefile +++ b/arch/i386/kernel/Makefile | |||
@@ -39,7 +39,6 @@ obj-$(CONFIG_VM86) += vm86.o | |||
39 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o | 39 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o |
40 | obj-$(CONFIG_HPET_TIMER) += hpet.o | 40 | obj-$(CONFIG_HPET_TIMER) += hpet.o |
41 | obj-$(CONFIG_K8_NB) += k8.o | 41 | obj-$(CONFIG_K8_NB) += k8.o |
42 | obj-$(CONFIG_AUDIT) += audit.o | ||
43 | 42 | ||
44 | EXTRA_AFLAGS := -traditional | 43 | EXTRA_AFLAGS := -traditional |
45 | 44 | ||
diff --git a/arch/i386/kernel/audit.c b/arch/i386/kernel/audit.c deleted file mode 100644 index 5a53c6f371ff..000000000000 --- a/arch/i386/kernel/audit.c +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | #include <linux/init.h> | ||
2 | #include <linux/types.h> | ||
3 | #include <linux/audit.h> | ||
4 | #include <asm/unistd.h> | ||
5 | |||
6 | static unsigned dir_class[] = { | ||
7 | #include <asm-generic/audit_dir_write.h> | ||
8 | ~0U | ||
9 | }; | ||
10 | |||
11 | static unsigned chattr_class[] = { | ||
12 | #include <asm-generic/audit_change_attr.h> | ||
13 | ~0U | ||
14 | }; | ||
15 | |||
16 | static int __init audit_classes_init(void) | ||
17 | { | ||
18 | audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); | ||
19 | audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); | ||
20 | return 0; | ||
21 | } | ||
22 | |||
23 | __initcall(audit_classes_init); | ||
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 674de8943478..db274da7dba1 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -75,6 +75,10 @@ config DMA_IS_NORMAL | |||
75 | depends on IA64_SGI_SN2 | 75 | depends on IA64_SGI_SN2 |
76 | default y | 76 | default y |
77 | 77 | ||
78 | config AUDIT_ARCH | ||
79 | bool | ||
80 | default y | ||
81 | |||
78 | choice | 82 | choice |
79 | prompt "System type" | 83 | prompt "System type" |
80 | default IA64_GENERIC | 84 | default IA64_GENERIC |
diff --git a/arch/ia64/ia32/audit.c b/arch/ia64/ia32/audit.c index ab94f2e58cdd..92d7d0c8d93f 100644 --- a/arch/ia64/ia32/audit.c +++ b/arch/ia64/ia32/audit.c | |||
@@ -9,3 +9,29 @@ unsigned ia32_chattr_class[] = { | |||
9 | #include <asm-generic/audit_change_attr.h> | 9 | #include <asm-generic/audit_change_attr.h> |
10 | ~0U | 10 | ~0U |
11 | }; | 11 | }; |
12 | |||
13 | unsigned ia32_write_class[] = { | ||
14 | #include <asm-generic/audit_write.h> | ||
15 | ~0U | ||
16 | }; | ||
17 | |||
18 | unsigned ia32_read_class[] = { | ||
19 | #include <asm-generic/audit_read.h> | ||
20 | ~0U | ||
21 | }; | ||
22 | |||
23 | int ia32_classify_syscall(unsigned syscall) | ||
24 | { | ||
25 | switch(syscall) { | ||
26 | case __NR_open: | ||
27 | return 2; | ||
28 | case __NR_openat: | ||
29 | return 3; | ||
30 | case __NR_socketcall: | ||
31 | return 4; | ||
32 | case __NR_execve: | ||
33 | return 5; | ||
34 | default: | ||
35 | return 1; | ||
36 | } | ||
37 | } | ||
diff --git a/arch/ia64/kernel/audit.c b/arch/ia64/kernel/audit.c index f2512931ccaf..04682555a28c 100644 --- a/arch/ia64/kernel/audit.c +++ b/arch/ia64/kernel/audit.c | |||
@@ -8,19 +8,54 @@ static unsigned dir_class[] = { | |||
8 | ~0U | 8 | ~0U |
9 | }; | 9 | }; |
10 | 10 | ||
11 | static unsigned read_class[] = { | ||
12 | #include <asm-generic/audit_read.h> | ||
13 | ~0U | ||
14 | }; | ||
15 | |||
16 | static unsigned write_class[] = { | ||
17 | #include <asm-generic/audit_write.h> | ||
18 | ~0U | ||
19 | }; | ||
20 | |||
11 | static unsigned chattr_class[] = { | 21 | static unsigned chattr_class[] = { |
12 | #include <asm-generic/audit_change_attr.h> | 22 | #include <asm-generic/audit_change_attr.h> |
13 | ~0U | 23 | ~0U |
14 | }; | 24 | }; |
15 | 25 | ||
26 | int audit_classify_syscall(int abi, unsigned syscall) | ||
27 | { | ||
28 | #ifdef CONFIG_IA32_SUPPORT | ||
29 | extern int ia32_classify_syscall(unsigned); | ||
30 | if (abi == AUDIT_ARCH_I386) | ||
31 | return ia32_classify_syscall(syscall); | ||
32 | #endif | ||
33 | switch(syscall) { | ||
34 | case __NR_open: | ||
35 | return 2; | ||
36 | case __NR_openat: | ||
37 | return 3; | ||
38 | case __NR_execve: | ||
39 | return 5; | ||
40 | default: | ||
41 | return 0; | ||
42 | } | ||
43 | } | ||
44 | |||
16 | static int __init audit_classes_init(void) | 45 | static int __init audit_classes_init(void) |
17 | { | 46 | { |
18 | #ifdef CONFIG_IA32_SUPPORT | 47 | #ifdef CONFIG_IA32_SUPPORT |
19 | extern __u32 ia32_dir_class[]; | 48 | extern __u32 ia32_dir_class[]; |
49 | extern __u32 ia32_write_class[]; | ||
50 | extern __u32 ia32_read_class[]; | ||
20 | extern __u32 ia32_chattr_class[]; | 51 | extern __u32 ia32_chattr_class[]; |
52 | audit_register_class(AUDIT_CLASS_WRITE_32, ia32_write_class); | ||
53 | audit_register_class(AUDIT_CLASS_READ_32, ia32_read_class); | ||
21 | audit_register_class(AUDIT_CLASS_DIR_WRITE_32, ia32_dir_class); | 54 | audit_register_class(AUDIT_CLASS_DIR_WRITE_32, ia32_dir_class); |
22 | audit_register_class(AUDIT_CLASS_CHATTR_32, ia32_chattr_class); | 55 | audit_register_class(AUDIT_CLASS_CHATTR_32, ia32_chattr_class); |
23 | #endif | 56 | #endif |
57 | audit_register_class(AUDIT_CLASS_WRITE, write_class); | ||
58 | audit_register_class(AUDIT_CLASS_READ, read_class); | ||
24 | audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); | 59 | audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); |
25 | audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); | 60 | audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); |
26 | return 0; | 61 | return 0; |
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S index 12701cf32d99..fef06571be99 100644 --- a/arch/ia64/kernel/entry.S +++ b/arch/ia64/kernel/entry.S | |||
@@ -1605,8 +1605,8 @@ sys_call_table: | |||
1605 | data8 sys_ni_syscall // 1295 reserved for ppoll | 1605 | data8 sys_ni_syscall // 1295 reserved for ppoll |
1606 | data8 sys_unshare | 1606 | data8 sys_unshare |
1607 | data8 sys_splice | 1607 | data8 sys_splice |
1608 | data8 sys_set_robust_list | 1608 | data8 sys_ni_syscall // reserved for set_robust_list |
1609 | data8 sys_get_robust_list | 1609 | data8 sys_ni_syscall // reserved for get_robust_list |
1610 | data8 sys_sync_file_range // 1300 | 1610 | data8 sys_sync_file_range // 1300 |
1611 | data8 sys_tee | 1611 | data8 sys_tee |
1612 | data8 sys_vmsplice | 1612 | data8 sys_vmsplice |
diff --git a/arch/ia64/kernel/head.S b/arch/ia64/kernel/head.S index 29236f0c62b5..44d540efa6d1 100644 --- a/arch/ia64/kernel/head.S +++ b/arch/ia64/kernel/head.S | |||
@@ -197,6 +197,11 @@ start_ap: | |||
197 | ;; | 197 | ;; |
198 | srlz.i | 198 | srlz.i |
199 | ;; | 199 | ;; |
200 | { | ||
201 | flushrs // must be first insn in group | ||
202 | srlz.i | ||
203 | } | ||
204 | ;; | ||
200 | /* | 205 | /* |
201 | * Save the region registers, predicate before they get clobbered | 206 | * Save the region registers, predicate before they get clobbered |
202 | */ | 207 | */ |
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index c7ccd6ee1ddf..84a7e52f56f6 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -4936,13 +4936,15 @@ abort_locked: | |||
4936 | if (likely(ctx)) { | 4936 | if (likely(ctx)) { |
4937 | DPRINT(("context unlocked\n")); | 4937 | DPRINT(("context unlocked\n")); |
4938 | UNPROTECT_CTX(ctx, flags); | 4938 | UNPROTECT_CTX(ctx, flags); |
4939 | fput(file); | ||
4940 | } | 4939 | } |
4941 | 4940 | ||
4942 | /* copy argument back to user, if needed */ | 4941 | /* copy argument back to user, if needed */ |
4943 | if (call_made && PFM_CMD_RW_ARG(cmd) && copy_to_user(arg, args_k, base_sz*count)) ret = -EFAULT; | 4942 | if (call_made && PFM_CMD_RW_ARG(cmd) && copy_to_user(arg, args_k, base_sz*count)) ret = -EFAULT; |
4944 | 4943 | ||
4945 | error_args: | 4944 | error_args: |
4945 | if (file) | ||
4946 | fput(file); | ||
4947 | |||
4946 | kfree(args_k); | 4948 | kfree(args_k); |
4947 | 4949 | ||
4948 | DPRINT(("cmd=%s ret=%ld\n", PFM_CMD_NAME(cmd), ret)); | 4950 | DPRINT(("cmd=%s ret=%ld\n", PFM_CMD_NAME(cmd), ret)); |
diff --git a/arch/ia64/kernel/sys_ia64.c b/arch/ia64/kernel/sys_ia64.c index 40722d88607a..9ef62a3fbfad 100644 --- a/arch/ia64/kernel/sys_ia64.c +++ b/arch/ia64/kernel/sys_ia64.c | |||
@@ -163,10 +163,25 @@ sys_pipe (void) | |||
163 | return retval; | 163 | return retval; |
164 | } | 164 | } |
165 | 165 | ||
166 | int ia64_mmap_check(unsigned long addr, unsigned long len, | ||
167 | unsigned long flags) | ||
168 | { | ||
169 | unsigned long roff; | ||
170 | |||
171 | /* | ||
172 | * Don't permit mappings into unmapped space, the virtual page table | ||
173 | * of a region, or across a region boundary. Note: RGN_MAP_LIMIT is | ||
174 | * equal to 2^n-PAGE_SIZE (for some integer n <= 61) and len > 0. | ||
175 | */ | ||
176 | roff = REGION_OFFSET(addr); | ||
177 | if ((len > RGN_MAP_LIMIT) || (roff > (RGN_MAP_LIMIT - len))) | ||
178 | return -EINVAL; | ||
179 | return 0; | ||
180 | } | ||
181 | |||
166 | static inline unsigned long | 182 | static inline unsigned long |
167 | do_mmap2 (unsigned long addr, unsigned long len, int prot, int flags, int fd, unsigned long pgoff) | 183 | do_mmap2 (unsigned long addr, unsigned long len, int prot, int flags, int fd, unsigned long pgoff) |
168 | { | 184 | { |
169 | unsigned long roff; | ||
170 | struct file *file = NULL; | 185 | struct file *file = NULL; |
171 | 186 | ||
172 | flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); | 187 | flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); |
@@ -188,17 +203,6 @@ do_mmap2 (unsigned long addr, unsigned long len, int prot, int flags, int fd, un | |||
188 | goto out; | 203 | goto out; |
189 | } | 204 | } |
190 | 205 | ||
191 | /* | ||
192 | * Don't permit mappings into unmapped space, the virtual page table of a region, | ||
193 | * or across a region boundary. Note: RGN_MAP_LIMIT is equal to 2^n-PAGE_SIZE | ||
194 | * (for some integer n <= 61) and len > 0. | ||
195 | */ | ||
196 | roff = REGION_OFFSET(addr); | ||
197 | if ((len > RGN_MAP_LIMIT) || (roff > (RGN_MAP_LIMIT - len))) { | ||
198 | addr = -EINVAL; | ||
199 | goto out; | ||
200 | } | ||
201 | |||
202 | down_write(¤t->mm->mmap_sem); | 206 | down_write(¤t->mm->mmap_sem); |
203 | addr = do_mmap_pgoff(file, addr, len, prot, flags, pgoff); | 207 | addr = do_mmap_pgoff(file, addr, len, prot, flags, pgoff); |
204 | up_write(¤t->mm->mmap_sem); | 208 | up_write(¤t->mm->mmap_sem); |
diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c index c119e8b620de..5f2dcba7fa8d 100644 --- a/arch/ia64/sn/kernel/setup.c +++ b/arch/ia64/sn/kernel/setup.c | |||
@@ -565,7 +565,7 @@ static void __init sn_init_pdas(char **cmdline_p) | |||
565 | * Also sets up a few fields in the nodepda. Also known as | 565 | * Also sets up a few fields in the nodepda. Also known as |
566 | * platform_cpu_init() by the ia64 machvec code. | 566 | * platform_cpu_init() by the ia64 machvec code. |
567 | */ | 567 | */ |
568 | void __init sn_cpu_init(void) | 568 | void __cpuinit sn_cpu_init(void) |
569 | { | 569 | { |
570 | int cpuid; | 570 | int cpuid; |
571 | int cpuphyid; | 571 | int cpuphyid; |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 4d4b6fb156e1..694b0c63ee50 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -95,6 +95,10 @@ config GENERIC_TBSYNC | |||
95 | default y if PPC32 && SMP | 95 | default y if PPC32 && SMP |
96 | default n | 96 | default n |
97 | 97 | ||
98 | config AUDIT_ARCH | ||
99 | bool | ||
100 | default y | ||
101 | |||
98 | config DEFAULT_UIMAGE | 102 | config DEFAULT_UIMAGE |
99 | bool | 103 | bool |
100 | help | 104 | help |
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index 956c2e5564b7..7d32ad0194a4 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile | |||
@@ -70,6 +70,8 @@ obj-$(CONFIG_PCI) += $(pci64-y) $(pci32-y) | |||
70 | kexec-$(CONFIG_PPC64) := machine_kexec_64.o | 70 | kexec-$(CONFIG_PPC64) := machine_kexec_64.o |
71 | kexec-$(CONFIG_PPC32) := machine_kexec_32.o | 71 | kexec-$(CONFIG_PPC32) := machine_kexec_32.o |
72 | obj-$(CONFIG_KEXEC) += machine_kexec.o crash.o $(kexec-y) | 72 | obj-$(CONFIG_KEXEC) += machine_kexec.o crash.o $(kexec-y) |
73 | obj-$(CONFIG_AUDIT) += audit.o | ||
74 | obj64-$(CONFIG_AUDIT) += compat_audit.o | ||
73 | 75 | ||
74 | ifeq ($(CONFIG_PPC_ISERIES),y) | 76 | ifeq ($(CONFIG_PPC_ISERIES),y) |
75 | $(obj)/head_64.o: $(obj)/lparmap.s | 77 | $(obj)/head_64.o: $(obj)/lparmap.s |
diff --git a/arch/powerpc/kernel/audit.c b/arch/powerpc/kernel/audit.c new file mode 100644 index 000000000000..7fe5e6300e9a --- /dev/null +++ b/arch/powerpc/kernel/audit.c | |||
@@ -0,0 +1,66 @@ | |||
1 | #include <linux/init.h> | ||
2 | #include <linux/types.h> | ||
3 | #include <linux/audit.h> | ||
4 | #include <asm/unistd.h> | ||
5 | |||
6 | static unsigned dir_class[] = { | ||
7 | #include <asm-generic/audit_dir_write.h> | ||
8 | ~0U | ||
9 | }; | ||
10 | |||
11 | static unsigned read_class[] = { | ||
12 | #include <asm-generic/audit_read.h> | ||
13 | ~0U | ||
14 | }; | ||
15 | |||
16 | static unsigned write_class[] = { | ||
17 | #include <asm-generic/audit_write.h> | ||
18 | ~0U | ||
19 | }; | ||
20 | |||
21 | static unsigned chattr_class[] = { | ||
22 | #include <asm-generic/audit_change_attr.h> | ||
23 | ~0U | ||
24 | }; | ||
25 | |||
26 | int audit_classify_syscall(int abi, unsigned syscall) | ||
27 | { | ||
28 | #ifdef CONFIG_PPC64 | ||
29 | extern int ppc32_classify_syscall(unsigned); | ||
30 | if (abi == AUDIT_ARCH_PPC) | ||
31 | return ppc32_classify_syscall(syscall); | ||
32 | #endif | ||
33 | switch(syscall) { | ||
34 | case __NR_open: | ||
35 | return 2; | ||
36 | case __NR_openat: | ||
37 | return 3; | ||
38 | case __NR_socketcall: | ||
39 | return 4; | ||
40 | case __NR_execve: | ||
41 | return 5; | ||
42 | default: | ||
43 | return 0; | ||
44 | } | ||
45 | } | ||
46 | |||
47 | static int __init audit_classes_init(void) | ||
48 | { | ||
49 | #ifdef CONFIG_PPC64 | ||
50 | extern __u32 ppc32_dir_class[]; | ||
51 | extern __u32 ppc32_write_class[]; | ||
52 | extern __u32 ppc32_read_class[]; | ||
53 | extern __u32 ppc32_chattr_class[]; | ||
54 | audit_register_class(AUDIT_CLASS_WRITE_32, ppc32_write_class); | ||
55 | audit_register_class(AUDIT_CLASS_READ_32, ppc32_read_class); | ||
56 | audit_register_class(AUDIT_CLASS_DIR_WRITE_32, ppc32_dir_class); | ||
57 | audit_register_class(AUDIT_CLASS_CHATTR_32, ppc32_chattr_class); | ||
58 | #endif | ||
59 | audit_register_class(AUDIT_CLASS_WRITE, write_class); | ||
60 | audit_register_class(AUDIT_CLASS_READ, read_class); | ||
61 | audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); | ||
62 | audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); | ||
63 | return 0; | ||
64 | } | ||
65 | |||
66 | __initcall(audit_classes_init); | ||
diff --git a/arch/powerpc/kernel/compat_audit.c b/arch/powerpc/kernel/compat_audit.c new file mode 100644 index 000000000000..640d4bb29321 --- /dev/null +++ b/arch/powerpc/kernel/compat_audit.c | |||
@@ -0,0 +1,38 @@ | |||
1 | #undef __powerpc64__ | ||
2 | #include <asm/unistd.h> | ||
3 | |||
4 | unsigned ppc32_dir_class[] = { | ||
5 | #include <asm-generic/audit_dir_write.h> | ||
6 | ~0U | ||
7 | }; | ||
8 | |||
9 | unsigned ppc32_chattr_class[] = { | ||
10 | #include <asm-generic/audit_change_attr.h> | ||
11 | ~0U | ||
12 | }; | ||
13 | |||
14 | unsigned ppc32_write_class[] = { | ||
15 | #include <asm-generic/audit_write.h> | ||
16 | ~0U | ||
17 | }; | ||
18 | |||
19 | unsigned ppc32_read_class[] = { | ||
20 | #include <asm-generic/audit_read.h> | ||
21 | ~0U | ||
22 | }; | ||
23 | |||
24 | int ppc32_classify_syscall(unsigned syscall) | ||
25 | { | ||
26 | switch(syscall) { | ||
27 | case __NR_open: | ||
28 | return 2; | ||
29 | case __NR_openat: | ||
30 | return 3; | ||
31 | case __NR_socketcall: | ||
32 | return 4; | ||
33 | case __NR_execve: | ||
34 | return 5; | ||
35 | default: | ||
36 | return 1; | ||
37 | } | ||
38 | } | ||
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index ae071a11ce71..2f4f70c4dbb2 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -118,6 +118,10 @@ config SYSVIPC_COMPAT | |||
118 | depends on COMPAT && SYSVIPC | 118 | depends on COMPAT && SYSVIPC |
119 | default y | 119 | default y |
120 | 120 | ||
121 | config AUDIT_ARCH | ||
122 | bool | ||
123 | default y | ||
124 | |||
121 | comment "Code generation options" | 125 | comment "Code generation options" |
122 | 126 | ||
123 | choice | 127 | choice |
diff --git a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile index 86601a945709..9a33ed6ca696 100644 --- a/arch/s390/kernel/Makefile +++ b/arch/s390/kernel/Makefile | |||
@@ -16,9 +16,11 @@ extra-y += head.o init_task.o vmlinux.lds | |||
16 | obj-$(CONFIG_MODULES) += s390_ksyms.o module.o | 16 | obj-$(CONFIG_MODULES) += s390_ksyms.o module.o |
17 | obj-$(CONFIG_SMP) += smp.o | 17 | obj-$(CONFIG_SMP) += smp.o |
18 | 18 | ||
19 | obj-$(CONFIG_AUDIT) += audit.o | ||
20 | compat-obj-$(CONFIG_AUDIT) += compat_audit.o | ||
19 | obj-$(CONFIG_COMPAT) += compat_linux.o compat_signal.o \ | 21 | obj-$(CONFIG_COMPAT) += compat_linux.o compat_signal.o \ |
20 | compat_wrapper.o compat_exec_domain.o \ | 22 | compat_wrapper.o compat_exec_domain.o \ |
21 | binfmt_elf32.o | 23 | binfmt_elf32.o $(compat-obj-y) |
22 | 24 | ||
23 | obj-$(CONFIG_VIRT_TIMER) += vtime.o | 25 | obj-$(CONFIG_VIRT_TIMER) += vtime.o |
24 | obj-$(CONFIG_STACKTRACE) += stacktrace.o | 26 | obj-$(CONFIG_STACKTRACE) += stacktrace.o |
diff --git a/arch/s390/kernel/audit.c b/arch/s390/kernel/audit.c new file mode 100644 index 000000000000..0741d9193390 --- /dev/null +++ b/arch/s390/kernel/audit.c | |||
@@ -0,0 +1,66 @@ | |||
1 | #include <linux/init.h> | ||
2 | #include <linux/types.h> | ||
3 | #include <linux/audit.h> | ||
4 | #include <asm/unistd.h> | ||
5 | |||
6 | static unsigned dir_class[] = { | ||
7 | #include <asm-generic/audit_dir_write.h> | ||
8 | ~0U | ||
9 | }; | ||
10 | |||
11 | static unsigned read_class[] = { | ||
12 | #include <asm-generic/audit_read.h> | ||
13 | ~0U | ||
14 | }; | ||
15 | |||
16 | static unsigned write_class[] = { | ||
17 | #include <asm-generic/audit_write.h> | ||
18 | ~0U | ||
19 | }; | ||
20 | |||
21 | static unsigned chattr_class[] = { | ||
22 | #include <asm-generic/audit_change_attr.h> | ||
23 | ~0U | ||
24 | }; | ||
25 | |||
26 | int audit_classify_syscall(int abi, unsigned syscall) | ||
27 | { | ||
28 | #ifdef CONFIG_COMPAT | ||
29 | extern int s390_classify_syscall(unsigned); | ||
30 | if (abi == AUDIT_ARCH_S390) | ||
31 | return s390_classify_syscall(syscall); | ||
32 | #endif | ||
33 | switch(syscall) { | ||
34 | case __NR_open: | ||
35 | return 2; | ||
36 | case __NR_openat: | ||
37 | return 3; | ||
38 | case __NR_socketcall: | ||
39 | return 4; | ||
40 | case __NR_execve: | ||
41 | return 5; | ||
42 | default: | ||
43 | return 0; | ||
44 | } | ||
45 | } | ||
46 | |||
47 | static int __init audit_classes_init(void) | ||
48 | { | ||
49 | #ifdef CONFIG_COMPAT | ||
50 | extern __u32 s390_dir_class[]; | ||
51 | extern __u32 s390_write_class[]; | ||
52 | extern __u32 s390_read_class[]; | ||
53 | extern __u32 s390_chattr_class[]; | ||
54 | audit_register_class(AUDIT_CLASS_WRITE_32, s390_write_class); | ||
55 | audit_register_class(AUDIT_CLASS_READ_32, s390_read_class); | ||
56 | audit_register_class(AUDIT_CLASS_DIR_WRITE_32, s390_dir_class); | ||
57 | audit_register_class(AUDIT_CLASS_CHATTR_32, s390_chattr_class); | ||
58 | #endif | ||
59 | audit_register_class(AUDIT_CLASS_WRITE, write_class); | ||
60 | audit_register_class(AUDIT_CLASS_READ, read_class); | ||
61 | audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); | ||
62 | audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); | ||
63 | return 0; | ||
64 | } | ||
65 | |||
66 | __initcall(audit_classes_init); | ||
diff --git a/arch/s390/kernel/compat_audit.c b/arch/s390/kernel/compat_audit.c new file mode 100644 index 000000000000..16d9436bfa91 --- /dev/null +++ b/arch/s390/kernel/compat_audit.c | |||
@@ -0,0 +1,38 @@ | |||
1 | #undef __s390x__ | ||
2 | #include <asm/unistd.h> | ||
3 | |||
4 | unsigned s390_dir_class[] = { | ||
5 | #include <asm-generic/audit_dir_write.h> | ||
6 | ~0U | ||
7 | }; | ||
8 | |||
9 | unsigned s390_chattr_class[] = { | ||
10 | #include <asm-generic/audit_change_attr.h> | ||
11 | ~0U | ||
12 | }; | ||
13 | |||
14 | unsigned s390_write_class[] = { | ||
15 | #include <asm-generic/audit_write.h> | ||
16 | ~0U | ||
17 | }; | ||
18 | |||
19 | unsigned s390_read_class[] = { | ||
20 | #include <asm-generic/audit_read.h> | ||
21 | ~0U | ||
22 | }; | ||
23 | |||
24 | int s390_classify_syscall(unsigned syscall) | ||
25 | { | ||
26 | switch(syscall) { | ||
27 | case __NR_open: | ||
28 | return 2; | ||
29 | case __NR_openat: | ||
30 | return 3; | ||
31 | case __NR_socketcall: | ||
32 | return 4; | ||
33 | case __NR_execve: | ||
34 | return 5; | ||
35 | default: | ||
36 | return 1; | ||
37 | } | ||
38 | } | ||
diff --git a/arch/sh64/Makefile b/arch/sh64/Makefile index 8ca57ffa2b70..ebf20043991c 100644 --- a/arch/sh64/Makefile +++ b/arch/sh64/Makefile | |||
@@ -26,7 +26,6 @@ LDFLAGS += -EB -mshelf32_linux | |||
26 | endif | 26 | endif |
27 | 27 | ||
28 | # No requirements for endianess support from AFLAGS, 'as' always run through gcc | 28 | # No requirements for endianess support from AFLAGS, 'as' always run through gcc |
29 | AFLAGS += -m5 -isa=sh64 -traditional | ||
30 | CFLAGS += $(cpu-y) | 29 | CFLAGS += $(cpu-y) |
31 | 30 | ||
32 | LDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_CACHED_MEMORY_OFFSET) \ | 31 | LDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_CACHED_MEMORY_OFFSET) \ |
diff --git a/arch/sh64/kernel/process.c b/arch/sh64/kernel/process.c index dba8e14013b6..db475b7833fb 100644 --- a/arch/sh64/kernel/process.c +++ b/arch/sh64/kernel/process.c | |||
@@ -355,6 +355,9 @@ void machine_power_off(void) | |||
355 | enter_deep_standby(); | 355 | enter_deep_standby(); |
356 | } | 356 | } |
357 | 357 | ||
358 | void (*pm_power_off)(void) = machine_power_off; | ||
359 | EXPORT_SYMBOL(pm_power_off); | ||
360 | |||
358 | void show_regs(struct pt_regs * regs) | 361 | void show_regs(struct pt_regs * regs) |
359 | { | 362 | { |
360 | unsigned long long ah, al, bh, bl, ch, cl; | 363 | unsigned long long ah, al, bh, bl, ch, cl; |
diff --git a/arch/sh64/mach-cayman/setup.c b/arch/sh64/mach-cayman/setup.c index d84895dda3cd..3ed87cd059d0 100644 --- a/arch/sh64/mach-cayman/setup.c +++ b/arch/sh64/mach-cayman/setup.c | |||
@@ -112,8 +112,10 @@ struct resource io_resources[] = { | |||
112 | }; | 112 | }; |
113 | 113 | ||
114 | struct resource kram_resources[] = { | 114 | struct resource kram_resources[] = { |
115 | { "Kernel code", 0, 0 }, /* These must be last in the array */ | 115 | /* These must be last in the array */ |
116 | { "Kernel data", 0, 0 } /* These must be last in the array */ | 116 | { .name = "Kernel code", .start = 0, .end = 0 }, |
117 | /* These must be last in the array */ | ||
118 | { .name = "Kernel data", .start = 0, .end = 0 } | ||
117 | }; | 119 | }; |
118 | 120 | ||
119 | struct resource xram_resources[] = { | 121 | struct resource xram_resources[] = { |
diff --git a/arch/sh64/mm/ioremap.c b/arch/sh64/mm/ioremap.c index fb1866fa2c9d..80c56754f513 100644 --- a/arch/sh64/mm/ioremap.c +++ b/arch/sh64/mm/ioremap.c | |||
@@ -449,7 +449,9 @@ ioremap_proc_info(char *buf, char **start, off_t fpos, int length, int *eof, | |||
449 | if (p + 32 >= e) /* Better than nothing */ | 449 | if (p + 32 >= e) /* Better than nothing */ |
450 | break; | 450 | break; |
451 | if ((nm = r->name) == 0) nm = "???"; | 451 | if ((nm = r->name) == 0) nm = "???"; |
452 | p += sprintf(p, "%08lx-%08lx: %s\n", r->start, r->end, nm); | 452 | p += sprintf(p, "%08lx-%08lx: %s\n", |
453 | (unsigned long)r->start, | ||
454 | (unsigned long)r->end, nm); | ||
453 | } | 455 | } |
454 | 456 | ||
455 | return p-buf; | 457 | return p-buf; |
diff --git a/arch/sparc/kernel/sys_sparc.c b/arch/sparc/kernel/sys_sparc.c index a41c8a5c2007..94ff58c9d4a9 100644 --- a/arch/sparc/kernel/sys_sparc.c +++ b/arch/sparc/kernel/sys_sparc.c | |||
@@ -219,6 +219,21 @@ out: | |||
219 | return err; | 219 | return err; |
220 | } | 220 | } |
221 | 221 | ||
222 | int sparc_mmap_check(unsigned long addr, unsigned long len, unsigned long flags) | ||
223 | { | ||
224 | if (ARCH_SUN4C_SUN4 && | ||
225 | (len > 0x20000000 || | ||
226 | ((flags & MAP_FIXED) && | ||
227 | addr < 0xe0000000 && addr + len > 0x20000000))) | ||
228 | return -EINVAL; | ||
229 | |||
230 | /* See asm-sparc/uaccess.h */ | ||
231 | if (len > TASK_SIZE - PAGE_SIZE || addr + len > TASK_SIZE - PAGE_SIZE) | ||
232 | return -EINVAL; | ||
233 | |||
234 | return 0; | ||
235 | } | ||
236 | |||
222 | /* Linux version of mmap */ | 237 | /* Linux version of mmap */ |
223 | static unsigned long do_mmap2(unsigned long addr, unsigned long len, | 238 | static unsigned long do_mmap2(unsigned long addr, unsigned long len, |
224 | unsigned long prot, unsigned long flags, unsigned long fd, | 239 | unsigned long prot, unsigned long flags, unsigned long fd, |
@@ -233,25 +248,13 @@ static unsigned long do_mmap2(unsigned long addr, unsigned long len, | |||
233 | goto out; | 248 | goto out; |
234 | } | 249 | } |
235 | 250 | ||
236 | retval = -EINVAL; | ||
237 | len = PAGE_ALIGN(len); | 251 | len = PAGE_ALIGN(len); |
238 | if (ARCH_SUN4C_SUN4 && | ||
239 | (len > 0x20000000 || | ||
240 | ((flags & MAP_FIXED) && | ||
241 | addr < 0xe0000000 && addr + len > 0x20000000))) | ||
242 | goto out_putf; | ||
243 | |||
244 | /* See asm-sparc/uaccess.h */ | ||
245 | if (len > TASK_SIZE - PAGE_SIZE || addr + len > TASK_SIZE - PAGE_SIZE) | ||
246 | goto out_putf; | ||
247 | |||
248 | flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); | 252 | flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); |
249 | 253 | ||
250 | down_write(¤t->mm->mmap_sem); | 254 | down_write(¤t->mm->mmap_sem); |
251 | retval = do_mmap_pgoff(file, addr, len, prot, flags, pgoff); | 255 | retval = do_mmap_pgoff(file, addr, len, prot, flags, pgoff); |
252 | up_write(¤t->mm->mmap_sem); | 256 | up_write(¤t->mm->mmap_sem); |
253 | 257 | ||
254 | out_putf: | ||
255 | if (file) | 258 | if (file) |
256 | fput(file); | 259 | fput(file); |
257 | out: | 260 | out: |
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig index 8a36ba8868db..8d8ca716f7a7 100644 --- a/arch/sparc64/Kconfig +++ b/arch/sparc64/Kconfig | |||
@@ -34,6 +34,10 @@ config ARCH_MAY_HAVE_PC_FDC | |||
34 | bool | 34 | bool |
35 | default y | 35 | default y |
36 | 36 | ||
37 | config AUDIT_ARCH | ||
38 | bool | ||
39 | default y | ||
40 | |||
37 | choice | 41 | choice |
38 | prompt "Kernel page size" | 42 | prompt "Kernel page size" |
39 | default SPARC64_PAGE_SIZE_8KB | 43 | default SPARC64_PAGE_SIZE_8KB |
diff --git a/arch/sparc64/kernel/Makefile b/arch/sparc64/kernel/Makefile index 86c9fe3f3e4a..e1eabebaed39 100644 --- a/arch/sparc64/kernel/Makefile +++ b/arch/sparc64/kernel/Makefile | |||
@@ -25,6 +25,9 @@ obj-$(CONFIG_MODULES) += module.o | |||
25 | obj-$(CONFIG_US3_FREQ) += us3_cpufreq.o | 25 | obj-$(CONFIG_US3_FREQ) += us3_cpufreq.o |
26 | obj-$(CONFIG_US2E_FREQ) += us2e_cpufreq.o | 26 | obj-$(CONFIG_US2E_FREQ) += us2e_cpufreq.o |
27 | obj-$(CONFIG_KPROBES) += kprobes.o | 27 | obj-$(CONFIG_KPROBES) += kprobes.o |
28 | obj-$(CONFIG_AUDIT) += audit.o | ||
29 | obj-$(CONFIG_AUDIT)$(CONFIG_SPARC32_COMPAT) += compat_audit.o | ||
30 | obj-y += $(obj-yy) | ||
28 | 31 | ||
29 | ifdef CONFIG_SUNOS_EMUL | 32 | ifdef CONFIG_SUNOS_EMUL |
30 | obj-y += sys_sunos32.o sunos_ioctl32.o | 33 | obj-y += sys_sunos32.o sunos_ioctl32.o |
diff --git a/arch/sparc64/kernel/audit.c b/arch/sparc64/kernel/audit.c new file mode 100644 index 000000000000..aef19cc27072 --- /dev/null +++ b/arch/sparc64/kernel/audit.c | |||
@@ -0,0 +1,66 @@ | |||
1 | #include <linux/init.h> | ||
2 | #include <linux/types.h> | ||
3 | #include <linux/audit.h> | ||
4 | #include <asm/unistd.h> | ||
5 | |||
6 | static unsigned dir_class[] = { | ||
7 | #include <asm-generic/audit_dir_write.h> | ||
8 | ~0U | ||
9 | }; | ||
10 | |||
11 | static unsigned read_class[] = { | ||
12 | #include <asm-generic/audit_read.h> | ||
13 | ~0U | ||
14 | }; | ||
15 | |||
16 | static unsigned write_class[] = { | ||
17 | #include <asm-generic/audit_write.h> | ||
18 | ~0U | ||
19 | }; | ||
20 | |||
21 | static unsigned chattr_class[] = { | ||
22 | #include <asm-generic/audit_change_attr.h> | ||
23 | ~0U | ||
24 | }; | ||
25 | |||
26 | int audit_classify_syscall(int abi, unsigned syscall) | ||
27 | { | ||
28 | #ifdef CONFIG_SPARC32_COMPAT | ||
29 | extern int sparc32_classify_syscall(unsigned); | ||
30 | if (abi == AUDIT_ARCH_SPARC) | ||
31 | return sparc32_classify_syscall(syscall); | ||
32 | #endif | ||
33 | switch(syscall) { | ||
34 | case __NR_open: | ||
35 | return 2; | ||
36 | case __NR_openat: | ||
37 | return 3; | ||
38 | case __NR_socketcall: | ||
39 | return 4; | ||
40 | case __NR_execve: | ||
41 | return 5; | ||
42 | default: | ||
43 | return 0; | ||
44 | } | ||
45 | } | ||
46 | |||
47 | static int __init audit_classes_init(void) | ||
48 | { | ||
49 | #ifdef CONFIG_SPARC32_COMPAT | ||
50 | extern __u32 sparc32_dir_class[]; | ||
51 | extern __u32 sparc32_write_class[]; | ||
52 | extern __u32 sparc32_read_class[]; | ||
53 | extern __u32 sparc32_chattr_class[]; | ||
54 | audit_register_class(AUDIT_CLASS_WRITE_32, sparc32_write_class); | ||
55 | audit_register_class(AUDIT_CLASS_READ_32, sparc32_read_class); | ||
56 | audit_register_class(AUDIT_CLASS_DIR_WRITE_32, sparc32_dir_class); | ||
57 | audit_register_class(AUDIT_CLASS_CHATTR_32, sparc32_chattr_class); | ||
58 | #endif | ||
59 | audit_register_class(AUDIT_CLASS_WRITE, write_class); | ||
60 | audit_register_class(AUDIT_CLASS_READ, read_class); | ||
61 | audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); | ||
62 | audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); | ||
63 | return 0; | ||
64 | } | ||
65 | |||
66 | __initcall(audit_classes_init); | ||
diff --git a/arch/sparc64/kernel/compat_audit.c b/arch/sparc64/kernel/compat_audit.c new file mode 100644 index 000000000000..cca96c91b780 --- /dev/null +++ b/arch/sparc64/kernel/compat_audit.c | |||
@@ -0,0 +1,37 @@ | |||
1 | #include <asm-sparc/unistd.h> | ||
2 | |||
3 | unsigned sparc32_dir_class[] = { | ||
4 | #include <asm-generic/audit_dir_write.h> | ||
5 | ~0U | ||
6 | }; | ||
7 | |||
8 | unsigned sparc32_chattr_class[] = { | ||
9 | #include <asm-generic/audit_change_attr.h> | ||
10 | ~0U | ||
11 | }; | ||
12 | |||
13 | unsigned sparc32_write_class[] = { | ||
14 | #include <asm-generic/audit_write.h> | ||
15 | ~0U | ||
16 | }; | ||
17 | |||
18 | unsigned sparc32_read_class[] = { | ||
19 | #include <asm-generic/audit_read.h> | ||
20 | ~0U | ||
21 | }; | ||
22 | |||
23 | int sparc32_classify_syscall(unsigned syscall) | ||
24 | { | ||
25 | switch(syscall) { | ||
26 | case __NR_open: | ||
27 | return 2; | ||
28 | case __NR_openat: | ||
29 | return 3; | ||
30 | case __NR_socketcall: | ||
31 | return 4; | ||
32 | case __NR_execve: | ||
33 | return 5; | ||
34 | default: | ||
35 | return 1; | ||
36 | } | ||
37 | } | ||
diff --git a/arch/sparc64/kernel/sys_sparc.c b/arch/sparc64/kernel/sys_sparc.c index 054d0abdb7ee..bf5f14ee73de 100644 --- a/arch/sparc64/kernel/sys_sparc.c +++ b/arch/sparc64/kernel/sys_sparc.c | |||
@@ -548,6 +548,26 @@ asmlinkage long sparc64_personality(unsigned long personality) | |||
548 | return ret; | 548 | return ret; |
549 | } | 549 | } |
550 | 550 | ||
551 | int sparc64_mmap_check(unsigned long addr, unsigned long len, | ||
552 | unsigned long flags) | ||
553 | { | ||
554 | if (test_thread_flag(TIF_32BIT)) { | ||
555 | if (len >= STACK_TOP32) | ||
556 | return -EINVAL; | ||
557 | |||
558 | if ((flags & MAP_FIXED) && addr > STACK_TOP32 - len) | ||
559 | return -EINVAL; | ||
560 | } else { | ||
561 | if (len >= VA_EXCLUDE_START) | ||
562 | return -EINVAL; | ||
563 | |||
564 | if ((flags & MAP_FIXED) && invalid_64bit_range(addr, len)) | ||
565 | return -EINVAL; | ||
566 | } | ||
567 | |||
568 | return 0; | ||
569 | } | ||
570 | |||
551 | /* Linux version of mmap */ | 571 | /* Linux version of mmap */ |
552 | asmlinkage unsigned long sys_mmap(unsigned long addr, unsigned long len, | 572 | asmlinkage unsigned long sys_mmap(unsigned long addr, unsigned long len, |
553 | unsigned long prot, unsigned long flags, unsigned long fd, | 573 | unsigned long prot, unsigned long flags, unsigned long fd, |
@@ -563,27 +583,11 @@ asmlinkage unsigned long sys_mmap(unsigned long addr, unsigned long len, | |||
563 | } | 583 | } |
564 | flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); | 584 | flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); |
565 | len = PAGE_ALIGN(len); | 585 | len = PAGE_ALIGN(len); |
566 | retval = -EINVAL; | ||
567 | |||
568 | if (test_thread_flag(TIF_32BIT)) { | ||
569 | if (len >= STACK_TOP32) | ||
570 | goto out_putf; | ||
571 | |||
572 | if ((flags & MAP_FIXED) && addr > STACK_TOP32 - len) | ||
573 | goto out_putf; | ||
574 | } else { | ||
575 | if (len >= VA_EXCLUDE_START) | ||
576 | goto out_putf; | ||
577 | |||
578 | if ((flags & MAP_FIXED) && invalid_64bit_range(addr, len)) | ||
579 | goto out_putf; | ||
580 | } | ||
581 | 586 | ||
582 | down_write(¤t->mm->mmap_sem); | 587 | down_write(¤t->mm->mmap_sem); |
583 | retval = do_mmap(file, addr, len, prot, flags, off); | 588 | retval = do_mmap(file, addr, len, prot, flags, off); |
584 | up_write(¤t->mm->mmap_sem); | 589 | up_write(¤t->mm->mmap_sem); |
585 | 590 | ||
586 | out_putf: | ||
587 | if (file) | 591 | if (file) |
588 | fput(file); | 592 | fput(file); |
589 | out: | 593 | out: |
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig index 28df7d88ce2c..6cd4878625f1 100644 --- a/arch/x86_64/Kconfig +++ b/arch/x86_64/Kconfig | |||
@@ -85,6 +85,10 @@ config DMI | |||
85 | bool | 85 | bool |
86 | default y | 86 | default y |
87 | 87 | ||
88 | config AUDIT_ARCH | ||
89 | bool | ||
90 | default y | ||
91 | |||
88 | source "init/Kconfig" | 92 | source "init/Kconfig" |
89 | 93 | ||
90 | 94 | ||
diff --git a/arch/x86_64/ia32/audit.c b/arch/x86_64/ia32/audit.c index ab94f2e58cdd..92d7d0c8d93f 100644 --- a/arch/x86_64/ia32/audit.c +++ b/arch/x86_64/ia32/audit.c | |||
@@ -9,3 +9,29 @@ unsigned ia32_chattr_class[] = { | |||
9 | #include <asm-generic/audit_change_attr.h> | 9 | #include <asm-generic/audit_change_attr.h> |
10 | ~0U | 10 | ~0U |
11 | }; | 11 | }; |
12 | |||
13 | unsigned ia32_write_class[] = { | ||
14 | #include <asm-generic/audit_write.h> | ||
15 | ~0U | ||
16 | }; | ||
17 | |||
18 | unsigned ia32_read_class[] = { | ||
19 | #include <asm-generic/audit_read.h> | ||
20 | ~0U | ||
21 | }; | ||
22 | |||
23 | int ia32_classify_syscall(unsigned syscall) | ||
24 | { | ||
25 | switch(syscall) { | ||
26 | case __NR_open: | ||
27 | return 2; | ||
28 | case __NR_openat: | ||
29 | return 3; | ||
30 | case __NR_socketcall: | ||
31 | return 4; | ||
32 | case __NR_execve: | ||
33 | return 5; | ||
34 | default: | ||
35 | return 1; | ||
36 | } | ||
37 | } | ||
diff --git a/arch/x86_64/kernel/audit.c b/arch/x86_64/kernel/audit.c index a067aa468a85..21f33387bef3 100644 --- a/arch/x86_64/kernel/audit.c +++ b/arch/x86_64/kernel/audit.c | |||
@@ -8,19 +8,54 @@ static unsigned dir_class[] = { | |||
8 | ~0U | 8 | ~0U |
9 | }; | 9 | }; |
10 | 10 | ||
11 | static unsigned read_class[] = { | ||
12 | #include <asm-generic/audit_read.h> | ||
13 | ~0U | ||
14 | }; | ||
15 | |||
16 | static unsigned write_class[] = { | ||
17 | #include <asm-generic/audit_write.h> | ||
18 | ~0U | ||
19 | }; | ||
20 | |||
11 | static unsigned chattr_class[] = { | 21 | static unsigned chattr_class[] = { |
12 | #include <asm-generic/audit_change_attr.h> | 22 | #include <asm-generic/audit_change_attr.h> |
13 | ~0U | 23 | ~0U |
14 | }; | 24 | }; |
15 | 25 | ||
26 | int audit_classify_syscall(int abi, unsigned syscall) | ||
27 | { | ||
28 | #ifdef CONFIG_IA32_EMULATION | ||
29 | extern int ia32_classify_syscall(unsigned); | ||
30 | if (abi == AUDIT_ARCH_I386) | ||
31 | return ia32_classify_syscall(syscall); | ||
32 | #endif | ||
33 | switch(syscall) { | ||
34 | case __NR_open: | ||
35 | return 2; | ||
36 | case __NR_openat: | ||
37 | return 3; | ||
38 | case __NR_execve: | ||
39 | return 5; | ||
40 | default: | ||
41 | return 0; | ||
42 | } | ||
43 | } | ||
44 | |||
16 | static int __init audit_classes_init(void) | 45 | static int __init audit_classes_init(void) |
17 | { | 46 | { |
18 | #ifdef CONFIG_IA32_EMULATION | 47 | #ifdef CONFIG_IA32_EMULATION |
19 | extern __u32 ia32_dir_class[]; | 48 | extern __u32 ia32_dir_class[]; |
49 | extern __u32 ia32_write_class[]; | ||
50 | extern __u32 ia32_read_class[]; | ||
20 | extern __u32 ia32_chattr_class[]; | 51 | extern __u32 ia32_chattr_class[]; |
52 | audit_register_class(AUDIT_CLASS_WRITE_32, ia32_write_class); | ||
53 | audit_register_class(AUDIT_CLASS_READ_32, ia32_read_class); | ||
21 | audit_register_class(AUDIT_CLASS_DIR_WRITE_32, ia32_dir_class); | 54 | audit_register_class(AUDIT_CLASS_DIR_WRITE_32, ia32_dir_class); |
22 | audit_register_class(AUDIT_CLASS_CHATTR_32, ia32_chattr_class); | 55 | audit_register_class(AUDIT_CLASS_CHATTR_32, ia32_chattr_class); |
23 | #endif | 56 | #endif |
57 | audit_register_class(AUDIT_CLASS_WRITE, write_class); | ||
58 | audit_register_class(AUDIT_CLASS_READ, read_class); | ||
24 | audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); | 59 | audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); |
25 | audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); | 60 | audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); |
26 | return 0; | 61 | return 0; |
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c index c12f1b71e934..41b74b13a00c 100644 --- a/drivers/ide/ide-proc.c +++ b/drivers/ide/ide-proc.c | |||
@@ -376,6 +376,8 @@ static int proc_ide_read_media | |||
376 | break; | 376 | break; |
377 | case ide_floppy:media = "floppy\n"; | 377 | case ide_floppy:media = "floppy\n"; |
378 | break; | 378 | break; |
379 | case ide_optical:media = "optical\n"; | ||
380 | break; | ||
379 | default: media = "UNKNOWN\n"; | 381 | default: media = "UNKNOWN\n"; |
380 | break; | 382 | break; |
381 | } | 383 | } |
diff --git a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c index a7c725f8bf64..f286079d233f 100644 --- a/drivers/ide/pci/aec62xx.c +++ b/drivers/ide/pci/aec62xx.c | |||
@@ -425,12 +425,12 @@ static int __devinit aec62xx_init_one(struct pci_dev *dev, const struct pci_devi | |||
425 | return d->init_setup(dev, d); | 425 | return d->init_setup(dev, d); |
426 | } | 426 | } |
427 | 427 | ||
428 | static const struct pci_device_id aec62xx_pci_tbl[] = { | 428 | static struct pci_device_id aec62xx_pci_tbl[] = { |
429 | { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP850UF), 0 }, | 429 | { PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP850UF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, |
430 | { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP860), 1 }, | 430 | { PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP860, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, |
431 | { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP860R), 2 }, | 431 | { PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP860R, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2 }, |
432 | { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP865), 3 }, | 432 | { PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP865, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3 }, |
433 | { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP865R), 4 }, | 433 | { PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP865R, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 }, |
434 | { 0, }, | 434 | { 0, }, |
435 | }; | 435 | }; |
436 | MODULE_DEVICE_TABLE(pci, aec62xx_pci_tbl); | 436 | MODULE_DEVICE_TABLE(pci, aec62xx_pci_tbl); |
diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c index 03677bff0d72..f063d954236c 100644 --- a/drivers/ide/pci/serverworks.c +++ b/drivers/ide/pci/serverworks.c | |||
@@ -649,11 +649,11 @@ static int __devinit svwks_init_one(struct pci_dev *dev, const struct pci_device | |||
649 | } | 649 | } |
650 | 650 | ||
651 | static struct pci_device_id svwks_pci_tbl[] = { | 651 | static struct pci_device_id svwks_pci_tbl[] = { |
652 | { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4IDE), 0}, | 652 | { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
653 | { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5IDE), 1}, | 653 | { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, |
654 | { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE), 2}, | 654 | { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2}, |
655 | { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2), 3}, | 655 | { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3}, |
656 | { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT1000IDE), 4}, | 656 | { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT1000IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4}, |
657 | { 0, }, | 657 | { 0, }, |
658 | }; | 658 | }; |
659 | MODULE_DEVICE_TABLE(pci, svwks_pci_tbl); | 659 | MODULE_DEVICE_TABLE(pci, svwks_pci_tbl); |
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c index 25ceb4a39ed2..20b392948f36 100644 --- a/drivers/ide/pci/siimage.c +++ b/drivers/ide/pci/siimage.c | |||
@@ -1082,10 +1082,10 @@ static int __devinit siimage_init_one(struct pci_dev *dev, const struct pci_devi | |||
1082 | } | 1082 | } |
1083 | 1083 | ||
1084 | static struct pci_device_id siimage_pci_tbl[] = { | 1084 | static struct pci_device_id siimage_pci_tbl[] = { |
1085 | { PCI_DEVICE(PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_680), 0}, | 1085 | { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
1086 | #ifdef CONFIG_BLK_DEV_IDE_SATA | 1086 | #ifdef CONFIG_BLK_DEV_IDE_SATA |
1087 | { PCI_DEVICE(PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_3112), 1}, | 1087 | { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_3112, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, |
1088 | { PCI_DEVICE(PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_1210SA), 2}, | 1088 | { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_1210SA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2}, |
1089 | #endif | 1089 | #endif |
1090 | { 0, }, | 1090 | { 0, }, |
1091 | }; | 1091 | }; |
diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c index 8a6c23ac8cc1..f03196c5db37 100644 --- a/drivers/ide/pci/sis5513.c +++ b/drivers/ide/pci/sis5513.c | |||
@@ -86,6 +86,8 @@ static const struct { | |||
86 | u8 chipset_family; | 86 | u8 chipset_family; |
87 | u8 flags; | 87 | u8 flags; |
88 | } SiSHostChipInfo[] = { | 88 | } SiSHostChipInfo[] = { |
89 | { "SiS968", PCI_DEVICE_ID_SI_968, ATA_133 }, | ||
90 | { "SiS966", PCI_DEVICE_ID_SI_966, ATA_133 }, | ||
89 | { "SiS965", PCI_DEVICE_ID_SI_965, ATA_133 }, | 91 | { "SiS965", PCI_DEVICE_ID_SI_965, ATA_133 }, |
90 | { "SiS745", PCI_DEVICE_ID_SI_745, ATA_100 }, | 92 | { "SiS745", PCI_DEVICE_ID_SI_745, ATA_100 }, |
91 | { "SiS735", PCI_DEVICE_ID_SI_735, ATA_100 }, | 93 | { "SiS735", PCI_DEVICE_ID_SI_735, ATA_100 }, |
diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig index ef52e6da01ed..ed4aa4e7912c 100644 --- a/drivers/media/Kconfig +++ b/drivers/media/Kconfig | |||
@@ -53,7 +53,7 @@ config VIDEO_V4L1_COMPAT | |||
53 | If you are unsure as to whether this is required, answer Y. | 53 | If you are unsure as to whether this is required, answer Y. |
54 | 54 | ||
55 | config VIDEO_V4L2 | 55 | config VIDEO_V4L2 |
56 | tristate | 56 | bool |
57 | default y | 57 | default y |
58 | 58 | ||
59 | source "drivers/media/video/Kconfig" | 59 | source "drivers/media/video/Kconfig" |
diff --git a/drivers/media/common/saa7146_video.c b/drivers/media/common/saa7146_video.c index 8393d472d3b8..7e0cedc557df 100644 --- a/drivers/media/common/saa7146_video.c +++ b/drivers/media/common/saa7146_video.c | |||
@@ -1190,6 +1190,7 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int | |||
1190 | } | 1190 | } |
1191 | return err; | 1191 | return err; |
1192 | } | 1192 | } |
1193 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
1193 | case VIDIOCGMBUF: | 1194 | case VIDIOCGMBUF: |
1194 | { | 1195 | { |
1195 | struct video_mbuf *mbuf = arg; | 1196 | struct video_mbuf *mbuf = arg; |
@@ -1218,6 +1219,7 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int | |||
1218 | mutex_unlock(&q->lock); | 1219 | mutex_unlock(&q->lock); |
1219 | return 0; | 1220 | return 0; |
1220 | } | 1221 | } |
1222 | #endif | ||
1221 | default: | 1223 | default: |
1222 | return v4l_compat_translate_ioctl(inode,file,cmd,arg, | 1224 | return v4l_compat_translate_ioctl(inode,file,cmd,arg, |
1223 | saa7146_video_do_ioctl); | 1225 | saa7146_video_do_ioctl); |
diff --git a/drivers/media/dvb/b2c2/Kconfig b/drivers/media/dvb/b2c2/Kconfig index d7f1fd5b7b02..49a06fc54c51 100644 --- a/drivers/media/dvb/b2c2/Kconfig +++ b/drivers/media/dvb/b2c2/Kconfig | |||
@@ -1,6 +1,7 @@ | |||
1 | config DVB_B2C2_FLEXCOP | 1 | config DVB_B2C2_FLEXCOP |
2 | tristate "Technisat/B2C2 FlexCopII(b) and FlexCopIII adapters" | 2 | tristate "Technisat/B2C2 FlexCopII(b) and FlexCopIII adapters" |
3 | depends on DVB_CORE && I2C | 3 | depends on DVB_CORE && I2C |
4 | select DVB_PLL | ||
4 | select DVB_STV0299 | 5 | select DVB_STV0299 |
5 | select DVB_MT352 | 6 | select DVB_MT352 |
6 | select DVB_MT312 | 7 | select DVB_MT312 |
diff --git a/drivers/media/dvb/bt8xx/Kconfig b/drivers/media/dvb/bt8xx/Kconfig index f394002118f8..7d0ee1ab2903 100644 --- a/drivers/media/dvb/bt8xx/Kconfig +++ b/drivers/media/dvb/bt8xx/Kconfig | |||
@@ -1,6 +1,7 @@ | |||
1 | config DVB_BT8XX | 1 | config DVB_BT8XX |
2 | tristate "BT8xx based PCI cards" | 2 | tristate "BT8xx based PCI cards" |
3 | depends on DVB_CORE && PCI && I2C && VIDEO_BT848 | 3 | depends on DVB_CORE && PCI && I2C && VIDEO_BT848 |
4 | select DVB_PLL | ||
4 | select DVB_MT352 | 5 | select DVB_MT352 |
5 | select DVB_SP887X | 6 | select DVB_SP887X |
6 | select DVB_NXT6000 | 7 | select DVB_NXT6000 |
diff --git a/drivers/media/dvb/dvb-usb/Kconfig b/drivers/media/dvb/dvb-usb/Kconfig index 3bc6722a6443..75824b77198a 100644 --- a/drivers/media/dvb/dvb-usb/Kconfig +++ b/drivers/media/dvb/dvb-usb/Kconfig | |||
@@ -2,6 +2,7 @@ config DVB_USB | |||
2 | tristate "Support for various USB DVB devices" | 2 | tristate "Support for various USB DVB devices" |
3 | depends on DVB_CORE && USB && I2C | 3 | depends on DVB_CORE && USB && I2C |
4 | select FW_LOADER | 4 | select FW_LOADER |
5 | select DVB_PLL | ||
5 | help | 6 | help |
6 | By enabling this you will be able to choose the various supported | 7 | By enabling this you will be able to choose the various supported |
7 | USB1.1 and USB2.0 DVB devices. | 8 | USB1.1 and USB2.0 DVB devices. |
diff --git a/drivers/media/dvb/frontends/Kconfig b/drivers/media/dvb/frontends/Kconfig index 0ef361f0309b..db978555b1eb 100644 --- a/drivers/media/dvb/frontends/Kconfig +++ b/drivers/media/dvb/frontends/Kconfig | |||
@@ -6,43 +6,43 @@ comment "DVB-S (satellite) frontends" | |||
6 | 6 | ||
7 | config DVB_STV0299 | 7 | config DVB_STV0299 |
8 | tristate "ST STV0299 based" | 8 | tristate "ST STV0299 based" |
9 | depends on DVB_CORE | 9 | depends on DVB_CORE && I2C |
10 | help | 10 | help |
11 | A DVB-S tuner module. Say Y when you want to support this frontend. | 11 | A DVB-S tuner module. Say Y when you want to support this frontend. |
12 | 12 | ||
13 | config DVB_CX24110 | 13 | config DVB_CX24110 |
14 | tristate "Conexant CX24110 based" | 14 | tristate "Conexant CX24110 based" |
15 | depends on DVB_CORE | 15 | depends on DVB_CORE && I2C |
16 | help | 16 | help |
17 | A DVB-S tuner module. Say Y when you want to support this frontend. | 17 | A DVB-S tuner module. Say Y when you want to support this frontend. |
18 | 18 | ||
19 | config DVB_CX24123 | 19 | config DVB_CX24123 |
20 | tristate "Conexant CX24123 based" | 20 | tristate "Conexant CX24123 based" |
21 | depends on DVB_CORE | 21 | depends on DVB_CORE && I2C |
22 | help | 22 | help |
23 | A DVB-S tuner module. Say Y when you want to support this frontend. | 23 | A DVB-S tuner module. Say Y when you want to support this frontend. |
24 | 24 | ||
25 | config DVB_TDA8083 | 25 | config DVB_TDA8083 |
26 | tristate "Philips TDA8083 based" | 26 | tristate "Philips TDA8083 based" |
27 | depends on DVB_CORE | 27 | depends on DVB_CORE && I2C |
28 | help | 28 | help |
29 | A DVB-S tuner module. Say Y when you want to support this frontend. | 29 | A DVB-S tuner module. Say Y when you want to support this frontend. |
30 | 30 | ||
31 | config DVB_MT312 | 31 | config DVB_MT312 |
32 | tristate "Zarlink VP310/MT312 based" | 32 | tristate "Zarlink VP310/MT312 based" |
33 | depends on DVB_CORE | 33 | depends on DVB_CORE && I2C |
34 | help | 34 | help |
35 | A DVB-S tuner module. Say Y when you want to support this frontend. | 35 | A DVB-S tuner module. Say Y when you want to support this frontend. |
36 | 36 | ||
37 | config DVB_VES1X93 | 37 | config DVB_VES1X93 |
38 | tristate "VLSI VES1893 or VES1993 based" | 38 | tristate "VLSI VES1893 or VES1993 based" |
39 | depends on DVB_CORE | 39 | depends on DVB_CORE && I2C |
40 | help | 40 | help |
41 | A DVB-S tuner module. Say Y when you want to support this frontend. | 41 | A DVB-S tuner module. Say Y when you want to support this frontend. |
42 | 42 | ||
43 | config DVB_S5H1420 | 43 | config DVB_S5H1420 |
44 | tristate "Samsung S5H1420 based" | 44 | tristate "Samsung S5H1420 based" |
45 | depends on DVB_CORE | 45 | depends on DVB_CORE && I2C |
46 | help | 46 | help |
47 | A DVB-S tuner module. Say Y when you want to support this frontend. | 47 | A DVB-S tuner module. Say Y when you want to support this frontend. |
48 | 48 | ||
@@ -51,7 +51,7 @@ comment "DVB-T (terrestrial) frontends" | |||
51 | 51 | ||
52 | config DVB_SP8870 | 52 | config DVB_SP8870 |
53 | tristate "Spase sp8870 based" | 53 | tristate "Spase sp8870 based" |
54 | depends on DVB_CORE | 54 | depends on DVB_CORE && I2C |
55 | select FW_LOADER | 55 | select FW_LOADER |
56 | help | 56 | help |
57 | A DVB-T tuner module. Say Y when you want to support this frontend. | 57 | A DVB-T tuner module. Say Y when you want to support this frontend. |
@@ -63,7 +63,7 @@ config DVB_SP8870 | |||
63 | 63 | ||
64 | config DVB_SP887X | 64 | config DVB_SP887X |
65 | tristate "Spase sp887x based" | 65 | tristate "Spase sp887x based" |
66 | depends on DVB_CORE | 66 | depends on DVB_CORE && I2C |
67 | select FW_LOADER | 67 | select FW_LOADER |
68 | help | 68 | help |
69 | A DVB-T tuner module. Say Y when you want to support this frontend. | 69 | A DVB-T tuner module. Say Y when you want to support this frontend. |
@@ -75,25 +75,25 @@ config DVB_SP887X | |||
75 | 75 | ||
76 | config DVB_CX22700 | 76 | config DVB_CX22700 |
77 | tristate "Conexant CX22700 based" | 77 | tristate "Conexant CX22700 based" |
78 | depends on DVB_CORE | 78 | depends on DVB_CORE && I2C |
79 | help | 79 | help |
80 | A DVB-T tuner module. Say Y when you want to support this frontend. | 80 | A DVB-T tuner module. Say Y when you want to support this frontend. |
81 | 81 | ||
82 | config DVB_CX22702 | 82 | config DVB_CX22702 |
83 | tristate "Conexant cx22702 demodulator (OFDM)" | 83 | tristate "Conexant cx22702 demodulator (OFDM)" |
84 | depends on DVB_CORE | 84 | depends on DVB_CORE && I2C |
85 | help | 85 | help |
86 | A DVB-T tuner module. Say Y when you want to support this frontend. | 86 | A DVB-T tuner module. Say Y when you want to support this frontend. |
87 | 87 | ||
88 | config DVB_L64781 | 88 | config DVB_L64781 |
89 | tristate "LSI L64781" | 89 | tristate "LSI L64781" |
90 | depends on DVB_CORE | 90 | depends on DVB_CORE && I2C |
91 | help | 91 | help |
92 | A DVB-T tuner module. Say Y when you want to support this frontend. | 92 | A DVB-T tuner module. Say Y when you want to support this frontend. |
93 | 93 | ||
94 | config DVB_TDA1004X | 94 | config DVB_TDA1004X |
95 | tristate "Philips TDA10045H/TDA10046H based" | 95 | tristate "Philips TDA10045H/TDA10046H based" |
96 | depends on DVB_CORE | 96 | depends on DVB_CORE && I2C |
97 | select FW_LOADER | 97 | select FW_LOADER |
98 | help | 98 | help |
99 | A DVB-T tuner module. Say Y when you want to support this frontend. | 99 | A DVB-T tuner module. Say Y when you want to support this frontend. |
@@ -106,32 +106,32 @@ config DVB_TDA1004X | |||
106 | 106 | ||
107 | config DVB_NXT6000 | 107 | config DVB_NXT6000 |
108 | tristate "NxtWave Communications NXT6000 based" | 108 | tristate "NxtWave Communications NXT6000 based" |
109 | depends on DVB_CORE | 109 | depends on DVB_CORE && I2C |
110 | help | 110 | help |
111 | A DVB-T tuner module. Say Y when you want to support this frontend. | 111 | A DVB-T tuner module. Say Y when you want to support this frontend. |
112 | 112 | ||
113 | config DVB_MT352 | 113 | config DVB_MT352 |
114 | tristate "Zarlink MT352 based" | 114 | tristate "Zarlink MT352 based" |
115 | depends on DVB_CORE | 115 | depends on DVB_CORE && I2C |
116 | help | 116 | help |
117 | A DVB-T tuner module. Say Y when you want to support this frontend. | 117 | A DVB-T tuner module. Say Y when you want to support this frontend. |
118 | 118 | ||
119 | config DVB_ZL10353 | 119 | config DVB_ZL10353 |
120 | tristate "Zarlink ZL10353 based" | 120 | tristate "Zarlink ZL10353 based" |
121 | depends on DVB_CORE | 121 | depends on DVB_CORE && I2C |
122 | help | 122 | help |
123 | A DVB-T tuner module. Say Y when you want to support this frontend. | 123 | A DVB-T tuner module. Say Y when you want to support this frontend. |
124 | 124 | ||
125 | config DVB_DIB3000MB | 125 | config DVB_DIB3000MB |
126 | tristate "DiBcom 3000M-B" | 126 | tristate "DiBcom 3000M-B" |
127 | depends on DVB_CORE | 127 | depends on DVB_CORE && I2C |
128 | help | 128 | help |
129 | A DVB-T tuner module. Designed for mobile usage. Say Y when you want | 129 | A DVB-T tuner module. Designed for mobile usage. Say Y when you want |
130 | to support this frontend. | 130 | to support this frontend. |
131 | 131 | ||
132 | config DVB_DIB3000MC | 132 | config DVB_DIB3000MC |
133 | tristate "DiBcom 3000P/M-C" | 133 | tristate "DiBcom 3000P/M-C" |
134 | depends on DVB_CORE | 134 | depends on DVB_CORE && I2C |
135 | help | 135 | help |
136 | A DVB-T tuner module. Designed for mobile usage. Say Y when you want | 136 | A DVB-T tuner module. Designed for mobile usage. Say Y when you want |
137 | to support this frontend. | 137 | to support this frontend. |
@@ -141,19 +141,19 @@ comment "DVB-C (cable) frontends" | |||
141 | 141 | ||
142 | config DVB_VES1820 | 142 | config DVB_VES1820 |
143 | tristate "VLSI VES1820 based" | 143 | tristate "VLSI VES1820 based" |
144 | depends on DVB_CORE | 144 | depends on DVB_CORE && I2C |
145 | help | 145 | help |
146 | A DVB-C tuner module. Say Y when you want to support this frontend. | 146 | A DVB-C tuner module. Say Y when you want to support this frontend. |
147 | 147 | ||
148 | config DVB_TDA10021 | 148 | config DVB_TDA10021 |
149 | tristate "Philips TDA10021 based" | 149 | tristate "Philips TDA10021 based" |
150 | depends on DVB_CORE | 150 | depends on DVB_CORE && I2C |
151 | help | 151 | help |
152 | A DVB-C tuner module. Say Y when you want to support this frontend. | 152 | A DVB-C tuner module. Say Y when you want to support this frontend. |
153 | 153 | ||
154 | config DVB_STV0297 | 154 | config DVB_STV0297 |
155 | tristate "ST STV0297 based" | 155 | tristate "ST STV0297 based" |
156 | depends on DVB_CORE | 156 | depends on DVB_CORE && I2C |
157 | help | 157 | help |
158 | A DVB-C tuner module. Say Y when you want to support this frontend. | 158 | A DVB-C tuner module. Say Y when you want to support this frontend. |
159 | 159 | ||
@@ -162,7 +162,7 @@ comment "ATSC (North American/Korean Terrestrial/Cable DTV) frontends" | |||
162 | 162 | ||
163 | config DVB_NXT200X | 163 | config DVB_NXT200X |
164 | tristate "NxtWave Communications NXT2002/NXT2004 based" | 164 | tristate "NxtWave Communications NXT2002/NXT2004 based" |
165 | depends on DVB_CORE | 165 | depends on DVB_CORE && I2C |
166 | select FW_LOADER | 166 | select FW_LOADER |
167 | help | 167 | help |
168 | An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want | 168 | An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want |
@@ -176,7 +176,7 @@ config DVB_NXT200X | |||
176 | 176 | ||
177 | config DVB_OR51211 | 177 | config DVB_OR51211 |
178 | tristate "Oren OR51211 based" | 178 | tristate "Oren OR51211 based" |
179 | depends on DVB_CORE | 179 | depends on DVB_CORE && I2C |
180 | select FW_LOADER | 180 | select FW_LOADER |
181 | help | 181 | help |
182 | An ATSC 8VSB tuner module. Say Y when you want to support this frontend. | 182 | An ATSC 8VSB tuner module. Say Y when you want to support this frontend. |
@@ -188,7 +188,7 @@ config DVB_OR51211 | |||
188 | 188 | ||
189 | config DVB_OR51132 | 189 | config DVB_OR51132 |
190 | tristate "Oren OR51132 based" | 190 | tristate "Oren OR51132 based" |
191 | depends on DVB_CORE | 191 | depends on DVB_CORE && I2C |
192 | select FW_LOADER | 192 | select FW_LOADER |
193 | help | 193 | help |
194 | An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want | 194 | An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want |
@@ -203,7 +203,7 @@ config DVB_OR51132 | |||
203 | 203 | ||
204 | config DVB_BCM3510 | 204 | config DVB_BCM3510 |
205 | tristate "Broadcom BCM3510" | 205 | tristate "Broadcom BCM3510" |
206 | depends on DVB_CORE | 206 | depends on DVB_CORE && I2C |
207 | select FW_LOADER | 207 | select FW_LOADER |
208 | help | 208 | help |
209 | An ATSC 8VSB/16VSB and QAM64/256 tuner module. Say Y when you want to | 209 | An ATSC 8VSB/16VSB and QAM64/256 tuner module. Say Y when you want to |
@@ -211,7 +211,7 @@ config DVB_BCM3510 | |||
211 | 211 | ||
212 | config DVB_LGDT330X | 212 | config DVB_LGDT330X |
213 | tristate "LG Electronics LGDT3302/LGDT3303 based" | 213 | tristate "LG Electronics LGDT3302/LGDT3303 based" |
214 | depends on DVB_CORE | 214 | depends on DVB_CORE && I2C |
215 | help | 215 | help |
216 | An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want | 216 | An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want |
217 | to support this frontend. | 217 | to support this frontend. |
@@ -220,15 +220,19 @@ config DVB_LGDT330X | |||
220 | comment "Miscellaneous devices" | 220 | comment "Miscellaneous devices" |
221 | depends on DVB_CORE | 221 | depends on DVB_CORE |
222 | 222 | ||
223 | config DVB_PLL | ||
224 | tristate | ||
225 | depends on DVB_CORE && I2C | ||
226 | |||
223 | config DVB_LNBP21 | 227 | config DVB_LNBP21 |
224 | tristate "LNBP21 SEC controller" | 228 | tristate "LNBP21 SEC controller" |
225 | depends on DVB_CORE | 229 | depends on DVB_CORE && I2C |
226 | help | 230 | help |
227 | An SEC control chip. | 231 | An SEC control chip. |
228 | 232 | ||
229 | config DVB_ISL6421 | 233 | config DVB_ISL6421 |
230 | tristate "ISL6421 SEC controller" | 234 | tristate "ISL6421 SEC controller" |
231 | depends on DVB_CORE | 235 | depends on DVB_CORE && I2C |
232 | help | 236 | help |
233 | An SEC control chip. | 237 | An SEC control chip. |
234 | 238 | ||
diff --git a/drivers/media/dvb/frontends/Makefile b/drivers/media/dvb/frontends/Makefile index 5222245c7f59..0e4880b6db14 100644 --- a/drivers/media/dvb/frontends/Makefile +++ b/drivers/media/dvb/frontends/Makefile | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/ | 5 | EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/ |
6 | 6 | ||
7 | obj-$(CONFIG_DVB_CORE) += dvb-pll.o | 7 | obj-$(CONFIG_DVB_PLL) += dvb-pll.o |
8 | obj-$(CONFIG_DVB_STV0299) += stv0299.o | 8 | obj-$(CONFIG_DVB_STV0299) += stv0299.o |
9 | obj-$(CONFIG_DVB_SP8870) += sp8870.o | 9 | obj-$(CONFIG_DVB_SP8870) += sp8870.o |
10 | obj-$(CONFIG_DVB_CX22700) += cx22700.o | 10 | obj-$(CONFIG_DVB_CX22700) += cx22700.o |
diff --git a/drivers/media/dvb/pluto2/Kconfig b/drivers/media/dvb/pluto2/Kconfig index 7d8e6e87bdbb..9b84b1bdc313 100644 --- a/drivers/media/dvb/pluto2/Kconfig +++ b/drivers/media/dvb/pluto2/Kconfig | |||
@@ -2,6 +2,7 @@ config DVB_PLUTO2 | |||
2 | tristate "Pluto2 cards" | 2 | tristate "Pluto2 cards" |
3 | depends on DVB_CORE && PCI && I2C | 3 | depends on DVB_CORE && PCI && I2C |
4 | select I2C_ALGOBIT | 4 | select I2C_ALGOBIT |
5 | select DVB_PLL | ||
5 | select DVB_TDA1004X | 6 | select DVB_TDA1004X |
6 | help | 7 | help |
7 | Support for PCI cards based on the Pluto2 FPGA like the Satelco | 8 | Support for PCI cards based on the Pluto2 FPGA like the Satelco |
diff --git a/drivers/media/dvb/ttpci/Kconfig b/drivers/media/dvb/ttpci/Kconfig index 987881fa988c..5fb097595cfb 100644 --- a/drivers/media/dvb/ttpci/Kconfig +++ b/drivers/media/dvb/ttpci/Kconfig | |||
@@ -3,6 +3,7 @@ config DVB_AV7110 | |||
3 | depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 | 3 | depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 |
4 | select FW_LOADER | 4 | select FW_LOADER |
5 | select VIDEO_SAA7146_VV | 5 | select VIDEO_SAA7146_VV |
6 | select DVB_PLL | ||
6 | select DVB_VES1820 | 7 | select DVB_VES1820 |
7 | select DVB_VES1X93 | 8 | select DVB_VES1X93 |
8 | select DVB_STV0299 | 9 | select DVB_STV0299 |
@@ -61,6 +62,7 @@ config DVB_BUDGET | |||
61 | tristate "Budget cards" | 62 | tristate "Budget cards" |
62 | depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 | 63 | depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 |
63 | select VIDEO_SAA7146 | 64 | select VIDEO_SAA7146 |
65 | select DVB_PLL | ||
64 | select DVB_STV0299 | 66 | select DVB_STV0299 |
65 | select DVB_VES1X93 | 67 | select DVB_VES1X93 |
66 | select DVB_VES1820 | 68 | select DVB_VES1820 |
@@ -83,6 +85,7 @@ config DVB_BUDGET_CI | |||
83 | tristate "Budget cards with onboard CI connector" | 85 | tristate "Budget cards with onboard CI connector" |
84 | depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 | 86 | depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 |
85 | select VIDEO_SAA7146 | 87 | select VIDEO_SAA7146 |
88 | select DVB_PLL | ||
86 | select DVB_STV0297 | 89 | select DVB_STV0297 |
87 | select DVB_STV0299 | 90 | select DVB_STV0299 |
88 | select DVB_TDA1004X | 91 | select DVB_TDA1004X |
@@ -104,6 +107,7 @@ config DVB_BUDGET_AV | |||
104 | tristate "Budget cards with analog video inputs" | 107 | tristate "Budget cards with analog video inputs" |
105 | depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 | 108 | depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 |
106 | select VIDEO_SAA7146_VV | 109 | select VIDEO_SAA7146_VV |
110 | select DVB_PLL | ||
107 | select DVB_STV0299 | 111 | select DVB_STV0299 |
108 | select DVB_TDA1004X | 112 | select DVB_TDA1004X |
109 | select DVB_TDA10021 | 113 | select DVB_TDA10021 |
@@ -122,6 +126,7 @@ config DVB_BUDGET_PATCH | |||
122 | tristate "AV7110 cards with Budget Patch" | 126 | tristate "AV7110 cards with Budget Patch" |
123 | depends on DVB_CORE && DVB_BUDGET && VIDEO_V4L1 | 127 | depends on DVB_CORE && DVB_BUDGET && VIDEO_V4L1 |
124 | select DVB_AV7110 | 128 | select DVB_AV7110 |
129 | select DVB_PLL | ||
125 | select DVB_STV0299 | 130 | select DVB_STV0299 |
126 | select DVB_VES1X93 | 131 | select DVB_VES1X93 |
127 | select DVB_TDA8083 | 132 | select DVB_TDA8083 |
diff --git a/drivers/media/dvb/ttusb-budget/Kconfig b/drivers/media/dvb/ttusb-budget/Kconfig index 92c7cdcf8981..46a6a60d2ab9 100644 --- a/drivers/media/dvb/ttusb-budget/Kconfig +++ b/drivers/media/dvb/ttusb-budget/Kconfig | |||
@@ -1,6 +1,7 @@ | |||
1 | config DVB_TTUSB_BUDGET | 1 | config DVB_TTUSB_BUDGET |
2 | tristate "Technotrend/Hauppauge Nova-USB devices" | 2 | tristate "Technotrend/Hauppauge Nova-USB devices" |
3 | depends on DVB_CORE && USB | 3 | depends on DVB_CORE && USB && I2C |
4 | select DVB_PLL | ||
4 | select DVB_CX22700 | 5 | select DVB_CX22700 |
5 | select DVB_TDA1004X | 6 | select DVB_TDA1004X |
6 | select DVB_VES1820 | 7 | select DVB_VES1820 |
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index 732bf1e7c326..94d078b77bab 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig | |||
@@ -260,7 +260,7 @@ source "drivers/media/video/saa7134/Kconfig" | |||
260 | 260 | ||
261 | config VIDEO_MXB | 261 | config VIDEO_MXB |
262 | tristate "Siemens-Nixdorf 'Multimedia eXtension Board'" | 262 | tristate "Siemens-Nixdorf 'Multimedia eXtension Board'" |
263 | depends on PCI && VIDEO_V4L1 | 263 | depends on PCI && VIDEO_V4L1 && I2C |
264 | select VIDEO_SAA7146_VV | 264 | select VIDEO_SAA7146_VV |
265 | select VIDEO_TUNER | 265 | select VIDEO_TUNER |
266 | ---help--- | 266 | ---help--- |
@@ -272,7 +272,7 @@ config VIDEO_MXB | |||
272 | 272 | ||
273 | config VIDEO_DPC | 273 | config VIDEO_DPC |
274 | tristate "Philips-Semiconductors 'dpc7146 demonstration board'" | 274 | tristate "Philips-Semiconductors 'dpc7146 demonstration board'" |
275 | depends on PCI && VIDEO_V4L1 | 275 | depends on PCI && VIDEO_V4L1 && I2C |
276 | select VIDEO_SAA7146_VV | 276 | select VIDEO_SAA7146_VV |
277 | select VIDEO_V4L2 | 277 | select VIDEO_V4L2 |
278 | ---help--- | 278 | ---help--- |
@@ -287,7 +287,7 @@ config VIDEO_DPC | |||
287 | 287 | ||
288 | config VIDEO_HEXIUM_ORION | 288 | config VIDEO_HEXIUM_ORION |
289 | tristate "Hexium HV-PCI6 and Orion frame grabber" | 289 | tristate "Hexium HV-PCI6 and Orion frame grabber" |
290 | depends on PCI && VIDEO_V4L1 | 290 | depends on PCI && VIDEO_V4L1 && I2C |
291 | select VIDEO_SAA7146_VV | 291 | select VIDEO_SAA7146_VV |
292 | select VIDEO_V4L2 | 292 | select VIDEO_V4L2 |
293 | ---help--- | 293 | ---help--- |
@@ -299,7 +299,7 @@ config VIDEO_HEXIUM_ORION | |||
299 | 299 | ||
300 | config VIDEO_HEXIUM_GEMINI | 300 | config VIDEO_HEXIUM_GEMINI |
301 | tristate "Hexium Gemini frame grabber" | 301 | tristate "Hexium Gemini frame grabber" |
302 | depends on PCI && VIDEO_V4L1 | 302 | depends on PCI && VIDEO_V4L1 && I2C |
303 | select VIDEO_SAA7146_VV | 303 | select VIDEO_SAA7146_VV |
304 | select VIDEO_V4L2 | 304 | select VIDEO_V4L2 |
305 | ---help--- | 305 | ---help--- |
diff --git a/drivers/media/video/bt8xx/bttv-input.c b/drivers/media/video/bt8xx/bttv-input.c index b41f81d2372c..933d6db09acb 100644 --- a/drivers/media/video/bt8xx/bttv-input.c +++ b/drivers/media/video/bt8xx/bttv-input.c | |||
@@ -303,6 +303,7 @@ int bttv_input_init(struct bttv *btv) | |||
303 | ir->mask_keyup = 0x010000; | 303 | ir->mask_keyup = 0x010000; |
304 | ir->polling = 50; // ms | 304 | ir->polling = 50; // ms |
305 | break; | 305 | break; |
306 | case BTTV_BOARD_PV_M4900: | ||
306 | case BTTV_BOARD_PV_BT878P_9B: | 307 | case BTTV_BOARD_PV_BT878P_9B: |
307 | case BTTV_BOARD_PV_BT878P_PLUS: | 308 | case BTTV_BOARD_PV_BT878P_PLUS: |
308 | ir_codes = ir_codes_pixelview; | 309 | ir_codes = ir_codes_pixelview; |
diff --git a/drivers/media/video/cx88/Kconfig b/drivers/media/video/cx88/Kconfig index 80e23ee9801c..7a94e6a11927 100644 --- a/drivers/media/video/cx88/Kconfig +++ b/drivers/media/video/cx88/Kconfig | |||
@@ -51,6 +51,7 @@ config VIDEO_CX88_DVB | |||
51 | tristate "DVB/ATSC Support for cx2388x based TV cards" | 51 | tristate "DVB/ATSC Support for cx2388x based TV cards" |
52 | depends on VIDEO_CX88 && DVB_CORE | 52 | depends on VIDEO_CX88 && DVB_CORE |
53 | select VIDEO_BUF_DVB | 53 | select VIDEO_BUF_DVB |
54 | select DVB_PLL | ||
54 | ---help--- | 55 | ---help--- |
55 | This adds support for DVB/ATSC cards based on the | 56 | This adds support for DVB/ATSC cards based on the |
56 | Conexant 2388x chip. | 57 | Conexant 2388x chip. |
diff --git a/drivers/media/video/saa7134/Kconfig b/drivers/media/video/saa7134/Kconfig index e1c1805df1fb..f5543166d193 100644 --- a/drivers/media/video/saa7134/Kconfig +++ b/drivers/media/video/saa7134/Kconfig | |||
@@ -40,6 +40,7 @@ config VIDEO_SAA7134_DVB | |||
40 | depends on VIDEO_SAA7134 && DVB_CORE | 40 | depends on VIDEO_SAA7134 && DVB_CORE |
41 | select VIDEO_BUF_DVB | 41 | select VIDEO_BUF_DVB |
42 | select FW_LOADER | 42 | select FW_LOADER |
43 | select DVB_PLL | ||
43 | ---help--- | 44 | ---help--- |
44 | This adds support for DVB cards based on the | 45 | This adds support for DVB cards based on the |
45 | Philips saa7134 chip. | 46 | Philips saa7134 chip. |
diff --git a/drivers/media/video/tuner-types.c b/drivers/media/video/tuner-types.c index d7eadc2c298d..8b542599ed47 100644 --- a/drivers/media/video/tuner-types.c +++ b/drivers/media/video/tuner-types.c | |||
@@ -926,11 +926,17 @@ static struct tuner_params tuner_lg_tdvs_h06xf_params[] = { | |||
926 | 926 | ||
927 | /* ------------ TUNER_YMEC_TVF66T5_B_DFF - Philips PAL ------------ */ | 927 | /* ------------ TUNER_YMEC_TVF66T5_B_DFF - Philips PAL ------------ */ |
928 | 928 | ||
929 | static struct tuner_range tuner_ymec_tvf66t5_b_dff_pal_ranges[] = { | ||
930 | { 16 * 160.25 /*MHz*/, 0x8e, 0x01, }, | ||
931 | { 16 * 464.25 /*MHz*/, 0x8e, 0x02, }, | ||
932 | { 16 * 999.99 , 0x8e, 0x08, }, | ||
933 | }; | ||
934 | |||
929 | static struct tuner_params tuner_ymec_tvf66t5_b_dff_params[] = { | 935 | static struct tuner_params tuner_ymec_tvf66t5_b_dff_params[] = { |
930 | { | 936 | { |
931 | .type = TUNER_PARAM_TYPE_PAL, | 937 | .type = TUNER_PARAM_TYPE_PAL, |
932 | .ranges = tuner_tena_9533_di_pal_ranges, | 938 | .ranges = tuner_ymec_tvf66t5_b_dff_pal_ranges, |
933 | .count = ARRAY_SIZE(tuner_tena_9533_di_pal_ranges), | 939 | .count = ARRAY_SIZE(tuner_ymec_tvf66t5_b_dff_pal_ranges), |
934 | }, | 940 | }, |
935 | }; | 941 | }; |
936 | 942 | ||
diff --git a/drivers/media/video/zoran.h b/drivers/media/video/zoran.h index ffcda95ed9d4..8fb4a3414e0a 100644 --- a/drivers/media/video/zoran.h +++ b/drivers/media/video/zoran.h | |||
@@ -267,7 +267,7 @@ struct zoran_v4l_settings { | |||
267 | }; | 267 | }; |
268 | 268 | ||
269 | /* whoops, this one is undeclared if !v4l2 */ | 269 | /* whoops, this one is undeclared if !v4l2 */ |
270 | #ifndef HAVE_V4L2 | 270 | #ifndef CONFIG_VIDEO_V4L2 |
271 | struct v4l2_jpegcompression { | 271 | struct v4l2_jpegcompression { |
272 | int quality; | 272 | int quality; |
273 | int APPn; | 273 | int APPn; |
diff --git a/drivers/media/video/zoran_driver.c b/drivers/media/video/zoran_driver.c index d9a5876eb386..5f90db27892b 100644 --- a/drivers/media/video/zoran_driver.c +++ b/drivers/media/video/zoran_driver.c | |||
@@ -86,7 +86,7 @@ | |||
86 | #include "zoran_device.h" | 86 | #include "zoran_device.h" |
87 | #include "zoran_card.h" | 87 | #include "zoran_card.h" |
88 | 88 | ||
89 | #ifdef HAVE_V4L2 | 89 | #ifdef CONFIG_VIDEO_V4L2 |
90 | /* we declare some card type definitions here, they mean | 90 | /* we declare some card type definitions here, they mean |
91 | * the same as the v4l1 ZORAN_VID_TYPE above, except it's v4l2 */ | 91 | * the same as the v4l1 ZORAN_VID_TYPE above, except it's v4l2 */ |
92 | #define ZORAN_V4L2_VID_FLAGS ( \ | 92 | #define ZORAN_V4L2_VID_FLAGS ( \ |
@@ -103,7 +103,7 @@ const struct zoran_format zoran_formats[] = { | |||
103 | { | 103 | { |
104 | .name = "15-bit RGB", | 104 | .name = "15-bit RGB", |
105 | .palette = VIDEO_PALETTE_RGB555, | 105 | .palette = VIDEO_PALETTE_RGB555, |
106 | #ifdef HAVE_V4L2 | 106 | #ifdef CONFIG_VIDEO_V4L2 |
107 | #ifdef __LITTLE_ENDIAN | 107 | #ifdef __LITTLE_ENDIAN |
108 | .fourcc = V4L2_PIX_FMT_RGB555, | 108 | .fourcc = V4L2_PIX_FMT_RGB555, |
109 | #else | 109 | #else |
@@ -117,7 +117,7 @@ const struct zoran_format zoran_formats[] = { | |||
117 | }, { | 117 | }, { |
118 | .name = "16-bit RGB", | 118 | .name = "16-bit RGB", |
119 | .palette = VIDEO_PALETTE_RGB565, | 119 | .palette = VIDEO_PALETTE_RGB565, |
120 | #ifdef HAVE_V4L2 | 120 | #ifdef CONFIG_VIDEO_V4L2 |
121 | #ifdef __LITTLE_ENDIAN | 121 | #ifdef __LITTLE_ENDIAN |
122 | .fourcc = V4L2_PIX_FMT_RGB565, | 122 | .fourcc = V4L2_PIX_FMT_RGB565, |
123 | #else | 123 | #else |
@@ -131,7 +131,7 @@ const struct zoran_format zoran_formats[] = { | |||
131 | }, { | 131 | }, { |
132 | .name = "24-bit RGB", | 132 | .name = "24-bit RGB", |
133 | .palette = VIDEO_PALETTE_RGB24, | 133 | .palette = VIDEO_PALETTE_RGB24, |
134 | #ifdef HAVE_V4L2 | 134 | #ifdef CONFIG_VIDEO_V4L2 |
135 | #ifdef __LITTLE_ENDIAN | 135 | #ifdef __LITTLE_ENDIAN |
136 | .fourcc = V4L2_PIX_FMT_BGR24, | 136 | .fourcc = V4L2_PIX_FMT_BGR24, |
137 | #else | 137 | #else |
@@ -145,7 +145,7 @@ const struct zoran_format zoran_formats[] = { | |||
145 | }, { | 145 | }, { |
146 | .name = "32-bit RGB", | 146 | .name = "32-bit RGB", |
147 | .palette = VIDEO_PALETTE_RGB32, | 147 | .palette = VIDEO_PALETTE_RGB32, |
148 | #ifdef HAVE_V4L2 | 148 | #ifdef CONFIG_VIDEO_V4L2 |
149 | #ifdef __LITTLE_ENDIAN | 149 | #ifdef __LITTLE_ENDIAN |
150 | .fourcc = V4L2_PIX_FMT_BGR32, | 150 | .fourcc = V4L2_PIX_FMT_BGR32, |
151 | #else | 151 | #else |
@@ -159,7 +159,7 @@ const struct zoran_format zoran_formats[] = { | |||
159 | }, { | 159 | }, { |
160 | .name = "4:2:2, packed, YUYV", | 160 | .name = "4:2:2, packed, YUYV", |
161 | .palette = VIDEO_PALETTE_YUV422, | 161 | .palette = VIDEO_PALETTE_YUV422, |
162 | #ifdef HAVE_V4L2 | 162 | #ifdef CONFIG_VIDEO_V4L2 |
163 | .fourcc = V4L2_PIX_FMT_YUYV, | 163 | .fourcc = V4L2_PIX_FMT_YUYV, |
164 | .colorspace = V4L2_COLORSPACE_SMPTE170M, | 164 | .colorspace = V4L2_COLORSPACE_SMPTE170M, |
165 | #endif | 165 | #endif |
@@ -169,7 +169,7 @@ const struct zoran_format zoran_formats[] = { | |||
169 | }, { | 169 | }, { |
170 | .name = "Hardware-encoded Motion-JPEG", | 170 | .name = "Hardware-encoded Motion-JPEG", |
171 | .palette = -1, | 171 | .palette = -1, |
172 | #ifdef HAVE_V4L2 | 172 | #ifdef CONFIG_VIDEO_V4L2 |
173 | .fourcc = V4L2_PIX_FMT_MJPEG, | 173 | .fourcc = V4L2_PIX_FMT_MJPEG, |
174 | .colorspace = V4L2_COLORSPACE_SMPTE170M, | 174 | .colorspace = V4L2_COLORSPACE_SMPTE170M, |
175 | #endif | 175 | #endif |
@@ -210,7 +210,7 @@ static int lock_norm = 0; /* 1=Don't change TV standard (norm) */ | |||
210 | module_param(lock_norm, int, 0); | 210 | module_param(lock_norm, int, 0); |
211 | MODULE_PARM_DESC(lock_norm, "Users can't change norm"); | 211 | MODULE_PARM_DESC(lock_norm, "Users can't change norm"); |
212 | 212 | ||
213 | #ifdef HAVE_V4L2 | 213 | #ifdef CONFIG_VIDEO_V4L2 |
214 | /* small helper function for calculating buffersizes for v4l2 | 214 | /* small helper function for calculating buffersizes for v4l2 |
215 | * we calculate the nearest higher power-of-two, which | 215 | * we calculate the nearest higher power-of-two, which |
216 | * will be the recommended buffersize */ | 216 | * will be the recommended buffersize */ |
@@ -1761,7 +1761,7 @@ setup_overlay (struct file *file, | |||
1761 | return wait_grab_pending(zr); | 1761 | return wait_grab_pending(zr); |
1762 | } | 1762 | } |
1763 | 1763 | ||
1764 | #ifdef HAVE_V4L2 | 1764 | #ifdef CONFIG_VIDEO_V4L2 |
1765 | /* get the status of a buffer in the clients buffer queue */ | 1765 | /* get the status of a buffer in the clients buffer queue */ |
1766 | static int | 1766 | static int |
1767 | zoran_v4l2_buffer_status (struct file *file, | 1767 | zoran_v4l2_buffer_status (struct file *file, |
@@ -2676,7 +2676,7 @@ zoran_do_ioctl (struct inode *inode, | |||
2676 | } | 2676 | } |
2677 | break; | 2677 | break; |
2678 | 2678 | ||
2679 | #ifdef HAVE_V4L2 | 2679 | #ifdef CONFIG_VIDEO_V4L2 |
2680 | 2680 | ||
2681 | /* The new video4linux2 capture interface - much nicer than video4linux1, since | 2681 | /* The new video4linux2 capture interface - much nicer than video4linux1, since |
2682 | * it allows for integrating the JPEG capturing calls inside standard v4l2 | 2682 | * it allows for integrating the JPEG capturing calls inside standard v4l2 |
@@ -4689,7 +4689,7 @@ static struct file_operations zoran_fops = { | |||
4689 | struct video_device zoran_template __devinitdata = { | 4689 | struct video_device zoran_template __devinitdata = { |
4690 | .name = ZORAN_NAME, | 4690 | .name = ZORAN_NAME, |
4691 | .type = ZORAN_VID_TYPE, | 4691 | .type = ZORAN_VID_TYPE, |
4692 | #ifdef HAVE_V4L2 | 4692 | #ifdef CONFIG_VIDEO_V4L2 |
4693 | .type2 = ZORAN_V4L2_VID_FLAGS, | 4693 | .type2 = ZORAN_V4L2_VID_FLAGS, |
4694 | #endif | 4694 | #endif |
4695 | .hardware = ZORAN_HARDWARE, | 4695 | .hardware = ZORAN_HARDWARE, |
diff --git a/drivers/mmc/imxmmc.c b/drivers/mmc/imxmmc.c index 7ca9e95bdf89..fb6565b98f32 100644 --- a/drivers/mmc/imxmmc.c +++ b/drivers/mmc/imxmmc.c | |||
@@ -91,6 +91,8 @@ struct imxmci_host { | |||
91 | int dma_allocated; | 91 | int dma_allocated; |
92 | 92 | ||
93 | unsigned char actual_bus_width; | 93 | unsigned char actual_bus_width; |
94 | |||
95 | int prev_cmd_code; | ||
94 | }; | 96 | }; |
95 | 97 | ||
96 | #define IMXMCI_PEND_IRQ_b 0 | 98 | #define IMXMCI_PEND_IRQ_b 0 |
@@ -248,16 +250,14 @@ static void imxmci_setup_data(struct imxmci_host *host, struct mmc_data *data) | |||
248 | * partial FIFO fills and reads. The length has to be rounded up to burst size multiple. | 250 | * partial FIFO fills and reads. The length has to be rounded up to burst size multiple. |
249 | * This is required for SCR read at least. | 251 | * This is required for SCR read at least. |
250 | */ | 252 | */ |
251 | if (datasz < 64) { | 253 | if (datasz < 512) { |
252 | host->dma_size = datasz; | 254 | host->dma_size = datasz; |
253 | if (data->flags & MMC_DATA_READ) { | 255 | if (data->flags & MMC_DATA_READ) { |
254 | host->dma_dir = DMA_FROM_DEVICE; | 256 | host->dma_dir = DMA_FROM_DEVICE; |
255 | 257 | ||
256 | /* Hack to enable read SCR */ | 258 | /* Hack to enable read SCR */ |
257 | if(datasz < 16) { | 259 | MMC_NOB = 1; |
258 | MMC_NOB = 1; | 260 | MMC_BLK_LEN = 512; |
259 | MMC_BLK_LEN = 16; | ||
260 | } | ||
261 | } else { | 261 | } else { |
262 | host->dma_dir = DMA_TO_DEVICE; | 262 | host->dma_dir = DMA_TO_DEVICE; |
263 | } | 263 | } |
@@ -409,6 +409,9 @@ static void imxmci_finish_request(struct imxmci_host *host, struct mmc_request * | |||
409 | 409 | ||
410 | spin_unlock_irqrestore(&host->lock, flags); | 410 | spin_unlock_irqrestore(&host->lock, flags); |
411 | 411 | ||
412 | if(req && req->cmd) | ||
413 | host->prev_cmd_code = req->cmd->opcode; | ||
414 | |||
412 | host->req = NULL; | 415 | host->req = NULL; |
413 | host->cmd = NULL; | 416 | host->cmd = NULL; |
414 | host->data = NULL; | 417 | host->data = NULL; |
@@ -553,7 +556,6 @@ static int imxmci_cpu_driven_data(struct imxmci_host *host, unsigned int *pstat) | |||
553 | { | 556 | { |
554 | int i; | 557 | int i; |
555 | int burst_len; | 558 | int burst_len; |
556 | int flush_len; | ||
557 | int trans_done = 0; | 559 | int trans_done = 0; |
558 | unsigned int stat = *pstat; | 560 | unsigned int stat = *pstat; |
559 | 561 | ||
@@ -566,44 +568,43 @@ static int imxmci_cpu_driven_data(struct imxmci_host *host, unsigned int *pstat) | |||
566 | dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data running STATUS = 0x%x\n", | 568 | dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data running STATUS = 0x%x\n", |
567 | stat); | 569 | stat); |
568 | 570 | ||
571 | udelay(20); /* required for clocks < 8MHz*/ | ||
572 | |||
569 | if(host->dma_dir == DMA_FROM_DEVICE) { | 573 | if(host->dma_dir == DMA_FROM_DEVICE) { |
570 | imxmci_busy_wait_for_status(host, &stat, | 574 | imxmci_busy_wait_for_status(host, &stat, |
571 | STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE, | 575 | STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE, |
572 | 20, "imxmci_cpu_driven_data read"); | 576 | 50, "imxmci_cpu_driven_data read"); |
573 | 577 | ||
574 | while((stat & (STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE)) && | 578 | while((stat & (STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE)) && |
575 | (host->data_cnt < host->dma_size)) { | 579 | (host->data_cnt < 512)) { |
576 | if(burst_len >= host->dma_size - host->data_cnt) { | 580 | |
577 | flush_len = burst_len; | 581 | udelay(20); /* required for clocks < 8MHz*/ |
578 | burst_len = host->dma_size - host->data_cnt; | ||
579 | flush_len -= burst_len; | ||
580 | host->data_cnt = host->dma_size; | ||
581 | trans_done = 1; | ||
582 | } else { | ||
583 | flush_len = 0; | ||
584 | host->data_cnt += burst_len; | ||
585 | } | ||
586 | 582 | ||
587 | for(i = burst_len; i>=2 ; i-=2) { | 583 | for(i = burst_len; i>=2 ; i-=2) { |
588 | *(host->data_ptr++) = MMC_BUFFER_ACCESS; | 584 | u16 data; |
589 | udelay(20); /* required for clocks < 8MHz*/ | 585 | data = MMC_BUFFER_ACCESS; |
586 | udelay(10); /* required for clocks < 8MHz*/ | ||
587 | if(host->data_cnt+2 <= host->dma_size) { | ||
588 | *(host->data_ptr++) = data; | ||
589 | } else { | ||
590 | if(host->data_cnt < host->dma_size) | ||
591 | *(u8*)(host->data_ptr) = data; | ||
592 | } | ||
593 | host->data_cnt += 2; | ||
590 | } | 594 | } |
591 | 595 | ||
592 | if(i == 1) | ||
593 | *(u8*)(host->data_ptr) = MMC_BUFFER_ACCESS; | ||
594 | |||
595 | stat = MMC_STATUS; | 596 | stat = MMC_STATUS; |
596 | 597 | ||
597 | /* Flush extra bytes from FIFO */ | 598 | dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data read %d burst %d STATUS = 0x%x\n", |
598 | while(flush_len && !(stat & STATUS_DATA_TRANS_DONE)){ | 599 | host->data_cnt, burst_len, stat); |
599 | i = MMC_BUFFER_ACCESS; | ||
600 | stat = MMC_STATUS; | ||
601 | stat &= ~STATUS_CRC_READ_ERR; /* Stupid but required there */ | ||
602 | } | ||
603 | |||
604 | dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data read burst %d STATUS = 0x%x\n", | ||
605 | burst_len, stat); | ||
606 | } | 600 | } |
601 | |||
602 | if((stat & STATUS_DATA_TRANS_DONE) && (host->data_cnt >= 512)) | ||
603 | trans_done = 1; | ||
604 | |||
605 | if(host->dma_size & 0x1ff) | ||
606 | stat &= ~STATUS_CRC_READ_ERR; | ||
607 | |||
607 | } else { | 608 | } else { |
608 | imxmci_busy_wait_for_status(host, &stat, | 609 | imxmci_busy_wait_for_status(host, &stat, |
609 | STATUS_APPL_BUFF_FE, | 610 | STATUS_APPL_BUFF_FE, |
@@ -692,8 +693,8 @@ static void imxmci_tasklet_fnc(unsigned long data) | |||
692 | what, stat, MMC_INT_MASK); | 693 | what, stat, MMC_INT_MASK); |
693 | dev_err(mmc_dev(host->mmc), "CMD_DAT_CONT = 0x%04x, MMC_BLK_LEN = 0x%04x, MMC_NOB = 0x%04x, DMA_CCR = 0x%08x\n", | 694 | dev_err(mmc_dev(host->mmc), "CMD_DAT_CONT = 0x%04x, MMC_BLK_LEN = 0x%04x, MMC_NOB = 0x%04x, DMA_CCR = 0x%08x\n", |
694 | MMC_CMD_DAT_CONT, MMC_BLK_LEN, MMC_NOB, CCR(host->dma)); | 695 | MMC_CMD_DAT_CONT, MMC_BLK_LEN, MMC_NOB, CCR(host->dma)); |
695 | dev_err(mmc_dev(host->mmc), "CMD%d, bus %d-bit, dma_size = 0x%x\n", | 696 | dev_err(mmc_dev(host->mmc), "CMD%d, prevCMD%d, bus %d-bit, dma_size = 0x%x\n", |
696 | host->cmd?host->cmd->opcode:0, 1<<host->actual_bus_width, host->dma_size); | 697 | host->cmd?host->cmd->opcode:0, host->prev_cmd_code, 1<<host->actual_bus_width, host->dma_size); |
697 | } | 698 | } |
698 | 699 | ||
699 | if(!host->present || timeout) | 700 | if(!host->present || timeout) |
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 33525bdf2ab6..74eaaee66de0 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c | |||
@@ -247,6 +247,55 @@ int mmc_wait_for_app_cmd(struct mmc_host *host, unsigned int rca, | |||
247 | 247 | ||
248 | EXPORT_SYMBOL(mmc_wait_for_app_cmd); | 248 | EXPORT_SYMBOL(mmc_wait_for_app_cmd); |
249 | 249 | ||
250 | /** | ||
251 | * mmc_set_data_timeout - set the timeout for a data command | ||
252 | * @data: data phase for command | ||
253 | * @card: the MMC card associated with the data transfer | ||
254 | * @write: flag to differentiate reads from writes | ||
255 | */ | ||
256 | void mmc_set_data_timeout(struct mmc_data *data, const struct mmc_card *card, | ||
257 | int write) | ||
258 | { | ||
259 | unsigned int mult; | ||
260 | |||
261 | /* | ||
262 | * SD cards use a 100 multiplier rather than 10 | ||
263 | */ | ||
264 | mult = mmc_card_sd(card) ? 100 : 10; | ||
265 | |||
266 | /* | ||
267 | * Scale up the multiplier (and therefore the timeout) by | ||
268 | * the r2w factor for writes. | ||
269 | */ | ||
270 | if (write) | ||
271 | mult <<= card->csd.r2w_factor; | ||
272 | |||
273 | data->timeout_ns = card->csd.tacc_ns * mult; | ||
274 | data->timeout_clks = card->csd.tacc_clks * mult; | ||
275 | |||
276 | /* | ||
277 | * SD cards also have an upper limit on the timeout. | ||
278 | */ | ||
279 | if (mmc_card_sd(card)) { | ||
280 | unsigned int timeout_us, limit_us; | ||
281 | |||
282 | timeout_us = data->timeout_ns / 1000; | ||
283 | timeout_us += data->timeout_clks * 1000 / | ||
284 | (card->host->ios.clock / 1000); | ||
285 | |||
286 | if (write) | ||
287 | limit_us = 250000; | ||
288 | else | ||
289 | limit_us = 100000; | ||
290 | |||
291 | if (timeout_us > limit_us) { | ||
292 | data->timeout_ns = limit_us * 1000; | ||
293 | data->timeout_clks = 0; | ||
294 | } | ||
295 | } | ||
296 | } | ||
297 | EXPORT_SYMBOL(mmc_set_data_timeout); | ||
298 | |||
250 | static int mmc_select_card(struct mmc_host *host, struct mmc_card *card); | 299 | static int mmc_select_card(struct mmc_host *host, struct mmc_card *card); |
251 | 300 | ||
252 | /** | 301 | /** |
@@ -908,11 +957,9 @@ static void mmc_read_scrs(struct mmc_host *host) | |||
908 | { | 957 | { |
909 | int err; | 958 | int err; |
910 | struct mmc_card *card; | 959 | struct mmc_card *card; |
911 | |||
912 | struct mmc_request mrq; | 960 | struct mmc_request mrq; |
913 | struct mmc_command cmd; | 961 | struct mmc_command cmd; |
914 | struct mmc_data data; | 962 | struct mmc_data data; |
915 | |||
916 | struct scatterlist sg; | 963 | struct scatterlist sg; |
917 | 964 | ||
918 | list_for_each_entry(card, &host->cards, node) { | 965 | list_for_each_entry(card, &host->cards, node) { |
@@ -947,8 +994,8 @@ static void mmc_read_scrs(struct mmc_host *host) | |||
947 | 994 | ||
948 | memset(&data, 0, sizeof(struct mmc_data)); | 995 | memset(&data, 0, sizeof(struct mmc_data)); |
949 | 996 | ||
950 | data.timeout_ns = card->csd.tacc_ns * 10; | 997 | mmc_set_data_timeout(&data, card, 0); |
951 | data.timeout_clks = card->csd.tacc_clks * 10; | 998 | |
952 | data.blksz_bits = 3; | 999 | data.blksz_bits = 3; |
953 | data.blksz = 1 << 3; | 1000 | data.blksz = 1 << 3; |
954 | data.blocks = 1; | 1001 | data.blocks = 1; |
diff --git a/drivers/mmc/mmc_block.c b/drivers/mmc/mmc_block.c index 115cc21094b9..a0e0dad1b419 100644 --- a/drivers/mmc/mmc_block.c +++ b/drivers/mmc/mmc_block.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/mutex.h> | 30 | #include <linux/mutex.h> |
31 | 31 | ||
32 | #include <linux/mmc/card.h> | 32 | #include <linux/mmc/card.h> |
33 | #include <linux/mmc/host.h> | ||
33 | #include <linux/mmc/protocol.h> | 34 | #include <linux/mmc/protocol.h> |
34 | 35 | ||
35 | #include <asm/system.h> | 36 | #include <asm/system.h> |
@@ -171,8 +172,6 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) | |||
171 | 172 | ||
172 | brq.cmd.arg = req->sector << 9; | 173 | brq.cmd.arg = req->sector << 9; |
173 | brq.cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; | 174 | brq.cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; |
174 | brq.data.timeout_ns = card->csd.tacc_ns * 10; | ||
175 | brq.data.timeout_clks = card->csd.tacc_clks * 10; | ||
176 | brq.data.blksz_bits = md->block_bits; | 175 | brq.data.blksz_bits = md->block_bits; |
177 | brq.data.blksz = 1 << md->block_bits; | 176 | brq.data.blksz = 1 << md->block_bits; |
178 | brq.data.blocks = req->nr_sectors >> (md->block_bits - 9); | 177 | brq.data.blocks = req->nr_sectors >> (md->block_bits - 9); |
@@ -180,6 +179,8 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) | |||
180 | brq.stop.arg = 0; | 179 | brq.stop.arg = 0; |
181 | brq.stop.flags = MMC_RSP_R1B | MMC_CMD_AC; | 180 | brq.stop.flags = MMC_RSP_R1B | MMC_CMD_AC; |
182 | 181 | ||
182 | mmc_set_data_timeout(&brq.data, card, rq_data_dir(req) != READ); | ||
183 | |||
183 | if (rq_data_dir(req) == READ) { | 184 | if (rq_data_dir(req) == READ) { |
184 | brq.cmd.opcode = brq.data.blocks > 1 ? MMC_READ_MULTIPLE_BLOCK : MMC_READ_SINGLE_BLOCK; | 185 | brq.cmd.opcode = brq.data.blocks > 1 ? MMC_READ_MULTIPLE_BLOCK : MMC_READ_SINGLE_BLOCK; |
185 | brq.data.flags |= MMC_DATA_READ; | 186 | brq.data.flags |= MMC_DATA_READ; |
@@ -187,12 +188,6 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) | |||
187 | brq.cmd.opcode = MMC_WRITE_BLOCK; | 188 | brq.cmd.opcode = MMC_WRITE_BLOCK; |
188 | brq.data.flags |= MMC_DATA_WRITE; | 189 | brq.data.flags |= MMC_DATA_WRITE; |
189 | brq.data.blocks = 1; | 190 | brq.data.blocks = 1; |
190 | |||
191 | /* | ||
192 | * Scale up the timeout by the r2w factor | ||
193 | */ | ||
194 | brq.data.timeout_ns <<= card->csd.r2w_factor; | ||
195 | brq.data.timeout_clks <<= card->csd.r2w_factor; | ||
196 | } | 191 | } |
197 | 192 | ||
198 | if (brq.data.blocks > 1) { | 193 | if (brq.data.blocks > 1) { |
@@ -324,52 +319,11 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card) | |||
324 | md->read_only = mmc_blk_readonly(card); | 319 | md->read_only = mmc_blk_readonly(card); |
325 | 320 | ||
326 | /* | 321 | /* |
327 | * Figure out a workable block size. MMC cards have: | 322 | * Both SD and MMC specifications state (although a bit |
328 | * - two block sizes, one for read and one for write. | 323 | * unclearly in the MMC case) that a block size of 512 |
329 | * - may support partial reads and/or writes | 324 | * bytes must always be supported by the card. |
330 | * (allows block sizes smaller than specified) | ||
331 | */ | ||
332 | md->block_bits = card->csd.read_blkbits; | ||
333 | if (card->csd.write_blkbits != card->csd.read_blkbits) { | ||
334 | if (card->csd.write_blkbits < card->csd.read_blkbits && | ||
335 | card->csd.read_partial) { | ||
336 | /* | ||
337 | * write block size is smaller than read block | ||
338 | * size, but we support partial reads, so choose | ||
339 | * the smaller write block size. | ||
340 | */ | ||
341 | md->block_bits = card->csd.write_blkbits; | ||
342 | } else if (card->csd.write_blkbits > card->csd.read_blkbits && | ||
343 | card->csd.write_partial) { | ||
344 | /* | ||
345 | * read block size is smaller than write block | ||
346 | * size, but we support partial writes. Use read | ||
347 | * block size. | ||
348 | */ | ||
349 | } else { | ||
350 | /* | ||
351 | * We don't support this configuration for writes. | ||
352 | */ | ||
353 | printk(KERN_ERR "%s: unable to select block size for " | ||
354 | "writing (rb%u wb%u rp%u wp%u)\n", | ||
355 | mmc_card_id(card), | ||
356 | 1 << card->csd.read_blkbits, | ||
357 | 1 << card->csd.write_blkbits, | ||
358 | card->csd.read_partial, | ||
359 | card->csd.write_partial); | ||
360 | md->read_only = 1; | ||
361 | } | ||
362 | } | ||
363 | |||
364 | /* | ||
365 | * Refuse to allow block sizes smaller than 512 bytes. | ||
366 | */ | 325 | */ |
367 | if (md->block_bits < 9) { | 326 | md->block_bits = 9; |
368 | printk(KERN_ERR "%s: unable to support block size %u\n", | ||
369 | mmc_card_id(card), 1 << md->block_bits); | ||
370 | ret = -EINVAL; | ||
371 | goto err_kfree; | ||
372 | } | ||
373 | 327 | ||
374 | md->disk = alloc_disk(1 << MMC_SHIFT); | 328 | md->disk = alloc_disk(1 << MMC_SHIFT); |
375 | if (md->disk == NULL) { | 329 | if (md->disk == NULL) { |
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 30b3671d833d..a2bd8119270e 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
@@ -2393,7 +2393,7 @@ config MYRI10GE | |||
2393 | you will need a newer firmware image. | 2393 | you will need a newer firmware image. |
2394 | You may get this image or more information, at: | 2394 | You may get this image or more information, at: |
2395 | 2395 | ||
2396 | <http://www.myri.com/Myri-10G/> | 2396 | <http://www.myri.com/scs/download-Myri10GE.html> |
2397 | 2397 | ||
2398 | To compile this driver as a module, choose M here and read | 2398 | To compile this driver as a module, choose M here and read |
2399 | <file:Documentation/networking/net-modules.txt>. The module | 2399 | <file:Documentation/networking/net-modules.txt>. The module |
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c index 3d76fa144c4f..a860ebbbf815 100644 --- a/drivers/net/dm9000.c +++ b/drivers/net/dm9000.c | |||
@@ -377,8 +377,8 @@ dm9000_release_board(struct platform_device *pdev, struct board_info *db) | |||
377 | kfree(db->data_req); | 377 | kfree(db->data_req); |
378 | } | 378 | } |
379 | 379 | ||
380 | if (db->addr_res != NULL) { | 380 | if (db->addr_req != NULL) { |
381 | release_resource(db->addr_res); | 381 | release_resource(db->addr_req); |
382 | kfree(db->addr_req); | 382 | kfree(db->addr_req); |
383 | } | 383 | } |
384 | } | 384 | } |
diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c index 2d20caf377f5..a9bb3cb7e89b 100644 --- a/drivers/scsi/ata_piix.c +++ b/drivers/scsi/ata_piix.c | |||
@@ -123,7 +123,8 @@ enum { | |||
123 | ich6_sata = 4, | 123 | ich6_sata = 4, |
124 | ich6_sata_ahci = 5, | 124 | ich6_sata_ahci = 5, |
125 | ich6m_sata_ahci = 6, | 125 | ich6m_sata_ahci = 6, |
126 | ich8_sata_ahci = 7, | 126 | ich7m_sata_ahci = 7, |
127 | ich8_sata_ahci = 8, | ||
127 | 128 | ||
128 | /* constants for mapping table */ | 129 | /* constants for mapping table */ |
129 | P0 = 0, /* port 0 */ | 130 | P0 = 0, /* port 0 */ |
@@ -188,7 +189,7 @@ static const struct pci_device_id piix_pci_tbl[] = { | |||
188 | /* 82801GB/GR/GH (ICH7, identical to ICH6) */ | 189 | /* 82801GB/GR/GH (ICH7, identical to ICH6) */ |
189 | { 0x8086, 0x27c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, | 190 | { 0x8086, 0x27c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, |
190 | /* 2801GBM/GHM (ICH7M, identical to ICH6M) */ | 191 | /* 2801GBM/GHM (ICH7M, identical to ICH6M) */ |
191 | { 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6m_sata_ahci }, | 192 | { 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich7m_sata_ahci }, |
192 | /* Enterprise Southbridge 2 (where's the datasheet?) */ | 193 | /* Enterprise Southbridge 2 (where's the datasheet?) */ |
193 | { 0x8086, 0x2680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, | 194 | { 0x8086, 0x2680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, |
194 | /* SATA Controller 1 IDE (ICH8, no datasheet yet) */ | 195 | /* SATA Controller 1 IDE (ICH8, no datasheet yet) */ |
@@ -336,6 +337,24 @@ static const struct piix_map_db ich6m_map_db = { | |||
336 | }, | 337 | }, |
337 | }; | 338 | }; |
338 | 339 | ||
340 | static const struct piix_map_db ich7m_map_db = { | ||
341 | .mask = 0x3, | ||
342 | .port_enable = 0x5, | ||
343 | .present_shift = 4, | ||
344 | |||
345 | /* Map 01b isn't specified in the doc but some notebooks use | ||
346 | * it anyway. ATM, the only case spotted carries subsystem ID | ||
347 | * 1025:0107. This is the only difference from ich6m. | ||
348 | */ | ||
349 | .map = { | ||
350 | /* PM PS SM SS MAP */ | ||
351 | { P0, P2, RV, RV }, /* 00b */ | ||
352 | { IDE, IDE, P1, P3 }, /* 01b */ | ||
353 | { P0, P2, IDE, IDE }, /* 10b */ | ||
354 | { RV, RV, RV, RV }, | ||
355 | }, | ||
356 | }; | ||
357 | |||
339 | static const struct piix_map_db ich8_map_db = { | 358 | static const struct piix_map_db ich8_map_db = { |
340 | .mask = 0x3, | 359 | .mask = 0x3, |
341 | .port_enable = 0x3, | 360 | .port_enable = 0x3, |
@@ -355,6 +374,7 @@ static const struct piix_map_db *piix_map_db_table[] = { | |||
355 | [ich6_sata] = &ich6_map_db, | 374 | [ich6_sata] = &ich6_map_db, |
356 | [ich6_sata_ahci] = &ich6_map_db, | 375 | [ich6_sata_ahci] = &ich6_map_db, |
357 | [ich6m_sata_ahci] = &ich6m_map_db, | 376 | [ich6m_sata_ahci] = &ich6m_map_db, |
377 | [ich7m_sata_ahci] = &ich7m_map_db, | ||
358 | [ich8_sata_ahci] = &ich8_map_db, | 378 | [ich8_sata_ahci] = &ich8_map_db, |
359 | }; | 379 | }; |
360 | 380 | ||
@@ -444,6 +464,18 @@ static struct ata_port_info piix_port_info[] = { | |||
444 | .port_ops = &piix_sata_ops, | 464 | .port_ops = &piix_sata_ops, |
445 | }, | 465 | }, |
446 | 466 | ||
467 | /* ich7m_sata_ahci */ | ||
468 | { | ||
469 | .sht = &piix_sht, | ||
470 | .host_flags = ATA_FLAG_SATA | | ||
471 | PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR | | ||
472 | PIIX_FLAG_AHCI, | ||
473 | .pio_mask = 0x1f, /* pio0-4 */ | ||
474 | .mwdma_mask = 0x07, /* mwdma0-2 */ | ||
475 | .udma_mask = 0x7f, /* udma0-6 */ | ||
476 | .port_ops = &piix_sata_ops, | ||
477 | }, | ||
478 | |||
447 | /* ich8_sata_ahci */ | 479 | /* ich8_sata_ahci */ |
448 | { | 480 | { |
449 | .sht = &piix_sht, | 481 | .sht = &piix_sht, |
diff --git a/drivers/scsi/sata_mv.c b/drivers/scsi/sata_mv.c index 1053c7c76b7d..fa38a413d16b 100644 --- a/drivers/scsi/sata_mv.c +++ b/drivers/scsi/sata_mv.c | |||
@@ -1961,8 +1961,7 @@ comreset_retry: | |||
1961 | timeout = jiffies + msecs_to_jiffies(200); | 1961 | timeout = jiffies + msecs_to_jiffies(200); |
1962 | do { | 1962 | do { |
1963 | sata_scr_read(ap, SCR_STATUS, &sstatus); | 1963 | sata_scr_read(ap, SCR_STATUS, &sstatus); |
1964 | sstatus &= 0x3; | 1964 | if (((sstatus & 0x3) == 3) || ((sstatus & 0x3) == 0)) |
1965 | if ((sstatus == 3) || (sstatus == 0)) | ||
1966 | break; | 1965 | break; |
1967 | 1966 | ||
1968 | __msleep(1, can_sleep); | 1967 | __msleep(1, can_sleep); |
diff --git a/drivers/scsi/sata_via.c b/drivers/scsi/sata_via.c index 01d40369a8a5..a3727af8b9c1 100644 --- a/drivers/scsi/sata_via.c +++ b/drivers/scsi/sata_via.c | |||
@@ -77,6 +77,7 @@ static void svia_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val); | |||
77 | static void vt6420_error_handler(struct ata_port *ap); | 77 | static void vt6420_error_handler(struct ata_port *ap); |
78 | 78 | ||
79 | static const struct pci_device_id svia_pci_tbl[] = { | 79 | static const struct pci_device_id svia_pci_tbl[] = { |
80 | { 0x1106, 0x0591, PCI_ANY_ID, PCI_ANY_ID, 0, 0, vt6420 }, | ||
80 | { 0x1106, 0x3149, PCI_ANY_ID, PCI_ANY_ID, 0, 0, vt6420 }, | 81 | { 0x1106, 0x3149, PCI_ANY_ID, PCI_ANY_ID, 0, 0, vt6420 }, |
81 | { 0x1106, 0x3249, PCI_ANY_ID, PCI_ANY_ID, 0, 0, vt6421 }, | 82 | { 0x1106, 0x3249, PCI_ANY_ID, PCI_ANY_ID, 0, 0, vt6421 }, |
82 | 83 | ||
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index 301573373c30..cbede06cac27 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c | |||
@@ -1579,7 +1579,7 @@ static int __init serial_console_setup(struct console *co, char *options) | |||
1579 | h8300_sci_enable(port, sci_enable); | 1579 | h8300_sci_enable(port, sci_enable); |
1580 | #endif | 1580 | #endif |
1581 | #elif defined(CONFIG_SUPERH64) | 1581 | #elif defined(CONFIG_SUPERH64) |
1582 | port->uartclk = current_cpu_info.module_clock * 16; | 1582 | port->uartclk = current_cpu_data.module_clock * 16; |
1583 | #else | 1583 | #else |
1584 | { | 1584 | { |
1585 | struct clk *clk = clk_get("module_clk"); | 1585 | struct clk *clk = clk_get("module_clk"); |
@@ -1720,7 +1720,7 @@ static int __init sci_init(void) | |||
1720 | #if defined(__H8300H__) || defined(__H8300S__) | 1720 | #if defined(__H8300H__) || defined(__H8300S__) |
1721 | sciport->port.uartclk = CONFIG_CPU_CLOCK; | 1721 | sciport->port.uartclk = CONFIG_CPU_CLOCK; |
1722 | #elif defined(CONFIG_SUPERH64) | 1722 | #elif defined(CONFIG_SUPERH64) |
1723 | sciport->port.uartclk = current_cpu_info.module_clock * 16; | 1723 | sciport->port.uartclk = current_cpu_data.module_clock * 16; |
1724 | #else | 1724 | #else |
1725 | struct clk *clk = clk_get("module_clk"); | 1725 | struct clk *clk = clk_get("module_clk"); |
1726 | sciport->port.uartclk = clk_get_rate(clk) * 16; | 1726 | sciport->port.uartclk = clk_get_rate(clk) * 16; |
diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c index acb24c6219d9..a2c56b2de589 100644 --- a/drivers/usb/input/hid-core.c +++ b/drivers/usb/input/hid-core.c | |||
@@ -1444,7 +1444,7 @@ void hid_init_reports(struct hid_device *hid) | |||
1444 | #define USB_DEVICE_ID_GTCO_402 0x0402 | 1444 | #define USB_DEVICE_ID_GTCO_402 0x0402 |
1445 | #define USB_DEVICE_ID_GTCO_403 0x0403 | 1445 | #define USB_DEVICE_ID_GTCO_403 0x0403 |
1446 | #define USB_DEVICE_ID_GTCO_404 0x0404 | 1446 | #define USB_DEVICE_ID_GTCO_404 0x0404 |
1447 | #define USB_DEVICE_ID_GTCO_404 0x0405 | 1447 | #define USB_DEVICE_ID_GTCO_405 0x0405 |
1448 | #define USB_DEVICE_ID_GTCO_500 0x0500 | 1448 | #define USB_DEVICE_ID_GTCO_500 0x0500 |
1449 | #define USB_DEVICE_ID_GTCO_501 0x0501 | 1449 | #define USB_DEVICE_ID_GTCO_501 0x0501 |
1450 | #define USB_DEVICE_ID_GTCO_502 0x0502 | 1450 | #define USB_DEVICE_ID_GTCO_502 0x0502 |
@@ -1657,7 +1657,7 @@ static const struct hid_blacklist { | |||
1657 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_402, HID_QUIRK_IGNORE }, | 1657 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_402, HID_QUIRK_IGNORE }, |
1658 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_403, HID_QUIRK_IGNORE }, | 1658 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_403, HID_QUIRK_IGNORE }, |
1659 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_404, HID_QUIRK_IGNORE }, | 1659 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_404, HID_QUIRK_IGNORE }, |
1660 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_404, HID_QUIRK_IGNORE }, | 1660 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_405, HID_QUIRK_IGNORE }, |
1661 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_500, HID_QUIRK_IGNORE }, | 1661 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_500, HID_QUIRK_IGNORE }, |
1662 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_501, HID_QUIRK_IGNORE }, | 1662 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_501, HID_QUIRK_IGNORE }, |
1663 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_502, HID_QUIRK_IGNORE }, | 1663 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_502, HID_QUIRK_IGNORE }, |
diff --git a/drivers/usb/input/usbtouchscreen.c b/drivers/usb/input/usbtouchscreen.c index 3b175aa482cd..a338bf4c2d78 100644 --- a/drivers/usb/input/usbtouchscreen.c +++ b/drivers/usb/input/usbtouchscreen.c | |||
@@ -286,7 +286,7 @@ static int mtouch_init(struct usbtouch_usb *usbtouch) | |||
286 | static int itm_read_data(unsigned char *pkt, int *x, int *y, int *touch, int *press) | 286 | static int itm_read_data(unsigned char *pkt, int *x, int *y, int *touch, int *press) |
287 | { | 287 | { |
288 | *x = ((pkt[0] & 0x1F) << 7) | (pkt[3] & 0x7F); | 288 | *x = ((pkt[0] & 0x1F) << 7) | (pkt[3] & 0x7F); |
289 | *x = ((pkt[1] & 0x1F) << 7) | (pkt[4] & 0x7F); | 289 | *y = ((pkt[1] & 0x1F) << 7) | (pkt[4] & 0x7F); |
290 | *press = ((pkt[2] & 0x1F) << 7) | (pkt[5] & 0x7F); | 290 | *press = ((pkt[2] & 0x1F) << 7) | (pkt[5] & 0x7F); |
291 | *touch = ~pkt[7] & 0x20; | 291 | *touch = ~pkt[7] & 0x20; |
292 | 292 | ||
diff --git a/drivers/usb/input/yealink.c b/drivers/usb/input/yealink.c index 575a4e672e96..7b45fd3de911 100644 --- a/drivers/usb/input/yealink.c +++ b/drivers/usb/input/yealink.c | |||
@@ -810,12 +810,9 @@ static int usb_cleanup(struct yealink_dev *yld, int err) | |||
810 | if (yld == NULL) | 810 | if (yld == NULL) |
811 | return err; | 811 | return err; |
812 | 812 | ||
813 | if (yld->urb_irq) { | 813 | usb_kill_urb(yld->urb_irq); /* parameter validation in core/urb */ |
814 | usb_kill_urb(yld->urb_irq); | 814 | usb_kill_urb(yld->urb_ctl); /* parameter validation in core/urb */ |
815 | usb_free_urb(yld->urb_irq); | 815 | |
816 | } | ||
817 | if (yld->urb_ctl) | ||
818 | usb_free_urb(yld->urb_ctl); | ||
819 | if (yld->idev) { | 816 | if (yld->idev) { |
820 | if (err) | 817 | if (err) |
821 | input_free_device(yld->idev); | 818 | input_free_device(yld->idev); |
@@ -831,6 +828,9 @@ static int usb_cleanup(struct yealink_dev *yld, int err) | |||
831 | if (yld->irq_data) | 828 | if (yld->irq_data) |
832 | usb_buffer_free(yld->udev, USB_PKT_LEN, | 829 | usb_buffer_free(yld->udev, USB_PKT_LEN, |
833 | yld->irq_data, yld->irq_dma); | 830 | yld->irq_data, yld->irq_dma); |
831 | |||
832 | usb_free_urb(yld->urb_irq); /* parameter validation in core/urb */ | ||
833 | usb_free_urb(yld->urb_ctl); /* parameter validation in core/urb */ | ||
834 | kfree(yld); | 834 | kfree(yld); |
835 | return err; | 835 | return err; |
836 | } | 836 | } |
diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c index 738bd7c7451f..e16582f3733c 100644 --- a/drivers/usb/misc/sisusbvga/sisusb.c +++ b/drivers/usb/misc/sisusbvga/sisusb.c | |||
@@ -3435,6 +3435,8 @@ static void sisusb_disconnect(struct usb_interface *intf) | |||
3435 | 3435 | ||
3436 | static struct usb_device_id sisusb_table [] = { | 3436 | static struct usb_device_id sisusb_table [] = { |
3437 | { USB_DEVICE(0x0711, 0x0900) }, | 3437 | { USB_DEVICE(0x0711, 0x0900) }, |
3438 | { USB_DEVICE(0x0711, 0x0901) }, | ||
3439 | { USB_DEVICE(0x0711, 0x0902) }, | ||
3438 | { USB_DEVICE(0x182d, 0x021c) }, | 3440 | { USB_DEVICE(0x182d, 0x021c) }, |
3439 | { USB_DEVICE(0x182d, 0x0269) }, | 3441 | { USB_DEVICE(0x182d, 0x0269) }, |
3440 | { } | 3442 | { } |
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 15945e806f03..c6115aa1b445 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -506,6 +506,7 @@ static struct usb_device_id id_table_combined [] = { | |||
506 | { USB_DEVICE(FTDI_VID, FTDI_YEI_SERVOCENTER31_PID) }, | 506 | { USB_DEVICE(FTDI_VID, FTDI_YEI_SERVOCENTER31_PID) }, |
507 | { USB_DEVICE(FTDI_VID, FTDI_THORLABS_PID) }, | 507 | { USB_DEVICE(FTDI_VID, FTDI_THORLABS_PID) }, |
508 | { USB_DEVICE(TESTO_VID, TESTO_USB_INTERFACE_PID) }, | 508 | { USB_DEVICE(TESTO_VID, TESTO_USB_INTERFACE_PID) }, |
509 | { USB_DEVICE(FTDI_VID, FTDI_GAMMA_SCOUT_PID) }, | ||
509 | { }, /* Optional parameter entry */ | 510 | { }, /* Optional parameter entry */ |
510 | { } /* Terminating entry */ | 511 | { } /* Terminating entry */ |
511 | }; | 512 | }; |
diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h index 8888cd80a491..77299996f7ee 100644 --- a/drivers/usb/serial/ftdi_sio.h +++ b/drivers/usb/serial/ftdi_sio.h | |||
@@ -467,6 +467,11 @@ | |||
467 | #define TESTO_VID 0x128D | 467 | #define TESTO_VID 0x128D |
468 | #define TESTO_USB_INTERFACE_PID 0x0001 | 468 | #define TESTO_USB_INTERFACE_PID 0x0001 |
469 | 469 | ||
470 | /* | ||
471 | * Gamma Scout (http://gamma-scout.com/). Submitted by rsc@runtux.com. | ||
472 | */ | ||
473 | #define FTDI_GAMMA_SCOUT_PID 0xD678 /* Gamma Scout online */ | ||
474 | |||
470 | /* Commands */ | 475 | /* Commands */ |
471 | #define FTDI_SIO_RESET 0 /* Reset the port */ | 476 | #define FTDI_SIO_RESET 0 /* Reset the port */ |
472 | #define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */ | 477 | #define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */ |
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 12c1694d322e..e06a41bd0f3b 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c | |||
@@ -464,8 +464,10 @@ static int serial_read_proc (char *page, char **start, off_t off, int count, int | |||
464 | length += sprintf (page+length, " path:%s", tmp); | 464 | length += sprintf (page+length, " path:%s", tmp); |
465 | 465 | ||
466 | length += sprintf (page+length, "\n"); | 466 | length += sprintf (page+length, "\n"); |
467 | if ((length + begin) > (off + count)) | 467 | if ((length + begin) > (off + count)) { |
468 | usb_serial_put(serial); | ||
468 | goto done; | 469 | goto done; |
470 | } | ||
469 | if ((length + begin) < off) { | 471 | if ((length + begin) < off) { |
470 | begin += length; | 472 | begin += length; |
471 | length = 0; | 473 | length = 0; |
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index 105761e3ba0e..9aeb58a7d369 100644 --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c | |||
@@ -82,7 +82,6 @@ static int construct_dentry(struct qstr *qstring, struct file *file, | |||
82 | if(*ptmp_inode == NULL) | 82 | if(*ptmp_inode == NULL) |
83 | return rc; | 83 | return rc; |
84 | rc = 1; | 84 | rc = 1; |
85 | d_instantiate(tmp_dentry, *ptmp_inode); | ||
86 | } | 85 | } |
87 | } else { | 86 | } else { |
88 | tmp_dentry = d_alloc(file->f_dentry, qstring); | 87 | tmp_dentry = d_alloc(file->f_dentry, qstring); |
@@ -99,9 +98,7 @@ static int construct_dentry(struct qstr *qstring, struct file *file, | |||
99 | tmp_dentry->d_op = &cifs_dentry_ops; | 98 | tmp_dentry->d_op = &cifs_dentry_ops; |
100 | if(*ptmp_inode == NULL) | 99 | if(*ptmp_inode == NULL) |
101 | return rc; | 100 | return rc; |
102 | rc = 1; | 101 | rc = 2; |
103 | d_instantiate(tmp_dentry, *ptmp_inode); | ||
104 | d_rehash(tmp_dentry); | ||
105 | } | 102 | } |
106 | 103 | ||
107 | tmp_dentry->d_time = jiffies; | 104 | tmp_dentry->d_time = jiffies; |
@@ -870,6 +867,12 @@ static int cifs_filldir(char *pfindEntry, struct file *file, | |||
870 | pfindEntry, &obj_type, rc); | 867 | pfindEntry, &obj_type, rc); |
871 | else | 868 | else |
872 | fill_in_inode(tmp_inode, 1 /* NT */, pfindEntry, &obj_type, rc); | 869 | fill_in_inode(tmp_inode, 1 /* NT */, pfindEntry, &obj_type, rc); |
870 | |||
871 | if(rc) /* new inode - needs to be tied to dentry */ { | ||
872 | d_instantiate(tmp_dentry, tmp_inode); | ||
873 | if(rc == 2) | ||
874 | d_rehash(tmp_dentry); | ||
875 | } | ||
873 | 876 | ||
874 | 877 | ||
875 | rc = filldir(direntry,qstring.name,qstring.len,file->f_pos, | 878 | rc = filldir(direntry,qstring.name,qstring.len,file->f_pos, |
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index c5ee9f0691e3..0f0b1eadb98d 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c | |||
@@ -1009,11 +1009,14 @@ struct buffer_head *ext3_getblk(handle_t *handle, struct inode *inode, | |||
1009 | buffer_trace_init(&dummy.b_history); | 1009 | buffer_trace_init(&dummy.b_history); |
1010 | err = ext3_get_blocks_handle(handle, inode, block, 1, | 1010 | err = ext3_get_blocks_handle(handle, inode, block, 1, |
1011 | &dummy, create, 1); | 1011 | &dummy, create, 1); |
1012 | if (err == 1) { | 1012 | /* |
1013 | * ext3_get_blocks_handle() returns number of blocks | ||
1014 | * mapped. 0 in case of a HOLE. | ||
1015 | */ | ||
1016 | if (err > 0) { | ||
1017 | if (err > 1) | ||
1018 | WARN_ON(1); | ||
1013 | err = 0; | 1019 | err = 0; |
1014 | } else if (err >= 0) { | ||
1015 | WARN_ON(1); | ||
1016 | err = -EIO; | ||
1017 | } | 1020 | } |
1018 | *errp = err; | 1021 | *errp = err; |
1019 | if (!err && buffer_mapped(&dummy)) { | 1022 | if (!err && buffer_mapped(&dummy)) { |
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index fecd3b095deb..76ca1cbc38f9 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c | |||
@@ -100,25 +100,6 @@ static inline int put_dreq(struct nfs_direct_req *dreq) | |||
100 | return atomic_dec_and_test(&dreq->io_count); | 100 | return atomic_dec_and_test(&dreq->io_count); |
101 | } | 101 | } |
102 | 102 | ||
103 | /* | ||
104 | * "size" is never larger than rsize or wsize. | ||
105 | */ | ||
106 | static inline int nfs_direct_count_pages(unsigned long user_addr, size_t size) | ||
107 | { | ||
108 | int page_count; | ||
109 | |||
110 | page_count = (user_addr + size + PAGE_SIZE - 1) >> PAGE_SHIFT; | ||
111 | page_count -= user_addr >> PAGE_SHIFT; | ||
112 | BUG_ON(page_count < 0); | ||
113 | |||
114 | return page_count; | ||
115 | } | ||
116 | |||
117 | static inline unsigned int nfs_max_pages(unsigned int size) | ||
118 | { | ||
119 | return (size + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; | ||
120 | } | ||
121 | |||
122 | /** | 103 | /** |
123 | * nfs_direct_IO - NFS address space operation for direct I/O | 104 | * nfs_direct_IO - NFS address space operation for direct I/O |
124 | * @rw: direction (read or write) | 105 | * @rw: direction (read or write) |
@@ -276,28 +257,24 @@ static ssize_t nfs_direct_read_schedule(struct nfs_direct_req *dreq, unsigned lo | |||
276 | struct nfs_open_context *ctx = dreq->ctx; | 257 | struct nfs_open_context *ctx = dreq->ctx; |
277 | struct inode *inode = ctx->dentry->d_inode; | 258 | struct inode *inode = ctx->dentry->d_inode; |
278 | size_t rsize = NFS_SERVER(inode)->rsize; | 259 | size_t rsize = NFS_SERVER(inode)->rsize; |
279 | unsigned int rpages = nfs_max_pages(rsize); | ||
280 | unsigned int pgbase; | 260 | unsigned int pgbase; |
281 | int result; | 261 | int result; |
282 | ssize_t started = 0; | 262 | ssize_t started = 0; |
283 | 263 | ||
284 | get_dreq(dreq); | 264 | get_dreq(dreq); |
285 | 265 | ||
286 | pgbase = user_addr & ~PAGE_MASK; | ||
287 | do { | 266 | do { |
288 | struct nfs_read_data *data; | 267 | struct nfs_read_data *data; |
289 | size_t bytes; | 268 | size_t bytes; |
290 | 269 | ||
270 | pgbase = user_addr & ~PAGE_MASK; | ||
271 | bytes = min(rsize,count); | ||
272 | |||
291 | result = -ENOMEM; | 273 | result = -ENOMEM; |
292 | data = nfs_readdata_alloc(rpages); | 274 | data = nfs_readdata_alloc(pgbase + bytes); |
293 | if (unlikely(!data)) | 275 | if (unlikely(!data)) |
294 | break; | 276 | break; |
295 | 277 | ||
296 | bytes = rsize; | ||
297 | if (count < rsize) | ||
298 | bytes = count; | ||
299 | |||
300 | data->npages = nfs_direct_count_pages(user_addr, bytes); | ||
301 | down_read(¤t->mm->mmap_sem); | 278 | down_read(¤t->mm->mmap_sem); |
302 | result = get_user_pages(current, current->mm, user_addr, | 279 | result = get_user_pages(current, current->mm, user_addr, |
303 | data->npages, 1, 0, data->pagevec, NULL); | 280 | data->npages, 1, 0, data->pagevec, NULL); |
@@ -344,8 +321,10 @@ static ssize_t nfs_direct_read_schedule(struct nfs_direct_req *dreq, unsigned lo | |||
344 | started += bytes; | 321 | started += bytes; |
345 | user_addr += bytes; | 322 | user_addr += bytes; |
346 | pos += bytes; | 323 | pos += bytes; |
324 | /* FIXME: Remove this unnecessary math from final patch */ | ||
347 | pgbase += bytes; | 325 | pgbase += bytes; |
348 | pgbase &= ~PAGE_MASK; | 326 | pgbase &= ~PAGE_MASK; |
327 | BUG_ON(pgbase != (user_addr & ~PAGE_MASK)); | ||
349 | 328 | ||
350 | count -= bytes; | 329 | count -= bytes; |
351 | } while (count != 0); | 330 | } while (count != 0); |
@@ -524,7 +503,7 @@ static void nfs_direct_write_complete(struct nfs_direct_req *dreq, struct inode | |||
524 | 503 | ||
525 | static void nfs_alloc_commit_data(struct nfs_direct_req *dreq) | 504 | static void nfs_alloc_commit_data(struct nfs_direct_req *dreq) |
526 | { | 505 | { |
527 | dreq->commit_data = nfs_commit_alloc(0); | 506 | dreq->commit_data = nfs_commit_alloc(); |
528 | if (dreq->commit_data != NULL) | 507 | if (dreq->commit_data != NULL) |
529 | dreq->commit_data->req = (struct nfs_page *) dreq; | 508 | dreq->commit_data->req = (struct nfs_page *) dreq; |
530 | } | 509 | } |
@@ -605,28 +584,24 @@ static ssize_t nfs_direct_write_schedule(struct nfs_direct_req *dreq, unsigned l | |||
605 | struct nfs_open_context *ctx = dreq->ctx; | 584 | struct nfs_open_context *ctx = dreq->ctx; |
606 | struct inode *inode = ctx->dentry->d_inode; | 585 | struct inode *inode = ctx->dentry->d_inode; |
607 | size_t wsize = NFS_SERVER(inode)->wsize; | 586 | size_t wsize = NFS_SERVER(inode)->wsize; |
608 | unsigned int wpages = nfs_max_pages(wsize); | ||
609 | unsigned int pgbase; | 587 | unsigned int pgbase; |
610 | int result; | 588 | int result; |
611 | ssize_t started = 0; | 589 | ssize_t started = 0; |
612 | 590 | ||
613 | get_dreq(dreq); | 591 | get_dreq(dreq); |
614 | 592 | ||
615 | pgbase = user_addr & ~PAGE_MASK; | ||
616 | do { | 593 | do { |
617 | struct nfs_write_data *data; | 594 | struct nfs_write_data *data; |
618 | size_t bytes; | 595 | size_t bytes; |
619 | 596 | ||
597 | pgbase = user_addr & ~PAGE_MASK; | ||
598 | bytes = min(wsize,count); | ||
599 | |||
620 | result = -ENOMEM; | 600 | result = -ENOMEM; |
621 | data = nfs_writedata_alloc(wpages); | 601 | data = nfs_writedata_alloc(pgbase + bytes); |
622 | if (unlikely(!data)) | 602 | if (unlikely(!data)) |
623 | break; | 603 | break; |
624 | 604 | ||
625 | bytes = wsize; | ||
626 | if (count < wsize) | ||
627 | bytes = count; | ||
628 | |||
629 | data->npages = nfs_direct_count_pages(user_addr, bytes); | ||
630 | down_read(¤t->mm->mmap_sem); | 605 | down_read(¤t->mm->mmap_sem); |
631 | result = get_user_pages(current, current->mm, user_addr, | 606 | result = get_user_pages(current, current->mm, user_addr, |
632 | data->npages, 0, 0, data->pagevec, NULL); | 607 | data->npages, 0, 0, data->pagevec, NULL); |
@@ -676,8 +651,11 @@ static ssize_t nfs_direct_write_schedule(struct nfs_direct_req *dreq, unsigned l | |||
676 | started += bytes; | 651 | started += bytes; |
677 | user_addr += bytes; | 652 | user_addr += bytes; |
678 | pos += bytes; | 653 | pos += bytes; |
654 | |||
655 | /* FIXME: Remove this useless math from the final patch */ | ||
679 | pgbase += bytes; | 656 | pgbase += bytes; |
680 | pgbase &= ~PAGE_MASK; | 657 | pgbase &= ~PAGE_MASK; |
658 | BUG_ON(pgbase != (user_addr & ~PAGE_MASK)); | ||
681 | 659 | ||
682 | count -= bytes; | 660 | count -= bytes; |
683 | } while (count != 0); | 661 | } while (count != 0); |
diff --git a/fs/nfs/read.c b/fs/nfs/read.c index da9cf11c326f..7a9ee00e0c61 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c | |||
@@ -43,13 +43,15 @@ static mempool_t *nfs_rdata_mempool; | |||
43 | 43 | ||
44 | #define MIN_POOL_READ (32) | 44 | #define MIN_POOL_READ (32) |
45 | 45 | ||
46 | struct nfs_read_data *nfs_readdata_alloc(unsigned int pagecount) | 46 | struct nfs_read_data *nfs_readdata_alloc(size_t len) |
47 | { | 47 | { |
48 | unsigned int pagecount = (len + PAGE_SIZE - 1) >> PAGE_SHIFT; | ||
48 | struct nfs_read_data *p = mempool_alloc(nfs_rdata_mempool, SLAB_NOFS); | 49 | struct nfs_read_data *p = mempool_alloc(nfs_rdata_mempool, SLAB_NOFS); |
49 | 50 | ||
50 | if (p) { | 51 | if (p) { |
51 | memset(p, 0, sizeof(*p)); | 52 | memset(p, 0, sizeof(*p)); |
52 | INIT_LIST_HEAD(&p->pages); | 53 | INIT_LIST_HEAD(&p->pages); |
54 | p->npages = pagecount; | ||
53 | if (pagecount <= ARRAY_SIZE(p->page_array)) | 55 | if (pagecount <= ARRAY_SIZE(p->page_array)) |
54 | p->pagevec = p->page_array; | 56 | p->pagevec = p->page_array; |
55 | else { | 57 | else { |
@@ -140,7 +142,7 @@ static int nfs_readpage_sync(struct nfs_open_context *ctx, struct inode *inode, | |||
140 | int result; | 142 | int result; |
141 | struct nfs_read_data *rdata; | 143 | struct nfs_read_data *rdata; |
142 | 144 | ||
143 | rdata = nfs_readdata_alloc(1); | 145 | rdata = nfs_readdata_alloc(count); |
144 | if (!rdata) | 146 | if (!rdata) |
145 | return -ENOMEM; | 147 | return -ENOMEM; |
146 | 148 | ||
@@ -336,25 +338,25 @@ static int nfs_pagein_multi(struct list_head *head, struct inode *inode) | |||
336 | struct nfs_page *req = nfs_list_entry(head->next); | 338 | struct nfs_page *req = nfs_list_entry(head->next); |
337 | struct page *page = req->wb_page; | 339 | struct page *page = req->wb_page; |
338 | struct nfs_read_data *data; | 340 | struct nfs_read_data *data; |
339 | unsigned int rsize = NFS_SERVER(inode)->rsize; | 341 | size_t rsize = NFS_SERVER(inode)->rsize, nbytes; |
340 | unsigned int nbytes, offset; | 342 | unsigned int offset; |
341 | int requests = 0; | 343 | int requests = 0; |
342 | LIST_HEAD(list); | 344 | LIST_HEAD(list); |
343 | 345 | ||
344 | nfs_list_remove_request(req); | 346 | nfs_list_remove_request(req); |
345 | 347 | ||
346 | nbytes = req->wb_bytes; | 348 | nbytes = req->wb_bytes; |
347 | for(;;) { | 349 | do { |
348 | data = nfs_readdata_alloc(1); | 350 | size_t len = min(nbytes,rsize); |
351 | |||
352 | data = nfs_readdata_alloc(len); | ||
349 | if (!data) | 353 | if (!data) |
350 | goto out_bad; | 354 | goto out_bad; |
351 | INIT_LIST_HEAD(&data->pages); | 355 | INIT_LIST_HEAD(&data->pages); |
352 | list_add(&data->pages, &list); | 356 | list_add(&data->pages, &list); |
353 | requests++; | 357 | requests++; |
354 | if (nbytes <= rsize) | 358 | nbytes -= len; |
355 | break; | 359 | } while(nbytes != 0); |
356 | nbytes -= rsize; | ||
357 | } | ||
358 | atomic_set(&req->wb_complete, requests); | 360 | atomic_set(&req->wb_complete, requests); |
359 | 361 | ||
360 | ClearPageError(page); | 362 | ClearPageError(page); |
@@ -402,7 +404,7 @@ static int nfs_pagein_one(struct list_head *head, struct inode *inode) | |||
402 | if (NFS_SERVER(inode)->rsize < PAGE_CACHE_SIZE) | 404 | if (NFS_SERVER(inode)->rsize < PAGE_CACHE_SIZE) |
403 | return nfs_pagein_multi(head, inode); | 405 | return nfs_pagein_multi(head, inode); |
404 | 406 | ||
405 | data = nfs_readdata_alloc(NFS_SERVER(inode)->rpages); | 407 | data = nfs_readdata_alloc(NFS_SERVER(inode)->rsize); |
406 | if (!data) | 408 | if (!data) |
407 | goto out_bad; | 409 | goto out_bad; |
408 | 410 | ||
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 50774991f8d5..8ab3cf10d792 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
@@ -90,22 +90,13 @@ static mempool_t *nfs_commit_mempool; | |||
90 | 90 | ||
91 | static DECLARE_WAIT_QUEUE_HEAD(nfs_write_congestion); | 91 | static DECLARE_WAIT_QUEUE_HEAD(nfs_write_congestion); |
92 | 92 | ||
93 | struct nfs_write_data *nfs_commit_alloc(unsigned int pagecount) | 93 | struct nfs_write_data *nfs_commit_alloc(void) |
94 | { | 94 | { |
95 | struct nfs_write_data *p = mempool_alloc(nfs_commit_mempool, SLAB_NOFS); | 95 | struct nfs_write_data *p = mempool_alloc(nfs_commit_mempool, SLAB_NOFS); |
96 | 96 | ||
97 | if (p) { | 97 | if (p) { |
98 | memset(p, 0, sizeof(*p)); | 98 | memset(p, 0, sizeof(*p)); |
99 | INIT_LIST_HEAD(&p->pages); | 99 | INIT_LIST_HEAD(&p->pages); |
100 | if (pagecount <= ARRAY_SIZE(p->page_array)) | ||
101 | p->pagevec = p->page_array; | ||
102 | else { | ||
103 | p->pagevec = kcalloc(pagecount, sizeof(struct page *), GFP_NOFS); | ||
104 | if (!p->pagevec) { | ||
105 | mempool_free(p, nfs_commit_mempool); | ||
106 | p = NULL; | ||
107 | } | ||
108 | } | ||
109 | } | 100 | } |
110 | return p; | 101 | return p; |
111 | } | 102 | } |
@@ -117,13 +108,15 @@ void nfs_commit_free(struct nfs_write_data *p) | |||
117 | mempool_free(p, nfs_commit_mempool); | 108 | mempool_free(p, nfs_commit_mempool); |
118 | } | 109 | } |
119 | 110 | ||
120 | struct nfs_write_data *nfs_writedata_alloc(unsigned int pagecount) | 111 | struct nfs_write_data *nfs_writedata_alloc(size_t len) |
121 | { | 112 | { |
113 | unsigned int pagecount = (len + PAGE_SIZE - 1) >> PAGE_SHIFT; | ||
122 | struct nfs_write_data *p = mempool_alloc(nfs_wdata_mempool, SLAB_NOFS); | 114 | struct nfs_write_data *p = mempool_alloc(nfs_wdata_mempool, SLAB_NOFS); |
123 | 115 | ||
124 | if (p) { | 116 | if (p) { |
125 | memset(p, 0, sizeof(*p)); | 117 | memset(p, 0, sizeof(*p)); |
126 | INIT_LIST_HEAD(&p->pages); | 118 | INIT_LIST_HEAD(&p->pages); |
119 | p->npages = pagecount; | ||
127 | if (pagecount <= ARRAY_SIZE(p->page_array)) | 120 | if (pagecount <= ARRAY_SIZE(p->page_array)) |
128 | p->pagevec = p->page_array; | 121 | p->pagevec = p->page_array; |
129 | else { | 122 | else { |
@@ -208,7 +201,7 @@ static int nfs_writepage_sync(struct nfs_open_context *ctx, struct inode *inode, | |||
208 | int result, written = 0; | 201 | int result, written = 0; |
209 | struct nfs_write_data *wdata; | 202 | struct nfs_write_data *wdata; |
210 | 203 | ||
211 | wdata = nfs_writedata_alloc(1); | 204 | wdata = nfs_writedata_alloc(wsize); |
212 | if (!wdata) | 205 | if (!wdata) |
213 | return -ENOMEM; | 206 | return -ENOMEM; |
214 | 207 | ||
@@ -999,24 +992,24 @@ static int nfs_flush_multi(struct inode *inode, struct list_head *head, int how) | |||
999 | struct nfs_page *req = nfs_list_entry(head->next); | 992 | struct nfs_page *req = nfs_list_entry(head->next); |
1000 | struct page *page = req->wb_page; | 993 | struct page *page = req->wb_page; |
1001 | struct nfs_write_data *data; | 994 | struct nfs_write_data *data; |
1002 | unsigned int wsize = NFS_SERVER(inode)->wsize; | 995 | size_t wsize = NFS_SERVER(inode)->wsize, nbytes; |
1003 | unsigned int nbytes, offset; | 996 | unsigned int offset; |
1004 | int requests = 0; | 997 | int requests = 0; |
1005 | LIST_HEAD(list); | 998 | LIST_HEAD(list); |
1006 | 999 | ||
1007 | nfs_list_remove_request(req); | 1000 | nfs_list_remove_request(req); |
1008 | 1001 | ||
1009 | nbytes = req->wb_bytes; | 1002 | nbytes = req->wb_bytes; |
1010 | for (;;) { | 1003 | do { |
1011 | data = nfs_writedata_alloc(1); | 1004 | size_t len = min(nbytes, wsize); |
1005 | |||
1006 | data = nfs_writedata_alloc(len); | ||
1012 | if (!data) | 1007 | if (!data) |
1013 | goto out_bad; | 1008 | goto out_bad; |
1014 | list_add(&data->pages, &list); | 1009 | list_add(&data->pages, &list); |
1015 | requests++; | 1010 | requests++; |
1016 | if (nbytes <= wsize) | 1011 | nbytes -= len; |
1017 | break; | 1012 | } while (nbytes != 0); |
1018 | nbytes -= wsize; | ||
1019 | } | ||
1020 | atomic_set(&req->wb_complete, requests); | 1013 | atomic_set(&req->wb_complete, requests); |
1021 | 1014 | ||
1022 | ClearPageError(page); | 1015 | ClearPageError(page); |
@@ -1070,7 +1063,7 @@ static int nfs_flush_one(struct inode *inode, struct list_head *head, int how) | |||
1070 | struct nfs_write_data *data; | 1063 | struct nfs_write_data *data; |
1071 | unsigned int count; | 1064 | unsigned int count; |
1072 | 1065 | ||
1073 | data = nfs_writedata_alloc(NFS_SERVER(inode)->wpages); | 1066 | data = nfs_writedata_alloc(NFS_SERVER(inode)->wsize); |
1074 | if (!data) | 1067 | if (!data) |
1075 | goto out_bad; | 1068 | goto out_bad; |
1076 | 1069 | ||
@@ -1378,7 +1371,7 @@ nfs_commit_list(struct inode *inode, struct list_head *head, int how) | |||
1378 | struct nfs_write_data *data; | 1371 | struct nfs_write_data *data; |
1379 | struct nfs_page *req; | 1372 | struct nfs_page *req; |
1380 | 1373 | ||
1381 | data = nfs_commit_alloc(NFS_SERVER(inode)->wpages); | 1374 | data = nfs_commit_alloc(); |
1382 | 1375 | ||
1383 | if (!data) | 1376 | if (!data) |
1384 | goto out_bad; | 1377 | goto out_bad; |
diff --git a/fs/super.c b/fs/super.c index 6d4e8174b6db..5c4c94d5495e 100644 --- a/fs/super.c +++ b/fs/super.c | |||
@@ -49,6 +49,7 @@ DEFINE_SPINLOCK(sb_lock); | |||
49 | 49 | ||
50 | /** | 50 | /** |
51 | * alloc_super - create new superblock | 51 | * alloc_super - create new superblock |
52 | * @type: filesystem type superblock should belong to | ||
52 | * | 53 | * |
53 | * Allocates and initializes a new &struct super_block. alloc_super() | 54 | * Allocates and initializes a new &struct super_block. alloc_super() |
54 | * returns a pointer new superblock or %NULL if allocation had failed. | 55 | * returns a pointer new superblock or %NULL if allocation had failed. |
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index c40f81ba9b13..34dcb43a7837 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c | |||
@@ -1390,11 +1390,19 @@ xfs_vm_direct_IO( | |||
1390 | 1390 | ||
1391 | iocb->private = xfs_alloc_ioend(inode, IOMAP_UNWRITTEN); | 1391 | iocb->private = xfs_alloc_ioend(inode, IOMAP_UNWRITTEN); |
1392 | 1392 | ||
1393 | ret = blockdev_direct_IO_own_locking(rw, iocb, inode, | 1393 | if (rw == WRITE) { |
1394 | iomap.iomap_target->bt_bdev, | 1394 | ret = blockdev_direct_IO_own_locking(rw, iocb, inode, |
1395 | iov, offset, nr_segs, | 1395 | iomap.iomap_target->bt_bdev, |
1396 | xfs_get_blocks_direct, | 1396 | iov, offset, nr_segs, |
1397 | xfs_end_io_direct); | 1397 | xfs_get_blocks_direct, |
1398 | xfs_end_io_direct); | ||
1399 | } else { | ||
1400 | ret = blockdev_direct_IO_no_locking(rw, iocb, inode, | ||
1401 | iomap.iomap_target->bt_bdev, | ||
1402 | iov, offset, nr_segs, | ||
1403 | xfs_get_blocks_direct, | ||
1404 | xfs_end_io_direct); | ||
1405 | } | ||
1398 | 1406 | ||
1399 | if (unlikely(ret <= 0 && iocb->private)) | 1407 | if (unlikely(ret <= 0 && iocb->private)) |
1400 | xfs_destroy_ioend(iocb->private); | 1408 | xfs_destroy_ioend(iocb->private); |
diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c index 5d9cfd91ad08..ee788b1cb364 100644 --- a/fs/xfs/linux-2.6/xfs_lrw.c +++ b/fs/xfs/linux-2.6/xfs_lrw.c | |||
@@ -264,7 +264,9 @@ xfs_read( | |||
264 | dmflags, &locktype); | 264 | dmflags, &locktype); |
265 | if (ret) { | 265 | if (ret) { |
266 | xfs_iunlock(ip, XFS_IOLOCK_SHARED); | 266 | xfs_iunlock(ip, XFS_IOLOCK_SHARED); |
267 | goto unlock_mutex; | 267 | if (unlikely(ioflags & IO_ISDIRECT)) |
268 | mutex_unlock(&inode->i_mutex); | ||
269 | return ret; | ||
268 | } | 270 | } |
269 | } | 271 | } |
270 | 272 | ||
@@ -272,6 +274,9 @@ xfs_read( | |||
272 | bhv_vop_flushinval_pages(vp, ctooff(offtoct(*offset)), | 274 | bhv_vop_flushinval_pages(vp, ctooff(offtoct(*offset)), |
273 | -1, FI_REMAPF_LOCKED); | 275 | -1, FI_REMAPF_LOCKED); |
274 | 276 | ||
277 | if (unlikely(ioflags & IO_ISDIRECT)) | ||
278 | mutex_unlock(&inode->i_mutex); | ||
279 | |||
275 | xfs_rw_enter_trace(XFS_READ_ENTER, &ip->i_iocore, | 280 | xfs_rw_enter_trace(XFS_READ_ENTER, &ip->i_iocore, |
276 | (void *)iovp, segs, *offset, ioflags); | 281 | (void *)iovp, segs, *offset, ioflags); |
277 | ret = __generic_file_aio_read(iocb, iovp, segs, offset); | 282 | ret = __generic_file_aio_read(iocb, iovp, segs, offset); |
@@ -281,10 +286,6 @@ xfs_read( | |||
281 | XFS_STATS_ADD(xs_read_bytes, ret); | 286 | XFS_STATS_ADD(xs_read_bytes, ret); |
282 | 287 | ||
283 | xfs_iunlock(ip, XFS_IOLOCK_SHARED); | 288 | xfs_iunlock(ip, XFS_IOLOCK_SHARED); |
284 | |||
285 | unlock_mutex: | ||
286 | if (unlikely(ioflags & IO_ISDIRECT)) | ||
287 | mutex_unlock(&inode->i_mutex); | ||
288 | return ret; | 289 | return ret; |
289 | } | 290 | } |
290 | 291 | ||
@@ -390,6 +391,8 @@ xfs_splice_write( | |||
390 | xfs_inode_t *ip = XFS_BHVTOI(bdp); | 391 | xfs_inode_t *ip = XFS_BHVTOI(bdp); |
391 | xfs_mount_t *mp = ip->i_mount; | 392 | xfs_mount_t *mp = ip->i_mount; |
392 | ssize_t ret; | 393 | ssize_t ret; |
394 | struct inode *inode = outfilp->f_mapping->host; | ||
395 | xfs_fsize_t isize; | ||
393 | 396 | ||
394 | XFS_STATS_INC(xs_write_calls); | 397 | XFS_STATS_INC(xs_write_calls); |
395 | if (XFS_FORCED_SHUTDOWN(ip->i_mount)) | 398 | if (XFS_FORCED_SHUTDOWN(ip->i_mount)) |
@@ -416,6 +419,20 @@ xfs_splice_write( | |||
416 | if (ret > 0) | 419 | if (ret > 0) |
417 | XFS_STATS_ADD(xs_write_bytes, ret); | 420 | XFS_STATS_ADD(xs_write_bytes, ret); |
418 | 421 | ||
422 | isize = i_size_read(inode); | ||
423 | if (unlikely(ret < 0 && ret != -EFAULT && *ppos > isize)) | ||
424 | *ppos = isize; | ||
425 | |||
426 | if (*ppos > ip->i_d.di_size) { | ||
427 | xfs_ilock(ip, XFS_ILOCK_EXCL); | ||
428 | if (*ppos > ip->i_d.di_size) { | ||
429 | ip->i_d.di_size = *ppos; | ||
430 | i_size_write(inode, *ppos); | ||
431 | ip->i_update_core = 1; | ||
432 | ip->i_update_size = 1; | ||
433 | } | ||
434 | xfs_iunlock(ip, XFS_ILOCK_EXCL); | ||
435 | } | ||
419 | xfs_iunlock(ip, XFS_IOLOCK_EXCL); | 436 | xfs_iunlock(ip, XFS_IOLOCK_EXCL); |
420 | return ret; | 437 | return ret; |
421 | } | 438 | } |
diff --git a/fs/xfs/quota/xfs_qm_bhv.c b/fs/xfs/quota/xfs_qm_bhv.c index f137856c3261..db8872be8c87 100644 --- a/fs/xfs/quota/xfs_qm_bhv.c +++ b/fs/xfs/quota/xfs_qm_bhv.c | |||
@@ -203,7 +203,7 @@ xfs_qm_statvfs( | |||
203 | if (error || !vnode) | 203 | if (error || !vnode) |
204 | return error; | 204 | return error; |
205 | 205 | ||
206 | mp = XFS_BHVTOM(bhv); | 206 | mp = xfs_vfstom(bhvtovfs(bhv)); |
207 | ip = xfs_vtoi(vnode); | 207 | ip = xfs_vtoi(vnode); |
208 | 208 | ||
209 | if (!(ip->i_d.di_flags & XFS_DIFLAG_PROJINHERIT)) | 209 | if (!(ip->i_d.di_flags & XFS_DIFLAG_PROJINHERIT)) |
diff --git a/fs/xfs/xfs_alloc.h b/fs/xfs/xfs_alloc.h index 650591f999ae..5a4256120ccc 100644 --- a/fs/xfs/xfs_alloc.h +++ b/fs/xfs/xfs_alloc.h | |||
@@ -44,6 +44,26 @@ typedef enum xfs_alloctype | |||
44 | #define XFS_ALLOC_FLAG_FREEING 0x00000002 /* indicate caller is freeing extents*/ | 44 | #define XFS_ALLOC_FLAG_FREEING 0x00000002 /* indicate caller is freeing extents*/ |
45 | 45 | ||
46 | /* | 46 | /* |
47 | * In order to avoid ENOSPC-related deadlock caused by | ||
48 | * out-of-order locking of AGF buffer (PV 947395), we place | ||
49 | * constraints on the relationship among actual allocations for | ||
50 | * data blocks, freelist blocks, and potential file data bmap | ||
51 | * btree blocks. However, these restrictions may result in no | ||
52 | * actual space allocated for a delayed extent, for example, a data | ||
53 | * block in a certain AG is allocated but there is no additional | ||
54 | * block for the additional bmap btree block due to a split of the | ||
55 | * bmap btree of the file. The result of this may lead to an | ||
56 | * infinite loop in xfssyncd when the file gets flushed to disk and | ||
57 | * all delayed extents need to be actually allocated. To get around | ||
58 | * this, we explicitly set aside a few blocks which will not be | ||
59 | * reserved in delayed allocation. Considering the minimum number of | ||
60 | * needed freelist blocks is 4 fsbs _per AG_, a potential split of file's bmap | ||
61 | * btree requires 1 fsb, so we set the number of set-aside blocks | ||
62 | * to 4 + 4*agcount. | ||
63 | */ | ||
64 | #define XFS_ALLOC_SET_ASIDE(mp) (4 + ((mp)->m_sb.sb_agcount * 4)) | ||
65 | |||
66 | /* | ||
47 | * Argument structure for xfs_alloc routines. | 67 | * Argument structure for xfs_alloc routines. |
48 | * This is turned into a structure to avoid having 20 arguments passed | 68 | * This is turned into a structure to avoid having 20 arguments passed |
49 | * down several levels of the stack. | 69 | * down several levels of the stack. |
diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c index 077629bab532..c064e72ada9e 100644 --- a/fs/xfs/xfs_fsops.c +++ b/fs/xfs/xfs_fsops.c | |||
@@ -462,7 +462,7 @@ xfs_fs_counts( | |||
462 | 462 | ||
463 | xfs_icsb_sync_counters_lazy(mp); | 463 | xfs_icsb_sync_counters_lazy(mp); |
464 | s = XFS_SB_LOCK(mp); | 464 | s = XFS_SB_LOCK(mp); |
465 | cnt->freedata = mp->m_sb.sb_fdblocks; | 465 | cnt->freedata = mp->m_sb.sb_fdblocks - XFS_ALLOC_SET_ASIDE(mp); |
466 | cnt->freertx = mp->m_sb.sb_frextents; | 466 | cnt->freertx = mp->m_sb.sb_frextents; |
467 | cnt->freeino = mp->m_sb.sb_ifree; | 467 | cnt->freeino = mp->m_sb.sb_ifree; |
468 | cnt->allocino = mp->m_sb.sb_icount; | 468 | cnt->allocino = mp->m_sb.sb_icount; |
@@ -519,15 +519,19 @@ xfs_reserve_blocks( | |||
519 | } | 519 | } |
520 | mp->m_resblks = request; | 520 | mp->m_resblks = request; |
521 | } else { | 521 | } else { |
522 | __int64_t free; | ||
523 | |||
524 | free = mp->m_sb.sb_fdblocks - XFS_ALLOC_SET_ASIDE(mp); | ||
522 | delta = request - mp->m_resblks; | 525 | delta = request - mp->m_resblks; |
523 | lcounter = mp->m_sb.sb_fdblocks - delta; | 526 | lcounter = free - delta; |
524 | if (lcounter < 0) { | 527 | if (lcounter < 0) { |
525 | /* We can't satisfy the request, just get what we can */ | 528 | /* We can't satisfy the request, just get what we can */ |
526 | mp->m_resblks += mp->m_sb.sb_fdblocks; | 529 | mp->m_resblks += free; |
527 | mp->m_resblks_avail += mp->m_sb.sb_fdblocks; | 530 | mp->m_resblks_avail += free; |
528 | mp->m_sb.sb_fdblocks = 0; | 531 | mp->m_sb.sb_fdblocks = XFS_ALLOC_SET_ASIDE(mp); |
529 | } else { | 532 | } else { |
530 | mp->m_sb.sb_fdblocks = lcounter; | 533 | mp->m_sb.sb_fdblocks = |
534 | lcounter + XFS_ALLOC_SET_ASIDE(mp); | ||
531 | mp->m_resblks = request; | 535 | mp->m_resblks = request; |
532 | mp->m_resblks_avail += delta; | 536 | mp->m_resblks_avail += delta; |
533 | } | 537 | } |
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index 4be5c0b2d296..9dfae18d995f 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c | |||
@@ -1243,24 +1243,6 @@ xfs_mod_sb(xfs_trans_t *tp, __int64_t fields) | |||
1243 | xfs_trans_log_buf(tp, bp, first, last); | 1243 | xfs_trans_log_buf(tp, bp, first, last); |
1244 | } | 1244 | } |
1245 | 1245 | ||
1246 | /* | ||
1247 | * In order to avoid ENOSPC-related deadlock caused by | ||
1248 | * out-of-order locking of AGF buffer (PV 947395), we place | ||
1249 | * constraints on the relationship among actual allocations for | ||
1250 | * data blocks, freelist blocks, and potential file data bmap | ||
1251 | * btree blocks. However, these restrictions may result in no | ||
1252 | * actual space allocated for a delayed extent, for example, a data | ||
1253 | * block in a certain AG is allocated but there is no additional | ||
1254 | * block for the additional bmap btree block due to a split of the | ||
1255 | * bmap btree of the file. The result of this may lead to an | ||
1256 | * infinite loop in xfssyncd when the file gets flushed to disk and | ||
1257 | * all delayed extents need to be actually allocated. To get around | ||
1258 | * this, we explicitly set aside a few blocks which will not be | ||
1259 | * reserved in delayed allocation. Considering the minimum number of | ||
1260 | * needed freelist blocks is 4 fsbs, a potential split of file's bmap | ||
1261 | * btree requires 1 fsb, so we set the number of set-aside blocks to 8. | ||
1262 | */ | ||
1263 | #define SET_ASIDE_BLOCKS 8 | ||
1264 | 1246 | ||
1265 | /* | 1247 | /* |
1266 | * xfs_mod_incore_sb_unlocked() is a utility routine common used to apply | 1248 | * xfs_mod_incore_sb_unlocked() is a utility routine common used to apply |
@@ -1306,7 +1288,8 @@ xfs_mod_incore_sb_unlocked(xfs_mount_t *mp, xfs_sb_field_t field, | |||
1306 | return 0; | 1288 | return 0; |
1307 | case XFS_SBS_FDBLOCKS: | 1289 | case XFS_SBS_FDBLOCKS: |
1308 | 1290 | ||
1309 | lcounter = (long long)mp->m_sb.sb_fdblocks - SET_ASIDE_BLOCKS; | 1291 | lcounter = (long long) |
1292 | mp->m_sb.sb_fdblocks - XFS_ALLOC_SET_ASIDE(mp); | ||
1310 | res_used = (long long)(mp->m_resblks - mp->m_resblks_avail); | 1293 | res_used = (long long)(mp->m_resblks - mp->m_resblks_avail); |
1311 | 1294 | ||
1312 | if (delta > 0) { /* Putting blocks back */ | 1295 | if (delta > 0) { /* Putting blocks back */ |
@@ -1340,7 +1323,7 @@ xfs_mod_incore_sb_unlocked(xfs_mount_t *mp, xfs_sb_field_t field, | |||
1340 | } | 1323 | } |
1341 | } | 1324 | } |
1342 | 1325 | ||
1343 | mp->m_sb.sb_fdblocks = lcounter + SET_ASIDE_BLOCKS; | 1326 | mp->m_sb.sb_fdblocks = lcounter + XFS_ALLOC_SET_ASIDE(mp); |
1344 | return 0; | 1327 | return 0; |
1345 | case XFS_SBS_FREXTENTS: | 1328 | case XFS_SBS_FREXTENTS: |
1346 | lcounter = (long long)mp->m_sb.sb_frextents; | 1329 | lcounter = (long long)mp->m_sb.sb_frextents; |
@@ -2021,7 +2004,8 @@ xfs_icsb_sync_counters_lazy( | |||
2021 | * when we get near ENOSPC. | 2004 | * when we get near ENOSPC. |
2022 | */ | 2005 | */ |
2023 | #define XFS_ICSB_INO_CNTR_REENABLE 64 | 2006 | #define XFS_ICSB_INO_CNTR_REENABLE 64 |
2024 | #define XFS_ICSB_FDBLK_CNTR_REENABLE 512 | 2007 | #define XFS_ICSB_FDBLK_CNTR_REENABLE(mp) \ |
2008 | (512 + XFS_ALLOC_SET_ASIDE(mp)) | ||
2025 | STATIC void | 2009 | STATIC void |
2026 | xfs_icsb_balance_counter( | 2010 | xfs_icsb_balance_counter( |
2027 | xfs_mount_t *mp, | 2011 | xfs_mount_t *mp, |
@@ -2055,7 +2039,7 @@ xfs_icsb_balance_counter( | |||
2055 | case XFS_SBS_FDBLOCKS: | 2039 | case XFS_SBS_FDBLOCKS: |
2056 | count = mp->m_sb.sb_fdblocks; | 2040 | count = mp->m_sb.sb_fdblocks; |
2057 | resid = do_div(count, weight); | 2041 | resid = do_div(count, weight); |
2058 | if (count < XFS_ICSB_FDBLK_CNTR_REENABLE) | 2042 | if (count < XFS_ICSB_FDBLK_CNTR_REENABLE(mp)) |
2059 | goto out; | 2043 | goto out; |
2060 | break; | 2044 | break; |
2061 | default: | 2045 | default: |
@@ -2110,11 +2094,11 @@ again: | |||
2110 | case XFS_SBS_FDBLOCKS: | 2094 | case XFS_SBS_FDBLOCKS: |
2111 | BUG_ON((mp->m_resblks - mp->m_resblks_avail) != 0); | 2095 | BUG_ON((mp->m_resblks - mp->m_resblks_avail) != 0); |
2112 | 2096 | ||
2113 | lcounter = icsbp->icsb_fdblocks; | 2097 | lcounter = icsbp->icsb_fdblocks - XFS_ALLOC_SET_ASIDE(mp); |
2114 | lcounter += delta; | 2098 | lcounter += delta; |
2115 | if (unlikely(lcounter < 0)) | 2099 | if (unlikely(lcounter < 0)) |
2116 | goto slow_path; | 2100 | goto slow_path; |
2117 | icsbp->icsb_fdblocks = lcounter; | 2101 | icsbp->icsb_fdblocks = lcounter + XFS_ALLOC_SET_ASIDE(mp); |
2118 | break; | 2102 | break; |
2119 | default: | 2103 | default: |
2120 | BUG(); | 2104 | BUG(); |
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c index b427d220a169..a34796e57afb 100644 --- a/fs/xfs/xfs_vfsops.c +++ b/fs/xfs/xfs_vfsops.c | |||
@@ -811,7 +811,8 @@ xfs_statvfs( | |||
811 | statp->f_bsize = sbp->sb_blocksize; | 811 | statp->f_bsize = sbp->sb_blocksize; |
812 | lsize = sbp->sb_logstart ? sbp->sb_logblocks : 0; | 812 | lsize = sbp->sb_logstart ? sbp->sb_logblocks : 0; |
813 | statp->f_blocks = sbp->sb_dblocks - lsize; | 813 | statp->f_blocks = sbp->sb_dblocks - lsize; |
814 | statp->f_bfree = statp->f_bavail = sbp->sb_fdblocks; | 814 | statp->f_bfree = statp->f_bavail = |
815 | sbp->sb_fdblocks - XFS_ALLOC_SET_ASIDE(mp); | ||
815 | fakeinos = statp->f_bfree << sbp->sb_inopblog; | 816 | fakeinos = statp->f_bfree << sbp->sb_inopblog; |
816 | #if XFS_BIG_INUMS | 817 | #if XFS_BIG_INUMS |
817 | fakeinos += mp->m_inoadd; | 818 | fakeinos += mp->m_inoadd; |
diff --git a/include/asm-arm/arch-s3c2410/anubis-cpld.h b/include/asm-arm/arch-s3c2410/anubis-cpld.h index 5675b1796b55..40e8e270d337 100644 --- a/include/asm-arm/arch-s3c2410/anubis-cpld.h +++ b/include/asm-arm/arch-s3c2410/anubis-cpld.h | |||
@@ -9,9 +9,6 @@ | |||
9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | * | ||
13 | * Changelog: | ||
14 | * | ||
15 | */ | 12 | */ |
16 | 13 | ||
17 | #ifndef __ASM_ARCH_ANUBISCPLD_H | 14 | #ifndef __ASM_ARCH_ANUBISCPLD_H |
diff --git a/include/asm-arm/arch-s3c2410/anubis-irq.h b/include/asm-arm/arch-s3c2410/anubis-irq.h index 82f15dbd97e8..4b5f423779df 100644 --- a/include/asm-arm/arch-s3c2410/anubis-irq.h +++ b/include/asm-arm/arch-s3c2410/anubis-irq.h | |||
@@ -9,9 +9,7 @@ | |||
9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | * | 12 | */ |
13 | * Changelog: | ||
14 | */ | ||
15 | 13 | ||
16 | #ifndef __ASM_ARCH_ANUBISIRQ_H | 14 | #ifndef __ASM_ARCH_ANUBISIRQ_H |
17 | #define __ASM_ARCH_ANUBISIRQ_H | 15 | #define __ASM_ARCH_ANUBISIRQ_H |
diff --git a/include/asm-arm/arch-s3c2410/anubis-map.h b/include/asm-arm/arch-s3c2410/anubis-map.h index d529ffda8599..058a2104b035 100644 --- a/include/asm-arm/arch-s3c2410/anubis-map.h +++ b/include/asm-arm/arch-s3c2410/anubis-map.h | |||
@@ -9,8 +9,6 @@ | |||
9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | * | ||
13 | * Changelog: | ||
14 | */ | 12 | */ |
15 | 13 | ||
16 | /* needs arch/map.h including with this */ | 14 | /* needs arch/map.h including with this */ |
diff --git a/include/asm-arm/arch-s3c2410/audio.h b/include/asm-arm/arch-s3c2410/audio.h index 0d276e67f2fb..7e0222276c98 100644 --- a/include/asm-arm/arch-s3c2410/audio.h +++ b/include/asm-arm/arch-s3c2410/audio.h | |||
@@ -9,10 +9,6 @@ | |||
9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | * | ||
13 | * Changelog: | ||
14 | * 20-Nov-2004 BJD Created file | ||
15 | * 07-Mar-2005 BJD Added suspend/resume calls | ||
16 | */ | 12 | */ |
17 | 13 | ||
18 | #ifndef __ASM_ARCH_AUDIO_H | 14 | #ifndef __ASM_ARCH_AUDIO_H |
diff --git a/include/asm-arm/arch-s3c2410/bast-cpld.h b/include/asm-arm/arch-s3c2410/bast-cpld.h index e28ca51a4975..8969cffe83fa 100644 --- a/include/asm-arm/arch-s3c2410/bast-cpld.h +++ b/include/asm-arm/arch-s3c2410/bast-cpld.h | |||
@@ -8,11 +8,6 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | ||
12 | * Changelog: | ||
13 | * 25-May-2003 BJD Created file, added CTRL1 registers | ||
14 | * 30-Aug-2004 BJD Updated definitions from 2.4.26 port | ||
15 | * 30-Aug-2004 BJD Added CTRL3 and CTRL4 definitions | ||
16 | */ | 11 | */ |
17 | 12 | ||
18 | #ifndef __ASM_ARCH_BASTCPLD_H | 13 | #ifndef __ASM_ARCH_BASTCPLD_H |
diff --git a/include/asm-arm/arch-s3c2410/bast-irq.h b/include/asm-arm/arch-s3c2410/bast-irq.h index b79b47f0d126..15ffa66f5011 100644 --- a/include/asm-arm/arch-s3c2410/bast-irq.h +++ b/include/asm-arm/arch-s3c2410/bast-irq.h | |||
@@ -8,11 +8,7 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | 11 | */ |
12 | * Changelog: | ||
13 | * 14-Sep-2004 BJD Fixed IRQ_USBOC definition | ||
14 | * 06-Jan-2003 BJD Linux 2.6.0 version | ||
15 | */ | ||
16 | 12 | ||
17 | #ifndef __ASM_ARCH_BASTIRQ_H | 13 | #ifndef __ASM_ARCH_BASTIRQ_H |
18 | #define __ASM_ARCH_BASTIRQ_H | 14 | #define __ASM_ARCH_BASTIRQ_H |
diff --git a/include/asm-arm/arch-s3c2410/bast-map.h b/include/asm-arm/arch-s3c2410/bast-map.h index 29c07e302b04..727cef84c70e 100644 --- a/include/asm-arm/arch-s3c2410/bast-map.h +++ b/include/asm-arm/arch-s3c2410/bast-map.h | |||
@@ -8,10 +8,6 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | ||
12 | * Changelog: | ||
13 | * 06-Jan-2003 BJD Linux 2.6.0 version, moved bast specifics from arch/map.h | ||
14 | * 12-Mar-2004 BJD Fixed header include protection | ||
15 | */ | 11 | */ |
16 | 12 | ||
17 | /* needs arch/map.h including with this */ | 13 | /* needs arch/map.h including with this */ |
diff --git a/include/asm-arm/arch-s3c2410/bast-pmu.h b/include/asm-arm/arch-s3c2410/bast-pmu.h index 758c5c59d4bf..82836027f00f 100644 --- a/include/asm-arm/arch-s3c2410/bast-pmu.h +++ b/include/asm-arm/arch-s3c2410/bast-pmu.h | |||
@@ -9,9 +9,6 @@ | |||
9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | * | ||
13 | * Changelog: | ||
14 | * 08-Oct-2003 BJD Initial creation | ||
15 | */ | 12 | */ |
16 | 13 | ||
17 | #ifndef __ASM_ARCH_BASTPMU_H | 14 | #ifndef __ASM_ARCH_BASTPMU_H |
diff --git a/include/asm-arm/arch-s3c2410/debug-macro.S b/include/asm-arm/arch-s3c2410/debug-macro.S index b7d15d125458..93064860e0e5 100644 --- a/include/asm-arm/arch-s3c2410/debug-macro.S +++ b/include/asm-arm/arch-s3c2410/debug-macro.S | |||
@@ -10,9 +10,6 @@ | |||
10 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
11 | * it under the terms of the GNU General Public License version 2 as | 11 | * it under the terms of the GNU General Public License version 2 as |
12 | * published by the Free Software Foundation. | 12 | * published by the Free Software Foundation. |
13 | * | ||
14 | * Modifications: | ||
15 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
16 | */ | 13 | */ |
17 | 14 | ||
18 | #include <asm/arch/map.h> | 15 | #include <asm/arch/map.h> |
diff --git a/include/asm-arm/arch-s3c2410/fb.h b/include/asm-arm/arch-s3c2410/fb.h index 4790491ba9d0..71161797bc89 100644 --- a/include/asm-arm/arch-s3c2410/fb.h +++ b/include/asm-arm/arch-s3c2410/fb.h | |||
@@ -7,13 +7,6 @@ | |||
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License version 2 as | 8 | * it under the terms of the GNU General Public License version 2 as |
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | * | ||
11 | * | ||
12 | * Changelog: | ||
13 | * 07-Sep-2004 RTP Created file | ||
14 | * 03-Nov-2004 BJD Updated and minor cleanups | ||
15 | * 03-Aug-2005 RTP Renamed to fb.h | ||
16 | * 26-Oct-2005 BJD Changed name of platdata init | ||
17 | */ | 10 | */ |
18 | 11 | ||
19 | #ifndef __ASM_ARM_FB_H | 12 | #ifndef __ASM_ARM_FB_H |
diff --git a/include/asm-arm/arch-s3c2410/hardware.h b/include/asm-arm/arch-s3c2410/hardware.h index a2330bf83695..871f8af09b8b 100644 --- a/include/asm-arm/arch-s3c2410/hardware.h +++ b/include/asm-arm/arch-s3c2410/hardware.h | |||
@@ -8,16 +8,6 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | ||
12 | * Changelog: | ||
13 | * 21-May-2003 BJD Created file | ||
14 | * 06-Jun-2003 BJD Added CPU frequency settings | ||
15 | * 03-Sep-2003 BJD Linux v2.6 support | ||
16 | * 12-Mar-2004 BJD Fixed include protection, fixed type of clock vars | ||
17 | * 14-Sep-2004 BJD Added misccr and getpin to gpio | ||
18 | * 01-Oct-2004 BJD Added the new gpio functions | ||
19 | * 16-Oct-2004 BJD Removed the clock variables | ||
20 | * 15-Jan-2006 LCVR Added s3c2400_gpio_getirq() | ||
21 | */ | 11 | */ |
22 | 12 | ||
23 | #ifndef __ASM_ARCH_HARDWARE_H | 13 | #ifndef __ASM_ARCH_HARDWARE_H |
diff --git a/include/asm-arm/arch-s3c2410/idle.h b/include/asm-arm/arch-s3c2410/idle.h index 749227c09576..eed450608f9c 100644 --- a/include/asm-arm/arch-s3c2410/idle.h +++ b/include/asm-arm/arch-s3c2410/idle.h | |||
@@ -8,10 +8,6 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | * |
10 | * S3C2410 CPU Idle controls | 10 | * S3C2410 CPU Idle controls |
11 | * | ||
12 | * Changelog: | ||
13 | * 28-Oct-2004 BJD Initial version | ||
14 | * | ||
15 | */ | 11 | */ |
16 | 12 | ||
17 | #ifndef __ASM_ARCH_IDLE_H | 13 | #ifndef __ASM_ARCH_IDLE_H |
diff --git a/include/asm-arm/arch-s3c2410/iic.h b/include/asm-arm/arch-s3c2410/iic.h index 518547f6d7a7..ed3d6c7bf6d7 100644 --- a/include/asm-arm/arch-s3c2410/iic.h +++ b/include/asm-arm/arch-s3c2410/iic.h | |||
@@ -8,10 +8,6 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | ||
12 | * Changelog: | ||
13 | * 05-Oct-2004 BJD Created file | ||
14 | * 19-Oct-2004 BJD Updated for s3c2440 | ||
15 | */ | 11 | */ |
16 | 12 | ||
17 | #ifndef __ASM_ARCH_IIC_H | 13 | #ifndef __ASM_ARCH_IIC_H |
diff --git a/include/asm-arm/arch-s3c2410/io.h b/include/asm-arm/arch-s3c2410/io.h index 16fbc8afffd9..6b35a4f2630e 100644 --- a/include/asm-arm/arch-s3c2410/io.h +++ b/include/asm-arm/arch-s3c2410/io.h | |||
@@ -4,13 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (C) 1997 Russell King | 5 | * Copyright (C) 1997 Russell King |
6 | * (C) 2003 Simtec Electronics | 6 | * (C) 2003 Simtec Electronics |
7 | * | 7 | */ |
8 | * Modifications: | ||
9 | * 06-Dec-1997 RMK Created. | ||
10 | * 02-Sep-2003 BJD Modified for S3C2410 | ||
11 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
12 | * 13-Oct-2005 BJD Fixed problems with LDRH/STRH offset range | ||
13 | */ | ||
14 | 8 | ||
15 | #ifndef __ASM_ARM_ARCH_IO_H | 9 | #ifndef __ASM_ARM_ARCH_IO_H |
16 | #define __ASM_ARM_ARCH_IO_H | 10 | #define __ASM_ARM_ARCH_IO_H |
diff --git a/include/asm-arm/arch-s3c2410/irqs.h b/include/asm-arm/arch-s3c2410/irqs.h index d9773d697268..39a69829d163 100644 --- a/include/asm-arm/arch-s3c2410/irqs.h +++ b/include/asm-arm/arch-s3c2410/irqs.h | |||
@@ -6,14 +6,7 @@ | |||
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | */ |
10 | * Changelog: | ||
11 | * 12-May-2003 BJD Created file | ||
12 | * 08-Jan-2003 BJD Linux 2.6.0 version, moved BAST bits out | ||
13 | * 12-Mar-2004 BJD Fixed bug in header protection | ||
14 | * 10-Feb-2005 BJD Added camera IRQ from guillaume.gourat@nexvision.tv | ||
15 | * 28-Feb-2005 BJD Updated s3c2440 IRQs | ||
16 | */ | ||
17 | 10 | ||
18 | 11 | ||
19 | #ifndef __ASM_ARCH_IRQS_H | 12 | #ifndef __ASM_ARCH_IRQS_H |
diff --git a/include/asm-arm/arch-s3c2410/map.h b/include/asm-arm/arch-s3c2410/map.h index fae2766ff32b..27ba0ac3fdd5 100644 --- a/include/asm-arm/arch-s3c2410/map.h +++ b/include/asm-arm/arch-s3c2410/map.h | |||
@@ -8,13 +8,6 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | ||
12 | * Changelog: | ||
13 | * 12-May-2003 BJD Created file | ||
14 | * 06-Jan-2003 BJD Linux 2.6.0 version, moved bast specifics out | ||
15 | * 10-Feb-2005 BJD Added CAMIF definition from guillaume.gourat@nexvision.tv | ||
16 | * 10-Mar-2005 LCVR Added support to S3C2400, changed {VA,SZ} names | ||
17 | * 15-Jan-2006 LCVR Added S3C24XX_PA macros for common S3C24XX resources | ||
18 | */ | 11 | */ |
19 | 12 | ||
20 | #ifndef __ASM_ARCH_MAP_H | 13 | #ifndef __ASM_ARCH_MAP_H |
diff --git a/include/asm-arm/arch-s3c2410/memory.h b/include/asm-arm/arch-s3c2410/memory.h index 6ab834a14c8e..4be6a74c4303 100644 --- a/include/asm-arm/arch-s3c2410/memory.h +++ b/include/asm-arm/arch-s3c2410/memory.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* linux/include/asm-arm/arch-s3c2410/memory.h |
2 | * linux/include/asm-arm/arch-s3c2410/memory.h | ||
3 | * | ||
4 | * from linux/include/asm-arm/arch-rpc/memory.h | 2 | * from linux/include/asm-arm/arch-rpc/memory.h |
5 | * | 3 | * |
6 | * Copyright (C) 1996,1997,1998 Russell King. | 4 | * Copyright (C) 1996,1997,1998 Russell King. |
@@ -8,16 +6,6 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
11 | * | ||
12 | * Changelog: | ||
13 | * 20-Oct-1996 RMK Created | ||
14 | * 31-Dec-1997 RMK Fixed definitions to reduce warnings | ||
15 | * 11-Jan-1998 RMK Uninlined to reduce hits on cache | ||
16 | * 08-Feb-1998 RMK Added __virt_to_bus and __bus_to_virt | ||
17 | * 21-Mar-1999 RMK Renamed to memory.h | ||
18 | * RMK Added TASK_SIZE and PAGE_OFFSET | ||
19 | * 05-Apr-2004 BJD Copied and altered for arch-s3c2410 | ||
20 | * 17-Mar-2005 LCVR Modified for S3C2400 | ||
21 | */ | 9 | */ |
22 | 10 | ||
23 | #ifndef __ASM_ARCH_MEMORY_H | 11 | #ifndef __ASM_ARCH_MEMORY_H |
diff --git a/include/asm-arm/arch-s3c2410/nand.h b/include/asm-arm/arch-s3c2410/nand.h index 9148ac045b0d..e350ae2acfc6 100644 --- a/include/asm-arm/arch-s3c2410/nand.h +++ b/include/asm-arm/arch-s3c2410/nand.h | |||
@@ -8,9 +8,6 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | ||
12 | * Changelog: | ||
13 | * 23-Sep-2004 BJD Created file | ||
14 | */ | 11 | */ |
15 | 12 | ||
16 | /* struct s3c2410_nand_set | 13 | /* struct s3c2410_nand_set |
diff --git a/include/asm-arm/arch-s3c2410/osiris-map.h b/include/asm-arm/arch-s3c2410/osiris-map.h index 7c4b0cd2d14d..e2d406218ae5 100644 --- a/include/asm-arm/arch-s3c2410/osiris-map.h +++ b/include/asm-arm/arch-s3c2410/osiris-map.h | |||
@@ -9,8 +9,6 @@ | |||
9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | * | ||
13 | * Changelog: | ||
14 | */ | 12 | */ |
15 | 13 | ||
16 | /* needs arch/map.h including with this */ | 14 | /* needs arch/map.h including with this */ |
diff --git a/include/asm-arm/arch-s3c2410/regs-adc.h b/include/asm-arm/arch-s3c2410/regs-adc.h index 15bfc2f5754e..c7b90b3ecc9e 100644 --- a/include/asm-arm/arch-s3c2410/regs-adc.h +++ b/include/asm-arm/arch-s3c2410/regs-adc.h | |||
@@ -7,9 +7,6 @@ | |||
7 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
8 | * | 8 | * |
9 | * S3C2410 ADC registers | 9 | * S3C2410 ADC registers |
10 | * | ||
11 | * Changelog: | ||
12 | * 27-09-2004 SAH Created file | ||
13 | */ | 10 | */ |
14 | 11 | ||
15 | #ifndef __ASM_ARCH_REGS_ADC_H | 12 | #ifndef __ASM_ARCH_REGS_ADC_H |
diff --git a/include/asm-arm/arch-s3c2410/regs-clock.h b/include/asm-arm/arch-s3c2410/regs-clock.h index a7c61feb8433..b2f4690c0791 100644 --- a/include/asm-arm/arch-s3c2410/regs-clock.h +++ b/include/asm-arm/arch-s3c2410/regs-clock.h | |||
@@ -8,18 +8,6 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | * |
10 | * S3C2410 clock register definitions | 10 | * S3C2410 clock register definitions |
11 | * | ||
12 | * Changelog: | ||
13 | * 18-Aug-2004 Ben Dooks Added 2440 definitions | ||
14 | * 08-Aug-2004 Herbert Pötzl Added CLKCON definitions | ||
15 | * 19-06-2003 Ben Dooks Created file | ||
16 | * 12-03-2004 Ben Dooks Updated include protection | ||
17 | * 29-Sep-2004 Ben Dooks Fixed usage for assembly inclusion | ||
18 | * 10-Feb-2005 Ben Dooks Fixed CAMDIVN address (Guillaume Gourat) | ||
19 | * 10-Mar-2005 Lucas Villa Real Changed S3C2410_VA to S3C24XX_VA | ||
20 | * 27-Aug-2005 Ben Dooks Add clock-slow info | ||
21 | * 20-Oct-2005 Ben Dooks Fixed overflow in PLL (Guillaume Gourat) | ||
22 | * 20-Oct-2005 Ben Dooks Add masks for DCLK (Guillaume Gourat) | ||
23 | */ | 11 | */ |
24 | 12 | ||
25 | #ifndef __ASM_ARM_REGS_CLOCK | 13 | #ifndef __ASM_ARM_REGS_CLOCK |
diff --git a/include/asm-arm/arch-s3c2410/regs-gpio.h b/include/asm-arm/arch-s3c2410/regs-gpio.h index 6dd17f0f84e0..93c49432db95 100644 --- a/include/asm-arm/arch-s3c2410/regs-gpio.h +++ b/include/asm-arm/arch-s3c2410/regs-gpio.h | |||
@@ -8,21 +8,6 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | * |
10 | * S3C2410 GPIO register definitions | 10 | * S3C2410 GPIO register definitions |
11 | * | ||
12 | * Changelog: | ||
13 | * 19-06-2003 BJD Created file | ||
14 | * 23-06-2003 BJD Updated GSTATUS registers | ||
15 | * 12-03-2004 BJD Updated include protection | ||
16 | * 20-07-2004 BJD Added GPIO pin numbers, added Port A definitions | ||
17 | * 04-10-2004 BJD Fixed number of bugs, added EXT IRQ filter defs | ||
18 | * 17-10-2004 BJD Added GSTATUS1 register definitions | ||
19 | * 18-11-2004 BJD Fixed definitions of GPE3, GPE4, GPE5 and GPE6 | ||
20 | * 18-11-2004 BJD Added S3C2440 AC97 controls | ||
21 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
22 | * 28-Mar-2005 LCVR Fixed definition of GPB10 | ||
23 | * 26-Oct-2005 BJD Added generic configuration types | ||
24 | * 27-Nov-2005 LCVR Added definitions to S3C2400 registers | ||
25 | * 15-Jan-2006 LCVR Written S3C24XX_GPIO_BASE() macro | ||
26 | */ | 11 | */ |
27 | 12 | ||
28 | 13 | ||
diff --git a/include/asm-arm/arch-s3c2410/regs-gpioj.h b/include/asm-arm/arch-s3c2410/regs-gpioj.h index 18edae50d0b8..91cefa260497 100644 --- a/include/asm-arm/arch-s3c2410/regs-gpioj.h +++ b/include/asm-arm/arch-s3c2410/regs-gpioj.h | |||
@@ -8,10 +8,6 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | * |
10 | * S3C2440 GPIO J register definitions | 10 | * S3C2440 GPIO J register definitions |
11 | * | ||
12 | * Changelog: | ||
13 | * 11-Aug-2004 BJD Created file | ||
14 | * 10-Feb-2005 BJD Fix GPJ12 definition (Guillaume Gourat) | ||
15 | */ | 11 | */ |
16 | 12 | ||
17 | 13 | ||
diff --git a/include/asm-arm/arch-s3c2410/regs-iic.h b/include/asm-arm/arch-s3c2410/regs-iic.h index fed3288e2046..2ae29522f253 100644 --- a/include/asm-arm/arch-s3c2410/regs-iic.h +++ b/include/asm-arm/arch-s3c2410/regs-iic.h | |||
@@ -8,10 +8,6 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | * |
10 | * S3C2410 I2C Controller | 10 | * S3C2410 I2C Controller |
11 | * | ||
12 | * Changelog: | ||
13 | * 03-Oct-2004 BJD Initial include for Linux | ||
14 | * 08-Nov-2004 BJD Added S3C2440 filter register | ||
15 | */ | 11 | */ |
16 | 12 | ||
17 | #ifndef __ASM_ARCH_REGS_IIC_H | 13 | #ifndef __ASM_ARCH_REGS_IIC_H |
diff --git a/include/asm-arm/arch-s3c2410/regs-iis.h b/include/asm-arm/arch-s3c2410/regs-iis.h index 7fdde9b91cb4..72cd2509822e 100644 --- a/include/asm-arm/arch-s3c2410/regs-iis.h +++ b/include/asm-arm/arch-s3c2410/regs-iis.h | |||
@@ -8,17 +8,7 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | * |
10 | * S3C2410 IIS register definition | 10 | * S3C2410 IIS register definition |
11 | * | 11 | */ |
12 | * Changelog: | ||
13 | * 19-06-2003 BJD Created file | ||
14 | * 26-06-2003 BJD Finished off definitions for register addresses | ||
15 | * 12-03-2004 BJD Updated include protection | ||
16 | * 07-03-2005 BJD Added FIFO size flags and S3C2440 MPLL | ||
17 | * 05-04-2005 LCVR Added IISFCON definitions for the S3C2400 | ||
18 | * 18-07-2005 DA Change IISCON_MPLL to IISMOD_MPLL | ||
19 | * Correct IISMOD_256FS and IISMOD_384FS | ||
20 | * Add IISCON_PSCEN | ||
21 | */ | ||
22 | 12 | ||
23 | #ifndef __ASM_ARCH_REGS_IIS_H | 13 | #ifndef __ASM_ARCH_REGS_IIS_H |
24 | #define __ASM_ARCH_REGS_IIS_H | 14 | #define __ASM_ARCH_REGS_IIS_H |
diff --git a/include/asm-arm/arch-s3c2410/regs-irq.h b/include/asm-arm/arch-s3c2410/regs-irq.h index 572fca5d9acf..29fb8ef670f0 100644 --- a/include/asm-arm/arch-s3c2410/regs-irq.h +++ b/include/asm-arm/arch-s3c2410/regs-irq.h | |||
@@ -6,14 +6,7 @@ | |||
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | */ |
10 | * | ||
11 | * | ||
12 | * Changelog: | ||
13 | * 19-06-2003 BJD Created file | ||
14 | * 12-03-2004 BJD Updated include protection | ||
15 | * 10-03-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
16 | */ | ||
17 | 10 | ||
18 | 11 | ||
19 | #ifndef ___ASM_ARCH_REGS_IRQ_H | 12 | #ifndef ___ASM_ARCH_REGS_IRQ_H |
diff --git a/include/asm-arm/arch-s3c2410/regs-lcd.h b/include/asm-arm/arch-s3c2410/regs-lcd.h index b6b1b4e8bbeb..b306d6e3135d 100644 --- a/include/asm-arm/arch-s3c2410/regs-lcd.h +++ b/include/asm-arm/arch-s3c2410/regs-lcd.h | |||
@@ -6,14 +6,6 @@ | |||
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | ||
10 | * | ||
11 | * | ||
12 | * Changelog: | ||
13 | * 12-06-2003 BJD Created file | ||
14 | * 26-06-2003 BJD Updated LCDCON register definitions | ||
15 | * 12-03-2004 BJD Updated include protection | ||
16 | * 10-03-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
17 | */ | 9 | */ |
18 | 10 | ||
19 | 11 | ||
diff --git a/include/asm-arm/arch-s3c2410/regs-mem.h b/include/asm-arm/arch-s3c2410/regs-mem.h index a2d7d0cec042..375dca50364e 100644 --- a/include/asm-arm/arch-s3c2410/regs-mem.h +++ b/include/asm-arm/arch-s3c2410/regs-mem.h | |||
@@ -8,12 +8,6 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | * |
10 | * S3C2410 Memory Control register definitions | 10 | * S3C2410 Memory Control register definitions |
11 | * | ||
12 | * Changelog: | ||
13 | * 29-Sep-2004 BJD Initial include for Linux | ||
14 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
15 | * 04-Apr-2005 LCVR Added S3C2400 DRAM/BANKSIZE_MASK definitions | ||
16 | * | ||
17 | */ | 11 | */ |
18 | 12 | ||
19 | #ifndef __ASM_ARM_MEMREGS_H | 13 | #ifndef __ASM_ARM_MEMREGS_H |
diff --git a/include/asm-arm/arch-s3c2410/regs-nand.h b/include/asm-arm/arch-s3c2410/regs-nand.h index c1470c695c33..b824d371ae0b 100644 --- a/include/asm-arm/arch-s3c2410/regs-nand.h +++ b/include/asm-arm/arch-s3c2410/regs-nand.h | |||
@@ -8,10 +8,6 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | * |
10 | * S3C2410 NAND register definitions | 10 | * S3C2410 NAND register definitions |
11 | * | ||
12 | * Changelog: | ||
13 | * 18-Aug-2004 BJD Copied file from 2.4 and updated | ||
14 | * 01-May-2005 BJD Added definitions for s3c2440 controller | ||
15 | */ | 11 | */ |
16 | 12 | ||
17 | #ifndef __ASM_ARM_REGS_NAND | 13 | #ifndef __ASM_ARM_REGS_NAND |
diff --git a/include/asm-arm/arch-s3c2410/regs-rtc.h b/include/asm-arm/arch-s3c2410/regs-rtc.h index 0fbec07bb6b8..cd88fd634d12 100644 --- a/include/asm-arm/arch-s3c2410/regs-rtc.h +++ b/include/asm-arm/arch-s3c2410/regs-rtc.h | |||
@@ -8,11 +8,6 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | * |
10 | * S3C2410 Internal RTC register definition | 10 | * S3C2410 Internal RTC register definition |
11 | * | ||
12 | * Changelog: | ||
13 | * 19-06-2003 BJD Created file | ||
14 | * 12-03-2004 BJD Updated include protection | ||
15 | * 15-01-2005 LCVR Changed S3C2410_VA to S3C24XX_VA (s3c2400 support) | ||
16 | */ | 11 | */ |
17 | 12 | ||
18 | #ifndef __ASM_ARCH_REGS_RTC_H | 13 | #ifndef __ASM_ARCH_REGS_RTC_H |
diff --git a/include/asm-arm/arch-s3c2410/regs-sdi.h b/include/asm-arm/arch-s3c2410/regs-sdi.h index ca9a26fbecec..06e716e5b46d 100644 --- a/include/asm-arm/arch-s3c2410/regs-sdi.h +++ b/include/asm-arm/arch-s3c2410/regs-sdi.h | |||
@@ -8,11 +8,6 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | * |
10 | * S3C2410 MMC/SDIO register definitions | 10 | * S3C2410 MMC/SDIO register definitions |
11 | * | ||
12 | * Changelog: | ||
13 | * 18-Aug-2004 Ben Dooks Created initial file | ||
14 | * 29-Nov-2004 Koen Martens Added some missing defines, fixed duplicates | ||
15 | * 29-Nov-2004 Ben Dooks Updated Koen's patch | ||
16 | */ | 11 | */ |
17 | 12 | ||
18 | #ifndef __ASM_ARM_REGS_SDI | 13 | #ifndef __ASM_ARM_REGS_SDI |
diff --git a/include/asm-arm/arch-s3c2410/regs-serial.h b/include/asm-arm/arch-s3c2410/regs-serial.h index 93f651ae2967..19c77da9c3fe 100644 --- a/include/asm-arm/arch-s3c2410/regs-serial.h +++ b/include/asm-arm/arch-s3c2410/regs-serial.h | |||
@@ -27,10 +27,7 @@ | |||
27 | * You should have received a copy of the GNU General Public License | 27 | * You should have received a copy of the GNU General Public License |
28 | * along with this program; if not, write to the Free Software | 28 | * along with this program; if not, write to the Free Software |
29 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 29 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
30 | * | 30 | */ |
31 | * Modifications: | ||
32 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA (s3c2400 support) | ||
33 | */ | ||
34 | 31 | ||
35 | #ifndef __ASM_ARM_REGS_SERIAL_H | 32 | #ifndef __ASM_ARM_REGS_SERIAL_H |
36 | #define __ASM_ARM_REGS_SERIAL_H | 33 | #define __ASM_ARM_REGS_SERIAL_H |
diff --git a/include/asm-arm/arch-s3c2410/regs-spi.h b/include/asm-arm/arch-s3c2410/regs-spi.h index 338217858c73..3552280d1e8f 100644 --- a/include/asm-arm/arch-s3c2410/regs-spi.h +++ b/include/asm-arm/arch-s3c2410/regs-spi.h | |||
@@ -7,13 +7,7 @@ | |||
7 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
8 | * | 8 | * |
9 | * S3C2410 SPI register definition | 9 | * S3C2410 SPI register definition |
10 | * | 10 | */ |
11 | * Changelog: | ||
12 | * 20-04-2004 KF Created file | ||
13 | * 04-10-2004 BJD Removed VA address (no longer mapped) | ||
14 | * tidied file for submission | ||
15 | * 03-04-2005 LCVR Added S3C2400_SPPIN_nCS definition | ||
16 | */ | ||
17 | 11 | ||
18 | #ifndef __ASM_ARCH_REGS_SPI_H | 12 | #ifndef __ASM_ARCH_REGS_SPI_H |
19 | #define __ASM_ARCH_REGS_SPI_H | 13 | #define __ASM_ARCH_REGS_SPI_H |
diff --git a/include/asm-arm/arch-s3c2410/regs-timer.h b/include/asm-arm/arch-s3c2410/regs-timer.h index 169064e27520..731918e77831 100644 --- a/include/asm-arm/arch-s3c2410/regs-timer.h +++ b/include/asm-arm/arch-s3c2410/regs-timer.h | |||
@@ -8,13 +8,6 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | * |
10 | * S3C2410 Timer configuration | 10 | * S3C2410 Timer configuration |
11 | * | ||
12 | * Changelog: | ||
13 | * 05-06-2003 BJD Created file | ||
14 | * 26-06-2003 BJD Added more timer definitions to mux / control | ||
15 | * 12-03-2004 BJD Updated include protection | ||
16 | * 10-02-2005 BJD Added S3C2410_TCFG1_MUX4_SHIFT (Guillaume Gourat) | ||
17 | * 10-03-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
18 | */ | 11 | */ |
19 | 12 | ||
20 | 13 | ||
diff --git a/include/asm-arm/arch-s3c2410/regs-udc.h b/include/asm-arm/arch-s3c2410/regs-udc.h index bf315b763252..3aa31a27da1a 100644 --- a/include/asm-arm/arch-s3c2410/regs-udc.h +++ b/include/asm-arm/arch-s3c2410/regs-udc.h | |||
@@ -6,13 +6,7 @@ | |||
6 | * modify it under the terms of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
7 | * published by the Free Software Foundation; either version 2 of | 7 | * published by the Free Software Foundation; either version 2 of |
8 | * the License, or (at your option) any later version. | 8 | * the License, or (at your option) any later version. |
9 | * | 9 | */ |
10 | * Changelog: | ||
11 | * 01-08-2004 Initial creation | ||
12 | * 12-09-2004 Cleanup for submission | ||
13 | * 24-10-2004 Fixed S3C2410_UDC_MAXP_REG definition | ||
14 | * 10-03-2005 Changed S3C2410_VA to S3C24XX_VA | ||
15 | */ | ||
16 | 10 | ||
17 | #ifndef __ASM_ARCH_REGS_UDC_H | 11 | #ifndef __ASM_ARCH_REGS_UDC_H |
18 | #define __ASM_ARCH_REGS_UDC_H | 12 | #define __ASM_ARCH_REGS_UDC_H |
diff --git a/include/asm-arm/arch-s3c2410/regs-watchdog.h b/include/asm-arm/arch-s3c2410/regs-watchdog.h index d199ca6aff22..f4fff448c7bd 100644 --- a/include/asm-arm/arch-s3c2410/regs-watchdog.h +++ b/include/asm-arm/arch-s3c2410/regs-watchdog.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* linux/include/asm/arch-s3c2410/regs0watchdog.h | 1 | /* linux/include/asm/arch-s3c2410/regs-watchdog.h |
2 | * | 2 | * |
3 | * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk> | 3 | * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk> |
4 | * http://www.simtec.co.uk/products/SWLINUX/ | 4 | * http://www.simtec.co.uk/products/SWLINUX/ |
@@ -8,11 +8,6 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | * |
10 | * S3C2410 Watchdog timer control | 10 | * S3C2410 Watchdog timer control |
11 | * | ||
12 | * Changelog: | ||
13 | * 21-06-2003 BJD Created file | ||
14 | * 12-03-2004 BJD Updated include protection | ||
15 | * 10-03-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
16 | */ | 11 | */ |
17 | 12 | ||
18 | 13 | ||
diff --git a/include/asm-arm/arch-s3c2410/system.h b/include/asm-arm/arch-s3c2410/system.h index 9b0d85024cb4..718246d85952 100644 --- a/include/asm-arm/arch-s3c2410/system.h +++ b/include/asm-arm/arch-s3c2410/system.h | |||
@@ -8,14 +8,7 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | 11 | */ |
12 | * Changelog: | ||
13 | * 12-May-2003 BJD Created file | ||
14 | * 14-May-2003 BJD Removed idle to aid debugging | ||
15 | * 12-Jun-2003 BJD Added reset via watchdog | ||
16 | * 04-Sep-2003 BJD Moved to v2.6 | ||
17 | * 28-Oct-2004 BJD Added over-ride for idle, and fixed reset panic() | ||
18 | */ | ||
19 | 12 | ||
20 | #include <asm/hardware.h> | 13 | #include <asm/hardware.h> |
21 | #include <asm/io.h> | 14 | #include <asm/io.h> |
diff --git a/include/asm-arm/arch-s3c2410/timex.h b/include/asm-arm/arch-s3c2410/timex.h index 3558a3a750bf..703c337c5617 100644 --- a/include/asm-arm/arch-s3c2410/timex.h +++ b/include/asm-arm/arch-s3c2410/timex.h | |||
@@ -8,12 +8,6 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | ||
12 | * Changelog: | ||
13 | * 02-Sep-2003 BJD Created file | ||
14 | * 05-Jan-2004 BJD Updated for Linux 2.6.0 | ||
15 | * 22-Nov-2004 BJD Fixed CLOCK_TICK_RATE | ||
16 | * 10-Jan-2004 BJD Removed s3c2410_clock_tick_rate | ||
17 | */ | 11 | */ |
18 | 12 | ||
19 | #ifndef __ASM_ARCH_TIMEX_H | 13 | #ifndef __ASM_ARCH_TIMEX_H |
diff --git a/include/asm-arm/arch-s3c2410/uncompress.h b/include/asm-arm/arch-s3c2410/uncompress.h index 8e152a05e533..81b3e91c56ab 100644 --- a/include/asm-arm/arch-s3c2410/uncompress.h +++ b/include/asm-arm/arch-s3c2410/uncompress.h | |||
@@ -8,15 +8,6 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | ||
12 | * Changelog: | ||
13 | * 22-May-2003 BJD Created | ||
14 | * 08-Sep-2003 BJD Moved to linux v2.6 | ||
15 | * 12-Mar-2004 BJD Updated header protection | ||
16 | * 12-Oct-2004 BJD Take account of debug uart configuration | ||
17 | * 15-Nov-2004 BJD Fixed uart configuration | ||
18 | * 22-Feb-2005 BJD Added watchdog to uncompress | ||
19 | * 04-Apr-2005 LCVR Added support to S3C2400 (no cpuid at GSTATUS1) | ||
20 | */ | 11 | */ |
21 | 12 | ||
22 | #ifndef __ASM_ARCH_UNCOMPRESS_H | 13 | #ifndef __ASM_ARCH_UNCOMPRESS_H |
diff --git a/include/asm-arm/arch-s3c2410/usb-control.h b/include/asm-arm/arch-s3c2410/usb-control.h index bd43b566db3e..35723569a17a 100644 --- a/include/asm-arm/arch-s3c2410/usb-control.h +++ b/include/asm-arm/arch-s3c2410/usb-control.h | |||
@@ -8,11 +8,6 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | ||
12 | * Changelog: | ||
13 | * 11-Sep-2004 BJD Created file | ||
14 | * 21-Sep-2004 BJD Updated port info | ||
15 | * 09-Aug-2005 BJD Renamed s3c2410_report_oc s3c2410_usb_report_oc | ||
16 | */ | 11 | */ |
17 | 12 | ||
18 | #ifndef __ASM_ARCH_USBCONTROL_H | 13 | #ifndef __ASM_ARCH_USBCONTROL_H |
diff --git a/include/asm-arm/arch-s3c2410/vmalloc.h b/include/asm-arm/arch-s3c2410/vmalloc.h index 33963cd5461b..0ae3bdb7e03b 100644 --- a/include/asm-arm/arch-s3c2410/vmalloc.h +++ b/include/asm-arm/arch-s3c2410/vmalloc.h | |||
@@ -10,11 +10,7 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | 11 | * |
12 | * S3C2410 vmalloc definition | 12 | * S3C2410 vmalloc definition |
13 | * | 13 | */ |
14 | * Changelog: | ||
15 | * 12-Mar-2004 BJD Fixed header, added include protection | ||
16 | * 12=Mar-2004 BJD Fixed VMALLOC_END definitions | ||
17 | */ | ||
18 | 14 | ||
19 | #ifndef __ASM_ARCH_VMALLOC_H | 15 | #ifndef __ASM_ARCH_VMALLOC_H |
20 | #define __ASM_ARCH_VMALLOC_H | 16 | #define __ASM_ARCH_VMALLOC_H |
diff --git a/include/asm-arm/arch-s3c2410/vr1000-cpld.h b/include/asm-arm/arch-s3c2410/vr1000-cpld.h index 0ee373ac60d4..a341b1e1bd98 100644 --- a/include/asm-arm/arch-s3c2410/vr1000-cpld.h +++ b/include/asm-arm/arch-s3c2410/vr1000-cpld.h | |||
@@ -8,10 +8,6 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | ||
12 | * Changelog: | ||
13 | * 25-May-2003 BJD Created file, added CTRL1 registers | ||
14 | * 19-Mar-2004 BJD Added VR1000 CPLD definitions | ||
15 | */ | 11 | */ |
16 | 12 | ||
17 | #ifndef __ASM_ARCH_VR1000CPLD_H | 13 | #ifndef __ASM_ARCH_VR1000CPLD_H |
diff --git a/include/asm-arm/arch-s3c2410/vr1000-irq.h b/include/asm-arm/arch-s3c2410/vr1000-irq.h index 694f7715d2da..c39a0ffa670d 100644 --- a/include/asm-arm/arch-s3c2410/vr1000-irq.h +++ b/include/asm-arm/arch-s3c2410/vr1000-irq.h | |||
@@ -8,11 +8,7 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | 11 | */ |
12 | * Changelog: | ||
13 | * 06-Jan-2003 BJD Linux 2.6.0 version | ||
14 | * 19-Mar-2004 BJD Updates for VR1000 | ||
15 | */ | ||
16 | 12 | ||
17 | #ifndef __ASM_ARCH_VR1000IRQ_H | 13 | #ifndef __ASM_ARCH_VR1000IRQ_H |
18 | #define __ASM_ARCH_VR1000IRQ_H | 14 | #define __ASM_ARCH_VR1000IRQ_H |
diff --git a/include/asm-arm/arch-s3c2410/vr1000-map.h b/include/asm-arm/arch-s3c2410/vr1000-map.h index 867c9355fd39..1fe4db36c834 100644 --- a/include/asm-arm/arch-s3c2410/vr1000-map.h +++ b/include/asm-arm/arch-s3c2410/vr1000-map.h | |||
@@ -8,12 +8,6 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | ||
12 | * Changelog: | ||
13 | * 06-Jan-2003 BJD Linux 2.6.0 version, split specifics from arch/map.h | ||
14 | * 12-Mar-2004 BJD Fixed header include protection | ||
15 | * 19-Mar-2004 BJD Copied to VR1000 machine headers. | ||
16 | * 19-Jan-2005 BJD Updated map definitions | ||
17 | */ | 11 | */ |
18 | 12 | ||
19 | /* needs arch/map.h including with this */ | 13 | /* needs arch/map.h including with this */ |
diff --git a/include/asm-arm/spinlock.h b/include/asm-arm/spinlock.h index e2f1d75171df..01b7c26a3038 100644 --- a/include/asm-arm/spinlock.h +++ b/include/asm-arm/spinlock.h | |||
@@ -201,7 +201,7 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw) | |||
201 | 201 | ||
202 | static inline int __raw_read_trylock(raw_rwlock_t *rw) | 202 | static inline int __raw_read_trylock(raw_rwlock_t *rw) |
203 | { | 203 | { |
204 | unsigned long tmp tmp2 = 1; | 204 | unsigned long tmp, tmp2 = 1; |
205 | 205 | ||
206 | __asm__ __volatile__( | 206 | __asm__ __volatile__( |
207 | "1: ldrex %0, [%2]\n" | 207 | "1: ldrex %0, [%2]\n" |
diff --git a/include/asm-generic/audit_read.h b/include/asm-generic/audit_read.h new file mode 100644 index 000000000000..0e87464d9847 --- /dev/null +++ b/include/asm-generic/audit_read.h | |||
@@ -0,0 +1,8 @@ | |||
1 | __NR_readlink, | ||
2 | __NR_quotactl, | ||
3 | __NR_listxattr, | ||
4 | __NR_llistxattr, | ||
5 | __NR_flistxattr, | ||
6 | __NR_getxattr, | ||
7 | __NR_lgetxattr, | ||
8 | __NR_fgetxattr, | ||
diff --git a/include/asm-generic/audit_write.h b/include/asm-generic/audit_write.h new file mode 100644 index 000000000000..f10d367fb2a5 --- /dev/null +++ b/include/asm-generic/audit_write.h | |||
@@ -0,0 +1,11 @@ | |||
1 | #include <asm-generic/audit_dir_write.h> | ||
2 | __NR_acct, | ||
3 | __NR_swapon, | ||
4 | __NR_quotactl, | ||
5 | __NR_truncate, | ||
6 | #ifdef __NR_truncate64 | ||
7 | __NR_truncate64, | ||
8 | #endif | ||
9 | #ifdef __NR_bind | ||
10 | __NR_bind, /* bind can affect fs object only in one way... */ | ||
11 | #endif | ||
diff --git a/include/asm-i386/Kbuild b/include/asm-i386/Kbuild index c064a8e9170f..335b2fa4e066 100644 --- a/include/asm-i386/Kbuild +++ b/include/asm-i386/Kbuild | |||
@@ -1,5 +1,5 @@ | |||
1 | include include/asm-generic/Kbuild.asm | 1 | include include/asm-generic/Kbuild.asm |
2 | 2 | ||
3 | header-y += boot.h cpufeature.h debugreg.h ldt.h setup.h ucontext.h | 3 | header-y += boot.h debugreg.h ldt.h setup.h ucontext.h |
4 | 4 | ||
5 | unifdef-y += mtrr.h vm86.h | 5 | unifdef-y += mtrr.h vm86.h |
diff --git a/include/asm-ia64/mman.h b/include/asm-ia64/mman.h index 6ba179f12718..c73b87832a1e 100644 --- a/include/asm-ia64/mman.h +++ b/include/asm-ia64/mman.h | |||
@@ -22,4 +22,12 @@ | |||
22 | #define MCL_CURRENT 1 /* lock all current mappings */ | 22 | #define MCL_CURRENT 1 /* lock all current mappings */ |
23 | #define MCL_FUTURE 2 /* lock all future mappings */ | 23 | #define MCL_FUTURE 2 /* lock all future mappings */ |
24 | 24 | ||
25 | #ifdef __KERNEL__ | ||
26 | #ifndef __ASSEMBLY__ | ||
27 | #define arch_mmap_check ia64_mmap_check | ||
28 | int ia64_mmap_check(unsigned long addr, unsigned long len, | ||
29 | unsigned long flags); | ||
30 | #endif | ||
31 | #endif | ||
32 | |||
25 | #endif /* _ASM_IA64_MMAN_H */ | 33 | #endif /* _ASM_IA64_MMAN_H */ |
diff --git a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h index bb0eb727dcd0..f581662c5ab8 100644 --- a/include/asm-ia64/unistd.h +++ b/include/asm-ia64/unistd.h | |||
@@ -286,8 +286,7 @@ | |||
286 | /* 1294, 1295 reserved for pselect/ppoll */ | 286 | /* 1294, 1295 reserved for pselect/ppoll */ |
287 | #define __NR_unshare 1296 | 287 | #define __NR_unshare 1296 |
288 | #define __NR_splice 1297 | 288 | #define __NR_splice 1297 |
289 | #define __NR_set_robust_list 1298 | 289 | /* 1298, 1299 reserved for set_robust_list/get_robust_list */ |
290 | #define __NR_get_robust_list 1299 | ||
291 | #define __NR_sync_file_range 1300 | 290 | #define __NR_sync_file_range 1300 |
292 | #define __NR_tee 1301 | 291 | #define __NR_tee 1301 |
293 | #define __NR_vmsplice 1302 | 292 | #define __NR_vmsplice 1302 |
diff --git a/include/asm-sh/page.h b/include/asm-sh/page.h index a5559e38744e..5a057b00f19a 100644 --- a/include/asm-sh/page.h +++ b/include/asm-sh/page.h | |||
@@ -104,7 +104,7 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
104 | 104 | ||
105 | /* PFN start number, because of __MEMORY_START */ | 105 | /* PFN start number, because of __MEMORY_START */ |
106 | #define PFN_START (__MEMORY_START >> PAGE_SHIFT) | 106 | #define PFN_START (__MEMORY_START >> PAGE_SHIFT) |
107 | #define ARCH_PFN_OFFSET (FPN_START) | 107 | #define ARCH_PFN_OFFSET (PFN_START) |
108 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) | 108 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) |
109 | #define pfn_valid(pfn) (((pfn) - PFN_START) < max_mapnr) | 109 | #define pfn_valid(pfn) (((pfn) - PFN_START) < max_mapnr) |
110 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) | 110 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) |
diff --git a/include/asm-sh64/bug.h b/include/asm-sh64/bug.h index 81f722efeb63..f3a9c9248ef4 100644 --- a/include/asm-sh64/bug.h +++ b/include/asm-sh64/bug.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef __ASM_SH64_BUG_H | 1 | #ifndef __ASM_SH64_BUG_H |
2 | #define __ASM_SH64_BUG_H | 2 | #define __ASM_SH64_BUG_H |
3 | 3 | ||
4 | 4 | #ifdef CONFIG_BUG | |
5 | /* | 5 | /* |
6 | * Tell the user there is some problem, then force a segfault (in process | 6 | * Tell the user there is some problem, then force a segfault (in process |
7 | * context) or a panic (interrupt context). | 7 | * context) or a panic (interrupt context). |
@@ -11,17 +11,9 @@ | |||
11 | *(volatile int *)0 = 0; \ | 11 | *(volatile int *)0 = 0; \ |
12 | } while (0) | 12 | } while (0) |
13 | 13 | ||
14 | #define BUG_ON(condition) do { \ | 14 | #define HAVE_ARCH_BUG |
15 | if (unlikely((condition)!=0)) \ | 15 | #endif |
16 | BUG(); \ | ||
17 | } while(0) | ||
18 | 16 | ||
19 | #define WARN_ON(condition) do { \ | 17 | #include <asm-generic/bug.h> |
20 | if (unlikely((condition)!=0)) { \ | ||
21 | printk("Badness in %s at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); \ | ||
22 | dump_stack(); \ | ||
23 | } \ | ||
24 | } while (0) | ||
25 | 18 | ||
26 | #endif /* __ASM_SH64_BUG_H */ | 19 | #endif /* __ASM_SH64_BUG_H */ |
27 | |||
diff --git a/include/asm-sh64/byteorder.h b/include/asm-sh64/byteorder.h index f602ebe334eb..7419d78820ee 100644 --- a/include/asm-sh64/byteorder.h +++ b/include/asm-sh64/byteorder.h | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | #include <asm/types.h> | 15 | #include <asm/types.h> |
16 | 16 | ||
17 | static __inline__ __const__ __u32 ___arch__swab32(__u32 x) | 17 | static inline __attribute_const__ __u32 ___arch__swab32(__u32 x) |
18 | { | 18 | { |
19 | __asm__("byterev %0, %0\n\t" | 19 | __asm__("byterev %0, %0\n\t" |
20 | "shari %0, 32, %0" | 20 | "shari %0, 32, %0" |
@@ -23,7 +23,7 @@ static __inline__ __const__ __u32 ___arch__swab32(__u32 x) | |||
23 | return x; | 23 | return x; |
24 | } | 24 | } |
25 | 25 | ||
26 | static __inline__ __const__ __u16 ___arch__swab16(__u16 x) | 26 | static inline __attribute_const__ __u16 ___arch__swab16(__u16 x) |
27 | { | 27 | { |
28 | __asm__("byterev %0, %0\n\t" | 28 | __asm__("byterev %0, %0\n\t" |
29 | "shari %0, 48, %0" | 29 | "shari %0, 48, %0" |
diff --git a/include/asm-sh64/dma-mapping.h b/include/asm-sh64/dma-mapping.h index a74a49e47922..68e27a8fca31 100644 --- a/include/asm-sh64/dma-mapping.h +++ b/include/asm-sh64/dma-mapping.h | |||
@@ -126,22 +126,30 @@ static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg, | |||
126 | static inline void dma_sync_single_for_cpu(struct device *dev, | 126 | static inline void dma_sync_single_for_cpu(struct device *dev, |
127 | dma_addr_t dma_handle, size_t size, | 127 | dma_addr_t dma_handle, size_t size, |
128 | enum dma_data_direction dir) | 128 | enum dma_data_direction dir) |
129 | __attribute__ ((alias("dma_sync_single"))); | 129 | { |
130 | dma_sync_single(dev, dma_handle, size, dir); | ||
131 | } | ||
130 | 132 | ||
131 | static inline void dma_sync_single_for_device(struct device *dev, | 133 | static inline void dma_sync_single_for_device(struct device *dev, |
132 | dma_addr_t dma_handle, size_t size, | 134 | dma_addr_t dma_handle, size_t size, |
133 | enum dma_data_direction dir) | 135 | enum dma_data_direction dir) |
134 | __attribute__ ((alias("dma_sync_single"))); | 136 | { |
137 | dma_sync_single(dev, dma_handle, size, dir); | ||
138 | } | ||
135 | 139 | ||
136 | static inline void dma_sync_sg_for_cpu(struct device *dev, | 140 | static inline void dma_sync_sg_for_cpu(struct device *dev, |
137 | struct scatterlist *sg, int nelems, | 141 | struct scatterlist *sg, int nelems, |
138 | enum dma_data_direction dir) | 142 | enum dma_data_direction dir) |
139 | __attribute__ ((alias("dma_sync_sg"))); | 143 | { |
144 | dma_sync_sg(dev, sg, nelems, dir); | ||
145 | } | ||
140 | 146 | ||
141 | static inline void dma_sync_sg_for_device(struct device *dev, | 147 | static inline void dma_sync_sg_for_device(struct device *dev, |
142 | struct scatterlist *sg, int nelems, | 148 | struct scatterlist *sg, int nelems, |
143 | enum dma_data_direction dir) | 149 | enum dma_data_direction dir) |
144 | __attribute__ ((alias("dma_sync_sg"))); | 150 | { |
151 | dma_sync_sg(dev, sg, nelems, dir); | ||
152 | } | ||
145 | 153 | ||
146 | static inline int dma_get_cache_alignment(void) | 154 | static inline int dma_get_cache_alignment(void) |
147 | { | 155 | { |
diff --git a/include/asm-sh64/io.h b/include/asm-sh64/io.h index dee4f77929a4..252fedbb6621 100644 --- a/include/asm-sh64/io.h +++ b/include/asm-sh64/io.h | |||
@@ -123,6 +123,13 @@ void insw(unsigned long port, void *addr, unsigned long count); | |||
123 | void outsl(unsigned long port, const void *addr, unsigned long count); | 123 | void outsl(unsigned long port, const void *addr, unsigned long count); |
124 | void insl(unsigned long port, void *addr, unsigned long count); | 124 | void insl(unsigned long port, void *addr, unsigned long count); |
125 | 125 | ||
126 | #define __raw_readb readb | ||
127 | #define __raw_readw readw | ||
128 | #define __raw_readl readl | ||
129 | #define __raw_writeb writeb | ||
130 | #define __raw_writew writew | ||
131 | #define __raw_writel writel | ||
132 | |||
126 | void memcpy_toio(void __iomem *to, const void *from, long count); | 133 | void memcpy_toio(void __iomem *to, const void *from, long count); |
127 | void memcpy_fromio(void *to, void __iomem *from, long count); | 134 | void memcpy_fromio(void *to, void __iomem *from, long count); |
128 | 135 | ||
diff --git a/include/asm-sh64/ptrace.h b/include/asm-sh64/ptrace.h index 56190f521587..a6d4da519db6 100644 --- a/include/asm-sh64/ptrace.h +++ b/include/asm-sh64/ptrace.h | |||
@@ -28,7 +28,7 @@ struct pt_regs { | |||
28 | #ifdef __KERNEL__ | 28 | #ifdef __KERNEL__ |
29 | #define user_mode(regs) (((regs)->sr & 0x40000000)==0) | 29 | #define user_mode(regs) (((regs)->sr & 0x40000000)==0) |
30 | #define instruction_pointer(regs) ((regs)->pc) | 30 | #define instruction_pointer(regs) ((regs)->pc) |
31 | #define profile_pc(regs) instruction_pointer(regs) | 31 | #define profile_pc(regs) ((unsigned long)instruction_pointer(regs)) |
32 | extern void show_regs(struct pt_regs *); | 32 | extern void show_regs(struct pt_regs *); |
33 | #endif | 33 | #endif |
34 | 34 | ||
diff --git a/include/asm-sh64/system.h b/include/asm-sh64/system.h index 87ef6f1ad5a4..b1598c26fcb0 100644 --- a/include/asm-sh64/system.h +++ b/include/asm-sh64/system.h | |||
@@ -64,7 +64,7 @@ extern void __xchg_called_with_bad_pointer(void); | |||
64 | #define smp_read_barrier_depends() do { } while (0) | 64 | #define smp_read_barrier_depends() do { } while (0) |
65 | #endif /* CONFIG_SMP */ | 65 | #endif /* CONFIG_SMP */ |
66 | 66 | ||
67 | #define set_rmb(var, value) do { xchg(&var, value); } while (0) | 67 | #define set_rmb(var, value) do { (void)xchg(&var, value); } while (0) |
68 | #define set_mb(var, value) set_rmb(var, value) | 68 | #define set_mb(var, value) set_rmb(var, value) |
69 | 69 | ||
70 | /* Interrupt Control */ | 70 | /* Interrupt Control */ |
diff --git a/include/asm-sh64/uaccess.h b/include/asm-sh64/uaccess.h index f4936d8fa617..644c67b65f94 100644 --- a/include/asm-sh64/uaccess.h +++ b/include/asm-sh64/uaccess.h | |||
@@ -128,25 +128,20 @@ do { \ | |||
128 | 128 | ||
129 | #define __get_user_nocheck(x,ptr,size) \ | 129 | #define __get_user_nocheck(x,ptr,size) \ |
130 | ({ \ | 130 | ({ \ |
131 | long __gu_addr = (long)(ptr); \ | 131 | long __gu_err, __gu_val; \ |
132 | long __gu_err; \ | 132 | __get_user_size((void *)&__gu_val, (long)(ptr), \ |
133 | __typeof(*(ptr)) __gu_val; \ | 133 | (size), __gu_err); \ |
134 | __asm__ ("":"=r" (__gu_val)); \ | 134 | (x) = (__typeof__(*(ptr)))__gu_val; \ |
135 | __asm__ ("":"=r" (__gu_err)); \ | ||
136 | __get_user_size((void *)&__gu_val, __gu_addr, (size), __gu_err); \ | ||
137 | (x) = (__typeof__(*(ptr))) __gu_val; \ | ||
138 | __gu_err; \ | 135 | __gu_err; \ |
139 | }) | 136 | }) |
140 | 137 | ||
141 | #define __get_user_check(x,ptr,size) \ | 138 | #define __get_user_check(x,ptr,size) \ |
142 | ({ \ | 139 | ({ \ |
143 | long __gu_addr = (long)(ptr); \ | 140 | long __gu_addr = (long)(ptr); \ |
144 | long __gu_err = -EFAULT; \ | 141 | long __gu_err = -EFAULT, __gu_val; \ |
145 | __typeof(*(ptr)) __gu_val; \ | ||
146 | __asm__ ("":"=r" (__gu_val)); \ | ||
147 | __asm__ ("":"=r" (__gu_err)); \ | ||
148 | if (__access_ok(__gu_addr, (size))) \ | 142 | if (__access_ok(__gu_addr, (size))) \ |
149 | __get_user_size((void *)&__gu_val, __gu_addr, (size), __gu_err); \ | 143 | __get_user_size((void *)&__gu_val, __gu_addr, \ |
144 | (size), __gu_err); \ | ||
150 | (x) = (__typeof__(*(ptr))) __gu_val; \ | 145 | (x) = (__typeof__(*(ptr))) __gu_val; \ |
151 | __gu_err; \ | 146 | __gu_err; \ |
152 | }) | 147 | }) |
diff --git a/include/asm-sparc/mman.h b/include/asm-sparc/mman.h index 88d1886abf3b..b7dc40bc68f4 100644 --- a/include/asm-sparc/mman.h +++ b/include/asm-sparc/mman.h | |||
@@ -35,4 +35,12 @@ | |||
35 | 35 | ||
36 | #define MADV_FREE 0x5 /* (Solaris) contents can be freed */ | 36 | #define MADV_FREE 0x5 /* (Solaris) contents can be freed */ |
37 | 37 | ||
38 | #ifdef __KERNEL__ | ||
39 | #ifndef __ASSEMBLY__ | ||
40 | #define arch_mmap_check sparc_mmap_check | ||
41 | int sparc_mmap_check(unsigned long addr, unsigned long len, | ||
42 | unsigned long flags); | ||
43 | #endif | ||
44 | #endif | ||
45 | |||
38 | #endif /* __SPARC_MMAN_H__ */ | 46 | #endif /* __SPARC_MMAN_H__ */ |
diff --git a/include/asm-sparc64/mman.h b/include/asm-sparc64/mman.h index 6fd878e61435..8cc1860be630 100644 --- a/include/asm-sparc64/mman.h +++ b/include/asm-sparc64/mman.h | |||
@@ -35,4 +35,12 @@ | |||
35 | 35 | ||
36 | #define MADV_FREE 0x5 /* (Solaris) contents can be freed */ | 36 | #define MADV_FREE 0x5 /* (Solaris) contents can be freed */ |
37 | 37 | ||
38 | #ifdef __KERNEL__ | ||
39 | #ifndef __ASSEMBLY__ | ||
40 | #define arch_mmap_check sparc64_mmap_check | ||
41 | int sparc64_mmap_check(unsigned long addr, unsigned long len, | ||
42 | unsigned long flags); | ||
43 | #endif | ||
44 | #endif | ||
45 | |||
38 | #endif /* __SPARC64_MMAN_H__ */ | 46 | #endif /* __SPARC64_MMAN_H__ */ |
diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h index 41788a31c438..2096e5c72827 100644 --- a/include/linux/atmdev.h +++ b/include/linux/atmdev.h | |||
@@ -7,7 +7,6 @@ | |||
7 | #define LINUX_ATMDEV_H | 7 | #define LINUX_ATMDEV_H |
8 | 8 | ||
9 | 9 | ||
10 | #include <linux/device.h> | ||
11 | #include <linux/atmapi.h> | 10 | #include <linux/atmapi.h> |
12 | #include <linux/atm.h> | 11 | #include <linux/atm.h> |
13 | #include <linux/atmioc.h> | 12 | #include <linux/atmioc.h> |
@@ -210,6 +209,7 @@ struct atm_cirange { | |||
210 | 209 | ||
211 | #ifdef __KERNEL__ | 210 | #ifdef __KERNEL__ |
212 | 211 | ||
212 | #include <linux/device.h> | ||
213 | #include <linux/wait.h> /* wait_queue_head_t */ | 213 | #include <linux/wait.h> /* wait_queue_head_t */ |
214 | #include <linux/time.h> /* struct timeval */ | 214 | #include <linux/time.h> /* struct timeval */ |
215 | #include <linux/net.h> | 215 | #include <linux/net.h> |
diff --git a/include/linux/audit.h b/include/linux/audit.h index 64f9f9e56ac5..40a6c26294ae 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -132,6 +132,10 @@ | |||
132 | #define AUDIT_CLASS_DIR_WRITE_32 1 | 132 | #define AUDIT_CLASS_DIR_WRITE_32 1 |
133 | #define AUDIT_CLASS_CHATTR 2 | 133 | #define AUDIT_CLASS_CHATTR 2 |
134 | #define AUDIT_CLASS_CHATTR_32 3 | 134 | #define AUDIT_CLASS_CHATTR_32 3 |
135 | #define AUDIT_CLASS_READ 4 | ||
136 | #define AUDIT_CLASS_READ_32 5 | ||
137 | #define AUDIT_CLASS_WRITE 6 | ||
138 | #define AUDIT_CLASS_WRITE_32 7 | ||
135 | 139 | ||
136 | /* This bitmask is used to validate user input. It represents all bits that | 140 | /* This bitmask is used to validate user input. It represents all bits that |
137 | * are currently used in an audit field constant understood by the kernel. | 141 | * are currently used in an audit field constant understood by the kernel. |
@@ -177,6 +181,7 @@ | |||
177 | #define AUDIT_EXIT 103 | 181 | #define AUDIT_EXIT 103 |
178 | #define AUDIT_SUCCESS 104 /* exit >= 0; value ignored */ | 182 | #define AUDIT_SUCCESS 104 /* exit >= 0; value ignored */ |
179 | #define AUDIT_WATCH 105 | 183 | #define AUDIT_WATCH 105 |
184 | #define AUDIT_PERM 106 | ||
180 | 185 | ||
181 | #define AUDIT_ARG0 200 | 186 | #define AUDIT_ARG0 200 |
182 | #define AUDIT_ARG1 (AUDIT_ARG0+1) | 187 | #define AUDIT_ARG1 (AUDIT_ARG0+1) |
@@ -252,6 +257,11 @@ | |||
252 | #define AUDIT_ARCH_V850 (EM_V850|__AUDIT_ARCH_LE) | 257 | #define AUDIT_ARCH_V850 (EM_V850|__AUDIT_ARCH_LE) |
253 | #define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | 258 | #define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) |
254 | 259 | ||
260 | #define AUDIT_PERM_EXEC 1 | ||
261 | #define AUDIT_PERM_WRITE 2 | ||
262 | #define AUDIT_PERM_READ 4 | ||
263 | #define AUDIT_PERM_ATTR 8 | ||
264 | |||
255 | struct audit_status { | 265 | struct audit_status { |
256 | __u32 mask; /* Bit mask for valid entries */ | 266 | __u32 mask; /* Bit mask for valid entries */ |
257 | __u32 enabled; /* 1 = enabled, 0 = disabled */ | 267 | __u32 enabled; /* 1 = enabled, 0 = disabled */ |
@@ -314,6 +324,7 @@ struct mqstat; | |||
314 | #define AUDITSC_FAILURE 2 | 324 | #define AUDITSC_FAILURE 2 |
315 | #define AUDITSC_RESULT(x) ( ((long)(x))<0?AUDITSC_FAILURE:AUDITSC_SUCCESS ) | 325 | #define AUDITSC_RESULT(x) ( ((long)(x))<0?AUDITSC_FAILURE:AUDITSC_SUCCESS ) |
316 | extern int __init audit_register_class(int class, unsigned *list); | 326 | extern int __init audit_register_class(int class, unsigned *list); |
327 | extern int audit_classify_syscall(int abi, unsigned syscall); | ||
317 | #ifdef CONFIG_AUDITSYSCALL | 328 | #ifdef CONFIG_AUDITSYSCALL |
318 | /* These are defined in auditsc.c */ | 329 | /* These are defined in auditsc.c */ |
319 | /* Public API */ | 330 | /* Public API */ |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index e4bccbcc2750..4fc379de6c2f 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -80,6 +80,7 @@ struct hrtimer_sleeper { | |||
80 | * @get_softirq_time: function to retrieve the current time from the softirq | 80 | * @get_softirq_time: function to retrieve the current time from the softirq |
81 | * @curr_timer: the timer which is executing a callback right now | 81 | * @curr_timer: the timer which is executing a callback right now |
82 | * @softirq_time: the time when running the hrtimer queue in the softirq | 82 | * @softirq_time: the time when running the hrtimer queue in the softirq |
83 | * @lock_key: the lock_class_key for use with lockdep | ||
83 | */ | 84 | */ |
84 | struct hrtimer_base { | 85 | struct hrtimer_base { |
85 | clockid_t index; | 86 | clockid_t index; |
diff --git a/include/linux/ktime.h b/include/linux/ktime.h index ed3396dcc4f7..84eeecd60a02 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h | |||
@@ -56,7 +56,8 @@ typedef union { | |||
56 | #endif | 56 | #endif |
57 | } ktime_t; | 57 | } ktime_t; |
58 | 58 | ||
59 | #define KTIME_MAX (~((u64)1 << 63)) | 59 | #define KTIME_MAX ((s64)~((u64)1 << 63)) |
60 | #define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC) | ||
60 | 61 | ||
61 | /* | 62 | /* |
62 | * ktime_t definitions when using the 64-bit scalar representation: | 63 | * ktime_t definitions when using the 64-bit scalar representation: |
@@ -73,6 +74,10 @@ typedef union { | |||
73 | */ | 74 | */ |
74 | static inline ktime_t ktime_set(const long secs, const unsigned long nsecs) | 75 | static inline ktime_t ktime_set(const long secs, const unsigned long nsecs) |
75 | { | 76 | { |
77 | #if (BITS_PER_LONG == 64) | ||
78 | if (unlikely(secs >= KTIME_SEC_MAX)) | ||
79 | return (ktime_t){ .tv64 = KTIME_MAX }; | ||
80 | #endif | ||
76 | return (ktime_t) { .tv64 = (s64)secs * NSEC_PER_SEC + (s64)nsecs }; | 81 | return (ktime_t) { .tv64 = (s64)secs * NSEC_PER_SEC + (s64)nsecs }; |
77 | } | 82 | } |
78 | 83 | ||
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index c1f021eddffa..ba095aebedff 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -77,7 +77,7 @@ struct mmc_host { | |||
77 | struct device *dev; | 77 | struct device *dev; |
78 | struct class_device class_dev; | 78 | struct class_device class_dev; |
79 | int index; | 79 | int index; |
80 | struct mmc_host_ops *ops; | 80 | const struct mmc_host_ops *ops; |
81 | unsigned int f_min; | 81 | unsigned int f_min; |
82 | unsigned int f_max; | 82 | unsigned int f_max; |
83 | u32 ocr_avail; | 83 | u32 ocr_avail; |
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index 03a14a30c46a..627e2c08ce41 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
@@ -105,6 +105,8 @@ extern int mmc_wait_for_cmd(struct mmc_host *, struct mmc_command *, int); | |||
105 | extern int mmc_wait_for_app_cmd(struct mmc_host *, unsigned int, | 105 | extern int mmc_wait_for_app_cmd(struct mmc_host *, unsigned int, |
106 | struct mmc_command *, int); | 106 | struct mmc_command *, int); |
107 | 107 | ||
108 | extern void mmc_set_data_timeout(struct mmc_data *, const struct mmc_card *, int); | ||
109 | |||
108 | extern int __mmc_claim_host(struct mmc_host *host, struct mmc_card *card); | 110 | extern int __mmc_claim_host(struct mmc_host *host, struct mmc_card *card); |
109 | 111 | ||
110 | static inline void mmc_claim_host(struct mmc_host *host) | 112 | static inline void mmc_claim_host(struct mmc_host *host) |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 247434553ae8..530b1e6173b1 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -427,7 +427,7 @@ extern int nfs_writeback_done(struct rpc_task *, struct nfs_write_data *); | |||
427 | extern void nfs_writedata_release(void *); | 427 | extern void nfs_writedata_release(void *); |
428 | 428 | ||
429 | #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) | 429 | #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) |
430 | struct nfs_write_data *nfs_commit_alloc(unsigned int pagecount); | 430 | struct nfs_write_data *nfs_commit_alloc(void); |
431 | void nfs_commit_free(struct nfs_write_data *p); | 431 | void nfs_commit_free(struct nfs_write_data *p); |
432 | #endif | 432 | #endif |
433 | 433 | ||
@@ -478,7 +478,7 @@ static inline int nfs_wb_page(struct inode *inode, struct page* page) | |||
478 | /* | 478 | /* |
479 | * Allocate nfs_write_data structures | 479 | * Allocate nfs_write_data structures |
480 | */ | 480 | */ |
481 | extern struct nfs_write_data *nfs_writedata_alloc(unsigned int pagecount); | 481 | extern struct nfs_write_data *nfs_writedata_alloc(size_t len); |
482 | 482 | ||
483 | /* | 483 | /* |
484 | * linux/fs/nfs/read.c | 484 | * linux/fs/nfs/read.c |
@@ -492,7 +492,7 @@ extern void nfs_readdata_release(void *data); | |||
492 | /* | 492 | /* |
493 | * Allocate nfs_read_data structures | 493 | * Allocate nfs_read_data structures |
494 | */ | 494 | */ |
495 | extern struct nfs_read_data *nfs_readdata_alloc(unsigned int pagecount); | 495 | extern struct nfs_read_data *nfs_readdata_alloc(size_t len); |
496 | 496 | ||
497 | /* | 497 | /* |
498 | * linux/fs/nfs3proc.c | 498 | * linux/fs/nfs3proc.c |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index db9cbf68e12b..41e5a19199e9 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -729,7 +729,7 @@ struct nfs_read_data { | |||
729 | struct list_head pages; /* Coalesced read requests */ | 729 | struct list_head pages; /* Coalesced read requests */ |
730 | struct nfs_page *req; /* multi ops per nfs_page */ | 730 | struct nfs_page *req; /* multi ops per nfs_page */ |
731 | struct page **pagevec; | 731 | struct page **pagevec; |
732 | unsigned int npages; /* active pages in pagevec */ | 732 | unsigned int npages; /* Max length of pagevec */ |
733 | struct nfs_readargs args; | 733 | struct nfs_readargs args; |
734 | struct nfs_readres res; | 734 | struct nfs_readres res; |
735 | #ifdef CONFIG_NFS_V4 | 735 | #ifdef CONFIG_NFS_V4 |
@@ -748,7 +748,7 @@ struct nfs_write_data { | |||
748 | struct list_head pages; /* Coalesced requests we wish to flush */ | 748 | struct list_head pages; /* Coalesced requests we wish to flush */ |
749 | struct nfs_page *req; /* multi ops per nfs_page */ | 749 | struct nfs_page *req; /* multi ops per nfs_page */ |
750 | struct page **pagevec; | 750 | struct page **pagevec; |
751 | unsigned int npages; /* active pages in pagevec */ | 751 | unsigned int npages; /* Max length of pagevec */ |
752 | struct nfs_writeargs args; /* argument struct */ | 752 | struct nfs_writeargs args; /* argument struct */ |
753 | struct nfs_writeres res; /* result struct */ | 753 | struct nfs_writeres res; /* result struct */ |
754 | #ifdef CONFIG_NFS_V4 | 754 | #ifdef CONFIG_NFS_V4 |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index c91164ea3dec..7a249155ee4e 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -648,6 +648,8 @@ | |||
648 | #define PCI_DEVICE_ID_SI_962 0x0962 | 648 | #define PCI_DEVICE_ID_SI_962 0x0962 |
649 | #define PCI_DEVICE_ID_SI_963 0x0963 | 649 | #define PCI_DEVICE_ID_SI_963 0x0963 |
650 | #define PCI_DEVICE_ID_SI_965 0x0965 | 650 | #define PCI_DEVICE_ID_SI_965 0x0965 |
651 | #define PCI_DEVICE_ID_SI_966 0x0966 | ||
652 | #define PCI_DEVICE_ID_SI_968 0x0968 | ||
651 | #define PCI_DEVICE_ID_SI_5511 0x5511 | 653 | #define PCI_DEVICE_ID_SI_5511 0x5511 |
652 | #define PCI_DEVICE_ID_SI_5513 0x5513 | 654 | #define PCI_DEVICE_ID_SI_5513 0x5513 |
653 | #define PCI_DEVICE_ID_SI_5517 0x5517 | 655 | #define PCI_DEVICE_ID_SI_5517 0x5517 |
diff --git a/include/linux/videodev.h b/include/linux/videodev.h index 518c7a32175e..8dba97a291f6 100644 --- a/include/linux/videodev.h +++ b/include/linux/videodev.h | |||
@@ -14,8 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/videodev2.h> | 15 | #include <linux/videodev2.h> |
16 | 16 | ||
17 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | 17 | #if defined(CONFIG_VIDEO_V4L1_COMPAT) || !defined (__KERNEL__) |
18 | #define HAVE_V4L1 1 | ||
19 | 18 | ||
20 | struct video_capability | 19 | struct video_capability |
21 | { | 20 | { |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index b7146956a929..e3715d774197 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -22,8 +22,6 @@ | |||
22 | #endif | 22 | #endif |
23 | #include <linux/types.h> | 23 | #include <linux/types.h> |
24 | 24 | ||
25 | #define HAVE_V4L2 1 | ||
26 | |||
27 | /* | 25 | /* |
28 | * Common stuff for both V4L1 and V4L2 | 26 | * Common stuff for both V4L1 and V4L2 |
29 | * Moved from videodev.h | 27 | * Moved from videodev.h |
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index 600d61d7d2ab..810462f8a374 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h | |||
@@ -194,7 +194,7 @@ struct video_device | |||
194 | 194 | ||
195 | 195 | ||
196 | int (*vidioc_overlay) (struct file *file, void *fh, unsigned int i); | 196 | int (*vidioc_overlay) (struct file *file, void *fh, unsigned int i); |
197 | #ifdef HAVE_V4L1 | 197 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
198 | /* buffer type is struct vidio_mbuf * */ | 198 | /* buffer type is struct vidio_mbuf * */ |
199 | int (*vidiocgmbuf) (struct file *file, void *fh, struct video_mbuf *p); | 199 | int (*vidiocgmbuf) (struct file *file, void *fh, struct video_mbuf *p); |
200 | #endif | 200 | #endif |
@@ -335,7 +335,7 @@ extern int video_usercopy(struct inode *inode, struct file *file, | |||
335 | unsigned int cmd, void *arg)); | 335 | unsigned int cmd, void *arg)); |
336 | 336 | ||
337 | 337 | ||
338 | #ifdef HAVE_V4L1 | 338 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
339 | #include <linux/mm.h> | 339 | #include <linux/mm.h> |
340 | 340 | ||
341 | extern struct video_device* video_devdata(struct file*); | 341 | extern struct video_device* video_devdata(struct file*); |
@@ -357,6 +357,8 @@ video_device_remove_file(struct video_device *vfd, | |||
357 | class_device_remove_file(&vfd->class_dev, attr); | 357 | class_device_remove_file(&vfd->class_dev, attr); |
358 | } | 358 | } |
359 | 359 | ||
360 | #endif /* CONFIG_VIDEO_V4L1_COMPAT */ | ||
361 | |||
360 | #ifdef OBSOLETE_OWNER /* to be removed soon */ | 362 | #ifdef OBSOLETE_OWNER /* to be removed soon */ |
361 | /* helper functions to access driver private data. */ | 363 | /* helper functions to access driver private data. */ |
362 | static inline void *video_get_drvdata(struct video_device *dev) | 364 | static inline void *video_get_drvdata(struct video_device *dev) |
@@ -372,6 +374,5 @@ static inline void video_set_drvdata(struct video_device *dev, void *data) | |||
372 | 374 | ||
373 | extern int video_exclusive_open(struct inode *inode, struct file *file); | 375 | extern int video_exclusive_open(struct inode *inode, struct file *file); |
374 | extern int video_exclusive_release(struct inode *inode, struct file *file); | 376 | extern int video_exclusive_release(struct inode *inode, struct file *file); |
375 | #endif /* HAVE_V4L1 */ | ||
376 | 377 | ||
377 | #endif /* _V4L2_DEV_H */ | 378 | #endif /* _V4L2_DEV_H */ |
diff --git a/kernel/audit.c b/kernel/audit.c index 0a36091ed712..963fd15c9621 100644 --- a/kernel/audit.c +++ b/kernel/audit.c | |||
@@ -1028,6 +1028,9 @@ void audit_log_hex(struct audit_buffer *ab, const unsigned char *buf, | |||
1028 | struct sk_buff *skb; | 1028 | struct sk_buff *skb; |
1029 | static const unsigned char *hex = "0123456789ABCDEF"; | 1029 | static const unsigned char *hex = "0123456789ABCDEF"; |
1030 | 1030 | ||
1031 | if (!ab) | ||
1032 | return; | ||
1033 | |||
1031 | BUG_ON(!ab->skb); | 1034 | BUG_ON(!ab->skb); |
1032 | skb = ab->skb; | 1035 | skb = ab->skb; |
1033 | avail = skb_tailroom(skb); | 1036 | avail = skb_tailroom(skb); |
@@ -1060,6 +1063,9 @@ static void audit_log_n_string(struct audit_buffer *ab, size_t slen, | |||
1060 | unsigned char *ptr; | 1063 | unsigned char *ptr; |
1061 | struct sk_buff *skb; | 1064 | struct sk_buff *skb; |
1062 | 1065 | ||
1066 | if (!ab) | ||
1067 | return; | ||
1068 | |||
1063 | BUG_ON(!ab->skb); | 1069 | BUG_ON(!ab->skb); |
1064 | skb = ab->skb; | 1070 | skb = ab->skb; |
1065 | avail = skb_tailroom(skb); | 1071 | avail = skb_tailroom(skb); |
diff --git a/kernel/audit.h b/kernel/audit.h index 6aa33b848cf2..a3370232a390 100644 --- a/kernel/audit.h +++ b/kernel/audit.h | |||
@@ -104,6 +104,7 @@ static inline int audit_hash_ino(u32 ino) | |||
104 | return (ino & (AUDIT_INODE_BUCKETS-1)); | 104 | return (ino & (AUDIT_INODE_BUCKETS-1)); |
105 | } | 105 | } |
106 | 106 | ||
107 | extern int audit_match_class(int class, unsigned syscall); | ||
107 | extern int audit_comparator(const u32 left, const u32 op, const u32 right); | 108 | extern int audit_comparator(const u32 left, const u32 op, const u32 right); |
108 | extern int audit_compare_dname_path(const char *dname, const char *path, | 109 | extern int audit_compare_dname_path(const char *dname, const char *path, |
109 | int *dirlen); | 110 | int *dirlen); |
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c index 6a9a5c5a4e7d..a44879b0c72f 100644 --- a/kernel/auditfilter.c +++ b/kernel/auditfilter.c | |||
@@ -302,6 +302,15 @@ int __init audit_register_class(int class, unsigned *list) | |||
302 | return 0; | 302 | return 0; |
303 | } | 303 | } |
304 | 304 | ||
305 | int audit_match_class(int class, unsigned syscall) | ||
306 | { | ||
307 | if (unlikely(syscall >= AUDIT_BITMASK_SIZE * sizeof(__u32))) | ||
308 | return 0; | ||
309 | if (unlikely(class >= AUDIT_SYSCALL_CLASSES || !classes[class])) | ||
310 | return 0; | ||
311 | return classes[class][AUDIT_WORD(syscall)] & AUDIT_BIT(syscall); | ||
312 | } | ||
313 | |||
305 | /* Common user-space to kernel rule translation. */ | 314 | /* Common user-space to kernel rule translation. */ |
306 | static inline struct audit_entry *audit_to_entry_common(struct audit_rule *rule) | 315 | static inline struct audit_entry *audit_to_entry_common(struct audit_rule *rule) |
307 | { | 316 | { |
@@ -404,6 +413,7 @@ static struct audit_entry *audit_rule_to_entry(struct audit_rule *rule) | |||
404 | case AUDIT_PERS: | 413 | case AUDIT_PERS: |
405 | case AUDIT_ARCH: | 414 | case AUDIT_ARCH: |
406 | case AUDIT_MSGTYPE: | 415 | case AUDIT_MSGTYPE: |
416 | case AUDIT_PPID: | ||
407 | case AUDIT_DEVMAJOR: | 417 | case AUDIT_DEVMAJOR: |
408 | case AUDIT_DEVMINOR: | 418 | case AUDIT_DEVMINOR: |
409 | case AUDIT_EXIT: | 419 | case AUDIT_EXIT: |
@@ -413,6 +423,10 @@ static struct audit_entry *audit_rule_to_entry(struct audit_rule *rule) | |||
413 | case AUDIT_ARG2: | 423 | case AUDIT_ARG2: |
414 | case AUDIT_ARG3: | 424 | case AUDIT_ARG3: |
415 | break; | 425 | break; |
426 | case AUDIT_PERM: | ||
427 | if (f->val & ~15) | ||
428 | goto exit_free; | ||
429 | break; | ||
416 | case AUDIT_INODE: | 430 | case AUDIT_INODE: |
417 | err = audit_to_inode(&entry->rule, f); | 431 | err = audit_to_inode(&entry->rule, f); |
418 | if (err) | 432 | if (err) |
@@ -567,6 +581,10 @@ static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data, | |||
567 | entry->rule.buflen += f->val; | 581 | entry->rule.buflen += f->val; |
568 | entry->rule.filterkey = str; | 582 | entry->rule.filterkey = str; |
569 | break; | 583 | break; |
584 | case AUDIT_PERM: | ||
585 | if (f->val & ~15) | ||
586 | goto exit_free; | ||
587 | break; | ||
570 | default: | 588 | default: |
571 | goto exit_free; | 589 | goto exit_free; |
572 | } | 590 | } |
@@ -913,7 +931,7 @@ static void audit_update_watch(struct audit_parent *parent, | |||
913 | } | 931 | } |
914 | 932 | ||
915 | ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE); | 933 | ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE); |
916 | audit_log_format(ab, "audit updated rules specifying watch="); | 934 | audit_log_format(ab, "audit updated rules specifying path="); |
917 | audit_log_untrustedstring(ab, owatch->path); | 935 | audit_log_untrustedstring(ab, owatch->path); |
918 | audit_log_format(ab, " with dev=%u ino=%lu\n", dev, ino); | 936 | audit_log_format(ab, " with dev=%u ino=%lu\n", dev, ino); |
919 | audit_log_end(ab); | 937 | audit_log_end(ab); |
@@ -936,19 +954,28 @@ static void audit_remove_parent_watches(struct audit_parent *parent) | |||
936 | struct audit_watch *w, *nextw; | 954 | struct audit_watch *w, *nextw; |
937 | struct audit_krule *r, *nextr; | 955 | struct audit_krule *r, *nextr; |
938 | struct audit_entry *e; | 956 | struct audit_entry *e; |
957 | struct audit_buffer *ab; | ||
939 | 958 | ||
940 | mutex_lock(&audit_filter_mutex); | 959 | mutex_lock(&audit_filter_mutex); |
941 | parent->flags |= AUDIT_PARENT_INVALID; | 960 | parent->flags |= AUDIT_PARENT_INVALID; |
942 | list_for_each_entry_safe(w, nextw, &parent->watches, wlist) { | 961 | list_for_each_entry_safe(w, nextw, &parent->watches, wlist) { |
943 | list_for_each_entry_safe(r, nextr, &w->rules, rlist) { | 962 | list_for_each_entry_safe(r, nextr, &w->rules, rlist) { |
944 | e = container_of(r, struct audit_entry, rule); | 963 | e = container_of(r, struct audit_entry, rule); |
964 | |||
965 | ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE); | ||
966 | audit_log_format(ab, "audit implicitly removed rule path="); | ||
967 | audit_log_untrustedstring(ab, w->path); | ||
968 | if (r->filterkey) { | ||
969 | audit_log_format(ab, " key="); | ||
970 | audit_log_untrustedstring(ab, r->filterkey); | ||
971 | } else | ||
972 | audit_log_format(ab, " key=(null)"); | ||
973 | audit_log_format(ab, " list=%d", r->listnr); | ||
974 | audit_log_end(ab); | ||
975 | |||
945 | list_del(&r->rlist); | 976 | list_del(&r->rlist); |
946 | list_del_rcu(&e->list); | 977 | list_del_rcu(&e->list); |
947 | call_rcu(&e->rcu, audit_free_rule_rcu); | 978 | call_rcu(&e->rcu, audit_free_rule_rcu); |
948 | |||
949 | audit_log(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE, | ||
950 | "audit implicitly removed rule from list=%d\n", | ||
951 | AUDIT_FILTER_EXIT); | ||
952 | } | 979 | } |
953 | audit_remove_watch(w); | 980 | audit_remove_watch(w); |
954 | } | 981 | } |
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index efc1b74bebf3..1bd8827a0102 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
@@ -209,6 +209,54 @@ struct audit_context { | |||
209 | #endif | 209 | #endif |
210 | }; | 210 | }; |
211 | 211 | ||
212 | #define ACC_MODE(x) ("\004\002\006\006"[(x)&O_ACCMODE]) | ||
213 | static inline int open_arg(int flags, int mask) | ||
214 | { | ||
215 | int n = ACC_MODE(flags); | ||
216 | if (flags & (O_TRUNC | O_CREAT)) | ||
217 | n |= AUDIT_PERM_WRITE; | ||
218 | return n & mask; | ||
219 | } | ||
220 | |||
221 | static int audit_match_perm(struct audit_context *ctx, int mask) | ||
222 | { | ||
223 | unsigned n = ctx->major; | ||
224 | switch (audit_classify_syscall(ctx->arch, n)) { | ||
225 | case 0: /* native */ | ||
226 | if ((mask & AUDIT_PERM_WRITE) && | ||
227 | audit_match_class(AUDIT_CLASS_WRITE, n)) | ||
228 | return 1; | ||
229 | if ((mask & AUDIT_PERM_READ) && | ||
230 | audit_match_class(AUDIT_CLASS_READ, n)) | ||
231 | return 1; | ||
232 | if ((mask & AUDIT_PERM_ATTR) && | ||
233 | audit_match_class(AUDIT_CLASS_CHATTR, n)) | ||
234 | return 1; | ||
235 | return 0; | ||
236 | case 1: /* 32bit on biarch */ | ||
237 | if ((mask & AUDIT_PERM_WRITE) && | ||
238 | audit_match_class(AUDIT_CLASS_WRITE_32, n)) | ||
239 | return 1; | ||
240 | if ((mask & AUDIT_PERM_READ) && | ||
241 | audit_match_class(AUDIT_CLASS_READ_32, n)) | ||
242 | return 1; | ||
243 | if ((mask & AUDIT_PERM_ATTR) && | ||
244 | audit_match_class(AUDIT_CLASS_CHATTR_32, n)) | ||
245 | return 1; | ||
246 | return 0; | ||
247 | case 2: /* open */ | ||
248 | return mask & ACC_MODE(ctx->argv[1]); | ||
249 | case 3: /* openat */ | ||
250 | return mask & ACC_MODE(ctx->argv[2]); | ||
251 | case 4: /* socketcall */ | ||
252 | return ((mask & AUDIT_PERM_WRITE) && ctx->argv[0] == SYS_BIND); | ||
253 | case 5: /* execve */ | ||
254 | return mask & AUDIT_PERM_EXEC; | ||
255 | default: | ||
256 | return 0; | ||
257 | } | ||
258 | } | ||
259 | |||
212 | /* Determine if any context name data matches a rule's watch data */ | 260 | /* Determine if any context name data matches a rule's watch data */ |
213 | /* Compare a task_struct with an audit_rule. Return 1 on match, 0 | 261 | /* Compare a task_struct with an audit_rule. Return 1 on match, 0 |
214 | * otherwise. */ | 262 | * otherwise. */ |
@@ -397,6 +445,9 @@ static int audit_filter_rules(struct task_struct *tsk, | |||
397 | /* ignore this field for filtering */ | 445 | /* ignore this field for filtering */ |
398 | result = 1; | 446 | result = 1; |
399 | break; | 447 | break; |
448 | case AUDIT_PERM: | ||
449 | result = audit_match_perm(ctx, f->val); | ||
450 | break; | ||
400 | } | 451 | } |
401 | 452 | ||
402 | if (!result) | 453 | if (!result) |
diff --git a/kernel/futex.c b/kernel/futex.c index b9b8aea5389e..9d260e838cff 100644 --- a/kernel/futex.c +++ b/kernel/futex.c | |||
@@ -1120,9 +1120,10 @@ static int futex_wait(u32 __user *uaddr, u32 val, unsigned long time) | |||
1120 | * if there are waiters then it will block, it does PI, etc. (Due to | 1120 | * if there are waiters then it will block, it does PI, etc. (Due to |
1121 | * races the kernel might see a 0 value of the futex too.) | 1121 | * races the kernel might see a 0 value of the futex too.) |
1122 | */ | 1122 | */ |
1123 | static int do_futex_lock_pi(u32 __user *uaddr, int detect, int trylock, | 1123 | static int futex_lock_pi(u32 __user *uaddr, int detect, unsigned long sec, |
1124 | struct hrtimer_sleeper *to) | 1124 | long nsec, int trylock) |
1125 | { | 1125 | { |
1126 | struct hrtimer_sleeper timeout, *to = NULL; | ||
1126 | struct task_struct *curr = current; | 1127 | struct task_struct *curr = current; |
1127 | struct futex_hash_bucket *hb; | 1128 | struct futex_hash_bucket *hb; |
1128 | u32 uval, newval, curval; | 1129 | u32 uval, newval, curval; |
@@ -1132,6 +1133,13 @@ static int do_futex_lock_pi(u32 __user *uaddr, int detect, int trylock, | |||
1132 | if (refill_pi_state_cache()) | 1133 | if (refill_pi_state_cache()) |
1133 | return -ENOMEM; | 1134 | return -ENOMEM; |
1134 | 1135 | ||
1136 | if (sec != MAX_SCHEDULE_TIMEOUT) { | ||
1137 | to = &timeout; | ||
1138 | hrtimer_init(&to->timer, CLOCK_REALTIME, HRTIMER_ABS); | ||
1139 | hrtimer_init_sleeper(to, current); | ||
1140 | to->timer.expires = ktime_set(sec, nsec); | ||
1141 | } | ||
1142 | |||
1135 | q.pi_state = NULL; | 1143 | q.pi_state = NULL; |
1136 | retry: | 1144 | retry: |
1137 | down_read(&curr->mm->mmap_sem); | 1145 | down_read(&curr->mm->mmap_sem); |
@@ -1307,7 +1315,7 @@ static int do_futex_lock_pi(u32 __user *uaddr, int detect, int trylock, | |||
1307 | if (!detect && ret == -EDEADLK && 0) | 1315 | if (!detect && ret == -EDEADLK && 0) |
1308 | force_sig(SIGKILL, current); | 1316 | force_sig(SIGKILL, current); |
1309 | 1317 | ||
1310 | return ret; | 1318 | return ret != -EINTR ? ret : -ERESTARTNOINTR; |
1311 | 1319 | ||
1312 | out_unlock_release_sem: | 1320 | out_unlock_release_sem: |
1313 | queue_unlock(&q, hb); | 1321 | queue_unlock(&q, hb); |
@@ -1342,76 +1350,6 @@ static int do_futex_lock_pi(u32 __user *uaddr, int detect, int trylock, | |||
1342 | } | 1350 | } |
1343 | 1351 | ||
1344 | /* | 1352 | /* |
1345 | * Restart handler | ||
1346 | */ | ||
1347 | static long futex_lock_pi_restart(struct restart_block *restart) | ||
1348 | { | ||
1349 | struct hrtimer_sleeper timeout, *to = NULL; | ||
1350 | int ret; | ||
1351 | |||
1352 | restart->fn = do_no_restart_syscall; | ||
1353 | |||
1354 | if (restart->arg2 || restart->arg3) { | ||
1355 | to = &timeout; | ||
1356 | hrtimer_init(&to->timer, CLOCK_REALTIME, HRTIMER_ABS); | ||
1357 | hrtimer_init_sleeper(to, current); | ||
1358 | to->timer.expires.tv64 = ((u64)restart->arg1 << 32) | | ||
1359 | (u64) restart->arg0; | ||
1360 | } | ||
1361 | |||
1362 | pr_debug("lock_pi restart: %p, %d (%d)\n", | ||
1363 | (u32 __user *)restart->arg0, current->pid); | ||
1364 | |||
1365 | ret = do_futex_lock_pi((u32 __user *)restart->arg0, restart->arg1, | ||
1366 | 0, to); | ||
1367 | |||
1368 | if (ret != -EINTR) | ||
1369 | return ret; | ||
1370 | |||
1371 | restart->fn = futex_lock_pi_restart; | ||
1372 | |||
1373 | /* The other values are filled in */ | ||
1374 | return -ERESTART_RESTARTBLOCK; | ||
1375 | } | ||
1376 | |||
1377 | /* | ||
1378 | * Called from the syscall entry below. | ||
1379 | */ | ||
1380 | static int futex_lock_pi(u32 __user *uaddr, int detect, unsigned long sec, | ||
1381 | long nsec, int trylock) | ||
1382 | { | ||
1383 | struct hrtimer_sleeper timeout, *to = NULL; | ||
1384 | struct restart_block *restart; | ||
1385 | int ret; | ||
1386 | |||
1387 | if (sec != MAX_SCHEDULE_TIMEOUT) { | ||
1388 | to = &timeout; | ||
1389 | hrtimer_init(&to->timer, CLOCK_REALTIME, HRTIMER_ABS); | ||
1390 | hrtimer_init_sleeper(to, current); | ||
1391 | to->timer.expires = ktime_set(sec, nsec); | ||
1392 | } | ||
1393 | |||
1394 | ret = do_futex_lock_pi(uaddr, detect, trylock, to); | ||
1395 | |||
1396 | if (ret != -EINTR) | ||
1397 | return ret; | ||
1398 | |||
1399 | pr_debug("lock_pi interrupted: %p, %d (%d)\n", uaddr, current->pid); | ||
1400 | |||
1401 | restart = ¤t_thread_info()->restart_block; | ||
1402 | restart->fn = futex_lock_pi_restart; | ||
1403 | restart->arg0 = (unsigned long) uaddr; | ||
1404 | restart->arg1 = detect; | ||
1405 | if (to) { | ||
1406 | restart->arg2 = to->timer.expires.tv64 & 0xFFFFFFFF; | ||
1407 | restart->arg3 = to->timer.expires.tv64 >> 32; | ||
1408 | } else | ||
1409 | restart->arg2 = restart->arg3 = 0; | ||
1410 | |||
1411 | return -ERESTART_RESTARTBLOCK; | ||
1412 | } | ||
1413 | |||
1414 | /* | ||
1415 | * Userspace attempted a TID -> 0 atomic transition, and failed. | 1353 | * Userspace attempted a TID -> 0 atomic transition, and failed. |
1416 | * This is the in-kernel slowpath: we look up the PI state (if any), | 1354 | * This is the in-kernel slowpath: we look up the PI state (if any), |
1417 | * and do the rt-mutex unlock. | 1355 | * and do the rt-mutex unlock. |
diff --git a/kernel/panic.c b/kernel/panic.c index 9b8dcfd1ca93..8010b9b17aca 100644 --- a/kernel/panic.c +++ b/kernel/panic.c | |||
@@ -173,7 +173,7 @@ const char *print_tainted(void) | |||
173 | 173 | ||
174 | void add_taint(unsigned flag) | 174 | void add_taint(unsigned flag) |
175 | { | 175 | { |
176 | debug_locks_off(); /* can't trust the integrity of the kernel anymore */ | 176 | debug_locks = 0; /* can't trust the integrity of the kernel anymore */ |
177 | tainted |= flag; | 177 | tainted |= flag; |
178 | } | 178 | } |
179 | EXPORT_SYMBOL(add_taint); | 179 | EXPORT_SYMBOL(add_taint); |
diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig index ae44a70aae8a..619ecabf7c58 100644 --- a/kernel/power/Kconfig +++ b/kernel/power/Kconfig | |||
@@ -56,7 +56,7 @@ config PM_TRACE | |||
56 | 56 | ||
57 | config SOFTWARE_SUSPEND | 57 | config SOFTWARE_SUSPEND |
58 | bool "Software Suspend" | 58 | bool "Software Suspend" |
59 | depends on PM && SWAP && (X86 && (!SMP || SUSPEND_SMP)) || ((FRV || PPC32) && !SMP) | 59 | depends on PM && SWAP && ((X86 && (!SMP || SUSPEND_SMP) && !X86_PAE) || ((FRV || PPC32) && !SMP)) |
60 | ---help--- | 60 | ---help--- |
61 | Enable the possibility of suspending the machine. | 61 | Enable the possibility of suspending the machine. |
62 | It doesn't need ACPI or APM. | 62 | It doesn't need ACPI or APM. |
@@ -78,6 +78,10 @@ config SOFTWARE_SUSPEND | |||
78 | 78 | ||
79 | For more information take a look at <file:Documentation/power/swsusp.txt>. | 79 | For more information take a look at <file:Documentation/power/swsusp.txt>. |
80 | 80 | ||
81 | (For now, swsusp is incompatible with PAE aka HIGHMEM_64G on i386. | ||
82 | we need identity mapping for resume to work, and that is trivial | ||
83 | to get with 4MB pages, but less than trivial on PAE). | ||
84 | |||
81 | config PM_STD_PARTITION | 85 | config PM_STD_PARTITION |
82 | string "Default resume partition" | 86 | string "Default resume partition" |
83 | depends on SOFTWARE_SUSPEND | 87 | depends on SOFTWARE_SUSPEND |
diff --git a/kernel/spinlock.c b/kernel/spinlock.c index bfd6ad9c0330..fb524b009eef 100644 --- a/kernel/spinlock.c +++ b/kernel/spinlock.c | |||
@@ -72,7 +72,7 @@ EXPORT_SYMBOL(_write_trylock); | |||
72 | * not re-enabled during lock-acquire (which the preempt-spin-ops do): | 72 | * not re-enabled during lock-acquire (which the preempt-spin-ops do): |
73 | */ | 73 | */ |
74 | #if !defined(CONFIG_PREEMPT) || !defined(CONFIG_SMP) || \ | 74 | #if !defined(CONFIG_PREEMPT) || !defined(CONFIG_SMP) || \ |
75 | defined(CONFIG_PROVE_LOCKING) | 75 | defined(CONFIG_DEBUG_LOCK_ALLOC) |
76 | 76 | ||
77 | void __lockfunc _read_lock(rwlock_t *lock) | 77 | void __lockfunc _read_lock(rwlock_t *lock) |
78 | { | 78 | { |
diff --git a/lib/Kconfig b/lib/Kconfig index f6299342b882..734ce95a93d1 100644 --- a/lib/Kconfig +++ b/lib/Kconfig | |||
@@ -38,6 +38,11 @@ config LIBCRC32C | |||
38 | require M here. See Castagnoli93. | 38 | require M here. See Castagnoli93. |
39 | Module will be libcrc32c. | 39 | Module will be libcrc32c. |
40 | 40 | ||
41 | config AUDIT_GENERIC | ||
42 | bool | ||
43 | depends on AUDIT && !AUDIT_ARCH | ||
44 | default y | ||
45 | |||
41 | # | 46 | # |
42 | # compression support is select'ed if needed | 47 | # compression support is select'ed if needed |
43 | # | 48 | # |
diff --git a/lib/Makefile b/lib/Makefile index be9719ae82d0..ef1d37afbbb6 100644 --- a/lib/Makefile +++ b/lib/Makefile | |||
@@ -49,6 +49,7 @@ obj-$(CONFIG_TEXTSEARCH_KMP) += ts_kmp.o | |||
49 | obj-$(CONFIG_TEXTSEARCH_BM) += ts_bm.o | 49 | obj-$(CONFIG_TEXTSEARCH_BM) += ts_bm.o |
50 | obj-$(CONFIG_TEXTSEARCH_FSM) += ts_fsm.o | 50 | obj-$(CONFIG_TEXTSEARCH_FSM) += ts_fsm.o |
51 | obj-$(CONFIG_SMP) += percpu_counter.o | 51 | obj-$(CONFIG_SMP) += percpu_counter.o |
52 | obj-$(CONFIG_AUDIT_GENERIC) += audit.o | ||
52 | 53 | ||
53 | obj-$(CONFIG_SWIOTLB) += swiotlb.o | 54 | obj-$(CONFIG_SWIOTLB) += swiotlb.o |
54 | 55 | ||
diff --git a/lib/audit.c b/lib/audit.c new file mode 100644 index 000000000000..8c21625ef938 --- /dev/null +++ b/lib/audit.c | |||
@@ -0,0 +1,53 @@ | |||
1 | #include <linux/init.h> | ||
2 | #include <linux/types.h> | ||
3 | #include <linux/audit.h> | ||
4 | #include <asm/unistd.h> | ||
5 | |||
6 | static unsigned dir_class[] = { | ||
7 | #include <asm-generic/audit_dir_write.h> | ||
8 | ~0U | ||
9 | }; | ||
10 | |||
11 | static unsigned read_class[] = { | ||
12 | #include <asm-generic/audit_read.h> | ||
13 | ~0U | ||
14 | }; | ||
15 | |||
16 | static unsigned write_class[] = { | ||
17 | #include <asm-generic/audit_write.h> | ||
18 | ~0U | ||
19 | }; | ||
20 | |||
21 | static unsigned chattr_class[] = { | ||
22 | #include <asm-generic/audit_change_attr.h> | ||
23 | ~0U | ||
24 | }; | ||
25 | |||
26 | int audit_classify_syscall(int abi, unsigned syscall) | ||
27 | { | ||
28 | switch(syscall) { | ||
29 | case __NR_open: | ||
30 | return 2; | ||
31 | case __NR_openat: | ||
32 | return 3; | ||
33 | #ifdef __NR_socketcall | ||
34 | case __NR_socketcall: | ||
35 | return 4; | ||
36 | #endif | ||
37 | case __NR_execve: | ||
38 | return 5; | ||
39 | default: | ||
40 | return 0; | ||
41 | } | ||
42 | } | ||
43 | |||
44 | static int __init audit_classes_init(void) | ||
45 | { | ||
46 | audit_register_class(AUDIT_CLASS_WRITE, write_class); | ||
47 | audit_register_class(AUDIT_CLASS_READ, read_class); | ||
48 | audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); | ||
49 | audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); | ||
50 | return 0; | ||
51 | } | ||
52 | |||
53 | __initcall(audit_classes_init); | ||
@@ -30,6 +30,10 @@ | |||
30 | #include <asm/cacheflush.h> | 30 | #include <asm/cacheflush.h> |
31 | #include <asm/tlb.h> | 31 | #include <asm/tlb.h> |
32 | 32 | ||
33 | #ifndef arch_mmap_check | ||
34 | #define arch_mmap_check(addr, len, flags) (0) | ||
35 | #endif | ||
36 | |||
33 | static void unmap_region(struct mm_struct *mm, | 37 | static void unmap_region(struct mm_struct *mm, |
34 | struct vm_area_struct *vma, struct vm_area_struct *prev, | 38 | struct vm_area_struct *vma, struct vm_area_struct *prev, |
35 | unsigned long start, unsigned long end); | 39 | unsigned long start, unsigned long end); |
@@ -913,6 +917,10 @@ unsigned long do_mmap_pgoff(struct file * file, unsigned long addr, | |||
913 | if (!len) | 917 | if (!len) |
914 | return -EINVAL; | 918 | return -EINVAL; |
915 | 919 | ||
920 | error = arch_mmap_check(addr, len, flags); | ||
921 | if (error) | ||
922 | return error; | ||
923 | |||
916 | /* Careful about overflows.. */ | 924 | /* Careful about overflows.. */ |
917 | len = PAGE_ALIGN(len); | 925 | len = PAGE_ALIGN(len); |
918 | if (!len || len > TASK_SIZE) | 926 | if (!len || len > TASK_SIZE) |
@@ -1859,6 +1867,7 @@ unsigned long do_brk(unsigned long addr, unsigned long len) | |||
1859 | unsigned long flags; | 1867 | unsigned long flags; |
1860 | struct rb_node ** rb_link, * rb_parent; | 1868 | struct rb_node ** rb_link, * rb_parent; |
1861 | pgoff_t pgoff = addr >> PAGE_SHIFT; | 1869 | pgoff_t pgoff = addr >> PAGE_SHIFT; |
1870 | int error; | ||
1862 | 1871 | ||
1863 | len = PAGE_ALIGN(len); | 1872 | len = PAGE_ALIGN(len); |
1864 | if (!len) | 1873 | if (!len) |
@@ -1867,6 +1876,12 @@ unsigned long do_brk(unsigned long addr, unsigned long len) | |||
1867 | if ((addr + len) > TASK_SIZE || (addr + len) < addr) | 1876 | if ((addr + len) > TASK_SIZE || (addr + len) < addr) |
1868 | return -EINVAL; | 1877 | return -EINVAL; |
1869 | 1878 | ||
1879 | flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags; | ||
1880 | |||
1881 | error = arch_mmap_check(addr, len, flags); | ||
1882 | if (error) | ||
1883 | return error; | ||
1884 | |||
1870 | /* | 1885 | /* |
1871 | * mlock MCL_FUTURE? | 1886 | * mlock MCL_FUTURE? |
1872 | */ | 1887 | */ |
@@ -1907,8 +1922,6 @@ unsigned long do_brk(unsigned long addr, unsigned long len) | |||
1907 | if (security_vm_enough_memory(len >> PAGE_SHIFT)) | 1922 | if (security_vm_enough_memory(len >> PAGE_SHIFT)) |
1908 | return -ENOMEM; | 1923 | return -ENOMEM; |
1909 | 1924 | ||
1910 | flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags; | ||
1911 | |||
1912 | /* Can we just expand an old private anonymous mapping? */ | 1925 | /* Can we just expand an old private anonymous mapping? */ |
1913 | if (vma_merge(mm, prev, addr, addr + len, flags, | 1926 | if (vma_merge(mm, prev, addr, addr + len, flags, |
1914 | NULL, NULL, pgoff, NULL)) | 1927 | NULL, NULL, pgoff, NULL)) |
diff --git a/mm/truncate.c b/mm/truncate.c index cf1b015df4a7..c6ab55ec6883 100644 --- a/mm/truncate.c +++ b/mm/truncate.c | |||
@@ -68,10 +68,10 @@ invalidate_complete_page(struct address_space *mapping, struct page *page) | |||
68 | return 0; | 68 | return 0; |
69 | 69 | ||
70 | write_lock_irq(&mapping->tree_lock); | 70 | write_lock_irq(&mapping->tree_lock); |
71 | if (PageDirty(page)) { | 71 | if (PageDirty(page)) |
72 | write_unlock_irq(&mapping->tree_lock); | 72 | goto failed; |
73 | return 0; | 73 | if (page_count(page) != 2) /* caller's ref + pagecache ref */ |
74 | } | 74 | goto failed; |
75 | 75 | ||
76 | BUG_ON(PagePrivate(page)); | 76 | BUG_ON(PagePrivate(page)); |
77 | __remove_from_page_cache(page); | 77 | __remove_from_page_cache(page); |
@@ -79,6 +79,9 @@ invalidate_complete_page(struct address_space *mapping, struct page *page) | |||
79 | ClearPageUptodate(page); | 79 | ClearPageUptodate(page); |
80 | page_cache_release(page); /* pagecache ref */ | 80 | page_cache_release(page); /* pagecache ref */ |
81 | return 1; | 81 | return 1; |
82 | failed: | ||
83 | write_unlock_irq(&mapping->tree_lock); | ||
84 | return 0; | ||
82 | } | 85 | } |
83 | 86 | ||
84 | /** | 87 | /** |