Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'master' into upstream

+988 -790
+1
arch/arm/mach-ixp4xx/nslu2-pci.c
··· 17 17 18 18 #include <linux/pci.h> 19 19 #include <linux/init.h> 20 + #include <linux/irq.h> 20 21 21 22 #include <asm/mach/pci.h> 22 23 #include <asm/mach-types.h>
+1
arch/arm/mach-ixp4xx/nslu2-power.c
··· 19 19 20 20 #include <linux/module.h> 21 21 #include <linux/reboot.h> 22 + #include <linux/irq.h> 22 23 #include <linux/interrupt.h> 23 24 #include <linux/reboot.h> 24 25
+1
arch/arm/mach-s3c2410/Makefile
··· 28 28 29 29 # S3C2412 support 30 30 obj-$(CONFIG_CPU_S3C2412) += s3c2412.o 31 + obj-$(CONFIG_CPU_S3C2412) += s3c2412-irq.o 31 32 obj-$(CONFIG_CPU_S3C2412) += s3c2412-clock.o 32 33 33 34 #
-10
arch/arm/mach-s3c2410/cpu.h
··· 8 8 * This program is free software; you can redistribute it and/or modify 9 9 * it under the terms of the GNU General Public License version 2 as 10 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 13 /* todo - fix when rmk changes iodescs to use `void __iomem *` */
+2 -10
arch/arm/mach-s3c2410/devs.c
··· 1 1 /* linux/arch/arm/mach-s3c2410/devs.c 2 2 * 3 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 8 * This program is free software; you can redistribute it and/or modify 9 9 * it under the terms of the GNU General Public License version 2 as 10 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 14 #include <linux/kernel.h>
+2 -2
arch/arm/mach-s3c2410/irq.c
··· 86 86 unsigned long s3c_irqwake_eintallow = 0x0000fff0L; 87 87 unsigned long s3c_irqwake_eintmask = 0xffffffffL; 88 88 89 - static int 89 + int 90 90 s3c_irq_wake(unsigned int irqno, unsigned int state) 91 91 { 92 92 unsigned long irqbit = 1 << (irqno - IRQ_EINT0); ··· 260 260 s3c_irq_unmask((irqno <= (IRQ_EINT7 - EXTINT_OFF)) ? IRQ_EINT4t7 : IRQ_EINT8t23); 261 261 } 262 262 263 - static int 263 + int 264 264 s3c_irqext_type(unsigned int irq, unsigned int type) 265 265 { 266 266 void __iomem *extint_reg;
+5
arch/arm/mach-s3c2410/irq.h
··· 97 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);
-25
arch/arm/mach-s3c2410/mach-bast.c
··· 8 8 * This program is free software; you can redistribute it and/or modify 9 9 * it under the terms of the GNU General Public License version 2 as 10 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 13 #include <linux/kernel.h>
-17
arch/arm/mach-s3c2410/mach-h1940.c
··· 9 9 * it under the terms of the GNU General Public License version 2 as 10 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 14 #include <linux/kernel.h>
-9
arch/arm/mach-s3c2410/mach-rx3715.c
··· 9 9 * it under the terms of the GNU General Public License version 2 as 10 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 14 #include <linux/kernel.h>
-4
arch/arm/mach-s3c2410/mach-smdk2410.c
··· 27 27 * derived from linux/arch/arm/mach-s3c2410/mach-bast.c, written by 28 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 32 #include <linux/kernel.h>
+14 -1
arch/arm/mach-s3c2410/mach-smdk2413.c
··· 112 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 129 /* Maintainer: Ben Dooks <ben@fluff.org> */ 117 130 .phys_io = S3C2410_PA_UART, 118 131 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
-19
arch/arm/mach-s3c2410/mach-vr1000.c
··· 10 10 * it under the terms of the GNU General Public License version 2 as 11 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 15 #include <linux/kernel.h>
+1 -4
arch/arm/mach-s3c2410/s3c2400-gpio.c
··· 17 17 * You should have received a copy of the GNU General Public License 18 18 * along with this program; if not, write to the Free Software 19 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 - * 21 - * Changelog 22 - * 15-Jan-2006 LCVR Splitted from gpio.c, adding support for the S3C2400 23 - */ 20 + */ 24 21 25 22 #include <linux/kernel.h> 26 23 #include <linux/init.h>
-8
arch/arm/mach-s3c2410/s3c2410.h
··· 9 9 * it under the terms of the GNU General Public License version 2 as 10 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 14 #ifdef CONFIG_CPU_S3C2410
+130
arch/arm/mach-s3c2410/s3c2412-irq.c
··· 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);
-3
arch/arm/mach-s3c2410/s3c2440-irq.c
··· 17 17 * along with this program; if not, write to the Free Software 18 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 22 #include <linux/init.h>
+6 -6
arch/arm/mach-s3c2410/s3c244x-irq.c
··· 17 17 * along with this program; if not, write to the Free Software 18 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 22 #include <linux/init.h> ··· 119 122 return 0; 120 123 } 121 124 122 - static struct sysdev_driver s3c244x_irq_driver = { 125 + static struct sysdev_driver s3c2440_irq_driver = { 123 126 .add = s3c244x_irq_add, 124 127 }; 125 128 126 129 static int s3c2440_irq_init(void) 127 130 { 128 - return sysdev_driver_register(&s3c2440_sysclass, &s3c244x_irq_driver); 131 + return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_irq_driver); 129 132 } 130 133 131 134 arch_initcall(s3c2440_irq_init); 132 135 136 + static struct sysdev_driver s3c2442_irq_driver = { 137 + .add = s3c244x_irq_add, 138 + }; 133 139 134 140 static int s3c2442_irq_init(void) 135 141 { 136 - return sysdev_driver_register(&s3c2442_sysclass, &s3c244x_irq_driver); 142 + return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_irq_driver); 137 143 } 138 144 139 145 arch_initcall(s3c2442_irq_init);
+1 -1
arch/arm/mm/proc-arm926.S
··· 480 480 b __arm926_setup 481 481 .long cpu_arch_name 482 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 484 .long cpu_arm926_name 485 485 .long arm926_processor_functions 486 486 .long v4wbi_tlb_fns
+4
arch/frv/Kconfig
··· 29 29 bool 30 30 default n 31 31 32 + config GENERIC_TIME 33 + bool 34 + default y 35 + 32 36 config TIME_LOW_RES 33 37 bool 34 38 default y
-81
arch/frv/kernel/time.c
··· 32 32 33 33 #define TICK_SIZE (tick_nsec / 1000) 34 34 35 - extern unsigned long wall_jiffies; 36 - 37 35 unsigned long __nongprelbss __clkin_clock_speed_HZ; 38 36 unsigned long __nongprelbss __ext_bus_clock_speed_HZ; 39 37 unsigned long __nongprelbss __res_bus_clock_speed_HZ; ··· 141 143 142 144 time_divisor_init(); 143 145 } 144 - 145 - /* 146 - * This version of gettimeofday has near microsecond resolution. 147 - */ 148 - void do_gettimeofday(struct timeval *tv) 149 - { 150 - unsigned long seq; 151 - unsigned long usec, sec; 152 - unsigned long max_ntp_tick; 153 - 154 - do { 155 - unsigned long lost; 156 - 157 - seq = read_seqbegin(&xtime_lock); 158 - 159 - usec = 0; 160 - lost = jiffies - wall_jiffies; 161 - 162 - /* 163 - * If time_adjust is negative then NTP is slowing the clock 164 - * so make sure not to go into next possible interval. 165 - * Better to lose some accuracy than have time go backwards.. 166 - */ 167 - if (unlikely(time_adjust < 0)) { 168 - max_ntp_tick = (USEC_PER_SEC / HZ) - tickadj; 169 - usec = min(usec, max_ntp_tick); 170 - 171 - if (lost) 172 - usec += lost * max_ntp_tick; 173 - } 174 - else if (unlikely(lost)) 175 - usec += lost * (USEC_PER_SEC / HZ); 176 - 177 - sec = xtime.tv_sec; 178 - usec += (xtime.tv_nsec / 1000); 179 - } while (read_seqretry(&xtime_lock, seq)); 180 - 181 - while (usec >= 1000000) { 182 - usec -= 1000000; 183 - sec++; 184 - } 185 - 186 - tv->tv_sec = sec; 187 - tv->tv_usec = usec; 188 - } 189 - 190 - EXPORT_SYMBOL(do_gettimeofday); 191 - 192 - int do_settimeofday(struct timespec *tv) 193 - { 194 - time_t wtm_sec, sec = tv->tv_sec; 195 - long wtm_nsec, nsec = tv->tv_nsec; 196 - 197 - if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC) 198 - return -EINVAL; 199 - 200 - write_seqlock_irq(&xtime_lock); 201 - /* 202 - * This is revolting. We need to set "xtime" correctly. However, the 203 - * value in this location is the value at the most recent update of 204 - * wall time. Discover what correction gettimeofday() would have 205 - * made, and then undo it! 206 - */ 207 - nsec -= 0 * NSEC_PER_USEC; 208 - nsec -= (jiffies - wall_jiffies) * TICK_NSEC; 209 - 210 - wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec); 211 - wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec); 212 - 213 - set_normalized_timespec(&xtime, sec, nsec); 214 - set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec); 215 - 216 - ntp_clear(); 217 - write_sequnlock_irq(&xtime_lock); 218 - clock_was_set(); 219 - return 0; 220 - } 221 - 222 - EXPORT_SYMBOL(do_settimeofday); 223 146 224 147 /* 225 148 * Scheduler clock - returns current time in nanosec units.
+28
arch/i386/kernel/audit.c
··· 8 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 21 static unsigned chattr_class[] = { 12 22 #include <asm-generic/audit_change_attr.h> 13 23 ~0U 14 24 }; 15 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 + case __NR_socketcall: 34 + return 4; 35 + case __NR_execve: 36 + return 5; 37 + default: 38 + return 0; 39 + } 40 + } 41 + 16 42 static int __init audit_classes_init(void) 17 43 { 44 + audit_register_class(AUDIT_CLASS_WRITE, write_class); 45 + audit_register_class(AUDIT_CLASS_READ, read_class); 18 46 audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); 19 47 audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); 20 48 return 0;
+26
arch/ia64/ia32/audit.c
··· 9 9 #include <asm-generic/audit_change_attr.h> 10 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 + }
+35
arch/ia64/kernel/audit.c
··· 8 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 21 static unsigned chattr_class[] = { 12 22 #include <asm-generic/audit_change_attr.h> 13 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 45 static int __init audit_classes_init(void) 17 46 { 18 47 #ifdef CONFIG_IA32_SUPPORT 19 48 extern __u32 ia32_dir_class[]; 49 + extern __u32 ia32_write_class[]; 50 + extern __u32 ia32_read_class[]; 20 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 54 audit_register_class(AUDIT_CLASS_DIR_WRITE_32, ia32_dir_class); 22 55 audit_register_class(AUDIT_CLASS_CHATTR_32, ia32_chattr_class); 23 56 #endif 57 + audit_register_class(AUDIT_CLASS_WRITE, write_class); 58 + audit_register_class(AUDIT_CLASS_READ, read_class); 24 59 audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); 25 60 audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); 26 61 return 0;
+2 -2
arch/ia64/kernel/entry.S
··· 1605 1605 data8 sys_ni_syscall // 1295 reserved for ppoll 1606 1606 data8 sys_unshare 1607 1607 data8 sys_splice 1608 - data8 sys_set_robust_list 1609 - data8 sys_get_robust_list 1608 + data8 sys_ni_syscall // reserved for set_robust_list 1609 + data8 sys_ni_syscall // reserved for get_robust_list 1610 1610 data8 sys_sync_file_range // 1300 1611 1611 data8 sys_tee 1612 1612 data8 sys_vmsplice
+5
arch/ia64/kernel/head.S
··· 197 197 ;; 198 198 srlz.i 199 199 ;; 200 + { 201 + flushrs // must be first insn in group 202 + srlz.i 203 + } 204 + ;; 200 205 /* 201 206 * Save the region registers, predicate before they get clobbered 202 207 */
+3 -1
arch/ia64/kernel/perfmon.c
··· 4936 4936 if (likely(ctx)) { 4937 4937 DPRINT(("context unlocked\n")); 4938 4938 UNPROTECT_CTX(ctx, flags); 4939 - fput(file); 4940 4939 } 4941 4940 4942 4941 /* copy argument back to user, if needed */ 4943 4942 if (call_made && PFM_CMD_RW_ARG(cmd) && copy_to_user(arg, args_k, base_sz*count)) ret = -EFAULT; 4944 4943 4945 4944 error_args: 4945 + if (file) 4946 + fput(file); 4947 + 4946 4948 kfree(args_k); 4947 4949 4948 4950 DPRINT(("cmd=%s ret=%ld\n", PFM_CMD_NAME(cmd), ret));
+16 -12
arch/ia64/kernel/sys_ia64.c
··· 163 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 182 static inline unsigned long 167 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 185 struct file *file = NULL; 171 186 172 187 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); ··· 199 184 /* Careful about overflows.. */ 200 185 len = PAGE_ALIGN(len); 201 186 if (!len || len > TASK_SIZE) { 202 - addr = -EINVAL; 203 - goto out; 204 - } 205 - 206 - /* 207 - * Don't permit mappings into unmapped space, the virtual page table of a region, 208 - * or across a region boundary. Note: RGN_MAP_LIMIT is equal to 2^n-PAGE_SIZE 209 - * (for some integer n <= 61) and len > 0. 210 - */ 211 - roff = REGION_OFFSET(addr); 212 - if ((len > RGN_MAP_LIMIT) || (roff > (RGN_MAP_LIMIT - len))) { 213 187 addr = -EINVAL; 214 188 goto out; 215 189 }
+1 -1
arch/ia64/sn/kernel/setup.c
··· 565 565 * Also sets up a few fields in the nodepda. Also known as 566 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 570 int cpuid; 571 571 int cpuphyid;
+2
arch/powerpc/kernel/Makefile
··· 70 70 kexec-$(CONFIG_PPC64) := machine_kexec_64.o 71 71 kexec-$(CONFIG_PPC32) := machine_kexec_32.o 72 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 76 ifeq ($(CONFIG_PPC_ISERIES),y) 75 77 $(obj)/head_64.o: $(obj)/lparmap.s
+66
arch/powerpc/kernel/audit.c
··· 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);
+38
arch/powerpc/kernel/compat_audit.c
··· 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 + }
+3 -1
arch/s390/kernel/Makefile
··· 16 16 obj-$(CONFIG_MODULES) += s390_ksyms.o module.o 17 17 obj-$(CONFIG_SMP) += smp.o 18 18 19 + obj-$(CONFIG_AUDIT) += audit.o 20 + compat-obj-$(CONFIG_AUDIT) += compat_audit.o 19 21 obj-$(CONFIG_COMPAT) += compat_linux.o compat_signal.o \ 20 22 compat_wrapper.o compat_exec_domain.o \ 21 - binfmt_elf32.o 23 + binfmt_elf32.o $(compat-obj-y) 22 24 23 25 obj-$(CONFIG_VIRT_TIMER) += vtime.o 24 26 obj-$(CONFIG_STACKTRACE) += stacktrace.o
+66
arch/s390/kernel/audit.c
··· 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);
+38
arch/s390/kernel/compat_audit.c
··· 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 + }
+15 -12
arch/sparc/kernel/sys_sparc.c
··· 219 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 237 /* Linux version of mmap */ 223 238 static unsigned long do_mmap2(unsigned long addr, unsigned long len, 224 239 unsigned long prot, unsigned long flags, unsigned long fd, ··· 248 233 goto out; 249 234 } 250 235 251 - retval = -EINVAL; 252 236 len = PAGE_ALIGN(len); 253 - if (ARCH_SUN4C_SUN4 && 254 - (len > 0x20000000 || 255 - ((flags & MAP_FIXED) && 256 - addr < 0xe0000000 && addr + len > 0x20000000))) 257 - goto out_putf; 258 - 259 - /* See asm-sparc/uaccess.h */ 260 - if (len > TASK_SIZE - PAGE_SIZE || addr + len > TASK_SIZE - PAGE_SIZE) 261 - goto out_putf; 262 - 263 237 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); 264 238 265 239 down_write(&current->mm->mmap_sem); 266 240 retval = do_mmap_pgoff(file, addr, len, prot, flags, pgoff); 267 241 up_write(&current->mm->mmap_sem); 268 242 269 - out_putf: 270 243 if (file) 271 244 fput(file); 272 245 out:
+20 -16
arch/sparc64/kernel/sys_sparc.c
··· 548 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 571 /* Linux version of mmap */ 552 572 asmlinkage unsigned long sys_mmap(unsigned long addr, unsigned long len, 553 573 unsigned long prot, unsigned long flags, unsigned long fd, ··· 583 563 } 584 564 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); 585 565 len = PAGE_ALIGN(len); 586 - retval = -EINVAL; 587 - 588 - if (test_thread_flag(TIF_32BIT)) { 589 - if (len >= STACK_TOP32) 590 - goto out_putf; 591 - 592 - if ((flags & MAP_FIXED) && addr > STACK_TOP32 - len) 593 - goto out_putf; 594 - } else { 595 - if (len >= VA_EXCLUDE_START) 596 - goto out_putf; 597 - 598 - if ((flags & MAP_FIXED) && invalid_64bit_range(addr, len)) 599 - goto out_putf; 600 - } 601 566 602 567 down_write(&current->mm->mmap_sem); 603 568 retval = do_mmap(file, addr, len, prot, flags, off); 604 569 up_write(&current->mm->mmap_sem); 605 570 606 - out_putf: 607 571 if (file) 608 572 fput(file); 609 573 out:
+26
arch/x86_64/ia32/audit.c
··· 9 9 #include <asm-generic/audit_change_attr.h> 10 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 + }
+35
arch/x86_64/kernel/audit.c
··· 8 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 21 static unsigned chattr_class[] = { 12 22 #include <asm-generic/audit_change_attr.h> 13 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 45 static int __init audit_classes_init(void) 17 46 { 18 47 #ifdef CONFIG_IA32_EMULATION 19 48 extern __u32 ia32_dir_class[]; 49 + extern __u32 ia32_write_class[]; 50 + extern __u32 ia32_read_class[]; 20 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 54 audit_register_class(AUDIT_CLASS_DIR_WRITE_32, ia32_dir_class); 22 55 audit_register_class(AUDIT_CLASS_CHATTR_32, ia32_chattr_class); 23 56 #endif 57 + audit_register_class(AUDIT_CLASS_WRITE, write_class); 58 + audit_register_class(AUDIT_CLASS_READ, read_class); 24 59 audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); 25 60 audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); 26 61 return 0;
+2
drivers/ide/ide-proc.c
··· 376 376 break; 377 377 case ide_floppy:media = "floppy\n"; 378 378 break; 379 + case ide_optical:media = "optical\n"; 380 + break; 379 381 default: media = "UNKNOWN\n"; 380 382 break; 381 383 }
+6 -6
drivers/ide/pci/aec62xx.c
··· 425 425 return d->init_setup(dev, d); 426 426 } 427 427 428 - static const struct pci_device_id aec62xx_pci_tbl[] = { 429 - { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP850UF), 0 }, 430 - { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP860), 1 }, 431 - { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP860R), 2 }, 432 - { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP865), 3 }, 433 - { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP865R), 4 }, 428 + static struct pci_device_id aec62xx_pci_tbl[] = { 429 + { PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP850UF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, 430 + { PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP860, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, 431 + { PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP860R, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2 }, 432 + { PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP865, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3 }, 433 + { PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP865R, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 }, 434 434 { 0, }, 435 435 }; 436 436 MODULE_DEVICE_TABLE(pci, aec62xx_pci_tbl);
+5 -5
drivers/ide/pci/serverworks.c
··· 649 649 } 650 650 651 651 static struct pci_device_id svwks_pci_tbl[] = { 652 - { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4IDE), 0}, 653 - { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5IDE), 1}, 654 - { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE), 2}, 655 - { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2), 3}, 656 - { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT1000IDE), 4}, 652 + { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 653 + { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, 654 + { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2}, 655 + { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3}, 656 + { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT1000IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4}, 657 657 { 0, }, 658 658 }; 659 659 MODULE_DEVICE_TABLE(pci, svwks_pci_tbl);
+3 -3
drivers/ide/pci/siimage.c
··· 1082 1082 } 1083 1083 1084 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 1086 #ifdef CONFIG_BLK_DEV_IDE_SATA 1087 - { PCI_DEVICE(PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_3112), 1}, 1088 - { PCI_DEVICE(PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_1210SA), 2}, 1087 + { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_3112, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, 1088 + { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_1210SA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2}, 1089 1089 #endif 1090 1090 { 0, }, 1091 1091 };
+2
drivers/ide/pci/sis5513.c
··· 86 86 u8 chipset_family; 87 87 u8 flags; 88 88 } SiSHostChipInfo[] = { 89 + { "SiS968", PCI_DEVICE_ID_SI_968, ATA_133 }, 90 + { "SiS966", PCI_DEVICE_ID_SI_966, ATA_133 }, 89 91 { "SiS965", PCI_DEVICE_ID_SI_965, ATA_133 }, 90 92 { "SiS745", PCI_DEVICE_ID_SI_745, ATA_100 }, 91 93 { "SiS735", PCI_DEVICE_ID_SI_735, ATA_100 },
+35 -34
drivers/mmc/imxmmc.c
··· 91 91 int dma_allocated; 92 92 93 93 unsigned char actual_bus_width; 94 + 95 + int prev_cmd_code; 94 96 }; 95 97 96 98 #define IMXMCI_PEND_IRQ_b 0 ··· 250 248 * partial FIFO fills and reads. The length has to be rounded up to burst size multiple. 251 249 * This is required for SCR read at least. 252 250 */ 253 - if (datasz < 64) { 251 + if (datasz < 512) { 254 252 host->dma_size = datasz; 255 253 if (data->flags & MMC_DATA_READ) { 256 254 host->dma_dir = DMA_FROM_DEVICE; 257 255 258 256 /* Hack to enable read SCR */ 259 - if(datasz < 16) { 260 - MMC_NOB = 1; 261 - MMC_BLK_LEN = 16; 262 - } 257 + MMC_NOB = 1; 258 + MMC_BLK_LEN = 512; 263 259 } else { 264 260 host->dma_dir = DMA_TO_DEVICE; 265 261 } ··· 409 409 410 410 spin_unlock_irqrestore(&host->lock, flags); 411 411 412 + if(req && req->cmd) 413 + host->prev_cmd_code = req->cmd->opcode; 414 + 412 415 host->req = NULL; 413 416 host->cmd = NULL; 414 417 host->data = NULL; ··· 556 553 { 557 554 int i; 558 555 int burst_len; 559 - int flush_len; 560 556 int trans_done = 0; 561 557 unsigned int stat = *pstat; 562 558 ··· 568 566 dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data running STATUS = 0x%x\n", 569 567 stat); 570 568 569 + udelay(20); /* required for clocks < 8MHz*/ 570 + 571 571 if(host->dma_dir == DMA_FROM_DEVICE) { 572 572 imxmci_busy_wait_for_status(host, &stat, 573 573 STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE, 574 - 20, "imxmci_cpu_driven_data read"); 574 + 50, "imxmci_cpu_driven_data read"); 575 575 576 576 while((stat & (STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE)) && 577 - (host->data_cnt < host->dma_size)) { 578 - if(burst_len >= host->dma_size - host->data_cnt) { 579 - flush_len = burst_len; 580 - burst_len = host->dma_size - host->data_cnt; 581 - flush_len -= burst_len; 582 - host->data_cnt = host->dma_size; 583 - trans_done = 1; 584 - } else { 585 - flush_len = 0; 586 - host->data_cnt += burst_len; 587 - } 577 + (host->data_cnt < 512)) { 578 + 579 + udelay(20); /* required for clocks < 8MHz*/ 588 580 589 581 for(i = burst_len; i>=2 ; i-=2) { 590 - *(host->data_ptr++) = MMC_BUFFER_ACCESS; 591 - udelay(20); /* required for clocks < 8MHz*/ 582 + u16 data; 583 + data = MMC_BUFFER_ACCESS; 584 + udelay(10); /* required for clocks < 8MHz*/ 585 + if(host->data_cnt+2 <= host->dma_size) { 586 + *(host->data_ptr++) = data; 587 + } else { 588 + if(host->data_cnt < host->dma_size) 589 + *(u8*)(host->data_ptr) = data; 590 + } 591 + host->data_cnt += 2; 592 592 } 593 - 594 - if(i == 1) 595 - *(u8*)(host->data_ptr) = MMC_BUFFER_ACCESS; 596 593 597 594 stat = MMC_STATUS; 598 595 599 - /* Flush extra bytes from FIFO */ 600 - while(flush_len && !(stat & STATUS_DATA_TRANS_DONE)){ 601 - i = MMC_BUFFER_ACCESS; 602 - stat = MMC_STATUS; 603 - stat &= ~STATUS_CRC_READ_ERR; /* Stupid but required there */ 604 - } 605 - 606 - dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data read burst %d STATUS = 0x%x\n", 607 - burst_len, stat); 596 + dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data read %d burst %d STATUS = 0x%x\n", 597 + host->data_cnt, burst_len, stat); 608 598 } 599 + 600 + if((stat & STATUS_DATA_TRANS_DONE) && (host->data_cnt >= 512)) 601 + trans_done = 1; 602 + 603 + if(host->dma_size & 0x1ff) 604 + stat &= ~STATUS_CRC_READ_ERR; 605 + 609 606 } else { 610 607 imxmci_busy_wait_for_status(host, &stat, 611 608 STATUS_APPL_BUFF_FE, ··· 693 692 what, stat, MMC_INT_MASK); 694 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", 695 694 MMC_CMD_DAT_CONT, MMC_BLK_LEN, MMC_NOB, CCR(host->dma)); 696 - dev_err(mmc_dev(host->mmc), "CMD%d, bus %d-bit, dma_size = 0x%x\n", 697 - host->cmd?host->cmd->opcode:0, 1<<host->actual_bus_width, host->dma_size); 695 + 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, host->prev_cmd_code, 1<<host->actual_bus_width, host->dma_size); 698 697 } 699 698 700 699 if(!host->present || timeout)
+51 -4
drivers/mmc/mmc.c
··· 247 247 248 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 299 static int mmc_select_card(struct mmc_host *host, struct mmc_card *card); 251 300 252 301 /** ··· 957 908 { 958 909 int err; 959 910 struct mmc_card *card; 960 - 961 911 struct mmc_request mrq; 962 912 struct mmc_command cmd; 963 913 struct mmc_data data; 964 - 965 914 struct scatterlist sg; 966 915 967 916 list_for_each_entry(card, &host->cards, node) { ··· 994 947 995 948 memset(&data, 0, sizeof(struct mmc_data)); 996 949 997 - data.timeout_ns = card->csd.tacc_ns * 10; 998 - data.timeout_clks = card->csd.tacc_clks * 10; 950 + mmc_set_data_timeout(&data, card, 0); 951 + 999 952 data.blksz_bits = 3; 1000 953 data.blksz = 1 << 3; 1001 954 data.blocks = 1;
+7 -53
drivers/mmc/mmc_block.c
··· 30 30 #include <linux/mutex.h> 31 31 32 32 #include <linux/mmc/card.h> 33 + #include <linux/mmc/host.h> 33 34 #include <linux/mmc/protocol.h> 34 35 35 36 #include <asm/system.h> ··· 172 171 173 172 brq.cmd.arg = req->sector << 9; 174 173 brq.cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; 175 - brq.data.timeout_ns = card->csd.tacc_ns * 10; 176 - brq.data.timeout_clks = card->csd.tacc_clks * 10; 177 174 brq.data.blksz_bits = md->block_bits; 178 175 brq.data.blksz = 1 << md->block_bits; 179 176 brq.data.blocks = req->nr_sectors >> (md->block_bits - 9); 180 177 brq.stop.opcode = MMC_STOP_TRANSMISSION; 181 178 brq.stop.arg = 0; 182 179 brq.stop.flags = MMC_RSP_R1B | MMC_CMD_AC; 180 + 181 + mmc_set_data_timeout(&brq.data, card, rq_data_dir(req) != READ); 183 182 184 183 if (rq_data_dir(req) == READ) { 185 184 brq.cmd.opcode = brq.data.blocks > 1 ? MMC_READ_MULTIPLE_BLOCK : MMC_READ_SINGLE_BLOCK; ··· 188 187 brq.cmd.opcode = MMC_WRITE_BLOCK; 189 188 brq.data.flags |= MMC_DATA_WRITE; 190 189 brq.data.blocks = 1; 191 - 192 - /* 193 - * Scale up the timeout by the r2w factor 194 - */ 195 - brq.data.timeout_ns <<= card->csd.r2w_factor; 196 - brq.data.timeout_clks <<= card->csd.r2w_factor; 197 190 } 198 191 199 192 if (brq.data.blocks > 1) { ··· 319 324 md->read_only = mmc_blk_readonly(card); 320 325 321 326 /* 322 - * Figure out a workable block size. MMC cards have: 323 - * - two block sizes, one for read and one for write. 324 - * - may support partial reads and/or writes 325 - * (allows block sizes smaller than specified) 327 + * Both SD and MMC specifications state (although a bit 328 + * unclearly in the MMC case) that a block size of 512 329 + * bytes must always be supported by the card. 326 330 */ 327 - md->block_bits = card->csd.read_blkbits; 328 - if (card->csd.write_blkbits != card->csd.read_blkbits) { 329 - if (card->csd.write_blkbits < card->csd.read_blkbits && 330 - card->csd.read_partial) { 331 - /* 332 - * write block size is smaller than read block 333 - * size, but we support partial reads, so choose 334 - * the smaller write block size. 335 - */ 336 - md->block_bits = card->csd.write_blkbits; 337 - } else if (card->csd.write_blkbits > card->csd.read_blkbits && 338 - card->csd.write_partial) { 339 - /* 340 - * read block size is smaller than write block 341 - * size, but we support partial writes. Use read 342 - * block size. 343 - */ 344 - } else { 345 - /* 346 - * We don't support this configuration for writes. 347 - */ 348 - printk(KERN_ERR "%s: unable to select block size for " 349 - "writing (rb%u wb%u rp%u wp%u)\n", 350 - mmc_card_id(card), 351 - 1 << card->csd.read_blkbits, 352 - 1 << card->csd.write_blkbits, 353 - card->csd.read_partial, 354 - card->csd.write_partial); 355 - md->read_only = 1; 356 - } 357 - } 358 - 359 - /* 360 - * Refuse to allow block sizes smaller than 512 bytes. 361 - */ 362 - if (md->block_bits < 9) { 363 - printk(KERN_ERR "%s: unable to support block size %u\n", 364 - mmc_card_id(card), 1 << md->block_bits); 365 - ret = -EINVAL; 366 - goto err_kfree; 367 - } 331 + md->block_bits = 9; 368 332 369 333 md->disk = alloc_disk(1 << MMC_SHIFT); 370 334 if (md->disk == NULL) {
+1 -1
drivers/net/Kconfig
··· 2393 2393 you will need a newer firmware image. 2394 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 2398 To compile this driver as a module, choose M here and read 2399 2399 <file:Documentation/networking/net-modules.txt>. The module
+2 -2
drivers/net/dm9000.c
··· 377 377 kfree(db->data_req); 378 378 } 379 379 380 - if (db->addr_res != NULL) { 381 - release_resource(db->addr_res); 380 + if (db->addr_req != NULL) { 381 + release_resource(db->addr_req); 382 382 kfree(db->addr_req); 383 383 } 384 384 }
+2 -2
drivers/usb/input/hid-core.c
··· 1444 1444 #define USB_DEVICE_ID_GTCO_402 0x0402 1445 1445 #define USB_DEVICE_ID_GTCO_403 0x0403 1446 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 1448 #define USB_DEVICE_ID_GTCO_500 0x0500 1449 1449 #define USB_DEVICE_ID_GTCO_501 0x0501 1450 1450 #define USB_DEVICE_ID_GTCO_502 0x0502 ··· 1657 1657 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_402, HID_QUIRK_IGNORE }, 1658 1658 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_403, HID_QUIRK_IGNORE }, 1659 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 1661 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_500, HID_QUIRK_IGNORE }, 1662 1662 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_501, HID_QUIRK_IGNORE }, 1663 1663 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_502, HID_QUIRK_IGNORE },
+1 -1
drivers/usb/input/usbtouchscreen.c
··· 286 286 static int itm_read_data(unsigned char *pkt, int *x, int *y, int *touch, int *press) 287 287 { 288 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 290 *press = ((pkt[2] & 0x1F) << 7) | (pkt[5] & 0x7F); 291 291 *touch = ~pkt[7] & 0x20; 292 292
+2
drivers/usb/misc/sisusbvga/sisusb.c
··· 3435 3435 3436 3436 static struct usb_device_id sisusb_table [] = { 3437 3437 { USB_DEVICE(0x0711, 0x0900) }, 3438 + { USB_DEVICE(0x0711, 0x0901) }, 3439 + { USB_DEVICE(0x0711, 0x0902) }, 3438 3440 { USB_DEVICE(0x182d, 0x021c) }, 3439 3441 { USB_DEVICE(0x182d, 0x0269) }, 3440 3442 { }
+1
drivers/usb/serial/ftdi_sio.c
··· 506 506 { USB_DEVICE(FTDI_VID, FTDI_YEI_SERVOCENTER31_PID) }, 507 507 { USB_DEVICE(FTDI_VID, FTDI_THORLABS_PID) }, 508 508 { USB_DEVICE(TESTO_VID, TESTO_USB_INTERFACE_PID) }, 509 + { USB_DEVICE(FTDI_VID, FTDI_GAMMA_SCOUT_PID) }, 509 510 { }, /* Optional parameter entry */ 510 511 { } /* Terminating entry */ 511 512 };
+5
drivers/usb/serial/ftdi_sio.h
··· 467 467 #define TESTO_VID 0x128D 468 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 475 /* Commands */ 471 476 #define FTDI_SIO_RESET 0 /* Reset the port */ 472 477 #define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */
+7 -4
fs/ext3/inode.c
··· 1009 1009 buffer_trace_init(&dummy.b_history); 1010 1010 err = ext3_get_blocks_handle(handle, inode, block, 1, 1011 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 1019 err = 0; 1014 - } else if (err >= 0) { 1015 - WARN_ON(1); 1016 - err = -EIO; 1017 1020 } 1018 1021 *errp = err; 1019 1022 if (!err && buffer_mapped(&dummy)) {
+14 -36
fs/nfs/direct.c
··· 100 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 104 * nfs_direct_IO - NFS address space operation for direct I/O 124 105 * @rw: direction (read or write) ··· 257 276 struct nfs_open_context *ctx = dreq->ctx; 258 277 struct inode *inode = ctx->dentry->d_inode; 259 278 size_t rsize = NFS_SERVER(inode)->rsize; 260 - unsigned int rpages = nfs_max_pages(rsize); 261 279 unsigned int pgbase; 262 280 int result; 263 281 ssize_t started = 0; 264 282 265 283 get_dreq(dreq); 266 284 267 - pgbase = user_addr & ~PAGE_MASK; 268 285 do { 269 286 struct nfs_read_data *data; 270 287 size_t bytes; 271 288 289 + pgbase = user_addr & ~PAGE_MASK; 290 + bytes = min(rsize,count); 291 + 272 292 result = -ENOMEM; 273 - data = nfs_readdata_alloc(rpages); 293 + data = nfs_readdata_alloc(pgbase + bytes); 274 294 if (unlikely(!data)) 275 295 break; 276 296 277 - bytes = rsize; 278 - if (count < rsize) 279 - bytes = count; 280 - 281 - data->npages = nfs_direct_count_pages(user_addr, bytes); 282 297 down_read(&current->mm->mmap_sem); 283 298 result = get_user_pages(current, current->mm, user_addr, 284 299 data->npages, 1, 0, data->pagevec, NULL); ··· 321 344 started += bytes; 322 345 user_addr += bytes; 323 346 pos += bytes; 347 + /* FIXME: Remove this unnecessary math from final patch */ 324 348 pgbase += bytes; 325 349 pgbase &= ~PAGE_MASK; 350 + BUG_ON(pgbase != (user_addr & ~PAGE_MASK)); 326 351 327 352 count -= bytes; 328 353 } while (count != 0); ··· 503 524 504 525 static void nfs_alloc_commit_data(struct nfs_direct_req *dreq) 505 526 { 506 - dreq->commit_data = nfs_commit_alloc(0); 527 + dreq->commit_data = nfs_commit_alloc(); 507 528 if (dreq->commit_data != NULL) 508 529 dreq->commit_data->req = (struct nfs_page *) dreq; 509 530 } ··· 584 605 struct nfs_open_context *ctx = dreq->ctx; 585 606 struct inode *inode = ctx->dentry->d_inode; 586 607 size_t wsize = NFS_SERVER(inode)->wsize; 587 - unsigned int wpages = nfs_max_pages(wsize); 588 608 unsigned int pgbase; 589 609 int result; 590 610 ssize_t started = 0; 591 611 592 612 get_dreq(dreq); 593 613 594 - pgbase = user_addr & ~PAGE_MASK; 595 614 do { 596 615 struct nfs_write_data *data; 597 616 size_t bytes; 598 617 618 + pgbase = user_addr & ~PAGE_MASK; 619 + bytes = min(wsize,count); 620 + 599 621 result = -ENOMEM; 600 - data = nfs_writedata_alloc(wpages); 622 + data = nfs_writedata_alloc(pgbase + bytes); 601 623 if (unlikely(!data)) 602 624 break; 603 625 604 - bytes = wsize; 605 - if (count < wsize) 606 - bytes = count; 607 - 608 - data->npages = nfs_direct_count_pages(user_addr, bytes); 609 626 down_read(&current->mm->mmap_sem); 610 627 result = get_user_pages(current, current->mm, user_addr, 611 628 data->npages, 0, 0, data->pagevec, NULL); ··· 651 676 started += bytes; 652 677 user_addr += bytes; 653 678 pos += bytes; 679 + 680 + /* FIXME: Remove this useless math from the final patch */ 654 681 pgbase += bytes; 655 682 pgbase &= ~PAGE_MASK; 683 + BUG_ON(pgbase != (user_addr & ~PAGE_MASK)); 656 684 657 685 count -= bytes; 658 686 } while (count != 0);
+13 -11
fs/nfs/read.c
··· 43 43 44 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 49 struct nfs_read_data *p = mempool_alloc(nfs_rdata_mempool, SLAB_NOFS); 49 50 50 51 if (p) { 51 52 memset(p, 0, sizeof(*p)); 52 53 INIT_LIST_HEAD(&p->pages); 54 + p->npages = pagecount; 53 55 if (pagecount <= ARRAY_SIZE(p->page_array)) 54 56 p->pagevec = p->page_array; 55 57 else { ··· 142 140 int result; 143 141 struct nfs_read_data *rdata; 144 142 145 - rdata = nfs_readdata_alloc(1); 143 + rdata = nfs_readdata_alloc(count); 146 144 if (!rdata) 147 145 return -ENOMEM; 148 146 ··· 338 336 struct nfs_page *req = nfs_list_entry(head->next); 339 337 struct page *page = req->wb_page; 340 338 struct nfs_read_data *data; 341 - unsigned int rsize = NFS_SERVER(inode)->rsize; 342 - unsigned int nbytes, offset; 339 + size_t rsize = NFS_SERVER(inode)->rsize, nbytes; 340 + unsigned int offset; 343 341 int requests = 0; 344 342 LIST_HEAD(list); 345 343 346 344 nfs_list_remove_request(req); 347 345 348 346 nbytes = req->wb_bytes; 349 - for(;;) { 350 - data = nfs_readdata_alloc(1); 347 + do { 348 + size_t len = min(nbytes,rsize); 349 + 350 + data = nfs_readdata_alloc(len); 351 351 if (!data) 352 352 goto out_bad; 353 353 INIT_LIST_HEAD(&data->pages); 354 354 list_add(&data->pages, &list); 355 355 requests++; 356 - if (nbytes <= rsize) 357 - break; 358 - nbytes -= rsize; 359 - } 356 + nbytes -= len; 357 + } while(nbytes != 0); 360 358 atomic_set(&req->wb_complete, requests); 361 359 362 360 ClearPageError(page); ··· 404 402 if (NFS_SERVER(inode)->rsize < PAGE_CACHE_SIZE) 405 403 return nfs_pagein_multi(head, inode); 406 404 407 - data = nfs_readdata_alloc(NFS_SERVER(inode)->rpages); 405 + data = nfs_readdata_alloc(NFS_SERVER(inode)->rsize); 408 406 if (!data) 409 407 goto out_bad; 410 408
+15 -22
fs/nfs/write.c
··· 90 90 91 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 95 struct nfs_write_data *p = mempool_alloc(nfs_commit_mempool, SLAB_NOFS); 96 96 97 97 if (p) { 98 98 memset(p, 0, sizeof(*p)); 99 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 101 return p; 111 102 } ··· 108 117 mempool_free(p, nfs_commit_mempool); 109 118 } 110 119 111 - struct nfs_write_data *nfs_writedata_alloc(unsigned int pagecount) 120 + struct nfs_write_data *nfs_writedata_alloc(size_t len) 112 121 { 122 + unsigned int pagecount = (len + PAGE_SIZE - 1) >> PAGE_SHIFT; 113 123 struct nfs_write_data *p = mempool_alloc(nfs_wdata_mempool, SLAB_NOFS); 114 124 115 125 if (p) { 116 126 memset(p, 0, sizeof(*p)); 117 127 INIT_LIST_HEAD(&p->pages); 128 + p->npages = pagecount; 118 129 if (pagecount <= ARRAY_SIZE(p->page_array)) 119 130 p->pagevec = p->page_array; 120 131 else { ··· 201 208 int result, written = 0; 202 209 struct nfs_write_data *wdata; 203 210 204 - wdata = nfs_writedata_alloc(1); 211 + wdata = nfs_writedata_alloc(wsize); 205 212 if (!wdata) 206 213 return -ENOMEM; 207 214 ··· 992 999 struct nfs_page *req = nfs_list_entry(head->next); 993 1000 struct page *page = req->wb_page; 994 1001 struct nfs_write_data *data; 995 - unsigned int wsize = NFS_SERVER(inode)->wsize; 996 - unsigned int nbytes, offset; 1002 + size_t wsize = NFS_SERVER(inode)->wsize, nbytes; 1003 + unsigned int offset; 997 1004 int requests = 0; 998 1005 LIST_HEAD(list); 999 1006 1000 1007 nfs_list_remove_request(req); 1001 1008 1002 1009 nbytes = req->wb_bytes; 1003 - for (;;) { 1004 - data = nfs_writedata_alloc(1); 1010 + do { 1011 + size_t len = min(nbytes, wsize); 1012 + 1013 + data = nfs_writedata_alloc(len); 1005 1014 if (!data) 1006 1015 goto out_bad; 1007 1016 list_add(&data->pages, &list); 1008 1017 requests++; 1009 - if (nbytes <= wsize) 1010 - break; 1011 - nbytes -= wsize; 1012 - } 1018 + nbytes -= len; 1019 + } while (nbytes != 0); 1013 1020 atomic_set(&req->wb_complete, requests); 1014 1021 1015 1022 ClearPageError(page); ··· 1063 1070 struct nfs_write_data *data; 1064 1071 unsigned int count; 1065 1072 1066 - data = nfs_writedata_alloc(NFS_SERVER(inode)->wpages); 1073 + data = nfs_writedata_alloc(NFS_SERVER(inode)->wsize); 1067 1074 if (!data) 1068 1075 goto out_bad; 1069 1076 ··· 1371 1378 struct nfs_write_data *data; 1372 1379 struct nfs_page *req; 1373 1380 1374 - data = nfs_commit_alloc(NFS_SERVER(inode)->wpages); 1381 + data = nfs_commit_alloc(); 1375 1382 1376 1383 if (!data) 1377 1384 goto out_bad;
+1
fs/super.c
··· 49 49 50 50 /** 51 51 * alloc_super - create new superblock 52 + * @type: filesystem type superblock should belong to 52 53 * 53 54 * Allocates and initializes a new &struct super_block. alloc_super() 54 55 * returns a pointer new superblock or %NULL if allocation had failed.
-3
include/asm-arm/arch-s3c2410/anubis-cpld.h
··· 9 9 * This program is free software; you can redistribute it and/or modify 10 10 * it under the terms of the GNU General Public License version 2 as 11 11 * published by the Free Software Foundation. 12 - * 13 - * Changelog: 14 - * 15 12 */ 16 13 17 14 #ifndef __ASM_ARCH_ANUBISCPLD_H
+1 -3
include/asm-arm/arch-s3c2410/anubis-irq.h
··· 9 9 * This program is free software; you can redistribute it and/or modify 10 10 * it under the terms of the GNU General Public License version 2 as 11 11 * published by the Free Software Foundation. 12 - * 13 - * Changelog: 14 - */ 12 + */ 15 13 16 14 #ifndef __ASM_ARCH_ANUBISIRQ_H 17 15 #define __ASM_ARCH_ANUBISIRQ_H
-2
include/asm-arm/arch-s3c2410/anubis-map.h
··· 9 9 * This program is free software; you can redistribute it and/or modify 10 10 * it under the terms of the GNU General Public License version 2 as 11 11 * published by the Free Software Foundation. 12 - * 13 - * Changelog: 14 12 */ 15 13 16 14 /* needs arch/map.h including with this */
-4
include/asm-arm/arch-s3c2410/audio.h
··· 9 9 * This program is free software; you can redistribute it and/or modify 10 10 * it under the terms of the GNU General Public License version 2 as 11 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 14 #ifndef __ASM_ARCH_AUDIO_H
-5
include/asm-arm/arch-s3c2410/bast-cpld.h
··· 8 8 * This program is free software; you can redistribute it and/or modify 9 9 * it under the terms of the GNU General Public License version 2 as 10 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 13 #ifndef __ASM_ARCH_BASTCPLD_H
+1 -5
include/asm-arm/arch-s3c2410/bast-irq.h
··· 8 8 * This program is free software; you can redistribute it and/or modify 9 9 * it under the terms of the GNU General Public License version 2 as 10 10 * published by the Free Software Foundation. 11 - * 12 - * Changelog: 13 - * 14-Sep-2004 BJD Fixed IRQ_USBOC definition 14 - * 06-Jan-2003 BJD Linux 2.6.0 version 15 - */ 11 + */ 16 12 17 13 #ifndef __ASM_ARCH_BASTIRQ_H 18 14 #define __ASM_ARCH_BASTIRQ_H
-4
include/asm-arm/arch-s3c2410/bast-map.h
··· 8 8 * This program is free software; you can redistribute it and/or modify 9 9 * it under the terms of the GNU General Public License version 2 as 10 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 13 /* needs arch/map.h including with this */
-3
include/asm-arm/arch-s3c2410/bast-pmu.h
··· 9 9 * This program is free software; you can redistribute it and/or modify 10 10 * it under the terms of the GNU General Public License version 2 as 11 11 * published by the Free Software Foundation. 12 - * 13 - * Changelog: 14 - * 08-Oct-2003 BJD Initial creation 15 12 */ 16 13 17 14 #ifndef __ASM_ARCH_BASTPMU_H
-3
include/asm-arm/arch-s3c2410/debug-macro.S
··· 10 10 * This program is free software; you can redistribute it and/or modify 11 11 * it under the terms of the GNU General Public License version 2 as 12 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 15 #include <asm/arch/map.h>
-7
include/asm-arm/arch-s3c2410/fb.h
··· 7 7 * This program is free software; you can redistribute it and/or modify 8 8 * it under the terms of the GNU General Public License version 2 as 9 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 12 #ifndef __ASM_ARM_FB_H
-10
include/asm-arm/arch-s3c2410/hardware.h
··· 8 8 * This program is free software; you can redistribute it and/or modify 9 9 * it under the terms of the GNU General Public License version 2 as 10 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 13 #ifndef __ASM_ARCH_HARDWARE_H
-4
include/asm-arm/arch-s3c2410/idle.h
··· 8 8 * published by the Free Software Foundation. 9 9 * 10 10 * S3C2410 CPU Idle controls 11 - * 12 - * Changelog: 13 - * 28-Oct-2004 BJD Initial version 14 - * 15 11 */ 16 12 17 13 #ifndef __ASM_ARCH_IDLE_H
-4
include/asm-arm/arch-s3c2410/iic.h
··· 8 8 * This program is free software; you can redistribute it and/or modify 9 9 * it under the terms of the GNU General Public License version 2 as 10 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 13 #ifndef __ASM_ARCH_IIC_H
+1 -7
include/asm-arm/arch-s3c2410/io.h
··· 4 4 * 5 5 * Copyright (C) 1997 Russell King 6 6 * (C) 2003 Simtec Electronics 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 - */ 7 + */ 14 8 15 9 #ifndef __ASM_ARM_ARCH_IO_H 16 10 #define __ASM_ARM_ARCH_IO_H
+1 -8
include/asm-arm/arch-s3c2410/irqs.h
··· 6 6 * This program is free software; you can redistribute it and/or modify 7 7 * it under the terms of the GNU General Public License version 2 as 8 8 * published by the Free Software Foundation. 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 - */ 9 + */ 17 10 18 11 19 12 #ifndef __ASM_ARCH_IRQS_H
-7
include/asm-arm/arch-s3c2410/map.h
··· 8 8 * This program is free software; you can redistribute it and/or modify 9 9 * it under the terms of the GNU General Public License version 2 as 10 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 13 #ifndef __ASM_ARCH_MAP_H
+1 -13
include/asm-arm/arch-s3c2410/memory.h
··· 1 - /* 2 - * linux/include/asm-arm/arch-s3c2410/memory.h 3 - * 1 + /* linux/include/asm-arm/arch-s3c2410/memory.h 4 2 * from linux/include/asm-arm/arch-rpc/memory.h 5 3 * 6 4 * Copyright (C) 1996,1997,1998 Russell King. ··· 6 8 * This program is free software; you can redistribute it and/or modify 7 9 * it under the terms of the GNU General Public License version 2 as 8 10 * published by the Free Software Foundation. 9 - * 10 - * Changelog: 11 - * 20-Oct-1996 RMK Created 12 - * 31-Dec-1997 RMK Fixed definitions to reduce warnings 13 - * 11-Jan-1998 RMK Uninlined to reduce hits on cache 14 - * 08-Feb-1998 RMK Added __virt_to_bus and __bus_to_virt 15 - * 21-Mar-1999 RMK Renamed to memory.h 16 - * RMK Added TASK_SIZE and PAGE_OFFSET 17 - * 05-Apr-2004 BJD Copied and altered for arch-s3c2410 18 - * 17-Mar-2005 LCVR Modified for S3C2400 19 11 */ 20 12 21 13 #ifndef __ASM_ARCH_MEMORY_H
-3
include/asm-arm/arch-s3c2410/nand.h
··· 8 8 * This program is free software; you can redistribute it and/or modify 9 9 * it under the terms of the GNU General Public License version 2 as 10 10 * published by the Free Software Foundation. 11 - * 12 - * Changelog: 13 - * 23-Sep-2004 BJD Created file 14 11 */ 15 12 16 13 /* struct s3c2410_nand_set
-2
include/asm-arm/arch-s3c2410/osiris-map.h
··· 9 9 * This program is free software; you can redistribute it and/or modify 10 10 * it under the terms of the GNU General Public License version 2 as 11 11 * published by the Free Software Foundation. 12 - * 13 - * Changelog: 14 12 */ 15 13 16 14 /* needs arch/map.h including with this */
-3
include/asm-arm/arch-s3c2410/regs-adc.h
··· 7 7 * published by the Free Software Foundation. 8 8 * 9 9 * S3C2410 ADC registers 10 - * 11 - * Changelog: 12 - * 27-09-2004 SAH Created file 13 10 */ 14 11 15 12 #ifndef __ASM_ARCH_REGS_ADC_H
-12
include/asm-arm/arch-s3c2410/regs-clock.h
··· 8 8 * published by the Free Software Foundation. 9 9 * 10 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 13 #ifndef __ASM_ARM_REGS_CLOCK
-15
include/asm-arm/arch-s3c2410/regs-gpio.h
··· 8 8 * published by the Free Software Foundation. 9 9 * 10 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
-4
include/asm-arm/arch-s3c2410/regs-gpioj.h
··· 8 8 * published by the Free Software Foundation. 9 9 * 10 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
-4
include/asm-arm/arch-s3c2410/regs-iic.h
··· 8 8 * published by the Free Software Foundation. 9 9 * 10 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 13 #ifndef __ASM_ARCH_REGS_IIC_H
+1 -11
include/asm-arm/arch-s3c2410/regs-iis.h
··· 8 8 * published by the Free Software Foundation. 9 9 * 10 10 * S3C2410 IIS register definition 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 - */ 11 + */ 22 12 23 13 #ifndef __ASM_ARCH_REGS_IIS_H 24 14 #define __ASM_ARCH_REGS_IIS_H
+1 -8
include/asm-arm/arch-s3c2410/regs-irq.h
··· 6 6 * This program is free software; you can redistribute it and/or modify 7 7 * it under the terms of the GNU General Public License version 2 as 8 8 * published by the Free Software Foundation. 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 - */ 9 + */ 17 10 18 11 19 12 #ifndef ___ASM_ARCH_REGS_IRQ_H
-8
include/asm-arm/arch-s3c2410/regs-lcd.h
··· 6 6 * This program is free software; you can redistribute it and/or modify 7 7 * it under the terms of the GNU General Public License version 2 as 8 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
-6
include/asm-arm/arch-s3c2410/regs-mem.h
··· 8 8 * published by the Free Software Foundation. 9 9 * 10 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 13 #ifndef __ASM_ARM_MEMREGS_H
-4
include/asm-arm/arch-s3c2410/regs-nand.h
··· 8 8 * published by the Free Software Foundation. 9 9 * 10 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 13 #ifndef __ASM_ARM_REGS_NAND
-5
include/asm-arm/arch-s3c2410/regs-rtc.h
··· 8 8 * published by the Free Software Foundation. 9 9 * 10 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 13 #ifndef __ASM_ARCH_REGS_RTC_H
-5
include/asm-arm/arch-s3c2410/regs-sdi.h
··· 8 8 * published by the Free Software Foundation. 9 9 * 10 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 13 #ifndef __ASM_ARM_REGS_SDI
+1 -4
include/asm-arm/arch-s3c2410/regs-serial.h
··· 27 27 * You should have received a copy of the GNU General Public License 28 28 * along with this program; if not, write to the Free Software 29 29 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 30 - * 31 - * Modifications: 32 - * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA (s3c2400 support) 33 - */ 30 + */ 34 31 35 32 #ifndef __ASM_ARM_REGS_SERIAL_H 36 33 #define __ASM_ARM_REGS_SERIAL_H
+1 -7
include/asm-arm/arch-s3c2410/regs-spi.h
··· 7 7 * published by the Free Software Foundation. 8 8 * 9 9 * S3C2410 SPI register definition 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 - */ 10 + */ 17 11 18 12 #ifndef __ASM_ARCH_REGS_SPI_H 19 13 #define __ASM_ARCH_REGS_SPI_H
-7
include/asm-arm/arch-s3c2410/regs-timer.h
··· 8 8 * published by the Free Software Foundation. 9 9 * 10 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
+1 -7
include/asm-arm/arch-s3c2410/regs-udc.h
··· 6 6 * modify it under the terms of the GNU General Public License as 7 7 * published by the Free Software Foundation; either version 2 of 8 8 * the License, or (at your option) any later version. 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 - */ 9 + */ 16 10 17 11 #ifndef __ASM_ARCH_REGS_UDC_H 18 12 #define __ASM_ARCH_REGS_UDC_H
+1 -6
include/asm-arm/arch-s3c2410/regs-watchdog.h
··· 1 - /* linux/include/asm/arch-s3c2410/regs0watchdog.h 1 + /* linux/include/asm/arch-s3c2410/regs-watchdog.h 2 2 * 3 3 * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk> 4 4 * http://www.simtec.co.uk/products/SWLINUX/ ··· 8 8 * published by the Free Software Foundation. 9 9 * 10 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
+1 -8
include/asm-arm/arch-s3c2410/system.h
··· 8 8 * This program is free software; you can redistribute it and/or modify 9 9 * it under the terms of the GNU General Public License version 2 as 10 10 * published by the Free Software Foundation. 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 - */ 11 + */ 19 12 20 13 #include <asm/hardware.h> 21 14 #include <asm/io.h>
-6
include/asm-arm/arch-s3c2410/timex.h
··· 8 8 * This program is free software; you can redistribute it and/or modify 9 9 * it under the terms of the GNU General Public License version 2 as 10 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 13 #ifndef __ASM_ARCH_TIMEX_H
-9
include/asm-arm/arch-s3c2410/uncompress.h
··· 8 8 * This program is free software; you can redistribute it and/or modify 9 9 * it under the terms of the GNU General Public License version 2 as 10 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 13 #ifndef __ASM_ARCH_UNCOMPRESS_H
-5
include/asm-arm/arch-s3c2410/usb-control.h
··· 8 8 * This program is free software; you can redistribute it and/or modify 9 9 * it under the terms of the GNU General Public License version 2 as 10 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 13 #ifndef __ASM_ARCH_USBCONTROL_H
+1 -5
include/asm-arm/arch-s3c2410/vmalloc.h
··· 10 10 * published by the Free Software Foundation. 11 11 * 12 12 * S3C2410 vmalloc definition 13 - * 14 - * Changelog: 15 - * 12-Mar-2004 BJD Fixed header, added include protection 16 - * 12=Mar-2004 BJD Fixed VMALLOC_END definitions 17 - */ 13 + */ 18 14 19 15 #ifndef __ASM_ARCH_VMALLOC_H 20 16 #define __ASM_ARCH_VMALLOC_H
-4
include/asm-arm/arch-s3c2410/vr1000-cpld.h
··· 8 8 * This program is free software; you can redistribute it and/or modify 9 9 * it under the terms of the GNU General Public License version 2 as 10 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 13 #ifndef __ASM_ARCH_VR1000CPLD_H
+1 -5
include/asm-arm/arch-s3c2410/vr1000-irq.h
··· 8 8 * This program is free software; you can redistribute it and/or modify 9 9 * it under the terms of the GNU General Public License version 2 as 10 10 * published by the Free Software Foundation. 11 - * 12 - * Changelog: 13 - * 06-Jan-2003 BJD Linux 2.6.0 version 14 - * 19-Mar-2004 BJD Updates for VR1000 15 - */ 11 + */ 16 12 17 13 #ifndef __ASM_ARCH_VR1000IRQ_H 18 14 #define __ASM_ARCH_VR1000IRQ_H
-6
include/asm-arm/arch-s3c2410/vr1000-map.h
··· 8 8 * This program is free software; you can redistribute it and/or modify 9 9 * it under the terms of the GNU General Public License version 2 as 10 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 13 /* needs arch/map.h including with this */
+1 -1
include/asm-arm/spinlock.h
··· 201 201 202 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 206 __asm__ __volatile__( 207 207 "1: ldrex %0, [%2]\n"
+8
include/asm-generic/audit_read.h
··· 1 + __NR_readlink, 2 + __NR_quotactl, 3 + __NR_listxattr, 4 + __NR_llistxattr, 5 + __NR_flistxattr, 6 + __NR_getxattr, 7 + __NR_lgetxattr, 8 + __NR_fgetxattr,
+11
include/asm-generic/audit_write.h
··· 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
+1 -1
include/asm-i386/Kbuild
··· 1 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 5 unifdef-y += mtrr.h vm86.h
+8
include/asm-ia64/mman.h
··· 22 22 #define MCL_CURRENT 1 /* lock all current mappings */ 23 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 33 #endif /* _ASM_IA64_MMAN_H */
+1 -2
include/asm-ia64/unistd.h
··· 286 286 /* 1294, 1295 reserved for pselect/ppoll */ 287 287 #define __NR_unshare 1296 288 288 #define __NR_splice 1297 289 - #define __NR_set_robust_list 1298 290 - #define __NR_get_robust_list 1299 289 + /* 1298, 1299 reserved for set_robust_list/get_robust_list */ 291 290 #define __NR_sync_file_range 1300 292 291 #define __NR_tee 1301 293 292 #define __NR_vmsplice 1302
+1 -1
include/asm-sh/page.h
··· 104 104 105 105 /* PFN start number, because of __MEMORY_START */ 106 106 #define PFN_START (__MEMORY_START >> PAGE_SHIFT) 107 - #define ARCH_PFN_OFFSET (FPN_START) 107 + #define ARCH_PFN_OFFSET (PFN_START) 108 108 #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) 109 109 #define pfn_valid(pfn) (((pfn) - PFN_START) < max_mapnr) 110 110 #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
+8
include/asm-sparc/mman.h
··· 35 35 36 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 46 #endif /* __SPARC_MMAN_H__ */
+8
include/asm-sparc64/mman.h
··· 35 35 36 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 46 #endif /* __SPARC64_MMAN_H__ */
+1 -1
include/linux/atmdev.h
··· 7 7 #define LINUX_ATMDEV_H 8 8 9 9 10 - #include <linux/device.h> 11 10 #include <linux/atmapi.h> 12 11 #include <linux/atm.h> 13 12 #include <linux/atmioc.h> ··· 209 210 210 211 #ifdef __KERNEL__ 211 212 213 + #include <linux/device.h> 212 214 #include <linux/wait.h> /* wait_queue_head_t */ 213 215 #include <linux/time.h> /* struct timeval */ 214 216 #include <linux/net.h>
+11
include/linux/audit.h
··· 132 132 #define AUDIT_CLASS_DIR_WRITE_32 1 133 133 #define AUDIT_CLASS_CHATTR 2 134 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 140 /* This bitmask is used to validate user input. It represents all bits that 137 141 * are currently used in an audit field constant understood by the kernel. ··· 181 177 #define AUDIT_EXIT 103 182 178 #define AUDIT_SUCCESS 104 /* exit >= 0; value ignored */ 183 179 #define AUDIT_WATCH 105 180 + #define AUDIT_PERM 106 184 181 185 182 #define AUDIT_ARG0 200 186 183 #define AUDIT_ARG1 (AUDIT_ARG0+1) ··· 257 252 #define AUDIT_ARCH_V850 (EM_V850|__AUDIT_ARCH_LE) 258 253 #define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) 259 254 255 + #define AUDIT_PERM_EXEC 1 256 + #define AUDIT_PERM_WRITE 2 257 + #define AUDIT_PERM_READ 4 258 + #define AUDIT_PERM_ATTR 8 259 + 260 260 struct audit_status { 261 261 __u32 mask; /* Bit mask for valid entries */ 262 262 __u32 enabled; /* 1 = enabled, 0 = disabled */ ··· 324 314 #define AUDITSC_FAILURE 2 325 315 #define AUDITSC_RESULT(x) ( ((long)(x))<0?AUDITSC_FAILURE:AUDITSC_SUCCESS ) 326 316 extern int __init audit_register_class(int class, unsigned *list); 317 + extern int audit_classify_syscall(int abi, unsigned syscall); 327 318 #ifdef CONFIG_AUDITSYSCALL 328 319 /* These are defined in auditsc.c */ 329 320 /* Public API */
+1
include/linux/hrtimer.h
··· 80 80 * @get_softirq_time: function to retrieve the current time from the softirq 81 81 * @curr_timer: the timer which is executing a callback right now 82 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 85 struct hrtimer_base { 85 86 clockid_t index;
+6 -1
include/linux/ktime.h
··· 56 56 #endif 57 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 63 * ktime_t definitions when using the 64-bit scalar representation: ··· 74 73 */ 75 74 static inline ktime_t ktime_set(const long secs, const unsigned long nsecs) 76 75 { 76 + #if (BITS_PER_LONG == 64) 77 + if (unlikely(secs >= KTIME_SEC_MAX)) 78 + return (ktime_t){ .tv64 = KTIME_MAX }; 79 + #endif 77 80 return (ktime_t) { .tv64 = (s64)secs * NSEC_PER_SEC + (s64)nsecs }; 78 81 } 79 82
+1 -1
include/linux/mmc/host.h
··· 77 77 struct device *dev; 78 78 struct class_device class_dev; 79 79 int index; 80 - struct mmc_host_ops *ops; 80 + const struct mmc_host_ops *ops; 81 81 unsigned int f_min; 82 82 unsigned int f_max; 83 83 u32 ocr_avail;
+2
include/linux/mmc/mmc.h
··· 105 105 extern int mmc_wait_for_app_cmd(struct mmc_host *, unsigned int, 106 106 struct mmc_command *, int); 107 107 108 + extern void mmc_set_data_timeout(struct mmc_data *, const struct mmc_card *, int); 109 + 108 110 extern int __mmc_claim_host(struct mmc_host *host, struct mmc_card *card); 109 111 110 112 static inline void mmc_claim_host(struct mmc_host *host)
+3 -3
include/linux/nfs_fs.h
··· 427 427 extern void nfs_writedata_release(void *); 428 428 429 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 431 void nfs_commit_free(struct nfs_write_data *p); 432 432 #endif 433 433 ··· 478 478 /* 479 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 484 * linux/fs/nfs/read.c ··· 492 492 /* 493 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 498 * linux/fs/nfs3proc.c
+2 -2
include/linux/nfs_xdr.h
··· 729 729 struct list_head pages; /* Coalesced read requests */ 730 730 struct nfs_page *req; /* multi ops per nfs_page */ 731 731 struct page **pagevec; 732 - unsigned int npages; /* active pages in pagevec */ 732 + unsigned int npages; /* Max length of pagevec */ 733 733 struct nfs_readargs args; 734 734 struct nfs_readres res; 735 735 #ifdef CONFIG_NFS_V4 ··· 748 748 struct list_head pages; /* Coalesced requests we wish to flush */ 749 749 struct nfs_page *req; /* multi ops per nfs_page */ 750 750 struct page **pagevec; 751 - unsigned int npages; /* active pages in pagevec */ 751 + unsigned int npages; /* Max length of pagevec */ 752 752 struct nfs_writeargs args; /* argument struct */ 753 753 struct nfs_writeres res; /* result struct */ 754 754 #ifdef CONFIG_NFS_V4
+2
include/linux/pci_ids.h
··· 648 648 #define PCI_DEVICE_ID_SI_962 0x0962 649 649 #define PCI_DEVICE_ID_SI_963 0x0963 650 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 653 #define PCI_DEVICE_ID_SI_5511 0x5511 652 654 #define PCI_DEVICE_ID_SI_5513 0x5513 653 655 #define PCI_DEVICE_ID_SI_5517 0x5517
+6
kernel/audit.c
··· 1028 1028 struct sk_buff *skb; 1029 1029 static const unsigned char *hex = "0123456789ABCDEF"; 1030 1030 1031 + if (!ab) 1032 + return; 1033 + 1031 1034 BUG_ON(!ab->skb); 1032 1035 skb = ab->skb; 1033 1036 avail = skb_tailroom(skb); ··· 1062 1059 int avail, new_len; 1063 1060 unsigned char *ptr; 1064 1061 struct sk_buff *skb; 1062 + 1063 + if (!ab) 1064 + return; 1065 1065 1066 1066 BUG_ON(!ab->skb); 1067 1067 skb = ab->skb;
+1
kernel/audit.h
··· 104 104 return (ino & (AUDIT_INODE_BUCKETS-1)); 105 105 } 106 106 107 + extern int audit_match_class(int class, unsigned syscall); 107 108 extern int audit_comparator(const u32 left, const u32 op, const u32 right); 108 109 extern int audit_compare_dname_path(const char *dname, const char *path, 109 110 int *dirlen);
+32 -5
kernel/auditfilter.c
··· 302 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 314 /* Common user-space to kernel rule translation. */ 306 315 static inline struct audit_entry *audit_to_entry_common(struct audit_rule *rule) 307 316 { ··· 413 404 case AUDIT_PERS: 414 405 case AUDIT_ARCH: 415 406 case AUDIT_MSGTYPE: 407 + case AUDIT_PPID: 416 408 case AUDIT_DEVMAJOR: 417 409 case AUDIT_DEVMINOR: 418 410 case AUDIT_EXIT: ··· 422 412 case AUDIT_ARG1: 423 413 case AUDIT_ARG2: 424 414 case AUDIT_ARG3: 415 + break; 416 + case AUDIT_PERM: 417 + if (f->val & ~15) 418 + goto exit_free; 425 419 break; 426 420 case AUDIT_INODE: 427 421 err = audit_to_inode(&entry->rule, f); ··· 580 566 goto exit_free; 581 567 entry->rule.buflen += f->val; 582 568 entry->rule.filterkey = str; 569 + break; 570 + case AUDIT_PERM: 571 + if (f->val & ~15) 572 + goto exit_free; 583 573 break; 584 574 default: 585 575 goto exit_free; ··· 931 913 } 932 914 933 915 ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE); 934 - audit_log_format(ab, "audit updated rules specifying watch="); 916 + audit_log_format(ab, "audit updated rules specifying path="); 935 917 audit_log_untrustedstring(ab, owatch->path); 936 918 audit_log_format(ab, " with dev=%u ino=%lu\n", dev, ino); 937 919 audit_log_end(ab); ··· 954 936 struct audit_watch *w, *nextw; 955 937 struct audit_krule *r, *nextr; 956 938 struct audit_entry *e; 939 + struct audit_buffer *ab; 957 940 958 941 mutex_lock(&audit_filter_mutex); 959 942 parent->flags |= AUDIT_PARENT_INVALID; 960 943 list_for_each_entry_safe(w, nextw, &parent->watches, wlist) { 961 944 list_for_each_entry_safe(r, nextr, &w->rules, rlist) { 962 945 e = container_of(r, struct audit_entry, rule); 946 + 947 + ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE); 948 + audit_log_format(ab, "audit implicitly removed rule path="); 949 + audit_log_untrustedstring(ab, w->path); 950 + if (r->filterkey) { 951 + audit_log_format(ab, " key="); 952 + audit_log_untrustedstring(ab, r->filterkey); 953 + } else 954 + audit_log_format(ab, " key=(null)"); 955 + audit_log_format(ab, " list=%d", r->listnr); 956 + audit_log_end(ab); 957 + 963 958 list_del(&r->rlist); 964 959 list_del_rcu(&e->list); 965 960 call_rcu(&e->rcu, audit_free_rule_rcu); 966 - 967 - audit_log(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE, 968 - "audit implicitly removed rule from list=%d\n", 969 - AUDIT_FILTER_EXIT); 970 961 } 971 962 audit_remove_watch(w); 972 963 }
+51
kernel/auditsc.c
··· 209 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 260 /* Determine if any context name data matches a rule's watch data */ 213 261 /* Compare a task_struct with an audit_rule. Return 1 on match, 0 214 262 * otherwise. */ ··· 444 396 case AUDIT_FILTERKEY: 445 397 /* ignore this field for filtering */ 446 398 result = 1; 399 + break; 400 + case AUDIT_PERM: 401 + result = audit_match_perm(ctx, f->val); 447 402 break; 448 403 } 449 404
+11 -73
kernel/futex.c
··· 1120 1120 * if there are waiters then it will block, it does PI, etc. (Due to 1121 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, 1124 - struct hrtimer_sleeper *to) 1123 + static int futex_lock_pi(u32 __user *uaddr, int detect, unsigned long sec, 1124 + long nsec, int trylock) 1125 1125 { 1126 + struct hrtimer_sleeper timeout, *to = NULL; 1126 1127 struct task_struct *curr = current; 1127 1128 struct futex_hash_bucket *hb; 1128 1129 u32 uval, newval, curval; ··· 1132 1131 1133 1132 if (refill_pi_state_cache()) 1134 1133 return -ENOMEM; 1134 + 1135 + if (sec != MAX_SCHEDULE_TIMEOUT) { 1136 + to = &timeout; 1137 + hrtimer_init(&to->timer, CLOCK_REALTIME, HRTIMER_ABS); 1138 + hrtimer_init_sleeper(to, current); 1139 + to->timer.expires = ktime_set(sec, nsec); 1140 + } 1135 1141 1136 1142 q.pi_state = NULL; 1137 1143 retry: ··· 1315 1307 if (!detect && ret == -EDEADLK && 0) 1316 1308 force_sig(SIGKILL, current); 1317 1309 1318 - return ret; 1310 + return ret != -EINTR ? ret : -ERESTARTNOINTR; 1319 1311 1320 1312 out_unlock_release_sem: 1321 1313 queue_unlock(&q, hb); ··· 1347 1339 goto retry; 1348 1340 1349 1341 return ret; 1350 - } 1351 - 1352 - /* 1353 - * Restart handler 1354 - */ 1355 - static long futex_lock_pi_restart(struct restart_block *restart) 1356 - { 1357 - struct hrtimer_sleeper timeout, *to = NULL; 1358 - int ret; 1359 - 1360 - restart->fn = do_no_restart_syscall; 1361 - 1362 - if (restart->arg2 || restart->arg3) { 1363 - to = &timeout; 1364 - hrtimer_init(&to->timer, CLOCK_REALTIME, HRTIMER_ABS); 1365 - hrtimer_init_sleeper(to, current); 1366 - to->timer.expires.tv64 = ((u64)restart->arg1 << 32) | 1367 - (u64) restart->arg0; 1368 - } 1369 - 1370 - pr_debug("lock_pi restart: %p, %d (%d)\n", 1371 - (u32 __user *)restart->arg0, current->pid); 1372 - 1373 - ret = do_futex_lock_pi((u32 __user *)restart->arg0, restart->arg1, 1374 - 0, to); 1375 - 1376 - if (ret != -EINTR) 1377 - return ret; 1378 - 1379 - restart->fn = futex_lock_pi_restart; 1380 - 1381 - /* The other values are filled in */ 1382 - return -ERESTART_RESTARTBLOCK; 1383 - } 1384 - 1385 - /* 1386 - * Called from the syscall entry below. 1387 - */ 1388 - static int futex_lock_pi(u32 __user *uaddr, int detect, unsigned long sec, 1389 - long nsec, int trylock) 1390 - { 1391 - struct hrtimer_sleeper timeout, *to = NULL; 1392 - struct restart_block *restart; 1393 - int ret; 1394 - 1395 - if (sec != MAX_SCHEDULE_TIMEOUT) { 1396 - to = &timeout; 1397 - hrtimer_init(&to->timer, CLOCK_REALTIME, HRTIMER_ABS); 1398 - hrtimer_init_sleeper(to, current); 1399 - to->timer.expires = ktime_set(sec, nsec); 1400 - } 1401 - 1402 - ret = do_futex_lock_pi(uaddr, detect, trylock, to); 1403 - 1404 - if (ret != -EINTR) 1405 - return ret; 1406 - 1407 - pr_debug("lock_pi interrupted: %p, %d (%d)\n", uaddr, current->pid); 1408 - 1409 - restart = &current_thread_info()->restart_block; 1410 - restart->fn = futex_lock_pi_restart; 1411 - restart->arg0 = (unsigned long) uaddr; 1412 - restart->arg1 = detect; 1413 - if (to) { 1414 - restart->arg2 = to->timer.expires.tv64 & 0xFFFFFFFF; 1415 - restart->arg3 = to->timer.expires.tv64 >> 32; 1416 - } else 1417 - restart->arg2 = restart->arg3 = 0; 1418 - 1419 - return -ERESTART_RESTARTBLOCK; 1420 1342 } 1421 1343 1422 1344 /*
+1 -1
kernel/panic.c
··· 173 173 174 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 177 tainted |= flag; 178 178 } 179 179 EXPORT_SYMBOL(add_taint);
+5 -1
kernel/power/Kconfig
··· 56 56 57 57 config SOFTWARE_SUSPEND 58 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 60 ---help--- 61 61 Enable the possibility of suspending the machine. 62 62 It doesn't need ACPI or APM. ··· 77 77 on disk won't match with saved ones. 78 78 79 79 For more information take a look at <file:Documentation/power/swsusp.txt>. 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). 80 84 81 85 config PM_STD_PARTITION 82 86 string "Default resume partition"
+1 -1
kernel/spinlock.c
··· 72 72 * not re-enabled during lock-acquire (which the preempt-spin-ops do): 73 73 */ 74 74 #if !defined(CONFIG_PREEMPT) || !defined(CONFIG_SMP) || \ 75 - defined(CONFIG_PROVE_LOCKING) 75 + defined(CONFIG_DEBUG_LOCK_ALLOC) 76 76 77 77 void __lockfunc _read_lock(rwlock_t *lock) 78 78 {
+15 -2
mm/mmap.c
··· 30 30 #include <asm/cacheflush.h> 31 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 37 static void unmap_region(struct mm_struct *mm, 34 38 struct vm_area_struct *vma, struct vm_area_struct *prev, 35 39 unsigned long start, unsigned long end); ··· 916 912 917 913 if (!len) 918 914 return -EINVAL; 915 + 916 + error = arch_mmap_check(addr, len, flags); 917 + if (error) 918 + return error; 919 919 920 920 /* Careful about overflows.. */ 921 921 len = PAGE_ALIGN(len); ··· 1867 1859 unsigned long flags; 1868 1860 struct rb_node ** rb_link, * rb_parent; 1869 1861 pgoff_t pgoff = addr >> PAGE_SHIFT; 1862 + int error; 1870 1863 1871 1864 len = PAGE_ALIGN(len); 1872 1865 if (!len) ··· 1875 1866 1876 1867 if ((addr + len) > TASK_SIZE || (addr + len) < addr) 1877 1868 return -EINVAL; 1869 + 1870 + flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags; 1871 + 1872 + error = arch_mmap_check(addr, len, flags); 1873 + if (error) 1874 + return error; 1878 1875 1879 1876 /* 1880 1877 * mlock MCL_FUTURE? ··· 1921 1906 1922 1907 if (security_vm_enough_memory(len >> PAGE_SHIFT)) 1923 1908 return -ENOMEM; 1924 - 1925 - flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags; 1926 1909 1927 1910 /* Can we just expand an old private anonymous mapping? */ 1928 1911 if (vma_merge(mm, prev, addr, addr + len, flags,
+7 -4
mm/truncate.c
··· 68 68 return 0; 69 69 70 70 write_lock_irq(&mapping->tree_lock); 71 - if (PageDirty(page)) { 72 - write_unlock_irq(&mapping->tree_lock); 73 - return 0; 74 - } 71 + if (PageDirty(page)) 72 + goto failed; 73 + if (page_count(page) != 2) /* caller's ref + pagecache ref */ 74 + goto failed; 75 75 76 76 BUG_ON(PagePrivate(page)); 77 77 __remove_from_page_cache(page); ··· 79 79 ClearPageUptodate(page); 80 80 page_cache_release(page); /* pagecache ref */ 81 81 return 1; 82 + failed: 83 + write_unlock_irq(&mapping->tree_lock); 84 + return 0; 82 85 } 83 86 84 87 /**