aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pretzel.yyz.us>2005-06-18 13:21:24 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-06-18 13:21:24 -0400
commitf9d1fe9630b94007902987c39d19f04dc6256eac (patch)
tree1fbe757adc72469ddbc3c1e4132392164b2e0271
parent54258a8a2e81b11e486068f1cfab9fe4746b8420 (diff)
parent9ee1c939d1cb936b1f98e8d81aeffab57bae46ab (diff)
Merge /spare/repo/linux-2.6/
-rw-r--r--CREDITS6
-rw-r--r--Documentation/SubmittingPatches8
-rw-r--r--Documentation/networking/vortex.txt2
-rw-r--r--MAINTAINERS48
-rw-r--r--Makefile2
-rw-r--r--arch/arm/Kconfig6
-rw-r--r--arch/arm/boot/compressed/head-xscale.S7
-rw-r--r--arch/arm/configs/badge4_defconfig29
-rw-r--r--arch/arm/configs/h3600_defconfig24
-rw-r--r--arch/arm/configs/hackkit_defconfig22
-rw-r--r--arch/arm/kernel/entry-armv.S16
-rw-r--r--arch/arm/kernel/traps.c49
-rw-r--r--arch/arm/lib/io-writesw-armv4.S6
-rw-r--r--arch/arm/mach-integrator/integrator_cp.c1
-rw-r--r--arch/arm/mach-pxa/lubbock.c30
-rw-r--r--arch/arm/mach-pxa/mainstone.c40
-rw-r--r--arch/arm/mach-pxa/pm.c32
-rw-r--r--arch/arm/mach-pxa/pxa25x.c33
-rw-r--r--arch/arm/mach-pxa/pxa27x.c36
-rw-r--r--arch/arm/mach-s3c2410/dma.c4
-rw-r--r--arch/arm/mach-sa1100/Kconfig2
-rw-r--r--arch/arm/mach-versatile/core.c2
-rw-r--r--arch/arm/mm/Kconfig15
-rw-r--r--arch/arm/mm/Makefile2
-rw-r--r--arch/arm/mm/copypage-xscale.S113
-rw-r--r--arch/arm/mm/copypage-xscale.c131
-rw-r--r--arch/arm/mm/minicache.c73
-rw-r--r--arch/i386/kernel/Makefile2
-rw-r--r--arch/i386/kernel/apm.c2
-rw-r--r--arch/ia64/kernel/fsys.S4
-rw-r--r--arch/ia64/kernel/module.c10
-rw-r--r--arch/ia64/kernel/ptrace.c6
-rw-r--r--arch/ia64/kernel/setup.c3
-rw-r--r--arch/ia64/kernel/traps.c29
-rw-r--r--arch/ia64/mm/init.c19
-rw-r--r--arch/ia64/sn/kernel/setup.c4
-rw-r--r--arch/m68k/configs/amiga_defconfig15
-rw-r--r--arch/m68k/configs/apollo_defconfig7
-rw-r--r--arch/m68k/configs/atari_defconfig7
-rw-r--r--arch/m68k/configs/bvme6000_defconfig7
-rw-r--r--arch/m68k/configs/hp300_defconfig7
-rw-r--r--arch/m68k/configs/mac_defconfig7
-rw-r--r--arch/m68k/configs/mvme147_defconfig7
-rw-r--r--arch/m68k/configs/mvme16x_defconfig7
-rw-r--r--arch/m68k/configs/q40_defconfig15
-rw-r--r--arch/m68k/configs/sun3_defconfig8
-rw-r--r--arch/m68k/configs/sun3x_defconfig7
-rw-r--r--arch/m68k/defconfig7
-rw-r--r--arch/ppc/kernel/cputable.c11
-rw-r--r--arch/ppc/kernel/misc.S6
-rw-r--r--arch/ppc/platforms/pmac_cpufreq.c7
-rw-r--r--arch/ppc64/boot/prom.c28
-rw-r--r--arch/ppc64/configs/g5_defconfig76
-rw-r--r--arch/ppc64/configs/iSeries_defconfig62
-rw-r--r--arch/ppc64/configs/maple_defconfig70
-rw-r--r--arch/ppc64/configs/pSeries_defconfig102
-rw-r--r--arch/ppc64/defconfig104
-rw-r--r--arch/ppc64/kernel/kprobes.c18
-rw-r--r--arch/ppc64/kernel/misc.S2
-rw-r--r--arch/ppc64/kernel/sys_ppc32.c70
-rw-r--r--arch/ppc64/kernel/syscalls.c33
-rw-r--r--arch/s390/appldata/appldata_base.c72
-rw-r--r--arch/s390/appldata/appldata_mem.c2
-rw-r--r--arch/s390/appldata/appldata_net_sum.c2
-rw-r--r--arch/s390/appldata/appldata_os.c4
-rw-r--r--arch/s390/kernel/ptrace.c55
-rw-r--r--arch/s390/mm/fault.c2
-rw-r--r--arch/um/Kconfig_char6
-rw-r--r--arch/um/drivers/Makefile6
-rw-r--r--arch/um/drivers/chan_user.c26
-rw-r--r--arch/um/drivers/mmapper_kern.c24
-rw-r--r--arch/um/drivers/net_user.c2
-rw-r--r--arch/um/drivers/slip.h23
-rw-r--r--arch/um/drivers/slip_common.c54
-rw-r--r--arch/um/drivers/slip_common.h (renamed from arch/um/drivers/slip_proto.h)47
-rw-r--r--arch/um/drivers/slip_kern.c12
-rw-r--r--arch/um/drivers/slip_user.c152
-rw-r--r--arch/um/drivers/slirp.h26
-rw-r--r--arch/um/drivers/slirp_kern.c5
-rw-r--r--arch/um/drivers/slirp_user.c104
-rw-r--r--arch/um/drivers/stderr_console.c6
-rw-r--r--arch/um/include/mconsole.h2
-rw-r--r--arch/um/include/net_user.h2
-rw-r--r--arch/um/include/os.h2
-rw-r--r--arch/um/include/sysdep-i386/ptrace.h5
-rw-r--r--arch/um/include/user_util.h3
-rw-r--r--arch/um/kernel/main.c2
-rw-r--r--arch/um/kernel/process.c49
-rw-r--r--arch/um/kernel/skas/process_kern.c7
-rw-r--r--arch/um/kernel/um_arch.c1
-rw-r--r--arch/um/os-Linux/elf_aux.c6
-rw-r--r--arch/um/os-Linux/file.c2
-rw-r--r--arch/um/scripts/Makefile.rules2
-rw-r--r--arch/x86_64/kernel/aperture.c41
-rw-r--r--drivers/block/cfq-iosched.c9
-rw-r--r--drivers/block/elevator.c9
-rw-r--r--drivers/block/ub.c4
-rw-r--r--drivers/char/agp/agp.h2
-rw-r--r--drivers/char/agp/ali-agp.c4
-rw-r--r--drivers/char/agp/amd-k7-agp.c6
-rw-r--r--drivers/char/agp/amd64-agp.c4
-rw-r--r--drivers/char/agp/ati-agp.c6
-rw-r--r--drivers/char/agp/backend.c6
-rw-r--r--drivers/char/agp/efficeon-agp.c2
-rw-r--r--drivers/char/agp/generic.c36
-rw-r--r--drivers/char/agp/hp-agp.c4
-rw-r--r--drivers/char/agp/i460-agp.c4
-rw-r--r--drivers/char/agp/intel-agp.c21
-rw-r--r--drivers/char/agp/sgi-agp.c12
-rw-r--r--drivers/char/agp/sworks-agp.c8
-rw-r--r--drivers/char/agp/uninorth-agp.c2
-rw-r--r--drivers/char/drm/drm_pciids.h1
-rw-r--r--drivers/char/drm/radeon_irq.c5
-rw-r--r--drivers/char/mxser.c38
-rw-r--r--drivers/ieee1394/sbp2.c3
-rw-r--r--drivers/input/keyboard/atkbd.c2
-rw-r--r--drivers/input/mouse/alps.c2
-rw-r--r--drivers/macintosh/via-pmu.c6
-rw-r--r--drivers/md/dm-mpath.c3
-rw-r--r--drivers/message/i2o/i2o_block.c1
-rw-r--r--drivers/net/irda/Kconfig2
-rw-r--r--drivers/net/iseries_veth.c9
-rw-r--r--drivers/net/pcmcia/3c574_cs.c3
-rw-r--r--drivers/net/r8169.c33
-rw-r--r--drivers/net/tg3.c39
-rw-r--r--drivers/pci/hotplug/cpci_hotplug_core.c2
-rw-r--r--drivers/pci/hotplug/cpci_hotplug_pci.c5
-rw-r--r--drivers/pci/pci-driver.c5
-rw-r--r--drivers/pci/pci.ids1
-rw-r--r--drivers/pci/probe.c2
-rw-r--r--drivers/pci/quirks.c41
-rw-r--r--drivers/scsi/Kconfig2
-rw-r--r--drivers/scsi/libata-core.c4
-rw-r--r--drivers/scsi/sata_sil.c8
-rw-r--r--drivers/serial/sa1100.c2
-rw-r--r--drivers/serial/vr41xx_siu.c66
-rw-r--r--drivers/usb/host/ehci-hub.c5
-rw-r--r--drivers/usb/media/pwc/pwc-if.c4
-rw-r--r--drivers/usb/net/kaweth.c2
-rw-r--r--drivers/usb/serial/ftdi_sio.c118
-rw-r--r--drivers/video/aty/radeon_base.c7
-rw-r--r--drivers/video/fbsysfs.c2
-rw-r--r--drivers/video/macmodes.c1
-rw-r--r--fs/binfmt_elf.c2
-rw-r--r--fs/binfmt_flat.c6
-rw-r--r--fs/cifs/CHANGES3
-rw-r--r--fs/cifs/cifsfs.h2
-rw-r--r--fs/cifs/file.c2
-rw-r--r--fs/cifs/inode.c34
-rw-r--r--fs/mpage.c5
-rw-r--r--fs/namei.c153
-rw-r--r--fs/nfs/dir.c49
-rw-r--r--fs/nfs/file.c42
-rw-r--r--include/asm-alpha/agp.h10
-rw-r--r--include/asm-arm/arch-integrator/platform.h4
-rw-r--r--include/asm-arm/arch-ixp2000/io.h16
-rw-r--r--include/asm-arm/arch-pxa/pxa-regs.h2
-rw-r--r--include/asm-arm/arch-versatile/platform.h16
-rw-r--r--include/asm-arm/elf.h4
-rw-r--r--include/asm-arm26/elf.h2
-rw-r--r--include/asm-arm26/signal.h3
-rw-r--r--include/asm-h8300/kmap_types.h6
-rw-r--r--include/asm-h8300/mman.h3
-rw-r--r--include/asm-i386/agp.h10
-rw-r--r--include/asm-i386/mach-numaq/mach_ipi.h2
-rw-r--r--include/asm-ia64/agp.h10
-rw-r--r--include/asm-ia64/pgtable.h8
-rw-r--r--include/asm-ia64/processor.h10
-rw-r--r--include/asm-ppc/agp.h10
-rw-r--r--include/asm-ppc/sigcontext.h2
-rw-r--r--include/asm-ppc64/agp.h10
-rw-r--r--include/asm-ppc64/elf.h4
-rw-r--r--include/asm-s390/user.h2
-rw-r--r--include/asm-sparc/uaccess.h5
-rw-r--r--include/asm-sparc64/agp.h10
-rw-r--r--include/asm-x86_64/agp.h10
-rw-r--r--include/linux/acpi.h2
-rw-r--r--include/linux/if_tr.h2
-rw-r--r--include/linux/pci_ids.h3
-rw-r--r--include/linux/signal.h2
-rw-r--r--include/linux/sysctl.h1
-rw-r--r--include/linux/tc_ematch/tc_em_meta.h30
-rw-r--r--include/net/ip.h1
-rw-r--r--kernel/exit.c4
-rw-r--r--kernel/posix-timers.c1
-rw-r--r--kernel/sched.c7
-rw-r--r--mm/filemap.c8
-rw-r--r--net/core/dev.c1
-rw-r--r--net/core/ethtool.c2
-rw-r--r--net/core/net-sysfs.c17
-rw-r--r--net/ipv4/af_inet.c1
-rw-r--r--net/ipv4/icmp.c9
-rw-r--r--net/ipv4/multipath_drr.c2
-rw-r--r--net/ipv4/multipath_random.c2
-rw-r--r--net/ipv4/multipath_rr.c2
-rw-r--r--net/ipv4/multipath_wrandom.c2
-rw-r--r--net/ipv4/netfilter/ip_conntrack_standalone.c1
-rw-r--r--net/ipv4/netfilter/ipt_recent.c10
-rw-r--r--net/ipv4/sysctl_net_ipv4.c9
-rw-r--r--net/ipv4/tcp.c2
-rw-r--r--net/ipv6/addrconf.c1
-rw-r--r--net/ipv6/icmp.c14
-rw-r--r--net/ipv6/ip6_tunnel.c1
-rw-r--r--net/sched/Kconfig2
-rw-r--r--net/sched/act_api.c2
-rw-r--r--net/sched/cls_basic.c3
-rw-r--r--net/sched/em_meta.c295
-rw-r--r--net/sctp/input.c49
-rw-r--r--net/sctp/ipv6.c36
-rw-r--r--net/sctp/proc.c194
-rw-r--r--net/sctp/protocol.c7
-rw-r--r--net/sctp/socket.c12
-rw-r--r--sound/usb/usbaudio.c2
-rw-r--r--sound/usb/usx2y/usbusx2y.c11
214 files changed, 2561 insertions, 1471 deletions
diff --git a/CREDITS b/CREDITS
index 9bd099d960f3..d65ffe5a4d08 100644
--- a/CREDITS
+++ b/CREDITS
@@ -2475,13 +2475,9 @@ S: Potsdam, New York 13676
2475S: USA 2475S: USA
2476 2476
2477N: Dave Neuer 2477N: Dave Neuer
2478E: dneuer@innovation-charter.com 2478E: dave.neuer@pobox.com
2479E: mr_fred_smoothie@yahoo.com
2480D: Helped implement support for Compaq's H31xx series iPAQs 2479D: Helped implement support for Compaq's H31xx series iPAQs
2481D: Other mostly minor tweaks & bugfixes 2480D: Other mostly minor tweaks & bugfixes
2482S: 325 E. Main St., Suite 3
2483S: Carnegie, PA 15105
2484S: USA
2485 2481
2486N: Michael Neuffer 2482N: Michael Neuffer
2487E: mike@i-Connect.Net 2483E: mike@i-Connect.Net
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index 9838d32b2fe7..4d35562b1cf9 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -271,7 +271,7 @@ patch, which certifies that you wrote it or otherwise have the right to
271pass it on as a open-source patch. The rules are pretty simple: if you 271pass it on as a open-source patch. The rules are pretty simple: if you
272can certify the below: 272can certify the below:
273 273
274 Developer's Certificate of Origin 1.0 274 Developer's Certificate of Origin 1.1
275 275
276 By making a contribution to this project, I certify that: 276 By making a contribution to this project, I certify that:
277 277
@@ -291,6 +291,12 @@ can certify the below:
291 person who certified (a), (b) or (c) and I have not modified 291 person who certified (a), (b) or (c) and I have not modified
292 it. 292 it.
293 293
294 (d) I understand and agree that this project and the contribution
295 are public and that a record of the contribution (including all
296 personal information I submit with it, including my sign-off) is
297 maintained indefinitely and may be redistributed consistent with
298 this project or the open source license(s) involved.
299
294then you just add a line saying 300then you just add a line saying
295 301
296 Signed-off-by: Random J Developer <random@developer.org> 302 Signed-off-by: Random J Developer <random@developer.org>
diff --git a/Documentation/networking/vortex.txt b/Documentation/networking/vortex.txt
index fa12a9e4abdd..80e1cb19609f 100644
--- a/Documentation/networking/vortex.txt
+++ b/Documentation/networking/vortex.txt
@@ -12,7 +12,7 @@ Don is no longer the prime maintainer of this version of the driver.
12Please report problems to one or more of: 12Please report problems to one or more of:
13 13
14 Andrew Morton <andrewm@uow.edu.au> 14 Andrew Morton <andrewm@uow.edu.au>
15 Netdev mailing list <netdev@oss.sgi.com> 15 Netdev mailing list <netdev@vger.kernel.org>
16 Linux kernel mailing list <linux-kernel@vger.kernel.org> 16 Linux kernel mailing list <linux-kernel@vger.kernel.org>
17 17
18Please note the 'Reporting and Diagnosing Problems' section at the end 18Please note the 'Reporting and Diagnosing Problems' section at the end
diff --git a/MAINTAINERS b/MAINTAINERS
index 65ad8251e4bc..86ba94f16e83 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -73,7 +73,7 @@ S: Status, one of the following:
733C359 NETWORK DRIVER 733C359 NETWORK DRIVER
74P: Mike Phillips 74P: Mike Phillips
75M: mikep@linuxtr.net 75M: mikep@linuxtr.net
76L: netdev@oss.sgi.com 76L: netdev@vger.kernel.org
77L: linux-tr@linuxtr.net 77L: linux-tr@linuxtr.net
78W: http://www.linuxtr.net 78W: http://www.linuxtr.net
79S: Maintained 79S: Maintained
@@ -81,13 +81,13 @@ S: Maintained
813C505 NETWORK DRIVER 813C505 NETWORK DRIVER
82P: Philip Blundell 82P: Philip Blundell
83M: philb@gnu.org 83M: philb@gnu.org
84L: netdev@oss.sgi.com 84L: netdev@vger.kernel.org
85S: Maintained 85S: Maintained
86 86
873CR990 NETWORK DRIVER 873CR990 NETWORK DRIVER
88P: David Dillow 88P: David Dillow
89M: dave@thedillows.org 89M: dave@thedillows.org
90L: netdev@oss.sgi.com 90L: netdev@vger.kernel.org
91S: Maintained 91S: Maintained
92 92
933W-XXXX ATA-RAID CONTROLLER DRIVER 933W-XXXX ATA-RAID CONTROLLER DRIVER
@@ -130,7 +130,7 @@ S: Maintained
1308169 10/100/1000 GIGABIT ETHERNET DRIVER 1308169 10/100/1000 GIGABIT ETHERNET DRIVER
131P: Francois Romieu 131P: Francois Romieu
132M: romieu@fr.zoreil.com 132M: romieu@fr.zoreil.com
133L: netdev@oss.sgi.com 133L: netdev@vger.kernel.org
134S: Maintained 134S: Maintained
135 135
1368250/16?50 (AND CLONE UARTS) SERIAL DRIVER 1368250/16?50 (AND CLONE UARTS) SERIAL DRIVER
@@ -143,7 +143,7 @@ S: Maintained
1438390 NETWORK DRIVERS [WD80x3/SMC-ELITE, SMC-ULTRA, NE2000, 3C503, etc.] 1438390 NETWORK DRIVERS [WD80x3/SMC-ELITE, SMC-ULTRA, NE2000, 3C503, etc.]
144P: Paul Gortmaker 144P: Paul Gortmaker
145M: p_gortmaker@yahoo.com 145M: p_gortmaker@yahoo.com
146L: netdev@oss.sgi.com 146L: netdev@vger.kernel.org
147S: Maintained 147S: Maintained
148 148
149A2232 SERIAL BOARD DRIVER 149A2232 SERIAL BOARD DRIVER
@@ -332,7 +332,7 @@ S: Maintained
332 332
333ARPD SUPPORT 333ARPD SUPPORT
334P: Jonathan Layes 334P: Jonathan Layes
335L: netdev@oss.sgi.com 335L: netdev@vger.kernel.org
336S: Maintained 336S: Maintained
337 337
338ASUS ACPI EXTRAS DRIVER 338ASUS ACPI EXTRAS DRIVER
@@ -706,7 +706,7 @@ S: Orphaned
706 706
707DIGI RIGHTSWITCH NETWORK DRIVER 707DIGI RIGHTSWITCH NETWORK DRIVER
708P: Rick Richardson 708P: Rick Richardson
709L: netdev@oss.sgi.com 709L: netdev@vger.kernel.org
710W: http://www.digi.com 710W: http://www.digi.com
711S: Orphaned 711S: Orphaned
712 712
@@ -812,7 +812,7 @@ S: Maintained
812ETHEREXPRESS-16 NETWORK DRIVER 812ETHEREXPRESS-16 NETWORK DRIVER
813P: Philip Blundell 813P: Philip Blundell
814M: philb@gnu.org 814M: philb@gnu.org
815L: netdev@oss.sgi.com 815L: netdev@vger.kernel.org
816S: Maintained 816S: Maintained
817 817
818ETHERNET BRIDGE 818ETHERNET BRIDGE
@@ -875,7 +875,7 @@ S: Maintained
875FRAME RELAY DLCI/FRAD (Sangoma drivers too) 875FRAME RELAY DLCI/FRAD (Sangoma drivers too)
876P: Mike McLagan 876P: Mike McLagan
877M: mike.mclagan@linux.org 877M: mike.mclagan@linux.org
878L: netdev@oss.sgi.com 878L: netdev@vger.kernel.org
879S: Maintained 879S: Maintained
880 880
881FREEVXFS FILESYSTEM 881FREEVXFS FILESYSTEM
@@ -1215,7 +1215,7 @@ S: Maintained
1215IPX NETWORK LAYER 1215IPX NETWORK LAYER
1216P: Arnaldo Carvalho de Melo 1216P: Arnaldo Carvalho de Melo
1217M: acme@conectiva.com.br 1217M: acme@conectiva.com.br
1218L: netdev@oss.sgi.com 1218L: netdev@vger.kernel.org
1219S: Maintained 1219S: Maintained
1220 1220
1221IRDA SUBSYSTEM 1221IRDA SUBSYSTEM
@@ -1482,7 +1482,7 @@ MARVELL MV64340 ETHERNET DRIVER
1482P: Manish Lachwani 1482P: Manish Lachwani
1483M: Manish_Lachwani@pmc-sierra.com 1483M: Manish_Lachwani@pmc-sierra.com
1484L: linux-mips@linux-mips.org 1484L: linux-mips@linux-mips.org
1485L: netdev@oss.sgi.com 1485L: netdev@vger.kernel.org
1486S: Supported 1486S: Supported
1487 1487
1488MATROX FRAMEBUFFER DRIVER 1488MATROX FRAMEBUFFER DRIVER
@@ -1592,13 +1592,13 @@ P: Andrew Morton
1592M: akpm@osdl.org 1592M: akpm@osdl.org
1593P: Jeff Garzik 1593P: Jeff Garzik
1594M: jgarzik@pobox.com 1594M: jgarzik@pobox.com
1595L: netdev@oss.sgi.com 1595L: netdev@vger.kernel.org
1596S: Maintained 1596S: Maintained
1597 1597
1598NETWORKING [GENERAL] 1598NETWORKING [GENERAL]
1599P: Networking Team 1599P: Networking Team
1600M: netdev@oss.sgi.com 1600M: netdev@vger.kernel.org
1601L: netdev@oss.sgi.com 1601L: netdev@vger.kernel.org
1602S: Maintained 1602S: Maintained
1603 1603
1604NETWORKING [IPv4/IPv6] 1604NETWORKING [IPv4/IPv6]
@@ -1614,7 +1614,7 @@ P: Hideaki YOSHIFUJI
1614M: yoshfuji@linux-ipv6.org 1614M: yoshfuji@linux-ipv6.org
1615P: Patrick McHardy 1615P: Patrick McHardy
1616M: kaber@coreworks.de 1616M: kaber@coreworks.de
1617L: netdev@oss.sgi.com 1617L: netdev@vger.kernel.org
1618S: Maintained 1618S: Maintained
1619 1619
1620IPVS 1620IPVS
@@ -1634,7 +1634,7 @@ NI5010 NETWORK DRIVER
1634P: Jan-Pascal van Best and Andreas Mohr 1634P: Jan-Pascal van Best and Andreas Mohr
1635M: Jan-Pascal van Best <jvbest@qv3pluto.leidenuniv.nl> 1635M: Jan-Pascal van Best <jvbest@qv3pluto.leidenuniv.nl>
1636M: Andreas Mohr <100.30936@germany.net> 1636M: Andreas Mohr <100.30936@germany.net>
1637L: netdev@oss.sgi.com 1637L: netdev@vger.kernel.org
1638S: Maintained 1638S: Maintained
1639 1639
1640NINJA SCSI-3 / NINJA SCSI-32Bi (16bit/CardBus) PCMCIA SCSI HOST ADAPTER DRIVER 1640NINJA SCSI-3 / NINJA SCSI-32Bi (16bit/CardBus) PCMCIA SCSI HOST ADAPTER DRIVER
@@ -1676,7 +1676,7 @@ P: Peter De Shrijver
1676M: p2@ace.ulyssis.student.kuleuven.ac.be 1676M: p2@ace.ulyssis.student.kuleuven.ac.be
1677P: Mike Phillips 1677P: Mike Phillips
1678M: mikep@linuxtr.net 1678M: mikep@linuxtr.net
1679L: netdev@oss.sgi.com 1679L: netdev@vger.kernel.org
1680L: linux-tr@linuxtr.net 1680L: linux-tr@linuxtr.net
1681W: http://www.linuxtr.net 1681W: http://www.linuxtr.net
1682S: Maintained 1682S: Maintained
@@ -1783,7 +1783,7 @@ S: Unmaintained
1783PCNET32 NETWORK DRIVER 1783PCNET32 NETWORK DRIVER
1784P: Thomas Bogendörfer 1784P: Thomas Bogendörfer
1785M: tsbogend@alpha.franken.de 1785M: tsbogend@alpha.franken.de
1786L: netdev@oss.sgi.com 1786L: netdev@vger.kernel.org
1787S: Maintained 1787S: Maintained
1788 1788
1789PHRAM MTD DRIVER 1789PHRAM MTD DRIVER
@@ -1795,7 +1795,7 @@ S: Maintained
1795POSIX CLOCKS and TIMERS 1795POSIX CLOCKS and TIMERS
1796P: George Anzinger 1796P: George Anzinger
1797M: george@mvista.com 1797M: george@mvista.com
1798L: netdev@oss.sgi.com 1798L: netdev@vger.kernel.org
1799S: Supported 1799S: Supported
1800 1800
1801PNP SUPPORT 1801PNP SUPPORT
@@ -1830,7 +1830,7 @@ S: Supported
1830PRISM54 WIRELESS DRIVER 1830PRISM54 WIRELESS DRIVER
1831P: Prism54 Development Team 1831P: Prism54 Development Team
1832M: prism54-private@prism54.org 1832M: prism54-private@prism54.org
1833L: netdev@oss.sgi.com 1833L: netdev@vger.kernel.org
1834W: http://prism54.org 1834W: http://prism54.org
1835S: Maintained 1835S: Maintained
1836 1836
@@ -2047,7 +2047,7 @@ SIS 900/7016 FAST ETHERNET DRIVER
2047P: Daniele Venzano 2047P: Daniele Venzano
2048M: venza@brownhat.org 2048M: venza@brownhat.org
2049W: http://www.brownhat.org/sis900.html 2049W: http://www.brownhat.org/sis900.html
2050L: netdev@oss.sgi.com 2050L: netdev@vger.kernel.org
2051S: Maintained 2051S: Maintained
2052 2052
2053SIS FRAMEBUFFER DRIVER 2053SIS FRAMEBUFFER DRIVER
@@ -2106,7 +2106,7 @@ S: Maintained
2106SONIC NETWORK DRIVER 2106SONIC NETWORK DRIVER
2107P: Thomas Bogendoerfer 2107P: Thomas Bogendoerfer
2108M: tsbogend@alpha.franken.de 2108M: tsbogend@alpha.franken.de
2109L: netdev@oss.sgi.com 2109L: netdev@vger.kernel.org
2110S: Maintained 2110S: Maintained
2111 2111
2112SONY VAIO CONTROL DEVICE DRIVER 2112SONY VAIO CONTROL DEVICE DRIVER
@@ -2163,7 +2163,7 @@ S: Supported
2163SPX NETWORK LAYER 2163SPX NETWORK LAYER
2164P: Jay Schulist 2164P: Jay Schulist
2165M: jschlst@samba.org 2165M: jschlst@samba.org
2166L: netdev@oss.sgi.com 2166L: netdev@vger.kernel.org
2167S: Supported 2167S: Supported
2168 2168
2169SRM (Alpha) environment access 2169SRM (Alpha) environment access
@@ -2242,7 +2242,7 @@ S: Maintained
2242TOKEN-RING NETWORK DRIVER 2242TOKEN-RING NETWORK DRIVER
2243P: Mike Phillips 2243P: Mike Phillips
2244M: mikep@linuxtr.net 2244M: mikep@linuxtr.net
2245L: netdev@oss.sgi.com 2245L: netdev@vger.kernel.org
2246L: linux-tr@linuxtr.net 2246L: linux-tr@linuxtr.net
2247W: http://www.linuxtr.net 2247W: http://www.linuxtr.net
2248S: Maintained 2248S: Maintained
diff --git a/Makefile b/Makefile
index c11a317ea910..0d1e74d50067 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
1VERSION = 2 1VERSION = 2
2PATCHLEVEL = 6 2PATCHLEVEL = 6
3SUBLEVEL = 12 3SUBLEVEL = 12
4EXTRAVERSION =-rc5 4EXTRAVERSION =
5NAME=Woozy Numbat 5NAME=Woozy Numbat
6 6
7# *DOCUMENTATION* 7# *DOCUMENTATION*
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index bf397a9f8ac2..475950c8a831 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -497,7 +497,7 @@ source "drivers/cpufreq/Kconfig"
497 497
498config CPU_FREQ_SA1100 498config CPU_FREQ_SA1100
499 bool 499 bool
500 depends on CPU_FREQ && (SA1100_LART || SA1100_PLEB) 500 depends on CPU_FREQ && (SA1100_H3100 || SA1100_H3600 || SA1100_H3800 || SA1100_LART || SA1100_PLEB || SA1100_BADGE4 || SA1100_HACKKIT)
501 default y 501 default y
502 502
503config CPU_FREQ_SA1110 503config CPU_FREQ_SA1110
@@ -689,7 +689,9 @@ source "drivers/block/Kconfig"
689 689
690source "drivers/acorn/block/Kconfig" 690source "drivers/acorn/block/Kconfig"
691 691
692if ARCH_CLPS7500 || ARCH_IOP3XX || ARCH_IXP4XX || ARCH_L7200 || ARCH_LH7A40X || ARCH_PXA || ARCH_RPC || ARCH_S3C2410 || ARCH_SA1100 || ARCH_SHARK || FOOTBRIDGE 692if PCMCIA || ARCH_CLPS7500 || ARCH_IOP3XX || ARCH_IXP4XX \
693 || ARCH_L7200 || ARCH_LH7A40X || ARCH_PXA || ARCH_RPC \
694 || ARCH_S3C2410 || ARCH_SA1100 || ARCH_SHARK || FOOTBRIDGE
693source "drivers/ide/Kconfig" 695source "drivers/ide/Kconfig"
694endif 696endif
695 697
diff --git a/arch/arm/boot/compressed/head-xscale.S b/arch/arm/boot/compressed/head-xscale.S
index 665bd2c20743..d3fe2533907e 100644
--- a/arch/arm/boot/compressed/head-xscale.S
+++ b/arch/arm/boot/compressed/head-xscale.S
@@ -47,3 +47,10 @@ __XScale_start:
47 orr r7, r7, #(MACH_TYPE_GTWX5715 & 0xff00) 47 orr r7, r7, #(MACH_TYPE_GTWX5715 & 0xff00)
48#endif 48#endif
49 49
50#ifdef CONFIG_ARCH_IXP2000
51 mov r1, #-1
52 mov r0, #0xd6000000
53 str r1, [r0, #0x14]
54 str r1, [r0, #0x18]
55#endif
56
diff --git a/arch/arm/configs/badge4_defconfig b/arch/arm/configs/badge4_defconfig
index 2b4059d2f8e4..5d92af975d87 100644
--- a/arch/arm/configs/badge4_defconfig
+++ b/arch/arm/configs/badge4_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-rc1-bk2 3# Linux kernel version: 2.6.12-rc6-git3
4# Sat Mar 26 21:32:26 2005 4# Thu Jun 9 19:00:50 2005
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -16,6 +16,7 @@ CONFIG_GENERIC_IOMAP=y
16CONFIG_EXPERIMENTAL=y 16CONFIG_EXPERIMENTAL=y
17CONFIG_CLEAN_COMPILE=y 17CONFIG_CLEAN_COMPILE=y
18CONFIG_BROKEN_ON_SMP=y 18CONFIG_BROKEN_ON_SMP=y
19CONFIG_INIT_ENV_ARG_LIMIT=32
19 20
20# 21#
21# General setup 22# General setup
@@ -34,6 +35,8 @@ CONFIG_EMBEDDED=y
34CONFIG_KALLSYMS=y 35CONFIG_KALLSYMS=y
35# CONFIG_KALLSYMS_ALL is not set 36# CONFIG_KALLSYMS_ALL is not set
36# CONFIG_KALLSYMS_EXTRA_PASS is not set 37# CONFIG_KALLSYMS_EXTRA_PASS is not set
38CONFIG_PRINTK=y
39CONFIG_BUG=y
37CONFIG_BASE_FULL=y 40CONFIG_BASE_FULL=y
38CONFIG_FUTEX=y 41CONFIG_FUTEX=y
39CONFIG_EPOLL=y 42CONFIG_EPOLL=y
@@ -109,7 +112,6 @@ CONFIG_CPU_ABRT_EV4=y
109CONFIG_CPU_CACHE_V4WB=y 112CONFIG_CPU_CACHE_V4WB=y
110CONFIG_CPU_CACHE_VIVT=y 113CONFIG_CPU_CACHE_VIVT=y
111CONFIG_CPU_TLB_V4WB=y 114CONFIG_CPU_TLB_V4WB=y
112CONFIG_CPU_MINICACHE=y
113 115
114# 116#
115# Processor Features 117# Processor Features
@@ -122,6 +124,7 @@ CONFIG_FORCE_MAX_ZONEORDER=9
122# Bus support 124# Bus support
123# 125#
124CONFIG_ISA=y 126CONFIG_ISA=y
127CONFIG_ISA_DMA_API=y
125 128
126# 129#
127# PCCARD (PCMCIA/CardBus) support 130# PCCARD (PCMCIA/CardBus) support
@@ -131,6 +134,7 @@ CONFIG_ISA=y
131# 134#
132# Kernel Features 135# Kernel Features
133# 136#
137# CONFIG_SMP is not set
134# CONFIG_PREEMPT is not set 138# CONFIG_PREEMPT is not set
135CONFIG_DISCONTIGMEM=y 139CONFIG_DISCONTIGMEM=y
136# CONFIG_LEDS is not set 140# CONFIG_LEDS is not set
@@ -152,12 +156,14 @@ CONFIG_CPU_FREQ_TABLE=y
152# CONFIG_CPU_FREQ_DEBUG is not set 156# CONFIG_CPU_FREQ_DEBUG is not set
153CONFIG_CPU_FREQ_STAT=y 157CONFIG_CPU_FREQ_STAT=y
154# CONFIG_CPU_FREQ_STAT_DETAILS is not set 158# CONFIG_CPU_FREQ_STAT_DETAILS is not set
155CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y 159# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
156# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set 160CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
157CONFIG_CPU_FREQ_GOV_PERFORMANCE=y 161CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
158# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set 162# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
159# CONFIG_CPU_FREQ_GOV_USERSPACE is not set 163CONFIG_CPU_FREQ_GOV_USERSPACE=y
160# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set 164# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
165# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
166CONFIG_CPU_FREQ_SA1100=y
161 167
162# 168#
163# Floating point emulation 169# Floating point emulation
@@ -294,7 +300,6 @@ CONFIG_PARPORT_NOT_PC=y
294# 300#
295# Block devices 301# Block devices
296# 302#
297# CONFIG_BLK_DEV_FD is not set
298# CONFIG_BLK_DEV_XD is not set 303# CONFIG_BLK_DEV_XD is not set
299# CONFIG_PARIDE is not set 304# CONFIG_PARIDE is not set
300# CONFIG_BLK_DEV_COW_COMMON is not set 305# CONFIG_BLK_DEV_COW_COMMON is not set
@@ -428,7 +433,6 @@ CONFIG_NET=y
428# 433#
429CONFIG_PACKET=y 434CONFIG_PACKET=y
430# CONFIG_PACKET_MMAP is not set 435# CONFIG_PACKET_MMAP is not set
431# CONFIG_NETLINK_DEV is not set
432CONFIG_UNIX=y 436CONFIG_UNIX=y
433# CONFIG_NET_KEY is not set 437# CONFIG_NET_KEY is not set
434CONFIG_INET=y 438CONFIG_INET=y
@@ -526,6 +530,7 @@ CONFIG_IRDA_ULTRA=y
526# CONFIG_SMC_IRCC_FIR is not set 530# CONFIG_SMC_IRCC_FIR is not set
527# CONFIG_ALI_FIR is not set 531# CONFIG_ALI_FIR is not set
528CONFIG_SA1100_FIR=y 532CONFIG_SA1100_FIR=y
533# CONFIG_VIA_FIR is not set
529CONFIG_BT=m 534CONFIG_BT=m
530CONFIG_BT_L2CAP=m 535CONFIG_BT_L2CAP=m
531# CONFIG_BT_SCO is not set 536# CONFIG_BT_SCO is not set
@@ -618,7 +623,6 @@ CONFIG_NET_WIRELESS=y
618# 623#
619# CONFIG_SERIO is not set 624# CONFIG_SERIO is not set
620# CONFIG_GAMEPORT is not set 625# CONFIG_GAMEPORT is not set
621CONFIG_SOUND_GAMEPORT=y
622 626
623# 627#
624# Character devices 628# Character devices
@@ -687,7 +691,6 @@ CONFIG_RTC=m
687# 691#
688# TPM devices 692# TPM devices
689# 693#
690# CONFIG_TCG_TPM is not set
691 694
692# 695#
693# I2C support 696# I2C support
@@ -736,6 +739,7 @@ CONFIG_I2C_ELEKTOR=m
736# CONFIG_SENSORS_LM85 is not set 739# CONFIG_SENSORS_LM85 is not set
737# CONFIG_SENSORS_LM87 is not set 740# CONFIG_SENSORS_LM87 is not set
738# CONFIG_SENSORS_LM90 is not set 741# CONFIG_SENSORS_LM90 is not set
742# CONFIG_SENSORS_LM92 is not set
739# CONFIG_SENSORS_MAX1619 is not set 743# CONFIG_SENSORS_MAX1619 is not set
740# CONFIG_SENSORS_PC87360 is not set 744# CONFIG_SENSORS_PC87360 is not set
741# CONFIG_SENSORS_SMSC47B397 is not set 745# CONFIG_SENSORS_SMSC47B397 is not set
@@ -747,6 +751,7 @@ CONFIG_I2C_ELEKTOR=m
747# 751#
748# Other I2C Chip support 752# Other I2C Chip support
749# 753#
754# CONFIG_SENSORS_DS1337 is not set
750# CONFIG_SENSORS_EEPROM is not set 755# CONFIG_SENSORS_EEPROM is not set
751# CONFIG_SENSORS_PCF8574 is not set 756# CONFIG_SENSORS_PCF8574 is not set
752# CONFIG_SENSORS_PCF8591 is not set 757# CONFIG_SENSORS_PCF8591 is not set
@@ -871,7 +876,6 @@ CONFIG_USB_PRINTER=m
871# 876#
872CONFIG_USB_STORAGE=y 877CONFIG_USB_STORAGE=y
873CONFIG_USB_STORAGE_DEBUG=y 878CONFIG_USB_STORAGE_DEBUG=y
874# CONFIG_USB_STORAGE_RW_DETECT is not set
875# CONFIG_USB_STORAGE_DATAFAB is not set 879# CONFIG_USB_STORAGE_DATAFAB is not set
876# CONFIG_USB_STORAGE_FREECOM is not set 880# CONFIG_USB_STORAGE_FREECOM is not set
877# CONFIG_USB_STORAGE_ISD200 is not set 881# CONFIG_USB_STORAGE_ISD200 is not set
@@ -954,9 +958,11 @@ CONFIG_USB_USS720=m
954# 958#
955CONFIG_USB_SERIAL=m 959CONFIG_USB_SERIAL=m
956CONFIG_USB_SERIAL_GENERIC=y 960CONFIG_USB_SERIAL_GENERIC=y
961# CONFIG_USB_SERIAL_AIRPRIME is not set
957CONFIG_USB_SERIAL_BELKIN=m 962CONFIG_USB_SERIAL_BELKIN=m
958CONFIG_USB_SERIAL_WHITEHEAT=m 963CONFIG_USB_SERIAL_WHITEHEAT=m
959CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m 964CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
965# CONFIG_USB_SERIAL_CP2101 is not set
960# CONFIG_USB_SERIAL_CYPRESS_M8 is not set 966# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
961CONFIG_USB_SERIAL_EMPEG=m 967CONFIG_USB_SERIAL_EMPEG=m
962CONFIG_USB_SERIAL_FTDI_SIO=m 968CONFIG_USB_SERIAL_FTDI_SIO=m
@@ -985,6 +991,7 @@ CONFIG_USB_SERIAL_KEYSPAN=m
985# CONFIG_USB_SERIAL_KOBIL_SCT is not set 991# CONFIG_USB_SERIAL_KOBIL_SCT is not set
986CONFIG_USB_SERIAL_MCT_U232=m 992CONFIG_USB_SERIAL_MCT_U232=m
987CONFIG_USB_SERIAL_PL2303=m 993CONFIG_USB_SERIAL_PL2303=m
994# CONFIG_USB_SERIAL_HP4X is not set
988# CONFIG_USB_SERIAL_SAFE is not set 995# CONFIG_USB_SERIAL_SAFE is not set
989# CONFIG_USB_SERIAL_TI is not set 996# CONFIG_USB_SERIAL_TI is not set
990CONFIG_USB_SERIAL_CYBERJACK=m 997CONFIG_USB_SERIAL_CYBERJACK=m
diff --git a/arch/arm/configs/h3600_defconfig b/arch/arm/configs/h3600_defconfig
index b4e297dd54b2..b9de07de80fe 100644
--- a/arch/arm/configs/h3600_defconfig
+++ b/arch/arm/configs/h3600_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-rc1-bk2 3# Linux kernel version: 2.6.12-rc4
4# Mon Mar 28 00:02:26 2005 4# Thu Jun 9 01:59:03 2005
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -16,6 +16,7 @@ CONFIG_GENERIC_IOMAP=y
16CONFIG_EXPERIMENTAL=y 16CONFIG_EXPERIMENTAL=y
17CONFIG_CLEAN_COMPILE=y 17CONFIG_CLEAN_COMPILE=y
18CONFIG_BROKEN_ON_SMP=y 18CONFIG_BROKEN_ON_SMP=y
19CONFIG_INIT_ENV_ARG_LIMIT=32
19 20
20# 21#
21# General setup 22# General setup
@@ -33,6 +34,8 @@ CONFIG_KOBJECT_UEVENT=y
33# CONFIG_EMBEDDED is not set 34# CONFIG_EMBEDDED is not set
34CONFIG_KALLSYMS=y 35CONFIG_KALLSYMS=y
35# CONFIG_KALLSYMS_EXTRA_PASS is not set 36# CONFIG_KALLSYMS_EXTRA_PASS is not set
37CONFIG_PRINTK=y
38CONFIG_BUG=y
36CONFIG_BASE_FULL=y 39CONFIG_BASE_FULL=y
37CONFIG_FUTEX=y 40CONFIG_FUTEX=y
38CONFIG_EPOLL=y 41CONFIG_EPOLL=y
@@ -120,6 +123,7 @@ CONFIG_CPU_MINICACHE=y
120# Bus support 123# Bus support
121# 124#
122CONFIG_ISA=y 125CONFIG_ISA=y
126CONFIG_ISA_DMA_API=y
123 127
124# 128#
125# PCCARD (PCMCIA/CardBus) support 129# PCCARD (PCMCIA/CardBus) support
@@ -138,6 +142,7 @@ CONFIG_PCMCIA_SA1100=y
138# 142#
139# Kernel Features 143# Kernel Features
140# 144#
145# CONFIG_SMP is not set
141# CONFIG_PREEMPT is not set 146# CONFIG_PREEMPT is not set
142CONFIG_DISCONTIGMEM=y 147CONFIG_DISCONTIGMEM=y
143# CONFIG_LEDS is not set 148# CONFIG_LEDS is not set
@@ -159,12 +164,13 @@ CONFIG_CPU_FREQ_TABLE=y
159# CONFIG_CPU_FREQ_DEBUG is not set 164# CONFIG_CPU_FREQ_DEBUG is not set
160CONFIG_CPU_FREQ_STAT=y 165CONFIG_CPU_FREQ_STAT=y
161# CONFIG_CPU_FREQ_STAT_DETAILS is not set 166# CONFIG_CPU_FREQ_STAT_DETAILS is not set
162CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y 167# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
163# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set 168CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
164CONFIG_CPU_FREQ_GOV_PERFORMANCE=y 169# CONFIG_CPU_FREQ_GOV_PERFORMANCE is not set
165# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set 170# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
166# CONFIG_CPU_FREQ_GOV_USERSPACE is not set 171CONFIG_CPU_FREQ_GOV_USERSPACE=y
167# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set 172# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
173CONFIG_CPU_FREQ_SA1100=y
168 174
169# 175#
170# Floating point emulation 176# Floating point emulation
@@ -298,7 +304,6 @@ CONFIG_MTD_SA1100=y
298# 304#
299# Block devices 305# Block devices
300# 306#
301# CONFIG_BLK_DEV_FD is not set
302# CONFIG_BLK_DEV_XD is not set 307# CONFIG_BLK_DEV_XD is not set
303# CONFIG_BLK_DEV_COW_COMMON is not set 308# CONFIG_BLK_DEV_COW_COMMON is not set
304CONFIG_BLK_DEV_LOOP=m 309CONFIG_BLK_DEV_LOOP=m
@@ -379,7 +384,6 @@ CONFIG_NET=y
379# Networking options 384# Networking options
380# 385#
381# CONFIG_PACKET is not set 386# CONFIG_PACKET is not set
382# CONFIG_NETLINK_DEV is not set
383CONFIG_UNIX=y 387CONFIG_UNIX=y
384# CONFIG_NET_KEY is not set 388# CONFIG_NET_KEY is not set
385CONFIG_INET=y 389CONFIG_INET=y
@@ -476,6 +480,7 @@ CONFIG_IRCOMM=m
476# CONFIG_SMC_IRCC_FIR is not set 480# CONFIG_SMC_IRCC_FIR is not set
477# CONFIG_ALI_FIR is not set 481# CONFIG_ALI_FIR is not set
478CONFIG_SA1100_FIR=m 482CONFIG_SA1100_FIR=m
483# CONFIG_VIA_FIR is not set
479# CONFIG_BT is not set 484# CONFIG_BT is not set
480CONFIG_NETDEVICES=y 485CONFIG_NETDEVICES=y
481# CONFIG_DUMMY is not set 486# CONFIG_DUMMY is not set
@@ -647,7 +652,6 @@ CONFIG_LEGACY_PTY_COUNT=256
647# 652#
648# TPM devices 653# TPM devices
649# 654#
650# CONFIG_TCG_TPM is not set
651 655
652# 656#
653# I2C support 657# I2C support
@@ -676,9 +680,11 @@ CONFIG_FB_CFB_FILLRECT=y
676CONFIG_FB_CFB_COPYAREA=y 680CONFIG_FB_CFB_COPYAREA=y
677CONFIG_FB_CFB_IMAGEBLIT=y 681CONFIG_FB_CFB_IMAGEBLIT=y
678CONFIG_FB_SOFT_CURSOR=y 682CONFIG_FB_SOFT_CURSOR=y
683# CONFIG_FB_MACMODES is not set
679# CONFIG_FB_MODE_HELPERS is not set 684# CONFIG_FB_MODE_HELPERS is not set
680# CONFIG_FB_TILEBLITTING is not set 685# CONFIG_FB_TILEBLITTING is not set
681CONFIG_FB_SA1100=y 686CONFIG_FB_SA1100=y
687# CONFIG_FB_S1D13XXX is not set
682# CONFIG_FB_VIRTUAL is not set 688# CONFIG_FB_VIRTUAL is not set
683 689
684# 690#
diff --git a/arch/arm/configs/hackkit_defconfig b/arch/arm/configs/hackkit_defconfig
index 6987c8c5ddb4..fb41a36a5a68 100644
--- a/arch/arm/configs/hackkit_defconfig
+++ b/arch/arm/configs/hackkit_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-rc1-bk2 3# Linux kernel version: 2.6.12-rc6-git3
4# Mon Mar 28 00:22:34 2005 4# Thu Jun 9 20:58:58 2005
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -16,6 +16,7 @@ CONFIG_GENERIC_IOMAP=y
16CONFIG_EXPERIMENTAL=y 16CONFIG_EXPERIMENTAL=y
17CONFIG_CLEAN_COMPILE=y 17CONFIG_CLEAN_COMPILE=y
18CONFIG_BROKEN_ON_SMP=y 18CONFIG_BROKEN_ON_SMP=y
19CONFIG_INIT_ENV_ARG_LIMIT=32
19 20
20# 21#
21# General setup 22# General setup
@@ -34,6 +35,8 @@ CONFIG_KOBJECT_UEVENT=y
34CONFIG_KALLSYMS=y 35CONFIG_KALLSYMS=y
35# CONFIG_KALLSYMS_ALL is not set 36# CONFIG_KALLSYMS_ALL is not set
36# CONFIG_KALLSYMS_EXTRA_PASS is not set 37# CONFIG_KALLSYMS_EXTRA_PASS is not set
38CONFIG_PRINTK=y
39CONFIG_BUG=y
37CONFIG_BASE_FULL=y 40CONFIG_BASE_FULL=y
38CONFIG_FUTEX=y 41CONFIG_FUTEX=y
39CONFIG_EPOLL=y 42CONFIG_EPOLL=y
@@ -109,7 +112,6 @@ CONFIG_CPU_ABRT_EV4=y
109CONFIG_CPU_CACHE_V4WB=y 112CONFIG_CPU_CACHE_V4WB=y
110CONFIG_CPU_CACHE_VIVT=y 113CONFIG_CPU_CACHE_VIVT=y
111CONFIG_CPU_TLB_V4WB=y 114CONFIG_CPU_TLB_V4WB=y
112CONFIG_CPU_MINICACHE=y
113 115
114# 116#
115# Processor Features 117# Processor Features
@@ -119,6 +121,7 @@ CONFIG_CPU_MINICACHE=y
119# Bus support 121# Bus support
120# 122#
121CONFIG_ISA=y 123CONFIG_ISA=y
124CONFIG_ISA_DMA_API=y
122 125
123# 126#
124# PCCARD (PCMCIA/CardBus) support 127# PCCARD (PCMCIA/CardBus) support
@@ -128,6 +131,7 @@ CONFIG_ISA=y
128# 131#
129# Kernel Features 132# Kernel Features
130# 133#
134# CONFIG_SMP is not set
131# CONFIG_PREEMPT is not set 135# CONFIG_PREEMPT is not set
132CONFIG_DISCONTIGMEM=y 136CONFIG_DISCONTIGMEM=y
133CONFIG_LEDS=y 137CONFIG_LEDS=y
@@ -151,12 +155,14 @@ CONFIG_CPU_FREQ_TABLE=y
151# CONFIG_CPU_FREQ_DEBUG is not set 155# CONFIG_CPU_FREQ_DEBUG is not set
152CONFIG_CPU_FREQ_STAT=y 156CONFIG_CPU_FREQ_STAT=y
153# CONFIG_CPU_FREQ_STAT_DETAILS is not set 157# CONFIG_CPU_FREQ_STAT_DETAILS is not set
154CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y 158# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
155# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set 159CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
156CONFIG_CPU_FREQ_GOV_PERFORMANCE=y 160CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
157# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set 161# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
158# CONFIG_CPU_FREQ_GOV_USERSPACE is not set 162CONFIG_CPU_FREQ_GOV_USERSPACE=y
159# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set 163# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
164# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
165CONFIG_CPU_FREQ_SA1100=y
160 166
161# 167#
162# Floating point emulation 168# Floating point emulation
@@ -280,7 +286,6 @@ CONFIG_MTD_CFI_UTIL=y
280# 286#
281# Block devices 287# Block devices
282# 288#
283# CONFIG_BLK_DEV_FD is not set
284# CONFIG_BLK_DEV_XD is not set 289# CONFIG_BLK_DEV_XD is not set
285# CONFIG_BLK_DEV_COW_COMMON is not set 290# CONFIG_BLK_DEV_COW_COMMON is not set
286# CONFIG_BLK_DEV_LOOP is not set 291# CONFIG_BLK_DEV_LOOP is not set
@@ -338,7 +343,6 @@ CONFIG_NET=y
338# 343#
339CONFIG_PACKET=y 344CONFIG_PACKET=y
340# CONFIG_PACKET_MMAP is not set 345# CONFIG_PACKET_MMAP is not set
341# CONFIG_NETLINK_DEV is not set
342CONFIG_UNIX=y 346CONFIG_UNIX=y
343# CONFIG_NET_KEY is not set 347# CONFIG_NET_KEY is not set
344CONFIG_INET=y 348CONFIG_INET=y
@@ -484,7 +488,6 @@ CONFIG_SERIO=y
484CONFIG_SERIO_SERPORT=y 488CONFIG_SERIO_SERPORT=y
485# CONFIG_SERIO_RAW is not set 489# CONFIG_SERIO_RAW is not set
486# CONFIG_GAMEPORT is not set 490# CONFIG_GAMEPORT is not set
487CONFIG_SOUND_GAMEPORT=y
488 491
489# 492#
490# Character devices 493# Character devices
@@ -533,7 +536,6 @@ CONFIG_LEGACY_PTY_COUNT=256
533# 536#
534# TPM devices 537# TPM devices
535# 538#
536# CONFIG_TCG_TPM is not set
537 539
538# 540#
539# I2C support 541# I2C support
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index 4eb36155dc93..e14278d59882 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -269,7 +269,7 @@ __pabt_svc:
269 add r5, sp, #S_PC 269 add r5, sp, #S_PC
270 ldmia r7, {r2 - r4} @ Get USR pc, cpsr 270 ldmia r7, {r2 - r4} @ Get USR pc, cpsr
271 271
272#if __LINUX_ARM_ARCH__ < 6 272#if __LINUX_ARM_ARCH__ < 6 && !defined(CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG)
273 @ make sure our user space atomic helper is aborted 273 @ make sure our user space atomic helper is aborted
274 cmp r2, #VIRT_OFFSET 274 cmp r2, #VIRT_OFFSET
275 bichs r3, r3, #PSR_Z_BIT 275 bichs r3, r3, #PSR_Z_BIT
@@ -616,11 +616,17 @@ __kuser_helper_start:
616 616
617__kuser_cmpxchg: @ 0xffff0fc0 617__kuser_cmpxchg: @ 0xffff0fc0
618 618
619#if __LINUX_ARM_ARCH__ < 6 619#if defined(CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG)
620 620
621#ifdef CONFIG_SMP /* sanity check */ 621 /*
622#error "CONFIG_SMP on a machine supporting pre-ARMv6 processors?" 622 * Poor you. No fast solution possible...
623#endif 623 * The kernel itself must perform the operation.
624 * A special ghost syscall is used for that (see traps.c).
625 */
626 swi #0x9ffff0
627 mov pc, lr
628
629#elif __LINUX_ARM_ARCH__ < 6
624 630
625 /* 631 /*
626 * Theory of operation: 632 * Theory of operation:
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index 14df16b983f4..45d2a032d890 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -464,6 +464,55 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs)
464#endif 464#endif
465 return 0; 465 return 0;
466 466
467#ifdef CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG
468 /*
469 * Atomically store r1 in *r2 if *r2 is equal to r0 for user space.
470 * Return zero in r0 if *MEM was changed or non-zero if no exchange
471 * happened. Also set the user C flag accordingly.
472 * If access permissions have to be fixed up then non-zero is
473 * returned and the operation has to be re-attempted.
474 *
475 * *NOTE*: This is a ghost syscall private to the kernel. Only the
476 * __kuser_cmpxchg code in entry-armv.S should be aware of its
477 * existence. Don't ever use this from user code.
478 */
479 case 0xfff0:
480 {
481 extern void do_DataAbort(unsigned long addr, unsigned int fsr,
482 struct pt_regs *regs);
483 unsigned long val;
484 unsigned long addr = regs->ARM_r2;
485 struct mm_struct *mm = current->mm;
486 pgd_t *pgd; pmd_t *pmd; pte_t *pte;
487
488 regs->ARM_cpsr &= ~PSR_C_BIT;
489 spin_lock(&mm->page_table_lock);
490 pgd = pgd_offset(mm, addr);
491 if (!pgd_present(*pgd))
492 goto bad_access;
493 pmd = pmd_offset(pgd, addr);
494 if (!pmd_present(*pmd))
495 goto bad_access;
496 pte = pte_offset_map(pmd, addr);
497 if (!pte_present(*pte) || !pte_write(*pte))
498 goto bad_access;
499 val = *(unsigned long *)addr;
500 val -= regs->ARM_r0;
501 if (val == 0) {
502 *(unsigned long *)addr = regs->ARM_r1;
503 regs->ARM_cpsr |= PSR_C_BIT;
504 }
505 spin_unlock(&mm->page_table_lock);
506 return val;
507
508 bad_access:
509 spin_unlock(&mm->page_table_lock);
510 /* simulate a read access fault */
511 do_DataAbort(addr, 15 + (1 << 11), regs);
512 return -1;
513 }
514#endif
515
467 default: 516 default:
468 /* Calls 9f00xx..9f07ff are defined to return -ENOSYS 517 /* Calls 9f00xx..9f07ff are defined to return -ENOSYS
469 if not implemented, rather than raising SIGILL. This 518 if not implemented, rather than raising SIGILL. This
diff --git a/arch/arm/lib/io-writesw-armv4.S b/arch/arm/lib/io-writesw-armv4.S
index 6d1d7c27806e..5e240e452af6 100644
--- a/arch/arm/lib/io-writesw-armv4.S
+++ b/arch/arm/lib/io-writesw-armv4.S
@@ -87,9 +87,9 @@ ENTRY(__raw_writesw)
87 subs r2, r2, #2 87 subs r2, r2, #2
88 orr ip, ip, r3, push_hbyte1 88 orr ip, ip, r3, push_hbyte1
89 strh ip, [r0] 89 strh ip, [r0]
90 bpl 2b 90 bpl 1b
91 91
923: tst r2, #1 92 tst r2, #1
932: movne ip, r3, lsr #8 933: movne ip, r3, lsr #8
94 strneh ip, [r0] 94 strneh ip, [r0]
95 mov pc, lr 95 mov pc, lr
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c
index 3b948e8c2751..e0a01eef0993 100644
--- a/arch/arm/mach-integrator/integrator_cp.c
+++ b/arch/arm/mach-integrator/integrator_cp.c
@@ -83,7 +83,6 @@ static struct map_desc intcp_io_desc[] __initdata = {
83 { IO_ADDRESS(INTEGRATOR_UART1_BASE), INTEGRATOR_UART1_BASE, SZ_4K, MT_DEVICE }, 83 { IO_ADDRESS(INTEGRATOR_UART1_BASE), INTEGRATOR_UART1_BASE, SZ_4K, MT_DEVICE },
84 { IO_ADDRESS(INTEGRATOR_DBG_BASE), INTEGRATOR_DBG_BASE, SZ_4K, MT_DEVICE }, 84 { IO_ADDRESS(INTEGRATOR_DBG_BASE), INTEGRATOR_DBG_BASE, SZ_4K, MT_DEVICE },
85 { IO_ADDRESS(INTEGRATOR_GPIO_BASE), INTEGRATOR_GPIO_BASE, SZ_4K, MT_DEVICE }, 85 { IO_ADDRESS(INTEGRATOR_GPIO_BASE), INTEGRATOR_GPIO_BASE, SZ_4K, MT_DEVICE },
86 { 0xfc900000, 0xc9000000, SZ_4K, MT_DEVICE },
87 { 0xfca00000, 0xca000000, SZ_4K, MT_DEVICE }, 86 { 0xfca00000, 0xca000000, SZ_4K, MT_DEVICE },
88 { 0xfcb00000, 0xcb000000, SZ_4K, MT_DEVICE }, 87 { 0xfcb00000, 0xcb000000, SZ_4K, MT_DEVICE },
89}; 88};
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c
index dd012d6e2f5c..f2c9e0d2b24b 100644
--- a/arch/arm/mach-pxa/lubbock.c
+++ b/arch/arm/mach-pxa/lubbock.c
@@ -15,6 +15,7 @@
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/device.h> 17#include <linux/device.h>
18#include <linux/sysdev.h>
18#include <linux/major.h> 19#include <linux/major.h>
19#include <linux/fb.h> 20#include <linux/fb.h>
20#include <linux/interrupt.h> 21#include <linux/interrupt.h>
@@ -106,6 +107,35 @@ static void __init lubbock_init_irq(void)
106 set_irq_type(IRQ_GPIO(0), IRQT_FALLING); 107 set_irq_type(IRQ_GPIO(0), IRQT_FALLING);
107} 108}
108 109
110#ifdef CONFIG_PM
111
112static int lubbock_irq_resume(struct sys_device *dev)
113{
114 LUB_IRQ_MASK_EN = lubbock_irq_enabled;
115 return 0;
116}
117
118static struct sysdev_class lubbock_irq_sysclass = {
119 set_kset_name("cpld_irq"),
120 .resume = lubbock_irq_resume,
121};
122
123static struct sys_device lubbock_irq_device = {
124 .cls = &lubbock_irq_sysclass,
125};
126
127static int __init lubbock_irq_device_init(void)
128{
129 int ret = sysdev_class_register(&lubbock_irq_sysclass);
130 if (ret == 0)
131 ret = sysdev_register(&lubbock_irq_device);
132 return ret;
133}
134
135device_initcall(lubbock_irq_device_init);
136
137#endif
138
109static int lubbock_udc_is_connected(void) 139static int lubbock_udc_is_connected(void)
110{ 140{
111 return (LUB_MISC_RD & (1 << 9)) == 0; 141 return (LUB_MISC_RD & (1 << 9)) == 0;
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c
index 3f952237ae3d..9896afca751f 100644
--- a/arch/arm/mach-pxa/mainstone.c
+++ b/arch/arm/mach-pxa/mainstone.c
@@ -15,6 +15,7 @@
15 15
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/device.h> 17#include <linux/device.h>
18#include <linux/sysdev.h>
18#include <linux/interrupt.h> 19#include <linux/interrupt.h>
19#include <linux/sched.h> 20#include <linux/sched.h>
20#include <linux/bitops.h> 21#include <linux/bitops.h>
@@ -62,7 +63,6 @@ static struct irqchip mainstone_irq_chip = {
62 .unmask = mainstone_unmask_irq, 63 .unmask = mainstone_unmask_irq,
63}; 64};
64 65
65
66static void mainstone_irq_handler(unsigned int irq, struct irqdesc *desc, 66static void mainstone_irq_handler(unsigned int irq, struct irqdesc *desc,
67 struct pt_regs *regs) 67 struct pt_regs *regs)
68{ 68{
@@ -100,6 +100,35 @@ static void __init mainstone_init_irq(void)
100 set_irq_type(IRQ_GPIO(0), IRQT_FALLING); 100 set_irq_type(IRQ_GPIO(0), IRQT_FALLING);
101} 101}
102 102
103#ifdef CONFIG_PM
104
105static int mainstone_irq_resume(struct sys_device *dev)
106{
107 MST_INTMSKENA = mainstone_irq_enabled;
108 return 0;
109}
110
111static struct sysdev_class mainstone_irq_sysclass = {
112 set_kset_name("cpld_irq"),
113 .resume = mainstone_irq_resume,
114};
115
116static struct sys_device mainstone_irq_device = {
117 .cls = &mainstone_irq_sysclass,
118};
119
120static int __init mainstone_irq_device_init(void)
121{
122 int ret = sysdev_class_register(&mainstone_irq_sysclass);
123 if (ret == 0)
124 ret = sysdev_register(&mainstone_irq_device);
125 return ret;
126}
127
128device_initcall(mainstone_irq_device_init);
129
130#endif
131
103 132
104static struct resource smc91x_resources[] = { 133static struct resource smc91x_resources[] = {
105 [0] = { 134 [0] = {
@@ -304,6 +333,15 @@ static void __init mainstone_map_io(void)
304 PWER = 0xC0000002; 333 PWER = 0xC0000002;
305 PRER = 0x00000002; 334 PRER = 0x00000002;
306 PFER = 0x00000002; 335 PFER = 0x00000002;
336 /* for use I SRAM as framebuffer. */
337 PSLR |= 0xF04;
338 PCFR = 0x66;
339 /* For Keypad wakeup. */
340 KPC &=~KPC_ASACT;
341 KPC |=KPC_AS;
342 PKWR = 0x000FD000;
343 /* Need read PKWR back after set it. */
344 PKWR;
307} 345}
308 346
309MACHINE_START(MAINSTONE, "Intel HCDDBBVA0 Development Platform (aka Mainstone)") 347MACHINE_START(MAINSTONE, "Intel HCDDBBVA0 Development Platform (aka Mainstone)")
diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c
index 82a4bf34c251..9799fe80df23 100644
--- a/arch/arm/mach-pxa/pm.c
+++ b/arch/arm/mach-pxa/pm.c
@@ -29,9 +29,6 @@
29 */ 29 */
30#undef DEBUG 30#undef DEBUG
31 31
32extern void pxa_cpu_suspend(void);
33extern void pxa_cpu_resume(void);
34
35#define SAVE(x) sleep_save[SLEEP_SAVE_##x] = x 32#define SAVE(x) sleep_save[SLEEP_SAVE_##x] = x
36#define RESTORE(x) x = sleep_save[SLEEP_SAVE_##x] 33#define RESTORE(x) x = sleep_save[SLEEP_SAVE_##x]
37 34
@@ -63,6 +60,12 @@ enum { SLEEP_SAVE_START = 0,
63 SLEEP_SAVE_ICMR, 60 SLEEP_SAVE_ICMR,
64 SLEEP_SAVE_CKEN, 61 SLEEP_SAVE_CKEN,
65 62
63#ifdef CONFIG_PXA27x
64 SLEEP_SAVE_MDREFR,
65 SLEEP_SAVE_PWER, SLEEP_SAVE_PCFR, SLEEP_SAVE_PRER,
66 SLEEP_SAVE_PFER, SLEEP_SAVE_PKWR,
67#endif
68
66 SLEEP_SAVE_CKSUM, 69 SLEEP_SAVE_CKSUM,
67 70
68 SLEEP_SAVE_SIZE 71 SLEEP_SAVE_SIZE
@@ -75,9 +78,7 @@ static int pxa_pm_enter(suspend_state_t state)
75 unsigned long checksum = 0; 78 unsigned long checksum = 0;
76 struct timespec delta, rtc; 79 struct timespec delta, rtc;
77 int i; 80 int i;
78 81 extern void pxa_cpu_pm_enter(suspend_state_t state);
79 if (state != PM_SUSPEND_MEM)
80 return -EINVAL;
81 82
82#ifdef CONFIG_IWMMXT 83#ifdef CONFIG_IWMMXT
83 /* force any iWMMXt context to ram **/ 84 /* force any iWMMXt context to ram **/
@@ -100,16 +101,17 @@ static int pxa_pm_enter(suspend_state_t state)
100 SAVE(GAFR2_L); SAVE(GAFR2_U); 101 SAVE(GAFR2_L); SAVE(GAFR2_U);
101 102
102#ifdef CONFIG_PXA27x 103#ifdef CONFIG_PXA27x
104 SAVE(MDREFR);
103 SAVE(GPLR3); SAVE(GPDR3); SAVE(GRER3); SAVE(GFER3); SAVE(PGSR3); 105 SAVE(GPLR3); SAVE(GPDR3); SAVE(GRER3); SAVE(GFER3); SAVE(PGSR3);
104 SAVE(GAFR3_L); SAVE(GAFR3_U); 106 SAVE(GAFR3_L); SAVE(GAFR3_U);
107 SAVE(PWER); SAVE(PCFR); SAVE(PRER);
108 SAVE(PFER); SAVE(PKWR);
105#endif 109#endif
106 110
107 SAVE(ICMR); 111 SAVE(ICMR);
108 ICMR = 0; 112 ICMR = 0;
109 113
110 SAVE(CKEN); 114 SAVE(CKEN);
111 CKEN = 0;
112
113 SAVE(PSTR); 115 SAVE(PSTR);
114 116
115 /* Note: wake up source are set up in each machine specific files */ 117 /* Note: wake up source are set up in each machine specific files */
@@ -123,16 +125,13 @@ static int pxa_pm_enter(suspend_state_t state)
123 /* Clear sleep reset status */ 125 /* Clear sleep reset status */
124 RCSR = RCSR_SMR; 126 RCSR = RCSR_SMR;
125 127
126 /* set resume return address */
127 PSPR = virt_to_phys(pxa_cpu_resume);
128
129 /* before sleeping, calculate and save a checksum */ 128 /* before sleeping, calculate and save a checksum */
130 for (i = 0; i < SLEEP_SAVE_SIZE - 1; i++) 129 for (i = 0; i < SLEEP_SAVE_SIZE - 1; i++)
131 checksum += sleep_save[i]; 130 checksum += sleep_save[i];
132 sleep_save[SLEEP_SAVE_CKSUM] = checksum; 131 sleep_save[SLEEP_SAVE_CKSUM] = checksum;
133 132
134 /* *** go zzz *** */ 133 /* *** go zzz *** */
135 pxa_cpu_suspend(); 134 pxa_cpu_pm_enter(state);
136 135
137 /* after sleeping, validate the checksum */ 136 /* after sleeping, validate the checksum */
138 checksum = 0; 137 checksum = 0;
@@ -145,7 +144,7 @@ static int pxa_pm_enter(suspend_state_t state)
145 LUB_HEXLED = 0xbadbadc5; 144 LUB_HEXLED = 0xbadbadc5;
146#endif 145#endif
147 while (1) 146 while (1)
148 pxa_cpu_suspend(); 147 pxa_cpu_pm_enter(state);
149 } 148 }
150 149
151 /* ensure not to come back here if it wasn't intended */ 150 /* ensure not to come back here if it wasn't intended */
@@ -162,8 +161,11 @@ static int pxa_pm_enter(suspend_state_t state)
162 RESTORE(PGSR0); RESTORE(PGSR1); RESTORE(PGSR2); 161 RESTORE(PGSR0); RESTORE(PGSR1); RESTORE(PGSR2);
163 162
164#ifdef CONFIG_PXA27x 163#ifdef CONFIG_PXA27x
164 RESTORE(MDREFR);
165 RESTORE(GAFR3_L); RESTORE(GAFR3_U); RESTORE_GPLEVEL(3); 165 RESTORE(GAFR3_L); RESTORE(GAFR3_U); RESTORE_GPLEVEL(3);
166 RESTORE(GPDR3); RESTORE(GRER3); RESTORE(GFER3); RESTORE(PGSR3); 166 RESTORE(GPDR3); RESTORE(GRER3); RESTORE(GFER3); RESTORE(PGSR3);
167 RESTORE(PWER); RESTORE(PCFR); RESTORE(PRER);
168 RESTORE(PFER); RESTORE(PKWR);
167#endif 169#endif
168 170
169 PSSR = PSSR_RDH | PSSR_PH; 171 PSSR = PSSR_RDH | PSSR_PH;
@@ -197,7 +199,9 @@ unsigned long sleep_phys_sp(void *sp)
197 */ 199 */
198static int pxa_pm_prepare(suspend_state_t state) 200static int pxa_pm_prepare(suspend_state_t state)
199{ 201{
200 return 0; 202 extern int pxa_cpu_pm_prepare(suspend_state_t state);
203
204 return pxa_cpu_pm_prepare(state);
201} 205}
202 206
203/* 207/*
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c
index e887b7175ef3..7869c3b4e62f 100644
--- a/arch/arm/mach-pxa/pxa25x.c
+++ b/arch/arm/mach-pxa/pxa25x.c
@@ -16,6 +16,7 @@
16 * initialization stuff for PXA machines which can be overridden later if 16 * initialization stuff for PXA machines which can be overridden later if
17 * need be. 17 * need be.
18 */ 18 */
19#include <linux/config.h>
19#include <linux/module.h> 20#include <linux/module.h>
20#include <linux/kernel.h> 21#include <linux/kernel.h>
21#include <linux/init.h> 22#include <linux/init.h>
@@ -102,3 +103,35 @@ unsigned int get_lcdclk_frequency_10khz(void)
102} 103}
103 104
104EXPORT_SYMBOL(get_lcdclk_frequency_10khz); 105EXPORT_SYMBOL(get_lcdclk_frequency_10khz);
106
107#ifdef CONFIG_PM
108
109int pxa_cpu_pm_prepare(suspend_state_t state)
110{
111 switch (state) {
112 case PM_SUSPEND_MEM:
113 break;
114 default:
115 return -EINVAL;
116 }
117
118 return 0;
119}
120
121void pxa_cpu_pm_enter(suspend_state_t state)
122{
123 extern void pxa_cpu_suspend(unsigned int);
124 extern void pxa_cpu_resume(void);
125
126 CKEN = 0;
127
128 switch (state) {
129 case PM_SUSPEND_MEM:
130 /* set resume return address */
131 PSPR = virt_to_phys(pxa_cpu_resume);
132 pxa_cpu_suspend(3);
133 break;
134 }
135}
136
137#endif
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
index 7e863afefb53..893964fb9659 100644
--- a/arch/arm/mach-pxa/pxa27x.c
+++ b/arch/arm/mach-pxa/pxa27x.c
@@ -120,6 +120,42 @@ EXPORT_SYMBOL(get_clk_frequency_khz);
120EXPORT_SYMBOL(get_memclk_frequency_10khz); 120EXPORT_SYMBOL(get_memclk_frequency_10khz);
121EXPORT_SYMBOL(get_lcdclk_frequency_10khz); 121EXPORT_SYMBOL(get_lcdclk_frequency_10khz);
122 122
123#ifdef CONFIG_PM
124
125int pxa_cpu_pm_prepare(suspend_state_t state)
126{
127 switch (state) {
128 case PM_SUSPEND_MEM:
129 return 0;
130 default:
131 return -EINVAL;
132 }
133}
134
135void pxa_cpu_pm_enter(suspend_state_t state)
136{
137 extern void pxa_cpu_standby(void);
138 extern void pxa_cpu_suspend(unsigned int);
139 extern void pxa_cpu_resume(void);
140
141 CKEN = CKEN22_MEMC | CKEN9_OSTIMER;
142
143 /* ensure voltage-change sequencer not initiated, which hangs */
144 PCFR &= ~PCFR_FVC;
145
146 /* Clear edge-detect status register. */
147 PEDR = 0xDF12FE1B;
148
149 switch (state) {
150 case PM_SUSPEND_MEM:
151 /* set resume return address */
152 PSPR = virt_to_phys(pxa_cpu_resume);
153 pxa_cpu_suspend(3);
154 break;
155 }
156}
157
158#endif
123 159
124/* 160/*
125 * device registration specific to PXA27x. 161 * device registration specific to PXA27x.
diff --git a/arch/arm/mach-s3c2410/dma.c b/arch/arm/mach-s3c2410/dma.c
index bc229fab86d4..c7c28890d406 100644
--- a/arch/arm/mach-s3c2410/dma.c
+++ b/arch/arm/mach-s3c2410/dma.c
@@ -785,6 +785,10 @@ int s3c2410_dma_free(dmach_t channel, s3c2410_dma_client_t *client)
785 chan->client = NULL; 785 chan->client = NULL;
786 chan->in_use = 0; 786 chan->in_use = 0;
787 787
788 if (chan->irq_claimed)
789 free_irq(chan->irq, (void *)chan);
790 chan->irq_claimed = 0;
791
788 local_irq_restore(flags); 792 local_irq_restore(flags);
789 793
790 return 0; 794 return 0;
diff --git a/arch/arm/mach-sa1100/Kconfig b/arch/arm/mach-sa1100/Kconfig
index 50cde576dadf..6923316b3d0d 100644
--- a/arch/arm/mach-sa1100/Kconfig
+++ b/arch/arm/mach-sa1100/Kconfig
@@ -150,7 +150,7 @@ config SA1100_SSP
150 150
151config H3600_SLEEVE 151config H3600_SLEEVE
152 tristate "Compaq iPAQ Handheld sleeve support" 152 tristate "Compaq iPAQ Handheld sleeve support"
153 depends on SA1100_H3600 153 depends on SA1100_H3100 || SA1100_H3600
154 help 154 help
155 Choose this option to enable support for extension packs (sleeves) 155 Choose this option to enable support for extension packs (sleeves)
156 for the Compaq iPAQ H3XXX series of handheld computers. This option 156 for the Compaq iPAQ H3XXX series of handheld computers. This option
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index 554e1bd30d6e..302c2a7b9b63 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -543,7 +543,7 @@ static void versatile_clcd_enable(struct clcd_fb *fb)
543 val |= SYS_CLCD_MODE_5551; 543 val |= SYS_CLCD_MODE_5551;
544 break; 544 break;
545 case 6: 545 case 6:
546 val |= SYS_CLCD_MODE_565_BLSB; 546 val |= SYS_CLCD_MODE_565_RLSB;
547 break; 547 break;
548 case 8: 548 case 8:
549 val |= SYS_CLCD_MODE_888; 549 val |= SYS_CLCD_MODE_888;
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index 48bac7da8c70..3fefb43c67f7 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -228,7 +228,6 @@ config CPU_SA1100
228 select CPU_CACHE_V4WB 228 select CPU_CACHE_V4WB
229 select CPU_CACHE_VIVT 229 select CPU_CACHE_VIVT
230 select CPU_TLB_V4WB 230 select CPU_TLB_V4WB
231 select CPU_MINICACHE
232 231
233# XScale 232# XScale
234config CPU_XSCALE 233config CPU_XSCALE
@@ -239,7 +238,6 @@ config CPU_XSCALE
239 select CPU_ABRT_EV5T 238 select CPU_ABRT_EV5T
240 select CPU_CACHE_VIVT 239 select CPU_CACHE_VIVT
241 select CPU_TLB_V4WBI 240 select CPU_TLB_V4WBI
242 select CPU_MINICACHE
243 241
244# ARMv6 242# ARMv6
245config CPU_V6 243config CPU_V6
@@ -345,11 +343,6 @@ config CPU_TLB_V4WBI
345config CPU_TLB_V6 343config CPU_TLB_V6
346 bool 344 bool
347 345
348config CPU_MINICACHE
349 bool
350 help
351 Processor has a minicache.
352
353comment "Processor Features" 346comment "Processor Features"
354 347
355config ARM_THUMB 348config ARM_THUMB
@@ -429,3 +422,11 @@ config HAS_TLS_REG
429 assume directly accessing that register and always obtain the 422 assume directly accessing that register and always obtain the
430 expected value only on ARMv7 and above. 423 expected value only on ARMv7 and above.
431 424
425config NEEDS_SYSCALL_FOR_CMPXCHG
426 bool
427 default y if SMP && (CPU_32v5 || CPU_32v4 || CPU_32v3)
428 help
429 SMP on a pre-ARMv6 processor? Well OK then.
430 Forget about fast user space cmpxchg support.
431 It is just not possible.
432
diff --git a/arch/arm/mm/Makefile b/arch/arm/mm/Makefile
index ccf316c11e02..59f47d4c2dfe 100644
--- a/arch/arm/mm/Makefile
+++ b/arch/arm/mm/Makefile
@@ -31,8 +31,6 @@ obj-$(CONFIG_CPU_COPY_V6) += copypage-v6.o mmu.o
31obj-$(CONFIG_CPU_SA1100) += copypage-v4mc.o 31obj-$(CONFIG_CPU_SA1100) += copypage-v4mc.o
32obj-$(CONFIG_CPU_XSCALE) += copypage-xscale.o 32obj-$(CONFIG_CPU_XSCALE) += copypage-xscale.o
33 33
34obj-$(CONFIG_CPU_MINICACHE) += minicache.o
35
36obj-$(CONFIG_CPU_TLB_V3) += tlb-v3.o 34obj-$(CONFIG_CPU_TLB_V3) += tlb-v3.o
37obj-$(CONFIG_CPU_TLB_V4WT) += tlb-v4.o 35obj-$(CONFIG_CPU_TLB_V4WT) += tlb-v4.o
38obj-$(CONFIG_CPU_TLB_V4WB) += tlb-v4wb.o 36obj-$(CONFIG_CPU_TLB_V4WB) += tlb-v4wb.o
diff --git a/arch/arm/mm/copypage-xscale.S b/arch/arm/mm/copypage-xscale.S
deleted file mode 100644
index bb277316ef52..000000000000
--- a/arch/arm/mm/copypage-xscale.S
+++ /dev/null
@@ -1,113 +0,0 @@
1/*
2 * linux/arch/arm/lib/copypage-xscale.S
3 *
4 * Copyright (C) 2001 Russell King
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 version 2 as
8 * published by the Free Software Foundation.
9 */
10#include <linux/linkage.h>
11#include <linux/init.h>
12#include <asm/constants.h>
13
14/*
15 * General note:
16 * We don't really want write-allocate cache behaviour for these functions
17 * since that will just eat through 8K of the cache.
18 */
19
20 .text
21 .align 5
22/*
23 * XScale optimised copy_user_page
24 * r0 = destination
25 * r1 = source
26 * r2 = virtual user address of ultimate destination page
27 *
28 * The source page may have some clean entries in the cache already, but we
29 * can safely ignore them - break_cow() will flush them out of the cache
30 * if we eventually end up using our copied page.
31 *
32 * What we could do is use the mini-cache to buffer reads from the source
33 * page. We rely on the mini-cache being smaller than one page, so we'll
34 * cycle through the complete cache anyway.
35 */
36ENTRY(xscale_mc_copy_user_page)
37 stmfd sp!, {r4, r5, lr}
38 mov r5, r0
39 mov r0, r1
40 bl map_page_minicache
41 mov r1, r5
42 mov lr, #PAGE_SZ/64-1
43
44 /*
45 * Strangely enough, best performance is achieved
46 * when prefetching destination as well. (NP)
47 */
48 pld [r0, #0]
49 pld [r0, #32]
50 pld [r1, #0]
51 pld [r1, #32]
52
531: pld [r0, #64]
54 pld [r0, #96]
55 pld [r1, #64]
56 pld [r1, #96]
57
582: ldrd r2, [r0], #8
59 ldrd r4, [r0], #8
60 mov ip, r1
61 strd r2, [r1], #8
62 ldrd r2, [r0], #8
63 strd r4, [r1], #8
64 ldrd r4, [r0], #8
65 strd r2, [r1], #8
66 strd r4, [r1], #8
67 mcr p15, 0, ip, c7, c10, 1 @ clean D line
68 ldrd r2, [r0], #8
69 mcr p15, 0, ip, c7, c6, 1 @ invalidate D line
70 ldrd r4, [r0], #8
71 mov ip, r1
72 strd r2, [r1], #8
73 ldrd r2, [r0], #8
74 strd r4, [r1], #8
75 ldrd r4, [r0], #8
76 strd r2, [r1], #8
77 strd r4, [r1], #8
78 mcr p15, 0, ip, c7, c10, 1 @ clean D line
79 subs lr, lr, #1
80 mcr p15, 0, ip, c7, c6, 1 @ invalidate D line
81 bgt 1b
82 beq 2b
83
84 ldmfd sp!, {r4, r5, pc}
85
86 .align 5
87/*
88 * XScale optimised clear_user_page
89 * r0 = destination
90 * r1 = virtual user address of ultimate destination page
91 */
92ENTRY(xscale_mc_clear_user_page)
93 mov r1, #PAGE_SZ/32
94 mov r2, #0
95 mov r3, #0
961: mov ip, r0
97 strd r2, [r0], #8
98 strd r2, [r0], #8
99 strd r2, [r0], #8
100 strd r2, [r0], #8
101 mcr p15, 0, ip, c7, c10, 1 @ clean D line
102 subs r1, r1, #1
103 mcr p15, 0, ip, c7, c6, 1 @ invalidate D line
104 bne 1b
105 mov pc, lr
106
107 __INITDATA
108
109 .type xscale_mc_user_fns, #object
110ENTRY(xscale_mc_user_fns)
111 .long xscale_mc_clear_user_page
112 .long xscale_mc_copy_user_page
113 .size xscale_mc_user_fns, . - xscale_mc_user_fns
diff --git a/arch/arm/mm/copypage-xscale.c b/arch/arm/mm/copypage-xscale.c
new file mode 100644
index 000000000000..42a6ee255ce0
--- /dev/null
+++ b/arch/arm/mm/copypage-xscale.c
@@ -0,0 +1,131 @@
1/*
2 * linux/arch/arm/lib/copypage-xscale.S
3 *
4 * Copyright (C) 1995-2005 Russell King
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 version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This handles the mini data cache, as found on SA11x0 and XScale
11 * processors. When we copy a user page page, we map it in such a way
12 * that accesses to this page will not touch the main data cache, but
13 * will be cached in the mini data cache. This prevents us thrashing
14 * the main data cache on page faults.
15 */
16#include <linux/init.h>
17#include <linux/mm.h>
18
19#include <asm/page.h>
20#include <asm/pgtable.h>
21#include <asm/tlbflush.h>
22
23/*
24 * 0xffff8000 to 0xffffffff is reserved for any ARM architecture
25 * specific hacks for copying pages efficiently.
26 */
27#define COPYPAGE_MINICACHE 0xffff8000
28
29#define minicache_pgprot __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | \
30 L_PTE_CACHEABLE)
31
32#define TOP_PTE(x) pte_offset_kernel(top_pmd, x)
33
34static DEFINE_SPINLOCK(minicache_lock);
35
36/*
37 * XScale mini-dcache optimised copy_user_page
38 *
39 * We flush the destination cache lines just before we write the data into the
40 * corresponding address. Since the Dcache is read-allocate, this removes the
41 * Dcache aliasing issue. The writes will be forwarded to the write buffer,
42 * and merged as appropriate.
43 */
44static void __attribute__((naked))
45mc_copy_user_page(void *from, void *to)
46{
47 /*
48 * Strangely enough, best performance is achieved
49 * when prefetching destination as well. (NP)
50 */
51 asm volatile(
52 "stmfd sp!, {r4, r5, lr} \n\
53 mov lr, %2 \n\
54 pld [r0, #0] \n\
55 pld [r0, #32] \n\
56 pld [r1, #0] \n\
57 pld [r1, #32] \n\
581: pld [r0, #64] \n\
59 pld [r0, #96] \n\
60 pld [r1, #64] \n\
61 pld [r1, #96] \n\
622: ldrd r2, [r0], #8 \n\
63 ldrd r4, [r0], #8 \n\
64 mov ip, r1 \n\
65 strd r2, [r1], #8 \n\
66 ldrd r2, [r0], #8 \n\
67 strd r4, [r1], #8 \n\
68 ldrd r4, [r0], #8 \n\
69 strd r2, [r1], #8 \n\
70 strd r4, [r1], #8 \n\
71 mcr p15, 0, ip, c7, c10, 1 @ clean D line\n\
72 ldrd r2, [r0], #8 \n\
73 mcr p15, 0, ip, c7, c6, 1 @ invalidate D line\n\
74 ldrd r4, [r0], #8 \n\
75 mov ip, r1 \n\
76 strd r2, [r1], #8 \n\
77 ldrd r2, [r0], #8 \n\
78 strd r4, [r1], #8 \n\
79 ldrd r4, [r0], #8 \n\
80 strd r2, [r1], #8 \n\
81 strd r4, [r1], #8 \n\
82 mcr p15, 0, ip, c7, c10, 1 @ clean D line\n\
83 subs lr, lr, #1 \n\
84 mcr p15, 0, ip, c7, c6, 1 @ invalidate D line\n\
85 bgt 1b \n\
86 beq 2b \n\
87 ldmfd sp!, {r4, r5, pc} "
88 :
89 : "r" (from), "r" (to), "I" (PAGE_SIZE / 64 - 1));
90}
91
92void xscale_mc_copy_user_page(void *kto, const void *kfrom, unsigned long vaddr)
93{
94 spin_lock(&minicache_lock);
95
96 set_pte(TOP_PTE(COPYPAGE_MINICACHE), pfn_pte(__pa(kfrom) >> PAGE_SHIFT, minicache_pgprot));
97 flush_tlb_kernel_page(COPYPAGE_MINICACHE);
98
99 mc_copy_user_page((void *)COPYPAGE_MINICACHE, kto);
100
101 spin_unlock(&minicache_lock);
102}
103
104/*
105 * XScale optimised clear_user_page
106 */
107void __attribute__((naked))
108xscale_mc_clear_user_page(void *kaddr, unsigned long vaddr)
109{
110 asm volatile(
111 "mov r1, %0 \n\
112 mov r2, #0 \n\
113 mov r3, #0 \n\
1141: mov ip, r0 \n\
115 strd r2, [r0], #8 \n\
116 strd r2, [r0], #8 \n\
117 strd r2, [r0], #8 \n\
118 strd r2, [r0], #8 \n\
119 mcr p15, 0, ip, c7, c10, 1 @ clean D line\n\
120 subs r1, r1, #1 \n\
121 mcr p15, 0, ip, c7, c6, 1 @ invalidate D line\n\
122 bne 1b \n\
123 mov pc, lr"
124 :
125 : "I" (PAGE_SIZE / 32));
126}
127
128struct cpu_user_fns xscale_mc_user_fns __initdata = {
129 .cpu_clear_user_page = xscale_mc_clear_user_page,
130 .cpu_copy_user_page = xscale_mc_copy_user_page,
131};
diff --git a/arch/arm/mm/minicache.c b/arch/arm/mm/minicache.c
deleted file mode 100644
index dedf2ab01b2a..000000000000
--- a/arch/arm/mm/minicache.c
+++ /dev/null
@@ -1,73 +0,0 @@
1/*
2 * linux/arch/arm/mm/minicache.c
3 *
4 * Copyright (C) 2001 Russell King
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 version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This handles the mini data cache, as found on SA11x0 and XScale
11 * processors. When we copy a user page page, we map it in such a way
12 * that accesses to this page will not touch the main data cache, but
13 * will be cached in the mini data cache. This prevents us thrashing
14 * the main data cache on page faults.
15 */
16#include <linux/init.h>
17#include <linux/mm.h>
18
19#include <asm/page.h>
20#include <asm/pgtable.h>
21#include <asm/tlbflush.h>
22
23/*
24 * 0xffff8000 to 0xffffffff is reserved for any ARM architecture
25 * specific hacks for copying pages efficiently.
26 */
27#define minicache_address (0xffff8000)
28#define minicache_pgprot __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | \
29 L_PTE_CACHEABLE)
30
31static pte_t *minicache_pte;
32
33/*
34 * Note that this is intended to be called only from the copy_user_page
35 * asm code; anything else will require special locking to prevent the
36 * mini-cache space being re-used. (Note: probably preempt unsafe).
37 *
38 * We rely on the fact that the minicache is 2K, and we'll be pushing
39 * 4K of data through it, so we don't actually have to specifically
40 * flush the minicache when we change the mapping.
41 *
42 * Note also: assert(PAGE_OFFSET <= virt < high_memory).
43 * Unsafe: preempt, kmap.
44 */
45unsigned long map_page_minicache(unsigned long virt)
46{
47 set_pte(minicache_pte, pfn_pte(__pa(virt) >> PAGE_SHIFT, minicache_pgprot));
48 flush_tlb_kernel_page(minicache_address);
49
50 return minicache_address;
51}
52
53static int __init minicache_init(void)
54{
55 pgd_t *pgd;
56 pmd_t *pmd;
57
58 spin_lock(&init_mm.page_table_lock);
59
60 pgd = pgd_offset_k(minicache_address);
61 pmd = pmd_alloc(&init_mm, pgd, minicache_address);
62 if (!pmd)
63 BUG();
64 minicache_pte = pte_alloc_kernel(&init_mm, pmd, minicache_address);
65 if (!minicache_pte)
66 BUG();
67
68 spin_unlock(&init_mm.page_table_lock);
69
70 return 0;
71}
72
73core_initcall(minicache_init);
diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile
index 0fbcfe00dd8d..51ecd512603d 100644
--- a/arch/i386/kernel/Makefile
+++ b/arch/i386/kernel/Makefile
@@ -43,7 +43,7 @@ obj-$(CONFIG_SCx200) += scx200.o
43# Note: kbuild does not track this dependency due to usage of .incbin 43# Note: kbuild does not track this dependency due to usage of .incbin
44$(obj)/vsyscall.o: $(obj)/vsyscall-int80.so $(obj)/vsyscall-sysenter.so 44$(obj)/vsyscall.o: $(obj)/vsyscall-int80.so $(obj)/vsyscall-sysenter.so
45targets += $(foreach F,int80 sysenter,vsyscall-$F.o vsyscall-$F.so) 45targets += $(foreach F,int80 sysenter,vsyscall-$F.o vsyscall-$F.so)
46targets += vsyscall.lds 46targets += vsyscall-note.o vsyscall.lds
47 47
48# The DSO images are built using a special linker script. 48# The DSO images are built using a special linker script.
49quiet_cmd_syscall = SYSCALL $@ 49quiet_cmd_syscall = SYSCALL $@
diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c
index 45641a872550..0ff65abcd56c 100644
--- a/arch/i386/kernel/apm.c
+++ b/arch/i386/kernel/apm.c
@@ -1222,6 +1222,7 @@ static int suspend(int vetoable)
1222 1222
1223 save_processor_state(); 1223 save_processor_state();
1224 err = set_system_power_state(APM_STATE_SUSPEND); 1224 err = set_system_power_state(APM_STATE_SUSPEND);
1225 ignore_normal_resume = 1;
1225 restore_processor_state(); 1226 restore_processor_state();
1226 1227
1227 local_irq_disable(); 1228 local_irq_disable();
@@ -1229,7 +1230,6 @@ static int suspend(int vetoable)
1229 spin_lock(&i8253_lock); 1230 spin_lock(&i8253_lock);
1230 reinit_timer(); 1231 reinit_timer();
1231 set_time(); 1232 set_time();
1232 ignore_normal_resume = 1;
1233 1233
1234 spin_unlock(&i8253_lock); 1234 spin_unlock(&i8253_lock);
1235 write_sequnlock(&xtime_lock); 1235 write_sequnlock(&xtime_lock);
diff --git a/arch/ia64/kernel/fsys.S b/arch/ia64/kernel/fsys.S
index 4f3cdef75797..962b6c4e32b5 100644
--- a/arch/ia64/kernel/fsys.S
+++ b/arch/ia64/kernel/fsys.S
@@ -460,9 +460,9 @@ EX(.fail_efault, ld8 r14=[r33]) // r14 <- *set
460 ;; 460 ;;
461 461
462 st8 [r2]=r14 // update current->blocked with new mask 462 st8 [r2]=r14 // update current->blocked with new mask
463 cmpxchg4.acq r14=[r9],r18,ar.ccv // current->thread_info->flags <- r18 463 cmpxchg4.acq r8=[r9],r18,ar.ccv // current->thread_info->flags <- r18
464 ;; 464 ;;
465 cmp.ne p6,p0=r17,r14 // update failed? 465 cmp.ne p6,p0=r17,r8 // update failed?
466(p6) br.cond.spnt.few 1b // yes -> retry 466(p6) br.cond.spnt.few 1b // yes -> retry
467 467
468#ifdef CONFIG_SMP 468#ifdef CONFIG_SMP
diff --git a/arch/ia64/kernel/module.c b/arch/ia64/kernel/module.c
index febc091c2f02..f1aca7cffd12 100644
--- a/arch/ia64/kernel/module.c
+++ b/arch/ia64/kernel/module.c
@@ -825,14 +825,16 @@ apply_relocate_add (Elf64_Shdr *sechdrs, const char *strtab, unsigned int symind
825 * XXX Should have an arch-hook for running this after final section 825 * XXX Should have an arch-hook for running this after final section
826 * addresses have been selected... 826 * addresses have been selected...
827 */ 827 */
828 /* See if gp can cover the entire core module: */ 828 uint64_t gp;
829 uint64_t gp = (uint64_t) mod->module_core + MAX_LTOFF / 2; 829 if (mod->core_size > MAX_LTOFF)
830 if (mod->core_size >= MAX_LTOFF)
831 /* 830 /*
832 * This takes advantage of fact that SHF_ARCH_SMALL gets allocated 831 * This takes advantage of fact that SHF_ARCH_SMALL gets allocated
833 * at the end of the module. 832 * at the end of the module.
834 */ 833 */
835 gp = (uint64_t) mod->module_core + mod->core_size - MAX_LTOFF / 2; 834 gp = mod->core_size - MAX_LTOFF / 2;
835 else
836 gp = mod->core_size / 2;
837 gp = (uint64_t) mod->module_core + ((gp + 7) & -8);
836 mod->arch.gp = gp; 838 mod->arch.gp = gp;
837 DEBUGP("%s: placing gp at 0x%lx\n", __FUNCTION__, gp); 839 DEBUGP("%s: placing gp at 0x%lx\n", __FUNCTION__, gp);
838 } 840 }
diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c
index 08c8a5eb25ab..575a8f657b31 100644
--- a/arch/ia64/kernel/ptrace.c
+++ b/arch/ia64/kernel/ptrace.c
@@ -635,11 +635,17 @@ ia64_flush_fph (struct task_struct *task)
635{ 635{
636 struct ia64_psr *psr = ia64_psr(ia64_task_regs(task)); 636 struct ia64_psr *psr = ia64_psr(ia64_task_regs(task));
637 637
638 /*
639 * Prevent migrating this task while
640 * we're fiddling with the FPU state
641 */
642 preempt_disable();
638 if (ia64_is_local_fpu_owner(task) && psr->mfh) { 643 if (ia64_is_local_fpu_owner(task) && psr->mfh) {
639 psr->mfh = 0; 644 psr->mfh = 0;
640 task->thread.flags |= IA64_THREAD_FPH_VALID; 645 task->thread.flags |= IA64_THREAD_FPH_VALID;
641 ia64_save_fpu(&task->thread.fph[0]); 646 ia64_save_fpu(&task->thread.fph[0]);
642 } 647 }
648 preempt_enable();
643} 649}
644 650
645/* 651/*
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index b7e6b4cb374b..d14692e0920a 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -720,7 +720,8 @@ cpu_init (void)
720 ia64_set_kr(IA64_KR_PT_BASE, __pa(ia64_imva(empty_zero_page))); 720 ia64_set_kr(IA64_KR_PT_BASE, __pa(ia64_imva(empty_zero_page)));
721 721
722 /* 722 /*
723 * Initialize default control register to defer all speculative faults. The 723 * Initialize default control register to defer speculative faults except
724 * for those arising from TLB misses, which are not deferred. The
724 * kernel MUST NOT depend on a particular setting of these bits (in other words, 725 * kernel MUST NOT depend on a particular setting of these bits (in other words,
725 * the kernel must have recovery code for all speculative accesses). Turn on 726 * the kernel must have recovery code for all speculative accesses). Turn on
726 * dcr.lc as per recommendation by the architecture team. Most IA-32 apps 727 * dcr.lc as per recommendation by the architecture team. Most IA-32 apps
diff --git a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c
index e82ad78081b3..1861173bd4f6 100644
--- a/arch/ia64/kernel/traps.c
+++ b/arch/ia64/kernel/traps.c
@@ -111,6 +111,24 @@ ia64_bad_break (unsigned long break_num, struct pt_regs *regs)
111 siginfo_t siginfo; 111 siginfo_t siginfo;
112 int sig, code; 112 int sig, code;
113 113
114 /* break.b always sets cr.iim to 0, which causes problems for
115 * debuggers. Get the real break number from the original instruction,
116 * but only for kernel code. User space break.b is left alone, to
117 * preserve the existing behaviour. All break codings have the same
118 * format, so there is no need to check the slot type.
119 */
120 if (break_num == 0 && !user_mode(regs)) {
121 struct ia64_psr *ipsr = ia64_psr(regs);
122 unsigned long *bundle = (unsigned long *)regs->cr_iip;
123 unsigned long slot;
124 switch (ipsr->ri) {
125 case 0: slot = (bundle[0] >> 5); break;
126 case 1: slot = (bundle[0] >> 46) | (bundle[1] << 18); break;
127 default: slot = (bundle[1] >> 23); break;
128 }
129 break_num = ((slot >> 36 & 1) << 20) | (slot >> 6 & 0xfffff);
130 }
131
114 /* SIGILL, SIGFPE, SIGSEGV, and SIGBUS want these field initialized: */ 132 /* SIGILL, SIGFPE, SIGSEGV, and SIGBUS want these field initialized: */
115 siginfo.si_addr = (void __user *) (regs->cr_iip + ia64_psr(regs)->ri); 133 siginfo.si_addr = (void __user *) (regs->cr_iip + ia64_psr(regs)->ri);
116 siginfo.si_imm = break_num; 134 siginfo.si_imm = break_num;
@@ -202,13 +220,21 @@ disabled_fph_fault (struct pt_regs *regs)
202 220
203 /* first, grant user-level access to fph partition: */ 221 /* first, grant user-level access to fph partition: */
204 psr->dfh = 0; 222 psr->dfh = 0;
223
224 /*
225 * Make sure that no other task gets in on this processor
226 * while we're claiming the FPU
227 */
228 preempt_disable();
205#ifndef CONFIG_SMP 229#ifndef CONFIG_SMP
206 { 230 {
207 struct task_struct *fpu_owner 231 struct task_struct *fpu_owner
208 = (struct task_struct *)ia64_get_kr(IA64_KR_FPU_OWNER); 232 = (struct task_struct *)ia64_get_kr(IA64_KR_FPU_OWNER);
209 233
210 if (ia64_is_local_fpu_owner(current)) 234 if (ia64_is_local_fpu_owner(current)) {
235 preempt_enable_no_resched();
211 return; 236 return;
237 }
212 238
213 if (fpu_owner) 239 if (fpu_owner)
214 ia64_flush_fph(fpu_owner); 240 ia64_flush_fph(fpu_owner);
@@ -226,6 +252,7 @@ disabled_fph_fault (struct pt_regs *regs)
226 */ 252 */
227 psr->mfh = 1; 253 psr->mfh = 1;
228 } 254 }
255 preempt_enable_no_resched();
229} 256}
230 257
231static inline int 258static inline int
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
index 547785e3cba2..4eb2f52b87a1 100644
--- a/arch/ia64/mm/init.c
+++ b/arch/ia64/mm/init.c
@@ -305,8 +305,9 @@ setup_gate (void)
305 struct page *page; 305 struct page *page;
306 306
307 /* 307 /*
308 * Map the gate page twice: once read-only to export the ELF headers etc. and once 308 * Map the gate page twice: once read-only to export the ELF
309 * execute-only page to enable privilege-promotion via "epc": 309 * headers etc. and once execute-only page to enable
310 * privilege-promotion via "epc":
310 */ 311 */
311 page = virt_to_page(ia64_imva(__start_gate_section)); 312 page = virt_to_page(ia64_imva(__start_gate_section));
312 put_kernel_page(page, GATE_ADDR, PAGE_READONLY); 313 put_kernel_page(page, GATE_ADDR, PAGE_READONLY);
@@ -315,6 +316,20 @@ setup_gate (void)
315 put_kernel_page(page, GATE_ADDR + PAGE_SIZE, PAGE_GATE); 316 put_kernel_page(page, GATE_ADDR + PAGE_SIZE, PAGE_GATE);
316#else 317#else
317 put_kernel_page(page, GATE_ADDR + PERCPU_PAGE_SIZE, PAGE_GATE); 318 put_kernel_page(page, GATE_ADDR + PERCPU_PAGE_SIZE, PAGE_GATE);
319 /* Fill in the holes (if any) with read-only zero pages: */
320 {
321 unsigned long addr;
322
323 for (addr = GATE_ADDR + PAGE_SIZE;
324 addr < GATE_ADDR + PERCPU_PAGE_SIZE;
325 addr += PAGE_SIZE)
326 {
327 put_kernel_page(ZERO_PAGE(0), addr,
328 PAGE_READONLY);
329 put_kernel_page(ZERO_PAGE(0), addr + PERCPU_PAGE_SIZE,
330 PAGE_READONLY);
331 }
332 }
318#endif 333#endif
319 ia64_patch_gate(); 334 ia64_patch_gate();
320} 335}
diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c
index e64cb8175f7a..44bfc7f318cb 100644
--- a/arch/ia64/sn/kernel/setup.c
+++ b/arch/ia64/sn/kernel/setup.c
@@ -222,7 +222,7 @@ void __init early_sn_setup(void)
222 222
223extern int platform_intr_list[]; 223extern int platform_intr_list[];
224extern nasid_t master_nasid; 224extern nasid_t master_nasid;
225static int shub_1_1_found __initdata; 225static int __initdata shub_1_1_found = 0;
226 226
227/* 227/*
228 * sn_check_for_wars 228 * sn_check_for_wars
@@ -251,7 +251,7 @@ static void __init sn_check_for_wars(void)
251 } else { 251 } else {
252 for_each_online_node(cnode) { 252 for_each_online_node(cnode) {
253 if (is_shub_1_1(cnodeid_to_nasid(cnode))) 253 if (is_shub_1_1(cnodeid_to_nasid(cnode)))
254 sn_hub_info->shub_1_1_found = 1; 254 shub_1_1_found = 1;
255 } 255 }
256 } 256 }
257} 257}
diff --git a/arch/m68k/configs/amiga_defconfig b/arch/m68k/configs/amiga_defconfig
index 7dbf997ff205..5649fbae430e 100644
--- a/arch/m68k/configs/amiga_defconfig
+++ b/arch/m68k/configs/amiga_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-rc2-m68k 3# Linux kernel version: 2.6.12-rc6-m68k
4# Tue Apr 5 14:05:59 2005 4# Tue Jun 7 20:34:23 2005
5# 5#
6CONFIG_M68K=y 6CONFIG_M68K=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -35,6 +35,8 @@ CONFIG_KOBJECT_UEVENT=y
35CONFIG_KALLSYMS=y 35CONFIG_KALLSYMS=y
36# CONFIG_KALLSYMS_ALL is not set 36# CONFIG_KALLSYMS_ALL is not set
37# CONFIG_KALLSYMS_EXTRA_PASS is not set 37# CONFIG_KALLSYMS_EXTRA_PASS is not set
38CONFIG_PRINTK=y
39CONFIG_BUG=y
38CONFIG_BASE_FULL=y 40CONFIG_BASE_FULL=y
39CONFIG_FUTEX=y 41CONFIG_FUTEX=y
40CONFIG_EPOLL=y 42CONFIG_EPOLL=y
@@ -135,7 +137,6 @@ CONFIG_PARPORT_1284=y
135# 137#
136CONFIG_AMIGA_FLOPPY=y 138CONFIG_AMIGA_FLOPPY=y
137CONFIG_AMIGA_Z2RAM=y 139CONFIG_AMIGA_Z2RAM=y
138# CONFIG_BLK_DEV_XD is not set
139# CONFIG_PARIDE is not set 140# CONFIG_PARIDE is not set
140# CONFIG_BLK_DEV_COW_COMMON is not set 141# CONFIG_BLK_DEV_COW_COMMON is not set
141CONFIG_BLK_DEV_LOOP=y 142CONFIG_BLK_DEV_LOOP=y
@@ -223,17 +224,12 @@ CONFIG_SCSI_CONSTANTS=y
223# 224#
224# SCSI low-level drivers 225# SCSI low-level drivers
225# 226#
226# CONFIG_SCSI_7000FASST is not set
227# CONFIG_SCSI_AHA152X is not set 227# CONFIG_SCSI_AHA152X is not set
228# CONFIG_SCSI_AHA1542 is not set
229# CONFIG_SCSI_AIC7XXX_OLD is not set 228# CONFIG_SCSI_AIC7XXX_OLD is not set
230# CONFIG_SCSI_IN2000 is not set 229# CONFIG_SCSI_IN2000 is not set
231# CONFIG_SCSI_SATA is not set 230# CONFIG_SCSI_SATA is not set
232# CONFIG_SCSI_BUSLOGIC is not set
233# CONFIG_SCSI_DTC3280 is not set 231# CONFIG_SCSI_DTC3280 is not set
234# CONFIG_SCSI_EATA is not set
235# CONFIG_SCSI_FUTURE_DOMAIN is not set 232# CONFIG_SCSI_FUTURE_DOMAIN is not set
236# CONFIG_SCSI_GDTH is not set
237# CONFIG_SCSI_GENERIC_NCR5380 is not set 233# CONFIG_SCSI_GENERIC_NCR5380 is not set
238# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set 234# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
239# CONFIG_SCSI_PPA is not set 235# CONFIG_SCSI_PPA is not set
@@ -244,7 +240,6 @@ CONFIG_SCSI_CONSTANTS=y
244# CONFIG_SCSI_QLOGIC_FAS is not set 240# CONFIG_SCSI_QLOGIC_FAS is not set
245# CONFIG_SCSI_SYM53C416 is not set 241# CONFIG_SCSI_SYM53C416 is not set
246# CONFIG_SCSI_T128 is not set 242# CONFIG_SCSI_T128 is not set
247# CONFIG_SCSI_U14_34F is not set
248# CONFIG_SCSI_DEBUG is not set 243# CONFIG_SCSI_DEBUG is not set
249CONFIG_A3000_SCSI=y 244CONFIG_A3000_SCSI=y
250CONFIG_A2091_SCSI=y 245CONFIG_A2091_SCSI=y
@@ -492,7 +487,6 @@ CONFIG_HYDRA=m
492CONFIG_ZORRO8390=m 487CONFIG_ZORRO8390=m
493CONFIG_APNE=m 488CONFIG_APNE=m
494# CONFIG_NET_VENDOR_3COM is not set 489# CONFIG_NET_VENDOR_3COM is not set
495# CONFIG_LANCE is not set
496# CONFIG_NET_VENDOR_SMC is not set 490# CONFIG_NET_VENDOR_SMC is not set
497# CONFIG_NET_VENDOR_RACAL is not set 491# CONFIG_NET_VENDOR_RACAL is not set
498# CONFIG_AT1700 is not set 492# CONFIG_AT1700 is not set
@@ -620,7 +614,6 @@ CONFIG_SERIO_SERPORT=m
620# CONFIG_SERIO_PARKBD is not set 614# CONFIG_SERIO_PARKBD is not set
621# CONFIG_SERIO_RAW is not set 615# CONFIG_SERIO_RAW is not set
622# CONFIG_GAMEPORT is not set 616# CONFIG_GAMEPORT is not set
623CONFIG_SOUND_GAMEPORT=y
624 617
625# 618#
626# Character devices 619# Character devices
diff --git a/arch/m68k/configs/apollo_defconfig b/arch/m68k/configs/apollo_defconfig
index 505a2968e604..63024b0b7ac3 100644
--- a/arch/m68k/configs/apollo_defconfig
+++ b/arch/m68k/configs/apollo_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-rc2-m68k 3# Linux kernel version: 2.6.12-rc6-m68k
4# Tue Apr 5 14:06:00 2005 4# Tue Jun 7 20:34:27 2005
5# 5#
6CONFIG_M68K=y 6CONFIG_M68K=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -35,6 +35,8 @@ CONFIG_KOBJECT_UEVENT=y
35CONFIG_KALLSYMS=y 35CONFIG_KALLSYMS=y
36# CONFIG_KALLSYMS_ALL is not set 36# CONFIG_KALLSYMS_ALL is not set
37# CONFIG_KALLSYMS_EXTRA_PASS is not set 37# CONFIG_KALLSYMS_EXTRA_PASS is not set
38CONFIG_PRINTK=y
39CONFIG_BUG=y
38CONFIG_BASE_FULL=y 40CONFIG_BASE_FULL=y
39CONFIG_FUTEX=y 41CONFIG_FUTEX=y
40CONFIG_EPOLL=y 42CONFIG_EPOLL=y
@@ -497,7 +499,6 @@ CONFIG_SERIO_SERPORT=m
497CONFIG_SERIO_LIBPS2=m 499CONFIG_SERIO_LIBPS2=m
498# CONFIG_SERIO_RAW is not set 500# CONFIG_SERIO_RAW is not set
499# CONFIG_GAMEPORT is not set 501# CONFIG_GAMEPORT is not set
500CONFIG_SOUND_GAMEPORT=y
501 502
502# 503#
503# Character devices 504# Character devices
diff --git a/arch/m68k/configs/atari_defconfig b/arch/m68k/configs/atari_defconfig
index 617aa73c3250..6433da2d2ce2 100644
--- a/arch/m68k/configs/atari_defconfig
+++ b/arch/m68k/configs/atari_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-rc2-m68k 3# Linux kernel version: 2.6.12-rc6-m68k
4# Tue Apr 5 14:06:18 2005 4# Tue Jun 7 20:34:32 2005
5# 5#
6CONFIG_M68K=y 6CONFIG_M68K=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -35,6 +35,8 @@ CONFIG_KOBJECT_UEVENT=y
35CONFIG_KALLSYMS=y 35CONFIG_KALLSYMS=y
36# CONFIG_KALLSYMS_ALL is not set 36# CONFIG_KALLSYMS_ALL is not set
37# CONFIG_KALLSYMS_EXTRA_PASS is not set 37# CONFIG_KALLSYMS_EXTRA_PASS is not set
38CONFIG_PRINTK=y
39CONFIG_BUG=y
38CONFIG_BASE_FULL=y 40CONFIG_BASE_FULL=y
39CONFIG_FUTEX=y 41CONFIG_FUTEX=y
40CONFIG_EPOLL=y 42CONFIG_EPOLL=y
@@ -531,7 +533,6 @@ CONFIG_SERIO_SERPORT=y
531CONFIG_SERIO_LIBPS2=y 533CONFIG_SERIO_LIBPS2=y
532# CONFIG_SERIO_RAW is not set 534# CONFIG_SERIO_RAW is not set
533# CONFIG_GAMEPORT is not set 535# CONFIG_GAMEPORT is not set
534CONFIG_SOUND_GAMEPORT=y
535 536
536# 537#
537# Character devices 538# Character devices
diff --git a/arch/m68k/configs/bvme6000_defconfig b/arch/m68k/configs/bvme6000_defconfig
index b501db51d9ec..da2a23a21463 100644
--- a/arch/m68k/configs/bvme6000_defconfig
+++ b/arch/m68k/configs/bvme6000_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-rc2-m68k 3# Linux kernel version: 2.6.12-rc6-m68k
4# Tue Apr 5 14:06:19 2005 4# Tue Jun 7 20:34:37 2005
5# 5#
6CONFIG_M68K=y 6CONFIG_M68K=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -35,6 +35,8 @@ CONFIG_KOBJECT_UEVENT=y
35CONFIG_KALLSYMS=y 35CONFIG_KALLSYMS=y
36# CONFIG_KALLSYMS_ALL is not set 36# CONFIG_KALLSYMS_ALL is not set
37# CONFIG_KALLSYMS_EXTRA_PASS is not set 37# CONFIG_KALLSYMS_EXTRA_PASS is not set
38CONFIG_PRINTK=y
39CONFIG_BUG=y
38CONFIG_BASE_FULL=y 40CONFIG_BASE_FULL=y
39CONFIG_FUTEX=y 41CONFIG_FUTEX=y
40CONFIG_EPOLL=y 42CONFIG_EPOLL=y
@@ -496,7 +498,6 @@ CONFIG_SERIO_SERPORT=m
496CONFIG_SERIO_LIBPS2=m 498CONFIG_SERIO_LIBPS2=m
497# CONFIG_SERIO_RAW is not set 499# CONFIG_SERIO_RAW is not set
498# CONFIG_GAMEPORT is not set 500# CONFIG_GAMEPORT is not set
499CONFIG_SOUND_GAMEPORT=y
500 501
501# 502#
502# Character devices 503# Character devices
diff --git a/arch/m68k/configs/hp300_defconfig b/arch/m68k/configs/hp300_defconfig
index 2bf6cef4f2b2..51251883adf8 100644
--- a/arch/m68k/configs/hp300_defconfig
+++ b/arch/m68k/configs/hp300_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-rc2-m68k 3# Linux kernel version: 2.6.12-rc6-m68k
4# Tue Apr 5 14:06:21 2005 4# Tue Jun 7 20:34:41 2005
5# 5#
6CONFIG_M68K=y 6CONFIG_M68K=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -35,6 +35,8 @@ CONFIG_KOBJECT_UEVENT=y
35CONFIG_KALLSYMS=y 35CONFIG_KALLSYMS=y
36# CONFIG_KALLSYMS_ALL is not set 36# CONFIG_KALLSYMS_ALL is not set
37# CONFIG_KALLSYMS_EXTRA_PASS is not set 37# CONFIG_KALLSYMS_EXTRA_PASS is not set
38CONFIG_PRINTK=y
39CONFIG_BUG=y
38CONFIG_BASE_FULL=y 40CONFIG_BASE_FULL=y
39CONFIG_FUTEX=y 41CONFIG_FUTEX=y
40CONFIG_EPOLL=y 42CONFIG_EPOLL=y
@@ -498,7 +500,6 @@ CONFIG_SERIO_SERPORT=m
498CONFIG_SERIO_LIBPS2=m 500CONFIG_SERIO_LIBPS2=m
499# CONFIG_SERIO_RAW is not set 501# CONFIG_SERIO_RAW is not set
500# CONFIG_GAMEPORT is not set 502# CONFIG_GAMEPORT is not set
501CONFIG_SOUND_GAMEPORT=y
502 503
503# 504#
504# Character devices 505# Character devices
diff --git a/arch/m68k/configs/mac_defconfig b/arch/m68k/configs/mac_defconfig
index 7074f856820c..15b80abfe94a 100644
--- a/arch/m68k/configs/mac_defconfig
+++ b/arch/m68k/configs/mac_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-rc2-m68k 3# Linux kernel version: 2.6.12-rc6-m68k
4# Tue Apr 5 14:06:24 2005 4# Tue Jun 7 20:34:45 2005
5# 5#
6CONFIG_M68K=y 6CONFIG_M68K=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -35,6 +35,8 @@ CONFIG_KOBJECT_UEVENT=y
35CONFIG_KALLSYMS=y 35CONFIG_KALLSYMS=y
36# CONFIG_KALLSYMS_ALL is not set 36# CONFIG_KALLSYMS_ALL is not set
37# CONFIG_KALLSYMS_EXTRA_PASS is not set 37# CONFIG_KALLSYMS_EXTRA_PASS is not set
38CONFIG_PRINTK=y
39CONFIG_BUG=y
38CONFIG_BASE_FULL=y 40CONFIG_BASE_FULL=y
39CONFIG_FUTEX=y 41CONFIG_FUTEX=y
40CONFIG_EPOLL=y 42CONFIG_EPOLL=y
@@ -540,7 +542,6 @@ CONFIG_SERIO_SERPORT=m
540CONFIG_SERIO_LIBPS2=m 542CONFIG_SERIO_LIBPS2=m
541# CONFIG_SERIO_RAW is not set 543# CONFIG_SERIO_RAW is not set
542# CONFIG_GAMEPORT is not set 544# CONFIG_GAMEPORT is not set
543CONFIG_SOUND_GAMEPORT=y
544 545
545# 546#
546# Character devices 547# Character devices
diff --git a/arch/m68k/configs/mvme147_defconfig b/arch/m68k/configs/mvme147_defconfig
index 61f09bc4846a..f0d5534f6830 100644
--- a/arch/m68k/configs/mvme147_defconfig
+++ b/arch/m68k/configs/mvme147_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-rc2-m68k 3# Linux kernel version: 2.6.12-rc6-m68k
4# Tue Apr 5 14:06:28 2005 4# Tue Jun 7 20:34:50 2005
5# 5#
6CONFIG_M68K=y 6CONFIG_M68K=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -35,6 +35,8 @@ CONFIG_KOBJECT_UEVENT=y
35CONFIG_KALLSYMS=y 35CONFIG_KALLSYMS=y
36# CONFIG_KALLSYMS_ALL is not set 36# CONFIG_KALLSYMS_ALL is not set
37# CONFIG_KALLSYMS_EXTRA_PASS is not set 37# CONFIG_KALLSYMS_EXTRA_PASS is not set
38CONFIG_PRINTK=y
39CONFIG_BUG=y
38CONFIG_BASE_FULL=y 40CONFIG_BASE_FULL=y
39CONFIG_FUTEX=y 41CONFIG_FUTEX=y
40CONFIG_EPOLL=y 42CONFIG_EPOLL=y
@@ -498,7 +500,6 @@ CONFIG_SERIO_SERPORT=m
498CONFIG_SERIO_LIBPS2=m 500CONFIG_SERIO_LIBPS2=m
499# CONFIG_SERIO_RAW is not set 501# CONFIG_SERIO_RAW is not set
500# CONFIG_GAMEPORT is not set 502# CONFIG_GAMEPORT is not set
501CONFIG_SOUND_GAMEPORT=y
502 503
503# 504#
504# Character devices 505# Character devices
diff --git a/arch/m68k/configs/mvme16x_defconfig b/arch/m68k/configs/mvme16x_defconfig
index 69c01004ec41..1d5c46ff3c81 100644
--- a/arch/m68k/configs/mvme16x_defconfig
+++ b/arch/m68k/configs/mvme16x_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-rc2-m68k 3# Linux kernel version: 2.6.12-rc6-m68k
4# Tue Apr 5 14:06:31 2005 4# Tue Jun 7 20:34:53 2005
5# 5#
6CONFIG_M68K=y 6CONFIG_M68K=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -35,6 +35,8 @@ CONFIG_KOBJECT_UEVENT=y
35CONFIG_KALLSYMS=y 35CONFIG_KALLSYMS=y
36# CONFIG_KALLSYMS_ALL is not set 36# CONFIG_KALLSYMS_ALL is not set
37# CONFIG_KALLSYMS_EXTRA_PASS is not set 37# CONFIG_KALLSYMS_EXTRA_PASS is not set
38CONFIG_PRINTK=y
39CONFIG_BUG=y
38CONFIG_BASE_FULL=y 40CONFIG_BASE_FULL=y
39CONFIG_FUTEX=y 41CONFIG_FUTEX=y
40CONFIG_EPOLL=y 42CONFIG_EPOLL=y
@@ -497,7 +499,6 @@ CONFIG_SERIO_SERPORT=m
497CONFIG_SERIO_LIBPS2=m 499CONFIG_SERIO_LIBPS2=m
498# CONFIG_SERIO_RAW is not set 500# CONFIG_SERIO_RAW is not set
499# CONFIG_GAMEPORT is not set 501# CONFIG_GAMEPORT is not set
500CONFIG_SOUND_GAMEPORT=y
501 502
502# 503#
503# Character devices 504# Character devices
diff --git a/arch/m68k/configs/q40_defconfig b/arch/m68k/configs/q40_defconfig
index 550ec26006c1..856238634d42 100644
--- a/arch/m68k/configs/q40_defconfig
+++ b/arch/m68k/configs/q40_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-rc2-m68k 3# Linux kernel version: 2.6.12-rc6-m68k
4# Tue Apr 5 14:06:34 2005 4# Tue Jun 7 20:34:58 2005
5# 5#
6CONFIG_M68K=y 6CONFIG_M68K=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -35,6 +35,8 @@ CONFIG_KOBJECT_UEVENT=y
35CONFIG_KALLSYMS=y 35CONFIG_KALLSYMS=y
36# CONFIG_KALLSYMS_ALL is not set 36# CONFIG_KALLSYMS_ALL is not set
37# CONFIG_KALLSYMS_EXTRA_PASS is not set 37# CONFIG_KALLSYMS_EXTRA_PASS is not set
38CONFIG_PRINTK=y
39CONFIG_BUG=y
38CONFIG_BASE_FULL=y 40CONFIG_BASE_FULL=y
39CONFIG_FUTEX=y 41CONFIG_FUTEX=y
40CONFIG_EPOLL=y 42CONFIG_EPOLL=y
@@ -125,7 +127,6 @@ CONFIG_FW_LOADER=m
125# Block devices 127# Block devices
126# 128#
127# CONFIG_BLK_DEV_FD is not set 129# CONFIG_BLK_DEV_FD is not set
128# CONFIG_BLK_DEV_XD is not set
129# CONFIG_BLK_DEV_COW_COMMON is not set 130# CONFIG_BLK_DEV_COW_COMMON is not set
130CONFIG_BLK_DEV_LOOP=y 131CONFIG_BLK_DEV_LOOP=y
131CONFIG_BLK_DEV_CRYPTOLOOP=m 132CONFIG_BLK_DEV_CRYPTOLOOP=m
@@ -210,17 +211,12 @@ CONFIG_SCSI_CONSTANTS=y
210# 211#
211# SCSI low-level drivers 212# SCSI low-level drivers
212# 213#
213# CONFIG_SCSI_7000FASST is not set
214# CONFIG_SCSI_AHA152X is not set 214# CONFIG_SCSI_AHA152X is not set
215# CONFIG_SCSI_AHA1542 is not set
216# CONFIG_SCSI_AIC7XXX_OLD is not set 215# CONFIG_SCSI_AIC7XXX_OLD is not set
217# CONFIG_SCSI_IN2000 is not set 216# CONFIG_SCSI_IN2000 is not set
218# CONFIG_SCSI_SATA is not set 217# CONFIG_SCSI_SATA is not set
219# CONFIG_SCSI_BUSLOGIC is not set
220# CONFIG_SCSI_DTC3280 is not set 218# CONFIG_SCSI_DTC3280 is not set
221# CONFIG_SCSI_EATA is not set
222# CONFIG_SCSI_FUTURE_DOMAIN is not set 219# CONFIG_SCSI_FUTURE_DOMAIN is not set
223# CONFIG_SCSI_GDTH is not set
224# CONFIG_SCSI_GENERIC_NCR5380 is not set 220# CONFIG_SCSI_GENERIC_NCR5380 is not set
225# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set 221# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
226# CONFIG_SCSI_NCR53C406A is not set 222# CONFIG_SCSI_NCR53C406A is not set
@@ -229,7 +225,6 @@ CONFIG_SCSI_CONSTANTS=y
229# CONFIG_SCSI_QLOGIC_FAS is not set 225# CONFIG_SCSI_QLOGIC_FAS is not set
230# CONFIG_SCSI_SYM53C416 is not set 226# CONFIG_SCSI_SYM53C416 is not set
231# CONFIG_SCSI_T128 is not set 227# CONFIG_SCSI_T128 is not set
232# CONFIG_SCSI_U14_34F is not set
233# CONFIG_SCSI_DEBUG is not set 228# CONFIG_SCSI_DEBUG is not set
234 229
235# 230#
@@ -466,7 +461,6 @@ CONFIG_EQUALIZER=m
466CONFIG_NET_ETHERNET=y 461CONFIG_NET_ETHERNET=y
467CONFIG_MII=m 462CONFIG_MII=m
468# CONFIG_NET_VENDOR_3COM is not set 463# CONFIG_NET_VENDOR_3COM is not set
469# CONFIG_LANCE is not set
470# CONFIG_NET_VENDOR_SMC is not set 464# CONFIG_NET_VENDOR_SMC is not set
471# CONFIG_NET_VENDOR_RACAL is not set 465# CONFIG_NET_VENDOR_RACAL is not set
472# CONFIG_AT1700 is not set 466# CONFIG_AT1700 is not set
@@ -570,7 +564,6 @@ CONFIG_SERIO_Q40KBD=m
570CONFIG_SERIO_LIBPS2=m 564CONFIG_SERIO_LIBPS2=m
571# CONFIG_SERIO_RAW is not set 565# CONFIG_SERIO_RAW is not set
572# CONFIG_GAMEPORT is not set 566# CONFIG_GAMEPORT is not set
573CONFIG_SOUND_GAMEPORT=y
574 567
575# 568#
576# Character devices 569# Character devices
diff --git a/arch/m68k/configs/sun3_defconfig b/arch/m68k/configs/sun3_defconfig
index 5b5a619645aa..af903b5c5708 100644
--- a/arch/m68k/configs/sun3_defconfig
+++ b/arch/m68k/configs/sun3_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-rc2-m68k 3# Linux kernel version: 2.6.12-rc6-m68k
4# Tue Apr 5 14:06:37 2005 4# Tue Jun 7 20:35:02 2005
5# 5#
6CONFIG_M68K=y 6CONFIG_M68K=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -35,6 +35,8 @@ CONFIG_KOBJECT_UEVENT=y
35CONFIG_KALLSYMS=y 35CONFIG_KALLSYMS=y
36# CONFIG_KALLSYMS_ALL is not set 36# CONFIG_KALLSYMS_ALL is not set
37# CONFIG_KALLSYMS_EXTRA_PASS is not set 37# CONFIG_KALLSYMS_EXTRA_PASS is not set
38CONFIG_PRINTK=y
39CONFIG_BUG=y
38CONFIG_BASE_FULL=y 40CONFIG_BASE_FULL=y
39CONFIG_FUTEX=y 41CONFIG_FUTEX=y
40CONFIG_EPOLL=y 42CONFIG_EPOLL=y
@@ -171,7 +173,6 @@ CONFIG_SCSI_CONSTANTS=y
171# 173#
172# CONFIG_SCSI_SATA is not set 174# CONFIG_SCSI_SATA is not set
173# CONFIG_SCSI_DEBUG is not set 175# CONFIG_SCSI_DEBUG is not set
174CONFIG_SUN3_SCSI=y
175 176
176# 177#
177# Multi-device support (RAID and LVM) 178# Multi-device support (RAID and LVM)
@@ -487,7 +488,6 @@ CONFIG_SERIO_SERPORT=m
487CONFIG_SERIO_LIBPS2=m 488CONFIG_SERIO_LIBPS2=m
488# CONFIG_SERIO_RAW is not set 489# CONFIG_SERIO_RAW is not set
489# CONFIG_GAMEPORT is not set 490# CONFIG_GAMEPORT is not set
490CONFIG_SOUND_GAMEPORT=y
491 491
492# 492#
493# Character devices 493# Character devices
diff --git a/arch/m68k/configs/sun3x_defconfig b/arch/m68k/configs/sun3x_defconfig
index 704e42344cba..997143b7928a 100644
--- a/arch/m68k/configs/sun3x_defconfig
+++ b/arch/m68k/configs/sun3x_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-rc2-m68k 3# Linux kernel version: 2.6.12-rc6-m68k
4# Tue Apr 5 14:06:40 2005 4# Tue Jun 7 20:35:06 2005
5# 5#
6CONFIG_M68K=y 6CONFIG_M68K=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -35,6 +35,8 @@ CONFIG_KOBJECT_UEVENT=y
35CONFIG_KALLSYMS=y 35CONFIG_KALLSYMS=y
36# CONFIG_KALLSYMS_ALL is not set 36# CONFIG_KALLSYMS_ALL is not set
37# CONFIG_KALLSYMS_EXTRA_PASS is not set 37# CONFIG_KALLSYMS_EXTRA_PASS is not set
38CONFIG_PRINTK=y
39CONFIG_BUG=y
38CONFIG_BASE_FULL=y 40CONFIG_BASE_FULL=y
39CONFIG_FUTEX=y 41CONFIG_FUTEX=y
40CONFIG_EPOLL=y 42CONFIG_EPOLL=y
@@ -497,7 +499,6 @@ CONFIG_SERIO_SERPORT=m
497CONFIG_SERIO_LIBPS2=m 499CONFIG_SERIO_LIBPS2=m
498# CONFIG_SERIO_RAW is not set 500# CONFIG_SERIO_RAW is not set
499# CONFIG_GAMEPORT is not set 501# CONFIG_GAMEPORT is not set
500CONFIG_SOUND_GAMEPORT=y
501 502
502# 503#
503# Character devices 504# Character devices
diff --git a/arch/m68k/defconfig b/arch/m68k/defconfig
index 5b2296ecba82..7d935e48a9a8 100644
--- a/arch/m68k/defconfig
+++ b/arch/m68k/defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-rc2-m68k 3# Linux kernel version: 2.6.12-rc6-m68k
4# Tue Apr 5 14:05:31 2005 4# Tue Jun 7 20:34:17 2005
5# 5#
6CONFIG_M68K=y 6CONFIG_M68K=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -33,6 +33,8 @@ CONFIG_KOBJECT_UEVENT=y
33# CONFIG_EMBEDDED is not set 33# CONFIG_EMBEDDED is not set
34CONFIG_KALLSYMS=y 34CONFIG_KALLSYMS=y
35# CONFIG_KALLSYMS_EXTRA_PASS is not set 35# CONFIG_KALLSYMS_EXTRA_PASS is not set
36CONFIG_PRINTK=y
37CONFIG_BUG=y
36CONFIG_BASE_FULL=y 38CONFIG_BASE_FULL=y
37CONFIG_FUTEX=y 39CONFIG_FUTEX=y
38CONFIG_EPOLL=y 40CONFIG_EPOLL=y
@@ -355,7 +357,6 @@ CONFIG_SERIO_SERPORT=y
355CONFIG_SERIO_LIBPS2=y 357CONFIG_SERIO_LIBPS2=y
356# CONFIG_SERIO_RAW is not set 358# CONFIG_SERIO_RAW is not set
357# CONFIG_GAMEPORT is not set 359# CONFIG_GAMEPORT is not set
358CONFIG_SOUND_GAMEPORT=y
359 360
360# 361#
361# Character devices 362# Character devices
diff --git a/arch/ppc/kernel/cputable.c b/arch/ppc/kernel/cputable.c
index 8aa5e8c69009..d44b7dc5390a 100644
--- a/arch/ppc/kernel/cputable.c
+++ b/arch/ppc/kernel/cputable.c
@@ -838,6 +838,17 @@ struct cpu_spec cpu_specs[] = {
838 .icache_bsize = 32, 838 .icache_bsize = 32,
839 .dcache_bsize = 32, 839 .dcache_bsize = 32,
840 }, 840 },
841 { /* 405EP */
842 .pvr_mask = 0xffff0000,
843 .pvr_value = 0x51210000,
844 .cpu_name = "405EP",
845 .cpu_features = CPU_FTR_SPLIT_ID_CACHE |
846 CPU_FTR_USE_TB,
847 .cpu_user_features = PPC_FEATURE_32 |
848 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
849 .icache_bsize = 32,
850 .dcache_bsize = 32,
851 },
841 852
842#endif /* CONFIG_40x */ 853#endif /* CONFIG_40x */
843#ifdef CONFIG_44x 854#ifdef CONFIG_44x
diff --git a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S
index e4f1615ec13f..7329ef177a18 100644
--- a/arch/ppc/kernel/misc.S
+++ b/arch/ppc/kernel/misc.S
@@ -619,7 +619,7 @@ _GLOBAL(flush_instruction_cache)
619_GLOBAL(flush_icache_range) 619_GLOBAL(flush_icache_range)
620BEGIN_FTR_SECTION 620BEGIN_FTR_SECTION
621 blr /* for 601, do nothing */ 621 blr /* for 601, do nothing */
622END_FTR_SECTION_IFSET(PPC_FEATURE_UNIFIED_CACHE) 622END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE)
623 li r5,L1_CACHE_LINE_SIZE-1 623 li r5,L1_CACHE_LINE_SIZE-1
624 andc r3,r3,r5 624 andc r3,r3,r5
625 subf r4,r3,r4 625 subf r4,r3,r4
@@ -736,7 +736,7 @@ _GLOBAL(flush_dcache_all)
736_GLOBAL(__flush_dcache_icache) 736_GLOBAL(__flush_dcache_icache)
737BEGIN_FTR_SECTION 737BEGIN_FTR_SECTION
738 blr /* for 601, do nothing */ 738 blr /* for 601, do nothing */
739END_FTR_SECTION_IFSET(PPC_FEATURE_UNIFIED_CACHE) 739END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE)
740 rlwinm r3,r3,0,0,19 /* Get page base address */ 740 rlwinm r3,r3,0,0,19 /* Get page base address */
741 li r4,4096/L1_CACHE_LINE_SIZE /* Number of lines in a page */ 741 li r4,4096/L1_CACHE_LINE_SIZE /* Number of lines in a page */
742 mtctr r4 742 mtctr r4
@@ -764,7 +764,7 @@ END_FTR_SECTION_IFSET(PPC_FEATURE_UNIFIED_CACHE)
764_GLOBAL(__flush_dcache_icache_phys) 764_GLOBAL(__flush_dcache_icache_phys)
765BEGIN_FTR_SECTION 765BEGIN_FTR_SECTION
766 blr /* for 601, do nothing */ 766 blr /* for 601, do nothing */
767END_FTR_SECTION_IFSET(PPC_FEATURE_UNIFIED_CACHE) 767END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE)
768 mfmsr r10 768 mfmsr r10
769 rlwinm r0,r10,0,28,26 /* clear DR */ 769 rlwinm r0,r10,0,28,26 /* clear DR */
770 mtmsr r0 770 mtmsr r0
diff --git a/arch/ppc/platforms/pmac_cpufreq.c b/arch/ppc/platforms/pmac_cpufreq.c
index 937f46df711e..5fdd4f607a40 100644
--- a/arch/ppc/platforms/pmac_cpufreq.c
+++ b/arch/ppc/platforms/pmac_cpufreq.c
@@ -83,7 +83,7 @@ static u32 frequency_gpio;
83static u32 slew_done_gpio; 83static u32 slew_done_gpio;
84static int no_schedule; 84static int no_schedule;
85static int has_cpu_l2lve; 85static int has_cpu_l2lve;
86 86static int is_pmu_based;
87 87
88/* There are only two frequency states for each processor. Values 88/* There are only two frequency states for each processor. Values
89 * are in kHz for the time being. 89 * are in kHz for the time being.
@@ -463,7 +463,7 @@ static int __pmac pmac_cpufreq_suspend(struct cpufreq_policy *policy, u32 state)
463 */ 463 */
464 no_schedule = 1; 464 no_schedule = 1;
465 sleep_freq = cur_freq; 465 sleep_freq = cur_freq;
466 if (cur_freq == low_freq) 466 if (cur_freq == low_freq && !is_pmu_based)
467 do_set_cpu_speed(CPUFREQ_HIGH, 0); 467 do_set_cpu_speed(CPUFREQ_HIGH, 0);
468 return 0; 468 return 0;
469} 469}
@@ -588,6 +588,7 @@ static int __pmac pmac_cpufreq_init_MacRISC3(struct device_node *cpunode)
588 return 1; 588 return 1;
589 hi_freq = (*value) / 1000; 589 hi_freq = (*value) / 1000;
590 set_speed_proc = pmu_set_cpu_speed; 590 set_speed_proc = pmu_set_cpu_speed;
591 is_pmu_based = 1;
591 592
592 return 0; 593 return 0;
593} 594}
@@ -692,6 +693,7 @@ static int __init pmac_cpufreq_setup(void)
692 hi_freq = cur_freq; 693 hi_freq = cur_freq;
693 low_freq = 400000; 694 low_freq = 400000;
694 set_speed_proc = pmu_set_cpu_speed; 695 set_speed_proc = pmu_set_cpu_speed;
696 is_pmu_based = 1;
695 } 697 }
696 /* Else check for TiPb 400 & 500 */ 698 /* Else check for TiPb 400 & 500 */
697 else if (machine_is_compatible("PowerBook3,2")) { 699 else if (machine_is_compatible("PowerBook3,2")) {
@@ -703,6 +705,7 @@ static int __init pmac_cpufreq_setup(void)
703 hi_freq = cur_freq; 705 hi_freq = cur_freq;
704 low_freq = 300000; 706 low_freq = 300000;
705 set_speed_proc = pmu_set_cpu_speed; 707 set_speed_proc = pmu_set_cpu_speed;
708 is_pmu_based = 1;
706 } 709 }
707 /* Else check for 750FX */ 710 /* Else check for 750FX */
708 else if (PVR_VER(mfspr(SPRN_PVR)) == 0x7000) 711 else if (PVR_VER(mfspr(SPRN_PVR)) == 0x7000)
diff --git a/arch/ppc64/boot/prom.c b/arch/ppc64/boot/prom.c
index 7b607d1862cb..d5218b15824e 100644
--- a/arch/ppc64/boot/prom.c
+++ b/arch/ppc64/boot/prom.c
@@ -11,6 +11,23 @@
11#include <linux/string.h> 11#include <linux/string.h>
12#include <linux/ctype.h> 12#include <linux/ctype.h>
13 13
14extern __u32 __div64_32(unsigned long long *dividend, __u32 divisor);
15
16/* The unnecessary pointer compare is there
17 * to check for type safety (n must be 64bit)
18 */
19# define do_div(n,base) ({ \
20 __u32 __base = (base); \
21 __u32 __rem; \
22 (void)(((typeof((n)) *)0) == ((unsigned long long *)0)); \
23 if (((n) >> 32) == 0) { \
24 __rem = (__u32)(n) % __base; \
25 (n) = (__u32)(n) / __base; \
26 } else \
27 __rem = __div64_32(&(n), __base); \
28 __rem; \
29 })
30
14int (*prom)(void *); 31int (*prom)(void *);
15 32
16void *chosen_handle; 33void *chosen_handle;
@@ -352,7 +369,7 @@ static int skip_atoi(const char **s)
352#define SPECIAL 32 /* 0x */ 369#define SPECIAL 32 /* 0x */
353#define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */ 370#define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */
354 371
355static char * number(char * str, long num, int base, int size, int precision, int type) 372static char * number(char * str, unsigned long long num, int base, int size, int precision, int type)
356{ 373{
357 char c,sign,tmp[66]; 374 char c,sign,tmp[66];
358 const char *digits="0123456789abcdefghijklmnopqrstuvwxyz"; 375 const char *digits="0123456789abcdefghijklmnopqrstuvwxyz";
@@ -367,9 +384,9 @@ static char * number(char * str, long num, int base, int size, int precision, in
367 c = (type & ZEROPAD) ? '0' : ' '; 384 c = (type & ZEROPAD) ? '0' : ' ';
368 sign = 0; 385 sign = 0;
369 if (type & SIGN) { 386 if (type & SIGN) {
370 if (num < 0) { 387 if ((signed long long)num < 0) {
371 sign = '-'; 388 sign = '-';
372 num = -num; 389 num = - (signed long long)num;
373 size--; 390 size--;
374 } else if (type & PLUS) { 391 } else if (type & PLUS) {
375 sign = '+'; 392 sign = '+';
@@ -389,8 +406,7 @@ static char * number(char * str, long num, int base, int size, int precision, in
389 if (num == 0) 406 if (num == 0)
390 tmp[i++]='0'; 407 tmp[i++]='0';
391 else while (num != 0) { 408 else while (num != 0) {
392 tmp[i++] = digits[num % base]; 409 tmp[i++] = digits[do_div(num, base)];
393 num /= base;
394 } 410 }
395 if (i > precision) 411 if (i > precision)
396 precision = i; 412 precision = i;
@@ -426,7 +442,7 @@ int sprintf(char * buf, const char *fmt, ...);
426int vsprintf(char *buf, const char *fmt, va_list args) 442int vsprintf(char *buf, const char *fmt, va_list args)
427{ 443{
428 int len; 444 int len;
429 unsigned long num; 445 unsigned long long num;
430 int i, base; 446 int i, base;
431 char * str; 447 char * str;
432 const char *s; 448 const char *s;
diff --git a/arch/ppc64/configs/g5_defconfig b/arch/ppc64/configs/g5_defconfig
index 0f90df0b3f9c..1eb33398648e 100644
--- a/arch/ppc64/configs/g5_defconfig
+++ b/arch/ppc64/configs/g5_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.11 3# Linux kernel version: 2.6.12-rc6
4# Thu Mar 10 16:47:04 2005 4# Tue Jun 14 16:59:20 2005
5# 5#
6CONFIG_64BIT=y 6CONFIG_64BIT=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -11,7 +11,7 @@ CONFIG_GENERIC_ISA_DMA=y
11CONFIG_HAVE_DEC_LOCK=y 11CONFIG_HAVE_DEC_LOCK=y
12CONFIG_EARLY_PRINTK=y 12CONFIG_EARLY_PRINTK=y
13CONFIG_COMPAT=y 13CONFIG_COMPAT=y
14CONFIG_FRAME_POINTER=y 14CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
15CONFIG_FORCE_MAX_ZONEORDER=13 15CONFIG_FORCE_MAX_ZONEORDER=13
16 16
17# 17#
@@ -20,6 +20,7 @@ CONFIG_FORCE_MAX_ZONEORDER=13
20CONFIG_EXPERIMENTAL=y 20CONFIG_EXPERIMENTAL=y
21CONFIG_CLEAN_COMPILE=y 21CONFIG_CLEAN_COMPILE=y
22CONFIG_LOCK_KERNEL=y 22CONFIG_LOCK_KERNEL=y
23CONFIG_INIT_ENV_ARG_LIMIT=32
23 24
24# 25#
25# General setup 26# General setup
@@ -31,19 +32,20 @@ CONFIG_POSIX_MQUEUE=y
31# CONFIG_BSD_PROCESS_ACCT is not set 32# CONFIG_BSD_PROCESS_ACCT is not set
32CONFIG_SYSCTL=y 33CONFIG_SYSCTL=y
33# CONFIG_AUDIT is not set 34# CONFIG_AUDIT is not set
34CONFIG_LOG_BUF_SHIFT=17
35CONFIG_HOTPLUG=y 35CONFIG_HOTPLUG=y
36CONFIG_KOBJECT_UEVENT=y 36CONFIG_KOBJECT_UEVENT=y
37CONFIG_IKCONFIG=y 37CONFIG_IKCONFIG=y
38CONFIG_IKCONFIG_PROC=y 38CONFIG_IKCONFIG_PROC=y
39# CONFIG_CPUSETS is not set
39# CONFIG_EMBEDDED is not set 40# CONFIG_EMBEDDED is not set
40CONFIG_KALLSYMS=y 41CONFIG_KALLSYMS=y
41# CONFIG_KALLSYMS_ALL is not set 42# CONFIG_KALLSYMS_ALL is not set
42# CONFIG_KALLSYMS_EXTRA_PASS is not set 43# CONFIG_KALLSYMS_EXTRA_PASS is not set
44CONFIG_PRINTK=y
45CONFIG_BUG=y
43CONFIG_BASE_FULL=y 46CONFIG_BASE_FULL=y
44CONFIG_FUTEX=y 47CONFIG_FUTEX=y
45CONFIG_EPOLL=y 48CONFIG_EPOLL=y
46# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
47CONFIG_SHMEM=y 49CONFIG_SHMEM=y
48CONFIG_CC_ALIGN_FUNCTIONS=0 50CONFIG_CC_ALIGN_FUNCTIONS=0
49CONFIG_CC_ALIGN_LABELS=0 51CONFIG_CC_ALIGN_LABELS=0
@@ -87,6 +89,8 @@ CONFIG_NR_CPUS=2
87# CONFIG_SCHED_SMT is not set 89# CONFIG_SCHED_SMT is not set
88# CONFIG_PREEMPT is not set 90# CONFIG_PREEMPT is not set
89CONFIG_GENERIC_HARDIRQS=y 91CONFIG_GENERIC_HARDIRQS=y
92CONFIG_SECCOMP=y
93CONFIG_ISA_DMA_API=y
90 94
91# 95#
92# General setup 96# General setup
@@ -97,6 +101,7 @@ CONFIG_BINFMT_ELF=y
97# CONFIG_BINFMT_MISC is not set 101# CONFIG_BINFMT_MISC is not set
98CONFIG_PCI_LEGACY_PROC=y 102CONFIG_PCI_LEGACY_PROC=y
99CONFIG_PCI_NAMES=y 103CONFIG_PCI_NAMES=y
104# CONFIG_PCI_DEBUG is not set
100# CONFIG_HOTPLUG_CPU is not set 105# CONFIG_HOTPLUG_CPU is not set
101 106
102# 107#
@@ -105,10 +110,6 @@ CONFIG_PCI_NAMES=y
105# CONFIG_PCCARD is not set 110# CONFIG_PCCARD is not set
106 111
107# 112#
108# PC-card bridges
109#
110
111#
112# PCI Hotplug Support 113# PCI Hotplug Support
113# 114#
114# CONFIG_HOTPLUG_PCI is not set 115# CONFIG_HOTPLUG_PCI is not set
@@ -293,7 +294,6 @@ CONFIG_SCSI_SATA_SVW=y
293# CONFIG_SCSI_BUSLOGIC is not set 294# CONFIG_SCSI_BUSLOGIC is not set
294# CONFIG_SCSI_DMX3191D is not set 295# CONFIG_SCSI_DMX3191D is not set
295# CONFIG_SCSI_EATA is not set 296# CONFIG_SCSI_EATA is not set
296# CONFIG_SCSI_EATA_PIO is not set
297# CONFIG_SCSI_FUTURE_DOMAIN is not set 297# CONFIG_SCSI_FUTURE_DOMAIN is not set
298# CONFIG_SCSI_GDTH is not set 298# CONFIG_SCSI_GDTH is not set
299# CONFIG_SCSI_IPS is not set 299# CONFIG_SCSI_IPS is not set
@@ -301,7 +301,6 @@ CONFIG_SCSI_SATA_SVW=y
301# CONFIG_SCSI_INIA100 is not set 301# CONFIG_SCSI_INIA100 is not set
302# CONFIG_SCSI_SYM53C8XX_2 is not set 302# CONFIG_SCSI_SYM53C8XX_2 is not set
303# CONFIG_SCSI_IPR is not set 303# CONFIG_SCSI_IPR is not set
304# CONFIG_SCSI_QLOGIC_ISP is not set
305# CONFIG_SCSI_QLOGIC_FC is not set 304# CONFIG_SCSI_QLOGIC_FC is not set
306# CONFIG_SCSI_QLOGIC_1280 is not set 305# CONFIG_SCSI_QLOGIC_1280 is not set
307CONFIG_SCSI_QLA2XXX=y 306CONFIG_SCSI_QLA2XXX=y
@@ -310,6 +309,7 @@ CONFIG_SCSI_QLA2XXX=y
310# CONFIG_SCSI_QLA2300 is not set 309# CONFIG_SCSI_QLA2300 is not set
311# CONFIG_SCSI_QLA2322 is not set 310# CONFIG_SCSI_QLA2322 is not set
312# CONFIG_SCSI_QLA6312 is not set 311# CONFIG_SCSI_QLA6312 is not set
312# CONFIG_SCSI_LPFC is not set
313# CONFIG_SCSI_DC395x is not set 313# CONFIG_SCSI_DC395x is not set
314# CONFIG_SCSI_DC390T is not set 314# CONFIG_SCSI_DC390T is not set
315# CONFIG_SCSI_DEBUG is not set 315# CONFIG_SCSI_DEBUG is not set
@@ -332,6 +332,7 @@ CONFIG_DM_CRYPT=m
332CONFIG_DM_SNAPSHOT=m 332CONFIG_DM_SNAPSHOT=m
333CONFIG_DM_MIRROR=m 333CONFIG_DM_MIRROR=m
334CONFIG_DM_ZERO=m 334CONFIG_DM_ZERO=m
335# CONFIG_DM_MULTIPATH is not set
335 336
336# 337#
337# Fusion MPT device support 338# Fusion MPT device support
@@ -394,7 +395,6 @@ CONFIG_NET=y
394# 395#
395CONFIG_PACKET=y 396CONFIG_PACKET=y
396# CONFIG_PACKET_MMAP is not set 397# CONFIG_PACKET_MMAP is not set
397# CONFIG_NETLINK_DEV is not set
398CONFIG_UNIX=y 398CONFIG_UNIX=y
399CONFIG_NET_KEY=m 399CONFIG_NET_KEY=m
400CONFIG_INET=y 400CONFIG_INET=y
@@ -564,6 +564,8 @@ CONFIG_E1000=y
564# CONFIG_R8169 is not set 564# CONFIG_R8169 is not set
565# CONFIG_SK98LIN is not set 565# CONFIG_SK98LIN is not set
566CONFIG_TIGON3=m 566CONFIG_TIGON3=m
567# CONFIG_BNX2 is not set
568# CONFIG_MV643XX_ETH is not set
567 569
568# 570#
569# Ethernet (10000 Mbit) 571# Ethernet (10000 Mbit)
@@ -631,18 +633,6 @@ CONFIG_INPUT_EVDEV=y
631# CONFIG_INPUT_EVBUG is not set 633# CONFIG_INPUT_EVBUG is not set
632 634
633# 635#
634# Input I/O drivers
635#
636# CONFIG_GAMEPORT is not set
637CONFIG_SOUND_GAMEPORT=y
638CONFIG_SERIO=y
639# CONFIG_SERIO_I8042 is not set
640# CONFIG_SERIO_SERPORT is not set
641# CONFIG_SERIO_CT82C710 is not set
642# CONFIG_SERIO_PCIPS2 is not set
643# CONFIG_SERIO_RAW is not set
644
645#
646# Input Device Drivers 636# Input Device Drivers
647# 637#
648CONFIG_INPUT_KEYBOARD=y 638CONFIG_INPUT_KEYBOARD=y
@@ -660,6 +650,16 @@ CONFIG_INPUT_MOUSE=y
660# CONFIG_INPUT_MISC is not set 650# CONFIG_INPUT_MISC is not set
661 651
662# 652#
653# Hardware I/O ports
654#
655CONFIG_SERIO=y
656# CONFIG_SERIO_I8042 is not set
657# CONFIG_SERIO_SERPORT is not set
658# CONFIG_SERIO_PCIPS2 is not set
659# CONFIG_SERIO_RAW is not set
660# CONFIG_GAMEPORT is not set
661
662#
663# Character devices 663# Character devices
664# 664#
665CONFIG_VT=y 665CONFIG_VT=y
@@ -676,6 +676,7 @@ CONFIG_HW_CONSOLE=y
676# Non-8250 serial port support 676# Non-8250 serial port support
677# 677#
678# CONFIG_SERIAL_PMACZILOG is not set 678# CONFIG_SERIAL_PMACZILOG is not set
679# CONFIG_SERIAL_JSM is not set
679CONFIG_UNIX98_PTYS=y 680CONFIG_UNIX98_PTYS=y
680CONFIG_LEGACY_PTYS=y 681CONFIG_LEGACY_PTYS=y
681CONFIG_LEGACY_PTY_COUNT=256 682CONFIG_LEGACY_PTY_COUNT=256
@@ -698,9 +699,12 @@ CONFIG_LEGACY_PTY_COUNT=256
698# 699#
699# Ftape, the floppy tape device driver 700# Ftape, the floppy tape device driver
700# 701#
702CONFIG_AGP=m
703CONFIG_AGP_UNINORTH=m
701# CONFIG_DRM is not set 704# CONFIG_DRM is not set
702CONFIG_RAW_DRIVER=y 705CONFIG_RAW_DRIVER=y
703CONFIG_MAX_RAW_DEVS=256 706CONFIG_MAX_RAW_DEVS=256
707# CONFIG_HANGCHECK_TIMER is not set
704 708
705# 709#
706# TPM devices 710# TPM devices
@@ -730,12 +734,11 @@ CONFIG_I2C_ALGOBIT=y
730# CONFIG_I2C_AMD8111 is not set 734# CONFIG_I2C_AMD8111 is not set
731# CONFIG_I2C_I801 is not set 735# CONFIG_I2C_I801 is not set
732# CONFIG_I2C_I810 is not set 736# CONFIG_I2C_I810 is not set
737# CONFIG_I2C_PIIX4 is not set
733# CONFIG_I2C_ISA is not set 738# CONFIG_I2C_ISA is not set
734CONFIG_I2C_KEYWEST=y 739CONFIG_I2C_KEYWEST=y
735# CONFIG_I2C_MPC is not set
736# CONFIG_I2C_NFORCE2 is not set 740# CONFIG_I2C_NFORCE2 is not set
737# CONFIG_I2C_PARPORT_LIGHT is not set 741# CONFIG_I2C_PARPORT_LIGHT is not set
738# CONFIG_I2C_PIIX4 is not set
739# CONFIG_I2C_PROSAVAGE is not set 742# CONFIG_I2C_PROSAVAGE is not set
740# CONFIG_I2C_SAVAGE4 is not set 743# CONFIG_I2C_SAVAGE4 is not set
741# CONFIG_SCx200_ACB is not set 744# CONFIG_SCx200_ACB is not set
@@ -772,6 +775,7 @@ CONFIG_I2C_KEYWEST=y
772# CONFIG_SENSORS_LM85 is not set 775# CONFIG_SENSORS_LM85 is not set
773# CONFIG_SENSORS_LM87 is not set 776# CONFIG_SENSORS_LM87 is not set
774# CONFIG_SENSORS_LM90 is not set 777# CONFIG_SENSORS_LM90 is not set
778# CONFIG_SENSORS_LM92 is not set
775# CONFIG_SENSORS_MAX1619 is not set 779# CONFIG_SENSORS_MAX1619 is not set
776# CONFIG_SENSORS_PC87360 is not set 780# CONFIG_SENSORS_PC87360 is not set
777# CONFIG_SENSORS_SMSC47B397 is not set 781# CONFIG_SENSORS_SMSC47B397 is not set
@@ -785,6 +789,7 @@ CONFIG_I2C_KEYWEST=y
785# 789#
786# Other I2C Chip support 790# Other I2C Chip support
787# 791#
792# CONFIG_SENSORS_DS1337 is not set
788# CONFIG_SENSORS_EEPROM is not set 793# CONFIG_SENSORS_EEPROM is not set
789# CONFIG_SENSORS_PCF8574 is not set 794# CONFIG_SENSORS_PCF8574 is not set
790# CONFIG_SENSORS_PCF8591 is not set 795# CONFIG_SENSORS_PCF8591 is not set
@@ -817,6 +822,11 @@ CONFIG_I2C_KEYWEST=y
817# Graphics support 822# Graphics support
818# 823#
819CONFIG_FB=y 824CONFIG_FB=y
825CONFIG_FB_CFB_FILLRECT=y
826CONFIG_FB_CFB_COPYAREA=y
827CONFIG_FB_CFB_IMAGEBLIT=y
828CONFIG_FB_SOFT_CURSOR=y
829CONFIG_FB_MACMODES=y
820CONFIG_FB_MODE_HELPERS=y 830CONFIG_FB_MODE_HELPERS=y
821CONFIG_FB_TILEBLITTING=y 831CONFIG_FB_TILEBLITTING=y
822# CONFIG_FB_CIRRUS is not set 832# CONFIG_FB_CIRRUS is not set
@@ -830,6 +840,7 @@ CONFIG_FB_OF=y
830# CONFIG_FB_ASILIANT is not set 840# CONFIG_FB_ASILIANT is not set
831# CONFIG_FB_IMSTT is not set 841# CONFIG_FB_IMSTT is not set
832# CONFIG_FB_VGA16 is not set 842# CONFIG_FB_VGA16 is not set
843# CONFIG_FB_NVIDIA is not set
833CONFIG_FB_RIVA=y 844CONFIG_FB_RIVA=y
834# CONFIG_FB_RIVA_I2C is not set 845# CONFIG_FB_RIVA_I2C is not set
835# CONFIG_FB_RIVA_DEBUG is not set 846# CONFIG_FB_RIVA_DEBUG is not set
@@ -847,6 +858,7 @@ CONFIG_FB_RADEON_I2C=y
847# CONFIG_FB_3DFX is not set 858# CONFIG_FB_3DFX is not set
848# CONFIG_FB_VOODOO1 is not set 859# CONFIG_FB_VOODOO1 is not set
849# CONFIG_FB_TRIDENT is not set 860# CONFIG_FB_TRIDENT is not set
861# CONFIG_FB_S1D13XXX is not set
850# CONFIG_FB_VIRTUAL is not set 862# CONFIG_FB_VIRTUAL is not set
851 863
852# 864#
@@ -880,6 +892,8 @@ CONFIG_LCD_DEVICE=y
880# 892#
881# USB support 893# USB support
882# 894#
895CONFIG_USB_ARCH_HAS_HCD=y
896CONFIG_USB_ARCH_HAS_OHCI=y
883CONFIG_USB=y 897CONFIG_USB=y
884# CONFIG_USB_DEBUG is not set 898# CONFIG_USB_DEBUG is not set
885 899
@@ -890,8 +904,6 @@ CONFIG_USB_DEVICEFS=y
890# CONFIG_USB_BANDWIDTH is not set 904# CONFIG_USB_BANDWIDTH is not set
891# CONFIG_USB_DYNAMIC_MINORS is not set 905# CONFIG_USB_DYNAMIC_MINORS is not set
892# CONFIG_USB_OTG is not set 906# CONFIG_USB_OTG is not set
893CONFIG_USB_ARCH_HAS_HCD=y
894CONFIG_USB_ARCH_HAS_OHCI=y
895 907
896# 908#
897# USB Host Controller Drivers 909# USB Host Controller Drivers
@@ -917,7 +929,6 @@ CONFIG_USB_PRINTER=y
917# 929#
918CONFIG_USB_STORAGE=y 930CONFIG_USB_STORAGE=y
919# CONFIG_USB_STORAGE_DEBUG is not set 931# CONFIG_USB_STORAGE_DEBUG is not set
920CONFIG_USB_STORAGE_RW_DETECT=y
921CONFIG_USB_STORAGE_DATAFAB=y 932CONFIG_USB_STORAGE_DATAFAB=y
922CONFIG_USB_STORAGE_FREECOM=y 933CONFIG_USB_STORAGE_FREECOM=y
923CONFIG_USB_STORAGE_ISD200=y 934CONFIG_USB_STORAGE_ISD200=y
@@ -1004,8 +1015,10 @@ CONFIG_USB_MON=y
1004# 1015#
1005CONFIG_USB_SERIAL=m 1016CONFIG_USB_SERIAL=m
1006CONFIG_USB_SERIAL_GENERIC=y 1017CONFIG_USB_SERIAL_GENERIC=y
1018# CONFIG_USB_SERIAL_AIRPRIME is not set
1007CONFIG_USB_SERIAL_BELKIN=m 1019CONFIG_USB_SERIAL_BELKIN=m
1008CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m 1020CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
1021# CONFIG_USB_SERIAL_CP2101 is not set
1009CONFIG_USB_SERIAL_CYPRESS_M8=m 1022CONFIG_USB_SERIAL_CYPRESS_M8=m
1010CONFIG_USB_SERIAL_EMPEG=m 1023CONFIG_USB_SERIAL_EMPEG=m
1011CONFIG_USB_SERIAL_FTDI_SIO=m 1024CONFIG_USB_SERIAL_FTDI_SIO=m
@@ -1034,6 +1047,7 @@ CONFIG_USB_SERIAL_KLSI=m
1034CONFIG_USB_SERIAL_KOBIL_SCT=m 1047CONFIG_USB_SERIAL_KOBIL_SCT=m
1035CONFIG_USB_SERIAL_MCT_U232=m 1048CONFIG_USB_SERIAL_MCT_U232=m
1036CONFIG_USB_SERIAL_PL2303=m 1049CONFIG_USB_SERIAL_PL2303=m
1050# CONFIG_USB_SERIAL_HP4X is not set
1037CONFIG_USB_SERIAL_SAFE=m 1051CONFIG_USB_SERIAL_SAFE=m
1038CONFIG_USB_SERIAL_SAFE_PADDED=y 1052CONFIG_USB_SERIAL_SAFE_PADDED=y
1039CONFIG_USB_SERIAL_TI=m 1053CONFIG_USB_SERIAL_TI=m
@@ -1270,11 +1284,13 @@ CONFIG_OPROFILE=y
1270# 1284#
1271# Kernel hacking 1285# Kernel hacking
1272# 1286#
1287# CONFIG_PRINTK_TIME is not set
1273CONFIG_DEBUG_KERNEL=y 1288CONFIG_DEBUG_KERNEL=y
1274CONFIG_MAGIC_SYSRQ=y 1289CONFIG_MAGIC_SYSRQ=y
1275# CONFIG_PRINTK_TIME is not set 1290CONFIG_LOG_BUF_SHIFT=17
1276# CONFIG_SCHEDSTATS is not set 1291# CONFIG_SCHEDSTATS is not set
1277# CONFIG_DEBUG_SLAB is not set 1292# CONFIG_DEBUG_SLAB is not set
1293# CONFIG_DEBUG_SPINLOCK is not set
1278# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1294# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1279# CONFIG_DEBUG_KOBJECT is not set 1295# CONFIG_DEBUG_KOBJECT is not set
1280# CONFIG_DEBUG_INFO is not set 1296# CONFIG_DEBUG_INFO is not set
diff --git a/arch/ppc64/configs/iSeries_defconfig b/arch/ppc64/configs/iSeries_defconfig
index a39e9d2e25da..f6a2b99afd63 100644
--- a/arch/ppc64/configs/iSeries_defconfig
+++ b/arch/ppc64/configs/iSeries_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.11-rc3-bk6 3# Linux kernel version: 2.6.12-rc6
4# Wed Feb 9 23:34:52 2005 4# Tue Jun 14 17:01:28 2005
5# 5#
6CONFIG_64BIT=y 6CONFIG_64BIT=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -11,7 +11,7 @@ CONFIG_GENERIC_ISA_DMA=y
11CONFIG_HAVE_DEC_LOCK=y 11CONFIG_HAVE_DEC_LOCK=y
12CONFIG_EARLY_PRINTK=y 12CONFIG_EARLY_PRINTK=y
13CONFIG_COMPAT=y 13CONFIG_COMPAT=y
14CONFIG_FRAME_POINTER=y 14CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
15CONFIG_FORCE_MAX_ZONEORDER=13 15CONFIG_FORCE_MAX_ZONEORDER=13
16 16
17# 17#
@@ -20,6 +20,7 @@ CONFIG_FORCE_MAX_ZONEORDER=13
20CONFIG_EXPERIMENTAL=y 20CONFIG_EXPERIMENTAL=y
21CONFIG_CLEAN_COMPILE=y 21CONFIG_CLEAN_COMPILE=y
22CONFIG_LOCK_KERNEL=y 22CONFIG_LOCK_KERNEL=y
23CONFIG_INIT_ENV_ARG_LIMIT=32
23 24
24# 25#
25# General setup 26# General setup
@@ -30,24 +31,29 @@ CONFIG_SYSVIPC=y
30CONFIG_POSIX_MQUEUE=y 31CONFIG_POSIX_MQUEUE=y
31# CONFIG_BSD_PROCESS_ACCT is not set 32# CONFIG_BSD_PROCESS_ACCT is not set
32CONFIG_SYSCTL=y 33CONFIG_SYSCTL=y
33CONFIG_LOG_BUF_SHIFT=17 34CONFIG_AUDIT=y
35CONFIG_AUDITSYSCALL=y
34CONFIG_HOTPLUG=y 36CONFIG_HOTPLUG=y
35CONFIG_KOBJECT_UEVENT=y 37CONFIG_KOBJECT_UEVENT=y
36CONFIG_IKCONFIG=y 38CONFIG_IKCONFIG=y
37CONFIG_IKCONFIG_PROC=y 39CONFIG_IKCONFIG_PROC=y
40# CONFIG_CPUSETS is not set
38# CONFIG_EMBEDDED is not set 41# CONFIG_EMBEDDED is not set
39CONFIG_KALLSYMS=y 42CONFIG_KALLSYMS=y
40# CONFIG_KALLSYMS_ALL is not set 43# CONFIG_KALLSYMS_ALL is not set
41# CONFIG_KALLSYMS_EXTRA_PASS is not set 44# CONFIG_KALLSYMS_EXTRA_PASS is not set
45CONFIG_PRINTK=y
46CONFIG_BUG=y
47CONFIG_BASE_FULL=y
42CONFIG_FUTEX=y 48CONFIG_FUTEX=y
43CONFIG_EPOLL=y 49CONFIG_EPOLL=y
44# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
45CONFIG_SHMEM=y 50CONFIG_SHMEM=y
46CONFIG_CC_ALIGN_FUNCTIONS=0 51CONFIG_CC_ALIGN_FUNCTIONS=0
47CONFIG_CC_ALIGN_LABELS=0 52CONFIG_CC_ALIGN_LABELS=0
48CONFIG_CC_ALIGN_LOOPS=0 53CONFIG_CC_ALIGN_LOOPS=0
49CONFIG_CC_ALIGN_JUMPS=0 54CONFIG_CC_ALIGN_JUMPS=0
50# CONFIG_TINY_SHMEM is not set 55# CONFIG_TINY_SHMEM is not set
56CONFIG_BASE_SMALL=0
51 57
52# 58#
53# Loadable module support 59# Loadable module support
@@ -79,6 +85,8 @@ CONFIG_NR_CPUS=32
79CONFIG_GENERIC_HARDIRQS=y 85CONFIG_GENERIC_HARDIRQS=y
80CONFIG_MSCHUNKS=y 86CONFIG_MSCHUNKS=y
81CONFIG_LPARCFG=y 87CONFIG_LPARCFG=y
88CONFIG_SECCOMP=y
89CONFIG_ISA_DMA_API=y
82 90
83# 91#
84# General setup 92# General setup
@@ -89,6 +97,7 @@ CONFIG_BINFMT_ELF=y
89# CONFIG_BINFMT_MISC is not set 97# CONFIG_BINFMT_MISC is not set
90CONFIG_PCI_LEGACY_PROC=y 98CONFIG_PCI_LEGACY_PROC=y
91CONFIG_PCI_NAMES=y 99CONFIG_PCI_NAMES=y
100# CONFIG_PCI_DEBUG is not set
92 101
93# 102#
94# PCCARD (PCMCIA/CardBus) support 103# PCCARD (PCMCIA/CardBus) support
@@ -96,10 +105,6 @@ CONFIG_PCI_NAMES=y
96# CONFIG_PCCARD is not set 105# CONFIG_PCCARD is not set
97 106
98# 107#
99# PC-card bridges
100#
101
102#
103# PCI Hotplug Support 108# PCI Hotplug Support
104# 109#
105# CONFIG_HOTPLUG_PCI is not set 110# CONFIG_HOTPLUG_PCI is not set
@@ -210,7 +215,6 @@ CONFIG_SCSI_FC_ATTRS=y
210# CONFIG_SCSI_BUSLOGIC is not set 215# CONFIG_SCSI_BUSLOGIC is not set
211# CONFIG_SCSI_DMX3191D is not set 216# CONFIG_SCSI_DMX3191D is not set
212# CONFIG_SCSI_EATA is not set 217# CONFIG_SCSI_EATA is not set
213# CONFIG_SCSI_EATA_PIO is not set
214# CONFIG_SCSI_FUTURE_DOMAIN is not set 218# CONFIG_SCSI_FUTURE_DOMAIN is not set
215# CONFIG_SCSI_GDTH is not set 219# CONFIG_SCSI_GDTH is not set
216# CONFIG_SCSI_IPS is not set 220# CONFIG_SCSI_IPS is not set
@@ -219,7 +223,6 @@ CONFIG_SCSI_IBMVSCSI=m
219# CONFIG_SCSI_INIA100 is not set 223# CONFIG_SCSI_INIA100 is not set
220# CONFIG_SCSI_SYM53C8XX_2 is not set 224# CONFIG_SCSI_SYM53C8XX_2 is not set
221# CONFIG_SCSI_IPR is not set 225# CONFIG_SCSI_IPR is not set
222# CONFIG_SCSI_QLOGIC_ISP is not set
223# CONFIG_SCSI_QLOGIC_FC is not set 226# CONFIG_SCSI_QLOGIC_FC is not set
224# CONFIG_SCSI_QLOGIC_1280 is not set 227# CONFIG_SCSI_QLOGIC_1280 is not set
225CONFIG_SCSI_QLA2XXX=y 228CONFIG_SCSI_QLA2XXX=y
@@ -228,6 +231,7 @@ CONFIG_SCSI_QLA2XXX=y
228# CONFIG_SCSI_QLA2300 is not set 231# CONFIG_SCSI_QLA2300 is not set
229# CONFIG_SCSI_QLA2322 is not set 232# CONFIG_SCSI_QLA2322 is not set
230# CONFIG_SCSI_QLA6312 is not set 233# CONFIG_SCSI_QLA6312 is not set
234# CONFIG_SCSI_LPFC is not set
231# CONFIG_SCSI_DC395x is not set 235# CONFIG_SCSI_DC395x is not set
232# CONFIG_SCSI_DC390T is not set 236# CONFIG_SCSI_DC390T is not set
233# CONFIG_SCSI_DEBUG is not set 237# CONFIG_SCSI_DEBUG is not set
@@ -250,6 +254,7 @@ CONFIG_DM_CRYPT=m
250CONFIG_DM_SNAPSHOT=m 254CONFIG_DM_SNAPSHOT=m
251CONFIG_DM_MIRROR=m 255CONFIG_DM_MIRROR=m
252CONFIG_DM_ZERO=m 256CONFIG_DM_ZERO=m
257# CONFIG_DM_MULTIPATH is not set
253 258
254# 259#
255# Fusion MPT device support 260# Fusion MPT device support
@@ -280,7 +285,6 @@ CONFIG_NET=y
280# 285#
281CONFIG_PACKET=y 286CONFIG_PACKET=y
282# CONFIG_PACKET_MMAP is not set 287# CONFIG_PACKET_MMAP is not set
283# CONFIG_NETLINK_DEV is not set
284CONFIG_UNIX=y 288CONFIG_UNIX=y
285CONFIG_NET_KEY=m 289CONFIG_NET_KEY=m
286CONFIG_INET=y 290CONFIG_INET=y
@@ -445,7 +449,6 @@ CONFIG_PCNET32=y
445# CONFIG_DGRS is not set 449# CONFIG_DGRS is not set
446# CONFIG_EEPRO100 is not set 450# CONFIG_EEPRO100 is not set
447CONFIG_E100=y 451CONFIG_E100=y
448# CONFIG_E100_NAPI is not set
449# CONFIG_FEALNX is not set 452# CONFIG_FEALNX is not set
450# CONFIG_NATSEMI is not set 453# CONFIG_NATSEMI is not set
451# CONFIG_NE2K_PCI is not set 454# CONFIG_NE2K_PCI is not set
@@ -471,6 +474,7 @@ CONFIG_E1000=m
471# CONFIG_SK98LIN is not set 474# CONFIG_SK98LIN is not set
472# CONFIG_VIA_VELOCITY is not set 475# CONFIG_VIA_VELOCITY is not set
473# CONFIG_TIGON3 is not set 476# CONFIG_TIGON3 is not set
477# CONFIG_BNX2 is not set
474 478
475# 479#
476# Ethernet (10000 Mbit) 480# Ethernet (10000 Mbit)
@@ -539,14 +543,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
539# CONFIG_INPUT_EVBUG is not set 543# CONFIG_INPUT_EVBUG is not set
540 544
541# 545#
542# Input I/O drivers
543#
544# CONFIG_GAMEPORT is not set
545CONFIG_SOUND_GAMEPORT=y
546# CONFIG_SERIO is not set
547# CONFIG_SERIO_I8042 is not set
548
549#
550# Input Device Drivers 546# Input Device Drivers
551# 547#
552# CONFIG_INPUT_KEYBOARD is not set 548# CONFIG_INPUT_KEYBOARD is not set
@@ -556,6 +552,12 @@ CONFIG_SOUND_GAMEPORT=y
556# CONFIG_INPUT_MISC is not set 552# CONFIG_INPUT_MISC is not set
557 553
558# 554#
555# Hardware I/O ports
556#
557# CONFIG_SERIO is not set
558# CONFIG_GAMEPORT is not set
559
560#
559# Character devices 561# Character devices
560# 562#
561# CONFIG_SERIAL_NONSTANDARD is not set 563# CONFIG_SERIAL_NONSTANDARD is not set
@@ -570,6 +572,7 @@ CONFIG_SOUND_GAMEPORT=y
570# 572#
571CONFIG_SERIAL_CORE=m 573CONFIG_SERIAL_CORE=m
572CONFIG_SERIAL_ICOM=m 574CONFIG_SERIAL_ICOM=m
575# CONFIG_SERIAL_JSM is not set
573CONFIG_UNIX98_PTYS=y 576CONFIG_UNIX98_PTYS=y
574CONFIG_LEGACY_PTYS=y 577CONFIG_LEGACY_PTYS=y
575CONFIG_LEGACY_PTY_COUNT=256 578CONFIG_LEGACY_PTY_COUNT=256
@@ -592,9 +595,16 @@ CONFIG_LEGACY_PTY_COUNT=256
592# 595#
593# Ftape, the floppy tape device driver 596# Ftape, the floppy tape device driver
594# 597#
598# CONFIG_AGP is not set
595# CONFIG_DRM is not set 599# CONFIG_DRM is not set
596CONFIG_RAW_DRIVER=y 600CONFIG_RAW_DRIVER=y
597CONFIG_MAX_RAW_DEVS=256 601CONFIG_MAX_RAW_DEVS=256
602# CONFIG_HANGCHECK_TIMER is not set
603
604#
605# TPM devices
606#
607# CONFIG_TCG_TPM is not set
598 608
599# 609#
600# I2C support 610# I2C support
@@ -633,13 +643,9 @@ CONFIG_MAX_RAW_DEVS=256
633# 643#
634# USB support 644# USB support
635# 645#
636# CONFIG_USB is not set
637CONFIG_USB_ARCH_HAS_HCD=y 646CONFIG_USB_ARCH_HAS_HCD=y
638CONFIG_USB_ARCH_HAS_OHCI=y 647CONFIG_USB_ARCH_HAS_OHCI=y
639 648# CONFIG_USB is not set
640#
641# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
642#
643 649
644# 650#
645# USB Gadget Support 651# USB Gadget Support
@@ -848,10 +854,13 @@ CONFIG_OPROFILE=y
848# 854#
849# Kernel hacking 855# Kernel hacking
850# 856#
857# CONFIG_PRINTK_TIME is not set
851CONFIG_DEBUG_KERNEL=y 858CONFIG_DEBUG_KERNEL=y
852CONFIG_MAGIC_SYSRQ=y 859CONFIG_MAGIC_SYSRQ=y
860CONFIG_LOG_BUF_SHIFT=17
853# CONFIG_SCHEDSTATS is not set 861# CONFIG_SCHEDSTATS is not set
854# CONFIG_DEBUG_SLAB is not set 862# CONFIG_DEBUG_SLAB is not set
863# CONFIG_DEBUG_SPINLOCK is not set
855# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 864# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
856# CONFIG_DEBUG_KOBJECT is not set 865# CONFIG_DEBUG_KOBJECT is not set
857# CONFIG_DEBUG_INFO is not set 866# CONFIG_DEBUG_INFO is not set
@@ -881,6 +890,7 @@ CONFIG_CRYPTO_SHA1=m
881CONFIG_CRYPTO_SHA256=m 890CONFIG_CRYPTO_SHA256=m
882CONFIG_CRYPTO_SHA512=m 891CONFIG_CRYPTO_SHA512=m
883CONFIG_CRYPTO_WP512=m 892CONFIG_CRYPTO_WP512=m
893CONFIG_CRYPTO_TGR192=m
884CONFIG_CRYPTO_DES=y 894CONFIG_CRYPTO_DES=y
885CONFIG_CRYPTO_BLOWFISH=m 895CONFIG_CRYPTO_BLOWFISH=m
886CONFIG_CRYPTO_TWOFISH=m 896CONFIG_CRYPTO_TWOFISH=m
diff --git a/arch/ppc64/configs/maple_defconfig b/arch/ppc64/configs/maple_defconfig
index cf527501915c..8051b0f47b6f 100644
--- a/arch/ppc64/configs/maple_defconfig
+++ b/arch/ppc64/configs/maple_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.11-rc3-bk6 3# Linux kernel version: 2.6.12-rc6
4# Wed Feb 9 23:34:53 2005 4# Tue Jun 14 17:12:48 2005
5# 5#
6CONFIG_64BIT=y 6CONFIG_64BIT=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -11,7 +11,7 @@ CONFIG_GENERIC_ISA_DMA=y
11CONFIG_HAVE_DEC_LOCK=y 11CONFIG_HAVE_DEC_LOCK=y
12CONFIG_EARLY_PRINTK=y 12CONFIG_EARLY_PRINTK=y
13CONFIG_COMPAT=y 13CONFIG_COMPAT=y
14CONFIG_FRAME_POINTER=y 14CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
15CONFIG_FORCE_MAX_ZONEORDER=13 15CONFIG_FORCE_MAX_ZONEORDER=13
16 16
17# 17#
@@ -20,6 +20,7 @@ CONFIG_FORCE_MAX_ZONEORDER=13
20CONFIG_EXPERIMENTAL=y 20CONFIG_EXPERIMENTAL=y
21CONFIG_CLEAN_COMPILE=y 21CONFIG_CLEAN_COMPILE=y
22CONFIG_LOCK_KERNEL=y 22CONFIG_LOCK_KERNEL=y
23CONFIG_INIT_ENV_ARG_LIMIT=32
23 24
24# 25#
25# General setup 26# General setup
@@ -30,24 +31,28 @@ CONFIG_SYSVIPC=y
30CONFIG_POSIX_MQUEUE=y 31CONFIG_POSIX_MQUEUE=y
31# CONFIG_BSD_PROCESS_ACCT is not set 32# CONFIG_BSD_PROCESS_ACCT is not set
32CONFIG_SYSCTL=y 33CONFIG_SYSCTL=y
33CONFIG_LOG_BUF_SHIFT=17 34# CONFIG_AUDIT is not set
34# CONFIG_HOTPLUG is not set 35# CONFIG_HOTPLUG is not set
35CONFIG_KOBJECT_UEVENT=y 36CONFIG_KOBJECT_UEVENT=y
36CONFIG_IKCONFIG=y 37CONFIG_IKCONFIG=y
37CONFIG_IKCONFIG_PROC=y 38CONFIG_IKCONFIG_PROC=y
39# CONFIG_CPUSETS is not set
38# CONFIG_EMBEDDED is not set 40# CONFIG_EMBEDDED is not set
39CONFIG_KALLSYMS=y 41CONFIG_KALLSYMS=y
40CONFIG_KALLSYMS_ALL=y 42CONFIG_KALLSYMS_ALL=y
41# CONFIG_KALLSYMS_EXTRA_PASS is not set 43# CONFIG_KALLSYMS_EXTRA_PASS is not set
44CONFIG_PRINTK=y
45CONFIG_BUG=y
46CONFIG_BASE_FULL=y
42CONFIG_FUTEX=y 47CONFIG_FUTEX=y
43CONFIG_EPOLL=y 48CONFIG_EPOLL=y
44# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
45CONFIG_SHMEM=y 49CONFIG_SHMEM=y
46CONFIG_CC_ALIGN_FUNCTIONS=0 50CONFIG_CC_ALIGN_FUNCTIONS=0
47CONFIG_CC_ALIGN_LABELS=0 51CONFIG_CC_ALIGN_LABELS=0
48CONFIG_CC_ALIGN_LOOPS=0 52CONFIG_CC_ALIGN_LOOPS=0
49CONFIG_CC_ALIGN_JUMPS=0 53CONFIG_CC_ALIGN_JUMPS=0
50# CONFIG_TINY_SHMEM is not set 54# CONFIG_TINY_SHMEM is not set
55CONFIG_BASE_SMALL=0
51 56
52# 57#
53# Loadable module support 58# Loadable module support
@@ -84,6 +89,8 @@ CONFIG_NR_CPUS=2
84# CONFIG_SCHED_SMT is not set 89# CONFIG_SCHED_SMT is not set
85# CONFIG_PREEMPT is not set 90# CONFIG_PREEMPT is not set
86CONFIG_GENERIC_HARDIRQS=y 91CONFIG_GENERIC_HARDIRQS=y
92CONFIG_SECCOMP=y
93CONFIG_ISA_DMA_API=y
87 94
88# 95#
89# General setup 96# General setup
@@ -94,6 +101,7 @@ CONFIG_BINFMT_ELF=y
94# CONFIG_BINFMT_MISC is not set 101# CONFIG_BINFMT_MISC is not set
95CONFIG_PCI_LEGACY_PROC=y 102CONFIG_PCI_LEGACY_PROC=y
96CONFIG_PCI_NAMES=y 103CONFIG_PCI_NAMES=y
104# CONFIG_PCI_DEBUG is not set
97 105
98# 106#
99# PCCARD (PCMCIA/CardBus) support 107# PCCARD (PCMCIA/CardBus) support
@@ -101,10 +109,6 @@ CONFIG_PCI_NAMES=y
101# CONFIG_PCCARD is not set 109# CONFIG_PCCARD is not set
102 110
103# 111#
104# PC-card bridges
105#
106
107#
108# PCI Hotplug Support 112# PCI Hotplug Support
109# 113#
110# CONFIG_HOTPLUG_PCI is not set 114# CONFIG_HOTPLUG_PCI is not set
@@ -261,7 +265,6 @@ CONFIG_NET=y
261# 265#
262CONFIG_PACKET=y 266CONFIG_PACKET=y
263CONFIG_PACKET_MMAP=y 267CONFIG_PACKET_MMAP=y
264# CONFIG_NETLINK_DEV is not set
265CONFIG_UNIX=y 268CONFIG_UNIX=y
266# CONFIG_NET_KEY is not set 269# CONFIG_NET_KEY is not set
267CONFIG_INET=y 270CONFIG_INET=y
@@ -376,6 +379,8 @@ CONFIG_E1000=y
376# CONFIG_SK98LIN is not set 379# CONFIG_SK98LIN is not set
377# CONFIG_VIA_VELOCITY is not set 380# CONFIG_VIA_VELOCITY is not set
378# CONFIG_TIGON3 is not set 381# CONFIG_TIGON3 is not set
382# CONFIG_BNX2 is not set
383# CONFIG_MV643XX_ETH is not set
379 384
380# 385#
381# Ethernet (10000 Mbit) 386# Ethernet (10000 Mbit)
@@ -432,14 +437,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=1200
432# CONFIG_INPUT_EVBUG is not set 437# CONFIG_INPUT_EVBUG is not set
433 438
434# 439#
435# Input I/O drivers
436#
437# CONFIG_GAMEPORT is not set
438CONFIG_SOUND_GAMEPORT=y
439# CONFIG_SERIO is not set
440# CONFIG_SERIO_I8042 is not set
441
442#
443# Input Device Drivers 440# Input Device Drivers
444# 441#
445# CONFIG_INPUT_KEYBOARD is not set 442# CONFIG_INPUT_KEYBOARD is not set
@@ -449,6 +446,12 @@ CONFIG_SOUND_GAMEPORT=y
449# CONFIG_INPUT_MISC is not set 446# CONFIG_INPUT_MISC is not set
450 447
451# 448#
449# Hardware I/O ports
450#
451# CONFIG_SERIO is not set
452# CONFIG_GAMEPORT is not set
453
454#
452# Character devices 455# Character devices
453# 456#
454CONFIG_VT=y 457CONFIG_VT=y
@@ -469,7 +472,7 @@ CONFIG_SERIAL_8250_NR_UARTS=4
469# 472#
470CONFIG_SERIAL_CORE=y 473CONFIG_SERIAL_CORE=y
471CONFIG_SERIAL_CORE_CONSOLE=y 474CONFIG_SERIAL_CORE_CONSOLE=y
472# CONFIG_SERIAL_PMACZILOG is not set 475# CONFIG_SERIAL_JSM is not set
473CONFIG_UNIX98_PTYS=y 476CONFIG_UNIX98_PTYS=y
474CONFIG_LEGACY_PTYS=y 477CONFIG_LEGACY_PTYS=y
475CONFIG_LEGACY_PTY_COUNT=256 478CONFIG_LEGACY_PTY_COUNT=256
@@ -492,8 +495,15 @@ CONFIG_LEGACY_PTY_COUNT=256
492# 495#
493# Ftape, the floppy tape device driver 496# Ftape, the floppy tape device driver
494# 497#
498# CONFIG_AGP is not set
495# CONFIG_DRM is not set 499# CONFIG_DRM is not set
496# CONFIG_RAW_DRIVER is not set 500# CONFIG_RAW_DRIVER is not set
501# CONFIG_HANGCHECK_TIMER is not set
502
503#
504# TPM devices
505#
506# CONFIG_TCG_TPM is not set
497 507
498# 508#
499# I2C support 509# I2C support
@@ -518,8 +528,8 @@ CONFIG_I2C_ALGOBIT=y
518CONFIG_I2C_AMD8111=y 528CONFIG_I2C_AMD8111=y
519# CONFIG_I2C_I801 is not set 529# CONFIG_I2C_I801 is not set
520# CONFIG_I2C_I810 is not set 530# CONFIG_I2C_I810 is not set
531# CONFIG_I2C_PIIX4 is not set
521# CONFIG_I2C_ISA is not set 532# CONFIG_I2C_ISA is not set
522# CONFIG_I2C_MPC is not set
523# CONFIG_I2C_NFORCE2 is not set 533# CONFIG_I2C_NFORCE2 is not set
524# CONFIG_I2C_PARPORT_LIGHT is not set 534# CONFIG_I2C_PARPORT_LIGHT is not set
525# CONFIG_I2C_PROSAVAGE is not set 535# CONFIG_I2C_PROSAVAGE is not set
@@ -545,7 +555,9 @@ CONFIG_I2C_AMD8111=y
545# CONFIG_SENSORS_ASB100 is not set 555# CONFIG_SENSORS_ASB100 is not set
546# CONFIG_SENSORS_DS1621 is not set 556# CONFIG_SENSORS_DS1621 is not set
547# CONFIG_SENSORS_FSCHER is not set 557# CONFIG_SENSORS_FSCHER is not set
558# CONFIG_SENSORS_FSCPOS is not set
548# CONFIG_SENSORS_GL518SM is not set 559# CONFIG_SENSORS_GL518SM is not set
560# CONFIG_SENSORS_GL520SM is not set
549# CONFIG_SENSORS_IT87 is not set 561# CONFIG_SENSORS_IT87 is not set
550# CONFIG_SENSORS_LM63 is not set 562# CONFIG_SENSORS_LM63 is not set
551# CONFIG_SENSORS_LM75 is not set 563# CONFIG_SENSORS_LM75 is not set
@@ -556,9 +568,11 @@ CONFIG_I2C_AMD8111=y
556# CONFIG_SENSORS_LM85 is not set 568# CONFIG_SENSORS_LM85 is not set
557# CONFIG_SENSORS_LM87 is not set 569# CONFIG_SENSORS_LM87 is not set
558# CONFIG_SENSORS_LM90 is not set 570# CONFIG_SENSORS_LM90 is not set
571# CONFIG_SENSORS_LM92 is not set
559# CONFIG_SENSORS_MAX1619 is not set 572# CONFIG_SENSORS_MAX1619 is not set
560# CONFIG_SENSORS_PC87360 is not set 573# CONFIG_SENSORS_PC87360 is not set
561# CONFIG_SENSORS_SMSC47B397 is not set 574# CONFIG_SENSORS_SMSC47B397 is not set
575# CONFIG_SENSORS_SIS5595 is not set
562# CONFIG_SENSORS_SMSC47M1 is not set 576# CONFIG_SENSORS_SMSC47M1 is not set
563# CONFIG_SENSORS_VIA686A is not set 577# CONFIG_SENSORS_VIA686A is not set
564# CONFIG_SENSORS_W83781D is not set 578# CONFIG_SENSORS_W83781D is not set
@@ -568,6 +582,7 @@ CONFIG_I2C_AMD8111=y
568# 582#
569# Other I2C Chip support 583# Other I2C Chip support
570# 584#
585# CONFIG_SENSORS_DS1337 is not set
571# CONFIG_SENSORS_EEPROM is not set 586# CONFIG_SENSORS_EEPROM is not set
572# CONFIG_SENSORS_PCF8574 is not set 587# CONFIG_SENSORS_PCF8574 is not set
573# CONFIG_SENSORS_PCF8591 is not set 588# CONFIG_SENSORS_PCF8591 is not set
@@ -615,6 +630,8 @@ CONFIG_DUMMY_CONSOLE=y
615# 630#
616# USB support 631# USB support
617# 632#
633CONFIG_USB_ARCH_HAS_HCD=y
634CONFIG_USB_ARCH_HAS_OHCI=y
618CONFIG_USB=y 635CONFIG_USB=y
619# CONFIG_USB_DEBUG is not set 636# CONFIG_USB_DEBUG is not set
620 637
@@ -625,8 +642,6 @@ CONFIG_USB_DEVICEFS=y
625# CONFIG_USB_BANDWIDTH is not set 642# CONFIG_USB_BANDWIDTH is not set
626# CONFIG_USB_DYNAMIC_MINORS is not set 643# CONFIG_USB_DYNAMIC_MINORS is not set
627# CONFIG_USB_OTG is not set 644# CONFIG_USB_OTG is not set
628CONFIG_USB_ARCH_HAS_HCD=y
629CONFIG_USB_ARCH_HAS_OHCI=y
630 645
631# 646#
632# USB Host Controller Drivers 647# USB Host Controller Drivers
@@ -635,6 +650,8 @@ CONFIG_USB_EHCI_HCD=y
635CONFIG_USB_EHCI_SPLIT_ISO=y 650CONFIG_USB_EHCI_SPLIT_ISO=y
636CONFIG_USB_EHCI_ROOT_HUB_TT=y 651CONFIG_USB_EHCI_ROOT_HUB_TT=y
637CONFIG_USB_OHCI_HCD=y 652CONFIG_USB_OHCI_HCD=y
653# CONFIG_USB_OHCI_BIG_ENDIAN is not set
654CONFIG_USB_OHCI_LITTLE_ENDIAN=y
638CONFIG_USB_UHCI_HCD=y 655CONFIG_USB_UHCI_HCD=y
639# CONFIG_USB_SL811_HCD is not set 656# CONFIG_USB_SL811_HCD is not set
640 657
@@ -688,6 +705,7 @@ CONFIG_USB_HIDINPUT=y
688CONFIG_USB_PEGASUS=y 705CONFIG_USB_PEGASUS=y
689# CONFIG_USB_RTL8150 is not set 706# CONFIG_USB_RTL8150 is not set
690# CONFIG_USB_USBNET is not set 707# CONFIG_USB_USBNET is not set
708CONFIG_USB_MON=y
691 709
692# 710#
693# USB port drivers 711# USB port drivers
@@ -699,8 +717,10 @@ CONFIG_USB_PEGASUS=y
699CONFIG_USB_SERIAL=y 717CONFIG_USB_SERIAL=y
700# CONFIG_USB_SERIAL_CONSOLE is not set 718# CONFIG_USB_SERIAL_CONSOLE is not set
701CONFIG_USB_SERIAL_GENERIC=y 719CONFIG_USB_SERIAL_GENERIC=y
720# CONFIG_USB_SERIAL_AIRPRIME is not set
702# CONFIG_USB_SERIAL_BELKIN is not set 721# CONFIG_USB_SERIAL_BELKIN is not set
703# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set 722# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
723# CONFIG_USB_SERIAL_CP2101 is not set
704CONFIG_USB_SERIAL_CYPRESS_M8=m 724CONFIG_USB_SERIAL_CYPRESS_M8=m
705# CONFIG_USB_SERIAL_EMPEG is not set 725# CONFIG_USB_SERIAL_EMPEG is not set
706# CONFIG_USB_SERIAL_FTDI_SIO is not set 726# CONFIG_USB_SERIAL_FTDI_SIO is not set
@@ -729,6 +749,7 @@ CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
729# CONFIG_USB_SERIAL_KOBIL_SCT is not set 749# CONFIG_USB_SERIAL_KOBIL_SCT is not set
730# CONFIG_USB_SERIAL_MCT_U232 is not set 750# CONFIG_USB_SERIAL_MCT_U232 is not set
731# CONFIG_USB_SERIAL_PL2303 is not set 751# CONFIG_USB_SERIAL_PL2303 is not set
752# CONFIG_USB_SERIAL_HP4X is not set
732# CONFIG_USB_SERIAL_SAFE is not set 753# CONFIG_USB_SERIAL_SAFE is not set
733CONFIG_USB_SERIAL_TI=m 754CONFIG_USB_SERIAL_TI=m
734# CONFIG_USB_SERIAL_CYBERJACK is not set 755# CONFIG_USB_SERIAL_CYBERJACK is not set
@@ -750,6 +771,7 @@ CONFIG_USB_EZUSB=y
750# CONFIG_USB_PHIDGETKIT is not set 771# CONFIG_USB_PHIDGETKIT is not set
751# CONFIG_USB_PHIDGETSERVO is not set 772# CONFIG_USB_PHIDGETSERVO is not set
752# CONFIG_USB_IDMOUSE is not set 773# CONFIG_USB_IDMOUSE is not set
774# CONFIG_USB_SISUSBVGA is not set
753# CONFIG_USB_TEST is not set 775# CONFIG_USB_TEST is not set
754 776
755# 777#
@@ -936,10 +958,13 @@ CONFIG_NLS_UTF8=y
936# 958#
937# Kernel hacking 959# Kernel hacking
938# 960#
961# CONFIG_PRINTK_TIME is not set
939CONFIG_DEBUG_KERNEL=y 962CONFIG_DEBUG_KERNEL=y
940CONFIG_MAGIC_SYSRQ=y 963CONFIG_MAGIC_SYSRQ=y
964CONFIG_LOG_BUF_SHIFT=17
941# CONFIG_SCHEDSTATS is not set 965# CONFIG_SCHEDSTATS is not set
942CONFIG_DEBUG_SLAB=y 966CONFIG_DEBUG_SLAB=y
967# CONFIG_DEBUG_SPINLOCK is not set
943CONFIG_DEBUG_SPINLOCK_SLEEP=y 968CONFIG_DEBUG_SPINLOCK_SLEEP=y
944# CONFIG_DEBUG_KOBJECT is not set 969# CONFIG_DEBUG_KOBJECT is not set
945# CONFIG_DEBUG_INFO is not set 970# CONFIG_DEBUG_INFO is not set
@@ -971,6 +996,7 @@ CONFIG_CRYPTO_MD5=y
971# CONFIG_CRYPTO_SHA256 is not set 996# CONFIG_CRYPTO_SHA256 is not set
972# CONFIG_CRYPTO_SHA512 is not set 997# CONFIG_CRYPTO_SHA512 is not set
973# CONFIG_CRYPTO_WP512 is not set 998# CONFIG_CRYPTO_WP512 is not set
999# CONFIG_CRYPTO_TGR192 is not set
974CONFIG_CRYPTO_DES=y 1000CONFIG_CRYPTO_DES=y
975# CONFIG_CRYPTO_BLOWFISH is not set 1001# CONFIG_CRYPTO_BLOWFISH is not set
976# CONFIG_CRYPTO_TWOFISH is not set 1002# CONFIG_CRYPTO_TWOFISH is not set
diff --git a/arch/ppc64/configs/pSeries_defconfig b/arch/ppc64/configs/pSeries_defconfig
index 4fecf237d5c9..3eb5ef25d3a3 100644
--- a/arch/ppc64/configs/pSeries_defconfig
+++ b/arch/ppc64/configs/pSeries_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.11-rc3-bk6 3# Linux kernel version: 2.6.12-rc6
4# Wed Feb 9 23:34:54 2005 4# Tue Jun 14 17:13:47 2005
5# 5#
6CONFIG_64BIT=y 6CONFIG_64BIT=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -11,7 +11,7 @@ CONFIG_GENERIC_ISA_DMA=y
11CONFIG_HAVE_DEC_LOCK=y 11CONFIG_HAVE_DEC_LOCK=y
12CONFIG_EARLY_PRINTK=y 12CONFIG_EARLY_PRINTK=y
13CONFIG_COMPAT=y 13CONFIG_COMPAT=y
14CONFIG_FRAME_POINTER=y 14CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
15CONFIG_FORCE_MAX_ZONEORDER=13 15CONFIG_FORCE_MAX_ZONEORDER=13
16 16
17# 17#
@@ -20,6 +20,7 @@ CONFIG_FORCE_MAX_ZONEORDER=13
20CONFIG_EXPERIMENTAL=y 20CONFIG_EXPERIMENTAL=y
21CONFIG_CLEAN_COMPILE=y 21CONFIG_CLEAN_COMPILE=y
22CONFIG_LOCK_KERNEL=y 22CONFIG_LOCK_KERNEL=y
23CONFIG_INIT_ENV_ARG_LIMIT=32
23 24
24# 25#
25# General setup 26# General setup
@@ -30,24 +31,29 @@ CONFIG_SYSVIPC=y
30CONFIG_POSIX_MQUEUE=y 31CONFIG_POSIX_MQUEUE=y
31# CONFIG_BSD_PROCESS_ACCT is not set 32# CONFIG_BSD_PROCESS_ACCT is not set
32CONFIG_SYSCTL=y 33CONFIG_SYSCTL=y
33CONFIG_LOG_BUF_SHIFT=17 34CONFIG_AUDIT=y
35CONFIG_AUDITSYSCALL=y
34CONFIG_HOTPLUG=y 36CONFIG_HOTPLUG=y
35CONFIG_KOBJECT_UEVENT=y 37CONFIG_KOBJECT_UEVENT=y
36CONFIG_IKCONFIG=y 38CONFIG_IKCONFIG=y
37CONFIG_IKCONFIG_PROC=y 39CONFIG_IKCONFIG_PROC=y
40CONFIG_CPUSETS=y
38# CONFIG_EMBEDDED is not set 41# CONFIG_EMBEDDED is not set
39CONFIG_KALLSYMS=y 42CONFIG_KALLSYMS=y
40CONFIG_KALLSYMS_ALL=y 43CONFIG_KALLSYMS_ALL=y
41# CONFIG_KALLSYMS_EXTRA_PASS is not set 44# CONFIG_KALLSYMS_EXTRA_PASS is not set
45CONFIG_PRINTK=y
46CONFIG_BUG=y
47CONFIG_BASE_FULL=y
42CONFIG_FUTEX=y 48CONFIG_FUTEX=y
43CONFIG_EPOLL=y 49CONFIG_EPOLL=y
44# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
45CONFIG_SHMEM=y 50CONFIG_SHMEM=y
46CONFIG_CC_ALIGN_FUNCTIONS=0 51CONFIG_CC_ALIGN_FUNCTIONS=0
47CONFIG_CC_ALIGN_LABELS=0 52CONFIG_CC_ALIGN_LABELS=0
48CONFIG_CC_ALIGN_LOOPS=0 53CONFIG_CC_ALIGN_LOOPS=0
49CONFIG_CC_ALIGN_JUMPS=0 54CONFIG_CC_ALIGN_JUMPS=0
50# CONFIG_TINY_SHMEM is not set 55# CONFIG_TINY_SHMEM is not set
56CONFIG_BASE_SMALL=0
51 57
52# 58#
53# Loadable module support 59# Loadable module support
@@ -89,9 +95,12 @@ CONFIG_SCHED_SMT=y
89CONFIG_EEH=y 95CONFIG_EEH=y
90CONFIG_GENERIC_HARDIRQS=y 96CONFIG_GENERIC_HARDIRQS=y
91CONFIG_PPC_RTAS=y 97CONFIG_PPC_RTAS=y
98CONFIG_RTAS_PROC=y
92CONFIG_RTAS_FLASH=m 99CONFIG_RTAS_FLASH=m
93CONFIG_SCANLOG=m 100CONFIG_SCANLOG=m
94CONFIG_LPARCFG=y 101CONFIG_LPARCFG=y
102CONFIG_SECCOMP=y
103CONFIG_ISA_DMA_API=y
95 104
96# 105#
97# General setup 106# General setup
@@ -102,6 +111,7 @@ CONFIG_BINFMT_ELF=y
102# CONFIG_BINFMT_MISC is not set 111# CONFIG_BINFMT_MISC is not set
103CONFIG_PCI_LEGACY_PROC=y 112CONFIG_PCI_LEGACY_PROC=y
104CONFIG_PCI_NAMES=y 113CONFIG_PCI_NAMES=y
114# CONFIG_PCI_DEBUG is not set
105CONFIG_HOTPLUG_CPU=y 115CONFIG_HOTPLUG_CPU=y
106 116
107# 117#
@@ -110,10 +120,6 @@ CONFIG_HOTPLUG_CPU=y
110# CONFIG_PCCARD is not set 120# CONFIG_PCCARD is not set
111 121
112# 122#
113# PC-card bridges
114#
115
116#
117# PCI Hotplug Support 123# PCI Hotplug Support
118# 124#
119CONFIG_HOTPLUG_PCI=m 125CONFIG_HOTPLUG_PCI=m
@@ -147,11 +153,10 @@ CONFIG_FW_LOADER=y
147# 153#
148CONFIG_PARPORT=m 154CONFIG_PARPORT=m
149CONFIG_PARPORT_PC=m 155CONFIG_PARPORT_PC=m
150CONFIG_PARPORT_PC_CML1=m
151# CONFIG_PARPORT_SERIAL is not set 156# CONFIG_PARPORT_SERIAL is not set
152# CONFIG_PARPORT_PC_FIFO is not set 157# CONFIG_PARPORT_PC_FIFO is not set
153# CONFIG_PARPORT_PC_SUPERIO is not set 158# CONFIG_PARPORT_PC_SUPERIO is not set
154# CONFIG_PARPORT_OTHER is not set 159# CONFIG_PARPORT_GSC is not set
155# CONFIG_PARPORT_1284 is not set 160# CONFIG_PARPORT_1284 is not set
156 161
157# 162#
@@ -293,7 +298,6 @@ CONFIG_SCSI_ISCSI_ATTRS=m
293# CONFIG_SCSI_BUSLOGIC is not set 298# CONFIG_SCSI_BUSLOGIC is not set
294# CONFIG_SCSI_DMX3191D is not set 299# CONFIG_SCSI_DMX3191D is not set
295# CONFIG_SCSI_EATA is not set 300# CONFIG_SCSI_EATA is not set
296# CONFIG_SCSI_EATA_PIO is not set
297# CONFIG_SCSI_FUTURE_DOMAIN is not set 301# CONFIG_SCSI_FUTURE_DOMAIN is not set
298# CONFIG_SCSI_GDTH is not set 302# CONFIG_SCSI_GDTH is not set
299# CONFIG_SCSI_IPS is not set 303# CONFIG_SCSI_IPS is not set
@@ -310,7 +314,6 @@ CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
310CONFIG_SCSI_IPR=y 314CONFIG_SCSI_IPR=y
311CONFIG_SCSI_IPR_TRACE=y 315CONFIG_SCSI_IPR_TRACE=y
312CONFIG_SCSI_IPR_DUMP=y 316CONFIG_SCSI_IPR_DUMP=y
313# CONFIG_SCSI_QLOGIC_ISP is not set
314# CONFIG_SCSI_QLOGIC_FC is not set 317# CONFIG_SCSI_QLOGIC_FC is not set
315# CONFIG_SCSI_QLOGIC_1280 is not set 318# CONFIG_SCSI_QLOGIC_1280 is not set
316CONFIG_SCSI_QLA2XXX=y 319CONFIG_SCSI_QLA2XXX=y
@@ -319,6 +322,7 @@ CONFIG_SCSI_QLA22XX=m
319CONFIG_SCSI_QLA2300=m 322CONFIG_SCSI_QLA2300=m
320CONFIG_SCSI_QLA2322=m 323CONFIG_SCSI_QLA2322=m
321CONFIG_SCSI_QLA6312=m 324CONFIG_SCSI_QLA6312=m
325CONFIG_SCSI_LPFC=m
322# CONFIG_SCSI_DC395x is not set 326# CONFIG_SCSI_DC395x is not set
323# CONFIG_SCSI_DC390T is not set 327# CONFIG_SCSI_DC390T is not set
324# CONFIG_SCSI_DEBUG is not set 328# CONFIG_SCSI_DEBUG is not set
@@ -341,6 +345,8 @@ CONFIG_DM_CRYPT=m
341CONFIG_DM_SNAPSHOT=m 345CONFIG_DM_SNAPSHOT=m
342CONFIG_DM_MIRROR=m 346CONFIG_DM_MIRROR=m
343CONFIG_DM_ZERO=m 347CONFIG_DM_ZERO=m
348CONFIG_DM_MULTIPATH=m
349CONFIG_DM_MULTIPATH_EMC=m
344 350
345# 351#
346# Fusion MPT device support 352# Fusion MPT device support
@@ -371,7 +377,6 @@ CONFIG_NET=y
371# 377#
372CONFIG_PACKET=y 378CONFIG_PACKET=y
373# CONFIG_PACKET_MMAP is not set 379# CONFIG_PACKET_MMAP is not set
374# CONFIG_NETLINK_DEV is not set
375CONFIG_UNIX=y 380CONFIG_UNIX=y
376CONFIG_NET_KEY=m 381CONFIG_NET_KEY=m
377CONFIG_INET=y 382CONFIG_INET=y
@@ -539,7 +544,6 @@ CONFIG_PCNET32=y
539# CONFIG_DGRS is not set 544# CONFIG_DGRS is not set
540# CONFIG_EEPRO100 is not set 545# CONFIG_EEPRO100 is not set
541CONFIG_E100=y 546CONFIG_E100=y
542# CONFIG_E100_NAPI is not set
543# CONFIG_FEALNX is not set 547# CONFIG_FEALNX is not set
544# CONFIG_NATSEMI is not set 548# CONFIG_NATSEMI is not set
545# CONFIG_NE2K_PCI is not set 549# CONFIG_NE2K_PCI is not set
@@ -565,6 +569,8 @@ CONFIG_E1000=y
565# CONFIG_SK98LIN is not set 569# CONFIG_SK98LIN is not set
566# CONFIG_VIA_VELOCITY is not set 570# CONFIG_VIA_VELOCITY is not set
567CONFIG_TIGON3=y 571CONFIG_TIGON3=y
572# CONFIG_BNX2 is not set
573# CONFIG_MV643XX_ETH is not set
568 574
569# 575#
570# Ethernet (10000 Mbit) 576# Ethernet (10000 Mbit)
@@ -636,20 +642,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
636# CONFIG_INPUT_EVBUG is not set 642# CONFIG_INPUT_EVBUG is not set
637 643
638# 644#
639# Input I/O drivers
640#
641# CONFIG_GAMEPORT is not set
642CONFIG_SOUND_GAMEPORT=y
643CONFIG_SERIO=y
644CONFIG_SERIO_I8042=y
645# CONFIG_SERIO_SERPORT is not set
646# CONFIG_SERIO_CT82C710 is not set
647# CONFIG_SERIO_PARKBD is not set
648# CONFIG_SERIO_PCIPS2 is not set
649CONFIG_SERIO_LIBPS2=y
650# CONFIG_SERIO_RAW is not set
651
652#
653# Input Device Drivers 645# Input Device Drivers
654# 646#
655CONFIG_INPUT_KEYBOARD=y 647CONFIG_INPUT_KEYBOARD=y
@@ -669,6 +661,18 @@ CONFIG_INPUT_PCSPKR=m
669# CONFIG_INPUT_UINPUT is not set 661# CONFIG_INPUT_UINPUT is not set
670 662
671# 663#
664# Hardware I/O ports
665#
666CONFIG_SERIO=y
667CONFIG_SERIO_I8042=y
668# CONFIG_SERIO_SERPORT is not set
669# CONFIG_SERIO_PARKBD is not set
670# CONFIG_SERIO_PCIPS2 is not set
671CONFIG_SERIO_LIBPS2=y
672# CONFIG_SERIO_RAW is not set
673# CONFIG_GAMEPORT is not set
674
675#
672# Character devices 676# Character devices
673# 677#
674CONFIG_VT=y 678CONFIG_VT=y
@@ -689,8 +693,8 @@ CONFIG_SERIAL_8250_NR_UARTS=4
689# 693#
690CONFIG_SERIAL_CORE=y 694CONFIG_SERIAL_CORE=y
691CONFIG_SERIAL_CORE_CONSOLE=y 695CONFIG_SERIAL_CORE_CONSOLE=y
692# CONFIG_SERIAL_PMACZILOG is not set
693CONFIG_SERIAL_ICOM=m 696CONFIG_SERIAL_ICOM=m
697# CONFIG_SERIAL_JSM is not set
694CONFIG_UNIX98_PTYS=y 698CONFIG_UNIX98_PTYS=y
695CONFIG_LEGACY_PTYS=y 699CONFIG_LEGACY_PTYS=y
696CONFIG_LEGACY_PTY_COUNT=256 700CONFIG_LEGACY_PTY_COUNT=256
@@ -718,9 +722,16 @@ CONFIG_HVCS=m
718# 722#
719# Ftape, the floppy tape device driver 723# Ftape, the floppy tape device driver
720# 724#
725# CONFIG_AGP is not set
721# CONFIG_DRM is not set 726# CONFIG_DRM is not set
722CONFIG_RAW_DRIVER=y 727CONFIG_RAW_DRIVER=y
723CONFIG_MAX_RAW_DEVS=1024 728CONFIG_MAX_RAW_DEVS=1024
729# CONFIG_HANGCHECK_TIMER is not set
730
731#
732# TPM devices
733#
734# CONFIG_TCG_TPM is not set
724 735
725# 736#
726# I2C support 737# I2C support
@@ -745,8 +756,8 @@ CONFIG_I2C_ALGOBIT=y
745# CONFIG_I2C_AMD8111 is not set 756# CONFIG_I2C_AMD8111 is not set
746# CONFIG_I2C_I801 is not set 757# CONFIG_I2C_I801 is not set
747# CONFIG_I2C_I810 is not set 758# CONFIG_I2C_I810 is not set
759# CONFIG_I2C_PIIX4 is not set
748# CONFIG_I2C_ISA is not set 760# CONFIG_I2C_ISA is not set
749# CONFIG_I2C_MPC is not set
750# CONFIG_I2C_NFORCE2 is not set 761# CONFIG_I2C_NFORCE2 is not set
751# CONFIG_I2C_PARPORT is not set 762# CONFIG_I2C_PARPORT is not set
752# CONFIG_I2C_PARPORT_LIGHT is not set 763# CONFIG_I2C_PARPORT_LIGHT is not set
@@ -773,7 +784,9 @@ CONFIG_I2C_ALGOBIT=y
773# CONFIG_SENSORS_ASB100 is not set 784# CONFIG_SENSORS_ASB100 is not set
774# CONFIG_SENSORS_DS1621 is not set 785# CONFIG_SENSORS_DS1621 is not set
775# CONFIG_SENSORS_FSCHER is not set 786# CONFIG_SENSORS_FSCHER is not set
787# CONFIG_SENSORS_FSCPOS is not set
776# CONFIG_SENSORS_GL518SM is not set 788# CONFIG_SENSORS_GL518SM is not set
789# CONFIG_SENSORS_GL520SM is not set
777# CONFIG_SENSORS_IT87 is not set 790# CONFIG_SENSORS_IT87 is not set
778# CONFIG_SENSORS_LM63 is not set 791# CONFIG_SENSORS_LM63 is not set
779# CONFIG_SENSORS_LM75 is not set 792# CONFIG_SENSORS_LM75 is not set
@@ -784,9 +797,11 @@ CONFIG_I2C_ALGOBIT=y
784# CONFIG_SENSORS_LM85 is not set 797# CONFIG_SENSORS_LM85 is not set
785# CONFIG_SENSORS_LM87 is not set 798# CONFIG_SENSORS_LM87 is not set
786# CONFIG_SENSORS_LM90 is not set 799# CONFIG_SENSORS_LM90 is not set
800# CONFIG_SENSORS_LM92 is not set
787# CONFIG_SENSORS_MAX1619 is not set 801# CONFIG_SENSORS_MAX1619 is not set
788# CONFIG_SENSORS_PC87360 is not set 802# CONFIG_SENSORS_PC87360 is not set
789# CONFIG_SENSORS_SMSC47B397 is not set 803# CONFIG_SENSORS_SMSC47B397 is not set
804# CONFIG_SENSORS_SIS5595 is not set
790# CONFIG_SENSORS_SMSC47M1 is not set 805# CONFIG_SENSORS_SMSC47M1 is not set
791# CONFIG_SENSORS_VIA686A is not set 806# CONFIG_SENSORS_VIA686A is not set
792# CONFIG_SENSORS_W83781D is not set 807# CONFIG_SENSORS_W83781D is not set
@@ -796,6 +811,7 @@ CONFIG_I2C_ALGOBIT=y
796# 811#
797# Other I2C Chip support 812# Other I2C Chip support
798# 813#
814# CONFIG_SENSORS_DS1337 is not set
799# CONFIG_SENSORS_EEPROM is not set 815# CONFIG_SENSORS_EEPROM is not set
800# CONFIG_SENSORS_PCF8574 is not set 816# CONFIG_SENSORS_PCF8574 is not set
801# CONFIG_SENSORS_PCF8591 is not set 817# CONFIG_SENSORS_PCF8591 is not set
@@ -828,8 +844,13 @@ CONFIG_I2C_ALGOBIT=y
828# Graphics support 844# Graphics support
829# 845#
830CONFIG_FB=y 846CONFIG_FB=y
847CONFIG_FB_CFB_FILLRECT=y
848CONFIG_FB_CFB_COPYAREA=y
849CONFIG_FB_CFB_IMAGEBLIT=y
850CONFIG_FB_SOFT_CURSOR=y
851CONFIG_FB_MACMODES=y
831CONFIG_FB_MODE_HELPERS=y 852CONFIG_FB_MODE_HELPERS=y
832# CONFIG_FB_TILEBLITTING is not set 853CONFIG_FB_TILEBLITTING=y
833# CONFIG_FB_CIRRUS is not set 854# CONFIG_FB_CIRRUS is not set
834# CONFIG_FB_PM2 is not set 855# CONFIG_FB_PM2 is not set
835# CONFIG_FB_CYBER2000 is not set 856# CONFIG_FB_CYBER2000 is not set
@@ -838,6 +859,7 @@ CONFIG_FB_OF=y
838# CONFIG_FB_ASILIANT is not set 859# CONFIG_FB_ASILIANT is not set
839# CONFIG_FB_IMSTT is not set 860# CONFIG_FB_IMSTT is not set
840# CONFIG_FB_VGA16 is not set 861# CONFIG_FB_VGA16 is not set
862# CONFIG_FB_NVIDIA is not set
841# CONFIG_FB_RIVA is not set 863# CONFIG_FB_RIVA is not set
842CONFIG_FB_MATROX=y 864CONFIG_FB_MATROX=y
843CONFIG_FB_MATROX_MILLENIUM=y 865CONFIG_FB_MATROX_MILLENIUM=y
@@ -858,6 +880,7 @@ CONFIG_FB_RADEON_I2C=y
858# CONFIG_FB_3DFX is not set 880# CONFIG_FB_3DFX is not set
859# CONFIG_FB_VOODOO1 is not set 881# CONFIG_FB_VOODOO1 is not set
860# CONFIG_FB_TRIDENT is not set 882# CONFIG_FB_TRIDENT is not set
883# CONFIG_FB_S1D13XXX is not set
861# CONFIG_FB_VIRTUAL is not set 884# CONFIG_FB_VIRTUAL is not set
862 885
863# 886#
@@ -891,6 +914,8 @@ CONFIG_LCD_DEVICE=y
891# 914#
892# USB support 915# USB support
893# 916#
917CONFIG_USB_ARCH_HAS_HCD=y
918CONFIG_USB_ARCH_HAS_OHCI=y
894CONFIG_USB=y 919CONFIG_USB=y
895# CONFIG_USB_DEBUG is not set 920# CONFIG_USB_DEBUG is not set
896 921
@@ -901,8 +926,6 @@ CONFIG_USB_DEVICEFS=y
901# CONFIG_USB_BANDWIDTH is not set 926# CONFIG_USB_BANDWIDTH is not set
902# CONFIG_USB_DYNAMIC_MINORS is not set 927# CONFIG_USB_DYNAMIC_MINORS is not set
903# CONFIG_USB_OTG is not set 928# CONFIG_USB_OTG is not set
904CONFIG_USB_ARCH_HAS_HCD=y
905CONFIG_USB_ARCH_HAS_OHCI=y
906 929
907# 930#
908# USB Host Controller Drivers 931# USB Host Controller Drivers
@@ -911,6 +934,8 @@ CONFIG_USB_EHCI_HCD=y
911# CONFIG_USB_EHCI_SPLIT_ISO is not set 934# CONFIG_USB_EHCI_SPLIT_ISO is not set
912# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 935# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
913CONFIG_USB_OHCI_HCD=y 936CONFIG_USB_OHCI_HCD=y
937# CONFIG_USB_OHCI_BIG_ENDIAN is not set
938CONFIG_USB_OHCI_LITTLE_ENDIAN=y
914# CONFIG_USB_UHCI_HCD is not set 939# CONFIG_USB_UHCI_HCD is not set
915# CONFIG_USB_SL811_HCD is not set 940# CONFIG_USB_SL811_HCD is not set
916 941
@@ -926,12 +951,11 @@ CONFIG_USB_OHCI_HCD=y
926# 951#
927CONFIG_USB_STORAGE=y 952CONFIG_USB_STORAGE=y
928# CONFIG_USB_STORAGE_DEBUG is not set 953# CONFIG_USB_STORAGE_DEBUG is not set
929# CONFIG_USB_STORAGE_RW_DETECT is not set
930# CONFIG_USB_STORAGE_DATAFAB is not set 954# CONFIG_USB_STORAGE_DATAFAB is not set
931# CONFIG_USB_STORAGE_FREECOM is not set 955# CONFIG_USB_STORAGE_FREECOM is not set
932# CONFIG_USB_STORAGE_ISD200 is not set 956# CONFIG_USB_STORAGE_ISD200 is not set
933# CONFIG_USB_STORAGE_DPCM is not set 957# CONFIG_USB_STORAGE_DPCM is not set
934# CONFIG_USB_STORAGE_HP8200e is not set 958# CONFIG_USB_STORAGE_USBAT is not set
935# CONFIG_USB_STORAGE_SDDR09 is not set 959# CONFIG_USB_STORAGE_SDDR09 is not set
936# CONFIG_USB_STORAGE_SDDR55 is not set 960# CONFIG_USB_STORAGE_SDDR55 is not set
937# CONFIG_USB_STORAGE_JUMPSHOT is not set 961# CONFIG_USB_STORAGE_JUMPSHOT is not set
@@ -975,6 +999,7 @@ CONFIG_USB_HIDDEV=y
975# CONFIG_USB_PEGASUS is not set 999# CONFIG_USB_PEGASUS is not set
976# CONFIG_USB_RTL8150 is not set 1000# CONFIG_USB_RTL8150 is not set
977# CONFIG_USB_USBNET is not set 1001# CONFIG_USB_USBNET is not set
1002CONFIG_USB_MON=y
978 1003
979# 1004#
980# USB port drivers 1005# USB port drivers
@@ -1000,6 +1025,7 @@ CONFIG_USB_HIDDEV=y
1000# CONFIG_USB_PHIDGETKIT is not set 1025# CONFIG_USB_PHIDGETKIT is not set
1001# CONFIG_USB_PHIDGETSERVO is not set 1026# CONFIG_USB_PHIDGETSERVO is not set
1002# CONFIG_USB_IDMOUSE is not set 1027# CONFIG_USB_IDMOUSE is not set
1028# CONFIG_USB_SISUSBVGA is not set
1003# CONFIG_USB_TEST is not set 1029# CONFIG_USB_TEST is not set
1004 1030
1005# 1031#
@@ -1208,10 +1234,13 @@ CONFIG_OPROFILE=y
1208# 1234#
1209# Kernel hacking 1235# Kernel hacking
1210# 1236#
1237# CONFIG_PRINTK_TIME is not set
1211CONFIG_DEBUG_KERNEL=y 1238CONFIG_DEBUG_KERNEL=y
1212CONFIG_MAGIC_SYSRQ=y 1239CONFIG_MAGIC_SYSRQ=y
1240CONFIG_LOG_BUF_SHIFT=17
1213# CONFIG_SCHEDSTATS is not set 1241# CONFIG_SCHEDSTATS is not set
1214# CONFIG_DEBUG_SLAB is not set 1242# CONFIG_DEBUG_SLAB is not set
1243# CONFIG_DEBUG_SPINLOCK is not set
1215# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1244# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1216# CONFIG_DEBUG_KOBJECT is not set 1245# CONFIG_DEBUG_KOBJECT is not set
1217# CONFIG_DEBUG_INFO is not set 1246# CONFIG_DEBUG_INFO is not set
@@ -1243,6 +1272,7 @@ CONFIG_CRYPTO_SHA1=m
1243CONFIG_CRYPTO_SHA256=m 1272CONFIG_CRYPTO_SHA256=m
1244CONFIG_CRYPTO_SHA512=m 1273CONFIG_CRYPTO_SHA512=m
1245CONFIG_CRYPTO_WP512=m 1274CONFIG_CRYPTO_WP512=m
1275CONFIG_CRYPTO_TGR192=m
1246CONFIG_CRYPTO_DES=y 1276CONFIG_CRYPTO_DES=y
1247CONFIG_CRYPTO_BLOWFISH=m 1277CONFIG_CRYPTO_BLOWFISH=m
1248CONFIG_CRYPTO_TWOFISH=m 1278CONFIG_CRYPTO_TWOFISH=m
diff --git a/arch/ppc64/defconfig b/arch/ppc64/defconfig
index 537b1cc82eab..2f31bf3046f9 100644
--- a/arch/ppc64/defconfig
+++ b/arch/ppc64/defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.11-rc3-bk6 3# Linux kernel version: 2.6.12-rc5-git9
4# Wed Feb 9 23:34:51 2005 4# Sun Jun 5 09:26:47 2005
5# 5#
6CONFIG_64BIT=y 6CONFIG_64BIT=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -11,7 +11,7 @@ CONFIG_GENERIC_ISA_DMA=y
11CONFIG_HAVE_DEC_LOCK=y 11CONFIG_HAVE_DEC_LOCK=y
12CONFIG_EARLY_PRINTK=y 12CONFIG_EARLY_PRINTK=y
13CONFIG_COMPAT=y 13CONFIG_COMPAT=y
14CONFIG_FRAME_POINTER=y 14CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
15CONFIG_FORCE_MAX_ZONEORDER=13 15CONFIG_FORCE_MAX_ZONEORDER=13
16 16
17# 17#
@@ -20,6 +20,7 @@ CONFIG_FORCE_MAX_ZONEORDER=13
20CONFIG_EXPERIMENTAL=y 20CONFIG_EXPERIMENTAL=y
21CONFIG_CLEAN_COMPILE=y 21CONFIG_CLEAN_COMPILE=y
22CONFIG_LOCK_KERNEL=y 22CONFIG_LOCK_KERNEL=y
23CONFIG_INIT_ENV_ARG_LIMIT=32
23 24
24# 25#
25# General setup 26# General setup
@@ -30,24 +31,28 @@ CONFIG_SYSVIPC=y
30CONFIG_POSIX_MQUEUE=y 31CONFIG_POSIX_MQUEUE=y
31# CONFIG_BSD_PROCESS_ACCT is not set 32# CONFIG_BSD_PROCESS_ACCT is not set
32CONFIG_SYSCTL=y 33CONFIG_SYSCTL=y
33CONFIG_LOG_BUF_SHIFT=17 34# CONFIG_AUDIT is not set
34CONFIG_HOTPLUG=y 35CONFIG_HOTPLUG=y
35CONFIG_KOBJECT_UEVENT=y 36CONFIG_KOBJECT_UEVENT=y
36CONFIG_IKCONFIG=y 37CONFIG_IKCONFIG=y
37CONFIG_IKCONFIG_PROC=y 38CONFIG_IKCONFIG_PROC=y
39CONFIG_CPUSETS=y
38# CONFIG_EMBEDDED is not set 40# CONFIG_EMBEDDED is not set
39CONFIG_KALLSYMS=y 41CONFIG_KALLSYMS=y
40# CONFIG_KALLSYMS_ALL is not set 42# CONFIG_KALLSYMS_ALL is not set
41# CONFIG_KALLSYMS_EXTRA_PASS is not set 43# CONFIG_KALLSYMS_EXTRA_PASS is not set
44CONFIG_PRINTK=y
45CONFIG_BUG=y
46CONFIG_BASE_FULL=y
42CONFIG_FUTEX=y 47CONFIG_FUTEX=y
43CONFIG_EPOLL=y 48CONFIG_EPOLL=y
44# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
45CONFIG_SHMEM=y 49CONFIG_SHMEM=y
46CONFIG_CC_ALIGN_FUNCTIONS=0 50CONFIG_CC_ALIGN_FUNCTIONS=0
47CONFIG_CC_ALIGN_LABELS=0 51CONFIG_CC_ALIGN_LABELS=0
48CONFIG_CC_ALIGN_LOOPS=0 52CONFIG_CC_ALIGN_LOOPS=0
49CONFIG_CC_ALIGN_JUMPS=0 53CONFIG_CC_ALIGN_JUMPS=0
50# CONFIG_TINY_SHMEM is not set 54# CONFIG_TINY_SHMEM is not set
55CONFIG_BASE_SMALL=0
51 56
52# 57#
53# Loadable module support 58# Loadable module support
@@ -91,9 +96,12 @@ CONFIG_DISCONTIGMEM=y
91CONFIG_EEH=y 96CONFIG_EEH=y
92CONFIG_GENERIC_HARDIRQS=y 97CONFIG_GENERIC_HARDIRQS=y
93CONFIG_PPC_RTAS=y 98CONFIG_PPC_RTAS=y
99CONFIG_RTAS_PROC=y
94CONFIG_RTAS_FLASH=m 100CONFIG_RTAS_FLASH=m
95CONFIG_SCANLOG=m 101CONFIG_SCANLOG=m
96CONFIG_LPARCFG=y 102CONFIG_LPARCFG=y
103CONFIG_SECCOMP=y
104CONFIG_ISA_DMA_API=y
97 105
98# 106#
99# General setup 107# General setup
@@ -104,6 +112,7 @@ CONFIG_BINFMT_ELF=y
104CONFIG_BINFMT_MISC=m 112CONFIG_BINFMT_MISC=m
105# CONFIG_PCI_LEGACY_PROC is not set 113# CONFIG_PCI_LEGACY_PROC is not set
106# CONFIG_PCI_NAMES is not set 114# CONFIG_PCI_NAMES is not set
115# CONFIG_PCI_DEBUG is not set
107CONFIG_HOTPLUG_CPU=y 116CONFIG_HOTPLUG_CPU=y
108 117
109# 118#
@@ -112,10 +121,6 @@ CONFIG_HOTPLUG_CPU=y
112# CONFIG_PCCARD is not set 121# CONFIG_PCCARD is not set
113 122
114# 123#
115# PC-card bridges
116#
117
118#
119# PCI Hotplug Support 124# PCI Hotplug Support
120# 125#
121CONFIG_HOTPLUG_PCI=m 126CONFIG_HOTPLUG_PCI=m
@@ -149,11 +154,10 @@ CONFIG_FW_LOADER=y
149# 154#
150CONFIG_PARPORT=m 155CONFIG_PARPORT=m
151CONFIG_PARPORT_PC=m 156CONFIG_PARPORT_PC=m
152CONFIG_PARPORT_PC_CML1=m
153# CONFIG_PARPORT_SERIAL is not set 157# CONFIG_PARPORT_SERIAL is not set
154# CONFIG_PARPORT_PC_FIFO is not set 158# CONFIG_PARPORT_PC_FIFO is not set
155# CONFIG_PARPORT_PC_SUPERIO is not set 159# CONFIG_PARPORT_PC_SUPERIO is not set
156# CONFIG_PARPORT_OTHER is not set 160# CONFIG_PARPORT_GSC is not set
157# CONFIG_PARPORT_1284 is not set 161# CONFIG_PARPORT_1284 is not set
158 162
159# 163#
@@ -301,6 +305,7 @@ CONFIG_SCSI_SATA_SVW=y
301# CONFIG_SCSI_ATA_PIIX is not set 305# CONFIG_SCSI_ATA_PIIX is not set
302# CONFIG_SCSI_SATA_NV is not set 306# CONFIG_SCSI_SATA_NV is not set
303# CONFIG_SCSI_SATA_PROMISE is not set 307# CONFIG_SCSI_SATA_PROMISE is not set
308# CONFIG_SCSI_SATA_QSTOR is not set
304# CONFIG_SCSI_SATA_SX4 is not set 309# CONFIG_SCSI_SATA_SX4 is not set
305# CONFIG_SCSI_SATA_SIL is not set 310# CONFIG_SCSI_SATA_SIL is not set
306# CONFIG_SCSI_SATA_SIS is not set 311# CONFIG_SCSI_SATA_SIS is not set
@@ -310,7 +315,6 @@ CONFIG_SCSI_SATA_SVW=y
310# CONFIG_SCSI_BUSLOGIC is not set 315# CONFIG_SCSI_BUSLOGIC is not set
311# CONFIG_SCSI_DMX3191D is not set 316# CONFIG_SCSI_DMX3191D is not set
312# CONFIG_SCSI_EATA is not set 317# CONFIG_SCSI_EATA is not set
313# CONFIG_SCSI_EATA_PIO is not set
314# CONFIG_SCSI_FUTURE_DOMAIN is not set 318# CONFIG_SCSI_FUTURE_DOMAIN is not set
315# CONFIG_SCSI_GDTH is not set 319# CONFIG_SCSI_GDTH is not set
316# CONFIG_SCSI_IPS is not set 320# CONFIG_SCSI_IPS is not set
@@ -327,7 +331,6 @@ CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
327CONFIG_SCSI_IPR=y 331CONFIG_SCSI_IPR=y
328CONFIG_SCSI_IPR_TRACE=y 332CONFIG_SCSI_IPR_TRACE=y
329CONFIG_SCSI_IPR_DUMP=y 333CONFIG_SCSI_IPR_DUMP=y
330# CONFIG_SCSI_QLOGIC_ISP is not set
331# CONFIG_SCSI_QLOGIC_FC is not set 334# CONFIG_SCSI_QLOGIC_FC is not set
332# CONFIG_SCSI_QLOGIC_1280 is not set 335# CONFIG_SCSI_QLOGIC_1280 is not set
333CONFIG_SCSI_QLA2XXX=y 336CONFIG_SCSI_QLA2XXX=y
@@ -336,6 +339,7 @@ CONFIG_SCSI_QLA22XX=m
336CONFIG_SCSI_QLA2300=m 339CONFIG_SCSI_QLA2300=m
337CONFIG_SCSI_QLA2322=m 340CONFIG_SCSI_QLA2322=m
338CONFIG_SCSI_QLA6312=m 341CONFIG_SCSI_QLA6312=m
342CONFIG_SCSI_LPFC=m
339# CONFIG_SCSI_DC395x is not set 343# CONFIG_SCSI_DC395x is not set
340# CONFIG_SCSI_DC390T is not set 344# CONFIG_SCSI_DC390T is not set
341CONFIG_SCSI_DEBUG=m 345CONFIG_SCSI_DEBUG=m
@@ -358,6 +362,8 @@ CONFIG_DM_CRYPT=m
358CONFIG_DM_SNAPSHOT=m 362CONFIG_DM_SNAPSHOT=m
359CONFIG_DM_MIRROR=m 363CONFIG_DM_MIRROR=m
360CONFIG_DM_ZERO=m 364CONFIG_DM_ZERO=m
365CONFIG_DM_MULTIPATH=m
366CONFIG_DM_MULTIPATH_EMC=m
361 367
362# 368#
363# Fusion MPT device support 369# Fusion MPT device support
@@ -405,6 +411,7 @@ CONFIG_IEEE1394_AMDTP=m
405# 411#
406CONFIG_ADB=y 412CONFIG_ADB=y
407CONFIG_ADB_PMU=y 413CONFIG_ADB_PMU=y
414CONFIG_PMAC_SMU=y
408# CONFIG_PMAC_PBOOK is not set 415# CONFIG_PMAC_PBOOK is not set
409# CONFIG_PMAC_BACKLIGHT is not set 416# CONFIG_PMAC_BACKLIGHT is not set
410# CONFIG_INPUT_ADBHID is not set 417# CONFIG_INPUT_ADBHID is not set
@@ -420,7 +427,6 @@ CONFIG_NET=y
420# 427#
421CONFIG_PACKET=y 428CONFIG_PACKET=y
422# CONFIG_PACKET_MMAP is not set 429# CONFIG_PACKET_MMAP is not set
423# CONFIG_NETLINK_DEV is not set
424CONFIG_UNIX=y 430CONFIG_UNIX=y
425CONFIG_NET_KEY=m 431CONFIG_NET_KEY=m
426CONFIG_INET=y 432CONFIG_INET=y
@@ -588,7 +594,6 @@ CONFIG_PCNET32=y
588# CONFIG_DGRS is not set 594# CONFIG_DGRS is not set
589# CONFIG_EEPRO100 is not set 595# CONFIG_EEPRO100 is not set
590CONFIG_E100=y 596CONFIG_E100=y
591# CONFIG_E100_NAPI is not set
592# CONFIG_FEALNX is not set 597# CONFIG_FEALNX is not set
593# CONFIG_NATSEMI is not set 598# CONFIG_NATSEMI is not set
594# CONFIG_NE2K_PCI is not set 599# CONFIG_NE2K_PCI is not set
@@ -614,6 +619,8 @@ CONFIG_E1000=y
614# CONFIG_SK98LIN is not set 619# CONFIG_SK98LIN is not set
615# CONFIG_VIA_VELOCITY is not set 620# CONFIG_VIA_VELOCITY is not set
616CONFIG_TIGON3=y 621CONFIG_TIGON3=y
622# CONFIG_BNX2 is not set
623# CONFIG_MV643XX_ETH is not set
617 624
618# 625#
619# Ethernet (10000 Mbit) 626# Ethernet (10000 Mbit)
@@ -683,20 +690,6 @@ CONFIG_INPUT_EVDEV=m
683# CONFIG_INPUT_EVBUG is not set 690# CONFIG_INPUT_EVBUG is not set
684 691
685# 692#
686# Input I/O drivers
687#
688# CONFIG_GAMEPORT is not set
689CONFIG_SOUND_GAMEPORT=y
690CONFIG_SERIO=y
691CONFIG_SERIO_I8042=y
692# CONFIG_SERIO_SERPORT is not set
693# CONFIG_SERIO_CT82C710 is not set
694# CONFIG_SERIO_PARKBD is not set
695# CONFIG_SERIO_PCIPS2 is not set
696CONFIG_SERIO_LIBPS2=y
697# CONFIG_SERIO_RAW is not set
698
699#
700# Input Device Drivers 693# Input Device Drivers
701# 694#
702CONFIG_INPUT_KEYBOARD=y 695CONFIG_INPUT_KEYBOARD=y
@@ -716,6 +709,18 @@ CONFIG_INPUT_PCSPKR=m
716# CONFIG_INPUT_UINPUT is not set 709# CONFIG_INPUT_UINPUT is not set
717 710
718# 711#
712# Hardware I/O ports
713#
714CONFIG_SERIO=y
715CONFIG_SERIO_I8042=y
716# CONFIG_SERIO_SERPORT is not set
717# CONFIG_SERIO_PARKBD is not set
718# CONFIG_SERIO_PCIPS2 is not set
719CONFIG_SERIO_LIBPS2=y
720# CONFIG_SERIO_RAW is not set
721# CONFIG_GAMEPORT is not set
722
723#
719# Character devices 724# Character devices
720# 725#
721CONFIG_VT=y 726CONFIG_VT=y
@@ -738,6 +743,7 @@ CONFIG_SERIAL_CORE=y
738CONFIG_SERIAL_CORE_CONSOLE=y 743CONFIG_SERIAL_CORE_CONSOLE=y
739# CONFIG_SERIAL_PMACZILOG is not set 744# CONFIG_SERIAL_PMACZILOG is not set
740CONFIG_SERIAL_ICOM=m 745CONFIG_SERIAL_ICOM=m
746CONFIG_SERIAL_JSM=m
741CONFIG_UNIX98_PTYS=y 747CONFIG_UNIX98_PTYS=y
742CONFIG_LEGACY_PTYS=y 748CONFIG_LEGACY_PTYS=y
743CONFIG_LEGACY_PTY_COUNT=256 749CONFIG_LEGACY_PTY_COUNT=256
@@ -766,9 +772,16 @@ CONFIG_HVCS=m
766# 772#
767# Ftape, the floppy tape device driver 773# Ftape, the floppy tape device driver
768# 774#
775# CONFIG_AGP is not set
769# CONFIG_DRM is not set 776# CONFIG_DRM is not set
770CONFIG_RAW_DRIVER=y 777CONFIG_RAW_DRIVER=y
771CONFIG_MAX_RAW_DEVS=256 778CONFIG_MAX_RAW_DEVS=256
779# CONFIG_HANGCHECK_TIMER is not set
780
781#
782# TPM devices
783#
784# CONFIG_TCG_TPM is not set
772 785
773# 786#
774# I2C support 787# I2C support
@@ -793,9 +806,9 @@ CONFIG_I2C_ALGOBIT=y
793CONFIG_I2C_AMD8111=y 806CONFIG_I2C_AMD8111=y
794# CONFIG_I2C_I801 is not set 807# CONFIG_I2C_I801 is not set
795# CONFIG_I2C_I810 is not set 808# CONFIG_I2C_I810 is not set
809# CONFIG_I2C_PIIX4 is not set
796# CONFIG_I2C_ISA is not set 810# CONFIG_I2C_ISA is not set
797CONFIG_I2C_KEYWEST=y 811CONFIG_I2C_KEYWEST=y
798# CONFIG_I2C_MPC is not set
799# CONFIG_I2C_NFORCE2 is not set 812# CONFIG_I2C_NFORCE2 is not set
800# CONFIG_I2C_PARPORT is not set 813# CONFIG_I2C_PARPORT is not set
801# CONFIG_I2C_PARPORT_LIGHT is not set 814# CONFIG_I2C_PARPORT_LIGHT is not set
@@ -822,7 +835,9 @@ CONFIG_I2C_KEYWEST=y
822# CONFIG_SENSORS_ASB100 is not set 835# CONFIG_SENSORS_ASB100 is not set
823# CONFIG_SENSORS_DS1621 is not set 836# CONFIG_SENSORS_DS1621 is not set
824# CONFIG_SENSORS_FSCHER is not set 837# CONFIG_SENSORS_FSCHER is not set
838# CONFIG_SENSORS_FSCPOS is not set
825# CONFIG_SENSORS_GL518SM is not set 839# CONFIG_SENSORS_GL518SM is not set
840# CONFIG_SENSORS_GL520SM is not set
826# CONFIG_SENSORS_IT87 is not set 841# CONFIG_SENSORS_IT87 is not set
827# CONFIG_SENSORS_LM63 is not set 842# CONFIG_SENSORS_LM63 is not set
828# CONFIG_SENSORS_LM75 is not set 843# CONFIG_SENSORS_LM75 is not set
@@ -833,9 +848,11 @@ CONFIG_I2C_KEYWEST=y
833# CONFIG_SENSORS_LM85 is not set 848# CONFIG_SENSORS_LM85 is not set
834# CONFIG_SENSORS_LM87 is not set 849# CONFIG_SENSORS_LM87 is not set
835# CONFIG_SENSORS_LM90 is not set 850# CONFIG_SENSORS_LM90 is not set
851# CONFIG_SENSORS_LM92 is not set
836# CONFIG_SENSORS_MAX1619 is not set 852# CONFIG_SENSORS_MAX1619 is not set
837# CONFIG_SENSORS_PC87360 is not set 853# CONFIG_SENSORS_PC87360 is not set
838# CONFIG_SENSORS_SMSC47B397 is not set 854# CONFIG_SENSORS_SMSC47B397 is not set
855# CONFIG_SENSORS_SIS5595 is not set
839# CONFIG_SENSORS_SMSC47M1 is not set 856# CONFIG_SENSORS_SMSC47M1 is not set
840# CONFIG_SENSORS_VIA686A is not set 857# CONFIG_SENSORS_VIA686A is not set
841# CONFIG_SENSORS_W83781D is not set 858# CONFIG_SENSORS_W83781D is not set
@@ -845,6 +862,7 @@ CONFIG_I2C_KEYWEST=y
845# 862#
846# Other I2C Chip support 863# Other I2C Chip support
847# 864#
865# CONFIG_SENSORS_DS1337 is not set
848# CONFIG_SENSORS_EEPROM is not set 866# CONFIG_SENSORS_EEPROM is not set
849# CONFIG_SENSORS_PCF8574 is not set 867# CONFIG_SENSORS_PCF8574 is not set
850# CONFIG_SENSORS_PCF8591 is not set 868# CONFIG_SENSORS_PCF8591 is not set
@@ -877,6 +895,11 @@ CONFIG_I2C_KEYWEST=y
877# Graphics support 895# Graphics support
878# 896#
879CONFIG_FB=y 897CONFIG_FB=y
898CONFIG_FB_CFB_FILLRECT=y
899CONFIG_FB_CFB_COPYAREA=y
900CONFIG_FB_CFB_IMAGEBLIT=y
901CONFIG_FB_SOFT_CURSOR=y
902CONFIG_FB_MACMODES=y
880CONFIG_FB_MODE_HELPERS=y 903CONFIG_FB_MODE_HELPERS=y
881CONFIG_FB_TILEBLITTING=y 904CONFIG_FB_TILEBLITTING=y
882# CONFIG_FB_CIRRUS is not set 905# CONFIG_FB_CIRRUS is not set
@@ -890,9 +913,8 @@ CONFIG_FB_OF=y
890# CONFIG_FB_ASILIANT is not set 913# CONFIG_FB_ASILIANT is not set
891# CONFIG_FB_IMSTT is not set 914# CONFIG_FB_IMSTT is not set
892# CONFIG_FB_VGA16 is not set 915# CONFIG_FB_VGA16 is not set
893CONFIG_FB_RIVA=y 916# CONFIG_FB_NVIDIA is not set
894CONFIG_FB_RIVA_I2C=y 917# CONFIG_FB_RIVA is not set
895# CONFIG_FB_RIVA_DEBUG is not set
896CONFIG_FB_MATROX=y 918CONFIG_FB_MATROX=y
897CONFIG_FB_MATROX_MILLENIUM=y 919CONFIG_FB_MATROX_MILLENIUM=y
898CONFIG_FB_MATROX_MYSTIQUE=y 920CONFIG_FB_MATROX_MYSTIQUE=y
@@ -913,6 +935,7 @@ CONFIG_FB_RADEON_I2C=y
913# CONFIG_FB_3DFX is not set 935# CONFIG_FB_3DFX is not set
914# CONFIG_FB_VOODOO1 is not set 936# CONFIG_FB_VOODOO1 is not set
915# CONFIG_FB_TRIDENT is not set 937# CONFIG_FB_TRIDENT is not set
938# CONFIG_FB_S1D13XXX is not set
916# CONFIG_FB_VIRTUAL is not set 939# CONFIG_FB_VIRTUAL is not set
917 940
918# 941#
@@ -946,6 +969,8 @@ CONFIG_LCD_DEVICE=y
946# 969#
947# USB support 970# USB support
948# 971#
972CONFIG_USB_ARCH_HAS_HCD=y
973CONFIG_USB_ARCH_HAS_OHCI=y
949CONFIG_USB=y 974CONFIG_USB=y
950# CONFIG_USB_DEBUG is not set 975# CONFIG_USB_DEBUG is not set
951 976
@@ -956,8 +981,6 @@ CONFIG_USB_DEVICEFS=y
956# CONFIG_USB_BANDWIDTH is not set 981# CONFIG_USB_BANDWIDTH is not set
957# CONFIG_USB_DYNAMIC_MINORS is not set 982# CONFIG_USB_DYNAMIC_MINORS is not set
958# CONFIG_USB_OTG is not set 983# CONFIG_USB_OTG is not set
959CONFIG_USB_ARCH_HAS_HCD=y
960CONFIG_USB_ARCH_HAS_OHCI=y
961 984
962# 985#
963# USB Host Controller Drivers 986# USB Host Controller Drivers
@@ -966,6 +989,8 @@ CONFIG_USB_EHCI_HCD=y
966# CONFIG_USB_EHCI_SPLIT_ISO is not set 989# CONFIG_USB_EHCI_SPLIT_ISO is not set
967# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 990# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
968CONFIG_USB_OHCI_HCD=y 991CONFIG_USB_OHCI_HCD=y
992# CONFIG_USB_OHCI_BIG_ENDIAN is not set
993CONFIG_USB_OHCI_LITTLE_ENDIAN=y
969# CONFIG_USB_UHCI_HCD is not set 994# CONFIG_USB_UHCI_HCD is not set
970# CONFIG_USB_SL811_HCD is not set 995# CONFIG_USB_SL811_HCD is not set
971 996
@@ -981,12 +1006,11 @@ CONFIG_USB_OHCI_HCD=y
981# 1006#
982CONFIG_USB_STORAGE=m 1007CONFIG_USB_STORAGE=m
983# CONFIG_USB_STORAGE_DEBUG is not set 1008# CONFIG_USB_STORAGE_DEBUG is not set
984CONFIG_USB_STORAGE_RW_DETECT=y
985# CONFIG_USB_STORAGE_DATAFAB is not set 1009# CONFIG_USB_STORAGE_DATAFAB is not set
986# CONFIG_USB_STORAGE_FREECOM is not set 1010# CONFIG_USB_STORAGE_FREECOM is not set
987# CONFIG_USB_STORAGE_ISD200 is not set 1011# CONFIG_USB_STORAGE_ISD200 is not set
988# CONFIG_USB_STORAGE_DPCM is not set 1012# CONFIG_USB_STORAGE_DPCM is not set
989# CONFIG_USB_STORAGE_HP8200e is not set 1013# CONFIG_USB_STORAGE_USBAT is not set
990# CONFIG_USB_STORAGE_SDDR09 is not set 1014# CONFIG_USB_STORAGE_SDDR09 is not set
991# CONFIG_USB_STORAGE_SDDR55 is not set 1015# CONFIG_USB_STORAGE_SDDR55 is not set
992# CONFIG_USB_STORAGE_JUMPSHOT is not set 1016# CONFIG_USB_STORAGE_JUMPSHOT is not set
@@ -1030,6 +1054,7 @@ CONFIG_USB_HIDDEV=y
1030CONFIG_USB_PEGASUS=y 1054CONFIG_USB_PEGASUS=y
1031# CONFIG_USB_RTL8150 is not set 1055# CONFIG_USB_RTL8150 is not set
1032# CONFIG_USB_USBNET is not set 1056# CONFIG_USB_USBNET is not set
1057# CONFIG_USB_MON is not set
1033 1058
1034# 1059#
1035# USB port drivers 1060# USB port drivers
@@ -1055,6 +1080,7 @@ CONFIG_USB_PEGASUS=y
1055# CONFIG_USB_PHIDGETKIT is not set 1080# CONFIG_USB_PHIDGETKIT is not set
1056# CONFIG_USB_PHIDGETSERVO is not set 1081# CONFIG_USB_PHIDGETSERVO is not set
1057# CONFIG_USB_IDMOUSE is not set 1082# CONFIG_USB_IDMOUSE is not set
1083# CONFIG_USB_SISUSBVGA is not set
1058# CONFIG_USB_TEST is not set 1084# CONFIG_USB_TEST is not set
1059 1085
1060# 1086#
@@ -1276,10 +1302,13 @@ CONFIG_OPROFILE=y
1276# 1302#
1277# Kernel hacking 1303# Kernel hacking
1278# 1304#
1305# CONFIG_PRINTK_TIME is not set
1279CONFIG_DEBUG_KERNEL=y 1306CONFIG_DEBUG_KERNEL=y
1280CONFIG_MAGIC_SYSRQ=y 1307CONFIG_MAGIC_SYSRQ=y
1308CONFIG_LOG_BUF_SHIFT=17
1281# CONFIG_SCHEDSTATS is not set 1309# CONFIG_SCHEDSTATS is not set
1282# CONFIG_DEBUG_SLAB is not set 1310# CONFIG_DEBUG_SLAB is not set
1311# CONFIG_DEBUG_SPINLOCK is not set
1283# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1312# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1284# CONFIG_DEBUG_KOBJECT is not set 1313# CONFIG_DEBUG_KOBJECT is not set
1285# CONFIG_DEBUG_INFO is not set 1314# CONFIG_DEBUG_INFO is not set
@@ -1311,6 +1340,7 @@ CONFIG_CRYPTO_SHA1=m
1311CONFIG_CRYPTO_SHA256=m 1340CONFIG_CRYPTO_SHA256=m
1312CONFIG_CRYPTO_SHA512=m 1341CONFIG_CRYPTO_SHA512=m
1313CONFIG_CRYPTO_WP512=m 1342CONFIG_CRYPTO_WP512=m
1343CONFIG_CRYPTO_TGR192=m
1314CONFIG_CRYPTO_DES=y 1344CONFIG_CRYPTO_DES=y
1315CONFIG_CRYPTO_BLOWFISH=m 1345CONFIG_CRYPTO_BLOWFISH=m
1316CONFIG_CRYPTO_TWOFISH=m 1346CONFIG_CRYPTO_TWOFISH=m
diff --git a/arch/ppc64/kernel/kprobes.c b/arch/ppc64/kernel/kprobes.c
index 103daaf73573..e950a2058a19 100644
--- a/arch/ppc64/kernel/kprobes.c
+++ b/arch/ppc64/kernel/kprobes.c
@@ -45,12 +45,17 @@ static struct pt_regs jprobe_saved_regs;
45 45
46int arch_prepare_kprobe(struct kprobe *p) 46int arch_prepare_kprobe(struct kprobe *p)
47{ 47{
48 int ret = 0;
48 kprobe_opcode_t insn = *p->addr; 49 kprobe_opcode_t insn = *p->addr;
49 50
50 if (IS_MTMSRD(insn) || IS_RFID(insn)) 51 if ((unsigned long)p->addr & 0x03) {
51 /* cannot put bp on RFID/MTMSRD */ 52 printk("Attempt to register kprobe at an unaligned address\n");
52 return 1; 53 ret = -EINVAL;
53 return 0; 54 } else if (IS_MTMSRD(insn) || IS_RFID(insn)) {
55 printk("Cannot register a kprobe on rfid or mtmsrd\n");
56 ret = -EINVAL;
57 }
58 return ret;
54} 59}
55 60
56void arch_copy_kprobe(struct kprobe *p) 61void arch_copy_kprobe(struct kprobe *p)
@@ -172,8 +177,6 @@ static void resume_execution(struct kprobe *p, struct pt_regs *regs)
172 ret = emulate_step(regs, p->ainsn.insn[0]); 177 ret = emulate_step(regs, p->ainsn.insn[0]);
173 if (ret == 0) 178 if (ret == 0)
174 regs->nip = (unsigned long)p->addr + 4; 179 regs->nip = (unsigned long)p->addr + 4;
175
176 regs->msr &= ~MSR_SE;
177} 180}
178 181
179static inline int post_kprobe_handler(struct pt_regs *regs) 182static inline int post_kprobe_handler(struct pt_regs *regs)
@@ -210,6 +213,7 @@ static inline int kprobe_fault_handler(struct pt_regs *regs, int trapnr)
210 213
211 if (kprobe_status & KPROBE_HIT_SS) { 214 if (kprobe_status & KPROBE_HIT_SS) {
212 resume_execution(current_kprobe, regs); 215 resume_execution(current_kprobe, regs);
216 regs->msr &= ~MSR_SE;
213 regs->msr |= kprobe_saved_msr; 217 regs->msr |= kprobe_saved_msr;
214 218
215 unlock_kprobes(); 219 unlock_kprobes();
@@ -233,8 +237,6 @@ int kprobe_exceptions_notify(struct notifier_block *self, unsigned long val,
233 */ 237 */
234 preempt_disable(); 238 preempt_disable();
235 switch (val) { 239 switch (val) {
236 case DIE_IABR_MATCH:
237 case DIE_DABR_MATCH:
238 case DIE_BPT: 240 case DIE_BPT:
239 if (kprobe_handler(args->regs)) 241 if (kprobe_handler(args->regs))
240 ret = NOTIFY_STOP; 242 ret = NOTIFY_STOP;
diff --git a/arch/ppc64/kernel/misc.S b/arch/ppc64/kernel/misc.S
index b944717c1dbd..e3c73b3425dc 100644
--- a/arch/ppc64/kernel/misc.S
+++ b/arch/ppc64/kernel/misc.S
@@ -792,7 +792,7 @@ _GLOBAL(sys_call_table32)
792 .llong .compat_sys_newstat 792 .llong .compat_sys_newstat
793 .llong .compat_sys_newlstat 793 .llong .compat_sys_newlstat
794 .llong .compat_sys_newfstat 794 .llong .compat_sys_newfstat
795 .llong .sys_uname 795 .llong .sys32_uname
796 .llong .sys_ni_syscall /* 110 old iopl syscall */ 796 .llong .sys_ni_syscall /* 110 old iopl syscall */
797 .llong .sys_vhangup 797 .llong .sys_vhangup
798 .llong .sys_ni_syscall /* old idle syscall */ 798 .llong .sys_ni_syscall /* old idle syscall */
diff --git a/arch/ppc64/kernel/sys_ppc32.c b/arch/ppc64/kernel/sys_ppc32.c
index 7cf7a9600025..9c8e317c598d 100644
--- a/arch/ppc64/kernel/sys_ppc32.c
+++ b/arch/ppc64/kernel/sys_ppc32.c
@@ -791,31 +791,6 @@ asmlinkage int sys32_pciconfig_iobase(u32 which, u32 in_bus, u32 in_devfn)
791} 791}
792 792
793 793
794asmlinkage int ppc64_newuname(struct new_utsname __user * name)
795{
796 int errno = sys_newuname(name);
797
798 if (current->personality == PER_LINUX32 && !errno) {
799 if(copy_to_user(name->machine, "ppc\0\0", 8)) {
800 errno = -EFAULT;
801 }
802 }
803 return errno;
804}
805
806asmlinkage int ppc64_personality(unsigned long personality)
807{
808 int ret;
809 if (current->personality == PER_LINUX32 && personality == PER_LINUX)
810 personality = PER_LINUX32;
811 ret = sys_personality(personality);
812 if (ret == PER_LINUX32)
813 ret = PER_LINUX;
814 return ret;
815}
816
817
818
819/* Note: it is necessary to treat mode as an unsigned int, 794/* Note: it is necessary to treat mode as an unsigned int,
820 * with the corresponding cast to a signed int to insure that the 795 * with the corresponding cast to a signed int to insure that the
821 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) 796 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
@@ -1158,26 +1133,47 @@ asmlinkage long sys32_sysctl(struct __sysctl_args32 __user *args)
1158} 1133}
1159#endif 1134#endif
1160 1135
1136asmlinkage int sys32_uname(struct old_utsname __user * name)
1137{
1138 int err = 0;
1139
1140 down_read(&uts_sem);
1141 if (copy_to_user(name, &system_utsname, sizeof(*name)))
1142 err = -EFAULT;
1143 up_read(&uts_sem);
1144 if (!err && personality(current->personality) == PER_LINUX32) {
1145 /* change "ppc64" to "ppc" */
1146 if (__put_user(0, name->machine + 3)
1147 || __put_user(0, name->machine + 4))
1148 err = -EFAULT;
1149 }
1150 return err;
1151}
1152
1161asmlinkage int sys32_olduname(struct oldold_utsname __user * name) 1153asmlinkage int sys32_olduname(struct oldold_utsname __user * name)
1162{ 1154{
1163 int error; 1155 int error;
1164 1156
1165 if (!name)
1166 return -EFAULT;
1167 if (!access_ok(VERIFY_WRITE,name,sizeof(struct oldold_utsname))) 1157 if (!access_ok(VERIFY_WRITE,name,sizeof(struct oldold_utsname)))
1168 return -EFAULT; 1158 return -EFAULT;
1169 1159
1170 down_read(&uts_sem); 1160 down_read(&uts_sem);
1171 error = __copy_to_user(&name->sysname,&system_utsname.sysname,__OLD_UTS_LEN); 1161 error = __copy_to_user(&name->sysname,&system_utsname.sysname,__OLD_UTS_LEN);
1172 error -= __put_user(0,name->sysname+__OLD_UTS_LEN); 1162 error |= __put_user(0,name->sysname+__OLD_UTS_LEN);
1173 error -= __copy_to_user(&name->nodename,&system_utsname.nodename,__OLD_UTS_LEN); 1163 error |= __copy_to_user(&name->nodename,&system_utsname.nodename,__OLD_UTS_LEN);
1174 error -= __put_user(0,name->nodename+__OLD_UTS_LEN); 1164 error |= __put_user(0,name->nodename+__OLD_UTS_LEN);
1175 error -= __copy_to_user(&name->release,&system_utsname.release,__OLD_UTS_LEN); 1165 error |= __copy_to_user(&name->release,&system_utsname.release,__OLD_UTS_LEN);
1176 error -= __put_user(0,name->release+__OLD_UTS_LEN); 1166 error |= __put_user(0,name->release+__OLD_UTS_LEN);
1177 error -= __copy_to_user(&name->version,&system_utsname.version,__OLD_UTS_LEN); 1167 error |= __copy_to_user(&name->version,&system_utsname.version,__OLD_UTS_LEN);
1178 error -= __put_user(0,name->version+__OLD_UTS_LEN); 1168 error |= __put_user(0,name->version+__OLD_UTS_LEN);
1179 error -= __copy_to_user(&name->machine,&system_utsname.machine,__OLD_UTS_LEN); 1169 error |= __copy_to_user(&name->machine,&system_utsname.machine,__OLD_UTS_LEN);
1180 error = __put_user(0,name->machine+__OLD_UTS_LEN); 1170 error |= __put_user(0,name->machine+__OLD_UTS_LEN);
1171 if (personality(current->personality) == PER_LINUX32) {
1172 /* change "ppc64" to "ppc" */
1173 error |= __put_user(0, name->machine + 3);
1174 error |= __put_user(0, name->machine + 4);
1175 }
1176
1181 up_read(&uts_sem); 1177 up_read(&uts_sem);
1182 1178
1183 error = error ? -EFAULT : 0; 1179 error = error ? -EFAULT : 0;
diff --git a/arch/ppc64/kernel/syscalls.c b/arch/ppc64/kernel/syscalls.c
index f2865ff8d2f9..a8cbb202b8cd 100644
--- a/arch/ppc64/kernel/syscalls.c
+++ b/arch/ppc64/kernel/syscalls.c
@@ -199,24 +199,33 @@ out:
199 return ret; 199 return ret;
200} 200}
201 201
202static int __init set_fakeppc(char *str) 202long ppc64_personality(unsigned long personality)
203{ 203{
204 if (*str) 204 long ret;
205 return 0; 205
206 init_task.personality = PER_LINUX32; 206 if (personality(current->personality) == PER_LINUX32
207 return 1; 207 && personality == PER_LINUX)
208 personality = PER_LINUX32;
209 ret = sys_personality(personality);
210 if (ret == PER_LINUX32)
211 ret = PER_LINUX;
212 return ret;
208} 213}
209__setup("fakeppc", set_fakeppc);
210 214
211asmlinkage int sys_uname(struct old_utsname __user * name) 215long ppc64_newuname(struct new_utsname __user * name)
212{ 216{
213 int err = -EFAULT; 217 int err = 0;
214 218
215 down_read(&uts_sem); 219 down_read(&uts_sem);
216 if (name && !copy_to_user(name, &system_utsname, sizeof (*name))) 220 if (copy_to_user(name, &system_utsname, sizeof(*name)))
217 err = 0; 221 err = -EFAULT;
218 up_read(&uts_sem); 222 up_read(&uts_sem);
219 223 if (!err && personality(current->personality) == PER_LINUX32) {
224 /* change ppc64 to ppc */
225 if (__put_user(0, name->machine + 3)
226 || __put_user(0, name->machine + 4))
227 err = -EFAULT;
228 }
220 return err; 229 return err;
221} 230}
222 231
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c
index 01ae1964c938..c067435bae45 100644
--- a/arch/s390/appldata/appldata_base.c
+++ b/arch/s390/appldata/appldata_base.c
@@ -28,6 +28,7 @@
28//#include <linux/kernel_stat.h> 28//#include <linux/kernel_stat.h>
29#include <linux/notifier.h> 29#include <linux/notifier.h>
30#include <linux/cpu.h> 30#include <linux/cpu.h>
31#include <linux/workqueue.h>
31 32
32#include "appldata.h" 33#include "appldata.h"
33 34
@@ -133,9 +134,12 @@ static int appldata_interval = APPLDATA_CPU_INTERVAL;
133static int appldata_timer_active; 134static int appldata_timer_active;
134 135
135/* 136/*
136 * Tasklet 137 * Work queue
137 */ 138 */
138static struct tasklet_struct appldata_tasklet_struct; 139static struct workqueue_struct *appldata_wq;
140static void appldata_work_fn(void *data);
141static DECLARE_WORK(appldata_work, appldata_work_fn, NULL);
142
139 143
140/* 144/*
141 * Ops list 145 * Ops list
@@ -144,11 +148,11 @@ static DEFINE_SPINLOCK(appldata_ops_lock);
144static LIST_HEAD(appldata_ops_list); 148static LIST_HEAD(appldata_ops_list);
145 149
146 150
147/************************* timer, tasklet, DIAG ******************************/ 151/*************************** timer, work, DIAG *******************************/
148/* 152/*
149 * appldata_timer_function() 153 * appldata_timer_function()
150 * 154 *
151 * schedule tasklet and reschedule timer 155 * schedule work and reschedule timer
152 */ 156 */
153static void appldata_timer_function(unsigned long data, struct pt_regs *regs) 157static void appldata_timer_function(unsigned long data, struct pt_regs *regs)
154{ 158{
@@ -157,22 +161,22 @@ static void appldata_timer_function(unsigned long data, struct pt_regs *regs)
157 atomic_read(&appldata_expire_count)); 161 atomic_read(&appldata_expire_count));
158 if (atomic_dec_and_test(&appldata_expire_count)) { 162 if (atomic_dec_and_test(&appldata_expire_count)) {
159 atomic_set(&appldata_expire_count, num_online_cpus()); 163 atomic_set(&appldata_expire_count, num_online_cpus());
160 tasklet_schedule((struct tasklet_struct *) data); 164 queue_work(appldata_wq, (struct work_struct *) data);
161 } 165 }
162} 166}
163 167
164/* 168/*
165 * appldata_tasklet_function() 169 * appldata_work_fn()
166 * 170 *
167 * call data gathering function for each (active) module 171 * call data gathering function for each (active) module
168 */ 172 */
169static void appldata_tasklet_function(unsigned long data) 173static void appldata_work_fn(void *data)
170{ 174{
171 struct list_head *lh; 175 struct list_head *lh;
172 struct appldata_ops *ops; 176 struct appldata_ops *ops;
173 int i; 177 int i;
174 178
175 P_DEBUG(" -= Tasklet =-\n"); 179 P_DEBUG(" -= Work Queue =-\n");
176 i = 0; 180 i = 0;
177 spin_lock(&appldata_ops_lock); 181 spin_lock(&appldata_ops_lock);
178 list_for_each(lh, &appldata_ops_list) { 182 list_for_each(lh, &appldata_ops_list) {
@@ -231,7 +235,7 @@ static int appldata_diag(char record_nr, u16 function, unsigned long buffer,
231 : "=d" (ry) : "d" (&(appldata_parameter_list)) : "cc"); 235 : "=d" (ry) : "d" (&(appldata_parameter_list)) : "cc");
232 return (int) ry; 236 return (int) ry;
233} 237}
234/********************** timer, tasklet, DIAG <END> ***************************/ 238/************************ timer, work, DIAG <END> ****************************/
235 239
236 240
237/****************************** /proc stuff **********************************/ 241/****************************** /proc stuff **********************************/
@@ -411,7 +415,7 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp,
411 struct list_head *lh; 415 struct list_head *lh;
412 416
413 found = 0; 417 found = 0;
414 spin_lock_bh(&appldata_ops_lock); 418 spin_lock(&appldata_ops_lock);
415 list_for_each(lh, &appldata_ops_list) { 419 list_for_each(lh, &appldata_ops_list) {
416 tmp_ops = list_entry(lh, struct appldata_ops, list); 420 tmp_ops = list_entry(lh, struct appldata_ops, list);
417 if (&tmp_ops->ctl_table[2] == ctl) { 421 if (&tmp_ops->ctl_table[2] == ctl) {
@@ -419,15 +423,15 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp,
419 } 423 }
420 } 424 }
421 if (!found) { 425 if (!found) {
422 spin_unlock_bh(&appldata_ops_lock); 426 spin_unlock(&appldata_ops_lock);
423 return -ENODEV; 427 return -ENODEV;
424 } 428 }
425 ops = ctl->data; 429 ops = ctl->data;
426 if (!try_module_get(ops->owner)) { // protect this function 430 if (!try_module_get(ops->owner)) { // protect this function
427 spin_unlock_bh(&appldata_ops_lock); 431 spin_unlock(&appldata_ops_lock);
428 return -ENODEV; 432 return -ENODEV;
429 } 433 }
430 spin_unlock_bh(&appldata_ops_lock); 434 spin_unlock(&appldata_ops_lock);
431 435
432 if (!*lenp || *ppos) { 436 if (!*lenp || *ppos) {
433 *lenp = 0; 437 *lenp = 0;
@@ -451,10 +455,11 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp,
451 return -EFAULT; 455 return -EFAULT;
452 } 456 }
453 457
454 spin_lock_bh(&appldata_ops_lock); 458 spin_lock(&appldata_ops_lock);
455 if ((buf[0] == '1') && (ops->active == 0)) { 459 if ((buf[0] == '1') && (ops->active == 0)) {
456 if (!try_module_get(ops->owner)) { // protect tasklet 460 // protect work queue callback
457 spin_unlock_bh(&appldata_ops_lock); 461 if (!try_module_get(ops->owner)) {
462 spin_unlock(&appldata_ops_lock);
458 module_put(ops->owner); 463 module_put(ops->owner);
459 return -ENODEV; 464 return -ENODEV;
460 } 465 }
@@ -485,7 +490,7 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp,
485 } 490 }
486 module_put(ops->owner); 491 module_put(ops->owner);
487 } 492 }
488 spin_unlock_bh(&appldata_ops_lock); 493 spin_unlock(&appldata_ops_lock);
489out: 494out:
490 *lenp = len; 495 *lenp = len;
491 *ppos += len; 496 *ppos += len;
@@ -529,7 +534,7 @@ int appldata_register_ops(struct appldata_ops *ops)
529 } 534 }
530 memset(ops->ctl_table, 0, 4*sizeof(struct ctl_table)); 535 memset(ops->ctl_table, 0, 4*sizeof(struct ctl_table));
531 536
532 spin_lock_bh(&appldata_ops_lock); 537 spin_lock(&appldata_ops_lock);
533 list_for_each(lh, &appldata_ops_list) { 538 list_for_each(lh, &appldata_ops_list) {
534 tmp_ops = list_entry(lh, struct appldata_ops, list); 539 tmp_ops = list_entry(lh, struct appldata_ops, list);
535 P_DEBUG("register_ops loop: %i) name = %s, ctl = %i\n", 540 P_DEBUG("register_ops loop: %i) name = %s, ctl = %i\n",
@@ -541,18 +546,18 @@ int appldata_register_ops(struct appldata_ops *ops)
541 APPLDATA_PROC_NAME_LENGTH) == 0) { 546 APPLDATA_PROC_NAME_LENGTH) == 0) {
542 P_ERROR("Name \"%s\" already registered!\n", ops->name); 547 P_ERROR("Name \"%s\" already registered!\n", ops->name);
543 kfree(ops->ctl_table); 548 kfree(ops->ctl_table);
544 spin_unlock_bh(&appldata_ops_lock); 549 spin_unlock(&appldata_ops_lock);
545 return -EBUSY; 550 return -EBUSY;
546 } 551 }
547 if (tmp_ops->ctl_nr == ops->ctl_nr) { 552 if (tmp_ops->ctl_nr == ops->ctl_nr) {
548 P_ERROR("ctl_nr %i already registered!\n", ops->ctl_nr); 553 P_ERROR("ctl_nr %i already registered!\n", ops->ctl_nr);
549 kfree(ops->ctl_table); 554 kfree(ops->ctl_table);
550 spin_unlock_bh(&appldata_ops_lock); 555 spin_unlock(&appldata_ops_lock);
551 return -EBUSY; 556 return -EBUSY;
552 } 557 }
553 } 558 }
554 list_add(&ops->list, &appldata_ops_list); 559 list_add(&ops->list, &appldata_ops_list);
555 spin_unlock_bh(&appldata_ops_lock); 560 spin_unlock(&appldata_ops_lock);
556 561
557 ops->ctl_table[0].ctl_name = CTL_APPLDATA; 562 ops->ctl_table[0].ctl_name = CTL_APPLDATA;
558 ops->ctl_table[0].procname = appldata_proc_name; 563 ops->ctl_table[0].procname = appldata_proc_name;
@@ -583,12 +588,12 @@ int appldata_register_ops(struct appldata_ops *ops)
583 */ 588 */
584void appldata_unregister_ops(struct appldata_ops *ops) 589void appldata_unregister_ops(struct appldata_ops *ops)
585{ 590{
586 spin_lock_bh(&appldata_ops_lock); 591 spin_lock(&appldata_ops_lock);
587 unregister_sysctl_table(ops->sysctl_header); 592 unregister_sysctl_table(ops->sysctl_header);
588 list_del(&ops->list); 593 list_del(&ops->list);
589 kfree(ops->ctl_table); 594 kfree(ops->ctl_table);
590 ops->ctl_table = NULL; 595 ops->ctl_table = NULL;
591 spin_unlock_bh(&appldata_ops_lock); 596 spin_unlock(&appldata_ops_lock);
592 P_INFO("%s-ops unregistered!\n", ops->name); 597 P_INFO("%s-ops unregistered!\n", ops->name);
593} 598}
594/********************** module-ops management <END> **************************/ 599/********************** module-ops management <END> **************************/
@@ -602,7 +607,7 @@ appldata_online_cpu(int cpu)
602 init_virt_timer(&per_cpu(appldata_timer, cpu)); 607 init_virt_timer(&per_cpu(appldata_timer, cpu));
603 per_cpu(appldata_timer, cpu).function = appldata_timer_function; 608 per_cpu(appldata_timer, cpu).function = appldata_timer_function;
604 per_cpu(appldata_timer, cpu).data = (unsigned long) 609 per_cpu(appldata_timer, cpu).data = (unsigned long)
605 &appldata_tasklet_struct; 610 &appldata_work;
606 atomic_inc(&appldata_expire_count); 611 atomic_inc(&appldata_expire_count);
607 spin_lock(&appldata_timer_lock); 612 spin_lock(&appldata_timer_lock);
608 __appldata_vtimer_setup(APPLDATA_MOD_TIMER); 613 __appldata_vtimer_setup(APPLDATA_MOD_TIMER);
@@ -615,7 +620,7 @@ appldata_offline_cpu(int cpu)
615 del_virt_timer(&per_cpu(appldata_timer, cpu)); 620 del_virt_timer(&per_cpu(appldata_timer, cpu));
616 if (atomic_dec_and_test(&appldata_expire_count)) { 621 if (atomic_dec_and_test(&appldata_expire_count)) {
617 atomic_set(&appldata_expire_count, num_online_cpus()); 622 atomic_set(&appldata_expire_count, num_online_cpus());
618 tasklet_schedule(&appldata_tasklet_struct); 623 queue_work(appldata_wq, &appldata_work);
619 } 624 }
620 spin_lock(&appldata_timer_lock); 625 spin_lock(&appldata_timer_lock);
621 __appldata_vtimer_setup(APPLDATA_MOD_TIMER); 626 __appldata_vtimer_setup(APPLDATA_MOD_TIMER);
@@ -648,7 +653,7 @@ static struct notifier_block __devinitdata appldata_nb = {
648/* 653/*
649 * appldata_init() 654 * appldata_init()
650 * 655 *
651 * init timer and tasklet, register /proc entries 656 * init timer, register /proc entries
652 */ 657 */
653static int __init appldata_init(void) 658static int __init appldata_init(void)
654{ 659{
@@ -657,6 +662,12 @@ static int __init appldata_init(void)
657 P_DEBUG("sizeof(parameter_list) = %lu\n", 662 P_DEBUG("sizeof(parameter_list) = %lu\n",
658 sizeof(struct appldata_parameter_list)); 663 sizeof(struct appldata_parameter_list));
659 664
665 appldata_wq = create_singlethread_workqueue("appldata");
666 if (!appldata_wq) {
667 P_ERROR("Could not create work queue\n");
668 return -ENOMEM;
669 }
670
660 for_each_online_cpu(i) 671 for_each_online_cpu(i)
661 appldata_online_cpu(i); 672 appldata_online_cpu(i);
662 673
@@ -670,7 +681,6 @@ static int __init appldata_init(void)
670 appldata_table[1].de->owner = THIS_MODULE; 681 appldata_table[1].de->owner = THIS_MODULE;
671#endif 682#endif
672 683
673 tasklet_init(&appldata_tasklet_struct, appldata_tasklet_function, 0);
674 P_DEBUG("Base interface initialized.\n"); 684 P_DEBUG("Base interface initialized.\n");
675 return 0; 685 return 0;
676} 686}
@@ -678,7 +688,7 @@ static int __init appldata_init(void)
678/* 688/*
679 * appldata_exit() 689 * appldata_exit()
680 * 690 *
681 * stop timer and tasklet, unregister /proc entries 691 * stop timer, unregister /proc entries
682 */ 692 */
683static void __exit appldata_exit(void) 693static void __exit appldata_exit(void)
684{ 694{
@@ -690,7 +700,7 @@ static void __exit appldata_exit(void)
690 /* 700 /*
691 * ops list should be empty, but just in case something went wrong... 701 * ops list should be empty, but just in case something went wrong...
692 */ 702 */
693 spin_lock_bh(&appldata_ops_lock); 703 spin_lock(&appldata_ops_lock);
694 list_for_each(lh, &appldata_ops_list) { 704 list_for_each(lh, &appldata_ops_list) {
695 ops = list_entry(lh, struct appldata_ops, list); 705 ops = list_entry(lh, struct appldata_ops, list);
696 rc = appldata_diag(ops->record_nr, APPLDATA_STOP_REC, 706 rc = appldata_diag(ops->record_nr, APPLDATA_STOP_REC,
@@ -700,7 +710,7 @@ static void __exit appldata_exit(void)
700 "return code: %d\n", ops->name, rc); 710 "return code: %d\n", ops->name, rc);
701 } 711 }
702 } 712 }
703 spin_unlock_bh(&appldata_ops_lock); 713 spin_unlock(&appldata_ops_lock);
704 714
705 for_each_online_cpu(i) 715 for_each_online_cpu(i)
706 appldata_offline_cpu(i); 716 appldata_offline_cpu(i);
@@ -709,7 +719,7 @@ static void __exit appldata_exit(void)
709 719
710 unregister_sysctl_table(appldata_sysctl_header); 720 unregister_sysctl_table(appldata_sysctl_header);
711 721
712 tasklet_kill(&appldata_tasklet_struct); 722 destroy_workqueue(appldata_wq);
713 P_DEBUG("... module unloaded!\n"); 723 P_DEBUG("... module unloaded!\n");
714} 724}
715/**************************** init / exit <END> ******************************/ 725/**************************** init / exit <END> ******************************/
diff --git a/arch/s390/appldata/appldata_mem.c b/arch/s390/appldata/appldata_mem.c
index 462ee9a84e76..f0e2fbed3d4c 100644
--- a/arch/s390/appldata/appldata_mem.c
+++ b/arch/s390/appldata/appldata_mem.c
@@ -68,7 +68,7 @@ struct appldata_mem_data {
68 u64 pgmajfault; /* page faults (major only) */ 68 u64 pgmajfault; /* page faults (major only) */
69// <-- New in 2.6 69// <-- New in 2.6
70 70
71} appldata_mem_data; 71} __attribute__((packed)) appldata_mem_data;
72 72
73 73
74static inline void appldata_debug_print(struct appldata_mem_data *mem_data) 74static inline void appldata_debug_print(struct appldata_mem_data *mem_data)
diff --git a/arch/s390/appldata/appldata_net_sum.c b/arch/s390/appldata/appldata_net_sum.c
index dd61638d3027..2a4c7432db4a 100644
--- a/arch/s390/appldata/appldata_net_sum.c
+++ b/arch/s390/appldata/appldata_net_sum.c
@@ -57,7 +57,7 @@ struct appldata_net_sum_data {
57 u64 rx_dropped; /* no space in linux buffers */ 57 u64 rx_dropped; /* no space in linux buffers */
58 u64 tx_dropped; /* no space available in linux */ 58 u64 tx_dropped; /* no space available in linux */
59 u64 collisions; /* collisions while transmitting */ 59 u64 collisions; /* collisions while transmitting */
60} appldata_net_sum_data; 60} __attribute__((packed)) appldata_net_sum_data;
61 61
62 62
63static inline void appldata_print_debug(struct appldata_net_sum_data *net_data) 63static inline void appldata_print_debug(struct appldata_net_sum_data *net_data)
diff --git a/arch/s390/appldata/appldata_os.c b/arch/s390/appldata/appldata_os.c
index b83f07484551..e0a476bf4fd6 100644
--- a/arch/s390/appldata/appldata_os.c
+++ b/arch/s390/appldata/appldata_os.c
@@ -49,7 +49,7 @@ struct appldata_os_per_cpu {
49 u32 per_cpu_softirq; /* ... spent in softirqs */ 49 u32 per_cpu_softirq; /* ... spent in softirqs */
50 u32 per_cpu_iowait; /* ... spent while waiting for I/O */ 50 u32 per_cpu_iowait; /* ... spent while waiting for I/O */
51// <-- New in 2.6 51// <-- New in 2.6
52}; 52} __attribute__((packed));
53 53
54struct appldata_os_data { 54struct appldata_os_data {
55 u64 timestamp; 55 u64 timestamp;
@@ -75,7 +75,7 @@ struct appldata_os_data {
75 75
76 /* per cpu data */ 76 /* per cpu data */
77 struct appldata_os_per_cpu os_cpu[0]; 77 struct appldata_os_per_cpu os_cpu[0];
78}; 78} __attribute__((packed));
79 79
80static struct appldata_os_data *appldata_os_data; 80static struct appldata_os_data *appldata_os_data;
81 81
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c
index 26889366929a..06afa3103ace 100644
--- a/arch/s390/kernel/ptrace.c
+++ b/arch/s390/kernel/ptrace.c
@@ -40,6 +40,7 @@
40#include <asm/pgalloc.h> 40#include <asm/pgalloc.h>
41#include <asm/system.h> 41#include <asm/system.h>
42#include <asm/uaccess.h> 42#include <asm/uaccess.h>
43#include <asm/unistd.h>
43 44
44#ifdef CONFIG_S390_SUPPORT 45#ifdef CONFIG_S390_SUPPORT
45#include "compat_ptrace.h" 46#include "compat_ptrace.h"
@@ -130,13 +131,19 @@ static int
130peek_user(struct task_struct *child, addr_t addr, addr_t data) 131peek_user(struct task_struct *child, addr_t addr, addr_t data)
131{ 132{
132 struct user *dummy = NULL; 133 struct user *dummy = NULL;
133 addr_t offset, tmp; 134 addr_t offset, tmp, mask;
134 135
135 /* 136 /*
136 * Stupid gdb peeks/pokes the access registers in 64 bit with 137 * Stupid gdb peeks/pokes the access registers in 64 bit with
137 * an alignment of 4. Programmers from hell... 138 * an alignment of 4. Programmers from hell...
138 */ 139 */
139 if ((addr & 3) || addr > sizeof(struct user) - __ADDR_MASK) 140 mask = __ADDR_MASK;
141#ifdef CONFIG_ARCH_S390X
142 if (addr >= (addr_t) &dummy->regs.acrs &&
143 addr < (addr_t) &dummy->regs.orig_gpr2)
144 mask = 3;
145#endif
146 if ((addr & mask) || addr > sizeof(struct user) - __ADDR_MASK)
140 return -EIO; 147 return -EIO;
141 148
142 if (addr < (addr_t) &dummy->regs.acrs) { 149 if (addr < (addr_t) &dummy->regs.acrs) {
@@ -153,6 +160,16 @@ peek_user(struct task_struct *child, addr_t addr, addr_t data)
153 * access registers are stored in the thread structure 160 * access registers are stored in the thread structure
154 */ 161 */
155 offset = addr - (addr_t) &dummy->regs.acrs; 162 offset = addr - (addr_t) &dummy->regs.acrs;
163#ifdef CONFIG_ARCH_S390X
164 /*
165 * Very special case: old & broken 64 bit gdb reading
166 * from acrs[15]. Result is a 64 bit value. Read the
167 * 32 bit acrs[15] value and shift it by 32. Sick...
168 */
169 if (addr == (addr_t) &dummy->regs.acrs[15])
170 tmp = ((unsigned long) child->thread.acrs[15]) << 32;
171 else
172#endif
156 tmp = *(addr_t *)((addr_t) &child->thread.acrs + offset); 173 tmp = *(addr_t *)((addr_t) &child->thread.acrs + offset);
157 174
158 } else if (addr == (addr_t) &dummy->regs.orig_gpr2) { 175 } else if (addr == (addr_t) &dummy->regs.orig_gpr2) {
@@ -167,6 +184,9 @@ peek_user(struct task_struct *child, addr_t addr, addr_t data)
167 */ 184 */
168 offset = addr - (addr_t) &dummy->regs.fp_regs; 185 offset = addr - (addr_t) &dummy->regs.fp_regs;
169 tmp = *(addr_t *)((addr_t) &child->thread.fp_regs + offset); 186 tmp = *(addr_t *)((addr_t) &child->thread.fp_regs + offset);
187 if (addr == (addr_t) &dummy->regs.fp_regs.fpc)
188 tmp &= (unsigned long) FPC_VALID_MASK
189 << (BITS_PER_LONG - 32);
170 190
171 } else if (addr < (addr_t) (&dummy->regs.per_info + 1)) { 191 } else if (addr < (addr_t) (&dummy->regs.per_info + 1)) {
172 /* 192 /*
@@ -191,13 +211,19 @@ static int
191poke_user(struct task_struct *child, addr_t addr, addr_t data) 211poke_user(struct task_struct *child, addr_t addr, addr_t data)
192{ 212{
193 struct user *dummy = NULL; 213 struct user *dummy = NULL;
194 addr_t offset; 214 addr_t offset, mask;
195 215
196 /* 216 /*
197 * Stupid gdb peeks/pokes the access registers in 64 bit with 217 * Stupid gdb peeks/pokes the access registers in 64 bit with
198 * an alignment of 4. Programmers from hell indeed... 218 * an alignment of 4. Programmers from hell indeed...
199 */ 219 */
200 if ((addr & 3) || addr > sizeof(struct user) - __ADDR_MASK) 220 mask = __ADDR_MASK;
221#ifdef CONFIG_ARCH_S390X
222 if (addr >= (addr_t) &dummy->regs.acrs &&
223 addr < (addr_t) &dummy->regs.orig_gpr2)
224 mask = 3;
225#endif
226 if ((addr & mask) || addr > sizeof(struct user) - __ADDR_MASK)
201 return -EIO; 227 return -EIO;
202 228
203 if (addr < (addr_t) &dummy->regs.acrs) { 229 if (addr < (addr_t) &dummy->regs.acrs) {
@@ -224,6 +250,17 @@ poke_user(struct task_struct *child, addr_t addr, addr_t data)
224 * access registers are stored in the thread structure 250 * access registers are stored in the thread structure
225 */ 251 */
226 offset = addr - (addr_t) &dummy->regs.acrs; 252 offset = addr - (addr_t) &dummy->regs.acrs;
253#ifdef CONFIG_ARCH_S390X
254 /*
255 * Very special case: old & broken 64 bit gdb writing
256 * to acrs[15] with a 64 bit value. Ignore the lower
257 * half of the value and write the upper 32 bit to
258 * acrs[15]. Sick...
259 */
260 if (addr == (addr_t) &dummy->regs.acrs[15])
261 child->thread.acrs[15] = (unsigned int) (data >> 32);
262 else
263#endif
227 *(addr_t *)((addr_t) &child->thread.acrs + offset) = data; 264 *(addr_t *)((addr_t) &child->thread.acrs + offset) = data;
228 265
229 } else if (addr == (addr_t) &dummy->regs.orig_gpr2) { 266 } else if (addr == (addr_t) &dummy->regs.orig_gpr2) {
@@ -237,7 +274,8 @@ poke_user(struct task_struct *child, addr_t addr, addr_t data)
237 * floating point regs. are stored in the thread structure 274 * floating point regs. are stored in the thread structure
238 */ 275 */
239 if (addr == (addr_t) &dummy->regs.fp_regs.fpc && 276 if (addr == (addr_t) &dummy->regs.fp_regs.fpc &&
240 (data & ~FPC_VALID_MASK) != 0) 277 (data & ~((unsigned long) FPC_VALID_MASK
278 << (BITS_PER_LONG - 32))) != 0)
241 return -EINVAL; 279 return -EINVAL;
242 offset = addr - (addr_t) &dummy->regs.fp_regs; 280 offset = addr - (addr_t) &dummy->regs.fp_regs;
243 *(addr_t *)((addr_t) &child->thread.fp_regs + offset) = data; 281 *(addr_t *)((addr_t) &child->thread.fp_regs + offset) = data;
@@ -723,6 +761,13 @@ syscall_trace(struct pt_regs *regs, int entryexit)
723 ? 0x80 : 0)); 761 ? 0x80 : 0));
724 762
725 /* 763 /*
764 * If the debuffer has set an invalid system call number,
765 * we prepare to skip the system call restart handling.
766 */
767 if (!entryexit && regs->gprs[2] >= NR_syscalls)
768 regs->trap = -1;
769
770 /*
726 * this isn't the same as continuing with a signal, but it will do 771 * this isn't the same as continuing with a signal, but it will do
727 * for normal use. strace only continues with a signal if the 772 * for normal use. strace only continues with a signal if the
728 * stopping signal is not SIGTRAP. -brl 773 * stopping signal is not SIGTRAP. -brl
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
index 80306bc8c799..75fde949d125 100644
--- a/arch/s390/mm/fault.c
+++ b/arch/s390/mm/fault.c
@@ -207,7 +207,7 @@ do_exception(struct pt_regs *regs, unsigned long error_code, int is_protection)
207 * we are not in an interrupt and that there is a 207 * we are not in an interrupt and that there is a
208 * user context. 208 * user context.
209 */ 209 */
210 if (user_address == 0 || in_interrupt() || !mm) 210 if (user_address == 0 || in_atomic() || !mm)
211 goto no_context; 211 goto no_context;
212 212
213 /* 213 /*
diff --git a/arch/um/Kconfig_char b/arch/um/Kconfig_char
index 3e50fdb67626..62d87b71179b 100644
--- a/arch/um/Kconfig_char
+++ b/arch/um/Kconfig_char
@@ -204,5 +204,11 @@ config UML_RANDOM
204 http://sourceforge.net/projects/gkernel/). rngd periodically reads 204 http://sourceforge.net/projects/gkernel/). rngd periodically reads
205 /dev/hwrng and injects the entropy into /dev/random. 205 /dev/hwrng and injects the entropy into /dev/random.
206 206
207config MMAPPER
208 tristate "iomem emulation driver"
209 help
210 This driver allows a host file to be used as emulated IO memory inside
211 UML.
212
207endmenu 213endmenu
208 214
diff --git a/arch/um/drivers/Makefile b/arch/um/drivers/Makefile
index 323f72c64cd2..b2de9916c32c 100644
--- a/arch/um/drivers/Makefile
+++ b/arch/um/drivers/Makefile
@@ -22,8 +22,8 @@ obj-y := stdio_console.o fd.o chan_kern.o chan_user.o line.o
22obj-$(CONFIG_SSL) += ssl.o 22obj-$(CONFIG_SSL) += ssl.o
23obj-$(CONFIG_STDERR_CONSOLE) += stderr_console.o 23obj-$(CONFIG_STDERR_CONSOLE) += stderr_console.o
24 24
25obj-$(CONFIG_UML_NET_SLIP) += slip.o 25obj-$(CONFIG_UML_NET_SLIP) += slip.o slip_common.o
26obj-$(CONFIG_UML_NET_SLIRP) += slirp.o 26obj-$(CONFIG_UML_NET_SLIRP) += slirp.o slip_common.o
27obj-$(CONFIG_UML_NET_DAEMON) += daemon.o 27obj-$(CONFIG_UML_NET_DAEMON) += daemon.o
28obj-$(CONFIG_UML_NET_MCAST) += mcast.o 28obj-$(CONFIG_UML_NET_MCAST) += mcast.o
29#obj-$(CONFIG_UML_NET_PCAP) += pcap.o $(PCAP) 29#obj-$(CONFIG_UML_NET_PCAP) += pcap.o $(PCAP)
@@ -41,6 +41,6 @@ obj-$(CONFIG_UML_WATCHDOG) += harddog.o
41obj-$(CONFIG_BLK_DEV_COW_COMMON) += cow_user.o 41obj-$(CONFIG_BLK_DEV_COW_COMMON) += cow_user.o
42obj-$(CONFIG_UML_RANDOM) += random.o 42obj-$(CONFIG_UML_RANDOM) += random.o
43 43
44USER_OBJS := fd.o null.o pty.o tty.o xterm.o 44USER_OBJS := fd.o null.o pty.o tty.o xterm.o slip_common.o
45 45
46include arch/um/scripts/Makefile.rules 46include arch/um/scripts/Makefile.rules
diff --git a/arch/um/drivers/chan_user.c b/arch/um/drivers/chan_user.c
index 583b8e137c33..5d3768156c92 100644
--- a/arch/um/drivers/chan_user.c
+++ b/arch/um/drivers/chan_user.c
@@ -143,22 +143,22 @@ static int winch_tramp(int fd, struct tty_struct *tty, int *fd_out)
143{ 143{
144 struct winch_data data; 144 struct winch_data data;
145 unsigned long stack; 145 unsigned long stack;
146 int fds[2], pid, n, err; 146 int fds[2], n, err;
147 char c; 147 char c;
148 148
149 err = os_pipe(fds, 1, 1); 149 err = os_pipe(fds, 1, 1);
150 if(err < 0){ 150 if(err < 0){
151 printk("winch_tramp : os_pipe failed, err = %d\n", -err); 151 printk("winch_tramp : os_pipe failed, err = %d\n", -err);
152 return(err); 152 goto out;
153 } 153 }
154 154
155 data = ((struct winch_data) { .pty_fd = fd, 155 data = ((struct winch_data) { .pty_fd = fd,
156 .pipe_fd = fds[1], 156 .pipe_fd = fds[1],
157 .close_me = fds[0] } ); 157 .close_me = fds[0] } );
158 pid = run_helper_thread(winch_thread, &data, 0, &stack, 0); 158 err = run_helper_thread(winch_thread, &data, 0, &stack, 0);
159 if(pid < 0){ 159 if(err < 0){
160 printk("fork of winch_thread failed - errno = %d\n", errno); 160 printk("fork of winch_thread failed - errno = %d\n", errno);
161 return(pid); 161 goto out_close;
162 } 162 }
163 163
164 os_close_file(fds[1]); 164 os_close_file(fds[1]);
@@ -168,14 +168,22 @@ static int winch_tramp(int fd, struct tty_struct *tty, int *fd_out)
168 printk("winch_tramp : failed to read synchronization byte\n"); 168 printk("winch_tramp : failed to read synchronization byte\n");
169 printk("read failed, err = %d\n", -n); 169 printk("read failed, err = %d\n", -n);
170 printk("fd %d will not support SIGWINCH\n", fd); 170 printk("fd %d will not support SIGWINCH\n", fd);
171 *fd_out = -1; 171 err = -EINVAL;
172 goto out_close1;
172 } 173 }
173 return(pid); 174 return err ;
175
176 out_close:
177 os_close_file(fds[1]);
178 out_close1:
179 os_close_file(fds[0]);
180 out:
181 return err;
174} 182}
175 183
176void register_winch(int fd, struct tty_struct *tty) 184void register_winch(int fd, struct tty_struct *tty)
177{ 185{
178 int pid, thread, thread_fd; 186 int pid, thread, thread_fd = -1;
179 int count; 187 int count;
180 char c = 1; 188 char c = 1;
181 189
@@ -186,7 +194,7 @@ void register_winch(int fd, struct tty_struct *tty)
186 if(!CHOOSE_MODE_PROC(is_tracer_winch, is_skas_winch, pid, fd, 194 if(!CHOOSE_MODE_PROC(is_tracer_winch, is_skas_winch, pid, fd,
187 tty) && (pid == -1)){ 195 tty) && (pid == -1)){
188 thread = winch_tramp(fd, tty, &thread_fd); 196 thread = winch_tramp(fd, tty, &thread_fd);
189 if(fd != -1){ 197 if(thread > 0){
190 register_winch_irq(thread_fd, fd, thread, tty); 198 register_winch_irq(thread_fd, fd, thread, tty);
191 199
192 count = os_write_file(thread_fd, &c, sizeof(c)); 200 count = os_write_file(thread_fd, &c, sizeof(c));
diff --git a/arch/um/drivers/mmapper_kern.c b/arch/um/drivers/mmapper_kern.c
index a63231dffe05..a37a5ac13c22 100644
--- a/arch/um/drivers/mmapper_kern.c
+++ b/arch/um/drivers/mmapper_kern.c
@@ -18,6 +18,7 @@
18#include <linux/slab.h> 18#include <linux/slab.h>
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/smp_lock.h> 20#include <linux/smp_lock.h>
21#include <linux/miscdevice.h>
21#include <asm/uaccess.h> 22#include <asm/uaccess.h>
22#include <asm/irq.h> 23#include <asm/irq.h>
23#include <asm/pgtable.h> 24#include <asm/pgtable.h>
@@ -117,24 +118,39 @@ static struct file_operations mmapper_fops = {
117 .release = mmapper_release, 118 .release = mmapper_release,
118}; 119};
119 120
121static struct miscdevice mmapper_dev = {
122 .minor = MISC_DYNAMIC_MINOR,
123 .name = "mmapper",
124 .fops = &mmapper_fops
125};
126
120static int __init mmapper_init(void) 127static int __init mmapper_init(void)
121{ 128{
129 int err;
130
122 printk(KERN_INFO "Mapper v0.1\n"); 131 printk(KERN_INFO "Mapper v0.1\n");
123 132
124 v_buf = (char *) find_iomem("mmapper", &mmapper_size); 133 v_buf = (char *) find_iomem("mmapper", &mmapper_size);
125 if(mmapper_size == 0){ 134 if(mmapper_size == 0){
126 printk(KERN_ERR "mmapper_init - find_iomem failed\n"); 135 printk(KERN_ERR "mmapper_init - find_iomem failed\n");
127 return(0); 136 goto out;
128 } 137 }
129 138
130 p_buf = __pa(v_buf); 139 err = misc_register(&mmapper_dev);
140 if(err){
141 printk(KERN_ERR "mmapper - misc_register failed, err = %d\n",
142 err);
143 goto out;
144 }
131 145
132 devfs_mk_cdev(MKDEV(30, 0), S_IFCHR|S_IRUGO|S_IWUGO, "mmapper"); 146 p_buf = __pa(v_buf);
133 return(0); 147out:
148 return 0;
134} 149}
135 150
136static void mmapper_exit(void) 151static void mmapper_exit(void)
137{ 152{
153 misc_deregister(&mmapper_dev);
138} 154}
139 155
140module_init(mmapper_init); 156module_init(mmapper_init);
diff --git a/arch/um/drivers/net_user.c b/arch/um/drivers/net_user.c
index 47229fe4a813..3730d4f12713 100644
--- a/arch/um/drivers/net_user.c
+++ b/arch/um/drivers/net_user.c
@@ -32,7 +32,7 @@ int tap_open_common(void *dev, char *gate_addr)
32 return(0); 32 return(0);
33} 33}
34 34
35void tap_check_ips(char *gate_addr, char *eth_addr) 35void tap_check_ips(char *gate_addr, unsigned char *eth_addr)
36{ 36{
37 int tap_addr[4]; 37 int tap_addr[4];
38 38
diff --git a/arch/um/drivers/slip.h b/arch/um/drivers/slip.h
index 495f2f1b1420..bb0dab41c2e4 100644
--- a/arch/um/drivers/slip.h
+++ b/arch/um/drivers/slip.h
@@ -1,10 +1,7 @@
1#ifndef __UM_SLIP_H 1#ifndef __UM_SLIP_H
2#define __UM_SLIP_H 2#define __UM_SLIP_H
3 3
4#define BUF_SIZE 1500 4#include "slip_common.h"
5 /* two bytes each for a (pathological) max packet of escaped chars + *
6 * terminating END char + initial END char */
7#define ENC_BUF_SIZE (2 * BUF_SIZE + 2)
8 5
9struct slip_data { 6struct slip_data {
10 void *dev; 7 void *dev;
@@ -12,28 +9,12 @@ struct slip_data {
12 char *addr; 9 char *addr;
13 char *gate_addr; 10 char *gate_addr;
14 int slave; 11 int slave;
15 char ibuf[ENC_BUF_SIZE]; 12 struct slip_proto slip;
16 char obuf[ENC_BUF_SIZE];
17 int more; /* more data: do not read fd until ibuf has been drained */
18 int pos;
19 int esc;
20}; 13};
21 14
22extern struct net_user_info slip_user_info; 15extern struct net_user_info slip_user_info;
23 16
24extern int set_umn_addr(int fd, char *addr, char *ptp_addr);
25extern int slip_user_read(int fd, void *buf, int len, struct slip_data *pri); 17extern int slip_user_read(int fd, void *buf, int len, struct slip_data *pri);
26extern int slip_user_write(int fd, void *buf, int len, struct slip_data *pri); 18extern int slip_user_write(int fd, void *buf, int len, struct slip_data *pri);
27 19
28#endif 20#endif
29
30/*
31 * Overrides for Emacs so that we follow Linus's tabbing style.
32 * Emacs will notice this stuff at the end of the file and automatically
33 * adjust the settings for this buffer only. This must remain at the end
34 * of the file.
35 * ---------------------------------------------------------------------------
36 * Local variables:
37 * c-file-style: "linux"
38 * End:
39 */
diff --git a/arch/um/drivers/slip_common.c b/arch/um/drivers/slip_common.c
new file mode 100644
index 000000000000..e89cfc68fc3e
--- /dev/null
+++ b/arch/um/drivers/slip_common.c
@@ -0,0 +1,54 @@
1#include <string.h>
2#include "slip_common.h"
3#include "net_user.h"
4
5int slip_proto_read(int fd, void *buf, int len, struct slip_proto *slip)
6{
7 int i, n, size, start;
8
9 if(slip->more > 0){
10 i = 0;
11 while(i < slip->more){
12 size = slip_unesc(slip->ibuf[i++], slip->ibuf,
13 &slip->pos, &slip->esc);
14 if(size){
15 memcpy(buf, slip->ibuf, size);
16 memmove(slip->ibuf, &slip->ibuf[i],
17 slip->more - i);
18 slip->more = slip->more - i;
19 return size;
20 }
21 }
22 slip->more = 0;
23 }
24
25 n = net_read(fd, &slip->ibuf[slip->pos],
26 sizeof(slip->ibuf) - slip->pos);
27 if(n <= 0)
28 return n;
29
30 start = slip->pos;
31 for(i = 0; i < n; i++){
32 size = slip_unesc(slip->ibuf[start + i], slip->ibuf,&slip->pos,
33 &slip->esc);
34 if(size){
35 memcpy(buf, slip->ibuf, size);
36 memmove(slip->ibuf, &slip->ibuf[start+i+1],
37 n - (i + 1));
38 slip->more = n - (i + 1);
39 return size;
40 }
41 }
42 return 0;
43}
44
45int slip_proto_write(int fd, void *buf, int len, struct slip_proto *slip)
46{
47 int actual, n;
48
49 actual = slip_esc(buf, slip->obuf, len);
50 n = net_write(fd, slip->obuf, actual);
51 if(n < 0)
52 return n;
53 else return len;
54}
diff --git a/arch/um/drivers/slip_proto.h b/arch/um/drivers/slip_common.h
index 7206361ace45..2ae76d8f1be1 100644
--- a/arch/um/drivers/slip_proto.h
+++ b/arch/um/drivers/slip_common.h
@@ -1,10 +1,10 @@
1/* 1#ifndef __UM_SLIP_COMMON_H
2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) 2#define __UM_SLIP_COMMON_H
3 * Licensed under the GPL
4 */
5 3
6#ifndef __UM_SLIP_PROTO_H__ 4#define BUF_SIZE 1500
7#define __UM_SLIP_PROTO_H__ 5 /* two bytes each for a (pathological) max packet of escaped chars + *
6 * terminating END char + initial END char */
7#define ENC_BUF_SIZE (2 * BUF_SIZE + 2)
8 8
9/* SLIP protocol characters. */ 9/* SLIP protocol characters. */
10#define SLIP_END 0300 /* indicates end of frame */ 10#define SLIP_END 0300 /* indicates end of frame */
@@ -12,7 +12,8 @@
12#define SLIP_ESC_END 0334 /* ESC ESC_END means END 'data' */ 12#define SLIP_ESC_END 0334 /* ESC ESC_END means END 'data' */
13#define SLIP_ESC_ESC 0335 /* ESC ESC_ESC means ESC 'data' */ 13#define SLIP_ESC_ESC 0335 /* ESC ESC_ESC means ESC 'data' */
14 14
15static inline int slip_unesc(unsigned char c,char *buf,int *pos, int *esc) 15static inline int slip_unesc(unsigned char c, unsigned char *buf, int *pos,
16 int *esc)
16{ 17{
17 int ret; 18 int ret;
18 19
@@ -79,15 +80,25 @@ static inline int slip_esc(unsigned char *s, unsigned char *d, int len)
79 return (ptr - d); 80 return (ptr - d);
80} 81}
81 82
82#endif 83struct slip_proto {
84 unsigned char ibuf[ENC_BUF_SIZE];
85 unsigned char obuf[ENC_BUF_SIZE];
86 int more; /* more data: do not read fd until ibuf has been drained */
87 int pos;
88 int esc;
89};
90
91#define SLIP_PROTO_INIT { \
92 .ibuf = { '\0' }, \
93 .obuf = { '\0' }, \
94 .more = 0, \
95 .pos = 0, \
96 .esc = 0 \
97}
83 98
84/* 99extern int slip_proto_read(int fd, void *buf, int len,
85 * Overrides for Emacs so that we follow Linus's tabbing style. 100 struct slip_proto *slip);
86 * Emacs will notice this stuff at the end of the file and automatically 101extern int slip_proto_write(int fd, void *buf, int len,
87 * adjust the settings for this buffer only. This must remain at the end 102 struct slip_proto *slip);
88 * of the file. 103
89 * --------------------------------------------------------------------------- 104#endif
90 * Local variables:
91 * c-file-style: "linux"
92 * End:
93 */
diff --git a/arch/um/drivers/slip_kern.c b/arch/um/drivers/slip_kern.c
index 0886eedba213..9a6f5c85f902 100644
--- a/arch/um/drivers/slip_kern.c
+++ b/arch/um/drivers/slip_kern.c
@@ -26,16 +26,16 @@ void slip_init(struct net_device *dev, void *data)
26 .addr = NULL, 26 .addr = NULL,
27 .gate_addr = init->gate_addr, 27 .gate_addr = init->gate_addr,
28 .slave = -1, 28 .slave = -1,
29 .ibuf = { '\0' }, 29 .slip = SLIP_PROTO_INIT,
30 .obuf = { '\0' },
31 .pos = 0,
32 .esc = 0,
33 .dev = dev }); 30 .dev = dev });
34 31
35 dev->init = NULL; 32 dev->init = NULL;
33 dev->header_cache_update = NULL;
34 dev->hard_header_cache = NULL;
35 dev->hard_header = NULL;
36 dev->hard_header_len = 0; 36 dev->hard_header_len = 0;
37 dev->addr_len = 4; 37 dev->addr_len = 0;
38 dev->type = ARPHRD_ETHER; 38 dev->type = ARPHRD_SLIP;
39 dev->tx_queue_len = 256; 39 dev->tx_queue_len = 256;
40 dev->flags = IFF_NOARP; 40 dev->flags = IFF_NOARP;
41 printk("SLIP backend - SLIP IP = %s\n", spri->gate_addr); 41 printk("SLIP backend - SLIP IP = %s\n", spri->gate_addr);
diff --git a/arch/um/drivers/slip_user.c b/arch/um/drivers/slip_user.c
index d94846b1b4cf..71af444e591f 100644
--- a/arch/um/drivers/slip_user.c
+++ b/arch/um/drivers/slip_user.c
@@ -13,7 +13,7 @@
13#include "user.h" 13#include "user.h"
14#include "net_user.h" 14#include "net_user.h"
15#include "slip.h" 15#include "slip.h"
16#include "slip_proto.h" 16#include "slip_common.h"
17#include "helper.h" 17#include "helper.h"
18#include "os.h" 18#include "os.h"
19 19
@@ -77,41 +77,51 @@ static int slip_tramp(char **argv, int fd)
77 err = os_pipe(fds, 1, 0); 77 err = os_pipe(fds, 1, 0);
78 if(err < 0){ 78 if(err < 0){
79 printk("slip_tramp : pipe failed, err = %d\n", -err); 79 printk("slip_tramp : pipe failed, err = %d\n", -err);
80 return(err); 80 goto out;
81 } 81 }
82 82
83 err = 0; 83 err = 0;
84 pe_data.stdin = fd; 84 pe_data.stdin = fd;
85 pe_data.stdout = fds[1]; 85 pe_data.stdout = fds[1];
86 pe_data.close_me = fds[0]; 86 pe_data.close_me = fds[0];
87 pid = run_helper(slip_pre_exec, &pe_data, argv, NULL); 87 err = run_helper(slip_pre_exec, &pe_data, argv, NULL);
88 if(err < 0)
89 goto out_close;
90 pid = err;
91
92 output_len = page_size();
93 output = um_kmalloc(output_len);
94 if(output == NULL){
95 printk("slip_tramp : failed to allocate output buffer\n");
96 os_kill_process(pid, 1);
97 err = -ENOMEM;
98 goto out_free;
99 }
88 100
89 if(pid < 0) err = pid; 101 os_close_file(fds[1]);
90 else { 102 read_output(fds[0], output, output_len);
91 output_len = page_size(); 103 printk("%s", output);
92 output = um_kmalloc(output_len); 104
93 if(output == NULL) 105 CATCH_EINTR(err = waitpid(pid, &status, 0));
94 printk("slip_tramp : failed to allocate output " 106 if(err < 0)
95 "buffer\n"); 107 err = errno;
96 108 else if(!WIFEXITED(status) || (WEXITSTATUS(status) != 0)){
97 os_close_file(fds[1]); 109 printk("'%s' didn't exit with status 0\n", argv[0]);
98 read_output(fds[0], output, output_len); 110 err = -EINVAL;
99 if(output != NULL){
100 printk("%s", output);
101 kfree(output);
102 }
103 CATCH_EINTR(err = waitpid(pid, &status, 0));
104 if(err < 0)
105 err = errno;
106 else if(!WIFEXITED(status) || (WEXITSTATUS(status) != 0)){
107 printk("'%s' didn't exit with status 0\n", argv[0]);
108 err = -EINVAL;
109 }
110 } 111 }
112 else err = 0;
111 113
112 os_close_file(fds[0]); 114 os_close_file(fds[0]);
113 115
114 return(err); 116out_free:
117 kfree(output);
118 return err;
119
120out_close:
121 os_close_file(fds[0]);
122 os_close_file(fds[1]);
123out:
124 return err;
115} 125}
116 126
117static int slip_open(void *data) 127static int slip_open(void *data)
@@ -123,21 +133,26 @@ static int slip_open(void *data)
123 NULL }; 133 NULL };
124 int sfd, mfd, err; 134 int sfd, mfd, err;
125 135
126 mfd = get_pty(); 136 err = get_pty();
127 if(mfd < 0){ 137 if(err < 0){
128 printk("umn : Failed to open pty, err = %d\n", -mfd); 138 printk("slip-open : Failed to open pty, err = %d\n", -err);
129 return(mfd); 139 goto out;
130 } 140 }
131 sfd = os_open_file(ptsname(mfd), of_rdwr(OPENFLAGS()), 0); 141 mfd = err;
132 if(sfd < 0){ 142
133 printk("Couldn't open tty for slip line, err = %d\n", -sfd); 143 err = os_open_file(ptsname(mfd), of_rdwr(OPENFLAGS()), 0);
134 os_close_file(mfd); 144 if(err < 0){
135 return(sfd); 145 printk("Couldn't open tty for slip line, err = %d\n", -err);
146 goto out_close;
136 } 147 }
137 if(set_up_tty(sfd)) return(-1); 148 sfd = err;
149
150 if(set_up_tty(sfd))
151 goto out_close2;
152
138 pri->slave = sfd; 153 pri->slave = sfd;
139 pri->pos = 0; 154 pri->slip.pos = 0;
140 pri->esc = 0; 155 pri->slip.esc = 0;
141 if(pri->gate_addr != NULL){ 156 if(pri->gate_addr != NULL){
142 sprintf(version_buf, "%d", UML_NET_VERSION); 157 sprintf(version_buf, "%d", UML_NET_VERSION);
143 strcpy(gate_buf, pri->gate_addr); 158 strcpy(gate_buf, pri->gate_addr);
@@ -146,12 +161,12 @@ static int slip_open(void *data)
146 161
147 if(err < 0){ 162 if(err < 0){
148 printk("slip_tramp failed - err = %d\n", -err); 163 printk("slip_tramp failed - err = %d\n", -err);
149 return(err); 164 goto out_close2;
150 } 165 }
151 err = os_get_ifname(pri->slave, pri->name); 166 err = os_get_ifname(pri->slave, pri->name);
152 if(err < 0){ 167 if(err < 0){
153 printk("get_ifname failed, err = %d\n", -err); 168 printk("get_ifname failed, err = %d\n", -err);
154 return(err); 169 goto out_close2;
155 } 170 }
156 iter_addresses(pri->dev, open_addr, pri->name); 171 iter_addresses(pri->dev, open_addr, pri->name);
157 } 172 }
@@ -160,10 +175,16 @@ static int slip_open(void *data)
160 if(err < 0){ 175 if(err < 0){
161 printk("Failed to set slip discipline encapsulation - " 176 printk("Failed to set slip discipline encapsulation - "
162 "err = %d\n", -err); 177 "err = %d\n", -err);
163 return(err); 178 goto out_close2;
164 } 179 }
165 } 180 }
166 return(mfd); 181 return(mfd);
182out_close2:
183 os_close_file(sfd);
184out_close:
185 os_close_file(mfd);
186out:
187 return err;
167} 188}
168 189
169static void slip_close(int fd, void *data) 190static void slip_close(int fd, void *data)
@@ -190,48 +211,12 @@ static void slip_close(int fd, void *data)
190 211
191int slip_user_read(int fd, void *buf, int len, struct slip_data *pri) 212int slip_user_read(int fd, void *buf, int len, struct slip_data *pri)
192{ 213{
193 int i, n, size, start; 214 return slip_proto_read(fd, buf, len, &pri->slip);
194
195 if(pri->more>0) {
196 i = 0;
197 while(i < pri->more) {
198 size = slip_unesc(pri->ibuf[i++],
199 pri->ibuf, &pri->pos, &pri->esc);
200 if(size){
201 memcpy(buf, pri->ibuf, size);
202 memmove(pri->ibuf, &pri->ibuf[i], pri->more-i);
203 pri->more=pri->more-i;
204 return(size);
205 }
206 }
207 pri->more=0;
208 }
209
210 n = net_read(fd, &pri->ibuf[pri->pos], sizeof(pri->ibuf) - pri->pos);
211 if(n <= 0) return(n);
212
213 start = pri->pos;
214 for(i = 0; i < n; i++){
215 size = slip_unesc(pri->ibuf[start + i],
216 pri->ibuf, &pri->pos, &pri->esc);
217 if(size){
218 memcpy(buf, pri->ibuf, size);
219 memmove(pri->ibuf, &pri->ibuf[start+i+1], n-(i+1));
220 pri->more=n-(i+1);
221 return(size);
222 }
223 }
224 return(0);
225} 215}
226 216
227int slip_user_write(int fd, void *buf, int len, struct slip_data *pri) 217int slip_user_write(int fd, void *buf, int len, struct slip_data *pri)
228{ 218{
229 int actual, n; 219 return slip_proto_write(fd, buf, len, &pri->slip);
230
231 actual = slip_esc(buf, pri->obuf, len);
232 n = net_write(fd, pri->obuf, actual);
233 if(n < 0) return(n);
234 else return(len);
235} 220}
236 221
237static int slip_set_mtu(int mtu, void *data) 222static int slip_set_mtu(int mtu, void *data)
@@ -267,14 +252,3 @@ struct net_user_info slip_user_info = {
267 .delete_address = slip_del_addr, 252 .delete_address = slip_del_addr,
268 .max_packet = BUF_SIZE 253 .max_packet = BUF_SIZE
269}; 254};
270
271/*
272 * Overrides for Emacs so that we follow Linus's tabbing style.
273 * Emacs will notice this stuff at the end of the file and automatically
274 * adjust the settings for this buffer only. This must remain at the end
275 * of the file.
276 * ---------------------------------------------------------------------------
277 * Local variables:
278 * c-file-style: "linux"
279 * End:
280 */
diff --git a/arch/um/drivers/slirp.h b/arch/um/drivers/slirp.h
index 04e407d1e44a..6cf88ab580c9 100644
--- a/arch/um/drivers/slirp.h
+++ b/arch/um/drivers/slirp.h
@@ -1,10 +1,7 @@
1#ifndef __UM_SLIRP_H 1#ifndef __UM_SLIRP_H
2#define __UM_SLIRP_H 2#define __UM_SLIRP_H
3 3
4#define BUF_SIZE 1500 4#include "slip_common.h"
5 /* two bytes each for a (pathological) max packet of escaped chars + *
6 * terminating END char + initial END char */
7#define ENC_BUF_SIZE (2 * BUF_SIZE + 2)
8 5
9#define SLIRP_MAX_ARGS 100 6#define SLIRP_MAX_ARGS 100
10/* 7/*
@@ -24,28 +21,13 @@ struct slirp_data {
24 struct arg_list_dummy_wrapper argw; 21 struct arg_list_dummy_wrapper argw;
25 int pid; 22 int pid;
26 int slave; 23 int slave;
27 char ibuf[ENC_BUF_SIZE]; 24 struct slip_proto slip;
28 char obuf[ENC_BUF_SIZE];
29 int more; /* more data: do not read fd until ibuf has been drained */
30 int pos;
31 int esc;
32}; 25};
33 26
34extern struct net_user_info slirp_user_info; 27extern struct net_user_info slirp_user_info;
35 28
36extern int set_umn_addr(int fd, char *addr, char *ptp_addr);
37extern int slirp_user_read(int fd, void *buf, int len, struct slirp_data *pri); 29extern int slirp_user_read(int fd, void *buf, int len, struct slirp_data *pri);
38extern int slirp_user_write(int fd, void *buf, int len, struct slirp_data *pri); 30extern int slirp_user_write(int fd, void *buf, int len,
31 struct slirp_data *pri);
39 32
40#endif 33#endif
41
42/*
43 * Overrides for Emacs so that we follow Linus's tabbing style.
44 * Emacs will notice this stuff at the end of the file and automatically
45 * adjust the settings for this buffer only. This must remain at the end
46 * of the file.
47 * ---------------------------------------------------------------------------
48 * Local variables:
49 * c-file-style: "linux"
50 * End:
51 */
diff --git a/arch/um/drivers/slirp_kern.c b/arch/um/drivers/slirp_kern.c
index c9d6b52a831d..9864d27afdbe 100644
--- a/arch/um/drivers/slirp_kern.c
+++ b/arch/um/drivers/slirp_kern.c
@@ -25,10 +25,7 @@ void slirp_init(struct net_device *dev, void *data)
25 { .argw = init->argw, 25 { .argw = init->argw,
26 .pid = -1, 26 .pid = -1,
27 .slave = -1, 27 .slave = -1,
28 .ibuf = { '\0' }, 28 .slip = SLIP_PROTO_INIT,
29 .obuf = { '\0' },
30 .pos = 0,
31 .esc = 0,
32 .dev = dev }); 29 .dev = dev });
33 30
34 dev->init = NULL; 31 dev->init = NULL;
diff --git a/arch/um/drivers/slirp_user.c b/arch/um/drivers/slirp_user.c
index c322515c71cc..8d91f663d82c 100644
--- a/arch/um/drivers/slirp_user.c
+++ b/arch/um/drivers/slirp_user.c
@@ -12,7 +12,7 @@
12#include "user.h" 12#include "user.h"
13#include "net_user.h" 13#include "net_user.h"
14#include "slirp.h" 14#include "slirp.h"
15#include "slip_proto.h" 15#include "slip_common.h"
16#include "helper.h" 16#include "helper.h"
17#include "os.h" 17#include "os.h"
18 18
@@ -48,47 +48,32 @@ static int slirp_tramp(char **argv, int fd)
48 return(pid); 48 return(pid);
49} 49}
50 50
51/* XXX This is just a trivial wrapper around os_pipe */
52static int slirp_datachan(int *mfd, int *sfd)
53{
54 int fds[2], err;
55
56 err = os_pipe(fds, 1, 1);
57 if(err < 0){
58 printk("slirp_datachan: Failed to open pipe, err = %d\n", -err);
59 return(err);
60 }
61
62 *mfd = fds[0];
63 *sfd = fds[1];
64 return(0);
65}
66
67static int slirp_open(void *data) 51static int slirp_open(void *data)
68{ 52{
69 struct slirp_data *pri = data; 53 struct slirp_data *pri = data;
70 int sfd, mfd, pid, err; 54 int fds[2], pid, err;
71 55
72 err = slirp_datachan(&mfd, &sfd); 56 err = os_pipe(fds, 1, 1);
73 if(err) 57 if(err)
74 return(err); 58 return(err);
75 59
76 pid = slirp_tramp(pri->argw.argv, sfd); 60 err = slirp_tramp(pri->argw.argv, fds[1]);
77 61 if(err < 0){
78 if(pid < 0){ 62 printk("slirp_tramp failed - errno = %d\n", -err);
79 printk("slirp_tramp failed - errno = %d\n", -pid); 63 goto out;
80 os_close_file(sfd);
81 os_close_file(mfd);
82 return(pid);
83 } 64 }
84 65 pid = err;
85 pri->slave = sfd; 66
86 pri->pos = 0; 67 pri->slave = fds[1];
87 pri->esc = 0; 68 pri->slip.pos = 0;
88 69 pri->slip.esc = 0;
89 pri->pid = pid; 70 pri->pid = err;
90 71
91 return(mfd); 72 return(fds[0]);
73out:
74 os_close_file(fds[0]);
75 os_close_file(fds[1]);
76 return err;
92} 77}
93 78
94static void slirp_close(int fd, void *data) 79static void slirp_close(int fd, void *data)
@@ -129,48 +114,12 @@ static void slirp_close(int fd, void *data)
129 114
130int slirp_user_read(int fd, void *buf, int len, struct slirp_data *pri) 115int slirp_user_read(int fd, void *buf, int len, struct slirp_data *pri)
131{ 116{
132 int i, n, size, start; 117 return slip_proto_read(fd, buf, len, &pri->slip);
133
134 if(pri->more>0) {
135 i = 0;
136 while(i < pri->more) {
137 size = slip_unesc(pri->ibuf[i++],
138 pri->ibuf,&pri->pos,&pri->esc);
139 if(size){
140 memcpy(buf, pri->ibuf, size);
141 memmove(pri->ibuf, &pri->ibuf[i], pri->more-i);
142 pri->more=pri->more-i;
143 return(size);
144 }
145 }
146 pri->more=0;
147 }
148
149 n = net_read(fd, &pri->ibuf[pri->pos], sizeof(pri->ibuf) - pri->pos);
150 if(n <= 0) return(n);
151
152 start = pri->pos;
153 for(i = 0; i < n; i++){
154 size = slip_unesc(pri->ibuf[start + i],
155 pri->ibuf,&pri->pos,&pri->esc);
156 if(size){
157 memcpy(buf, pri->ibuf, size);
158 memmove(pri->ibuf, &pri->ibuf[start+i+1], n-(i+1));
159 pri->more=n-(i+1);
160 return(size);
161 }
162 }
163 return(0);
164} 118}
165 119
166int slirp_user_write(int fd, void *buf, int len, struct slirp_data *pri) 120int slirp_user_write(int fd, void *buf, int len, struct slirp_data *pri)
167{ 121{
168 int actual, n; 122 return slip_proto_write(fd, buf, len, &pri->slip);
169
170 actual = slip_esc(buf, pri->obuf, len);
171 n = net_write(fd, pri->obuf, actual);
172 if(n < 0) return(n);
173 else return(len);
174} 123}
175 124
176static int slirp_set_mtu(int mtu, void *data) 125static int slirp_set_mtu(int mtu, void *data)
@@ -188,14 +137,3 @@ struct net_user_info slirp_user_info = {
188 .delete_address = NULL, 137 .delete_address = NULL,
189 .max_packet = BUF_SIZE 138 .max_packet = BUF_SIZE
190}; 139};
191
192/*
193 * Overrides for Emacs so that we follow Linus's tabbing style.
194 * Emacs will notice this stuff at the end of the file and automatically
195 * adjust the settings for this buffer only. This must remain at the end
196 * of the file.
197 * ---------------------------------------------------------------------------
198 * Local variables:
199 * c-file-style: "linux"
200 * End:
201 */
diff --git a/arch/um/drivers/stderr_console.c b/arch/um/drivers/stderr_console.c
index 98565b53d170..429ae8e6c7e5 100644
--- a/arch/um/drivers/stderr_console.c
+++ b/arch/um/drivers/stderr_console.c
@@ -22,9 +22,9 @@ static void stderr_console_write(struct console *console, const char *string,
22} 22}
23 23
24static struct console stderr_console = { 24static struct console stderr_console = {
25 .name "stderr", 25 .name = "stderr",
26 .write stderr_console_write, 26 .write = stderr_console_write,
27 .flags CON_PRINTBUFFER, 27 .flags = CON_PRINTBUFFER,
28}; 28};
29 29
30static int __init stderr_console_init(void) 30static int __init stderr_console_init(void)
diff --git a/arch/um/include/mconsole.h b/arch/um/include/mconsole.h
index 9fbe3083fdd8..cfa368e045a5 100644
--- a/arch/um/include/mconsole.h
+++ b/arch/um/include/mconsole.h
@@ -56,7 +56,7 @@ struct mc_request
56 int as_interrupt; 56 int as_interrupt;
57 57
58 int originating_fd; 58 int originating_fd;
59 int originlen; 59 unsigned int originlen;
60 unsigned char origin[128]; /* sockaddr_un */ 60 unsigned char origin[128]; /* sockaddr_un */
61 61
62 struct mconsole_request request; 62 struct mconsole_request request;
diff --git a/arch/um/include/net_user.h b/arch/um/include/net_user.h
index 36807b796e9f..89885a77a771 100644
--- a/arch/um/include/net_user.h
+++ b/arch/um/include/net_user.h
@@ -35,7 +35,7 @@ extern void *get_output_buffer(int *len_out);
35extern void free_output_buffer(void *buffer); 35extern void free_output_buffer(void *buffer);
36 36
37extern int tap_open_common(void *dev, char *gate_addr); 37extern int tap_open_common(void *dev, char *gate_addr);
38extern void tap_check_ips(char *gate_addr, char *eth_addr); 38extern void tap_check_ips(char *gate_addr, unsigned char *eth_addr);
39 39
40extern void read_output(int fd, char *output_out, int len); 40extern void read_output(int fd, char *output_out, int len);
41 41
diff --git a/arch/um/include/os.h b/arch/um/include/os.h
index d246d5a24609..881d2988d2d8 100644
--- a/arch/um/include/os.h
+++ b/arch/um/include/os.h
@@ -136,7 +136,7 @@ extern int os_seek_file(int fd, __u64 offset);
136extern int os_open_file(char *file, struct openflags flags, int mode); 136extern int os_open_file(char *file, struct openflags flags, int mode);
137extern int os_read_file(int fd, void *buf, int len); 137extern int os_read_file(int fd, void *buf, int len);
138extern int os_write_file(int fd, const void *buf, int count); 138extern int os_write_file(int fd, const void *buf, int count);
139extern int os_file_size(char *file, long long *size_out); 139extern int os_file_size(char *file, unsigned long long *size_out);
140extern int os_file_modtime(char *file, unsigned long *modtime); 140extern int os_file_modtime(char *file, unsigned long *modtime);
141extern int os_pipe(int *fd, int stream, int close_on_exec); 141extern int os_pipe(int *fd, int stream, int close_on_exec);
142extern int os_set_fd_async(int fd, int owner); 142extern int os_set_fd_async(int fd, int owner);
diff --git a/arch/um/include/sysdep-i386/ptrace.h b/arch/um/include/sysdep-i386/ptrace.h
index 6eaeb9919983..c8ee9559f3ab 100644
--- a/arch/um/include/sysdep-i386/ptrace.h
+++ b/arch/um/include/sysdep-i386/ptrace.h
@@ -8,6 +8,8 @@
8 8
9#include "uml-config.h" 9#include "uml-config.h"
10#include "user_constants.h" 10#include "user_constants.h"
11#include "sysdep/faultinfo.h"
12#include "choose-mode.h"
11 13
12#define MAX_REG_NR (UM_FRAME_SIZE / sizeof(unsigned long)) 14#define MAX_REG_NR (UM_FRAME_SIZE / sizeof(unsigned long))
13#define MAX_REG_OFFSET (UM_FRAME_SIZE) 15#define MAX_REG_OFFSET (UM_FRAME_SIZE)
@@ -58,9 +60,6 @@ extern int sysemu_supported;
58#define PTRACE_SYSEMU_SINGLESTEP 32 60#define PTRACE_SYSEMU_SINGLESTEP 32
59#endif 61#endif
60 62
61#include "sysdep/faultinfo.h"
62#include "choose-mode.h"
63
64union uml_pt_regs { 63union uml_pt_regs {
65#ifdef UML_CONFIG_MODE_TT 64#ifdef UML_CONFIG_MODE_TT
66 struct tt_regs { 65 struct tt_regs {
diff --git a/arch/um/include/user_util.h b/arch/um/include/user_util.h
index b8c5b8a95250..7b6a24dfd302 100644
--- a/arch/um/include/user_util.h
+++ b/arch/um/include/user_util.h
@@ -41,9 +41,6 @@ extern unsigned long highmem;
41extern char host_info[]; 41extern char host_info[];
42 42
43extern char saved_command_line[]; 43extern char saved_command_line[];
44extern char command_line[];
45
46extern char *tempdir;
47 44
48extern unsigned long _stext, _etext, _sdata, _edata, __bss_start, _end; 45extern unsigned long _stext, _etext, _sdata, _edata, __bss_start, _end;
49extern unsigned long _unprotected_end; 46extern unsigned long _unprotected_end;
diff --git a/arch/um/kernel/main.c b/arch/um/kernel/main.c
index e42e6364ca13..e59f58152678 100644
--- a/arch/um/kernel/main.c
+++ b/arch/um/kernel/main.c
@@ -24,8 +24,6 @@
24#include "mode.h" 24#include "mode.h"
25#include "choose-mode.h" 25#include "choose-mode.h"
26#include "uml-config.h" 26#include "uml-config.h"
27#include "irq_user.h"
28#include "time_user.h"
29#include "os.h" 27#include "os.h"
30 28
31/* Set in set_stklim, which is called from main and __wrap_malloc. 29/* Set in set_stklim, which is called from main and __wrap_malloc.
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c
index 51f8e5a8ac6a..1b5ef3e96c71 100644
--- a/arch/um/kernel/process.c
+++ b/arch/um/kernel/process.c
@@ -30,7 +30,6 @@
30#include "init.h" 30#include "init.h"
31#include "os.h" 31#include "os.h"
32#include "uml-config.h" 32#include "uml-config.h"
33#include "ptrace_user.h"
34#include "choose-mode.h" 33#include "choose-mode.h"
35#include "mode.h" 34#include "mode.h"
36#ifdef UML_CONFIG_MODE_SKAS 35#ifdef UML_CONFIG_MODE_SKAS
@@ -131,7 +130,7 @@ int start_fork_tramp(void *thread_arg, unsigned long temp_stack,
131 return(arg.pid); 130 return(arg.pid);
132} 131}
133 132
134static int ptrace_child(void *arg) 133static int ptrace_child(void)
135{ 134{
136 int ret; 135 int ret;
137 int pid = os_getpid(), ppid = getppid(); 136 int pid = os_getpid(), ppid = getppid();
@@ -160,20 +159,16 @@ static int ptrace_child(void *arg)
160 _exit(ret); 159 _exit(ret);
161} 160}
162 161
163static int start_ptraced_child(void **stack_out) 162static int start_ptraced_child(void)
164{ 163{
165 void *stack;
166 unsigned long sp;
167 int pid, n, status; 164 int pid, n, status;
168 165
169 stack = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, 166 pid = fork();
170 MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); 167 if(pid == 0)
171 if(stack == MAP_FAILED) 168 ptrace_child();
172 panic("check_ptrace : mmap failed, errno = %d", errno); 169
173 sp = (unsigned long) stack + PAGE_SIZE - sizeof(void *);
174 pid = clone(ptrace_child, (void *) sp, SIGCHLD, NULL);
175 if(pid < 0) 170 if(pid < 0)
176 panic("check_ptrace : clone failed, errno = %d", errno); 171 panic("check_ptrace : fork failed, errno = %d", errno);
177 CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); 172 CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED));
178 if(n < 0) 173 if(n < 0)
179 panic("check_ptrace : wait failed, errno = %d", errno); 174 panic("check_ptrace : wait failed, errno = %d", errno);
@@ -181,7 +176,6 @@ static int start_ptraced_child(void **stack_out)
181 panic("check_ptrace : expected SIGSTOP, got status = %d", 176 panic("check_ptrace : expected SIGSTOP, got status = %d",
182 status); 177 status);
183 178
184 *stack_out = stack;
185 return(pid); 179 return(pid);
186} 180}
187 181
@@ -189,12 +183,12 @@ static int start_ptraced_child(void **stack_out)
189 * just avoid using sysemu, not panic, but only if SYSEMU features are broken. 183 * just avoid using sysemu, not panic, but only if SYSEMU features are broken.
190 * So only for SYSEMU features we test mustpanic, while normal host features 184 * So only for SYSEMU features we test mustpanic, while normal host features
191 * must work anyway!*/ 185 * must work anyway!*/
192static int stop_ptraced_child(int pid, void *stack, int exitcode, int mustpanic) 186static int stop_ptraced_child(int pid, int exitcode, int mustexit)
193{ 187{
194 int status, n, ret = 0; 188 int status, n, ret = 0;
195 189
196 if(ptrace(PTRACE_CONT, pid, 0, 0) < 0) 190 if(ptrace(PTRACE_CONT, pid, 0, 0) < 0)
197 panic("check_ptrace : ptrace failed, errno = %d", errno); 191 panic("stop_ptraced_child : ptrace failed, errno = %d", errno);
198 CATCH_EINTR(n = waitpid(pid, &status, 0)); 192 CATCH_EINTR(n = waitpid(pid, &status, 0));
199 if(!WIFEXITED(status) || (WEXITSTATUS(status) != exitcode)) { 193 if(!WIFEXITED(status) || (WEXITSTATUS(status) != exitcode)) {
200 int exit_with = WEXITSTATUS(status); 194 int exit_with = WEXITSTATUS(status);
@@ -205,15 +199,13 @@ static int stop_ptraced_child(int pid, void *stack, int exitcode, int mustpanic)
205 printk("check_ptrace : child exited with exitcode %d, while " 199 printk("check_ptrace : child exited with exitcode %d, while "
206 "expecting %d; status 0x%x", exit_with, 200 "expecting %d; status 0x%x", exit_with,
207 exitcode, status); 201 exitcode, status);
208 if (mustpanic) 202 if (mustexit)
209 panic("\n"); 203 panic("\n");
210 else 204 else
211 printk("\n"); 205 printk("\n");
212 ret = -1; 206 ret = -1;
213 } 207 }
214 208
215 if(munmap(stack, PAGE_SIZE) < 0)
216 panic("check_ptrace : munmap failed, errno = %d", errno);
217 return ret; 209 return ret;
218} 210}
219 211
@@ -235,12 +227,11 @@ __uml_setup("nosysemu", nosysemu_cmd_param,
235 227
236static void __init check_sysemu(void) 228static void __init check_sysemu(void)
237{ 229{
238 void *stack;
239 int pid, syscall, n, status, count=0; 230 int pid, syscall, n, status, count=0;
240 231
241 printk("Checking syscall emulation patch for ptrace..."); 232 printk("Checking syscall emulation patch for ptrace...");
242 sysemu_supported = 0; 233 sysemu_supported = 0;
243 pid = start_ptraced_child(&stack); 234 pid = start_ptraced_child();
244 235
245 if(ptrace(PTRACE_SYSEMU, pid, 0, 0) < 0) 236 if(ptrace(PTRACE_SYSEMU, pid, 0, 0) < 0)
246 goto fail; 237 goto fail;
@@ -258,7 +249,7 @@ static void __init check_sysemu(void)
258 panic("check_sysemu : failed to modify system " 249 panic("check_sysemu : failed to modify system "
259 "call return, errno = %d", errno); 250 "call return, errno = %d", errno);
260 251
261 if (stop_ptraced_child(pid, stack, 0, 0) < 0) 252 if (stop_ptraced_child(pid, 0, 0) < 0)
262 goto fail_stopped; 253 goto fail_stopped;
263 254
264 sysemu_supported = 1; 255 sysemu_supported = 1;
@@ -266,7 +257,7 @@ static void __init check_sysemu(void)
266 set_using_sysemu(!force_sysemu_disabled); 257 set_using_sysemu(!force_sysemu_disabled);
267 258
268 printk("Checking advanced syscall emulation patch for ptrace..."); 259 printk("Checking advanced syscall emulation patch for ptrace...");
269 pid = start_ptraced_child(&stack); 260 pid = start_ptraced_child();
270 while(1){ 261 while(1){
271 count++; 262 count++;
272 if(ptrace(PTRACE_SYSEMU_SINGLESTEP, pid, 0, 0) < 0) 263 if(ptrace(PTRACE_SYSEMU_SINGLESTEP, pid, 0, 0) < 0)
@@ -291,7 +282,7 @@ static void __init check_sysemu(void)
291 break; 282 break;
292 } 283 }
293 } 284 }
294 if (stop_ptraced_child(pid, stack, 0, 0) < 0) 285 if (stop_ptraced_child(pid, 0, 0) < 0)
295 goto fail_stopped; 286 goto fail_stopped;
296 287
297 sysemu_supported = 2; 288 sysemu_supported = 2;
@@ -302,18 +293,17 @@ static void __init check_sysemu(void)
302 return; 293 return;
303 294
304fail: 295fail:
305 stop_ptraced_child(pid, stack, 1, 0); 296 stop_ptraced_child(pid, 1, 0);
306fail_stopped: 297fail_stopped:
307 printk("missing\n"); 298 printk("missing\n");
308} 299}
309 300
310void __init check_ptrace(void) 301void __init check_ptrace(void)
311{ 302{
312 void *stack;
313 int pid, syscall, n, status; 303 int pid, syscall, n, status;
314 304
315 printk("Checking that ptrace can change system call numbers..."); 305 printk("Checking that ptrace can change system call numbers...");
316 pid = start_ptraced_child(&stack); 306 pid = start_ptraced_child();
317 307
318 if (ptrace(PTRACE_OLDSETOPTIONS, pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0) 308 if (ptrace(PTRACE_OLDSETOPTIONS, pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0)
319 panic("check_ptrace: PTRACE_SETOPTIONS failed, errno = %d", errno); 309 panic("check_ptrace: PTRACE_SETOPTIONS failed, errno = %d", errno);
@@ -340,7 +330,7 @@ void __init check_ptrace(void)
340 break; 330 break;
341 } 331 }
342 } 332 }
343 stop_ptraced_child(pid, stack, 0, 1); 333 stop_ptraced_child(pid, 0, 1);
344 printk("OK\n"); 334 printk("OK\n");
345 check_sysemu(); 335 check_sysemu();
346} 336}
@@ -372,11 +362,10 @@ void forward_pending_sigio(int target)
372static inline int check_skas3_ptrace_support(void) 362static inline int check_skas3_ptrace_support(void)
373{ 363{
374 struct ptrace_faultinfo fi; 364 struct ptrace_faultinfo fi;
375 void *stack;
376 int pid, n, ret = 1; 365 int pid, n, ret = 1;
377 366
378 printf("Checking for the skas3 patch in the host..."); 367 printf("Checking for the skas3 patch in the host...");
379 pid = start_ptraced_child(&stack); 368 pid = start_ptraced_child();
380 369
381 n = ptrace(PTRACE_FAULTINFO, pid, 0, &fi); 370 n = ptrace(PTRACE_FAULTINFO, pid, 0, &fi);
382 if (n < 0) { 371 if (n < 0) {
@@ -391,7 +380,7 @@ static inline int check_skas3_ptrace_support(void)
391 } 380 }
392 381
393 init_registers(pid); 382 init_registers(pid);
394 stop_ptraced_child(pid, stack, 1, 1); 383 stop_ptraced_child(pid, 1, 1);
395 384
396 return(ret); 385 return(ret);
397} 386}
diff --git a/arch/um/kernel/skas/process_kern.c b/arch/um/kernel/skas/process_kern.c
index ab5d3271da0b..fc71ef295782 100644
--- a/arch/um/kernel/skas/process_kern.c
+++ b/arch/um/kernel/skas/process_kern.c
@@ -68,8 +68,11 @@ void new_thread_handler(int sig)
68 * 0 if it just exits 68 * 0 if it just exits
69 */ 69 */
70 n = run_kernel_thread(fn, arg, &current->thread.exec_buf); 70 n = run_kernel_thread(fn, arg, &current->thread.exec_buf);
71 if(n == 1) 71 if(n == 1){
72 /* Handle any immediate reschedules or signals */
73 interrupt_end();
72 userspace(&current->thread.regs.regs); 74 userspace(&current->thread.regs.regs);
75 }
73 else do_exit(0); 76 else do_exit(0);
74} 77}
75 78
@@ -96,6 +99,8 @@ void fork_handler(int sig)
96 schedule_tail(current->thread.prev_sched); 99 schedule_tail(current->thread.prev_sched);
97 current->thread.prev_sched = NULL; 100 current->thread.prev_sched = NULL;
98 101
102 /* Handle any immediate reschedules or signals */
103 interrupt_end();
99 userspace(&current->thread.regs.regs); 104 userspace(&current->thread.regs.regs);
100} 105}
101 106
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c
index 418427107b29..8736d098f0ee 100644
--- a/arch/um/kernel/um_arch.c
+++ b/arch/um/kernel/um_arch.c
@@ -26,7 +26,6 @@
26#include "asm/setup.h" 26#include "asm/setup.h"
27#include "ubd_user.h" 27#include "ubd_user.h"
28#include "asm/current.h" 28#include "asm/current.h"
29#include "asm/setup.h"
30#include "user_util.h" 29#include "user_util.h"
31#include "kern_util.h" 30#include "kern_util.h"
32#include "kern.h" 31#include "kern.h"
diff --git a/arch/um/os-Linux/elf_aux.c b/arch/um/os-Linux/elf_aux.c
index 9aee0b62ebca..f0d6060e3e57 100644
--- a/arch/um/os-Linux/elf_aux.c
+++ b/arch/um/os-Linux/elf_aux.c
@@ -45,7 +45,11 @@ __init void scan_elf_aux( char **envp)
45 elf_aux_hwcap = auxv->a_un.a_val; 45 elf_aux_hwcap = auxv->a_un.a_val;
46 break; 46 break;
47 case AT_PLATFORM: 47 case AT_PLATFORM:
48 elf_aux_platform = auxv->a_un.a_ptr; 48 /* elf.h removed the pointer elements from
49 * a_un, so we have to use a_val, which is
50 * all that's left.
51 */
52 elf_aux_platform = (char *) auxv->a_un.a_val;
49 break; 53 break;
50 case AT_PAGESZ: 54 case AT_PAGESZ:
51 page_size = auxv->a_un.a_val; 55 page_size = auxv->a_un.a_val;
diff --git a/arch/um/os-Linux/file.c b/arch/um/os-Linux/file.c
index 77d4066d1af8..fd45bb260907 100644
--- a/arch/um/os-Linux/file.c
+++ b/arch/um/os-Linux/file.c
@@ -363,7 +363,7 @@ int os_write_file(int fd, const void *buf, int len)
363 (int (*)(int, void *, int)) write, copy_to_user_proc)); 363 (int (*)(int, void *, int)) write, copy_to_user_proc));
364} 364}
365 365
366int os_file_size(char *file, long long *size_out) 366int os_file_size(char *file, unsigned long long *size_out)
367{ 367{
368 struct uml_stat buf; 368 struct uml_stat buf;
369 int err; 369 int err;
diff --git a/arch/um/scripts/Makefile.rules b/arch/um/scripts/Makefile.rules
index 0b2491883d9c..98346c711493 100644
--- a/arch/um/scripts/Makefile.rules
+++ b/arch/um/scripts/Makefile.rules
@@ -14,7 +14,7 @@ quiet_cmd_make_link = SYMLINK $@
14cmd_make_link = ln -sf $(srctree)/arch/$(SUBARCH)/$($(notdir $@)-dir)/$(notdir $@) $@ 14cmd_make_link = ln -sf $(srctree)/arch/$(SUBARCH)/$($(notdir $@)-dir)/$(notdir $@) $@
15 15
16# this needs to be before the foreach, because targets does not accept 16# this needs to be before the foreach, because targets does not accept
17# complete paths like $(obj)/$(f). To make sure this works, use a := assignment, 17# complete paths like $(obj)/$(f). To make sure this works, use a := assignment
18# or we will get $(obj)/$(f) in the "targets" value. 18# or we will get $(obj)/$(f) in the "targets" value.
19# Also, this forces you to use the := syntax when assigning to targets. 19# Also, this forces you to use the := syntax when assigning to targets.
20# Otherwise the line below will cause an infinite loop (if you don't know why, 20# Otherwise the line below will cause an infinite loop (if you don't know why,
diff --git a/arch/x86_64/kernel/aperture.c b/arch/x86_64/kernel/aperture.c
index a491f72cc966..504e63474993 100644
--- a/arch/x86_64/kernel/aperture.c
+++ b/arch/x86_64/kernel/aperture.c
@@ -33,12 +33,10 @@ int fallback_aper_force __initdata = 0;
33 33
34int fix_aperture __initdata = 1; 34int fix_aperture __initdata = 1;
35 35
36#define NB_ID_3 (PCI_VENDOR_ID_AMD | (0x1103<<16)) 36/* This code runs before the PCI subsystem is initialized, so just
37 access the northbridge directly. */
37 38
38static struct resource aper_res = { 39#define NB_ID_3 (PCI_VENDOR_ID_AMD | (0x1103<<16))
39 .name = "Aperture",
40 .flags = IORESOURCE_MEM,
41};
42 40
43static u32 __init allocate_aperture(void) 41static u32 __init allocate_aperture(void)
44{ 42{
@@ -55,24 +53,11 @@ static u32 __init allocate_aperture(void)
55 aper_size = (32 * 1024 * 1024) << fallback_aper_order; 53 aper_size = (32 * 1024 * 1024) << fallback_aper_order;
56 54
57 /* 55 /*
58 * Aperture has to be naturally aligned. This means an 2GB 56 * Aperture has to be naturally aligned. This means an 2GB aperture won't
59 * aperture won't have much chances to find a place in the 57 * have much chances to find a place in the lower 4GB of memory.
60 * lower 4GB of memory. Unfortunately we cannot move it up 58 * Unfortunately we cannot move it up because that would make the
61 * because that would make the IOMMU useless. 59 * IOMMU useless.
62 */ 60 */
63
64 /* First try to find some free unused space */
65 if (!allocate_resource(&iomem_resource, &aper_res,
66 aper_size,
67 0, 0xffffffff,
68 aper_size,
69 NULL, NULL)) {
70 printk(KERN_INFO "Putting aperture at %lx-%lx\n",
71 aper_res.start, aper_res.end);
72 return aper_res.start;
73 }
74
75 /* No free space found. Go on to waste some memory... */
76 p = __alloc_bootmem_node(nd0, aper_size, aper_size, 0); 61 p = __alloc_bootmem_node(nd0, aper_size, aper_size, 0);
77 if (!p || __pa(p)+aper_size > 0xffffffff) { 62 if (!p || __pa(p)+aper_size > 0xffffffff) {
78 printk("Cannot allocate aperture memory hole (%p,%uK)\n", 63 printk("Cannot allocate aperture memory hole (%p,%uK)\n",
@@ -81,7 +66,7 @@ static u32 __init allocate_aperture(void)
81 free_bootmem_node(nd0, (unsigned long)p, aper_size); 66 free_bootmem_node(nd0, (unsigned long)p, aper_size);
82 return 0; 67 return 0;
83 } 68 }
84 printk("Mapping aperture over %d KB of precious RAM @ %lx\n", 69 printk("Mapping aperture over %d KB of RAM @ %lx\n",
85 aper_size >> 10, __pa(p)); 70 aper_size >> 10, __pa(p));
86 return (u32)__pa(p); 71 return (u32)__pa(p);
87} 72}
@@ -102,16 +87,10 @@ static int __init aperture_valid(char *name, u64 aper_base, u32 aper_size)
102 printk("Aperture from %s pointing to e820 RAM. Ignoring.\n",name); 87 printk("Aperture from %s pointing to e820 RAM. Ignoring.\n",name);
103 return 0; 88 return 0;
104 } 89 }
105 /* Don't check the resource here because the aperture is usually
106 in an e820 reserved area, and we allocated these earlier. */
107 return 1; 90 return 1;
108} 91}
109 92
110/* 93/* Find a PCI capability */
111 * Find a PCI capability.
112 * This code runs before the PCI subsystem is initialized, so just
113 * access the northbridge directly.
114 */
115static __u32 __init find_cap(int num, int slot, int func, int cap) 94static __u32 __init find_cap(int num, int slot, int func, int cap)
116{ 95{
117 u8 pos; 96 u8 pos;
@@ -276,6 +255,8 @@ void __init iommu_hole_init(void)
276 fallback_aper_force) { 255 fallback_aper_force) {
277 printk("Your BIOS doesn't leave a aperture memory hole\n"); 256 printk("Your BIOS doesn't leave a aperture memory hole\n");
278 printk("Please enable the IOMMU option in the BIOS setup\n"); 257 printk("Please enable the IOMMU option in the BIOS setup\n");
258 printk("This costs you %d MB of RAM\n",
259 32 << fallback_aper_order);
279 260
280 aper_order = fallback_aper_order; 261 aper_order = fallback_aper_order;
281 aper_alloc = allocate_aperture(); 262 aper_alloc = allocate_aperture();
diff --git a/drivers/block/cfq-iosched.c b/drivers/block/cfq-iosched.c
index 0ef7a0065ece..2210bacad56a 100644
--- a/drivers/block/cfq-iosched.c
+++ b/drivers/block/cfq-iosched.c
@@ -1202,13 +1202,16 @@ retry:
1202 if (new_cfqq) { 1202 if (new_cfqq) {
1203 cfqq = new_cfqq; 1203 cfqq = new_cfqq;
1204 new_cfqq = NULL; 1204 new_cfqq = NULL;
1205 } else if (gfp_mask & __GFP_WAIT) { 1205 } else {
1206 spin_unlock_irq(cfqd->queue->queue_lock); 1206 spin_unlock_irq(cfqd->queue->queue_lock);
1207 new_cfqq = kmem_cache_alloc(cfq_pool, gfp_mask); 1207 new_cfqq = kmem_cache_alloc(cfq_pool, gfp_mask);
1208 spin_lock_irq(cfqd->queue->queue_lock); 1208 spin_lock_irq(cfqd->queue->queue_lock);
1209
1210 if (!new_cfqq && !(gfp_mask & __GFP_WAIT))
1211 goto out;
1212
1209 goto retry; 1213 goto retry;
1210 } else 1214 }
1211 goto out;
1212 1215
1213 memset(cfqq, 0, sizeof(*cfqq)); 1216 memset(cfqq, 0, sizeof(*cfqq));
1214 1217
diff --git a/drivers/block/elevator.c b/drivers/block/elevator.c
index 6b79b4314622..89982925f9e2 100644
--- a/drivers/block/elevator.c
+++ b/drivers/block/elevator.c
@@ -220,11 +220,6 @@ void elevator_exit(elevator_t *e)
220 kfree(e); 220 kfree(e);
221} 221}
222 222
223static int elevator_global_init(void)
224{
225 return 0;
226}
227
228int elv_merge(request_queue_t *q, struct request **req, struct bio *bio) 223int elv_merge(request_queue_t *q, struct request **req, struct bio *bio)
229{ 224{
230 elevator_t *e = q->elevator; 225 elevator_t *e = q->elevator;
@@ -322,7 +317,7 @@ void __elv_add_request(request_queue_t *q, struct request *rq, int where,
322 int nrq = q->rq.count[READ] + q->rq.count[WRITE] 317 int nrq = q->rq.count[READ] + q->rq.count[WRITE]
323 - q->in_flight; 318 - q->in_flight;
324 319
325 if (nrq == q->unplug_thresh) 320 if (nrq >= q->unplug_thresh)
326 __generic_unplug_device(q); 321 __generic_unplug_device(q);
327 } 322 }
328 } else 323 } else
@@ -692,8 +687,6 @@ ssize_t elv_iosched_show(request_queue_t *q, char *name)
692 return len; 687 return len;
693} 688}
694 689
695module_init(elevator_global_init);
696
697EXPORT_SYMBOL(elv_add_request); 690EXPORT_SYMBOL(elv_add_request);
698EXPORT_SYMBOL(__elv_add_request); 691EXPORT_SYMBOL(__elv_add_request);
699EXPORT_SYMBOL(elv_requeue_request); 692EXPORT_SYMBOL(elv_requeue_request);
diff --git a/drivers/block/ub.c b/drivers/block/ub.c
index adc4dcc306f4..19c5e59bcfa8 100644
--- a/drivers/block/ub.c
+++ b/drivers/block/ub.c
@@ -51,7 +51,7 @@
51 * This many LUNs per USB device. 51 * This many LUNs per USB device.
52 * Every one of them takes a host, see UB_MAX_HOSTS. 52 * Every one of them takes a host, see UB_MAX_HOSTS.
53 */ 53 */
54#define UB_MAX_LUNS 4 54#define UB_MAX_LUNS 9
55 55
56/* 56/*
57 */ 57 */
@@ -2100,7 +2100,7 @@ static int ub_probe(struct usb_interface *intf,
2100 nluns = rc; 2100 nluns = rc;
2101 break; 2101 break;
2102 } 2102 }
2103 mdelay(100); 2103 msleep(100);
2104 } 2104 }
2105 2105
2106 for (i = 0; i < nluns; i++) { 2106 for (i = 0; i < nluns; i++) {
diff --git a/drivers/char/agp/agp.h b/drivers/char/agp/agp.h
index ad9c11391d81..c1fe013c64f3 100644
--- a/drivers/char/agp/agp.h
+++ b/drivers/char/agp/agp.h
@@ -278,6 +278,8 @@ void agp3_generic_cleanup(void);
278#define AGP_GENERIC_SIZES_ENTRIES 11 278#define AGP_GENERIC_SIZES_ENTRIES 11
279extern struct aper_size_info_16 agp3_generic_sizes[]; 279extern struct aper_size_info_16 agp3_generic_sizes[];
280 280
281#define virt_to_gart(x) (phys_to_gart(virt_to_phys(x)))
282#define gart_to_virt(x) (phys_to_virt(gart_to_phys(x)))
281 283
282extern int agp_off; 284extern int agp_off;
283extern int agp_try_unsupported_boot; 285extern int agp_try_unsupported_boot;
diff --git a/drivers/char/agp/ali-agp.c b/drivers/char/agp/ali-agp.c
index 0212febda654..9c9c9c2247ce 100644
--- a/drivers/char/agp/ali-agp.c
+++ b/drivers/char/agp/ali-agp.c
@@ -150,7 +150,7 @@ static void *m1541_alloc_page(struct agp_bridge_data *bridge)
150 pci_read_config_dword(agp_bridge->dev, ALI_CACHE_FLUSH_CTRL, &temp); 150 pci_read_config_dword(agp_bridge->dev, ALI_CACHE_FLUSH_CTRL, &temp);
151 pci_write_config_dword(agp_bridge->dev, ALI_CACHE_FLUSH_CTRL, 151 pci_write_config_dword(agp_bridge->dev, ALI_CACHE_FLUSH_CTRL,
152 (((temp & ALI_CACHE_FLUSH_ADDR_MASK) | 152 (((temp & ALI_CACHE_FLUSH_ADDR_MASK) |
153 virt_to_phys(addr)) | ALI_CACHE_FLUSH_EN )); 153 virt_to_gart(addr)) | ALI_CACHE_FLUSH_EN ));
154 return addr; 154 return addr;
155} 155}
156 156
@@ -174,7 +174,7 @@ static void m1541_destroy_page(void * addr)
174 pci_read_config_dword(agp_bridge->dev, ALI_CACHE_FLUSH_CTRL, &temp); 174 pci_read_config_dword(agp_bridge->dev, ALI_CACHE_FLUSH_CTRL, &temp);
175 pci_write_config_dword(agp_bridge->dev, ALI_CACHE_FLUSH_CTRL, 175 pci_write_config_dword(agp_bridge->dev, ALI_CACHE_FLUSH_CTRL,
176 (((temp & ALI_CACHE_FLUSH_ADDR_MASK) | 176 (((temp & ALI_CACHE_FLUSH_ADDR_MASK) |
177 virt_to_phys(addr)) | ALI_CACHE_FLUSH_EN)); 177 virt_to_gart(addr)) | ALI_CACHE_FLUSH_EN));
178 agp_generic_destroy_page(addr); 178 agp_generic_destroy_page(addr);
179} 179}
180 180
diff --git a/drivers/char/agp/amd-k7-agp.c b/drivers/char/agp/amd-k7-agp.c
index e62a3c2c44a9..3a41672e4d66 100644
--- a/drivers/char/agp/amd-k7-agp.c
+++ b/drivers/char/agp/amd-k7-agp.c
@@ -43,7 +43,7 @@ static int amd_create_page_map(struct amd_page_map *page_map)
43 43
44 SetPageReserved(virt_to_page(page_map->real)); 44 SetPageReserved(virt_to_page(page_map->real));
45 global_cache_flush(); 45 global_cache_flush();
46 page_map->remapped = ioremap_nocache(virt_to_phys(page_map->real), 46 page_map->remapped = ioremap_nocache(virt_to_gart(page_map->real),
47 PAGE_SIZE); 47 PAGE_SIZE);
48 if (page_map->remapped == NULL) { 48 if (page_map->remapped == NULL) {
49 ClearPageReserved(virt_to_page(page_map->real)); 49 ClearPageReserved(virt_to_page(page_map->real));
@@ -154,7 +154,7 @@ static int amd_create_gatt_table(struct agp_bridge_data *bridge)
154 154
155 agp_bridge->gatt_table_real = (u32 *)page_dir.real; 155 agp_bridge->gatt_table_real = (u32 *)page_dir.real;
156 agp_bridge->gatt_table = (u32 __iomem *)page_dir.remapped; 156 agp_bridge->gatt_table = (u32 __iomem *)page_dir.remapped;
157 agp_bridge->gatt_bus_addr = virt_to_phys(page_dir.real); 157 agp_bridge->gatt_bus_addr = virt_to_gart(page_dir.real);
158 158
159 /* Get the address for the gart region. 159 /* Get the address for the gart region.
160 * This is a bus address even on the alpha, b/c its 160 * This is a bus address even on the alpha, b/c its
@@ -167,7 +167,7 @@ static int amd_create_gatt_table(struct agp_bridge_data *bridge)
167 167
168 /* Calculate the agp offset */ 168 /* Calculate the agp offset */
169 for (i = 0; i < value->num_entries / 1024; i++, addr += 0x00400000) { 169 for (i = 0; i < value->num_entries / 1024; i++, addr += 0x00400000) {
170 writel(virt_to_phys(amd_irongate_private.gatt_pages[i]->real) | 1, 170 writel(virt_to_gart(amd_irongate_private.gatt_pages[i]->real) | 1,
171 page_dir.remapped+GET_PAGE_DIR_OFF(addr)); 171 page_dir.remapped+GET_PAGE_DIR_OFF(addr));
172 readl(page_dir.remapped+GET_PAGE_DIR_OFF(addr)); /* PCI Posting. */ 172 readl(page_dir.remapped+GET_PAGE_DIR_OFF(addr)); /* PCI Posting. */
173 } 173 }
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c
index 399c042f68f0..1407945a5892 100644
--- a/drivers/char/agp/amd64-agp.c
+++ b/drivers/char/agp/amd64-agp.c
@@ -219,7 +219,7 @@ static struct aper_size_info_32 amd_8151_sizes[7] =
219 219
220static int amd_8151_configure(void) 220static int amd_8151_configure(void)
221{ 221{
222 unsigned long gatt_bus = virt_to_phys(agp_bridge->gatt_table_real); 222 unsigned long gatt_bus = virt_to_gart(agp_bridge->gatt_table_real);
223 223
224 /* Configure AGP regs in each x86-64 host bridge. */ 224 /* Configure AGP regs in each x86-64 host bridge. */
225 for_each_nb() { 225 for_each_nb() {
@@ -591,7 +591,7 @@ static void __devexit agp_amd64_remove(struct pci_dev *pdev)
591{ 591{
592 struct agp_bridge_data *bridge = pci_get_drvdata(pdev); 592 struct agp_bridge_data *bridge = pci_get_drvdata(pdev);
593 593
594 release_mem_region(virt_to_phys(bridge->gatt_table_real), 594 release_mem_region(virt_to_gart(bridge->gatt_table_real),
595 amd64_aperture_sizes[bridge->aperture_size_idx].size); 595 amd64_aperture_sizes[bridge->aperture_size_idx].size);
596 agp_remove_bridge(bridge); 596 agp_remove_bridge(bridge);
597 agp_put_bridge(bridge); 597 agp_put_bridge(bridge);
diff --git a/drivers/char/agp/ati-agp.c b/drivers/char/agp/ati-agp.c
index a65f8827c283..e572ced9100a 100644
--- a/drivers/char/agp/ati-agp.c
+++ b/drivers/char/agp/ati-agp.c
@@ -61,7 +61,7 @@ static int ati_create_page_map(ati_page_map *page_map)
61 61
62 SetPageReserved(virt_to_page(page_map->real)); 62 SetPageReserved(virt_to_page(page_map->real));
63 err = map_page_into_agp(virt_to_page(page_map->real)); 63 err = map_page_into_agp(virt_to_page(page_map->real));
64 page_map->remapped = ioremap_nocache(virt_to_phys(page_map->real), 64 page_map->remapped = ioremap_nocache(virt_to_gart(page_map->real),
65 PAGE_SIZE); 65 PAGE_SIZE);
66 if (page_map->remapped == NULL || err) { 66 if (page_map->remapped == NULL || err) {
67 ClearPageReserved(virt_to_page(page_map->real)); 67 ClearPageReserved(virt_to_page(page_map->real));
@@ -343,7 +343,7 @@ static int ati_create_gatt_table(struct agp_bridge_data *bridge)
343 343
344 agp_bridge->gatt_table_real = (u32 *)page_dir.real; 344 agp_bridge->gatt_table_real = (u32 *)page_dir.real;
345 agp_bridge->gatt_table = (u32 __iomem *) page_dir.remapped; 345 agp_bridge->gatt_table = (u32 __iomem *) page_dir.remapped;
346 agp_bridge->gatt_bus_addr = virt_to_bus(page_dir.real); 346 agp_bridge->gatt_bus_addr = virt_to_gart(page_dir.real);
347 347
348 /* Write out the size register */ 348 /* Write out the size register */
349 current_size = A_SIZE_LVL2(agp_bridge->current_size); 349 current_size = A_SIZE_LVL2(agp_bridge->current_size);
@@ -373,7 +373,7 @@ static int ati_create_gatt_table(struct agp_bridge_data *bridge)
373 373
374 /* Calculate the agp offset */ 374 /* Calculate the agp offset */
375 for(i = 0; i < value->num_entries / 1024; i++, addr += 0x00400000) { 375 for(i = 0; i < value->num_entries / 1024; i++, addr += 0x00400000) {
376 writel(virt_to_bus(ati_generic_private.gatt_pages[i]->real) | 1, 376 writel(virt_to_gart(ati_generic_private.gatt_pages[i]->real) | 1,
377 page_dir.remapped+GET_PAGE_DIR_OFF(addr)); 377 page_dir.remapped+GET_PAGE_DIR_OFF(addr));
378 readl(page_dir.remapped+GET_PAGE_DIR_OFF(addr)); /* PCI Posting. */ 378 readl(page_dir.remapped+GET_PAGE_DIR_OFF(addr)); /* PCI Posting. */
379 } 379 }
diff --git a/drivers/char/agp/backend.c b/drivers/char/agp/backend.c
index 2f3dfb63bdc6..4d4e602fdc7e 100644
--- a/drivers/char/agp/backend.c
+++ b/drivers/char/agp/backend.c
@@ -148,7 +148,7 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge)
148 return -ENOMEM; 148 return -ENOMEM;
149 } 149 }
150 150
151 bridge->scratch_page_real = virt_to_phys(addr); 151 bridge->scratch_page_real = virt_to_gart(addr);
152 bridge->scratch_page = 152 bridge->scratch_page =
153 bridge->driver->mask_memory(bridge, bridge->scratch_page_real, 0); 153 bridge->driver->mask_memory(bridge, bridge->scratch_page_real, 0);
154 } 154 }
@@ -189,7 +189,7 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge)
189err_out: 189err_out:
190 if (bridge->driver->needs_scratch_page) 190 if (bridge->driver->needs_scratch_page)
191 bridge->driver->agp_destroy_page( 191 bridge->driver->agp_destroy_page(
192 phys_to_virt(bridge->scratch_page_real)); 192 gart_to_virt(bridge->scratch_page_real));
193 if (got_gatt) 193 if (got_gatt)
194 bridge->driver->free_gatt_table(bridge); 194 bridge->driver->free_gatt_table(bridge);
195 if (got_keylist) { 195 if (got_keylist) {
@@ -214,7 +214,7 @@ static void agp_backend_cleanup(struct agp_bridge_data *bridge)
214 if (bridge->driver->agp_destroy_page && 214 if (bridge->driver->agp_destroy_page &&
215 bridge->driver->needs_scratch_page) 215 bridge->driver->needs_scratch_page)
216 bridge->driver->agp_destroy_page( 216 bridge->driver->agp_destroy_page(
217 phys_to_virt(bridge->scratch_page_real)); 217 gart_to_virt(bridge->scratch_page_real));
218} 218}
219 219
220/* When we remove the global variable agp_bridge from all drivers 220/* When we remove the global variable agp_bridge from all drivers
diff --git a/drivers/char/agp/efficeon-agp.c b/drivers/char/agp/efficeon-agp.c
index 1383c3165ea1..ac19fdcd21c1 100644
--- a/drivers/char/agp/efficeon-agp.c
+++ b/drivers/char/agp/efficeon-agp.c
@@ -219,7 +219,7 @@ static int efficeon_create_gatt_table(struct agp_bridge_data *bridge)
219 219
220 efficeon_private.l1_table[index] = page; 220 efficeon_private.l1_table[index] = page;
221 221
222 value = __pa(page) | pati | present | index; 222 value = virt_to_gart(page) | pati | present | index;
223 223
224 pci_write_config_dword(agp_bridge->dev, 224 pci_write_config_dword(agp_bridge->dev,
225 EFFICEON_ATTPAGE, value); 225 EFFICEON_ATTPAGE, value);
diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c
index c321a924e38a..f0079e991bdc 100644
--- a/drivers/char/agp/generic.c
+++ b/drivers/char/agp/generic.c
@@ -153,7 +153,7 @@ void agp_free_memory(struct agp_memory *curr)
153 } 153 }
154 if (curr->page_count != 0) { 154 if (curr->page_count != 0) {
155 for (i = 0; i < curr->page_count; i++) { 155 for (i = 0; i < curr->page_count; i++) {
156 curr->bridge->driver->agp_destroy_page(phys_to_virt(curr->memory[i])); 156 curr->bridge->driver->agp_destroy_page(gart_to_virt(curr->memory[i]));
157 } 157 }
158 } 158 }
159 agp_free_key(curr->key); 159 agp_free_key(curr->key);
@@ -209,7 +209,7 @@ struct agp_memory *agp_allocate_memory(struct agp_bridge_data *bridge,
209 agp_free_memory(new); 209 agp_free_memory(new);
210 return NULL; 210 return NULL;
211 } 211 }
212 new->memory[i] = virt_to_phys(addr); 212 new->memory[i] = virt_to_gart(addr);
213 new->page_count++; 213 new->page_count++;
214 } 214 }
215 new->bridge = bridge; 215 new->bridge = bridge;
@@ -295,19 +295,6 @@ int agp_num_entries(void)
295EXPORT_SYMBOL_GPL(agp_num_entries); 295EXPORT_SYMBOL_GPL(agp_num_entries);
296 296
297 297
298static int check_bridge_mode(struct pci_dev *dev)
299{
300 u32 agp3;
301 u8 cap_ptr;
302
303 cap_ptr = pci_find_capability(dev, PCI_CAP_ID_AGP);
304 pci_read_config_dword(dev, cap_ptr+AGPSTAT, &agp3);
305 if (agp3 & AGPSTAT_MODE_3_0)
306 return 1;
307 return 0;
308}
309
310
311/** 298/**
312 * agp_copy_info - copy bridge state information 299 * agp_copy_info - copy bridge state information
313 * 300 *
@@ -328,7 +315,7 @@ int agp_copy_info(struct agp_bridge_data *bridge, struct agp_kern_info *info)
328 info->version.minor = bridge->version->minor; 315 info->version.minor = bridge->version->minor;
329 info->chipset = SUPPORTED; 316 info->chipset = SUPPORTED;
330 info->device = bridge->dev; 317 info->device = bridge->dev;
331 if (check_bridge_mode(bridge->dev)) 318 if (bridge->mode & AGPSTAT_MODE_3_0)
332 info->mode = bridge->mode & ~AGP3_RESERVED_MASK; 319 info->mode = bridge->mode & ~AGP3_RESERVED_MASK;
333 else 320 else
334 info->mode = bridge->mode & ~AGP2_RESERVED_MASK; 321 info->mode = bridge->mode & ~AGP2_RESERVED_MASK;
@@ -661,7 +648,7 @@ u32 agp_collect_device_status(struct agp_bridge_data *bridge, u32 requested_mode
661 bridge_agpstat &= ~AGPSTAT_FW; 648 bridge_agpstat &= ~AGPSTAT_FW;
662 649
663 /* Check to see if we are operating in 3.0 mode */ 650 /* Check to see if we are operating in 3.0 mode */
664 if (check_bridge_mode(agp_bridge->dev)) 651 if (agp_bridge->mode & AGPSTAT_MODE_3_0)
665 agp_v3_parse_one(&requested_mode, &bridge_agpstat, &vga_agpstat); 652 agp_v3_parse_one(&requested_mode, &bridge_agpstat, &vga_agpstat);
666 else 653 else
667 agp_v2_parse_one(&requested_mode, &bridge_agpstat, &vga_agpstat); 654 agp_v2_parse_one(&requested_mode, &bridge_agpstat, &vga_agpstat);
@@ -732,7 +719,7 @@ void agp_generic_enable(struct agp_bridge_data *bridge, u32 requested_mode)
732 719
733 /* Do AGP version specific frobbing. */ 720 /* Do AGP version specific frobbing. */
734 if (bridge->major_version >= 3) { 721 if (bridge->major_version >= 3) {
735 if (check_bridge_mode(bridge->dev)) { 722 if (bridge->mode & AGPSTAT_MODE_3_0) {
736 /* If we have 3.5, we can do the isoch stuff. */ 723 /* If we have 3.5, we can do the isoch stuff. */
737 if (bridge->minor_version >= 5) 724 if (bridge->minor_version >= 5)
738 agp_3_5_enable(bridge); 725 agp_3_5_enable(bridge);
@@ -806,8 +793,7 @@ int agp_generic_create_gatt_table(struct agp_bridge_data *bridge)
806 break; 793 break;
807 } 794 }
808 795
809 table = (char *) __get_free_pages(GFP_KERNEL, 796 table = alloc_gatt_pages(page_order);
810 page_order);
811 797
812 if (table == NULL) { 798 if (table == NULL) {
813 i++; 799 i++;
@@ -838,7 +824,7 @@ int agp_generic_create_gatt_table(struct agp_bridge_data *bridge)
838 size = ((struct aper_size_info_fixed *) temp)->size; 824 size = ((struct aper_size_info_fixed *) temp)->size;
839 page_order = ((struct aper_size_info_fixed *) temp)->page_order; 825 page_order = ((struct aper_size_info_fixed *) temp)->page_order;
840 num_entries = ((struct aper_size_info_fixed *) temp)->num_entries; 826 num_entries = ((struct aper_size_info_fixed *) temp)->num_entries;
841 table = (char *) __get_free_pages(GFP_KERNEL, page_order); 827 table = alloc_gatt_pages(page_order);
842 } 828 }
843 829
844 if (table == NULL) 830 if (table == NULL)
@@ -853,7 +839,7 @@ int agp_generic_create_gatt_table(struct agp_bridge_data *bridge)
853 agp_gatt_table = (void *)table; 839 agp_gatt_table = (void *)table;
854 840
855 bridge->driver->cache_flush(); 841 bridge->driver->cache_flush();
856 bridge->gatt_table = ioremap_nocache(virt_to_phys(table), 842 bridge->gatt_table = ioremap_nocache(virt_to_gart(table),
857 (PAGE_SIZE * (1 << page_order))); 843 (PAGE_SIZE * (1 << page_order)));
858 bridge->driver->cache_flush(); 844 bridge->driver->cache_flush();
859 845
@@ -861,11 +847,11 @@ int agp_generic_create_gatt_table(struct agp_bridge_data *bridge)
861 for (page = virt_to_page(table); page <= virt_to_page(table_end); page++) 847 for (page = virt_to_page(table); page <= virt_to_page(table_end); page++)
862 ClearPageReserved(page); 848 ClearPageReserved(page);
863 849
864 free_pages((unsigned long) table, page_order); 850 free_gatt_pages(table, page_order);
865 851
866 return -ENOMEM; 852 return -ENOMEM;
867 } 853 }
868 bridge->gatt_bus_addr = virt_to_phys(bridge->gatt_table_real); 854 bridge->gatt_bus_addr = virt_to_gart(bridge->gatt_table_real);
869 855
870 /* AK: bogus, should encode addresses > 4GB */ 856 /* AK: bogus, should encode addresses > 4GB */
871 for (i = 0; i < num_entries; i++) { 857 for (i = 0; i < num_entries; i++) {
@@ -919,7 +905,7 @@ int agp_generic_free_gatt_table(struct agp_bridge_data *bridge)
919 for (page = virt_to_page(table); page <= virt_to_page(table_end); page++) 905 for (page = virt_to_page(table); page <= virt_to_page(table_end); page++)
920 ClearPageReserved(page); 906 ClearPageReserved(page);
921 907
922 free_pages((unsigned long) bridge->gatt_table_real, page_order); 908 free_gatt_pages(bridge->gatt_table_real, page_order);
923 909
924 agp_gatt_table = NULL; 910 agp_gatt_table = NULL;
925 bridge->gatt_table = NULL; 911 bridge->gatt_table = NULL;
diff --git a/drivers/char/agp/hp-agp.c b/drivers/char/agp/hp-agp.c
index 6052bfa04c72..99762b6c19ae 100644
--- a/drivers/char/agp/hp-agp.c
+++ b/drivers/char/agp/hp-agp.c
@@ -110,7 +110,7 @@ static int __init hp_zx1_ioc_shared(void)
110 hp->gart_size = HP_ZX1_GART_SIZE; 110 hp->gart_size = HP_ZX1_GART_SIZE;
111 hp->gatt_entries = hp->gart_size / hp->io_page_size; 111 hp->gatt_entries = hp->gart_size / hp->io_page_size;
112 112
113 hp->io_pdir = phys_to_virt(readq(hp->ioc_regs+HP_ZX1_PDIR_BASE)); 113 hp->io_pdir = gart_to_virt(readq(hp->ioc_regs+HP_ZX1_PDIR_BASE));
114 hp->gatt = &hp->io_pdir[HP_ZX1_IOVA_TO_PDIR(hp->gart_base)]; 114 hp->gatt = &hp->io_pdir[HP_ZX1_IOVA_TO_PDIR(hp->gart_base)];
115 115
116 if (hp->gatt[0] != HP_ZX1_SBA_IOMMU_COOKIE) { 116 if (hp->gatt[0] != HP_ZX1_SBA_IOMMU_COOKIE) {
@@ -248,7 +248,7 @@ hp_zx1_configure (void)
248 agp_bridge->mode = readl(hp->lba_regs+hp->lba_cap_offset+PCI_AGP_STATUS); 248 agp_bridge->mode = readl(hp->lba_regs+hp->lba_cap_offset+PCI_AGP_STATUS);
249 249
250 if (hp->io_pdir_owner) { 250 if (hp->io_pdir_owner) {
251 writel(virt_to_phys(hp->io_pdir), hp->ioc_regs+HP_ZX1_PDIR_BASE); 251 writel(virt_to_gart(hp->io_pdir), hp->ioc_regs+HP_ZX1_PDIR_BASE);
252 readl(hp->ioc_regs+HP_ZX1_PDIR_BASE); 252 readl(hp->ioc_regs+HP_ZX1_PDIR_BASE);
253 writel(hp->io_tlb_ps, hp->ioc_regs+HP_ZX1_TCNFG); 253 writel(hp->io_tlb_ps, hp->ioc_regs+HP_ZX1_TCNFG);
254 readl(hp->ioc_regs+HP_ZX1_TCNFG); 254 readl(hp->ioc_regs+HP_ZX1_TCNFG);
diff --git a/drivers/char/agp/i460-agp.c b/drivers/char/agp/i460-agp.c
index adbea896c0d2..94943298c03e 100644
--- a/drivers/char/agp/i460-agp.c
+++ b/drivers/char/agp/i460-agp.c
@@ -372,7 +372,7 @@ static int i460_alloc_large_page (struct lp_desc *lp)
372 } 372 }
373 memset(lp->alloced_map, 0, map_size); 373 memset(lp->alloced_map, 0, map_size);
374 374
375 lp->paddr = virt_to_phys(lpage); 375 lp->paddr = virt_to_gart(lpage);
376 lp->refcount = 0; 376 lp->refcount = 0;
377 atomic_add(I460_KPAGES_PER_IOPAGE, &agp_bridge->current_memory_agp); 377 atomic_add(I460_KPAGES_PER_IOPAGE, &agp_bridge->current_memory_agp);
378 return 0; 378 return 0;
@@ -383,7 +383,7 @@ static void i460_free_large_page (struct lp_desc *lp)
383 kfree(lp->alloced_map); 383 kfree(lp->alloced_map);
384 lp->alloced_map = NULL; 384 lp->alloced_map = NULL;
385 385
386 free_pages((unsigned long) phys_to_virt(lp->paddr), I460_IO_PAGE_SHIFT - PAGE_SHIFT); 386 free_pages((unsigned long) gart_to_virt(lp->paddr), I460_IO_PAGE_SHIFT - PAGE_SHIFT);
387 atomic_sub(I460_KPAGES_PER_IOPAGE, &agp_bridge->current_memory_agp); 387 atomic_sub(I460_KPAGES_PER_IOPAGE, &agp_bridge->current_memory_agp);
388} 388}
389 389
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
index 8c7d727432bb..51266d6b4d78 100644
--- a/drivers/char/agp/intel-agp.c
+++ b/drivers/char/agp/intel-agp.c
@@ -286,7 +286,7 @@ static struct agp_memory *alloc_agpphysmem_i8xx(size_t pg_count, int type)
286 if (new == NULL) 286 if (new == NULL)
287 return NULL; 287 return NULL;
288 288
289 new->memory[0] = virt_to_phys(addr); 289 new->memory[0] = virt_to_gart(addr);
290 if (pg_count == 4) { 290 if (pg_count == 4) {
291 /* kludge to get 4 physical pages for ARGB cursor */ 291 /* kludge to get 4 physical pages for ARGB cursor */
292 new->memory[1] = new->memory[0] + PAGE_SIZE; 292 new->memory[1] = new->memory[0] + PAGE_SIZE;
@@ -329,10 +329,10 @@ static void intel_i810_free_by_type(struct agp_memory *curr)
329 agp_free_key(curr->key); 329 agp_free_key(curr->key);
330 if(curr->type == AGP_PHYS_MEMORY) { 330 if(curr->type == AGP_PHYS_MEMORY) {
331 if (curr->page_count == 4) 331 if (curr->page_count == 4)
332 i8xx_destroy_pages(phys_to_virt(curr->memory[0])); 332 i8xx_destroy_pages(gart_to_virt(curr->memory[0]));
333 else 333 else
334 agp_bridge->driver->agp_destroy_page( 334 agp_bridge->driver->agp_destroy_page(
335 phys_to_virt(curr->memory[0])); 335 gart_to_virt(curr->memory[0]));
336 vfree(curr->memory); 336 vfree(curr->memory);
337 } 337 }
338 kfree(curr); 338 kfree(curr);
@@ -418,7 +418,8 @@ static void intel_i830_init_gtt_entries(void)
418 case I915_GMCH_GMS_STOLEN_48M: 418 case I915_GMCH_GMS_STOLEN_48M:
419 /* Check it's really I915G */ 419 /* Check it's really I915G */
420 if (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915G_HB || 420 if (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915G_HB ||
421 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB) 421 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB ||
422 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945G_HB)
422 gtt_entries = MB(48) - KB(size); 423 gtt_entries = MB(48) - KB(size);
423 else 424 else
424 gtt_entries = 0; 425 gtt_entries = 0;
@@ -426,7 +427,8 @@ static void intel_i830_init_gtt_entries(void)
426 case I915_GMCH_GMS_STOLEN_64M: 427 case I915_GMCH_GMS_STOLEN_64M:
427 /* Check it's really I915G */ 428 /* Check it's really I915G */
428 if (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915G_HB || 429 if (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915G_HB ||
429 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB) 430 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB ||
431 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945G_HB)
430 gtt_entries = MB(64) - KB(size); 432 gtt_entries = MB(64) - KB(size);
431 else 433 else
432 gtt_entries = 0; 434 gtt_entries = 0;
@@ -1662,6 +1664,14 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev,
1662 } 1664 }
1663 name = "915GM"; 1665 name = "915GM";
1664 break; 1666 break;
1667 case PCI_DEVICE_ID_INTEL_82945G_HB:
1668 if (find_i830(PCI_DEVICE_ID_INTEL_82945G_IG)) {
1669 bridge->driver = &intel_915_driver;
1670 } else {
1671 bridge->driver = &intel_845_driver;
1672 }
1673 name = "945G";
1674 break;
1665 case PCI_DEVICE_ID_INTEL_7505_0: 1675 case PCI_DEVICE_ID_INTEL_7505_0:
1666 bridge->driver = &intel_7505_driver; 1676 bridge->driver = &intel_7505_driver;
1667 name = "E7505"; 1677 name = "E7505";
@@ -1801,6 +1811,7 @@ static struct pci_device_id agp_intel_pci_table[] = {
1801 ID(PCI_DEVICE_ID_INTEL_7205_0), 1811 ID(PCI_DEVICE_ID_INTEL_7205_0),
1802 ID(PCI_DEVICE_ID_INTEL_82915G_HB), 1812 ID(PCI_DEVICE_ID_INTEL_82915G_HB),
1803 ID(PCI_DEVICE_ID_INTEL_82915GM_HB), 1813 ID(PCI_DEVICE_ID_INTEL_82915GM_HB),
1814 ID(PCI_DEVICE_ID_INTEL_82945G_HB),
1804 { } 1815 { }
1805}; 1816};
1806 1817
diff --git a/drivers/char/agp/sgi-agp.c b/drivers/char/agp/sgi-agp.c
index 4b3eda267976..d3aa159c9dec 100644
--- a/drivers/char/agp/sgi-agp.c
+++ b/drivers/char/agp/sgi-agp.c
@@ -133,11 +133,14 @@ static int sgi_tioca_insert_memory(struct agp_memory *mem, off_t pg_start,
133 off_t j; 133 off_t j;
134 void *temp; 134 void *temp;
135 struct agp_bridge_data *bridge; 135 struct agp_bridge_data *bridge;
136 u64 *table;
136 137
137 bridge = mem->bridge; 138 bridge = mem->bridge;
138 if (!bridge) 139 if (!bridge)
139 return -EINVAL; 140 return -EINVAL;
140 141
142 table = (u64 *)bridge->gatt_table;
143
141 temp = bridge->current_size; 144 temp = bridge->current_size;
142 145
143 switch (bridge->driver->size_type) { 146 switch (bridge->driver->size_type) {
@@ -175,7 +178,7 @@ static int sgi_tioca_insert_memory(struct agp_memory *mem, off_t pg_start,
175 j = pg_start; 178 j = pg_start;
176 179
177 while (j < (pg_start + mem->page_count)) { 180 while (j < (pg_start + mem->page_count)) {
178 if (*(bridge->gatt_table + j)) 181 if (table[j])
179 return -EBUSY; 182 return -EBUSY;
180 j++; 183 j++;
181 } 184 }
@@ -186,7 +189,7 @@ static int sgi_tioca_insert_memory(struct agp_memory *mem, off_t pg_start,
186 } 189 }
187 190
188 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { 191 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
189 *(bridge->gatt_table + j) = 192 table[j] =
190 bridge->driver->mask_memory(bridge, mem->memory[i], 193 bridge->driver->mask_memory(bridge, mem->memory[i],
191 mem->type); 194 mem->type);
192 } 195 }
@@ -200,6 +203,7 @@ static int sgi_tioca_remove_memory(struct agp_memory *mem, off_t pg_start,
200{ 203{
201 size_t i; 204 size_t i;
202 struct agp_bridge_data *bridge; 205 struct agp_bridge_data *bridge;
206 u64 *table;
203 207
204 bridge = mem->bridge; 208 bridge = mem->bridge;
205 if (!bridge) 209 if (!bridge)
@@ -209,8 +213,10 @@ static int sgi_tioca_remove_memory(struct agp_memory *mem, off_t pg_start,
209 return -EINVAL; 213 return -EINVAL;
210 } 214 }
211 215
216 table = (u64 *)bridge->gatt_table;
217
212 for (i = pg_start; i < (mem->page_count + pg_start); i++) { 218 for (i = pg_start; i < (mem->page_count + pg_start); i++) {
213 *(bridge->gatt_table + i) = 0; 219 table[i] = 0;
214 } 220 }
215 221
216 bridge->driver->tlb_flush(mem); 222 bridge->driver->tlb_flush(mem);
diff --git a/drivers/char/agp/sworks-agp.c b/drivers/char/agp/sworks-agp.c
index 10c23302dd84..a9fb12c20eb7 100644
--- a/drivers/char/agp/sworks-agp.c
+++ b/drivers/char/agp/sworks-agp.c
@@ -51,7 +51,7 @@ static int serverworks_create_page_map(struct serverworks_page_map *page_map)
51 } 51 }
52 SetPageReserved(virt_to_page(page_map->real)); 52 SetPageReserved(virt_to_page(page_map->real));
53 global_cache_flush(); 53 global_cache_flush();
54 page_map->remapped = ioremap_nocache(virt_to_phys(page_map->real), 54 page_map->remapped = ioremap_nocache(virt_to_gart(page_map->real),
55 PAGE_SIZE); 55 PAGE_SIZE);
56 if (page_map->remapped == NULL) { 56 if (page_map->remapped == NULL) {
57 ClearPageReserved(virt_to_page(page_map->real)); 57 ClearPageReserved(virt_to_page(page_map->real));
@@ -162,7 +162,7 @@ static int serverworks_create_gatt_table(struct agp_bridge_data *bridge)
162 /* Create a fake scratch directory */ 162 /* Create a fake scratch directory */
163 for(i = 0; i < 1024; i++) { 163 for(i = 0; i < 1024; i++) {
164 writel(agp_bridge->scratch_page, serverworks_private.scratch_dir.remapped+i); 164 writel(agp_bridge->scratch_page, serverworks_private.scratch_dir.remapped+i);
165 writel(virt_to_phys(serverworks_private.scratch_dir.real) | 1, page_dir.remapped+i); 165 writel(virt_to_gart(serverworks_private.scratch_dir.real) | 1, page_dir.remapped+i);
166 } 166 }
167 167
168 retval = serverworks_create_gatt_pages(value->num_entries / 1024); 168 retval = serverworks_create_gatt_pages(value->num_entries / 1024);
@@ -174,7 +174,7 @@ static int serverworks_create_gatt_table(struct agp_bridge_data *bridge)
174 174
175 agp_bridge->gatt_table_real = (u32 *)page_dir.real; 175 agp_bridge->gatt_table_real = (u32 *)page_dir.real;
176 agp_bridge->gatt_table = (u32 __iomem *)page_dir.remapped; 176 agp_bridge->gatt_table = (u32 __iomem *)page_dir.remapped;
177 agp_bridge->gatt_bus_addr = virt_to_phys(page_dir.real); 177 agp_bridge->gatt_bus_addr = virt_to_gart(page_dir.real);
178 178
179 /* Get the address for the gart region. 179 /* Get the address for the gart region.
180 * This is a bus address even on the alpha, b/c its 180 * This is a bus address even on the alpha, b/c its
@@ -187,7 +187,7 @@ static int serverworks_create_gatt_table(struct agp_bridge_data *bridge)
187 /* Calculate the agp offset */ 187 /* Calculate the agp offset */
188 188
189 for(i = 0; i < value->num_entries / 1024; i++) 189 for(i = 0; i < value->num_entries / 1024; i++)
190 writel(virt_to_phys(serverworks_private.gatt_pages[i]->real)|1, page_dir.remapped+i); 190 writel(virt_to_gart(serverworks_private.gatt_pages[i]->real)|1, page_dir.remapped+i);
191 191
192 return 0; 192 return 0;
193} 193}
diff --git a/drivers/char/agp/uninorth-agp.c b/drivers/char/agp/uninorth-agp.c
index a673971f2a90..c8255312b8c1 100644
--- a/drivers/char/agp/uninorth-agp.c
+++ b/drivers/char/agp/uninorth-agp.c
@@ -407,7 +407,7 @@ static int uninorth_create_gatt_table(struct agp_bridge_data *bridge)
407 407
408 bridge->gatt_table_real = (u32 *) table; 408 bridge->gatt_table_real = (u32 *) table;
409 bridge->gatt_table = (u32 *)table; 409 bridge->gatt_table = (u32 *)table;
410 bridge->gatt_bus_addr = virt_to_phys(table); 410 bridge->gatt_bus_addr = virt_to_gart(table);
411 411
412 for (i = 0; i < num_entries; i++) 412 for (i = 0; i < num_entries; i++)
413 bridge->gatt_table[i] = 0; 413 bridge->gatt_table[i] = 0;
diff --git a/drivers/char/drm/drm_pciids.h b/drivers/char/drm/drm_pciids.h
index 54a2914e3a32..11c6950158b3 100644
--- a/drivers/char/drm/drm_pciids.h
+++ b/drivers/char/drm/drm_pciids.h
@@ -220,5 +220,6 @@
220 {0x8086, 0x2572, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 220 {0x8086, 0x2572, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
221 {0x8086, 0x2582, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 221 {0x8086, 0x2582, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
222 {0x8086, 0x2592, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 222 {0x8086, 0x2592, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
223 {0x8086, 0x2772, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
223 {0, 0, 0} 224 {0, 0, 0}
224 225
diff --git a/drivers/char/drm/radeon_irq.c b/drivers/char/drm/radeon_irq.c
index 5b18bee6492e..cd25f28e26a3 100644
--- a/drivers/char/drm/radeon_irq.c
+++ b/drivers/char/drm/radeon_irq.c
@@ -123,11 +123,6 @@ static int radeon_wait_irq(drm_device_t *dev, int swi_nr)
123 123
124 dev_priv->stats.boxes |= RADEON_BOX_WAIT_IDLE; 124 dev_priv->stats.boxes |= RADEON_BOX_WAIT_IDLE;
125 125
126 /* This is a hack to work around mysterious freezes on certain
127 * systems:
128 */
129 radeon_acknowledge_irqs( dev_priv );
130
131 DRM_WAIT_ON( ret, dev_priv->swi_queue, 3 * DRM_HZ, 126 DRM_WAIT_ON( ret, dev_priv->swi_queue, 3 * DRM_HZ,
132 RADEON_READ( RADEON_LAST_SWI_REG ) >= swi_nr ); 127 RADEON_READ( RADEON_LAST_SWI_REG ) >= swi_nr );
133 128
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c
index 7a245068e3e5..f022f0944434 100644
--- a/drivers/char/mxser.c
+++ b/drivers/char/mxser.c
@@ -1995,9 +1995,6 @@ static void mxser_receive_chars(struct mxser_struct *info, int *status)
1995 unsigned char ch, gdl; 1995 unsigned char ch, gdl;
1996 int ignored = 0; 1996 int ignored = 0;
1997 int cnt = 0; 1997 int cnt = 0;
1998 unsigned char *cp;
1999 char *fp;
2000 int count;
2001 int recv_room; 1998 int recv_room;
2002 int max = 256; 1999 int max = 256;
2003 unsigned long flags; 2000 unsigned long flags;
@@ -2011,10 +2008,6 @@ static void mxser_receive_chars(struct mxser_struct *info, int *status)
2011 //return; 2008 //return;
2012 } 2009 }
2013 2010
2014 cp = tty->flip.char_buf;
2015 fp = tty->flip.flag_buf;
2016 count = 0;
2017
2018 // following add by Victor Yu. 09-02-2002 2011 // following add by Victor Yu. 09-02-2002
2019 if (info->IsMoxaMustChipFlag != MOXA_OTHER_UART) { 2012 if (info->IsMoxaMustChipFlag != MOXA_OTHER_UART) {
2020 2013
@@ -2041,12 +2034,10 @@ static void mxser_receive_chars(struct mxser_struct *info, int *status)
2041 } 2034 }
2042 while (gdl--) { 2035 while (gdl--) {
2043 ch = inb(info->base + UART_RX); 2036 ch = inb(info->base + UART_RX);
2044 count++; 2037 tty_insert_flip_char(tty, ch, 0);
2045 *cp++ = ch;
2046 *fp++ = 0;
2047 cnt++; 2038 cnt++;
2048 /* 2039 /*
2049 if((count>=HI_WATER) && (info->stop_rx==0)){ 2040 if((cnt>=HI_WATER) && (info->stop_rx==0)){
2050 mxser_stoprx(tty); 2041 mxser_stoprx(tty);
2051 info->stop_rx=1; 2042 info->stop_rx=1;
2052 break; 2043 break;
@@ -2061,7 +2052,7 @@ intr_old:
2061 if (max-- < 0) 2052 if (max-- < 0)
2062 break; 2053 break;
2063 /* 2054 /*
2064 if((count>=HI_WATER) && (info->stop_rx==0)){ 2055 if((cnt>=HI_WATER) && (info->stop_rx==0)){
2065 mxser_stoprx(tty); 2056 mxser_stoprx(tty);
2066 info->stop_rx=1; 2057 info->stop_rx=1;
2067 break; 2058 break;
@@ -2078,36 +2069,33 @@ intr_old:
2078 if (++ignored > 100) 2069 if (++ignored > 100)
2079 break; 2070 break;
2080 } else { 2071 } else {
2081 count++; 2072 char flag = 0;
2082 if (*status & UART_LSR_SPECIAL) { 2073 if (*status & UART_LSR_SPECIAL) {
2083 if (*status & UART_LSR_BI) { 2074 if (*status & UART_LSR_BI) {
2084 *fp++ = TTY_BREAK; 2075 flag = TTY_BREAK;
2085/* added by casper 1/11/2000 */ 2076/* added by casper 1/11/2000 */
2086 info->icount.brk++; 2077 info->icount.brk++;
2087
2088/* */ 2078/* */
2089 if (info->flags & ASYNC_SAK) 2079 if (info->flags & ASYNC_SAK)
2090 do_SAK(tty); 2080 do_SAK(tty);
2091 } else if (*status & UART_LSR_PE) { 2081 } else if (*status & UART_LSR_PE) {
2092 *fp++ = TTY_PARITY; 2082 flag = TTY_PARITY;
2093/* added by casper 1/11/2000 */ 2083/* added by casper 1/11/2000 */
2094 info->icount.parity++; 2084 info->icount.parity++;
2095/* */ 2085/* */
2096 } else if (*status & UART_LSR_FE) { 2086 } else if (*status & UART_LSR_FE) {
2097 *fp++ = TTY_FRAME; 2087 flag = TTY_FRAME;
2098/* added by casper 1/11/2000 */ 2088/* added by casper 1/11/2000 */
2099 info->icount.frame++; 2089 info->icount.frame++;
2100/* */ 2090/* */
2101 } else if (*status & UART_LSR_OE) { 2091 } else if (*status & UART_LSR_OE) {
2102 *fp++ = TTY_OVERRUN; 2092 flag = TTY_OVERRUN;
2103/* added by casper 1/11/2000 */ 2093/* added by casper 1/11/2000 */
2104 info->icount.overrun++; 2094 info->icount.overrun++;
2105/* */ 2095/* */
2106 } else 2096 }
2107 *fp++ = 0; 2097 }
2108 } else 2098 tty_insert_flip_char(tty, ch, flag);
2109 *fp++ = 0;
2110 *cp++ = ch;
2111 cnt++; 2099 cnt++;
2112 if (cnt >= recv_room) { 2100 if (cnt >= recv_room) {
2113 if (!info->ldisc_stop_rx) { 2101 if (!info->ldisc_stop_rx) {
@@ -2132,13 +2120,13 @@ intr_old:
2132 // above add by Victor Yu. 09-02-2002 2120 // above add by Victor Yu. 09-02-2002
2133 } while (*status & UART_LSR_DR); 2121 } while (*status & UART_LSR_DR);
2134 2122
2135 end_intr: // add by Victor Yu. 09-02-2002 2123end_intr: // add by Victor Yu. 09-02-2002
2136 2124
2137 mxvar_log.rxcnt[info->port] += cnt; 2125 mxvar_log.rxcnt[info->port] += cnt;
2138 info->mon_data.rxcnt += cnt; 2126 info->mon_data.rxcnt += cnt;
2139 info->mon_data.up_rxcnt += cnt; 2127 info->mon_data.up_rxcnt += cnt;
2140 spin_unlock_irqrestore(&info->slock, flags); 2128 spin_unlock_irqrestore(&info->slock, flags);
2141 2129
2142 tty_flip_buffer_push(tty); 2130 tty_flip_buffer_push(tty);
2143} 2131}
2144 2132
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
index 00c7b958361a..ab82d6addd7f 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -745,7 +745,8 @@ static struct scsi_id_instance_data *sbp2_alloc_device(struct unit_directory *ud
745 list_add_tail(&scsi_id->scsi_list, &hi->scsi_ids); 745 list_add_tail(&scsi_id->scsi_list, &hi->scsi_ids);
746 746
747 /* Register our host with the SCSI stack. */ 747 /* Register our host with the SCSI stack. */
748 scsi_host = scsi_host_alloc(&scsi_driver_template, 0); 748 scsi_host = scsi_host_alloc(&scsi_driver_template,
749 sizeof (unsigned long));
749 if (!scsi_host) { 750 if (!scsi_host) {
750 SBP2_ERR("failed to register scsi host"); 751 SBP2_ERR("failed to register scsi host");
751 goto failed_alloc; 752 goto failed_alloc;
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
index af0446c6de82..48fdf1e517cf 100644
--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -54,7 +54,7 @@ static int atkbd_softraw = 1;
54module_param_named(softraw, atkbd_softraw, bool, 0); 54module_param_named(softraw, atkbd_softraw, bool, 0);
55MODULE_PARM_DESC(softraw, "Use software generated rawmode"); 55MODULE_PARM_DESC(softraw, "Use software generated rawmode");
56 56
57static int atkbd_scroll = 1; 57static int atkbd_scroll = 0;
58module_param_named(scroll, atkbd_scroll, bool, 0); 58module_param_named(scroll, atkbd_scroll, bool, 0);
59MODULE_PARM_DESC(scroll, "Enable scroll-wheel on MS Office and similar keyboards"); 59MODULE_PARM_DESC(scroll, "Enable scroll-wheel on MS Office and similar keyboards");
60 60
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index 42a9f7f6f8cb..7bf4be733e9a 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -352,7 +352,7 @@ static int alps_reconnect(struct psmouse *psmouse)
352 if (alps_get_status(psmouse, param)) 352 if (alps_get_status(psmouse, param))
353 return -1; 353 return -1;
354 354
355 if (param[0] & 0x04) 355 if (!(param[0] & 0x04))
356 alps_tap_mode(psmouse, 1); 356 alps_tap_mode(psmouse, 1);
357 357
358 if (alps_absolute_mode(psmouse)) { 358 if (alps_absolute_mode(psmouse)) {
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index bb9f4044c74d..b941ee220997 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -2593,6 +2593,9 @@ powerbook_sleep_Core99(void)
2593 /* Restore VIA */ 2593 /* Restore VIA */
2594 restore_via_state(); 2594 restore_via_state();
2595 2595
2596 /* tweak LPJ before cpufreq is there */
2597 loops_per_jiffy *= 2;
2598
2596 /* Restore video */ 2599 /* Restore video */
2597 pmac_call_early_video_resume(); 2600 pmac_call_early_video_resume();
2598 2601
@@ -2613,6 +2616,9 @@ powerbook_sleep_Core99(void)
2613 pmu_request(&req, NULL, 2, PMU_SET_INTR_MASK, pmu_intr_mask); 2616 pmu_request(&req, NULL, 2, PMU_SET_INTR_MASK, pmu_intr_mask);
2614 pmu_wait_complete(&req); 2617 pmu_wait_complete(&req);
2615 2618
2619 /* Restore LPJ, cpufreq will adjust the cpu frequency */
2620 loops_per_jiffy /= 2;
2621
2616 pmac_wakeup_devices(); 2622 pmac_wakeup_devices();
2617 2623
2618 return 0; 2624 return 0;
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 1e97b3c12bd5..0c1b8520ef86 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -985,6 +985,9 @@ static int do_end_io(struct multipath *m, struct bio *bio,
985 if (!error) 985 if (!error)
986 return 0; /* I/O complete */ 986 return 0; /* I/O complete */
987 987
988 if ((error == -EWOULDBLOCK) && bio_rw_ahead(bio))
989 return error;
990
988 spin_lock(&m->lock); 991 spin_lock(&m->lock);
989 if (!m->nr_valid_paths) { 992 if (!m->nr_valid_paths) {
990 if (!m->queue_if_no_path || m->suspended) { 993 if (!m->queue_if_no_path || m->suspended) {
diff --git a/drivers/message/i2o/i2o_block.c b/drivers/message/i2o/i2o_block.c
index 7b74c87b569e..4830b7759061 100644
--- a/drivers/message/i2o/i2o_block.c
+++ b/drivers/message/i2o/i2o_block.c
@@ -573,6 +573,7 @@ static int i2o_block_reply(struct i2o_controller *c, u32 m,
573static void i2o_block_event(struct i2o_event *evt) 573static void i2o_block_event(struct i2o_event *evt)
574{ 574{
575 osm_info("block-osm: event received\n"); 575 osm_info("block-osm: event received\n");
576 kfree(evt);
576}; 577};
577 578
578/* 579/*
diff --git a/drivers/net/irda/Kconfig b/drivers/net/irda/Kconfig
index 1c553d7efdd9..ca5914091d3a 100644
--- a/drivers/net/irda/Kconfig
+++ b/drivers/net/irda/Kconfig
@@ -389,7 +389,7 @@ config VIA_FIR
389 help 389 help
390 Say Y here if you want to build support for the VIA VT8231 390 Say Y here if you want to build support for the VIA VT8231
391 and VIA VT1211 IrDA controllers, found on the motherboards using 391 and VIA VT1211 IrDA controllers, found on the motherboards using
392 those those VIA chipsets. To use this controller, you will need 392 those VIA chipsets. To use this controller, you will need
393 to plug a specific 5 pins FIR IrDA dongle in the specific 393 to plug a specific 5 pins FIR IrDA dongle in the specific
394 motherboard connector. The driver provides support for SIR, MIR 394 motherboard connector. The driver provides support for SIR, MIR
395 and FIR (4Mbps) speeds. 395 and FIR (4Mbps) speeds.
diff --git a/drivers/net/iseries_veth.c b/drivers/net/iseries_veth.c
index 13ed8dc1e91d..55af32e9bf08 100644
--- a/drivers/net/iseries_veth.c
+++ b/drivers/net/iseries_veth.c
@@ -802,13 +802,14 @@ static void veth_tx_timeout(struct net_device *dev)
802 802
803 spin_lock_irqsave(&port->pending_gate, flags); 803 spin_lock_irqsave(&port->pending_gate, flags);
804 804
805 if (!port->pending_lpmask) {
806 spin_unlock_irqrestore(&port->pending_gate, flags);
807 return;
808 }
809
805 printk(KERN_WARNING "%s: Tx timeout! Resetting lp connections: %08x\n", 810 printk(KERN_WARNING "%s: Tx timeout! Resetting lp connections: %08x\n",
806 dev->name, port->pending_lpmask); 811 dev->name, port->pending_lpmask);
807 812
808 /* If we've timed out the queue must be stopped, which should
809 * only ever happen when there is a pending packet. */
810 WARN_ON(! port->pending_lpmask);
811
812 for (i = 0; i < HVMAXARCHITECTEDLPS; i++) { 813 for (i = 0; i < HVMAXARCHITECTEDLPS; i++) {
813 struct veth_lpar_connection *cnx = veth_cnx[i]; 814 struct veth_lpar_connection *cnx = veth_cnx[i];
814 815
diff --git a/drivers/net/pcmcia/3c574_cs.c b/drivers/net/pcmcia/3c574_cs.c
index 41e517114807..c6e8b25f9685 100644
--- a/drivers/net/pcmcia/3c574_cs.c
+++ b/drivers/net/pcmcia/3c574_cs.c
@@ -1274,6 +1274,9 @@ static int el3_close(struct net_device *dev)
1274 spin_lock_irqsave(&lp->window_lock, flags); 1274 spin_lock_irqsave(&lp->window_lock, flags);
1275 update_stats(dev); 1275 update_stats(dev);
1276 spin_unlock_irqrestore(&lp->window_lock, flags); 1276 spin_unlock_irqrestore(&lp->window_lock, flags);
1277
1278 /* force interrupts off */
1279 outw(SetIntrEnb | 0x0000, ioaddr + EL3_CMD);
1277 } 1280 }
1278 1281
1279 link->open--; 1282 link->open--;
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index c59507f8a76b..d6d0e43dab65 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -415,7 +415,7 @@ struct rtl8169_private {
415 struct work_struct task; 415 struct work_struct task;
416}; 416};
417 417
418MODULE_AUTHOR("Realtek and the Linux r8169 crew <netdev@oss.sgi.com>"); 418MODULE_AUTHOR("Realtek and the Linux r8169 crew <netdev@vger.kernel.org>");
419MODULE_DESCRIPTION("RealTek RTL-8169 Gigabit Ethernet driver"); 419MODULE_DESCRIPTION("RealTek RTL-8169 Gigabit Ethernet driver");
420module_param_array(media, int, &num_media, 0); 420module_param_array(media, int, &num_media, 0);
421module_param(rx_copybreak, int, 0); 421module_param(rx_copybreak, int, 0);
@@ -1585,8 +1585,8 @@ rtl8169_hw_start(struct net_device *dev)
1585 RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb); 1585 RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb);
1586 RTL_W8(EarlyTxThres, EarlyTxThld); 1586 RTL_W8(EarlyTxThres, EarlyTxThld);
1587 1587
1588 /* For gigabit rtl8169, MTU + header + CRC + VLAN */ 1588 /* Low hurts. Let's disable the filtering. */
1589 RTL_W16(RxMaxSize, tp->rx_buf_sz); 1589 RTL_W16(RxMaxSize, 16383);
1590 1590
1591 /* Set Rx Config register */ 1591 /* Set Rx Config register */
1592 i = rtl8169_rx_config | 1592 i = rtl8169_rx_config |
@@ -2127,6 +2127,11 @@ rtl8169_tx_interrupt(struct net_device *dev, struct rtl8169_private *tp,
2127 } 2127 }
2128} 2128}
2129 2129
2130static inline int rtl8169_fragmented_frame(u32 status)
2131{
2132 return (status & (FirstFrag | LastFrag)) != (FirstFrag | LastFrag);
2133}
2134
2130static inline void rtl8169_rx_csum(struct sk_buff *skb, struct RxDesc *desc) 2135static inline void rtl8169_rx_csum(struct sk_buff *skb, struct RxDesc *desc)
2131{ 2136{
2132 u32 opts1 = le32_to_cpu(desc->opts1); 2137 u32 opts1 = le32_to_cpu(desc->opts1);
@@ -2177,27 +2182,41 @@ rtl8169_rx_interrupt(struct net_device *dev, struct rtl8169_private *tp,
2177 2182
2178 while (rx_left > 0) { 2183 while (rx_left > 0) {
2179 unsigned int entry = cur_rx % NUM_RX_DESC; 2184 unsigned int entry = cur_rx % NUM_RX_DESC;
2185 struct RxDesc *desc = tp->RxDescArray + entry;
2180 u32 status; 2186 u32 status;
2181 2187
2182 rmb(); 2188 rmb();
2183 status = le32_to_cpu(tp->RxDescArray[entry].opts1); 2189 status = le32_to_cpu(desc->opts1);
2184 2190
2185 if (status & DescOwn) 2191 if (status & DescOwn)
2186 break; 2192 break;
2187 if (status & RxRES) { 2193 if (status & RxRES) {
2188 printk(KERN_INFO "%s: Rx ERROR!!!\n", dev->name); 2194 printk(KERN_INFO "%s: Rx ERROR. status = %08x\n",
2195 dev->name, status);
2189 tp->stats.rx_errors++; 2196 tp->stats.rx_errors++;
2190 if (status & (RxRWT | RxRUNT)) 2197 if (status & (RxRWT | RxRUNT))
2191 tp->stats.rx_length_errors++; 2198 tp->stats.rx_length_errors++;
2192 if (status & RxCRC) 2199 if (status & RxCRC)
2193 tp->stats.rx_crc_errors++; 2200 tp->stats.rx_crc_errors++;
2201 rtl8169_mark_to_asic(desc, tp->rx_buf_sz);
2194 } else { 2202 } else {
2195 struct RxDesc *desc = tp->RxDescArray + entry;
2196 struct sk_buff *skb = tp->Rx_skbuff[entry]; 2203 struct sk_buff *skb = tp->Rx_skbuff[entry];
2197 int pkt_size = (status & 0x00001FFF) - 4; 2204 int pkt_size = (status & 0x00001FFF) - 4;
2198 void (*pci_action)(struct pci_dev *, dma_addr_t, 2205 void (*pci_action)(struct pci_dev *, dma_addr_t,
2199 size_t, int) = pci_dma_sync_single_for_device; 2206 size_t, int) = pci_dma_sync_single_for_device;
2200 2207
2208 /*
2209 * The driver does not support incoming fragmented
2210 * frames. They are seen as a symptom of over-mtu
2211 * sized frames.
2212 */
2213 if (unlikely(rtl8169_fragmented_frame(status))) {
2214 tp->stats.rx_dropped++;
2215 tp->stats.rx_length_errors++;
2216 rtl8169_mark_to_asic(desc, tp->rx_buf_sz);
2217 goto move_on;
2218 }
2219
2201 rtl8169_rx_csum(skb, desc); 2220 rtl8169_rx_csum(skb, desc);
2202 2221
2203 pci_dma_sync_single_for_cpu(tp->pci_dev, 2222 pci_dma_sync_single_for_cpu(tp->pci_dev,
@@ -2224,7 +2243,7 @@ rtl8169_rx_interrupt(struct net_device *dev, struct rtl8169_private *tp,
2224 tp->stats.rx_bytes += pkt_size; 2243 tp->stats.rx_bytes += pkt_size;
2225 tp->stats.rx_packets++; 2244 tp->stats.rx_packets++;
2226 } 2245 }
2227 2246move_on:
2228 cur_rx++; 2247 cur_rx++;
2229 rx_left--; 2248 rx_left--;
2230 } 2249 }
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index fc9b5cd957aa..a0b8848049c9 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -7,7 +7,12 @@
7 * Copyright (C) 2005 Broadcom Corporation. 7 * Copyright (C) 2005 Broadcom Corporation.
8 * 8 *
9 * Firmware is: 9 * Firmware is:
10 * Copyright (C) 2000-2003 Broadcom Corporation. 10 * Derived from proprietary unpublished source code,
11 * Copyright (C) 2000-2003 Broadcom Corporation.
12 *
13 * Permission is hereby granted for the distribution of this firmware
14 * data in hexadecimal or equivalent format, provided this copyright
15 * notice is accompanying it.
11 */ 16 */
12 17
13#include <linux/config.h> 18#include <linux/config.h>
@@ -61,8 +66,8 @@
61 66
62#define DRV_MODULE_NAME "tg3" 67#define DRV_MODULE_NAME "tg3"
63#define PFX DRV_MODULE_NAME ": " 68#define PFX DRV_MODULE_NAME ": "
64#define DRV_MODULE_VERSION "3.29" 69#define DRV_MODULE_VERSION "3.31"
65#define DRV_MODULE_RELDATE "May 23, 2005" 70#define DRV_MODULE_RELDATE "June 8, 2005"
66 71
67#define TG3_DEF_MAC_MODE 0 72#define TG3_DEF_MAC_MODE 0
68#define TG3_DEF_RX_MODE 0 73#define TG3_DEF_RX_MODE 0
@@ -8555,6 +8560,16 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp)
8555 8560
8556 case NIC_SRAM_DATA_CFG_LED_MODE_MAC: 8561 case NIC_SRAM_DATA_CFG_LED_MODE_MAC:
8557 tp->led_ctrl = LED_CTRL_MODE_MAC; 8562 tp->led_ctrl = LED_CTRL_MODE_MAC;
8563
8564 /* Default to PHY_1_MODE if 0 (MAC_MODE) is
8565 * read on some older 5700/5701 bootcode.
8566 */
8567 if (GET_ASIC_REV(tp->pci_chip_rev_id) ==
8568 ASIC_REV_5700 ||
8569 GET_ASIC_REV(tp->pci_chip_rev_id) ==
8570 ASIC_REV_5701)
8571 tp->led_ctrl = LED_CTRL_MODE_PHY_1;
8572
8558 break; 8573 break;
8559 8574
8560 case SHASTA_EXT_LED_SHARED: 8575 case SHASTA_EXT_LED_SHARED:
@@ -9680,10 +9695,24 @@ static int __devinit tg3_test_dma(struct tg3 *tp)
9680 } 9695 }
9681 if ((tp->dma_rwctrl & DMA_RWCTRL_WRITE_BNDRY_MASK) != 9696 if ((tp->dma_rwctrl & DMA_RWCTRL_WRITE_BNDRY_MASK) !=
9682 DMA_RWCTRL_WRITE_BNDRY_16) { 9697 DMA_RWCTRL_WRITE_BNDRY_16) {
9698 static struct pci_device_id dma_wait_state_chipsets[] = {
9699 { PCI_DEVICE(PCI_VENDOR_ID_APPLE,
9700 PCI_DEVICE_ID_APPLE_UNI_N_PCI15) },
9701 { },
9702 };
9703
9683 /* DMA test passed without adjusting DMA boundary, 9704 /* DMA test passed without adjusting DMA boundary,
9684 * just restore the calculated DMA boundary 9705 * now look for chipsets that are known to expose the
9706 * DMA bug without failing the test.
9685 */ 9707 */
9686 tp->dma_rwctrl = saved_dma_rwctrl; 9708 if (pci_dev_present(dma_wait_state_chipsets)) {
9709 tp->dma_rwctrl &= ~DMA_RWCTRL_WRITE_BNDRY_MASK;
9710 tp->dma_rwctrl |= DMA_RWCTRL_WRITE_BNDRY_16;
9711 }
9712 else
9713 /* Safe to use the calculated DMA boundary. */
9714 tp->dma_rwctrl = saved_dma_rwctrl;
9715
9687 tw32(TG3PCI_DMA_RW_CTRL, tp->dma_rwctrl); 9716 tw32(TG3PCI_DMA_RW_CTRL, tp->dma_rwctrl);
9688 } 9717 }
9689 9718
diff --git a/drivers/pci/hotplug/cpci_hotplug_core.c b/drivers/pci/hotplug/cpci_hotplug_core.c
index 8132d946c384..30af105271a2 100644
--- a/drivers/pci/hotplug/cpci_hotplug_core.c
+++ b/drivers/pci/hotplug/cpci_hotplug_core.c
@@ -217,6 +217,8 @@ static void release_slot(struct hotplug_slot *hotplug_slot)
217 kfree(slot->hotplug_slot->info); 217 kfree(slot->hotplug_slot->info);
218 kfree(slot->hotplug_slot->name); 218 kfree(slot->hotplug_slot->name);
219 kfree(slot->hotplug_slot); 219 kfree(slot->hotplug_slot);
220 if (slot->dev)
221 pci_dev_put(slot->dev);
220 kfree(slot); 222 kfree(slot);
221} 223}
222 224
diff --git a/drivers/pci/hotplug/cpci_hotplug_pci.c b/drivers/pci/hotplug/cpci_hotplug_pci.c
index c878028ad215..225b5e551dd6 100644
--- a/drivers/pci/hotplug/cpci_hotplug_pci.c
+++ b/drivers/pci/hotplug/cpci_hotplug_pci.c
@@ -315,9 +315,12 @@ int cpci_unconfigure_slot(struct slot* slot)
315 PCI_DEVFN(PCI_SLOT(slot->devfn), i)); 315 PCI_DEVFN(PCI_SLOT(slot->devfn), i));
316 if (dev) { 316 if (dev) {
317 pci_remove_bus_device(dev); 317 pci_remove_bus_device(dev);
318 slot->dev = NULL; 318 pci_dev_put(dev);
319 } 319 }
320 } 320 }
321 pci_dev_put(slot->dev);
322 slot->dev = NULL;
323
321 dbg("%s - exit", __FUNCTION__); 324 dbg("%s - exit", __FUNCTION__);
322 return 0; 325 return 0;
323} 326}
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index fe98553c978f..f315df2005bc 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -393,7 +393,10 @@ int pci_register_driver(struct pci_driver *drv)
393 drv->driver.bus = &pci_bus_type; 393 drv->driver.bus = &pci_bus_type;
394 drv->driver.probe = pci_device_probe; 394 drv->driver.probe = pci_device_probe;
395 drv->driver.remove = pci_device_remove; 395 drv->driver.remove = pci_device_remove;
396 drv->driver.shutdown = pci_device_shutdown, 396 /* FIXME, once all of the existing PCI drivers have been fixed to set
397 * the pci shutdown function, this test can go away. */
398 if (!drv->driver.shutdown)
399 drv->driver.shutdown = pci_device_shutdown,
397 drv->driver.owner = drv->owner; 400 drv->driver.owner = drv->owner;
398 drv->driver.kobj.ktype = &pci_driver_kobj_type; 401 drv->driver.kobj.ktype = &pci_driver_kobj_type;
399 pci_init_dynids(&drv->dynids); 402 pci_init_dynids(&drv->dynids);
diff --git a/drivers/pci/pci.ids b/drivers/pci/pci.ids
index 93481b41b613..1d2ef1e2ffc6 100644
--- a/drivers/pci/pci.ids
+++ b/drivers/pci/pci.ids
@@ -7173,6 +7173,7 @@
7173 080f Sentry5 DDR/SDR RAM Controller 7173 080f Sentry5 DDR/SDR RAM Controller
7174 0811 Sentry5 External Interface Core 7174 0811 Sentry5 External Interface Core
7175 0816 BCM3302 Sentry5 MIPS32 CPU 7175 0816 BCM3302 Sentry5 MIPS32 CPU
7176 1600 NetXtreme BCM5752 Gigabit Ethernet PCI Express
7176 1644 NetXtreme BCM5700 Gigabit Ethernet 7177 1644 NetXtreme BCM5700 Gigabit Ethernet
7177 1014 0277 Broadcom Vigil B5700 1000Base-T 7178 1014 0277 Broadcom Vigil B5700 1000Base-T
7178 1028 00d1 Broadcom BCM5700 7179 1028 00d1 Broadcom BCM5700
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index b7ae87823c69..fd48b201eb53 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -125,7 +125,7 @@ static inline unsigned int pci_calc_resource_flags(unsigned int flags)
125/* 125/*
126 * Find the extent of a PCI decode.. 126 * Find the extent of a PCI decode..
127 */ 127 */
128static u32 pci_size(u32 base, u32 maxbase, unsigned long mask) 128static u32 pci_size(u32 base, u32 maxbase, u32 mask)
129{ 129{
130 u32 size = mask & maxbase; /* Find the significant bits */ 130 u32 size = mask & maxbase; /* Find the significant bits */
131 if (!size) 131 if (!size)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 637e9493034b..968033fd29f0 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -456,21 +456,16 @@ static void __init quirk_amd_8131_ioapic(struct pci_dev *dev)
456} 456}
457DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_APIC, quirk_amd_8131_ioapic ); 457DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_APIC, quirk_amd_8131_ioapic );
458 458
459static void __init quirk_svw_msi(struct pci_dev *dev)
460{
461 pci_msi_quirk = 1;
462 printk(KERN_WARNING "PCI: MSI quirk detected. pci_msi_quirk set.\n");
463}
464DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_GCNB_LE, quirk_svw_msi );
459#endif /* CONFIG_X86_IO_APIC */ 465#endif /* CONFIG_X86_IO_APIC */
460 466
461 467
462/* 468/*
463 * Via 686A/B: The PCI_INTERRUPT_LINE register for the on-chip
464 * devices, USB0/1, AC97, MC97, and ACPI, has an unusual feature:
465 * when written, it makes an internal connection to the PIC.
466 * For these devices, this register is defined to be 4 bits wide.
467 * Normally this is fine. However for IO-APIC motherboards, or
468 * non-x86 architectures (yes Via exists on PPC among other places),
469 * we must mask the PCI_INTERRUPT_LINE value versus 0xf to get
470 * interrupts delivered properly.
471 */
472
473/*
474 * FIXME: it is questionable that quirk_via_acpi 469 * FIXME: it is questionable that quirk_via_acpi
475 * is needed. It shows up as an ISA bridge, and does not 470 * is needed. It shows up as an ISA bridge, and does not
476 * support the PCI_INTERRUPT_LINE register at all. Therefore 471 * support the PCI_INTERRUPT_LINE register at all. Therefore
@@ -492,28 +487,30 @@ static void __devinit quirk_via_acpi(struct pci_dev *d)
492DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, quirk_via_acpi ); 487DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, quirk_via_acpi );
493DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_via_acpi ); 488DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_via_acpi );
494 489
495static void quirk_via_irqpic(struct pci_dev *dev) 490/*
491 * Via 686A/B: The PCI_INTERRUPT_LINE register for the on-chip
492 * devices, USB0/1, AC97, MC97, and ACPI, has an unusual feature:
493 * when written, it makes an internal connection to the PIC.
494 * For these devices, this register is defined to be 4 bits wide.
495 * Normally this is fine. However for IO-APIC motherboards, or
496 * non-x86 architectures (yes Via exists on PPC among other places),
497 * we must mask the PCI_INTERRUPT_LINE value versus 0xf to get
498 * interrupts delivered properly.
499 */
500static void quirk_via_irq(struct pci_dev *dev)
496{ 501{
497 u8 irq, new_irq; 502 u8 irq, new_irq;
498 503
499#ifdef CONFIG_X86_IO_APIC
500 if (nr_ioapics && !skip_ioapic_setup)
501 return;
502#endif
503#ifdef CONFIG_ACPI
504 if (acpi_irq_model != ACPI_IRQ_MODEL_PIC)
505 return;
506#endif
507 new_irq = dev->irq & 0xf; 504 new_irq = dev->irq & 0xf;
508 pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq); 505 pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
509 if (new_irq != irq) { 506 if (new_irq != irq) {
510 printk(KERN_INFO "PCI: Via PIC IRQ fixup for %s, from %d to %d\n", 507 printk(KERN_INFO "PCI: Via IRQ fixup for %s, from %d to %d\n",
511 pci_name(dev), irq, new_irq); 508 pci_name(dev), irq, new_irq);
512 udelay(15); /* unknown if delay really needed */ 509 udelay(15); /* unknown if delay really needed */
513 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, new_irq); 510 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, new_irq);
514 } 511 }
515} 512}
516DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_ANY_ID, quirk_via_irqpic); 513DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_ANY_ID, quirk_via_irq);
517 514
518/* 515/*
519 * PIIX3 USB: We have to disable USB interrupts that are 516 * PIIX3 USB: We have to disable USB interrupts that are
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index 1811cb240315..27fec8a5eb5b 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -1752,7 +1752,7 @@ config SCSI_NCR53C7xx_FAST
1752 1752
1753config SUN3_SCSI 1753config SUN3_SCSI
1754 tristate "Sun3 NCR5380 SCSI" 1754 tristate "Sun3 NCR5380 SCSI"
1755 depends on SUN3 && SCSI 1755 depends on SUN3 && SCSI && BROKEN
1756 help 1756 help
1757 This option will enable support for the OBIO (onboard io) NCR5380 1757 This option will enable support for the OBIO (onboard io) NCR5380
1758 SCSI controller found in the Sun 3/50 and 3/60, as well as for 1758 SCSI controller found in the Sun 3/50 and 3/60, as well as for
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 84c4770e5bb4..36b401fee1f1 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -2607,7 +2607,6 @@ static void __atapi_pio_bytes(struct ata_queued_cmd *qc, unsigned int bytes)
2607next_sg: 2607next_sg:
2608 sg = &qc->sg[qc->cursg]; 2608 sg = &qc->sg[qc->cursg];
2609 2609
2610next_page:
2611 page = sg->page; 2610 page = sg->page;
2612 offset = sg->offset + qc->cursg_ofs; 2611 offset = sg->offset + qc->cursg_ofs;
2613 2612
@@ -2615,6 +2614,7 @@ next_page:
2615 page = nth_page(page, (offset >> PAGE_SHIFT)); 2614 page = nth_page(page, (offset >> PAGE_SHIFT));
2616 offset %= PAGE_SIZE; 2615 offset %= PAGE_SIZE;
2617 2616
2617 /* don't overrun current sg */
2618 count = min(sg->length - qc->cursg_ofs, bytes); 2618 count = min(sg->length - qc->cursg_ofs, bytes);
2619 2619
2620 /* don't cross page boundaries */ 2620 /* don't cross page boundaries */
@@ -2639,8 +2639,6 @@ next_page:
2639 kunmap(page); 2639 kunmap(page);
2640 2640
2641 if (bytes) { 2641 if (bytes) {
2642 if (qc->cursg_ofs < sg->length)
2643 goto next_page;
2644 goto next_sg; 2642 goto next_sg;
2645 } 2643 }
2646} 2644}
diff --git a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c
index 238580d244e6..49ed557a4b66 100644
--- a/drivers/scsi/sata_sil.c
+++ b/drivers/scsi/sata_sil.c
@@ -432,7 +432,13 @@ static int sil_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
432 writeb(cls, mmio_base + SIL_FIFO_R0); 432 writeb(cls, mmio_base + SIL_FIFO_R0);
433 writeb(cls, mmio_base + SIL_FIFO_W0); 433 writeb(cls, mmio_base + SIL_FIFO_W0);
434 writeb(cls, mmio_base + SIL_FIFO_R1); 434 writeb(cls, mmio_base + SIL_FIFO_R1);
435 writeb(cls, mmio_base + SIL_FIFO_W2); 435 writeb(cls, mmio_base + SIL_FIFO_W1);
436 if (ent->driver_data == sil_3114) {
437 writeb(cls, mmio_base + SIL_FIFO_R2);
438 writeb(cls, mmio_base + SIL_FIFO_W2);
439 writeb(cls, mmio_base + SIL_FIFO_R3);
440 writeb(cls, mmio_base + SIL_FIFO_W3);
441 }
436 } else 442 } else
437 printk(KERN_WARNING DRV_NAME "(%s): cache line size not set. Driver may not function\n", 443 printk(KERN_WARNING DRV_NAME "(%s): cache line size not set. Driver may not function\n",
438 pci_name(pdev)); 444 pci_name(pdev));
diff --git a/drivers/serial/sa1100.c b/drivers/serial/sa1100.c
index 22565a67a57c..98641c3f5ab9 100644
--- a/drivers/serial/sa1100.c
+++ b/drivers/serial/sa1100.c
@@ -197,7 +197,7 @@ static void
197sa1100_rx_chars(struct sa1100_port *sport, struct pt_regs *regs) 197sa1100_rx_chars(struct sa1100_port *sport, struct pt_regs *regs)
198{ 198{
199 struct tty_struct *tty = sport->port.info->tty; 199 struct tty_struct *tty = sport->port.info->tty;
200 unsigned int status, ch, flg, ignored = 0; 200 unsigned int status, ch, flg;
201 201
202 status = UTSR1_TO_SM(UART_GET_UTSR1(sport)) | 202 status = UTSR1_TO_SM(UART_GET_UTSR1(sport)) |
203 UTSR0_TO_SM(UART_GET_UTSR0(sport)); 203 UTSR0_TO_SM(UART_GET_UTSR0(sport));
diff --git a/drivers/serial/vr41xx_siu.c b/drivers/serial/vr41xx_siu.c
index 5d2ceb623e6f..1f985327b0d4 100644
--- a/drivers/serial/vr41xx_siu.c
+++ b/drivers/serial/vr41xx_siu.c
@@ -234,7 +234,7 @@ static inline const char *siu_type_name(struct uart_port *port)
234 return "DSIU"; 234 return "DSIU";
235 } 235 }
236 236
237 return "unknown"; 237 return NULL;
238} 238}
239 239
240static unsigned int siu_tx_empty(struct uart_port *port) 240static unsigned int siu_tx_empty(struct uart_port *port)
@@ -482,9 +482,6 @@ static irqreturn_t siu_interrupt(int irq, void *dev_id, struct pt_regs *regs)
482 struct uart_port *port; 482 struct uart_port *port;
483 uint8_t iir, lsr; 483 uint8_t iir, lsr;
484 484
485 if (dev_id == NULL)
486 return IRQ_NONE;
487
488 port = (struct uart_port *)dev_id; 485 port = (struct uart_port *)dev_id;
489 486
490 iir = siu_read(port, UART_IIR); 487 iir = siu_read(port, UART_IIR);
@@ -507,6 +504,9 @@ static int siu_startup(struct uart_port *port)
507{ 504{
508 int retval; 505 int retval;
509 506
507 if (port->membase == NULL)
508 return -ENODEV;
509
510 siu_clear_fifo(port); 510 siu_clear_fifo(port);
511 511
512 (void)siu_read(port, UART_LSR); 512 (void)siu_read(port, UART_LSR);
@@ -545,9 +545,6 @@ static void siu_shutdown(struct uart_port *port)
545 unsigned long flags; 545 unsigned long flags;
546 uint8_t lcr; 546 uint8_t lcr;
547 547
548 if (port->membase == NULL)
549 return;
550
551 siu_write(port, UART_IER, 0); 548 siu_write(port, UART_IER, 0);
552 549
553 spin_lock_irqsave(&port->lock, flags); 550 spin_lock_irqsave(&port->lock, flags);
@@ -802,53 +799,6 @@ static int siu_init_ports(void)
802 799
803#ifdef CONFIG_SERIAL_VR41XX_CONSOLE 800#ifdef CONFIG_SERIAL_VR41XX_CONSOLE
804 801
805static void early_set_termios(struct uart_port *port, struct termios *new,
806 struct termios *old)
807{
808 tcflag_t c_cflag;
809 uint8_t lcr;
810 unsigned int baud, quot;
811
812 c_cflag = new->c_cflag;
813 switch (c_cflag & CSIZE) {
814 case CS5:
815 lcr = UART_LCR_WLEN5;
816 break;
817 case CS6:
818 lcr = UART_LCR_WLEN6;
819 break;
820 case CS7:
821 lcr = UART_LCR_WLEN7;
822 break;
823 default:
824 lcr = UART_LCR_WLEN8;
825 break;
826 }
827
828 if (c_cflag & CSTOPB)
829 lcr |= UART_LCR_STOP;
830 if (c_cflag & PARENB)
831 lcr |= UART_LCR_PARITY;
832 if ((c_cflag & PARODD) != PARODD)
833 lcr |= UART_LCR_EPAR;
834 if (c_cflag & CMSPAR)
835 lcr |= UART_LCR_SPAR;
836
837 baud = uart_get_baud_rate(port, new, old, 0, port->uartclk/16);
838 quot = uart_get_divisor(port, baud);
839
840 siu_write(port, UART_LCR, lcr | UART_LCR_DLAB);
841
842 siu_write(port, UART_DLL, (uint8_t)quot);
843 siu_write(port, UART_DLM, (uint8_t)(quot >> 8));
844
845 siu_write(port, UART_LCR, lcr);
846}
847
848static struct uart_ops early_uart_ops = {
849 .set_termios = early_set_termios,
850};
851
852#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE) 802#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE)
853 803
854static void wait_for_xmitr(struct uart_port *port) 804static void wait_for_xmitr(struct uart_port *port)
@@ -915,7 +865,7 @@ static int siu_console_setup(struct console *con, char *options)
915 if (port->membase == NULL) { 865 if (port->membase == NULL) {
916 if (port->mapbase == 0) 866 if (port->mapbase == 0)
917 return -ENODEV; 867 return -ENODEV;
918 port->membase = (unsigned char __iomem *)KSEG1ADDR(port->mapbase); 868 port->membase = ioremap(port->mapbase, siu_port_size(port));
919 } 869 }
920 870
921 vr41xx_select_siu_interface(SIU_INTERFACE_RS232C); 871 vr41xx_select_siu_interface(SIU_INTERFACE_RS232C);
@@ -949,7 +899,7 @@ static int __devinit siu_console_init(void)
949 899
950 for (i = 0; i < num; i++) { 900 for (i = 0; i < num; i++) {
951 port = &siu_uart_ports[i]; 901 port = &siu_uart_ports[i];
952 port->ops = &early_uart_ops; 902 port->ops = &siu_uart_ops;
953 } 903 }
954 904
955 register_console(&siu_console); 905 register_console(&siu_console);
@@ -994,8 +944,10 @@ static int siu_probe(struct device *dev)
994 port->dev = dev; 944 port->dev = dev;
995 945
996 retval = uart_add_one_port(&siu_uart_driver, port); 946 retval = uart_add_one_port(&siu_uart_driver, port);
997 if (retval) 947 if (retval < 0) {
948 port->dev = NULL;
998 break; 949 break;
950 }
999 } 951 }
1000 952
1001 if (i == 0 && retval < 0) { 953 if (i == 0 && retval < 0) {
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
index 429330bc38de..d7b4f7939ded 100644
--- a/drivers/usb/host/ehci-hub.c
+++ b/drivers/usb/host/ehci-hub.c
@@ -439,9 +439,12 @@ static int ehci_hub_control (
439 /* force reset to complete */ 439 /* force reset to complete */
440 writel (temp & ~PORT_RESET, 440 writel (temp & ~PORT_RESET,
441 &ehci->regs->port_status [wIndex]); 441 &ehci->regs->port_status [wIndex]);
442 /* REVISIT: some hardware needs 550+ usec to clear
443 * this bit; seems too long to spin routinely...
444 */
442 retval = handshake ( 445 retval = handshake (
443 &ehci->regs->port_status [wIndex], 446 &ehci->regs->port_status [wIndex],
444 PORT_RESET, 0, 500); 447 PORT_RESET, 0, 750);
445 if (retval != 0) { 448 if (retval != 0) {
446 ehci_err (ehci, "port %d reset error %d\n", 449 ehci_err (ehci, "port %d reset error %d\n",
447 wIndex + 1, retval); 450 wIndex + 1, retval);
diff --git a/drivers/usb/media/pwc/pwc-if.c b/drivers/usb/media/pwc/pwc-if.c
index 5429ff3b9753..b77e65c03659 100644
--- a/drivers/usb/media/pwc/pwc-if.c
+++ b/drivers/usb/media/pwc/pwc-if.c
@@ -332,10 +332,6 @@ static int pwc_allocate_buffers(struct pwc_device *pdev)
332#endif 332#endif
333 ; 333 ;
334 } 334 }
335 if (kbuf == NULL) {
336 Err("Failed to allocate decompress table.\n");
337 return -ENOMEM;
338 }
339 pdev->decompress_data = kbuf; 335 pdev->decompress_data = kbuf;
340 336
341 /* Allocate image buffer; double buffer for mmap() */ 337 /* Allocate image buffer; double buffer for mmap() */
diff --git a/drivers/usb/net/kaweth.c b/drivers/usb/net/kaweth.c
index a9a7cf4a38eb..fd6ff4cb2c62 100644
--- a/drivers/usb/net/kaweth.c
+++ b/drivers/usb/net/kaweth.c
@@ -520,7 +520,7 @@ static void int_callback(struct urb *u, struct pt_regs *regs)
520 520
521 /* we check the link state to report changes */ 521 /* we check the link state to report changes */
522 if (kaweth->linkstate != (act_state = ( kaweth->intbuffer[STATE_OFFSET] | STATE_MASK) >> STATE_SHIFT)) { 522 if (kaweth->linkstate != (act_state = ( kaweth->intbuffer[STATE_OFFSET] | STATE_MASK) >> STATE_SHIFT)) {
523 if (!act_state) 523 if (act_state)
524 netif_carrier_on(kaweth->net); 524 netif_carrier_on(kaweth->net);
525 else 525 else
526 netif_carrier_off(kaweth->net); 526 netif_carrier_off(kaweth->net);
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 051c3a77b41b..3bfcc7b9f861 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -264,7 +264,7 @@
264/* 264/*
265 * Version Information 265 * Version Information
266 */ 266 */
267#define DRIVER_VERSION "v1.4.1" 267#define DRIVER_VERSION "v1.4.2"
268#define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com>, Bill Ryder <bryder@sgi.com>, Kuba Ober <kuba@mareimbrium.org>" 268#define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com>, Bill Ryder <bryder@sgi.com>, Kuba Ober <kuba@mareimbrium.org>"
269#define DRIVER_DESC "USB FTDI Serial Converters Driver" 269#define DRIVER_DESC "USB FTDI Serial Converters Driver"
270 270
@@ -687,6 +687,8 @@ struct ftdi_private {
687 char prev_status, diff_status; /* Used for TIOCMIWAIT */ 687 char prev_status, diff_status; /* Used for TIOCMIWAIT */
688 __u8 rx_flags; /* receive state flags (throttling) */ 688 __u8 rx_flags; /* receive state flags (throttling) */
689 spinlock_t rx_lock; /* spinlock for receive state */ 689 spinlock_t rx_lock; /* spinlock for receive state */
690 struct work_struct rx_work;
691 int rx_processed;
690 692
691 __u16 interface; /* FT2232C port interface (0 for FT232/245) */ 693 __u16 interface; /* FT2232C port interface (0 for FT232/245) */
692 694
@@ -717,7 +719,7 @@ static int ftdi_write_room (struct usb_serial_port *port);
717static int ftdi_chars_in_buffer (struct usb_serial_port *port); 719static int ftdi_chars_in_buffer (struct usb_serial_port *port);
718static void ftdi_write_bulk_callback (struct urb *urb, struct pt_regs *regs); 720static void ftdi_write_bulk_callback (struct urb *urb, struct pt_regs *regs);
719static void ftdi_read_bulk_callback (struct urb *urb, struct pt_regs *regs); 721static void ftdi_read_bulk_callback (struct urb *urb, struct pt_regs *regs);
720static void ftdi_process_read (struct usb_serial_port *port); 722static void ftdi_process_read (void *param);
721static void ftdi_set_termios (struct usb_serial_port *port, struct termios * old); 723static void ftdi_set_termios (struct usb_serial_port *port, struct termios * old);
722static int ftdi_tiocmget (struct usb_serial_port *port, struct file *file); 724static int ftdi_tiocmget (struct usb_serial_port *port, struct file *file);
723static int ftdi_tiocmset (struct usb_serial_port *port, struct file * file, unsigned int set, unsigned int clear); 725static int ftdi_tiocmset (struct usb_serial_port *port, struct file * file, unsigned int set, unsigned int clear);
@@ -1387,6 +1389,8 @@ static int ftdi_common_startup (struct usb_serial *serial)
1387 port->read_urb->transfer_buffer_length = BUFSZ; 1389 port->read_urb->transfer_buffer_length = BUFSZ;
1388 } 1390 }
1389 1391
1392 INIT_WORK(&priv->rx_work, ftdi_process_read, port);
1393
1390 /* Free port's existing write urb and transfer buffer. */ 1394 /* Free port's existing write urb and transfer buffer. */
1391 if (port->write_urb) { 1395 if (port->write_urb) {
1392 usb_free_urb (port->write_urb); 1396 usb_free_urb (port->write_urb);
@@ -1617,6 +1621,7 @@ static int ftdi_open (struct usb_serial_port *port, struct file *filp)
1617 spin_unlock_irqrestore(&priv->rx_lock, flags); 1621 spin_unlock_irqrestore(&priv->rx_lock, flags);
1618 1622
1619 /* Start reading from the device */ 1623 /* Start reading from the device */
1624 priv->rx_processed = 0;
1620 usb_fill_bulk_urb(port->read_urb, dev, 1625 usb_fill_bulk_urb(port->read_urb, dev,
1621 usb_rcvbulkpipe(dev, port->bulk_in_endpointAddress), 1626 usb_rcvbulkpipe(dev, port->bulk_in_endpointAddress),
1622 port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length, 1627 port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
@@ -1667,6 +1672,10 @@ static void ftdi_close (struct usb_serial_port *port, struct file *filp)
1667 err("Error from RTS LOW urb"); 1672 err("Error from RTS LOW urb");
1668 } 1673 }
1669 } /* Note change no line if hupcl is off */ 1674 } /* Note change no line if hupcl is off */
1675
1676 /* cancel any scheduled reading */
1677 cancel_delayed_work(&priv->rx_work);
1678 flush_scheduled_work();
1670 1679
1671 /* shutdown our bulk read */ 1680 /* shutdown our bulk read */
1672 if (port->read_urb) 1681 if (port->read_urb)
@@ -1862,23 +1871,14 @@ static void ftdi_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
1862 return; 1871 return;
1863 } 1872 }
1864 1873
1865 /* If throttled, delay receive processing until unthrottled. */
1866 spin_lock(&priv->rx_lock);
1867 if (priv->rx_flags & THROTTLED) {
1868 dbg("Deferring read urb processing until unthrottled");
1869 priv->rx_flags |= ACTUALLY_THROTTLED;
1870 spin_unlock(&priv->rx_lock);
1871 return;
1872 }
1873 spin_unlock(&priv->rx_lock);
1874
1875 ftdi_process_read(port); 1874 ftdi_process_read(port);
1876 1875
1877} /* ftdi_read_bulk_callback */ 1876} /* ftdi_read_bulk_callback */
1878 1877
1879 1878
1880static void ftdi_process_read (struct usb_serial_port *port) 1879static void ftdi_process_read (void *param)
1881{ /* ftdi_process_read */ 1880{ /* ftdi_process_read */
1881 struct usb_serial_port *port = (struct usb_serial_port*)param;
1882 struct urb *urb; 1882 struct urb *urb;
1883 struct tty_struct *tty; 1883 struct tty_struct *tty;
1884 struct ftdi_private *priv; 1884 struct ftdi_private *priv;
@@ -1889,6 +1889,7 @@ static void ftdi_process_read (struct usb_serial_port *port)
1889 int result; 1889 int result;
1890 int need_flip; 1890 int need_flip;
1891 int packet_offset; 1891 int packet_offset;
1892 unsigned long flags;
1892 1893
1893 dbg("%s - port %d", __FUNCTION__, port->number); 1894 dbg("%s - port %d", __FUNCTION__, port->number);
1894 1895
@@ -1915,12 +1916,18 @@ static void ftdi_process_read (struct usb_serial_port *port)
1915 1916
1916 data = urb->transfer_buffer; 1917 data = urb->transfer_buffer;
1917 1918
1918 /* The first two bytes of every read packet are status */ 1919 if (priv->rx_processed) {
1919 if (urb->actual_length > 2) { 1920 dbg("%s - already processed: %d bytes, %d remain", __FUNCTION__,
1920 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); 1921 priv->rx_processed,
1922 urb->actual_length - priv->rx_processed);
1921 } else { 1923 } else {
1922 dbg("Status only: %03oo %03oo",data[0],data[1]); 1924 /* The first two bytes of every read packet are status */
1923 } 1925 if (urb->actual_length > 2) {
1926 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data);
1927 } else {
1928 dbg("Status only: %03oo %03oo",data[0],data[1]);
1929 }
1930 }
1924 1931
1925 1932
1926 /* TO DO -- check for hung up line and handle appropriately: */ 1933 /* TO DO -- check for hung up line and handle appropriately: */
@@ -1929,8 +1936,12 @@ static void ftdi_process_read (struct usb_serial_port *port)
1929 /* if CD is dropped and the line is not CLOCAL then we should hangup */ 1936 /* if CD is dropped and the line is not CLOCAL then we should hangup */
1930 1937
1931 need_flip = 0; 1938 need_flip = 0;
1932 for (packet_offset=0; packet_offset < urb->actual_length; packet_offset += PKTSZ) { 1939 for (packet_offset = priv->rx_processed; packet_offset < urb->actual_length; packet_offset += PKTSZ) {
1940 int length;
1941
1933 /* Compare new line status to the old one, signal if different */ 1942 /* Compare new line status to the old one, signal if different */
1943 /* N.B. packet may be processed more than once, but differences
1944 * are only processed once. */
1934 if (priv != NULL) { 1945 if (priv != NULL) {
1935 char new_status = data[packet_offset+0] & FTDI_STATUS_B0_MASK; 1946 char new_status = data[packet_offset+0] & FTDI_STATUS_B0_MASK;
1936 if (new_status != priv->prev_status) { 1947 if (new_status != priv->prev_status) {
@@ -1940,6 +1951,35 @@ static void ftdi_process_read (struct usb_serial_port *port)
1940 } 1951 }
1941 } 1952 }
1942 1953
1954 length = min(PKTSZ, urb->actual_length-packet_offset)-2;
1955 if (length < 0) {
1956 err("%s - bad packet length: %d", __FUNCTION__, length+2);
1957 length = 0;
1958 }
1959
1960 /* have to make sure we don't overflow the buffer
1961 with tty_insert_flip_char's */
1962 if (tty->flip.count+length > TTY_FLIPBUF_SIZE) {
1963 tty_flip_buffer_push(tty);
1964 need_flip = 0;
1965
1966 if (tty->flip.count != 0) {
1967 /* flip didn't work, this happens when ftdi_process_read() is
1968 * called from ftdi_unthrottle, because TTY_DONT_FLIP is set */
1969 dbg("%s - flip buffer push failed", __FUNCTION__);
1970 break;
1971 }
1972 }
1973 if (priv->rx_flags & THROTTLED) {
1974 dbg("%s - throttled", __FUNCTION__);
1975 break;
1976 }
1977 if (tty->ldisc.receive_room(tty)-tty->flip.count < length) {
1978 /* break out & wait for throttling/unthrottling to happen */
1979 dbg("%s - receive room low", __FUNCTION__);
1980 break;
1981 }
1982
1943 /* Handle errors and break */ 1983 /* Handle errors and break */
1944 error_flag = TTY_NORMAL; 1984 error_flag = TTY_NORMAL;
1945 /* Although the device uses a bitmask and hence can have multiple */ 1985 /* Although the device uses a bitmask and hence can have multiple */
@@ -1962,13 +2002,8 @@ static void ftdi_process_read (struct usb_serial_port *port)
1962 error_flag = TTY_FRAME; 2002 error_flag = TTY_FRAME;
1963 dbg("FRAMING error"); 2003 dbg("FRAMING error");
1964 } 2004 }
1965 if (urb->actual_length > packet_offset + 2) { 2005 if (length > 0) {
1966 for (i = 2; (i < PKTSZ) && ((i+packet_offset) < urb->actual_length); ++i) { 2006 for (i = 2; i < length+2; i++) {
1967 /* have to make sure we don't overflow the buffer
1968 with tty_insert_flip_char's */
1969 if(tty->flip.count >= TTY_FLIPBUF_SIZE) {
1970 tty_flip_buffer_push(tty);
1971 }
1972 /* Note that the error flag is duplicated for 2007 /* Note that the error flag is duplicated for
1973 every character received since we don't know 2008 every character received since we don't know
1974 which character it applied to */ 2009 which character it applied to */
@@ -2005,6 +2040,35 @@ static void ftdi_process_read (struct usb_serial_port *port)
2005 tty_flip_buffer_push(tty); 2040 tty_flip_buffer_push(tty);
2006 } 2041 }
2007 2042
2043 if (packet_offset < urb->actual_length) {
2044 /* not completely processed - record progress */
2045 priv->rx_processed = packet_offset;
2046 dbg("%s - incomplete, %d bytes processed, %d remain",
2047 __FUNCTION__, packet_offset,
2048 urb->actual_length - packet_offset);
2049 /* check if we were throttled while processing */
2050 spin_lock_irqsave(&priv->rx_lock, flags);
2051 if (priv->rx_flags & THROTTLED) {
2052 priv->rx_flags |= ACTUALLY_THROTTLED;
2053 spin_unlock_irqrestore(&priv->rx_lock, flags);
2054 dbg("%s - deferring remainder until unthrottled",
2055 __FUNCTION__);
2056 return;
2057 }
2058 spin_unlock_irqrestore(&priv->rx_lock, flags);
2059 /* if the port is closed stop trying to read */
2060 if (port->open_count > 0){
2061 /* delay processing of remainder */
2062 schedule_delayed_work(&priv->rx_work, 1);
2063 } else {
2064 dbg("%s - port is closed", __FUNCTION__);
2065 }
2066 return;
2067 }
2068
2069 /* urb is completely processed */
2070 priv->rx_processed = 0;
2071
2008 /* if the port is closed stop trying to read */ 2072 /* if the port is closed stop trying to read */
2009 if (port->open_count > 0){ 2073 if (port->open_count > 0){
2010 /* Continue trying to always read */ 2074 /* Continue trying to always read */
@@ -2444,7 +2508,7 @@ static void ftdi_unthrottle (struct usb_serial_port *port)
2444 spin_unlock_irqrestore(&priv->rx_lock, flags); 2508 spin_unlock_irqrestore(&priv->rx_lock, flags);
2445 2509
2446 if (actually_throttled) 2510 if (actually_throttled)
2447 ftdi_process_read(port); 2511 schedule_work(&priv->rx_work);
2448} 2512}
2449 2513
2450static int __init ftdi_init (void) 2514static int __init ftdi_init (void)
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
index ee25b9e8db60..47a6b12bc968 100644
--- a/drivers/video/aty/radeon_base.c
+++ b/drivers/video/aty/radeon_base.c
@@ -2374,10 +2374,9 @@ static int radeonfb_pci_register (struct pci_dev *pdev,
2374 } while ( rinfo->fb_base == 0 && 2374 } while ( rinfo->fb_base == 0 &&
2375 ((rinfo->mapped_vram /=2) >= MIN_MAPPED_VRAM) ); 2375 ((rinfo->mapped_vram /=2) >= MIN_MAPPED_VRAM) );
2376 2376
2377 if (rinfo->fb_base) 2377 if (rinfo->fb_base == NULL) {
2378 memset_io(rinfo->fb_base, 0, rinfo->mapped_vram); 2378 printk (KERN_ERR "radeonfb (%s): cannot map FB\n",
2379 else { 2379 pci_name(rinfo->pdev));
2380 printk (KERN_ERR "radeonfb (%s): cannot map FB\n", pci_name(rinfo->pdev));
2381 ret = -EIO; 2380 ret = -EIO;
2382 goto err_unmap_rom; 2381 goto err_unmap_rom;
2383 } 2382 }
diff --git a/drivers/video/fbsysfs.c b/drivers/video/fbsysfs.c
index c78a2c5961d3..277d733c6d00 100644
--- a/drivers/video/fbsysfs.c
+++ b/drivers/video/fbsysfs.c
@@ -241,7 +241,7 @@ static ssize_t show_virtual(struct class_device *class_device, char *buf)
241 struct fb_info *fb_info = 241 struct fb_info *fb_info =
242 (struct fb_info *)class_get_devdata(class_device); 242 (struct fb_info *)class_get_devdata(class_device);
243 return snprintf(buf, PAGE_SIZE, "%d,%d\n", fb_info->var.xres_virtual, 243 return snprintf(buf, PAGE_SIZE, "%d,%d\n", fb_info->var.xres_virtual,
244 fb_info->var.xres_virtual); 244 fb_info->var.yres_virtual);
245} 245}
246 246
247static ssize_t store_cmap(struct class_device *class_device, const char * buf, 247static ssize_t store_cmap(struct class_device *class_device, const char * buf,
diff --git a/drivers/video/macmodes.c b/drivers/video/macmodes.c
index de5a0f383600..2fc71081f7e7 100644
--- a/drivers/video/macmodes.c
+++ b/drivers/video/macmodes.c
@@ -387,3 +387,4 @@ int __init mac_find_mode(struct fb_var_screeninfo *var, struct fb_info *info,
387} 387}
388EXPORT_SYMBOL(mac_find_mode); 388EXPORT_SYMBOL(mac_find_mode);
389 389
390MODULE_LICENSE("GPL");
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index c374be51b041..f8f6b6b76179 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -1125,7 +1125,7 @@ static int dump_write(struct file *file, const void *addr, int nr)
1125 return file->f_op->write(file, addr, nr, &file->f_pos) == nr; 1125 return file->f_op->write(file, addr, nr, &file->f_pos) == nr;
1126} 1126}
1127 1127
1128static int dump_seek(struct file *file, off_t off) 1128static int dump_seek(struct file *file, loff_t off)
1129{ 1129{
1130 if (file->f_op->llseek) { 1130 if (file->f_op->llseek) {
1131 if (file->f_op->llseek(file, off, 0) != off) 1131 if (file->f_op->llseek(file, off, 0) != off)
diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c
index f0cd67d9d31b..c8998dc66882 100644
--- a/fs/binfmt_flat.c
+++ b/fs/binfmt_flat.c
@@ -520,7 +520,7 @@ static int load_flat_file(struct linux_binprm * bprm,
520 DBG_FLT("BINFMT_FLAT: ROM mapping of file (we hope)\n"); 520 DBG_FLT("BINFMT_FLAT: ROM mapping of file (we hope)\n");
521 521
522 down_write(&current->mm->mmap_sem); 522 down_write(&current->mm->mmap_sem);
523 textpos = do_mmap(bprm->file, 0, text_len, PROT_READ|PROT_EXEC, 0, 0); 523 textpos = do_mmap(bprm->file, 0, text_len, PROT_READ|PROT_EXEC, MAP_SHARED, 0);
524 up_write(&current->mm->mmap_sem); 524 up_write(&current->mm->mmap_sem);
525 if (!textpos || textpos >= (unsigned long) -4096) { 525 if (!textpos || textpos >= (unsigned long) -4096) {
526 if (!textpos) 526 if (!textpos)
@@ -532,7 +532,7 @@ static int load_flat_file(struct linux_binprm * bprm,
532 down_write(&current->mm->mmap_sem); 532 down_write(&current->mm->mmap_sem);
533 realdatastart = do_mmap(0, 0, data_len + extra + 533 realdatastart = do_mmap(0, 0, data_len + extra +
534 MAX_SHARED_LIBS * sizeof(unsigned long), 534 MAX_SHARED_LIBS * sizeof(unsigned long),
535 PROT_READ|PROT_WRITE|PROT_EXEC, 0, 0); 535 PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, 0);
536 up_write(&current->mm->mmap_sem); 536 up_write(&current->mm->mmap_sem);
537 537
538 if (realdatastart == 0 || realdatastart >= (unsigned long)-4096) { 538 if (realdatastart == 0 || realdatastart >= (unsigned long)-4096) {
@@ -574,7 +574,7 @@ static int load_flat_file(struct linux_binprm * bprm,
574 down_write(&current->mm->mmap_sem); 574 down_write(&current->mm->mmap_sem);
575 textpos = do_mmap(0, 0, text_len + data_len + extra + 575 textpos = do_mmap(0, 0, text_len + data_len + extra +
576 MAX_SHARED_LIBS * sizeof(unsigned long), 576 MAX_SHARED_LIBS * sizeof(unsigned long),
577 PROT_READ | PROT_EXEC | PROT_WRITE, 0, 0); 577 PROT_READ | PROT_EXEC | PROT_WRITE, MAP_PRIVATE, 0);
578 up_write(&current->mm->mmap_sem); 578 up_write(&current->mm->mmap_sem);
579 if (!textpos || textpos >= (unsigned long) -4096) { 579 if (!textpos || textpos >= (unsigned long) -4096) {
580 if (!textpos) 580 if (!textpos)
diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES
index 95483baab706..dab4774ee7bb 100644
--- a/fs/cifs/CHANGES
+++ b/fs/cifs/CHANGES
@@ -6,7 +6,8 @@ kills the cifsd thread (NB: killing the cifs kernel threads is not
6recommended, unmount and rmmod cifs will kill them when they are 6recommended, unmount and rmmod cifs will kill them when they are
7no longer needed). Fix readdir to ASCII servers (ie older servers 7no longer needed). Fix readdir to ASCII servers (ie older servers
8which do not support Unicode) and also require asterik. 8which do not support Unicode) and also require asterik.
9 9Fix out of memory case in which data could be written one page
10off in the page cache.
10 11
11Version 1.33 12Version 1.33
12------------ 13------------
diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h
index d00b3bfe1a52..78af5850c558 100644
--- a/fs/cifs/cifsfs.h
+++ b/fs/cifs/cifsfs.h
@@ -96,5 +96,5 @@ extern ssize_t cifs_getxattr(struct dentry *, const char *, void *, size_t);
96extern ssize_t cifs_listxattr(struct dentry *, char *, size_t); 96extern ssize_t cifs_listxattr(struct dentry *, char *, size_t);
97extern int cifs_ioctl (struct inode * inode, struct file * filep, 97extern int cifs_ioctl (struct inode * inode, struct file * filep,
98 unsigned int command, unsigned long arg); 98 unsigned int command, unsigned long arg);
99#define CIFS_VERSION "1.34" 99#define CIFS_VERSION "1.35"
100#endif /* _CIFSFS_H */ 100#endif /* _CIFSFS_H */
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index dde2d251fc3d..30ab70ce5547 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -1352,6 +1352,8 @@ static void cifs_copy_cache_pages(struct address_space *mapping,
1352 GFP_KERNEL)) { 1352 GFP_KERNEL)) {
1353 page_cache_release(page); 1353 page_cache_release(page);
1354 cFYI(1, ("Add page cache failed")); 1354 cFYI(1, ("Add page cache failed"));
1355 data += PAGE_CACHE_SIZE;
1356 bytes_read -= PAGE_CACHE_SIZE;
1355 continue; 1357 continue;
1356 } 1358 }
1357 1359
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index b8b78cbb34c9..8d336a900255 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -82,12 +82,12 @@ int cifs_get_inode_info_unix(struct inode **pinode,
82 /* get new inode */ 82 /* get new inode */
83 if (*pinode == NULL) { 83 if (*pinode == NULL) {
84 *pinode = new_inode(sb); 84 *pinode = new_inode(sb);
85 if(*pinode == NULL) 85 if (*pinode == NULL)
86 return -ENOMEM; 86 return -ENOMEM;
87 /* Is an i_ino of zero legal? */ 87 /* Is an i_ino of zero legal? */
88 /* Are there sanity checks we can use to ensure that 88 /* Are there sanity checks we can use to ensure that
89 the server is really filling in that field? */ 89 the server is really filling in that field? */
90 if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) { 90 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) {
91 (*pinode)->i_ino = 91 (*pinode)->i_ino =
92 (unsigned long)findData.UniqueId; 92 (unsigned long)findData.UniqueId;
93 } /* note ino incremented to unique num in new_inode */ 93 } /* note ino incremented to unique num in new_inode */
@@ -134,7 +134,7 @@ int cifs_get_inode_info_unix(struct inode **pinode,
134 inode->i_gid = le64_to_cpu(findData.Gid); 134 inode->i_gid = le64_to_cpu(findData.Gid);
135 inode->i_nlink = le64_to_cpu(findData.Nlinks); 135 inode->i_nlink = le64_to_cpu(findData.Nlinks);
136 136
137 if(is_size_safe_to_change(cifsInfo)) { 137 if (is_size_safe_to_change(cifsInfo)) {
138 /* can not safely change the file size here if the 138 /* can not safely change the file size here if the
139 client is writing to it due to potential races */ 139 client is writing to it due to potential races */
140 140
@@ -162,7 +162,7 @@ int cifs_get_inode_info_unix(struct inode **pinode,
162 if (S_ISREG(inode->i_mode)) { 162 if (S_ISREG(inode->i_mode)) {
163 cFYI(1, (" File inode ")); 163 cFYI(1, (" File inode "));
164 inode->i_op = &cifs_file_inode_ops; 164 inode->i_op = &cifs_file_inode_ops;
165 if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DIRECT_IO) 165 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DIRECT_IO)
166 inode->i_fop = &cifs_file_direct_ops; 166 inode->i_fop = &cifs_file_direct_ops;
167 else 167 else
168 inode->i_fop = &cifs_file_ops; 168 inode->i_fop = &cifs_file_ops;
@@ -198,17 +198,17 @@ int cifs_get_inode_info(struct inode **pinode,
198 pTcon = cifs_sb->tcon; 198 pTcon = cifs_sb->tcon;
199 cFYI(1,("Getting info on %s ", search_path)); 199 cFYI(1,("Getting info on %s ", search_path));
200 200
201 if((pfindData == NULL) && (*pinode != NULL)) { 201 if ((pfindData == NULL) && (*pinode != NULL)) {
202 if(CIFS_I(*pinode)->clientCanCacheRead) { 202 if (CIFS_I(*pinode)->clientCanCacheRead) {
203 cFYI(1,("No need to revalidate cached inode sizes")); 203 cFYI(1,("No need to revalidate cached inode sizes"));
204 return rc; 204 return rc;
205 } 205 }
206 } 206 }
207 207
208 /* if file info not passed in then get it from server */ 208 /* if file info not passed in then get it from server */
209 if(pfindData == NULL) { 209 if (pfindData == NULL) {
210 buf = kmalloc(sizeof(FILE_ALL_INFO), GFP_KERNEL); 210 buf = kmalloc(sizeof(FILE_ALL_INFO), GFP_KERNEL);
211 if(buf == NULL) 211 if (buf == NULL)
212 return -ENOMEM; 212 return -ENOMEM;
213 pfindData = (FILE_ALL_INFO *)buf; 213 pfindData = (FILE_ALL_INFO *)buf;
214 /* could do find first instead but this returns more info */ 214 /* could do find first instead but this returns more info */
@@ -268,7 +268,7 @@ int cifs_get_inode_info(struct inode **pinode,
268 IndexNumber field is not guaranteed unique? */ 268 IndexNumber field is not guaranteed unique? */
269 269
270#ifdef CONFIG_CIFS_EXPERIMENTAL 270#ifdef CONFIG_CIFS_EXPERIMENTAL
271 if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM){ 271 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM){
272 int rc1 = 0; 272 int rc1 = 0;
273 __u64 inode_num; 273 __u64 inode_num;
274 274
@@ -277,7 +277,7 @@ int cifs_get_inode_info(struct inode **pinode,
277 cifs_sb->local_nls, 277 cifs_sb->local_nls,
278 cifs_sb->mnt_cifs_flags & 278 cifs_sb->mnt_cifs_flags &
279 CIFS_MOUNT_MAP_SPECIAL_CHR); 279 CIFS_MOUNT_MAP_SPECIAL_CHR);
280 if(rc1) { 280 if (rc1) {
281 cFYI(1,("GetSrvInodeNum rc %d", rc1)); 281 cFYI(1,("GetSrvInodeNum rc %d", rc1));
282 /* BB EOPNOSUPP disable SERVER_INUM? */ 282 /* BB EOPNOSUPP disable SERVER_INUM? */
283 } else /* do we need cast or hash to ino? */ 283 } else /* do we need cast or hash to ino? */
@@ -355,7 +355,7 @@ int cifs_get_inode_info(struct inode **pinode,
355 if (S_ISREG(inode->i_mode)) { 355 if (S_ISREG(inode->i_mode)) {
356 cFYI(1, (" File inode ")); 356 cFYI(1, (" File inode "));
357 inode->i_op = &cifs_file_inode_ops; 357 inode->i_op = &cifs_file_inode_ops;
358 if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DIRECT_IO) 358 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DIRECT_IO)
359 inode->i_fop = &cifs_file_direct_ops; 359 inode->i_fop = &cifs_file_direct_ops;
360 else 360 else
361 inode->i_fop = &cifs_file_ops; 361 inode->i_fop = &cifs_file_ops;
@@ -422,7 +422,7 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry)
422 cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); 422 cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
423 423
424 if (!rc) { 424 if (!rc) {
425 if(direntry->d_inode) 425 if (direntry->d_inode)
426 direntry->d_inode->i_nlink--; 426 direntry->d_inode->i_nlink--;
427 } else if (rc == -ENOENT) { 427 } else if (rc == -ENOENT) {
428 d_drop(direntry); 428 d_drop(direntry);
@@ -441,7 +441,7 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry)
441 cifs_sb->mnt_cifs_flags & 441 cifs_sb->mnt_cifs_flags &
442 CIFS_MOUNT_MAP_SPECIAL_CHR); 442 CIFS_MOUNT_MAP_SPECIAL_CHR);
443 CIFSSMBClose(xid, pTcon, netfid); 443 CIFSSMBClose(xid, pTcon, netfid);
444 if(direntry->d_inode) 444 if (direntry->d_inode)
445 direntry->d_inode->i_nlink--; 445 direntry->d_inode->i_nlink--;
446 } 446 }
447 } else if (rc == -EACCES) { 447 } else if (rc == -EACCES) {
@@ -496,7 +496,7 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry)
496 cifs_sb->mnt_cifs_flags & 496 cifs_sb->mnt_cifs_flags &
497 CIFS_MOUNT_MAP_SPECIAL_CHR); 497 CIFS_MOUNT_MAP_SPECIAL_CHR);
498 if (!rc) { 498 if (!rc) {
499 if(direntry->d_inode) 499 if (direntry->d_inode)
500 direntry->d_inode->i_nlink--; 500 direntry->d_inode->i_nlink--;
501 } else if (rc == -ETXTBSY) { 501 } else if (rc == -ETXTBSY) {
502 int oplock = FALSE; 502 int oplock = FALSE;
@@ -517,14 +517,14 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry)
517 cifs_sb->mnt_cifs_flags & 517 cifs_sb->mnt_cifs_flags &
518 CIFS_MOUNT_MAP_SPECIAL_CHR); 518 CIFS_MOUNT_MAP_SPECIAL_CHR);
519 CIFSSMBClose(xid, pTcon, netfid); 519 CIFSSMBClose(xid, pTcon, netfid);
520 if(direntry->d_inode) 520 if (direntry->d_inode)
521 direntry->d_inode->i_nlink--; 521 direntry->d_inode->i_nlink--;
522 } 522 }
523 /* BB if rc = -ETXTBUSY goto the rename logic BB */ 523 /* BB if rc = -ETXTBUSY goto the rename logic BB */
524 } 524 }
525 } 525 }
526 } 526 }
527 if(direntry->d_inode) { 527 if (direntry->d_inode) {
528 cifsInode = CIFS_I(direntry->d_inode); 528 cifsInode = CIFS_I(direntry->d_inode);
529 cifsInode->time = 0; /* will force revalidate to get info 529 cifsInode->time = 0; /* will force revalidate to get info
530 when needed */ 530 when needed */
@@ -582,7 +582,7 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode)
582 if (direntry->d_inode) 582 if (direntry->d_inode)
583 direntry->d_inode->i_nlink = 2; 583 direntry->d_inode->i_nlink = 2;
584 if (cifs_sb->tcon->ses->capabilities & CAP_UNIX) 584 if (cifs_sb->tcon->ses->capabilities & CAP_UNIX)
585 if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) { 585 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) {
586 CIFSSMBUnixSetPerms(xid, pTcon, full_path, 586 CIFSSMBUnixSetPerms(xid, pTcon, full_path,
587 mode, 587 mode,
588 (__u64)current->euid, 588 (__u64)current->euid,
diff --git a/fs/mpage.c b/fs/mpage.c
index b92c0e64aefa..bb9aebe93862 100644
--- a/fs/mpage.c
+++ b/fs/mpage.c
@@ -79,8 +79,11 @@ static int mpage_end_io_write(struct bio *bio, unsigned int bytes_done, int err)
79 if (--bvec >= bio->bi_io_vec) 79 if (--bvec >= bio->bi_io_vec)
80 prefetchw(&bvec->bv_page->flags); 80 prefetchw(&bvec->bv_page->flags);
81 81
82 if (!uptodate) 82 if (!uptodate){
83 SetPageError(page); 83 SetPageError(page);
84 if (page->mapping)
85 set_bit(AS_EIO, &page->mapping->flags);
86 }
84 end_page_writeback(page); 87 end_page_writeback(page);
85 } while (bvec >= bio->bi_io_vec); 88 } while (bvec >= bio->bi_io_vec);
86 bio_put(bio); 89 bio_put(bio);
diff --git a/fs/namei.c b/fs/namei.c
index dd78f01b6de8..a7f7f44119b3 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -493,12 +493,21 @@ fail:
493 return PTR_ERR(link); 493 return PTR_ERR(link);
494} 494}
495 495
496static inline int __do_follow_link(struct dentry *dentry, struct nameidata *nd) 496struct path {
497 struct vfsmount *mnt;
498 struct dentry *dentry;
499};
500
501static inline int __do_follow_link(struct path *path, struct nameidata *nd)
497{ 502{
498 int error; 503 int error;
504 struct dentry *dentry = path->dentry;
499 505
500 touch_atime(nd->mnt, dentry); 506 touch_atime(path->mnt, dentry);
501 nd_set_link(nd, NULL); 507 nd_set_link(nd, NULL);
508
509 if (path->mnt == nd->mnt)
510 mntget(path->mnt);
502 error = dentry->d_inode->i_op->follow_link(dentry, nd); 511 error = dentry->d_inode->i_op->follow_link(dentry, nd);
503 if (!error) { 512 if (!error) {
504 char *s = nd_get_link(nd); 513 char *s = nd_get_link(nd);
@@ -507,6 +516,8 @@ static inline int __do_follow_link(struct dentry *dentry, struct nameidata *nd)
507 if (dentry->d_inode->i_op->put_link) 516 if (dentry->d_inode->i_op->put_link)
508 dentry->d_inode->i_op->put_link(dentry, nd); 517 dentry->d_inode->i_op->put_link(dentry, nd);
509 } 518 }
519 dput(dentry);
520 mntput(path->mnt);
510 521
511 return error; 522 return error;
512} 523}
@@ -518,7 +529,7 @@ static inline int __do_follow_link(struct dentry *dentry, struct nameidata *nd)
518 * Without that kind of total limit, nasty chains of consecutive 529 * Without that kind of total limit, nasty chains of consecutive
519 * symlinks can cause almost arbitrarily long lookups. 530 * symlinks can cause almost arbitrarily long lookups.
520 */ 531 */
521static inline int do_follow_link(struct dentry *dentry, struct nameidata *nd) 532static inline int do_follow_link(struct path *path, struct nameidata *nd)
522{ 533{
523 int err = -ELOOP; 534 int err = -ELOOP;
524 if (current->link_count >= MAX_NESTED_LINKS) 535 if (current->link_count >= MAX_NESTED_LINKS)
@@ -527,17 +538,20 @@ static inline int do_follow_link(struct dentry *dentry, struct nameidata *nd)
527 goto loop; 538 goto loop;
528 BUG_ON(nd->depth >= MAX_NESTED_LINKS); 539 BUG_ON(nd->depth >= MAX_NESTED_LINKS);
529 cond_resched(); 540 cond_resched();
530 err = security_inode_follow_link(dentry, nd); 541 err = security_inode_follow_link(path->dentry, nd);
531 if (err) 542 if (err)
532 goto loop; 543 goto loop;
533 current->link_count++; 544 current->link_count++;
534 current->total_link_count++; 545 current->total_link_count++;
535 nd->depth++; 546 nd->depth++;
536 err = __do_follow_link(dentry, nd); 547 err = __do_follow_link(path, nd);
537 current->link_count--; 548 current->link_count--;
538 nd->depth--; 549 nd->depth--;
539 return err; 550 return err;
540loop: 551loop:
552 dput(path->dentry);
553 if (path->mnt != nd->mnt)
554 mntput(path->mnt);
541 path_release(nd); 555 path_release(nd);
542 return err; 556 return err;
543} 557}
@@ -565,87 +579,91 @@ int follow_up(struct vfsmount **mnt, struct dentry **dentry)
565/* no need for dcache_lock, as serialization is taken care in 579/* no need for dcache_lock, as serialization is taken care in
566 * namespace.c 580 * namespace.c
567 */ 581 */
568static int follow_mount(struct vfsmount **mnt, struct dentry **dentry) 582static int __follow_mount(struct path *path)
569{ 583{
570 int res = 0; 584 int res = 0;
585 while (d_mountpoint(path->dentry)) {
586 struct vfsmount *mounted = lookup_mnt(path->mnt, path->dentry);
587 if (!mounted)
588 break;
589 dput(path->dentry);
590 if (res)
591 mntput(path->mnt);
592 path->mnt = mounted;
593 path->dentry = dget(mounted->mnt_root);
594 res = 1;
595 }
596 return res;
597}
598
599static void follow_mount(struct vfsmount **mnt, struct dentry **dentry)
600{
571 while (d_mountpoint(*dentry)) { 601 while (d_mountpoint(*dentry)) {
572 struct vfsmount *mounted = lookup_mnt(*mnt, *dentry); 602 struct vfsmount *mounted = lookup_mnt(*mnt, *dentry);
573 if (!mounted) 603 if (!mounted)
574 break; 604 break;
605 dput(*dentry);
575 mntput(*mnt); 606 mntput(*mnt);
576 *mnt = mounted; 607 *mnt = mounted;
577 dput(*dentry);
578 *dentry = dget(mounted->mnt_root); 608 *dentry = dget(mounted->mnt_root);
579 res = 1;
580 } 609 }
581 return res;
582} 610}
583 611
584/* no need for dcache_lock, as serialization is taken care in 612/* no need for dcache_lock, as serialization is taken care in
585 * namespace.c 613 * namespace.c
586 */ 614 */
587static inline int __follow_down(struct vfsmount **mnt, struct dentry **dentry) 615int follow_down(struct vfsmount **mnt, struct dentry **dentry)
588{ 616{
589 struct vfsmount *mounted; 617 struct vfsmount *mounted;
590 618
591 mounted = lookup_mnt(*mnt, *dentry); 619 mounted = lookup_mnt(*mnt, *dentry);
592 if (mounted) { 620 if (mounted) {
621 dput(*dentry);
593 mntput(*mnt); 622 mntput(*mnt);
594 *mnt = mounted; 623 *mnt = mounted;
595 dput(*dentry);
596 *dentry = dget(mounted->mnt_root); 624 *dentry = dget(mounted->mnt_root);
597 return 1; 625 return 1;
598 } 626 }
599 return 0; 627 return 0;
600} 628}
601 629
602int follow_down(struct vfsmount **mnt, struct dentry **dentry) 630static inline void follow_dotdot(struct nameidata *nd)
603{
604 return __follow_down(mnt,dentry);
605}
606
607static inline void follow_dotdot(struct vfsmount **mnt, struct dentry **dentry)
608{ 631{
609 while(1) { 632 while(1) {
610 struct vfsmount *parent; 633 struct vfsmount *parent;
611 struct dentry *old = *dentry; 634 struct dentry *old = nd->dentry;
612 635
613 read_lock(&current->fs->lock); 636 read_lock(&current->fs->lock);
614 if (*dentry == current->fs->root && 637 if (nd->dentry == current->fs->root &&
615 *mnt == current->fs->rootmnt) { 638 nd->mnt == current->fs->rootmnt) {
616 read_unlock(&current->fs->lock); 639 read_unlock(&current->fs->lock);
617 break; 640 break;
618 } 641 }
619 read_unlock(&current->fs->lock); 642 read_unlock(&current->fs->lock);
620 spin_lock(&dcache_lock); 643 spin_lock(&dcache_lock);
621 if (*dentry != (*mnt)->mnt_root) { 644 if (nd->dentry != nd->mnt->mnt_root) {
622 *dentry = dget((*dentry)->d_parent); 645 nd->dentry = dget(nd->dentry->d_parent);
623 spin_unlock(&dcache_lock); 646 spin_unlock(&dcache_lock);
624 dput(old); 647 dput(old);
625 break; 648 break;
626 } 649 }
627 spin_unlock(&dcache_lock); 650 spin_unlock(&dcache_lock);
628 spin_lock(&vfsmount_lock); 651 spin_lock(&vfsmount_lock);
629 parent = (*mnt)->mnt_parent; 652 parent = nd->mnt->mnt_parent;
630 if (parent == *mnt) { 653 if (parent == nd->mnt) {
631 spin_unlock(&vfsmount_lock); 654 spin_unlock(&vfsmount_lock);
632 break; 655 break;
633 } 656 }
634 mntget(parent); 657 mntget(parent);
635 *dentry = dget((*mnt)->mnt_mountpoint); 658 nd->dentry = dget(nd->mnt->mnt_mountpoint);
636 spin_unlock(&vfsmount_lock); 659 spin_unlock(&vfsmount_lock);
637 dput(old); 660 dput(old);
638 mntput(*mnt); 661 mntput(nd->mnt);
639 *mnt = parent; 662 nd->mnt = parent;
640 } 663 }
641 follow_mount(mnt, dentry); 664 follow_mount(&nd->mnt, &nd->dentry);
642} 665}
643 666
644struct path {
645 struct vfsmount *mnt;
646 struct dentry *dentry;
647};
648
649/* 667/*
650 * It's more convoluted than I'd like it to be, but... it's still fairly 668 * It's more convoluted than I'd like it to be, but... it's still fairly
651 * small and for now I'd prefer to have fast path as straight as possible. 669 * small and for now I'd prefer to have fast path as straight as possible.
@@ -664,6 +682,7 @@ static int do_lookup(struct nameidata *nd, struct qstr *name,
664done: 682done:
665 path->mnt = mnt; 683 path->mnt = mnt;
666 path->dentry = dentry; 684 path->dentry = dentry;
685 __follow_mount(path);
667 return 0; 686 return 0;
668 687
669need_lookup: 688need_lookup:
@@ -751,7 +770,7 @@ static fastcall int __link_path_walk(const char * name, struct nameidata *nd)
751 case 2: 770 case 2:
752 if (this.name[1] != '.') 771 if (this.name[1] != '.')
753 break; 772 break;
754 follow_dotdot(&nd->mnt, &nd->dentry); 773 follow_dotdot(nd);
755 inode = nd->dentry->d_inode; 774 inode = nd->dentry->d_inode;
756 /* fallthrough */ 775 /* fallthrough */
757 case 1: 776 case 1:
@@ -771,8 +790,6 @@ static fastcall int __link_path_walk(const char * name, struct nameidata *nd)
771 err = do_lookup(nd, &this, &next); 790 err = do_lookup(nd, &this, &next);
772 if (err) 791 if (err)
773 break; 792 break;
774 /* Check mountpoints.. */
775 follow_mount(&next.mnt, &next.dentry);
776 793
777 err = -ENOENT; 794 err = -ENOENT;
778 inode = next.dentry->d_inode; 795 inode = next.dentry->d_inode;
@@ -783,10 +800,7 @@ static fastcall int __link_path_walk(const char * name, struct nameidata *nd)
783 goto out_dput; 800 goto out_dput;
784 801
785 if (inode->i_op->follow_link) { 802 if (inode->i_op->follow_link) {
786 mntget(next.mnt); 803 err = do_follow_link(&next, nd);
787 err = do_follow_link(next.dentry, nd);
788 dput(next.dentry);
789 mntput(next.mnt);
790 if (err) 804 if (err)
791 goto return_err; 805 goto return_err;
792 err = -ENOENT; 806 err = -ENOENT;
@@ -798,6 +812,8 @@ static fastcall int __link_path_walk(const char * name, struct nameidata *nd)
798 break; 812 break;
799 } else { 813 } else {
800 dput(nd->dentry); 814 dput(nd->dentry);
815 if (nd->mnt != next.mnt)
816 mntput(nd->mnt);
801 nd->mnt = next.mnt; 817 nd->mnt = next.mnt;
802 nd->dentry = next.dentry; 818 nd->dentry = next.dentry;
803 } 819 }
@@ -819,7 +835,7 @@ last_component:
819 case 2: 835 case 2:
820 if (this.name[1] != '.') 836 if (this.name[1] != '.')
821 break; 837 break;
822 follow_dotdot(&nd->mnt, &nd->dentry); 838 follow_dotdot(nd);
823 inode = nd->dentry->d_inode; 839 inode = nd->dentry->d_inode;
824 /* fallthrough */ 840 /* fallthrough */
825 case 1: 841 case 1:
@@ -833,19 +849,17 @@ last_component:
833 err = do_lookup(nd, &this, &next); 849 err = do_lookup(nd, &this, &next);
834 if (err) 850 if (err)
835 break; 851 break;
836 follow_mount(&next.mnt, &next.dentry);
837 inode = next.dentry->d_inode; 852 inode = next.dentry->d_inode;
838 if ((lookup_flags & LOOKUP_FOLLOW) 853 if ((lookup_flags & LOOKUP_FOLLOW)
839 && inode && inode->i_op && inode->i_op->follow_link) { 854 && inode && inode->i_op && inode->i_op->follow_link) {
840 mntget(next.mnt); 855 err = do_follow_link(&next, nd);
841 err = do_follow_link(next.dentry, nd);
842 dput(next.dentry);
843 mntput(next.mnt);
844 if (err) 856 if (err)
845 goto return_err; 857 goto return_err;
846 inode = nd->dentry->d_inode; 858 inode = nd->dentry->d_inode;
847 } else { 859 } else {
848 dput(nd->dentry); 860 dput(nd->dentry);
861 if (nd->mnt != next.mnt)
862 mntput(nd->mnt);
849 nd->mnt = next.mnt; 863 nd->mnt = next.mnt;
850 nd->dentry = next.dentry; 864 nd->dentry = next.dentry;
851 } 865 }
@@ -885,6 +899,8 @@ return_base:
885 return 0; 899 return 0;
886out_dput: 900out_dput:
887 dput(next.dentry); 901 dput(next.dentry);
902 if (nd->mnt != next.mnt)
903 mntput(next.mnt);
888 break; 904 break;
889 } 905 }
890 path_release(nd); 906 path_release(nd);
@@ -1398,7 +1414,7 @@ int may_open(struct nameidata *nd, int acc_mode, int flag)
1398int open_namei(const char * pathname, int flag, int mode, struct nameidata *nd) 1414int open_namei(const char * pathname, int flag, int mode, struct nameidata *nd)
1399{ 1415{
1400 int acc_mode, error = 0; 1416 int acc_mode, error = 0;
1401 struct dentry *dentry; 1417 struct path path;
1402 struct dentry *dir; 1418 struct dentry *dir;
1403 int count = 0; 1419 int count = 0;
1404 1420
@@ -1442,23 +1458,24 @@ int open_namei(const char * pathname, int flag, int mode, struct nameidata *nd)
1442 dir = nd->dentry; 1458 dir = nd->dentry;
1443 nd->flags &= ~LOOKUP_PARENT; 1459 nd->flags &= ~LOOKUP_PARENT;
1444 down(&dir->d_inode->i_sem); 1460 down(&dir->d_inode->i_sem);
1445 dentry = __lookup_hash(&nd->last, nd->dentry, nd); 1461 path.dentry = __lookup_hash(&nd->last, nd->dentry, nd);
1462 path.mnt = nd->mnt;
1446 1463
1447do_last: 1464do_last:
1448 error = PTR_ERR(dentry); 1465 error = PTR_ERR(path.dentry);
1449 if (IS_ERR(dentry)) { 1466 if (IS_ERR(path.dentry)) {
1450 up(&dir->d_inode->i_sem); 1467 up(&dir->d_inode->i_sem);
1451 goto exit; 1468 goto exit;
1452 } 1469 }
1453 1470
1454 /* Negative dentry, just create the file */ 1471 /* Negative dentry, just create the file */
1455 if (!dentry->d_inode) { 1472 if (!path.dentry->d_inode) {
1456 if (!IS_POSIXACL(dir->d_inode)) 1473 if (!IS_POSIXACL(dir->d_inode))
1457 mode &= ~current->fs->umask; 1474 mode &= ~current->fs->umask;
1458 error = vfs_create(dir->d_inode, dentry, mode, nd); 1475 error = vfs_create(dir->d_inode, path.dentry, mode, nd);
1459 up(&dir->d_inode->i_sem); 1476 up(&dir->d_inode->i_sem);
1460 dput(nd->dentry); 1477 dput(nd->dentry);
1461 nd->dentry = dentry; 1478 nd->dentry = path.dentry;
1462 if (error) 1479 if (error)
1463 goto exit; 1480 goto exit;
1464 /* Don't check for write permission, don't truncate */ 1481 /* Don't check for write permission, don't truncate */
@@ -1476,22 +1493,24 @@ do_last:
1476 if (flag & O_EXCL) 1493 if (flag & O_EXCL)
1477 goto exit_dput; 1494 goto exit_dput;
1478 1495
1479 if (d_mountpoint(dentry)) { 1496 if (__follow_mount(&path)) {
1480 error = -ELOOP; 1497 error = -ELOOP;
1481 if (flag & O_NOFOLLOW) 1498 if (flag & O_NOFOLLOW)
1482 goto exit_dput; 1499 goto exit_dput;
1483 while (__follow_down(&nd->mnt,&dentry) && d_mountpoint(dentry));
1484 } 1500 }
1485 error = -ENOENT; 1501 error = -ENOENT;
1486 if (!dentry->d_inode) 1502 if (!path.dentry->d_inode)
1487 goto exit_dput; 1503 goto exit_dput;
1488 if (dentry->d_inode->i_op && dentry->d_inode->i_op->follow_link) 1504 if (path.dentry->d_inode->i_op && path.dentry->d_inode->i_op->follow_link)
1489 goto do_link; 1505 goto do_link;
1490 1506
1491 dput(nd->dentry); 1507 dput(nd->dentry);
1492 nd->dentry = dentry; 1508 nd->dentry = path.dentry;
1509 if (nd->mnt != path.mnt)
1510 mntput(nd->mnt);
1511 nd->mnt = path.mnt;
1493 error = -EISDIR; 1512 error = -EISDIR;
1494 if (dentry->d_inode && S_ISDIR(dentry->d_inode->i_mode)) 1513 if (path.dentry->d_inode && S_ISDIR(path.dentry->d_inode->i_mode))
1495 goto exit; 1514 goto exit;
1496ok: 1515ok:
1497 error = may_open(nd, acc_mode, flag); 1516 error = may_open(nd, acc_mode, flag);
@@ -1500,7 +1519,9 @@ ok:
1500 return 0; 1519 return 0;
1501 1520
1502exit_dput: 1521exit_dput:
1503 dput(dentry); 1522 dput(path.dentry);
1523 if (nd->mnt != path.mnt)
1524 mntput(path.mnt);
1504exit: 1525exit:
1505 path_release(nd); 1526 path_release(nd);
1506 return error; 1527 return error;
@@ -1520,18 +1541,15 @@ do_link:
1520 * are done. Procfs-like symlinks just set LAST_BIND. 1541 * are done. Procfs-like symlinks just set LAST_BIND.
1521 */ 1542 */
1522 nd->flags |= LOOKUP_PARENT; 1543 nd->flags |= LOOKUP_PARENT;
1523 error = security_inode_follow_link(dentry, nd); 1544 error = security_inode_follow_link(path.dentry, nd);
1524 if (error) 1545 if (error)
1525 goto exit_dput; 1546 goto exit_dput;
1526 error = __do_follow_link(dentry, nd); 1547 error = __do_follow_link(&path, nd);
1527 dput(dentry);
1528 if (error) 1548 if (error)
1529 return error; 1549 return error;
1530 nd->flags &= ~LOOKUP_PARENT; 1550 nd->flags &= ~LOOKUP_PARENT;
1531 if (nd->last_type == LAST_BIND) { 1551 if (nd->last_type == LAST_BIND)
1532 dentry = nd->dentry;
1533 goto ok; 1552 goto ok;
1534 }
1535 error = -EISDIR; 1553 error = -EISDIR;
1536 if (nd->last_type != LAST_NORM) 1554 if (nd->last_type != LAST_NORM)
1537 goto exit; 1555 goto exit;
@@ -1546,7 +1564,8 @@ do_link:
1546 } 1564 }
1547 dir = nd->dentry; 1565 dir = nd->dentry;
1548 down(&dir->d_inode->i_sem); 1566 down(&dir->d_inode->i_sem);
1549 dentry = __lookup_hash(&nd->last, nd->dentry, nd); 1567 path.dentry = __lookup_hash(&nd->last, nd->dentry, nd);
1568 path.mnt = nd->mnt;
1550 putname(nd->last.name); 1569 putname(nd->last.name);
1551 goto do_last; 1570 goto do_last;
1552} 1571}
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 73f96acd5d37..ff6155f5e8d9 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -528,19 +528,39 @@ static inline void nfs_renew_times(struct dentry * dentry)
528 dentry->d_time = jiffies; 528 dentry->d_time = jiffies;
529} 529}
530 530
531/*
532 * Return the intent data that applies to this particular path component
533 *
534 * Note that the current set of intents only apply to the very last
535 * component of the path.
536 * We check for this using LOOKUP_CONTINUE and LOOKUP_PARENT.
537 */
538static inline unsigned int nfs_lookup_check_intent(struct nameidata *nd, unsigned int mask)
539{
540 if (nd->flags & (LOOKUP_CONTINUE|LOOKUP_PARENT))
541 return 0;
542 return nd->flags & mask;
543}
544
545/*
546 * Inode and filehandle revalidation for lookups.
547 *
548 * We force revalidation in the cases where the VFS sets LOOKUP_REVAL,
549 * or if the intent information indicates that we're about to open this
550 * particular file and the "nocto" mount flag is not set.
551 *
552 */
531static inline 553static inline
532int nfs_lookup_verify_inode(struct inode *inode, struct nameidata *nd) 554int nfs_lookup_verify_inode(struct inode *inode, struct nameidata *nd)
533{ 555{
534 struct nfs_server *server = NFS_SERVER(inode); 556 struct nfs_server *server = NFS_SERVER(inode);
535 557
536 if (nd != NULL) { 558 if (nd != NULL) {
537 int ndflags = nd->flags;
538 /* VFS wants an on-the-wire revalidation */ 559 /* VFS wants an on-the-wire revalidation */
539 if (ndflags & LOOKUP_REVAL) 560 if (nd->flags & LOOKUP_REVAL)
540 goto out_force; 561 goto out_force;
541 /* This is an open(2) */ 562 /* This is an open(2) */
542 if ((ndflags & LOOKUP_OPEN) && 563 if (nfs_lookup_check_intent(nd, LOOKUP_OPEN) != 0 &&
543 !(ndflags & LOOKUP_CONTINUE) &&
544 !(server->flags & NFS_MOUNT_NOCTO)) 564 !(server->flags & NFS_MOUNT_NOCTO))
545 goto out_force; 565 goto out_force;
546 } 566 }
@@ -560,12 +580,8 @@ static inline
560int nfs_neg_need_reval(struct inode *dir, struct dentry *dentry, 580int nfs_neg_need_reval(struct inode *dir, struct dentry *dentry,
561 struct nameidata *nd) 581 struct nameidata *nd)
562{ 582{
563 int ndflags = 0;
564
565 if (nd)
566 ndflags = nd->flags;
567 /* Don't revalidate a negative dentry if we're creating a new file */ 583 /* Don't revalidate a negative dentry if we're creating a new file */
568 if ((ndflags & LOOKUP_CREATE) && !(ndflags & LOOKUP_CONTINUE)) 584 if (nd != NULL && nfs_lookup_check_intent(nd, LOOKUP_CREATE) != 0)
569 return 0; 585 return 0;
570 return !nfs_check_verifier(dir, dentry); 586 return !nfs_check_verifier(dir, dentry);
571} 587}
@@ -700,12 +716,16 @@ struct dentry_operations nfs_dentry_operations = {
700 .d_iput = nfs_dentry_iput, 716 .d_iput = nfs_dentry_iput,
701}; 717};
702 718
719/*
720 * Use intent information to check whether or not we're going to do
721 * an O_EXCL create using this path component.
722 */
703static inline 723static inline
704int nfs_is_exclusive_create(struct inode *dir, struct nameidata *nd) 724int nfs_is_exclusive_create(struct inode *dir, struct nameidata *nd)
705{ 725{
706 if (NFS_PROTO(dir)->version == 2) 726 if (NFS_PROTO(dir)->version == 2)
707 return 0; 727 return 0;
708 if (!nd || (nd->flags & LOOKUP_CONTINUE) || !(nd->flags & LOOKUP_CREATE)) 728 if (nd == NULL || nfs_lookup_check_intent(nd, LOOKUP_CREATE) == 0)
709 return 0; 729 return 0;
710 return (nd->intent.open.flags & O_EXCL) != 0; 730 return (nd->intent.open.flags & O_EXCL) != 0;
711} 731}
@@ -772,12 +792,13 @@ struct dentry_operations nfs4_dentry_operations = {
772 .d_iput = nfs_dentry_iput, 792 .d_iput = nfs_dentry_iput,
773}; 793};
774 794
795/*
796 * Use intent information to determine whether we need to substitute
797 * the NFSv4-style stateful OPEN for the LOOKUP call
798 */
775static int is_atomic_open(struct inode *dir, struct nameidata *nd) 799static int is_atomic_open(struct inode *dir, struct nameidata *nd)
776{ 800{
777 if (!nd) 801 if (nd == NULL || nfs_lookup_check_intent(nd, LOOKUP_OPEN) == 0)
778 return 0;
779 /* Check that we are indeed trying to open this file */
780 if ((nd->flags & LOOKUP_CONTINUE) || !(nd->flags & LOOKUP_OPEN))
781 return 0; 802 return 0;
782 /* NFS does not (yet) have a stateful open for directories */ 803 /* NFS does not (yet) have a stateful open for directories */
783 if (nd->flags & LOOKUP_DIRECTORY) 804 if (nd->flags & LOOKUP_DIRECTORY)
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index f06eee6dcff5..55c907592490 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -37,6 +37,7 @@
37 37
38static int nfs_file_open(struct inode *, struct file *); 38static int nfs_file_open(struct inode *, struct file *);
39static int nfs_file_release(struct inode *, struct file *); 39static int nfs_file_release(struct inode *, struct file *);
40static loff_t nfs_file_llseek(struct file *file, loff_t offset, int origin);
40static int nfs_file_mmap(struct file *, struct vm_area_struct *); 41static int nfs_file_mmap(struct file *, struct vm_area_struct *);
41static ssize_t nfs_file_sendfile(struct file *, loff_t *, size_t, read_actor_t, void *); 42static ssize_t nfs_file_sendfile(struct file *, loff_t *, size_t, read_actor_t, void *);
42static ssize_t nfs_file_read(struct kiocb *, char __user *, size_t, loff_t); 43static ssize_t nfs_file_read(struct kiocb *, char __user *, size_t, loff_t);
@@ -48,7 +49,7 @@ static int nfs_lock(struct file *filp, int cmd, struct file_lock *fl);
48static int nfs_flock(struct file *filp, int cmd, struct file_lock *fl); 49static int nfs_flock(struct file *filp, int cmd, struct file_lock *fl);
49 50
50struct file_operations nfs_file_operations = { 51struct file_operations nfs_file_operations = {
51 .llseek = remote_llseek, 52 .llseek = nfs_file_llseek,
52 .read = do_sync_read, 53 .read = do_sync_read,
53 .write = do_sync_write, 54 .write = do_sync_write,
54 .aio_read = nfs_file_read, 55 .aio_read = nfs_file_read,
@@ -114,6 +115,45 @@ nfs_file_release(struct inode *inode, struct file *filp)
114 return NFS_PROTO(inode)->file_release(inode, filp); 115 return NFS_PROTO(inode)->file_release(inode, filp);
115} 116}
116 117
118/**
119 * nfs_revalidate_size - Revalidate the file size
120 * @inode - pointer to inode struct
121 * @file - pointer to struct file
122 *
123 * Revalidates the file length. This is basically a wrapper around
124 * nfs_revalidate_inode() that takes into account the fact that we may
125 * have cached writes (in which case we don't care about the server's
126 * idea of what the file length is), or O_DIRECT (in which case we
127 * shouldn't trust the cache).
128 */
129static int nfs_revalidate_file_size(struct inode *inode, struct file *filp)
130{
131 struct nfs_server *server = NFS_SERVER(inode);
132 struct nfs_inode *nfsi = NFS_I(inode);
133
134 if (server->flags & NFS_MOUNT_NOAC)
135 goto force_reval;
136 if (filp->f_flags & O_DIRECT)
137 goto force_reval;
138 if (nfsi->npages != 0)
139 return 0;
140 return nfs_revalidate_inode(server, inode);
141force_reval:
142 return __nfs_revalidate_inode(server, inode);
143}
144
145static loff_t nfs_file_llseek(struct file *filp, loff_t offset, int origin)
146{
147 /* origin == SEEK_END => we must revalidate the cached file length */
148 if (origin == 2) {
149 struct inode *inode = filp->f_mapping->host;
150 int retval = nfs_revalidate_file_size(inode, filp);
151 if (retval < 0)
152 return (loff_t)retval;
153 }
154 return remote_llseek(filp, offset, origin);
155}
156
117/* 157/*
118 * Flush all dirty pages, and check for write errors. 158 * Flush all dirty pages, and check for write errors.
119 * 159 *
diff --git a/include/asm-alpha/agp.h b/include/asm-alpha/agp.h
index c99dbbb5bcb5..ef855a3bc0f5 100644
--- a/include/asm-alpha/agp.h
+++ b/include/asm-alpha/agp.h
@@ -10,4 +10,14 @@
10#define flush_agp_mappings() 10#define flush_agp_mappings()
11#define flush_agp_cache() mb() 11#define flush_agp_cache() mb()
12 12
13/* Convert a physical address to an address suitable for the GART. */
14#define phys_to_gart(x) (x)
15#define gart_to_phys(x) (x)
16
17/* GATT allocation. Returns/accepts GATT kernel virtual address. */
18#define alloc_gatt_pages(order) \
19 ((char *)__get_free_pages(GFP_KERNEL, (order)))
20#define free_gatt_pages(table, order) \
21 free_pages((unsigned long)(table), (order))
22
13#endif 23#endif
diff --git a/include/asm-arm/arch-integrator/platform.h b/include/asm-arm/arch-integrator/platform.h
index bd364f5a99bc..96ad3d2a66d1 100644
--- a/include/asm-arm/arch-integrator/platform.h
+++ b/include/asm-arm/arch-integrator/platform.h
@@ -293,7 +293,11 @@
293#define INTEGRATOR_DBG_SWITCH (INTEGRATOR_DBG_BASE + INTEGRATOR_DBG_SWITCH_OFFSET) 293#define INTEGRATOR_DBG_SWITCH (INTEGRATOR_DBG_BASE + INTEGRATOR_DBG_SWITCH_OFFSET)
294 294
295 295
296#if defined(CONFIG_ARCH_INTEGRATOR_AP)
296#define INTEGRATOR_GPIO_BASE 0x1B000000 /* GPIO */ 297#define INTEGRATOR_GPIO_BASE 0x1B000000 /* GPIO */
298#elif defined(CONFIG_ARCH_INTEGRATOR_CP)
299#define INTEGRATOR_GPIO_BASE 0xC9000000 /* GPIO */
300#endif
297 301
298/* ------------------------------------------------------------------------ 302/* ------------------------------------------------------------------------
299 * KMI keyboard/mouse definitions 303 * KMI keyboard/mouse definitions
diff --git a/include/asm-arm/arch-ixp2000/io.h b/include/asm-arm/arch-ixp2000/io.h
index a8e3c2daefd6..083462668e18 100644
--- a/include/asm-arm/arch-ixp2000/io.h
+++ b/include/asm-arm/arch-ixp2000/io.h
@@ -75,8 +75,8 @@ static inline void insw(u32 ptr, void *buf, int length)
75 * Is this cycle meant for the CS8900? 75 * Is this cycle meant for the CS8900?
76 */ 76 */
77 if ((machine_is_ixdp2401() || machine_is_ixdp2801()) && 77 if ((machine_is_ixdp2401() || machine_is_ixdp2801()) &&
78 ((port >= IXDP2X01_CS8900_VIRT_BASE) && 78 (((u32)port >= (u32)IXDP2X01_CS8900_VIRT_BASE) &&
79 (port <= IXDP2X01_CS8900_VIRT_END))) { 79 ((u32)port <= (u32)IXDP2X01_CS8900_VIRT_END))) {
80 u8 *buf8 = (u8*)buf; 80 u8 *buf8 = (u8*)buf;
81 register u32 tmp32; 81 register u32 tmp32;
82 82
@@ -100,8 +100,8 @@ static inline void outsw(u32 ptr, void *buf, int length)
100 * Is this cycle meant for the CS8900? 100 * Is this cycle meant for the CS8900?
101 */ 101 */
102 if ((machine_is_ixdp2401() || machine_is_ixdp2801()) && 102 if ((machine_is_ixdp2401() || machine_is_ixdp2801()) &&
103 ((port >= IXDP2X01_CS8900_VIRT_BASE) && 103 (((u32)port >= (u32)IXDP2X01_CS8900_VIRT_BASE) &&
104 (port <= IXDP2X01_CS8900_VIRT_END))) { 104 ((u32)port <= (u32)IXDP2X01_CS8900_VIRT_END))) {
105 register u32 tmp32; 105 register u32 tmp32;
106 u8 *buf8 = (u8*)buf; 106 u8 *buf8 = (u8*)buf;
107 do { 107 do {
@@ -124,8 +124,8 @@ static inline u16 inw(u32 ptr)
124 * Is this cycle meant for the CS8900? 124 * Is this cycle meant for the CS8900?
125 */ 125 */
126 if ((machine_is_ixdp2401() || machine_is_ixdp2801()) && 126 if ((machine_is_ixdp2401() || machine_is_ixdp2801()) &&
127 ((port >= IXDP2X01_CS8900_VIRT_BASE) && 127 (((u32)port >= (u32)IXDP2X01_CS8900_VIRT_BASE) &&
128 (port <= IXDP2X01_CS8900_VIRT_END))) { 128 ((u32)port <= (u32)IXDP2X01_CS8900_VIRT_END))) {
129 return (u16)(*port); 129 return (u16)(*port);
130 } 130 }
131 131
@@ -137,8 +137,8 @@ static inline void outw(u16 value, u32 ptr)
137 register volatile u32 *port = (volatile u32 *)ptr; 137 register volatile u32 *port = (volatile u32 *)ptr;
138 138
139 if ((machine_is_ixdp2401() || machine_is_ixdp2801()) && 139 if ((machine_is_ixdp2401() || machine_is_ixdp2801()) &&
140 ((port >= IXDP2X01_CS8900_VIRT_BASE) && 140 (((u32)port >= (u32)IXDP2X01_CS8900_VIRT_BASE) &&
141 (port <= IXDP2X01_CS8900_VIRT_END))) { 141 ((u32)port <= (u32)IXDP2X01_CS8900_VIRT_END))) {
142 *port = value; 142 *port = value;
143 return; 143 return;
144 } 144 }
diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h
index 39741d3c9a34..b5e54a9e9fa7 100644
--- a/include/asm-arm/arch-pxa/pxa-regs.h
+++ b/include/asm-arm/arch-pxa/pxa-regs.h
@@ -1296,6 +1296,7 @@
1296#define GPIO111_MMCDAT3 111 /* MMC DAT3 (PXA27x) */ 1296#define GPIO111_MMCDAT3 111 /* MMC DAT3 (PXA27x) */
1297#define GPIO111_MMCCS1 111 /* MMC Chip Select 1 (PXA27x) */ 1297#define GPIO111_MMCCS1 111 /* MMC Chip Select 1 (PXA27x) */
1298#define GPIO112_MMCCMD 112 /* MMC CMD (PXA27x) */ 1298#define GPIO112_MMCCMD 112 /* MMC CMD (PXA27x) */
1299#define GPIO113_I2S_SYSCLK 113 /* I2S System Clock (PXA27x) */
1299#define GPIO113_AC97_RESET_N 113 /* AC97 NRESET on (PXA27x) */ 1300#define GPIO113_AC97_RESET_N 113 /* AC97 NRESET on (PXA27x) */
1300 1301
1301/* GPIO alternate function mode & direction */ 1302/* GPIO alternate function mode & direction */
@@ -1428,6 +1429,7 @@
1428#define GPIO111_MMCDAT3_MD (111 | GPIO_ALT_FN_1_OUT) 1429#define GPIO111_MMCDAT3_MD (111 | GPIO_ALT_FN_1_OUT)
1429#define GPIO110_MMCCS1_MD (111 | GPIO_ALT_FN_1_OUT) 1430#define GPIO110_MMCCS1_MD (111 | GPIO_ALT_FN_1_OUT)
1430#define GPIO112_MMCCMD_MD (112 | GPIO_ALT_FN_1_OUT) 1431#define GPIO112_MMCCMD_MD (112 | GPIO_ALT_FN_1_OUT)
1432#define GPIO113_I2S_SYSCLK_MD (113 | GPIO_ALT_FN_1_OUT)
1431#define GPIO113_AC97_RESET_N_MD (113 | GPIO_ALT_FN_2_OUT) 1433#define GPIO113_AC97_RESET_N_MD (113 | GPIO_ALT_FN_2_OUT)
1432#define GPIO117_I2CSCL_MD (117 | GPIO_ALT_FN_1_OUT) 1434#define GPIO117_I2CSCL_MD (117 | GPIO_ALT_FN_1_OUT)
1433#define GPIO118_I2CSDA_MD (118 | GPIO_ALT_FN_1_IN) 1435#define GPIO118_I2CSDA_MD (118 | GPIO_ALT_FN_1_IN)
diff --git a/include/asm-arm/arch-versatile/platform.h b/include/asm-arm/arch-versatile/platform.h
index 2598d1f08548..a71093e44c58 100644
--- a/include/asm-arm/arch-versatile/platform.h
+++ b/include/asm-arm/arch-versatile/platform.h
@@ -498,11 +498,17 @@
498/* 498/*
499 * IB2 Versatile/AB expansion board definitions 499 * IB2 Versatile/AB expansion board definitions
500 */ 500 */
501#define VERSATILE_IB2_CAMERA_BANK 0x24000000 501#define VERSATILE_IB2_CAMERA_BANK VERSATILE_IB2_BASE
502#define VERSATILE_IB2_KBD_DATAREG 0x25000000 502#define VERSATILE_IB2_KBD_DATAREG (VERSATILE_IB2_BASE + 0x01000000)
503#define VERSATILE_IB2_IER 0x26000000 /* for VICINTSOURCE27 */ 503
504#define VERSATILE_IB2_CTRL 0x27000000 504/* VICINTSOURCE27 */
505#define VERSATILE_IB2_STAT 0x27000004 505#define VERSATILE_IB2_INT_BASE (VERSATILE_IB2_BASE + 0x02000000)
506#define VERSATILE_IB2_IER (VERSATILE_IB2_INT_BASE + 0)
507#define VERSATILE_IB2_ISR (VERSATILE_IB2_INT_BASE + 4)
508
509#define VERSATILE_IB2_CTL_BASE (VERSATILE_IB2_BASE + 0x03000000)
510#define VERSATILE_IB2_CTRL (VERSATILE_IB2_CTL_BASE + 0)
511#define VERSATILE_IB2_STAT (VERSATILE_IB2_CTL_BASE + 4)
506#endif 512#endif
507 513
508#endif 514#endif
diff --git a/include/asm-arm/elf.h b/include/asm-arm/elf.h
index cbceacbe5afa..a1696ba238d3 100644
--- a/include/asm-arm/elf.h
+++ b/include/asm-arm/elf.h
@@ -38,9 +38,9 @@ typedef struct user_fp elf_fpregset_t;
38 */ 38 */
39#define ELF_CLASS ELFCLASS32 39#define ELF_CLASS ELFCLASS32
40#ifdef __ARMEB__ 40#ifdef __ARMEB__
41#define ELF_DATA ELFDATA2MSB; 41#define ELF_DATA ELFDATA2MSB
42#else 42#else
43#define ELF_DATA ELFDATA2LSB; 43#define ELF_DATA ELFDATA2LSB
44#endif 44#endif
45#define ELF_ARCH EM_ARM 45#define ELF_ARCH EM_ARM
46 46
diff --git a/include/asm-arm26/elf.h b/include/asm-arm26/elf.h
index 8b149474db24..5a47fdb3015d 100644
--- a/include/asm-arm26/elf.h
+++ b/include/asm-arm26/elf.h
@@ -36,7 +36,7 @@ typedef struct { void *null; } elf_fpregset_t;
36 * These are used to set parameters in the core dumps. 36 * These are used to set parameters in the core dumps.
37 */ 37 */
38#define ELF_CLASS ELFCLASS32 38#define ELF_CLASS ELFCLASS32
39#define ELF_DATA ELFDATA2LSB; 39#define ELF_DATA ELFDATA2LSB
40#define ELF_ARCH EM_ARM 40#define ELF_ARCH EM_ARM
41 41
42#define USE_ELF_CORE_DUMP 42#define USE_ELF_CORE_DUMP
diff --git a/include/asm-arm26/signal.h b/include/asm-arm26/signal.h
index dedb29280303..37ad25355591 100644
--- a/include/asm-arm26/signal.h
+++ b/include/asm-arm26/signal.h
@@ -166,9 +166,6 @@ typedef struct sigaltstack {
166#include <asm/sigcontext.h> 166#include <asm/sigcontext.h>
167 167
168#define sigmask(sig) (1UL << ((sig) - 1)) 168#define sigmask(sig) (1UL << ((sig) - 1))
169//FIXME!!!
170//#define HAVE_ARCH_GET_SIGNAL_TO_DELIVER
171
172#endif 169#endif
173 170
174 171
diff --git a/include/asm-h8300/kmap_types.h b/include/asm-h8300/kmap_types.h
index 82431edeb2a1..1ec8a3427120 100644
--- a/include/asm-h8300/kmap_types.h
+++ b/include/asm-h8300/kmap_types.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_KMAP_TYPES_H 1#ifndef _ASM_H8300_KMAP_TYPES_H
2#define _ASM_KMAP_TYPES_H 2#define _ASM_H8300_KMAP_TYPES_H
3 3
4enum km_type { 4enum km_type {
5 KM_BOUNCE_READ, 5 KM_BOUNCE_READ,
@@ -13,6 +13,8 @@ enum km_type {
13 KM_PTE1, 13 KM_PTE1,
14 KM_IRQ0, 14 KM_IRQ0,
15 KM_IRQ1, 15 KM_IRQ1,
16 KM_SOFTIRQ0,
17 KM_SOFTIRQ1,
16 KM_TYPE_NR 18 KM_TYPE_NR
17}; 19};
18 20
diff --git a/include/asm-h8300/mman.h b/include/asm-h8300/mman.h
index abe08856c84f..63f727a59850 100644
--- a/include/asm-h8300/mman.h
+++ b/include/asm-h8300/mman.h
@@ -4,6 +4,7 @@
4#define PROT_READ 0x1 /* page can be read */ 4#define PROT_READ 0x1 /* page can be read */
5#define PROT_WRITE 0x2 /* page can be written */ 5#define PROT_WRITE 0x2 /* page can be written */
6#define PROT_EXEC 0x4 /* page can be executed */ 6#define PROT_EXEC 0x4 /* page can be executed */
7#define PROT_SEM 0x8 /* page may be used for atomic ops */
7#define PROT_NONE 0x0 /* page can not be accessed */ 8#define PROT_NONE 0x0 /* page can not be accessed */
8#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ 9#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
9#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ 10#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
@@ -19,6 +20,8 @@
19#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ 20#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
20#define MAP_LOCKED 0x2000 /* pages are locked */ 21#define MAP_LOCKED 0x2000 /* pages are locked */
21#define MAP_NORESERVE 0x4000 /* don't check for reservations */ 22#define MAP_NORESERVE 0x4000 /* don't check for reservations */
23#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
24#define MAP_NONBLOCK 0x10000 /* do not block on IO */
22 25
23#define MS_ASYNC 1 /* sync memory asynchronously */ 26#define MS_ASYNC 1 /* sync memory asynchronously */
24#define MS_INVALIDATE 2 /* invalidate the caches */ 27#define MS_INVALIDATE 2 /* invalidate the caches */
diff --git a/include/asm-i386/agp.h b/include/asm-i386/agp.h
index a917ff50354f..b82f5f3ab887 100644
--- a/include/asm-i386/agp.h
+++ b/include/asm-i386/agp.h
@@ -21,4 +21,14 @@ int unmap_page_from_agp(struct page *page);
21 worth it. Would need a page for it. */ 21 worth it. Would need a page for it. */
22#define flush_agp_cache() asm volatile("wbinvd":::"memory") 22#define flush_agp_cache() asm volatile("wbinvd":::"memory")
23 23
24/* Convert a physical address to an address suitable for the GART. */
25#define phys_to_gart(x) (x)
26#define gart_to_phys(x) (x)
27
28/* GATT allocation. Returns/accepts GATT kernel virtual address. */
29#define alloc_gatt_pages(order) \
30 ((char *)__get_free_pages(GFP_KERNEL, (order)))
31#define free_gatt_pages(table, order) \
32 free_pages((unsigned long)(table), (order))
33
24#endif 34#endif
diff --git a/include/asm-i386/mach-numaq/mach_ipi.h b/include/asm-i386/mach-numaq/mach_ipi.h
index 1b46fd3f2ae3..c6044488e9e6 100644
--- a/include/asm-i386/mach-numaq/mach_ipi.h
+++ b/include/asm-i386/mach-numaq/mach_ipi.h
@@ -1,7 +1,7 @@
1#ifndef __ASM_MACH_IPI_H 1#ifndef __ASM_MACH_IPI_H
2#define __ASM_MACH_IPI_H 2#define __ASM_MACH_IPI_H
3 3
4inline void send_IPI_mask_sequence(cpumask_t, int vector); 4void send_IPI_mask_sequence(cpumask_t, int vector);
5 5
6static inline void send_IPI_mask(cpumask_t mask, int vector) 6static inline void send_IPI_mask(cpumask_t mask, int vector)
7{ 7{
diff --git a/include/asm-ia64/agp.h b/include/asm-ia64/agp.h
index d1316f1e6ee1..4e517f0e6afa 100644
--- a/include/asm-ia64/agp.h
+++ b/include/asm-ia64/agp.h
@@ -18,4 +18,14 @@
18#define flush_agp_mappings() /* nothing */ 18#define flush_agp_mappings() /* nothing */
19#define flush_agp_cache() mb() 19#define flush_agp_cache() mb()
20 20
21/* Convert a physical address to an address suitable for the GART. */
22#define phys_to_gart(x) (x)
23#define gart_to_phys(x) (x)
24
25/* GATT allocation. Returns/accepts GATT kernel virtual address. */
26#define alloc_gatt_pages(order) \
27 ((char *)__get_free_pages(GFP_KERNEL, (order)))
28#define free_gatt_pages(table, order) \
29 free_pages((unsigned long)(table), (order))
30
21#endif /* _ASM_IA64_AGP_H */ 31#endif /* _ASM_IA64_AGP_H */
diff --git a/include/asm-ia64/pgtable.h b/include/asm-ia64/pgtable.h
index ea121a002309..fcc9c3344ab4 100644
--- a/include/asm-ia64/pgtable.h
+++ b/include/asm-ia64/pgtable.h
@@ -8,7 +8,7 @@
8 * This hopefully works with any (fixed) IA-64 page-size, as defined 8 * This hopefully works with any (fixed) IA-64 page-size, as defined
9 * in <asm/page.h>. 9 * in <asm/page.h>.
10 * 10 *
11 * Copyright (C) 1998-2004 Hewlett-Packard Co 11 * Copyright (C) 1998-2005 Hewlett-Packard Co
12 * David Mosberger-Tang <davidm@hpl.hp.com> 12 * David Mosberger-Tang <davidm@hpl.hp.com>
13 */ 13 */
14 14
@@ -551,7 +551,11 @@ do { \
551 551
552/* These tell get_user_pages() that the first gate page is accessible from user-level. */ 552/* These tell get_user_pages() that the first gate page is accessible from user-level. */
553#define FIXADDR_USER_START GATE_ADDR 553#define FIXADDR_USER_START GATE_ADDR
554#define FIXADDR_USER_END (GATE_ADDR + 2*PERCPU_PAGE_SIZE) 554#ifdef HAVE_BUGGY_SEGREL
555# define FIXADDR_USER_END (GATE_ADDR + 2*PAGE_SIZE)
556#else
557# define FIXADDR_USER_END (GATE_ADDR + 2*PERCPU_PAGE_SIZE)
558#endif
555 559
556#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG 560#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
557#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY 561#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY
diff --git a/include/asm-ia64/processor.h b/include/asm-ia64/processor.h
index 9e1ba8b7fb68..91bbd1f22461 100644
--- a/include/asm-ia64/processor.h
+++ b/include/asm-ia64/processor.h
@@ -403,7 +403,10 @@ extern void ia64_setreg_unknown_kr (void);
403 * task_struct at this point. 403 * task_struct at this point.
404 */ 404 */
405 405
406/* Return TRUE if task T owns the fph partition of the CPU we're running on. */ 406/*
407 * Return TRUE if task T owns the fph partition of the CPU we're running on.
408 * Must be called from code that has preemption disabled.
409 */
407#define ia64_is_local_fpu_owner(t) \ 410#define ia64_is_local_fpu_owner(t) \
408({ \ 411({ \
409 struct task_struct *__ia64_islfo_task = (t); \ 412 struct task_struct *__ia64_islfo_task = (t); \
@@ -411,7 +414,10 @@ extern void ia64_setreg_unknown_kr (void);
411 && __ia64_islfo_task == (struct task_struct *) ia64_get_kr(IA64_KR_FPU_OWNER)); \ 414 && __ia64_islfo_task == (struct task_struct *) ia64_get_kr(IA64_KR_FPU_OWNER)); \
412}) 415})
413 416
414/* Mark task T as owning the fph partition of the CPU we're running on. */ 417/*
418 * Mark task T as owning the fph partition of the CPU we're running on.
419 * Must be called from code that has preemption disabled.
420 */
415#define ia64_set_local_fpu_owner(t) do { \ 421#define ia64_set_local_fpu_owner(t) do { \
416 struct task_struct *__ia64_slfo_task = (t); \ 422 struct task_struct *__ia64_slfo_task = (t); \
417 __ia64_slfo_task->thread.last_fph_cpu = smp_processor_id(); \ 423 __ia64_slfo_task->thread.last_fph_cpu = smp_processor_id(); \
diff --git a/include/asm-ppc/agp.h b/include/asm-ppc/agp.h
index be27cfa8c5b0..ca9e423307f4 100644
--- a/include/asm-ppc/agp.h
+++ b/include/asm-ppc/agp.h
@@ -10,4 +10,14 @@
10#define flush_agp_mappings() 10#define flush_agp_mappings()
11#define flush_agp_cache() mb() 11#define flush_agp_cache() mb()
12 12
13/* Convert a physical address to an address suitable for the GART. */
14#define phys_to_gart(x) (x)
15#define gart_to_phys(x) (x)
16
17/* GATT allocation. Returns/accepts GATT kernel virtual address. */
18#define alloc_gatt_pages(order) \
19 ((char *)__get_free_pages(GFP_KERNEL, (order)))
20#define free_gatt_pages(table, order) \
21 free_pages((unsigned long)(table), (order))
22
13#endif 23#endif
diff --git a/include/asm-ppc/sigcontext.h b/include/asm-ppc/sigcontext.h
index f82dcccdee1e..b7a417e0a921 100644
--- a/include/asm-ppc/sigcontext.h
+++ b/include/asm-ppc/sigcontext.h
@@ -2,7 +2,7 @@
2#define _ASM_PPC_SIGCONTEXT_H 2#define _ASM_PPC_SIGCONTEXT_H
3 3
4#include <asm/ptrace.h> 4#include <asm/ptrace.h>
5 5#include <linux/compiler.h>
6 6
7struct sigcontext { 7struct sigcontext {
8 unsigned long _unused[4]; 8 unsigned long _unused[4];
diff --git a/include/asm-ppc64/agp.h b/include/asm-ppc64/agp.h
index be27cfa8c5b0..ca9e423307f4 100644
--- a/include/asm-ppc64/agp.h
+++ b/include/asm-ppc64/agp.h
@@ -10,4 +10,14 @@
10#define flush_agp_mappings() 10#define flush_agp_mappings()
11#define flush_agp_cache() mb() 11#define flush_agp_cache() mb()
12 12
13/* Convert a physical address to an address suitable for the GART. */
14#define phys_to_gart(x) (x)
15#define gart_to_phys(x) (x)
16
17/* GATT allocation. Returns/accepts GATT kernel virtual address. */
18#define alloc_gatt_pages(order) \
19 ((char *)__get_free_pages(GFP_KERNEL, (order)))
20#define free_gatt_pages(table, order) \
21 free_pages((unsigned long)(table), (order))
22
13#endif 23#endif
diff --git a/include/asm-ppc64/elf.h b/include/asm-ppc64/elf.h
index 6c42d61bedd1..085eedb956fe 100644
--- a/include/asm-ppc64/elf.h
+++ b/include/asm-ppc64/elf.h
@@ -221,9 +221,7 @@ do { \
221 set_thread_flag(TIF_ABI_PENDING); \ 221 set_thread_flag(TIF_ABI_PENDING); \
222 else \ 222 else \
223 clear_thread_flag(TIF_ABI_PENDING); \ 223 clear_thread_flag(TIF_ABI_PENDING); \
224 if (ibcs2) \ 224 if (personality(current->personality) != PER_LINUX32) \
225 set_personality(PER_SVR4); \
226 else if (current->personality != PER_LINUX32) \
227 set_personality(PER_LINUX); \ 225 set_personality(PER_LINUX); \
228} while (0) 226} while (0)
229 227
diff --git a/include/asm-s390/user.h b/include/asm-s390/user.h
index c64f8c181df3..1dc74baf03c4 100644
--- a/include/asm-s390/user.h
+++ b/include/asm-s390/user.h
@@ -10,7 +10,7 @@
10#define _S390_USER_H 10#define _S390_USER_H
11 11
12#include <asm/page.h> 12#include <asm/page.h>
13#include <linux/ptrace.h> 13#include <asm/ptrace.h>
14/* Core file format: The core file is written in such a way that gdb 14/* Core file format: The core file is written in such a way that gdb
15 can understand it and provide useful information to the user (under 15 can understand it and provide useful information to the user (under
16 linux we use the 'trad-core' bfd). There are quite a number of 16 linux we use the 'trad-core' bfd). There are quite a number of
diff --git a/include/asm-sparc/uaccess.h b/include/asm-sparc/uaccess.h
index f461144067ee..0a780e84a12b 100644
--- a/include/asm-sparc/uaccess.h
+++ b/include/asm-sparc/uaccess.h
@@ -41,10 +41,11 @@
41 * No one can read/write anything from userland in the kernel space by setting 41 * No one can read/write anything from userland in the kernel space by setting
42 * large size and address near to PAGE_OFFSET - a fault will break his intentions. 42 * large size and address near to PAGE_OFFSET - a fault will break his intentions.
43 */ 43 */
44#define __user_ok(addr,size) ((addr) < STACK_TOP) 44#define __user_ok(addr, size) ({ (void)(size); (addr) < STACK_TOP; })
45#define __kernel_ok (segment_eq(get_fs(), KERNEL_DS)) 45#define __kernel_ok (segment_eq(get_fs(), KERNEL_DS))
46#define __access_ok(addr,size) (__user_ok((addr) & get_fs().seg,(size))) 46#define __access_ok(addr,size) (__user_ok((addr) & get_fs().seg,(size)))
47#define access_ok(type,addr,size) __access_ok((unsigned long)(addr),(size)) 47#define access_ok(type, addr, size) \
48 ({ (void)(type); __access_ok((unsigned long)(addr), size); })
48 49
49/* this function will go away soon - use access_ok() instead */ 50/* this function will go away soon - use access_ok() instead */
50static inline int __deprecated verify_area(int type, const void __user * addr, unsigned long size) 51static inline int __deprecated verify_area(int type, const void __user * addr, unsigned long size)
diff --git a/include/asm-sparc64/agp.h b/include/asm-sparc64/agp.h
index ba05bdf9a211..58f8cb6ae767 100644
--- a/include/asm-sparc64/agp.h
+++ b/include/asm-sparc64/agp.h
@@ -8,4 +8,14 @@
8#define flush_agp_mappings() 8#define flush_agp_mappings()
9#define flush_agp_cache() mb() 9#define flush_agp_cache() mb()
10 10
11/* Convert a physical address to an address suitable for the GART. */
12#define phys_to_gart(x) (x)
13#define gart_to_phys(x) (x)
14
15/* GATT allocation. Returns/accepts GATT kernel virtual address. */
16#define alloc_gatt_pages(order) \
17 ((char *)__get_free_pages(GFP_KERNEL, (order)))
18#define free_gatt_pages(table, order) \
19 free_pages((unsigned long)(table), (order))
20
11#endif 21#endif
diff --git a/include/asm-x86_64/agp.h b/include/asm-x86_64/agp.h
index 0bb9019d58aa..06c52ee9c06b 100644
--- a/include/asm-x86_64/agp.h
+++ b/include/asm-x86_64/agp.h
@@ -19,4 +19,14 @@ int unmap_page_from_agp(struct page *page);
19 worth it. Would need a page for it. */ 19 worth it. Would need a page for it. */
20#define flush_agp_cache() asm volatile("wbinvd":::"memory") 20#define flush_agp_cache() asm volatile("wbinvd":::"memory")
21 21
22/* Convert a physical address to an address suitable for the GART. */
23#define phys_to_gart(x) (x)
24#define gart_to_phys(x) (x)
25
26/* GATT allocation. Returns/accepts GATT kernel virtual address. */
27#define alloc_gatt_pages(order) \
28 ((char *)__get_free_pages(GFP_KERNEL, (order)))
29#define free_gatt_pages(table, order) \
30 free_pages((unsigned long)(table), (order))
31
22#endif 32#endif
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index d5a55bdb9c3c..b123cc08773d 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -25,6 +25,8 @@
25#ifndef _LINUX_ACPI_H 25#ifndef _LINUX_ACPI_H
26#define _LINUX_ACPI_H 26#define _LINUX_ACPI_H
27 27
28#include <linux/config.h>
29
28#ifdef CONFIG_ACPI 30#ifdef CONFIG_ACPI
29 31
30#ifndef _LINUX 32#ifndef _LINUX
diff --git a/include/linux/if_tr.h b/include/linux/if_tr.h
index 6688b414c529..3fba9e2f5427 100644
--- a/include/linux/if_tr.h
+++ b/include/linux/if_tr.h
@@ -19,6 +19,8 @@
19#ifndef _LINUX_IF_TR_H 19#ifndef _LINUX_IF_TR_H
20#define _LINUX_IF_TR_H 20#define _LINUX_IF_TR_H
21 21
22#include <asm/byteorder.h> /* For __be16 */
23
22/* IEEE 802.5 Token-Ring magic constants. The frame sizes omit the preamble 24/* IEEE 802.5 Token-Ring magic constants. The frame sizes omit the preamble
23 and FCS/CRC (frame check sequence). */ 25 and FCS/CRC (frame check sequence). */
24#define TR_ALEN 6 /* Octets in one token-ring addr */ 26#define TR_ALEN 6 /* Octets in one token-ring addr */
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index b0d6134e1ee6..b8b4ebf9abf1 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -874,6 +874,7 @@
874#define PCI_DEVICE_ID_APPLE_KL_USB_P 0x0026 874#define PCI_DEVICE_ID_APPLE_KL_USB_P 0x0026
875#define PCI_DEVICE_ID_APPLE_UNI_N_AGP_P 0x0027 875#define PCI_DEVICE_ID_APPLE_UNI_N_AGP_P 0x0027
876#define PCI_DEVICE_ID_APPLE_UNI_N_AGP15 0x002d 876#define PCI_DEVICE_ID_APPLE_UNI_N_AGP15 0x002d
877#define PCI_DEVICE_ID_APPLE_UNI_N_PCI15 0x002e
877#define PCI_DEVICE_ID_APPLE_UNI_N_FW2 0x0030 878#define PCI_DEVICE_ID_APPLE_UNI_N_FW2 0x0030
878#define PCI_DEVICE_ID_APPLE_UNI_N_GMAC2 0x0032 879#define PCI_DEVICE_ID_APPLE_UNI_N_GMAC2 0x0032
879#define PCI_DEVIEC_ID_APPLE_UNI_N_ATA 0x0033 880#define PCI_DEVIEC_ID_APPLE_UNI_N_ATA 0x0033
@@ -2382,6 +2383,8 @@
2382#define PCI_DEVICE_ID_INTEL_82915G_IG 0x2582 2383#define PCI_DEVICE_ID_INTEL_82915G_IG 0x2582
2383#define PCI_DEVICE_ID_INTEL_82915GM_HB 0x2590 2384#define PCI_DEVICE_ID_INTEL_82915GM_HB 0x2590
2384#define PCI_DEVICE_ID_INTEL_82915GM_IG 0x2592 2385#define PCI_DEVICE_ID_INTEL_82915GM_IG 0x2592
2386#define PCI_DEVICE_ID_INTEL_82945G_HB 0x2770
2387#define PCI_DEVICE_ID_INTEL_82945G_IG 0x2772
2385#define PCI_DEVICE_ID_INTEL_ICH6_0 0x2640 2388#define PCI_DEVICE_ID_INTEL_ICH6_0 0x2640
2386#define PCI_DEVICE_ID_INTEL_ICH6_1 0x2641 2389#define PCI_DEVICE_ID_INTEL_ICH6_1 0x2641
2387#define PCI_DEVICE_ID_INTEL_ICH6_2 0x2642 2390#define PCI_DEVICE_ID_INTEL_ICH6_2 0x2642
diff --git a/include/linux/signal.h b/include/linux/signal.h
index 0a98f5ec5cae..7be18b5e2fb4 100644
--- a/include/linux/signal.h
+++ b/include/linux/signal.h
@@ -231,10 +231,8 @@ extern int __group_send_sig_info(int, struct siginfo *, struct task_struct *);
231extern long do_sigpending(void __user *, unsigned long); 231extern long do_sigpending(void __user *, unsigned long);
232extern int sigprocmask(int, sigset_t *, sigset_t *); 232extern int sigprocmask(int, sigset_t *, sigset_t *);
233 233
234#ifndef HAVE_ARCH_GET_SIGNAL_TO_DELIVER
235struct pt_regs; 234struct pt_regs;
236extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie); 235extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie);
237#endif
238 236
239#endif /* __KERNEL__ */ 237#endif /* __KERNEL__ */
240 238
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 23032d9d6071..a17745c80a91 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -346,6 +346,7 @@ enum
346 NET_TCP_MODERATE_RCVBUF=106, 346 NET_TCP_MODERATE_RCVBUF=106,
347 NET_TCP_TSO_WIN_DIVISOR=107, 347 NET_TCP_TSO_WIN_DIVISOR=107,
348 NET_TCP_BIC_BETA=108, 348 NET_TCP_BIC_BETA=108,
349 NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR=109,
349}; 350};
350 351
351enum { 352enum {
diff --git a/include/linux/tc_ematch/tc_em_meta.h b/include/linux/tc_ematch/tc_em_meta.h
index aa6b48bb4dcd..a6b2cc530af5 100644
--- a/include/linux/tc_ematch/tc_em_meta.h
+++ b/include/linux/tc_ematch/tc_em_meta.h
@@ -56,6 +56,36 @@ enum
56 TCF_META_ID_TCCLASSID, 56 TCF_META_ID_TCCLASSID,
57 TCF_META_ID_RTCLASSID, 57 TCF_META_ID_RTCLASSID,
58 TCF_META_ID_RTIIF, 58 TCF_META_ID_RTIIF,
59 TCF_META_ID_SK_FAMILY,
60 TCF_META_ID_SK_STATE,
61 TCF_META_ID_SK_REUSE,
62 TCF_META_ID_SK_BOUND_IF,
63 TCF_META_ID_SK_REFCNT,
64 TCF_META_ID_SK_SHUTDOWN,
65 TCF_META_ID_SK_PROTO,
66 TCF_META_ID_SK_TYPE,
67 TCF_META_ID_SK_RCVBUF,
68 TCF_META_ID_SK_RMEM_ALLOC,
69 TCF_META_ID_SK_WMEM_ALLOC,
70 TCF_META_ID_SK_OMEM_ALLOC,
71 TCF_META_ID_SK_WMEM_QUEUED,
72 TCF_META_ID_SK_RCV_QLEN,
73 TCF_META_ID_SK_SND_QLEN,
74 TCF_META_ID_SK_ERR_QLEN,
75 TCF_META_ID_SK_FORWARD_ALLOCS,
76 TCF_META_ID_SK_SNDBUF,
77 TCF_META_ID_SK_ALLOCS,
78 TCF_META_ID_SK_ROUTE_CAPS,
79 TCF_META_ID_SK_HASHENT,
80 TCF_META_ID_SK_LINGERTIME,
81 TCF_META_ID_SK_ACK_BACKLOG,
82 TCF_META_ID_SK_MAX_ACK_BACKLOG,
83 TCF_META_ID_SK_PRIO,
84 TCF_META_ID_SK_RCVLOWAT,
85 TCF_META_ID_SK_RCVTIMEO,
86 TCF_META_ID_SK_SNDTIMEO,
87 TCF_META_ID_SK_SENDMSG_OFF,
88 TCF_META_ID_SK_WRITE_PENDING,
59 __TCF_META_ID_MAX 89 __TCF_META_ID_MAX
60}; 90};
61#define TCF_META_ID_MAX (__TCF_META_ID_MAX - 1) 91#define TCF_META_ID_MAX (__TCF_META_ID_MAX - 1)
diff --git a/include/net/ip.h b/include/net/ip.h
index 3f63992eb712..32360bbe143f 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -163,6 +163,7 @@ DECLARE_SNMP_STAT(struct linux_mib, net_statistics);
163 163
164extern int sysctl_local_port_range[2]; 164extern int sysctl_local_port_range[2];
165extern int sysctl_ip_default_ttl; 165extern int sysctl_ip_default_ttl;
166extern int sysctl_ip_nonlocal_bind;
166 167
167#ifdef CONFIG_INET 168#ifdef CONFIG_INET
168/* The function in 2.2 was invalid, producing wrong result for 169/* The function in 2.2 was invalid, producing wrong result for
diff --git a/kernel/exit.c b/kernel/exit.c
index edaa50b5bbfa..2ef2ad540201 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -811,10 +811,8 @@ fastcall NORET_TYPE void do_exit(long code)
811 acct_update_integrals(tsk); 811 acct_update_integrals(tsk);
812 update_mem_hiwater(tsk); 812 update_mem_hiwater(tsk);
813 group_dead = atomic_dec_and_test(&tsk->signal->live); 813 group_dead = atomic_dec_and_test(&tsk->signal->live);
814 if (group_dead) { 814 if (group_dead)
815 del_timer_sync(&tsk->signal->real_timer);
816 acct_process(code); 815 acct_process(code);
817 }
818 exit_mm(tsk); 816 exit_mm(tsk);
819 817
820 exit_sem(tsk); 818 exit_sem(tsk);
diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c
index fd316c272260..cabb63fc9e16 100644
--- a/kernel/posix-timers.c
+++ b/kernel/posix-timers.c
@@ -1197,6 +1197,7 @@ void exit_itimers(struct signal_struct *sig)
1197 tmr = list_entry(sig->posix_timers.next, struct k_itimer, list); 1197 tmr = list_entry(sig->posix_timers.next, struct k_itimer, list);
1198 itimer_delete(tmr); 1198 itimer_delete(tmr);
1199 } 1199 }
1200 del_timer_sync(&sig->real_timer);
1200} 1201}
1201 1202
1202/* 1203/*
diff --git a/kernel/sched.c b/kernel/sched.c
index 66b2ed784822..f12a0c8a7d98 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -3755,19 +3755,22 @@ EXPORT_SYMBOL(cond_resched);
3755 */ 3755 */
3756int cond_resched_lock(spinlock_t * lock) 3756int cond_resched_lock(spinlock_t * lock)
3757{ 3757{
3758 int ret = 0;
3759
3758 if (need_lockbreak(lock)) { 3760 if (need_lockbreak(lock)) {
3759 spin_unlock(lock); 3761 spin_unlock(lock);
3760 cpu_relax(); 3762 cpu_relax();
3763 ret = 1;
3761 spin_lock(lock); 3764 spin_lock(lock);
3762 } 3765 }
3763 if (need_resched()) { 3766 if (need_resched()) {
3764 _raw_spin_unlock(lock); 3767 _raw_spin_unlock(lock);
3765 preempt_enable_no_resched(); 3768 preempt_enable_no_resched();
3766 __cond_resched(); 3769 __cond_resched();
3770 ret = 1;
3767 spin_lock(lock); 3771 spin_lock(lock);
3768 return 1;
3769 } 3772 }
3770 return 0; 3773 return ret;
3771} 3774}
3772 3775
3773EXPORT_SYMBOL(cond_resched_lock); 3776EXPORT_SYMBOL(cond_resched_lock);
diff --git a/mm/filemap.c b/mm/filemap.c
index 1d33fec7bac6..4a2fee2cb62b 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1968,6 +1968,7 @@ generic_file_buffered_write(struct kiocb *iocb, const struct iovec *iov,
1968 do { 1968 do {
1969 unsigned long index; 1969 unsigned long index;
1970 unsigned long offset; 1970 unsigned long offset;
1971 unsigned long maxlen;
1971 size_t copied; 1972 size_t copied;
1972 1973
1973 offset = (pos & (PAGE_CACHE_SIZE -1)); /* Within page */ 1974 offset = (pos & (PAGE_CACHE_SIZE -1)); /* Within page */
@@ -1982,7 +1983,10 @@ generic_file_buffered_write(struct kiocb *iocb, const struct iovec *iov,
1982 * same page as we're writing to, without it being marked 1983 * same page as we're writing to, without it being marked
1983 * up-to-date. 1984 * up-to-date.
1984 */ 1985 */
1985 fault_in_pages_readable(buf, bytes); 1986 maxlen = cur_iov->iov_len - iov_base;
1987 if (maxlen > bytes)
1988 maxlen = bytes;
1989 fault_in_pages_readable(buf, maxlen);
1986 1990
1987 page = __grab_cache_page(mapping,index,&cached_page,&lru_pvec); 1991 page = __grab_cache_page(mapping,index,&cached_page,&lru_pvec);
1988 if (!page) { 1992 if (!page) {
@@ -2024,6 +2028,8 @@ generic_file_buffered_write(struct kiocb *iocb, const struct iovec *iov,
2024 filemap_set_next_iovec(&cur_iov, 2028 filemap_set_next_iovec(&cur_iov,
2025 &iov_base, status); 2029 &iov_base, status);
2026 buf = cur_iov->iov_base + iov_base; 2030 buf = cur_iov->iov_base + iov_base;
2031 } else {
2032 iov_base += status;
2027 } 2033 }
2028 } 2034 }
2029 } 2035 }
diff --git a/net/core/dev.c b/net/core/dev.c
index f15a3ffff635..ab935778ce81 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1744,6 +1744,7 @@ static int process_backlog(struct net_device *backlog_dev, int *budget)
1744 struct softnet_data *queue = &__get_cpu_var(softnet_data); 1744 struct softnet_data *queue = &__get_cpu_var(softnet_data);
1745 unsigned long start_time = jiffies; 1745 unsigned long start_time = jiffies;
1746 1746
1747 backlog_dev->weight = weight_p;
1747 for (;;) { 1748 for (;;) {
1748 struct sk_buff *skb; 1749 struct sk_buff *skb;
1749 struct net_device *dev; 1750 struct net_device *dev;
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index 8ec484894d68..a3eeb88e1c81 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -356,7 +356,7 @@ static int ethtool_set_coalesce(struct net_device *dev, void __user *useraddr)
356{ 356{
357 struct ethtool_coalesce coalesce; 357 struct ethtool_coalesce coalesce;
358 358
359 if (!dev->ethtool_ops->get_coalesce) 359 if (!dev->ethtool_ops->set_coalesce)
360 return -EOPNOTSUPP; 360 return -EOPNOTSUPP;
361 361
362 if (copy_from_user(&coalesce, useraddr, sizeof(coalesce))) 362 if (copy_from_user(&coalesce, useraddr, sizeof(coalesce)))
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 910eb4c05a47..e2137f3e489d 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -185,6 +185,22 @@ static ssize_t store_tx_queue_len(struct class_device *dev, const char *buf, siz
185static CLASS_DEVICE_ATTR(tx_queue_len, S_IRUGO | S_IWUSR, show_tx_queue_len, 185static CLASS_DEVICE_ATTR(tx_queue_len, S_IRUGO | S_IWUSR, show_tx_queue_len,
186 store_tx_queue_len); 186 store_tx_queue_len);
187 187
188NETDEVICE_SHOW(weight, fmt_dec);
189
190static int change_weight(struct net_device *net, unsigned long new_weight)
191{
192 net->weight = new_weight;
193 return 0;
194}
195
196static ssize_t store_weight(struct class_device *dev, const char *buf, size_t len)
197{
198 return netdev_store(dev, buf, len, change_weight);
199}
200
201static CLASS_DEVICE_ATTR(weight, S_IRUGO | S_IWUSR, show_weight,
202 store_weight);
203
188 204
189static struct class_device_attribute *net_class_attributes[] = { 205static struct class_device_attribute *net_class_attributes[] = {
190 &class_device_attr_ifindex, 206 &class_device_attr_ifindex,
@@ -194,6 +210,7 @@ static struct class_device_attribute *net_class_attributes[] = {
194 &class_device_attr_features, 210 &class_device_attr_features,
195 &class_device_attr_mtu, 211 &class_device_attr_mtu,
196 &class_device_attr_flags, 212 &class_device_attr_flags,
213 &class_device_attr_weight,
197 &class_device_attr_type, 214 &class_device_attr_type,
198 &class_device_attr_address, 215 &class_device_attr_address,
199 &class_device_attr_broadcast, 216 &class_device_attr_broadcast,
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index b3cb49ce5fad..03942f133944 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1181,6 +1181,7 @@ EXPORT_SYMBOL(inet_stream_connect);
1181EXPORT_SYMBOL(inet_stream_ops); 1181EXPORT_SYMBOL(inet_stream_ops);
1182EXPORT_SYMBOL(inet_unregister_protosw); 1182EXPORT_SYMBOL(inet_unregister_protosw);
1183EXPORT_SYMBOL(net_statistics); 1183EXPORT_SYMBOL(net_statistics);
1184EXPORT_SYMBOL(sysctl_ip_nonlocal_bind);
1184 1185
1185#ifdef INET_REFCNT_DEBUG 1186#ifdef INET_REFCNT_DEBUG
1186EXPORT_SYMBOL(inet_sock_nr); 1187EXPORT_SYMBOL(inet_sock_nr);
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index 85bf0d3e294b..cb759484979d 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -207,6 +207,7 @@ int sysctl_icmp_ignore_bogus_error_responses;
207 207
208int sysctl_icmp_ratelimit = 1 * HZ; 208int sysctl_icmp_ratelimit = 1 * HZ;
209int sysctl_icmp_ratemask = 0x1818; 209int sysctl_icmp_ratemask = 0x1818;
210int sysctl_icmp_errors_use_inbound_ifaddr;
210 211
211/* 212/*
212 * ICMP control array. This specifies what to do with each ICMP. 213 * ICMP control array. This specifies what to do with each ICMP.
@@ -511,8 +512,12 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, u32 info)
511 */ 512 */
512 513
513 saddr = iph->daddr; 514 saddr = iph->daddr;
514 if (!(rt->rt_flags & RTCF_LOCAL)) 515 if (!(rt->rt_flags & RTCF_LOCAL)) {
515 saddr = 0; 516 if (sysctl_icmp_errors_use_inbound_ifaddr)
517 saddr = inet_select_addr(skb_in->dev, 0, RT_SCOPE_LINK);
518 else
519 saddr = 0;
520 }
516 521
517 tos = icmp_pointers[type].error ? ((iph->tos & IPTOS_TOS_MASK) | 522 tos = icmp_pointers[type].error ? ((iph->tos & IPTOS_TOS_MASK) |
518 IPTOS_PREC_INTERNETCONTROL) : 523 IPTOS_PREC_INTERNETCONTROL) :
diff --git a/net/ipv4/multipath_drr.c b/net/ipv4/multipath_drr.c
index cf2e6bcf7973..c9cf8726051d 100644
--- a/net/ipv4/multipath_drr.c
+++ b/net/ipv4/multipath_drr.c
@@ -31,6 +31,7 @@
31#include <linux/igmp.h> 31#include <linux/igmp.h>
32#include <linux/proc_fs.h> 32#include <linux/proc_fs.h>
33#include <linux/seq_file.h> 33#include <linux/seq_file.h>
34#include <linux/module.h>
34#include <linux/mroute.h> 35#include <linux/mroute.h>
35#include <linux/init.h> 36#include <linux/init.h>
36#include <net/ip.h> 37#include <net/ip.h>
@@ -247,3 +248,4 @@ static void __exit drr_exit(void)
247 248
248module_init(drr_init); 249module_init(drr_init);
249module_exit(drr_exit); 250module_exit(drr_exit);
251MODULE_LICENSE("GPL");
diff --git a/net/ipv4/multipath_random.c b/net/ipv4/multipath_random.c
index 805a16e47de5..5249dbe7c559 100644
--- a/net/ipv4/multipath_random.c
+++ b/net/ipv4/multipath_random.c
@@ -31,6 +31,7 @@
31#include <linux/igmp.h> 31#include <linux/igmp.h>
32#include <linux/proc_fs.h> 32#include <linux/proc_fs.h>
33#include <linux/seq_file.h> 33#include <linux/seq_file.h>
34#include <linux/module.h>
34#include <linux/mroute.h> 35#include <linux/mroute.h>
35#include <linux/init.h> 36#include <linux/init.h>
36#include <net/ip.h> 37#include <net/ip.h>
@@ -126,3 +127,4 @@ static void __exit random_exit(void)
126 127
127module_init(random_init); 128module_init(random_init);
128module_exit(random_exit); 129module_exit(random_exit);
130MODULE_LICENSE("GPL");
diff --git a/net/ipv4/multipath_rr.c b/net/ipv4/multipath_rr.c
index 061b6b253982..b6cd2870478f 100644
--- a/net/ipv4/multipath_rr.c
+++ b/net/ipv4/multipath_rr.c
@@ -31,6 +31,7 @@
31#include <linux/igmp.h> 31#include <linux/igmp.h>
32#include <linux/proc_fs.h> 32#include <linux/proc_fs.h>
33#include <linux/seq_file.h> 33#include <linux/seq_file.h>
34#include <linux/module.h>
34#include <linux/mroute.h> 35#include <linux/mroute.h>
35#include <linux/init.h> 36#include <linux/init.h>
36#include <net/ip.h> 37#include <net/ip.h>
@@ -93,3 +94,4 @@ static void __exit rr_exit(void)
93 94
94module_init(rr_init); 95module_init(rr_init);
95module_exit(rr_exit); 96module_exit(rr_exit);
97MODULE_LICENSE("GPL");
diff --git a/net/ipv4/multipath_wrandom.c b/net/ipv4/multipath_wrandom.c
index c3d2ca1a6781..bd7d75b6abe0 100644
--- a/net/ipv4/multipath_wrandom.c
+++ b/net/ipv4/multipath_wrandom.c
@@ -31,6 +31,7 @@
31#include <linux/igmp.h> 31#include <linux/igmp.h>
32#include <linux/proc_fs.h> 32#include <linux/proc_fs.h>
33#include <linux/seq_file.h> 33#include <linux/seq_file.h>
34#include <linux/module.h>
34#include <linux/mroute.h> 35#include <linux/mroute.h>
35#include <linux/init.h> 36#include <linux/init.h>
36#include <net/ip.h> 37#include <net/ip.h>
@@ -342,3 +343,4 @@ static void __exit wrandom_exit(void)
342 343
343module_init(wrandom_init); 344module_init(wrandom_init);
344module_exit(wrandom_exit); 345module_exit(wrandom_exit);
346MODULE_LICENSE("GPL");
diff --git a/net/ipv4/netfilter/ip_conntrack_standalone.c b/net/ipv4/netfilter/ip_conntrack_standalone.c
index 46ca45f74d85..bc59f7b39805 100644
--- a/net/ipv4/netfilter/ip_conntrack_standalone.c
+++ b/net/ipv4/netfilter/ip_conntrack_standalone.c
@@ -256,6 +256,7 @@ static void *exp_seq_next(struct seq_file *s, void *v, loff_t *pos)
256{ 256{
257 struct list_head *e = v; 257 struct list_head *e = v;
258 258
259 ++*pos;
259 e = e->next; 260 e = e->next;
260 261
261 if (e == &ip_conntrack_expect_list) 262 if (e == &ip_conntrack_expect_list)
diff --git a/net/ipv4/netfilter/ipt_recent.c b/net/ipv4/netfilter/ipt_recent.c
index 25ab9fabdcba..2d44b07688af 100644
--- a/net/ipv4/netfilter/ipt_recent.c
+++ b/net/ipv4/netfilter/ipt_recent.c
@@ -223,7 +223,7 @@ static int ip_recent_ctrl(struct file *file, const char __user *input, unsigned
223 curr_table->table[count].last_seen = 0; 223 curr_table->table[count].last_seen = 0;
224 curr_table->table[count].addr = 0; 224 curr_table->table[count].addr = 0;
225 curr_table->table[count].ttl = 0; 225 curr_table->table[count].ttl = 0;
226 memset(curr_table->table[count].last_pkts,0,ip_pkt_list_tot*sizeof(u_int32_t)); 226 memset(curr_table->table[count].last_pkts,0,ip_pkt_list_tot*sizeof(unsigned long));
227 curr_table->table[count].oldest_pkt = 0; 227 curr_table->table[count].oldest_pkt = 0;
228 curr_table->table[count].time_pos = 0; 228 curr_table->table[count].time_pos = 0;
229 curr_table->time_info[count].position = count; 229 curr_table->time_info[count].position = count;
@@ -502,7 +502,7 @@ match(const struct sk_buff *skb,
502 location = time_info[curr_table->time_pos].position; 502 location = time_info[curr_table->time_pos].position;
503 hash_table[r_list[location].hash_entry] = -1; 503 hash_table[r_list[location].hash_entry] = -1;
504 hash_table[hash_result] = location; 504 hash_table[hash_result] = location;
505 memset(r_list[location].last_pkts,0,ip_pkt_list_tot*sizeof(u_int32_t)); 505 memset(r_list[location].last_pkts,0,ip_pkt_list_tot*sizeof(unsigned long));
506 r_list[location].time_pos = curr_table->time_pos; 506 r_list[location].time_pos = curr_table->time_pos;
507 r_list[location].addr = addr; 507 r_list[location].addr = addr;
508 r_list[location].ttl = ttl; 508 r_list[location].ttl = ttl;
@@ -631,7 +631,7 @@ match(const struct sk_buff *skb,
631 r_list[location].last_seen = 0; 631 r_list[location].last_seen = 0;
632 r_list[location].addr = 0; 632 r_list[location].addr = 0;
633 r_list[location].ttl = 0; 633 r_list[location].ttl = 0;
634 memset(r_list[location].last_pkts,0,ip_pkt_list_tot*sizeof(u_int32_t)); 634 memset(r_list[location].last_pkts,0,ip_pkt_list_tot*sizeof(unsigned long));
635 r_list[location].oldest_pkt = 0; 635 r_list[location].oldest_pkt = 0;
636 ans = !info->invert; 636 ans = !info->invert;
637 } 637 }
@@ -734,10 +734,10 @@ checkentry(const char *tablename,
734 memset(curr_table->table,0,sizeof(struct recent_ip_list)*ip_list_tot); 734 memset(curr_table->table,0,sizeof(struct recent_ip_list)*ip_list_tot);
735#ifdef DEBUG 735#ifdef DEBUG
736 if(debug) printk(KERN_INFO RECENT_NAME ": checkentry: Allocating %d for pkt_list.\n", 736 if(debug) printk(KERN_INFO RECENT_NAME ": checkentry: Allocating %d for pkt_list.\n",
737 sizeof(u_int32_t)*ip_pkt_list_tot*ip_list_tot); 737 sizeof(unsigned long)*ip_pkt_list_tot*ip_list_tot);
738#endif 738#endif
739 739
740 hold = vmalloc(sizeof(u_int32_t)*ip_pkt_list_tot*ip_list_tot); 740 hold = vmalloc(sizeof(unsigned long)*ip_pkt_list_tot*ip_list_tot);
741#ifdef DEBUG 741#ifdef DEBUG
742 if(debug) printk(KERN_INFO RECENT_NAME ": checkentry: After pkt_list allocation.\n"); 742 if(debug) printk(KERN_INFO RECENT_NAME ": checkentry: After pkt_list allocation.\n");
743#endif 743#endif
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index 3aafb298c1c1..23068bddbf0b 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -23,6 +23,7 @@ extern int sysctl_ip_nonlocal_bind;
23extern int sysctl_icmp_echo_ignore_all; 23extern int sysctl_icmp_echo_ignore_all;
24extern int sysctl_icmp_echo_ignore_broadcasts; 24extern int sysctl_icmp_echo_ignore_broadcasts;
25extern int sysctl_icmp_ignore_bogus_error_responses; 25extern int sysctl_icmp_ignore_bogus_error_responses;
26extern int sysctl_icmp_errors_use_inbound_ifaddr;
26 27
27/* From ip_fragment.c */ 28/* From ip_fragment.c */
28extern int sysctl_ipfrag_low_thresh; 29extern int sysctl_ipfrag_low_thresh;
@@ -396,6 +397,14 @@ ctl_table ipv4_table[] = {
396 .proc_handler = &proc_dointvec 397 .proc_handler = &proc_dointvec
397 }, 398 },
398 { 399 {
400 .ctl_name = NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR,
401 .procname = "icmp_errors_use_inbound_ifaddr",
402 .data = &sysctl_icmp_errors_use_inbound_ifaddr,
403 .maxlen = sizeof(int),
404 .mode = 0644,
405 .proc_handler = &proc_dointvec
406 },
407 {
399 .ctl_name = NET_IPV4_ROUTE, 408 .ctl_name = NET_IPV4_ROUTE,
400 .procname = "route", 409 .procname = "route",
401 .maxlen = 0, 410 .maxlen = 0,
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index a037bafcba3c..0d9a4fd5f1a4 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2338,7 +2338,7 @@ void __init tcp_init(void)
2338 (tcp_bhash_size * sizeof(struct tcp_bind_hashbucket)); 2338 (tcp_bhash_size * sizeof(struct tcp_bind_hashbucket));
2339 order++) 2339 order++)
2340 ; 2340 ;
2341 if (order > 4) { 2341 if (order >= 4) {
2342 sysctl_local_port_range[0] = 32768; 2342 sysctl_local_port_range[0] = 32768;
2343 sysctl_local_port_range[1] = 61000; 2343 sysctl_local_port_range[1] = 61000;
2344 sysctl_tcp_max_tw_buckets = 180000; 2344 sysctl_tcp_max_tw_buckets = 180000;
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 7744a2592693..2720899d516c 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -372,6 +372,7 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev)
372 ndev->regen_timer.data = (unsigned long) ndev; 372 ndev->regen_timer.data = (unsigned long) ndev;
373 if ((dev->flags&IFF_LOOPBACK) || 373 if ((dev->flags&IFF_LOOPBACK) ||
374 dev->type == ARPHRD_TUNNEL || 374 dev->type == ARPHRD_TUNNEL ||
375 dev->type == ARPHRD_NONE ||
375 dev->type == ARPHRD_SIT) { 376 dev->type == ARPHRD_SIT) {
376 printk(KERN_INFO 377 printk(KERN_INFO
377 "Disabled Privacy Extensions on device %p(%s)\n", 378 "Disabled Privacy Extensions on device %p(%s)\n",
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index 8e0f569b883e..ff3ec9822e36 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -277,8 +277,8 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info,
277{ 277{
278 struct inet6_dev *idev = NULL; 278 struct inet6_dev *idev = NULL;
279 struct ipv6hdr *hdr = skb->nh.ipv6h; 279 struct ipv6hdr *hdr = skb->nh.ipv6h;
280 struct sock *sk = icmpv6_socket->sk; 280 struct sock *sk;
281 struct ipv6_pinfo *np = inet6_sk(sk); 281 struct ipv6_pinfo *np;
282 struct in6_addr *saddr = NULL; 282 struct in6_addr *saddr = NULL;
283 struct dst_entry *dst; 283 struct dst_entry *dst;
284 struct icmp6hdr tmp_hdr; 284 struct icmp6hdr tmp_hdr;
@@ -358,6 +358,9 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info,
358 if (icmpv6_xmit_lock()) 358 if (icmpv6_xmit_lock())
359 return; 359 return;
360 360
361 sk = icmpv6_socket->sk;
362 np = inet6_sk(sk);
363
361 if (!icmpv6_xrlim_allow(sk, type, &fl)) 364 if (!icmpv6_xrlim_allow(sk, type, &fl))
362 goto out; 365 goto out;
363 366
@@ -423,9 +426,9 @@ out:
423 426
424static void icmpv6_echo_reply(struct sk_buff *skb) 427static void icmpv6_echo_reply(struct sk_buff *skb)
425{ 428{
426 struct sock *sk = icmpv6_socket->sk; 429 struct sock *sk;
427 struct inet6_dev *idev; 430 struct inet6_dev *idev;
428 struct ipv6_pinfo *np = inet6_sk(sk); 431 struct ipv6_pinfo *np;
429 struct in6_addr *saddr = NULL; 432 struct in6_addr *saddr = NULL;
430 struct icmp6hdr *icmph = (struct icmp6hdr *) skb->h.raw; 433 struct icmp6hdr *icmph = (struct icmp6hdr *) skb->h.raw;
431 struct icmp6hdr tmp_hdr; 434 struct icmp6hdr tmp_hdr;
@@ -454,6 +457,9 @@ static void icmpv6_echo_reply(struct sk_buff *skb)
454 if (icmpv6_xmit_lock()) 457 if (icmpv6_xmit_lock())
455 return; 458 return;
456 459
460 sk = icmpv6_socket->sk;
461 np = inet6_sk(sk);
462
457 if (!fl.oif && ipv6_addr_is_multicast(&fl.fl6_dst)) 463 if (!fl.oif && ipv6_addr_is_multicast(&fl.fl6_dst))
458 fl.oif = np->mcast_oif; 464 fl.oif = np->mcast_oif;
459 465
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index 3b1c9fa184ae..ba3b0c267f75 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -882,6 +882,7 @@ ip6ip6_tnl_change(struct ip6_tnl *t, struct ip6_tnl_parm *p)
882 t->parms.hop_limit = p->hop_limit; 882 t->parms.hop_limit = p->hop_limit;
883 t->parms.encap_limit = p->encap_limit; 883 t->parms.encap_limit = p->encap_limit;
884 t->parms.flowinfo = p->flowinfo; 884 t->parms.flowinfo = p->flowinfo;
885 t->parms.link = p->link;
885 ip6ip6_tnl_link_config(t); 886 ip6ip6_tnl_link_config(t);
886 return 0; 887 return 0;
887} 888}
diff --git a/net/sched/Kconfig b/net/sched/Kconfig
index b0941186f867..b22c9beb604d 100644
--- a/net/sched/Kconfig
+++ b/net/sched/Kconfig
@@ -405,7 +405,7 @@ config NET_EMATCH_STACK
405 ---help--- 405 ---help---
406 Size of the local stack variable used while evaluating the tree of 406 Size of the local stack variable used while evaluating the tree of
407 ematches. Limits the depth of the tree, i.e. the number of 407 ematches. Limits the depth of the tree, i.e. the number of
408 encapsulated precedences. Every level requires 4 bytes of addtional 408 encapsulated precedences. Every level requires 4 bytes of additional
409 stack space. 409 stack space.
410 410
411config NET_EMATCH_CMP 411config NET_EMATCH_CMP
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index cafcb084098d..914c85ff8fe6 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -881,7 +881,7 @@ static int __init tc_action_init(void)
881 link_p[RTM_GETACTION-RTM_BASE].dumpit = tc_dump_action; 881 link_p[RTM_GETACTION-RTM_BASE].dumpit = tc_dump_action;
882 } 882 }
883 883
884 printk("TC classifier action (bugs to netdev@oss.sgi.com cc " 884 printk("TC classifier action (bugs to netdev@vger.kernel.org cc "
885 "hadi@cyberus.ca)\n"); 885 "hadi@cyberus.ca)\n");
886 return 0; 886 return 0;
887} 887}
diff --git a/net/sched/cls_basic.c b/net/sched/cls_basic.c
index 0d2d4415f334..dfb300bb6baa 100644
--- a/net/sched/cls_basic.c
+++ b/net/sched/cls_basic.c
@@ -261,6 +261,9 @@ static int basic_dump(struct tcf_proto *tp, unsigned long fh,
261 rta = (struct rtattr *) b; 261 rta = (struct rtattr *) b;
262 RTA_PUT(skb, TCA_OPTIONS, 0, NULL); 262 RTA_PUT(skb, TCA_OPTIONS, 0, NULL);
263 263
264 if (f->res.classid)
265 RTA_PUT(skb, TCA_BASIC_CLASSID, sizeof(u32), &f->res.classid);
266
264 if (tcf_exts_dump(skb, &f->exts, &basic_ext_map) < 0 || 267 if (tcf_exts_dump(skb, &f->exts, &basic_ext_map) < 0 ||
265 tcf_em_tree_dump(skb, &f->ematches, TCA_BASIC_EMATCHES) < 0) 268 tcf_em_tree_dump(skb, &f->ematches, TCA_BASIC_EMATCHES) < 0)
266 goto rtattr_failure; 269 goto rtattr_failure;
diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c
index f1eeaf65cee5..48bb23c2a35a 100644
--- a/net/sched/em_meta.c
+++ b/net/sched/em_meta.c
@@ -32,7 +32,7 @@
32 * +-----------+ +-----------+ 32 * +-----------+ +-----------+
33 * | | 33 * | |
34 * ---> meta_ops[INT][INDEV](...) | 34 * ---> meta_ops[INT][INDEV](...) |
35 * | | 35 * | |
36 * ----------- | 36 * ----------- |
37 * V V 37 * V V
38 * +-----------+ +-----------+ 38 * +-----------+ +-----------+
@@ -70,6 +70,7 @@
70#include <net/dst.h> 70#include <net/dst.h>
71#include <net/route.h> 71#include <net/route.h>
72#include <net/pkt_cls.h> 72#include <net/pkt_cls.h>
73#include <net/sock.h>
73 74
74struct meta_obj 75struct meta_obj
75{ 76{
@@ -284,6 +285,214 @@ META_COLLECTOR(int_rtiif)
284} 285}
285 286
286/************************************************************************** 287/**************************************************************************
288 * Socket Attributes
289 **************************************************************************/
290
291#define SKIP_NONLOCAL(skb) \
292 if (unlikely(skb->sk == NULL)) { \
293 *err = -1; \
294 return; \
295 }
296
297META_COLLECTOR(int_sk_family)
298{
299 SKIP_NONLOCAL(skb);
300 dst->value = skb->sk->sk_family;
301}
302
303META_COLLECTOR(int_sk_state)
304{
305 SKIP_NONLOCAL(skb);
306 dst->value = skb->sk->sk_state;
307}
308
309META_COLLECTOR(int_sk_reuse)
310{
311 SKIP_NONLOCAL(skb);
312 dst->value = skb->sk->sk_reuse;
313}
314
315META_COLLECTOR(int_sk_bound_if)
316{
317 SKIP_NONLOCAL(skb);
318 /* No error if bound_dev_if is 0, legal userspace check */
319 dst->value = skb->sk->sk_bound_dev_if;
320}
321
322META_COLLECTOR(var_sk_bound_if)
323{
324 SKIP_NONLOCAL(skb);
325
326 if (skb->sk->sk_bound_dev_if == 0) {
327 dst->value = (unsigned long) "any";
328 dst->len = 3;
329 } else {
330 struct net_device *dev;
331
332 dev = dev_get_by_index(skb->sk->sk_bound_dev_if);
333 *err = var_dev(dev, dst);
334 if (dev)
335 dev_put(dev);
336 }
337}
338
339META_COLLECTOR(int_sk_refcnt)
340{
341 SKIP_NONLOCAL(skb);
342 dst->value = atomic_read(&skb->sk->sk_refcnt);
343}
344
345META_COLLECTOR(int_sk_rcvbuf)
346{
347 SKIP_NONLOCAL(skb);
348 dst->value = skb->sk->sk_rcvbuf;
349}
350
351META_COLLECTOR(int_sk_shutdown)
352{
353 SKIP_NONLOCAL(skb);
354 dst->value = skb->sk->sk_shutdown;
355}
356
357META_COLLECTOR(int_sk_proto)
358{
359 SKIP_NONLOCAL(skb);
360 dst->value = skb->sk->sk_protocol;
361}
362
363META_COLLECTOR(int_sk_type)
364{
365 SKIP_NONLOCAL(skb);
366 dst->value = skb->sk->sk_type;
367}
368
369META_COLLECTOR(int_sk_rmem_alloc)
370{
371 SKIP_NONLOCAL(skb);
372 dst->value = atomic_read(&skb->sk->sk_rmem_alloc);
373}
374
375META_COLLECTOR(int_sk_wmem_alloc)
376{
377 SKIP_NONLOCAL(skb);
378 dst->value = atomic_read(&skb->sk->sk_wmem_alloc);
379}
380
381META_COLLECTOR(int_sk_omem_alloc)
382{
383 SKIP_NONLOCAL(skb);
384 dst->value = atomic_read(&skb->sk->sk_omem_alloc);
385}
386
387META_COLLECTOR(int_sk_rcv_qlen)
388{
389 SKIP_NONLOCAL(skb);
390 dst->value = skb->sk->sk_receive_queue.qlen;
391}
392
393META_COLLECTOR(int_sk_snd_qlen)
394{
395 SKIP_NONLOCAL(skb);
396 dst->value = skb->sk->sk_write_queue.qlen;
397}
398
399META_COLLECTOR(int_sk_wmem_queued)
400{
401 SKIP_NONLOCAL(skb);
402 dst->value = skb->sk->sk_wmem_queued;
403}
404
405META_COLLECTOR(int_sk_fwd_alloc)
406{
407 SKIP_NONLOCAL(skb);
408 dst->value = skb->sk->sk_forward_alloc;
409}
410
411META_COLLECTOR(int_sk_sndbuf)
412{
413 SKIP_NONLOCAL(skb);
414 dst->value = skb->sk->sk_sndbuf;
415}
416
417META_COLLECTOR(int_sk_alloc)
418{
419 SKIP_NONLOCAL(skb);
420 dst->value = skb->sk->sk_allocation;
421}
422
423META_COLLECTOR(int_sk_route_caps)
424{
425 SKIP_NONLOCAL(skb);
426 dst->value = skb->sk->sk_route_caps;
427}
428
429META_COLLECTOR(int_sk_hashent)
430{
431 SKIP_NONLOCAL(skb);
432 dst->value = skb->sk->sk_hashent;
433}
434
435META_COLLECTOR(int_sk_lingertime)
436{
437 SKIP_NONLOCAL(skb);
438 dst->value = skb->sk->sk_lingertime / HZ;
439}
440
441META_COLLECTOR(int_sk_err_qlen)
442{
443 SKIP_NONLOCAL(skb);
444 dst->value = skb->sk->sk_error_queue.qlen;
445}
446
447META_COLLECTOR(int_sk_ack_bl)
448{
449 SKIP_NONLOCAL(skb);
450 dst->value = skb->sk->sk_ack_backlog;
451}
452
453META_COLLECTOR(int_sk_max_ack_bl)
454{
455 SKIP_NONLOCAL(skb);
456 dst->value = skb->sk->sk_max_ack_backlog;
457}
458
459META_COLLECTOR(int_sk_prio)
460{
461 SKIP_NONLOCAL(skb);
462 dst->value = skb->sk->sk_priority;
463}
464
465META_COLLECTOR(int_sk_rcvlowat)
466{
467 SKIP_NONLOCAL(skb);
468 dst->value = skb->sk->sk_rcvlowat;
469}
470
471META_COLLECTOR(int_sk_rcvtimeo)
472{
473 SKIP_NONLOCAL(skb);
474 dst->value = skb->sk->sk_rcvtimeo / HZ;
475}
476
477META_COLLECTOR(int_sk_sndtimeo)
478{
479 SKIP_NONLOCAL(skb);
480 dst->value = skb->sk->sk_sndtimeo / HZ;
481}
482
483META_COLLECTOR(int_sk_sendmsg_off)
484{
485 SKIP_NONLOCAL(skb);
486 dst->value = skb->sk->sk_sndmsg_off;
487}
488
489META_COLLECTOR(int_sk_write_pend)
490{
491 SKIP_NONLOCAL(skb);
492 dst->value = skb->sk->sk_write_pending;
493}
494
495/**************************************************************************
287 * Meta value collectors assignment table 496 * Meta value collectors assignment table
288 **************************************************************************/ 497 **************************************************************************/
289 498
@@ -293,41 +502,75 @@ struct meta_ops
293 struct meta_value *, struct meta_obj *, int *); 502 struct meta_value *, struct meta_obj *, int *);
294}; 503};
295 504
505#define META_ID(name) TCF_META_ID_##name
506#define META_FUNC(name) { .get = meta_##name }
507
296/* Meta value operations table listing all meta value collectors and 508/* Meta value operations table listing all meta value collectors and
297 * assigns them to a type and meta id. */ 509 * assigns them to a type and meta id. */
298static struct meta_ops __meta_ops[TCF_META_TYPE_MAX+1][TCF_META_ID_MAX+1] = { 510static struct meta_ops __meta_ops[TCF_META_TYPE_MAX+1][TCF_META_ID_MAX+1] = {
299 [TCF_META_TYPE_VAR] = { 511 [TCF_META_TYPE_VAR] = {
300 [TCF_META_ID_DEV] = { .get = meta_var_dev }, 512 [META_ID(DEV)] = META_FUNC(var_dev),
301 [TCF_META_ID_INDEV] = { .get = meta_var_indev }, 513 [META_ID(INDEV)] = META_FUNC(var_indev),
302 [TCF_META_ID_REALDEV] = { .get = meta_var_realdev } 514 [META_ID(REALDEV)] = META_FUNC(var_realdev),
515 [META_ID(SK_BOUND_IF)] = META_FUNC(var_sk_bound_if),
303 }, 516 },
304 [TCF_META_TYPE_INT] = { 517 [TCF_META_TYPE_INT] = {
305 [TCF_META_ID_RANDOM] = { .get = meta_int_random }, 518 [META_ID(RANDOM)] = META_FUNC(int_random),
306 [TCF_META_ID_LOADAVG_0] = { .get = meta_int_loadavg_0 }, 519 [META_ID(LOADAVG_0)] = META_FUNC(int_loadavg_0),
307 [TCF_META_ID_LOADAVG_1] = { .get = meta_int_loadavg_1 }, 520 [META_ID(LOADAVG_1)] = META_FUNC(int_loadavg_1),
308 [TCF_META_ID_LOADAVG_2] = { .get = meta_int_loadavg_2 }, 521 [META_ID(LOADAVG_2)] = META_FUNC(int_loadavg_2),
309 [TCF_META_ID_DEV] = { .get = meta_int_dev }, 522 [META_ID(DEV)] = META_FUNC(int_dev),
310 [TCF_META_ID_INDEV] = { .get = meta_int_indev }, 523 [META_ID(INDEV)] = META_FUNC(int_indev),
311 [TCF_META_ID_REALDEV] = { .get = meta_int_realdev }, 524 [META_ID(REALDEV)] = META_FUNC(int_realdev),
312 [TCF_META_ID_PRIORITY] = { .get = meta_int_priority }, 525 [META_ID(PRIORITY)] = META_FUNC(int_priority),
313 [TCF_META_ID_PROTOCOL] = { .get = meta_int_protocol }, 526 [META_ID(PROTOCOL)] = META_FUNC(int_protocol),
314 [TCF_META_ID_SECURITY] = { .get = meta_int_security }, 527 [META_ID(SECURITY)] = META_FUNC(int_security),
315 [TCF_META_ID_PKTTYPE] = { .get = meta_int_pkttype }, 528 [META_ID(PKTTYPE)] = META_FUNC(int_pkttype),
316 [TCF_META_ID_PKTLEN] = { .get = meta_int_pktlen }, 529 [META_ID(PKTLEN)] = META_FUNC(int_pktlen),
317 [TCF_META_ID_DATALEN] = { .get = meta_int_datalen }, 530 [META_ID(DATALEN)] = META_FUNC(int_datalen),
318 [TCF_META_ID_MACLEN] = { .get = meta_int_maclen }, 531 [META_ID(MACLEN)] = META_FUNC(int_maclen),
319#ifdef CONFIG_NETFILTER 532#ifdef CONFIG_NETFILTER
320 [TCF_META_ID_NFMARK] = { .get = meta_int_nfmark }, 533 [META_ID(NFMARK)] = META_FUNC(int_nfmark),
321#endif 534#endif
322 [TCF_META_ID_TCINDEX] = { .get = meta_int_tcindex }, 535 [META_ID(TCINDEX)] = META_FUNC(int_tcindex),
323#ifdef CONFIG_NET_CLS_ACT 536#ifdef CONFIG_NET_CLS_ACT
324 [TCF_META_ID_TCVERDICT] = { .get = meta_int_tcverd }, 537 [META_ID(TCVERDICT)] = META_FUNC(int_tcverd),
325 [TCF_META_ID_TCCLASSID] = { .get = meta_int_tcclassid }, 538 [META_ID(TCCLASSID)] = META_FUNC(int_tcclassid),
326#endif 539#endif
327#ifdef CONFIG_NET_CLS_ROUTE 540#ifdef CONFIG_NET_CLS_ROUTE
328 [TCF_META_ID_RTCLASSID] = { .get = meta_int_rtclassid }, 541 [META_ID(RTCLASSID)] = META_FUNC(int_rtclassid),
329#endif 542#endif
330 [TCF_META_ID_RTIIF] = { .get = meta_int_rtiif } 543 [META_ID(RTIIF)] = META_FUNC(int_rtiif),
544 [META_ID(SK_FAMILY)] = META_FUNC(int_sk_family),
545 [META_ID(SK_STATE)] = META_FUNC(int_sk_state),
546 [META_ID(SK_REUSE)] = META_FUNC(int_sk_reuse),
547 [META_ID(SK_BOUND_IF)] = META_FUNC(int_sk_bound_if),
548 [META_ID(SK_REFCNT)] = META_FUNC(int_sk_refcnt),
549 [META_ID(SK_RCVBUF)] = META_FUNC(int_sk_rcvbuf),
550 [META_ID(SK_SNDBUF)] = META_FUNC(int_sk_sndbuf),
551 [META_ID(SK_SHUTDOWN)] = META_FUNC(int_sk_shutdown),
552 [META_ID(SK_PROTO)] = META_FUNC(int_sk_proto),
553 [META_ID(SK_TYPE)] = META_FUNC(int_sk_type),
554 [META_ID(SK_RMEM_ALLOC)] = META_FUNC(int_sk_rmem_alloc),
555 [META_ID(SK_WMEM_ALLOC)] = META_FUNC(int_sk_wmem_alloc),
556 [META_ID(SK_OMEM_ALLOC)] = META_FUNC(int_sk_omem_alloc),
557 [META_ID(SK_WMEM_QUEUED)] = META_FUNC(int_sk_wmem_queued),
558 [META_ID(SK_RCV_QLEN)] = META_FUNC(int_sk_rcv_qlen),
559 [META_ID(SK_SND_QLEN)] = META_FUNC(int_sk_snd_qlen),
560 [META_ID(SK_ERR_QLEN)] = META_FUNC(int_sk_err_qlen),
561 [META_ID(SK_FORWARD_ALLOCS)] = META_FUNC(int_sk_fwd_alloc),
562 [META_ID(SK_ALLOCS)] = META_FUNC(int_sk_alloc),
563 [META_ID(SK_ROUTE_CAPS)] = META_FUNC(int_sk_route_caps),
564 [META_ID(SK_HASHENT)] = META_FUNC(int_sk_hashent),
565 [META_ID(SK_LINGERTIME)] = META_FUNC(int_sk_lingertime),
566 [META_ID(SK_ACK_BACKLOG)] = META_FUNC(int_sk_ack_bl),
567 [META_ID(SK_MAX_ACK_BACKLOG)] = META_FUNC(int_sk_max_ack_bl),
568 [META_ID(SK_PRIO)] = META_FUNC(int_sk_prio),
569 [META_ID(SK_RCVLOWAT)] = META_FUNC(int_sk_rcvlowat),
570 [META_ID(SK_RCVTIMEO)] = META_FUNC(int_sk_rcvtimeo),
571 [META_ID(SK_SNDTIMEO)] = META_FUNC(int_sk_sndtimeo),
572 [META_ID(SK_SENDMSG_OFF)] = META_FUNC(int_sk_sendmsg_off),
573 [META_ID(SK_WRITE_PENDING)] = META_FUNC(int_sk_write_pend),
331 } 574 }
332}; 575};
333 576
@@ -396,9 +639,9 @@ static int meta_int_compare(struct meta_obj *a, struct meta_obj *b)
396 /* Let gcc optimize it, the unlikely is not really based on 639 /* Let gcc optimize it, the unlikely is not really based on
397 * some numbers but jump free code for mismatches seems 640 * some numbers but jump free code for mismatches seems
398 * more logical. */ 641 * more logical. */
399 if (unlikely(a == b)) 642 if (unlikely(a->value == b->value))
400 return 0; 643 return 0;
401 else if (a < b) 644 else if (a->value < b->value)
402 return -1; 645 return -1;
403 else 646 else
404 return 1; 647 return 1;
diff --git a/net/sctp/input.c b/net/sctp/input.c
index b719a77d66b4..fffc880a646d 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -178,6 +178,37 @@ int sctp_rcv(struct sk_buff *skb)
178 178
179 asoc = __sctp_rcv_lookup(skb, &src, &dest, &transport); 179 asoc = __sctp_rcv_lookup(skb, &src, &dest, &transport);
180 180
181 if (!asoc)
182 ep = __sctp_rcv_lookup_endpoint(&dest);
183
184 /* Retrieve the common input handling substructure. */
185 rcvr = asoc ? &asoc->base : &ep->base;
186 sk = rcvr->sk;
187
188 /*
189 * If a frame arrives on an interface and the receiving socket is
190 * bound to another interface, via SO_BINDTODEVICE, treat it as OOTB
191 */
192 if (sk->sk_bound_dev_if && (sk->sk_bound_dev_if != af->skb_iif(skb)))
193 {
194 sock_put(sk);
195 if (asoc) {
196 sctp_association_put(asoc);
197 asoc = NULL;
198 } else {
199 sctp_endpoint_put(ep);
200 ep = NULL;
201 }
202 sk = sctp_get_ctl_sock();
203 ep = sctp_sk(sk)->ep;
204 sctp_endpoint_hold(ep);
205 sock_hold(sk);
206 rcvr = &ep->base;
207 }
208
209 if (atomic_read(&sk->sk_rmem_alloc) >= sk->sk_rcvbuf)
210 goto discard_release;
211
181 /* 212 /*
182 * RFC 2960, 8.4 - Handle "Out of the blue" Packets. 213 * RFC 2960, 8.4 - Handle "Out of the blue" Packets.
183 * An SCTP packet is called an "out of the blue" (OOTB) 214 * An SCTP packet is called an "out of the blue" (OOTB)
@@ -187,22 +218,12 @@ int sctp_rcv(struct sk_buff *skb)
187 * packet belongs. 218 * packet belongs.
188 */ 219 */
189 if (!asoc) { 220 if (!asoc) {
190 ep = __sctp_rcv_lookup_endpoint(&dest);
191 if (sctp_rcv_ootb(skb)) { 221 if (sctp_rcv_ootb(skb)) {
192 SCTP_INC_STATS_BH(SCTP_MIB_OUTOFBLUES); 222 SCTP_INC_STATS_BH(SCTP_MIB_OUTOFBLUES);
193 goto discard_release; 223 goto discard_release;
194 } 224 }
195 } 225 }
196 226
197 /* Retrieve the common input handling substructure. */
198 rcvr = asoc ? &asoc->base : &ep->base;
199 sk = rcvr->sk;
200
201 if ((sk) && (atomic_read(&sk->sk_rmem_alloc) >= sk->sk_rcvbuf)) {
202 goto discard_release;
203 }
204
205
206 /* SCTP seems to always need a timestamp right now (FIXME) */ 227 /* SCTP seems to always need a timestamp right now (FIXME) */
207 if (skb->stamp.tv_sec == 0) { 228 if (skb->stamp.tv_sec == 0) {
208 do_gettimeofday(&skb->stamp); 229 do_gettimeofday(&skb->stamp);
@@ -265,13 +286,11 @@ discard_it:
265 286
266discard_release: 287discard_release:
267 /* Release any structures we may be holding. */ 288 /* Release any structures we may be holding. */
268 if (asoc) { 289 sock_put(sk);
269 sock_put(asoc->base.sk); 290 if (asoc)
270 sctp_association_put(asoc); 291 sctp_association_put(asoc);
271 } else { 292 else
272 sock_put(ep->base.sk);
273 sctp_endpoint_put(ep); 293 sctp_endpoint_put(ep);
274 }
275 294
276 goto discard_it; 295 goto discard_it;
277} 296}
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
index c9d9ea064734..c7e42d125b9c 100644
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -812,26 +812,23 @@ static int sctp_inet6_bind_verify(struct sctp_sock *opt, union sctp_addr *addr)
812 if (addr->sa.sa_family != AF_INET6) 812 if (addr->sa.sa_family != AF_INET6)
813 af = sctp_get_af_specific(addr->sa.sa_family); 813 af = sctp_get_af_specific(addr->sa.sa_family);
814 else { 814 else {
815 struct sock *sk;
816 int type = ipv6_addr_type(&addr->v6.sin6_addr); 815 int type = ipv6_addr_type(&addr->v6.sin6_addr);
817 sk = sctp_opt2sk(opt); 816 struct net_device *dev;
817
818 if (type & IPV6_ADDR_LINKLOCAL) { 818 if (type & IPV6_ADDR_LINKLOCAL) {
819 /* Note: Behavior similar to af_inet6.c: 819 if (!addr->v6.sin6_scope_id)
820 * 1) Overrides previous bound_dev_if 820 return 0;
821 * 2) Destructive even if bind isn't successful. 821 dev = dev_get_by_index(addr->v6.sin6_scope_id);
822 */ 822 if (!dev)
823
824 if (addr->v6.sin6_scope_id)
825 sk->sk_bound_dev_if = addr->v6.sin6_scope_id;
826 if (!sk->sk_bound_dev_if)
827 return 0; 823 return 0;
824 dev_put(dev);
828 } 825 }
829 af = opt->pf->af; 826 af = opt->pf->af;
830 } 827 }
831 return af->available(addr, opt); 828 return af->available(addr, opt);
832} 829}
833 830
834/* Verify that the provided sockaddr looks bindable. Common verification, 831/* Verify that the provided sockaddr looks sendable. Common verification,
835 * has already been taken care of. 832 * has already been taken care of.
836 */ 833 */
837static int sctp_inet6_send_verify(struct sctp_sock *opt, union sctp_addr *addr) 834static int sctp_inet6_send_verify(struct sctp_sock *opt, union sctp_addr *addr)
@@ -842,19 +839,16 @@ static int sctp_inet6_send_verify(struct sctp_sock *opt, union sctp_addr *addr)
842 if (addr->sa.sa_family != AF_INET6) 839 if (addr->sa.sa_family != AF_INET6)
843 af = sctp_get_af_specific(addr->sa.sa_family); 840 af = sctp_get_af_specific(addr->sa.sa_family);
844 else { 841 else {
845 struct sock *sk;
846 int type = ipv6_addr_type(&addr->v6.sin6_addr); 842 int type = ipv6_addr_type(&addr->v6.sin6_addr);
847 sk = sctp_opt2sk(opt); 843 struct net_device *dev;
844
848 if (type & IPV6_ADDR_LINKLOCAL) { 845 if (type & IPV6_ADDR_LINKLOCAL) {
849 /* Note: Behavior similar to af_inet6.c: 846 if (!addr->v6.sin6_scope_id)
850 * 1) Overrides previous bound_dev_if 847 return 0;
851 * 2) Destructive even if bind isn't successful. 848 dev = dev_get_by_index(addr->v6.sin6_scope_id);
852 */ 849 if (!dev)
853
854 if (addr->v6.sin6_scope_id)
855 sk->sk_bound_dev_if = addr->v6.sin6_scope_id;
856 if (!sk->sk_bound_dev_if)
857 return 0; 850 return 0;
851 dev_put(dev);
858 } 852 }
859 af = opt->pf->af; 853 af = opt->pf->af;
860 } 854 }
diff --git a/net/sctp/proc.c b/net/sctp/proc.c
index e42fd8c2916b..98d49ec9b74b 100644
--- a/net/sctp/proc.c
+++ b/net/sctp/proc.c
@@ -132,14 +132,25 @@ void sctp_snmp_proc_exit(void)
132static void sctp_seq_dump_local_addrs(struct seq_file *seq, struct sctp_ep_common *epb) 132static void sctp_seq_dump_local_addrs(struct seq_file *seq, struct sctp_ep_common *epb)
133{ 133{
134 struct list_head *pos; 134 struct list_head *pos;
135 struct sctp_association *asoc;
135 struct sctp_sockaddr_entry *laddr; 136 struct sctp_sockaddr_entry *laddr;
136 union sctp_addr *addr; 137 struct sctp_transport *peer;
138 union sctp_addr *addr, *primary = NULL;
137 struct sctp_af *af; 139 struct sctp_af *af;
138 140
141 if (epb->type == SCTP_EP_TYPE_ASSOCIATION) {
142 asoc = sctp_assoc(epb);
143 peer = asoc->peer.primary_path;
144 primary = &peer->saddr;
145 }
146
139 list_for_each(pos, &epb->bind_addr.address_list) { 147 list_for_each(pos, &epb->bind_addr.address_list) {
140 laddr = list_entry(pos, struct sctp_sockaddr_entry, list); 148 laddr = list_entry(pos, struct sctp_sockaddr_entry, list);
141 addr = (union sctp_addr *)&laddr->a; 149 addr = (union sctp_addr *)&laddr->a;
142 af = sctp_get_af_specific(addr->sa.sa_family); 150 af = sctp_get_af_specific(addr->sa.sa_family);
151 if (primary && af->cmp_addr(addr, primary)) {
152 seq_printf(seq, "*");
153 }
143 af->seq_dump_addr(seq, addr); 154 af->seq_dump_addr(seq, addr);
144 } 155 }
145} 156}
@@ -149,17 +160,54 @@ static void sctp_seq_dump_remote_addrs(struct seq_file *seq, struct sctp_associa
149{ 160{
150 struct list_head *pos; 161 struct list_head *pos;
151 struct sctp_transport *transport; 162 struct sctp_transport *transport;
152 union sctp_addr *addr; 163 union sctp_addr *addr, *primary;
153 struct sctp_af *af; 164 struct sctp_af *af;
154 165
166 primary = &(assoc->peer.primary_addr);
155 list_for_each(pos, &assoc->peer.transport_addr_list) { 167 list_for_each(pos, &assoc->peer.transport_addr_list) {
156 transport = list_entry(pos, struct sctp_transport, transports); 168 transport = list_entry(pos, struct sctp_transport, transports);
157 addr = (union sctp_addr *)&transport->ipaddr; 169 addr = (union sctp_addr *)&transport->ipaddr;
158 af = sctp_get_af_specific(addr->sa.sa_family); 170 af = sctp_get_af_specific(addr->sa.sa_family);
171 if (af->cmp_addr(addr, primary)) {
172 seq_printf(seq, "*");
173 }
159 af->seq_dump_addr(seq, addr); 174 af->seq_dump_addr(seq, addr);
160 } 175 }
161} 176}
162 177
178static void * sctp_eps_seq_start(struct seq_file *seq, loff_t *pos)
179{
180 if (*pos > sctp_ep_hashsize)
181 return NULL;
182
183 if (*pos < 0)
184 *pos = 0;
185
186 if (*pos == 0)
187 seq_printf(seq, " ENDPT SOCK STY SST HBKT LPORT UID INODE LADDRS\n");
188
189 ++*pos;
190
191 return (void *)pos;
192}
193
194static void sctp_eps_seq_stop(struct seq_file *seq, void *v)
195{
196 return;
197}
198
199
200static void * sctp_eps_seq_next(struct seq_file *seq, void *v, loff_t *pos)
201{
202 if (*pos > sctp_ep_hashsize)
203 return NULL;
204
205 ++*pos;
206
207 return pos;
208}
209
210
163/* Display sctp endpoints (/proc/net/sctp/eps). */ 211/* Display sctp endpoints (/proc/net/sctp/eps). */
164static int sctp_eps_seq_show(struct seq_file *seq, void *v) 212static int sctp_eps_seq_show(struct seq_file *seq, void *v)
165{ 213{
@@ -167,38 +215,50 @@ static int sctp_eps_seq_show(struct seq_file *seq, void *v)
167 struct sctp_ep_common *epb; 215 struct sctp_ep_common *epb;
168 struct sctp_endpoint *ep; 216 struct sctp_endpoint *ep;
169 struct sock *sk; 217 struct sock *sk;
170 int hash; 218 int hash = *(int *)v;
171 219
172 seq_printf(seq, " ENDPT SOCK STY SST HBKT LPORT LADDRS\n"); 220 if (hash > sctp_ep_hashsize)
173 for (hash = 0; hash < sctp_ep_hashsize; hash++) { 221 return -ENOMEM;
174 head = &sctp_ep_hashtable[hash]; 222
175 read_lock(&head->lock); 223 head = &sctp_ep_hashtable[hash-1];
176 for (epb = head->chain; epb; epb = epb->next) { 224 sctp_local_bh_disable();
177 ep = sctp_ep(epb); 225 read_lock(&head->lock);
178 sk = epb->sk; 226 for (epb = head->chain; epb; epb = epb->next) {
179 seq_printf(seq, "%8p %8p %-3d %-3d %-4d %-5d ", ep, sk, 227 ep = sctp_ep(epb);
180 sctp_sk(sk)->type, sk->sk_state, hash, 228 sk = epb->sk;
181 epb->bind_addr.port); 229 seq_printf(seq, "%8p %8p %-3d %-3d %-4d %-5d %5d %5lu ", ep, sk,
182 sctp_seq_dump_local_addrs(seq, epb); 230 sctp_sk(sk)->type, sk->sk_state, hash-1,
183 seq_printf(seq, "\n"); 231 epb->bind_addr.port,
184 } 232 sock_i_uid(sk), sock_i_ino(sk));
185 read_unlock(&head->lock); 233
234 sctp_seq_dump_local_addrs(seq, epb);
235 seq_printf(seq, "\n");
186 } 236 }
237 read_unlock(&head->lock);
238 sctp_local_bh_enable();
187 239
188 return 0; 240 return 0;
189} 241}
190 242
243static struct seq_operations sctp_eps_ops = {
244 .start = sctp_eps_seq_start,
245 .next = sctp_eps_seq_next,
246 .stop = sctp_eps_seq_stop,
247 .show = sctp_eps_seq_show,
248};
249
250
191/* Initialize the seq file operations for 'eps' object. */ 251/* Initialize the seq file operations for 'eps' object. */
192static int sctp_eps_seq_open(struct inode *inode, struct file *file) 252static int sctp_eps_seq_open(struct inode *inode, struct file *file)
193{ 253{
194 return single_open(file, sctp_eps_seq_show, NULL); 254 return seq_open(file, &sctp_eps_ops);
195} 255}
196 256
197static struct file_operations sctp_eps_seq_fops = { 257static struct file_operations sctp_eps_seq_fops = {
198 .open = sctp_eps_seq_open, 258 .open = sctp_eps_seq_open,
199 .read = seq_read, 259 .read = seq_read,
200 .llseek = seq_lseek, 260 .llseek = seq_lseek,
201 .release = single_release, 261 .release = seq_release,
202}; 262};
203 263
204/* Set up the proc fs entry for 'eps' object. */ 264/* Set up the proc fs entry for 'eps' object. */
@@ -221,6 +281,40 @@ void sctp_eps_proc_exit(void)
221 remove_proc_entry("eps", proc_net_sctp); 281 remove_proc_entry("eps", proc_net_sctp);
222} 282}
223 283
284
285static void * sctp_assocs_seq_start(struct seq_file *seq, loff_t *pos)
286{
287 if (*pos > sctp_assoc_hashsize)
288 return NULL;
289
290 if (*pos < 0)
291 *pos = 0;
292
293 if (*pos == 0)
294 seq_printf(seq, " ASSOC SOCK STY SST ST HBKT ASSOC-ID TX_QUEUE RX_QUEUE UID INODE LPORT "
295 "RPORT LADDRS <-> RADDRS\n");
296
297 ++*pos;
298
299 return (void *)pos;
300}
301
302static void sctp_assocs_seq_stop(struct seq_file *seq, void *v)
303{
304 return;
305}
306
307
308static void * sctp_assocs_seq_next(struct seq_file *seq, void *v, loff_t *pos)
309{
310 if (*pos > sctp_assoc_hashsize)
311 return NULL;
312
313 ++*pos;
314
315 return pos;
316}
317
224/* Display sctp associations (/proc/net/sctp/assocs). */ 318/* Display sctp associations (/proc/net/sctp/assocs). */
225static int sctp_assocs_seq_show(struct seq_file *seq, void *v) 319static int sctp_assocs_seq_show(struct seq_file *seq, void *v)
226{ 320{
@@ -228,43 +322,57 @@ static int sctp_assocs_seq_show(struct seq_file *seq, void *v)
228 struct sctp_ep_common *epb; 322 struct sctp_ep_common *epb;
229 struct sctp_association *assoc; 323 struct sctp_association *assoc;
230 struct sock *sk; 324 struct sock *sk;
231 int hash; 325 int hash = *(int *)v;
232 326
233 seq_printf(seq, " ASSOC SOCK STY SST ST HBKT LPORT RPORT " 327 if (hash > sctp_assoc_hashsize)
234 "LADDRS <-> RADDRS\n"); 328 return -ENOMEM;
235 for (hash = 0; hash < sctp_assoc_hashsize; hash++) { 329
236 head = &sctp_assoc_hashtable[hash]; 330 head = &sctp_assoc_hashtable[hash-1];
237 read_lock(&head->lock); 331 sctp_local_bh_disable();
238 for (epb = head->chain; epb; epb = epb->next) { 332 read_lock(&head->lock);
239 assoc = sctp_assoc(epb); 333 for (epb = head->chain; epb; epb = epb->next) {
240 sk = epb->sk; 334 assoc = sctp_assoc(epb);
241 seq_printf(seq, 335 sk = epb->sk;
242 "%8p %8p %-3d %-3d %-2d %-4d %-5d %-5d ", 336 seq_printf(seq,
243 assoc, sk, sctp_sk(sk)->type, sk->sk_state, 337 "%8p %8p %-3d %-3d %-2d %-4d %4d %8d %8d %7d %5lu %-5d %5d ",
244 assoc->state, hash, epb->bind_addr.port, 338 assoc, sk, sctp_sk(sk)->type, sk->sk_state,
245 assoc->peer.port); 339 assoc->state, hash-1, assoc->assoc_id,
246 sctp_seq_dump_local_addrs(seq, epb); 340 (sk->sk_rcvbuf - assoc->rwnd),
247 seq_printf(seq, "<-> "); 341 assoc->sndbuf_used,
248 sctp_seq_dump_remote_addrs(seq, assoc); 342 sock_i_uid(sk), sock_i_ino(sk),
249 seq_printf(seq, "\n"); 343 epb->bind_addr.port,
250 } 344 assoc->peer.port);
251 read_unlock(&head->lock); 345
346 seq_printf(seq, " ");
347 sctp_seq_dump_local_addrs(seq, epb);
348 seq_printf(seq, "<-> ");
349 sctp_seq_dump_remote_addrs(seq, assoc);
350 seq_printf(seq, "\n");
252 } 351 }
352 read_unlock(&head->lock);
353 sctp_local_bh_enable();
253 354
254 return 0; 355 return 0;
255} 356}
256 357
358static struct seq_operations sctp_assoc_ops = {
359 .start = sctp_assocs_seq_start,
360 .next = sctp_assocs_seq_next,
361 .stop = sctp_assocs_seq_stop,
362 .show = sctp_assocs_seq_show,
363};
364
257/* Initialize the seq file operations for 'assocs' object. */ 365/* Initialize the seq file operations for 'assocs' object. */
258static int sctp_assocs_seq_open(struct inode *inode, struct file *file) 366static int sctp_assocs_seq_open(struct inode *inode, struct file *file)
259{ 367{
260 return single_open(file, sctp_assocs_seq_show, NULL); 368 return seq_open(file, &sctp_assoc_ops);
261} 369}
262 370
263static struct file_operations sctp_assocs_seq_fops = { 371static struct file_operations sctp_assocs_seq_fops = {
264 .open = sctp_assocs_seq_open, 372 .open = sctp_assocs_seq_open,
265 .read = seq_read, 373 .read = seq_read,
266 .llseek = seq_lseek, 374 .llseek = seq_lseek,
267 .release = single_release, 375 .release = seq_release,
268}; 376};
269 377
270/* Set up the proc fs entry for 'assocs' object. */ 378/* Set up the proc fs entry for 'assocs' object. */
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index 2e1f9c3556f5..5135e1a25d25 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -378,10 +378,13 @@ static int sctp_v4_available(union sctp_addr *addr, struct sctp_sock *sp)
378{ 378{
379 int ret = inet_addr_type(addr->v4.sin_addr.s_addr); 379 int ret = inet_addr_type(addr->v4.sin_addr.s_addr);
380 380
381 /* FIXME: ip_nonlocal_bind sysctl support. */
382 381
383 if (addr->v4.sin_addr.s_addr != INADDR_ANY && ret != RTN_LOCAL) 382 if (addr->v4.sin_addr.s_addr != INADDR_ANY &&
383 ret != RTN_LOCAL &&
384 !sp->inet.freebind &&
385 !sysctl_ip_nonlocal_bind)
384 return 0; 386 return 0;
387
385 return 1; 388 return 1;
386} 389}
387 390
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 0b338eca6dc0..2a3c0e08a090 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -4686,6 +4686,7 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk,
4686 struct sctp_endpoint *newep = newsp->ep; 4686 struct sctp_endpoint *newep = newsp->ep;
4687 struct sk_buff *skb, *tmp; 4687 struct sk_buff *skb, *tmp;
4688 struct sctp_ulpevent *event; 4688 struct sctp_ulpevent *event;
4689 int flags = 0;
4689 4690
4690 /* Migrate socket buffer sizes and all the socket level options to the 4691 /* Migrate socket buffer sizes and all the socket level options to the
4691 * new socket. 4692 * new socket.
@@ -4707,6 +4708,17 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk,
4707 sctp_sk(newsk)->bind_hash = pp; 4708 sctp_sk(newsk)->bind_hash = pp;
4708 inet_sk(newsk)->num = inet_sk(oldsk)->num; 4709 inet_sk(newsk)->num = inet_sk(oldsk)->num;
4709 4710
4711 /* Copy the bind_addr list from the original endpoint to the new
4712 * endpoint so that we can handle restarts properly
4713 */
4714 if (assoc->peer.ipv4_address)
4715 flags |= SCTP_ADDR4_PEERSUPP;
4716 if (assoc->peer.ipv6_address)
4717 flags |= SCTP_ADDR6_PEERSUPP;
4718 sctp_bind_addr_copy(&newsp->ep->base.bind_addr,
4719 &oldsp->ep->base.bind_addr,
4720 SCTP_SCOPE_GLOBAL, GFP_KERNEL, flags);
4721
4710 /* Move any messages in the old socket's receive queue that are for the 4722 /* Move any messages in the old socket's receive queue that are for the
4711 * peeled off association to the new socket's receive queue. 4723 * peeled off association to the new socket's receive queue.
4712 */ 4724 */
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
index 84b0bbddbd22..aae66144d411 100644
--- a/sound/usb/usbaudio.c
+++ b/sound/usb/usbaudio.c
@@ -3289,7 +3289,7 @@ static void snd_usb_audio_disconnect(struct usb_device *dev, void *ptr)
3289 } 3289 }
3290 usb_chip[chip->index] = NULL; 3290 usb_chip[chip->index] = NULL;
3291 up(&register_mutex); 3291 up(&register_mutex);
3292 snd_card_free_in_thread(card); 3292 snd_card_free(card);
3293 } else { 3293 } else {
3294 up(&register_mutex); 3294 up(&register_mutex);
3295 } 3295 }
diff --git a/sound/usb/usx2y/usbusx2y.c b/sound/usb/usx2y/usbusx2y.c
index b06a267e5dac..89ee8b732013 100644
--- a/sound/usb/usx2y/usbusx2y.c
+++ b/sound/usb/usx2y/usbusx2y.c
@@ -1,6 +1,11 @@
1/* 1/*
2 * usbusy2y.c - ALSA USB US-428 Driver 2 * usbusy2y.c - ALSA USB US-428 Driver
3 * 3 *
42005-04-14 Karsten Wiese
5 Version 0.8.7.2:
6 Call snd_card_free() instead of snd_card_free_in_thread() to prevent oops with dead keyboard symptom.
7 Tested ok with kernel 2.6.12-rc2.
8
42004-12-14 Karsten Wiese 92004-12-14 Karsten Wiese
5 Version 0.8.7.1: 10 Version 0.8.7.1:
6 snd_pcm_open for rawusb pcm-devices now returns -EBUSY if called without rawusb's hwdep device being open. 11 snd_pcm_open for rawusb pcm-devices now returns -EBUSY if called without rawusb's hwdep device being open.
@@ -143,7 +148,7 @@
143 148
144 149
145MODULE_AUTHOR("Karsten Wiese <annabellesgarden@yahoo.de>"); 150MODULE_AUTHOR("Karsten Wiese <annabellesgarden@yahoo.de>");
146MODULE_DESCRIPTION("TASCAM "NAME_ALLCAPS" Version 0.8.7.1"); 151MODULE_DESCRIPTION("TASCAM "NAME_ALLCAPS" Version 0.8.7.2");
147MODULE_LICENSE("GPL"); 152MODULE_LICENSE("GPL");
148MODULE_SUPPORTED_DEVICE("{{TASCAM(0x1604), "NAME_ALLCAPS"(0x8001)(0x8005)(0x8007) }}"); 153MODULE_SUPPORTED_DEVICE("{{TASCAM(0x1604), "NAME_ALLCAPS"(0x8001)(0x8005)(0x8007) }}");
149 154
@@ -430,8 +435,6 @@ static void usX2Y_usb_disconnect(struct usb_device* device, void* ptr)
430 if (ptr) { 435 if (ptr) {
431 usX2Ydev_t* usX2Y = usX2Y((snd_card_t*)ptr); 436 usX2Ydev_t* usX2Y = usX2Y((snd_card_t*)ptr);
432 struct list_head* p; 437 struct list_head* p;
433 if (usX2Y->chip_status == USX2Y_STAT_CHIP_HUP) // on 2.6.1 kernel snd_usbmidi_disconnect()
434 return; // calls us back. better leave :-) .
435 usX2Y->chip.shutdown = 1; 438 usX2Y->chip.shutdown = 1;
436 usX2Y->chip_status = USX2Y_STAT_CHIP_HUP; 439 usX2Y->chip_status = USX2Y_STAT_CHIP_HUP;
437 usX2Y_unlinkSeq(&usX2Y->AS04); 440 usX2Y_unlinkSeq(&usX2Y->AS04);
@@ -443,7 +446,7 @@ static void usX2Y_usb_disconnect(struct usb_device* device, void* ptr)
443 } 446 }
444 if (usX2Y->us428ctls_sharedmem) 447 if (usX2Y->us428ctls_sharedmem)
445 wake_up(&usX2Y->us428ctls_wait_queue_head); 448 wake_up(&usX2Y->us428ctls_wait_queue_head);
446 snd_card_free_in_thread((snd_card_t*)ptr); 449 snd_card_free((snd_card_t*)ptr);
447 } 450 }
448} 451}
449 452