http://linux.bkbits.net/linux-2.5 bastian@waldi.eu.org[torvalds]|ChangeSet|20041004000346|37496 bastian # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/03 17:03:46-07:00 bastian@waldi.eu.org # [PATCH] s390: sclp compile fix # # The attached patch makes s390 sclp driver buildable again. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/s390/char/sclp_vt220.c # 2004/10/03 16:53:54-07:00 bastian@waldi.eu.org +1 -1 # s390: sclp compile fix # # drivers/s390/char/sclp_tty.c # 2004/10/03 16:53:54-07:00 bastian@waldi.eu.org +1 -1 # s390: sclp compile fix # # ChangeSet # 2004/10/03 22:47:53+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2121/1: S3C2410 - add S3C2410_MISCCR definitions for power down config # # Patch from Ben Dooks # # Add definitions to the MISCCR register for configuration # of the signal states in power down mode. # # Signed-off-by: Ben Dooks # # include/asm-arm/arch-s3c2410/regs-gpio.h # 2004/10/03 17:16:41+01:00 ben-linux@org.rmk.(none) +5 -0 # [PATCH] 2121/1: S3C2410 - add S3C2410_MISCCR definitions for power down config # # ChangeSet # 2004/10/03 22:40:37+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2120/1: S3C2410 - include/asm-arm/arch-s3c2410/regs-iic.h # # Patch from Ben Dooks # # Include file include/asm-arm/arch-s3c2410/regs-iic.h, # for the I2C controller on the S3C2410 Samsung SoC. # # Signed-off-by: Ben Dooks # # include/asm-arm/arch-s3c2410/regs-iic.h # 2004/10/03 17:03:15+01:00 ben-linux@org.rmk.(none) +50 -0 # [PATCH] 2120/1: S3C2410 - include/asm-arm/arch-s3c2410/regs-iic.h # # include/asm-arm/arch-s3c2410/regs-iic.h # 2004/10/03 17:03:15+01:00 ben-linux@org.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-s3c2410/regs-iic.h # # ChangeSet # 2004/10/03 22:34:46+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2119/1: S3C2410 - include/asm-arm/arch-s3c2410/regs-mem.h # # Patch from Ben Dooks # # Header file include/asm-arm/arch-s3c2410/regs-mem.h containing # definitions for the S3C2410 memory controller # # Signed-off-by: Ben Dooks # # include/asm-arm/arch-s3c2410/regs-mem.h # 2004/10/01 10:34:18+01:00 ben-linux@org.rmk.(none) +190 -0 # [PATCH] 2119/1: S3C2410 - include/asm-arm/arch-s3c2410/regs-mem.h # # include/asm-arm/arch-s3c2410/regs-mem.h # 2004/10/01 10:34:18+01:00 ben-linux@org.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-s3c2410/regs-mem.h # # ChangeSet # 2004/10/03 22:28:36+01:00 dave.jiang@com.rmk.(none) # [ARM PATCH] 2117/1: Fix ATU config on IQ80331 to prevent master aborts, replace 2099/1 # # Patch from Dave Jiang # # Latest IQ80331 redboot changed value of ATU registers and is causing master aborts on the plugged in card. Changing value back to previous sane state for Linux. # # Signed-off-by: Dave Jiang (dave.jiang@gmail.com) # # Patch in replacement of 2099/1 due to formatting problems. # # arch/arm/mach-iop3xx/iop331-pci.c # 2004/10/01 16:38:29+01:00 dave.jiang@com.rmk.(none) +4 -6 # [PATCH] 2117/1: Fix ATU config on IQ80331 to prevent master aborts, replace 2099/1 # # ChangeSet # 2004/10/03 22:20:42+01:00 rmk@flint.arm.linux.org.uk # [ARM] clk_* functions take frequencies in Hz not kHz # # include/asm-arm/hardware/clock.h # 2004/10/03 22:18:09+01:00 rmk@flint.arm.linux.org.uk +4 -4 # clk_* takes frequencies in Hz not kHz # # drivers/video/amba-clcd.c # 2004/10/03 22:18:09+01:00 rmk@flint.arm.linux.org.uk +1 -1 # clk_* takes frequencies in Hz not kHz # # arch/arm/mach-versatile/clock.c # 2004/10/03 22:18:09+01:00 rmk@flint.arm.linux.org.uk +2 -2 # clk_* takes frequencies in Hz not kHz # # arch/arm/mach-integrator/clock.c # 2004/10/03 22:18:09+01:00 rmk@flint.arm.linux.org.uk +6 -3 # clk_* takes frequencies in Hz not kHz # # ChangeSet # 2004/10/03 21:58:34+01:00 rmk@flint.arm.linux.org.uk # [ARM] Add POSIX message queue and waitid syscalls. # # include/asm-arm/unistd.h # 2004/10/03 21:56:25+01:00 rmk@flint.arm.linux.org.uk +7 -0 # Add __NR_mq_* and __NR_waitid # # arch/arm/kernel/calls.S # 2004/10/03 21:56:24+01:00 rmk@flint.arm.linux.org.uk +8 -1 # Add sys_mq_* and sys_waitid # # ChangeSet # 2004/10/03 21:46:48+01:00 rmk@flint.arm.linux.org.uk # [ARM] mach-types update. # # arch/arm/tools/mach-types # 2004/10/03 21:44:02+01:00 rmk@flint.arm.linux.org.uk +32 -3 # Update mach-types. # # ChangeSet # 2004/10/03 21:09:31+01:00 rmk@flint.arm.linux.org.uk # [ARM] Remove "%?" from within macros containing assembly. # # Some compilers seem to get "%?" wrong in macros. # # include/asm-arm/system.h # 2004/10/03 21:07:09+01:00 rmk@flint.arm.linux.org.uk +4 -2 # Some compilers seem to get "%?" wrong. Try to avoid it in macros # containing assembly. # # include/asm-arm/bitops.h # 2004/10/03 21:07:08+01:00 rmk@flint.arm.linux.org.uk +1 -1 # Some compilers seem to get "%?" wrong. Try to avoid it in macros # containing assembly. # # ChangeSet # 2004/10/03 20:46:58+01:00 rmk@flint.arm.linux.org.uk # [ARM] Check access permissions for whole of signal stack frame. # # We really need to check that we have access to the whole of the # signal frame when we allocate it, rather than "most of it" when # we have iWMMXt extensions selected. # # arch/arm/kernel/signal.c # 2004/10/03 20:44:11+01:00 rmk@flint.arm.linux.org.uk +12 -3 # Move access_ok check inside get_sigframe - get_sigframe knows the # real size of the signal stack frame. # # ChangeSet # 2004/10/03 20:36:58+01:00 rmk@flint.arm.linux.org.uk # [ARM] Fix consistent.c for DMA allocations. # # - Use ISA_DMA_THRESHOLD as the mask for GFP_DMA allocations. # - Don't allow DMA allocations which are for a "smaller" mask than # ISA_DMA_THRESHOLD. # - Ensure that "handle" is initialised to our error value when # returning an error. # # arch/arm/mm/consistent.c # 2004/10/03 20:34:13+01:00 rmk@flint.arm.linux.org.uk +23 -7 # Use ISA_DMA_THRESHOLD as the mask for GFP_DMA allocations. # Don't allow DMA allocations which are for a "smaller" mask than # ISA_DMA_THRESHOLD. # Ensure that "handle" is initialised to our error value when # returning an error. # # ChangeSet # 2004/10/03 20:13:48+01:00 rmk@flint.arm.linux.org.uk # [ARM] Add "noirqdebug" option to match x86 option. # # arch/arm/kernel/irq.c # 2004/10/03 20:11:35+01:00 rmk@flint.arm.linux.org.uk +10 -1 # Add "noirqdebug" option to turn off IRQ debugging. # # ChangeSet # 2004/10/03 19:57:03+01:00 rmk@flint.arm.linux.org.uk # [ARM] ecard.c locking and wait_event_interruptible() fix # # Add locking for use of kecardd services. # Use wait_event_interruptible() rather htan interruptible_sleep_on(). # # arch/arm/kernel/ecard.c # 2004/10/03 19:54:29+01:00 rmk@flint.arm.linux.org.uk +7 -12 # Add kecardd locking. # Use wait_event_interruptible() rather than interruptible_sleep_on() # # ChangeSet # 2004/10/03 11:04:37-07:00 roland@topspin.com # [PATCH] ppc64: fix cross-compilation # # After the "ppc64 monster cleanup," I get # # powerpc-750-linux-gnu-strip: vmlinux: File format not recognized # # from my ppc32 strip command when cross-compiling a ppc64 kernel, since # vmlinux is a 64-bit ELF file. This patch fixes my build (and the # resulting kernel boots fine). # # Signed-off-by: Roland Dreier # Signed-off-by: Linus Torvalds # # arch/ppc64/boot/Makefile # 2004/10/03 10:23:50-07:00 roland@topspin.com +1 -2 # ppc64: fix cross-compilation # # ChangeSet # 2004/10/03 09:51:43-07:00 davidel@xmailserver.org # [PATCH] Avoid unnecessary copy for EPOLL_CTL_DEL # # Ulrich Drepper points out that EPOLL_CTL_DEL doesn't need to copy any of # the hash events. # # Also, we should specify in the man pages that a NULL is allowed in # EPOLL_CTL_DEL. Currently it does not say that. # # Also, starting from when epoll uses rbtrees instead of hashes, the # 'size' hint passed to epoll_create(2) is no more used. But since an API # change has clearly to be excluded, I guess it'll stay as is. # # Signed-off-by: Davide Libenzi # Signed-off-by: Linus Torvalds # # fs/eventpoll.c # 2004/10/03 09:02:27-07:00 davidel@xmailserver.org +5 -1 # Avoid unnecessary copy for EPOLL_CTL_DEL # # ChangeSet # 2004/10/03 09:51:31-07:00 jeffpc@optonline.net # [PATCH] Add DEVPATH env variable to hotplug helper call # # Add $DEVPATH to the environmental variables during /sbin/hotplug call. # # Signed-off-by: Josef 'Jeff' Sipek # Signed-off-by: Linus Torvalds # # kernel/cpu.c # 2004/09/24 10:08:57-07:00 jeffpc@optonline.net +4 -3 # Add DEVPATH env variable to hotplug helper call # # ChangeSet # 2004/10/03 09:51:20-07:00 jeffpc@optonline.net # [PATCH] Use proper sysfs mount-point in documentation # # Signed-off-by: Josef "Jeff" Sipek # Signed-off-by: Linus Torvalds # # Documentation/firmware_class/hotplug-script # 2004/09/24 10:08:57-07:00 jeffpc@optonline.net +2 -2 # Use proper sysfs mount-point in documentation # # ChangeSet # 2004/10/03 09:41:05-07:00 schwab@suse.de # [PATCH] Properly recognize PowerMac7,3 # # Make the PowerMac7,3 no longer unknown. # # Signed-off-by: Andreas Schwab # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pmac_feature.c # 2004/10/03 05:17:03-07:00 schwab@suse.de +4 -0 # Properly recognize PowerMac7,3 # # ChangeSet # 2004/10/03 09:35:52-07:00 alan@lxorguk.ukuu.org.uk # [PATCH] usb: hcd locking fix # # Missing up() on an error path. # # Cc: Greg KH # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/usb/core/hcd.c # 2004/10/02 23:14:39-07:00 alan@lxorguk.ukuu.org.uk +1 -0 # usb: hcd locking fix # # ChangeSet # 2004/10/03 09:19:35-07:00 jonsmirl@gmail.com # [PATCH] document DRM ioctl use # # Document DRM's usage of 'd' as its ioctl identifier. This can't be # changed, it is in every X server. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/ioctl-number.txt # 2004/10/02 21:05:10-07:00 jonsmirl@gmail.com +1 -0 # document DRM ioctl use # # ChangeSet # 2004/10/03 09:19:23-07:00 ecashin@coraid.com # [PATCH] fix block layer ioctl bug # # If the blockdev doesn't implement BLKFLSBUF and returns -ENOTTY we should # still go ahead and perform the VFS-level sync. We need to test for both # ENOTTY and EINVAL because some SCSI drivers incorrectly return EINVAL. # # Signed-off-by: Ed L Cashin # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/block/ioctl.c # 2004/10/02 21:05:10-07:00 ecashin@coraid.com +2 -1 # fix block layer ioctl bug # # ChangeSet # 2004/10/03 09:19:11-07:00 rddunlap@osdl.org # [PATCH] doc: remove lingering PC-9800 param. # # Remove lingering PC-9800 doc. # # Signed-off-by: Randy Dunlap # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/kernel-parameters.txt # 2004/10/02 21:05:10-07:00 rddunlap@osdl.org +0 -3 # doc: remove lingering PC-9800 param. # # ChangeSet # 2004/10/03 09:18:59-07:00 janitor@sternwelten.at # [PATCH] msleep_interruptible(): fix whitespace # # thanks Xu for noticing, some whitespace found it's way there. # clean that up. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/timer.c # 2004/10/02 21:05:10-07:00 janitor@sternwelten.at +6 -6 # msleep_interruptible(): fix whitespace # # ChangeSet # 2004/10/03 09:18:47-07:00 alan@redhat.com # [PATCH] Fix up tty patch problem with pc300 and clean up braces # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/net/wan/pc300_tty.c # 2004/10/02 21:05:10-07:00 alan@redhat.com +9 -10 # Fix up tty patch problem with pc300 and clean up braces # # ChangeSet # 2004/10/03 09:18:35-07:00 alan@redhat.com # [PATCH] Fix Kconfig for EDD # # EDD fails with ACARD scsi devices present (hang on the 16bit bios call at # boot) # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/firmware/Kconfig # 2004/10/02 21:05:10-07:00 alan@redhat.com +3 -2 # Fix Kconfig for EDD # # ChangeSet # 2004/10/03 09:18:23-07:00 alan@redhat.com # [PATCH] scsi docs fix # # People have had a long time to change and be aware of the correct return. # Some drivers now generate the correct return too. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/scsi/scsi_mid_low_api.txt # 2004/10/02 21:05:10-07:00 alan@redhat.com +0 -4 # scsi docs fix # # ChangeSet # 2004/10/03 09:18:11-07:00 hugh@veritas.com # [PATCH] overcommit documentation fix # # Signed-off-by: Hugh Dickins # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/sysctl/vm.txt # 2004/10/02 21:05:09-07:00 hugh@veritas.com +1 -1 # overcommit documentation fix # # ChangeSet # 2004/10/03 09:17:59-07:00 dsaxena@plexity.net # [PATCH] Updated IXP4xx MTD driver from CVS (v1.6) # # Following patch updates the IXP4xx MTD driver with the latest # version from MTD CVS. # # Signed-Off-By: David Woodhouse # Signed-off-by: Deepak Saxena # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/mtd/maps/ixp4xx.c # 2004/10/02 21:05:09-07:00 dsaxena@plexity.net +20 -4 # Updated IXP4xx MTD driver from CVS (v1.6) # # ChangeSet # 2004/10/03 09:17:47-07:00 takata@linux-m32r.org # [PATCH] m32r: change to use temporary register variables # # I made a patch to upgrade some header files for m32r. # # - Change to use temporary register variables allocated by the compiler, # instead of fiexd register varialbes. # - Change __inline__ to inline. # # Signed-off-by: Hirokazu Takata # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-m32r/spinlock.h # 2004/10/02 21:05:09-07:00 takata@linux-m32r.org +105 -94 # m32r: change to use temporary register variables # # include/asm-m32r/semaphore.h # 2004/10/02 21:05:09-07:00 takata@linux-m32r.org +33 -85 # m32r: change to use temporary register variables # # include/asm-m32r/bitops.h # 2004/10/02 21:05:09-07:00 takata@linux-m32r.org +80 -76 # m32r: change to use temporary register variables # # ChangeSet # 2004/10/03 09:17:35-07:00 takata@linux-m32r.org # [PATCH] m32r: architecture upgrade on 20040928 # # Miscellaneous upgrade for recent m32r kernel changes. # # * arch/m32r/kernel/entry.S: # Add system calls; taken from asm-i386/unistd.h. # - [PATCH][2/6] perfctr-2.7.3 for 2.6.7-rc1-mm1: i386 (05/31/2004) # - [PATCH] Make key management use syscalls not prctls (09/06/2004) # # * arch/m32r/kernel/io_m32102.c: Remove. # This file is no longer used. Please remove this file. # # * arch/m32r/kernel/irq.c: # - Fix the unnecessary entropy call in the irq handler. # # * arch/m32r/kernel/signal.c: # - Merge common signal handling fault handling in generic code; # use force_sigsegv() instead of force_sig(). # # * arch/m32r/kernel/smp.c: # - Just add brackets. # # * include/asm-m32r/hardirq.h: # - factor out common code # # Signed-off-by: Hirokazu Takata # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-m32r/hardirq.h # 2004/10/02 21:05:09-07:00 takata@linux-m32r.org +5 -25 # m32r: architecture upgrade on 20040928 # # arch/m32r/kernel/smp.c # 2004/10/02 21:05:09-07:00 takata@linux-m32r.org +2 -1 # m32r: architecture upgrade on 20040928 # # arch/m32r/kernel/signal.c # 2004/10/02 21:05:09-07:00 takata@linux-m32r.org +2 -9 # m32r: architecture upgrade on 20040928 # # arch/m32r/kernel/irq.c # 2004/10/02 21:05:09-07:00 takata@linux-m32r.org +5 -3 # m32r: architecture upgrade on 20040928 # # arch/m32r/kernel/entry.S # 2004/10/02 21:05:09-07:00 takata@linux-m32r.org +10 -0 # m32r: architecture upgrade on 20040928 # # ChangeSet # 2004/10/03 09:17:24-07:00 takata@linux-m32r.org # [PATCH] m32r: update comments for Renesas # # Here is a patch to update comments for Renesas. # The M32R processor is a product of Renesas Technology Corporation now. # # * arch/m32r/kernel/setup.c: # - Change from "MITSUBISHI" to "Renesas" # - Remove RCS ID. # * arch/m32r/kernel/setup_m32700ut.c: ditto. # * arch/m32r/kernel/setup_mappi.c: ditto. # # * arch/m32r/kernel/setup_mappi2.c: # - Remove RCS ID. # * arch/m32r/kernel/setup_oaks32r.c: ditto. # * arch/m32r/kernel/setup_opsput.c: ditto. # * arch/m32r/kernel/setup_usrv.c: ditto. # # * include/asm-m32r/m32102.h: # - Add copyright statement of Renesas # - Remove RCS ID. # * include/asm-m32r/m32r.h: ditto. # * include/asm-m32r/m32r_mp_fpga.h: ditto. # # Signed-off-by: Hirokazu Takata # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-m32r/m32r_mp_fpga.h # 2004/10/02 21:05:09-07:00 takata@linux-m32r.org +4 -4 # m32r: update comments for Renesas # # include/asm-m32r/m32r.h # 2004/10/02 21:05:09-07:00 takata@linux-m32r.org +3 -4 # m32r: update comments for Renesas # # include/asm-m32r/m32102.h # 2004/10/02 21:05:09-07:00 takata@linux-m32r.org +4 -3 # m32r: update comments for Renesas # # arch/m32r/kernel/setup_usrv.c # 2004/10/02 21:05:09-07:00 takata@linux-m32r.org +0 -4 # m32r: update comments for Renesas # # arch/m32r/kernel/setup_opsput.c # 2004/10/02 21:05:09-07:00 takata@linux-m32r.org +0 -2 # m32r: update comments for Renesas # # arch/m32r/kernel/setup_oaks32r.c # 2004/10/02 21:05:09-07:00 takata@linux-m32r.org +0 -4 # m32r: update comments for Renesas # # arch/m32r/kernel/setup_mappi2.c # 2004/10/02 21:05:09-07:00 takata@linux-m32r.org +0 -4 # m32r: update comments for Renesas # # arch/m32r/kernel/setup_mappi.c # 2004/10/02 21:05:09-07:00 takata@linux-m32r.org +1 -5 # m32r: update comments for Renesas # # arch/m32r/kernel/setup_m32700ut.c # 2004/10/02 21:05:09-07:00 takata@linux-m32r.org +1 -3 # m32r: update comments for Renesas # # arch/m32r/kernel/setup.c # 2004/10/02 21:05:09-07:00 takata@linux-m32r.org +1 -1 # m32r: update comments for Renesas # # ChangeSet # 2004/10/03 09:17:12-07:00 yuasa@hh.iij4u.or.jp # [PATCH] mips: added interrupt control routines for vrc4173 # # This change had added interrupt control routines for vrc4173. # # Cc: Ralf Baechle # Signed-off-by: Yoichi Yuasa # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-mips/vr41xx/vrc4173.h # 2004/10/02 21:05:09-07:00 yuasa@hh.iij4u.or.jp +106 -0 # mips: added interrupt control routines for vrc4173 # # arch/mips/vr41xx/common/vrc4173.c # 2004/10/02 21:05:09-07:00 yuasa@hh.iij4u.or.jp +90 -0 # mips: added interrupt control routines for vrc4173 # # ChangeSet # 2004/10/03 09:17:00-07:00 yuasa@hh.iij4u.or.jp # [PATCH] mips: added CPU type checking to interrupt control routines # # This change had added CPU type checking to interrupt control routines. # # Cc: Ralf Baechle # Signed-off-by: Yoichi Yuasa # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/mips/vr41xx/common/icu.c # 2004/10/02 21:05:08-07:00 yuasa@hh.iij4u.or.jp +132 -82 # mips: added CPU type checking to interrupt control routines # # ChangeSet # 2004/10/03 09:16:48-07:00 nickpiggin@yahoo.com.au # [PATCH] vm: prevent kswapd pageout priority windup # # Now that we are correctly kicking off kswapd early (before the synch # reclaim watermark), it is really doing asynchronous pageout. This has # exposed a latent problem where allocators running at the same time will # make kswapd think it is getting into trouble, and cause too much swapping # and suboptimal behaviour. # # This patch changes the kswapd scanning algorithm to use the same metrics # for measuring pageout success as the synchronous reclaim path - namely, how # much work is required to free SWAP_CLUSTER_MAX pages. # # This should make things less fragile all round, and has the added benefit # that kswapd will continue running so long as memory is low and it is # managing to free pages, rather than going through the full priority loop, # then giving up. Should result in much better behaviour all round, # especially when there are concurrent allocators. # # akpm: the patch was confirmed to fix up the excessive swapout which Ray Bryant # has been reporting. # # Signed-off-by: Nick Piggin # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/vmscan.c # 2004/10/02 21:05:08-07:00 nickpiggin@yahoo.com.au +19 -2 # vm: prevent kswapd pageout priority windup # # ChangeSet # 2004/10/03 09:16:36-07:00 tpoynor@mvista.com # [PATCH] JFFS2 mount options discarded # # Yoann Vandoorselaere noticed an attempt to mount a JFFS2 filesystem # read-only mounts writeable instead. # # From: David Woodhouse # # and make it fix the memory leak on failure too: # # Signed-off-by: David Woodhouse # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/jffs2/super.c # 2004/10/02 21:05:08-07:00 tpoynor@mvista.com +3 -2 # JFFS2 mount options discarded # # ChangeSet # 2004/10/03 09:16:24-07:00 david@gibson.dropbear.id.au # [PATCH] ppc64: EEH checks mistakenly became no-ops # # Recent changes which removed the use of IO tokens for EEH enabled devices # had a bug, which mean we now never do EEH checks at all. # # This patch corrects the problem. # # Signed-off-by: David Gibson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/eeh.h # 2004/10/02 21:04:59-07:00 david@gibson.dropbear.id.au +16 -31 # ppc64: EEH checks mistakenly became no-ops # # ChangeSet # 2004/10/03 09:16:12-07:00 david@gibson.dropbear.id.au # [PATCH] ppc64: squash childregs warnings # # Squash a couple of "pointer from integer" warnings recently introduced. # # Signed-off-by: David Gibson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/sys_ppc32.c # 2004/10/02 21:04:59-07:00 david@gibson.dropbear.id.au +1 -1 # ppc64: squash childregs warnings # # arch/ppc64/kernel/process.c # 2004/10/02 21:04:59-07:00 david@gibson.dropbear.id.au +1 -1 # ppc64: squash childregs warnings # # ChangeSet # 2004/10/03 09:16:00-07:00 clameter@sgi.com # [PATCH] ppc: time interpolator build fix # # Remove two leftover #includes from timex.h which may cause a build failure # for ppc. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/timex.h # 2004/10/02 21:04:58-07:00 clameter@sgi.com +0 -2 # ppc: time interpolator build fix # # ChangeSet # 2004/10/03 09:15:48-07:00 linux@dominikbrodowski.de # [PATCH] cpufreq: ondemand: account iowait as idle time # # From: "Pallipadi, Venkatesh" # # This patch changes the idle time accounting in ondemand governor. # With this patch ondemand governor accounts cpu iowait time as idle time. # # Thanks to Stefan Seyfried for identifying this issue. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/cpufreq/cpufreq_ondemand.c # 2004/10/02 21:04:58-07:00 linux@dominikbrodowski.de +12 -7 # cpufreq: ondemand: account iowait as idle time # # ChangeSet # 2004/10/03 09:15:36-07:00 linux@dominikbrodowski.de # [PATCH] cpufreq: ondemand: prevent various divide underflows # # From: "Pallipadi, Venkatesh" # # Check for lower limit of latency / sampling rate, and fix divide # underflows. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/cpufreq/cpufreq_ondemand.c # 2004/10/02 21:37:15-07:00 linux@dominikbrodowski.de +19 -4 # cpufreq: ondemand: prevent various divide underflows # # ChangeSet # 2004/10/03 09:15:24-07:00 ak@suse.de # [PATCH] x86_64: Lindenhurst MSI build fix # # Fix the Lindenhurst MSI fix on x86-64 to compile again # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/smp.h # 2004/10/02 21:04:58-07:00 ak@suse.de +8 -0 # x86_64: Lindenhurst MSI build fix # # include/asm-x86_64/msi.h # 2004/10/02 21:04:58-07:00 ak@suse.de +2 -1 # x86_64: Lindenhurst MSI build fix # # ChangeSet # 2004/10/03 09:15:12-07:00 seife@suse.de # [PATCH] swsusp: fix highmem # # From: Pavel Machek # # This actually calls highmem_resume(), so swsusp has chance to work on # highmem machines. It also adds comments about code flow, which is quite # interesting at that point. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/power/swsusp.c # 2004/10/02 21:04:58-07:00 seife@suse.de +7 -0 # swsusp: fix highmem # # ChangeSet # 2004/10/03 09:15:00-07:00 akpm@osdl.org # [PATCH] sparc64: time interpolator build fix # # We need io.h for readq(). # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/timer.c # 2004/10/02 21:37:13-07:00 akpm@osdl.org +1 -0 # sparc64: time interpolator build fix # # ChangeSet # 2004/10/03 09:14:48-07:00 nickpiggin@yahoo.com.au # [PATCH] document isolcpus= boot option # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/kernel-parameters.txt # 2004/10/02 21:37:12-07:00 nickpiggin@yahoo.com.au +12 -0 # document isolcpus= boot option # # ChangeSet # 2004/10/03 09:14:36-07:00 mingo@elte.hu # [PATCH] random driver preempt robustness # # A certain codepath in the random driver relied on vt_ioctl() being under # the BKL and implicitly disabling preemption. The code wasn't buggy # upstream but it's slighly unrobust so I think we want the fix upstream too, # independently of the remove-bkl patch. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/random.c # 2004/10/02 21:04:58-07:00 mingo@elte.hu +4 -1 # random driver preempt robustness # # ChangeSet # 2004/10/03 09:14:25-07:00 prasanna@in.ibm.com # [PATCH] kprobes exception notifier fix # # This patch modifies the return value of kprobes exceptions notify handler. # The kprobes exception notifier returns NOTIFY_STOP on handling # notification. This patch helps other debuggers to co-exists with the # Kprobes. Other debuggers registered for exceptions notification must # return NOTIFY_STOP on handling the notification. # # Signed-off-by: Prasanna S Panchamukhi # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/kprobes.c # 2004/10/02 21:04:57-07:00 prasanna@in.ibm.com +3 -0 # kprobes exception notifier fix # # include/linux/notifier.h # 2004/10/02 21:04:57-07:00 prasanna@in.ibm.com +4 -0 # kprobes exception notifier fix # # arch/x86_64/kernel/traps.c # 2004/10/02 21:04:57-07:00 prasanna@in.ibm.com +10 -6 # kprobes exception notifier fix # # arch/x86_64/kernel/nmi.c # 2004/10/02 21:04:57-07:00 prasanna@in.ibm.com +2 -1 # kprobes exception notifier fix # # arch/sparc64/mm/fault.c # 2004/10/02 21:04:57-07:00 prasanna@in.ibm.com +2 -2 # kprobes exception notifier fix # # arch/sparc64/kernel/traps.c # 2004/10/02 21:04:57-07:00 prasanna@in.ibm.com +14 -14 # kprobes exception notifier fix # # arch/sparc64/kernel/kprobes.c # 2004/10/02 21:04:57-07:00 prasanna@in.ibm.com +6 -6 # kprobes exception notifier fix # # arch/i386/mm/fault.c # 2004/10/02 21:04:57-07:00 prasanna@in.ibm.com +1 -1 # kprobes exception notifier fix # # arch/i386/kernel/traps.c # 2004/10/02 21:04:57-07:00 prasanna@in.ibm.com +6 -6 # kprobes exception notifier fix # # arch/i386/kernel/kprobes.c # 2004/10/02 21:04:57-07:00 prasanna@in.ibm.com +5 -5 # kprobes exception notifier fix # # ChangeSet # 2004/10/03 09:14:13-07:00 colin@colino.net # [PATCH] use kthread_stop in therm_adt746x # # Use kthread_stop() and kthread_should_stop() instead of monitor_running and # wait_completion(). # # Signed-off-by: Colin Leroy # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/macintosh/therm_adt746x.c # 2004/10/02 21:04:57-07:00 colin@colino.net +12 -13 # use kthread_stop in therm_adt746x # # ChangeSet # 2004/10/03 09:14:01-07:00 colin@colino.net # [PATCH] therm_adt746x: don't change loadavg # # Use interruptible sleep rather than uninterruptible. # # Partially convert it to the kthread API so the kernel thread doesn't get # accidentally signalled. # # Signed-off-by: Colin Leroy # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/macintosh/therm_adt746x.c # 2004/10/02 21:37:17-07:00 colin@colino.net +3 -9 # therm_adt746x: don't change loadavg # # ChangeSet # 2004/10/03 15:52:59+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2118/1: S3C2410 - gpio updates and header file fix # # Patch from Ben Dooks # # Fix missing changelog entries in , # and erroneous EINT definitions in . # # Added s3c2410_gpio_getcfg(pin) and s3c2410_gpio_getirq(pin) # to get the current configuration of an pin, and which IRQ # (if any) maps to it. # # Signed-off-by: Ben Dooks # # include/asm-arm/arch-s3c2410/regs-gpio.h # 2004/10/01 17:31:44+01:00 ben-linux@org.rmk.(none) +4 -4 # [PATCH] 2118/1: S3C2410 - gpio updates and header file fix # # include/asm-arm/arch-s3c2410/hardware.h # 2004/10/01 17:40:26+01:00 ben-linux@org.rmk.(none) +15 -0 # [PATCH] 2118/1: S3C2410 - gpio updates and header file fix # # arch/arm/mach-s3c2410/gpio.c # 2004/10/01 17:41:02+01:00 ben-linux@org.rmk.(none) +35 -1 # [PATCH] 2118/1: S3C2410 - gpio updates and header file fix # # ChangeSet # 2004/10/03 15:47:46+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2103/1: BAST - USB power control # # Patch from Ben Dooks # # USB power control and over-current sense # # Signed-off-by: Ben Dooks # # # arch/arm/mach-s3c2410/usb-simtec.h # 2004/09/12 10:46:19+01:00 ben-linux@org.rmk.(none) +19 -0 # [PATCH] 2103/1: BAST - USB power control # # arch/arm/mach-s3c2410/usb-simtec.h # 2004/09/12 10:46:19+01:00 ben-linux@org.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-s3c2410/usb-simtec.h # # arch/arm/mach-s3c2410/mach-vr1000.c # 2004/09/12 11:36:19+01:00 ben-linux@org.rmk.(none) +3 -0 # [PATCH] 2103/1: BAST - USB power control # # arch/arm/mach-s3c2410/mach-bast.c # 2004/09/12 11:23:05+01:00 ben-linux@org.rmk.(none) +3 -0 # [PATCH] 2103/1: BAST - USB power control # # arch/arm/mach-s3c2410/Makefile # 2004/09/12 10:47:55+01:00 ben-linux@org.rmk.(none) +2 -2 # [PATCH] 2103/1: BAST - USB power control # # arch/arm/mach-s3c2410/usb-simtec.c # 2004/09/21 22:55:09+01:00 ben-linux@org.rmk.(none) +123 -0 # [PATCH] 2103/1: BAST - USB power control # # arch/arm/mach-s3c2410/usb-simtec.c # 2004/09/21 22:55:09+01:00 ben-linux@org.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-s3c2410/usb-simtec.c # # ChangeSet # 2004/10/03 15:42:39+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2101/1: S3C2410 - usb port management # # Patch from Ben Dooks # # Port power control and management for S3C2410 internal # USB controller for different boards to interface their # power control system to. # # Signed-off-by: Ben Dooks # # # include/asm-arm/arch-s3c2410/usb-control.h # 2004/09/21 22:50:10+01:00 ben-linux@org.rmk.(none) +45 -0 # [PATCH] 2101/1: S3C2410 - usb port management # # include/asm-arm/arch-s3c2410/usb-control.h # 2004/09/21 22:50:10+01:00 ben-linux@org.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-s3c2410/usb-control.h # # ChangeSet # 2004/10/03 15:34:05+01:00 sascha@de.rmk.(none) # [ARM PATCH] 2095/1: i.MX time keeping # # Patch from Sascha Hauer # # This patch fixes the i.MX timer functions: # - imx_gettimeoffset() now returns proper values # - fix timer interrupt frequency # # Signed-off-by: Sascha Hauer # # arch/arm/mach-imx/time.c # 2004/09/16 15:07:23+01:00 sascha@de.rmk.(none) +3 -3 # [PATCH] 2095/1: i.MX time keeping # # ChangeSet # 2004/10/03 08:04:47+01:00 aia21@cantab.net # NTFS: Fix another stupid bug in fs/ntfs/attrib.c::ntfs_external_attr_find() # where we forgot to unmap the extent mft record when we had finished # enumerating an attribute which caused a bug check to trigger when the # VFS calls ->clear_inode. # # Signed-off-by: Anton Altaparmakov # # fs/ntfs/attrib.c # 2004/10/03 08:03:01+01:00 aia21@cantab.net +3 -1 # Fix another stupid bug in fs/ntfs/attrib.c::ntfs_external_attr_find() # where we forgot to unmap the extent mft record when we had finished # enumerating an attribute which caused a bug check to trigger when the # VFS calls ->clear_inode. # # fs/ntfs/ChangeLog # 2004/10/03 08:02:52+01:00 aia21@cantab.net +4 -0 # Update # # Documentation/filesystems/ntfs.txt # 2004/10/03 08:02:32+01:00 aia21@cantab.net +1 -1 # Update # # ChangeSet # 2004/10/02 18:33:53-07:00 torvalds@ppc970.osdl.org # tty locking fixups: remove unused "flags" variable # # It became obsolete when the termios locking was changed # to use a per-tty semaphore. # # drivers/char/tty_ioctl.c # 2004/10/02 18:33:47-07:00 torvalds@ppc970.osdl.org +0 -1 # tty locking fixups: remove unused "flags" variable # # It became obsolete when the termios locking was changed # to use a per-tty semaphore. # # ChangeSet # 2004/10/02 17:57:48-07:00 benh@kernel.crashing.org # [PATCH] Fix booting on some recent G5s # # Some recent G5s have a problem with PCI/HT probing. They crash (machine # check) during the probe of some slot numbers, it seems to be related to # some functions beeing disabled by the firmware inside the K2 ASIC. # # This patch limits the config space accesses to devices that are present # in the OF device-tree. This fixes the problem and shouldn't "add" any # limitation. If you plug a "random" PCI card with no OF driver, the # firmware will still build a node for it with the default set of # properties created from the config space. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pmac_pci.c # 2004/08/03 17:26:07-07:00 benh@kernel.crashing.org +11 -1 # Fix booting on some recent G5s # # arch/ppc/platforms/pmac_pci.c # 2004/08/16 21:18:09-07:00 benh@kernel.crashing.org +7 -0 # Fix booting on some recent G5s # # ChangeSet # 2004/10/03 01:08:14+01:00 aia21@cantab.net # NTFS: Fix stupid bug in fs/ntfs/attrib.c::ntfs_attr_reinit_search_ctx() where # we did not clear ctx->al_entry but it was still set due to changes in # ntfs_attr_lookup() and ntfs_external_attr_find() in particular. # # Signed-off-by: Anton Altaparmakov # # Documentation/filesystems/ntfs.txt # 2004/10/03 01:06:43+01:00 aia21@cantab.net +2 -0 # Update # # fs/ntfs/Makefile # 2004/10/03 01:04:37+01:00 aia21@cantab.net +1 -1 # Update # # fs/ntfs/ChangeLog # 2004/10/03 01:04:24+01:00 aia21@cantab.net +7 -0 # Update # # fs/ntfs/attrib.c # 2004/10/03 01:01:52+01:00 aia21@cantab.net +5 -0 # Fix stupid bug in ntfs_attr_reinit_search_ctx() where we # didn't clear ctx->al_entry but it was still set due to # changes in ntfs_attr_lookup() and ntfs_external_attr_find() # in particular. # # ChangeSet # 2004/10/02 15:54:05-07:00 torvalds@ppc970.osdl.org # Fix close() vs posix lock race # # A threaded app that posix-locks and closes the same file # in two threads concurrently may result in a posix lock # that was never visible to the closer, and that thus needs # cleanup on the final fput. # # Handle it together with the regular flocks. # # fs/locks.c # 2004/10/02 15:53:59-07:00 torvalds@ppc970.osdl.org +7 -4 # Fix close() vs posix lock race # # A threaded app that posix-locks and closes the same file # in two threads concurrently may result in a posix lock # that was never visible to the closer, and that thus needs # cleanup on the final fput. # # Handle it together with the regular flocks. # # ChangeSet # 2004/10/02 15:46:35-07:00 alan@lxorguk.ukuu.org.uk # [PATCH] Update termios to use per tty semaphore # # This makes the agreed change of termios locking to be semaphore based # sleep locking. This is needed for USB in particular as it has to use # messaging to issue terminal mode changes. # # This code passes Torvalds test grades 0, 1 and 2 (it looks ok, it # compiles and it booted). It does mean that a driver cannot take an # atomic peek at termios data during an interrupt. Nobody seems to be # doing this although some of the driver receive paths for line # disciplines will eventually want to (n_tty currently doesn't do this # locked on the receive path). Since the ldisc is given a chance to copy # any essential bits on the ->set_termios path this seems not to be a # problem. # # include/linux/tty.h # 2004/10/02 15:45:22-07:00 alan@lxorguk.ukuu.org.uk +1 -0 # Update termios to use per tty semaphore # # drivers/char/tty_ioctl.c # 2004/10/02 15:45:19-07:00 alan@lxorguk.ukuu.org.uk +9 -20 # Update termios to use per tty semaphore # # drivers/char/tty_io.c # 2004/10/02 15:45:19-07:00 alan@lxorguk.ukuu.org.uk +5 -8 # Update termios to use per tty semaphore # # Documentation/tty.txt # 2004/10/02 15:45:19-07:00 alan@lxorguk.ukuu.org.uk +4 -4 # Update termios to use per tty semaphore # # ChangeSet # 2004/10/02 12:09:43-07:00 torvalds@ppc970.osdl.org # Partially undo Alan's recent tty locking fixes: the termios # lock must not be held across the driver/ldisc downcalls. # # Some drivers need to set device state (baudrate etc) and may # need to sleep. # # drivers/char/tty_ioctl.c # 2004/10/02 12:09:36-07:00 torvalds@ppc970.osdl.org +7 -1 # Partially undo Alan's recent tty locking fixes: the termios # lock must not be held across the driver/ldisc downcalls. # # Some drivers need to set device state (baudrate etc) and may # need to sleep. # # ChangeSet # 2004/10/02 10:59:55-07:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] Race with iput and umount # # Jeff Mahoney notes: # # "generic_shutdown_super() will happily call the ->put_super fs method, # destroying data structures still in use by the iput (->delete_inode) # in progress. # # The unlink path will call the ->unlink fs method, release the path # (thus dropping the reference to the vfsmount, and then call iput. # Since the vfsmount reference is dropped back to 1, a umount will # succeed, causing the superblock to be cleaned up." # # Arrgh... Here's the trivial fix: do the final "iput()" a bit earlier in # the unlink path. # # Note: all places that go to exit1: or exit: will have NULL inode, so we # are not leaking anything here and it is OK do that iput() early; indeed, # the goal of that kludge was to postpone the final iput() past the # unlocking the parent for the sake of contention if a wunch of bankers is # doing parallel unlink() on files in the same directory and normally it # would happen on dput() after vfs_unlink()) # # fs/namei.c # 2004/10/01 22:48:21-07:00 viro@parcelfarce.linux.theplanet.co.uk +2 -3 # Race with iput and umount # # ChangeSet # 2004/10/01 16:34:56-07:00 chrisw@osdl.org # [PATCH] mlockall() take mmap_sem a bit later # # In sys_mlockall(), flags validation and can_do_mlock() check don't # require holding mmap_sem. Move down_write() down a bit, and adjust # appropriately. # # Signed-off-by: Chris Wright # Signed-off-by: Linus Torvalds # # mm/mlock.c # 2004/09/29 00:22:26-07:00 chrisw@osdl.org +4 -3 # mlockall() take mmap_sem a bit later # # ChangeSet # 2004/10/01 16:34:43-07:00 chrisw@osdl.org # [PATCH] make can_do_mlock useful for mlock/mlockall # # Move the simple can_do_mlock() check before the full rlimits based # restriction checks for mlock() and mlockall(). As it is, the check # adds nothing. This has a side-effect of eliminating an unnecessary call # to can_do_mlock() on the munlockall() path. # # Signed-off-by: Chris Wright # Signed-off-by: Linus Torvalds # # mm/mlock.c # 2004/09/28 15:08:56-07:00 chrisw@osdl.org +8 -7 # make can_do_mlock useful for mlock/mlockall # # ChangeSet # 2004/10/01 16:34:31-07:00 chrisw@osdl.org # [PATCH] mlockall() check rlimit only when MCL_CURRENT is set # # Only check memlock rlimit against mm->total_vm when mlockall() flags # include MCL_CURRENT. # # Signed-off-by: Chris Wright # Signed-off-by: Linus Torvalds # # mm/mlock.c # 2004/09/28 15:03:35-07:00 chrisw@osdl.org +2 -1 # mlockall() check rlimit only when MCL_CURRENT is set # # ChangeSet # 2004/10/01 16:34:18-07:00 chrisw@osdl.org # [PATCH] mlockall(MCL_FUTURE) unlocks currently locked mappings # # Calling mlockall(MCL_FUTURE) will erroneously unlock any currently locked # mappings. Fix this up, and while we're at it, remove the essentially # unused error variable. # # Signed-off-by: Chris Wright # Signed-off-by: Linus Torvalds # # mm/mlock.c # 2004/09/28 15:27:02-07:00 chrisw@osdl.org +4 -3 # mlockall(MCL_FUTURE) unlocks currently locked mappings # # ChangeSet # 2004/10/01 15:11:57-07:00 laforge@netfilter.org # [NETFILTER]: Fix NAT helper handling of TCP window tracking info. # # Fix NAT helper code to update TCP window tracking information # if it resizes payload (and thus alrers sequence numbers). # # This patchlet was somehow lost during 2.4.x->2.6.x port of TCP # window tracking :( # # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ip_nat_helper.c # 2004/10/01 15:11:39-07:00 laforge@netfilter.org +7 -2 # [NETFILTER]: Fix NAT helper handling of TCP window tracking info. # # Fix NAT helper code to update TCP window tracking information # if it resizes payload (and thus alrers sequence numbers). # # This patchlet was somehow lost during 2.4.x->2.6.x port of TCP # window tracking :( # # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/01 15:03:41-07:00 Alexander.Stohr@gmx.de # [SPARC64]: Fix solaris emul __set_utsfield offset calculation. # # Signed-off-by: David S. Miller # # arch/sparc64/solaris/misc.c # 2004/10/01 15:03:24-07:00 Alexander.Stohr@gmx.de +3 -3 # [SPARC64]: Fix solaris emul __set_utsfield offset calculation. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/01 15:01:32-07:00 yasuyuki.kozakai@toshiba.co.jp # [IPV6]: Fix ntohs() --> htons() typo in reassembly.c # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: David S. Miller # # net/ipv6/reassembly.c # 2004/10/01 15:01:14-07:00 yasuyuki.kozakai@toshiba.co.jp +1 -1 # [IPV6]: Fix ntohs() --> htons() typo in reassembly.c # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/01 14:58:40-07:00 yoshfuji@linux-ipv6.org # [IPV6]: NEIGHBOUR: hold refcnt of net_device from proxy neighbor entries. # # Signed-off-by: Hideaki YOSHIFUJI # Signed-off-by: David S. Miller # # net/core/neighbour.c # 2004/10/01 14:58:21-07:00 yoshfuji@linux-ipv6.org +8 -0 # [IPV6]: NEIGHBOUR: hold refcnt of net_device from proxy neighbor entries. # # Signed-off-by: Hideaki YOSHIFUJI # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/01 14:50:39-07:00 davem@nuts.davemloft.net # [ATM]: Use neigh_table_{init,clear}() in clip.c # # Signed-off-by: David S. Miller # # net/atm/clip.c # 2004/10/01 14:50:07-07:00 davem@nuts.davemloft.net +14 -15 # [ATM]: Use neigh_table_{init,clear}() in clip.c # # ChangeSet # 2004/10/01 20:00:34+02:00 bzolnier@trik.(none) # [ide] Simtec BAST (EB2410ITX) / Thorcom VR1000 driver # # Patch to provide support for the following two boards: # # - Simtec BAST (EB2410ITX) # - Thorcom VR1000 # # Signed-off-by: Ben Dooks # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/arm/bast-ide.c # 2004/10/01 20:00:20+02:00 bzolnier@trik.(none) +71 -0 # [ide] Simtec BAST (EB2410ITX) / Thorcom VR1000 driver # # drivers/ide/arm/Makefile # 2004/10/01 20:00:20+02:00 bzolnier@trik.(none) +1 -0 # [ide] Simtec BAST (EB2410ITX) / Thorcom VR1000 driver # # drivers/ide/Kconfig # 2004/10/01 20:00:20+02:00 bzolnier@trik.(none) +7 -0 # [ide] Simtec BAST (EB2410ITX) / Thorcom VR1000 driver # # drivers/ide/arm/bast-ide.c # 2004/10/01 20:00:20+02:00 bzolnier@trik.(none) +0 -0 # BitKeeper file /home/bzolnier/bk/tmp-2.6/drivers/ide/arm/bast-ide.c # # ChangeSet # 2004/10/01 19:58:49+02:00 bzolnier@trik.(none) # [ide] piix: fix wrong DMA mode selected # # From: Carsten Haustein # # A bug in function piix_config_drive_xfer_rate() allows a call of # hwif->ide_dma_on(drive) without prior call of piix_config_drive_for_dma(). # This results in harddisk configured for UDMA (default?) whereas the highest # DMA mode supported by PIIX3 is MWORD2. # # This bug is supposed to be present in any 2.6.x kernel release and any # 2.4.x kernel release since 2.4.21. # # bart: this should also fix the same bug for PIIXa and PIIXb # # Fixes bugzilla bug #3473. # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/piix.c # 2004/10/01 19:58:41+02:00 bzolnier@trik.(none) +19 -24 # [ide] piix: fix wrong DMA mode selected # # ChangeSet # 2004/10/01 19:58:27+02:00 bzolnier@trik.(none) # [ide] aec62xx: remove dead DEBUG_AEC_REGS code # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/aec62xx.h # 2004/10/01 19:58:05+02:00 bzolnier@trik.(none) +0 -7 # [ide] aec62xx: remove dead DEBUG_AEC_REGS code # # drivers/ide/pci/aec62xx.c # 2004/10/01 19:58:05+02:00 bzolnier@trik.(none) +2 -45 # [ide] aec62xx: remove dead DEBUG_AEC_REGS code # # ChangeSet # 2004/10/01 19:57:32+02:00 bzolnier@trik.(none) # [ide] remove stale comment from ide-proc.c # # ide-default driver was added long time ago. # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/ide-proc.c # 2004/10/01 19:57:06+02:00 bzolnier@trik.(none) +6 -19 # [ide] remove stale comment from ide-proc.c # # ChangeSet # 2004/10/01 19:56:49+02:00 bzolnier@trik.(none) # [ide] remove dead debugging code from ide-taskfile.c # # - CONFIG_IDE_TASK_IOCTL_DEBUG cannot be defined # - function declarations are used instead of calls # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/ide-taskfile.c # 2004/10/01 19:56:37+02:00 bzolnier@trik.(none) +0 -33 # [ide] remove dead debugging code from ide-taskfile.c # # ChangeSet # 2004/10/01 19:56:04+02:00 bzolnier@trik.(none) # [ide] remove dead CMD640 debugging from ide-probe.c # # Signed-off-by: Bartlomiej Zolnierkiewicz # # include/linux/ide.h # 2004/10/01 19:55:47+02:00 bzolnier@trik.(none) +0 -7 # [ide] remove dead CMD640 debugging from ide-probe.c # # drivers/ide/pci/cmd640.c # 2004/10/01 19:55:47+02:00 bzolnier@trik.(none) +4 -2 # [ide] remove dead CMD640 debugging from ide-probe.c # # drivers/ide/ide-probe.c # 2004/10/01 19:55:47+02:00 bzolnier@trik.(none) +0 -9 # [ide] remove dead CMD640 debugging from ide-probe.c # # ChangeSet # 2004/10/01 19:54:54+02:00 bzolnier@trik.(none) # [ide] triflex: kill /proc/ide/triflex # # Fixes OOPS on two single channel controllers. # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/triflex.c # 2004/10/01 19:54:41+02:00 bzolnier@trik.(none) +0 -62 # [ide] triflex: kill /proc/ide/triflex # # ChangeSet # 2004/10/01 08:08:23-07:00 david@gibson.dropbear.id.au # [PATCH] ppc64: change bad choice of VSID_MULTIPLIER # # We recently changed the VSID allocation on PPC64 to use a new scheme # based on a multiplicative hash. It turns out our choice of multiplier # (the largest 28-bit prime) wasn't so great: with large contiguous # mappings, we can get very poor hash scattering. In particular earlier # machines (without 16M pages) which had a reasonable about of RAM (>2G # or so) wouldn't boot, because the linear mapping overflowed some hash # buckets. # # This patch changes the multiplier to something which seems to work # better (it is, rather arbitrarily, the median of the primes between # 2^27 and 2^28). Some more theory should almost certainly go into the # choice of this constant, to avoid more pathological cases. But for # now, this choice fixes a serious bug, and seems to do at least as well # at scattering as the old choice on a handful of simple testcases. # # Signed-off-by: David Gibson # Signed-off-by: Linus Torvalds # # include/asm-ppc64/mmu_context.h # 2004/10/01 01:28:02-07:00 david@gibson.dropbear.id.au +4 -5 # ppc64: change bad choice of VSID_MULTIPLIER # # include/asm-ppc64/mmu.h # 2004/10/01 01:28:02-07:00 david@gibson.dropbear.id.au +1 -1 # ppc64: change bad choice of VSID_MULTIPLIER # # arch/ppc64/kernel/head.S # 2004/10/01 01:34:49-07:00 david@gibson.dropbear.id.au +3 -3 # ppc64: change bad choice of VSID_MULTIPLIER # # ChangeSet # 2004/10/01 08:04:06-07:00 geert@linux-m68k.org # [PATCH] fix up tty fall-out # # The two patches below (compile)fix some fall-out from the tty cleanups. # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # drivers/char/moxa.c # 2004/10/01 03:43:17-07:00 geert@linux-m68k.org +2 -2 # fix up tty fall-out # # drivers/char/generic_serial.c # 2004/10/01 03:47:40-07:00 geert@linux-m68k.org +1 -1 # fix up tty fall-out # # ChangeSet # 2004/10/01 14:52:48+01:00 rmk@flint.arm.linux.org.uk # [PCMCIA] replace schedule_timeout() with msleep() # # From: # # Remove unnecessary cs_to_timeout() macro. Use msleep() instead of # schedule_timeout() to guarantee the task delays for the desired # time. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Russell King # # drivers/pcmcia/sa1100_h3600.c # 2004/10/01 14:49:42+01:00 rmk@flint.arm.linux.org.uk +2 -2 # [PATCH] replace schedule_timeout() with msleep() # # drivers/pcmcia/i82365.c # 2004/10/01 14:49:41+01:00 rmk@flint.arm.linux.org.uk +1 -2 # [PATCH] replace schedule_timeout() with msleep() # # drivers/pcmcia/ds.c # 2004/10/01 14:49:41+01:00 rmk@flint.arm.linux.org.uk +2 -2 # [PATCH] replace schedule_timeout() with msleep() # # drivers/pcmcia/cs.c # 2004/10/01 14:49:41+01:00 rmk@flint.arm.linux.org.uk +8 -18 # [PATCH] replace schedule_timeout() with msleep() # # ChangeSet # 2004/10/01 13:37:13+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2116/1: S3C2410 - s3c2410_gpio_cfgpin() mask bug # # Patch from Ben Dooks # # Fixed bug where wrong bits where being masked in the # configuration registers for the GPIO pins # # Signed-off-by: Ben Dooks # # arch/arm/mach-s3c2410/gpio.c # 2004/09/30 18:40:57+01:00 ben-linux@org.rmk.(none) +7 -9 # [PATCH] 2116/1: S3C2410 - s3c2410_gpio_cfgpin() mask bug # # ChangeSet # 2004/10/01 13:11:37+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2102/1: BAST - incorrect IRQ for USB overcurrent # # Patch from Ben Dooks # # Fix IRQ number for USB over-current on Simtec BAST # # Signed-off-by: Ben Dooks # # # include/asm-arm/arch-s3c2410/bast-irq.h # 2004/09/12 11:06:40+01:00 ben-linux@org.rmk.(none) +2 -1 # [PATCH] 2102/1: BAST - incorrect IRQ for USB overcurrent # # ChangeSet # 2004/10/01 12:46:48+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2107/1: BAST - additional serial port fixes # # Patch from Ben Dooks # # Added code to remove the serial ports registered when # the module is unloaded. # # Cleaned up ifdef'd code, and added copyright header # # Signed-off-by: Ben Dooks # # # drivers/serial/bast_sio.c # 2004/09/23 23:57:19+01:00 ben-linux@org.rmk.(none) +24 -7 # [PATCH] 2107/1: BAST - additional serial port fixes # # ChangeSet # 2004/10/01 12:37:59+01:00 catalin.marinas@com.rmk.(none) # [ARM PATCH] 2106/1: Remove the "write" assumption for Jazelle in the early_abort handler # # Patch from Catalin Marinas # # On ARM926EJ-S, the "always assume write" for Jazelle data aborts # causes Java code exit with segmentation fault every time it tries # to access a read-only page. This patch puts some restrictions on what # can be done in the Jazelle state but it allows it to run. # # Signed-off-by: Catalin Marinas # # arch/arm/mm/abort-ev5tj.S # 2004/09/15 10:41:36+01:00 catalin.marinas@com.rmk.(none) +0 -1 # [PATCH] 2106/1: Remove the "write" assumption for Jazelle in the early_abort handler # # ChangeSet # 2004/09/30 21:28:12-07:00 torvalds@evo.osdl.org # Fix up and type-annotate sis fb driver # # Some dual use type errors still exist, where the # bios mapping is type-confused. # # drivers/video/sis/sis_main.h # 2004/09/30 21:28:02-07:00 torvalds@evo.osdl.org +1 -1 # Fix up and type-annotate sis fb driver # # Some dual use type errors still exist, where the # bios mapping is type-confused. # # drivers/video/sis/sis_main.c # 2004/09/30 21:28:02-07:00 torvalds@evo.osdl.org +22 -21 # Fix up and type-annotate sis fb driver # # Some dual use type errors still exist, where the # bios mapping is type-confused. # # drivers/video/sis/sis.h # 2004/09/30 21:28:02-07:00 torvalds@evo.osdl.org +7 -7 # Fix up and type-annotate sis fb driver # # Some dual use type errors still exist, where the # bios mapping is type-confused. # # ChangeSet # 2004/09/30 20:58:53-07:00 davem@nuts.davemloft.net # [TCP]: Kill tso_{factor,mss}. # # We can just use skb_shinfo(skb)->tso_{segs,size} # directly. This also allows us to kill the # hack zone code in ip_output.c # # The original impetus for thus change was a problem # noted by John Heffner. We do not abide by the MSS # of the connection for TCP segmentation, we were using # the path MTU instead. This broke various local # network setups with TSO enabled and is fixed as a side # effect of these changes. # # Signed-off-by: David S. Miller # # net/ipv4/tcp_output.c # 2004/09/30 20:56:45-07:00 davem@nuts.davemloft.net +30 -28 # [TCP]: Kill tso_{factor,mss}. # # net/ipv4/tcp_input.c # 2004/09/30 20:56:45-07:00 davem@nuts.davemloft.net +7 -7 # [TCP]: Kill tso_{factor,mss}. # # net/ipv4/tcp.c # 2004/09/30 20:56:45-07:00 davem@nuts.davemloft.net +2 -2 # [TCP]: Kill tso_{factor,mss}. # # net/ipv4/ip_output.c # 2004/09/30 20:56:45-07:00 davem@nuts.davemloft.net +1 -14 # [TCP]: Kill tso_{factor,mss}. # # include/net/tcp.h # 2004/09/30 20:56:45-07:00 davem@nuts.davemloft.net +11 -7 # [TCP]: Kill tso_{factor,mss}. # # ChangeSet # 2004/09/30 20:09:28-07:00 davem@nuts.davemloft.net # [TCP]: Add tcp_tso_win_divisor sysctl. # # This allows control over what percentage of # the congestion window can be consumed by a # single TSO frame. # # The setting of this parameter is a choice # between burstiness and building larger TSO # frames. # # Signed-off-by: David S. Miller # # net/ipv4/tcp_output.c # 2004/09/30 20:07:20-07:00 davem@nuts.davemloft.net +19 -7 # [TCP]: Add tcp_tso_win_divisor sysctl. # # net/ipv4/sysctl_net_ipv4.c # 2004/09/30 20:07:20-07:00 davem@nuts.davemloft.net +8 -0 # [TCP]: Add tcp_tso_win_divisor sysctl. # # include/net/tcp.h # 2004/09/30 20:07:20-07:00 davem@nuts.davemloft.net +1 -0 # [TCP]: Add tcp_tso_win_divisor sysctl. # # include/linux/sysctl.h # 2004/09/30 20:07:20-07:00 davem@nuts.davemloft.net +1 -0 # [TCP]: Add tcp_tso_win_divisor sysctl. # # ChangeSet # 2004/09/30 19:58:07-07:00 torvalds@evo.osdl.org # Do trivial __iomem annotations for tridentfb.c # # A few one-liners removed hundreds of lines of warnings. # The driver was clean, just not using the proper types. # # drivers/video/tridentfb.c # 2004/09/30 19:57:57-07:00 torvalds@evo.osdl.org +4 -4 # Do trivial __iomem annotations for tridentfb.c # # A few one-liners removed hundreds of lines of warnings. # The driver was clean, just not using the proper types. # # ChangeSet # 2004/09/30 19:54:59-07:00 torvalds@evo.osdl.org # Fix up MMIO pointer types and add __iomem annotations to radeonfb.c # # It was almost correct, apart from some silly details. # # The x86 ROM probing is still wrong, and doesn't use the proper # PCI MMIO accessor functions. Sparse (correctly) warns about # it. # # drivers/video/radeonfb.c # 2004/09/30 19:54:50-07:00 torvalds@evo.osdl.org +22 -22 # Fix up MMIO pointer types and add __iomem annotations to radeonfb.c # # ChangeSet # 2004/09/30 19:44:19-07:00 torvalds@evo.osdl.org # Remove casts and add __iomem annotations to gdth driver # # drivers/scsi/gdth.h # 2004/09/30 19:44:10-07:00 torvalds@evo.osdl.org +1 -1 # Remove casts and add __iomem annotations to gdth driver # # drivers/scsi/gdth.c # 2004/09/30 19:44:10-07:00 torvalds@evo.osdl.org +59 -58 # Remove casts and add __iomem annotations to gdth driver # # ChangeSet # 2004/09/30 18:35:01-07:00 torvalds@evo.osdl.org # Fix cyclades driver types, and add __iomem annotations. # # Remove absolutely tons of totally unnecessary casts, # once the types are done right in the first place. # # The driver is still ugly as hell and needs some serious # indentation fixing, but this makes it not spew hundreds # of warnings any more. # # include/linux/cyclades.h # 2004/09/30 18:34:52-07:00 torvalds@evo.osdl.org +5 -5 # Fix cyclades driver types, and add __iomem annotations. # # Remove absolutely tons of totally unnecessary casts, # once the types are done right in the first place. # # The driver is still ugly as hell and needs some serious # indentation fixing, but this makes it not spew hundreds # of warnings any more. # # drivers/char/cyclades.c # 2004/09/30 18:34:52-07:00 torvalds@evo.osdl.org +286 -350 # Fix cyclades driver types, and add __iomem annotations. # # Remove absolutely tons of totally unnecessary casts, # once the types are done right in the first place. # # The driver is still ugly as hell and needs some serious # indentation fixing, but this makes it not spew hundreds # of warnings any more. # # ChangeSet # 2004/09/30 17:04:11-07:00 greg@kroah.com # [PATCH] USB: remove FIXME created from tty core changes in empeg driver. # # Signed-off-by: Greg Kroah-Hartman # Signed-off-by: Linus Torvalds # # drivers/usb/serial/empeg.c # 2004/09/30 16:51:44-07:00 greg@kroah.com +0 -6 # USB: remove FIXME created from tty core changes in empeg driver. # # ChangeSet # 2004/09/30 17:03:59-07:00 greg@kroah.com # [PATCH] USB: fix error in bluetty.c driver caused by tty core changes # # Signed-off-by: Greg Kroah-Hartman # Signed-off-by: Linus Torvalds # # drivers/usb/class/bluetty.c # 2004/09/30 16:51:38-07:00 greg@kroah.com +1 -2 # USB: fix error in bluetty.c driver caused by tty core changes # # ChangeSet # 2004/09/30 16:23:12-07:00 torvalds@ppc970.osdl.org # The hpet acpi driver is not __initdata. # # We register it with the ACPI layer, and it's alive long # after init. # # Noted by Bjorn Helgaas. # # drivers/char/hpet.c # 2004/09/30 16:23:05-07:00 torvalds@ppc970.osdl.org +1 -1 # The hpet acpi driver is not __initdata. # # We register it with the ACPI layer, and it's alive long # after init. # # Noted by Bjorn Helgaas. # # ChangeSet # 2004/09/30 15:49:36-07:00 davem@nuts.davemloft.net # [SUNGEM]: Fix build. # # drivers/net/sungem.c # 2004/09/30 15:49:15-07:00 davem@nuts.davemloft.net +3 -3 # [SUNGEM]: Fix build. # # ChangeSet # 2004/09/30 14:18:32-07:00 torvalds@ppc970.osdl.org # Wisdom passed down the ages on clay tablets. # # Only recently digitized for our edification. # # Documentation/ManagementStyle # 2004/09/30 14:18:25-07:00 torvalds@ppc970.osdl.org +276 -0 # Wisdom passed down the ages on clay tablets. # # Documentation/ManagementStyle # 2004/09/30 14:18:25-07:00 torvalds@ppc970.osdl.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/Documentation/ManagementStyle # # ChangeSet # 2004/09/30 12:42:29-07:00 davem@nuts.davemloft.net # [TCP]: Check correct sequence number for URG in tcp_tso_acked(). # # Noticed by Herbert Xu. # # Signed-off-by: David S. Miller # # net/ipv4/tcp_input.c # 2004/09/30 12:41:57-07:00 davem@nuts.davemloft.net +1 -1 # [TCP]: Check correct sequence number for URG in tcp_tso_acked(). # # ChangeSet # 2004/09/30 12:31:23-07:00 davem@nuts.davemloft.net # [SUNGEM]: Do not need two implementations of poll_controller, hehe. # # Signed-off-by: David S. Miller # # drivers/net/sungem.c # 2004/09/30 12:30:49-07:00 davem@nuts.davemloft.net +0 -20 # [SUNGEM]: Do not need two implementations of poll_controller, hehe. # # ChangeSet # 2004/09/30 12:16:36-07:00 shemminger@osdl.org # [PATCH] limit max jiffy of msecs_to_jiffies # # include/linux/time.h # 2004/09/30 11:46:43-07:00 shemminger@osdl.org +2 -0 # limit max jiffy of msecs_to_jiffies # # ChangeSet # 2004/09/30 18:51:37+00:00 tony.luck@intel.com # [IA64] mca.h, mca_drv.c: cleanup extern declarations # # Move extern declarations of ia64_{reg,unreg}_MCA_extension() # to mca.h. Delete declaration of ia64_mca_ucmc_other_recover_fp() # which doesn't exist. # # Patch supplied by Hidetoshi Seto. # # Signed-off-by: Tony Luck # # include/asm-ia64/mca.h # 2004/09/30 18:49:35+00:00 tony.luck@intel.com +2 -1 # cleanup extern definitions # # arch/ia64/kernel/mca_drv.c # 2004/09/30 18:49:35+00:00 tony.luck@intel.com +0 -2 # cleanup extern definitions # # ChangeSet # 2004/09/30 18:51:15+00:00 seto.hidetoshi@jp.fujitsu.com # [IA64] Recovery from user-mode memory error # # This is the latest/Updated OS_MCA handler which try to do recovery # from multibit-ECC/poisoned memory-read error on user-land. # (Thank you very much for comments, Keith and Grant!) # # I'd still appreciate it if anyone having good test environment # could apply my patch and could report how it works. # (especially reports on non-Tiger/non-Intel platform are welcome.) # # Signed-off-by: Hidetoshi Seto # Signed-off-by: Tony Luck # # arch/ia64/kernel/mca_drv_asm.S # 2004/09/30 18:49:13+00:00 seto.hidetoshi@jp.fujitsu.com +45 -0 # BitKeeper file /data/home/aegl/BK/work/seto2/arch/ia64/kernel/mca_drv_asm.S # # arch/ia64/kernel/mca_drv.h # 2004/09/30 18:49:13+00:00 seto.hidetoshi@jp.fujitsu.com +113 -0 # BitKeeper file /data/home/aegl/BK/work/seto2/arch/ia64/kernel/mca_drv.h # # include/asm-ia64/mca.h # 2004/09/30 18:49:13+00:00 seto.hidetoshi@jp.fujitsu.com +6 -0 # MCA 2xECC memory errors # # arch/ia64/kernel/mca_drv_asm.S # 2004/09/30 18:49:13+00:00 seto.hidetoshi@jp.fujitsu.com +0 -0 # BitKeeper file /data/home/aegl/BK/work/seto.merge/arch/ia64/kernel/mca_drv_asm.S # # arch/ia64/kernel/mca_drv.h # 2004/09/30 18:49:13+00:00 seto.hidetoshi@jp.fujitsu.com +0 -0 # BitKeeper file /data/home/aegl/BK/work/seto.merge/arch/ia64/kernel/mca_drv.h # # arch/ia64/kernel/mca_drv.c # 2004/09/30 18:49:13+00:00 seto.hidetoshi@jp.fujitsu.com +641 -0 # BitKeeper file /data/home/aegl/BK/work/seto2/arch/ia64/kernel/mca_drv.c # # arch/ia64/kernel/mca.c # 2004/09/30 18:49:13+00:00 seto.hidetoshi@jp.fujitsu.com +35 -6 # MCA 2xECC memory errors # # arch/ia64/kernel/Makefile # 2004/09/30 18:49:13+00:00 seto.hidetoshi@jp.fujitsu.com +2 -0 # MCA 2xECC memory errors # # arch/ia64/Kconfig # 2004/09/30 18:49:13+00:00 seto.hidetoshi@jp.fujitsu.com +3 -0 # MCA 2xECC memory errors # # arch/ia64/kernel/mca_drv.c # 2004/09/30 18:49:13+00:00 seto.hidetoshi@jp.fujitsu.com +0 -0 # BitKeeper file /data/home/aegl/BK/work/seto.merge/arch/ia64/kernel/mca_drv.c # # ChangeSet # 2004/09/30 11:25:46-07:00 torvalds@ppc970.osdl.org # Fix up natsemi network driver IO accessor types. # # Basic cleanup - replace untyped/wrongly typed "dev->base_addr" with # use of a strongly typed "ioaddr". # # Fixed up resulting mii_delay() search-and-replace error noticed by # Andrey Klochko. # # Verified by Franz Pletz. # # drivers/net/natsemi.c # 2004/09/30 11:25:40-07:00 torvalds@ppc970.osdl.org +147 -120 # Fix up natsemi network driver IO accessor types. # # Basic cleanup - replace untyped/wrongly typed "dev->base_addr" with # use of a strongly typed "ioaddr". # # Fixed up resulting mii_delay() search-and-replace error noticed by # Andrey Klochko. # # Verified by Franz Pletz. # # ChangeSet # 2004/09/30 16:31:06+00:00 eranian@hpl.hp.com # [IA64] minor fix to perfmon # # change the return value of PFM_CREATE_CONTEXT from # EAGAIN to ENOMEM when the sampling buffer size is # larger than the RLIMIT_MEMLOCK limit of the task. # # signed-off-by: Stephane Eranian # Signed-off-by: Tony Luck # # arch/ia64/kernel/perfmon.c # 2004/09/30 16:29:03+00:00 aegl@agluck-lia64.sc.intel.com +1 -1 # fix error return value when exceeding rlimit # # ChangeSet # 2004/09/30 16:27:05+00:00 eranian@hpl.hp.com # [IA64] perfmon2 fix for TASK_TRACED # # fix a problem in pfm_check_task_state() and pfm_task_incompatible() # which was caused by the introduction of the new TASK_TRACED state. # Tool would fail to attach to a process,i.e., PFM_LOAD_CONTEXT would # fail. With the fix perfmon now accepts to operate on tasks which are # in either TASK_STOPPED or TASK_TRACED state. The problem was tracked # down by Alex Williamson from HP who also submitted the patch. # # signed-off-by: Stephane Eranian # Signed-off-by: Tony Luck # # arch/ia64/kernel/perfmon.c # 2004/09/30 16:24:03+00:00 aegl@agluck-lia64.sc.intel.com +2 -2 # allow state TASK_TRACED as well as TASK_STOPPED # # ChangeSet # 2004/09/30 08:41:37-07:00 Andries.Brouwer@cwi.nl # [PATCH] overcommit symbolic constants # # Played a bit with overcommit the past hour. # # Am not entirely satisfied with the no overcommit mode 2 - # programs segfault when the system is close to that boundary. # So, instead of the somewhat larger patch that I planned to send, # just symbolic names for the modes. # # security/selinux/hooks.c # 2004/09/30 06:34:51-07:00 Andries.Brouwer@cwi.nl +2 -2 # overcommit symbolic constants # # security/dummy.c # 2004/09/30 06:34:51-07:00 Andries.Brouwer@cwi.nl +2 -2 # overcommit symbolic constants # # security/commoncap.c # 2004/09/30 06:34:51-07:00 Andries.Brouwer@cwi.nl +2 -2 # overcommit symbolic constants # # mm/nommu.c # 2004/09/30 06:34:51-07:00 Andries.Brouwer@cwi.nl +1 -1 # overcommit symbolic constants # # mm/mmap.c # 2004/09/30 06:35:27-07:00 Andries.Brouwer@cwi.nl +2 -2 # overcommit symbolic constants # # include/linux/mman.h # 2004/09/30 06:34:51-07:00 Andries.Brouwer@cwi.nl +3 -0 # overcommit symbolic constants # # arch/arm26/mm/init.c # 2004/09/30 06:34:51-07:00 Andries.Brouwer@cwi.nl +1 -1 # overcommit symbolic constants # # arch/arm/mm/init.c # 2004/09/30 06:34:51-07:00 Andries.Brouwer@cwi.nl +1 -1 # overcommit symbolic constants # # Documentation/vm/overcommit-accounting # 2004/09/30 06:34:51-07:00 Andries.Brouwer@cwi.nl +4 -4 # overcommit symbolic constants # # ChangeSet # 2004/09/30 08:41:24-07:00 alan@redhat.com # [PATCH] Fix typo in final changes to old i4l tty code # # drivers/isdn/i4l/isdn_tty.c # 2004/09/30 05:56:48-07:00 alan@redhat.com +1 -1 # Fix typo in final changes to old i4l tty code # # ChangeSet # 2004/09/30 08:41:12-07:00 alan@redhat.com # [PATCH] fix typo in capi driver # # I didn't have ISDN builds on in my tree for some reason hence missing these # two from the tidy ups at the end. Marcel Holtmann also came up with the # same fixes although I didnt find that email until I did these. # # Signed-off-by: Alan Cox # # drivers/isdn/capi/capi.c # 2004/09/30 06:00:58-07:00 alan@redhat.com +1 -1 # fix typo in capi driver # # ChangeSet # 2004/09/30 08:23:27-07:00 benh@kernel.crashing.org # [PATCH] ppc64: Fix incorrect initialization of hash table on some pSeries # # The hash table wasn't fully initialized on some pSeries that had # the workaround for no batching. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc64/mm/hash_native.c # 2004/09/29 22:34:39-07:00 benh@kernel.crashing.org +2 -2 # ppc64: Fix incorrect initialization of hash table on some pSeries # # ChangeSet # 2004/09/30 08:23:15-07:00 rddunlap@osdl.org # [PATCH] pc300: remove extra paren. # # Remove an extra left-paren. # # Acked-by: Marcelo Tosatti # Signed-off-by: Randy Dunlap # Signed-off-by: Linus Torvalds # # drivers/net/wan/pc300_tty.c # 2004/09/29 21:37:16-07:00 rddunlap@osdl.org +1 -1 # pc300: remove extra paren. # # ChangeSet # 2004/09/30 14:54:06+01:00 icampbell@com.rmk.(none) # [ARM PATCH] 2114/1: fix drivers/char/watchdog/sa1100-wdt.c on SA1100 # # Patch from Ian Campbell # # Patch 2113 broke drivers/char/watchdog/sa1100-wdt.c on SA1100. # # Signed-off-by: Ian Campbell # # drivers/char/watchdog/sa1100_wdt.c # 2004/09/30 14:37:23+01:00 icampbell@com.rmk.(none) +2 -0 # [PATCH] 2114/1: fix drivers/char/watchdog/sa1100-wdt.c on SA1100 # # ChangeSet # 2004/09/30 13:31:59+01:00 icampbell@com.rmk.(none) # [ARM PATCH] 2113/1: include asm/arch/pxa-regs.h where necessary # # Patch from Ian Campbell # # The include of asm/arch/pxa-regs.h has been removed from # asm-arm/arch-pxa/hardware.h and now needs to be included # from the relevant files. # # I have verified the fixes to arch/arm/mach-pxa/sleep.S and # drivers/char/watchdog/sa1100_wdt.c myself. My local tree # has other changes to include/asm-arm/arch-pxa/serial.h # but I beleive that the attached is necessary and correct. # # Signed-off-by: Ian Campbell # # include/asm-arm/arch-pxa/serial.h # 2004/09/30 13:16:11+01:00 icampbell@com.rmk.(none) +1 -0 # [PATCH] 2113/1: include asm/arch/pxa-regs.h where necessary # # drivers/char/watchdog/sa1100_wdt.c # 2004/09/30 13:15:41+01:00 icampbell@com.rmk.(none) +2 -0 # [PATCH] 2113/1: include asm/arch/pxa-regs.h where necessary # # arch/arm/mach-pxa/sleep.S # 2004/09/30 13:15:40+01:00 icampbell@com.rmk.(none) +2 -0 # [PATCH] 2113/1: include asm/arch/pxa-regs.h where necessary # # ChangeSet # 2004/09/29 21:12:18-07:00 davem@nuts.davemloft.net # [TCP]: Smooth out TSO ack clocking. # # - Export tcp_trim_head() and call it directly from # tcp_tso_acked(). This also fixes URG handling. # # - Make tcp_trim_head() adjust the skb->truesize of # the packet and liberate that space from the socket # send buffer. # # - In tcp_current_mss(), limit TSO factor to 1/4 of # snd_cwnd. The idea is from John Heffner. # # Signed-off-by: David S. Miller # # net/ipv4/tcp_output.c # 2004/09/29 21:11:53-07:00 davem@nuts.davemloft.net +15 -35 # [TCP]: Smooth out TSO ack clocking. # # - Export tcp_trim_head() and call it directly from # tcp_tso_acked(). This also fixes URG handling. # # - Make tcp_trim_head() adjust the skb->truesize of # the packet and liberate that space from the socket # send buffer. # # - In tcp_current_mss(), limit TSO factor to 1/4 of # snd_cwnd. The idea is from John Heffner. # # Signed-off-by: David S. Miller # # net/ipv4/tcp_input.c # 2004/09/29 21:11:53-07:00 davem@nuts.davemloft.net +9 -13 # [TCP]: Smooth out TSO ack clocking. # # - Export tcp_trim_head() and call it directly from # tcp_tso_acked(). This also fixes URG handling. # # - Make tcp_trim_head() adjust the skb->truesize of # the packet and liberate that space from the socket # send buffer. # # - In tcp_current_mss(), limit TSO factor to 1/4 of # snd_cwnd. The idea is from John Heffner. # # Signed-off-by: David S. Miller # # include/net/tcp.h # 2004/09/29 21:11:52-07:00 davem@nuts.davemloft.net +1 -0 # [TCP]: Smooth out TSO ack clocking. # # - Export tcp_trim_head() and call it directly from # tcp_tso_acked(). This also fixes URG handling. # # - Make tcp_trim_head() adjust the skb->truesize of # the packet and liberate that space from the socket # send buffer. # # - In tcp_current_mss(), limit TSO factor to 1/4 of # snd_cwnd. The idea is from John Heffner. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/09/30 11:50:15+10:00 nathans@sgi.com # [XFS] Fix sync issues - use correct writepage page re-dirty interface, # and do not clear dirty flag if page only partially written. # # SGI Modid: xfs-linux:xfs-kern:19622a # Signed-off-by: Nathan Scott # # fs/xfs/linux-2.6/xfs_aops.c # 2004/09/30 11:49:48+10:00 nathans@sgi.com +19 -12 # [XFS] Fix sync issues - use correct writepage page re-dirty interface, # and do not clear dirty flag if page only partially written. # # ChangeSet # 2004/09/30 11:46:12+10:00 nathans@sgi.com # [XFS] Fix merge botch affecting xfs_setattr for realtime files. # # SGI Modid: xfs-linux:xfs-kern:19619a # Signed-off-by: Nathan Scott # # fs/xfs/xfs_vnodeops.c # 2004/09/30 11:45:45+10:00 nathans@sgi.com +5 -5 # [XFS] Fix merge botch affecting xfs_setattr for realtime files. # # ChangeSet # 2004/09/30 11:44:48+10:00 nathans@sgi.com # [XFS] Remove crufty old cap/mac code - never used, never compiled, gone. # # SGI Modid: xfs-linux:xfs-kern:19601a # Signed-off-by: Nathan Scott # # fs/xfs/Makefile # 2004/09/30 11:44:18+10:00 nathans@sgi.com +0 -2 # [XFS] Remove crufty old cap/mac code - never used, never compiled, gone. # # BitKeeper/deleted/.del-xfs_cap.c~4c1a85d7eb301218 # 2004/09/30 11:42:21+10:00 nathans@sgi.com +0 -0 # Delete: fs/xfs/xfs_cap.c # # BitKeeper/deleted/.del-xfs_mac.c~d0bf14eac42cdcd0 # 2004/09/30 11:42:17+10:00 nathans@sgi.com +0 -0 # Delete: fs/xfs/xfs_mac.c # # ChangeSet # 2004/09/29 18:27:52+00:00 tony.luck@intel.com # [IA64] SMP systems may not have SRAT, still need to mark node0 online. # # This only causes a problem in the -mm tree now, but Zou Nan hai and # Shaohua Li sent me this fix so that SMP systems compiled with the # generic kernel (which turns on NUMA and CPUSETS in -mm) won't hit # a BUG_ON in kernel/cpuset.c guarantee_online_mems() which is called # from acpi_early_init() # # Signed-off-by: Tony Luck # # arch/ia64/kernel/acpi.c # 2004/09/29 18:21:24+00:00 aegl@agluck-lia64.sc.intel.com +2 -1 # SMP systems may not have SRAT, still need to mark node0 online. # # ChangeSet # 2004/09/29 17:03:07+00:00 jbarnes@sgi.com # [IA64] defconfig for Intel bigsur # # Here's a defconfig that comes up on my box and has a reasonable set of modules # enabled. # # Signed-off-by: Jesse Barnes # Signed-off-by: Tony Luck # # arch/ia64/configs/bigsur_defconfig # 2004/09/29 17:01:43+00:00 aegl@agluck-lia64.sc.intel.com +1132 -0 # defconfig for Intel bigsur # # arch/ia64/configs/bigsur_defconfig # 2004/09/29 17:01:43+00:00 aegl@agluck-lia64.sc.intel.com +0 -0 # BitKeeper file /data/home/aegl/BK/linux-ia64-release-2.6.9/arch/ia64/configs/bigsur_defconfig # # ChangeSet # 2004/09/29 16:58:05+00:00 jbarnes@sgi.com # [IA64-SGI] sn2: serialize access to PROM chips # # If we read and write the PROM chips at the same time, as might happen at boot # when salinfo extracts MCA records and a user is checking the PROM revision # in /proc/sgi_prominfo, an MCA might occur, since the PROM chips can't be # accessed that way. This patch fixes the problem for systems with new PROMs # (>= 3.50) by using the SAL to do PROM reads. # # Signed-off-by: Jesse Barnes # Signed-off-by: Tony Luck # # include/asm-ia64/sn/sn_sal.h # 2004/09/29 16:51:15+00:00 aegl@agluck-lia64.sc.intel.com +33 -3 # avoid read/write PROM at same time # # arch/ia64/sn/kernel/sn2/prominfo_proc.c # 2004/09/29 16:51:15+00:00 aegl@agluck-lia64.sc.intel.com +141 -164 # avoid read/write PROM at same time # # ChangeSet # 2004/09/22 09:59:31-07:00 trini@kernel.crashing.org # ppc32: Update the MVME5100 defconfig so it works out of the box. # # David Gardiner noticed that it needed # updates such as VT=n to 'work' out of the box. # # arch/ppc/configs/mvme5100_defconfig # 2004/09/22 09:59:09-07:00 trini@kernel.crashing.org +57 -82 # Update. # - Set various netfilter options to what the help recommends. # - Enable TULIP. # - Disable input, etc. # - Disable CONFIG_VT. # diff -Nru a/Documentation/ManagementStyle b/Documentation/ManagementStyle --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/Documentation/ManagementStyle 2004-10-03 19:06:22 -07:00 @@ -0,0 +1,276 @@ + + Linux kernel management style + +This is a short document describing the preferred (or made up, depending +on who you ask) management style for the linux kernel. It's meant to +mirror the CodingStyle document to some degree, and mainly written to +avoid answering (*) the same (or similar) questions over and over again. + +Management style is very personal and much harder to quantify than +simple coding style rules, so this document may or may not have anything +to do with reality. It started as a lark, but that doesn't mean that it +might not actually be true. You'll have to decide for yourself. + +Btw, when talking about "kernel manager", it's all about the technical +lead persons, not the people who do traditional management inside +companies. If you sign purchase orders or you have any clue about the +budget of your group, you're almost certainly not a kernel manager. +These suggestions may or may not apply to you. + +First off, I'd suggest buying "Seven Habits of Highly Successful +People", and NOT read it. Burn it, it's a great symbolic gesture. + +(*) This document does so not so much by answering the question, but by +making it painfully obvious to the questioner that we don't have a clue +to what the answer is. + +Anyway, here goes: + + + Chapter 1: Decisions + +Everybody thinks managers make decisions, and that decision-making is +important. The bigger and more painful the decision, the bigger the +manager must be to make it. That's very deep and obvious, but it's not +actually true. + +The name of the game is to _avoid_ having to make a decision. In +particular, if somebody tells you "choose (a) or (b), we really need you +to decide on this", you're in trouble as a manager. The people you +manage had better know the details better than you, so if they come to +you for a technical decision, you're screwed. You're clearly not +competent to make that decision for them. + +(Corollary:if the people you manage don't know the details better than +you, you're also screwed, although for a totally different reason. +Namely that you are in the wrong job, and that _they_ should be managing +your brilliance instead). + +So the name of the game is to _avoid_ decisions, at least the big and +painful ones. Making small and non-consequential decisions is fine, and +makes you look like you know what you're doing, so what a kernel manager +needs to do is to turn the big and painful ones into small things where +nobody really cares. + +It helps to realize that the key difference between a big decision and a +small one is whether you can fix your decision afterwards. Any decision +can be made small by just always making sure that if you were wrong (and +you _will_ be wrong), you can always undo the damage later by +backtracking. Suddenly, you get to be doubly managerial for making +_two_ inconsequential decisions - the wrong one _and_ the right one. + +And people will even see that as true leadership (*cough* bullshit +*cough*). + +Thus the key to avoiding big decisions becomes to just avoiding to do +things that can't be undone. Don't get ushered into a corner from which +you cannot escape. A cornered rat may be dangerous - a cornered manager +is just pitiful. + +It turns out that since nobody would be stupid enough to ever really let +a kernel manager have huge fiscal responsibility _anyway_, it's usually +fairly easy to backtrack. Since you're not going to be able to waste +huge amounts of money that you might not be able to repay, the only +thing you can backtrack on is a technical decision, and there +back-tracking is very easy: just tell everybody that you were an +incompetent nincompoop, say you're sorry, and undo all the worthless +work you had people work on for the last year. Suddenly the decision +you made a year ago wasn't a big decision after all, since it could be +easily undone. + +It turns out that some people have trouble with this approach, for two +reasons: + - admitting you were an idiot is harder than it looks. We all like to + maintain appearances, and coming out in public to say that you were + wrong is sometimes very hard indeed. + - having somebody tell you that what you worked on for the last year + wasn't worthwhile after all can be hard on the poor lowly engineers + too, and while the actual _work_ was easy enough to undo by just + deleting it, you may have irrevocably lost the trust of that + engineer. And remember: "irrevocable" was what we tried to avoid in + the first place, and your decision ended up being a big one after + all. + +Happily, both of these reasons can be mitigated effectively by just +admitting up-front that you don't have a friggin' clue, and telling +people ahead of the fact that your decision is purely preliminary, and +might be the wrong thing. You should always reserve the right to change +your mind, and make people very _aware_ of that. And it's much easier +to admit that you are stupid when you haven't _yet_ done the really +stupid thing. + +Then, when it really does turn out to be stupid, people just roll their +eyes and say "Oops, he did it again". + +This preemptive admission of incompetence might also make the people who +actually do the work also think twice about whether it's worth doing or +not. After all, if _they_ aren't certain whether it's a good idea, you +sure as hell shouldn't encourage them by promising them that what they +work on will be included. Make them at least think twice before they +embark on a big endeavor. + +Remember: they'd better know more about the details than you do, and +they usually already think they have the answer to everything. The best +thing you can do as a manager is not to instill confidence, but rather a +healthy dose of critical thinking on what they do. + +Btw, another way to avoid a decision is to plaintively just whine "can't +we just do both?" and look pitiful. Trust me, it works. If it's not +clear which approach is better, they'll eventually figure it out. The +answer may end up being that both teams get so frustrated by the +situation that they just give up. + +That may sound like a failure, but it's usually a sign that there was +something wrong with both projects, and the reason the people involved +couldn't decide was that they were both wrong. You end up coming up +smelling like roses, and you avoided yet another decision that you could +have screwed up on. + + + Chapter 2: People + +Most people are idiots, and being a manager means you'll have to deal +with it, and perhaps more importantly, that _they_ have to deal with +_you_. + +It turns out that while it's easy to undo technical mistakes, it's not +as easy to undo personality disorders. You just have to live with +theirs - and yours. + +However, in order to prepare yourself as a kernel manager, it's best to +remember not to burn any bridges, bomb any innocent villagers, or +alienate too many kernel developers. It turns out that alienating people +is fairly easy, and un-alienating them is hard. Thus "alienating" +immediately falls under the heading of "not reversible", and becomes a +no-no according to Chapter 1. + +There's just a few simple rules here: + (1) don't call people d*ckheads (at least not in public) + (2) learn how to apologize when you forgot rule (1) + +The problem with #1 is that it's very easy to do, since you can say +"you're a d*ckhead" in millions of different ways (*), sometimes without +even realizing it, and almost always with a white-hot conviction that +you are right. + +And the more convinced you are that you are right (and let's face it, +you can call just about _anybody_ a d*ckhead, and you often _will_ be +right), the harder it ends up being to apologize afterwards. + +To solve this problem, you really only have two options: + - get really good at apologies + - spread the "love" out so evenly that nobody really ends up feeling + like they get unfairly targeted. Make it inventive enough, and they + might even be amused. + +The option of being unfailingly polite really doesn't exist. Nobody will +trust somebody who is so clearly hiding his true character. + +(*) Paul Simon sang "Fifty Ways to Lose Your Lover", because quite +frankly, "A Million Ways to Tell a Developer He Is a D*ckhead" doesn't +scan nearly as well. But I'm sure he thought about it. + + + Chapter 3: People II - the Good Kind + +While it turns out that most people are idiots, the corollary to that is +sadly that you are one too, and that while we can all bask in the secure +knowledge that we're better than the average person (let's face it, +nobody ever believes that they're average or below-average), we should +also admit that we're not the sharpest knife around, and there will be +other people that are less of an idiot that you are. + +Some people react badly to smart people. Others take advantage of them. + +Make sure that you, as a kernel maintainer, are in the second group. +Suck up to them, because they are the people who will make your job +easier. In particular, they'll be able to make your decisions for you, +which is what the game is all about. + +So when you find somebody smarter than you are, just coast along. Your +management responsibilities largely become ones of saying "Sounds like a +good idea - go wild", or "That sounds good, but what about xxx?". The +second version in particular is a great way to either learn something +new about "xxx" or seem _extra_ managerial by pointing out something the +smarter person hadn't thought about. In either case, you win. + +One thing to look out for is to realize that greatness in one area does +not necessarily translate to other areas. So you might prod people in +specific directions, but let's face it, they might be good at what they +do, and suck at everything else. The good news is that people tend to +naturally gravitate back to what they are good at, so it's not like you +are doing something irreversible when you _do_ prod them in some +direction, just don't push too hard. + + + Chapter 4: Placing blame + +Things will go wrong, and people want somebody to blame. Tag, you're it. + +It's not actually that hard to accept the blame, especially if people +kind of realize that it wasn't _all_ your fault. Which brings us to the +best way of taking the blame: do it for another guy. You'll feel good +for taking the fall, he'll feel good about not getting blamed, and the +guy who lost his whole 36GB porn-collection because of your incompetence +will grudgingly admit that you at least didn't try to weasel out of it. + +Then make the developer who really screwed up (if you can find him) know +_in_private_ that he screwed up. Not just so he can avoid it in the +future, but so that he knows he owes you one. And, perhaps even more +importantly, he's also likely the person who can fix it. Because, let's +face it, it sure ain't you. + +Taking the blame is also why you get to be manager in the first place. +It's part of what makes people trust you, and allow you the potential +glory, because you're the one who gets to say "I screwed up". And if +you've followed the previous rules, you'll be pretty good at saying that +by now. + + + Chapter 5: Things to avoid + +There's one thing people hate even more than being called "d*ckhead", +and that is being called a "d*ckhead" in a sanctimonious voice. The +first you can apologize for, the second one you won't really get the +chance. They likely will no longer be listening even if you otherwise +do a good job. + +We all think we're better than anybody else, which means that when +somebody else puts on airs, it _really_ rubs us the wrong way. You may +be morally and intellectually superior to everybody around you, but +don't try to make it too obvious unless you really _intend_ to irritate +somebody (*). + +Similarly, don't be too polite or subtle about things. Politeness easily +ends up going overboard and hiding the problem, and as they say, "On the +internet, nobody can hear you being subtle". Use a big blunt object to +hammer the point in, because you can't really depend on people getting +your point otherwise. + +Some humor can help pad both the bluntness and the moralizing. Going +overboard to the point of being ridiculous can drive a point home +without making it painful to the recipient, who just thinks you're being +silly. It can thus help get through the personal mental block we all +have about criticism. + +(*) Hint: internet newsgroups that are not directly related to your work +are great ways to take out your frustrations at other people. Write +insulting posts with a sneer just to get into a good flame every once in +a while, and you'll feel cleansed. Just don't crap too close to home. + + + Chapter 6: Why me? + +Since your main responsibility seems to be to take the blame for other +peoples mistakes, and make it painfully obvious to everybody else that +you're incompetent, the obvious question becomes one of why do it in the +first place? + +First off, while you may or may not get screaming teenage girls (or +boys, let's not be judgmental or sexist here) knocking on your dressing +room door, you _will_ get an immense feeling of personal accomplishment +for being "in charge". Never mind the fact that you're really leading +by trying to keep up with everybody else and running after them as fast +as you can. Everybody will still think you're the person in charge. + +It's a great job if you can hack it. diff -Nru a/Documentation/filesystems/ntfs.txt b/Documentation/filesystems/ntfs.txt --- a/Documentation/filesystems/ntfs.txt 2004-10-03 19:06:21 -07:00 +++ b/Documentation/filesystems/ntfs.txt 2004-10-03 19:06:21 -07:00 @@ -277,6 +277,8 @@ Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog. +2.1.20: + - Fix two stupid bugs introduced in 2.1.18 release. 2.1.19: - Minor bugfix in handling of the default upcase table. - Many internal cleanups and improvements. Many thanks to Linus diff -Nru a/Documentation/firmware_class/hotplug-script b/Documentation/firmware_class/hotplug-script --- a/Documentation/firmware_class/hotplug-script 2004-10-03 19:06:22 -07:00 +++ b/Documentation/firmware_class/hotplug-script 2004-10-03 19:06:22 -07:00 @@ -7,10 +7,10 @@ HOTPLUG_FW_DIR=/usr/lib/hotplug/firmware/ echo 1 > /sys/$DEVPATH/loading -cat $HOTPLUG_FW_DIR/$FIRMWARE > /sysfs/$DEVPATH/data +cat $HOTPLUG_FW_DIR/$FIRMWARE > /sys/$DEVPATH/data echo 0 > /sys/$DEVPATH/loading # To cancel the load in case of error: # -# echo -1 > /sysfs/$DEVPATH/loading +# echo -1 > /sys/$DEVPATH/loading # diff -Nru a/Documentation/ioctl-number.txt b/Documentation/ioctl-number.txt --- a/Documentation/ioctl-number.txt 2004-10-03 19:06:22 -07:00 +++ b/Documentation/ioctl-number.txt 2004-10-03 19:06:22 -07:00 @@ -117,6 +117,7 @@ 'c' 00-7F linux/comstats.h conflict! 'c' 00-7F linux/coda.h conflict! +'d' 00-FF linux/char/drm/drm/h conflict! 'd' 00-1F linux/devfs_fs.h conflict! 'd' 00-DF linux/video_decoder.h conflict! 'd' F0-FF linux/digi1.h diff -Nru a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt --- a/Documentation/kernel-parameters.txt 2004-10-03 19:06:22 -07:00 +++ b/Documentation/kernel-parameters.txt 2004-10-03 19:06:22 -07:00 @@ -97,9 +97,6 @@ See header of drivers/scsi/53c7xx.c. See also Documentation/scsi/ncr53c7xx.txt. - 98busmouse.irq= [HW,MOUSE] PC-9801 Bus Mouse Driver - Format: , default is 13 - acpi= [HW,ACPI] Advanced Configuration and Power Interface Format: { force | off | ht | strict } force -- enable ACPI if default was off @@ -532,6 +529,18 @@ isapnp= [ISAPNP] Format: , , , + + isolcpus= [KNL,SMP] Isolate CPUs from the general scheduler. + Format: , ..., + This option can be used to specify one or more CPUs + to isolate from the general SMP balancing and scheduling + algorithms. The only way to move a process onto or off + an "isolated" CPU is via the CPU affinity syscalls. + + This option is the preferred way to isolate CPUs. The + alternative - manually setting the CPU mask of all tasks + in the system can cause problems and suboptimal load + balancer performance. isp16= [HW,CD] Format: ,,, diff -Nru a/Documentation/scsi/scsi_mid_low_api.txt b/Documentation/scsi/scsi_mid_low_api.txt --- a/Documentation/scsi/scsi_mid_low_api.txt 2004-10-03 19:06:22 -07:00 +++ b/Documentation/scsi/scsi_mid_low_api.txt 2004-10-03 19:06:22 -07:00 @@ -1091,10 +1091,6 @@ * mid level does not recognize it, then the LLD that controls * the device receives the ioctl. According to recent Unix standards * unsupported ioctl() 'cmd' numbers should return -ENOTTY. - * However the mid level returns -EINVAL for unrecognized 'cmd' - * numbers when this function is not supplied by the driver. - * Unfortunately some applications expect -EINVAL and react badly - * when -ENOTTY is returned; stick with -EINVAL. * * Optionally defined in: LLD **/ diff -Nru a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt --- a/Documentation/sysctl/vm.txt 2004-10-03 19:06:22 -07:00 +++ b/Documentation/sysctl/vm.txt 2004-10-03 19:06:22 -07:00 @@ -47,7 +47,7 @@ When this flag is 1, the kernel pretends there is always enough memory until it actually runs out. -When this flag is 2, the kernel uses a "strict overcommit" +When this flag is 2, the kernel uses a "never overcommit" policy that attempts to prevent any overcommit of memory. This feature can be very useful because there are a lot of diff -Nru a/Documentation/tty.txt b/Documentation/tty.txt --- a/Documentation/tty.txt 2004-10-03 19:06:22 -07:00 +++ b/Documentation/tty.txt 2004-10-03 19:06:22 -07:00 @@ -60,8 +60,8 @@ set_termios() - Called on termios structure changes. The caller passes the old termios data and the current data - is in the tty. Called under the termios lock so - may not sleep. Serialized against itself only. + is in the tty. Called under the termios semaphore so + allowed to sleep. Serialized against itself only. read() - Move data from the line discipline to the user. Multiple read calls may occur in parallel and the @@ -158,8 +158,8 @@ ioctl() - Called when an ioctl may be for the driver -set_termios() - Called on termios change, may get parallel calls, - may block for now (may change that) +set_termios() - Called on termios change, serialized against + itself by a semaphore. May sleep. set_ldisc() - Notifier for discipline change. At the point this is done the discipline is not yet usable. Can now diff -Nru a/Documentation/vm/overcommit-accounting b/Documentation/vm/overcommit-accounting --- a/Documentation/vm/overcommit-accounting 2004-10-03 19:06:22 -07:00 +++ b/Documentation/vm/overcommit-accounting 2004-10-03 19:06:22 -07:00 @@ -1,4 +1,4 @@ -The Linux kernel supports three overcommit handling modes +The Linux kernel supports the following overcommit handling modes 0 - Heuristic overcommit handling. Obvious overcommits of address space are refused. Used for a typical system. It @@ -7,10 +7,10 @@ allocate slighly more memory in this mode. This is the default. -1 - No overcommit handling. Appropriate for some scientific +1 - Always overcommit. Appropriate for some scientific applications. -2 - (NEW) strict overcommit. The total address space commit +2 - Don't overcommit. The total address space commit for the system is not permitted to exceed swap + a configurable percentage (default is 50) of physical RAM. Depending on the percentage you use, in most situations @@ -27,7 +27,7 @@ The C language stack growth does an implicit mremap. If you want absolute guarantees and run close to the edge you MUST mmap your stack for the -largest size you think you will need. For typical stack usage is does +largest size you think you will need. For typical stack usage this does not matter much but it's a corner case if you really really care In mode 2 the MAP_NORESERVE flag is ignored. diff -Nru a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S --- a/arch/arm/kernel/calls.S 2004-10-03 19:06:22 -07:00 +++ b/arch/arm/kernel/calls.S 2004-10-03 19:06:22 -07:00 @@ -1,7 +1,7 @@ /* * linux/arch/arm/kernel/calls.S * - * Copyright (C) 1995-2003 Russell King + * Copyright (C) 1995-2004 Russell King * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -288,6 +288,13 @@ .long sys_pciconfig_iobase .long sys_pciconfig_read .long sys_pciconfig_write + .long sys_mq_open +/* 275 */ .long sys_mq_unlink + .long sys_mq_timedsend + .long sys_mq_timedreceive + .long sys_mq_notify + .long sys_mq_getsetattr +/* 280 */ .long sys_waitid __syscall_end: .rept NR_syscalls - (__syscall_end - __syscall_start) / 4 diff -Nru a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c --- a/arch/arm/kernel/ecard.c 2004-10-03 19:06:22 -07:00 +++ b/arch/arm/kernel/ecard.c 2004-10-03 19:06:22 -07:00 @@ -224,7 +224,7 @@ static pid_t ecard_pid; static wait_queue_head_t ecard_wait; static struct ecard_request *ecard_req; - +static DECLARE_MUTEX(ecard_sem); static DECLARE_COMPLETION(ecard_completion); /* @@ -282,8 +282,6 @@ static int ecard_task(void * unused) { - struct task_struct *tsk = current; - daemonize("kecardd"); /* @@ -298,16 +296,11 @@ while (1) { struct ecard_request *req; - do { - req = xchg(&ecard_req, NULL); - - if (req == NULL) { - sigemptyset(&tsk->pending.signal); - interruptible_sleep_on(&ecard_wait); - } - } while (req == NULL); + wait_event_interruptible(ecard_wait, ecard_req != NULL); - ecard_do_request(req); + req = xchg(&ecard_req, NULL); + if (req != NULL) + ecard_do_request(req); complete(&ecard_completion); } } @@ -330,6 +323,7 @@ if (ecard_pid <= 0) ecard_pid = kernel_thread(ecard_task, NULL, CLONE_KERNEL); + down(&ecard_sem); ecard_req = req; wake_up(&ecard_wait); @@ -337,6 +331,7 @@ * Now wait for kecardd to run. */ wait_for_completion(&ecard_completion); + up(&ecard_sem); } /* ======================= Mid-level card control ===================== */ diff -Nru a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c --- a/arch/arm/kernel/irq.c 2004-10-03 19:06:21 -07:00 +++ b/arch/arm/kernel/irq.c 2004-10-03 19:06:21 -07:00 @@ -46,6 +46,7 @@ */ #define MAX_IRQ_CNT 100000 +static int noirqdebug; static volatile unsigned long irq_err_count; static spinlock_t irq_controller_lock = SPIN_LOCK_UNLOCKED; static LIST_HEAD(irq_pending); @@ -235,7 +236,7 @@ static int count = 100; struct irqaction *action; - if (!count) + if (!count || noirqdebug) return; count--; @@ -863,3 +864,11 @@ init_arch_irq(); init_dma(); } + +static int __init noirqdebug_setup(char *str) +{ + noirqdebug = 1; + return 1; +} + +__setup("noirqdebug", noirqdebug_setup); diff -Nru a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c --- a/arch/arm/kernel/signal.c 2004-10-03 19:06:21 -07:00 +++ b/arch/arm/kernel/signal.c 2004-10-03 19:06:21 -07:00 @@ -409,6 +409,7 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, int framesize) { unsigned long sp = regs->ARM_sp; + void __user *frame; #ifdef CONFIG_IWMMXT if (test_thread_flag(TIF_USING_IWMMXT)) @@ -424,7 +425,15 @@ /* * ATPCS B01 mandates 8-byte alignment */ - return (void __user *)((sp - framesize) & ~7); + frame = (void __user *)((sp - framesize) & ~7); + + /* + * Check that we can actually write to the signal frame. + */ + if (!access_ok(VERIFY_WRITE, frame, framesize)) + frame = NULL; + + return frame; } static int @@ -493,7 +502,7 @@ struct sigframe __user *frame = get_sigframe(ka, regs, sizeof(*frame)); int err = 0; - if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame))) + if (!frame) return 1; err |= setup_sigcontext(&frame->sc, /*&frame->fpstate,*/ regs, set->sig[0]); @@ -522,7 +531,7 @@ stack_t stack; int err = 0; - if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame))) + if (!frame) return 1; __put_user_error(&frame->info, &frame->pinfo, err); diff -Nru a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c --- a/arch/arm/mach-imx/time.c 2004-10-03 19:06:21 -07:00 +++ b/arch/arm/mach-imx/time.c 2004-10-03 19:06:21 -07:00 @@ -25,7 +25,7 @@ #define TIMER_BASE IMX_TIM1_BASE /* - * Returns number of ms since last clock interrupt. Note that interrupts + * Returns number of us since last clock interrupt. Note that interrupts * will have been disabled by do_gettimeoffset() */ static unsigned long @@ -39,7 +39,7 @@ * an interrupt. We get around this by ensuring that the * counter has not reloaded between our two reads. */ - ticks = IMX_TCR(TIMER_BASE); + ticks = IMX_TCN(TIMER_BASE); /* * Interrupt pending? If so, we've reloaded once already. @@ -84,7 +84,7 @@ */ IMX_TCTL(TIMER_BASE) = 0; IMX_TPRER(TIMER_BASE) = 0; - IMX_TCMP(TIMER_BASE) = LATCH; + IMX_TCMP(TIMER_BASE) = LATCH - 1; IMX_TCTL(TIMER_BASE) = TCTL_CLK_32 | TCTL_IRQEN | TCTL_TEN; /* diff -Nru a/arch/arm/mach-integrator/clock.c b/arch/arm/mach-integrator/clock.c --- a/arch/arm/mach-integrator/clock.c 2004-10-03 19:06:22 -07:00 +++ b/arch/arm/mach-integrator/clock.c 2004-10-03 19:06:22 -07:00 @@ -76,7 +76,10 @@ long clk_round_rate(struct clk *clk, unsigned long rate) { - return rate; + struct icst525_vco vco; + + vco = icst525_khz_to_vco(clk->params, rate / 1000); + return icst525_khz(clk->params, vco) * 1000; } EXPORT_SYMBOL(clk_round_rate); @@ -86,8 +89,8 @@ if (clk->setvco) { struct icst525_vco vco; - vco = icst525_khz_to_vco(clk->params, rate); - clk->rate = icst525_khz(clk->params, vco); + vco = icst525_khz_to_vco(clk->params, rate / 1000); + clk->rate = icst525_khz(clk->params, vco) * 1000; printk("Clock %s: setting VCO reg params: S=%d R=%d V=%d\n", clk->name, vco.s, vco.r, vco.v); diff -Nru a/arch/arm/mach-iop3xx/iop331-pci.c b/arch/arm/mach-iop3xx/iop331-pci.c --- a/arch/arm/mach-iop3xx/iop331-pci.c 2004-10-03 19:06:22 -07:00 +++ b/arch/arm/mach-iop3xx/iop331-pci.c 2004-10-03 19:06:22 -07:00 @@ -208,12 +208,10 @@ DBG("\tATU: IOP331_IABAR2=0x%08x IOP331_IALR2=0x%08x IOP331_IATVR2=%08x\n", *IOP331_IABAR2, *IOP331_IALR2, *IOP331_IATVR2); DBG("\tATU: IOP331_IABAR3=0x%08x IOP331_IALR3=0x%08x IOP331_IATVR3=%08x\n", *IOP331_IABAR3, *IOP331_IALR3, *IOP331_IATVR3); -#if 0 - hook_fault_code(4, iop331_pci_abort, SIGBUS, "external abort on linefetch"); - hook_fault_code(6, iop331_pci_abort, SIGBUS, "external abort on linefetch"); - hook_fault_code(8, iop331_pci_abort, SIGBUS, "external abort on non-linefetch"); - hook_fault_code(10, iop331_pci_abort, SIGBUS, "external abort on non-linefetch"); -#endif + /* redboot changed, reset IABAR0 to something sane */ + /* fixes master aborts in plugged in cards */ + /* will clean up later and work nicely with redboot */ + *IOP331_IABAR0 = 0x00000004; hook_fault_code(16+6, iop331_pci_abort, SIGBUS, "imprecise external abort"); } diff -Nru a/arch/arm/mach-pxa/sleep.S b/arch/arm/mach-pxa/sleep.S --- a/arch/arm/mach-pxa/sleep.S 2004-10-03 19:06:22 -07:00 +++ b/arch/arm/mach-pxa/sleep.S 2004-10-03 19:06:22 -07:00 @@ -16,6 +16,8 @@ #include #include +#include + .text /* diff -Nru a/arch/arm/mach-s3c2410/Makefile b/arch/arm/mach-s3c2410/Makefile --- a/arch/arm/mach-s3c2410/Makefile 2004-10-03 19:06:21 -07:00 +++ b/arch/arm/mach-s3c2410/Makefile 2004-10-03 19:06:21 -07:00 @@ -21,8 +21,8 @@ # machine specific support -obj-$(CONFIG_ARCH_BAST) += mach-bast.o +obj-$(CONFIG_ARCH_BAST) += mach-bast.o usb-simtec.o obj-$(CONFIG_ARCH_H1940) += mach-h1940.o obj-$(CONFIG_ARCH_SMDK2410) += mach-smdk2410.o -obj-$(CONFIG_MACH_VR1000) += mach-vr1000.o +obj-$(CONFIG_MACH_VR1000) += mach-vr1000.o usb-simtec.o diff -Nru a/arch/arm/mach-s3c2410/gpio.c b/arch/arm/mach-s3c2410/gpio.c --- a/arch/arm/mach-s3c2410/gpio.c 2004-10-03 19:06:22 -07:00 +++ b/arch/arm/mach-s3c2410/gpio.c 2004-10-03 19:06:22 -07:00 @@ -23,6 +23,10 @@ * 13-Sep-2004 BJD Implemented change of MISCCR * 14-Sep-2004 BJD Added getpin call * 14-Sep-2004 BJD Fixed bug in setpin() call + * 30-Sep-2004 BJD Fixed cfgpin() mask bug + * 01-Oct-2004 BJD Added getcfg() to get pin configuration + * 01-Oct-2004 BJD Fixed mask bug in pullup() call + * 01-Oct-2004 BJD Added getoirq() to turn pin into irqno */ @@ -40,23 +44,20 @@ void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int function) { unsigned long base = S3C2410_GPIO_BASE(pin); - unsigned long shift = 1; - unsigned long mask = 3; + unsigned long mask; unsigned long con; unsigned long flags; if (pin < S3C2410_GPIO_BANKB) { - shift = 0; - mask = 1; + mask = 1 << S3C2410_GPIO_OFFSET(pin); + } else { + mask = 3 << S3C2410_GPIO_OFFSET(pin)*2; } - mask <<= S3C2410_GPIO_OFFSET(pin); - local_irq_save(flags); - con = __raw_readl(base + 0x00); - - con &= mask << shift; + con = __raw_readl(base + 0x00); + con &= ~mask; con |= function; __raw_writel(con, base + 0x00); @@ -64,6 +65,20 @@ local_irq_restore(flags); } +unsigned int s3c2410_gpio_getcfg(unsigned int pin) +{ + unsigned long base = S3C2410_GPIO_BASE(pin); + unsigned long mask; + + if (pin < S3C2410_GPIO_BANKB) { + mask = 1 << S3C2410_GPIO_OFFSET(pin); + } else { + mask = 3 << S3C2410_GPIO_OFFSET(pin)*2; + } + + return __raw_readl(base) & mask; +} + void s3c2410_gpio_pullup(unsigned int pin, unsigned int to) { unsigned long base = S3C2410_GPIO_BASE(pin); @@ -77,7 +92,7 @@ local_irq_save(flags); up = __raw_readl(base + 0x08); - up &= 1 << offs; + up &= ~(1L << offs); up |= to << offs; __raw_writel(up, base + 0x08); @@ -122,4 +137,21 @@ local_irq_restore(flags); return misccr; +} + +int s3c2410_gpio_getirq(unsigned int pin) +{ + if (pin < S3C2410_GPF0 || pin > S3C2410_GPG15_EINT23) + return -1; /* not valid interrupts */ + + if (pin < S3C2410_GPG0 && pin > S3C2410_GPF7) + return -1; /* not valid pin */ + + if (pin < S3C2410_GPF4) + return (pin - S3C2410_GPF0) + IRQ_EINT0; + + if (pin < S3C2410_GPG0) + return (pin - S3C2410_GPF4) + IRQ_EINT4; + + return (pin - S3C2410_GPG0) + IRQ_EINT8; } diff -Nru a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c --- a/arch/arm/mach-s3c2410/mach-bast.c 2004-10-03 19:06:21 -07:00 +++ b/arch/arm/mach-s3c2410/mach-bast.c 2004-10-03 19:06:21 -07:00 @@ -10,6 +10,7 @@ * published by the Free Software Foundation. * * Modifications: + * 14-Sep-2004 BJD USB power control * 20-Aug-2004 BJD Added s3c2410_board struct * 18-Aug-2004 BJD Added platform devices from default set * 16-May-2003 BJD Created initial version @@ -44,6 +45,7 @@ #include "s3c2410.h" #include "devs.h" #include "cpu.h" +#include "usb-simtec.h" /* macros for virtual address mods for the io space entries */ #define VA_C5(item) ((item) + BAST_VAM_CS5) @@ -215,6 +217,7 @@ s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc)); s3c2410_init_uarts(bast_uartcfgs, ARRAY_SIZE(bast_uartcfgs)); s3c2410_set_board(&bast_board); + usb_simtec_init(); } void __init bast_init_irq(void) diff -Nru a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c --- a/arch/arm/mach-s3c2410/mach-vr1000.c 2004-10-03 19:06:22 -07:00 +++ b/arch/arm/mach-s3c2410/mach-vr1000.c 2004-10-03 19:06:22 -07:00 @@ -11,6 +11,7 @@ * published by the Free Software Foundation. * * Modifications: + * 14-Sep-2004 BJD USB Power control * 04-Sep-2004 BJD Added new uart init, and io init * 21-Aug-2004 BJD Added struct s3c2410_board * 06-Aug-2004 BJD Fixed call to time initialisation @@ -42,6 +43,7 @@ #include "s3c2410.h" #include "devs.h" #include "cpu.h" +#include "usb-simtec.h" /* macros for virtual address mods for the io space entries */ #define VA_C5(item) ((item) + BAST_VAM_CS5) @@ -160,6 +162,7 @@ s3c24xx_init_io(vr1000_iodesc, ARRAY_SIZE(vr1000_iodesc)); s3c2410_init_uarts(vr1000_uartcfgs, ARRAY_SIZE(vr1000_uartcfgs)); s3c2410_set_board(&vr1000_board); + usb_simtec_init(); } void __init vr1000_init_irq(void) diff -Nru a/arch/arm/mach-s3c2410/usb-simtec.c b/arch/arm/mach-s3c2410/usb-simtec.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/mach-s3c2410/usb-simtec.c 2004-10-03 19:06:22 -07:00 @@ -0,0 +1,123 @@ +/* linux/arch/arm/mach-s3c2410/usb-simtec.c + * + * Copyright (c) 2004 Simtec Electronics + * Ben Dooks + * + * http://www.simtec.co.uk/products/EB2410ITX/ + * + * Simtec BAST and Thorcom VR1000 USB port support functions + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Modifications: + * 14-Sep-2004 BJD Created +*/ + +#define DEBUG + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "devs.h" +#include "usb-simtec.h" + +/* control power and monitor over-current events on various Simtec + * designed boards. +*/ + +static void +usb_simtec_powercontrol(int port, int to) +{ + pr_debug("usb_simtec_powercontrol(%d,%d)\n", port, to); + + if (port == 1) { + s3c2410_gpio_setpin(S3C2410_GPB4, to ? 0:1); + pr_debug("GPBDAT now %08x\n", __raw_readl(S3C2410_GPBDAT)); + } +} + +static irqreturn_t +usb_simtec_ocirq(int irq, void *pw, struct pt_regs *regs) +{ + struct s3c2410_hcd_info *info = (struct s3c2410_hcd_info *)pw; + + if (s3c2410_gpio_getpin(S3C2410_GPG10) == 0) { + pr_debug("usb_simtec: over-current irq (oc detected)\n"); + s3c2410_report_oc(info, 3); + } else { + pr_debug("usb_simtec: over-current irq (oc cleared)\n"); + } + + return IRQ_HANDLED; +} + +static void usb_simtec_enableoc(struct s3c2410_hcd_info *info, int on) +{ + int ret; + + if (on) { + pr_debug("claiming usb overccurent\n"); + ret = request_irq(IRQ_USBOC, usb_simtec_ocirq, SA_INTERRUPT, + "usb-oc", info); + if (ret != 0) { + printk(KERN_ERR "failed to request usb oc irq\n"); + } + + set_irq_type(IRQ_USBOC, IRQT_BOTHEDGE); + } else { + free_irq(IRQ_USBOC, NULL); + } +} + +static struct s3c2410_hcd_info usb_simtec_info = { + .port[0] = { + .flags = S3C_HCDFLG_USED + }, + .port[1] = { + .flags = S3C_HCDFLG_USED + }, + + .power_control = usb_simtec_powercontrol, + .enable_oc = usb_simtec_enableoc, +}; + + +int usb_simtec_init(void) +{ + printk("USB Power Control, (c) 2004 Simtec Electronics\n"); + s3c_device_usb.dev.platform_data = &usb_simtec_info; + + s3c2410_gpio_cfgpin(S3C2410_GPB4, S3C2410_GPB4_OUTP); + s3c2410_gpio_setpin(S3C2410_GPB4, 1); + + pr_debug("GPB: CON=%08x, DAT=%08x\n", + __raw_readl(S3C2410_GPBCON), __raw_readl(S3C2410_GPBDAT)); + + if (0) { + s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST, + S3C2410_MISCCR_USBDEV); + } + + return 0; +} diff -Nru a/arch/arm/mach-s3c2410/usb-simtec.h b/arch/arm/mach-s3c2410/usb-simtec.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/mach-s3c2410/usb-simtec.h 2004-10-03 19:06:22 -07:00 @@ -0,0 +1,19 @@ +/* linux/arch/arm/mach-s3c2410/usb-simtec.c + * + * Copyright (c) 2004 Simtec Electronics + * Ben Dooks + * + * http://www.simtec.co.uk/products/EB2410ITX/ + * + * Simtec BAST and Thorcom VR1000 USB port support functions + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Modifications: + * 20-Aug-2004 BJD Created +*/ + +extern int usb_simtec_init(void); + diff -Nru a/arch/arm/mach-versatile/clock.c b/arch/arm/mach-versatile/clock.c --- a/arch/arm/mach-versatile/clock.c 2004-10-03 19:06:21 -07:00 +++ b/arch/arm/mach-versatile/clock.c 2004-10-03 19:06:21 -07:00 @@ -87,8 +87,8 @@ if (clk->setvco) { struct icst525_vco vco; - vco = icst525_khz_to_vco(clk->params, rate); - clk->rate = icst525_khz(clk->params, vco); + vco = icst525_khz_to_vco(clk->params, rate / 1000); + clk->rate = icst525_khz(clk->params, vco) * 1000; printk("Clock %s: setting VCO reg params: S=%d R=%d V=%d\n", clk->name, vco.s, vco.r, vco.v); diff -Nru a/arch/arm/mm/abort-ev5tj.S b/arch/arm/mm/abort-ev5tj.S --- a/arch/arm/mm/abort-ev5tj.S 2004-10-03 19:06:21 -07:00 +++ b/arch/arm/mm/abort-ev5tj.S 2004-10-03 19:06:21 -07:00 @@ -23,7 +23,6 @@ mrc p15, 0, r0, c6, c0, 0 @ get FAR bic r1, r1, #1 << 11 | 1 << 10 @ clear bits 11 and 10 of FSR tst r3, #PSR_J_BIT @ Java? - orrne r1, r1, #1 << 11 @ always assume write movne pc, lr tst r3, #PSR_T_BIT @ Thumb? ldrneh r3, [r2] @ read aborted thumb instruction diff -Nru a/arch/arm/mm/consistent.c b/arch/arm/mm/consistent.c --- a/arch/arm/mm/consistent.c 2004-10-03 19:06:22 -07:00 +++ b/arch/arm/mm/consistent.c 2004-10-03 19:06:22 -07:00 @@ -138,7 +138,7 @@ struct page *page; struct vm_region *c; unsigned long order; - u64 mask = 0x00ffffff, limit; /* ISA default */ + u64 mask = ISA_DMA_THRESHOLD, limit; if (!consistent_pte) { printk(KERN_ERR "%s: not initialised\n", __func__); @@ -148,19 +148,34 @@ if (dev) { mask = dev->coherent_dma_mask; + + /* + * Sanity check the DMA mask - it must be non-zero, and + * must be able to be satisfied by a DMA allocation. + */ if (mask == 0) { dev_warn(dev, "coherent DMA mask is unset\n"); - return NULL; + goto no_page; + } + + if ((~mask) & ISA_DMA_THRESHOLD) { + dev_warn(dev, "coherent DMA mask %#llx is smaller " + "than system GFP_DMA mask %#llx\n", + mask, (unsigned long long)ISA_DMA_THRESHOLD); + goto no_page; } } + /* + * Sanity check the allocation size. + */ size = PAGE_ALIGN(size); limit = (mask + 1) & ~mask; - if ((limit && size >= limit) || size >= (CONSISTENT_END - CONSISTENT_BASE)) { - printk(KERN_WARNING "coherent allocation too big (requested %#x mask %#Lx)\n", - size, mask); - *handle = ~0; - return NULL; + if ((limit && size >= limit) || + size >= (CONSISTENT_END - CONSISTENT_BASE)) { + printk(KERN_WARNING "coherent allocation too big " + "(requested %#x mask %#llx)\n", size, mask); + goto no_page; } order = get_order(size); @@ -221,6 +236,7 @@ if (page) __free_pages(page, order); no_page: + *handle = ~0; return NULL; } diff -Nru a/arch/arm/mm/init.c b/arch/arm/mm/init.c --- a/arch/arm/mm/init.c 2004-10-03 19:06:21 -07:00 +++ b/arch/arm/mm/init.c 2004-10-03 19:06:21 -07:00 @@ -590,7 +590,7 @@ * anywhere without overcommit, so turn * it on by default. */ - sysctl_overcommit_memory = 1; + sysctl_overcommit_memory = OVERCOMMIT_ALWAYS; } } diff -Nru a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types --- a/arch/arm/tools/mach-types 2004-10-03 19:06:21 -07:00 +++ b/arch/arm/tools/mach-types 2004-10-03 19:06:21 -07:00 @@ -6,7 +6,7 @@ # To add an entry into this database, please see Documentation/arm/README, # or contact rmk@arm.linux.org.uk # -# Last update: Mon Aug 16 19:22:37 2004 +# Last update: Thu Sep 30 15:23:21 2004 # # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number # @@ -519,7 +519,7 @@ omap_h3 MACH_OMAP_H3 OMAP_H3 509 omap_h4 MACH_OMAP_H4 OMAP_H4 510 n10 MACH_N10 N10 511 -montajade MACH_MONTAJADE MONTAJADE 512 +montejade MACH_MONTAJADE MONTAJADE 512 sg560 MACH_SG560 SG560 513 dp1000 MACH_DP1000 DP1000 514 omap_osk MACH_OMAP_OSK OMAP_OSK 515 @@ -582,7 +582,36 @@ computime MACH_COMPUTIME COMPUTIME 572 izarus MACH_IZARUS IZARUS 573 pxa_rts MACH_RTS RTS 574 -netgate5100 MACH_NETGATE5100 NETGATE5100 575 +se5100 MACH_SE5100 SE5100 575 s3c2510 MACH_S3C2510 S3C2510 576 csb437tl MACH_CSB437TL CSB437TL 577 slauson MACH_SLAUSON SLAUSON 578 +pearlriver MACH_PEARLRIVER PEARLRIVER 579 +tdc_p210 MACH_TDC_P210 TDC_P210 580 +sg580 MACH_SG580 SG580 581 +wrsbcarm7 MACH_WRSBCARM7 WRSBCARM7 582 +ipd MACH_IPD IPD 583 +pxa_dnp2110 MACH_PXA_DNP2110 PXA_DNP2110 584 +xaeniax MACH_XAENIAX XAENIAX 585 +somn4250 MACH_SOMN4250 SOMN4250 586 +pleb2 MACH_PLEB2 PLEB2 587 +cwl MACH_CWL CWL 588 +gd MACH_GD GD 589 +chaffee MACH_CHAFFEE CHAFFEE 590 +rms101 MACH_RMS101 RMS101 591 +rx3715 MACH_RX3715 RX3715 592 +swift MACH_SWIFT SWIFT 593 +roverp7 MACH_ROVERP7 ROVERP7 594 +pr818s MACH_PR818S PR818S 595 +trxpro MACH_TRXPRO TRXPRO 596 +nslu2 MACH_NSLU2 NSLU2 597 +e400 MACH_E400 E400 598 +trab MACH_TRAB TRAB 599 +cmc_pu2 MACH_CMC_PU2 CMC_PU2 600 +fulcrum MACH_FULCRUM FULCRUM 601 +netgate42x MACH_NETGATE42X NETGATE42X 602 +str710 MACH_STR710 STR710 603 +ixdpg425 MACH_IXDPG425 IXDPG425 604 +tomtomgo MACH_TOMTOMGO TOMTOMGO 605 +versatile_ab MACH_VERSATILE_AB VERSATILE_AB 606 +edb9307 MACH_EDB9307 EDB9307 607 diff -Nru a/arch/arm26/mm/init.c b/arch/arm26/mm/init.c --- a/arch/arm26/mm/init.c 2004-10-03 19:06:22 -07:00 +++ b/arch/arm26/mm/init.c 2004-10-03 19:06:22 -07:00 @@ -376,7 +376,7 @@ * Turn on overcommit on tiny machines */ if (PAGE_SIZE >= 16384 && num_physpages <= 128) { - sysctl_overcommit_memory = 1; + sysctl_overcommit_memory = OVERCOMMIT_ALWAYS; printk("Turning on overcommit\n"); } } diff -Nru a/arch/i386/kernel/kprobes.c b/arch/i386/kernel/kprobes.c --- a/arch/i386/kernel/kprobes.c 2004-10-03 19:06:21 -07:00 +++ b/arch/i386/kernel/kprobes.c 2004-10-03 19:06:21 -07:00 @@ -267,26 +267,26 @@ switch (val) { case DIE_INT3: if (kprobe_handler(args->regs)) - return NOTIFY_OK; + return NOTIFY_STOP; break; case DIE_DEBUG: if (post_kprobe_handler(args->regs)) - return NOTIFY_OK; + return NOTIFY_STOP; break; case DIE_GPF: if (kprobe_running() && kprobe_fault_handler(args->regs, args->trapnr)) - return NOTIFY_OK; + return NOTIFY_STOP; break; case DIE_PAGE_FAULT: if (kprobe_running() && kprobe_fault_handler(args->regs, args->trapnr)) - return NOTIFY_OK; + return NOTIFY_STOP; break; default: break; } - return NOTIFY_BAD; + return NOTIFY_DONE; } int setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs) diff -Nru a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c --- a/arch/i386/kernel/traps.c 2004-10-03 19:06:21 -07:00 +++ b/arch/i386/kernel/traps.c 2004-10-03 19:06:21 -07:00 @@ -459,7 +459,7 @@ info.si_code = sicode; \ info.si_addr = (void __user *)siaddr; \ if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \ - == NOTIFY_OK) \ + == NOTIFY_STOP) \ return; \ do_trap(trapnr, signr, str, 1, regs, error_code, &info); \ } @@ -528,7 +528,7 @@ gp_in_kernel: if (!fixup_exception(regs)) { if (notify_die(DIE_GPF, "general protection fault", regs, - error_code, 13, SIGSEGV) == NOTIFY_OK); + error_code, 13, SIGSEGV) == NOTIFY_STOP); return; die("general protection fault", regs, error_code); } @@ -602,7 +602,7 @@ if (!(reason & 0xc0)) { if (notify_die(DIE_NMI_IPI, "nmi_ipi", regs, reason, 0, SIGINT) - == NOTIFY_BAD) + == NOTIFY_STOP) return; #ifdef CONFIG_X86_LOCAL_APIC /* @@ -617,7 +617,7 @@ unknown_nmi_error(reason, regs); return; } - if (notify_die(DIE_NMI, "nmi", regs, reason, 0, SIGINT) == NOTIFY_BAD) + if (notify_die(DIE_NMI, "nmi", regs, reason, 0, SIGINT) == NOTIFY_STOP) return; if (reason & 0x80) mem_parity_error(reason, regs); @@ -666,7 +666,7 @@ asmlinkage int do_int3(struct pt_regs *regs, long error_code) { if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP) - == NOTIFY_OK) + == NOTIFY_STOP) return 1; /* This is an interrupt gate, because kprobes wants interrupts disabled. Normal trap handlers don't. */ @@ -707,7 +707,7 @@ __asm__ __volatile__("movl %%db6,%0" : "=r" (condition)); if (notify_die(DIE_DEBUG, "debug", regs, condition, error_code, - SIGTRAP) == NOTIFY_OK) + SIGTRAP) == NOTIFY_STOP) return; /* It's safe to allow irq's after DR6 has been saved */ if (regs->eflags & X86_EFLAGS_IF) diff -Nru a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c --- a/arch/i386/mm/fault.c 2004-10-03 19:06:21 -07:00 +++ b/arch/i386/mm/fault.c 2004-10-03 19:06:21 -07:00 @@ -227,7 +227,7 @@ __asm__("movl %%cr2,%0":"=r" (address)); if (notify_die(DIE_PAGE_FAULT, "page fault", regs, error_code, 14, - SIGSEGV) == NOTIFY_OK) + SIGSEGV) == NOTIFY_STOP) return; /* It's safe to allow irq's after cr2 has been saved */ if (regs->eflags & (X86_EFLAGS_IF|VM_MASK)) diff -Nru a/arch/ia64/Kconfig b/arch/ia64/Kconfig --- a/arch/ia64/Kconfig 2004-10-03 19:06:22 -07:00 +++ b/arch/ia64/Kconfig 2004-10-03 19:06:22 -07:00 @@ -280,6 +280,9 @@ depends on IA32_SUPPORT default y +config IA64_MCA_RECOVERY + tristate "MCA recovery from errors other than TLB." + config PERFMON bool "Performance monitor support" help diff -Nru a/arch/ia64/configs/bigsur_defconfig b/arch/ia64/configs/bigsur_defconfig --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ia64/configs/bigsur_defconfig 2004-10-03 19:06:22 -07:00 @@ -0,0 +1,1132 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.9-rc2 +# Tue Sep 28 13:26:53 2004 +# + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y + +# +# General setup +# +CONFIG_LOCALVERSION="" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +CONFIG_LOG_BUF_SHIFT=16 +CONFIG_HOTPLUG=y +# CONFIG_IKCONFIG is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +# CONFIG_TINY_SHMEM is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y +CONFIG_STOP_MACHINE=y + +# +# Processor type and features +# +CONFIG_IA64=y +CONFIG_64BIT=y +CONFIG_MMU=y +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_TIME_INTERPOLATION=y +CONFIG_EFI=y +CONFIG_GENERIC_IOMAP=y +# CONFIG_IA64_GENERIC is not set +CONFIG_IA64_DIG=y +# CONFIG_IA64_HP_ZX1 is not set +# CONFIG_IA64_SGI_SN2 is not set +# CONFIG_IA64_HP_SIM is not set +CONFIG_ITANIUM=y +# CONFIG_MCKINLEY is not set +# CONFIG_IA64_PAGE_SIZE_4KB is not set +# CONFIG_IA64_PAGE_SIZE_8KB is not set +CONFIG_IA64_PAGE_SIZE_16KB=y +# CONFIG_IA64_PAGE_SIZE_64KB is not set +CONFIG_IA64_BRL_EMU=y +# CONFIG_ITANIUM_BSTEP_SPECIFIC is not set +CONFIG_IA64_L1_CACHE_SHIFT=6 +# CONFIG_NUMA is not set +# CONFIG_VIRTUAL_MEM_MAP is not set +# CONFIG_IA64_CYCLONE is not set +CONFIG_IOSAPIC=y +CONFIG_FORCE_MAX_ZONEORDER=18 +CONFIG_SMP=y +CONFIG_NR_CPUS=2 +# CONFIG_HOTPLUG_CPU is not set +CONFIG_PREEMPT=y +CONFIG_HAVE_DEC_LOCK=y +CONFIG_IA32_SUPPORT=y +CONFIG_COMPAT=y +CONFIG_PERFMON=y +CONFIG_IA64_PALINFO=y + +# +# Firmware Drivers +# +CONFIG_EFI_VARS=y +CONFIG_EFI_PCDP=y +CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_MISC=m + +# +# Power management and ACPI +# +CONFIG_PM=y +CONFIG_ACPI=y + +# +# ACPI (Advanced Configuration and Power Interface) Support +# +CONFIG_ACPI_BOOT=y +CONFIG_ACPI_INTERPRETER=y +CONFIG_ACPI_BUTTON=m +CONFIG_ACPI_FAN=m +CONFIG_ACPI_PROCESSOR=m +CONFIG_ACPI_THERMAL=m +# CONFIG_ACPI_DEBUG is not set +CONFIG_ACPI_BUS=y +CONFIG_ACPI_POWER=y +CONFIG_ACPI_PCI=y +CONFIG_ACPI_SYSTEM=y + +# +# Bus options (PCI, PCMCIA) +# +CONFIG_PCI=y +CONFIG_PCI_DOMAINS=y +# CONFIG_PCI_MSI is not set +CONFIG_PCI_LEGACY_PROC=y +CONFIG_PCI_NAMES=y + +# +# PCI Hotplug Support +# +# CONFIG_HOTPLUG_PCI is not set + +# +# PCMCIA/CardBus support +# +# CONFIG_PCMCIA is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# + +# +# Block devices +# +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_UMEM is not set +CONFIG_BLK_DEV_LOOP=m +CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_NBD=m +# CONFIG_BLK_DEV_SX8 is not set +# CONFIG_BLK_DEV_UB is not set +CONFIG_BLK_DEV_RAM=m +CONFIG_BLK_DEV_RAM_SIZE=4096 + +# +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=m +CONFIG_BLK_DEV_IDE=m + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_BLK_DEV_IDEDISK=m +# CONFIG_IDEDISK_MULTI_MODE is not set +CONFIG_BLK_DEV_IDECD=m +# CONFIG_BLK_DEV_IDETAPE is not set +CONFIG_BLK_DEV_IDEFLOPPY=m +# CONFIG_BLK_DEV_IDESCSI is not set +# CONFIG_IDE_TASK_IOCTL is not set +# CONFIG_IDE_TASKFILE_IO is not set + +# +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=m +CONFIG_BLK_DEV_IDEPCI=y +CONFIG_IDEPCI_SHARE_IRQ=y +# CONFIG_BLK_DEV_OFFBOARD is not set +CONFIG_BLK_DEV_GENERIC=m +# CONFIG_BLK_DEV_OPTI621 is not set +CONFIG_BLK_DEV_IDEDMA_PCI=y +# CONFIG_BLK_DEV_IDEDMA_FORCED is not set +CONFIG_IDEDMA_PCI_AUTO=y +# CONFIG_IDEDMA_ONLYDISK is not set +# CONFIG_BLK_DEV_AEC62XX is not set +# CONFIG_BLK_DEV_ALI15X3 is not set +# CONFIG_BLK_DEV_AMD74XX is not set +# CONFIG_BLK_DEV_CMD64X is not set +# CONFIG_BLK_DEV_TRIFLEX is not set +# CONFIG_BLK_DEV_CY82C693 is not set +# CONFIG_BLK_DEV_CS5520 is not set +# CONFIG_BLK_DEV_CS5530 is not set +# CONFIG_BLK_DEV_HPT34X is not set +# CONFIG_BLK_DEV_HPT366 is not set +# CONFIG_BLK_DEV_SC1200 is not set +CONFIG_BLK_DEV_PIIX=m +# CONFIG_BLK_DEV_NS87415 is not set +# CONFIG_BLK_DEV_PDC202XX_OLD is not set +# CONFIG_BLK_DEV_PDC202XX_NEW is not set +# CONFIG_BLK_DEV_SVWKS is not set +# CONFIG_BLK_DEV_SIIMAGE is not set +# CONFIG_BLK_DEV_SLC90E66 is not set +# CONFIG_BLK_DEV_TRM290 is not set +# CONFIG_BLK_DEV_VIA82CXXX is not set +# CONFIG_IDE_ARM is not set +CONFIG_BLK_DEV_IDEDMA=y +# CONFIG_IDEDMA_IVB is not set +CONFIG_IDEDMA_AUTO=y +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +CONFIG_SCSI=y +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +# CONFIG_CHR_DEV_SG is not set + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +CONFIG_SCSI_CONSTANTS=y +CONFIG_SCSI_LOGGING=y + +# +# SCSI Transport Attributes +# +CONFIG_SCSI_SPI_ATTRS=m +# CONFIG_SCSI_FC_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_SCSI_3W_9XXX is not set +# CONFIG_SCSI_ACARD is not set +# CONFIG_SCSI_AACRAID is not set +# CONFIG_SCSI_AIC7XXX is not set +# CONFIG_SCSI_AIC7XXX_OLD is not set +# CONFIG_SCSI_AIC79XX is not set +# CONFIG_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_LEGACY is not set +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_BUSLOGIC is not set +# CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_EATA is not set +# CONFIG_SCSI_EATA_PIO is not set +# CONFIG_SCSI_FUTURE_DOMAIN is not set +# CONFIG_SCSI_GDTH is not set +# CONFIG_SCSI_IPS is not set +# CONFIG_SCSI_INIA100 is not set +# CONFIG_SCSI_SYM53C8XX_2 is not set +# CONFIG_SCSI_IPR is not set +# CONFIG_SCSI_QLOGIC_ISP is not set +# CONFIG_SCSI_QLOGIC_FC is not set +CONFIG_SCSI_QLOGIC_1280=y +CONFIG_SCSI_QLA2XXX=y +# CONFIG_SCSI_QLA21XX is not set +# CONFIG_SCSI_QLA22XX is not set +# CONFIG_SCSI_QLA2300 is not set +# CONFIG_SCSI_QLA2322 is not set +# CONFIG_SCSI_QLA6312 is not set +# CONFIG_SCSI_QLA6322 is not set +# CONFIG_SCSI_DC395x is not set +# CONFIG_SCSI_DC390T is not set +# CONFIG_SCSI_DEBUG is not set + +# +# Multi-device support (RAID and LVM) +# +CONFIG_MD=y +CONFIG_BLK_DEV_MD=m +CONFIG_MD_LINEAR=m +CONFIG_MD_RAID0=m +CONFIG_MD_RAID1=m +CONFIG_MD_RAID10=m +CONFIG_MD_RAID5=m +CONFIG_MD_RAID6=m +CONFIG_MD_MULTIPATH=m +CONFIG_BLK_DEV_DM=m +CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_MIRROR=m +CONFIG_DM_ZERO=m + +# +# Fusion MPT device support +# +# CONFIG_FUSION is not set + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set + +# +# Networking support +# +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +CONFIG_PACKET_MMAP=y +# CONFIG_NETLINK_DEV is not set +CONFIG_UNIX=y +# CONFIG_NET_KEY is not set +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +# CONFIG_IP_PNP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_IPV6 is not set +# CONFIG_NETFILTER is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +CONFIG_NETDEVICES=y +CONFIG_DUMMY=y +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set + +# +# ARCnet devices +# +# CONFIG_ARCNET is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +# CONFIG_HAPPYMEAL is not set +# CONFIG_SUNGEM is not set +# CONFIG_NET_VENDOR_3COM is not set + +# +# Tulip family network device support +# +# CONFIG_NET_TULIP is not set +# CONFIG_HP100 is not set +CONFIG_NET_PCI=y +# CONFIG_PCNET32 is not set +# CONFIG_AMD8111_ETH is not set +# CONFIG_ADAPTEC_STARFIRE is not set +# CONFIG_B44 is not set +# CONFIG_FORCEDETH is not set +# CONFIG_DGRS is not set +CONFIG_EEPRO100=y +# CONFIG_EEPRO100_PIO is not set +# CONFIG_E100 is not set +# CONFIG_FEALNX is not set +# CONFIG_NATSEMI is not set +# CONFIG_NE2K_PCI is not set +# CONFIG_8139CP is not set +# CONFIG_8139TOO is not set +# CONFIG_SIS900 is not set +# CONFIG_EPIC100 is not set +# CONFIG_SUNDANCE is not set +# CONFIG_VIA_RHINE is not set +# CONFIG_VIA_VELOCITY is not set + +# +# Ethernet (1000 Mbit) +# +# CONFIG_ACENIC is not set +# CONFIG_DL2K is not set +# CONFIG_E1000 is not set +# CONFIG_NS83820 is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set +# CONFIG_R8169 is not set +# CONFIG_SK98LIN is not set +# CONFIG_TIGON3 is not set + +# +# Ethernet (10000 Mbit) +# +# CONFIG_IXGB is not set +# CONFIG_S2IO is not set + +# +# Token Ring devices +# +# CONFIG_TR is not set + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_NET_FC is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Telephony Support +# +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input I/O drivers +# +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y +CONFIG_SERIO=y +CONFIG_SERIO_I8042=y +CONFIG_SERIO_SERPORT=y +# CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_PCIPS2 is not set +# CONFIG_SERIO_RAW is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=y +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +# CONFIG_SERIAL_8250_ACPI is not set +CONFIG_SERIAL_8250_NR_UARTS=4 +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_SHARE_IRQ=y +# CONFIG_SERIAL_8250_DETECT_IRQ is not set +# CONFIG_SERIAL_8250_MULTIPORT is not set +# CONFIG_SERIAL_8250_RSA is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_HW_RANDOM is not set +CONFIG_EFI_RTC=y +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set + +# +# Ftape, the floppy tape device driver +# +CONFIG_AGP=m +CONFIG_AGP_I460=m +CONFIG_DRM=y +# CONFIG_DRM_TDFX is not set +CONFIG_DRM_R128=m +# CONFIG_DRM_RADEON is not set +# CONFIG_DRM_MGA is not set +# CONFIG_DRM_SIS is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_HPET is not set + +# +# I2C support +# +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y + +# +# I2C Algorithms +# +CONFIG_I2C_ALGOBIT=y +# CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set + +# +# I2C Hardware Bus support +# +# CONFIG_I2C_ALI1535 is not set +# CONFIG_I2C_ALI1563 is not set +# CONFIG_I2C_ALI15X3 is not set +# CONFIG_I2C_AMD756 is not set +# CONFIG_I2C_AMD8111 is not set +# CONFIG_I2C_I801 is not set +# CONFIG_I2C_I810 is not set +# CONFIG_I2C_ISA is not set +# CONFIG_I2C_NFORCE2 is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_PROSAVAGE is not set +# CONFIG_I2C_SAVAGE4 is not set +# CONFIG_SCx200_ACB is not set +# CONFIG_I2C_SIS5595 is not set +# CONFIG_I2C_SIS630 is not set +# CONFIG_I2C_SIS96X is not set +# CONFIG_I2C_VIA is not set +# CONFIG_I2C_VIAPRO is not set +# CONFIG_I2C_VOODOO3 is not set +# CONFIG_I2C_PCA_ISA is not set + +# +# Hardware Sensors Chip support +# +# CONFIG_I2C_SENSOR is not set +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1031 is not set +# CONFIG_SENSORS_ASB100 is not set +# CONFIG_SENSORS_DS1621 is not set +# CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set +# CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set +# CONFIG_SENSORS_LM83 is not set +# CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_SMSC47M1 is not set +# CONFIG_SENSORS_VIA686A is not set +# CONFIG_SENSORS_W83781D is not set +# CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83627HF is not set + +# +# Other I2C Chip support +# +# CONFIG_SENSORS_EEPROM is not set +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_RTC8564 is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Misc devices +# + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +# CONFIG_FB is not set + +# +# Console display driver support +# +CONFIG_VGA_CONSOLE=y +CONFIG_DUMMY_CONSOLE=y + +# +# Sound +# +CONFIG_SOUND=m + +# +# Advanced Linux Sound Architecture +# +CONFIG_SND=m +CONFIG_SND_TIMER=m +CONFIG_SND_PCM=m +CONFIG_SND_HWDEP=m +CONFIG_SND_RAWMIDI=m +CONFIG_SND_SEQUENCER=m +# CONFIG_SND_SEQ_DUMMY is not set +CONFIG_SND_OSSEMUL=y +CONFIG_SND_MIXER_OSS=m +CONFIG_SND_PCM_OSS=m +# CONFIG_SND_SEQUENCER_OSS is not set +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set + +# +# Generic devices +# +CONFIG_SND_OPL3_LIB=m +# CONFIG_SND_DUMMY is not set +# CONFIG_SND_VIRMIDI is not set +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_MPU401 is not set + +# +# PCI devices +# +CONFIG_SND_AC97_CODEC=m +# CONFIG_SND_ALI5451 is not set +# CONFIG_SND_ATIIXP is not set +# CONFIG_SND_ATIIXP_MODEM is not set +# CONFIG_SND_AU8810 is not set +# CONFIG_SND_AU8820 is not set +# CONFIG_SND_AU8830 is not set +# CONFIG_SND_AZT3328 is not set +# CONFIG_SND_BT87X is not set +# CONFIG_SND_CS46XX is not set +CONFIG_SND_CS4281=m +# CONFIG_SND_EMU10K1 is not set +# CONFIG_SND_KORG1212 is not set +# CONFIG_SND_MIXART is not set +# CONFIG_SND_NM256 is not set +# CONFIG_SND_RME32 is not set +# CONFIG_SND_RME96 is not set +# CONFIG_SND_RME9652 is not set +# CONFIG_SND_HDSP is not set +# CONFIG_SND_TRIDENT is not set +# CONFIG_SND_YMFPCI is not set +# CONFIG_SND_ALS4000 is not set +# CONFIG_SND_CMIPCI is not set +# CONFIG_SND_ENS1370 is not set +# CONFIG_SND_ENS1371 is not set +# CONFIG_SND_ES1938 is not set +# CONFIG_SND_ES1968 is not set +# CONFIG_SND_MAESTRO3 is not set +# CONFIG_SND_FM801 is not set +# CONFIG_SND_ICE1712 is not set +# CONFIG_SND_ICE1724 is not set +# CONFIG_SND_INTEL8X0 is not set +# CONFIG_SND_INTEL8X0M is not set +# CONFIG_SND_SONICVIBES is not set +# CONFIG_SND_VIA82XX is not set +# CONFIG_SND_VX222 is not set + +# +# ALSA USB devices +# +# CONFIG_SND_USB_AUDIO is not set +# CONFIG_SND_USB_USX2Y is not set + +# +# Open Sound System +# +# CONFIG_SOUND_PRIME is not set + +# +# USB support +# +CONFIG_USB=m +# CONFIG_USB_DEBUG is not set + +# +# Miscellaneous USB options +# +CONFIG_USB_DEVICEFS=y +# CONFIG_USB_BANDWIDTH is not set +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_SUSPEND is not set +# CONFIG_USB_OTG is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_EHCI_HCD is not set +# CONFIG_USB_OHCI_HCD is not set +CONFIG_USB_UHCI_HCD=m + +# +# USB Device Class drivers +# +CONFIG_USB_AUDIO=m +CONFIG_USB_BLUETOOTH_TTY=m +CONFIG_USB_MIDI=m +CONFIG_USB_ACM=m +CONFIG_USB_PRINTER=m +CONFIG_USB_STORAGE=m +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_RW_DETECT is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_DPCM is not set +# CONFIG_USB_STORAGE_HP8200e is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set + +# +# USB Human Interface Devices (HID) +# +CONFIG_USB_HID=m +CONFIG_USB_HIDINPUT=y +# CONFIG_HID_FF is not set +CONFIG_USB_HIDDEV=y + +# +# USB HID Boot Protocol drivers +# +# CONFIG_USB_KBD is not set +# CONFIG_USB_MOUSE is not set +# CONFIG_USB_AIPTEK is not set +# CONFIG_USB_WACOM is not set +# CONFIG_USB_KBTAB is not set +# CONFIG_USB_POWERMATE is not set +# CONFIG_USB_MTOUCH is not set +# CONFIG_USB_EGALAX is not set +# CONFIG_USB_XPAD is not set +# CONFIG_USB_ATI_REMOTE is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set +# CONFIG_USB_HPUSBSCSI is not set + +# +# USB Multimedia devices +# +# CONFIG_USB_DABUSB is not set + +# +# Video4Linux support is needed for USB Multimedia device support +# + +# +# USB Network adaptors +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +# CONFIG_USB_USBNET is not set + +# +# USB port drivers +# + +# +# USB Serial Converter support +# +# CONFIG_USB_SERIAL is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_TIGL is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGETSERVO is not set +# CONFIG_USB_TEST is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_XATTR=y +# CONFIG_EXT3_FS_POSIX_ACL is not set +# CONFIG_EXT3_FS_SECURITY is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_FS_MBCACHE=y +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +CONFIG_FS_POSIX_ACL=y +CONFIG_XFS_FS=y +# CONFIG_XFS_RT is not set +CONFIG_XFS_QUOTA=y +CONFIG_XFS_SECURITY=y +CONFIG_XFS_POSIX_ACL=y +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_QUOTA is not set +CONFIG_QUOTACTL=y +CONFIG_AUTOFS_FS=m +CONFIG_AUTOFS4_FS=m + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +# CONFIG_ZISOFS is not set +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +# CONFIG_MSDOS_FS is not set +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y +# CONFIG_DEVFS_FS is not set +CONFIG_DEVPTS_FS_XATTR=y +CONFIG_DEVPTS_FS_SECURITY=y +CONFIG_TMPFS=y +CONFIG_HUGETLBFS=y +CONFIG_HUGETLB_PAGE=y +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_CRAMFS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=m +CONFIG_NFS_V3=y +CONFIG_NFS_V4=y +# CONFIG_NFS_DIRECTIO is not set +CONFIG_NFSD=m +CONFIG_NFSD_V3=y +CONFIG_NFSD_V4=y +CONFIG_NFSD_TCP=y +CONFIG_LOCKD=m +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=m +CONFIG_SUNRPC=m +CONFIG_SUNRPC_GSS=m +CONFIG_RPCSEC_GSS_KRB5=m +# CONFIG_RPCSEC_GSS_SPKM3 is not set +# CONFIG_SMB_FS is not set +CONFIG_CIFS=m +CONFIG_CIFS_STATS=y +CONFIG_CIFS_XATTR=y +CONFIG_CIFS_POSIX=y +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +CONFIG_SGI_PARTITION=y +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +CONFIG_EFI_PARTITION=y + +# +# Native Language Support +# +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set +CONFIG_NLS_ISO8859_1=y +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +CONFIG_NLS_UTF8=m + +# +# Library routines +# +# CONFIG_CRC_CCITT is not set +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set + +# +# Profiling support +# +CONFIG_PROFILING=y +CONFIG_OPROFILE=y + +# +# Kernel hacking +# +CONFIG_DEBUG_KERNEL=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_INFO is not set +# CONFIG_IA64_GRANULE_16MB is not set +CONFIG_IA64_GRANULE_64MB=y +# CONFIG_IA64_PRINT_HAZARDS is not set +# CONFIG_DISABLE_VHPT is not set +# CONFIG_IA64_DEBUG_CMPXCHG is not set +# CONFIG_IA64_DEBUG_IRQ is not set +CONFIG_SYSVIPC_COMPAT=y + +# +# Security options +# +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +CONFIG_CRYPTO=y +# CONFIG_CRYPTO_HMAC is not set +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_MD4 is not set +CONFIG_CRYPTO_MD5=y +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_WHIRLPOOL is not set +CONFIG_CRYPTO_DES=y +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_TWOFISH is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_AES is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +# CONFIG_CRYPTO_TEA is not set +# CONFIG_CRYPTO_ARC4 is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_DEFLATE is not set +# CONFIG_CRYPTO_MICHAEL_MIC is not set +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_TEST is not set diff -Nru a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile --- a/arch/ia64/kernel/Makefile 2004-10-03 19:06:22 -07:00 +++ b/arch/ia64/kernel/Makefile 2004-10-03 19:06:22 -07:00 @@ -17,6 +17,8 @@ obj-$(CONFIG_SMP) += smp.o smpboot.o obj-$(CONFIG_PERFMON) += perfmon_default_smpl.o obj-$(CONFIG_IA64_CYCLONE) += cyclone.o +obj-$(CONFIG_IA64_MCA_RECOVERY) += mca_recovery.o +mca_recovery-y += mca_drv.o mca_drv_asm.o # The gate DSO image is built using a special linker script. targets += gate.so gate-syms.o diff -Nru a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c --- a/arch/ia64/kernel/acpi.c 2004-10-03 19:06:21 -07:00 +++ b/arch/ia64/kernel/acpi.c 2004-10-03 19:06:21 -07:00 @@ -437,8 +437,9 @@ { int i, j, node_from, node_to; - /* If there's no SRAT, fix the phys_id */ + /* If there's no SRAT, fix the phys_id and mark node 0 online */ if (srat_num_cpus == 0) { + node_set_online(0); node_cpuid[0].phys_id = hard_smp_processor_id(); return; } diff -Nru a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c --- a/arch/ia64/kernel/mca.c 2004-10-03 19:06:21 -07:00 +++ b/arch/ia64/kernel/mca.c 2004-10-03 19:06:21 -07:00 @@ -82,11 +82,6 @@ # define IA64_MCA_DEBUG(fmt...) #endif -typedef struct ia64_fptr { - unsigned long fp; - unsigned long gp; -} ia64_fptr_t; - /* Used by mca_asm.S */ ia64_mca_sal_to_os_state_t ia64_sal_to_os_handoff_state; ia64_mca_os_to_sal_state_t ia64_os_to_sal_handoff_state; @@ -831,6 +826,31 @@ } +/* Function pointer for extra MCA recovery */ +int (*ia64_mca_ucmc_extension) + (void*,ia64_mca_sal_to_os_state_t*,ia64_mca_os_to_sal_state_t*) + = NULL; + +int +ia64_reg_MCA_extension(void *fn) +{ + if (ia64_mca_ucmc_extension) + return 1; + + ia64_mca_ucmc_extension = fn; + return 0; +} + +void +ia64_unreg_MCA_extension(void) +{ + if (ia64_mca_ucmc_extension) + ia64_mca_ucmc_extension = NULL; +} + +EXPORT_SYMBOL(ia64_reg_MCA_extension); +EXPORT_SYMBOL(ia64_unreg_MCA_extension); + /* * ia64_mca_ucmc_handler * @@ -852,10 +872,19 @@ { pal_processor_state_info_t *psp = (pal_processor_state_info_t *) &ia64_sal_to_os_handoff_state.proc_state_param; - int recover = psp->tc && !(psp->cc || psp->bc || psp->rc || psp->uc); + int recover; /* Get the MCA error record and log it */ ia64_mca_log_sal_error_record(SAL_INFO_TYPE_MCA); + + /* TLB error is only exist in this SAL error record */ + recover = (psp->tc && !(psp->cc || psp->bc || psp->rc || psp->uc)) + /* other error recovery */ + || (ia64_mca_ucmc_extension + && ia64_mca_ucmc_extension( + IA64_LOG_CURR_BUFFER(SAL_INFO_TYPE_MCA), + &ia64_sal_to_os_handoff_state, + &ia64_os_to_sal_handoff_state)); /* * Wakeup all the processors which are spinning in the rendezvous diff -Nru a/arch/ia64/kernel/mca_drv.c b/arch/ia64/kernel/mca_drv.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ia64/kernel/mca_drv.c 2004-10-03 19:06:22 -07:00 @@ -0,0 +1,639 @@ +/* + * File: mca_drv.c + * Purpose: Generic MCA handling layer + * + * Copyright (C) 2004 FUJITSU LIMITED + * Copyright (C) Hidetoshi Seto (seto.hidetoshi@jp.fujitsu.com) + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "mca_drv.h" + +/* max size of SAL error record (default) */ +static int sal_rec_max = 10000; + +/* from mca.c */ +static ia64_mca_sal_to_os_state_t *sal_to_os_handoff_state; +static ia64_mca_os_to_sal_state_t *os_to_sal_handoff_state; + +/* from mca_drv_asm.S */ +extern void *mca_handler_bhhook(void); + +static spinlock_t mca_bh_lock = SPIN_LOCK_UNLOCKED; + +typedef enum { + MCA_IS_LOCAL = 0, + MCA_IS_GLOBAL = 1 +} mca_type_t; + +#define MAX_PAGE_ISOLATE 32 + +static struct page *page_isolate[MAX_PAGE_ISOLATE]; +static int num_page_isolate = 0; + +typedef enum { + ISOLATE_NG = 0, + ISOLATE_OK = 1 +} isolate_status_t; + +/* + * This pool keeps pointers to the section part of SAL error record + */ +static struct { + slidx_list_t *buffer; /* section pointer list pool */ + int cur_idx; /* Current index of section pointer list pool */ + int max_idx; /* Maximum index of section pointer list pool */ +} slidx_pool; + +/** + * mca_page_isolate - isolate a poisoned page in order not to use it later + * @paddr: poisoned memory location + * + * Return value: + * ISOLATE_OK / ISOLATE_NG + */ + +static isolate_status_t +mca_page_isolate(unsigned long paddr) +{ + int i; + struct page *p; + + /* whether physical address is valid or not */ + if ( !ia64_phys_addr_valid(paddr) ) + return ISOLATE_NG; + + /* convert physical address to physical page number */ + p = pfn_to_page(paddr>>PAGE_SHIFT); + + /* check whether a page number have been already registered or not */ + for( i = 0; i < num_page_isolate; i++ ) + if( page_isolate[i] == p ) + return ISOLATE_OK; /* already listed */ + + /* limitation check */ + if( num_page_isolate == MAX_PAGE_ISOLATE ) + return ISOLATE_NG; + + /* kick pages having attribute 'SLAB' or 'Reserved' */ + if( PageSlab(p) || PageReserved(p) ) + return ISOLATE_NG; + + /* add attribute 'Reserved' and register the page */ + SetPageReserved(p); + page_isolate[num_page_isolate++] = p; + + return ISOLATE_OK; +} + +/** + * mca_hanlder_bh - Kill the process which occurred memory read error + * @paddr: poisoned address received from MCA Handler + */ + +void +mca_handler_bh(unsigned long paddr) +{ + printk(KERN_DEBUG "OS_MCA: process [pid: %d](%s) encounters MCA.\n", + current->pid, current->comm); + + spin_lock(&mca_bh_lock); + if (mca_page_isolate(paddr) == ISOLATE_OK) { + printk(KERN_DEBUG "Page isolation: ( %lx ) success.\n", paddr); + } else { + printk(KERN_DEBUG "Page isolation: ( %lx ) failure.\n", paddr); + } + spin_unlock(&mca_bh_lock); + + /* This process is about to be killed itself */ + force_sig(SIGKILL, current); + schedule(); +} + +/** + * mca_make_peidx - Make index of processor error section + * @slpi: pointer to record of processor error section + * @peidx: pointer to index of processor error section + */ + +static void +mca_make_peidx(sal_log_processor_info_t *slpi, peidx_table_t *peidx) +{ + /* + * calculate the start address of + * "struct cpuid_info" and "sal_processor_static_info_t". + */ + u64 total_check_num = slpi->valid.num_cache_check + + slpi->valid.num_tlb_check + + slpi->valid.num_bus_check + + slpi->valid.num_reg_file_check + + slpi->valid.num_ms_check; + u64 head_size = sizeof(sal_log_mod_error_info_t) * total_check_num + + sizeof(sal_log_processor_info_t); + u64 mid_size = slpi->valid.cpuid_info * sizeof(struct sal_cpuid_info); + + peidx_head(peidx) = slpi; + peidx_mid(peidx) = (struct sal_cpuid_info *) + (slpi->valid.cpuid_info ? ((char*)slpi + head_size) : NULL); + peidx_bottom(peidx) = (sal_processor_static_info_t *) + (slpi->valid.psi_static_struct ? + ((char*)slpi + head_size + mid_size) : NULL); +} + +/** + * mca_make_slidx - Make index of SAL error record + * @buffer: pointer to SAL error record + * @slidx: pointer to index of SAL error record + * + * Return value: + * 1 if record has platform error / 0 if not + */ +#define LOG_INDEX_ADD_SECT_PTR(sect, ptr) \ + { slidx_list_t *hl = &slidx_pool.buffer[slidx_pool.cur_idx]; \ + hl->hdr = ptr; \ + list_add(&hl->list, &(sect)); \ + slidx_pool.cur_idx = (slidx_pool.cur_idx + 1)%slidx_pool.max_idx; } + +static int +mca_make_slidx(void *buffer, slidx_table_t *slidx) +{ + int platform_err = 0; + int record_len = ((sal_log_record_header_t*)buffer)->len; + u32 ercd_pos; + int sects; + sal_log_section_hdr_t *sp; + + /* + * Initialize index referring current record + */ + INIT_LIST_HEAD(&(slidx->proc_err)); + INIT_LIST_HEAD(&(slidx->mem_dev_err)); + INIT_LIST_HEAD(&(slidx->sel_dev_err)); + INIT_LIST_HEAD(&(slidx->pci_bus_err)); + INIT_LIST_HEAD(&(slidx->smbios_dev_err)); + INIT_LIST_HEAD(&(slidx->pci_comp_err)); + INIT_LIST_HEAD(&(slidx->plat_specific_err)); + INIT_LIST_HEAD(&(slidx->host_ctlr_err)); + INIT_LIST_HEAD(&(slidx->plat_bus_err)); + INIT_LIST_HEAD(&(slidx->unsupported)); + + /* + * Extract a Record Header + */ + slidx->header = buffer; + + /* + * Extract each section records + * (arranged from "int ia64_log_platform_info_print()") + */ + for (ercd_pos = sizeof(sal_log_record_header_t), sects = 0; + ercd_pos < record_len; ercd_pos += sp->len, sects++) { + sp = (sal_log_section_hdr_t *)((char*)buffer + ercd_pos); + if (!efi_guidcmp(sp->guid, SAL_PROC_DEV_ERR_SECT_GUID)) { + LOG_INDEX_ADD_SECT_PTR(slidx->proc_err, sp); + } else if (!efi_guidcmp(sp->guid, SAL_PLAT_MEM_DEV_ERR_SECT_GUID)) { + platform_err = 1; + LOG_INDEX_ADD_SECT_PTR(slidx->mem_dev_err, sp); + } else if (!efi_guidcmp(sp->guid, SAL_PLAT_SEL_DEV_ERR_SECT_GUID)) { + platform_err = 1; + LOG_INDEX_ADD_SECT_PTR(slidx->sel_dev_err, sp); + } else if (!efi_guidcmp(sp->guid, SAL_PLAT_PCI_BUS_ERR_SECT_GUID)) { + platform_err = 1; + LOG_INDEX_ADD_SECT_PTR(slidx->pci_bus_err, sp); + } else if (!efi_guidcmp(sp->guid, SAL_PLAT_SMBIOS_DEV_ERR_SECT_GUID)) { + platform_err = 1; + LOG_INDEX_ADD_SECT_PTR(slidx->smbios_dev_err, sp); + } else if (!efi_guidcmp(sp->guid, SAL_PLAT_PCI_COMP_ERR_SECT_GUID)) { + platform_err = 1; + LOG_INDEX_ADD_SECT_PTR(slidx->pci_comp_err, sp); + } else if (!efi_guidcmp(sp->guid, SAL_PLAT_SPECIFIC_ERR_SECT_GUID)) { + platform_err = 1; + LOG_INDEX_ADD_SECT_PTR(slidx->plat_specific_err, sp); + } else if (!efi_guidcmp(sp->guid, SAL_PLAT_HOST_CTLR_ERR_SECT_GUID)) { + platform_err = 1; + LOG_INDEX_ADD_SECT_PTR(slidx->host_ctlr_err, sp); + } else if (!efi_guidcmp(sp->guid, SAL_PLAT_BUS_ERR_SECT_GUID)) { + platform_err = 1; + LOG_INDEX_ADD_SECT_PTR(slidx->plat_bus_err, sp); + } else { + LOG_INDEX_ADD_SECT_PTR(slidx->unsupported, sp); + } + } + slidx->n_sections = sects; + + return platform_err; +} + +/** + * init_record_index_pools - Initialize pool of lists for SAL record index + * + * Return value: + * 0 on Success / -ENOMEM on Failure + */ +static int +init_record_index_pools(void) +{ + int i; + int rec_max_size; /* Maximum size of SAL error records */ + int sect_min_size; /* Minimum size of SAL error sections */ + /* minimum size table of each section */ + static int sal_log_sect_min_sizes[] = { + sizeof(sal_log_processor_info_t) + sizeof(sal_processor_static_info_t), + sizeof(sal_log_mem_dev_err_info_t), + sizeof(sal_log_sel_dev_err_info_t), + sizeof(sal_log_pci_bus_err_info_t), + sizeof(sal_log_smbios_dev_err_info_t), + sizeof(sal_log_pci_comp_err_info_t), + sizeof(sal_log_plat_specific_err_info_t), + sizeof(sal_log_host_ctlr_err_info_t), + sizeof(sal_log_plat_bus_err_info_t), + }; + + /* + * MCA handler cannot allocate new memory on flight, + * so we preallocate enough memory to handle a SAL record. + * + * Initialize a handling set of slidx_pool: + * 1. Pick up the max size of SAL error records + * 2. Pick up the min size of SAL error sections + * 3. Allocate the pool as enough to 2 SAL records + * (now we can estimate the maxinum of section in a record.) + */ + + /* - 1 - */ + rec_max_size = sal_rec_max; + + /* - 2 - */ + sect_min_size = sal_log_sect_min_sizes[0]; + for (i = 1; i < sizeof sal_log_sect_min_sizes/sizeof(size_t); i++) + if (sect_min_size > sal_log_sect_min_sizes[i]) + sect_min_size = sal_log_sect_min_sizes[i]; + + /* - 3 - */ + slidx_pool.max_idx = (rec_max_size/sect_min_size) * 2 + 1; + slidx_pool.buffer = (slidx_list_t *) kmalloc(slidx_pool.max_idx * sizeof(slidx_list_t), GFP_KERNEL); + + return slidx_pool.buffer ? 0 : -ENOMEM; +} + + +/***************************************************************************** + * Recovery functions * + *****************************************************************************/ + +/** + * is_mca_global - Check whether this MCA is global or not + * @peidx: pointer of index of processor error section + * @pbci: pointer to pal_bus_check_info_t + * + * Return value: + * MCA_IS_LOCAL / MCA_IS_GLOBAL + */ + +static mca_type_t +is_mca_global(peidx_table_t *peidx, pal_bus_check_info_t *pbci) +{ + pal_processor_state_info_t *psp = (pal_processor_state_info_t*)peidx_psp(peidx); + + /* + * PAL can request a rendezvous, if the MCA has a global scope. + * If "rz_always" flag is set, SAL requests MCA rendezvous + * in spite of global MCA. + * Therefore it is local MCA when rendezvous has not been requested. + * Failed to rendezvous, the system must be down. + */ + switch (sal_to_os_handoff_state->imsto_rendez_state) { + case -1: /* SAL rendezvous unsuccessful */ + return MCA_IS_GLOBAL; + case 0: /* SAL rendezvous not required */ + return MCA_IS_LOCAL; + case 1: /* SAL rendezvous successful int */ + case 2: /* SAL rendezvous successful int with init */ + default: + break; + } + + /* + * If One or more Cache/TLB/Reg_File/Uarch_Check is here, + * it would be a local MCA. (i.e. processor internal error) + */ + if (psp->tc || psp->cc || psp->rc || psp->uc) + return MCA_IS_LOCAL; + + /* + * Bus_Check structure with Bus_Check.ib (internal bus error) flag set + * would be a global MCA. (e.g. a system bus address parity error) + */ + if (!pbci || pbci->ib) + return MCA_IS_GLOBAL; + + /* + * Bus_Check structure with Bus_Check.eb (external bus error) flag set + * could be either a local MCA or a global MCA. + * + * Referring Bus_Check.bsi: + * 0: Unknown/unclassified + * 1: BERR# + * 2: BINIT# + * 3: Hard Fail + * (FIXME: Are these SGI specific or generic bsi values?) + */ + if (pbci->eb) + switch (pbci->bsi) { + case 0: + /* e.g. a load from poisoned memory */ + return MCA_IS_LOCAL; + case 1: + case 2: + case 3: + return MCA_IS_GLOBAL; + } + + return MCA_IS_GLOBAL; +} + +/** + * recover_from_read_error - Try to recover the errors which type are "read"s. + * @slidx: pointer of index of SAL error record + * @peidx: pointer of index of processor error section + * @pbci: pointer of pal_bus_check_info + * + * Return value: + * 1 on Success / 0 on Failure + */ + +static int +recover_from_read_error(slidx_table_t *slidx, peidx_table_t *peidx, pal_bus_check_info_t *pbci) +{ + sal_log_mod_error_info_t *smei; + pal_min_state_area_t *pmsa; + struct ia64_psr *psr1, *psr2; + ia64_fptr_t *mca_hdlr_bh = (ia64_fptr_t*)mca_handler_bhhook; + + /* Is target address valid? */ + if (!pbci->tv) + return 0; + + /* + * cpu read or memory-mapped io read + * + * offending process affected process OS MCA do + * kernel mode kernel mode down system + * kernel mode user mode kill the process + * user mode kernel mode down system (*) + * user mode user mode kill the process + * + * (*) You could terminate offending user-mode process + * if (pbci->pv && pbci->pl != 0) *and* if you sure + * the process not have any locks of kernel. + */ + + psr1 =(struct ia64_psr *)&(peidx_minstate_area(peidx)->pmsa_ipsr); + + /* + * Check the privilege level of interrupted context. + * If it is user-mode, then terminate affected process. + */ + if (psr1->cpl != 0) { + smei = peidx_bus_check(peidx, 0); + if (smei->valid.target_identifier) { + /* + * setup for resume to bottom half of MCA, + * "mca_handler_bhhook" + */ + pmsa = (pal_min_state_area_t *)(sal_to_os_handoff_state->pal_min_state | (6ul<<61)); + /* pass to bhhook as 1st argument (gr8) */ + pmsa->pmsa_gr[8-1] = smei->target_identifier; + /* set interrupted return address (but no use) */ + pmsa->pmsa_br0 = pmsa->pmsa_iip; + /* change resume address to bottom half */ + pmsa->pmsa_iip = mca_hdlr_bh->fp; + pmsa->pmsa_gr[1-1] = mca_hdlr_bh->gp; + /* set cpl with kernel mode */ + psr2 = (struct ia64_psr *)&pmsa->pmsa_ipsr; + psr2->cpl = 0; + psr2->ri = 0; + + return 1; + } + + } + + return 0; +} + +/** + * recover_from_platform_error - Recover from platform error. + * @slidx: pointer of index of SAL error record + * @peidx: pointer of index of processor error section + * @pbci: pointer of pal_bus_check_info + * + * Return value: + * 1 on Success / 0 on Failure + */ + +static int +recover_from_platform_error(slidx_table_t *slidx, peidx_table_t *peidx, pal_bus_check_info_t *pbci) +{ + int status = 0; + pal_processor_state_info_t *psp = (pal_processor_state_info_t*)peidx_psp(peidx); + + if (psp->bc && pbci->eb && pbci->bsi == 0) { + switch(pbci->type) { + case 1: /* partial read */ + case 3: /* full line(cpu) read */ + case 9: /* I/O space read */ + status = recover_from_read_error(slidx, peidx, pbci); + break; + case 0: /* unknown */ + case 2: /* partial write */ + case 4: /* full line write */ + case 5: /* implicit or explicit write-back operation */ + case 6: /* snoop probe */ + case 7: /* incoming or outgoing ptc.g */ + case 8: /* write coalescing transactions */ + case 10: /* I/O space write */ + case 11: /* inter-processor interrupt message(IPI) */ + case 12: /* interrupt acknowledge or external task priority cycle */ + default: + break; + } + } + + return status; +} + +/** + * recover_from_processor_error + * @platform: whether there are some platform error section or not + * @slidx: pointer of index of SAL error record + * @peidx: pointer of index of processor error section + * @pbci: pointer of pal_bus_check_info + * + * Return value: + * 1 on Success / 0 on Failure + */ +/* + * Later we try to recover when below all conditions are satisfied. + * 1. Only one processor error section is exist. + * 2. BUS_CHECK is exist and the others are not exist.(Except TLB_CHECK) + * 3. The entry of BUS_CHECK_INFO is 1. + * 4. "External bus error" flag is set and the others are not set. + */ + +static int +recover_from_processor_error(int platform, slidx_table_t *slidx, peidx_table_t *peidx, pal_bus_check_info_t *pbci) +{ + pal_processor_state_info_t *psp = (pal_processor_state_info_t*)peidx_psp(peidx); + + /* + * We cannot recover errors with other than bus_check. + */ + if (psp->cc || psp->rc || psp->uc) + return 0; + + /* + * If there is no bus error, record is weird but we need not to recover. + */ + if (psp->bc == 0 || pbci == NULL) + return 1; + + /* + * Sorry, we cannot handle so many. + */ + if (peidx_bus_check_num(peidx) > 1) + return 0; + /* + * Well, here is only one bus error. + */ + if (pbci->ib || pbci->cc) + return 0; + if (pbci->eb && pbci->bsi > 0) + return 0; + if (psp->ci == 0) + return 0; + + /* + * This is a local MCA and estimated as recoverble external bus error. + * (e.g. a load from poisoned memory) + * This means "there are some platform errors". + */ + if (platform) + return recover_from_platform_error(slidx, peidx, pbci); + /* + * On account of strange SAL error record, we cannot recover. + */ + return 0; +} + +/** + * mca_try_to_recover - Try to recover from MCA + * @rec: pointer to a SAL error record + * + * Return value: + * 1 on Success / 0 on Failure + */ + +static int +mca_try_to_recover(void *rec, + ia64_mca_sal_to_os_state_t *sal_to_os_state, + ia64_mca_os_to_sal_state_t *os_to_sal_state) +{ + int platform_err; + int n_proc_err; + slidx_table_t slidx; + peidx_table_t peidx; + pal_bus_check_info_t pbci; + + /* handoff state from/to mca.c */ + sal_to_os_handoff_state = sal_to_os_state; + os_to_sal_handoff_state = os_to_sal_state; + + /* Make index of SAL error record */ + platform_err = mca_make_slidx(rec, &slidx); + + /* Count processor error sections */ + n_proc_err = slidx_count(&slidx, proc_err); + + /* Now, OS can recover when there is one processor error section */ + if (n_proc_err > 1) + return 0; + else if (n_proc_err == 0) { + /* Weird SAL record ... We need not to recover */ + + return 1; + } + + /* Make index of processor error section */ + mca_make_peidx((sal_log_processor_info_t*)slidx_first_entry(&slidx.proc_err)->hdr, &peidx); + + /* Extract Processor BUS_CHECK[0] */ + *((u64*)&pbci) = peidx_check_info(&peidx, bus_check, 0); + + /* Check whether MCA is global or not */ + if (is_mca_global(&peidx, &pbci)) + return 0; + + /* Try to recover a processor error */ + return recover_from_processor_error(platform_err, &slidx, &peidx, &pbci); +} + +/* + * ============================================================================= + */ + +int __init mca_external_handler_init(void) +{ + if (init_record_index_pools()) + return -ENOMEM; + + /* register external mca handlers */ + if (ia64_reg_MCA_extension(mca_try_to_recover)){ + printk(KERN_ERR "ia64_reg_MCA_extension failed.\n"); + kfree(slidx_pool.buffer); + return -EFAULT; + } + return 0; +} + +void __exit mca_external_handler_exit(void) +{ + /* unregister external mca handlers */ + ia64_unreg_MCA_extension(); + kfree(slidx_pool.buffer); +} + +module_init(mca_external_handler_init); +module_exit(mca_external_handler_exit); + +module_param(sal_rec_max, int, 0644); +MODULE_PARM_DESC(sal_rec_max, "Max size of SAL error record"); + +MODULE_DESCRIPTION("ia64 platform dependent mca handler driver"); +MODULE_LICENSE("GPL"); diff -Nru a/arch/ia64/kernel/mca_drv.h b/arch/ia64/kernel/mca_drv.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ia64/kernel/mca_drv.h 2004-10-03 19:06:22 -07:00 @@ -0,0 +1,113 @@ +/* + * File: mca_drv.h + * Purpose: Define helpers for Generic MCA handling + * + * Copyright (C) 2004 FUJITSU LIMITED + * Copyright (C) Hidetoshi Seto (seto.hidetoshi@jp.fujitsu.com) + */ +/* + * Processor error section: + * + * +-sal_log_processor_info_t *info-------------+ + * | sal_log_section_hdr_t header; | + * | ... | + * | sal_log_mod_error_info_t info[0]; | + * +-+----------------+-------------------------+ + * | CACHE_CHECK | ^ num_cache_check v + * +----------------+ + * | TLB_CHECK | ^ num_tlb_check v + * +----------------+ + * | BUS_CHECK | ^ num_bus_check v + * +----------------+ + * | REG_FILE_CHECK | ^ num_reg_file_check v + * +----------------+ + * | MS_CHECK | ^ num_ms_check v + * +-struct cpuid_info *id----------------------+ + * | regs[5]; | + * | reserved; | + * +-sal_processor_static_info_t *regs----------+ + * | valid; | + * | ... | + * | fr[128]; | + * +--------------------------------------------+ + */ + +/* peidx: index of processor error section */ +typedef struct peidx_table { + sal_log_processor_info_t *info; + struct sal_cpuid_info *id; + sal_processor_static_info_t *regs; +} peidx_table_t; + +#define peidx_head(p) (((p)->info)) +#define peidx_mid(p) (((p)->id)) +#define peidx_bottom(p) (((p)->regs)) + +#define peidx_psp(p) (&(peidx_head(p)->proc_state_parameter)) +#define peidx_field_valid(p) (&(peidx_head(p)->valid)) +#define peidx_minstate_area(p) (&(peidx_bottom(p)->min_state_area)) + +#define peidx_cache_check_num(p) (peidx_head(p)->valid.num_cache_check) +#define peidx_tlb_check_num(p) (peidx_head(p)->valid.num_tlb_check) +#define peidx_bus_check_num(p) (peidx_head(p)->valid.num_bus_check) +#define peidx_reg_file_check_num(p) (peidx_head(p)->valid.num_reg_file_check) +#define peidx_ms_check_num(p) (peidx_head(p)->valid.num_ms_check) + +#define peidx_cache_check_idx(p, n) (n) +#define peidx_tlb_check_idx(p, n) (peidx_cache_check_idx(p, peidx_cache_check_num(p)) + n) +#define peidx_bus_check_idx(p, n) (peidx_tlb_check_idx(p, peidx_tlb_check_num(p)) + n) +#define peidx_reg_file_check_idx(p, n) (peidx_bus_check_idx(p, peidx_bus_check_num(p)) + n) +#define peidx_ms_check_idx(p, n) (peidx_reg_file_check_idx(p, peidx_reg_file_check_num(p)) + n) + +#define peidx_mod_error_info(p, name, n) \ +({ int __idx = peidx_##name##_idx(p, n); \ + sal_log_mod_error_info_t *__ret = NULL; \ + if (peidx_##name##_num(p) > n) /*BUG*/ \ + __ret = &(peidx_head(p)->info[__idx]); \ + __ret; }) + +#define peidx_cache_check(p, n) peidx_mod_error_info(p, cache_check, n) +#define peidx_tlb_check(p, n) peidx_mod_error_info(p, tlb_check, n) +#define peidx_bus_check(p, n) peidx_mod_error_info(p, bus_check, n) +#define peidx_reg_file_check(p, n) peidx_mod_error_info(p, reg_file_check, n) +#define peidx_ms_check(p, n) peidx_mod_error_info(p, ms_check, n) + +#define peidx_check_info(proc, name, n) \ +({ \ + sal_log_mod_error_info_t *__info = peidx_mod_error_info(proc, name, n);\ + u64 __temp = __info && __info->valid.check_info \ + ? __info->check_info : 0; \ + __temp; }) + +/* slidx: index of SAL log error record */ + +typedef struct slidx_list { + struct list_head list; + sal_log_section_hdr_t *hdr; +} slidx_list_t; + +typedef struct slidx_table { + sal_log_record_header_t *header; + int n_sections; /* # of section headers */ + struct list_head proc_err; + struct list_head mem_dev_err; + struct list_head sel_dev_err; + struct list_head pci_bus_err; + struct list_head smbios_dev_err; + struct list_head pci_comp_err; + struct list_head plat_specific_err; + struct list_head host_ctlr_err; + struct list_head plat_bus_err; + struct list_head unsupported; /* list of unsupported sections */ +} slidx_table_t; + +#define slidx_foreach_entry(pos, head) \ + list_for_each_entry(pos, head, list) +#define slidx_first_entry(head) \ + (((head)->next != (head)) ? list_entry((head)->next, typeof(slidx_list_t), list) : NULL) +#define slidx_count(slidx, sec) \ +({ int __count = 0; \ + slidx_list_t *__pos; \ + slidx_foreach_entry(__pos, &((slidx)->sec)) { __count++; }\ + __count; }) + diff -Nru a/arch/ia64/kernel/mca_drv_asm.S b/arch/ia64/kernel/mca_drv_asm.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ia64/kernel/mca_drv_asm.S 2004-10-03 19:06:22 -07:00 @@ -0,0 +1,45 @@ +/* + * File: mca_drv_asm.S + * Purpose: Assembly portion of Generic MCA handling + * + * Copyright (C) 2004 FUJITSU LIMITED + * Copyright (C) Hidetoshi Seto (seto.hidetoshi@jp.fujitsu.com) + */ +#include +#include + +#include +#include + +GLOBAL_ENTRY(mca_handler_bhhook) + invala // clear RSE ? + ;; // + cover // + ;; // + clrrrb // + ;; + alloc r16=ar.pfs,0,2,1,0 // make a new frame + ;; + mov r13=IA64_KR(CURRENT) // current task pointer + ;; + adds r12=IA64_TASK_THREAD_KSP_OFFSET,r13 + ;; + ld8 r12=[r12] // stack pointer + ;; + mov loc0=r16 + movl loc1=mca_handler_bh // recovery C function + ;; + mov out0=r8 // poisoned address + mov b6=loc1 + ;; + mov loc1=rp + ;; + br.call.sptk.many rp=b6 // not return ... + ;; + mov ar.pfs=loc0 + mov rp=loc1 + ;; + mov r8=r0 + br.ret.sptk.many rp + ;; +END(mca_handler_bhhook) diff -Nru a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c --- a/arch/ia64/kernel/perfmon.c 2004-10-03 19:06:22 -07:00 +++ b/arch/ia64/kernel/perfmon.c 2004-10-03 19:06:22 -07:00 @@ -2286,7 +2286,7 @@ * if ((mm->total_vm << PAGE_SHIFT) + len> task->rlim[RLIMIT_AS].rlim_cur) * return -ENOMEM; */ - if (size > task->rlim[RLIMIT_MEMLOCK].rlim_cur) return -EAGAIN; + if (size > task->rlim[RLIMIT_MEMLOCK].rlim_cur) return -ENOMEM; /* * We do the easy to undo allocations first. @@ -2601,7 +2601,7 @@ */ if (task == current) return 0; - if (task->state != TASK_STOPPED) { + if ((task->state != TASK_STOPPED) && (task->state != TASK_TRACED)) { DPRINT(("cannot attach to non-stopped task [%d] state=%ld\n", task->pid, task->state)); return -EBUSY; } @@ -4755,7 +4755,7 @@ * the task must be stopped. */ if (PFM_CMD_STOPPED(cmd)) { - if (task->state != TASK_STOPPED) { + if ((task->state != TASK_STOPPED) && (task->state != TASK_TRACED)) { DPRINT(("[%d] task not in stopped state\n", task->pid)); return -EBUSY; } diff -Nru a/arch/ia64/sn/kernel/sn2/prominfo_proc.c b/arch/ia64/sn/kernel/sn2/prominfo_proc.c --- a/arch/ia64/sn/kernel/sn2/prominfo_proc.c 2004-10-03 19:06:21 -07:00 +++ b/arch/ia64/sn/kernel/sn2/prominfo_proc.c 2004-10-03 19:06:21 -07:00 @@ -14,50 +14,14 @@ #include #include #include -#include -#include - -/* to lookup nasids */ +#include #include +#include MODULE_DESCRIPTION("PROM version reporting for /proc"); MODULE_AUTHOR("Chad Talbott"); MODULE_LICENSE("GPL"); -#undef DEBUG_PROMINFO - -#define TRACE_PROMINFO - -#if defined(DEBUG_PROMINFO) -# define DPRINTK(x...) printk(KERN_DEBUG x) -#else -# define DPRINTK(x...) -#endif - -#if defined(TRACE_PROMINFO) && defined(DEBUG_PROMINFO) -# if defined(__GNUC__) -# define TRACE() printk(KERN_DEBUG "%s:%d:%s\n", \ - __FILE__, __LINE__, __FUNCTION__) -# else -# define TRACE() printk(KERN_DEBUG "%s:%d\n", __LINE__, __FILE__) -# endif -#else -# define TRACE() -#endif - -/* Architected IA64 firmware space */ -#define FW_BASE 0x00000000FF000000 -#define FW_TOP 0x0000000100000000 - -/* Sub-regions determined by bits in Node Offset */ -#define LB_PROM_SPACE 0x0000000700000000ul /* Local LB PROM */ - -/* Offset of PROM banner pointers in SAL A and SAL B */ -#define SAL_A_BANNER_OFFSET (1 * 16) -#define SAL_B_BANNER_OFFSET (3 * 16) - - -#define FIT_SIGNATURE 0x2020205f5449465ful /* Standard Intel FIT entry types */ #define FIT_ENTRY_FIT_HEADER 0x00 /* FIT header entry */ #define FIT_ENTRY_PAL_B 0x01 /* PAL_B entry */ @@ -90,12 +54,6 @@ #define FIT_TYPE(q) \ ((unsigned) ((q) >> FIT_TYPE_SHIFT) & FIT_TYPE_MASK) -#define FIT_ENTRY(type, maj, min, size) \ - ((((unsigned long)(maj) & FIT_MAJOR_MASK) << FIT_MAJOR_SHIFT) | \ - (((unsigned long)(min) & FIT_MINOR_MASK) << FIT_MINOR_SHIFT) | \ - (((unsigned long)(type) & FIT_TYPE_MASK) << FIT_TYPE_SHIFT) | \ - (size)) - struct fit_type_map_t { unsigned char type; const char *name; @@ -134,6 +92,39 @@ return "Unknown type"; } + +/* ============ BEGIN temp til old PROMs are no longer supported ============= + * + * The OS should not make direct access to the PROM flash memory. Access to + * this region must be serialized with a PROM lock. If SAL on one cpu is + * updating the FLASH error log at the same time another cpu is accessing the + * PROM, data corruption will occur. + * + * To solve the problem, all flash PROM access has been moved to SAL. Because + * not all systems will have instant PROM updates, we need to support a new OS + * running on a system with old PROMs. + * + * This code should be deleted after 1 OS/PROM release has occurred & the OS + * no longer supports downrev PROMs. (PROM support should be in the 3.50 + * PROMs). + */ +#define SUPPORT_OLD_PROMS +#ifdef SUPPORT_OLD_PROMS + + +#define FIT_SIGNATURE 0x2020205f5449465ful + +/* Sub-regions determined by bits in Node Offset */ +#define LB_PROM_SPACE 0x0000000700000000ul /* Local LB PROM */ + +/* Offset of PROM banner pointers in SAL A and SAL B */ +#define SAL_A_BANNER_OFFSET (1 * 16) +#define SAL_B_BANNER_OFFSET (3 * 16) + +/* Architected IA64 firmware space */ +#define FW_BASE 0x00000000FF000000 +#define FW_TOP 0x0000000100000000 + static unsigned long convert_fw_addr(nasid_t nasid, unsigned long addr) { @@ -154,32 +145,95 @@ return (addr >= FW_BASE && addr < FW_TOP); } -/* These two routines read the FIT table directly from the FLASH PROM - * on a specific node. The PROM can only be accessed using aligned 64 - * bit reads, so we do that and then shift and mask the result to get - * at each field. +static unsigned long * +lookup_fit(int nasid) +{ + unsigned long *fitp; + unsigned long fit_paddr; + unsigned long *fit_vaddr; + + fitp = (void *)GLOBAL_MMR_ADDR(nasid, LB_PROM_SPACE - 32); + fit_paddr = readq(fitp); + fit_vaddr = (unsigned long *) convert_fw_addr(nasid, fit_paddr); + return fit_vaddr; +} +#endif /* SUPPORT_OLD_PROMS */ +/* ============ END temp til old PROMs are no longer supported ============= */ + +static int +get_fit_entry(unsigned long nasid, int index, unsigned long *fentry, + char *banner, int banlen) +{ + int ret; + + ret = ia64_sn_get_fit_compt(nasid, index, fentry, banner, banlen); + +#ifdef SUPPORT_OLD_PROMS + /* The following is hack is temporary until PROMs are updated */ + if (ret == SALRET_NOT_IMPLEMENTED) { + unsigned long *fitadr = lookup_fit(nasid); + int nentries; + + if (readq(fitadr) != FIT_SIGNATURE) { + printk(KERN_WARNING "Unrecognized FIT signature"); + return -2; + } + + nentries = (unsigned int) (readq(fitadr + 1) & 0xffffff); + if (index >= nentries) + return -2; + + fentry[0] = readq(fitadr + 2 * index); + fentry[1] = readq(fitadr + 2 * index + 1); + ret = 0; + + if (banner && FIT_TYPE(fentry[1]) == FIT_ENTRY_SAL_A) { + unsigned long i, qw, *bwp, *qwp; + + banner[0] = '\0'; + qw = fentry[0]; /* Address of SAL A */ + if (!valid_fw_addr(qw)) + return 0; + + qw += SAL_A_BANNER_OFFSET; + qw = convert_fw_addr(nasid, qw); + + qw = readq(qw); /* Address of banner */ + if (!valid_fw_addr(qw)) + return 0; + qw = convert_fw_addr(nasid, qw); + qwp = (unsigned long *) qw; + bwp = (unsigned long *) banner; + for (i=0; i PAGE_SIZE); - p = page; - for (fentry = 0; fentry < nentries; fentry++) - /* each FIT entry is two 64 bit words */ - p += dump_fit_entry(p, fit + 2 * fentry); + for (index=0;;index++) { + BUG_ON(index * 60 > PAGE_SIZE); + if (get_fit_entry(nasid, index, fentry, NULL, 0)) + break; + p += dump_fit_entry(p, fentry); + } return p - page; } static int -dump_version(char *page, unsigned long *fit) +dump_version(char *page, unsigned long nasid) { - int nentries; - int fentry; - unsigned long qw = 0; + unsigned long fentry[2]; + char banner[128]; + int index; int len; - nasid_t nasid = NASID_GET(fit); - - TRACE(); - nentries = (unsigned)readq(fit + 1); - BUG_ON(nentries * 60 > PAGE_SIZE); - - for (fentry = 0; fentry < nentries; fentry++) { - qw = readq(fit + 2 * fentry + 1); - if (FIT_TYPE(qw) == FIT_ENTRY_SAL_A) + for (index = 0; ; index++) { + if (get_fit_entry(nasid, index, fentry, banner, + sizeof(banner))) + return 0; + if (FIT_TYPE(fentry[1]) == FIT_ENTRY_SAL_A) break; } - if (fentry >= nentries) - return 0; - len = sprintf(page, "%x.%02x\n", FIT_MAJOR(qw), FIT_MINOR(qw)); + len = sprintf(page, "%x.%02x\n", FIT_MAJOR(fentry[1]), + FIT_MINOR(fentry[1])); page += len; - qw = readq(fit + 2 * fentry); /* Address of SAL A */ - DPRINTK("SAL A at %p\n", (void *)qw); - if (!valid_fw_addr(qw)) - return len; - - qw += SAL_A_BANNER_OFFSET; - qw = convert_fw_addr(nasid, qw); - DPRINTK("Banner ptr at %p\n", (void *)qw); - - qw = readq(qw); /* Address of banner */ - if (!valid_fw_addr(qw)) - return len; - qw = convert_fw_addr(nasid, qw); - DPRINTK("Banner at %p\n", (void *)qw); + if (banner[0]) + len += snprintf(page, PAGE_SIZE-len, "%s\n", banner); - len += snprintf(page, PAGE_SIZE-len, "%s\n", (char *)qw); return len; } @@ -280,8 +303,8 @@ { int len = 0; - /* data holds the pointer to this node's FIT */ - len = dump_version(page, (unsigned long *)data); + /* data holds the NASID of the node */ + len = dump_version(page, (unsigned long)data); len = proc_calc_metrics(page, start, off, count, eof, len); return len; } @@ -292,52 +315,13 @@ { int len = 0; - /* data holds the pointer to this node's FIT */ - len = dump_fit(page, (unsigned long *)data); + /* data holds the NASID of the node */ + len = dump_fit(page, (unsigned long)data); len = proc_calc_metrics(page, start, off, count, eof, len); return len; } -/* this is a fake FIT that's used on the medusa simulator which - * doesn't usually run a complete PROM. - */ -#ifdef CONFIG_IA64_SGI_SN_SIM -static unsigned long fakefit[] = { - /* this is all we need to satisfy the code below */ - FIT_SIGNATURE, - FIT_ENTRY(FIT_ENTRY_FIT_HEADER, 0x02, 0x60, 2), - /* dump something arbitrary for - * /proc/sgi_prominfo/nodeX/version */ - 0xbadbeef00fa3ef17ul, - FIT_ENTRY(FIT_ENTRY_SAL_A, 0, 0x99, 0x100) -}; -#endif - -static unsigned long * -lookup_fit(int nasid) -{ - unsigned long *fitp; - unsigned long fit_paddr; - unsigned long *fit_vaddr; - -#ifdef CONFIG_IA64_SGI_SN_SIM - if (IS_RUNNING_ON_SIMULATOR()) - return fakefit; -#endif - - fitp = (void *)GLOBAL_MMR_ADDR(nasid, LB_PROM_SPACE - 32); - DPRINTK("pointer to fit at %p\n", (void *)fitp); - fit_paddr = readq(fitp); - DPRINTK("fit pointer contains %lx\n", fit_paddr); - - BUG_ON(!valid_fw_addr(fit_paddr)); - fit_vaddr = (void *)convert_fw_addr(nasid, fit_paddr); - - DPRINTK("fit at %p\n", (void *)fit_vaddr); - return fit_vaddr; -} - /* module entry points */ int __init prominfo_init(void); void __exit prominfo_exit(void); @@ -356,17 +340,12 @@ struct proc_dir_entry **entp; struct proc_dir_entry *p; cnodeid_t cnodeid; - nasid_t nasid; + unsigned long nasid; char name[NODE_NAME_LEN]; if (!ia64_platform_is("sn2")) return 0; - TRACE(); - - DPRINTK("running on cpu %d\n", smp_processor_id()); - DPRINTK("numnodes %d\n", numnodes); - proc_entries = kmalloc(numnodes * sizeof(struct proc_dir_entry *), GFP_KERNEL); @@ -380,12 +359,12 @@ nasid = cnodeid_to_nasid(cnodeid); p = create_proc_read_entry( "fit", 0, *entp, read_fit_entry, - lookup_fit(nasid)); + (void *)nasid); if (p) p->owner = THIS_MODULE; p = create_proc_read_entry( "version", 0, *entp, read_version_entry, - lookup_fit(nasid)); + (void *)nasid); if (p) p->owner = THIS_MODULE; } @@ -399,8 +378,6 @@ struct proc_dir_entry **entp; unsigned cnodeid; char name[NODE_NAME_LEN]; - - TRACE(); for (cnodeid = 0, entp = proc_entries; cnodeid < numnodes; diff -Nru a/arch/m32r/kernel/entry.S b/arch/m32r/kernel/entry.S --- a/arch/m32r/kernel/entry.S 2004-10-03 19:06:22 -07:00 +++ b/arch/m32r/kernel/entry.S 2004-10-03 19:06:22 -07:00 @@ -992,6 +992,16 @@ .long sys_mq_notify .long sys_mq_getsetattr .long sys_ni_syscall /* reserved for kexec */ + .long sys_waitid + .long sys_perfctr_info + .long sys_vperfctr_open + .long sys_vperfctr_control + .long sys_vperfctr_unlink + .long sys_vperfctr_iresume + .long sys_vperfctr_read /* 290 */ + .long sys_add_key + .long sys_request_key + .long sys_keyctl syscall_table_size=(.-sys_call_table) diff -Nru a/arch/m32r/kernel/irq.c b/arch/m32r/kernel/irq.c --- a/arch/m32r/kernel/irq.c 2004-10-03 19:06:21 -07:00 +++ b/arch/m32r/kernel/irq.c 2004-10-03 19:06:21 -07:00 @@ -187,15 +187,17 @@ struct pt_regs *regs, struct irqaction *action) { int status = 1; /* Force the "do bottom halves" bit */ - int retval = 0; + int ret, retval = 0; if (!(action->flags & SA_INTERRUPT)) local_irq_enable(); do { - status |= action->flags; - retval |= action->handler(irq, action->dev_id, regs); + ret = action->handler(irq, action->dev_id, regs); + if (ret == IRQ_HANDLED) + status |= action->flags; action = action->next; + retval |= ret; } while (action); if (status & SA_SAMPLE_RANDOM) add_interrupt_randomness(irq); diff -Nru a/arch/m32r/kernel/setup.c b/arch/m32r/kernel/setup.c --- a/arch/m32r/kernel/setup.c 2004-10-03 19:06:21 -07:00 +++ b/arch/m32r/kernel/setup.c 2004-10-03 19:06:21 -07:00 @@ -1,7 +1,7 @@ /* * linux/arch/m32r/kernel/setup.c * - * Setup routines for MITSUBISHI M32R + * Setup routines for Renesas M32R * * Copyright (c) 2001, 2002 Hiroyuki Kondo, Hirokazu Takata, * Hitoshi Yamamoto diff -Nru a/arch/m32r/kernel/setup_m32700ut.c b/arch/m32r/kernel/setup_m32700ut.c --- a/arch/m32r/kernel/setup_m32700ut.c 2004-10-03 19:06:22 -07:00 +++ b/arch/m32r/kernel/setup_m32700ut.c 2004-10-03 19:06:22 -07:00 @@ -1,7 +1,7 @@ /* * linux/arch/m32r/kernel/setup_m32700ut.c * - * Setup routines for MITSUBISHI M32700UT Board + * Setup routines for Renesas M32700UT Board * * Copyright (c) 2002 Hiroyuki Kondo, Hirokazu Takata, * Hitoshi Yamamoto, Takeo Takahashi @@ -9,8 +9,6 @@ * This file is subject to the terms and conditions of the GNU General * Public License. See the file "COPYING" in the main directory of this * archive for more details. - * - * $Id: setup_m32700ut.c,v 1.6 2003/11/27 10:18:49 takeo Exp $ */ #include diff -Nru a/arch/m32r/kernel/setup_mappi.c b/arch/m32r/kernel/setup_mappi.c --- a/arch/m32r/kernel/setup_mappi.c 2004-10-03 19:06:22 -07:00 +++ b/arch/m32r/kernel/setup_mappi.c 2004-10-03 19:06:22 -07:00 @@ -1,15 +1,11 @@ /* * linux/arch/m32r/kernel/setup_mappi.c * - * Setup routines for MITSUBISHI MAPPI Board + * Setup routines for Renesas MAPPI Board * * Copyright (c) 2001, 2002 Hiroyuki Kondo, Hirokazu Takata, * Hitoshi Yamamoto */ - -static char *rcsid = -"$Id$"; -static void use_rcsid(void) {rcsid = rcsid; use_rcsid();} #include #include diff -Nru a/arch/m32r/kernel/setup_mappi2.c b/arch/m32r/kernel/setup_mappi2.c --- a/arch/m32r/kernel/setup_mappi2.c 2004-10-03 19:06:21 -07:00 +++ b/arch/m32r/kernel/setup_mappi2.c 2004-10-03 19:06:21 -07:00 @@ -7,10 +7,6 @@ * Hitoshi Yamamoto, Mamoru Sakugawa */ -static char *rcsid = -"$Id$"; -static void use_rcsid(void) {rcsid = rcsid; use_rcsid();} - #include #include #include diff -Nru a/arch/m32r/kernel/setup_oaks32r.c b/arch/m32r/kernel/setup_oaks32r.c --- a/arch/m32r/kernel/setup_oaks32r.c 2004-10-03 19:06:22 -07:00 +++ b/arch/m32r/kernel/setup_oaks32r.c 2004-10-03 19:06:22 -07:00 @@ -7,10 +7,6 @@ * Hitoshi Yamamoto, Mamoru Sakugawa */ -static char *rcsid = -"$Id: setup_oaks32r.c,v 1.1 2004/03/31 05:06:18 sakugawa Exp $"; -static void use_rcsid(void) {rcsid = rcsid; use_rcsid();} - #include #include #include diff -Nru a/arch/m32r/kernel/setup_opsput.c b/arch/m32r/kernel/setup_opsput.c --- a/arch/m32r/kernel/setup_opsput.c 2004-10-03 19:06:21 -07:00 +++ b/arch/m32r/kernel/setup_opsput.c 2004-10-03 19:06:21 -07:00 @@ -10,8 +10,6 @@ * This file is subject to the terms and conditions of the GNU General * Public License. See the file "COPYING" in the main directory of this * archive for more details. - * - * $Id: setup_opsput.c,v 1.1 2004/07/27 06:54:20 sakugawa Exp $ */ #include diff -Nru a/arch/m32r/kernel/setup_usrv.c b/arch/m32r/kernel/setup_usrv.c --- a/arch/m32r/kernel/setup_usrv.c 2004-10-03 19:06:22 -07:00 +++ b/arch/m32r/kernel/setup_usrv.c 2004-10-03 19:06:22 -07:00 @@ -7,10 +7,6 @@ * Hitoshi Yamamoto */ -static char *rcsid = -"$Id$"; -static void use_rcsid(void) {rcsid = rcsid; use_rcsid();} - #include #include #include diff -Nru a/arch/m32r/kernel/signal.c b/arch/m32r/kernel/signal.c --- a/arch/m32r/kernel/signal.c 2004-10-03 19:06:21 -07:00 +++ b/arch/m32r/kernel/signal.c 2004-10-03 19:06:21 -07:00 @@ -404,9 +404,7 @@ return; give_sigsegv: - if (sig == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(sig, current); } static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, @@ -482,9 +480,7 @@ return; give_sigsegv: - if (sig == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(sig, current); } /* @@ -527,9 +523,6 @@ setup_rt_frame(sig, ka, info, oldset, regs); else setup_frame(sig, ka, oldset, regs); - - if (ka->sa.sa_flags & SA_ONESHOT) - ka->sa.sa_handler = SIG_DFL; if (!(ka->sa.sa_flags & SA_NODEFER)) { spin_lock_irq(¤t->sighand->siglock); diff -Nru a/arch/m32r/kernel/smp.c b/arch/m32r/kernel/smp.c --- a/arch/m32r/kernel/smp.c 2004-10-03 19:06:21 -07:00 +++ b/arch/m32r/kernel/smp.c 2004-10-03 19:06:21 -07:00 @@ -441,9 +441,10 @@ */ send_IPI_mask(cpumask, INVALIDATE_TLB_IPI, 0); - while (!cpus_empty(flush_cpumask)) + while (!cpus_empty(flush_cpumask)) { /* nothing. lockup detection does not belong here */ mb(); + } flush_mm = NULL; flush_vma = NULL; diff -Nru a/arch/mips/vr41xx/common/icu.c b/arch/mips/vr41xx/common/icu.c --- a/arch/mips/vr41xx/common/icu.c 2004-10-03 19:06:21 -07:00 +++ b/arch/mips/vr41xx/common/icu.c 2004-10-03 19:06:21 -07:00 @@ -165,217 +165,267 @@ { irq_desc_t *desc = irq_desc + PIU_IRQ; unsigned long flags; - uint16_t val; - spin_lock_irqsave(&desc->lock, flags); - val = read_icu1(MPIUINTREG); - val |= mask; - write_icu1(val, MPIUINTREG); - spin_unlock_irqrestore(&desc->lock, flags); + if (current_cpu_data.cputype == CPU_VR4111 || + current_cpu_data.cputype == CPU_VR4121) { + spin_lock_irqsave(&desc->lock, flags); + set_icu1(MPIUINTREG, mask); + spin_unlock_irqrestore(&desc->lock, flags); + } } +EXPORT_SYMBOL(vr41xx_enable_piuint); + void vr41xx_disable_piuint(uint16_t mask) { irq_desc_t *desc = irq_desc + PIU_IRQ; unsigned long flags; - uint16_t val; - spin_lock_irqsave(&desc->lock, flags); - val = read_icu1(MPIUINTREG); - val &= ~mask; - write_icu1(val, MPIUINTREG); - spin_unlock_irqrestore(&desc->lock, flags); + if (current_cpu_data.cputype == CPU_VR4111 || + current_cpu_data.cputype == CPU_VR4121) { + spin_lock_irqsave(&desc->lock, flags); + clear_icu1(MPIUINTREG, mask); + spin_unlock_irqrestore(&desc->lock, flags); + } } +EXPORT_SYMBOL(vr41xx_disable_piuint); + void vr41xx_enable_aiuint(uint16_t mask) { irq_desc_t *desc = irq_desc + AIU_IRQ; unsigned long flags; - uint16_t val; - spin_lock_irqsave(&desc->lock, flags); - val = read_icu1(MAIUINTREG); - val |= mask; - write_icu1(val, MAIUINTREG); - spin_unlock_irqrestore(&desc->lock, flags); + if (current_cpu_data.cputype == CPU_VR4111 || + current_cpu_data.cputype == CPU_VR4121) { + spin_lock_irqsave(&desc->lock, flags); + set_icu1(MAIUINTREG, mask); + spin_unlock_irqrestore(&desc->lock, flags); + } } +EXPORT_SYMBOL(vr41xx_enable_aiuint); + void vr41xx_disable_aiuint(uint16_t mask) { irq_desc_t *desc = irq_desc + AIU_IRQ; unsigned long flags; - uint16_t val; - spin_lock_irqsave(&desc->lock, flags); - val = read_icu1(MAIUINTREG); - val &= ~mask; - write_icu1(val, MAIUINTREG); - spin_unlock_irqrestore(&desc->lock, flags); + if (current_cpu_data.cputype == CPU_VR4111 || + current_cpu_data.cputype == CPU_VR4121) { + spin_lock_irqsave(&desc->lock, flags); + clear_icu1(MAIUINTREG, mask); + spin_unlock_irqrestore(&desc->lock, flags); + } } +EXPORT_SYMBOL(vr41xx_disable_aiuint); + void vr41xx_enable_kiuint(uint16_t mask) { irq_desc_t *desc = irq_desc + KIU_IRQ; unsigned long flags; - uint16_t val; - spin_lock_irqsave(&desc->lock, flags); - val = read_icu1(MKIUINTREG); - val |= mask; - write_icu1(val, MKIUINTREG); - spin_unlock_irqrestore(&desc->lock, flags); + if (current_cpu_data.cputype == CPU_VR4111 || + current_cpu_data.cputype == CPU_VR4121) { + spin_lock_irqsave(&desc->lock, flags); + set_icu1(MKIUINTREG, mask); + spin_unlock_irqrestore(&desc->lock, flags); + } } +EXPORT_SYMBOL(vr41xx_enable_kiuint); + void vr41xx_disable_kiuint(uint16_t mask) { irq_desc_t *desc = irq_desc + KIU_IRQ; unsigned long flags; - uint16_t val; - spin_lock_irqsave(&desc->lock, flags); - val = read_icu1(MKIUINTREG); - val &= ~mask; - write_icu1(val, MKIUINTREG); - spin_unlock_irqrestore(&desc->lock, flags); + if (current_cpu_data.cputype == CPU_VR4111 || + current_cpu_data.cputype == CPU_VR4121) { + spin_lock_irqsave(&desc->lock, flags); + clear_icu1(MKIUINTREG, mask); + spin_unlock_irqrestore(&desc->lock, flags); + } } +EXPORT_SYMBOL(vr41xx_disable_kiuint); + void vr41xx_enable_dsiuint(uint16_t mask) { irq_desc_t *desc = irq_desc + DSIU_IRQ; unsigned long flags; - uint16_t val; spin_lock_irqsave(&desc->lock, flags); - val = read_icu1(MDSIUINTREG); - val |= mask; - write_icu1(val, MDSIUINTREG); + set_icu1(MDSIUINTREG, mask); spin_unlock_irqrestore(&desc->lock, flags); } +EXPORT_SYMBOL(vr41xx_enable_dsiuint); + void vr41xx_disable_dsiuint(uint16_t mask) { irq_desc_t *desc = irq_desc + DSIU_IRQ; unsigned long flags; - uint16_t val; spin_lock_irqsave(&desc->lock, flags); - val = read_icu1(MDSIUINTREG); - val &= ~mask; - write_icu1(val, MDSIUINTREG); + clear_icu1(MDSIUINTREG, mask); spin_unlock_irqrestore(&desc->lock, flags); } +EXPORT_SYMBOL(vr41xx_disable_dsiuint); + void vr41xx_enable_firint(uint16_t mask) { irq_desc_t *desc = irq_desc + FIR_IRQ; unsigned long flags; - uint16_t val; spin_lock_irqsave(&desc->lock, flags); - val = read_icu2(MFIRINTREG); - val |= mask; - write_icu2(val, MFIRINTREG); + set_icu2(MFIRINTREG, mask); spin_unlock_irqrestore(&desc->lock, flags); } +EXPORT_SYMBOL(vr41xx_enable_firint); + void vr41xx_disable_firint(uint16_t mask) { irq_desc_t *desc = irq_desc + FIR_IRQ; unsigned long flags; - uint16_t val; spin_lock_irqsave(&desc->lock, flags); - val = read_icu2(MFIRINTREG); - val &= ~mask; - write_icu2(val, MFIRINTREG); + clear_icu2(MFIRINTREG, mask); spin_unlock_irqrestore(&desc->lock, flags); } +EXPORT_SYMBOL(vr41xx_disable_firint); + void vr41xx_enable_pciint(void) { irq_desc_t *desc = irq_desc + PCI_IRQ; unsigned long flags; - spin_lock_irqsave(&desc->lock, flags); - write_icu2(PCIINT0, MPCIINTREG); - spin_unlock_irqrestore(&desc->lock, flags); + if (current_cpu_data.cputype == CPU_VR4122 || + current_cpu_data.cputype == CPU_VR4131 || + current_cpu_data.cputype == CPU_VR4133) { + spin_lock_irqsave(&desc->lock, flags); + write_icu2(PCIINT0, MPCIINTREG); + spin_unlock_irqrestore(&desc->lock, flags); + } } +EXPORT_SYMBOL(vr41xx_enable_pciint); + void vr41xx_disable_pciint(void) { irq_desc_t *desc = irq_desc + PCI_IRQ; unsigned long flags; - spin_lock_irqsave(&desc->lock, flags); - write_icu2(0, MPCIINTREG); - spin_unlock_irqrestore(&desc->lock, flags); + if (current_cpu_data.cputype == CPU_VR4122 || + current_cpu_data.cputype == CPU_VR4131 || + current_cpu_data.cputype == CPU_VR4133) { + spin_lock_irqsave(&desc->lock, flags); + write_icu2(0, MPCIINTREG); + spin_unlock_irqrestore(&desc->lock, flags); + } } +EXPORT_SYMBOL(vr41xx_disable_pciint); + void vr41xx_enable_scuint(void) { irq_desc_t *desc = irq_desc + SCU_IRQ; unsigned long flags; - spin_lock_irqsave(&desc->lock, flags); - write_icu2(SCUINT0, MSCUINTREG); - spin_unlock_irqrestore(&desc->lock, flags); + if (current_cpu_data.cputype == CPU_VR4122 || + current_cpu_data.cputype == CPU_VR4131 || + current_cpu_data.cputype == CPU_VR4133) { + spin_lock_irqsave(&desc->lock, flags); + write_icu2(SCUINT0, MSCUINTREG); + spin_unlock_irqrestore(&desc->lock, flags); + } } +EXPORT_SYMBOL(vr41xx_enable_scuint); + void vr41xx_disable_scuint(void) { irq_desc_t *desc = irq_desc + SCU_IRQ; unsigned long flags; - spin_lock_irqsave(&desc->lock, flags); - write_icu2(0, MSCUINTREG); - spin_unlock_irqrestore(&desc->lock, flags); + if (current_cpu_data.cputype == CPU_VR4122 || + current_cpu_data.cputype == CPU_VR4131 || + current_cpu_data.cputype == CPU_VR4133) { + spin_lock_irqsave(&desc->lock, flags); + write_icu2(0, MSCUINTREG); + spin_unlock_irqrestore(&desc->lock, flags); + } } +EXPORT_SYMBOL(vr41xx_disable_scuint); + void vr41xx_enable_csiint(uint16_t mask) { irq_desc_t *desc = irq_desc + CSI_IRQ; unsigned long flags; - uint16_t val; - spin_lock_irqsave(&desc->lock, flags); - val = read_icu2(MCSIINTREG); - val |= mask; - write_icu2(val, MCSIINTREG); - spin_unlock_irqrestore(&desc->lock, flags); + if (current_cpu_data.cputype == CPU_VR4122 || + current_cpu_data.cputype == CPU_VR4131 || + current_cpu_data.cputype == CPU_VR4133) { + spin_lock_irqsave(&desc->lock, flags); + set_icu2(MCSIINTREG, mask); + spin_unlock_irqrestore(&desc->lock, flags); + } } +EXPORT_SYMBOL(vr41xx_enable_csiint); + void vr41xx_disable_csiint(uint16_t mask) { irq_desc_t *desc = irq_desc + CSI_IRQ; unsigned long flags; - uint16_t val; - spin_lock_irqsave(&desc->lock, flags); - val = read_icu2(MCSIINTREG); - val &= ~mask; - write_icu2(val, MCSIINTREG); - spin_unlock_irqrestore(&desc->lock, flags); + if (current_cpu_data.cputype == CPU_VR4122 || + current_cpu_data.cputype == CPU_VR4131 || + current_cpu_data.cputype == CPU_VR4133) { + spin_lock_irqsave(&desc->lock, flags); + clear_icu2(MCSIINTREG, mask); + spin_unlock_irqrestore(&desc->lock, flags); + } } +EXPORT_SYMBOL(vr41xx_disable_csiint); + void vr41xx_enable_bcuint(void) { irq_desc_t *desc = irq_desc + BCU_IRQ; unsigned long flags; - spin_lock_irqsave(&desc->lock, flags); - write_icu2(BCUINTR, MBCUINTREG); - spin_unlock_irqrestore(&desc->lock, flags); + if (current_cpu_data.cputype == CPU_VR4122 || + current_cpu_data.cputype == CPU_VR4131 || + current_cpu_data.cputype == CPU_VR4133) { + spin_lock_irqsave(&desc->lock, flags); + write_icu2(BCUINTR, MBCUINTREG); + spin_unlock_irqrestore(&desc->lock, flags); + } } +EXPORT_SYMBOL(vr41xx_enable_bcuint); + void vr41xx_disable_bcuint(void) { irq_desc_t *desc = irq_desc + BCU_IRQ; unsigned long flags; - spin_lock_irqsave(&desc->lock, flags); - write_icu2(0, MBCUINTREG); - spin_unlock_irqrestore(&desc->lock, flags); + if (current_cpu_data.cputype == CPU_VR4122 || + current_cpu_data.cputype == CPU_VR4131 || + current_cpu_data.cputype == CPU_VR4133) { + spin_lock_irqsave(&desc->lock, flags); + write_icu2(0, MBCUINTREG); + spin_unlock_irqrestore(&desc->lock, flags); + } } + +EXPORT_SYMBOL(vr41xx_disable_bcuint); /*=======================================================================*/ diff -Nru a/arch/mips/vr41xx/common/vrc4173.c b/arch/mips/vr41xx/common/vrc4173.c --- a/arch/mips/vr41xx/common/vrc4173.c 2004-10-03 19:06:22 -07:00 +++ b/arch/mips/vr41xx/common/vrc4173.c 2004-10-03 19:06:22 -07:00 @@ -316,6 +316,96 @@ spin_lock_init(&vrc4173_giu_lock); } +void vrc4173_enable_piuint(uint16_t mask) +{ + irq_desc_t *desc = irq_desc + VRC4173_PIU_IRQ; + unsigned long flags; + uint16_t val; + + spin_lock_irqsave(&desc->lock, flags); + val = vrc4173_inw(VRC4173_MPIUINTREG); + val |= mask; + vrc4173_outw(val, VRC4173_MPIUINTREG); + spin_unlock_irqrestore(&desc->lock, flags); +} + +EXPORT_SYMBOL(vrc4173_eanble_piuint); + +void vrc4173_disable_piuint(uint16_t mask) +{ + irq_desc_t *desc = irq_desc + VRC4173_PIU_IRQ; + unsigned long flags; + uint16_t val; + + spin_lock_irqsave(&desc->lock, flags); + val = vrc4173_inw(VRC4173_MPIUINTREG); + val &= ~mask; + vrc4173_outw(val, VRC4173_MPIUINTREG); + spin_unlock_irqrestore(&desc->lock, flags); +} + +EXPORT_SYMBOL(vrc4173_disable_piuint); + +void vrc4173_enable_aiuint(uint16_t mask) +{ + irq_desc_t *desc = irq_desc + VRC4173_AIU_IRQ; + unsigned long flags; + uint16_t val; + + spin_lock_irqsave(&desc->lock, flags); + val = vrc4173_inw(VRC4173_MAIUINTREG); + val |= mask; + vrc4173_outw(val, VRC4173_MAIUINTREG); + spin_unlock_irqrestore(&desc->lock, flags); +} + +EXPORT_SYMBOL(vrc4173_enable_aiuint); + +void vrc4173_disable_aiuint(uint16_t mask) +{ + irq_desc_t *desc = irq_desc + VRC4173_AIU_IRQ; + unsigned long flags; + uint16_t val; + + spin_lock_irqsave(&desc->lock, flags); + val = vrc4173_inw(VRC4173_MAIUINTREG); + val &= ~mask; + vrc4173_outw(val, VRC4173_MAIUINTREG); + spin_unlock_irqrestore(&desc->lock, flags); +} + +EXPORT_SYMBOL(vrc4173_disable_aiuint); + +void vrc4173_enable_kiuint(uint16_t mask) +{ + irq_desc_t *desc = irq_desc + VRC4173_KIU_IRQ; + unsigned long flags; + uint16_t val; + + spin_lock_irqsave(&desc->lock, flags); + val = vrc4173_inw(VRC4173_MKIUINTREG); + val |= mask; + vrc4173_outw(val, VRC4173_MKIUINTREG); + spin_unlock_irqrestore(&desc->lock, flags); +} + +EXPORT_SYMBOL(vrc4173_enable_kiuint); + +void vrc4173_disable_kiuint(uint16_t mask) +{ + irq_desc_t *desc = irq_desc + VRC4173_KIU_IRQ; + unsigned long flags; + uint16_t val; + + spin_lock_irqsave(&desc->lock, flags); + val = vrc4173_inw(VRC4173_MKIUINTREG); + val &= ~mask; + vrc4173_outw(val, VRC4173_MKIUINTREG); + spin_unlock_irqrestore(&desc->lock, flags); +} + +EXPORT_SYMBOL(vrc4173_disable_kiuint); + static void enable_vrc4173_irq(unsigned int irq) { uint16_t val; diff -Nru a/arch/ppc/configs/mvme5100_defconfig b/arch/ppc/configs/mvme5100_defconfig --- a/arch/ppc/configs/mvme5100_defconfig 2004-10-03 19:06:21 -07:00 +++ b/arch/ppc/configs/mvme5100_defconfig 2004-10-03 19:06:21 -07:00 @@ -1,5 +1,7 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.9-rc2 +# Wed Sep 22 09:53:26 2004 # CONFIG_MMU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y @@ -7,6 +9,7 @@ CONFIG_PPC=y CONFIG_PPC32=y CONFIG_GENERIC_NVRAM=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options @@ -18,6 +21,7 @@ # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set @@ -27,7 +31,7 @@ CONFIG_LOG_BUF_SHIFT=14 # CONFIG_HOTPLUG is not set # CONFIG_IKCONFIG is not set -# CONFIG_EMBEDDED is not set +CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y @@ -37,6 +41,8 @@ CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +# CONFIG_TINY_SHMEM is not set # # Loadable module support @@ -95,7 +101,6 @@ # CONFIG_SMP is not set # CONFIG_PREEMPT is not set # CONFIG_HIGHMEM is not set -CONFIG_KERNEL_ELF=y CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_MISC is not set CONFIG_CMDLINE_BOOL=y @@ -233,7 +238,8 @@ # CONFIG_SCSI_AIC7XXX_OLD is not set # CONFIG_SCSI_AIC79XX is not set # CONFIG_SCSI_DPT_I2O is not set -# CONFIG_SCSI_MEGARAID is not set +# CONFIG_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_LEGACY is not set # CONFIG_SCSI_SATA is not set # CONFIG_SCSI_BUSLOGIC is not set # CONFIG_SCSI_DMX3191D is not set @@ -316,6 +322,7 @@ # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +CONFIG_INET_TUNNEL=m # # IP: Virtual Server Configuration @@ -329,54 +336,47 @@ # IP: Netfilter Configuration # CONFIG_IP_NF_CONNTRACK=m +# CONFIG_IP_NF_CT_ACCT is not set +# CONFIG_IP_NF_CT_PROTO_SCTP is not set CONFIG_IP_NF_FTP=m CONFIG_IP_NF_IRC=m -# CONFIG_IP_NF_TFTP is not set -# CONFIG_IP_NF_AMANDA is not set +CONFIG_IP_NF_TFTP=m +CONFIG_IP_NF_AMANDA=m # CONFIG_IP_NF_QUEUE is not set CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_LIMIT=m +# CONFIG_IP_NF_MATCH_LIMIT is not set # CONFIG_IP_NF_MATCH_IPRANGE is not set -CONFIG_IP_NF_MATCH_MAC=m -CONFIG_IP_NF_MATCH_PKTTYPE=m -CONFIG_IP_NF_MATCH_MARK=m -CONFIG_IP_NF_MATCH_MULTIPORT=m -CONFIG_IP_NF_MATCH_TOS=m +# CONFIG_IP_NF_MATCH_MAC is not set +# CONFIG_IP_NF_MATCH_PKTTYPE is not set +# CONFIG_IP_NF_MATCH_MARK is not set +# CONFIG_IP_NF_MATCH_MULTIPORT is not set +# CONFIG_IP_NF_MATCH_TOS is not set # CONFIG_IP_NF_MATCH_RECENT is not set -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m -CONFIG_IP_NF_MATCH_LENGTH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_TCPMSS=m +# CONFIG_IP_NF_MATCH_ECN is not set +# CONFIG_IP_NF_MATCH_DSCP is not set +# CONFIG_IP_NF_MATCH_AH_ESP is not set +# CONFIG_IP_NF_MATCH_LENGTH is not set +# CONFIG_IP_NF_MATCH_TTL is not set +# CONFIG_IP_NF_MATCH_TCPMSS is not set CONFIG_IP_NF_MATCH_HELPER=m -CONFIG_IP_NF_MATCH_STATE=m -CONFIG_IP_NF_MATCH_CONNTRACK=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -# CONFIG_IP_NF_TARGET_NETMAP is not set -# CONFIG_IP_NF_TARGET_SAME is not set -# CONFIG_IP_NF_NAT_LOCAL is not set -# CONFIG_IP_NF_NAT_SNMP_BASIC is not set -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -# CONFIG_IP_NF_MANGLE is not set -# CONFIG_IP_NF_TARGET_LOG is not set -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -# CONFIG_IP_NF_ARP_MANGLE is not set -CONFIG_IP_NF_COMPAT_IPCHAINS=m -# CONFIG_IP_NF_COMPAT_IPFWADM is not set -# CONFIG_IP_NF_RAW is not set +# CONFIG_IP_NF_MATCH_STATE is not set +# CONFIG_IP_NF_MATCH_CONNTRACK is not set +# CONFIG_IP_NF_MATCH_OWNER is not set # CONFIG_IP_NF_MATCH_ADDRTYPE is not set # CONFIG_IP_NF_MATCH_REALM is not set +# CONFIG_IP_NF_MATCH_SCTP is not set +# CONFIG_IP_NF_FILTER is not set +# CONFIG_IP_NF_TARGET_LOG is not set +# CONFIG_IP_NF_TARGET_ULOG is not set +# CONFIG_IP_NF_TARGET_TCPMSS is not set +# CONFIG_IP_NF_NAT is not set +# CONFIG_IP_NF_MANGLE is not set +# CONFIG_IP_NF_RAW is not set +# CONFIG_IP_NF_ARPTABLES is not set +# CONFIG_IP_NF_COMPAT_IPCHAINS is not set +# CONFIG_IP_NF_COMPAT_IPFWADM is not set +CONFIG_XFRM=y +CONFIG_XFRM_USER=y # # SCTP Configuration (EXPERIMENTAL) @@ -434,7 +434,15 @@ # # Tulip family network device support # -# CONFIG_NET_TULIP is not set +CONFIG_NET_TULIP=y +# CONFIG_DE2104X is not set +CONFIG_TULIP=y +# CONFIG_TULIP_MWI is not set +# CONFIG_TULIP_MMIO is not set +# CONFIG_TULIP_NAPI is not set +# CONFIG_DE4X5 is not set +# CONFIG_WINBOND_840 is not set +# CONFIG_DM9102 is not set # CONFIG_HP100 is not set CONFIG_NET_PCI=y # CONFIG_PCNET32 is not set @@ -512,54 +520,28 @@ # # Input device support # -CONFIG_INPUT=y +# CONFIG_INPUT is not set # # Userland interfaces # -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -# CONFIG_INPUT_EVDEV is not set -# CONFIG_INPUT_EVBUG is not set # # Input I/O drivers # # CONFIG_GAMEPORT is not set CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PCIPS2 is not set +# CONFIG_SERIO is not set +# CONFIG_SERIO_I8042 is not set # # Input Device Drivers # -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set # # Character devices # -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y +# CONFIG_VT is not set # CONFIG_SERIAL_NONSTANDARD is not set # @@ -578,7 +560,6 @@ CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -633,13 +614,6 @@ # CONFIG_FB is not set # -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -# CONFIG_MDA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y - -# # Sound # # CONFIG_SOUND is not set @@ -726,6 +700,7 @@ # CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set @@ -747,7 +722,7 @@ # Library routines # # CONFIG_CRC_CCITT is not set -# CONFIG_CRC32 is not set +CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set # diff -Nru a/arch/ppc/platforms/pmac_pci.c b/arch/ppc/platforms/pmac_pci.c --- a/arch/ppc/platforms/pmac_pci.c 2004-10-03 19:06:21 -07:00 +++ b/arch/ppc/platforms/pmac_pci.c 2004-10-03 19:06:21 -07:00 @@ -316,6 +316,10 @@ unsigned int addr; int i; + struct device_node *np = pci_busdev_to_OF_node(bus, devfn); + if (np == NULL) + return PCIBIOS_DEVICE_NOT_FOUND; + /* * When a device in K2 is powered down, we die on config * cycle accesses. Fix that here. @@ -363,6 +367,9 @@ unsigned int addr; int i; + struct device_node *np = pci_busdev_to_OF_node(bus, devfn); + if (np == NULL) + return PCIBIOS_DEVICE_NOT_FOUND; /* * When a device in K2 is powered down, we die on config * cycle accesses. Fix that here. diff -Nru a/arch/ppc64/boot/Makefile b/arch/ppc64/boot/Makefile --- a/arch/ppc64/boot/Makefile 2004-10-03 19:06:22 -07:00 +++ b/arch/ppc64/boot/Makefile 2004-10-03 19:06:22 -07:00 @@ -31,7 +31,6 @@ BOOTLD := $(CROSS32_COMPILE)ld BOOTLFLAGS := -Ttext 0x00400000 -e _start -T $(srctree)/$(src)/zImage.lds BOOTOBJCOPY := $(CROSS32_COMPILE)objcopy -BOOTSTRIP := $(CROSS32_COMPILE)strip OBJCOPYFLAGS := contents,alloc,load,readonly,data src-boot := crt0.S string.S prom.c main.c zlib.c imagesize.c div64.S @@ -71,7 +70,7 @@ cmd_ramdisk = $(obj)/addRamDisk $(obj)/ramdisk.image.gz $< $@ quiet_cmd_stripvm = STRIP $@ - cmd_stripvm = $(BOOTSTRIP) -s $< -o $@ + cmd_stripvm = $(STRIP) -s $< -o $@ vmlinux.strip: vmlinux FORCE $(call if_changed,stripvm) diff -Nru a/arch/ppc64/kernel/head.S b/arch/ppc64/kernel/head.S --- a/arch/ppc64/kernel/head.S 2004-10-03 19:06:21 -07:00 +++ b/arch/ppc64/kernel/head.S 2004-10-03 19:06:21 -07:00 @@ -551,14 +551,14 @@ .llong 0 /* Reserved */ .llong 0 /* Reserved */ .llong (KERNELBASE>>SID_SHIFT) - .llong 0x40bffffd5 /* KERNELBASE VSID */ + .llong 0x408f92c94 /* KERNELBASE VSID */ /* We have to list the bolted VMALLOC segment here, too, so that it * will be restored on shared processor switch */ .llong (VMALLOCBASE>>SID_SHIFT) - .llong 0xb0cffffd1 /* VMALLOCBASE VSID */ + .llong 0xf09b89af5 /* VMALLOCBASE VSID */ .llong 8192 /* # pages to map (32 MB) */ .llong 0 /* Offset from start of loadarea to start of map */ - .llong 0x40bffffd50000 /* VPN of first page to map */ + .llong 0x408f92c940000 /* VPN of first page to map */ . = 0x6100 diff -Nru a/arch/ppc64/kernel/pmac_feature.c b/arch/ppc64/kernel/pmac_feature.c --- a/arch/ppc64/kernel/pmac_feature.c 2004-10-03 19:06:22 -07:00 +++ b/arch/ppc64/kernel/pmac_feature.c 2004-10-03 19:06:22 -07:00 @@ -343,6 +343,10 @@ PMAC_TYPE_POWERMAC_G5, g5_features, 0, }, + { "PowerMac7,3", "PowerMac G5", + PMAC_TYPE_POWERMAC_G5, g5_features, + 0, + }, { "RackMac3,1", "XServe G5", PMAC_TYPE_POWERMAC_G5, g5_features, 0, diff -Nru a/arch/ppc64/kernel/pmac_pci.c b/arch/ppc64/kernel/pmac_pci.c --- a/arch/ppc64/kernel/pmac_pci.c 2004-10-03 19:06:22 -07:00 +++ b/arch/ppc64/kernel/pmac_pci.c 2004-10-03 19:06:22 -07:00 @@ -271,7 +271,7 @@ int offset, int len, u32 *val) { struct pci_controller *hose; - struct device_node *busdn; + struct device_node *busdn, *dn; unsigned long addr; if (bus->self) @@ -282,6 +282,16 @@ return PCIBIOS_DEVICE_NOT_FOUND; hose = busdn->phb; if (hose == NULL) + return PCIBIOS_DEVICE_NOT_FOUND; + + /* We only allow config cycles to devices that are in OF device-tree + * as we are apparently having some weird things going on with some + * revs of K2 on recent G5s + */ + for (dn = busdn->child; dn; dn = dn->sibling) + if (dn->devfn == devfn) + break; + if (dn == NULL) return PCIBIOS_DEVICE_NOT_FOUND; addr = u3_ht_cfg_access(hose, bus->number, devfn, offset); diff -Nru a/arch/ppc64/kernel/process.c b/arch/ppc64/kernel/process.c --- a/arch/ppc64/kernel/process.c 2004-10-03 19:06:22 -07:00 +++ b/arch/ppc64/kernel/process.c 2004-10-03 19:06:22 -07:00 @@ -410,7 +410,7 @@ unsigned long childregs = (unsigned long)current->thread_info + THREAD_SIZE; childregs -= sizeof(struct pt_regs); - current->thread.regs = childregs; + current->thread.regs = (struct pt_regs *)childregs; } regs->nip = entry; diff -Nru a/arch/ppc64/kernel/sys_ppc32.c b/arch/ppc64/kernel/sys_ppc32.c --- a/arch/ppc64/kernel/sys_ppc32.c 2004-10-03 19:06:22 -07:00 +++ b/arch/ppc64/kernel/sys_ppc32.c 2004-10-03 19:06:22 -07:00 @@ -642,7 +642,7 @@ unsigned long childregs = (unsigned long)current->thread_info + THREAD_SIZE; childregs -= sizeof(struct pt_regs); - current->thread.regs = childregs; + current->thread.regs = (struct pt_regs *)childregs; } /* diff -Nru a/arch/ppc64/mm/hash_native.c b/arch/ppc64/mm/hash_native.c --- a/arch/ppc64/mm/hash_native.c 2004-10-03 19:06:21 -07:00 +++ b/arch/ppc64/mm/hash_native.c 2004-10-03 19:06:21 -07:00 @@ -407,13 +407,13 @@ model = get_property(root, "model", NULL); if (!strcmp(model, "CHRP IBM,9076-N81")) { of_node_put(root); - return; + goto bail; } of_node_put(root); } #endif /* CONFIG_PPC_PSERIES */ ppc_md.flush_hash_range = native_flush_hash_range; - + bail: htab_finish_init(); } diff -Nru a/arch/sparc64/kernel/kprobes.c b/arch/sparc64/kernel/kprobes.c --- a/arch/sparc64/kernel/kprobes.c 2004-10-03 19:06:22 -07:00 +++ b/arch/sparc64/kernel/kprobes.c 2004-10-03 19:06:22 -07:00 @@ -179,26 +179,26 @@ switch (val) { case DIE_DEBUG: if (kprobe_handler(args->regs)) - return NOTIFY_OK; + return NOTIFY_STOP; break; case DIE_DEBUG_2: if (post_kprobe_handler(args->regs)) - return NOTIFY_OK; + return NOTIFY_STOP; break; case DIE_GPF: if (kprobe_running() && kprobe_fault_handler(args->regs, args->trapnr)) - return NOTIFY_OK; + return NOTIFY_STOP; break; case DIE_PAGE_FAULT: if (kprobe_running() && kprobe_fault_handler(args->regs, args->trapnr)) - return NOTIFY_OK; + return NOTIFY_STOP; break; default: break; } - return NOTIFY_BAD; + return NOTIFY_DONE; } asmlinkage void kprobe_trap(unsigned long trap_level, struct pt_regs *regs) @@ -216,7 +216,7 @@ */ if (notify_die((trap_level == 0x170) ? DIE_DEBUG : DIE_DEBUG_2, (trap_level == 0x170) ? "debug" : "debug_2", - regs, 0, trap_level, SIGTRAP) != NOTIFY_OK) + regs, 0, trap_level, SIGTRAP) != NOTIFY_STOP) bad_trap(regs, trap_level); } diff -Nru a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c --- a/arch/sparc64/kernel/traps.c 2004-10-03 19:06:22 -07:00 +++ b/arch/sparc64/kernel/traps.c 2004-10-03 19:06:22 -07:00 @@ -96,7 +96,7 @@ siginfo_t info; if (notify_die(DIE_TRAP, "bad trap", regs, - 0, lvl, SIGTRAP) == NOTIFY_OK) + 0, lvl, SIGTRAP) == NOTIFY_STOP) return; if (lvl < 0x100) { @@ -126,7 +126,7 @@ char buffer[32]; if (notify_die(DIE_TRAP_TL1, "bad trap tl1", regs, - 0, lvl, SIGTRAP) == NOTIFY_OK) + 0, lvl, SIGTRAP) == NOTIFY_STOP) return; dump_tl1_traplog((struct tl1_traplog *)(regs + 1)); @@ -149,7 +149,7 @@ siginfo_t info; if (notify_die(DIE_TRAP, "instruction access exception", regs, - 0, 0x8, SIGTRAP) == NOTIFY_OK) + 0, 0x8, SIGTRAP) == NOTIFY_STOP) return; if (regs->tstate & TSTATE_PRIV) { @@ -173,7 +173,7 @@ unsigned long sfsr, unsigned long sfar) { if (notify_die(DIE_TRAP_TL1, "instruction access exception tl1", regs, - 0, 0x8, SIGTRAP) == NOTIFY_OK) + 0, 0x8, SIGTRAP) == NOTIFY_STOP) return; dump_tl1_traplog((struct tl1_traplog *)(regs + 1)); @@ -186,7 +186,7 @@ siginfo_t info; if (notify_die(DIE_TRAP, "data access exception", regs, - 0, 0x30, SIGTRAP) == NOTIFY_OK) + 0, 0x30, SIGTRAP) == NOTIFY_STOP) return; if (regs->tstate & TSTATE_PRIV) { @@ -260,7 +260,7 @@ spitfire_clean_and_reenable_l1_caches(); if (notify_die(DIE_TRAP, "instruction access exception", regs, - 0, 0x8, SIGTRAP) == NOTIFY_OK) + 0, 0x8, SIGTRAP) == NOTIFY_STOP) return; info.si_signo = SIGBUS; @@ -292,7 +292,7 @@ spitfire_clean_and_reenable_l1_caches(); if (notify_die(DIE_TRAP, "data access exception", regs, - 0, 0x30, SIGTRAP) == NOTIFY_OK) + 0, 0x30, SIGTRAP) == NOTIFY_STOP) return; info.si_signo = SIGBUS; @@ -1695,7 +1695,7 @@ void do_fpieee(struct pt_regs *regs) { if (notify_die(DIE_TRAP, "fpu exception ieee", regs, - 0, 0x24, SIGFPE) == NOTIFY_OK) + 0, 0x24, SIGFPE) == NOTIFY_STOP) return; do_fpe_common(regs); @@ -1709,7 +1709,7 @@ int ret = 0; if (notify_die(DIE_TRAP, "fpu exception other", regs, - 0, 0x25, SIGFPE) == NOTIFY_OK) + 0, 0x25, SIGFPE) == NOTIFY_STOP) return; switch ((current_thread_info()->xfsr[0] & 0x1c000)) { @@ -1728,7 +1728,7 @@ siginfo_t info; if (notify_die(DIE_TRAP, "tagged arithmetic overflow", regs, - 0, 0x26, SIGEMT) == NOTIFY_OK) + 0, 0x26, SIGEMT) == NOTIFY_STOP) return; if (regs->tstate & TSTATE_PRIV) @@ -1750,7 +1750,7 @@ siginfo_t info; if (notify_die(DIE_TRAP, "integer division by zero", regs, - 0, 0x28, SIGFPE) == NOTIFY_OK) + 0, 0x28, SIGFPE) == NOTIFY_STOP) return; if (regs->tstate & TSTATE_PRIV) @@ -1936,7 +1936,7 @@ siginfo_t info; if (notify_die(DIE_TRAP, "illegal instruction", regs, - 0, 0x10, SIGILL) == NOTIFY_OK) + 0, 0x10, SIGILL) == NOTIFY_STOP) return; if (tstate & TSTATE_PRIV) @@ -1965,7 +1965,7 @@ siginfo_t info; if (notify_die(DIE_TRAP, "memory address unaligned", regs, - 0, 0x34, SIGSEGV) == NOTIFY_OK) + 0, 0x34, SIGSEGV) == NOTIFY_STOP) return; if (regs->tstate & TSTATE_PRIV) { @@ -1991,7 +1991,7 @@ siginfo_t info; if (notify_die(DIE_TRAP, "privileged operation", regs, - 0, 0x11, SIGILL) == NOTIFY_OK) + 0, 0x11, SIGILL) == NOTIFY_STOP) return; if (test_thread_flag(TIF_32BIT)) { diff -Nru a/arch/sparc64/mm/fault.c b/arch/sparc64/mm/fault.c --- a/arch/sparc64/mm/fault.c 2004-10-03 19:06:22 -07:00 +++ b/arch/sparc64/mm/fault.c 2004-10-03 19:06:22 -07:00 @@ -149,7 +149,7 @@ (tsk->mm ? (unsigned long) tsk->mm->pgd : (unsigned long) tsk->active_mm->pgd)); if (notify_die(DIE_GPF, "general protection fault", regs, - 0, 0, SIGSEGV) == NOTIFY_OK) + 0, 0, SIGSEGV) == NOTIFY_STOP) return; die_if_kernel("Oops", regs); } @@ -325,7 +325,7 @@ fault_code = get_thread_fault_code(); if (notify_die(DIE_PAGE_FAULT, "page_fault", regs, - fault_code, 0, SIGSEGV) == NOTIFY_OK) + fault_code, 0, SIGSEGV) == NOTIFY_STOP) return; si_code = SEGV_MAPERR; diff -Nru a/arch/sparc64/solaris/misc.c b/arch/sparc64/solaris/misc.c --- a/arch/sparc64/solaris/misc.c 2004-10-03 19:06:22 -07:00 +++ b/arch/sparc64/solaris/misc.c 2004-10-03 19:06:22 -07:00 @@ -148,10 +148,10 @@ if (copy_to_user(to, from, len)) return -EFAULT; + off = len < to_size? len: len - 1; if (dotchop) { - off = (strnchr(from, len, '.') - from); - } else{ - off = len - 1; + const char *p = strnchr(from, len, '.'); + if (p) off = p - from; } if (__put_user('\0', to + off)) diff -Nru a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c --- a/arch/x86_64/kernel/nmi.c 2004-10-03 19:06:21 -07:00 +++ b/arch/x86_64/kernel/nmi.c 2004-10-03 19:06:21 -07:00 @@ -390,7 +390,8 @@ */ alert_counter[cpu]++; if (alert_counter[cpu] == 5*nmi_hz) { - if (notify_die(DIE_NMI, "nmi", regs, reason, 2, SIGINT) == NOTIFY_BAD) { + if (notify_die(DIE_NMI, "nmi", regs, reason, 2, SIGINT) + == NOTIFY_STOP) { alert_counter[cpu] = 0; return; } diff -Nru a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c --- a/arch/x86_64/kernel/traps.c 2004-10-03 19:06:21 -07:00 +++ b/arch/x86_64/kernel/traps.c 2004-10-03 19:06:21 -07:00 @@ -437,7 +437,8 @@ #define DO_ERROR(trapnr, signr, str, name) \ asmlinkage void do_##name(struct pt_regs * regs, long error_code) \ { \ - if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) == NOTIFY_BAD) \ + if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \ + == NOTIFY_STOP) \ return; \ do_trap(trapnr, signr, str, regs, error_code, NULL); \ } @@ -450,7 +451,8 @@ info.si_errno = 0; \ info.si_code = sicode; \ info.si_addr = (void __user *)siaddr; \ - if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) == NOTIFY_BAD) \ + if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \ + == NOTIFY_STOP) \ return; \ do_trap(trapnr, signr, str, regs, error_code, &info); \ } @@ -471,7 +473,8 @@ asmlinkage void *do_##name(struct pt_regs * regs, long error_code) \ { \ struct pt_regs *pr = ((struct pt_regs *)(current->thread.rsp0))-1; \ - if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) == NOTIFY_BAD) \ + if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \ + == NOTIFY_STOP) \ return regs; \ if (regs->cs & 3) { \ memcpy(pr, regs, sizeof(struct pt_regs)); \ @@ -565,7 +568,8 @@ unsigned char reason = inb(0x61); if (!(reason & 0xc0)) { - if (notify_die(DIE_NMI_IPI, "nmi_ipi", regs, reason, 0, SIGINT) == NOTIFY_BAD) + if (notify_die(DIE_NMI_IPI, "nmi_ipi", regs, reason, 0, SIGINT) + == NOTIFY_STOP) return; #ifdef CONFIG_X86_LOCAL_APIC /* @@ -580,7 +584,7 @@ unknown_nmi_error(reason, regs); return; } - if (notify_die(DIE_NMI, "nmi", regs, reason, 0, SIGINT) == NOTIFY_BAD) + if (notify_die(DIE_NMI, "nmi", regs, reason, 0, SIGINT) == NOTIFY_STOP) return; if (reason & 0x80) mem_parity_error(reason, regs); @@ -676,7 +680,7 @@ clear_TF: /* RED-PEN could cause spurious errors */ if (notify_die(DIE_DEBUG, "debug2", regs, condition, 1, SIGTRAP) - != NOTIFY_BAD) + != NOTIFY_STOP) regs->eflags &= ~TF_MASK; return regs; } diff -Nru a/drivers/block/ioctl.c b/drivers/block/ioctl.c --- a/drivers/block/ioctl.c 2004-10-03 19:06:21 -07:00 +++ b/drivers/block/ioctl.c 2004-10-03 19:06:21 -07:00 @@ -194,7 +194,8 @@ return -EACCES; if (disk->fops->ioctl) { ret = disk->fops->ioctl(inode, file, cmd, arg); - if (ret != -EINVAL) + /* -EINVAL to handle old uncorrected drivers */ + if (ret != -EINVAL && ret != -ENOTTY) return ret; } fsync_bdev(bdev); diff -Nru a/drivers/char/cyclades.c b/drivers/char/cyclades.c --- a/drivers/char/cyclades.c 2004-10-03 19:06:21 -07:00 +++ b/drivers/char/cyclades.c 2004-10-03 19:06:21 -07:00 @@ -682,13 +682,13 @@ #define IS_CYC_Z(card) ((card).num_chips == -1) #define Z_FPGA_CHECK(card) \ - ((cy_readl(&((struct RUNTIME_9060 *) \ + ((cy_readl(&((struct RUNTIME_9060 __iomem *) \ ((card).ctl_addr))->init_ctrl) & (1<<17)) != 0) -#define ISZLOADED(card) (((ZO_V1==cy_readl(&((struct RUNTIME_9060 *) \ +#define ISZLOADED(card) (((ZO_V1==cy_readl(&((struct RUNTIME_9060 __iomem *) \ ((card).ctl_addr))->mail_box_0)) || \ Z_FPGA_CHECK(card)) && \ - (ZFIRM_ID==cy_readl(&((struct FIRM_ID *) \ + (ZFIRM_ID==cy_readl(&((struct FIRM_ID __iomem *) \ ((card).base_addr+ID_ADDRESS))->signature))) #ifndef SERIAL_XMIT_SIZE @@ -712,16 +712,16 @@ boot options line. The form is "cyclades=address,address..." */ -static unsigned char *cy_isa_addresses[] = { - (unsigned char *) 0xD0000, - (unsigned char *) 0xD2000, - (unsigned char *) 0xD4000, - (unsigned char *) 0xD6000, - (unsigned char *) 0xD8000, - (unsigned char *) 0xDA000, - (unsigned char *) 0xDC000, - (unsigned char *) 0xDE000, - NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL +static unsigned int cy_isa_addresses[] = { + 0xD0000, + 0xD2000, + 0xD4000, + 0xD6000, + 0xD8000, + 0xDA000, + 0xDC000, + 0xDE000, + 0,0,0,0,0,0,0,0 }; #define NR_ISA_ADDRS (sizeof(cy_isa_addresses)/sizeof(unsigned char*)) @@ -854,7 +854,7 @@ static void set_line_char(struct cyclades_port *); static int cyz_issue_cmd(struct cyclades_card *, uclong, ucchar, uclong); #ifdef CONFIG_ISA -static unsigned detect_isa_irq (volatile ucchar *); +static unsigned detect_isa_irq(void __iomem *); #endif /* CONFIG_ISA */ static int cyclades_get_proc_info(char *, char **, off_t , int , int *, void *); @@ -992,7 +992,7 @@ This function is only called from inside spinlock-protected code. */ static int -cyy_issue_cmd(volatile ucchar *base_addr, u_char cmd, int index) +cyy_issue_cmd(void __iomem *base_addr, u_char cmd, int index) { volatile int i; @@ -1008,7 +1008,7 @@ if (i == 100) return (-1); /* Issue the new command */ - cy_writeb((u_long)base_addr+(CyCCR< 0)? irq : 0; @@ -1076,7 +1076,7 @@ int status; struct cyclades_card *cinfo; struct cyclades_port *info; - volatile unsigned char *base_addr, *card_base_addr; + void __iomem *base_addr, *card_base_addr; int chip; int save_xir, channel, save_car; char data; @@ -1095,7 +1095,7 @@ return IRQ_NONE; /* spurious interrupt */ } - card_base_addr = (unsigned char *)cinfo->base_addr; + card_base_addr = cinfo->base_addr; index = cinfo->bus_index; @@ -1107,8 +1107,7 @@ do{ had_work = 0; for ( chip = 0 ; chip < cinfo->num_chips ; chip ++) { - base_addr = (unsigned char *) - (cinfo->base_addr + (cy_chip_offset[chip]<base_addr + (cy_chip_offset[chip]<last_active = jiffies; save_car = cy_readb(base_addr+(CyCAR<tty == 0){ @@ -1261,8 +1260,8 @@ schedule_delayed_work(&tty->flip.work, 1); } /* end of service */ - cy_writeb((u_long)base_addr+(CyRIR<card_lock); } @@ -1281,18 +1280,18 @@ channel = (u_short ) (save_xir & CyIRChannel); i = channel + chip * 4 + cinfo->first_line; save_car = cy_readb(base_addr+(CyCAR<last_active = jiffies; if(info->tty == 0){ - cy_writeb((u_long)base_addr+(CySRER<x_char) { /* send special char */ outch = info->x_char; - cy_writeb((u_long)base_addr+(CyTDR<icount.tx++; info->x_char = 0; @@ -1310,14 +1309,14 @@ if (info->breakon || info->breakoff) { if (info->breakon) { - cy_writeb((u_long)base_addr + (CyTDR<breakon = 0; char_count -= 2; } if (info->breakoff) { - cy_writeb((u_long)base_addr + (CyTDR<breakoff = 0; char_count -= 2; } @@ -1326,11 +1325,11 @@ while (char_count-- > 0){ if (!info->xmit_cnt){ if (cy_readb(base_addr+(CySRER<xmit_buf == 0){ - cy_writeb((u_long)base_addr+(CySRER<tty->stopped || info->tty->hw_stopped){ - cy_writeb((u_long)base_addr+(CySRER<xmit_cnt--; info->xmit_tail = (info->xmit_tail + 1) & (SERIAL_XMIT_SIZE - 1); - cy_writeb((u_long)base_addr+(CyTDR<icount.tx++; }else{ if(char_count > 1){ info->xmit_cnt--; info->xmit_tail = (info->xmit_tail + 1) & (SERIAL_XMIT_SIZE - 1); - cy_writeb((u_long)base_addr+(CyTDR<icount.tx++; char_count--; }else{ @@ -1388,9 +1387,9 @@ } txend: /* end of service */ - cy_writeb((u_long)base_addr+(CyTIR<card_lock); } @@ -1404,7 +1403,7 @@ + cinfo->first_line]; info->last_active = jiffies; save_car = cy_readb(base_addr+(CyCAR<tty->hw_stopped = 0; - cy_writeb((u_long)base_addr+(CySRER<tty->hw_stopped = 1; - cy_writeb((u_long)base_addr+(CySRER<card_lock); } } /* end while status != 0 */ @@ -1473,7 +1472,7 @@ /* clear interrupts */ spin_lock(&cinfo->card_lock); - cy_writeb((u_long)card_base_addr + (Cy_ClrIntr<card_lock); return IRQ_HANDLED; @@ -1488,27 +1487,25 @@ cyz_fetch_msg( struct cyclades_card *cinfo, uclong *channel, ucchar *cmd, uclong *param) { - struct FIRM_ID *firm_id; - struct ZFW_CTRL *zfw_ctrl; - struct BOARD_CTRL *board_ctrl; + struct FIRM_ID __iomem *firm_id; + struct ZFW_CTRL __iomem *zfw_ctrl; + struct BOARD_CTRL __iomem *board_ctrl; unsigned long loc_doorbell; - firm_id = (struct FIRM_ID *)(cinfo->base_addr + ID_ADDRESS); + firm_id = cinfo->base_addr + ID_ADDRESS; if (!ISZLOADED(*cinfo)){ return (-1); } - zfw_ctrl = (struct ZFW_CTRL *) - (cinfo->base_addr + - (cy_readl(&firm_id->zfwctrl_addr) & 0xfffff)); + zfw_ctrl = cinfo->base_addr + (cy_readl(&firm_id->zfwctrl_addr) & 0xfffff); board_ctrl = &zfw_ctrl->board_ctrl; - loc_doorbell = cy_readl(&((struct RUNTIME_9060 *) + loc_doorbell = cy_readl(&((struct RUNTIME_9060 __iomem *) (cinfo->ctl_addr))->loc_doorbell); if (loc_doorbell){ *cmd = (char)(0xff & loc_doorbell); *channel = cy_readl(&board_ctrl->fwcmd_channel); *param = (uclong)cy_readl(&board_ctrl->fwcmd_param); - cy_writel(&((struct RUNTIME_9060 *)(cinfo->ctl_addr))->loc_doorbell, + cy_writel(&((struct RUNTIME_9060 __iomem *)(cinfo->ctl_addr))->loc_doorbell, 0xffffffff); return 1; } @@ -1519,40 +1516,38 @@ cyz_issue_cmd( struct cyclades_card *cinfo, uclong channel, ucchar cmd, uclong param) { - struct FIRM_ID *firm_id; - struct ZFW_CTRL *zfw_ctrl; - struct BOARD_CTRL *board_ctrl; - volatile uclong *pci_doorbell; + struct FIRM_ID __iomem *firm_id; + struct ZFW_CTRL __iomem *zfw_ctrl; + struct BOARD_CTRL __iomem *board_ctrl; + unsigned long __iomem *pci_doorbell; int index; - firm_id = (struct FIRM_ID *)(cinfo->base_addr + ID_ADDRESS); + firm_id = cinfo->base_addr + ID_ADDRESS; if (!ISZLOADED(*cinfo)){ return (-1); } - zfw_ctrl = (struct ZFW_CTRL *) - (cinfo->base_addr + - (cy_readl(&firm_id->zfwctrl_addr) & 0xfffff)); + zfw_ctrl = cinfo->base_addr + (cy_readl(&firm_id->zfwctrl_addr) & 0xfffff); board_ctrl = &zfw_ctrl->board_ctrl; index = 0; - pci_doorbell = (uclong *)(&((struct RUNTIME_9060 *) - (cinfo->ctl_addr))->pci_doorbell); + pci_doorbell = &((struct RUNTIME_9060 __iomem *) (cinfo->ctl_addr))->pci_doorbell; while( (cy_readl(pci_doorbell) & 0xff) != 0){ if (index++ == 1000){ return((int)(cy_readl(pci_doorbell) & 0xff)); } udelay(50L); } - cy_writel((u_long)&board_ctrl->hcmd_channel, channel); - cy_writel((u_long)&board_ctrl->hcmd_param , param); - cy_writel((u_long)pci_doorbell, (long)cmd); + cy_writel(&board_ctrl->hcmd_channel, channel); + cy_writel(&board_ctrl->hcmd_param , param); + cy_writel(pci_doorbell, (long)cmd); return(0); } /* cyz_issue_cmd */ static void -cyz_handle_rx(struct cyclades_port *info, volatile struct CH_CTRL *ch_ctrl, - volatile struct BUF_CTRL *buf_ctrl) +cyz_handle_rx(struct cyclades_port *info, + volatile struct CH_CTRL __iomem *ch_ctrl, + volatile struct BUF_CTRL __iomem *buf_ctrl) { struct cyclades_card *cinfo = &cy_card[info->card]; struct tty_struct *tty = info->tty; @@ -1649,8 +1644,9 @@ } static void -cyz_handle_tx(struct cyclades_port *info, volatile struct CH_CTRL *ch_ctrl, - volatile struct BUF_CTRL *buf_ctrl) +cyz_handle_tx(struct cyclades_port *info, + volatile struct CH_CTRL __iomem *ch_ctrl, + volatile struct BUF_CTRL __iomem *buf_ctrl) { struct cyclades_card *cinfo = &cy_card[info->card]; struct tty_struct *tty = info->tty; @@ -1737,11 +1733,11 @@ { struct tty_struct *tty; struct cyclades_port *info; - static volatile struct FIRM_ID *firm_id; - static volatile struct ZFW_CTRL *zfw_ctrl; - static volatile struct BOARD_CTRL *board_ctrl; - static volatile struct CH_CTRL *ch_ctrl; - static volatile struct BUF_CTRL *buf_ctrl; + static volatile struct FIRM_ID __iomem *firm_id; + static volatile struct ZFW_CTRL __iomem *zfw_ctrl; + static volatile struct BOARD_CTRL __iomem *board_ctrl; + static volatile struct CH_CTRL __iomem *ch_ctrl; + static volatile struct BUF_CTRL __iomem *buf_ctrl; uclong channel; ucchar cmd; uclong param; @@ -1749,13 +1745,11 @@ int special_count; int delta_count; - firm_id = (struct FIRM_ID *)(cinfo->base_addr + ID_ADDRESS); - zfw_ctrl = (struct ZFW_CTRL *) - (cinfo->base_addr + - (cy_readl(&firm_id->zfwctrl_addr) & 0xfffff)); - board_ctrl = &(zfw_ctrl->board_ctrl); + firm_id = cinfo->base_addr + ID_ADDRESS; + zfw_ctrl = cinfo->base_addr + (cy_readl(&firm_id->zfwctrl_addr) & 0xfffff); + board_ctrl = &zfw_ctrl->board_ctrl; fw_ver = cy_readl(&board_ctrl->fw_version); - hw_ver = cy_readl(&((struct RUNTIME_9060 *)(cinfo->ctl_addr))->mail_box_0); + hw_ver = cy_readl(&((struct RUNTIME_9060 __iomem *)(cinfo->ctl_addr))->mail_box_0); while(cyz_fetch_msg(cinfo, &channel, &cmd, ¶m) == 1) { @@ -1922,10 +1916,8 @@ if (!IS_CYC_Z(*cinfo)) continue; if (!ISZLOADED(*cinfo)) continue; - firm_id = (struct FIRM_ID *)(cinfo->base_addr + ID_ADDRESS); - zfw_ctrl = (struct ZFW_CTRL *) - (cinfo->base_addr + - (cy_readl(&firm_id->zfwctrl_addr) & 0xfffff)); + firm_id = cinfo->base_addr + ID_ADDRESS; + zfw_ctrl = cinfo->base_addr + (cy_readl(&firm_id->zfwctrl_addr) & 0xfffff); board_ctrl = &(zfw_ctrl->board_ctrl); /* Skip first polling cycle to avoid racing conditions with the FW */ @@ -1969,7 +1961,7 @@ { unsigned long flags; int retval = 0; - unsigned char *base_addr; + void __iomem *base_addr; int card,chip,channel,index; unsigned long page; @@ -2008,8 +2000,7 @@ chip = channel>>2; channel &= 0x03; index = cy_card[card].bus_index; - base_addr = (unsigned char*) - (cy_card[card].base_addr + (cy_chip_offset[chip]<default_timeout + cy_writeb(base_addr+(CyRTPR<default_timeout ? info->default_timeout : 0x02)); /* 10ms rx timeout */ cyy_issue_cmd(base_addr,CyCHAN_CTL|CyENB_RCVR|CyENB_XMTR,index); - cy_writeb((ulong)base_addr+(CyCAR<flags |= ASYNC_INITIALIZED; @@ -2053,22 +2044,20 @@ CY_UNLOCK(info, flags); } else { - struct FIRM_ID *firm_id; - struct ZFW_CTRL *zfw_ctrl; - struct BOARD_CTRL *board_ctrl; - struct CH_CTRL *ch_ctrl; + struct FIRM_ID __iomem *firm_id; + struct ZFW_CTRL __iomem *zfw_ctrl; + struct BOARD_CTRL __iomem *board_ctrl; + struct CH_CTRL __iomem *ch_ctrl; int retval; - base_addr = (unsigned char*) (cy_card[card].base_addr); + base_addr = cy_card[card].base_addr; - firm_id = (struct FIRM_ID *) (base_addr + ID_ADDRESS); + firm_id = base_addr + ID_ADDRESS; if (!ISZLOADED(cy_card[card])){ return -ENODEV; } - zfw_ctrl = (struct ZFW_CTRL *) - (cy_card[card].base_addr + - (cy_readl(&firm_id->zfwctrl_addr) & 0xfffff)); + zfw_ctrl = cy_card[card].base_addr + (cy_readl(&firm_id->zfwctrl_addr) & 0xfffff); board_ctrl = &zfw_ctrl->board_ctrl; ch_ctrl = zfw_ctrl->ch_ctrl; @@ -2160,7 +2149,7 @@ start_xmit( struct cyclades_port *info ) { unsigned long flags; - unsigned char *base_addr; + void __iomem *base_addr; int card,chip,channel,index; card = info->card; @@ -2169,13 +2158,11 @@ chip = channel>>2; channel &= 0x03; index = cy_card[card].bus_index; - base_addr = (unsigned char*) - (cy_card[card].base_addr - + (cy_chip_offset[chip]<flags & ASYNC_INITIALIZED)){ @@ -2216,9 +2203,7 @@ chip = channel>>2; channel &= 0x03; index = cy_card[card].bus_index; - base_addr = (unsigned char*) - (cy_card[card].base_addr - + (cy_chip_offset[chip]<xmit_buf = NULL; free_page((unsigned long) temp); } - cy_writeb((u_long)base_addr+(CyCAR<tty || (info->tty->termios->c_cflag & HUPCL)) { - cy_writeb((u_long)base_addr+(CyMSVR1<flags &= ~ASYNC_INITIALIZED; CY_UNLOCK(info, flags); } else { - struct FIRM_ID *firm_id; - struct ZFW_CTRL *zfw_ctrl; - struct BOARD_CTRL *board_ctrl; - struct CH_CTRL *ch_ctrl; + struct FIRM_ID __iomem *firm_id; + struct ZFW_CTRL __iomem *zfw_ctrl; + struct BOARD_CTRL __iomem *board_ctrl; + struct CH_CTRL __iomem *ch_ctrl; int retval; - base_addr = (unsigned char*) (cy_card[card].base_addr); + base_addr = cy_card[card].base_addr; #ifdef CY_DEBUG_OPEN printk("cyc shutdown Z card %d, channel %d, base_addr %lx\n", card, channel, (long)base_addr); #endif - firm_id = (struct FIRM_ID *) (base_addr + ID_ADDRESS); + firm_id = base_addr + ID_ADDRESS; if (!ISZLOADED(cy_card[card])) { return; } - zfw_ctrl = (struct ZFW_CTRL *) - (cy_card[card].base_addr + - (cy_readl(&firm_id->zfwctrl_addr) & 0xfffff)); - board_ctrl = &(zfw_ctrl->board_ctrl); + zfw_ctrl = cy_card[card].base_addr + (cy_readl(&firm_id->zfwctrl_addr) & 0xfffff); + board_ctrl = &zfw_ctrl->board_ctrl; ch_ctrl = zfw_ctrl->ch_ctrl; CY_LOCK(info, flags); @@ -2290,7 +2273,7 @@ } if (!info->tty || (info->tty->termios->c_cflag & HUPCL)) { - cy_writel((u_long)&ch_ctrl[channel].rs_control, + cy_writel(&ch_ctrl[channel].rs_control, (uclong)(cy_readl(&ch_ctrl[channel].rs_control) & ~(C_RS_RTS | C_RS_DTR))); retval = cyz_issue_cmd(&cy_card[info->card], @@ -2334,7 +2317,7 @@ unsigned long flags; int chip, channel,index; int retval; - char *base_addr; + void __iomem *base_addr; cinfo = &cy_card[info->card]; channel = info->line - cinfo->first_line; @@ -2387,15 +2370,14 @@ chip = channel>>2; channel &= 0x03; index = cinfo->bus_index; - base_addr = (char *)(cinfo->base_addr - + (cy_chip_offset[chip]<base_addr + (cy_chip_offset[chip]<termios->c_cflag & CBAUD)){ - cy_writeb((u_long)base_addr+(CyCAR<flags & ASYNC_CLOSING) && (C_CLOCAL(tty) || (cy_readb(base_addr+(CyMSVR1<base_addr); - firm_id = (struct FIRM_ID *) - (base_addr + ID_ADDRESS); + base_addr = cinfo->base_addr; + firm_id = base_addr + ID_ADDRESS; if (!ISZLOADED(*cinfo)){ current->state = TASK_RUNNING; remove_wait_queue(&info->open_wait, &wait); return -EINVAL; } - zfw_ctrl = (struct ZFW_CTRL *) - (base_addr + (cy_readl(&firm_id->zfwctrl_addr) & 0xfffff)); + zfw_ctrl = base_addr + (cy_readl(&firm_id->zfwctrl_addr) & 0xfffff); board_ctrl = &zfw_ctrl->board_ctrl; ch_ctrl = zfw_ctrl->ch_ctrl; @@ -2540,11 +2520,10 @@ */ if (IS_CYC_Z(cy_card[info->card])) { struct cyclades_card *cinfo = &cy_card[info->card]; - struct FIRM_ID *firm_id = (struct FIRM_ID *) - (cinfo->base_addr + ID_ADDRESS); + struct FIRM_ID __iomem *firm_id = cinfo->base_addr + ID_ADDRESS; if (!ISZLOADED(*cinfo)) { - if (((ZE_V1 ==cy_readl(&((struct RUNTIME_9060 *) + if (((ZE_V1 ==cy_readl(&((struct RUNTIME_9060 __iomem *) (cinfo->ctl_addr))->mail_box_0)) && Z_FPGA_CHECK (*cinfo)) && (ZFIRM_HLT == cy_readl (&firm_id->signature))) @@ -2561,12 +2540,10 @@ interrupts should be enabled as soon as the first open happens to one of its ports. */ if (!cinfo->intr_enabled) { - struct ZFW_CTRL *zfw_ctrl; - struct BOARD_CTRL *board_ctrl; + struct ZFW_CTRL __iomem *zfw_ctrl; + struct BOARD_CTRL __iomem *board_ctrl; - zfw_ctrl = (struct ZFW_CTRL *) - (cinfo->base_addr + - (cy_readl (&firm_id->zfwctrl_addr) & 0xfffff)); + zfw_ctrl = cinfo->base_addr + (cy_readl (&firm_id->zfwctrl_addr) & 0xfffff); board_ctrl = &zfw_ctrl->board_ctrl; @@ -2658,7 +2635,7 @@ cy_wait_until_sent(struct tty_struct *tty, int timeout) { struct cyclades_port * info = (struct cyclades_port *)tty->driver_data; - unsigned char *base_addr; + void __iomem *base_addr; int card,chip,channel,index; unsigned long orig_jiffies; int char_time; @@ -2708,8 +2685,7 @@ chip = channel>>2; channel &= 0x03; index = cy_card[card].bus_index; - base_addr = (unsigned char *) - (cy_card[card].base_addr + (cy_chip_offset[chip]<card])) { int channel = info->line - cy_card[info->card].first_line; int index = cy_card[info->card].bus_index; - unsigned char *base_addr = (unsigned char *) - (cy_card[info->card].base_addr + - (cy_chip_offset[channel>>2] <card].base_addr + (cy_chip_offset[channel>>2] << index); /* Stop accepting input */ channel &= 0x03; - cy_writeb((ulong)base_addr+(CyCAR<flags & ASYNC_INITIALIZED) { /* Waiting for on-board buffers to be empty before closing @@ -2820,12 +2794,10 @@ } else { #ifdef Z_WAKE /* Waiting for on-board buffers to be empty before closing the port */ - unsigned char *base_addr = (unsigned char *) - cy_card[info->card].base_addr; - struct FIRM_ID *firm_id = (struct FIRM_ID *) (base_addr + ID_ADDRESS); - struct ZFW_CTRL *zfw_ctrl = (struct ZFW_CTRL *) - (base_addr + (cy_readl(&firm_id->zfwctrl_addr) & 0xfffff)); - struct CH_CTRL *ch_ctrl = zfw_ctrl->ch_ctrl; + void __iomem *base_addr = cy_card[info->card].base_addr; + struct FIRM_ID __iomem *firm_id = base_addr + ID_ADDRESS; + struct ZFW_CTRL __iomem *zfw_ctrl = base_addr + (cy_readl(&firm_id->zfwctrl_addr) & 0xfffff); + struct CH_CTRL __iomem *ch_ctrl = zfw_ctrl->ch_ctrl; int channel = info->line - cy_card[info->card].first_line; int retval; @@ -3084,10 +3056,8 @@ int char_count; volatile uclong tx_put, tx_get, tx_bufsize; - firm_id = (struct FIRM_ID *)(cy_card[card].base_addr + ID_ADDRESS); - zfw_ctrl = (struct ZFW_CTRL *) - (cy_card[card].base_addr + - (cy_readl(&firm_id->zfwctrl_addr) & 0xfffff)); + firm_id = cy_card[card].base_addr + ID_ADDRESS; + zfw_ctrl = cy_card[card].base_addr + (cy_readl(&firm_id->zfwctrl_addr) & 0xfffff); ch_ctrl = &(zfw_ctrl->ch_ctrl[channel]); buf_ctrl = &(zfw_ctrl->buf_ctrl[channel]); @@ -3147,7 +3117,7 @@ set_line_char(struct cyclades_port * info) { unsigned long flags; - unsigned char *base_addr; + void __iomem *base_addr; int card,chip,channel,index; unsigned cflag, iflag; unsigned short chip_number; @@ -3299,76 +3269,74 @@ chip = channel>>2; channel &= 0x03; - base_addr = (unsigned char*) - (cy_card[card].base_addr - + (cy_chip_offset[chip]<tco); - cy_writeb((u_long)base_addr+(CyTBPR<tbpr); - cy_writeb((u_long)base_addr+(CyRCOR<rco); - cy_writeb((u_long)base_addr+(CyRBPR<rbpr); + cy_writeb(base_addr+(CyTCOR<tco); + cy_writeb(base_addr+(CyTBPR<tbpr); + cy_writeb(base_addr+(CyRCOR<rco); + cy_writeb(base_addr+(CyRBPR<rbpr); /* set line characteristics according configuration */ - cy_writeb((u_long)base_addr+(CySCHR1<tty)); - cy_writeb((u_long)base_addr+(CySCHR2<tty)); - cy_writeb((u_long)base_addr+(CyCOR1<cor1); - cy_writeb((u_long)base_addr+(CyCOR2<cor2); - cy_writeb((u_long)base_addr+(CyCOR3<cor3); - cy_writeb((u_long)base_addr+(CyCOR4<cor4); - cy_writeb((u_long)base_addr+(CyCOR5<cor5); + cy_writeb(base_addr+(CyCOR1<cor1); + cy_writeb(base_addr+(CyCOR2<cor2); + cy_writeb(base_addr+(CyCOR3<cor3); + cy_writeb(base_addr+(CyCOR4<cor4); + cy_writeb(base_addr+(CyCOR5<cor5); cyy_issue_cmd(base_addr, CyCOR_CHANGE|CyCOR1ch|CyCOR2ch|CyCOR3ch,index); - cy_writeb((u_long)base_addr+(CyCAR<default_timeout + cy_writeb(base_addr+(CyRTPR<default_timeout ? info->default_timeout : 0x02)); /* 10ms rx timeout */ if (C_CLOCAL(info->tty)) { /* without modem intr */ - cy_writeb((u_long)base_addr+(CySRER<0 modem transitions */ if ((cflag & CRTSCTS) && info->rflow) { - cy_writeb((u_long)base_addr+(CyMCOR1<1 modem transitions */ - cy_writeb((u_long)base_addr+(CyMCOR2<0 modem transitions */ if ((cflag & CRTSCTS) && info->rflow) { - cy_writeb((u_long)base_addr+(CyMCOR1<1 modem transitions */ - cy_writeb((u_long)base_addr+(CyMCOR2<rtsdtr_inv) { - cy_writeb((u_long)base_addr+(CyMSVR1<rtsdtr_inv) { - cy_writeb((u_long)base_addr+(CyMSVR1<zfwctrl_addr) & 0xfffff)); + zfw_ctrl = cy_card[card].base_addr + (cy_readl(&firm_id->zfwctrl_addr) & 0xfffff); board_ctrl = &zfw_ctrl->board_ctrl; ch_ctrl = &(zfw_ctrl->ch_ctrl[channel]); buf_ctrl = &zfw_ctrl->buf_ctrl[channel]; @@ -3613,7 +3578,7 @@ unsigned char status; unsigned int result; unsigned long flags; - unsigned char *base_addr; + void __iomem *base_addr; card = info->card; channel = (info->line) - (cy_card[card].first_line); @@ -3621,8 +3586,7 @@ chip = channel>>2; channel &= 0x03; index = cy_card[card].bus_index; - base_addr = (unsigned char *) - (cy_card[card].base_addr + (cy_chip_offset[chip]<driver_data; int card,chip,channel,index; - unsigned char *base_addr; + void __iomem *base_addr; unsigned long flags; unsigned char status; unsigned long lstatus; unsigned int result; - struct FIRM_ID *firm_id; - struct ZFW_CTRL *zfw_ctrl; - struct BOARD_CTRL *board_ctrl; - struct CH_CTRL *ch_ctrl; + struct FIRM_ID __iomem *firm_id; + struct ZFW_CTRL __iomem *zfw_ctrl; + struct BOARD_CTRL __iomem *board_ctrl; + struct CH_CTRL __iomem *ch_ctrl; if (serial_paranoia_check(info, tty->name, __FUNCTION__)) return -ENODEV; @@ -3659,12 +3623,10 @@ chip = channel>>2; channel &= 0x03; index = cy_card[card].bus_index; - base_addr = (unsigned char*) - (cy_card[card].base_addr - + (cy_chip_offset[chip]<zfwctrl_addr) & 0xfffff)); + zfw_ctrl = cy_card[card].base_addr + (cy_readl(&firm_id->zfwctrl_addr) & 0xfffff); board_ctrl = &zfw_ctrl->board_ctrl; ch_ctrl = zfw_ctrl->ch_ctrl; lstatus = cy_readl(&ch_ctrl[channel].rs_status); @@ -3718,12 +3677,12 @@ { struct cyclades_port * info = (struct cyclades_port *)tty->driver_data; int card,chip,channel,index; - unsigned char *base_addr; + void __iomem *base_addr; unsigned long flags; - struct FIRM_ID *firm_id; - struct ZFW_CTRL *zfw_ctrl; - struct BOARD_CTRL *board_ctrl; - struct CH_CTRL *ch_ctrl; + struct FIRM_ID __iomem *firm_id; + struct ZFW_CTRL __iomem *zfw_ctrl; + struct BOARD_CTRL __iomem *board_ctrl; + struct CH_CTRL __iomem *ch_ctrl; int retval; if (serial_paranoia_check(info, tty->name, __FUNCTION__)) @@ -3735,37 +3694,35 @@ chip = channel>>2; channel &= 0x03; index = cy_card[card].bus_index; - base_addr = (unsigned char*) - (cy_card[card].base_addr - + (cy_chip_offset[chip]<rtsdtr_inv) { - cy_writeb((u_long)base_addr+(CyMSVR2<rtsdtr_inv) { - cy_writeb((u_long)base_addr+(CyMSVR2<rtsdtr_inv) { - cy_writeb((u_long)base_addr+(CyMSVR1<rtsdtr_inv) { - cy_writeb((u_long)base_addr+(CyMSVR1<zfwctrl_addr) & 0xfffff)); + zfw_ctrl = cy_card[card].base_addr + (cy_readl(&firm_id->zfwctrl_addr) & 0xfffff); board_ctrl = &zfw_ctrl->board_ctrl; ch_ctrl = zfw_ctrl->ch_ctrl; @@ -3926,7 +3880,7 @@ static int set_threshold(struct cyclades_port * info, unsigned long value) { - unsigned char *base_addr; + void __iomem *base_addr; int card,channel,chip,index; unsigned long flags; @@ -3936,15 +3890,13 @@ chip = channel>>2; channel &= 0x03; index = cy_card[card].bus_index; - base_addr = (unsigned char*) - (cy_card[card].base_addr - + (cy_chip_offset[chip]<cor3 &= ~CyREC_FIFO; info->cor3 |= value & CyREC_FIFO; CY_LOCK(info, flags); - cy_writeb((u_long)base_addr+(CyCOR3<cor3); + cy_writeb(base_addr+(CyCOR3<cor3); cyy_issue_cmd(base_addr,CyCOR_CHANGE|CyCOR3ch,index); CY_UNLOCK(info, flags); } else { @@ -3957,7 +3909,7 @@ static int get_threshold(struct cyclades_port * info, unsigned long __user *value) { - unsigned char *base_addr; + void __iomem *base_addr; int card,channel,chip,index; unsigned long tmp; @@ -3967,9 +3919,7 @@ chip = channel>>2; channel &= 0x03; index = cy_card[card].bus_index; - base_addr = (unsigned char*) - (cy_card[card].base_addr - + (cy_chip_offset[chip]<>2; channel &= 0x03; index = cy_card[card].bus_index; - base_addr = (unsigned char*) - (cy_card[card].base_addr - + (cy_chip_offset[chip]<>2; channel &= 0x03; index = cy_card[card].bus_index; - base_addr = (unsigned char*) - (cy_card[card].base_addr - + (cy_chip_offset[chip]<driver_data; unsigned long flags; - unsigned char *base_addr; + void __iomem *base_addr; int card,chip,channel,index; #ifdef CY_DEBUG_THROTTLE @@ -4355,16 +4301,14 @@ chip = channel>>2; channel &= 0x03; index = cy_card[card].bus_index; - base_addr = (unsigned char*) - (cy_card[card].base_addr - + (cy_chip_offset[chip]<rtsdtr_inv) { - cy_writeb((u_long)base_addr+(CyMSVR2<driver_data; unsigned long flags; - unsigned char *base_addr; + void __iomem *base_addr; int card,chip,channel,index; #ifdef CY_DEBUG_THROTTLE @@ -4415,16 +4359,14 @@ chip = channel>>2; channel &= 0x03; index = cy_card[card].bus_index; - base_addr = (unsigned char*) - (cy_card[card].base_addr - + (cy_chip_offset[chip]<rtsdtr_inv) { - cy_writeb((u_long)base_addr+(CyMSVR2<driver_data; - unsigned char *base_addr; + void __iomem *base_addr; int chip,channel,index; unsigned long flags; @@ -4461,14 +4403,12 @@ index = cinfo->bus_index; chip = channel>>2; channel &= 0x03; - base_addr = (unsigned char*) - (cy_card[info->card].base_addr - + (cy_chip_offset[chip]<card].base_addr + (cy_chip_offset[chip]<driver_data; - unsigned char *base_addr; + void __iomem *base_addr; int chip,channel,index; unsigned long flags; @@ -4501,14 +4441,12 @@ if (!IS_CYC_Z(*cinfo)) { chip = channel>>2; channel &= 0x03; - base_addr = (unsigned char*) - (cy_card[info->card].base_addr - + (cy_chip_offset[chip]<card].base_addr + (cy_chip_offset[chip]<= CD1400_REV_J){ /* It is a CD1400 rev. J or later */ /* Impossible to reach 5ms with this chip. Changed to 2ms instead (f = 500 Hz). */ - cy_writeb((u_long)base_addr+(CyPPR<mail_box_0); if (pci_resource_flags(pdev, 2) & IORESOURCE_IO) { @@ -5031,7 +4967,7 @@ } if (mailbox == ZE_V1) { - cy_pci_addr2 = (ulong)ioremap(cy_pci_phys2, CyPCI_Ze_win); + cy_pci_addr2 = ioremap(cy_pci_phys2, CyPCI_Ze_win); if (ZeIndex == NR_CARDS) { printk("Cyclades-Ze/PCI found at 0x%lx ", (ulong)cy_pci_phys2); @@ -5049,7 +4985,7 @@ i--; continue; } else { - cy_pci_addr2 = (ulong)ioremap(cy_pci_phys2, CyPCI_Zwin); + cy_pci_addr2 = ioremap(cy_pci_phys2, CyPCI_Zwin); } #ifdef CY_PCI_DEBUG @@ -5076,7 +5012,7 @@ */ PAUSE if ((mailbox == ZO_V1) || (mailbox == ZO_V2)) - cy_writel((ulong)(cy_pci_addr2+ID_ADDRESS), 0L); + cy_writel(cy_pci_addr2 + ID_ADDRESS, 0L); /* This must be a Cyclades-8Zo/PCI. The extendable version will have a different device_id and will @@ -5166,7 +5102,7 @@ Ze_pdev[j] = Ze_pdev[j+1]; } ZeIndex--; - mailbox = (uclong)cy_readl(&((struct RUNTIME_9060 *) + mailbox = (uclong)cy_readl(&((struct RUNTIME_9060 __iomem *) cy_pci_addr0)->mail_box_0); #ifdef CY_PCI_DEBUG printk("Cyclades-Z/PCI: relocate winaddr=0x%lx ctladdr=0x%lx\n", @@ -5407,7 +5343,7 @@ for (i = 0; i < NR_CARDS; i++) { /* base_addr=0 indicates board not found */ - cy_card[i].base_addr = 0; + cy_card[i].base_addr = NULL; } /* the code below is responsible to find the boards. Each different @@ -5429,7 +5365,7 @@ for (i = 0 ; i < NR_CARDS ; i++) { if (cy_card[i].base_addr == 0) { cy_card[i].first_line = -1; - cy_card[i].ctl_addr = 0; + cy_card[i].ctl_addr = NULL; cy_card[i].irq = 0; cy_card[i].bus_index = 0; cy_card[i].first_line = 0; @@ -5447,7 +5383,7 @@ cinfo = &cy_card[board]; if (cinfo->num_chips == -1) { /* Cyclades-Z */ number_z_boards++; - mailbox = cy_readl(&((struct RUNTIME_9060 *) + mailbox = cy_readl(&((struct RUNTIME_9060 __iomem *) cy_card[board].ctl_addr)->mail_box_0); nports = (mailbox == ZE_V1) ? ZE_V1_NPORTS : 8; cinfo->intr_enabled = 0; @@ -5617,10 +5553,10 @@ put_tty_driver(cy_serial_driver); for (i = 0; i < NR_CARDS; i++) { - if (cy_card[i].base_addr != 0) { - iounmap((void *)cy_card[i].base_addr); - if (cy_card[i].ctl_addr != 0) - iounmap((void *)cy_card[i].ctl_addr); + if (cy_card[i].base_addr) { + iounmap(cy_card[i].base_addr); + if (cy_card[i].ctl_addr) + iounmap(cy_card[i].ctl_addr); if (cy_card[i].irq #ifndef CONFIG_CYZ_INTR && cy_card[i].num_chips != -1 /* not a Z card */ diff -Nru a/drivers/char/generic_serial.c b/drivers/char/generic_serial.c --- a/drivers/char/generic_serial.c 2004-10-03 19:06:21 -07:00 +++ b/drivers/char/generic_serial.c 2004-10-03 19:06:21 -07:00 @@ -691,7 +691,7 @@ unsigned long flags; struct gs_port *port; - func_enter () + func_enter (); if (!tty) return; diff -Nru a/drivers/char/hpet.c b/drivers/char/hpet.c --- a/drivers/char/hpet.c 2004-10-03 19:06:21 -07:00 +++ b/drivers/char/hpet.c 2004-10-03 19:06:21 -07:00 @@ -925,7 +925,7 @@ return 0; } -static struct acpi_driver hpet_acpi_driver __initdata = { +static struct acpi_driver hpet_acpi_driver = { .name = "hpet", .ids = "PNP0103", .ops = { diff -Nru a/drivers/char/moxa.c b/drivers/char/moxa.c --- a/drivers/char/moxa.c 2004-10-03 19:06:22 -07:00 +++ b/drivers/char/moxa.c 2004-10-03 19:06:22 -07:00 @@ -952,7 +952,7 @@ if (MoxaPortTxQueue(ch->port) <= WAKEUP_CHARS) { if (!tp->stopped) { ch->statusflags &= ~LOWWAIT; - tty_wakeup(tty); + tty_wakeup(tp); wake_up_interruptible(&tp->write_wait); } } @@ -1119,7 +1119,7 @@ if (ch->tty && (ch->statusflags & EMPTYWAIT)) { if (MoxaPortTxQueue(ch->port) == 0) { ch->statusflags &= ~EMPTYWAIT; - tty_wakeup(tty); + tty_wakeup(ch->tty); wake_up_interruptible(&ch->tty->write_wait); return; } diff -Nru a/drivers/char/random.c b/drivers/char/random.c --- a/drivers/char/random.c 2004-10-03 19:06:21 -07:00 +++ b/drivers/char/random.c 2004-10-03 19:06:21 -07:00 @@ -807,10 +807,11 @@ long delta, delta2, delta3; int entropy = 0; + preempt_disable(); /* if over the trickle threshold, use only 1 in 4096 samples */ if ( random_state->entropy_count > trickle_thresh && (__get_cpu_var(trickle_count)++ & 0xfff)) - return; + goto out; /* * Use get_cycles() if implemented, otherwise fall back to @@ -861,6 +862,8 @@ entropy = int_ln_12bits(delta); } batch_entropy_store(num, time, entropy); +out: + preempt_enable(); } void add_keyboard_randomness(unsigned char scancode) diff -Nru a/drivers/char/tty_io.c b/drivers/char/tty_io.c --- a/drivers/char/tty_io.c 2004-10-03 19:06:21 -07:00 +++ b/drivers/char/tty_io.c 2004-10-03 19:06:22 -07:00 @@ -130,8 +130,6 @@ /* Semaphore to protect creating and releasing a tty. This is shared with vt.c for deeply disgusting hack reasons */ DECLARE_MUTEX(tty_sem); -/* Lock for tty_termios changes - private to tty_io/tty_ioctl */ -spinlock_t tty_termios_lock = SPIN_LOCK_UNLOCKED; #ifdef CONFIG_UNIX98_PTYS extern struct tty_driver *ptm_driver; /* Unix98 pty masters; for /dev/ptmx */ @@ -239,10 +237,9 @@ static void tty_set_termios_ldisc(struct tty_struct *tty, int num) { - unsigned long flags; - spin_lock_irqsave(&tty_termios_lock, flags); + down(&tty->termios_sem); tty->termios->c_line = num; - spin_unlock_irqrestore(&tty_termios_lock, flags); + up(&tty->termios_sem); } /* @@ -811,10 +808,9 @@ */ if (tty->driver->flags & TTY_DRIVER_RESET_TERMIOS) { - unsigned long flags; - spin_lock_irqsave(&tty_termios_lock, flags); + down(&tty->termios_sem); *tty->termios = tty->driver->init_termios; - spin_unlock_irqrestore(&tty_termios_lock, flags); + up(&tty->termios_sem); } /* Defer ldisc switch */ @@ -2606,6 +2602,7 @@ tty->flip.flag_buf_ptr = tty->flip.flag_buf; INIT_WORK(&tty->flip.work, flush_to_ldisc, tty); init_MUTEX(&tty->flip.pty_sem); + init_MUTEX(&tty->termios_sem); init_waitqueue_head(&tty->write_wait); init_waitqueue_head(&tty->read_wait); INIT_WORK(&tty->hangup_work, do_tty_hangup, tty); diff -Nru a/drivers/char/tty_ioctl.c b/drivers/char/tty_ioctl.c --- a/drivers/char/tty_ioctl.c 2004-10-03 19:06:22 -07:00 +++ b/drivers/char/tty_ioctl.c 2004-10-03 19:06:22 -07:00 @@ -29,8 +29,6 @@ #undef DEBUG -extern spinlock_t tty_termios_lock; - /* * Internal flag options for termios setting behavior */ @@ -101,7 +99,6 @@ int canon_change; struct termios old_termios = *tty->termios; struct tty_ldisc *ld; - unsigned long flags; /* * Perform the actual termios internal changes under lock. @@ -110,7 +107,7 @@ /* FIXME: we need to decide on some locking/ordering semantics for the set_termios notification eventually */ - spin_lock_irqsave(&tty_termios_lock, flags); + down(&tty->termios_sem); *tty->termios = *new_termios; unset_locked_termios(tty->termios, &old_termios, tty->termios_locked); @@ -155,7 +152,7 @@ (ld->set_termios)(tty, &old_termios); tty_ldisc_deref(ld); } - spin_unlock_irqrestore(&tty_termios_lock, flags); + up(&tty->termios_sem); } static int set_termios(struct tty_struct * tty, void __user *arg, int opt) @@ -249,15 +246,14 @@ static int get_sgttyb(struct tty_struct * tty, struct sgttyb __user * sgttyb) { struct sgttyb tmp; - unsigned long flags; - spin_lock_irqsave(&tty_termios_lock, flags); + down(&tty->termios_sem); tmp.sg_ispeed = 0; tmp.sg_ospeed = 0; tmp.sg_erase = tty->termios->c_cc[VERASE]; tmp.sg_kill = tty->termios->c_cc[VKILL]; tmp.sg_flags = get_sgflags(tty); - spin_unlock_irqrestore(&tty_termios_lock, flags); + up(&tty->termios_sem); return copy_to_user(sgttyb, &tmp, sizeof(tmp)) ? -EFAULT : 0; } @@ -293,7 +289,6 @@ int retval; struct sgttyb tmp; struct termios termios; - unsigned long flags; retval = tty_check_change(tty); if (retval) @@ -301,13 +296,13 @@ if (copy_from_user(&tmp, sgttyb, sizeof(tmp))) return -EFAULT; - - spin_lock_irqsave(&tty_termios_lock, flags); + + down(&tty->termios_sem); termios = *tty->termios; termios.c_cc[VERASE] = tmp.sg_erase; termios.c_cc[VKILL] = tmp.sg_kill; set_sgflags(&termios, tmp.sg_flags); - spin_unlock_irqrestore(&tty_termios_lock, flags); + up(&tty->termios_sem); change_termios(tty, &termios); return 0; } @@ -399,7 +394,6 @@ void __user *p = (void __user *)arg; int retval; struct tty_ldisc *ld; - unsigned long flags; if (tty->driver->type == TTY_DRIVER_TYPE_PTY && tty->driver->subtype == PTY_TYPE_MASTER) @@ -543,11 +537,11 @@ case TIOCSSOFTCAR: if (get_user(arg, (unsigned int __user *) arg)) return -EFAULT; - spin_lock_irqsave(&tty_termios_lock, flags); + down(&tty->termios_sem); tty->termios->c_cflag = ((tty->termios->c_cflag & ~CLOCAL) | (arg ? CLOCAL : 0)); - spin_unlock_irqrestore(&tty_termios_lock, flags); + up(&tty->termios_sem); return 0; default: return -ENOIOCTLCMD; diff -Nru a/drivers/char/watchdog/sa1100_wdt.c b/drivers/char/watchdog/sa1100_wdt.c --- a/drivers/char/watchdog/sa1100_wdt.c 2004-10-03 19:06:21 -07:00 +++ b/drivers/char/watchdog/sa1100_wdt.c 2004-10-03 19:06:21 -07:00 @@ -27,6 +27,10 @@ #include #include +#ifdef CONFIG_ARCH_PXA +#include +#endif + #include #include #include diff -Nru a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c --- a/drivers/cpufreq/cpufreq_ondemand.c 2004-10-03 19:06:22 -07:00 +++ b/drivers/cpufreq/cpufreq_ondemand.c 2004-10-03 19:06:22 -07:00 @@ -59,7 +59,7 @@ #define DEF_SAMPLING_RATE_LATENCY_MULTIPLIER (1000) #define DEF_SAMPLING_DOWN_FACTOR (10) #define TRANSITION_LATENCY_LIMIT (10 * 1000) -#define sampling_rate_in_HZ(x) ((x * HZ) / (1000 * 1000)) +#define sampling_rate_in_HZ(x) (((x * HZ) < (1000 * 1000))?1:((x * HZ) / (1000 * 1000))) static void do_dbs_timer(void *data); @@ -221,6 +221,7 @@ static void dbs_check_cpu(int cpu) { unsigned int idle_ticks, up_idle_ticks, down_idle_ticks; + unsigned int total_idle_ticks; unsigned int freq_down_step; unsigned int freq_down_sampling_rate; static int down_skip[NR_CPUS]; @@ -244,19 +245,23 @@ * 5% of max_frequency */ /* Check for frequency increase */ - idle_ticks = kstat_cpu(cpu).cpustat.idle - + total_idle_ticks = kstat_cpu(cpu).cpustat.idle + + kstat_cpu(cpu).cpustat.iowait; + idle_ticks = total_idle_ticks - this_dbs_info->prev_cpu_idle_up; - this_dbs_info->prev_cpu_idle_up = kstat_cpu(cpu).cpustat.idle; + this_dbs_info->prev_cpu_idle_up = total_idle_ticks; + /* Scale idle ticks by 100 and compare with up and down ticks */ + idle_ticks *= 100; up_idle_ticks = (100 - dbs_tuners_ins.up_threshold) * - sampling_rate_in_HZ(dbs_tuners_ins.sampling_rate) / 100; + sampling_rate_in_HZ(dbs_tuners_ins.sampling_rate); if (idle_ticks < up_idle_ticks) { __cpufreq_driver_target(this_dbs_info->cur_policy, this_dbs_info->cur_policy->max, CPUFREQ_RELATION_H); down_skip[cpu] = 0; - this_dbs_info->prev_cpu_idle_down = kstat_cpu(cpu).cpustat.idle; + this_dbs_info->prev_cpu_idle_down = total_idle_ticks; return; } @@ -265,18 +270,25 @@ if (down_skip[cpu] < dbs_tuners_ins.sampling_down_factor) return; - idle_ticks = kstat_cpu(cpu).cpustat.idle - + idle_ticks = total_idle_ticks - this_dbs_info->prev_cpu_idle_down; + /* Scale idle ticks by 100 and compare with up and down ticks */ + idle_ticks *= 100; down_skip[cpu] = 0; - this_dbs_info->prev_cpu_idle_down = kstat_cpu(cpu).cpustat.idle; + this_dbs_info->prev_cpu_idle_down = total_idle_ticks; freq_down_sampling_rate = dbs_tuners_ins.sampling_rate * dbs_tuners_ins.sampling_down_factor; down_idle_ticks = (100 - dbs_tuners_ins.down_threshold) * - sampling_rate_in_HZ(freq_down_sampling_rate) / 100; + sampling_rate_in_HZ(freq_down_sampling_rate); if (idle_ticks > down_idle_ticks ) { freq_down_step = (5 * this_dbs_info->cur_policy->max) / 100; + + /* max freq cannot be less than 100. But who knows.... */ + if (unlikely(freq_down_step == 0)) + freq_down_step = 5; + __cpufreq_driver_target(this_dbs_info->cur_policy, this_dbs_info->cur_policy->cur - freq_down_step, CPUFREQ_RELATION_H); @@ -333,9 +345,11 @@ this_dbs_info->cur_policy = policy; this_dbs_info->prev_cpu_idle_up = - kstat_cpu(cpu).cpustat.idle; + kstat_cpu(cpu).cpustat.idle + + kstat_cpu(cpu).cpustat.iowait; this_dbs_info->prev_cpu_idle_down = - kstat_cpu(cpu).cpustat.idle; + kstat_cpu(cpu).cpustat.idle + + kstat_cpu(cpu).cpustat.iowait; this_dbs_info->enable = 1; sysfs_create_group(&policy->kobj, &dbs_attr_group); dbs_enable++; @@ -344,8 +358,14 @@ * is used for first time */ if (dbs_enable == 1) { + unsigned int latency; /* policy latency is in nS. Convert it to uS first */ - def_sampling_rate = (policy->cpuinfo.transition_latency / 1000) * + + latency = policy->cpuinfo.transition_latency; + if (latency < 1000) + latency = 1000; + + def_sampling_rate = (latency / 1000) * DEF_SAMPLING_RATE_LATENCY_MULTIPLIER; dbs_tuners_ins.sampling_rate = def_sampling_rate; diff -Nru a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig --- a/drivers/firmware/Kconfig 2004-10-03 19:06:21 -07:00 +++ b/drivers/firmware/Kconfig 2004-10-03 19:06:21 -07:00 @@ -14,8 +14,9 @@ Services real mode BIOS calls to determine which disk BIOS tries boot from. This information is then exported via sysfs. - This option is experimental, but believed to be safe, - and most disk controller BIOS vendors do not yet implement this feature. + This option is experimental and is known to fail to boot on some + obscure configurations. Most disk controller BIOS vendors do + not yet implement this feature. config EFI_VARS tristate "EFI Variable Support via sysfs" diff -Nru a/drivers/ide/Kconfig b/drivers/ide/Kconfig --- a/drivers/ide/Kconfig 2004-10-03 19:06:21 -07:00 +++ b/drivers/ide/Kconfig 2004-10-03 19:06:21 -07:00 @@ -830,6 +830,13 @@ Say Y here if you want to support the Yellowstone RapIDE controller manufactured for use with Acorn computers. +config BLK_DEV_IDE_BAST + tristate "Simtec BAST / Thorcom VR1000 IDE support" + depends on ARM && (ARCH_BAST || MACH_VR100) + help + Say Y here if you want to support the onboard IDE channels on the + Simtec BAST or the Thorcom VR1000 + config BLK_DEV_GAYLE bool "Amiga Gayle IDE interface support" depends on AMIGA diff -Nru a/drivers/ide/arm/Makefile b/drivers/ide/arm/Makefile --- a/drivers/ide/arm/Makefile 2004-10-03 19:06:21 -07:00 +++ b/drivers/ide/arm/Makefile 2004-10-03 19:06:21 -07:00 @@ -1,5 +1,6 @@ obj-$(CONFIG_BLK_DEV_IDE_ICSIDE) += icside.o obj-$(CONFIG_BLK_DEV_IDE_RAPIDE) += rapide.o +obj-$(CONFIG_BLK_DEV_IDE_BAST) += bast-ide.o EXTRA_CFLAGS := -Idrivers/ide diff -Nru a/drivers/ide/arm/bast-ide.c b/drivers/ide/arm/bast-ide.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/ide/arm/bast-ide.c 2004-10-03 19:06:22 -07:00 @@ -0,0 +1,71 @@ +/* linux/drivers/ide/arm/bast-ide.c + * + * Copyright (c) 2003-2004 Simtec Electronics + * Ben Dooks + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * +*/ + +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include + +/* list of registered interfaces */ +static ide_hwif_t *ifs[2]; + +static int __init +bastide_register(unsigned int base, unsigned int aux, int irq, + ide_hwif_t **hwif) +{ + hw_regs_t hw; + int i; + + memset(&hw, 0, sizeof(hw)); + + base += BAST_IDE_CS; + aux += BAST_IDE_CS; + + for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { + hw.io_ports[i] = (unsigned long)base; + base += 0x20; + } + + hw.io_ports[IDE_CONTROL_OFFSET] = aux + (6 * 0x20); + hw.irq = irq; + + ide_register_hw(&hw, hwif); + + return 0; +} + +static int __init bastide_init(void) +{ + /* we can treat the VR1000 and the BAST the same */ + + if (!(machine_is_bast() || machine_is_vr1000())) + return 0; + + printk("BAST: IDE driver, (c) 2003-2004 Simtec Electronics\n"); + + bastide_register(BAST_VA_IDEPRI, BAST_VA_IDEPRIAUX, IRQ_IDE0, &ifs[0]); + bastide_register(BAST_VA_IDESEC, BAST_VA_IDESECAUX, IRQ_IDE1, &ifs[1]); + return 0; +} + +module_init(bastide_init); + +MODULE_AUTHOR("Ben Dooks "); +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("Simtec BAST / Thorcom VR1000 IDE driver"); diff -Nru a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c --- a/drivers/ide/ide-probe.c 2004-10-03 19:06:21 -07:00 +++ b/drivers/ide/ide-probe.c 2004-10-03 19:06:21 -07:00 @@ -389,15 +389,6 @@ */ printk("%s: IRQ probe failed (0x%lx)\n", drive->name, cookie); -#ifdef CONFIG_BLK_DEV_CMD640 -#ifdef CMD640_DUMP_REGS - if (hwif->chipset == ide_cmd640) { - printk("%s: Hmmm.. probably a driver " - "problem.\n", drive->name); - CMD640_DUMP_REGS; - } -#endif /* CMD640_DUMP_REGS */ -#endif /* CONFIG_BLK_DEV_CMD640 */ } } } diff -Nru a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c --- a/drivers/ide/ide-proc.c 2004-10-03 19:06:21 -07:00 +++ b/drivers/ide/ide-proc.c 2004-10-03 19:06:21 -07:00 @@ -360,27 +360,14 @@ int err = 0; len = sprintf(page, "\n"); - - if (drive) - { + + if (drive) { unsigned short *val = (unsigned short *) page; - - /* - * The current code can't handle a driverless - * identify query taskfile. Now the right fix is - * to add a 'default' driver but that is a bit - * more work. - * - * FIXME: this has to be fixed for hotswap devices - */ - - if(DRIVER(drive)) - err = taskfile_lib_get_identify(drive, page); - else /* This relies on the ID changes */ - val = (unsigned short *)drive->id; - if(!err) - { + BUG_ON(!drive->driver); + + err = taskfile_lib_get_identify(drive, page); + if (!err) { char *out = ((char *)page) + (SECTOR_WORDS * 4); page = out; do { diff -Nru a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c --- a/drivers/ide/ide-taskfile.c 2004-10-03 19:06:21 -07:00 +++ b/drivers/ide/ide-taskfile.c 2004-10-03 19:06:21 -07:00 @@ -103,30 +103,6 @@ EXPORT_SYMBOL(taskfile_lib_get_identify); -#ifdef CONFIG_IDE_TASK_IOCTL_DEBUG -void debug_taskfile (ide_drive_t *drive, ide_task_t *args) -{ - printk(KERN_INFO "%s: ", drive->name); -// printk("TF.0=x%02x ", args->tfRegister[IDE_DATA_OFFSET]); - printk("TF.1=x%02x ", args->tfRegister[IDE_FEATURE_OFFSET]); - printk("TF.2=x%02x ", args->tfRegister[IDE_NSECTOR_OFFSET]); - printk("TF.3=x%02x ", args->tfRegister[IDE_SECTOR_OFFSET]); - printk("TF.4=x%02x ", args->tfRegister[IDE_LCYL_OFFSET]); - printk("TF.5=x%02x ", args->tfRegister[IDE_HCYL_OFFSET]); - printk("TF.6=x%02x ", args->tfRegister[IDE_SELECT_OFFSET]); - printk("TF.7=x%02x\n", args->tfRegister[IDE_COMMAND_OFFSET]); - printk(KERN_INFO "%s: ", drive->name); -// printk("HTF.0=x%02x ", args->hobRegister[IDE_DATA_OFFSET]); - printk("HTF.1=x%02x ", args->hobRegister[IDE_FEATURE_OFFSET]); - printk("HTF.2=x%02x ", args->hobRegister[IDE_NSECTOR_OFFSET]); - printk("HTF.3=x%02x ", args->hobRegister[IDE_SECTOR_OFFSET]); - printk("HTF.4=x%02x ", args->hobRegister[IDE_LCYL_OFFSET]); - printk("HTF.5=x%02x ", args->hobRegister[IDE_HCYL_OFFSET]); - printk("HTF.6=x%02x ", args->hobRegister[IDE_SELECT_OFFSET]); - printk("HTF.7=x%02x\n", args->hobRegister[IDE_CONTROL_OFFSET_HOB]); -} -#endif /* CONFIG_IDE_TASK_IOCTL_DEBUG */ - ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task) { ide_hwif_t *hwif = HWIF(drive); @@ -134,10 +110,6 @@ hob_struct_t *hobfile = (hob_struct_t *) task->hobRegister; u8 HIHI = (drive->addressing == 1) ? 0xE0 : 0xEF; -#ifdef CONFIG_IDE_TASK_IOCTL_DEBUG - void debug_taskfile(drive, task); -#endif /* CONFIG_IDE_TASK_IOCTL_DEBUG */ - /* ALL Command Block Executions SHALL clear nIEN, unless otherwise */ if (IDE_CONTROL_REG) { /* clear nIEN */ @@ -852,11 +824,6 @@ #if DEBUG_TASKFILE u8 status; #endif - - -#ifdef CONFIG_IDE_TASK_IOCTL_DEBUG - void debug_taskfile(drive, task); -#endif /* CONFIG_IDE_TASK_IOCTL_DEBUG */ if (task->data_phase == TASKFILE_MULTI_IN || task->data_phase == TASKFILE_MULTI_OUT) { diff -Nru a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c --- a/drivers/ide/pci/aec62xx.c 2004-10-03 19:06:22 -07:00 +++ b/drivers/ide/pci/aec62xx.c 2004-10-03 19:06:22 -07:00 @@ -29,8 +29,6 @@ static struct pci_dev *aec_devs[AEC_MAX_DEVS]; static int n_aec_devs; -#undef DEBUG_AEC_REGS - static int aec62xx_get_info (char *buffer, char **addr, off_t offset, int count) { char *p = buffer; @@ -44,9 +42,6 @@ struct pci_dev *dev = aec_devs[i]; unsigned long iobase = pci_resource_start(dev, 4); u8 c0 = 0, c1 = 0, art = 0; -#ifdef DEBUG_AEC_REGS - u8 uart = 0; -#endif /* DEBUG_AEC_REGS */ c0 = inb(iobase + 0x02); c1 = inb(iobase + 0x0a); @@ -83,24 +78,6 @@ p += sprintf(p, " %s(%s)\n", (c1&0x40)?((art&0xc0)?"UDMA":" DMA"):" PIO", (art&0x80)?"2":(art&0x40)?"1":"0"); -#ifdef DEBUG_AEC_REGS - (void) pci_read_config_byte(dev, 0x40, &art); - p += sprintf(p, "Active: 0x%02x", art); - (void) pci_read_config_byte(dev, 0x42, &art); - p += sprintf(p, " 0x%02x", art); - (void) pci_read_config_byte(dev, 0x44, &art); - p += sprintf(p, " 0x%02x", art); - (void) pci_read_config_byte(dev, 0x46, &art); - p += sprintf(p, " 0x%02x\n", art); - (void) pci_read_config_byte(dev, 0x41, &art); - p += sprintf(p, "Recovery: 0x%02x", art); - (void) pci_read_config_byte(dev, 0x43, &art); - p += sprintf(p, " 0x%02x", art); - (void) pci_read_config_byte(dev, 0x45, &art); - p += sprintf(p, " 0x%02x", art); - (void) pci_read_config_byte(dev, 0x47, &art); - p += sprintf(p, " 0x%02x\n", art); -#endif /* DEBUG_AEC_REGS */ } else { /* * case PCI_DEVICE_ID_ARTOP_ATP860: @@ -146,28 +123,6 @@ ((art&0x30)==0x30)?"2": ((art&0x20)==0x20)?"1": ((art&0x10)==0x10)?"0":"?"); -#ifdef DEBUG_AEC_REGS - (void) pci_read_config_byte(dev, 0x40, &art); - p += sprintf(p, "Active: 0x%02x", HIGH_4(art)); - (void) pci_read_config_byte(dev, 0x41, &art); - p += sprintf(p, " 0x%02x", HIGH_4(art)); - (void) pci_read_config_byte(dev, 0x42, &art); - p += sprintf(p, " 0x%02x", HIGH_4(art)); - (void) pci_read_config_byte(dev, 0x43, &art); - p += sprintf(p, " 0x%02x\n", HIGH_4(art)); - (void) pci_read_config_byte(dev, 0x40, &art); - p += sprintf(p, "Recovery: 0x%02x", LOW_4(art)); - (void) pci_read_config_byte(dev, 0x41, &art); - p += sprintf(p, " 0x%02x", LOW_4(art)); - (void) pci_read_config_byte(dev, 0x42, &art); - p += sprintf(p, " 0x%02x", LOW_4(art)); - (void) pci_read_config_byte(dev, 0x43, &art); - p += sprintf(p, " 0x%02x\n", LOW_4(art)); - (void) pci_read_config_byte(dev, 0x49, &uart); - p += sprintf(p, "reg49h = 0x%02x ", uart); - (void) pci_read_config_byte(dev, 0x4a, &uart); - p += sprintf(p, "reg4ah = 0x%02x\n", uart); -#endif /* DEBUG_AEC_REGS */ } } /* p - buffer must be less than 4k! */ @@ -240,6 +195,7 @@ unsigned long flags; local_irq_save(flags); + /* 0x40|(2*drive->dn): Active, 0x41|(2*drive->dn): Recovery */ pci_read_config_word(dev, 0x40|(2*drive->dn), &d_conf); tmp0 = pci_bus_clock_list(speed, BUSCLOCK(dev)); SPLIT_BYTE(tmp0,tmp1,tmp2); @@ -268,6 +224,7 @@ unsigned long flags; local_irq_save(flags); + /* high 4-bits: Active, low 4-bits: Recovery */ pci_read_config_byte(dev, 0x40|drive->dn, &drive_conf); drive_conf = pci_bus_clock_list(speed, BUSCLOCK(dev)); pci_write_config_byte(dev, 0x40|drive->dn, drive_conf); diff -Nru a/drivers/ide/pci/aec62xx.h b/drivers/ide/pci/aec62xx.h --- a/drivers/ide/pci/aec62xx.h 2004-10-03 19:06:21 -07:00 +++ b/drivers/ide/pci/aec62xx.h 2004-10-03 19:06:21 -07:00 @@ -53,13 +53,6 @@ { 0, 0x00, 0x00 } }; - -#ifndef HIGH_4 -#define HIGH_4(H) ((H)=(H>>4)) -#endif -#ifndef LOW_4 -#define LOW_4(L) ((L)=(L-((L>>4)<<4))) -#endif #ifndef SPLIT_BYTE #define SPLIT_BYTE(B,H,L) ((H)=(B>>4), (L)=(B-((B>>4)<<4))) #endif diff -Nru a/drivers/ide/pci/cmd640.c b/drivers/ide/pci/cmd640.c --- a/drivers/ide/pci/cmd640.c 2004-10-03 19:06:22 -07:00 +++ b/drivers/ide/pci/cmd640.c 2004-10-03 19:06:22 -07:00 @@ -101,6 +101,8 @@ #undef REALLY_SLOW_IO /* most systems can safely undef this */ #define CMD640_PREFETCH_MASKS 1 +//#define CMD640_DUMP_REGS + #include #include #include @@ -748,7 +750,7 @@ put_cmd640_reg(0x5b, 0); #ifdef CMD640_DUMP_REGS - CMD640_DUMP_REGS; + cmd640_dump_regs(); #endif /* @@ -870,7 +872,7 @@ } #ifdef CMD640_DUMP_REGS - CMD640_DUMP_REGS; + cmd640_dump_regs(); #endif return 1; } diff -Nru a/drivers/ide/pci/piix.c b/drivers/ide/pci/piix.c --- a/drivers/ide/pci/piix.c 2004-10-03 19:06:21 -07:00 +++ b/drivers/ide/pci/piix.c 2004-10-03 19:06:21 -07:00 @@ -561,36 +561,31 @@ drive->init_speed = 0; if ((id->capability & 1) && drive->autodma) { + /* Consult the list of known "bad" drives */ if (__ide_dma_bad_drive(drive)) goto fast_ata_pio; - if (id->field_valid & 4) { - if (id->dma_ultra & hwif->ultra_mask) { - /* Force if Capable UltraDMA */ - if ((id->field_valid & 2) && - (!piix_config_drive_for_dma(drive))) - goto try_dma_modes; - } - } else if (id->field_valid & 2) { -try_dma_modes: - if ((id->dma_mword & hwif->mwdma_mask) || - (id->dma_1word & hwif->swdma_mask)) { - /* Force if Capable regular DMA modes */ - if (!piix_config_drive_for_dma(drive)) - goto no_dma_set; - } - } else if (__ide_dma_good_drive(drive) && - (id->eide_dma_time < 150)) { - /* Consult the list of known "good" drives */ - if (!piix_config_drive_for_dma(drive)) - goto no_dma_set; - } else { - goto fast_ata_pio; + + /** + * Try to turn DMA on if: + * - UDMA or EIDE modes are supported or + * - drive is a known "good" drive + * + * Checks for best mode supported are down later by + * piix_config_drive_for_dma() -> ide_dma_speed() + */ + if ((id->field_valid & (4 | 2)) || + (__ide_dma_good_drive(drive) && id->eide_dma_time < 150)) { + if (piix_config_drive_for_dma(drive)) + return hwif->ide_dma_on(drive); } - return hwif->ide_dma_on(drive); + + /* For some reason DMA wasn't turned on, so try PIO. */ + goto fast_ata_pio; + } else if ((id->capability & 8) || (id->field_valid & 2)) { fast_ata_pio: -no_dma_set: + /* Find best PIO mode. */ hwif->tuneproc(drive, 255); return hwif->ide_dma_off_quietly(drive); } diff -Nru a/drivers/ide/pci/triflex.c b/drivers/ide/pci/triflex.c --- a/drivers/ide/pci/triflex.c 2004-10-03 19:06:21 -07:00 +++ b/drivers/ide/pci/triflex.c 2004-10-03 19:06:21 -07:00 @@ -41,57 +41,6 @@ #include #include -static struct pci_dev *triflex_dev; - -#ifdef CONFIG_PROC_FS -static int triflex_get_info(char *buf, char **addr, off_t offset, int count) -{ - char *p = buf; - int len; - - struct pci_dev *dev = triflex_dev; - unsigned long bibma = pci_resource_start(dev, 4); - u8 c0 = 0, c1 = 0; - u32 pri_timing, sec_timing; - - p += sprintf(p, "\n Compaq Triflex Chipset\n"); - - pci_read_config_dword(dev, 0x70, &pri_timing); - pci_read_config_dword(dev, 0x74, &sec_timing); - - /* - * at that point bibma+0x2 et bibma+0xa are byte registers - * to investigate: - */ - c0 = inb((unsigned short)bibma + 0x02); - c1 = inb((unsigned short)bibma + 0x0a); - - p += sprintf(p, "--------------- Primary Channel " - "---------------- Secondary Channel " - "-------------\n"); - p += sprintf(p, " %sabled " - " %sabled\n", - (c0&0x80) ? "dis" : " en", - (c1&0x80) ? "dis" : " en"); - p += sprintf(p, "--------------- drive0 --------- drive1 " - "-------- drive0 ---------- drive1 ------\n"); - p += sprintf(p, "DMA enabled: %s %s " - " %s %s\n", - (c0&0x20) ? "yes" : "no ", - (c0&0x40) ? "yes" : "no ", - (c1&0x20) ? "yes" : "no ", - (c1&0x40) ? "yes" : "no " ); - - p += sprintf(p, "DMA\n"); - p += sprintf(p, "PIO\n"); - - len = (p - buf) - offset; - *addr = buf + offset; - - return len > count ? count : len; -} -#endif - static int triflex_tune_chipset(ide_drive_t *drive, u8 xferspeed) { ide_hwif_t *hwif = HWIF(drive); @@ -206,18 +155,8 @@ hwif->drives[1].autodma = hwif->autodma; } -static unsigned int __init init_chipset_triflex(struct pci_dev *dev, - const char *name) -{ -#ifdef CONFIG_PROC_FS - ide_pci_create_host_proc("triflex", triflex_get_info); -#endif - return 0; -} - static ide_pci_device_t triflex_device __devinitdata = { .name = "TRIFLEX", - .init_chipset = init_chipset_triflex, .init_hwif = init_hwif_triflex, .channels = 2, .autodma = AUTODMA, @@ -229,7 +168,6 @@ const struct pci_device_id *id) { ide_setup_pci_device(dev, &triflex_device); - triflex_dev = dev; return 0; } diff -Nru a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c --- a/drivers/isdn/capi/capi.c 2004-10-03 19:06:22 -07:00 +++ b/drivers/isdn/capi/capi.c 2004-10-03 19:06:22 -07:00 @@ -646,7 +646,7 @@ kfree_skb(skb); (void)capiminor_del_ack(mp, datahandle); if (mp->tty) - tty_wakeup(tty); + tty_wakeup(mp->tty); (void)handle_minor_send(mp); } else { diff -Nru a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c --- a/drivers/isdn/i4l/isdn_tty.c 2004-10-03 19:06:22 -07:00 +++ b/drivers/isdn/i4l/isdn_tty.c 2004-10-03 19:06:22 -07:00 @@ -2673,7 +2673,7 @@ if ((info->flags & ISDN_ASYNC_CLOSING) || (!info->tty)) { return; } - tty_ldisc_flush(tty); + tty_ldisc_flush(info->tty); if ((info->flags & ISDN_ASYNC_CHECK_CD) && (!((info->flags & ISDN_ASYNC_CALLOUT_ACTIVE) && (info->flags & ISDN_ASYNC_CALLOUT_NOHUP)))) { diff -Nru a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c --- a/drivers/macintosh/therm_adt746x.c 2004-10-03 19:06:22 -07:00 +++ b/drivers/macintosh/therm_adt746x.c 2004-10-03 19:06:22 -07:00 @@ -28,6 +28,7 @@ #include #include #include +#include #undef DEBUG @@ -70,9 +71,7 @@ static int therm_bus, therm_address; static struct of_device * of_dev; static struct thermostat* thermostat; -static pid_t monitor_thread_id; -static int monitor_running; -static struct completion monitor_task_compl; +static struct task_struct *thread_therm = NULL; static int attach_one_thermostat(struct i2c_adapter *adapter, int addr, int busno); static void write_both_fan_speed(struct thermostat *th, int speed); @@ -136,9 +135,8 @@ th = thermostat; - if (monitor_running) { - monitor_running = 0; - wait_for_completion(&monitor_task_compl); + if (thread_therm != NULL) { + kthread_stop(thread_therm); } printk(KERN_INFO "adt746x: Putting max temperatures back from %d, %d, %d," @@ -237,16 +235,9 @@ #ifdef DEBUG int mfan_speed; #endif - - lock_kernel(); - daemonize("kfand"); - unlock_kernel(); - strcpy(current->comm, "thermostat"); - monitor_running = 1; - - while(monitor_running) + while(!kthread_should_stop()) { - msleep(2000); + msleep_interruptible(2000); /* Check status */ /* local : chip */ @@ -321,7 +312,6 @@ #endif } - complete_and_exit(&monitor_task_compl, 0); return 0; } @@ -387,7 +377,7 @@ thermostat = th; if (i2c_attach_client(&th->clt)) { - printk("adt746x: Thermostat failed to attach client !\n"); + printk(KERN_INFO "adt746x: Thermostat failed to attach client !\n"); thermostat = NULL; kfree(th); return -ENODEV; @@ -403,10 +393,13 @@ write_both_fan_speed(th, -1); } - init_completion(&monitor_task_compl); - - monitor_thread_id = kernel_thread(monitor_task, th, - SIGCHLD | CLONE_KERNEL); + thread_therm = kthread_run(monitor_task, th, "kfand"); + + if (thread_therm == ERR_PTR(-ENOMEM)) { + printk(KERN_INFO "adt746x: Kthread creation failed\n"); + thread_therm = NULL; + return -ENOMEM; + } return 0; } diff -Nru a/drivers/mtd/maps/ixp4xx.c b/drivers/mtd/maps/ixp4xx.c --- a/drivers/mtd/maps/ixp4xx.c 2004-10-03 19:06:21 -07:00 +++ b/drivers/mtd/maps/ixp4xx.c 2004-10-03 19:06:21 -07:00 @@ -1,5 +1,5 @@ /* - * $Id: ixp4xx.c,v 1.4 2004/08/31 22:55:51 dsaxena Exp $ + * $Id: ixp4xx.c,v 1.6 2004/09/17 00:25:06 gleixner Exp $ * * drivers/mtd/maps/ixp4xx.c * @@ -69,9 +69,22 @@ dest[len - 1] = BYTE0(src[i]); } +/* + * Unaligned writes are ignored, causing the 8-bit + * probe to fail and proceed to the 16-bit probe (which succeeds). + */ +static void ixp4xx_probe_write16(struct map_info *map, map_word d, unsigned long adr) +{ + if (!(adr & 1)) + *(__u16 *) (map->map_priv_1 + adr) = d.x[0]; +} + +/* + * Fast write16 function without the probing check above + */ static void ixp4xx_write16(struct map_info *map, map_word d, unsigned long adr) { - *(__u16 *) (map->map_priv_1 + adr) = d.x[0]; + *(__u16 *) (map->map_priv_1 + adr) = d.x[0]; } struct ixp4xx_flash_info { @@ -171,7 +184,7 @@ info->map.bankwidth = 2; info->map.name = dev->dev.bus_id; info->map.read = ixp4xx_read16, - info->map.write = ixp4xx_write16, + info->map.write = ixp4xx_probe_write16, info->map.copy_from = ixp4xx_copy_from, info->res = request_mem_region(dev->resource->start, @@ -184,7 +197,7 @@ } info->map.map_priv_1 = - (unsigned long) ioremap(dev->resource->start, + (void __iomem *) ioremap(dev->resource->start, dev->resource->end - dev->resource->start + 1); if (!info->map.map_priv_1) { printk(KERN_ERR "IXP4XXFlash: Failed to ioremap region\n"); @@ -199,6 +212,9 @@ goto Error; } info->mtd->owner = THIS_MODULE; + + /* Use the fast version */ + info->map.write = ixp4xx_write16, err = parse_mtd_partitions(info->mtd, probes, &info->partitions, 0); if (err > 0) { diff -Nru a/drivers/net/natsemi.c b/drivers/net/natsemi.c --- a/drivers/net/natsemi.c 2004-10-03 19:06:21 -07:00 +++ b/drivers/net/natsemi.c 2004-10-03 19:06:21 -07:00 @@ -719,7 +719,7 @@ }; static void move_int_phy(struct net_device *dev, int addr); -static int eeprom_read(long ioaddr, int location); +static int eeprom_read(void __iomem *ioaddr, int location); static int mdio_read(struct net_device *dev, int reg); static void mdio_write(struct net_device *dev, int reg, u16 data); static void init_phy_fixup(struct net_device *dev); @@ -769,9 +769,15 @@ static int netdev_get_regs(struct net_device *dev, u8 *buf); static int netdev_get_eeprom(struct net_device *dev, u8 *buf); +static inline void __iomem *ns_ioaddr(struct net_device *dev) +{ + return (void __iomem *) dev->base_addr; +} + static void move_int_phy(struct net_device *dev, int addr) { struct netdev_private *np = netdev_priv(dev); + void __iomem *ioaddr = ns_ioaddr(dev); int target = 31; /* @@ -788,8 +794,8 @@ target--; if (target == np->phy_addr_external) target--; - writew(target, dev->base_addr + PhyCtrl); - readw(dev->base_addr + PhyCtrl); + writew(target, ioaddr + PhyCtrl); + readw(ioaddr + PhyCtrl); udelay(1); } @@ -800,7 +806,8 @@ struct netdev_private *np; int i, option, irq, chip_idx = ent->driver_data; static int find_cnt = -1; - unsigned long ioaddr, iosize; + unsigned long iostart, iosize; + void __iomem *ioaddr; const int pcibar = 1; /* PCI base address register */ int prev_eedata; u32 tmp; @@ -827,7 +834,7 @@ } find_cnt++; - ioaddr = pci_resource_start(pdev, pcibar); + iostart = pci_resource_start(pdev, pcibar); iosize = pci_resource_len(pdev, pcibar); irq = pdev->irq; @@ -844,7 +851,7 @@ if (i) goto err_pci_request_regions; - ioaddr = (unsigned long) ioremap (ioaddr, iosize); + ioaddr = ioremap(iostart, iosize); if (!ioaddr) { i = -ENOMEM; goto err_ioremap; @@ -859,7 +866,7 @@ prev_eedata = eedata; } - dev->base_addr = ioaddr; + dev->base_addr = (unsigned long __force) ioaddr; dev->irq = irq; np = netdev_priv(dev); @@ -879,7 +886,7 @@ * The address would be used to access a phy over the mii bus, but * the internal phy is accessed through mapped registers. */ - if (readl(dev->base_addr + ChipConfig) & CfgExtPhy) + if (readl(ioaddr + ChipConfig) & CfgExtPhy) dev->if_port = PORT_MII; else dev->if_port = PORT_TP; @@ -971,7 +978,7 @@ if (netif_msg_drv(np)) { printk(KERN_INFO "natsemi %s: %s at %#08lx (%s), ", - dev->name, natsemi_pci_info[chip_idx].name, ioaddr, + dev->name, natsemi_pci_info[chip_idx].name, iostart, pci_name(np->pci_dev)); for (i = 0; i < ETH_ALEN-1; i++) printk("%02x:", dev->dev_addr[i]); @@ -984,7 +991,7 @@ return 0; err_register_netdev: - iounmap ((void *) dev->base_addr); + iounmap(ioaddr); err_ioremap: pci_release_regions(pdev); @@ -1016,12 +1023,13 @@ EE_WriteCmd=(5 << 6), EE_ReadCmd=(6 << 6), EE_EraseCmd=(7 << 6), }; -static int eeprom_read(long addr, int location) +static int eeprom_read(void __iomem *addr, int location) { int i; int retval = 0; - long ee_addr = addr + EECtrl; + void __iomem *ee_addr = addr + EECtrl; int read_cmd = location | EE_ReadCmd; + writel(EE_Write0, ee_addr); /* Shift the read command bits out. */ @@ -1058,33 +1066,35 @@ /* clock transitions >= 20ns (25MHz) * One readl should be good to PCI @ 100MHz */ -#define mii_delay(dev) readl(dev->base_addr + EECtrl) +#define mii_delay(ioaddr) readl(ioaddr + EECtrl) static int mii_getbit (struct net_device *dev) { int data; + void __iomem *ioaddr = ns_ioaddr(dev); - writel(MII_ShiftClk, dev->base_addr + EECtrl); - data = readl(dev->base_addr + EECtrl); - writel(0, dev->base_addr + EECtrl); - mii_delay(dev); + writel(MII_ShiftClk, ioaddr + EECtrl); + data = readl(ioaddr + EECtrl); + writel(0, ioaddr + EECtrl); + mii_delay(ioaddr); return (data & MII_Data)? 1 : 0; } static void mii_send_bits (struct net_device *dev, u32 data, int len) { u32 i; + void __iomem *ioaddr = ns_ioaddr(dev); for (i = (1 << (len-1)); i; i >>= 1) { u32 mdio_val = MII_Write | ((data & i)? MII_Data : 0); - writel(mdio_val, dev->base_addr + EECtrl); - mii_delay(dev); - writel(mdio_val | MII_ShiftClk, dev->base_addr + EECtrl); - mii_delay(dev); + writel(mdio_val, ioaddr + EECtrl); + mii_delay(ioaddr); + writel(mdio_val | MII_ShiftClk, ioaddr + EECtrl); + mii_delay(ioaddr); } - writel(0, dev->base_addr + EECtrl); - mii_delay(dev); + writel(0, ioaddr + EECtrl); + mii_delay(ioaddr); } static int miiport_read(struct net_device *dev, int phy_id, int reg) @@ -1129,13 +1139,14 @@ static int mdio_read(struct net_device *dev, int reg) { struct netdev_private *np = netdev_priv(dev); + void __iomem *ioaddr = ns_ioaddr(dev); /* The 83815 series has two ports: * - an internal transceiver * - an external mii bus */ if (dev->if_port == PORT_TP) - return readw(dev->base_addr+BasicControl+(reg<<2)); + return readw(ioaddr+BasicControl+(reg<<2)); else return miiport_read(dev, np->phy_addr_external, reg); } @@ -1143,10 +1154,11 @@ static void mdio_write(struct net_device *dev, int reg, u16 data) { struct netdev_private *np = netdev_priv(dev); + void __iomem *ioaddr = ns_ioaddr(dev); /* The 83815 series has an internal transceiver; handle separately */ if (dev->if_port == PORT_TP) - writew(data, dev->base_addr+BasicControl+(reg<<2)); + writew(data, ioaddr+BasicControl+(reg<<2)); else miiport_write(dev, np->phy_addr_external, reg, data); } @@ -1154,7 +1166,7 @@ static void init_phy_fixup(struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); - long ioaddr = dev->base_addr; + void __iomem *ioaddr = ns_ioaddr(dev); int i; u32 cfg; u16 tmp; @@ -1186,7 +1198,7 @@ */ } mdio_write(dev, MII_BMCR, tmp); - readl(dev->base_addr + ChipConfig); + readl(ioaddr + ChipConfig); udelay(1); /* find out what phy this is */ @@ -1208,7 +1220,7 @@ default: break; } - cfg = readl(dev->base_addr + ChipConfig); + cfg = readl(ioaddr + ChipConfig); if (cfg & CfgExtPhy) return; @@ -1266,9 +1278,10 @@ static int switch_port_external(struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); + void __iomem *ioaddr = ns_ioaddr(dev); u32 cfg; - cfg = readl(dev->base_addr + ChipConfig); + cfg = readl(ioaddr + ChipConfig); if (cfg & CfgExtPhy) return 0; @@ -1278,8 +1291,8 @@ } /* 1) switch back to external phy */ - writel(cfg | (CfgExtPhy | CfgPhyDis), dev->base_addr + ChipConfig); - readl(dev->base_addr + ChipConfig); + writel(cfg | (CfgExtPhy | CfgPhyDis), ioaddr + ChipConfig); + readl(ioaddr + ChipConfig); udelay(1); /* 2) reset the external phy: */ @@ -1298,11 +1311,12 @@ static int switch_port_internal(struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); + void __iomem *ioaddr = ns_ioaddr(dev); int i; u32 cfg; u16 bmcr; - cfg = readl(dev->base_addr + ChipConfig); + cfg = readl(ioaddr + ChipConfig); if (!(cfg &CfgExtPhy)) return 0; @@ -1312,17 +1326,17 @@ } /* 1) switch back to internal phy: */ cfg = cfg & ~(CfgExtPhy | CfgPhyDis); - writel(cfg, dev->base_addr + ChipConfig); - readl(dev->base_addr + ChipConfig); + writel(cfg, ioaddr + ChipConfig); + readl(ioaddr + ChipConfig); udelay(1); /* 2) reset the internal phy: */ - bmcr = readw(dev->base_addr+BasicControl+(MII_BMCR<<2)); - writel(bmcr | BMCR_RESET, dev->base_addr+BasicControl+(MII_BMCR<<2)); - readl(dev->base_addr + ChipConfig); + bmcr = readw(ioaddr+BasicControl+(MII_BMCR<<2)); + writel(bmcr | BMCR_RESET, ioaddr+BasicControl+(MII_BMCR<<2)); + readl(ioaddr + ChipConfig); udelay(10); for (i=0;ibase_addr+BasicControl+(MII_BMCR<<2)); + bmcr = readw(ioaddr+BasicControl+(MII_BMCR<<2)); if (!(bmcr & BMCR_RESET)) break; udelay(10); @@ -1398,6 +1412,7 @@ u16 pmatch[3]; u16 sopass[3]; struct netdev_private *np = netdev_priv(dev); + void __iomem *ioaddr = ns_ioaddr(dev); /* * Resetting the chip causes some registers to be lost. @@ -1408,26 +1423,26 @@ */ /* CFG */ - cfg = readl(dev->base_addr + ChipConfig) & CFG_RESET_SAVE; + cfg = readl(ioaddr + ChipConfig) & CFG_RESET_SAVE; /* WCSR */ - wcsr = readl(dev->base_addr + WOLCmd) & WCSR_RESET_SAVE; + wcsr = readl(ioaddr + WOLCmd) & WCSR_RESET_SAVE; /* RFCR */ - rfcr = readl(dev->base_addr + RxFilterAddr) & RFCR_RESET_SAVE; + rfcr = readl(ioaddr + RxFilterAddr) & RFCR_RESET_SAVE; /* PMATCH */ for (i = 0; i < 3; i++) { - writel(i*2, dev->base_addr + RxFilterAddr); - pmatch[i] = readw(dev->base_addr + RxFilterData); + writel(i*2, ioaddr + RxFilterAddr); + pmatch[i] = readw(ioaddr + RxFilterData); } /* SOPAS */ for (i = 0; i < 3; i++) { - writel(0xa+(i*2), dev->base_addr + RxFilterAddr); - sopass[i] = readw(dev->base_addr + RxFilterData); + writel(0xa+(i*2), ioaddr + RxFilterAddr); + sopass[i] = readw(ioaddr + RxFilterData); } /* now whack the chip */ - writel(ChipReset, dev->base_addr + ChipCmd); + writel(ChipReset, ioaddr + ChipCmd); for (i=0;ibase_addr + ChipCmd) & ChipReset)) + if (!(readl(ioaddr + ChipCmd) & ChipReset)) break; udelay(5); } @@ -1440,40 +1455,41 @@ } /* restore CFG */ - cfg |= readl(dev->base_addr + ChipConfig) & ~CFG_RESET_SAVE; + cfg |= readl(ioaddr + ChipConfig) & ~CFG_RESET_SAVE; /* turn on external phy if it was selected */ if (dev->if_port == PORT_TP) cfg &= ~(CfgExtPhy | CfgPhyDis); else cfg |= (CfgExtPhy | CfgPhyDis); - writel(cfg, dev->base_addr + ChipConfig); + writel(cfg, ioaddr + ChipConfig); /* restore WCSR */ - wcsr |= readl(dev->base_addr + WOLCmd) & ~WCSR_RESET_SAVE; - writel(wcsr, dev->base_addr + WOLCmd); + wcsr |= readl(ioaddr + WOLCmd) & ~WCSR_RESET_SAVE; + writel(wcsr, ioaddr + WOLCmd); /* read RFCR */ - rfcr |= readl(dev->base_addr + RxFilterAddr) & ~RFCR_RESET_SAVE; + rfcr |= readl(ioaddr + RxFilterAddr) & ~RFCR_RESET_SAVE; /* restore PMATCH */ for (i = 0; i < 3; i++) { - writel(i*2, dev->base_addr + RxFilterAddr); - writew(pmatch[i], dev->base_addr + RxFilterData); + writel(i*2, ioaddr + RxFilterAddr); + writew(pmatch[i], ioaddr + RxFilterData); } for (i = 0; i < 3; i++) { - writel(0xa+(i*2), dev->base_addr + RxFilterAddr); - writew(sopass[i], dev->base_addr + RxFilterData); + writel(0xa+(i*2), ioaddr + RxFilterAddr); + writew(sopass[i], ioaddr + RxFilterData); } /* restore RFCR */ - writel(rfcr, dev->base_addr + RxFilterAddr); + writel(rfcr, ioaddr + RxFilterAddr); } static void natsemi_reload_eeprom(struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); + void __iomem *ioaddr = ns_ioaddr(dev); int i; - writel(EepromReload, dev->base_addr + PCIBusCfg); + writel(EepromReload, ioaddr + PCIBusCfg); for (i=0;ibase_addr + PCIBusCfg) & EepromReload)) + if (!(readl(ioaddr + PCIBusCfg) & EepromReload)) break; } if (i==NATSEMI_HW_TIMEOUT) { @@ -1487,7 +1503,7 @@ static void natsemi_stop_rxtx(struct net_device *dev) { - long ioaddr = dev->base_addr; + void __iomem * ioaddr = ns_ioaddr(dev); struct netdev_private *np = netdev_priv(dev); int i; @@ -1509,7 +1525,7 @@ static int netdev_open(struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); - long ioaddr = dev->base_addr; + void __iomem * ioaddr = ns_ioaddr(dev); int i; /* Reset the chip, just in case. */ @@ -1558,6 +1574,7 @@ static void do_cable_magic(struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); + void __iomem *ioaddr = ns_ioaddr(dev); if (dev->if_port != PORT_TP) return; @@ -1571,15 +1588,15 @@ * activity LED while idle. This process is based on instructions * from engineers at National. */ - if (readl(dev->base_addr + ChipConfig) & CfgSpeed100) { + if (readl(ioaddr + ChipConfig) & CfgSpeed100) { u16 data; - writew(1, dev->base_addr + PGSEL); + writew(1, ioaddr + PGSEL); /* * coefficient visibility should already be enabled via * DSPCFG | 0x1000 */ - data = readw(dev->base_addr + TSTDAT) & 0xff; + data = readw(ioaddr + TSTDAT) & 0xff; /* * the value must be negative, and within certain values * (these values all come from National) @@ -1588,13 +1605,13 @@ struct netdev_private *np = netdev_priv(dev); /* the bug has been triggered - fix the coefficient */ - writew(TSTDAT_FIXED, dev->base_addr + TSTDAT); + writew(TSTDAT_FIXED, ioaddr + TSTDAT); /* lock the value */ - data = readw(dev->base_addr + DSPCFG); + data = readw(ioaddr + DSPCFG); np->dspcfg = data | DSPCFG_LOCK; - writew(np->dspcfg, dev->base_addr + DSPCFG); + writew(np->dspcfg, ioaddr + DSPCFG); } - writew(0, dev->base_addr + PGSEL); + writew(0, ioaddr + PGSEL); } } @@ -1602,6 +1619,7 @@ { u16 data; struct netdev_private *np = netdev_priv(dev); + void __iomem * ioaddr = ns_ioaddr(dev); if (dev->if_port != PORT_TP) return; @@ -1609,18 +1627,18 @@ if (np->srr >= SRR_DP83816_A5) return; - writew(1, dev->base_addr + PGSEL); + writew(1, ioaddr + PGSEL); /* make sure the lock bit is clear */ - data = readw(dev->base_addr + DSPCFG); + data = readw(ioaddr + DSPCFG); np->dspcfg = data & ~DSPCFG_LOCK; - writew(np->dspcfg, dev->base_addr + DSPCFG); - writew(0, dev->base_addr + PGSEL); + writew(np->dspcfg, ioaddr + DSPCFG); + writew(0, ioaddr + PGSEL); } static void check_link(struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); - long ioaddr = dev->base_addr; + void __iomem * ioaddr = ns_ioaddr(dev); int duplex; u16 bmsr; @@ -1681,7 +1699,7 @@ static void init_registers(struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); - long ioaddr = dev->base_addr; + void __iomem * ioaddr = ns_ioaddr(dev); init_phy_fixup(dev); @@ -1760,6 +1778,7 @@ { struct net_device *dev = (struct net_device *)data; struct netdev_private *np = netdev_priv(dev); + void __iomem * ioaddr = ns_ioaddr(dev); int next_tick = 5*HZ; if (netif_msg_timer(np)) { @@ -1771,7 +1790,6 @@ } if (dev->if_port == PORT_TP) { - long ioaddr = dev->base_addr; u16 dspcfg; spin_lock_irq(&np->lock); @@ -1814,7 +1832,7 @@ refill_rx(dev); enable_irq(dev->irq); if (!np->oom) { - writel(RxOn, dev->base_addr + ChipCmd); + writel(RxOn, ioaddr + ChipCmd); } else { next_tick = 1; } @@ -1848,7 +1866,7 @@ static void tx_timeout(struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); - long ioaddr = dev->base_addr; + void __iomem * ioaddr = ns_ioaddr(dev); disable_irq(dev->irq); spin_lock_irq(&np->lock); @@ -2048,6 +2066,7 @@ static int start_tx(struct sk_buff *skb, struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); + void __iomem * ioaddr = ns_ioaddr(dev); unsigned entry; /* Note: Ordering is important here, set the field with the @@ -2076,7 +2095,7 @@ netif_stop_queue(dev); } /* Wake the potentially-idle transmit channel. */ - writel(TxOn, dev->base_addr + ChipCmd); + writel(TxOn, ioaddr + ChipCmd); } else { dev_kfree_skb_irq(skb); np->stats.tx_dropped++; @@ -2141,7 +2160,7 @@ { struct net_device *dev = dev_instance; struct netdev_private *np = netdev_priv(dev); - long ioaddr = dev->base_addr; + void __iomem * ioaddr = ns_ioaddr(dev); int boguscnt = max_interrupt_work; unsigned int handled = 0; @@ -2203,6 +2222,7 @@ int boguscnt = np->dirty_rx + RX_RING_SIZE - np->cur_rx; s32 desc_status = le32_to_cpu(np->rx_head_desc->cmd_status); unsigned int buflen = np->rx_buf_sz; + void __iomem * ioaddr = ns_ioaddr(dev); /* If the driver owns the next entry it's a new packet. Send it up. */ while (desc_status < 0) { /* e.g. & DescOwn */ @@ -2284,13 +2304,13 @@ if (np->oom) mod_timer(&np->timer, jiffies + 1); else - writel(RxOn, dev->base_addr + ChipCmd); + writel(RxOn, ioaddr + ChipCmd); } static void netdev_error(struct net_device *dev, int intr_status) { struct netdev_private *np = netdev_priv(dev); - long ioaddr = dev->base_addr; + void __iomem * ioaddr = ns_ioaddr(dev); spin_lock(&np->lock); if (intr_status & LinkChange) { @@ -2349,7 +2369,7 @@ static void __get_stats(struct net_device *dev) { - long ioaddr = dev->base_addr; + void __iomem * ioaddr = ns_ioaddr(dev); struct netdev_private *np = netdev_priv(dev); /* The chip only need report frame silently dropped. */ @@ -2382,7 +2402,7 @@ #define HASH_TABLE 0x200 static void __set_rx_mode(struct net_device *dev) { - long ioaddr = dev->base_addr; + void __iomem * ioaddr = ns_ioaddr(dev); struct netdev_private *np = netdev_priv(dev); u8 mc_filter[64]; /* Multicast hash filter */ u32 rx_mode; @@ -2428,7 +2448,7 @@ /* synchronized against open : rtnl_lock() held by caller */ if (netif_running(dev)) { struct netdev_private *np = netdev_priv(dev); - long ioaddr = dev->base_addr; + void __iomem * ioaddr = ns_ioaddr(dev); disable_irq(dev->irq); spin_lock(&np->lock); @@ -2631,7 +2651,8 @@ static int netdev_set_wol(struct net_device *dev, u32 newval) { struct netdev_private *np = netdev_priv(dev); - u32 data = readl(dev->base_addr + WOLCmd) & ~WakeOptsSummary; + void __iomem * ioaddr = ns_ioaddr(dev); + u32 data = readl(ioaddr + WOLCmd) & ~WakeOptsSummary; /* translate to bitmasks this chip understands */ if (newval & WAKE_PHY) @@ -2652,7 +2673,7 @@ } } - writel(data, dev->base_addr + WOLCmd); + writel(data, ioaddr + WOLCmd); return 0; } @@ -2660,7 +2681,8 @@ static int netdev_get_wol(struct net_device *dev, u32 *supported, u32 *cur) { struct netdev_private *np = netdev_priv(dev); - u32 regval = readl(dev->base_addr + WOLCmd); + void __iomem * ioaddr = ns_ioaddr(dev); + u32 regval = readl(ioaddr + WOLCmd); *supported = (WAKE_PHY | WAKE_UCAST | WAKE_MCAST | WAKE_BCAST | WAKE_ARP | WAKE_MAGIC); @@ -2695,6 +2717,7 @@ static int netdev_set_sopass(struct net_device *dev, u8 *newval) { struct netdev_private *np = netdev_priv(dev); + void __iomem * ioaddr = ns_ioaddr(dev); u16 *sval = (u16 *)newval; u32 addr; @@ -2703,22 +2726,22 @@ } /* enable writing to these registers by disabling the RX filter */ - addr = readl(dev->base_addr + RxFilterAddr) & ~RFCRAddressMask; + addr = readl(ioaddr + RxFilterAddr) & ~RFCRAddressMask; addr &= ~RxFilterEnable; - writel(addr, dev->base_addr + RxFilterAddr); + writel(addr, ioaddr + RxFilterAddr); /* write the three words to (undocumented) RFCR vals 0xa, 0xc, 0xe */ - writel(addr | 0xa, dev->base_addr + RxFilterAddr); - writew(sval[0], dev->base_addr + RxFilterData); + writel(addr | 0xa, ioaddr + RxFilterAddr); + writew(sval[0], ioaddr + RxFilterData); - writel(addr | 0xc, dev->base_addr + RxFilterAddr); - writew(sval[1], dev->base_addr + RxFilterData); + writel(addr | 0xc, ioaddr + RxFilterAddr); + writew(sval[1], ioaddr + RxFilterData); - writel(addr | 0xe, dev->base_addr + RxFilterAddr); - writew(sval[2], dev->base_addr + RxFilterData); + writel(addr | 0xe, ioaddr + RxFilterAddr); + writew(sval[2], ioaddr + RxFilterData); /* re-enable the RX filter */ - writel(addr | RxFilterEnable, dev->base_addr + RxFilterAddr); + writel(addr | RxFilterEnable, ioaddr + RxFilterAddr); return 0; } @@ -2726,6 +2749,7 @@ static int netdev_get_sopass(struct net_device *dev, u8 *data) { struct netdev_private *np = netdev_priv(dev); + void __iomem * ioaddr = ns_ioaddr(dev); u16 *sval = (u16 *)data; u32 addr; @@ -2735,18 +2759,18 @@ } /* read the three words from (undocumented) RFCR vals 0xa, 0xc, 0xe */ - addr = readl(dev->base_addr + RxFilterAddr) & ~RFCRAddressMask; + addr = readl(ioaddr + RxFilterAddr) & ~RFCRAddressMask; - writel(addr | 0xa, dev->base_addr + RxFilterAddr); - sval[0] = readw(dev->base_addr + RxFilterData); + writel(addr | 0xa, ioaddr + RxFilterAddr); + sval[0] = readw(ioaddr + RxFilterData); - writel(addr | 0xc, dev->base_addr + RxFilterAddr); - sval[1] = readw(dev->base_addr + RxFilterData); + writel(addr | 0xc, ioaddr + RxFilterAddr); + sval[1] = readw(ioaddr + RxFilterData); - writel(addr | 0xe, dev->base_addr + RxFilterAddr); - sval[2] = readw(dev->base_addr + RxFilterData); + writel(addr | 0xe, ioaddr + RxFilterAddr); + sval[2] = readw(ioaddr + RxFilterData); - writel(addr, dev->base_addr + RxFilterAddr); + writel(addr, ioaddr + RxFilterAddr); return 0; } @@ -2909,10 +2933,11 @@ int j; u32 rfcr; u32 *rbuf = (u32 *)buf; + void __iomem * ioaddr = ns_ioaddr(dev); /* read non-mii page 0 of registers */ for (i = 0; i < NATSEMI_PG0_NREGS/2; i++) { - rbuf[i] = readl(dev->base_addr + i*4); + rbuf[i] = readl(ioaddr + i*4); } /* read current mii registers */ @@ -2920,20 +2945,20 @@ rbuf[i] = mdio_read(dev, i & 0x1f); /* read only the 'magic' registers from page 1 */ - writew(1, dev->base_addr + PGSEL); - rbuf[i++] = readw(dev->base_addr + PMDCSR); - rbuf[i++] = readw(dev->base_addr + TSTDAT); - rbuf[i++] = readw(dev->base_addr + DSPCFG); - rbuf[i++] = readw(dev->base_addr + SDCFG); - writew(0, dev->base_addr + PGSEL); + writew(1, ioaddr + PGSEL); + rbuf[i++] = readw(ioaddr + PMDCSR); + rbuf[i++] = readw(ioaddr + TSTDAT); + rbuf[i++] = readw(ioaddr + DSPCFG); + rbuf[i++] = readw(ioaddr + SDCFG); + writew(0, ioaddr + PGSEL); /* read RFCR indexed registers */ - rfcr = readl(dev->base_addr + RxFilterAddr); + rfcr = readl(ioaddr + RxFilterAddr); for (j = 0; j < NATSEMI_RFDR_NREGS; j++) { - writel(j*2, dev->base_addr + RxFilterAddr); - rbuf[i++] = readw(dev->base_addr + RxFilterData); + writel(j*2, ioaddr + RxFilterAddr); + rbuf[i++] = readw(ioaddr + RxFilterData); } - writel(rfcr, dev->base_addr + RxFilterAddr); + writel(rfcr, ioaddr + RxFilterAddr); /* the interrupt status is clear-on-read - see if we missed any */ if (rbuf[4] & rbuf[5]) { @@ -2958,10 +2983,11 @@ { int i; u16 *ebuf = (u16 *)buf; + void __iomem * ioaddr = ns_ioaddr(dev); /* eeprom_read reads 16 bits, and indexes by 16 bits */ for (i = 0; i < NATSEMI_EEPROM_SIZE/2; i++) { - ebuf[i] = eeprom_read(dev->base_addr, i); + ebuf[i] = eeprom_read(ioaddr, i); /* The EEPROM itself stores data bit-swapped, but eeprom_read * reads it back "sanely". So we swap it back here in order to * present it to userland as it is stored. */ @@ -3031,7 +3057,7 @@ static void enable_wol_mode(struct net_device *dev, int enable_intr) { - long ioaddr = dev->base_addr; + void __iomem * ioaddr = ns_ioaddr(dev); struct netdev_private *np = netdev_priv(dev); if (netif_msg_wol(np)) @@ -3064,7 +3090,7 @@ static int netdev_close(struct net_device *dev) { - long ioaddr = dev->base_addr; + void __iomem * ioaddr = ns_ioaddr(dev); struct netdev_private *np = netdev_priv(dev); if (netif_msg_ifdown(np)) @@ -3141,10 +3167,11 @@ static void __devexit natsemi_remove1 (struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata(pdev); + void __iomem * ioaddr = ns_ioaddr(dev); unregister_netdev (dev); pci_release_regions (pdev); - iounmap ((char *) dev->base_addr); + iounmap(ioaddr); free_netdev (dev); pci_set_drvdata(pdev, NULL); } @@ -3178,7 +3205,7 @@ { struct net_device *dev = pci_get_drvdata (pdev); struct netdev_private *np = netdev_priv(dev); - long ioaddr = dev->base_addr; + void __iomem * ioaddr = ns_ioaddr(dev); rtnl_lock(); if (netif_running (dev)) { diff -Nru a/drivers/net/sungem.c b/drivers/net/sungem.c --- a/drivers/net/sungem.c 2004-10-03 19:06:22 -07:00 +++ b/drivers/net/sungem.c 2004-10-03 19:06:22 -07:00 @@ -2742,23 +2742,6 @@ } #endif /* not Sparc and not PPC */ -#ifdef CONFIG_NET_POLL_CONTROLLER -/* - * Polling 'interrupt' - used by things like netconsole to send skbs - * without having to re-enable interrupts. It's not called while - * the interrupt routine is executing. - */ -static void gem_netpoll(struct net_device *netdev) -{ - struct gem *gp = netdev->priv; - if (!gp->pdev) - return; - disable_irq(gp->pdev->irq); - gem_interrupt(gp->pdev->irq, netdev, NULL); - enable_irq(gp->pdev->irq); -} -#endif - static int __devinit gem_get_device_address(struct gem *gp) { #if defined(__sparc__) || defined(CONFIG_PPC_PMAC) @@ -2957,9 +2940,6 @@ dev->set_multicast_list = gem_set_multicast; dev->do_ioctl = gem_ioctl; dev->poll = gem_poll; -#ifdef CONFIG_NET_POLL_CONTROLLER - dev->poll_controller = gem_netpoll; -#endif dev->weight = 64; dev->ethtool_ops = &gem_ethtool_ops; dev->tx_timeout = gem_tx_timeout; @@ -2968,7 +2948,7 @@ dev->irq = pdev->irq; dev->dma = 0; #ifdef CONFIG_NET_POLL_CONTROLLER - dev->poll_controller = gem_poll_controller; + dev->poll_controller = gem_poll_controller; #endif if (register_netdev(dev)) { diff -Nru a/drivers/net/wan/pc300_tty.c b/drivers/net/wan/pc300_tty.c --- a/drivers/net/wan/pc300_tty.c 2004-10-03 19:06:21 -07:00 +++ b/drivers/net/wan/pc300_tty.c 2004-10-03 19:06:21 -07:00 @@ -192,13 +192,14 @@ */ void cpc_tty_init(pc300dev_t *pc300dev) { - int port, aux; + unsigned long port; + int aux; st_cpc_tty_area * cpc_tty; /* hdlcX - X=interface number */ port = pc300dev->dev->name[4] - '0'; if (port >= CPC_TTY_NPORTS) { - printk("%s-tty: invalid interface selected (0-%i): %i", + printk("%s-tty: invalid interface selected (0-%i): %li", pc300dev->dev->name, CPC_TTY_NPORTS-1,port); return; @@ -682,7 +683,8 @@ */ static void cpc_tty_rx_work(void * data) { - int port, i, j; + unsigned long port; + int i, j; st_cpc_tty_area *cpc_tty; volatile st_cpc_rx_buf * buf; char flags=0,flg_rx=1; @@ -693,18 +695,15 @@ for (i=0; (i < 4) && flg_rx ; i++) { flg_rx = 0; - port = (int) data; + port = (unsigned long)data; for (j=0; j < CPC_TTY_NPORTS; j++) { cpc_tty = &cpc_tty_area[port]; if ((buf=cpc_tty->buf_rx.first) != 0) { - - if(cpc_tty->tty) - { - ld = tty_ldisc_ref(cpc_tty); - if(ld) - { - if (ld->receive_buf)) { + if(cpc_tty->tty) { + ld = tty_ldisc_ref(cpc_tty->tty); + if(ld) { + if (ld->receive_buf) { CPC_TTY_DBG("%s: call line disc. receive_buf\n",cpc_tty->name); ld->receive_buf(cpc_tty->tty, (char *)(buf->data), &flags, buf->size); } diff -Nru a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c --- a/drivers/pcmcia/cs.c 2004-10-03 19:06:21 -07:00 +++ b/drivers/pcmcia/cs.c 2004-10-03 19:06:21 -07:00 @@ -427,8 +427,6 @@ return ret; } /* send_event */ -#define cs_to_timeout(cs) (((cs) * HZ + 99) / 100) - static void socket_remove_drivers(struct pcmcia_socket *skt) { client_t *client; @@ -448,8 +446,7 @@ socket_remove_drivers(skt); skt->state &= SOCKET_INUSE|SOCKET_PRESENT; - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(cs_to_timeout(shutdown_delay)); + msleep(shutdown_delay * 10); skt->state &= SOCKET_INUSE; shutdown_socket(skt); } @@ -467,8 +464,7 @@ skt->socket.flags &= ~SS_RESET; skt->ops->set_socket(skt, &skt->socket); - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(cs_to_timeout(unreset_delay)); + msleep(unreset_delay * 10); for (i = 0; i < unreset_limit; i++) { skt->ops->get_status(skt, &status); @@ -478,8 +474,7 @@ if (status & SS_READY) return CS_SUCCESS; - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(cs_to_timeout(unreset_check)); + msleep(unreset_check * 10); } cs_err(skt, "time out after reset.\n"); @@ -496,8 +491,7 @@ if (!(status & SS_DETECT)) return CS_NO_CARD; - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(cs_to_timeout(initial_delay)); + msleep(initial_delay * 10); for (i = 0; i < 100; i++) { skt->ops->get_status(skt, &status); @@ -507,8 +501,7 @@ if (!(status & SS_PENDING)) break; - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(cs_to_timeout(10)); + msleep(100); } if (status & SS_PENDING) { @@ -541,8 +534,7 @@ /* * Wait "vcc_settle" for the supply to stabilise. */ - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(cs_to_timeout(vcc_settle)); + msleep(vcc_settle * 10); skt->ops->get_status(skt, &status); if (!(status & SS_POWERON)) { @@ -659,10 +651,8 @@ if (!(skt->state & SOCKET_SUSPEND)) { int status; - if (!(skt->state & SOCKET_PRESENT)) { - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(cs_to_timeout(2)); - } + if (!(skt->state & SOCKET_PRESENT)) + msleep(20); skt->ops->get_status(skt, &status); if ((skt->state & SOCKET_PRESENT) && diff -Nru a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c --- a/drivers/pcmcia/ds.c 2004-10-03 19:06:22 -07:00 +++ b/drivers/pcmcia/ds.c 2004-10-03 19:06:22 -07:00 @@ -50,6 +50,7 @@ #include #include #include +#include #include #include @@ -1080,8 +1081,7 @@ * Ugly. But we want to wait for the socket threads to have started up. * We really should let the drivers themselves drive some of this.. */ - current->state = TASK_INTERRUPTIBLE; - schedule_timeout(HZ/4); + msleep(250); init_waitqueue_head(&s->queue); init_waitqueue_head(&s->request); diff -Nru a/drivers/pcmcia/i82365.c b/drivers/pcmcia/i82365.c --- a/drivers/pcmcia/i82365.c 2004-10-03 19:06:22 -07:00 +++ b/drivers/pcmcia/i82365.c 2004-10-03 19:06:22 -07:00 @@ -513,8 +513,7 @@ if (request_irq(irq, i365_count_irq, 0, "scan", i365_count_irq) != 0) return 1; irq_hits = 0; irq_sock = sock; - __set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ/100); + msleep(10); if (irq_hits) { free_irq(irq, i365_count_irq); debug(2, " spurious hit!\n"); diff -Nru a/drivers/pcmcia/sa1100_h3600.c b/drivers/pcmcia/sa1100_h3600.c --- a/drivers/pcmcia/sa1100_h3600.c 2004-10-03 19:06:22 -07:00 +++ b/drivers/pcmcia/sa1100_h3600.c 2004-10-03 19:06:22 -07:00 @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -96,8 +97,7 @@ set_h3600_egpio(IPAQ_EGPIO_OPT_ON); clr_h3600_egpio(IPAQ_EGPIO_OPT_RESET); - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(10*HZ / 1000); + msleep(10); soc_pcmcia_enable_irqs(skt, irqs, ARRAY_SIZE(irqs)); } diff -Nru a/drivers/s390/char/sclp_tty.c b/drivers/s390/char/sclp_tty.c --- a/drivers/s390/char/sclp_tty.c 2004-10-03 19:06:22 -07:00 +++ b/drivers/s390/char/sclp_tty.c 2004-10-03 19:06:22 -07:00 @@ -277,7 +277,7 @@ wake_up(&sclp_tty_waitq); /* check if the tty needs a wake up call */ if (sclp_tty != NULL) { - tty_wakeup(tty); + tty_wakeup(sclp_tty); } } diff -Nru a/drivers/s390/char/sclp_vt220.c b/drivers/s390/char/sclp_vt220.c --- a/drivers/s390/char/sclp_vt220.c 2004-10-03 19:06:21 -07:00 +++ b/drivers/s390/char/sclp_vt220.c 2004-10-03 19:06:21 -07:00 @@ -139,7 +139,7 @@ wake_up(&sclp_vt220_waitq); /* Check if the tty needs a wake up call */ if (sclp_vt220_tty != NULL) { - tty_wakeup(tty); + tty_wakeup(sclp_vt220_tty); } } diff -Nru a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c --- a/drivers/scsi/gdth.c 2004-10-03 19:06:22 -07:00 +++ b/drivers/scsi/gdth.c 2004-10-03 19:06:22 -07:00 @@ -571,12 +571,12 @@ #define BUS_L2P(a,b) ((b)>(a)->virt_bus ? (b-1):(b)) -#define gdth_readb(addr) readb((ulong)(addr)) -#define gdth_readw(addr) readw((ulong)(addr)) -#define gdth_readl(addr) (ulong32)readl((ulong)(addr)) -#define gdth_writeb(b,addr) writeb((b),(ulong)(addr)) -#define gdth_writew(b,addr) writew((b),(ulong)(addr)) -#define gdth_writel(b,addr) writel((ulong32)(b),(ulong)(addr)) +#define gdth_readb(addr) readb(addr) +#define gdth_readw(addr) readw(addr) +#define gdth_readl(addr) readl(addr) +#define gdth_writeb(b,addr) writeb((b),(addr)) +#define gdth_writew(b,addr) writew((b),(addr)) +#define gdth_writel(b,addr) writel((b),(addr)) static unchar gdth_drq_tab[4] = {5,6,7,7}; /* DRQ table */ static unchar gdth_irq_tab[6] = {0,10,11,12,14,0}; /* IRQ table */ @@ -775,7 +775,7 @@ GDTH_INITFUNC(static int, gdth_search_isa(ulong32 bios_adr)) { - void *addr; + void __iomem *addr; ulong32 id; TRACE(("gdth_search_isa() bios adr. %x\n",bios_adr)); @@ -1050,7 +1050,7 @@ GDTH_INITFUNC(static int, gdth_init_isa(ulong32 bios_adr,gdth_ha_str *ha)) { - register gdt2_dpram_str *dp2_ptr; + register gdt2_dpram_str __iomem *dp2_ptr; int i; unchar irq_drq,prot_ver; ulong32 retries; @@ -1062,10 +1062,10 @@ printk("GDT-ISA: Initialization error (DPMEM remap error)\n"); return 0; } - dp2_ptr = (gdt2_dpram_str *)ha->brd; + dp2_ptr = ha->brd; gdth_writeb(1, &dp2_ptr->io.memlock); /* switch off write protection */ /* reset interface area */ - memset_io((char *)&dp2_ptr->u,0,sizeof(dp2_ptr->u)); + memset_io(&dp2_ptr->u, 0, sizeof(dp2_ptr->u)); if (gdth_readl(&dp2_ptr->u) != 0) { printk("GDT-ISA: Initialization error (DPMEM write error)\n"); iounmap(ha->brd); @@ -1150,9 +1150,9 @@ GDTH_INITFUNC(static int, gdth_init_pci(gdth_pci_str *pcistr,gdth_ha_str *ha)) { - register gdt6_dpram_str *dp6_ptr; - register gdt6c_dpram_str *dp6c_ptr; - register gdt6m_dpram_str *dp6m_ptr; + register gdt6_dpram_str __iomem *dp6_ptr; + register gdt6c_dpram_str __iomem *dp6c_ptr; + register gdt6m_dpram_str __iomem *dp6m_ptr; ulong32 retries; unchar prot_ver; ushort command; @@ -1180,7 +1180,7 @@ return 0; } /* check and reset interface area */ - dp6_ptr = (gdt6_dpram_str *)ha->brd; + dp6_ptr = ha->brd; gdth_writel(DPMEM_MAGIC, &dp6_ptr->u); if (gdth_readl(&dp6_ptr->u) != DPMEM_MAGIC) { printk("GDT-PCI: Cannot access DPMEM at 0x%lx (shadowed?)\n", @@ -1205,7 +1205,7 @@ printk("GDT-PCI: Initialization error (DPMEM remap error)\n"); return 0; } - dp6_ptr = (gdt6_dpram_str *)ha->brd; + dp6_ptr = ha->brd; gdth_writel(DPMEM_MAGIC, &dp6_ptr->u); if (gdth_readl(&dp6_ptr->u) == DPMEM_MAGIC) { printk("GDT-PCI: Use free address at 0x%x\n", i); @@ -1219,7 +1219,7 @@ return 0; } } - memset_io((char *)&dp6_ptr->u,0,sizeof(dp6_ptr->u)); + memset_io(&dp6_ptr->u, 0, sizeof(dp6_ptr->u)); if (gdth_readl(&dp6_ptr->u) != 0) { printk("GDT-PCI: Initialization error (DPMEM write error)\n"); iounmap(ha->brd); @@ -1290,7 +1290,7 @@ return 0; } /* check and reset interface area */ - dp6c_ptr = (gdt6c_dpram_str *)ha->brd; + dp6c_ptr = ha->brd; gdth_writel(DPMEM_MAGIC, &dp6c_ptr->u); if (gdth_readl(&dp6c_ptr->u) != DPMEM_MAGIC) { printk("GDT-PCI: Cannot access DPMEM at 0x%lx (shadowed?)\n", @@ -1315,7 +1315,7 @@ printk("GDT-PCI: Initialization error (DPMEM remap error)\n"); return 0; } - dp6c_ptr = (gdt6c_dpram_str *)ha->brd; + dp6c_ptr = ha->brd; gdth_writel(DPMEM_MAGIC, &dp6c_ptr->u); if (gdth_readl(&dp6c_ptr->u) == DPMEM_MAGIC) { printk("GDT-PCI: Use free address at 0x%x\n", i); @@ -1329,7 +1329,7 @@ return 0; } } - memset_io((char *)&dp6c_ptr->u,0,sizeof(dp6c_ptr->u)); + memset_io(&dp6c_ptr->u, 0, sizeof(dp6c_ptr->u)); if (gdth_readl(&dp6c_ptr->u) != 0) { printk("GDT-PCI: Initialization error (DPMEM write error)\n"); iounmap(ha->brd); @@ -1425,13 +1425,14 @@ pcistr->pdev->rom_address); #endif + dp6m_ptr = ha->brd; + /* Ensure that it is safe to access the non HW portions of DPMEM. * Aditional check needed for Xscale based RAID controllers */ - while( ((int)gdth_readb(&((gdt6m_dpram_str *)ha->brd)->i960r.sema0_reg) ) & 3 ) + while( ((int)gdth_readb(&dp6m_ptr->i960r.sema0_reg) ) & 3 ) gdth_delay(1); /* check and reset interface area */ - dp6m_ptr = (gdt6m_dpram_str *)ha->brd; gdth_writel(DPMEM_MAGIC, &dp6m_ptr->u); if (gdth_readl(&dp6m_ptr->u) != DPMEM_MAGIC) { printk("GDT-PCI: Cannot access DPMEM at 0x%lx (shadowed?)\n", @@ -1456,7 +1457,7 @@ printk("GDT-PCI: Initialization error (DPMEM remap error)\n"); return 0; } - dp6m_ptr = (gdt6m_dpram_str *)ha->brd; + dp6m_ptr = ha->brd; gdth_writel(DPMEM_MAGIC, &dp6m_ptr->u); if (gdth_readl(&dp6m_ptr->u) == DPMEM_MAGIC) { printk("GDT-PCI: Use free address at 0x%x\n", i); @@ -1470,7 +1471,7 @@ return 0; } } - memset_io((char *)&dp6m_ptr->u,0,sizeof(dp6m_ptr->u)); + memset_io(&dp6m_ptr->u, 0, sizeof(dp6m_ptr->u)); /* disable board interrupts, deinit services */ gdth_writeb(gdth_readb(&dp6m_ptr->i960r.edoor_en_reg) | 4, @@ -1553,9 +1554,9 @@ { gdth_ha_str *ha; ulong flags; - gdt2_dpram_str *dp2_ptr; - gdt6_dpram_str *dp6_ptr; - gdt6m_dpram_str *dp6m_ptr; + gdt2_dpram_str __iomem *dp2_ptr; + gdt6_dpram_str __iomem *dp6_ptr; + gdt6m_dpram_str __iomem *dp6m_ptr; TRACE(("gdth_enable_int() hanum %d\n",hanum)); ha = HADATA(gdth_ctr_tab[hanum]); @@ -1566,12 +1567,12 @@ outb(0xff, ha->bmic + EDENABREG); outb(0x01, ha->bmic + EINTENABREG); } else if (ha->type == GDT_ISA) { - dp2_ptr = (gdt2_dpram_str *)ha->brd; + dp2_ptr = ha->brd; gdth_writeb(1, &dp2_ptr->io.irqdel); gdth_writeb(0, &dp2_ptr->u.ic.Cmd_Index); gdth_writeb(1, &dp2_ptr->io.irqen); } else if (ha->type == GDT_PCI) { - dp6_ptr = (gdt6_dpram_str *)ha->brd; + dp6_ptr = ha->brd; gdth_writeb(1, &dp6_ptr->io.irqdel); gdth_writeb(0, &dp6_ptr->u.ic.Cmd_Index); gdth_writeb(1, &dp6_ptr->io.irqen); @@ -1579,7 +1580,7 @@ outb(0xff, PTR2USHORT(&ha->plx->edoor_reg)); outb(0x03, PTR2USHORT(&ha->plx->control1)); } else if (ha->type == GDT_PCIMPR) { - dp6m_ptr = (gdt6m_dpram_str *)ha->brd; + dp6m_ptr = ha->brd; gdth_writeb(0xff, &dp6m_ptr->i960r.edoor_reg); gdth_writeb(gdth_readb(&dp6m_ptr->i960r.edoor_en_reg) & ~4, &dp6m_ptr->i960r.edoor_en_reg); @@ -1605,15 +1606,15 @@ *pIStatus = inb((ushort)ha->bmic + EDOORREG); else if (ha->type == GDT_ISA) *pIStatus = - gdth_readb(&((gdt2_dpram_str *)ha->brd)->u.ic.Cmd_Index); + gdth_readb(&((gdt2_dpram_str __iomem *)ha->brd)->u.ic.Cmd_Index); else if (ha->type == GDT_PCI) *pIStatus = - gdth_readb(&((gdt6_dpram_str *)ha->brd)->u.ic.Cmd_Index); + gdth_readb(&((gdt6_dpram_str __iomem *)ha->brd)->u.ic.Cmd_Index); else if (ha->type == GDT_PCINEW) *pIStatus = inb(PTR2USHORT(&ha->plx->edoor_reg)); else if (ha->type == GDT_PCIMPR) *pIStatus = - gdth_readb(&((gdt6m_dpram_str *)ha->brd)->i960r.edoor_reg); + gdth_readb(&((gdt6m_dpram_str __iomem *)ha->brd)->i960r.edoor_reg); if (*pIStatus) return i; /* board found */ @@ -1633,14 +1634,14 @@ if (ha->type == GDT_EISA) gdtsema0 = (int)inb(ha->bmic + SEMA0REG); else if (ha->type == GDT_ISA) - gdtsema0 = (int)gdth_readb(&((gdt2_dpram_str *)ha->brd)->u.ic.Sema0); + gdtsema0 = (int)gdth_readb(&((gdt2_dpram_str __iomem *)ha->brd)->u.ic.Sema0); else if (ha->type == GDT_PCI) - gdtsema0 = (int)gdth_readb(&((gdt6_dpram_str *)ha->brd)->u.ic.Sema0); + gdtsema0 = (int)gdth_readb(&((gdt6_dpram_str __iomem *)ha->brd)->u.ic.Sema0); else if (ha->type == GDT_PCINEW) gdtsema0 = (int)inb(PTR2USHORT(&ha->plx->sema0_reg)); else if (ha->type == GDT_PCIMPR) gdtsema0 = - (int)gdth_readb(&((gdt6m_dpram_str *)ha->brd)->i960r.sema0_reg); + (int)gdth_readb(&((gdt6m_dpram_str __iomem *)ha->brd)->i960r.sema0_reg); return (gdtsema0 & 1); } @@ -1676,13 +1677,13 @@ if (ha->type == GDT_EISA) { outb(1, ha->bmic + SEMA0REG); } else if (ha->type == GDT_ISA) { - gdth_writeb(1, &((gdt2_dpram_str *)ha->brd)->u.ic.Sema0); + gdth_writeb(1, &((gdt2_dpram_str __iomem *)ha->brd)->u.ic.Sema0); } else if (ha->type == GDT_PCI) { - gdth_writeb(1, &((gdt6_dpram_str *)ha->brd)->u.ic.Sema0); + gdth_writeb(1, &((gdt6_dpram_str __iomem *)ha->brd)->u.ic.Sema0); } else if (ha->type == GDT_PCINEW) { outb(1, PTR2USHORT(&ha->plx->sema0_reg)); } else if (ha->type == GDT_PCIMPR) { - gdth_writeb(1, &((gdt6m_dpram_str *)ha->brd)->i960r.sema0_reg); + gdth_writeb(1, &((gdt6m_dpram_str __iomem *)ha->brd)->i960r.sema0_reg); } } @@ -1691,10 +1692,10 @@ { register gdth_ha_str *ha; register gdth_cmd_str *cmd_ptr; - register gdt6m_dpram_str *dp6m_ptr; - register gdt6c_dpram_str *dp6c_ptr; - gdt6_dpram_str *dp6_ptr; - gdt2_dpram_str *dp2_ptr; + register gdt6m_dpram_str __iomem *dp6m_ptr; + register gdt6c_dpram_str __iomem *dp6c_ptr; + gdt6_dpram_str __iomem *dp6_ptr; + gdt2_dpram_str __iomem *dp2_ptr; ushort cp_count,dp_offset,cmd_no; TRACE(("gdth_copy_command() hanum %d\n",hanum)); @@ -1717,28 +1718,28 @@ /* set offset and service, copy command to DPMEM */ if (ha->type == GDT_ISA) { - dp2_ptr = (gdt2_dpram_str *)ha->brd; + dp2_ptr = ha->brd; gdth_writew(dp_offset + DPMEM_COMMAND_OFFSET, &dp2_ptr->u.ic.comm_queue[cmd_no].offset); gdth_writew((ushort)cmd_ptr->Service, &dp2_ptr->u.ic.comm_queue[cmd_no].serv_id); memcpy_toio(&dp2_ptr->u.ic.gdt_dpr_cmd[dp_offset],cmd_ptr,cp_count); } else if (ha->type == GDT_PCI) { - dp6_ptr = (gdt6_dpram_str *)ha->brd; + dp6_ptr = ha->brd; gdth_writew(dp_offset + DPMEM_COMMAND_OFFSET, &dp6_ptr->u.ic.comm_queue[cmd_no].offset); gdth_writew((ushort)cmd_ptr->Service, &dp6_ptr->u.ic.comm_queue[cmd_no].serv_id); memcpy_toio(&dp6_ptr->u.ic.gdt_dpr_cmd[dp_offset],cmd_ptr,cp_count); } else if (ha->type == GDT_PCINEW) { - dp6c_ptr = (gdt6c_dpram_str *)ha->brd; + dp6c_ptr = ha->brd; gdth_writew(dp_offset + DPMEM_COMMAND_OFFSET, &dp6c_ptr->u.ic.comm_queue[cmd_no].offset); gdth_writew((ushort)cmd_ptr->Service, &dp6c_ptr->u.ic.comm_queue[cmd_no].serv_id); memcpy_toio(&dp6c_ptr->u.ic.gdt_dpr_cmd[dp_offset],cmd_ptr,cp_count); } else if (ha->type == GDT_PCIMPR) { - dp6m_ptr = (gdt6m_dpram_str *)ha->brd; + dp6m_ptr = ha->brd; gdth_writew(dp_offset + DPMEM_COMMAND_OFFSET, &dp6m_ptr->u.ic.comm_queue[cmd_no].offset); gdth_writew((ushort)cmd_ptr->Service, @@ -1777,13 +1778,13 @@ outl(ha->ccb_phys, ha->bmic + MAILBOXREG); outb(ha->pccb->Service, ha->bmic + LDOORREG); } else if (ha->type == GDT_ISA) { - gdth_writeb(0, &((gdt2_dpram_str *)ha->brd)->io.event); + gdth_writeb(0, &((gdt2_dpram_str __iomem *)ha->brd)->io.event); } else if (ha->type == GDT_PCI) { - gdth_writeb(0, &((gdt6_dpram_str *)ha->brd)->io.event); + gdth_writeb(0, &((gdt6_dpram_str __iomem *)ha->brd)->io.event); } else if (ha->type == GDT_PCINEW) { outb(1, PTR2USHORT(&ha->plx->ldoor_reg)); } else if (ha->type == GDT_PCIMPR) { - gdth_writeb(1, &((gdt6m_dpram_str *)ha->brd)->i960r.ldoor_reg); + gdth_writeb(1, &((gdt6m_dpram_str __iomem *)ha->brd)->i960r.ldoor_reg); } } @@ -3416,7 +3417,7 @@ /* no GDTH_LOCK_HA() ! */ TRACE2(("gdth_store_event() source %d idx %d\n", source, idx)); if (source == 0) /* no source -> no event */ - return 0; + return NULL; if (ebuffer[elastidx].event_source == source && ebuffer[elastidx].event_idx == idx && @@ -3535,9 +3536,9 @@ #endif { register gdth_ha_str *ha; - gdt6m_dpram_str *dp6m_ptr = NULL; - gdt6_dpram_str *dp6_ptr; - gdt2_dpram_str *dp2_ptr; + gdt6m_dpram_str __iomem *dp6m_ptr = NULL; + gdt6_dpram_str __iomem *dp6_ptr; + gdt2_dpram_str __iomem *dp2_ptr; Scsi_Cmnd *scp; int hanum, rval, i; unchar IStatus; @@ -3616,7 +3617,7 @@ outb(0xff, ha->bmic + EDOORREG); /* acknowledge interrupt */ outb(0x00, ha->bmic + SEMA1REG); /* reset status semaphore */ } else if (ha->type == GDT_ISA) { - dp2_ptr = (gdt2_dpram_str *)ha->brd; + dp2_ptr = ha->brd; if (IStatus & 0x80) { /* error flag */ IStatus &= ~0x80; ha->status = gdth_readw(&dp2_ptr->u.ic.Status); @@ -3631,7 +3632,7 @@ gdth_writeb(0, &dp2_ptr->u.ic.Cmd_Index);/* reset command index */ gdth_writeb(0, &dp2_ptr->io.Sema1); /* reset status semaphore */ } else if (ha->type == GDT_PCI) { - dp6_ptr = (gdt6_dpram_str *)ha->brd; + dp6_ptr = ha->brd; if (IStatus & 0x80) { /* error flag */ IStatus &= ~0x80; ha->status = gdth_readw(&dp6_ptr->u.ic.Status); @@ -3659,7 +3660,7 @@ outb(0xff, PTR2USHORT(&ha->plx->edoor_reg)); outb(0x00, PTR2USHORT(&ha->plx->sema1_reg)); } else if (ha->type == GDT_PCIMPR) { - dp6m_ptr = (gdt6m_dpram_str *)ha->brd; + dp6m_ptr = ha->brd; if (IStatus & 0x80) { /* error flag */ IStatus &= ~0x80; #ifdef INT_COAL @@ -3689,10 +3690,10 @@ if (ha->service != SCREENSERVICE && (ha->fw_vers & 0xff) >= 0x1a) { ha->dvr.severity = gdth_readb - (&((gdt6m_dpram_str *)ha->brd)->i960r.severity); + (&((gdt6m_dpram_str __iomem *)ha->brd)->i960r.severity); for (i = 0; i < 256; ++i) { ha->dvr.event_string[i] = gdth_readb - (&((gdt6m_dpram_str *)ha->brd)->i960r.evt_str[i]); + (&((gdt6m_dpram_str __iomem *)ha->brd)->i960r.evt_str[i]); if (ha->dvr.event_string[i] == 0) break; } diff -Nru a/drivers/scsi/gdth.h b/drivers/scsi/gdth.h --- a/drivers/scsi/gdth.h 2004-10-03 19:06:21 -07:00 +++ b/drivers/scsi/gdth.h 2004-10-03 19:06:21 -07:00 @@ -868,7 +868,7 @@ ushort raw_feat; /* feat. raw service (s/g,..)*/ ushort screen_feat; /* feat. raw service (s/g,..)*/ ushort bmic; /* BMIC address (EISA) */ - void *brd; /* DPRAM address */ + void __iomem *brd; /* DPRAM address */ ulong32 brd_phys; /* slot number/BIOS address */ gdt6c_plx_regs *plx; /* PLX regs (new PCI contr.) */ gdth_cmd_str *pccb; /* address command structure */ diff -Nru a/drivers/serial/bast_sio.c b/drivers/serial/bast_sio.c --- a/drivers/serial/bast_sio.c 2004-10-03 19:06:21 -07:00 +++ b/drivers/serial/bast_sio.c 2004-10-03 19:06:21 -07:00 @@ -1,3 +1,19 @@ +/* linux/drivers/serial/bast_sio.c + * + * Copyright (c) 2004 Simtec Electronics + * Ben Dooks + * + * http://www.simtec.co.uk/products/EB2410ITX/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Modifications: + * 23-Sep-2004 BJD Added copyright header + * 23-Sep-2004 BJD Added serial port remove code +*/ + #include #include #include @@ -20,10 +36,6 @@ { struct serial_struct serial_req; -#if 0 - printk("BAST: SuperIO serial (%08lx,%d)\n", port, irq); -#endif - serial_req.flags = UPF_AUTOPROBE | UPF_SHARE_IRQ; serial_req.baud_base = BASE_BAUD; serial_req.irq = irq; @@ -37,11 +49,13 @@ #define SERIAL_BASE (S3C2410_CS2 + BAST_PA_SUPERIO) +static int port[2] = { -1, -1 }; + static int __init serial_bast_init(void) { if (machine_is_bast()) { - serial_bast_register(SERIAL_BASE + 0x2f8, IRQ_PCSERIAL1); - serial_bast_register(SERIAL_BASE + 0x3f8, IRQ_PCSERIAL2); + port[0] = serial_bast_register(SERIAL_BASE + 0x2f8, IRQ_PCSERIAL1); + port[1] = serial_bast_register(SERIAL_BASE + 0x3f8, IRQ_PCSERIAL2); } return 0; @@ -49,7 +63,10 @@ static void __exit serial_bast_exit(void) { - /* todo -> remove both our ports */ + if (port[0] != -1) + unregister_serial(port[0]); + if (port[1] != -1) + unregister_serial(port[1]); } diff -Nru a/drivers/usb/class/bluetty.c b/drivers/usb/class/bluetty.c --- a/drivers/usb/class/bluetty.c 2004-10-03 19:06:22 -07:00 +++ b/drivers/usb/class/bluetty.c 2004-10-03 19:06:22 -07:00 @@ -988,14 +988,13 @@ static void bluetooth_softint(void *private) { struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)private, __FUNCTION__); - struct tty_struct *tty; dbg("%s", __FUNCTION__); if (!bluetooth) return; - tty_wakeup(&bluetooth->tty); + tty_wakeup(bluetooth->tty); } diff -Nru a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c --- a/drivers/usb/core/hcd.c 2004-10-03 19:06:21 -07:00 +++ b/drivers/usb/core/hcd.c 2004-10-03 19:06:21 -07:00 @@ -708,6 +708,7 @@ bus->busnum = busnum; } else { printk (KERN_ERR "%s: too many buses\n", usbcore_name); + up(&usb_bus_list_lock); return -E2BIG; } diff -Nru a/drivers/usb/serial/empeg.c b/drivers/usb/serial/empeg.c --- a/drivers/usb/serial/empeg.c 2004-10-03 19:06:22 -07:00 +++ b/drivers/usb/serial/empeg.c 2004-10-03 19:06:22 -07:00 @@ -516,13 +516,7 @@ */ port->tty->low_latency = 1; - /* Notify the tty driver that the termios have changed. - FIXME: Why - the ldisc will do this anyway and NULL is not - a valid previous state */ - port->tty->ldisc.set_termios(port->tty, NULL); - return; - } diff -Nru a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c --- a/drivers/video/amba-clcd.c 2004-10-03 19:06:22 -07:00 +++ b/drivers/video/amba-clcd.c 2004-10-03 19:06:22 -07:00 @@ -207,7 +207,7 @@ clcdfb_set_start(fb); - clk_set_rate(fb->clk, 1000000000 / regs.pixclock); + clk_set_rate(fb->clk, (1000000000 / regs.pixclock) * 1000); fb->clcd_cntl = regs.cntl; diff -Nru a/drivers/video/radeonfb.c b/drivers/video/radeonfb.c --- a/drivers/video/radeonfb.c 2004-10-03 19:06:22 -07:00 +++ b/drivers/video/radeonfb.c 2004-10-03 19:06:22 -07:00 @@ -360,13 +360,13 @@ unsigned long mmio_base_phys; unsigned long fb_base_phys; - unsigned long mmio_base; - unsigned long fb_base; + void __iomem *mmio_base; + void __iomem *fb_base; struct pci_dev *pdev; unsigned char *EDID; - unsigned char *bios_seg; + unsigned char __iomem *bios_seg; u32 pseudo_palette[17]; struct { u8 red, green, blue, pad; } palette[256]; @@ -702,8 +702,8 @@ static int __devinit radeon_set_fbinfo (struct radeonfb_info *rinfo); static int __devinit radeon_init_disp (struct radeonfb_info *rinfo); static int radeon_init_disp_var (struct radeonfb_info *rinfo, struct fb_var_screeninfo *var); -static char *radeon_find_rom(struct radeonfb_info *rinfo); -static void radeon_get_pllinfo(struct radeonfb_info *rinfo, char *bios_seg); +static void __iomem *radeon_find_rom(struct radeonfb_info *rinfo); +static void radeon_get_pllinfo(struct radeonfb_info *rinfo, void __iomem *bios_seg); static void radeon_get_moninfo (struct radeonfb_info *rinfo); static int radeon_get_dfpinfo (struct radeonfb_info *rinfo); static int radeon_get_dfpinfo_BIOS(struct radeonfb_info *rinfo); @@ -735,12 +735,12 @@ #endif /* CONFIG_PPC_OF */ -static char *radeon_find_rom(struct radeonfb_info *rinfo) +static void __iomem *radeon_find_rom(struct radeonfb_info *rinfo) { #if defined(__i386__) u32 segstart; - char *rom_base; - char *rom; + char __iomem *rom_base; + char __iomem *rom; int stage; int i,j; char aty_rom_sig[] = "761295520"; @@ -753,7 +753,7 @@ stage = 1; - rom_base = (char *)ioremap(segstart, 0x1000); + rom_base = ioremap(segstart, 0x1000); if ((*rom_base == 0x55) && (((*(rom_base + 1)) & 0xff) == 0xaa)) stage = 2; @@ -804,10 +804,10 @@ -static void radeon_get_pllinfo(struct radeonfb_info *rinfo, char *bios_seg) +static void radeon_get_pllinfo(struct radeonfb_info *rinfo, void __iomem *bios_seg) { - void *bios_header; - void *header_ptr; + void __iomem *bios_header; + void __iomem *header_ptr; u16 bios_header_offset, pll_info_offset; PLL_BLOCK pll; @@ -1077,7 +1077,7 @@ static int radeon_get_dfpinfo_BIOS(struct radeonfb_info *rinfo) { - char *fpbiosstart, *tmp, *tmp0; + char __iomem *fpbiosstart, *tmp, *tmp0; char stmp[30]; int i; @@ -2252,7 +2252,7 @@ info->pseudo_palette = rinfo->pseudo_palette; info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN; info->fbops = &radeonfb_ops; - info->screen_base = (char *)rinfo->fb_base; + info->screen_base = rinfo->fb_base; /* Fill fix common fields */ strlcpy(info->fix.id, rinfo->name, sizeof(info->fix.id)); @@ -2851,7 +2851,7 @@ } /* map the regions */ - rinfo->mmio_base = (unsigned long) ioremap (rinfo->mmio_base_phys, RADEON_REGSIZE); + rinfo->mmio_base = ioremap (rinfo->mmio_base_phys, RADEON_REGSIZE); if (!rinfo->mmio_base) { printk ("radeonfb: cannot map MMIO\n"); release_mem_region (rinfo->mmio_base_phys, @@ -2978,7 +2978,7 @@ if ((rinfo->dviDisp_type == MT_DFP) || (rinfo->dviDisp_type == MT_LCD) || (rinfo->crtDisp_type == MT_DFP)) { if (!radeon_get_dfpinfo(rinfo)) { - iounmap ((void*)rinfo->mmio_base); + iounmap(rinfo->mmio_base); release_mem_region (rinfo->mmio_base_phys, pci_resource_len(pdev, 2)); release_mem_region (rinfo->fb_base_phys, @@ -2988,10 +2988,10 @@ } } - rinfo->fb_base = (unsigned long) ioremap (rinfo->fb_base_phys, rinfo->video_ram); + rinfo->fb_base = ioremap (rinfo->fb_base_phys, rinfo->video_ram); if (!rinfo->fb_base) { printk ("radeonfb: cannot map FB\n"); - iounmap ((void*)rinfo->mmio_base); + iounmap(rinfo->mmio_base); release_mem_region (rinfo->mmio_base_phys, pci_resource_len(pdev, 2)); release_mem_region (rinfo->fb_base_phys, @@ -3043,8 +3043,8 @@ if (register_framebuffer ((struct fb_info *) rinfo) < 0) { printk ("radeonfb: could not register framebuffer\n"); - iounmap ((void*)rinfo->fb_base); - iounmap ((void*)rinfo->mmio_base); + iounmap(rinfo->fb_base); + iounmap(rinfo->mmio_base); release_mem_region (rinfo->mmio_base_phys, pci_resource_len(pdev, 2)); release_mem_region (rinfo->fb_base_phys, @@ -3113,8 +3113,8 @@ unregister_framebuffer ((struct fb_info *) rinfo); - iounmap ((void*)rinfo->mmio_base); - iounmap ((void*)rinfo->fb_base); + iounmap(rinfo->mmio_base); + iounmap(rinfo->fb_base); release_mem_region (rinfo->mmio_base_phys, pci_resource_len(pdev, 2)); diff -Nru a/drivers/video/sis/sis.h b/drivers/video/sis/sis.h --- a/drivers/video/sis/sis.h 2004-10-03 19:06:22 -07:00 +++ b/drivers/video/sis/sis.h 2004-10-03 19:06:22 -07:00 @@ -360,10 +360,10 @@ unsigned long mmio_base; unsigned long vga_base; - unsigned long video_vbase; - unsigned long mmio_vbase; - char * bios_vbase; - char * bios_abase; + void __iomem * video_vbase; + void __iomem * mmio_vbase; + void __iomem * bios_vbase; + void * bios_abase; int mtrr; @@ -392,8 +392,8 @@ #endif u32 heapstart; /* offset */ - unsigned long sisfb_heap_start; /* address */ - unsigned long sisfb_heap_end; /* address */ + void __iomem * sisfb_heap_start; /* address */ + void __iomem * sisfb_heap_end; /* address */ u32 sisfb_heap_size; int havenoheap; #if 0 @@ -469,7 +469,7 @@ u8 detectedpdca; u8 detectedlcda; - unsigned long hwcursor_vbase; + void __iomem * hwcursor_vbase; int chronteltype; int tvxpos, tvypos; diff -Nru a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c --- a/drivers/video/sis/sis_main.c 2004-10-03 19:06:22 -07:00 +++ b/drivers/video/sis/sis_main.c 2004-10-03 19:06:22 -07:00 @@ -3952,19 +3952,19 @@ } #endif -static char * __devinit sis_find_rom(struct pci_dev *pdev) +static void __iomem * __devinit sis_find_rom(struct pci_dev *pdev) { struct sis_video_info *ivideo = pci_get_drvdata(pdev); #if defined(__i386__) || defined(__x86_64__) u32 segstart; - unsigned char *rom_base, *rom; + void __iomem *rom_base, *rom; int romptr; unsigned short pciid; for(segstart=0x000c0000; segstart<0x000f0000; segstart+=0x00001000) { - rom_base = (unsigned char *)ioremap(segstart, 0x10000); + rom_base = ioremap(segstart, 0x10000); if(!rom_base) continue; if((readb(rom_base) != 0x55) || (readb(rom_base + 1) != 0xaa)) { @@ -3998,7 +3998,7 @@ iounmap(rom_base); } #else - unsigned char *rom_base, *rom, *myrombase = NULL; + void __iomem *rom_base, *rom, *myrombase = NULL; int romptr; unsigned short pciid; u32 backup; @@ -4037,7 +4037,7 @@ #ifdef CONFIG_FB_SIS_300 static int __devinit -sisfb_chkbuswidth300(struct pci_dev *pdev, ULONG FBAddress) +sisfb_chkbuswidth300(struct pci_dev *pdev, void __iomem *FBAddress) { struct sis_video_info *ivideo = pci_get_drvdata(pdev); int i, j; @@ -4080,7 +4080,7 @@ sisfb_setramsize300(struct pci_dev *pdev) { struct sis_video_info *ivideo = pci_get_drvdata(pdev); - ULONG FBAddr = (ULONG)ivideo->sishw_ext.pjVideoMemoryAddress, Addr; + void __iomem *FBAddr = ivideo->sishw_ext.pjVideoMemoryAddress, *Addr; USHORT SR13, SR14=0, buswidth, Done, data, TotalCapacity, PhysicalAdrOtherPage=0; int PseudoRankCapacity, PseudoTotalCapacity, PseudoAdrPinCount; int RankCapacity, AdrPinCount, BankNumHigh, BankNumMid, MB2Bank; @@ -4959,7 +4959,7 @@ ivideo->modeprechange = 0x03; #if defined(__i386__) || defined(__x86_64__) { - unsigned char *tt = ioremap(0, 0x1000); + unsigned char __iomem *tt = ioremap(0, 0x1000); if(tt) { ivideo->modeprechange = tt[0x449]; iounmap(tt); @@ -4993,7 +4993,8 @@ } #endif - ivideo->bios_vbase = ivideo->bios_abase = NULL; + ivideo->bios_abase = NULL; + ivideo->bios_vbase = NULL; if(ivideo->sisfb_userom) { ivideo->sishw_ext.pjVirtualRomBase = sis_find_rom(pdev); #if defined(__i386__) || defined(__x86_64__) @@ -5147,8 +5148,8 @@ return -ENODEV; } - ivideo->video_vbase = (unsigned long)ioremap(ivideo->video_base, ivideo->video_size); - ivideo->sishw_ext.pjVideoMemoryAddress = (unsigned char *)ivideo->video_vbase; + ivideo->video_vbase = ioremap(ivideo->video_base, ivideo->video_size); + ivideo->sishw_ext.pjVideoMemoryAddress = ivideo->video_vbase; if(!ivideo->video_vbase) { printk(KERN_ERR "sisfb: Fatal error: Unable to map frame buffer memory\n"); release_mem_region(ivideo->video_base, ivideo->video_size); @@ -5160,10 +5161,10 @@ return -ENODEV; } - ivideo->mmio_vbase = (unsigned long)ioremap(ivideo->mmio_base, ivideo->mmio_size); + ivideo->mmio_vbase = ioremap(ivideo->mmio_base, ivideo->mmio_size); if(!ivideo->mmio_vbase) { printk(KERN_ERR "sisfb: Fatal error: Unable to map MMIO region\n"); - iounmap((void *)ivideo->video_vbase); + iounmap(ivideo->video_vbase); release_mem_region(ivideo->video_base, ivideo->video_size); release_mem_region(ivideo->mmio_base, ivideo->mmio_size); if(ivideo->bios_abase) vfree(ivideo->bios_abase); @@ -5173,10 +5174,10 @@ return -ENODEV; } - printk(KERN_INFO "sisfb: Framebuffer at 0x%lx, mapped to 0x%lx, size %ldk\n", + printk(KERN_INFO "sisfb: Framebuffer at 0x%lx, mapped to 0x%p, size %ldk\n", ivideo->video_base, ivideo->video_vbase, ivideo->video_size / 1024); - printk(KERN_INFO "sisfb: MMIO at 0x%lx, mapped to 0x%lx, size %ldk\n", + printk(KERN_INFO "sisfb: MMIO at 0x%lx, mapped to 0x%p, size %ldk\n", ivideo->mmio_base, ivideo->mmio_vbase, ivideo->mmio_size / 1024); if((ivideo->havenoheap = sisfb_heap_init(ivideo))) { @@ -5450,8 +5451,8 @@ if(SiSSetMode(&ivideo->SiS_Pr, &ivideo->sishw_ext, ivideo->mode_no) == 0) { printk(KERN_ERR "sisfb: Fatal error: Setting mode[0x%x] failed\n", ivideo->mode_no); - iounmap((void *)ivideo->video_vbase); - iounmap((void *)ivideo->mmio_vbase); + iounmap(ivideo->video_vbase); + iounmap(ivideo->mmio_vbase); release_mem_region(ivideo->video_base, ivideo->video_size); release_mem_region(ivideo->mmio_base, ivideo->mmio_size); if(ivideo->bios_abase) vfree(ivideo->bios_abase); @@ -5549,7 +5550,7 @@ #endif sis_fb_info->var = ivideo->default_var; sis_fb_info->fix = ivideo->sisfb_fix; - sis_fb_info->screen_base = (char *)ivideo->video_vbase; + sis_fb_info->screen_base = ivideo->video_vbase; sis_fb_info->fbops = &sisfb_ops; sisfb_get_fix(&sis_fb_info->fix, -1, sis_fb_info); @@ -5574,8 +5575,8 @@ if(register_framebuffer(sis_fb_info) < 0) { printk(KERN_ERR "sisfb: Fatal error: Failed to register framebuffer\n"); - iounmap((void *)ivideo->video_vbase); - iounmap((void *)ivideo->mmio_vbase); + iounmap(ivideo->video_vbase); + iounmap(ivideo->mmio_vbase); release_mem_region(ivideo->video_base, ivideo->video_size); release_mem_region(ivideo->mmio_base, ivideo->mmio_size); if(ivideo->bios_abase) vfree(ivideo->bios_abase); @@ -5669,8 +5670,8 @@ #endif /* Unmap */ - iounmap((void *)ivideo->video_vbase); - iounmap((void *)ivideo->mmio_vbase); + iounmap(ivideo->video_vbase); + iounmap(ivideo->mmio_vbase); if(ivideo->bios_vbase) iounmap(ivideo->bios_vbase); if(ivideo->bios_abase) vfree(ivideo->bios_abase); diff -Nru a/drivers/video/sis/sis_main.h b/drivers/video/sis/sis_main.h --- a/drivers/video/sis/sis_main.h 2004-10-03 19:06:21 -07:00 +++ b/drivers/video/sis/sis_main.h 2004-10-03 19:06:21 -07:00 @@ -880,7 +880,7 @@ struct fb_info *info); static void sisfb_pre_setmode(struct sis_video_info *ivideo); static void sisfb_post_setmode(struct sis_video_info *ivideo); -static char * sis_find_rom(struct pci_dev *pdev); +static void __iomem *sis_find_rom(struct pci_dev *pdev); static BOOLEAN sisfb_CheckVBRetrace(struct sis_video_info *ivideo); static BOOLEAN sisfbcheckvretracecrt2(struct sis_video_info *ivideo); static BOOLEAN sisfbcheckvretracecrt1(struct sis_video_info *ivideo); diff -Nru a/drivers/video/tridentfb.c b/drivers/video/tridentfb.c --- a/drivers/video/tridentfb.c 2004-10-03 19:06:21 -07:00 +++ b/drivers/video/tridentfb.c 2004-10-03 19:06:21 -07:00 @@ -28,7 +28,7 @@ struct tridentfb_par { int vclk; //in MHz - unsigned long io_virt; //iospace virtual memory address + void __iomem * io_virt; //iospace virtual memory address }; unsigned char eng_oper; //engine operation... @@ -1107,7 +1107,7 @@ return -1; } - default_par.io_virt = (unsigned long)ioremap_nocache(tridentfb_fix.mmio_start, tridentfb_fix.mmio_len); + default_par.io_virt = ioremap_nocache(tridentfb_fix.mmio_start, tridentfb_fix.mmio_len); if (!default_par.io_virt) { release_region(tridentfb_fix.mmio_start, tridentfb_fix.mmio_len); @@ -1178,8 +1178,8 @@ { struct tridentfb_par *par = (struct tridentfb_par*)fb_info.par; unregister_framebuffer(&fb_info); - iounmap((void *)par->io_virt); - iounmap((void*)fb_info.screen_base); + iounmap(par->io_virt); + iounmap(fb_info.screen_base); release_mem_region(tridentfb_fix.smem_start, tridentfb_fix.smem_len); release_region(tridentfb_fix.mmio_start, tridentfb_fix.mmio_len); } diff -Nru a/fs/eventpoll.c b/fs/eventpoll.c --- a/fs/eventpoll.c 2004-10-03 19:06:21 -07:00 +++ b/fs/eventpoll.c 2004-10-03 19:06:21 -07:00 @@ -148,6 +148,9 @@ /* Get the "struct epitem" from an epoll queue wrapper */ #define EP_ITEM_FROM_EPQUEUE(p) (container_of(p, struct ep_pqueue, pt)->epi) +/* Tells if the epoll_ctl(2) operation needs an event copy from userspace */ +#define EP_OP_HASH_EVENT(op) ((op) != EPOLL_CTL_DEL) + struct epoll_filefd { struct file *file; @@ -531,7 +534,8 @@ current, epfd, op, fd, event)); error = -EFAULT; - if (copy_from_user(&epds, event, sizeof(struct epoll_event))) + if (EP_OP_HASH_EVENT(op) && + copy_from_user(&epds, event, sizeof(struct epoll_event))) goto eexit_1; /* Get the "struct file *" for the eventpoll file */ diff -Nru a/fs/jffs2/super.c b/fs/jffs2/super.c --- a/fs/jffs2/super.c 2004-10-03 19:06:21 -07:00 +++ b/fs/jffs2/super.c 2004-10-03 19:06:21 -07:00 @@ -7,7 +7,7 @@ * * For licensing information, see the file 'LICENCE' in this directory. * - * $Id: super.c,v 1.97 2004/07/16 15:17:57 dwmw2 Exp $ + * $Id: super.c,v 1.99 2004/08/24 07:59:57 dwmw2 Exp $ * */ @@ -130,7 +130,7 @@ mtd->index, mtd->name)); sb->s_op = &jffs2_super_operations; - sb->s_flags |= MS_NOATIME; + sb->s_flags = flags | MS_NOATIME; ret = jffs2_do_fill_super(sb, data, (flags&MS_VERBOSE)?1:0); @@ -330,6 +330,7 @@ out_compressors: jffs2_compressors_exit(); out: + kmem_cache_destroy(jffs2_inode_cachep); return ret; } diff -Nru a/fs/locks.c b/fs/locks.c --- a/fs/locks.c 2004-10-03 19:06:22 -07:00 +++ b/fs/locks.c 2004-10-03 19:06:22 -07:00 @@ -1766,7 +1766,12 @@ while ((fl = *before) != NULL) { if (fl->fl_file == filp) { - if (IS_FLOCK(fl)) { + /* + * We might have a POSIX lock that was created at the same time + * the filp was closed for the last time. Just remove that too, + * regardless of ownership, since nobody can own it. + */ + if (IS_FLOCK(fl) || IS_POSIX(fl)) { locks_delete_lock(before); continue; } @@ -1774,9 +1779,7 @@ lease_modify(before, F_UNLCK); continue; } - /* FL_POSIX locks of this process have already been - * removed in filp_close->locks_remove_posix. - */ + /* What? */ BUG(); } before = &fl->fl_next; diff -Nru a/fs/namei.c b/fs/namei.c --- a/fs/namei.c 2004-10-03 19:06:21 -07:00 +++ b/fs/namei.c 2004-10-03 19:06:21 -07:00 @@ -1825,13 +1825,12 @@ dput(dentry); } up(&nd.dentry->d_inode->i_sem); + if (inode) + iput(inode); /* truncate the inode here */ exit1: path_release(&nd); exit: putname(name); - - if (inode) - iput(inode); /* truncate the inode here */ return error; slashes: diff -Nru a/fs/ntfs/ChangeLog b/fs/ntfs/ChangeLog --- a/fs/ntfs/ChangeLog 2004-10-03 19:06:21 -07:00 +++ b/fs/ntfs/ChangeLog 2004-10-03 19:06:21 -07:00 @@ -21,6 +21,17 @@ - Enable the code for setting the NT4 compatibility flag when we start making NTFS 1.2 specific modifications. +2.1.20 - Fix a stupid bug in ntfs_attr_reinit_search_ctx(). + + - Fix stupid bug in fs/ntfs/attrib.c::ntfs_attr_reinit_search_ctx() + where we did not clear ctx->al_entry but it was still set due to + changes in ntfs_attr_lookup() and ntfs_external_attr_find() in + particular. + - Fix another stupid bug in fs/ntfs/attrib.c::ntfs_external_attr_find() + where we forgot to unmap the extent mft record when we had finished + enumerating an attribute which caused a bug check to trigger when the + VFS calls ->clear_inode. + 2.1.19 - Many cleanups, improvements, and a minor bug fix. - Update ->setattr (fs/ntfs/inode.c::ntfs_setattr()) to refuse to diff -Nru a/fs/ntfs/Makefile b/fs/ntfs/Makefile --- a/fs/ntfs/Makefile 2004-10-03 19:06:21 -07:00 +++ b/fs/ntfs/Makefile 2004-10-03 19:06:21 -07:00 @@ -6,7 +6,7 @@ index.o inode.o mft.o mst.o namei.o super.o sysctl.o unistr.o \ upcase.o -EXTRA_CFLAGS = -DNTFS_VERSION=\"2.1.19\" +EXTRA_CFLAGS = -DNTFS_VERSION=\"2.1.20\" ifeq ($(CONFIG_NTFS_DEBUG),y) EXTRA_CFLAGS += -DDEBUG diff -Nru a/fs/ntfs/attrib.c b/fs/ntfs/attrib.c --- a/fs/ntfs/attrib.c 2004-10-03 19:06:22 -07:00 +++ b/fs/ntfs/attrib.c 2004-10-03 19:06:22 -07:00 @@ -1738,11 +1738,13 @@ * correctly yet as we do not know what @ctx->attr will be set to by * the call to ntfs_attr_find() below. */ + if (ni != base_ni) + unmap_extent_mft_record(ni); ctx->mrec = ctx->base_mrec; ctx->attr = (ATTR_RECORD*)((u8*)ctx->mrec + le16_to_cpu(ctx->mrec->attrs_offset)); ctx->is_first = TRUE; - ctx->ntfs_ino = ctx->base_ntfs_ino; + ctx->ntfs_ino = base_ni; ctx->base_ntfs_ino = NULL; ctx->base_mrec = NULL; ctx->base_attr = NULL; @@ -1861,6 +1863,11 @@ /* Sanity checks are performed elsewhere. */ ctx->attr = (ATTR_RECORD*)((u8*)ctx->mrec + le16_to_cpu(ctx->mrec->attrs_offset)); + /* + * This needs resetting due to ntfs_external_attr_find() which + * can leave it set despite having zeroed ctx->base_ntfs_ino. + */ + ctx->al_entry = NULL; return; } /* Attribute list. */ if (ctx->ntfs_ino != ctx->base_ntfs_ino) diff -Nru a/fs/xfs/Makefile b/fs/xfs/Makefile --- a/fs/xfs/Makefile 2004-10-03 19:06:22 -07:00 +++ b/fs/xfs/Makefile 2004-10-03 19:06:22 -07:00 @@ -67,8 +67,6 @@ xfs-$(CONFIG_XFS_RT) += xfs_rtalloc.o xfs-$(CONFIG_XFS_POSIX_ACL) += xfs_acl.o -xfs-$(CONFIG_XFS_POSIX_CAP) += xfs_cap.o -xfs-$(CONFIG_XFS_POSIX_MAC) += xfs_mac.o xfs-$(CONFIG_PROC_FS) += linux-2.6/xfs_stats.o xfs-$(CONFIG_SYSCTL) += linux-2.6/xfs_sysctl.o xfs-$(CONFIG_COMPAT) += linux-2.6/xfs_ioctl32.o diff -Nru a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c --- a/fs/xfs/linux-2.6/xfs_aops.c 2004-10-03 19:06:22 -07:00 +++ b/fs/xfs/linux-2.6/xfs_aops.c 2004-10-03 19:06:22 -07:00 @@ -552,18 +552,21 @@ struct page *page, struct writeback_control *wbc, struct buffer_head *bh_arr[], - int cnt) + int bh_count, + int probed_page, + int clear_dirty) { struct buffer_head *bh; int i; BUG_ON(PageWriteback(page)); set_page_writeback(page); - clear_page_dirty(page); + if (clear_dirty) + clear_page_dirty(page); unlock_page(page); - if (cnt) { - for (i = 0; i < cnt; i++) { + if (bh_count) { + for (i = 0; i < bh_count; i++) { bh = bh_arr[i]; mark_buffer_async_write(bh); if (buffer_unwritten(bh)) @@ -572,8 +575,11 @@ clear_buffer_dirty(bh); } - for (i = 0; i < cnt; i++) + for (i = 0; i < bh_count; i++) submit_bh(WRITE, bh_arr[i]); + + if (probed_page && clear_dirty) + wbc->nr_to_write--; /* Wrote an "extra" page */ } else { end_page_writeback(page); wbc->pages_skipped++; /* We didn't write this page */ @@ -612,11 +618,13 @@ bh = head = page_buffers(page); do { offset = i << bbits; + if (offset >= end) + break; if (!(PageUptodate(page) || buffer_uptodate(bh))) continue; if (buffer_mapped(bh) && all_bh && - !buffer_unwritten(bh) && !buffer_delay(bh)) { - if (startio && (offset < end)) { + !(buffer_unwritten(bh) || buffer_delay(bh))) { + if (startio) { lock_buffer(bh); bh_arr[index++] = bh; } @@ -644,7 +652,7 @@ ASSERT(private); } } - if (startio && (offset < end)) { + if (startio) { bh_arr[index++] = bh; } else { set_buffer_dirty(bh); @@ -654,8 +662,7 @@ } while (i++, (bh = bh->b_this_page) != head); if (startio) { - wbc->nr_to_write--; - xfs_submit_page(page, wbc, bh_arr, index); + xfs_submit_page(page, wbc, bh_arr, index, 1, index == i); } else { unlock_page(page); } @@ -867,7 +874,7 @@ SetPageUptodate(page); if (startio) - xfs_submit_page(page, wbc, bh_arr, cnt); + xfs_submit_page(page, wbc, bh_arr, cnt, 0, 1); if (iomp) { tlast = (iomp->iomap_offset + iomp->iomap_bsize - 1) >> @@ -1174,7 +1181,7 @@ return 0; out_fail: - set_page_dirty(page); + redirty_page_for_writepage(wbc, page); unlock_page(page); return 0; out_unlock: diff -Nru a/fs/xfs/xfs_cap.c b/fs/xfs/xfs_cap.c --- a/fs/xfs/xfs_cap.c 2004-10-03 19:06:21 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,206 +0,0 @@ -/* - * Copyright (c) 2002 Silicon Graphics, Inc. All Rights Reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ - */ - -#include "xfs.h" - -STATIC int xfs_cap_allow_set(vnode_t *); - - -/* - * Test for existence of capability attribute as efficiently as possible. - */ -int -xfs_cap_vhascap( - vnode_t *vp) -{ - int error; - int len = sizeof(xfs_cap_set_t); - int flags = ATTR_KERNOVAL|ATTR_ROOT; - - VOP_ATTR_GET(vp, SGI_CAP_LINUX, NULL, &len, flags, sys_cred, error); - return (error == 0); -} - -/* - * Convert from extended attribute representation to in-memory for XFS. - */ -STATIC int -posix_cap_xattr_to_xfs( - posix_cap_xattr *src, - size_t size, - xfs_cap_set_t *dest) -{ - if (!src || !dest) - return EINVAL; - - if (src->c_version != cpu_to_le32(POSIX_CAP_XATTR_VERSION)) - return EINVAL; - if (src->c_abiversion != cpu_to_le32(_LINUX_CAPABILITY_VERSION)) - return EINVAL; - - if (size < sizeof(posix_cap_xattr)) - return EINVAL; - - ASSERT(sizeof(dest->cap_effective) == sizeof(src->c_effective)); - - dest->cap_effective = src->c_effective; - dest->cap_permitted = src->c_permitted; - dest->cap_inheritable = src->c_inheritable; - - return 0; -} - -/* - * Convert from in-memory XFS to extended attribute representation. - */ -STATIC int -posix_cap_xfs_to_xattr( - xfs_cap_set_t *src, - posix_cap_xattr *xattr_cap, - size_t size) -{ - size_t new_size = posix_cap_xattr_size(); - - if (size < new_size) - return -ERANGE; - - ASSERT(sizeof(xattr_cap->c_effective) == sizeof(src->cap_effective)); - - xattr_cap->c_version = cpu_to_le32(POSIX_CAP_XATTR_VERSION); - xattr_cap->c_abiversion = cpu_to_le32(_LINUX_CAPABILITY_VERSION); - xattr_cap->c_effective = src->cap_effective; - xattr_cap->c_permitted = src->cap_permitted; - xattr_cap->c_inheritable= src->cap_inheritable; - - return new_size; -} - -int -xfs_cap_vget( - vnode_t *vp, - void *cap, - size_t size) -{ - int error; - int len = sizeof(xfs_cap_set_t); - int flags = ATTR_ROOT; - xfs_cap_set_t xfs_cap = { 0 }; - posix_cap_xattr *xattr_cap = cap; - char *data = (char *)&xfs_cap; - - VN_HOLD(vp); - if ((error = _MAC_VACCESS(vp, NULL, VREAD))) - goto out; - - if (!size) { - flags |= ATTR_KERNOVAL; - data = NULL; - } - VOP_ATTR_GET(vp, SGI_CAP_LINUX, data, &len, flags, sys_cred, error); - if (error) - goto out; - ASSERT(len == sizeof(xfs_cap_set_t)); - - error = (size)? -posix_cap_xattr_size() : - -posix_cap_xfs_to_xattr(&xfs_cap, xattr_cap, size); -out: - VN_RELE(vp); - return -error; -} - -int -xfs_cap_vremove( - vnode_t *vp) -{ - int error; - - VN_HOLD(vp); - error = xfs_cap_allow_set(vp); - if (!error) { - VOP_ATTR_REMOVE(vp, SGI_CAP_LINUX, ATTR_ROOT, sys_cred, error); - if (error == ENOATTR) - error = 0; /* 'scool */ - } - VN_RELE(vp); - return -error; -} - -int -xfs_cap_vset( - vnode_t *vp, - void *cap, - size_t size) -{ - posix_cap_xattr *xattr_cap = cap; - xfs_cap_set_t xfs_cap; - int error; - - if (!cap) - return -EINVAL; - - error = posix_cap_xattr_to_xfs(xattr_cap, size, &xfs_cap); - if (error) - return -error; - - VN_HOLD(vp); - error = xfs_cap_allow_set(vp); - if (error) - goto out; - - VOP_ATTR_SET(vp, SGI_CAP_LINUX, (char *)&xfs_cap, - sizeof(xfs_cap_set_t), ATTR_ROOT, sys_cred, error); -out: - VN_RELE(vp); - return -error; -} - -STATIC int -xfs_cap_allow_set( - vnode_t *vp) -{ - vattr_t va; - int error; - - if (vp->v_vfsp->vfs_flag & VFS_RDONLY) - return EROFS; - if (vp->v_inode.i_flags & (S_IMMUTABLE|S_APPEND)) - return EPERM; - if ((error = _MAC_VACCESS(vp, NULL, VWRITE))) - return error; - va.va_mask = XFS_AT_UID; - VOP_GETATTR(vp, &va, 0, NULL, error); - if (error) - return error; - if (va.va_uid != current->fsuid && !capable(CAP_FOWNER)) - return EPERM; - return error; -} diff -Nru a/fs/xfs/xfs_mac.c b/fs/xfs/xfs_mac.c --- a/fs/xfs/xfs_mac.c 2004-10-03 19:06:21 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ - */ - -#include "xfs.h" - -static xfs_mac_label_t *mac_low_high_lp; -static xfs_mac_label_t *mac_high_low_lp; -static xfs_mac_label_t *mac_admin_high_lp; -static xfs_mac_label_t *mac_equal_equal_lp; - -/* - * Test for the existence of a MAC label as efficiently as possible. - */ -int -xfs_mac_vhaslabel( - vnode_t *vp) -{ - int error; - int len = sizeof(xfs_mac_label_t); - int flags = ATTR_KERNOVAL|ATTR_ROOT; - - VOP_ATTR_GET(vp, SGI_MAC_FILE, NULL, &len, flags, sys_cred, error); - return (error == 0); -} - -int -xfs_mac_iaccess(xfs_inode_t *ip, mode_t mode, struct cred *cr) -{ - xfs_mac_label_t mac; - xfs_mac_label_t *mp = mac_high_low_lp; - - if (cr == NULL || sys_cred == NULL ) { - return EACCES; - } - - if (xfs_attr_fetch(ip, SGI_MAC_FILE, (char *)&mac, sizeof(mac)) == 0) { - if ((mp = mac_add_label(&mac)) == NULL) { - return mac_access(mac_high_low_lp, cr, mode); - } - } - - return mac_access(mp, cr, mode); -} diff -Nru a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c --- a/fs/xfs/xfs_vnodeops.c 2004-10-03 19:06:22 -07:00 +++ b/fs/xfs/xfs_vnodeops.c 2004-10-03 19:06:22 -07:00 @@ -841,17 +841,17 @@ if (vap->va_xflags & XFS_XFLAG_NODUMP) di_flags |= XFS_DIFLAG_NODUMP; if ((ip->i_d.di_mode & S_IFMT) == S_IFDIR) { - if (vap->va_xflags & XFS_XFLAG_REALTIME) { - ip->i_iocore.io_flags |= XFS_IOCORE_RT; - di_flags |= XFS_DIFLAG_REALTIME; - } if (vap->va_xflags & XFS_XFLAG_RTINHERIT) di_flags |= XFS_DIFLAG_RTINHERIT; if (vap->va_xflags & XFS_XFLAG_NOSYMLINKS) di_flags |= XFS_DIFLAG_NOSYMLINKS; } else { - if (!(vap->va_xflags & XFS_XFLAG_REALTIME)) + if (vap->va_xflags & XFS_XFLAG_REALTIME) { + di_flags |= XFS_DIFLAG_REALTIME; + ip->i_iocore.io_flags |= XFS_IOCORE_RT; + } else { ip->i_iocore.io_flags &= ~XFS_IOCORE_RT; + } } ip->i_d.di_flags = di_flags; } diff -Nru a/include/asm-arm/arch-pxa/serial.h b/include/asm-arm/arch-pxa/serial.h --- a/include/asm-arm/arch-pxa/serial.h 2004-10-03 19:06:21 -07:00 +++ b/include/asm-arm/arch-pxa/serial.h 2004-10-03 19:06:21 -07:00 @@ -9,6 +9,7 @@ * published by the Free Software Foundation. */ +#include #define BAUD_BASE 921600 diff -Nru a/include/asm-arm/arch-s3c2410/bast-irq.h b/include/asm-arm/arch-s3c2410/bast-irq.h --- a/include/asm-arm/arch-s3c2410/bast-irq.h 2004-10-03 19:06:22 -07:00 +++ b/include/asm-arm/arch-s3c2410/bast-irq.h 2004-10-03 19:06:22 -07:00 @@ -10,6 +10,7 @@ * published by the Free Software Foundation. * * Changelog: + * 14-Sep-2004 BJD Fixed IRQ_USBOC definition * 06-Jan-2003 BJD Linux 2.6.0 version */ @@ -18,7 +19,7 @@ /* irq numbers to onboard peripherals */ -#define IRQ_USBOC IRQ_EINT19 +#define IRQ_USBOC IRQ_EINT18 #define IRQ_IDE0 IRQ_EINT16 #define IRQ_IDE1 IRQ_EINT17 #define IRQ_PCSERIAL1 IRQ_EINT15 diff -Nru a/include/asm-arm/arch-s3c2410/hardware.h b/include/asm-arm/arch-s3c2410/hardware.h --- a/include/asm-arm/arch-s3c2410/hardware.h 2004-10-03 19:06:21 -07:00 +++ b/include/asm-arm/arch-s3c2410/hardware.h 2004-10-03 19:06:21 -07:00 @@ -15,6 +15,7 @@ * 03-Sep-2003 BJD Linux v2.6 support * 12-Mar-2004 BJD Fixed include protection, fixed type of clock vars * 14-Sep-2004 BJD Added misccr and getpin to gpio + * 01-Oct-2004 BJD Added the new gpio functions */ #ifndef __ASM_ARCH_HARDWARE_H @@ -44,6 +45,20 @@ */ extern void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int function); + +extern unsigned int s3c2410_gpio_getcfg(unsigned int pin); + + +/* s3c2410_gpio_getirq + * + * turn the given pin number into the corresponding IRQ number + * + * returns: + * < 0 = no interrupt for this pin + * >=0 = interrupt number for the pin +*/ + +extern int s3c2410_gpio_getirq(unsigned int pin); /* s3c2410_gpio_pullup * diff -Nru a/include/asm-arm/arch-s3c2410/regs-gpio.h b/include/asm-arm/arch-s3c2410/regs-gpio.h --- a/include/asm-arm/arch-s3c2410/regs-gpio.h 2004-10-03 19:06:22 -07:00 +++ b/include/asm-arm/arch-s3c2410/regs-gpio.h 2004-10-03 19:06:22 -07:00 @@ -623,25 +623,25 @@ #define S3C2410_GPG10 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 10) #define S3C2410_GPG12_INP (0x00 << 24) #define S3C2410_GPG12_OUTP (0x01 << 24) -#define S3C2410_GPG12_EINT18 (0x02 << 24) +#define S3C2410_GPG12_EINT20 (0x02 << 24) #define S3C2410_GPG12_XMON (0x03 << 24) #define S3C2410_GPG10 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 10) #define S3C2410_GPG13_INP (0x00 << 26) #define S3C2410_GPG13_OUTP (0x01 << 26) -#define S3C2410_GPG13_EINT18 (0x02 << 26) +#define S3C2410_GPG13_EINT21 (0x02 << 26) #define S3C2410_GPG13_nXPON (0x03 << 26) #define S3C2410_GPG10 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 10) #define S3C2410_GPG14_INP (0x00 << 28) #define S3C2410_GPG14_OUTP (0x01 << 28) -#define S3C2410_GPG14_EINT18 (0x02 << 28) +#define S3C2410_GPG14_EINT22 (0x02 << 28) #define S3C2410_GPG14_YMON (0x03 << 28) #define S3C2410_GPG10 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 10) #define S3C2410_GPG15_INP (0x00 << 30) #define S3C2410_GPG15_OUTP (0x01 << 30) -#define S3C2410_GPG15_EINT18 (0x02 << 30) +#define S3C2410_GPG15_EINT23 (0x02 << 30) #define S3C2410_GPG15_nYPON (0x03 << 30) @@ -750,6 +750,11 @@ #define S3C2410_MISCCR_USBSUSPND1 (1<<13) #define S3C2410_MISCCR_nRSTCON (1<<16) + +#define S3C2410_MISCCR_nEN_SCLK0 (1<<17) +#define S3C2410_MISCCR_nEN_SCLK1 (1<<18) +#define S3C2410_MISCCR_nEN_SCLKE (1<<19) +#define S3C2410_MISCCR_SDSLEEP (7<<17) /* external interrupt control... */ /* S3C2410_EXTINT0 -> irq sense control for EINT0..EINT7 diff -Nru a/include/asm-arm/arch-s3c2410/regs-iic.h b/include/asm-arm/arch-s3c2410/regs-iic.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-arm/arch-s3c2410/regs-iic.h 2004-10-03 19:06:22 -07:00 @@ -0,0 +1,50 @@ +/* linux/include/asm-arm/arch-s3c2410/regs-iic.h + * + * Copyright (c) 2004 Simtec Electronics + * http://www.simtec.co.uk/products/SWLINUX/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * S3C2410 I2C Controller + * + * Changelog: + * 03-Oct-2004 BJD Initial include for Linux +*/ + +#ifndef __ASM_ARCH_IIC_H +#define __ASM_ARCH_IIC_H __FILE__ + +/* see s3c2410x user guide, v1.1, section 9 (p447) for more info */ + +#define S3C2410_IICREG(x) (x) + +#define S3C2410_IICCON S3C2410_IICREG(0x00) +#define S3C2410_IICSTAT S3C2410_IICREG(0x04) +#define S3C2410_IICADD S3C2410_IICREG(0x08) +#define S3C2410_IICDS S3C2410_IICREG(0x0C) + +#define S3C2410_IICCON_ACKEN (1<<7) +#define S3C2410_IICCON_TXDIV_16 (0<<6) +#define S3C2410_IICCON_TXDIV_512 (1<<6) +#define S3C2410_IICCON_IRQEN (1<<5) +#define S3C2410_IICCON_IRQPEND (1<<4) +#define S3C2410_IICCON_SCALE(x) ((x)&15) +#define S3C2410_IICCON_SCALEMASK (0xf) + +#define S3C2410_IICSTAT_MASTER_RX (2<<6) +#define S3C2410_IICSTAT_MASTER_TX (3<<6) +#define S3C2410_IICSTAT_SLAVE_RX (0<<6) +#define S3C2410_IICSTAT_SLAVE_TX (1<<6) +#define S3C2410_IICSTAT_MODEMASK (3<<6) + +#define S3C2410_IICSTAT_START (1<<5) +#define S3C2410_IICSTAT_BUSBUSY (1<<5) +#define S3C2410_IICSTAT_TXRXEN (1<<4) +#define S3C2410_IICSTAT_ARBITR (1<<3) +#define S3C2410_IICSTAT_ASSLAVE (1<<2) +#define S3C2410_IICSTAT_ADDR0 (1<<1) +#define S3C2410_IICSTAT_LASTBIT (1<<0) + +#endif /* __ASM_ARCH_IIC_H */ diff -Nru a/include/asm-arm/arch-s3c2410/regs-mem.h b/include/asm-arm/arch-s3c2410/regs-mem.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-arm/arch-s3c2410/regs-mem.h 2004-10-03 19:06:22 -07:00 @@ -0,0 +1,190 @@ +/* linux/include/asm-arm/arch-s3c2410/regs-mem.h + * + * Copyright (c) 2004 Simtec Electronics + * http://www.simtec.co.uk/products/SWLINUX/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * S3C2410 Memory Control register definitions + * + * Changelog: + * 29-Sep-2004 BJD Initial include for Linux + * +*/ + +#ifndef __ASM_ARM_MEMREGS_H +#define __ASM_ARM_MEMREGS_H "$Id: regs.h,v 1.8 2003/05/01 15:55:41 ben Exp $" + +#ifndef S3C2410_MEMREG +#define S3C2410_MEMREG(x) (S3C2410_VA_MEMCTRL + (x)) +#endif + +/* bus width, and wait state control */ +#define S3C2410_BWSCON S3C2410_MEMREG(0x0000) + +/* bank zero config - note, pinstrapped from OM pins! */ +#define S3C2410_BWSCON_DW0_16 (1<<1) +#define S3C2410_BWSCON_DW0_32 (2<<1) + +/* bank one configs */ +#define S3C2410_BWSCON_DW1_8 (0<<4) +#define S3C2410_BWSCON_DW1_16 (1<<4) +#define S3C2410_BWSCON_DW1_32 (2<<4) +#define S3C2410_BWSCON_WS1 (1<<6) +#define S3C2410_BWSCON_ST1 (1<<7) + +/* bank 2 configurations */ +#define S3C2410_BWSCON_DW2_8 (0<<8) +#define S3C2410_BWSCON_DW2_16 (1<<8) +#define S3C2410_BWSCON_DW2_32 (2<<8) +#define S3C2410_BWSCON_WS2 (1<<10) +#define S3C2410_BWSCON_ST2 (1<<11) + +/* bank 3 configurations */ +#define S3C2410_BWSCON_DW3_8 (0<<12) +#define S3C2410_BWSCON_DW3_16 (1<<12) +#define S3C2410_BWSCON_DW3_32 (2<<12) +#define S3C2410_BWSCON_WS3 (1<<14) +#define S3C2410_BWSCON_ST3 (1<<15) + +/* bank 4 configurations */ +#define S3C2410_BWSCON_DW4_8 (0<<16) +#define S3C2410_BWSCON_DW4_16 (1<<16) +#define S3C2410_BWSCON_DW4_32 (2<<16) +#define S3C2410_BWSCON_WS4 (1<<18) +#define S3C2410_BWSCON_ST4 (1<<19) + +/* bank 5 configurations */ +#define S3C2410_BWSCON_DW5_8 (0<<20) +#define S3C2410_BWSCON_DW5_16 (1<<20) +#define S3C2410_BWSCON_DW5_32 (2<<20) +#define S3C2410_BWSCON_WS5 (1<<22) +#define S3C2410_BWSCON_ST5 (1<<23) + +/* bank 6 configurations */ +#define S3C2410_BWSCON_DW6_8 (0<<24) +#define S3C2410_BWSCON_DW6_16 (1<<24) +#define S3C2410_BWSCON_DW6_32 (2<<24) +#define S3C2410_BWSCON_WS6 (1<<26) +#define S3C2410_BWSCON_ST6 (1<<27) + +/* bank 7 configurations */ +#define S3C2410_BWSCON_DW7_8 (0<<28) +#define S3C2410_BWSCON_DW7_16 (1<<28) +#define S3C2410_BWSCON_DW7_32 (2<<28) +#define S3C2410_BWSCON_WS7 (1<<30) +#define S3C2410_BWSCON_ST7 (1<<31) + +/* memory set (rom, ram) */ +#define S3C2410_BANKCON0 S3C2410_MEMREG(0x0004) +#define S3C2410_BANKCON1 S3C2410_MEMREG(0x0008) +#define S3C2410_BANKCON2 S3C2410_MEMREG(0x000C) +#define S3C2410_BANKCON3 S3C2410_MEMREG(0x0010) +#define S3C2410_BANKCON4 S3C2410_MEMREG(0x0014) +#define S3C2410_BANKCON5 S3C2410_MEMREG(0x0018) +#define S3C2410_BANKCON6 S3C2410_MEMREG(0x001C) +#define S3C2410_BANKCON7 S3C2410_MEMREG(0x0020) + +/* bank configuration registers */ + +#define S3C2410_BANKCON_PMCnorm (0x00) +#define S3C2410_BANKCON_PMC4 (0x01) +#define S3C2410_BANKCON_PMC8 (0x02) +#define S3C2410_BANKCON_PMC16 (0x03) + +/* bank configurations for banks 0..7, note banks + * 6 and 7 have differnt configurations depending on + * the memory type bits */ + +#define S3C2410_BANKCON_Tacp2 (0x0 << 2) +#define S3C2410_BANKCON_Tacp3 (0x1 << 2) +#define S3C2410_BANKCON_Tacp4 (0x2 << 2) +#define S3C2410_BANKCON_Tacp6 (0x3 << 2) + +#define S3C2410_BANKCON_Tcah0 (0x0 << 4) +#define S3C2410_BANKCON_Tcah1 (0x1 << 4) +#define S3C2410_BANKCON_Tcah2 (0x2 << 4) +#define S3C2410_BANKCON_Tcah4 (0x3 << 4) + +#define S3C2410_BANKCON_Tcoh0 (0x0 << 6) +#define S3C2410_BANKCON_Tcoh1 (0x1 << 6) +#define S3C2410_BANKCON_Tcoh2 (0x2 << 6) +#define S3C2410_BANKCON_Tcoh4 (0x3 << 6) + +#define S3C2410_BANKCON_Tacc1 (0x0 << 8) +#define S3C2410_BANKCON_Tacc2 (0x1 << 8) +#define S3C2410_BANKCON_Tacc3 (0x2 << 8) +#define S3C2410_BANKCON_Tacc4 (0x3 << 8) +#define S3C2410_BANKCON_Tacc6 (0x4 << 8) +#define S3C2410_BANKCON_Tacc8 (0x5 << 8) +#define S3C2410_BANKCON_Tacc10 (0x6 << 8) +#define S3C2410_BANKCON_Tacc14 (0x7 << 8) + +#define S3C2410_BANKCON_Tcos0 (0x0 << 11) +#define S3C2410_BANKCON_Tcos1 (0x1 << 11) +#define S3C2410_BANKCON_Tcos2 (0x2 << 11) +#define S3C2410_BANKCON_Tcos4 (0x3 << 11) + +#define S3C2410_BANKCON_Tacs0 (0x0 << 13) +#define S3C2410_BANKCON_Tacs1 (0x1 << 13) +#define S3C2410_BANKCON_Tacs2 (0x2 << 13) +#define S3C2410_BANKCON_Tacs4 (0x3 << 13) + +#define S3C2410_BANKCON_SRAM (0x0 << 15) +#define S3C2410_BANKCON_SDRAM (0x3 << 15) + +/* next bits only for SDRAM in 6,7 */ +#define S3C2410_BANKCON_Trdc2 (0x00 << 2) +#define S3C2410_BANKCON_Trdc3 (0x01 << 2) +#define S3C2410_BANKCON_Trdc4 (0x02 << 2) + +/* control column address select */ +#define S3C2410_BANKCON_SCANb8 (0x00 << 0) +#define S3C2410_BANKCON_SCANb9 (0x01 << 0) +#define S3C2410_BANKCON_SCANb10 (0x02 << 0) + +#define S3C2410_REFRESH S3C2410_MEMREG(0x0024) +#define S3C2410_BANKSIZE S3C2410_MEMREG(0x0028) +#define S3C2410_MRSRB6 S3C2410_MEMREG(0x002C) +#define S3C2410_MRSRB7 S3C2410_MEMREG(0x0030) + +/* refresh control */ + +#define S3C2410_REFRESH_REFEN (1<<23) +#define S3C2410_REFRESH_SELF (1<<22) +#define S3C2410_REFRESH_REFCOUNTER ((1<<11)-1) + +#define S3C2410_REFRESH_TRP_MASK (3<<20) +#define S3C2410_REFRESH_TRP_2clk (0<<20) +#define S3C2410_REFRESH_TRP_3clk (1<<20) +#define S3C2410_REFRESH_TRP_4clk (2<<20) + +#define S3C2410_REFRESH_TSRC_MASK (3<<18) +#define S3C2410_REFRESH_TSRC_4clk (0<<18) +#define S3C2410_REFRESH_TSRC_5clk (1<<18) +#define S3C2410_REFRESH_TSRC_6clk (2<<18) +#define S3C2410_REFRESH_TSRC_7clk (3<<18) + + +/* mode select register(s) */ + +#define S3C2410_MRSRB_CL1 (0x00 << 4) +#define S3C2410_MRSRB_CL2 (0x02 << 4) +#define S3C2410_MRSRB_CL3 (0x03 << 4) + +/* bank size register */ +#define S3C2410_BANKSIZE_128M (0x2 << 0) +#define S3C2410_BANKSIZE_64M (0x1 << 0) +#define S3C2410_BANKSIZE_32M (0x0 << 0) +#define S3C2410_BANKSIZE_16M (0x7 << 0) +#define S3C2410_BANKSIZE_8M (0x6 << 0) +#define S3C2410_BANKSIZE_4M (0x5 << 0) +#define S3C2410_BANKSIZE_2M (0x4 << 0) +#define S3C2410_BANKSIZE_MASK (0x7 << 0) +#define S3C2410_BANKSIZE_SCLK_EN (1<<4) +#define S3C2410_BANKSIZE_SCKE_EN (1<<5) +#define S3C2410_BANKSIZE_BURST (1<<7) + +#endif /* __ASM_ARM_MEMREGS_H */ diff -Nru a/include/asm-arm/arch-s3c2410/usb-control.h b/include/asm-arm/arch-s3c2410/usb-control.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-arm/arch-s3c2410/usb-control.h 2004-10-03 19:06:22 -07:00 @@ -0,0 +1,45 @@ +/* linux/include/asm-arm/arch-s3c2410/usb-control.h + * + * (c) 2004 Simtec Electronics + * Ben Dooks + * + * S3C2410 - usb port information + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Changelog: + * 11-Sep-2004 BJD Created file + * 21-Sep-2004 BJD Updated port info +*/ + +#ifndef __ASM_ARCH_USBCONTROL_H +#define __ASM_ARCH_USBCONTROL_H "include/asm-arm/arch-s3c2410/usb-control.h" + +#define S3C_HCDFLG_USED (1) + +struct s3c2410_hcd_port { + unsigned char flags; + unsigned char power; + unsigned char oc_status; + unsigned char oc_changed; +}; + +struct s3c2410_hcd_info { + struct usb_hcd *hcd; + struct s3c2410_hcd_port port[2]; + + void (*power_control)(int port, int to); + void (*enable_oc)(struct s3c2410_hcd_info *, int on); + void (*report_oc)(struct s3c2410_hcd_info *, int ports); +}; + +static void inline s3c2410_report_oc(struct s3c2410_hcd_info *info, int ports) +{ + if (info->report_oc != NULL) { + (info->report_oc)(info, ports); + } +} + +#endif /*__ASM_ARCH_USBCONTROL_H */ diff -Nru a/include/asm-arm/bitops.h b/include/asm-arm/bitops.h --- a/include/asm-arm/bitops.h 2004-10-03 19:06:21 -07:00 +++ b/include/asm-arm/bitops.h 2004-10-03 19:06:21 -07:00 @@ -345,7 +345,7 @@ extern __inline__ int generic_fls(int x); #define fls(x) \ ( __builtin_constant_p(x) ? generic_fls(x) : \ - ({ int __r; asm("clz%?\t%0, %1" : "=r"(__r) : "r"(x)); 32-__r; }) ) + ({ int __r; asm("clz\t%0, %1" : "=r"(__r) : "r"(x) : "cc"); 32-__r; }) ) #define ffs(x) ({ unsigned long __t = (x); fls(__t & -__t); }) #define __ffs(x) (ffs(x) - 1) #define ffz(x) __ffs( ~(x) ) diff -Nru a/include/asm-arm/hardware/clock.h b/include/asm-arm/hardware/clock.h --- a/include/asm-arm/hardware/clock.h 2004-10-03 19:06:21 -07:00 +++ b/include/asm-arm/hardware/clock.h 2004-10-03 19:06:21 -07:00 @@ -64,7 +64,7 @@ void clk_unuse(struct clk *clk); /** - * clk_get_rate - obtain the current clock rate for a clock source. + * clk_get_rate - obtain the current clock rate (in Hz) for a clock source. * This is only valid once the clock source has been enabled. * @clk: clock source */ @@ -85,16 +85,16 @@ /** * clk_round_rate - adjust a rate to the exact rate a clock can provide * @clk: clock source - * @rate: desired clock rate in kHz + * @rate: desired clock rate in Hz * - * Returns rounded clock rate, or negative errno. + * Returns rounded clock rate in Hz, or negative errno. */ long clk_round_rate(struct clk *clk, unsigned long rate); /** * clk_set_rate - set the clock rate for a clock source * @clk: clock source - * @rate: desired clock rate in kHz + * @rate: desired clock rate in Hz * * Returns success (0) or negative errno. */ diff -Nru a/include/asm-arm/system.h b/include/asm-arm/system.h --- a/include/asm-arm/system.h 2004-10-03 19:06:21 -07:00 +++ b/include/asm-arm/system.h 2004-10-03 19:06:21 -07:00 @@ -50,8 +50,10 @@ #define read_cpuid(reg) \ ({ \ unsigned int __val; \ - asm("mrc%? p15, 0, %0, c0, c0, " __stringify(reg) \ - : "=r" (__val)); \ + asm("mrc p15, 0, %0, c0, c0, " __stringify(reg) \ + : "=r" (__val) \ + : \ + : "cc"); \ __val; \ }) diff -Nru a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h --- a/include/asm-arm/unistd.h 2004-10-03 19:06:22 -07:00 +++ b/include/asm-arm/unistd.h 2004-10-03 19:06:22 -07:00 @@ -299,6 +299,13 @@ #define __NR_pciconfig_iobase (__NR_SYSCALL_BASE+271) #define __NR_pciconfig_read (__NR_SYSCALL_BASE+272) #define __NR_pciconfig_write (__NR_SYSCALL_BASE+273) +#define __NR_mq_open (__NR_SYSCALL_BASE+274) +#define __NR_mq_unlink (__NR_SYSCALL_BASE+275) +#define __NR_mq_timedsend (__NR_SYSCALL_BASE+276) +#define __NR_mq_timedreceive (__NR_SYSCALL_BASE+277) +#define __NR_mq_notify (__NR_SYSCALL_BASE+278) +#define __NR_mq_getsetattr (__NR_SYSCALL_BASE+279) +#define __NR_waitid (__NR_SYSCALL_BASE+280) /* * The following SWIs are ARM private. diff -Nru a/include/asm-ia64/mca.h b/include/asm-ia64/mca.h --- a/include/asm-ia64/mca.h 2004-10-03 19:06:21 -07:00 +++ b/include/asm-ia64/mca.h 2004-10-03 19:06:21 -07:00 @@ -22,6 +22,11 @@ #define IA64_MCA_RENDEZ_TIMEOUT (20 * 1000) /* value in milliseconds - 20 seconds */ +typedef struct ia64_fptr { + unsigned long fp; + unsigned long gp; +} ia64_fptr_t; + typedef union cmcv_reg_u { u64 cmcv_regval; struct { @@ -114,6 +119,8 @@ extern void ia64_monarch_init_handler(void); extern void ia64_slave_init_handler(void); extern void ia64_mca_cmc_vector_setup(void); +extern int ia64_reg_MCA_extension(void*); +extern void ia64_unreg_MCA_extension(void); #endif /* !__ASSEMBLY__ */ #endif /* _ASM_IA64_MCA_H */ diff -Nru a/include/asm-ia64/sn/sn_sal.h b/include/asm-ia64/sn/sn_sal.h --- a/include/asm-ia64/sn/sn_sal.h 2004-10-03 19:06:22 -07:00 +++ b/include/asm-ia64/sn/sn_sal.h 2004-10-03 19:06:22 -07:00 @@ -34,6 +34,7 @@ #define SN_SAL_NO_FAULT_ZONE_PHYSICAL 0x02000011 #define SN_SAL_PRINT_ERROR 0x02000012 #define SN_SAL_SET_ERROR_HANDLING_FEATURES 0x0200001a // reentrant +#define SN_SAL_GET_FIT_COMPT 0x0200001b // reentrant #define SN_SAL_CONSOLE_PUTC 0x02000021 #define SN_SAL_CONSOLE_GETC 0x02000022 #define SN_SAL_CONSOLE_PUTS 0x02000023 @@ -107,12 +108,13 @@ /* - * SN_SAL_GET_PARTITION_ADDR return constants + * SAL Error Codes */ #define SALRET_MORE_PASSES 1 #define SALRET_OK 0 -#define SALRET_INVALID_ARG -2 -#define SALRET_ERROR -3 +#define SALRET_NOT_IMPLEMENTED (-1) +#define SALRET_INVALID_ARG (-2) +#define SALRET_ERROR (-3) /* * SN_SAL_SET_ERROR_HANDLING_FEATURES bit settings @@ -827,6 +829,34 @@ SAL_CALL_REENTRANT(rv, SN_SAL_IROUTER_OP, SAL_IROUTER_INTR_OFF, (u64) nasid, (u64) subch, intr, 0, 0, 0); return (int) rv.v0; +} + +/** + * ia64_sn_get_fit_compt - read a FIT entry from the PROM header + * @nasid: NASID of node to read + * @index: FIT entry index to be retrieved (0..n) + * @fitentry: 16 byte buffer where FIT entry will be stored. + * @banbuf: optional buffer for retrieving banner + * @banlen: length of banner buffer + * + * Access to the physical PROM chips needs to be serialized since reads and + * writes can't occur at the same time, so we need to call into the SAL when + * we want to look at the FIT entries on the chips. + * + * Returns: + * %SALRET_OK if ok + * %SALRET_INVALID_ARG if index too big + * %SALRET_NOT_IMPLEMENTED if running on older PROM + * ??? if nasid invalid OR banner buffer not large enough + */ +static inline int +ia64_sn_get_fit_compt(u64 nasid, u64 index, void *fitentry, void *banbuf, + u64 banlen) +{ + struct ia64_sal_retval rv; + SAL_CALL_NOLOCK(rv, SN_SAL_GET_FIT_COMPT, nasid, index, fitentry, + banbuf, banlen, 0, 0); + return (int) rv.status; } /* diff -Nru a/include/asm-m32r/bitops.h b/include/asm-m32r/bitops.h --- a/include/asm-m32r/bitops.h 2004-10-03 19:06:21 -07:00 +++ b/include/asm-m32r/bitops.h 2004-10-03 19:06:21 -07:00 @@ -1,17 +1,14 @@ #ifndef _ASM_M32R_BITOPS_H #define _ASM_M32R_BITOPS_H -/* $Id$ */ - /* * linux/include/asm-m32r/bitops.h - * orig : i386 2.4.10 * * Copyright 1992, Linus Torvalds. * * M32R version: * Copyright (C) 2001, 2002 Hitoshi Yamamoto - * Copyright (C) 2004 Hirokazu Takata + * Copyright (C) 2004 Hirokazu Takata */ #include @@ -50,24 +47,25 @@ * Note that @nr may be almost arbitrarily large; this function is not * restricted to acting on a single-word quantity. */ -static __inline__ void set_bit(int nr, volatile void * addr) +static inline void set_bit(int nr, volatile void * addr) { __u32 mask; volatile __u32 *a = addr; - unsigned long flags; + unsigned long flags; + unsigned long tmp; a += (nr >> 5); mask = (1 << (nr & 0x1F)); local_irq_save(flags); __asm__ __volatile__ ( - DCACHE_CLEAR("r4", "r6", "%0") - LOAD" r4, @%0; \n\t" - "or r4, %1; \n\t" - STORE" r4, @%0; \n\t" - : /* no outputs */ + DCACHE_CLEAR("%0", "r6", "%1") + LOAD" %0, @%1; \n\t" + "or %0, %2; \n\t" + STORE" %0, @%1; \n\t" + : "=&r" (tmp) : "r" (a), "r" (mask) - : "memory", "r4" + : "memory" #ifdef CONFIG_CHIP_M32700_TS1 , "r6" #endif /* CONFIG_CHIP_M32700_TS1 */ @@ -84,7 +82,7 @@ * If it's called on the same region of memory simultaneously, the effect * may be that only one operation succeeds. */ -static __inline__ void __set_bit(int nr, volatile void * addr) +static inline void __set_bit(int nr, volatile void * addr) { __u32 mask; volatile __u32 *a = addr; @@ -104,11 +102,12 @@ * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit() * in order to ensure changes are visible on other processors. */ -static __inline__ void clear_bit(int nr, volatile void * addr) +static inline void clear_bit(int nr, volatile void * addr) { __u32 mask; volatile __u32 *a = addr; - unsigned long flags; + unsigned long flags; + unsigned long tmp; a += (nr >> 5); mask = (1 << (nr & 0x1F)); @@ -116,13 +115,13 @@ local_irq_save(flags); __asm__ __volatile__ ( - DCACHE_CLEAR("r4", "r6", "%0") - LOAD" r4, @%0; \n\t" - "and r4, %1; \n\t" - STORE" r4, @%0; \n\t" - : /* no outputs */ + DCACHE_CLEAR("%0", "r6", "%1") + LOAD" %0, @%1; \n\t" + "and %0, %2; \n\t" + STORE" %0, @%1; \n\t" + : "=&r" (tmp) : "r" (a), "r" (~mask) - : "memory", "r4" + : "memory" #ifdef CONFIG_CHIP_M32700_TS1 , "r6" #endif /* CONFIG_CHIP_M32700_TS1 */ @@ -130,7 +129,7 @@ local_irq_restore(flags); } -static __inline__ void __clear_bit(int nr, volatile unsigned long * addr) +static inline void __clear_bit(int nr, volatile unsigned long * addr) { unsigned long mask; volatile unsigned long *a = addr; @@ -152,7 +151,7 @@ * If it's called on the same region of memory simultaneously, the effect * may be that only one operation succeeds. */ -static __inline__ void __change_bit(int nr, volatile void * addr) +static inline void __change_bit(int nr, volatile void * addr) { __u32 mask; volatile __u32 *a = addr; @@ -171,24 +170,25 @@ * Note that @nr may be almost arbitrarily large; this function is not * restricted to acting on a single-word quantity. */ -static __inline__ void change_bit(int nr, volatile void * addr) +static inline void change_bit(int nr, volatile void * addr) { __u32 mask; volatile __u32 *a = addr; - unsigned long flags; + unsigned long flags; + unsigned long tmp; a += (nr >> 5); mask = (1 << (nr & 0x1F)); local_irq_save(flags); __asm__ __volatile__ ( - DCACHE_CLEAR("r4", "r6", "%0") - LOAD" r4, @%0; \n\t" - "xor r4, %1; \n\t" - STORE" r4, @%0; \n\t" - : /* no outputs */ + DCACHE_CLEAR("%0", "r6", "%1") + LOAD" %0, @%1; \n\t" + "xor %0, %2; \n\t" + STORE" %0, @%1; \n\t" + : "=&r" (tmp) : "r" (a), "r" (mask) - : "memory", "r4" + : "memory" #ifdef CONFIG_CHIP_M32700_TS1 , "r6" #endif /* CONFIG_CHIP_M32700_TS1 */ @@ -204,28 +204,30 @@ * This operation is atomic and cannot be reordered. * It also implies a memory barrier. */ -static __inline__ int test_and_set_bit(int nr, volatile void * addr) +static inline int test_and_set_bit(int nr, volatile void * addr) { __u32 mask, oldbit; volatile __u32 *a = addr; - unsigned long flags; + unsigned long flags; + unsigned long tmp; a += (nr >> 5); mask = (1 << (nr & 0x1F)); local_irq_save(flags); __asm__ __volatile__ ( - DCACHE_CLEAR("%0", "r4", "%1") - LOAD" %0, @%1; \n\t" - "mv r4, %0; \n\t" - "and %0, %2; \n\t" - "or r4, %2; \n\t" - STORE" r4, @%1; \n\t" - : "=&r" (oldbit) + DCACHE_CLEAR("%0", "%1", "%2") + LOAD" %0, @%2; \n\t" + "mv %1, %0; \n\t" + "and %0, %3; \n\t" + "or %1, %3; \n\t" + STORE" %1, @%2; \n\t" + : "=&r" (oldbit), "=&r" (tmp) : "r" (a), "r" (mask) - : "memory", "r4" + : "memory" ); local_irq_restore(flags); + return (oldbit != 0); } @@ -238,7 +240,7 @@ * If two examples of this operation race, one can appear to succeed * but actually fail. You must protect multiple accesses with a lock. */ -static __inline__ int __test_and_set_bit(int nr, volatile void * addr) +static inline int __test_and_set_bit(int nr, volatile void * addr) { __u32 mask, oldbit; volatile __u32 *a = addr; @@ -259,11 +261,12 @@ * This operation is atomic and cannot be reordered. * It also implies a memory barrier. */ -static __inline__ int test_and_clear_bit(int nr, volatile void * addr) +static inline int test_and_clear_bit(int nr, volatile void * addr) { __u32 mask, oldbit; volatile __u32 *a = addr; - unsigned long flags; + unsigned long flags; + unsigned long tmp; a += (nr >> 5); mask = (1 << (nr & 0x1F)); @@ -271,16 +274,16 @@ local_irq_save(flags); __asm__ __volatile__ ( - DCACHE_CLEAR("%0", "r4", "%2") - LOAD" %0, @%2; \n\t" - "mv r4, %0; \n\t" - "and %0, %1; \n\t" - "not %1, %1; \n\t" - "and r4, %1; \n\t" - STORE" r4, @%2; \n\t" - : "=&r" (oldbit), "+r" (mask) + DCACHE_CLEAR("%0", "%1", "%3") + LOAD" %0, @%3; \n\t" + "mv %1, %0; \n\t" + "and %0, %2; \n\t" + "not %2, %2; \n\t" + "and %1, %2; \n\t" + STORE" %1, @%3; \n\t" + : "=&r" (oldbit), "=&r" (tmp), "+r" (mask) : "r" (a) - : "memory", "r4" + : "memory" ); local_irq_restore(flags); @@ -296,7 +299,7 @@ * If two examples of this operation race, one can appear to succeed * but actually fail. You must protect multiple accesses with a lock. */ -static __inline__ int __test_and_clear_bit(int nr, volatile void * addr) +static inline int __test_and_clear_bit(int nr, volatile void * addr) { __u32 mask, oldbit; volatile __u32 *a = addr; @@ -310,7 +313,7 @@ } /* WARNING: non atomic and it can be reordered! */ -static __inline__ int __test_and_change_bit(int nr, volatile void * addr) +static inline int __test_and_change_bit(int nr, volatile void * addr) { __u32 mask, oldbit; volatile __u32 *a = addr; @@ -331,28 +334,30 @@ * This operation is atomic and cannot be reordered. * It also implies a memory barrier. */ -static __inline__ int test_and_change_bit(int nr, volatile void * addr) +static inline int test_and_change_bit(int nr, volatile void * addr) { __u32 mask, oldbit; volatile __u32 *a = addr; - unsigned long flags; + unsigned long flags; + unsigned long tmp; a += (nr >> 5); mask = (1 << (nr & 0x1F)); local_irq_save(flags); __asm__ __volatile__ ( - DCACHE_CLEAR("%0", "r4", "%1") - LOAD" %0, @%1; \n\t" - "mv r4, %0; \n\t" - "and %0, %2; \n\t" - "xor r4, %2; \n\t" - STORE" r4, @%1; \n\t" - : "=&r" (oldbit) + DCACHE_CLEAR("%0", "%1", "%2") + LOAD" %0, @%2; \n\t" + "mv %1, %0; \n\t" + "and %0, %3; \n\t" + "xor %1, %3; \n\t" + STORE" %1, @%2; \n\t" + : "=&r" (oldbit), "=&r" (tmp) : "r" (a), "r" (mask) - : "memory", "r4" + : "memory" ); local_irq_restore(flags); + return (oldbit != 0); } @@ -365,7 +370,7 @@ static int test_bit(int nr, const volatile void * addr); #endif -static __inline__ int test_bit(int nr, const volatile void * addr) +static inline int test_bit(int nr, const volatile void * addr) { __u32 mask; const volatile __u32 *a = addr; @@ -382,7 +387,7 @@ * * Undefined if no zero exists, so code should check against ~0UL first. */ -static __inline__ unsigned long ffz(unsigned long word) +static inline unsigned long ffz(unsigned long word) { int k; @@ -415,7 +420,7 @@ * @offset: The bitnumber to start searching at * @size: The maximum size to search */ -static __inline__ int find_next_zero_bit(void *addr, int size, int offset) +static inline int find_next_zero_bit(void *addr, int size, int offset) { unsigned long *p = ((unsigned long *) addr) + (offset >> 5); unsigned long result = offset & ~31UL; @@ -457,7 +462,7 @@ * * Undefined if no bit exists, so code should check against 0 first. */ -static __inline__ unsigned long __ffs(unsigned long word) +static inline unsigned long __ffs(unsigned long word) { int k = 0; @@ -483,7 +488,7 @@ * unlikely to be set. It's guaranteed that at least one of the 140 * bits is cleared. */ -static __inline__ int sched_find_first_bit(unsigned long *b) +static inline int sched_find_first_bit(unsigned long *b) { if (unlikely(b[0])) return __ffs(b[0]); @@ -502,7 +507,7 @@ * @offset: The bitnumber to start searching at * @size: The maximum size to search */ -static __inline__ unsigned long find_next_bit(const unsigned long *addr, +static inline unsigned long find_next_bit(const unsigned long *addr, unsigned long size, unsigned long offset) { unsigned int *p = ((unsigned int *) addr) + (offset >> 5); @@ -589,7 +594,7 @@ #define ext2_find_first_zero_bit find_first_zero_bit #define ext2_find_next_zero_bit find_next_zero_bit #else -static __inline__ int ext2_set_bit(int nr, volatile void * addr) +static inline int ext2_set_bit(int nr, volatile void * addr) { __u8 mask, oldbit; volatile __u8 *a = addr; @@ -602,7 +607,7 @@ return (oldbit != 0); } -static __inline__ int ext2_clear_bit(int nr, volatile void * addr) +static inline int ext2_clear_bit(int nr, volatile void * addr) { __u8 mask, oldbit; volatile __u8 *a = addr; @@ -615,7 +620,7 @@ return (oldbit != 0); } -static __inline__ int ext2_test_bit(int nr, const volatile void * addr) +static inline int ext2_test_bit(int nr, const volatile void * addr) { __u32 mask; const volatile __u8 *a = addr; @@ -629,7 +634,7 @@ #define ext2_find_first_zero_bit(addr, size) \ ext2_find_next_zero_bit((addr), (size), 0) -static __inline__ unsigned long ext2_find_next_zero_bit(void *addr, +static inline unsigned long ext2_find_next_zero_bit(void *addr, unsigned long size, unsigned long offset) { unsigned long *p = ((unsigned long *) addr) + (offset >> 5); @@ -709,4 +714,3 @@ #endif /* __KERNEL__ */ #endif /* _ASM_M32R_BITOPS_H */ - diff -Nru a/include/asm-m32r/hardirq.h b/include/asm-m32r/hardirq.h --- a/include/asm-m32r/hardirq.h 2004-10-03 19:06:22 -07:00 +++ b/include/asm-m32r/hardirq.h 2004-10-03 19:06:22 -07:00 @@ -30,7 +30,12 @@ #define PREEMPT_BITS 8 #define SOFTIRQ_BITS 8 + +#if NR_IRQS > 256 +#define HARDIRQ_BITS 9 +#else #define HARDIRQ_BITS 8 +#endif #define PREEMPT_SHIFT 0 #define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS) @@ -45,29 +50,10 @@ # error HARDIRQ_BITS is too low! #endif -/* - * Are we doing bottom half or hardware interrupt processing? - * Are we in a softirq context? Interrupt context? - */ -#define in_irq() (hardirq_count()) -#define in_softirq() (softirq_count()) -#define in_interrupt() (irq_count()) - - -#define hardirq_trylock() (!in_interrupt()) -#define hardirq_endlock() do { } while (0) - #define irq_enter() (preempt_count() += HARDIRQ_OFFSET) #define nmi_enter() (irq_enter()) #define nmi_exit() (preempt_count() -= HARDIRQ_OFFSET) -#ifdef CONFIG_PREEMPT -# define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked()) -# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1) -#else -# define in_atomic() (preempt_count() != 0) -# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET -#endif #define irq_exit() \ do { \ preempt_count() -= IRQ_EXIT_OFFSET; \ @@ -75,11 +61,5 @@ do_softirq(); \ preempt_enable_no_resched(); \ } while (0) - -#ifndef CONFIG_SMP -# define synchronize_irq(irq) barrier() -#else - extern void synchronize_irq(unsigned int irq); -#endif /* CONFIG_SMP */ #endif /* __ASM_HARDIRQ_H */ diff -Nru a/include/asm-m32r/m32102.h b/include/asm-m32r/m32102.h --- a/include/asm-m32r/m32102.h 2004-10-03 19:06:22 -07:00 +++ b/include/asm-m32r/m32102.h 2004-10-03 19:06:22 -07:00 @@ -2,10 +2,11 @@ #define _M32102_H_ /* - * Mitsubishi M32R 32102 group - * Copyright (c) 2001 [Hitoshi Yamamoto] All rights reserved. + * Renesas M32R 32102 group + * + * Copyright (c) 2001 Hitoshi Yamamoto + * Copyright (c) 2003, 2004 Renesas Technology Corp. */ -/* $Id$ */ /*======================================================================* * Special Function Register diff -Nru a/include/asm-m32r/m32r.h b/include/asm-m32r/m32r.h --- a/include/asm-m32r/m32r.h 2004-10-03 19:06:22 -07:00 +++ b/include/asm-m32r/m32r.h 2004-10-03 19:06:22 -07:00 @@ -2,11 +2,10 @@ #define _ASM_M32R_M32R_H_ /* - * Mitsubishi M32R processor - * Copyright (C) 1997-2002, Mitsubishi Electric Corporation + * Renesas M32R processor + * + * Copyright (C) 2003, 2004 Renesas Technology Corp. */ - -/* $Id$ */ #include diff -Nru a/include/asm-m32r/m32r_mp_fpga.h b/include/asm-m32r/m32r_mp_fpga.h --- a/include/asm-m32r/m32r_mp_fpga.h 2004-10-03 19:06:22 -07:00 +++ b/include/asm-m32r/m32r_mp_fpga.h 2004-10-03 19:06:22 -07:00 @@ -2,11 +2,11 @@ #define _ASM_M32R_M32R_MP_FPGA_ /* - * Mitsubishi M32R-MP-FPGA - * Copyright (c) 2002 [Hitoshi Yamamoto] All rights reserved. + * Renesas M32R-MP-FPGA + * + * Copyright (c) 2002 Hitoshi Yamamoto + * Copyright (c) 2003, 2004 Renesas Technology Corp. */ - -/* $Id$ */ /* * ======================================================== diff -Nru a/include/asm-m32r/semaphore.h b/include/asm-m32r/semaphore.h --- a/include/asm-m32r/semaphore.h 2004-10-03 19:06:21 -07:00 +++ b/include/asm-m32r/semaphore.h 2004-10-03 19:06:21 -07:00 @@ -1,8 +1,6 @@ #ifndef _ASM_M32R_SEMAPHORE_H #define _ASM_M32R_SEMAPHORE_H -/* $Id$ */ - #include #ifdef __KERNEL__ @@ -10,39 +8,15 @@ /* * SMP- and interrupt-safe semaphores.. * - * (C) Copyright 1996 Linus Torvalds - * - * Modified 1996-12-23 by Dave Grothe to fix bugs in - * the original code and to make semaphore waits - * interruptible so that processes waiting on - * semaphores can be killed. - * Modified 1999-02-14 by Andrea Arcangeli, split the sched.c helper - * functions in asm/sempahore-helper.h while fixing a - * potential and subtle race discovered by Ulrich Schmid - * in down_interruptible(). Since I started to play here I - * also implemented the `trylock' semaphore operation. - * 1999-07-02 Artur Skawina - * Optimized "0(ecx)" -> "(ecx)" (the assembler does not - * do this). Changed calling sequences from push/jmp to - * traditional call/ret. - * Modified 2001-01-01 Andreas Franck - * Some hacks to ensure compatibility with recent - * GCC snapshots, to avoid stack corruption when compiling - * with -fomit-frame-pointer. It's not sure if this will - * be fixed in GCC, as our previous implementation was a - * bit dubious. - * - * If you would like to see an analysis of this implementation, please - * ftp to gcom.com and download the file - * /pub/linux/src/semaphore/semaphore-2.0.24.tar.gz. - * + * Copyright (C) 1996 Linus Torvalds + * Copyright (C) 2004 Hirokazu Takata */ #include -#include -#include #include #include +#include +#include #undef LOAD #undef STORE @@ -58,21 +32,14 @@ atomic_t count; int sleepers; wait_queue_head_t wait; -#ifdef WAITQUEUE_DEBUG - long __magic; -#endif }; -#ifdef WAITQUEUE_DEBUG -# define __SEM_DEBUG_INIT(name) \ - , (int)&(name).__magic -#else -# define __SEM_DEBUG_INIT(name) -#endif - -#define __SEMAPHORE_INITIALIZER(name,count) \ -{ ATOMIC_INIT(count), 0, __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ - __SEM_DEBUG_INIT(name) } +#define __SEMAPHORE_INITIALIZER(name, n) \ +{ \ + .count = ATOMIC_INIT(n), \ + .sleepers = 0, \ + .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ +} #define __MUTEX_INITIALIZER(name) \ __SEMAPHORE_INITIALIZER(name,1) @@ -83,7 +50,7 @@ #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) #define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) -static __inline__ void sema_init (struct semaphore *sem, int val) +static inline void sema_init (struct semaphore *sem, int val) { /* * *sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val); @@ -94,17 +61,14 @@ atomic_set(&sem->count, val); sem->sleepers = 0; init_waitqueue_head(&sem->wait); -#ifdef WAITQUEUE_DEBUG - sem->__magic = (int)&sem->__magic; -#endif } -static __inline__ void init_MUTEX (struct semaphore *sem) +static inline void init_MUTEX (struct semaphore *sem) { sema_init(sem, 1); } -static __inline__ void init_MUTEX_LOCKED (struct semaphore *sem) +static inline void init_MUTEX_LOCKED (struct semaphore *sem) { sema_init(sem, 0); } @@ -120,19 +84,15 @@ asmlinkage void __up(struct semaphore * sem); /* - * This is ugly, but we want the default case to fall through. - * "__down_failed" is a special asm handler that calls the C - * routine that actually waits. See arch/i386/kernel/semaphore.c + * Atomically decrement the semaphore's count. If it goes negative, + * block the calling thread in the TASK_UNINTERRUPTIBLE state. */ -static __inline__ void down(struct semaphore * sem) +static inline void down(struct semaphore * sem) { unsigned long flags; - int temp; - -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif + long count; + might_sleep(); local_irq_save(flags); __asm__ __volatile__ ( "# down \n\t" @@ -140,7 +100,7 @@ LOAD" %0, @%1; \n\t" "addi %0, #-1; \n\t" STORE" %0, @%1; \n\t" - : "=&r" (temp) + : "=&r" (count) : "r" (&sem->count) : "memory" #ifdef CONFIG_CHIP_M32700_TS1 @@ -149,7 +109,7 @@ ); local_irq_restore(flags); - if (temp < 0) + if (unlikely(count < 0)) __down(sem); } @@ -157,16 +117,13 @@ * Interruptible try to acquire a semaphore. If we obtained * it, return zero. If we were interrupted, returns -EINTR */ -static __inline__ int down_interruptible(struct semaphore * sem) +static inline int down_interruptible(struct semaphore * sem) { unsigned long flags; - int temp; + long count; int result = 0; -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif - + might_sleep(); local_irq_save(flags); __asm__ __volatile__ ( "# down_interruptible \n\t" @@ -174,7 +131,7 @@ LOAD" %0, @%1; \n\t" "addi %0, #-1; \n\t" STORE" %0, @%1; \n\t" - : "=&r" (temp) + : "=&r" (count) : "r" (&sem->count) : "memory" #ifdef CONFIG_CHIP_M32700_TS1 @@ -183,7 +140,7 @@ ); local_irq_restore(flags); - if (temp < 0) + if (unlikely(count < 0)) result = __down_interruptible(sem); return result; @@ -193,16 +150,12 @@ * Non-blockingly attempt to down() a semaphore. * Returns zero if we acquired it */ -static __inline__ int down_trylock(struct semaphore * sem) +static inline int down_trylock(struct semaphore * sem) { unsigned long flags; - int temp; + long count; int result = 0; -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif - local_irq_save(flags); __asm__ __volatile__ ( "# down_trylock \n\t" @@ -210,7 +163,7 @@ LOAD" %0, @%1; \n\t" "addi %0, #-1; \n\t" STORE" %0, @%1; \n\t" - : "=&r" (temp) + : "=&r" (count) : "r" (&sem->count) : "memory" #ifdef CONFIG_CHIP_M32700_TS1 @@ -219,7 +172,7 @@ ); local_irq_restore(flags); - if (temp < 0) + if (unlikely(count < 0)) result = __down_trylock(sem); return result; @@ -231,14 +184,10 @@ * The default case (no contention) will result in NO * jumps for both down() and up(). */ -static __inline__ void up(struct semaphore * sem) +static inline void up(struct semaphore * sem) { unsigned long flags; - int temp; - -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif + long count; local_irq_save(flags); __asm__ __volatile__ ( @@ -247,7 +196,7 @@ LOAD" %0, @%1; \n\t" "addi %0, #1; \n\t" STORE" %0, @%1; \n\t" - : "=&r" (temp) + : "=&r" (count) : "r" (&sem->count) : "memory" #ifdef CONFIG_CHIP_M32700_TS1 @@ -256,11 +205,10 @@ ); local_irq_restore(flags); - if (temp <= 0) + if (unlikely(count <= 0)) __up(sem); } #endif /* __KERNEL__ */ #endif /* _ASM_M32R_SEMAPHORE_H */ - diff -Nru a/include/asm-m32r/spinlock.h b/include/asm-m32r/spinlock.h --- a/include/asm-m32r/spinlock.h 2004-10-03 19:06:22 -07:00 +++ b/include/asm-m32r/spinlock.h 2004-10-03 19:06:22 -07:00 @@ -1,14 +1,12 @@ #ifndef _ASM_M32R_SPINLOCK_H #define _ASM_M32R_SPINLOCK_H -/* $Id$ */ - /* * linux/include/asm-m32r/spinlock.h - * orig : i386 2.4.10 * * M32R version: * Copyright (C) 2001, 2002 Hitoshi Yamamoto + * Copyright (C) 2004 Hirokazu Takata */ #include /* CONFIG_DEBUG_SPINLOCK, CONFIG_SMP */ @@ -41,6 +39,9 @@ #if SPINLOCK_DEBUG unsigned magic; #endif +#ifdef CONFIG_PREEMPT + unsigned int break_lock; +#endif } spinlock_t; #define SPINLOCK_MAGIC 0xdead4ead @@ -66,22 +67,17 @@ #define spin_unlock_wait(x) do { barrier(); } while(spin_is_locked(x)) #define _raw_spin_lock_flags(lock, flags) _raw_spin_lock(lock) -/* - * This works. Despite all the confusion. +/** + * _raw_spin_trylock - Try spin lock and return a result + * @lock: Pointer to the lock variable + * + * _raw_spin_trylock() tries to get the lock and returns a result. + * On the m32r, the result value is 1 (= Success) or 0 (= Failure). */ - -/*======================================================================* - * Try spin lock - *======================================================================* - * Argument: - * arg0: lock - * Return value: - * =1: Success - * =0: Failure - *======================================================================*/ -static __inline__ int _raw_spin_trylock(spinlock_t *lock) +static inline int _raw_spin_trylock(spinlock_t *lock) { int oldval; + unsigned long tmp1, tmp2; /* * lock->lock : =1 : unlock @@ -93,16 +89,16 @@ */ __asm__ __volatile__ ( "# spin_trylock \n\t" - "ldi r4, #0; \n\t" - "mvfc r5, psw; \n\t" + "ldi %1, #0; \n\t" + "mvfc %2, psw; \n\t" "clrpsw #0x40 -> nop; \n\t" - DCACHE_CLEAR("%0", "r6", "%1") - "lock %0, @%1; \n\t" - "unlock r4, @%1; \n\t" - "mvtc r5, psw; \n\t" - : "=&r" (oldval) + DCACHE_CLEAR("%0", "r6", "%3") + "lock %0, @%3; \n\t" + "unlock %1, @%3; \n\t" + "mvtc %2, psw; \n\t" + : "=&r" (oldval), "=&r" (tmp1), "=&r" (tmp2) : "r" (&lock->lock) - : "memory", "r4", "r5" + : "memory" #ifdef CONFIG_CHIP_M32700_TS1 , "r6" #endif /* CONFIG_CHIP_M32700_TS1 */ @@ -111,8 +107,10 @@ return (oldval > 0); } -static __inline__ void _raw_spin_lock(spinlock_t *lock) +static inline void _raw_spin_lock(spinlock_t *lock) { + unsigned long tmp0, tmp1; + #if SPINLOCK_DEBUG __label__ here; here: @@ -135,31 +133,31 @@ "# spin_lock \n\t" ".fillinsn \n" "1: \n\t" - "mvfc r5, psw; \n\t" + "mvfc %1, psw; \n\t" "clrpsw #0x40 -> nop; \n\t" - DCACHE_CLEAR("r4", "r6", "%0") - "lock r4, @%0; \n\t" - "addi r4, #-1; \n\t" - "unlock r4, @%0; \n\t" - "mvtc r5, psw; \n\t" - "bltz r4, 2f; \n\t" + DCACHE_CLEAR("%0", "r6", "%2") + "lock %0, @%2; \n\t" + "addi %0, #-1; \n\t" + "unlock %0, @%2; \n\t" + "mvtc %1, psw; \n\t" + "bltz %0, 2f; \n\t" LOCK_SECTION_START(".balign 4 \n\t") ".fillinsn \n" "2: \n\t" - "ld r4, @%0; \n\t" - "bgtz r4, 1b; \n\t" + "ld %0, @%2; \n\t" + "bgtz %0, 1b; \n\t" "bra 2b; \n\t" LOCK_SECTION_END - : /* no outputs */ + : "=&r" (tmp0), "=&r" (tmp1) : "r" (&lock->lock) - : "memory", "r4", "r5" + : "memory" #ifdef CONFIG_CHIP_M32700_TS1 , "r6" #endif /* CONFIG_CHIP_M32700_TS1 */ ); } -static __inline__ void _raw_spin_unlock(spinlock_t *lock) +static inline void _raw_spin_unlock(spinlock_t *lock) { #if SPINLOCK_DEBUG BUG_ON(lock->magic != SPINLOCK_MAGIC); @@ -184,6 +182,9 @@ #if SPINLOCK_DEBUG unsigned magic; #endif +#ifdef CONFIG_PREEMPT + unsigned int break_lock; +#endif } rwlock_t; #define RWLOCK_MAGIC 0xdeaf1eed @@ -211,8 +212,10 @@ */ /* the spinlock helpers are in arch/i386/kernel/semaphore.c */ -static __inline__ void _raw_read_lock(rwlock_t *rw) +static inline void _raw_read_lock(rwlock_t *rw) { + unsigned long tmp0, tmp1; + #if SPINLOCK_DEBUG BUG_ON(rw->magic != RWLOCK_MAGIC); #endif @@ -231,40 +234,42 @@ "# read_lock \n\t" ".fillinsn \n" "1: \n\t" - "mvfc r5, psw; \n\t" + "mvfc %1, psw; \n\t" "clrpsw #0x40 -> nop; \n\t" - DCACHE_CLEAR("r4", "r6", "%0") - "lock r4, @%0; \n\t" - "addi r4, #-1; \n\t" - "unlock r4, @%0; \n\t" - "mvtc r5, psw; \n\t" - "bltz r4, 2f; \n\t" + DCACHE_CLEAR("%0", "r6", "%2") + "lock %0, @%2; \n\t" + "addi %0, #-1; \n\t" + "unlock %0, @%2; \n\t" + "mvtc %1, psw; \n\t" + "bltz %0, 2f; \n\t" LOCK_SECTION_START(".balign 4 \n\t") ".fillinsn \n" "2: \n\t" "clrpsw #0x40 -> nop; \n\t" - DCACHE_CLEAR("r4", "r6", "%0") - "lock r4, @%0; \n\t" - "addi r4, #1; \n\t" - "unlock r4, @%0; \n\t" - "mvtc r5, psw; \n\t" + DCACHE_CLEAR("%0", "r6", "%2") + "lock %0, @%2; \n\t" + "addi %0, #1; \n\t" + "unlock %0, @%2; \n\t" + "mvtc %1, psw; \n\t" ".fillinsn \n" "3: \n\t" - "ld r4, @%0; \n\t" - "bgtz r4, 1b; \n\t" + "ld %0, @%2; \n\t" + "bgtz %0, 1b; \n\t" "bra 3b; \n\t" LOCK_SECTION_END - : /* no outputs */ + : "=&r" (tmp0), "=&r" (tmp1) : "r" (&rw->lock) - : "memory", "r4", "r5" + : "memory" #ifdef CONFIG_CHIP_M32700_TS1 , "r6" #endif /* CONFIG_CHIP_M32700_TS1 */ ); } -static __inline__ void _raw_write_lock(rwlock_t *rw) +static inline void _raw_write_lock(rwlock_t *rw) { + unsigned long tmp0, tmp1, tmp2; + #if SPINLOCK_DEBUG BUG_ON(rw->magic != RWLOCK_MAGIC); #endif @@ -281,85 +286,91 @@ */ __asm__ __volatile__ ( "# write_lock \n\t" - "seth r5, #high(" RW_LOCK_BIAS_STR "); \n\t" - "or3 r5, r5, #low(" RW_LOCK_BIAS_STR "); \n\t" + "seth %1, #high(" RW_LOCK_BIAS_STR "); \n\t" + "or3 %1, %1, #low(" RW_LOCK_BIAS_STR "); \n\t" ".fillinsn \n" "1: \n\t" - "mvfc r6, psw; \n\t" + "mvfc %2, psw; \n\t" "clrpsw #0x40 -> nop; \n\t" - DCACHE_CLEAR("r4", "r7", "%0") - "lock r4, @%0; \n\t" - "sub r4, r5; \n\t" - "unlock r4, @%0; \n\t" - "mvtc r6, psw; \n\t" - "bnez r4, 2f; \n\t" + DCACHE_CLEAR("%0", "r7", "%3") + "lock %0, @%3; \n\t" + "sub %0, %1; \n\t" + "unlock %0, @%3; \n\t" + "mvtc %2, psw; \n\t" + "bnez %0, 2f; \n\t" LOCK_SECTION_START(".balign 4 \n\t") ".fillinsn \n" "2: \n\t" "clrpsw #0x40 -> nop; \n\t" - DCACHE_CLEAR("r4", "r7", "%0") - "lock r4, @%0; \n\t" - "add r4, r5; \n\t" - "unlock r4, @%0; \n\t" - "mvtc r6, psw; \n\t" + DCACHE_CLEAR("%0", "r7", "%3") + "lock %0, @%3; \n\t" + "add %0, %1; \n\t" + "unlock %0, @%3; \n\t" + "mvtc %2, psw; \n\t" ".fillinsn \n" "3: \n\t" - "ld r4, @%0; \n\t" - "beq r4, r5, 1b; \n\t" + "ld %0, @%3; \n\t" + "beq %0, %1, 1b; \n\t" "bra 3b; \n\t" LOCK_SECTION_END - : /* no outputs */ + : "=&r" (tmp0), "=&r" (tmp1), "=&r" (tmp2) : "r" (&rw->lock) - : "memory", "r4", "r5", "r6" + : "memory" #ifdef CONFIG_CHIP_M32700_TS1 , "r7" #endif /* CONFIG_CHIP_M32700_TS1 */ ); } -static __inline__ void _raw_read_unlock(rwlock_t *rw) +static inline void _raw_read_unlock(rwlock_t *rw) { + unsigned long tmp0, tmp1; + __asm__ __volatile__ ( "# read_unlock \n\t" - "mvfc r5, psw; \n\t" + "mvfc %1, psw; \n\t" "clrpsw #0x40 -> nop; \n\t" - DCACHE_CLEAR("r4", "r6", "%0") - "lock r4, @%0; \n\t" - "addi r4, #1; \n\t" - "unlock r4, @%0; \n\t" - "mvtc r5, psw; \n\t" - : /* no outputs */ + DCACHE_CLEAR("%0", "r6", "%2") + "lock %0, @%2; \n\t" + "addi %0, #1; \n\t" + "unlock %0, @%2; \n\t" + "mvtc %1, psw; \n\t" + : "=&r" (tmp0), "=&r" (tmp1) : "r" (&rw->lock) - : "memory", "r4", "r5" + : "memory" #ifdef CONFIG_CHIP_M32700_TS1 , "r6" #endif /* CONFIG_CHIP_M32700_TS1 */ ); } -static __inline__ void _raw_write_unlock(rwlock_t *rw) +static inline void _raw_write_unlock(rwlock_t *rw) { + unsigned long tmp0, tmp1, tmp2; + __asm__ __volatile__ ( "# write_unlock \n\t" - "seth r5, #high(" RW_LOCK_BIAS_STR "); \n\t" - "or3 r5, r5, #low(" RW_LOCK_BIAS_STR "); \n\t" - "mvfc r6, psw; \n\t" + "seth %1, #high(" RW_LOCK_BIAS_STR "); \n\t" + "or3 %1, %1, #low(" RW_LOCK_BIAS_STR "); \n\t" + "mvfc %2, psw; \n\t" "clrpsw #0x40 -> nop; \n\t" - DCACHE_CLEAR("r4", "r7", "%0") - "lock r4, @%0; \n\t" - "add r4, r5; \n\t" - "unlock r4, @%0; \n\t" - "mvtc r6, psw; \n\t" - : /* no outputs */ + DCACHE_CLEAR("%0", "r7", "%3") + "lock %0, @%3; \n\t" + "add %0, %1; \n\t" + "unlock %0, @%3; \n\t" + "mvtc %2, psw; \n\t" + : "=&r" (tmp0), "=&r" (tmp1), "=&r" (tmp2) : "r" (&rw->lock) - : "memory", "r4", "r5", "r6" + : "memory" #ifdef CONFIG_CHIP_M32700_TS1 , "r7" #endif /* CONFIG_CHIP_M32700_TS1 */ ); } -static __inline__ int _raw_write_trylock(rwlock_t *lock) +#define _raw_read_trylock(lock) generic_raw_read_trylock(lock) + +static inline int _raw_write_trylock(rwlock_t *lock) { atomic_t *count = (atomic_t *)lock; if (atomic_sub_and_test(RW_LOCK_BIAS, count)) diff -Nru a/include/asm-mips/vr41xx/vrc4173.h b/include/asm-mips/vr41xx/vrc4173.h --- a/include/asm-mips/vr41xx/vrc4173.h 2004-10-03 19:06:22 -07:00 +++ b/include/asm-mips/vr41xx/vrc4173.h 2004-10-03 19:06:22 -07:00 @@ -48,6 +48,8 @@ /* * PCI I/O accesses */ +#ifdef CONFIG_VRC4173 + extern unsigned long vrc4173_io_offset; #define set_vrc4173_io_offset(offset) do { vrc4173_io_offset = (offset); } while (0) @@ -74,6 +76,34 @@ #define vrc4173_insw(port,addr,count) insw(vrc4173_io_offset+(port),(addr),(count)) #define vrc4173_insl(port,addr,count) insl(vrc4173_io_offset+(port),(addr),(count)) +#else + +#define set_vrc4173_io_offset(offset) do {} while (0) + +#define vrc4173_outb(val,port) do {} while (0) +#define vrc4173_outw(val,port) do {} while (0) +#define vrc4173_outl(val,port) do {} while (0) +#define vrc4173_outb_p(val,port) do {} while (0) +#define vrc4173_outw_p(val,port) do {} while (0) +#define vrc4173_outl_p(val,port) do {} while (0) + +#define vrc4173_inb(port) 0 +#define vrc4173_inw(port) 0 +#define vrc4173_inl(port) 0 +#define vrc4173_inb_p(port) 0 +#define vrc4173_inw_p(port) 0 +#define vrc4173_inl_p(port) 0 + +#define vrc4173_outsb(port,addr,count) do {} while (0) +#define vrc4173_outsw(port,addr,count) do {} while (0) +#define vrc4173_outsl(port,addr,count) do {} while (0) + +#define vrc4173_insb(port,addr,count) do {} while (0) +#define vrc4173_insw(port,addr,count) do {} while (0) +#define vrc4173_insl(port,addr,count) do {} while (0) + +#endif + /* * Clock Mask Unit */ @@ -92,9 +122,77 @@ VRC4173_48MHz_CLOCK, } vrc4173_clock_t; +#ifdef CONFIG_VRC4173 + extern void vrc4173_supply_clock(vrc4173_clock_t clock); extern void vrc4173_mask_clock(vrc4173_clock_t clock); +#else + +static inline void vrc4173_supply_clock(vrc4173_clock_t clock) {} +static inline void vrc4173_mask_clock(vrc4173_clock_t clock) {} + +#endif + +/* + * Interupt Control Unit + */ + +#define VRC4173_PIUINT_COMMAND 0x0040 +#define VRC4173_PIUINT_DATA 0x0020 +#define VRC4173_PIUINT_PAGE1 0x0010 +#define VRC4173_PIUINT_PAGE0 0x0008 +#define VRC4173_PIUINT_DATALOST 0x0004 +#define VRC4173_PIUINT_STATUSCHANGE 0x0001 + +#ifdef CONFIG_VRC4173 + +extern void vrc4173_enable_piuint(uint16_t mask); +extern void vrc4173_disable_piuint(uint16_t mask); + +#else + +static inline void vrc4173_enable_piuint(uint16_t mask) {} +static inline void vrc4173_disable_piuint(uint16_t mask) {} + +#endif + +#define VRC4173_AIUINT_INPUT_DMAEND 0x0800 +#define VRC4173_AIUINT_INPUT_DMAHALT 0x0400 +#define VRC4173_AIUINT_INPUT_DATALOST 0x0200 +#define VRC4173_AIUINT_INPUT_DATA 0x0100 +#define VRC4173_AIUINT_OUTPUT_DMAEND 0x0008 +#define VRC4173_AIUINT_OUTPUT_DMAHALT 0x0004 +#define VRC4173_AIUINT_OUTPUT_NODATA 0x0002 + +#ifdef CONFIG_VRC4173 + +extern void vrc4173_enable_aiuint(uint16_t mask); +extern void vrc4173_disable_aiuint(uint16_t mask); + +#else + +static inline void vrc4173_enable_aiuint(uint16_t mask) {} +static inline void vrc4173_disable_aiuint(uint16_t mask) {} + +#endif + +#define VRC4173_KIUINT_DATALOST 0x0004 +#define VRC4173_KIUINT_DATAREADY 0x0002 +#define VRC4173_KIUINT_SCAN 0x0001 + +#ifdef CONFIG_VRC4173 + +extern void vrc4173_enable_kiuint(uint16_t mask); +extern void vrc4173_disable_kiuint(uint16_t mask); + +#else + +static inline void vrc4173_enable_kiuint(uint16_t mask) {} +static inline void vrc4173_disable_kiuint(uint16_t mask) {} + +#endif + /* * General-Purpose I/O Unit */ @@ -109,6 +207,14 @@ GPIO_16_20PINS, } vrc4173_function_t; +#ifdef CONFIG_VRC4173 + extern void vrc4173_select_function(vrc4173_function_t function); + +#else + +static inline void vrc4173_select_function(vrc4173_function_t function) {} + +#endif #endif /* __NEC_VRC4173_H */ diff -Nru a/include/asm-ppc64/eeh.h b/include/asm-ppc64/eeh.h --- a/include/asm-ppc64/eeh.h 2004-10-03 19:06:22 -07:00 +++ b/include/asm-ppc64/eeh.h 2004-10-03 19:06:22 -07:00 @@ -71,16 +71,10 @@ /* * EEH_POSSIBLE_ERROR() -- test for possible MMIO failure. * - * Order this macro for performance. - * If EEH is off for a device and it is a memory BAR, ioremap will - * map it to the IOREGION. In this case addr == vaddr and since these - * should be in registers we compare them first. Next we check for - * ff's which indicates a (very) possible failure. - * * If this macro yields TRUE, the caller relays to eeh_check_failure() * which does further tests out of line. */ -#define EEH_POSSIBLE_IO_ERROR(val, type) ((val) == (type)~0) +#define EEH_POSSIBLE_ERROR(val, type) ((val) == (type)~0) /* * Reads from a device which has been isolated by EEH will return @@ -89,21 +83,13 @@ */ #define EEH_IO_ERROR_VALUE(size) (~0U >> ((4 - (size)) * 8)) -/* - * The vaddr will equal the addr if EEH checking is disabled for - * this device. This is because eeh_ioremap() will not have - * remapped to 0xA0, and thus both vaddr and addr will be 0xE0... - */ -#define EEH_POSSIBLE_ERROR(addr, vaddr, val, type) \ - ((vaddr) != (addr) && EEH_POSSIBLE_IO_ERROR(val, type)) - /* * MMIO read/write operations with EEH support. */ static inline u8 eeh_readb(const volatile void __iomem *addr) { volatile u8 *vaddr = (volatile u8 __force *) addr; u8 val = in_8(vaddr); - if (EEH_POSSIBLE_ERROR(addr, vaddr, val, u8)) + if (EEH_POSSIBLE_ERROR(val, u8)) return eeh_check_failure(addr, val); return val; } @@ -115,7 +101,7 @@ static inline u16 eeh_readw(const volatile void __iomem *addr) { volatile u16 *vaddr = (volatile u16 __force *) addr; u16 val = in_le16(vaddr); - if (EEH_POSSIBLE_ERROR(addr, vaddr, val, u16)) + if (EEH_POSSIBLE_ERROR(val, u16)) return eeh_check_failure(addr, val); return val; } @@ -126,7 +112,7 @@ static inline u16 eeh_raw_readw(const volatile void __iomem *addr) { volatile u16 *vaddr = (volatile u16 __force *) addr; u16 val = in_be16(vaddr); - if (EEH_POSSIBLE_ERROR(addr, vaddr, val, u16)) + if (EEH_POSSIBLE_ERROR(val, u16)) return eeh_check_failure(addr, val); return val; } @@ -138,7 +124,7 @@ static inline u32 eeh_readl(const volatile void __iomem *addr) { volatile u32 *vaddr = (volatile u32 __force *) addr; u32 val = in_le32(vaddr); - if (EEH_POSSIBLE_ERROR(addr, vaddr, val, u32)) + if (EEH_POSSIBLE_ERROR(val, u32)) return eeh_check_failure(addr, val); return val; } @@ -149,7 +135,7 @@ static inline u32 eeh_raw_readl(const volatile void __iomem *addr) { volatile u32 *vaddr = (volatile u32 __force *) addr; u32 val = in_be32(vaddr); - if (EEH_POSSIBLE_ERROR(addr, vaddr, val, u32)) + if (EEH_POSSIBLE_ERROR(val, u32)) return eeh_check_failure(addr, val); return val; } @@ -161,7 +147,7 @@ static inline u64 eeh_readq(const volatile void __iomem *addr) { volatile u64 *vaddr = (volatile u64 __force *) addr; u64 val = in_le64(vaddr); - if (EEH_POSSIBLE_ERROR(addr, vaddr, val, u64)) + if (EEH_POSSIBLE_ERROR(val, u64)) return eeh_check_failure(addr, val); return val; } @@ -172,7 +158,7 @@ static inline u64 eeh_raw_readq(const volatile void __iomem *addr) { volatile u64 *vaddr = (volatile u64 __force *) addr; u64 val = in_be64(vaddr); - if (EEH_POSSIBLE_ERROR(addr, vaddr, val, u64)) + if (EEH_POSSIBLE_ERROR(val, u64)) return eeh_check_failure(addr, val); return val; } @@ -209,7 +195,7 @@ } static inline void eeh_memcpy_fromio(void *dest, const volatile void __iomem *src, unsigned long n) { void *vsrc = (void __force *) src; - void *vsrcsave = vsrc, *destsave = dest; + void *destsave = dest; const volatile void __iomem *srcsave = src; unsigned long nsave = n; @@ -240,8 +226,7 @@ * were copied. Check all four bytes. */ if ((nsave >= 4) && - (EEH_POSSIBLE_ERROR(srcsave, vsrcsave, (*((u32 *) destsave+nsave-4)), - u32))) { + (EEH_POSSIBLE_ERROR((*((u32 *) destsave+nsave-4)), u32))) { eeh_check_failure(srcsave, (*((u32 *) destsave+nsave-4))); } } @@ -281,7 +266,7 @@ if (!_IO_IS_VALID(port)) return ~0; val = in_8((u8 *)(port+pci_io_base)); - if (EEH_POSSIBLE_IO_ERROR(val, u8)) + if (EEH_POSSIBLE_ERROR(val, u8)) return eeh_check_failure((void __iomem *)(port), val); return val; } @@ -296,7 +281,7 @@ if (!_IO_IS_VALID(port)) return ~0; val = in_le16((u16 *)(port+pci_io_base)); - if (EEH_POSSIBLE_IO_ERROR(val, u16)) + if (EEH_POSSIBLE_ERROR(val, u16)) return eeh_check_failure((void __iomem *)(port), val); return val; } @@ -311,7 +296,7 @@ if (!_IO_IS_VALID(port)) return ~0; val = in_le32((u32 *)(port+pci_io_base)); - if (EEH_POSSIBLE_IO_ERROR(val, u32)) + if (EEH_POSSIBLE_ERROR(val, u32)) return eeh_check_failure((void __iomem *)(port), val); return val; } @@ -324,19 +309,19 @@ /* in-string eeh macros */ static inline void eeh_insb(unsigned long port, void * buf, int ns) { _insb((u8 *)(port+pci_io_base), buf, ns); - if (EEH_POSSIBLE_IO_ERROR((*(((u8*)buf)+ns-1)), u8)) + if (EEH_POSSIBLE_ERROR((*(((u8*)buf)+ns-1)), u8)) eeh_check_failure((void __iomem *)(port), *(u8*)buf); } static inline void eeh_insw_ns(unsigned long port, void * buf, int ns) { _insw_ns((u16 *)(port+pci_io_base), buf, ns); - if (EEH_POSSIBLE_IO_ERROR((*(((u16*)buf)+ns-1)), u16)) + if (EEH_POSSIBLE_ERROR((*(((u16*)buf)+ns-1)), u16)) eeh_check_failure((void __iomem *)(port), *(u16*)buf); } static inline void eeh_insl_ns(unsigned long port, void * buf, int nl) { _insl_ns((u32 *)(port+pci_io_base), buf, nl); - if (EEH_POSSIBLE_IO_ERROR((*(((u32*)buf)+nl-1)), u32)) + if (EEH_POSSIBLE_ERROR((*(((u32*)buf)+nl-1)), u32)) eeh_check_failure((void __iomem *)(port), *(u32*)buf); } diff -Nru a/include/asm-ppc64/mmu.h b/include/asm-ppc64/mmu.h --- a/include/asm-ppc64/mmu.h 2004-10-03 19:06:22 -07:00 +++ b/include/asm-ppc64/mmu.h 2004-10-03 19:06:22 -07:00 @@ -202,7 +202,7 @@ #define SLB_VSID_KERNEL (SLB_VSID_KP|SLB_VSID_C) #define SLB_VSID_USER (SLB_VSID_KP|SLB_VSID_KS) -#define VSID_MULTIPLIER ASM_CONST(268435399) /* largest 28-bit prime */ +#define VSID_MULTIPLIER ASM_CONST(200730139) /* 28-bit prime */ #define VSID_BITS 36 #define VSID_MODULUS ((1UL< +#include #define LAST_DEVICE_VECTOR 232 #define MSI_DEST_MODE MSI_LOGICAL_MODE #define MSI_TARGET_CPU_SHIFT 12 -#define MSI_TARGET_CPU TARGET_CPUS +#define MSI_TARGET_CPU logical_smp_processor_id() #endif /* ASM_MSI_H */ diff -Nru a/include/asm-x86_64/smp.h b/include/asm-x86_64/smp.h --- a/include/asm-x86_64/smp.h 2004-10-03 19:06:21 -07:00 +++ b/include/asm-x86_64/smp.h 2004-10-03 19:06:21 -07:00 @@ -133,5 +133,13 @@ }) #endif +#ifndef __ASSEMBLY__ +static __inline int logical_smp_processor_id(void) +{ + /* we don't want to mark this access volatile - bad code generation */ + return GET_APIC_LOGICAL_ID(*(unsigned long *)(APIC_BASE+APIC_LDR)); +} +#endif + #endif diff -Nru a/include/linux/cyclades.h b/include/linux/cyclades.h --- a/include/linux/cyclades.h 2004-10-03 19:06:22 -07:00 +++ b/include/linux/cyclades.h 2004-10-03 19:06:22 -07:00 @@ -511,8 +511,8 @@ struct cyclades_card { unsigned long base_phys; unsigned long ctl_phys; - unsigned long base_addr; - unsigned long ctl_addr; + void __iomem *base_addr; + void __iomem *ctl_addr; int irq; int num_chips; /* 0 if card absent, -1 if Z/PCI, else Y */ int first_line; /* minor number of first channel on card */ @@ -539,9 +539,9 @@ * (required to support Alpha systems) * ***************************************/ -#define cy_writeb(port,val) {writeb((ucchar)(val),(ulong)(port)); mb();} -#define cy_writew(port,val) {writew((ushort)(val),(ulong)(port)); mb();} -#define cy_writel(port,val) {writel((uclong)(val),(ulong)(port)); mb();} +#define cy_writeb(port,val) {writeb((val),(port)); mb();} +#define cy_writew(port,val) {writew((val),(port)); mb();} +#define cy_writel(port,val) {writel((val),(port)); mb();} #define cy_readb(port) readb(port) #define cy_readw(port) readw(port) diff -Nru a/include/linux/ide.h b/include/linux/ide.h --- a/include/linux/ide.h 2004-10-03 19:06:21 -07:00 +++ b/include/linux/ide.h 2004-10-03 19:06:21 -07:00 @@ -52,13 +52,6 @@ #define OK_TO_RESET_CONTROLLER 1 /* 0 for use with AH2372A/B interface */ #endif -#ifdef CONFIG_BLK_DEV_CMD640 -#if 0 /* change to 1 when debugging cmd640 problems */ -void cmd640_dump_regs (void); -#define CMD640_DUMP_REGS cmd640_dump_regs() /* for debugging cmd640 chipset */ -#endif -#endif /* CONFIG_BLK_DEV_CMD640 */ - #ifndef DISABLE_IRQ_NOSYNC #define DISABLE_IRQ_NOSYNC 0 #endif diff -Nru a/include/linux/mman.h b/include/linux/mman.h --- a/include/linux/mman.h 2004-10-03 19:06:21 -07:00 +++ b/include/linux/mman.h 2004-10-03 19:06:21 -07:00 @@ -10,6 +10,9 @@ #define MREMAP_MAYMOVE 1 #define MREMAP_FIXED 2 +#define OVERCOMMIT_GUESS 0 +#define OVERCOMMIT_ALWAYS 1 +#define OVERCOMMIT_NEVER 2 extern int sysctl_overcommit_memory; extern int sysctl_overcommit_ratio; extern atomic_t vm_committed_space; diff -Nru a/include/linux/notifier.h b/include/linux/notifier.h --- a/include/linux/notifier.h 2004-10-03 19:06:21 -07:00 +++ b/include/linux/notifier.h 2004-10-03 19:06:21 -07:00 @@ -29,6 +29,10 @@ #define NOTIFY_OK 0x0001 /* Suits me */ #define NOTIFY_STOP_MASK 0x8000 /* Don't call further */ #define NOTIFY_BAD (NOTIFY_STOP_MASK|0x0002) /* Bad/Veto action */ +/* + * Clean way to return from the notifier and stop further calls. + */ +#define NOTIFY_STOP (NOTIFY_OK|NOTIFY_STOP_MASK) /* * Declared notifiers so far. I can imagine quite a few more chains diff -Nru a/include/linux/sysctl.h b/include/linux/sysctl.h --- a/include/linux/sysctl.h 2004-10-03 19:06:21 -07:00 +++ b/include/linux/sysctl.h 2004-10-03 19:06:21 -07:00 @@ -341,6 +341,7 @@ NET_TCP_BIC_LOW_WINDOW=104, NET_TCP_DEFAULT_WIN_SCALE=105, NET_TCP_MODERATE_RCVBUF=106, + NET_TCP_TSO_WIN_DIVISOR=107, }; enum { diff -Nru a/include/linux/time.h b/include/linux/time.h --- a/include/linux/time.h 2004-10-03 19:06:22 -07:00 +++ b/include/linux/time.h 2004-10-03 19:06:22 -07:00 @@ -208,6 +208,8 @@ static inline unsigned long msecs_to_jiffies(const unsigned int m) { + if (m > jiffies_to_msecs(MAX_JIFFY_OFFSET)) + return MAX_JIFFY_OFFSET; #if HZ <= 1000 && !(1000 % HZ) return (m + (1000 / HZ) - 1) / (1000 / HZ); #elif HZ > 1000 && !(HZ % 1000) diff -Nru a/include/linux/timex.h b/include/linux/timex.h --- a/include/linux/timex.h 2004-10-03 19:06:21 -07:00 +++ b/include/linux/timex.h 2004-10-03 19:06:21 -07:00 @@ -55,10 +55,8 @@ #include #include -#include #include -#include /* * The following defines establish the engineering parameters of the PLL diff -Nru a/include/linux/tty.h b/include/linux/tty.h --- a/include/linux/tty.h 2004-10-03 19:06:21 -07:00 +++ b/include/linux/tty.h 2004-10-03 19:06:21 -07:00 @@ -244,6 +244,7 @@ struct tty_driver *driver; int index; struct tty_ldisc ldisc; + struct semaphore termios_sem; struct termios *termios, *termios_locked; char name[64]; int pgrp; diff -Nru a/include/net/tcp.h b/include/net/tcp.h --- a/include/net/tcp.h 2004-10-03 19:06:21 -07:00 +++ b/include/net/tcp.h 2004-10-03 19:06:21 -07:00 @@ -609,6 +609,7 @@ extern int sysctl_tcp_bic_fast_convergence; extern int sysctl_tcp_bic_low_window; extern int sysctl_tcp_moderate_rcvbuf; +extern int sysctl_tcp_tso_win_divisor; extern atomic_t tcp_memory_allocated; extern atomic_t tcp_sockets_allocated; @@ -944,6 +945,7 @@ extern int tcp_retransmit_skb(struct sock *, struct sk_buff *); extern void tcp_xmit_retransmit_queue(struct sock *); extern void tcp_simple_retransmit(struct sock *); +extern int tcp_trim_head(struct sock *, struct sk_buff *, u32); extern void tcp_send_probe0(struct sock *); extern void tcp_send_partial(struct sock *); @@ -1150,8 +1152,6 @@ __u16 urg_ptr; /* Valid w/URG flags is set. */ __u32 ack_seq; /* Sequence number ACK'd */ - __u16 tso_factor; /* If > 1, TSO frame */ - __u16 tso_mss; /* MSS that FACTOR's in terms of*/ }; #define TCP_SKB_CB(__skb) ((struct tcp_skb_cb *)&((__skb)->cb[0])) @@ -1163,7 +1163,13 @@ */ static inline int tcp_skb_pcount(struct sk_buff *skb) { - return TCP_SKB_CB(skb)->tso_factor; + return skb_shinfo(skb)->tso_segs; +} + +/* This is valid iff tcp_skb_pcount() > 1. */ +static inline int tcp_skb_psize(struct sk_buff *skb) +{ + return skb_shinfo(skb)->tso_size; } static inline void tcp_inc_pcount(tcp_pcount_t *count, struct sk_buff *skb) @@ -1438,7 +1444,7 @@ tcp_minshall_check(tp)))); } -extern void tcp_set_skb_tso_factor(struct sk_buff *, unsigned int); +extern void tcp_set_skb_tso_segs(struct sk_buff *, unsigned int); /* This checks if the data bearing packet SKB (usually sk->sk_send_head) * should be put on the wire right now. @@ -1446,11 +1452,11 @@ static __inline__ int tcp_snd_test(struct tcp_opt *tp, struct sk_buff *skb, unsigned cur_mss, int nonagle) { - int pkts = TCP_SKB_CB(skb)->tso_factor; + int pkts = tcp_skb_pcount(skb); if (!pkts) { - tcp_set_skb_tso_factor(skb, tp->mss_cache_std); - pkts = TCP_SKB_CB(skb)->tso_factor; + tcp_set_skb_tso_segs(skb, tp->mss_cache_std); + pkts = tcp_skb_pcount(skb); } /* RFC 1122 - section 4.2.3.4 diff -Nru a/kernel/cpu.c b/kernel/cpu.c --- a/kernel/cpu.c 2004-10-03 19:06:22 -07:00 +++ b/kernel/cpu.c 2004-10-03 19:06:22 -07:00 @@ -61,13 +61,13 @@ * cpu' with certain environment variables set. */ static int cpu_run_sbin_hotplug(unsigned int cpu, const char *action) { - char *argv[3], *envp[5], cpu_str[12], action_str[32]; + char *argv[3], *envp[6], cpu_str[12], action_str[32], devpath_str[40]; int i; sprintf(cpu_str, "CPU=%d", cpu); sprintf(action_str, "ACTION=%s", action); - /* FIXME: Add DEVPATH. --RR */ - + sprintf(devpath_str, "DEVPATH=devices/system/cpu/cpu%d", cpu); + i = 0; argv[i++] = hotplug_path; argv[i++] = "cpu"; @@ -79,6 +79,7 @@ envp[i++] = "PATH=/sbin:/bin:/usr/sbin:/usr/bin"; envp[i++] = cpu_str; envp[i++] = action_str; + envp[i++] = devpath_str; envp[i] = NULL; return call_usermodehelper(argv[0], argv, envp, 0); diff -Nru a/kernel/kprobes.c b/kernel/kprobes.c --- a/kernel/kprobes.c 2004-10-03 19:06:22 -07:00 +++ b/kernel/kprobes.c 2004-10-03 19:06:22 -07:00 @@ -25,6 +25,8 @@ * hlists and exceptions notifier as suggested by Andi Kleen. * 2004-July Suparna Bhattacharya added jumper probes * interface to access function arguments. + * 2004-Sep Prasanna S Panchamukhi Changed Kprobes + * exceptions notifier to be first on the priority list. */ #include #include @@ -108,6 +110,7 @@ static struct notifier_block kprobe_exceptions_nb = { .notifier_call = kprobe_exceptions_notify, + .priority = 0x7fffffff /* we need to notified first */ }; int register_jprobe(struct jprobe *jp) diff -Nru a/kernel/power/swsusp.c b/kernel/power/swsusp.c --- a/kernel/power/swsusp.c 2004-10-03 19:06:21 -07:00 +++ b/kernel/power/swsusp.c 2004-10-03 19:06:21 -07:00 @@ -856,7 +856,9 @@ local_irq_disable(); save_processor_state(); error = swsusp_arch_suspend(); + /* Restore control flow magically appears here */ restore_processor_state(); + restore_highmem(); local_irq_enable(); return error; } @@ -876,8 +878,13 @@ { int error; local_irq_disable(); + /* We'll ignore saved state, but this gets preempt count (etc) right */ save_processor_state(); error = swsusp_arch_resume(); + /* Code below is only ever reached in case of failure. Otherwise + * execution continues at place where swsusp_arch_suspend was called + */ + BUG_ON(!error); restore_processor_state(); restore_highmem(); local_irq_enable(); diff -Nru a/kernel/timer.c b/kernel/timer.c --- a/kernel/timer.c 2004-10-03 19:06:22 -07:00 +++ b/kernel/timer.c 2004-10-03 19:06:22 -07:00 @@ -36,6 +36,7 @@ #include #include #include +#include #ifdef CONFIG_TIME_INTERPOLATION static void time_interpolator_update(long delta_nsec); @@ -1624,13 +1625,13 @@ */ unsigned long msleep_interruptible(unsigned int msecs) { - unsigned long timeout = msecs_to_jiffies(msecs); + unsigned long timeout = msecs_to_jiffies(msecs); - while (timeout && !signal_pending(current)) { - set_current_state(TASK_INTERRUPTIBLE); - timeout = schedule_timeout(timeout); - } - return jiffies_to_msecs(timeout); + while (timeout && !signal_pending(current)) { + set_current_state(TASK_INTERRUPTIBLE); + timeout = schedule_timeout(timeout); + } + return jiffies_to_msecs(timeout); } EXPORT_SYMBOL(msleep_interruptible); diff -Nru a/mm/mlock.c b/mm/mlock.c --- a/mm/mlock.c 2004-10-03 19:06:21 -07:00 +++ b/mm/mlock.c 2004-10-03 19:06:21 -07:00 @@ -60,8 +60,6 @@ struct vm_area_struct * vma, * next; int error; - if (on && !can_do_mlock()) - return -EPERM; len = PAGE_ALIGN(len); end = start + len; if (end < start) @@ -107,6 +105,9 @@ unsigned long lock_limit; int error = -ENOMEM; + if (!can_do_mlock()) + return -EPERM; + down_write(¤t->mm->mmap_sem); len = PAGE_ALIGN(len + (start & ~PAGE_MASK)); start &= PAGE_MASK; @@ -118,7 +119,7 @@ lock_limit >>= PAGE_SHIFT; /* check against resource limits */ - if ( (locked <= lock_limit) || capable(CAP_IPC_LOCK)) + if ((locked <= lock_limit) || capable(CAP_IPC_LOCK)) error = do_mlock(start, len, 1); up_write(¤t->mm->mmap_sem); return error; @@ -138,19 +139,15 @@ static int do_mlockall(int flags) { - int error; - unsigned int def_flags; struct vm_area_struct * vma; + unsigned int def_flags = 0; - if (!can_do_mlock()) - return -EPERM; - - def_flags = 0; if (flags & MCL_FUTURE) def_flags = VM_LOCKED; current->mm->def_flags = def_flags; + if (flags == MCL_FUTURE) + goto out; - error = 0; for (vma = current->mm->mmap; vma ; vma = vma->vm_next) { unsigned int newflags; @@ -161,7 +158,8 @@ /* Ignore errors */ mlock_fixup(vma, vma->vm_start, vma->vm_end, newflags); } - return error; +out: + return 0; } asmlinkage long sys_mlockall(int flags) @@ -169,18 +167,24 @@ unsigned long lock_limit; int ret = -EINVAL; - down_write(¤t->mm->mmap_sem); if (!flags || (flags & ~(MCL_CURRENT | MCL_FUTURE))) goto out; + ret = -EPERM; + if (!can_do_mlock()) + goto out; + + down_write(¤t->mm->mmap_sem); + lock_limit = current->rlim[RLIMIT_MEMLOCK].rlim_cur; lock_limit >>= PAGE_SHIFT; ret = -ENOMEM; - if ((current->mm->total_vm <= lock_limit) || capable(CAP_IPC_LOCK)) + if (!(flags & MCL_CURRENT) || (current->mm->total_vm <= lock_limit) || + capable(CAP_IPC_LOCK)) ret = do_mlockall(flags); -out: up_write(¤t->mm->mmap_sem); +out: return ret; } diff -Nru a/mm/mmap.c b/mm/mmap.c --- a/mm/mmap.c 2004-10-03 19:06:22 -07:00 +++ b/mm/mmap.c 2004-10-03 19:06:22 -07:00 @@ -54,7 +54,7 @@ __S000, __S001, __S010, __S011, __S100, __S101, __S110, __S111 }; -int sysctl_overcommit_memory = 0; /* default is heuristic overcommit */ +int sysctl_overcommit_memory = OVERCOMMIT_GUESS; /* heuristic overcommit */ int sysctl_overcommit_ratio = 50; /* default is 50% */ int sysctl_max_map_count = DEFAULT_MAX_MAP_COUNT; atomic_t vm_committed_space = ATOMIC_INIT(0); @@ -907,7 +907,7 @@ return -ENOMEM; if (accountable && (!(flags & MAP_NORESERVE) || - sysctl_overcommit_memory > 1)) { + sysctl_overcommit_memory == OVERCOMMIT_NEVER)) { if (vm_flags & VM_SHARED) { /* Check memory availability in shmem_file_setup? */ vm_flags |= VM_ACCOUNT; diff -Nru a/mm/nommu.c b/mm/nommu.c --- a/mm/nommu.c 2004-10-03 19:06:22 -07:00 +++ b/mm/nommu.c 2004-10-03 19:06:22 -07:00 @@ -30,7 +30,7 @@ unsigned long num_physpages; unsigned long askedalloc, realalloc; atomic_t vm_committed_space = ATOMIC_INIT(0); -int sysctl_overcommit_memory; /* default is heuristic overcommit */ +int sysctl_overcommit_memory = OVERCOMMIT_GUESS; /* heuristic overcommit */ int sysctl_overcommit_ratio = 50; /* default is 50% */ int sysctl_max_map_count = DEFAULT_MAX_MAP_COUNT; diff -Nru a/mm/vmscan.c b/mm/vmscan.c --- a/mm/vmscan.c 2004-10-03 19:06:21 -07:00 +++ b/mm/vmscan.c 2004-10-03 19:06:21 -07:00 @@ -968,12 +968,16 @@ static int balance_pgdat(pg_data_t *pgdat, int nr_pages) { int to_free = nr_pages; + int all_zones_ok; int priority; int i; - int total_scanned = 0, total_reclaimed = 0; + int total_scanned, total_reclaimed; struct reclaim_state *reclaim_state = current->reclaim_state; struct scan_control sc; +loop_again: + total_scanned = 0; + total_reclaimed = 0; sc.gfp_mask = GFP_KERNEL; sc.may_writepage = 0; sc.nr_mapped = read_page_state(nr_mapped); @@ -987,10 +991,11 @@ } for (priority = DEF_PRIORITY; priority >= 0; priority--) { - int all_zones_ok = 1; int end_zone = 0; /* Inclusive. 0 = ZONE_DMA */ unsigned long lru_pages = 0; + all_zones_ok = 1; + if (nr_pages == 0) { /* * Scan in the highmem->dma direction for the highest @@ -1072,6 +1077,15 @@ */ if (total_scanned && priority < DEF_PRIORITY - 2) blk_congestion_wait(WRITE, HZ/10); + + /* + * We do this so kswapd doesn't build up large priorities for + * example when it is freeing in parallel with allocators. It + * matches the direct reclaim path behaviour in terms of impact + * on zone->*_priority. + */ + if (total_reclaimed >= SWAP_CLUSTER_MAX) + break; } out: for (i = 0; i < pgdat->nr_zones; i++) { @@ -1079,6 +1093,9 @@ zone->prev_priority = zone->temp_priority; } + if (!all_zones_ok) + goto loop_again; + return total_reclaimed; } diff -Nru a/net/atm/clip.c b/net/atm/clip.c --- a/net/atm/clip.c 2004-10-03 19:06:22 -07:00 +++ b/net/atm/clip.c 2004-10-03 19:06:22 -07:00 @@ -984,19 +984,7 @@ static int __init atm_clip_init(void) { - /* we should use neigh_table_init() */ - clip_tbl.lock = RW_LOCK_UNLOCKED; - clip_tbl.kmem_cachep = kmem_cache_create(clip_tbl.id, - clip_tbl.entry_size, 0, SLAB_HWCACHE_ALIGN, NULL, NULL); - - if (!clip_tbl.kmem_cachep) - return -ENOMEM; - - /* so neigh_ifdown() doesn't complain */ - clip_tbl.proxy_timer.data = 0; - clip_tbl.proxy_timer.function = NULL; - init_timer(&clip_tbl.proxy_timer); - skb_queue_head_init(&clip_tbl.proxy_queue); + neigh_table_init(&clip_tbl); clip_tbl_hook = &clip_tbl; register_atm_ioctl(&clip_ioctl_ops); @@ -1022,7 +1010,18 @@ deregister_atm_ioctl(&clip_ioctl_ops); + /* First, stop the idle timer, so it stops banging + * on the table. + */ + if (start_timer == 0) + del_timer(&idle_timer); + + /* Next, purge the table, so that the device + * unregister loop below does not hang due to + * device references remaining in the table. + */ neigh_ifdown(&clip_tbl, NULL); + dev = clip_devs; while (dev) { next = PRIV(dev)->next; @@ -1030,9 +1029,9 @@ free_netdev(dev); dev = next; } - if (start_timer == 0) del_timer(&idle_timer); - kmem_cache_destroy(clip_tbl.kmem_cachep); + /* Now it is safe to fully shutdown whole table. */ + neigh_table_clear(&clip_tbl); clip_tbl_hook = NULL; } diff -Nru a/net/core/neighbour.c b/net/core/neighbour.c --- a/net/core/neighbour.c 2004-10-03 19:06:21 -07:00 +++ b/net/core/neighbour.c 2004-10-03 19:06:21 -07:00 @@ -496,8 +496,12 @@ memcpy(n->key, pkey, key_len); n->dev = dev; + if (dev) + dev_hold(dev); if (tbl->pconstructor && tbl->pconstructor(n)) { + if (dev) + dev_put(dev); kfree(n); n = NULL; goto out; @@ -532,6 +536,8 @@ write_unlock_bh(&tbl->lock); if (tbl->pdestructor) tbl->pdestructor(n); + if (n->dev) + dev_put(n->dev); kfree(n); return 0; } @@ -552,6 +558,8 @@ *np = n->next; if (tbl->pdestructor) tbl->pdestructor(n); + if (n->dev) + dev_put(n->dev); kfree(n); continue; } diff -Nru a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c --- a/net/ipv4/ip_output.c 2004-10-03 19:06:22 -07:00 +++ b/net/ipv4/ip_output.c 2004-10-03 19:06:22 -07:00 @@ -305,7 +305,6 @@ struct ip_options *opt = inet->opt; struct rtable *rt; struct iphdr *iph; - u32 mtu; /* Skip all of this if the packet is already routed, * f.e. by something like SCTP. @@ -366,21 +365,9 @@ skb->nh.iph = iph; /* Transport layer set skb->h.foo itself. */ - if(opt && opt->optlen) { + if (opt && opt->optlen) { iph->ihl += opt->optlen >> 2; ip_options_build(skb, opt, inet->daddr, rt, 0); - } - - mtu = dst_pmtu(&rt->u.dst); - if (skb->len > mtu && (sk->sk_route_caps & NETIF_F_TSO)) { - unsigned int hlen; - - /* Hack zone: all this must be done by TCP. */ - hlen = ((skb->h.raw - skb->data) + (skb->h.th->doff << 2)); - skb_shinfo(skb)->tso_size = mtu - hlen; - skb_shinfo(skb)->tso_segs = - (skb->len - hlen + skb_shinfo(skb)->tso_size - 1)/ - skb_shinfo(skb)->tso_size - 1; } ip_select_ident_more(iph, &rt->u.dst, sk, skb_shinfo(skb)->tso_segs); diff -Nru a/net/ipv4/netfilter/ip_nat_helper.c b/net/ipv4/netfilter/ip_nat_helper.c --- a/net/ipv4/netfilter/ip_nat_helper.c 2004-10-03 19:06:21 -07:00 +++ b/net/ipv4/netfilter/ip_nat_helper.c 2004-10-03 19:06:21 -07:00 @@ -347,7 +347,7 @@ return 1; } -/* TCP sequence number adjustment. Returns true or false. */ +/* TCP sequence number adjustment. Returns 1 on success, 0 on failure */ int ip_nat_seq_adjust(struct sk_buff **pskb, struct ip_conntrack *ct, @@ -396,7 +396,12 @@ tcph->seq = newseq; tcph->ack_seq = newack; - return ip_nat_sack_adjust(pskb, tcph, ct, ctinfo); + if (!ip_nat_sack_adjust(pskb, tcph, ct, ctinfo)) + return 0; + + ip_conntrack_tcp_update(*pskb, ct, dir); + + return 1; } static inline int diff -Nru a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c --- a/net/ipv4/sysctl_net_ipv4.c 2004-10-03 19:06:22 -07:00 +++ b/net/ipv4/sysctl_net_ipv4.c 2004-10-03 19:06:22 -07:00 @@ -674,6 +674,14 @@ .mode = 0644, .proc_handler = &proc_dointvec, }, + { + .ctl_name = NET_TCP_TSO_WIN_DIVISOR, + .procname = "tcp_tso_win_divisor", + .data = &sysctl_tcp_tso_win_divisor, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, { .ctl_name = 0 } }; diff -Nru a/net/ipv4/tcp.c b/net/ipv4/tcp.c --- a/net/ipv4/tcp.c 2004-10-03 19:06:21 -07:00 +++ b/net/ipv4/tcp.c 2004-10-03 19:06:21 -07:00 @@ -691,7 +691,7 @@ skb->ip_summed = CHECKSUM_HW; tp->write_seq += copy; TCP_SKB_CB(skb)->end_seq += copy; - TCP_SKB_CB(skb)->tso_factor = 0; + skb_shinfo(skb)->tso_segs = 0; if (!copied) TCP_SKB_CB(skb)->flags &= ~TCPCB_FLAG_PSH; @@ -938,7 +938,7 @@ tp->write_seq += copy; TCP_SKB_CB(skb)->end_seq += copy; - TCP_SKB_CB(skb)->tso_factor = 0; + skb_shinfo(skb)->tso_segs = 0; from += copy; copied += copy; diff -Nru a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c --- a/net/ipv4/tcp_input.c 2004-10-03 19:06:22 -07:00 +++ b/net/ipv4/tcp_input.c 2004-10-03 19:06:22 -07:00 @@ -1035,7 +1035,7 @@ if(!before(TCP_SKB_CB(skb)->seq, end_seq)) break; - fack_count += TCP_SKB_CB(skb)->tso_factor; + fack_count += tcp_skb_pcount(skb); in_sack = !after(start_seq, TCP_SKB_CB(skb)->seq) && !before(end_seq, TCP_SKB_CB(skb)->end_seq); @@ -1224,7 +1224,7 @@ tcp_set_pcount(&tp->fackets_out, 0); sk_stream_for_retrans_queue(skb, sk) { - cnt += TCP_SKB_CB(skb)->tso_factor;; + cnt += tcp_skb_pcount(skb); TCP_SKB_CB(skb)->sacked &= ~TCPCB_LOST; if (!(TCP_SKB_CB(skb)->sacked&TCPCB_SACKED_ACKED)) { @@ -1299,7 +1299,7 @@ tp->undo_marker = tp->snd_una; sk_stream_for_retrans_queue(skb, sk) { - cnt += TCP_SKB_CB(skb)->tso_factor; + cnt += tcp_skb_pcount(skb); if (TCP_SKB_CB(skb)->sacked&TCPCB_RETRANS) tp->undo_marker = 0; TCP_SKB_CB(skb)->sacked &= (~TCPCB_TAGBITS)|TCPCB_SACKED_ACKED; @@ -1550,7 +1550,7 @@ BUG_TRAP(cnt <= tcp_get_pcount(&tp->packets_out)); sk_stream_for_retrans_queue(skb, sk) { - cnt -= TCP_SKB_CB(skb)->tso_factor; + cnt -= tcp_skb_pcount(skb); if (cnt < 0 || after(TCP_SKB_CB(skb)->end_seq, high_seq)) break; if (!(TCP_SKB_CB(skb)->sacked&TCPCB_TAGBITS)) { @@ -2364,13 +2364,14 @@ * then making a write space wakeup callback is a possible * future enhancement. WARNING: it is not trivial to make. */ -static int tcp_tso_acked(struct tcp_opt *tp, struct sk_buff *skb, +static int tcp_tso_acked(struct sock *sk, struct sk_buff *skb, __u32 now, __s32 *seq_rtt) { + struct tcp_opt *tp = tcp_sk(sk); struct tcp_skb_cb *scb = TCP_SKB_CB(skb); - __u32 mss = scb->tso_mss; + __u32 mss = tcp_skb_psize(skb); __u32 snd_una = tp->snd_una; - __u32 seq = scb->seq; + __u32 orig_seq, seq; __u32 packets_acked = 0; int acked = 0; @@ -2379,22 +2380,18 @@ */ BUG_ON(!after(scb->end_seq, snd_una)); + seq = orig_seq = scb->seq; while (!after(seq + mss, snd_una)) { packets_acked++; seq += mss; } + if (tcp_trim_head(sk, skb, (seq - orig_seq))) + return 0; + if (packets_acked) { __u8 sacked = scb->sacked; - /* We adjust scb->seq but we do not pskb_pull() the - * SKB. We let tcp_retransmit_skb() handle this case - * by checking skb->len against the data sequence span. - * This way, we avoid the pskb_pull() work unless we - * actually need to retransmit the SKB. - */ - scb->seq = seq; - acked |= FLAG_DATA_ACKED; if (sacked) { if (sacked & TCPCB_RETRANS) { @@ -2413,7 +2410,7 @@ packets_acked); if (sacked & TCPCB_URG) { if (tp->urg_mode && - !before(scb->seq, tp->snd_up)) + !before(seq, tp->snd_up)) tp->urg_mode = 0; } } else if (*seq_rtt < 0) @@ -2425,9 +2422,8 @@ tcp_dec_pcount_explicit(&tp->fackets_out, dval); } tcp_dec_pcount_explicit(&tp->packets_out, packets_acked); - scb->tso_factor -= packets_acked; - BUG_ON(scb->tso_factor == 0); + BUG_ON(tcp_skb_pcount(skb) == 0); BUG_ON(!before(scb->seq, scb->end_seq)); } @@ -2454,8 +2450,8 @@ * the other end. */ if (after(scb->end_seq, tp->snd_una)) { - if (scb->tso_factor > 1) - acked |= tcp_tso_acked(tp, skb, + if (tcp_skb_pcount(skb) > 1) + acked |= tcp_tso_acked(sk, skb, now, &seq_rtt); break; } diff -Nru a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c --- a/net/ipv4/tcp_output.c 2004-10-03 19:06:22 -07:00 +++ b/net/ipv4/tcp_output.c 2004-10-03 19:06:22 -07:00 @@ -45,6 +45,12 @@ /* People can turn this off for buggy TCP's found in printers etc. */ int sysctl_tcp_retrans_collapse = 1; +/* This limits the percentage of the congestion window which we + * will allow a single TSO frame to consume. Building TSO frames + * which are too large can cause TCP streams to be bursty. + */ +int sysctl_tcp_tso_win_divisor = 8; + static __inline__ void update_send_head(struct sock *sk, struct tcp_opt *tp, struct sk_buff *skb) { @@ -268,7 +274,7 @@ int sysctl_flags; int err; - BUG_ON(!TCP_SKB_CB(skb)->tso_factor); + BUG_ON(!tcp_skb_pcount(skb)); #define SYSCTL_FLAG_TSTAMPS 0x1 #define SYSCTL_FLAG_WSCALE 0x2 @@ -422,21 +428,22 @@ } } -void tcp_set_skb_tso_factor(struct sk_buff *skb, unsigned int mss_std) +void tcp_set_skb_tso_segs(struct sk_buff *skb, unsigned int mss_std) { if (skb->len <= mss_std) { /* Avoid the costly divide in the normal * non-TSO case. */ - TCP_SKB_CB(skb)->tso_factor = 1; + skb_shinfo(skb)->tso_segs = 1; + skb_shinfo(skb)->tso_size = 0; } else { unsigned int factor; factor = skb->len + (mss_std - 1); factor /= mss_std; - TCP_SKB_CB(skb)->tso_factor = factor; + skb_shinfo(skb)->tso_segs = factor; + skb_shinfo(skb)->tso_size = mss_std; } - TCP_SKB_CB(skb)->tso_mss = mss_std; } /* Function to create two new TCP segments. Shrinks the given segment @@ -502,8 +509,8 @@ } /* Fix up tso_factor for both original and new SKB. */ - tcp_set_skb_tso_factor(skb, tp->mss_cache_std); - tcp_set_skb_tso_factor(buff, tp->mss_cache_std); + tcp_set_skb_tso_segs(skb, tp->mss_cache_std); + tcp_set_skb_tso_segs(buff, tp->mss_cache_std); if (TCP_SKB_CB(skb)->sacked & TCPCB_LOST) { tcp_inc_pcount(&tp->lost_out, skb); @@ -525,7 +532,7 @@ * eventually). The difference is that pulled data not copied, but * immediately discarded. */ -unsigned char * __pskb_trim_head(struct sk_buff *skb, int len) +static unsigned char *__pskb_trim_head(struct sk_buff *skb, int len) { int i, k, eat; @@ -553,8 +560,10 @@ return skb->tail; } -static int __tcp_trim_head(struct tcp_opt *tp, struct sk_buff *skb, u32 len) +int tcp_trim_head(struct sock *sk, struct sk_buff *skb, u32 len) { + struct tcp_opt *tp = tcp_sk(sk); + if (skb_cloned(skb) && pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) return -ENOMEM; @@ -566,26 +575,22 @@ return -ENOMEM; } + TCP_SKB_CB(skb)->seq += len; skb->ip_summed = CHECKSUM_HW; + skb->truesize -= len; + sk->sk_queue_shrunk = 1; + sk->sk_wmem_queued -= len; + sk->sk_forward_alloc += len; + /* Any change of skb->len requires recalculation of tso * factor and mss. */ - tcp_set_skb_tso_factor(skb, tp->mss_cache_std); + tcp_set_skb_tso_segs(skb, tp->mss_cache_std); return 0; } -static inline int tcp_trim_head(struct tcp_opt *tp, struct sk_buff *skb, u32 len) -{ - int err = __tcp_trim_head(tp, skb, len); - - if (!err) - TCP_SKB_CB(skb)->seq += len; - - return err; -} - /* This function synchronize snd mss to current pmtu/exthdr set. tp->user_mss is mss set by user by TCP_MAXSEG. It does NOT counts @@ -660,7 +665,7 @@ { struct tcp_opt *tp = tcp_sk(sk); struct dst_entry *dst = __sk_dst_get(sk); - int do_large, mss_now; + unsigned int do_large, mss_now; mss_now = tp->mss_cache_std; if (dst) { @@ -675,7 +680,7 @@ !tp->urg_mode); if (do_large) { - int large_mss, factor; + unsigned int large_mss, factor, limit; large_mss = 65535 - tp->af_specific->net_header_len - tp->ext_header_len - tp->ext2_header_len - @@ -685,12 +690,19 @@ large_mss = max((tp->max_window>>1), 68U - tp->tcp_header_len); + factor = large_mss / mss_now; + /* Always keep large mss multiple of real mss, but - * do not exceed congestion window. + * do not exceed 1/tso_win_divisor of the congestion window + * so we can keep the ACK clock ticking and minimize + * bursting. */ - factor = large_mss / mss_now; - if (factor > tp->snd_cwnd) - factor = tp->snd_cwnd; + limit = tp->snd_cwnd; + if (sysctl_tcp_tso_win_divisor) + limit /= sysctl_tcp_tso_win_divisor; + limit = max(1U, limit); + if (factor > limit) + factor = limit; tp->mss_cache = mss_now * factor; @@ -903,8 +915,8 @@ ((skb_size + next_skb_size) > mss_now)) return; - BUG_ON(TCP_SKB_CB(skb)->tso_factor != 1 || - TCP_SKB_CB(next_skb)->tso_factor != 1); + BUG_ON(tcp_skb_pcount(skb) != 1 || + tcp_skb_pcount(next_skb) != 1); /* Ok. We will be able to collapse the packet. */ __skb_unlink(next_skb, next_skb->list); @@ -1003,7 +1015,6 @@ { struct tcp_opt *tp = tcp_sk(sk); unsigned int cur_mss = tcp_current_mss(sk, 0); - __u32 data_seq, data_end_seq; int err; /* Do not sent more than we queued. 1/4 is reserved for possible @@ -1013,24 +1024,6 @@ min(sk->sk_wmem_queued + (sk->sk_wmem_queued >> 2), sk->sk_sndbuf)) return -EAGAIN; - /* What is going on here? When TSO packets are partially ACK'd, - * we adjust the TCP_SKB_CB(skb)->seq value forward but we do - * not adjust the data area of the SKB. We defer that to here - * so that we can avoid the work unless we really retransmit - * the packet. - */ - data_seq = TCP_SKB_CB(skb)->seq; - data_end_seq = TCP_SKB_CB(skb)->end_seq; - if (TCP_SKB_CB(skb)->flags & TCPCB_FLAG_FIN) - data_end_seq--; - - if (skb->len > (data_end_seq - data_seq)) { - u32 to_trim = skb->len - (data_end_seq - data_seq); - - if (__tcp_trim_head(tp, skb, to_trim)) - return -ENOMEM; - } - if (before(TCP_SKB_CB(skb)->seq, tp->snd_una)) { if (before(TCP_SKB_CB(skb)->end_seq, tp->snd_una)) BUG(); @@ -1041,7 +1034,7 @@ tp->mss_cache = tp->mss_cache_std; } - if (tcp_trim_head(tp, skb, tp->snd_una - TCP_SKB_CB(skb)->seq)) + if (tcp_trim_head(sk, skb, tp->snd_una - TCP_SKB_CB(skb)->seq)) return -ENOMEM; } @@ -1055,14 +1048,14 @@ return -EAGAIN; if (skb->len > cur_mss) { - int old_factor = TCP_SKB_CB(skb)->tso_factor; + int old_factor = tcp_skb_pcount(skb); int new_factor; if (tcp_fragment(sk, skb, cur_mss)) return -ENOMEM; /* We'll try again later. */ /* New SKB created, account for it. */ - new_factor = TCP_SKB_CB(skb)->tso_factor; + new_factor = tcp_skb_pcount(skb); tcp_dec_pcount_explicit(&tp->packets_out, old_factor - new_factor); tcp_inc_pcount(&tp->packets_out, skb->next); @@ -1089,7 +1082,8 @@ tp->snd_una == (TCP_SKB_CB(skb)->end_seq - 1)) { if (!pskb_trim(skb, 0)) { TCP_SKB_CB(skb)->seq = TCP_SKB_CB(skb)->end_seq - 1; - TCP_SKB_CB(skb)->tso_factor = 1; + skb_shinfo(skb)->tso_segs = 1; + skb_shinfo(skb)->tso_size = 0; skb->ip_summed = CHECKSUM_NONE; skb->csum = 0; } @@ -1174,7 +1168,7 @@ tcp_reset_xmit_timer(sk, TCP_TIME_RETRANS, tp->rto); } - packet_cnt -= TCP_SKB_CB(skb)->tso_factor; + packet_cnt -= tcp_skb_pcount(skb); if (packet_cnt <= 0) break; } @@ -1264,8 +1258,8 @@ skb->csum = 0; TCP_SKB_CB(skb)->flags = (TCPCB_FLAG_ACK | TCPCB_FLAG_FIN); TCP_SKB_CB(skb)->sacked = 0; - TCP_SKB_CB(skb)->tso_factor = 1; - TCP_SKB_CB(skb)->tso_mss = tp->mss_cache_std; + skb_shinfo(skb)->tso_segs = 1; + skb_shinfo(skb)->tso_size = 0; /* FIN eats a sequence byte, write_seq advanced by tcp_queue_skb(). */ TCP_SKB_CB(skb)->seq = tp->write_seq; @@ -1297,8 +1291,8 @@ skb->csum = 0; TCP_SKB_CB(skb)->flags = (TCPCB_FLAG_ACK | TCPCB_FLAG_RST); TCP_SKB_CB(skb)->sacked = 0; - TCP_SKB_CB(skb)->tso_factor = 1; - TCP_SKB_CB(skb)->tso_mss = tp->mss_cache_std; + skb_shinfo(skb)->tso_segs = 1; + skb_shinfo(skb)->tso_size = 0; /* Send it off. */ TCP_SKB_CB(skb)->seq = tcp_acceptable_seq(sk, tp); @@ -1379,8 +1373,8 @@ TCP_SKB_CB(skb)->seq = req->snt_isn; TCP_SKB_CB(skb)->end_seq = TCP_SKB_CB(skb)->seq + 1; TCP_SKB_CB(skb)->sacked = 0; - TCP_SKB_CB(skb)->tso_factor = 1; - TCP_SKB_CB(skb)->tso_mss = tp->mss_cache_std; + skb_shinfo(skb)->tso_segs = 1; + skb_shinfo(skb)->tso_size = 0; th->seq = htonl(TCP_SKB_CB(skb)->seq); th->ack_seq = htonl(req->rcv_isn + 1); if (req->rcv_wnd == 0) { /* ignored for retransmitted syns */ @@ -1482,8 +1476,8 @@ TCP_SKB_CB(buff)->flags = TCPCB_FLAG_SYN; TCP_ECN_send_syn(sk, tp, buff); TCP_SKB_CB(buff)->sacked = 0; - TCP_SKB_CB(buff)->tso_factor = 1; - TCP_SKB_CB(buff)->tso_mss = tp->mss_cache_std; + skb_shinfo(buff)->tso_segs = 1; + skb_shinfo(buff)->tso_size = 0; buff->csum = 0; TCP_SKB_CB(buff)->seq = tp->write_seq++; TCP_SKB_CB(buff)->end_seq = tp->write_seq; @@ -1583,8 +1577,8 @@ buff->csum = 0; TCP_SKB_CB(buff)->flags = TCPCB_FLAG_ACK; TCP_SKB_CB(buff)->sacked = 0; - TCP_SKB_CB(buff)->tso_factor = 1; - TCP_SKB_CB(buff)->tso_mss = tp->mss_cache_std; + skb_shinfo(buff)->tso_segs = 1; + skb_shinfo(buff)->tso_size = 0; /* Send it off, this clears delayed acks for us. */ TCP_SKB_CB(buff)->seq = TCP_SKB_CB(buff)->end_seq = tcp_acceptable_seq(sk, tp); @@ -1619,8 +1613,8 @@ skb->csum = 0; TCP_SKB_CB(skb)->flags = TCPCB_FLAG_ACK; TCP_SKB_CB(skb)->sacked = urgent; - TCP_SKB_CB(skb)->tso_factor = 1; - TCP_SKB_CB(skb)->tso_mss = tp->mss_cache_std; + skb_shinfo(skb)->tso_segs = 1; + skb_shinfo(skb)->tso_size = 0; /* Use a previous sequence. This should cause the other * end to send an ack. Don't queue or clone SKB, just @@ -1664,8 +1658,8 @@ sk->sk_route_caps &= ~NETIF_F_TSO; tp->mss_cache = tp->mss_cache_std; } - } else if (!TCP_SKB_CB(skb)->tso_factor) - tcp_set_skb_tso_factor(skb, tp->mss_cache_std); + } else if (!tcp_skb_pcount(skb)) + tcp_set_skb_tso_segs(skb, tp->mss_cache_std); TCP_SKB_CB(skb)->flags |= TCPCB_FLAG_PSH; TCP_SKB_CB(skb)->when = tcp_time_stamp; diff -Nru a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c --- a/net/ipv6/reassembly.c 2004-10-03 19:06:21 -07:00 +++ b/net/ipv6/reassembly.c 2004-10-03 19:06:21 -07:00 @@ -665,7 +665,7 @@ head->next = NULL; head->dev = dev; head->stamp = fq->stamp; - head->nh.ipv6h->payload_len = ntohs(payload_len); + head->nh.ipv6h->payload_len = htons(payload_len); *skb_in = head; diff -Nru a/security/commoncap.c b/security/commoncap.c --- a/security/commoncap.c 2004-10-03 19:06:21 -07:00 +++ b/security/commoncap.c 2004-10-03 19:06:21 -07:00 @@ -314,10 +314,10 @@ /* * Sometimes we want to use more memory than we have */ - if (sysctl_overcommit_memory == 1) + if (sysctl_overcommit_memory == OVERCOMMIT_ALWAYS) return 0; - if (sysctl_overcommit_memory == 0) { + if (sysctl_overcommit_memory == OVERCOMMIT_GUESS) { unsigned long n; free = get_page_cache_size(); diff -Nru a/security/dummy.c b/security/dummy.c --- a/security/dummy.c 2004-10-03 19:06:21 -07:00 +++ b/security/dummy.c 2004-10-03 19:06:21 -07:00 @@ -121,10 +121,10 @@ /* * Sometimes we want to use more memory than we have */ - if (sysctl_overcommit_memory == 1) + if (sysctl_overcommit_memory == OVERCOMMIT_ALWAYS) return 0; - if (sysctl_overcommit_memory == 0) { + if (sysctl_overcommit_memory == OVERCOMMIT_GUESS) { free = get_page_cache_size(); free += nr_free_pages(); free += nr_swap_pages; diff -Nru a/security/selinux/hooks.c b/security/selinux/hooks.c --- a/security/selinux/hooks.c 2004-10-03 19:06:22 -07:00 +++ b/security/selinux/hooks.c 2004-10-03 19:06:22 -07:00 @@ -1554,10 +1554,10 @@ /* * Sometimes we want to use more memory than we have */ - if (sysctl_overcommit_memory == 1) + if (sysctl_overcommit_memory == OVERCOMMIT_ALWAYS) return 0; - if (sysctl_overcommit_memory == 0) { + if (sysctl_overcommit_memory == OVERCOMMIT_GUESS) { free = get_page_cache_size(); free += nr_free_pages(); free += nr_swap_pages;