http://linux.bkbits.net/linux-2.5 torvalds@ppc970.osdl.org|ChangeSet|20041130044603|61378 torvalds # This is a BitKeeper generated diff -Nru style patch. # # drivers/pci/hotplug/rpaphp_pci.c # 2004/11/18 00:36:18-08:00 eike-hotplug@sf-tec.de +4 -5 # PCI Hotplug: clean up rpaphp_pci.c::rpaphp_find_pci_dev # # ChangeSet # 2004/11/29 20:24:39-08:00 rusty@rustcorp.com.au # [PATCH] Remove Futex Warning # # If we're waiting on a futex and we are woken up, it's either because # someone did FUTEX_WAKE, we timed out, or have been signalled. However, the # WARN_ON(!signal_pending(current)) test is overzealous: with threads (a # common use of futexes), we share the signal handler and the other # thread might get to the signal before us. In addition, exit_notify() # can do a recalc_sigpending_tsk() on us, which will then clear our # TIF_SIGPENDING bit, making signal_pending(current) return false. # # Returning EINTR is a little strange in this case, since this thread # hasn't handled a signal. However, with threads it's the best we can # do: there's always a race where another thread could have been the # actual one to handle the signal. # # Signed-off-by: Rusty Russell # Signed-off-by: Linus Torvalds # # kernel/futex.c # 2004/11/29 17:59:39-08:00 rusty@rustcorp.com.au +2 -2 # Remove Futex Warning # # ChangeSet # 2004/11/29 19:45:22-08:00 juhl-lkml@dif.dk # [NET]: Fix inline keyword usage in skbuff.c # # Signed-off-by: Jesper Juhl # Signed-off-by: David S. Miller # # net/core/skbuff.c # 2004/11/29 19:45:02-08:00 juhl-lkml@dif.dk +2 -2 # [NET]: Fix inline keyword usage in skbuff.c # # Signed-off-by: Jesper Juhl # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/29 19:32:57-08:00 patrick@tykepenguin.com # [DECNET]: Typo in accept causes OOPS. # # Signed-off-by: Patrick Caulfield # Signed-off-by: David S. Miller # # net/decnet/af_decnet.c # 2004/11/29 19:32:37-08:00 patrick@tykepenguin.com +1 -1 # [DECNET]: Typo in accept causes OOPS. # # Signed-off-by: Patrick Caulfield # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/29 19:25:06-08:00 yoshfuji@linux-ipv6.org # [IPV6]: Fix races in ip6_route_{input,output}() # # We need to hold refcnt before releasing rt6_lock. # # Signed-off-by: Hideaki YOSHIFUJI # Signed-off-by: David S. Miller # # net/ipv6/route.c # 2004/11/29 19:24:46-08:00 yoshfuji@linux-ipv6.org +15 -4 # [IPV6]: Fix races in ip6_route_{input,output}() # # We need to hold refcnt before releasing rt6_lock. # # Signed-off-by: Hideaki YOSHIFUJI # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/29 19:10:22-08:00 magnus.damm@gmail.com # [IPV4]: Use schedule_timeout() instead of jiffies polling in ipconfig. # # Signed-off-by: David S. Miller # # net/ipv4/ipconfig.c # 2004/11/29 19:10:02-08:00 magnus.damm@gmail.com +6 -9 # [IPV4]: Use schedule_timeout() instead of jiffies polling in ipconfig. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/29 13:40:00-08:00 James.Bottomley@SteelEye.com # [PATCH] Change MCA maintainer # # Signed-off-by: James Bottomley # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # MAINTAINERS # 2004/11/29 00:38:26-08:00 James.Bottomley@SteelEye.com +2 -5 # Change MCA maintainer # # ChangeSet # 2004/11/29 13:39:47-08:00 domen@coderock.org # [PATCH] video: semicolon bug in atyfb_base.c # # Indentiation and logic suggest this was wrong. # # Signed-off-by: Domen Puncer # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/aty/atyfb_base.c # 2004/11/29 00:38:26-08:00 domen@coderock.org +2 -2 # video: semicolon bug in atyfb_base.c # # ChangeSet # 2004/11/29 13:39:34-08:00 andrew.patterson@hp.com # [PATCH] cciss: Off-by-one error causing oops in CCISS_GETLUNIFO ioctl # # This patch fixes an an "off-by-one" error found in the CCISS_GETLUNIFO # ioctl in the cciss driver. It is cycling through the part table of the # gendisk structure which is a zero-based array, not a one-based array. This # often causes an oops when referencing the out-of-bounds element. # # Signed-off by: Andrew Patterson # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/block/cciss.c # 2004/11/29 00:38:26-08:00 andrew.patterson@hp.com +1 -1 # cciss: Off-by-one error causing oops in CCISS_GETLUNIFO ioctl # # ChangeSet # 2004/11/29 13:39:21-08:00 adaplas@hotpop.com # [PATCH] fbdev: Fix crash if fb_set_var() called before register_framebuffer() # # The field info->modelist is initialized during register_framebuffer. This # field is also referred to in fb_set_var(). Thus a call to fb_set_var() # before register_framebuffer() will cause a crash. A few drivers do this, # notably controlfb. (This might fix reports of controlfb crashing in # powermacs). # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/fbmem.c # 2004/11/29 00:38:26-08:00 adaplas@hotpop.com +4 -1 # fbdev: Fix crash if fb_set_var() called before register_framebuffer() # # ChangeSet # 2004/11/29 13:39:09-08:00 ak@suse.de # [PATCH] x86_64: Fix lost edge triggered irqs on UP kernel # # Patch from Petr Vandrovec # # Recently I've observed problems with IDE disks while running UP kernel on # x86-64 - it complained a lot about lost irq from hda/hdc. I tracked # problem down to the problem that at enable_irq() code calls # hw_resend_irq(), but on x86-64 hw_resend_irq() does something useful only # when CONFIG_SMP is defined, on UP systems it does nothing. # # Due to this IRQ is lost - and when IDE retries command, it can again happen # that IRQ is delivered before IDE code does enable_irq(), and again and # again, unless due to drive being lazy finally once kernel does enable_irq() # before drive prepares its answer, and things move forward ... to next lost # IRQ. # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/hw_irq.h # 2004/11/29 00:38:26-08:00 ak@suse.de +1 -1 # x86_64: Fix lost edge triggered irqs on UP kernel # # ChangeSet # 2004/11/29 13:38:56-08:00 dtor_core@ameritech.net # [PATCH] v4l: fix permissions on module parameters exported via sysfs # # Fix permissions on module parameters exported via sysfs. # # Signed-off-by: Dmitry Torokhov # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/tuner.c # 2004/11/29 00:38:25-08:00 dtor_core@ameritech.net +8 -8 # v4l: fix permissions on module parameters exported via sysfs # # ChangeSet # 2004/11/29 13:38:43-08:00 mtk-lkml@gmx.net # [PATCH] RLIMIT_MEMLOCK accounting of shmctl() SHM_LOCK is broken # # The accounting of shmctl() SHM_LOCK memory locks against the user # structure is broken. The check of the size of the to-be-locked region # is based on the size of the segment as specified when it was created by # shmget() (this size is *not* rounded up to a page boundary). # # Fix it by rounding the size properlt. Also, tune up the spinlock # coverage in there a little. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/mlock.c # 2004/11/29 00:38:25-08:00 mtk-lkml@gmx.net +3 -3 # RLIMIT_MEMLOCK accounting of shmctl() SHM_LOCK is broken # # ChangeSet # 2004/11/29 13:38:30-08:00 akpm@osdl.org # [PATCH] e100 deadlock fix # # Revert my version of this fix and apply Scott's version, which was acked by # the e100 maintainers. # # Also, initialise the spinlocks before calling e100_hw_reset(), so things don't # instantly deadlock on SMP. # # Signed-off-by: Scott Feldman # Cc: Jeff Garzik # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/net/e100.c # 2004/11/29 00:38:25-08:00 akpm@osdl.org +17 -14 # e100 deadlock fix # # ChangeSet # 2004/11/29 15:23:14+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2285/1: S3C2410 - regs-sdi.h fixes # # Patch from Ben Dooks # # Fixes from Koen Martens to update the # register definitions for the MMC/SD/SDIO interface, # tidied up for release with extra notes on what has # been depreceated in later silicon. # # Signed-off-by: Koen Martens # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # include/asm-arm/arch-s3c2410/regs-sdi.h # 2004/11/29 14:20:09+00:00 ben-linux@org.rmk.(none) +13 -7 # [PATCH] 2285/1: S3C2410 - regs-sdi.h fixes # # ChangeSet # 2004/11/29 15:17:44+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2284/1: S3C2410 - core device registration update # # Patch from Ben Dooks # # If one of the devices fails to register, do not # remove any registered devices and continue registering # in case any more devices register. # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # arch/arm/mach-s3c2410/cpu.c # 2004/11/22 16:08:59+00:00 ben-linux@org.rmk.(none) +9 -3 # [PATCH] 2284/1: S3C2410 - core device registration update # # ChangeSet # 2004/11/29 15:12:19+00:00 rmk@flint.arm.linux.org.uk # [ARM] ARMv6 always selects correct user operations at runtime. # # include/asm-arm/page.h # 2004/11/29 15:09:01+00:00 rmk@flint.arm.linux.org.uk +2 -6 # ARMv6 always has "multi" user operations. # # ChangeSet # 2004/11/28 15:08:13-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] iomem annotations and fixes + isa_-ectomy in msnd # # * switched to ioremap() + normal operations # * split msnd_fifo_write() (and msnd_fifo_read()) into iomem and normal # versions (original was even worse - it used to do __user and __iomem # versions in the same code and in atomic context; when that bogosity # got fixed, the difference between these cases (now normal memory and # iomem) had been lost). # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # sound/oss/msnd_pinnacle.c # 2004/11/27 18:50:31-08:00 viro@parcelfarce.linux.theplanet.co.uk +85 -85 # iomem annotations and fixes + isa_-ectomy in msnd # # sound/oss/msnd.h # 2004/11/27 18:50:29-08:00 viro@parcelfarce.linux.theplanet.co.uk +8 -6 # iomem annotations and fixes + isa_-ectomy in msnd # # sound/oss/msnd.c # 2004/11/27 18:50:26-08:00 viro@parcelfarce.linux.theplanet.co.uk +71 -7 # iomem annotations and fixes + isa_-ectomy in msnd # # ChangeSet # 2004/11/28 15:08:00-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] misc drivers/atm iomem annotations and NULL noise removal # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/atm/lanai.c # 2004/11/27 19:07:14-08:00 viro@parcelfarce.linux.theplanet.co.uk +4 -4 # misc drivers/atm iomem annotations and NULL noise removal # # drivers/atm/idt77252.c # 2004/11/27 19:07:09-08:00 viro@parcelfarce.linux.theplanet.co.uk +2 -2 # misc drivers/atm iomem annotations and NULL noise removal # # drivers/atm/he.c # 2004/11/27 19:07:04-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # misc drivers/atm iomem annotations and NULL noise removal # # drivers/atm/eni.c # 2004/11/27 19:06:58-08:00 viro@parcelfarce.linux.theplanet.co.uk +8 -9 # misc drivers/atm iomem annotations and NULL noise removal # # ChangeSet # 2004/11/28 15:07:47-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] swim3 __user annotation # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/block/swim3.c # 2004/11/27 19:08:01-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # swim3 __user annotation # # ChangeSet # 2004/11/28 15:07:35-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] wd7000 iomem annotations and fixes # # direct dereferencing of iomem pointer (by memcmp()) # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/scsi/wd7000.c # 2004/11/27 18:50:02-08:00 viro@parcelfarce.linux.theplanet.co.uk +4 -4 # wd7000 iomem annotations and fixes # # ChangeSet # 2004/11/28 15:07:22-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] seagate iomem annotations, cleanup and isa_-ectomy # # * switched to ioremap() # * switched to normal iomem operations # * killed a bunch of phys_to_virt() # * killed open-coded (and inferior) instances of memcpy_toio()/memcpy_fromio(). # * fixed a dumb typo introduced in "kill off isa_check_signature()" # patch (sorry - missed the fact that it was not covered by # allmodconfig and didn't verify until after sending the patch in # question ;-/). # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/scsi/seagate.c # 2004/11/27 18:30:40-08:00 viro@parcelfarce.linux.theplanet.co.uk +21 -49 # seagate iomem annotations, cleanup and isa_-ectomy # # ChangeSet # 2004/11/28 15:07:09-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] dtc iomem annotations and isa_-ectomy # # switched to ioremap() + normal iomem operations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/scsi/dtc.h # 2004/11/27 18:25:40-08:00 viro@parcelfarce.linux.theplanet.co.uk +17 -17 # dtc iomem annotations and isa_-ectomy # # drivers/scsi/dtc.c # 2004/11/27 18:25:38-08:00 viro@parcelfarce.linux.theplanet.co.uk +27 -18 # dtc iomem annotations and isa_-ectomy # # ChangeSet # 2004/11/28 15:06:56-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] t128 iomem annotations and isa_-ectomy # # switched to ioremap() + normal iomem primitives. # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/scsi/t128.h # 2004/11/27 18:05:57-08:00 viro@parcelfarce.linux.theplanet.co.uk +7 -7 # t128 iomem annotations and isa_-ectomy # # drivers/scsi/t128.c # 2004/11/27 18:05:54-08:00 viro@parcelfarce.linux.theplanet.co.uk +38 -24 # t128 iomem annotations and isa_-ectomy # # ChangeSet # 2004/11/28 16:07:53+00:00 zecke@org.rmk.(none) # [ARM PATCH] 2280/1: [PATCH] SIMpad: Change maintainer to me # # Patch from Holger Hans Peter Freyther # # Line numbers could depend on 2279/1 # # Change the maintainer of the SIMpad board to me. This change was discussed on the simpad linux mailinglist and was supported by the former maintainer of SIMpad. I'll subscribe and introduce myself shortly on the arm linux mailinglist and ask for SIMpad not to be removed. # # Signed-off-by: Holger Hans Peter Freyther # Signed-off-by: Russell King # # arch/arm/mach-sa1100/simpad.c # 2004/11/11 19:44:05+00:00 zecke@org.rmk.(none) +1 -1 # [PATCH] 2280/1: [PATCH] SIMpad: Change maintainer to me # # ChangeSet # 2004/11/28 16:02:29+00:00 zecke@org.rmk.(none) # [ARM PATCH] 2279/1: [PATCH] SIMpad: Add a mq200 device to the platform bus # # Patch from Holger Hans Peter Freyther # # The SIMpad uses the MediaQ 200 framebuffer device. There is no driver in the vanilla kernel for that device. But adding the device to the platform bus makes it possible to just drop the mq200 driver into the kernel and the display will work. # Please consider applying the patch. # # # # Signed-off-by: Holger Hans Peter Freyther # Signed-off-by: Russell King # # arch/arm/mach-sa1100/simpad.c # 2004/11/11 18:28:01+00:00 zecke@org.rmk.(none) +23 -0 # [PATCH] 2279/1: [PATCH] SIMpad: Add a mq200 device to the platform bus # # ChangeSet # 2004/11/28 15:55:05+00:00 zecke@org.rmk.(none) # [ARM PATCH] 2278/1: [PATCH] SIMpad: add a default config # # Patch from Holger Hans Peter Freyther # # Add a default config file for simpad # # # Signed-off-by: Holger Hans Peter Freyther # Signed-off-by: Russell King # # arch/arm/configs/simpad_defconfig # 2004/11/11 20:16:34+00:00 zecke@org.rmk.(none) +896 -0 # [PATCH] 2278/1: [PATCH] SIMpad: add a default config # # arch/arm/configs/simpad_defconfig # 2004/11/11 20:16:34+00:00 zecke@org.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/configs/simpad_defconfig # # ChangeSet # 2004/11/28 15:42:35+00:00 zecke@org.rmk.(none) # [ARM PATCH] 2277/1: [PATCH] SIMpad: fix warnings emitted by the compiler # # Patch from Holger Hans Peter Freyther # # Fix warnings emitted by the compiler for # leds-simpad.c and sa1100_simpad.c # # Signed-off-by: Holger Hans Peter Freyther # Signed-off-by: Russell King # # drivers/pcmcia/sa1100_simpad.c # 2004/11/11 18:23:18+00:00 zecke@org.rmk.(none) +2 -2 # [PATCH] 2277/1: [PATCH] SIMpad: fix warnings emitted by the compiler # # arch/arm/mach-sa1100/leds-simpad.c # 2004/11/11 18:23:18+00:00 zecke@org.rmk.(none) +1 -6 # [PATCH] 2277/1: [PATCH] SIMpad: fix warnings emitted by the compiler # # ChangeSet # 2004/11/28 15:37:02+00:00 zecke@org.rmk.(none) # [ARM PATCH] 2276/1: [PATCH] SIMpad: make simpad.c compile # # Patch from Holger Hans Peter Freyther # # Fix compile of simpad.c .... # # Signed-off-by: Holger Hans Peter Freyther # Signed-off-by: Russell King # # arch/arm/mach-sa1100/simpad.c # 2004/11/11 18:26:57+00:00 zecke@org.rmk.(none) +1 -2 # [PATCH] 2276/1: [PATCH] SIMpad: make simpad.c compile # # ChangeSet # 2004/11/27 21:58:05-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] isa_check_signature() finally gone # # last callers of isa_check_signature() switched to ioremap() + # check_signature() # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # include/asm-x86_64/io.h # 2004/11/27 12:32:28-08:00 viro@parcelfarce.linux.theplanet.co.uk +0 -32 # isa_check_signature() finally gone # # include/asm-ppc/io.h # 2004/11/27 12:32:28-08:00 viro@parcelfarce.linux.theplanet.co.uk +0 -7 # isa_check_signature() finally gone # # include/asm-mips/io.h # 2004/11/27 12:32:28-08:00 viro@parcelfarce.linux.theplanet.co.uk +0 -14 # isa_check_signature() finally gone # # include/asm-m32r/io.h # 2004/11/27 12:32:28-08:00 viro@parcelfarce.linux.theplanet.co.uk +4 -4 # isa_check_signature() finally gone # # include/asm-i386/io.h # 2004/11/27 12:32:28-08:00 viro@parcelfarce.linux.theplanet.co.uk +0 -30 # isa_check_signature() finally gone # # include/asm-arm/io.h # 2004/11/27 12:32:28-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -20 # isa_check_signature() finally gone # # include/asm-alpha/io.h # 2004/11/27 12:32:28-08:00 viro@parcelfarce.linux.theplanet.co.uk +0 -10 # isa_check_signature() finally gone # # drivers/scsi/t128.c # 2004/11/27 12:32:28-08:00 viro@parcelfarce.linux.theplanet.co.uk +8 -3 # isa_check_signature() finally gone # # drivers/scsi/seagate.c # 2004/11/27 12:33:08-08:00 viro@parcelfarce.linux.theplanet.co.uk +9 -3 # isa_check_signature() finally gone # # drivers/scsi/fdomain.c # 2004/11/27 12:32:28-08:00 viro@parcelfarce.linux.theplanet.co.uk +21 -13 # isa_check_signature() finally gone # # drivers/scsi/dtc.c # 2004/11/27 12:32:28-08:00 viro@parcelfarce.linux.theplanet.co.uk +10 -2 # isa_check_signature() finally gone # # drivers/scsi/aha152x.c # 2004/11/27 12:32:28-08:00 viro@parcelfarce.linux.theplanet.co.uk +7 -2 # isa_check_signature() finally gone # # drivers/block/xd.c # 2004/11/27 12:32:28-08:00 viro@parcelfarce.linux.theplanet.co.uk +14 -6 # isa_check_signature() finally gone # # ChangeSet # 2004/11/27 21:57:51-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] misc iomem annotations # # Each chunk is independent from the rest, so it could've been split # further, but IMO there's no point. # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/pci/hotplug/cpqphp_nvram.c # 2004/11/27 12:16:38-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # misc iomem annotations # # drivers/ide/pci/pdc202xx_new.c # 2004/11/27 12:16:21-08:00 viro@parcelfarce.linux.theplanet.co.uk +3 -3 # misc iomem annotations # # drivers/char/watchdog/sc520_wdt.c # 2004/11/27 12:15:54-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # misc iomem annotations # # drivers/char/hw_random.c # 2004/11/27 12:15:45-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # misc iomem annotations # # drivers/char/epca.h # 2004/11/27 12:15:38-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # misc iomem annotations # # ChangeSet # 2004/11/27 21:57:39-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] mtd/maps trivial annotations # # NULL noise removal, missing __iomem in a couple of declarations, removal # of bogus cast to void * in iounmap() calls. # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/mtd/maps/ts5500_flash.c # 2004/11/27 12:08:11-08:00 viro@parcelfarce.linux.theplanet.co.uk +4 -4 # mtd/maps trivial annotations # # drivers/mtd/maps/scx200_docflash.c # 2004/11/27 12:08:02-08:00 viro@parcelfarce.linux.theplanet.co.uk +2 -2 # mtd/maps trivial annotations # # drivers/mtd/maps/scb2_flash.c # 2004/11/27 12:07:53-08:00 viro@parcelfarce.linux.theplanet.co.uk +2 -2 # mtd/maps trivial annotations # # drivers/mtd/maps/sc520cdp.c # 2004/11/27 12:07:43-08:00 viro@parcelfarce.linux.theplanet.co.uk +6 -6 # mtd/maps trivial annotations # # drivers/mtd/maps/sbc_gxx.c # 2004/11/27 12:07:33-08:00 viro@parcelfarce.linux.theplanet.co.uk +2 -2 # mtd/maps trivial annotations # # drivers/mtd/maps/physmap.c # 2004/11/27 12:07:26-08:00 viro@parcelfarce.linux.theplanet.co.uk +3 -3 # mtd/maps trivial annotations # # drivers/mtd/maps/pci.c # 2004/11/27 12:07:19-08:00 viro@parcelfarce.linux.theplanet.co.uk +3 -3 # mtd/maps trivial annotations # # drivers/mtd/maps/nettel.c # 2004/11/27 12:07:08-08:00 viro@parcelfarce.linux.theplanet.co.uk +2 -2 # mtd/maps trivial annotations # # drivers/mtd/maps/netsc520.c # 2004/11/27 12:07:01-08:00 viro@parcelfarce.linux.theplanet.co.uk +3 -3 # mtd/maps trivial annotations # # drivers/mtd/maps/l440gx.c # 2004/11/27 12:06:52-08:00 viro@parcelfarce.linux.theplanet.co.uk +3 -3 # mtd/maps trivial annotations # # drivers/mtd/maps/ichxrom.c # 2004/11/27 12:06:42-08:00 viro@parcelfarce.linux.theplanet.co.uk +3 -3 # mtd/maps trivial annotations # # drivers/mtd/maps/elan-104nc.c # 2004/11/27 12:06:30-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # mtd/maps trivial annotations # # drivers/mtd/maps/ebony.c # 2004/11/27 12:06:23-08:00 viro@parcelfarce.linux.theplanet.co.uk +6 -7 # mtd/maps trivial annotations # # drivers/mtd/maps/dilnetpc.c # 2004/11/27 12:06:14-08:00 viro@parcelfarce.linux.theplanet.co.uk +3 -3 # mtd/maps trivial annotations # # drivers/mtd/maps/amd76xrom.c # 2004/11/27 12:05:42-08:00 viro@parcelfarce.linux.theplanet.co.uk +3 -3 # mtd/maps trivial annotations # # ChangeSet # 2004/11/27 21:57:25-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] iomem annotations and isa_-ectomy: media/video/pms.c # # switched to ioremap() + normal iomem access primitives # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/media/video/pms.c # 2004/11/27 12:01:33-08:00 viro@parcelfarce.linux.theplanet.co.uk +11 -3 # iomem annotations and isa_-ectomy: media/video/pms.c # # ChangeSet # 2004/11/27 21:57:13-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] partial fc4 iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/fc4/socal.h # 2004/11/27 11:44:58-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # partial fc4 iomem annotations # # drivers/fc4/socal.c # 2004/11/27 11:45:00-08:00 viro@parcelfarce.linux.theplanet.co.uk +5 -5 # partial fc4 iomem annotations # # drivers/fc4/soc.h # 2004/11/27 11:44:55-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # partial fc4 iomem annotations # # drivers/fc4/soc.c # 2004/11/27 11:44:51-08:00 viro@parcelfarce.linux.theplanet.co.uk +4 -4 # partial fc4 iomem annotations # # ChangeSet # 2004/11/27 17:00:42-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] misc sparc iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # sound/sparc/cs4231.c # 2004/11/27 11:29:32-08:00 viro@parcelfarce.linux.theplanet.co.uk +2 -2 # misc sparc iomem annotations # # include/asm-sparc/mostek.h # 2004/11/27 11:26:02-08:00 viro@parcelfarce.linux.theplanet.co.uk +3 -3 # misc sparc iomem annotations # # include/asm-sparc/fbio.h # 2004/11/27 11:25:52-08:00 viro@parcelfarce.linux.theplanet.co.uk +3 -3 # misc sparc iomem annotations # # include/asm-sparc/dma.h # 2004/11/27 11:25:47-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # misc sparc iomem annotations # # drivers/serial/sunsab.c # 2004/11/27 11:29:02-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # misc sparc iomem annotations # # drivers/sbus/char/riowatchdog.c # 2004/11/27 11:28:44-08:00 viro@parcelfarce.linux.theplanet.co.uk +2 -2 # misc sparc iomem annotations # # drivers/sbus/char/bbc_i2c.c # 2004/11/27 11:28:36-08:00 viro@parcelfarce.linux.theplanet.co.uk +2 -2 # misc sparc iomem annotations # # arch/sparc/kernel/time.c # 2004/11/27 11:26:54-08:00 viro@parcelfarce.linux.theplanet.co.uk +2 -2 # misc sparc iomem annotations # # arch/sparc/kernel/pmc.c # 2004/11/27 11:26:51-08:00 viro@parcelfarce.linux.theplanet.co.uk +4 -4 # misc sparc iomem annotations # # arch/sparc/kernel/auxio.c # 2004/11/27 11:26:46-08:00 viro@parcelfarce.linux.theplanet.co.uk +2 -2 # misc sparc iomem annotations # # arch/sparc/kernel/apc.c # 2004/11/27 11:26:42-08:00 viro@parcelfarce.linux.theplanet.co.uk +4 -4 # misc sparc iomem annotations # # ChangeSet # 2004/11/27 16:46:01-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] sunbpp iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/sbus/char/bpp.c # 2004/11/27 11:16:32-08:00 viro@parcelfarce.linux.theplanet.co.uk +8 -8 # sunbpp iomem annotations # # drivers/parport/parport_sunbpp.c # 2004/11/27 11:16:48-08:00 viro@parcelfarce.linux.theplanet.co.uk +15 -15 # sunbpp iomem annotations # # ChangeSet # 2004/11/27 16:24:31-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] pmac_zilog iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/serial/pmac_zilog.h # 2004/11/27 11:06:36-08:00 viro@parcelfarce.linux.theplanet.co.uk +4 -4 # pmac_zilog iomem annotations # # drivers/serial/pmac_zilog.c # 2004/11/27 11:06:34-08:00 viro@parcelfarce.linux.theplanet.co.uk +7 -9 # pmac_zilog iomem annotations # # ChangeSet # 2004/11/27 16:24:18-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] pmac sound iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # sound/ppc/pmac.h # 2004/11/27 11:01:30-08:00 viro@parcelfarce.linux.theplanet.co.uk +5 -5 # pmac sound iomem annotations # # sound/ppc/pmac.c # 2004/11/27 11:01:28-08:00 viro@parcelfarce.linux.theplanet.co.uk +13 -14 # pmac sound iomem annotations # # sound/oss/dmasound/dmasound_awacs.c # 2004/11/27 11:02:02-08:00 viro@parcelfarce.linux.theplanet.co.uk +15 -19 # pmac sound iomem annotations # # ChangeSet # 2004/11/27 16:04:36-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] pmac iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # include/asm-ppc/pmac_feature.h # 2004/11/27 10:41:14-08:00 viro@parcelfarce.linux.theplanet.co.uk +2 -2 # pmac iomem annotations # # drivers/macintosh/via-pmu.c # 2004/11/27 10:40:04-08:00 viro@parcelfarce.linux.theplanet.co.uk +12 -12 # pmac iomem annotations # # drivers/macintosh/via-cuda.c # 2004/11/27 10:39:59-08:00 viro@parcelfarce.linux.theplanet.co.uk +2 -2 # pmac iomem annotations # # drivers/macintosh/mediabay.c # 2004/11/27 10:39:50-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # pmac iomem annotations # # drivers/macintosh/macio-adb.c # 2004/11/27 10:39:39-08:00 viro@parcelfarce.linux.theplanet.co.uk +2 -3 # pmac iomem annotations # # drivers/macintosh/ans-lcd.c # 2004/11/27 10:39:28-08:00 viro@parcelfarce.linux.theplanet.co.uk +4 -4 # pmac iomem annotations # # arch/ppc/platforms/pmac_feature.c # 2004/11/27 10:43:06-08:00 viro@parcelfarce.linux.theplanet.co.uk +8 -8 # pmac iomem annotations # # ChangeSet # 2004/11/27 16:04:23-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] i2c iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/i2c/busses/i2c-keywest.h # 2004/11/27 10:18:32-08:00 viro@parcelfarce.linux.theplanet.co.uk +3 -3 # i2c iomem annotations # # drivers/i2c/busses/i2c-keywest.c # 2004/11/27 10:18:32-08:00 viro@parcelfarce.linux.theplanet.co.uk +4 -4 # i2c iomem annotations # # drivers/i2c/busses/i2c-ibm_iic.h # 2004/11/27 10:18:32-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # i2c iomem annotations # # drivers/i2c/busses/i2c-ibm_iic.c # 2004/11/27 10:18:32-08:00 viro@parcelfarce.linux.theplanet.co.uk +17 -17 # i2c iomem annotations # # ChangeSet # 2004/11/27 14:50:49-08:00 viro@www.linux.org.uk # [PATCH] (12/12) valkyriefb iomem annotations # # drivers/video/valkyriefb.c # 2004/11/27 06:53:29-08:00 viro@www.linux.org.uk +21 -19 # (12/12) valkyriefb iomem annotations # # ChangeSet # 2004/11/27 14:50:37-08:00 viro@www.linux.org.uk # [PATCH] (11/12) tcx iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/video/tcx.c # 2004/11/27 06:53:26-08:00 viro@www.linux.org.uk +13 -18 # (11/12) tcx iomem annotations # # ChangeSet # 2004/11/27 14:50:24-08:00 viro@www.linux.org.uk # [PATCH] (10/12) platinumfb iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/video/platinumfb.c # 2004/11/27 06:53:22-08:00 viro@www.linux.org.uk +14 -14 # (10/12) platinumfb iomem annotations # # ChangeSet # 2004/11/27 14:50:11-08:00 viro@www.linux.org.uk # [PATCH] (9/12) p9100 iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/video/p9100.c # 2004/11/27 06:53:18-08:00 viro@www.linux.org.uk +6 -8 # (9/12) p9100 iomem annotations # # ChangeSet # 2004/11/27 14:49:59-08:00 viro@www.linux.org.uk # [PATCH] (8/12) offb iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/video/offb.c # 2004/11/27 06:53:14-08:00 viro@www.linux.org.uk +25 -53 # (8/12) offb iomem annotations # # ChangeSet # 2004/11/27 14:49:46-08:00 viro@www.linux.org.uk # [PATCH] (7/12) leo iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/video/leo.c # 2004/11/27 06:53:11-08:00 viro@www.linux.org.uk +17 -17 # (7/12) leo iomem annotations # # ChangeSet # 2004/11/27 14:49:34-08:00 viro@www.linux.org.uk # [PATCH] (6/12) hgafb iomem annotations # # switched from isa_...() to ioremap() + normal read*/write* # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/video/hgafb.c # 2004/11/27 06:53:07-08:00 viro@www.linux.org.uk +22 -16 # (6/12) hgafb iomem annotations # # ChangeSet # 2004/11/27 14:49:21-08:00 viro@www.linux.org.uk # [PATCH] (5/12) controlfb iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/video/controlfb.c # 2004/11/27 06:53:02-08:00 viro@www.linux.org.uk +5 -5 # (5/12) controlfb iomem annotations # # ChangeSet # 2004/11/27 14:49:08-08:00 viro@www.linux.org.uk # [PATCH] (4/12) cg6 iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/video/cg6.c # 2004/11/27 06:52:58-08:00 viro@www.linux.org.uk +20 -25 # (4/12) cg6 iomem annotations # # ChangeSet # 2004/11/27 14:48:55-08:00 viro@www.linux.org.uk # [PATCH] (3/12) cg3 iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/video/cg3.c # 2004/11/27 06:52:54-08:00 viro@www.linux.org.uk +10 -11 # (3/12) cg3 iomem annotations # # ChangeSet # 2004/11/27 14:48:42-08:00 viro@www.linux.org.uk # [PATCH] (2/12) cg14 iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/video/cg14.c # 2004/11/27 06:52:49-08:00 viro@www.linux.org.uk +14 -18 # (2/12) cg14 iomem annotations # # ChangeSet # 2004/11/27 14:48:30-08:00 viro@www.linux.org.uk # [PATCH] (1/12) bw2 iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/video/bw2.c # 2004/11/27 06:52:46-08:00 viro@www.linux.org.uk +6 -7 # (1/12) bw2 iomem annotations # # ChangeSet # 2004/11/27 14:48:17-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] tpam annotations and cleanups # # annotated, sanitized casts between pointers and numbers, switched the # functions that took offsets in card memory to unsigned long (from the # void *, which was absolutely wrong and lead to bogus casts from hell all # over the place). # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/isdn/tpam/tpam_queues.c # 2004/11/27 07:12:18-08:00 viro@parcelfarce.linux.theplanet.co.uk +11 -12 # tpam annotations and cleanups # # drivers/isdn/tpam/tpam_memory.c # 2004/11/27 07:12:14-08:00 viro@parcelfarce.linux.theplanet.co.uk +19 -19 # tpam annotations and cleanups # # drivers/isdn/tpam/tpam_main.c # 2004/11/27 07:12:03-08:00 viro@parcelfarce.linux.theplanet.co.uk +9 -9 # tpam annotations and cleanups # # drivers/isdn/tpam/tpam_commands.c # 2004/11/27 07:12:00-08:00 viro@parcelfarce.linux.theplanet.co.uk +14 -14 # tpam annotations and cleanups # # drivers/isdn/tpam/tpam.h # 2004/11/27 07:11:55-08:00 viro@parcelfarce.linux.theplanet.co.uk +7 -7 # tpam annotations and cleanups # # ChangeSet # 2004/11/27 14:48:04-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] mesh iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/scsi/mesh.c # 2004/11/27 07:06:54-08:00 viro@parcelfarce.linux.theplanet.co.uk +37 -39 # mesh iomem annotations # # ChangeSet # 2004/11/27 14:47:52-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] sunzilog iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/serial/sunzilog.c # 2004/11/27 04:58:40-08:00 viro@parcelfarce.linux.theplanet.co.uk +35 -35 # sunzilog iomem annotations # # ChangeSet # 2004/11/27 14:47:39-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] fore200e iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/atm/fore200e.h # 2004/11/27 04:46:57-08:00 viro@parcelfarce.linux.theplanet.co.uk +15 -15 # fore200e iomem annotations # # drivers/atm/fore200e.c # 2004/11/27 04:46:55-08:00 viro@parcelfarce.linux.theplanet.co.uk +42 -45 # fore200e iomem annotations # # ChangeSet # 2004/11/27 14:47:26-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] more sparc64 io.h annotations # # Prototypes annotated the same way they are on other platforms. I'm not # too fond of readb() taking const volatile void * (sic), but AFAICS # that's the only way to tell cc(1) that both volatile and const pointers # are acceptable here ;-/ # # memcpy_toio/memcpy_fromio/memset_io made void - same as they are # elsewhere. And no, nobody had been insane enough to use the return # values... # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # include/asm-sparc64/io.h # 2004/11/27 04:04:11-08:00 viro@parcelfarce.linux.theplanet.co.uk +22 -29 # more sparc64 io.h annotations # # ChangeSet # 2004/11/27 16:43:06+00:00 nico@org.rmk.(none) # [ARM PATCH] 2271/3: MMC for Mainstone/PXA27x # # Patch from Nicolas Pitre # # ... with a bit of reorg to make the core code a bit more generic too. # # Signed-off-by: Nicolas Pitre # Signed-off-by: Russell King # # drivers/mmc/pxamci.h # 2004/11/22 19:09:18+00:00 nico@org.rmk.(none) +30 -0 # [PATCH] 2271/3: MMC for Mainstone/PXA27x # # drivers/mmc/pxamci.c # 2004/11/22 19:32:32+00:00 nico@org.rmk.(none) +22 -13 # [PATCH] 2271/3: MMC for Mainstone/PXA27x # # arch/arm/mach-pxa/mainstone.c # 2004/11/22 20:41:26+00:00 nico@org.rmk.(none) +58 -0 # [PATCH] 2271/3: MMC for Mainstone/PXA27x # # arch/arm/mach-pxa/lubbock.c # 2004/11/22 19:09:18+00:00 nico@org.rmk.(none) +16 -0 # [PATCH] 2271/3: MMC for Mainstone/PXA27x # # ChangeSet # 2004/11/27 16:20:47+00:00 rmk@flint.arm.linux.org.uk # [ARM] icside: ensure interfaces are probed and correctly setup. # # drivers/ide/arm/icside.c # 2004/11/27 16:17:19+00:00 rmk@flint.arm.linux.org.uk +7 -0 # Ensure icside interfaces are probed, and IDE procfs files are # created. # # ChangeSet # 2004/11/27 15:56:59+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2275/1: S3C2410 - serial rx fifo full check # # Patch from Ben Dooks # # Check for the serial rx fifo full before checking # for the fifo size. # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # drivers/serial/s3c2410.c # 2004/11/26 17:29:24+00:00 ben-linux@org.rmk.(none) +7 -0 # [PATCH] 2275/1: S3C2410 - serial rx fifo full check # # ChangeSet # 2004/11/27 12:44:34+00:00 rmk@flint.arm.linux.org.uk # [ARM] sa1111: don't reference dev->power.saved_state if CONFIG_PM is unset # # arch/arm/common/sa1111.c # 2004/11/27 12:40:46+00:00 rmk@flint.arm.linux.org.uk +2 -0 # Don't reference dev->power.saved_state if CONFIG_PM isn't set # # ChangeSet # 2004/11/27 12:19:52+00:00 rmk@flint.arm.linux.org.uk # [SERIAL] imx: remove two unnecessary includes # # drivers/serial/imx.c # 2004/11/27 12:16:10+00:00 rmk@flint.arm.linux.org.uk +0 -2 # Remove asm/arch/serial.h include # Remove asm/mach-types.h include # # ChangeSet # 2004/11/26 21:58:12+00:00 peterc@au.rmk.(none) # [ARM PATCH] 2269/2: Updated Pleb-1 support patch for Linux 2.6 # # Patch from Peter Chubb # # This patch REPLACES patch #2269/1 # # Instead of using the almost-obsolete SMC9194 driver, use the new # SMC91xx driver. # # Signed-off-by: Peter Chubb # Signed-off-by: Russell King # # drivers/net/smc91x.h # 2004/11/24 22:19:03+00:00 peterc@au.rmk.(none) +19 -0 # [PATCH] 2269/2: Updated Pleb-1 support patch for Linux 2.6 # # arch/arm/mach-sa1100/Makefile # 2004/11/24 00:48:22+00:00 peterc@au.rmk.(none) +2 -0 # [PATCH] 2269/2: Updated Pleb-1 support patch for Linux 2.6 # # arch/arm/mach-sa1100/Kconfig # 2004/11/24 00:46:24+00:00 peterc@au.rmk.(none) +8 -0 # [PATCH] 2269/2: Updated Pleb-1 support patch for Linux 2.6 # # arch/arm/configs/pleb_defconfig # 2004/11/24 22:14:10+00:00 peterc@au.rmk.(none) +699 -0 # [PATCH] 2269/2: Updated Pleb-1 support patch for Linux 2.6 # # arch/arm/Kconfig # 2004/11/24 00:49:59+00:00 peterc@au.rmk.(none) +1 -1 # [PATCH] 2269/2: Updated Pleb-1 support patch for Linux 2.6 # # arch/arm/configs/pleb_defconfig # 2004/11/24 22:14:10+00:00 peterc@au.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/configs/pleb_defconfig # # MAINTAINERS # 2004/11/24 00:40:36+00:00 peterc@au.rmk.(none) +6 -0 # [PATCH] 2269/2: Updated Pleb-1 support patch for Linux 2.6 # # arch/arm/mach-sa1100/pleb.c # 2004/11/24 00:43:10+00:00 peterc@au.rmk.(none) +154 -0 # [PATCH] 2269/2: Updated Pleb-1 support patch for Linux 2.6 # # arch/arm/mach-sa1100/pleb.c # 2004/11/24 00:43:10+00:00 peterc@au.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-sa1100/pleb.c # # ChangeSet # 2004/11/26 20:57:55+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2273/1: S3C2410 - timex.h CLOCK_TICK_RATE fix # # Patch from Ben Dooks # # CLOCK_TICK_RATE is 12MHz on at least 2 s3c2410 based # machines, or close to it. Although this doesn't seem # to have any effect on loops_per_jiffie, it is best # to try and be accurate. # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # include/asm-arm/arch-s3c2410/timex.h # 2004/11/23 00:30:14+00:00 ben-linux@org.rmk.(none) +4 -3 # [PATCH] 2273/1: S3C2410 - timex.h CLOCK_TICK_RATE fix # # ChangeSet # 2004/11/26 20:52:31+00:00 dsaxena@net.rmk.(none) # [ARM PATCH] 2261/1: Cleanup use of ixp_reg_write in arch/arm/mach-ixp2000 # # Patch from Lennert Buytenhek # # Several files in this directory directly dereference pointers # to on-chip I/O instead of using ixp_reg_write, making them # susceptible to IXP2400 erratum #66. This changset fixes those. # We do not touch any files that will only be built for IXP2800 # systems as the 2800 does not have this issue. # # # Signed-off-by: Lennert Buytenhek # Signed-off-by: Deepak Saxena # Signed-off-by: Russell King # # arch/arm/mach-ixp2000/pci.c # 2004/09/23 01:49:46+01:00 dsaxena@net.rmk.(none) +4 -4 # [PATCH] 2261/1: Cleanup use of ixp_reg_write in arch/arm/mach-ixp2000 # # arch/arm/mach-ixp2000/ixdp2x01.c # 2004/09/23 01:49:41+01:00 dsaxena@net.rmk.(none) +10 -8 # [PATCH] 2261/1: Cleanup use of ixp_reg_write in arch/arm/mach-ixp2000 # # arch/arm/mach-ixp2000/core.c # 2004/09/23 01:49:24+01:00 dsaxena@net.rmk.(none) +1 -1 # [PATCH] 2261/1: Cleanup use of ixp_reg_write in arch/arm/mach-ixp2000 # # ChangeSet # 2004/11/26 20:47:14+00:00 dsaxena@net.rmk.(none) # [ARM PATCH] 2260/1: Rename IXP2000_IRQ_SWI to reduce user confusion # # Patch from Lennert Buytenhek # # IXP2000 interrupt source zero is a software-generated interrupt source, # but it is not an SWI in the ARM sense of the word. Rename the interrupt # source to reduce any confusion. # # # Signed-off-by: Lennert Buytenhek # Signed-off-by: Deepak Saxena # Signed-off-by: Russell King # # include/asm-arm/arch-ixp2000/irqs.h # 2004/10/11 19:54:34+01:00 dsaxena@net.rmk.(none) +1 -1 # [PATCH] 2260/1: Rename IXP2000_IRQ_SWI to reduce user confusion # # arch/arm/mach-ixp2000/core.c # 2004/10/11 19:54:34+01:00 dsaxena@net.rmk.(none) +1 -1 # [PATCH] 2260/1: Rename IXP2000_IRQ_SWI to reduce user confusion # # ChangeSet # 2004/11/26 20:42:00+00:00 dsaxena@net.rmk.(none) # [ARM PATCH] 2259/1: Rip out ixp2000 IRQ_ERR_STATUS demultiplexing # # Patch from Lennert Buytenhek # # There are thirteen different IRQs chained off IRQ_ERR_STATUS, one for # each possible error class that the IXP can signal an interrupt for, but # there are no in-tree users of these interrupts, and it doesn't make much # sense to treat them as separate interrupts if we can just have one # handler checking each of the thirteen errors in one go instead. # # Besides that, the error interrupt handling can't even have been working # properly in the first place as the chained handler was testing the wrong # bits in the IRQ_ERR_STATUS register. # # So this patch rips it all out. # # # Signed-off-by: Lennert Buytenhek # Signed-off-by: Deepak Saxena # Signed-off-by: Russell King # # include/asm-arm/arch-ixp2000/irqs.h # 2004/10/11 20:39:04+01:00 dsaxena@net.rmk.(none) +1 -16 # [PATCH] 2259/1: Rip out ixp2000 IRQ_ERR_STATUS demultiplexing # # arch/arm/mach-ixp2000/core.c # 2004/10/11 20:39:04+01:00 dsaxena@net.rmk.(none) +0 -42 # [PATCH] 2259/1: Rip out ixp2000 IRQ_ERR_STATUS demultiplexing # # ChangeSet # 2004/11/26 20:36:20+00:00 dsaxena@net.rmk.(none) # [ARM PATCH] 2257/1: Add I2C device to IXDP2x01 platforms # # Patch from Deepak Saxena # # Signed-off-by: Deepak Saxena # Signed-off-by: Russell King # # include/asm-arm/arch-ixp2000/ixdp2x01.h # 2004/10/07 19:11:23+01:00 dsaxena@net.rmk.(none) +4 -0 # [PATCH] 2257/1: Add I2C device to IXDP2x01 platforms # # arch/arm/mach-ixp2000/ixdp2x01.c # 2004/10/07 19:11:23+01:00 dsaxena@net.rmk.(none) +16 -1 # [PATCH] 2257/1: Add I2C device to IXDP2x01 platforms # # ChangeSet # 2004/11/26 20:30:27+00:00 dsaxena@net.rmk.(none) # [ARM PATCH] 2255/1: Add IXDPG425 platform support # # Patch from Deepak Saxena # # New IXP425 based platform from Intel. This machine is similar to # an ADI Coyote except for the addition of an on-board NEC ECHI # controller. Patch also fixes issue with board setup for Coyote # (and IXDPG425) that would cause the MTD driver to fail. # # Signed-off-by: Deepak Saxena # Signed-off-by: Russell King # # arch/arm/mach-ixp4xx/coyote-setup.c # 2004/11/17 08:02:45+00:00 dsaxena@net.rmk.(none) +32 -3 # [PATCH] 2255/1: Add IXDPG425 platform support # # arch/arm/mach-ixp4xx/Makefile # 2004/11/17 08:02:33+00:00 dsaxena@net.rmk.(none) +1 -0 # [PATCH] 2255/1: Add IXDPG425 platform support # # arch/arm/mach-ixp4xx/Kconfig # 2004/11/17 08:02:33+00:00 dsaxena@net.rmk.(none) +7 -0 # [PATCH] 2255/1: Add IXDPG425 platform support # # Documentation/arm/IXP4xx # 2004/11/17 08:02:33+00:00 dsaxena@net.rmk.(none) +10 -1 # [PATCH] 2255/1: Add IXDPG425 platform support # # arch/arm/mach-ixp4xx/ixdpg425-pci.c # 2004/11/17 08:02:33+00:00 dsaxena@net.rmk.(none) +65 -0 # [PATCH] 2255/1: Add IXDPG425 platform support # # arch/arm/mach-ixp4xx/ixdpg425-pci.c # 2004/11/17 08:02:33+00:00 dsaxena@net.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-ixp4xx/ixdpg425-pci.c # # ChangeSet # 2004/11/26 09:08:19-08:00 mingo@elte.hu # [PATCH] floppy boot-time detection fix # # When the FDC hardware is initialized, it sometimes generates a floppy # interrupt right away - without being told to. This interrupt can hit # the detection code that executes right after the initialization code, in # particular it can get intermixed with user_reset_fdc() that the # detection code uses. The fd driver is fundamentally single-threaded # when it comes to handling events: an unexpected irq that arrives in the # wrong moment can confuse the reset_fdc() code, which, with softirq and # hardirq threading on, executes in keventd. # # In the stock kernel this stale irq doesnt seem to hit the detection code # in the wrong moment, but i think under certain circumstances it may # still happen. One of the typical incarnations of the race was the # following message: # # reset set in interrupt, calling c0258400 # # and googling for "reset set in interrupt, calling" does turn up a fair # number of bootlogs (most of them 2.4 ones) that show such a detection # failure, so i think upstream wants to have the fix too. # # the fix is simple: delay a bit after initialization, to make sure the # stale irq does not interfere with the detection code. It will be safely # ignored, since do_floppy is still NULL. It might look sloppy that i went # for a delay, but delay i think it is better than waiting for the irq to # occur, because i dont think there's a guarantee that fdc initialization # triggers an interrupt, so waiting for it could hang the boot process. A # delay OTOH is totally harmless. # # The attached patch implements this fix, which resolves the detection # problem on my testbox. # # here's again how a failure looks like: # # Floppy drive(s): fd0 is 1.44M # reset set in interrupt, calling c0258400 # floppy0: no floppy controllers found # # and this is how it works with the fix: # # Floppy drive(s): fd0 is 1.44M # FDC 0 is a post-1991 82077 # # Signed-off-by: Ingo Molnar # Signed-off-by: Linus Torvalds # # drivers/block/floppy.c # 2004/11/25 16:00:00-08:00 mingo@elte.hu +6 -0 # floppy boot-time detection fix # # ChangeSet # 2004/11/26 09:08:06-08:00 axboe@suse.de # [PATCH] bio: fix leak in failure case in bio_copy_user() # # There's a leak in the error case in bio_copy_user(). If we fail # allocating a page or adding a page to the bio, we will leak the bio map # data. # # Signed-off-by: Jens Axboe # Signed-off-by: Linus Torvalds # # fs/bio.c # 2004/11/26 02:47:05-08:00 axboe@suse.de +5 -4 # bio: fix leak in failure case in bio_copy_user() # # ChangeSet # 2004/11/26 09:07:53-08:00 axboe@suse.de # [PATCH] cfq-iosched: fix allocation increment race #3 # # There is a stupid error in cfq-iosched that spews a warning on # (typically) SMP systems because cfqq->allocated[rw] goes below zero. The # error is that the increment on alloc happens outside of the queue lock. # # Signed-off-by: Jens Axboe # Signed-off-by: Linus Torvalds # # drivers/block/cfq-iosched.c # 2004/11/26 00:06:38-08:00 axboe@suse.de +16 -9 # cfq-iosched: fix allocation increment race #3 # # ChangeSet # 2004/11/26 08:45:43-08:00 paulus@samba.org # [PATCH] ppc64: fix hang on legacy iSeries # # Recently we have uncovered a bug in the kernel exception exit path # which can cause iSeries machines to hang with interrupts disabled, # typically when unloading a module. This patch fixes the bug and # should go in 2.6.10. Here is the detailed explanation: # # There are a couple of places in the exception exit path in entry.S # where we disable interrupts and then later reenable them. We # hard-disable interrupts even on legacy iSeries (rather than # soft-disabling them) because the final part of the exception exit path # needs interrupts hard-disabled (even on legacy iSeries), because # otherwise an incoming interrupt could trash SRR0 and SRR1 and cause us # to lose state. # # The intention was that each path that hard-disabled interrupts would # hard-enable them again, either explicitly or by executing an rfid # instruction (return from interrupt, doubleword). However there was # one path where we didn't correctly hard-enable interrupts. This meant # we could end up calling schedule() with interrupts hard-disabled and # then switch to the stopmachine thread (used in removing a module), # which spins polling a variable until another cpu changes it. Since # local_irq_enable() etc. on legacy iSeries only soft-enable interrupts, # we got into the stopmachine thread with interrupts hard-disabled, and # the machine hung at that point. # # This patch fixes it by making sure that when we go to re-enable # interrupts, the MSR value we are loading up actually does have the # MSR.EE (external interrupt enable) bit set. Stephen Rothwell has # verified that this actually does fix the bug on iSeries. The bug # also potentially exists on pSeries (and this patch fixes it), but # there it doesn't really matter, because schedule() will enable # interrupts (and on pSeries that means hard-enabling them), and because # the hypervisor doesn't mind you having interrupts hard-disabled for # extended periods on pSeries. Note that all these comments about # pSeries also apply to POWER5 iSeries (i5) machines. # # While I was there I noticed that we were jumping to ret_from_except # after calling do_IRQ on iSeries, rather than ret_from_except_lite, # meaning that we will restore registers 14-31 twice, unnecessarily. I # changed it to jump to ret_from_except_lite instead, and Stephen # checked that this change doesn't cause any breakage. # # Signed-off-by: Stephen Rothwell # Signed-off-by: Paul Mackerras # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/entry.S # 2004/11/24 14:39:02-08:00 paulus@samba.org +4 -1 # ppc64: fix hang on legacy iSeries # # ChangeSet # 2004/11/25 22:24:35-08:00 torvalds@ppc970.osdl.org # Merge bk://linux-sam.bkbits.net/kbuild # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # init/Kconfig # 2004/11/25 22:24:31-08:00 torvalds@ppc970.osdl.org +0 -1 # Auto merged # # ChangeSet # 2004/11/25 22:21:21-08:00 torvalds@ppc970.osdl.org # Merge bk://kernel.bkbits.net/davem/net-2.6 # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # net/8021q/vlan.c # 2004/11/25 22:21:17-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2004/11/25 16:00:41-08:00 dtor_core@ameritech.net # [PATCH] i8k: fix 'power_status' sysfs permissions # # Signed-off-by: Dmitry Torokhov # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/i8k.c # 2004/11/24 22:42:43-08:00 dtor_core@ameritech.net +1 -1 # i8k: fix 'power_status' sysfs permissions # # ChangeSet # 2004/11/25 16:00:28-08:00 nanhai.zou@intel.com # [PATCH] ia64/x86_64/s390 overlapping vma fix # # IA64 is also vulnerable to the huge-vma-in-executable bug in 64 bit elf # support, it just insert a vma of zero page without checking overlap, so user # can construct a elf with section begin from 0x0 to trigger this BUGON(). # # However, I think it's safe to check overlap before we actually insert a vma # into vma list. And I also feel check vma overlap everywhere is unnecessary, # because invert_vm_struct will check it again, so the check is duplicated. # It's better to have invert_vm_struct return a value then let caller check if # it successes. Here is a patch against 2.6.10.rc2-mm3 I have tested it on # i386, x86_64 and ia64 machines. # # Signed-off-by: Tony Luck # Signed-off-by: Zou Nan hai # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/mmap.c # 2004/11/24 22:42:43-08:00 nanhai.zou@intel.com +3 -2 # ia64/x86_64/s390 overlapping vma fix # # include/linux/mm.h # 2004/11/24 22:42:43-08:00 nanhai.zou@intel.com +1 -1 # ia64/x86_64/s390 overlapping vma fix # # fs/exec.c # 2004/11/24 22:42:43-08:00 nanhai.zou@intel.com +3 -6 # ia64/x86_64/s390 overlapping vma fix # # arch/x86_64/ia32/ia32_binfmt.c # 2004/11/24 22:42:43-08:00 nanhai.zou@intel.com +6 -2 # ia64/x86_64/s390 overlapping vma fix # # arch/s390/kernel/compat_exec.c # 2004/11/24 22:42:43-08:00 nanhai.zou@intel.com +6 -2 # ia64/x86_64/s390 overlapping vma fix # # arch/ia64/mm/init.c # 2004/11/24 22:42:43-08:00 nanhai.zou@intel.com +14 -2 # ia64/x86_64/s390 overlapping vma fix # # arch/ia64/ia32/binfmt_elf32.c # 2004/11/24 22:42:43-08:00 nanhai.zou@intel.com +21 -5 # ia64/x86_64/s390 overlapping vma fix # # ChangeSet # 2004/11/25 16:00:14-08:00 benh@kernel.crashing.org # [PATCH] ppc32: Fix an IRQ issue with cpufreq # # The ppc32 PowerMac cpufreq code, when using the PMU to switch the # frequency, would eventually lose interrupts. The solution is to raise the # CPU priority at the controller level. It's also unnecessary to call the # full PIC suspend/resume code in this case as the IO chip isn't reset, # unlike the sleep code. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc/open_pic.h # 2004/11/24 22:42:43-08:00 benh@kernel.crashing.org +1 -0 # ppc32: Fix an IRQ issue with cpufreq # # arch/ppc/syslib/open_pic.c # 2004/11/24 22:42:43-08:00 benh@kernel.crashing.org +5 -2 # ppc32: Fix an IRQ issue with cpufreq # # arch/ppc/platforms/pmac_cpufreq.c # 2004/11/24 22:42:43-08:00 benh@kernel.crashing.org +4 -6 # ppc32: Fix an IRQ issue with cpufreq # # ChangeSet # 2004/11/25 16:00:01-08:00 trini@kernel.crashing.org # [PATCH] ppc32: Fix __iomem warnings in TODC code # # A trivial fix for the __iomem warnings in arch/ppc/syslib/todc_time.c # # Signed-off-by: Randy Vinson # Signed-off-by: Tom Rini # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/syslib/todc_time.c # 2004/11/24 22:42:43-08:00 trini@kernel.crashing.org +2 -2 # ppc32: Fix __iomem warnings in TODC code # # ChangeSet # 2004/11/25 15:59:48-08:00 trini@kernel.crashing.org # [PATCH] ppc32: Have the 8260 board-hook happen a bit later # # Borut Lukic brought to my attention that in # platform_init() on 8260 the board hook was being called too early to allow for # overrides (e.g. different memory sizings functions or rtc, or anything else). # This moves the call to the end of platform_init() and I suspect fixes some # unnoticed yet bugs in a number of 8260 platforms. # # Signed-off-by: Tom Rini # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/syslib/m8260_setup.c # 2004/11/24 22:42:43-08:00 trini@kernel.crashing.org +3 -3 # ppc32: Have the 8260 board-hook happen a bit later # # ChangeSet # 2004/11/25 15:59:34-08:00 mporter@kernel.crashing.org # [PATCH] ppc32: Fix uninitialized PPC40x vars # # Fix more uninitialized variables in the PPC40x code. # # Signed-off-by: Matt Porter # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/syslib/ppc405_pci.c # 2004/11/24 22:42:42-08:00 mporter@kernel.crashing.org +2 -2 # ppc32: Fix uninitialized PPC40x vars # # arch/ppc/boot/simple/misc-embedded.c # 2004/11/24 22:42:42-08:00 mporter@kernel.crashing.org +1 -1 # ppc32: Fix uninitialized PPC40x vars # # ChangeSet # 2004/11/25 15:59:21-08:00 olof@austin.ibm.com # [PATCH] ppc64: Make early processor spinup based on physical ids # # This changes the early CPU spinup code to be based on physical CPU ID # instead of logical. This will make it possible to kexec off of a # different cpu than 0, for example after it's been hot-unplugged. # # The booted cpu will still be mapped as logical cpu 0, since there's various # stuff in the early boot that assumes logical boot cpuid is 0. # # Also, it expands the kexec boot param structure to allow the booted physical # cpuid to be passed in. This includes bumping the version number to 2 for # backwards compat. # # Signed-off-by: Olof Johansson # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/smp.h # 2004/11/24 22:42:42-08:00 olof@austin.ibm.com +1 -0 # ppc64: Make early processor spinup based on physical ids # # include/asm-ppc64/prom.h # 2004/11/24 22:42:42-08:00 olof@austin.ibm.com +2 -0 # ppc64: Make early processor spinup based on physical ids # # arch/ppc64/kernel/setup.c # 2004/11/24 22:42:42-08:00 olof@austin.ibm.com +21 -0 # ppc64: Make early processor spinup based on physical ids # # arch/ppc64/kernel/prom_init.c # 2004/11/24 22:42:42-08:00 olof@austin.ibm.com +2 -2 # ppc64: Make early processor spinup based on physical ids # # arch/ppc64/kernel/prom.c # 2004/11/24 22:42:42-08:00 olof@austin.ibm.com +13 -4 # ppc64: Make early processor spinup based on physical ids # # arch/ppc64/kernel/pacaData.c # 2004/11/24 22:42:42-08:00 olof@austin.ibm.com +1 -0 # ppc64: Make early processor spinup based on physical ids # # arch/ppc64/kernel/head.S # 2004/11/24 22:42:42-08:00 olof@austin.ibm.com +40 -22 # ppc64: Make early processor spinup based on physical ids # # arch/ppc64/kernel/asm-offsets.c # 2004/11/24 22:42:42-08:00 olof@austin.ibm.com +1 -0 # ppc64: Make early processor spinup based on physical ids # # ChangeSet # 2004/11/25 15:59:08-08:00 anton@samba.org # [PATCH] ppc64: linux,tce* changes # # Remove linux,has-tce-table since we can just look for linux,tce-base and # linux,tce-size. Make linux,tce-base store real addresses instead of virtual # ones, the wrapper may not know the translation the kernel will use. # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/prom_init.c # 2004/11/24 22:46:01-08:00 anton@samba.org +2 -5 # ppc64: linux,tce* changes # # arch/ppc64/kernel/pSeries_iommu.c # 2004/11/24 22:42:42-08:00 anton@samba.org +5 -9 # ppc64: linux,tce* changes # # ChangeSet # 2004/11/25 15:58:54-08:00 anton@samba.org # [PATCH] ppc64: Reserve kernel memory in kernel instead of wrapper # # Reserve the kernel memory (0 - klimit) in the kernel instead of the wrapper. # Remove an old comment that incorrectly referred to klimit. # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/rtas.h # 2004/11/24 22:42:42-08:00 anton@samba.org +1 -1 # ppc64: Reserve kernel memory in kernel instead of wrapper # # arch/ppc64/kernel/prom_init.c # 2004/11/24 22:46:01-08:00 anton@samba.org +0 -5 # ppc64: Reserve kernel memory in kernel instead of wrapper # # arch/ppc64/kernel/prom.c # 2004/11/24 22:46:01-08:00 anton@samba.org +1 -0 # ppc64: Reserve kernel memory in kernel instead of wrapper # # ChangeSet # 2004/11/25 15:58:40-08:00 anton@samba.org # [PATCH] ppc64: linux,rtas* fixes # # Move the linux,rtas* properties into the /rtas node and make them 32bit. Use # rtas-size and avoid duplicating it in linux,rtas-size. # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/rtas.c # 2004/11/24 22:42:42-08:00 anton@samba.org +4 -4 # ppc64: linux,rtas* fixes # # arch/ppc64/kernel/prom_init.c # 2004/11/24 22:46:01-08:00 anton@samba.org +7 -8 # ppc64: linux,rtas* fixes # # ChangeSet # 2004/11/25 15:58:26-08:00 akpm@osdl.org # [PATCH] dont deprecate MODULE_PARM # # Let's revert this for now so all those warnings do not soil our 2.6.10 # release. We'll get Rusty's kernel-wide-sweep fixup patches in for 2.6.11, and # then we can put this warning back. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/module.h # 2004/11/24 22:35:10-08:00 akpm@osdl.org +1 -1 # dont deprecate MODULE_PARM # # ChangeSet # 2004/11/25 15:58:13-08:00 paulus@samba.org # [PATCH] ppc64: remove the volatile from cpus_in_xmon # # Remove the volatile from cpus_in_xmon, and put a barrier() in the loop that # waits for the other cpus to come in to xmon. # # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/xmon/xmon.c # 2004/11/24 22:35:10-08:00 paulus@samba.org +4 -2 # ppc64: remove the volatile from cpus_in_xmon # # ChangeSet # 2004/11/25 15:58:00-08:00 paulus@samba.org # [PATCH] ppc64: fix compilation with recent toolchains # # The ppc64 toolchains don't create dot symbols (i.e. a globally # visible ".foo" symbol for the text of function foo) any more. # # This breaks the kernel compile because we refer to function text # addresses in the system call table. # # Fortunately there is an option, -mcall-aixdesc, which restores the # previous behaviour, and even more fortunately, old ppc64 toolchains # understand the option as well as new ones. # # This patch adds -mcall-aixdesc to CFLAGS in arch/ppc64/Makefile. # # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/Makefile # 2004/11/24 22:35:10-08:00 paulus@samba.org +2 -1 # ppc64: fix compilation with recent toolchains # # ChangeSet # 2004/11/24 15:23:30-05:00 brazilnut@us.ibm.com # [PATCH] pcnet32: added pci_disable_device # # This patch adds pci_disable_device in the appropriate places to # eliminate the following message when removing the module. # # pcnet32 0000:00:05.0: Device was removed without properly calling pci_disable_device(). This may need fixing. # pcnet32 0000:02:05.0: Device was removed without properly calling pci_disable_device(). This may need fixing. # # Tested ia32. # # signed-off-by: Don Fry # Signed-off-by: Jeff Garzik # # drivers/net/pcnet32.c # 2004/11/12 06:17:39-05:00 brazilnut@us.ibm.com +6 -1 # pcnet32: added pci_disable_device # # ChangeSet # 2004/11/24 14:58:54-05:00 akpm@osdl.org # [PATCH] M68k: Update HP300 defconfig (enable DIO and HP Lance Ethernet) # # From: Geert Uytterhoeven # # M68k: Update HP300 defconfig (enable DIO and HP Lance Ethernet) # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Andrew Morton # Signed-off-by: Jeff Garzik # # arch/m68k/configs/hp300_defconfig # 2004/11/22 01:42:53-05:00 akpm@osdl.org +2 -2 # M68k: Update HP300 defconfig (enable DIO and HP Lance Ethernet) # # ChangeSet # 2004/11/24 14:58:41-05:00 akpm@osdl.org # [PATCH] make ibmveth link always up # # From: Santiago Leon # # The attached patch makes the ibmveth driver indicate that its link is # always up rather than always down, thus allowing the userspace side of # booting to configure the network interface correctly. # # Signed-Off-By: Santiago Leon # Signed-off-by: Andrew Morton # Signed-off-by: Jeff Garzik # # drivers/net/ibmveth.c # 2004/11/22 01:42:54-05:00 akpm@osdl.org +1 -1 # make ibmveth link always up # # ChangeSet # 2004/11/24 14:58:29-05:00 akpm@osdl.org # [PATCH] M68k HP Lance Ethernet: Fix leaks on probe/removal # # From: Geert Uytterhoeven # # HP Lance Ethernet: There's tons of leaks in the hplcance probing code, and it # doesn't release the memory region on removal either (from Christoph Hellwig) # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Andrew Morton # Signed-off-by: Jeff Garzik # # drivers/net/hplance.c # 2004/11/22 01:42:53-05:00 akpm@osdl.org +17 -10 # M68k HP Lance Ethernet: Fix leaks on probe/removal # # ChangeSet # 2004/11/24 14:58:18-05:00 akpm@osdl.org # [PATCH] M68k: Update Atari defconfig (enable Ethernet and MII) # # From: Geert Uytterhoeven # # M68k: Update Atari defconfig (enable Ethernet and MII) # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Andrew Morton # Signed-off-by: Jeff Garzik # # arch/m68k/configs/atari_defconfig # 2004/11/22 01:42:53-05:00 akpm@osdl.org +2 -1 # M68k: Update Atari defconfig (enable Ethernet and MII) # # ChangeSet # 2004/11/24 14:58:03-05:00 akpm@osdl.org # [PATCH] tulip: make tulip_stop_rxtx() wait for DMA to fully stop # # From: "John W. Linville" # # tulip_stop_rxtx() doesn't wait for DMA to fully stop like the function # call name implies. # # This was submitted through my employer -- I am not the original author of this # patch. However, I passed it by Jeff Garizk and he expressed interest in # having it upstream. # # Signed-off-by: Grant Grundler # Acked-by: Charlie Brett # Signed-off-by: John W. Linville # Signed-off-by: Andrew Morton # Signed-off-by: Jeff Garzik # # drivers/net/tulip/tulip_core.c # 2004/11/22 01:42:54-05:00 akpm@osdl.org +1 -1 # tulip: make tulip_stop_rxtx() wait for DMA to fully stop # # drivers/net/tulip/tulip.h # 2004/11/22 01:42:54-05:00 akpm@osdl.org +14 -1 # tulip: make tulip_stop_rxtx() wait for DMA to fully stop # # drivers/net/tulip/timer.c # 2004/11/22 01:42:54-05:00 akpm@osdl.org +1 -0 # tulip: make tulip_stop_rxtx() wait for DMA to fully stop # # drivers/net/tulip/pnic2.c # 2004/11/22 01:42:54-05:00 akpm@osdl.org +1 -1 # tulip: make tulip_stop_rxtx() wait for DMA to fully stop # # drivers/net/tulip/pnic.c # 2004/11/22 01:42:54-05:00 akpm@osdl.org +1 -0 # tulip: make tulip_stop_rxtx() wait for DMA to fully stop # # drivers/net/tulip/media.c # 2004/11/22 01:42:54-05:00 akpm@osdl.org +1 -0 # tulip: make tulip_stop_rxtx() wait for DMA to fully stop # # drivers/net/tulip/interrupt.c # 2004/11/22 01:42:54-05:00 akpm@osdl.org +1 -1 # tulip: make tulip_stop_rxtx() wait for DMA to fully stop # # drivers/net/tulip/eeprom.c # 2004/11/22 01:42:54-05:00 akpm@osdl.org +1 -0 # tulip: make tulip_stop_rxtx() wait for DMA to fully stop # # drivers/net/tulip/21142.c # 2004/11/22 01:42:54-05:00 akpm@osdl.org +1 -1 # tulip: make tulip_stop_rxtx() wait for DMA to fully stop # # ChangeSet # 2004/11/24 14:53:50-05:00 akpm@osdl.org # [PATCH] e100: early reset fix # # Gents, what do we think of the below fix? # # Thanks. # # My IBM A21P laptop is getting an IRQ storm at boot. # # IRQ #11 is shared between USB and e100, and USB is getting in there first. # Consequently, when e100 initialises the hardware, that interrupt line is ready # to go. As soon as e100.c runs pci_set_master(), the interrupt hits the CPU. # But of course the e100 driver isn't ready to handle the interrupt yet, so the # system disables IRQ #11. # # This only happens on warm boots (/sbin/reboot). Things work OK from power-on. # So I assume that the BIOS is failing to fully reset the NIC and that some # sort of interrupt is internally pending. # # The patch rearranges e100_probe() so that we issue e100_hw_reset() prior to # running pci_set_master(), and fixes the problem. # # Note that e100_probe() is now running e100_hw_reset() twice - I didn't remove # the later call for general paranoia reasons. # # eepro100.c has the same lockup, and needs a similar fix. # # Signed-off-by: Andrew Morton # Signed-off-by: Jeff Garzik # # drivers/net/e100.c # 2004/11/22 04:44:59-05:00 akpm@osdl.org +10 -8 # e100: early reset fix # # ChangeSet # 2004/11/24 00:07:22-08:00 herbert@gondor.apana.org.au # [NETFILTER]: Apply ipsec to ipt_REJECT packets. # # With help from Patrick McHardy. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ipt_REJECT.c # 2004/11/24 00:07:02-08:00 herbert@gondor.apana.org.au +34 -6 # [NETFILTER]: Apply ipsec to ipt_REJECT packets. # # With help from Patrick McHardy. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/23 23:58:26-08:00 geert@linux-m68k.org # [DIO]: Fix typo in dio_resource_len() # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # include/linux/dio.h # 2004/11/23 23:58:06-08:00 geert@linux-m68k.org +1 -1 # [DIO]: Fix typo in dio_resource_len() # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/23 23:44:28-08:00 janitor@sternwelten.at # [ATM]: Handle register_netdevice_notifier() errors in mpc.c # # Signed-off-by: walter harms # Signed-off-by: Maximilian Attems # Signed-off-by: David S. Miller # # net/atm/mpc.c # 2004/11/23 23:43:55-08:00 janitor@sternwelten.at +6 -1 # [ATM]: Handle register_netdevice_notifier() errors in mpc.c # # ChangeSet # 2004/11/23 23:40:40-08:00 janitor@sternwelten.at # [VLAN]: Handler register_netdevice_notifier() errors. # # Signed-off-by: walter harms # Signed-off-by: Maximilian Attems # Signed-off-by: David S. Miller # # net/8021q/vlan.c # 2004/11/23 23:39:40-08:00 janitor@sternwelten.at +7 -2 # [VLAN]: Handler register_netdevice_notifier() errors. # # ChangeSet # 2004/11/23 19:40:52-08:00 juhl-lkml@dif.dk # [PATCH] remove errornous semicolon in arch/i386/kernel/traps.c::do_general_protection # # Building with gcc -W revealed this warning: # arch/i386/kernel/traps.c: In function `do_general_protection': # arch/i386/kernel/traps.c:506: warning: empty body in an if-statement # # upon inspecting the code I see what looks like a mistakenly placed ";" # # if (!fixup_exception(regs)) { # if (notify_die(DIE_GPF, "general protection fault", regs, # error_code, 13, SIGSEGV) == NOTIFY_STOP); # return; # die("general protection fault", regs, error_code); # } # # That ";" after the second if should go away so the return; before die() # is not unconditional. # # Signed-off-by: Jesper Juhl # Signed-off-by: Linus Torvalds # # arch/i386/kernel/traps.c # 2004/11/23 16:47:27-08:00 juhl-lkml@dif.dk +1 -1 # remove errornous semicolon in arch/i386/kernel/traps.c::do_general_protection # # ChangeSet # 2004/11/23 18:21:09-08:00 kaber@trash.net # [XFRM]: Fix endless loop in xfrm_policy_insert # # The patch 'Fix policy update bug when increasing # priority of last policy' broke this, when a policy # with lower priority than an existing policy is inserted # xfrm_policy_insert loops forever. # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # net/xfrm/xfrm_policy.c # 2004/11/23 18:20:49-08:00 kaber@trash.net +1 -0 # [XFRM]: Fix endless loop in xfrm_policy_insert # # The patch 'Fix policy update bug when increasing # priority of last policy' broke this, when a policy # with lower priority than an existing policy is inserted # xfrm_policy_insert loops forever. # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/23 15:37:57-08:00 juhl-lkml@dif.dk # [SCTP]: Fix static inline declarations. # # Was using 'inline static int' for some strange reason. # GCC now complains about this so... # # Signed-off-by: Jesped Juhl # Signed-off-by: David S. Miller # # include/net/sctp/sctp.h # 2004/11/23 15:37:36-08:00 juhl-lkml@dif.dk +3 -3 # [SCTP]: Fix static inline declarations. # # Was using 'inline static int' for some strange reason. # GCC now complains about this so... # # Signed-off-by: Jesped Juhl # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/23 12:20:14-08:00 tony.luck@intel.com # [IA64] Add add_key, request_key, keyctl syscalls # # Signed-off-by: Tony Luck # # include/asm-ia64/unistd.h # 2004/11/23 12:18:59-08:00 tony.luck@intel.com +3 -0 # Add add_key, request_key, keyctl syscalls # # arch/ia64/kernel/entry.S # 2004/11/23 12:18:30-08:00 tony.luck@intel.com +3 -3 # Add add_key, request_key, keyctl syscalls # # ChangeSet # 2004/11/24 03:34:53+09:00 Brian.Haley@hp.com # [IPV6] improve ipv6_ifa_notify() readability. # # net/ipv6/addrconf.c # 2004/11/24 03:34:41+09:00 Brian.Haley@hp.com +2 -4 # [IPV6] improve ipv6_ifa_notify() readability. # # ChangeSet # 2004/11/23 21:50:01+09:00 yoshfuji@linux-ipv6.org # [IPV6] Clean-up locking in ipv6_add_addr(). # # Use addrconf_hash_lock instead of private lock. # # Signed-off-by: Hideaki YOSHIFUJI # # net/ipv6/addrconf.c # 2004/11/23 21:49:50+09:00 yoshfuji@linux-ipv6.org +15 -19 # [IPV6] Clean-up locking in ipv6_add_addr(). # # Use addrconf_hash_lock instead of private lock. # # Signed-off-by: Hideaki YOSHIFUJI # # ChangeSet # 2004/11/22 21:02:49-08:00 torvalds@evo.osdl.org # acpi: disable PCI links at boot again, fix ELCR # # Len Brown convinced me that the problem with disabling # PCI routing entries wasn't the disable as much as the # fact that ELCR needs to be updated when removing the PCI # routing. So this reverts the previous cset and updates # ELCR as suggested by Len. # # drivers/acpi/pci_link.c # 2004/11/22 21:02:39-08:00 torvalds@evo.osdl.org +3 -0 # acpi: disable PCI links at boot again, fix ELCR # # Len Brown convinced me that the problem with disabling # PCI routing entries wasn't the disable as much as the # fact that ELCR needs to be updated when removing the PCI # routing. So this reverts the previous cset and updates # ELCR as suggested by Len. # # arch/i386/kernel/acpi/boot.c # 2004/11/22 21:02:39-08:00 torvalds@evo.osdl.org +28 -18 # acpi: disable PCI links at boot again, fix ELCR # # Len Brown convinced me that the problem with disabling # PCI routing entries wasn't the disable as much as the # fact that ELCR needs to be updated when removing the PCI # routing. So this reverts the previous cset and updates # ELCR as suggested by Len. # # ChangeSet # 2004/11/22 20:04:42-08:00 manfred99@gmx.ch # [DECNET]: dn_neigh.c needs linux/module.h # # Signed-off-by: David S. Miller # # net/decnet/dn_neigh.c # 2004/11/22 20:04:18-08:00 manfred99@gmx.ch +1 -0 # [DECNET]: dn_neigh.c needs linux/module.h # # ChangeSet # 2004/11/22 20:03:43-08:00 manfred99@gmx.ch # [ATM]: Force -n option in gzip invocation. # # Signed-off-by: David S. Miller # # drivers/atm/Makefile # 2004/11/22 20:03:12-08:00 manfred99@gmx.ch +1 -1 # [ATM]: Force -n option in gzip invocation. # # ChangeSet # 2004/11/23 11:54:38+09:00 yoshfuji@linux-ipv6.org # [IPV6] Stop DAD during shutting down the interface. # # Signed-off-by: Hideaki YOSHIFUJI # # net/ipv6/addrconf.c # 2004/11/23 11:54:12+09:00 yoshfuji@linux-ipv6.org +20 -8 # [IPV6] Stop DAD during shutting down the interface. # # Signed-off-by: Hideaki YOSHIFUJI # # ChangeSet # 2004/11/23 11:52:57+09:00 yoshfuji@linux-ipv6.org # [IPV6] Fix a race when dad completed during shutting down its owner interface. # # Bug was noticed by Herbert Xu . # # Signed-off-by: Hideaki YOSHIFUJI # # net/ipv6/addrconf.c # 2004/11/23 11:52:31+09:00 yoshfuji@linux-ipv6.org +13 -2 # [IPV6] Fix a race when dad completed during shutting down its owner interface. # # Bug was noticed by Herbert Xu . # # Signed-off-by: Hideaki YOSHIFUJI # # ChangeSet # 2004/11/23 11:50:54+09:00 yoshfuji@linux-ipv6.org # [IPV6] Fix possible dead-lock in ipv6_create_tempaddr(). # # If we need to obtain lock both ifp and ifp->idev, we need to do # lock idev first to avoid dead-lock. # # Signed-off-by: Hideaki YOSHIFUJI # # net/ipv6/addrconf.c # 2004/11/23 11:50:28+09:00 yoshfuji@linux-ipv6.org +19 -19 # [IPV6] Fix possible dead-lock in ipv6_create_tempaddr(). # # If we need to obtain lock both ifp and ifp->idev, we need to do # lock idev first to avoid dead-lock. # # Signed-off-by: Hideaki YOSHIFUJI # # ChangeSet # 2004/11/22 23:36:51+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2272/1: S3C2410 - rtc should check for <0 on alarm set # # Patch from Ben Dooks # # Since alarm fields can be ints, there is the posibility # that the alarm set code needs to check for <0 as a # valid posibility for `any` # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # drivers/char/s3c2410-rtc.c # 2004/11/22 22:26:20+00:00 ben-linux@org.rmk.(none) +7 -6 # [PATCH] 2272/1: S3C2410 - rtc should check for <0 on alarm set # # ChangeSet # 2004/11/22 14:43:13-08:00 bjorn.helgaas@hp.com # [IA64] iosapic.c: don't direct interrupts to offline cpus # # Ignore offline CPUs when registering IOSAPIC interrupts. We previously # directed interrupts even to offline CPUs, which means that if you have some # unused CPUs (e.g., you used "maxcpus="), some interrupts won't work. # # This really hurts because distro installs typically use "maxcpus=1". # # Patch by Alex Williamson. # # Signed-off-by: Bjorn Helgaas # Signed-off-by: Tony Luck # # arch/ia64/kernel/iosapic.c # 2004/11/22 14:41:04-08:00 bjorn.helgaas@hp.com +6 -1 # don't direct interrupts to offline cpus # # ChangeSet # 2004/11/22 20:52:26+00:00 dsaxena@net.rmk.(none) # [ARM PATCH] 2270/1: [Trivial] Remove reference to head-armv.S # # Patch from Deepak Saxena # # arch/arm/kernel/head-armv.S is now simply head.S. This patches updates # references in kernel comments. # # Signed-off-by: Deepak Saxena # Signed-off-by: Russell King # # include/asm-arm/procinfo.h # 2004/11/22 19:35:20+00:00 dsaxena@net.rmk.(none) +3 -3 # [PATCH] 2270/1: [Trivial] Remove reference to head-armv.S # # arch/arm/mm/proc-arm720.S # 2004/11/22 19:41:14+00:00 dsaxena@net.rmk.(none) +2 -2 # [PATCH] 2270/1: [Trivial] Remove reference to head-armv.S # # arch/arm/kernel/head.S # 2004/11/22 19:38:41+00:00 dsaxena@net.rmk.(none) +1 -1 # [PATCH] 2270/1: [Trivial] Remove reference to head-armv.S # # Documentation/arm/README # 2004/11/22 19:41:47+00:00 dsaxena@net.rmk.(none) +2 -2 # [PATCH] 2270/1: [Trivial] Remove reference to head-armv.S # # ChangeSet # 2004/11/22 21:32:19+01:00 cp@absolutedigital.net # fix typo in init/Kconfig # # Patch below fixes a typo in init/Kconfig for option CC_ALIGN_FUNCTIONS. # # Signed-off-by: Cal Peake # Signed-off-by: Sam Ravnborg # # init/Kconfig # 2004/11/20 02:18:33+01:00 cp@absolutedigital.net +1 -1 # fix typo in init/Kconfig # # ChangeSet # 2004/11/22 21:30:00+01:00 sam@mars.ravnborg.org # kbuild: Major update of Documentation/kbuild/modules.txt # # Included some of the information given to people developing external modules. # This should answer the typical questions and lay a better ground for adding # new information as needed. # # Signed-off-by: Sam Ravnborg # # Documentation/kbuild/modules.txt # 2004/11/22 21:29:33+01:00 sam@mars.ravnborg.org +419 -68 # Updated! # # ChangeSet # 2004/11/22 10:41:17-08:00 torvalds@ppc970.osdl.org # acpi: don't disable PCI irq links that were active at boot. # # This fixes at least some interrupt polarity setup cases. # The ACPI guys may want to eventually do this differently, but # in the meantime this makes ACPI behaviour closer to non-ACPI # behaviour, and fixes known problems. # # I'll further argue that this protects non-PCI devices that may # just share the irq routing from being screwed, but that may or # may not be an argument that everybody buys into. # # drivers/acpi/pci_link.c # 2004/11/22 10:41:11-08:00 torvalds@ppc970.osdl.org +0 -3 # acpi: don't disable PCI irq links that were active at boot. # # This fixes at least some interrupt polarity setup cases. # The ACPI guys may want to eventually do this differently, but # in the meantime this makes ACPI behaviour closer to non-ACPI # behaviour, and fixes known problems. # # I'll further argue that this protects non-PCI devices that may # just share the irq routing from being screwed, but that may or # may not be an argument that everybody buys into. # # ChangeSet # 2004/11/22 09:47:28-08:00 torvalds@evo.osdl.org # x86: make TF handling at signals consistent. # # This depends on the previous ptrace single-step cleanup, # and makes sure that signal handling does not lose TF events. # # This allows debuggers to trace programs that set TF on their # own. # # arch/i386/kernel/signal.c # 2004/11/22 09:47:16-08:00 torvalds@evo.osdl.org +25 -10 # x86: make TF handling at signals consistent. # # This depends on the previous ptrace single-step cleanup, # and makes sure that signal handling does not lose TF events. # # This allows debuggers to trace programs that set TF on their # own. # # ChangeSet # 2004/11/22 09:45:03-08:00 torvalds@evo.osdl.org # x86: clean up ptrace single-stepping, make PT_DTRACE exact. # # (This makes the naming of "DTRACE" purely historical, since # on x86 it now means "single step in progress"). # # arch/i386/kernel/ptrace.c # 2004/11/22 09:44:52-08:00 torvalds@evo.osdl.org +31 -32 # x86: clean up ptrace single-stepping, make PT_DTRACE exact. # # (This makes the naming of "DTRACE" purely historical, since # on x86 it now means "single step in progress"). # # ChangeSet # 2004/11/22 08:44:52-08:00 kraxel@bytesex.org # [PATCH] tuner update # # Update for the tuner module: add support for a new tuner chip. # # Signed-off-by: Gerd Knorr # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/media/tuner.h # 2004/11/21 22:46:21-08:00 kraxel@bytesex.org +1 -0 # tuner update # # drivers/media/video/tuner.c # 2004/11/21 22:46:21-08:00 kraxel@bytesex.org +12 -4 # tuner update # # drivers/media/video/tda9887.c # 2004/11/21 22:46:21-08:00 kraxel@bytesex.org +1 -0 # tuner update # # ChangeSet # 2004/11/22 08:44:39-08:00 kraxel@bytesex.org # [PATCH] v4l: more modparam # # convert more modules to new-style insmod options. # # Signed-off-by: Gerd Knorr # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/tvmixer.c # 2004/11/21 22:46:19-08:00 kraxel@bytesex.org +1 -1 # v4l: more modparam # # drivers/media/video/tvaudio.c # 2004/11/21 22:46:19-08:00 kraxel@bytesex.org +14 -14 # v4l: more modparam # # ChangeSet # 2004/11/22 08:44:27-08:00 kraxel@bytesex.org # [PATCH] v4l: disable unused function. # # #ifdef out a currently unused (in-kernel) function, lets see if any # out-of-kernel users cry. If not we can drop it altogether later on. # # Signed-off-by: Gerd Knorr # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/v4l2-common.c # 2004/11/21 22:46:19-08:00 kraxel@bytesex.org +3 -1 # v4l: disable unused function. # # ChangeSet # 2004/11/22 08:44:14-08:00 kraxel@bytesex.org # [PATCH] video-buf oops/crash fixes # # Some places which need adaption to the last video-buf API change where # forgotten, this patches fixes them up. Hope I really caught them all now. # # Signed-off-by: Gerd Knorr # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/saa7134/saa7134-video.c # 2004/11/21 22:46:16-08:00 kraxel@bytesex.org +3 -3 # video-buf oops/crash fixes # # drivers/media/video/cx88/cx88-video.c # 2004/11/21 22:46:16-08:00 kraxel@bytesex.org +1 -1 # video-buf oops/crash fixes # # drivers/media/video/bttv-driver.c # 2004/11/21 22:46:16-08:00 kraxel@bytesex.org +4 -4 # video-buf oops/crash fixes # # ChangeSet # 2004/11/22 08:44:01-08:00 kernel@obster.org # [PATCH] mc146818rtc.h include fix # # Prevents user-space including spinlock.h which breaks the build. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/mc146818rtc.h # 2004/11/21 22:46:15-08:00 kernel@obster.org +3 -1 # mc146818rtc.h include fix # # ChangeSet # 2004/11/22 08:43:50-08:00 cp@absolutedigital.net # [PATCH] fix typo in init/Kconfig # # Patch below fixes a typo in init/Kconfig for option CC_ALIGN_FUNCTIONS. # # Signed-off-by: Cal Peake # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # init/Kconfig # 2004/11/21 22:42:30-08:00 cp@absolutedigital.net +1 -1 # fix typo in init/Kconfig # # ChangeSet # 2004/11/22 08:43:37-08:00 rmk@arm.linux.org.uk # [PATCH] smc91c92_cs outw() fix # # The patch below fixes wrong arguments to outw in smc91c92_cs.c # # Signed-off-by: Russell King # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/net/pcmcia/smc91c92_cs.c # 2004/11/21 22:42:29-08:00 rmk@arm.linux.org.uk +1 -1 # smc91c92_cs outw() fix # # ChangeSet # 2004/11/22 08:43:25-08:00 pmeda@akamai.com # [PATCH] /proc/cmdline missing mmput # # Fix the mmput bug introduced while fixing cmdline race. # # Signed-off-by: Prasanna Meda # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/proc/base.c # 2004/11/21 22:42:29-08:00 pmeda@akamai.com +2 -2 # /proc/cmdline missing mmput # # ChangeSet # 2004/11/22 08:43:12-08:00 Tim_T_Murphy@Dell.com # [PATCH] serial: add support for Dell Remote Access Card 4. # # Here's a patch to include Dell's 4th generation Remote Access Controller # ids. # # Acked-by: Russell King # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/pci_ids.h # 2004/11/21 22:42:29-08:00 Tim_T_Murphy@Dell.com +1 -0 # serial: add support for Dell Remote Access Card 4. # # drivers/serial/8250_pci.c # 2004/11/21 22:42:29-08:00 Tim_T_Murphy@Dell.com +7 -0 # serial: add support for Dell Remote Access Card 4. # # ChangeSet # 2004/11/22 08:42:58-08:00 sds@epoch.ncsc.mil # [PATCH] SELinux: map Unix seqpacket sockets to appropriate security class # # This patch for SELinux fixes a bug in the mapping of socket types to # security classes and ensures that Unix seqpacket sockets are mapped to an # appropriate security class. The Unix stream security class is re-used in # this case as it has the same permission checking applied as for seqpacket. # # Signed-off-by: Stephen Smalley # Signed-off-by: James Morris # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # security/selinux/hooks.c # 2004/11/21 22:42:29-08:00 sds@epoch.ncsc.mil +3 -0 # SELinux: map Unix seqpacket sockets to appropriate security class # # ChangeSet # 2004/11/21 19:05:05-08:00 benh@kernel.crashing.org # [PATCH] del_timer() vs. mod_timer() SMP race # # We just spent some days fighting a rare race in one of the distro's who backported # some of timer.c from 2.6 to 2.4 (though they missed a bit). # # The actual race we found didn't happen in 2.6 _but_ code inspection showed that a # similar race is still present in 2.6, explanation below: # # Code removing a timer from a list (run_timers or del_timer) takes that CPU list # lock, does list_del, then timer->base = NULL. # # It is mandatory that this timer->base = NULL is visible to other CPUs only after # the list_del() is complete. If not, then mod timer could see it NULL, thus take it's # own CPU list lock and not the one for the CPU the timer was beeing removed from the # list, and thus the list_add in mod_timer() could race with the list_del() from # run_timers() or del_timer(). # # Our race happened with run_timers(), which _DOES_ contain a proper smp_wmb() in the # right spot in 2.6, but didn't in the "backport" we were fighting with. # # However, del_timer() doesn't have such a barrier, and thus is subject to this race in # 2.6 as well. This patch fixes it. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # kernel/timer.c # 2004/11/21 18:35:39-08:00 benh@kernel.crashing.org +2 -0 # del_timer() vs. mod_timer() SMP race # # ChangeSet # 2004/11/21 18:20:56-08:00 benh@kernel.crashing.org # [PATCH] ppc64: Fix early serial setup baud rate # # The "udbg" code used on ppc64 for early consoles including early serial # console recently got a new "default speed" option. This was implemented # as a switch case that missed a few important cases, one beeing necessary # for a board beeing released soon. # # This patch fixes it by using the proper division to calculate the dll # value for the uart instead of that bogus switch/case. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/udbg.c # 2004/11/21 16:59:48-08:00 benh@kernel.crashing.org +3 -14 # ppc64: Fix early serial setup baud rate # # ChangeSet # 2004/11/21 18:20:43-08:00 benh@kernel.crashing.org # [PATCH] ppc64: pci_bus_to_host() simplification # # The pci_bus_to_host() inline function used on ppc64 to find the pci_contoller # structure a give pci_bus resides on used to contain bogus tree walking code, # which fortunately ended up never beeing necessary since "sysdata" always points # to a device_node structure that has the proper "phb" field (even if it is not # the device-node of the actual P2P, which happens during boot). # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # include/asm-ppc64/pci-bridge.h # 2004/11/21 17:45:53-08:00 benh@kernel.crashing.org +2 -10 # ppc64: pci_bus_to_host() simplification # # ChangeSet # 2004/11/21 18:20:31-08:00 benh@kernel.crashing.org # [PATCH] ppc64: Fix typo when parsing isa "reg" properties # # This patch fixes a typo in the code that parse Open Firmware properties # for devices under an "isa" node, the incorrect struct size was used when # parsing the "reg" property of these. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/prom.c # 2004/11/21 16:59:43-08:00 benh@kernel.crashing.org +1 -1 # ppc64: Fix typo when parsing isa "reg" properties # # ChangeSet # 2004/11/21 18:20:18-08:00 benh@kernel.crashing.org # [PATCH] ppc64: Fix default command line # # The ppc64 kernel can be built with a default command line (CONFIG_CMDLINE) # for cases where none is provided by the firmware. # # However, some OF implementation always pass a "bootargs" property that only # contains the "0" terminating byte of a C string which caused us to think # there was a command line, and not use the built-in one. This patch fixes it. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/prom.c # 2004/11/21 17:45:42-08:00 benh@kernel.crashing.org +1 -1 # ppc64: Fix default command line # # ChangeSet # 2004/11/21 17:22:56-08:00 adaplas@hotpop.com # [PATCH] fbdev: Fix module_param in rivafb # # third argument in module_param is the sysfs permission not a default # value. This fixes things for rivafb in 2.6.10-rc2: # # Signed-Off-By: Guido Guenther # Signed-off-by: Antonino Daplas # Signed-off-by: Linus Torvalds # # drivers/video/riva/fbdev.c # 2004/11/19 16:38:47-08:00 adaplas@hotpop.com +2 -2 # fbdev: Fix module_param in rivafb # # ChangeSet # 2004/11/21 17:22:42-08:00 adaplas@hotpop.com # [PATCH] fbdev: Add NV30 pci_id and cleanup of probe error returns # # From Guido Guenther # # this patch against 2.6.10-rc2 finally detects rivafb on NV30 based power # books by adding the pciid. Wolfram Quester tested it and reported it # working. It also cleans up the error code reported from the probe # function. # # From Antonino Daplas # - do not validate mode if monitor specifications are not available # # Signed-Off-By: Guido Guenther # Signed-off-by: Antonino Daplas # Signed-off-by: Linus Torvalds # # include/linux/pci_ids.h # 2004/11/18 06:50:56-08:00 adaplas@hotpop.com +1 -0 # fbdev: Add NV30 pci_id and cleanup of probe error returns # # drivers/video/riva/fbdev.c # 2004/11/21 14:48:45-08:00 adaplas@hotpop.com +43 -30 # fbdev: Add NV30 pci_id and cleanup of probe error returns # # ChangeSet # 2004/11/21 17:22:29-08:00 adaplas@hotpop.com # [PATCH] fbdev: Fix lockup when switching to/from X/console # # - Do a set_par very late instead of during fbcon_blank by setting the # FBINFO_MISC_MODESWITCHLATE flag which should help prevent # lockups when switching from X # - Shorten chipset names that were missed before # - Do not validate modeline if monitor specifications are not available # # Signed-off-by: Antonino Daplas # Signed-off-by: Linus Torvalds # # drivers/video/savage/savagefb.c # 2004/11/21 14:44:00-08:00 adaplas@hotpop.com +9 -7 # fbdev: Fix lockup when switching to/from X/console # # ChangeSet # 2004/11/21 17:22:16-08:00 adaplas@hotpop.com # [PATCH] fbdev: Fix screen corruption in neofb # # This patch fixes the screen corruption resulting from neofb cleanup. # # Signed-off-by: Antonino Daplas # Signed-off-by: Linus Torvalds # # drivers/video/neofb.c # 2004/11/19 17:25:43-08:00 adaplas@hotpop.com +2 -3 # fbdev: Fix screen corruption in neofb # # ChangeSet # 2004/11/21 17:22:03-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] fix for breakage introduced in hgafb.c # # ChangeSet "adaplas: [PATCH] fbdev: Add __iomem annotations to hgafb" had # actually broken it - it not only added a (useless) cast in rowaddr(), it # had also added a dereferencing. # # Since it is video memory and since we do memory transfers on the # resulting "address"... IOW, it's even exploitable - not that there had # been a lot of HGA boxen out there, but... # # This restores the intended behaviour. # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/video/hgafb.c # 2004/11/21 10:49:14-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # fix for breakage introduced in hgafb.c # # ChangeSet # 2004/11/21 13:15:42-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] isdn_divert annotations # # missing __user annotations + removal of gratitious casts in LHS of # assignments. # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/isdn/divert/divert_procfs.c # 2004/11/21 02:51:48-08:00 viro@parcelfarce.linux.theplanet.co.uk +7 -7 # isdn_divert annotations # # ChangeSet # 2004/11/21 13:15:29-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] ncr iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/scsi/sym53c8xx_defs.h # 2004/11/21 02:50:56-08:00 viro@parcelfarce.linux.theplanet.co.uk +16 -16 # ncr iomem annotations # # drivers/scsi/ncr53c8xx.h # 2004/11/21 02:50:56-08:00 viro@parcelfarce.linux.theplanet.co.uk +3 -3 # ncr iomem annotations # # drivers/scsi/ncr53c8xx.c # 2004/11/21 02:50:56-08:00 viro@parcelfarce.linux.theplanet.co.uk +4 -4 # ncr iomem annotations # # drivers/scsi/NCR_Q720.c # 2004/11/21 02:50:56-08:00 viro@parcelfarce.linux.theplanet.co.uk +6 -6 # ncr iomem annotations # # ChangeSet # 2004/11/21 13:15:16-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] 3w-9xxx iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/scsi/3w-9xxx.h # 2004/11/21 02:50:56-08:00 viro@parcelfarce.linux.theplanet.co.uk +5 -5 # 3w-9xxx iomem annotations # # ChangeSet # 2004/11/21 13:15:03-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] dpt_i2o partial iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/scsi/dpti.h # 2004/11/21 02:50:55-08:00 viro@parcelfarce.linux.theplanet.co.uk +10 -10 # dpt_i2o partial iomem annotations # # drivers/scsi/dpt_i2o.c # 2004/11/21 02:50:55-08:00 viro@parcelfarce.linux.theplanet.co.uk +26 -26 # dpt_i2o partial iomem annotations # # ChangeSet # 2004/11/21 13:14:51-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] pcbit fix # # direct dereferencing of iomem pointer. # [not sure who maintains that one, so no Cc] # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/isdn/pcbit/drv.c # 2004/11/21 02:51:28-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # pcbit fix # # ChangeSet # 2004/11/21 13:14:38-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] imsttfb iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/video/imsttfb.c # 2004/11/21 02:51:36-08:00 viro@parcelfarce.linux.theplanet.co.uk +6 -6 # imsttfb iomem annotations # # ChangeSet # 2004/11/21 13:14:25-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] zoran fix # # direct dereferencing of ioremapped memory. # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/media/video/zoran_driver.c # 2004/11/21 02:51:29-08:00 viro@parcelfarce.linux.theplanet.co.uk +5 -5 # zoran fix # # ChangeSet # 2004/11/21 13:14:12-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] sound/oss iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # sound/oss/ymfpci.h # 2004/11/21 02:51:27-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # sound/oss iomem annotations # # sound/oss/rme96xx.c # 2004/11/21 02:51:27-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # sound/oss iomem annotations # # sound/oss/nm256_audio.c # 2004/11/21 02:51:27-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # sound/oss iomem annotations # # sound/oss/nm256.h # 2004/11/21 02:51:27-08:00 viro@parcelfarce.linux.theplanet.co.uk +5 -5 # sound/oss iomem annotations # # sound/oss/kahlua.c # 2004/11/21 02:51:27-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # sound/oss iomem annotations # # sound/oss/i810_audio.c # 2004/11/21 02:51:27-08:00 viro@parcelfarce.linux.theplanet.co.uk +2 -2 # sound/oss iomem annotations # # sound/oss/cs46xx.c # 2004/11/21 02:51:27-08:00 viro@parcelfarce.linux.theplanet.co.uk +7 -7 # sound/oss iomem annotations # # sound/oss/cs4281/cs4281m.c # 2004/11/21 02:51:27-08:00 viro@parcelfarce.linux.theplanet.co.uk +2 -1 # sound/oss iomem annotations # # sound/oss/btaudio.c # 2004/11/21 02:51:27-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # sound/oss iomem annotations # # ChangeSet # 2004/11/21 13:13:58-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] drivers/w1 iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/w1/matrox_w1.c # 2004/11/21 02:51:14-08:00 viro@parcelfarce.linux.theplanet.co.uk +7 -6 # drivers/w1 iomem annotations # # ChangeSet # 2004/11/21 13:13:46-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] more C99 initializers # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/media/video/msp3400.c # 2004/11/21 02:51:13-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # more C99 initializers # # drivers/media/dvb/frontends/stv0299.c # 2004/11/21 02:51:13-08:00 viro@parcelfarce.linux.theplanet.co.uk +3 -3 # more C99 initializers # # ChangeSet # 2004/11/21 13:13:33-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] misc __user annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # sound/oss/soundcard.c # 2004/11/21 02:51:13-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # misc __user annotations # # net/ipv4/netfilter/ipt_CLUSTERIP.c # 2004/11/21 02:51:13-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # misc __user annotations # # net/atm/svc.c # 2004/11/21 02:51:13-08:00 viro@parcelfarce.linux.theplanet.co.uk +3 -3 # misc __user annotations # # net/8021q/vlan.c # 2004/11/21 02:51:13-08:00 viro@parcelfarce.linux.theplanet.co.uk +2 -2 # misc __user annotations # # fs/ext3/ioctl.c # 2004/11/21 02:51:13-08:00 viro@parcelfarce.linux.theplanet.co.uk +4 -4 # misc __user annotations # # drivers/media/video/cx88/cx88-video.c # 2004/11/21 02:51:13-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # misc __user annotations # # drivers/media/video/cx88/cx88-blackbird.c # 2004/11/21 02:51:13-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # misc __user annotations # # drivers/media/dvb/ttpci/av7110_hw.c # 2004/11/21 02:51:13-08:00 viro@parcelfarce.linux.theplanet.co.uk +2 -2 # misc __user annotations # # ChangeSet # 2004/11/21 13:13:20-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] cpqphp_nvram iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/pci/hotplug/cpqphp_nvram.c # 2004/11/21 02:51:12-08:00 viro@parcelfarce.linux.theplanet.co.uk +6 -6 # cpqphp_nvram iomem annotations # # ChangeSet # 2004/11/21 13:13:07-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] i2o iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # include/linux/i2o.h # 2004/11/21 02:51:12-08:00 viro@parcelfarce.linux.theplanet.co.uk +7 -7 # i2o iomem annotations # # drivers/message/i2o/iop.c # 2004/11/21 02:51:12-08:00 viro@parcelfarce.linux.theplanet.co.uk +12 -12 # i2o iomem annotations # # drivers/message/i2o/i2o_scsi.c # 2004/11/21 02:51:12-08:00 viro@parcelfarce.linux.theplanet.co.uk +5 -4 # i2o iomem annotations # # drivers/message/i2o/i2o_config.c # 2004/11/21 02:51:12-08:00 viro@parcelfarce.linux.theplanet.co.uk +6 -6 # i2o iomem annotations # # drivers/message/i2o/i2o_block.c # 2004/11/21 02:51:12-08:00 viro@parcelfarce.linux.theplanet.co.uk +7 -7 # i2o iomem annotations # # drivers/message/i2o/exec-osm.c # 2004/11/21 02:51:10-08:00 viro@parcelfarce.linux.theplanet.co.uk +6 -6 # i2o iomem annotations # # drivers/message/i2o/driver.c # 2004/11/21 02:51:07-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # i2o iomem annotations # # drivers/message/i2o/device.c # 2004/11/21 02:51:02-08:00 viro@parcelfarce.linux.theplanet.co.uk +2 -2 # i2o iomem annotations # # ChangeSet # 2004/11/21 13:12:53-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] pc300 portability fixes # # 64bit portability fixes - as it is, driver had been broken on all 64bit # platforms except alpha. # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/net/wan/pc300_drv.c # 2004/11/21 02:50:57-08:00 viro@parcelfarce.linux.theplanet.co.uk +26 -26 # pc300 portability fixes # # drivers/net/wan/pc300.h # 2004/11/21 02:50:57-08:00 viro@parcelfarce.linux.theplanet.co.uk +4 -8 # pc300 portability fixes # # ChangeSet # 2004/11/20 14:27:00-08:00 alexander.kern@siemens.com # [PATCH] USB quirk section fix # # usb_early_handoff is referenced from __devinit and hence should be # __devinitdata. # # Acked-by: Greg Kroah-Hartman # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/pci/quirks.c # 2004/11/20 13:51:03-08:00 alexander.kern@siemens.com +1 -1 # USB quirk section fix # # ChangeSet # 2004/11/20 14:26:47-08:00 agruen@suse.de # [PATCH] compat_sys_fcntl[64] contain superfluous, buggy test # # here is a fix to a previous ChangeSet from John; 32-bit emulation of flock(fd, # F_GETLK, &lock) currently is broken. # # The ChangeSet: # http://linux.bkbits.net:8080/linux-2.5/cset%404152257aJKu1UClRcfvhsK6IjGYSeQ?nav=index.html|ChangeSet@-12w # from John Engel fixes an off-by-one error and according # to the ChangeSet comment, it also contains a fix to handle l_len < 0 which # is now defined in POSIX 1003.1-2001 from the fcntl man page. # # Gordon Jin reports that the added test causes # compat_sys_fcntl[64] to fail: If fcntl(fd, F_GETLK, &lock) finds no # conflicting lock it sets l_whence to F_UNLCK, leaves all the other fields # unchanged, and returns 0. The (f.l_start < 0) test wrongly converts this # to an EINVAL result. # # The underlying sys_fcntl function which compat_sys_fcntl and # compat_sys_fcntl64 invoke already handles POSIX behavior correctly. The # additional tests in the compat wrappers are not needed. # # Here is a test case; its expected result is: # # PASS # get flock: l_type=1, l_whence=0, l_start=145, l_len=10 # # #include # #include # #include # #include # #include # # int # main(int argc, char *argv[]) # { # int fd; # struct flock fl; # char buf[255]; # # fl.l_type = F_WRLCK; # fl.l_whence = SEEK_END; # fl.l_start = -100; # fl.l_len = -10; # /* # fl.l_whence = SEEK_SET; # fl.l_start = 100; # fl.l_len = 10; # */ # # switch(fork()) { # case -1: # perror("fork"); # exit(-1); # # case 0: # fd = open("/tmp/testfile", O_RDWR|O_CREAT, 0600); # if (fd == -1) { # perror("open"); # exit(-1); # } # # if (write(fd, buf, 255) == -1) { # perror("write"); # exit(-1); # } # if (fcntl(fd, F_SETLK, &fl) == -1) { # perror("F_SETLK"); # exit(-1); # } # sleep(2); # break; # # default: # sleep(1); # fd = open("/tmp/testfile", O_RDWR|O_CREAT, 0600); # if (fd == -1) { # perror("open"); # exit(-1); # } # # if (fcntl(fd, F_SETLK, &fl) != -1 || errno != EAGAIN) { # perror("F_SETLK"); # exit(1); # } # # fl.l_type = F_WRLCK; # /* # fl.l_whence = SEEK_SET; # fl.l_start = 0; # fl.l_len = 0; # */ # if (fcntl(fd, F_GETLK, &fl) == -1) { # perror("F_GETLK"); # printf("FAIL\n"); # exit(-1); # } # printf("PASS\n"); # printf("get flock: l_type=%d, l_whence=%d, l_start=%zd, " # "l_len=%zd\n", fl.l_type, fl.l_whence, # (size_t) fl.l_start, (size_t) fl.l_len); # break; # } # exit(0); # } # # Signed-off-by: Andreas Gruenbacher # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/compat.c # 2004/11/19 07:12:56-08:00 agruen@suse.de +2 -16 # compat_sys_fcntl[64] contain superfluous, buggy test # # ChangeSet # 2004/11/20 14:26:34-08:00 akpm@osdl.org # [PATCH] x86_64: duplicated patch # # We ended up adding this patch twice. # # Cc: # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/smp.h # 2004/11/20 02:15:21-08:00 akpm@osdl.org +0 -5 # x86_64: duplicated patch # # ChangeSet # 2004/11/20 14:16:38-08:00 viro@www.linux.org.uk # [PATCH] (4/4) eicon iomem annotations and fixes # # * s_4bri.c has a nasty typo - bogus & in qBri_cpu_trapped(). # # We have # void *base; # followed by # regs[0] = READ_DWORD((&base + offset) + 0x70); # # which is *NOT* what is meant there - instead of access to memory # pointed to by base we get access to _stack_ at some offset from the # place where the local variable base lives. # # Signed-off-by: Armin Schindler # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/isdn/hardware/eicon/s_4bri.c # 2004/11/19 05:53:39-08:00 viro@www.linux.org.uk +4 -4 # (4/4) eicon iomem annotations and fixes # # ChangeSet # 2004/11/20 14:16:25-08:00 viro@www.linux.org.uk # [PATCH] (3/4) eicon iomem annotations and fixes # # * new helpers - READ_BYTE() and WRITE_BYTE(). On Linux they are # needed, since direct access to iomem pointers is not allowed (and # does not work on some architectures). # * memcpy() to/from iomem is not allowed on Linux (same story). # # Proper primitives are memcpy_toio() and memcpy_fromio(). Several places # misused memcpy(); switched to memcpy_{to,from}io(). # # Signed-off-by: Armin Schindler # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/isdn/hardware/eicon/s_pri.c # 2004/11/19 05:53:37-08:00 viro@www.linux.org.uk +8 -8 # (3/4) eicon iomem annotations and fixes # # drivers/isdn/hardware/eicon/s_4bri.c # 2004/11/19 05:53:37-08:00 viro@www.linux.org.uk +4 -4 # (3/4) eicon iomem annotations and fixes # # drivers/isdn/hardware/eicon/platform.h # 2004/11/19 05:53:37-08:00 viro@www.linux.org.uk +2 -0 # (3/4) eicon iomem annotations and fixes # # drivers/isdn/hardware/eicon/os_pri.c # 2004/11/19 05:53:37-08:00 viro@www.linux.org.uk +14 -11 # (3/4) eicon iomem annotations and fixes # # drivers/isdn/hardware/eicon/os_4bri.c # 2004/11/19 05:53:37-08:00 viro@www.linux.org.uk +5 -5 # (3/4) eicon iomem annotations and fixes # # drivers/isdn/hardware/eicon/io.c # 2004/11/19 05:53:37-08:00 viro@www.linux.org.uk +6 -6 # (3/4) eicon iomem annotations and fixes # # ChangeSet # 2004/11/20 14:16:11-08:00 viro@www.linux.org.uk # [PATCH] (2/4) eicon iomem annotations and fixes # # * added __iomem to declarations of iomem pointers # # Signed-off-by: Armin Schindler # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/isdn/hardware/eicon/xdi_adapter.h # 2004/11/19 05:53:37-08:00 viro@www.linux.org.uk +1 -1 # (2/4) eicon iomem annotations and fixes # # drivers/isdn/hardware/eicon/s_pri.c # 2004/11/19 05:53:37-08:00 viro@www.linux.org.uk +9 -9 # (2/4) eicon iomem annotations and fixes # # drivers/isdn/hardware/eicon/s_bri.c # 2004/11/19 05:53:37-08:00 viro@www.linux.org.uk +6 -6 # (2/4) eicon iomem annotations and fixes # # drivers/isdn/hardware/eicon/s_4bri.c # 2004/11/19 05:53:37-08:00 viro@www.linux.org.uk +25 -25 # (2/4) eicon iomem annotations and fixes # # drivers/isdn/hardware/eicon/platform.h # 2004/11/19 05:53:37-08:00 viro@www.linux.org.uk +6 -6 # (2/4) eicon iomem annotations and fixes # # drivers/isdn/hardware/eicon/os_pri.c # 2004/11/19 05:53:37-08:00 viro@www.linux.org.uk +19 -17 # (2/4) eicon iomem annotations and fixes # # drivers/isdn/hardware/eicon/os_bri.c # 2004/11/19 05:53:37-08:00 viro@www.linux.org.uk +12 -11 # (2/4) eicon iomem annotations and fixes # # drivers/isdn/hardware/eicon/os_4bri.c # 2004/11/19 05:53:37-08:00 viro@www.linux.org.uk +12 -12 # (2/4) eicon iomem annotations and fixes # # drivers/isdn/hardware/eicon/io.h # 2004/11/19 05:53:36-08:00 viro@www.linux.org.uk +12 -12 # (2/4) eicon iomem annotations and fixes # # drivers/isdn/hardware/eicon/io.c # 2004/11/19 05:53:36-08:00 viro@www.linux.org.uk +22 -26 # (2/4) eicon iomem annotations and fixes # # drivers/isdn/hardware/eicon/divasmain.c # 2004/11/19 05:53:36-08:00 viro@www.linux.org.uk +10 -12 # (2/4) eicon iomem annotations and fixes # # drivers/isdn/hardware/eicon/diva_pci.h # 2004/11/19 05:53:36-08:00 viro@www.linux.org.uk +2 -2 # (2/4) eicon iomem annotations and fixes # # ChangeSet # 2004/11/20 14:15:57-08:00 viro@www.linux.org.uk # [PATCH] (1/4) eicon iomem annotations and fixes # # * adds new helpers ({GET,PUT}_{WORD,DWORD}) parallel to READ_WORD # et.al., but used on normal memory instead of iomem. Instances of # READ_WORD and friends that are applied to vmalloc'ed memory and local # variables switched to new helpers. # # Signed-off-by: Armin Schindler # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/isdn/hardware/eicon/s_bri.c # 2004/11/19 05:53:36-08:00 viro@www.linux.org.uk +5 -5 # (1/4) eicon iomem annotations and fixes # # drivers/isdn/hardware/eicon/platform.h # 2004/11/19 05:53:36-08:00 viro@www.linux.org.uk +20 -0 # (1/4) eicon iomem annotations and fixes # # drivers/isdn/hardware/eicon/message.c # 2004/11/19 05:53:36-08:00 viro@www.linux.org.uk +394 -394 # (1/4) eicon iomem annotations and fixes # # drivers/isdn/hardware/eicon/maintidi.c # 2004/11/19 05:53:36-08:00 viro@www.linux.org.uk +5 -5 # (1/4) eicon iomem annotations and fixes # # drivers/isdn/hardware/eicon/io.c # 2004/11/19 05:53:36-08:00 viro@www.linux.org.uk +4 -4 # (1/4) eicon iomem annotations and fixes # # drivers/isdn/hardware/eicon/di.c # 2004/11/19 05:53:36-08:00 viro@www.linux.org.uk +11 -11 # (1/4) eicon iomem annotations and fixes # # drivers/isdn/hardware/eicon/capifunc.c # 2004/11/19 05:53:32-08:00 viro@www.linux.org.uk +21 -21 # (1/4) eicon iomem annotations and fixes # # ChangeSet # 2004/11/20 14:15:44-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] drivers/media annotations # # trivial iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # include/media/saa7146.h # 2004/11/19 05:52:59-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # drivers/media annotations # # drivers/media/video/zoran_driver.c # 2004/11/19 05:52:59-08:00 viro@parcelfarce.linux.theplanet.co.uk +2 -2 # drivers/media annotations # # drivers/media/video/zoran.h # 2004/11/19 05:52:59-08:00 viro@parcelfarce.linux.theplanet.co.uk +3 -3 # drivers/media annotations # # drivers/media/video/saa7146.h # 2004/11/19 05:52:58-08:00 viro@parcelfarce.linux.theplanet.co.uk +3 -3 # drivers/media annotations # # drivers/media/video/saa7134/saa7134.h # 2004/11/19 05:52:58-08:00 viro@parcelfarce.linux.theplanet.co.uk +2 -2 # drivers/media annotations # # drivers/media/video/saa7134/saa7134-core.c # 2004/11/19 05:52:58-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # drivers/media annotations # # drivers/media/video/meye.h # 2004/11/19 05:52:58-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # drivers/media annotations # # drivers/media/video/cx88/cx88.h # 2004/11/19 05:52:58-08:00 viro@parcelfarce.linux.theplanet.co.uk +2 -2 # drivers/media annotations # # drivers/media/video/cx88/cx88-core.c # 2004/11/19 05:52:53-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # drivers/media annotations # # drivers/media/video/bttvp.h # 2004/11/19 05:52:50-08:00 viro@parcelfarce.linux.theplanet.co.uk +2 -2 # drivers/media annotations # # drivers/media/dvb/bt8xx/bt878.h # 2004/11/19 05:52:47-08:00 viro@parcelfarce.linux.theplanet.co.uk +5 -5 # drivers/media annotations # # ChangeSet # 2004/11/20 14:15:30-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] ad1889 annotations and fixes # # fixed leaks on failure exits in ->probe() # # sound/oss/ad1889.h # 2004/11/19 05:52:59-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # ad1889 annotations and fixes # # sound/oss/ad1889.c # 2004/11/19 05:52:59-08:00 viro@parcelfarce.linux.theplanet.co.uk +29 -16 # ad1889 annotations and fixes # # ChangeSet # 2004/11/20 14:15:18-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] 64bit portability fixes # # assorted 64bit issues - extraction of number passed in pointer, use of # %zd for size_t, ssize_t instead of int as return value of ->read(), %p # for pointers instead of casting to int and using %x. # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # sound/pci/cs46xx/dsp_spos.c # 2004/11/19 05:53:00-08:00 viro@parcelfarce.linux.theplanet.co.uk +2 -2 # 64bit portability fixes # # drivers/media/video/pms.c # 2004/11/19 05:53:00-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # 64bit portability fixes # # drivers/media/video/cx88/cx88-blackbird.c # 2004/11/19 05:53:00-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # 64bit portability fixes # # drivers/media/dvb/frontends/stv0299.c # 2004/11/19 05:53:00-08:00 viro@parcelfarce.linux.theplanet.co.uk +2 -1 # 64bit portability fixes # # ChangeSet # 2004/11/20 14:15:05-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] iphase iomem annotations # # partially annotated # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/atm/iphase.h # 2004/11/20 03:20:52-08:00 viro@parcelfarce.linux.theplanet.co.uk +12 -12 # iphase iomem annotations # # drivers/atm/iphase.c # 2004/11/20 03:20:49-08:00 viro@parcelfarce.linux.theplanet.co.uk +39 -40 # iphase iomem annotations # # ChangeSet # 2004/11/20 14:14:52-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] tgafb iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # include/video/tgafb.h # 2004/11/19 05:53:23-08:00 viro@parcelfarce.linux.theplanet.co.uk +3 -3 # tgafb iomem annotations # # drivers/video/tgafb.c # 2004/11/19 05:53:21-08:00 viro@parcelfarce.linux.theplanet.co.uk +20 -13 # tgafb iomem annotations # # ChangeSet # 2004/11/20 14:14:39-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] pcilynx iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/ieee1394/pcilynx.h # 2004/11/19 05:52:42-08:00 viro@parcelfarce.linux.theplanet.co.uk +4 -4 # pcilynx iomem annotations # # ChangeSet # 2004/11/20 14:14:25-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] sparc io.h annotations and fixes # # * annotations for sparc io.h # * missing memcpy_toio()/memcpy_fromio() added # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # include/asm-sparc/io.h # 2004/11/20 05:00:31-08:00 viro@parcelfarce.linux.theplanet.co.uk +106 -76 # sparc io.h annotations and fixes # # arch/sparc/kernel/ioport.c # 2004/11/20 04:59:49-08:00 viro@parcelfarce.linux.theplanet.co.uk +12 -12 # sparc io.h annotations and fixes # # ChangeSet # 2004/11/20 18:33:41+00:00 nico@org.rmk.(none) # [ARM PATCH] 2267/1: don't fiddle with GPDR/GAFR directly # # Patch from Nicolas Pitre # # This is preemption unsafe and rather not pretty. # # Signed-off-by: Nicolas Pitre # Signed-off-by: Russell King # # drivers/video/pxafb.c # 2004/11/18 03:02:05+00:00 nico@org.rmk.(none) +12 -29 # [PATCH] 2267/1: don't fiddle with GPDR/GAFR directly # # ChangeSet # 2004/11/20 17:37:21+00:00 hch@de.rmk.(none) # [ARM] kill unused call_irq() # # Patch from Christoph Hellwig # # These routine in arm is unused (in fact not even compiled). # # Instead of converting it to local_softirq_pending I'd suggest just # removing it as below as it's been there totally unused for a long # time. # # include/asm-arm/mach/irq.h # 2004/11/20 17:33:59+00:00 hch@de.rmk.(none) +0 -17 # [PATCH] kill unused call_irq() # # ChangeSet # 2004/11/20 16:44:53+00:00 rmk@flint.arm.linux.org.uk # [ARM] Fix VFP NaN flag handling. # # The special non-signalling NaN flag was escaping and setting some # FPSCR exception enable flags. Ensure that this flag is masked out # before we update the FPSCR. # # arch/arm/vfp/vfpsingle.c # 2004/11/20 16:41:47+00:00 rmk@flint.arm.linux.org.uk +2 -2 # Use VFP_NAN_FLAG when propagating NaNs. Ensure that this flag is # not propagated to the FPSCR. # # arch/arm/vfp/vfpdouble.c # 2004/11/20 16:41:46+00:00 rmk@flint.arm.linux.org.uk +2 -2 # Use VFP_NAN_FLAG when propagating NaNs. Ensure that this flag is # not propagated to the FPSCR. # # arch/arm/vfp/vfp.h # 2004/11/20 16:41:46+00:00 rmk@flint.arm.linux.org.uk +5 -0 # Add flag to tell normalisation code to leave unpacked value as is. # # ChangeSet # 2004/11/20 16:27:19+00:00 rmk@flint.arm.linux.org.uk # [ARM] Add missing ecard_resource_flags() macro. # # include/asm-arm/ecard.h # 2004/11/20 16:24:15+00:00 rmk@flint.arm.linux.org.uk +1 -0 # Add missing ecard_resource_flags() macro. # # ChangeSet # 2004/11/20 16:22:26+00:00 rmk@flint.arm.linux.org.uk # [ARM] Sparse fixes # # Clean up sparse warnings in rtctime.c and netwinder-hw.c # # arch/arm/mach-footbridge/netwinder-hw.c # 2004/11/20 16:19:18+00:00 rmk@flint.arm.linux.org.uk +4 -4 # Sparse fixes: # netwinder-hw.c:61:2: warning: cast truncates bits from constant value (180 becomes 80) # netwinder-hw.c:61:2: warning: cast truncates bits from constant value (338 becomes 38) # netwinder-hw.c:61:2: warning: cast truncates bits from constant value (33a becomes 3a) # netwinder-hw.c:491:2: warning: cast truncates bits from constant value (250 becomes 50) # netwinder-hw.c:513:2: warning: cast truncates bits from constant value (220 becomes 20) # netwinder-hw.c:528:2: warning: cast truncates bits from constant value (388 becomes 88) # # arch/arm/common/rtctime.c # 2004/11/20 16:19:18+00:00 rmk@flint.arm.linux.org.uk +15 -13 # Sparse fixes. # # ChangeSet # 2004/11/20 09:52:00+00:00 michal@info.rmk.(none) # [PCMCIA] Exclude uneeded code when ! CONFIG_PROC_FS # # Patch from Michal Rokos # # proc_pccard is declared twice, so remove the first declaration such # that it is only in ifdef CONFIG_PROC_FS block. # # Signed-off-by: Russell King # # drivers/pcmcia/ds.c # 2004/11/20 09:45:31+00:00 michal@info.rmk.(none) +0 -2 # [PATCH] Exclude uneeded code when ! CONFIG_PROC_FS # # ChangeSet # 2004/11/20 09:42:24+00:00 bunk@de.rmk.(none) # [PCMCIA] make cardbus_type static # # Patch from Adrian Bunk # # Since there's no user outside this file, cardbus_type in # drivers/pcmcia/yenta_socket.c can be made static. # # Signed-off-by: Adrian Bunk # Signed-off-by: Russell King # # drivers/pcmcia/yenta_socket.c # 2004/11/20 09:36:34+00:00 bunk@de.rmk.(none) +1 -1 # [PATCH] make cardbus_type static # # ChangeSet # 2004/11/20 09:34:20+00:00 janitor@at.rmk.(none) # [PCMCIA] replace schedule_timeout() with msleep() # # Use msleep() instead of schedule_timeout() to guarantee the # task delays as expected. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Maximilian Attems # Signed-off-by: Russell King # # drivers/pcmcia/yenta_socket.c # 2004/11/20 09:29:52+00:00 janitor@at.rmk.(none) +1 -2 # [PATCH] replace schedule_timeout() with msleep() # # ChangeSet # 2004/11/19 23:02:41-08:00 jmorris@redhat.com # [AF_UNIX]: Don't lose ECONNRESET in unix_seqpacket_sendmsg() # # The fix for SELinux w/SOCK_SEQPACKET had an error, # noted by Alan Cox. This fixes it. # # Signed-off-by: James Morris # Signed-off-by: David S. Miller # # net/unix/af_unix.c # 2004/11/19 23:02:22-08:00 jmorris@redhat.com +7 -2 # [AF_UNIX]: Don't lose ECONNRESET in unix_seqpacket_sendmsg() # # The fix for SELinux w/SOCK_SEQPACKET had an error, # noted by Alan Cox. This fixes it. # # Signed-off-by: James Morris # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/19 16:52:31-08:00 bgerst@didntduck.org # [PATCH] fastcall fixes for x86 smp interrupts # # I cross-checked the functions called by the BUILD_INTERRUPT macros and # came up with this patch. Even though some of these functions currently # take no args I made them all consistent. Some functions in the Voyager # code that are not directly called from asm code become static. # # Signed-off-by: Brian Gerst # Signed-off-by: Linus Torvalds # # arch/i386/mach-voyager/voyager_smp.c # 2004/11/19 11:33:14-08:00 bgerst@didntduck.org +25 -25 # fastcall fixes for x86 smp interrupts # # arch/i386/kernel/smp.c # 2004/11/19 11:33:14-08:00 bgerst@didntduck.org +3 -3 # fastcall fixes for x86 smp interrupts # # arch/i386/kernel/apic.c # 2004/11/19 11:33:14-08:00 bgerst@didntduck.org +4 -4 # fastcall fixes for x86 smp interrupts # # ChangeSet # 2004/11/19 16:51:00-08:00 torvalds@ppc970.osdl.org # Merge bk://linux-scsi.bkbits.net/scsi-for-linus-2.6 # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # drivers/scsi/st.h # 2004/11/19 16:50:56-08:00 torvalds@ppc970.osdl.org +0 -1 # Auto merged # # drivers/block/scsi_ioctl.c # 2004/11/19 16:50:56-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # Documentation/kernel-parameters.txt # 2004/11/19 16:50:56-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2004/11/19 15:21:16-08:00 ak@suse.de # [PATCH] x86_64: increase timer fallback threshold # # Increase time fallback threshold # # Otherwise ACPI triggers it too often. # # Signed-off-by: Andi Kleen # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/time.c # 2004/11/19 15:21:08-08:00 ak@suse.de +1 -1 # x86_64: increase timer fallback threshold # # ChangeSet # 2004/11/19 15:21:02-08:00 ak@suse.de # [PATCH] x86_64: fix early oops printing # # Fix early oopses # # Without this very early oopses crash recursively while trying # to figure out the current CPU number. # # Based on a patch by James Cleverdon. # # Signed-off-by: Andi Kleen # Signed-off-by: Linus Torvalds # # include/asm-x86_64/smp.h # 2004/11/19 15:20:55-08:00 ak@suse.de +5 -0 # x86_64: fix early oops printing # # ChangeSet # 2004/11/19 15:20:50-08:00 ak@suse.de # [PATCH] x86_64: fix interrupt routing with nosmp # # Fix interaction between nosmp and pcibios_fixup_irqs(). # # Originally from Oleg Nesterov via i386 # # When we boot with nosmp we dont have all the mptable info, so # IO_APIC_get_PCI_irq_vector() doesnt work and devices just end up getting a # wrong interrupt. # # Signed-off-by: Andi Kleen # Signed-off-by: Linus Torvalds # # include/asm-x86_64/io_apic.h # 2004/11/19 15:20:42-08:00 ak@suse.de +1 -1 # x86_64: fix interrupt routing with nosmp # # ChangeSet # 2004/11/19 15:20:37-08:00 ak@suse.de # [PATCH] x86_64: fix vsyscalls # # Fix incorrect alignment in the vsyscall variables that caused # vsyscalls to be completely broken. # # This change should decrease system time during TPC-* tests # considerably. # # Clean up the vmlinux.lds to make it easier readable # # Do some cleanups in the vsyscall code. # # Align cacheline_aligned correctly on 128 byte cacheline systems. # # Signed-off-by: Andi Kleen # Signed-off-by: Linus Torvalds # # include/asm-x86_64/vsyscall.h # 2004/11/19 15:20:29-08:00 ak@suse.de +1 -1 # x86_64: fix vsyscalls # # arch/x86_64/kernel/vsyscall.c # 2004/11/19 15:20:29-08:00 ak@suse.de +5 -7 # x86_64: fix vsyscalls # # arch/x86_64/kernel/vmlinux.lds.S # 2004/11/19 15:20:29-08:00 ak@suse.de +16 -17 # x86_64: fix vsyscalls # # ChangeSet # 2004/11/19 15:02:51-08:00 blaisorblade_spam@yahoo.it # [PATCH] akpm has moved # # And I didn't feel a thing. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # MAINTAINERS # 2004/11/18 23:03:16-08:00 blaisorblade_spam@yahoo.it +2 -2 # akpm has moved # # ChangeSet # 2004/11/19 15:02:39-08:00 jack@suse.cz # [PATCH] Add missing DQUOT_OFF # # Attached patch adds missing DQUOT_OFF to the umount path of the root # filesystem (it is only remounted read-only and so the usual path with # DQUOT_OFF is not taken). # # Signed-off-by: Jan Kara # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/namespace.c # 2004/11/18 23:03:16-08:00 jack@suse.cz +1 -0 # Add missing DQUOT_OFF # # ChangeSet # 2004/11/19 15:02:26-08:00 jack@suse.cz # [PATCH] Minor fix of inequalities in the quota code # # Change inequalities for deciding when a user has cleaned up enough space to # be below softlimit to match the ones for deciding when the softlimit has # been exceeded. # # Signed-off-by: Jan Kara # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/dquot.c # 2004/11/18 23:03:16-08:00 jack@suse.cz +2 -2 # Minor fix of inequalities in the quota code # # ChangeSet # 2004/11/19 15:02:14-08:00 haroldo.gamal@infolink.com.br # [PATCH] smbfs: Bug #3758 - Broken symlinks on smbfs # # The patches attached here fixes the BUG #3758 - "Broken symlinks on smbfs # with 2.6.10-rc[12]". There are two patches, one to be applied over version # 2.6.9 and the other over 2.6.10-rc2. # # The old utilities (and the old driver) uses uid=0, gid=0, dmask=0 and # fmask=0 to flag the lack of this parameters on the mount command line. # When the user do not specify the uid, gid, fmask or dmask, the current # driver will assign gid=root, gid=root, dmask=755, fmask=755. This behavior # is similar to the old 2.x samba versions. # # To make the driver see the permissions and ownership assigned on the # server, "smbmount" and "smbmnt" utilities must be patched. The patches is # already available on the attached patches at Bug #3330 or Samba Bug #999. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/smbfs/proc.c # 2004/11/18 23:03:16-08:00 haroldo.gamal@infolink.com.br +3 -2 # smbfs: Bug #3758 - Broken symlinks on smbfs # # fs/smbfs/inode.c # 2004/11/18 23:03:16-08:00 haroldo.gamal@infolink.com.br +4 -4 # smbfs: Bug #3758 - Broken symlinks on smbfs # # ChangeSet # 2004/11/19 15:02:01-08:00 roland@topspin.com # [PATCH] linux/mount.h: add atomic.h and spinlock.h #includes # # uses atomic_t and spinlock_t, but doesn't include either # or , which means that any users of # have to include them. This patch adds the necessary # #includes to avoid this. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/mount.h # 2004/11/18 23:03:16-08:00 roland@topspin.com +2 -0 # linux/mount.h: add atomic.h and spinlock.h #includes # # ChangeSet # 2004/11/19 15:01:49-08:00 bunk@stusta.de # [PATCH] remove outdated OSS Changelogs # # There's not much value in shipping Changelogs that weren't updated since at # least 2.4.0. # # Signed-off-by: Adrian Bunk # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # BitKeeper/deleted/.del-ChangeLog.multisound~d270124f881ca2d3 # 2004/11/19 15:01:42-08:00 bunk@stusta.de +0 -0 # Delete: Documentation/sound/oss/ChangeLog.multisound # # BitKeeper/deleted/.del-ChangeLog.awe~e10e04f480f48471 # 2004/11/19 15:01:41-08:00 bunk@stusta.de +0 -0 # Delete: Documentation/sound/oss/ChangeLog.awe # # ChangeSet # 2004/11/19 15:01:36-08:00 akpm@osdl.org # [PATCH] documentation: nmi_watchdog.txt update # # Acked-by: Maciej W. Rozycki # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/nmi_watchdog.txt # 2004/11/18 23:08:22-08:00 akpm@osdl.org +14 -0 # documentation: nmi_watchdog.txt update # # ChangeSet # 2004/11/19 15:01:23-08:00 magnus.damm@gmail.com # [PATCH] documentation: nohighio # # The kernel parameter "nohighio" seems to be gone in the code, but the # parameter is still left in the documentation. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/kernel-parameters.txt # 2004/11/18 23:03:15-08:00 magnus.damm@gmail.com +0 -2 # documentation: nohighio # # ChangeSet # 2004/11/19 15:01:10-08:00 neilb@cse.unsw.edu.au # [PATCH] knfsd: svcrpc: fqdn length fix # # Problem identified by Jan Kasprzak. # # Limit on domainname_max (currently 50) is too small. # # Just use the beginning of input buffer as scratch space for it, and save a # little stack space while we're at it. # # Signed-off-by: J. Bruce Fields # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # net/sunrpc/svcauth_unix.c # 2004/11/18 23:03:15-08:00 neilb@cse.unsw.edu.au +7 -7 # knfsd: svcrpc: fqdn length fix # # ChangeSet # 2004/11/19 15:00:58-08:00 dsd@gentoo.org # [PATCH] Permit LOG_SENSE and LOG_SELECT in SG_IO command table # # This patch adds LOG_SENSE as a read-ok command. cdrecord-prodvd uses this. # I also added LOG_SELECT as write-ok as this seems to fit in as well. # # Signed-off-by: Daniel Drake # Acked-by: Jens Axboe # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/block/scsi_ioctl.c # 2004/11/18 23:03:15-08:00 dsd@gentoo.org +2 -0 # Permit LOG_SENSE and LOG_SELECT in SG_IO command table # # ChangeSet # 2004/11/19 15:00:45-08:00 pmeda@akamai.com # [PATCH] unlocked access to task->comm # # Looking at get_task_comm patch: # http://linus.bkbits.net:8080/linux-2.5/patch@1.1803.144.3 # # There is one other place where task->comm is accessed outside current. # There are two issues. The code is trying to copy to temp space without # task_lock. It is not using temp space for actual user copy. # # Cc: Ralf Baechle # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/mips/kernel/sysirix.c # 2004/11/18 23:03:15-08:00 pmeda@akamai.com +4 -4 # unlocked access to task->comm # # ChangeSet # 2004/11/19 15:00:32-08:00 colin.lkml@colino.net # [PATCH] Switch therm_adt746x to new module_param # # This patch replaces MODULE_PARM to module_param for adt746x. # # Signed-off-by: Colin Leroy # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/macintosh/therm_adt746x.c # 2004/11/18 23:03:15-08:00 colin.lkml@colino.net +4 -3 # Switch therm_adt746x to new module_param # # ChangeSet # 2004/11/19 15:00:20-08:00 oleg@tv-sign.ru # [PATCH] uninline do_trap(), remove get_cr2() # # Uninlining do_trap() saves 544 bytes in traps.o. get_cr2() seems to be # unused, remove it. # # Signed-off-by: Oleg Nesterov # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/kernel/traps.c # 2004/11/18 23:03:14-08:00 oleg@tv-sign.ru +1 -10 # uninline do_trap(), remove get_cr2() # # ChangeSet # 2004/11/19 15:00:07-08:00 stelian@popies.net # [PATCH] sonypi: return an error from sonypi_camera_command() if the camera isn't enabled # # The sonypi_camera_command() used to fail without returning an error code if # the user fergot to enable the camera in the sonypi module (using the # camera=1 module parameter). This caused the meye driver to apparently load # correctly but miserably fail later, when trying to access the camera for # getting some data out of it. # # This patch adds an error code to sonypi_camera_command() and makes the meye # driver check for it in the PCI probe routine. If the function fails, a # message is printed in the kernel logs reminding the user it should better # RTFM. # # The patch also removes some sonypi_camera_command() commands (those # supposed to return the current camera settings) which are unreliable. The # meye driver does not use them anyway. # # Signed-off-by: Stelian Pop # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/sonypi.h # 2004/11/18 23:03:14-08:00 stelian@popies.net +12 -12 # sonypi: return an error from sonypi_camera_command() if the camera isn't enabled # # drivers/media/video/meye.h # 2004/11/18 23:03:14-08:00 stelian@popies.net +1 -1 # sonypi: return an error from sonypi_camera_command() if the camera isn't enabled # # drivers/media/video/meye.c # 2004/11/18 23:03:14-08:00 stelian@popies.net +7 -1 # sonypi: return an error from sonypi_camera_command() if the camera isn't enabled # # drivers/char/sonypi.h # 2004/11/18 23:03:14-08:00 stelian@popies.net +1 -1 # sonypi: return an error from sonypi_camera_command() if the camera isn't enabled # # drivers/char/sonypi.c # 2004/11/18 23:03:14-08:00 stelian@popies.net +9 -38 # sonypi: return an error from sonypi_camera_command() if the camera isn't enabled # # ChangeSet # 2004/11/19 14:59:55-08:00 hch@lst.de # [PATCH] allow NFS exports of EFS filesystems # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/efs_fs.h # 2004/11/18 23:03:14-08:00 hch@lst.de +1 -0 # allow NFS exports of EFS filesystems # # fs/efs/super.c # 2004/11/18 23:03:14-08:00 hch@lst.de +5 -0 # allow NFS exports of EFS filesystems # # fs/efs/namei.c # 2004/11/18 23:03:14-08:00 hch@lst.de +33 -0 # allow NFS exports of EFS filesystems # # ChangeSet # 2004/11/19 14:59:41-08:00 schwidefsky@de.ibm.com # [PATCH] s390: remove zfcp hba api callbacks # # From: Heiko Carstens # # Remove the disputed hba api event callback code. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/s390/scsi/zfcp_scsi.c # 2004/11/18 23:03:14-08:00 schwidefsky@de.ibm.com +1 -4 # s390: remove zfcp hba api callbacks # # drivers/s390/scsi/zfcp_fsf.c # 2004/11/18 23:03:14-08:00 schwidefsky@de.ibm.com +1 -12 # s390: remove zfcp hba api callbacks # # drivers/s390/scsi/zfcp_ext.h # 2004/11/18 23:03:14-08:00 schwidefsky@de.ibm.com +1 -19 # s390: remove zfcp hba api callbacks # # drivers/s390/scsi/zfcp_erp.c # 2004/11/18 23:03:14-08:00 schwidefsky@de.ibm.com +2 -10 # s390: remove zfcp hba api callbacks # # drivers/s390/scsi/zfcp_def.h # 2004/11/18 23:03:14-08:00 schwidefsky@de.ibm.com +1 -26 # s390: remove zfcp hba api callbacks # # drivers/s390/scsi/zfcp_aux.c # 2004/11/18 23:03:14-08:00 schwidefsky@de.ibm.com +12 -169 # s390: remove zfcp hba api callbacks # # ChangeSet # 2004/11/19 14:59:29-08:00 blaisorblade_spam@yahoo.it # [PATCH] uml: partial KBUILD_OUTPUT fix # # Start fixing KBUILD_OUTPUT support for UML. These changes are trivial and # no-ops when this feature is not enabled - the "hard part" of this support # is under discussion because it's hard to do properly (UML uses both shipped # and build-generated headers from a lot of different directories, and for # good reasons). # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/Makefile # 2004/11/18 23:03:14-08:00 blaisorblade_spam@yahoo.it +3 -3 # uml: partial KBUILD_OUTPUT fix # # ChangeSet # 2004/11/19 14:59:16-08:00 blaisorblade_spam@yahoo.it # [PATCH] uml: update some copyrights # # Update/add some copyright notices. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/sys-i386/sysrq.c # 2004/11/18 23:03:14-08:00 blaisorblade_spam@yahoo.it +5 -0 # uml: update some copyrights # # arch/um/kernel/sigio_kern.c # 2004/11/18 23:03:14-08:00 blaisorblade_spam@yahoo.it +1 -1 # uml: update some copyrights # # ChangeSet # 2004/11/19 14:59:04-08:00 geert@linux-m68k.org # [PATCH] M68k: Update defconfigs for 2.6.10-rc2 # # M68k: Update defconfigs for 2.6.10-rc2 # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/m68k/defconfig # 2004/11/18 23:03:14-08:00 geert@linux-m68k.org +12 -3 # M68k: Update defconfigs for 2.6.10-rc2 # # arch/m68k/configs/sun3x_defconfig # 2004/11/18 23:03:14-08:00 geert@linux-m68k.org +14 -3 # M68k: Update defconfigs for 2.6.10-rc2 # # arch/m68k/configs/sun3_defconfig # 2004/11/18 23:03:14-08:00 geert@linux-m68k.org +14 -3 # M68k: Update defconfigs for 2.6.10-rc2 # # arch/m68k/configs/q40_defconfig # 2004/11/18 23:03:14-08:00 geert@linux-m68k.org +14 -4 # M68k: Update defconfigs for 2.6.10-rc2 # # arch/m68k/configs/mvme16x_defconfig # 2004/11/18 23:03:14-08:00 geert@linux-m68k.org +14 -3 # M68k: Update defconfigs for 2.6.10-rc2 # # arch/m68k/configs/mvme147_defconfig # 2004/11/18 23:03:14-08:00 geert@linux-m68k.org +14 -3 # M68k: Update defconfigs for 2.6.10-rc2 # # arch/m68k/configs/mac_defconfig # 2004/11/18 23:03:14-08:00 geert@linux-m68k.org +14 -3 # M68k: Update defconfigs for 2.6.10-rc2 # # arch/m68k/configs/hp300_defconfig # 2004/11/18 23:03:14-08:00 geert@linux-m68k.org +14 -3 # M68k: Update defconfigs for 2.6.10-rc2 # # arch/m68k/configs/bvme6000_defconfig # 2004/11/18 23:03:14-08:00 geert@linux-m68k.org +14 -3 # M68k: Update defconfigs for 2.6.10-rc2 # # arch/m68k/configs/atari_defconfig # 2004/11/18 23:03:14-08:00 geert@linux-m68k.org +15 -3 # M68k: Update defconfigs for 2.6.10-rc2 # # arch/m68k/configs/apollo_defconfig # 2004/11/18 23:03:14-08:00 geert@linux-m68k.org +14 -3 # M68k: Update defconfigs for 2.6.10-rc2 # # arch/m68k/configs/amiga_defconfig # 2004/11/18 23:03:14-08:00 geert@linux-m68k.org +15 -3 # M68k: Update defconfigs for 2.6.10-rc2 # # ChangeSet # 2004/11/19 14:58:51-08:00 geert@linux-m68k.org # [PATCH] M68k I/O: Move HP300 I/O macros close to other I/O macros again # # M68k I/O: Move HP300 I/O macros close to other I/O macros again (after merge # error in 2.6.10-rc2) # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-m68k/io.h # 2004/11/18 23:03:13-08:00 geert@linux-m68k.org +18 -17 # M68k I/O: Move HP300 I/O macros close to other I/O macros again # # ChangeSet # 2004/11/19 14:58:38-08:00 geert@linux-m68k.org # [PATCH] fm2fb: Update Steffen A. Mork's email address # # fm2fb: Update Steffen A. Mork's email address # # Signed-off-by: Steffen A. Mork # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/fm2fb.c # 2004/11/18 23:03:13-08:00 geert@linux-m68k.org +1 -1 # fm2fb: Update Steffen A. Mork's email address # # ChangeSet # 2004/11/19 14:58:26-08:00 geert@linux-m68k.org # [PATCH] Sun-3: Fix link error # # Sun-3: Fix link error (we forgot to update vmlinux-sun3.lds during last update # of vmlinux-std.lds) # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/m68k/kernel/vmlinux-sun3.lds # 2004/11/18 23:03:13-08:00 geert@linux-m68k.org +2 -2 # Sun-3: Fix link error # # ChangeSet # 2004/11/19 14:58:12-08:00 geert@linux-m68k.org # [PATCH] 68851 MMU: Fix harmless typo in the MMU configuration code. # # 68851 MMU: Fix harmless (CPU_68020 == MMU_68851 anyway) typo in the MMU # configuration code. # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-m68k/setup.h # 2004/11/18 23:03:13-08:00 geert@linux-m68k.org +1 -1 # 68851 MMU: Fix harmless typo in the MMU configuration code. # # ChangeSet # 2004/11/19 14:58:00-08:00 geert@linux-m68k.org # [PATCH] M68k: Add 3 missing syscalls # # M68k: Add 3 missing syscalls (up to 2.6.10-rc1) # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-m68k/unistd.h # 2004/11/18 23:03:13-08:00 geert@linux-m68k.org +4 -1 # M68k: Add 3 missing syscalls # # arch/m68k/kernel/entry.S # 2004/11/18 23:03:13-08:00 geert@linux-m68k.org +3 -0 # M68k: Add 3 missing syscalls # # ChangeSet # 2004/11/19 14:57:47-08:00 geert@linux-m68k.org # [PATCH] M68k: Update defconfigs for 2.6.10-rc1 # # M68k: Update defconfigs # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/m68k/defconfig # 2004/11/18 23:03:34-08:00 geert@linux-m68k.org +17 -6 # M68k: Update defconfigs for 2.6.10-rc1 # # arch/m68k/configs/sun3x_defconfig # 2004/11/18 23:03:34-08:00 geert@linux-m68k.org +25 -6 # M68k: Update defconfigs for 2.6.10-rc1 # # arch/m68k/configs/sun3_defconfig # 2004/11/18 23:03:34-08:00 geert@linux-m68k.org +25 -6 # M68k: Update defconfigs for 2.6.10-rc1 # # arch/m68k/configs/q40_defconfig # 2004/11/18 23:03:34-08:00 geert@linux-m68k.org +25 -7 # M68k: Update defconfigs for 2.6.10-rc1 # # arch/m68k/configs/mvme16x_defconfig # 2004/11/18 23:03:34-08:00 geert@linux-m68k.org +25 -6 # M68k: Update defconfigs for 2.6.10-rc1 # # arch/m68k/configs/mvme147_defconfig # 2004/11/18 23:03:34-08:00 geert@linux-m68k.org +25 -6 # M68k: Update defconfigs for 2.6.10-rc1 # # arch/m68k/configs/mac_defconfig # 2004/11/18 23:03:34-08:00 geert@linux-m68k.org +25 -7 # M68k: Update defconfigs for 2.6.10-rc1 # # arch/m68k/configs/hp300_defconfig # 2004/11/18 23:03:34-08:00 geert@linux-m68k.org +24 -6 # M68k: Update defconfigs for 2.6.10-rc1 # # arch/m68k/configs/bvme6000_defconfig # 2004/11/18 23:03:34-08:00 geert@linux-m68k.org +24 -6 # M68k: Update defconfigs for 2.6.10-rc1 # # arch/m68k/configs/atari_defconfig # 2004/11/18 23:03:34-08:00 geert@linux-m68k.org +25 -7 # M68k: Update defconfigs for 2.6.10-rc1 # # arch/m68k/configs/apollo_defconfig # 2004/11/18 23:03:34-08:00 geert@linux-m68k.org +24 -6 # M68k: Update defconfigs for 2.6.10-rc1 # # arch/m68k/configs/amiga_defconfig # 2004/11/18 23:03:34-08:00 geert@linux-m68k.org +25 -7 # M68k: Update defconfigs for 2.6.10-rc1 # # ChangeSet # 2004/11/19 14:57:34-08:00 takata@linux-m32r.org # [PATCH] m32r: io_xxxxx.c cleanups # # cleanups for arch/m32r/kernel/io*.c. # # - Fix ugly indentation. # # - Change __inline__ to inline. # # - Remove RCS ID strings. # # Signed-off-by: Hirokazu Takata # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/m32r/kernel/io_usrv.c # 2004/11/18 23:03:12-08:00 takata@linux-m32r.org +4 -2 # m32r: io_xxxxx.c cleanups # # arch/m32r/kernel/io_opsput.c # 2004/11/18 23:03:12-08:00 takata@linux-m32r.org +72 -59 # m32r: io_xxxxx.c cleanups # # arch/m32r/kernel/io_oaks32r.c # 2004/11/18 23:03:12-08:00 takata@linux-m32r.org +37 -29 # m32r: io_xxxxx.c cleanups # # arch/m32r/kernel/io_mappi2.c # 2004/11/18 23:03:12-08:00 takata@linux-m32r.org +75 -59 # m32r: io_xxxxx.c cleanups # # arch/m32r/kernel/io_mappi.c # 2004/11/18 23:03:12-08:00 takata@linux-m32r.org +94 -78 # m32r: io_xxxxx.c cleanups # # arch/m32r/kernel/io_m32700ut.c # 2004/11/18 23:03:12-08:00 takata@linux-m32r.org +82 -65 # m32r: io_xxxxx.c cleanups # # ChangeSet # 2004/11/19 14:57:21-08:00 takata@linux-m32r.org # [PATCH] m32r: make zImage a default build target # # Here is a patch to update arch/m32r/Makefile for m32r. # - Make zImage a default build target # - Add zImage to targets marked with [*]. # # arch/m32r/Makefile # 2004/11/18 23:03:12-08:00 takata@linux-m32r.org +3 -1 # m32r: make zImage a default build target # # ChangeSet # 2004/11/19 14:57:09-08:00 takata@linux-m32r.org # [PATCH] m32r: Fix a boot hang of UP kernel # # This patch fixes a hanging up at boot time of 2.6.10-rc2 m32r UP kernel. # It was due to a lack of update_process_times() in time.c. # # Such a boot hang was caused only in UP systems, because # update_process_times() had been executed correctly in # smp_local_timer_interrupt() of arch/m32r/kernel/smp.c for SMP. # # arch/m32r/kernel/time.c: # # - UP: Fix do_timer_interrupt() to use update_process_times(). # - UP: Move profile_tick() into do_timer_interrupt(). # - Change __inline__ to inline. # # Signed-off-by: Hirokazu Takata # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/m32r/kernel/time.c # 2004/11/18 23:03:12-08:00 takata@linux-m32r.org +9 -8 # m32r: Fix a boot hang of UP kernel # # ChangeSet # 2004/11/19 14:56:56-08:00 takata@linux-m32r.org # [PATCH] m32r: Kconfig.debug support # # This patch updates Kconfig and add Kconfig.debug for m32r. # # - arch/m32r/Kconfig: Move "Kernel hacking" menu to Kconfig.debug. # # - arch/m32r/Kconfig.debug: Newly added. # # - lib/Kconfig.debug: Add m32r arch. # # Signed-off-by: Hirokazu Takata # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # lib/Kconfig.debug # 2004/11/18 23:03:12-08:00 takata@linux-m32r.org +7 -7 # m32r: Kconfig.debug support # # arch/m32r/Kconfig # 2004/11/18 23:03:12-08:00 takata@linux-m32r.org +10 -88 # m32r: Kconfig.debug support # # arch/m32r/Kconfig.debug # 2004/11/18 23:03:12-08:00 takata@linux-m32r.org +34 -0 # m32r: Kconfig.debug support # # arch/m32r/Kconfig.debug # 2004/11/18 23:03:12-08:00 takata@linux-m32r.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/m32r/Kconfig.debug # # ChangeSet # 2004/11/19 14:56:43-08:00 clameter@sgi.com # [PATCH] mmtimer driver update # # - reduce processing in timer interrupt through the use of a tasklet # - fix various race conditions # - use the correct interrupt vector for the SN2 RTC # # Signed-off-by: Dimitri Sivanich # Signed-off-by: Christoph Lameter # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ia64/sn/intr.h # 2004/11/18 23:03:12-08:00 clameter@sgi.com +8 -3 # mmtimer driver update # # drivers/char/mmtimer.c # 2004/11/18 23:03:12-08:00 clameter@sgi.com +92 -92 # mmtimer driver update # # ChangeSet # 2004/11/19 14:56:31-08:00 trini@kernel.crashing.org # [PATCH] x86_64: only single-step into signal handlers if the tracer asked for it # # Port of the i386 patch of the same name. # # Signed-off-by: Tom Rini # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/signal.c # 2004/11/18 23:03:12-08:00 trini@kernel.crashing.org +1 -1 # x86_64: only single-step into signal handlers if the tracer asked for it # # ChangeSet # 2004/11/19 14:56:17-08:00 olof@austin.ibm.com # [PATCH] ppc64: Make pci_alloc_consistent() conform to API docs # # Documentation/DMA-mapping.txt says that pci_alloc_consistent() needs to # return a mapping that is aligned by the closest larger order of two as the # allocation. # # We're currently breaking this with our iommu code. To fix this, add # align_order arguments to the relevant functions and pass it down. # Specifying align_order of 0 gives same behaviour as previous. # # Signed-off-by: Olof Johansson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/iommu.c # 2004/11/18 23:03:12-08:00 olof@austin.ibm.com +17 -7 # ppc64: Make pci_alloc_consistent() conform to API docs # # ChangeSet # 2004/11/19 14:56:05-08:00 paulus@samba.org # [PATCH] ppc64: move emulate_step to arch/ppc64/lib # # This patch moves the emulate_step function, which is used in xmon's # single-stepping code, out of xmon.c and into arch/ppc64/lib/sstep.c, so # that kprobes can use it too. # # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/sstep.h # 2004/11/18 23:03:12-08:00 paulus@samba.org +13 -0 # ppc64: move emulate_step to arch/ppc64/lib # # include/asm-ppc64/sstep.h # 2004/11/18 23:03:12-08:00 paulus@samba.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/asm-ppc64/sstep.h # # arch/ppc64/xmon/xmon.c # 2004/11/18 23:03:12-08:00 paulus@samba.org +8 -108 # ppc64: move emulate_step to arch/ppc64/lib # # arch/ppc64/lib/sstep.c # 2004/11/18 23:03:12-08:00 paulus@samba.org +141 -0 # ppc64: move emulate_step to arch/ppc64/lib # # arch/ppc64/lib/Makefile # 2004/11/18 23:03:12-08:00 paulus@samba.org +1 -0 # ppc64: move emulate_step to arch/ppc64/lib # # arch/ppc64/lib/sstep.c # 2004/11/18 23:03:12-08:00 paulus@samba.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/lib/sstep.c # # ChangeSet # 2004/11/19 14:55:52-08:00 sfr@canb.auug.org.au # [PATCH] ppc64 iSeries: fix viodasd remove # # This patch just makes sure that we do not dereference a viodasd gendisk # pointer after it has been freed. # # Signed-off-by: Stephen Rothwell # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/block/viodasd.c # 2004/11/18 23:03:11-08:00 sfr@canb.auug.org.au +1 -1 # ppc64 iSeries: fix viodasd remove # # ChangeSet # 2004/11/19 14:55:39-08:00 akpm@osdl.org # [PATCH] x86 current_stack_pointer warning fix # # With newer gcc's: # # include/asm/thread_info.h:95: warning: unused variable `current_stack_pointer' # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-i386/thread_info.h # 2004/11/18 23:03:11-08:00 akpm@osdl.org +2 -1 # x86 current_stack_pointer warning fix # # ChangeSet # 2004/11/19 14:55:26-08:00 bunk@stusta.de # [PATCH] ST_partstat multiple definition # # drivers/scsi/osst.o(.bss+0x0): multiple definition of `ST_partstat' # drivers/scsi/st.o(.bss+0x0): first defined here # # Signed-off-by: Adrian Bunk # Cc: James Bottomley # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/scsi/st.h # 2004/11/18 23:03:11-08:00 bunk@stusta.de +1 -1 # ST_partstat multiple definition # # ChangeSet # 2004/11/19 14:55:12-08:00 trini@kernel.crashing.org # [PATCH] ppc32: Fix CONFIG_8260 and CONFIG_BLK_DEV_INITRD # # found that CONFIG_8260 and CONFIG_BLK_DEV_INITRD was # broken as arch/ppc/syslib/m8260_setup.c was missing . # # Signed-off-by: Tom Rini # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/syslib/m8260_setup.c # 2004/11/18 23:03:11-08:00 trini@kernel.crashing.org +1 -0 # ppc32: Fix CONFIG_8260 and CONFIG_BLK_DEV_INITRD # # ChangeSet # 2004/11/19 14:55:00-08:00 bunk@stusta.de # [PATCH] ISDN divert_init.c build fix # # drivers/isdn/divert/divert_init.c:25: error: conflicting types for 'printk' # # Signed-off-by: Adrian Bunk # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/isdn/divert/divert_init.c # 2004/11/18 23:03:11-08:00 bunk@stusta.de +1 -5 # ISDN divert_init.c build fix # # ChangeSet # 2004/11/19 14:54:47-08:00 hugh@veritas.com # [PATCH] mlock-vs-VM_IO hang fix # # With Andrea Arcangeli # # Fix a hang which occurs when mlock() encounters a mapping of /dev/mem. # These have VM_IO set. follow_page() keeps returning zero (not a valid pfn) # and handle_mm_fault() keeps on returning VM_FAULT_MINOR (there's a pte # there), so get_user_pages() locks up. # # The patch changes get_user_pages() to just bale out when it hits a VM_IO # region. make_pages_present() is taught to ignore the resulting -EFAULT. # # We still have two bugs: # # a) If a process has a VM_IO vma, get_user_pages() will bale early, # without having considered the vmas at higher virtual addresses. # # As do_mlock() also walks the vma list this bug is fairly benign, but # get_user_pages() is doing the wrong thing there. # # b) The `len' argument to get_user_pages should be long, not int. We # presently have a 16TB limit on 64-bit. # # Signed-off-by: Hugh Dickins # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/mlock.c # 2004/11/18 23:03:11-08:00 hugh@veritas.com +2 -1 # mlock-vs-VM_IO hang fix # # mm/memory.c # 2004/11/18 23:03:11-08:00 hugh@veritas.com +1 -1 # mlock-vs-VM_IO hang fix # # ChangeSet # 2004/11/19 14:54:35-08:00 neilb@cse.unsw.edu.au # [PATCH] md: Fix problem with unsigned variable going "negative" in linear.c # # We replace 'size' by 'start'. 'start' means exactly the same as # 'curr_offset - size', and the equivalence of the new code can be tested # based on this. The difference is that 'start' will never be negative and # so can fit in a 'sector_t' while 'size' could be negative. # # Also make curr_offset sector_t, as it should have been. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/linear.c # 2004/11/18 23:03:11-08:00 neilb@cse.unsw.edu.au +11 -10 # md: Fix problem with unsigned variable going "negative" in linear.c # # ChangeSet # 2004/11/19 14:54:22-08:00 akpm@osdl.org # [PATCH] vmscan: ignore swap token when in trouble # # The token-based thrashing control patches introduced a problem: when a task # which doesn't hold the token tries to run direct-reclaim, that task is told # that pages which belong to the token-holding mm are referenced, even though # they are not. This means that it is possible for a huge number of a # non-token-holding mm's pages to be scanned to no effect. Eventually, we give # up and go and oom-kill something. # # So the patch arranges for the thrashing control logic to be defeated if the # caller has reached the highest level of scanning priority. # # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/vmscan.c # 2004/11/18 23:03:10-08:00 akpm@osdl.org +2 -2 # vmscan: ignore swap token when in trouble # # mm/rmap.c # 2004/11/18 23:03:10-08:00 akpm@osdl.org +13 -10 # vmscan: ignore swap token when in trouble # # include/linux/rmap.h # 2004/11/18 23:03:10-08:00 akpm@osdl.org +2 -2 # vmscan: ignore swap token when in trouble # # ChangeSet # 2004/11/19 14:54:09-08:00 giuseppe@eppesuigoccas.homedns.org # [PATCH] gbefb.c build fix # # The current gbefb.c source cannot be compiled as module because of a small # typo where "option" was written instead of "options" in two places. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/gbefb.c # 2004/11/18 23:03:10-08:00 giuseppe@eppesuigoccas.homedns.org +2 -2 # gbefb.c build fix # # ChangeSet # 2004/11/19 14:53:56-08:00 bjorn.helgaas@hp.com # [PATCH] move HCDP/PCDP to early uart console # # This changes the HCDP/PCDP support to use the early uart console # rather than using early_serial_setup(). # # As a consequence, ia64 serial device names will now stay constant # regardless of firmware console settings. (A serial device selected as # an EFI console device on HP ia64 boxes used to automatically become # ttyS0.) # # This also removes the ia64 early-boot kludge of assuming legacy COM # ports at 0x3f8 and 0x2f8. For boxes that have legacy ports but no # HCDP, "console=ttyS0" will still work, but the console won't start # working until after the serial driver initializes and discovers the # devices. # # WARNING: # # If you have an HP machine and you're using the MP serial console port # (the connector labelled "console" on the 3-headed cable), this patch # will break your console! # # HOW TO FIX IT: # # 1) The console device will change from /dev/ttyS0 to /dev/ttyS1, # ttyS2, or ttyS3, so: # # 1a) Edit /etc/inittab to add a getty entry for # /dev/ttyS1 (rx4640, rx5670, rx7620, rx8620, Superdome), # /dev/ttyS2 (rx1600), or # /dev/ttyS3 (rx2600). # # 1b) Edit /etc/securetty to add ttyS1, ttyS2, or ttyS3. # # 1c) Leave the existing ttyS0 entries in /etc/inittab and # /etc/securetty so you can still boot old kernels. # # 2) Edit /etc/elilo.conf to remove any "console=" arguments (see [1]). # # 3) Run elilo to install the bootloader with new configuration. # # 4) Reboot and use the EFI boot option maintenance menu to select # exactly one device for console output, input, and standard error. # Then do a cold reset so the changes take effect. # # For the MP console, be careful to select the device with # "Acpi(HWP0002,700)/Pci(...)/Uart" in the path (see [2]). # # DETAILS: # # - Prior to this patch, serial device names depended on the HCDP, # which in turn depends on EFI console settings. After this patch, # the naming always stays the same, regardless of firmware settings. # # For example, an rx1600 with a single built-in serial port plus # an MP has these ports: # Old Old # MMIO (EFI console (EFI console # address on builtin) on MP port) New # ========== ========== ========== ====== # builtin 0xff5e0000 ttyS0 ttyS1 ttyS0 # MP UPS 0xf8031000 ttyS1 ttyS2 ttyS1 # MP Console 0xf8030000 ttyS2 ttyS0 ttyS2 # MP 2 0xf8030010 ttyS3 ttyS3 ttyS3 # MP 3 0xf8030038 ttyS4 ttyS4 ttyS4 # # - If you want to have multiple devices in the EFI console path, you # can, but Linux won't be able to deduce which console to use, so it # will default to using VGA. You can use "console=hcdp" (the UART # device from the EFI path) or "console=ttyS" to select the # device directly. # # TROUBLESHOOTING: # # - No kernel output after "Uncompressing Linux... done": # # -> You're using an MP port as the console and specified # "console=ttyS0". This port is now named something else. # Remove the "console=" option. # # -> Multiple UARTs selected as EFI console devices, and you're # looking at the wrong one. Make sure only one UART is # selected (use the EFI Boot Manager "Boot option maintenance" # menu). # # -> You're physically connected to the MP port but have a # non-MP UART selected as EFI console device. Either move # the console cable to the non-MP UART, or change the EFI # console path to the MP UART (the MP UART is the one with # "Acpi(HWP0002,700)/Pci(...)/Uart" in it.) # # - Long pause (60+ seconds) between "Uncompressing Linux... done" # and start of kernel output: # # -> No early console, probably because you used "console=ttyS". # Remove the "console=" option. # # - Kernel and init script output works fine, but no "login:" prompt: # # -> Add getty entry to /etc/inittab for console tty. Use the table # in (1a) above or look for the "Adding console on ttyS" message # that tells you which device is the console. # # - "login:" prompt, but can't login as root: # # -> Add entry to /etc/securetty for console tty. # # [1] When the EFI console path contains exactly one device (either # serial or VGA), 2.6.6 and newer kernels default to that device # automatically. So if you remove "console=" arguments, you can use # the same elilo configuration to boot any 2.6.6 or newer kernel # with or without this patch. # # If you need to boot kernels older than 2.6.6 (including RHEL3 and # SLES9), keep an 'append="console=ttyS0"' line in those elilo.conf # stanzas. # # Non-HP machines will still need "console=" for serial consoles # because they don't supply the HCDP table. # # [2] The HP management card (MP) causes confusion because it is always # active as an EFI console, even if it doesn't appear in the EFI # console path. If your console path is set to a non-MP UART, and # you happen to be attached to the MP UART, everything works in EFI, # but the kernel will think the non-MP UART is the console, so you # won't see any kernel output. # # Signed-off-by: Bjorn Helgaas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/efi.h # 2004/11/18 23:03:10-08:00 bjorn.helgaas@hp.com +1 -1 # move HCDP/PCDP to early uart console # # drivers/firmware/pcdp.c # 2004/11/18 23:03:10-08:00 bjorn.helgaas@hp.com +31 -107 # move HCDP/PCDP to early uart console # # drivers/firmware/Kconfig # 2004/11/18 23:03:10-08:00 bjorn.helgaas@hp.com +5 -1 # move HCDP/PCDP to early uart console # # arch/ia64/kernel/setup.c # 2004/11/18 23:03:10-08:00 bjorn.helgaas@hp.com +11 -29 # move HCDP/PCDP to early uart console # # ChangeSet # 2004/11/19 14:53:42-08:00 bjorn.helgaas@hp.com # [PATCH] early uart console support # # This adds an early polled-mode "uart" console driver, based on Andi Kleen's # early_printk work. # # The difference is that this locates the UART device directly by its MMIO or # I/O port address, so we don't have to make assumptions about how ttyS # devices will be named. After the normal serial driver starts, we try to # locate the matching ttyS device and start a console there. # # Sample usage: # console=uart,io,0x3f8 # console=uart,mmio,0xff5e0000,115200n8 # # If the baud rate isn't specified, we peek at the UART to figure it out. # # Signed-off-by: Bjorn Helgaas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/serial/8250_early.c # 2004/11/18 23:03:10-08:00 bjorn.helgaas@hp.com +255 -0 # early uart console support # # kernel/printk.c # 2004/11/18 23:03:10-08:00 bjorn.helgaas@hp.com +1 -1 # early uart console support # # include/linux/serial.h # 2004/11/18 23:03:10-08:00 bjorn.helgaas@hp.com +2 -0 # early uart console support # # drivers/serial/Makefile # 2004/11/18 23:03:10-08:00 bjorn.helgaas@hp.com +1 -0 # early uart console support # # drivers/serial/8250_early.c # 2004/11/18 23:03:10-08:00 bjorn.helgaas@hp.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/serial/8250_early.c # # drivers/serial/8250.c # 2004/11/18 23:03:10-08:00 bjorn.helgaas@hp.com +35 -0 # early uart console support # # Documentation/kernel-parameters.txt # 2004/11/18 23:03:33-08:00 bjorn.helgaas@hp.com +18 -2 # early uart console support # # ChangeSet # 2004/11/19 14:53:29-08:00 rddunlap@osdl.org # [PATCH] cdrom: handle SYSCTL without PROC_FS # # Fixes oops (reference to cdrom_root_table->child->) when CONFIG_SYSCTL=y # and CONFIG_PROC_FS=n. # # Signed-off-by: Randy Dunlap # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/cdrom/cdrom.c # 2004/11/18 23:03:10-08:00 rddunlap@osdl.org +0 -2 # cdrom: handle SYSCTL without PROC_FS # # ChangeSet # 2004/11/19 14:53:16-08:00 bjorn.helgaas@hp.com # [PATCH] Fix ia64 flush_tlb_page build error # # Fix ia64 build error: implicit declaration of function `flush_tlb_page' # # Signed-off-by: Bjorn Helgaas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/mempolicy.c # 2004/11/18 23:03:09-08:00 bjorn.helgaas@hp.com +1 -0 # Fix ia64 flush_tlb_page build error # # ChangeSet # 2004/11/19 14:53:04-08:00 prasanna@in.ibm.com # [PATCH] kprobes: dont steal interrupts from vm86 # # This patch fixes the problem reported by Stas Sergeev, that kprobes steals # the virtual-8086 exceptions. This fix modifies kprobe_handler() to return # 0 when in virtual-8086 mode. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/kernel/kprobes.c # 2004/11/18 23:03:09-08:00 prasanna@in.ibm.com +5 -0 # kprobes: dont steal interrupts from vm86 # # ChangeSet # 2004/11/19 14:52:51-08:00 andrea@novell.com # [PATCH] mempolicy can select the wrong policy # # mempolicy.c code will return the wrong policy in some cases. # # Signed-off-by: Andrea Arcangeli # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/mempolicy.c # 2004/11/18 23:03:38-08:00 andrea@novell.com +4 -4 # mempolicy can select the wrong policy # # ChangeSet # 2004/11/19 14:52:39-08:00 andrea@novell.com # [PATCH] fix for mpol mm corruption on tmpfs # # With the inline symlink shmem_inode_info structure is overwritten with data # until vfs_inode, and that caused the ->policy to be a corrupted pointer # during unlink. It wasn't immediatly easy to see what was going on due the # random mm corruption that generated a weird oops, it looked more like a # race condition on freed memory at first. # # There's simply no need to set a policy for inodes, since the idx is always # zero. All we have to do is to initialize the data structure (the semaphore # may need to run during the page allocation for the non-inline symlink) but # we don't need to allocate the rb nodes. This way we don't need to call # mpol_free during the destroy_inode (not doable at all if the policy rbtree # is corrupt by the inline symlink ;). # # An equivalent version of this patch based on a 2.6.5 tree with additional # numa features on top of this (i.e. interleaved by default, and that's # prompted me to add a comment in the LNK init path), works fine in a numa # simulation on my laptop (untested on the bare hardware). # # Signed-off-by: Andrea Arcangeli # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/shmem.c # 2004/11/18 23:03:09-08:00 andrea@novell.com +10 -2 # fix for mpol mm corruption on tmpfs # # ChangeSet # 2004/11/19 14:52:26-08:00 takata@linux-m32r.org # [PATCH] m32r: Fix build error of arch/m32r/mm/fault.c # # The modification of "Changes for arch/m32r/mm/fault.c@1.3" was # prepared for enforce-a-gap-between-heap-and-stack.patch(*) of -mm tree, # but it has not been merged into mainline. # (*) "heap-stack-gap for 2.6" (Sep. 25, 2004) # http://www.uwsg.iu.edu/hypermail/linux/kernel/0409.3/0435.html # # So, this patch is for withdrawing the previous arch/m32r/mm/fault.c. # # Signed-off-by: Hirokazu Takata # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/m32r/mm/fault.c # 2004/11/18 23:03:09-08:00 takata@linux-m32r.org +1 -1 # m32r: Fix build error of arch/m32r/mm/fault.c # # ChangeSet # 2004/11/19 14:52:14-08:00 wli@holomorphy.com # [PATCH] parport_pc warning fixes # # Stomp a couple of warnings which several people have tried to fix. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/parport/parport_pc.c # 2004/11/18 23:03:09-08:00 wli@holomorphy.com +3 -3 # parport_pc warning fixes # # ChangeSet # 2004/11/19 14:52:01-08:00 rmk+lkml@arm.linux.org.uk # [PATCH] parport_pc CONFIG_PCI=n build fix # # The following patch fixes these build errors on machines with CONFIG_PCI=n: # # drivers/parport/parport_pc.c:3199: error: `parport_init_mode' undeclared (first use in this function) # drivers/parport/parport_pc.c:3199: error: (Each undeclared identifier is reported only once # drivers/parport/parport_pc.c:3199: error: for each function it appears in.) # # Signed-off-by: Russell King # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/parport/parport_pc.c # 2004/11/18 23:03:39-08:00 rmk+lkml@arm.linux.org.uk +8 -2 # parport_pc CONFIG_PCI=n build fix # # ChangeSet # 2004/11/19 14:51:48-08:00 sfr@canb.auug.org.au # [PATCH] ppc64 iSeries: PURR emulation fix # # It appears that the PURR emulation patch was the victim of the renaming of # a structure element. The current BK kernel will not build for iSeries # without this patch. # # Signed-off-by: Stephen Rothwell # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/lparcfg.c # 2004/11/18 23:03:08-08:00 sfr@canb.auug.org.au +2 -2 # ppc64 iSeries: PURR emulation fix # # ChangeSet # 2004/11/19 14:51:35-08:00 mingo@elte.hu # [PATCH] sched: fix ->nr_uninterruptible handling bugs # # PREEMPT_RT on SMP systems triggered weird (very high) load average # values rather easily, which turned out to be a mainline kernel # ->nr_uninterruptible handling bug in try_to_wake_up(). # # the following code: # # if (old_state == TASK_UNINTERRUPTIBLE) { # old_rq->nr_uninterruptible--; # # potentially executes with old_rq potentially being != rq, and hence # updating ->nr_uninterruptible without the lock held. Given a # sufficiently concurrent preemption workload the count can get out of # whack and updates might get lost, permanently skewing the global count. # Nothing except the load-average uses nr_uninterruptible() so this # condition can go unnoticed quite easily. # # the fix is to update ->nr_uninterruptible always on the runqueue where # the task currently is. (this is also a tiny performance plus for # try_to_wake_up() as a stackslot gets freed up.) # # while fixing this bug i found three other ->nr_uninterruptible related # bugs: # # - the update should be moved from deactivate_task() into schedule(), # beacause e.g. setscheduler() does deactivate_task()+activate_task(), # which in turn may result in a -1 counter-skew if setscheduler() is # done on a task asynchronously, which task is still on the runqueue # but has already set ->state to TASK_UNINTERRUPTIBLE. # # sys_sched_setscheduler() is used rarely, but the bug is real. (The # fix is also a small performance enhancement.) # # The rules for ->nr_uninterruptible updating are the following: it # gets increased by schedule() only, when a task is moved off the # runqueue and it has a state of TASK_UNINTERRUPTIBLE. It is decreased # by try_to_wake_up(), by the first wakeup that materially changes the # state from TASK_UNINTERRUPTIBLE back to TASK_RUNNING, and moves the # task to the runqueue. # # - on CPU-hotplug down we might zap a CPU that has a nonzero counter. # Due to the fuzzy nature of the global counter a CPU might hold a # nonzero ->nr_uninterruptible count even if it has no tasks anymore. # The solution is to 'migrate' the counter to another runqueue. # # - we should not return negative counter values from the # nr_uninterruptible() function, since it accesses them without taking # the runqueue locks, so the total sum might be slightly above or # slightly below the real count. # # I tested the attached patch on x86 SMP and it solves the load-average # problem. (I have tested CPU_HOTPLUG compilation but not functionality.) # I think this is a must-have for 2.6.10, because there are apps that go # berzerk if load-average is too high (e.g. sendmail). # # Signed-off-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/11/18 23:03:08-08:00 mingo@elte.hu +45 -7 # sched: fix ->nr_uninterruptible handling bugs # # ChangeSet # 2004/11/19 14:41:23-08:00 jeffm@novell.com # [PATCH] selinux: cache not freed if load_policy fails; reload BUG's # # If security_load_policy() fails on the first try, the cache is never cleaned # up. When the policy is fixed and a reload is attempted, the old cache will # still exist, causing a BUG() in kmem_cache_create(). # # This patch adds a destroy operation to clean up the cache on failure. # # Signed-off-by: Jeff Mahoney # Signed-off-by: Linus Torvalds # # security/selinux/ss/services.c # 2004/11/19 13:15:06-08:00 jeffm@novell.com +2 -0 # selinux: cache not freed if load_policy fails; reload BUG's # # security/selinux/ss/avtab.h # 2004/11/19 13:16:07-08:00 jeffm@novell.com +1 -0 # selinux: cache not freed if load_policy fails; reload BUG's # # security/selinux/ss/avtab.c # 2004/11/19 13:14:52-08:00 jeffm@novell.com +5 -0 # selinux: cache not freed if load_policy fails; reload BUG's # # ChangeSet # 2004/11/19 16:16:09-06:00 axboe@suse.de # [PATCH] nsp_cs bad queuecommand return # # Return 0 from queuecommand, if the command has been completed already. # # Signed-off-by: Jens Axboe # Signed-off-by: James Bottomley # # drivers/scsi/pcmcia/nsp_cs.c # 2004/11/19 02:36:39-06:00 axboe@suse.de +2 -2 # nsp_cs bad queuecommand return # # ChangeSet # 2004/11/19 16:15:03-06:00 axboe@suse.de # [PATCH] megaraid2 bad queuecommand return # # If the command is already completed, megaraid_queue_command() must # return 0. # # Signed-off-by: Jens Axboe # Signed-off-by: James Bottomley # # drivers/scsi/megaraid/megaraid_mbox.c # 2004/11/18 16:12:10-06:00 axboe@suse.de +1 -0 # megaraid2 bad queuecommand return # # ChangeSet # 2004/11/19 16:11:25-06:00 axboe@suse.de # [PATCH] aacraid bad queuecommand return # # aac_read() and aac_write() may complete a command but return -1, which # is propagated through aac_scsi_cmd() to the mid layer through # ->queuecommand. If the command has been completed, it must return 0. # # Signed-off-by: Jens Axboe # Signed-off-by: James Bottomley # # drivers/scsi/aacraid/aachba.c # 2004/11/18 16:10:40-06:00 axboe@suse.de +3 -3 # aacraid bad queuecommand return # # ChangeSet # 2004/11/19 16:10:22-06:00 axboe@suse.de # [PATCH] nsp32 bad queuecommand return # # The driver appropriately returns SCSI_MLQUEUE_HOST_BUSY, but it has # already completed the command. Just return 0 instead and let the mid # layer handle it through scsi_done(). # # Signed-off-by: Jens Axboe # Signed-off-by: James Bottomley # # drivers/scsi/nsp32.c # 2004/11/19 02:10:05-06:00 axboe@suse.de +4 -6 # nsp32 bad queuecommand return # # ChangeSet # 2004/11/19 16:08:40-06:00 axboe@suse.de # [PATCH] ncr53c8xx bad queuecommand return # # One more case of returning non-zero with a completed command. # # Signed-off-by: Jens Axboe # Signed-off-by: James Bottomley # # drivers/scsi/ncr53c8xx.c # 2004/11/19 02:06:28-06:00 axboe@suse.de +1 -0 # ncr53c8xx bad queuecommand return # # ChangeSet # 2004/11/19 16:05:16-06:00 axboe@suse.de # [PATCH] megaraid bad queuecommand return # # In case of scb allocation failure, mega_build_cmd() can return NULL scb # but set busy, which causes a non-zero return from ->queuecommand() while # the scsi command has been completed. Just returning busy without calling # done() should be enough for appropriate retries. # # Signed-off-by: Jens Axboe # Signed-off-by: James Bottomley # # drivers/scsi/megaraid.c # 2004/11/19 02:03:43-06:00 axboe@suse.de +0 -20 # megaraid bad queuecommand return # # ChangeSet # 2004/11/19 16:04:16-06:00 axboe@suse.de # [PATCH] ide-scsi bad queuecommand return # # ide-scsi completes a command but returns ownership to the mid layer. # # Signed-off-by: Jens Axboe # Signed-off-by: James Bottomley # # drivers/scsi/ide-scsi.c # 2004/11/18 15:54:09-06:00 axboe@suse.de +1 -1 # ide-scsi bad queuecommand return # # ChangeSet # 2004/11/19 15:58:11-06:00 axboe@suse.de # [PATCH] 3ware bad queuecommand returns # # If your ->queuecommand() completes a command through done, it must not # return non-zero to the mid layer so that it takes ownership of the # command again. # # Signed-off-by: Jens Axboe # # corrected typo # # Signed-off-by: James Bottomley # # drivers/scsi/3w-xxxx.c # 2004/11/18 15:55:31-06:00 axboe@suse.de +1 -0 # 3ware bad queuecommand returns # # drivers/scsi/3w-9xxx.c # 2004/11/18 15:55:58-06:00 axboe@suse.de +1 -0 # 3ware bad queuecommand returns # # ChangeSet # 2004/11/19 12:26:51-08:00 ak@suse.de # [PATCH] x86_64: fix async IPIs # # Fix async IPI to not return before stack data is used. # This can fix reboot crashes and apparently helps vmware. # # Signed-off-by: Andi Kleen # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/smp.c # 2004/11/19 12:26:12-08:00 ak@suse.de +3 -3 # x86_64: fix async IPIs # # ChangeSet # 2004/11/19 10:02:32-08:00 eike-kernel@sf-tec.de # [PATCH] PCI: fix Documentation/pci.txt inconsistency # # Signed-off-by: Rolf Eike Beer # Signed-off-by: Greg Kroah-Hartman # # Documentation/pci.txt # 2004/11/18 01:09:06-08:00 eike-kernel@sf-tec.de +3 -5 # PCI: fix Documentation/pci.txt inconsistency # # ChangeSet # 2004/11/19 10:02:19-08:00 rddunlap@osdl.org # [PATCH] PCI Hotplug: cpcihp_generic: fix module_param data type # # drivers/pci/hotplug/cpcihp_generic.c:214: warning: return from # incompatible pointer type # # Signed-off-by: Randy Dunlap # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/hotplug/cpcihp_generic.c # 2004/11/16 14:30:07-08:00 rddunlap@osdl.org +1 -1 # PCI Hotplug: cpcihp_generic: fix module_param data type # # ChangeSet # 2004/11/19 10:02:07-08:00 eike-hotplug@sf-tec.de # [PATCH] PCI Hotplug: clean up rpaphp_pci.c::rpaphp_find_pci_dev # # this patch improves rpaphp_find_pci_dev. First it uses the for_each_pci_dev # macro instead of the while loop, making this hotplug safe (which is a good # idea in a hotplug driver, isn't it?). Then it removes retval_dev. retval_dev # is set to the found device when something is found, NULL otherwise. If # nothing is found dev will be NULL at the end of the loop anyway and the # found device if we found something, no need for retval_dev then. And a very # small coding style fix. # # Signed-off-by: Rolf Eike Beer # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/11/19 10:01:54-08:00 bunk@stusta.de # [PATCH] PCI Hotplug: remove unused drivers/pci/hotplug/pciehp_sysfs.c # # Remove unused the drivers/pci/hotplug/pciehp_sysfs.c # # Signed-off-by: Adrian Bunk # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/hotplug/pciehp.h # 2004/11/12 16:40:42-08:00 bunk@stusta.de +0 -3 # PCI Hotplug: remove unused drivers/pci/hotplug/pciehp_sysfs.c # # drivers/pci/hotplug/Makefile # 2004/11/12 17:09:35-08:00 bunk@stusta.de +0 -1 # PCI Hotplug: remove unused drivers/pci/hotplug/pciehp_sysfs.c # # BitKeeper/deleted/.del-pciehp_sysfs.c~f6acc687a7d33e00 # 2004/11/19 10:01:45-08:00 bunk@stusta.de +0 -0 # Delete: drivers/pci/hotplug/pciehp_sysfs.c # # ChangeSet # 2004/11/19 09:39:04-08:00 mdharm-usb@one-eyed-alien.net # [PATCH] USB Storage: Remove unnecessary state testing # # This patch started as as405 from Alan Stern. It has been re-generated # against the current tip of the BK tree. # # For quite a while we've had a bunch of state-transition testing code in the # driver, to report if anything bad ever happens (like the SCSI midlayer # trying to queue a second command before the first one finishes). None of # those tests triggered in a very long time; this aspect of the code appears # to be extremely stable. # # So this patch removes all those tests for illegal values of us->sm_state. # It turns out that sm_state was used only for one other purpose: to check # whether a command had timed out and caused a SCSI abort. That piece of # information can easily be stored in a single new bitflag (which is called # calling US_FLIDX_TIMED_OUT) and doing so makes us->sm_state completely # unused. Hence the patch removes it from the structure. # # # Signed-off-by: Alan Stern # Signed-off-by: Matthew Dharm # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/storage/usb.h # 2004/11/14 16:41:09-08:00 mdharm-usb@one-eyed-alien.net +1 -7 # USB Storage: Remove unnecessary state testing # # drivers/usb/storage/usb.c # 2004/11/14 16:41:08-08:00 mdharm-usb@one-eyed-alien.net +6 -11 # USB Storage: Remove unnecessary state testing # # drivers/usb/storage/transport.c # 2004/11/14 16:41:07-08:00 mdharm-usb@one-eyed-alien.net +2 -2 # USB Storage: Remove unnecessary state testing # # drivers/usb/storage/scsiglue.c # 2004/11/14 16:41:05-08:00 mdharm-usb@one-eyed-alien.net +9 -35 # USB Storage: Remove unnecessary state testing # # drivers/usb/storage/isd200.c # 2004/11/14 16:41:04-08:00 mdharm-usb@one-eyed-alien.net +2 -2 # USB Storage: Remove unnecessary state testing # # ChangeSet # 2004/11/19 09:38:47-08:00 mdharm-usb@one-eyed-alien.net # [PATCH] USB Storage: Force INQUIRY length to be 36 # # This is patch as399, originally from Alan Stern. # # A recent change to the scsi_probe_lun() routine now allows host drivers to # specify a device's INQUIRY length in a way that cannot be overridden by # the value returned from the device. This patch makes usb-storage set the # length to 36; now buggy devices won't be able to cause trouble by saying # that they have 37 bytes of INQUIRY data available. # # The only way this value could be changed is if someone creates a SCSI # blacklist entry with the BLIST_INQUIRY_58 flag -- and no one would do that # for a USB device (I hope)! # # Signed-off-by: Alan Stern # Signed-off-by: Matthew Dharm # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/storage/scsiglue.c # 2004/10/25 12:44:26-07:00 mdharm-usb@one-eyed-alien.net +3 -6 # USB Storage: Force INQUIRY length to be 36 # # ChangeSet # 2004/11/19 09:38:31-08:00 mdharm-usb@one-eyed-alien.net # [PATCH] USB Storage: fixes to usb-storage scanning thread # # This was originally patch as401 from Alan Stern. This patch makes a couple # of small changes to the new scanning thread. # # It changes the name to "usb-stor-scan", which was my original intention and # makes more sense than the current name. # # It also removes the PF_NOFREEZE flag; if someone suspends their system # immediately after plugging in a USB storage device then the scanning thread # should be frozen along with everything else. The delay will be restarted # after the system wakes up. # # # Signed-off-by: Alan Stern # Signed-off-by: Matthew Dharm # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/storage/usb.c # 2004/10/26 07:01:16-07:00 mdharm-usb@one-eyed-alien.net +7 -2 # USB Storage: fixes to usb-storage scanning thread # # ChangeSet # 2004/11/19 09:38:16-08:00 masaki-c@nict.go.jp # [PATCH] USB: new defice for usb serial pl2303 # # Add device ID to pl2303 usb serial driver for # 1) I/O DATA USB-RSAQ3 # 2) ELECOM UC-SGT # # Signed-off-by: CHIKAMA Masaki # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/pl2303.h # 2004/11/15 17:00:07-08:00 masaki-c@nict.go.jp +2 -0 # USB: new defice for usb serial pl2303 # # drivers/usb/serial/pl2303.c # 2004/11/14 22:37:45-08:00 masaki-c@nict.go.jp +2 -0 # USB: new defice for usb serial pl2303 # # ChangeSet # 2004/11/19 09:38:00-08:00 phil@ipom.com # [PATCH] USB Storage: Unusual_dev entry for tekom/yakumo # # Here's another unusual_devs entry for the Tekom/Yakumo devices. While I # was there I realized two of the tekom entries were out of order, so I # fixed that as well. # # From: Paul Ortyl # Signed-off-by: Phil Dibowitz # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/storage/unusual_devs.h # 2004/11/15 22:17:55-08:00 phil@ipom.com +13 -5 # USB Storage: Unusual_dev entry for tekom/yakumo # # ChangeSet # 2004/11/19 09:37:44-08:00 twogood@users.sourceforge.net # [PATCH] Re: The "ipaq" module: Updated list of vendor/product IDs # # This patch for ipaq.h and ipaq.c in drivers/usb/serial/ has the # following features: # # o Provides an updated table with all vendor/product IDs (except one [1]) # present in Microsoft ActiveSync 3.7.1, the latest version available for # download. # # o Removes #defines with vendor and product IDs from ipaq.h [2] # # The table has been autogenerated from the file wceusbsh.inf (extracted # from MSASYNC.EXE with cabextract). The scripts used to generate the # table become available for download as part of the SynCE project # (http://synce.sourceforge.net). # # [1] Vendor 0x45e (Microsoft) with device 0xCE is not included, because # they are used when the device is turned off but still connected to the # PC via USB. When the device is turned on, it changes vendor/product IDs # to the more specific ones. # # [2] Not needed with an autogenerated device table # # # Signed-off-by: David Eriksson # Signed-off-by: Ganesh Varadarajan # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/ipaq.h # 2004/11/16 05:05:57-08:00 twogood@users.sourceforge.net +0 -75 # Re: The "ipaq" module: Updated list of vendor/product IDs # # drivers/usb/serial/ipaq.c # 2004/11/16 05:07:20-08:00 twogood@users.sourceforge.net +442 -41 # Re: The "ipaq" module: Updated list of vendor/product IDs # # ChangeSet # 2004/11/19 09:37:29-08:00 rl@hellgate.ch # [PATCH] USB: visor: Always do generic_startup # # generic_startup in visor.c was not called for some hardware, resulting # in attempts to access memory that had never been allocated, which in # turn caused the problem several people reported with recent (2.6.10ish) # kernels. # # Signed-off-by: Roger Luethi # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/visor.c # 2004/11/16 07:31:24-08:00 rl@hellgate.ch +2 -1 # USB: visor: Always do generic_startup # # ChangeSet # 2004/11/19 09:37:11-08:00 pmarques@grupopie.com # [PATCH] USB: add PID to ftdi_sio.c # # The attached patch fixes a bug introduced by myself (a brown paper bag # one) when I posted the patch that introduced this same PID to the # id_table_FT232BM array only and not the id_table_combined array. # # Signed-off-by: Paulo Marques # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/ftdi_sio.c # 2004/11/16 09:13:44-08:00 pmarques@grupopie.com +1 -0 # USB: add PID to ftdi_sio.c # # ChangeSet # 2004/11/19 09:36:54-08:00 petkan@nucleusys.com # [PATCH] USB: pegasus endian fixes # # big-endian related fixes; # # Signed-off-by: Petko Manolov # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/net/pegasus.c # 2004/11/18 03:24:02-08:00 petkan@nucleusys.com +4 -4 # USB: pegasus endian fixes # # ChangeSet # 2004/11/19 09:36:32-08:00 daniel.ritz@gmx.ch # [PATCH] USB: Add some help text for touchkitusb # # add some help text for touchkitusb. the howto there should also # work for mtouchusb and other touchscreens using the input layer. # # Signed-off-by: Daniel Ritz # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/input/Kconfig # 2004/11/18 12:07:45-08:00 daniel.ritz@gmx.ch +3 -0 # USB: Add some help text for touchkitusb # # ChangeSet # 2004/11/19 09:14:38-08:00 thomas@plx.com # [PATCH] I2C: i2c-nforce2.c add support for nForce3 Pro 150 MCP # # This is the all new and improved version of the patch: # - following the advise from Jean Delvare I removed the redundant definition # of the PCI IDs from the driver and just add them to the pci_ids.h file. # - the patch is now created against linux 2.6.10-RC2. # # Signed-off-by: Thomas Leibold # Signed-off-by: Greg Kroah-Hartman # # include/linux/pci_ids.h # 2004/11/18 01:22:06-08:00 thomas@plx.com +2 -0 # I2C: i2c-nforce2.c add support for nForce3 Pro 150 MCP # # drivers/i2c/busses/i2c-nforce2.c # 2004/11/18 01:23:37-08:00 thomas@plx.com +4 -5 # I2C: i2c-nforce2.c add support for nForce3 Pro 150 MCP # # drivers/i2c/busses/Kconfig # 2004/11/18 01:22:06-08:00 thomas@plx.com +1 -0 # I2C: i2c-nforce2.c add support for nForce3 Pro 150 MCP # # ChangeSet # 2004/11/19 09:14:15-08:00 paubert@iram.es # [PATCH] I2C: minor comment fix # # It seems so. BTW I hate wrong comments and happened to add one # in my patch. To fix my blunder, can you apply the appended one # line removal on top of Jean's patch. # # # Signed-off-by: Gabriel Paubert # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/i2c-core.c # 2004/11/17 03:18:35-08:00 paubert@iram.es +0 -1 # I2C: minor comment fix # # ChangeSet # 2004/11/19 09:13:45-08:00 khali@linux-fr.org # [PATCH] I2C: Cleanups to the recent smbus functions removal # # This patch cleans up the recent removal of smbus functions proposed by # Arjan and then fixed by Gabriel. Changes are as follow: # # 1* Discard i2c_smbus_block_process_call, as it isn't used anywhere # either. I guess that Arjan missed it because it wasn't exported. # # 2* Document the functions removal, so that people have at least an idea # that the functions can be restored later if needed. # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/i2c-core.c # 2004/11/15 12:47:56-08:00 khali@linux-fr.org +0 -19 # I2C: Cleanups to the recent smbus functions removal # # Documentation/i2c/writing-clients # 2004/11/15 12:50:03-08:00 khali@linux-fr.org +16 -4 # I2C: Cleanups to the recent smbus functions removal # # ChangeSet # 2004/11/19 09:13:08-08:00 khali@linux-fr.org # [PATCH] I2C: Fixes to the i2c-amd756-s4882 driver # # While working on the 2.4 version of the i2c-amd756-s4882 driver, I # noticed a few quirks on the 2.6 version I sent to you. The following # patch attempts to fix them. # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/busses/i2c-amd756-s4882.c # 2004/11/13 01:23:32-08:00 khali@linux-fr.org +5 -2 # I2C: Fixes to the i2c-amd756-s4882 driver # # ChangeSet # 2004/11/19 09:12:35-08:00 khali@linux-fr.org # [PATCH] I2C: Do not register useless smsc47m1 # # While verifying my stack of patches against what you sent to Linus last # week, I noticed this one. Looks like I simply forgot to send it to you, # as I cannot find any trace of it in the lm_sensors mailing-list # archives. # # The patch prevents an smsc47m1 device from being registered when no # monitoring function is actually active within the chip. See this ticket # for background: # http://secure.netroedge.com/~lm78/readticket.cgi?ticket=1801 # This is certainly better to explicitely fail in this case than leave the # user with an empty sysfs directory (except for alarms), which tends to # make him/her think of a driver bug, which it isn't (what it really is is # a BIOS brokenness). # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/smsc47m1.c # 2004/10/27 10:23:31-07:00 khali@linux-fr.org +21 -8 # I2C: Do not register useless smsc47m1 # # ChangeSet # 2004/11/19 08:47:38-08:00 maneesh@in.ibm.com # [PATCH] fix oops in sysfs_remove_dir() # # The following patch should avoid the sysfs_remove_dir() oops you are # seeing while device removal. It anyway fixes the obvious error and is # needed. But it will not make any change to the first error you are # seeing while connecting the device. # # # o Following patch avoids the sysfs_remove_dir() oops when it is passed # a kobject with NULL dentry. # # Signed-off-by: Maneesh Soni # Signed-off-by: Greg Kroah-Hartman # # fs/sysfs/dir.c # 2004/11/17 16:00:00-08:00 maneesh@in.ibm.com +2 -1 # fix oops in sysfs_remove_dir() # # ChangeSet # 2004/11/19 08:47:13-08:00 akpm@osdl.org # [PATCH] fix kobject varargs bug # # From: Gerd Knorr # # It uses the varargs list twice in a illegal way. That doesn't harm on i386 # by pure luck, but blows things up on amd64 machines. # # Using var args list twice without calling va_start twice is illegal. # # Signed-off-by: Gerd Knorr # Signed-off-by: Andrew Morton # Signed-off-by: Greg Kroah-Hartman # # lib/kobject.c # 2004/11/18 07:06:26-08:00 akpm@osdl.org +4 -2 # fix kobject varargs bug # # ChangeSet # 2004/11/19 14:36:27+00:00 rmk@flint.arm.linux.org.uk # [PCMCIA] Don't place Cardbus bridges into D3 state on suspend. # # Some laptops, notably IBM T22, refuse to suspend when the Cardbus # bridge is placed into D3. Therefore, comment out the call for the # time being. # # drivers/pcmcia/yenta_socket.c # 2004/11/19 14:32:45+00:00 rmk@flint.arm.linux.org.uk +7 -1 # Remove call to pci_set_power_state in yenta suspend method. # # ChangeSet # 2004/11/18 22:33:28-08:00 iod00d@hp.com # [IA64] perfmon: fix double end-of-comment in previous checkin # # Following trivial patch fixes what looks like a merge bug. # # Signed-off-by: Grant Grundler # Signed-off-by: Tony Luck # # arch/ia64/kernel/perfmon.c # 2004/11/18 22:29:11-08:00 iod00d@hp.com +1 -1 # fix double end-of-comment in previous checkin # # ChangeSet # 2004/11/18 18:59:45-08:00 davem@nuts.davemloft.net # [SPARC]: Fix serial console handling. # # Due to recent logic changes in uart_add_one_port(), the # serial console was being registered twice. To avoid # this, so serial console init before we actually register # the uarts ports with the core serial layer. # # Noticed by William Lee Irwin III # # Signed-off-by: David S. Miller # # drivers/serial/sunzilog.c # 2004/11/18 18:59:25-08:00 davem@nuts.davemloft.net +1 -1 # [SPARC]: Fix serial console handling. # # Due to recent logic changes in uart_add_one_port(), the # serial console was being registered twice. To avoid # this, so serial console init before we actually register # the uarts ports with the core serial layer. # # Noticed by William Lee Irwin III # # Signed-off-by: David S. Miller # # drivers/serial/sunsu.c # 2004/11/18 18:59:25-08:00 davem@nuts.davemloft.net +1 -1 # [SPARC]: Fix serial console handling. # # Due to recent logic changes in uart_add_one_port(), the # serial console was being registered twice. To avoid # this, so serial console init before we actually register # the uarts ports with the core serial layer. # # Noticed by William Lee Irwin III # # Signed-off-by: David S. Miller # # drivers/serial/sunsab.c # 2004/11/18 18:59:25-08:00 davem@nuts.davemloft.net +2 -2 # [SPARC]: Fix serial console handling. # # Due to recent logic changes in uart_add_one_port(), the # serial console was being registered twice. To avoid # this, so serial console init before we actually register # the uarts ports with the core serial layer. # # Noticed by William Lee Irwin III # # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/18 23:17:43+00:00 dsaxena@net.rmk.(none) # [ARM PATCH] 2268/1: Update Documentation/arm/Booting # # Patch from Deepak Saxena # # One of the problems I have seen with several bootloaders is # that they forget to disable network devices before jumping # into the kernel and we end up with kernel text being overwritten # by random data before the in-kernel driver resets the devices. # This patch adds a blurb to the ARM Bootloader documentation # reminding developers to quiesce all DMA capable devices before # executing the kernel. # # Signed-off-by: Deepak Saxena # Signed-off-by: Russell King # # Documentation/arm/Booting # 2004/11/18 09:44:14+00:00 dsaxena@net.rmk.(none) +4 -0 # [PATCH] 2268/1: Update Documentation/arm/Booting # # ChangeSet # 2004/11/18 23:12:33+00:00 dsaxena@net.rmk.(none) # [ARM PATCH] 2262/1: Various IXP2000 typo fixes and comment cleanups # # Patch from Deepak Saxena # # Patch from Lennert Buytenhek # # Signed-off-by: Lennert Buytenhek # # Signed-off-by: Deepak Saxena # Signed-off-by: Russell King # # include/asm-arm/arch-ixp2000/system.h # 2004/10/07 19:19:53+01:00 dsaxena@net.rmk.(none) +1 -1 # [PATCH] 2262/1: Various IXP2000 typo fixes and comment cleanups # # include/asm-arm/arch-ixp2000/platform.h # 2004/10/07 19:19:53+01:00 dsaxena@net.rmk.(none) +3 -3 # [PATCH] 2262/1: Various IXP2000 typo fixes and comment cleanups # # include/asm-arm/arch-ixp2000/ixp2000-regs.h # 2004/10/07 19:19:53+01:00 dsaxena@net.rmk.(none) +5 -5 # [PATCH] 2262/1: Various IXP2000 typo fixes and comment cleanups # # include/asm-arm/arch-ixp2000/ixdp2x00.h # 2004/10/07 19:19:53+01:00 dsaxena@net.rmk.(none) +1 -1 # [PATCH] 2262/1: Various IXP2000 typo fixes and comment cleanups # # include/asm-arm/arch-ixp2000/irqs.h # 2004/10/07 19:19:53+01:00 dsaxena@net.rmk.(none) +5 -6 # [PATCH] 2262/1: Various IXP2000 typo fixes and comment cleanups # # include/asm-arm/arch-ixp2000/io.h # 2004/10/07 19:19:53+01:00 dsaxena@net.rmk.(none) +1 -1 # [PATCH] 2262/1: Various IXP2000 typo fixes and comment cleanups # # include/asm-arm/arch-ixp2000/dma.h # 2004/10/07 19:19:53+01:00 dsaxena@net.rmk.(none) +1 -1 # [PATCH] 2262/1: Various IXP2000 typo fixes and comment cleanups # # arch/arm/mach-ixp2000/ixdp2x00.c # 2004/10/07 19:19:53+01:00 dsaxena@net.rmk.(none) +3 -3 # [PATCH] 2262/1: Various IXP2000 typo fixes and comment cleanups # # arch/arm/mach-ixp2000/core.c # 2004/10/07 19:19:53+01:00 dsaxena@net.rmk.(none) +1 -1 # [PATCH] 2262/1: Various IXP2000 typo fixes and comment cleanups # # Documentation/arm/IXP2000 # 2004/10/07 19:19:53+01:00 dsaxena@net.rmk.(none) +5 -5 # [PATCH] 2262/1: Various IXP2000 typo fixes and comment cleanups # # ChangeSet # 2004/11/18 23:07:34+00:00 dsaxena@net.rmk.(none) # [ARM PATCH] 2258/1: Add missing IXP2000 Makefile.boot file # # Patch from Deepak Saxena # # Signed-off-by: Deepak Saxena # Signed-off-by: Russell King # # arch/arm/mach-ixp2000/Makefile.boot # 2004/11/16 18:43:37+00:00 dsaxena@net.rmk.(none) +3 -0 # [PATCH] 2258/1: Add missing IXP2000 Makefile.boot file # # arch/arm/mach-ixp2000/Makefile.boot # 2004/11/16 18:43:37+00:00 dsaxena@net.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-ixp2000/Makefile.boot # # ChangeSet # 2004/11/18 23:01:35+00:00 dsaxena@net.rmk.(none) # [ARM PATCH] 2254/1: Fix ixp4xx-regs.h PCI config address typo # # Patch from Deepak Saxena # # There seems to be a typo that has creeped into # include/asm/arch-ixp4xx/ixp4xx-regs.h. IXP4XX_EXP_CFG_BASE_VIRT and # IXP4XX_PCI_CFG_BASE_VIRT were both defined to the same value. The patch # changes PCI_CFG_BASE_VIRT to the value in the memory map comment. # # # Signed-off-by: Deepak Saxena # Signed-off-by: Russell King # # ChangeSet # 2004/11/18 17:00:19-06:00 jejb@mulgrave.(none) # SCSI: fix USB forced remove oops # # Because of the changes to add the target in to the # driver model, the cancellation method no-longer works # correctly. # # Fix it by iterating using shost_for_each_device instead. # # Signed-off-by: James Bottomley # # drivers/scsi/hosts.c # 2004/11/18 16:59:11-06:00 jejb@mulgrave.(none) +5 -7 # SCSI: fix USB forced remove oops # # include/asm-arm/arch-ixp4xx/ixp4xx-regs.h # 2004/09/29 08:08:37+01:00 dsaxena@net.rmk.(none) +1 -1 # [PATCH] 2254/1: Fix ixp4xx-regs.h PCI config address typo # # ChangeSet # 2004/11/18 22:55:44+00:00 dsaxena@net.rmk.(none) # [ARM PATCH] 2253/1: Fix IXP4xx PCI config cycle routines # # Patch from Deepak Saxena # # The IXP4xx PCI config cycle routines currently virtualize accesses # to device 0:0 to map to the host bridge itself. This is technically # incorrect b/c on certain boards we have an actual device wired to 0:0 # and the existing code will not see these. # # # Signed-off-by: Deepak Saxena # # Signed-off-by: Russell King # # arch/arm/mach-ixp4xx/common-pci.c # 2004/09/24 19:22:25+01:00 dsaxena@net.rmk.(none) +6 -24 # [PATCH] 2253/1: Fix IXP4xx PCI config cycle routines # # ChangeSet # 2004/11/18 22:50:00+00:00 dsaxena@net.rmk.(none) # [ARM PATCH] 2252/1: Fix IXP4XX timer interrupt implementation # # Patch from Deepak Saxena # # The current timer interrupt implementation can cause time to skip # forward by ~65s and causes a 1 minute pause during bootup. The fix # for this was found during 2.4 but got lost in the 2.6 transition. # # Details @: # # http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2003-September/017171.html # # # Signed-off-by: Deepak Saxena # Signed-off-by: Russell King # # arch/arm/mach-ixp4xx/common.c # 2004/09/30 06:05:15+01:00 dsaxena@net.rmk.(none) +2 -2 # [PATCH] 2252/1: Fix IXP4XX timer interrupt implementation # # ChangeSet # 2004/11/18 22:27:00+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2263/1: S3C2410 - gpio pin config fixes # # Patch from Ben Dooks # # Fix S3C2410_GPE3, S3C2410_GPE4 and S3C2410_GPE7 # pin functions, and add S3C2440 AC97 pin functions # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # ChangeSet # 2004/11/18 14:26:01-08:00 jmorris@redhat.com # [AF_UNIX]: Fix SELinux crashes with SOCK_SEQPACKET # # 1) Don't call security_unix_may_send() hook during sendmsg() for # SOCK_SEQPACKET, and ensure that sendmsg() can only be called on a # connected socket so as not to bypass the security_unix_stream_connect() # hook. # # 2) Return -EINVAL if sendto() is called on SOCK_SEQPACKET with an address # supplied. # # Signed-off-by: James Morris # Signed-off-by: David S. Miller # # net/unix/af_unix.c # 2004/11/18 14:25:42-08:00 jmorris@redhat.com +22 -4 # [AF_UNIX]: Fix SELinux crashes with SOCK_SEQPACKET # # 1) Don't call security_unix_may_send() hook during sendmsg() for # SOCK_SEQPACKET, and ensure that sendmsg() can only be called on a # connected socket so as not to bypass the security_unix_stream_connect() # hook. # # 2) Return -EINVAL if sendto() is called on SOCK_SEQPACKET with an address # supplied. # # Signed-off-by: James Morris # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/18 14:23:33-08:00 shemminger@osdl.org # [RANDOM]: Remove TCP MD4 code if not CONFIG_INET # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # include/asm-arm/arch-s3c2410/regs-gpio.h # 2004/11/17 19:00:54+00:00 ben-linux@org.rmk.(none) +12 -2 # [PATCH] 2263/1: S3C2410 - gpio pin config fixes # # drivers/char/random.c # 2004/11/18 14:23:14-08:00 shemminger@osdl.org +2 -0 # [RANDOM]: Remove TCP MD4 code if not CONFIG_INET # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/18 22:21:28+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2256/1: S3C2410 - dma load fixes # # Patch from Ben Dooks # # Fix pair of bugs in dma loading code # # 1) no need to error if loading onto stopped channel # 2) irq code prints error if buffer done callback # fully reloads the channel. # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # arch/arm/mach-s3c2410/dma.c # 2004/11/17 14:58:11+00:00 ben-linux@org.rmk.(none) +5 -4 # [PATCH] 2256/1: S3C2410 - dma load fixes # # ChangeSet # 2004/11/18 22:15:29+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2249/1: S3C2410 - update help for arch/arm/Kconfig.debug # # Patch from Ben Dooks # # Update help-text to show the new option for controlling # where the low-level debug messgaes go. # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # arch/arm/Kconfig.debug # 2004/11/15 15:23:02+00:00 ben-linux@org.rmk.(none) +3 -3 # [PATCH] 2249/1: S3C2410 - update help for arch/arm/Kconfig.debug # # ChangeSet # 2004/11/18 14:05:18-08:00 lnville@tuxdriver.com # [VLAN]: change_mtu should return 0 on success. # # Signed-off-by: John W. Linville # Signed-off-by: David S. Miller # # net/8021q/vlan_dev.c # 2004/11/18 14:04:58-08:00 lnville@tuxdriver.com +1 -1 # [VLAN]: change_mtu should return 0 on success. # # Signed-off-by: John W. Linville # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/18 13:57:41-08:00 Ian.Pratt@cl.cam.ac.uk # [IPV4]: Missing pskb_may_pull in icmp_filter. # # Signed-off-by: David S. Miller # # net/ipv4/raw.c # 2004/11/18 13:57:08-08:00 Ian.Pratt@cl.cam.ac.uk +3 -0 # [IPV4]: Missing pskb_may_pull in icmp_filter. # # ChangeSet # 2004/11/18 13:43:37-08:00 rddunlap@osdl.org # [SCTP]: Fix printk arg type # # fix printk argument type warning: # net/sctp/socket.c:2672: warning: format argument is not a pointer (arg 5) # # # Signed-off-by: Randy Dunlap # Signed-off-by: David S. Miller # # net/sctp/socket.c # 2004/11/18 13:43:18-08:00 rddunlap@osdl.org +1 -1 # [SCTP]: Fix printk arg type # # fix printk argument type warning: # net/sctp/socket.c:2672: warning: format argument is not a pointer (arg 5) # # # Signed-off-by: Randy Dunlap # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/18 13:42:30-08:00 patrick@tykepenguin.com # [DECNET]: Remove DECNET_SIOCGIFCONF. # # It's only purpose seems to be to break ifconfig. It often gets enabled by # default by distributors who like to set everything on, and it just confuses # people. # # The functionality is available via netlink anyway - which is what anyone using # DECnet will be using for configuration. # # Signed-off-by: Patrick Caulfield # Signed-off-by: David S. Miller # # net/decnet/dn_dev.c # 2004/11/18 13:42:11-08:00 patrick@tykepenguin.com +0 -60 # [DECNET]: Remove DECNET_SIOCGIFCONF. # # It's only purpose seems to be to break ifconfig. It often gets enabled by # default by distributors who like to set everything on, and it just confuses # people. # # The functionality is available via netlink anyway - which is what anyone using # DECnet will be using for configuration. # # Signed-off-by: Patrick Caulfield # Signed-off-by: David S. Miller # # net/decnet/Kconfig # 2004/11/18 13:42:11-08:00 patrick@tykepenguin.com +0 -11 # [DECNET]: Remove DECNET_SIOCGIFCONF. # # It's only purpose seems to be to break ifconfig. It often gets enabled by # default by distributors who like to set everything on, and it just confuses # people. # # The functionality is available via netlink anyway - which is what anyone using # DECnet will be using for configuration. # # Signed-off-by: Patrick Caulfield # Signed-off-by: David S. Miller # # arch/sparc64/defconfig # 2004/11/18 13:42:11-08:00 patrick@tykepenguin.com +0 -1 # [DECNET]: Remove DECNET_SIOCGIFCONF. # # It's only purpose seems to be to break ifconfig. It often gets enabled by # default by distributors who like to set everything on, and it just confuses # people. # # The functionality is available via netlink anyway - which is what anyone using # DECnet will be using for configuration. # # Signed-off-by: Patrick Caulfield # Signed-off-by: David S. Miller # # arch/mips/configs/rm200_defconfig # 2004/11/18 13:42:11-08:00 patrick@tykepenguin.com +0 -1 # [DECNET]: Remove DECNET_SIOCGIFCONF. # # It's only purpose seems to be to break ifconfig. It often gets enabled by # default by distributors who like to set everything on, and it just confuses # people. # # The functionality is available via netlink anyway - which is what anyone using # DECnet will be using for configuration. # # Signed-off-by: Patrick Caulfield # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/18 13:35:50-08:00 davem@nuts.davemloft.net # Merge http://linux-mh.bkbits.net/bluetooth-2.6 # into nuts.davemloft.net:/disk1/BK/net-2.6 # # net/bluetooth/l2cap.c # 2004/11/18 13:35:39-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # ChangeSet # 2004/11/18 10:48:17-08:00 eranian@hpl.hp.com # [IA64] perfmon: enable interrupts around semaphore call # # fix a problem in pfm_handle_work() where a task may # go to sleep in down_interruptible() with interrupts # disabled. This may happen only for a monitored thread # for which the PFM_FL_NOTIFY_BLOCK flag is set. The fix # re-enables interrupts around the semaphore call. It is safe # to do so because pfm_handle_work() is called from # do_notify_user() which is called only when the task is about # to leave the kernel, i.e., no risk of stack overflow because # of interrupt nesting. # # fix a debug printk warning in pfm_write_pmcs() # # signed-off-by: Stephane Eranian # ack-by: David Mosberger # Signed-off-by: Tony Luck # # arch/ia64/kernel/perfmon.c # 2004/11/18 10:43:37-08:00 eranian@hpl.hp.com +19 -1 # enable interrupts around semaphore call # # ChangeSet # 2004/11/18 08:01:00-08:00 torvalds@ppc970.osdl.org # Fix reading /proc//mem when parent dies. # # We should not touch "self_exec_id" here. The parent changed, # not we. # # kernel/exit.c # 2004/11/18 08:00:53-08:00 torvalds@ppc970.osdl.org +0 -1 # Fix reading /proc//mem when parent dies. # # We should not touch "self_exec_id" here. The parent changed, # not we. # # ChangeSet # 2004/11/18 07:51:28-08:00 andrew@walrond.org # [PATCH] fbdev: Fix rivafb breakage (typo introduced by NV IO access cleanups) # # Fix typo introduced during changes to use NV_ macros, # which caused screen corruption when using rivafb # # Signed-off-by: Andrew Walrond # Signed-off-by: Linus Torvalds # # drivers/video/riva/riva_hw.c # 2004/11/18 04:32:15-08:00 andrew@walrond.org +1 -1 # fbdev: Fix rivafb breakage (typo introduced by NV IO access cleanups) # # ChangeSet # 2004/11/18 07:51:15-08:00 adaplas@hotpop.com # [PATCH] rivafb: fix broken burst length calculation # # As noted by Linus, the burst-length "log2()" calculations were broken by # the cleanup. # # This reverts to the old code. # # drivers/video/riva/riva_hw.c # 2004/11/17 15:45:23-08:00 adaplas@hotpop.com +4 -12 # rivafb: fix broken burst length calculation # # ChangeSet # 2004/11/18 07:32:33-08:00 torvalds@ppc970.osdl.org # Fix floppy driver lock-up when you have an irq storm. # # It happens with misconfigured interrupts (and no floppy # controller). # # We should probably also make floppy use the irq probing # mechanism, which handles that situation more gracefully. # # drivers/block/floppy.c # 2004/11/18 07:32:26-08:00 torvalds@ppc970.osdl.org +4 -3 # Fix floppy driver lock-up when you have an irq storm. # # It happens with misconfigured interrupts (and no floppy # controller). # # We should probably also make floppy use the irq probing # mechanism, which handles that situation more gracefully. # # ChangeSet # 2004/11/17 16:29:01-08:00 davem@nuts.davemloft.net # [IPV6]: Set sk_prot early enough in inet6_create() # # It needs to be before the sk_set_owner() call # else we OOPS. # # Signed-off-by: David S. Miller # # net/ipv6/af_inet6.c # 2004/11/17 16:28:04-08:00 davem@nuts.davemloft.net +1 -1 # [IPV6]: Set sk_prot early enough in inet6_create() # # ChangeSet # 2004/11/17 15:56:57-08:00 davem@nuts.davemloft.net # Merge bk://kernel.bkbits.net/acme/sock-2.6 # into nuts.davemloft.net:/disk1/BK/net-2.6 # # include/net/sock.h # 2004/11/17 15:56:46-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # ChangeSet # 2004/11/17 15:53:10-08:00 herbert@gondor.apana.org.au # [IPV4/IPV6]: Remove frag_list check from output path. # # I've removed the frag_list check before fragmenting and we'll # rely on dev_queue_xmit to fix things up if necessary. Any # functions in between should do the right thing since they need # to handle non-linear skb's anyway. Well that's the theory :) # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/ip6_output.c # 2004/11/17 15:52:50-08:00 herbert@gondor.apana.org.au +1 -1 # [IPV4/IPV6]: Remove frag_list check from output path. # # I've removed the frag_list check before fragmenting and we'll # rely on dev_queue_xmit to fix things up if necessary. Any # functions in between should do the right thing since they need # to handle non-linear skb's anyway. Well that's the theory :) # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/ip_output.c # 2004/11/17 15:52:50-08:00 herbert@gondor.apana.org.au +2 -3 # [IPV4/IPV6]: Remove frag_list check from output path. # # I've removed the frag_list check before fragmenting and we'll # rely on dev_queue_xmit to fix things up if necessary. Any # functions in between should do the right thing since they need # to handle non-linear skb's anyway. Well that's the theory :) # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/17 14:58:17-08:00 linux-dev@morknet.de # [PATCH] fix dss1_divert fixes # # As noted by Bartlomiej, this makes the spinlock be a proper lock rather # than just a local lock to each user. # # Signed-off-by: Steffen A. Mork # Signed-off-by: Linus Torvalds # # drivers/isdn/divert/isdn_divert.h # 2004/11/17 09:59:16-08:00 linux-dev@morknet.de +2 -0 # fix dss1_divert fixes # # drivers/isdn/divert/isdn_divert.c # 2004/11/17 10:39:32-08:00 linux-dev@morknet.de +2 -9 # fix dss1_divert fixes # # drivers/isdn/divert/divert_procfs.c # 2004/11/17 08:42:00-08:00 linux-dev@morknet.de +0 -1 # fix dss1_divert fixes # # drivers/isdn/divert/divert_init.c # 2004/11/17 08:50:38-08:00 linux-dev@morknet.de +0 -1 # fix dss1_divert fixes # # ChangeSet # 2004/11/17 23:53:36+01:00 bzolnier@trik.(none) # [ide] fix /proc/ide/hd?/settings to not spam logs # # On Thu, 11 Nov 2004 17:10:21 +0100, Jens Axboe wrote: # > On Thu, Nov 11 2004, Alan Cox wrote: # > > > + printk(KERN_WARNING "Warning: /proc/ide/hd?/settings interface is " # > > > + "obsolete, and will be removed soon!\n"); # > > > + # > > # > > The above should be rate limited or on the write case moved to after # > > the capable() check. A program polling these settings now makes a nasty # > > noise and wipes the logs. A user can also do it intentionally. # > # > Or just print it once... # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/ide-proc.c # 2004/11/17 23:53:24+01:00 bzolnier@trik.(none) +15 -5 # [ide] fix /proc/ide/hd?/settings to not spam logs # # ChangeSet # 2004/11/17 23:41:42+01:00 bzolnier@trik.(none) # [ide] small IDE cleanups # # The patch below does the following small cleanups in the IDE code: # - make some needlessly global code static # - remove two unused functions from pdc202xx_new.c # # Signed-off-by: Adrian Bunk # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/trm290.c # 2004/11/07 03:15:43+01:00 bzolnier@trik.(none) +1 -1 # [ide] small IDE cleanups # # drivers/ide/pci/serverworks.h # 2004/11/07 03:15:16+01:00 bzolnier@trik.(none) +1 -1 # [ide] small IDE cleanups # # drivers/ide/pci/sc1200.c # 2004/11/07 03:14:47+01:00 bzolnier@trik.(none) +2 -2 # [ide] small IDE cleanups # # drivers/ide/pci/pdc202xx_old.c # 2004/11/07 03:14:09+01:00 bzolnier@trik.(none) +1 -1 # [ide] small IDE cleanups # # drivers/ide/pci/pdc202xx_new.c # 2004/11/07 03:13:37+01:00 bzolnier@trik.(none) +0 -56 # [ide] small IDE cleanups # # drivers/ide/pci/hpt366.h # 2004/11/07 03:10:09+01:00 bzolnier@trik.(none) +19 -19 # [ide] small IDE cleanups # # drivers/ide/pci/cy82c693.c # 2004/11/07 03:06:16+01:00 bzolnier@trik.(none) +1 -1 # [ide] small IDE cleanups # # drivers/ide/pci/cs5520.c # 2004/11/07 03:03:08+01:00 bzolnier@trik.(none) +1 -1 # [ide] small IDE cleanups # # drivers/ide/pci/aec62xx.h # 2004/11/07 03:02:40+01:00 bzolnier@trik.(none) +2 -2 # [ide] small IDE cleanups # # drivers/ide/legacy/qd65xx.h # 2004/11/07 03:01:40+01:00 bzolnier@trik.(none) +1 -1 # [ide] small IDE cleanups # # drivers/ide/legacy/qd65xx.c # 2004/11/07 03:01:54+01:00 bzolnier@trik.(none) +1 -1 # [ide] small IDE cleanups # # drivers/ide/legacy/hd.c # 2004/11/07 03:00:37+01:00 bzolnier@trik.(none) +4 -4 # [ide] small IDE cleanups # # drivers/ide/ide-probe.c # 2004/11/07 02:57:27+01:00 bzolnier@trik.(none) +1 -1 # [ide] small IDE cleanups # # drivers/ide/ide-disk.c # 2004/11/07 02:55:34+01:00 bzolnier@trik.(none) +2 -2 # [ide] small IDE cleanups # # drivers/ide/ide-cd.h # 2004/11/07 02:53:57+01:00 bzolnier@trik.(none) +3 -3 # [ide] small IDE cleanups # # drivers/ide/ide-cd.c # 2004/11/07 02:54:41+01:00 bzolnier@trik.(none) +3 -3 # [ide] small IDE cleanups # # ChangeSet # 2004/11/17 23:18:40+01:00 bzolnier@trik.(none) # [ide] remove RICOH CD-R/RW MP7083A from DMA blacklist # # From: Srihari Vijayaraghavan # # I have tested my RICOH CD-R/RW with this patch (on CD reading/writing), # and it works just fine with DMA enabled. # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/ide-dma.c # 2004/11/17 22:50:24+01:00 bzolnier@trik.(none) +0 -1 # [ide] remove RICOH CD-R/RW MP7083A from DMA blacklist # # ChangeSet # 2004/11/17 23:14:55+01:00 bzolnier@trik.(none) # [ide] "ide=nodma" printout fix # # From: Magnus Damm # # This simple patch changes the output from this: # .. # ide_setup: ide=nodmaIDE: Prevented DMA # .. # to this: # .. # ide_setup: ide=nodma : Prevented DMA # .. # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/ide.c # 2004/11/16 15:31:35+01:00 bzolnier@trik.(none) +1 -1 # [ide] "ide=nodma" printout fix # # ChangeSet # 2004/11/17 23:10:19+01:00 bzolnier@trik.(none) # [ide] update documentation for ide params # # From: Magnus Damm # # This patch removes ide parameters marked as obsolete in the source and # adds documentation for "ide=". I think I got it right, the important # part for me is "ide=nodma". # # Signed-off-by: Bartlomiej Zolnierkiewicz # # Documentation/kernel-parameters.txt # 2004/11/16 15:21:59+01:00 bzolnier@trik.(none) +5 -3 # [ide] update documentation for ide params # # ChangeSet # 2004/11/17 23:06:35+01:00 bzolnier@trik.(none) # [ide] no need to alloc sg_table in CRISv10 IDE driver # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/cris/ide-v10.c # 2004/11/17 23:06:24+01:00 bzolnier@trik.(none) +0 -2 # [ide] no need to alloc sg_table in CRISv10 IDE driver # # ChangeSet # 2004/11/17 23:01:29+01:00 bzolnier@trik.(none) # [ide] update CRISv10 IDE driver # # Signed-off-by: Mikael Starvik # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/cris/ide-v10.c # 2004/11/15 20:09:53+01:00 bzolnier@trik.(none) +46 -125 # [ide] update CRISv10 IDE driver # # ChangeSet # 2004/11/17 08:14:52-08:00 linux-dev@morknet.de # [PATCH] Make dss1_divert ISDN module work on SMP again # # When I switched my installation from kernel 2.4 to 2.6 I recognized that # the ISDN module dss1_divert was marked incompilable (config option # CONFIG_CLEAN_COMPILE must be turned off). # # The compile problem was the obsolete using of kernel 2.4 critical # sections. I replaced the cli() stuff with spinlocks as explained in the # Documentation/spinlocks.txt file. After that the module compiles and # runs as expected. # # Signed-off-by: Steffen A. Mork # Signed-off-by: Linus Torvalds # # drivers/isdn/i4l/Kconfig # 2004/11/17 04:34:10-08:00 linux-dev@morknet.de +1 -1 # Make dss1_divert ISDN module work on SMP again # # drivers/isdn/divert/isdn_divert.c # 2004/11/04 23:49:20-08:00 linux-dev@morknet.de +53 -55 # Make dss1_divert ISDN module work on SMP again # # drivers/isdn/divert/divert_procfs.c # 2004/11/04 23:49:57-08:00 linux-dev@morknet.de +4 -3 # Make dss1_divert ISDN module work on SMP again # # drivers/isdn/divert/divert_init.c # 2004/11/04 23:50:02-08:00 linux-dev@morknet.de +8 -6 # Make dss1_divert ISDN module work on SMP again # # ChangeSet # 2004/11/17 08:12:37-08:00 ak@suse.de # [PATCH] x86-64: fix boot crash on VIA systems # # quirk_via_irqpic cannot be __devinit because it runs at # pci_enable_device() time now. # # This fixes a boot time crash on a VIA x86-64 machine. # # Signed-off-by: Andi Kleen # Signed-off-by: Linus Torvalds # # drivers/pci/quirks.c # 2004/11/17 08:12:29-08:00 ak@suse.de +1 -1 # x86-64: fix boot crash on VIA systems # # ChangeSet # 2004/11/17 11:21:33+01:00 marcel@holtmann.org # [Bluetooth] Check for L2CAP reliability # # The L2CAP sockets can now set LM_RELIABLE flag and get notification # when a reliability problem with the ACL connection is detected. The # Bluetooth qualification tests require this functionality. # # Signed-off-by: Maxim Krasnyansky # Signed-off-by: Marcel Holtmann # # net/bluetooth/l2cap.c # 2004/11/17 11:18:25+01:00 marcel@holtmann.org +21 -0 # Check for L2CAP reliability # # ChangeSet # 2004/11/17 10:38:50+01:00 marcel@holtmann.org # [Bluetooth] Add support for L2CAP secure mode # # The secure mode requests an authentication and enables the encryption # for that connection. After the successful execution of these procedures # it triggers the generation of a new link key. # # Signed-off-by: Marcel Holtmann # # net/bluetooth/l2cap.c # 2004/11/17 10:35:45+01:00 marcel@holtmann.org +8 -3 # Add support for L2CAP secure mode # # include/net/bluetooth/l2cap.h # 2004/11/17 10:35:43+01:00 marcel@holtmann.org +2 -0 # Add support for L2CAP secure mode # # include/net/bluetooth/hci.h # 2004/11/17 10:35:30+01:00 marcel@holtmann.org +2 -0 # Add support for L2CAP secure mode # # ChangeSet # 2004/11/17 10:30:12+01:00 marcel@holtmann.org # [Bluetooth] Correct locking for zero SCID responses # # The l2cap_get_chan_by_ident() function must lock the socket with the # bh_lock_sock() function on success. # # Signed-off-by: Marcel Holtmann # # net/bluetooth/l2cap.c # 2004/11/17 10:27:12+01:00 marcel@holtmann.org +1 -0 # Correct locking for zero SCID responses # # ChangeSet # 2004/11/17 10:25:36+01:00 marcel@holtmann.org # [Bluetooth] Update copyright information # # The initial firmware loading routine for the Broadcom based chips was # written by Maxim Krasnyansky and so he also owns a copyright for this # driver. # # Signed-off-by: Marcel Holtmann # # drivers/bluetooth/bcm203x.c # 2004/11/17 10:22:25+01:00 marcel@holtmann.org +1 -0 # Update copyright information # # ChangeSet # 2004/11/16 22:11:48-08:00 davem@nuts.davemloft.net # [SPARC64]: Update defconfig. # # Signed-off-by: David S. Miller # # arch/sparc64/defconfig # 2004/11/16 22:11:21-08:00 davem@nuts.davemloft.net +9 -7 # [SPARC64]: Update defconfig. # # ChangeSet # 2004/11/16 22:11:16-08:00 davem@nuts.davemloft.net # [SPARC64]: Do not set VM_LOCKED on I/O mapped areas. # # Use VM_RESERVED instead. # # Signed-off-by: David S. Miller # # drivers/video/sbuslib.c # 2004/11/16 22:10:39-08:00 davem@nuts.davemloft.net +1 -1 # [SPARC64]: Do not set VM_LOCKED on I/O mapped areas. # # drivers/video/fbmem.c # 2004/11/16 22:10:39-08:00 davem@nuts.davemloft.net +1 -2 # [SPARC64]: Do not set VM_LOCKED on I/O mapped areas. # # drivers/video/aty/atyfb_base.c # 2004/11/16 22:10:39-08:00 davem@nuts.davemloft.net +1 -3 # [SPARC64]: Do not set VM_LOCKED on I/O mapped areas. # # arch/sparc64/kernel/pci.c # 2004/11/16 22:10:38-08:00 davem@nuts.davemloft.net +1 -1 # [SPARC64]: Do not set VM_LOCKED on I/O mapped areas. # # ChangeSet # 2004/11/16 22:10:02-08:00 davem@nuts.davemloft.net # [SPARC64]: Two io_remap_page_range() fixes. # # 1) BUG on presence of existing mappings just # as remap_pfn_range does # 2) Perform TLB flush while holding page_table_lock # # Signed-off-by: David S. Miller # # arch/sparc64/mm/generic.c # 2004/11/16 22:09:22-08:00 davem@nuts.davemloft.net +2 -13 # [SPARC64]: Two io_remap_page_range() fixes. # # ChangeSet # 2004/11/16 22:08:03-08:00 davem@nuts.davemloft.net # [SPARC64]: Couple of do_sparc64_fault fixes. # # 1) Use in_atomic() for atomicity check. # 2) Add mmap_sem deadlock on bad kernel access # prevention just as on i386 # 3) Use VM_FAULT_* macros instead of magic constants. # # Signed-off-by: David S. Miller # # arch/sparc64/mm/fault.c # 2004/11/16 22:06:45-08:00 davem@nuts.davemloft.net +16 -6 # [SPARC64]: Couple of do_sparc64_fault fixes. # # ChangeSet # 2004/11/16 17:39:02-08:00 chrisw@osdl.org # [PATCH] a.out: error check on set_brk # # It's possible for do_brk() to fail during set_brk() when exec'ing and # a.out. This was noted with Florian's a.out binary and overcommit set to # 0. # # Capture this error and terminate properly. # # Signed-off-by: Chris Wright # Signed-off-by: Linus Torvalds # # fs/binfmt_aout.c # 2004/11/11 22:28:58-08:00 chrisw@osdl.org +14 -5 # a.out: error check on set_brk # # ChangeSet # 2004/11/16 17:38:48-08:00 chrisw@osdl.org # [PATCH] setup_arg_pages can insert overlapping vma # # Florian Heinz built an a.out binary that could map bss from 0x0 to # 0xc0000000, and setup_arg_pages() would be unhappt in insert_vma_struct # because the arg pages overlapped. This just checks before inserting, # and bails out if it would overlap. # # Signed-off-by: Chris Wright # Signed-off-by: Linus Torvalds # # fs/exec.c # 2004/11/11 19:24:54-08:00 chrisw@osdl.org +7 -0 # setup_arg_pages can insert overlapping vma # # ChangeSet # 2004/11/16 17:38:30-08:00 chrisw@osdl.org # [PATCH] binfmt_elf: handle p_filesz == 0 on PT_INTERP section # # Jakub Jelinek points out that current fix has an underflow problem # if elf_ppnt->p_filesz == 0. Fix that up, and also stop overwriting # interpreter buffer, simply check that it's NULL-terminated. # # From: Jakub Jelinek # Signed-off-by: Chris Wright # Signed-off-by: Linus Torvalds # # fs/binfmt_elf.c # 2004/11/16 11:01:21-08:00 chrisw@osdl.org +5 -2 # binfmt_elf: handle p_filesz == 0 on PT_INTERP section # # ChangeSet # 2004/11/16 17:29:15-08:00 dhowells@redhat.com # [PATCH] Fork fix fix # # The attached patch fixes the fork fix to avoid the divide-by-zero error I'd # previously fixed, but without using any sort of conditional. # # Signed-off-by: David Howells # Signed-off-by: Linus Torvalds # # kernel/fork.c # 2004/11/16 08:56:31-08:00 dhowells@redhat.com +1 -4 # Fork fix fix # # ChangeSet # 2004/11/16 16:04:07-08:00 axboe@suse.de # [PATCH] io context leak on queue drain # # If the drain flag is set on the queue, get_request() needs to drop the # acquired iocontext to avoid leaks. # # Signed-off-by: Jens Axboe # Signed-off-by: Linus Torvalds # # drivers/block/ll_rw_blk.c # 2004/11/15 02:21:40-08:00 axboe@suse.de +1 -1 # io context leak on queue drain # # ChangeSet # 2004/11/16 23:19:52+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2251/1: S3C2410 - system timer rename [cosmetic] # # Patch from Ben Dooks # # Correct the name used when registering the system # tick interrupt from S32410 to S3C2410. # # Signed-off-by: Dimitry Andric # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # arch/arm/mach-s3c2410/time.c # 2004/11/16 14:11:47+00:00 ben-linux@org.rmk.(none) +1 -1 # [PATCH] 2251/1: S3C2410 - system timer rename [cosmetic] # # ChangeSet # 2004/11/16 15:20:41-06:00 tglx@linutronix.de # [PATCH] Lock initializer unifying Batch 2 (SCSI) # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: James Bottomley # # drivers/scsi/sg.c # 2004/10/25 09:18:22-05:00 tglx@linutronix.de +1 -1 # Lock initializer unifying Batch 2 (SCSI) # # drivers/scsi/initio.c # 2004/10/25 09:18:13-05:00 tglx@linutronix.de +2 -2 # Lock initializer unifying Batch 2 (SCSI) # # drivers/scsi/ibmvscsi/rpa_vscsi.c # 2004/10/25 09:18:41-05:00 tglx@linutronix.de +1 -1 # Lock initializer unifying Batch 2 (SCSI) # # drivers/scsi/cpqfcTSinit.c # 2004/10/25 09:18:16-05:00 tglx@linutronix.de +1 -1 # Lock initializer unifying Batch 2 (SCSI) # # drivers/scsi/advansys.c # 2004/10/25 09:18:20-05:00 tglx@linutronix.de +1 -1 # Lock initializer unifying Batch 2 (SCSI) # # drivers/scsi/a100u2w.c # 2004/10/25 09:18:30-05:00 tglx@linutronix.de +1 -1 # Lock initializer unifying Batch 2 (SCSI) # # ChangeSet # 2004/11/16 15:11:53-06:00 jejb@titanic.il.steeleye.com # SCSI: Fix Bug 3753 (multiple definition of ST_partstat) # # Fix a missed piece of junk from a typedef conversion in st.h # # Signed-off-by: James Bottomley # # drivers/scsi/st.h # 2004/11/16 15:11:41-06:00 jejb@titanic.il.steeleye.com +1 -1 # SCSI: Fix Bug 3753 (multiple definition of ST_partstat) # # ChangeSet # 2004/11/16 11:13:20-08:00 hch@lst.de # [IA64] remove dead wood from asm-ia64/hardirq.h # # syscall_count, ksoftirqd_task, local_syscall_count, local_ksoftirqd_task # and local_nmi_count are totally unused (and gone from other # architectures aswell) # # nmi_count() is a stub only used once in arch/ia64/kernel/irq.c, so we # can use 0 directly there. I suspect it was added to keep irq.c in sync # with i386, but even the CONFIG_GENERIC_HARDIRQS code (which IA64 # needs to be converted to) leaves /proc/interrupts output to the # architecture because it's so different over the architectures. # # Signed-off-by: Christoph Hellwig # # Deleted the code to print "NMI:" and a row of zeroes from irq.c -Tony # # Signed-off-by: Tony Luck # # include/asm-ia64/hardirq.h # 2004/11/16 11:10:08-08:00 hch@lst.de +0 -7 # remove dead wood from asm-ia64/hardirq.h # # arch/ia64/kernel/irq.c # 2004/11/16 11:09:53-08:00 hch@lst.de +0 -5 # remove dead wood from asm-ia64/hardirq.h # # ChangeSet # 2004/11/16 11:03:52-08:00 jbarnes@sgi.com # [IA64] fix phys. address conversion in ia64_pal_tr_read # # The palinfo module may call ia64_pal_tr_read using an IPI. If the processor # receiving the IPI is idle, the call will fail since the idle process stack is # in region 5 and ia64_pal_tr_read uses __pa rather than ia64_tpa. This small # patch fixes the problem by making it use ia64_tpa instead. # # Signed-off-by: Jesse Barnes # Signed-off-by: Tony Luck # # include/asm-ia64/pal.h # 2004/11/16 11:00:59-08:00 jbarnes@sgi.com +1 -1 # fix phys. address conversion in ia64_pal_tr_read # # ChangeSet # 2004/11/16 18:41:58+00:00 dwmw2@shinybook.infradead.org # MTD: Fix memory leak in FTL translation layer. # # Signed-off-by: David Woodhouse # # drivers/mtd/ftl.c # 2004/11/16 18:41:37+00:00 dwmw2@shinybook.infradead.org +9 -7 # revision 1.54 # date: 2004/11/16 18:33:15; author: dwmw2; state: Exp; lines: +9 -7 # Free all data structures on partition going away. # # ChangeSet # 2004/11/16 18:36:59+00:00 dwmw2@shinybook.infradead.org # MTD: some cleanups # # The patch below makes the following cleanups for code under drivers/mtd/ : # - make some needlessly global code static # # Signed-off-by: Adrian Bunk # Signed-off-by: David Woodhouse # # include/linux/mtd/partitions.h # 2004/11/16 18:36:37+00:00 dwmw2@shinybook.infradead.org +1 -2 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/nftlcore.c # 2004/11/16 18:36:37+00:00 dwmw2@shinybook.infradead.org +5 -5 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/nand/diskonchip.c # 2004/11/16 18:36:37+00:00 dwmw2@shinybook.infradead.org +3 -3 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/mtdpart.c # 2004/11/16 18:36:37+00:00 dwmw2@shinybook.infradead.org +2 -2 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/mtdcore.c # 2004/11/16 18:36:37+00:00 dwmw2@shinybook.infradead.org +2 -2 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/mtdblock_ro.c # 2004/11/16 18:36:37+00:00 dwmw2@shinybook.infradead.org +2 -2 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/mtdblock.c # 2004/11/16 18:36:37+00:00 dwmw2@shinybook.infradead.org +3 -3 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/mtd_blkdevs.c # 2004/11/16 18:36:37+00:00 dwmw2@shinybook.infradead.org +5 -5 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/maps/scx200_docflash.c # 2004/11/16 18:36:37+00:00 dwmw2@shinybook.infradead.org +2 -2 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/maps/scb2_flash.c # 2004/11/16 18:36:37+00:00 dwmw2@shinybook.infradead.org +2 -2 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/maps/sbc_gxx.c # 2004/11/16 18:36:37+00:00 dwmw2@shinybook.infradead.org +2 -2 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/maps/pnc2000.c # 2004/11/16 18:36:36+00:00 dwmw2@shinybook.infradead.org +3 -3 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/maps/l440gx.c # 2004/11/16 18:36:36+00:00 dwmw2@shinybook.infradead.org +3 -3 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/maps/ichxrom.c # 2004/11/16 18:36:36+00:00 dwmw2@shinybook.infradead.org +2 -2 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/maps/elan-104nc.c # 2004/11/16 18:36:36+00:00 dwmw2@shinybook.infradead.org +2 -2 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/maps/amd76xrom.c # 2004/11/16 18:36:36+00:00 dwmw2@shinybook.infradead.org +2 -2 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/inftlcore.c # 2004/11/16 18:36:36+00:00 dwmw2@shinybook.infradead.org +5 -5 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/devices/slram.c # 2004/11/16 18:36:36+00:00 dwmw2@shinybook.infradead.org +16 -16 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/devices/pmc551.c # 2004/11/16 18:36:36+00:00 dwmw2@shinybook.infradead.org +2 -2 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/devices/phram.c # 2004/11/16 18:36:36+00:00 dwmw2@shinybook.infradead.org +7 -7 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/devices/mtdram.c # 2004/11/16 18:36:36+00:00 dwmw2@shinybook.infradead.org +4 -4 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/devices/docprobe.c # 2004/11/16 18:36:36+00:00 dwmw2@shinybook.infradead.org +2 -2 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/devices/doc2001plus.c # 2004/11/16 18:36:36+00:00 dwmw2@shinybook.infradead.org +2 -2 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/devices/doc2001.c # 2004/11/16 18:36:36+00:00 dwmw2@shinybook.infradead.org +2 -2 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/devices/doc2000.c # 2004/11/16 18:36:36+00:00 dwmw2@shinybook.infradead.org +2 -2 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/devices/blkmtd.c # 2004/11/16 18:36:36+00:00 dwmw2@shinybook.infradead.org +6 -6 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/cmdlinepart.c # 2004/11/16 18:36:36+00:00 dwmw2@shinybook.infradead.org +2 -2 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/chips/map_rom.c # 2004/11/16 18:36:36+00:00 dwmw2@shinybook.infradead.org +4 -4 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/chips/map_ram.c # 2004/11/16 18:36:36+00:00 dwmw2@shinybook.infradead.org +2 -2 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/chips/map_absent.c # 2004/11/16 18:36:36+00:00 dwmw2@shinybook.infradead.org +2 -2 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/chips/jedec_probe.c # 2004/11/16 18:36:36+00:00 dwmw2@shinybook.infradead.org +4 -4 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/chips/chipreg.c # 2004/11/16 18:36:36+00:00 dwmw2@shinybook.infradead.org +2 -2 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/chips/cfi_cmdset_0020.c # 2004/11/16 18:36:36+00:00 dwmw2@shinybook.infradead.org +2 -2 # Patch from Adrian Bunk -- make a lot of code static. # # drivers/mtd/chips/cfi_cmdset_0002.c # 2004/11/16 18:36:36+00:00 dwmw2@shinybook.infradead.org +2 -2 # Patch from Adrian Bunk -- make a lot of code static. # # ChangeSet # 2004/11/16 10:22:33-08:00 Andries.Brouwer@cwi.nl # [PATCH] net: scheduling policing fix # # Missing goto. # # Acked by Thomas Graf # # net/sched/police.c # 2004/11/16 09:14:25-08:00 Andries.Brouwer@cwi.nl +1 -0 # net: scheduling policing fix # # BitKeeper/deleted/.del-mtdblock.h~e0bac75cb21bd1cf # 2004/11/16 18:08:52+00:00 dwmw2@shinybook.infradead.org +0 -0 # Delete: drivers/mtd/mtdblock.h # # ChangeSet # 2004/11/16 12:03:36-06:00 lenehan@twibble.org # [PATCH] SCSI dc395x.c: Call pci_disable during cleanup. # # Call pci_disable_device if initialisation fails and during cleanup. # # Signed-off-by: Jamie Lenehan # Signed-off-by: James Bottomley # # drivers/scsi/dc395x.c # 2004/06/30 05:37:59-05:00 lenehan@twibble.org +14 -8 # SCSI dc395x.c: Call pci_disable during cleanup. # # ChangeSet # 2004/11/16 12:02:53-06:00 lenehan@twibble.org # [PATCH] SCSI dc395x.c: Fix type for irq and io ports # # Store the port and irq in unsigned long and unsigned int's instead of # as u16's and u8's. The later was fine on x86 but not on sparc64. # # Signed-off-by: Jamie Lenehan # Signed-off-by: James Bottomley # # drivers/scsi/dc395x.c # 2004/06/30 05:11:49-05:00 lenehan@twibble.org +19 -19 # SCSI dc395x.c: Fix type for irq and io ports # # ChangeSet # 2004/11/16 12:01:46-06:00 lenehan@twibble.org # [PATCH] SCSI dc395x.c: store pci device pointer # # Store the PCI device pointer into the adapter control block. This is # used in the pci_map_*/pci_unmap_* calls and previously it would have # been set to NULL. This appears to be no problem for x86 but is a # problem for sparc64. # # Signed-off-by: Jamie Lenehan # Signed-off-by: James Bottomley # # drivers/scsi/dc395x.c # 2004/06/30 05:10:39-05:00 lenehan@twibble.org +1 -0 # SCSI dc395x.c: store pci device pointer # # ChangeSet # 2004/11/16 12:00:45-06:00 bunk@stusta.de # [PATCH] SCSI qla1280: some firmware files cleanups # # - make all this needlessly global code static # - remove the unused firmware_version variables # # Signed-off-by: Adrian Bunk # Signed-off-by: James Bottomley # # drivers/scsi/ql1280_fw.h # 2004/11/13 16:13:07-06:00 bunk@stusta.de +8 -14 # SCSI qla1280: some firmware files cleanups # # drivers/scsi/ql12160_fw.h # 2004/11/13 16:13:02-06:00 bunk@stusta.de +8 -14 # SCSI qla1280: some firmware files cleanups # # drivers/scsi/ql1040_fw.h # 2004/11/13 16:13:12-06:00 bunk@stusta.de +4 -6 # SCSI qla1280: some firmware files cleanups # # ChangeSet # 2004/11/16 18:00:01+00:00 dwmw2@shinybook.infradead.org # JFFS2: fix printk argument type warning # # fs/jffs2/gc.c:832: warning: signed size_t format, different type arg # (arg 3) # # Signed-off-by: Randy Dunlap # Signed-off-by: David Woodhouse # # ChangeSet # 2004/11/16 11:59:46-06:00 bunk@stusta.de # [PATCH] SCSI: fdomain.c: make a struct static # # The patch below makes a needlessly global struct static. # # Signed-off-by: Adrian Bunk # Signed-off-by: James Bottomley # # fs/jffs2/gc.c # 2004/11/16 17:59:38+00:00 dwmw2@shinybook.infradead.org +1 -1 # revision 1.142 # date: 2004/11/16 17:52:10; author: dwmw2; state: Exp; lines: +2 -2 # fix printk warning # # drivers/scsi/fdomain.c # 2004/11/13 14:03:45-06:00 bunk@stusta.de +1 -1 # SCSI: fdomain.c: make a struct static # # ChangeSet # 2004/11/16 11:58:56-06:00 bunk@stusta.de # [PATCH] SCSI dc395x.c: make a function static # # The patch below makes the needlessly global function adapter_init_chip # static. # # Signed-off-by: Adrian Bunk # Signed-off-by: James Bottomley # # drivers/scsi/dc395x.c # 2004/11/13 13:59:09-06:00 bunk@stusta.de +1 -1 # SCSI dc395x.c: make a function static # # ChangeSet # 2004/11/16 11:57:33-06:00 bunk@stusta.de # [PATCH] SCSI atp870u.c: make a needlessly global function # # The patch below makes the function is870 which has no external users # static. # # Signed-off-by: Adrian Bunk # Signed-off-by: James Bottomley # # drivers/scsi/atp870u.c # 2004/11/13 10:17:41-06:00 bunk@stusta.de +1 -1 # SCSI atp870u.c: make a needlessly global function # # ChangeSet # 2004/11/16 11:55:04-06:00 bunk@stusta.de # [PATCH] SCSI: aha1542.c: make some code static # # The patch below makes some needlessly global code static. # # Signed-off-by: Adrian Bunk # Signed-off-by: James Bottomley # # drivers/scsi/aha1542.c # 2004/11/13 09:59:41-06:00 bunk@stusta.de +3 -3 # SCSI: aha1542.c: make some code static # # ChangeSet # 2004/11/16 11:53:06-06:00 g.liakhovetski@gmx.de # [PATCH] refactor tmscsim inititalization code # # Streamline EEPROM handling code # # The patch below is a fixed (and slightly reworked) patch from Christoph. # Thanks to Chiaki Ishikawa for fixes and tests. # # Original author: Christoph Hellwig # Signed-off-by: Guennadi Liakhovetski # Signed-off-by: James Bottomley # # drivers/scsi/tmscsim.c # 2004/11/12 16:09:10-06:00 g.liakhovetski@gmx.de +132 -176 # refactor tmscsim inititalization code # # ChangeSet # 2004/11/16 11:51:55-06:00 stern@rowland.harvard.edu # [PATCH] sd.c: adjust READ_CAPACITY for broken devices # # A number of USB mass storage devices return the wrong value in response to # READ CAPACITY: They give the total number of blocks rather than the # highest block number. Currently the usb-storage driver tries to adjust # for this by altering the contents of the reply buffer. That's not a very # good idea because it prevents users from seeing what the device actually # has to say; it violates the principle that a transport should do nothing # more than transfer data. # # This patch moves the responsibility for adjusting the capacity to the sd # driver instead, by adding a new device flag. After this has been merged # the corresponding change (to set the flag) will be made to the usb-storage # driver. # # Signed-off-by: Alan Stern # Signed-off-by: James Bottomley # # include/scsi/scsi_device.h # 2004/11/08 14:42:52-06:00 stern@rowland.harvard.edu +1 -0 # sd.c: adjust READ_CAPACITY for broken devices # # drivers/scsi/sd.c # 2004/11/08 14:42:37-06:00 stern@rowland.harvard.edu +5 -0 # sd.c: adjust READ_CAPACITY for broken devices # # ChangeSet # 2004/11/16 11:50:28-06:00 g.liakhovetski@gmx.de # [PATCH] tmascsim: (resend updated) track_queue_full # # Use scsi_track_queue_full(), don't lie about driver's queueing # abilities. # # Signed-off-by: Guennadi Liakhovetski # Signed-off-by: James Bottomley # # drivers/scsi/tmscsim.h # 2004/11/07 17:56:46-06:00 g.liakhovetski@gmx.de +1 -5 # tmascsim: (resend updated) track_queue_full # # drivers/scsi/tmscsim.c # 2004/11/07 17:56:46-06:00 g.liakhovetski@gmx.de +22 -27 # tmascsim: (resend updated) track_queue_full # # ChangeSet # 2004/11/16 11:49:25-06:00 cp@absolutedigital.net # [PATCH] Documentation/kernel-parameters.txt: scsi param updates # # This patch updates Documentation/kernel-parameters.txt with the proper # SCSI LUNs params and adds a description for 'max_luns'. # # Signed-off-by: Cal Peake # Signed-off-by: James Bottomley # # Documentation/kernel-parameters.txt # 2004/11/06 22:21:07-06:00 cp@absolutedigital.net +3 -2 # Documentation/kernel-parameters.txt: scsi param updates # # ChangeSet # 2004/11/16 11:47:57-06:00 akpm@osdl.org # Remove duplicate safe_for_read(READ_BUFFER) # # From: Miles Bader # # Signed-off-by: Miles Bader # Signed-off-by: Andrew Morton # Signed-off-by: James Bottomley # # drivers/block/scsi_ioctl.c # 2004/11/01 08:28:07-06:00 akpm@osdl.org +0 -1 # Remove duplicate safe_for_read(READ_BUFFER) # # ChangeSet # 2004/11/16 11:46:55-06:00 akpm@osdl.org # [PATCH] megaraid 2.20.4.1 Driver # # From: "Bagalkote, Sreenivas" # # We are releasing megaraid 2.20.4.1 driver. This version fixes two issues - # # - Handle IOCTL command timeouts properly # # - Replace incorrectly introduced pci_dma_sync_{sg,single}_for_cpu with # correct pci_dma_sync_{sg,single}_for_device. # # Signed-off-by: Andrew Morton # Signed-off-by: James Bottomley # # drivers/scsi/megaraid/megaraid_mm.h # 2004/11/05 10:23:05-06:00 akpm@osdl.org +2 -2 # megaraid 2.20.4.1 Driver # # drivers/scsi/megaraid/megaraid_mm.c # 2004/11/05 10:23:05-06:00 akpm@osdl.org +60 -4 # megaraid 2.20.4.1 Driver # # drivers/scsi/megaraid/megaraid_mbox.h # 2004/11/05 10:23:05-06:00 akpm@osdl.org +2 -2 # megaraid 2.20.4.1 Driver # # drivers/scsi/megaraid/megaraid_mbox.c # 2004/11/05 10:23:05-06:00 akpm@osdl.org +4 -4 # megaraid 2.20.4.1 Driver # # drivers/scsi/megaraid/megaraid_ioctl.h # 2004/11/05 10:23:05-06:00 akpm@osdl.org +5 -1 # megaraid 2.20.4.1 Driver # # Documentation/scsi/ChangeLog.megaraid # 2004/11/05 10:23:05-06:00 akpm@osdl.org +11 -0 # megaraid 2.20.4.1 Driver # # ChangeSet # 2004/11/16 17:45:47+00:00 dwmw2@shinybook.infradead.org # JFFS2: jffs2_fs_i.h needs # # ... and should include it directly rather than hoping it's been done. # # Signed-off-by: David Woodhouse # # include/linux/jffs2_fs_i.h # 2004/11/16 17:45:25+00:00 dwmw2@shinybook.infradead.org +2 -1 # revision 1.17 # date: 2004/11/11 23:51:27; author: dwmw2; state: Exp; lines: +2 -1 # include asm/semaphore.h # # ChangeSet # 2004/11/16 11:43:44-06:00 markh@osdl.org # [PATCH] 2.6 aacraid: rx check health function update # # This patch updates the rx check health function. My previous only # updated the rkt check health code. This and the previous patch should # fix the kmalloc return checking bug: # # http://bugme.osdl.org/show_bug.cgi?id=3699 # # Signed-off-by: Mark Haverkamp # Signed-off-by: James Bottomley # # drivers/scsi/aacraid/rx.c # 2004/11/04 11:37:33-06:00 markh@osdl.org +22 -12 # 2.6 aacraid: rx check health function update # # ChangeSet # 2004/11/16 17:42:53+00:00 dwmw2@shinybook.infradead.org # JFFS2: make sync() actually work by providing ->sync_fs method. # # Signed-off-by: David Woodhouse # # fs/jffs2/super.c # 2004/11/16 17:42:31+00:00 dwmw2@shinybook.infradead.org +12 -1 # revision 1.102 # date: 2004/11/12 02:42:17; author: tpoynor; state: Exp; lines: +1 -0 # Fix compile warning and potential failure return for JFFS2 sync(). # ---------------------------- # revision 1.101 # date: 2004/11/08 22:39:53; author: dwmw2; state: Exp; lines: +11 -1 # Add sync_fs method to make sync() work # # ChangeSet # 2004/11/16 17:40:57+00:00 dwmw2@shinybook.infradead.org # JFFS2: Remove redundant 'ino' arg from jffs2_get_inode_nodes() # # We had it already in the inocache structure we were being passed # # Signed-off-by: Artem Bityuckiy # Signed-off-by: David Woodhouse # # fs/jffs2/readinode.c # 2004/11/16 17:40:36+00:00 dwmw2@shinybook.infradead.org +2 -2 # revision 1.114 # date: 2004/11/14 17:07:07; author: dedekind; state: Exp; lines: +2 -2 # Remove the uneeded 'ino' - the inode number is present in f->inocache->ino. # # fs/jffs2/nodelist.h # 2004/11/16 17:40:36+00:00 dwmw2@shinybook.infradead.org +2 -2 # revision 1.121 # date: 2004/11/14 17:07:07; author: dedekind; state: Exp; lines: +2 -2 # Remove the uneeded 'ino' - the inode number is present in f->inocache->ino. # # fs/jffs2/nodelist.c # 2004/11/16 17:40:36+00:00 dwmw2@shinybook.infradead.org +5 -6 # revision 1.87 # date: 2004/11/14 17:07:07; author: dedekind; state: Exp; lines: +5 -6 # Remove the uneeded 'ino' - the inode number is present in f->inocache->ino. # # ChangeSet # 2004/11/16 11:38:49-06:00 Kai.Makisara@kolumbus.fi # [PATCH] "mt-st tell" fails in 2.6.10-rc1 # # On Tue, 2 Nov 2004, Marc Thomas wrote: # > I've noticed that in 2.6.10-rc1 the "mt tell" command (from mt-st) fails to # > report SCSI tape position, returning "No such device". Other tape (read) # > operations appear to be ok. It worked fine in 2.6.9-rc4. # # The patch at the end of this message should fix this (passes basic tests). # Someone added the ioctl to reset the SCSI device but the error handling # is not quite correct. The code in 2.6.10-rc1 allows st_ioctl to continue # unless reset succeeded. The fix allows continuation only if # scsi_nonblockable_ioctl() does not handle the ioctl (returns -ENODEV). # retval is cleared because the following code assumes it is zero unless set # to something else. # # Signed-off-by: Kai Makisara # Signed-off-by: James Bottomley # # drivers/scsi/st.c # 2004/11/02 13:30:53-06:00 Kai.Makisara@kolumbus.fi +2 -1 # "mt-st tell" fails in 2.6.10-rc1 # # ChangeSet # 2004/11/16 17:37:54+00:00 dwmw2@shinybook.infradead.org # JFFS2: locking fixes # # We weren't correctly holding a lock when adding raw nodes to the # per-inode list. # # Signed-off-by: Artem Bityuckiy # Signed-off-by: David Woodhouse # # ChangeSet # 2004/11/16 11:37:50-06:00 markh@osdl.org # [PATCH] 2.6 aacraid: Interrupt function cleanup # # This patch updates the adapter health check function and cleans up some # unused interrupt related functions and macros. # # Signed-off-by: Mark Haverkamp # Signed-off-by: James Bottomley # # drivers/scsi/aacraid/sa.c # 2004/11/01 15:09:31-06:00 markh@osdl.org +0 -64 # 2.6 aacraid: Interrupt function cleanup # # drivers/scsi/aacraid/rx.c # 2004/11/01 15:09:31-06:00 markh@osdl.org +0 -62 # 2.6 aacraid: Interrupt function cleanup # # drivers/scsi/aacraid/rkt.c # 2004/11/01 15:09:31-06:00 markh@osdl.org +38 -91 # 2.6 aacraid: Interrupt function cleanup # # drivers/scsi/aacraid/aacraid.h # 2004/11/01 15:09:31-06:00 markh@osdl.org +0 -13 # 2.6 aacraid: Interrupt function cleanup # # fs/jffs2/write.c # 2004/11/16 17:37:31+00:00 dwmw2@shinybook.infradead.org +5 -1 # revision 1.86 # date: 2004/11/13 10:44:26; author: dedekind; state: Exp; lines: +5 -1 # Fix potential race when the newly created node_ref is added to the # node_ref list. When the node is first accessed, the first node_ref in the # list might be obsolete and be located in the block being erased. So, we # need to hold spinlock if we insert the new node_ref to the list. # # fs/jffs2/gc.c # 2004/11/16 17:37:31+00:00 dwmw2@shinybook.infradead.org +5 -2 # revision 1.140 # date: 2004/11/13 10:59:22; author: dedekind; state: Exp; lines: +2 -1 # Add the forgotten node_ref free call in case of error. # ---------------------------- # revision 1.139 # date: 2004/11/13 10:44:26; author: dedekind; state: Exp; lines: +3 -1 # Fix potential race when the newly created node_ref is added to the # node_ref list. When the node is first accessed, the first node_ref in the # list might be obsolete and be located in the block being erased. So, we # need to hold spinlock if we insert the new node_ref to the list. # ---------------------------- # revision 1.138 # date: 2004/11/13 09:51:12; author: dedekind; state: Exp; lines: +2 -2 # Fix typo in comment. # # ChangeSet # 2004/11/16 11:36:16-06:00 bunk@stusta.de # [PATCH] SCSI_QLOGIC_1280_1040 dependencies # # On Sat, Oct 23, 2004 at 11:55:20AM +1000, Eyal Lebedinsky wrote: # > Should the second line be indented? # > # > Qlogic QLA 1240/1x80/1x160 SCSI support (SCSI_QLOGIC_1280) [M/n/?] m # > Qlogic QLA 1020/1040 SCSI support (SCSI_QLOGIC_1280_1040) [N/y/?] (NEW) y # # Correct, SCSI_QLOGIC_1280_1040 should depend on SCSI_QLOGIC_1280. # # The patch below does this. # # Additionally, it prevents the case that both drivers are built # statically and both support the 1020/1040. # # Signed-off-by: Adrian Bunk # Signed-off-by: James Bottomley # # drivers/scsi/Kconfig # 2004/10/29 16:56:42-05:00 bunk@stusta.de +1 -0 # SCSI_QLOGIC_1280_1040 dependencies # # ChangeSet # 2004/11/16 11:35:03-06:00 rct@gherkin.frus.com # [PATCH] sym53c500_cs driver update # # The attached minor patch to linux/drivers/scsi/pcmcia/sym53c500_cs.c # allows interrupt sharing, which is evidently a "must have" feature for # at least G4 PowerBooks (ppc architecture). The other user of the New # Media Bus Toaster reports that his powerbook consistently assigns the # yenta CardBus controller IRQ to whatever card he inserts. # # Signed-off-by: Bob Tracy # Signed-off-by: James Bottomley # # drivers/scsi/pcmcia/sym53c500_cs.c # 2004/10/27 17:21:20-05:00 rct@gherkin.frus.com +3 -3 # sym53c500_cs driver update # # ChangeSet # 2004/11/16 11:33:32-06:00 brking@us.ibm.com # [PATCH] sg: Fix oops of sg_cmd_done and sg_release race # # The following patch fixes a race condition in sg of sg_cmd_done racing # with sg_release. I've seen this bug hit several times on test machines # and the following patch fixes it. The race is that if srp->done is set # and the waiting thread gets a spurious wakeup immediately afterwards, # then the waiting thread can end up executing and completing, then getting # closed, freeing sfp before the wake_up_interruptible is called, which # then will result in an oops. The oops is fixed by locking around the # setting srp->done to 1 and the wake_up, and also locking around the # checking of srp->done, which guarantees that the wake_up_interruptible # will always occur before the sleeping thread gets a chance to run. # # Signed-off-by: Brian King # Signed-off-by: James Bottomley # # drivers/scsi/sg.c # 2004/10/27 14:47:51-05:00 brking@us.ibm.com +20 -3 # sg: Fix oops of sg_cmd_done and sg_release race # # ChangeSet # 2004/11/16 17:28:13+00:00 dwmw2@shinybook.infradead.org # MTD: Fix detection of hardware partitions in Intel flash chips # # Determine it from the CFI query data instead of hard-coding it. # # Signed-off-by: Nicolas Pitre # Signed-off-by: David Woodhouse # # include/linux/mtd/cfi.h # 2004/11/16 17:27:51+00:00 dwmw2@shinybook.infradead.org +19 -1 # revision 1.49 # date: 2004/11/15 20:56:32; author: nico; state: Exp; lines: +19 -1 # Determine number of hw partitions from extended query data instead of # hardcoding it. # # drivers/mtd/chips/cfi_cmdset_0001.c # 2004/11/16 17:27:50+00:00 dwmw2@shinybook.infradead.org +106 -25 # revision 1.163 # date: 2004/11/15 20:56:31; author: nico; state: Exp; lines: +106 -26 # Determine number of hw partitions from extended query data instead of # hardcoding it. # # ChangeSet # 2004/11/16 17:22:19+00:00 dwmw2@shinybook.infradead.org # MTD: Avoid false positives in CFI probe due to floating data bus # # Signed-off-by: Russell King # Signed-off-by: David Woodhouse # # drivers/mtd/chips/cfi_probe.c # 2004/11/16 17:21:58+00:00 dwmw2@shinybook.infradead.org +12 -13 # Avoid bus float issues causing misdetection of QRY string. # # ChangeSet # 2004/11/16 17:19:38+00:00 dwmw2@shinybook.infradead.org # MTD: Compile fix for the typo fix in ixp2000 map driver. # # Signed-off-by: Deepak Saxena # Signed-off-by: David Woodhouse # # drivers/mtd/maps/ixp2000.c # 2004/11/16 17:19:17+00:00 dwmw2@shinybook.infradead.org +2 -2 # revision 1.5 # date: 2004/11/16 17:15:48; author: dsaxena; state: Exp; lines: +2 -2 # # Fix missed conversion of errata44_workaround -> erratum44_workaround. # # ChangeSet # 2004/11/16 17:17:31+00:00 dwmw2@shinybook.infradead.org # MTD: Fix Pb1550 board NAND driver to not read write-only registers # # Signed-off-by: Pete Popov # Signed-off-by: David Woodhouse # # # drivers/mtd/nand/au1550nd.c # 2004/11/16 17:17:10+00:00 dwmw2@shinybook.infradead.org +5 -8 # revision 1.11 # date: 2004/11/04 12:53:10; author: gleixner; state: Exp; lines: +2 -2 # Cleanup MODULE_PARAM. Remove params from boards, which have a fixed address anyway. Cleanup some iomem bloat # ---------------------------- # revision 1.10 # date: 2004/10/31 23:48:33; author: ppopov; state: Exp; lines: +4 -7 # MEM_STNDCTL is write only. Reading it (probably reading garbage) # and writing it back caused problems accessing the flash, after the NOR # flash was previously accessed. Patch by Herbert Riedel. # # ChangeSet # 2004/11/16 16:51:03+00:00 dwmw2@shinybook.infradead.org # MTD: Fix oops after erase in NFTL/INFTL (DiskOnChip translation layers) # # Fix kernel NULL pointer dereference at mtd_erase_callback+6 when trying # to insmod INFTL or NFTL modules. # # Signed-off-by: Kalev Lember # Signed-off-by: David Woodhouse # # drivers/mtd/nftlmount.c # 2004/11/16 16:50:42+00:00 dwmw2@shinybook.infradead.org +4 -2 # revision 1.39 # date: 2004/11/05 22:51:41; author: kalev; state: Exp; lines: +4 -2 # initialize instr->mtd to fix oops # # drivers/mtd/inftlmount.c # 2004/11/16 16:50:42+00:00 dwmw2@shinybook.infradead.org +6 -2 # revision 1.15 # date: 2004/11/05 21:55:55; author: kalev; state: Exp; lines: +6 -2 # initialize instr->mtd # without it we would get an kernel oops trying to insmod inftl # # ChangeSet # 2004/11/16 16:23:55+00:00 dwmw2@shinybook.infradead.org # MTD: DiskOnChip driver fixes: MODULE_PARAM and __iomem, and fix RS init # # Signed-off-by: Thomas Gleixner # Signed-off-by: David Woodhouse # # drivers/mtd/nand/diskonchip.c # 2004/11/16 16:23:33+00:00 dwmw2@shinybook.infradead.org +29 -25 # revision 1.41 # date: 2004/11/05 16:07:16; author: kalev; state: Exp; lines: +2 -2 # Fix conversion to module_param macro. # The type should be ulong rather that u_long. # See include/linux/moduleparam.h # ---------------------------- # revision 1.40 # date: 2004/11/04 12:53:10; author: gleixner; state: Exp; lines: +8 -8 # Cleanup MODULE_PARAM. Remove params from boards, which have a fixed address anyway. Cleanup some iomem bloat # ---------------------------- # revision 1.39 # date: 2004/11/03 20:07:15; author: gleixner; state: Exp; lines: +22 -18 # move rs_decoder init ahead of scan, as it must be initialized in case a DoC is detected. Pointed out by Ed Berube # # ChangeSet # 2004/11/16 16:00:48+00:00 dwmw2@shinybook.infradead.org # MTD NAND drivers: cleanup MODULE_PARAM and bogus __iomem casts. # # Signed-off-by: Thomas Gleixner # Signed-off-by: David Woodhouse # # drivers/mtd/nand/spia.c # 2004/11/16 16:00:27+00:00 dwmw2@shinybook.infradead.org +5 -5 # revision 1.24 # date: 2004/11/04 12:53:10; author: gleixner; state: Exp; lines: +5 -5 # Cleanup MODULE_PARAM. Remove params from boards, which have a fixed address anyway. Cleanup some iomem bloat # # drivers/mtd/nand/rtc_from4.c # 2004/11/16 16:00:27+00:00 dwmw2@shinybook.infradead.org +1 -3 # revision 1.7 # date: 2004/11/04 12:53:10; author: gleixner; state: Exp; lines: +1 -3 # Cleanup MODULE_PARAM. Remove params from boards, which have a fixed address anyway. Cleanup some iomem bloat # # drivers/mtd/nand/ppchameleonevb.c # 2004/11/16 16:00:27+00:00 dwmw2@shinybook.infradead.org +8 -7 # revision 1.6 # date: 2004/11/05 16:07:16; author: kalev; state: Exp; lines: +3 -3 # Fix conversion to module_param macro. # The type should be ulong rather that u_long. # See include/linux/moduleparam.h # ---------------------------- # revision 1.5 # date: 2004/11/04 12:53:10; author: gleixner; state: Exp; lines: +8 -7 # Cleanup MODULE_PARAM. Remove params from boards, which have a fixed address anyway. Cleanup some iomem bloat # # drivers/mtd/nand/h1910.c # 2004/11/16 16:00:27+00:00 dwmw2@shinybook.infradead.org +2 -2 # revision 1.5 # date: 2004/11/04 12:53:10; author: gleixner; state: Exp; lines: +2 -2 # Cleanup MODULE_PARAM. Remove params from boards, which have a fixed address anyway. Cleanup some iomem bloat # # drivers/mtd/nand/edb7312.c # 2004/11/16 16:00:27+00:00 dwmw2@shinybook.infradead.org +2 -12 # revision 1.11 # date: 2004/11/04 12:53:10; author: gleixner; state: Exp; lines: +2 -12 # Cleanup MODULE_PARAM. Remove params from boards, which have a fixed address anyway. Cleanup some iomem bloat # # drivers/mtd/nand/autcpu12.c # 2004/11/16 16:00:27+00:00 dwmw2@shinybook.infradead.org +2 -12 # revision 1.22 # date: 2004/11/04 12:53:10; author: gleixner; state: Exp; lines: +2 -12 # Cleanup MODULE_PARAM. Remove params from boards, which have a fixed address anyway. Cleanup some iomem bloat # # ChangeSet # 2004/11/16 15:35:33+00:00 dwmw2@shinybook.infradead.org # MTD: Fix suspend/resume on Intel flash chip driver # # We weren't correctly resetting our idea of the chip's state on suspend # in all circumstances. Fix that. # # Signed-off-by: David Woodhouse # # drivers/mtd/chips/cfi_cmdset_0001.c # 2004/11/16 15:35:11+00:00 dwmw2@shinybook.infradead.org +12 -2 # revision 1.162 # date: 2004/11/11 11:13:19; author: dwmw2; state: Exp; lines: +12 -2 # Restore oldstate to FL_READY on resume (or suspend failure). # # ChangeSet # 2004/11/16 15:20:56+00:00 dwmw2@shinybook.infradead.org # MTD map/device driver cleanups -- remove bogus __iomem casts # # Signed-off-by: Thomas Gleixner # Signed-off-by: David Woodhouse # # drivers/mtd/maps/wr_sbc82xx_flash.c # 2004/11/16 15:20:34+00:00 dwmw2@shinybook.infradead.org +2 -2 # revision 1.7 # date: 2004/11/04 13:24:15; author: gleixner; state: Exp; lines: +2 -2 # Cleanup bogus iomem type casts # # drivers/mtd/maps/uclinux.c # 2004/11/16 15:20:34+00:00 dwmw2@shinybook.infradead.org +2 -3 # revision 1.9 # date: 2004/11/04 13:24:15; author: gleixner; state: Exp; lines: +2 -3 # Cleanup bogus iomem type casts # # drivers/mtd/maps/tqm8xxl.c # 2004/11/16 15:20:34+00:00 dwmw2@shinybook.infradead.org +1 -1 # revision 1.13 # date: 2004/10/20 22:21:53; author: dwmw2; state: Exp; lines: +5 -5 # alternative fix from upstream # ---------------------------- # revision 1.12 # date: 2004/09/16 23:27:14; author: gleixner; state: Exp; lines: +2 -2 # Part 2 of the __iomem readb and friends overhaul # # drivers/mtd/maps/sun_uflash.c # 2004/11/16 15:20:34+00:00 dwmw2@shinybook.infradead.org +2 -3 # revision 1.11 # date: 2004/11/04 13:24:15; author: gleixner; state: Exp; lines: +2 -3 # Cleanup bogus iomem type casts # # drivers/mtd/maps/scx200_docflash.c # 2004/11/16 15:20:34+00:00 dwmw2@shinybook.infradead.org +2 -2 # revision 1.8 # date: 2004/11/04 13:24:15; author: gleixner; state: Exp; lines: +2 -2 # Cleanup bogus iomem type casts # # drivers/mtd/maps/sc520cdp.c # 2004/11/16 15:20:34+00:00 dwmw2@shinybook.infradead.org +2 -2 # revision 1.18 # date: 2004/11/04 13:24:15; author: gleixner; state: Exp; lines: +2 -2 # Cleanup bogus iomem type casts # # drivers/mtd/maps/sbc_gxx.c # 2004/11/16 15:20:34+00:00 dwmw2@shinybook.infradead.org +2 -2 # revision 1.31 # date: 2004/11/04 13:24:15; author: gleixner; state: Exp; lines: +2 -2 # Cleanup bogus iomem type casts # # drivers/mtd/maps/rpxlite.c # 2004/11/16 15:20:34+00:00 dwmw2@shinybook.infradead.org +2 -2 # revision 1.22 # date: 2004/11/04 13:24:15; author: gleixner; state: Exp; lines: +2 -2 # Cleanup bogus iomem type casts # # drivers/mtd/maps/redwood.c # 2004/11/16 15:20:34+00:00 dwmw2@shinybook.infradead.org +2 -3 # revision 1.10 # date: 2004/11/04 13:24:15; author: gleixner; state: Exp; lines: +2 -3 # Cleanup bogus iomem type casts # # drivers/mtd/maps/physmap.c # 2004/11/16 15:20:34+00:00 dwmw2@shinybook.infradead.org +2 -2 # revision 1.36 # date: 2004/11/04 13:24:15; author: gleixner; state: Exp; lines: +2 -2 # Cleanup bogus iomem type casts # # drivers/mtd/maps/pb1xxx-flash.c # 2004/11/16 15:20:34+00:00 dwmw2@shinybook.infradead.org +2 -2 # revision 1.14 # date: 2004/11/04 13:24:15; author: gleixner; state: Exp; lines: +2 -2 # Cleanup bogus iomem type casts # # drivers/mtd/maps/pb1550-flash.c # 2004/11/16 15:20:34+00:00 dwmw2@shinybook.infradead.org +2 -3 # revision 1.6 # date: 2004/11/04 13:24:15; author: gleixner; state: Exp; lines: +2 -3 # Cleanup bogus iomem type casts # # drivers/mtd/maps/ocotea.c # 2004/11/16 15:20:34+00:00 dwmw2@shinybook.infradead.org +2 -4 # revision 1.3 # date: 2004/11/04 13:24:15; author: gleixner; state: Exp; lines: +2 -4 # Cleanup bogus iomem type casts # # drivers/mtd/maps/ocelot.c # 2004/11/16 15:20:34+00:00 dwmw2@shinybook.infradead.org +3 -3 # revision 1.15 # date: 2004/11/04 13:24:15; author: gleixner; state: Exp; lines: +3 -3 # Cleanup bogus iomem type casts # # drivers/mtd/maps/nettel.c # 2004/11/16 15:20:34+00:00 dwmw2@shinybook.infradead.org +2 -2 # revision 1.8 # date: 2004/11/04 13:24:15; author: gleixner; state: Exp; lines: +2 -2 # Cleanup bogus iomem type casts # # drivers/mtd/maps/netsc520.c # 2004/11/16 15:20:34+00:00 dwmw2@shinybook.infradead.org +2 -2 # revision 1.12 # date: 2004/11/04 13:24:15; author: gleixner; state: Exp; lines: +2 -2 # Cleanup bogus iomem type casts # # drivers/mtd/maps/mbx860.c # 2004/11/16 15:20:34+00:00 dwmw2@shinybook.infradead.org +2 -2 # revision 1.8 # date: 2004/11/04 13:24:15; author: gleixner; state: Exp; lines: +2 -2 # Cleanup bogus iomem type casts # # drivers/mtd/maps/lubbock-flash.c # 2004/11/16 15:20:34+00:00 dwmw2@shinybook.infradead.org +2 -2 # revision 1.19 # date: 2004/11/04 13:24:15; author: gleixner; state: Exp; lines: +2 -2 # Cleanup bogus iomem type casts # # drivers/mtd/maps/lasat.c # 2004/11/16 15:20:34+00:00 dwmw2@shinybook.infradead.org +2 -2 # revision 1.9 # date: 2004/11/04 13:24:15; author: gleixner; state: Exp; lines: +2 -2 # Cleanup bogus iomem type casts # # drivers/mtd/maps/l440gx.c # 2004/11/16 15:20:34+00:00 dwmw2@shinybook.infradead.org +2 -2 # revision 1.15 # date: 2004/11/04 13:24:15; author: gleixner; state: Exp; lines: +2 -2 # Cleanup bogus iomem type casts # # drivers/mtd/maps/ixp4xx.c # 2004/11/16 15:20:34+00:00 dwmw2@shinybook.infradead.org +3 -4 # revision 1.7 # date: 2004/11/04 13:24:15; author: gleixner; state: Exp; lines: +3 -4 # Cleanup bogus iomem type casts # # drivers/mtd/maps/ixp2000.c # 2004/11/16 15:20:34+00:00 dwmw2@shinybook.infradead.org +3 -4 # revision 1.4 # date: 2004/11/04 13:24:15; author: gleixner; state: Exp; lines: +3 -4 # Cleanup bogus iomem type casts # # drivers/mtd/maps/iq80310.c # 2004/11/16 15:20:33+00:00 dwmw2@shinybook.infradead.org +2 -2 # revision 1.20 # date: 2004/11/04 13:24:15; author: gleixner; state: Exp; lines: +2 -2 # Cleanup bogus iomem type casts # # drivers/mtd/maps/ipaq-flash.c # 2004/11/16 15:20:33+00:00 dwmw2@shinybook.infradead.org +3 -3 # revision 1.3 # date: 2004/11/04 13:24:15; author: gleixner; state: Exp; lines: +3 -3 # Cleanup bogus iomem type casts # # drivers/mtd/maps/impa7.c # 2004/11/16 15:20:33+00:00 dwmw2@shinybook.infradead.org +2 -3 # revision 1.13 # date: 2004/11/04 13:24:14; author: gleixner; state: Exp; lines: +2 -3 # Cleanup bogus iomem type casts # # drivers/mtd/maps/h720x-flash.c # 2004/11/16 15:20:33+00:00 dwmw2@shinybook.infradead.org +2 -2 # revision 1.11 # date: 2004/11/04 13:24:14; author: gleixner; state: Exp; lines: +2 -2 # Cleanup bogus iomem type casts # # drivers/mtd/maps/fortunet.c # 2004/11/16 15:20:33+00:00 dwmw2@shinybook.infradead.org +3 -3 # revision 1.9 # date: 2004/11/04 13:24:14; author: gleixner; state: Exp; lines: +3 -3 # Cleanup bogus iomem type casts # # drivers/mtd/maps/epxa10db-flash.c # 2004/11/16 15:20:33+00:00 dwmw2@shinybook.infradead.org +2 -2 # revision 1.13 # date: 2004/11/04 13:24:14; author: gleixner; state: Exp; lines: +2 -2 # Cleanup bogus iomem type casts # # drivers/mtd/maps/elan-104nc.c # 2004/11/16 15:20:33+00:00 dwmw2@shinybook.infradead.org +2 -2 # revision 1.23 # date: 2004/11/04 13:24:14; author: gleixner; state: Exp; lines: +2 -2 # Cleanup bogus iomem type casts # # drivers/mtd/maps/edb7312.c # 2004/11/16 15:20:33+00:00 dwmw2@shinybook.infradead.org +2 -3 # revision 1.13 # date: 2004/11/04 13:24:14; author: gleixner; state: Exp; lines: +2 -3 # Cleanup bogus iomem type casts # # drivers/mtd/maps/ebony.c # 2004/11/16 15:20:33+00:00 dwmw2@shinybook.infradead.org +2 -3 # revision 1.13 # date: 2004/11/04 13:24:14; author: gleixner; state: Exp; lines: +2 -3 # Cleanup bogus iomem type casts # # drivers/mtd/maps/dmv182.c # 2004/11/16 15:20:33+00:00 dwmw2@shinybook.infradead.org +2 -3 # revision 1.5 # date: 2004/11/04 13:24:14; author: gleixner; state: Exp; lines: +2 -3 # Cleanup bogus iomem type casts # # drivers/mtd/maps/dilnetpc.c # 2004/11/16 15:20:33+00:00 dwmw2@shinybook.infradead.org +2 -2 # revision 1.16 # date: 2004/11/04 13:24:14; author: gleixner; state: Exp; lines: +2 -2 # Cleanup bogus iomem type casts # # drivers/mtd/maps/dbox2-flash.c # 2004/11/16 15:20:33+00:00 dwmw2@shinybook.infradead.org +2 -2 # revision 1.13 # date: 2004/11/04 13:24:14; author: gleixner; state: Exp; lines: +2 -2 # Cleanup bogus iomem type casts # # drivers/mtd/maps/db1x00-flash.c # 2004/11/16 15:20:33+00:00 dwmw2@shinybook.infradead.org +2 -2 # revision 1.6 # date: 2004/11/04 13:24:14; author: gleixner; state: Exp; lines: +2 -2 # Cleanup bogus iomem type casts # # drivers/mtd/maps/db1550-flash.c # 2004/11/16 15:20:33+00:00 dwmw2@shinybook.infradead.org +2 -3 # revision 1.7 # date: 2004/11/04 13:24:14; author: gleixner; state: Exp; lines: +2 -3 # Cleanup bogus iomem type casts # # drivers/mtd/maps/cstm_mips_ixx.c # 2004/11/16 15:20:33+00:00 dwmw2@shinybook.infradead.org +2 -2 # revision 1.12 # date: 2004/11/04 13:24:14; author: gleixner; state: Exp; lines: +2 -2 # Cleanup bogus iomem type casts # # drivers/mtd/maps/cfi_flagadm.c # 2004/11/16 15:20:33+00:00 dwmw2@shinybook.infradead.org +2 -2 # revision 1.14 # date: 2004/11/04 13:24:14; author: gleixner; state: Exp; lines: +2 -2 # Cleanup bogus iomem type casts # # drivers/mtd/maps/cdb89712.c # 2004/11/16 15:20:33+00:00 dwmw2@shinybook.infradead.org +4 -4 # revision 1.10 # date: 2004/11/04 13:24:14; author: gleixner; state: Exp; lines: +4 -4 # Cleanup bogus iomem type casts # # drivers/mtd/maps/beech-mtd.c # 2004/11/16 15:20:33+00:00 dwmw2@shinybook.infradead.org +2 -2 # revision 1.10 # date: 2004/11/04 13:24:14; author: gleixner; state: Exp; lines: +2 -2 # Cleanup bogus iomem type casts # # drivers/mtd/maps/autcpu12-nvram.c # 2004/11/16 15:20:33+00:00 dwmw2@shinybook.infradead.org +2 -2 # revision 1.8 # date: 2004/11/04 13:24:14; author: gleixner; state: Exp; lines: +2 -2 # Cleanup bogus iomem type casts # # drivers/mtd/maps/arctic-mtd.c # 2004/11/16 15:20:33+00:00 dwmw2@shinybook.infradead.org +2 -2 # revision 1.13 # date: 2004/11/04 13:24:14; author: gleixner; state: Exp; lines: +2 -2 # Cleanup bogus iomem type casts # # drivers/mtd/devices/docprobe.c # 2004/11/16 15:20:33+00:00 dwmw2@shinybook.infradead.org +2 -2 # revision 1.42 # date: 2004/09/16 23:51:57; author: gleixner; state: Exp; lines: +2 -2 # Part 3 of the __iomem readb and friends overhaul # # drivers/mtd/devices/doc2001plus.c # 2004/11/16 15:20:33+00:00 dwmw2@shinybook.infradead.org +19 -19 # revision 1.10 # date: 2004/09/16 23:51:57; author: gleixner; state: Exp; lines: +19 -19 # Part 3 of the __iomem readb and friends overhaul # # drivers/mtd/devices/doc2001.c # 2004/11/16 15:20:33+00:00 dwmw2@shinybook.infradead.org +13 -13 # revision 1.45 # date: 2004/09/16 23:51:57; author: gleixner; state: Exp; lines: +13 -13 # Part 3 of the __iomem readb and friends overhaul # # drivers/mtd/devices/doc2000.c # 2004/11/16 15:20:33+00:00 dwmw2@shinybook.infradead.org +14 -28 # revision 1.63 # date: 2004/09/16 23:51:56; author: gleixner; state: Exp; lines: +14 -28 # Part 3 of the __iomem readb and friends overhaul # # ChangeSet # 2004/11/16 15:04:25+00:00 dwmw2@shinybook.infradead.org # MTD: DiskOnChip drivers should no longer require old docecc code. # # Signed-off-by: Thomas Gleixner # Signed-off-by: David Woodhouse # # drivers/mtd/devices/Kconfig # 2004/11/16 15:04:04+00:00 dwmw2@shinybook.infradead.org +3 -3 # revision 1.13 # date: 2004/10/01 21:47:13; author: gleixner; state: Exp; lines: +3 -3 # Remove docecc dependency for the new nand/diskonchip driver # # ChangeSet # 2004/11/16 14:42:51+00:00 dwmw2@shinybook.infradead.org # MTD: Intel flash chip driver locking fixes. # # Cleanups and fixes in preparation for XIP support -- fix unbalanced use # of get_chip() and put_chip(), and clean up the code a little in # preparation for what's to come. # # Signed-off-by: Nicolas Pitre # Signed-off-by: David Woodhouse # # drivers/mtd/chips/cfi_cmdset_0001.c # 2004/11/16 14:42:28+00:00 dwmw2@shinybook.infradead.org +34 -24 # revision 1.160 # date: 2004/11/01 06:02:24; author: nico; state: Exp; lines: +29 -18 # Prerequisite cleanup for the upcoming patch. # This should not have changed the code logic at all. Sue me if it did. # ---------------------------- # revision 1.159 # date: 2004/10/26 16:47:49; author: nico; state: Exp; lines: +2 -2 # another put_chip() # ---------------------------- # revision 1.158 # date: 2004/10/22 18:42:13; author: nico; state: Exp; lines: +7 -8 # fix unbalanced get_chip() and put_chip() in do_erase_oneblock() # # ChangeSet # 2004/11/16 13:48:09+00:00 dwmw2@shinybook.infradead.org # RS library spelling fixes. # # Originally from Joe Perches # Signed-off-by: Thomas Gleixner # Signed-off-by: David Woodhouse # # # lib/reed_solomon/encode_rs.c # 2004/11/16 13:46:36+00:00 dwmw2@shinybook.infradead.org +2 -2 # revision 1.4 # date: 2004/10/22 15:41:47; author: gleixner; state: Exp; lines: +2 -2 # Joe Perches provided the spelling and # grammar fixes for Documentation. # I'm happy if somebody takes care of my language related # nescience. :) # # lib/reed_solomon/decode_rs.c # 2004/11/16 13:46:36+00:00 dwmw2@shinybook.infradead.org +4 -4 # revision 1.6 # date: 2004/10/22 15:41:47; author: gleixner; state: Exp; lines: +4 -4 # Joe Perches provided the spelling and # grammar fixes for Documentation. # I'm happy if somebody takes care of my language related # nescience. :) # # Documentation/DocBook/librs.tmpl # 2004/11/16 13:46:35+00:00 dwmw2@shinybook.infradead.org +11 -11 # revision 1.2 # date: 2004/10/22 15:41:46; author: gleixner; state: Exp; lines: +11 -11 # Joe Perches provided the spelling and # grammar fixes for Documentation. # I'm happy if somebody takes care of my language related # nescience. :) # # ChangeSet # 2004/11/16 09:44:16+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2248/1: S3C2410 - missing serial config in arch/arm/mach-s3c2410/Kconfig # # Patch from Ben Dooks # # Add patch that should have been in 2247/1, defining # CONFIG_S3C2410_LOWLEVEL_UART_PORT # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # arch/arm/mach-s3c2410/Kconfig # 2004/11/15 15:25:55+00:00 ben-linux@org.rmk.(none) +12 -0 # [PATCH] 2248/1: S3C2410 - missing serial config in arch/arm/mach-s3c2410/Kconfig # # ChangeSet # 2004/11/15 22:54:43-06:00 jejb@titanic.il.steeleye.com # Fix badness in scsi_lib.c # # From: Mike Christie # # > Oct 26 23:32:55 mina kernel: Unable to handle kernel paging request at # > virtual address 6b6b6c7b # > Oct 26 23:32:55 mina kernel: printing eip: # > Oct 26 23:32:55 mina kernel: f882b8ce # > Oct 26 23:32:55 mina kernel: *pde = 00000000 # > Oct 26 23:32:55 mina kernel: Oops: 0000 [#1] # > Oct 26 23:32:55 mina kernel: PREEMPT # > Oct 26 23:32:55 mina kernel: Modules linked in: sd_mod usb_storage # > ide_cd cdrom sg scsi_mod rd # > Oct 26 23:32:55 mina kernel: CPU: 0 # > Oct 26 23:32:55 mina kernel: EIP: 0060:[] Not tainted VLI # > Oct 26 23:32:55 mina kernel: EFLAGS: 00010296 (2.6.10-rc1-mm1y) # > Oct 26 23:32:55 mina kernel: EIP is at # > scsi_block_when_processing_errors+0xe/0xe0 [scsi_mod] # > Oct 26 23:32:55 mina kernel: eax: 00000000 ebx: 6b6b6b6b ecx: # > f88ef640 edx: ec5b6578 # > Oct 26 23:32:55 mina kernel: esi: e9baa4b8 edi: c17e9268 ebp: # > e9677f0c esp: e9677eb4 # > Oct 26 23:32:55 mina kernel: ds: 007b es: 007b ss: 0068 # > Oct 26 23:32:55 mina kernel: Process fdisk (pid: 2891, # > threadinfo=e9676000 task=ea0c61f0) # > Oct 26 23:32:55 mina kernel: Stack: 00000000 00000001 00000000 00000000 # > 00000000 00000000 00000000 00000000 # > Oct 26 23:32:55 mina kernel: 00000000 00000000 00000003 e9677ef0 # > c17e9268 0000006b c17e9268 e9677f0c # > Oct 26 23:32:55 mina kernel: c0159761 c17e93e4 00000000 e9b98780 # > e9baa4b8 c17e9268 e9677f24 f88ef6a8 # > Oct 26 23:32:55 mina kernel: Call Trace: # > Oct 26 23:32:55 mina kernel: [] show_stack+0x7f/0xa0 # > Oct 26 23:32:55 mina kernel: [] show_registers+0x156/0x1c0 # > Oct 26 23:32:55 mina kernel: [] die+0x156/0x2e0 # > Oct 26 23:32:55 mina kernel: [] do_page_fault+0x36d/0x69c # > Oct 26 23:32:55 mina kernel: [] error_code+0x2d/0x38 # > Oct 26 23:32:55 mina kernel: [] sd_release+0x68/0xa0 [sd_mod] # > Oct 26 23:32:55 mina kernel: [] blkdev_put+0x183/0x1b0 # > Oct 26 23:32:55 mina kernel: [] __fput+0x14d/0x160 # > Oct 26 23:32:55 mina kernel: [] filp_close+0x57/0x90 # > Oct 26 23:32:55 mina kernel: [] sys_close+0x113/0x240 # > Oct 26 23:32:55 mina kernel: [] sysenter_past_esp+0x52/0x71 # > Oct 26 23:32:55 mina kernel: Code: 0c 8b 43 04 8b 00 89 5c 24 04 c7 04 # > 24 e4 d1 83 f8 89 44 24 08 e8 d3 21 8f c7 8d 76 00 55 89 e5 57 56 53 83 # > ec 4c 8b 75 08 8b 1e <8b> 83 10 01 00 00 a8 08 74 7c fc 31 c0 8d 7d b4 # > b9 05 00 00 00 # # # The problem with using shost_for_each_device wrt to the above oops is # that scsi_forget_host sets the state to SDEV_CANCEL, so that when # scsi_host_cancel iterates over the devices using shost_for_each_device # it cannot get a handle to the sdev (scsi_device_get fails becuase the # state is set to SDEV_CANCEL). And, __scsi_iterate_devices does not clear # the next pointer if this happens, so I think this is needed to fix just # the refcount bug in shost_for_each_device. # # Signed-off-by: James Bottomley # # drivers/scsi/scsi.c # 2004/11/15 22:54:30-06:00 jejb@titanic.il.steeleye.com +1 -0 # Fix badness in scsi_lib.c # # ChangeSet # 2004/11/15 20:12:51-08:00 miles@gnu.org # [PATCH] Remove duplicate safe_for_read(READ_BUFFER) entry in scsi_ioctl.c # # Signed-off-by: Miles Bader # Cc: James Bottomley # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/block/scsi_ioctl.c # 2004/11/15 19:29:30-08:00 miles@gnu.org +0 -1 # Remove duplicate safe_for_read(READ_BUFFER) entry in scsi_ioctl.c # # ChangeSet # 2004/11/15 20:12:38-08:00 Markus.Lidel@shadowconnect.com # [PATCH] i2o: converted SPIN_LOCK_UNLOCKED into spin_lock_init() # # - changed initialization of spin locks from SPIN_LOCK_UNLOCKED into # spin_lock_init() # # Signed-off-by: Markus Lidel # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/message/i2o/iop.c # 2004/11/15 19:29:30-08:00 Markus.Lidel@shadowconnect.com +2 -2 # i2o: converted SPIN_LOCK_UNLOCKED into spin_lock_init() # # drivers/message/i2o/i2o_config.c # 2004/11/15 19:29:30-08:00 Markus.Lidel@shadowconnect.com +3 -1 # i2o: converted SPIN_LOCK_UNLOCKED into spin_lock_init() # # drivers/message/i2o/exec-osm.c # 2004/11/15 19:29:30-08:00 Markus.Lidel@shadowconnect.com +3 -1 # i2o: converted SPIN_LOCK_UNLOCKED into spin_lock_init() # # drivers/message/i2o/driver.c # 2004/11/15 19:29:30-08:00 Markus.Lidel@shadowconnect.com +3 -1 # i2o: converted SPIN_LOCK_UNLOCKED into spin_lock_init() # # ChangeSet # 2004/11/15 20:12:25-08:00 Markus.Lidel@shadowconnect.com # [PATCH] i2o: changed old queueing code with wait_event API # # - removed old queueing code and replaced it with new wait_event API # # Signed-off-by: Markus Lidel # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/message/i2o/exec-osm.c # 2004/11/15 19:29:29-08:00 Markus.Lidel@shadowconnect.com +17 -22 # i2o: changed old queueing code with wait_event API # # ChangeSet # 2004/11/15 20:12:13-08:00 Markus.Lidel@shadowconnect.com # [PATCH] i2o: remove unused code and make needlessly global code static # # - remove unused code # - make needlessly global code static # # Signed-off-by: Adrian Bunk # Signed-off-by: Markus Lidel # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/i2o.h # 2004/11/15 19:29:29-08:00 Markus.Lidel@shadowconnect.com +0 -3 # i2o: remove unused code and make needlessly global code static # # drivers/message/i2o/iop.c # 2004/11/15 19:29:29-08:00 Markus.Lidel@shadowconnect.com +4 -3 # i2o: remove unused code and make needlessly global code static # # drivers/message/i2o/i2o_scsi.c # 2004/11/15 19:29:29-08:00 Markus.Lidel@shadowconnect.com +3 -3 # i2o: remove unused code and make needlessly global code static # # drivers/message/i2o/i2o_proc.c # 2004/11/15 19:29:29-08:00 Markus.Lidel@shadowconnect.com +19 -19 # i2o: remove unused code and make needlessly global code static # # drivers/message/i2o/i2o_config.c # 2004/11/15 19:29:29-08:00 Markus.Lidel@shadowconnect.com +1 -2 # i2o: remove unused code and make needlessly global code static # # drivers/message/i2o/exec-osm.c # 2004/11/15 19:29:29-08:00 Markus.Lidel@shadowconnect.com +3 -2 # i2o: remove unused code and make needlessly global code static # # drivers/message/i2o/device.c # 2004/11/15 19:29:29-08:00 Markus.Lidel@shadowconnect.com +2 -44 # i2o: remove unused code and make needlessly global code static # # drivers/message/i2o/debug.c # 2004/11/15 19:29:29-08:00 Markus.Lidel@shadowconnect.com +4 -104 # i2o: remove unused code and make needlessly global code static # # ChangeSet # 2004/11/15 20:12:00-08:00 Markus.Lidel@shadowconnect.com # [PATCH] i2o: changed code with BUG() to BUG_ON() # # - changed code with BUG() to use BUG_ON() which could be optimized by some # platforms (original from Milton Miller) # # Signed-off-by: Markus Lidel # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/i2o.h # 2004/11/15 19:29:29-08:00 Markus.Lidel@shadowconnect.com +2 -4 # i2o: changed code with BUG() to BUG_ON() # # ChangeSet # 2004/11/15 20:11:47-08:00 adaplas@hotpop.com # [PATCH] fbdev: Change the find_mode behavior # # let find_mode search for nearest refresh rate # # Signed-off-by: Alexander Kern # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/modedb.c # 2004/11/15 19:29:29-08:00 adaplas@hotpop.com +31 -12 # fbdev: Change the find_mode behavior # # ChangeSet # 2004/11/15 20:11:35-08:00 adaplas@hotpop.com # [PATCH] fbdev: Fix typo in atyfb # # Fix typo, and decrease amount of output # # Signed-off-by: Alexander Kern # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/aty/atyfb_base.c # 2004/11/15 19:29:28-08:00 adaplas@hotpop.com +2 -2 # fbdev: Fix typo in atyfb # # ChangeSet # 2004/11/15 20:11:22-08:00 adaplas@hotpop.com # [PATCH] fbdev: Fix cursor in doublescan mode in atyfb # # fix hw cursor in doublescan modes # # Signed-off-by: Alexander Kern # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/aty/mach64_cursor.c # 2004/11/15 19:29:28-08:00 adaplas@hotpop.com +9 -6 # fbdev: Fix cursor in doublescan mode in atyfb # # ChangeSet # 2004/11/15 20:11:09-08:00 adaplas@hotpop.com # [PATCH] fbdev: Allow mode change even if EDID block is not found # # - use symbol_get() to check for the presence of i2c # # - allow mode changing even if EDID block is not found (no I2C support) # # - fix crashes on chipsets that do not have i2c support # # - shorten string in info->fix.id # # - trivial chip name changes # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/savage/savagefb.c # 2004/11/15 19:29:28-08:00 adaplas@hotpop.com +12 -13 # fbdev: Allow mode change even if EDID block is not found # # drivers/video/savage/savagefb-i2c.c # 2004/11/15 19:29:28-08:00 adaplas@hotpop.com +53 -38 # fbdev: Allow mode change even if EDID block is not found # # ChangeSet # 2004/11/15 20:10:56-08:00 adaplas@hotpop.com # [PATCH] fbcon: Disable fbcon cursor if vt softcursor is enabled # # Problem reported by Gerd Knorr: # # (1) boot with vesafb (thats what I'm using, maybe it shows on other # framebuffers and/or vgacon as well). # (2) login into one terminal, then type "echo -ne '\033[?17;15;239c'". # You should have a nice, yellow and *not* blinking cursor block. # That is what I have in my .profile because I can't stand the # blinking cursors. # (3) Switch to another terminal. The cursor goes into blinking # underscore mode now (i.e. the default cursor). # (4) Switch back to the first terminal. Now you have a yellow block # with the last two pixel lines (i.e. the underscore) blinking. # # This bug is caused by both fbcon_cursor and vt softcursor being active at # the same time. # # Fix: # # - Disable fbcon_cursor if vt softcursor is active (vc->vc_cursor_type & # 0x10) != 0. # # - Recheck/reload fbcon cursor for each vt switch # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/console/tileblit.c # 2004/11/15 19:29:28-08:00 adaplas@hotpop.com +2 -1 # fbcon: Disable fbcon cursor if vt softcursor is enabled # # drivers/video/console/fbcon.h # 2004/11/15 19:29:28-08:00 adaplas@hotpop.com +1 -0 # fbcon: Disable fbcon cursor if vt softcursor is enabled # # drivers/video/console/fbcon.c # 2004/11/15 19:29:28-08:00 adaplas@hotpop.com +3 -0 # fbcon: Disable fbcon cursor if vt softcursor is enabled # # drivers/video/console/bitblit.c # 2004/11/15 19:29:28-08:00 adaplas@hotpop.com +21 -12 # fbcon: Disable fbcon cursor if vt softcursor is enabled # # ChangeSet # 2004/11/15 20:10:44-08:00 adaplas@hotpop.com # [PATCH] fbdev: Support for bigger than 16x32 fonts in rivafb cursor # # - Add support for fonts bigger thatn 16x32 by dynamically allocating buffer # based on font dimensions instead of statically allocating at 64 bytes. # # - use softcursor if cursor size exceeds 32x32. # # - fix rivafb_cursor if cursor width is not divisible by 2 # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/riva/fbdev.c # 2004/11/15 19:29:27-08:00 adaplas@hotpop.com +43 -29 # fbdev: Support for bigger than 16x32 fonts in rivafb cursor # # ChangeSet # 2004/11/15 20:10:31-08:00 adaplas@hotpop.com # [PATCH] fbdev: Support for bigger than 16x32 fonts in softcursor # # Fix crash if font font is bigger than 16x32 by dynamically allocating buffer # based on font dimensions instead of statically allocating at 64 bytes. # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/softcursor.c # 2004/11/15 19:29:27-08:00 adaplas@hotpop.com +5 -4 # fbdev: Support for bigger than 16x32 fonts in softcursor # # ChangeSet # 2004/11/15 20:10:18-08:00 adaplas@hotpop.com # [PATCH] fbdev: Fix for using >16 pixel wide font in fb console # # From: Jani Jaakkola : # # The first one was that fbcon_set_font() used one byte padding for fonts having # width 16 <= width < 24, which was wrong since the pieces of code actually # using the font did not use any padding. This is fixed in the included patch # and also fbcon_set_font() is made a little cleaner. After the patch the # following font is not garbled in fb console: # http://www.cs.helsinki.fi/u/jjaakkol/psf/bitstream_vera_sans_mono_roman.16x30.psf # # The other bug is that fonts having height == 32 crash the kernel. I have no # fix for this (at least not yet), but it can be reproduced with font: # http://www.cs.helsinki.fi/u/jjaakkol/psf/bitstream_vera_sans_mono_roman.17x32.psf. # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/console/fbcon.c # 2004/11/15 19:29:27-08:00 adaplas@hotpop.com +23 -53 # fbdev: Fix for using >16 pixel wide font in fb console # # drivers/video/console/Kconfig # 2004/11/15 19:29:27-08:00 adaplas@hotpop.com +1 -0 # fbdev: Fix for using >16 pixel wide font in fb console # # ChangeSet # 2004/11/15 20:10:05-08:00 sylvain.meyer@worldonline.fr # [PATCH] fbdev: Add vram option to intelfb # # - add vram option to reserve more memory than stolen by BIOS if needed # - fix intelfbhw_pan_display typo # - add __initdata annotations # # Signed-off-by: Sylvain Meyer # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/intelfb/intelfbhw.c # 2004/11/15 19:29:27-08:00 sylvain.meyer@worldonline.fr +1 -1 # fbdev: Add vram option to intelfb # # drivers/video/intelfb/intelfbdrv.c # 2004/11/15 19:29:27-08:00 sylvain.meyer@worldonline.fr +75 -20 # fbdev: Add vram option to intelfb # # drivers/video/intelfb/intelfb.h # 2004/11/15 19:29:27-08:00 sylvain.meyer@worldonline.fr +5 -2 # fbdev: Add vram option to intelfb # # ChangeSet # 2004/11/15 20:09:53-08:00 agk@redhat.com # [PATCH] device-mapper: Allow referencing by device number # # Currently userspace code using the dm ioctls must refer to a mapped device by # either its name or its uuid. But in some circumstances you know neither of # those directly. # # This patch lets you reference devices by their major/minor numbers as an # alternative. # # Signed-Off-By: Alasdair G Kergon # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/dm-ioctl.h # 2004/11/15 19:29:26-08:00 agk@redhat.com +2 -2 # device-mapper: Allow referencing by device number # # drivers/md/dm.h # 2004/11/15 19:29:26-08:00 agk@redhat.com +2 -0 # device-mapper: Allow referencing by device number # # drivers/md/dm.c # 2004/11/15 19:29:26-08:00 agk@redhat.com +35 -6 # device-mapper: Allow referencing by device number # # drivers/md/dm-ioctl.c # 2004/11/15 19:29:26-08:00 agk@redhat.com +17 -12 # device-mapper: Allow referencing by device number # # ChangeSet # 2004/11/15 20:09:40-08:00 agk@redhat.com # [PATCH] device-mapper: Add DM_TARGET_MSG # # Add DM_TARGET_MSG ioctl so data can be passed to a dm target after its table # has been loaded. # # Signed-Off-By: Alasdair G Kergon # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/dm-ioctl.h # 2004/11/15 19:29:26-08:00 agk@redhat.com +19 -2 # device-mapper: Add DM_TARGET_MSG # # include/linux/device-mapper.h # 2004/11/15 19:29:26-08:00 agk@redhat.com +4 -0 # device-mapper: Add DM_TARGET_MSG # # include/linux/compat_ioctl.h # 2004/11/15 19:29:26-08:00 agk@redhat.com +2 -0 # device-mapper: Add DM_TARGET_MSG # # drivers/md/dm.h # 2004/11/15 19:29:26-08:00 agk@redhat.com +3 -0 # device-mapper: Add DM_TARGET_MSG # # drivers/md/dm-table.c # 2004/11/15 19:29:26-08:00 agk@redhat.com +3 -2 # device-mapper: Add DM_TARGET_MSG # # drivers/md/dm-ioctl.c # 2004/11/15 19:29:26-08:00 agk@redhat.com +65 -1 # device-mapper: Add DM_TARGET_MSG # # ChangeSet # 2004/11/15 20:09:27-08:00 agk@redhat.com # [PATCH] device-mapper: Fix some DMERR macro usage # # Fix some DMERR macro usage. It already adds : and \n. # # Signed-Off-By: Alasdair G Kergon # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/dm-table.c # 2004/11/15 19:29:26-08:00 agk@redhat.com +3 -3 # device-mapper: Fix some DMERR macro usage # # ChangeSet # 2004/11/15 20:09:14-08:00 agk@redhat.com # [PATCH] device-mapper: dm-crypt fix for zero-length key # # dm-crypt fix for zero-length key. # # Signed-Off-By: Christophe Saout # Signed-Off-By: Alasdair G Kergon # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/dm-crypt.c # 2004/11/15 19:29:25-08:00 agk@redhat.com +2 -2 # device-mapper: dm-crypt fix for zero-length key # # ChangeSet # 2004/11/15 20:09:01-08:00 Andries.Brouwer@cwi.nl # [PATCH] dm_init unresolved reference to _exits # # drivers/md/dm.c dm_int refers to _exits which is defined as __exitdata. # With CONFIG_HOTPLUG=n, __exitdata is discarded. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/dm.c # 2004/11/15 19:29:25-08:00 Andries.Brouwer@cwi.nl +1 -1 # dm_init unresolved reference to _exits # # ChangeSet # 2004/11/15 20:08:49-08:00 roland@topspin.com # [PATCH] cdev_init: zero out cdev before kobject_init() # # Right now, cdev_init() works in a way that is not very intuitive. If a # driver passes an uninitialized struct cdev to cdev_init(), then an # uninitialized struct kobject will be passed to kobject_init(), which does # kset_get() on kobj->kset, which probably points off into space and causes # an oops. Drivers can work around this by zeroing out their struct cdev in # advance (and indeed most if not all of the things passed to cdev_init() # come from BSS) but I think it makes more sense for cdev_init() to live up # to its name and actually work on an uninitialized cdev. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/char_dev.c # 2004/11/15 19:29:25-08:00 roland@topspin.com +1 -0 # cdev_init: zero out cdev before kobject_init() # # ChangeSet # 2004/11/15 20:08:36-08:00 paulus@samba.org # [PATCH] Multilink fix for ppp_generic.c # # I released ppp-2.4.3 yesterday, with much improved support for multilink # operation - when the first link is terminated, its pppd no longer exits # immediately, but keeps running in order to keep the ppp interface up while # there are other links still in the bundle. # # However, this shows up a bug in the kernel ppp driver, which is that there is # no way for the pppd controlling the bundle to know when the last link in the # bundle is terminated. This patch provides such a way: with this patch, pppd # will get an EOF when reading from the /dev/ppp instance for the bundle when # there are no channels connected. # # The change does not affect older versions of pppd or normal non-multilink # operation (I have tested to make sure of that). # # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/net/ppp_generic.c # 2004/11/15 19:29:25-08:00 paulus@samba.org +22 -2 # Multilink fix for ppp_generic.c # # ChangeSet # 2004/11/15 20:08:24-08:00 paulus@samba.org # [PATCH] __iomem annotations for swim3.c # # This patch adds __iomem annotations to drivers/block/swim3.c. # # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/block/swim3.c # 2004/11/15 19:29:24-08:00 paulus@samba.org +25 -23 # __iomem annotations for swim3.c # # ChangeSet # 2004/11/15 20:08:11-08:00 paulus@samba.org # [PATCH] power_state and __iomem for mediabay.c # # This patch does the power_state -> power.power_state conversion for # drivers/macintosh/mediabay.c and makes it use void __iomem * for ioremap # cookies. Once the IDE code is converted to not use unsigned long for MMIO # register addresses, I will be able to remove a few casts from here. # # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/macintosh/mediabay.c # 2004/11/15 19:29:24-08:00 paulus@samba.org +13 -12 # power_state and __iomem for mediabay.c # # ChangeSet # 2004/11/15 20:07:58-08:00 paulus@samba.org # [PATCH] Add __iomem annotations to drivers/scsi/mac53c94.c # # This patch adds __iomem annotations to drivers/scsi/mac53c94.c, and changes # one use of st_le32 to writel. # # Signed-off-by: Paul Mackerras # Cc: James Bottomley # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/scsi/mac53c94.c # 2004/11/15 19:29:24-08:00 paulus@samba.org +12 -12 # Add __iomem annotations to drivers/scsi/mac53c94.c # # ChangeSet # 2004/11/15 20:07:45-08:00 paulus@samba.org # [PATCH] Do power_state conversion for mesh.c # # This patch changes dev.power_state to dev.power.power_state in # drivers/scsi/mesh.c, and fixes an uninitialized variable use in a printk. # # Signed-off-by: Paul Mackerras # Cc: James Bottomley # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/scsi/mesh.c # 2004/11/15 19:29:24-08:00 paulus@samba.org +6 -6 # Do power_state conversion for mesh.c # # ChangeSet # 2004/11/15 20:07:33-08:00 paulus@samba.org # [PATCH] Fix pmac_zilog.c so it compiles again # # It seems that pmac_zilog.c got missed in the dev.power_state to # dev.power.power_state conversion. This patch makes that change, and also # fixes a problem where it would not compile if CONFIG_MAGIC_SYSRQ was set but # CONFIG_SERIAL_CORE_CONSOLE was not. # # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/serial/pmac_zilog.c # 2004/11/15 19:29:23-08:00 paulus@samba.org +6 -6 # Fix pmac_zilog.c so it compiles again # # ChangeSet # 2004/11/15 20:07:20-08:00 ysato@users.sourceforge.jp # [PATCH] CONFIG_UNIX98_PTY=n warning fix # # ptmx_open() only exists if CONFIG_UNIX98_PTYS. # # Signed-off-by: Yoshinori Sato # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/tty_io.c # 2004/11/15 19:29:23-08:00 ysato@users.sourceforge.jp +1 -1 # CONFIG_UNIX98_PTY=n warning fix # # ChangeSet # 2004/11/15 20:07:07-08:00 akpm@osdl.org # [PATCH] sound_alloc_dmap memory allocation warning suppression # # alloc_pages() failures are expected here. Manually prevent warnings. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # sound/oss/dmabuf.c # 2004/11/15 19:29:23-08:00 akpm@osdl.org +1 -1 # sound_alloc_dmap memory allocation warning suppression # # ChangeSet # 2004/11/15 20:06:54-08:00 juerg@paldo.org # [PATCH] Don't remove /sys in initramfs # # Using the "resume" kernel parameter together with an initramfs revealed a # bug that causes removal of the /sys directory in the initramfs' tmpfs, # making the system unbootable. # # The source of the problem is that the try_name() function removes the /sys # directory unconditionally, instead of removing it only when it has been # created by try_name(). # # The attached patch only removes /sys if it has been created before. # # Signed-off-by: Juerg Billeter # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # init/do_mounts.c # 2004/11/15 19:29:23-08:00 juerg@paldo.org +3 -2 # Don't remove /sys in initramfs # # ChangeSet # 2004/11/15 20:06:42-08:00 bunk@stusta.de # [PATCH] kill lockd_syms.c # # The patch below kills lockd_syms.c. # # Signed-off-by: Adrian Bunk # Acked-by: Trond Myklebust # Acked-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/lockd/svc.c # 2004/11/15 19:29:23-08:00 bunk@stusta.de +5 -0 # kill lockd_syms.c # # fs/lockd/clntproc.c # 2004/11/15 19:29:23-08:00 bunk@stusta.de +2 -0 # kill lockd_syms.c # # fs/lockd/Makefile # 2004/11/15 19:29:23-08:00 bunk@stusta.de +1 -1 # kill lockd_syms.c # # BitKeeper/deleted/.del-lockd_syms.c~dcb97d92dd790329 # 2004/11/15 20:06:34-08:00 bunk@stusta.de +0 -0 # Delete: fs/lockd/lockd_syms.c # # ChangeSet # 2004/11/15 20:06:29-08:00 neilb@cse.unsw.edu.au # [PATCH] kNFSd: fix d_find_alias brokenness # # 10 weeks ago, # http://linux.bkbits.com:8080/linux-2.5/cset@415b3380pxf4sB97gM8ujLqDxi6GfQ # # The patch was mostly right, and fixed a real problem, but missed a bit. # # It passed the job of checking if an inode had a current alias off to # d_find_alias instead of open-coding it in d_alloc_anon. However there is one # case where d_alloc_anon would not return the right dentry. That case being # when the inode was for the root of the filesystem. # # The root is a special case because it is not hashed. All other dentries that # are not hashed are quite un-interesting: There are "unlinked" but not yet # closed. The root of a filesystem is unhashed, but is interesting. # # Allowing d_find_alias to return an unhashed alias for a directory solves this # problem. It is safe because callers of d_find_alias on a directory inode # either have a name for the inode already (so finding an unlinked directory by # mistake is impossible) or will soon be looking for a name and will drop the # dentry if a name is not found. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/dcache.c # 2004/11/15 19:29:22-08:00 neilb@cse.unsw.edu.au +10 -6 # kNFSd: fix d_find_alias brokenness # # ChangeSet # 2004/11/15 20:06:16-08:00 shaggy@austin.ibm.com # [PATCH] radix_tree_delete() fix # # I was looking through the radix tree code and came across what I think # is a bug in radix_tree_delete. # # for (idx = 0; idx < RADIX_TREE_TAG_LONGS; idx++) { # if (pathp[0].node->tags[tag][idx]) { # tags[tag] = 1; # nr_cleared_tags--; # break; # } # } # # The above loop should only be executed if tags[tag] is zero. Otherwise, # when walking up the tree, we can decrement nr_cleared_tags twice or more # for the same value of tag, thus potentially exiting the outer loop too # early. # # Ensure that nr_cleared_tags is only decremented once for each tag. # # Signed-off-by: Dave Kleikamp # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # lib/radix-tree.c # 2004/11/15 19:29:22-08:00 shaggy@austin.ibm.com +4 -2 # radix_tree_delete() fix # # ChangeSet # 2004/11/15 20:06:03-08:00 schwidefsky@de.ibm.com # [PATCH] s390: zfcp act enhancements # # From: Andreas Herrmann # From: Maxim Shchetynin # # zfcp host adapter changes: # - Add access control enhancements. # - Add event callbacks. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/s390/scsi/zfcp_sysfs_unit.c # 2004/11/15 19:29:22-08:00 schwidefsky@de.ibm.com +4 -4 # s390: zfcp act enhancements # # drivers/s390/scsi/zfcp_sysfs_port.c # 2004/11/15 19:29:22-08:00 schwidefsky@de.ibm.com +2 -2 # s390: zfcp act enhancements # # drivers/s390/scsi/zfcp_scsi.c # 2004/11/15 19:29:22-08:00 schwidefsky@de.ibm.com +4 -1 # s390: zfcp act enhancements # # drivers/s390/scsi/zfcp_fsf.h # 2004/11/15 19:29:22-08:00 schwidefsky@de.ibm.com +3 -3 # s390: zfcp act enhancements # # drivers/s390/scsi/zfcp_fsf.c # 2004/11/15 19:29:22-08:00 schwidefsky@de.ibm.com +83 -27 # s390: zfcp act enhancements # # drivers/s390/scsi/zfcp_ext.h # 2004/11/15 19:29:22-08:00 schwidefsky@de.ibm.com +25 -1 # s390: zfcp act enhancements # # drivers/s390/scsi/zfcp_erp.c # 2004/11/15 19:29:22-08:00 schwidefsky@de.ibm.com +134 -20 # s390: zfcp act enhancements # # drivers/s390/scsi/zfcp_def.h # 2004/11/15 19:29:22-08:00 schwidefsky@de.ibm.com +32 -8 # s390: zfcp act enhancements # # drivers/s390/scsi/zfcp_aux.c # 2004/11/15 19:29:22-08:00 schwidefsky@de.ibm.com +167 -12 # s390: zfcp act enhancements # # ChangeSet # 2004/11/15 20:05:50-08:00 schwidefsky@de.ibm.com # [PATCH] s390: zfcp read-only lun sharing # # From: Volker Sameske # # zfcp host adapter: # - Add read-only lun sharing feature. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/s390/scsi/zfcp_sysfs_unit.c # 2004/11/15 19:29:21-08:00 schwidefsky@de.ibm.com +10 -0 # s390: zfcp read-only lun sharing # # drivers/s390/scsi/zfcp_sysfs_port.c # 2004/11/15 19:29:21-08:00 schwidefsky@de.ibm.com +4 -0 # s390: zfcp read-only lun sharing # # drivers/s390/scsi/zfcp_fsf.h # 2004/11/15 19:29:21-08:00 schwidefsky@de.ibm.com +12 -2 # s390: zfcp read-only lun sharing # # drivers/s390/scsi/zfcp_fsf.c # 2004/11/15 19:29:21-08:00 schwidefsky@de.ibm.com +100 -18 # s390: zfcp read-only lun sharing # # drivers/s390/scsi/zfcp_erp.c # 2004/11/15 19:29:21-08:00 schwidefsky@de.ibm.com +6 -2 # s390: zfcp read-only lun sharing # # drivers/s390/scsi/zfcp_def.h # 2004/11/15 19:29:21-08:00 schwidefsky@de.ibm.com +8 -0 # s390: zfcp read-only lun sharing # # ChangeSet # 2004/11/15 20:05:37-08:00 schwidefsky@de.ibm.com # [PATCH] s390: zfcp host adapter # # From: Andreas Herrmann # # zfcp host adapter change: # - Avoid usage of unregister debug feature. # - Avoid race when unregistering debug feature. # - Corrected some log messages for WKA ports. # - Don't pass NULL pointer to debug_register_view and debug_set_level. # - Some coding style cleanup. # - Fix race between scsi_add_device and deregistration of the adapter. # - Shorten & rename zfcp_els/zfcp_els_handler. # - Remove unused code for unused ELS commands. # - Evaluate response instead of request in adisc handler. # - Allocate qdio queue structures below 2GB. # - Remove ifdefs around ioctl32.h. # - Use CONFIG_COMPAT instead of CONFIG_S390_SUPPORT. # - Use semaphore in zfcp_ccw_shutdown. # - Strip down debug_register/debug_unregister. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/s390/scsi/zfcp_fsf.c # 2004/11/15 19:29:21-08:00 schwidefsky@de.ibm.com +32 -32 # s390: zfcp host adapter # # drivers/s390/scsi/zfcp_erp.c # 2004/11/15 19:29:21-08:00 schwidefsky@de.ibm.com +135 -249 # s390: zfcp host adapter # # drivers/s390/scsi/zfcp_def.h # 2004/11/15 19:29:21-08:00 schwidefsky@de.ibm.com +16 -81 # s390: zfcp host adapter # # drivers/s390/scsi/zfcp_ccw.c # 2004/11/15 19:29:21-08:00 schwidefsky@de.ibm.com +3 -1 # s390: zfcp host adapter # # drivers/s390/scsi/zfcp_aux.c # 2004/11/15 19:29:21-08:00 schwidefsky@de.ibm.com +31 -36 # s390: zfcp host adapter # # ChangeSet # 2004/11/15 20:05:25-08:00 schwidefsky@de.ibm.com # [PATCH] s390: crypto driver # # From: Eric Rossman # # s390 crypto driver changes: # - Small cleanup: misc -> crypto, header file defines, # variable names and a printk message. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/s390/crypto/z90main.c # 2004/11/15 19:29:20-08:00 schwidefsky@de.ibm.com +8 -8 # s390: crypto driver # # drivers/s390/crypto/z90hardware.c # 2004/11/15 19:29:20-08:00 schwidefsky@de.ibm.com +3 -3 # s390: crypto driver # # drivers/s390/crypto/z90crypt.h # 2004/11/15 19:29:20-08:00 schwidefsky@de.ibm.com +5 -5 # s390: crypto driver # # drivers/s390/crypto/z90common.h # 2004/11/15 19:29:20-08:00 schwidefsky@de.ibm.com +4 -4 # s390: crypto driver # # drivers/s390/crypto/Makefile # 2004/11/15 19:29:20-08:00 schwidefsky@de.ibm.com +1 -1 # s390: crypto driver # # ChangeSet # 2004/11/15 20:05:12-08:00 schwidefsky@de.ibm.com # [PATCH] s390: monreader docu # # From: Gerald Schaefer # # Docu for the z/VM monitor record read access feature. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/s390/monreader.txt # 2004/11/15 19:29:20-08:00 schwidefsky@de.ibm.com +175 -0 # s390: monreader docu # # Documentation/s390/monreader.txt # 2004/11/15 19:29:20-08:00 schwidefsky@de.ibm.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/Documentation/s390/monreader.txt # # ChangeSet # 2004/11/15 20:04:59-08:00 schwidefsky@de.ibm.com # [PATCH] s390: 3270 console # # 3270 console driver changes: # - Add error handling in 3270 device startup. # - Do halt_io if startup has been interrupted. # - Fix reference counting in tty timers. # - Simplify set_timer functions. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/s390/char/tty3270.c # 2004/11/15 19:29:20-08:00 schwidefsky@de.ibm.com +3 -7 # s390: 3270 console # # drivers/s390/char/raw3270.c # 2004/11/15 19:29:20-08:00 schwidefsky@de.ibm.com +27 -9 # s390: 3270 console # # drivers/s390/char/con3270.c # 2004/11/15 19:29:20-08:00 schwidefsky@de.ibm.com +3 -6 # s390: 3270 console # # ChangeSet # 2004/11/15 20:04:46-08:00 schwidefsky@de.ibm.com # [PATCH] s390: dasd driver # # From: Stefan Weinhuber # # dasd driver changes: # - Fix parameter parsing to allow sequences of devices, ranges # and keywords. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/s390/block/dasd_devmap.c # 2004/11/15 19:29:20-08:00 schwidefsky@de.ibm.com +101 -65 # s390: dasd driver # # ChangeSet # 2004/11/15 20:04:33-08:00 schwidefsky@de.ibm.com # [PATCH] s390: common i/o layer # # From: Cornelia Huck # From: Thomas Spatzier # # common i/o layer changes: # - Prevent double unregister of ccw devices. # - Move unregister out of the subchannel remove function, to # avoid live-lock due to hotplug if the root device is currently # indisposed. # - Delete pending timer after a machine check. # - Revert change to allocate qdio queues and SLIBS in DMA memory. # - Decrement ccw_device_init_count only after ccw_device_register is done. # - Remove unnecessary check in ccw_hotplug. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/s390/cio/qdio.c # 2004/11/15 19:29:19-08:00 schwidefsky@de.ibm.com +5 -5 # s390: common i/o layer # # drivers/s390/cio/device_fsm.c # 2004/11/15 19:29:19-08:00 schwidefsky@de.ibm.com +16 -3 # s390: common i/o layer # # drivers/s390/cio/device.c # 2004/11/15 19:29:19-08:00 schwidefsky@de.ibm.com +55 -25 # s390: common i/o layer # # drivers/s390/cio/css.h # 2004/11/15 19:29:19-08:00 schwidefsky@de.ibm.com +4 -0 # s390: common i/o layer # # drivers/s390/cio/css.c # 2004/11/15 19:29:19-08:00 schwidefsky@de.ibm.com +7 -1 # s390: common i/o layer # # ChangeSet # 2004/11/15 20:04:20-08:00 schwidefsky@de.ibm.com # [PATCH] s390: core changes # # From: Stefan Bader # From: Martin Schwidefsky # # s390 core changes: # - Store correct set of registers to core dumps. # - Fix make install with separate obj directory. # - Regenerate default configuration. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-s390/elf.h # 2004/11/15 19:29:19-08:00 schwidefsky@de.ibm.com +9 -2 # s390: core changes # # arch/s390/kernel/binfmt_elf32.c # 2004/11/15 19:29:19-08:00 schwidefsky@de.ibm.com +28 -1 # s390: core changes # # arch/s390/defconfig # 2004/11/15 19:29:19-08:00 schwidefsky@de.ibm.com +20 -7 # s390: core changes # # arch/s390/boot/Makefile # 2004/11/15 19:29:19-08:00 schwidefsky@de.ibm.com +1 -1 # s390: core changes # # ChangeSet # 2004/11/15 20:04:08-08:00 jdike@addtoit.com # [PATCH] uml: defconfig update # # Update defconfig. # # Signed-off-by: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/defconfig # 2004/11/15 19:29:19-08:00 jdike@addtoit.com +34 -7 # uml: defconfig update # # ChangeSet # 2004/11/15 20:03:55-08:00 jdike@addtoit.com # [PATCH] uml: remove some dead code # # Bodo pointed out that arch/um/kernel/skas/exec_user.c is dead code, so this # removes it. # # Signed-off-by: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/skas/Makefile # 2004/11/15 19:29:18-08:00 jdike@addtoit.com +4 -4 # uml: remove some dead code # # BitKeeper/deleted/.del-exec_user.c~8c6bb613a42f7643 # 2004/11/15 20:03:48-08:00 jdike@addtoit.com +0 -0 # Delete: arch/um/kernel/skas/exec_user.c # # ChangeSet # 2004/11/15 20:03:42-08:00 jdike@addtoit.com # [PATCH] uml: Remove unused declaration # # Remove an unused declaration of time_stamp(). # # Signed-off-by: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/include/kern_util.h # 2004/11/15 19:29:18-08:00 jdike@addtoit.com +0 -1 # uml: Remove unused declaration # # ChangeSet # 2004/11/15 20:03:30-08:00 jdike@addtoit.com # [PATCH] uml: LFS 64-bit cleanups # # Add ARCH_USER_CFLAGS so the arches can modify USER_CFLAGS. We now take # __ARCH_WANT_OLD_STAT and __ARCH_WANT_STAT64 from the base arch so that the # LFS-64 code gets included or excluded automatically. # # Signed-off-by: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-um/unistd.h # 2004/11/15 19:29:18-08:00 jdike@addtoit.com +1 -2 # uml: LFS 64-bit cleanups # # arch/um/Makefile # 2004/11/15 19:29:18-08:00 jdike@addtoit.com +1 -0 # uml: LFS 64-bit cleanups # # arch/um/Makefile-x86_64 # 2004/11/15 19:29:18-08:00 jdike@addtoit.com +1 -0 # uml: LFS 64-bit cleanups # # arch/um/Makefile-i386 # 2004/11/15 19:29:18-08:00 jdike@addtoit.com +1 -0 # uml: LFS 64-bit cleanups # # arch/um/Makefile-x86_64 # 2004/11/15 19:29:18-08:00 jdike@addtoit.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/um/Makefile-x86_64 # # ChangeSet # 2004/11/15 20:03:17-08:00 jdike@addtoit.com # [PATCH] uml: fix definitions of pte_unmap_* # # Some definitions of pte_unmap_* macros were written for HIGHPTE, which UML # doesn't support. # # Signed-off-by: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-um/pgtable.h # 2004/11/15 19:29:17-08:00 jdike@addtoit.com +4 -5 # uml: fix definitions of pte_unmap_* # # ChangeSet # 2004/11/15 20:03:04-08:00 jdike@addtoit.com # [PATCH] uml: Don't delay segfaults # # From: Bodo Stroesser # # This one covers the fact, that the SIGSEGV signal, which is created by # force_sigsegv() in case of an error in handle_signal(), is not delivered to # the user immediately. In the worst case it even could be masked if a # sigprocmask() systemcall follows immediately after return from kernel. The # patch is relevant for other architectures, too. # # Signed-off-by: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/signal_kern.c # 2004/11/15 19:29:17-08:00 jdike@addtoit.com +12 -10 # uml: Don't delay segfaults # # ChangeSet # 2004/11/15 20:02:51-08:00 jdike@addtoit.com # [PATCH] uml: fix signal mask on delivery error # # From: Bodo Stroesser # # If the user stack limit is reached or the signal stack assigned with # sigaltstack() is invalid when a user signal handler with SA_ONSTACK has to be # started, the signal mask of the interrupted user program is modified. This # happens because the mask, that should be used with the handler only, is # written to "current->blocked" even if the handler could not be started. But # without a handler, no rewrite of the original mask at sys_sigreturn will be # done. # # A slightly different case is sys_sigsuspend(), where the mask is already # modified when kern_do_signal() is started. "*oldset" and "current->blocked" # are not equal here and thus current->blocked has to be set to *oldset, if an # error occurs in handle_signal(). # # For both cases I've written small tests, and with the patch the result is OK. # This issue is relevant for other architectures too (e.g. i386, I've seen). # # Signed-off-by: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/signal_kern.c # 2004/11/15 19:29:17-08:00 jdike@addtoit.com +8 -4 # uml: fix signal mask on delivery error # # ChangeSet # 2004/11/15 20:02:38-08:00 jdike@addtoit.com # [PATCH] uml: make signal frame construction more resemble x86 # # From: Bodo Stroesser # # This makes the UML signal frame construction interface somewhat more similar # to x86 than before. Also, some small code cleanup, and checking for errors # before changing the signal mask in the SA_NODEFER case. # # Signed-off-by: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/signal_kern.c # 2004/11/15 19:29:17-08:00 jdike@addtoit.com +4 -16 # uml: make signal frame construction more resemble x86 # # arch/um/kernel/frame_kern.c # 2004/11/15 19:29:17-08:00 jdike@addtoit.com +16 -7 # uml: make signal frame construction more resemble x86 # # arch/um/include/frame_kern.h # 2004/11/15 19:29:17-08:00 jdike@addtoit.com +2 -4 # uml: make signal frame construction more resemble x86 # # ChangeSet # 2004/11/15 20:02:26-08:00 jdike@addtoit.com # [PATCH] uml: fix setting of interrupted syscall return value # # From: Bodo Stroesser # # handle_signal now checks whether it is being called from a system call # invocation. # # Signed-off-by: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/signal_kern.c # 2004/11/15 19:29:17-08:00 jdike@addtoit.com +19 -27 # uml: fix setting of interrupted syscall return value # # ChangeSet # 2004/11/15 20:02:13-08:00 jdike@addtoit.com # [PATCH] uml: handle_signal simplification # # From: Bodo Stroesser # # Move the signal delivery code around to eliminate a couple of temporary # variables. # # Signed-off-by: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/signal_kern.c # 2004/11/15 19:29:16-08:00 jdike@addtoit.com +17 -23 # uml: handle_signal simplification # # ChangeSet # 2004/11/15 20:02:00-08:00 jdike@addtoit.com # [PATCH] uml: redundant argument removal from handle_signal # # From: Bodo Stroesser # # Change the interface to handle_signal so that it doesn't take the system call # return value as an argument and eliminate its return value. # # kern_do_signal also now doesn't return immediately after determining that # there is no signal to deliver. # # Signed-off-by: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/signal_kern.c # 2004/11/15 19:29:16-08:00 jdike@addtoit.com +9 -10 # uml: redundant argument removal from handle_signal # # ChangeSet # 2004/11/15 20:01:50-08:00 jdike@addtoit.com # [PATCH] uml: redundant code removal from signal delivery # # From: Bodo Stroesser # # Change the do_signal interface to eliminate its argument. Also, remove the # calls from the system call handlers since they are redundant. In all cases, # pending signals are checked for in the interrupt handler. # # Temporarily, do_signal passes the current error to kern_do_signal. # # Signed-off-by: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/tt/syscall_user.c # 2004/11/15 19:29:16-08:00 jdike@addtoit.com +0 -7 # uml: redundant code removal from signal delivery # # arch/um/kernel/skas/syscall_user.c # 2004/11/15 19:29:16-08:00 jdike@addtoit.com +0 -7 # uml: redundant code removal from signal delivery # # arch/um/kernel/signal_kern.c # 2004/11/15 19:29:16-08:00 jdike@addtoit.com +3 -2 # uml: redundant code removal from signal delivery # # arch/um/kernel/process_kern.c # 2004/11/15 19:29:16-08:00 jdike@addtoit.com +1 -1 # uml: redundant code removal from signal delivery # # arch/um/include/kern_util.h # 2004/11/15 19:29:16-08:00 jdike@addtoit.com +1 -1 # uml: redundant code removal from signal delivery # # ChangeSet # 2004/11/15 20:01:37-08:00 jdike@addtoit.com # [PATCH] uml: don't rule out syscall_nr == 0 # # From: Bodo Stroesser # # Change the valid system call numbers to reflect the possibility that we could # have __NR_restart_syscall. # # Signed-off-by: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/tt/syscall_user.c # 2004/11/15 19:29:15-08:00 jdike@addtoit.com +2 -1 # uml: don't rule out syscall_nr == 0 # # arch/um/kernel/skas/process.c # 2004/11/15 19:29:15-08:00 jdike@addtoit.com +1 -1 # uml: don't rule out syscall_nr == 0 # # ChangeSet # 2004/11/15 20:01:24-08:00 jdike@addtoit.com # [PATCH] uml: 64-bit type cleanups # # 64-bit cleanliness - Fix the number of bits of the time_t field in the COW # header to be 32 and change an int to a longs. # # Signed-off-by: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/process_kern.c # 2004/11/15 19:29:15-08:00 jdike@addtoit.com +2 -1 # uml: 64-bit type cleanups # # arch/um/include/kern_util.h # 2004/11/15 19:29:15-08:00 jdike@addtoit.com +1 -1 # uml: 64-bit type cleanups # # arch/um/drivers/cow_user.c # 2004/11/15 19:29:15-08:00 jdike@addtoit.com +1 -1 # uml: 64-bit type cleanups # # ChangeSet # 2004/11/15 20:01:12-08:00 jdike@addtoit.com # [PATCH] uml: 64-bit cleanups in the system calls # # 64-bit cleanup - this fixes the return values of the system calls to be longs. # # Signed-off-by: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-um/unistd.h # 2004/11/15 19:29:15-08:00 jdike@addtoit.com +3 -4 # uml: 64-bit cleanups in the system calls # # arch/um/kernel/syscall_user.c # 2004/11/15 19:29:15-08:00 jdike@addtoit.com +2 -2 # uml: 64-bit cleanups in the system calls # # arch/um/kernel/syscall_kern.c # 2004/11/15 19:29:15-08:00 jdike@addtoit.com +8 -8 # uml: 64-bit cleanups in the system calls # # arch/um/kernel/signal_kern.c # 2004/11/15 19:29:15-08:00 jdike@addtoit.com +5 -5 # uml: 64-bit cleanups in the system calls # # arch/um/kernel/ptrace.c # 2004/11/15 19:29:15-08:00 jdike@addtoit.com +1 -1 # uml: 64-bit cleanups in the system calls # # arch/um/kernel/exec_kern.c # 2004/11/15 19:29:15-08:00 jdike@addtoit.com +7 -7 # uml: 64-bit cleanups in the system calls # # arch/um/include/syscall_user.h # 2004/11/15 19:29:15-08:00 jdike@addtoit.com +1 -1 # uml: 64-bit cleanups in the system calls # # ChangeSet # 2004/11/15 20:01:00-08:00 jdike@addtoit.com # [PATCH] uml: signal bug fix # # This patch fixes a bug introduced in the last batch of signal fixes. The # system call return value should only be reset if called diectly from a # system call, i.e. sigsuspend. The fixes added earlier caused any # interrupted non-zero system call return to be reset, confusing fork and # vfork, among others. # # Signed-off-by: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/signal_kern.c # 2004/11/15 19:29:15-08:00 jdike@addtoit.com +11 -10 # uml: signal bug fix # # ChangeSet # 2004/11/15 20:00:47-08:00 takata@linux-m32r.org # [PATCH] m32r: update dot.gdbinit files # # This patch is for updating GDB initalization files (dot.gdbinit*) # for all m32r target boards. # # Currently, part of dot.gdbinit* files are maintained by using # a "gen_gdbinit" script. # http://www.linux-m32r.org/eng/download.html#othertools # # Signed-off-by: Hirokazu Takata # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/m32r/mappi2/dot.gdbinit.vdec2 # 2004/11/15 19:29:14-08:00 takata@linux-m32r.org +233 -0 # m32r: update dot.gdbinit files # # arch/m32r/m32700ut/dot.gdbinit_400MHz_32MB # 2004/11/15 19:29:14-08:00 takata@linux-m32r.org +249 -0 # m32r: update dot.gdbinit files # # arch/m32r/opsput/dot.gdbinit # 2004/11/15 19:29:14-08:00 takata@linux-m32r.org +57 -19 # m32r: update dot.gdbinit files # # arch/m32r/oaks32r/dot.gdbinit.nommu # 2004/11/15 19:29:14-08:00 takata@linux-m32r.org +7 -8 # m32r: update dot.gdbinit files # # arch/m32r/mappi2/dot.gdbinit.vdec2 # 2004/11/15 19:29:14-08:00 takata@linux-m32r.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/m32r/mappi2/dot.gdbinit.vdec2 # # arch/m32r/mappi/dot.gdbinit # 2004/11/15 19:29:14-08:00 takata@linux-m32r.org +8 -8 # m32r: update dot.gdbinit files # # arch/m32r/mappi/dot.gdbinit.smp # 2004/11/15 19:29:14-08:00 takata@linux-m32r.org +6 -6 # m32r: update dot.gdbinit files # # arch/m32r/mappi/dot.gdbinit.nommu # 2004/11/15 19:29:14-08:00 takata@linux-m32r.org +3 -3 # m32r: update dot.gdbinit files # # arch/m32r/m32700ut/dot.gdbinit_400MHz_32MB # 2004/11/15 19:29:14-08:00 takata@linux-m32r.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/m32r/m32700ut/dot.gdbinit_400MHz_32MB # # arch/m32r/m32700ut/dot.gdbinit_300MHz_32MB # 2004/11/15 19:29:14-08:00 takata@linux-m32r.org +12 -12 # m32r: update dot.gdbinit files # # arch/m32r/m32700ut/dot.gdbinit_200MHz_16MB # 2004/11/15 19:29:14-08:00 takata@linux-m32r.org +7 -7 # m32r: update dot.gdbinit files # # ChangeSet # 2004/11/15 20:00:34-08:00 takata@linux-m32r.org # [PATCH] m32r: update defconfig files # # Signed-off-by: Hirokazu Takata # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/m32r/mappi2/defconfig.vdec2 # 2004/11/15 19:29:14-08:00 takata@linux-m32r.org +698 -0 # m32r: update defconfig files # # arch/m32r/opsput/defconfig.opsput # 2004/11/15 19:29:14-08:00 takata@linux-m32r.org +89 -25 # m32r: update defconfig files # # arch/m32r/oaks32r/defconfig.nommu # 2004/11/15 19:29:14-08:00 takata@linux-m32r.org +74 -19 # m32r: update defconfig files # # arch/m32r/mappi2/defconfig.vdec2 # 2004/11/15 19:29:14-08:00 takata@linux-m32r.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/m32r/mappi2/defconfig.vdec2 # # arch/m32r/mappi/defconfig.up # 2004/11/15 19:29:14-08:00 takata@linux-m32r.org +83 -21 # m32r: update defconfig files # # arch/m32r/mappi/defconfig.smp # 2004/11/15 19:29:14-08:00 takata@linux-m32r.org +83 -21 # m32r: update defconfig files # # arch/m32r/mappi/defconfig.nommu # 2004/11/15 19:29:14-08:00 takata@linux-m32r.org +89 -20 # m32r: update defconfig files # # arch/m32r/m32700ut/defconfig.m32700ut.up # 2004/11/15 19:29:14-08:00 takata@linux-m32r.org +95 -35 # m32r: update defconfig files # # arch/m32r/m32700ut/defconfig.m32700ut.smp # 2004/11/15 19:29:14-08:00 takata@linux-m32r.org +95 -35 # m32r: update defconfig files # # arch/m32r/defconfig # 2004/11/15 19:29:14-08:00 takata@linux-m32r.org +118 -34 # m32r: update defconfig files # # ChangeSet # 2004/11/15 20:00:21-08:00 takata@linux-m32r.org # [PATCH] m32r: CF boot support for Mappi2 # # - Update io_mappi2.c to access a CF device as an IDE disk device # for Mappi2 eva board. # # - Please set CONFIG_M32R_CFC=n, when you use m32r-g00ff for CF boot. # # Signed-off-by: NIIBE Yutaka # Signed-off-by: Hirokazu Takata # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-m32r/ide.h # 2004/11/15 19:29:14-08:00 takata@linux-m32r.org +1 -1 # m32r: CF boot support for Mappi2 # # arch/m32r/kernel/setup_mappi2.c # 2004/11/15 19:29:14-08:00 takata@linux-m32r.org +1 -1 # m32r: CF boot support for Mappi2 # # arch/m32r/kernel/io_mappi2.c # 2004/11/15 19:29:14-08:00 takata@linux-m32r.org +92 -17 # m32r: CF boot support for Mappi2 # # arch/m32r/kernel/io_m32700ut.c # 2004/11/15 19:29:14-08:00 takata@linux-m32r.org +3 -3 # m32r: CF boot support for Mappi2 # # ChangeSet # 2004/11/15 20:00:08-08:00 takata@linux-m32r.org # [PATCH] m32r: update for m32r-g00ff # # This patchset was originally from NIIBE Yutaka. # # These patch update the m32r kernel for a new bootloader "m32r-g00ff". The # "m32r-g00ff" has been written and developed by NIIBE Yutaka, and released # under the GPL from http://www.gniibe.org/. # # So far, it supports two types of booting operations, # CF boot and Network boot (HTTP boot). # # * CF boot - boot from CompactFlash or Microdrive(TM) # We can boot a kernel from CF device. # To make use of m32r-g00ff, we just put a first stage IPL(initial program # loader) into a flash memory, and a secondary bootloader into CF media device. # Currently, LILO-21.4.4 can be used to write m32r-g00ff into the boot sector # of CF device on a cross development environment. # # * HTTP boot - boot via network with HTTP protocol # By using m32r-g00ff, we can download and boot a kernel image from # a web-server. The m32r-g00ff downloads a kernel image from a given URL, # resolving the webserver's IP address by DNS. # As a preparation, we just place a secondary bootloader binary and # a kernel image on the webserver. # # - Position-independent zImage support; # this aims at removing constraints of zImage(vmlinuz)'s location. # # Signed-off-by: NIIBE Yutaka # Signed-off-by: Hirokazu Takata # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/m32r/boot/setup.S # 2004/11/15 19:29:13-08:00 takata@linux-m32r.org +1 -1 # m32r: update for m32r-g00ff # # arch/m32r/boot/compressed/vmlinux.scr # 2004/11/15 19:29:13-08:00 takata@linux-m32r.org +3 -3 # m32r: update for m32r-g00ff # # arch/m32r/boot/compressed/vmlinux.lds.S # 2004/11/15 19:29:13-08:00 takata@linux-m32r.org +12 -4 # m32r: update for m32r-g00ff # # arch/m32r/boot/compressed/misc.c # 2004/11/15 19:29:13-08:00 takata@linux-m32r.org +21 -34 # m32r: update for m32r-g00ff # # arch/m32r/boot/compressed/m32r_sio.c # 2004/11/15 19:29:13-08:00 takata@linux-m32r.org +17 -7 # m32r: update for m32r-g00ff # # arch/m32r/boot/compressed/head.S # 2004/11/15 19:29:13-08:00 takata@linux-m32r.org +74 -22 # m32r: update for m32r-g00ff # # arch/m32r/boot/compressed/Makefile # 2004/11/15 19:29:13-08:00 takata@linux-m32r.org +4 -2 # m32r: update for m32r-g00ff # # ChangeSet # 2004/11/15 19:59:56-08:00 ysato@users.sourceforge.jp # [PATCH] H8/300: vmlinux.lds.S update # # - duplicate define section delete. # # - fix CONFIG_ROMKERNEL. # # Signed-off-by: Yoshinori Sato # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/h8300/kernel/vmlinux.lds.S # 2004/11/15 19:29:13-08:00 ysato@users.sourceforge.jp +14 -15 # H8/300: vmlinux.lds.S update # # ChangeSet # 2004/11/15 19:59:43-08:00 ysato@users.sourceforge.jp # [PATCH] H8/300: read{b,w,l} / write{b,w,l} error fix # # read{b,w,l} and write{b,w,l} compile error fix. # # Signed-off-by: Yoshinori Sato # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-h8300/io.h # 2004/11/15 19:29:13-08:00 ysato@users.sourceforge.jp +15 -6 # H8/300: read{b,w,l} / write{b,w,l} error fix # # ChangeSet # 2004/11/15 19:59:30-08:00 ysato@users.sourceforge.jp # [PATCH] H8/300: signal handling update # # Signed-off-by: Yoshinori Sato # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-h8300/unistd.h # 2004/11/15 19:29:13-08:00 ysato@users.sourceforge.jp +1 -0 # H8/300: signal handling update # # include/asm-h8300/ucontext.h # 2004/11/15 19:29:13-08:00 ysato@users.sourceforge.jp +1 -12 # H8/300: signal handling update # # include/asm-h8300/signal.h # 2004/11/15 19:29:13-08:00 ysato@users.sourceforge.jp +2 -0 # H8/300: signal handling update # # include/asm-h8300/sigcontext.h # 2004/11/15 19:29:13-08:00 ysato@users.sourceforge.jp +2 -0 # H8/300: signal handling update # # arch/h8300/platform/h8s/entry.S # 2004/11/15 19:29:13-08:00 ysato@users.sourceforge.jp +3 -3 # H8/300: signal handling update # # arch/h8300/platform/h8300h/entry.S # 2004/11/15 19:29:13-08:00 ysato@users.sourceforge.jp +3 -3 # H8/300: signal handling update # # arch/h8300/kernel/signal.c # 2004/11/15 19:29:13-08:00 ysato@users.sourceforge.jp +167 -253 # H8/300: signal handling update # # ChangeSet # 2004/11/15 19:59:18-08:00 ysato@users.sourceforge.jp # [PATCH] H8/300: /proc/cpuinfo typo fix # # Signed-off-by: Yoshinori Sato # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/h8300/kernel/setup.c # 2004/11/15 19:29:13-08:00 ysato@users.sourceforge.jp +1 -1 # H8/300: /proc/cpuinfo typo fix # # ChangeSet # 2004/11/15 19:59:05-08:00 rddunlap@osdl.org # [PATCH] x86_64 hpet: fix function warning # # put function prototype outside of #ifdef block, to fix: # arch/x86_64/kernel/time.c:941: warning: implicit declaration of # function `oem_force_hpet_timer' # # Signed-off-by: Randy Dunlap # Cc: # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/hpet.h # 2004/11/15 19:29:12-08:00 rddunlap@osdl.org +1 -1 # x86_64 hpet: fix function warning # # ChangeSet # 2004/11/15 19:58:52-08:00 macro@linux-mips.org # [PATCH] i386: apic_printk() used before initialized # # Both detect_init_APIC() and init_apic_mappings() it's called from are # invoked early, before the command line has been processed. Therefore its # meaningless to call apic_printk() from them as that depends on # apic_verbosity which is initialized from the command line. # # I could move apic_verbosity initialization to parse_cmdline_early(), but I # think that would be an overkill, the point being we are initerested in # feedback from detect_init_APIC() anyway. Without that it's hard to tell # what's really going on as it's been the case with the recent report of the # local APIC being non-functional despite the whole setup being apparently # correct. So I converted these calls to ordinary printk() invocations. The # init_apic_mappings() are less interesting, so I've made them output at the # debug level. # # While at it I've made some obvious nearby formatting clean-up. # # Signed-off-by: Maciej W. Rozycki # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/kernel/apic.c # 2004/11/15 19:29:12-08:00 macro@linux-mips.org +14 -14 # i386: apic_printk() used before initialized # # ChangeSet # 2004/11/15 19:58:40-08:00 fenghua.yu@intel.com # [PATCH] add cpu_relax() in spin loops & clean up barrier() # # The patch adds cpu_relax() in the body of some spin loops for 2.6.9. The # patch also removes redundant barrier() code after cpu_relax() on ia32. # # In the PAUSE instruction section, IA32 SDM claims "it is recommended that a # PASUE instruction be placed in all spin-wait loops". And x86_64 SDM says # that PAUSE instruction is same as legacy mode in IA-32e mode operation. # # This patch is against 2.6.9 (kernel.org). It was tested on ia32 and # x86_64. # # Acked-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-i386/apic.h # 2004/11/15 19:29:12-08:00 fenghua.yu@intel.com +2 -1 # add cpu_relax() in spin loops & clean up barrier() # # arch/x86_64/kernel/smp.c # 2004/11/15 19:29:12-08:00 fenghua.yu@intel.com +2 -2 # add cpu_relax() in spin loops & clean up barrier() # # arch/i386/kernel/smp.c # 2004/11/15 19:29:12-08:00 fenghua.yu@intel.com +2 -2 # add cpu_relax() in spin loops & clean up barrier() # # arch/i386/kernel/cpu/mtrr/main.c # 2004/11/15 19:29:12-08:00 fenghua.yu@intel.com +9 -15 # add cpu_relax() in spin loops & clean up barrier() # # ChangeSet # 2004/11/15 19:58:27-08:00 sfr@canb.auug.org.au # [PATCH] ppc64: add missing braces to rtc driver # # This patch fixes the PPC64 rtc driver where a pair of braces was missing. # Not a big bug, but a bug none the less. Also, while I was there, use C99 # initialisers. # # Signed-off-by: Stephen Rothwell # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/rtc.c # 2004/11/15 19:29:12-08:00 sfr@canb.auug.org.au +7 -6 # ppc64: add missing braces to rtc driver # # ChangeSet # 2004/11/15 19:58:14-08:00 sfr@canb.auug.org.au # [PATCH] ppc64 iSeries: don't share request queues in viocd # # This patch fixes the virtual cdrom driver to not share a single request # queue. Sharing the queue causes an oops if you remove the module and more # than one cdrom exists. # # Signed-off-by: Stephen Rothwell # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/cdrom/viocd.c # 2004/11/15 19:29:11-08:00 sfr@canb.auug.org.au +36 -20 # ppc64 iSeries: don't share request queues in viocd # # ChangeSet # 2004/11/15 19:58:02-08:00 paulus@samba.org # [PATCH] PPC64 rtasd: window when error_log_cnt could get zeroed # # This patch is from Jake Moilanen . # # There appears to be a hole that if we get an log_error() call, that we could # zero out our error log count in nvram. # # When rtasd() starts up, it turns on the logging via 'no_more_logging = 0'. If # we get a log_error() call after that is set but before nvram_read_error_log # has actually read nvram to set error_log_cnt, the log_error() call will write # back to nvram a uninitialized error_log_cnt value, and wipe out our sequence # number. # # To close the hole, simply move the 'no_more_logging = 0' till after nvram sets # error_log_cnt but before pSeries_log_error is called. # # I also changed the 'no_more_logging' variable to be 'no_logging' since it's # not only used when we stop logging now. I also removed the "volatile" part of # no_more_logging, since it's unneeded. # # Signed-off-by: Jake Moilanen # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/rtasd.c # 2004/11/15 19:29:11-08:00 paulus@samba.org +9 -8 # PPC64 rtasd: window when error_log_cnt could get zeroed # # arch/ppc64/kernel/nvram.c # 2004/11/15 19:29:11-08:00 paulus@samba.org +4 -4 # PPC64 rtasd: window when error_log_cnt could get zeroed # # ChangeSet # 2004/11/15 19:57:49-08:00 paulus@samba.org # [PATCH] PPC64 call ibm,os-term only if its available # # This patch is from Olaf Hering. # # The rtas property 'ibm,os-term' is not available on JS20, a panic will print: # # unable to mount root filesystem on /dev/hda # Kernel panic - not syncing: Attempted to kill init! # <0>ibm,os-term call failed -1 # Rebooting in 42 seconds.. # # Signed-off-by: Olaf Hering # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/rtas.c # 2004/11/15 19:29:11-08:00 paulus@samba.org +3 -0 # PPC64 call ibm,os-term only if its available # # ChangeSet # 2004/11/15 19:57:36-08:00 anton@samba.org # [PATCH] ppc64: cleanups hpte_init_native, kill warning for !PSERIES builds # # From: Christoph Hellwig # # This splits out a small helper that checks whether tlb batching should be # enabled from hpte_init_native, thus cleaning up the ifdef hell and killing # a warning for pmac builds. # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/mm/hash_native.c # 2004/11/15 19:29:11-08:00 anton@samba.org +25 -21 # ppc64: cleanups hpte_init_native, kill warning for !PSERIES builds # # ChangeSet # 2004/11/15 19:57:23-08:00 anton@samba.org # [PATCH] ppc64: alloc_bootmem returns void * # # As Andrew points out, there is no need for casts since alloc_bootmem # returns void*. # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pmac_pci.c # 2004/11/15 19:29:10-08:00 anton@samba.org +4 -4 # ppc64: alloc_bootmem returns void * # # arch/ppc64/kernel/pSeries_pci.c # 2004/11/15 19:29:10-08:00 anton@samba.org +3 -3 # ppc64: alloc_bootmem returns void * # # arch/ppc64/kernel/mpic.c # 2004/11/15 19:29:10-08:00 anton@samba.org +1 -1 # ppc64: alloc_bootmem returns void * # # arch/ppc64/kernel/maple_pci.c # 2004/11/15 19:29:10-08:00 anton@samba.org +3 -3 # ppc64: alloc_bootmem returns void * # # ChangeSet # 2004/11/15 19:57:11-08:00 anton@samba.org # [PATCH] ppc64: get_phb_reg_prop only required on python PCI machines # # get_phb_reg_prop was only used for python PCI machines, so remove it from # common code and call it from there. # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pSeries_pci.c # 2004/11/15 19:29:10-08:00 anton@samba.org +29 -29 # ppc64: get_phb_reg_prop only required on python PCI machines # # ChangeSet # 2004/11/15 19:56:58-08:00 anton@samba.org # [PATCH] ppc64: remove BUG()s in pcibios_fixup_bus # # BUG() on missing IO or memory resources in pcibios_fixup_bus is rude, remove # it. Also use list_for_each_entry. # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pci.c # 2004/11/15 19:29:10-08:00 anton@samba.org +2 -12 # ppc64: remove BUG()s in pcibios_fixup_bus # # ChangeSet # 2004/11/15 19:56:46-08:00 anton@samba.org # [PATCH] ppc64: OF overrides for pci_probe_only, pci_assign_all_buses # # Allow pci_probe_only and pci_assign_all_buses to be modified via OF # properties. # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pSeries_pci.c # 2004/11/15 19:29:10-08:00 anton@samba.org +18 -0 # ppc64: OF overrides for pci_probe_only, pci_assign_all_buses # # ChangeSet # 2004/11/15 19:56:33-08:00 anton@samba.org # [PATCH] ppc64: remove duplication in pci_alloc_* # # We duplicated the code in pci_alloc_pci_controller twice and had an ifdef for # iseries as well, just to select between kmalloc and bootmem memory. Change # this so we instead pass the allocation into a common function - # pci_setup_pci_controller. # # Also use a spinlock around the host_list and global_phb_number code since we # now can modify it at runtime via hotplug. # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pmac_pci.c # 2004/11/15 19:29:09-08:00 anton@samba.org +5 -3 # ppc64: remove duplication in pci_alloc_* # # arch/ppc64/kernel/pci.h # 2004/11/15 19:29:09-08:00 anton@samba.org +1 -2 # ppc64: remove duplication in pci_alloc_* # # arch/ppc64/kernel/pci.c # 2004/11/15 19:29:09-08:00 anton@samba.org +5 -40 # ppc64: remove duplication in pci_alloc_* # # arch/ppc64/kernel/pSeries_pci.c # 2004/11/15 19:29:09-08:00 anton@samba.org +41 -40 # ppc64: remove duplication in pci_alloc_* # # arch/ppc64/kernel/maple_pci.c # 2004/11/15 19:29:09-08:00 anton@samba.org +5 -3 # ppc64: remove duplication in pci_alloc_* # # arch/ppc64/kernel/iSeries_pci.c # 2004/11/15 19:29:09-08:00 anton@samba.org +5 -2 # ppc64: remove duplication in pci_alloc_* # # ChangeSet # 2004/11/15 19:56:20-08:00 anton@samba.org # [PATCH] ppc64: make fixup_winbond_82c105 pseries specific # # The winbond irq fixup is pSeries specific. Move it into pSeries_pci.c # and check for PLATFORM_PSERIES. # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pci.c # 2004/11/15 19:29:09-08:00 anton@samba.org +0 -24 # ppc64: make fixup_winbond_82c105 pseries specific # # arch/ppc64/kernel/pSeries_pci.c # 2004/11/15 19:29:09-08:00 anton@samba.org +27 -0 # ppc64: make fixup_winbond_82c105 pseries specific # # ChangeSet # 2004/11/15 19:56:10-08:00 anton@samba.org # [PATCH] ppc64: remove phb_set_model # # phb_set_model does a lot of work just to set up a text string that almost # nothing uses. Replace this all with an is_python() check. # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/pci-bridge.h # 2004/11/15 19:29:09-08:00 anton@samba.org +0 -10 # ppc64: remove phb_set_model # # arch/ppc64/kernel/pmac_pci.c # 2004/11/15 19:29:09-08:00 anton@samba.org +1 -1 # ppc64: remove phb_set_model # # arch/ppc64/kernel/pci.h # 2004/11/15 19:29:09-08:00 anton@samba.org +4 -3 # ppc64: remove phb_set_model # # arch/ppc64/kernel/pci.c # 2004/11/15 19:29:09-08:00 anton@samba.org +2 -41 # ppc64: remove phb_set_model # # arch/ppc64/kernel/pSeries_pci.c # 2004/11/15 19:29:09-08:00 anton@samba.org +14 -37 # ppc64: remove phb_set_model # # arch/ppc64/kernel/maple_pci.c # 2004/11/15 19:29:09-08:00 anton@samba.org +1 -1 # ppc64: remove phb_set_model # # arch/ppc64/kernel/iSeries_pci.c # 2004/11/15 19:29:09-08:00 anton@samba.org +1 -1 # ppc64: remove phb_set_model # # ChangeSet # 2004/11/15 19:55:57-08:00 anton@samba.org # [PATCH] ppc64: pci cleanup # # Cleanup ppc64 pci code. # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pmac_pci.c # 2004/11/15 19:29:09-08:00 anton@samba.org +0 -3 # ppc64: pci cleanup # # arch/ppc64/kernel/pci.h # 2004/11/15 19:29:09-08:00 anton@samba.org +3 -6 # ppc64: pci cleanup # # arch/ppc64/kernel/pci.c # 2004/11/15 19:29:09-08:00 anton@samba.org +21 -43 # ppc64: pci cleanup # # arch/ppc64/kernel/pSeries_pci.c # 2004/11/15 19:29:09-08:00 anton@samba.org +6 -9 # ppc64: pci cleanup # # arch/ppc64/kernel/maple_pci.c # 2004/11/15 19:29:09-08:00 anton@samba.org +1 -4 # ppc64: pci cleanup # # arch/ppc64/kernel/iSeries_pci.c # 2004/11/15 19:29:09-08:00 anton@samba.org +0 -1 # ppc64: pci cleanup # # ChangeSet # 2004/11/15 19:55:46-08:00 anton@samba.org # [PATCH] ppc64: reduce ifdef clutter in arch/ppc64/kernel/sysfs.c # # From: Christoph Hellwig # # Reduce ifdef clutter in arch/ppc64/kernel/sysfs.c # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/sysfs.c # 2004/11/15 19:29:08-08:00 anton@samba.org +9 -15 # ppc64: reduce ifdef clutter in arch/ppc64/kernel/sysfs.c # # ChangeSet # 2004/11/15 19:55:34-08:00 anton@samba.org # [PATCH] ppc64: avoid 32bit only syscalls in unistd.h # # Steve Munroe points out that ppc64 glibc builds stubs for a number of 32bit # only syscalls. While none of them exist in the kernel syscall table, their # existence in unistd.h means glibc still tries to use them then falls back # onto the 64bit safe versions. # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/unistd.h # 2004/11/15 19:29:08-08:00 anton@samba.org +9 -9 # ppc64: avoid 32bit only syscalls in unistd.h # # ChangeSet # 2004/11/15 19:55:21-08:00 anton@samba.org # [PATCH] ppc64: Use pci_device_to_OF_node # # PCI_GET_DN() doesnt check to see if ->sysdata has been initialised # correctly - we should instead use pci_device_to_OF_node. Leave # PCI_GET_DN() in the one performance critical case (iommu table lookup in # pci DMA functions). In this case ->sysdata is guaranteed to have been # initialised by the iommu setup code. # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/pci-bridge.h # 2004/11/15 19:29:08-08:00 anton@samba.org +0 -5 # ppc64: Use pci_device_to_OF_node # # arch/ppc64/kernel/pci_iommu.c # 2004/11/15 19:29:08-08:00 anton@samba.org +7 -0 # ppc64: Use pci_device_to_OF_node # # arch/ppc64/kernel/pSeries_iommu.c # 2004/11/15 19:29:08-08:00 anton@samba.org +6 -2 # ppc64: Use pci_device_to_OF_node # # ChangeSet # 2004/11/15 19:55:09-08:00 anton@samba.org # [PATCH] ppc64: ratelimit some rtas errors # # Use printk_ratelimit() in rtc code to avoid flooding the kernel log buffer # with errors. Also use rtas_get_error_log_max() instead of duplicating it # in __fetch_rtas_last_error. # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/rtc.c # 2004/11/15 19:29:08-08:00 anton@samba.org +4 -4 # ppc64: ratelimit some rtas errors # # arch/ppc64/kernel/rtas.c # 2004/11/15 19:29:08-08:00 anton@samba.org +22 -26 # ppc64: ratelimit some rtas errors # # ChangeSet # 2004/11/15 19:54:56-08:00 david@gibson.dropbear.id.au # [PATCH] ppc64: Kill unused KRANGE_{START,END} macros # # Remove KRANGE_{START,END} macros from ppc64 code. These were not used # anywhere. Further KRANGE_END was misleading, since it implied a limit on # the linear mapping range based on the pagetable structure, whereas in fact # the linear mapping does not use a (Linux) pagetable at all. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/pgtable.h # 2004/11/15 19:29:08-08:00 david@gibson.dropbear.id.au +0 -6 # ppc64: Kill unused KRANGE_{START,END} macros # # ChangeSet # 2004/11/15 19:54:43-08:00 scheel@vnet.ibm.com # [PATCH] ppc64: iSeries legacy model emulation of PURR # # Here's a patch to extend the current Linux on Power support for PURR to # legacy IBM iSeries servers (pre-Power5 processor models). This patch # enables the reporting of timebase metrics to reflect physical processor # utilization in a system running multiple logical partitions which share the # same physical processors. # # The patch simply uses existing user interfaces for Linux IBM Power5 based # servers to report data already collected by the hypervisor. The values # reported with each call are running values in units of the system timebase. # The calculation of physical processor utilization results from two samples # (purr1 and purr2) differing by a know interval (time) such that: # # physical utilization = (purr2 - purr1) / (time * number of procs * # timebase) # # where the number of procs and timebase can be obtained from /proc/cpuinfo. # # Applications have been written to the interface already defined and these # applications have value back on the legacy iSeries models. # # Signed-off by: Jeff Scheel (scheel at vnet.ibm.com) # Signed-off-by: Stephen Rothwell # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/lparcfg.c # 2004/11/15 19:29:07-08:00 scheel@vnet.ibm.com +27 -1 # ppc64: iSeries legacy model emulation of PURR # # ChangeSet # 2004/11/15 19:54:31-08:00 trini@kernel.crashing.org # [PATCH] ppc32: Fix Motorola Sandpoint builds # # Motorola Sandpoint builds broke recently, as part of the pci_find_device # -> pci_get_device change. The following is the trivial fix. # # Signed-off-by: Tom Rini # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/platforms/sandpoint.c # 2004/11/15 19:29:07-08:00 trini@kernel.crashing.org +1 -1 # ppc32: Fix Motorola Sandpoint builds # # ChangeSet # 2004/11/15 19:54:18-08:00 hugh@veritas.com # [PATCH] tmpfs free_inodes leak # # When new_inode failed, shmem_get_inode forgot to restore free_inodes. # # Signed-off-by: Hugh Dickins # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/shmem.c # 2004/11/15 19:29:07-08:00 hugh@veritas.com +4 -0 # tmpfs free_inodes leak # # ChangeSet # 2004/11/15 19:54:05-08:00 hugh@veritas.com # [PATCH] low discontig highmem_start_page # # In the case of i386 CONFIG_DISCONTIGMEM CONFIG_HIGHMEM without highmem, # highmem_start_page was wrongly initialized (from a NULL zone_mem_map), # causing __change_page_attr to BUG on boot. # # Signed-off-by: Hugh Dickins # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/mm/discontig.c # 2004/11/15 19:29:07-08:00 hugh@veritas.com +1 -1 # low discontig highmem_start_page # # ChangeSet # 2004/11/15 19:53:53-08:00 piggin@cyberone.com.au # [PATCH] mm: tune the page allocator thresholds # # without patch: # pages_min pages_low pages_high # dma 4 8 12 # normal 234 468 702 # high 128 256 384 # # with patch: # pages_min pages_low pages_high # dma 17 21 25 # normal 939 1173 1408 # high 128 160 192 # # without patch: # | GFP_KERNEL | GFP_ATOMIC # allocate immediately | 9 dma, 469 norm | 9 dma, 469 norm # allocate after waking kswapd | 5 dma, 234 norm | 3 dma, 88 norm # allocate after synch reclaim | 5 dma, 234 norm | n/a # # with patch: # | GFP_KERNEL | GFP_ATOMIC # allocate immediately | 22 dma, 1174 norm | 22 dma, 1174 norm # allocate after waking kswapd | 18 dma, 940 norm | 6 dma, 440 norm # allocate after synch reclaim | 18 dma, 940 norm | n/a # # So the buffer between GFP_KERNEL and GFP_ATOMIC allocations is: # # 2.6.8 | 465 dma, 117 norm, 582 tot = 2328K # 2.6.10-rc | 2 dma, 146 norm, 148 tot = 592K # patch | 12 dma, 500 norm, 512 tot = 2048K # # Which is getting pretty good. # # kswap starts at: # 2.6.8 477 dma, 496 norm, 973 total # 2.6.10-rc 8 dma, 468 norm, 476 total # patched 17 dma, 939 norm, 956 total # # So in terms of total pages, that's looking similar to 2.6.8. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/page_alloc.c # 2004/11/15 19:29:07-08:00 piggin@cyberone.com.au +23 -18 # mm: tune the page allocator thresholds # # ChangeSet # 2004/11/15 19:53:40-08:00 ak@suse.de # [PATCH] x86-64: Fix get_user_pages access to vsyscall page # # The current kernel oopses on x86-64 when gdb steps into the vsyscall page. # This patch fixes it. # # I also removed the bogus NULL checks of *_offset and replaced them with # proper _none checks. I made them BUGs because vsyscall pages should be # always mapped. # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/memory.c # 2004/11/15 19:29:06-08:00 ak@suse.de +7 -11 # x86-64: Fix get_user_pages access to vsyscall page # # ChangeSet # 2004/11/15 18:53:03-08:00 herbert@gondor.apana.org.au # [IPV6]: Fix xfrm6_tunnel_check_size mtu calc. # # OK, let's make it the same as IPv4. This is still broken # as the calculation is wrong. However, to fix it properly # we need to store the MTUs inside the dst's. I'll get # around to that sooner or later. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/xfrm6_output.c # 2004/11/15 18:52:34-08:00 herbert@gondor.apana.org.au +1 -1 # [IPV6]: Fix xfrm6_tunnel_check_size mtu calc. # # OK, let's make it the same as IPv4. This is still broken # as the calculation is wrong. However, to fix it properly # we need to store the MTUs inside the dst's. I'll get # around to that sooner or later. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/15 15:53:41-08:00 davem@nuts.davemloft.net # [TG3]: Update driver version and reldate. # # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2004/11/15 15:53:08-08:00 davem@nuts.davemloft.net +2 -2 # [TG3]: Update driver version and reldate. # # ChangeSet # 2004/11/15 15:41:51-08:00 mchan@broadcom.com # [TG3]: 5753 support and a bug fix. # # Add support for 5753 chips which is mostly just adding # in the appropriate PCI ids and recognizing that these # chips do not use GPIO2 for Vaux switching. # # Also do not set DMA read water mark on PCI Express. # In such configurations these bits are reserved. # # Signed-off-by: David S. Miller # # include/linux/pci_ids.h # 2004/11/15 15:41:31-08:00 mchan@broadcom.com +5 -1 # [TG3]: 5753 support and a bug fix. # # Add support for 5753 chips which is mostly just adding # in the appropriate PCI ids and recognizing that these # chips do not use GPIO2 for Vaux switching. # # Also do not set DMA read water mark on PCI Express. # In such configurations these bits are reserved. # # Signed-off-by: David S. Miller # # drivers/net/tg3.h # 2004/11/15 15:41:31-08:00 mchan@broadcom.com +1 -0 # [TG3]: 5753 support and a bug fix. # # Add support for 5753 chips which is mostly just adding # in the appropriate PCI ids and recognizing that these # chips do not use GPIO2 for Vaux switching. # # Also do not set DMA read water mark on PCI Express. # In such configurations these bits are reserved. # # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2004/11/15 15:41:31-08:00 mchan@broadcom.com +50 -20 # [TG3]: 5753 support and a bug fix. # # Add support for 5753 chips which is mostly just adding # in the appropriate PCI ids and recognizing that these # chips do not use GPIO2 for Vaux switching. # # Also do not set DMA read water mark on PCI Express. # In such configurations these bits are reserved. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/15 15:15:08-08:00 Andries.Brouwer@cwi.nl # [PATCH] fix appletalk locking # # Just tried the new toy. It works. # # net/appletalk/ddp.c # 2004/11/15 13:33:43-08:00 Andries.Brouwer@cwi.nl +1 -1 # fix appletalk locking # # ChangeSet # 2004/11/15 15:12:04-08:00 davem@nuts.davemloft.net # Merge bk://212.42.230.204/nf-2.6 # into nuts.davemloft.net:/disk1/BK/net-2.6 # # net/ipv4/netfilter/ip_nat_core.c # 2004/11/15 15:11:53-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # ChangeSet # 2004/11/15 15:05:28-08:00 kaber@trash.net # [SCTP]: Fix inetaddr notifier chain corruption # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # net/sctp/protocol.c # 2004/11/15 15:05:08-08:00 kaber@trash.net +3 -3 # [SCTP]: Fix inetaddr notifier chain corruption # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # net/sctp/ipv6.c # 2004/11/15 15:05:08-08:00 kaber@trash.net +6 -3 # [SCTP]: Fix inetaddr notifier chain corruption # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/15 15:01:05-08:00 rusty@rustcorp.com.au # [NETFILTER]: Fix stack leakage in iptables # # Found running netfilter code under valgrind: we return some # uninitialized stack to userspace (needs root). Almost certainly # harmless, but this suppressed the valgrind complaint, and # doesn't hurt. # # Signed-off-by: Rusty Russell # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ip_tables.c # 2004/11/15 15:00:45-08:00 rusty@rustcorp.com.au +1 -1 # [NETFILTER]: Fix stack leakage in iptables # # Found running netfilter code under valgrind: we return some # uninitialized stack to userspace (needs root). Almost certainly # harmless, but this suppressed the valgrind complaint, and # doesn't hurt. # # Signed-off-by: Rusty Russell # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/15 14:59:52-08:00 rusty@rustcorp.com.au # [NETFILTER]: Cleanup find_appropriate_src() Fix # # The fix to find_appropriate_src left a stupid test, which has no # effect but is incoherent at best. It covers a corner case: if a # previous connection from this source was mapped onto a different IP # address (because it was explicitly told to), should the next one be # mapped that was as well, if no explicit rule says to remap the src IP? # # I think the answer is yes: unless the user explicitly tells us to map # into a particular range, we should follow the Kegel draft. # # Signed-off-by: Rusty Russell # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ip_nat_core.c # 2004/11/15 14:59:33-08:00 rusty@rustcorp.com.au +2 -5 # [NETFILTER]: Cleanup find_appropriate_src() Fix # # The fix to find_appropriate_src left a stupid test, which has no # effect but is incoherent at best. It covers a corner case: if a # previous connection from this source was mapped onto a different IP # address (because it was explicitly told to), should the next one be # mapped that was as well, if no explicit rule says to remap the src IP? # # I think the answer is yes: unless the user explicitly tells us to map # into a particular range, we should follow the Kegel draft. # # Signed-off-by: Rusty Russell # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/15 14:58:11-08:00 herbert@gondor.apana.org.au # [NETLINK]: Fix mc_list operations # # While doing the 2.4 version of the netlink patch, I noticed a bug # in my mc_list code. First of all it wasn't holding the table lock # when adding nodes to the list. It also didn't take the node off # the list when multicast is switched off. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/netlink/af_netlink.c # 2004/11/15 14:57:51-08:00 herbert@gondor.apana.org.au +9 -2 # [NETLINK]: Fix mc_list operations # # While doing the 2.4 version of the netlink patch, I noticed a bug # in my mc_list code. First of all it wasn't holding the table lock # when adding nodes to the list. It also didn't take the node off # the list when multicast is switched off. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/15 14:09:05-08:00 davem@nuts.davemloft.net # [IPV6]: Temp fix for ipv6 link-local address problem. # # Make sure loopback_dev, if up, has the ipv6 bits # for it setup before the addrconf netdev notifier # is registered. # # Signed-off-by: David S. Miller # # net/ipv6/addrconf.c # 2004/11/15 14:08:09-08:00 davem@nuts.davemloft.net +23 -0 # [IPV6]: Temp fix for ipv6 link-local address problem. # # ChangeSet # 2004/11/15 14:04:37-08:00 davem@nuts.davemloft.net # [AF_UNIX]: Serialize dgram read using semaphore just like stream. # # Signed-off-by: David S. Miller # # net/unix/af_unix.c # 2004/11/15 14:03:52-08:00 davem@nuts.davemloft.net +5 -1 # [AF_UNIX]: Serialize dgram read using semaphore just like stream. # # ChangeSet # 2004/11/15 22:03:23+01:00 kernel@linuxace.com # [NETFILTER]: revert MASQUERADE optimization for mostly static IPs # # Signed-off-by: Phil Oester # Signed-off-by: Patrick McHardy # # net/ipv4/netfilter/ipt_MASQUERADE.c # 2004/11/15 22:03:17+01:00 kernel@linuxace.com +36 -24 # [NETFILTER]: revert MASQUERADE optimization for mostly static IPs # # Signed-off-by: Phil Oester # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/11/15 21:28:15+01:00 kaber@coreworks.de # Merge coreworks.de:/home/kaber/src/nf/nf-2.6-ipq # into coreworks.de:/home/kaber/src/nf/nf-2.6 # # net/ipv6/netfilter/ip6_queue.c # 2004/11/15 21:28:11+01:00 kaber@coreworks.de +0 -0 # Auto merged # # include/linux/netdevice.h # 2004/11/15 21:28:11+01:00 kaber@coreworks.de +0 -0 # Auto merged # # ChangeSet # 2004/11/15 12:01:43-08:00 bgerst@quark.didntduck.org # [PATCH] Regparm for x86 machine check handlers # # The patch to change traps and interrupts to the fastcall convention # missed the machine check handlers. # # Signed-off-by: Brian Gerst # Signed-off-by: Linus Torvalds # # arch/i386/kernel/cpu/mcheck/winchip.c # 2004/11/06 16:15:01-08:00 bgerst@quark.didntduck.org +1 -1 # Regparm for x86 machine check handlers # # arch/i386/kernel/cpu/mcheck/p6.c # 2004/11/06 16:14:57-08:00 bgerst@quark.didntduck.org +1 -1 # Regparm for x86 machine check handlers # # arch/i386/kernel/cpu/mcheck/p5.c # 2004/11/06 16:14:52-08:00 bgerst@quark.didntduck.org +1 -1 # Regparm for x86 machine check handlers # # arch/i386/kernel/cpu/mcheck/p4.c # 2004/11/06 16:14:46-08:00 bgerst@quark.didntduck.org +1 -1 # Regparm for x86 machine check handlers # # arch/i386/kernel/cpu/mcheck/mce.h # 2004/11/06 16:15:18-08:00 bgerst@quark.didntduck.org +1 -1 # Regparm for x86 machine check handlers # # arch/i386/kernel/cpu/mcheck/mce.c # 2004/11/06 16:14:38-08:00 bgerst@quark.didntduck.org +2 -2 # Regparm for x86 machine check handlers # # arch/i386/kernel/cpu/mcheck/k7.c # 2004/11/06 16:14:22-08:00 bgerst@quark.didntduck.org +1 -1 # Regparm for x86 machine check handlers # # ChangeSet # 2004/11/15 19:46:58+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2247/1: S3C2410 - serial low-level updates # # Patch from Ben Dooks # # Move the configuration for the UART to use for the low-level # messages generated by the uncompressor out of the kernel debug # section, which means the system builds properly without having # kernel debug enabled. # # Also remove the use of including headers, # and the default configuration updates # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # include/asm-arm/arch-s3c2410/uncompress.h # 2004/11/15 15:27:40+00:00 ben-linux@org.rmk.(none) +3 -6 # [PATCH] 2247/1: S3C2410 - serial low-level updates # # arch/arm/configs/s3c2410_defconfig # 2004/11/15 15:31:58+00:00 ben-linux@org.rmk.(none) +2 -1 # [PATCH] 2247/1: S3C2410 - serial low-level updates # # arch/arm/configs/bast_defconfig # 2004/11/15 15:32:55+00:00 ben-linux@org.rmk.(none) +2 -1 # [PATCH] 2247/1: S3C2410 - serial low-level updates # # arch/arm/boot/compressed/head.S # 2004/11/15 15:34:34+00:00 ben-linux@org.rmk.(none) +1 -2 # [PATCH] 2247/1: S3C2410 - serial low-level updates # # ChangeSet # 2004/11/15 19:41:54+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2246/1: S3C2410 - rename i2c depending on 2410/2440 # # Patch from Ben Dooks # # Ensure the i2c platform device has the correct name if the # system is an s3c2440. # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # arch/arm/mach-s3c2410/s3c2440.c # 2004/11/15 15:05:26+00:00 ben-linux@org.rmk.(none) +5 -0 # [PATCH] 2246/1: S3C2410 - rename i2c depending on 2410/2440 # # ChangeSet # 2004/11/15 19:36:46+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2243/1: BAST - move pm init to init_machine # # Patch from Ben Dooks # # Move the pm code to use the machine's init_machine # code, instead of an late_initcall(). This change is # as-per the documentation, and means we do not need to # check for machine type in the init code. # # Thanks to Dimitry Andric for pointing this out # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # arch/arm/mach-s3c2410/mach-bast.c # 2004/11/15 12:53:56+00:00 ben-linux@org.rmk.(none) +6 -8 # [PATCH] 2243/1: BAST - move pm init to init_machine # # ChangeSet # 2004/11/15 19:31:26+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2242/1: BAST - default configuration update # # Patch from Ben Dooks # # Updates for the Simtec BAST (EB2410ITX) default configuration # to fix the following: # # - add mtd support for NAND and NOR # - remove PC style parallel port (does not build) # - use S3C2410 core RTC for time # - remove non-bast S3C2410 machines # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # arch/arm/configs/bast_defconfig # 2004/11/15 12:25:18+00:00 ben-linux@org.rmk.(none) +38 -21 # [PATCH] 2242/1: BAST - default configuration update # # ChangeSet # 2004/11/15 19:25:57+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2241/1: S3C2410 - default configuration update # # Patch from Ben Dooks # # updates to the default configuration to change the # following: # # - use S3C2410 internal rtc instead of PC style rtc # - add mtd support for nand # - add mtd support for nor (and bast nor mapping) # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # arch/arm/configs/s3c2410_defconfig # 2004/11/15 12:26:29+00:00 ben-linux@org.rmk.(none) +22 -8 # [PATCH] 2241/1: S3C2410 - default configuration update # # ChangeSet # 2004/11/15 19:20:42+00:00 rmk@flint.arm.linux.org.uk # [SERIAL] s3c2410: remove duplicate include # # drivers/serial/s3c2410.c # 2004/11/15 19:17:31+00:00 rmk@flint.arm.linux.org.uk +0 -1 # Remove duplicate include. # # ChangeSet # 2004/11/15 19:13:16+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2234/3: S3C2410 - new serial driver (1/4) # # Patch from Ben Dooks # # S3C2410/S3C2440 new serial driver # # this patch includes the following # # - clock selection using clock core # - handling for both 2410 and 2440 uarts # - uart suspend/resume support # - Dimitry Andric's fix for un-initialised spinlocks # - Herbert Poetzl's fixes for the following # -> break character recognition # -> Magic-SYSRQ handling # -> Uart software flow control (IrDA console) # # Updated to include rmk's comments from Patch #2234/1 # and fix a few checks for serial clocks, as well as # merging fixes from rmk that had taken time to go # through the biteepr to release. # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # include/asm-arm/arch-s3c2410/regs-serial.h # 2004/11/12 15:41:57+00:00 ben-linux@org.rmk.(none) +63 -29 # [PATCH] 2234/3: S3C2410 - new serial driver (1/4) # # drivers/serial/s3c2410.c # 2004/11/15 11:18:25+00:00 ben-linux@org.rmk.(none) +1109 -325 # [PATCH] 2234/3: S3C2410 - new serial driver (1/4) # # ChangeSet # 2004/11/14 18:57:08-08:00 jamie@shareable.org # [PATCH] revert recent futex_wait fix # # The patch was wrong. Back it out, and add some commentary explaining why we # need to run queue_me() prior to the get_user(). # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # ChangeSet # 2004/11/14 18:56:53-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] sparse: add -m64 to CHECKFLAGS on alpha and sparc64 # # Get the sizes right, and thus avoid complaints about big constants etc. # # ChangeSet # 2004/11/14 18:56:35-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] alpha sysrq compile fix # # missing extern declaration in -Werror land... Add the proper # declaration to sysrq.h. # # ChangeSet # 2004/11/15 04:05:17-02:00 acme@conectiva.com.br # [NET] Assign inet transport sockets to the right module # # This is another case where when all the protocols use sk->sk_prot # we can remove another member from struct sock, sk->sk_owner, instead # using the sk->sk_prot->owner, i.e. this property is not per socket # instance, but per protocol. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/sctp/socket.c # 2004/11/15 04:04:28-02:00 acme@conectiva.com.br +2 -0 # [NET] Assign inet transport sockets to the right module # # This is another case where when all the protocols use sk->sk_prot # we can remove another member from struct sock, sk->sk_owner, instead # using the sk->sk_prot->owner, i.e. this property is not per socket # instance, but per protocol. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/ipv6/udp.c # 2004/11/15 04:04:27-02:00 acme@conectiva.com.br +1 -0 # [NET] Assign inet transport sockets to the right module # # This is another case where when all the protocols use sk->sk_prot # we can remove another member from struct sock, sk->sk_owner, instead # using the sk->sk_prot->owner, i.e. this property is not per socket # instance, but per protocol. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/ipv6/tcp_ipv6.c # 2004/11/15 04:04:27-02:00 acme@conectiva.com.br +1 -0 # [NET] Assign inet transport sockets to the right module # # This is another case where when all the protocols use sk->sk_prot # we can remove another member from struct sock, sk->sk_owner, instead # using the sk->sk_prot->owner, i.e. this property is not per socket # instance, but per protocol. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/ipv6/raw.c # 2004/11/15 04:04:26-02:00 acme@conectiva.com.br +1 -0 # [NET] Assign inet transport sockets to the right module # # This is another case where when all the protocols use sk->sk_prot # we can remove another member from struct sock, sk->sk_owner, instead # using the sk->sk_prot->owner, i.e. this property is not per socket # instance, but per protocol. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/ipv6/af_inet6.c # 2004/11/15 04:04:26-02:00 acme@conectiva.com.br +1 -1 # [NET] Assign inet transport sockets to the right module # # This is another case where when all the protocols use sk->sk_prot # we can remove another member from struct sock, sk->sk_owner, instead # using the sk->sk_prot->owner, i.e. this property is not per socket # instance, but per protocol. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/ipv4/udp.c # 2004/11/15 04:04:25-02:00 acme@conectiva.com.br +1 -0 # [NET] Assign inet transport sockets to the right module # # This is another case where when all the protocols use sk->sk_prot # we can remove another member from struct sock, sk->sk_owner, instead # using the sk->sk_prot->owner, i.e. this property is not per socket # instance, but per protocol. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/ipv4/tcp_ipv4.c # 2004/11/15 04:04:25-02:00 acme@conectiva.com.br +1 -0 # [NET] Assign inet transport sockets to the right module # # This is another case where when all the protocols use sk->sk_prot # we can remove another member from struct sock, sk->sk_owner, instead # using the sk->sk_prot->owner, i.e. this property is not per socket # instance, but per protocol. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/ipv4/raw.c # 2004/11/15 04:04:23-02:00 acme@conectiva.com.br +1 -0 # [NET] Assign inet transport sockets to the right module # # This is another case where when all the protocols use sk->sk_prot # we can remove another member from struct sock, sk->sk_owner, instead # using the sk->sk_prot->owner, i.e. this property is not per socket # instance, but per protocol. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/ipv4/af_inet.c # 2004/11/15 04:04:22-02:00 acme@conectiva.com.br +1 -1 # [NET] Assign inet transport sockets to the right module # # This is another case where when all the protocols use sk->sk_prot # we can remove another member from struct sock, sk->sk_owner, instead # using the sk->sk_prot->owner, i.e. this property is not per socket # instance, but per protocol. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # include/net/sock.h # 2004/11/15 04:04:20-02:00 acme@conectiva.com.br +2 -0 # [NET] Assign inet transport sockets to the right module # # This is another case where when all the protocols use sk->sk_prot # we can remove another member from struct sock, sk->sk_owner, instead # using the sk->sk_prot->owner, i.e. this property is not per socket # instance, but per protocol. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # kernel/futex.c # 2004/11/14 18:43:57-08:00 jamie@shareable.org +24 -8 # revert recent futex_wait fix # # arch/sparc64/Makefile # 2004/11/13 23:10:47-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # sparse: add -m64 to CHECKFLAGS on alpha and sparc64 # # arch/alpha/Makefile # 2004/11/13 23:10:47-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # sparse: add -m64 to CHECKFLAGS on alpha and sparc64 # # include/linux/sysrq.h # 2004/11/14 17:12:05-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -0 # alpha sysrq compile fix # # ChangeSet # 2004/11/13 17:01:15+01:00 kaber@coreworks.de # [NETFILTER]: Fix invalid tcp/udp checksums within NATed icmp errors # # Signed-off-by: Patrick McHardy # # net/ipv4/netfilter/ip_nat_proto_unknown.c # 2004/11/13 17:01:07+01:00 kaber@coreworks.de +1 -1 # [NETFILTER]: Fix invalid tcp/udp checksums within NATed icmp errors # # Signed-off-by: Patrick McHardy # # net/ipv4/netfilter/ip_nat_proto_udp.c # 2004/11/13 17:01:07+01:00 kaber@coreworks.de +5 -3 # [NETFILTER]: Fix invalid tcp/udp checksums within NATed icmp errors # # Signed-off-by: Patrick McHardy # # net/ipv4/netfilter/ip_nat_proto_tcp.c # 2004/11/13 17:01:07+01:00 kaber@coreworks.de +5 -3 # [NETFILTER]: Fix invalid tcp/udp checksums within NATed icmp errors # # Signed-off-by: Patrick McHardy # # net/ipv4/netfilter/ip_nat_proto_icmp.c # 2004/11/13 17:01:07+01:00 kaber@coreworks.de +3 -1 # [NETFILTER]: Fix invalid tcp/udp checksums within NATed icmp errors # # Signed-off-by: Patrick McHardy # # net/ipv4/netfilter/ip_nat_core.c # 2004/11/13 17:01:07+01:00 kaber@coreworks.de +1 -1 # [NETFILTER]: Fix invalid tcp/udp checksums within NATed icmp errors # # Signed-off-by: Patrick McHardy # # include/linux/netfilter_ipv4/ip_nat_protocol.h # 2004/11/13 17:01:07+01:00 kaber@coreworks.de +1 -1 # [NETFILTER]: Fix invalid tcp/udp checksums within NATed icmp errors # # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/11/13 14:41:16+01:00 kaber@coreworks.de # [NETFILTER]: associate locally generated icmp errors with conntrack of original packet # # Signed-off-by: Patrick McHardy # # net/ipv4/netfilter/ipt_REJECT.c # 2004/11/13 14:41:07+01:00 kaber@coreworks.de +2 -16 # [NETFILTER]: associate locally generated icmp errors with conntrack of original packet # # Signed-off-by: Patrick McHardy # # net/ipv4/icmp.c # 2004/11/13 14:41:07+01:00 kaber@coreworks.de +2 -0 # [NETFILTER]: associate locally generated icmp errors with conntrack of original packet # # Signed-off-by: Patrick McHardy # # net/core/netfilter.c # 2004/11/13 14:41:07+01:00 kaber@coreworks.de +14 -4 # [NETFILTER]: associate locally generated icmp errors with conntrack of original packet # # Signed-off-by: Patrick McHardy # # include/linux/netfilter.h # 2004/11/13 14:41:07+01:00 kaber@coreworks.de +2 -0 # [NETFILTER]: associate locally generated icmp errors with conntrack of original packet # # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/11/13 13:29:00+01:00 kaber@coreworks.de # [NETFILTER]: Enable rx timestamps in ip_queue/ip6_queue # # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6_queue.c # 2004/11/13 13:28:54+01:00 kaber@coreworks.de +4 -2 # [NETFILTER]: Enable rx timestamps in ip_queue/ip6_queue # # Signed-off-by: Patrick McHardy # # net/ipv4/netfilter/ip_queue.c # 2004/11/13 13:28:54+01:00 kaber@coreworks.de +4 -2 # [NETFILTER]: Enable rx timestamps in ip_queue/ip6_queue # # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/11/13 13:27:50+01:00 kaber@coreworks.de # [NET]: Move rx timestamp functions to net/core/dev.c # # Signed-off-by: Patrick McHardy # # net/core/sock.c # 2004/11/13 13:27:44+01:00 kaber@coreworks.de +2 -5 # [NET]: Move rx timestamp functions to net/core/dev.c # # Signed-off-by: Patrick McHardy # # net/core/dev.c # 2004/11/13 13:27:43+01:00 kaber@coreworks.de +25 -0 # [NET]: Move rx timestamp functions to net/core/dev.c # # Signed-off-by: Patrick McHardy # # include/net/sock.h # 2004/11/13 13:27:43+01:00 kaber@coreworks.de +0 -12 # [NET]: Move rx timestamp functions to net/core/dev.c # # Signed-off-by: Patrick McHardy # # include/linux/netdevice.h # 2004/11/13 13:27:43+01:00 kaber@coreworks.de +3 -0 # [NET]: Move rx timestamp functions to net/core/dev.c # # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/11/13 11:55:57+01:00 kaber@coreworks.de # [NETFILTER]: Handle nonlinear skbs in ip_queue/ip6_queue # # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6_queue.c # 2004/11/13 11:55:50+01:00 kaber@coreworks.de +4 -1 # [NETFILTER]: Handle nonlinear skbs in ip_queue/ip6_queue # # Signed-off-by: Patrick McHardy # # net/ipv4/netfilter/ip_queue.c # 2004/11/13 11:55:50+01:00 kaber@coreworks.de +4 -1 # [NETFILTER]: Handle nonlinear skbs in ip_queue/ip6_queue # # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/11/11 14:39:50-08:00 breuerr@mc.net # [CG14]: Fix NULL sbus_dev handling and colormap setup. # # Signed-off-by: David S. Miller # # drivers/video/cg14.c # 2004/11/11 14:39:22-08:00 breuerr@mc.net +20 -7 # [CG14]: Fix NULL sbus_dev handling and colormap setup. # # ChangeSet # 2004/11/11 14:27:15-08:00 davem@nuts.davemloft.net # Merge nuts.davemloft.net:/disk1/BK/sparcwork-2.6 # into nuts.davemloft.net:/disk1/BK/sparc-2.6 # # drivers/video/cg3.c # 2004/11/11 14:27:05-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # ChangeSet # 2004/11/11 14:12:10-08:00 ebrower@gmail.com # [SPARC]: Remove unnecessary pm_idle comment. # # Signed-off-by: David S. Miller # # arch/sparc/kernel/process.c # 2004/11/11 14:11:34-08:00 ebrower@gmail.com +2 -2 # [SPARC]: Remove unnecessary pm_idle comment. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/11 10:06:18-08:00 fenghua.yu@intel.com # [IA64] add cpu_relax() in the body of spin loops # # This patch adds cpu_relax() in the body of spin loops in # smp_call_function(), smp_call_function_single(), and # ia64_mca_wakeup_ipi_wait(). # # Signed-off-by: Fenghua Yu # Signed-off-by: Tony Luck # # arch/ia64/kernel/smp.c # 2004/11/11 10:04:49-08:00 fenghua.yu@intel.com +4 -4 # add cpu_relax() in the body of spin loops # # arch/ia64/kernel/mca.c # 2004/11/11 10:04:30-08:00 fenghua.yu@intel.com +1 -0 # add cpu_relax() in the body of spin loops # # ChangeSet # 2004/11/10 15:55:07-08:00 davidm@hpl.hp.com # [IA64] speedup ptrace by avoiding kernel-stack walk # # This patch changes the syscall entry path to store the # current-frame-mask (CFM) in pt_regs->cr_ifs. This just takes one # extra instruction (a "dep" to clear the bits other than 0-37) and is # free in terms of cycles. # # The advantage of doing this is that it lets ptrace() avoid having to # walk the stack to determine the end of the user-level backing-store of # a process which is in the middle of a system-call. Since this is what # strace does all the time, this speeds up strace quite a bit (by ~50%). # More importantly, it makes the syscall vs. non-syscall case much more # symmetric, which is always something I wanted. # # Note that the change to ivt.S looks big but this is just a rippling # effect of instruction-scheduling to keep syscall latency the same. # All that's really going on there is that instead of storing 0 into # cr_ifs member we store the low 38 bits of ar.pfs. # # Signed-off-by: David Mosberger # Signed-off-by: Tony Luck # # include/asm-ia64/ptrace.h # 2004/11/10 15:48:43-08:00 davidm@hpl.hp.com +6 -2 # speedup ptrace by avoiding kernel-stack walk # # arch/ia64/kernel/signal.c # 2004/11/10 15:48:43-08:00 davidm@hpl.hp.com +3 -5 # speedup ptrace by avoiding kernel-stack walk # # arch/ia64/kernel/ptrace.c # 2004/11/10 15:48:43-08:00 davidm@hpl.hp.com +9 -22 # speedup ptrace by avoiding kernel-stack walk # # arch/ia64/kernel/ivt.S # 2004/11/10 15:48:43-08:00 davidm@hpl.hp.com +16 -15 # speedup ptrace by avoiding kernel-stack walk # # ChangeSet # 2004/11/09 16:39:31-08:00 benh@kernel.crashing.org # [SUNZILOG]: Update timeout when setting termios. # # Signed-off-by: David S. Miller # # drivers/serial/sunzilog.c # 2004/11/09 16:39:13-08:00 benh@kernel.crashing.org +2 -0 # [SUNZILOG]: Update timeout when setting termios. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/09 15:29:22-08:00 davem@nuts.davemloft.net # [SPARC64]: Update defconfig. # # Signed-off-by: David S. Miller # # arch/sparc64/defconfig # 2004/11/09 15:28:51-08:00 davem@nuts.davemloft.net +10 -1 # [SPARC64]: Update defconfig. # # ChangeSet # 2004/11/09 15:28:33-08:00 mark@mtfhpc.demon.co.uk # [SPARC]: In cg3 driver, access control reg using byte not long IOs. # # Signed-off-by: David S. Miller # # drivers/video/cg3.c # 2004/11/09 15:28:01-08:00 mark@mtfhpc.demon.co.uk +4 -4 # [SPARC]: In cg3 driver, access control reg using byte not long IOs. # # ChangeSet # 2004/11/05 11:34:33-08:00 tony.luck@intel.com # [IA64] Allocate syscall #1270 for waitid syscall. # # Signed-off-by: Tony Luck # # include/asm-ia64/unistd.h # 2004/11/05 11:31:47-08:00 tony.luck@intel.com +2 -1 # Allocate syscall #1270 for waitid syscall. # Fix comment about usage of cond_syscall to match current source tree. # # arch/ia64/kernel/entry.S # 2004/11/05 11:31:21-08:00 tony.luck@intel.com +2 -2 # Add sys_waitid to slot 1270 # # ChangeSet # 2004/11/04 03:16:30+01:00 yasuyuki.kozakai@toshiba.co.jp # [NETFILTER]: Make eui64 match usuable in FORWARD chain # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_eui64.c # 2004/11/04 03:16:23+01:00 yasuyuki.kozakai@toshiba.co.jp +1 -1 # [NETFILTER]: Make eui64 match usuable in FORWARD chain # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/11/04 03:14:26+01:00 yasuyuki.kozakai@toshiba.co.jp # [NETFILTER]: introduce skb_header_pointer() to ipv6header match # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_ipv6header.c # 2004/11/04 03:14:19+01:00 yasuyuki.kozakai@toshiba.co.jp +6 -5 # [NETFILTER]: introduce skb_header_pointer() to ipv6header match # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/11/04 03:12:42+01:00 yasuyuki.kozakai@toshiba.co.jp # [NETFILTER]: Fix multiple bugs in ipv6header match # # This patch fixes following bugs in ip6t_ipv6header.c # # - The cast of the pointer to the next IPv6 extension header is wrong. # - The logical operation is wrong. These fixes intends # # - soft mode without invert flag "!" # match if the packet contains all of the specified headers. # # - soft mode with invert flag "!" # match if the packet DOESN'T contain all of the specified # headers. # # - strict mode without invert flag "!" # match if the packet contains JUST ONLY the specified headers. # if the packet doesn't contain some specified headers or # contains unspecified headers, the packet doesn't match with # rule. # # - strict mode with invert flag "!" # NOT MATCH if the packet contains JUST ONLY the specified # headers. Otherwise, match. So, if the packet contains some # specified headers and DOESN'T contain other specified headers, # the packet MATCHES with rule. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_ipv6header.c # 2004/11/04 03:12:35+01:00 yasuyuki.kozakai@toshiba.co.jp +16 -5 # [NETFILTER]: Fix multiple bugs in ipv6header match # # This patch fixes following bugs in ip6t_ipv6header.c # # - The cast of the pointer to the next IPv6 extension header is wrong. # - The logical operation is wrong. These fixes intends # # - soft mode without invert flag "!" # match if the packet contains all of the specified headers. # # - soft mode with invert flag "!" # match if the packet DOESN'T contain all of the specified # headers. # # - strict mode without invert flag "!" # match if the packet contains JUST ONLY the specified headers. # if the packet doesn't contain some specified headers or # contains unspecified headers, the packet doesn't match with # rule. # # - strict mode with invert flag "!" # NOT MATCH if the packet contains JUST ONLY the specified # headers. Otherwise, match. So, if the packet contains some # specified headers and DOESN'T contain other specified headers, # the packet MATCHES with rule. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # diff -Nru a/Documentation/DocBook/librs.tmpl b/Documentation/DocBook/librs.tmpl --- a/Documentation/DocBook/librs.tmpl 2004-11-29 21:22:08 -08:00 +++ b/Documentation/DocBook/librs.tmpl 2004-11-29 21:22:08 -08:00 @@ -83,13 +83,13 @@ Initializing The init function init_rs returns a pointer to a - rs decoder structure, which holds the neccecary + rs decoder structure, which holds the necessary information for encoding, decoding and error correction with the given polynomial. It either uses an existing matching decoder or creates a new one. On creation all the lookup tables for fast en/decoding are created. The function may take a while, so make sure not to - call it in critical code pathes. + call it in critical code paths. /* the Reed Solomon control structure */ @@ -123,10 +123,10 @@ results in ECC errors. - The databytes are expanded to the given symbolsize - on the fly. There is no support for encoding continuos - bitstreams with a symbolsize != 8 at the moment. If - it is neccecary it should be not a big deal to implement + The databytes are expanded to the given symbol size + on the fly. There is no support for encoding continuous + bitstreams with a symbol size != 8 at the moment. If + it is necessary it should be not a big deal to implement such functionality. @@ -155,13 +155,13 @@ location buffer to the decoder. The decoder stores the calculated error location and the correction bitmask in the given buffers. This is useful for hardware - decoders which use a weird bitordering scheme. + decoders which use a weird bit ordering scheme. - The databytes are expanded to the given symbolsize - on the fly. There is no support for decoding continuos + The databytes are expanded to the given symbol size + on the fly. There is no support for decoding continuous bitstreams with a symbolsize != 8 at the moment. If - it is neccecary it should be not a big deal to implement + it is necessary it should be not a big deal to implement such functionality. @@ -208,7 +208,7 @@ Decoding with syndrome given by hardware decoder, no direct data correction. - Note: It's not neccecary to give data and recieved parity to the decoder. + Note: It's not necessary to give data and received parity to the decoder. /* Parity buffer. Size = number of roots */ diff -Nru a/Documentation/arm/Booting b/Documentation/arm/Booting --- a/Documentation/arm/Booting 2004-11-29 21:22:08 -08:00 +++ b/Documentation/arm/Booting 2004-11-29 21:22:08 -08:00 @@ -118,6 +118,10 @@ In either case, the following conditions must be met: +- Quiesce all DMA capable devicess so that memory does not get + corrupted by bogus network packets or disk data. This will save + you many hours of debug. + - CPU register settings r0 = 0, r1 = machine type number discovered in (3) above. diff -Nru a/Documentation/arm/IXP2000 b/Documentation/arm/IXP2000 --- a/Documentation/arm/IXP2000 2004-11-29 21:22:08 -08:00 +++ b/Documentation/arm/IXP2000 2004-11-29 21:22:08 -08:00 @@ -18,7 +18,7 @@ 2. Linux Support -Linux currently supports the following features on the IXP2000 NPUS: +Linux currently supports the following features on the IXP2000 NPUs: - On-chip serial - PCI @@ -30,10 +30,10 @@ components of the chip are accessed via Intel's closed source SDK. Please contact Intel directly on issues with using those. There is also a mailing list run by some folks at Princeton University that might -be of helpful: https://lists.cs.princeton.edu/mailman/listinfo/ixp2xxx +be of help: https://lists.cs.princeton.edu/mailman/listinfo/ixp2xxx WHATEVER YOU DO, DO NOT POST EMAIL TO THE LINUX-ARM OR LINUX-ARM-KERNEL -MAILINNG LISTS REGARDING THE INTEL SDK. +MAILING LISTS REGARDING THE INTEL SDK. 3. Supported Platforms @@ -47,12 +47,12 @@ - The IXP2000 platforms ususally have rather complex PCI bus topologies with large memory space requirements. In addition, b/c of the way the - Intel SDK is designed, devices are enumerated in a vert specific + Intel SDK is designed, devices are enumerated in a very specific way. B/c of this this, we use "pci=firmware" option in the kernel command line so that we do not re-enumerate the bus. - IXDP2x01 systems have variable clock tick rates that we cannot determine - via HW registers. The "ixdp2x01_clk=XXX" cmd line options allows you + via HW registers. The "ixdp2x01_clk=XXX" cmd line options allow you to pass the clock rate to the board port. 5. Thanks diff -Nru a/Documentation/arm/IXP4xx b/Documentation/arm/IXP4xx --- a/Documentation/arm/IXP4xx 2004-11-29 21:22:06 -08:00 +++ b/Documentation/arm/IXP4xx 2004-11-29 21:22:06 -08:00 @@ -122,6 +122,15 @@ also known as the Richfield board. It contains 4 PCI slots, 16MB of flash, two 10/100 ports and one ADSL port. +Intel IXDPG425 Development Platform + + This is basically and ADI Coyote board with a NEC EHCI controller + added. One issue with this board is that the mini-PCI slots only + have the 3.3v line connected, so you can't use a PCI to mini-PCI + adapter with an E100 card. So to NFS root you need to use either + the CSR or a WiFi card and a ramdisk that BOOTPs and then does + a pivot_root to NFS. + Motorola PrPMC1100 Processor Mezanine Card http://www.fountainsys.com/datasheet/PrPMC1100.pdf @@ -152,4 +161,4 @@ ------------------------------------------------------------------------- -Last Update: 5/13/2004 +Last Update: 11/16/2004 diff -Nru a/Documentation/arm/README b/Documentation/arm/README --- a/Documentation/arm/README 2004-11-29 21:22:09 -08:00 +++ b/Documentation/arm/README 2004-11-29 21:22:09 -08:00 @@ -163,9 +163,9 @@ -Kernel entry (head-armv.S) +Kernel entry (head.S) -------------------------- - The initial entry into the kernel is via head-armv.S, which uses machine + The initial entry into the kernel is via head.S, which uses machine independent code. The machine is selected by the value of 'r1' on entry, which must be kept unique. diff -Nru a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients --- a/Documentation/i2c/writing-clients 2004-11-29 21:22:06 -08:00 +++ b/Documentation/i2c/writing-clients 2004-11-29 21:22:06 -08:00 @@ -676,13 +676,25 @@ extern s32 i2c_smbus_read_word_data(struct i2c_client * client, u8 command); extern s32 i2c_smbus_write_word_data(struct i2c_client * client, u8 command, u16 value); - extern s32 i2c_smbus_process_call(struct i2c_client * client, - u8 command, u16 value); - extern s32 i2c_smbus_read_block_data(struct i2c_client * client, - u8 command, u8 *values); extern s32 i2c_smbus_write_block_data(struct i2c_client * client, u8 command, u8 length, u8 *values); + +These ones were removed in Linux 2.6.10 because they had no users, but could +be added back later if needed: + + extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client, + u8 command, u8 *values); + extern s32 i2c_smbus_read_block_data(struct i2c_client * client, + u8 command, u8 *values); + extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client * client, + u8 command, u8 length, + u8 *values); + extern s32 i2c_smbus_process_call(struct i2c_client * client, + u8 command, u16 value); + extern s32 i2c_smbus_block_process_call(struct i2c_client *client, + u8 command, u8 length, + u8 *values) All these transactions return -1 on failure. The 'write' transactions return 0 on success; the 'read' transactions return the read value, except diff -Nru a/Documentation/kbuild/modules.txt b/Documentation/kbuild/modules.txt --- a/Documentation/kbuild/modules.txt 2004-11-29 21:22:08 -08:00 +++ b/Documentation/kbuild/modules.txt 2004-11-29 21:22:08 -08:00 @@ -1,68 +1,419 @@ -For now this is a raw copy from the old Documentation/kbuild/modules.txt, -which was removed in 2.6.0-test5. -The information herein is correct but not complete. - -Installing modules in a non-standard location ---------------------------------------------- -When the modules needs to be installed under another directory -the INSTALL_MOD_PATH can be used to prefix "/lib/modules" as seen -in the following example: - -make INSTALL_MOD_PATH=/frodo modules_install - -This will install the modules in the directory /frodo/lib/modules. -/frodo can be a NFS mounted filesystem on another machine, allowing -out-of-the-box support for installation on remote machines. - - -Compiling modules outside the official kernel ---------------------------------------------- - -Often modules are developed outside the official kernel. To keep up -with changes in the build system the most portable way to compile a -module outside the kernel is to use the kernel build system, -kbuild. Use the following command-line: - -make -C path/to/kernel/src M=$PWD modules - -This requires that a makefile exits made in accordance to -Documentation/kbuild/makefiles.txt. Read that file for more details on -the build system. - -The following is a short summary of how to write your Makefile to get -you up and running fast. Assuming your module will be called -yourmodule.ko, your code should be in yourmodule.c and your Makefile -should include - -obj-m := yourmodule.o - -If the code for your module is in multiple files that need to be -linked, you need to tell the build system which files to compile. In -the case of multiple files, none of these files can be named -yourmodule.c because doing so would cause a problem with the linking -step. Assuming your code exists in file1.c, file2.c, and file3.c and -you want to build yourmodule.ko from them, your Makefile should -include - -obj-m := yourmodule.o -yourmodule-objs := file1.o file2.o file3.o - -Now for a final example to put it all together. Assuming the -KERNEL_SOURCE environment variable is set to the directory where you -compiled the kernel, a simple Makefile that builds yourmodule.ko as -described above would look like - -# Tells the build system to build yourmodule.ko. -obj-m := yourmodule.o - -# Tells the build system to build these object files and link them as -# yourmodule.o, before building yourmodule.ko. This line can be left -# out if all the code for your module is in one file, yourmodule.c. If -# you are using multiple files, none of these files can be named -# yourmodule.c. -yourmodule-objs := file1.o file2.o file3.o - -# Invokes the kernel build system to come back to the current -# directory and build yourmodule.ko. -default: - make -C ${KERNEL_SOURCE} M=`pwd` modules + +In this document you will find information about: +- how to build external modules +- how to make your module use kbuild infrastructure +- how kbuild will install a kernel +- how to install modules in a non-standard location + +=== Table of Contents + + === 1 Introduction + === 2 How to build external modules + --- 2.1 Building external modules + --- 2.2 Available targets + --- 2.3 Available options + --- 2.4 Preparing the kernel tree for module build + === 3. Example commands + === 4. Creating a kbuild file for an external module + === 5. Include files + --- 5.1 How to include files from the kernel include dir + --- 5.2 External modules using an include/ dir + === 6. Module installation + --- 6.1 INSTALL_MOD_PATH + --- 6.2 INSTALL_MOD_DIR + === 7. Module versioning + === 8. Tips & Tricks + --- 8.1 Testing for CONFIG_FOO_BAR + + + +=== 1. Introduction + +kbuild includes functionality for building modules both +within the kernel source tree and outside the kernel source tree. +The latter is usually referred to as external modules and is used +both during development and for modules that are not planned to be +included in the kernel tree. + +What is covered within this file is mainly information to authors +of modules. The author of an external modules should supply +a makefile that hides most of the complexity so one only has to type +'make' to buld the module. A complete example will be present in +chapter ¤. Creating a kbuild file for an external module". + + +=== 2. How to build external modules + +kbuild offers functionality to build external modules, with the +prerequisite that there is a pre-built kernel available with full source. +A subset of the targets available when building the kernel is available +when building an external module. + +--- 2.1 Building external modules + + Use the following command to build an external module: + + make -C M=`pwd` + + For the running kernel use: + make -C /lib/modules/`uname -r`/build M=`pwd` + + For the above command to succeed the kernel must have been built with + modules enabled. + + To install the modules that were just built: + + make -C M=`pwd` modules_install + + More complex examples later, the above should get you going. + +--- 2.2 Available targets + + $KDIR refers to path to kernel source top-level directory + + make -C $KDIR M=`pwd` + Will build the module(s) located in current directory. + All output files will be located in the same directory + as the module source. + No attempts are made to update the kernel source, and it is + a precondition that a successful make has been executed + for the kernel. + + make -C $KDIR M=`pwd` modules + The modules target is implied when no target is given. + Same functionality as if no target was specified. + See description above. + + make -C $KDIR M=$PWD modules_install + Install the external module(s). + Installation default is in /lib/modules//extra, + but may be prefixed with INSTALL_MOD_PATH - see separate chater. + + make -C $KDIR M=$PWD clean + Remove all generated files for the module - the kernel + source directory is not moddified. + + make -C $KDIR M=`pwd` help + help will list the available target when building external + modules. + +--- 2.3 Available options: + + $KDIR refer to path to kernel src + + make -C $KDIR + Used to specify where to find the kernel source. + '$KDIR' represent the directory where the kernel source is. + Make will actually change directory to the specified directory + when executed but change back when finished. + + make -C $KDIR M=`pwd` + M= is used to tell kbuild that an external module is + being built. + The option given to M= is the directory where the external + module (kbuild file) is located. + When an external module is being built only a subset of the + usual targets are available. + + make -C $KDIR SUBDIRS=`pwd` + Same as M=. The SUBDIRS= syntax is kept for backwards + compatibility. + +--- 2.4 Preparing the kernel tree for module build + + To make sure the kernel contains the information required to + build external modules the target 'modules_prepare' must be used. + 'module_prepare' solely exists as a simple way to prepare + a kernel for building external modules. + Note: modules_prepare will not build Module.symvers even if + CONFIG_MODULEVERSIONING is set. + Therefore a full kernel build needs to be executed to make + module versioning work. + + +=== 3. Example commands + +This example shows the actual commands to be executed when building +an external module for the currently running kernel. +In the example below the distribution is supposed to use the +facility to locate output files for a kernel compile in a different +directory than the kernel source - but the examples will also work +when the source and the output files are mixed in the same directory. + +# Kernel source +/lib/modules//source -> /usr/src/linux- + +# Output from kernel compile +/lib/modules//build -> /usr/src/linux--up + +Change to the directory where the kbuild file is located and execute +the following commands to build the module: + + cd /home/user/src/module + make -C /usr/src/`uname -r`/source \ + O=/lib/modules/`uname-r`/build \ + M=`pwd` + +Then to install the module use the following command: + + make -C /usr/src/`uname -r`/source \ + O=/lib/modules/`uname-r`/build \ + M=`pwd` \ + modules_install + +If one looks closely you will see that this is the same commands as +listed before - with the directories spelled out. + +The above are rather long commands, and the following chapter +lists a few tricks to make it all easier. + + +=== 4. Creating a kbuild file for an external module + +kbuild is the build system for the kernel, and external modules +must use kbuild to stay compatible with changes in the build system +and to pick up the right flags to gcc etc. + +The kbuild file used as input shall follow the syntax described +in Documentation/kbuild/makefiles.txt. This chapter will introduce a few +more tricks to be used when dealing with external modules. + +In the following a Makefile will be created for a module with the +following files: + 8123_if.c + 8123_if.h + 8123_pci.c + 8123_bin.o_shipped <= Binary blob + +--- 4.1 Shared Makefile for module and kernel + + An external module always includes a wrapper Makefile supporting + building the module using 'make' with no arguments. + The Makefile provided will most likely include additional + functionality such as test targets etc. and this part shall + be filtered away from kbuild since it may impact kbuild if + name clashes occurs. + + Example 1: + --> filename: Makefile + ifneq ($(KERNELRELEASE),) + # kbuild part of makefile + obj-m := 8123.o + 8123-y := 8123_if.o 8123_pci.o 8123_bin.o + + else + # Normal Makefile + + KERNELDIR := /lib/modules/`uname -r`/build + all:: + $(MAKE) -C $KERNELDIR M=`pwd` $@ + + # Module specific targets + genbin: + echo "X" > 8123_bini.o_shipped + + endif + + In example 1 the check for KERNELRELEASE is used to separate + the two parts of the Makefile. kbuild will only see the two + assignments whereas make will see everything except the two + kbuild assignments. + + In recent versions of the kernel, kbuild will look for a file named + Kbuild and as second option look for a file named Makefile. + Utilising the Kbuild file makes us split up the Makefile in example 1 + into two files as shown in example 2: + + Example 2: + --> filename: Kbuild + obj-m := 8123.o + 8123-y := 8123_if.o 8123_pci.o 8123_bin.o + + --> filename: Makefile + KERNELDIR := /lib/modules/`uname -r`/build + all:: + $(MAKE) -C $KERNELDIR M=`pwd` $@ + + # Module specific targets + genbin: + echo "X" > 8123_bin_shipped + + + In example 2 we are down to two fairly simple files and for simple + files as used in this example the split is questionable. But some + external modules use Makefiles of several hundred lines and here it + really pays off to separate the kbuild part from the rest. + Example 3 shows a backward compatible version. + + Example 3: + --> filename: Kbuild + obj-m := 8123.o + 8123-y := 8123_if.o 8123_pci.o 8123_bin.o + + --> filename: Makefile + ifneq ($(KERNELRELEASE),) + include Kbuild + else + # Normal Makefile + + KERNELDIR := /lib/modules/`uname -r`/build + all:: + $(MAKE) -C $KERNELDIR M=`pwd` $@ + + # Module specific targets + genbin: + echo "X" > 8123_bin_shipped + + endif + + The trick here is to include the Kbuild file from Makefile so + if an older version of kbuild picks up the Makefile the Kbuild + file will be included. + +--- 4.2 Binary blobs included in a module + + Some external modules needs to include a .o as a blob. kbuild + has support for this, but requires the blob file to be named + _shipped. In our example the blob is named + 8123_bin.o_shipped and when the kbuild rules kick in the file + 8123_bin.o is created as a simple copy off the 8213_bin.o_shipped file + with the _shipped part stripped of the filename. + This allows the 8123_bin.o filename to be used in the assignment to + the module. + + Example 4: + obj-m := 8123.o + 8123-y := 8123_if.o 8123_pci.o 8123_bin.o + + In example 4 there is no distinction between the ordinary .c/.h files + and the binary file. But kbuild will pick up different rules to create + the .o file. + + +=== 5. Include files + +Include files are a necessity when a .c file uses something from another .c +files (not strictly in the sense of .c but if good programming practice is +used). Any module that consist of more than one .c file will have a .h file +for one of the .c files. +- If the .h file only describes a module internal interface then the .h file + shall be placed in the same directory as the .c files. +- If the .h files describe an interface used by other parts of the kernel + located in different directories, the .h files shall be located in + include/linux/ or other include/ directories as appropriate. + +One exception for this rule is larger subsystems that have their own directory +under include/ such as include/scsi. Another exception is arch-specific +.h files which are located under include/asm-$(ARCH)/*. + +External modules have a tendency to locate include files in a separate include/ +directory and therefore needs to deal with this in their kbuild file. + +--- 5.1 How to include files from the kernel include dir + + When a module needs to include a file from include/linux/ then one + just uses: + + #include + + kbuild will make sure to add options to gcc so the relevant + directories are searched. + Likewise for .h files placed in the same directory as the .c file. + + #include "8123_if.h" + + will do the job. + +--- 5.2 External modules using an include/ dir + + External modules often locate their .h files in a separate include/ + directory although this is not usual kernel style. When an external + module uses an include/ dir then kbuild needs to be told so. + The trick here is to use either EXTRA_CFLAGS (take effect for all .c + files) or CFLAGS_$F.o (take effect only for a single file). + + In our example if we move 8123_if.h to a subdirectory named include/ + the resulting Kbuild file would look like: + + --> filename: Kbuild + obj-m := 8123.o + + EXTRA_CFLAGS := -Iinclude + 8123-y := 8123_if.o 8123_pci.o 8123_bin.o + + Note that in the assingment there is no space between -I and the path. + This is a kbuild limitation and no space must be present. + + +=== 6. Module installation + +Modules which are included in the kernel is installed in the directory: + + /lib/modules/$(KERNELRELEASE)/kernel + +External modules are installed in the directory: + + /lib/modules/$(KERNELRELEASE)/extra + +--- 6.1 INSTALL_MOD_PATH + + Above are the default directories, but as always some level of + customization is possible. One can prefix the path using the variable + INSTALL_MOD_PATH: + + $ make INSTALL_MOD_PATH=/frodo modules_install + => Install dir: /frodo/lib/modules/$(KERNELRELEASE)/kernel + + INSTALL_MOD_PATH may be set as an ordinary shell variable or as in the + example above be specified on the commandline when calling make. + INSTALL_MOD_PATH has effect both when installing modules included in + the kernel as well as when installing external modules. + +--- 6.2 INSTALL_MOD_DIR + + When installing external modules they are default installed in a + directory under /lib/modules/$(KERNELRELEASE)/extra, but one may wish + to locate modules for a specific functionality in a separate + directory. For this purpose one can use INSTALL_MOD_DIR to specify an + alternative name than 'extra'. + + $ make INSTALL_MOD_DIR=gandalf -C KERNELDIR \ + M=`pwd` modules_install + => Install dir: /lib/modules/$(KERNELRELEASE)/gandalf + + +=== 7. Module versioning + +Module versioning are enabled by the CONFIG_MODVERSIONS tag. + +Module versioning is used as a simple ABI consistency check. The Module +versioning creates a CRC value of the full prototype for an exported symbol and +when a module is loaded/used then the CRC values contained in the kernel are +compared with similar values in the module. If they are not equal then the +kernel refuses to load the module. + +During a kernel build a file named Module.symvers will be generated. This +file includes the symbol version of all symbols within the kernel. If the +Module.symvers file is saved from the last full kernel compile one does not +have to do a full kernel compile to build a module version's compatible module. + +=== 8. Tips & Tricks + +--- 8.1 Testing for CONFIG_FOO_BAR + + Modules often needs to check for certain CONFIG_ options to decide if + a specific feature shall be included in the module. When kbuild is used + this is done by referencing the CONFIG_ variable directly. + + #fs/ext2/Makefile + obj-$(CONFIG_EXT2_FS) += ext2.o + + ext2-y := balloc.o bitmap.o dir.o + ext2-$(CONFIG_EXT2_FS_XATTR) += xattr.o + + External modules have traditionally used grep to check for specific + CONFIG_ settings directly in .config. This usage is broken. + As introduced before external modules shall use kbuild when building + and therefore can use the same methods as in-kernel modules when testing + for CONFIG_ definitions. + diff -Nru a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt --- a/Documentation/kernel-parameters.txt 2004-11-29 21:22:08 -08:00 +++ b/Documentation/kernel-parameters.txt 2004-11-29 21:22:08 -08:00 @@ -312,8 +312,24 @@ condev= [HW,S390] console device conmode= - console= [KNL] Output console - Console device and comm spec (speed, control, parity). + console= [KNL] Output console device and options. + + tty Use the virtual console device . + + ttyS[,options] + Use the specified serial port. The options are of + the form "bbbbpn", where "bbbb" is the baud rate, + "p" is parity ("n", "o", or "e"), and "n" is bits. + Default is "9600n8". + + See also Documentation/serial-console.txt. + + uart,io,[,options] + uart,mmio,[,options] + Start an early, polled-mode console on the 8250/16550 + UART at the specified I/O port or MMIO address, + switching to the matching ttyS device later. The + options are the same as for ttyS, above. cpcihp_generic= [HW,PCI] Generic port I/O CompactPCI driver Format: ,,,[,] @@ -504,10 +520,12 @@ icn= [HW,ISDN] Format: [,[,[,]]] + ide= [HW] (E)IDE subsystem + Format: ide=nodma or ide=doubler or ide=reverse + See Documentation/ide.txt. + ide?= [HW] (E)IDE subsystem - Config (iomem/irq), tuning or debugging - (serialize,reset,no{dma,tune,probe}) or chipset - specific parameters. + Format: ide?=noprobe or chipset specific parameters. See Documentation/ide.txt. idebus= [HW] (E)IDE subsystem - VLB/PCI bus speed @@ -653,9 +671,10 @@ maxcpus= [SMP] Maximum number of processors that an SMP kernel should make use of - max_scsi_luns= [SCSI] + max_luns= [SCSI] Maximum number of LUNs to probe + Should be between 1 and 2^32-1. - max_scsi_report_luns= + max_report_luns= [SCSI] Maximum number of LUNs received Should be between 1 and 16384. @@ -784,8 +803,6 @@ noexec=off: disable nn-executable mappings nofxsr [BUGS=IA-32] - - nohighio [BUGS=IA-32] Disable highmem block I/O. nohlt [BUGS=ARM] diff -Nru a/Documentation/nmi_watchdog.txt b/Documentation/nmi_watchdog.txt --- a/Documentation/nmi_watchdog.txt 2004-11-29 21:22:06 -08:00 +++ b/Documentation/nmi_watchdog.txt 2004-11-29 21:22:06 -08:00 @@ -54,6 +54,20 @@ cannot even accept NMI interrupts, or the crash has made the kernel unable to print messages. +Be aware that when using local APIC, the frequency of NMI interrupts +it generates, depends on the system load. The local APIC NMI watchdog, +lacking a better source, uses the "cycles unhalted" event. As you may +guess it doesn't tick when the CPU is in the halted state (which happens +when the system is idle), but if your system locks up on anything but the +"hlt" processor instruction, the watchdog will trigger very soon as the +"cycles unhalted" event will happen every clock tick. If it locks up on +"hlt", then you are out of luck -- the event will not happen at all and the +watchdog won't trigger. This is a shortcoming of the local APIC watchdog +-- unfortunately there is no "clock ticks" event that would work all the +time. The I/O APIC watchdog is driven externally and has no such shortcoming. +But its NMI frequency is much higher, resulting in a more significant hit +to the overall system performance. + NOTE: starting with 2.4.2-ac18 the NMI-oopser is disabled by default, you have to enable it with a boot time parameter. Prior to 2.4.2-ac18 the NMI-oopser is enabled unconditionally on x86 SMP boxes. diff -Nru a/Documentation/pci.txt b/Documentation/pci.txt --- a/Documentation/pci.txt 2004-11-29 21:22:07 -08:00 +++ b/Documentation/pci.txt 2004-11-29 21:22:07 -08:00 @@ -156,11 +156,9 @@ VENDOR_ID or DEVICE_ID. This allows searching for any device from a specific vendor, for example. -Note that these functions are not hotplug-safe. Their hotplug-safe -replacements are pci_get_device(), pci_get_class() and pci_get_subsys(). -They increment the reference count on the pci_dev that they return. -You must eventually (possibly at module unload) decrement the reference -count on these devices by calling pci_dev_put(). + These functions are hotplug-safe. They increment the reference count on +the pci_dev that they return. You must eventually (possibly at module unload) +decrement the reference count on these devices by calling pci_dev_put(). 3. Enabling and disabling devices diff -Nru a/Documentation/s390/monreader.txt b/Documentation/s390/monreader.txt --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/Documentation/s390/monreader.txt 2004-11-29 21:22:09 -08:00 @@ -0,0 +1,175 @@ + +Date : 2004-Nov-04 +Author: Gerald Schaefer (geraldsc@de.ibm.com) + + + Linux API for read access to z/VM Monitor Records + ================================================= + + +Description +=========== +This item delivers a new Linux API in the form of a misc char device that is +useable from user space and allows read access to the z/VM Monitor Records +collected by the *MONITOR System Service of z/VM. + + +User Requirements +================= +The z/VM guest on which you want to access this API needs to be configured in +order to allow IUCV connections to the *MONITOR service, i.e. it needs the +IUCV *MONITOR statement in its user entry. If the monitor DCSS to be used is +restricted (likely), you also need the NAMESAVE statement. +This item will use the IUCV device driver to access the z/VM services, so you +need a kernel with IUCV support. You also need z/VM version 4.4 or 5.1. + +There are two options for being able to load the monitor DCSS (examples assume +that the monitor DCSS begins at 144 MB and ends at 152 MB). You can query the +location of the monitor DCSS with the Class E privileged CP command Q NSS MAP +(the values BEGPAG and ENDPAG are given in units of 4K pages). + +See also "CP Command and Utility Reference" (SC24-6081-00) for more information +on the DEF STOR and Q NSS MAP commands, as well as "Saved Segments Planning +and Administration" (SC24-6116-00) for more information on DCSSes. + +1st option: +----------- +You can use the CP command DEF STOR CONFIG to define a "memory hole" in your +guest virtual storage around the address range of the DCSS. + +Example: DEF STOR CONFIG 0.140M 200M.200M + +This defines two blocks of storage, the first is 140MB in size an begins at +address 0MB, the second is 200MB in size and begins at address 200MB, +resulting in a total storage of 340MB. Note that the first block should +always start at 0 and be at least 64MB in size. + +2nd option: +----------- +Your guest virtual storage has to end below the starting address of the DCSS +and you have to specify the "mem=" kernel parameter in your parmfile with a +value greater than the ending address of the DCSS. + +Example: DEF STOR 140M + +This defines 140MB storage size for your guest, the parameter "mem=160M" is +added to the parmfile. + + +User Interface +============== +The char device is implemented as a kernel module named "monreader", +which can be loaded via the modprobe command, or it can be compiled into the +kernel instead. There is one optional module (or kernel) parameter, "mondcss", +to specify the name of the monitor DCSS. If the module is compiled into the +kernel, the kernel parameter "monreader.mondcss=" can be specified +in the parmfile. + +The default name for the DCSS is "MONDCSS" if none is specified. In case that +there are other users already connected to the *MONITOR service (e.g. +Performance Toolkit), the monitor DCSS is already defined and you have to use +the same DCSS. The CP command Q MONITOR (Class E privileged) shows the name +of the monitor DCSS, if already defined, and the users connected to the +*MONITOR service. +Refer to the "z/VM Performance" book (SC24-6109-00) on how to create a monitor +DCSS, you need Class E privileges to define and save a DCSS. + +Example: +-------- +modprobe monreader mondcss=MYDCSS + +This loads the module and sets the DCSS name to "MYDCSS". + +NOTE: +----- +This API provides no interface to control the *MONITOR service, e.g. specifiy +which data should be collected. This can be done by the CP command MONITOR +(Class E privileged), see "CP Command and Utility Reference". + +Device nodes with udev: +----------------------- +After loading the module, a char device will be created along with the device +node //monreader. + +Device nodes without udev: +-------------------------- +If your distribution does not support udev, a device node will not be created +automatically and you have to create it manually after loading the module. +Therefore you need to know the major and minor numbers of the device. These +numbers can be found in /sys/class/misc/monreader/dev. +Typing cat /sys/class/misc/monreader/dev will give an output of the form +:. The device node can be created via the mknod command, enter +mknod c , where is the name of the device node +to be created. + +Example: +-------- +# modprobe monreader +# cat /sys/class/misc/monreader/dev +10:63 +# mknod /dev/monreader c 10 63 + +This loads the module with the default monitor DCSS (MONDCSS) and creates a +device node. + +File operations: +---------------- +The following file operations are supported: open, release, read, poll. +There are two alternative methods for reading: either non-blocking read in +conjunction with polling, or blocking read without polling. IOCTLs are not +supported. + +Read: +----- +Reading from the device provides a set of one or more contiguous monitor +records, there is no control data (unlike the CMS MONWRITE utility output). +The monitor record layout can be found here (z/VM 5.1): +http://www.vm.ibm.com/pubs/mon510/index.html + +Each set of records is exclusively composed of either event records or sample +records. The end of such a set of records is indicated by a successful read +with a return value of 0 (0-Byte read). +Any received data must be considered invalid until a complete record set was +read successfully, including the closing 0-Byte read. Therefore you should +always read the complete set into a buffer before processing the data. + +The maximum size of a set of records can be as large as the size of the +monitor DCSS, so design the buffer adequately or use dynamic memory allocation +The size of the monitor DCSS will be printed into syslog after loading the +module. You can also use the (Class E privileged) CP command Q NSS MAP to +list all available segments and information about them. + +As with most char devices, error conditions are indicated by returning a +negative value for the number of bytes read. In this case, the errno variable +indicates the error condition: + +EIO: reply failed, read data is invalid and the application + should discard the data read since the last successful read with 0 size. +EFAULT: copy_to_user failed, read data is invalid and the application should + discard the data read since the last successful read with 0 size. +EAGAIN: occurs on a non-blocking read if there is no data available at the + moment. There is no data missing or corrupted, just try again or rather + use polling for non-blocking reads. +EOVERFLOW: message limit reached, the data read since the last successful + read with 0 size is valid but subsequent records may be missing. + +In the last case (EOVERFLOW) there may be missing data, in the first two cases +(EIO, EFAULT) there will be missing data. It's up to the application if it will +continue reading subsequent records or rather exit. + +Open: +----- +Only one user is allowed to open the char device. If it is already in use, the +open function will fail (return a negative value) and set errno to EBUSY. +The open function may also fail if an IUCV connection to the *MONITOR service +cannot be established. In this case errno will be set to EIO and an error +message with an IPUSER SEVER code will be printed into syslog. +The IPUSER SEVER codes are described in the "z/VM Performance" book. + +NOTE: +----- +As soon as the device is opened, incoming messages will be accepted and they +will account for the message limit, i.e. opening the device without reading +from it will provoke the "message limit reached" error (EOVERFLOW error code) +eventually. + diff -Nru a/Documentation/scsi/ChangeLog.megaraid b/Documentation/scsi/ChangeLog.megaraid --- a/Documentation/scsi/ChangeLog.megaraid 2004-11-29 21:22:08 -08:00 +++ b/Documentation/scsi/ChangeLog.megaraid 2004-11-29 21:22:08 -08:00 @@ -1,3 +1,14 @@ +Release Date : Thu Nov 4 18:24:56 EST 2004 - Sreenivas Bagalkote + +Current Version : 2.20.4.1 (scsi module), 2.20.2.2 (cmm module) +Older Version : 2.20.4.0 (scsi module), 2.20.2.1 (cmm module) + +i. Handle IOCTL cmd timeouts more properly. + +ii. pci_dma_sync_{sg,single}_for_cpu was introduced into megaraid_mbox + incorrectly (instead of _for_device). Changed to appropriate + pci_dma_sync_{sg,single}_for_device. + Release Date : Wed Oct 06 11:15:29 EDT 2004 - Sreenivas Bagalkote Current Version : 2.20.4.0 (scsi module), 2.20.2.1 (cmm module) Older Version : 2.20.4.0 (scsi module), 2.20.2.0 (cmm module) diff -Nru a/Documentation/sound/oss/ChangeLog.awe b/Documentation/sound/oss/ChangeLog.awe --- a/Documentation/sound/oss/ChangeLog.awe 2004-11-29 21:22:09 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,230 +0,0 @@ -ver.0.4.3p4 - - Bug fix for invalid memory detection when initialized twice - - Add sample sharing function - works together with awesfx-0.4.3p3 - - Add AWE_PROBE_DATA for probing sample id - -ver.0.4.3p3 - - Replace memset to MEMSET (for FreeBSD) - - Add PAN_EXCHANGE switch - -ver.0.4.3p2 - - MIDI emulation device is added - - Controls volume and filter targets - - Include chorus/reverb/equalizer values in MISC_MODE - -ver.0.4.3p1 - - Change the volume calculation method - - Support for Tom Lees' PnP driver (v0.3) - -ver.0.4.2d - - Support for OSS/Free 3.8 on 2.0 kernels. - - Support for Linux PnP driver - - Support for module (for recent 2.1 kernels and RH5.0) - - Support for FreeBSD-3.0 system - -ver.0.4.2c - - Add a mode to enable drum channel toggle via bank number - change. - -ver.0.4.2b - - Clear voice position after note on - - Change nrvoices according to the current playing mode - -ver.0.4.2a - - Fix a bug in pitch calculation with scale parameter - - Change default chorus & reverb modes - -ver.0.4.2 - - Use indirect voice allocation mode; used as default mode - - Add preset mapping - - Free buffers when resetting samples - - Set default preset/bank/drumset as variable - - Fix a bug in exclusive note-off - - Add channel reset control macro - - Change modwheel sensitivity as variable - - Add lock option in open_patch - - Add channel priority mode macro, and disable it as default - - Add unset effect macro - - Add user defined chorus/reverb modes - - Do not initialize effect parameters when allocating voices - - Accept realtime filter-Q parameter change - - Check value range of set/add effects - - Change drum flags automatically when receiving bank #128 - -ver.0.4.1 development versions - -ver.0.4.0c - - Fix kernel oops when setting AWE_FX_ATTEN - -ver.0.4.0b - - Do not kill_note in start_note when velocity is zero - -ver.0.4.0a - - Fix a bug in channel pressure effects - -ver.0.4.0 - - Support dynamic buffer allocation - - Add functions to open/close/unload a patch - - Change from pointer to integer index in voice/sample lists - - Support for Linux/Alpha-AXP - - Fix for FreeBSD - - Add sostenuto control - - Add midi channel priority - - Fix a bug in all notes off control - - Use AWE_DEFAULT_MEMSIZE always if defined - - Fix a bug in awe_reset causes seg fault when no DRAM onboard - - Use awe_mem_start variable instead of constant - -ver.0.3.3c - - Fix IOCTL_TO_USER for OSS-3.8 (on Linux-2.1.25) - - Fix i/o macros for mixer controls - -ver.0.3.3b - - Fix version number in awe_version.h - - Fix a small bug in noteoff/release all - -ver.0.3.3a - - Fix all notes/sounds off - - Add layer effect control - - Add misc mode controls; realtime pan, version number, etc. - - Move gus bank control in misc mode control - - Modify awe_operations for OSS3.8b5 - - Fix installation script - -ver.0.3.3 - - Add bass/treble control in Emu8000 chip - - Add mixer device - - Fix sustain on to value 127 - -ver.0.3.2 - - Refuse linux-2.0.0 at installation - - Move awe_voice.h to /usr/include/linux - -ver.0.3.1b (not released) - - Rewrite chorus/reverb mode change functions - - Rewrite awe_detect & awe_check_dram routines - -ver.0.3.1a - - Fix a bug to reset voice counter in awe_reset - - Fix voice balance on GUS mode - - Make symlink on /usr/include/asm in install script - -ver.0.3.1 - - Remove zero size arrays from awe_voice.h - - Fix init_fm routine - - Remove all samples except primary samples in REMOVE_LAST_SAMPLES - -ver.0.3.0a - - Add AWE_NOTEOFF_ALL control - - Remove AWE_INIT_ATTEN control - -ver.0.3.0 - - Fix decay time table - - Add exclusive sounds mode - - Add capability to get current status - -ver.0.2.99e - - Add #ifdef for all sounds/notes off controls. - - Fix bugs on searching the default drumset/preset. - - Fix usslite patch to modify the default Config.in. - -ver.0.2.99d - - Fix bugs of attack/hold parameters - - Fix attack & decay time table - -ver.0.2.99c - - Change volume control messages (main & expression volume) - to accesspt normal MIDI parameters in channel mode. - - Use channel mode in SEQ2 controls. - -ver.0.2.99b - - #ifdef patch manager functions (for OSS-3.7) - -ver.0.2.99a - - Fix sustain bug - -ver.0.2.99 (0.3 beta) - - Support multiple instruments - -ver.0.2.0c - - Add copyright notice - - FreeBSD 2.2-ALPHA integration - -ver.0.2.0b - - Remove buffered reading appended in v0.2.0a - - Remove SMAxW register check on writing - - Support Linux 2.1.x kernel - - Rewrite installation script - -ver.0.2.0a - - Define SEQUENCER_C for tuning.h for FreeBSD system - - Improvement of sample loading speed - - Fix installation script - - Add PnP driver functions for ISA PnP driver support - -ver.0.2.0 - - Includes FreeBSD port - - Can load GUS compatible patches - - Change values of hardware control parameters for compatibility - with GUS driver - - Accept 8bit or unsigned wave data - - Accept no blank loop data - - Add sample mode flags in sample_info - -ver.0.1.6 - - Add voice effects control - - Fix awe_voice.h for word alignment - -ver.0.1.5c - - Fix FM(OPL) playback problem - -ver.0.1.5b - - Fix pitch calculation for fixed midi key - -ver.0.1.5a - - Fix bugs in removing samples from linked list. - -ver.0.1.5 - - Add checksum verification for sample uploading - (not compatible from older sample_info structure) - - Fix sample offset pointers to (actual value - 1) - - Add sequencer command to initialize awe32 - -ver.0.1.4c - - Fix card detection and memory check function to avoid system crash - at booting - -ver.0.1.4b - - Add release sustain mode - - Initialize FM each time after loading samples - -ver.0.1.4a - - Fix AWE card detection code - - Correct FM initialize position - - Add non-releasing mode on voice info - -ver.0.1.4 - - Add AWE card and DRAM detection codes - - Add FM initialization code - - Modify volume control - - Remove linear volume mode - - Change memory management; not using malloc dynamically - - Add remove-samples command - - Use internal id implicitly at loading samples - -ver.0.1.3 - - Fix a bug on patch uploading to RAM - -ver.0.1.2 - - Divide to separated packages - - Fix disagreed macro conditions - - Fix unresolved function bugs - - Integrate VoxWare and USS-Lite driver source (awe_voice.c) - and remove awe_card.c - -ver.0.1.1 - - Fix wrong sample numbers in sbktext - - Fix txt2sfx bug - - Fix pan parameter calculation - - Append USS-Lite/Linux2.0 driver - diff -Nru a/Documentation/sound/oss/ChangeLog.multisound b/Documentation/sound/oss/ChangeLog.multisound --- a/Documentation/sound/oss/ChangeLog.multisound 2004-11-29 21:22:07 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,213 +0,0 @@ -1998-12-04 Andrew T. Veliath - - * Update version to 0.8.2.2 - - * Add msndreset program to shell archive. - -1998-11-11 Andrew T. Veliath - - * msnd_pinnacle.c (mixer_ioctl): Add a mixer ioctl for - SOUND_MIXER_PRIVATE1 which does a full reset on the card. - (mixer_set): Move line in recording source to input monitor, aux - input level added, some mixer fixes. - -1998-09-10 Andrew Veliath - - * Update version to 0.8.2 - - * Add SNDCTL_DSP_GETOSPACE and SNDCTL_DSP_GETISPACE ioctls. - -1998-09-09 Andrew Veliath - - * Update version to 0.8.1 - - * msnd_pinnacle.c: Fix resetting of default audio parameters. Turn - flush code from dsp_halt into dsp_write_flush, and use that for - SNDCTL_DSP_SYNC. - -1998-09-07 Andrew Veliath - - * Update version to 0.8.0 - - * Provide separate signal parameters for play and record. - - * Cleanups to locking and interrupt handling, change default - fifosize to 128kB. - - * Update version to 0.7.15 - - * Interprocess full-duplex support (ie `cat /dev/dsp > /dev/dsp'). - - * More mutex sections for read and write fifos (read + write locks - added). - -1998-09-05 Andrew Veliath - - * msnd_pinnacle.c: (chk_send_dsp_cmd) Do full DSP reset upon DSP - timeout (when not in interrupt; maintains mixer settings). Fixes - to flushing and IRQ ref counting. Rewrote queuing for smoother - playback and fixed initial playback cutoff problem. - -1998-09-03 Andrew Veliath - - * Replaced packed structure accesses with standard C equivalents. - -1998-09-01 Andrew Veliath - - * msnd_pinnacle.c: Add non-PnP configuration to driver code, which - will facilitate compiled-in operation. - -1998-08-29 Andrew Veliath - - * Update version to 0.7.6 - - * msnd_pinnacle.c (dsp_ioctl): Add DSP_GETFMTS, change SAMPLESIZE - to DSP_SETFMT. - - * Update version to 0.7.5 - - * Create pinnaclecfg.c and turn MultiSound doc into a shell - archive with pinnaclecfg.c included. pinnaclecfg.c can - now fully configure the card in non-PnP mode, including the - joystick and IDE controller. Also add an isapnp conf - example. - - * Reduce DSP reset timeout from 20000 to 100 - -1998-08-06 Andrew Veliath - - * Update version to 0.7.2 - - * After A/D calibration, do an explicit set to the line input, - rather than using set_recsrc - -1998-07-20 Andrew Veliath - - * Update version to 0.7.1 - - * Add more OSS ioctls - -1998-07-19 Andrew Veliath - - * Update doc file - - * Bring back DIGITAL1 with digital parameter to msnd_pinnacle.c - and CONFIG_MSNDPIN_DIGITAL. I'm not sure this actually works, - since I find audio playback goes into a very speeded mode of - operation, however it might be due to a lack of a digital - source, which I don't have to test. - -1998-07-18 Andrew Veliath - - * Update version to 0.7.0 - - * Can now compile with Alan Cox' 2.0.34-modular-sound patch (so - now it requires >= 2.1.106 or 2.0.34-ms) (note for 2.0.34-ms it - is in the Experimental section) - - * More modularization, consolidation, also some MIDI hooks - installed for future MIDI modules - - * Write flush - - * Change default speed, channels, bit size to OSS/Free defaults - -1998-06-02 Andrew Veliath - - * Update version to 0.5b - - * Fix version detection - - * Remove underflow and overflow resets (delay was too long) - - * Replace spinlocked bitops with atomic bit ops - -1998-05-27 Andrew Veliath - - * Update version to 0.5a - - * Better recovery from underflow or overflow conditions - - * Fix a deadlock condition with one thread reading and the other - writing - -1998-05-26 Andrew Veliath - - * Update version to 0.5 - - * Separate reset queue functions for play and record - - * Add delays in dsp_halt - -1998-05-24 Andrew Veliath - - * Add a check for Linux >= 2.1.95 - - * Remove DIGITAL1 input until I figure out how to make it work - - * Add HAVE_DSPCODEH which when not defined will load firmware from - files using mod_firmware_load, then release memory after they - are uploaded (requires reorganized OSS). - -1998-05-22 Andrew Veliath - - * Update version to 0.4c - - * Hopefully fix the mixer volume problem - -1998-05-19 Andrew Veliath - - * Add __initfuncs and __initdatas to reduce resident code size - - * Move bunch of code around, remove some protos - - * Integrate preliminary changes for Alan Cox's OSS reorganization - for non-OSS drivers to coexist with OSS devices on the same - major. To compile standalone, must now define STANDALONE. - -1998-05-16 Andrew Veliath - - * Update version to 0.4b - - * Integrated older card support into a unified driver, tested on a - MultiSound Classic c/o Kendrick Vargas. - -1998-05-15 Andrew Veliath - - * Update version to 0.4 - - * Fix read/write return values - -1998-05-13 Andrew Veliath - - * Update version to 0.3 - - * Stop play gracefully - - * Add busy flag - - * Add major and calibrate_signal module parameters - - * Add ADC calibration - - * Add some OSS compatibility ioctls - - * Add mixer record selection - - * Add O_NONBLOCK support, separate read/write wait queues - - * Add sample bit size ioctl, expanded sample rate ioctl - - * Playback suspension now resumes - - * Use signal_pending after interruptible_sleep_on - - * Add recording, change ints to bit flags - -1998-05-11 Andrew Veliath - - * Update version to 0.2 - - * Add preliminary playback support - - * Use new Turtle Beach DSP code \ No newline at end of file diff -Nru a/MAINTAINERS b/MAINTAINERS --- a/MAINTAINERS 2004-11-29 21:22:07 -08:00 +++ b/MAINTAINERS 2004-11-29 21:22:07 -08:00 @@ -287,6 +287,12 @@ M: linux@treblig.org S: Maintained +ARM/PLEB SUPPORT +P: Peter Chubb +M: pleb@gelato.unsw.edu.au +W: http://www.disy.cse.unsw.edu.au/Hardware/PLEB +S: Maintained + ARM/PT DIGITAL BOARD PORT P: Stefan Eletzhofer M: stefan.eletzhofer@eletztrick.de @@ -805,7 +811,7 @@ EXT3 FILE SYSTEM P: Stephen Tweedie, Andrew Morton -M: sct@redhat.com, akpm@digeo.com, adilger@clusterfs.com +M: sct@redhat.com, akpm@osdl.org, adilger@clusterfs.com L: ext3-users@redhat.com S: Maintained @@ -1451,11 +1457,8 @@ S: Maintained MISCELLANEOUS MCA-SUPPORT -P: David Weinehall -M: Project MCA Team -M: David Weinehall -W: http://www.acc.umu.se/~tao/ -W: http://www.acc.umu.se/~mcalinux/ +P: James Bottomley +M: jejb@steeleye.com L: linux-kernel@vger.kernel.org S: Maintained @@ -1532,7 +1535,7 @@ NETWORK DEVICE DRIVERS P: Andrew Morton -M: akpm@digeo.com +M: akpm@osdl.org P: Jeff Garzik M: jgarzik@pobox.com L: linux-net@vger.kernel.org diff -Nru a/arch/alpha/Makefile b/arch/alpha/Makefile --- a/arch/alpha/Makefile 2004-11-29 21:22:07 -08:00 +++ b/arch/alpha/Makefile 2004-11-29 21:22:07 -08:00 @@ -11,7 +11,7 @@ NM := $(NM) -B LDFLAGS_vmlinux := -static -N #-relax -CHECKFLAGS += -D__alpha__ +CHECKFLAGS += -D__alpha__ -m64 cflags-y := -pipe -mno-fp-regs -ffixed-8 # Determine if we can use the BWX instructions with GAS. diff -Nru a/arch/arm/Kconfig b/arch/arm/Kconfig --- a/arch/arm/Kconfig 2004-11-29 21:22:07 -08:00 +++ b/arch/arm/Kconfig 2004-11-29 21:22:07 -08:00 @@ -393,7 +393,7 @@ config CPU_FREQ_SA1100 bool - depends on CPU_FREQ && SA1100_LART + depends on CPU_FREQ && (SA1100_LART || SA1100_PLEB) default y config CPU_FREQ_SA1110 diff -Nru a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug --- a/arch/arm/Kconfig.debug 2004-11-29 21:22:08 -08:00 +++ b/arch/arm/Kconfig.debug 2004-11-29 21:22:08 -08:00 @@ -105,14 +105,14 @@ config DEBUG_S3C2410_UART depends on ARCH_S3C2410 - int "S3C2410 UART to use for low-level messages and debug" + int "S3C2410 UART to use for low-level debug" default "0" help Choice for UART for kernel low-level using S3C2410 UARTS, should be between zero and two. The port must have been initalised by the boot-loader before use. - This will affect the port that the uncompressor code uses - to send debug information to. + The uncompressor code port configuration is now handled + by CONFIG_S3C2410_LOWLEVEL_UART_PORT. endmenu diff -Nru a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S --- a/arch/arm/boot/compressed/head.S 2004-11-29 21:22:08 -08:00 +++ b/arch/arm/boot/compressed/head.S 2004-11-29 21:22:08 -08:00 @@ -118,10 +118,9 @@ str \rb, [r3, #0] .endm #elif defined(CONFIG_ARCH_S3C2410) -#include .macro loadsp, rb mov \rb, #0x50000000 - add \rb, \rb, #0x4000 * CONFIG_DEBUG_S3C2410_UART + add \rb, \rb, #0x4000 * CONFIG_S3C2410_LOWLEVEL_UART_PORT .endm .macro writeb, rb strb \rb, [r3, #0x20] diff -Nru a/arch/arm/common/rtctime.c b/arch/arm/common/rtctime.c --- a/arch/arm/common/rtctime.c 2004-11-29 21:22:06 -08:00 +++ b/arch/arm/common/rtctime.c 2004-11-29 21:22:06 -08:00 @@ -179,7 +179,7 @@ static ssize_t -rtc_read(struct file *file, char *buf, size_t count, loff_t *ppos) +rtc_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { DECLARE_WAITQUEUE(wait, current); unsigned long data; @@ -215,7 +215,7 @@ remove_wait_queue(&rtc_wait, &wait); if (ret == 0) { - ret = put_user(data, (unsigned long *)buf); + ret = put_user(data, (unsigned long __user *)buf); if (ret == 0) ret = sizeof(unsigned long); } @@ -241,6 +241,7 @@ struct rtc_ops *ops = file->private_data; struct rtc_time tm; struct rtc_wkalrm alrm; + void __user *uarg = (void __user *)arg; int ret = -EINVAL; switch (cmd) { @@ -248,13 +249,13 @@ ret = rtc_read_alarm(ops, &alrm); if (ret) break; - ret = copy_to_user((void *)arg, &alrm.time, sizeof(tm)); + ret = copy_to_user(uarg, &alrm.time, sizeof(tm)); if (ret) ret = -EFAULT; break; case RTC_ALM_SET: - ret = copy_from_user(&alrm.time, (void *)arg, sizeof(tm)); + ret = copy_from_user(&alrm.time, uarg, sizeof(tm)); if (ret) { ret = -EFAULT; break; @@ -272,7 +273,7 @@ case RTC_RD_TIME: rtc_read_time(ops, &tm); - ret = copy_to_user((void *)arg, &tm, sizeof(tm)); + ret = copy_to_user(uarg, &tm, sizeof(tm)); if (ret) ret = -EFAULT; break; @@ -282,11 +283,12 @@ ret = -EACCES; break; } - ret = copy_from_user(&tm, (void *)arg, sizeof(tm)); - if (ret == 0) - ret = rtc_set_time(ops, &tm); - else + ret = copy_from_user(&tm, uarg, sizeof(tm)); + if (ret) { ret = -EFAULT; + break; + } + ret = rtc_set_time(ops, &tm); break; case RTC_EPOCH_SET: @@ -308,11 +310,11 @@ break; case RTC_EPOCH_READ: - ret = put_user(rtc_epoch, (unsigned long *)arg); + ret = put_user(rtc_epoch, (unsigned long __user *)uarg); break; case RTC_WKALM_SET: - ret = copy_from_user(&alrm, (void *)arg, sizeof(alrm)); + ret = copy_from_user(&alrm, uarg, sizeof(alrm)); if (ret) { ret = -EFAULT; break; @@ -324,7 +326,7 @@ ret = rtc_read_alarm(ops, &alrm); if (ret) break; - ret = copy_to_user((void *)arg, &alrm, sizeof(alrm)); + ret = copy_to_user(uarg, &alrm, sizeof(alrm)); if (ret) ret = -EFAULT; break; @@ -478,7 +480,7 @@ ret = misc_register(&rtc_miscdev); if (ret == 0) - create_proc_read_entry("driver/rtc", 0, 0, + create_proc_read_entry("driver/rtc", 0, NULL, rtc_read_proc, ops); } up(&rtc_sem); diff -Nru a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c --- a/arch/arm/common/sa1111.c 2004-11-29 21:22:08 -08:00 +++ b/arch/arm/common/sa1111.c 2004-11-29 21:22:08 -08:00 @@ -950,8 +950,10 @@ __sa1111_remove(sachip); dev_set_drvdata(dev, NULL); +#ifdef CONFIG_PM kfree(dev->power.saved_state); dev->power.saved_state = NULL; +#endif } return 0; diff -Nru a/arch/arm/configs/bast_defconfig b/arch/arm/configs/bast_defconfig --- a/arch/arm/configs/bast_defconfig 2004-11-29 21:22:07 -08:00 +++ b/arch/arm/configs/bast_defconfig 2004-11-29 21:22:07 -08:00 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10-rc1-bk2 -# Wed Oct 27 11:31:14 2004 +# Linux kernel version: 2.6.10-rc2 +# Mon Nov 15 15:32:48 2004 # CONFIG_ARM=y CONFIG_MMU=y @@ -39,6 +39,10 @@ CONFIG_EPOLL=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set # @@ -72,7 +76,7 @@ # CONFIG_ARCH_SHARK is not set # CONFIG_ARCH_LH7A40X is not set # CONFIG_ARCH_OMAP is not set -# CONFIG_ARCH_VERSATILE_PB is not set +# CONFIG_ARCH_VERSATILE is not set # CONFIG_ARCH_IMX is not set # CONFIG_ARCH_H720X is not set @@ -80,9 +84,10 @@ # S3C24XX Implementations # CONFIG_ARCH_BAST=y -CONFIG_ARCH_H1940=y -CONFIG_ARCH_SMDK2410=y +# CONFIG_ARCH_H1940 is not set +# CONFIG_ARCH_SMDK2410 is not set CONFIG_MACH_VR1000=y +# CONFIG_MACH_RX3715 is not set CONFIG_CPU_S3C2410=y # @@ -92,10 +97,7 @@ # CONFIG_S3C2410_DMA_DEBUG is not set # CONFIG_S3C2410_PM_DEBUG is not set # CONFIG_S3C2410_PM_CHECK is not set - -# -# h720x Implementations -# +CONFIG_S3C2410_LOWLEVEL_UART_PORT=0 # # Processor Type @@ -105,6 +107,7 @@ CONFIG_CPU_32v4=y CONFIG_CPU_ABRT_EV4T=y CONFIG_CPU_CACHE_V4WT=y +CONFIG_CPU_CACHE_VIVT=y CONFIG_CPU_COPY_V4WB=y CONFIG_CPU_TLB_V4WBI=y @@ -122,6 +125,7 @@ # CONFIG_ZBOOT_ROM is not set CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 +# CONFIG_XIP_KERNEL is not set # # At least one math emulation must be selected @@ -150,10 +154,7 @@ # Parallel port support # CONFIG_PARPORT=y -CONFIG_PARPORT_PC=y -CONFIG_PARPORT_PC_CML1=y -CONFIG_PARPORT_PC_FIFO=y -CONFIG_PARPORT_PC_SUPERIO=y +# CONFIG_PARPORT_PC is not set # CONFIG_PARPORT_ARC is not set CONFIG_PARPORT_OTHER=y CONFIG_PARPORT_1284=y @@ -163,8 +164,13 @@ # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_PARTITIONS is not set +CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set +CONFIG_MTD_REDBOOT_PARTS=y +CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y +# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set +CONFIG_MTD_CMDLINE_PARTS=y +# CONFIG_MTD_AFS_PARTS is not set # # User Modules And Translation Layers @@ -179,14 +185,14 @@ # RAM/ROM/Flash chip drivers # CONFIG_MTD_CFI=y -# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_JEDECPROBE=y CONFIG_MTD_GEN_PROBE=y # CONFIG_MTD_CFI_ADV_OPTIONS is not set CONFIG_MTD_MAP_BANK_WIDTH_1=y CONFIG_MTD_MAP_BANK_WIDTH_2=y CONFIG_MTD_MAP_BANK_WIDTH_4=y # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +CONFIG_MTD_MAP_BANK_WIDTH_16=y # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set CONFIG_MTD_CFI_I1=y CONFIG_MTD_CFI_I2=y @@ -208,7 +214,9 @@ # CONFIG_MTD_PHYSMAP is not set # CONFIG_MTD_ARM_INTEGRATOR is not set # CONFIG_MTD_EDB7312 is not set -# CONFIG_MTD_BAST is not set +# CONFIG_MTD_IMPA7 is not set +CONFIG_MTD_BAST=y +CONFIG_MTD_BAST_MAXSIZE=4 # # Self-contained MTD device drivers @@ -228,7 +236,13 @@ # # NAND Flash Device Drivers # -# CONFIG_MTD_NAND is not set +CONFIG_MTD_NAND=y +# CONFIG_MTD_NAND_VERIFY_WRITE is not set +CONFIG_MTD_NAND_IDS=y +CONFIG_MTD_NAND_S3C2410=y +# CONFIG_MTD_NAND_S3C2410_DEBUG is not set +# CONFIG_MTD_NAND_S3C2410_HWECC is not set +# CONFIG_MTD_NAND_DISKONCHIP is not set # # Plug and Play support @@ -288,6 +302,8 @@ # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set # CONFIG_INET_TUNNEL is not set +CONFIG_IP_TCPDIAG=y +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -307,7 +323,6 @@ # 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 @@ -527,7 +542,8 @@ # CONFIG_SOFT_WATCHDOG is not set CONFIG_S3C2410_WATCHDOG=y # CONFIG_NVRAM is not set -CONFIG_RTC=y +# CONFIG_RTC is not set +CONFIG_S3C2410_RTC=y # CONFIG_DTLK is not set # CONFIG_R3964 is not set @@ -557,7 +573,6 @@ # CONFIG_I2C_PARPORT is not set # CONFIG_I2C_PARPORT_LIGHT is not set CONFIG_I2C_S3C2410=y -# CONFIG_SCx200_ACB is not set # CONFIG_I2C_STUB is not set # CONFIG_I2C_PCA_ISA is not set @@ -573,6 +588,7 @@ # CONFIG_SENSORS_FSCHER is not set # CONFIG_SENSORS_GL518SM is not set # CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_LM63 is not set CONFIG_SENSORS_LM75=m # CONFIG_SENSORS_LM77 is not set CONFIG_SENSORS_LM78=m @@ -582,6 +598,7 @@ # CONFIG_SENSORS_LM87 is not set # CONFIG_SENSORS_LM90 is not set # CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_PC87360 is not set # CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_W83781D is not set # CONFIG_SENSORS_W83L785TS is not set @@ -627,6 +644,7 @@ # CONFIG_MINIX_FS is not set CONFIG_ROMFS_FS=y # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set diff -Nru a/arch/arm/configs/pleb_defconfig b/arch/arm/configs/pleb_defconfig --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/configs/pleb_defconfig 2004-11-29 21:22:09 -08:00 @@ -0,0 +1,699 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.10-rc2 +# Wed Nov 24 15:12:32 2004 +# +CONFIG_ARM=y +CONFIG_MMU=y +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_IOMAP=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_LOCALVERSION="" +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_HOTPLUG is not set +# CONFIG_KOBJECT_UEVENT is not set +# CONFIG_IKCONFIG is not set +CONFIG_EMBEDDED=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +# CONFIG_SHMEM is not set +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +CONFIG_TINY_SHMEM=y + +# +# Loadable module support +# +CONFIG_MODULES=y +# CONFIG_MODULE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_KMOD=y + +# +# System Type +# +# CONFIG_ARCH_CLPS7500 is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_CO285 is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_CAMELOT is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_IOP3XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_PXA is not set +# CONFIG_ARCH_RPC is not set +CONFIG_ARCH_SA1100=y +# CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set + +# +# SA11x0 Implementations +# +# CONFIG_SA1100_ASSABET is not set +# CONFIG_SA1100_CERF is not set +# CONFIG_SA1100_COLLIE is not set +# CONFIG_SA1100_H3100 is not set +# CONFIG_SA1100_H3600 is not set +# CONFIG_SA1100_H3800 is not set +# CONFIG_SA1100_BADGE4 is not set +# CONFIG_SA1100_JORNADA720 is not set +# CONFIG_SA1100_HACKKIT is not set +# CONFIG_SA1100_LART is not set +CONFIG_SA1100_PLEB=y +# CONFIG_SA1100_SHANNON is not set +# CONFIG_SA1100_SIMPAD is not set +# CONFIG_SA1100_SSP is not set +# CONFIG_SA1100_USB is not set + +# +# Processor Type +# +CONFIG_CPU_32=y +CONFIG_CPU_SA1100=y +CONFIG_CPU_32v4=y +CONFIG_CPU_ABRT_EV4=y +CONFIG_CPU_CACHE_V4WB=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_TLB_V4WB=y +CONFIG_CPU_MINICACHE=y + +# +# Processor Features +# + +# +# General setup +# +CONFIG_DISCONTIGMEM=y +CONFIG_ISA=y +# CONFIG_ZBOOT_ROM is not set +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +# CONFIG_XIP_KERNEL is not set +CONFIG_CPU_FREQ=y +# CONFIG_CPU_FREQ_DEBUG is not set +# CONFIG_CPU_FREQ_PROC_INTF is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set +# CONFIG_CPU_FREQ_GOV_USERSPACE is not set +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_SA1100=y + +# +# At least one math emulation must be selected +# +CONFIG_FPE_NWFPE=y +# CONFIG_FPE_NWFPE_XP is not set +# CONFIG_FPE_FASTFPE is not set +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_AOUT is not set +# CONFIG_BINFMT_MISC is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_PM is not set +# CONFIG_PREEMPT is not set +# CONFIG_ARTHUR is not set +CONFIG_CMDLINE="console=ttySA0,9600 mem=16M@0xc0000000 mem=16M@0xc8000000 root=/dev/ram initrd=0xc0400000,4M" +# CONFIG_LEDS is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Memory Technology Devices (MTD) +# +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_CONCAT is not set +CONFIG_MTD_REDBOOT_PARTS=y +CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y +# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set +CONFIG_MTD_CMDLINE_PARTS=y +# CONFIG_MTD_AFS_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set + +# +# RAM/ROM/Flash chip drivers +# +CONFIG_MTD_CFI=y +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_GEN_PROBE=y +# CONFIG_MTD_CFI_ADV_OPTIONS is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +CONFIG_MTD_CFI_INTELEXT=y +# CONFIG_MTD_CFI_AMDSTD is not set +# CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PHYSMAP is not set +# CONFIG_MTD_ARM_INTEGRATOR is not set +CONFIG_MTD_SA1100=y +# CONFIG_MTD_EDB7312 is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLKMTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set + +# +# NAND Flash Device Drivers +# +# CONFIG_MTD_NAND is not set + +# +# Plug and Play support +# +# CONFIG_PNP is not set + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_XD is not set +CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +# CONFIG_BLK_DEV_NBD is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=8192 +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_AS is not set +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Networking support +# +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +# 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=y +# 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_IP_TCPDIAG is not set +# CONFIG_IP_TCPDIAG_IPV6 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 + +# +# 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 is not set +# 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_NET_VENDOR_3COM is not set +# CONFIG_LANCE is not set +# CONFIG_NET_VENDOR_SMC is not set +CONFIG_SMC91X=y +# CONFIG_NET_VENDOR_RACAL is not set +# CONFIG_AT1700 is not set +# CONFIG_DEPCA is not set +# CONFIG_HP100 is not set +# CONFIG_NET_ISA is not set +# CONFIG_NET_PCI is not set +# CONFIG_NET_POCKET is not set + +# +# Ethernet (1000 Mbit) +# + +# +# Ethernet (10000 Mbit) +# + +# +# 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_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Input device support +# +# CONFIG_INPUT is not set + +# +# Userland interfaces +# + +# +# Input I/O drivers +# +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y +# CONFIG_SERIO is not set + +# +# Input Device Drivers +# + +# +# Character devices +# +# CONFIG_VT is not set +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_SA1100=y +CONFIG_SERIAL_SA1100_CONSOLE=y +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_NVRAM is not set +# CONFIG_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +CONFIG_EXT3_FS=y +# CONFIG_EXT3_FS_XATTR is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_QUOTA is not set +# CONFIG_DNOTIFY is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=m +CONFIG_MSDOS_FS=m +CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_SYSFS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVPTS_FS_XATTR is not set +CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set +# CONFIG_HUGETLB_PAGE is not set +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_JFFS_FS is not set +# CONFIG_JFFS2_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 is not set +CONFIG_NFS_DIRECTIO=y +# CONFIG_NFSD is not set +CONFIG_LOCKD=m +CONFIG_LOCKD_V4=y +# CONFIG_EXPORTFS is not set +CONFIG_SUNRPC=m +# 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 +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y + +# +# Native Language Support +# +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +# CONFIG_NLS_CODEPAGE_437 is not set +# 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 is not set +# 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 is not set + +# +# Profiling support +# +# CONFIG_PROFILING is not set + +# +# Graphics support +# +# CONFIG_FB is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# Misc devices +# + +# +# USB support +# +# CONFIG_USB is not set +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# Kernel hacking +# +CONFIG_DEBUG_KERNEL=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_INFO is not set +CONFIG_FRAME_POINTER=y +# CONFIG_DEBUG_USER is not set +# CONFIG_DEBUG_WAITQ is not set +# CONFIG_DEBUG_ERRORS is not set +# CONFIG_DEBUG_LL is not set + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# +# Library routines +# +# CONFIG_CRC_CCITT is not set +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set diff -Nru a/arch/arm/configs/s3c2410_defconfig b/arch/arm/configs/s3c2410_defconfig --- a/arch/arm/configs/s3c2410_defconfig 2004-11-29 21:22:07 -08:00 +++ b/arch/arm/configs/s3c2410_defconfig 2004-11-29 21:22:07 -08:00 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10-rc1-bk22 -# Fri Nov 12 23:28:44 2004 +# Linux kernel version: 2.6.10-rc2 +# Mon Nov 15 15:29:42 2004 # CONFIG_ARM=y CONFIG_MMU=y @@ -98,6 +98,7 @@ # CONFIG_S3C2410_DMA_DEBUG is not set # CONFIG_S3C2410_PM_DEBUG is not set # CONFIG_S3C2410_PM_CHECK is not set +CONFIG_S3C2410_LOWLEVEL_UART_PORT=0 # # Processor Type @@ -164,8 +165,13 @@ # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_PARTITIONS is not set +CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set +CONFIG_MTD_REDBOOT_PARTS=y +CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y +# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set +CONFIG_MTD_CMDLINE_PARTS=y +# CONFIG_MTD_AFS_PARTS is not set # # User Modules And Translation Layers @@ -180,14 +186,14 @@ # RAM/ROM/Flash chip drivers # CONFIG_MTD_CFI=y -# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_JEDECPROBE=y CONFIG_MTD_GEN_PROBE=y # CONFIG_MTD_CFI_ADV_OPTIONS is not set CONFIG_MTD_MAP_BANK_WIDTH_1=y CONFIG_MTD_MAP_BANK_WIDTH_2=y CONFIG_MTD_MAP_BANK_WIDTH_4=y # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +CONFIG_MTD_MAP_BANK_WIDTH_16=y # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set CONFIG_MTD_CFI_I1=y CONFIG_MTD_CFI_I2=y @@ -209,7 +215,9 @@ # CONFIG_MTD_PHYSMAP is not set # CONFIG_MTD_ARM_INTEGRATOR is not set # CONFIG_MTD_EDB7312 is not set -# CONFIG_MTD_BAST is not set +# CONFIG_MTD_IMPA7 is not set +CONFIG_MTD_BAST=y +CONFIG_MTD_BAST_MAXSIZE=4 # # Self-contained MTD device drivers @@ -229,7 +237,13 @@ # # NAND Flash Device Drivers # -# CONFIG_MTD_NAND is not set +CONFIG_MTD_NAND=y +# CONFIG_MTD_NAND_VERIFY_WRITE is not set +CONFIG_MTD_NAND_IDS=y +CONFIG_MTD_NAND_S3C2410=y +# CONFIG_MTD_NAND_S3C2410_DEBUG is not set +# CONFIG_MTD_NAND_S3C2410_HWECC is not set +# CONFIG_MTD_NAND_DISKONCHIP is not set # # Plug and Play support @@ -529,7 +543,8 @@ # CONFIG_SOFT_WATCHDOG is not set CONFIG_S3C2410_WATCHDOG=y # CONFIG_NVRAM is not set -CONFIG_RTC=y +# CONFIG_RTC is not set +CONFIG_S3C2410_RTC=y # CONFIG_DTLK is not set # CONFIG_R3964 is not set diff -Nru a/arch/arm/configs/simpad_defconfig b/arch/arm/configs/simpad_defconfig --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/configs/simpad_defconfig 2004-11-29 21:22:09 -08:00 @@ -0,0 +1,896 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.9-rc2 +# Thu Sep 16 15:42:43 2004 +# +CONFIG_ARM=y +CONFIG_MMU=y +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_IOMAP=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_LOCALVERSION="oe1" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_HOTPLUG=y +# CONFIG_IKCONFIG is not set +CONFIG_EMBEDDED=y +CONFIG_KALLSYMS=y +CONFIG_KALLSYMS_ALL=y +CONFIG_KALLSYMS_EXTRA_PASS=y +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=y +CONFIG_SHMEM=y +# CONFIG_TINY_SHMEM is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +# CONFIG_MODULE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y + +# +# System Type +# +# CONFIG_ARCH_CLPS7500 is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_CO285 is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_CAMELOT is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_IOP3XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_PXA is not set +# CONFIG_ARCH_RPC is not set +CONFIG_ARCH_SA1100=y +# CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE_PB is not set +# CONFIG_ARCH_IMX is not set + +# +# SA11x0 Implementations +# +# CONFIG_SA1100_ASSABET is not set +# CONFIG_SA1100_ADSBITSY is not set +# CONFIG_SA1100_BRUTUS is not set +# CONFIG_SA1100_CERF is not set +# CONFIG_SA1100_COLLIE is not set +# CONFIG_SA1100_H3100 is not set +# CONFIG_SA1100_H3600 is not set +# CONFIG_SA1100_H3800 is not set +# CONFIG_SA1100_EXTENEX1 is not set +# CONFIG_SA1100_FLEXANET is not set +# CONFIG_SA1100_FREEBIRD is not set +# CONFIG_SA1100_GRAPHICSCLIENT is not set +# CONFIG_SA1100_GRAPHICSMASTER is not set +# CONFIG_SA1100_BADGE4 is not set +# CONFIG_SA1100_JORNADA720 is not set +# CONFIG_SA1100_HACKKIT is not set +# CONFIG_SA1100_HUW_WEBPANEL is not set +# CONFIG_SA1100_ITSY is not set +# CONFIG_SA1100_LART is not set +# CONFIG_SA1100_NANOENGINE is not set +# CONFIG_SA1100_OMNIMETER is not set +# CONFIG_SA1100_PANGOLIN is not set +# CONFIG_SA1100_PLEB is not set +# CONFIG_SA1100_PT_SYSTEM3 is not set +# CONFIG_SA1100_SHANNON is not set +# CONFIG_SA1100_SHERMAN is not set +CONFIG_SA1100_SIMPAD=y +# CONFIG_SA1100_PFS168 is not set +# CONFIG_SA1100_VICTOR is not set +# CONFIG_SA1100_XP860 is not set +# CONFIG_SA1100_YOPY is not set +# CONFIG_SA1100_STORK is not set +# CONFIG_SA1100_SSP is not set +# CONFIG_SA1100_USB is not set + +# +# Processor Type +# +CONFIG_CPU_32=y +CONFIG_CPU_SA1100=y +CONFIG_CPU_32v4=y +CONFIG_CPU_ABRT_EV4=y +CONFIG_CPU_CACHE_V4WB=y +CONFIG_CPU_TLB_V4WB=y +CONFIG_CPU_MINICACHE=y + +# +# Processor Features +# + +# +# General setup +# +CONFIG_DISCONTIGMEM=y +CONFIG_ISA=y +# CONFIG_ZBOOT_ROM is not set +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +# CONFIG_CPU_FREQ is not set + +# +# PCMCIA/CardBus support +# +CONFIG_PCMCIA=y +# CONFIG_PCMCIA_DEBUG is not set +# CONFIG_I82365 is not set +# CONFIG_TCIC is not set +CONFIG_PCMCIA_SA1100=y + +# +# At least one math emulation must be selected +# +CONFIG_FPE_NWFPE=y +# CONFIG_FPE_NWFPE_XP is not set +# CONFIG_FPE_FASTFPE is not set +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_AOUT is not set +CONFIG_BINFMT_MISC=m + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=m +# CONFIG_DEBUG_DRIVER is not set +CONFIG_PM=y +CONFIG_PREEMPT=y +CONFIG_APM=y +# CONFIG_ARTHUR is not set +CONFIG_CMDLINE="mtdparts=sa1100:512k(boot),1m(kernel),-(root) console=ttySA0 root=1f02 noinitrd mem=64M jffs2_orphaned_inodes=delete rootfstype=jffs2" +CONFIG_LEDS=y +CONFIG_LEDS_TIMER=y +# CONFIG_LEDS_CPU is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Memory Technology Devices (MTD) +# +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +CONFIG_MTD_PARTITIONS=y +CONFIG_MTD_CONCAT=y +# CONFIG_MTD_REDBOOT_PARTS is not set +CONFIG_MTD_CMDLINE_PARTS=y +# CONFIG_MTD_AFS_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set + +# +# RAM/ROM/Flash chip drivers +# +CONFIG_MTD_CFI=y +CONFIG_MTD_JEDECPROBE=y +CONFIG_MTD_GEN_PROBE=y +CONFIG_MTD_CFI_ADV_OPTIONS=y +CONFIG_MTD_CFI_NOSWAP=y +# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set +# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set +CONFIG_MTD_CFI_GEOMETRY=y +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +# CONFIG_MTD_CFI_I2 is not set +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +CONFIG_MTD_CFI_INTELEXT=y +# CONFIG_MTD_CFI_AMDSTD is not set +# CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y +CONFIG_MTD_RAM=y +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PHYSMAP is not set +# CONFIG_MTD_ARM_INTEGRATOR is not set +CONFIG_MTD_SA1100=y +# CONFIG_MTD_EDB7312 is not set +# CONFIG_MTD_IMPA7 is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLKMTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set + +# +# NAND Flash Device Drivers +# +# CONFIG_MTD_NAND is not set + +# +# Plug and Play support +# +# CONFIG_PNP is not set + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_XD is not set +CONFIG_BLK_DEV_LOOP=m +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +# CONFIG_BLK_DEV_NBD is not set +CONFIG_BLK_DEV_RAM=m +CONFIG_BLK_DEV_RAM_SIZE=8192 + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD 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=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +# CONFIG_IP_PNP_RARP 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=m + +# +# IrDA protocols +# +CONFIG_IRLAN=m +CONFIG_IRNET=m +CONFIG_IRCOMM=m +# CONFIG_IRDA_ULTRA is not set + +# +# IrDA options +# +# CONFIG_IRDA_CACHE_LAST_LSAP is not set +# CONFIG_IRDA_FAST_RR is not set +# CONFIG_IRDA_DEBUG is not set + +# +# Infrared-port device drivers +# + +# +# SIR device drivers +# +CONFIG_IRTTY_SIR=m + +# +# Dongle support +# +# CONFIG_DONGLE is not set + +# +# Old SIR device drivers +# +CONFIG_IRPORT_SIR=m + +# +# Old Serial dongle support +# +# CONFIG_DONGLE_OLD is not set + +# +# FIR device drivers +# +# CONFIG_NSC_FIR is not set +# CONFIG_WINBOND_FIR is not set +# CONFIG_SMC_IRCC_FIR is not set +# CONFIG_ALI_FIR is not set +CONFIG_SA1100_FIR=m +CONFIG_BT=m +CONFIG_BT_L2CAP=m +CONFIG_BT_SCO=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +# CONFIG_BT_HIDP is not set + +# +# Bluetooth device drivers +# +# CONFIG_BT_HCIUART is not set +CONFIG_BT_HCIDTL1=m +CONFIG_BT_HCIBT3C=m +CONFIG_BT_HCIBLUECARD=m +CONFIG_BT_HCIBTUART=m +# CONFIG_BT_HCIVHCI 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=m +# CONFIG_NET_VENDOR_3COM is not set +# CONFIG_LANCE is not set +# CONFIG_NET_VENDOR_SMC is not set +# CONFIG_SMC91X is not set +# CONFIG_NET_VENDOR_RACAL is not set +# CONFIG_AT1700 is not set +# CONFIG_DEPCA is not set +# CONFIG_HP100 is not set +# CONFIG_NET_ISA is not set +CONFIG_NET_PCI=y +# CONFIG_AC3200 is not set +# CONFIG_APRICOT is not set +# CONFIG_CS89x0 is not set +# CONFIG_NET_POCKET is not set + +# +# Ethernet (1000 Mbit) +# + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# +# CONFIG_TR is not set + +# +# Wireless LAN (non-hamradio) +# +CONFIG_NET_RADIO=y + +# +# Obsolete Wireless cards support (pre-802.11) +# +# CONFIG_STRIP is not set +# CONFIG_ARLAN is not set +# CONFIG_WAVELAN is not set +CONFIG_PCMCIA_WAVELAN=m +# CONFIG_PCMCIA_NETWAVE is not set + +# +# Wireless 802.11 Frequency Hopping cards support +# +# CONFIG_PCMCIA_RAYCS is not set + +# +# Wireless 802.11b ISA/PCI cards support +# +# CONFIG_HERMES is not set +# CONFIG_ATMEL is not set + +# +# Wireless 802.11b Pcmcia/Cardbus cards support +# +CONFIG_AIRO_CS=m +# CONFIG_PCMCIA_WL3501 is not set +CONFIG_NET_WIRELESS=y + +# +# PCMCIA network device support +# +CONFIG_NET_PCMCIA=y +CONFIG_PCMCIA_3C589=m +CONFIG_PCMCIA_3C574=m +# CONFIG_PCMCIA_FMVJ18X is not set +CONFIG_PCMCIA_PCNET=m +# CONFIG_PCMCIA_NMCLAN is not set +CONFIG_PCMCIA_SMC91C92=m +CONFIG_PCMCIA_XIRC2PS=m +# CONFIG_PCMCIA_AXNET is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +CONFIG_PPP=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPPOE=m +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# ISDN subsystem +# +# CONFIG_ISDN 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=800 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=600 +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_TSDEV=y +CONFIG_INPUT_TSDEV_SCREEN_X=800 +CONFIG_INPUT_TSDEV_SCREEN_Y=600 +CONFIG_INPUT_EVDEV=m +CONFIG_INPUT_EVBUG=y + +# +# Input I/O drivers +# +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y +CONFIG_SERIO=m +CONFIG_SERIO_SERPORT=m +CONFIG_SERIO_CT82C710=m + +# +# Input Device Drivers +# +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE 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 is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_SA1100=y +CONFIG_SERIAL_SA1100_CONSOLE=y +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_NVRAM is not set +# CONFIG_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_DRM is not set + +# +# PCMCIA character devices +# +# CONFIG_SYNCLINK_CS is not set +# CONFIG_RAW_DRIVER is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# File systems +# +CONFIG_EXT2_FS=m +# CONFIG_EXT2_FS_XATTR is not set +CONFIG_EXT3_FS=m +CONFIG_EXT3_FS_XATTR=y +# CONFIG_EXT3_FS_POSIX_ACL is not set +# CONFIG_EXT3_FS_SECURITY is not set +CONFIG_JBD=m +# CONFIG_JBD_DEBUG is not set +CONFIG_FS_MBCACHE=m +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +CONFIG_REISERFS_PROC_INFO=y +# CONFIG_REISERFS_FS_XATTR is not set +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_QUOTA is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=m +CONFIG_MSDOS_FS=m +CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_SYSFS=y +CONFIG_DEVFS_FS=y +CONFIG_DEVFS_MOUNT=y +# CONFIG_DEVFS_DEBUG is not set +# CONFIG_DEVPTS_FS_XATTR is not set +# CONFIG_TMPFS is not set +# CONFIG_HUGETLB_PAGE is not set +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_JFFS_FS=m +CONFIG_JFFS_FS_VERBOSE=0 +# CONFIG_JFFS_PROC_FS is not set +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +# CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set +CONFIG_CRAMFS=m +# 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=y +CONFIG_NFS_V3=y +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set +# CONFIG_NFSD is not set +# CONFIG_ROOT_NFS is not set +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +# 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=m +# CONFIG_SMB_NLS_DEFAULT is not set +# CONFIG_CIFS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set + +# +# 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=y +# 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=y +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_UTF8 is not set + +# +# Profiling support +# +# CONFIG_PROFILING is not set + +# +# Graphics support +# +CONFIG_FB=y +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_SA1100 is not set +CONFIG_FB_MQ200=y +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +# CONFIG_MDA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y + +# +# Logo configuration +# +CONFIG_LOGO=y +CONFIG_LOGO_LINUX_MONO=y +CONFIG_LOGO_LINUX_VGA16=y +CONFIG_LOGO_LINUX_CLUT224=y + +# +# Sound +# +CONFIG_SOUND=y + +# +# Advanced Linux Sound Architecture +# +# CONFIG_SND is not set + +# +# Open Sound System +# +# CONFIG_SOUND_PRIME is not set + +# +# Misc devices +# + +# +# USB support +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# Kernel hacking +# +CONFIG_DEBUG_KERNEL=y +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_SPINLOCK is not set +CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_INFO is not set +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_WAITQ is not set +CONFIG_DEBUG_ERRORS=y +CONFIG_DEBUG_LL=y +# CONFIG_DEBUG_ICEDCC is not set + +# +# Security options +# +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# +# Library routines +# +CONFIG_CRC_CCITT=m +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y diff -Nru a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S --- a/arch/arm/kernel/head.S 2004-11-29 21:22:06 -08:00 +++ b/arch/arm/kernel/head.S 2004-11-29 21:22:06 -08:00 @@ -1,5 +1,5 @@ /* - * linux/arch/arm/kernel/head-armv.S + * linux/arch/arm/kernel/head.S * * Copyright (C) 1994-2002 Russell King * diff -Nru a/arch/arm/mach-footbridge/netwinder-hw.c b/arch/arm/mach-footbridge/netwinder-hw.c --- a/arch/arm/mach-footbridge/netwinder-hw.c 2004-11-29 21:22:06 -08:00 +++ b/arch/arm/mach-footbridge/netwinder-hw.c 2004-11-29 21:22:06 -08:00 @@ -58,7 +58,7 @@ outb(reg, 0x370); outb(val >> 8, 0x371); outb(reg + 1, 0x370); - outb(val, 0x371); + outb(val & 255, 0x371); } #define wb977_device_select(dev) wb977_wb(0x07, dev) @@ -488,7 +488,7 @@ WRITE_RWA(7, 0); dprintk("WaveArtist base: "); - WRITE_RWA(0x61, base); + WRITE_RWA(0x61, base & 255); i = inb(0x203); WRITE_RWA(0x60, base >> 8); @@ -510,7 +510,7 @@ WRITE_RWA(7, 1); dprintk("SoundBlaster base: "); - WRITE_RWA(0x61, sb_base); + WRITE_RWA(0x61, sb_base & 255); i = inb(0x203); WRITE_RWA(0x60, sb_base >> 8); @@ -525,7 +525,7 @@ dprintk("%d (%d)\n", inb(0x203), dma); dprintk("AdLib base: "); - WRITE_RWA(0x63, al_base); + WRITE_RWA(0x63, al_base & 255); i = inb(0x203); WRITE_RWA(0x62, al_base >> 8); diff -Nru a/arch/arm/mach-ixp2000/Makefile.boot b/arch/arm/mach-ixp2000/Makefile.boot --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/mach-ixp2000/Makefile.boot 2004-11-29 21:22:09 -08:00 @@ -0,0 +1,3 @@ + zreladdr-y := 0x00008000 +params_phys-y := 0x00000100 + diff -Nru a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c --- a/arch/arm/mach-ixp2000/core.c 2004-11-29 21:22:08 -08:00 +++ b/arch/arm/mach-ixp2000/core.c 2004-11-29 21:22:08 -08:00 @@ -9,7 +9,7 @@ * * Based on work Copyright (C) 2002-2003 Intel Corporation * - * This file is licensed under the terms of the GNU General Public + * This file is licensed under the terms of the GNU General Public * License version 2. This program is licensed "as is" without any * warranty of any kind, whether express or implied. */ @@ -309,41 +309,6 @@ .unmask = ixp2000_pci_irq_unmask }; -/* - * Error interrupts. These are used extensively by the microengine drivers - */ -static void ixp2000_err_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) -{ - int i; - unsigned long status = *IXP2000_IRQ_ERR_STATUS; - - - for (i = 0; i <= 12; i++) { - if (status & (1 << i)) { - desc = irq_desc + IRQ_IXP2000_DRAM0_MIN_ERR + i; - desc->handle(IRQ_IXP2000_DRAM0_MIN_ERR + i, desc, regs); - } - } -} - -static void ixp2000_err_irq_mask(unsigned int irq) -{ - ixp2000_reg_write(IXP2000_IRQ_ERR_ENABLE_CLR, - (1 << (irq - IRQ_IXP2000_DRAM0_MIN_ERR))); -} - -static void ixp2000_err_irq_unmask(unsigned int irq) -{ - ixp2000_reg_write(IXP2000_IRQ_ERR_ENABLE_SET, - (1 << (irq - IRQ_IXP2000_DRAM0_MIN_ERR))); -} - -static struct irqchip ixp2000_err_irq_chip = { - .ack = ixp2000_err_irq_mask, - .mask = ixp2000_err_irq_mask, - .unmask = ixp2000_err_irq_unmask -}; - static void ixp2000_irq_mask(unsigned int irq) { ixp2000_reg_write(IXP2000_IRQ_ENABLE_CLR, (1 << irq)); @@ -387,7 +352,7 @@ * we mark the reserved IRQs as invalid. This makes * our mask/unmask code much simpler. */ - for (irq = IRQ_IXP2000_SWI; irq <= IRQ_IXP2000_THDB3; irq++) { + for (irq = IRQ_IXP2000_SOFT_INT; irq <= IRQ_IXP2000_THDB3; irq++) { if((1 << irq) & IXP2000_VALID_IRQ_MASK) { set_irq_chip(irq, &ixp2000_irq_chip); set_irq_handler(irq, do_level_IRQ); @@ -409,18 +374,11 @@ /* * Enable PCI irq */ - *(IXP2000_IRQ_ENABLE_SET) = (1 << IRQ_IXP2000_PCI); + ixp2000_reg_write(IXP2000_IRQ_ENABLE_SET, (1 << IRQ_IXP2000_PCI)); for (irq = IRQ_IXP2000_PCIA; irq <= IRQ_IXP2000_PCIB; irq++) { set_irq_chip(irq, &ixp2000_pci_irq_chip); set_irq_handler(irq, do_level_IRQ); set_irq_flags(irq, IRQF_VALID); } - - for (irq = IRQ_IXP2000_DRAM0_MIN_ERR; irq <= IRQ_IXP2000_SP_INT; irq++) { - set_irq_chip(irq, &ixp2000_err_irq_chip); - set_irq_handler(irq, do_level_IRQ); - set_irq_flags(irq, IRQF_VALID); - } - set_irq_chained_handler(IRQ_IXP2000_ERRSUM, ixp2000_err_irq_handler); } diff -Nru a/arch/arm/mach-ixp2000/ixdp2x00.c b/arch/arm/mach-ixp2000/ixdp2x00.c --- a/arch/arm/mach-ixp2000/ixdp2x00.c 2004-11-29 21:22:06 -08:00 +++ b/arch/arm/mach-ixp2000/ixdp2x00.c 2004-11-29 21:22:06 -08:00 @@ -194,7 +194,7 @@ * Linux is a common design in telecom systems. The problem is that instead * of all the devices being controlled by a single host, different * devices are controlles by different NPUs on the same bus, leading to - * multiple hosts on the bus.i The exact bus layout looks like: + * multiple hosts on the bus. The exact bus layout looks like: * * Bus 0 * Master NPU <-------------------+-------------------> Slave NPU @@ -210,9 +210,9 @@ * ... Dev PMC Media Eth0 Eth1 ... * * The master controlls all but Eth1, which is controlled by the - * slave. What this measn is that the both the master and the slave + * slave. What this means is that the both the master and the slave * have to scan the bus, but only one of them can enumerate the bus. - * In addition, after the bus is scaned, each kernel must remove + * In addition, after the bus is scanned, each kernel must remove * the device(s) it does not control from the PCI dev list otherwise * a driver on each NPU will try to manage it and we will have horrible * conflicts. Oh..and the slave NPU needs to see the master NPU diff -Nru a/arch/arm/mach-ixp2000/ixdp2x01.c b/arch/arm/mach-ixp2000/ixdp2x01.c --- a/arch/arm/mach-ixp2000/ixdp2x01.c 2004-11-29 21:22:06 -08:00 +++ b/arch/arm/mach-ixp2000/ixdp2x01.c 2004-11-29 21:22:06 -08:00 @@ -51,12 +51,14 @@ *************************************************************************/ static void ixdp2x01_irq_mask(unsigned int irq) { - *IXDP2X01_INT_MASK_SET_REG = IXP2000_BOARD_IRQ_MASK(irq); + ixp2000_reg_write(IXDP2X01_INT_MASK_SET_REG, + IXP2000_BOARD_IRQ_MASK(irq)); } static void ixdp2x01_irq_unmask(unsigned int irq) { - *IXDP2X01_INT_MASK_CLR_REG = IXP2000_BOARD_IRQ_MASK(irq); + ixp2000_reg_write(IXDP2X01_INT_MASK_CLR_REG, + IXP2000_BOARD_IRQ_MASK(irq)); } static u32 valid_irq_mask; @@ -111,8 +113,8 @@ valid_irq_mask = IXDP2801_VALID_IRQ_MASK; /* Mask all interrupts from CPLD, disable simulation */ - *IXDP2X01_INT_MASK_SET_REG = 0xffffffff; - *IXDP2X01_INT_SIM_REG = 0; + ixp2000_reg_write(IXDP2X01_INT_MASK_SET_REG, 0xffffffff); + ixp2000_reg_write(IXDP2X01_INT_SIM_REG, 0); for (irq = NR_IXP2000_IRQS; irq < NR_IXDP2X01_IRQS; irq++) { if (irq & valid_irq_mask) { @@ -314,8 +316,8 @@ static unsigned long ixdp2x01_flash_bank_setup(unsigned long ofs) { - *IXDP2X01_CPLD_FLASH_REG = - ((ofs >> IXDP2X01_FLASH_WINDOW_BITS) | IXDP2X01_CPLD_FLASH_INTERN); + ixp2000_reg_write(IXDP2X01_CPLD_FLASH_REG, + ((ofs >> IXDP2X01_FLASH_WINDOW_BITS) | IXDP2X01_CPLD_FLASH_INTERN)); return (ofs & IXDP2X01_FLASH_WINDOW_MASK); } @@ -340,14 +342,29 @@ .resource = &ixdp2x01_flash_resource, }; +static struct ixp2000_i2c_pins ixdp2x01_i2c_gpio_pins = { + .sda_pin = IXDP2X01_GPIO_SDA, + .scl_pin = IXDP2X01_GPIO_SCL, +}; + +static struct platform_device ixdp2x01_i2c_controller = { + .name = "IXP2000-I2C", + .id = 0, + .dev = { + .platform_data = &ixdp2x01_i2c_gpio_pins, + }, + .num_resources = 0 +}; + static struct platform_device *ixdp2x01_devices[] __initdata = { - &ixdp2x01_flash + &ixdp2x01_flash, + &ixdp2x01_i2c_controller }; static void __init ixdp2x01_init_machine(void) { - *IXDP2X01_CPLD_FLASH_REG = - (IXDP2X01_CPLD_FLASH_BANK_MASK | IXDP2X01_CPLD_FLASH_INTERN); + ixp2000_reg_write(IXDP2X01_CPLD_FLASH_REG, + (IXDP2X01_CPLD_FLASH_BANK_MASK | IXDP2X01_CPLD_FLASH_INTERN)); ixdp2x01_flash_data.nr_banks = ((*IXDP2X01_CPLD_FLASH_REG & IXDP2X01_CPLD_FLASH_BANK_MASK) + 1); diff -Nru a/arch/arm/mach-ixp2000/pci.c b/arch/arm/mach-ixp2000/pci.c --- a/arch/arm/mach-ixp2000/pci.c 2004-11-29 21:22:07 -08:00 +++ b/arch/arm/mach-ixp2000/pci.c 2004-11-29 21:22:07 -08:00 @@ -148,13 +148,13 @@ cli(); temp = *(IXP2000_PCI_CONTROL); if (temp & ((1 << 8) | (1 << 5))) { - *(IXP2000_PCI_CONTROL) = temp; + ixp2000_reg_write(IXP2000_PCI_CONTROL, temp); } temp = *(IXP2000_PCI_CMDSTAT); if (temp & (1 << 29)) { while (temp & (1 << 29)) { - *(IXP2000_PCI_CMDSTAT) = temp; + ixp2000_reg_write(IXP2000_PCI_CMDSTAT, temp); temp = *(IXP2000_PCI_CMDSTAT); } } @@ -178,13 +178,13 @@ cli(); temp = *(IXP2000_PCI_CONTROL); if (temp & ((1 << 8) | (1 << 5))) { - *(IXP2000_PCI_CONTROL) = temp; + ixp2000_reg_write(IXP2000_PCI_CONTROL, temp); } temp = *(IXP2000_PCI_CMDSTAT); if (temp & (1 << 29)) { while (temp & (1 << 29)) { - *(IXP2000_PCI_CMDSTAT) = temp; + ixp2000_reg_write(IXP2000_PCI_CMDSTAT, temp); temp = *(IXP2000_PCI_CMDSTAT); } } diff -Nru a/arch/arm/mach-ixp4xx/Kconfig b/arch/arm/mach-ixp4xx/Kconfig --- a/arch/arm/mach-ixp4xx/Kconfig 2004-11-29 21:22:06 -08:00 +++ b/arch/arm/mach-ixp4xx/Kconfig 2004-11-29 21:22:06 -08:00 @@ -29,6 +29,13 @@ IXDP425 Development Platform (Also known as Richfield). For more information on this platform, see Documentation/arm/IXP4xx. +config MACH_IXDPG425 + bool "IXDPG425" + help + Say 'Y' here if you want your kernel to support Intel's + IXDPG425 Development Platform (Also known as Montajade). + For more information on this platform, see Documentation/arm/IXP4xx. + # # IXCDP1100 is the exact same HW as IXDP425, but with a different machine # number from the bootloader due to marketing monkeys, so we just enable it diff -Nru a/arch/arm/mach-ixp4xx/Makefile b/arch/arm/mach-ixp4xx/Makefile --- a/arch/arm/mach-ixp4xx/Makefile 2004-11-29 21:22:06 -08:00 +++ b/arch/arm/mach-ixp4xx/Makefile 2004-11-29 21:22:06 -08:00 @@ -5,6 +5,7 @@ obj-y += common.o common-pci.o obj-$(CONFIG_ARCH_IXDP4XX) += ixdp425-pci.o ixdp425-setup.o +obj-$(CONFIG_MACH_IXDPG425) += ixdpg425-pci.o coyote-setup.o obj-$(CONFIG_ARCH_ADI_COYOTE) += coyote-pci.o coyote-setup.o obj-$(CONFIG_ARCH_PRPMC1100) += prpmc1100-pci.o prpmc1100-setup.o diff -Nru a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c --- a/arch/arm/mach-ixp4xx/common-pci.c 2004-11-29 21:22:08 -08:00 +++ b/arch/arm/mach-ixp4xx/common-pci.c 2004-11-29 21:22:08 -08:00 @@ -238,9 +238,10 @@ return 0xffffffff; } -static int read_config(u8 bus_num, u16 devfn, int where, int size, u32 *value) +static int ixp4xx_pci_read_config(struct pci_bus *bus, u16 devfn, int where, int size, u32 *value) { u32 n, byte_enables, addr, data; + u8 bus_num = bus->number; pr_debug("read_config from %d size %d dev %d:%d:%d\n", where, size, bus_num, PCI_SLOT(devfn), PCI_FUNC(devfn)); @@ -260,9 +261,10 @@ return PCIBIOS_SUCCESSFUL; } -static int write_config(u8 bus_num, u16 devfn, int where, int size, u32 value) +static int ixp4xx_pci_write_config(struct pci_bus *bus, u16 devfn, int where, int size, u32 value) { u32 n, byte_enables, addr, data; + u8 bus_num = bus->number; pr_debug("write_config_byte %#x to %d size %d dev %d:%d:%d\n", value, where, size, bus_num, PCI_SLOT(devfn), PCI_FUNC(devfn)); @@ -280,30 +282,10 @@ return PCIBIOS_SUCCESSFUL; } -/* - * Generalized PCI config access functions. - */ -static int ixp4xx_read_config(struct pci_bus *bus, unsigned int devfn, - int where, int size, u32 *value) -{ - if (bus->number && !PCI_SLOT(devfn)) - return local_read_config(where, size, value); - return read_config(bus->number, devfn, where, size, value); -} - -static int ixp4xx_write_config(struct pci_bus *bus, unsigned int devfn, - int where, int size, u32 value) -{ - if (bus->number && !PCI_SLOT(devfn)) - return local_write_config(where, size, value); - return write_config(bus->number, devfn, where, size, value); -} - struct pci_ops ixp4xx_ops = { - .read = ixp4xx_read_config, - .write = ixp4xx_write_config, + .read = ixp4xx_pci_read_config, + .write = ixp4xx_pci_write_config, }; - /* * PCI abort handler diff -Nru a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c --- a/arch/arm/mach-ixp4xx/common.c 2004-11-29 21:22:07 -08:00 +++ b/arch/arm/mach-ixp4xx/common.c 2004-11-29 21:22:07 -08:00 @@ -229,10 +229,10 @@ /* * Catch up with the real idea of time */ - do { + while ((*IXP4XX_OSTS - last_jiffy_time) > LATCH) { timer_tick(regs); last_jiffy_time += LATCH; - } while((*IXP4XX_OSTS - last_jiffy_time) > LATCH); + } write_sequnlock(&xtime_lock); diff -Nru a/arch/arm/mach-ixp4xx/coyote-setup.c b/arch/arm/mach-ixp4xx/coyote-setup.c --- a/arch/arm/mach-ixp4xx/coyote-setup.c 2004-11-29 21:22:07 -08:00 +++ b/arch/arm/mach-ixp4xx/coyote-setup.c 2004-11-29 21:22:07 -08:00 @@ -1,7 +1,7 @@ /* * arch/arm/mach-ixp4xx/coyote-setup.c * - * ADI Engineering Coyote board-setup + * Board setup for ADI Engineering and IXDGP425 boards * * Copyright (C) 2003-2004 MontaVista Software, Inc. * @@ -30,7 +30,7 @@ #endif /* - * Only one serial port is connected on the Coyote. + * Only one serial port is connected on the Coyote & IXDPG425 */ static struct uart_port coyote_serial_port = { .membase = (char*)(IXP4XX_UART2_BASE_VIRT + REG_OFFSET), @@ -47,6 +47,13 @@ void __init coyote_map_io(void) { + if (machine_is_ixdpg425()) { + coyote_serial_port.membase = + (char*)(IXP4XX_UART1_BASE_VIRT + REG_OFFSET); + coyote_serial_port.mapbase = IXP4XX_UART1_BASE_PHYS; + coyote_serial_port.irq = IRQ_IXP4XX_UART1; + } + early_serial_setup(&coyote_serial_port); ixp4xx_map_io(); @@ -79,10 +86,31 @@ static void __init coyote_init(void) { + *IXP4XX_EXP_CS0 |= IXP4XX_FLASH_WRITABLE; + *IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0; + platform_add_devices(&coyote_devices, ARRAY_SIZE(coyote_devices)); } -MACHINE_START(ADI_COYOTE, "ADI Engineering IXP4XX Coyote Development Platform") +#ifdef CONFIG_ARCH_ADI_COYOTE +MACHINE_START(ADI_COYOTE, "ADI Engineering Coyote") + MAINTAINER("MontaVista Software, Inc.") + BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS, + IXP4XX_PERIPHERAL_BASE_VIRT) + MAPIO(coyote_map_io) + INITIRQ(ixp4xx_init_irq) + .timer = &ixp4xx_timer, + BOOT_PARAMS(0x0100) + INIT_MACHINE(coyote_init) +MACHINE_END +#endif + +/* + * IXDPG425 is identical to Coyote except for which serial port + * is connected. + */ +#ifdef CONFIG_MACH_IXDPG425 +MACHINE_START(IXDPG425, "Intel IXDPG425") MAINTAINER("MontaVista Software, Inc.") BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS, IXP4XX_PERIPHERAL_BASE_VIRT) @@ -92,4 +120,5 @@ BOOT_PARAMS(0x0100) INIT_MACHINE(coyote_init) MACHINE_END +#endif diff -Nru a/arch/arm/mach-ixp4xx/ixdpg425-pci.c b/arch/arm/mach-ixp4xx/ixdpg425-pci.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/mach-ixp4xx/ixdpg425-pci.c 2004-11-29 21:22:09 -08:00 @@ -0,0 +1,65 @@ +/* + * arch/arch/mach-ixp4xx/ixdpg425-pci.c + * + * PCI setup routines for Intel IXDPG425 Platform + * + * Copyright (C) 2004 MontaVista Softwrae, Inc. + * + * Maintainer: Deepak Saxena + * + * 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 + +extern void ixp4xx_pci_preinit(void); +extern int ixp4xx_setup(int nr, struct pci_sys_data *sys); +extern struct pci_bus *ixp4xx_scan_bus(int nr, struct pci_sys_data *sys); + +void __init ixdpg425_pci_preinit(void) +{ + gpio_line_config(6, IXP4XX_GPIO_IN | IXP4XX_GPIO_ACTIVE_LOW); + gpio_line_config(7, IXP4XX_GPIO_IN | IXP4XX_GPIO_ACTIVE_LOW); + + gpio_line_isr_clear(6); + gpio_line_isr_clear(7); + + ixp4xx_pci_preinit(); +} + +static int __init ixdpg425_map_irq(struct pci_dev *dev, u8 slot, u8 pin) +{ + if (slot == 12 || slot == 13) + return IRQ_IXP4XX_GPIO7; + else if (slot == 14) + return IRQ_IXP4XX_GPIO6; + else return -1; +} + +struct hw_pci ixdpg425_pci __initdata = { + .nr_controllers = 1, + .preinit = ixdpg425_pci_preinit, + .swizzle = pci_std_swizzle, + .setup = ixp4xx_setup, + .scan = ixp4xx_scan_bus, + .map_irq = ixdpg425_map_irq, +}; + +int __init ixdpg425_pci_init(void) +{ + if (machine_is_ixdpg425()) + pci_common_init(&ixdpg425_pci); + return 0; +} + +subsys_initcall(ixdpg425_pci_init); diff -Nru a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c --- a/arch/arm/mach-pxa/lubbock.c 2004-11-29 21:22:07 -08:00 +++ b/arch/arm/mach-pxa/lubbock.c 2004-11-29 21:22:07 -08:00 @@ -33,6 +33,7 @@ #include #include #include +#include #include #include "generic.h" @@ -183,10 +184,25 @@ .lccr3 = LCCR3_PCP | LCCR3_Acb(255), }; +static int lubbock_mci_init(struct device *dev, irqreturn_t (*lubbock_detect_int)(int, void *, struct pt_regs *), void *data) +{ + /* setup GPIO for PXA25x MMC controller */ + pxa_gpio_mode(GPIO6_MMCCLK_MD); + pxa_gpio_mode(GPIO8_MMCCS0_MD); + + return 0; +} + +static struct pxamci_platform_data lubbock_mci_platform_data = { + .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, + .init = lubbock_mci_init, +}; + static void __init lubbock_init(void) { pxa_set_udc_info(&udc_info); set_pxa_fb_info(&sharp_lm8v31); + pxa_set_mci_info(&lubbock_mci_platform_data); (void) platform_add_devices(devices, ARRAY_SIZE(devices)); } diff -Nru a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c --- a/arch/arm/mach-pxa/mainstone.c 2004-11-29 21:22:08 -08:00 +++ b/arch/arm/mach-pxa/mainstone.c 2004-11-29 21:22:08 -08:00 @@ -34,6 +34,7 @@ #include #include #include +#include #include "generic.h" @@ -170,6 +171,61 @@ .pxafb_backlight_power = mainstone_backlight_power, }; +static int mainstone_mci_init(struct device *dev, irqreturn_t (*mstone_detect_int)(int, void *, struct pt_regs *), void *data) +{ + int err; + + /* + * setup GPIO for PXA27x MMC controller + */ + pxa_gpio_mode(GPIO32_MMCCLK_MD); + pxa_gpio_mode(GPIO112_MMCCMD_MD); + pxa_gpio_mode(GPIO92_MMCDAT0_MD); + pxa_gpio_mode(GPIO109_MMCDAT1_MD); + pxa_gpio_mode(GPIO110_MMCDAT2_MD); + pxa_gpio_mode(GPIO111_MMCDAT3_MD); + + /* make sure SD/Memory Stick multiplexer's signals + * are routed to MMC controller + */ + MST_MSCWR1 &= ~MST_MSCWR1_MS_SEL; + + err = request_irq(MAINSTONE_MMC_IRQ, mstone_detect_int, SA_INTERRUPT, + "MMC card detect", data); + if (err) { + printk(KERN_ERR "mainstone_mci_init: MMC/SD: can't request MMC card detect IRQ\n"); + return -1; + } + + return 0; +} + +static void mainstone_mci_setpower(struct device *dev, unsigned int vdd) +{ + struct pxamci_platform_data* p_d = dev->platform_data; + + if (( 1 << vdd) & p_d->ocr_mask) { + printk(KERN_DEBUG "%s: on\n", __FUNCTION__); + MST_MSCWR1 |= MST_MSCWR1_MMC_ON; + MST_MSCWR1 &= ~MST_MSCWR1_MS_SEL; + } else { + printk(KERN_DEBUG "%s: off\n", __FUNCTION__); + MST_MSCWR1 &= ~MST_MSCWR1_MMC_ON; + } +} + +static void mainstone_mci_exit(struct device *dev, void *data) +{ + free_irq(MAINSTONE_MMC_IRQ, data); +} + +static struct pxamci_platform_data mainstone_mci_platform_data = { + .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, + .init = mainstone_mci_init, + .setpower = mainstone_mci_setpower, + .exit = mainstone_mci_exit, +}; + static void __init mainstone_init(void) { platform_device_register(&smc91x_device); @@ -180,6 +236,8 @@ set_pxa_fb_info(&toshiba_ltm04c380k); else set_pxa_fb_info(&toshiba_ltm035a776c); + + pxa_set_mci_info(&mainstone_mci_platform_data); } diff -Nru a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig --- a/arch/arm/mach-s3c2410/Kconfig 2004-11-29 21:22:07 -08:00 +++ b/arch/arm/mach-s3c2410/Kconfig 2004-11-29 21:22:07 -08:00 @@ -108,4 +108,16 @@ the CRC data block will take more memory, but wil identify any faults with better precision. +config S3C2410_LOWLEVEL_UART_PORT + int "S3C2410 UART to use for low-level messages" + default 0 + help + Choice of which UART port to use for the low-level messages, + such as the `Uncompressing...` at start time. The value of + this configuration should be between zero and two. The port + must have been initalised by the boot-loader before use. + + Note, this does not affect the port used by the debug messages, + which is a seperate configuration. + endif diff -Nru a/arch/arm/mach-s3c2410/cpu.c b/arch/arm/mach-s3c2410/cpu.c --- a/arch/arm/mach-s3c2410/cpu.c 2004-11-29 21:22:07 -08:00 +++ b/arch/arm/mach-s3c2410/cpu.c 2004-11-29 21:22:07 -08:00 @@ -174,9 +174,15 @@ return ret; if (board != NULL) { - ret = platform_add_devices(board->devices, board->devices_count); - if (ret) { - printk(KERN_ERR "s3c24xx: failed to add board devices (%d)\n", ret); + struct platform_device **ptr = board->devices; + int i; + + for (i = 0; i < board->devices_count; i++, ptr++) { + ret = platform_device_register(*ptr); + + if (ret) { + printk(KERN_ERR "s3c24xx: failed to add board device %s (%d) @%p\n", (*ptr)->name, ret, *ptr); + } } /* mask any error, we may not need all these board diff -Nru a/arch/arm/mach-s3c2410/dma.c b/arch/arm/mach-s3c2410/dma.c --- a/arch/arm/mach-s3c2410/dma.c 2004-11-29 21:22:06 -08:00 +++ b/arch/arm/mach-s3c2410/dma.c 2004-11-29 21:22:06 -08:00 @@ -12,6 +12,7 @@ * published by the Free Software Foundation. * * Changelog: + * 18-Nov-2004 BJD Removed error for loading onto stopped channel * 10-Nov-2004 BJD Ensure all external symbols exported for modules * 10-Nov-2004 BJD Use sys_device and sysdev_class for power management * 08-Aug-2004 BJD Apply rmk's suggestions @@ -493,10 +494,6 @@ } else if (chan->state == S3C2410_DMA_IDLE) { if (chan->flags & S3C2410_DMAF_AUTOSTART) { s3c2410_dma_ctrl(chan->number, S3C2410_DMAOP_START); - } else { - printk(KERN_DEBUG "dma%d: cannot load onto stopped channel'n", chan->number); - local_irq_restore(flags); - return -EINVAL; } } @@ -653,6 +650,9 @@ break; + case S3C2410_DMALOAD_1LOADED_1RUNNING: + goto no_load; + default: printk(KERN_ERR "dma%d: unknown load_state in irq, %d\n", chan->number, chan->load_state); @@ -673,6 +673,7 @@ } } + no_load: return IRQ_HANDLED; } 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-11-29 21:22:07 -08:00 +++ b/arch/arm/mach-s3c2410/mach-bast.c 2004-11-29 21:22:07 -08:00 @@ -274,31 +274,28 @@ #ifdef CONFIG_PM -/* bast_init_pm +/* bast_init_machine * * enable the power management functions for the EB2410ITX */ -static __init int bast_init_pm(void) +static __init void bast_init_machine(void) { unsigned long gstatus4; - if (!machine_is_bast()) - return 0; - printk(KERN_INFO "BAST Power Manangement" COPYRIGHT "\n"); gstatus4 = (__raw_readl(S3C2410_BANKCON7) & 0x3) << 30; gstatus4 |= (__raw_readl(S3C2410_BANKCON6) & 0x3) << 28; gstatus4 |= (__raw_readl(S3C2410_BANKSIZE) & S3C2410_BANKSIZE_MASK); - printk(KERN_DEBUG "setting GSTATUS4 to %08lx\n", gstatus4); __raw_writel(gstatus4, S3C2410_GSTATUS4); - return s3c2410_pm_init(); + s3c2410_pm_init(); } -late_initcall(bast_init_pm); +#else +#define bast_init_machine NULL #endif @@ -308,5 +305,6 @@ BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) MAPIO(bast_map_io) INITIRQ(bast_init_irq) + .init_machine = bast_init_machine, .timer = &s3c2410_timer, MACHINE_END diff -Nru a/arch/arm/mach-s3c2410/s3c2440.c b/arch/arm/mach-s3c2410/s3c2440.c --- a/arch/arm/mach-s3c2410/s3c2440.c 2004-11-29 21:22:06 -08:00 +++ b/arch/arm/mach-s3c2410/s3c2440.c 2004-11-29 21:22:06 -08:00 @@ -15,6 +15,7 @@ * 01-Nov-2004 BJD Fixed clock build code * 09-Nov-2004 BJD Added sysdev for power management * 04-Nov-2004 BJD New serial registration + * 15-Nov-2004 BJD Rename the i2c device for the s3c2440 */ #include @@ -264,6 +265,10 @@ clk_disable(&s3c2440_clk_ac97); clk_disable(&s3c2440_clk_cam); + + /* rename any peripherals used differing from the s3c2410 */ + + s3c_device_i2c.name = "s3c2440-i2c"; } int __init s3c2440_init(void) diff -Nru a/arch/arm/mach-s3c2410/time.c b/arch/arm/mach-s3c2410/time.c --- a/arch/arm/mach-s3c2410/time.c 2004-11-29 21:22:07 -08:00 +++ b/arch/arm/mach-s3c2410/time.c 2004-11-29 21:22:07 -08:00 @@ -91,7 +91,7 @@ } static struct irqaction s3c2410_timer_irq = { - .name = "S32410 Timer Tick", + .name = "S3C2410 Timer Tick", .flags = SA_INTERRUPT, .handler = s3c2410_timer_interrupt }; diff -Nru a/arch/arm/mach-sa1100/Kconfig b/arch/arm/mach-sa1100/Kconfig --- a/arch/arm/mach-sa1100/Kconfig 2004-11-29 21:22:08 -08:00 +++ b/arch/arm/mach-sa1100/Kconfig 2004-11-29 21:22:08 -08:00 @@ -109,6 +109,14 @@ (also known as the LART). See for information on the LART. +config SA1100_PLEB + bool "PLEB" + help + Say Y here if you are using version 1 of the Portable Linux + Embedded Board (also known as PLEB). + See + for more information. + config SA1100_SHANNON bool "Shannon" help diff -Nru a/arch/arm/mach-sa1100/Makefile b/arch/arm/mach-sa1100/Makefile --- a/arch/arm/mach-sa1100/Makefile 2004-11-29 21:22:08 -08:00 +++ b/arch/arm/mach-sa1100/Makefile 2004-11-29 21:22:08 -08:00 @@ -35,6 +35,8 @@ obj-$(CONFIG_SA1100_LART) += lart.o led-$(CONFIG_SA1100_LART) += leds-lart.o +obj-$(CONFIG_SA1100_PLEB) += pleb.o + obj-$(CONFIG_SA1100_SHANNON) += shannon.o obj-$(CONFIG_SA1100_SIMPAD) += simpad.o diff -Nru a/arch/arm/mach-sa1100/leds-simpad.c b/arch/arm/mach-sa1100/leds-simpad.c --- a/arch/arm/mach-sa1100/leds-simpad.c 2004-11-29 21:22:07 -08:00 +++ b/arch/arm/mach-sa1100/leds-simpad.c 2004-11-29 21:22:07 -08:00 @@ -28,11 +28,7 @@ void simpad_leds_event(led_event_t evt) { - unsigned long flags; - - //local_irq_save(flags); - - switch (evt) + switch (evt) { case led_start: hw_led_state = LED_GREEN; @@ -101,6 +97,5 @@ set_cs3_bit(LED2_ON); else clear_cs3_bit(LED2_ON); - //local_irq_restore(flags); } diff -Nru a/arch/arm/mach-sa1100/pleb.c b/arch/arm/mach-sa1100/pleb.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/mach-sa1100/pleb.c 2004-11-29 21:22:09 -08:00 @@ -0,0 +1,154 @@ +/* + * linux/arch/arm/mach-sa1100/pleb.c + */ + +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "generic.h" + + +/* + * Ethernet IRQ mappings + */ + +#define PLEB_ETH0_P (0x20000300) /* Ethernet 0 in PCMCIA0 IO */ +#define PLEB_ETH0_V (0xf6000300) + +#define GPIO_ETH0_IRQ GPIO_GPIO(21) +#define GPIO_ETH0_EN GPIO_GPIO(26) + +#define IRQ_GPIO_ETH0_IRQ IRQ_GPIO21 + +static struct resource smc91x_resources[] = { + [0] = { + .start = PLEB_ETH0_P, + .end = PLEB_ETH0_P | 0x03ffffff, + .flags = IORESOURCE_MEM, + }, +#if 0 /* Autoprobe instead, to get rising/falling edge characteristic right */ + [1] = { + .start = IRQ_GPIO_ETH0_IRQ, + .end = IRQ_GPIO_ETH0_IRQ, + .flags = IORESOURCE_IRQ, + }, +#endif +}; + + +static struct platform_device smc91x_device = { + .name = "smc91x", + .id = 0, + .num_resources = ARRAY_SIZE(smc91x_resources), + .resource = smc91x_resources, +}; + +static struct platform_device *devices[] __initdata = { + &smc91x_device, +}; + + +/* + * Pleb's memory map + * has flash memory (typically 4 or 8 meg) selected by + * the two SA1100 lowest chip select outputs. + */ +static struct resource pleb_flash_resources[] = { + [0] = { + .start = SA1100_CS0_PHYS, + .end = SA1100_CS0_PHYS + SZ_8M - 1, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = SA1100_CS1_PHYS, + .end = SA1100_CS1_PHYS + SZ_8M - 1, + .flags = IORESOURCE_MEM, + } +}; + + +static struct mtd_partition pleb_partitions[] = { + { + .name = "blob", + .offset = 0, + .size = 0x00020000, + }, { + .name = "kernel", + .offset = MTDPART_OFS_APPEND, + .size = 0x000e0000, + }, { + .name = "rootfs", + .offset = MTDPART_OFS_APPEND, + .size = 0x00300000, + } +}; + + +static struct flash_platform_data pleb_flash_data = { + .map_name = "cfi_probe", + .parts = pleb_partitions, + .nr_parts = ARRAY_SIZE(pleb_partitions), +}; + + +static void __init pleb_init(void) +{ + sa11x0_set_flash_data(&pleb_flash_data, pleb_flash_resources, + ARRAY_SIZE(pleb_flash_resources)); + + + platform_add_devices(devices, ARRAY_SIZE(devices)); +} + + +static void __init pleb_map_io(void) +{ + sa1100_map_io(); + + sa1100_register_uart(0, 3); + sa1100_register_uart(1, 1); + + GAFR |= (GPIO_UART_TXD | GPIO_UART_RXD); + GPDR |= GPIO_UART_TXD; + GPDR &= ~GPIO_UART_RXD; + PPAR |= PPAR_UPR; + + /* + * Fix expansion memory timing for network card + */ + MECR = ((2<<10) | (2<<5) | (2<<0)); + + /* + * Enable the SMC ethernet controller + */ + GPDR |= GPIO_ETH0_EN; /* set to output */ + GPCR = GPIO_ETH0_EN; /* clear MCLK (enable smc) */ + + GPDR &= ~GPIO_ETH0_IRQ; + + set_irq_type(GPIO_ETH0_IRQ, IRQT_FALLING); +} + +MACHINE_START(PLEB, "PLEB") + BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) + MAPIO(pleb_map_io) + INITIRQ(sa1100_init_irq) + .timer = &sa1100_timer, + .init_machine = pleb_init, +MACHINE_END diff -Nru a/arch/arm/mach-sa1100/simpad.c b/arch/arm/mach-sa1100/simpad.c --- a/arch/arm/mach-sa1100/simpad.c 2004-11-29 21:22:06 -08:00 +++ b/arch/arm/mach-sa1100/simpad.c 2004-11-29 21:22:06 -08:00 @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -20,7 +21,6 @@ #include #include #include -#include #include #include @@ -216,9 +216,31 @@ } + +/* + * MediaQ Video Device + */ +static struct platform_device simpad_mq200fb = { + .name = "simpad-mq200", + .id = 0, +}; + +static struct platform_device *devices[] __initdata = { + &simpad_mq200fb +}; + + + static int __init simpad_init(void) { - set_power_off_handler( simpad_power_off ); + int ret; + + pm_power_off = simpad_power_off; + + ret = platform_add_devices(devices, ARRAY_SIZE(devices)); + if(ret) + printk(KERN_WARNING "simpad: Unable to register mq200 framebuffer device"); + return 0; } @@ -226,7 +248,7 @@ MACHINE_START(SIMPAD, "Simpad") - MAINTAINER("Juergen Messerer") + MAINTAINER("Holger Freyther") BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) BOOT_PARAMS(0xc0000100) MAPIO(simpad_map_io) diff -Nru a/arch/arm/mm/proc-arm720.S b/arch/arm/mm/proc-arm720.S --- a/arch/arm/mm/proc-arm720.S 2004-11-29 21:22:07 -08:00 +++ b/arch/arm/mm/proc-arm720.S 2004-11-29 21:22:07 -08:00 @@ -138,7 +138,7 @@ bic r0, r0, #0x0e00 @ ..V. ..RS BLDP WCAM orr r0, r0, #0x0100 @ .... .... .111 .... (old) orr r0, r0, #0x003d @ .... ..01 ..11 1101 (new) - mov pc, lr @ __ret (head-armv.S) + mov pc, lr @ __ret (head.S) .size __arm710_setup, . - __arm710_setup .type __arm720_setup, #function @@ -153,7 +153,7 @@ bic r0, r0, #0x0e00 @ ..V. ..RS BLDP WCAM orr r0, r0, #0x2100 @ .... .... .111 .... (old) orr r0, r0, #0x003d @ ..1. ..01 ..11 1101 (new) - mov pc, lr @ __ret (head-armv.S) + mov pc, lr @ __ret (head.S) .size __arm720_setup, . - __arm720_setup __INITDATA diff -Nru a/arch/arm/vfp/vfp.h b/arch/arm/vfp/vfp.h --- a/arch/arm/vfp/vfp.h 2004-11-29 21:22:07 -08:00 +++ b/arch/arm/vfp/vfp.h 2004-11-29 21:22:07 -08:00 @@ -337,3 +337,8 @@ extern void vfp_put_sys(unsigned int reg, u32 val); u32 vfp_estimate_sqrt_significand(u32 exponent, u32 significand); + +/* + * A special flag to tell the normalisation code not to normalise. + */ +#define VFP_NAN_FLAG 0x100 diff -Nru a/arch/arm/vfp/vfpdouble.c b/arch/arm/vfp/vfpdouble.c --- a/arch/arm/vfp/vfpdouble.c 2004-11-29 21:22:07 -08:00 +++ b/arch/arm/vfp/vfpdouble.c 2004-11-29 21:22:07 -08:00 @@ -195,7 +195,7 @@ dd, d, exceptions); vfp_put_double(dd, d); } - return exceptions; + return exceptions & ~VFP_NAN_FLAG; } /* @@ -240,7 +240,7 @@ /* * If one was a signalling NAN, raise invalid operation. */ - return tn == VFP_SNAN || tm == VFP_SNAN ? FPSCR_IOC : 0x100; + return tn == VFP_SNAN || tm == VFP_SNAN ? FPSCR_IOC : VFP_NAN_FLAG; } /* diff -Nru a/arch/arm/vfp/vfpsingle.c b/arch/arm/vfp/vfpsingle.c --- a/arch/arm/vfp/vfpsingle.c 2004-11-29 21:22:08 -08:00 +++ b/arch/arm/vfp/vfpsingle.c 2004-11-29 21:22:08 -08:00 @@ -201,7 +201,7 @@ vfp_put_float(sd, d); } - return exceptions; + return exceptions & ~VFP_NAN_FLAG; } /* @@ -246,7 +246,7 @@ /* * If one was a signalling NAN, raise invalid operation. */ - return tn == VFP_SNAN || tm == VFP_SNAN ? FPSCR_IOC : 0x100; + return tn == VFP_SNAN || tm == VFP_SNAN ? FPSCR_IOC : VFP_NAN_FLAG; } diff -Nru a/arch/h8300/kernel/setup.c b/arch/h8300/kernel/setup.c --- a/arch/h8300/kernel/setup.c 2004-11-29 21:22:06 -08:00 +++ b/arch/h8300/kernel/setup.c 2004-11-29 21:22:06 -08:00 @@ -218,7 +218,7 @@ "BogoMips:\t%lu.%02lu\n" "Calibration:\t%lu loops\n", cpu,mode, - clockfreq/100,clockfreq%100, + clockfreq/1000,clockfreq%1000, (loops_per_jiffy*HZ)/500000,((loops_per_jiffy*HZ)/5000)%100, (loops_per_jiffy*HZ)); diff -Nru a/arch/h8300/kernel/signal.c b/arch/h8300/kernel/signal.c --- a/arch/h8300/kernel/signal.c 2004-11-29 21:22:07 -08:00 +++ b/arch/h8300/kernel/signal.c 2004-11-29 21:22:07 -08:00 @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -47,7 +48,7 @@ #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) -asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs); +asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset); /* * Atomically swap in the new signal mask, and wait for a signal. @@ -68,7 +69,7 @@ while (1) { current->state = TASK_INTERRUPTIBLE; schedule(); - if (do_signal(&saveset, regs)) + if (do_signal(regs, &saveset)) return -EINTR; } } @@ -98,7 +99,7 @@ while (1) { current->state = TASK_INTERRUPTIBLE; schedule(); - if (do_signal(&saveset, regs)) + if (do_signal(regs, &saveset)) return -EINTR; } } @@ -161,6 +162,7 @@ unsigned char retcode[8]; unsigned long extramask[_NSIG_WORDS-1]; struct sigcontext sc; + int sig; } __attribute__((aligned(2),packed)); struct rt_sigframe @@ -172,73 +174,44 @@ #endif long dummy_pc; char *pretcode; + struct siginfo *pinfo; + void *puc; unsigned char retcode[8]; struct siginfo info; struct ucontext uc; + int sig; } __attribute__((aligned(2),packed)); static inline int -restore_sigcontext(struct pt_regs *regs, struct sigcontext *usc, void *fp, +restore_sigcontext(struct pt_regs *regs, struct sigcontext *usc, int *pd0) { - struct sigcontext context; int err = 0; - - /* get previous context */ - if (copy_from_user(&context, usc, sizeof(context))) - goto badframe; - - /* restore passed registers */ - regs->er1 = context.sc_er1; - regs->er2 = context.sc_er2; - regs->er3 = context.sc_er3; - regs->er5 = context.sc_er5; - regs->ccr = (regs->ccr & 0x10)|(context.sc_ccr & 0xef); - regs->pc = context.sc_pc; + unsigned int ccr; + unsigned int usp; + unsigned int er0; + + /* Always make any pending restarted system calls return -EINTR */ + current_thread_info()->restart_block.fn = do_no_restart_syscall; + +#define COPY(r) err |= __get_user(regs->r, &usc->sc_##r) /* restore passed registers */ + COPY(er1); + COPY(er2); + COPY(er3); + COPY(er5); + COPY(pc); + ccr = regs->ccr & 0x10; + COPY(ccr); +#undef COPY + regs->ccr &= 0xef; + regs->ccr |= ccr; regs->orig_er0 = -1; /* disable syscall checks */ - wrusp(context.sc_usp); - - *pd0 = context.sc_er0; - return err; - -badframe: - return 1; -} - -static inline int -rt_restore_ucontext(struct pt_regs *regs, struct ucontext *uc, int *pd0) -{ - int temp; - greg_t *gregs = uc->uc_mcontext.gregs; - unsigned long usp; - int err; - - err = __get_user(temp, &uc->uc_mcontext.version); - if (temp != MCONTEXT_VERSION) - goto badframe; - /* restore passed registers */ - err |= __get_user(regs->er0, &gregs[0]); - err |= __get_user(regs->er1, &gregs[1]); - err |= __get_user(regs->er2, &gregs[2]); - err |= __get_user(regs->er3, &gregs[3]); - err |= __get_user(regs->er4, &gregs[4]); - err |= __get_user(regs->er5, &gregs[5]); - err |= __get_user(regs->er6, &gregs[6]); - err |= __get_user(usp, &gregs[7]); + err |= __get_user(usp, &usc->sc_usp); wrusp(usp); - err |= __get_user(regs->pc, &gregs[8]); - err |= __get_user(temp, &gregs[9]); - regs->ccr = (regs->ccr & 0x10) | (temp & 0xef); - regs->orig_er0 = -1; /* disable syscall checks */ - if (do_sigaltstack(&uc->uc_stack, NULL, usp) == -EFAULT) - goto badframe; - - *pd0 = regs->er0; + err |= __get_user(er0, &usc->sc_er0); + *pd0 = er0; return err; - -badframe: - return 1; } asmlinkage int do_sigreturn(unsigned long __unused,...) @@ -263,7 +236,7 @@ recalc_sigpending(); spin_unlock_irq(¤t->sighand->siglock); - if (restore_sigcontext(regs, &frame->sc, frame + 1, &er0)) + if (restore_sigcontext(regs, &frame->sc, &er0)) goto badframe; return er0; @@ -291,8 +264,12 @@ recalc_sigpending(); spin_lock_irq(¤t->sighand->siglock); - if (rt_restore_ucontext(regs, &frame->uc, &er0)) + if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &er0)) + goto badframe; + + if (do_sigaltstack(&frame->uc.uc_stack, NULL, usp) == -EFAULT) goto badframe; + return er0; badframe: @@ -300,36 +277,23 @@ return 0; } -static void setup_sigcontext(struct sigcontext *sc, struct pt_regs *regs, +static int setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, unsigned long mask) { - sc->sc_mask = mask; - sc->sc_usp = rdusp(); - sc->sc_er0 = regs->er0; - sc->sc_er1 = regs->er1; - sc->sc_er2 = regs->er2; - sc->sc_er3 = regs->er3; - sc->sc_er5 = regs->er5; - sc->sc_ccr = regs->ccr; - sc->sc_pc = regs->pc; -} - -static inline int rt_setup_ucontext(struct ucontext *uc, struct pt_regs *regs) -{ - greg_t *gregs = uc->uc_mcontext.gregs; int err = 0; - err |= __put_user(MCONTEXT_VERSION, &uc->uc_mcontext.version); - err |= __put_user(regs->er0, &gregs[0]); - err |= __put_user(regs->er1, &gregs[1]); - err |= __put_user(regs->er2, &gregs[2]); - err |= __put_user(regs->er3, &gregs[3]); - err |= __put_user(regs->er4, &gregs[4]); - err |= __put_user(regs->er5, &gregs[5]); - err |= __put_user(regs->er6, &gregs[6]); - err |= __put_user(rdusp(), &gregs[7]); - err |= __put_user(regs->pc, &gregs[8]); - err |= __put_user(regs->ccr, &gregs[9]); + err |= __put_user(regs->er0, &sc->sc_er0); + err |= __put_user(regs->er1, &sc->sc_er1); + err |= __put_user(regs->er2, &sc->sc_er2); + err |= __put_user(regs->er3, &sc->sc_er3); + err |= __put_user(regs->er4, &sc->sc_er4); + err |= __put_user(regs->er5, &sc->sc_er5); + err |= __put_user(regs->er6, &sc->sc_er6); + err |= __put_user(rdusp(), &sc->sc_usp); + err |= __put_user(regs->pc, &sc->sc_pc); + err |= __put_user(regs->ccr, &sc->sc_ccr); + err |= __put_user(mask, &sc->sc_mask); + return err; } @@ -353,26 +317,48 @@ sigset_t *set, struct pt_regs *regs) { struct sigframe *frame; - struct sigcontext context; int err = 0; + int usig; + unsigned char *ret; frame = get_sigframe(ka, regs, sizeof(*frame)); - if (_NSIG_WORDS > 1) + if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) + goto give_sigsegv; + + usig = current_thread_info()->exec_domain + && current_thread_info()->exec_domain->signal_invmap + && sig < 32 + ? current_thread_info()->exec_domain->signal_invmap[sig] + : sig; + + err |= __put_user(usig, &frame->sig); + if (err) + goto give_sigsegv; + + err |= setup_sigcontext(&frame->sc, regs, set->sig[0]); + if (err) + goto give_sigsegv; + + if (_NSIG_WORDS > 1) { err |= copy_to_user(frame->extramask, &set->sig[1], sizeof(frame->extramask)); + if (err) + goto give_sigsegv; + } - setup_sigcontext(&context, regs, set->sig[0]); - err |= copy_to_user (&frame->sc, &context, sizeof(context)); + ret = frame->retcode; + if (ka->sa.sa_flags & SA_RESTORER) + ret = (unsigned char *)(ka->sa.sa_restorer); + else { + /* sub.l er0,er0; mov.b #__NR_sigreturn,r0l; trapa #0 */ + err != __put_user(0x1a80f800 + (__NR_sigreturn & 0xff), + (unsigned long *)(frame->retcode + 0)); + err |= __put_user(0x5700, (unsigned short *)(frame->retcode + 4)); + } /* Set up to return from userspace. */ - err |= __put_user(frame->retcode, &frame->pretcode); - - /* sub.l er0,er0; mov.b #__NR_sigreturn,r0l; trapa #0 */ - err != __put_user(0x1a80f800 + (__NR_sigreturn & 0xff), - (unsigned long *)(frame->retcode + 0)); - err |= __put_user(0x5700, (unsigned short *)(frame->retcode + 4)); - + err |= __put_user(ret, &frame->pretcode); if (err) goto give_sigsegv; @@ -399,10 +385,29 @@ { struct rt_sigframe *frame; int err = 0; + int usig; + unsigned char *ret; frame = get_sigframe(ka, regs, sizeof(*frame)); + if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) + goto give_sigsegv; + + usig = current_thread_info()->exec_domain + && current_thread_info()->exec_domain->signal_invmap + && sig < 32 + ? current_thread_info()->exec_domain->signal_invmap[sig] + : sig; + + err |= __put_user(usig, &frame->sig); + if (err) + goto give_sigsegv; + + err |= __put_user(&frame->info, &frame->pinfo); + err |= __put_user(&frame->uc, &frame->puc); err |= copy_siginfo_to_user(&frame->info, info); + if (err) + goto give_sigsegv; /* Create the ucontext. */ err |= __put_user(0, &frame->uc.uc_flags); @@ -412,16 +417,22 @@ err |= __put_user(sas_ss_flags(rdusp()), &frame->uc.uc_stack.ss_flags); err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size); - err |= rt_setup_ucontext(&frame->uc, regs); + err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, set->sig[0]); err |= copy_to_user (&frame->uc.uc_sigmask, set, sizeof(*set)); + if (err) + goto give_sigsegv; /* Set up to return from userspace. */ - err |= __put_user(frame->retcode, &frame->pretcode); - - /* sub.l er0,er0; mov.b #__NR_rt_sigreturn,r0l; trapa #0 */ - err != __put_user(0x1a80f800 + (__NR_rt_sigreturn & 0xff), - (long *)(frame->retcode + 0)); - err |= __put_user(0x5700, (short *)(frame->retcode + 4)); + ret = frame->retcode; + if (ka->sa.sa_flags & SA_RESTORER) + ret = (unsigned char *)(ka->sa.sa_restorer); + else { + /* sub.l er0,er0; mov.b #__NR_sigreturn,r0l; trapa #0 */ + err != __put_user(0x1a80f800 + (__NR_sigreturn & 0xff), + (unsigned long *)(frame->retcode + 0)); + err |= __put_user(0x5700, (unsigned short *)(frame->retcode + 4)); + } + err |= __put_user(ret, &frame->pretcode); if (err) goto give_sigsegv; @@ -444,41 +455,32 @@ force_sigsegv(sig, current); } -static inline void -handle_restart(struct pt_regs *regs, struct k_sigaction *ka, int has_handler) -{ - switch (regs->er0) { - case -ERESTARTNOHAND: - if (!has_handler) - goto do_restart; - regs->er0 = -EINTR; - break; - - case -ERESTARTSYS: - if (has_handler && !(ka->sa.sa_flags & SA_RESTART)) { - regs->er0 = -EINTR; - break; - } - /* fallthrough */ - case -ERESTARTNOINTR: - do_restart: - regs->er0 = regs->orig_er0; - regs->pc -= 2; - break; - } -} - /* * OK, we're invoking a handler */ static void -handle_signal(int sig, struct k_sigaction *ka, siginfo_t *info, - sigset_t *oldset, struct pt_regs *regs) +handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, + sigset_t *oldset, struct pt_regs * regs) { /* are we from a system call? */ - if (regs->orig_er0 >= 0) - /* If so, check system call restarting.. */ - handle_restart(regs, ka, 1); + if (regs->orig_er0 >= 0) { + switch (regs->er0) { + case -ERESTART_RESTARTBLOCK: + case -ERESTARTNOHAND: + regs->er0 = -EINTR; + break; + + case -ERESTARTSYS: + if (!(ka->sa.sa_flags & SA_RESTART)) { + regs->er0 = -EINTR; + break; + } + /* fallthrough */ + case -ERESTARTNOINTR: + regs->er0 = regs->orig_er0; + regs->pc -= 2; + } + } /* set up the stack frame */ if (ka->sa.sa_flags & SA_SIGINFO) @@ -486,9 +488,6 @@ 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); sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask); @@ -502,137 +501,52 @@ * Note that 'init' is a special process: it doesn't get signals it doesn't * want to handle. Thus you cannot kill init even with a SIGKILL even by * mistake. - * - * Note that we go through the signals twice: once to check the signals - * that the kernel can handle, and then we build all the user-level signal - * handling stack-frames in one go after that. */ -asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs) +asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset) { siginfo_t info; - struct k_sigaction *ka; + int signr; + struct k_sigaction ka; + + /* + * We want the common case to go fast, which + * is why we may in certain cases get here from + * kernel mode. Just return without doing anything + * if so. + */ + if ((regs->ccr & 0x10)) + return 1; + + if (current->flags & PF_FREEZE) { + refrigerator(0); + goto no_signal; + } current->thread.esp0 = (unsigned long) regs; if (!oldset) oldset = ¤t->blocked; - for (;;) { - int signr; - - signr = get_signal_to_deliver(&info, regs, NULL); - - if (!signr) - break; - - if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) { - current->exit_code = signr; - current->state = TASK_STOPPED; - - /* Did we come from a system call? */ - if (regs->orig_er0 >= 0) { - /* Restart the system call the same way as - if the process were not traced. */ - struct k_sigaction *ka = - ¤t->sighand->action[signr-1]; - int has_handler = - (ka->sa.sa_handler != SIG_IGN && - ka->sa.sa_handler != SIG_DFL); - handle_restart(regs, ka, has_handler); - } - notify_parent(current, SIGCHLD); - schedule(); - - /* We're back. Did the debugger cancel the sig? */ - if (!(signr = current->exit_code)) { - discard_frame: - continue; - } - current->exit_code = 0; - - /* The debugger continued. Ignore SIGSTOP. */ - if (signr == SIGSTOP) - goto discard_frame; - - /* Update the siginfo structure. Is this good? */ - if (signr != info.si_signo) { - info.si_signo = signr; - info.si_errno = 0; - info.si_code = SI_USER; - info.si_pid = current->parent->pid; - info.si_uid = current->parent->uid; - } - - /* If the (new) signal is now blocked, requeue it. */ - if (sigismember(¤t->blocked, signr)) { - send_sig_info(signr, &info, current); - continue; - } - } - - ka = ¤t->sighand->action[signr-1]; - if (ka->sa.sa_handler == SIG_IGN) { - if (signr != SIGCHLD) - continue; - /* Check for SIGCHLD: it's special. */ - while (sys_wait4(-1, NULL, WNOHANG, NULL) > 0) - /* nothing */; - continue; - } - - if (ka->sa.sa_handler == SIG_DFL) { - int exit_code = signr; - - if (current->pid == 1) - continue; - - switch (signr) { - case SIGCONT: case SIGCHLD: - case SIGWINCH: case SIGURG: - continue; - - case SIGTSTP: case SIGTTIN: case SIGTTOU: - if (is_orphaned_pgrp(process_group(current))) - continue; - /* FALLTHRU */ - - case SIGSTOP: { - struct sighand_struct *sig; - current->state = TASK_STOPPED; - current->exit_code = signr; - sig = current->parent->sighand; - if (sig && !(sig->action[SIGCHLD-1].sa.sa_flags -& SA_NOCLDSTOP)) - notify_parent(current, SIGCHLD); - schedule(); - continue; - } - - case SIGQUIT: case SIGILL: case SIGTRAP: - case SIGIOT: case SIGFPE: case SIGSEGV: - case SIGBUS: case SIGSYS: case SIGXCPU: case SIGXFSZ: - if (do_coredump(signr, exit_code, regs)) - exit_code |= 0x80; - /* FALLTHRU */ - - default: - sigaddset(¤t->pending.signal, signr); - recalc_sigpending(); - current->flags |= PF_SIGNALED; - do_exit(exit_code); - /* NOTREACHED */ - } - } - + signr = get_signal_to_deliver(&info, &ka, regs, NULL); + if (signr > 0) { /* Whee! Actually deliver the signal. */ - handle_signal(signr, ka, &info, oldset, regs); + handle_signal(signr, &info, &ka, oldset, regs); return 1; } - + no_signal: /* Did we come from a system call? */ - if (regs->orig_er0 >= 0) + if (regs->orig_er0 >= 0) { /* Restart the system call - no handlers present */ - handle_restart(regs, NULL, 0); - + if (regs->er0 == -ERESTARTNOHAND || + regs->er0 == -ERESTARTSYS || + regs->er0 == -ERESTARTNOINTR) { + regs->er0 = regs->orig_er0; + regs->pc -= 2; + } + if (regs->er0 == -ERESTART_RESTARTBLOCK){ + regs->er0 = __NR_restart_syscall; + regs->pc -= 2; + } + } return 0; } diff -Nru a/arch/h8300/kernel/vmlinux.lds.S b/arch/h8300/kernel/vmlinux.lds.S --- a/arch/h8300/kernel/vmlinux.lds.S 2004-11-29 21:22:07 -08:00 +++ b/arch/h8300/kernel/vmlinux.lds.S 2004-11-29 21:22:07 -08:00 @@ -5,9 +5,9 @@ /* target memory map */ #ifdef CONFIG_H8300H_GENERIC #define ROMTOP 0x000000 -#define ROMSIZE 0x200000 -#define RAMTOP 0x200000 -#define RAMSIZE 0x200000 +#define ROMSIZE 0x400000 +#define RAMTOP 0x400000 +#define RAMSIZE 0x400000 #endif #ifdef CONFIG_H8300H_AKI3068NET @@ -26,16 +26,16 @@ #ifdef CONFIG_H8300H_SIM #define ROMTOP 0x000000 -#define ROMSIZE 0x200000 -#define RAMTOP 0x200000 -#define RAMSIZE 0x200000 +#define ROMSIZE 0x400000 +#define RAMTOP 0x400000 +#define RAMSIZE 0x400000 #endif #ifdef CONFIG_H8S_SIM #define ROMTOP 0x000000 -#define ROMSIZE 0x200000 -#define RAMTOP 0x200000 -#define RAMSIZE 0x200000 +#define ROMSIZE 0x400000 +#define RAMTOP 0x400000 +#define RAMSIZE 0x800000 #endif #ifdef CONFIG_H8S_EDOSK2674 @@ -51,6 +51,8 @@ _jiffies = _jiffies_64 + 4; +ENTRY(__start) + SECTIONS { #if defined(CONFIG_ROMKERNEL) @@ -81,6 +83,7 @@ ___start___ex_table = .; *(__ex_table) ___stop___ex_table = .; + } RODATA #if defined(CONFIG_ROMKERNEL) @@ -140,10 +143,7 @@ #if defined(CONFIG_RAMKERNEL) SECURITY_INIT #endif - __begin_data = LOADADDR(.data) ; -#if defined(CONFIG_ROMKERNEL) - __erom = LOADADDR(.data) + SIZEOF(.data) ; -#endif + __begin_data = LOADADDR(.data); .bss : { . = ALIGN(0x4) ; @@ -159,12 +159,11 @@ /DISCARD/ : { *(.exitcall.exit) } - .romfs : { *(.romfs*) } - . = RAMTOP+RAMSIZE; + . = RAMTOP+RAMSIZE; .dummy : { COMMAND_START = . - 0x200 ; diff -Nru a/arch/h8300/platform/h8300h/entry.S b/arch/h8300/platform/h8300h/entry.S --- a/arch/h8300/platform/h8300h/entry.S 2004-11-29 21:22:07 -08:00 +++ b/arch/h8300/platform/h8300h/entry.S 2004-11-29 21:22:07 -08:00 @@ -247,9 +247,9 @@ mov.l @(TI_FLAGS:16,er4),er1 btst #TIF_NEED_RESCHED,r1l bne SYMBOL_NAME(reschedule):16 - mov.l sp,er1 - subs #4,er1 /* adjust retpc */ - mov.l er2,er0 + mov.l sp,er0 + subs #4,er0 /* adjust retpc */ + mov.l er2,er1 jsr @SYMBOL_NAME(do_signal) #if defined(CONFIG_PREEMPT) bra done:8 /* userspace thoru */ diff -Nru a/arch/h8300/platform/h8s/entry.S b/arch/h8300/platform/h8s/entry.S --- a/arch/h8300/platform/h8s/entry.S 2004-11-29 21:22:08 -08:00 +++ b/arch/h8300/platform/h8s/entry.S 2004-11-29 21:22:08 -08:00 @@ -244,9 +244,9 @@ mov.l @(TI_FLAGS:16,er4),er1 btst #TIF_NEED_RESCHED,r1l bne SYMBOL_NAME(reschedule):16 - mov.l sp,er1 - subs #4,er1 /* adjust retpc */ - mov.l er2,er0 + mov.l sp,er0 + subs #4,er0 /* adjust retpc */ + mov.l er2,er1 jsr @SYMBOL_NAME(do_signal) #if defined(CONFIG_PREEMPT) bra done:8 /* userspace thoru */ diff -Nru a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c --- a/arch/i386/kernel/acpi/boot.c 2004-11-29 21:22:08 -08:00 +++ b/arch/i386/kernel/acpi/boot.c 2004-11-29 21:22:08 -08:00 @@ -409,28 +409,38 @@ void __init acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger) { - unsigned char mask = 1 << (irq & 7); - unsigned int port = 0x4d0 + (irq >> 3); - unsigned char val = inb(port); + unsigned int mask = 1 << irq; + unsigned int old, new; - - printk(PREFIX "IRQ%d SCI:", irq); - if (!(val & mask)) { - printk(" Edge"); + /* Real old ELCR mask */ + old = inb(0x4d0) | (inb(0x4d1) << 8); - if (trigger == 3) { - printk(" set to Level"); - outb(val | mask, port); - } - } else { - printk(" Level"); + /* + * If we use ACPI to set PCI irq's, then we should clear ELCR + * since we will set it correctly as we enable the PCI irq + * routing. + */ + new = acpi_noirq ? old : 0; - if (trigger == 1) { - printk(" set to Edge"); - outb(val & ~mask, port); - } + /* + * Update SCI information in the ELCR, it isn't in the PCI + * routing tables.. + */ + switch (trigger) { + case 1: /* Edge - clear */ + new &= ~mask; + break; + case 3: /* Level - set */ + new |= mask; + break; } - printk(" Trigger.\n"); + + if (old == new) + return; + + printk(PREFIX "setting ELCR to %04x (from %04x)\n", new, old); + outb(new, 0x4d0); + outb(new >> 8, 0x4d1); } diff -Nru a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c --- a/arch/i386/kernel/apic.c 2004-11-29 21:22:08 -08:00 +++ b/arch/i386/kernel/apic.c 2004-11-29 21:22:08 -08:00 @@ -717,9 +717,8 @@ * APIC only if "lapic" specified. */ if (enable_local_apic <= 0) { - apic_printk(APIC_VERBOSE, - "Local APIC disabled by BIOS -- " - "you can enable it with \"lapic\"\n"); + printk("Local APIC disabled by BIOS -- " + "you can enable it with \"lapic\"\n"); return -1; } /* @@ -730,8 +729,7 @@ */ rdmsr(MSR_IA32_APICBASE, l, h); if (!(l & MSR_IA32_APICBASE_ENABLE)) { - apic_printk(APIC_VERBOSE, "Local APIC disabled " - "by BIOS -- reenabling.\n"); + printk("Local APIC disabled by BIOS -- reenabling.\n"); l &= ~MSR_IA32_APICBASE_BASE; l |= MSR_IA32_APICBASE_ENABLE | APIC_DEFAULT_PHYS_BASE; wrmsr(MSR_IA32_APICBASE, l, h); @@ -758,7 +756,7 @@ if (nmi_watchdog != NMI_NONE) nmi_watchdog = NMI_LOCAL_APIC; - apic_printk(APIC_VERBOSE, "Found and enabled local APIC!\n"); + printk("Found and enabled local APIC!\n"); apic_pm_activate(); @@ -785,8 +783,8 @@ apic_phys = mp_lapic_addr; set_fixmap_nocache(FIX_APIC_BASE, apic_phys); - apic_printk(APIC_DEBUG, "mapped APIC to %08lx (%08lx)\n", APIC_BASE, - apic_phys); + printk(KERN_DEBUG "mapped APIC to %08lx (%08lx)\n", APIC_BASE, + apic_phys); /* * Fetch the APIC ID of the BSP in case we have a @@ -804,21 +802,23 @@ if (smp_found_config) { ioapic_phys = mp_ioapics[i].mpc_apicaddr; if (!ioapic_phys) { - printk(KERN_ERR "WARNING: bogus zero IO-APIC address found in MPTABLE, disabling IO/APIC support!\n"); - + printk(KERN_ERR + "WARNING: bogus zero IO-APIC " + "address found in MPTABLE, " + "disabling IO/APIC support!\n"); smp_found_config = 0; skip_ioapic_setup = 1; goto fake_ioapic_page; } } else { fake_ioapic_page: - ioapic_phys = (unsigned long) alloc_bootmem_pages(PAGE_SIZE); + ioapic_phys = (unsigned long) + alloc_bootmem_pages(PAGE_SIZE); ioapic_phys = __pa(ioapic_phys); } set_fixmap_nocache(idx, ioapic_phys); - apic_printk(APIC_DEBUG, "mapped IOAPIC to " - "%08lx (%08lx)\n", - __fix_to_virt(idx), ioapic_phys); + printk(KERN_DEBUG "mapped IOAPIC to %08lx (%08lx)\n", + __fix_to_virt(idx), ioapic_phys); idx++; } } @@ -1149,7 +1149,7 @@ * interrupt as well. Thus we cannot inline the local irq ... ] */ -void smp_apic_timer_interrupt(struct pt_regs regs) +fastcall void smp_apic_timer_interrupt(struct pt_regs *regs) { int cpu = smp_processor_id(); @@ -1169,14 +1169,14 @@ * interrupt lock, which is the WrongThing (tm) to do. */ irq_enter(); - smp_local_timer_interrupt(®s); + smp_local_timer_interrupt(regs); irq_exit(); } /* * This interrupt should _never_ happen with our APIC/SMP architecture */ -asmlinkage void smp_spurious_interrupt(void) +fastcall void smp_spurious_interrupt(struct pt_regs *regs) { unsigned long v; @@ -1200,7 +1200,7 @@ * This interrupt should never happen with our APIC/SMP architecture */ -asmlinkage void smp_error_interrupt(void) +fastcall void smp_error_interrupt(struct pt_regs *regs) { unsigned long v, v1; diff -Nru a/arch/i386/kernel/cpu/mcheck/k7.c b/arch/i386/kernel/cpu/mcheck/k7.c --- a/arch/i386/kernel/cpu/mcheck/k7.c 2004-11-29 21:22:07 -08:00 +++ b/arch/i386/kernel/cpu/mcheck/k7.c 2004-11-29 21:22:07 -08:00 @@ -18,7 +18,7 @@ #include "mce.h" /* Machine Check Handler For AMD Athlon/Duron */ -static asmlinkage void k7_machine_check(struct pt_regs * regs, long error_code) +static fastcall void k7_machine_check(struct pt_regs * regs, long error_code) { int recover=1; u32 alow, ahigh, high, low; diff -Nru a/arch/i386/kernel/cpu/mcheck/mce.c b/arch/i386/kernel/cpu/mcheck/mce.c --- a/arch/i386/kernel/cpu/mcheck/mce.c 2004-11-29 21:22:08 -08:00 +++ b/arch/i386/kernel/cpu/mcheck/mce.c 2004-11-29 21:22:08 -08:00 @@ -22,13 +22,13 @@ EXPORT_SYMBOL_GPL(nr_mce_banks); /* non-fatal.o */ /* Handle unconfigured int18 (should never happen) */ -static asmlinkage void unexpected_machine_check(struct pt_regs * regs, long error_code) +static fastcall void unexpected_machine_check(struct pt_regs * regs, long error_code) { printk(KERN_ERR "CPU#%d: Unexpected int18 (Machine Check).\n", smp_processor_id()); } /* Call the installed machine check handler for this CPU setup. */ -void asmlinkage (*machine_check_vector)(struct pt_regs *, long error_code) = unexpected_machine_check; +void fastcall (*machine_check_vector)(struct pt_regs *, long error_code) = unexpected_machine_check; /* This has to be run for each processor */ void __init mcheck_init(struct cpuinfo_x86 *c) diff -Nru a/arch/i386/kernel/cpu/mcheck/mce.h b/arch/i386/kernel/cpu/mcheck/mce.h --- a/arch/i386/kernel/cpu/mcheck/mce.h 2004-11-29 21:22:06 -08:00 +++ b/arch/i386/kernel/cpu/mcheck/mce.h 2004-11-29 21:22:06 -08:00 @@ -7,7 +7,7 @@ void winchip_mcheck_init(struct cpuinfo_x86 *c); /* Call the installed machine check handler for this CPU setup. */ -extern asmlinkage void (*machine_check_vector)(struct pt_regs *, long error_code); +extern fastcall void (*machine_check_vector)(struct pt_regs *, long error_code); extern int mce_disabled __initdata; extern int nr_mce_banks; diff -Nru a/arch/i386/kernel/cpu/mcheck/p4.c b/arch/i386/kernel/cpu/mcheck/p4.c --- a/arch/i386/kernel/cpu/mcheck/p4.c 2004-11-29 21:22:07 -08:00 +++ b/arch/i386/kernel/cpu/mcheck/p4.c 2004-11-29 21:22:07 -08:00 @@ -159,7 +159,7 @@ return mce_num_extended_msrs; } -static asmlinkage void intel_machine_check(struct pt_regs * regs, long error_code) +static fastcall void intel_machine_check(struct pt_regs * regs, long error_code) { int recover=1; u32 alow, ahigh, high, low; diff -Nru a/arch/i386/kernel/cpu/mcheck/p5.c b/arch/i386/kernel/cpu/mcheck/p5.c --- a/arch/i386/kernel/cpu/mcheck/p5.c 2004-11-29 21:22:09 -08:00 +++ b/arch/i386/kernel/cpu/mcheck/p5.c 2004-11-29 21:22:09 -08:00 @@ -17,7 +17,7 @@ #include "mce.h" /* Machine check handler for Pentium class Intel */ -static asmlinkage void pentium_machine_check(struct pt_regs * regs, long error_code) +static fastcall void pentium_machine_check(struct pt_regs * regs, long error_code) { u32 loaddr, hi, lotype; rdmsr(MSR_IA32_P5_MC_ADDR, loaddr, hi); diff -Nru a/arch/i386/kernel/cpu/mcheck/p6.c b/arch/i386/kernel/cpu/mcheck/p6.c --- a/arch/i386/kernel/cpu/mcheck/p6.c 2004-11-29 21:22:07 -08:00 +++ b/arch/i386/kernel/cpu/mcheck/p6.c 2004-11-29 21:22:07 -08:00 @@ -17,7 +17,7 @@ #include "mce.h" /* Machine Check Handler For PII/PIII */ -static asmlinkage void intel_machine_check(struct pt_regs * regs, long error_code) +static fastcall void intel_machine_check(struct pt_regs * regs, long error_code) { int recover=1; u32 alow, ahigh, high, low; diff -Nru a/arch/i386/kernel/cpu/mcheck/winchip.c b/arch/i386/kernel/cpu/mcheck/winchip.c --- a/arch/i386/kernel/cpu/mcheck/winchip.c 2004-11-29 21:22:07 -08:00 +++ b/arch/i386/kernel/cpu/mcheck/winchip.c 2004-11-29 21:22:07 -08:00 @@ -16,7 +16,7 @@ #include "mce.h" /* Machine check handler for WinChip C6 */ -static asmlinkage void winchip_machine_check(struct pt_regs * regs, long error_code) +static fastcall void winchip_machine_check(struct pt_regs * regs, long error_code) { printk(KERN_EMERG "CPU0: Machine Check Exception.\n"); add_taint(TAINT_MACHINE_CHECK); diff -Nru a/arch/i386/kernel/cpu/mtrr/main.c b/arch/i386/kernel/cpu/mtrr/main.c --- a/arch/i386/kernel/cpu/mtrr/main.c 2004-11-29 21:22:06 -08:00 +++ b/arch/i386/kernel/cpu/mtrr/main.c 2004-11-29 21:22:06 -08:00 @@ -149,10 +149,8 @@ local_irq_save(flags); atomic_dec(&data->count); - while(!atomic_read(&data->gate)) { + while(!atomic_read(&data->gate)) cpu_relax(); - barrier(); - } /* The master has cleared me to execute */ if (data->smp_reg != ~0U) @@ -162,10 +160,9 @@ mtrr_if->set_all(); atomic_dec(&data->count); - while(atomic_read(&data->gate)) { + while(atomic_read(&data->gate)) cpu_relax(); - barrier(); - } + atomic_dec(&data->count); local_irq_restore(flags); } @@ -230,10 +227,9 @@ local_irq_save(flags); - while(atomic_read(&data.count)) { + while(atomic_read(&data.count)) cpu_relax(); - barrier(); - } + /* ok, reset count and toggle gate */ atomic_set(&data.count, num_booting_cpus() - 1); atomic_set(&data.gate,1); @@ -250,10 +246,9 @@ mtrr_if->set(reg,base,size,type); /* wait for the others */ - while(atomic_read(&data.count)) { + while(atomic_read(&data.count)) cpu_relax(); - barrier(); - } + atomic_set(&data.count, num_booting_cpus() - 1); atomic_set(&data.gate,0); @@ -261,10 +256,9 @@ * Wait here for everyone to have seen the gate change * So we're the last ones to touch 'data' */ - while(atomic_read(&data.count)) { + while(atomic_read(&data.count)) cpu_relax(); - barrier(); - } + local_irq_restore(flags); } diff -Nru a/arch/i386/kernel/kprobes.c b/arch/i386/kernel/kprobes.c --- a/arch/i386/kernel/kprobes.c 2004-11-29 21:22:07 -08:00 +++ b/arch/i386/kernel/kprobes.c 2004-11-29 21:22:07 -08:00 @@ -117,6 +117,11 @@ p = get_kprobe(addr); if (!p) { unlock_kprobes(); + if (regs->eflags & VM_MASK) { + /* We are in virtual-8086 mode. Return 0 */ + goto no_kprobe; + } + if (*addr != BREAKPOINT_INSTRUCTION) { /* * The breakpoint instruction was removed right diff -Nru a/arch/i386/kernel/ptrace.c b/arch/i386/kernel/ptrace.c --- a/arch/i386/kernel/ptrace.c 2004-11-29 21:22:07 -08:00 +++ b/arch/i386/kernel/ptrace.c 2004-11-29 21:22:07 -08:00 @@ -138,6 +138,28 @@ return retval; } +static void set_singlestep(struct task_struct *child) +{ + long eflags; + + set_tsk_thread_flag(child, TIF_SINGLESTEP); + eflags = get_stack_long(child, EFL_OFFSET); + put_stack_long(child, EFL_OFFSET, eflags | TRAP_FLAG); + child->ptrace |= PT_DTRACE; +} + +static void clear_singlestep(struct task_struct *child) +{ + if (child->ptrace & PT_DTRACE) { + long eflags; + + clear_tsk_thread_flag(child, TIF_SINGLESTEP); + eflags = get_stack_long(child, EFL_OFFSET); + put_stack_long(child, EFL_OFFSET, eflags & ~TRAP_FLAG); + child->ptrace &= ~PT_DTRACE; + } +} + /* * Called by kernel/ptrace.c when detaching.. * @@ -145,11 +167,7 @@ */ void ptrace_disable(struct task_struct *child) { - long tmp; - - clear_tsk_thread_flag(child, TIF_SINGLESTEP); - tmp = get_stack_long(child, EFL_OFFSET) & ~TRAP_FLAG; - put_stack_long(child, EFL_OFFSET, tmp); + clear_singlestep(child); } /* @@ -388,10 +406,8 @@ } break; - case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */ - case PTRACE_CONT: { /* restart after signal. */ - long tmp; - + case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */ + case PTRACE_CONT: /* restart after signal. */ ret = -EIO; if ((unsigned long) data > _NSIG) break; @@ -401,56 +417,39 @@ else { clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); } - clear_tsk_thread_flag(child, TIF_SINGLESTEP); child->exit_code = data; - /* make sure the single step bit is not set. */ - tmp = get_stack_long(child, EFL_OFFSET) & ~TRAP_FLAG; - put_stack_long(child, EFL_OFFSET,tmp); + /* make sure the single step bit is not set. */ + clear_singlestep(child); wake_up_process(child); ret = 0; break; - } /* * make the child exit. Best I can do is send it a sigkill. * perhaps it should be put in the status that it wants to * exit. */ - case PTRACE_KILL: { - long tmp; - + case PTRACE_KILL: ret = 0; if (child->exit_state == EXIT_ZOMBIE) /* already dead */ break; child->exit_code = SIGKILL; - clear_tsk_thread_flag(child, TIF_SINGLESTEP); /* make sure the single step bit is not set. */ - tmp = get_stack_long(child, EFL_OFFSET) & ~TRAP_FLAG; - put_stack_long(child, EFL_OFFSET, tmp); + clear_singlestep(child); wake_up_process(child); break; - } - - case PTRACE_SINGLESTEP: { /* set the trap flag. */ - long tmp; + case PTRACE_SINGLESTEP: /* set the trap flag. */ ret = -EIO; if ((unsigned long) data > _NSIG) break; clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); - if ((child->ptrace & PT_DTRACE) == 0) { - /* Spurious delayed TF traps may occur */ - child->ptrace |= PT_DTRACE; - } - tmp = get_stack_long(child, EFL_OFFSET) | TRAP_FLAG; - put_stack_long(child, EFL_OFFSET, tmp); - set_tsk_thread_flag(child, TIF_SINGLESTEP); + set_singlestep(child); child->exit_code = data; /* give it a chance to run. */ wake_up_process(child); ret = 0; break; - } case PTRACE_DETACH: /* detach a process that was attached. */ diff -Nru a/arch/i386/kernel/signal.c b/arch/i386/kernel/signal.c --- a/arch/i386/kernel/signal.c 2004-11-29 21:22:07 -08:00 +++ b/arch/i386/kernel/signal.c 2004-11-29 21:22:07 -08:00 @@ -292,10 +292,15 @@ err |= __put_user(current->thread.error_code, &sc->err); err |= __put_user(regs->eip, &sc->eip); err |= __put_user(regs->xcs, (unsigned int __user *)&sc->cs); + + /* + * Iff TF was set because the program is being single-stepped by a + * debugger, don't save that information on the signal stack.. We + * don't want debugging to change state. + */ eflags = regs->eflags; - if (current->ptrace & PT_PTRACED) { + if (current->ptrace & PT_DTRACE) eflags &= ~TF_MASK; - } err |= __put_user(eflags, &sc->eflags); err |= __put_user(regs->esp, &sc->esp_at_signal); err |= __put_user(regs->xss, (unsigned int __user *)&sc->ss); @@ -412,12 +417,17 @@ regs->xes = __USER_DS; regs->xss = __USER_DS; regs->xcs = __USER_CS; + + /* + * Clear TF when entering the signal handler, but + * notify any tracer that was single-stepping it. + * The tracer may want to single-step inside the + * handler too. + */ if (regs->eflags & TF_MASK) { - if ((current->ptrace & (PT_PTRACED | PT_DTRACE)) == (PT_PTRACED | PT_DTRACE)) { + regs->eflags &= ~TF_MASK; + if (current->ptrace & PT_DTRACE) ptrace_notify(SIGTRAP); - } else { - regs->eflags &= ~TF_MASK; - } } #if DEBUG_SIG @@ -502,12 +512,17 @@ regs->xes = __USER_DS; regs->xss = __USER_DS; regs->xcs = __USER_CS; + + /* + * Clear TF when entering the signal handler, but + * notify any tracer that was single-stepping it. + * The tracer may want to single-step inside the + * handler too. + */ if (regs->eflags & TF_MASK) { - if (current->ptrace & PT_PTRACED) { + regs->eflags &= ~TF_MASK; + if (current->ptrace & PT_DTRACE) ptrace_notify(SIGTRAP); - } else { - regs->eflags &= ~TF_MASK; - } } #if DEBUG_SIG diff -Nru a/arch/i386/kernel/smp.c b/arch/i386/kernel/smp.c --- a/arch/i386/kernel/smp.c 2004-11-29 21:22:06 -08:00 +++ b/arch/i386/kernel/smp.c 2004-11-29 21:22:06 -08:00 @@ -308,7 +308,7 @@ * 2) Leave the mm if we are in the lazy tlb mode. */ -asmlinkage void smp_invalidate_interrupt (void) +fastcall void smp_invalidate_interrupt(struct pt_regs *regs) { unsigned long cpu; @@ -538,11 +538,11 @@ /* Wait for response */ while (atomic_read(&data.started) != cpus) - barrier(); + cpu_relax(); if (wait) while (atomic_read(&data.finished) != cpus) - barrier(); + cpu_relax(); spin_unlock(&call_lock); return 0; @@ -579,12 +579,12 @@ * all the work is done automatically when * we return from the interrupt. */ -asmlinkage void smp_reschedule_interrupt(void) +fastcall void smp_reschedule_interrupt(struct pt_regs *regs) { ack_APIC_irq(); } -asmlinkage void smp_call_function_interrupt(void) +fastcall void smp_call_function_interrupt(struct pt_regs *regs) { void (*func) (void *info) = call_data->func; void *info = call_data->info; diff -Nru a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c --- a/arch/i386/kernel/traps.c 2004-11-29 21:22:06 -08:00 +++ b/arch/i386/kernel/traps.c 2004-11-29 21:22:06 -08:00 @@ -358,16 +358,7 @@ die(str, regs, err); } -static inline unsigned long get_cr2(void) -{ - unsigned long address; - - /* get the address */ - __asm__("movl %%cr2,%0":"=r" (address)); - return address; -} - -static inline void do_trap(int trapnr, int signr, char *str, int vm86, +static void do_trap(int trapnr, int signr, char *str, int vm86, struct pt_regs * regs, long error_code, siginfo_t *info) { if (regs->eflags & VM_MASK) { @@ -513,7 +504,7 @@ gp_in_kernel: if (!fixup_exception(regs)) { if (notify_die(DIE_GPF, "general protection fault", regs, - error_code, 13, SIGSEGV) == NOTIFY_STOP); + error_code, 13, SIGSEGV) == NOTIFY_STOP) return; die("general protection fault", regs, error_code); } diff -Nru a/arch/i386/mach-voyager/voyager_smp.c b/arch/i386/mach-voyager/voyager_smp.c --- a/arch/i386/mach-voyager/voyager_smp.c 2004-11-29 21:22:07 -08:00 +++ b/arch/i386/mach-voyager/voyager_smp.c 2004-11-29 21:22:07 -08:00 @@ -785,8 +785,8 @@ * System interrupts occur because some problem was detected on the * various busses. To find out what you have to probe all the * hardware via the CAT bus. FIXME: At the moment we do nothing. */ -asmlinkage void -smp_vic_sys_interrupt(void) +fastcall void +smp_vic_sys_interrupt(struct pt_regs *regs) { ack_CPI(VIC_SYS_INT); printk("Voyager SYSTEM INTERRUPT\n"); @@ -795,8 +795,8 @@ /* Handle a voyager CMN_INT; These interrupts occur either because of * a system status change or because a single bit memory error * occurred. FIXME: At the moment, ignore all this. */ -asmlinkage void -smp_vic_cmn_interrupt(void) +fastcall void +smp_vic_cmn_interrupt(struct pt_regs *regs) { static __u8 in_cmn_int = 0; static spinlock_t cmn_int_lock = SPIN_LOCK_UNLOCKED; @@ -824,7 +824,7 @@ /* * Reschedule call back. Nothing to do, all the work is done * automatically when we return from the interrupt. */ -asmlinkage void +static void smp_reschedule_interrupt(void) { /* do nothing */ @@ -855,7 +855,7 @@ /* * Invalidate call-back */ -asmlinkage void +static void smp_invalidate_interrupt(void) { __u8 cpu = smp_processor_id(); @@ -989,7 +989,7 @@ } /* enable the requested IRQs */ -asmlinkage void +static void smp_enable_irq_interrupt(void) { __u8 irq; @@ -1038,7 +1038,7 @@ * previously set up. This is used to schedule a function for * execution on all CPU's - set up the function then broadcast a * function_interrupt CPI to come here on each CPU */ -asmlinkage void +static void smp_call_function_interrupt(void) { void (*func) (void *info) = call_data->func; @@ -1133,50 +1133,50 @@ * no local APIC, so I can't do this * * This function is currently a placeholder and is unused in the code */ -asmlinkage void -smp_apic_timer_interrupt(struct pt_regs regs) +fastcall void +smp_apic_timer_interrupt(struct pt_regs *regs) { - wrapper_smp_local_timer_interrupt(®s); + wrapper_smp_local_timer_interrupt(regs); } /* All of the QUAD interrupt GATES */ -asmlinkage void -smp_qic_timer_interrupt(struct pt_regs regs) +fastcall void +smp_qic_timer_interrupt(struct pt_regs *regs) { ack_QIC_CPI(QIC_TIMER_CPI); - wrapper_smp_local_timer_interrupt(®s); + wrapper_smp_local_timer_interrupt(regs); } -asmlinkage void -smp_qic_invalidate_interrupt(void) +fastcall void +smp_qic_invalidate_interrupt(struct pt_regs *regs) { ack_QIC_CPI(QIC_INVALIDATE_CPI); smp_invalidate_interrupt(); } -asmlinkage void -smp_qic_reschedule_interrupt(void) +fastcall void +smp_qic_reschedule_interrupt(struct pt_regs *regs) { ack_QIC_CPI(QIC_RESCHEDULE_CPI); smp_reschedule_interrupt(); } -asmlinkage void -smp_qic_enable_irq_interrupt(void) +fastcall void +smp_qic_enable_irq_interrupt(struct pt_regs *regs) { ack_QIC_CPI(QIC_ENABLE_IRQ_CPI); smp_enable_irq_interrupt(); } -asmlinkage void -smp_qic_call_function_interrupt(void) +fastcall void +smp_qic_call_function_interrupt(struct pt_regs *regs) { ack_QIC_CPI(QIC_CALL_FUNCTION_CPI); smp_call_function_interrupt(); } -asmlinkage void -smp_vic_cpi_interrupt(struct pt_regs regs) +fastcall void +smp_vic_cpi_interrupt(struct pt_regs *regs) { __u8 cpu = smp_processor_id(); @@ -1186,7 +1186,7 @@ ack_VIC_CPI(VIC_CPI_LEVEL0); if(test_and_clear_bit(VIC_TIMER_CPI, &vic_cpi_mailbox[cpu])) - wrapper_smp_local_timer_interrupt(®s); + wrapper_smp_local_timer_interrupt(regs); if(test_and_clear_bit(VIC_INVALIDATE_CPI, &vic_cpi_mailbox[cpu])) smp_invalidate_interrupt(); if(test_and_clear_bit(VIC_RESCHEDULE_CPI, &vic_cpi_mailbox[cpu])) diff -Nru a/arch/i386/mm/discontig.c b/arch/i386/mm/discontig.c --- a/arch/i386/mm/discontig.c 2004-11-29 21:22:07 -08:00 +++ b/arch/i386/mm/discontig.c 2004-11-29 21:22:07 -08:00 @@ -468,7 +468,7 @@ if (high0->spanned_pages > 0) highmem_start_page = high0->zone_mem_map; else - highmem_start_page = pfn_to_page(max_low_pfn+1); + highmem_start_page = pfn_to_page(max_low_pfn - 1) + 1; num_physpages = highend_pfn; #else num_physpages = max_low_pfn; diff -Nru a/arch/ia64/ia32/binfmt_elf32.c b/arch/ia64/ia32/binfmt_elf32.c --- a/arch/ia64/ia32/binfmt_elf32.c 2004-11-29 21:22:08 -08:00 +++ b/arch/ia64/ia32/binfmt_elf32.c 2004-11-29 21:22:08 -08:00 @@ -100,7 +100,11 @@ vma->vm_ops = &ia32_shared_page_vm_ops; down_write(¤t->mm->mmap_sem); { - insert_vm_struct(current->mm, vma); + if (insert_vm_struct(current->mm, vma)) { + kmem_cache_free(vm_area_cachep, vma); + up_write(¤t->mm->mmap_sem); + return; + } } up_write(¤t->mm->mmap_sem); } @@ -123,7 +127,11 @@ vma->vm_ops = &ia32_gate_page_vm_ops; down_write(¤t->mm->mmap_sem); { - insert_vm_struct(current->mm, vma); + if (insert_vm_struct(current->mm, vma)) { + kmem_cache_free(vm_area_cachep, vma); + up_write(¤t->mm->mmap_sem); + return; + } } up_write(¤t->mm->mmap_sem); } @@ -142,7 +150,11 @@ vma->vm_flags = VM_READ|VM_WRITE|VM_MAYREAD|VM_MAYWRITE; down_write(¤t->mm->mmap_sem); { - insert_vm_struct(current->mm, vma); + if (insert_vm_struct(current->mm, vma)) { + kmem_cache_free(vm_area_cachep, vma); + up_write(¤t->mm->mmap_sem); + return; + } } up_write(¤t->mm->mmap_sem); } @@ -190,7 +202,7 @@ unsigned long stack_base; struct vm_area_struct *mpnt; struct mm_struct *mm = current->mm; - int i; + int i, ret; stack_base = IA32_STACK_TOP - MAX_ARG_PAGES*PAGE_SIZE; mm->arg_start = bprm->p + stack_base; @@ -225,7 +237,11 @@ mpnt->vm_flags = VM_STACK_FLAGS; mpnt->vm_page_prot = (mpnt->vm_flags & VM_EXEC)? PAGE_COPY_EXEC: PAGE_COPY; - insert_vm_struct(current->mm, mpnt); + if ((ret = insert_vm_struct(current->mm, mpnt))) { + up_write(¤t->mm->mmap_sem); + kmem_cache_free(vm_area_cachep, mpnt); + return ret; + } current->mm->stack_vm = current->mm->total_vm = vma_pages(mpnt); } diff -Nru a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S --- a/arch/ia64/kernel/entry.S 2004-11-29 21:22:07 -08:00 +++ b/arch/ia64/kernel/entry.S 2004-11-29 21:22:07 -08:00 @@ -1526,11 +1526,11 @@ data8 sys_mq_notify data8 sys_mq_getsetattr data8 sys_ni_syscall // reserved for kexec_load - data8 sys_ni_syscall - data8 sys_ni_syscall // 1270 - data8 sys_ni_syscall - data8 sys_ni_syscall - data8 sys_ni_syscall + data8 sys_ni_syscall // reserved for vserver + data8 sys_waitid // 1270 + data8 sys_add_key + data8 sys_request_key + data8 sys_keyctl data8 sys_ni_syscall data8 sys_ni_syscall // 1275 data8 sys_ni_syscall diff -Nru a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c --- a/arch/ia64/kernel/iosapic.c 2004-11-29 21:22:07 -08:00 +++ b/arch/ia64/kernel/iosapic.c 2004-11-29 21:22:07 -08:00 @@ -521,7 +521,12 @@ goto skip_numa_setup; cpu_mask = node_to_cpumask(iosapic_lists[iosapic_index].node); - + + for_each_cpu_mask(numa_cpu, cpu_mask) { + if (!cpu_online(numa_cpu)) + cpu_clear(numa_cpu, cpu_mask); + } + num_cpus = cpus_weight(cpu_mask); if (!num_cpus) diff -Nru a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c --- a/arch/ia64/kernel/irq.c 2004-11-29 21:22:08 -08:00 +++ b/arch/ia64/kernel/irq.c 2004-11-29 21:22:08 -08:00 @@ -215,11 +215,6 @@ skip: spin_unlock_irqrestore(&idesc->lock, flags); } else if (i == NR_IRQS) { - seq_puts(p, "NMI: "); - for (j = 0; j < NR_CPUS; j++) - if (cpu_online(j)) - seq_printf(p, "%10u ", nmi_count(j)); - seq_putc(p, '\n'); #ifdef CONFIG_X86_LOCAL_APIC seq_puts(p, "LOC: "); for (j = 0; j < NR_CPUS; j++) diff -Nru a/arch/ia64/kernel/ivt.S b/arch/ia64/kernel/ivt.S --- a/arch/ia64/kernel/ivt.S 2004-11-29 21:22:06 -08:00 +++ b/arch/ia64/kernel/ivt.S 2004-11-29 21:22:06 -08:00 @@ -852,7 +852,7 @@ add r17=PT(R11),r1 // initialize second base pointer ;; alloc r19=ar.pfs,8,0,0,0 // ensure in0-in7 are writable - st8 [r16]=r29,PT(CR_IFS)-PT(CR_IPSR) // save cr.ipsr + st8 [r16]=r29,PT(AR_PFS)-PT(CR_IPSR) // save cr.ipsr tnat.nz p8,p0=in0 st8.spill [r17]=r11,PT(CR_IIP)-PT(R11) // save r11 @@ -860,31 +860,31 @@ (pKStk) mov r18=r0 // make sure r18 isn't NaT ;; + st8 [r16]=r26,PT(CR_IFS)-PT(AR_PFS) // save ar.pfs st8 [r17]=r28,PT(AR_UNAT)-PT(CR_IIP) // save cr.iip mov r28=b0 // save b0 (2 cyc) -(p8) mov in0=-1 ;; - st8 [r16]=r0,PT(AR_PFS)-PT(CR_IFS) // clear cr.ifs st8 [r17]=r25,PT(AR_RSC)-PT(AR_UNAT) // save ar.unat -(p9) mov in1=-1 + dep r19=0,r19,38,26 // clear all bits but 0..37 [I0] +(p8) mov in0=-1 ;; - st8 [r16]=r26,PT(AR_RNAT)-PT(AR_PFS) // save ar.pfs + st8 [r16]=r19,PT(AR_RNAT)-PT(CR_IFS) // store ar.pfs.pfm in cr.ifs st8 [r17]=r27,PT(AR_BSPSTORE)-PT(AR_RSC)// save ar.rsc - tnat.nz p10,p0=in2 +(p9) mov in1=-1 (pUStk) sub r18=r18,r22 // r18=RSE.ndirty*8 tbit.nz p15,p0=r29,IA64_PSR_I_BIT - tnat.nz p11,p0=in3 + tnat.nz p10,p0=in2 ;; (pKStk) adds r16=PT(PR)-PT(AR_RNAT),r16 // skip over ar_rnat field (pKStk) adds r17=PT(B0)-PT(AR_BSPSTORE),r17 // skip over ar_bspstore field + tnat.nz p11,p0=in3 + ;; (p10) mov in2=-1 - + tnat.nz p12,p0=in4 // [I0] (p11) mov in3=-1 - tnat.nz p12,p0=in4 - tnat.nz p13,p0=in5 ;; (pUStk) st8 [r16]=r24,PT(PR)-PT(AR_RNAT) // save ar.rnat (pUStk) st8 [r17]=r23,PT(B0)-PT(AR_BSPSTORE) // save ar.bspstore @@ -892,28 +892,29 @@ ;; st8 [r16]=r31,PT(LOADRS)-PT(PR) // save predicates st8 [r17]=r28,PT(R1)-PT(B0) // save b0 -(p12) mov in4=-1 + tnat.nz p13,p0=in5 // [I0] ;; st8 [r16]=r18,PT(R12)-PT(LOADRS) // save ar.rsc value for "loadrs" st8.spill [r17]=r20,PT(R13)-PT(R1) // save original r1 -(p13) mov in5=-1 +(p12) mov in4=-1 ;; .mem.offset 0,0; st8.spill [r16]=r12,PT(AR_FPSR)-PT(R12) // save r12 .mem.offset 8,0; st8.spill [r17]=r13,PT(R15)-PT(R13) // save r13 - tnat.nz p14,p0=in6 +(p13) mov in5=-1 ;; st8 [r16]=r21,PT(R8)-PT(AR_FPSR) // save ar.fpsr st8.spill [r17]=r15 // save r15 - tnat.nz p8,p0=in7 + tnat.nz p14,p0=in6 ;; stf8 [r16]=f1 // ensure pt_regs.r8 != 0 (see handle_syscall_error) adds r12=-16,r1 // switch to kernel memory stack (with 16 bytes of scratch) -(p14) mov in6=-1 + tnat.nz p8,p0=in7 mov r13=r2 // establish `current' movl r1=__gp // establish kernel global pointer ;; +(p14) mov in6=-1 (p8) mov in7=-1 tnat.nz p9,p0=r15 diff -Nru a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c --- a/arch/ia64/kernel/mca.c 2004-11-29 21:22:07 -08:00 +++ b/arch/ia64/kernel/mca.c 2004-11-29 21:22:07 -08:00 @@ -686,6 +686,7 @@ irr = ia64_getreg(_IA64_REG_CR_IRR3); break; } + cpu_relax(); } while (!(irr & (1UL << irr_bit))) ; } diff -Nru a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c --- a/arch/ia64/kernel/perfmon.c 2004-11-29 21:22:08 -08:00 +++ b/arch/ia64/kernel/perfmon.c 2004-11-29 21:22:08 -08:00 @@ -3057,7 +3057,7 @@ #endif } - DPRINT(("pmc[%u]=0x%lx ld=%d apmu=%d flags=0x%lx all_pmcs=0x%lx used_pmds=0x%lx eventid=%ld smpl_pmds=0x%lx reset_pmds=0x%lx reloads_pmcs=0x%lx used_monitors=0x%lx ovfl_regs=0x%lx\n", + DPRINT(("pmc[%u]=0x%lx ld=%d apmu=%d flags=0x%x all_pmcs=0x%lx used_pmds=0x%lx eventid=%ld smpl_pmds=0x%lx reset_pmds=0x%lx reloads_pmcs=0x%lx used_monitors=0x%lx ovfl_regs=0x%lx\n", cnum, value, is_loaded, @@ -5057,6 +5057,18 @@ UNPROTECT_CTX(ctx, flags); + /* + * pfm_handle_work() is currently called with interrupts disabled. + * The down_interruptible call may sleep, therefore we + * must re-enable interrupts to avoid deadlocks. It is + * safe to do so because this function is called ONLY + * when returning to user level (PUStk=1), in which case + * there is no risk of kernel stack overflow due to deep + * interrupt nesting. + */ + BUG_ON(flags & IA64_PSR_I); + local_irq_enable(); + DPRINT(("before block sleeping\n")); /* @@ -5066,6 +5078,12 @@ ret = down_interruptible(&ctx->ctx_restart_sem); DPRINT(("after block sleeping ret=%d\n", ret)); + + /* + * disable interrupts to restore state we had upon entering + * this function + */ + local_irq_disable(); PROTECT_CTX(ctx, flags); diff -Nru a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c --- a/arch/ia64/kernel/ptrace.c 2004-11-29 21:22:08 -08:00 +++ b/arch/ia64/kernel/ptrace.c 2004-11-29 21:22:08 -08:00 @@ -1,7 +1,7 @@ /* * Kernel support for the ptrace() and syscall tracing interfaces. * - * Copyright (C) 1999-2003 Hewlett-Packard Co + * Copyright (C) 1999-2004 Hewlett-Packard Co * David Mosberger-Tang * * Derived from the x86 and Alpha versions. Most of the code in here @@ -304,7 +304,6 @@ long num_regs, nbits; struct pt_regs *pt; unsigned long cfm, *urbs_kargs; - struct unw_frame_info info; pt = ia64_task_regs(task); kbsp = (unsigned long *) sw->ar_bspstore; @@ -316,11 +315,8 @@ * If entered via syscall, don't allow user to set rnat bits * for syscall args. */ - unw_init_from_blocked_task(&info,task); - if (unw_unwind_to_user(&info) == 0) { - unw_get_cfm(&info,&cfm); - urbs_kargs = ia64_rse_skip_regs(urbs_end,-(cfm & 0x7f)); - } + cfm = pt->cr_ifs; + urbs_kargs = ia64_rse_skip_regs(urbs_end, -(cfm & 0x7f)); } if (urbs_kargs >= urnat_addr) @@ -480,27 +476,18 @@ unsigned long ia64_get_user_rbs_end (struct task_struct *child, struct pt_regs *pt, unsigned long *cfmp) { - unsigned long *krbs, *bspstore, cfm; - struct unw_frame_info info; + unsigned long *krbs, *bspstore, cfm = pt->cr_ifs; long ndirty; krbs = (unsigned long *) child + IA64_RBS_OFFSET/8; bspstore = (unsigned long *) pt->ar_bspstore; ndirty = ia64_rse_num_regs(krbs, krbs + (pt->loadrs >> 19)); - cfm = pt->cr_ifs & ~(1UL << 63); - if (in_syscall(pt)) { - /* - * If bit 63 of cr.ifs is cleared, the kernel was entered via a system - * call and we need to recover the CFM that existed on entry to the - * kernel by unwinding the kernel stack. - */ - unw_init_from_blocked_task(&info, child); - if (unw_unwind_to_user(&info) == 0) { - unw_get_cfm(&info, &cfm); - ndirty += (cfm & 0x7f); - } - } + if (in_syscall(pt)) + ndirty += (cfm & 0x7f); + else + cfm &= ~(1UL << 63); /* clear valid bit */ + if (cfmp) *cfmp = cfm; return (unsigned long) ia64_rse_skip_regs(bspstore, ndirty); diff -Nru a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c --- a/arch/ia64/kernel/setup.c 2004-11-29 21:22:06 -08:00 +++ b/arch/ia64/kernel/setup.c 2004-11-29 21:22:06 -08:00 @@ -258,25 +258,6 @@ num_io_spaces = 1; } -#ifdef CONFIG_SERIAL_8250_CONSOLE -static void __init -setup_serial_legacy (void) -{ - struct uart_port port; - unsigned int i, iobase[] = {0x3f8, 0x2f8}; - - printk(KERN_INFO "Registering legacy COM ports for serial console\n"); - memset(&port, 0, sizeof(port)); - port.iotype = SERIAL_IO_PORT; - port.uartclk = BASE_BAUD * 16; - for (i = 0; i < ARRAY_SIZE(iobase); i++) { - port.line = i; - port.iobase = iobase[i]; - early_serial_setup(&port); - } -} -#endif - /** * early_console_setup - setup debugging console * @@ -287,15 +268,23 @@ * Returns non-zero if a console couldn't be setup. */ static inline int __init -early_console_setup (void) +early_console_setup (char *cmdline) { #ifdef CONFIG_SERIAL_SGI_L1_CONSOLE { extern int sn_serial_console_early_setup(void); - if(!sn_serial_console_early_setup()) + if (!sn_serial_console_early_setup()) return 0; } #endif +#ifdef CONFIG_EFI_PCDP + if (!efi_setup_pcdp_console(cmdline)) + return 0; +#endif +#ifdef CONFIG_SERIAL_8250_CONSOLE + if (!early_serial_console_init(cmdline)) + return 0; +#endif return -1; } @@ -319,7 +308,7 @@ #ifdef CONFIG_SMP /* If we register an early console, allow CPU 0 to printk */ - if (!early_console_setup()) + if (!early_console_setup(*cmdline_p)) cpu_set(smp_processor_id(), cpu_online_map); #endif @@ -348,13 +337,6 @@ #ifdef CONFIG_ACPI_BOOT acpi_boot_init(); -#endif -#ifdef CONFIG_EFI_PCDP - efi_setup_pcdp_console(*cmdline_p); -#endif -#ifdef CONFIG_SERIAL_8250_CONSOLE - if (!efi.hcdp) - setup_serial_legacy(); #endif #ifdef CONFIG_VT diff -Nru a/arch/ia64/kernel/signal.c b/arch/ia64/kernel/signal.c --- a/arch/ia64/kernel/signal.c 2004-11-29 21:22:07 -08:00 +++ b/arch/ia64/kernel/signal.c 2004-11-29 21:22:07 -08:00 @@ -290,12 +290,10 @@ if (on_sig_stack((unsigned long) sc)) flags |= IA64_SC_FLAG_ONSTACK; - if ((ifs & (1UL << 63)) == 0) { - /* if cr_ifs isn't valid, we got here through a syscall */ + if ((ifs & (1UL << 63)) == 0) + /* if cr_ifs doesn't have the valid bit set, we got here through a syscall */ flags |= IA64_SC_FLAG_IN_SYSCALL; - cfm = scr->ar_pfs & ((1UL << 38) - 1); - } else - cfm = ifs & ((1UL << 38) - 1); + cfm = ifs & ((1UL << 38) - 1); ia64_flush_fph(current); if ((current->thread.flags & IA64_THREAD_FPH_VALID)) { flags |= IA64_SC_FLAG_FPH_VALID; diff -Nru a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c --- a/arch/ia64/kernel/smp.c 2004-11-29 21:22:08 -08:00 +++ b/arch/ia64/kernel/smp.c 2004-11-29 21:22:08 -08:00 @@ -290,11 +290,11 @@ /* Wait for response */ while (atomic_read(&data.started) != cpus) - barrier(); + cpu_relax(); if (wait) while (atomic_read(&data.finished) != cpus) - barrier(); + cpu_relax(); call_data = NULL; spin_unlock_bh(&call_lock); @@ -349,11 +349,11 @@ /* Wait for response */ while (atomic_read(&data.started) != cpus) - barrier(); + cpu_relax(); if (wait) while (atomic_read(&data.finished) != cpus) - barrier(); + cpu_relax(); call_data = NULL; spin_unlock(&call_lock); diff -Nru a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c --- a/arch/ia64/mm/init.c 2004-11-29 21:22:07 -08:00 +++ b/arch/ia64/mm/init.c 2004-11-29 21:22:07 -08:00 @@ -131,7 +131,13 @@ vma->vm_end = vma->vm_start + PAGE_SIZE; vma->vm_page_prot = protection_map[VM_DATA_DEFAULT_FLAGS & 0x7]; vma->vm_flags = VM_DATA_DEFAULT_FLAGS | VM_GROWSUP; - insert_vm_struct(current->mm, vma); + down_write(¤t->mm->mmap_sem); + if (insert_vm_struct(current->mm, vma)) { + up_write(¤t->mm->mmap_sem); + kmem_cache_free(vm_area_cachep, vma); + return; + } + up_write(¤t->mm->mmap_sem); } /* map NaT-page at address zero to speed up speculative dereferencing of NULL: */ @@ -143,7 +149,13 @@ vma->vm_end = PAGE_SIZE; vma->vm_page_prot = __pgprot(pgprot_val(PAGE_READONLY) | _PAGE_MA_NAT); vma->vm_flags = VM_READ | VM_MAYREAD | VM_IO | VM_RESERVED; - insert_vm_struct(current->mm, vma); + down_write(¤t->mm->mmap_sem); + if (insert_vm_struct(current->mm, vma)) { + up_write(¤t->mm->mmap_sem); + kmem_cache_free(vm_area_cachep, vma); + return; + } + up_write(¤t->mm->mmap_sem); } } } diff -Nru a/arch/m32r/Kconfig b/arch/m32r/Kconfig --- a/arch/m32r/Kconfig 2004-11-29 21:22:06 -08:00 +++ b/arch/m32r/Kconfig 2004-11-29 21:22:06 -08:00 @@ -3,7 +3,7 @@ # see Documentation/kbuild/kconfig-language.txt. # -mainmenu "Linux Kernel Configuration" +mainmenu "Linux/M32R Kernel Configuration" config M32R bool @@ -20,6 +20,10 @@ bool default y +#config GENERIC_HARDIRQS +# bool +# default y + source "init/Kconfig" @@ -189,6 +193,10 @@ bool default n +config GENERIC_CALIBRATE_DELAY + bool + default y + config PREEMPT bool "Preemptible Kernel" help @@ -346,96 +354,10 @@ source "arch/m32r/oprofile/Kconfig" -menu "Kernel hacking" - -config DEBUG_KERNEL - bool "Kernel debugging" - help - Say Y here if you are developing drivers or trying to debug and - identify kernel problems. - -config DEBUG_STACKOVERFLOW - bool "Check for stack overflows" - depends on DEBUG_KERNEL - -config DEBUG_SLAB - bool "Debug memory allocations" - depends on DEBUG_KERNEL - help - Say Y here to have the kernel do limited verification on memory - allocation as well as poisoning memory on free to catch use of freed - memory. - -config DEBUG_IOVIRT - bool "Memory mapped I/O debugging" - depends on DEBUG_KERNEL - help - Say Y here to get warned whenever an attempt is made to do I/O on - obviously invalid addresses such as those generated when ioremap() - calls are forgotten. Memory mapped I/O will go through an extra - check to catch access to unmapped ISA addresses, an access method - that can still be used by old drivers that are being ported from - 2.0/2.2. - -config MAGIC_SYSRQ - bool "Magic SysRq key" - depends on DEBUG_KERNEL - help - If you say Y here, you will have some control over the system even - if the system crashes for example during kernel debugging (e.g., you - will be able to flush the buffer cache to disk, reboot the system - immediately or dump some status information). This is accomplished - by pressing various keys while holding SysRq (Alt+PrintScreen). It - also works on a serial console (on PC hardware at least), if you - send a BREAK and then within 5 seconds a command keypress. The - keys are documented in . Don't say Y - unless you really know what this hack does. - -config DEBUG_SPINLOCK - bool "Spinlock debugging" - depends on DEBUG_KERNEL - help - Say Y here and build SMP to catch missing spinlock initialization - and certain other kinds of spinlock errors commonly made. This is - best used in conjunction with the NMI watchdog so that spinlock - deadlocks are also debuggable. - -config DEBUG_PAGEALLOC - bool "Page alloc debugging" - depends on DEBUG_KERNEL - help - Unmap pages from the kernel linear mapping after free_pages(). - This results in a large slowdown, but helps to find certain types - of memory corruptions. - -config DEBUG_INFO - bool "Compile the kernel with debug info" - depends on DEBUG_KERNEL - help - If you say Y here the resulting kernel image will include - debugging info resulting in a larger kernel image. - Say Y here only if you plan to use gdb to debug the kernel. - If you don't debug the kernel, you can say N. - -config DEBUG_SPINLOCK_SLEEP - bool "Sleep-inside-spinlock checking" - help - If you say Y here, various routines which may sleep will become very - noisy if they are called with a spinlock held. - -config FRAME_POINTER - bool "Compile the kernel with frame pointers" - help - If you say Y here the resulting kernel image will be slightly larger - and slower, but it will give very useful debugging information. - If you don't debug the kernel, you can say N, but we may not be able - to solve problems without frame pointers. - -endmenu +source "arch/m32r/Kconfig.debug" source "security/Kconfig" source "crypto/Kconfig" source "lib/Kconfig" - diff -Nru a/arch/m32r/Kconfig.debug b/arch/m32r/Kconfig.debug --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/m32r/Kconfig.debug 2004-11-29 21:22:09 -08:00 @@ -0,0 +1,34 @@ +menu "Kernel hacking" + +source "lib/Kconfig.debug" + +config DEBUG_STACKOVERFLOW + bool "Check for stack overflows" + depends on DEBUG_KERNEL + +config DEBUG_STACK_USAGE + bool "Stack utilization instrumentation" + depends on DEBUG_KERNEL + help + Enables the display of the minimum amount of free stack which each + task has ever had available in the sysrq-T and sysrq-P debug output. + + This option will slow down process creation somewhat. + +config DEBUG_PAGEALLOC + bool "Page alloc debugging" + depends on DEBUG_KERNEL + help + Unmap pages from the kernel linear mapping after free_pages(). + This results in a large slowdown, but helps to find certain types + of memory corruptions. + +config FRAME_POINTER + bool "Compile the kernel with frame pointers" + help + If you say Y here the resulting kernel image will be slightly larger + and slower, but it will give very useful debugging information. + If you don't debug the kernel, you can say N, but we may not be able + to solve problems without frame pointers. + +endmenu diff -Nru a/arch/m32r/Makefile b/arch/m32r/Makefile --- a/arch/m32r/Makefile 2004-11-29 21:22:08 -08:00 +++ b/arch/m32r/Makefile 2004-11-29 21:22:08 -08:00 @@ -41,6 +41,8 @@ .PHONY: zImage +all: zImage + zImage: vmlinux $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ @@ -50,5 +52,5 @@ $(Q)$(MAKE) $(clean)=$(boot) define archhelp - @echo ' zImage - Compressed kernel image (arch/m32r/boot/zImage)' + echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)' endef diff -Nru a/arch/m32r/boot/compressed/Makefile b/arch/m32r/boot/compressed/Makefile --- a/arch/m32r/boot/compressed/Makefile 2004-11-29 21:22:06 -08:00 +++ b/arch/m32r/boot/compressed/Makefile 2004-11-29 21:22:06 -08:00 @@ -5,10 +5,10 @@ # targets := vmlinux vmlinux.bin vmlinux.bin.gz head.o misc.o \ - m32r-sio.o piggy.o vmlinux.lds + piggy.o vmlinux.lds EXTRA_AFLAGS := -traditional -OBJECTS = $(obj)/head.o $(obj)/misc.o $(obj)/m32r_sio.o +OBJECTS = $(obj)/head.o $(obj)/misc.o # # IMAGE_OFFSET is the load offset of the compression loader @@ -27,6 +27,8 @@ $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE $(call if_changed,gzip) + +CFLAGS_misc.o += -fpic LDFLAGS_piggy.o := -r --format binary --oformat elf32-m32r-linux -T OBJCOPYFLAGS += -R .empty_zero_page diff -Nru a/arch/m32r/boot/compressed/head.S b/arch/m32r/boot/compressed/head.S --- a/arch/m32r/boot/compressed/head.S 2004-11-29 21:22:06 -08:00 +++ b/arch/m32r/boot/compressed/head.S 2004-11-29 21:22:06 -08:00 @@ -13,20 +13,62 @@ #include #include + /* + * This code can be loaded anywhere, as long as output will not + * overlap it. + * + * NOTE: This head.S should *NOT* be compiled with -fpic. + * + */ + .global startup + .global __bss_start, _ebss, end, zimage_data, zimage_len __ALIGN startup: ldi r0, #0x0000 /* SPI, disable EI */ mvtc r0, psw + ldi r12, #-8 + bl 1f + .fillinsn +1: + seth r1, #high(CONFIG_MEMORY_START + 0x00400000) /* Start address */ + add r12, r14 /* Real address */ + sub r12, r1 /* difference */ + + .global got_len + seth r3, #high(_GLOBAL_OFFSET_TABLE_+8) + or3 r3, r3, #low(_GLOBAL_OFFSET_TABLE_+12) + add r3, r14 + + /* Update the contents of global offset table */ + ldi r1, #low(got_len) + srli r1, #2 + beqz r1, 2f + .fillinsn +1: + ld r2, @r3 + add r2, r12 + st r2, @r3 + addi r3, #4 + addi r1, #-1 + bnez r1, 1b + .fillinsn +2: + /* XXX: resolve plt */ + /* * Clear BSS first so that there are no surprises... */ #ifdef CONFIG_ISA_DUAL_ISSUE + seth r2, #high(__bss_start) + or3 r2, r2, #low(__bss_start) + add r2, r12 + seth r3, #high(_ebss) + or3 r3, r3, #low(_ebss) + add r3, r12 + sub r3, r2 - LDIMM (r2, __bss_start) - LDIMM (r3, _end) - sub r3, r2 ; BSS size in bytes ; R4 = BSS size in longwords (rounded down) mv r4, r3 || ldi r1, #0 srli r4, #4 || addi r2, #-4 @@ -52,10 +94,13 @@ .Lendloop2: #else /* not CONFIG_ISA_DUAL_ISSUE */ - - LDIMM (r2, __bss_start) - LDIMM (r3, _end) - sub r3, r2 ; BSS size in bytes + seth r2, #high(__bss_start) + or3 r2, r2, #low(__bss_start) + add r2, r12 + seth r3, #high(_ebss) + or3 r3, r3, #low(_ebss) + add r3, r12 + sub r3, r2 mv r4, r3 srli r4, #2 ; R4 = BSS size in longwords (rounded down) ldi r1, #0 ; clear R1 for longwords store @@ -66,27 +111,29 @@ addi r4, #-1 ; decrement count bnez r4, .Lloop1 ; go do some more .Lendloop1: - and3 r4, r3, #3 ; get no. of remaining BSS bytes to clear - addi r2, #4 ; account for pre-inc store - beqz r4, .Lendloop2 ; any more to go? -.Lloop2: - stb r1, @r2 ; yep, zero out another byte - addi r2, #1 ; bump address - addi r4, #-1 ; decrement count - bnez r4, .Lloop2 ; go do some more -.Lendloop2: #endif /* not CONFIG_ISA_DUAL_ISSUE */ - seth r0, #shigh(stack_start) - ld sp, @(r0, low(stack_start)) /* set stack point */ + seth r1, #high(end) + or3 r1, r1, #low(end) + add r1, r12 + mv sp, r1 /* * decompress the kernel */ + mv r0, sp + srli r0, 31 /* MMU is ON or OFF */ + seth r1, #high(zimage_data) + or3 r1, r1, #low(zimage_data) + add r1, r12 + seth r2, #high(zimage_len) + or3 r2, r2, #low(zimage_len) + mv r3, sp + bl decompress_kernel -#if defined(CONFIG_CHIP_M32700) +#if defined(CONFIG_CHIP_M32700) || defined(CONFIG_CHIP_OPSP) || defined(CONFIG_CHIP_VDEC2) /* Cache flush */ ldi r0, -1 ldi r1, 0xd0 ; invalidate i-cache, copy back d-cache @@ -94,9 +141,14 @@ #else #error "put your cache flush function, please" #endif - seth r0, #high(CONFIG_MEMORY_START) - or3 r0, r0, #0x2000 - jmp r0 + + mv r0, sp + srli r0, 31 /* MMU is ON or OFF */ + slli r0, 31 + or3 r0, r0, #0x2000 + seth r1, #high(CONFIG_MEMORY_START) + or r0, r1 + jmp r0 .balign 512 fake_headers_as_bzImage: diff -Nru a/arch/m32r/boot/compressed/m32r_sio.c b/arch/m32r/boot/compressed/m32r_sio.c --- a/arch/m32r/boot/compressed/m32r_sio.c 2004-11-29 21:22:07 -08:00 +++ b/arch/m32r/boot/compressed/m32r_sio.c 2004-11-29 21:22:07 -08:00 @@ -6,12 +6,10 @@ */ #include -#include -#include -void putc(char c); +static void putc(char c); -int puts(const char *s) +static int puts(const char *s) { char c; while ((c = *s++)) putc(c); @@ -19,6 +17,9 @@ } #if defined(CONFIG_PLAT_M32700UT_Alpha) || defined(CONFIG_PLAT_M32700UT) +#include +#include + #define USE_FPGA_MAP 0 #if USE_FPGA_MAP @@ -35,7 +36,7 @@ #define BOOT_SIO0TXB PLD_ESIO0TXB #endif -void putc(char c) +static void putc(char c) { while ((*BOOT_SIO0STS & 0x3) != 0x3) ; @@ -46,8 +47,17 @@ *BOOT_SIO0TXB = c; } #else -void putc(char c) +#define SIO0STS (volatile unsigned short *)(0xa0efd000 + 14) +#define SIO0TXB (volatile unsigned short *)(0xa0efd000 + 30) + +static void putc(char c) { - /* do nothing */ + + while ((*SIO0STS & 0x1) == 0) ; + if (c == '\n') { + *SIO0TXB = '\r'; + while ((*SIO0STS & 0x1) == 0) ; + } + *SIO0TXB = c; } #endif diff -Nru a/arch/m32r/boot/compressed/misc.c b/arch/m32r/boot/compressed/misc.c --- a/arch/m32r/boot/compressed/misc.c 2004-11-29 21:22:06 -08:00 +++ b/arch/m32r/boot/compressed/misc.c 2004-11-29 21:22:06 -08:00 @@ -8,8 +8,6 @@ * * Adapted for SH by Stuart Menefy, Aug 1999 * - * Modified to use standard LinuxSH BIOS by Greg Banks 7Jul2000 - * * 2003-02-12: Support M32R by Takeo Takahashi * This is based on arch/sh/boot/compressed/misc.c. */ @@ -38,9 +36,9 @@ static uch *inbuf; /* input buffer */ static uch window[WSIZE]; /* Sliding window buffer */ -static unsigned insize; /* valid bytes in inbuf */ -static unsigned inptr; /* index of next byte to be processed in inbuf */ -static unsigned outcnt; /* bytes in output buffer */ +static unsigned insize = 0; /* valid bytes in inbuf */ +static unsigned inptr = 0; /* index of next byte to be processed in inbuf */ +static unsigned outcnt = 0; /* bytes in output buffer */ /* gzip flag byte */ #define ASCII_FLAG 0x01 /* bit 0 set: file probably ASCII text */ @@ -76,24 +74,18 @@ static void gzip_mark(void **); static void gzip_release(void **); -extern char input_data[]; -extern int input_len; +static unsigned char *input_data; +static int input_len; -static long bytes_out; +static long bytes_out = 0; static uch *output_data; -static unsigned long output_ptr; +static unsigned long output_ptr = 0; +#include "m32r_sio.c" static void *malloc(int size); static void free(void *where); -static void error(char *m); -static void gzip_mark(void **); -static void gzip_release(void **); -extern int puts(const char *); - -extern int _text; /* Defined in vmlinux.lds.S */ -extern int _end; static unsigned long free_mem_ptr; static unsigned long free_mem_end_ptr; @@ -105,8 +97,8 @@ { void *p; - if (size <0) error("Malloc error\n"); - if (free_mem_ptr == 0) error("Memory error\n"); + if (size <0) error("Malloc error"); + if (free_mem_ptr == 0) error("Memory error"); free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */ @@ -114,7 +106,7 @@ free_mem_ptr += size; if (free_mem_ptr >= free_mem_end_ptr) - error("\nOut of memory\n"); + error("Out of memory"); return p; } @@ -159,7 +151,7 @@ static int fill_inbuf(void) { if (insize != 0) { - error("ran out of input data\n"); + error("ran out of input data"); } inbuf = input_data; @@ -199,25 +191,20 @@ while(1); /* Halt */ } -#define STACK_SIZE (4096) -long user_stack [STACK_SIZE]; -long* stack_start = &user_stack[STACK_SIZE]; - /* return decompressed size */ -long decompress_kernel(void) -{ - insize = 0; - inptr = 0; - bytes_out = 0; - outcnt = 0; - output_data = 0; - output_ptr = CONFIG_MEMORY_START + 0x2000; - free_mem_ptr = (unsigned long)&_end; +void +decompress_kernel(int mmu_on, unsigned char *zimage_data, + unsigned int zimage_len, unsigned long heap) +{ + output_data = (unsigned char *)CONFIG_MEMORY_START + 0x2000 + + (mmu_on ? 0x80000000 : 0); + free_mem_ptr = heap; free_mem_end_ptr = free_mem_ptr + HEAP_SIZE; + input_data = zimage_data; + input_len = zimage_len; makecrc(); puts("Uncompressing Linux... "); gunzip(); puts("Ok, booting the kernel.\n"); - return bytes_out; } diff -Nru a/arch/m32r/boot/compressed/vmlinux.lds.S b/arch/m32r/boot/compressed/vmlinux.lds.S --- a/arch/m32r/boot/compressed/vmlinux.lds.S 2004-11-29 21:22:07 -08:00 +++ b/arch/m32r/boot/compressed/vmlinux.lds.S 2004-11-29 21:22:07 -08:00 @@ -8,16 +8,24 @@ _text = .; .text : { *(.text) } = 0 - .rodata : { *(.rodata) } + .rodata : { *(.rodata) *(.rodata.*) } _etext = .; - . = ALIGN(32) + (. & (32 - 1)); + . = ALIGN(32 / 8); .data : { *(.data) } + . = ALIGN(32 / 8); + _got = .; + .got : { *(.got) _egot = .; *(.got.*) } _edata = .; . = ALIGN(32 / 8); __bss_start = .; - .bss : { *(.bss) } + .bss : { *(.bss) *(.sbss) } . = ALIGN(32 / 8); - _end = . ; + _ebss = .; + . = ALIGN(4096); + . += 4096; + end = . ; + + got_len = (_egot - _got); } diff -Nru a/arch/m32r/boot/compressed/vmlinux.scr b/arch/m32r/boot/compressed/vmlinux.scr --- a/arch/m32r/boot/compressed/vmlinux.scr 2004-11-29 21:22:06 -08:00 +++ b/arch/m32r/boot/compressed/vmlinux.scr 2004-11-29 21:22:06 -08:00 @@ -1,9 +1,9 @@ SECTIONS { .data : { - input_len = .; - LONG(input_data_end - input_data) input_data = .; + zimage_data = .; *(.data) - input_data_end = .; + zimage_data_end = .; } + zimage_len = zimage_data_end - zimage_data; } diff -Nru a/arch/m32r/boot/setup.S b/arch/m32r/boot/setup.S --- a/arch/m32r/boot/setup.S 2004-11-29 21:22:07 -08:00 +++ b/arch/m32r/boot/setup.S 2004-11-29 21:22:07 -08:00 @@ -24,7 +24,7 @@ #define CPU_PARAMS boot_cpu_data #define M32R_MCICAR 0xfffffff0 #define M32R_MCDCAR 0xfffffff4 -#define M32R_MCCR 0xfffffffc +#define M32R_MCCR 0xfffffffc #define M32R_BSCR0 0xffffffd2 ;BSEL diff -Nru a/arch/m32r/defconfig b/arch/m32r/defconfig --- a/arch/m32r/defconfig 2004-11-29 21:22:07 -08:00 +++ b/arch/m32r/defconfig 2004-11-29 21:22:07 -08:00 @@ -1,5 +1,7 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.10-rc1-bk21 +# Fri Nov 12 16:08:49 2004 # CONFIG_M32R=y CONFIG_UID16=y @@ -11,10 +13,12 @@ CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y CONFIG_BROKEN_ON_SMP=y +CONFIG_LOCK_KERNEL=y # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set @@ -24,17 +28,20 @@ # CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=14 CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y CONFIG_IKCONFIG=y # CONFIG_IKCONFIG_PROC is not set CONFIG_EMBEDDED=y # CONFIG_KALLSYMS is not set # CONFIG_FUTEX is not set # CONFIG_EPOLL is not set -CONFIG_IOSCHED_NOOP=y -# CONFIG_IOSCHED_AS is not set -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set # # Loadable module support @@ -44,6 +51,7 @@ # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # @@ -78,33 +86,26 @@ # CONFIG_SMP is not set # -# M32R drivers -# -# CONFIG_M32RPCC is not set -CONFIG_M32R_CFC=y -CONFIG_M32700UT_CFC=y -CONFIG_CFC_NUM=1 -# CONFIG_MTD_M32R is not set -CONFIG_M32R_SMC91111=y -CONFIG_M32700UT_DS1302=y - -# -# Power management options (ACPI, APM) -# -# CONFIG_PM is not set - -# # Bus options (PCI, PCMCIA, EISA, MCA, ISA) # # CONFIG_PCI is not set # CONFIG_ISA is not set # -# PCMCIA/CardBus support +# PCCARD (PCMCIA/CardBus) support # -CONFIG_PCMCIA=y +CONFIG_PCCARD=y # CONFIG_PCMCIA_DEBUG is not set +# CONFIG_PCMCIA_OBSOLETE is not set +CONFIG_PCMCIA=y + +# +# PC-card bridges +# # CONFIG_TCIC is not set +# CONFIG_M32R_PCC is not set +CONFIG_M32R_CFC=y +CONFIG_M32R_CFC_NUM=1 # # PCI Hotplug Support @@ -151,6 +152,16 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 # CONFIG_BLK_DEV_INITRD is not set +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_AS is not set +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # # ATA/ATAPI/MFM/RLL support @@ -170,7 +181,6 @@ # CONFIG_BLK_DEV_IDEFLOPPY is not set # 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 @@ -213,9 +223,8 @@ # # SCSI low-level drivers # -# CONFIG_SCSI_AIC7XXX_OLD is not set # CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_EATA_PIO is not set +# CONFIG_SCSI_QLOGIC_1280_1040 is not set # CONFIG_SCSI_DEBUG is not set # @@ -271,6 +280,9 @@ # 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_IP_TCPDIAG=y +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -290,7 +302,6 @@ # 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 @@ -307,7 +318,50 @@ # CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set # CONFIG_BT is not set -# CONFIG_NETDEVICES is not set +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +CONFIG_SMC91X=y +# CONFIG_NE2000 is not set + +# +# Ethernet (1000 Mbit) +# + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# PCMCIA network device support +# +# CONFIG_NET_PCMCIA is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # # ISDN subsystem @@ -342,6 +396,7 @@ # CONFIG_SERIO_I8042 is not set CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_RAW is not set # # Input Device Drivers @@ -355,7 +410,9 @@ # # Character devices # -# CONFIG_VT is not set +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y # CONFIG_SERIAL_NONSTANDARD is not set # @@ -368,13 +425,12 @@ # CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_M32R_SIO is not set +CONFIG_SERIAL_M32R_SIO=y +CONFIG_SERIAL_M32R_SIO_CONSOLE=y CONFIG_SERIAL_M32R_PLDSIO=y -CONFIG_SERIAL_M32R_PLDSIO_CONSOLE=y CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -387,6 +443,7 @@ # CONFIG_WATCHDOG is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set +CONFIG_DS1302=y # CONFIG_DTLK is not set # CONFIG_R3964 is not set @@ -429,8 +486,8 @@ # Video Adapters # # CONFIG_VIDEO_CPIA is not set -CONFIG_M32R_AR=y -CONFIG_M32R_AR_VGA=y +CONFIG_VIDEO_M32R_AR=y +CONFIG_VIDEO_M32R_AR_M64278=y # # Radio Adapters @@ -445,7 +502,28 @@ # # Graphics support # -# CONFIG_FB is not set +CONFIG_FB=y +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y + +# +# Logo configuration +# +CONFIG_LOGO=y +CONFIG_LOGO_LINUX_MONO=y +CONFIG_LOGO_LINUX_VGA16=y +CONFIG_LOGO_LINUX_CLUT224=y # # Sound @@ -455,6 +533,8 @@ # # USB support # +# CONFIG_USB_ARCH_HAS_HCD is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set # # USB Gadget Support @@ -482,6 +562,7 @@ # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -515,6 +596,7 @@ # CONFIG_DEVFS_DEBUG is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -549,6 +631,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 @@ -620,6 +703,7 @@ # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # diff -Nru a/arch/m32r/kernel/io_m32700ut.c b/arch/m32r/kernel/io_m32700ut.c --- a/arch/m32r/kernel/io_m32700ut.c 2004-11-29 21:22:07 -08:00 +++ b/arch/m32r/kernel/io_m32700ut.c 2004-11-29 21:22:07 -08:00 @@ -1,5 +1,5 @@ /* - * linux/arch/m32r/kernel/io_mappi.c + * linux/arch/m32r/kernel/io_m32700ut.c * * Typical I/O routines for M32700UT board. * @@ -9,7 +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. - * */ #include @@ -32,16 +31,16 @@ extern void pcc_iowrite_word(int, unsigned long, void *, size_t, size_t, int); #endif /* CONFIG_PCMCIA && CONFIG_M32R_CFC */ -#define PORT2ADDR(port) _port2addr(port) -#define PORT2ADDR_USB(port) _port2addr_usb(port) +#define PORT2ADDR(port) _port2addr(port) +#define PORT2ADDR_USB(port) _port2addr_usb(port) -static __inline__ void *_port2addr(unsigned long port) +static inline void *_port2addr(unsigned long port) { return (void *)(port + NONCACHE_OFFSET); } #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) -static __inline__ void *__port2addr_ata(unsigned long port) +static inline void *__port2addr_ata(unsigned long port) { static int dummy_reg; @@ -67,16 +66,16 @@ */ #define LAN_IOSTART 0x300 #define LAN_IOEND 0x320 -static __inline__ void *_port2addr_ne(unsigned long port) +static inline void *_port2addr_ne(unsigned long port) { return (void *)(port + NONCACHE_OFFSET + 0x10000000); } -static __inline__ void *_port2addr_usb(unsigned long port) +static inline void *_port2addr_usb(unsigned long port) { - return (void *)((port & 0x0f) + NONCACHE_OFFSET + 0x10303000); + return (void *)((port & 0x0f) + NONCACHE_OFFSET + 0x10303000); } -static __inline__ void delay(void) +static inline void delay(void) { __asm__ __volatile__ ("push r0; \n\t pop r0;" : : :"memory"); } @@ -87,29 +86,30 @@ #define PORT2ADDR_NE(port) _port2addr_ne(port) -static __inline__ unsigned char _ne_inb(void *portp) +static inline unsigned char _ne_inb(void *portp) { return *(volatile unsigned char *)portp; } -static __inline__ unsigned short _ne_inw(void *portp) +static inline unsigned short _ne_inw(void *portp) { return (unsigned short)le16_to_cpu(*(volatile unsigned short *)portp); } -static __inline__ void _ne_insb(void *portp, void * addr, unsigned long count) +static inline void _ne_insb(void *portp, void *addr, unsigned long count) { unsigned char *buf = (unsigned char *)addr; - while (count--) *buf++ = _ne_inb(portp); + while (count--) + *buf++ = _ne_inb(portp); } -static __inline__ void _ne_outb(unsigned char b, void *portp) +static inline void _ne_outb(unsigned char b, void *portp) { *(volatile unsigned char *)portp = b; } -static __inline__ void _ne_outw(unsigned short w, void *portp) +static inline void _ne_outw(unsigned short w, void *portp) { *(volatile unsigned short *)portp = cpu_to_le16(w); } @@ -126,9 +126,9 @@ #endif #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - unsigned char b; - pcc_ioread_byte(0, port, &b, sizeof(b), 1, 0); - return b; + unsigned char b; + pcc_ioread_byte(0, port, &b, sizeof(b), 1, 0); + return b; } else #endif @@ -146,13 +146,13 @@ #endif #if defined(CONFIG_USB) else if(port >= 0x340 && port < 0x3a0) - return *(volatile unsigned short *)PORT2ADDR_USB(port); + return *(volatile unsigned short *)PORT2ADDR_USB(port); #endif #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - unsigned short w; - pcc_ioread_word(0, port, &w, sizeof(w), 1, 0); - return w; + unsigned short w; + pcc_ioread_word(0, port, &w, sizeof(w), 1, 0); + return w; } else #endif return *(volatile unsigned short *)PORT2ADDR(port); @@ -162,9 +162,9 @@ { #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - unsigned long l; - pcc_ioread_word(0, port, &l, sizeof(l), 1, 0); - return l; + unsigned long l; + pcc_ioread_word(0, port, &l, sizeof(l), 1, 0); + return l; } else #endif return *(volatile unsigned long *)PORT2ADDR(port); @@ -184,9 +184,9 @@ #endif #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - unsigned char b; - pcc_ioread_byte(0, port, &b, sizeof(b), 1, 0); - return b; + unsigned char b; + pcc_ioread_byte(0, port, &b, sizeof(b), 1, 0); + return b; } else #endif v = *(volatile unsigned char *)PORT2ADDR(port); @@ -208,15 +208,15 @@ } else #endif #if defined(CONFIG_USB) - if(port >= 0x340 && port < 0x3a0) - return *(volatile unsigned short *)PORT2ADDR_USB(port); + if(port >= 0x340 && port < 0x3a0) + return *(volatile unsigned short *)PORT2ADDR_USB(port); else #endif #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - unsigned short w; - pcc_ioread_word(0, port, &w, sizeof(w), 1, 0); - return w; + unsigned short w; + pcc_ioread_word(0, port, &w, sizeof(w), 1, 0); + return w; } else #endif v = *(volatile unsigned short *)PORT2ADDR(port); @@ -246,7 +246,7 @@ #endif #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_iowrite_byte(0, port, &b, sizeof(b), 1, 0); + pcc_iowrite_byte(0, port, &b, sizeof(b), 1, 0); } else #endif *(volatile unsigned char *)PORT2ADDR(port) = b; @@ -264,12 +264,12 @@ #endif #if defined(CONFIG_USB) if(port >= 0x340 && port < 0x3a0) - *(volatile unsigned short *)PORT2ADDR_USB(port) = w; + *(volatile unsigned short *)PORT2ADDR_USB(port) = w; else #endif #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_iowrite_word(0, port, &w, sizeof(w), 1, 0); + pcc_iowrite_word(0, port, &w, sizeof(w), 1, 0); } else #endif *(volatile unsigned short *)PORT2ADDR(port) = w; @@ -279,7 +279,7 @@ { #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_iowrite_word(0, port, &l, sizeof(l), 1, 0); + pcc_iowrite_word(0, port, &l, sizeof(l), 1, 0); } else #endif *(volatile unsigned long *)PORT2ADDR(port) = l; @@ -297,7 +297,7 @@ #endif #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_iowrite_byte(0, port, &b, sizeof(b), 1, 0); + pcc_iowrite_byte(0, port, &b, sizeof(b), 1, 0); } else #endif *(volatile unsigned char *)PORT2ADDR(port) = b; @@ -316,13 +316,13 @@ } else #endif #if defined(CONFIG_USB) - if(port >= 0x340 && port < 0x3a0) - *(volatile unsigned short *)PORT2ADDR_USB(port) = w; + if(port >= 0x340 && port < 0x3a0) + *(volatile unsigned short *)PORT2ADDR_USB(port) = w; else #endif #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_iowrite_word(0, port, &w, sizeof(w), 1, 0); + pcc_iowrite_word(0, port, &w, sizeof(w), 1, 0); } else #endif *(volatile unsigned short *)PORT2ADDR(port) = w; @@ -336,7 +336,7 @@ delay(); } -void _insb(unsigned int port, void * addr, unsigned long count) +void _insb(unsigned int port, void *addr, unsigned long count) { if (port >= LAN_IOSTART && port < LAN_IOEND) _ne_insb(PORT2ADDR_NE(port), addr, count); @@ -344,22 +344,25 @@ else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { unsigned char *buf = addr; unsigned char *portp = __port2addr_ata(port); - while(count--) *buf++ = *(volatile unsigned char *)portp; + while (count--) + *buf++ = *(volatile unsigned char *)portp; } #endif #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) - else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_ioread_byte(0, port, (void *)addr, sizeof(unsigned char), count, 1); + else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { + pcc_ioread_byte(0, port, (void *)addr, sizeof(unsigned char), + count, 1); } #endif else { unsigned char *buf = addr; unsigned char *portp = PORT2ADDR(port); - while(count--) *buf++ = *(volatile unsigned char *)portp; + while (count--) + *buf++ = *(volatile unsigned char *)portp; } } -void _insw(unsigned int port, void * addr, unsigned long count) +void _insw(unsigned int port, void *addr, unsigned long count) { unsigned short *buf = addr; unsigned short *portp; @@ -370,55 +373,64 @@ * from the DATA_REG. Do not swap the data. */ portp = PORT2ADDR_NE(port); - while (count--) *buf++ = *(volatile unsigned short *)portp; + while (count--) + *buf++ = *(volatile unsigned short *)portp; #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_ioread_word(9, port, (void *)addr, sizeof(unsigned short), count, 1); + pcc_ioread_word(9, port, (void *)addr, sizeof(unsigned short), + count, 1); #endif #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { portp = __port2addr_ata(port); - while (count--) *buf++ = *(volatile unsigned short *)portp; + while (count--) + *buf++ = *(volatile unsigned short *)portp; #endif } else { portp = PORT2ADDR(port); - while (count--) *buf++ = *(volatile unsigned short *)portp; + while (count--) + *buf++ = *(volatile unsigned short *)portp; } } -void _insl(unsigned int port, void * addr, unsigned long count) +void _insl(unsigned int port, void *addr, unsigned long count) { unsigned long *buf = addr; unsigned long *portp; portp = PORT2ADDR(port); - while (count--) *buf++ = *(volatile unsigned long *)portp; + while (count--) + *buf++ = *(volatile unsigned long *)portp; } -void _outsb(unsigned int port, const void * addr, unsigned long count) +void _outsb(unsigned int port, const void *addr, unsigned long count) { const unsigned char *buf = addr; unsigned char *portp; if (port >= LAN_IOSTART && port < LAN_IOEND) { portp = PORT2ADDR_NE(port); - while (count--) _ne_outb(*buf++, portp); + while (count--) + _ne_outb(*buf++, portp); #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { portp = __port2addr_ata(port); - while(count--) *(volatile unsigned char *)portp = *buf++; + while (count--) + *(volatile unsigned char *)portp = *buf++; #endif #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_iowrite_byte(0, port, (void *)addr, sizeof(unsigned char), count, 1); + pcc_iowrite_byte(0, port, (void *)addr, sizeof(unsigned char), + count, 1); #endif } else { portp = PORT2ADDR(port); - while(count--) *(volatile unsigned char *)portp = *buf++; + while (count--) + *(volatile unsigned char *)portp = *buf++; } } -void _outsw(unsigned int port, const void * addr, unsigned long count) +void _outsw(unsigned int port, const void *addr, unsigned long count) { const unsigned short *buf = addr; unsigned short *portp; @@ -429,27 +441,32 @@ * into the DATA_REG. Do not swap the data. */ portp = PORT2ADDR_NE(port); - while(count--) *(volatile unsigned short *)portp = *buf++; + while (count--) + *(volatile unsigned short *)portp = *buf++; #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { portp = __port2addr_ata(port); - while(count--) *(volatile unsigned short *)portp = *buf++; + while (count--) + *(volatile unsigned short *)portp = *buf++; #endif #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_iowrite_word(9, port, (void *)addr, sizeof(unsigned short), count, 1); + pcc_iowrite_word(9, port, (void *)addr, sizeof(unsigned short), + count, 1); #endif } else { portp = PORT2ADDR(port); - while(count--) *(volatile unsigned short *)portp = *buf++; + while (count--) + *(volatile unsigned short *)portp = *buf++; } } -void _outsl(unsigned int port, const void * addr, unsigned long count) +void _outsl(unsigned int port, const void *addr, unsigned long count) { const unsigned long *buf = addr; unsigned char *portp; portp = PORT2ADDR(port); - while(count--) *(volatile unsigned long *)portp = *buf++; + while (count--) + *(volatile unsigned long *)portp = *buf++; } diff -Nru a/arch/m32r/kernel/io_mappi.c b/arch/m32r/kernel/io_mappi.c --- a/arch/m32r/kernel/io_mappi.c 2004-11-29 21:22:07 -08:00 +++ b/arch/m32r/kernel/io_mappi.c 2004-11-29 21:22:07 -08:00 @@ -7,8 +7,6 @@ * Hitoshi Yamamoto */ -/* $Id: io_mappi.c,v 1.9 2003/12/02 07:18:08 fujiwara Exp $ */ - #include #include #include @@ -31,17 +29,17 @@ #define PORT2ADDR(port) _port2addr(port) -static __inline__ void *_port2addr(unsigned long port) +static inline void *_port2addr(unsigned long port) { return (void *)(port + NONCACHE_OFFSET); } -static __inline__ void *_port2addr_ne(unsigned long port) +static inline void *_port2addr_ne(unsigned long port) { return (void *)((port<<1) + NONCACHE_OFFSET + 0x0C000000); } -static __inline__ void delay(void) +static inline void delay(void) { __asm__ __volatile__ ("push r0; \n\t pop r0;" : : :"memory"); } @@ -52,12 +50,12 @@ #define PORT2ADDR_NE(port) _port2addr_ne(port) -static __inline__ unsigned char _ne_inb(void *portp) +static inline unsigned char _ne_inb(void *portp) { return (unsigned char) *(volatile unsigned short *)portp; } -static __inline__ unsigned short _ne_inw(void *portp) +static inline unsigned short _ne_inw(void *portp) { unsigned short tmp; @@ -65,12 +63,12 @@ return le16_to_cpu(tmp); } -static __inline__ void _ne_outb(unsigned char b, void *portp) +static inline void _ne_outb(unsigned char b, void *portp) { *(volatile unsigned short *)portp = (unsigned short)b; } -static __inline__ void _ne_outw(unsigned short w, void *portp) +static inline void _ne_outw(unsigned short w, void *portp) { *(volatile unsigned short *)portp = cpu_to_le16(w); } @@ -82,13 +80,13 @@ else #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - unsigned char b; - pcc_ioread(0, port, &b, sizeof(b), 1, 0); - return b; - } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { - unsigned char b; - pcc_ioread(1, port, &b, sizeof(b), 1, 0); - return b; + unsigned char b; + pcc_ioread(0, port, &b, sizeof(b), 1, 0); + return b; + } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { + unsigned char b; + pcc_ioread(1, port, &b, sizeof(b), 1, 0); + return b; } else #endif @@ -102,13 +100,13 @@ else #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - unsigned short w; - pcc_ioread(0, port, &w, sizeof(w), 1, 0); - return w; - } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { - unsigned short w; - pcc_ioread(1, port, &w, sizeof(w), 1, 0); - return w; + unsigned short w; + pcc_ioread(0, port, &w, sizeof(w), 1, 0); + return w; + } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { + unsigned short w; + pcc_ioread(1, port, &w, sizeof(w), 1, 0); + return w; } else #endif return *(volatile unsigned short *)PORT2ADDR(port); @@ -118,13 +116,13 @@ { #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - unsigned long l; - pcc_ioread(0, port, &l, sizeof(l), 1, 0); - return l; - } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { - unsigned short l; - pcc_ioread(1, port, &l, sizeof(l), 1, 0); - return l; + unsigned long l; + pcc_ioread(0, port, &l, sizeof(l), 1, 0); + return l; + } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { + unsigned short l; + pcc_ioread(1, port, &l, sizeof(l), 1, 0); + return l; } else #endif return *(volatile unsigned long *)PORT2ADDR(port); @@ -139,13 +137,13 @@ else #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - unsigned char b; - pcc_ioread(0, port, &b, sizeof(b), 1, 0); - return b; - } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { - unsigned char b; - pcc_ioread(1, port, &b, sizeof(b), 1, 0); - return b; + unsigned char b; + pcc_ioread(0, port, &b, sizeof(b), 1, 0); + return b; + } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { + unsigned char b; + pcc_ioread(1, port, &b, sizeof(b), 1, 0); + return b; } else #endif v = *(volatile unsigned char *)PORT2ADDR(port); @@ -163,13 +161,13 @@ else #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - unsigned short w; - pcc_ioread(0, port, &w, sizeof(w), 1, 0); - return w; - } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { - unsigned short w; - pcc_ioread(1, port, &w, sizeof(w), 1, 0); - return w; + unsigned short w; + pcc_ioread(0, port, &w, sizeof(w), 1, 0); + return w; + } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { + unsigned short w; + pcc_ioread(1, port, &w, sizeof(w), 1, 0); + return w; } else #endif v = *(volatile unsigned short *)PORT2ADDR(port); @@ -194,9 +192,9 @@ else #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_iowrite(0, port, &b, sizeof(b), 1, 0); + pcc_iowrite(0, port, &b, sizeof(b), 1, 0); } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { - pcc_iowrite(1, port, &b, sizeof(b), 1, 0); + pcc_iowrite(1, port, &b, sizeof(b), 1, 0); } else #endif *(volatile unsigned char *)PORT2ADDR(port) = b; @@ -209,9 +207,9 @@ else #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_iowrite(0, port, &w, sizeof(w), 1, 0); + pcc_iowrite(0, port, &w, sizeof(w), 1, 0); } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { - pcc_iowrite(1, port, &w, sizeof(w), 1, 0); + pcc_iowrite(1, port, &w, sizeof(w), 1, 0); } else #endif *(volatile unsigned short *)PORT2ADDR(port) = w; @@ -221,9 +219,9 @@ { #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_iowrite(0, port, &l, sizeof(l), 1, 0); + pcc_iowrite(0, port, &l, sizeof(l), 1, 0); } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { - pcc_iowrite(1, port, &l, sizeof(l), 1, 0); + pcc_iowrite(1, port, &l, sizeof(l), 1, 0); } else #endif *(volatile unsigned long *)PORT2ADDR(port) = l; @@ -236,9 +234,9 @@ else #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_iowrite(0, port, &b, sizeof(b), 1, 0); + pcc_iowrite(0, port, &b, sizeof(b), 1, 0); } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { - pcc_iowrite(1, port, &b, sizeof(b), 1, 0); + pcc_iowrite(1, port, &b, sizeof(b), 1, 0); } else #endif *(volatile unsigned char *)PORT2ADDR(port) = b; @@ -253,9 +251,9 @@ else #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_iowrite(0, port, &w, sizeof(w), 1, 0); + pcc_iowrite(0, port, &w, sizeof(w), 1, 0); } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { - pcc_iowrite(1, port, &w, sizeof(w), 1, 0); + pcc_iowrite(1, port, &w, sizeof(w), 1, 0); } else #endif *(volatile unsigned short *)PORT2ADDR(port) = w; @@ -269,100 +267,118 @@ delay(); } -void _insb(unsigned int port, void * addr, unsigned long count) +void _insb(unsigned int port, void *addr, unsigned long count) { unsigned short *buf = addr; unsigned short *portp; if (port >= 0x300 && port < 0x320){ portp = PORT2ADDR_NE(port); - while(count--) *buf++ = *(volatile unsigned char *)portp; + while (count--) + *buf++ = *(volatile unsigned char *)portp; #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_ioread(0, port, (void *)addr, sizeof(unsigned char), count, 1); + pcc_ioread(0, port, (void *)addr, sizeof(unsigned char), + count, 1); } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { - pcc_ioread(1, port, (void *)addr, sizeof(unsigned char), count, 1); + pcc_ioread(1, port, (void *)addr, sizeof(unsigned char), + count, 1); #endif } else { portp = PORT2ADDR(port); - while(count--) *buf++ = *(volatile unsigned char *)portp; + while (count--) + *buf++ = *(volatile unsigned char *)portp; } } -void _insw(unsigned int port, void * addr, unsigned long count) +void _insw(unsigned int port, void *addr, unsigned long count) { unsigned short *buf = addr; unsigned short *portp; if (port >= 0x300 && port < 0x320) { portp = PORT2ADDR_NE(port); - while (count--) *buf++ = _ne_inw(portp); + while (count--) + *buf++ = _ne_inw(portp); #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_ioread(0, port, (void *)addr, sizeof(unsigned short), count, 1); + pcc_ioread(0, port, (void *)addr, sizeof(unsigned short), + count, 1); } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { - pcc_ioread(1, port, (void *)addr, sizeof(unsigned short), count, 1); + pcc_ioread(1, port, (void *)addr, sizeof(unsigned short), + count, 1); #endif } else { portp = PORT2ADDR(port); - while (count--) *buf++ = *(volatile unsigned short *)portp; + while (count--) + *buf++ = *(volatile unsigned short *)portp; } } -void _insl(unsigned int port, void * addr, unsigned long count) +void _insl(unsigned int port, void *addr, unsigned long count) { unsigned long *buf = addr; unsigned long *portp; portp = PORT2ADDR(port); - while (count--) *buf++ = *(volatile unsigned long *)portp; + while (count--) + *buf++ = *(volatile unsigned long *)portp; } -void _outsb(unsigned int port, const void * addr, unsigned long count) +void _outsb(unsigned int port, const void *addr, unsigned long count) { const unsigned char *buf = addr; unsigned char *portp; if (port >= 0x300 && port < 0x320) { portp = PORT2ADDR_NE(port); - while (count--) _ne_outb(*buf++, portp); + while (count--) + _ne_outb(*buf++, portp); #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_iowrite(0, port, (void *)addr, sizeof(unsigned char), count, 1); + pcc_iowrite(0, port, (void *)addr, sizeof(unsigned char), + count, 1); } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { - pcc_iowrite(1, port, (void *)addr, sizeof(unsigned char), count, 1); + pcc_iowrite(1, port, (void *)addr, sizeof(unsigned char), + count, 1); #endif } else { portp = PORT2ADDR(port); - while(count--) *(volatile unsigned char *)portp = *buf++; + while (count--) + *(volatile unsigned char *)portp = *buf++; } } -void _outsw(unsigned int port, const void * addr, unsigned long count) +void _outsw(unsigned int port, const void *addr, unsigned long count) { const unsigned short *buf = addr; unsigned short *portp; if (port >= 0x300 && port < 0x320) { portp = PORT2ADDR_NE(port); - while (count--) _ne_outw(*buf++, portp); + while (count--) + _ne_outw(*buf++, portp); #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_iowrite(0, port, (void *)addr, sizeof(unsigned short), count, 1); + pcc_iowrite(0, port, (void *)addr, sizeof(unsigned short), + count, 1); } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { - pcc_iowrite(1, port, (void *)addr, sizeof(unsigned short), count, 1); + pcc_iowrite(1, port, (void *)addr, sizeof(unsigned short), + count, 1); #endif } else { portp = PORT2ADDR(port); - while(count--) *(volatile unsigned short *)portp = *buf++; + while (count--) + *(volatile unsigned short *)portp = *buf++; } } -void _outsl(unsigned int port, const void * addr, unsigned long count) +void _outsl(unsigned int port, const void *addr, unsigned long count) { const unsigned long *buf = addr; unsigned char *portp; portp = PORT2ADDR(port); - while(count--) *(volatile unsigned long *)portp = *buf++; + while (count--) + *(volatile unsigned long *)portp = *buf++; } diff -Nru a/arch/m32r/kernel/io_mappi2.c b/arch/m32r/kernel/io_mappi2.c --- a/arch/m32r/kernel/io_mappi2.c 2004-11-29 21:22:08 -08:00 +++ b/arch/m32r/kernel/io_mappi2.c 2004-11-29 21:22:08 -08:00 @@ -4,15 +4,14 @@ * Typical I/O routines for Mappi2 board. * * Copyright (c) 2001-2003 Hiroyuki Kondo, Hirokazu Takata, - * Hitoshi Yamamoto, Mamoru Sakugawa + * Hitoshi Yamamoto, Mamoru Sakugawa */ -/* $Id:$ */ - #include #include #include #include +#include #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) #include @@ -32,29 +31,50 @@ #define PORT2ADDR_NE(port) _port2addr_ne(port) #define PORT2ADDR_USB(port) _port2addr_usb(port) -static __inline__ void *_port2addr(unsigned long port) +static inline void *_port2addr(unsigned long port) { return (void *)(port + NONCACHE_OFFSET); } #define LAN_IOSTART 0x300 #define LAN_IOEND 0x320 + +#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) +static inline void *__port2addr_ata(unsigned long port) +{ + static int dummy_reg; + + switch (port) { + case 0x1f0: return (void *)0xac002000; + case 0x1f1: return (void *)0xac012800; + case 0x1f2: return (void *)0xac012002; + case 0x1f3: return (void *)0xac012802; + case 0x1f4: return (void *)0xac012004; + case 0x1f5: return (void *)0xac012804; + case 0x1f6: return (void *)0xac012006; + case 0x1f7: return (void *)0xac012806; + case 0x3f6: return (void *)0xac01200e; + default: return (void *)&dummy_reg; + } +} +#endif + #ifdef CONFIG_CHIP_OPSP -static __inline__ void *_port2addr_ne(unsigned long port) +static inline void *_port2addr_ne(unsigned long port) { return (void *)(port + NONCACHE_OFFSET + 0x10000000); } #else -static __inline__ void *_port2addr_ne(unsigned long port) +static inline void *_port2addr_ne(unsigned long port) { return (void *)(port + NONCACHE_OFFSET + 0x04000000); } #endif -static __inline__ void *_port2addr_usb(unsigned long port) +static inline void *_port2addr_usb(unsigned long port) { return (void *)(port + NONCACHE_OFFSET + 0x14000000); } -static __inline__ void delay(void) +static inline void delay(void) { __asm__ __volatile__ ("push r0; \n\t pop r0;" : : :"memory"); } @@ -63,51 +83,48 @@ * NIC I/O function */ -static __inline__ unsigned char _ne_inb(void *portp) +static inline unsigned char _ne_inb(void *portp) { return (unsigned char) *(volatile unsigned char *)portp; } -static __inline__ unsigned short _ne_inw(void *portp) +static inline unsigned short _ne_inw(void *portp) { -#if 1 /* byte swap */ - unsigned short tmp,tmp2; - tmp = *(volatile unsigned short *)portp; - tmp2 = (tmp>>8|tmp<<8); - return tmp2; -#else - return *(volatile unsigned short *)portp; -#endif + return (unsigned short)le16_to_cpu(*(volatile unsigned short *)portp); } -static __inline__ void _ne_insb(void *portp, void * addr, unsigned long count) +static inline void _ne_insb(void *portp, void * addr, unsigned long count) { - unsigned short tmp; unsigned char *buf = addr; - tmp = *(volatile unsigned char *)portp; - while (count--) *buf++ = *(volatile unsigned char *)portp; + while (count--) + *buf++ = *(volatile unsigned char *)portp; } -static __inline__ void _ne_outb(unsigned char b, void *portp) +static inline void _ne_outb(unsigned char b, void *portp) { *(volatile unsigned char *)portp = (unsigned char)b; } -static __inline__ void _ne_outw(unsigned short w, void *portp) +static inline void _ne_outw(unsigned short w, void *portp) { - *(volatile unsigned short *)portp = (w>>8|w<<8); + *(volatile unsigned short *)portp = cpu_to_le16(w); } unsigned char _inb(unsigned long port) { if (port >= LAN_IOSTART && port < LAN_IOEND) return _ne_inb(PORT2ADDR_NE(port)); +#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) + else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { + return *(volatile unsigned char *)__port2addr_ata(port); + } +#endif #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - unsigned char b; - pcc_ioread_byte(0, port, &b, sizeof(b), 1, 0); - return b; + unsigned char b; + pcc_ioread_byte(0, port, &b, sizeof(b), 1, 0); + return b; } else #endif @@ -118,16 +135,21 @@ { if (port >= LAN_IOSTART && port < LAN_IOEND) return _ne_inw(PORT2ADDR_NE(port)); +#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) + else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { + return *(volatile unsigned short *)__port2addr_ata(port); + } +#endif #if defined(CONFIG_USB) - else if (port >= 0x340 && port < 0x3a0) - return *(volatile unsigned short *)PORT2ADDR_USB(port); + else if (port >= 0x340 && port < 0x3a0) + return *(volatile unsigned short *)PORT2ADDR_USB(port); #endif #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) - else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - unsigned short w; - pcc_ioread_word(0, port, &w, sizeof(w), 1, 0); - return w; + else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { + unsigned short w; + pcc_ioread_word(0, port, &w, sizeof(w), 1, 0); + return w; } else #endif return *(volatile unsigned short *)PORT2ADDR(port); @@ -137,9 +159,9 @@ { #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - unsigned long l; - pcc_ioread_word(0, port, &l, sizeof(l), 1, 0); - return l; + unsigned long l; + pcc_ioread_word(0, port, &l, sizeof(l), 1, 0); + return l; } else #endif return *(volatile unsigned long *)PORT2ADDR(port); @@ -149,14 +171,19 @@ { unsigned char v; - if (port >= 0x300 && port < 0x320) + if (port >= LAN_IOSTART && port < LAN_IOEND) v = _ne_inb(PORT2ADDR_NE(port)); else +#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) + if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { + return *(volatile unsigned char *)__port2addr_ata(port); + } else +#endif #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - unsigned char b; - pcc_ioread_byte(0, port, &b, sizeof(b), 1, 0); - return b; + unsigned char b; + pcc_ioread_byte(0, port, &b, sizeof(b), 1, 0); + return b; } else #endif v = *(volatile unsigned char *)PORT2ADDR(port); @@ -169,19 +196,24 @@ { unsigned short v; - if (port >= 0x300 && port < 0x320) + if (port >= LAN_IOSTART && port < LAN_IOEND) v = _ne_inw(PORT2ADDR_NE(port)); else +#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) + if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { + return *(volatile unsigned short *)__port2addr_ata(port); + } else +#endif #if defined(CONFIG_USB) - if (port >= 0x340 && port < 0x3a0) + if (port >= 0x340 && port < 0x3a0) v = *(volatile unsigned short *)PORT2ADDR_USB(port); - else + else #endif #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - unsigned short w; - pcc_ioread_word(0, port, &w, sizeof(w), 1, 0); - return w; + unsigned short w; + pcc_ioread_word(0, port, &w, sizeof(w), 1, 0); + return w; } else #endif v = *(volatile unsigned short *)PORT2ADDR(port); @@ -204,9 +236,14 @@ if (port >= LAN_IOSTART && port < LAN_IOEND) _ne_outb(b, PORT2ADDR_NE(port)); else +#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) + if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { + *(volatile unsigned char *)__port2addr_ata(port) = b; + } else +#endif #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_iowrite_byte(0, port, &b, sizeof(b), 1, 0); + pcc_iowrite_byte(0, port, &b, sizeof(b), 1, 0); } else #endif *(volatile unsigned char *)PORT2ADDR(port) = b; @@ -217,14 +254,19 @@ if (port >= LAN_IOSTART && port < LAN_IOEND) _ne_outw(w, PORT2ADDR_NE(port)); else +#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) + if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { + *(volatile unsigned short *)__port2addr_ata(port) = w; + } else +#endif #if defined(CONFIG_USB) - if (port >= 0x340 && port < 0x3a0) - *(volatile unsigned short *)PORT2ADDR_USB(port) = w; + if (port >= 0x340 && port < 0x3a0) + *(volatile unsigned short *)PORT2ADDR_USB(port) = w; else #endif #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_iowrite_word(0, port, &w, sizeof(w), 1, 0); + pcc_iowrite_word(0, port, &w, sizeof(w), 1, 0); } else #endif *(volatile unsigned short *)PORT2ADDR(port) = w; @@ -234,7 +276,7 @@ { #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_iowrite_word(0, port, &l, sizeof(l), 1, 0); + pcc_iowrite_word(0, port, &l, sizeof(l), 1, 0); } else #endif *(volatile unsigned long *)PORT2ADDR(port) = l; @@ -245,9 +287,14 @@ if (port >= LAN_IOSTART && port < LAN_IOEND) _ne_outb(b, PORT2ADDR_NE(port)); else +#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) + if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { + *(volatile unsigned char *)__port2addr_ata(port) = b; + } else +#endif #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_iowrite_byte(0, port, &b, sizeof(b), 1, 0); + pcc_iowrite_byte(0, port, &b, sizeof(b), 1, 0); } else #endif *(volatile unsigned char *)PORT2ADDR(port) = b; @@ -260,6 +307,11 @@ if (port >= LAN_IOSTART && port < LAN_IOEND) _ne_outw(w, PORT2ADDR_NE(port)); else +#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) + if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { + *(volatile unsigned short *)__port2addr_ata(port) = w; + } else +#endif #if defined(CONFIG_USB) if (port >= 0x340 && port < 0x3a0) *(volatile unsigned short *)PORT2ADDR_USB(port) = w; @@ -267,7 +319,7 @@ #endif #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_iowrite_word(0, port, &w, sizeof(w), 1, 0); + pcc_iowrite_word(0, port, &w, sizeof(w), 1, 0); } else #endif *(volatile unsigned short *)PORT2ADDR(port) = w; @@ -285,15 +337,25 @@ { if (port >= LAN_IOSTART && port < LAN_IOEND) _ne_insb(PORT2ADDR_NE(port), addr, count); +#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) + else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { + unsigned char *buf = addr; + unsigned char *portp = __port2addr_ata(port); + while (count--) + *buf++ = *(volatile unsigned char *)portp; + } +#endif #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) - else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_ioread_byte(0, port, (void *)addr, sizeof(unsigned char), count, 1); + else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { + pcc_ioread_byte(0, port, (void *)addr, sizeof(unsigned char), + count, 1); } #endif else { unsigned char *buf = addr; unsigned char *portp = PORT2ADDR(port); - while(count--) *buf++ = *(volatile unsigned char *)portp; + while (count--) + *buf++ = *(volatile unsigned char *)portp; } } @@ -302,16 +364,25 @@ unsigned short *buf = addr; unsigned short *portp; - if (port >= LAN_IOSTART && port < LAN_IOEND) + if (port >= LAN_IOSTART && port < LAN_IOEND) { portp = PORT2ADDR_NE(port); - while (count--) *buf++ = *(volatile unsigned short *)portp; + while (count--) + *buf++ = *(volatile unsigned short *)portp; #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_ioread_word(9, port, (void *)addr, sizeof(unsigned short), count, 1); + pcc_ioread_word(9, port, (void *)addr, sizeof(unsigned short), + count, 1); +#endif +#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) + } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { + portp = __port2addr_ata(port); + while (count--) + *buf++ = *(volatile unsigned short *)portp; #endif } else { portp = PORT2ADDR(port); - while (count--) *buf++ = *(volatile unsigned short *)portp; + while (count--) + *buf++ = *(volatile unsigned short *)portp; } } @@ -321,7 +392,8 @@ unsigned long *portp; portp = PORT2ADDR(port); - while (count--) *buf++ = *(volatile unsigned long *)portp; + while (count--) + *buf++ = *(volatile unsigned long *)portp; } void _outsb(unsigned int port, const void * addr, unsigned long count) @@ -329,16 +401,25 @@ const unsigned char *buf = addr; unsigned char *portp; - if (port >= LAN_IOSTART && port < LAN_IOEND) + if (port >= LAN_IOSTART && port < LAN_IOEND) { portp = PORT2ADDR_NE(port); - while (count--) _ne_outb(*buf++, portp); + while (count--) + _ne_outb(*buf++, portp); +#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) + } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { + portp = __port2addr_ata(port); + while (count--) + *(volatile unsigned char *)portp = *buf++; +#endif #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_iowrite_byte(0, port, (void *)addr, sizeof(unsigned char), count, 1); + pcc_iowrite_byte(0, port, (void *)addr, sizeof(unsigned char), + count, 1); #endif } else { portp = PORT2ADDR(port); - while(count--) *(volatile unsigned char *)portp = *buf++; + while (count--) + *(volatile unsigned char *)portp = *buf++; } } @@ -347,16 +428,25 @@ const unsigned short *buf = addr; unsigned short *portp; - if (port >= LAN_IOSTART && port < LAN_IOEND) + if (port >= LAN_IOSTART && port < LAN_IOEND) { portp = PORT2ADDR_NE(port); - while (count--) *(volatile unsigned short *)portp = *buf++; + while (count--) + *(volatile unsigned short *)portp = *buf++; +#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) + } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { + portp = __port2addr_ata(port); + while (count--) + *(volatile unsigned short *)portp = *buf++; +#endif #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_iowrite_word(9, port, (void *)addr, sizeof(unsigned short), count, 1); + pcc_iowrite_word(9, port, (void *)addr, sizeof(unsigned short), + count, 1); #endif } else { portp = PORT2ADDR(port); - while(count--) *(volatile unsigned short *)portp = *buf++; + while (count--) + *(volatile unsigned short *)portp = *buf++; } } @@ -366,5 +456,6 @@ unsigned char *portp; portp = PORT2ADDR(port); - while(count--) *(volatile unsigned long *)portp = *buf++; + while (count--) + *(volatile unsigned long *)portp = *buf++; } diff -Nru a/arch/m32r/kernel/io_oaks32r.c b/arch/m32r/kernel/io_oaks32r.c --- a/arch/m32r/kernel/io_oaks32r.c 2004-11-29 21:22:08 -08:00 +++ b/arch/m32r/kernel/io_oaks32r.c 2004-11-29 21:22:08 -08:00 @@ -4,11 +4,9 @@ * Typical I/O routines for OAKS32R board. * * Copyright (c) 2001-2004 Hiroyuki Kondo, Hirokazu Takata, - * Hitoshi Yamamoto, Mamoru Sakugawa + * Hitoshi Yamamoto, Mamoru Sakugawa */ -/* $Id$ */ - #include #include #include @@ -16,17 +14,17 @@ #define PORT2ADDR(port) _port2addr(port) -static __inline__ void *_port2addr(unsigned long port) +static inline void *_port2addr(unsigned long port) { return (void *)(port + NONCACHE_OFFSET); } -static __inline__ void *_port2addr_ne(unsigned long port) +static inline void *_port2addr_ne(unsigned long port) { return (void *)((port<<1) + NONCACHE_OFFSET + 0x02000000); } -static __inline__ void delay(void) +static inline void delay(void) { __asm__ __volatile__ ("push r0; \n\t pop r0;" : : :"memory"); } @@ -37,12 +35,12 @@ #define PORT2ADDR_NE(port) _port2addr_ne(port) -static __inline__ unsigned char _ne_inb(void *portp) +static inline unsigned char _ne_inb(void *portp) { return *(volatile unsigned char *)(portp+1); } -static __inline__ unsigned short _ne_inw(void *portp) +static inline unsigned short _ne_inw(void *portp) { unsigned short tmp; @@ -51,21 +49,22 @@ return tmp; } -static __inline__ void _ne_insb(void *portp, void * addr, unsigned long count) +static inline void _ne_insb(void *portp, void *addr, unsigned long count) { unsigned char *buf = addr; - while (count--) *buf++ = *(volatile unsigned char *)(portp+1); + while (count--) + *buf++ = *(volatile unsigned char *)(portp+1); } -static __inline__ void _ne_outb(unsigned char b, void *portp) +static inline void _ne_outb(unsigned char b, void *portp) { *(volatile unsigned char *)(portp+1) = b; } -static __inline__ void _ne_outw(unsigned short w, void *portp) +static inline void _ne_outw(unsigned short w, void *portp) { - *(volatile unsigned short *)portp = (w >> 8); - *(volatile unsigned short *)(portp+2) = (w & 0xff); + *(volatile unsigned short *)portp = (w >> 8); + *(volatile unsigned short *)(portp+2) = (w & 0xff); } unsigned char _inb(unsigned long port) @@ -171,73 +170,82 @@ delay(); } -void _insb(unsigned int port, void * addr, unsigned long count) +void _insb(unsigned int port, void *addr, unsigned long count) { if (port >= 0x300 && port < 0x320) _ne_insb(PORT2ADDR_NE(port), addr, count); else { unsigned char *buf = addr; unsigned char *portp = PORT2ADDR(port); - while(count--) *buf++ = *(volatile unsigned char *)portp; + while (count--) + *buf++ = *(volatile unsigned char *)portp; } } -void _insw(unsigned int port, void * addr, unsigned long count) +void _insw(unsigned int port, void *addr, unsigned long count) { unsigned short *buf = addr; unsigned short *portp; if (port >= 0x300 && port < 0x320) { portp = PORT2ADDR_NE(port); - while (count--) *buf++ = _ne_inw(portp); + while (count--) + *buf++ = _ne_inw(portp); } else { portp = PORT2ADDR(port); - while (count--) *buf++ = *(volatile unsigned short *)portp; + while (count--) + *buf++ = *(volatile unsigned short *)portp; } } -void _insl(unsigned int port, void * addr, unsigned long count) +void _insl(unsigned int port, void *addr, unsigned long count) { unsigned long *buf = addr; unsigned long *portp; portp = PORT2ADDR(port); - while (count--) *buf++ = *(volatile unsigned long *)portp; + while (count--) + *buf++ = *(volatile unsigned long *)portp; } -void _outsb(unsigned int port, const void * addr, unsigned long count) +void _outsb(unsigned int port, const void *addr, unsigned long count) { const unsigned char *buf = addr; unsigned char *portp; if (port >= 0x300 && port < 0x320) { portp = PORT2ADDR_NE(port); - while (count--) _ne_outb(*buf++, portp); + while (count--) + _ne_outb(*buf++, portp); } else { portp = PORT2ADDR(port); - while(count--) *(volatile unsigned char *)portp = *buf++; + while (count--) + *(volatile unsigned char *)portp = *buf++; } } -void _outsw(unsigned int port, const void * addr, unsigned long count) +void _outsw(unsigned int port, const void *addr, unsigned long count) { const unsigned short *buf = addr; unsigned short *portp; if (port >= 0x300 && port < 0x320) { portp = PORT2ADDR_NE(port); - while (count--) _ne_outw(*buf++, portp); + while (count--) + _ne_outw(*buf++, portp); } else { portp = PORT2ADDR(port); - while(count--) *(volatile unsigned short *)portp = *buf++; + while (count--) + *(volatile unsigned short *)portp = *buf++; } } -void _outsl(unsigned int port, const void * addr, unsigned long count) +void _outsl(unsigned int port, const void *addr, unsigned long count) { const unsigned long *buf = addr; unsigned char *portp; portp = PORT2ADDR(port); - while(count--) *(volatile unsigned long *)portp = *buf++; + while (count--) + *(volatile unsigned long *)portp = *buf++; } diff -Nru a/arch/m32r/kernel/io_opsput.c b/arch/m32r/kernel/io_opsput.c --- a/arch/m32r/kernel/io_opsput.c 2004-11-29 21:22:07 -08:00 +++ b/arch/m32r/kernel/io_opsput.c 2004-11-29 21:22:07 -08:00 @@ -9,7 +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. - * */ #include @@ -35,7 +34,7 @@ #define PORT2ADDR(port) _port2addr(port) #define PORT2ADDR_USB(port) _port2addr_usb(port) -static __inline__ void *_port2addr(unsigned long port) +static inline void *_port2addr(unsigned long port) { return (void *)(port + NONCACHE_OFFSET); } @@ -47,16 +46,16 @@ */ #define LAN_IOSTART 0x300 #define LAN_IOEND 0x320 -static __inline__ void *_port2addr_ne(unsigned long port) +static inline void *_port2addr_ne(unsigned long port) { return (void *)(port + NONCACHE_OFFSET + 0x10000000); } -static __inline__ void *_port2addr_usb(unsigned long port) +static inline void *_port2addr_usb(unsigned long port) { - return (void *)((port & 0x0f) + NONCACHE_OFFSET + 0x10303000); + return (void *)((port & 0x0f) + NONCACHE_OFFSET + 0x10303000); } -static __inline__ void delay(void) +static inline void delay(void) { __asm__ __volatile__ ("push r0; \n\t pop r0;" : : :"memory"); } @@ -67,29 +66,30 @@ #define PORT2ADDR_NE(port) _port2addr_ne(port) -static __inline__ unsigned char _ne_inb(void *portp) +static inline unsigned char _ne_inb(void *portp) { return *(volatile unsigned char *)portp; } -static __inline__ unsigned short _ne_inw(void *portp) +static inline unsigned short _ne_inw(void *portp) { return (unsigned short)le16_to_cpu(*(volatile unsigned short *)portp); } -static __inline__ void _ne_insb(void *portp, void * addr, unsigned long count) +static inline void _ne_insb(void *portp, void *addr, unsigned long count) { unsigned char *buf = (unsigned char *)addr; - while (count--) *buf++ = _ne_inb(portp); + while (count--) + *buf++ = _ne_inb(portp); } -static __inline__ void _ne_outb(unsigned char b, void *portp) +static inline void _ne_outb(unsigned char b, void *portp) { *(volatile unsigned char *)portp = b; } -static __inline__ void _ne_outw(unsigned short w, void *portp) +static inline void _ne_outw(unsigned short w, void *portp) { *(volatile unsigned short *)portp = cpu_to_le16(w); } @@ -101,9 +101,9 @@ #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - unsigned char b; - pcc_ioread_byte(0, port, &b, sizeof(b), 1, 0); - return b; + unsigned char b; + pcc_ioread_byte(0, port, &b, sizeof(b), 1, 0); + return b; } else #endif @@ -116,14 +116,14 @@ return _ne_inw(PORT2ADDR_NE(port)); #if defined(CONFIG_USB) else if(port >= 0x340 && port < 0x3a0) - return *(volatile unsigned short *)PORT2ADDR_USB(port); + return *(volatile unsigned short *)PORT2ADDR_USB(port); #endif #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) - else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - unsigned short w; - pcc_ioread_word(0, port, &w, sizeof(w), 1, 0); - return w; + else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { + unsigned short w; + pcc_ioread_word(0, port, &w, sizeof(w), 1, 0); + return w; } else #endif return *(volatile unsigned short *)PORT2ADDR(port); @@ -133,9 +133,9 @@ { #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - unsigned long l; - pcc_ioread_word(0, port, &l, sizeof(l), 1, 0); - return l; + unsigned long l; + pcc_ioread_word(0, port, &l, sizeof(l), 1, 0); + return l; } else #endif return *(volatile unsigned long *)PORT2ADDR(port); @@ -150,9 +150,9 @@ else #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - unsigned char b; - pcc_ioread_byte(0, port, &b, sizeof(b), 1, 0); - return b; + unsigned char b; + pcc_ioread_byte(0, port, &b, sizeof(b), 1, 0); + return b; } else #endif v = *(volatile unsigned char *)PORT2ADDR(port); @@ -169,16 +169,16 @@ v = _ne_inw(PORT2ADDR_NE(port)); else #if defined(CONFIG_USB) - if(port >= 0x340 && port < 0x3a0) - return *(volatile unsigned short *)PORT2ADDR_USB(port); + if(port >= 0x340 && port < 0x3a0) + return *(volatile unsigned short *)PORT2ADDR_USB(port); else #endif #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - unsigned short w; - pcc_ioread_word(0, port, &w, sizeof(w), 1, 0); - return w; + unsigned short w; + pcc_ioread_word(0, port, &w, sizeof(w), 1, 0); + return w; } else #endif v = *(volatile unsigned short *)PORT2ADDR(port); @@ -203,7 +203,7 @@ else #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_iowrite_byte(0, port, &b, sizeof(b), 1, 0); + pcc_iowrite_byte(0, port, &b, sizeof(b), 1, 0); } else #endif *(volatile unsigned char *)PORT2ADDR(port) = b; @@ -216,13 +216,13 @@ else #if defined(CONFIG_USB) if(port >= 0x340 && port < 0x3a0) - *(volatile unsigned short *)PORT2ADDR_USB(port) = w; + *(volatile unsigned short *)PORT2ADDR_USB(port) = w; else #endif #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_iowrite_word(0, port, &w, sizeof(w), 1, 0); + pcc_iowrite_word(0, port, &w, sizeof(w), 1, 0); } else #endif *(volatile unsigned short *)PORT2ADDR(port) = w; @@ -232,7 +232,7 @@ { #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_iowrite_word(0, port, &l, sizeof(l), 1, 0); + pcc_iowrite_word(0, port, &l, sizeof(l), 1, 0); } else #endif *(volatile unsigned long *)PORT2ADDR(port) = l; @@ -245,7 +245,7 @@ else #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_iowrite_byte(0, port, &b, sizeof(b), 1, 0); + pcc_iowrite_byte(0, port, &b, sizeof(b), 1, 0); } else #endif *(volatile unsigned char *)PORT2ADDR(port) = b; @@ -259,14 +259,14 @@ _ne_outw(w, PORT2ADDR_NE(port)); else #if defined(CONFIG_USB) - if(port >= 0x340 && port < 0x3a0) - *(volatile unsigned short *)PORT2ADDR_USB(port) = w; + if(port >= 0x340 && port < 0x3a0) + *(volatile unsigned short *)PORT2ADDR_USB(port) = w; else #endif #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_iowrite_word(0, port, &w, sizeof(w), 1, 0); + pcc_iowrite_word(0, port, &w, sizeof(w), 1, 0); } else #endif *(volatile unsigned short *)PORT2ADDR(port) = w; @@ -280,23 +280,25 @@ delay(); } -void _insb(unsigned int port, void * addr, unsigned long count) +void _insb(unsigned int port, void *addr, unsigned long count) { if (port >= LAN_IOSTART && port < LAN_IOEND) _ne_insb(PORT2ADDR_NE(port), addr, count); #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) - else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_ioread_byte(0, port, (void *)addr, sizeof(unsigned char), count, 1); + else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { + pcc_ioread_byte(0, port, (void *)addr, sizeof(unsigned char), + count, 1); } #endif else { unsigned char *buf = addr; unsigned char *portp = PORT2ADDR(port); - while(count--) *buf++ = *(volatile unsigned char *)portp; + while (count--) + *buf++ = *(volatile unsigned char *)portp; } } -void _insw(unsigned int port, void * addr, unsigned long count) +void _insw(unsigned int port, void *addr, unsigned long count) { unsigned short *buf = addr; unsigned short *portp; @@ -307,45 +309,52 @@ * from the DATA_REG. Do not swap the data. */ portp = PORT2ADDR_NE(port); - while (count--) *buf++ = *(volatile unsigned short *)portp; + while (count--) + *buf++ = *(volatile unsigned short *)portp; #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_ioread_word(9, port, (void *)addr, sizeof(unsigned short), count, 1); + pcc_ioread_word(9, port, (void *)addr, sizeof(unsigned short), + count, 1); #endif } else { portp = PORT2ADDR(port); - while (count--) *buf++ = *(volatile unsigned short *)portp; + while (count--) + *buf++ = *(volatile unsigned short *)portp; } } -void _insl(unsigned int port, void * addr, unsigned long count) +void _insl(unsigned int port, void *addr, unsigned long count) { unsigned long *buf = addr; unsigned long *portp; portp = PORT2ADDR(port); - while (count--) *buf++ = *(volatile unsigned long *)portp; + while (count--) + *buf++ = *(volatile unsigned long *)portp; } -void _outsb(unsigned int port, const void * addr, unsigned long count) +void _outsb(unsigned int port, const void *addr, unsigned long count) { const unsigned char *buf = addr; unsigned char *portp; if (port >= LAN_IOSTART && port < LAN_IOEND) { portp = PORT2ADDR_NE(port); - while (count--) _ne_outb(*buf++, portp); + while (count--) + _ne_outb(*buf++, portp); #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_iowrite_byte(0, port, (void *)addr, sizeof(unsigned char), count, 1); + pcc_iowrite_byte(0, port, (void *)addr, sizeof(unsigned char), + count, 1); #endif } else { portp = PORT2ADDR(port); - while(count--) *(volatile unsigned char *)portp = *buf++; + while (count--) + *(volatile unsigned char *)portp = *buf++; } } -void _outsw(unsigned int port, const void * addr, unsigned long count) +void _outsw(unsigned int port, const void *addr, unsigned long count) { const unsigned short *buf = addr; unsigned short *portp; @@ -356,22 +365,26 @@ * into the DATA_REG. Do not swap the data. */ portp = PORT2ADDR_NE(port); - while(count--) *(volatile unsigned short *)portp = *buf++; + while (count--) + *(volatile unsigned short *)portp = *buf++; #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { - pcc_iowrite_word(9, port, (void *)addr, sizeof(unsigned short), count, 1); + pcc_iowrite_word(9, port, (void *)addr, sizeof(unsigned short), + count, 1); #endif } else { portp = PORT2ADDR(port); - while(count--) *(volatile unsigned short *)portp = *buf++; + while (count--) + *(volatile unsigned short *)portp = *buf++; } } -void _outsl(unsigned int port, const void * addr, unsigned long count) +void _outsl(unsigned int port, const void *addr, unsigned long count) { const unsigned long *buf = addr; unsigned char *portp; portp = PORT2ADDR(port); - while(count--) *(volatile unsigned long *)portp = *buf++; + while (count--) + *(volatile unsigned long *)portp = *buf++; } diff -Nru a/arch/m32r/kernel/io_usrv.c b/arch/m32r/kernel/io_usrv.c --- a/arch/m32r/kernel/io_usrv.c 2004-11-29 21:22:08 -08:00 +++ b/arch/m32r/kernel/io_usrv.c 2004-11-29 21:22:08 -08:00 @@ -178,7 +178,8 @@ else { unsigned char *buf = addr; unsigned char *portp = PORT2ADDR(port); - while(count--) *buf++ = *(volatile unsigned char *)portp; + while (count--) + *buf++ = *(volatile unsigned char *)portp; } } @@ -192,7 +193,8 @@ 1); else { portp = PORT2ADDR(port); - while (count--) *buf++ = *(volatile unsigned short *)portp; + while (count--) + *buf++ = *(volatile unsigned short *)portp; } } diff -Nru a/arch/m32r/kernel/setup_mappi2.c b/arch/m32r/kernel/setup_mappi2.c --- a/arch/m32r/kernel/setup_mappi2.c 2004-11-29 21:22:07 -08:00 +++ b/arch/m32r/kernel/setup_mappi2.c 2004-11-29 21:22:07 -08:00 @@ -151,7 +151,6 @@ disable_mappi2_irq(M32R_IRQ_INT1); #endif /* CONFIG_USB */ -#if defined(CONFIG_M32R_CFC) /* ICUCR40: CFC IREQ */ irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED; irq_desc[PLD_IRQ_CFIREQ].handler = &mappi2_irq_type; @@ -161,6 +160,7 @@ icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01; disable_mappi2_irq(PLD_IRQ_CFIREQ); +#if defined(CONFIG_M32R_CFC) /* ICUCR41: CFC Insert */ irq_desc[PLD_IRQ_CFC_INSERT].status = IRQ_DISABLED; irq_desc[PLD_IRQ_CFC_INSERT].handler = &mappi2_irq_type; diff -Nru a/arch/m32r/kernel/time.c b/arch/m32r/kernel/time.c --- a/arch/m32r/kernel/time.c 2004-11-29 21:22:08 -08:00 +++ b/arch/m32r/kernel/time.c 2004-11-29 21:22:08 -08:00 @@ -193,7 +193,7 @@ * BUG: This routine does not handle hour overflow properly; it just * sets the minutes. Usually you won't notice until after reboot! */ -static __inline__ int set_rtc_mmss(unsigned long nowtime) +static inline int set_rtc_mmss(unsigned long nowtime) { return 0; } @@ -205,11 +205,17 @@ * timer_interrupt() needs to keep up the real-time clock, * as well as call the "do_timer()" routine every clocktick */ -static __inline__ void do_timer_interrupt(int irq, void *dev_id, - struct pt_regs * regs) +static inline void +do_timer_interrupt(int irq, void *dev_id, struct pt_regs * regs) { +#ifndef CONFIG_SMP + profile_tick(CPU_PROFILING, regs); +#endif do_timer(regs); +#ifndef CONFIG_SMP + update_process_times(user_mode(regs)); +#endif /* * If we have an externally synchronized Linux clock, then update * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be @@ -241,10 +247,6 @@ do_timer_interrupt(irq, NULL, regs); write_sequnlock(&xtime_lock); -#ifndef CONFIG_SMP - profile_tick(CPU_PROFILING, regs); -#endif - return IRQ_HANDLED; } @@ -314,4 +316,3 @@ { return (unsigned long long)jiffies * (1000000000 / HZ); } - diff -Nru a/arch/m32r/m32700ut/defconfig.m32700ut.smp b/arch/m32r/m32700ut/defconfig.m32700ut.smp --- a/arch/m32r/m32700ut/defconfig.m32700ut.smp 2004-11-29 21:22:07 -08:00 +++ b/arch/m32r/m32700ut/defconfig.m32700ut.smp 2004-11-29 21:22:07 -08:00 @@ -1,5 +1,7 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.10-rc1-bk21 +# Fri Nov 12 16:08:45 2004 # CONFIG_M32R=y CONFIG_UID16=y @@ -10,10 +12,12 @@ # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y +CONFIG_LOCK_KERNEL=y # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set @@ -23,17 +27,20 @@ # CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=15 CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y CONFIG_IKCONFIG=y # CONFIG_IKCONFIG_PROC is not set CONFIG_EMBEDDED=y # CONFIG_KALLSYMS is not set # CONFIG_FUTEX is not set # CONFIG_EPOLL is not set -CONFIG_IOSCHED_NOOP=y -# CONFIG_IOSCHED_AS is not set -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set # # Loadable module support @@ -43,6 +50,7 @@ # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y CONFIG_STOP_MACHINE=y @@ -81,33 +89,26 @@ # CONFIG_NUMA is not set # -# M32R drivers -# -# CONFIG_M32RPCC is not set -CONFIG_M32R_CFC=y -CONFIG_M32700UT_CFC=y -CONFIG_CFC_NUM=1 -# CONFIG_MTD_M32R is not set -CONFIG_M32R_SMC91111=y -CONFIG_M32700UT_DS1302=y - -# -# Power management options (ACPI, APM) -# -# CONFIG_PM is not set - -# # Bus options (PCI, PCMCIA, EISA, MCA, ISA) # # CONFIG_PCI is not set # CONFIG_ISA is not set # -# PCMCIA/CardBus support +# PCCARD (PCMCIA/CardBus) support # -CONFIG_PCMCIA=y +CONFIG_PCCARD=y # CONFIG_PCMCIA_DEBUG is not set +# CONFIG_PCMCIA_OBSOLETE is not set +CONFIG_PCMCIA=y + +# +# PC-card bridges +# # CONFIG_TCIC is not set +# CONFIG_M32R_PCC is not set +CONFIG_M32R_CFC=y +CONFIG_M32R_CFC_NUM=1 # # PCI Hotplug Support @@ -154,6 +155,16 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 # CONFIG_BLK_DEV_INITRD is not set +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_AS is not set +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # # ATA/ATAPI/MFM/RLL support @@ -173,7 +184,6 @@ # CONFIG_BLK_DEV_IDEFLOPPY is not set # 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 @@ -216,9 +226,8 @@ # # SCSI low-level drivers # -# CONFIG_SCSI_AIC7XXX_OLD is not set # CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_EATA_PIO is not set +# CONFIG_SCSI_QLOGIC_1280_1040 is not set # CONFIG_SCSI_DEBUG is not set # @@ -274,6 +283,9 @@ # 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_IP_TCPDIAG=y +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -293,7 +305,6 @@ # 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 @@ -310,7 +321,50 @@ # CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set # CONFIG_BT is not set -# CONFIG_NETDEVICES is not set +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +CONFIG_SMC91X=y +# CONFIG_NE2000 is not set + +# +# Ethernet (1000 Mbit) +# + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# PCMCIA network device support +# +# CONFIG_NET_PCMCIA is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # # ISDN subsystem @@ -345,6 +399,7 @@ # CONFIG_SERIO_I8042 is not set CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_RAW is not set # # Input Device Drivers @@ -373,13 +428,12 @@ # CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_M32R_SIO is not set +CONFIG_SERIAL_M32R_SIO=y +CONFIG_SERIAL_M32R_SIO_CONSOLE=y CONFIG_SERIAL_M32R_PLDSIO=y -CONFIG_SERIAL_M32R_PLDSIO_CONSOLE=y CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -392,6 +446,7 @@ # CONFIG_WATCHDOG is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set +CONFIG_DS1302=y # CONFIG_DTLK is not set # CONFIG_R3964 is not set @@ -434,8 +489,8 @@ # Video Adapters # # CONFIG_VIDEO_CPIA is not set -CONFIG_M32R_AR=y -CONFIG_M32R_AR_VGA=y +CONFIG_VIDEO_M32R_AR=y +CONFIG_VIDEO_M32R_AR_M64278=y # # Radio Adapters @@ -451,14 +506,14 @@ # Graphics support # CONFIG_FB=y -CONFIG_FB_EPSON_S1D13806=y +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set # CONFIG_FB_VIRTUAL is not set # # Console display driver support # # CONFIG_VGA_CONSOLE is not set -# CONFIG_MDA_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y # CONFIG_FONTS is not set @@ -472,7 +527,6 @@ CONFIG_LOGO_LINUX_MONO=y CONFIG_LOGO_LINUX_VGA16=y CONFIG_LOGO_LINUX_CLUT224=y -CONFIG_LOGO_M32R_CLUT224=y # # Sound @@ -482,6 +536,8 @@ # # USB support # +# CONFIG_USB_ARCH_HAS_HCD is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set # # USB Gadget Support @@ -509,6 +565,7 @@ # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -542,6 +599,7 @@ # CONFIG_DEVFS_DEBUG is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -576,6 +634,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 @@ -647,6 +706,7 @@ # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # diff -Nru a/arch/m32r/m32700ut/defconfig.m32700ut.up b/arch/m32r/m32700ut/defconfig.m32700ut.up --- a/arch/m32r/m32700ut/defconfig.m32700ut.up 2004-11-29 21:22:08 -08:00 +++ b/arch/m32r/m32700ut/defconfig.m32700ut.up 2004-11-29 21:22:08 -08:00 @@ -1,5 +1,7 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.10-rc1-bk21 +# Fri Nov 12 16:08:49 2004 # CONFIG_M32R=y CONFIG_UID16=y @@ -11,10 +13,12 @@ CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y CONFIG_BROKEN_ON_SMP=y +CONFIG_LOCK_KERNEL=y # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set @@ -24,17 +28,20 @@ # CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=14 CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y CONFIG_IKCONFIG=y # CONFIG_IKCONFIG_PROC is not set CONFIG_EMBEDDED=y # CONFIG_KALLSYMS is not set # CONFIG_FUTEX is not set # CONFIG_EPOLL is not set -CONFIG_IOSCHED_NOOP=y -# CONFIG_IOSCHED_AS is not set -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set # # Loadable module support @@ -44,6 +51,7 @@ # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # @@ -78,33 +86,26 @@ # CONFIG_SMP is not set # -# M32R drivers -# -# CONFIG_M32RPCC is not set -CONFIG_M32R_CFC=y -CONFIG_M32700UT_CFC=y -CONFIG_CFC_NUM=1 -# CONFIG_MTD_M32R is not set -CONFIG_M32R_SMC91111=y -CONFIG_M32700UT_DS1302=y - -# -# Power management options (ACPI, APM) -# -# CONFIG_PM is not set - -# # Bus options (PCI, PCMCIA, EISA, MCA, ISA) # # CONFIG_PCI is not set # CONFIG_ISA is not set # -# PCMCIA/CardBus support +# PCCARD (PCMCIA/CardBus) support # -CONFIG_PCMCIA=y +CONFIG_PCCARD=y # CONFIG_PCMCIA_DEBUG is not set +# CONFIG_PCMCIA_OBSOLETE is not set +CONFIG_PCMCIA=y + +# +# PC-card bridges +# # CONFIG_TCIC is not set +# CONFIG_M32R_PCC is not set +CONFIG_M32R_CFC=y +CONFIG_M32R_CFC_NUM=1 # # PCI Hotplug Support @@ -151,6 +152,16 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 # CONFIG_BLK_DEV_INITRD is not set +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_AS is not set +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # # ATA/ATAPI/MFM/RLL support @@ -170,7 +181,6 @@ # CONFIG_BLK_DEV_IDEFLOPPY is not set # 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 @@ -213,9 +223,8 @@ # # SCSI low-level drivers # -# CONFIG_SCSI_AIC7XXX_OLD is not set # CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_EATA_PIO is not set +# CONFIG_SCSI_QLOGIC_1280_1040 is not set # CONFIG_SCSI_DEBUG is not set # @@ -271,6 +280,9 @@ # 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_IP_TCPDIAG=y +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -290,7 +302,6 @@ # 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 @@ -307,7 +318,50 @@ # CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set # CONFIG_BT is not set -# CONFIG_NETDEVICES is not set +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +CONFIG_SMC91X=y +# CONFIG_NE2000 is not set + +# +# Ethernet (1000 Mbit) +# + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# PCMCIA network device support +# +# CONFIG_NET_PCMCIA is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # # ISDN subsystem @@ -342,6 +396,7 @@ # CONFIG_SERIO_I8042 is not set CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_RAW is not set # # Input Device Drivers @@ -370,13 +425,12 @@ # CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_M32R_SIO is not set +CONFIG_SERIAL_M32R_SIO=y +CONFIG_SERIAL_M32R_SIO_CONSOLE=y CONFIG_SERIAL_M32R_PLDSIO=y -CONFIG_SERIAL_M32R_PLDSIO_CONSOLE=y CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -389,6 +443,7 @@ # CONFIG_WATCHDOG is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set +CONFIG_DS1302=y # CONFIG_DTLK is not set # CONFIG_R3964 is not set @@ -431,8 +486,8 @@ # Video Adapters # # CONFIG_VIDEO_CPIA is not set -CONFIG_M32R_AR=y -CONFIG_M32R_AR_VGA=y +CONFIG_VIDEO_M32R_AR=y +CONFIG_VIDEO_M32R_AR_M64278=y # # Radio Adapters @@ -448,14 +503,14 @@ # Graphics support # CONFIG_FB=y -CONFIG_FB_EPSON_S1D13806=y +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set # CONFIG_FB_VIRTUAL is not set # # Console display driver support # # CONFIG_VGA_CONSOLE is not set -# CONFIG_MDA_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y # CONFIG_FONTS is not set @@ -469,7 +524,6 @@ CONFIG_LOGO_LINUX_MONO=y CONFIG_LOGO_LINUX_VGA16=y CONFIG_LOGO_LINUX_CLUT224=y -CONFIG_LOGO_M32R_CLUT224=y # # Sound @@ -479,6 +533,8 @@ # # USB support # +# CONFIG_USB_ARCH_HAS_HCD is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set # # USB Gadget Support @@ -506,6 +562,7 @@ # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -539,6 +596,7 @@ # CONFIG_DEVFS_DEBUG is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -573,6 +631,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 @@ -644,6 +703,7 @@ # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # diff -Nru a/arch/m32r/m32700ut/dot.gdbinit_200MHz_16MB b/arch/m32r/m32700ut/dot.gdbinit_200MHz_16MB --- a/arch/m32r/m32700ut/dot.gdbinit_200MHz_16MB 2004-11-29 21:22:07 -08:00 +++ b/arch/m32r/m32700ut/dot.gdbinit_200MHz_16MB 2004-11-29 21:22:07 -08:00 @@ -1,5 +1,5 @@ # .gdbinit file -# $Id: dot.gdbinit_200MHz_16MB,v 1.1 2004/08/17 02:58:11 takata Exp $ +# $Id: dot.gdbinit_200MHz_16MB,v 1.2 2004/10/20 03:02:27 fujiwara Exp $ #----- # NOTE: this file is generated by a script, "gen_gdbinit.pl". # (Please type "gen_gdbinit.pl --help" and check the help message). @@ -178,11 +178,11 @@ # Set kernel parameters define set_kernel_parameters - set $param = (void*)0x08002000 + set $param = (void*)0x08001000 # INITRD_START - set *(unsigned long *)($param + 0x0010) = 0x082a0000 +# set *(unsigned long *)($param + 0x0010) = 0x08300000 # INITRD_SIZE - set *(unsigned long *)($param + 0x0014) = 0x00000000 +# set *(unsigned long *)($param + 0x0014) = 0x00000000 # M32R_CPUCLK set *(unsigned long *)($param + 0x0018) = 0d200000000 # M32R_BUSCLK @@ -191,15 +191,15 @@ # M32R_TIMER_DIVIDE set *(unsigned long *)($param + 0x0020) = 0d128 - set {char[0x200]}($param + 0x100) = "console=ttyD0,115200n8x console=tty1 video=s1d13xxxfb:mode:240x320-16 root=/dev/nfsroot nfsroot=192.168.0.1:/project/m32r-linux/export/rootfs,rsize=1024,wsize=1024 nfsaddrs=192.168.0.101:192.168.0.1:192.168.0.1:255.255.255.0:mappi001 mem=16M \0" + set {char[0x200]}($param + 0x100) = "console=ttyS0,115200n8x console=tty1 root=/dev/nfsroot nfsroot=192.168.0.1:/project/m32r-linux/export/rootfs,rsize=1024,wsize=1024 nfsaddrs=192.168.0.101:192.168.0.1:192.168.0.1:255.255.255.0:mappi001 mem=16M \0" end # Boot define boot set_kernel_parameters set $fp = 0 - set $pc = 0x08001000 - set *(unsigned char *)0xffffffff = 0x03 + set $pc = 0x08002000 +# set *(unsigned char *)0xffffffff = 0x03 si c end diff -Nru a/arch/m32r/m32700ut/dot.gdbinit_300MHz_32MB b/arch/m32r/m32700ut/dot.gdbinit_300MHz_32MB --- a/arch/m32r/m32700ut/dot.gdbinit_300MHz_32MB 2004-11-29 21:22:08 -08:00 +++ b/arch/m32r/m32700ut/dot.gdbinit_300MHz_32MB 2004-11-29 21:22:08 -08:00 @@ -1,5 +1,5 @@ # .gdbinit file -# $Id: dot.gdbinit_300MHz_32MB,v 1.1 2004/08/17 02:58:11 takata Exp $ +# $Id: dot.gdbinit_300MHz_32MB,v 1.2 2004/10/20 03:02:27 fujiwara Exp $ #----- # NOTE: this file is generated by a script, "gen_gdbinit.pl". # (Please type "gen_gdbinit.pl --help" and check the help message). @@ -42,8 +42,8 @@ set *(unsigned long *)0x00ef602c = 0x00000020 # Ch0-TR set *(unsigned long *)0x00ef6028 = 0x00051502 - # Ch0-ADR (size:16MB) - set *(unsigned long *)0x00ef6020 = 0x08000002 + # Ch0-ADR (size:32MB) + set *(unsigned long *)0x00ef6020 = 0x08000003 # AutoRef On set *(unsigned long *)0x00ef6004 = 0x00010e24 # Access enable @@ -51,7 +51,7 @@ end document sdram_init SDRAM controller initialization - 0x08000000 - 0x08ffffff (16MB) + 0x08000000 - 0x09ffffff (32MB) end # Initialize BSEL3 for UT-CFC @@ -161,8 +161,8 @@ shell sleep 0.1 clock_init shell sleep 0.1 - # SDRAM: 16MB - set *(unsigned long *)0x00ef6020 = 0x08000002 + # SDRAM: 32MB + set *(unsigned long *)0x00ef6020 = 0x08000003 cfc_init # USB set *(unsigned short *)0xb0301000 = 0x100 @@ -178,11 +178,11 @@ # Set kernel parameters define set_kernel_parameters - set $param = (void*)0x08002000 + set $param = (void*)0x08001000 # INITRD_START - set *(unsigned long *)($param + 0x0010) = 0x082a0000 +# set *(unsigned long *)($param + 0x0010) = 0x08300000 # INITRD_SIZE - set *(unsigned long *)($param + 0x0014) = 0x00000000 +# set *(unsigned long *)($param + 0x0014) = 0x00000000 # M32R_CPUCLK set *(unsigned long *)($param + 0x0018) = 0d300000000 # M32R_BUSCLK @@ -191,15 +191,15 @@ # M32R_TIMER_DIVIDE set *(unsigned long *)($param + 0x0020) = 0d128 - set {char[0x200]}($param + 0x100) = "console=ttyD0,115200n8x console=tty1 video=s1d13xxxfb:mode:240x320-16 root=/dev/nfsroot nfsroot=192.168.0.1:/project/m32r-linux/export/rootfs,rsize=1024,wsize=1024 nfsaddrs=192.168.0.101:192.168.0.1:192.168.0.1:255.255.255.0:mappi001 mem=16M \0" + set {char[0x200]}($param + 0x100) = "console=ttyS0,115200n8x console=tty1 root=/dev/nfsroot nfsroot=192.168.0.1:/project/m32r-linux/export/rootfs,rsize=1024,wsize=1024 nfsaddrs=192.168.0.101:192.168.0.1:192.168.0.1:255.255.255.0:mappi001 mem=32M \0" end # Boot define boot set_kernel_parameters set $fp = 0 - set $pc = 0x08001000 - set *(unsigned char *)0xffffffff = 0x03 + set $pc = 0x08002000 +# set *(unsigned char *)0xffffffff = 0x03 si c end diff -Nru a/arch/m32r/m32700ut/dot.gdbinit_400MHz_32MB b/arch/m32r/m32700ut/dot.gdbinit_400MHz_32MB --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/m32r/m32700ut/dot.gdbinit_400MHz_32MB 2004-11-29 21:22:09 -08:00 @@ -0,0 +1,249 @@ +# .gdbinit file +# $Id: dot.gdbinit_400MHz_32MB,v 1.1 2004/10/21 01:41:27 fujiwara Exp $ +#----- +# NOTE: this file is generated by a script, "gen_gdbinit.pl". +# (Please type "gen_gdbinit.pl --help" and check the help message). +# $ Id: gen_gdbinit.pl,v 1.12 2004/07/26 09:56:10 takata Exp $ +#----- +# target platform: m32700ut + +# setting +set width 0d70 +set radix 0d16 + +debug_chaos + +# clk xin:cpu:bif:bus=25:400:100:50 +define clock_init + set *(unsigned long *)0x00ef4008 = 0x00000000 + set *(unsigned long *)0x00ef4004 = 0 + shell sleep 0.1 + # NOTE: Please change the master clock source from PLL-clock to Xin-clock + # and switch off PLL, before resetting the clock gear ratio. + + set *(unsigned long *)0x00ef4024 = 3 + set *(unsigned long *)0x00ef4020 = 2 + set *(unsigned long *)0x00ef4010 = 0 + set *(unsigned long *)0x00ef4014 = 0 + set *(unsigned long *)0x00ef4004 = 7 + shell sleep 0.1 + set *(unsigned long *)0x00ef4008 = 0x00000200 +end + +# Initialize SDRAM controller +define sdram_init + # SDIR0 + set *(unsigned long *)0x00ef6008 = 0x00000182 + # SDIR1 + set *(unsigned long *)0x00ef600c = 0x00000001 + # Initialize wait + shell sleep 0.1 + # Ch0-MOD + set *(unsigned long *)0x00ef602c = 0x00000020 + # Ch0-TR + set *(unsigned long *)0x00ef6028 = 0x00041302 + # Ch0-ADR (size:32MB) + set *(unsigned long *)0x00ef6020 = 0x08000003 + # AutoRef On + set *(unsigned long *)0x00ef6004 = 0x00010517 + # Access enable + set *(unsigned long *)0x00ef6024 = 0x00000001 +end +document sdram_init + SDRAM controller initialization + 0x08000000 - 0x09ffffff (32MB) +end + +# Initialize BSEL3 for UT-CFC +define cfc_init + set $sfrbase = 0xa0ef0000 +# too fast +# set *(unsigned long *)($sfrbase + 0x5300) = 0x0b0b8000 +# set *(unsigned long *)($sfrbase + 0x5304) = 0x00102204 +# set *(unsigned long *)($sfrbase + 0x5300) = 0x1f1f8000 +# set *(unsigned long *)($sfrbase + 0x5300) = 0x1f1f1fdf +# set *(unsigned long *)($sfrbase + 0x5304) = 0x0013220f +# set *(unsigned long *)($sfrbase + 0x5304) = 0x0013330f +end +document cfc_init + CF controller initialization +end + +# MMU enable +define mmu_enable + set $evb=0x88000000 + set *(unsigned long *)0xffff0024=1 +end + +# MMU disable +define mmu_disable + set $evb=0 + set *(unsigned long *)0xffff0024=0 +end + +# Show TLB entries +define show_tlb_entries + set $i = 0 + set $addr = $arg0 + set $nr_entries = $arg1 + use_mon_code + while ($i < $nr_entries) + set $tlb_tag = *(unsigned long*)$addr + set $tlb_data = *(unsigned long*)($addr + 4) + printf " [%2d] 0x%08lx : 0x%08lx - 0x%08lx\n", $i, $addr, $tlb_tag, $tlb_data + set $i = $i + 1 + set $addr = $addr + 8 + end + use_debug_dma +end +define itlb + set $itlb=0xfe000000 + show_tlb_entries $itlb 0d32 +end +define dtlb + set $dtlb=0xfe000800 + show_tlb_entries $dtlb 0d32 +end + +# Initialize TLB entries +define init_tlb_entries + set $i = 0 + set $addr = $arg0 + set $nr_entries = $arg1 + use_mon_code + while ($i < $nr_entries) + set *(unsigned long *)($addr + 0x4) = 0 + set $i = $i + 1 + set $addr = $addr + 8 + end + use_debug_dma +end +define tlb_init + set $itlb=0xfe000000 + init_tlb_entries $itlb 0d32 + set $dtlb=0xfe000800 + init_tlb_entries $dtlb 0d32 +end + +# Show current task structure +define show_current + set $current = $spi & 0xffffe000 + printf "$current=0x%08lX\n",$current + print *(struct task_struct *)$current +end + +# Show user assigned task structure +define show_task + set = $arg0 & 0xffffe000 + printf "$task=0x%08lX\n",$task + print *(struct task_struct *)$task +end +document show_task + Show user assigned task structure + arg0 : task structure address +end + +# Show M32R registers +define show_regs + printf " R0[0x%08lX] R1[0x%08lX] R2[0x%08lX] R3[0x%08lX]\n",$r0,$r1,$r2,$r3 + printf " R4[0x%08lX] R5[0x%08lX] R6[0x%08lX] R7[0x%08lX]\n",$r4,$r5,$r6,$r7 + printf " R8[0x%08lX] R9[0x%08lX] R10[0x%08lX] R11[0x%08lX]\n",$r8,$r9,$r10,$r11 + printf "R12[0x%08lX] FP[0x%08lX] LR[0x%08lX] SP[0x%08lX]\n",$r12,$fp,$lr,$sp + printf "PSW[0x%08lX] CBR[0x%08lX] SPI[0x%08lX] SPU[0x%08lX]\n",$psw,$cbr,$spi,$spu + printf "BPC[0x%08lX] PC[0x%08lX] ACCL[0x%08lX] ACCH[0x%08lX]\n",$bpc,$pc,$accl,$acch + printf "EVB[0x%08lX]\n",$evb +end + +# Setup all +define setup + use_mon_code + set *(unsigned int)0xfffffffc=0x60 + shell sleep 0.1 + clock_init + shell sleep 0.1 + # SDRAM: 32MB + set *(unsigned long *)0x00ef6020 = 0x08000003 + cfc_init + # USB + set *(unsigned short *)0xb0301000 = 0x100 + + set $evb=0x08000000 +end + +# Load modules +define load_modules + use_debug_dma + load +end + +# Set kernel parameters +define set_kernel_parameters + set $param = (void*)0x08001000 + # INITRD_START +# set *(unsigned long *)($param + 0x0010) = 0x08300000 + # INITRD_SIZE +# set *(unsigned long *)($param + 0x0014) = 0x00000000 + # M32R_CPUCLK + set *(unsigned long *)($param + 0x0018) = 0d400000000 + # M32R_BUSCLK + set *(unsigned long *)($param + 0x001c) = 0d50000000 + + # M32R_TIMER_DIVIDE + set *(unsigned long *)($param + 0x0020) = 0d128 + + set {char[0x200]}($param + 0x100) = "console=ttyS0,115200n8x console=tty1 root=/dev/nfsroot nfsroot=192.168.0.1:/project/m32r-linux/export/rootfs,rsize=1024,wsize=1024 nfsaddrs=192.168.0.101:192.168.0.1:192.168.0.1:255.255.255.0:mappi001 mem=32M \0" +end + +# Boot +define boot + set_kernel_parameters + set $fp = 0 + set $pc = 0x08002000 +# set *(unsigned char *)0xffffffff = 0x03 + si + c +end + +# Set breakpoints +define set_breakpoints + b *0x08000030 +end + +# Restart +define restart + sdireset + sdireset + set $pc = 0 + b *0x04001000 + b *0x08001000 + b *0x08002000 + si + c + tlb_init + del + setup + load_modules + boot +end + +define si + stepi + x/i $pc + show_reg +end + +sdireset +sdireset +file vmlinux +target m32rsdi +set $pc = 0 +b *0x04001000 +b *0x08001000 +b *0x08002000 +c +tlb_init +del +setup +load_modules +boot + diff -Nru a/arch/m32r/mappi/defconfig.nommu b/arch/m32r/mappi/defconfig.nommu --- a/arch/m32r/mappi/defconfig.nommu 2004-11-29 21:22:08 -08:00 +++ b/arch/m32r/mappi/defconfig.nommu 2004-11-29 21:22:08 -08:00 @@ -1,5 +1,7 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.10-rc1-bk21 +# Fri Nov 12 16:08:51 2004 # CONFIG_M32R=y CONFIG_UID16=y @@ -11,10 +13,12 @@ CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y CONFIG_BROKEN_ON_SMP=y +CONFIG_LOCK_KERNEL=y # # General setup # +CONFIG_LOCALVERSION="" # CONFIG_POSIX_MQUEUE is not set CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set @@ -22,17 +26,20 @@ # CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=14 CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y CONFIG_IKCONFIG=y # CONFIG_IKCONFIG_PROC is not set CONFIG_EMBEDDED=y # CONFIG_KALLSYMS is not set # CONFIG_FUTEX is not set # CONFIG_EPOLL is not set -CONFIG_IOSCHED_NOOP=y -# CONFIG_IOSCHED_AS is not set -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set # # Loadable module support @@ -42,6 +49,7 @@ # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # @@ -76,26 +84,24 @@ # CONFIG_SMP is not set # -# M32R drivers -# -# CONFIG_M32RPCC is not set -CONFIG_M32R_NE2000=y - -# -# Power management options (ACPI, APM) -# -# CONFIG_PM is not set - -# # Bus options (PCI, PCMCIA, EISA, MCA, ISA) # # CONFIG_PCI is not set # CONFIG_ISA is not set # -# PCMCIA/CardBus support +# PCCARD (PCMCIA/CardBus) support +# +CONFIG_PCCARD=y +# CONFIG_PCMCIA_DEBUG is not set +# CONFIG_PCMCIA_OBSOLETE is not set +CONFIG_PCMCIA=y + +# +# PC-card bridges # -# CONFIG_PCMCIA is not set +# CONFIG_TCIC is not set +CONFIG_M32R_PCC=y # # PCI Hotplug Support @@ -144,6 +150,16 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 # CONFIG_BLK_DEV_INITRD is not set +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_AS is not set +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # # ATA/ATAPI/MFM/RLL support @@ -199,6 +215,9 @@ # 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_IP_TCPDIAG=y +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -218,7 +237,6 @@ # 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 @@ -235,7 +253,48 @@ # CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set # CONFIG_BT is not set -# CONFIG_NETDEVICES is not set +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set + +# +# Ethernet (10 or 100Mbit) +# +# CONFIG_NET_ETHERNET is not set +CONFIG_NE2000=y + +# +# Ethernet (1000 Mbit) +# + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# PCMCIA network device support +# +# CONFIG_NET_PCMCIA is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # # ISDN subsystem @@ -270,6 +329,7 @@ # CONFIG_SERIO_I8042 is not set CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_RAW is not set # # Input Device Drivers @@ -302,7 +362,6 @@ CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -323,6 +382,11 @@ # # CONFIG_AGP is not set # CONFIG_DRM is not set + +# +# PCMCIA character devices +# +# CONFIG_SYNCLINK_CS is not set # CONFIG_RAW_DRIVER is not set # @@ -362,6 +426,8 @@ # # USB support # +# CONFIG_USB_ARCH_HAS_HCD is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set # # USB Gadget Support @@ -381,6 +447,7 @@ # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -443,6 +510,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 @@ -514,6 +582,7 @@ # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # diff -Nru a/arch/m32r/mappi/defconfig.smp b/arch/m32r/mappi/defconfig.smp --- a/arch/m32r/mappi/defconfig.smp 2004-11-29 21:22:07 -08:00 +++ b/arch/m32r/mappi/defconfig.smp 2004-11-29 21:22:07 -08:00 @@ -1,5 +1,7 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.10-rc1-bk21 +# Fri Nov 12 16:08:53 2004 # CONFIG_M32R=y CONFIG_UID16=y @@ -12,10 +14,12 @@ # CONFIG_CLEAN_COMPILE is not set CONFIG_BROKEN=y CONFIG_BROKEN_ON_SMP=y +CONFIG_LOCK_KERNEL=y # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set @@ -24,17 +28,20 @@ # CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=15 CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_EMBEDDED=y # CONFIG_KALLSYMS is not set # CONFIG_FUTEX is not set # CONFIG_EPOLL is not set -CONFIG_IOSCHED_NOOP=y -# CONFIG_IOSCHED_AS is not set -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set # # Loadable module support @@ -44,6 +51,7 @@ # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y CONFIG_STOP_MACHINE=y @@ -84,28 +92,24 @@ # CONFIG_NUMA is not set # -# M32R drivers -# -CONFIG_M32RPCC=y -CONFIG_M32R_NE2000=y - -# -# Power management options (ACPI, APM) -# -# CONFIG_PM is not set - -# # Bus options (PCI, PCMCIA, EISA, MCA, ISA) # # CONFIG_PCI is not set # CONFIG_ISA is not set # -# PCMCIA/CardBus support +# PCCARD (PCMCIA/CardBus) support # -CONFIG_PCMCIA=y +CONFIG_PCCARD=y # CONFIG_PCMCIA_DEBUG is not set +# CONFIG_PCMCIA_OBSOLETE is not set +CONFIG_PCMCIA=y + +# +# PC-card bridges +# # CONFIG_TCIC is not set +CONFIG_M32R_PCC=y # # PCI Hotplug Support @@ -213,6 +217,16 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_AS is not set +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # # ATA/ATAPI/MFM/RLL support @@ -231,7 +245,6 @@ # CONFIG_BLK_DEV_IDETAPE is not set # CONFIG_BLK_DEV_IDEFLOPPY is not set # CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set # # IDE chipset support/bugfixes @@ -291,6 +304,9 @@ # 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_IP_TCPDIAG=y +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -310,7 +326,6 @@ # 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 @@ -327,7 +342,48 @@ # CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set # CONFIG_BT is not set -# CONFIG_NETDEVICES is not set +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set + +# +# Ethernet (10 or 100Mbit) +# +# CONFIG_NET_ETHERNET is not set +CONFIG_NE2000=y + +# +# Ethernet (1000 Mbit) +# + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# PCMCIA network device support +# +# CONFIG_NET_PCMCIA is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # # ISDN subsystem @@ -365,6 +421,7 @@ # CONFIG_SERIO_I8042 is not set # CONFIG_SERIO_SERPORT is not set # CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_RAW is not set # # Input Device Drivers @@ -397,7 +454,6 @@ CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -462,6 +518,8 @@ # # USB support # +# CONFIG_USB_ARCH_HAS_HCD is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set # # USB Gadget Support @@ -481,6 +539,7 @@ # CONFIG_MINIX_FS is not set CONFIG_ROMFS_FS=y # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -513,6 +572,7 @@ # CONFIG_DEVFS_DEBUG is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLBFS is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -558,6 +618,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 @@ -629,6 +690,7 @@ # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # diff -Nru a/arch/m32r/mappi/defconfig.up b/arch/m32r/mappi/defconfig.up --- a/arch/m32r/mappi/defconfig.up 2004-11-29 21:22:07 -08:00 +++ b/arch/m32r/mappi/defconfig.up 2004-11-29 21:22:07 -08:00 @@ -1,5 +1,7 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.10-rc1-bk21 +# Fri Nov 12 16:08:55 2004 # CONFIG_M32R=y CONFIG_UID16=y @@ -12,10 +14,12 @@ # CONFIG_CLEAN_COMPILE is not set CONFIG_BROKEN=y CONFIG_BROKEN_ON_SMP=y +CONFIG_LOCK_KERNEL=y # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set @@ -24,17 +28,20 @@ # CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=14 CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_EMBEDDED=y # CONFIG_KALLSYMS is not set # CONFIG_FUTEX is not set # CONFIG_EPOLL is not set -CONFIG_IOSCHED_NOOP=y -# CONFIG_IOSCHED_AS is not set -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set # # Loadable module support @@ -44,6 +51,7 @@ # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # @@ -80,28 +88,24 @@ # CONFIG_SMP is not set # -# M32R drivers -# -CONFIG_M32RPCC=y -CONFIG_M32R_NE2000=y - -# -# Power management options (ACPI, APM) -# -# CONFIG_PM is not set - -# # Bus options (PCI, PCMCIA, EISA, MCA, ISA) # # CONFIG_PCI is not set # CONFIG_ISA is not set # -# PCMCIA/CardBus support +# PCCARD (PCMCIA/CardBus) support # -CONFIG_PCMCIA=y +CONFIG_PCCARD=y # CONFIG_PCMCIA_DEBUG is not set +# CONFIG_PCMCIA_OBSOLETE is not set +CONFIG_PCMCIA=y + +# +# PC-card bridges +# # CONFIG_TCIC is not set +CONFIG_M32R_PCC=y # # PCI Hotplug Support @@ -209,6 +213,16 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_AS is not set +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # # ATA/ATAPI/MFM/RLL support @@ -227,7 +241,6 @@ # CONFIG_BLK_DEV_IDETAPE is not set # CONFIG_BLK_DEV_IDEFLOPPY is not set # CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set # # IDE chipset support/bugfixes @@ -287,6 +300,9 @@ # 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_IP_TCPDIAG=y +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -306,7 +322,6 @@ # 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 @@ -323,7 +338,48 @@ # CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set # CONFIG_BT is not set -# CONFIG_NETDEVICES is not set +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set + +# +# Ethernet (10 or 100Mbit) +# +# CONFIG_NET_ETHERNET is not set +CONFIG_NE2000=y + +# +# Ethernet (1000 Mbit) +# + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# PCMCIA network device support +# +# CONFIG_NET_PCMCIA is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # # ISDN subsystem @@ -361,6 +417,7 @@ # CONFIG_SERIO_I8042 is not set # CONFIG_SERIO_SERPORT is not set # CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_RAW is not set # # Input Device Drivers @@ -393,7 +450,6 @@ CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -458,6 +514,8 @@ # # USB support # +# CONFIG_USB_ARCH_HAS_HCD is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set # # USB Gadget Support @@ -477,6 +535,7 @@ # CONFIG_MINIX_FS is not set CONFIG_ROMFS_FS=y # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -509,6 +568,7 @@ # CONFIG_DEVFS_DEBUG is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLBFS is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -554,6 +614,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 @@ -625,6 +686,7 @@ # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # diff -Nru a/arch/m32r/mappi/dot.gdbinit b/arch/m32r/mappi/dot.gdbinit --- a/arch/m32r/mappi/dot.gdbinit 2004-11-29 21:22:06 -08:00 +++ b/arch/m32r/mappi/dot.gdbinit 2004-11-29 21:22:06 -08:00 @@ -1,9 +1,9 @@ # .gdbinit file -# $Id$ +# $Id: dot.gdbinit.mappi,v 1.4 2004/10/20 02:24:37 takata Exp $ #----- # NOTE: this file is generated by a script, "gen_gdbinit.pl". # (Please type "gen_gdbinit.pl --help" and check the help message). -# $ Id: gen_gdbinit.pl,v 1.8 2004/02/27 07:08:32 takata Exp $ +# $ Id: gen_gdbinit.pl,v 1.12 2004/07/26 09:56:10 takata Exp $ #----- # target platform: mappi @@ -192,11 +192,11 @@ # Set kernel parameters define set_kernel_parameters - set $param = (void*)0x08002000 + set $param = (void*)0x08001000 # INITRD_START - set *(unsigned long *)($param + 0x0010) = 0x082a0000 +# set *(unsigned long *)($param + 0x0010) = 0x08300000 # INITRD_SIZE - set *(unsigned long *)($param + 0x0014) = 0x00000000 +# set *(unsigned long *)($param + 0x0014) = 0x00000000 # M32R_CPUCLK set *(unsigned long *)($param + 0x0018) = 0d360000000 # M32R_BUSCLK @@ -205,14 +205,14 @@ # M32R_TIMER_DIVIDE set *(unsigned long *)($param + 0x0020) = 0d128 - set {char[0x200]}($param + 0x100) = "console=ttyD0,115200n8x root=/dev/nfsroot nfsroot=192.168.0.1:/project/m32r-linux/export/root.x nfsaddrs=192.168.0.101:192.168.0.1:192.168.0.1:255.255.255.0:mappi001 \0" + set {char[0x200]}($param + 0x100) = "console=ttyS0,115200n8x console=tty1 root=/dev/nfsroot nfsroot=192.168.0.1:/project/m32r-linux/export/rootfs nfsaddrs=192.168.0.101:192.168.0.1:192.168.0.1:255.255.255.0:mappi001 \0" end # Boot define boot set_kernel_parameters set $fp = 0 - set $pc=0x08001000 + set $pc = 0x08002000 si c end @@ -236,7 +236,7 @@ file vmlinux target m32rsdi setup -#load_module +#load_modules #set_breakpoints #boot diff -Nru a/arch/m32r/mappi/dot.gdbinit.nommu b/arch/m32r/mappi/dot.gdbinit.nommu --- a/arch/m32r/mappi/dot.gdbinit.nommu 2004-11-29 21:22:07 -08:00 +++ b/arch/m32r/mappi/dot.gdbinit.nommu 2004-11-29 21:22:07 -08:00 @@ -192,7 +192,7 @@ # Set kernel parameters define set_kernel_parameters - set $param = (void*)0x00002000 + set $param = (void*)0x00001000 # INITRD_START #set *(unsigned long *)($param + 0x0010) = 0x082a0000 # INITRD_SIZE @@ -205,14 +205,14 @@ # M32R_TIMER_DIVIDE set *(unsigned long *)($param + 0x0020) = 0d128 - set {char[0x200]}($param + 0x100) = "console=ttyD0,115200n8x root=/dev/nfsroot nfsroot=192.168.0.1:/project/m32r-linux/export/root.bbox-httpd nfsaddrs=192.168.0.101:192.168.0.1:192.168.0.1:255.255.255.0:mappi001 \0" + set {char[0x200]}($param + 0x100) = "console=ttyS0,115200n8x root=/dev/nfsroot nfsroot=192.168.0.1:/project/m32r-linux/export/root.bbox-httpd nfsaddrs=192.168.0.101:192.168.0.1:192.168.0.1:255.255.255.0:mappi001 \0" end # Boot define boot set_kernel_parameters set $fp = 0 - set $pc=0x00001000 + set $pc=0x00002000 set *(long *)0xfffffff4=0x8080 # b load_flat_binary # set *(unsigned char *)0x08001003=0x63 diff -Nru a/arch/m32r/mappi/dot.gdbinit.smp b/arch/m32r/mappi/dot.gdbinit.smp --- a/arch/m32r/mappi/dot.gdbinit.smp 2004-11-29 21:22:06 -08:00 +++ b/arch/m32r/mappi/dot.gdbinit.smp 2004-11-29 21:22:06 -08:00 @@ -269,11 +269,11 @@ # Set kernel parameters define set_kernel_parameters - set $param = (void*)0x08002000 + set $param = (void*)0x08001000 # INITRD_START # set *(unsigned long *)($param + 0x0010) = 0x082a0000 # INITRD_SIZE - set *(unsigned long *)($param + 0x0014) = 0x00000000 +# set *(unsigned long *)($param + 0x0014) = 0x00000000 # M32R_CPUCLK set *(unsigned long *)($param + 0x0018) = 0d160000000 # set *(unsigned long *)($param + 0x0018) = 0d80000000 @@ -284,14 +284,14 @@ # M32R_TIMER_DIVIDE set *(unsigned long *)($param + 0x0020) = 0d128 - set {char[0x200]}($param + 0x100) = "console=tty1 console=ttyD0,115200n8x root=/dev/nfsroot nfsroot=192.168.0.1:/project/m32r-linux/export/root.x nfsaddrs=192.168.0.101:192.168.0.1:192.168.0.1:255.255.255.0:mappi001 \0" + set {char[0x200]}($param + 0x100) = "console=tty1 console=ttyS0,115200n8x root=/dev/nfsroot nfsroot=192.168.0.1:/project/m32r-linux/export/root.x nfsaddrs=192.168.0.101:192.168.0.1:192.168.0.1:255.255.255.0:mappi001 \0" # set {char[0x200]}($param + 0x100) = "console=tty1 root=/dev/nfsroot nfsroot=192.168.0.1:/project/m32r-linux/export/root.x nfsaddrs=192.168.0.101:192.168.0.1:192.168.0.1:255.255.255.0:mappi001 \0" end # Boot define boot set_kernel_parameters - set $pc=0x08001000 + set $pc=0x08002000 set *(unsigned char *)0x08001003=0x03 si c @@ -309,7 +309,7 @@ set *(unsigned long *)0x00eff2f8 = 0x2 x 0x00eff2f8 - set $pc=0x08001000 + set $pc=0x08002000 si c end @@ -320,7 +320,7 @@ ## Boot UP define boot_up set_kernel_parameters - set $pc=0x08001000 + set $pc=0x08002000 si c end diff -Nru a/arch/m32r/mappi2/defconfig.vdec2 b/arch/m32r/mappi2/defconfig.vdec2 --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/m32r/mappi2/defconfig.vdec2 2004-11-29 21:22:09 -08:00 @@ -0,0 +1,698 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.10-rc1-bk21 +# Fri Nov 12 16:08:58 2004 +# +CONFIG_M32R=y +CONFIG_UID16=y +CONFIG_GENERIC_ISA_DMA=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_LOCK_KERNEL=y + +# +# General setup +# +CONFIG_LOCALVERSION="" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y +CONFIG_IKCONFIG=y +# CONFIG_IKCONFIG_PROC is not set +CONFIG_EMBEDDED=y +# CONFIG_KALLSYMS is not set +# CONFIG_FUTEX is not set +# CONFIG_EPOLL is not set +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# 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_MODULE_SRCVERSION_ALL is not set +CONFIG_KMOD=y + +# +# Processor type and features +# +# CONFIG_PLAT_MAPPI is not set +# CONFIG_PLAT_USRV is not set +# CONFIG_PLAT_M32700UT is not set +# CONFIG_PLAT_OPSPUT is not set +# CONFIG_PLAT_OAKS32R is not set +CONFIG_PLAT_MAPPI2=y +# CONFIG_CHIP_M32700 is not set +# CONFIG_CHIP_M32102 is not set +CONFIG_CHIP_VDEC2=y +# CONFIG_CHIP_OPSP is not set +CONFIG_MMU=y +CONFIG_TLB_ENTRIES=16 +CONFIG_ISA_M32R2=y +CONFIG_BUS_CLOCK=50000000 +CONFIG_TIMER_DIVIDE=128 +# CONFIG_CPU_LITTLE_ENDIAN is not set +CONFIG_MEMORY_START=0x08000000 +CONFIG_MEMORY_SIZE=0x01000000 +CONFIG_NOHIGHMEM=y +# CONFIG_DISCONTIGMEM is not set +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set +CONFIG_PREEMPT=y +# CONFIG_HAVE_DEC_LOCK is not set +# CONFIG_SMP is not set + +# +# Bus options (PCI, PCMCIA, EISA, MCA, ISA) +# +# CONFIG_PCI is not set +# CONFIG_ISA is not set + +# +# PCCARD (PCMCIA/CardBus) support +# +CONFIG_PCCARD=y +# CONFIG_PCMCIA_DEBUG is not set +# CONFIG_PCMCIA_OBSOLETE is not set +CONFIG_PCMCIA=y + +# +# PC-card bridges +# +# CONFIG_TCIC is not set +# CONFIG_M32R_CFC is not set + +# +# PCI Hotplug Support +# + +# +# Executable file formats +# +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER 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_DEV_FD is not set +CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +CONFIG_BLK_DEV_NBD=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 +# CONFIG_BLK_DEV_INITRD is not set +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_AS is not set +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y + +# +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=y +CONFIG_BLK_DEV_IDE=y + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_BLK_DEV_IDEDISK=y +# CONFIG_IDEDISK_MULTI_MODE is not set +CONFIG_BLK_DEV_IDECS=y +CONFIG_BLK_DEV_IDECD=m +# CONFIG_BLK_DEV_IDETAPE is not set +# CONFIG_BLK_DEV_IDEFLOPPY is not set +# CONFIG_BLK_DEV_IDESCSI is not set +# CONFIG_IDE_TASK_IOCTL is not set + +# +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=y +# CONFIG_IDE_ARM is not set +# CONFIG_BLK_DEV_IDEDMA is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +CONFIG_SCSI=m +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=m +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=m +# CONFIG_BLK_DEV_SR_VENDOR is not set +CONFIG_CHR_DEV_SG=m + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +CONFIG_SCSI_MULTI_LUN=y +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_QLOGIC_1280_1040 is not set +# CONFIG_SCSI_DEBUG is not set + +# +# PCMCIA SCSI adapter support +# +# CONFIG_PCMCIA_AHA152X is not set +# CONFIG_PCMCIA_FDOMAIN is not set +# CONFIG_PCMCIA_NINJA_SCSI is not set +# CONFIG_PCMCIA_QLOGIC is not set +# CONFIG_PCMCIA_SYM53C500 is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Networking support +# +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +# 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=y +CONFIG_IP_PNP_DHCP=y +# CONFIG_IP_PNP_BOOTP is not set +# CONFIG_IP_PNP_RARP 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_IP_TCPDIAG=y +# CONFIG_IP_TCPDIAG_IPV6 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 + +# +# 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 is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +CONFIG_SMC91X=y +# CONFIG_NE2000 is not set + +# +# Ethernet (1000 Mbit) +# + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# PCMCIA network device support +# +# CONFIG_NET_PCMCIA is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +# CONFIG_PPP is not set +# CONFIG_SLIP 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 is not set +# 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 is not set +CONFIG_SERIO_SERPORT=y +# CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_RAW is not set + +# +# Input Device Drivers +# +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE 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 is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_SERIAL_M32R_SIO=y +CONFIG_SERIAL_M32R_SIO_CONSOLE=y +# CONFIG_SERIAL_M32R_PLDSIO is not set +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_RTC is not set +# CONFIG_GEN_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_AGP is not set +# CONFIG_DRM is not set + +# +# PCMCIA character devices +# +# CONFIG_SYNCLINK_CS is not set +# CONFIG_RAW_DRIVER is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Misc devices +# + +# +# Multimedia devices +# +CONFIG_VIDEO_DEV=y + +# +# Video For Linux +# + +# +# Video Adapters +# +# CONFIG_VIDEO_CPIA is not set +# CONFIG_VIDEO_M32R_AR is not set + +# +# Radio Adapters +# +# CONFIG_RADIO_MAESTRO 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 is not set +CONFIG_DUMMY_CONSOLE=y + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +# CONFIG_USB_ARCH_HAS_HCD is not set +# CONFIG_USB_ARCH_HAS_OHCI 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=m +CONFIG_EXT3_FS_XATTR=y +# CONFIG_EXT3_FS_POSIX_ACL is not set +# CONFIG_EXT3_FS_SECURITY is not set +CONFIG_JBD=m +CONFIG_JBD_DEBUG=y +CONFIG_FS_MBCACHE=y +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_REISERFS_FS_XATTR is not set +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set + +# +# 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=m +CONFIG_MSDOS_FS=m +CONFIG_VFAT_FS=m +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=y +CONFIG_DEVFS_MOUNT=y +# CONFIG_DEVFS_DEBUG is not set +# CONFIG_DEVPTS_FS_XATTR is not set +CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set +# CONFIG_HUGETLB_PAGE is not set +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=y +CONFIG_NFS_V3=y +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set +# CONFIG_NFSD is not set +CONFIG_ROOT_NFS=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +# 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 +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y + +# +# Native Language Support +# +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +# CONFIG_NLS_CODEPAGE_437 is not set +# 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 is not set +# 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 is not set + +# +# Profiling support +# +# CONFIG_PROFILING is not set + +# +# Kernel hacking +# +# CONFIG_DEBUG_KERNEL is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_FRAME_POINTER is not set + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# +# Library routines +# +# CONFIG_CRC_CCITT is not set +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set diff -Nru a/arch/m32r/mappi2/dot.gdbinit.vdec2 b/arch/m32r/mappi2/dot.gdbinit.vdec2 --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/m32r/mappi2/dot.gdbinit.vdec2 2004-11-29 21:22:09 -08:00 @@ -0,0 +1,233 @@ +# .gdbinit file +# $Id: dot.gdbinit.vdec2,v 1.2 2004/11/11 02:03:15 takata Exp $ + +# setting +set width 0d70 +set radix 0d16 +use_debug_dma + +# Initialize SDRAM controller for Mappi +define sdram_init + # SDIR0 + set *(unsigned long *)0x00ef6008=0x00000182 + # SDIR1 + set *(unsigned long *)0x00ef600c=0x00000001 + # Initialize wait + shell sleep 1 + # Ch0-MOD + set *(unsigned long *)0x00ef602c=0x00000020 + # Ch0-TR + set *(unsigned long *)0x00ef6028=0x00041302 + # Ch0-ADR + set *(unsigned long *)0x00ef6020=0x08000004 + # AutoRef On + set *(unsigned long *)0x00ef6004=0x00010705 + # Access enable + set *(unsigned long *)0x00ef6024=0x00000001 +end +document sdram_init + Mappi SDRAM controller initialization + 0x08000000 - 0x0bffffff (64MB) +end + +# Initialize SDRAM controller for Mappi +define sdram_init2 + # SDIR0 + set *(unsigned long *)0x00ef6008=0x00000182 + # Ch0-MOD + set *(unsigned long *)0x00ef602c=0x00000020 + # Ch0-TR + set *(unsigned long *)0x00ef6028=0x00010002 + # Ch0-ADR + set *(unsigned long *)0x00ef6020=0x08000004 + # AutoRef On + set *(unsigned long *)0x00ef6004=0x00010107 + # SDIR1 + set *(unsigned long *)0x00ef600c=0x00000001 + # Initialize wait + shell sleep 1 + # Access enable + set *(unsigned long *)0x00ef6024=0x00000001 + shell sleep 1 +end +document sdram_init + Mappi SDRAM controller initialization + 0x08000000 - 0x0bffffff (64MB) +end + +# Initialize LAN controller for Mappi +define lanc_init + # Set BSEL1 (BSEL3 for the Chaos's bselc) + #set *(unsigned long *)0x00ef5004 = 0x0fff330f + #set *(unsigned long *)0x00ef5004 = 0x01113301 + +# set *(unsigned long *)0x00ef5004 = 0x02011101 +# set *(unsigned long *)0x00ef5004 = 0x04441104 + + # BSEL5 +# set *(unsigned long *)0x00ef5014 = 0x0ccc310c +# set *(unsigned long *)0x00ef5014 = 0x0303310f +# set *(unsigned long *)0x00ef5014 = 0x01011102 -> NG +# set *(unsigned long *)0x00ef5014 = 0x03033103 + + set *(unsigned long *)0x00ef500c = 0x0b0b1304 + set *(unsigned long *)0x00ef5010 = 0x03033302 +# set *(unsigned long *)0x00ef5018 = 0x02223302 +end + +# MMU enable +define mmu_enable + set $evb=0x88000000 + set *(unsigned long *)0xffff0024=1 +end + +# MMU disable +define mmu_disable + set $evb=0 + set *(unsigned long *)0xffff0024=0 +end + +# Show TLB entries +define show_tlb_entries + set $i = 0 + set $addr = $arg0 + while ($i < 0d16 ) + set $tlb_tag = *(unsigned long*)$addr + set $tlb_data = *(unsigned long*)($addr + 4) + printf " [%2d] 0x%08lx : 0x%08lx - 0x%08lx\n", $i, $addr, $tlb_tag, $tlb_data + set $i = $i + 1 + set $addr = $addr + 8 + end +end +define itlb + set $itlb=0xfe000000 + show_tlb_entries $itlb +end +define dtlb + set $dtlb=0xfe000800 + show_tlb_entries $dtlb +end + +# Cache ON +define set_cache_type + set $mctype = (void*)0xfffffff8 +# chaos +# set *(unsigned long *)($mctype) = 0x0000c000 +# m32102 i-cache only + set *(unsigned long *)($mctype) = 0x00008000 +# m32102 d-cache only +# set *(unsigned long *)($mctype) = 0x00004000 +end +define cache_on + set $param = (void*)0x08001000 + set *(unsigned long *)($param) = 0x60ff6102 +end + + +# Show current task structure +define show_current + set $current = $spi & 0xffffe000 + printf "$current=0x%08lX\n",$current + print *(struct task_struct *)$current +end + +# Show user assigned task structure +define show_task + set $task = $arg0 & 0xffffe000 + printf "$task=0x%08lX\n",$task + print *(struct task_struct *)$task +end +document show_task + Show user assigned task structure + arg0 : task structure address +end + +# Show M32R registers +define show_regs + printf " R0[0x%08lX] R1[0x%08lX] R2[0x%08lX] R3[0x%08lX]\n",$r0,$r1,$r2,$r3 + printf " R4[0x%08lX] R5[0x%08lX] R6[0x%08lX] R7[0x%08lX]\n",$r4,$r5,$r6,$r7 + printf " R8[0x%08lX] R9[0x%08lX] R10[0x%08lX] R11[0x%08lX]\n",$r8,$r9,$r10,$r11 + printf "R12[0x%08lX] FP[0x%08lX] LR[0x%08lX] SP[0x%08lX]\n",$r12,$fp,$lr,$sp + printf "PSW[0x%08lX] CBR[0x%08lX] SPI[0x%08lX] SPU[0x%08lX]\n",$psw,$cbr,$spi,$spu + printf "BPC[0x%08lX] PC[0x%08lX] ACCL[0x%08lX] ACCH[0x%08lX]\n",$bpc,$pc,$accl,$acch + printf "EVB[0x%08lX]\n",$evb + + set $mests = *(unsigned long *)0xffff000c + set $mdeva = *(unsigned long *)0xffff0010 + printf "MESTS[0x%08lX] MDEVA[0x%08lX]\n",$mests,$mdeva +end + + +# Setup all +define setup + sdram_init +# lanc_init +# dispc_init +# set $evb=0x08000000 +end + +# Load modules +define load_modules + use_debug_dma + load +# load busybox.mot +end + +# Set kernel parameters +define set_kernel_parameters + set $param = (void*)0x08001000 + + ## MOUNT_ROOT_RDONLY + set {long}($param+0x00)=0 + ## RAMDISK_FLAGS + #set {long}($param+0x04)=0 + ## ORIG_ROOT_DEV + #set {long}($param+0x08)=0x00000100 + ## LOADER_TYPE + #set {long}($param+0x0C)=0 + ## INITRD_START + set {long}($param+0x10)=0x082a0000 + ## INITRD_SIZE + set {long}($param+0x14)=0d6200000 + + # M32R_CPUCLK + set *(unsigned long *)($param + 0x0018) = 0d25000000 + # M32R_BUSCLK + set *(unsigned long *)($param + 0x001c) = 0d25000000 + # M32R_TIMER_DIVIDE + set *(unsigned long *)($param + 0x0020) = 0d128 + + + set {char[0x200]}($param + 0x100) = "console=ttyS0,115200n8x root=/dev/nfsroot nfsroot=192.168.0.1:/project/m32r-linux/export/root.2.6 nfsaddrs=192.168.0.102:192.168.0.1:192.168.0.1:255.255.255.0:mappi: \0" + + +end + +# Boot +define boot + set_kernel_parameters + debug_chaos + set $pc=0x08002000 + set $fp=0 + del b + si +end + +# Restart +define restart + sdireset + sdireset + setup + load_modules + boot +end + +sdireset +sdireset +file vmlinux +target m32rsdi + +restart +boot + + diff -Nru a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c --- a/arch/m32r/mm/fault.c 2004-11-29 21:22:07 -08:00 +++ b/arch/m32r/mm/fault.c 2004-11-29 21:22:07 -08:00 @@ -182,7 +182,7 @@ goto bad_area; } #endif - if (expand_stack(vma, address, NULL)) + if (expand_stack(vma, address)) goto bad_area; /* * Ok, we have a good vm_area for this memory access, so diff -Nru a/arch/m32r/oaks32r/defconfig.nommu b/arch/m32r/oaks32r/defconfig.nommu --- a/arch/m32r/oaks32r/defconfig.nommu 2004-11-29 21:22:06 -08:00 +++ b/arch/m32r/oaks32r/defconfig.nommu 2004-11-29 21:22:06 -08:00 @@ -1,5 +1,7 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.10-rc1-bk21 +# Fri Nov 12 16:09:00 2004 # CONFIG_M32R=y CONFIG_UID16=y @@ -11,10 +13,12 @@ CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y CONFIG_BROKEN_ON_SMP=y +CONFIG_LOCK_KERNEL=y # # General setup # +CONFIG_LOCALVERSION="" # CONFIG_POSIX_MQUEUE is not set CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set @@ -22,16 +26,19 @@ # CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=14 CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y # CONFIG_KALLSYMS is not set # CONFIG_FUTEX is not set # CONFIG_EPOLL is not set -CONFIG_IOSCHED_NOOP=y -# CONFIG_IOSCHED_AS is not set -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set # # Loadable module support @@ -41,6 +48,7 @@ # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # @@ -71,25 +79,19 @@ # CONFIG_SMP is not set # -# M32R drivers -# -CONFIG_M32R_NE2000=y - -# -# Power management options (ACPI, APM) -# -# CONFIG_PM is not set - -# # Bus options (PCI, PCMCIA, EISA, MCA, ISA) # # CONFIG_PCI is not set # CONFIG_ISA is not set # -# PCMCIA/CardBus support +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# PC-card bridges # -# CONFIG_PCMCIA is not set # # PCI Hotplug Support @@ -138,6 +140,16 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 # CONFIG_BLK_DEV_INITRD is not set +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_AS is not set +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # # ATA/ATAPI/MFM/RLL support @@ -193,6 +205,9 @@ # 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_IP_TCPDIAG=y +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -212,7 +227,6 @@ # 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 @@ -229,7 +243,43 @@ # CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set # CONFIG_BT is not set -# CONFIG_NETDEVICES is not set +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set + +# +# Ethernet (10 or 100Mbit) +# +# CONFIG_NET_ETHERNET is not set +CONFIG_NE2000=y + +# +# Ethernet (1000 Mbit) +# + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # # ISDN subsystem @@ -264,6 +314,7 @@ # CONFIG_SERIO_I8042 is not set CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_RAW is not set # # Input Device Drivers @@ -296,7 +347,6 @@ CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -356,6 +406,8 @@ # # USB support # +# CONFIG_USB_ARCH_HAS_HCD is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set # # USB Gadget Support @@ -375,6 +427,7 @@ # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -435,6 +488,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 @@ -506,6 +560,7 @@ # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # diff -Nru a/arch/m32r/oaks32r/dot.gdbinit.nommu b/arch/m32r/oaks32r/dot.gdbinit.nommu --- a/arch/m32r/oaks32r/dot.gdbinit.nommu 2004-11-29 21:22:06 -08:00 +++ b/arch/m32r/oaks32r/dot.gdbinit.nommu 2004-11-29 21:22:06 -08:00 @@ -1,9 +1,9 @@ # .gdbinit file -# $Id: dot.gdbinit.oaks32r,v 1.2 2004/04/15 02:33:14 takata Exp $ +# $Id: dot.gdbinit.oaks32r,v 1.4 2004/10/20 02:24:37 takata Exp $ #----- # NOTE: this file is generated by a script, "gen_gdbinit.pl". # (Please type "gen_gdbinit.pl --help" and check the help message). -# $ Id: gen_gdbinit.pl,v 1.10 2004/04/15 02:10:45 takata Exp $ +# $ Id: gen_gdbinit.pl,v 1.12 2004/07/26 09:56:10 takata Exp $ #----- # target platform: oaks32r @@ -103,11 +103,11 @@ # Set kernel parameters define set_kernel_parameters - set $param = (void*)0x01002000 + set $param = (void*)0x01001000 # INITRD_START - set *(unsigned long *)($param + 0x0010) = 0x00000000 +# set *(unsigned long *)($param + 0x0010) = 0x00000000 # INITRD_SIZE - set *(unsigned long *)($param + 0x0014) = 0x00000000 +# set *(unsigned long *)($param + 0x0014) = 0x00000000 # M32R_CPUCLK set *(unsigned long *)($param + 0x0018) = 0d66666667 # M32R_BUSCLK @@ -116,15 +116,14 @@ # M32R_TIMER_DIVIDE set *(unsigned long *)($param + 0x0020) = 0d128 -# set {char[0x200]}($param + 0x100) = "console=ttyD0,115200n8x root=/dev/nfsroot nfsroot=192.168.0.1:/project/m32r-linux/export/rootfs nfsaddrs=192.168.0.101:192.168.0.1:192.168.0.1:255.255.255.0:mappi001 \0" - set {char[0x200]}($param + 0x100) = "console=ttyD0,115200n8x root=/dev/nfsroot nfsroot=192.168.0.1:/project/m32r-linux/export/root.busybox.flat nfsaddrs=192.168.0.101:192.168.0.1:192.168.0.1:255.255.255.0:mappi001 \0" + set {char[0x200]}($param + 0x100) = "console=ttyS0,115200n8x root=/dev/nfsroot nfsroot=192.168.0.1:/project/m32r-linux/export/rootfs nfsaddrs=192.168.0.101:192.168.0.1:192.168.0.1:255.255.255.0:mappi001 \0" end # Boot define boot set_kernel_parameters set $fp = 0 - set $pc = 0x01001000 + set $pc = 0x01002000 si c end diff -Nru a/arch/m32r/opsput/defconfig.opsput b/arch/m32r/opsput/defconfig.opsput --- a/arch/m32r/opsput/defconfig.opsput 2004-11-29 21:22:07 -08:00 +++ b/arch/m32r/opsput/defconfig.opsput 2004-11-29 21:22:07 -08:00 @@ -1,5 +1,7 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.10-rc1-bk21 +# Fri Nov 12 16:09:02 2004 # CONFIG_M32R=y CONFIG_UID16=y @@ -15,6 +17,7 @@ # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set @@ -24,17 +27,20 @@ # CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=14 CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y CONFIG_IKCONFIG=y # CONFIG_IKCONFIG_PROC is not set CONFIG_EMBEDDED=y # CONFIG_KALLSYMS is not set # CONFIG_FUTEX is not set # CONFIG_EPOLL is not set -CONFIG_IOSCHED_NOOP=y -# CONFIG_IOSCHED_AS is not set -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set # # Loadable module support @@ -44,6 +50,7 @@ # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # @@ -77,29 +84,25 @@ # CONFIG_SMP is not set # -# M32R drivers -# -# CONFIG_M32R_CFC is not set -CONFIG_M32R_SMC91111=y -CONFIG_M32700UT_DS1302=y - -# -# Power management options (ACPI, APM) -# -# CONFIG_PM is not set - -# # Bus options (PCI, PCMCIA, EISA, MCA, ISA) # # CONFIG_PCI is not set # CONFIG_ISA is not set # -# PCMCIA/CardBus support +# PCCARD (PCMCIA/CardBus) support # -CONFIG_PCMCIA=y +CONFIG_PCCARD=y # CONFIG_PCMCIA_DEBUG is not set +# CONFIG_PCMCIA_OBSOLETE is not set +CONFIG_PCMCIA=y + +# +# PC-card bridges +# # CONFIG_TCIC is not set +CONFIG_M32R_CFC=y +CONFIG_M32R_CFC_NUM=1 # # PCI Hotplug Support @@ -147,6 +150,16 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 # CONFIG_BLK_DEV_INITRD is not set +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_AS is not set +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # # ATA/ATAPI/MFM/RLL support @@ -185,9 +198,8 @@ # # SCSI low-level drivers # -# CONFIG_SCSI_AIC7XXX_OLD is not set # CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_EATA_PIO is not set +# CONFIG_SCSI_QLOGIC_1280_1040 is not set # CONFIG_SCSI_DEBUG is not set # @@ -243,6 +255,9 @@ # 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_IP_TCPDIAG=y +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -262,7 +277,6 @@ # 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 @@ -279,7 +293,50 @@ # CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set # CONFIG_BT is not set -# CONFIG_NETDEVICES is not set +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +CONFIG_SMC91X=y +# CONFIG_NE2000 is not set + +# +# Ethernet (1000 Mbit) +# + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# PCMCIA network device support +# +# CONFIG_NET_PCMCIA is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # # ISDN subsystem @@ -314,6 +371,7 @@ # CONFIG_SERIO_I8042 is not set CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_RAW is not set # # Input Device Drivers @@ -340,13 +398,12 @@ # CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_M32R_SIO is not set +CONFIG_SERIAL_M32R_SIO=y +CONFIG_SERIAL_M32R_SIO_CONSOLE=y CONFIG_SERIAL_M32R_PLDSIO=y -CONFIG_SERIAL_M32R_PLDSIO_CONSOLE=y CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -359,6 +416,7 @@ # CONFIG_WATCHDOG is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set +CONFIG_DS1302=y # CONFIG_DTLK is not set # CONFIG_R3964 is not set @@ -411,6 +469,8 @@ # # USB support # +# CONFIG_USB_ARCH_HAS_HCD is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set # # USB Gadget Support @@ -438,6 +498,7 @@ # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -471,6 +532,7 @@ # CONFIG_DEVFS_DEBUG is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -505,6 +567,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 @@ -583,6 +646,7 @@ # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # diff -Nru a/arch/m32r/opsput/dot.gdbinit b/arch/m32r/opsput/dot.gdbinit --- a/arch/m32r/opsput/dot.gdbinit 2004-11-29 21:22:07 -08:00 +++ b/arch/m32r/opsput/dot.gdbinit 2004-11-29 21:22:07 -08:00 @@ -7,6 +7,39 @@ set height 0 debug_chaos +# clk xin:cpu:bus=1:8:1 +define clock_init_on_181 + set *(unsigned long *)0x00ef400c = 0x2 + set *(unsigned long *)0x00ef4004 = 0x1 + shell sleep 0.1 + set *(unsigned long *)0x00ef4000 = 0x101 +end +# clk xin:cpu:bus=1:8:2 +define clock_init_on_182 + set *(unsigned long *)0x00ef400c = 0x1 + set *(unsigned long *)0x00ef4004 = 0x1 + shell sleep 0.1 + set *(unsigned long *)0x00ef4000 = 0x101 +end + +# clk xin:cpu:bus=1:8:4 +define clock_init_on_184 + set *(unsigned long *)0x00ef400c = 0x0 + set *(unsigned long *)0x00ef4004 = 0x1 + shell sleep 0.1 + set *(unsigned long *)0x00ef4000 = 0x101 +end + +# clk xin:cpu:bus=1:1:1 +define clock_init_off + shell sleep 0.1 + set *(unsigned long *)0x00ef4000 = 0x0 + shell sleep 0.1 + set *(unsigned long *)0x00ef4004 = 0x0 + shell sleep 0.1 + set *(unsigned long *)0x00ef400c = 0x0 +end + define tlb_init set $tlbbase = 0xfe000000 set *(unsigned long *)($tlbbase + 0x04) = 0x0 @@ -83,7 +116,7 @@ # Set kernel parameters define set_kernel_parameters - set $param = (void*)0x88002000 + set $param = (void*)0x88001000 # INITRD_START # set *(unsigned long *)($param + 0x0010) = 0x08300000 # INITRD_SIZE @@ -97,7 +130,7 @@ # M32R_TIMER_DIVIDE set *(unsigned long *)($param + 0x0020) = 0d128 - set {char[0x200]}($param + 0x100) = "console=ttyD0,115200n8x\ + set {char[0x200]}($param + 0x100) = "console=ttyS0,115200n8x console=tty1 \ root=/dev/nfsroot \ nfsroot=192.168.0.1:/project/m32r-linux/export/root.2.6 \ nfsaddrs=192.168.0.101:192.168.0.1:192.168.0.1:255.255.255.0:mappi001 \ @@ -106,16 +139,11 @@ define boot set_kernel_parameters - set $pc=0x88001000 + set $pc=0x88002000 set $fp=0 set $evb=0x88000000 - # I/D-Cache ON - -# IPI -# set *(long *)0x00eff2f8 = 0x2 - set $fp=0 -# set *(unsigned long *)0xa0ef4000 = 0x100 si + c end # Show TLB entries @@ -151,11 +179,29 @@ printf "EVB[%08lx]\n",$evb end +define restart + sdireset + sdireset + en 1 + set $pc=0x0 + c + tlb_init + setup + load_modules + boot +end + define setup debug_chaos +# Clock +# shell sleep 0.1 +# clock_init_off +# shell sleep 1 +# clock_init_on_182 +# shell sleep 0.1 +# SDRAM set *(unsigned long *)0xa0ef6004 = 0x0001053f set *(unsigned long *)0xa0ef6028 = 0x00031102 -# set *(unsigned long *)0xa0ef400c = 0x2 end sdireset @@ -165,16 +211,8 @@ set $pc=0x0 b *0x30000 c +dis 1 setup tlb_init load_modules -#set *(long *)0xa0ef4000=0x101 -#set *(long *)0xa0ef400c=0x002 - boot -#b tme_handler -b *0x88000020 - - - - diff -Nru a/arch/m68k/configs/amiga_defconfig b/arch/m68k/configs/amiga_defconfig --- a/arch/m68k/configs/amiga_defconfig 2004-11-29 21:22:07 -08:00 +++ b/arch/m68k/configs/amiga_defconfig 2004-11-29 21:22:07 -08:00 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-m68k -# Thu Oct 28 21:22:56 2004 +# Linux kernel version: 2.6.10-rc2-m68k +# Mon Nov 15 12:46:49 2004 # CONFIG_M68K=y CONFIG_MMU=y @@ -28,6 +28,7 @@ CONFIG_AUDIT=y CONFIG_LOG_BUF_SHIFT=16 # CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y @@ -35,12 +36,12 @@ # 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_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set # @@ -51,6 +52,7 @@ # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # @@ -137,6 +139,18 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_CDROM_PKTCDVD=m +CONFIG_CDROM_PKTCDVD_BUFFERS=8 +# CONFIG_CDROM_PKTCDVD_WCACHE is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # # ATA/ATAPI/MFM/RLL support @@ -155,7 +169,6 @@ 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 @@ -253,6 +266,7 @@ CONFIG_MD_RAID5=m CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m +# CONFIG_MD_FAULTY is not set CONFIG_BLK_DEV_DM=m CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m @@ -296,6 +310,8 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_TUNNEL=m +CONFIG_IP_TCPDIAG=m +CONFIG_IP_TCPDIAG_IPV6=y # # IP: Virtual Server Configuration @@ -316,6 +332,7 @@ # CONFIG_IP_NF_CONNTRACK=m # CONFIG_IP_NF_CT_ACCT is not set +CONFIG_IP_NF_CONNTRACK_MARK=y # CONFIG_IP_NF_CT_PROTO_SCTP is not set CONFIG_IP_NF_FTP=m CONFIG_IP_NF_IRC=m @@ -345,6 +362,8 @@ CONFIG_IP_NF_MATCH_REALM=m # CONFIG_IP_NF_MATCH_SCTP is not set # CONFIG_IP_NF_MATCH_COMMENT is not set +CONFIG_IP_NF_MATCH_CONNMARK=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m CONFIG_IP_NF_FILTER=m CONFIG_IP_NF_TARGET_REJECT=m CONFIG_IP_NF_TARGET_LOG=m @@ -368,6 +387,8 @@ CONFIG_IP_NF_TARGET_DSCP=m CONFIG_IP_NF_TARGET_MARK=m CONFIG_IP_NF_TARGET_CLASSIFY=m +CONFIG_IP_NF_TARGET_CONNMARK=m +# CONFIG_IP_NF_TARGET_CLUSTERIP is not set CONFIG_IP_NF_RAW=m CONFIG_IP_NF_TARGET_NOTRACK=m CONFIG_IP_NF_ARPTABLES=m @@ -426,7 +447,6 @@ # 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 @@ -661,6 +681,7 @@ # CONFIG_FB=y CONFIG_FB_MODE_HELPERS=y +# CONFIG_FB_TILEBLITTING is not set CONFIG_FB_CIRRUS=m CONFIG_FB_AMIGA=y CONFIG_FB_AMIGA_OCS=y @@ -697,6 +718,8 @@ # # USB support # +# CONFIG_USB_ARCH_HAS_HCD is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set # # USB Gadget Support @@ -740,6 +763,7 @@ # CONFIG_QFMT_V1 is not set # CONFIG_QFMT_V2 is not set CONFIG_QUOTACTL=y +CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m @@ -772,6 +796,7 @@ # CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -833,6 +858,7 @@ # # CONFIG_PARTITION_ADVANCED is not set CONFIG_AMIGA_PARTITION=y +CONFIG_MSDOS_PARTITION=y # # Native Language Support @@ -883,13 +909,16 @@ # CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_DEBUG_INFO is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -914,6 +943,7 @@ CONFIG_CRYPTO_TEA=m CONFIG_CRYPTO_ARC4=m CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_ANUBIS=m CONFIG_CRYPTO_DEFLATE=m CONFIG_CRYPTO_MICHAEL_MIC=m CONFIG_CRYPTO_CRC32C=m diff -Nru a/arch/m68k/configs/apollo_defconfig b/arch/m68k/configs/apollo_defconfig --- a/arch/m68k/configs/apollo_defconfig 2004-11-29 21:22:08 -08:00 +++ b/arch/m68k/configs/apollo_defconfig 2004-11-29 21:22:08 -08:00 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-m68k -# Thu Oct 28 21:22:58 2004 +# Linux kernel version: 2.6.10-rc2-m68k +# Mon Nov 15 12:47:18 2004 # CONFIG_M68K=y CONFIG_MMU=y @@ -28,6 +28,7 @@ CONFIG_AUDIT=y CONFIG_LOG_BUF_SHIFT=16 # CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y @@ -35,12 +36,12 @@ # 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_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set # @@ -51,6 +52,7 @@ # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # @@ -122,6 +124,18 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_CDROM_PKTCDVD=m +CONFIG_CDROM_PKTCDVD_BUFFERS=8 +# CONFIG_CDROM_PKTCDVD_WCACHE is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # # ATA/ATAPI/MFM/RLL support @@ -175,6 +189,7 @@ CONFIG_MD_RAID5=m CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m +# CONFIG_MD_FAULTY is not set CONFIG_BLK_DEV_DM=m CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m @@ -221,6 +236,8 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_TUNNEL=m +CONFIG_IP_TCPDIAG=m +CONFIG_IP_TCPDIAG_IPV6=y # # IP: Virtual Server Configuration @@ -241,6 +258,7 @@ # CONFIG_IP_NF_CONNTRACK=m # CONFIG_IP_NF_CT_ACCT is not set +CONFIG_IP_NF_CONNTRACK_MARK=y # CONFIG_IP_NF_CT_PROTO_SCTP is not set CONFIG_IP_NF_FTP=m CONFIG_IP_NF_IRC=m @@ -270,6 +288,8 @@ CONFIG_IP_NF_MATCH_REALM=m # CONFIG_IP_NF_MATCH_SCTP is not set # CONFIG_IP_NF_MATCH_COMMENT is not set +CONFIG_IP_NF_MATCH_CONNMARK=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m CONFIG_IP_NF_FILTER=m CONFIG_IP_NF_TARGET_REJECT=m CONFIG_IP_NF_TARGET_LOG=m @@ -293,6 +313,8 @@ CONFIG_IP_NF_TARGET_DSCP=m CONFIG_IP_NF_TARGET_MARK=m CONFIG_IP_NF_TARGET_CLASSIFY=m +CONFIG_IP_NF_TARGET_CONNMARK=m +# CONFIG_IP_NF_TARGET_CLUSTERIP is not set CONFIG_IP_NF_RAW=m CONFIG_IP_NF_TARGET_NOTRACK=m CONFIG_IP_NF_ARPTABLES=m @@ -351,7 +373,6 @@ # 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 @@ -556,6 +577,8 @@ # # USB support # +# CONFIG_USB_ARCH_HAS_HCD is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set # # USB Gadget Support @@ -597,6 +620,7 @@ # CONFIG_QFMT_V1 is not set # CONFIG_QFMT_V2 is not set CONFIG_QUOTACTL=y +CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m @@ -629,6 +653,7 @@ # CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -741,13 +766,16 @@ # CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_DEBUG_INFO is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -772,6 +800,7 @@ CONFIG_CRYPTO_TEA=m CONFIG_CRYPTO_ARC4=m CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_ANUBIS=m CONFIG_CRYPTO_DEFLATE=m CONFIG_CRYPTO_MICHAEL_MIC=m CONFIG_CRYPTO_CRC32C=m diff -Nru a/arch/m68k/configs/atari_defconfig b/arch/m68k/configs/atari_defconfig --- a/arch/m68k/configs/atari_defconfig 2004-11-29 21:22:07 -08:00 +++ b/arch/m68k/configs/atari_defconfig 2004-11-29 21:22:07 -08:00 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-m68k -# Thu Oct 28 21:23:00 2004 +# Linux kernel version: 2.6.10-rc2-m68k +# Mon Nov 15 12:48:18 2004 # CONFIG_M68K=y CONFIG_MMU=y @@ -28,6 +28,7 @@ CONFIG_AUDIT=y CONFIG_LOG_BUF_SHIFT=16 # CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y @@ -35,12 +36,12 @@ # 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_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set # @@ -51,6 +52,7 @@ # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # @@ -129,6 +131,18 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_CDROM_PKTCDVD=m +CONFIG_CDROM_PKTCDVD_BUFFERS=8 +# CONFIG_CDROM_PKTCDVD_WCACHE is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # # ATA/ATAPI/MFM/RLL support @@ -147,7 +161,6 @@ 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 @@ -208,6 +221,7 @@ CONFIG_MD_RAID5=m CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m +# CONFIG_MD_FAULTY is not set CONFIG_BLK_DEV_DM=m CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m @@ -251,6 +265,8 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_TUNNEL=m +CONFIG_IP_TCPDIAG=m +CONFIG_IP_TCPDIAG_IPV6=y # # IP: Virtual Server Configuration @@ -271,6 +287,7 @@ # CONFIG_IP_NF_CONNTRACK=m # CONFIG_IP_NF_CT_ACCT is not set +CONFIG_IP_NF_CONNTRACK_MARK=y # CONFIG_IP_NF_CT_PROTO_SCTP is not set CONFIG_IP_NF_FTP=m CONFIG_IP_NF_IRC=m @@ -300,6 +317,8 @@ CONFIG_IP_NF_MATCH_REALM=m # CONFIG_IP_NF_MATCH_SCTP is not set # CONFIG_IP_NF_MATCH_COMMENT is not set +CONFIG_IP_NF_MATCH_CONNMARK=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m CONFIG_IP_NF_FILTER=m CONFIG_IP_NF_TARGET_REJECT=m CONFIG_IP_NF_TARGET_LOG=m @@ -323,6 +342,8 @@ CONFIG_IP_NF_TARGET_DSCP=m CONFIG_IP_NF_TARGET_MARK=m CONFIG_IP_NF_TARGET_CLASSIFY=m +CONFIG_IP_NF_TARGET_CONNMARK=m +# CONFIG_IP_NF_TARGET_CLUSTERIP is not set CONFIG_IP_NF_RAW=m CONFIG_IP_NF_TARGET_NOTRACK=m CONFIG_IP_NF_ARPTABLES=m @@ -381,7 +402,6 @@ # 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 @@ -410,7 +430,8 @@ # # Ethernet (10 or 100Mbit) # -# CONFIG_NET_ETHERNET is not set +CONFIG_NET_ETHERNET=y +CONFIG_MII=m CONFIG_ATARILANCE=m # @@ -581,6 +602,7 @@ # CONFIG_FB=y CONFIG_FB_MODE_HELPERS=y +# CONFIG_FB_TILEBLITTING is not set # CONFIG_FB_ATY is not set # CONFIG_FB_VIRTUAL is not set @@ -608,6 +630,8 @@ # # USB support # +# CONFIG_USB_ARCH_HAS_HCD is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set # # USB Gadget Support @@ -652,6 +676,7 @@ # CONFIG_QFMT_V1 is not set # CONFIG_QFMT_V2 is not set CONFIG_QUOTACTL=y +CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m @@ -684,6 +709,7 @@ # CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -744,6 +770,7 @@ # # CONFIG_PARTITION_ADVANCED is not set CONFIG_ATARI_PARTITION=y +CONFIG_MSDOS_PARTITION=y # # Native Language Support @@ -794,13 +821,16 @@ # CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_DEBUG_INFO is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -825,6 +855,7 @@ CONFIG_CRYPTO_TEA=m CONFIG_CRYPTO_ARC4=m CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_ANUBIS=m CONFIG_CRYPTO_DEFLATE=m CONFIG_CRYPTO_MICHAEL_MIC=m CONFIG_CRYPTO_CRC32C=m diff -Nru a/arch/m68k/configs/bvme6000_defconfig b/arch/m68k/configs/bvme6000_defconfig --- a/arch/m68k/configs/bvme6000_defconfig 2004-11-29 21:22:08 -08:00 +++ b/arch/m68k/configs/bvme6000_defconfig 2004-11-29 21:22:08 -08:00 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-m68k -# Thu Oct 28 21:23:01 2004 +# Linux kernel version: 2.6.10-rc2-m68k +# Mon Nov 15 12:48:27 2004 # CONFIG_M68K=y CONFIG_MMU=y @@ -28,6 +28,7 @@ CONFIG_AUDIT=y CONFIG_LOG_BUF_SHIFT=16 # CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y @@ -35,12 +36,12 @@ # 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_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set # @@ -51,6 +52,7 @@ # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # @@ -122,6 +124,18 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_CDROM_PKTCDVD=m +CONFIG_CDROM_PKTCDVD_BUFFERS=8 +# CONFIG_CDROM_PKTCDVD_WCACHE is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # # ATA/ATAPI/MFM/RLL support @@ -175,6 +189,7 @@ CONFIG_MD_RAID5=m CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m +# CONFIG_MD_FAULTY is not set CONFIG_BLK_DEV_DM=m CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m @@ -221,6 +236,8 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_TUNNEL=m +CONFIG_IP_TCPDIAG=m +CONFIG_IP_TCPDIAG_IPV6=y # # IP: Virtual Server Configuration @@ -241,6 +258,7 @@ # CONFIG_IP_NF_CONNTRACK=m # CONFIG_IP_NF_CT_ACCT is not set +CONFIG_IP_NF_CONNTRACK_MARK=y # CONFIG_IP_NF_CT_PROTO_SCTP is not set CONFIG_IP_NF_FTP=m CONFIG_IP_NF_IRC=m @@ -270,6 +288,8 @@ CONFIG_IP_NF_MATCH_REALM=m # CONFIG_IP_NF_MATCH_SCTP is not set # CONFIG_IP_NF_MATCH_COMMENT is not set +CONFIG_IP_NF_MATCH_CONNMARK=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m CONFIG_IP_NF_FILTER=m CONFIG_IP_NF_TARGET_REJECT=m CONFIG_IP_NF_TARGET_LOG=m @@ -293,6 +313,8 @@ CONFIG_IP_NF_TARGET_DSCP=m CONFIG_IP_NF_TARGET_MARK=m CONFIG_IP_NF_TARGET_CLASSIFY=m +CONFIG_IP_NF_TARGET_CONNMARK=m +# CONFIG_IP_NF_TARGET_CLUSTERIP is not set CONFIG_IP_NF_RAW=m CONFIG_IP_NF_TARGET_NOTRACK=m CONFIG_IP_NF_ARPTABLES=m @@ -350,7 +372,6 @@ # 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 @@ -555,6 +576,8 @@ # # USB support # +# CONFIG_USB_ARCH_HAS_HCD is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set # # USB Gadget Support @@ -596,6 +619,7 @@ # CONFIG_QFMT_V1 is not set # CONFIG_QFMT_V2 is not set CONFIG_QUOTACTL=y +CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m @@ -628,6 +652,7 @@ # CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -740,13 +765,16 @@ # CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_DEBUG_INFO is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -771,6 +799,7 @@ CONFIG_CRYPTO_TEA=m CONFIG_CRYPTO_ARC4=m CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_ANUBIS=m CONFIG_CRYPTO_DEFLATE=m CONFIG_CRYPTO_MICHAEL_MIC=m CONFIG_CRYPTO_CRC32C=m diff -Nru a/arch/m68k/configs/hp300_defconfig b/arch/m68k/configs/hp300_defconfig --- a/arch/m68k/configs/hp300_defconfig 2004-11-29 21:22:08 -08:00 +++ b/arch/m68k/configs/hp300_defconfig 2004-11-29 21:22:08 -08:00 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-m68k -# Thu Oct 28 21:23:04 2004 +# Linux kernel version: 2.6.10-rc2-m68k +# Mon Nov 15 12:48:53 2004 # CONFIG_M68K=y CONFIG_MMU=y @@ -28,6 +28,7 @@ CONFIG_AUDIT=y CONFIG_LOG_BUF_SHIFT=16 # CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y @@ -35,12 +36,12 @@ # 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_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set # @@ -51,6 +52,7 @@ # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # @@ -63,7 +65,7 @@ # CONFIG_APOLLO is not set # CONFIG_VME is not set CONFIG_HP300=y -# CONFIG_DIO is not set +CONFIG_DIO=y # CONFIG_SUN3X is not set # CONFIG_Q40 is not set @@ -123,6 +125,18 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_CDROM_PKTCDVD=m +CONFIG_CDROM_PKTCDVD_BUFFERS=8 +# CONFIG_CDROM_PKTCDVD_WCACHE is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # # ATA/ATAPI/MFM/RLL support @@ -176,6 +190,7 @@ CONFIG_MD_RAID5=m CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m +# CONFIG_MD_FAULTY is not set CONFIG_BLK_DEV_DM=m CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m @@ -222,6 +237,8 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_TUNNEL=m +CONFIG_IP_TCPDIAG=m +CONFIG_IP_TCPDIAG_IPV6=y # # IP: Virtual Server Configuration @@ -242,6 +259,7 @@ # CONFIG_IP_NF_CONNTRACK=m # CONFIG_IP_NF_CT_ACCT is not set +CONFIG_IP_NF_CONNTRACK_MARK=y # CONFIG_IP_NF_CT_PROTO_SCTP is not set CONFIG_IP_NF_FTP=m CONFIG_IP_NF_IRC=m @@ -271,6 +289,8 @@ CONFIG_IP_NF_MATCH_REALM=m # CONFIG_IP_NF_MATCH_SCTP is not set # CONFIG_IP_NF_MATCH_COMMENT is not set +CONFIG_IP_NF_MATCH_CONNMARK=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m CONFIG_IP_NF_FILTER=m CONFIG_IP_NF_TARGET_REJECT=m CONFIG_IP_NF_TARGET_LOG=m @@ -294,6 +314,8 @@ CONFIG_IP_NF_TARGET_DSCP=m CONFIG_IP_NF_TARGET_MARK=m CONFIG_IP_NF_TARGET_CLASSIFY=m +CONFIG_IP_NF_TARGET_CONNMARK=m +# CONFIG_IP_NF_TARGET_CLUSTERIP is not set CONFIG_IP_NF_RAW=m CONFIG_IP_NF_TARGET_NOTRACK=m CONFIG_IP_NF_ARPTABLES=m @@ -352,7 +374,6 @@ # 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 @@ -383,7 +404,7 @@ # CONFIG_NET_ETHERNET=y CONFIG_MII=m -# CONFIG_HPLANCE is not set +CONFIG_HPLANCE=y # # Ethernet (1000 Mbit) @@ -557,6 +578,8 @@ # # USB support # +# CONFIG_USB_ARCH_HAS_HCD is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set # # USB Gadget Support @@ -596,6 +619,7 @@ # CONFIG_QFMT_V1 is not set # CONFIG_QFMT_V2 is not set CONFIG_QUOTACTL=y +CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m @@ -628,6 +652,7 @@ # CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -740,13 +765,16 @@ # CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_DEBUG_INFO is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -771,6 +799,7 @@ CONFIG_CRYPTO_TEA=m CONFIG_CRYPTO_ARC4=m CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_ANUBIS=m CONFIG_CRYPTO_DEFLATE=m CONFIG_CRYPTO_MICHAEL_MIC=m CONFIG_CRYPTO_CRC32C=m diff -Nru a/arch/m68k/configs/mac_defconfig b/arch/m68k/configs/mac_defconfig --- a/arch/m68k/configs/mac_defconfig 2004-11-29 21:22:08 -08:00 +++ b/arch/m68k/configs/mac_defconfig 2004-11-29 21:22:08 -08:00 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-m68k -# Thu Oct 28 21:23:06 2004 +# Linux kernel version: 2.6.10-rc2-m68k +# Mon Nov 15 12:49:04 2004 # CONFIG_M68K=y CONFIG_MMU=y @@ -28,6 +28,7 @@ CONFIG_AUDIT=y CONFIG_LOG_BUF_SHIFT=16 # CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y @@ -35,12 +36,12 @@ # 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_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set # @@ -51,6 +52,7 @@ # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # @@ -124,6 +126,18 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_CDROM_PKTCDVD=m +CONFIG_CDROM_PKTCDVD_BUFFERS=8 +# CONFIG_CDROM_PKTCDVD_WCACHE is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # # ATA/ATAPI/MFM/RLL support @@ -142,7 +156,6 @@ 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 @@ -203,6 +216,7 @@ CONFIG_MD_RAID5=m CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m +# CONFIG_MD_FAULTY is not set CONFIG_BLK_DEV_DM=m CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m @@ -258,6 +272,8 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_TUNNEL=m +CONFIG_IP_TCPDIAG=m +CONFIG_IP_TCPDIAG_IPV6=y # # IP: Virtual Server Configuration @@ -278,6 +294,7 @@ # CONFIG_IP_NF_CONNTRACK=m # CONFIG_IP_NF_CT_ACCT is not set +CONFIG_IP_NF_CONNTRACK_MARK=y # CONFIG_IP_NF_CT_PROTO_SCTP is not set CONFIG_IP_NF_FTP=m CONFIG_IP_NF_IRC=m @@ -307,6 +324,8 @@ CONFIG_IP_NF_MATCH_REALM=m # CONFIG_IP_NF_MATCH_SCTP is not set # CONFIG_IP_NF_MATCH_COMMENT is not set +CONFIG_IP_NF_MATCH_CONNMARK=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m CONFIG_IP_NF_FILTER=m CONFIG_IP_NF_TARGET_REJECT=m CONFIG_IP_NF_TARGET_LOG=m @@ -330,6 +349,8 @@ CONFIG_IP_NF_TARGET_DSCP=m CONFIG_IP_NF_TARGET_MARK=m CONFIG_IP_NF_TARGET_CLASSIFY=m +CONFIG_IP_NF_TARGET_CONNMARK=m +# CONFIG_IP_NF_TARGET_CLUSTERIP is not set CONFIG_IP_NF_RAW=m CONFIG_IP_NF_TARGET_NOTRACK=m CONFIG_IP_NF_ARPTABLES=m @@ -391,7 +412,6 @@ # 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 @@ -587,6 +607,7 @@ # CONFIG_FB=y CONFIG_FB_MODE_HELPERS=y +# CONFIG_FB_TILEBLITTING is not set CONFIG_FB_VALKYRIE=y CONFIG_FB_MAC=y # CONFIG_FB_VIRTUAL is not set @@ -618,6 +639,8 @@ # # USB support # +# CONFIG_USB_ARCH_HAS_HCD is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set # # USB Gadget Support @@ -661,6 +684,7 @@ # CONFIG_QFMT_V1 is not set # CONFIG_QFMT_V2 is not set CONFIG_QUOTACTL=y +CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m @@ -693,6 +717,7 @@ # CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -819,13 +844,16 @@ # CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_DEBUG_INFO is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -850,6 +878,7 @@ CONFIG_CRYPTO_TEA=m CONFIG_CRYPTO_ARC4=m CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_ANUBIS=m CONFIG_CRYPTO_DEFLATE=m CONFIG_CRYPTO_MICHAEL_MIC=m CONFIG_CRYPTO_CRC32C=m diff -Nru a/arch/m68k/configs/mvme147_defconfig b/arch/m68k/configs/mvme147_defconfig --- a/arch/m68k/configs/mvme147_defconfig 2004-11-29 21:22:08 -08:00 +++ b/arch/m68k/configs/mvme147_defconfig 2004-11-29 21:22:08 -08:00 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-m68k -# Thu Oct 28 21:23:08 2004 +# Linux kernel version: 2.6.10-rc2-m68k +# Mon Nov 15 12:49:10 2004 # CONFIG_M68K=y CONFIG_MMU=y @@ -28,6 +28,7 @@ CONFIG_AUDIT=y CONFIG_LOG_BUF_SHIFT=16 # CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y @@ -35,12 +36,12 @@ # 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_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set # @@ -51,6 +52,7 @@ # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # @@ -122,6 +124,18 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_CDROM_PKTCDVD=m +CONFIG_CDROM_PKTCDVD_BUFFERS=8 +# CONFIG_CDROM_PKTCDVD_WCACHE is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # # ATA/ATAPI/MFM/RLL support @@ -176,6 +190,7 @@ CONFIG_MD_RAID5=m CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m +# CONFIG_MD_FAULTY is not set CONFIG_BLK_DEV_DM=m CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m @@ -222,6 +237,8 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_TUNNEL=m +CONFIG_IP_TCPDIAG=m +CONFIG_IP_TCPDIAG_IPV6=y # # IP: Virtual Server Configuration @@ -242,6 +259,7 @@ # CONFIG_IP_NF_CONNTRACK=m # CONFIG_IP_NF_CT_ACCT is not set +CONFIG_IP_NF_CONNTRACK_MARK=y # CONFIG_IP_NF_CT_PROTO_SCTP is not set CONFIG_IP_NF_FTP=m CONFIG_IP_NF_IRC=m @@ -271,6 +289,8 @@ CONFIG_IP_NF_MATCH_REALM=m # CONFIG_IP_NF_MATCH_SCTP is not set # CONFIG_IP_NF_MATCH_COMMENT is not set +CONFIG_IP_NF_MATCH_CONNMARK=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m CONFIG_IP_NF_FILTER=m CONFIG_IP_NF_TARGET_REJECT=m CONFIG_IP_NF_TARGET_LOG=m @@ -294,6 +314,8 @@ CONFIG_IP_NF_TARGET_DSCP=m CONFIG_IP_NF_TARGET_MARK=m CONFIG_IP_NF_TARGET_CLASSIFY=m +CONFIG_IP_NF_TARGET_CONNMARK=m +# CONFIG_IP_NF_TARGET_CLUSTERIP is not set CONFIG_IP_NF_RAW=m CONFIG_IP_NF_TARGET_NOTRACK=m CONFIG_IP_NF_ARPTABLES=m @@ -352,7 +374,6 @@ # 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 @@ -544,6 +565,7 @@ # CONFIG_FB=y CONFIG_FB_MODE_HELPERS=y +# CONFIG_FB_TILEBLITTING is not set # CONFIG_FB_VIRTUAL is not set # @@ -571,6 +593,8 @@ # # USB support # +# CONFIG_USB_ARCH_HAS_HCD is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set # # USB Gadget Support @@ -612,6 +636,7 @@ # CONFIG_QFMT_V1 is not set # CONFIG_QFMT_V2 is not set CONFIG_QUOTACTL=y +CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m @@ -646,6 +671,7 @@ # CONFIG_DEVFS_DEBUG is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -758,13 +784,16 @@ # CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_DEBUG_INFO is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -789,6 +818,7 @@ CONFIG_CRYPTO_TEA=m CONFIG_CRYPTO_ARC4=m CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_ANUBIS=m CONFIG_CRYPTO_DEFLATE=m CONFIG_CRYPTO_MICHAEL_MIC=m CONFIG_CRYPTO_CRC32C=m diff -Nru a/arch/m68k/configs/mvme16x_defconfig b/arch/m68k/configs/mvme16x_defconfig --- a/arch/m68k/configs/mvme16x_defconfig 2004-11-29 21:22:09 -08:00 +++ b/arch/m68k/configs/mvme16x_defconfig 2004-11-29 21:22:09 -08:00 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-m68k -# Thu Oct 28 21:23:09 2004 +# Linux kernel version: 2.6.10-rc2-m68k +# Mon Nov 15 12:49:35 2004 # CONFIG_M68K=y CONFIG_MMU=y @@ -28,6 +28,7 @@ CONFIG_AUDIT=y CONFIG_LOG_BUF_SHIFT=16 # CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y @@ -35,12 +36,12 @@ # 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_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set # @@ -51,6 +52,7 @@ # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # @@ -122,6 +124,18 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_CDROM_PKTCDVD=m +CONFIG_CDROM_PKTCDVD_BUFFERS=8 +# CONFIG_CDROM_PKTCDVD_WCACHE is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # # ATA/ATAPI/MFM/RLL support @@ -175,6 +189,7 @@ CONFIG_MD_RAID5=m CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m +# CONFIG_MD_FAULTY is not set CONFIG_BLK_DEV_DM=m CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m @@ -221,6 +236,8 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_TUNNEL=m +CONFIG_IP_TCPDIAG=m +CONFIG_IP_TCPDIAG_IPV6=y # # IP: Virtual Server Configuration @@ -241,6 +258,7 @@ # CONFIG_IP_NF_CONNTRACK=m # CONFIG_IP_NF_CT_ACCT is not set +CONFIG_IP_NF_CONNTRACK_MARK=y # CONFIG_IP_NF_CT_PROTO_SCTP is not set CONFIG_IP_NF_FTP=m CONFIG_IP_NF_IRC=m @@ -270,6 +288,8 @@ CONFIG_IP_NF_MATCH_REALM=m # CONFIG_IP_NF_MATCH_SCTP is not set # CONFIG_IP_NF_MATCH_COMMENT is not set +CONFIG_IP_NF_MATCH_CONNMARK=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m CONFIG_IP_NF_FILTER=m CONFIG_IP_NF_TARGET_REJECT=m CONFIG_IP_NF_TARGET_LOG=m @@ -293,6 +313,8 @@ CONFIG_IP_NF_TARGET_DSCP=m CONFIG_IP_NF_TARGET_MARK=m CONFIG_IP_NF_TARGET_CLASSIFY=m +CONFIG_IP_NF_TARGET_CONNMARK=m +# CONFIG_IP_NF_TARGET_CLUSTERIP is not set CONFIG_IP_NF_RAW=m CONFIG_IP_NF_TARGET_NOTRACK=m CONFIG_IP_NF_ARPTABLES=m @@ -351,7 +373,6 @@ # 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 @@ -543,6 +564,7 @@ # CONFIG_FB=y CONFIG_FB_MODE_HELPERS=y +# CONFIG_FB_TILEBLITTING is not set # CONFIG_FB_VIRTUAL is not set # @@ -570,6 +592,8 @@ # # USB support # +# CONFIG_USB_ARCH_HAS_HCD is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set # # USB Gadget Support @@ -611,6 +635,7 @@ # CONFIG_QFMT_V1 is not set # CONFIG_QFMT_V2 is not set CONFIG_QUOTACTL=y +CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m @@ -645,6 +670,7 @@ # CONFIG_DEVFS_DEBUG is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -757,13 +783,16 @@ # CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_DEBUG_INFO is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -788,6 +817,7 @@ CONFIG_CRYPTO_TEA=m CONFIG_CRYPTO_ARC4=m CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_ANUBIS=m CONFIG_CRYPTO_DEFLATE=m CONFIG_CRYPTO_MICHAEL_MIC=m CONFIG_CRYPTO_CRC32C=m diff -Nru a/arch/m68k/configs/q40_defconfig b/arch/m68k/configs/q40_defconfig --- a/arch/m68k/configs/q40_defconfig 2004-11-29 21:22:07 -08:00 +++ b/arch/m68k/configs/q40_defconfig 2004-11-29 21:22:07 -08:00 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-m68k -# Thu Oct 28 21:23:11 2004 +# Linux kernel version: 2.6.10-rc2-m68k +# Mon Nov 15 12:49:42 2004 # CONFIG_M68K=y CONFIG_MMU=y @@ -28,6 +28,7 @@ CONFIG_AUDIT=y CONFIG_LOG_BUF_SHIFT=16 # CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y @@ -35,12 +36,12 @@ # 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_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set # @@ -51,6 +52,7 @@ # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # @@ -127,6 +129,18 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_CDROM_PKTCDVD=m +CONFIG_CDROM_PKTCDVD_BUFFERS=8 +# CONFIG_CDROM_PKTCDVD_WCACHE is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # # ATA/ATAPI/MFM/RLL support @@ -145,7 +159,6 @@ 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 @@ -230,6 +243,7 @@ CONFIG_MD_RAID5=m CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m +# CONFIG_MD_FAULTY is not set CONFIG_BLK_DEV_DM=m CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m @@ -276,6 +290,8 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_TUNNEL=m +CONFIG_IP_TCPDIAG=m +CONFIG_IP_TCPDIAG_IPV6=y # # IP: Virtual Server Configuration @@ -296,6 +312,7 @@ # CONFIG_IP_NF_CONNTRACK=m # CONFIG_IP_NF_CT_ACCT is not set +CONFIG_IP_NF_CONNTRACK_MARK=y # CONFIG_IP_NF_CT_PROTO_SCTP is not set CONFIG_IP_NF_FTP=m CONFIG_IP_NF_IRC=m @@ -325,6 +342,8 @@ CONFIG_IP_NF_MATCH_REALM=m # CONFIG_IP_NF_MATCH_SCTP is not set # CONFIG_IP_NF_MATCH_COMMENT is not set +CONFIG_IP_NF_MATCH_CONNMARK=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m CONFIG_IP_NF_FILTER=m CONFIG_IP_NF_TARGET_REJECT=m CONFIG_IP_NF_TARGET_LOG=m @@ -348,6 +367,8 @@ CONFIG_IP_NF_TARGET_DSCP=m CONFIG_IP_NF_TARGET_MARK=m CONFIG_IP_NF_TARGET_CLASSIFY=m +CONFIG_IP_NF_TARGET_CONNMARK=m +# CONFIG_IP_NF_TARGET_CLUSTERIP is not set CONFIG_IP_NF_RAW=m CONFIG_IP_NF_TARGET_NOTRACK=m CONFIG_IP_NF_ARPTABLES=m @@ -406,7 +427,6 @@ # 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 @@ -524,7 +544,6 @@ # CONFIG_GAMEPORT is not set CONFIG_SOUND_GAMEPORT=y CONFIG_SERIO=m -# CONFIG_SERIO_I8042 is not set CONFIG_SERIO_SERPORT=m # CONFIG_SERIO_CT82C710 is not set CONFIG_SERIO_Q40KBD=m @@ -619,6 +638,7 @@ # CONFIG_FB=y CONFIG_FB_MODE_HELPERS=y +# CONFIG_FB_TILEBLITTING is not set CONFIG_FB_Q40=y # CONFIG_FB_VIRTUAL is not set @@ -649,6 +669,8 @@ # # USB support # +# CONFIG_USB_ARCH_HAS_HCD is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set # # USB Gadget Support @@ -688,6 +710,7 @@ # CONFIG_QFMT_V1 is not set # CONFIG_QFMT_V2 is not set CONFIG_QUOTACTL=y +CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m @@ -720,6 +743,7 @@ # CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -832,13 +856,16 @@ # CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_DEBUG_INFO is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -863,6 +890,7 @@ CONFIG_CRYPTO_TEA=m CONFIG_CRYPTO_ARC4=m CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_ANUBIS=m CONFIG_CRYPTO_DEFLATE=m CONFIG_CRYPTO_MICHAEL_MIC=m CONFIG_CRYPTO_CRC32C=m diff -Nru a/arch/m68k/configs/sun3_defconfig b/arch/m68k/configs/sun3_defconfig --- a/arch/m68k/configs/sun3_defconfig 2004-11-29 21:22:07 -08:00 +++ b/arch/m68k/configs/sun3_defconfig 2004-11-29 21:22:07 -08:00 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-m68k -# Thu Oct 28 21:23:13 2004 +# Linux kernel version: 2.6.10-rc2-m68k +# Mon Nov 15 12:49:50 2004 # CONFIG_M68K=y CONFIG_MMU=y @@ -28,6 +28,7 @@ CONFIG_AUDIT=y CONFIG_LOG_BUF_SHIFT=16 # CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y @@ -35,12 +36,12 @@ # 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_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set # @@ -51,6 +52,7 @@ # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # @@ -110,6 +112,18 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_CDROM_PKTCDVD=m +CONFIG_CDROM_PKTCDVD_BUFFERS=8 +# CONFIG_CDROM_PKTCDVD_WCACHE is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # # ATA/ATAPI/MFM/RLL support @@ -164,6 +178,7 @@ CONFIG_MD_RAID5=m CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m +# CONFIG_MD_FAULTY is not set CONFIG_BLK_DEV_DM=m CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m @@ -210,6 +225,8 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_TUNNEL=m +CONFIG_IP_TCPDIAG=m +CONFIG_IP_TCPDIAG_IPV6=y # # IP: Virtual Server Configuration @@ -230,6 +247,7 @@ # CONFIG_IP_NF_CONNTRACK=m # CONFIG_IP_NF_CT_ACCT is not set +CONFIG_IP_NF_CONNTRACK_MARK=y # CONFIG_IP_NF_CT_PROTO_SCTP is not set CONFIG_IP_NF_FTP=m CONFIG_IP_NF_IRC=m @@ -259,6 +277,8 @@ CONFIG_IP_NF_MATCH_REALM=m # CONFIG_IP_NF_MATCH_SCTP is not set # CONFIG_IP_NF_MATCH_COMMENT is not set +CONFIG_IP_NF_MATCH_CONNMARK=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m CONFIG_IP_NF_FILTER=m CONFIG_IP_NF_TARGET_REJECT=m CONFIG_IP_NF_TARGET_LOG=m @@ -282,6 +302,8 @@ CONFIG_IP_NF_TARGET_DSCP=m CONFIG_IP_NF_TARGET_MARK=m CONFIG_IP_NF_TARGET_CLASSIFY=m +CONFIG_IP_NF_TARGET_CONNMARK=m +# CONFIG_IP_NF_TARGET_CLUSTERIP is not set CONFIG_IP_NF_RAW=m CONFIG_IP_NF_TARGET_NOTRACK=m CONFIG_IP_NF_ARPTABLES=m @@ -340,7 +362,6 @@ # 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 @@ -533,6 +554,7 @@ # CONFIG_FB=y CONFIG_FB_MODE_HELPERS=y +# CONFIG_FB_TILEBLITTING is not set # CONFIG_FB_VIRTUAL is not set # @@ -560,6 +582,8 @@ # # USB support # +# CONFIG_USB_ARCH_HAS_HCD is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set # # USB Gadget Support @@ -599,6 +623,7 @@ # CONFIG_QFMT_V1 is not set # CONFIG_QFMT_V2 is not set CONFIG_QUOTACTL=y +CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m @@ -633,6 +658,7 @@ # CONFIG_DEVFS_DEBUG is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -745,13 +771,16 @@ # CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_DEBUG_INFO is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -776,6 +805,7 @@ CONFIG_CRYPTO_TEA=m CONFIG_CRYPTO_ARC4=m CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_ANUBIS=m CONFIG_CRYPTO_DEFLATE=m CONFIG_CRYPTO_MICHAEL_MIC=m CONFIG_CRYPTO_CRC32C=m diff -Nru a/arch/m68k/configs/sun3x_defconfig b/arch/m68k/configs/sun3x_defconfig --- a/arch/m68k/configs/sun3x_defconfig 2004-11-29 21:22:06 -08:00 +++ b/arch/m68k/configs/sun3x_defconfig 2004-11-29 21:22:06 -08:00 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-m68k -# Thu Oct 28 21:23:15 2004 +# Linux kernel version: 2.6.10-rc2-m68k +# Mon Nov 15 12:49:55 2004 # CONFIG_M68K=y CONFIG_MMU=y @@ -28,6 +28,7 @@ CONFIG_AUDIT=y CONFIG_LOG_BUF_SHIFT=16 # CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y @@ -35,12 +36,12 @@ # 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_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set # @@ -51,6 +52,7 @@ # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # @@ -121,6 +123,18 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_CDROM_PKTCDVD=m +CONFIG_CDROM_PKTCDVD_BUFFERS=8 +# CONFIG_CDROM_PKTCDVD_WCACHE is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # # ATA/ATAPI/MFM/RLL support @@ -175,6 +189,7 @@ CONFIG_MD_RAID5=m CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m +# CONFIG_MD_FAULTY is not set CONFIG_BLK_DEV_DM=m CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m @@ -221,6 +236,8 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_TUNNEL=m +CONFIG_IP_TCPDIAG=m +CONFIG_IP_TCPDIAG_IPV6=y # # IP: Virtual Server Configuration @@ -241,6 +258,7 @@ # CONFIG_IP_NF_CONNTRACK=m # CONFIG_IP_NF_CT_ACCT is not set +CONFIG_IP_NF_CONNTRACK_MARK=y # CONFIG_IP_NF_CT_PROTO_SCTP is not set CONFIG_IP_NF_FTP=m CONFIG_IP_NF_IRC=m @@ -270,6 +288,8 @@ CONFIG_IP_NF_MATCH_REALM=m # CONFIG_IP_NF_MATCH_SCTP is not set # CONFIG_IP_NF_MATCH_COMMENT is not set +CONFIG_IP_NF_MATCH_CONNMARK=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m CONFIG_IP_NF_FILTER=m CONFIG_IP_NF_TARGET_REJECT=m CONFIG_IP_NF_TARGET_LOG=m @@ -293,6 +313,8 @@ CONFIG_IP_NF_TARGET_DSCP=m CONFIG_IP_NF_TARGET_MARK=m CONFIG_IP_NF_TARGET_CLASSIFY=m +CONFIG_IP_NF_TARGET_CONNMARK=m +# CONFIG_IP_NF_TARGET_CLUSTERIP is not set CONFIG_IP_NF_RAW=m CONFIG_IP_NF_TARGET_NOTRACK=m CONFIG_IP_NF_ARPTABLES=m @@ -351,7 +373,6 @@ # 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 @@ -543,6 +564,7 @@ # CONFIG_FB=y CONFIG_FB_MODE_HELPERS=y +# CONFIG_FB_TILEBLITTING is not set # CONFIG_FB_VIRTUAL is not set # @@ -570,6 +592,8 @@ # # USB support # +# CONFIG_USB_ARCH_HAS_HCD is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set # # USB Gadget Support @@ -609,6 +633,7 @@ # CONFIG_QFMT_V1 is not set # CONFIG_QFMT_V2 is not set CONFIG_QUOTACTL=y +CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m @@ -643,6 +668,7 @@ # CONFIG_DEVFS_DEBUG is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -755,13 +781,16 @@ # CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_DEBUG_INFO is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -786,6 +815,7 @@ CONFIG_CRYPTO_TEA=m CONFIG_CRYPTO_ARC4=m CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_ANUBIS=m CONFIG_CRYPTO_DEFLATE=m CONFIG_CRYPTO_MICHAEL_MIC=m CONFIG_CRYPTO_CRC32C=m diff -Nru a/arch/m68k/defconfig b/arch/m68k/defconfig --- a/arch/m68k/defconfig 2004-11-29 21:22:06 -08:00 +++ b/arch/m68k/defconfig 2004-11-29 21:22:06 -08:00 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-m68k -# Thu Oct 28 21:23:03 2004 +# Linux kernel version: 2.6.10-rc2-m68k +# Mon Nov 15 12:48:44 2004 # CONFIG_M68K=y CONFIG_MMU=y @@ -27,18 +27,19 @@ # CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y # 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_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set # @@ -116,6 +117,18 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_CDROM_PKTCDVD=y +CONFIG_CDROM_PKTCDVD_BUFFERS=8 +# CONFIG_CDROM_PKTCDVD_WCACHE is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # # ATA/ATAPI/MFM/RLL support @@ -208,6 +221,8 @@ # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set # CONFIG_INET_TUNNEL is not set +CONFIG_IP_TCPDIAG=y +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -227,7 +242,6 @@ # 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 @@ -406,6 +420,7 @@ # CONFIG_FB=y CONFIG_FB_MODE_HELPERS=y +# CONFIG_FB_TILEBLITTING is not set # CONFIG_FB_CIRRUS is not set CONFIG_FB_AMIGA=y CONFIG_FB_AMIGA_OCS=y @@ -433,6 +448,8 @@ # # USB support # +# CONFIG_USB_ARCH_HAS_HCD is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set # # USB Gadget Support @@ -460,6 +477,7 @@ CONFIG_MINIX_FS=y # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -531,6 +549,7 @@ # # CONFIG_PARTITION_ADVANCED is not set CONFIG_AMIGA_PARTITION=y +CONFIG_MSDOS_PARTITION=y # # Native Language Support @@ -584,6 +603,7 @@ # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # diff -Nru a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S --- a/arch/m68k/kernel/entry.S 2004-11-29 21:22:06 -08:00 +++ b/arch/m68k/kernel/entry.S 2004-11-29 21:22:06 -08:00 @@ -706,4 +706,7 @@ .long sys_mq_getsetattr .long sys_waitid .long sys_ni_syscall /* for sys_vserver */ + .long sys_add_key + .long sys_request_key /* 280 */ + .long sys_keyctl diff -Nru a/arch/m68k/kernel/vmlinux-sun3.lds b/arch/m68k/kernel/vmlinux-sun3.lds --- a/arch/m68k/kernel/vmlinux-sun3.lds 2004-11-29 21:22:06 -08:00 +++ b/arch/m68k/kernel/vmlinux-sun3.lds 2004-11-29 21:22:06 -08:00 @@ -16,7 +16,7 @@ SCHED_TEXT *(.fixup) *(.gnu.warning) - } = 0x4e75 + } :text = 0x4e75 RODATA _etext = .; /* End of text section */ @@ -28,7 +28,7 @@ __start___ex_table = .; *(__ex_table) __stop___ex_table = .; - } + } :data /* End of data goes *here* so that freeing init code works properly. */ _edata = .; diff -Nru a/arch/mips/configs/rm200_defconfig b/arch/mips/configs/rm200_defconfig --- a/arch/mips/configs/rm200_defconfig 2004-11-29 21:22:07 -08:00 +++ b/arch/mips/configs/rm200_defconfig 2004-11-29 21:22:07 -08:00 @@ -524,7 +524,6 @@ CONFIG_BRIDGE=m # CONFIG_VLAN_8021Q is not set CONFIG_DECNET=m -# CONFIG_DECNET_SIOCGIFCONF is not set # CONFIG_DECNET_ROUTER is not set # CONFIG_LLC2 is not set # CONFIG_IPX is not set diff -Nru a/arch/mips/kernel/sysirix.c b/arch/mips/kernel/sysirix.c --- a/arch/mips/kernel/sysirix.c 2004-11-29 21:22:08 -08:00 +++ b/arch/mips/kernel/sysirix.c 2004-11-29 21:22:08 -08:00 @@ -287,9 +287,9 @@ int pid = (int) regs->regs[base + 5]; char *buf = (char *) regs->regs[base + 6]; struct task_struct *p; - char comm[16]; + char tcomm[sizeof(current->comm)]; - retval = verify_area(VERIFY_WRITE, buf, 16); + retval = verify_area(VERIFY_WRITE, buf, sizeof(tcomm)); if (retval) break; read_lock(&tasklist_lock); @@ -299,11 +299,11 @@ retval = -ESRCH; break; } - memcpy(comm, p->comm, 16); + get_task_comm(tcomm, p); read_unlock(&tasklist_lock); /* XXX Need to check sizes. */ - copy_to_user(buf, p->comm, 16); + copy_to_user(buf, tcomm, sizeof(tcomm)); retval = 0; break; } diff -Nru a/arch/ppc/boot/simple/misc-embedded.c b/arch/ppc/boot/simple/misc-embedded.c --- a/arch/ppc/boot/simple/misc-embedded.c 2004-11-29 21:22:06 -08:00 +++ b/arch/ppc/boot/simple/misc-embedded.c 2004-11-29 21:22:06 -08:00 @@ -218,7 +218,7 @@ puts("done.\n"); { struct bi_record *rec; - unsigned long initrd_loc; + unsigned long initrd_loc = 0; unsigned long rec_loc = _ALIGN((unsigned long)(zimage_size) + (1 << 20) - 1, (1 << 20)); rec = (struct bi_record *)rec_loc; diff -Nru a/arch/ppc/platforms/pmac_cpufreq.c b/arch/ppc/platforms/pmac_cpufreq.c --- a/arch/ppc/platforms/pmac_cpufreq.c 2004-11-29 21:22:07 -08:00 +++ b/arch/ppc/platforms/pmac_cpufreq.c 2004-11-29 21:22:07 -08:00 @@ -33,6 +33,8 @@ #include #include #include +#include +#include /* WARNING !!! This will cause calibrate_delay() to be called, * but this is an __init function ! So you MUST go edit @@ -51,10 +53,6 @@ extern void low_choose_7447a_dfs(int dfs); extern void low_choose_750fx_pll(int pll); extern void low_sleep_handler(void); -extern void openpic_suspend(struct sys_device *sysdev, u32 state); -extern void openpic_resume(struct sys_device *sysdev); -extern void enable_kernel_altivec(void); -extern void enable_kernel_fp(void); /* * Currently, PowerMac cpufreq supports only high & low frequencies @@ -208,7 +206,7 @@ printk(KERN_DEBUG "HID1, before: %x\n", mfspr(SPRN_HID1)); #endif /* Disable all interrupt sources on openpic */ - openpic_suspend(NULL, 1); + openpic_set_priority(0xf); /* Make sure the decrementer won't interrupt us */ asm volatile("mtdec %0" : : "r" (0x7fffffff)); @@ -275,7 +273,7 @@ wakeup_decrementer(); /* Restore interrupts */ - openpic_resume(NULL); + openpic_set_priority(0); /* Let interrupts flow again ... */ local_irq_enable(); diff -Nru a/arch/ppc/platforms/pmac_feature.c b/arch/ppc/platforms/pmac_feature.c --- a/arch/ppc/platforms/pmac_feature.c 2004-11-29 21:22:08 -08:00 +++ b/arch/ppc/platforms/pmac_feature.c 2004-11-29 21:22:08 -08:00 @@ -117,10 +117,10 @@ #define UN_BIC(r,v) (UN_OUT((r), UN_IN(r) & ~(v))) static struct device_node* uninorth_node __pmacdata; -static u32* uninorth_base __pmacdata; +static u32 __iomem * uninorth_base __pmacdata; static u32 uninorth_rev __pmacdata; static int uninorth_u3 __pmacdata; -static void *u3_ht; +static void __iomem *u3_ht; /* * For each motherboard family, we have a table of functions pointers @@ -517,7 +517,7 @@ /* Save state & config of DBDMA channels */ for (i=0; i<13; i++) { - volatile struct dbdma_regs* chan = (volatile struct dbdma_regs*) + volatile struct dbdma_regs __iomem * chan = (void __iomem *) (macio->base + ((0x8000+i*0x100)>>2)); save[i].cmdptr_hi = in_le32(&chan->cmdptr_hi); save[i].cmdptr = in_le32(&chan->cmdptr); @@ -534,7 +534,7 @@ /* Save state & config of DBDMA channels */ for (i=0; i<13; i++) { - volatile struct dbdma_regs* chan = (volatile struct dbdma_regs*) + volatile struct dbdma_regs __iomem * chan = (void __iomem *) (macio->base + ((0x8000+i*0x100)>>2)); out_le32(&chan->control, (ACTIVE|DEAD|WAKE|FLUSH|PAUSE|RUN)<<16); while (in_le32(&chan->status) & ACTIVE) @@ -2286,14 +2286,14 @@ #ifndef CONFIG_POWER4 /* Fixup Hooper vs. Comet */ if (pmac_mb.model_id == PMAC_TYPE_HOOPER) { - u32* mach_id_ptr = (u32*)ioremap(0xf3000034, 4); + u32 __iomem * mach_id_ptr = ioremap(0xf3000034, 4); if (!mach_id_ptr) return -ENODEV; /* Here, I used to disable the media-bay on comet. It * appears this is wrong, the floppy connector is actually * a kind of media-bay and works with the current driver. */ - if ((*mach_id_ptr) & 0x20000000UL) + if (__raw_readl(mach_id_ptr) & 0x20000000UL) pmac_mb.model_id = PMAC_TYPE_COMET; iounmap(mach_id_ptr); } @@ -2394,7 +2394,7 @@ { struct device_node* node; int i; - volatile u32* base; + volatile u32 __iomem * base; u32* revp; node = find_devices(name); @@ -2419,7 +2419,7 @@ printk(KERN_ERR "pmac_feature: %s skipped\n", node->full_name); return; } - base = (volatile u32*)ioremap(node->addrs[0].address, node->addrs[0].size); + base = ioremap(node->addrs[0].address, node->addrs[0].size); if (!base) { printk(KERN_ERR "pmac_feature: Can't map mac-io chip !\n"); return; diff -Nru a/arch/ppc/platforms/sandpoint.c b/arch/ppc/platforms/sandpoint.c --- a/arch/ppc/platforms/sandpoint.c 2004-11-29 21:22:08 -08:00 +++ b/arch/ppc/platforms/sandpoint.c 2004-11-29 21:22:08 -08:00 @@ -584,7 +584,7 @@ sandpoint_ide_ctl_regbase[0]=pdev->resource[1].start; sandpoint_ide_ctl_regbase[1]=pdev->resource[3].start; sandpoint_idedma_regbase=pdev->resource[4].start; - pci_dev_put(dev); + pci_dev_put(pdev); } sandpoint_ide_ports_known = 1; diff -Nru a/arch/ppc/syslib/m8260_setup.c b/arch/ppc/syslib/m8260_setup.c --- a/arch/ppc/syslib/m8260_setup.c 2004-11-29 21:22:07 -08:00 +++ b/arch/ppc/syslib/m8260_setup.c 2004-11-29 21:22:07 -08:00 @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -241,9 +242,6 @@ strcpy(cmd_line, (char *)(r6+KERNELBASE)); } - /* Call back for board-specific settings. */ - m82xx_board_init(); - ppc_md.setup_arch = m8260_setup_arch; ppc_md.show_cpuinfo = m8260_show_cpuinfo; ppc_md.init_IRQ = m8260_init_IRQ; @@ -259,4 +257,7 @@ ppc_md.find_end_of_memory = m8260_find_end_of_memory; ppc_md.setup_io_mappings = m8260_map_io; + + /* Call back for board-specific settings and overrides. */ + m82xx_board_init(); } diff -Nru a/arch/ppc/syslib/open_pic.c b/arch/ppc/syslib/open_pic.c --- a/arch/ppc/syslib/open_pic.c 2004-11-29 21:22:07 -08:00 +++ b/arch/ppc/syslib/open_pic.c 2004-11-29 21:22:07 -08:00 @@ -53,7 +53,6 @@ /* Global Operations */ static void openpic_disable_8259_pass_through(void); -static void openpic_set_priority(u_int pri); static void openpic_set_spurious(u_int vector); #ifdef CONFIG_SMP @@ -477,7 +476,7 @@ } #endif /* notused */ -static void __init openpic_set_priority(u_int pri) +void openpic_set_priority(u_int pri) { DECL_THIS_CPU; @@ -955,6 +954,8 @@ return 0; } + openpic_set_priority(0xf); + open_pic.enable = openpic_cached_enable_irq; open_pic.disable = openpic_cached_disable_irq; @@ -1027,6 +1028,8 @@ open_pic.enable = openpic_enable_irq; open_pic.disable = openpic_disable_irq; + + openpic_set_priority(0); spin_unlock_irqrestore(&openpic_setup_lock, flags); diff -Nru a/arch/ppc/syslib/ppc405_pci.c b/arch/ppc/syslib/ppc405_pci.c --- a/arch/ppc/syslib/ppc405_pci.c 2004-11-29 21:22:08 -08:00 +++ b/arch/ppc/syslib/ppc405_pci.c 2004-11-29 21:22:08 -08:00 @@ -82,8 +82,8 @@ unsigned int tmp_addr; unsigned int tmp_size; unsigned int reg_index; - unsigned int new_pmm_max; - unsigned int new_pmm_min; + unsigned int new_pmm_max = 0; + unsigned int new_pmm_min = 0; isa_io_base = 0; isa_mem_base = 0; diff -Nru a/arch/ppc/syslib/todc_time.c b/arch/ppc/syslib/todc_time.c --- a/arch/ppc/syslib/todc_time.c 2004-11-29 21:22:08 -08:00 +++ b/arch/ppc/syslib/todc_time.c 2004-11-29 21:22:08 -08:00 @@ -81,13 +81,13 @@ u_char todc_direct_read_val(int addr) { - return readb(todc_info->nvram_data + addr); + return readb((void __iomem *)(todc_info->nvram_data + addr)); } void todc_direct_write_val(int addr, unsigned char val) { - writeb(val, todc_info->nvram_data + addr); + writeb(val, (void __iomem *)(todc_info->nvram_data + addr)); return; } diff -Nru a/arch/ppc64/Makefile b/arch/ppc64/Makefile --- a/arch/ppc64/Makefile 2004-11-29 21:22:06 -08:00 +++ b/arch/ppc64/Makefile 2004-11-29 21:22:06 -08:00 @@ -32,7 +32,8 @@ LDFLAGS := -m elf64ppc LDFLAGS_vmlinux := -Bstatic -e $(KERNELLOAD) -Ttext $(KERNELLOAD) -CFLAGS += -msoft-float -pipe -mminimal-toc -mtraceback=none +CFLAGS += -msoft-float -pipe -mminimal-toc -mtraceback=none \ + -mcall-aixdesc ifeq ($(CONFIG_POWER4_ONLY),y) CFLAGS += $(call cc-option,-mcpu=power4) diff -Nru a/arch/ppc64/kernel/asm-offsets.c b/arch/ppc64/kernel/asm-offsets.c --- a/arch/ppc64/kernel/asm-offsets.c 2004-11-29 21:22:08 -08:00 +++ b/arch/ppc64/kernel/asm-offsets.c 2004-11-29 21:22:08 -08:00 @@ -103,6 +103,7 @@ DEFINE(PACA_EXDSI, offsetof(struct paca_struct, exdsi)); DEFINE(PACAEMERGSP, offsetof(struct paca_struct, emergency_sp)); DEFINE(PACALPPACA, offsetof(struct paca_struct, lppaca)); + DEFINE(PACAHWCPUID, offsetof(struct paca_struct, hw_cpu_id)); DEFINE(LPPACASRR0, offsetof(struct ItLpPaca, xSavedSrr0)); DEFINE(LPPACASRR1, offsetof(struct ItLpPaca, xSavedSrr1)); DEFINE(LPPACAANYINT, offsetof(struct ItLpPaca, xIntDword.xAnyInt)); diff -Nru a/arch/ppc64/kernel/entry.S b/arch/ppc64/kernel/entry.S --- a/arch/ppc64/kernel/entry.S 2004-11-29 21:22:06 -08:00 +++ b/arch/ppc64/kernel/entry.S 2004-11-29 21:22:06 -08:00 @@ -497,10 +497,11 @@ li r3,0 stb r3,PACAPROCENABLED(r13) /* ensure we are soft-disabled */ + ori r10,r10,MSR_EE mtmsrd r10 /* hard-enable again */ addi r3,r1,STACK_FRAME_OVERHEAD bl .do_IRQ - b .ret_from_except /* loop back and handle more */ + b .ret_from_except_lite /* loop back and handle more */ 4: stb r5,PACAPROCENABLED(r13) #endif @@ -574,6 +575,7 @@ li r0,1 stb r0,PACAPROCENABLED(r13) #endif + ori r10,r10,MSR_EE mtmsrd r10,1 /* reenable interrupts */ bl .schedule mfmsr r10 @@ -591,6 +593,7 @@ user_work: #endif /* Enable interrupts */ + ori r10,r10,MSR_EE mtmsrd r10,1 andi. r0,r4,_TIF_NEED_RESCHED diff -Nru a/arch/ppc64/kernel/head.S b/arch/ppc64/kernel/head.S --- a/arch/ppc64/kernel/head.S 2004-11-29 21:22:07 -08:00 +++ b/arch/ppc64/kernel/head.S 2004-11-29 21:22:07 -08:00 @@ -26,6 +26,7 @@ #define SECONDARY_PROCESSORS #include +#include #include #include #include @@ -1192,7 +1193,7 @@ /* * On pSeries, secondary processors spin in the following code. - * At entry, r3 = this processor's number (in Linux terms, not hardware). + * At entry, r3 = this processor's number (physical cpu id) */ _GLOBAL(pseries_secondary_smp_init) mr r24,r3 @@ -1204,13 +1205,27 @@ /* Copy some CPU settings from CPU 0 */ bl .__restore_cpu_setup - /* Set up a paca value for this processor. */ - LOADADDR(r5, paca) /* Get base vaddr of paca array */ - mulli r13,r24,PACA_SIZE /* Calculate vaddr of right paca */ - add r13,r13,r5 /* for this processor. */ - mtspr SPRG3,r13 /* Save vaddr of paca in SPRG3 */ -1: - HMT_LOW + /* Set up a paca value for this processor. Since we have the + * physical cpu id in r3, we need to search the pacas to find + * which logical id maps to our physical one. + */ + LOADADDR(r13, paca) /* Get base vaddr of paca array */ + li r5,0 /* logical cpu id */ +1: lhz r6,PACAHWCPUID(r13) /* Load HW procid from paca */ + cmpw r6,r24 /* Compare to our id */ + beq 2f + addi r13,r13,PACA_SIZE /* Loop to next PACA on miss */ + addi r5,r5,1 + cmpwi r5,NR_CPUS + blt 1b + +99: HMT_LOW /* Couldn't find our CPU id */ + b 99b + +2: mtspr SPRG3,r13 /* Save vaddr of paca in SPRG3 */ + /* From now on, r24 is expected to be logica cpuid */ + mr r24,r5 +3: HMT_LOW lbz r23,PACAPROCSTART(r13) /* Test if this processor should */ /* start. */ sync @@ -1225,7 +1240,7 @@ bne .__secondary_start #endif #endif - b 1b /* Loop until told to go */ + b 3b /* Loop until told to go */ #ifdef CONFIG_PPC_ISERIES _STATIC(__start_initialization_iSeries) /* Clear out the BSS */ @@ -1921,19 +1936,6 @@ bl .__save_cpu_setup sync -#ifdef CONFIG_SMP - /* All secondary cpus are now spinning on a common - * spinloop, release them all now so they can start - * to spin on their individual paca spinloops. - * For non SMP kernels, the secondary cpus never - * get out of the common spinloop. - */ - li r3,1 - LOADADDR(r5,__secondary_hold_spinloop) - tophys(r4,r5) - std r3,0(r4) -#endif - /* Setup a valid physical PACA pointer in SPRG3 for early_setup * note that boot_cpuid can always be 0 nowadays since there is * nowhere it can be initialized differently before we reach this @@ -2130,6 +2132,22 @@ mtspr CTRLT, r4 blr #endif + +#if defined(CONFIG_SMP) && !defined(CONFIG_PPC_ISERIES) +_GLOBAL(smp_release_cpus) + /* All secondary cpus are spinning on a common + * spinloop, release them all now so they can start + * to spin on their individual paca spinloops. + * For non SMP kernels, the secondary cpus never + * get out of the common spinloop. + */ + li r3,1 + LOADADDR(r5,__secondary_hold_spinloop) + std r3,0(r5) + sync + blr +#endif /* CONFIG_SMP && !CONFIG_PPC_ISERIES */ + /* * We put a few things here that have to be page-aligned. diff -Nru a/arch/ppc64/kernel/iSeries_pci.c b/arch/ppc64/kernel/iSeries_pci.c --- a/arch/ppc64/kernel/iSeries_pci.c 2004-11-29 21:22:08 -08:00 +++ b/arch/ppc64/kernel/iSeries_pci.c 2004-11-29 21:22:08 -08:00 @@ -256,9 +256,12 @@ int ret = HvCallXm_testBus(bus); if (ret == 0) { printk("bus %d appears to exist\n", bus); - phb = pci_alloc_pci_controller(phb_type_hypervisor); + + phb = (struct pci_controller *)kmalloc(sizeof(struct pci_controller), GFP_KERNEL); if (phb == NULL) - return -1; + return -ENOMEM; + pci_setup_pci_controller(phb); + phb->pci_mem_offset = phb->local_number = bus; phb->first_busno = bus; phb->last_busno = bus; @@ -292,7 +295,6 @@ iomm_table_initialize(); find_and_init_phbs(); io_page_mask = -1; - /* pci_assign_all_busses = 0; SFRXXX*/ PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_init Exit.\n"); } diff -Nru a/arch/ppc64/kernel/iommu.c b/arch/ppc64/kernel/iommu.c --- a/arch/ppc64/kernel/iommu.c 2004-11-29 21:22:06 -08:00 +++ b/arch/ppc64/kernel/iommu.c 2004-11-29 21:22:06 -08:00 @@ -59,13 +59,18 @@ __setup("iommu=", setup_iommu); -static unsigned long iommu_range_alloc(struct iommu_table *tbl, unsigned long npages, - unsigned long *handle) +static unsigned long iommu_range_alloc(struct iommu_table *tbl, + unsigned long npages, + unsigned long *handle, + unsigned int align_order) { unsigned long n, end, i, start; unsigned long limit; int largealloc = npages > 15; int pass = 0; + unsigned long align_mask; + + align_mask = 0xffffffffffffffffl >> (64 - align_order); /* This allocator was derived from x86_64's bit string search */ @@ -97,6 +102,10 @@ again: n = find_next_zero_bit(tbl->it_map, limit, start); + + /* Align allocation */ + n = (n + align_mask) & ~align_mask; + end = n + npages; if (unlikely(end >= limit)) { @@ -141,14 +150,15 @@ } static dma_addr_t iommu_alloc(struct iommu_table *tbl, void *page, - unsigned int npages, enum dma_data_direction direction) + unsigned int npages, enum dma_data_direction direction, + unsigned int align_order) { unsigned long entry, flags; dma_addr_t ret = DMA_ERROR_CODE; spin_lock_irqsave(&(tbl->it_lock), flags); - entry = iommu_range_alloc(tbl, npages, NULL); + entry = iommu_range_alloc(tbl, npages, NULL, align_order); if (unlikely(entry == DMA_ERROR_CODE)) { spin_unlock_irqrestore(&(tbl->it_lock), flags); @@ -264,7 +274,7 @@ vaddr = (unsigned long)page_address(s->page) + s->offset; npages = PAGE_ALIGN(vaddr + slen) - (vaddr & PAGE_MASK); npages >>= PAGE_SHIFT; - entry = iommu_range_alloc(tbl, npages, &handle); + entry = iommu_range_alloc(tbl, npages, &handle, 0); DBG(" - vaddr: %lx, size: %lx\n", vaddr, slen); @@ -478,7 +488,7 @@ npages >>= PAGE_SHIFT; if (tbl) { - dma_handle = iommu_alloc(tbl, vaddr, npages, direction); + dma_handle = iommu_alloc(tbl, vaddr, npages, direction, 0); if (dma_handle == DMA_ERROR_CODE) { if (printk_ratelimit()) { printk(KERN_INFO "iommu_alloc failed, " @@ -537,7 +547,7 @@ memset(ret, 0, size); /* Set up tces to cover the allocated range */ - mapping = iommu_alloc(tbl, ret, npages, DMA_BIDIRECTIONAL); + mapping = iommu_alloc(tbl, ret, npages, DMA_BIDIRECTIONAL, order); if (mapping == DMA_ERROR_CODE) { free_pages((unsigned long)ret, order); ret = NULL; diff -Nru a/arch/ppc64/kernel/lparcfg.c b/arch/ppc64/kernel/lparcfg.c --- a/arch/ppc64/kernel/lparcfg.c 2004-11-29 21:22:06 -08:00 +++ b/arch/ppc64/kernel/lparcfg.c 2004-11-29 21:22:06 -08:00 @@ -34,7 +34,7 @@ #include #include -#define MODULE_VERS "1.4" +#define MODULE_VERS "1.5" #define MODULE_NAME "lparcfg" /* #define LPARCFG_DEBUG */ @@ -70,6 +70,28 @@ #ifdef CONFIG_PPC_ISERIES +/* + * For iSeries legacy systems, the PPA purr function is available from the + * xEmulatedTimeBase field in the paca. + */ +static unsigned long get_purr(void) +{ + unsigned long sum_purr = 0; + int cpu; + struct paca_struct *lpaca; + + for_each_cpu(cpu) { + lpaca = paca + cpu; + sum_purr += lpaca->lppaca.xEmulatedTimeBase; + +#ifdef PURR_DEBUG + printk(KERN_INFO "get_purr for cpu (%d) has value (%ld) \n", + cpu, lpaca->lppaca.xEmulatedTimeBase); +#endif + } + return sum_purr; +} + #define lparcfg_write NULL /* @@ -81,6 +103,9 @@ int shared, entitled_capacity, max_entitled_capacity; int processors, max_processors; struct paca_struct *lpaca = get_paca(); + unsigned long purr = get_purr(); + + seq_printf(m, "%s %s \n", MODULE_NAME, MODULE_VERS); shared = (int)(lpaca->lppaca_ptr->xSharedProc); seq_printf(m, "serial_number=%c%c%c%c%c%c%c\n", @@ -131,6 +156,7 @@ seq_printf(m, "pool_capacity=%d\n", (int)(HvLpConfig_getNumProcsInSharedPool(pool_id) * 100)); + seq_printf(m, "purr=%ld\n", purr); } seq_printf(m, "shared_processor_mode=%d\n", shared); diff -Nru a/arch/ppc64/kernel/maple_pci.c b/arch/ppc64/kernel/maple_pci.c --- a/arch/ppc64/kernel/maple_pci.c 2004-11-29 21:22:08 -08:00 +++ b/arch/ppc64/kernel/maple_pci.c 2004-11-29 21:22:08 -08:00 @@ -32,9 +32,6 @@ #define DBG(x...) #endif -extern int pci_probe_only; -extern int pci_read_irq_line(struct pci_dev *pci_dev); - static struct pci_controller *u3_agp, *u3_ht; static int __init fixup_one_level_bus_range(struct device_node *node, int higher) @@ -328,15 +325,17 @@ dev->full_name); } - hose = pci_alloc_pci_controller(phb_type_apple); - if (!hose) - return -ENOMEM; + hose = alloc_bootmem(sizeof(struct pci_controller)); + if (hose == NULL) + return -ENOMEM; + pci_setup_pci_controller(hose); + hose->arch_data = dev; hose->first_busno = bus_range ? bus_range[0] : 0; hose->last_busno = bus_range ? bus_range[1] : 0xff; - of_prop = (struct property *)alloc_bootmem(sizeof(struct property) + - sizeof(hose->global_number)); + of_prop = alloc_bootmem(sizeof(struct property) + + sizeof(hose->global_number)); if (of_prop) { memset(of_prop, 0, sizeof(struct property)); of_prop->name = "linux,pci-domain"; @@ -377,7 +376,7 @@ DBG(" -> maple_pcibios_fixup\n"); - while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) + for_each_pci_dev(dev) pci_read_irq_line(dev); /* Do the mapping of the IO space */ diff -Nru a/arch/ppc64/kernel/mpic.c b/arch/ppc64/kernel/mpic.c --- a/arch/ppc64/kernel/mpic.c 2004-11-29 21:22:08 -08:00 +++ b/arch/ppc64/kernel/mpic.c 2004-11-29 21:22:08 -08:00 @@ -476,7 +476,7 @@ const char *vers; int i; - mpic = (struct mpic *)alloc_bootmem(sizeof(struct mpic)); + mpic = alloc_bootmem(sizeof(struct mpic)); if (mpic == NULL) return NULL; diff -Nru a/arch/ppc64/kernel/nvram.c b/arch/ppc64/kernel/nvram.c --- a/arch/ppc64/kernel/nvram.c 2004-11-29 21:22:06 -08:00 +++ b/arch/ppc64/kernel/nvram.c 2004-11-29 21:22:06 -08:00 @@ -43,9 +43,9 @@ static long nvram_error_log_index = -1; static long nvram_error_log_size = 0; -volatile int no_more_logging = 1; /* Until we initialize everything, - * make sure we don't try logging - * anything */ +int no_logging = 1; /* Until we initialize everything, + * make sure we don't try logging + * anything */ extern volatile int error_log_cnt; @@ -640,7 +640,7 @@ loff_t tmp_index; struct err_log_info info; - if (no_more_logging) { + if (no_logging) { return -EPERM; } diff -Nru a/arch/ppc64/kernel/pSeries_iommu.c b/arch/ppc64/kernel/pSeries_iommu.c --- a/arch/ppc64/kernel/pSeries_iommu.c 2004-11-29 21:22:06 -08:00 +++ b/arch/ppc64/kernel/pSeries_iommu.c 2004-11-29 21:22:06 -08:00 @@ -290,7 +290,11 @@ for (ln=bus_list->next; ln != bus_list; ln=ln->next) { bus = pci_bus_b(ln); - busdn = PCI_GET_DN(bus); + + if (bus->self) + busdn = pci_device_to_OF_node(bus->self); + else + busdn = bus->sysdata; /* must be a phb */ dma_window = (unsigned int *)get_property(busdn, "ibm,dma-window", NULL); if (dma_window) { @@ -317,19 +321,16 @@ node = (struct device_node *)phb->arch_data; - if (get_property(node, "linux,has-tce-table", NULL) == NULL) { - printk(KERN_ERR "PCI_DMA: iommu_table_setparms: %s has no tce table !\n", - dn->full_name); - return; - } basep = (unsigned long *)get_property(node, "linux,tce-base", NULL); sizep = (unsigned int *)get_property(node, "linux,tce-size", NULL); if (basep == NULL || sizep == NULL) { - printk(KERN_ERR "PCI_DMA: iommu_table_setparms: %s has missing tce" - " entries !\n", dn->full_name); + printk(KERN_ERR "PCI_DMA: iommu_table_setparms: %s has " + "missing tce entries !\n", dn->full_name); return; } - memset((void *)(*basep), 0, *sizep); + + tbl->it_base = (unsigned long)__va(*basep); + memset((void *)tbl->it_base, 0, *sizep); tbl->it_busno = phb->bus->number; @@ -353,7 +354,6 @@ if (phb->dma_window_base_cur > (1 << 19)) panic("PCI_DMA: Unexpected number of IOAs under this PHB.\n"); - tbl->it_base = *basep; tbl->it_index = 0; tbl->it_entrysize = sizeof(union tce_entry); tbl->it_blocksize = 16; @@ -427,7 +427,7 @@ * up the device tree to find it. */ for_each_pci_dev(dev) { - mydn = dn = PCI_GET_DN(dev); + mydn = dn = pci_device_to_OF_node(dev); while (dn && dn->iommu_table == NULL) dn = dn->parent; diff -Nru a/arch/ppc64/kernel/pSeries_pci.c b/arch/ppc64/kernel/pSeries_pci.c --- a/arch/ppc64/kernel/pSeries_pci.c 2004-11-29 21:22:08 -08:00 +++ b/arch/ppc64/kernel/pSeries_pci.c 2004-11-29 21:22:08 -08:00 @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -37,7 +36,6 @@ #include #include #include -#include #include #include #include @@ -53,7 +51,6 @@ static int s7a_workaround; -extern unsigned long pci_probe_only; extern struct mpic *pSeries_mpic; static int rtas_read_config(struct device_node *dn, int where, int size, u32 *val) @@ -152,13 +149,49 @@ rtas_pci_write_config }; -static void python_countermeasures(unsigned long addr) +static int is_python(struct device_node *dev) { + char *model = (char *)get_property(dev, "model", NULL); + + if (model && strstr(model, "Python")) + return 1; + + return 0; +} + +static int get_phb_reg_prop(struct device_node *dev, + unsigned int addr_size_words, + struct reg_property64 *reg) +{ + unsigned int *ui_ptr = NULL, len; + + /* Found a PHB, now figure out where his registers are mapped. */ + ui_ptr = (unsigned int *)get_property(dev, "reg", &len); + if (ui_ptr == NULL) + return 1; + + if (addr_size_words == 1) { + reg->address = ((struct reg_property32 *)ui_ptr)->address; + reg->size = ((struct reg_property32 *)ui_ptr)->size; + } else { + *reg = *((struct reg_property64 *)ui_ptr); + } + + return 0; +} + +static void python_countermeasures(struct device_node *dev, + unsigned int addr_size_words) +{ + struct reg_property64 reg_struct; void __iomem *chip_regs; volatile u32 val; + if (get_phb_reg_prop(dev, addr_size_words, ®_struct)) + return; + /* Python's register file is 1 MB in size. */ - chip_regs = ioremap(addr & ~(0xfffffUL), 0x100000); + chip_regs = ioremap(reg_struct.address & ~(0xfffffUL), 0x100000); /* * Firmware doesn't always clear this bit which is critical @@ -221,56 +254,8 @@ return buid; } -static enum phb_types get_phb_type(struct device_node *dev) -{ - enum phb_types type; - char *model; - - model = (char *)get_property(dev, "model", NULL); - - if (!model) { - printk(KERN_ERR "%s: phb has no model property\n", - __FUNCTION__); - model = ""; - } - - if (strstr(model, "Python")) { - type = phb_type_python; - } else if (strstr(model, "Speedwagon")) { - type = phb_type_speedwagon; - } else if (strstr(model, "Winnipeg")) { - type = phb_type_winnipeg; - } else { - printk(KERN_ERR "%s: unknown PHB %s\n", __FUNCTION__, model); - type = phb_type_unknown; - } - - return type; -} - -int get_phb_reg_prop(struct device_node *dev, unsigned int addr_size_words, - struct reg_property64 *reg) -{ - unsigned int *ui_ptr = NULL, len; - - /* Found a PHB, now figure out where his registers are mapped. */ - ui_ptr = (unsigned int *) get_property(dev, "reg", &len); - if (ui_ptr == NULL) { - PPCDBG(PPCDBG_PHBINIT, "\tget reg failed.\n"); - return 1; - } - - if (addr_size_words == 1) { - reg->address = ((struct reg_property32 *)ui_ptr)->address; - reg->size = ((struct reg_property32 *)ui_ptr)->size; - } else { - *reg = *((struct reg_property64 *)ui_ptr); - } - - return 0; -} - -int phb_set_bus_ranges(struct device_node *dev, struct pci_controller *phb) +static int phb_set_bus_ranges(struct device_node *dev, + struct pci_controller *phb) { int *bus_range; unsigned int len; @@ -286,51 +271,56 @@ return 0; } -static struct pci_controller *alloc_phb(struct device_node *dev, - unsigned int addr_size_words) +static int __devinit setup_phb(struct device_node *dev, + struct pci_controller *phb, + unsigned int addr_size_words) { - struct pci_controller *phb; - struct reg_property64 reg_struct; - enum phb_types phb_type; - struct property *of_prop; - int rc; - - phb_type = get_phb_type(dev); + pci_setup_pci_controller(phb); - rc = get_phb_reg_prop(dev, addr_size_words, ®_struct); - if (rc) - return NULL; + if (is_python(dev)) + python_countermeasures(dev, addr_size_words); - phb = pci_alloc_pci_controller(phb_type); - if (phb == NULL) - return NULL; - - if (phb_type == phb_type_python) - python_countermeasures(reg_struct.address); - - rc = phb_set_bus_ranges(dev, phb); - if (rc) - return NULL; + if (phb_set_bus_ranges(dev, phb)) + return 1; - of_prop = (struct property *)alloc_bootmem(sizeof(struct property) + - sizeof(phb->global_number)); + phb->arch_data = dev; + phb->ops = &rtas_pci_ops; + phb->buid = get_phb_buid(dev); - if (!of_prop) { - kfree(phb); - return NULL; - } + return 0; +} +static void __devinit add_linux_pci_domain(struct device_node *dev, + struct pci_controller *phb, + struct property *of_prop) +{ memset(of_prop, 0, sizeof(struct property)); of_prop->name = "linux,pci-domain"; of_prop->length = sizeof(phb->global_number); of_prop->value = (unsigned char *)&of_prop[1]; memcpy(of_prop->value, &phb->global_number, sizeof(phb->global_number)); prom_add_property(dev, of_prop); +} - phb->arch_data = dev; - phb->ops = &rtas_pci_ops; +static struct pci_controller * __init alloc_phb(struct device_node *dev, + unsigned int addr_size_words) +{ + struct pci_controller *phb; + struct property *of_prop; - phb->buid = get_phb_buid(dev); + phb = alloc_bootmem(sizeof(struct pci_controller)); + if (phb == NULL) + return NULL; + + of_prop = alloc_bootmem(sizeof(struct property) + + sizeof(phb->global_number)); + if (!of_prop) + return NULL; + + if (setup_phb(dev, phb, addr_size_words)) + return NULL; + + add_linux_pci_domain(dev, phb, of_prop); return phb; } @@ -338,33 +328,18 @@ static struct pci_controller * __devinit alloc_phb_dynamic(struct device_node *dev, unsigned int addr_size_words) { struct pci_controller *phb; - struct reg_property64 reg_struct; - enum phb_types phb_type; - int rc; - - phb_type = get_phb_type(dev); - rc = get_phb_reg_prop(dev, addr_size_words, ®_struct); - if (rc) - return NULL; - - phb = pci_alloc_phb_dynamic(phb_type); + phb = (struct pci_controller *)kmalloc(sizeof(struct pci_controller), + GFP_KERNEL); if (phb == NULL) return NULL; - if (phb_type == phb_type_python) - python_countermeasures(reg_struct.address); - - rc = phb_set_bus_ranges(dev, phb); - if (rc) + if (setup_phb(dev, phb, addr_size_words)) return NULL; - /* TODO: linux,pci-domain? */ - - phb->arch_data = dev; - phb->ops = &rtas_pci_ops; + phb->is_dynamic = 1; - phb->buid = get_phb_buid(dev); + /* TODO: linux,pci-domain? */ return phb; } @@ -411,6 +386,24 @@ of_node_put(root); pci_devs_phb_init(); + /* + * pci_probe_only and pci_assign_all_buses can be set via properties + * in chosen. + */ + if (of_chosen) { + int *prop; + + prop = (int *)get_property(of_chosen, "linux,pci-probe-only", + NULL); + if (prop) + pci_probe_only = *prop; + + prop = (int *)get_property(of_chosen, + "linux,pci-assign-all-buses", NULL); + if (prop) + pci_assign_all_buses = *prop; + } + return 0; } @@ -568,3 +561,30 @@ pci_addr_cache_build(); } +/* + * Assume the winbond 82c105 is the IDE controller on a + * p610. We should probably be more careful in case + * someone tries to plug in a similar adapter. + */ +static void fixup_winbond_82c105(struct pci_dev* dev) +{ + int i; + unsigned int reg; + + if (!(systemcfg->platform & PLATFORM_PSERIES)) + return; + + printk("Using INTC for W82c105 IDE controller.\n"); + pci_read_config_dword(dev, 0x40, ®); + /* Enable LEGIRQ to use INTC instead of ISA interrupts */ + pci_write_config_dword(dev, 0x40, reg | (1<<11)); + + for (i = 0; i < DEVICE_COUNT_RESOURCE; ++i) { + /* zap the 2nd function of the winbond chip */ + if (dev->resource[i].flags & IORESOURCE_IO + && dev->bus->number == 0 && dev->devfn == 0x81) + dev->resource[i].flags &= ~IORESOURCE_IO; + } +} +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105, + fixup_winbond_82c105); diff -Nru a/arch/ppc64/kernel/pacaData.c b/arch/ppc64/kernel/pacaData.c --- a/arch/ppc64/kernel/pacaData.c 2004-11-29 21:22:08 -08:00 +++ b/arch/ppc64/kernel/pacaData.c 2004-11-29 21:22:08 -08:00 @@ -58,6 +58,7 @@ .stab_real = (asrr), /* Real pointer to segment table */ \ .stab_addr = (asrv), /* Virt pointer to segment table */ \ .cpu_start = (start), /* Processor start */ \ + .hw_cpu_id = 0xffff, \ .lppaca = { \ .xDesc = 0xd397d781, /* "LpPa" */ \ .xSize = sizeof(struct ItLpPaca), \ diff -Nru a/arch/ppc64/kernel/pci.c b/arch/ppc64/kernel/pci.c --- a/arch/ppc64/kernel/pci.c 2004-11-29 21:22:08 -08:00 +++ b/arch/ppc64/kernel/pci.c 2004-11-29 21:22:08 -08:00 @@ -16,14 +16,9 @@ #include #include #include -#include #include #include -#include -#include -#include #include -#include #include #include @@ -33,11 +28,8 @@ #include #include #include -#include -#include -#include -#include #include +#include #include "pci.h" @@ -50,8 +42,10 @@ unsigned long pci_probe_only = 1; unsigned long pci_assign_all_buses = 0; -/* legal IO pages under MAX_ISA_PORT. This is to ensure we don't touch - devices we don't have access to. */ +/* + * legal IO pages under MAX_ISA_PORT. This is to ensure we don't touch + * devices we don't have access to. + */ unsigned long io_page_mask; EXPORT_SYMBOL(io_page_mask); @@ -93,30 +87,6 @@ } DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TRIDENT, PCI_ANY_ID, fixup_broken_pcnet32); -static void fixup_windbond_82c105(struct pci_dev* dev) -{ - /* Assume the windbond 82c105 is the IDE controller on a - * p610. We should probably be more careful in case - * someone tries to plug in a similar adapter. - */ - int i; - unsigned int reg; - - printk("Using INTC for W82c105 IDE controller.\n"); - pci_read_config_dword(dev, 0x40, ®); - /* Enable LEGIRQ to use INTC instead of ISA interrupts */ - pci_write_config_dword(dev, 0x40, reg | (1<<11)); - - for (i = 0; i < DEVICE_COUNT_RESOURCE; ++i) { - /* zap the 2nd function of the winbond chip */ - if (dev->resource[i].flags & IORESOURCE_IO - && dev->bus->number == 0 && dev->devfn == 0x81) - dev->resource[i].flags &= ~IORESOURCE_IO; - } -} -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105, - fixup_windbond_82c105); - void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, struct resource *res) { @@ -187,93 +157,19 @@ res->start = start; } -static void phb_set_model(struct pci_controller *hose, - enum phb_types controller_type) -{ - char *model; - - switch(controller_type) { -#ifdef CONFIG_PPC_ISERIES - case phb_type_hypervisor: - model = "PHB HV"; - break; -#endif - case phb_type_python: - model = "PHB PY"; - break; - case phb_type_speedwagon: - model = "PHB SW"; - break; - case phb_type_winnipeg: - model = "PHB WP"; - break; - case phb_type_apple: - model = "PHB APPLE"; - break; - default: - model = "PHB UK"; - break; - } - - if(strlen(model) < 8) - strcpy(hose->what,model); - else - memcpy(hose->what,model,7); -} -/* - * Allocate pci_controller(phb) initialized common variables. - */ -struct pci_controller * __init pci_alloc_pci_controller(enum phb_types controller_type) -{ - struct pci_controller *hose; - -#ifdef CONFIG_PPC_ISERIES - hose = (struct pci_controller *)kmalloc(sizeof(struct pci_controller), - GFP_KERNEL); -#else - hose = (struct pci_controller *)alloc_bootmem(sizeof(struct pci_controller)); -#endif - if (hose == NULL) { - printk(KERN_ERR "PCI: Allocate pci_controller failed.\n"); - return NULL; - } - memset(hose, 0, sizeof(struct pci_controller)); - - phb_set_model(hose, controller_type); - - hose->is_dynamic = 0; - hose->type = controller_type; - hose->global_number = global_phb_number++; - - list_add_tail(&hose->list_node, &hose_list); - - return hose; -} +static spinlock_t hose_spinlock = SPIN_LOCK_UNLOCKED; /* - * Dymnamically allocate pci_controller(phb), initialize common variables. + * pci_controller(phb) initialized common variables. */ -struct pci_controller * pci_alloc_phb_dynamic(enum phb_types controller_type) +void __devinit pci_setup_pci_controller(struct pci_controller *hose) { - struct pci_controller *hose; - - hose = (struct pci_controller *)kmalloc(sizeof(struct pci_controller), - GFP_KERNEL); - if(hose == NULL) { - printk(KERN_ERR "PCI: Allocate pci_controller failed.\n"); - return NULL; - } memset(hose, 0, sizeof(struct pci_controller)); - phb_set_model(hose, controller_type); - - hose->is_dynamic = 1; - hose->type = controller_type; + spin_lock(&hose_spinlock); hose->global_number = global_phb_number++; - list_add_tail(&hose->list_node, &hose_list); - - return hose; + spin_unlock(&hose_spinlock); } static void __init pcibios_claim_one_bus(struct pci_bus *b) @@ -702,7 +598,7 @@ struct device_node *isa_dn; hose->io_base_virt = reserve_phb_iospace(size); - PPCDBG(PPCDBG_PHBINIT, "phb%d io_base_phys 0x%lx io_base_virt 0x%lx\n", + DBG("phb%d io_base_phys 0x%lx io_base_virt 0x%lx\n", hose->global_number, hose->io_base_phys, (unsigned long) hose->io_base_virt); @@ -733,7 +629,7 @@ hose->io_base_virt = __ioremap(hose->io_base_phys, size, _PAGE_NO_CACHE); - PPCDBG(PPCDBG_PHBINIT, "phb%d io_base_phys 0x%lx io_base_virt 0x%lx\n", + DBG("phb%d io_base_phys 0x%lx io_base_virt 0x%lx\n", hose->global_number, hose->io_base_phys, (unsigned long) hose->io_base_virt); @@ -833,13 +729,10 @@ } -/*********************************************************************** - * pci_find_hose_for_OF_device - * +/* * This function finds the PHB that matching device_node in the * OpenFirmware by scanning all the pci_controllers. - * - ***********************************************************************/ + */ struct pci_controller* pci_find_hose_for_OF_device(struct device_node *node) { while (node) { @@ -922,9 +815,6 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus) { struct pci_controller *hose = PCI_GET_PHB_PTR(bus); - struct list_head *ln; - - /* XXX or bus->parent? */ struct pci_dev *dev = bus->self; struct resource *res; int i; @@ -934,18 +824,13 @@ hose->bus = bus; bus->resource[0] = res = &hose->io_resource; - if (!res->flags) - BUG(); /* No I/O resource for this PHB? */ - if (request_resource(&ioport_resource, res)) + if (res->flags && request_resource(&ioport_resource, res)) printk(KERN_ERR "Failed to request IO on " "PCI domain %d\n", pci_domain_nr(bus)); - for (i = 0; i < 3; ++i) { res = &hose->mem_resources[i]; - if (!res->flags && i == 0) - BUG(); /* No memory resource for this PHB? */ bus->resource[i+1] = res; if (res->flags && request_resource(&iomem_resource, res)) printk(KERN_ERR "Failed to request MEM on " @@ -960,56 +845,41 @@ pcibios_fixup_device_resources(dev, bus); } - /* XXX Need to check why Alpha doesnt do this - Anton */ if (!pci_probe_only) return; - for (ln = bus->devices.next; ln != &bus->devices; ln = ln->next) { - struct pci_dev *dev = pci_dev_b(ln); + list_for_each_entry(dev, &bus->devices, bus_list) { if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI) pcibios_fixup_device_resources(dev, bus); } } EXPORT_SYMBOL(pcibios_fixup_bus); -/****************************************************************** - * pci_read_irq_line - * - * Reads the Interrupt Pin to determine if interrupt is use by card. +/* + * Reads the interrupt pin to determine if interrupt is use by card. * If the interrupt is used, then gets the interrupt line from the * openfirmware and sets it in the pci_dev and pci_config line. - * - ******************************************************************/ + */ int pci_read_irq_line(struct pci_dev *pci_dev) { u8 intpin; struct device_node *node; pci_read_config_byte(pci_dev, PCI_INTERRUPT_PIN, &intpin); - - if (intpin == 0) { - PPCDBG(PPCDBG_BUSWALK,"\tDevice: %s No Interrupt used by device.\n", - pci_name(pci_dev)); - return 0; - } + if (intpin == 0) + return 0; node = pci_device_to_OF_node(pci_dev); - if (node == NULL) { - PPCDBG(PPCDBG_BUSWALK,"\tDevice: %s Device Node not found.\n", - pci_name(pci_dev)); - return -1; - } - if (node->n_intrs == 0) { - PPCDBG(PPCDBG_BUSWALK,"\tDevice: %s No Device OF interrupts defined.\n", - pci_name(pci_dev)); - return -1; - } + if (node == NULL) + return -1; + + if (node->n_intrs == 0) + return -1; + pci_dev->irq = node->intrs[0].line; pci_write_config_byte(pci_dev, PCI_INTERRUPT_LINE, pci_dev->irq); - - PPCDBG(PPCDBG_BUSWALK,"\tDevice: %s pci_dev->irq = 0x%02X\n", - pci_name(pci_dev), pci_dev->irq); + return 0; } EXPORT_SYMBOL(pci_read_irq_line); diff -Nru a/arch/ppc64/kernel/pci.h b/arch/ppc64/kernel/pci.h --- a/arch/ppc64/kernel/pci.h 2004-11-29 21:22:06 -08:00 +++ b/arch/ppc64/kernel/pci.h 2004-11-29 21:22:06 -08:00 @@ -14,8 +14,7 @@ extern unsigned long isa_io_base; -extern struct pci_controller* pci_alloc_pci_controller(enum phb_types controller_type); -extern struct pci_controller* pci_alloc_phb_dynamic(enum phb_types controller_type); +extern void pci_setup_pci_controller(struct pci_controller *hose); extern void pci_setup_phb_io(struct pci_controller *hose, int primary); extern struct pci_controller* pci_find_hose_for_OF_device(struct device_node* node); @@ -25,16 +24,11 @@ extern struct list_head hose_list; extern int global_phb_number; -/******************************************************************* - * Platform functions that are brand specific implementation. - *******************************************************************/ extern unsigned long find_and_init_phbs(void); extern struct pci_dev *ppc64_isabridge_dev; /* may be NULL if no ISA bus */ -/******************************************************************* - * PCI device_node operations - *******************************************************************/ +/* PCI device_node operations */ struct device_node; typedef void *(*traverse_func)(struct device_node *me, void *data); void *traverse_pci_devices(struct device_node *start, traverse_func pre, @@ -55,5 +49,8 @@ void init_pci_config_tokens (void); unsigned long get_phb_buid (struct device_node *); +extern unsigned long pci_probe_only; +extern unsigned long pci_assign_all_buses; +extern int pci_read_irq_line(struct pci_dev *pci_dev); #endif /* __PPC_KERNEL_PCI_H__ */ diff -Nru a/arch/ppc64/kernel/pci_iommu.c b/arch/ppc64/kernel/pci_iommu.c --- a/arch/ppc64/kernel/pci_iommu.c 2004-11-29 21:22:08 -08:00 +++ b/arch/ppc64/kernel/pci_iommu.c 2004-11-29 21:22:08 -08:00 @@ -43,6 +43,13 @@ #include #endif /* CONFIG_PPC_ISERIES */ +/* + * We can use ->sysdata directly and avoid the extra work in + * pci_device_to_OF_node since ->sysdata will have been initialised + * in the iommu init code for all devices. + */ +#define PCI_GET_DN(dev) ((struct device_node *)((dev)->sysdata)) + static inline struct iommu_table *devnode_table(struct pci_dev *dev) { if (!dev) diff -Nru a/arch/ppc64/kernel/pmac_pci.c b/arch/ppc64/kernel/pmac_pci.c --- a/arch/ppc64/kernel/pmac_pci.c 2004-11-29 21:22:08 -08:00 +++ b/arch/ppc64/kernel/pmac_pci.c 2004-11-29 21:22:08 -08:00 @@ -39,9 +39,6 @@ #define DBG(x...) #endif -extern int pci_probe_only; -extern int pci_read_irq_line(struct pci_dev *pci_dev); - /* XXX Could be per-controller, but I don't think we risk anything by * assuming we won't have both UniNorth and Bandit */ static int has_uninorth; @@ -507,7 +504,7 @@ dt_ranges = (unsigned int *) get_property(dev, "ranges", &rlen); if (!dt_ranges) return; - /* lc_ranges = (unsigned int *) alloc_bootmem(rlen);*/ + /* lc_ranges = alloc_bootmem(rlen);*/ lc_ranges = static_lc_ranges; if (!lc_ranges) return; /* what can we do here ? */ @@ -617,15 +614,17 @@ dev->full_name); } - hose = pci_alloc_pci_controller(phb_type_apple); - if (!hose) - return -ENOMEM; + hose = alloc_bootmem(sizeof(struct pci_controller)); + if (hose == NULL) + return -ENOMEM; + pci_setup_pci_controller(hose); + hose->arch_data = dev; hose->first_busno = bus_range ? bus_range[0] : 0; hose->last_busno = bus_range ? bus_range[1] : 0xff; - of_prop = (struct property *)alloc_bootmem(sizeof(struct property) + - sizeof(hose->global_number)); + of_prop = alloc_bootmem(sizeof(struct property) + + sizeof(hose->global_number)); if (of_prop) { memset(of_prop, 0, sizeof(struct property)); of_prop->name = "linux,pci-domain"; diff -Nru a/arch/ppc64/kernel/prom.c b/arch/ppc64/kernel/prom.c --- a/arch/ppc64/kernel/prom.c 2004-11-29 21:22:08 -08:00 +++ b/arch/ppc64/kernel/prom.c 2004-11-29 21:22:08 -08:00 @@ -441,7 +441,7 @@ if (rp != 0 && l >= sizeof(struct isa_reg_property)) { i = 0; adr = (struct address_range *) mem_start; - while ((l -= sizeof(struct reg_property)) >= 0) { + while ((l -= sizeof(struct isa_reg_property)) >= 0) { if (!measure_only) { adr[i].space = rp[i].space; adr[i].address = rp[i].address; @@ -823,7 +823,7 @@ strlcpy(cmd_line, p, min(l, COMMAND_LINE_SIZE)); } #ifdef CONFIG_CMDLINE - if (l == 0) /* dbl check */ + if (l == 0 || (l == 1 && (*p) == 0)) strlcpy(cmd_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE); #endif /* CONFIG_CMDLINE */ @@ -853,10 +853,19 @@ } } - /* Check if it's the boot-cpu, set it's hw index in paca now */ - if (get_flat_dt_prop(node, "linux,boot-cpu", NULL) != NULL) { - u32 *prop = get_flat_dt_prop(node, "reg", NULL); - paca[0].hw_cpu_id = prop == NULL ? 0 : *prop; + if (initial_boot_params && initial_boot_params->version >= 2) { + /* version 2 of the kexec param format adds the phys cpuid + * of booted proc. + */ + boot_cpuid_phys = initial_boot_params->boot_cpuid_phys; + boot_cpuid = 0; + } else { + /* Check if it's the boot-cpu, set it's hw index in paca now */ + if (get_flat_dt_prop(node, "linux,boot-cpu", NULL) != NULL) { + u32 *prop = get_flat_dt_prop(node, "reg", NULL); + set_hard_smp_processor_id(0, prop == NULL ? 0 : *prop); + boot_cpuid_phys = get_hard_smp_processor_id(0); + } } return 0; @@ -1023,6 +1032,7 @@ scan_flat_dt(early_init_dt_scan_memory, NULL); lmb_analyze(); systemcfg->physicalMemorySize = lmb_phys_mem_size(); + lmb_reserve(0, __pa(klimit)); DBG("Phys. mem: %lx\n", systemcfg->physicalMemorySize); diff -Nru a/arch/ppc64/kernel/prom_init.c b/arch/ppc64/kernel/prom_init.c --- a/arch/ppc64/kernel/prom_init.c 2004-11-29 21:22:08 -08:00 +++ b/arch/ppc64/kernel/prom_init.c 2004-11-29 21:22:08 -08:00 @@ -701,9 +701,9 @@ { unsigned long offset = reloc_offset(); struct prom_t *_prom = PTRRELOC(&prom); - phandle prom_rtas; - u64 base, entry = 0; - u32 size = 0; + phandle prom_rtas, rtas_node; + u32 base, entry = 0; + u32 size = 0; prom_debug("prom_instantiate_rtas: start...\n"); @@ -723,12 +723,12 @@ } prom_printf("instantiating rtas at 0x%x", base); - prom_rtas = call_prom("open", 1, 1, ADDR("/rtas")); + rtas_node = call_prom("open", 1, 1, ADDR("/rtas")); prom_printf("..."); if (call_prom("call-method", 3, 2, ADDR("instantiate-rtas"), - prom_rtas, base) != PROM_ERROR) { + rtas_node, base) != PROM_ERROR) { entry = (long)_prom->args.rets[1]; } if (entry == 0) { @@ -739,9 +739,8 @@ reserve_mem(base, size); - prom_setprop(_prom->chosen, "linux,rtas-base", &base, sizeof(base)); - prom_setprop(_prom->chosen, "linux,rtas-entry", &entry, sizeof(entry)); - prom_setprop(_prom->chosen, "linux,rtas-size", &size, sizeof(size)); + prom_setprop(prom_rtas, "linux,rtas-base", &base, sizeof(base)); + prom_setprop(prom_rtas, "linux,rtas-entry", &entry, sizeof(entry)); prom_debug("rtas base = 0x%x\n", base); prom_debug("rtas entry = 0x%x\n", entry); @@ -761,7 +760,7 @@ unsigned long offset = reloc_offset(); char compatible[64], type[64], model[64]; char *path = RELOC(prom_scratch); - u64 base, vbase, align; + u64 base, align; u32 minalign, minsize; u64 tce_entry, *tce_entryp; u64 local_alloc_top, local_alloc_bottom; @@ -833,12 +832,9 @@ if (base < local_alloc_bottom) local_alloc_bottom = base; - vbase = (unsigned long)abs_to_virt(base); - /* Save away the TCE table attributes for later use. */ - prom_setprop(node, "linux,tce-base", &vbase, sizeof(vbase)); + prom_setprop(node, "linux,tce-base", &base, sizeof(base)); prom_setprop(node, "linux,tce-size", &minsize, sizeof(minsize)); - prom_setprop(node, "linux,has-tce-table", NULL, 0); /* It seems OF doesn't null-terminate the path :-( */ memset(path, 0, sizeof(path)); @@ -992,13 +988,13 @@ /* Primary Thread of non-boot cpu */ prom_printf("%x : starting cpu hw idx %x... ", cpuid, reg); call_prom("start-cpu", 3, 0, node, - secondary_hold, cpuid); + secondary_hold, reg); for ( i = 0 ; (i < 100000000) && (*acknowledge == ((unsigned long)-1)); i++ ) mb(); - if (*acknowledge == cpuid) { + if (*acknowledge == reg) { prom_printf("done\n"); /* We have to get every CPU out of OF, * even if we never start it. */ @@ -1605,11 +1601,6 @@ prom_init_stdout(); prom_debug("klimit=0x%x\n", RELOC(klimit)); prom_debug("offset=0x%x\n", offset); - - /* - * Reserve kernel in reserve map - */ - reserve_mem(0, __pa(RELOC(klimit))); /* * Check for an initrd diff -Nru a/arch/ppc64/kernel/rtas.c b/arch/ppc64/kernel/rtas.c --- a/arch/ppc64/kernel/rtas.c 2004-11-29 21:22:06 -08:00 +++ b/arch/ppc64/kernel/rtas.c 2004-11-29 21:22:06 -08:00 @@ -102,6 +102,27 @@ return tokp ? *tokp : RTAS_UNKNOWN_SERVICE; } +/* + * Return the firmware-specified size of the error log buffer + * for all rtas calls that require an error buffer argument. + * This includes 'check-exception' and 'rtas-last-error'. + */ +int rtas_get_error_log_max(void) +{ + static int rtas_error_log_max; + if (rtas_error_log_max) + return rtas_error_log_max; + + rtas_error_log_max = rtas_token ("rtas-error-log-max"); + if ((rtas_error_log_max == RTAS_UNKNOWN_SERVICE) || + (rtas_error_log_max > RTAS_ERROR_LOG_MAX)) { + printk (KERN_WARNING "RTAS: bad log buffer size %d\n", rtas_error_log_max); + rtas_error_log_max = RTAS_ERROR_LOG_MAX; + } + return rtas_error_log_max; +} + + /** Return a copy of the detailed error text associated with the * most recent failed call to rtas. Because the error text * might go stale if there are any other intervening rtas calls, @@ -114,12 +135,7 @@ struct rtas_args err_args, save_args; u32 bufsz; - bufsz = rtas_token ("rtas-error-log-max"); - if ((bufsz == RTAS_UNKNOWN_SERVICE) || - (bufsz > RTAS_ERROR_LOG_MAX)) { - printk (KERN_WARNING "RTAS: bad log buffer size %d\n", bufsz); - bufsz = RTAS_ERROR_LOG_MAX; - } + bufsz = rtas_get_error_log_max(); err_args.token = rtas_token("rtas-last-error"); err_args.nargs = 2; @@ -439,6 +455,9 @@ { int status; + if (RTAS_UNKNOWN_SERVICE == rtas_token("ibm,os-term")) + return; + snprintf(rtas_os_term_buf, 2048, "OS panic: %s", str); do { @@ -542,26 +561,6 @@ } /* - * Return the firmware-specified size of the error log buffer - * for all rtas calls that require an error buffer argument. - * This includes 'check-exception' and 'rtas-last-error'. - */ -int rtas_get_error_log_max(void) -{ - static int rtas_error_log_max; - if (rtas_error_log_max) - return rtas_error_log_max; - - rtas_error_log_max = rtas_token ("rtas-error-log-max"); - if ((rtas_error_log_max == RTAS_UNKNOWN_SERVICE) || - (rtas_error_log_max > RTAS_ERROR_LOG_MAX)) { - printk (KERN_WARNING "RTAS: bad log buffer size %d\n", rtas_error_log_max); - rtas_error_log_max = RTAS_ERROR_LOG_MAX; - } - return rtas_error_log_max; -} - -/* * Call early during boot, before mem init or bootmem, to retreive the RTAS * informations from the device-tree and allocate the RMO buffer for userland * accesses. @@ -573,15 +572,15 @@ */ rtas.dev = of_find_node_by_name(NULL, "rtas"); if (rtas.dev) { - u64 *basep, *entryp; + u32 *basep, *entryp; u32 *sizep; - basep = (u64 *)get_property(of_chosen, "linux,rtas-base", NULL); - sizep = (u32 *)get_property(of_chosen, "linux,rtas-size", NULL); + basep = (u32 *)get_property(rtas.dev, "linux,rtas-base", NULL); + sizep = (u32 *)get_property(rtas.dev, "rtas-size", NULL); if (basep != NULL && sizep != NULL) { rtas.base = *basep; rtas.size = *sizep; - entryp = (u64 *)get_property(of_chosen, "linux,rtas-entry", NULL); + entryp = (u32 *)get_property(rtas.dev, "linux,rtas-entry", NULL); if (entryp == NULL) /* Ugh */ rtas.entry = rtas.base; else diff -Nru a/arch/ppc64/kernel/rtasd.c b/arch/ppc64/kernel/rtasd.c --- a/arch/ppc64/kernel/rtasd.c 2004-11-29 21:22:07 -08:00 +++ b/arch/ppc64/kernel/rtasd.c 2004-11-29 21:22:07 -08:00 @@ -48,7 +48,7 @@ static int full_rtas_msgs = 0; -extern volatile int no_more_logging; +extern int no_logging; volatile int error_log_cnt = 0; @@ -213,7 +213,7 @@ } /* Write error to NVRAM */ - if (!no_more_logging && !(err_type & ERR_FLAG_BOOT)) + if (!no_logging && !(err_type & ERR_FLAG_BOOT)) nvram_write_error_log(buf, len, err_type); /* @@ -225,8 +225,8 @@ printk_log_rtas(buf, len); /* Check to see if we need to or have stopped logging */ - if (fatal || no_more_logging) { - no_more_logging = 1; + if (fatal || no_logging) { + no_logging = 1; spin_unlock_irqrestore(&rtasd_log_lock, s); return; } @@ -299,7 +299,7 @@ spin_lock_irqsave(&rtasd_log_lock, s); /* if it's 0, then we know we got the last one (the one in NVRAM) */ - if (rtas_log_size == 0 && !no_more_logging) + if (rtas_log_size == 0 && !no_logging) nvram_clear_error_log(); spin_unlock_irqrestore(&rtasd_log_lock, s); @@ -417,9 +417,6 @@ goto error; } - /* We can use rtas_log_buf now */ - no_more_logging = 0; - printk(KERN_ERR "RTAS daemon started\n"); DEBUG("will sleep for %d jiffies\n", (HZ*60/rtas_event_scan_rate) / 2); @@ -428,6 +425,10 @@ memset(logdata, 0, rtas_error_log_max); rc = nvram_read_error_log(logdata, rtas_error_log_max, &err_type); + + /* We can use rtas_log_buf now */ + no_logging = 0; + if (!rc) { if (err_type != ERR_FLAG_ALREADY_LOGGED) { pSeries_log_error(logdata, err_type | ERR_FLAG_BOOT, 0); diff -Nru a/arch/ppc64/kernel/rtc.c b/arch/ppc64/kernel/rtc.c --- a/arch/ppc64/kernel/rtc.c 2004-11-29 21:22:07 -08:00 +++ b/arch/ppc64/kernel/rtc.c 2004-11-29 21:22:07 -08:00 @@ -185,11 +185,10 @@ .release = rtc_release, }; -static struct miscdevice rtc_dev= -{ - RTC_MINOR, - "rtc", - &rtc_fops +static struct miscdevice rtc_dev = { + .minor = RTC_MINOR, + .name = "rtc", + .fops = &rtc_fops }; static int __init rtc_init(void) @@ -201,9 +200,11 @@ return retval; #ifdef CONFIG_PROC_FS - if (create_proc_read_entry ("driver/rtc", 0, NULL, rtc_read_proc, NULL) == NULL) + if (create_proc_read_entry("driver/rtc", 0, NULL, rtc_read_proc, NULL) + == NULL) { misc_deregister(&rtc_dev); return -ENOMEM; + } #endif printk(KERN_INFO "i/pSeries Real Time Clock Driver v" RTC_VERSION "\n"); @@ -356,7 +357,7 @@ } } while (error == RTAS_CLOCK_BUSY && (__get_tb() < max_wait_tb)); - if (error != 0) { + if (error != 0 && printk_ratelimit()) { printk(KERN_WARNING "error: reading the clock failed (%d)\n", error); return; @@ -384,7 +385,7 @@ do { error = rtas_call(rtas_token("get-time-of-day"), 0, 8, ret); if (error == RTAS_CLOCK_BUSY || rtas_is_extended_busy(error)) { - if (in_interrupt()) { + if (in_interrupt() && printk_ratelimit()) { printk(KERN_WARNING "error: reading clock would delay interrupt\n"); return; /* delay not allowed */ } @@ -395,7 +396,7 @@ } } while (error == RTAS_CLOCK_BUSY && (__get_tb() < max_wait_tb)); - if (error != 0) { + if (error != 0 && printk_ratelimit()) { printk(KERN_WARNING "error: reading the clock failed (%d)\n", error); return; @@ -430,7 +431,7 @@ } } while (error == RTAS_CLOCK_BUSY && (__get_tb() < max_wait_tb)); - if (error != 0) + if (error != 0 && printk_ratelimit()) printk(KERN_WARNING "error: setting the clock failed (%d)\n", error); diff -Nru a/arch/ppc64/kernel/setup.c b/arch/ppc64/kernel/setup.c --- a/arch/ppc64/kernel/setup.c 2004-11-29 21:22:07 -08:00 +++ b/arch/ppc64/kernel/setup.c 2004-11-29 21:22:07 -08:00 @@ -99,6 +99,8 @@ extern void early_init_devtree(void *flat_dt); extern void unflatten_device_tree(void); +extern void smp_release_cpus(void); + unsigned long decr_overclock = 1; unsigned long decr_overclock_proc0 = 1; unsigned long decr_overclock_set = 0; @@ -106,6 +108,7 @@ int have_of = 1; int boot_cpuid = 0; +int boot_cpuid_phys = 0; dev_t boot_dev; /* @@ -242,6 +245,7 @@ { struct device_node *dn = NULL; int cpu = 0; + int swap_cpuid = 0; check_smt_enabled(); @@ -266,11 +270,23 @@ cpu_set(cpu, cpu_present_map); set_hard_smp_processor_id(cpu, intserv[j]); } + if (intserv[j] == boot_cpuid_phys) + swap_cpuid = cpu; cpu_set(cpu, cpu_possible_map); cpu++; } } + /* Swap CPU id 0 with boot_cpuid_phys, so we can always assume that + * boot cpu is logical 0. + */ + if (boot_cpuid_phys != get_hard_smp_processor_id(0)) { + u32 tmp; + tmp = get_hard_smp_processor_id(0); + set_hard_smp_processor_id(0, boot_cpuid_phys); + set_hard_smp_processor_id(swap_cpuid, tmp); + } + /* * On pSeries LPAR, we need to know how many cpus * could possibly be added to this partition. @@ -630,6 +646,11 @@ * iSeries has already initialized the cpu maps at this point. */ setup_cpu_maps(); + + /* Release secondary cpus out of their spinloops at 0x60 now that + * we can map physical -> logical CPU ids + */ + smp_release_cpus(); #endif /* defined(CONFIG_SMP) && !defined(CONFIG_PPC_ISERIES) */ printk("Starting Linux PPC64 %s\n", UTS_RELEASE); diff -Nru a/arch/ppc64/kernel/sysfs.c b/arch/ppc64/kernel/sysfs.c --- a/arch/ppc64/kernel/sysfs.c 2004-11-29 21:22:06 -08:00 +++ b/arch/ppc64/kernel/sysfs.c 2004-11-29 21:22:06 -08:00 @@ -17,8 +17,7 @@ /* SMT stuff */ -#ifndef CONFIG_PPC_ISERIES - +#ifdef CONFIG_PPC_MULTIPLATFORM /* default to snooze disabled */ DEFINE_PER_CPU(unsigned long, smt_snooze_delay); @@ -94,19 +93,6 @@ } __setup("smt-snooze-delay=", setup_smt_snooze_delay); -#endif - - -/* PMC stuff */ - -#ifdef CONFIG_PPC_ISERIES -void ppc64_enable_pmcs(void) -{ - /* XXX Implement for iseries */ -} -#endif - -#ifdef CONFIG_PPC_MULTIPLATFORM /* * Enabling PMCs will slow partition context switch times so we only do * it the first time we write to the PMCs. @@ -182,6 +168,14 @@ mtspr(CTRLT, ctrl); } #endif /* CONFIG_PPC_PSERIES */ +} + +#else + +/* PMC stuff */ +void ppc64_enable_pmcs(void) +{ + /* XXX Implement for iseries */ } #endif /* CONFIG_PPC_MULTIPLATFORM */ diff -Nru a/arch/ppc64/kernel/udbg.c b/arch/ppc64/kernel/udbg.c --- a/arch/ppc64/kernel/udbg.c 2004-11-29 21:22:06 -08:00 +++ b/arch/ppc64/kernel/udbg.c 2004-11-29 21:22:06 -08:00 @@ -56,28 +56,17 @@ void udbg_init_uart(void __iomem *comport, unsigned int speed) { - u8 dll = 12; + u16 dll = speed ? (115200 / speed) : 12; - switch(speed) { - case 115200: - dll = 1; - break; - case 57600: - dll = 2; - break; - case 38400: - dll = 3; - break; - } if (comport) { udbg_comport = (struct NS16550 __iomem *)comport; out_8(&udbg_comport->lcr, 0x00); out_8(&udbg_comport->ier, 0xff); out_8(&udbg_comport->ier, 0x00); out_8(&udbg_comport->lcr, 0x80); /* Access baud rate */ - out_8(&udbg_comport->dll, dll); /* 1 = 115200, 2 = 57600, + out_8(&udbg_comport->dll, dll & 0xff); /* 1 = 115200, 2 = 57600, 3 = 38400, 12 = 9600 baud */ - out_8(&udbg_comport->dlm, 0x00); /* dll >> 8 which should be zero + out_8(&udbg_comport->dlm, dll >> 8); /* dll >> 8 which should be zero for fast rates; */ out_8(&udbg_comport->lcr, 0x03); /* 8 data, 1 stop, no parity */ out_8(&udbg_comport->mcr, 0x03); /* RTS/DTR */ diff -Nru a/arch/ppc64/lib/Makefile b/arch/ppc64/lib/Makefile --- a/arch/ppc64/lib/Makefile 2004-11-29 21:22:08 -08:00 +++ b/arch/ppc64/lib/Makefile 2004-11-29 21:22:08 -08:00 @@ -15,3 +15,4 @@ obj-$(CONFIG_PCI) += e2a.o endif +lib-$(CONFIG_XMON) += sstep.o diff -Nru a/arch/ppc64/lib/sstep.c b/arch/ppc64/lib/sstep.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/lib/sstep.c 2004-11-29 21:22:09 -08:00 @@ -0,0 +1,141 @@ +/* + * Single-step support. + * + * Copyright (C) 2004 Paul Mackerras , IBM + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ +#include +#include +#include +#include + +extern char SystemCall_common[]; + +/* Bits in SRR1 that are copied from MSR */ +#define MSR_MASK 0xffffffff87c0ffff + +/* + * Determine whether a conditional branch instruction would branch. + */ +static int branch_taken(unsigned int instr, struct pt_regs *regs) +{ + unsigned int bo = (instr >> 21) & 0x1f; + unsigned int bi; + + if ((bo & 4) == 0) { + /* decrement counter */ + --regs->ctr; + if (((bo >> 1) & 1) ^ (regs->ctr == 0)) + return 0; + } + if ((bo & 0x10) == 0) { + /* check bit from CR */ + bi = (instr >> 16) & 0x1f; + if (((regs->ccr >> (31 - bi)) & 1) != ((bo >> 3) & 1)) + return 0; + } + return 1; +} + +/* + * Emulate instructions that cause a transfer of control. + * Returns 1 if the step was emulated, 0 if not, + * or -1 if the instruction is one that should not be stepped, + * such as an rfid, or a mtmsrd that would clear MSR_RI. + */ +int emulate_step(struct pt_regs *regs, unsigned int instr) +{ + unsigned int opcode, rd; + unsigned long int imm; + + opcode = instr >> 26; + switch (opcode) { + case 16: /* bc */ + imm = (signed short)(instr & 0xfffc); + if ((instr & 2) == 0) + imm += regs->nip; + regs->nip += 4; + if ((regs->msr & MSR_SF) == 0) + regs->nip &= 0xffffffffUL; + if (instr & 1) + regs->link = regs->nip; + if (branch_taken(instr, regs)) + regs->nip = imm; + return 1; + case 17: /* sc */ + /* + * N.B. this uses knowledge about how the syscall + * entry code works. If that is changed, this will + * need to be changed also. + */ + regs->gpr[9] = regs->gpr[13]; + regs->gpr[11] = regs->nip + 4; + regs->gpr[12] = regs->msr & MSR_MASK; + regs->gpr[13] = (unsigned long) get_paca(); + regs->nip = (unsigned long) &SystemCall_common; + regs->msr = MSR_KERNEL; + return 1; + case 18: /* b */ + imm = instr & 0x03fffffc; + if (imm & 0x02000000) + imm -= 0x04000000; + if ((instr & 2) == 0) + imm += regs->nip; + if (instr & 1) { + regs->link = regs->nip + 4; + if ((regs->msr & MSR_SF) == 0) + regs->link &= 0xffffffffUL; + } + if ((regs->msr & MSR_SF) == 0) + imm &= 0xffffffffUL; + regs->nip = imm; + return 1; + case 19: + switch (instr & 0x7fe) { + case 0x20: /* bclr */ + case 0x420: /* bcctr */ + imm = (instr & 0x400)? regs->ctr: regs->link; + regs->nip += 4; + if ((regs->msr & MSR_SF) == 0) { + regs->nip &= 0xffffffffUL; + imm &= 0xffffffffUL; + } + if (instr & 1) + regs->link = regs->nip; + if (branch_taken(instr, regs)) + regs->nip = imm; + return 1; + case 0x24: /* rfid, scary */ + return -1; + } + case 31: + rd = (instr >> 21) & 0x1f; + switch (instr & 0x7fe) { + case 0xa6: /* mfmsr */ + regs->gpr[rd] = regs->msr & MSR_MASK; + regs->nip += 4; + if ((regs->msr & MSR_SF) == 0) + regs->nip &= 0xffffffffUL; + return 1; + case 0x164: /* mtmsrd */ + /* only MSR_EE and MSR_RI get changed if bit 15 set */ + /* mtmsrd doesn't change MSR_HV and MSR_ME */ + imm = (instr & 0x10000)? 0x8002: 0xefffffffffffefffUL; + imm = (regs->msr & MSR_MASK & ~imm) + | (regs->gpr[rd] & imm); + if ((imm & MSR_RI) == 0) + /* can't step mtmsrd that would clear MSR_RI */ + return -1; + regs->msr = imm; + regs->nip += 4; + if ((imm & MSR_SF) == 0) + regs->nip &= 0xffffffffUL; + return 1; + } + } + return 0; +} diff -Nru a/arch/ppc64/mm/hash_native.c b/arch/ppc64/mm/hash_native.c --- a/arch/ppc64/mm/hash_native.c 2004-11-29 21:22:07 -08:00 +++ b/arch/ppc64/mm/hash_native.c 2004-11-29 21:22:07 -08:00 @@ -387,33 +387,37 @@ local_irq_restore(flags); } -void hpte_init_native(void) -{ #ifdef CONFIG_PPC_PSERIES - struct device_node *root; - const char *model; -#endif /* CONFIG_PPC_PSERIES */ +/* Disable TLB batching on nighthawk */ +static inline int tlb_batching_enabled(void) +{ + struct device_node *root = of_find_node_by_path("/"); + int enabled = 1; + + if (root) { + const char *model = get_property(root, "model", NULL); + if (model && !strcmp(model, "IBM,9076-N81")) + enabled = 0; + of_node_put(root); + } + + return enabled; +} +#else +static inline int tlb_batching_enabled(void) +{ + return 1; +} +#endif +void hpte_init_native(void) +{ ppc_md.hpte_invalidate = native_hpte_invalidate; ppc_md.hpte_updatepp = native_hpte_updatepp; ppc_md.hpte_updateboltedpp = native_hpte_updateboltedpp; ppc_md.hpte_insert = native_hpte_insert; ppc_md.hpte_remove = native_hpte_remove; - -#ifdef CONFIG_PPC_PSERIES - /* Disable TLB batching on nighthawk */ - root = of_find_node_by_path("/"); - if (root) { - model = get_property(root, "model", NULL); - if (model && !strcmp(model, "IBM,9076-N81")) { - of_node_put(root); - goto bail; - } - of_node_put(root); - } -#endif /* CONFIG_PPC_PSERIES */ - - ppc_md.flush_hash_range = native_flush_hash_range; - bail: + if (tlb_batching_enabled()) + ppc_md.flush_hash_range = native_flush_hash_range; htab_finish_init(); } diff -Nru a/arch/ppc64/xmon/xmon.c b/arch/ppc64/xmon/xmon.c --- a/arch/ppc64/xmon/xmon.c 2004-11-29 21:22:08 -08:00 +++ b/arch/ppc64/xmon/xmon.c 2004-11-29 21:22:08 -08:00 @@ -31,6 +31,7 @@ #include #include #include +#include #include "nonstdio.h" #include "privinst.h" @@ -39,7 +40,7 @@ #define skipbl xmon_skipbl #ifdef CONFIG_SMP -volatile cpumask_t cpus_in_xmon = CPU_MASK_NONE; +cpumask_t cpus_in_xmon = CPU_MASK_NONE; static unsigned long xmon_taken = 1; static int xmon_owner; static int xmon_gate; @@ -85,9 +86,6 @@ #define BP_NUM(bp) ((bp) - bpts + 1) -/* Bits in SRR1 that are copied from MSR */ -#define MSR_MASK 0xffffffff87c0ffff - /* Prototypes */ static int cmds(struct pt_regs *); static int mread(unsigned long, void *, int); @@ -132,7 +130,6 @@ static void bootcmds(void); void dump_segments(void); static void symbol_lookup(void); -static int emulate_step(struct pt_regs *regs, unsigned int instr); static void xmon_print_symbol(unsigned long address, const char *mid, const char *after); static const char *getvecname(unsigned long vec); @@ -148,7 +145,6 @@ extern int setjmp(long *); extern void longjmp(long *, int); extern unsigned long _ASR; -extern char SystemCall_common[]; pte_t *find_linux_pte(pgd_t *pgdir, unsigned long va); /* from htab.c */ @@ -401,9 +397,11 @@ if (ncpus > 1) { smp_send_debugger_break(MSG_ALL_BUT_SELF); /* wait for other cpus to come in */ - for (timeout = 100000000; timeout != 0; --timeout) + for (timeout = 100000000; timeout != 0; --timeout) { if (cpus_weight(cpus_in_xmon) >= ncpus) break; + barrier(); + } } remove_bpts(); disable_surveillance(); @@ -488,6 +486,9 @@ if (stepped == 0) { regs->nip = (unsigned long) &bp->instr[0]; atomic_inc(&bp->ref_count); + } else if (stepped < 0) { + printf("Couldn't single-step %s instruction\n", + (IS_RFID(bp->instr[0])? "rfid": "mtmsrd")); } } } @@ -755,108 +756,6 @@ set_iabr(0); } -static int branch_taken(unsigned int instr, struct pt_regs *regs) -{ - unsigned int bo = (instr >> 21) & 0x1f; - unsigned int bi; - - if ((bo & 4) == 0) { - /* decrement counter */ - --regs->ctr; - if (((bo >> 1) & 1) ^ (regs->ctr == 0)) - return 0; - } - if ((bo & 0x10) == 0) { - /* check bit from CR */ - bi = (instr >> 16) & 0x1f; - if (((regs->ccr >> (31 - bi)) & 1) != ((bo >> 3) & 1)) - return 0; - } - return 1; -} - -/* - * Emulate instructions that cause a transfer of control. - * Returns 1 if the step was emulated, 0 if not, - * or -1 if the instruction is one that should not be stepped, - * such as an rfid, or a mtmsrd that would clear MSR_RI. - */ -static int emulate_step(struct pt_regs *regs, unsigned int instr) -{ - unsigned int opcode, rd; - unsigned long int imm; - - opcode = instr >> 26; - switch (opcode) { - case 16: /* bc */ - imm = (signed short)(instr & 0xfffc); - if ((instr & 2) == 0) - imm += regs->nip; - regs->nip += 4; /* XXX check 32-bit mode */ - if (instr & 1) - regs->link = regs->nip; - if (branch_taken(instr, regs)) - regs->nip = imm; - return 1; - case 17: /* sc */ - regs->gpr[9] = regs->gpr[13]; - regs->gpr[11] = regs->nip + 4; - regs->gpr[12] = regs->msr & MSR_MASK; - regs->gpr[13] = (unsigned long) get_paca(); - regs->nip = (unsigned long) &SystemCall_common; - regs->msr = MSR_KERNEL; - return 1; - case 18: /* b */ - imm = instr & 0x03fffffc; - if (imm & 0x02000000) - imm -= 0x04000000; - if ((instr & 2) == 0) - imm += regs->nip; - if (instr & 1) - regs->link = regs->nip + 4; - regs->nip = imm; - return 1; - case 19: - switch (instr & 0x7fe) { - case 0x20: /* bclr */ - case 0x420: /* bcctr */ - imm = (instr & 0x400)? regs->ctr: regs->link; - regs->nip += 4; /* XXX check 32-bit mode */ - if (instr & 1) - regs->link = regs->nip; - if (branch_taken(instr, regs)) - regs->nip = imm; - return 1; - case 0x24: /* rfid, scary */ - printf("Can't single-step an rfid instruction\n"); - return -1; - } - case 31: - rd = (instr >> 21) & 0x1f; - switch (instr & 0x7fe) { - case 0xa6: /* mfmsr */ - regs->gpr[rd] = regs->msr & MSR_MASK; - regs->nip += 4; - return 1; - case 0x164: /* mtmsrd */ - /* only MSR_EE and MSR_RI get changed if bit 15 set */ - /* mtmsrd doesn't change MSR_HV and MSR_ME */ - imm = (instr & 0x10000)? 0x8002: 0xefffffffffffefffUL; - imm = (regs->msr & MSR_MASK & ~imm) - | (regs->gpr[rd] & imm); - if ((imm & MSR_RI) == 0) { - printf("Can't step an instruction that would " - "clear MSR.RI\n"); - return -1; - } - regs->msr = imm; - regs->nip += 4; - return 1; - } - } - return 0; -} - /* Command interpreting routine */ static char *last_cmd; @@ -988,8 +887,11 @@ if ((regs->msr & (MSR_SF|MSR_PR|MSR_IR)) == (MSR_SF|MSR_IR)) { if (mread(regs->nip, &instr, 4) == 4) { stepped = emulate_step(regs, instr); - if (stepped < 0) + if (stepped < 0) { + printf("Couldn't single-step %s instruction\n", + (IS_RFID(instr)? "rfid": "mtmsrd")); return 0; + } if (stepped > 0) { regs->trap = 0xd00 | (regs->trap & 1); printf("stepped to "); diff -Nru a/arch/s390/boot/Makefile b/arch/s390/boot/Makefile --- a/arch/s390/boot/Makefile 2004-11-29 21:22:08 -08:00 +++ b/arch/s390/boot/Makefile 2004-11-29 21:22:08 -08:00 @@ -14,5 +14,5 @@ $(call if_changed,objcopy) install: $(CONFIGURE) $(obj)/image - sh -x $(obj)/install.sh $(KERNELRELEASE) $(obj)/image \ + sh -x $(srctree)/$(obj)/install.sh $(KERNELRELEASE) $(obj)/image \ System.map Kerntypes "$(INSTALL_PATH)" diff -Nru a/arch/s390/defconfig b/arch/s390/defconfig --- a/arch/s390/defconfig 2004-11-29 21:22:08 -08:00 +++ b/arch/s390/defconfig 2004-11-29 21:22:08 -08:00 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.9 -# Fri Oct 22 13:50:22 2004 +# Linux kernel version: 2.6.10-rc1 +# Thu Nov 11 12:54:21 2004 # CONFIG_MMU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y @@ -13,6 +13,7 @@ # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y +CONFIG_LOCK_KERNEL=y # # General setup @@ -35,12 +36,12 @@ # 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_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set # @@ -177,6 +178,14 @@ # CONFIG_DASD_CMB is not set # +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y + +# # Multi-device support (RAID and LVM) # CONFIG_MD=y @@ -262,6 +271,8 @@ # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set # CONFIG_INET_TUNNEL is not set +CONFIG_IP_TCPDIAG=y +CONFIG_IP_TCPDIAG_IPV6=y CONFIG_IPV6=y # CONFIG_IPV6_PRIVACY is not set # CONFIG_INET6_AH is not set @@ -289,7 +300,6 @@ # 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 @@ -408,6 +418,7 @@ # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -516,6 +527,7 @@ # CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_INFO is not set # @@ -548,6 +560,7 @@ # CONFIG_CRYPTO_TEA is not set # CONFIG_CRYPTO_ARC4 is not set # CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_ANUBIS is not set # CONFIG_CRYPTO_DEFLATE is not set # CONFIG_CRYPTO_MICHAEL_MIC is not set # CONFIG_CRYPTO_CRC32C is not set diff -Nru a/arch/s390/kernel/binfmt_elf32.c b/arch/s390/kernel/binfmt_elf32.c --- a/arch/s390/kernel/binfmt_elf32.c 2004-11-29 21:22:08 -08:00 +++ b/arch/s390/kernel/binfmt_elf32.c 2004-11-29 21:22:08 -08:00 @@ -56,6 +56,9 @@ #define ELF_CORE_COPY_REGS(pr_reg, regs) dump_regs32(regs, &pr_reg); +#define ELF_CORE_COPY_TASK_REGS(tsk, regs) dump_task_regs32(tsk, regs) + +#define ELF_CORE_COPY_FPREGS(tsk, fpregs) dump_task_fpu(tsk, fpregs) /* This yields a mask that user programs can use to figure out what instruction set this CPU supports. */ @@ -99,10 +102,34 @@ int i; memcpy(®s->psw.mask, &ptregs->psw.mask, 4); - memcpy(®s->psw.addr, &ptregs->psw.addr, 4); + memcpy(®s->psw.addr, (char *)&ptregs->psw.addr + 4, 4); for (i = 0; i < NUM_GPRS; i++) regs->gprs[i] = ptregs->gprs[i]; + save_access_regs(regs->acrs); regs->orig_gpr2 = ptregs->orig_gpr2; + return 1; +} + +static inline int dump_task_regs32(struct task_struct *tsk, elf_gregset_t *regs) +{ + struct pt_regs *ptregs = __KSTK_PTREGS(tsk); + int i; + + memcpy(®s->psw.mask, &ptregs->psw.mask, 4); + memcpy(®s->psw.addr, (char *)&ptregs->psw.addr + 4, 4); + for (i = 0; i < NUM_GPRS; i++) + regs->gprs[i] = ptregs->gprs[i]; + memcpy(regs->acrs, tsk->thread.acrs, sizeof(regs->acrs)); + regs->orig_gpr2 = ptregs->orig_gpr2; + return 1; +} + +static inline int dump_task_fpu(struct task_struct *tsk, elf_fpregset_t *fpregs) +{ + if (tsk == current) + save_fp_regs((s390_fp_regs *) fpregs); + else + memcpy(fpregs, &tsk->thread.fp_regs, sizeof(elf_fpregset_t)); return 1; } diff -Nru a/arch/s390/kernel/compat_exec.c b/arch/s390/kernel/compat_exec.c --- a/arch/s390/kernel/compat_exec.c 2004-11-29 21:22:08 -08:00 +++ b/arch/s390/kernel/compat_exec.c 2004-11-29 21:22:08 -08:00 @@ -39,7 +39,7 @@ unsigned long stack_base; struct vm_area_struct *mpnt; struct mm_struct *mm = current->mm; - int i; + int i, ret; stack_base = STACK_TOP - MAX_ARG_PAGES*PAGE_SIZE; mm->arg_start = bprm->p + stack_base; @@ -68,7 +68,11 @@ /* executable stack setting would be applied here */ mpnt->vm_page_prot = PAGE_COPY; mpnt->vm_flags = VM_STACK_FLAGS; - insert_vm_struct(mm, mpnt); + if ((ret = insert_vm_struct(mm, mpnt))) { + up_write(&mm->mmap_sem); + kmem_cache_free(vm_area_cachep, mpnt); + return ret; + } mm->stack_vm = mm->total_vm = vma_pages(mpnt); } diff -Nru a/arch/sparc/kernel/apc.c b/arch/sparc/kernel/apc.c --- a/arch/sparc/kernel/apc.c 2004-11-29 21:22:08 -08:00 +++ b/arch/sparc/kernel/apc.c 2004-11-29 21:22:08 -08:00 @@ -28,7 +28,7 @@ #define APC_OBPNAME "power-management" #define APC_DEVNAME "apc" -volatile static u8 *regs; +volatile static u8 __iomem *regs; static int apc_regsize; static int apc_no_idle __initdata = 0; @@ -70,7 +70,7 @@ static inline void apc_free(void) { - sbus_iounmap((unsigned long)regs, apc_regsize); + sbus_iounmap(regs, apc_regsize); } static int apc_open(struct inode *inode, struct file *f) @@ -155,9 +155,9 @@ } apc_regsize = sdev->reg_addrs[0].reg_size; - regs = (u8*) sbus_ioremap(&sdev->resource[0], 0, + regs = sbus_ioremap(&sdev->resource[0], 0, apc_regsize, APC_OBPNAME); - if(NULL == regs) { + if(!regs) { printk(KERN_ERR "%s: unable to map registers\n", APC_DEVNAME); return -ENODEV; } diff -Nru a/arch/sparc/kernel/auxio.c b/arch/sparc/kernel/auxio.c --- a/arch/sparc/kernel/auxio.c 2004-11-29 21:22:08 -08:00 +++ b/arch/sparc/kernel/auxio.c 2004-11-29 21:22:08 -08:00 @@ -17,7 +17,7 @@ /* auxio_register is not static because it is referenced * in entry.S::floppy_tdone */ -unsigned long auxio_register = 0UL; +void __iomem *auxio_register = NULL; static spinlock_t auxio_lock = SPIN_LOCK_UNLOCKED; void __init auxio_probe(void) @@ -63,7 +63,7 @@ /* Fix the address on sun4m and sun4c. */ if((((unsigned long) auxregs[0].phys_addr) & 3) == 3 || sparc_cpu_model == sun4c) - auxio_register |= 3; + auxio_register += (3 - ((unsigned long)auxio_register & 3)); set_auxio(AUXIO_LED, 0); } diff -Nru a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c --- a/arch/sparc/kernel/ioport.c 2004-11-29 21:22:08 -08:00 +++ b/arch/sparc/kernel/ioport.c 2004-11-29 21:22:08 -08:00 @@ -47,8 +47,8 @@ struct resource *_sparc_find_resource(struct resource *r, unsigned long); -static void *_sparc_ioremap(struct resource *res, u32 bus, u32 pa, int sz); -static void *_sparc_alloc_io(unsigned int busno, unsigned long phys, +static void __iomem *_sparc_ioremap(struct resource *res, u32 bus, u32 pa, int sz); +static void __iomem *_sparc_alloc_io(unsigned int busno, unsigned long phys, unsigned long size, char *name); static void _sparc_free_io(struct resource *res); @@ -103,7 +103,7 @@ * * Bus type is always zero on IIep. */ -void *ioremap(unsigned long offset, unsigned long size) +void __iomem *ioremap(unsigned long offset, unsigned long size) { char name[14]; @@ -114,7 +114,7 @@ /* * Comlimentary to ioremap(). */ -void iounmap(void *virtual) +void iounmap(volatile void __iomem *virtual) { unsigned long vaddr = (unsigned long) virtual & PAGE_MASK; struct resource *res; @@ -134,24 +134,24 @@ /* */ -unsigned long sbus_ioremap(struct resource *phyres, unsigned long offset, +void __iomem *sbus_ioremap(struct resource *phyres, unsigned long offset, unsigned long size, char *name) { - return (unsigned long) _sparc_alloc_io(phyres->flags & 0xF, + return _sparc_alloc_io(phyres->flags & 0xF, phyres->start + offset, size, name); } /* */ -void sbus_iounmap(unsigned long addr, unsigned long size) +void sbus_iounmap(volatile void __iomem *addr, unsigned long size) { - iounmap((void *)addr); + iounmap(addr); } /* * Meat of mapping */ -static void *_sparc_alloc_io(unsigned int busno, unsigned long phys, +static void __iomem *_sparc_alloc_io(unsigned int busno, unsigned long phys, unsigned long size, char *name) { static int printed_full; @@ -159,7 +159,7 @@ struct resource *res; char *tack; int tlen; - void *va; /* P3 diag */ + void __iomem *va; /* P3 diag */ if (name == NULL) name = "???"; @@ -189,7 +189,7 @@ /* */ -static void * +static void __iomem * _sparc_ioremap(struct resource *res, u32 bus, u32 pa, int sz) { unsigned long offset = ((unsigned long) pa) & (~PAGE_MASK); @@ -206,7 +206,7 @@ pa &= PAGE_MASK; sparc_mapiorange(bus, pa, res->start, res->end - res->start + 1); - return (void *) (res->start + offset); + return (void __iomem *) (res->start + offset); } /* diff -Nru a/arch/sparc/kernel/pmc.c b/arch/sparc/kernel/pmc.c --- a/arch/sparc/kernel/pmc.c 2004-11-29 21:22:08 -08:00 +++ b/arch/sparc/kernel/pmc.c 2004-11-29 21:22:08 -08:00 @@ -30,7 +30,7 @@ #define PMC_IDLE_REG 0x00 #define PMC_IDLE_ON 0x01 -volatile static u8 *regs; +volatile static u8 __iomem *regs; static int pmc_regsize; #define pmc_readb(offs) (sbus_readb(regs+offs)) @@ -55,7 +55,7 @@ static inline void pmc_free(void) { - sbus_iounmap((unsigned long)regs, pmc_regsize); + sbus_iounmap(regs, pmc_regsize); } static int __init pmc_probe(void) @@ -76,9 +76,9 @@ } pmc_regsize = sdev->reg_addrs[0].reg_size; - regs = (u8*) sbus_ioremap(&sdev->resource[0], 0, + regs = sbus_ioremap(&sdev->resource[0], 0, pmc_regsize, PMC_OBPNAME); - if(NULL == regs) { + if (!regs) { printk(KERN_ERR "%s: unable to map registers\n", PMC_DEVNAME); return -ENODEV; } diff -Nru a/arch/sparc/kernel/process.c b/arch/sparc/kernel/process.c --- a/arch/sparc/kernel/process.c 2004-11-29 21:22:06 -08:00 +++ b/arch/sparc/kernel/process.c 2004-11-29 21:22:06 -08:00 @@ -45,7 +45,7 @@ /* * Power management idle function - * Set in pm platform drivers + * Set in pm platform drivers (apc.c and pmc.c) */ void (*pm_idle)(void); @@ -122,7 +122,7 @@ } while((!need_resched()) && pm_idle) { - (*pm_idle)(); /* XXX Huh? On sparc?! */ + (*pm_idle)(); } schedule(); diff -Nru a/arch/sparc/kernel/time.c b/arch/sparc/kernel/time.c --- a/arch/sparc/kernel/time.c 2004-11-29 21:22:09 -08:00 +++ b/arch/sparc/kernel/time.c 2004-11-29 21:22:09 -08:00 @@ -53,7 +53,7 @@ spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED; enum sparc_clock_type sp_clock_typ; spinlock_t mostek_lock = SPIN_LOCK_UNLOCKED; -unsigned long mstk48t02_regs = 0UL; +void __iomem *mstk48t02_regs = NULL; static struct mostek48t08 *mstk48t08_regs = NULL; static int set_rtc_mmss(unsigned long); static int sbus_do_settimeofday(struct timespec *tv); @@ -350,7 +350,7 @@ mstk48t08_regs = (struct mostek48t08 *) sbus_ioremap(&r, 0, sizeof(struct mostek48t08), "mk48t08"); - mstk48t02_regs = (unsigned long)&mstk48t08_regs->regs; + mstk48t02_regs = &mstk48t08_regs->regs; } else { prom_printf("CLOCK: Unknown model name '%s'\n",model); prom_halt(); diff -Nru a/arch/sparc64/Makefile b/arch/sparc64/Makefile --- a/arch/sparc64/Makefile 2004-11-29 21:22:08 -08:00 +++ b/arch/sparc64/Makefile 2004-11-29 21:22:08 -08:00 @@ -8,7 +8,7 @@ # Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz) # -CHECKFLAGS += -D__sparc__ -D__sparc_v9__ +CHECKFLAGS += -D__sparc__ -D__sparc_v9__ -m64 CPPFLAGS_vmlinux.lds += -Usparc diff -Nru a/arch/sparc64/defconfig b/arch/sparc64/defconfig --- a/arch/sparc64/defconfig 2004-11-29 21:22:07 -08:00 +++ b/arch/sparc64/defconfig 2004-11-29 21:22:07 -08:00 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10-rc1 -# Sun Oct 31 13:19:19 2004 +# Linux kernel version: 2.6.10-rc2 +# Tue Nov 16 11:09:23 2004 # CONFIG_64BIT=y CONFIG_MMU=y @@ -65,9 +65,7 @@ # CONFIG_PREEMPT is not set CONFIG_NR_CPUS=4 CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_US3_FREQ=m -CONFIG_US2E_FREQ=m +# CONFIG_CPU_FREQ_DEBUG is not set CONFIG_CPU_FREQ_PROC_INTF=y CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set @@ -76,6 +74,9 @@ CONFIG_CPU_FREQ_GOV_USERSPACE=m # CONFIG_CPU_FREQ_24_API is not set CONFIG_CPU_FREQ_GOV_ONDEMAND=m +CONFIG_CPU_FREQ_TABLE=y +CONFIG_US3_FREQ=m +CONFIG_US2E_FREQ=m CONFIG_SPARC64=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_HUGETLB_PAGE_SIZE_4MB=y @@ -429,6 +430,7 @@ CONFIG_MD_RAID5=m CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m +# CONFIG_MD_FAULTY is not set CONFIG_BLK_DEV_DM=m CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m @@ -503,6 +505,8 @@ CONFIG_INET_ESP=y CONFIG_INET_IPCOMP=y CONFIG_INET_TUNNEL=y +CONFIG_IP_TCPDIAG=y +# CONFIG_IP_TCPDIAG_IPV6 is not set # # IP: Virtual Server Configuration @@ -693,7 +697,6 @@ CONFIG_BRIDGE=m CONFIG_VLAN_8021Q=m CONFIG_DECNET=m -CONFIG_DECNET_SIOCGIFCONF=y CONFIG_DECNET_ROUTER=y CONFIG_DECNET_ROUTE_FWMARK=y CONFIG_LLC=m @@ -745,6 +748,7 @@ CONFIG_NET_ACT_GACT=m CONFIG_GACT_PROB=y CONFIG_NET_ACT_MIRRED=m +CONFIG_NET_ACT_IPT=m CONFIG_NET_ACT_PEDIT=m # @@ -1148,6 +1152,7 @@ CONFIG_I2C_ALI1563=m CONFIG_I2C_ALI15X3=m CONFIG_I2C_AMD756=m +# CONFIG_I2C_AMD756_S4882 is not set CONFIG_I2C_AMD8111=m CONFIG_I2C_I801=m CONFIG_I2C_I810=m @@ -1179,6 +1184,7 @@ CONFIG_SENSORS_FSCHER=m CONFIG_SENSORS_GL518SM=m CONFIG_SENSORS_IT87=m +CONFIG_SENSORS_LM63=m CONFIG_SENSORS_LM75=m CONFIG_SENSORS_LM77=m CONFIG_SENSORS_LM78=m @@ -1188,6 +1194,7 @@ CONFIG_SENSORS_LM87=m CONFIG_SENSORS_LM90=m CONFIG_SENSORS_MAX1619=m +CONFIG_SENSORS_PC87360=m CONFIG_SENSORS_SMSC47M1=m CONFIG_SENSORS_VIA686A=m CONFIG_SENSORS_W83781D=m @@ -1677,7 +1684,7 @@ CONFIG_USB_W9968CF=m # -# USB Network adaptors +# USB Network Adapters # CONFIG_USB_CATC=m CONFIG_USB_KAWETH=m @@ -1694,6 +1701,7 @@ CONFIG_USB_GENESYS=y CONFIG_USB_NET1080=y CONFIG_USB_PL2301=y +CONFIG_USB_KC2190=y # # Intelligent USB Devices/Gadgets @@ -1720,6 +1728,7 @@ CONFIG_USB_SERIAL_GENERIC=y CONFIG_USB_SERIAL_BELKIN=m CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m +CONFIG_USB_SERIAL_CYPRESS_M8=m CONFIG_USB_SERIAL_EMPEG=m CONFIG_USB_SERIAL_FTDI_SIO=m # CONFIG_USB_SERIAL_VISOR is not set @@ -1858,6 +1867,7 @@ CONFIG_CRYPTO_TEA=m CONFIG_CRYPTO_ARC4=m CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_ANUBIS=m CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_MICHAEL_MIC=m CONFIG_CRYPTO_CRC32C=m diff -Nru a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c --- a/arch/sparc64/kernel/pci.c 2004-11-29 21:22:06 -08:00 +++ b/arch/sparc64/kernel/pci.c 2004-11-29 21:22:06 -08:00 @@ -725,7 +725,7 @@ static void __pci_mmap_set_flags(struct pci_dev *dev, struct vm_area_struct *vma, enum pci_mmap_state mmap_state) { - vma->vm_flags |= (VM_SHM | VM_LOCKED); + vma->vm_flags |= (VM_IO | VM_RESERVED); } /* Set vm_page_prot of VMA, as appropriate for this architecture, for a pci diff -Nru a/arch/sparc64/mm/fault.c b/arch/sparc64/mm/fault.c --- a/arch/sparc64/mm/fault.c 2004-11-29 21:22:08 -08:00 +++ b/arch/sparc64/mm/fault.c 2004-11-29 21:22:08 -08:00 @@ -352,7 +352,7 @@ * If we're in an interrupt or have no user * context, we must not take the fault.. */ - if (in_interrupt() || !mm) + if (in_atomic() || !mm) goto intr_or_no_mm; if (test_thread_flag(TIF_32BIT)) { @@ -361,7 +361,15 @@ address &= 0xffffffff; } - down_read(&mm->mmap_sem); + if (!down_read_trylock(&mm->mmap_sem)) { + if ((regs->tstate & TSTATE_PRIV) && + !search_exception_tables(regs->tpc)) { + insn = get_fault_insn(regs, insn); + goto handle_kernel_fault; + } + down_read(&mm->mmap_sem); + } + vma = find_vma(mm, address); if (!vma) goto bad_area; @@ -446,16 +454,18 @@ } switch (handle_mm_fault(mm, vma, address, (fault_code & FAULT_CODE_WRITE))) { - case 1: + case VM_FAULT_MINOR: current->min_flt++; break; - case 2: + case VM_FAULT_MAJOR: current->maj_flt++; break; - case 0: + case VM_FAULT_SIGBUS: goto do_sigbus; - default: + case VM_FAULT_OOM: goto out_of_memory; + default: + BUG(); } up_read(&mm->mmap_sem); diff -Nru a/arch/sparc64/mm/generic.c b/arch/sparc64/mm/generic.c --- a/arch/sparc64/mm/generic.c 2004-11-29 21:22:08 -08:00 +++ b/arch/sparc64/mm/generic.c 2004-11-29 21:22:08 -08:00 @@ -15,14 +15,6 @@ #include #include -static inline void forget_pte(pte_t page) -{ - if (!pte_none(page)) { - printk("forget_pte: old mapping existed!\n"); - BUG(); - } -} - /* Remap IO memory, the same way as remap_pfn_range(), but use * the obio memory space. * @@ -43,7 +35,6 @@ if (end > PMD_SIZE) end = PMD_SIZE; do { - pte_t oldpage; pte_t entry; unsigned long curend = address + PAGE_SIZE; @@ -75,10 +66,8 @@ if (offset & 0x1UL) pte_val(entry) &= ~(_PAGE_E); do { - oldpage = *pte; - pte_clear(pte); + BUG_ON(!pte_none(*pte)); set_pte(pte, entry); - forget_pte(oldpage); address += PAGE_SIZE; pte++; } while (address < curend); @@ -132,8 +121,8 @@ from = (from + PGDIR_SIZE) & PGDIR_MASK; dir++; } + flush_tlb_range(vma, beg, end); spin_unlock(&mm->page_table_lock); - flush_tlb_range(vma, beg, end); return error; } diff -Nru a/arch/um/Makefile b/arch/um/Makefile --- a/arch/um/Makefile 2004-11-29 21:22:07 -08:00 +++ b/arch/um/Makefile 2004-11-29 21:22:07 -08:00 @@ -29,14 +29,14 @@ MAKEFILE-$(CONFIG_MODE_SKAS) += Makefile-skas ifneq ($(MAKEFILE-y),) - include $(addprefix $(ARCH_DIR)/,$(MAKEFILE-y)) + include $(addprefix $(srctree)/$(ARCH_DIR)/,$(MAKEFILE-y)) endif ARCH_INCLUDE := -I$(ARCH_DIR)/include SYS_DIR := $(ARCH_DIR)/include/sysdep-$(SUBARCH) -include $(ARCH_DIR)/Makefile-$(SUBARCH) -include $(ARCH_DIR)/Makefile-os-$(OS) +include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH) +include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS) # -Derrno=kernel_errno - This turns all kernel references to errno into # kernel_errno to separate them from the libc errno. This allows -fno-common @@ -129,6 +129,7 @@ USER_CFLAGS := $(patsubst -Dsigprocmask=kernel_sigprocmask,,$(USER_CFLAGS)) USER_CFLAGS := $(patsubst -D__KERNEL__,,$(USER_CFLAGS)) $(ARCH_INCLUDE) \ $(MODE_INCLUDE) +USER_CFLAGS += $(ARCH_USER_CFLAGS) # To get a definition of F_SETSIG USER_CFLAGS += -D_GNU_SOURCE diff -Nru a/arch/um/Makefile-i386 b/arch/um/Makefile-i386 --- a/arch/um/Makefile-i386 2004-11-29 21:22:08 -08:00 +++ b/arch/um/Makefile-i386 2004-11-29 21:22:08 -08:00 @@ -11,6 +11,7 @@ endif CFLAGS += -U__$(SUBARCH)__ -U$(SUBARCH) +ARCH_USER_CFLAGS := ifneq ($(CONFIG_GPROF),y) ARCH_CFLAGS += -DUM_FASTCALL diff -Nru a/arch/um/Makefile-x86_64 b/arch/um/Makefile-x86_64 --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/um/Makefile-x86_64 2004-11-29 21:22:09 -08:00 @@ -0,0 +1 @@ +ARCH_USER_CFLAGS := -D__x86_64__ diff -Nru a/arch/um/defconfig b/arch/um/defconfig --- a/arch/um/defconfig 2004-11-29 21:22:08 -08:00 +++ b/arch/um/defconfig 2004-11-29 21:22:08 -08:00 @@ -1,12 +1,14 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-bk4 -# Thu Oct 21 01:09:54 2004 +# Linux kernel version: 2.6.10-rc1-mm5 +# Sun Nov 14 15:27:58 2004 # +CONFIG_GENERIC_HARDIRQS=y CONFIG_USERMODE=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y # # UML-specific options @@ -54,12 +56,12 @@ CONFIG_KALLSYMS_EXTRA_PASS=y 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_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set # @@ -70,6 +72,7 @@ # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # @@ -113,6 +116,15 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y CONFIG_NETDEVICES=y # @@ -150,6 +162,8 @@ # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set # CONFIG_INET_TUNNEL is not set +CONFIG_IP_TCPDIAG=y +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -169,7 +183,6 @@ # 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 @@ -181,7 +194,10 @@ # Network testing # # CONFIG_NET_PKTGEN is not set +# CONFIG_KGDBOE is not set # CONFIG_NETPOLL is not set +# CONFIG_NETPOLL_RX is not set +# CONFIG_NETPOLL_TRAP is not set # CONFIG_NET_POLL_CONTROLLER is not set # CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set @@ -241,6 +257,7 @@ # CONFIG_EXT3_FS_XATTR is not set CONFIG_JBD=y # CONFIG_JBD_DEBUG is not set +# CONFIG_REISER4_FS is not set CONFIG_REISERFS_FS=y # CONFIG_REISERFS_CHECK is not set # CONFIG_REISERFS_PROC_INFO is not set @@ -253,10 +270,16 @@ # CONFIG_QFMT_V1 is not set # CONFIG_QFMT_V2 is not set CONFIG_QUOTACTL=y +CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m # +# Caches +# +# CONFIG_FSCACHE is not set + +# # CD-ROM/DVD Filesystems # CONFIG_ISO9660_FS=m @@ -391,8 +414,12 @@ # Kernel hacking # CONFIG_DEBUG_KERNEL=y +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_INFO=y CONFIG_FRAME_POINTER=y CONFIG_PT_PROXY=y diff -Nru a/arch/um/drivers/cow_user.c b/arch/um/drivers/cow_user.c --- a/arch/um/drivers/cow_user.c 2004-11-29 21:22:07 -08:00 +++ b/arch/um/drivers/cow_user.c 2004-11-29 21:22:07 -08:00 @@ -67,7 +67,7 @@ struct cow_header_v3 { __u32 magic; __u32 version; - time_t mtime; + __u32 mtime; __u64 size; __u32 sectorsize; __u32 alignment; diff -Nru a/arch/um/include/frame_kern.h b/arch/um/include/frame_kern.h --- a/arch/um/include/frame_kern.h 2004-11-29 21:22:07 -08:00 +++ b/arch/um/include/frame_kern.h 2004-11-29 21:22:07 -08:00 @@ -10,13 +10,11 @@ #include "sysdep/frame_kern.h" extern int setup_signal_stack_sc(unsigned long stack_top, int sig, - unsigned long handler, - void (*restorer)(void), + struct k_sigaction *ka, struct pt_regs *regs, sigset_t *mask); extern int setup_signal_stack_si(unsigned long stack_top, int sig, - unsigned long handler, - void (*restorer)(void), + struct k_sigaction *ka, struct pt_regs *regs, siginfo_t *info, sigset_t *mask); diff -Nru a/arch/um/include/kern_util.h b/arch/um/include/kern_util.h --- a/arch/um/include/kern_util.h 2004-11-29 21:22:07 -08:00 +++ b/arch/um/include/kern_util.h 2004-11-29 21:22:07 -08:00 @@ -29,7 +29,7 @@ extern void syscall_segv(int sig); extern int current_pid(void); extern unsigned long alloc_stack(int order, int atomic); -extern int do_signal(int error); +extern int do_signal(void); extern int is_stack_fault(unsigned long sp); extern unsigned long segv(unsigned long address, unsigned long ip, int is_write, int is_user, void *sc); @@ -41,7 +41,7 @@ extern int segv_syscall(void); extern void kern_finish_exec(void *task, int new_pid, unsigned long stack); extern int page_size(void); -extern int page_mask(void); +extern unsigned long page_mask(void); extern int need_finish_fork(void); extern void free_stack(unsigned long stack, int order); extern void add_input_request(int op, void (*proc)(int), void *arg); @@ -110,7 +110,6 @@ extern void free_irq(unsigned int, void *); extern int um_in_interrupt(void); extern int cpu(void); -extern unsigned long long time_stamp(void); #endif diff -Nru a/arch/um/include/syscall_user.h b/arch/um/include/syscall_user.h --- a/arch/um/include/syscall_user.h 2004-11-29 21:22:07 -08:00 +++ b/arch/um/include/syscall_user.h 2004-11-29 21:22:07 -08:00 @@ -7,7 +7,7 @@ #define __SYSCALL_USER_H extern int record_syscall_start(int syscall); -extern void record_syscall_end(int index, int result); +extern void record_syscall_end(int index, long result); #endif diff -Nru a/arch/um/kernel/exec_kern.c b/arch/um/kernel/exec_kern.c --- a/arch/um/kernel/exec_kern.c 2004-11-29 21:22:07 -08:00 +++ b/arch/um/kernel/exec_kern.c 2004-11-29 21:22:07 -08:00 @@ -34,9 +34,9 @@ extern void log_exec(char **argv, void *tty); -static int execve1(char *file, char **argv, char **env) +static long execve1(char *file, char **argv, char **env) { - int error; + long error; #ifdef CONFIG_TTY_LOG log_exec(argv, current->tty); @@ -51,19 +51,19 @@ return(error); } -int um_execve(char *file, char **argv, char **env) +long um_execve(char *file, char **argv, char **env) { - int err; + long err; err = execve1(file, argv, env); - if(!err) + if(!err) do_longjmp(current->thread.exec_buf, 1); return(err); } -int sys_execve(char *file, char **argv, char **env) +long sys_execve(char *file, char **argv, char **env) { - int error; + long error; char *filename; lock_kernel(); diff -Nru a/arch/um/kernel/frame_kern.c b/arch/um/kernel/frame_kern.c --- a/arch/um/kernel/frame_kern.c 2004-11-29 21:22:08 -08:00 +++ b/arch/um/kernel/frame_kern.c 2004-11-29 21:22:08 -08:00 @@ -56,11 +56,11 @@ } int setup_signal_stack_si(unsigned long stack_top, int sig, - unsigned long handler, void (*restorer)(void), - struct pt_regs *regs, siginfo_t *info, - sigset_t *mask) + struct k_sigaction *ka, struct pt_regs *regs, + siginfo_t *info, sigset_t *mask) { unsigned long start; + void *restorer; void *sip, *ucp, *fp; start = stack_top - signal_frame_si.common.len; @@ -68,6 +68,10 @@ ucp = (void *) (start + signal_frame_si.uc_index); fp = (void *) (((unsigned long) ucp) + sizeof(struct ucontext)); + restorer = NULL; + if(ka->sa.sa_flags & SA_RESTORER) + restorer = ka->sa.sa_restorer; + if(restorer == NULL) panic("setup_signal_stack_si - no restorer"); @@ -85,21 +89,26 @@ signal_frame_si.common.sr_relative)) return(1); - PT_REGS_IP(regs) = handler; + PT_REGS_IP(regs) = (unsigned long) ka->sa.sa_handler; PT_REGS_SP(regs) = start + signal_frame_si.common.sp_index; return(0); } int setup_signal_stack_sc(unsigned long stack_top, int sig, - unsigned long handler, void (*restorer)(void), - struct pt_regs *regs, sigset_t *mask) + struct k_sigaction *ka, struct pt_regs *regs, + sigset_t *mask) { struct frame_common *frame = &signal_frame_sc_sr.common; + void *restorer; void *user_sc; int sig_size = (_NSIG_WORDS - 1) * sizeof(unsigned long); unsigned long sigs, sr; unsigned long start = stack_top - frame->len - sig_size; + restorer = NULL; + if(ka->sa.sa_flags & SA_RESTORER) + restorer = ka->sa.sa_restorer; + user_sc = (void *) (start + signal_frame_sc_sr.sc_index); if(restorer == NULL){ frame = &signal_frame_sc.common; @@ -121,7 +130,7 @@ copy_restorer(restorer, start, frame->sr_index, frame->sr_relative)) return(1); - PT_REGS_IP(regs) = handler; + PT_REGS_IP(regs) = (unsigned long) ka->sa.sa_handler; PT_REGS_SP(regs) = start + frame->sp_index; return(0); diff -Nru a/arch/um/kernel/process_kern.c b/arch/um/kernel/process_kern.c --- a/arch/um/kernel/process_kern.c 2004-11-29 21:22:07 -08:00 +++ b/arch/um/kernel/process_kern.c 2004-11-29 21:22:07 -08:00 @@ -1,5 +1,6 @@ /* * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) + * Copyright 2003 PathScale, Inc. * Licensed under the GPL */ @@ -140,7 +141,7 @@ void interrupt_end(void) { if(need_resched()) schedule(); - if(test_tsk_thread_flag(current, TIF_SIGPENDING)) do_signal(0); + if(test_tsk_thread_flag(current, TIF_SIGPENDING)) do_signal(); } void release_thread(struct task_struct *task) @@ -225,7 +226,7 @@ return(PAGE_SIZE); } -int page_mask(void) +unsigned long page_mask(void) { return(PAGE_MASK); } diff -Nru a/arch/um/kernel/ptrace.c b/arch/um/kernel/ptrace.c --- a/arch/um/kernel/ptrace.c 2004-11-29 21:22:09 -08:00 +++ b/arch/um/kernel/ptrace.c 2004-11-29 21:22:09 -08:00 @@ -26,7 +26,7 @@ child->thread.singlestep_syscall = 0; } -int sys_ptrace(long request, long pid, long addr, long data) +long sys_ptrace(long request, long pid, long addr, long data) { struct task_struct *child; int i, ret; diff -Nru a/arch/um/kernel/sigio_kern.c b/arch/um/kernel/sigio_kern.c --- a/arch/um/kernel/sigio_kern.c 2004-11-29 21:22:07 -08:00 +++ b/arch/um/kernel/sigio_kern.c 2004-11-29 21:22:07 -08:00 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) + * Copyright (C) 2002 - 2003 Jeff Dike (jdike@addtoit.com) * Licensed under the GPL */ diff -Nru a/arch/um/kernel/signal_kern.c b/arch/um/kernel/signal_kern.c --- a/arch/um/kernel/signal_kern.c 2004-11-29 21:22:07 -08:00 +++ b/arch/um/kernel/signal_kern.c 2004-11-29 21:22:07 -08:00 @@ -38,54 +38,55 @@ /* * OK, we're invoking a handler */ -static void handle_signal(struct pt_regs *regs, unsigned long signr, - struct k_sigaction *ka, siginfo_t *info, - sigset_t *oldset) +static int handle_signal(struct pt_regs *regs, unsigned long signr, + struct k_sigaction *ka, siginfo_t *info, + sigset_t *oldset) { - __sighandler_t handler; - void (*restorer)(void); unsigned long sp; - sigset_t save; - int error, err, ret; + int err; - error = PT_REGS_SYSCALL_RET(¤t->thread.regs); - ret = 0; /* Always make any pending restarted system calls return -EINTR */ current_thread_info()->restart_block.fn = do_no_restart_syscall; - switch(error){ - case -ERESTART_RESTARTBLOCK: - case -ERESTARTNOHAND: - ret = -EINTR; - break; - - case -ERESTARTSYS: - if (!(ka->sa.sa_flags & SA_RESTART)) { - ret = -EINTR; + + /* Did we come from a system call? */ + if(PT_REGS_SYSCALL_NR(regs) >= 0){ + /* If so, check system call restarting.. */ + switch(PT_REGS_SYSCALL_RET(regs)){ + case -ERESTART_RESTARTBLOCK: + case -ERESTARTNOHAND: + PT_REGS_SYSCALL_RET(regs) = -EINTR; break; - } + + case -ERESTARTSYS: + if (!(ka->sa.sa_flags & SA_RESTART)) { + PT_REGS_SYSCALL_RET(regs) = -EINTR; + break; + } /* fallthrough */ - case -ERESTARTNOINTR: - PT_REGS_RESTART_SYSCALL(regs); - PT_REGS_ORIG_SYSCALL(regs) = PT_REGS_SYSCALL_NR(regs); - - /* This is because of the UM_SET_SYSCALL_RETURN and the fact - * that on i386 the system call number and return value are - * in the same register. When the system call restarts, %eax - * had better have the system call number in it. Since the - * return value doesn't matter (except that it shouldn't be - * -ERESTART*), we'll stick the system call number there. - */ - ret = PT_REGS_SYSCALL_NR(regs); - break; + case -ERESTARTNOINTR: + PT_REGS_RESTART_SYSCALL(regs); + PT_REGS_ORIG_SYSCALL(regs) = PT_REGS_SYSCALL_NR(regs); + break; + } } - handler = ka->sa.sa_handler; - save = *oldset; + sp = PT_REGS_SP(regs); + if((ka->sa.sa_flags & SA_ONSTACK) && (sas_ss_flags(sp) == 0)) + sp = current->sas_ss_sp + current->sas_ss_size; - if (ka->sa.sa_flags & SA_ONESHOT) - ka->sa.sa_handler = SIG_DFL; + if(ka->sa.sa_flags & SA_SIGINFO) + err = setup_signal_stack_si(sp, signr, ka, regs, info, oldset); + else + err = setup_signal_stack_sc(sp, signr, ka, regs, oldset); - if (!(ka->sa.sa_flags & SA_NODEFER)) { + if(err){ + spin_lock_irq(¤t->sighand->siglock); + current->blocked = *oldset; + recalc_sigpending(); + spin_unlock_irq(¤t->sighand->siglock); + force_sigsegv(signr, current); + } + else if(!(ka->sa.sa_flags & SA_NODEFER)){ spin_lock_irq(¤t->sighand->siglock); sigorsets(¤t->blocked, ¤t->blocked, &ka->sa.sa_mask); @@ -94,44 +95,24 @@ spin_unlock_irq(¤t->sighand->siglock); } - sp = PT_REGS_SP(regs); - - if((ka->sa.sa_flags & SA_ONSTACK) && (sas_ss_flags(sp) == 0)) - sp = current->sas_ss_sp + current->sas_ss_size; - - if(error != 0) PT_REGS_SET_SYSCALL_RETURN(regs, ret); - - if (ka->sa.sa_flags & SA_RESTORER) restorer = ka->sa.sa_restorer; - else restorer = NULL; - - if(ka->sa.sa_flags & SA_SIGINFO) - err = setup_signal_stack_si(sp, signr, (unsigned long) handler, - restorer, regs, info, &save); - else - err = setup_signal_stack_sc(sp, signr, (unsigned long) handler, - restorer, regs, &save); - if(err) - force_sigsegv(signr, current); + return err; } static int kern_do_signal(struct pt_regs *regs, sigset_t *oldset) { struct k_sigaction ka_copy; siginfo_t info; - int sig; + int sig, handled_sig = 0; - if (!oldset) - oldset = ¤t->blocked; - - sig = get_signal_to_deliver(&info, &ka_copy, regs, NULL); - if(sig > 0){ + while((sig = get_signal_to_deliver(&info, &ka_copy, regs, NULL)) > 0){ + handled_sig = 1; /* Whee! Actually deliver the signal. */ - handle_signal(regs, sig, &ka_copy, &info, oldset); - return(1); + if(!handle_signal(regs, sig, &ka_copy, &info, oldset)) + break; } /* Did we come from a system call? */ - if(PT_REGS_SYSCALL_NR(regs) >= 0){ + if(!handled_sig && (PT_REGS_SYSCALL_NR(regs) >= 0)){ /* Restart the system call - no handlers present */ if(PT_REGS_SYSCALL_RET(regs) == -ERESTARTNOHAND || PT_REGS_SYSCALL_RET(regs) == -ERESTARTSYS || @@ -155,18 +136,18 @@ if(current->ptrace & PT_DTRACE) current->thread.singlestep_syscall = is_syscall(PT_REGS_IP(¤t->thread.regs)); - return(0); + return(handled_sig); } -int do_signal(int error) +int do_signal(void) { - return(kern_do_signal(¤t->thread.regs, NULL)); + return(kern_do_signal(¤t->thread.regs, ¤t->blocked)); } /* * Atomically swap in the new signal mask, and wait for a signal. */ -int sys_sigsuspend(int history0, int history1, old_sigset_t mask) +long sys_sigsuspend(int history0, int history1, old_sigset_t mask) { sigset_t saveset; @@ -186,7 +167,7 @@ } } -int sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize) +long sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize) { sigset_t saveset, newset; @@ -244,7 +225,7 @@ return ret; } -int sys_sigaltstack(const stack_t *uss, stack_t *uoss) +long sys_sigaltstack(const stack_t *uss, stack_t *uoss) { return(do_sigaltstack(uss, uoss, PT_REGS_SP(¤t->thread.regs))); } @@ -262,7 +243,7 @@ return(ret); } -int sys_sigreturn(struct pt_regs regs) +long sys_sigreturn(struct pt_regs regs) { void __user *sc = sp_to_sc(PT_REGS_SP(¤t->thread.regs)); void __user *mask = sp_to_mask(PT_REGS_SP(¤t->thread.regs)); @@ -280,7 +261,7 @@ return(PT_REGS_SYSCALL_RET(¤t->thread.regs)); } -int sys_rt_sigreturn(struct pt_regs regs) +long sys_rt_sigreturn(struct pt_regs regs) { unsigned long sp = PT_REGS_SP(¤t->thread.regs); struct ucontext __user *uc = sp_to_uc(sp); diff -Nru a/arch/um/kernel/skas/Makefile b/arch/um/kernel/skas/Makefile --- a/arch/um/kernel/skas/Makefile 2004-11-29 21:22:07 -08:00 +++ b/arch/um/kernel/skas/Makefile 2004-11-29 21:22:07 -08:00 @@ -1,11 +1,11 @@ # -# Copyright (C) 2002 Jeff Dike (jdike@karaya.com) +# Copyright (C) 2002 - 2004 Jeff Dike (jdike@addtoit.com) # Licensed under the GPL # -obj-y := exec_kern.o exec_user.o mem.o mem_user.o mmu.o process.o \ - process_kern.o syscall_kern.o syscall_user.o time.o tlb.o trap_user.o \ - uaccess.o sys-$(SUBARCH)/ +obj-y := exec_kern.o mem.o mem_user.o mmu.o process.o process_kern.o \ + syscall_kern.o syscall_user.o time.o tlb.o trap_user.o uaccess.o \ + sys-$(SUBARCH)/ subdir-y := util diff -Nru a/arch/um/kernel/skas/exec_user.c b/arch/um/kernel/skas/exec_user.c --- a/arch/um/kernel/skas/exec_user.c 2004-11-29 21:22:06 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) - * Licensed under the GPL - */ - -#include -#include -#include -#include -#include -#include -#include "user.h" -#include "kern_util.h" -#include "user_util.h" -#include "os.h" -#include "time_user.h" - -static int user_thread_tramp(void *arg) -{ - if(ptrace(PTRACE_TRACEME, 0, 0, 0) < 0) - panic("user_thread_tramp - PTRACE_TRACEME failed, " - "errno = %d\n", errno); - enable_timer(); - os_stop_process(os_getpid()); - return(0); -} - -int user_thread(unsigned long stack, int flags) -{ - int pid, status, err; - - pid = clone(user_thread_tramp, (void *) stack_sp(stack), - flags | CLONE_FILES | SIGCHLD, NULL); - if(pid < 0){ - printk("user_thread - clone failed, errno = %d\n", errno); - return(pid); - } - - CATCH_EINTR(err = waitpid(pid, &status, WUNTRACED)); - if(err < 0){ - printk("user_thread - waitpid failed, errno = %d\n", errno); - return(-errno); - } - - if(!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGSTOP)){ - printk("user_thread - trampoline didn't stop, status = %d\n", - status); - return(-EINVAL); - } - - return(pid); -} - -/* - * Overrides for Emacs so that we follow Linus's tabbing style. - * Emacs will notice this stuff at the end of the file and automatically - * adjust the settings for this buffer only. This must remain at the end - * of the file. - * --------------------------------------------------------------------------- - * Local variables: - * c-file-style: "linux" - * End: - */ diff -Nru a/arch/um/kernel/skas/process.c b/arch/um/kernel/skas/process.c --- a/arch/um/kernel/skas/process.c 2004-11-29 21:22:08 -08:00 +++ b/arch/um/kernel/skas/process.c 2004-11-29 21:22:08 -08:00 @@ -64,7 +64,7 @@ syscall_nr = PT_SYSCALL_NR(regs->skas.regs); UPT_SYSCALL_NR(regs) = syscall_nr; - if(syscall_nr < 1){ + if(syscall_nr < 0){ relay_signal(SIGTRAP, regs); return; } diff -Nru a/arch/um/kernel/skas/syscall_user.c b/arch/um/kernel/skas/syscall_user.c --- a/arch/um/kernel/skas/syscall_user.c 2004-11-29 21:22:08 -08:00 +++ b/arch/um/kernel/skas/syscall_user.c 2004-11-29 21:22:08 -08:00 @@ -10,10 +10,6 @@ #include "sysdep/ptrace.h" #include "sysdep/sigcontext.h" -/* XXX Bogus */ -#define ERESTARTSYS 512 -#define ERESTARTNOINTR 513 -#define ERESTARTNOHAND 514 void handle_syscall(union uml_pt_regs *regs) { @@ -26,9 +22,6 @@ result = execute_syscall(regs); REGS_SET_SYSCALL_RETURN(regs->skas.regs, result); - if((result == -ERESTARTNOHAND) || (result == -ERESTARTSYS) || - (result == -ERESTARTNOINTR)) - do_signal(result); syscall_trace(regs, 1); record_syscall_end(index, result); diff -Nru a/arch/um/kernel/syscall_kern.c b/arch/um/kernel/syscall_kern.c --- a/arch/um/kernel/syscall_kern.c 2004-11-29 21:22:08 -08:00 +++ b/arch/um/kernel/syscall_kern.c 2004-11-29 21:22:08 -08:00 @@ -104,11 +104,11 @@ unsigned long offset; }; -int old_mmap(unsigned long addr, unsigned long len, +long old_mmap(unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, unsigned long fd, unsigned long offset) { - int err = -EINVAL; + long err = -EINVAL; if (offset & ~PAGE_MASK) goto out; @@ -120,10 +120,10 @@ * sys_pipe() is the normal C calling standard for creating * a pipe. It's not the way unix traditionally does this, though. */ -int sys_pipe(unsigned long * fildes) +long sys_pipe(unsigned long * fildes) { int fd[2]; - int error; + long error; error = do_pipe(fd); if (!error) { @@ -218,9 +218,9 @@ } } -int sys_uname(struct old_utsname * name) +long sys_uname(struct old_utsname * name) { - int err; + long err; if (!name) return -EFAULT; down_read(&uts_sem); @@ -229,9 +229,9 @@ return err?-EFAULT:0; } -int sys_olduname(struct oldold_utsname * name) +long sys_olduname(struct oldold_utsname * name) { - int error; + long error; if (!name) return -EFAULT; diff -Nru a/arch/um/kernel/syscall_user.c b/arch/um/kernel/syscall_user.c --- a/arch/um/kernel/syscall_user.c 2004-11-29 21:22:08 -08:00 +++ b/arch/um/kernel/syscall_user.c 2004-11-29 21:22:08 -08:00 @@ -11,7 +11,7 @@ struct { int syscall; int pid; - int result; + long result; struct timeval start; struct timeval end; } syscall_record[1024]; @@ -30,7 +30,7 @@ return(index); } -void record_syscall_end(int index, int result) +void record_syscall_end(int index, long result) { syscall_record[index].result = result; gettimeofday(&syscall_record[index].end, NULL); diff -Nru a/arch/um/kernel/tt/syscall_user.c b/arch/um/kernel/tt/syscall_user.c --- a/arch/um/kernel/tt/syscall_user.c 2004-11-29 21:22:08 -08:00 +++ b/arch/um/kernel/tt/syscall_user.c 2004-11-29 21:22:08 -08:00 @@ -17,10 +17,6 @@ #include "syscall_user.h" #include "tt.h" -/* XXX Bogus */ -#define ERESTARTSYS 512 -#define ERESTARTNOINTR 513 -#define ERESTARTNOHAND 514 void syscall_handler_tt(int sig, union uml_pt_regs *regs) { @@ -42,9 +38,6 @@ UPT_SC(regs) = sc; SC_SET_SYSCALL_RETURN(sc, result); - if((result == -ERESTARTNOHAND) || (result == -ERESTARTSYS) || - (result == -ERESTARTNOINTR)) - do_signal(result); syscall_trace(regs, 1); record_syscall_end(index, result); @@ -63,7 +56,8 @@ regs = TASK_REGS(task); UPT_SYSCALL_NR(regs) = syscall; - if(syscall < 1) return(0); + if(syscall < 0) + return(0); if((syscall != __NR_sigreturn) && ((unsigned long *) PT_IP(proc_regs) >= &_stext) && diff -Nru a/arch/um/sys-i386/sysrq.c b/arch/um/sys-i386/sysrq.c --- a/arch/um/sys-i386/sysrq.c 2004-11-29 21:22:06 -08:00 +++ b/arch/um/sys-i386/sysrq.c 2004-11-29 21:22:06 -08:00 @@ -1,3 +1,8 @@ +/* + * Copyright (C) 2001 - 2003 Jeff Dike (jdike@addtoit.com) + * Licensed under the GPL + */ + #include "linux/kernel.h" #include "linux/smp.h" #include "linux/sched.h" diff -Nru a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c --- a/arch/x86_64/ia32/ia32_binfmt.c 2004-11-29 21:22:06 -08:00 +++ b/arch/x86_64/ia32/ia32_binfmt.c 2004-11-29 21:22:06 -08:00 @@ -334,7 +334,7 @@ unsigned long stack_base; struct vm_area_struct *mpnt; struct mm_struct *mm = current->mm; - int i; + int i, ret; stack_base = IA32_STACK_TOP - MAX_ARG_PAGES * PAGE_SIZE; mm->arg_start = bprm->p + stack_base; @@ -368,7 +368,11 @@ mpnt->vm_flags = VM_STACK_FLAGS; mpnt->vm_page_prot = (mpnt->vm_flags & VM_EXEC) ? PAGE_COPY_EXEC : PAGE_COPY; - insert_vm_struct(mm, mpnt); + if ((ret = insert_vm_struct(mm, mpnt))) { + up_write(&mm->mmap_sem); + kmem_cache_free(vm_area_cachep, mpnt); + return ret; + } mm->stack_vm = mm->total_vm = vma_pages(mpnt); } diff -Nru a/arch/x86_64/kernel/signal.c b/arch/x86_64/kernel/signal.c --- a/arch/x86_64/kernel/signal.c 2004-11-29 21:22:08 -08:00 +++ b/arch/x86_64/kernel/signal.c 2004-11-29 21:22:08 -08:00 @@ -325,7 +325,7 @@ set_fs(USER_DS); if (regs->eflags & TF_MASK) { - if (current->ptrace & PT_PTRACED) { + if ((current->ptrace & (PT_PTRACED | PT_DTRACE)) == (PT_PTRACED | PT_DTRACE)) { ptrace_notify(SIGTRAP); } else { regs->eflags &= ~TF_MASK; diff -Nru a/arch/x86_64/kernel/smp.c b/arch/x86_64/kernel/smp.c --- a/arch/x86_64/kernel/smp.c 2004-11-29 21:22:09 -08:00 +++ b/arch/x86_64/kernel/smp.c 2004-11-29 21:22:09 -08:00 @@ -305,15 +305,15 @@ /* Send a message to all other CPUs and wait for them to respond */ send_IPI_allbutself(CALL_FUNCTION_VECTOR); - if (!wait) - return; - /* Wait for response */ while (atomic_read(&data.started) != cpus) - barrier(); + cpu_relax(); + + if (!wait) + return; while (atomic_read(&data.finished) != cpus) - barrier(); + cpu_relax(); } /* diff -Nru a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c --- a/arch/x86_64/kernel/time.c 2004-11-29 21:22:08 -08:00 +++ b/arch/x86_64/kernel/time.c 2004-11-29 21:22:08 -08:00 @@ -331,7 +331,7 @@ print_symbol("rip %s)\n", regs->rip); } - if (lost_count == 100 && !warned) { + if (lost_count == 1000 && !warned) { printk(KERN_WARNING "warning: many lost ticks.\n" KERN_WARNING "Your time source seems to be instable or " diff -Nru a/arch/x86_64/kernel/vmlinux.lds.S b/arch/x86_64/kernel/vmlinux.lds.S --- a/arch/x86_64/kernel/vmlinux.lds.S 2004-11-29 21:22:06 -08:00 +++ b/arch/x86_64/kernel/vmlinux.lds.S 2004-11-29 21:22:06 -08:00 @@ -45,32 +45,31 @@ } __bss_end = .; - . = ALIGN(64); + . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); .data.cacheline_aligned : { *(.data.cacheline_aligned) } +#define AFTER(x) BINALIGN(LOADADDR(x) + SIZEOF(x), 16) +#define BINALIGN(x,y) (((x) + (y) - 1) & ~((y) - 1)) +#define CACHE_ALIGN(x) BINALIGN(x, CONFIG_X86_L1_CACHE_BYTES) + .vsyscall_0 -10*1024*1024: AT ((LOADADDR(.data.cacheline_aligned) + SIZEOF(.data.cacheline_aligned) + 4095) & ~(4095)) { *(.vsyscall_0) } __vsyscall_0 = LOADADDR(.vsyscall_0); - . = ALIGN(64); - .xtime_lock : AT ((LOADADDR(.vsyscall_0) + SIZEOF(.vsyscall_0) + 63) & ~(63)) { *(.xtime_lock) } + . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); + .xtime_lock : AT CACHE_ALIGN(AFTER(.vsyscall_0)) { *(.xtime_lock) } xtime_lock = LOADADDR(.xtime_lock); - . = ALIGN(16); - .vxtime : AT ((LOADADDR(.xtime_lock) + SIZEOF(.xtime_lock) + 15) & ~(15)) { *(.vxtime) } + .vxtime : AT AFTER(.xtime_lock) { *(.vxtime) } vxtime = LOADADDR(.vxtime); - . = ALIGN(16); - .wall_jiffies : AT ((LOADADDR(.vxtime) + SIZEOF(.vxtime) + 15) & ~(15)) { *(.wall_jiffies) } + .wall_jiffies : AT AFTER(.vxtime) { *(.wall_jiffies) } wall_jiffies = LOADADDR(.wall_jiffies); - . = ALIGN(16); - .sys_tz : AT ((LOADADDR(.wall_jiffies) + SIZEOF(.wall_jiffies) + 15) & ~(15)) { *(.sys_tz) } + .sys_tz : AT AFTER(.wall_jiffies) { *(.sys_tz) } sys_tz = LOADADDR(.sys_tz); - . = ALIGN(16); - .sysctl_vsyscall : AT ((LOADADDR(.sys_tz) + SIZEOF(.sys_tz) + 15) & ~(15)) { *(.sysctl_vsyscall) } - sysctl_vsyscall = LOADADDR(.sysctl_vsyscall); - . = ALIGN(16); - .jiffies : AT ((LOADADDR(.sysctl_vsyscall) + SIZEOF(.sysctl_vsyscall) + 15) & ~(15)) { *(.jiffies) } - jiffies = LOADADDR(.jiffies); - . = ALIGN(16); - .xtime : AT ((LOADADDR(.jiffies) + SIZEOF(.jiffies) + 15) & ~(15)) { *(.xtime) } + .sysctl_vsyscall : AT AFTER(.sys_tz) { *(.sysctl_vsyscall) } + sysctl_vsyscall = LOADADDR(.sysctl_vsyscall); + .xtime : AT AFTER(.sysctl_vsyscall) { *(.xtime) } xtime = LOADADDR(.xtime); + . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); + .jiffies : AT CACHE_ALIGN(AFTER(.xtime)) { *(.jiffies) } + jiffies = LOADADDR(.jiffies); .vsyscall_1 ADDR(.vsyscall_0) + 1024: AT (LOADADDR(.vsyscall_0) + 1024) { *(.vsyscall_1) } . = LOADADDR(.vsyscall_0) + 4096; diff -Nru a/arch/x86_64/kernel/vsyscall.c b/arch/x86_64/kernel/vsyscall.c --- a/arch/x86_64/kernel/vsyscall.c 2004-11-29 21:22:08 -08:00 +++ b/arch/x86_64/kernel/vsyscall.c 2004-11-29 21:22:08 -08:00 @@ -166,14 +166,12 @@ static int __init vsyscall_init(void) { - if ((unsigned long) &vgettimeofday != VSYSCALL_ADDR(__NR_vgettimeofday)) - panic("vgettimeofday link addr broken"); - if ((unsigned long) &vtime != VSYSCALL_ADDR(__NR_vtime)) - panic("vtime link addr broken"); - if (VSYSCALL_ADDR(0) != __fix_to_virt(VSYSCALL_FIRST_PAGE)) - panic("fixmap first vsyscall %lx should be %lx", __fix_to_virt(VSYSCALL_FIRST_PAGE), - VSYSCALL_ADDR(0)); + BUG_ON(((unsigned long) &vgettimeofday != + VSYSCALL_ADDR(__NR_vgettimeofday))); + BUG_ON((unsigned long) &vtime != VSYSCALL_ADDR(__NR_vtime)); + BUG_ON((VSYSCALL_ADDR(0) != __fix_to_virt(VSYSCALL_FIRST_PAGE))); map_vsyscall(); + sysctl_vsyscall = 1; return 0; } diff -Nru a/drivers/atm/Makefile b/drivers/atm/Makefile --- a/drivers/atm/Makefile 2004-11-29 21:22:09 -08:00 +++ b/drivers/atm/Makefile 2004-11-29 21:22:09 -08:00 @@ -68,4 +68,4 @@ # deal with the various suffixes of the binary firmware images $(obj)/%.bin $(obj)/%.bin1 $(obj)/%.bin2: $(src)/%.data objcopy -Iihex $< -Obinary $@.gz - gzip -df $@.gz + gzip -n -df $@.gz diff -Nru a/drivers/atm/eni.c b/drivers/atm/eni.c --- a/drivers/atm/eni.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/atm/eni.c 2004-11-29 21:22:06 -08:00 @@ -245,7 +245,7 @@ list = eni_dev->free_list; len = eni_dev->free_len; if (*size < MID_MIN_BUF_SIZE) *size = MID_MIN_BUF_SIZE; - if (*size > MID_MAX_BUF_SIZE) return 0; + if (*size > MID_MAX_BUF_SIZE) return NULL; for (order = 0; (1 << order) < *size; order++); DPRINTK("trying: %ld->%d\n",*size,order); best_order = 65; /* we don't have more than 2^64 of anything ... */ @@ -260,7 +260,7 @@ best_order = list[i].order; index = i; } - if (best_order == 65) return 0; + if (best_order == 65) return NULL; start = list[index].start-eni_dev->base_diff; list[index] = list[--len]; eni_dev->free_len = len; @@ -1315,7 +1315,7 @@ size = UBR_BUFFER; } new_tx = !eni_vcc->tx; - mem = 0; /* for gcc */ + mem = NULL; /* for gcc */ if (!new_tx) tx = eni_vcc->tx; else { mem = eni_alloc_mem(eni_dev,&size); @@ -1349,7 +1349,7 @@ error = -EINVAL; if (error) { if (new_tx) { - tx->send = 0; + tx->send = NULL; eni_free_mem(eni_dev,mem,size); } return error; @@ -1423,7 +1423,7 @@ eni_in(MID_TX_DESCRSTART(eni_vcc->tx->index))) schedule(); eni_free_mem(eni_dev,eni_vcc->tx->send,eni_vcc->tx->words << 2); - eni_vcc->tx->send = 0; + eni_vcc->tx->send = NULL; eni_dev->tx_bw += eni_vcc->tx->reserved; } eni_vcc->tx = NULL; @@ -1444,7 +1444,7 @@ skb_queue_head_init(&eni_dev->tx_queue); eni_out(0,MID_DMA_WR_TX); for (i = 0; i < NR_CHAN; i++) { - eni_dev->tx[i].send = 0; + eni_dev->tx[i].send = NULL; eni_dev->tx[i].index = i; } return 0; @@ -1702,7 +1702,7 @@ static int __devinit eni_do_init(struct atm_dev *dev) { - struct midway_eprom *eprom; + struct midway_eprom __iomem *eprom; struct eni_dev *eni_dev; struct pci_dev *pci_dev; unsigned long real_base; @@ -1742,8 +1742,7 @@ eni_dev->base_diff = real_base - (unsigned long) base; /* id may not be present in ASIC Tonga boards - check this @@@ */ if (!eni_dev->asic) { - eprom = (struct midway_eprom *) (base+EPROM_SIZE-sizeof(struct - midway_eprom)); + eprom = (base+EPROM_SIZE-sizeof(struct midway_eprom)); if (readl(&eprom->magic) != ENI155_MAGIC) { printk("\n"); printk(KERN_ERR KERN_ERR DEV_LABEL "(itf %d): bad " diff -Nru a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c --- a/drivers/atm/fore200e.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/atm/fore200e.c 2004-11-29 21:22:08 -08:00 @@ -275,7 +275,7 @@ static int -fore200e_io_poll(struct fore200e* fore200e, volatile u32* addr, u32 val, int msecs) +fore200e_io_poll(struct fore200e* fore200e, volatile u32 __iomem *addr, u32 val, int msecs) { unsigned long timeout = jiffies + MSECS(msecs); int ok; @@ -347,7 +347,7 @@ { int ok; - fore200e->cp_monitor = (struct cp_monitor*)(fore200e->virt_base + FORE200E_CP_MONITOR_OFFSET); + fore200e->cp_monitor = fore200e->virt_base + FORE200E_CP_MONITOR_OFFSET; fore200e->bus->write(BSTAT_COLD_START, &fore200e->cp_monitor->bstat); @@ -440,7 +440,7 @@ #ifdef CONFIG_ATM_FORE200E_PCA -static u32 fore200e_pca_read(volatile u32* addr) +static u32 fore200e_pca_read(volatile u32 __iomem *addr) { /* on big-endian hosts, the board is configured to convert the endianess of slave RAM accesses */ @@ -448,7 +448,7 @@ } -static void fore200e_pca_write(u32 val, volatile u32* addr) +static void fore200e_pca_write(u32 val, volatile u32 __iomem *addr) { /* on big-endian hosts, the board is configured to convert the endianess of slave RAM accesses */ @@ -576,9 +576,9 @@ DPRINTK(1, "device %s mapped to 0x%p\n", fore200e->name, fore200e->virt_base); /* gain access to the PCA specific registers */ - fore200e->regs.pca.hcr = (u32*)(fore200e->virt_base + PCA200E_HCR_OFFSET); - fore200e->regs.pca.imr = (u32*)(fore200e->virt_base + PCA200E_IMR_OFFSET); - fore200e->regs.pca.psr = (u32*)(fore200e->virt_base + PCA200E_PSR_OFFSET); + fore200e->regs.pca.hcr = fore200e->virt_base + PCA200E_HCR_OFFSET; + fore200e->regs.pca.imr = fore200e->virt_base + PCA200E_IMR_OFFSET; + fore200e->regs.pca.psr = fore200e->virt_base + PCA200E_PSR_OFFSET; fore200e->state = FORE200E_STATE_MAP; return 0; @@ -689,7 +689,7 @@ *entry->status = STATUS_PENDING; - fore200e->bus->write(*(u32*)&opcode, (u32*)&entry->cp_entry->cmd.prom_block.opcode); + fore200e->bus->write(*(u32*)&opcode, (u32 __iomem *)&entry->cp_entry->cmd.prom_block.opcode); ok = fore200e_poll(fore200e, entry->status, STATUS_COMPLETE, 400); @@ -730,14 +730,14 @@ #ifdef CONFIG_ATM_FORE200E_SBA static u32 -fore200e_sba_read(volatile u32* addr) +fore200e_sba_read(volatile u32 __iomem *addr) { return sbus_readl(addr); } static void -fore200e_sba_write(u32 val, volatile u32* addr) +fore200e_sba_write(u32 val, volatile u32 __iomem *addr) { sbus_writel(val, addr); } @@ -856,10 +856,10 @@ unsigned int bursts; /* gain access to the SBA specific registers */ - fore200e->regs.sba.hcr = (u32*)sbus_ioremap(&sbus_dev->resource[0], 0, SBA200E_HCR_LENGTH, "SBA HCR"); - fore200e->regs.sba.bsr = (u32*)sbus_ioremap(&sbus_dev->resource[1], 0, SBA200E_BSR_LENGTH, "SBA BSR"); - fore200e->regs.sba.isr = (u32*)sbus_ioremap(&sbus_dev->resource[2], 0, SBA200E_ISR_LENGTH, "SBA ISR"); - fore200e->virt_base = (u32*)sbus_ioremap(&sbus_dev->resource[3], 0, SBA200E_RAM_LENGTH, "SBA RAM"); + fore200e->regs.sba.hcr = sbus_ioremap(&sbus_dev->resource[0], 0, SBA200E_HCR_LENGTH, "SBA HCR"); + fore200e->regs.sba.bsr = sbus_ioremap(&sbus_dev->resource[1], 0, SBA200E_BSR_LENGTH, "SBA BSR"); + fore200e->regs.sba.isr = sbus_ioremap(&sbus_dev->resource[2], 0, SBA200E_ISR_LENGTH, "SBA ISR"); + fore200e->virt_base = sbus_ioremap(&sbus_dev->resource[3], 0, SBA200E_RAM_LENGTH, "SBA RAM"); if (fore200e->virt_base == NULL) { printk(FORE200E "unable to map RAM of device %s\n", fore200e->name); @@ -884,10 +884,10 @@ static void fore200e_sba_unmap(struct fore200e* fore200e) { - sbus_iounmap((ulong)fore200e->regs.sba.hcr, SBA200E_HCR_LENGTH); - sbus_iounmap((ulong)fore200e->regs.sba.bsr, SBA200E_BSR_LENGTH); - sbus_iounmap((ulong)fore200e->regs.sba.isr, SBA200E_ISR_LENGTH); - sbus_iounmap((ulong)fore200e->virt_base, SBA200E_RAM_LENGTH); + sbus_iounmap(fore200e->regs.sba.hcr, SBA200E_HCR_LENGTH); + sbus_iounmap(fore200e->regs.sba.bsr, SBA200E_BSR_LENGTH); + sbus_iounmap(fore200e->regs.sba.isr, SBA200E_ISR_LENGTH); + sbus_iounmap(fore200e->virt_base, SBA200E_RAM_LENGTH); } @@ -1477,12 +1477,12 @@ #endif /* the MTU is not used by the cp, except in the case of AAL0 */ fore200e->bus->write(mtu, &entry->cp_entry->cmd.activate_block.mtu); - fore200e->bus->write(*(u32*)&vpvc, (u32*)&entry->cp_entry->cmd.activate_block.vpvc); - fore200e->bus->write(*(u32*)&activ_opcode, (u32*)&entry->cp_entry->cmd.activate_block.opcode); + fore200e->bus->write(*(u32*)&vpvc, (u32 __iomem *)&entry->cp_entry->cmd.activate_block.vpvc); + fore200e->bus->write(*(u32*)&activ_opcode, (u32 __iomem *)&entry->cp_entry->cmd.activate_block.opcode); } else { - fore200e->bus->write(*(u32*)&vpvc, (u32*)&entry->cp_entry->cmd.deactivate_block.vpvc); - fore200e->bus->write(*(u32*)&deactiv_opcode, (u32*)&entry->cp_entry->cmd.deactivate_block.opcode); + fore200e->bus->write(*(u32*)&vpvc, (u32 __iomem *)&entry->cp_entry->cmd.deactivate_block.vpvc); + fore200e->bus->write(*(u32*)&deactiv_opcode, (u32 __iomem *)&entry->cp_entry->cmd.deactivate_block.opcode); } ok = fore200e_poll(fore200e, entry->status, STATUS_COMPLETE, 400); @@ -1858,7 +1858,7 @@ tpd_haddr.haddr = entry->tpd_dma >> TPD_HADDR_SHIFT; /* shift the address, as we are in a bitfield */ *entry->status = STATUS_PENDING; - fore200e->bus->write(*(u32*)&tpd_haddr, (u32*)&entry->cp_entry->tpd_haddr); + fore200e->bus->write(*(u32*)&tpd_haddr, (u32 __iomem *)&entry->cp_entry->tpd_haddr); spin_unlock_irqrestore(&fore200e->q_lock, flags); @@ -1893,7 +1893,7 @@ *entry->status = STATUS_PENDING; - fore200e->bus->write(*(u32*)&opcode, (u32*)&entry->cp_entry->cmd.stats_block.opcode); + fore200e->bus->write(*(u32*)&opcode, (u32 __iomem *)&entry->cp_entry->cmd.stats_block.opcode); ok = fore200e_poll(fore200e, entry->status, STATUS_COMPLETE, 400); @@ -1996,7 +1996,7 @@ *entry->status = STATUS_PENDING; - fore200e->bus->write(*(u32*)&opcode, (u32*)&entry->cp_entry->cmd.oc3_block.opcode); + fore200e->bus->write(*(u32*)&opcode, (u32 __iomem *)&entry->cp_entry->cmd.oc3_block.opcode); ok = fore200e_poll(fore200e, entry->status, STATUS_COMPLETE, 400); @@ -2291,7 +2291,7 @@ int scheme, magn, i; struct host_bsq* bsq; - struct cp_bsq_entry* cp_entry; + struct cp_bsq_entry __iomem * cp_entry; for (scheme = 0; scheme < BUFFER_SCHEME_NBR; scheme++) { for (magn = 0; magn < BUFFER_MAGN_NBR; magn++) { @@ -2321,8 +2321,8 @@ } /* get the base address of the cp resident buffer supply queue entries */ - cp_entry = (struct cp_bsq_entry*)(fore200e->virt_base + - fore200e->bus->read(&fore200e->cp_queues->cp_bsq[ scheme ][ magn ])); + cp_entry = fore200e->virt_base + + fore200e->bus->read(&fore200e->cp_queues->cp_bsq[ scheme ][ magn ]); /* fill the host resident and cp resident buffer supply queue entries */ for (i = 0; i < QUEUE_SIZE_BS; i++) { @@ -2352,7 +2352,7 @@ fore200e_init_rx_queue(struct fore200e* fore200e) { struct host_rxq* rxq = &fore200e->host_rxq; - struct cp_rxq_entry* cp_entry; + struct cp_rxq_entry __iomem * cp_entry; int i; DPRINTK(2, "receive queue is being initialized\n"); @@ -2378,8 +2378,7 @@ } /* get the base address of the cp resident rx queue entries */ - cp_entry = (struct cp_rxq_entry*)(fore200e->virt_base + - fore200e->bus->read(&fore200e->cp_queues->cp_rxq)); + cp_entry = fore200e->virt_base + fore200e->bus->read(&fore200e->cp_queues->cp_rxq); /* fill the host resident and cp resident rx entries */ for (i=0; i < QUEUE_SIZE_RX; i++) { @@ -2413,7 +2412,7 @@ fore200e_init_tx_queue(struct fore200e* fore200e) { struct host_txq* txq = &fore200e->host_txq; - struct cp_txq_entry* cp_entry; + struct cp_txq_entry __iomem * cp_entry; int i; DPRINTK(2, "transmit queue is being initialized\n"); @@ -2439,8 +2438,7 @@ } /* get the base address of the cp resident tx queue entries */ - cp_entry = (struct cp_txq_entry*)(fore200e->virt_base + - fore200e->bus->read(&fore200e->cp_queues->cp_txq)); + cp_entry = fore200e->virt_base + fore200e->bus->read(&fore200e->cp_queues->cp_txq); /* fill the host resident and cp resident tx entries */ for (i=0; i < QUEUE_SIZE_TX; i++) { @@ -2477,7 +2475,7 @@ fore200e_init_cmd_queue(struct fore200e* fore200e) { struct host_cmdq* cmdq = &fore200e->host_cmdq; - struct cp_cmdq_entry* cp_entry; + struct cp_cmdq_entry __iomem * cp_entry; int i; DPRINTK(2, "command queue is being initialized\n"); @@ -2492,8 +2490,7 @@ } /* get the base address of the cp resident cmd queue entries */ - cp_entry = (struct cp_cmdq_entry*)(fore200e->virt_base + - fore200e->bus->read(&fore200e->cp_queues->cp_cmdq)); + cp_entry = fore200e->virt_base + fore200e->bus->read(&fore200e->cp_queues->cp_cmdq); /* fill the host resident and cp resident cmd entries */ for (i=0; i < QUEUE_SIZE_CMD; i++) { @@ -2521,7 +2518,7 @@ enum buffer_scheme scheme, enum buffer_magn magn, int queue_length, int pool_size, int supply_blksize) { - struct bs_spec* bs_spec = &fore200e->cp_queues->init.bs_spec[ scheme ][ magn ]; + struct bs_spec __iomem * bs_spec = &fore200e->cp_queues->init.bs_spec[ scheme ][ magn ]; fore200e->bus->write(queue_length, &bs_spec->queue_length); fore200e->bus->write(fore200e_rx_buf_size[ scheme ][ magn ], &bs_spec->buffer_size); @@ -2533,7 +2530,7 @@ static int __init fore200e_initialize(struct fore200e* fore200e) { - struct cp_queues* cpq; + struct cp_queues __iomem * cpq; int ok, scheme, magn; DPRINTK(2, "device %s being initialized\n", fore200e->name); @@ -2541,7 +2538,7 @@ init_MUTEX(&fore200e->rate_sf); spin_lock_init(&fore200e->q_lock); - cpq = fore200e->cp_queues = (struct cp_queues*) (fore200e->virt_base + FORE200E_CP_QUEUES_OFFSET); + cpq = fore200e->cp_queues = fore200e->virt_base + FORE200E_CP_QUEUES_OFFSET; /* enable cp to host interrupts */ fore200e->bus->write(1, &cpq->imask); @@ -2585,7 +2582,7 @@ static void __init fore200e_monitor_putc(struct fore200e* fore200e, char c) { - struct cp_monitor* monitor = fore200e->cp_monitor; + struct cp_monitor __iomem * monitor = fore200e->cp_monitor; #if 0 printk("%c", c); @@ -2597,7 +2594,7 @@ static int __init fore200e_monitor_getc(struct fore200e* fore200e) { - struct cp_monitor* monitor = fore200e->cp_monitor; + struct cp_monitor __iomem * monitor = fore200e->cp_monitor; unsigned long timeout = jiffies + MSECS(50); int c; @@ -2673,7 +2670,7 @@ struct fw_header* fw_header = (struct fw_header*) fw_data; - u32* load_addr = fore200e->virt_base + le32_to_cpu(fw_header->load_offset); + u32 __iomem *load_addr = fore200e->virt_base + le32_to_cpu(fw_header->load_offset); DPRINTK(2, "device %s firmware being loaded at 0x%p (%d words)\n", fore200e->name, load_addr, fw_size); @@ -2854,7 +2851,7 @@ " board serial number:\t\t%d\n\n", fore200e_irq_itoa(fore200e->irq), (void*)fore200e->phys_base, - (void*)fore200e->virt_base, + fore200e->virt_base, fore200e->esi[0], fore200e->esi[1], fore200e->esi[2], fore200e->esi[3], fore200e->esi[4], fore200e->esi[5], fore200e->esi[4] * 256 + fore200e->esi[5]); @@ -2938,7 +2935,7 @@ } if (!left--) { - struct cp_monitor* cp_monitor = fore200e->cp_monitor; + struct cp_monitor __iomem * cp_monitor = fore200e->cp_monitor; return sprintf(page, "\n\n" diff -Nru a/drivers/atm/fore200e.h b/drivers/atm/fore200e.h --- a/drivers/atm/fore200e.h 2004-11-29 21:22:07 -08:00 +++ b/drivers/atm/fore200e.h 2004-11-29 21:22:07 -08:00 @@ -520,7 +520,7 @@ /* host resident transmit queue entry */ typedef struct host_txq_entry { - struct cp_txq_entry* cp_entry; /* addr of cp resident tx queue entry */ + struct cp_txq_entry __iomem *cp_entry; /* addr of cp resident tx queue entry */ enum status* status; /* addr of host resident status */ struct tpd* tpd; /* addr of transmit PDU descriptor */ u32 tpd_dma; /* DMA address of tpd */ @@ -535,7 +535,7 @@ /* host resident receive queue entry */ typedef struct host_rxq_entry { - struct cp_rxq_entry* cp_entry; /* addr of cp resident rx queue entry */ + struct cp_rxq_entry __iomem *cp_entry; /* addr of cp resident rx queue entry */ enum status* status; /* addr of host resident status */ struct rpd* rpd; /* addr of receive PDU descriptor */ u32 rpd_dma; /* DMA address of rpd */ @@ -545,7 +545,7 @@ /* host resident buffer supply queue entry */ typedef struct host_bsq_entry { - struct cp_bsq_entry* cp_entry; /* addr of cp resident buffer supply queue entry */ + struct cp_bsq_entry __iomem *cp_entry; /* addr of cp resident buffer supply queue entry */ enum status* status; /* addr of host resident status */ struct rbd_block* rbd_block; /* addr of receive buffer descriptor block */ u32 rbd_block_dma; /* DMA address od rdb */ @@ -555,7 +555,7 @@ /* host resident command queue entry */ typedef struct host_cmdq_entry { - struct cp_cmdq_entry* cp_entry; /* addr of cp resident cmd queue entry */ + struct cp_cmdq_entry __iomem *cp_entry; /* addr of cp resident cmd queue entry */ enum status *status; /* addr of host resident status */ } host_cmdq_entry_t; @@ -772,18 +772,18 @@ /* PCA-200E registers */ typedef struct fore200e_pca_regs { - volatile u32* hcr; /* address of host control register */ - volatile u32* imr; /* address of host interrupt mask register */ - volatile u32* psr; /* address of PCI specific register */ + volatile u32 __iomem * hcr; /* address of host control register */ + volatile u32 __iomem * imr; /* address of host interrupt mask register */ + volatile u32 __iomem * psr; /* address of PCI specific register */ } fore200e_pca_regs_t; /* SBA-200E registers */ typedef struct fore200e_sba_regs { - volatile u32* hcr; /* address of host control register */ - volatile u32* bsr; /* address of burst transfer size register */ - volatile u32* isr; /* address of interrupt level selection register */ + volatile u32 __iomem *hcr; /* address of host control register */ + volatile u32 __iomem *bsr; /* address of burst transfer size register */ + volatile u32 __iomem *isr; /* address of interrupt level selection register */ } fore200e_sba_regs_t; @@ -807,8 +807,8 @@ int status_alignment; /* status words DMA alignment requirement */ const unsigned char* fw_data; /* address of firmware data start */ const unsigned int* fw_size; /* address of firmware data size */ - u32 (*read)(volatile u32*); - void (*write)(u32, volatile u32*); + u32 (*read)(volatile u32 __iomem *); + void (*write)(u32, volatile u32 __iomem *); u32 (*dma_map)(struct fore200e*, void*, int, int); void (*dma_unmap)(struct fore200e*, u32, int, int); void (*dma_sync_for_cpu)(struct fore200e*, u32, int, int); @@ -852,12 +852,12 @@ void* bus_dev; /* bus-specific kernel data */ int irq; /* irq number */ unsigned long phys_base; /* physical base address */ - void* virt_base; /* virtual base address */ + void __iomem * virt_base; /* virtual base address */ unsigned char esi[ ESI_LEN ]; /* end system identifier */ - struct cp_monitor* cp_monitor; /* i960 monitor address */ - struct cp_queues* cp_queues; /* cp resident queues */ + struct cp_monitor __iomem * cp_monitor; /* i960 monitor address */ + struct cp_queues __iomem * cp_queues; /* cp resident queues */ struct host_cmdq host_cmdq; /* host resident cmd queue */ struct host_txq host_txq; /* host resident tx queue */ struct host_rxq host_rxq; /* host resident rx queue */ diff -Nru a/drivers/atm/he.c b/drivers/atm/he.c --- a/drivers/atm/he.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/atm/he.c 2004-11-29 21:22:06 -08:00 @@ -1701,7 +1701,7 @@ } if (he_dev->membase) - iounmap((void *) he_dev->membase); + iounmap(he_dev->membase); } static struct he_tpd * diff -Nru a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c --- a/drivers/atm/idt77252.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/atm/idt77252.c 2004-11-29 21:22:07 -08:00 @@ -3169,7 +3169,7 @@ } if (card->membase) - iounmap((void *) card->membase); + iounmap(card->membase); clear_bit(IDT77252_BIT_INIT, &card->flags); DIPRINTK("%s: Card deinitialized.\n", card->name); @@ -3803,7 +3803,7 @@ deinit_card(card); err_out_iounmap: - iounmap((void *) card->membase); + iounmap(card->membase); err_out_free_card: kfree(card); diff -Nru a/drivers/atm/iphase.c b/drivers/atm/iphase.c --- a/drivers/atm/iphase.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/atm/iphase.c 2004-11-29 21:22:08 -08:00 @@ -1010,7 +1010,8 @@ void desc_dbg(IADEV *iadev) { u_short tcq_wr_ptr, tcq_st_ptr, tcq_ed_ptr; - u32 tmp, i; + u32 i; + void __iomem *tmp; // regval = readl((u32)ia_cmds->maddr); tcq_wr_ptr = readw(iadev->seg_reg+TCQ_WR_PTR); printk("B_tcq_wr = 0x%x desc = %d last desc = %d\n", @@ -1024,7 +1025,7 @@ i = 0; while (tcq_st_ptr != tcq_ed_ptr) { tmp = iadev->seg_ram+tcq_st_ptr; - printk("TCQ slot %d desc = %d Addr = 0x%x\n", i++, readw(tmp), tmp); + printk("TCQ slot %d desc = %d Addr = %p\n", i++, readw(tmp), tmp); tcq_st_ptr += 2; } for(i=0; i num_tx_desc; i++) @@ -1080,7 +1081,7 @@ IADEV *iadev; struct atm_vcc *vcc; unsigned short status; - struct rx_buf_desc *buf_desc_ptr; + struct rx_buf_desc __iomem *buf_desc_ptr; int desc; struct dle* wr_ptr; int len; @@ -1095,7 +1096,7 @@ } /* mask 1st 3 bits to get the actual descno. */ desc = readw(iadev->reass_ram+iadev->rfL.pcq_rd) & 0x1fff; - IF_RX(printk("reass_ram = 0x%x iadev->rfL.pcq_rd = 0x%x desc = %d\n", + IF_RX(printk("reass_ram = %p iadev->rfL.pcq_rd = 0x%x desc = %d\n", iadev->reass_ram, iadev->rfL.pcq_rd, desc); printk(" pcq_wr_ptr = 0x%x\n", readw(iadev->reass_reg+PCQ_WR_PTR)&0xffff);) @@ -1109,7 +1110,7 @@ /* get the buffer desc entry. update stuff. - doesn't seem to be any update necessary */ - buf_desc_ptr = (struct rx_buf_desc *)iadev->RX_DESC_BASE_ADDR; + buf_desc_ptr = iadev->RX_DESC_BASE_ADDR; /* make the ptr point to the corresponding buffer desc entry */ buf_desc_ptr += desc; if (!desc || (desc > iadev->num_rx_desc) || @@ -1358,8 +1359,8 @@ static int open_rx(struct atm_vcc *vcc) { IADEV *iadev; - u_short *vc_table; - u_short *reass_ptr; + u_short __iomem *vc_table; + u_short __iomem *reass_ptr; IF_EVENT(printk("iadev: open_rx %d.%d\n", vcc->vpi, vcc->vci);) if (vcc->qos.rxtp.traffic_class == ATM_NONE) return 0; @@ -1372,8 +1373,8 @@ } /* Make only this VCI in the vc table valid and let all others be invalid entries */ - vc_table = (u_short *)(iadev->reass_ram+RX_VC_TABLE*iadev->memSize); - vc_table += vcc->vci; + vc_table = iadev->reass_ram+RX_VC_TABLE*iadev->memSize; + vc_table += vcc->vci; /* mask the last 6 bits and OR it with 3 for 1K VCs */ *vc_table = vcc->vci << 6; @@ -1387,9 +1388,8 @@ ia_open_abr_vc(iadev, &srv_p, vcc, 0); } else { /* for UBR later may need to add CBR logic */ - reass_ptr = (u_short *) - (iadev->reass_ram+REASS_TABLE*iadev->memSize); - reass_ptr += vcc->vci; + reass_ptr = iadev->reass_ram+REASS_TABLE*iadev->memSize; + reass_ptr += vcc->vci; *reass_ptr = NO_AAL5_PKT; } @@ -1403,7 +1403,7 @@ static int rx_init(struct atm_dev *dev) { IADEV *iadev; - struct rx_buf_desc *buf_desc_ptr; + struct rx_buf_desc __iomem *buf_desc_ptr; unsigned long rx_pkt_start = 0; void *dle_addr; struct abr_vc_table *abr_vc_table; @@ -1465,13 +1465,13 @@ /* Initialize each entry in the Buffer Descriptor Table */ iadev->RX_DESC_BASE_ADDR = iadev->reass_ram+RX_DESC_BASE*iadev->memSize; - buf_desc_ptr =(struct rx_buf_desc *)iadev->RX_DESC_BASE_ADDR; - memset((caddr_t)buf_desc_ptr, 0, sizeof(*buf_desc_ptr)); + buf_desc_ptr = iadev->RX_DESC_BASE_ADDR; + memset_io(buf_desc_ptr, 0, sizeof(*buf_desc_ptr)); buf_desc_ptr++; rx_pkt_start = iadev->rx_pkt_ram; for(i=1; i<=iadev->num_rx_desc; i++) { - memset((caddr_t)buf_desc_ptr, 0, sizeof(*buf_desc_ptr)); + memset_io(buf_desc_ptr, 0, sizeof(*buf_desc_ptr)); buf_desc_ptr->buf_start_hi = rx_pkt_start >> 16; buf_desc_ptr->buf_start_lo = rx_pkt_start & 0x0000ffff; buf_desc_ptr++; @@ -2053,10 +2053,9 @@ IF_INIT(printk("CBR_TAB_BEG = 0x%x, CBR_TAB_END = 0x%x, CBR_PTR = 0x%x\n", readw(iadev->seg_reg+CBR_TAB_BEG), readw(iadev->seg_reg+CBR_TAB_END), readw(iadev->seg_reg+CBR_TAB_END+1));) - tmp16 = (iadev->seg_ram+CBR_SCHED_TABLE*iadev->memSize); /* Initialize the CBR Schedualing Table */ - memset((caddr_t)(iadev->seg_ram+CBR_SCHED_TABLE*iadev->memSize), + memset_io(iadev->seg_ram+CBR_SCHED_TABLE*iadev->memSize, 0, iadev->num_vc*6); iadev->CbrRemEntries = iadev->CbrTotEntries = iadev->num_vc*3; iadev->CbrEntryPt = 0; @@ -2287,7 +2286,8 @@ static int __init ia_init(struct atm_dev *dev) { IADEV *iadev; - unsigned long real_base, base; + unsigned long real_base; + void __iomem *base; unsigned short command; unsigned char revision; int error, i; @@ -2343,7 +2343,7 @@ udelay(10); /* mapping the physical address to a virtual address in address space */ - base=(unsigned long)ioremap((unsigned long)real_base,iadev->pci_map_size); /* ioremap is not resolved ??? */ + base = ioremap(real_base,iadev->pci_map_size); /* ioremap is not resolved ??? */ if (!base) { @@ -2351,39 +2351,38 @@ dev->number); return error; } - IF_INIT(printk(DEV_LABEL " (itf %d): rev.%d,base=0x%lx,irq=%d\n", + IF_INIT(printk(DEV_LABEL " (itf %d): rev.%d,base=%p,irq=%d\n", dev->number, revision, base, iadev->irq);) /* filling the iphase dev structure */ iadev->mem = iadev->pci_map_size /2; - iadev->base_diff = real_base - base; iadev->real_base = real_base; iadev->base = base; /* Bus Interface Control Registers */ - iadev->reg = (u32 *) (base + REG_BASE); + iadev->reg = base + REG_BASE; /* Segmentation Control Registers */ - iadev->seg_reg = (u32 *) (base + SEG_BASE); + iadev->seg_reg = base + SEG_BASE; /* Reassembly Control Registers */ - iadev->reass_reg = (u32 *) (base + REASS_BASE); + iadev->reass_reg = base + REASS_BASE; /* Front end/ DMA control registers */ - iadev->phy = (u32 *) (base + PHY_BASE); - iadev->dma = (u32 *) (base + PHY_BASE); + iadev->phy = base + PHY_BASE; + iadev->dma = base + PHY_BASE; /* RAM - Segmentation RAm and Reassembly RAM */ - iadev->ram = (u32 *) (base + ACTUAL_RAM_BASE); - iadev->seg_ram = (base + ACTUAL_SEG_RAM_BASE); - iadev->reass_ram = (base + ACTUAL_REASS_RAM_BASE); + iadev->ram = base + ACTUAL_RAM_BASE; + iadev->seg_ram = base + ACTUAL_SEG_RAM_BASE; + iadev->reass_ram = base + ACTUAL_REASS_RAM_BASE; /* lets print out the above */ - IF_INIT(printk("Base addrs: %08x %08x %08x \n %08x %08x %08x %08x\n", - (u32)iadev->reg,(u32)iadev->seg_reg,(u32)iadev->reass_reg, - (u32)iadev->phy, (u32)iadev->ram, (u32)iadev->seg_ram, - (u32)iadev->reass_ram);) + IF_INIT(printk("Base addrs: %p %p %p \n %p %p %p %p\n", + iadev->reg,iadev->seg_reg,iadev->reass_reg, + iadev->phy, iadev->ram, iadev->seg_ram, + iadev->reass_ram);) /* lets try reading the MAC address */ error = get_esi(dev); if (error) { - iounmap((void *) iadev->base); + iounmap(iadev->base); return error; } printk("IA: "); @@ -2393,7 +2392,7 @@ /* reset SAR */ if (reset_sar(dev)) { - iounmap((void *) iadev->base); + iounmap(iadev->base); printk("IA: reset SAR fail, please try again\n"); return 1; } @@ -2659,7 +2658,7 @@ vc_table += vcc->vci; *vc_table = (vcc->vci << 6) | 15; if (vcc->qos.rxtp.traffic_class == ATM_ABR) { - struct abr_vc_table *abr_vc_table = (struct abr_vc_table *) + struct abr_vc_table __iomem *abr_vc_table = (iadev->reass_ram+ABR_VC_TABLE*iadev->memSize); abr_vc_table += vcc->vci; abr_vc_table->rdf = 0x0003; @@ -2890,7 +2889,7 @@ static int ia_pkt_tx (struct atm_vcc *vcc, struct sk_buff *skb) { IADEV *iadev; struct dle *wr_ptr; - struct tx_buf_desc *buf_desc_ptr; + struct tx_buf_desc __iomem *buf_desc_ptr; int desc; int comp_code; int total_len; @@ -2994,7 +2993,7 @@ printk("\n");) /* Build the buffer descriptor */ - buf_desc_ptr = (struct tx_buf_desc *)(iadev->seg_ram+TX_DESC_BASE); + buf_desc_ptr = iadev->seg_ram+TX_DESC_BASE; buf_desc_ptr += desc; /* points to the corresponding entry */ buf_desc_ptr->desc_mode = AAL5 | EOM_EN | APP_CRC32 | CMPL_INT; /* Huh ? p.115 of users guide describes this as a read-only register */ @@ -3252,7 +3251,7 @@ atm_dev_deregister(dev); IF_EVENT(printk("iav deregistered at (itf:%d)\n", dev->number);) - iounmap((void *) iadev->base); + iounmap(iadev->base); pci_disable_device(pdev); ia_free_rx(iadev); diff -Nru a/drivers/atm/iphase.h b/drivers/atm/iphase.h --- a/drivers/atm/iphase.h 2004-11-29 21:22:06 -08:00 +++ b/drivers/atm/iphase.h 2004-11-29 21:22:06 -08:00 @@ -996,18 +996,18 @@ typedef struct iadev_t { /*-----base pointers into (i)chipSAR+ address space */ - u32 *phy; /* base pointer into phy(SUNI) */ - u32 *dma; /* base pointer into DMA control + u32 __iomem *phy; /* base pointer into phy(SUNI) */ + u32 __iomem *dma; /* base pointer into DMA control registers */ - u32 *reg; /* base pointer to SAR registers + u32 __iomem *reg; /* base pointer to SAR registers - Bus Interface Control Regs */ - u32 *seg_reg; /* base pointer to segmentation engine + u32 __iomem *seg_reg; /* base pointer to segmentation engine internal registers */ - u32 *reass_reg; /* base pointer to reassemble engine + u32 __iomem *reass_reg; /* base pointer to reassemble engine internal registers */ - u32 *ram; /* base pointer to SAR RAM */ - unsigned int seg_ram; - unsigned int reass_ram; + u32 __iomem *ram; /* base pointer to SAR RAM */ + void __iomem *seg_ram; + void __iomem *reass_ram; struct dle_q tx_dle_q; struct free_desc_q *tx_free_desc_qhead; struct sk_buff_head tx_dma_q, tx_backlog; @@ -1019,7 +1019,7 @@ struct cpcs_trailer_desc *tx_buf; u16 num_tx_desc, tx_buf_sz, rate_limit; u32 tx_cell_cnt, tx_pkt_cnt; - u32 MAIN_VC_TABLE_ADDR, EXT_VC_TABLE_ADDR, ABR_SCHED_TABLE_ADDR; + void __iomem *MAIN_VC_TABLE_ADDR, *EXT_VC_TABLE_ADDR, *ABR_SCHED_TABLE_ADDR; struct dle_q rx_dle_q; struct free_desc_q *rx_free_desc_qhead; struct sk_buff_head rx_dma_q; @@ -1027,13 +1027,13 @@ struct atm_vcc **rx_open; /* list of all open VCs */ u16 num_rx_desc, rx_buf_sz, rxing; u32 rx_pkt_ram, rx_tmp_cnt, rx_tmp_jif; - u32 RX_DESC_BASE_ADDR; + void __iomem *RX_DESC_BASE_ADDR; u32 drop_rxpkt, drop_rxcell, rx_cell_cnt, rx_pkt_cnt; struct atm_dev *next_board; /* other iphase devices */ struct pci_dev *pci; int mem; - unsigned long base_diff; /* virtual - real base address */ - unsigned int real_base, base; /* real and virtual base address */ + unsigned int real_base; /* real and virtual base address */ + void __iomem *base; unsigned int pci_map_size; /*pci map size of board */ unsigned char irq; unsigned char bus; diff -Nru a/drivers/atm/lanai.c b/drivers/atm/lanai.c --- a/drivers/atm/lanai.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/atm/lanai.c 2004-11-29 21:22:07 -08:00 @@ -1481,7 +1481,7 @@ struct lanai_vcc *lvcc; lvcc = (struct lanai_vcc *) kmalloc(sizeof(*lvcc), GFP_KERNEL); if (likely(lvcc != NULL)) { - lvcc->vbase = 0; + lvcc->vbase = NULL; lvcc->rx.atmvcc = lvcc->tx.atmvcc = NULL; lvcc->nref = 0; memset(&lvcc->stats, 0, sizeof lvcc->stats); @@ -1565,7 +1565,7 @@ if (lvcc->vbase == 0) return; /* This vcc was never bound */ DPRINTK("Unbinding vci %d\n", lvcc->vci); - lvcc->vbase = 0; + lvcc->vbase = NULL; lanai->vccs[lvcc->vci] = NULL; #ifdef USE_POWERDOWN if (--lanai->nbound == 0) { @@ -2279,7 +2279,7 @@ lanai->conf1 = reg_read(lanai, Config1_Reg) | CONFIG1_POWERDOWN; conf1_write(lanai); #endif - iounmap((void *) lanai->base); + iounmap(lanai->base); error_pci: pci_disable_device(lanai->pci); error: @@ -2309,7 +2309,7 @@ pci_disable_device(lanai->pci); vcc_table_deallocate(lanai); service_buffer_deallocate(lanai); - iounmap((void *) lanai->base); + iounmap(lanai->base); kfree(lanai); } diff -Nru a/drivers/block/cciss.c b/drivers/block/cciss.c --- a/drivers/block/cciss.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/block/cciss.c 2004-11-29 21:22:08 -08:00 @@ -809,7 +809,7 @@ luninfo.num_opens = drv->usage_count; luninfo.num_parts = 0; /* count partitions 1 to 15 with sizes > 0 */ - for(i=1; i part[i]) continue; if (disk->part[i]->nr_sects != 0) diff -Nru a/drivers/block/cfq-iosched.c b/drivers/block/cfq-iosched.c --- a/drivers/block/cfq-iosched.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/block/cfq-iosched.c 2004-11-29 21:22:08 -08:00 @@ -1398,10 +1398,7 @@ if (crq->io_context) put_io_context(crq->io_context->ioc); - if (!cfqq->allocated[crq->is_write]) { - WARN_ON(1); - cfqq->allocated[crq->is_write] = 1; - } + BUG_ON(!cfqq->allocated[crq->is_write]); cfqq->allocated[crq->is_write]--; mempool_free(crq, cfqd->crq_pool); @@ -1421,7 +1418,7 @@ struct cfq_data *cfqd = q->elevator->elevator_data; struct cfq_io_context *cic; const int rw = rq_data_dir(rq); - struct cfq_queue *cfqq; + struct cfq_queue *cfqq, *saved_cfqq; struct cfq_rq *crq; unsigned long flags; @@ -1439,20 +1436,30 @@ #endif } +repeat: if (cfqq->allocated[rw] >= cfqd->max_queued) goto out_lock; + cfqq->allocated[rw]++; spin_unlock_irqrestore(q->queue_lock, flags); /* - * if hashing type has changed, the cfq_queue might change here. we - * don't bother rechecking ->allocated since it should be a rare - * event + * if hashing type has changed, the cfq_queue might change here. */ + saved_cfqq = cfqq; cic = cfq_get_io_context(&cfqq, gfp_mask); if (!cic) goto err; + /* + * repeat allocation checks on queue change + */ + if (unlikely(saved_cfqq != cfqq)) { + spin_lock_irqsave(q->queue_lock, flags); + saved_cfqq->allocated[rw]--; + goto repeat; + } + crq = mempool_alloc(cfqd->crq_pool, gfp_mask); if (crq) { RB_CLEAR(&crq->rb_node); @@ -1465,7 +1472,6 @@ crq->in_flight = crq->accounted = crq->is_sync = 0; crq->is_write = rw; rq->elevator_private = crq; - cfqq->allocated[rw]++; cfqq->alloc_limit[rw] = 0; return 0; } @@ -1473,6 +1479,7 @@ put_io_context(cic->ioc); err: spin_lock_irqsave(q->queue_lock, flags); + cfqq->allocated[rw]--; cfq_put_queue(cfqq); out_lock: spin_unlock_irqrestore(q->queue_lock, flags); diff -Nru a/drivers/block/floppy.c b/drivers/block/floppy.c --- a/drivers/block/floppy.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/block/floppy.c 2004-11-29 21:22:06 -08:00 @@ -1787,10 +1787,11 @@ } while ((ST0 & 0x83) != UNIT(current_drive) && inr == 2 && max_sensei); } - if (handler) - schedule_bh(handler); - else + if (!handler) { FDCS->reset = 1; + return IRQ_NONE; + } + schedule_bh(handler); is_alive("normal interrupt end"); /* FIXME! Was it really for us? */ @@ -4322,6 +4323,12 @@ floppy_track_buffer = NULL; max_buffer_sectors = 0; } + /* + * Small 10 msec delay to let through any interrupt that + * initialization might have triggered, to not + * confuse detection: + */ + msleep(10); for (i = 0; i < N_FDC; i++) { fdc = i; diff -Nru a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c --- a/drivers/block/ll_rw_blk.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/block/ll_rw_blk.c 2004-11-29 21:22:06 -08:00 @@ -1651,7 +1651,7 @@ struct io_context *ioc = get_io_context(gfp_mask); if (unlikely(test_bit(QUEUE_FLAG_DRAIN, &q->queue_flags))) - return NULL; + goto out; spin_lock_irq(q->queue_lock); if (rl->count[rw]+1 >= q->nr_requests) { diff -Nru a/drivers/block/scsi_ioctl.c b/drivers/block/scsi_ioctl.c --- a/drivers/block/scsi_ioctl.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/block/scsi_ioctl.c 2004-11-29 21:22:08 -08:00 @@ -127,10 +127,10 @@ safe_for_read(INQUIRY), safe_for_read(MODE_SENSE), safe_for_read(MODE_SENSE_10), + safe_for_read(LOG_SENSE), safe_for_read(START_STOP), safe_for_read(GPCMD_VERIFY_10), safe_for_read(VERIFY_16), - safe_for_read(READ_BUFFER), /* Audio CD commands */ safe_for_read(GPCMD_PLAY_CD), @@ -170,6 +170,7 @@ safe_for_write(ERASE), safe_for_write(GPCMD_MODE_SELECT_10), safe_for_write(MODE_SELECT), + safe_for_write(LOG_SELECT), safe_for_write(GPCMD_BLANK), safe_for_write(GPCMD_CLOSE_TRACK), safe_for_write(GPCMD_FLUSH_CACHE), diff -Nru a/drivers/block/swim3.c b/drivers/block/swim3.c --- a/drivers/block/swim3.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/block/swim3.c 2004-11-29 21:22:07 -08:00 @@ -176,8 +176,8 @@ struct floppy_state { enum swim_state state; - volatile struct swim3 *swim3; /* hardware registers */ - struct dbdma_regs *dma; /* DMA controller registers */ + struct swim3 __iomem *swim3; /* hardware registers */ + struct dbdma_regs __iomem *dma; /* DMA controller registers */ int swim3_intr; /* interrupt number for SWIM3 */ int dma_intr; /* interrupt number for DMA channel */ int cur_cyl; /* cylinder head is on, or -1 */ @@ -259,7 +259,7 @@ static void swim3_select(struct floppy_state *fs, int sel) { - volatile struct swim3 *sw = fs->swim3; + struct swim3 __iomem *sw = fs->swim3; out_8(&sw->select, RELAX); if (sel & 8) @@ -271,7 +271,7 @@ static void swim3_action(struct floppy_state *fs, int action) { - volatile struct swim3 *sw = fs->swim3; + struct swim3 __iomem *sw = fs->swim3; swim3_select(fs, action); udelay(1); @@ -283,7 +283,7 @@ static int swim3_readbit(struct floppy_state *fs, int bit) { - volatile struct swim3 *sw = fs->swim3; + struct swim3 __iomem *sw = fs->swim3; int stat; swim3_select(fs, bit); @@ -381,7 +381,7 @@ static inline void scan_track(struct floppy_state *fs) { - volatile struct swim3 *sw = fs->swim3; + struct swim3 __iomem *sw = fs->swim3; swim3_select(fs, READ_DATA_0); in_8(&sw->intr); /* clear SEEN_SECTOR bit */ @@ -394,7 +394,7 @@ static inline void seek_track(struct floppy_state *fs, int n) { - volatile struct swim3 *sw = fs->swim3; + struct swim3 __iomem *sw = fs->swim3; if (n >= 0) { swim3_action(fs, SEEK_POSITIVE); @@ -425,9 +425,9 @@ static inline void setup_transfer(struct floppy_state *fs) { int n; - volatile struct swim3 *sw = fs->swim3; + struct swim3 __iomem *sw = fs->swim3; struct dbdma_cmd *cp = fs->dma_cmd; - struct dbdma_regs *dr = fs->dma; + struct dbdma_regs __iomem *dr = fs->dma; if (fd_req->current_nr_sectors <= 0) { printk(KERN_ERR "swim3: transfer 0 sectors?\n"); @@ -445,7 +445,7 @@ out_8(&sw->sector, fs->req_sector); out_8(&sw->nsect, n); out_8(&sw->gap3, 0); - st_le32(&dr->cmdptr, virt_to_bus(cp)); + out_le32(&dr->cmdptr, virt_to_bus(cp)); if (rq_data_dir(fd_req) == WRITE) { /* Set up 3 dma commands: write preamble, data, postamble */ init_dma(cp, OUTPUT_MORE, write_preamble, sizeof(write_preamble)); @@ -537,7 +537,7 @@ static void scan_timeout(unsigned long data) { struct floppy_state *fs = (struct floppy_state *) data; - volatile struct swim3 *sw = fs->swim3; + struct swim3 __iomem *sw = fs->swim3; fs->timeout_pending = 0; out_8(&sw->control_bic, DO_ACTION | WRITE_SECTORS); @@ -557,7 +557,7 @@ static void seek_timeout(unsigned long data) { struct floppy_state *fs = (struct floppy_state *) data; - volatile struct swim3 *sw = fs->swim3; + struct swim3 __iomem *sw = fs->swim3; fs->timeout_pending = 0; out_8(&sw->control_bic, DO_SEEK); @@ -572,7 +572,7 @@ static void settle_timeout(unsigned long data) { struct floppy_state *fs = (struct floppy_state *) data; - volatile struct swim3 *sw = fs->swim3; + struct swim3 __iomem *sw = fs->swim3; fs->timeout_pending = 0; if (swim3_readbit(fs, SEEK_COMPLETE)) { @@ -596,14 +596,14 @@ static void xfer_timeout(unsigned long data) { struct floppy_state *fs = (struct floppy_state *) data; - volatile struct swim3 *sw = fs->swim3; - struct dbdma_regs *dr = fs->dma; + struct swim3 __iomem *sw = fs->swim3; + struct dbdma_regs __iomem *dr = fs->dma; struct dbdma_cmd *cp = fs->dma_cmd; unsigned long s; int n; fs->timeout_pending = 0; - st_le32(&dr->control, RUN << 16); + out_le32(&dr->control, RUN << 16); /* We must wait a bit for dbdma to stop */ for (n = 0; (in_le32(&dr->status) & ACTIVE) && n < 1000; n++) udelay(1); @@ -628,10 +628,10 @@ static irqreturn_t swim3_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct floppy_state *fs = (struct floppy_state *) dev_id; - volatile struct swim3 *sw = fs->swim3; + struct swim3 __iomem *sw = fs->swim3; int intr, err, n; int stat, resid; - struct dbdma_regs *dr; + struct dbdma_regs __iomem *dr; struct dbdma_cmd *cp; intr = in_8(&sw->intr); @@ -866,7 +866,7 @@ err = fd_eject(fs); return err; case FDGETPRM: - if (copy_to_user((void *) param, (void *)&floppy_type, + if (copy_to_user((void __user *) param, &floppy_type, sizeof(struct floppy_struct))) return -EFAULT; return 0; @@ -877,7 +877,7 @@ static int floppy_open(struct inode *inode, struct file *filp) { struct floppy_state *fs = inode->i_bdev->bd_disk->private_data; - volatile struct swim3 *sw = fs->swim3; + struct swim3 __iomem *sw = fs->swim3; int n, err = 0; if (fs->ref_count == 0) { @@ -946,7 +946,7 @@ static int floppy_release(struct inode *inode, struct file *filp) { struct floppy_state *fs = inode->i_bdev->bd_disk->private_data; - volatile struct swim3 *sw = fs->swim3; + struct swim3 __iomem *sw = fs->swim3; if (fs->ref_count > 0 && --fs->ref_count == 0) { swim3_action(fs, MOTOR_OFF); out_8(&sw->control_bic, 0xff); @@ -964,7 +964,7 @@ static int floppy_revalidate(struct gendisk *disk) { struct floppy_state *fs = disk->private_data; - volatile struct swim3 *sw; + struct swim3 __iomem *sw; int ret, n; if (fs->media_bay && check_media_bay(fs->media_bay, MB_FD)) @@ -1105,8 +1105,10 @@ memset(fs, 0, sizeof(*fs)); fs->state = idle; - fs->swim3 = (volatile struct swim3 *) ioremap(swim->addrs[0].address, 0x200); - fs->dma = (struct dbdma_regs *) ioremap(swim->addrs[1].address, 0x200); + fs->swim3 = (struct swim3 __iomem *) + ioremap(swim->addrs[0].address, 0x200); + fs->dma = (struct dbdma_regs __iomem *) + ioremap(swim->addrs[1].address, 0x200); fs->swim3_intr = swim->intrs[0].line; fs->dma_intr = swim->intrs[1].line; fs->cur_cyl = -1; diff -Nru a/drivers/block/viodasd.c b/drivers/block/viodasd.c --- a/drivers/block/viodasd.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/block/viodasd.c 2004-11-29 21:22:07 -08:00 @@ -764,8 +764,8 @@ d = &viodasd_devices[vdev->unit_address]; if (d->disk) { del_gendisk(d->disk); - put_disk(d->disk); blk_cleanup_queue(d->disk->queue); + put_disk(d->disk); d->disk = NULL; } d->dev = NULL; diff -Nru a/drivers/block/xd.c b/drivers/block/xd.c --- a/drivers/block/xd.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/block/xd.c 2004-11-29 21:22:08 -08:00 @@ -266,7 +266,7 @@ /* xd_detect: scan the possible BIOS ROM locations for the signature strings */ static u_char __init xd_detect (u_char *controller, unsigned int *address) { - u_char i,j,found = 0; + int i, j; if (xd_override) { @@ -275,15 +275,23 @@ return(1); } - for (i = 0; i < (sizeof(xd_bases) / sizeof(xd_bases[0])) && !found; i++) - for (j = 1; j < (sizeof(xd_sigs) / sizeof(xd_sigs[0])) && !found; j++) - if (isa_check_signature(xd_bases[i] + xd_sigs[j].offset,xd_sigs[j].string,strlen(xd_sigs[j].string))) { + for (i = 0; i < (sizeof(xd_bases) / sizeof(xd_bases[0])); i++) { + void __iomem *p = ioremap(xd_bases[i], 0x2000); + if (!p) + continue; + for (j = 1; j < (sizeof(xd_sigs) / sizeof(xd_sigs[0])); j++) { + const char *s = xd_sigs[j].string; + if (check_signature(p + xd_sigs[j].offset, s, strlen(s))) { *controller = j; xd_type = j; *address = xd_bases[i]; - found++; + iounmap(p); + return 1; } - return (found); + } + iounmap(p); + } + return 0; } /* do_xd_request: handle an incoming request */ diff -Nru a/drivers/bluetooth/bcm203x.c b/drivers/bluetooth/bcm203x.c --- a/drivers/bluetooth/bcm203x.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/bluetooth/bcm203x.c 2004-11-29 21:22:06 -08:00 @@ -2,6 +2,7 @@ * * Broadcom Blutonium firmware driver * + * Copyright (C) 2003 Maxim Krasnyansky * Copyright (C) 2003 Marcel Holtmann * * diff -Nru a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c --- a/drivers/cdrom/cdrom.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/cdrom/cdrom.c 2004-11-29 21:22:06 -08:00 @@ -3336,7 +3336,6 @@ /* Make sure that /proc/sys/dev is there */ ctl_table cdrom_root_table[] = { -#ifdef CONFIG_PROC_FS { .ctl_name = CTL_DEV, .procname = "dev", @@ -3344,7 +3343,6 @@ .mode = 0555, .child = cdrom_cdrom_table, }, -#endif /* CONFIG_PROC_FS */ { .ctl_name = 0 } }; static struct ctl_table_header *cdrom_sysctl_header; diff -Nru a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c --- a/drivers/cdrom/viocd.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/cdrom/viocd.c 2004-11-29 21:22:08 -08:00 @@ -154,7 +154,6 @@ #define DEVICE_NR(di) ((di) - &viocd_diskinfo[0]) -static request_queue_t *viocd_queue; static spinlock_t viocd_reqlock; #define MAX_CD_REQ 1 @@ -503,6 +502,18 @@ return ret; } +static void restart_all_queues(int first_index) +{ + int i; + + for (i = first_index + 1; i < viocd_numdev; i++) + if (viocd_diskinfo[i].viocd_disk) + blk_run_queue(viocd_diskinfo[i].viocd_disk->queue); + for (i = 0; i <= first_index; i++) + if (viocd_diskinfo[i].viocd_disk) + blk_run_queue(viocd_diskinfo[i].viocd_disk->queue); +} + /* This routine handles incoming CD LP events */ static void vio_handle_cd_event(struct HvLpEvent *event) { @@ -532,7 +543,7 @@ case viocdopen: if (event->xRc == 0) { di = &viocd_diskinfo[bevent->disk]; - blk_queue_hardsect_size(viocd_queue, + blk_queue_hardsect_size(di->viocd_disk->queue, bevent->block_size); set_capacity(di->viocd_disk, bevent->media_size * @@ -584,7 +595,7 @@ /* restart handling of incoming requests */ spin_unlock_irqrestore(&viocd_reqlock, flags); - blk_run_queue(viocd_queue); + restart_all_queues(bevent->disk); break; default: @@ -624,6 +635,7 @@ struct disk_info *d; struct cdrom_device_info *c; struct cdrom_info *ci; + struct request_queue *q; deviceno = vdev->unit_address; if (deviceno >= viocd_numdev) @@ -643,17 +655,22 @@ if (register_cdrom(c) != 0) { printk(VIOCD_KERN_WARNING "Cannot register viocd CD-ROM %s!\n", c->name); - return 0; + goto out; } printk(VIOCD_KERN_INFO "cd %s is iSeries resource %10.10s " "type %4.4s, model %3.3s\n", c->name, ci->rsrcname, ci->type, ci->model); + q = blk_init_queue(do_viocd_request, &viocd_reqlock); + if (q == NULL) { + printk(VIOCD_KERN_WARNING "Cannot allocate queue for %s!\n", + c->name); + goto out_unregister_cdrom; + } gendisk = alloc_disk(1); if (gendisk == NULL) { printk(VIOCD_KERN_WARNING "Cannot create gendisk for %s!\n", c->name); - unregister_cdrom(c); - return 0; + goto out_cleanup_queue; } gendisk->major = VIOCD_MAJOR; gendisk->first_minor = deviceno; @@ -661,7 +678,10 @@ sizeof(gendisk->disk_name)); snprintf(gendisk->devfs_name, sizeof(gendisk->devfs_name), VIOCD_DEVICE_DEVFS "%d", deviceno); - gendisk->queue = viocd_queue; + blk_queue_max_hw_segments(q, 1); + blk_queue_max_phys_segments(q, 1); + blk_queue_max_sectors(q, 4096 / 512); + gendisk->queue = q; gendisk->fops = &viocd_fops; gendisk->flags = GENHD_FL_CD|GENHD_FL_REMOVABLE; set_capacity(gendisk, 0); @@ -670,8 +690,14 @@ d->dev = &vdev->dev; gendisk->driverfs_dev = d->dev; add_disk(gendisk); - return 0; + +out_cleanup_queue: + blk_cleanup_queue(q); +out_unregister_cdrom: + unregister_cdrom(c); +out: + return -ENODEV; } static int viocd_remove(struct vio_dev *vdev) @@ -683,6 +709,7 @@ "Cannot unregister viocd CD-ROM %s!\n", d->viocd_info.name); del_gendisk(d->viocd_disk); + blk_cleanup_queue(d->viocd_disk->queue); put_disk(d->viocd_disk); return 0; } @@ -742,18 +769,10 @@ goto out_undo_vio; spin_lock_init(&viocd_reqlock); - viocd_queue = blk_init_queue(do_viocd_request, &viocd_reqlock); - if (viocd_queue == NULL) { - ret = -ENOMEM; - goto out_free_info; - } - blk_queue_max_hw_segments(viocd_queue, 1); - blk_queue_max_phys_segments(viocd_queue, 1); - blk_queue_max_sectors(viocd_queue, 4096 / 512); ret = vio_register_driver(&viocd_driver); if (ret) - goto out_cleanup_queue; + goto out_free_info; e = create_proc_entry("iSeries/viocd", S_IFREG|S_IRUGO, NULL); if (e) { @@ -763,8 +782,6 @@ return 0; -out_cleanup_queue: - blk_cleanup_queue(viocd_queue); out_free_info: dma_free_coherent(iSeries_vio_dev, sizeof(*viocd_unitinfo) * VIOCD_MAX_CD, @@ -781,7 +798,6 @@ { remove_proc_entry("iSeries/viocd", NULL); vio_unregister_driver(&viocd_driver); - blk_cleanup_queue(viocd_queue); if (viocd_unitinfo != NULL) dma_free_coherent(iSeries_vio_dev, sizeof(*viocd_unitinfo) * VIOCD_MAX_CD, diff -Nru a/drivers/char/epca.h b/drivers/char/epca.h --- a/drivers/char/epca.h 2004-11-29 21:22:09 -08:00 +++ b/drivers/char/epca.h 2004-11-29 21:22:09 -08:00 @@ -149,7 +149,7 @@ ushort numports; unchar *port; unchar *membase; - unchar *re_map_port; + unchar __iomem *re_map_port; unchar *re_map_membase; ulong memory_seg; void ( * memwinon ) (struct board_info *, unsigned int) ; diff -Nru a/drivers/char/hw_random.c b/drivers/char/hw_random.c --- a/drivers/char/hw_random.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/char/hw_random.c 2004-11-29 21:22:07 -08:00 @@ -191,7 +191,7 @@ #define INTEL_RNG_ADDR_LEN 3 /* token to our ioremap'd RNG register area */ -static void *rng_mem; +static void __iomem *rng_mem; static inline u8 intel_hwstatus (void) { diff -Nru a/drivers/char/i8k.c b/drivers/char/i8k.c --- a/drivers/char/i8k.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/char/i8k.c 2004-11-29 21:22:06 -08:00 @@ -78,7 +78,7 @@ MODULE_PARM_DESC(restricted, "Allow fan control if SYS_ADMIN capability set"); static int power_status; -module_param(power_status, bool, 600); +module_param(power_status, bool, 0600); MODULE_PARM_DESC(power_status, "Report power status in /proc/i8k"); static ssize_t i8k_read(struct file *, char __user *, size_t, loff_t *); diff -Nru a/drivers/char/mmtimer.c b/drivers/char/mmtimer.c --- a/drivers/char/mmtimer.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/char/mmtimer.c 2004-11-29 21:22:08 -08:00 @@ -14,8 +14,8 @@ * 11/01/01 - jbarnes - initial revision * 9/10/04 - Christoph Lameter - remove interrupt support for kernel inclusion * 10/1/04 - Christoph Lameter - provide posix clock CLOCK_SGI_CYCLE - * 10/13/04 - Christoph Lameter, Dimitri Sivanich - provide timer interrupt support - * via the posix timer interface + * 10/13/04 - Christoph Lameter, Dimitri Sivanich - provide timer interrupt + * support via the posix timer interface */ #include @@ -82,45 +82,23 @@ * node. RTC0 is used by SAL. */ #define NUM_COMPARATORS 3 -/* - * Check for an interrupt and clear the pending bit if - * one is waiting. -*/ +/* Check for an RTC interrupt pending */ static int inline mmtimer_int_pending(int comparator) { - int pending = 0; - - switch (comparator) { - case 0: - if (HUB_L((unsigned long *)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED)) & - SH_EVENT_OCCURRED_RTC1_INT_MASK) { - HUB_S((u64 *)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED_ALIAS), - SH_EVENT_OCCURRED_RTC1_INT_MASK); - pending = 1; - } - break; - case 1: - if (HUB_L((unsigned long *)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED)) & - SH_EVENT_OCCURRED_RTC2_INT_MASK) { - HUB_S((u64 *)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED_ALIAS), - SH_EVENT_OCCURRED_RTC2_INT_MASK); - pending = 1; - } - break; - case 2: - if (HUB_L((unsigned long *)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED)) & - SH_EVENT_OCCURRED_RTC3_INT_MASK) { - HUB_S((u64 *)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED_ALIAS), - SH_EVENT_OCCURRED_RTC3_INT_MASK); - pending = 1; - } - break; - default: - return -EFAULT; - } - return pending; + if (HUB_L((unsigned long *)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED)) & + SH_EVENT_OCCURRED_RTC1_INT_MASK << comparator) + return 1; + else + return 0; +} +/* Clear the RTC interrupt pending bit */ +static void inline mmtimer_clr_int_pending(int comparator) +{ + HUB_S((u64 *)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED_ALIAS), + SH_EVENT_OCCURRED_RTC1_INT_MASK << comparator); } +/* Setup timer on comparator RTC1 */ static void inline mmtimer_setup_int_0(u64 expires) { u64 val; @@ -131,8 +109,8 @@ /* Initialize comparator value */ HUB_S((u64 *)LOCAL_MMR_ADDR(SH_INT_CMPB), -1L); - HUB_S((u64 *)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED_ALIAS), - SH_EVENT_OCCURRED_RTC1_INT_MASK); + /* Clear pending bit */ + mmtimer_clr_int_pending(0); val = ((u64)SGI_MMTIMER_VECTOR << SH_RTC1_INT_CONFIG_IDX_SHFT) | ((u64)cpu_physical_id(smp_processor_id()) << @@ -150,6 +128,7 @@ } +/* Setup timer on comparator RTC2 */ static void inline mmtimer_setup_int_1(u64 expires) { u64 val; @@ -158,8 +137,7 @@ HUB_S((u64 *)LOCAL_MMR_ADDR(SH_INT_CMPC), -1L); - HUB_S((u64 *)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED_ALIAS), - SH_EVENT_OCCURRED_RTC2_INT_MASK); + mmtimer_clr_int_pending(1); val = ((u64)SGI_MMTIMER_VECTOR << SH_RTC2_INT_CONFIG_IDX_SHFT) | ((u64)cpu_physical_id(smp_processor_id()) << @@ -172,6 +150,7 @@ HUB_S((u64 *)LOCAL_MMR_ADDR(SH_INT_CMPC), expires); } +/* Setup timer on comparator RTC3 */ static void inline mmtimer_setup_int_2(u64 expires) { u64 val; @@ -180,8 +159,7 @@ HUB_S((u64 *)LOCAL_MMR_ADDR(SH_INT_CMPD), -1L); - HUB_S((u64 *)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED_ALIAS), - SH_EVENT_OCCURRED_RTC3_INT_MASK); + mmtimer_clr_int_pending(2); val = ((u64)SGI_MMTIMER_VECTOR << SH_RTC3_INT_CONFIG_IDX_SHFT) | ((u64)cpu_physical_id(smp_processor_id()) << @@ -220,8 +198,7 @@ /* We might've missed our expiration time */ diff = rtc_time() - expires; if (diff > 0) { - if (HUB_L((unsigned long *)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED)) & - (SH_EVENT_OCCURRED_RTC1_INT_MASK << comparator)) { + if (mmtimer_int_pending(comparator)) { /* We'll get an interrupt for this once we're done */ return 0; } @@ -259,6 +236,9 @@ typedef struct mmtimer { spinlock_t lock ____cacheline_aligned; struct k_itimer *timer; + int i; + int cpu; + struct tasklet_struct tasklet; } mmtimer_t; /* @@ -435,12 +415,12 @@ * exponentially in order to ensure that the next interrupt * can be properly scheduled.. */ -static int inline reschedule_periodic_timer(mmtimer_t *base, struct k_itimer *t, int i) +static int inline reschedule_periodic_timer(mmtimer_t *x) { int n; + struct k_itimer *t = x->timer; - t->it_timer.magic = i; - base[i].timer = t; + t->it_timer.magic = x->i; t->it_overrun--; n = 0; @@ -452,7 +432,7 @@ if (n > 20) return 1; - } while (mmtimer_setup(i, t->it_timer.expires)); + } while (mmtimer_setup(x->i, t->it_timer.expires)); return 0; } @@ -475,57 +455,70 @@ mmtimer_interrupt(int irq, void *dev_id, struct pt_regs *regs) { int i; - mmtimer_t *base = timers + cpuid_to_cnodeid(smp_processor_id()) * NUM_COMPARATORS; + mmtimer_t *base = timers + cpuid_to_cnodeid(smp_processor_id()) * + NUM_COMPARATORS; + unsigned long expires = 0; int result = IRQ_NONE; /* * Do this once for each comparison register */ for (i = 0; i < NUM_COMPARATORS; i++) { - unsigned long flags; + /* Make sure this doesn't get reused before tasklet_sched */ + spin_lock(&base[i].lock); + if (base[i].cpu == smp_processor_id()) { + if (base[i].timer) + expires = base[i].timer->it_timer.expires; + /* expires test won't work with shared irqs */ + if ((mmtimer_int_pending(i) > 0) || + (expires && (expires < rtc_time()))) { + mmtimer_clr_int_pending(i); + tasklet_schedule(&base[i].tasklet); + result = IRQ_HANDLED; + } + } + spin_unlock(&base[i].lock); + expires = 0; + } + return result; +} - if (mmtimer_int_pending(i) > 0) { - struct k_itimer *t; - int m = 0; +void mmtimer_tasklet(unsigned long data) { + mmtimer_t *x = (mmtimer_t *)data; + struct k_itimer *t = x->timer; + unsigned long flags; - mmtimer_disable_int(-1, i); - spin_lock(&base[i].lock); - t = base[i].timer; - base[i].timer = NULL; - if (t) { - m = t->it_timer.magic; - t->it_timer.magic = TIMER_OFF; - } - spin_unlock(&base[i].lock); + if (t == NULL) + return; - if (t == NULL || m == TIMER_OFF) - /* No timer left here, bail out */ - goto out; - - spin_lock_irqsave(&t->it_lock, flags); - t->it_overrun = 0; - - if (posix_timer_event(t, 0) == 0) { - - if(t->it_incr) { - /* Periodic timer */ - spin_lock(&base[i].lock); - if (base[i].timer == NULL) - reschedule_periodic_timer(base, t, i); - spin_unlock(&base[i].lock); - } - - } else { - printk(KERN_WARNING "mmtimer: unable to deliver signal"); - t->it_overrun++; - } - t->it_overrun_last = t->it_overrun; - spin_unlock_irqrestore(&t->it_lock, flags); -out: - result = IRQ_HANDLED; + /* Send signal and deal with periodic signals */ + spin_lock_irqsave(&t->it_lock, flags); + spin_lock(&x->lock); + /* If timer was deleted between interrupt and here, leave */ + if (t != x->timer) + goto out; + t->it_overrun = 0; + + if (tasklist_lock.write_lock || posix_timer_event(t, 0) != 0) { + + // printk(KERN_WARNING "mmtimer: cannot deliver signal.\n"); + + t->it_overrun++; + } + if(t->it_incr) { + /* Periodic timer */ + if (reschedule_periodic_timer(x)) { + printk(KERN_WARNING "mmtimer: unable to reschedule\n"); + x->timer = NULL; } + } else { + /* Ensure we don't false trigger in mmtimer_interrupt */ + t->it_timer.expires = 0; } - return result; + t->it_overrun_last = t->it_overrun; +out: + spin_unlock(&x->lock); + spin_unlock_irqrestore(&t->it_lock, flags); } static int sgi_timer_create(struct k_itimer *timer) @@ -552,6 +545,7 @@ mmtimer_disable_int(cnodeid_to_nasid(nodeid),i); t->timer = NULL; timr->it_timer.magic = TIMER_OFF; + timr->it_timer.expires = 0; spin_unlock_irqrestore(&t->lock, irqflags); } return 0; @@ -625,8 +619,9 @@ nodeid = cpuid_to_cnodeid(smp_processor_id()); base = timers + nodeid * NUM_COMPARATORS; retry: + /* Don't use an allocated timer, or a deleted one that's pending */ for(i = 0; i< NUM_COMPARATORS; i++) { - if (!base[i].timer) { + if (!base[i].timer && !base[i].tasklet.state) { break; } } @@ -638,11 +633,12 @@ spin_lock_irqsave(&base[i].lock, irqflags); - if (base[i].timer) { + if (base[i].timer || base[i].tasklet.state != 0) { spin_unlock_irqrestore(&base[i].lock, irqflags); goto retry; } base[i].timer = timr; + base[i].cpu = smp_processor_id(); timr->it_timer.magic = i; timr->it_timer.data = nodeid; @@ -653,10 +649,11 @@ if (mmtimer_setup(i, when)) { mmtimer_disable_int(-1, i); posix_timer_event(timr, 0); + timr->it_timer.expires = 0; } } else { timr->it_timer.expires -= period; - if (reschedule_periodic_timer(base, timr, i)) + if (reschedule_periodic_timer(base+i)) err = -EINVAL; } @@ -705,6 +702,9 @@ for (i=0; i< NUM_COMPARATORS*MAX_COMPACT_NODES; i++) { spin_lock_init(&timers[i].lock); timers[i].timer = NULL; + timers[i].cpu = 0; + timers[i].i = i % NUM_COMPARATORS; + tasklet_init(&timers[i].tasklet, mmtimer_tasklet, (unsigned long) (timers+i)); } if (request_irq(SGI_MMTIMER_VECTOR, mmtimer_interrupt, SA_PERCPU_IRQ, MMTIMER_NAME, NULL)) { diff -Nru a/drivers/char/random.c b/drivers/char/random.c --- a/drivers/char/random.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/char/random.c 2004-11-29 21:22:06 -08:00 @@ -2046,6 +2046,7 @@ * ********************************************************************/ +#ifdef CONFIG_INET /* * TCP initial sequence number picking. This uses the random number * generator to pick an initial secret value. This value is hashed @@ -2445,3 +2446,4 @@ return (cookie - tmp[17]) & COOKIEMASK; /* Leaving the data behind */ } #endif +#endif /* CONFIG_INET */ diff -Nru a/drivers/char/s3c2410-rtc.c b/drivers/char/s3c2410-rtc.c --- a/drivers/char/s3c2410-rtc.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/char/s3c2410-rtc.c 2004-11-29 21:22:07 -08:00 @@ -12,6 +12,7 @@ * Changelog: * 08-Nov-2004 BJD Initial creation * 12-Nov-2004 BJD Added periodic IRQ and PM code + * 22-Nov-2004 BJD Sign-test on alarm code to check for <0 */ #include @@ -236,26 +237,26 @@ struct rtc_time *tm = &alrm->time; unsigned int alrm_en; - pr_debug("s3c2410_rtc_setalarm: %d, %02x.%02x.%02x %02x/%02x/%02x\n", + pr_debug("s3c2410_rtc_setalarm: %d, %02x/%02x/%02x %02x.%02x.%02x\n", alrm->enabled, - tm->tm_year & 0xff, tm->tm_mon & 0xff, tm->tm_mday & 0xff, - tm->tm_hour, tm->tm_min, tm->tm_sec); + tm->tm_mday & 0xff, tm->tm_mon & 0xff, tm->tm_year & 0xff, + tm->tm_hour & 0xff, tm->tm_min & 0xff, tm->tm_sec); if (alrm->enabled || 1) { alrm_en = readb(S3C2410_RTCALM) & S3C2410_RTCALM_ALMEN; writeb(0x00, S3C2410_RTCALM); - if (tm->tm_sec < 60) { + if (tm->tm_sec < 60 && tm->tm_sec >= 0) { alrm_en |= S3C2410_RTCALM_SECEN; writeb(BIN2BCD(tm->tm_sec), S3C2410_ALMSEC); } - if (tm->tm_min < 60) { + if (tm->tm_min < 60 && tm->tm_min >= 0) { alrm_en |= S3C2410_RTCALM_MINEN; writeb(BIN2BCD(tm->tm_min), S3C2410_ALMMIN); } - if (tm->tm_hour < 24) { + if (tm->tm_hour < 24 && tm->tm_hour >= 0) { alrm_en |= S3C2410_RTCALM_HOUREN; writeb(BIN2BCD(tm->tm_hour), S3C2410_ALMHOUR); } diff -Nru a/drivers/char/sonypi.c b/drivers/char/sonypi.c --- a/drivers/char/sonypi.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/char/sonypi.c 2004-11-29 21:22:08 -08:00 @@ -232,6 +232,8 @@ return v1; } +#if 0 +/* Get brightness, hue etc. Unreliable... */ static u8 sonypi_read(u8 fn) { u8 v1, v2; @@ -245,6 +247,7 @@ } return 0xff; } +#endif /* Set brightness, hue etc */ static void sonypi_set(u8 fn, u8 v) @@ -435,80 +438,48 @@ } /* External camera command (exported to the motion eye v4l driver) */ -u8 sonypi_camera_command(int command, u8 value) +int sonypi_camera_command(int command, u8 value) { - u8 ret = 0; - if (!camera) - return 0; + return -EIO; down(&sonypi_device.lock); switch (command) { - case SONYPI_COMMAND_GETCAMERA: - ret = sonypi_camera_ready(); - break; case SONYPI_COMMAND_SETCAMERA: if (value) sonypi_camera_on(); else sonypi_camera_off(); break; - case SONYPI_COMMAND_GETCAMERABRIGHTNESS: - ret = sonypi_read(SONYPI_CAMERA_BRIGHTNESS); - break; case SONYPI_COMMAND_SETCAMERABRIGHTNESS: sonypi_set(SONYPI_CAMERA_BRIGHTNESS, value); break; - case SONYPI_COMMAND_GETCAMERACONTRAST: - ret = sonypi_read(SONYPI_CAMERA_CONTRAST); - break; case SONYPI_COMMAND_SETCAMERACONTRAST: sonypi_set(SONYPI_CAMERA_CONTRAST, value); break; - case SONYPI_COMMAND_GETCAMERAHUE: - ret = sonypi_read(SONYPI_CAMERA_HUE); - break; case SONYPI_COMMAND_SETCAMERAHUE: sonypi_set(SONYPI_CAMERA_HUE, value); break; - case SONYPI_COMMAND_GETCAMERACOLOR: - ret = sonypi_read(SONYPI_CAMERA_COLOR); - break; case SONYPI_COMMAND_SETCAMERACOLOR: sonypi_set(SONYPI_CAMERA_COLOR, value); break; - case SONYPI_COMMAND_GETCAMERASHARPNESS: - ret = sonypi_read(SONYPI_CAMERA_SHARPNESS); - break; case SONYPI_COMMAND_SETCAMERASHARPNESS: sonypi_set(SONYPI_CAMERA_SHARPNESS, value); break; - case SONYPI_COMMAND_GETCAMERAPICTURE: - ret = sonypi_read(SONYPI_CAMERA_PICTURE); - break; case SONYPI_COMMAND_SETCAMERAPICTURE: sonypi_set(SONYPI_CAMERA_PICTURE, value); break; - case SONYPI_COMMAND_GETCAMERAAGC: - ret = sonypi_read(SONYPI_CAMERA_AGC); - break; case SONYPI_COMMAND_SETCAMERAAGC: sonypi_set(SONYPI_CAMERA_AGC, value); break; - case SONYPI_COMMAND_GETCAMERADIRECTION: - ret = sonypi_read(SONYPI_CAMERA_STATUS); - ret &= SONYPI_DIRECTION_BACKWARDS; - break; - case SONYPI_COMMAND_GETCAMERAROMVERSION: - ret = sonypi_read(SONYPI_CAMERA_ROMVERSION); - break; - case SONYPI_COMMAND_GETCAMERAREVISION: - ret = sonypi_read(SONYPI_CAMERA_REVISION); + default: + printk(KERN_ERR "sonypi: sonypi_camera_command invalid: %d\n", + command); break; } up(&sonypi_device.lock); - return ret; + return 0; } EXPORT_SYMBOL(sonypi_camera_command); diff -Nru a/drivers/char/sonypi.h b/drivers/char/sonypi.h --- a/drivers/char/sonypi.h 2004-11-29 21:22:07 -08:00 +++ b/drivers/char/sonypi.h 2004-11-29 21:22:07 -08:00 @@ -36,7 +36,7 @@ #ifdef __KERNEL__ -#define SONYPI_DRIVER_VERSION "1.24" +#define SONYPI_DRIVER_VERSION "1.25" #define SONYPI_DEVICE_MODEL_TYPE1 1 #define SONYPI_DEVICE_MODEL_TYPE2 2 diff -Nru a/drivers/char/tty_io.c b/drivers/char/tty_io.c --- a/drivers/char/tty_io.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/char/tty_io.c 2004-11-29 21:22:07 -08:00 @@ -136,6 +136,7 @@ extern int pty_limit; /* Config limit on Unix98 ptys */ static DEFINE_IDR(allocated_ptys); static DECLARE_MUTEX(allocated_ptys_lock); +static int ptmx_open(struct inode *, struct file *); #endif extern void disable_early_printk(void); @@ -147,7 +148,6 @@ ssize_t redirected_tty_write(struct file *, const char __user *, size_t, loff_t *); static unsigned int tty_poll(struct file *, poll_table *); static int tty_open(struct inode *, struct file *); -static int ptmx_open(struct inode *, struct file *); static int tty_release(struct inode *, struct file *); int tty_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigned long arg); diff -Nru a/drivers/char/watchdog/sc520_wdt.c b/drivers/char/watchdog/sc520_wdt.c --- a/drivers/char/watchdog/sc520_wdt.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/char/watchdog/sc520_wdt.c 2004-11-29 21:22:07 -08:00 @@ -122,7 +122,7 @@ #define WDT_WRST_ENB 0x4000 /* [14] Watchdog Timer Reset Enable */ #define WDT_ENB 0x8000 /* [15] Watchdog Timer Enable */ -static __u16 *wdtmrctl; +static __u16 __iomem *wdtmrctl; static void wdt_timer_ping(unsigned long); static struct timer_list timer; diff -Nru a/drivers/fc4/soc.c b/drivers/fc4/soc.c --- a/drivers/fc4/soc.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/fc4/soc.c 2004-11-29 21:22:06 -08:00 @@ -671,10 +671,10 @@ cq[0].address = s->req_dvma; s->req[1].pool = s->req[0].pool + SOC_CQ_REQ0_SIZE; - s->req[0].hw_cq = (soc_hw_cq *)(s->xram + SOC_CQ_REQ_OFFSET); - s->req[1].hw_cq = (soc_hw_cq *)(s->xram + SOC_CQ_REQ_OFFSET + sizeof(soc_hw_cq)); - s->rsp[0].hw_cq = (soc_hw_cq *)(s->xram + SOC_CQ_RSP_OFFSET); - s->rsp[1].hw_cq = (soc_hw_cq *)(s->xram + SOC_CQ_RSP_OFFSET + sizeof(soc_hw_cq)); + s->req[0].hw_cq = (soc_hw_cq __iomem *)(s->xram + SOC_CQ_REQ_OFFSET); + s->req[1].hw_cq = (soc_hw_cq __iomem *)(s->xram + SOC_CQ_REQ_OFFSET + sizeof(soc_hw_cq)); + s->rsp[0].hw_cq = (soc_hw_cq __iomem *)(s->xram + SOC_CQ_RSP_OFFSET); + s->rsp[1].hw_cq = (soc_hw_cq __iomem *)(s->xram + SOC_CQ_RSP_OFFSET + sizeof(soc_hw_cq)); cq[1].address = cq[0].address + (SOC_CQ_REQ0_SIZE * sizeof(soc_req)); cq[4].address = 1; diff -Nru a/drivers/fc4/soc.h b/drivers/fc4/soc.h --- a/drivers/fc4/soc.h 2004-11-29 21:22:06 -08:00 +++ b/drivers/fc4/soc.h 2004-11-29 21:22:06 -08:00 @@ -260,7 +260,7 @@ } soc_port; typedef struct { - soc_hw_cq *hw_cq; /* Related XRAM cq */ + soc_hw_cq __iomem *hw_cq; /* Related XRAM cq */ soc_req *pool; u8 in; u8 out; diff -Nru a/drivers/fc4/socal.c b/drivers/fc4/socal.c --- a/drivers/fc4/socal.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/fc4/socal.c 2004-11-29 21:22:07 -08:00 @@ -800,11 +800,11 @@ s->rsp[1].pool = s->rsp[0].pool + SOCAL_CQ_RSP0_SIZE; s->rsp[2].pool = s->rsp[1].pool + SOCAL_CQ_RSP1_SIZE; - s->req[0].hw_cq = (socal_hw_cq *)(s->xram + SOCAL_CQ_REQ_OFFSET); - s->req[1].hw_cq = (socal_hw_cq *)(s->xram + SOCAL_CQ_REQ_OFFSET + sizeof(socal_hw_cq)); - s->rsp[0].hw_cq = (socal_hw_cq *)(s->xram + SOCAL_CQ_RSP_OFFSET); - s->rsp[1].hw_cq = (socal_hw_cq *)(s->xram + SOCAL_CQ_RSP_OFFSET + sizeof(socal_hw_cq)); - s->rsp[2].hw_cq = (socal_hw_cq *)(s->xram + SOCAL_CQ_RSP_OFFSET + 2 * sizeof(socal_hw_cq)); + s->req[0].hw_cq = (socal_hw_cq __iomem *)(s->xram + SOCAL_CQ_REQ_OFFSET); + s->req[1].hw_cq = (socal_hw_cq __iomem *)(s->xram + SOCAL_CQ_REQ_OFFSET + sizeof(socal_hw_cq)); + s->rsp[0].hw_cq = (socal_hw_cq __iomem *)(s->xram + SOCAL_CQ_RSP_OFFSET); + s->rsp[1].hw_cq = (socal_hw_cq __iomem *)(s->xram + SOCAL_CQ_RSP_OFFSET + sizeof(socal_hw_cq)); + s->rsp[2].hw_cq = (socal_hw_cq __iomem *)(s->xram + SOCAL_CQ_RSP_OFFSET + 2 * sizeof(socal_hw_cq)); cq[1].address = cq[0].address + (SOCAL_CQ_REQ0_SIZE * sizeof(socal_req)); cq[4].address = cq[1].address + (SOCAL_CQ_REQ1_SIZE * sizeof(socal_req)); diff -Nru a/drivers/fc4/socal.h b/drivers/fc4/socal.h --- a/drivers/fc4/socal.h 2004-11-29 21:22:07 -08:00 +++ b/drivers/fc4/socal.h 2004-11-29 21:22:07 -08:00 @@ -281,7 +281,7 @@ } socal_port; typedef struct { - socal_hw_cq *hw_cq; /* Related XRAM cq */ + socal_hw_cq __iomem *hw_cq; /* Related XRAM cq */ socal_req *pool; u8 in; u8 out; diff -Nru a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig --- a/drivers/firmware/Kconfig 2004-11-29 21:22:06 -08:00 +++ b/drivers/firmware/Kconfig 2004-11-29 21:22:06 -08:00 @@ -48,7 +48,11 @@ use the first serial port it describes as the Linux console, say Y here. If your EFI ConOut path contains only a UART device, it will become the console automatically. Otherwise, - you must specify the "console=ttyS0" kernel boot argument. + you must specify the "console=hcdp" kernel boot argument. + + Neither the PCDP nor the HCDP affects naming of serial devices, + so a serial console may be /dev/ttyS0, /dev/ttyS1, etc, depending + on how the driver discovers devices. You must also enable the appropriate drivers (serial, VGA, etc.) diff -Nru a/drivers/firmware/pcdp.c b/drivers/firmware/pcdp.c --- a/drivers/firmware/pcdp.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/firmware/pcdp.c 2004-11-29 21:22:07 -08:00 @@ -14,127 +14,45 @@ #include #include #include -#include #include -#include -#include -#include #include "pcdp.h" -static inline int -uart_irq_supported(int rev, struct pcdp_uart *uart) -{ - if (rev < 3) - return uart->pci_func & PCDP_UART_IRQ; - return uart->flags & PCDP_UART_IRQ; -} - -static inline int -uart_pci(int rev, struct pcdp_uart *uart) -{ - if (rev < 3) - return uart->pci_func & PCDP_UART_PCI; - return uart->flags & PCDP_UART_PCI; -} - -static inline int -uart_active_high_low(int rev, struct pcdp_uart *uart) -{ - if (uart_pci(rev, uart) || uart->flags & PCDP_UART_ACTIVE_LOW) - return ACPI_ACTIVE_LOW; - return ACPI_ACTIVE_HIGH; -} - -static inline int -uart_edge_level(int rev, struct pcdp_uart *uart) -{ - if (uart_pci(rev, uart)) - return ACPI_LEVEL_SENSITIVE; - if (rev < 3 || uart->flags & PCDP_UART_EDGE_SENSITIVE) - return ACPI_EDGE_SENSITIVE; - return ACPI_LEVEL_SENSITIVE; -} - -static void __init -setup_serial_console(int rev, struct pcdp_uart *uart) +static int __init +setup_serial_console(struct pcdp_uart *uart) { #ifdef CONFIG_SERIAL_8250_CONSOLE - struct uart_port port; - static char options[16]; - int mapsize = 64; - - memset(&port, 0, sizeof(port)); - port.uartclk = uart->clock_rate; - if (!port.uartclk) /* some FW doesn't supply this */ - port.uartclk = BASE_BAUD * 16; - - if (uart->addr.address_space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) { - port.mapbase = uart->addr.address; - port.membase = ioremap(port.mapbase, mapsize); - if (!port.membase) { - printk(KERN_ERR "%s: couldn't ioremap 0x%lx-0x%lx\n", - __FUNCTION__, port.mapbase, port.mapbase + mapsize); - return; - } - port.iotype = UPIO_MEM; - } else if (uart->addr.address_space_id == ACPI_ADR_SPACE_SYSTEM_IO) { - port.iobase = uart->addr.address; - port.iotype = UPIO_PORT; - } else - return; - - switch (uart->pci_prog_intfc) { - case 0x0: port.type = PORT_8250; break; - case 0x1: port.type = PORT_16450; break; - case 0x2: port.type = PORT_16550; break; - case 0x3: port.type = PORT_16650; break; - case 0x4: port.type = PORT_16750; break; - case 0x5: port.type = PORT_16850; break; - case 0x6: port.type = PORT_16C950; break; - default: port.type = PORT_UNKNOWN; break; - } - - port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF; - - if (uart_irq_supported(rev, uart)) { - port.irq = acpi_register_gsi(uart->gsi, - uart_edge_level(rev, uart), - uart_active_high_low(rev, uart)); - port.flags |= UPF_AUTO_IRQ; /* some FW reported wrong GSI */ - if (uart_pci(rev, uart)) - port.flags |= UPF_SHARE_IRQ; - } - - if (early_serial_setup(&port) < 0) - return; + int mmio; + static char options[64]; - snprintf(options, sizeof(options), "%lun%d", uart->baud, + mmio = (uart->addr.address_space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY); + snprintf(options, sizeof(options), "console=uart,%s,0x%lx,%lun%d", + mmio ? "mmio" : "io", uart->addr.address, uart->baud, uart->bits ? uart->bits : 8); - add_preferred_console("ttyS", port.line, options); - printk(KERN_INFO "PCDP: serial console at %s 0x%lx (ttyS%d, options %s)\n", - port.iotype == UPIO_MEM ? "MMIO" : "I/O", - uart->addr.address, port.line, options); + return early_serial_console_init(options); +#else + return -ENODEV; #endif } -static void __init +static int __init setup_vga_console(struct pcdp_vga *vga) { -#ifdef CONFIG_VT -#ifdef CONFIG_VGA_CONSOLE +#if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE) if (efi_mem_type(0xA0000) == EFI_CONVENTIONAL_MEMORY) { printk(KERN_ERR "PCDP: VGA selected, but frame buffer is not MMIO!\n"); - return; + return -ENODEV; } conswitchp = &vga_con; printk(KERN_INFO "PCDP: VGA console\n"); -#endif + return 0; +#else + return -ENODEV; #endif } -void __init +int __init efi_setup_pcdp_console(char *cmdline) { struct pcdp *pcdp; @@ -144,20 +62,25 @@ pcdp = efi.hcdp; if (!pcdp) - return; + return -ENODEV; - printk(KERN_INFO "PCDP: v%d at 0x%p\n", pcdp->rev, pcdp); + printk(KERN_INFO "PCDP: v%d at 0x%lx\n", pcdp->rev, __pa(pcdp)); - if (pcdp->rev < 3) { - if (strstr(cmdline, "console=ttyS0") || efi_uart_console_only()) + if (strstr(cmdline, "console=hcdp")) { + if (pcdp->rev < 3) serial = 1; + } else if (strstr(cmdline, "console=")) { + printk(KERN_INFO "Explicit \"console=\"; ignoring PCDP\n"); + return -ENODEV; } + if (pcdp->rev < 3 && efi_uart_console_only()) + serial = 1; + for (i = 0, uart = pcdp->uart; i < pcdp->num_uarts; i++, uart++) { if (uart->flags & PCDP_UART_PRIMARY_CONSOLE || serial) { if (uart->type == PCDP_CONSOLE_UART) { - setup_serial_console(pcdp->rev, uart); - return; + return setup_serial_console(uart); } } } @@ -168,11 +91,12 @@ dev = (struct pcdp_device *) ((u8 *) dev + dev->length)) { if (dev->flags & PCDP_PRIMARY_CONSOLE) { if (dev->type == PCDP_CONSOLE_VGA) { - setup_vga_console((struct pcdp_vga *) dev); - return; + return setup_vga_console((struct pcdp_vga *) dev); } } } + + return -ENODEV; } #ifdef CONFIG_IA64_EARLY_PRINTK_UART diff -Nru a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig --- a/drivers/i2c/busses/Kconfig 2004-11-29 21:22:08 -08:00 +++ b/drivers/i2c/busses/Kconfig 2004-11-29 21:22:08 -08:00 @@ -218,6 +218,7 @@ help If you say yes to this option, support will be included for the Nvidia Nforce2 family of mainboard I2C interfaces. + This driver also supports the nForce3 Pro 150 MCP. This driver can also be built as a module. If so, the module will be called i2c-nforce2. diff -Nru a/drivers/i2c/busses/i2c-amd756-s4882.c b/drivers/i2c/busses/i2c-amd756-s4882.c --- a/drivers/i2c/busses/i2c-amd756-s4882.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/i2c/busses/i2c-amd756-s4882.c 2004-11-29 21:22:08 -08:00 @@ -35,6 +35,7 @@ #include #include +#include #include #include @@ -156,7 +157,9 @@ /* Unregister physical bus */ error = i2c_del_adapter(&amd756_smbus); if (error) { - if (error != -EINVAL) + if (error == -EINVAL) + error = -ENODEV; + else dev_err(&amd756_smbus.dev, "Physical bus removal " "failed\n"); goto ERROR0; @@ -200,7 +203,7 @@ I2C_SMBUS_WRITE, 0x03, I2C_SMBUS_BYTE_DATA, &ioconfig); if (error) { - dev_dbg(&amd756_smbus.dev, "PCA9556 configuration failed\n"); + dev_err(&amd756_smbus.dev, "PCA9556 configuration failed\n"); error = -EIO; goto ERROR3; } diff -Nru a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c --- a/drivers/i2c/busses/i2c-ibm_iic.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/i2c/busses/i2c-ibm_iic.c 2004-11-29 21:22:08 -08:00 @@ -81,7 +81,7 @@ #if DBG_LEVEL > 2 static void dump_iic_regs(const char* header, struct ibm_iic_private* dev) { - volatile struct iic_regs *iic = dev->vaddr; + volatile struct iic_regs __iomem *iic = dev->vaddr; printk(KERN_DEBUG "ibm-iic%d: %s\n", dev->idx, header); printk(KERN_DEBUG " cntl = 0x%02x, mdcntl = 0x%02x\n" KERN_DEBUG " sts = 0x%02x, extsts = 0x%02x\n" @@ -132,7 +132,7 @@ */ static void iic_dev_init(struct ibm_iic_private* dev) { - volatile struct iic_regs *iic = dev->vaddr; + volatile struct iic_regs __iomem *iic = dev->vaddr; DBG("%d: init\n", dev->idx); @@ -177,7 +177,7 @@ */ static void iic_dev_reset(struct ibm_iic_private* dev) { - volatile struct iic_regs *iic = dev->vaddr; + volatile struct iic_regs __iomem *iic = dev->vaddr; int i; u8 dc; @@ -225,7 +225,7 @@ */ /* Wait for SCL and/or SDA to be high */ -static int iic_dc_wait(volatile struct iic_regs *iic, u8 mask) +static int iic_dc_wait(volatile struct iic_regs __iomem *iic, u8 mask) { unsigned long x = jiffies + HZ / 28 + 2; while ((in_8(&iic->directcntl) & mask) != mask){ @@ -238,7 +238,7 @@ static int iic_smbus_quick(struct ibm_iic_private* dev, const struct i2c_msg* p) { - volatile struct iic_regs* iic = dev->vaddr; + volatile struct iic_regs __iomem *iic = dev->vaddr; const struct i2c_timings* t = &timings[dev->fast_mode ? 1 : 0]; u8 mask, v, sda; int i, res; @@ -324,7 +324,7 @@ static irqreturn_t iic_handler(int irq, void *dev_id, struct pt_regs *regs) { struct ibm_iic_private* dev = (struct ibm_iic_private*)dev_id; - volatile struct iic_regs* iic = dev->vaddr; + volatile struct iic_regs __iomem *iic = dev->vaddr; DBG2("%d: irq handler, STS = 0x%02x, EXTSTS = 0x%02x\n", dev->idx, in_8(&iic->sts), in_8(&iic->extsts)); @@ -342,7 +342,7 @@ */ static int iic_xfer_result(struct ibm_iic_private* dev) { - volatile struct iic_regs *iic = dev->vaddr; + volatile struct iic_regs __iomem *iic = dev->vaddr; if (unlikely(in_8(&iic->sts) & STS_ERR)){ DBG("%d: xfer error, EXTSTS = 0x%02x\n", dev->idx, @@ -375,7 +375,7 @@ */ static void iic_abort_xfer(struct ibm_iic_private* dev) { - volatile struct iic_regs *iic = dev->vaddr; + volatile struct iic_regs __iomem *iic = dev->vaddr; unsigned long x; DBG("%d: iic_abort_xfer\n", dev->idx); @@ -407,7 +407,7 @@ */ static int iic_wait_for_tc(struct ibm_iic_private* dev){ - volatile struct iic_regs *iic = dev->vaddr; + volatile struct iic_regs __iomem *iic = dev->vaddr; int ret = 0; if (dev->irq >= 0){ @@ -458,7 +458,7 @@ static int iic_xfer_bytes(struct ibm_iic_private* dev, struct i2c_msg* pm, int combined_xfer) { - volatile struct iic_regs *iic = dev->vaddr; + volatile struct iic_regs __iomem *iic = dev->vaddr; char* buf = pm->buf; int i, j, loops, ret = 0; int len = pm->len; @@ -474,7 +474,7 @@ if (!(cntl & CNTL_RW)) for (j = 0; j < count; ++j) - out_8((volatile u8*)&iic->mdbuf, *buf++); + out_8((void __iomem *)&iic->mdbuf, *buf++); if (i < loops - 1) cmd |= CNTL_CHT; @@ -505,7 +505,7 @@ if (cntl & CNTL_RW) for (j = 0; j < count; ++j) - *buf++ = in_8((volatile u8*)&iic->mdbuf); + *buf++ = in_8((void __iomem *)&iic->mdbuf); } return ret > 0 ? 0 : ret; @@ -516,7 +516,7 @@ */ static inline void iic_address(struct ibm_iic_private* dev, struct i2c_msg* msg) { - volatile struct iic_regs *iic = dev->vaddr; + volatile struct iic_regs __iomem *iic = dev->vaddr; u16 addr = msg->addr; DBG2("%d: iic_address, 0x%03x (%d-bit)\n", dev->idx, @@ -552,7 +552,7 @@ static int iic_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) { struct ibm_iic_private* dev = (struct ibm_iic_private*)(i2c_get_adapdata(adap)); - volatile struct iic_regs *iic = dev->vaddr; + volatile struct iic_regs __iomem *iic = dev->vaddr; int i, ret = 0; DBG2("%d: iic_xfer, %d msg(s)\n", dev->idx, num); @@ -755,9 +755,9 @@ free_irq(dev->irq, dev); } - iounmap((void*)dev->vaddr); + iounmap(dev->vaddr); fail2: - ocp_set_drvdata(ocp, 0); + ocp_set_drvdata(ocp, NULL); kfree(dev); return ret; } @@ -783,7 +783,7 @@ iic_interrupt_mode(dev, 0); free_irq(dev->irq, dev); } - iounmap((void*)dev->vaddr); + iounmap(dev->vaddr); kfree(dev); } } diff -Nru a/drivers/i2c/busses/i2c-ibm_iic.h b/drivers/i2c/busses/i2c-ibm_iic.h --- a/drivers/i2c/busses/i2c-ibm_iic.h 2004-11-29 21:22:07 -08:00 +++ b/drivers/i2c/busses/i2c-ibm_iic.h 2004-11-29 21:22:07 -08:00 @@ -45,7 +45,7 @@ struct ibm_iic_private { struct i2c_adapter adap; - volatile struct iic_regs *vaddr; + volatile struct iic_regs __iomem *vaddr; wait_queue_head_t wq; int idx; int irq; diff -Nru a/drivers/i2c/busses/i2c-keywest.c b/drivers/i2c/busses/i2c-keywest.c --- a/drivers/i2c/busses/i2c-keywest.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/i2c/busses/i2c-keywest.c 2004-11-29 21:22:08 -08:00 @@ -552,9 +552,9 @@ iface->irq = np->intrs[0].line; iface->channels = (struct keywest_chan *) (((unsigned long)(iface + 1) + 3UL) & ~3UL); - iface->base = (unsigned long)ioremap(np->addrs[0].address + addroffset, + iface->base = ioremap(np->addrs[0].address + addroffset, np->addrs[0].size); - if (iface->base == 0) { + if (!iface->base) { printk(KERN_ERR "i2c-keywest: can't map inteface !\n"); kfree(iface); pmac_low_i2c_unlock(np); @@ -600,7 +600,7 @@ rc = request_irq(iface->irq, keywest_irq, SA_INTERRUPT, "keywest i2c", iface); if (rc) { printk(KERN_ERR "i2c-keywest: can't get IRQ %d !\n", iface->irq); - iounmap((void *)iface->base); + iounmap(iface->base); kfree(iface); pmac_low_i2c_unlock(np); return -ENODEV; @@ -685,7 +685,7 @@ if (rc) printk("i2c-keywest.c: i2c_del_adapter failed, that's bad !\n"); } - iounmap((void *)iface->base); + iounmap(iface->base); dev_set_drvdata(dev, NULL); of_node_put(iface->node); kfree(iface); diff -Nru a/drivers/i2c/busses/i2c-keywest.h b/drivers/i2c/busses/i2c-keywest.h --- a/drivers/i2c/busses/i2c-keywest.h 2004-11-29 21:22:08 -08:00 +++ b/drivers/i2c/busses/i2c-keywest.h 2004-11-29 21:22:08 -08:00 @@ -52,7 +52,7 @@ struct keywest_iface { struct device_node *node; - unsigned long base; + void __iomem * base; unsigned bsteps; int irq; spinlock_t lock; @@ -89,13 +89,13 @@ static inline u8 __read_reg(struct keywest_iface *iface, reg_t reg) { - return in_8(((volatile u8 *)iface->base) + return in_8(iface->base + (((unsigned)reg) << iface->bsteps)); } static inline void __write_reg(struct keywest_iface *iface, reg_t reg, u8 val) { - out_8(((volatile u8 *)iface->base) + out_8(iface->base + (((unsigned)reg) << iface->bsteps), val); (void)__read_reg(iface, reg_subaddr); } diff -Nru a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c --- a/drivers/i2c/busses/i2c-nforce2.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/i2c/busses/i2c-nforce2.c 2004-11-29 21:22:06 -08:00 @@ -1,6 +1,7 @@ /* SMBus driver for nVidia nForce2 MCP + Added nForce3 Pro 150 Thomas Leibold , Ported to 2.5 Patrick Dreker , Copyright (c) 2003 Hans-Frieder Vogt , Based on @@ -25,6 +26,7 @@ /* SUPPORTED DEVICES PCI ID nForce2 MCP 0064 + nForce3 Pro150 MCP 00D4 This driver supports the 2 SMBuses that are included in the MCP2 of the nForce2 chipset. @@ -49,11 +51,6 @@ MODULE_DESCRIPTION("nForce2 SMBus driver"); -#ifndef PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS -#define PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS 0x0064 -#endif - - struct nforce2_smbus { struct pci_dev *dev; struct i2c_adapter adapter; @@ -293,6 +290,8 @@ static struct pci_device_id nforce2_ids[] = { { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, + { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, { 0 } }; diff -Nru a/drivers/i2c/chips/smsc47m1.c b/drivers/i2c/chips/smsc47m1.c --- a/drivers/i2c/chips/smsc47m1.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/i2c/chips/smsc47m1.c 2004-11-29 21:22:07 -08:00 @@ -394,6 +394,7 @@ struct i2c_client *new_client; struct smsc47m1_data *data; int err = 0; + int fan1, fan2, pwm1, pwm2; if (!i2c_is_isa_adapter(adapter)) { return 0; @@ -423,6 +424,22 @@ new_client->id = smsc47m1_id++; init_MUTEX(&data->update_lock); + /* If no function is properly configured, there's no point in + actually registering the chip. */ + fan1 = (smsc47m1_read_value(new_client, SMSC47M1_REG_TPIN(0)) & 0x05) + == 0x05; + fan2 = (smsc47m1_read_value(new_client, SMSC47M1_REG_TPIN(1)) & 0x05) + == 0x05; + pwm1 = (smsc47m1_read_value(new_client, SMSC47M1_REG_PPIN(0)) & 0x05) + == 0x04; + pwm2 = (smsc47m1_read_value(new_client, SMSC47M1_REG_PPIN(1)) & 0x05) + == 0x04; + if (!(fan1 || fan2 || pwm1 || pwm2)) { + dev_warn(&new_client->dev, "Device is not configured, will not use\n"); + err = -ENODEV; + goto error_free; + } + if ((err = i2c_attach_client(new_client))) goto error_free; @@ -434,8 +451,7 @@ function. */ smsc47m1_update_device(&new_client->dev, 1); - if ((smsc47m1_read_value(new_client, SMSC47M1_REG_TPIN(0)) & 0x05) - == 0x05) { + if (fan1) { device_create_file(&new_client->dev, &dev_attr_fan1_input); device_create_file(&new_client->dev, &dev_attr_fan1_min); device_create_file(&new_client->dev, &dev_attr_fan1_div); @@ -443,8 +459,7 @@ dev_dbg(&new_client->dev, "Fan 1 not enabled by hardware, " "skipping\n"); - if ((smsc47m1_read_value(new_client, SMSC47M1_REG_TPIN(1)) & 0x05) - == 0x05) { + if (fan2) { device_create_file(&new_client->dev, &dev_attr_fan2_input); device_create_file(&new_client->dev, &dev_attr_fan2_min); device_create_file(&new_client->dev, &dev_attr_fan2_div); @@ -452,15 +467,13 @@ dev_dbg(&new_client->dev, "Fan 2 not enabled by hardware, " "skipping\n"); - if ((smsc47m1_read_value(new_client, SMSC47M1_REG_PPIN(0)) & 0x05) - == 0x04) { + if (pwm1) { device_create_file(&new_client->dev, &dev_attr_pwm1); device_create_file(&new_client->dev, &dev_attr_pwm1_enable); } else dev_dbg(&new_client->dev, "PWM 1 not enabled by hardware, " "skipping\n"); - if ((smsc47m1_read_value(new_client, SMSC47M1_REG_PPIN(1)) & 0x05) - == 0x04) { + if (pwm2) { device_create_file(&new_client->dev, &dev_attr_pwm2); device_create_file(&new_client->dev, &dev_attr_pwm2_enable); } else diff -Nru a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c --- a/drivers/i2c/i2c-core.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/i2c/i2c-core.c 2004-11-29 21:22:06 -08:00 @@ -1021,7 +1021,6 @@ I2C_SMBUS_WORD_DATA,&data); } -/* Returns the number of bytes transferred */ s32 i2c_smbus_write_block_data(struct i2c_client *client, u8 command, u8 length, u8 *values) { @@ -1035,25 +1034,6 @@ return i2c_smbus_xfer(client->adapter,client->addr,client->flags, I2C_SMBUS_WRITE,command, I2C_SMBUS_BLOCK_DATA,&data); -} - -/* Returns the number of read bytes */ -s32 i2c_smbus_block_process_call(struct i2c_client *client, u8 command, u8 length, u8 *values) -{ - union i2c_smbus_data data; - int i; - if (length > I2C_SMBUS_BLOCK_MAX - 1) - return -1; - data.block[0] = length; - for (i = 1; i <= length; i++) - data.block[i] = values[i-1]; - if(i2c_smbus_xfer(client->adapter,client->addr,client->flags, - I2C_SMBUS_WRITE, command, - I2C_SMBUS_BLOCK_PROC_CALL, &data)) - return -1; - for (i = 1; i <= data.block[0]; i++) - values[i-1] = data.block[i]; - return data.block[0]; } /* Returns the number of read bytes */ diff -Nru a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c --- a/drivers/ide/arm/icside.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/ide/arm/icside.c 2004-11-29 21:22:07 -08:00 @@ -636,6 +636,9 @@ state->hwif[0] = hwif; + probe_hwif_init(hwif); + create_proc_ide_interfaces(); + return 0; } @@ -719,6 +722,10 @@ icside_dma_init(hwif); icside_dma_init(mate); } + + probe_hwif_init(hwif); + probe_hwif_init(mate); + create_proc_ide_interfaces(); return 0; diff -Nru a/drivers/ide/cris/ide-v10.c b/drivers/ide/cris/ide-v10.c --- a/drivers/ide/cris/ide-v10.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/ide/cris/ide-v10.c 2004-11-29 21:22:07 -08:00 @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -50,6 +51,9 @@ #define LOWDB(x) #define D(x) +static int e100_ide_build_dmatable (ide_drive_t *drive); +static ide_startstop_t etrax_dma_intr (ide_drive_t *drive); + void etrax100_ide_outw(unsigned short data, unsigned long reg) { int timeleft; @@ -202,16 +206,13 @@ #define ATA_PIO0_HOLD 4 static int e100_dma_check (ide_drive_t *drive); -static int e100_dma_begin (ide_drive_t *drive); +static void e100_dma_start(ide_drive_t *drive); static int e100_dma_end (ide_drive_t *drive); -static int e100_dma_read (ide_drive_t *drive); -static int e100_dma_write (ide_drive_t *drive); static void e100_ide_input_data (ide_drive_t *drive, void *, unsigned int); static void e100_ide_output_data (ide_drive_t *drive, void *, unsigned int); static void e100_atapi_input_bytes(ide_drive_t *drive, void *, unsigned int); static void e100_atapi_output_bytes(ide_drive_t *drive, void *, unsigned int); static int e100_dma_off (ide_drive_t *drive); -static int e100_dma_verbose (ide_drive_t *drive); /* @@ -276,6 +277,40 @@ } } +static int e100_dma_setup(ide_drive_t *drive) +{ + struct request *rq = drive->hwif->hwgroup->rq; + + if (rq_data_dir(rq)) { + e100_read_command = 0; + + RESET_DMA(ATA_TX_DMA_NBR); /* sometimes the DMA channel get stuck so we need to do this */ + WAIT_DMA(ATA_TX_DMA_NBR); + } else { + e100_read_command = 1; + + RESET_DMA(ATA_RX_DMA_NBR); /* sometimes the DMA channel get stuck so we need to do this */ + WAIT_DMA(ATA_RX_DMA_NBR); + } + + /* set up the Etrax DMA descriptors */ + if (e100_ide_build_dmatable(drive)) { + ide_map_sg(drive, rq); + return 1; + } + + return 0; +} + +static void e100_dma_exec_cmd(ide_drive_t *drive, u8 command) +{ + /* set the irq handler which will finish the request when DMA is done */ + ide_set_handler(drive, &etrax_dma_intr, WAIT_CMD, NULL); + + /* issue cmd to drive */ + etrax100_ide_outb(command, IDE_COMMAND_REG); +} + void __init init_e100_ide (void) { @@ -297,18 +332,15 @@ hwif->atapi_output_bytes = &e100_atapi_output_bytes; hwif->ide_dma_check = &e100_dma_check; hwif->ide_dma_end = &e100_dma_end; - hwif->ide_dma_write = &e100_dma_write; - hwif->ide_dma_read = &e100_dma_read; - hwif->ide_dma_begin = &e100_dma_begin; + hwif->dma_setup = &e100_dma_setup; + hwif->dma_exec_cmd = &e100_dma_exec_cmd; + hwif->dma_start = &e100_dma_start; hwif->OUTB = &etrax100_ide_outb; hwif->OUTW = &etrax100_ide_outw; hwif->OUTBSYNC = &etrax100_ide_outbsync; hwif->INB = &etrax100_ide_inb; hwif->INW = &etrax100_ide_inw; hwif->ide_dma_off_quietly = &e100_dma_off; - hwif->ide_dma_verbose = &e100_dma_verbose; - hwif->sg_table = - kmalloc(sizeof(struct scatterlist) * PRD_ENTRIES, GFP_KERNEL); } /* actually reset and configure the etrax100 ide/ata interface */ @@ -401,12 +433,6 @@ return 0; } -static int e100_dma_verbose (ide_drive_t *drive) -{ - printk(", DMA(mode 2)"); - return 0; -} - static etrax_dma_descr mydescr; /* @@ -618,20 +644,9 @@ ata_tot_size = 0; - if (HWGROUP(drive)->rq->flags & REQ_DRIVE_TASKFILE) { - u8 *virt_addr = rq->buffer; - int sector_count = rq->nr_sectors; - memset(&sg[0], 0, sizeof(*sg)); - sg[0].page = virt_to_page(virt_addr); - sg[0].offset = offset_in_page(virt_addr); - sg[0].length = sector_count * SECTOR_SIZE; - hwif->sg_nents = i = 1; - } - else - { - hwif->sg_nents = i = blk_rq_map_sg(drive->queue, rq, hwif->sg_table); - } + ide_map_sg(drive, rq); + i = hwif->sg_nents; while(i) { /* @@ -768,10 +783,6 @@ * sector address using CHS or LBA. All that remains is to prepare for DMA * and then issue the actual read/write DMA/PIO command to the drive. * - * For ATAPI devices, we just prepare for DMA and return. The caller should - * then issue the packet command to the drive and call us again with - * ide_dma_begin afterwards. - * * Returns 0 if all went well. * Returns 1 if DMA read/write could not be started, in which case * the caller should revert to PIO for the current request. @@ -788,35 +799,9 @@ return 0; } -static int e100_start_dma(ide_drive_t *drive, int atapi, int reading) +static void e100_dma_start(ide_drive_t *drive) { - if(reading) { - - RESET_DMA(ATA_RX_DMA_NBR); /* sometimes the DMA channel get stuck so we need to do this */ - WAIT_DMA(ATA_RX_DMA_NBR); - - /* set up the Etrax DMA descriptors */ - - if(e100_ide_build_dmatable (drive)) - return 1; - - if(!atapi) { - /* set the irq handler which will finish the request when DMA is done */ - - ide_set_handler(drive, &etrax_dma_intr, WAIT_CMD, NULL); - - /* issue cmd to drive */ - if ((HWGROUP(drive)->rq->flags & REQ_DRIVE_TASKFILE) && - (drive->addressing == 1)) { - ide_task_t *args = HWGROUP(drive)->rq->special; - etrax100_ide_outb(args->tfRegister[IDE_COMMAND_OFFSET], IDE_COMMAND_REG); - } else if (drive->addressing) { - etrax100_ide_outb(WIN_READDMA_EXT, IDE_COMMAND_REG); - } else { - etrax100_ide_outb(WIN_READDMA, IDE_COMMAND_REG); - } - } - + if (e100_read_command) { /* begin DMA */ /* need to do this before RX DMA due to a chip bug @@ -849,32 +834,6 @@ } else { /* writing */ - - RESET_DMA(ATA_TX_DMA_NBR); /* sometimes the DMA channel get stuck so we need to do this */ - WAIT_DMA(ATA_TX_DMA_NBR); - - /* set up the Etrax DMA descriptors */ - - if(e100_ide_build_dmatable (drive)) - return 1; - - if(!atapi) { - /* set the irq handler which will finish the request when DMA is done */ - - ide_set_handler(drive, &etrax_dma_intr, WAIT_CMD, NULL); - - /* issue cmd to drive */ - if ((HWGROUP(drive)->rq->flags & REQ_DRIVE_TASKFILE) && - (drive->addressing == 1)) { - ide_task_t *args = HWGROUP(drive)->rq->special; - etrax100_ide_outb(args->tfRegister[IDE_COMMAND_OFFSET], IDE_COMMAND_REG); - } else if (drive->addressing) { - etrax100_ide_outb(WIN_WRITEDMA_EXT, IDE_COMMAND_REG); - } else { - etrax100_ide_outb(WIN_WRITEDMA, IDE_COMMAND_REG); - } - } - /* begin DMA */ *R_DMA_CH2_FIRST = virt_to_phys(ata_descrs); @@ -897,44 +856,4 @@ D(printk("dma write of %d bytes.\n", ata_tot_size)); } - return 0; -} - -static int e100_dma_write(ide_drive_t *drive) -{ - e100_read_command = 0; - /* ATAPI-devices (not disks) first call ide_dma_read/write to set the direction - * then they call ide_dma_begin after they have issued the appropriate drive command - * themselves to actually start the chipset DMA. so we just return here if we're - * not a diskdrive. - */ - if (drive->media != ide_disk) - return 0; - return e100_start_dma(drive, 0, 0); -} - -static int e100_dma_read(ide_drive_t *drive) -{ - e100_read_command = 1; - /* ATAPI-devices (not disks) first call ide_dma_read/write to set the direction - * then they call ide_dma_begin after they have issued the appropriate drive command - * themselves to actually start the chipset DMA. so we just return here if we're - * not a diskdrive. - */ - if (drive->media != ide_disk) - return 0; - return e100_start_dma(drive, 0, 1); -} - -static int e100_dma_begin(ide_drive_t *drive) -{ - /* begin DMA, used by ATAPI devices which want to issue the - * appropriate IDE command themselves. - * - * they have already called ide_dma_read/write to set the - * static reading flag, now they call ide_dma_begin to do - * the real stuff. we tell our code below not to issue - * any IDE commands itself and jump into it. - */ - return e100_start_dma(drive, 1, e100_read_command); } diff -Nru a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c --- a/drivers/ide/ide-cd.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/ide/ide-cd.c 2004-11-29 21:22:07 -08:00 @@ -562,7 +562,7 @@ /* * ide_error() takes action based on the error returned by the drive. */ -ide_startstop_t ide_cdrom_error (ide_drive_t *drive, const char *msg, byte stat) +static ide_startstop_t ide_cdrom_error (ide_drive_t *drive, const char *msg, byte stat) { struct request *rq; byte err; @@ -598,7 +598,7 @@ return ide_stopped; } -ide_startstop_t ide_cdrom_abort (ide_drive_t *drive, const char *msg) +static ide_startstop_t ide_cdrom_abort (ide_drive_t *drive, const char *msg) { struct request *rq; @@ -3430,7 +3430,7 @@ }; /* options */ -char *ignore = NULL; +static char *ignore = NULL; module_param(ignore, charp, 0400); MODULE_DESCRIPTION("ATAPI CD-ROM Driver"); diff -Nru a/drivers/ide/ide-cd.h b/drivers/ide/ide-cd.h --- a/drivers/ide/ide-cd.h 2004-11-29 21:22:08 -08:00 +++ b/drivers/ide/ide-cd.h 2004-11-29 21:22:08 -08:00 @@ -519,7 +519,7 @@ /* The generic packet command opcodes for CD/DVD Logical Units, * From Table 57 of the SFF8090 Ver. 3 (Mt. Fuji) draft standard. */ -const struct { +static const struct { unsigned short packet_command; const char * const text; } packet_command_texts[] = { @@ -577,7 +577,7 @@ /* From Table 303 of the SFF8090 Ver. 3 (Mt. Fuji) draft standard. */ -const char * const sense_key_texts[16] = { +static const char * const sense_key_texts[16] = { "No sense data", "Recovered error", "Not ready", @@ -597,7 +597,7 @@ }; /* From Table 304 of the SFF8090 Ver. 3 (Mt. Fuji) draft standard. */ -const struct { +static const struct { unsigned long asc_ascq; const char * const text; } sense_data_texts[] = { diff -Nru a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c --- a/drivers/ide/ide-disk.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/ide/ide-disk.c 2004-11-29 21:22:07 -08:00 @@ -390,7 +390,7 @@ return err; } -ide_startstop_t idedisk_error (ide_drive_t *drive, const char *msg, u8 stat) +static ide_startstop_t idedisk_error (ide_drive_t *drive, const char *msg, u8 stat) { ide_hwif_t *hwif; struct request *rq; @@ -450,7 +450,7 @@ return ide_stopped; } -ide_startstop_t idedisk_abort(ide_drive_t *drive, const char *msg) +static ide_startstop_t idedisk_abort(ide_drive_t *drive, const char *msg) { ide_hwif_t *hwif; struct request *rq; diff -Nru a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c --- a/drivers/ide/ide-dma.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/ide/ide-dma.c 2004-11-29 21:22:07 -08:00 @@ -129,7 +129,6 @@ { "CD-532E-A" , "ALL" }, { "E-IDE CD-ROM CR-840", "ALL" }, { "CD-ROM Drive/F5A", "ALL" }, - { "RICOH CD-R/RW MP7083A", "ALL" }, { "WPI CDD-820", "ALL" }, { "SAMSUNG CD-ROM SC-148C", "ALL" }, { "SAMSUNG CD-ROM SC-148F", "ALL" }, diff -Nru a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c --- a/drivers/ide/ide-probe.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/ide/ide-probe.c 2004-11-29 21:22:07 -08:00 @@ -1149,7 +1149,7 @@ extern ide_driver_t idedefault_driver; -struct kobject *ata_probe(dev_t dev, int *part, void *data) +static struct kobject *ata_probe(dev_t dev, int *part, void *data) { ide_hwif_t *hwif = data; int unit = *part >> PARTN_BITS; diff -Nru a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c --- a/drivers/ide/ide-proc.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/ide/ide-proc.c 2004-11-29 21:22:07 -08:00 @@ -124,6 +124,18 @@ PROC_IDE_READ_RETURN(page,start,off,count,eof,len); } +static void proc_ide_settings_warn(void) +{ + static int warned = 0; + + if (warned) + return; + + printk(KERN_WARNING "Warning: /proc/ide/hd?/settings interface is " + "obsolete, and will be removed soon!\n"); + warned = 1; +} + static int proc_ide_read_settings (char *page, char **start, off_t off, int count, int *eof, void *data) { @@ -132,8 +144,7 @@ char *out = page; int len, rc, mul_factor, div_factor; - printk(KERN_WARNING "Warning: /proc/ide/hd?/settings interface is " - "obsolete, and will be removed soon!\n"); + proc_ide_settings_warn(); down(&ide_setting_sem); out += sprintf(out, "name\t\t\tvalue\t\tmin\t\tmax\t\tmode\n"); @@ -171,11 +182,10 @@ ide_settings_t *setting; char *buf, *s; - printk(KERN_WARNING "Warning: /proc/ide/hd?/settings interface is " - "obsolete, and will be removed soon!\n"); - if (!capable(CAP_SYS_ADMIN)) return -EACCES; + + proc_ide_settings_warn(); if (count >= PAGE_SIZE) return -EINVAL; diff -Nru a/drivers/ide/ide.c b/drivers/ide/ide.c --- a/drivers/ide/ide.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/ide/ide.c 2004-11-29 21:22:07 -08:00 @@ -1846,7 +1846,7 @@ #endif /* CONFIG_BLK_DEV_IDEDOUBLER */ if (!strcmp(s, "ide=nodma")) { - printk("IDE: Prevented DMA\n"); + printk(" : Prevented DMA\n"); noautodma = 1; return 1; } diff -Nru a/drivers/ide/legacy/hd.c b/drivers/ide/legacy/hd.c --- a/drivers/ide/legacy/hd.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/ide/legacy/hd.c 2004-11-29 21:22:08 -08:00 @@ -174,7 +174,7 @@ } #endif -void __init hd_setup(char *str, int *ints) +static void __init hd_setup(char *str, int *ints) { int hdind = 0; @@ -239,7 +239,7 @@ #endif } -void check_status(void) +static void check_status(void) { int i = inb_p(HD_STATUS); @@ -386,7 +386,7 @@ * drive enters "idle", "standby", or "sleep" mode, so if the status looks * "good", we just ignore the interrupt completely. */ -void unexpected_hd_interrupt(void) +static void unexpected_hd_interrupt(void) { unsigned int stat = inb_p(HD_STATUS); @@ -551,7 +551,7 @@ enable_irq(HD_IRQ); } -int do_special_op(struct hd_i_struct *disk, struct request *req) +static int do_special_op(struct hd_i_struct *disk, struct request *req) { if (disk->recalibrate) { disk->recalibrate = 0; diff -Nru a/drivers/ide/legacy/qd65xx.c b/drivers/ide/legacy/qd65xx.c --- a/drivers/ide/legacy/qd65xx.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/ide/legacy/qd65xx.c 2004-11-29 21:22:06 -08:00 @@ -101,7 +101,7 @@ spin_unlock_irqrestore(&ide_lock, flags); } -u8 __init qd_read_reg (unsigned long reg) +static u8 __init qd_read_reg (unsigned long reg) { unsigned long flags; u8 read; diff -Nru a/drivers/ide/legacy/qd65xx.h b/drivers/ide/legacy/qd65xx.h --- a/drivers/ide/legacy/qd65xx.h 2004-11-29 21:22:08 -08:00 +++ b/drivers/ide/legacy/qd65xx.h 2004-11-29 21:22:08 -08:00 @@ -46,7 +46,7 @@ /* Drive specific timing taken from DOS driver v3.7 */ -struct qd65xx_timing_s { +static struct qd65xx_timing_s { s8 offset; /* ofset from the beginning of Model Number" */ char model[4]; /* 4 chars from Model number, no conversion */ s16 active; /* active time */ diff -Nru a/drivers/ide/pci/aec62xx.h b/drivers/ide/pci/aec62xx.h --- a/drivers/ide/pci/aec62xx.h 2004-11-29 21:22:07 -08:00 +++ b/drivers/ide/pci/aec62xx.h 2004-11-29 21:22:07 -08:00 @@ -11,7 +11,7 @@ byte ultra_settings; }; -struct chipset_bus_clock_list_entry aec6xxx_33_base [] = { +static struct chipset_bus_clock_list_entry aec6xxx_33_base [] = { { XFER_UDMA_6, 0x31, 0x07 }, { XFER_UDMA_5, 0x31, 0x06 }, { XFER_UDMA_4, 0x31, 0x05 }, @@ -31,7 +31,7 @@ { 0, 0x00, 0x00 } }; -struct chipset_bus_clock_list_entry aec6xxx_34_base [] = { +static struct chipset_bus_clock_list_entry aec6xxx_34_base [] = { { XFER_UDMA_6, 0x41, 0x06 }, { XFER_UDMA_5, 0x41, 0x05 }, { XFER_UDMA_4, 0x41, 0x04 }, diff -Nru a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c --- a/drivers/ide/pci/cs5520.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/ide/pci/cs5520.c 2004-11-29 21:22:06 -08:00 @@ -58,7 +58,7 @@ int recovery; }; -struct pio_clocks cs5520_pio_clocks[]={ +static struct pio_clocks cs5520_pio_clocks[]={ {3, 6, 11}, {2, 5, 6}, {1, 4, 3}, diff -Nru a/drivers/ide/pci/cy82c693.c b/drivers/ide/pci/cy82c693.c --- a/drivers/ide/pci/cy82c693.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/ide/pci/cy82c693.c 2004-11-29 21:22:06 -08:00 @@ -183,7 +183,7 @@ /* * used to set DMA mode for CY82C693 (single and multi modes) */ -int cy82c693_ide_dma_on (ide_drive_t *drive) +static int cy82c693_ide_dma_on (ide_drive_t *drive) { struct hd_driveid *id = drive->id; diff -Nru a/drivers/ide/pci/hpt366.h b/drivers/ide/pci/hpt366.h --- a/drivers/ide/pci/hpt366.h 2004-11-29 21:22:08 -08:00 +++ b/drivers/ide/pci/hpt366.h 2004-11-29 21:22:08 -08:00 @@ -10,7 +10,7 @@ #undef HPT_DELAY_INTERRUPT #undef HPT_SERIALIZE_IO -const char *quirk_drives[] = { +static const char *quirk_drives[] = { "QUANTUM FIREBALLlct08 08", "QUANTUM FIREBALLP KA6.4", "QUANTUM FIREBALLP LM20.4", @@ -18,7 +18,7 @@ NULL }; -const char *bad_ata100_5[] = { +static const char *bad_ata100_5[] = { "IBM-DTLA-307075", "IBM-DTLA-307060", "IBM-DTLA-307045", @@ -37,7 +37,7 @@ NULL }; -const char *bad_ata66_4[] = { +static const char *bad_ata66_4[] = { "IBM-DTLA-307075", "IBM-DTLA-307060", "IBM-DTLA-307045", @@ -56,12 +56,12 @@ NULL }; -const char *bad_ata66_3[] = { +static const char *bad_ata66_3[] = { "WDC AC310200R", NULL }; -const char *bad_ata33[] = { +static const char *bad_ata33[] = { "Maxtor 92720U8", "Maxtor 92040U6", "Maxtor 91360U4", "Maxtor 91020U3", "Maxtor 90845U3", "Maxtor 90650U2", "Maxtor 91360D8", "Maxtor 91190D7", "Maxtor 91020D6", "Maxtor 90845D5", "Maxtor 90680D4", "Maxtor 90510D3", "Maxtor 90340D2", "Maxtor 91152D8", "Maxtor 91008D7", "Maxtor 90845D6", "Maxtor 90840D6", "Maxtor 90720D5", "Maxtor 90648D5", "Maxtor 90576D4", @@ -99,7 +99,7 @@ * PIO. * 31 FIFO enable. */ -struct chipset_bus_clock_list_entry forty_base_hpt366[] = { +static struct chipset_bus_clock_list_entry forty_base_hpt366[] = { { XFER_UDMA_4, 0x900fd943 }, { XFER_UDMA_3, 0x900ad943 }, { XFER_UDMA_2, 0x900bd943 }, @@ -118,7 +118,7 @@ { 0, 0x0120d9d9 } }; -struct chipset_bus_clock_list_entry thirty_three_base_hpt366[] = { +static struct chipset_bus_clock_list_entry thirty_three_base_hpt366[] = { { XFER_UDMA_4, 0x90c9a731 }, { XFER_UDMA_3, 0x90cfa731 }, { XFER_UDMA_2, 0x90caa731 }, @@ -137,7 +137,7 @@ { 0, 0x0120a7a7 } }; -struct chipset_bus_clock_list_entry twenty_five_base_hpt366[] = { +static struct chipset_bus_clock_list_entry twenty_five_base_hpt366[] = { { XFER_UDMA_4, 0x90c98521 }, { XFER_UDMA_3, 0x90cf8521 }, @@ -158,7 +158,7 @@ }; /* from highpoint documentation. these are old values */ -struct chipset_bus_clock_list_entry thirty_three_base_hpt370[] = { +static struct chipset_bus_clock_list_entry thirty_three_base_hpt370[] = { /* { XFER_UDMA_5, 0x1A85F442, 0x16454e31 }, */ { XFER_UDMA_5, 0x16454e31 }, { XFER_UDMA_4, 0x16454e31 }, @@ -179,7 +179,7 @@ { 0, 0x06514e57 } }; -struct chipset_bus_clock_list_entry sixty_six_base_hpt370[] = { +static struct chipset_bus_clock_list_entry sixty_six_base_hpt370[] = { { XFER_UDMA_5, 0x14846231 }, { XFER_UDMA_4, 0x14886231 }, { XFER_UDMA_3, 0x148c6231 }, @@ -200,7 +200,7 @@ }; /* these are the current (4 sep 2001) timings from highpoint */ -struct chipset_bus_clock_list_entry thirty_three_base_hpt370a[] = { +static struct chipset_bus_clock_list_entry thirty_three_base_hpt370a[] = { { XFER_UDMA_5, 0x12446231 }, { XFER_UDMA_4, 0x12446231 }, { XFER_UDMA_3, 0x126c6231 }, @@ -221,7 +221,7 @@ }; /* 2x 33MHz timings */ -struct chipset_bus_clock_list_entry sixty_six_base_hpt370a[] = { +static struct chipset_bus_clock_list_entry sixty_six_base_hpt370a[] = { { XFER_UDMA_5, 0x1488e673 }, { XFER_UDMA_4, 0x1488e673 }, { XFER_UDMA_3, 0x1498e673 }, @@ -241,7 +241,7 @@ { 0, 0x0d02bf5f } }; -struct chipset_bus_clock_list_entry fifty_base_hpt370a[] = { +static struct chipset_bus_clock_list_entry fifty_base_hpt370a[] = { { XFER_UDMA_5, 0x12848242 }, { XFER_UDMA_4, 0x12ac8242 }, { XFER_UDMA_3, 0x128c8242 }, @@ -261,7 +261,7 @@ { 0, 0x0ac1f48a } }; -struct chipset_bus_clock_list_entry thirty_three_base_hpt372[] = { +static struct chipset_bus_clock_list_entry thirty_three_base_hpt372[] = { { XFER_UDMA_6, 0x1c81dc62 }, { XFER_UDMA_5, 0x1c6ddc62 }, { XFER_UDMA_4, 0x1c8ddc62 }, @@ -282,7 +282,7 @@ { 0, 0x0d029d5e } }; -struct chipset_bus_clock_list_entry fifty_base_hpt372[] = { +static struct chipset_bus_clock_list_entry fifty_base_hpt372[] = { { XFER_UDMA_5, 0x12848242 }, { XFER_UDMA_4, 0x12ac8242 }, { XFER_UDMA_3, 0x128c8242 }, @@ -302,7 +302,7 @@ { 0, 0x0a81f443 } }; -struct chipset_bus_clock_list_entry sixty_six_base_hpt372[] = { +static struct chipset_bus_clock_list_entry sixty_six_base_hpt372[] = { { XFER_UDMA_6, 0x1c869c62 }, { XFER_UDMA_5, 0x1cae9c62 }, { XFER_UDMA_4, 0x1c8a9c62 }, @@ -323,7 +323,7 @@ { 0, 0x0d029d26 } }; -struct chipset_bus_clock_list_entry thirty_three_base_hpt374[] = { +static struct chipset_bus_clock_list_entry thirty_three_base_hpt374[] = { { XFER_UDMA_6, 0x12808242 }, { XFER_UDMA_5, 0x12848242 }, { XFER_UDMA_4, 0x12ac8242 }, @@ -345,7 +345,7 @@ }; #if 0 -struct chipset_bus_clock_list_entry fifty_base_hpt374[] = { +static struct chipset_bus_clock_list_entry fifty_base_hpt374[] = { { XFER_UDMA_6, }, { XFER_UDMA_5, }, { XFER_UDMA_4, }, @@ -365,7 +365,7 @@ }; #endif #if 0 -struct chipset_bus_clock_list_entry sixty_six_base_hpt374[] = { +static struct chipset_bus_clock_list_entry sixty_six_base_hpt374[] = { { XFER_UDMA_6, 0x12406231 }, /* checkme */ { XFER_UDMA_5, 0x12446231 }, 0x14846231 diff -Nru a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c --- a/drivers/ide/pci/pdc202xx_new.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/ide/pci/pdc202xx_new.c 2004-11-29 21:22:08 -08:00 @@ -234,68 +234,12 @@ HWIF(drive)->channel ? "Secondary" : "Primary"); } -static void pdcnew_reset_host (ide_hwif_t *hwif) -{ -// unsigned long high_16 = hwif->dma_base - (8*(hwif->channel)); - unsigned long high_16 = hwif->dma_master; - u8 udma_speed_flag = hwif->INB(high_16|0x001f); - - hwif->OUTB((udma_speed_flag | 0x10), (high_16|0x001f)); - mdelay(100); - hwif->OUTB((udma_speed_flag & ~0x10), (high_16|0x001f)); - mdelay(2000); /* 2 seconds ?! */ - - printk(KERN_WARNING "PDC202XX: %s channel reset.\n", - hwif->channel ? "Secondary" : "Primary"); -} - -void pdcnew_reset (ide_drive_t *drive) -{ - ide_hwif_t *hwif = HWIF(drive); - ide_hwif_t *mate = hwif->mate; - - pdcnew_reset_host(hwif); - pdcnew_reset_host(mate); -#if 0 - /* - * FIXME: Have to kick all the drives again :-/ - * What a pain in the ACE! - */ - if (hwif->present) { - u16 hunit = 0; - for (hunit = 0; hunit < MAX_DRIVES; ++hunit) { - ide_drive_t *hdrive = &hwif->drives[hunit]; - if (hdrive->present) { - if (hwif->ide_dma_check) - hwif->ide_dma_check(hdrive); - else - hwif->tuneproc(hdrive, 5); - } - } - } - if (mate->present) { - u16 munit = 0; - for (munit = 0; munit < MAX_DRIVES; ++munit) { - ide_drive_t *mdrive = &mate->drives[munit]; - if (mdrive->present) { - if (mate->ide_dma_check) - mate->ide_dma_check(mdrive); - else - mate->tuneproc(mdrive, 5); - } - } - } -#else - hwif->tuneproc(drive, 5); -#endif -} - #ifdef CONFIG_PPC_PMAC static void __devinit apple_kiwi_init(struct pci_dev *pdev) { struct device_node *np = pci_device_to_OF_node(pdev); unsigned int class_rev = 0; - unsigned long mmio; + void __iomem *mmio; u8 conf; if (np == NULL || !device_is_compatible(np, "kiwi-root")) @@ -309,7 +253,7 @@ pci_read_config_byte(pdev, 0x40, &conf); pci_write_config_byte(pdev, 0x40, conf | 0x01); } - mmio = (unsigned long)ioremap(pci_resource_start(pdev, 5), + mmio = ioremap(pci_resource_start(pdev, 5), pci_resource_len(pdev, 5)); /* Setup some PLL stuffs */ @@ -324,7 +268,7 @@ break; } - iounmap((void *)mmio); + iounmap(mmio); } #endif /* CONFIG_PPC_PMAC */ diff -Nru a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c --- a/drivers/ide/pci/pdc202xx_old.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/ide/pci/pdc202xx_old.c 2004-11-29 21:22:08 -08:00 @@ -457,7 +457,7 @@ hwif->channel ? "Secondary" : "Primary"); } -void pdc202xx_reset (ide_drive_t *drive) +static void pdc202xx_reset (ide_drive_t *drive) { ide_hwif_t *hwif = HWIF(drive); ide_hwif_t *mate = hwif->mate; diff -Nru a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c --- a/drivers/ide/pci/sc1200.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/ide/pci/sc1200.c 2004-11-29 21:22:07 -08:00 @@ -72,7 +72,7 @@ /* * Set a new transfer mode at the drive */ -int sc1200_set_xfer_mode (ide_drive_t *drive, byte mode) +static int sc1200_set_xfer_mode (ide_drive_t *drive, byte mode) { printk("%s: sc1200_set_xfer_mode(%s)\n", drive->name, ide_xfer_verbose(mode)); return ide_config_drive_speed(drive, mode); @@ -263,7 +263,7 @@ * * returns 1 on error, 0 otherwise */ -int sc1200_ide_dma_end (ide_drive_t *drive) +static int sc1200_ide_dma_end (ide_drive_t *drive) { ide_hwif_t *hwif = HWIF(drive); unsigned long dma_base = hwif->dma_base; diff -Nru a/drivers/ide/pci/serverworks.h b/drivers/ide/pci/serverworks.h --- a/drivers/ide/pci/serverworks.h 2004-11-29 21:22:07 -08:00 +++ b/drivers/ide/pci/serverworks.h 2004-11-29 21:22:07 -08:00 @@ -13,7 +13,7 @@ /* Seagate Barracuda ATA IV Family drives in UDMA mode 5 * can overrun their FIFOs when used with the CSB5 */ -const char *svwks_bad_ata100[] = { +static const char *svwks_bad_ata100[] = { "ST320011A", "ST340016A", "ST360021A", diff -Nru a/drivers/ide/pci/trm290.c b/drivers/ide/pci/trm290.c --- a/drivers/ide/pci/trm290.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/ide/pci/trm290.c 2004-11-29 21:22:07 -08:00 @@ -249,7 +249,7 @@ /* * Invoked from ide-dma.c at boot time. */ -void __devinit init_hwif_trm290(ide_hwif_t *hwif) +static void __devinit init_hwif_trm290(ide_hwif_t *hwif) { unsigned int cfgbase = 0; unsigned long flags; diff -Nru a/drivers/ieee1394/pcilynx.h b/drivers/ieee1394/pcilynx.h --- a/drivers/ieee1394/pcilynx.h 2004-11-29 21:22:06 -08:00 +++ b/drivers/ieee1394/pcilynx.h 2004-11-29 21:22:06 -08:00 @@ -49,10 +49,10 @@ have_1394_buffers, have_iomappings, is_host } state; /* remapped memory spaces */ - void *registers; - void *local_rom; - void *local_ram; - void *aux_port; + void __iomem *registers; + void __iomem *local_rom; + void __iomem *local_ram; + void __iomem *aux_port; quadlet_t bus_info_block[5]; #ifdef CONFIG_IEEE1394_PCILYNX_PORTS diff -Nru a/drivers/isdn/divert/divert_init.c b/drivers/isdn/divert/divert_init.c --- a/drivers/isdn/divert/divert_init.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/isdn/divert/divert_init.c 2004-11-29 21:22:08 -08:00 @@ -12,17 +12,14 @@ #include #include #include +#include + #include "isdn_divert.h" MODULE_DESCRIPTION("ISDN4Linux: Call diversion support"); MODULE_AUTHOR("Werner Cornelius"); MODULE_LICENSE("GPL"); -/********************/ -/* needed externals */ -/********************/ -extern int printk(const char *fmt,...); - /****************************************/ /* structure containing interface to hl */ /****************************************/ @@ -59,23 +56,23 @@ /* Module deinit code */ /**********************/ static void __exit divert_exit(void) -{ unsigned long flags; +{ + unsigned long flags; int i; - save_flags(flags); - cli(); + spin_lock_irqsave(&divert_lock, flags); divert_if.cmd = DIVERT_CMD_REL; /* release */ if ((i = DIVERT_REG_NAME(&divert_if)) != DIVERT_NO_ERR) { printk(KERN_WARNING "dss1_divert: error %d releasing module\n",i); - restore_flags(flags); + spin_unlock_irqrestore(&divert_lock, flags); return; } if (divert_dev_deinit()) { printk(KERN_WARNING "dss1_divert: device busy, remove cancelled\n"); - restore_flags(flags); + spin_unlock_irqrestore(&divert_lock, flags); return; } - restore_flags(flags); + spin_unlock_irqrestore(&divert_lock, flags); deleterule(-1); /* delete all rules and free mem */ deleteprocs(); printk(KERN_INFO "dss1_divert module successfully removed \n"); diff -Nru a/drivers/isdn/divert/divert_procfs.c b/drivers/isdn/divert/divert_procfs.c --- a/drivers/isdn/divert/divert_procfs.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/isdn/divert/divert_procfs.c 2004-11-29 21:22:08 -08:00 @@ -22,6 +22,7 @@ #include #include "isdn_divert.h" + /*********************************/ /* Variables for interface queue */ /*********************************/ @@ -76,7 +77,7 @@ /* deflection device read routine */ /**********************************/ static ssize_t -isdn_divert_read(struct file *file, char *buf, size_t count, loff_t * off) +isdn_divert_read(struct file *file, char __user *buf, size_t count, loff_t * off) { struct divert_info *inf; int len; @@ -90,7 +91,7 @@ return (0); inf->usage_cnt--; /* new usage count */ - (struct divert_info **) file->private_data = &inf->next; /* next structure */ + file->private_data = &inf->next; /* next structure */ if ((len = strlen(inf->info_start)) <= count) { if (copy_to_user(buf, inf->info_start, len)) return -EFAULT; @@ -104,7 +105,7 @@ /* deflection device write routine */ /**********************************/ static ssize_t -isdn_divert_write(struct file *file, const char *buf, size_t count, loff_t * off) +isdn_divert_write(struct file *file, const char __user *buf, size_t count, loff_t * off) { return (-ENODEV); } /* isdn_divert_write */ @@ -137,9 +138,9 @@ spin_lock_irqsave( &divert_info_lock, flags ); if_used++; if (divert_info_head) - (struct divert_info **) filep->private_data = &(divert_info_tail->next); + filep->private_data = &(divert_info_tail->next); else - (struct divert_info **) filep->private_data = &divert_info_head; + filep->private_data = &divert_info_head; spin_unlock_irqrestore( &divert_info_lock, flags ); /* start_divert(); */ return nonseekable_open(ino, filep); @@ -184,7 +185,7 @@ divert_rule *rulep; char *cp; - if (copy_from_user(&dioctl, (char *) arg, sizeof(dioctl))) + if (copy_from_user(&dioctl, (void __user *) arg, sizeof(dioctl))) return -EFAULT; switch (cmd) { @@ -215,10 +216,9 @@ case IIOCMODRULE: if (!(rulep = getruleptr(dioctl.getsetrule.ruleidx))) return (-EINVAL); - save_flags(flags); - cli(); + spin_lock_irqsave(&divert_lock, flags); *rulep = dioctl.getsetrule.rule; /* copy data */ - restore_flags(flags); + spin_unlock_irqrestore(&divert_lock, flags); return (0); /* no copy required */ break; @@ -253,7 +253,7 @@ default: return (-EINVAL); } /* switch cmd */ - return copy_to_user((char *)arg, &dioctl, sizeof(dioctl)) ? -EFAULT : 0; + return copy_to_user((void __user *)arg, &dioctl, sizeof(dioctl)) ? -EFAULT : 0; } /* isdn_divert_ioctl */ diff -Nru a/drivers/isdn/divert/isdn_divert.c b/drivers/isdn/divert/isdn_divert.c --- a/drivers/isdn/divert/isdn_divert.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/isdn/divert/isdn_divert.c 2004-11-29 21:22:07 -08:00 @@ -11,6 +11,7 @@ #include #include + #include "isdn_divert.h" /**********************************/ @@ -47,54 +48,53 @@ static struct deflect_struc *table_tail = NULL; static unsigned char extern_wait_max = 4; /* maximum wait in s for external process */ +spinlock_t divert_lock = SPIN_LOCK_UNLOCKED; + /***************************/ /* timer callback function */ /***************************/ static void deflect_timer_expire(ulong arg) -{ unsigned long flags; +{ + unsigned long flags; struct call_struc *cs = (struct call_struc *) arg; - save_flags(flags); - cli(); + spin_lock_irqsave(&divert_lock, flags); del_timer(&cs->timer); /* delete active timer */ - restore_flags(flags); + spin_unlock_irqrestore(&divert_lock, flags); switch(cs->akt_state) { case DEFLECT_PROCEED: cs->ics.command = ISDN_CMD_HANGUP; /* cancel action */ divert_if.ll_cmd(&cs->ics); - save_flags(flags); - cli(); + spin_lock_irqsave(&divert_lock, flags); cs->akt_state = DEFLECT_AUTODEL; /* delete after timeout */ cs->timer.expires = jiffies + (HZ * AUTODEL_TIME); add_timer(&cs->timer); - restore_flags(flags); + spin_unlock_irqrestore(&divert_lock, flags); break; case DEFLECT_ALERT: cs->ics.command = ISDN_CMD_REDIR; /* protocol */ strcpy(cs->ics.parm.setup.phone,cs->deflect_dest); strcpy(cs->ics.parm.setup.eazmsn,"Testtext delayed"); - divert_if.ll_cmd(&cs->ics); - save_flags(flags); - cli(); + divert_if.ll_cmd(&cs->ics); + spin_lock_irqsave(&divert_lock, flags); cs->akt_state = DEFLECT_AUTODEL; /* delete after timeout */ cs->timer.expires = jiffies + (HZ * AUTODEL_TIME); add_timer(&cs->timer); - restore_flags(flags); + spin_unlock_irqrestore(&divert_lock, flags); break; case DEFLECT_AUTODEL: default: - save_flags(flags); - cli(); + spin_lock_irqsave(&divert_lock, flags); if (cs->prev) cs->prev->next = cs->next; /* forward link */ else divert_head = cs->next; if (cs->next) cs->next->prev = cs->prev; /* back link */ - restore_flags(flags); + spin_unlock_irqrestore(&divert_lock, flags); kfree(cs); return; @@ -166,10 +166,9 @@ cs->ics.parm.dss1_io.datalen = p - tmp; /* total len */ cs->ics.parm.dss1_io.data = tmp; /* start of buffer */ - save_flags(flags); - cli(); + spin_lock_irqsave(&divert_lock, flags); cs->ics.parm.dss1_io.ll_id = next_id++; /* id for callback */ - restore_flags(flags); + spin_unlock_irqrestore(&divert_lock, flags); *procid = cs->ics.parm.dss1_io.ll_id; sprintf(cs->info,"%d 0x%lx %s%s 0 %s %02x %d%s%s\n", @@ -187,11 +186,10 @@ if (!retval) { cs->prev = NULL; - save_flags(flags); - cli(); + spin_lock_irqsave(&divert_lock, flags); cs->next = divert_head; divert_head = cs; - restore_flags(flags); + spin_unlock_irqrestore(&divert_lock, flags); } else kfree(cs); @@ -224,13 +222,12 @@ { case 0: /* hangup */ del_timer(&cs->timer); ic.command = ISDN_CMD_HANGUP; - i = divert_if.ll_cmd(&ic); - save_flags(flags); - cli(); + i = divert_if.ll_cmd(&ic); + spin_lock_irqsave(&divert_lock, flags); cs->akt_state = DEFLECT_AUTODEL; /* delete after timeout */ cs->timer.expires = jiffies + (HZ * AUTODEL_TIME); add_timer(&cs->timer); - restore_flags(flags); + spin_unlock_irqrestore(&divert_lock, flags); break; case 1: /* alert */ @@ -239,12 +236,12 @@ del_timer(&cs->timer); ic.command = ISDN_CMD_ALERT; if ((i = divert_if.ll_cmd(&ic))) - { save_flags(flags); - cli(); + { + spin_lock_irqsave(&divert_lock, flags); cs->akt_state = DEFLECT_AUTODEL; /* delete after timeout */ cs->timer.expires = jiffies + (HZ * AUTODEL_TIME); add_timer(&cs->timer); - restore_flags(flags); + spin_unlock_irqrestore(&divert_lock, flags); } else cs->akt_state = DEFLECT_ALERT; @@ -256,12 +253,12 @@ strcpy(cs->ics.parm.setup.eazmsn, "Testtext manual"); ic.command = ISDN_CMD_REDIR; if ((i = divert_if.ll_cmd(&ic))) - { save_flags(flags); - cli(); + { + spin_lock_irqsave(&divert_lock, flags); cs->akt_state = DEFLECT_AUTODEL; /* delete after timeout */ cs->timer.expires = jiffies + (HZ * AUTODEL_TIME); add_timer(&cs->timer); - restore_flags(flags); + spin_unlock_irqrestore(&divert_lock, flags); } else cs->akt_state = DEFLECT_ALERT; @@ -284,8 +281,7 @@ ds->rule = *newrule; /* set rule */ - save_flags(flags); - cli(); + spin_lock_irqsave(&divert_lock, flags); if (idx >= 0) { ds1 = table_head; @@ -313,7 +309,7 @@ table_head = ds; /* first element */ } - restore_flags(flags); + spin_unlock_irqrestore(&divert_lock, flags); return(0); } /* insertrule */ @@ -325,12 +321,11 @@ unsigned long flags; if (idx < 0) - { save_flags(flags); - cli(); + { spin_lock_irqsave(&divert_lock, flags); ds = table_head; table_head = NULL; table_tail = NULL; - restore_flags(flags); + spin_unlock_irqrestore(&divert_lock, flags); while (ds) { ds1 = ds; ds = ds->next; @@ -339,8 +334,7 @@ return(0); } - save_flags(flags); - cli(); + spin_lock_irqsave(&divert_lock, flags); ds = table_head; while ((ds) && (idx > 0)) @@ -349,7 +343,8 @@ } if (!ds) - { restore_flags(flags); + { + spin_unlock_irqrestore(&divert_lock, flags); return(-EINVAL); } @@ -363,7 +358,7 @@ else table_head = ds->next; /* start of chain */ - restore_flags(flags); + spin_unlock_irqrestore(&divert_lock, flags); kfree(ds); return(0); } /* deleterule */ @@ -474,10 +469,9 @@ else cs->timer.expires = 0; cs->akt_state = dv->rule.action; - save_flags(flags); - cli(); + spin_lock_irqsave(&divert_lock, flags); cs->divert_id = next_id++; /* new sequence number */ - restore_flags(flags); + spin_unlock_irqrestore(&divert_lock, flags); cs->prev = NULL; if (cs->akt_state == DEFLECT_ALERT) { strcpy(cs->deflect_dest,dv->rule.to_nr); @@ -525,12 +519,11 @@ if (cs) { cs->prev = NULL; - save_flags(flags); - cli(); + spin_lock_irqsave(&divert_lock, flags); cs->next = divert_head; divert_head = cs; if (cs->timer.expires) add_timer(&cs->timer); - restore_flags(flags); + spin_unlock_irqrestore(&divert_lock, flags); put_info_buffer(cs->info); return(retval); @@ -544,8 +537,7 @@ { struct call_struc *cs, *cs1; unsigned long flags; - save_flags(flags); - cli(); + spin_lock_irqsave(&divert_lock, flags); cs = divert_head; divert_head = NULL; while (cs) @@ -554,7 +546,7 @@ cs = cs->next; kfree(cs1); } - restore_flags(flags); + spin_unlock_irqrestore(&divert_lock, flags); } /* deleteprocs */ /****************************************************/ @@ -769,8 +761,8 @@ } if (cs1->ics.driver == -1) - { save_flags(flags); - cli(); + { + spin_lock_irqsave(&divert_lock, flags); del_timer(&cs1->timer); if (cs1->prev) cs1->prev->next = cs1->next; /* forward link */ @@ -778,7 +770,7 @@ divert_head = cs1->next; if (cs1->next) cs1->next->prev = cs1->prev; /* back link */ - restore_flags(flags); + spin_unlock_irqrestore(&divert_lock, flags); kfree(cs1); } @@ -826,15 +818,14 @@ cs = cs->next; if (cs1->ics.driver == -1) { - save_flags(flags); - cli(); + spin_lock_irqsave(&divert_lock, flags); if (cs1->prev) cs1->prev->next = cs1->next; /* forward link */ else divert_head = cs1->next; if (cs1->next) cs1->next->prev = cs1->prev; /* back link */ - restore_flags(flags); + spin_unlock_irqrestore(&divert_lock, flags); kfree(cs1); } } diff -Nru a/drivers/isdn/divert/isdn_divert.h b/drivers/isdn/divert/isdn_divert.h --- a/drivers/isdn/divert/isdn_divert.h 2004-11-29 21:22:07 -08:00 +++ b/drivers/isdn/divert/isdn_divert.h 2004-11-29 21:22:07 -08:00 @@ -114,6 +114,8 @@ /**************/ /* Prototypes */ /**************/ +extern spinlock_t divert_lock; + extern ulong if_used; /* number of interface users */ extern int divert_dev_deinit(void); extern int divert_dev_init(void); diff -Nru a/drivers/isdn/hardware/eicon/capifunc.c b/drivers/isdn/hardware/eicon/capifunc.c --- a/drivers/isdn/hardware/eicon/capifunc.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/isdn/hardware/eicon/capifunc.c 2004-11-29 21:22:08 -08:00 @@ -240,13 +240,13 @@ DBG_PRV1(("sendf(a=%d,cmd=%x,format=%s)", appl->Id, command, (byte *) format)) - WRITE_WORD(&msg.header.appl_id, appl->Id); - WRITE_WORD(&msg.header.command, command); + PUT_WORD(&msg.header.appl_id, appl->Id); + PUT_WORD(&msg.header.command, command); if ((byte) (command >> 8) == 0x82) Number = appl->Number++; - WRITE_WORD(&msg.header.number, Number); + PUT_WORD(&msg.header.number, Number); - WRITE_DWORD(((byte *) & msg.header.controller), Id); + PUT_DWORD(&msg.header.controller, Id); write = (byte *) & msg; write += 12; @@ -261,13 +261,13 @@ break; case 'w': tmp = va_arg(ap, dword); - WRITE_WORD(write, (tmp & 0xffff)); + PUT_WORD(write, (tmp & 0xffff)); write += 2; length += 2; break; case 'd': tmp = va_arg(ap, dword); - WRITE_DWORD(write, tmp); + PUT_DWORD(write, tmp); write += 4; length += 4; break; @@ -282,11 +282,11 @@ } va_end(ap); - WRITE_WORD(&msg.header.length, length); + PUT_WORD(&msg.header.length, length); msg.header.controller = UnMapController(msg.header.controller); if (command == _DATA_B3_I) - dlength = READ_WORD( + dlength = GET_WORD( ((byte *) & msg.info.data_b3_ind.Data_Length)); if (!(dmb = diva_os_alloc_message_buffer(length + dlength, @@ -300,7 +300,7 @@ /* if DATA_B3_IND, copy data too */ if (command == _DATA_B3_I) { - dword data = READ_DWORD(&msg.info.data_b3_ind.Data); + dword data = GET_DWORD(&msg.info.data_b3_ind.Data); memcpy(write + length, (void *) data, dlength); } @@ -318,7 +318,7 @@ if (myDriverDebugHandle.dbgMask & DL_BLK) { xlog("\x00\x02", &msg, 0x81, length); for (i = 0; i < dlength; i += 256) { - DBG_BLK((((char *) READ_DWORD(&msg.info.data_b3_ind.Data)) + i, + DBG_BLK((((char *) GET_DWORD(&msg.info.data_b3_ind.Data)) + i, ((dlength - i) < 256) ? (dlength - i) : 256)) if (!(myDriverDebugHandle.dbgMask & DL_PRV0)) break; /* not more if not explicitely requested */ @@ -700,7 +700,7 @@ } /* profile information */ - WRITE_WORD(&ctrl->profile.nbchannel, card->d.channels); + PUT_WORD(&ctrl->profile.nbchannel, card->d.channels); ctrl->profile.goptions = a->profile.Global_Options; ctrl->profile.support1 = a->profile.B1_Protocols; ctrl->profile.support2 = a->profile.B2_Protocols; @@ -882,11 +882,11 @@ word ret = 0; diva_os_spin_lock_magic_t old_irql; CAPI_MSG *msg = (CAPI_MSG *) DIVA_MESSAGE_BUFFER_DATA(dmb); - APPL *this = &application[READ_WORD(&msg->header.appl_id) - 1]; + APPL *this = &application[GET_WORD(&msg->header.appl_id) - 1]; diva_card *card = ctrl->driverdata; __u32 length = DIVA_MESSAGE_BUFFER_LEN(dmb); - word clength = READ_WORD(&msg->header.length); - word command = READ_WORD(&msg->header.command); + word clength = GET_WORD(&msg->header.length); + word command = GET_WORD(&msg->header.command); u16 retval = CAPI_NOERROR; if (diva_os_in_irq()) { @@ -932,9 +932,9 @@ if (clength == 24) clength = 22; /* workaround for PPcom bug */ /* header is always 22 */ - if (READ_WORD(&msg->info.data_b3_req.Data_Length) > + if (GET_WORD(&msg->info.data_b3_req.Data_Length) > this->MaxDataLength - || READ_WORD(&msg->info.data_b3_req.Data_Length) > + || GET_WORD(&msg->info.data_b3_req.Data_Length) > (length - clength)) { DBG_ERR(("Write - invalid message size")) retval = CAPI_ILLCMDORSUBCMDORMSGTOSMALL; @@ -952,18 +952,18 @@ this->xbuffer_internal[i] = NULL; memcpy(this->xbuffer_ptr[i], &((__u8 *) msg)[clength], - READ_WORD(&msg->info.data_b3_req.Data_Length)); + GET_WORD(&msg->info.data_b3_req.Data_Length)); #ifndef DIVA_NO_DEBUGLIB if ((myDriverDebugHandle.dbgMask & DL_BLK) && (myDriverDebugHandle.dbgMask & DL_XLOG)) { int j; for (j = 0; j < - READ_WORD(&msg->info.data_b3_req.Data_Length); + GET_WORD(&msg->info.data_b3_req.Data_Length); j += 256) { DBG_BLK((((char *) this->xbuffer_ptr[i]) + j, - ((READ_WORD(&msg->info.data_b3_req.Data_Length) - j) < - 256) ? (READ_WORD(&msg->info.data_b3_req.Data_Length) - j) : 256)) + ((GET_WORD(&msg->info.data_b3_req.Data_Length) - j) < + 256) ? (GET_WORD(&msg->info.data_b3_req.Data_Length) - j) : 256)) if (!(myDriverDebugHandle.dbgMask & DL_PRV0)) break; /* not more if not explicitely requested */ } @@ -976,7 +976,7 @@ mapped_msg->header.controller = MapController(mapped_msg->header.controller); mapped_msg->header.length = clength; mapped_msg->header.command = command; - mapped_msg->header.number = READ_WORD(&msg->header.number); + mapped_msg->header.number = GET_WORD(&msg->header.number); ret = api_put(this, mapped_msg); switch (ret) { diff -Nru a/drivers/isdn/hardware/eicon/di.c b/drivers/isdn/hardware/eicon/di.c --- a/drivers/isdn/hardware/eicon/di.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/isdn/hardware/eicon/di.c 2004-11-29 21:22:07 -08:00 @@ -952,10 +952,10 @@ byte Id, byte Ch, byte Rc, byte cb, byte type) { #if defined(XDI_USE_XLOG) word LogInfo[4]; - WRITE_WORD(&LogInfo[0], ((word)Adapter | (word)(xdi_xlog_sec++ << 8))); - WRITE_WORD(&LogInfo[1], ((word)Id | (word)(Ch << 8))); - WRITE_WORD(&LogInfo[2], ((word)Rc | (word)(type << 8))); - WRITE_WORD(&LogInfo[3], cb); + PUT_WORD(&LogInfo[0], ((word)Adapter | (word)(xdi_xlog_sec++ << 8))); + PUT_WORD(&LogInfo[1], ((word)Id | (word)(Ch << 8))); + PUT_WORD(&LogInfo[2], ((word)Rc | (word)(type << 8))); + PUT_WORD(&LogInfo[3], cb); xdi_xlog ((byte*)&LogInfo[0], 221, sizeof(LogInfo)); #endif } @@ -976,9 +976,9 @@ byte Ch, byte Req, byte type) { #if defined(XDI_USE_XLOG) word LogInfo[3]; - WRITE_WORD(&LogInfo[0], ((word)Adapter | (word)(xdi_xlog_sec++ << 8))); - WRITE_WORD(&LogInfo[1], ((word)Id | (word)(Ch << 8))); - WRITE_WORD(&LogInfo[2], ((word)Req | (word)(type << 8))); + PUT_WORD(&LogInfo[0], ((word)Adapter | (word)(xdi_xlog_sec++ << 8))); + PUT_WORD(&LogInfo[1], ((word)Id | (word)(Ch << 8))); + PUT_WORD(&LogInfo[2], ((word)Req | (word)(type << 8))); xdi_xlog ((byte*)&LogInfo[0], 220, sizeof(LogInfo)); #endif } @@ -1020,10 +1020,10 @@ byte type) { #if defined(XDI_USE_XLOG) word LogInfo[4]; - WRITE_WORD(&LogInfo[0], ((word)Adapter | (word)(xdi_xlog_sec++ << 8))); - WRITE_WORD(&LogInfo[1], ((word)Id | (word)(Ch << 8))); - WRITE_WORD(&LogInfo[2], ((word)Ind | (word)(type << 8))); - WRITE_WORD(&LogInfo[3], ((word)rnr | (word)(rnr_valid << 8))); + PUT_WORD(&LogInfo[0], ((word)Adapter | (word)(xdi_xlog_sec++ << 8))); + PUT_WORD(&LogInfo[1], ((word)Id | (word)(Ch << 8))); + PUT_WORD(&LogInfo[2], ((word)Ind | (word)(type << 8))); + PUT_WORD(&LogInfo[3], ((word)rnr | (word)(rnr_valid << 8))); xdi_xlog ((byte*)&LogInfo[0], 222, sizeof(LogInfo)); #endif } diff -Nru a/drivers/isdn/hardware/eicon/diva_pci.h b/drivers/isdn/hardware/eicon/diva_pci.h --- a/drivers/isdn/hardware/eicon/diva_pci.h 2004-11-29 21:22:07 -08:00 +++ b/drivers/isdn/hardware/eicon/diva_pci.h 2004-11-29 21:22:07 -08:00 @@ -3,11 +3,11 @@ #ifndef __DIVA_PCI_INTERFACE_H__ #define __DIVA_PCI_INTERFACE_H__ -void *divasa_remap_pci_bar(diva_os_xdi_adapter_t *a, +void __iomem *divasa_remap_pci_bar(diva_os_xdi_adapter_t *a, int id, unsigned long bar, unsigned long area_length); -void divasa_unmap_pci_bar(void *bar); +void divasa_unmap_pci_bar(void __iomem *bar); unsigned long divasa_get_pci_irq(unsigned char bus, unsigned char func, void *pci_dev_handle); unsigned long divasa_get_pci_bar(unsigned char bus, diff -Nru a/drivers/isdn/hardware/eicon/divasmain.c b/drivers/isdn/hardware/eicon/divasmain.c --- a/drivers/isdn/hardware/eicon/divasmain.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/isdn/hardware/eicon/divasmain.c 2004-11-29 21:22:06 -08:00 @@ -435,16 +435,14 @@ return (0); } -void *divasa_remap_pci_bar(diva_os_xdi_adapter_t *a, int id, unsigned long bar, unsigned long area_length) +void __iomem *divasa_remap_pci_bar(diva_os_xdi_adapter_t *a, int id, unsigned long bar, unsigned long area_length) { - void *ret; - - ret = (void *) ioremap(bar, area_length); - DBG_TRC(("remap(%08x)->%08x", bar, ret)); + void __iomem *ret = ioremap(bar, area_length); + DBG_TRC(("remap(%08x)->%p", bar, ret)); return (ret); } -void divasa_unmap_pci_bar(void *bar) +void divasa_unmap_pci_bar(void __iomem *bar) { if (bar) { iounmap(bar); @@ -454,32 +452,32 @@ /********************************************************* ** I/O port access *********************************************************/ -byte __inline__ inpp(void *addr) +byte __inline__ inpp(void __iomem *addr) { return (inb((unsigned long) addr)); } -word __inline__ inppw(void *addr) +word __inline__ inppw(void __iomem *addr) { return (inw((unsigned long) addr)); } -void __inline__ inppw_buffer(void *addr, void *P, int length) +void __inline__ inppw_buffer(void __iomem *addr, void *P, int length) { insw((unsigned long) addr, (word *) P, length >> 1); } -void __inline__ outppw_buffer(void *addr, void *P, int length) +void __inline__ outppw_buffer(void __iomem *addr, void *P, int length) { outsw((unsigned long) addr, (word *) P, length >> 1); } -void __inline__ outppw(void *addr, word w) +void __inline__ outppw(void __iomem *addr, word w) { outw(w, (unsigned long) addr); } -void __inline__ outpp(void *addr, word p) +void __inline__ outpp(void __iomem *addr, word p) { outb(p, (unsigned long) addr); } diff -Nru a/drivers/isdn/hardware/eicon/io.c b/drivers/isdn/hardware/eicon/io.c --- a/drivers/isdn/hardware/eicon/io.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/isdn/hardware/eicon/io.c 2004-11-29 21:22:07 -08:00 @@ -95,13 +95,13 @@ DBG_FTL(("Microcode: %s", &IoAdapter->ProtocolIdString[0])) for ( ; logCnt > 0 ; --logCnt ) { - if ( !READ_WORD(&Xlog[logOut]) ) + if ( !GET_WORD(&Xlog[logOut]) ) { if ( --logCnt == 0 ) break ; logOut = 0 ; } - if ( READ_WORD(&Xlog[logOut]) <= (logOut * sizeof(*Xlog)) ) + if ( GET_WORD(&Xlog[logOut]) <= (logOut * sizeof(*Xlog)) ) { if ( logCnt > 2 ) { @@ -110,9 +110,9 @@ } break ; } - logLen = (dword)(READ_WORD(&Xlog[logOut]) - (logOut * sizeof(*Xlog))) ; + logLen = (dword)(GET_WORD(&Xlog[logOut]) - (logOut * sizeof(*Xlog))) ; DBG_FTL_MXLOG(( (char *)&Xlog[logOut + 1], (dword)(logLen - 2) )) - logOut = (READ_WORD(&Xlog[logOut]) + 1) / sizeof(*Xlog) ; + logOut = (GET_WORD(&Xlog[logOut]) + 1) / sizeof(*Xlog) ; } DBG_FTL(("%s: ***************** end of XLOG *****************", &IoAdapter->Name[0])) @@ -154,10 +154,10 @@ "VCED" } ; void -dump_trap_frame (PISDN_ADAPTER IoAdapter, byte *exceptionFrame) +dump_trap_frame (PISDN_ADAPTER IoAdapter, byte __iomem *exceptionFrame) { - MP_XCPTC *xcept = (MP_XCPTC *)exceptionFrame ; - dword *regs; + MP_XCPTC __iomem *xcept = (MP_XCPTC __iomem *)exceptionFrame ; + dword __iomem *regs; regs = &xcept->regs[0] ; DBG_FTL(("%s: ***************** CPU TRAPPED *****************", &IoAdapter->Name[0])) @@ -595,26 +595,22 @@ byte mem_in (ADAPTER *a, void *addr) { byte val; - volatile byte* Base; - - Base = (volatile byte *)DIVA_OS_MEM_ATTACH_RAM((PISDN_ADAPTER)a->io); - val = *(Base + (unsigned long)addr); + volatile byte __iomem *Base = DIVA_OS_MEM_ATTACH_RAM((PISDN_ADAPTER)a->io); + val = READ_BYTE(Base + (unsigned long)addr); DIVA_OS_MEM_DETACH_RAM((PISDN_ADAPTER)a->io, Base); return (val); } word mem_inw (ADAPTER *a, void *addr) { word val; - volatile byte* Base; - - Base = (volatile byte*)DIVA_OS_MEM_ATTACH_RAM((PISDN_ADAPTER)a->io); + volatile byte __iomem *Base = DIVA_OS_MEM_ATTACH_RAM((PISDN_ADAPTER)a->io); val = READ_WORD((Base + (unsigned long)addr)); DIVA_OS_MEM_DETACH_RAM((PISDN_ADAPTER)a->io, Base); return (val); } void mem_in_dw (ADAPTER *a, void *addr, dword* data, int dwords) { - volatile byte* Base = (volatile byte*)DIVA_OS_MEM_ATTACH_RAM((PISDN_ADAPTER)a->io); + volatile byte __iomem * Base = DIVA_OS_MEM_ATTACH_RAM((PISDN_ADAPTER)a->io); while (dwords--) { *data++ = READ_DWORD((Base + (unsigned long)addr)); addr+=4; @@ -623,8 +619,8 @@ } void mem_in_buffer (ADAPTER *a, void *addr, void *buffer, word length) { - volatile byte* Base = (volatile byte*)DIVA_OS_MEM_ATTACH_RAM((PISDN_ADAPTER)a->io); - memcpy (buffer, (void *)(Base + (unsigned long)addr), length); + volatile byte __iomem *Base = DIVA_OS_MEM_ATTACH_RAM((PISDN_ADAPTER)a->io); + memcpy_fromio(buffer, (Base + (unsigned long)addr), length); DIVA_OS_MEM_DETACH_RAM((PISDN_ADAPTER)a->io, Base); } void mem_look_ahead (ADAPTER *a, PBUFFER *RBuffer, ENTITY *e) @@ -637,19 +633,19 @@ } void mem_out (ADAPTER *a, void *addr, byte data) { - volatile byte* Base = (volatile byte*)DIVA_OS_MEM_ATTACH_RAM((PISDN_ADAPTER)a->io); - *(Base + (unsigned long)addr) = data ; + volatile byte __iomem *Base = DIVA_OS_MEM_ATTACH_RAM((PISDN_ADAPTER)a->io); + WRITE_BYTE(Base + (unsigned long)addr, data); DIVA_OS_MEM_DETACH_RAM((PISDN_ADAPTER)a->io, Base); } void mem_outw (ADAPTER *a, void *addr, word data) { - volatile byte* Base = (volatile byte*)DIVA_OS_MEM_ATTACH_RAM((PISDN_ADAPTER)a->io); + volatile byte __iomem * Base = DIVA_OS_MEM_ATTACH_RAM((PISDN_ADAPTER)a->io); WRITE_WORD((Base + (unsigned long)addr), data); DIVA_OS_MEM_DETACH_RAM((PISDN_ADAPTER)a->io, Base); } void mem_out_dw (ADAPTER *a, void *addr, const dword* data, int dwords) { - volatile byte* Base = (volatile byte*)DIVA_OS_MEM_ATTACH_RAM((PISDN_ADAPTER)a->io); + volatile byte __iomem * Base = DIVA_OS_MEM_ATTACH_RAM((PISDN_ADAPTER)a->io); while (dwords--) { WRITE_DWORD((Base + (unsigned long)addr), *data); addr+=4; @@ -659,15 +655,15 @@ } void mem_out_buffer (ADAPTER *a, void *addr, void *buffer, word length) { - volatile byte* Base = (volatile byte*)DIVA_OS_MEM_ATTACH_RAM((PISDN_ADAPTER)a->io); - memcpy ((void *)(Base + (unsigned long)addr), buffer, length) ; + volatile byte __iomem * Base = DIVA_OS_MEM_ATTACH_RAM((PISDN_ADAPTER)a->io); + memcpy_toio((Base + (unsigned long)addr), buffer, length) ; DIVA_OS_MEM_DETACH_RAM((PISDN_ADAPTER)a->io, Base); } void mem_inc (ADAPTER *a, void *addr) { - volatile byte* Base = (volatile byte*)DIVA_OS_MEM_ATTACH_RAM((PISDN_ADAPTER)a->io); - byte x = *(Base + (unsigned long)addr); - *(Base + (unsigned long)addr) = x + 1 ; + volatile byte __iomem *Base = DIVA_OS_MEM_ATTACH_RAM((PISDN_ADAPTER)a->io); + byte x = READ_BYTE(Base + (unsigned long)addr); + WRITE_BYTE(Base + (unsigned long)addr, x + 1); DIVA_OS_MEM_DETACH_RAM((PISDN_ADAPTER)a->io, Base); } /*------------------------------------------------------------------*/ @@ -676,7 +672,7 @@ byte io_in(ADAPTER * a, void * adr) { byte val; - byte *Port = (byte*)DIVA_OS_MEM_ATTACH_PORT((PISDN_ADAPTER)a->io); + byte __iomem *Port = DIVA_OS_MEM_ATTACH_PORT((PISDN_ADAPTER)a->io); outppw(Port + 4, (word)(unsigned long)adr); val = inpp(Port); DIVA_OS_MEM_DETACH_PORT((PISDN_ADAPTER)a->io, Port); @@ -685,7 +681,7 @@ word io_inw(ADAPTER * a, void * adr) { word val; - byte *Port = (byte*)DIVA_OS_MEM_ATTACH_PORT((PISDN_ADAPTER)a->io); + byte __iomem *Port = DIVA_OS_MEM_ATTACH_PORT((PISDN_ADAPTER)a->io); outppw(Port + 4, (word)(unsigned long)adr); val = inppw(Port); DIVA_OS_MEM_DETACH_PORT((PISDN_ADAPTER)a->io, Port); @@ -693,7 +689,7 @@ } void io_in_buffer(ADAPTER * a, void * adr, void * buffer, word len) { - byte *Port = (byte*)DIVA_OS_MEM_ATTACH_PORT((PISDN_ADAPTER)a->io); + byte __iomem *Port = DIVA_OS_MEM_ATTACH_PORT((PISDN_ADAPTER)a->io); byte* P = (byte*)buffer; if ((long)adr & 1) { outppw(Port+4, (word)(unsigned long)adr); @@ -712,7 +708,7 @@ } void io_look_ahead(ADAPTER * a, PBUFFER * RBuffer, ENTITY * e) { - byte *Port = (byte*)DIVA_OS_MEM_ATTACH_PORT((PISDN_ADAPTER)a->io); + byte __iomem *Port = DIVA_OS_MEM_ATTACH_PORT((PISDN_ADAPTER)a->io); outppw(Port+4, (word)(unsigned long)RBuffer); ((PISDN_ADAPTER)a->io)->RBuffer.length = inppw(Port); inppw_buffer (Port, ((PISDN_ADAPTER)a->io)->RBuffer.P, ((PISDN_ADAPTER)a->io)->RBuffer.length + 1); @@ -721,21 +717,21 @@ } void io_out(ADAPTER * a, void * adr, byte data) { - byte *Port = (byte*)DIVA_OS_MEM_ATTACH_PORT((PISDN_ADAPTER)a->io); + byte __iomem *Port = DIVA_OS_MEM_ATTACH_PORT((PISDN_ADAPTER)a->io); outppw(Port+4, (word)(unsigned long)adr); outpp(Port, data); DIVA_OS_MEM_DETACH_PORT((PISDN_ADAPTER)a->io, Port); } void io_outw(ADAPTER * a, void * adr, word data) { - byte *Port = (byte*)DIVA_OS_MEM_ATTACH_PORT((PISDN_ADAPTER)a->io); + byte __iomem *Port = DIVA_OS_MEM_ATTACH_PORT((PISDN_ADAPTER)a->io); outppw(Port+4, (word)(unsigned long)adr); outppw(Port, data); DIVA_OS_MEM_DETACH_PORT((PISDN_ADAPTER)a->io, Port); } void io_out_buffer(ADAPTER * a, void * adr, void * buffer, word len) { - byte *Port = (byte*)DIVA_OS_MEM_ATTACH_PORT((PISDN_ADAPTER)a->io); + byte __iomem *Port = DIVA_OS_MEM_ATTACH_PORT((PISDN_ADAPTER)a->io); byte* P = (byte*)buffer; if ((long)adr & 1) { outppw(Port+4, (word)(unsigned long)adr); @@ -755,7 +751,7 @@ void io_inc(ADAPTER * a, void * adr) { byte x; - byte *Port = (byte*)DIVA_OS_MEM_ATTACH_PORT((PISDN_ADAPTER)a->io); + byte __iomem *Port = DIVA_OS_MEM_ATTACH_PORT((PISDN_ADAPTER)a->io); outppw(Port+4, (word)(unsigned long)adr); x = inpp(Port); outppw(Port+4, (word)(unsigned long)adr); @@ -865,7 +861,7 @@ /* -------------------------------------------------------------------------- routines for aligned reading and writing on RISC -------------------------------------------------------------------------- */ -void outp_words_from_buffer (word* adr, byte* P, dword len) +void outp_words_from_buffer (word __iomem * adr, byte* P, dword len) { dword i = 0; word w; @@ -875,7 +871,7 @@ outppw (adr, w); } } -void inp_words_to_buffer (word* adr, byte* P, dword len) +void inp_words_to_buffer (word __iomem * adr, byte* P, dword len) { dword i = 0; word w; diff -Nru a/drivers/isdn/hardware/eicon/io.h b/drivers/isdn/hardware/eicon/io.h --- a/drivers/isdn/hardware/eicon/io.h 2004-11-29 21:22:08 -08:00 +++ b/drivers/isdn/hardware/eicon/io.h 2004-11-29 21:22:08 -08:00 @@ -97,15 +97,15 @@ dword downloadAddrTable[4] ; /* add. for MultiMaster */ dword MemoryBase ; dword MemorySize ; - byte *Address ; - byte *Config ; - byte *Control ; - byte *reset ; - byte *port ; - byte *ram ; - byte *cfg ; - byte *prom ; - byte *ctlReg ; + byte __iomem *Address ; + byte __iomem *Config ; + byte __iomem *Control ; + byte __iomem *reset ; + byte __iomem *port ; + byte __iomem *ram ; + byte __iomem *cfg ; + byte __iomem *prom ; + byte __iomem *ctlReg ; struct pc_maint *pcm ; diva_os_dependent_devica_name_t os_name; byte Name[32] ; @@ -254,8 +254,8 @@ /* --------------------------------------------------------------------- Functions for port io --------------------------------------------------------------------- */ -void outp_words_from_buffer (word* adr, byte* P, dword len); -void inp_words_to_buffer (word* adr, byte* P, dword len); +void outp_words_from_buffer (word __iomem * adr, byte* P, dword len); +void inp_words_to_buffer (word __iomem * adr, byte* P, dword len); /* --------------------------------------------------------------------- platform specific conversions --------------------------------------------------------------------- */ @@ -307,7 +307,7 @@ word cnt ; word out ; } Xdesc ; -extern void dump_trap_frame (PISDN_ADAPTER IoAdapter, byte *exception) ; +extern void dump_trap_frame (PISDN_ADAPTER IoAdapter, byte __iomem *exception) ; extern void dump_xlog_buffer (PISDN_ADAPTER IoAdapter, Xdesc *xlogDesc) ; /* --------------------------------------------------------------------- */ #endif /* } __DIVA_XDI_COMMON_IO_H_INC__ */ diff -Nru a/drivers/isdn/hardware/eicon/maintidi.c b/drivers/isdn/hardware/eicon/maintidi.c --- a/drivers/isdn/hardware/eicon/maintidi.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/isdn/hardware/eicon/maintidi.c 2004-11-29 21:22:06 -08:00 @@ -1919,11 +1919,11 @@ break; case 2: - value = (short)READ_WORD(ptr); + value = (short)GET_WORD(ptr); break; case 4: - value = (int)READ_DWORD(ptr); + value = (int)GET_DWORD(ptr); break; default: @@ -1947,16 +1947,16 @@ break; case 2: - value = (word)READ_WORD(ptr); + value = (word)GET_WORD(ptr); break; case 3: - value = (dword)READ_DWORD(ptr); + value = (dword)GET_DWORD(ptr); value &= 0x00ffffff; break; case 4: - value = (dword)READ_DWORD(ptr); + value = (dword)GET_DWORD(ptr); break; default: diff -Nru a/drivers/isdn/hardware/eicon/message.c b/drivers/isdn/hardware/eicon/message.c --- a/drivers/isdn/hardware/eicon/message.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/isdn/hardware/eicon/message.c 2004-11-29 21:22:07 -08:00 @@ -419,7 +419,7 @@ { dbug(1,dprintf("plci=%x",msg->header.plci)); plci = &a->plci[msg->header.plci-1]; - ncci = READ_WORD(&msg->header.ncci); + ncci = GET_WORD(&msg->header.ncci); if (plci->Id && (plci->appl || (plci->State == INC_CON_PENDING) @@ -574,7 +574,7 @@ } - c = ftable[i].function(READ_DWORD(&msg->header.controller), + c = ftable[i].function(GET_DWORD(&msg->header.controller), msg->header.number, a, plci, @@ -1264,7 +1264,7 @@ ch = 0; if(ai_parms[0].length) { - ch = READ_WORD(ai_parms[0].info+1); + ch = GET_WORD(ai_parms[0].info+1); if(ch>4) ch=0; /* safety -> ignore ChannelID */ if(ch==4) /* explizit CHI in message */ { @@ -1289,7 +1289,7 @@ if(ch==3 && ai_parms[0].length>=7 && ai_parms[0].length<=36) { - dir = READ_WORD(ai_parms[0].info+3); + dir = GET_WORD(ai_parms[0].info+3); ch_mask = 0; m = 0x3f; for(i=0; i+5<=ai_parms[0].length; i++) @@ -1348,15 +1348,15 @@ add_s(plci,BC,&parms[6]); add_s(plci,LLC,&parms[7]); add_s(plci,HLC,&parms[8]); - CIP = READ_WORD(parms[0].info); + CIP = GET_WORD(parms[0].info); if (a->Info_Mask[appl->Id-1] & 0x200) { /* early B3 connect (CIP mask bit 9) no release after a disc */ add_p(plci,LLI,"\x01\x01"); } - if(READ_WORD(parms[0].info)<29) { - add_p(plci,BC,cip_bc[READ_WORD(parms[0].info)][a->u_law]); - add_p(plci,HLC,cip_hlc[READ_WORD(parms[0].info)]); + if(GET_WORD(parms[0].info)<29) { + add_p(plci,BC,cip_bc[GET_WORD(parms[0].info)][a->u_law]); + add_p(plci,HLC,cip_hlc[GET_WORD(parms[0].info)]); } add_p(plci,UID,"\x06\x43\x61\x70\x69\x32\x30"); sig_req(plci,ASSIGN,DSIG_ID); @@ -1442,11 +1442,11 @@ { if(!api_parse(&ai->info[1],(word)ai->length,"ssss",ai_parms)) { - dbug(1,dprintf("ai_parms[0].length=%d/0x%x",ai_parms[0].length,READ_WORD(ai_parms[0].info+1))); + dbug(1,dprintf("ai_parms[0].length=%d/0x%x",ai_parms[0].length,GET_WORD(ai_parms[0].info+1))); ch = 0; if(ai_parms[0].length) { - ch = READ_WORD(ai_parms[0].info+1); + ch = GET_WORD(ai_parms[0].info+1); dbug(1,dprintf("BCH-I=0x%x",ch)); } } @@ -1470,7 +1470,7 @@ else if(plci->State==INC_CON_PENDING || plci->State==INC_CON_ALERT) { clear_c_ind_mask_bit (plci, (word)(appl->Id-1)); dump_c_ind_mask (plci); - Reject = READ_WORD(parms[0].info); + Reject = GET_WORD(parms[0].info); dbug(1,dprintf("Reject=0x%x",Reject)); if(Reject) { @@ -1672,15 +1672,15 @@ Info = _WRONG_IDENTIFIER; if(a) { Info = 0; - a->Info_Mask[appl->Id-1] = READ_DWORD(parms[0].info); - a->CIP_Mask[appl->Id-1] = READ_DWORD(parms[1].info); - dbug(1,dprintf("CIP_MASK=0x%lx",READ_DWORD(parms[1].info))); + a->Info_Mask[appl->Id-1] = GET_DWORD(parms[0].info); + a->CIP_Mask[appl->Id-1] = GET_DWORD(parms[1].info); + dbug(1,dprintf("CIP_MASK=0x%lx",GET_DWORD(parms[1].info))); if (a->Info_Mask[appl->Id-1] & 0x200){ /* early B3 connect provides */ a->Info_Mask[appl->Id-1] |= 0x10; /* call progression infos */ } /* check if external controller listen and switch listen on or off*/ - if(Id&EXT_CONTROLLER && READ_DWORD(parms[1].info)){ + if(Id&EXT_CONTROLLER && GET_DWORD(parms[1].info)){ if(a->profile.Global_Options & ON_BOARD_CODEC) { dummy_plci.State = IDLE; a->codec_listen[appl->Id-1] = &dummy_plci; @@ -1886,7 +1886,7 @@ Info = _WRONG_IDENTIFIER; } - selector = READ_WORD(msg[0].info); + selector = GET_WORD(msg[0].info); if(!Info) { @@ -1902,8 +1902,8 @@ Info = _WRONG_MESSAGE_FORMAT; break; } - SSreq = READ_WORD(&(msg[1].info[1])); - WRITE_WORD(&RCparms[1],SSreq); + SSreq = GET_WORD(&(msg[1].info[1])); + PUT_WORD(&RCparms[1],SSreq); SSparms = RCparms; switch(SSreq) { @@ -1919,7 +1919,7 @@ } else { - WRITE_DWORD(&SSstruct[6], MASK_TERMINAL_PORTABILITY); + PUT_DWORD(&SSstruct[6], MASK_TERMINAL_PORTABILITY); SSparms = (byte *)SSstruct; break; } @@ -1946,7 +1946,7 @@ Info = _WRONG_MESSAGE_FORMAT; break; } - a->Notification_Mask[appl->Id-1] = READ_DWORD(ss_parms[2].info); + a->Notification_Mask[appl->Id-1] = GET_DWORD(ss_parms[2].info); if(a->Notification_Mask[appl->Id-1] & SMASK_MWI) /* MWI active? */ { if((i=get_plci(a))) @@ -2096,7 +2096,7 @@ } if(plci && plci->State && ((plci->SuppState==IDLE)||(plci->SuppState==CALL_HELD))) { - d = READ_DWORD(ss_parms[2].info); + d = GET_DWORD(ss_parms[2].info); if(d>=0x80) { dbug(1,dprintf("format wrong")); @@ -2171,7 +2171,7 @@ Info = _WRONG_IDENTIFIER; break; } - relatedPLCIvalue = READ_DWORD(ss_parms[2].info); + relatedPLCIvalue = GET_DWORD(ss_parms[2].info); relatedPLCIvalue &= 0x0000FFFF; dbug(1,dprintf("PTY/ECT/addCONF,relPLCI=%lx",relatedPLCIvalue)); /* controller starts with 0 up to (max_adapter - 1) */ @@ -2294,7 +2294,7 @@ break; } /* reuse unused screening indicator */ - ss_parms[3].info[3] = (byte)READ_WORD(&(ss_parms[2].info[0])); + ss_parms[3].info[3] = (byte)GET_WORD(&(ss_parms[2].info[0])); plci->command = 0; plci->internal_command = CD_REQ_PEND; appl->CDEnable = TRUE; @@ -2334,10 +2334,10 @@ rplci->internal_command = CF_START_PEND; rplci->appl = appl; rplci->number = Number; - appl->S_Handle = READ_DWORD(&(ss_parms[2].info[0])); + appl->S_Handle = GET_DWORD(&(ss_parms[2].info[0])); cai[0] = 2; - cai[1] = 0x70|(byte)READ_WORD(&(ss_parms[3].info[0])); /* Function */ - cai[2] = (byte)READ_WORD(&(ss_parms[4].info[0])); /* Basic Service */ + cai[1] = 0x70|(byte)GET_WORD(&(ss_parms[3].info[0])); /* Function */ + cai[2] = (byte)GET_WORD(&(ss_parms[4].info[0])); /* Basic Service */ add_p(rplci,CAI,cai); add_p(rplci,OAD,ss_parms[5].info); add_p(rplci,CPN,ss_parms[6].info); @@ -2393,7 +2393,7 @@ switch(SSreq) { case S_INTERROGATE_DIVERSION: /* use cai with S_SERVICE below */ - cai[1] = 0x60|(byte)READ_WORD(&(ss_parms[3].info[0])); /* Function */ + cai[1] = 0x60|(byte)GET_WORD(&(ss_parms[3].info[0])); /* Function */ rplci->internal_command = INTERR_DIVERSION_REQ_PEND; /* move to rplci if assigned */ break; case S_INTERROGATE_NUMBERS: /* use cai with S_SERVICE below */ @@ -2402,7 +2402,7 @@ break; case S_CALL_FORWARDING_STOP: rplci->internal_command = CF_STOP_PEND; - cai[1] = 0x80|(byte)READ_WORD(&(ss_parms[3].info[0])); /* Function */ + cai[1] = 0x80|(byte)GET_WORD(&(ss_parms[3].info[0])); /* Function */ break; case S_CCBS_REQUEST: cai[1] = CCBS_REQUEST; @@ -2433,7 +2433,7 @@ break; } - appl->S_Handle = READ_DWORD(&(ss_parms[2].info[0])); + appl->S_Handle = GET_DWORD(&(ss_parms[2].info[0])); switch(SSreq) { case S_INTERROGATE_NUMBERS: @@ -2443,18 +2443,18 @@ case S_CCBS_REQUEST: case S_CCBS_DEACTIVATE: cai[0] = 3; - WRITE_WORD(&cai[2],READ_WORD(&(ss_parms[3].info[0]))); + PUT_WORD(&cai[2],GET_WORD(&(ss_parms[3].info[0]))); add_p(rplci,CAI,cai); break; case S_CCBS_INTERROGATE: cai[0] = 3; - WRITE_WORD(&cai[2],READ_WORD(&(ss_parms[3].info[0]))); + PUT_WORD(&cai[2],GET_WORD(&(ss_parms[3].info[0]))); add_p(rplci,CAI,cai); add_p(rplci,OAD,ss_parms[4].info); break; default: cai[0] = 2; - cai[2] = (byte)READ_WORD(&(ss_parms[4].info[0])); /* Basic Service */ + cai[2] = (byte)GET_WORD(&(ss_parms[4].info[0])); /* Basic Service */ add_p(rplci,CAI,cai); add_p(rplci,OAD,ss_parms[5].info); break; @@ -2503,11 +2503,11 @@ cai[0] = 13; cai[1] = ACTIVATION_MWI; /* Function */ - WRITE_WORD(&cai[2],READ_WORD(&(ss_parms[2].info[0]))); /* Basic Service */ - WRITE_DWORD(&cai[4],READ_DWORD(&(ss_parms[3].info[0]))); /* Number of Messages */ - WRITE_WORD(&cai[8],READ_WORD(&(ss_parms[4].info[0]))); /* Message Status */ - WRITE_WORD(&cai[10],READ_WORD(&(ss_parms[5].info[0]))); /* Message Reference */ - WRITE_WORD(&cai[12],READ_WORD(&(ss_parms[6].info[0]))); /* Invocation Mode */ + PUT_WORD(&cai[2],GET_WORD(&(ss_parms[2].info[0]))); /* Basic Service */ + PUT_DWORD(&cai[4],GET_DWORD(&(ss_parms[3].info[0]))); /* Number of Messages */ + PUT_WORD(&cai[8],GET_WORD(&(ss_parms[4].info[0]))); /* Message Status */ + PUT_WORD(&cai[10],GET_WORD(&(ss_parms[5].info[0]))); /* Message Reference */ + PUT_WORD(&cai[12],GET_WORD(&(ss_parms[6].info[0]))); /* Invocation Mode */ add_p(rplci,CAI,cai); add_p(rplci,CPN,ss_parms[7].info); /* Receiving User Number */ add_p(rplci,OAD,ss_parms[8].info); /* Controlling User Number */ @@ -2555,8 +2555,8 @@ cai[0] = 5; cai[1] = DEACTIVATION_MWI; /* Function */ - WRITE_WORD(&cai[2],READ_WORD(&(ss_parms[2].info[0]))); /* Basic Service */ - WRITE_WORD(&cai[4],READ_WORD(&(ss_parms[3].info[0]))); /* Invocation Mode */ + PUT_WORD(&cai[2],GET_WORD(&(ss_parms[2].info[0]))); /* Basic Service */ + PUT_WORD(&cai[4],GET_WORD(&(ss_parms[3].info[0]))); /* Invocation Mode */ add_p(rplci,CAI,cai); add_p(rplci,CPN,ss_parms[4].info); /* Receiving User Number */ add_p(rplci,OAD,ss_parms[5].info); /* Controlling User Number */ @@ -2684,8 +2684,8 @@ { if (plci->NL.Id && !plci->nl_remove_id) { - fax_control_bits = READ_WORD(&((T30_INFO *)plci->fax_connect_info_buffer)->control_bits_low); - fax_feature_bits = READ_WORD(&((T30_INFO *)plci->fax_connect_info_buffer)->feature_bits_low); + fax_control_bits = GET_WORD(&((T30_INFO *)plci->fax_connect_info_buffer)->control_bits_low); + fax_feature_bits = GET_WORD(&((T30_INFO *)plci->fax_connect_info_buffer)->feature_bits_low); if (!(fax_control_bits & T30_CONTROL_BIT_MORE_DOCUMENTS) || (fax_feature_bits & T30_FEATURE_BIT_MORE_DOCUMENTS)) { @@ -2693,7 +2693,7 @@ fax_info_change = FALSE; if (ncpi->length >= 4) { - w = READ_WORD(&ncpi->info[3]); + w = GET_WORD(&ncpi->info[3]); if ((w & 0x0001) != ((word)(((T30_INFO *)(plci->fax_connect_info_buffer))->resolution & 0x0001))) { ((T30_INFO *)(plci->fax_connect_info_buffer))->resolution = @@ -2711,7 +2711,7 @@ } if (ncpi->length >= 6) { - w = READ_WORD(&ncpi->info[5]); + w = GET_WORD(&ncpi->info[5]); if (((byte) w) != ((T30_INFO *)(plci->fax_connect_info_buffer))->data_format) { ((T30_INFO *)(plci->fax_connect_info_buffer))->data_format = (byte) w; @@ -2719,12 +2719,12 @@ } if ((a->man_profile.private_options & (1L << PRIVATE_FAX_SUB_SEP_PWD)) - && (READ_WORD(&ncpi->info[5]) & 0x8000)) /* Private SEP/SUB/PWD enable */ + && (GET_WORD(&ncpi->info[5]) & 0x8000)) /* Private SEP/SUB/PWD enable */ { plci->requested_options_conn |= (1L << PRIVATE_FAX_SUB_SEP_PWD); } if ((a->man_profile.private_options & (1L << PRIVATE_FAX_NONSTANDARD)) - && (READ_WORD(&ncpi->info[5]) & 0x4000)) /* Private non-standard facilities enable */ + && (GET_WORD(&ncpi->info[5]) & 0x4000)) /* Private non-standard facilities enable */ { plci->requested_options_conn |= (1L << PRIVATE_FAX_NONSTANDARD); } @@ -2775,7 +2775,7 @@ else { if ((fax_parms[7].length >= 3) && (fax_parms[7].info[1] >= 2)) - plci->nsf_control_bits = READ_WORD(&fax_parms[7].info[2]); + plci->nsf_control_bits = GET_WORD(&fax_parms[7].info[2]); plci->fax_connect_info_buffer[len++] = (byte)(fax_parms[7].length); for (i = 0; i < fax_parms[7].length; i++) plci->fax_connect_info_buffer[len++] = fax_parms[7].info[1+i]; @@ -2790,9 +2790,9 @@ fax_info_change = TRUE; } - if (fax_control_bits != READ_WORD(&((T30_INFO *)plci->fax_connect_info_buffer)->control_bits_low)) + if (fax_control_bits != GET_WORD(&((T30_INFO *)plci->fax_connect_info_buffer)->control_bits_low)) { - WRITE_WORD (&((T30_INFO *)plci->fax_connect_info_buffer)->control_bits_low, fax_control_bits); + PUT_WORD (&((T30_INFO *)plci->fax_connect_info_buffer)->control_bits_low, fax_control_bits); fax_info_change = TRUE; } } @@ -2865,7 +2865,7 @@ ncci = (word)(Id>>16); if(plci && ncci) { if(a->ncci_state[ncci]==INC_CON_PENDING) { - if (READ_WORD (&parms[0].info[0]) != 0) + if (GET_WORD (&parms[0].info[0]) != 0) { a->ncci_state[ncci] = OUTG_REJ_PENDING; channel_request_xon (plci, a->ncci_ch[ncci]); @@ -2907,7 +2907,7 @@ plci->fax_connect_info_buffer[len] = 0; len += 1 + plci->fax_connect_info_buffer[len]; if ((fax_parms[7].length >= 3) && (fax_parms[7].info[1] >= 2)) - plci->nsf_control_bits = READ_WORD(&fax_parms[7].info[2]); + plci->nsf_control_bits = GET_WORD(&fax_parms[7].info[2]); plci->fax_connect_info_buffer[len++] = (byte)(fax_parms[7].length); for (i = 0; i < fax_parms[7].length; i++) plci->fax_connect_info_buffer[len++] = fax_parms[7].info[1+i]; @@ -3129,9 +3129,9 @@ } else data->P = TransmitBufferSet(appl,*(dword *)parms[0].info); - data->Length = READ_WORD(parms[1].info); - data->Handle = READ_WORD(parms[2].info); - data->Flags = READ_WORD(parms[3].info); + data->Length = GET_WORD(parms[1].info); + data->Handle = GET_WORD(parms[2].info); + data->Flags = GET_WORD(parms[3].info); (ncci_ptr->data_pending)++; /* check for delivery confirmation */ @@ -3165,7 +3165,7 @@ _DATA_B3_R|CONFIRM, Id, Number, - "ww",READ_WORD(parms[2].info),Info); + "ww",GET_WORD(parms[2].info),Info); } return FALSE; } @@ -3180,7 +3180,7 @@ ncci = (word)(Id>>16); if(plci && ncci) { - n = READ_WORD(parms[0].info); + n = GET_WORD(parms[0].info); dbug(1,dprintf("free(%d)",n)); NCCIcode = ncci | (((word) a->Id) << 8); if(nMaxBuffer && @@ -3443,10 +3443,10 @@ dbug(1,dprintf("manufacturer_req")); for(i=0;i<5;i++) m_parms[i].length = 0; - if(READ_DWORD(parms[0].info)!=_DI_MANU_ID) { + if(GET_DWORD(parms[0].info)!=_DI_MANU_ID) { Info = _WRONG_MESSAGE_FORMAT; } - command = READ_WORD(parms[1].info); + command = GET_WORD(parms[1].info); m = &parms[2]; if (!Info) { @@ -3456,7 +3456,7 @@ Info = _WRONG_MESSAGE_FORMAT; break; } - codec = READ_WORD(m_parms[0].info); + codec = GET_WORD(m_parms[0].info); ch = m_parms[1].info[0]; dir = m_parms[2].info[0]; if((i=get_plci(a))) { @@ -3724,12 +3724,12 @@ Info = _WRONG_MESSAGE_FORMAT; break; } - if (READ_DWORD (m_parms[0].info) & ~a->man_profile.private_options) + if (GET_DWORD (m_parms[0].info) & ~a->man_profile.private_options) { Info = _FACILITY_NOT_SUPPORTED; break; } - a->requested_options_table[appl->Id-1] = READ_DWORD (m_parms[0].info); + a->requested_options_table[appl->Id-1] = GET_DWORD (m_parms[0].info); break; @@ -3764,11 +3764,11 @@ if ((msg[0].length == 0) || (msg[1].length == 0) - || (READ_DWORD(msg[0].info)!=_DI_MANU_ID)) + || (GET_DWORD(msg[0].info)!=_DI_MANU_ID)) { return FALSE; } - indication = READ_WORD(msg[1].info); + indication = GET_WORD(msg[1].info); switch (indication) { @@ -3806,7 +3806,7 @@ plci->fax_connect_info_buffer[len] = 0; len += 1 + plci->fax_connect_info_buffer[len]; if ((fax_parms[7].length >= 3) && (fax_parms[7].info[1] >= 2)) - plci->nsf_control_bits = READ_WORD(&fax_parms[7].info[2]); + plci->nsf_control_bits = GET_WORD(&fax_parms[7].info[2]); plci->fax_connect_info_buffer[len++] = (byte)(fax_parms[7].length); for (i = 0; i < fax_parms[7].length; i++) plci->fax_connect_info_buffer[len++] = fax_parms[7].info[1+i]; @@ -4290,7 +4290,7 @@ { break; } - WRITE_DWORD(&SSstruct[6], MASK_TERMINAL_PORTABILITY); + PUT_DWORD(&SSstruct[6], MASK_TERMINAL_PORTABILITY); sendf(appl, _FACILITY_R|CONFIRM, Id, Number, "wws",0,3,SSstruct); plci_remove(plci); break; @@ -4495,14 +4495,14 @@ dbug(1,dprintf("MWI_REQ not supported")); } /* 0x3010: Request not allowed in this state */ - WRITE_WORD(&SSparms[4],0x300E); /* SS not supported */ + PUT_WORD(&SSparms[4],0x300E); /* SS not supported */ } if(plci->internal_command==MWI_ACTIVATE_REQ_PEND) { - WRITE_WORD(&SSparms[1],S_MWI_ACTIVATE); + PUT_WORD(&SSparms[1],S_MWI_ACTIVATE); } - else WRITE_WORD(&SSparms[1],S_MWI_DEACTIVATE); + else PUT_WORD(&SSparms[1],S_MWI_DEACTIVATE); if(plci->cr_enquiry) { @@ -4875,7 +4875,7 @@ a = plci->adapter; Id = ((word)plci->Id<<8)|a->Id; - WRITE_WORD(&SS_Ind[4],0x0000); + PUT_WORD(&SS_Ind[4],0x0000); if (plci->sig_remove_id) { @@ -4987,21 +4987,21 @@ if (esc_profile[0]) { dbug (1, dprintf ("[%06x] CardProfile: %lx %lx %lx %lx %lx", - UnMapController (a->Id), READ_DWORD (&esc_profile[6]), - READ_DWORD (&esc_profile[10]), READ_DWORD (&esc_profile[14]), - READ_DWORD (&esc_profile[18]), READ_DWORD (&esc_profile[46]))); + UnMapController (a->Id), GET_DWORD (&esc_profile[6]), + GET_DWORD (&esc_profile[10]), GET_DWORD (&esc_profile[14]), + GET_DWORD (&esc_profile[18]), GET_DWORD (&esc_profile[46]))); a->profile.Global_Options &= 0x000000ffL; a->profile.B1_Protocols &= 0x000003ffL; a->profile.B2_Protocols &= 0x00001fdfL; a->profile.B3_Protocols &= 0x000000b7L; - a->profile.Global_Options &= READ_DWORD (&esc_profile[6]) | + a->profile.Global_Options &= GET_DWORD (&esc_profile[6]) | GL_BCHANNEL_OPERATION_SUPPORTED; - a->profile.B1_Protocols &= READ_DWORD (&esc_profile[10]); - a->profile.B2_Protocols &= READ_DWORD (&esc_profile[14]); - a->profile.B3_Protocols &= READ_DWORD (&esc_profile[18]); - a->manufacturer_features = READ_DWORD (&esc_profile[46]); + a->profile.B1_Protocols &= GET_DWORD (&esc_profile[10]); + a->profile.B2_Protocols &= GET_DWORD (&esc_profile[14]); + a->profile.B3_Protocols &= GET_DWORD (&esc_profile[18]); + a->manufacturer_features = GET_DWORD (&esc_profile[46]); a->man_profile.private_options = 0; if (a->manufacturer_features & MANUFACTURER_FEATURE_ECHO_CANCELLER) @@ -5013,8 +5013,8 @@ if (a->manufacturer_features & MANUFACTURER_FEATURE_RTP) a->man_profile.private_options |= 1L << PRIVATE_RTP; - a->man_profile.rtp_primary_payloads = READ_DWORD (&esc_profile[50]); - a->man_profile.rtp_additional_payloads = READ_DWORD (&esc_profile[54]); + a->man_profile.rtp_primary_payloads = GET_DWORD (&esc_profile[50]); + a->man_profile.rtp_additional_payloads = GET_DWORD (&esc_profile[54]); if (a->manufacturer_features & MANUFACTURER_FEATURE_T38) @@ -5099,14 +5099,14 @@ if(!plci->appl) break; if(pty_cai[0]==4) { - WRITE_DWORD(&CF_Ind[6],READ_DWORD(&pty_cai[1]) ); + PUT_DWORD(&CF_Ind[6],GET_DWORD(&pty_cai[1]) ); } else { - WRITE_DWORD(&CF_Ind[6],MASK_TERMINAL_PORTABILITY | MASK_HOLD_RETRIEVE); + PUT_DWORD(&CF_Ind[6],MASK_TERMINAL_PORTABILITY | MASK_HOLD_RETRIEVE); } - WRITE_WORD (&CF_Ind[1], 0); - WRITE_WORD (&CF_Ind[4], 0); + PUT_WORD (&CF_Ind[1], 0); + PUT_WORD (&CF_Ind[4], 0); sendf(plci->appl,_FACILITY_R|CONFIRM,Id&0x7,plci->number, "wws",0,3,CF_Ind); plci_remove(plci); break; @@ -5126,7 +5126,7 @@ if(tplci->tel) rId|=EXT_CONTROLLER; if(pty_cai[5]==ECT_EXECUTE) { - WRITE_WORD(&SS_Ind[1],S_ECT); + PUT_WORD(&SS_Ind[1],S_ECT); plci->vswitchstate=0; plci->relatedPTYPLCI->vswitchstate=0; @@ -5134,15 +5134,15 @@ } else { - WRITE_WORD(&SS_Ind[1],pty_cai[5]+3); + PUT_WORD(&SS_Ind[1],pty_cai[5]+3); } if(pty_cai[2]!=0xff) { - WRITE_WORD(&SS_Ind[4],0x3600|(word)pty_cai[2]); + PUT_WORD(&SS_Ind[4],0x3600|(word)pty_cai[2]); } else { - WRITE_WORD(&SS_Ind[4],0x300E); + PUT_WORD(&SS_Ind[4],0x300E); } plci->relatedPTYPLCI = NULL; plci->ptyState = 0; @@ -5152,13 +5152,13 @@ case CALL_DEFLECTION: if(pty_cai[2]!=0xff) { - WRITE_WORD(&SS_Ind[4],0x3600|(word)pty_cai[2]); + PUT_WORD(&SS_Ind[4],0x3600|(word)pty_cai[2]); } else { - WRITE_WORD(&SS_Ind[4],0x300E); + PUT_WORD(&SS_Ind[4],0x300E); } - WRITE_WORD(&SS_Ind[1],pty_cai[5]); + PUT_WORD(&SS_Ind[1],pty_cai[5]); for(i=0; iappl) break; if(pty_cai[2]!=0xff) { - WRITE_WORD(&Interr_Err_Ind[4],0x3600|(word)pty_cai[2]); + PUT_WORD(&Interr_Err_Ind[4],0x3600|(word)pty_cai[2]); } else { - WRITE_WORD(&Interr_Err_Ind[4],0x300E); + PUT_WORD(&Interr_Err_Ind[4],0x300E); } switch (pty_cai[5]) { @@ -5193,13 +5193,13 @@ dbug(1,dprintf("Deact_Div")); Interr_Err_Ind[0]=0x9; Interr_Err_Ind[3]=0x6; - WRITE_WORD(&Interr_Err_Ind[1],S_CALL_FORWARDING_STOP); + PUT_WORD(&Interr_Err_Ind[1],S_CALL_FORWARDING_STOP); break; case ACTIVATION_DIVERSION: dbug(1,dprintf("Act_Div")); Interr_Err_Ind[0]=0x9; Interr_Err_Ind[3]=0x6; - WRITE_WORD(&Interr_Err_Ind[1],S_CALL_FORWARDING_START); + PUT_WORD(&Interr_Err_Ind[1],S_CALL_FORWARDING_START); break; case DIVERSION_INTERROGATE_CFU: case DIVERSION_INTERROGATE_CFB: @@ -5207,34 +5207,34 @@ dbug(1,dprintf("Interr_Div")); Interr_Err_Ind[0]=0xa; Interr_Err_Ind[3]=0x7; - WRITE_WORD(&Interr_Err_Ind[1],S_INTERROGATE_DIVERSION); + PUT_WORD(&Interr_Err_Ind[1],S_INTERROGATE_DIVERSION); break; case DIVERSION_INTERROGATE_NUM: dbug(1,dprintf("Interr_Num")); Interr_Err_Ind[0]=0xa; Interr_Err_Ind[3]=0x7; - WRITE_WORD(&Interr_Err_Ind[1],S_INTERROGATE_NUMBERS); + PUT_WORD(&Interr_Err_Ind[1],S_INTERROGATE_NUMBERS); break; case CCBS_REQUEST: dbug(1,dprintf("CCBS Request")); Interr_Err_Ind[0]=0xd; Interr_Err_Ind[3]=0xa; - WRITE_WORD(&Interr_Err_Ind[1],S_CCBS_REQUEST); + PUT_WORD(&Interr_Err_Ind[1],S_CCBS_REQUEST); break; case CCBS_DEACTIVATE: dbug(1,dprintf("CCBS Deactivate")); Interr_Err_Ind[0]=0x9; Interr_Err_Ind[3]=0x6; - WRITE_WORD(&Interr_Err_Ind[1],S_CCBS_DEACTIVATE); + PUT_WORD(&Interr_Err_Ind[1],S_CCBS_DEACTIVATE); break; case CCBS_INTERROGATE: dbug(1,dprintf("CCBS Interrogate")); Interr_Err_Ind[0]=0xb; Interr_Err_Ind[3]=0x8; - WRITE_WORD(&Interr_Err_Ind[1],S_CCBS_INTERROGATE); + PUT_WORD(&Interr_Err_Ind[1],S_CCBS_INTERROGATE); break; } - WRITE_DWORD(&Interr_Err_Ind[6],plci->appl->S_Handle); + PUT_DWORD(&Interr_Err_Ind[6],plci->appl->S_Handle); sendf(plci->appl,_FACILITY_I,Id&0x7,0,"ws",3, Interr_Err_Ind); plci_remove(plci); break; @@ -5242,17 +5242,17 @@ case DEACTIVATION_MWI: if(pty_cai[5]==ACTIVATION_MWI) { - WRITE_WORD(&SS_Ind[1],S_MWI_ACTIVATE); + PUT_WORD(&SS_Ind[1],S_MWI_ACTIVATE); } - else WRITE_WORD(&SS_Ind[1],S_MWI_DEACTIVATE); + else PUT_WORD(&SS_Ind[1],S_MWI_DEACTIVATE); if(pty_cai[2]!=0xff) { - WRITE_WORD(&SS_Ind[4],0x3600|(word)pty_cai[2]); + PUT_WORD(&SS_Ind[4],0x3600|(word)pty_cai[2]); } else { - WRITE_WORD(&SS_Ind[4],0x300E); + PUT_WORD(&SS_Ind[4],0x300E); } if(plci->cr_enquiry) @@ -5275,29 +5275,29 @@ switch(pty_cai[5]) { case CONF_BEGIN: - WRITE_WORD(&CONF_Ind[1],S_CONF_BEGIN); + PUT_WORD(&CONF_Ind[1],S_CONF_BEGIN); plci->ptyState = 0; break; case CONF_DROP: CONF_Ind[0]=5; CONF_Ind[3]=2; - WRITE_WORD(&CONF_Ind[1],S_CONF_DROP); + PUT_WORD(&CONF_Ind[1],S_CONF_DROP); plci->ptyState = CONNECTED; break; case CONF_ISOLATE: CONF_Ind[0]=5; CONF_Ind[3]=2; - WRITE_WORD(&CONF_Ind[1],S_CONF_ISOLATE); + PUT_WORD(&CONF_Ind[1],S_CONF_ISOLATE); plci->ptyState = CONNECTED; break; case CONF_REATTACH: CONF_Ind[0]=5; CONF_Ind[3]=2; - WRITE_WORD(&CONF_Ind[1],S_CONF_REATTACH); + PUT_WORD(&CONF_Ind[1],S_CONF_REATTACH); plci->ptyState = CONNECTED; break; case CONF_ADD: - WRITE_WORD(&CONF_Ind[1],S_CONF_ADD); + PUT_WORD(&CONF_Ind[1],S_CONF_ADD); plci->relatedPTYPLCI = NULL; tplci=plci->relatedPTYPLCI; if(tplci) tplci->ptyState = CONNECTED; @@ -5307,15 +5307,15 @@ if(pty_cai[2]!=0xff) { - WRITE_WORD(&CONF_Ind[4],0x3600|(word)pty_cai[2]); + PUT_WORD(&CONF_Ind[4],0x3600|(word)pty_cai[2]); } else { - WRITE_WORD(&CONF_Ind[4],0x3303); /* Time-out: network did not respond + PUT_WORD(&CONF_Ind[4],0x3303); /* Time-out: network did not respond within the required time */ } - WRITE_DWORD(&CONF_Ind[6],0x0); + PUT_DWORD(&CONF_Ind[6],0x0); sendf(plci->appl,_FACILITY_I,Id,0,"ws",3, CONF_Ind); break; } @@ -5324,7 +5324,7 @@ /* Supplementary Service indicates success */ case S_SERVICE: dbug(1,dprintf("Service_Ind")); - WRITE_WORD (&CF_Ind[4], 0); + PUT_WORD (&CF_Ind[4], 0); switch (pty_cai[5]) { case THREE_PTY_END: @@ -5336,7 +5336,7 @@ if(tplci->tel) rId|=EXT_CONTROLLER; if(pty_cai[5]==ECT_EXECUTE) { - WRITE_WORD(&SS_Ind[1],S_ECT); + PUT_WORD(&SS_Ind[1],S_ECT); if(plci->vswitchstate!=3) { @@ -5369,13 +5369,13 @@ dbug(1,dprintf("3PTY OFF")); break; } - WRITE_WORD(&SS_Ind[1],pty_cai[5]+3); + PUT_WORD(&SS_Ind[1],pty_cai[5]+3); sendf(tplci->appl,_FACILITY_I,rId,0,"ws",3, SS_Ind); } break; case CALL_DEFLECTION: - WRITE_WORD(&SS_Ind[1],pty_cai[5]); + PUT_WORD(&SS_Ind[1],pty_cai[5]); for(i=0; iappl) break; - WRITE_WORD(&CF_Ind[1],pty_cai[5]+2); - WRITE_DWORD(&CF_Ind[6],plci->appl->S_Handle); + PUT_WORD(&CF_Ind[1],pty_cai[5]+2); + PUT_DWORD(&CF_Ind[6],plci->appl->S_Handle); sendf(plci->appl,_FACILITY_I,Id&0x7,0,"ws",3, CF_Ind); plci_remove(plci); break; @@ -5409,32 +5409,32 @@ case DIVERSION_INTERROGATE_CFB: case DIVERSION_INTERROGATE_CFNR: dbug(1,dprintf("Interr_Div")); - WRITE_WORD(&pty_cai[1],S_INTERROGATE_DIVERSION); + PUT_WORD(&pty_cai[1],S_INTERROGATE_DIVERSION); pty_cai[3]=pty_cai[0]-3; /* Supplementary Service-specific parameter len */ break; case DIVERSION_INTERROGATE_NUM: dbug(1,dprintf("Interr_Num")); - WRITE_WORD(&pty_cai[1],S_INTERROGATE_NUMBERS); + PUT_WORD(&pty_cai[1],S_INTERROGATE_NUMBERS); pty_cai[3]=pty_cai[0]-3; /* Supplementary Service-specific parameter len */ break; case CCBS_REQUEST: dbug(1,dprintf("CCBS Request")); - WRITE_WORD(&pty_cai[1],S_CCBS_REQUEST); + PUT_WORD(&pty_cai[1],S_CCBS_REQUEST); pty_cai[3]=pty_cai[0]-3; /* Supplementary Service-specific parameter len */ break; case CCBS_DEACTIVATE: dbug(1,dprintf("CCBS Deactivate")); - WRITE_WORD(&pty_cai[1],S_CCBS_DEACTIVATE); + PUT_WORD(&pty_cai[1],S_CCBS_DEACTIVATE); pty_cai[3]=pty_cai[0]-3; /* Supplementary Service-specific parameter len */ break; case CCBS_INTERROGATE: dbug(1,dprintf("CCBS Interrogate")); - WRITE_WORD(&pty_cai[1],S_CCBS_INTERROGATE); + PUT_WORD(&pty_cai[1],S_CCBS_INTERROGATE); pty_cai[3]=pty_cai[0]-3; /* Supplementary Service-specific parameter len */ break; } - WRITE_WORD(&pty_cai[4],0); /* Supplementary Service Reason */ - WRITE_DWORD(&pty_cai[6],plci->appl->S_Handle); + PUT_WORD(&pty_cai[4],0); /* Supplementary Service Reason */ + PUT_DWORD(&pty_cai[6],plci->appl->S_Handle); sendf(plci->appl,_FACILITY_I,Id&0x7,0,"wS",3, pty_cai); plci_remove(plci); break; @@ -5443,9 +5443,9 @@ case DEACTIVATION_MWI: if(pty_cai[5]==ACTIVATION_MWI) { - WRITE_WORD(&SS_Ind[1],S_MWI_ACTIVATE); + PUT_WORD(&SS_Ind[1],S_MWI_ACTIVATE); } - else WRITE_WORD(&SS_Ind[1],S_MWI_DEACTIVATE); + else PUT_WORD(&SS_Ind[1],S_MWI_DEACTIVATE); if(plci->cr_enquiry) { sendf(plci->appl,_FACILITY_I,Id&0xf,0,"ws",3, SS_Ind); @@ -5459,7 +5459,7 @@ case MWI_INDICATION: if(pty_cai[0]>=0x12) { - WRITE_WORD(&pty_cai[3],S_MWI_INDICATE); + PUT_WORD(&pty_cai[3],S_MWI_INDICATE); pty_cai[2]=pty_cai[0]-2; /* len Parameter */ pty_cai[5]=pty_cai[0]-5; /* Supplementary Service-specific parameter len */ if(plci->appl && (a->Notification_Mask[plci->appl->Id-1]&SMASK_MWI)) @@ -5516,45 +5516,45 @@ switch(pty_cai[5]) { case CONF_BEGIN: - WRITE_WORD(&CONF_Ind[1],S_CONF_BEGIN); + PUT_WORD(&CONF_Ind[1],S_CONF_BEGIN); if(pty_cai[0]==6) { d=pty_cai[6]; - WRITE_DWORD(&CONF_Ind[6],d); /* PartyID */ + PUT_DWORD(&CONF_Ind[6],d); /* PartyID */ } else { - WRITE_DWORD(&CONF_Ind[6],0x0); + PUT_DWORD(&CONF_Ind[6],0x0); } break; case CONF_ISOLATE: - WRITE_WORD(&CONF_Ind[1],S_CONF_ISOLATE); + PUT_WORD(&CONF_Ind[1],S_CONF_ISOLATE); CONF_Ind[0]=5; CONF_Ind[3]=2; break; case CONF_REATTACH: - WRITE_WORD(&CONF_Ind[1],S_CONF_REATTACH); + PUT_WORD(&CONF_Ind[1],S_CONF_REATTACH); CONF_Ind[0]=5; CONF_Ind[3]=2; break; case CONF_DROP: - WRITE_WORD(&CONF_Ind[1],S_CONF_DROP); + PUT_WORD(&CONF_Ind[1],S_CONF_DROP); CONF_Ind[0]=5; CONF_Ind[3]=2; break; case CONF_ADD: - WRITE_WORD(&CONF_Ind[1],S_CONF_ADD); + PUT_WORD(&CONF_Ind[1],S_CONF_ADD); d=pty_cai[6]; - WRITE_DWORD(&CONF_Ind[6],d); /* PartyID */ + PUT_DWORD(&CONF_Ind[6],d); /* PartyID */ tplci=plci->relatedPTYPLCI; if(tplci) tplci->ptyState = CONNECTED; break; case CONF_PARTYDISC: CONF_Ind[0]=7; CONF_Ind[3]=4; - WRITE_WORD(&CONF_Ind[1],S_CONF_PARTYDISC); + PUT_WORD(&CONF_Ind[1],S_CONF_PARTYDISC); d=pty_cai[6]; - WRITE_DWORD(&CONF_Ind[4],d); /* PartyID */ + PUT_DWORD(&CONF_Ind[4],d); /* PartyID */ break; } plci->ptyState = CONNECTED; @@ -5568,13 +5568,13 @@ switch(pty_cai[5]) { case CCBS_INFO_RETAIN: - WRITE_WORD(&CONF_Ind[1],S_CCBS_INFO_RETAIN); + PUT_WORD(&CONF_Ind[1],S_CCBS_INFO_RETAIN); break; case CCBS_STOP_ALERTING: - WRITE_WORD(&CONF_Ind[1],S_CCBS_STOP_ALERTING); + PUT_WORD(&CONF_Ind[1],S_CCBS_STOP_ALERTING); break; case CCBS_ERASECALLLINKAGEID: - WRITE_WORD(&CONF_Ind[1],S_CCBS_ERASECALLLINKAGEID); + PUT_WORD(&CONF_Ind[1],S_CCBS_ERASECALLLINKAGEID); CONF_Ind[0]=7; CONF_Ind[3]=4; CONF_Ind[6]=0; @@ -5582,7 +5582,7 @@ break; } w=pty_cai[6]; - WRITE_WORD(&CONF_Ind[4],w); /* PartyID */ + PUT_WORD(&CONF_Ind[4],w); /* PartyID */ if(plci->appl && (a->Notification_Mask[plci->appl->Id-1]&SMASK_CCBS)) { @@ -5608,8 +5608,8 @@ { i = 0x3603; } - WRITE_WORD(&SS_Ind[1],S_HOLD); - WRITE_WORD(&SS_Ind[4],i); + PUT_WORD(&SS_Ind[1],S_HOLD); + PUT_WORD(&SS_Ind[4],i); if(plci->SuppState == HOLD_REQUEST) { plci->SuppState = IDLE; @@ -5637,8 +5637,8 @@ { i = 0x3603; } - WRITE_WORD(&SS_Ind[1],S_RETRIEVE); - WRITE_WORD(&SS_Ind[4],i); + PUT_WORD(&SS_Ind[1],S_RETRIEVE); + PUT_WORD(&SS_Ind[4],i); if(plci->SuppState == RETRIEVE_REQUEST) { plci->SuppState = CALL_HELD; @@ -5648,7 +5648,7 @@ break; case CALL_RETRIEVE_ACK: - WRITE_WORD(&SS_Ind[1],S_RETRIEVE); + PUT_WORD(&SS_Ind[1],S_RETRIEVE); if(plci->SuppState == RETRIEVE_REQUEST) { plci->SuppState = IDLE; @@ -5919,7 +5919,7 @@ a->AdvSignalPLCI = &a->plci[i-1]; tplci = a->AdvSignalPLCI; tplci->tel = ADV_VOICE; - WRITE_WORD(&voice_cai[5],a->AdvSignalAppl->MaxDataLength); + PUT_WORD(&voice_cai[5],a->AdvSignalAppl->MaxDataLength); if (a->Info_Mask[a->AdvSignalAppl->Id-1] & 0x200){ /* early B3 connect (CIP mask bit 9) no release after a disc */ add_p(tplci,LLI,"\x01\x01"); @@ -5985,7 +5985,7 @@ case RESUME: clear_c_ind_mask_bit (plci, (word)(plci->appl->Id-1)); - WRITE_WORD(&resume_cau[4],GOOD); + PUT_WORD(&resume_cau[4],GOOD); sendf(plci->appl,_FACILITY_I,Id,0,"ws", (word)3, resume_cau); break; @@ -6070,7 +6070,7 @@ { if(plci->State==RESUMING) { - WRITE_WORD(&resume_cau[4],i); + PUT_WORD(&resume_cau[4],i); sendf(plci->appl,_FACILITY_I,Id,0,"ws", (word)3, resume_cau); } plci->State = INC_DIS_PENDING; @@ -6624,10 +6624,10 @@ if ((*data == DSP_CONNECTED_NORM_V18) || (*data == DSP_CONNECTED_NORM_VOWN)) ncpi_state &= ~(NCPI_MDM_DCD_ON_RECEIVED | NCPI_MDM_CTS_ON_RECEIVED); data++; /* connected norm */ - conn_opt = READ_WORD(data); + conn_opt = GET_WORD(data); data += 2; /* connected options */ - WRITE_WORD (&(plci->ncpi_buffer[1]), (word)(READ_DWORD(data) & 0x0000FFFF)); + PUT_WORD (&(plci->ncpi_buffer[1]), (word)(GET_DWORD(data) & 0x0000FFFF)); if (conn_opt & DSP_CONNECTED_OPTION_MASK_V42) { @@ -6645,7 +6645,7 @@ { ncpi_opt |= MDM_NCPI_COMPRESSED; } - WRITE_WORD (&(plci->ncpi_buffer[3]), ncpi_opt); + PUT_WORD (&(plci->ncpi_buffer[3]), ncpi_opt); plci->ncpi_buffer[0] = 4; plci->ncpi_state |= NCPI_VALID_CONNECT_B3_IND | NCPI_VALID_CONNECT_B3_ACT | NCPI_VALID_DISC_B3_IND; @@ -6788,8 +6788,8 @@ { dbug(1,dprintf("FaxStatus %04x", ((T30_INFO *)plci->NL.RBuffer->P)->code)); len = 9; - WRITE_WORD(&(plci->ncpi_buffer[1]),((T30_INFO *)plci->NL.RBuffer->P)->rate_div_2400 * 2400); - fax_feature_bits = READ_WORD(&((T30_INFO *)plci->NL.RBuffer->P)->feature_bits_low); + PUT_WORD(&(plci->ncpi_buffer[1]),((T30_INFO *)plci->NL.RBuffer->P)->rate_div_2400 * 2400); + fax_feature_bits = GET_WORD(&((T30_INFO *)plci->NL.RBuffer->P)->feature_bits_low); i = (((T30_INFO *)plci->NL.RBuffer->P)->resolution & T30_RESOLUTION_R8_0770_OR_200) ? 0x0001 : 0x0000; if (plci->B3_prot == 5) { @@ -6805,8 +6805,8 @@ i |= 0x0002; /* Fax-polling indication */ } dbug(1,dprintf("FAX Options %04x %04x",fax_feature_bits,i)); - WRITE_WORD(&(plci->ncpi_buffer[3]),i); - WRITE_WORD(&(plci->ncpi_buffer[5]),((T30_INFO *)plci->NL.RBuffer->P)->data_format); + PUT_WORD(&(plci->ncpi_buffer[3]),i); + PUT_WORD(&(plci->ncpi_buffer[5]),((T30_INFO *)plci->NL.RBuffer->P)->data_format); plci->ncpi_buffer[7] = ((T30_INFO *)plci->NL.RBuffer->P)->pages_low; plci->ncpi_buffer[8] = ((T30_INFO *)plci->NL.RBuffer->P)->pages_high; plci->ncpi_buffer[len] = 0; @@ -6833,8 +6833,8 @@ } plci->ncpi_buffer[0] = len; - fax_feature_bits = READ_WORD(&((T30_INFO *)plci->NL.RBuffer->P)->feature_bits_low); - WRITE_WORD(&((T30_INFO *)plci->fax_connect_info_buffer)->feature_bits_low, fax_feature_bits); + fax_feature_bits = GET_WORD(&((T30_INFO *)plci->NL.RBuffer->P)->feature_bits_low); + PUT_WORD(&((T30_INFO *)plci->fax_connect_info_buffer)->feature_bits_low, fax_feature_bits); plci->ncpi_state |= NCPI_VALID_CONNECT_B3_IND; if (((plci->NL.Ind &0x0f) == N_CONNECT_ACK) @@ -6902,7 +6902,7 @@ { case EDATA_T30_DIS: if ((a->ncci_state[ncci] == OUTG_CON_PENDING) - && !(READ_WORD(&((T30_INFO *)plci->fax_connect_info_buffer)->control_bits_low) & T30_CONTROL_BIT_REQUEST_POLLING) + && !(GET_WORD(&((T30_INFO *)plci->fax_connect_info_buffer)->control_bits_low) & T30_CONTROL_BIT_REQUEST_POLLING) && (plci->ncpi_state & NCPI_VALID_CONNECT_B3_ACT) && !(plci->ncpi_state & NCPI_CONNECT_B3_ACT_SENT)) { @@ -7063,11 +7063,11 @@ { len = 9; i = ((T30_INFO *)plci->fax_connect_info_buffer)->rate_div_2400 * 2400; - WRITE_WORD (&plci->ncpi_buffer[1], i); - WRITE_WORD (&plci->ncpi_buffer[3], 0); + PUT_WORD (&plci->ncpi_buffer[1], i); + PUT_WORD (&plci->ncpi_buffer[3], 0); i = ((T30_INFO *)plci->fax_connect_info_buffer)->data_format; - WRITE_WORD (&plci->ncpi_buffer[5], i); - WRITE_WORD (&plci->ncpi_buffer[7], 0); + PUT_WORD (&plci->ncpi_buffer[5], i); + PUT_WORD (&plci->ncpi_buffer[7], 0); plci->ncpi_buffer[len] = 0; plci->ncpi_buffer[0] = len; if(plci->B3_prot == 4) @@ -7493,7 +7493,7 @@ plci->B1_resource = add_b1_facilities (plci, 9, (word)(b1_facilities | B1_FACILITY_VOICE)); adjust_b1_facilities (plci, plci->B1_resource, (word)(b1_facilities | B1_FACILITY_VOICE)); voice_cai[1] = plci->B1_resource; - WRITE_WORD (&voice_cai[5], plci->appl->MaxDataLength); + PUT_WORD (&voice_cai[5], plci->appl->MaxDataLength); add_p(plci, CAI, voice_cai); dbug(1,dprintf("Cai=1,0x%x (AdvVoice)",voice_cai[1])); return 0; @@ -7534,7 +7534,7 @@ { return _WRONG_MESSAGE_FORMAT; } - switch(READ_WORD(global_config[0].info)) + switch(GET_WORD(global_config[0].info)) { case 1: plci->call_dir = (plci->call_dir & ~CALL_DIR_ANSWER) | CALL_DIR_ORIGINATE; @@ -7547,7 +7547,7 @@ dbug(1,dprintf("call_dir=%04x", plci->call_dir)); - if ((READ_WORD(bp_parms[0].info) == B1_RTP) + if ((GET_WORD(bp_parms[0].info) == B1_RTP) && (plci->adapter->man_profile.private_options & (1L << PRIVATE_RTP))) { plci->B1_resource = add_b1_facilities (plci, 31, (word)(b1_facilities & ~B1_FACILITY_VOICE)); @@ -7556,7 +7556,7 @@ cai[2] = 0; cai[3] = 0; cai[4] = 0; - WRITE_WORD(&cai[5],plci->appl->MaxDataLength); + PUT_WORD(&cai[5],plci->appl->MaxDataLength); for (i = 0; i < bp_parms[3].length; i++) cai[7+i] = bp_parms[3].info[1+i]; cai[0] = 6 + bp_parms[3].length; @@ -7565,7 +7565,7 @@ } - if ((READ_WORD(bp_parms[0].info) == B1_PIAFS) + if ((GET_WORD(bp_parms[0].info) == B1_PIAFS) && (plci->adapter->man_profile.private_options & (1L << PRIVATE_PIAFS))) { plci->B1_resource = add_b1_facilities (plci, 35/* PIAFS HARDWARE FACILITY */, (word)(b1_facilities & ~B1_FACILITY_VOICE)); @@ -7574,31 +7574,31 @@ cai[2] = 0; cai[3] = 0; cai[4] = 0; - WRITE_WORD(&cai[5],plci->appl->MaxDataLength); + PUT_WORD(&cai[5],plci->appl->MaxDataLength); cai[0] = 6; add_p(plci, CAI, cai); return 0; } - if ((READ_WORD(bp_parms[0].info) >= 32) - || (!((1L << READ_WORD(bp_parms[0].info)) & plci->adapter->profile.B1_Protocols) - && ((READ_WORD(bp_parms[0].info) != 3) + if ((GET_WORD(bp_parms[0].info) >= 32) + || (!((1L << GET_WORD(bp_parms[0].info)) & plci->adapter->profile.B1_Protocols) + && ((GET_WORD(bp_parms[0].info) != 3) || !((1L << B1_HDLC) & plci->adapter->profile.B1_Protocols) - || ((bp_parms[3].length != 0) && (READ_WORD(&bp_parms[3].info[1]) != 0) && (READ_WORD(&bp_parms[3].info[1]) != 56000))))) + || ((bp_parms[3].length != 0) && (GET_WORD(&bp_parms[3].info[1]) != 0) && (GET_WORD(&bp_parms[3].info[1]) != 56000))))) { return _B1_NOT_SUPPORTED; } - plci->B1_resource = add_b1_facilities (plci, resource[READ_WORD(bp_parms[0].info)], + plci->B1_resource = add_b1_facilities (plci, resource[GET_WORD(bp_parms[0].info)], (word)(b1_facilities & ~B1_FACILITY_VOICE)); adjust_b1_facilities (plci, plci->B1_resource, (word)(b1_facilities & ~B1_FACILITY_VOICE)); cai[0] = 6; cai[1] = plci->B1_resource; for (i=2;i", READ_WORD(mdm_cfg[0].info))); + dbug(1,dprintf("MDM Max Bit Rate:<%d>", GET_WORD(mdm_cfg[0].info))); - WRITE_WORD (&cai[13], 0); /* Min Tx speed */ - WRITE_WORD (&cai[15], READ_WORD(mdm_cfg[0].info)); /* Max Tx speed */ - WRITE_WORD (&cai[17], 0); /* Min Rx speed */ - WRITE_WORD (&cai[19], READ_WORD(mdm_cfg[0].info)); /* Max Rx speed */ + PUT_WORD (&cai[13], 0); /* Min Tx speed */ + PUT_WORD (&cai[15], GET_WORD(mdm_cfg[0].info)); /* Max Tx speed */ + PUT_WORD (&cai[17], 0); /* Min Rx speed */ + PUT_WORD (&cai[19], GET_WORD(mdm_cfg[0].info)); /* Max Rx speed */ cai[3] = 0; /* Async framing parameters */ - switch (READ_WORD (mdm_cfg[2].info)) + switch (GET_WORD (mdm_cfg[2].info)) { /* Parity */ case 1: /* odd parity */ cai[3] |= (DSP_CAI_ASYNC_PARITY_ENABLE | DSP_CAI_ASYNC_PARITY_ODD); @@ -7636,7 +7636,7 @@ break; } - switch (READ_WORD (mdm_cfg[3].info)) + switch (GET_WORD (mdm_cfg[3].info)) { /* stop bits */ case 1: /* 2 stop bits */ cai[3] |= DSP_CAI_ASYNC_TWO_STOP_BITS; @@ -7648,7 +7648,7 @@ break; } - switch (READ_WORD (mdm_cfg[1].info)) + switch (GET_WORD (mdm_cfg[1].info)) { /* char length */ case 5: cai[3] |= DSP_CAI_ASYNC_CHAR_LENGTH_5; @@ -7680,40 +7680,40 @@ dbug(1, dprintf("MDM: Reverse direction")); } - if (READ_WORD (mdm_cfg[4].info) & MDM_CAPI_DISABLE_RETRAIN) + if (GET_WORD (mdm_cfg[4].info) & MDM_CAPI_DISABLE_RETRAIN) { cai[9] |= DSP_CAI_MODEM_DISABLE_RETRAIN; dbug(1, dprintf("MDM: Disable retrain")); } - if (READ_WORD (mdm_cfg[4].info) & MDM_CAPI_DISABLE_RING_TONE) + if (GET_WORD (mdm_cfg[4].info) & MDM_CAPI_DISABLE_RING_TONE) { cai[7] |= DSP_CAI_MODEM_DISABLE_CALLING_TONE | DSP_CAI_MODEM_DISABLE_ANSWER_TONE; dbug(1, dprintf("MDM: Disable ring tone")); } - if (READ_WORD (mdm_cfg[4].info) & MDM_CAPI_GUARD_1800) + if (GET_WORD (mdm_cfg[4].info) & MDM_CAPI_GUARD_1800) { cai[8] |= DSP_CAI_MODEM_GUARD_TONE_1800HZ; dbug(1, dprintf("MDM: 1800 guard tone")); } - else if (READ_WORD (mdm_cfg[4].info) & MDM_CAPI_GUARD_550 ) + else if (GET_WORD (mdm_cfg[4].info) & MDM_CAPI_GUARD_550 ) { cai[8] |= DSP_CAI_MODEM_GUARD_TONE_550HZ; dbug(1, dprintf("MDM: 550 guard tone")); } - if ((READ_WORD (mdm_cfg[5].info) & 0x00ff) == MDM_CAPI_NEG_V100) + if ((GET_WORD (mdm_cfg[5].info) & 0x00ff) == MDM_CAPI_NEG_V100) { cai[8] |= DSP_CAI_MODEM_NEGOTIATE_V100; dbug(1, dprintf("MDM: V100")); } - else if ((READ_WORD (mdm_cfg[5].info) & 0x00ff) == MDM_CAPI_NEG_MOD_CLASS) + else if ((GET_WORD (mdm_cfg[5].info) & 0x00ff) == MDM_CAPI_NEG_MOD_CLASS) { cai[8] |= DSP_CAI_MODEM_NEGOTIATE_IN_CLASS; dbug(1, dprintf("MDM: IN CLASS")); } - else if ((READ_WORD (mdm_cfg[5].info) & 0x00ff) == MDM_CAPI_NEG_DISABLED) + else if ((GET_WORD (mdm_cfg[5].info) & 0x00ff) == MDM_CAPI_NEG_DISABLED) { cai[8] |= DSP_CAI_MODEM_NEGOTIATE_DISABLED; dbug(1, dprintf("MDM: DISABLED")); @@ -7721,11 +7721,11 @@ cai[0] = 20; if ((plci->adapter->man_profile.private_options & (1L << PRIVATE_V18)) - && (READ_WORD(mdm_cfg[5].info) & 0x8000)) /* Private V.18 enable */ + && (GET_WORD(mdm_cfg[5].info) & 0x8000)) /* Private V.18 enable */ { plci->requested_options |= 1L << PRIVATE_V18; } - if (READ_WORD(mdm_cfg[5].info) & 0x4000) /* Private VOWN enable */ + if (GET_WORD(mdm_cfg[5].info) & 0x4000) /* Private VOWN enable */ plci->requested_options |= 1L << PRIVATE_VOWN; if ((plci->requested_options_conn | plci->requested_options | plci->adapter->requested_options_table[plci->appl->Id-1]) @@ -7736,19 +7736,19 @@ i = 27; if (mdm_cfg[6].length >= 4) { - d = READ_DWORD(&mdm_cfg[6].info[1]); + d = GET_DWORD(&mdm_cfg[6].info[1]); cai[7] |= (byte) d; /* line taking options */ cai[9] |= (byte)(d >> 8); /* modulation options */ cai[++i] = (byte)(d >> 16); /* vown modulation options */ cai[++i] = (byte)(d >> 24); if (mdm_cfg[6].length >= 8) { - d = READ_DWORD(&mdm_cfg[6].info[5]); + d = GET_DWORD(&mdm_cfg[6].info[5]); cai[10] |= (byte) d; /* disabled modulations mask */ cai[11] |= (byte)(d >> 8); if (mdm_cfg[6].length >= 12) { - d = READ_DWORD(&mdm_cfg[6].info[9]); + d = GET_DWORD(&mdm_cfg[6].info[9]); cai[12] = (byte) d; /* enabled modulations mask */ cai[++i] = (byte)(d >> 8); /* vown enabled modulations */ cai[++i] = (byte)(d >> 16); @@ -7756,31 +7756,31 @@ cai[++i] = 0; if (mdm_cfg[6].length >= 14) { - w = READ_WORD(&mdm_cfg[6].info[13]); + w = GET_WORD(&mdm_cfg[6].info[13]); if (w != 0) - WRITE_WORD(&cai[13], w); /* min tx speed */ + PUT_WORD(&cai[13], w); /* min tx speed */ if (mdm_cfg[6].length >= 16) { - w = READ_WORD(&mdm_cfg[6].info[15]); + w = GET_WORD(&mdm_cfg[6].info[15]); if (w != 0) - WRITE_WORD(&cai[15], w); /* max tx speed */ + PUT_WORD(&cai[15], w); /* max tx speed */ if (mdm_cfg[6].length >= 18) { - w = READ_WORD(&mdm_cfg[6].info[17]); + w = GET_WORD(&mdm_cfg[6].info[17]); if (w != 0) - WRITE_WORD(&cai[17], w); /* min rx speed */ + PUT_WORD(&cai[17], w); /* min rx speed */ if (mdm_cfg[6].length >= 20) { - w = READ_WORD(&mdm_cfg[6].info[19]); + w = GET_WORD(&mdm_cfg[6].info[19]); if (w != 0) - WRITE_WORD(&cai[19], w); /* max rx speed */ + PUT_WORD(&cai[19], w); /* max rx speed */ if (mdm_cfg[6].length >= 22) { - w = READ_WORD(&mdm_cfg[6].info[21]); + w = GET_WORD(&mdm_cfg[6].info[21]); cai[23] = (byte)(-((short) w)); /* transmit level */ if (mdm_cfg[6].length >= 24) { - w = READ_WORD(&mdm_cfg[6].info[23]); + w = GET_WORD(&mdm_cfg[6].info[23]); cai[22] |= (byte) w; /* info options mask */ cai[21] |= (byte)(w >> 8); /* disabled symbol rates */ } @@ -7813,21 +7813,21 @@ } } - if(READ_WORD(bp_parms[0].info)==2 || /* V.110 async */ - READ_WORD(bp_parms[0].info)==3 ) /* V.110 sync */ + if(GET_WORD(bp_parms[0].info)==2 || /* V.110 async */ + GET_WORD(bp_parms[0].info)==3 ) /* V.110 sync */ { if(bp_parms[3].length){ - dbug(1,dprintf("V.110,%d",READ_WORD(&bp_parms[3].info[1]))); - switch(READ_WORD(&bp_parms[3].info[1])){ /* Rate */ + dbug(1,dprintf("V.110,%d",GET_WORD(&bp_parms[3].info[1]))); + switch(GET_WORD(&bp_parms[3].info[1])){ /* Rate */ case 0: case 56000: - if(READ_WORD(bp_parms[0].info)==3){ /* V.110 sync 56k */ + if(GET_WORD(bp_parms[0].info)==3){ /* V.110 sync 56k */ dbug(1,dprintf("56k sync HSCX")); cai[1] = 8; cai[2] = 0; cai[3] = 0; } - else if(READ_WORD(bp_parms[0].info)==2){ + else if(GET_WORD(bp_parms[0].info)==2){ dbug(1,dprintf("56k async DSP")); cai[2] = 9; } @@ -7863,7 +7863,7 @@ { if (bp_parms[3].length >= 8) { - switch (READ_WORD (&bp_parms[3].info[3])) + switch (GET_WORD (&bp_parms[3].info[3])) { /* char length */ case 5: cai[3] |= DSP_CAI_ASYNC_CHAR_LENGTH_5; @@ -7875,7 +7875,7 @@ cai[3] |= DSP_CAI_ASYNC_CHAR_LENGTH_7; break; } - switch (READ_WORD (&bp_parms[3].info[5])) + switch (GET_WORD (&bp_parms[3].info[5])) { /* Parity */ case 1: /* odd parity */ cai[3] |= (DSP_CAI_ASYNC_PARITY_ENABLE | DSP_CAI_ASYNC_PARITY_ODD); @@ -7884,7 +7884,7 @@ cai[3] |= (DSP_CAI_ASYNC_PARITY_ENABLE | DSP_CAI_ASYNC_PARITY_EVEN); break; } - switch (READ_WORD (&bp_parms[3].info[7])) + switch (GET_WORD (&bp_parms[3].info[7])) { /* stop bits */ case 1: /* 2 stop bits */ cai[3] |= DSP_CAI_ASYNC_TWO_STOP_BITS; @@ -7893,7 +7893,7 @@ } } } - else if(cai[1]==8 || READ_WORD(bp_parms[0].info)==3 ){ + else if(cai[1]==8 || GET_WORD(bp_parms[0].info)==3 ){ dbug(1,dprintf("V.110 default 56k sync")); cai[1] = 8; cai[2] = 0; @@ -7904,7 +7904,7 @@ cai[2] = 5; } } - WRITE_WORD(&cai[5],plci->appl->MaxDataLength); + PUT_WORD(&cai[5],plci->appl->MaxDataLength); dbug(1,dprintf("CAI[%d]=%x,%x,%x,%x,%x,%x", cai[0], cai[1], cai[2], cai[3], cai[4], cai[5], cai[6])); /* HexDump ("CAI", sizeof(cai), &cai[0]); */ @@ -7987,7 +7987,7 @@ llc[2] = 4; add_p(plci, LLC, llc); dlc[0] = 2; - WRITE_WORD(&dlc[1],plci->appl->MaxDataLength); + PUT_WORD(&dlc[1],plci->appl->MaxDataLength); add_p(plci, DLC, dlc); return 0; } @@ -8002,7 +8002,7 @@ llc[2] = 4; add_p(plci, LLC, llc); dlc[0] = 2; - WRITE_WORD(&dlc[1],plci->appl->MaxDataLength); + PUT_WORD(&dlc[1],plci->appl->MaxDataLength); add_p(plci, DLC, dlc); return 0; } @@ -8026,25 +8026,25 @@ if(plci->tel==ADV_VOICE) /* transparent B on advanced voice */ { - if(READ_WORD(bp_parms[1].info)!=1 - || READ_WORD(bp_parms[2].info)!=0) return _B2_NOT_SUPPORTED; + if(GET_WORD(bp_parms[1].info)!=1 + || GET_WORD(bp_parms[2].info)!=0) return _B2_NOT_SUPPORTED; plci->adv_nl = TRUE; } else if(plci->tel) return _B2_NOT_SUPPORTED; - if ((READ_WORD(bp_parms[1].info) == B2_RTP) - && (READ_WORD(bp_parms[2].info) == B3_RTP) + if ((GET_WORD(bp_parms[1].info) == B2_RTP) + && (GET_WORD(bp_parms[2].info) == B3_RTP) && (plci->adapter->man_profile.private_options & (1L << PRIVATE_RTP))) { add_p(plci,LLI,lli); - plci->B2_prot = (byte) READ_WORD(bp_parms[1].info); - plci->B3_prot = (byte) READ_WORD(bp_parms[2].info); + plci->B2_prot = (byte) GET_WORD(bp_parms[1].info); + plci->B3_prot = (byte) GET_WORD(bp_parms[2].info); llc[1] = (plci->call_dir & (CALL_DIR_ORIGINATE | CALL_DIR_FORCE_OUTG_NL)) ? 14 : 13; llc[2] = 4; add_p(plci, LLC, llc); dlc[0] = 2; - WRITE_WORD(&dlc[1],plci->appl->MaxDataLength); + PUT_WORD(&dlc[1],plci->appl->MaxDataLength); dlc[3] = 3; /* Addr A */ dlc[4] = 1; /* Addr B */ dlc[5] = 7; /* modulo mode */ @@ -8064,31 +8064,31 @@ - if ((READ_WORD(bp_parms[1].info) >= 32) - || (!((1L << READ_WORD(bp_parms[1].info)) & plci->adapter->profile.B2_Protocols) - && ((READ_WORD(bp_parms[1].info) != B2_PIAFS) + if ((GET_WORD(bp_parms[1].info) >= 32) + || (!((1L << GET_WORD(bp_parms[1].info)) & plci->adapter->profile.B2_Protocols) + && ((GET_WORD(bp_parms[1].info) != B2_PIAFS) || !(plci->adapter->man_profile.private_options & (1L << PRIVATE_PIAFS))))) { return _B2_NOT_SUPPORTED; } - if ((READ_WORD(bp_parms[2].info) >= 32) - || !((1L << READ_WORD(bp_parms[2].info)) & plci->adapter->profile.B3_Protocols)) + if ((GET_WORD(bp_parms[2].info) >= 32) + || !((1L << GET_WORD(bp_parms[2].info)) & plci->adapter->profile.B3_Protocols)) { return _B3_NOT_SUPPORTED; } - if ((READ_WORD(bp_parms[1].info) != B2_SDLC) - && ((READ_WORD(bp_parms[0].info) == B1_MODEM_ALL_NEGOTIATE) - || (READ_WORD(bp_parms[0].info) == B1_MODEM_ASYNC) - || (READ_WORD(bp_parms[0].info) == B1_MODEM_SYNC_HDLC))) + if ((GET_WORD(bp_parms[1].info) != B2_SDLC) + && ((GET_WORD(bp_parms[0].info) == B1_MODEM_ALL_NEGOTIATE) + || (GET_WORD(bp_parms[0].info) == B1_MODEM_ASYNC) + || (GET_WORD(bp_parms[0].info) == B1_MODEM_SYNC_HDLC))) { return (add_modem_b23 (plci, bp_parms)); } add_p(plci,LLI,lli); - plci->B2_prot = (byte) READ_WORD(bp_parms[1].info); - plci->B3_prot = (byte) READ_WORD(bp_parms[2].info); + plci->B2_prot = (byte) GET_WORD(bp_parms[1].info); + plci->B3_prot = (byte) GET_WORD(bp_parms[2].info); if(plci->B2_prot==12) SAPI = 0; /* default SAPI D-channel */ if(bp_parms[6].length) @@ -8097,7 +8097,7 @@ { return _WRONG_MESSAGE_FORMAT; } - switch(READ_WORD(global_config[0].info)) + switch(GET_WORD(global_config[0].info)) { case 1: plci->call_dir = (plci->call_dir & ~CALL_DIR_ANSWER) | CALL_DIR_ORIGINATE; @@ -8116,15 +8116,15 @@ /* IMPLEMENT_PIAFS */ { llc[1] = (plci->call_dir & (CALL_DIR_ORIGINATE | CALL_DIR_FORCE_OUTG_NL)) ? - llc2_out[READ_WORD(bp_parms[1].info)] : llc2_in[READ_WORD(bp_parms[1].info)]; + llc2_out[GET_WORD(bp_parms[1].info)] : llc2_in[GET_WORD(bp_parms[1].info)]; } - llc[2] = llc3[READ_WORD(bp_parms[2].info)]; + llc[2] = llc3[GET_WORD(bp_parms[2].info)]; add_p(plci, LLC, llc); dlc[0] = 2; - WRITE_WORD(&dlc[1], plci->appl->MaxDataLength + - header[READ_WORD(bp_parms[2].info)]); + PUT_WORD(&dlc[1], plci->appl->MaxDataLength + + header[GET_WORD(bp_parms[2].info)]); b1_config = &bp_parms[3]; nlc[0] = 0; @@ -8138,7 +8138,7 @@ ((T30_INFO *)&nlc[1])->rate_div_2400 = 0xff; if(b1_config->length>=2) { - ((T30_INFO *)&nlc[1])->rate_div_2400 = (byte)(READ_WORD(&b1_config->info[1])/2400); + ((T30_INFO *)&nlc[1])->rate_div_2400 = (byte)(GET_WORD(&b1_config->info[1])/2400); } } b2_config = &bp_parms[4]; @@ -8153,7 +8153,7 @@ if(b2_config->length && api_parse(&b2_config->info[1], (word)b2_config->length, "bwww", b2_config_parms)) { return _WRONG_MESSAGE_FORMAT; } - WRITE_WORD(&dlc[1],plci->appl->MaxDataLength); + PUT_WORD(&dlc[1],plci->appl->MaxDataLength); dlc[3] = 0; /* Addr A */ dlc[4] = 0; /* Addr B */ dlc[5] = 0; /* modulo mode */ @@ -8200,7 +8200,7 @@ return _B_STACK_NOT_SUPPORTED; dlc[0] = 6; - WRITE_WORD (&dlc[1], READ_WORD (&dlc[1]) + 2); + PUT_WORD (&dlc[1], GET_WORD (&dlc[1]) + 2); dlc[3] = 0x08; dlc[4] = 0x01; dlc[5] = 127; @@ -8320,7 +8320,7 @@ } else { - WRITE_WORD(&dlc[7], (word)b2_config_parms[4].length); + PUT_WORD(&dlc[7], (word)b2_config_parms[4].length); for(i=0; iresolution = (byte)(((i & 0x0001) || - ((plci->B3_prot == 4) && (((byte)(READ_WORD((byte *)b3_config_parms[1].info))) != 5))) ? T30_RESOLUTION_R8_0770_OR_200 : 0); - ((T30_INFO *)&nlc[1])->data_format = (byte)(READ_WORD((byte *)b3_config_parms[1].info)); + ((plci->B3_prot == 4) && (((byte)(GET_WORD((byte *)b3_config_parms[1].info))) != 5))) ? T30_RESOLUTION_R8_0770_OR_200 : 0); + ((T30_INFO *)&nlc[1])->data_format = (byte)(GET_WORD((byte *)b3_config_parms[1].info)); fax_control_bits = T30_CONTROL_BIT_ALL_FEATURES; if ((((T30_INFO *)&nlc[1])->rate_div_2400 != 0) && (((T30_INFO *)&nlc[1])->rate_div_2400 <= 6)) fax_control_bits &= ~T30_CONTROL_BIT_ENABLE_V34FAX; @@ -8377,7 +8377,7 @@ ((T30_INFO *)&nlc[1])->resolution = ((T30_INFO *)plci->fax_connect_info_buffer)->resolution; ((T30_INFO *)&nlc[1])->data_format = ((T30_INFO *)plci->fax_connect_info_buffer)->data_format; ((T30_INFO *)&nlc[1])->recording_properties = ((T30_INFO *)plci->fax_connect_info_buffer)->recording_properties; - fax_control_bits |= READ_WORD(&((T30_INFO *)plci->fax_connect_info_buffer)->control_bits_low) & + fax_control_bits |= GET_WORD(&((T30_INFO *)plci->fax_connect_info_buffer)->control_bits_low) & (T30_CONTROL_BIT_REQUEST_POLLING | T30_CONTROL_BIT_MORE_DOCUMENTS); } } @@ -8435,12 +8435,12 @@ if(plci->B3_prot == 5) { if ((plci->adapter->man_profile.private_options & (1L << PRIVATE_FAX_SUB_SEP_PWD)) - && (READ_WORD((byte *)b3_config_parms[1].info) & 0x8000)) /* Private SUB/SEP/PWD enable */ + && (GET_WORD((byte *)b3_config_parms[1].info) & 0x8000)) /* Private SUB/SEP/PWD enable */ { plci->requested_options |= 1L << PRIVATE_FAX_SUB_SEP_PWD; } if ((plci->adapter->man_profile.private_options & (1L << PRIVATE_FAX_NONSTANDARD)) - && (READ_WORD((byte *)b3_config_parms[1].info) & 0x4000)) /* Private non-standard facilities enable */ + && (GET_WORD((byte *)b3_config_parms[1].info) & 0x4000)) /* Private non-standard facilities enable */ { plci->requested_options |= 1L << PRIVATE_FAX_NONSTANDARD; } @@ -8476,7 +8476,7 @@ if ((pos < plci->fax_connect_info_length) && (plci->fax_connect_info_buffer[pos] != 0)) { if ((plci->fax_connect_info_buffer[pos] >= 3) && (plci->fax_connect_info_buffer[pos+1] >= 2)) - plci->nsf_control_bits = READ_WORD(&plci->fax_connect_info_buffer[pos+2]); + plci->nsf_control_bits = GET_WORD(&plci->fax_connect_info_buffer[pos+2]); for (i = 1 + plci->fax_connect_info_buffer[pos]; i != 0; i--) nlc[++len] = plci->fax_connect_info_buffer[pos++]; } @@ -8490,7 +8490,7 @@ else { if ((b3_config_parms[4].length >= 3) && (b3_config_parms[4].info[1] >= 2)) - plci->nsf_control_bits = READ_WORD(&b3_config_parms[4].info[2]); + plci->nsf_control_bits = GET_WORD(&b3_config_parms[4].info[2]); nlc[++len] = (byte)(b3_config_parms[4].length); for (i = 0; i < b3_config_parms[4].length; i++) nlc[++len] = b3_config_parms[4].info[1+i]; @@ -8506,7 +8506,7 @@ } } - WRITE_WORD(&(((T30_INFO *)&nlc[1])->control_bits_low), fax_control_bits); + PUT_WORD(&(((T30_INFO *)&nlc[1])->control_bits_low), fax_control_bits); len = ((byte)(((T30_INFO *) 0)->station_id + 20)); for (i = 0; i < len; i++) plci->fax_connect_info_buffer[i] = nlc[1+i]; @@ -8522,10 +8522,10 @@ if(b3_config->length!=16) return _B3_PARM_NOT_SUPPORTED; for(i=0; i<12; i++) nlc[1+i] = b3_config->info[1+i]; - if(READ_WORD(&b3_config->info[13])!=8 && READ_WORD(&b3_config->info[13])!=128) + if(GET_WORD(&b3_config->info[13])!=8 && GET_WORD(&b3_config->info[13])!=128) return _B3_PARM_NOT_SUPPORTED; nlc[13] = b3_config->info[13]; - if(READ_WORD(&b3_config->info[15])>=nlc[13]) + if(GET_WORD(&b3_config->info[15])>=nlc[13]) return _B3_PARM_NOT_SUPPORTED; nlc[14] = b3_config->info[15]; } @@ -8566,23 +8566,23 @@ for(i=0;i<2;i++) mdm_config[i].length = 0; for(i=0;iB2_prot = (byte) READ_WORD(bp_parms[1].info); - plci->B3_prot = (byte) READ_WORD(bp_parms[2].info); + plci->B2_prot = (byte) GET_WORD(bp_parms[1].info); + plci->B3_prot = (byte) GET_WORD(bp_parms[2].info); - if ((READ_WORD(bp_parms[1].info) == B2_MODEM_EC_COMPRESSION) && bp_parms[4].length) + if ((GET_WORD(bp_parms[1].info) == B2_MODEM_EC_COMPRESSION) && bp_parms[4].length) { if (api_parse (&bp_parms[4].info[1], (word)bp_parms[4].length, "w", @@ -8590,7 +8590,7 @@ { return (_WRONG_MESSAGE_FORMAT); } - b2_config = READ_WORD(mdm_config[0].info); + b2_config = GET_WORD(mdm_config[0].info); } /* OK, L2 is modem */ @@ -8630,9 +8630,9 @@ add_p(plci, LLI, lli); add_p(plci, LLC, llc); i = 1; - WRITE_WORD (&dlc[i], plci->appl->MaxDataLength); + PUT_WORD (&dlc[i], plci->appl->MaxDataLength); i += 2; - if (READ_WORD(bp_parms[1].info) == B2_MODEM_EC_COMPRESSION) + if (GET_WORD(bp_parms[1].info) == B2_MODEM_EC_COMPRESSION) { if (bp_parms[4].length) { @@ -8702,7 +8702,7 @@ plci->req_in +=2; plci->RBuffer[plci->req_in++] = 0; } - WRITE_WORD(&plci->RBuffer[plci->req_in_start], plci->req_in-plci->req_in_start-2); + PUT_WORD(&plci->RBuffer[plci->req_in_start], plci->req_in-plci->req_in_start-2); plci->RBuffer[plci->req_in++] = Id; /* sig/nl flag */ plci->RBuffer[plci->req_in++] = req; /* request */ plci->RBuffer[plci->req_in++] = 0; /* channel */ @@ -8728,7 +8728,7 @@ plci->req_in +=2; plci->RBuffer[plci->req_in++] = 0; } - WRITE_WORD(&plci->RBuffer[plci->req_in_start], plci->req_in-plci->req_in_start-2); + PUT_WORD(&plci->RBuffer[plci->req_in_start], plci->req_in-plci->req_in_start-2); plci->RBuffer[plci->req_in++] = 1; /* sig/nl flag */ plci->RBuffer[plci->req_in++] = req; /* request */ plci->RBuffer[plci->req_in++] = plci->adapter->ncci_ch[ncci]; /* channel */ @@ -8751,7 +8751,7 @@ if(plci->nl_req || plci->sig_req) return; - l = READ_WORD(&plci->RBuffer[plci->req_out]); + l = GET_WORD(&plci->RBuffer[plci->req_out]); plci->req_out += 2; plci->XData[0].P = &plci->RBuffer[plci->req_out]; plci->req_out += l; @@ -9586,11 +9586,11 @@ min_digit_duration = (plci->dtmf_rec_pulse_ms == 0) ? 40 : plci->dtmf_rec_pulse_ms; min_gap_duration = (plci->dtmf_rec_pause_ms == 0) ? 40 : plci->dtmf_rec_pause_ms; plci->internal_req_buffer[0] = DTMF_UDATA_REQUEST_ENABLE_RECEIVER; - WRITE_WORD (&plci->internal_req_buffer[1], min_digit_duration); - WRITE_WORD (&plci->internal_req_buffer[3], min_gap_duration); + PUT_WORD (&plci->internal_req_buffer[1], min_digit_duration); + PUT_WORD (&plci->internal_req_buffer[3], min_gap_duration); plci->NData[0].PLength = 5; - WRITE_WORD (&plci->internal_req_buffer[5], INTERNAL_IND_BUFFER_SIZE); + PUT_WORD (&plci->internal_req_buffer[5], INTERNAL_IND_BUFFER_SIZE); plci->NData[0].PLength += 2; capidtmf_recv_enable (&(plci->capidtmf_state), min_digit_duration, min_gap_duration); @@ -9621,9 +9621,9 @@ plci->internal_req_buffer[0] = DTMF_UDATA_REQUEST_SEND_DIGITS; w = (plci->dtmf_send_pulse_ms == 0) ? 40 : plci->dtmf_send_pulse_ms; - WRITE_WORD (&plci->internal_req_buffer[1], w); + PUT_WORD (&plci->internal_req_buffer[1], w); w = (plci->dtmf_send_pause_ms == 0) ? 40 : plci->dtmf_send_pause_ms; - WRITE_WORD (&plci->internal_req_buffer[3], w); + PUT_WORD (&plci->internal_req_buffer[3], w); for (i = 0; i < digit_count; i++) { w = 0; @@ -9744,7 +9744,7 @@ Info = GOOD; result[0] = 2; - WRITE_WORD (&result[1], DTMF_SUCCESS); + PUT_WORD (&result[1], DTMF_SUCCESS); internal_command = plci->internal_command; plci->internal_command = 0; mask = 0x01; @@ -9915,7 +9915,7 @@ Info = GOOD; result[0] = 2; - WRITE_WORD (&result[1], DTMF_SUCCESS); + PUT_WORD (&result[1], DTMF_SUCCESS); if (!(a->profile.Global_Options & GL_DTMF_SUPPORTED)) { dbug (1, dprintf ("[%06lx] %s,%d: Facility not supported", @@ -9929,21 +9929,21 @@ Info = _WRONG_MESSAGE_FORMAT; } - else if ((READ_WORD (dtmf_parms[0].info) == DTMF_GET_SUPPORTED_DETECT_CODES) - || (READ_WORD (dtmf_parms[0].info) == DTMF_GET_SUPPORTED_SEND_CODES)) + else if ((GET_WORD (dtmf_parms[0].info) == DTMF_GET_SUPPORTED_DETECT_CODES) + || (GET_WORD (dtmf_parms[0].info) == DTMF_GET_SUPPORTED_SEND_CODES)) { if (!((a->requested_options_table[appl->Id-1]) & (1L << PRIVATE_DTMF_TONE))) { dbug (1, dprintf ("[%06lx] %s,%d: DTMF unknown request %04x", - UnMapId (Id), (char *)(FILE_), __LINE__, READ_WORD (dtmf_parms[0].info))); - WRITE_WORD (&result[1], DTMF_UNKNOWN_REQUEST); + UnMapId (Id), (char *)(FILE_), __LINE__, GET_WORD (dtmf_parms[0].info))); + PUT_WORD (&result[1], DTMF_UNKNOWN_REQUEST); } else { for (i = 0; i < 32; i++) result[4 + i] = 0; - if (READ_WORD (dtmf_parms[0].info) == DTMF_GET_SUPPORTED_DETECT_CODES) + if (GET_WORD (dtmf_parms[0].info) == DTMF_GET_SUPPORTED_DETECT_CODES) { for (i = 0; i < DTMF_DIGIT_MAP_ENTRIES; i++) { @@ -9982,7 +9982,7 @@ else { plci->command = 0; - plci->dtmf_cmd = READ_WORD (dtmf_parms[0].info); + plci->dtmf_cmd = GET_WORD (dtmf_parms[0].info); mask = 0x01; switch (plci->dtmf_cmd) { @@ -9997,8 +9997,8 @@ & (1L << PRIVATE_DTMF_TONE))) { dbug (1, dprintf ("[%06lx] %s,%d: DTMF unknown request %04x", - UnMapId (Id), (char *)(FILE_), __LINE__, READ_WORD (dtmf_parms[0].info))); - WRITE_WORD (&result[1], DTMF_UNKNOWN_REQUEST); + UnMapId (Id), (char *)(FILE_), __LINE__, GET_WORD (dtmf_parms[0].info))); + PUT_WORD (&result[1], DTMF_UNKNOWN_REQUEST); break; } @@ -10021,8 +10021,8 @@ } else { - plci->dtmf_rec_pulse_ms = READ_WORD (dtmf_parms[1].info); - plci->dtmf_rec_pause_ms = READ_WORD (dtmf_parms[2].info); + plci->dtmf_rec_pulse_ms = GET_WORD (dtmf_parms[1].info); + plci->dtmf_rec_pause_ms = GET_WORD (dtmf_parms[2].info); } } start_internal_command (Id, plci, dtmf_command); @@ -10037,8 +10037,8 @@ & (1L << PRIVATE_DTMF_TONE))) { dbug (1, dprintf ("[%06lx] %s,%d: DTMF unknown request %04x", - UnMapId (Id), (char *)(FILE_), __LINE__, READ_WORD (dtmf_parms[0].info))); - WRITE_WORD (&result[1], DTMF_UNKNOWN_REQUEST); + UnMapId (Id), (char *)(FILE_), __LINE__, GET_WORD (dtmf_parms[0].info))); + PUT_WORD (&result[1], DTMF_UNKNOWN_REQUEST); break; } @@ -10052,8 +10052,8 @@ } if (mask & DTMF_LISTEN_ACTIVE_FLAG) { - plci->dtmf_send_pulse_ms = READ_WORD (dtmf_parms[1].info); - plci->dtmf_send_pause_ms = READ_WORD (dtmf_parms[2].info); + plci->dtmf_send_pulse_ms = GET_WORD (dtmf_parms[1].info); + plci->dtmf_send_pause_ms = GET_WORD (dtmf_parms[2].info); } i = 0; j = 0; @@ -10072,7 +10072,7 @@ { dbug (1, dprintf ("[%06lx] %s,%d: Incorrect DTMF digit %02x", UnMapId (Id), (char *)(FILE_), __LINE__, dtmf_parms[3].info[i])); - WRITE_WORD (&result[1], DTMF_INCORRECT_DIGIT); + PUT_WORD (&result[1], DTMF_INCORRECT_DIGIT); break; } if (plci->dtmf_send_requests >= @@ -10090,7 +10090,7 @@ default: dbug (1, dprintf ("[%06lx] %s,%d: DTMF unknown request %04x", UnMapId (Id), (char *)(FILE_), __LINE__, plci->dtmf_cmd)); - WRITE_WORD (&result[1], DTMF_UNKNOWN_REQUEST); + PUT_WORD (&result[1], DTMF_UNKNOWN_REQUEST); } } } @@ -10111,7 +10111,7 @@ Info = GOOD; result[0] = 2; - WRITE_WORD (&result[1], DTMF_SUCCESS); + PUT_WORD (&result[1], DTMF_SUCCESS); if (plci->dtmf_send_requests != 0) { sendf (plci->appl, _FACILITY_R | CONFIRM, Id & 0xffffL, plci->dtmf_msg_number_queue[0], @@ -11075,7 +11075,7 @@ if ((plci->tel == ADV_VOICE) && (plci == a->AdvSignalPLCI) && (ADV_VOICE_NEW_COEF_BASE + sizeof(word) <= a->adv_voice_coef_length)) { - w = READ_WORD (a->adv_voice_coef_buffer + ADV_VOICE_NEW_COEF_BASE); + w = GET_WORD (a->adv_voice_coef_buffer + ADV_VOICE_NEW_COEF_BASE); } if (li_config_table[i].channel & LI_CHANNEL_TX_DATA) w |= MIXER_FEATURE_ENABLE_TX_DATA; @@ -11181,7 +11181,7 @@ if ((plci->tel == ADV_VOICE) && (plci == a->AdvSignalPLCI) && (ADV_VOICE_NEW_COEF_BASE + sizeof(word) <= a->adv_voice_coef_length)) { - w = READ_WORD (a->adv_voice_coef_buffer + ADV_VOICE_NEW_COEF_BASE); + w = GET_WORD (a->adv_voice_coef_buffer + ADV_VOICE_NEW_COEF_BASE); } if (li_config_table[i].channel & LI_CHANNEL_TX_DATA) w |= MIXER_FEATURE_ENABLE_TX_DATA; @@ -11293,7 +11293,7 @@ ((CAPI_MSG *) msg)->header.ncci = 0; ((CAPI_MSG *) msg)->info.facility_req.Selector = SELECTOR_LINE_INTERCONNECT; ((CAPI_MSG *) msg)->info.facility_req.structs[0] = 3; - WRITE_WORD (&(((CAPI_MSG *) msg)->info.facility_req.structs[1]), LI_REQ_SILENT_UPDATE); + PUT_WORD (&(((CAPI_MSG *) msg)->info.facility_req.structs[1]), LI_REQ_SILENT_UPDATE); ((CAPI_MSG *) msg)->info.facility_req.structs[3] = 0; w = api_put (notify_plci->appl, (CAPI_MSG *) msg); if (w != _QUEUE_FULL) @@ -11910,7 +11910,7 @@ { dbug (1, dprintf ("[%06lx] %s,%d: LI request overrun", UnMapId (Id), (char *)(FILE_), __LINE__)); - WRITE_WORD (p_result, _REQUEST_NOT_ALLOWED_IN_THIS_STATE); + PUT_WORD (p_result, _REQUEST_NOT_ALLOWED_IN_THIS_STATE); return (NULL); } ctlr_b = 0; @@ -11926,7 +11926,7 @@ { dbug (1, dprintf ("[%06lx] %s,%d: LI invalid second PLCI %08lx", UnMapId (Id), (char *)(FILE_), __LINE__, plci_b_id)); - WRITE_WORD (p_result, _WRONG_IDENTIFIER); + PUT_WORD (p_result, _WRONG_IDENTIFIER); return (NULL); } plci_b = &(adapter[ctlr_b - 1].plci[((plci_b_id >> 8) & 0xff) - 1]); @@ -11936,7 +11936,7 @@ { dbug (1, dprintf ("[%06lx] %s,%d: LI peer in wrong state %08lx", UnMapId (Id), (char *)(FILE_), __LINE__, plci_b_id)); - WRITE_WORD (p_result, _REQUEST_NOT_ALLOWED_IN_THIS_STATE); + PUT_WORD (p_result, _REQUEST_NOT_ALLOWED_IN_THIS_STATE); return (NULL); } li_config_table[plci_b->adapter->li_base + (plci_b->li_bchannel_id - 1)].plci = plci_b; @@ -11947,7 +11947,7 @@ { dbug (1, dprintf ("[%06lx] %s,%d: LI not on same ctrl %08lx", UnMapId (Id), (char *)(FILE_), __LINE__, plci_b_id)); - WRITE_WORD (p_result, _WRONG_IDENTIFIER); + PUT_WORD (p_result, _WRONG_IDENTIFIER); return (NULL); } if (!(get_b1_facilities (plci_b, add_b1_facilities (plci_b, plci_b->B1_resource, @@ -11955,7 +11955,7 @@ { dbug (1, dprintf ("[%06lx] %s,%d: Interconnect peer cannot mix %d", UnMapId (Id), (char *)(FILE_), __LINE__, plci_b->B1_resource)); - WRITE_WORD (p_result, _REQUEST_NOT_ALLOWED_IN_THIS_STATE); + PUT_WORD (p_result, _REQUEST_NOT_ALLOWED_IN_THIS_STATE); return (NULL); } return (plci_b); @@ -11973,7 +11973,7 @@ { dbug (1, dprintf ("[%06lx] %s,%d: LI request overrun", UnMapId (Id), (char *)(FILE_), __LINE__)); - WRITE_WORD (p_result, _WRONG_STATE); + PUT_WORD (p_result, _WRONG_STATE); return (NULL); } ctlr_b = 0; @@ -11989,7 +11989,7 @@ { dbug (1, dprintf ("[%06lx] %s,%d: LI invalid second PLCI %08lx", UnMapId (Id), (char *)(FILE_), __LINE__, plci_b_id)); - WRITE_WORD (p_result, _WRONG_IDENTIFIER); + PUT_WORD (p_result, _WRONG_IDENTIFIER); return (NULL); } plci_b = &(adapter[ctlr_b - 1].plci[((plci_b_id >> 8) & 0xff) - 1]); @@ -12000,7 +12000,7 @@ { dbug (1, dprintf ("[%06lx] %s,%d: LI peer in wrong state %08lx", UnMapId (Id), (char *)(FILE_), __LINE__, plci_b_id)); - WRITE_WORD (p_result, _WRONG_STATE); + PUT_WORD (p_result, _WRONG_STATE); return (NULL); } if (((byte)(plci_b_id & ~EXT_CONTROLLER)) != @@ -12010,7 +12010,7 @@ { dbug (1, dprintf ("[%06lx] %s,%d: LI not on same ctrl %08lx", UnMapId (Id), (char *)(FILE_), __LINE__, plci_b_id)); - WRITE_WORD (p_result, _WRONG_IDENTIFIER); + PUT_WORD (p_result, _WRONG_IDENTIFIER); return (NULL); } if (!(get_b1_facilities (plci_b, add_b1_facilities (plci_b, plci_b->B1_resource, @@ -12018,7 +12018,7 @@ { dbug (1, dprintf ("[%06lx] %s,%d: Interconnect peer cannot mix %d", UnMapId (Id), (char *)(FILE_), __LINE__, plci_b->B1_resource)); - WRITE_WORD (p_result, _WRONG_STATE); + PUT_WORD (p_result, _WRONG_STATE); return (NULL); } return (plci_b); @@ -12062,16 +12062,16 @@ else { result_buffer[0] = 3; - WRITE_WORD (&result_buffer[1], READ_WORD (li_parms[0].info)); + PUT_WORD (&result_buffer[1], GET_WORD (li_parms[0].info)); result_buffer[3] = 0; - switch (READ_WORD (li_parms[0].info)) + switch (GET_WORD (li_parms[0].info)) { case LI_GET_SUPPORTED_SERVICES: if (appl->appl_flags & APPL_FLAG_OLD_LI_SPEC) { result_buffer[0] = 17; result_buffer[3] = 14; - WRITE_WORD (&result_buffer[4], GOOD); + PUT_WORD (&result_buffer[4], GOOD); d = 0; if (a->manufacturer_features & MANUFACTURER_FEATURE_MIXER_CH_CH) d |= LI_CONFERENCING_SUPPORTED; @@ -12081,7 +12081,7 @@ d |= LI_ANNOUNCEMENTS_SUPPORTED | LI_MIXING_SUPPORTED; if (a->manufacturer_features & MANUFACTURER_FEATURE_XCONNECT) d |= LI_CROSS_CONTROLLER_SUPPORTED; - WRITE_DWORD (&result_buffer[6], d); + PUT_DWORD (&result_buffer[6], d); if (a->manufacturer_features & MANUFACTURER_FEATURE_XCONNECT) { d = 0; @@ -12099,14 +12099,14 @@ { d = a->li_pri ? a->li_channels : MIXER_BCHANNELS_BRI; } - WRITE_DWORD (&result_buffer[10], d / 2); - WRITE_DWORD (&result_buffer[14], d); + PUT_DWORD (&result_buffer[10], d / 2); + PUT_DWORD (&result_buffer[14], d); } else { result_buffer[0] = 25; result_buffer[3] = 22; - WRITE_WORD (&result_buffer[4], GOOD); + PUT_WORD (&result_buffer[4], GOOD); d = LI2_ASYMMETRIC_SUPPORTED | LI2_B_LOOPING_SUPPORTED | LI2_X_LOOPING_SUPPORTED; if (a->manufacturer_features & MANUFACTURER_FEATURE_MIXER_CH_PC) d |= LI2_MONITORING_SUPPORTED | LI2_REMOTE_MONITORING_SUPPORTED; @@ -12116,10 +12116,10 @@ d |= LI2_PC_LOOPING_SUPPORTED; if (a->manufacturer_features & MANUFACTURER_FEATURE_XCONNECT) d |= LI2_CROSS_CONTROLLER_SUPPORTED; - WRITE_DWORD (&result_buffer[6], d); + PUT_DWORD (&result_buffer[6], d); d = a->li_pri ? a->li_channels : MIXER_BCHANNELS_BRI; - WRITE_DWORD (&result_buffer[10], d / 2); - WRITE_DWORD (&result_buffer[14], d - 1); + PUT_DWORD (&result_buffer[10], d / 2); + PUT_DWORD (&result_buffer[14], d - 1); if (a->manufacturer_features & MANUFACTURER_FEATURE_XCONNECT) { d = 0; @@ -12133,8 +12133,8 @@ } } } - WRITE_DWORD (&result_buffer[18], d / 2); - WRITE_DWORD (&result_buffer[22], d - 1); + PUT_DWORD (&result_buffer[18], d / 2); + PUT_DWORD (&result_buffer[22], d - 1); } break; @@ -12149,13 +12149,13 @@ Info = _WRONG_MESSAGE_FORMAT; break; } - plci_b_id = READ_DWORD (li_req_parms[0].info) & 0xffff; - li_flags = READ_DWORD (li_req_parms[1].info); + plci_b_id = GET_DWORD (li_req_parms[0].info) & 0xffff; + li_flags = GET_DWORD (li_req_parms[1].info); Info = li_check_main_plci (Id, plci); result_buffer[0] = 9; result_buffer[3] = 6; - WRITE_DWORD (&result_buffer[4], plci_b_id); - WRITE_WORD (&result_buffer[8], GOOD); + PUT_DWORD (&result_buffer[4], plci_b_id); + PUT_WORD (&result_buffer[8], GOOD); if (Info != GOOD) break; result = plci->saved_msg.info; @@ -12180,11 +12180,11 @@ Info = _WRONG_MESSAGE_FORMAT; break; } - li_flags = READ_DWORD (li_req_parms[0].info) & ~(LI2_FLAG_INTERCONNECT_A_B | LI2_FLAG_INTERCONNECT_B_A); + li_flags = GET_DWORD (li_req_parms[0].info) & ~(LI2_FLAG_INTERCONNECT_A_B | LI2_FLAG_INTERCONNECT_B_A); Info = li_check_main_plci (Id, plci); result_buffer[0] = 7; result_buffer[3] = 4; - WRITE_WORD (&result_buffer[4], Info); + PUT_WORD (&result_buffer[4], Info); result_buffer[6] = 0; if (Info != GOOD) break; @@ -12199,14 +12199,14 @@ { result[result_pos] = 6; result_pos += 7; - WRITE_DWORD (&result[result_pos - 6], 0); - WRITE_WORD (&result[result_pos - 2], GOOD); + PUT_DWORD (&result[result_pos - 6], 0); + PUT_WORD (&result[result_pos - 2], GOOD); if (api_parse (&li_req_parms[1].info[1 + participant_parms_pos], (word)(li_parms[1].length - participant_parms_pos), "s", li_participant_struct)) { dbug (1, dprintf ("[%06lx] %s,%d: Wrong message format", UnMapId (Id), (char *)(FILE_), __LINE__)); - WRITE_WORD (&result[result_pos - 2], _WRONG_MESSAGE_FORMAT); + PUT_WORD (&result[result_pos - 2], _WRONG_MESSAGE_FORMAT); break; } if (api_parse (&li_participant_struct[0].info[1], @@ -12214,17 +12214,17 @@ { dbug (1, dprintf ("[%06lx] %s,%d: Wrong message format", UnMapId (Id), (char *)(FILE_), __LINE__)); - WRITE_WORD (&result[result_pos - 2], _WRONG_MESSAGE_FORMAT); + PUT_WORD (&result[result_pos - 2], _WRONG_MESSAGE_FORMAT); break; } - plci_b_id = READ_DWORD (li_participant_parms[0].info) & 0xffff; - li_flags = READ_DWORD (li_participant_parms[1].info); - WRITE_DWORD (&result[result_pos - 6], plci_b_id); + plci_b_id = GET_DWORD (li_participant_parms[0].info) & 0xffff; + li_flags = GET_DWORD (li_participant_parms[1].info); + PUT_DWORD (&result[result_pos - 6], plci_b_id); if (sizeof(result) - result_pos < 7) { dbug (1, dprintf ("[%06lx] %s,%d: LI result overrun", UnMapId (Id), (char *)(FILE_), __LINE__)); - WRITE_WORD (&result[result_pos - 2], _WRONG_STATE); + PUT_WORD (&result[result_pos - 2], _WRONG_STATE); break; } plci_b = li2_check_plci_b (Id, plci, plci_b_id, plci_b_write_pos, &result[result_pos - 2]); @@ -12259,7 +12259,7 @@ sendf (appl, _FACILITY_R | CONFIRM, Id & 0xffffL, Number, "wwS", Info, SELECTOR_LINE_INTERCONNECT, result); plci->command = 0; - plci->li_cmd = READ_WORD (li_parms[0].info); + plci->li_cmd = GET_WORD (li_parms[0].info); start_internal_command (Id, plci, mixer_command); return (FALSE); @@ -12274,12 +12274,12 @@ Info = _WRONG_MESSAGE_FORMAT; break; } - plci_b_id = READ_DWORD (li_req_parms[0].info) & 0xffff; + plci_b_id = GET_DWORD (li_req_parms[0].info) & 0xffff; Info = li_check_main_plci (Id, plci); result_buffer[0] = 9; result_buffer[3] = 6; - WRITE_DWORD (&result_buffer[4], READ_DWORD (li_req_parms[0].info)); - WRITE_WORD (&result_buffer[8], GOOD); + PUT_DWORD (&result_buffer[4], GET_DWORD (li_req_parms[0].info)); + PUT_WORD (&result_buffer[8], GOOD); if (Info != GOOD) break; result = plci->saved_msg.info; @@ -12307,7 +12307,7 @@ Info = li_check_main_plci (Id, plci); result_buffer[0] = 7; result_buffer[3] = 4; - WRITE_WORD (&result_buffer[4], Info); + PUT_WORD (&result_buffer[4], Info); result_buffer[6] = 0; if (Info != GOOD) break; @@ -12321,14 +12321,14 @@ { result[result_pos] = 6; result_pos += 7; - WRITE_DWORD (&result[result_pos - 6], 0); - WRITE_WORD (&result[result_pos - 2], GOOD); + PUT_DWORD (&result[result_pos - 6], 0); + PUT_WORD (&result[result_pos - 2], GOOD); if (api_parse (&li_req_parms[0].info[1 + participant_parms_pos], (word)(li_parms[1].length - participant_parms_pos), "s", li_participant_struct)) { dbug (1, dprintf ("[%06lx] %s,%d: Wrong message format", UnMapId (Id), (char *)(FILE_), __LINE__)); - WRITE_WORD (&result[result_pos - 2], _WRONG_MESSAGE_FORMAT); + PUT_WORD (&result[result_pos - 2], _WRONG_MESSAGE_FORMAT); break; } if (api_parse (&li_participant_struct[0].info[1], @@ -12336,16 +12336,16 @@ { dbug (1, dprintf ("[%06lx] %s,%d: Wrong message format", UnMapId (Id), (char *)(FILE_), __LINE__)); - WRITE_WORD (&result[result_pos - 2], _WRONG_MESSAGE_FORMAT); + PUT_WORD (&result[result_pos - 2], _WRONG_MESSAGE_FORMAT); break; } - plci_b_id = READ_DWORD (li_participant_parms[0].info) & 0xffff; - WRITE_DWORD (&result[result_pos - 6], plci_b_id); + plci_b_id = GET_DWORD (li_participant_parms[0].info) & 0xffff; + PUT_DWORD (&result[result_pos - 6], plci_b_id); if (sizeof(result) - result_pos < 7) { dbug (1, dprintf ("[%06lx] %s,%d: LI result overrun", UnMapId (Id), (char *)(FILE_), __LINE__)); - WRITE_WORD (&result[result_pos - 2], _WRONG_STATE); + PUT_WORD (&result[result_pos - 2], _WRONG_STATE); break; } plci_b = li2_check_plci_b (Id, plci, plci_b_id, plci_b_write_pos, &result[result_pos - 2]); @@ -12378,7 +12378,7 @@ sendf (appl, _FACILITY_R | CONFIRM, Id & 0xffffL, Number, "wwS", Info, SELECTOR_LINE_INTERCONNECT, result); plci->command = 0; - plci->li_cmd = READ_WORD (li_parms[0].info); + plci->li_cmd = GET_WORD (li_parms[0].info); start_internal_command (Id, plci, mixer_command); return (FALSE); @@ -12412,13 +12412,13 @@ plci->li_plci_b_write_pos = plci_b_write_pos; plci->li_channel_bits = li_config_table[a->li_base + (plci->li_bchannel_id - 1)].channel; plci->command = 0; - plci->li_cmd = READ_WORD (li_parms[0].info); + plci->li_cmd = GET_WORD (li_parms[0].info); start_internal_command (Id, plci, mixer_command); return (FALSE); default: dbug (1, dprintf ("[%06lx] %s,%d: LI unknown request %04x", - UnMapId (Id), (char *)(FILE_), __LINE__, READ_WORD (li_parms[0].info))); + UnMapId (Id), (char *)(FILE_), __LINE__, GET_WORD (li_parms[0].info))); Info = _FACILITY_NOT_SUPPORTED; } } @@ -12450,16 +12450,16 @@ if (d & LI_PLCI_B_DISC_FLAG) { result[0] = 5; - WRITE_WORD (&result[1], LI_IND_DISCONNECT); + PUT_WORD (&result[1], LI_IND_DISCONNECT); result[3] = 2; - WRITE_WORD (&result[4], _LI_USER_INITIATED); + PUT_WORD (&result[4], _LI_USER_INITIATED); } else { result[0] = 7; - WRITE_WORD (&result[1], LI_IND_CONNECT_ACTIVE); + PUT_WORD (&result[1], LI_IND_CONNECT_ACTIVE); result[3] = 4; - WRITE_DWORD (&result[4], d & ~LI_PLCI_B_FLAG_MASK); + PUT_DWORD (&result[4], d & ~LI_PLCI_B_FLAG_MASK); } } else @@ -12467,17 +12467,17 @@ if (d & LI_PLCI_B_DISC_FLAG) { result[0] = 9; - WRITE_WORD (&result[1], LI_IND_DISCONNECT); + PUT_WORD (&result[1], LI_IND_DISCONNECT); result[3] = 6; - WRITE_DWORD (&result[4], d & ~LI_PLCI_B_FLAG_MASK); - WRITE_WORD (&result[8], _LI_USER_INITIATED); + PUT_DWORD (&result[4], d & ~LI_PLCI_B_FLAG_MASK); + PUT_WORD (&result[8], _LI_USER_INITIATED); } else { result[0] = 7; - WRITE_WORD (&result[1], LI_IND_CONNECT_ACTIVE); + PUT_WORD (&result[1], LI_IND_CONNECT_ACTIVE); result[3] = 4; - WRITE_DWORD (&result[4], d & ~LI_PLCI_B_FLAG_MASK); + PUT_DWORD (&result[4], d & ~LI_PLCI_B_FLAG_MASK); } } sendf (plci->appl, _FACILITY_I, Id & 0xffffL, 0, @@ -12627,10 +12627,10 @@ parameter_buffer[0] = 5; parameter_buffer[1] = DSP_CTRL_SET_LEC_PARAMETERS; - WRITE_WORD (¶meter_buffer[2], plci->ec_idi_options); + PUT_WORD (¶meter_buffer[2], plci->ec_idi_options); plci->ec_idi_options &= ~LEC_RESET_COEFFICIENTS; w = (plci->ec_tail_length == 0) ? 128 : plci->ec_tail_length; - WRITE_WORD (¶meter_buffer[4], w); + PUT_WORD (¶meter_buffer[4], w); add_p (plci, FTY, parameter_buffer); sig_req (plci, TEL_CTRL, 0); send_req (plci); @@ -12719,14 +12719,14 @@ if (plci->appl->appl_flags & APPL_FLAG_PRIV_EC_SPEC) { result[0] = 2; - WRITE_WORD (&result[1], EC_SUCCESS); + PUT_WORD (&result[1], EC_SUCCESS); } else { result[0] = 5; - WRITE_WORD (&result[1], plci->ec_cmd); + PUT_WORD (&result[1], plci->ec_cmd); result[3] = 2; - WRITE_WORD (&result[4], GOOD); + PUT_WORD (&result[4], GOOD); } internal_command = plci->internal_command; plci->internal_command = 0; @@ -12864,13 +12864,13 @@ else { plci->command = 0; - plci->ec_cmd = READ_WORD (ec_parms[0].info); + plci->ec_cmd = GET_WORD (ec_parms[0].info); plci->ec_idi_options &= ~(LEC_MANUAL_DISABLE | LEC_RESET_COEFFICIENTS); result[0] = 2; - WRITE_WORD (&result[1], EC_SUCCESS); + PUT_WORD (&result[1], EC_SUCCESS); if (msg[1].length >= 4) { - opt = READ_WORD (&ec_parms[0].info[2]); + opt = GET_WORD (&ec_parms[0].info[2]); plci->ec_idi_options &= ~(LEC_ENABLE_NONLINEAR_PROCESSING | LEC_ENABLE_2100HZ_DETECTOR | LEC_REQUIRE_2100HZ_REVERSALS); if (!(opt & EC_DISABLE_NON_LINEAR_PROCESSING)) @@ -12881,7 +12881,7 @@ plci->ec_idi_options |= LEC_REQUIRE_2100HZ_REVERSALS; if (msg[1].length >= 6) { - plci->ec_tail_length = READ_WORD (&ec_parms[0].info[4]); + plci->ec_tail_length = GET_WORD (&ec_parms[0].info[4]); } } switch (plci->ec_cmd) @@ -12916,7 +12916,7 @@ default: dbug (1, dprintf ("[%06lx] %s,%d: EC unknown request %04x", UnMapId (Id), (char *)(FILE_), __LINE__, plci->ec_cmd)); - WRITE_WORD (&result[1], EC_UNSUPPORTED_OPERATION); + PUT_WORD (&result[1], EC_UNSUPPORTED_OPERATION); } } } @@ -12931,15 +12931,15 @@ } else { - if (READ_WORD (ec_parms[0].info) == EC_GET_SUPPORTED_SERVICES) + if (GET_WORD (ec_parms[0].info) == EC_GET_SUPPORTED_SERVICES) { result[0] = 11; - WRITE_WORD (&result[1], EC_GET_SUPPORTED_SERVICES); + PUT_WORD (&result[1], EC_GET_SUPPORTED_SERVICES); result[3] = 8; - WRITE_WORD (&result[4], GOOD); - WRITE_WORD (&result[6], 0x0007); - WRITE_WORD (&result[8], LEC_MAX_SUPPORTED_TAIL_LENGTH); - WRITE_WORD (&result[10], 0); + PUT_WORD (&result[4], GOOD); + PUT_WORD (&result[6], 0x0007); + PUT_WORD (&result[8], LEC_MAX_SUPPORTED_TAIL_LENGTH); + PUT_WORD (&result[10], 0); } else if (plci == NULL) { @@ -12956,18 +12956,18 @@ else { plci->command = 0; - plci->ec_cmd = READ_WORD (ec_parms[0].info); + plci->ec_cmd = GET_WORD (ec_parms[0].info); plci->ec_idi_options &= ~(LEC_MANUAL_DISABLE | LEC_RESET_COEFFICIENTS); result[0] = 5; - WRITE_WORD (&result[1], plci->ec_cmd); + PUT_WORD (&result[1], plci->ec_cmd); result[3] = 2; - WRITE_WORD (&result[4], GOOD); + PUT_WORD (&result[4], GOOD); plci->ec_idi_options &= ~(LEC_ENABLE_NONLINEAR_PROCESSING | LEC_ENABLE_2100HZ_DETECTOR | LEC_REQUIRE_2100HZ_REVERSALS); plci->ec_tail_length = 0; if (ec_parms[1].length >= 2) { - opt = READ_WORD (&ec_parms[1].info[1]); + opt = GET_WORD (&ec_parms[1].info[1]); if (opt & EC_ENABLE_NON_LINEAR_PROCESSING) plci->ec_idi_options |= LEC_ENABLE_NONLINEAR_PROCESSING; if (opt & EC_DETECT_DISABLE_TONE) @@ -12976,7 +12976,7 @@ plci->ec_idi_options |= LEC_REQUIRE_2100HZ_REVERSALS; if (ec_parms[1].length >= 4) { - plci->ec_tail_length = READ_WORD (&ec_parms[1].info[3]); + plci->ec_tail_length = GET_WORD (&ec_parms[1].info[3]); } } switch (plci->ec_cmd) @@ -12996,7 +12996,7 @@ default: dbug (1, dprintf ("[%06lx] %s,%d: EC unknown request %04x", UnMapId (Id), (char *)(FILE_), __LINE__, plci->ec_cmd)); - WRITE_WORD (&result[4], _FACILITY_SPECIFIC_FUNCTION_NOT_SUPP); + PUT_WORD (&result[4], _FACILITY_SPECIFIC_FUNCTION_NOT_SUPP); } } } @@ -13021,36 +13021,36 @@ if (plci->appl->appl_flags & APPL_FLAG_PRIV_EC_SPEC) { result[0] = 2; - WRITE_WORD (&result[1], 0); + PUT_WORD (&result[1], 0); switch (msg[1]) { case LEC_DISABLE_TYPE_CONTIGNUOUS_2100HZ: - WRITE_WORD (&result[1], EC_BYPASS_DUE_TO_CONTINUOUS_2100HZ); + PUT_WORD (&result[1], EC_BYPASS_DUE_TO_CONTINUOUS_2100HZ); break; case LEC_DISABLE_TYPE_REVERSED_2100HZ: - WRITE_WORD (&result[1], EC_BYPASS_DUE_TO_REVERSED_2100HZ); + PUT_WORD (&result[1], EC_BYPASS_DUE_TO_REVERSED_2100HZ); break; case LEC_DISABLE_RELEASED: - WRITE_WORD (&result[1], EC_BYPASS_RELEASED); + PUT_WORD (&result[1], EC_BYPASS_RELEASED); break; } } else { result[0] = 5; - WRITE_WORD (&result[1], EC_BYPASS_INDICATION); + PUT_WORD (&result[1], EC_BYPASS_INDICATION); result[3] = 2; - WRITE_WORD (&result[4], 0); + PUT_WORD (&result[4], 0); switch (msg[1]) { case LEC_DISABLE_TYPE_CONTIGNUOUS_2100HZ: - WRITE_WORD (&result[4], EC_BYPASS_DUE_TO_CONTINUOUS_2100HZ); + PUT_WORD (&result[4], EC_BYPASS_DUE_TO_CONTINUOUS_2100HZ); break; case LEC_DISABLE_TYPE_REVERSED_2100HZ: - WRITE_WORD (&result[4], EC_BYPASS_DUE_TO_REVERSED_2100HZ); + PUT_WORD (&result[4], EC_BYPASS_DUE_TO_REVERSED_2100HZ); break; case LEC_DISABLE_RELEASED: - WRITE_WORD (&result[4], EC_BYPASS_RELEASED); + PUT_WORD (&result[4], EC_BYPASS_RELEASED); break; } } @@ -13086,13 +13086,13 @@ i = 0; while (i + sizeof(word) <= a->adv_voice_coef_length) { - WRITE_WORD (p, READ_WORD (a->adv_voice_coef_buffer + i)); + PUT_WORD (p, GET_WORD (a->adv_voice_coef_buffer + i)); p += 2; i += 2; } while (i < ADV_VOICE_OLD_COEF_COUNT * sizeof(word)) { - WRITE_WORD (p, 0x8000); + PUT_WORD (p, 0x8000); p += 2; i += 2; } @@ -13172,7 +13172,7 @@ { w = 0; if (ADV_VOICE_NEW_COEF_BASE + sizeof(word) <= a->adv_voice_coef_length) - w = READ_WORD (a->adv_voice_coef_buffer + ADV_VOICE_NEW_COEF_BASE); + w = GET_WORD (a->adv_voice_coef_buffer + ADV_VOICE_NEW_COEF_BASE); if (li_config_table[i].channel & LI_CHANNEL_TX_DATA) w |= MIXER_FEATURE_ENABLE_TX_DATA; if (li_config_table[i].channel & LI_CHANNEL_RX_DATA) diff -Nru a/drivers/isdn/hardware/eicon/os_4bri.c b/drivers/isdn/hardware/eicon/os_4bri.c --- a/drivers/isdn/hardware/eicon/os_4bri.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/isdn/hardware/eicon/os_4bri.c 2004-11-29 21:22:07 -08:00 @@ -143,7 +143,7 @@ int diva_4bri_init_card(diva_os_xdi_adapter_t * a) { int bar, i; - byte *p; + byte __iomem *p; PADAPTER_LIST_ENTRY quadro_list; diva_os_xdi_adapter_t *diva_current; diva_os_xdi_adapter_t *adapter_list[4]; @@ -424,7 +424,7 @@ reset contains the base address for the PLX 9054 register set */ p = DIVA_OS_MEM_ATTACH_RESET(&a->xdi_adapter); - p[PLX9054_INTCSR] = 0x00; /* disable PCI interrupts */ + WRITE_BYTE(&p[PLX9054_INTCSR], 0x00); /* disable PCI interrupts */ DIVA_OS_MEM_DETACH_RESET(&a->xdi_adapter, p); /* @@ -788,15 +788,15 @@ a->xdi_mbox. data_length); if (a->xdi_mbox.data) { - byte *p = DIVA_OS_MEM_ATTACH_ADDRESS(&a->xdi_adapter); - byte *src = p; + byte __iomem *p = DIVA_OS_MEM_ATTACH_ADDRESS(&a->xdi_adapter); + byte __iomem *src = p; byte *dst = a->xdi_mbox.data; dword len = a->xdi_mbox.data_length; src += cmd->command_data.read_sdram.offset; while (len--) { - *dst++ = *src++; + *dst++ = READ_BYTE(src++); } DIVA_OS_MEM_DETACH_ADDRESS(&a->xdi_adapter, p); a->xdi_mbox.status = DIVA_XDI_MBOX_BUSY; @@ -910,8 +910,8 @@ dword address, const byte * data, dword length, dword limit) { - byte *p = DIVA_OS_MEM_ATTACH_ADDRESS(IoAdapter); - byte *mem = p; + byte __iomem *p = DIVA_OS_MEM_ATTACH_ADDRESS(IoAdapter); + byte __iomem *mem = p; if (((address + length) >= limit) || !mem) { DIVA_OS_MEM_DETACH_ADDRESS(IoAdapter, p); @@ -922,7 +922,7 @@ mem += address; while (length--) { - *mem++ = *data++; + WRITE_BYTE(mem++, *data++); } DIVA_OS_MEM_DETACH_ADDRESS(IoAdapter, p); @@ -933,10 +933,10 @@ diva_4bri_start_adapter(PISDN_ADAPTER IoAdapter, dword start_address, dword features) { - volatile word *signature; + volatile word __iomem *signature; int started = 0; int i; - byte *p; + byte __iomem *p; /* start adapter @@ -947,7 +947,7 @@ /* wait for signature in shared memory (max. 3 seconds) */ - signature = (volatile word *) (&p[0x1E]); + signature = (volatile word __iomem *) (&p[0x1E]); for (i = 0; i < 300; ++i) { diva_os_wait(10); @@ -1011,7 +1011,7 @@ #ifdef SUPPORT_INTERRUPT_TEST_ON_4BRI int i; ADAPTER *a = &IoAdapter->a; - byte *p; + byte __iomem *p; IoAdapter->IrqCount = 0; @@ -1019,7 +1019,7 @@ return (-1); p = DIVA_OS_MEM_ATTACH_RESET(IoAdapter); - p[PLX9054_INTCSR] = PLX9054_INT_ENABLE; + WRITE_BYTE(&p[PLX9054_INTCSR], PLX9054_INT_ENABLE); DIVA_OS_MEM_DETACH_RESET(IoAdapter, p); /* interrupt test @@ -1031,14 +1031,14 @@ return ((IoAdapter->IrqCount > 0) ? 0 : -1); #else - dword volatile *qBriIrq; - byte *p; + dword volatile __iomem *qBriIrq; + byte __iomem *p; /* Reset on-board interrupt register */ IoAdapter->IrqCount = 0; p = DIVA_OS_MEM_ATTACH_CTLREG(IoAdapter); - qBriIrq = (dword volatile *) (&p[_4bri_is_rev_2_card + qBriIrq = (dword volatile __iomem *) (&p[_4bri_is_rev_2_card (IoAdapter-> cardType) ? (MQ2_BREG_IRQ_TEST) : (MQ_BREG_IRQ_TEST)]); @@ -1047,7 +1047,7 @@ DIVA_OS_MEM_DETACH_CTLREG(IoAdapter, p); p = DIVA_OS_MEM_ATTACH_RESET(IoAdapter); - p[PLX9054_INTCSR] = PLX9054_INT_ENABLE; + WRITE_BYTE(&p[PLX9054_INTCSR], PLX9054_INT_ENABLE); DIVA_OS_MEM_DETACH_RESET(IoAdapter, p); diva_os_wait(100); diff -Nru a/drivers/isdn/hardware/eicon/os_bri.c b/drivers/isdn/hardware/eicon/os_bri.c --- a/drivers/isdn/hardware/eicon/os_bri.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/isdn/hardware/eicon/os_bri.c 2004-11-29 21:22:06 -08:00 @@ -78,7 +78,7 @@ word cmd = 0, cmd_org; byte Bus, Slot; void *hdev; - byte *p; + byte __iomem *p; /* Set properties @@ -331,10 +331,11 @@ static dword diva_bri_get_serial_number(diva_os_xdi_adapter_t * a) { dword serNo = 0; - byte *confIO; - word serHi, serLo, *confMem; + byte __iomem *confIO; + word serHi, serLo; + word __iomem *confMem; - confIO = (byte *) DIVA_OS_MEM_ATTACH_CFG(&a->xdi_adapter); + confIO = DIVA_OS_MEM_ATTACH_CFG(&a->xdi_adapter); serHi = (word) (inppw(&confIO[0x22]) & 0x0FFF); serLo = (word) (inppw(&confIO[0x26]) & 0x0FFF); serNo = ((dword) serHi << 16) | (dword) serLo; @@ -343,7 +344,7 @@ if ((serNo == 0) || (serNo == 0xFFFFFFFF)) { DBG_FTL(("W: BRI use BAR[0] to get card serial number")) - confMem = (word *) DIVA_OS_MEM_ATTACH_RAM(&a->xdi_adapter); + confMem = (word __iomem *)DIVA_OS_MEM_ATTACH_RAM(&a->xdi_adapter); serHi = (word) (READ_WORD(&confMem[0x11]) & 0x0FFF); serLo = (word) (READ_WORD(&confMem[0x13]) & 0x0FFF); serNo = (((dword) serHi) << 16) | ((dword) serLo); @@ -513,9 +514,9 @@ static int diva_bri_reset_adapter(PISDN_ADAPTER IoAdapter) { - byte *addrHi, *addrLo, *ioaddr; + byte __iomem *addrHi, *addrLo, *ioaddr; dword i; - byte *Port; + byte __iomem *Port; if (!IoAdapter->port) { return (-1); @@ -602,8 +603,8 @@ diva_bri_write_sdram_block(PISDN_ADAPTER IoAdapter, dword address, const byte * data, dword length) { - byte *addrHi, *addrLo, *ioaddr; - byte *Port; + byte __iomem *addrHi, *addrLo, *ioaddr; + byte __iomem *Port; if (!IoAdapter->port) { return (-1); @@ -630,9 +631,9 @@ diva_bri_start_adapter(PISDN_ADAPTER IoAdapter, dword start_address, dword features) { - byte *Port; + byte __iomem *Port; dword i, test; - byte *addrHi, *addrLo, *ioaddr; + byte __iomem *addrHi, *addrLo, *ioaddr; int started = 0; ADAPTER *a = &IoAdapter->a; diff -Nru a/drivers/isdn/hardware/eicon/os_pri.c b/drivers/isdn/hardware/eicon/os_pri.c --- a/drivers/isdn/hardware/eicon/os_pri.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/isdn/hardware/eicon/os_pri.c 2004-11-29 21:22:07 -08:00 @@ -332,7 +332,7 @@ static int diva_pri_reset_adapter(PISDN_ADAPTER IoAdapter) { dword i; - struct mp_load *boot; + struct mp_load __iomem *boot; if (!IoAdapter->Address || !IoAdapter->reset) { return (-1); @@ -343,7 +343,7 @@ return (-1); } - boot = (struct mp_load *) DIVA_OS_MEM_ATTACH_ADDRESS(IoAdapter); + boot = (struct mp_load __iomem *) DIVA_OS_MEM_ATTACH_ADDRESS(IoAdapter); WRITE_DWORD(&boot->err, 0); DIVA_OS_MEM_DETACH_ADDRESS(IoAdapter, boot); @@ -351,7 +351,7 @@ diva_os_wait(10); - boot = (struct mp_load *) DIVA_OS_MEM_ATTACH_ADDRESS(IoAdapter); + boot = (struct mp_load __iomem *) DIVA_OS_MEM_ATTACH_ADDRESS(IoAdapter); i = READ_DWORD(&boot->live); diva_os_wait(10); @@ -408,8 +408,8 @@ dword address, const byte * data, dword length, dword limit) { - byte *p = DIVA_OS_MEM_ATTACH_ADDRESS(IoAdapter); - byte *mem = p; + byte __iomem *p = DIVA_OS_MEM_ATTACH_ADDRESS(IoAdapter); + byte __iomem *mem = p; if (((address + length) >= limit) || !mem) { DIVA_OS_MEM_DETACH_ADDRESS(IoAdapter, p); @@ -419,8 +419,9 @@ } mem += address; + /* memcpy_toio(), maybe? */ while (length--) { - *mem++ = *data++; + WRITE_BYTE(mem++, *data++); } DIVA_OS_MEM_DETACH_ADDRESS(IoAdapter, p); @@ -433,8 +434,8 @@ { dword i; int started = 0; - byte *p; - struct mp_load *boot = (struct mp_load *) DIVA_OS_MEM_ATTACH_ADDRESS(IoAdapter); + byte __iomem *p; + struct mp_load __iomem *boot = (struct mp_load __iomem *) DIVA_OS_MEM_ATTACH_ADDRESS(IoAdapter); ADAPTER *a = &IoAdapter->a; if (IoAdapter->Initialized) { @@ -468,7 +469,7 @@ } if (!started) { - byte *p = (byte *)boot; + byte __iomem *p = (byte __iomem *)boot; dword TrapId; dword debug; TrapId = READ_DWORD(&p[0x80]); @@ -492,7 +493,7 @@ */ IoAdapter->IrqCount = 0; p = DIVA_OS_MEM_ATTACH_CFG(IoAdapter); - WRITE_DWORD(((dword volatile *) p), (dword) ~ 0x03E00000); + WRITE_DWORD(p, (dword) ~ 0x03E00000); DIVA_OS_MEM_DETACH_CFG(IoAdapter, p); a->ReadyInt = 1; a->ram_out(a, &PR_RAM->ReadyInt, 1); @@ -729,15 +730,15 @@ a->xdi_mbox. data_length); if (a->xdi_mbox.data) { - byte *p = DIVA_OS_MEM_ATTACH_ADDRESS(&a->xdi_adapter); - byte *src = p; + byte __iomem *p = DIVA_OS_MEM_ATTACH_ADDRESS(&a->xdi_adapter); + byte __iomem *src = p; byte *dst = a->xdi_mbox.data; dword len = a->xdi_mbox.data_length; src += cmd->command_data.read_sdram.offset; while (len--) { - *dst++ = *src++; + *dst++ = READ_BYTE(src++); } a->xdi_mbox.status = DIVA_XDI_MBOX_BUSY; DIVA_OS_MEM_DETACH_ADDRESS(&a->xdi_adapter, p); @@ -764,18 +765,20 @@ byte data[64]; int i; dword len = sizeof(data); - volatile byte *config; - volatile byte *flash; + volatile byte __iomem *config; + volatile byte __iomem *flash; + byte c; /* * First set some GT6401x config registers before accessing the BOOT-ROM */ config = DIVA_OS_MEM_ATTACH_CONFIG(&a->xdi_adapter); - if (!(config[0xc3c] & 0x08)) { - config[0xc3c] |= 0x08; /* Base Address enable register */ + c = READ_BYTE(&config[0xc3c]); + if (!(c & 0x08)) { + WRITE_BYTE(&config[0xc3c], c); /* Base Address enable register */ } - config[LOW_BOOTCS_DREG] = 0x00; - config[HI_BOOTCS_DREG] = 0xFF; + WRITE_BYTE(&config[LOW_BOOTCS_DREG], 0x00); + WRITE_BYTE(&config[HI_BOOTCS_DREG], 0xFF); DIVA_OS_MEM_DETACH_CONFIG(&a->xdi_adapter, config); /* * Read only the last 64 bytes of manufacturing data @@ -783,13 +786,13 @@ memset(data, '\0', len); flash = DIVA_OS_MEM_ATTACH_PROM(&a->xdi_adapter); for (i = 0; i < len; i++) { - data[i] = flash[0x8000 - len + i]; + data[i] = READ_BYTE(&flash[0x8000 - len + i]); } DIVA_OS_MEM_DETACH_PROM(&a->xdi_adapter, flash); config = DIVA_OS_MEM_ATTACH_CONFIG(&a->xdi_adapter); - config[LOW_BOOTCS_DREG] = 0xFC; /* Disable FLASH EPROM access */ - config[HI_BOOTCS_DREG] = 0xFF; + WRITE_BYTE(&config[LOW_BOOTCS_DREG], 0xFC); /* Disable FLASH EPROM access */ + WRITE_BYTE(&config[HI_BOOTCS_DREG], 0xFF); DIVA_OS_MEM_DETACH_CONFIG(&a->xdi_adapter, config); if (memcmp(&data[48], "DIVAserverPR", 12)) { @@ -905,7 +908,7 @@ ** Checks presence of DSP on board */ static int -dsp_check_presence(volatile byte * addr, volatile byte * data, int dsp) +dsp_check_presence(volatile byte __iomem * addr, volatile byte __iomem * data, int dsp) { word pattern; @@ -950,8 +953,8 @@ */ static dword diva_pri_detect_dsps(diva_os_xdi_adapter_t * a) { - byte *base; - byte *p; + byte __iomem *base; + byte __iomem *p; dword ret = 0; dword row_offset[7] = { 0x00000000, @@ -962,7 +965,9 @@ 0x00000000 /* 5 - ROW 0 */ }; - byte *dsp_addr_port, *dsp_data_port, row_state; + byte __iomem *dsp_addr_port; + byte __iomem *dsp_data_port; + byte row_state; int dsp_row = 0, dsp_index, dsp_num; if (!a->xdi_adapter.Control || !a->xdi_adapter.reset) { @@ -970,7 +975,7 @@ } p = DIVA_OS_MEM_ATTACH_RESET(&a->xdi_adapter); - *(volatile byte *) p = _MP_RISC_RESET | _MP_DSP_RESET; + WRITE_BYTE(p, _MP_RISC_RESET | _MP_DSP_RESET); DIVA_OS_MEM_DETACH_RESET(&a->xdi_adapter, p); diva_os_wait(5); @@ -997,7 +1002,7 @@ DIVA_OS_MEM_DETACH_CONTROL(&a->xdi_adapter, base); p = DIVA_OS_MEM_ATTACH_RESET(&a->xdi_adapter); - *(volatile byte *) p = _MP_RISC_RESET | _MP_LED1 | _MP_LED2; + WRITE_BYTE(p, _MP_RISC_RESET | _MP_LED1 | _MP_LED2); DIVA_OS_MEM_DETACH_RESET(&a->xdi_adapter, p); diva_os_wait(5); diff -Nru a/drivers/isdn/hardware/eicon/platform.h b/drivers/isdn/hardware/eicon/platform.h --- a/drivers/isdn/hardware/eicon/platform.h 2004-11-29 21:22:08 -08:00 +++ b/drivers/isdn/hardware/eicon/platform.h 2004-11-29 21:22:08 -08:00 @@ -235,12 +235,12 @@ /* ** I/O port access abstraction */ -byte inpp (void*); -word inppw (void*); -void inppw_buffer (void*, void*, int); -void outppw (void*, word); -void outppw_buffer (void* , void*, int); -void outpp (void*, word); +byte inpp (void __iomem *); +word inppw (void __iomem *); +void inppw_buffer (void __iomem *, void*, int); +void outppw (void __iomem *, word); +void outppw_buffer (void __iomem * , void*, int); +void outpp (void __iomem *, word); /* ** IRQ @@ -335,12 +335,34 @@ /* ** endian macros +** +** If only... In some cases we did use them for endianness conversion; +** unfortunately, other uses were real iomem accesses. */ +#define READ_BYTE(addr) readb(addr) #define READ_WORD(addr) readw(addr) #define READ_DWORD(addr) readl(addr) +#define WRITE_BYTE(addr,v) writeb(v,addr) #define WRITE_WORD(addr,v) writew(v,addr) #define WRITE_DWORD(addr,v) writel(v,addr) + +static inline __u16 GET_WORD(void *addr) +{ + return le16_to_cpu(*(__le16 *)addr); +} +static inline __u32 GET_DWORD(void *addr) +{ + return le32_to_cpu(*(__le32 *)addr); +} +static inline void PUT_WORD(void *addr, __u16 v) +{ + *(__le16 *)addr = cpu_to_le16(v); +} +static inline void PUT_DWORD(void *addr, __u32 v) +{ + *(__le32 *)addr = cpu_to_le32(v); +} /* ** 32/64 bit macors diff -Nru a/drivers/isdn/hardware/eicon/s_4bri.c b/drivers/isdn/hardware/eicon/s_4bri.c --- a/drivers/isdn/hardware/eicon/s_4bri.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/isdn/hardware/eicon/s_4bri.c 2004-11-29 21:22:06 -08:00 @@ -45,7 +45,7 @@ Recovery XLOG from QBRI Card -------------------------------------------------------------------------- */ static void qBri_cpu_trapped (PISDN_ADAPTER IoAdapter) { - byte *base ; + byte __iomem *base ; word *Xlog ; dword regs[4], TrapID, offset, size ; Xdesc xlogDesc ; @@ -66,10 +66,10 @@ IoAdapter->trapped = 1 ; } - regs[0] = READ_DWORD((&base + offset) + 0x70); - regs[1] = READ_DWORD((&base + offset) + 0x74); - regs[2] = READ_DWORD((&base + offset) + 0x78); - regs[3] = READ_DWORD((&base + offset) + 0x7c); + regs[0] = READ_DWORD((base + offset) + 0x70); + regs[1] = READ_DWORD((base + offset) + 0x74); + regs[2] = READ_DWORD((base + offset) + 0x78); + regs[3] = READ_DWORD((base + offset) + 0x7c); regs[0] &= IoAdapter->MemorySize - 1 ; if ( (regs[0] >= offset) @@ -83,7 +83,7 @@ size = offset + (IoAdapter->MemorySize >> factor) - regs[0] ; if ( size > MAX_XLOG_SIZE ) size = MAX_XLOG_SIZE ; - memcpy (Xlog, &base[regs[0]], size) ; + memcpy_fromio (Xlog, &base[regs[0]], size) ; xlogDesc.buf = Xlog ; xlogDesc.cnt = READ_WORD(&base[regs[1] & (IoAdapter->MemorySize - 1)]) ; xlogDesc.out = READ_WORD(&base[regs[2] & (IoAdapter->MemorySize - 1)]) ; @@ -98,11 +98,11 @@ Reset QBRI Hardware -------------------------------------------------------------------------- */ static void reset_qBri_hardware (PISDN_ADAPTER IoAdapter) { - word volatile *qBriReset ; - byte volatile *qBriCntrl ; - byte volatile *p ; + word volatile __iomem *qBriReset ; + byte volatile __iomem *qBriCntrl ; + byte volatile __iomem *p ; - qBriReset = (word volatile *)DIVA_OS_MEM_ATTACH_PROM(IoAdapter); + qBriReset = (word volatile __iomem *)DIVA_OS_MEM_ATTACH_PROM(IoAdapter); WRITE_WORD(qBriReset, READ_WORD(qBriReset) | PLX9054_SOFT_RESET) ; diva_os_wait (1) ; WRITE_WORD(qBriReset, READ_WORD(qBriReset) & ~PLX9054_SOFT_RESET) ; @@ -126,10 +126,10 @@ Start Card CPU -------------------------------------------------------------------------- */ void start_qBri_hardware (PISDN_ADAPTER IoAdapter) { - byte volatile *qBriReset ; - byte volatile *p ; + byte volatile __iomem *qBriReset ; + byte volatile __iomem *p ; - p = (byte volatile *)DIVA_OS_MEM_ATTACH_CTLREG(IoAdapter); + p = DIVA_OS_MEM_ATTACH_CTLREG(IoAdapter); qBriReset = &p[(DIVA_4BRI_REVISION(IoAdapter)) ? (MQ2_BREG_RISC) : (MQ_BREG_RISC)]; WRITE_DWORD(qBriReset, MQ_RISC_COLD_RESET_MASK) ; diva_os_wait (2) ; @@ -144,10 +144,10 @@ Stop Card CPU -------------------------------------------------------------------------- */ static void stop_qBri_hardware (PISDN_ADAPTER IoAdapter) { - byte volatile *p ; - dword volatile *qBriReset ; - dword volatile *qBriIrq ; - dword volatile *qBriIsacDspReset ; + byte volatile __iomem *p ; + dword volatile __iomem *qBriReset ; + dword volatile __iomem *qBriIrq ; + dword volatile __iomem *qBriIsacDspReset ; int rev2 = DIVA_4BRI_REVISION(IoAdapter); int reset_offset = rev2 ? (MQ2_BREG_RISC) : (MQ_BREG_RISC); int irq_offset = rev2 ? (MQ2_BREG_IRQ_TEST) : (MQ_BREG_IRQ_TEST); @@ -155,9 +155,9 @@ if ( IoAdapter->ControllerNumber > 0 ) return ; - p = (byte volatile *)DIVA_OS_MEM_ATTACH_CTLREG(IoAdapter); - qBriReset = (dword volatile *)&p[reset_offset]; - qBriIsacDspReset = (dword volatile *)&p[hw_offset]; + p = DIVA_OS_MEM_ATTACH_CTLREG(IoAdapter); + qBriReset = (dword volatile __iomem *)&p[reset_offset]; + qBriIsacDspReset = (dword volatile __iomem *)&p[hw_offset]; /* * clear interrupt line (reset Local Interrupt Test Register) */ @@ -165,12 +165,12 @@ WRITE_DWORD(qBriIsacDspReset, 0) ; DIVA_OS_MEM_DETACH_CTLREG(IoAdapter, p); - p = (byte volatile *)DIVA_OS_MEM_ATTACH_RESET(IoAdapter); - p[PLX9054_INTCSR] = 0x00 ; /* disable PCI interrupts */ + p = DIVA_OS_MEM_ATTACH_RESET(IoAdapter); + WRITE_BYTE(&p[PLX9054_INTCSR], 0x00); /* disable PCI interrupts */ DIVA_OS_MEM_DETACH_RESET(IoAdapter, p); - p = (byte volatile *)DIVA_OS_MEM_ATTACH_CTLREG(IoAdapter); - qBriIrq = (dword volatile *)&p[irq_offset]; + p = DIVA_OS_MEM_ATTACH_CTLREG(IoAdapter); + qBriIrq = (dword volatile __iomem *)&p[irq_offset]; WRITE_DWORD(qBriIrq, MQ_IRQ_REQ_OFF) ; DIVA_OS_MEM_DETACH_CTLREG(IoAdapter, p); @@ -276,7 +276,7 @@ int bit ; byte *File ; dword code, FileLength ; - word volatile *addr = (word volatile *)DIVA_OS_MEM_ATTACH_PROM(IoAdapter); + word volatile __iomem *addr = (word volatile __iomem *)DIVA_OS_MEM_ATTACH_PROM(IoAdapter); word val, baseval = FPGA_CS | FPGA_PROG ; @@ -864,17 +864,17 @@ Card ISR -------------------------------------------------------------------------- */ static int qBri_ISR (struct _ISDN_ADAPTER* IoAdapter) { - dword volatile *qBriIrq ; + dword volatile __iomem *qBriIrq ; PADAPTER_LIST_ENTRY QuadroList = IoAdapter->QuadroList ; word i ; int serviced = 0 ; - byte *p; + byte __iomem *p; p = DIVA_OS_MEM_ATTACH_RESET(IoAdapter); - if ( !(p[PLX9054_INTCSR] & 0x80) ) { + if ( !(READ_BYTE(&p[PLX9054_INTCSR]) & 0x80) ) { DIVA_OS_MEM_DETACH_RESET(IoAdapter, p); return (0) ; } @@ -884,7 +884,7 @@ * clear interrupt line (reset Local Interrupt Test Register) */ p = DIVA_OS_MEM_ATTACH_CTLREG(IoAdapter); - qBriIrq = (dword volatile *)(&p[DIVA_4BRI_REVISION(IoAdapter) ? (MQ2_BREG_IRQ_TEST) : (MQ_BREG_IRQ_TEST)]); + qBriIrq = (dword volatile __iomem *)(&p[DIVA_4BRI_REVISION(IoAdapter) ? (MQ2_BREG_IRQ_TEST) : (MQ_BREG_IRQ_TEST)]); WRITE_DWORD(qBriIrq, MQ_IRQ_REQ_OFF) ; DIVA_OS_MEM_DETACH_CTLREG(IoAdapter, p); @@ -908,8 +908,8 @@ Does disable the interrupt on the card -------------------------------------------------------------------------- */ static void disable_qBri_interrupt (PISDN_ADAPTER IoAdapter) { - dword volatile *qBriIrq ; - byte *p; + dword volatile __iomem *qBriIrq ; + byte __iomem *p; if ( IoAdapter->ControllerNumber > 0 ) return ; @@ -917,11 +917,11 @@ * clear interrupt line (reset Local Interrupt Test Register) */ p = DIVA_OS_MEM_ATTACH_RESET(IoAdapter); - p[PLX9054_INTCSR] = 0x00 ; /* disable PCI interrupts */ + WRITE_BYTE(&p[PLX9054_INTCSR], 0x00); /* disable PCI interrupts */ DIVA_OS_MEM_DETACH_RESET(IoAdapter, p); p = DIVA_OS_MEM_ATTACH_CTLREG(IoAdapter); - qBriIrq = (dword volatile *)(&p[DIVA_4BRI_REVISION(IoAdapter) ? (MQ2_BREG_IRQ_TEST) : (MQ_BREG_IRQ_TEST)]); + qBriIrq = (dword volatile __iomem *)(&p[DIVA_4BRI_REVISION(IoAdapter) ? (MQ2_BREG_IRQ_TEST) : (MQ_BREG_IRQ_TEST)]); WRITE_DWORD(qBriIrq, MQ_IRQ_REQ_OFF) ; DIVA_OS_MEM_DETACH_CTLREG(IoAdapter, p); } diff -Nru a/drivers/isdn/hardware/eicon/s_bri.c b/drivers/isdn/hardware/eicon/s_bri.c --- a/drivers/isdn/hardware/eicon/s_bri.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/isdn/hardware/eicon/s_bri.c 2004-11-29 21:22:08 -08:00 @@ -41,11 +41,11 @@ Investigate card state, recovery trace buffer -------------------------------------------------------------------------- */ static void bri_cpu_trapped (PISDN_ADAPTER IoAdapter) { - byte *addrHi, *addrLo, *ioaddr ; + byte __iomem *addrHi, *addrLo, *ioaddr ; word *Xlog ; dword regs[4], i, size ; Xdesc xlogDesc ; - byte *Port; + byte __iomem *Port; /* * first read pointers and trap frame */ @@ -61,15 +61,15 @@ /* * check for trapped MIPS 3xxx CPU, dump only exception frame */ - if ( READ_DWORD(&Xlog[0x80 / sizeof(Xlog[0])]) == 0x99999999 ) + if ( GET_DWORD(&Xlog[0x80 / sizeof(Xlog[0])]) == 0x99999999 ) { dump_trap_frame (IoAdapter, &((byte *)Xlog)[0x90]) ; IoAdapter->trapped = 1 ; } - regs[0] = READ_DWORD(&((byte *)Xlog)[0x70]); - regs[1] = READ_DWORD(&((byte *)Xlog)[0x74]); - regs[2] = READ_DWORD(&((byte *)Xlog)[0x78]); - regs[3] = READ_DWORD(&((byte *)Xlog)[0x7c]); + regs[0] = GET_DWORD(&((byte *)Xlog)[0x70]); + regs[1] = GET_DWORD(&((byte *)Xlog)[0x74]); + regs[2] = GET_DWORD(&((byte *)Xlog)[0x78]); + regs[3] = GET_DWORD(&((byte *)Xlog)[0x7c]); outpp (addrHi, (regs[1] >> 16) & 0x7F) ; outppw (addrLo, regs[1] & 0xFFFF) ; xlogDesc.cnt = inppw(ioaddr) ; @@ -102,7 +102,7 @@ Reset hardware --------------------------------------------------------------------- */ static void reset_bri_hardware (PISDN_ADAPTER IoAdapter) { - byte *p = DIVA_OS_MEM_ATTACH_CTLREG(IoAdapter); + byte __iomem *p = DIVA_OS_MEM_ATTACH_CTLREG(IoAdapter); outpp (p, 0x00) ; DIVA_OS_MEM_DETACH_CTLREG(IoAdapter, p); } @@ -110,7 +110,7 @@ Halt system --------------------------------------------------------------------- */ static void stop_bri_hardware (PISDN_ADAPTER IoAdapter) { - byte *p = DIVA_OS_MEM_ATTACH_RESET(IoAdapter); + byte __iomem *p = DIVA_OS_MEM_ATTACH_RESET(IoAdapter); if (p) { outpp (p, 0x00) ; /* disable interrupts ! */ } @@ -471,7 +471,7 @@ #endif /* } */ /******************************************************************************/ static int bri_ISR (struct _ISDN_ADAPTER* IoAdapter) { - byte *p; + byte __iomem *p; p = DIVA_OS_MEM_ATTACH_CTLREG(IoAdapter); if ( !(inpp (p) & 0x01) ) { @@ -493,7 +493,7 @@ Disable IRQ in the card hardware -------------------------------------------------------------------------- */ static void disable_bri_interrupt (PISDN_ADAPTER IoAdapter) { - byte *p; + byte __iomem *p; p = DIVA_OS_MEM_ATTACH_RESET(IoAdapter); if ( p ) { diff -Nru a/drivers/isdn/hardware/eicon/s_pri.c b/drivers/isdn/hardware/eicon/s_pri.c --- a/drivers/isdn/hardware/eicon/s_pri.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/isdn/hardware/eicon/s_pri.c 2004-11-29 21:22:08 -08:00 @@ -47,7 +47,7 @@ Recovery XLOG buffer from the card ------------------------------------------------------------------------- */ static void pri_cpu_trapped (PISDN_ADAPTER IoAdapter) { - byte *base ; + byte __iomem *base ; word *Xlog ; dword regs[4], TrapID, size ; Xdesc xlogDesc ; @@ -75,7 +75,7 @@ size = IoAdapter->MemorySize - regs[0] ; if ( size > MAX_XLOG_SIZE ) size = MAX_XLOG_SIZE ; - memcpy (Xlog, &base[regs[0]], size) ; + memcpy_fromio(Xlog, &base[regs[0]], size) ; xlogDesc.buf = Xlog ; xlogDesc.cnt = READ_WORD(&base[regs[1] & (IoAdapter->MemorySize - 1)]) ; xlogDesc.out = READ_WORD(&base[regs[2] & (IoAdapter->MemorySize - 1)]) ; @@ -89,10 +89,10 @@ Hardware reset of PRI card ------------------------------------------------------------------------- */ static void reset_pri_hardware (PISDN_ADAPTER IoAdapter) { - byte *p = DIVA_OS_MEM_ATTACH_RESET(IoAdapter); - *p = _MP_RISC_RESET | _MP_LED1 | _MP_LED2 ; + byte __iomem *p = DIVA_OS_MEM_ATTACH_RESET(IoAdapter); + WRITE_BYTE(p, _MP_RISC_RESET | _MP_LED1 | _MP_LED2); diva_os_wait (50) ; - *p = 0x00 ; + WRITE_BYTE(p, 0x00); diva_os_wait (50) ; DIVA_OS_MEM_DETACH_RESET(IoAdapter, p); } @@ -101,10 +101,10 @@ ------------------------------------------------------------------------- */ static void stop_pri_hardware (PISDN_ADAPTER IoAdapter) { dword i; - byte *p; - dword volatile *cfgReg = (dword volatile *)DIVA_OS_MEM_ATTACH_CFG(IoAdapter); - cfgReg[3] = 0x00000000 ; - cfgReg[1] = 0x00000000 ; + byte __iomem *p; + dword volatile __iomem *cfgReg = (void __iomem *)DIVA_OS_MEM_ATTACH_CFG(IoAdapter); + WRITE_DWORD(&cfgReg[3], 0); + WRITE_DWORD(&cfgReg[1], 0); DIVA_OS_MEM_DETACH_CFG(IoAdapter, cfgReg); IoAdapter->a.ram_out (&IoAdapter->a, &RAM->SWReg, SWREG_HALT_CPU) ; i = 0 ; @@ -114,12 +114,12 @@ i++ ; } DBG_TRC(("%s: PRI stopped (%d)", IoAdapter->Name, i)) - cfgReg = (dword volatile *)DIVA_OS_MEM_ATTACH_CFG(IoAdapter); + cfgReg = (void __iomem *)DIVA_OS_MEM_ATTACH_CFG(IoAdapter); WRITE_DWORD(&cfgReg[0],((dword)(~0x03E00000))); DIVA_OS_MEM_DETACH_CFG(IoAdapter, cfgReg); diva_os_wait (1) ; p = DIVA_OS_MEM_ATTACH_RESET(IoAdapter); - *p = _MP_RISC_RESET | _MP_LED1 | _MP_LED2 ; + WRITE_BYTE(p, _MP_RISC_RESET | _MP_LED1 | _MP_LED2); DIVA_OS_MEM_DETACH_RESET(IoAdapter, p); } #if !defined(DIVA_USER_MODE_CARD_CONFIG) /* { */ @@ -491,15 +491,15 @@ PRI Adapter interrupt Service Routine -------------------------------------------------------------------------- */ static int pri_ISR (struct _ISDN_ADAPTER* IoAdapter) { - byte *cfg = DIVA_OS_MEM_ATTACH_CFG(IoAdapter); - if ( !((READ_DWORD((dword *)cfg)) & 0x80000000) ) { + byte __iomem *cfg = DIVA_OS_MEM_ATTACH_CFG(IoAdapter); + if ( !(READ_DWORD(cfg) & 0x80000000) ) { DIVA_OS_MEM_DETACH_CFG(IoAdapter, cfg); return (0) ; } /* clear interrupt line */ - WRITE_DWORD(((dword *)cfg), (dword)~0x03E00000) ; + WRITE_DWORD(cfg, (dword)~0x03E00000) ; DIVA_OS_MEM_DETACH_CFG(IoAdapter, cfg); IoAdapter->IrqCount++ ; if ( IoAdapter->Initialized ) @@ -512,9 +512,9 @@ Disable interrupt in the card hardware ------------------------------------------------------------------------- */ static void disable_pri_interrupt (PISDN_ADAPTER IoAdapter) { - dword volatile *cfgReg = (dword volatile *)DIVA_OS_MEM_ATTACH_CFG(IoAdapter) ; - cfgReg[3] = 0x00000000 ; - cfgReg[1] = 0x00000000 ; + dword volatile __iomem *cfgReg = (dword volatile __iomem *)DIVA_OS_MEM_ATTACH_CFG(IoAdapter) ; + WRITE_DWORD(&cfgReg[3], 0); + WRITE_DWORD(&cfgReg[1], 0); WRITE_DWORD(&cfgReg[0], (dword)(~0x03E00000)) ; DIVA_OS_MEM_DETACH_CFG(IoAdapter, cfgReg); } diff -Nru a/drivers/isdn/hardware/eicon/xdi_adapter.h b/drivers/isdn/hardware/eicon/xdi_adapter.h --- a/drivers/isdn/hardware/eicon/xdi_adapter.h 2004-11-29 21:22:07 -08:00 +++ b/drivers/isdn/hardware/eicon/xdi_adapter.h 2004-11-29 21:22:07 -08:00 @@ -12,7 +12,7 @@ void *hdev; dword bar[8]; /* contains context of appropriate BAR Register */ - void *addr[8]; /* same bar, but mapped into memory */ + void __iomem *addr[8]; /* same bar, but mapped into memory */ dword length[8]; /* bar length */ int mem_type_id[MAX_MEM_TYPE]; unsigned int qoffset; diff -Nru a/drivers/isdn/i4l/Kconfig b/drivers/isdn/i4l/Kconfig --- a/drivers/isdn/i4l/Kconfig 2004-11-29 21:22:07 -08:00 +++ b/drivers/isdn/i4l/Kconfig 2004-11-29 21:22:07 -08:00 @@ -99,7 +99,7 @@ config ISDN_DIVERSION tristate "Support isdn diversion services" - depends on BROKEN && BROKEN_ON_SMP + depends on ISDN && ISDN_I4L help This option allows you to use some supplementary diversion services in conjunction with the HiSax driver on an EURO/DSS1 diff -Nru a/drivers/isdn/pcbit/drv.c b/drivers/isdn/pcbit/drv.c --- a/drivers/isdn/pcbit/drv.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/isdn/pcbit/drv.c 2004-11-29 21:22:08 -08:00 @@ -859,7 +859,7 @@ printk(KERN_DEBUG "Bank3 = %02x\n", readb(dev->sh_mem + BANK3)); #endif - *(dev->sh_mem + BANK4) = 0x40U; + writeb(0x40, dev->sh_mem + BANK4); /* warn the upper layer */ ctl.driver = dev->id; diff -Nru a/drivers/isdn/tpam/tpam.h b/drivers/isdn/tpam/tpam.h --- a/drivers/isdn/tpam/tpam.h 2004-11-29 21:22:06 -08:00 +++ b/drivers/isdn/tpam/tpam.h 2004-11-29 21:22:06 -08:00 @@ -77,7 +77,7 @@ typedef struct tpam_card { struct tpam_card *next; /* next card in list */ unsigned int irq; /* IRQ used by this board */ - unsigned long bar0; /* ioremapped bar0 */ + void __iomem *bar0; /* ioremapped bar0 */ int id; /* id of the board */ isdn_if interface; /* isdn link-level pointer */ int channels_used; /* number of channels actually used */ @@ -171,12 +171,12 @@ extern u32 tpam_findchannel(tpam_card *, u32); /* Function prototypes from tpam_memory.c */ -extern void copy_to_pam_dword(tpam_card *, const void *, u32); -extern void copy_to_pam(tpam_card *, void *, const void *, u32); -extern u32 copy_from_pam_dword(tpam_card *, const void *); -extern void copy_from_pam(tpam_card *, void *, const void *, u32); -extern int copy_from_pam_to_user(tpam_card *, void __user *, const void *, u32); -extern int copy_from_user_to_pam(tpam_card *, void *, const void __user *, u32); +extern void copy_to_pam_dword(tpam_card *, u32, u32); +extern void copy_to_pam(tpam_card *, u32, const void *, u32); +extern u32 copy_from_pam_dword(tpam_card *, u32); +extern void copy_from_pam(tpam_card *, void *, u32, u32); +extern int copy_from_pam_to_user(tpam_card *, void __user *, u32, u32); +extern int copy_from_user_to_pam(tpam_card *, u32, const void __user *, u32); extern int tpam_verify_area(u32, u32); /* Function prototypes from tpam_nco.c */ diff -Nru a/drivers/isdn/tpam/tpam_commands.c b/drivers/isdn/tpam/tpam_commands.c --- a/drivers/isdn/tpam/tpam_commands.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/isdn/tpam/tpam_commands.c 2004-11-29 21:22:06 -08:00 @@ -21,8 +21,8 @@ #include "tpam.h" /* Local functions prototypes */ -static int tpam_command_ioctl_dspload(tpam_card *, u32); -static int tpam_command_ioctl_dspsave(tpam_card *, u32); +static int tpam_command_ioctl_dspload(tpam_card *, unsigned long); +static int tpam_command_ioctl_dspsave(tpam_card *, unsigned long); static int tpam_command_ioctl_dsprun(tpam_card *); static int tpam_command_ioctl_loopmode(tpam_card *, u8); static int tpam_command_dial(tpam_card *, u32, u8 *); @@ -114,7 +114,7 @@ * * Return: 0 if OK, <0 on errors. */ -static int tpam_command_ioctl_dspload(tpam_card *card, u32 arg) { +static int tpam_command_ioctl_dspload(tpam_card *card, unsigned long arg) { tpam_dsp_ioctl tdl; pr_debug("TurboPAM(tpam_command_ioctl_dspload): card=%d\n", card->id); @@ -130,7 +130,7 @@ return -EPERM; /* write the data in the board's memory */ - return copy_from_user_to_pam(card, (void *)tdl.address, + return copy_from_user_to_pam(card, tdl.address, (void __user *)arg + sizeof(tpam_dsp_ioctl), tdl.data_len); } @@ -144,7 +144,7 @@ * * Return: 0 if OK, <0 on errors. */ -static int tpam_command_ioctl_dspsave(tpam_card *card, u32 arg) { +static int tpam_command_ioctl_dspsave(tpam_card *card, unsigned long arg) { tpam_dsp_ioctl tdl; pr_debug("TurboPAM(tpam_command_ioctl_dspsave): card=%d\n", card->id); @@ -159,7 +159,7 @@ /* read the data from the board's memory */ return copy_from_pam_to_user(card, (void __user *)arg + sizeof(tpam_dsp_ioctl), - (void *)tdl.address, tdl.data_len); + tdl.address, tdl.data_len); } /* @@ -186,7 +186,7 @@ /* reset the board */ spin_lock_irq(&card->lock); - copy_to_pam_dword(card, (void *)TPAM_MAGICNUMBER_REGISTER, 0xdeadface); + copy_to_pam_dword(card, TPAM_MAGICNUMBER_REGISTER, 0xdeadface); readl(card->bar0 + TPAM_DSPINT_REGISTER); readl(card->bar0 + TPAM_HINTACK_REGISTER); spin_unlock_irq(&card->lock); @@ -196,7 +196,7 @@ while (time_before(jiffies, timeout)) { spin_lock_irq(&card->lock); signature = copy_from_pam_dword(card, - (void *)TPAM_MAGICNUMBER_REGISTER); + TPAM_MAGICNUMBER_REGISTER); spin_unlock_irq(&card->lock); if (signature == TPAM_MAGICNUMBER) break; @@ -531,14 +531,14 @@ if (!(tempdata = (void *)__get_free_page(GFP_ATOMIC))) { printk(KERN_ERR "TurboPAM(tpam_writebuf_skb): " "get_free_page failed\n"); - free_page((u32)finaldata); + free_page((unsigned long)finaldata); return -ENOMEM; } hdlc_no_accm_encode(skb->data, skb->len, tempdata, &templen); finallen = tpam_hdlc_encode(tempdata, finaldata, &card->channels[channel].hdlcshift, templen); - free_page((u32)tempdata); + free_page((unsigned long)tempdata); } /* free the old sk_buff */ @@ -548,13 +548,13 @@ skb = build_U3DataReq(card->channels[channel].ncoid, finaldata, finallen, ack, orig_size); if (!skb) { - free_page((u32)finaldata); + free_page((unsigned long)finaldata); return -ENOMEM; } tpam_enqueue_data(&card->channels[channel], skb); /* free the temporary memory */ - free_page((u32)finaldata); + free_page((unsigned long)finaldata); return orig_size; } @@ -865,11 +865,11 @@ if (!(result = alloc_skb(templen, GFP_ATOMIC))) { printk(KERN_ERR "TurboPAM(tpam_recv_U3DataInd): " "alloc_skb failed\n"); - free_page((u32)tempdata); + free_page((unsigned long)tempdata); return; } memcpy(skb_put(result, templen), tempdata, templen); - free_page((u32)tempdata); + free_page((unsigned long)tempdata); } else { /* modem mode */ diff -Nru a/drivers/isdn/tpam/tpam_main.c b/drivers/isdn/tpam/tpam_main.c --- a/drivers/isdn/tpam/tpam_main.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/isdn/tpam/tpam_main.c 2004-11-29 21:22:08 -08:00 @@ -118,7 +118,7 @@ } /* remap board memory */ - if (!(card->bar0 = (unsigned long) ioremap(pci_resource_start(dev, 0), + if (!(card->bar0 = ioremap(pci_resource_start(dev, 0), 0x800000))) { printk(KERN_ERR "TurboPAM: tpam_register_card: " "unable to remap bar0\n"); @@ -130,12 +130,12 @@ readl(card->bar0 + TPAM_RESETPAM_REGISTER); /* initialisation magic :-( */ - copy_to_pam_dword(card, (void *)0x01800008, 0x00000030); - copy_to_pam_dword(card, (void *)0x01800010, 0x00000030); - copy_to_pam_dword(card, (void *)0x01800014, 0x42240822); - copy_to_pam_dword(card, (void *)0x01800018, 0x07114000); - copy_to_pam_dword(card, (void *)0x0180001c, 0x00000400); - copy_to_pam_dword(card, (void *)0x01840070, 0x00000010); + copy_to_pam_dword(card, 0x01800008, 0x00000030); + copy_to_pam_dword(card, 0x01800010, 0x00000030); + copy_to_pam_dword(card, 0x01800014, 0x42240822); + copy_to_pam_dword(card, 0x01800018, 0x07114000); + copy_to_pam_dword(card, 0x0180001c, 0x00000400); + copy_to_pam_dword(card, 0x01840070, 0x00000010); /* fill the ISDN link layer structure */ card->interface.owner = THIS_MODULE; @@ -201,7 +201,7 @@ return 0; err_out_iounmap: - iounmap((void *)card->bar0); + iounmap(card->bar0); err_out_free_irq: free_irq(card->irq, card); @@ -231,7 +231,7 @@ free_irq(card->irq, card); /* release mapped memory */ - iounmap((void *)card->bar0); + iounmap(card->bar0); pci_disable_device(pcidev); } diff -Nru a/drivers/isdn/tpam/tpam_memory.c b/drivers/isdn/tpam/tpam_memory.c --- a/drivers/isdn/tpam/tpam_memory.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/isdn/tpam/tpam_memory.c 2004-11-29 21:22:07 -08:00 @@ -23,14 +23,14 @@ * addr: the address (in the board memory) * val: the value to put into the memory. */ -void copy_to_pam_dword(tpam_card *card, const void *addr, u32 val) { +void copy_to_pam_dword(tpam_card *card, u32 addr, u32 val) { /* set the page register */ - writel(((unsigned long)addr) | TPAM_PAGE_SIZE, + writel(addr | TPAM_PAGE_SIZE, card->bar0 + TPAM_PAGE_REGISTER); /* write the value */ - writel(val, card->bar0 + (((unsigned long)addr) & TPAM_PAGE_SIZE)); + writel(val, card->bar0 + (addr & TPAM_PAGE_SIZE)); } /* @@ -42,15 +42,15 @@ * from: the source address (in the kernel memory) * n: number of bytes */ -void copy_to_pam(tpam_card *card, void *to, const void *from, u32 n) { +void copy_to_pam(tpam_card *card, u32 to, const void *from, u32 n) { u32 page, offset, count; /* need to write in dword ! */ while (n & 3) n++; while (n) { - page = ((u32)to) | TPAM_PAGE_SIZE; - offset = ((u32)to) & TPAM_PAGE_SIZE; + page = to | TPAM_PAGE_SIZE; + offset = to & TPAM_PAGE_SIZE; count = n < TPAM_PAGE_SIZE - offset ? n : TPAM_PAGE_SIZE - offset; @@ -59,7 +59,7 @@ writel(page, card->bar0 + TPAM_PAGE_REGISTER); /* copy the data */ - memcpy_toio((void *)(card->bar0 + offset), from, count); + memcpy_toio(card->bar0 + offset, from, count); from += count; to += count; @@ -75,14 +75,14 @@ * * Return: the value read into the memory. */ -u32 copy_from_pam_dword(tpam_card *card, const void *addr) { +u32 copy_from_pam_dword(tpam_card *card, u32 addr) { /* set the page register */ writel(((u32)addr) | TPAM_PAGE_SIZE, card->bar0 + TPAM_PAGE_REGISTER); /* read the data */ - return readl(card->bar0 + (((u32)addr) & TPAM_PAGE_SIZE)); + return readl(card->bar0 + (addr & TPAM_PAGE_SIZE)); } /* @@ -93,12 +93,12 @@ * from: the source address (in the board memory) * n: number of bytes */ -void copy_from_pam(tpam_card *card, void *to, const void *from, u32 n) { +void copy_from_pam(tpam_card *card, void *to, u32 from, u32 n) { u32 page, offset, count; while (n) { - page = ((u32)from) | TPAM_PAGE_SIZE; - offset = ((u32)from) & TPAM_PAGE_SIZE; + page = from | TPAM_PAGE_SIZE; + offset = from & TPAM_PAGE_SIZE; count = n < TPAM_PAGE_SIZE - offset ? n : TPAM_PAGE_SIZE - offset; @@ -107,7 +107,7 @@ writel(page, card->bar0 + TPAM_PAGE_REGISTER); /* read the data */ - memcpy_fromio(to, (void *)(card->bar0 + offset), count); + memcpy_fromio(to, card->bar0 + offset, count); from += count; to += count; @@ -125,7 +125,7 @@ * * Return: 0 if OK, <0 if error. */ -int copy_from_pam_to_user(tpam_card *card, void __user *to, const void *from, u32 n) { +int copy_from_pam_to_user(tpam_card *card, void __user *to, u32 from, u32 n) { void *page; u32 count; @@ -148,7 +148,7 @@ if (copy_to_user(to, page, count)) { /* this can fail... */ - free_page((u32)page); + free_page((unsigned long)page); return -EFAULT; } from += count; @@ -157,7 +157,7 @@ } /* release allocated memory */ - free_page((u32)page); + free_page((unsigned long)page); return 0; } @@ -171,7 +171,7 @@ * * Return: 0 if OK, <0 if error. */ -int copy_from_user_to_pam(tpam_card *card, void *to, const void __user *from, u32 n) { +int copy_from_user_to_pam(tpam_card *card, u32 to, const void __user *from, u32 n) { void *page; u32 count; @@ -188,7 +188,7 @@ /* copy data from the user memory into the kernel memory */ if (copy_from_user(page, from, count)) { /* this can fail... */ - free_page((u32)page); + free_page((unsigned long)page); return -EFAULT; } @@ -203,7 +203,7 @@ } /* release allocated memory */ - free_page((u32)page); + free_page((unsigned long)page); return 0; } diff -Nru a/drivers/isdn/tpam/tpam_queues.c b/drivers/isdn/tpam/tpam_queues.c --- a/drivers/isdn/tpam/tpam_queues.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/isdn/tpam/tpam_queues.c 2004-11-29 21:22:08 -08:00 @@ -90,10 +90,10 @@ spin_lock(&card->lock); /* get the message type */ - ackupload = copy_from_pam_dword(card, (void *)TPAM_ACKUPLOAD_REGISTER); + ackupload = copy_from_pam_dword(card, TPAM_ACKUPLOAD_REGISTER); /* acknowledge the interrupt */ - copy_to_pam_dword(card, (void *)TPAM_INTERRUPTACK_REGISTER, 0); + copy_to_pam_dword(card, TPAM_INTERRUPTACK_REGISTER, 0); readl(card->bar0 + TPAM_HINTACK_REGISTER); if (!ackupload) { @@ -104,10 +104,10 @@ /* get the upload pointer */ uploadptr = copy_from_pam_dword(card, - (void *)TPAM_UPLOADPTR_REGISTER); + TPAM_UPLOADPTR_REGISTER); /* get the beginning of the message (pci_mpb part) */ - copy_from_pam(card, &mpb, (void *)uploadptr, sizeof(pci_mpb)); + copy_from_pam(card, &mpb, uploadptr, sizeof(pci_mpb)); /* allocate the sk_buff */ if (!(skb = alloc_skb(sizeof(skb_header) + sizeof(pci_mpb) + @@ -131,13 +131,13 @@ /* copy the TLV block into the sk_buff */ copy_from_pam(card, skb_put(skb, mpb.actualBlockTLVSize), - (void *)uploadptr + sizeof(pci_mpb), + uploadptr + sizeof(pci_mpb), mpb.actualBlockTLVSize); /* if existent, copy the data block into the sk_buff */ if (mpb.actualDataSize) copy_from_pam(card, skb_put(skb, mpb.actualDataSize), - (void *)uploadptr + sizeof(pci_mpb) + 4096, + uploadptr + sizeof(pci_mpb) + 4096, mpb.actualDataSize); /* wait for the board to become ready */ @@ -154,7 +154,7 @@ } while (hpic & 0x00000002); /* acknowledge the message */ - copy_to_pam_dword(card, (void *)TPAM_ACKDOWNLOAD_REGISTER, + copy_to_pam_dword(card, TPAM_ACKDOWNLOAD_REGISTER, 0xffffffff); readl(card->bar0 + TPAM_DSPINT_REGISTER); @@ -362,15 +362,14 @@ card->id, skbh->size, skbh->data_size); /* get the board's download pointer */ - downloadptr = copy_from_pam_dword(card, - (void *)TPAM_DOWNLOADPTR_REGISTER); + downloadptr = copy_from_pam_dword(card, TPAM_DOWNLOADPTR_REGISTER); /* copy the packet to the board at the downloadptr location */ - copy_to_pam(card, (void *)downloadptr, skb->data + sizeof(skb_header), + copy_to_pam(card, downloadptr, skb->data + sizeof(skb_header), skbh->size); if (skbh->data_size) /* if there is some data in the packet, copy it too */ - copy_to_pam(card, (void *)downloadptr + sizeof(pci_mpb) + 4096, + copy_to_pam(card, downloadptr + sizeof(pci_mpb) + 4096, skb->data + sizeof(skb_header) + skbh->size, skbh->data_size); @@ -378,7 +377,7 @@ card->busy = 1; /* interrupt the board */ - copy_to_pam_dword(card, (void *)TPAM_ACKDOWNLOAD_REGISTER, 0); + copy_to_pam_dword(card, TPAM_ACKDOWNLOAD_REGISTER, 0); readl(card->bar0 + TPAM_DSPINT_REGISTER); /* release the lock */ diff -Nru a/drivers/macintosh/ans-lcd.c b/drivers/macintosh/ans-lcd.c --- a/drivers/macintosh/ans-lcd.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/macintosh/ans-lcd.c 2004-11-29 21:22:08 -08:00 @@ -23,7 +23,7 @@ static unsigned long anslcd_short_delay = 80; static unsigned long anslcd_long_delay = 3280; -static volatile unsigned char* anslcd_ptr; +static volatile unsigned char __iomem *anslcd_ptr; #undef DEBUG @@ -151,12 +151,12 @@ if (strcmp(node->parent->name, "gc")) return -ENODEV; - anslcd_ptr = (volatile unsigned char*)ioremap(ANSLCD_ADDR, 0x20); + anslcd_ptr = ioremap(ANSLCD_ADDR, 0x20); retval = misc_register(&anslcd_dev); if(retval < 0){ printk(KERN_INFO "LCD: misc_register failed\n"); - iounmap((void *)anslcd_ptr); + iounmap(anslcd_ptr); return retval; } @@ -179,7 +179,7 @@ anslcd_exit(void) { misc_deregister(&anslcd_dev); - iounmap((void *)anslcd_ptr); + iounmap(anslcd_ptr); } module_init(anslcd_init); diff -Nru a/drivers/macintosh/macio-adb.c b/drivers/macintosh/macio-adb.c --- a/drivers/macintosh/macio-adb.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/macintosh/macio-adb.c 2004-11-29 21:22:08 -08:00 @@ -57,7 +57,7 @@ /* Bits in autopoll register */ #define APE 1 /* autopoll enable */ -static volatile struct adb_regs *adb; +static volatile struct adb_regs __iomem *adb; static struct adb_request *current_req, *last_req; static spinlock_t macio_lock = SPIN_LOCK_UNLOCKED; @@ -105,8 +105,7 @@ printk("\n"); } #endif - adb = (volatile struct adb_regs *) - ioremap(adbs->addrs->address, sizeof(struct adb_regs)); + adb = ioremap(adbs->addrs->address, sizeof(struct adb_regs)); out_8(&adb->ctrl.r, 0); out_8(&adb->intr.r, 0); diff -Nru a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c --- a/drivers/macintosh/mediabay.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/macintosh/mediabay.c 2004-11-29 21:22:07 -08:00 @@ -45,7 +45,7 @@ #endif #define MB_FCR32(bay, r) ((bay)->base + ((r) >> 2)) -#define MB_FCR8(bay, r) (((volatile u8*)((bay)->base)) + (r)) +#define MB_FCR8(bay, r) (((volatile u8 __iomem *)((bay)->base)) + (r)) #define MB_IN32(bay,r) (in_le32(MB_FCR32(bay,r))) #define MB_OUT32(bay,r,v) (out_le32(MB_FCR32(bay,r), (v))) @@ -67,7 +67,7 @@ }; struct media_bay_info { - volatile u32* base; + u32 __iomem *base; int content_id; int state; int last_value; @@ -80,7 +80,7 @@ int sleeping; struct semaphore lock; #ifdef CONFIG_BLK_DEV_IDE - unsigned long cd_base; + void __iomem *cd_base; int cd_index; int cd_irq; int cd_retry; @@ -443,7 +443,7 @@ int i; for (i=0; ilock); - bay->cd_base = base; + bay->cd_base = (void __iomem *) base; bay->cd_irq = irq; if ((MB_CD != bay->content_id) || bay->state != mb_up) { @@ -553,7 +553,7 @@ break; case mb_ide_waiting: - if (bay->cd_base == 0) { + if (bay->cd_base == NULL) { bay->timer = 0; bay->state = mb_up; MBDBG("mediabay%d: up before IDE init\n", i); @@ -651,7 +651,7 @@ static int __devinit media_bay_attach(struct macio_dev *mdev, const struct of_match *match) { struct media_bay_info* bay; - volatile u32 *regbase; + u32 __iomem *regbase; struct device_node *ofnode; int i; @@ -664,7 +664,8 @@ /* Media bay registers are located at the beginning of the * mac-io chip, we get the parent address for now (hrm...) */ - regbase = (volatile u32 *)ioremap(ofnode->parent->addrs[0].address, 0x100); + regbase = (u32 __iomem *) + ioremap(ofnode->parent->addrs[0].address, 0x100); if (regbase == NULL) { macio_release_resources(mdev); return -ENOMEM; @@ -713,13 +714,13 @@ { struct media_bay_info *bay = macio_get_drvdata(mdev); - if (state != mdev->ofdev.dev.power_state && state >= 2) { + if (state != mdev->ofdev.dev.power.power_state && state == PM_SUSPEND_MEM) { down(&bay->lock); bay->sleeping = 1; set_mb_power(bay, 0); up(&bay->lock); msleep(MB_POLL_DELAY); - mdev->ofdev.dev.power_state = state; + mdev->ofdev.dev.power.power_state = state; } return 0; } @@ -728,8 +729,8 @@ { struct media_bay_info *bay = macio_get_drvdata(mdev); - if (mdev->ofdev.dev.power_state != 0) { - mdev->ofdev.dev.power_state = 0; + if (mdev->ofdev.dev.power.power_state != 0) { + mdev->ofdev.dev.power.power_state = 0; /* We re-enable the bay using it's previous content only if it did not change. Note those bozo timings, diff -Nru a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c --- a/drivers/macintosh/therm_adt746x.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/macintosh/therm_adt746x.c 2004-11-29 21:22:08 -08:00 @@ -23,6 +23,8 @@ #include #include #include +#include +#include #include #include @@ -30,7 +32,6 @@ #include #include #include -#include #undef DEBUG @@ -56,11 +57,11 @@ "Powerbook G4 Alu"); MODULE_LICENSE("GPL"); -MODULE_PARM(limit_adjust,"i"); +module_param(limit_adjust, int, 0644); MODULE_PARM_DESC(limit_adjust,"Adjust maximum temperatures (50 cpu, 70 gpu) " "by N degrees."); -MODULE_PARM(fan_speed,"i"); +module_param(fan_speed, int, 0644); MODULE_PARM_DESC(fan_speed,"Specify starting fan speed (0-255) " "(default 64)"); diff -Nru a/drivers/macintosh/via-cuda.c b/drivers/macintosh/via-cuda.c --- a/drivers/macintosh/via-cuda.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/macintosh/via-cuda.c 2004-11-29 21:22:06 -08:00 @@ -32,7 +32,7 @@ #include #include -static volatile unsigned char *via; +static volatile unsigned char __iomem *via; static spinlock_t cuda_lock = SPIN_LOCK_UNLOCKED; #ifdef CONFIG_MAC @@ -160,7 +160,7 @@ if (vias->n_addrs < 1 || vias->n_intrs < 1) return 0; } - via = (volatile unsigned char *) ioremap(vias->addrs->address, 0x2000); + via = ioremap(vias->addrs->address, 0x2000); cuda_state = idle; sys_ctrler = SYS_CTRLER_CUDA; diff -Nru a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c --- a/drivers/macintosh/via-pmu.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/macintosh/via-pmu.c 2004-11-29 21:22:08 -08:00 @@ -72,7 +72,7 @@ /* How many iterations between battery polls */ #define BATTERY_POLLING_COUNT 2 -static volatile unsigned char *via; +static volatile unsigned char __iomem *via; /* VIA registers - spaced 0x200 bytes apart */ #define RS 0x200 /* skip between registers */ @@ -141,7 +141,7 @@ static int pmu_kind = PMU_UNKNOWN; static int pmu_fully_inited = 0; static int pmu_has_adb; -static unsigned char *gpio_reg = NULL; +static unsigned char __iomem *gpio_reg = NULL; static int gpio_irq = -1; static int gpio_irq_enabled = -1; static volatile int pmu_suspended = 0; @@ -352,7 +352,7 @@ } else pmu_kind = PMU_UNKNOWN; - via = (volatile unsigned char *) ioremap(vias->addrs->address, 0x2000); + via = ioremap(vias->addrs->address, 0x2000); out_8(&via[IER], IER_CLR | 0x7f); /* disable all intrs */ out_8(&via[IFR], 0x7f); /* clear IFR */ @@ -1164,7 +1164,7 @@ static inline void send_byte(int x) { - volatile unsigned char *v = via; + volatile unsigned char __iomem *v = via; out_8(&v[ACR], in_8(&v[ACR]) | SR_OUT | SR_EXT); out_8(&v[SR], x); @@ -1175,7 +1175,7 @@ static inline void recv_byte(void) { - volatile unsigned char *v = via; + volatile unsigned char __iomem *v = via; out_8(&v[ACR], (in_8(&v[ACR]) & ~SR_OUT) | SR_EXT); in_8(&v[SR]); /* resets SR */ @@ -2630,8 +2630,8 @@ unsigned int hid0; unsigned long p; struct adb_request sleep_req; - char *mem_ctrl; - unsigned int *mem_ctrl_sleep; + void __iomem *mem_ctrl; + unsigned int __iomem *mem_ctrl_sleep; /* first map in the memory controller registers */ mem_ctrl = ioremap(PB3400_MEM_CTRL, 0x100); @@ -2639,7 +2639,7 @@ printk("powerbook_sleep_3400: ioremap failed\n"); return -ENOMEM; } - mem_ctrl_sleep = (unsigned int *) (mem_ctrl + PB3400_MEM_CTRL_SLEEP); + mem_ctrl_sleep = mem_ctrl + PB3400_MEM_CTRL_SLEEP; /* Allocate room for PCI save */ pbook_alloc_pci_save(); @@ -2977,7 +2977,7 @@ #ifdef DEBUG_SLEEP static inline void __pmac -polled_handshake(volatile unsigned char *via) +polled_handshake(volatile unsigned char __iomem *via) { via[B] &= ~TREQ; eieio(); while ((via[B] & TACK) != 0) @@ -2988,7 +2988,7 @@ } static inline void __pmac -polled_send_byte(volatile unsigned char *via, int x) +polled_send_byte(volatile unsigned char __iomem *via, int x) { via[ACR] |= SR_OUT | SR_EXT; eieio(); via[SR] = x; eieio(); @@ -2996,7 +2996,7 @@ } static inline int __pmac -polled_recv_byte(volatile unsigned char *via) +polled_recv_byte(volatile unsigned char __iomem *via) { int x; @@ -3012,7 +3012,7 @@ { unsigned long flags; int i, l, c; - volatile unsigned char *v = via; + volatile unsigned char __iomem *v = via; req->complete = 1; c = req->data[0]; diff -Nru a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c --- a/drivers/md/dm-crypt.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/md/dm-crypt.c 2004-11-29 21:22:06 -08:00 @@ -569,8 +569,8 @@ } cc->key_size = key_size; - if ((key_size == 0 && strcmp(argv[1], "-") != 0) - || crypt_decode_key(cc->key, argv[1], key_size) < 0) { + if ((!key_size && strcmp(argv[1], "-") != 0) || + (key_size && crypt_decode_key(cc->key, argv[1], key_size) < 0)) { ti->error = PFX "Error decoding key"; goto bad1; } diff -Nru a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c --- a/drivers/md/dm-ioctl.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/md/dm-ioctl.c 2004-11-29 21:22:07 -08:00 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001, 2002 Sistina Software (UK) Limited. + * Copyright (C) 2004 Red Hat, Inc. All rights reserved. * * This file is released under the GPL. */ @@ -17,7 +18,7 @@ #include -#define DM_DRIVER_EMAIL "dm@uk.sistina.com" +#define DM_DRIVER_EMAIL "dm-devel@redhat.com" /*----------------------------------------------------------------- * The ioctl interface needs to be able to look up devices by @@ -224,6 +225,7 @@ } register_with_devfs(cell); dm_get(md); + dm_set_mdptr(md, cell); up_write(&_hash_lock); return 0; @@ -240,6 +242,7 @@ list_del(&hc->uuid_list); list_del(&hc->name_list); unregister_with_devfs(hc); + dm_set_mdptr(hc->md, NULL); dm_put(hc->md); if (hc->new_map) dm_table_put(hc->new_map); @@ -579,12 +582,16 @@ } /* - * Always use UUID for lookups if it's present, otherwise use name. + * Always use UUID for lookups if it's present, otherwise use name or dev. */ static inline struct hash_cell *__find_device_hash_cell(struct dm_ioctl *param) { - return *param->uuid ? - __get_uuid_cell(param->uuid) : __get_name_cell(param->name); + if (*param->uuid) + return __get_uuid_cell(param->uuid); + else if (*param->name) + return __get_name_cell(param->name); + else + return dm_get_mdptr(huge_decode_dev(param->dev)); } static inline struct mapped_device *find_device(struct dm_ioctl *param) @@ -596,6 +603,7 @@ hc = __find_device_hash_cell(param); if (hc) { md = hc->md; + dm_get(md); /* * Sneakily write in both the name and the uuid @@ -611,8 +619,6 @@ param->flags |= DM_INACTIVE_PRESENT_FLAG; else param->flags &= ~DM_INACTIVE_PRESENT_FLAG; - - dm_get(md); } up_read(&_hash_lock); @@ -1097,6 +1103,67 @@ return r; } +/* + * Pass a message to the target that's at the supplied device offset. + */ +static int target_message(struct dm_ioctl *param, size_t param_size) +{ + int r, argc; + char **argv; + struct mapped_device *md; + struct dm_table *table; + struct dm_target *ti; + struct dm_target_msg *tmsg = (void *) param + param->data_start; + + md = find_device(param); + if (!md) + return -ENXIO; + + r = __dev_status(md, param); + if (r) + goto out; + + if (tmsg < (struct dm_target_msg *) (param + 1) || + invalid_str(tmsg->message, (void *) param + param_size)) { + DMWARN("Invalid target message parameters."); + r = -EINVAL; + goto out; + } + + r = dm_split_args(&argc, &argv, tmsg->message); + if (r) { + DMWARN("Failed to split target message parameters"); + goto out; + } + + table = dm_get_table(md); + if (!table) + goto out_argv; + + if (tmsg->sector >= dm_table_get_size(table)) { + DMWARN("Target message sector outside device."); + r = -EINVAL; + goto out_table; + } + + ti = dm_table_find_target(table, tmsg->sector); + if (ti->type->message) + r = ti->type->message(ti, argc, argv); + else { + DMWARN("Target type does not support messages"); + r = -EINVAL; + } + + out_table: + dm_table_put(table); + out_argv: + kfree(argv); + out: + param->data_size = 0; + dm_put(md); + return r; +} + /*----------------------------------------------------------------- * Implementation of open/close/ioctl on the special char * device. @@ -1123,7 +1190,9 @@ {DM_TABLE_DEPS_CMD, table_deps}, {DM_TABLE_STATUS_CMD, table_status}, - {DM_LIST_VERSIONS_CMD, list_versions} + {DM_LIST_VERSIONS_CMD, list_versions}, + + {DM_TARGET_MSG_CMD, target_message} }; return (cmd >= ARRAY_SIZE(_ioctls)) ? NULL : _ioctls[cmd].fn; @@ -1202,14 +1271,14 @@ cmd == DM_LIST_VERSIONS_CMD) return 0; - /* Unless creating, either name or uuid but not both */ - if (cmd != DM_DEV_CREATE_CMD) { - if ((!*param->uuid && !*param->name) || - (*param->uuid && *param->name)) { - DMWARN("one of name or uuid must be supplied, cmd(%u)", - cmd); + if ((cmd == DM_DEV_CREATE_CMD)) { + if (!*param->name) { + DMWARN("name not supplied when creating device"); return -EINVAL; } + } else if ((*param->uuid && *param->name)) { + DMWARN("only supply one of name or uuid, cmd(%u)", cmd); + return -EINVAL; } /* Ensure strings are terminated */ diff -Nru a/drivers/md/dm-table.c b/drivers/md/dm-table.c --- a/drivers/md/dm-table.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/md/dm-table.c 2004-11-29 21:22:08 -08:00 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001 Sistina Software (UK) Limited. + * Copyright (C) 2004 Red Hat, Inc. All rights reserved. * * This file is released under the GPL. */ @@ -575,7 +576,7 @@ /* * Destructively splits up the argument list to pass to ctr. */ -static int split_args(int *argc, char ***argvp, char *input) +int dm_split_args(int *argc, char ***argvp, char *input) { char *start, *end = input, *out, **argv = NULL; unsigned array_size = 0; @@ -663,14 +664,14 @@ if (!len) { tgt->error = "zero-length target"; - DMERR(": %s\n", tgt->error); + DMERR("%s", tgt->error); return -EINVAL; } tgt->type = dm_get_target_type(type); if (!tgt->type) { tgt->error = "unknown target type"; - DMERR(": %s\n", tgt->error); + DMERR("%s", tgt->error); return -EINVAL; } @@ -688,7 +689,7 @@ goto bad; } - r = split_args(&argc, &argv, params); + r = dm_split_args(&argc, &argv, params); if (r) { tgt->error = "couldn't split parameters (insufficient memory)"; goto bad; @@ -707,7 +708,7 @@ return 0; bad: - DMERR(": %s\n", tgt->error); + DMERR("%s", tgt->error); dm_put_target_type(tgt->type); return r; } diff -Nru a/drivers/md/dm.c b/drivers/md/dm.c --- a/drivers/md/dm.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/md/dm.c 2004-11-29 21:22:08 -08:00 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001, 2002 Sistina Software (UK) Limited. + * Copyright (C) 2004 Red Hat, Inc. All rights reserved. * * This file is released under the GPL. */ @@ -59,6 +60,8 @@ request_queue_t *queue; struct gendisk *disk; + void *interface_ptr; + /* * A list of ios that arrived while we were suspended. */ @@ -146,7 +149,7 @@ dm_interface_init, }; -void (*_exits[])(void) __exitdata = { +void (*_exits[])(void) = { local_exit, dm_target_exit, dm_linear_exit, @@ -640,7 +643,7 @@ /* * See if the device with a specific minor # is free. */ -static int specific_minor(unsigned int minor) +static int specific_minor(struct mapped_device *md, unsigned int minor) { int r, m; @@ -660,7 +663,7 @@ goto out; } - r = idr_get_new_above(&_minor_idr, specific_minor, minor, &m); + r = idr_get_new_above(&_minor_idr, md, minor, &m); if (r) { goto out; } @@ -676,7 +679,7 @@ return r; } -static int next_free_minor(unsigned int *minor) +static int next_free_minor(struct mapped_device *md, unsigned int *minor) { int r; unsigned int m; @@ -689,7 +692,7 @@ goto out; } - r = idr_get_new(&_minor_idr, next_free_minor, &m); + r = idr_get_new(&_minor_idr, md, &m); if (r) { goto out; } @@ -723,7 +726,7 @@ } /* get a minor number for the dev */ - r = persistent ? specific_minor(minor) : next_free_minor(&minor); + r = persistent ? specific_minor(md, minor) : next_free_minor(md, &minor); if (r < 0) goto bad1; @@ -880,6 +883,32 @@ return create_aux(minor, 1, result); } +void *dm_get_mdptr(dev_t dev) +{ + struct mapped_device *md; + void *mdptr = NULL; + unsigned minor = MINOR(dev); + + if (MAJOR(dev) != _major || minor >= (1 << MINORBITS)) + return NULL; + + down(&_minor_lock); + + md = idr_find(&_minor_idr, minor); + + if (md && (dm_disk(md)->first_minor == minor)) + mdptr = md->interface_ptr; + + up(&_minor_lock); + + return mdptr; +} + +void dm_set_mdptr(struct mapped_device *md, void *ptr) +{ + md->interface_ptr = ptr; +} + void dm_get(struct mapped_device *md) { atomic_inc(&md->holders); @@ -1139,5 +1168,5 @@ module_param(major, uint, 0); MODULE_PARM_DESC(major, "The major number of the device mapper"); MODULE_DESCRIPTION(DM_NAME " driver"); -MODULE_AUTHOR("Joe Thornber "); +MODULE_AUTHOR("Joe Thornber "); MODULE_LICENSE("GPL"); diff -Nru a/drivers/md/dm.h b/drivers/md/dm.h --- a/drivers/md/dm.h 2004-11-29 21:22:07 -08:00 +++ b/drivers/md/dm.h 2004-11-29 21:22:07 -08:00 @@ -2,6 +2,7 @@ * Internal header file for device mapper * * Copyright (C) 2001, 2002 Sistina Software + * Copyright (C) 2004 Red Hat, Inc. All rights reserved. * * This file is released under the LGPL. */ @@ -54,6 +55,8 @@ *---------------------------------------------------------------*/ int dm_create(struct mapped_device **md); int dm_create_with_minor(unsigned int minor, struct mapped_device **md); +void dm_set_mdptr(struct mapped_device *md, void *ptr); +void *dm_get_mdptr(dev_t dev); /* * Reference counting for md. @@ -164,6 +167,8 @@ { return (n << 9); } + +int dm_split_args(int *argc, char ***argvp, char *input); /* * The device-mapper can be driven through one of two interfaces; diff -Nru a/drivers/md/linear.c b/drivers/md/linear.c --- a/drivers/md/linear.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/md/linear.c 2004-11-29 21:22:07 -08:00 @@ -117,8 +117,8 @@ struct linear_hash *table; mdk_rdev_t *rdev; int i, nb_zone, cnt; - sector_t size; - unsigned int curr_offset; + sector_t start; + sector_t curr_offset; struct list_head *tmp; conf = kmalloc (sizeof (*conf) + mddev->raid_disks*sizeof(dev_info_t), @@ -193,23 +193,24 @@ * Here we generate the linear hash table */ table = conf->hash_table; - size = 0; + start = 0; curr_offset = 0; for (i = 0; i < cnt; i++) { dev_info_t *disk = conf->disks + i; + if (start > curr_offset) + table[-1].dev1 = disk; + disk->offset = curr_offset; curr_offset += disk->size; - if (size < 0) { - table[-1].dev1 = disk; - } - size += disk->size; - - while (size>0) { + /* 'curr_offset' is the end of this disk + * 'start' is the start of table + */ + while (start < curr_offset) { table->dev0 = disk; table->dev1 = NULL; - size -= conf->smallest->size; + start += conf->smallest->size; table++; } } diff -Nru a/drivers/media/dvb/bt8xx/bt878.h b/drivers/media/dvb/bt8xx/bt878.h --- a/drivers/media/dvb/bt8xx/bt878.h 2004-11-29 21:22:08 -08:00 +++ b/drivers/media/dvb/bt8xx/bt878.h 2004-11-29 21:22:08 -08:00 @@ -102,7 +102,7 @@ unsigned char revision; unsigned int irq; unsigned long bt878_adr; - unsigned char *bt878_mem; /* function 1 */ + volatile void __iomem *bt878_mem; /* function 1 */ volatile u32 finished_block; volatile u32 last_block; @@ -129,17 +129,17 @@ void bt878_stop(struct bt878 *bt); #if defined(__powerpc__) /* big-endian */ -extern __inline__ void io_st_le32(volatile unsigned *addr, unsigned val) +extern __inline__ void io_st_le32(volatile unsigned __iomem *addr, unsigned val) { __asm__ __volatile__("stwbrx %1,0,%2":"=m"(*addr):"r"(val), "r"(addr)); __asm__ __volatile__("eieio":::"memory"); } -#define bmtwrite(dat,adr) io_st_le32((unsigned *)(adr),(dat)) -#define bmtread(adr) ld_le32((unsigned *)(adr)) +#define bmtwrite(dat,adr) io_st_le32((adr),(dat)) +#define bmtread(adr) ld_le32((adr)) #else -#define bmtwrite(dat,adr) writel((dat), (char *) (adr)) +#define bmtwrite(dat,adr) writel((dat), (adr)) #define bmtread(adr) readl(adr) #endif diff -Nru a/drivers/media/dvb/frontends/stv0299.c b/drivers/media/dvb/frontends/stv0299.c --- a/drivers/media/dvb/frontends/stv0299.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/media/dvb/frontends/stv0299.c 2004-11-29 21:22:08 -08:00 @@ -1267,7 +1267,8 @@ state->tuner_type); case FE_DISHNETWORK_SEND_LEGACY_CMD: - return stv0299_send_legacy_dish_cmd (i2c, (u32) arg, + return stv0299_send_legacy_dish_cmd (i2c, + (u32)(unsigned long)arg, state->tuner_type); case FE_GET_TUNE_SETTINGS: @@ -1317,11 +1318,11 @@ u8 stat [] = { 0 }; u8 tda6100_buf [] = { 0, 0 }; int ret; - struct i2c_msg msg1 [] = {{ .addr = 0x68, .flags = 0, .buf = rpt, len: 2 }, + struct i2c_msg msg1 [] = {{ .addr = 0x68, .flags = 0, .buf = rpt, .len = 2 }, { .addr = 0x60, .flags = I2C_M_RD, .buf = stat, .len = 1 }}; - struct i2c_msg msg2 [] = {{ .addr = 0x68, .flags = 0, .buf = rpt, len: 2 }, + struct i2c_msg msg2 [] = {{ .addr = 0x68, .flags = 0, .buf = rpt, .len = 2 }, { .addr = 0x61, .flags = I2C_M_RD, .buf = stat, .len = 1 }}; - struct i2c_msg msg3 [] = {{ .addr = 0x68, .flags = 0, .buf = rpt, len: 2 }, + struct i2c_msg msg3 [] = {{ .addr = 0x68, .flags = 0, .buf = rpt, .len = 2 }, { .addr = 0x60, .flags = 0, .buf = tda6100_buf, .len = 2 }}; stv0299_writereg (i2c, 0x01, 0x15); diff -Nru a/drivers/media/dvb/ttpci/av7110_hw.c b/drivers/media/dvb/ttpci/av7110_hw.c --- a/drivers/media/dvb/ttpci/av7110_hw.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/media/dvb/ttpci/av7110_hw.c 2004-11-29 21:22:08 -08:00 @@ -952,11 +952,11 @@ case OSD_SetPalette: { if (FW_VERSION(av7110->arm_app) >= 0x2618) { - ret = OSDSetPalette(av7110, (u32 *)dc->data, dc->color, dc->x0); + ret = OSDSetPalette(av7110, dc->data, dc->color, dc->x0); goto out; } else { int i, len = dc->x0-dc->color+1; - u8 *colors = (u8 *)dc->data; + u8 __user *colors = dc->data; u8 r, g, b, blend; for (i = 0; is_lock,flags); - buffer_queue(file->private_data,&buf->vb); + buffer_queue(&fh->cap,&buf->vb); spin_unlock_irqrestore(&btv->s_lock,flags); up(&fh->cap.lock); return 0; @@ -2881,11 +2881,11 @@ } fh->cap.read_buf->memory = V4L2_MEMORY_USERPTR; field = videobuf_next_field(&fh->cap); - if (0 != fh->cap.ops->buf_prepare(file->private_data,fh->cap.read_buf,field)) { + if (0 != fh->cap.ops->buf_prepare(&fh->cap,fh->cap.read_buf,field)) { up(&fh->cap.lock); return POLLERR; } - fh->cap.ops->buf_queue(file->private_data,fh->cap.read_buf); + fh->cap.ops->buf_queue(&fh->cap,fh->cap.read_buf); fh->cap.read_off = 0; } up(&fh->cap.lock); @@ -2975,7 +2975,7 @@ free_btres(btv,fh,RESOURCE_VIDEO); } if (fh->cap.read_buf) { - buffer_release(file->private_data,fh->cap.read_buf); + buffer_release(&fh->cap,fh->cap.read_buf); kfree(fh->cap.read_buf); } diff -Nru a/drivers/media/video/bttvp.h b/drivers/media/video/bttvp.h --- a/drivers/media/video/bttvp.h 2004-11-29 21:22:07 -08:00 +++ b/drivers/media/video/bttvp.h 2004-11-29 21:22:07 -08:00 @@ -293,7 +293,7 @@ /* pci device config */ unsigned short id; unsigned char revision; - unsigned char *bt848_mmio; /* pointer to mmio */ + unsigned char __iomem *bt848_mmio; /* pointer to mmio */ /* card configuration info */ unsigned int cardid; /* pci subsystem id (bt878 based ones) */ @@ -407,7 +407,7 @@ #endif -#define btwrite(dat,adr) writel((dat), (char *) (btv->bt848_mmio+(adr))) +#define btwrite(dat,adr) writel((dat), btv->bt848_mmio+(adr)) #define btread(adr) readl(btv->bt848_mmio+(adr)) #define btand(dat,adr) btwrite((dat) & btread(adr), adr) diff -Nru a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c --- a/drivers/media/video/cx88/cx88-blackbird.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/media/video/cx88/cx88-blackbird.c 2004-11-29 21:22:08 -08:00 @@ -363,7 +363,7 @@ } if (firmware->size != BLACKBIRD_FIRM_IMAGE_SIZE) { - dprintk(0, "ERROR: Firmware size mismatch (have %ld, expected %d)\n", + dprintk(0, "ERROR: Firmware size mismatch (have %zd, expected %d)\n", firmware->size, BLACKBIRD_FIRM_IMAGE_SIZE); return -1; } @@ -721,7 +721,7 @@ } static ssize_t -mpeg_read(struct file *file, char *data, size_t count, loff_t *ppos) +mpeg_read(struct file *file, char __user *data, size_t count, loff_t *ppos) { struct cx8802_fh *fh = file->private_data; diff -Nru a/drivers/media/video/cx88/cx88-core.c b/drivers/media/video/cx88/cx88-core.c --- a/drivers/media/video/cx88/cx88-core.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/media/video/cx88/cx88-core.c 2004-11-29 21:22:07 -08:00 @@ -1121,7 +1121,7 @@ cx88_pci_quirks(core->name, pci); core->lmmio = ioremap(pci_resource_start(pci,0), pci_resource_len(pci,0)); - core->bmmio = (u8*)core->lmmio; + core->bmmio = (u8 __iomem *)core->lmmio; /* board config */ core->board = UNSET; diff -Nru a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c --- a/drivers/media/video/cx88/cx88-video.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/media/video/cx88/cx88-video.c 2004-11-29 21:22:07 -08:00 @@ -1002,7 +1002,7 @@ } static ssize_t -video_read(struct file *file, char *data, size_t count, loff_t *ppos) +video_read(struct file *file, char __user *data, size_t count, loff_t *ppos) { struct cx8800_fh *fh = file->private_data; @@ -1070,7 +1070,7 @@ res_free(dev,fh,RESOURCE_VIDEO); } if (fh->vidq.read_buf) { - buffer_release(file->private_data,fh->vidq.read_buf); + buffer_release(&fh->vidq,fh->vidq.read_buf); kfree(fh->vidq.read_buf); } diff -Nru a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h --- a/drivers/media/video/cx88/cx88.h 2004-11-29 21:22:08 -08:00 +++ b/drivers/media/video/cx88/cx88.h 2004-11-29 21:22:08 -08:00 @@ -235,8 +235,8 @@ /* pci stuff */ int pci_bus; int pci_slot; - u32 *lmmio; - u8 *bmmio; + u32 __iomem *lmmio; + u8 __iomem *bmmio; u32 shadow[SHADOW_MAX]; /* i2c i/o */ diff -Nru a/drivers/media/video/meye.c b/drivers/media/video/meye.c --- a/drivers/media/video/meye.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/media/video/meye.c 2004-11-29 21:22:07 -08:00 @@ -1842,7 +1842,12 @@ memcpy(meye.video_dev, &meye_template, sizeof(meye_template)); meye.video_dev->dev = &meye.mchip_dev->dev; - sonypi_camera_command(SONYPI_COMMAND_SETCAMERA, 1); + if ((ret = sonypi_camera_command(SONYPI_COMMAND_SETCAMERA, 1))) { + printk(KERN_ERR "meye: unable to power on the camera\n"); + printk(KERN_ERR "meye: did you enable the camera in " + "sonypi using the module options ?\n"); + goto outsonypienable; + } ret = -EIO; if ((ret = pci_enable_device(meye.mchip_dev))) { @@ -1943,6 +1948,7 @@ pci_disable_device(meye.mchip_dev); outenabledev: sonypi_camera_command(SONYPI_COMMAND_SETCAMERA, 0); +outsonypienable: kfifo_free(meye.doneq); outkfifoalloc2: kfifo_free(meye.grabq); diff -Nru a/drivers/media/video/meye.h b/drivers/media/video/meye.h --- a/drivers/media/video/meye.h 2004-11-29 21:22:07 -08:00 +++ b/drivers/media/video/meye.h 2004-11-29 21:22:07 -08:00 @@ -31,7 +31,7 @@ #define _MEYE_PRIV_H_ #define MEYE_DRIVER_MAJORVERSION 1 -#define MEYE_DRIVER_MINORVERSION 11 +#define MEYE_DRIVER_MINORVERSION 12 #define MEYE_DRIVER_VERSION __stringify(MEYE_DRIVER_MAJORVERSION) "." \ __stringify(MEYE_DRIVER_MINORVERSION) @@ -292,7 +292,7 @@ u8 mchip_irq; /* irq */ u8 mchip_mode; /* actual mchip mode: HIC_MODE... */ u8 mchip_fnum; /* current mchip frame number */ - unsigned char *mchip_mmregs; /* mchip: memory mapped registers */ + unsigned char __iomem *mchip_mmregs;/* mchip: memory mapped registers */ u8 *mchip_ptable[MCHIP_NB_PAGES];/* mchip: ptable */ dma_addr_t *mchip_ptable_toc; /* mchip: ptable toc */ dma_addr_t mchip_dmahandle; /* mchip: dma handle to ptable toc */ diff -Nru a/drivers/media/video/msp3400.c b/drivers/media/video/msp3400.c --- a/drivers/media/video/msp3400.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/media/video/msp3400.c 2004-11-29 21:22:07 -08:00 @@ -1436,7 +1436,7 @@ .attach_adapter = msp_probe, .detach_client = msp_detach, .command = msp_command, - .driver { + .driver = { .suspend = msp_suspend, .resume = msp_resume, }, diff -Nru a/drivers/media/video/pms.c b/drivers/media/video/pms.c --- a/drivers/media/video/pms.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/media/video/pms.c 2004-11-29 21:22:08 -08:00 @@ -68,6 +68,7 @@ static int io_port = 0x250; static int data_port = 0x251; static int mem_base = 0xC8000; +static void __iomem *mem; static int video_nr = -1; @@ -629,7 +630,6 @@ { int y; int dw = 2*dev->width; - u32 src = mem_base; char tmp[dw+32]; /* using a temp buffer is faster than direct */ int cnt = 0; @@ -644,14 +644,14 @@ for (y = 0; y < dev->height; y++ ) { - isa_writeb(0, src); /* synchronisiert neue Zeile */ + writeb(0, mem); /* synchronisiert neue Zeile */ /* * This is in truth a fifo, be very careful as if you * forgot this odd things will occur 8) */ - isa_memcpy_fromio(tmp, src, dw+32); /* discard 16 word */ + memcpy_fromio(tmp, mem, dw+32); /* discard 16 word */ cnt -= dev->height; while (cnt <= 0) { @@ -865,7 +865,7 @@ return video_usercopy(inode, file, cmd, arg, pms_do_ioctl); } -static int pms_read(struct file *file, char __user *buf, +static ssize_t pms_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { struct video_device *v = video_devdata(file); @@ -918,16 +918,22 @@ 0x34,0x0A,0xF4,0xCE, 0xE4 }; + + mem = ioremap(mem_base, 0x800); + if (!mem) + return -ENOMEM; if (!request_region(0x9A01, 1, "Mediavision PMS config")) { printk(KERN_WARNING "mediavision: unable to detect: 0x9A01 in use.\n"); + iounmap(mem); return -EBUSY; } if (!request_region(io_port, 3, "Mediavision PMS")) { printk(KERN_WARNING "mediavision: I/O port %d in use.\n", io_port); release_region(0x9A01, 1); + iounmap(mem); return -EBUSY; } outb(0xB8, 0x9A01); /* Unlock */ @@ -950,6 +956,7 @@ if(idec == 0) { release_region(io_port, 3); release_region(0x9A01, 1); + iounmap(mem); return -ENODEV; } @@ -1045,6 +1052,7 @@ { shutdown_mediavision(); video_unregister_device((struct video_device *)&pms_device); + iounmap(mem); } module_init(init_pms_cards); diff -Nru a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c --- a/drivers/media/video/saa7134/saa7134-core.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/media/video/saa7134/saa7134-core.c 2004-11-29 21:22:07 -08:00 @@ -906,7 +906,7 @@ goto fail1; } dev->lmmio = ioremap(pci_resource_start(pci_dev,0), 0x1000); - dev->bmmio = (__u8*)dev->lmmio; + dev->bmmio = (__u8 __iomem *)dev->lmmio; if (NULL == dev->lmmio) { err = -EIO; printk(KERN_ERR "%s: can't ioremap() MMIO memory\n", diff -Nru a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c --- a/drivers/media/video/saa7134/saa7134-video.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/media/video/saa7134/saa7134-video.c 2004-11-29 21:22:06 -08:00 @@ -1305,11 +1305,11 @@ up(&fh->cap.lock); return POLLERR; } - if (0 != fh->cap.ops->buf_prepare(file->private_data,fh->cap.read_buf,fh->cap.field)) { + if (0 != fh->cap.ops->buf_prepare(&fh->cap,fh->cap.read_buf,fh->cap.field)) { up(&fh->cap.lock); return POLLERR; } - fh->cap.ops->buf_queue(file->private_data,fh->cap.read_buf); + fh->cap.ops->buf_queue(&fh->cap,fh->cap.read_buf); fh->cap.read_off = 0; } up(&fh->cap.lock); @@ -1346,7 +1346,7 @@ res_free(dev,fh,RESOURCE_VIDEO); } if (fh->cap.read_buf) { - buffer_release(file->private_data,fh->cap.read_buf); + buffer_release(&fh->cap,fh->cap.read_buf); kfree(fh->cap.read_buf); } diff -Nru a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h --- a/drivers/media/video/saa7134/saa7134.h 2004-11-29 21:22:08 -08:00 +++ b/drivers/media/video/saa7134/saa7134.h 2004-11-29 21:22:08 -08:00 @@ -382,8 +382,8 @@ int nr; struct pci_dev *pci; unsigned char pci_rev,pci_lat; - __u32 *lmmio; - __u8 *bmmio; + __u32 __iomem *lmmio; + __u8 __iomem *bmmio; /* config info */ unsigned int board; diff -Nru a/drivers/media/video/saa7146.h b/drivers/media/video/saa7146.h --- a/drivers/media/video/saa7146.h 2004-11-29 21:22:06 -08:00 +++ b/drivers/media/video/saa7146.h 2004-11-29 21:22:06 -08:00 @@ -78,7 +78,7 @@ unsigned char boardcfg[64]; /* 64 bytes of config from eeprom */ unsigned long saa7146_adr; /* bus address of IO mem from PCI BIOS */ struct saa7146_window win; - unsigned char *saa7146_mem; /* pointer to mapped IO memory */ + unsigned char __iomem *saa7146_mem; /* pointer to mapped IO memory */ struct device_open open_data[MAX_OPENS]; #define MAX_MARKS 16 /* for a/v sync */ @@ -95,10 +95,10 @@ #endif #ifdef _ALPHA_SAA7146 -#define saawrite(dat,adr) writel((dat),(char *) (saa->saa7146_adr+(adr))) +#define saawrite(dat,adr) writel((dat), saa->saa7146_adr+(adr)) #define saaread(adr) readl(saa->saa7146_adr+(adr)) #else -#define saawrite(dat,adr) writel((dat), (char *) (saa->saa7146_mem+(adr))) +#define saawrite(dat,adr) writel((dat), saa->saa7146_mem+(adr)) #define saaread(adr) readl(saa->saa7146_mem+(adr)) #endif diff -Nru a/drivers/media/video/tda9887.c b/drivers/media/video/tda9887.c --- a/drivers/media/video/tda9887.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/media/video/tda9887.c 2004-11-29 21:22:08 -08:00 @@ -246,6 +246,7 @@ printk(PREFIX "read: 0x%2x\n", buf[0]); printk(" after power on : %s\n", (buf[0] & 0x01) ? "yes" : "no"); printk(" afc : %s\n", afc[(buf[0] >> 1) & 0x0f]); + printk(" fmif level : %s\n", (buf[0] & 0x20) ? "high" : "low"); printk(" afc window : %s\n", (buf[0] & 0x40) ? "in" : "out"); printk(" vfi level : %s\n", (buf[0] & 0x80) ? "high" : "low"); } diff -Nru a/drivers/media/video/tuner.c b/drivers/media/video/tuner.c --- a/drivers/media/video/tuner.c 2004-11-29 21:22:09 -08:00 +++ b/drivers/media/video/tuner.c 2004-11-29 21:22:09 -08:00 @@ -1,5 +1,5 @@ /* - * $Id: tuner.c,v 1.29 2004/11/07 13:17:15 kraxel Exp $ + * $Id: tuner.c,v 1.31 2004/11/10 11:07:24 kraxel Exp $ */ #include @@ -30,24 +30,24 @@ /* insmod options used at init time => read/only */ static unsigned int type = UNSET; static unsigned int addr = 0; -module_param(type, int, 444); -module_param(addr, int, 444); +module_param(type, int, 0444); +module_param(addr, int, 0444); /* insmod options used at runtime => read/write */ static unsigned int debug = 0; static unsigned int tv_antenna = 1; static unsigned int radio_antenna = 0; static unsigned int optimize_vco = 1; -module_param(debug, int, 644); -module_param(tv_antenna, int, 644); -module_param(radio_antenna, int, 644); -module_param(optimize_vco, int, 644); +module_param(debug, int, 0644); +module_param(tv_antenna, int, 0644); +module_param(radio_antenna, int, 0644); +module_param(optimize_vco, int, 0644); static unsigned int tv_range[2] = { 44, 958 }; static unsigned int radio_range[2] = { 65, 108 }; -module_param_array(tv_range, int, NULL, 644); -module_param_array(radio_range, int, NULL, 644); +module_param_array(tv_range, int, NULL, 0644); +module_param_array(radio_range, int, NULL, 0644); MODULE_DESCRIPTION("device driver for various TV and TV+FM radio tuners"); MODULE_AUTHOR("Ralph Metzler, Gerd Knorr, Gunther Mayer"); @@ -262,6 +262,8 @@ 16*162.00,16*457.00,0xa2,0x94,0x31,0x8e,732}, { "TCL 2002N", TCL, NTSC, 16*172.00,16*448.00,0x01,0x02,0x08,0x8e,732}, + { "Philips PAL/SECAM_D (FM 1256 I-H3)", Philips, PAL, + 16*160.00,16*442.00,0x01,0x02,0x04,0x8e,623 }, }; #define TUNERS ARRAY_SIZE(tuners) @@ -986,14 +988,18 @@ tun=&tuners[t->type]; div = freq + (int)(16*10.7); - buffer[0] = (div>>8) & 0x7f; - buffer[1] = div & 0xff; buffer[2] = tun->config; + switch (t->type) { case TUNER_PHILIPS_FM1216ME_MK3: case TUNER_PHILIPS_FM1236_MK3: buffer[3] = 0x19; break; + case TUNER_PHILIPS_FM1256_IH3: + div = (20 * freq)/16 + 333 * 2; + buffer[2] = 0x80; + buffer[3] = 0x19; + break; case TUNER_LG_PAL_FM: buffer[3] = 0xa5; break; @@ -1001,6 +1007,8 @@ buffer[3] = 0xa4; break; } + buffer[0] = (div>>8) & 0x7f; + buffer[1] = div & 0xff; dprintk("tuner: radio 0x%02x 0x%02x 0x%02x 0x%02x\n", buffer[0],buffer[1],buffer[2],buffer[3]); @@ -1077,7 +1085,7 @@ { struct tuner *t = i2c_get_clientdata(c); - if (t->type != UNSET) { + if (t->type != UNSET && t->type != TUNER_ABSENT) { if (t->type != type) printk("tuner: type already set to %d, " "ignoring request for %d\n", t->type, type); diff -Nru a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c --- a/drivers/media/video/tvaudio.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/media/video/tvaudio.c 2004-11-29 21:22:07 -08:00 @@ -37,8 +37,8 @@ /* ---------------------------------------------------------------------- */ /* insmod args */ -MODULE_PARM(debug,"i"); static int debug = 0; /* insmod parameter */ +module_param(debug, int, 0644); MODULE_DESCRIPTION("device driver for various i2c TV sound decoder / audiomux chips"); MODULE_AUTHOR("Eric Sandeen, Steve VanDeBogart, Greg Alexander, Gerd Knorr"); @@ -764,9 +764,9 @@ static unsigned int tda9874a_SIF = UNSET; static unsigned int tda9874a_AMSEL = UNSET; static unsigned int tda9874a_STD = UNSET; -MODULE_PARM(tda9874a_SIF,"i"); -MODULE_PARM(tda9874a_AMSEL,"i"); -MODULE_PARM(tda9874a_STD,"i"); +module_param(tda9874a_SIF, int, 0444); +module_param(tda9874a_AMSEL, int, 0444); +module_param(tda9874a_STD, int, 0444); /* * initialization table for tda9874 decoder: @@ -1218,16 +1218,16 @@ int pic16c54 = 1; int ta8874z = 0; // address clash with tda9840 -MODULE_PARM(tda8425,"i"); -MODULE_PARM(tda9840,"i"); -MODULE_PARM(tda9850,"i"); -MODULE_PARM(tda9855,"i"); -MODULE_PARM(tda9873,"i"); -MODULE_PARM(tda9874a,"i"); -MODULE_PARM(tea6300,"i"); -MODULE_PARM(tea6420,"i"); -MODULE_PARM(pic16c54,"i"); -MODULE_PARM(ta8874z,"i"); +module_param(tda8425, int, 0444); +module_param(tda9840, int, 0444); +module_param(tda9850, int, 0444); +module_param(tda9855, int, 0444); +module_param(tda9873, int, 0444); +module_param(tda9874a, int, 0444); +module_param(tea6300, int, 0444); +module_param(tea6420, int, 0444); +module_param(pic16c54, int, 0444); +module_param(ta8874z, int, 0444); static struct CHIPDESC chiplist[] = { { diff -Nru a/drivers/media/video/tvmixer.c b/drivers/media/video/tvmixer.c --- a/drivers/media/video/tvmixer.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/media/video/tvmixer.c 2004-11-29 21:22:08 -08:00 @@ -20,7 +20,7 @@ #define DEV_MAX 4 static int devnr = -1; -MODULE_PARM(devnr,"i"); +module_param(devnr, int, 0644); MODULE_AUTHOR("Gerd Knorr"); MODULE_LICENSE("GPL"); diff -Nru a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c --- a/drivers/media/video/v4l2-common.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/media/video/v4l2-common.c 2004-11-29 21:22:08 -08:00 @@ -84,6 +84,7 @@ * Video Standard Operations (contributed by Michael Schimek) */ +#if 0 /* seems to have no users */ /* This is the recommended method to deal with the framerate fields. More sophisticated drivers will access the fields directly. */ unsigned int @@ -95,6 +96,8 @@ (1 << 7)) / (1 << 8); return 0; } +EXPORT_SYMBOL(v4l2_video_std_fps); +#endif /* Fill in the fields of a v4l2_standard structure according to the 'id' and 'transmission' parameters. Returns negative on error. */ @@ -259,7 +262,6 @@ /* ----------------------------------------------------------------- */ -EXPORT_SYMBOL(v4l2_video_std_fps); EXPORT_SYMBOL(v4l2_video_std_construct); EXPORT_SYMBOL(v4l2_prio_init); diff -Nru a/drivers/media/video/zoran.h b/drivers/media/video/zoran.h --- a/drivers/media/video/zoran.h 2004-11-29 21:22:08 -08:00 +++ b/drivers/media/video/zoran.h 2004-11-29 21:22:08 -08:00 @@ -407,7 +407,7 @@ struct pci_dev *pci_dev; /* PCI device */ unsigned char revision; /* revision of zr36057 */ unsigned int zr36057_adr; /* bus address of IO mem returned by PCI BIOS */ - unsigned char *zr36057_mem; /* pointer to mapped IO memory */ + unsigned char __iomem *zr36057_mem;/* pointer to mapped IO memory */ spinlock_t spinlock; /* Spinlock */ @@ -499,10 +499,10 @@ of _ALPHA_BUZ in the Makefile.*/ #ifdef _ALPHA_BUZ -#define btwrite(dat,adr) writel((dat),(char *) (zr->zr36057_adr+(adr))) +#define btwrite(dat,adr) writel((dat), zr->zr36057_adr+(adr)) #define btread(adr) readl(zr->zr36057_adr+(adr)) #else -#define btwrite(dat,adr) writel((dat), (char *) (zr->zr36057_mem+(adr))) +#define btwrite(dat,adr) writel((dat), zr->zr36057_mem+(adr)) #define btread(adr) readl(zr->zr36057_mem+(adr)) #endif diff -Nru a/drivers/media/video/zoran_driver.c b/drivers/media/video/zoran_driver.c --- a/drivers/media/video/zoran_driver.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/media/video/zoran_driver.c 2004-11-29 21:22:08 -08:00 @@ -265,7 +265,7 @@ * if more than one driver at a time has the idea to use this memory!!!! */ - volatile unsigned char *mem; + volatile unsigned char __iomem *mem; unsigned char c; unsigned long hi_mem_ph; unsigned long i; @@ -285,21 +285,21 @@ for (i = 0; i < size; i++) { /* Check if it is memory */ c = i & 0xff; - mem[i] = c; - if (mem[i] != c) + writeb(c, mem + i); + if (readb(mem + i) != c) break; c = 255 - c; - mem[i] = c; - if (mem[i] != c) + writeb(c, mem + i); + if (readb(mem + i) != c) break; - mem[i] = 0; /* zero out memory */ + writeb(0, mem + i); /* zero out memory */ /* give the kernel air to breath */ if ((i & 0x3ffff) == 0x3ffff) schedule(); } - iounmap((void *) mem); + iounmap(mem); if (i != size) { dprintk(1, diff -Nru a/drivers/message/i2o/debug.c b/drivers/message/i2o/debug.c --- a/drivers/message/i2o/debug.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/message/i2o/debug.c 2004-11-29 21:22:07 -08:00 @@ -4,40 +4,14 @@ #include #include -static int verbose; extern struct i2o_driver **i2o_drivers; extern unsigned int i2o_max_drivers; static void i2o_report_util_cmd(u8 cmd); static void i2o_report_exec_cmd(u8 cmd); -void i2o_report_fail_status(u8 req_status, u32 * msg); -void i2o_report_common_status(u8 req_status); +static void i2o_report_fail_status(u8 req_status, u32 * msg); +static void i2o_report_common_status(u8 req_status); static void i2o_report_common_dsc(u16 detailed_status); -void i2o_dump_status_block(i2o_status_block * sb) -{ - pr_debug("Organization ID: %d\n", sb->org_id); - pr_debug("IOP ID: %d\n", sb->iop_id); - pr_debug("Host Unit ID: %d\n", sb->host_unit_id); - pr_debug("Segment Number: %d\n", sb->segment_number); - pr_debug("I2O Version: %d\n", sb->i2o_version); - pr_debug("IOP State: %d\n", sb->iop_state); - pr_debug("Messanger Type: %d\n", sb->msg_type); - pr_debug("Inbound Frame Size: %d\n", sb->inbound_frame_size); - pr_debug("Init Code: %d\n", sb->init_code); - pr_debug("Max Inbound MFrames: %d\n", sb->max_inbound_frames); - pr_debug("Current Inbound MFrames: %d\n", sb->cur_inbound_frames); - pr_debug("Max Outbound MFrames: %d\n", sb->max_outbound_frames); - pr_debug("Product ID String: %s\n", sb->product_id); - pr_debug("Expected LCT Size: %d\n", sb->expected_lct_size); - pr_debug("IOP Capabilities: %d\n", sb->iop_capabilities); - pr_debug("Desired Private MemSize: %d\n", sb->desired_mem_size); - pr_debug("Current Private MemSize: %d\n", sb->current_mem_size); - pr_debug("Current Private MemBase: %d\n", sb->current_mem_base); - pr_debug("Desired Private IO Size: %d\n", sb->desired_io_size); - pr_debug("Current Private IO Size: %d\n", sb->current_io_size); - pr_debug("Current Private IO Base: %d\n", sb->current_io_base); -}; - /* * Used for error reporting/debugging purposes. * Report Cmd name, Request status, Detailed Status. @@ -91,71 +65,12 @@ #endif } -/** - * i2o_report_controller_unit - print information about a tid - * @c: controller - * @d: device - * - * Dump an information block associated with a given unit (TID). The - * tables are read and a block of text is output to printk that is - * formatted intended for the user. - */ - -void i2o_report_controller_unit(struct i2o_controller *c, struct i2o_device *d) -{ - char buf[64]; - char str[22]; - int ret; - - if (verbose == 0) - return; - - printk(KERN_INFO "Target ID %03x.\n", d->lct_data.tid); - if ((ret = i2o_parm_field_get(d, 0xF100, 3, buf, 16)) >= 0) { - buf[16] = 0; - printk(KERN_INFO " Vendor: %s\n", buf); - } - if ((ret = i2o_parm_field_get(d, 0xF100, 4, buf, 16)) >= 0) { - buf[16] = 0; - printk(KERN_INFO " Device: %s\n", buf); - } - if (i2o_parm_field_get(d, 0xF100, 5, buf, 16) >= 0) { - buf[16] = 0; - printk(KERN_INFO " Description: %s\n", buf); - } - if ((ret = i2o_parm_field_get(d, 0xF100, 6, buf, 8)) >= 0) { - buf[8] = 0; - printk(KERN_INFO " Rev: %s\n", buf); - } - - printk(KERN_INFO " Class: "); - //sprintf(str, "%-21s", i2o_get_class_name(d->lct_data.class_id)); - printk(KERN_DEBUG "%s\n", str); - - printk(KERN_INFO " Subclass: 0x%04X\n", d->lct_data.sub_class); - printk(KERN_INFO " Flags: "); - - if (d->lct_data.device_flags & (1 << 0)) - printk(KERN_DEBUG "C"); // ConfigDialog requested - if (d->lct_data.device_flags & (1 << 1)) - printk(KERN_DEBUG "U"); // Multi-user capable - if (!(d->lct_data.device_flags & (1 << 4))) - printk(KERN_DEBUG "P"); // Peer service enabled! - if (!(d->lct_data.device_flags & (1 << 5))) - printk(KERN_DEBUG "M"); // Mgmt service enabled! - printk(KERN_DEBUG "\n"); -} - -/* -module_param(verbose, int, 0644); -MODULE_PARM_DESC(verbose, "Verbose diagnostics"); -*/ /* * Used for error reporting/debugging purposes. * Following fail status are common to all classes. * The preserved message must be handled in the reply handler. */ -void i2o_report_fail_status(u8 req_status, u32 * msg) +static void i2o_report_fail_status(u8 req_status, u32 * msg) { static char *FAIL_STATUS[] = { "0x80", /* not used */ @@ -213,7 +128,7 @@ * Used for error reporting/debugging purposes. * Following reply status are common to all classes. */ -void i2o_report_common_status(u8 req_status) +static void i2o_report_common_status(u8 req_status) { static char *REPLY_STATUS[] = { "SUCCESS", @@ -476,20 +391,6 @@ } }; -void i2o_systab_debug(struct i2o_sys_tbl *sys_tbl) -{ - u32 *table; - int count; - u32 size; - - table = (u32 *) sys_tbl; - size = sizeof(struct i2o_sys_tbl) + sys_tbl->num_entries - * sizeof(struct i2o_sys_tbl_entry); - - for (count = 0; count < (size >> 2); count++) - printk(KERN_INFO "sys_tbl[%d] = %0#10x\n", count, table[count]); -} - void i2o_dump_hrt(struct i2o_controller *c) { u32 *rows = (u32 *) c->hrt.virt; @@ -577,5 +478,4 @@ } } -EXPORT_SYMBOL(i2o_dump_status_block); EXPORT_SYMBOL(i2o_dump_message); diff -Nru a/drivers/message/i2o/device.c b/drivers/message/i2o/device.c --- a/drivers/message/i2o/device.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/message/i2o/device.c 2004-11-29 21:22:07 -08:00 @@ -35,7 +35,7 @@ static inline int i2o_device_issue_claim(struct i2o_device *dev, u32 cmd, u32 type) { - struct i2o_message *msg; + struct i2o_message __iomem *msg; u32 m; m = i2o_msg_get_wait(dev->iop, &msg, I2O_TIMEOUT_MESSAGE_GET); @@ -211,8 +211,8 @@ * Returns a pointer to the I2O device on success or negative error code * on failure. */ -struct i2o_device *i2o_device_add(struct i2o_controller *c, - i2o_lct_entry * entry) +static struct i2o_device *i2o_device_add(struct i2o_controller *c, + i2o_lct_entry * entry) { struct i2o_device *dev; @@ -446,7 +446,7 @@ int i2o_parm_issue(struct i2o_device *i2o_dev, int cmd, void *oplist, int oplen, void *reslist, int reslen) { - struct i2o_message *msg; + struct i2o_message __iomem *msg; u32 m; u32 *res32 = (u32 *) reslist; u32 *restmp = (u32 *) reslist; @@ -547,47 +547,6 @@ } /* - * Set a scalar group value or a whole group. - */ -int i2o_parm_field_set(struct i2o_device *i2o_dev, int group, int field, - void *buf, int buflen) -{ - u16 *opblk; - u8 resblk[8 + buflen]; /* 8 bytes for header */ - int size; - - opblk = kmalloc(buflen + 64, GFP_KERNEL); - if (opblk == NULL) { - printk(KERN_ERR "i2o: no memory for operation buffer.\n"); - return -ENOMEM; - } - - opblk[0] = 1; /* operation count */ - opblk[1] = 0; /* pad */ - opblk[2] = I2O_PARAMS_FIELD_SET; - opblk[3] = group; - - if (field == -1) { /* whole group */ - opblk[4] = -1; - memcpy(opblk + 5, buf, buflen); - } else { /* single field */ - - opblk[4] = 1; - opblk[5] = field; - memcpy(opblk + 6, buf, buflen); - } - - size = i2o_parm_issue(i2o_dev, I2O_CMD_UTIL_PARAMS_SET, opblk, - 12 + buflen, resblk, sizeof(resblk)); - - kfree(opblk); - if (size > buflen) - return buflen; - - return size; -} - -/* * if oper == I2O_PARAMS_TABLE_GET, get from all rows * if fieldcount == -1 return all fields * ibuf and ibuflen are unused (use NULL, 0) @@ -669,6 +628,5 @@ EXPORT_SYMBOL(i2o_device_claim); EXPORT_SYMBOL(i2o_device_claim_release); EXPORT_SYMBOL(i2o_parm_field_get); -EXPORT_SYMBOL(i2o_parm_field_set); EXPORT_SYMBOL(i2o_parm_table_get); EXPORT_SYMBOL(i2o_parm_issue); diff -Nru a/drivers/message/i2o/driver.c b/drivers/message/i2o/driver.c --- a/drivers/message/i2o/driver.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/message/i2o/driver.c 2004-11-29 21:22:08 -08:00 @@ -24,7 +24,7 @@ MODULE_PARM_DESC(max_drivers, "maximum number of OSM's to support"); /* I2O drivers lock and array */ -static spinlock_t i2o_drivers_lock = SPIN_LOCK_UNLOCKED; +static spinlock_t i2o_drivers_lock; static struct i2o_driver **i2o_drivers; /** @@ -175,7 +175,7 @@ * negative error code on failure (the message will be flushed too). */ int i2o_driver_dispatch(struct i2o_controller *c, u32 m, - struct i2o_message *msg) + struct i2o_message __iomem *msg) { struct i2o_driver *drv; u32 context = readl(&msg->u.s.icntxt); @@ -326,6 +326,8 @@ int __init i2o_driver_init(void) { int rc = 0; + + spin_lock_init(&i2o_drivers_lock); if ((i2o_max_drivers < 2) || (i2o_max_drivers > 64) || ((i2o_max_drivers ^ (i2o_max_drivers - 1)) != diff -Nru a/drivers/message/i2o/exec-osm.c b/drivers/message/i2o/exec-osm.c --- a/drivers/message/i2o/exec-osm.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/message/i2o/exec-osm.c 2004-11-29 21:22:08 -08:00 @@ -33,6 +33,8 @@ struct i2o_driver i2o_exec_driver; +static int i2o_exec_lct_notify(struct i2o_controller *c, u32 change_ind); + /* Module internal functions from other sources */ extern int i2o_device_parse_lct(struct i2o_controller *); @@ -46,7 +48,7 @@ u32 tcntxt; /* transaction context from reply */ int complete; /* 1 if reply received otherwise 0 */ u32 m; /* message id */ - struct i2o_message *msg; /* pointer to the reply message */ + struct i2o_message __iomem *msg; /* pointer to the reply message */ struct list_head list; /* node in global wait list */ }; @@ -110,21 +112,20 @@ timeout, struct i2o_dma *dma) { DECLARE_WAIT_QUEUE_HEAD(wq); - DEFINE_WAIT(wait); - struct i2o_exec_wait *iwait; + struct i2o_exec_wait *wait; static u32 tcntxt = 0x80000000; - struct i2o_message *msg = c->in_queue.virt + m; + struct i2o_message __iomem *msg = c->in_queue.virt + m; int rc = 0; - iwait = i2o_exec_wait_alloc(); - if (!iwait) + wait = i2o_exec_wait_alloc(); + if (!wait) return -ENOMEM; if (tcntxt == 0xffffffff) tcntxt = 0x80000000; if (dma) - iwait->dma = *dma; + wait->dma = *dma; /* * Fill in the message initiator context and transaction context. @@ -132,8 +133,8 @@ * so we could find a POST WAIT reply easier in the reply handler. */ writel(i2o_exec_driver.context, &msg->u.s.icntxt); - iwait->tcntxt = tcntxt++; - writel(iwait->tcntxt, &msg->u.s.tcntxt); + wait->tcntxt = tcntxt++; + writel(wait->tcntxt, &msg->u.s.tcntxt); /* * Post the message to the controller. At some point later it will @@ -141,31 +142,27 @@ */ i2o_msg_post(c, m); - if (!iwait->complete) { - iwait->wq = &wq; + if (!wait->complete) { + wait->wq = &wq; /* * we add elements add the head, because if a entry in the list * will never be removed, we have to iterate over it every time */ - list_add(&iwait->list, &i2o_exec_wait_list); + list_add(&wait->list, &i2o_exec_wait_list); - prepare_to_wait(&wq, &wait, TASK_INTERRUPTIBLE); + wait_event_interruptible_timeout(wq, wait->complete, + timeout * HZ); - if (!iwait->complete) - msleep_interruptible(timeout * 1000); - - finish_wait(&wq, &wait); - - iwait->wq = NULL; + wait->wq = NULL; } barrier(); - if (iwait->complete) { - if (readl(&iwait->msg->body[0]) >> 24) - rc = readl(&iwait->msg->body[0]) & 0xff; - i2o_flush_reply(c, iwait->m); - i2o_exec_wait_free(iwait); + if (wait->complete) { + if (readl(&wait->msg->body[0]) >> 24) + rc = readl(&wait->msg->body[0]) & 0xff; + i2o_flush_reply(c, wait->m); + i2o_exec_wait_free(wait); } else { /* * We cannot remove it now. This is important. When it does @@ -202,13 +199,15 @@ * message must also be given back to the controller. */ static int i2o_msg_post_wait_complete(struct i2o_controller *c, u32 m, - struct i2o_message *msg) + struct i2o_message __iomem *msg) { struct i2o_exec_wait *wait, *tmp; - static spinlock_t lock = SPIN_LOCK_UNLOCKED; + static spinlock_t lock; int rc = 1; u32 context; + spin_lock_init(&lock); + context = readl(&msg->u.s.tcntxt); /* @@ -324,7 +323,7 @@ struct i2o_message *msg) { if (le32_to_cpu(msg->u.head[0]) & MSG_FAIL) { // Fail bit is set - struct i2o_message *pmsg; /* preserved message */ + struct i2o_message __iomem *pmsg; /* preserved message */ u32 pm; pm = le32_to_cpu(msg->body[3]); @@ -396,7 +395,7 @@ */ int i2o_exec_lct_get(struct i2o_controller *c) { - struct i2o_message *msg; + struct i2o_message __iomem *msg; u32 m; int i = 0; int rc = -EAGAIN; @@ -436,11 +435,11 @@ * replies immediately after the request. If change_ind > 0 the reply is * send after change indicator of the LCT is > change_ind. */ -int i2o_exec_lct_notify(struct i2o_controller *c, u32 change_ind) +static int i2o_exec_lct_notify(struct i2o_controller *c, u32 change_ind) { i2o_status_block *sb = c->status_block.virt; struct device *dev; - struct i2o_message *msg; + struct i2o_message __iomem *msg; u32 m; dev = &c->pdev->dev; @@ -503,4 +502,3 @@ EXPORT_SYMBOL(i2o_msg_post_wait_mem); EXPORT_SYMBOL(i2o_exec_lct_get); -EXPORT_SYMBOL(i2o_exec_lct_notify); diff -Nru a/drivers/message/i2o/i2o_block.c b/drivers/message/i2o/i2o_block.c --- a/drivers/message/i2o/i2o_block.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/message/i2o/i2o_block.c 2004-11-29 21:22:08 -08:00 @@ -126,7 +126,7 @@ */ static int i2o_block_device_flush(struct i2o_device *dev) { - struct i2o_message *msg; + struct i2o_message __iomem *msg; u32 m; m = i2o_msg_get_wait(dev->iop, &msg, I2O_TIMEOUT_MESSAGE_GET); @@ -154,7 +154,7 @@ */ static int i2o_block_device_mount(struct i2o_device *dev, u32 media_id) { - struct i2o_message *msg; + struct i2o_message __iomem *msg; u32 m; m = i2o_msg_get_wait(dev->iop, &msg, I2O_TIMEOUT_MESSAGE_GET); @@ -183,7 +183,7 @@ */ static int i2o_block_device_lock(struct i2o_device *dev, u32 media_id) { - struct i2o_message *msg; + struct i2o_message __iomem *msg; u32 m; m = i2o_msg_get_wait(dev->iop, &msg, I2O_TIMEOUT_MESSAGE_GET); @@ -211,7 +211,7 @@ */ static int i2o_block_device_unlock(struct i2o_device *dev, u32 media_id) { - struct i2o_message *msg; + struct i2o_message __iomem *msg; u32 m; m = i2o_msg_get_wait(dev->iop, &msg, I2O_TIMEOUT_MESSAGE_GET); @@ -240,7 +240,7 @@ { struct i2o_device *i2o_dev = dev->i2o_dev; struct i2o_controller *c = i2o_dev->iop; - struct i2o_message *msg; + struct i2o_message __iomem *msg; u32 m; int rc; @@ -777,8 +777,8 @@ struct i2o_block_device *dev = req->rq_disk->private_data; struct i2o_controller *c = dev->i2o_dev->iop; int tid = dev->i2o_dev->lct_data.tid; - struct i2o_message *msg; - void *mptr; + struct i2o_message __iomem *msg; + void __iomem *mptr; struct i2o_block_request *ireq = req->special; struct scatterlist *sg; int sgnum; diff -Nru a/drivers/message/i2o/i2o_config.c b/drivers/message/i2o/i2o_config.c --- a/drivers/message/i2o/i2o_config.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/message/i2o/i2o_config.c 2004-11-29 21:22:08 -08:00 @@ -50,8 +50,7 @@ extern int i2o_parm_issue(struct i2o_device *, int, void *, int, void *, int); -static spinlock_t i2o_config_lock = SPIN_LOCK_UNLOCKED; -struct wait_queue *i2o_wait_queue; +static spinlock_t i2o_config_lock; #define MODINC(x,y) ((x) = ((x) + 1) % (y)) @@ -79,7 +78,7 @@ * multiplexed by the i2o_core code */ -struct i2o_driver i2o_config_driver = { +static struct i2o_driver i2o_config_driver = { .name = "Config-OSM" }; @@ -247,7 +246,7 @@ struct i2o_sw_xfer __user *pxfer = (struct i2o_sw_xfer __user *)arg; unsigned char maxfrag = 0, curfrag = 1; struct i2o_dma buffer; - struct i2o_message *msg; + struct i2o_message __iomem *msg; u32 m; unsigned int status = 0, swlen = 0, fragsize = 8192; struct i2o_controller *c; @@ -321,7 +320,7 @@ struct i2o_sw_xfer __user *pxfer = (struct i2o_sw_xfer __user *)arg; unsigned char maxfrag = 0, curfrag = 1; struct i2o_dma buffer; - struct i2o_message *msg; + struct i2o_message __iomem *msg; u32 m; unsigned int status = 0, swlen = 0, fragsize = 8192; struct i2o_controller *c; @@ -401,7 +400,7 @@ struct i2o_controller *c; struct i2o_sw_xfer kxfer; struct i2o_sw_xfer __user *pxfer = (struct i2o_sw_xfer __user *)arg; - struct i2o_message *msg; + struct i2o_message __iomem *msg; u32 m; unsigned int swlen; int token; @@ -446,7 +445,7 @@ { int token; int iop = (int)arg; - struct i2o_message *msg; + struct i2o_message __iomem *msg; u32 m; struct i2o_controller *c; @@ -477,7 +476,7 @@ static int i2o_cfg_evt_reg(unsigned long arg, struct file *fp) { - struct i2o_message *msg; + struct i2o_message __iomem *msg; u32 m; struct i2o_evt_id __user *pdesc = (struct i2o_evt_id __user *)arg; struct i2o_evt_id kdesc; @@ -778,7 +777,7 @@ u32 i = 0; void *p = NULL; i2o_status_block *sb; - struct i2o_message *msg; + struct i2o_message __iomem *msg; u32 m; unsigned int iop; @@ -1128,6 +1127,8 @@ { printk(KERN_INFO "I2O configuration manager v 0.04.\n"); printk(KERN_INFO " (C) Copyright 1999 Red Hat Software\n"); + + spin_lock_init(&i2o_config_lock); if (misc_register(&i2o_miscdev) < 0) { printk(KERN_ERR "i2o_config: can't register device.\n"); diff -Nru a/drivers/message/i2o/i2o_proc.c b/drivers/message/i2o/i2o_proc.c --- a/drivers/message/i2o/i2o_proc.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/message/i2o/i2o_proc.c 2004-11-29 21:22:07 -08:00 @@ -290,7 +290,7 @@ "CARDBUS" }; -int i2o_seq_show_hrt(struct seq_file *seq, void *v) +static int i2o_seq_show_hrt(struct seq_file *seq, void *v) { struct i2o_controller *c = (struct i2o_controller *)seq->private; i2o_hrt *hrt = (i2o_hrt *) c->hrt.virt; @@ -391,7 +391,7 @@ return 0; } -int i2o_seq_show_lct(struct seq_file *seq, void *v) +static int i2o_seq_show_lct(struct seq_file *seq, void *v) { struct i2o_controller *c = (struct i2o_controller *)seq->private; i2o_lct *lct = (i2o_lct *) c->lct; @@ -521,7 +521,7 @@ return 0; } -int i2o_seq_show_status(struct seq_file *seq, void *v) +static int i2o_seq_show_status(struct seq_file *seq, void *v) { struct i2o_controller *c = (struct i2o_controller *)seq->private; char prodstr[25]; @@ -718,7 +718,7 @@ return 0; } -int i2o_seq_show_hw(struct seq_file *seq, void *v) +static int i2o_seq_show_hw(struct seq_file *seq, void *v) { struct i2o_controller *c = (struct i2o_controller *)seq->private; static u32 work32[5]; @@ -775,7 +775,7 @@ } /* Executive group 0003h - Executing DDM List (table) */ -int i2o_seq_show_ddm_table(struct seq_file *seq, void *v) +static int i2o_seq_show_ddm_table(struct seq_file *seq, void *v) { struct i2o_controller *c = (struct i2o_controller *)seq->private; int token; @@ -851,7 +851,7 @@ } /* Executive group 0004h - Driver Store (scalar) */ -int i2o_seq_show_driver_store(struct seq_file *seq, void *v) +static int i2o_seq_show_driver_store(struct seq_file *seq, void *v) { struct i2o_controller *c = (struct i2o_controller *)seq->private; u32 work32[8]; @@ -874,7 +874,7 @@ } /* Executive group 0005h - Driver Store Table (table) */ -int i2o_seq_show_drivers_stored(struct seq_file *seq, void *v) +static int i2o_seq_show_drivers_stored(struct seq_file *seq, void *v) { typedef struct _i2o_driver_store { u16 stored_ddm_index; @@ -953,7 +953,7 @@ } /* Generic group F000h - Params Descriptor (table) */ -int i2o_seq_show_groups(struct seq_file *seq, void *v) +static int i2o_seq_show_groups(struct seq_file *seq, void *v) { struct i2o_device *d = (struct i2o_device *)seq->private; int token; @@ -1029,7 +1029,7 @@ } /* Generic group F001h - Physical Device Table (table) */ -int i2o_seq_show_phys_device(struct seq_file *seq, void *v) +static int i2o_seq_show_phys_device(struct seq_file *seq, void *v) { struct i2o_device *d = (struct i2o_device *)seq->private; int token; @@ -1070,7 +1070,7 @@ } /* Generic group F002h - Claimed Table (table) */ -int i2o_seq_show_claimed(struct seq_file *seq, void *v) +static int i2o_seq_show_claimed(struct seq_file *seq, void *v) { struct i2o_device *d = (struct i2o_device *)seq->private; int token; @@ -1110,7 +1110,7 @@ } /* Generic group F003h - User Table (table) */ -int i2o_seq_show_users(struct seq_file *seq, void *v) +static int i2o_seq_show_users(struct seq_file *seq, void *v) { struct i2o_device *d = (struct i2o_device *)seq->private; int token; @@ -1164,7 +1164,7 @@ } /* Generic group F005h - Private message extensions (table) (optional) */ -int i2o_seq_show_priv_msgs(struct seq_file *seq, void *v) +static int i2o_seq_show_priv_msgs(struct seq_file *seq, void *v) { struct i2o_device *d = (struct i2o_device *)seq->private; int token; @@ -1213,7 +1213,7 @@ } /* Generic group F006h - Authorized User Table (table) */ -int i2o_seq_show_authorized_users(struct seq_file *seq, void *v) +static int i2o_seq_show_authorized_users(struct seq_file *seq, void *v) { struct i2o_device *d = (struct i2o_device *)seq->private; int token; @@ -1254,7 +1254,7 @@ } /* Generic group F100h - Device Identity (scalar) */ -int i2o_seq_show_dev_identity(struct seq_file *seq, void *v) +static int i2o_seq_show_dev_identity(struct seq_file *seq, void *v) { struct i2o_device *d = (struct i2o_device *)seq->private; static u32 work32[128]; // allow for "stuff" + up to 256 byte (max) serial number @@ -1292,7 +1292,7 @@ return 0; } -int i2o_seq_show_dev_name(struct seq_file *seq, void *v) +static int i2o_seq_show_dev_name(struct seq_file *seq, void *v) { struct i2o_device *d = (struct i2o_device *)seq->private; @@ -1302,7 +1302,7 @@ } /* Generic group F101h - DDM Identity (scalar) */ -int i2o_seq_show_ddm_identity(struct seq_file *seq, void *v) +static int i2o_seq_show_ddm_identity(struct seq_file *seq, void *v) { struct i2o_device *d = (struct i2o_device *)seq->private; int token; @@ -1339,7 +1339,7 @@ } /* Generic group F102h - User Information (scalar) */ -int i2o_seq_show_uinfo(struct seq_file *seq, void *v) +static int i2o_seq_show_uinfo(struct seq_file *seq, void *v) { struct i2o_device *d = (struct i2o_device *)seq->private; int token; @@ -1371,7 +1371,7 @@ } /* Generic group F103h - SGL Operating Limits (scalar) */ -int i2o_seq_show_sgl_limits(struct seq_file *seq, void *v) +static int i2o_seq_show_sgl_limits(struct seq_file *seq, void *v) { struct i2o_device *d = (struct i2o_device *)seq->private; static u32 work32[12]; @@ -1418,7 +1418,7 @@ } /* Generic group F200h - Sensors (scalar) */ -int i2o_seq_show_sensors(struct seq_file *seq, void *v) +static int i2o_seq_show_sensors(struct seq_file *seq, void *v) { struct i2o_device *d = (struct i2o_device *)seq->private; int token; diff -Nru a/drivers/message/i2o/i2o_scsi.c b/drivers/message/i2o/i2o_scsi.c --- a/drivers/message/i2o/i2o_scsi.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/message/i2o/i2o_scsi.c 2004-11-29 21:22:08 -08:00 @@ -299,7 +299,7 @@ cmd = i2o_cntxt_list_get(c, le32_to_cpu(msg->u.s.tcntxt)); if (msg->u.head[0] & (1 << 13)) { - struct i2o_message *pmsg; /* preserved message */ + struct i2o_message __iomem *pmsg; /* preserved message */ u32 pm; int err = DID_ERROR; @@ -460,7 +460,7 @@ * If a I2O controller is added, we catch the notification to add a * corresponding Scsi_Host. */ -void i2o_scsi_notify_controller_add(struct i2o_controller *c) +static void i2o_scsi_notify_controller_add(struct i2o_controller *c) { struct i2o_scsi_host *i2o_shost; int rc; @@ -492,7 +492,7 @@ * If a I2O controller is removed, we catch the notification to remove the * corresponding Scsi_Host. */ -void i2o_scsi_notify_controller_remove(struct i2o_controller *c) +static void i2o_scsi_notify_controller_remove(struct i2o_controller *c) { struct i2o_scsi_host *i2o_shost; i2o_shost = i2o_scsi_get_host(c); @@ -541,10 +541,11 @@ struct i2o_device *i2o_dev; struct device *dev; int tid; - struct i2o_message *msg; + struct i2o_message __iomem *msg; u32 m; u32 scsi_flags, sg_flags; - u32 *mptr, *lenptr; + u32 __iomem *mptr; + u32 __iomem *lenptr; u32 len, reqlen; int i; @@ -717,11 +718,11 @@ * Returns 0 if the command is successfully aborted or negative error code * on failure. */ -int i2o_scsi_abort(struct scsi_cmnd *SCpnt) +static int i2o_scsi_abort(struct scsi_cmnd *SCpnt) { struct i2o_device *i2o_dev; struct i2o_controller *c; - struct i2o_message *msg; + struct i2o_message __iomem *msg; u32 m; int tid; int status = FAILED; diff -Nru a/drivers/message/i2o/iop.c b/drivers/message/i2o/iop.c --- a/drivers/message/i2o/iop.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/message/i2o/iop.c 2004-11-29 21:22:07 -08:00 @@ -38,6 +38,8 @@ */ static struct i2o_dma i2o_systab; +static int i2o_hrt_get(struct i2o_controller *c); + /* Module internal functions from other sources */ extern struct i2o_driver i2o_exec_driver; extern int i2o_exec_lct_get(struct i2o_controller *); @@ -63,7 +65,7 @@ */ void i2o_msg_nop(struct i2o_controller *c, u32 m) { - struct i2o_message *msg = c->in_queue.virt + m; + struct i2o_message __iomem *msg = c->in_queue.virt + m; writel(THREE_WORD_MSG_SIZE | SGL_OFFSET_0, &msg->u.head[0]); writel(I2O_CMD_UTIL_NOP << 24 | HOST_TID << 12 | ADAPTER_TID, @@ -87,7 +89,7 @@ * address from the read port (see the i2o spec). If no message is * available returns I2O_QUEUE_EMPTY and msg is leaved untouched. */ -u32 i2o_msg_get_wait(struct i2o_controller *c, struct i2o_message **msg, +u32 i2o_msg_get_wait(struct i2o_controller *c, struct i2o_message __iomem **msg, int wait) { unsigned long timeout = jiffies + wait * HZ; @@ -304,7 +306,7 @@ */ static int i2o_iop_quiesce(struct i2o_controller *c) { - struct i2o_message *msg; + struct i2o_message __iomem *msg; u32 m; i2o_status_block *sb = c->status_block.virt; int rc; @@ -346,7 +348,7 @@ */ static int i2o_iop_enable(struct i2o_controller *c) { - struct i2o_message *msg; + struct i2o_message __iomem *msg; u32 m; i2o_status_block *sb = c->status_block.virt; int rc; @@ -418,7 +420,7 @@ */ static int i2o_iop_clear(struct i2o_controller *c) { - struct i2o_message *msg; + struct i2o_message __iomem *msg; u32 m; int rc; @@ -459,7 +461,7 @@ static int i2o_iop_reset(struct i2o_controller *c) { u8 *status = c->status.virt; - struct i2o_message *msg; + struct i2o_message __iomem *msg; u32 m; unsigned long timeout; i2o_status_block *sb = c->status_block.virt; @@ -564,11 +566,11 @@ * * Returns 0 on success or a negative errno code on failure. */ -int i2o_iop_init_outbound_queue(struct i2o_controller *c) +static int i2o_iop_init_outbound_queue(struct i2o_controller *c) { u8 *status = c->status.virt; u32 m; - struct i2o_message *msg; + struct i2o_message __iomem *msg; ulong timeout; int i; @@ -629,7 +631,7 @@ */ static int i2o_iop_send_nop(struct i2o_controller *c) { - struct i2o_message *msg; + struct i2o_message __iomem *msg; u32 m = i2o_msg_get_wait(c, &msg, HZ); if (m == I2O_QUEUE_EMPTY) return -ETIMEDOUT; @@ -732,7 +734,7 @@ */ static int i2o_iop_systab_set(struct i2o_controller *c) { - struct i2o_message *msg; + struct i2o_message __iomem *msg; u32 m; i2o_status_block *sb = c->status_block.virt; struct device *dev = &c->pdev->dev; @@ -995,7 +997,7 @@ */ int i2o_status_get(struct i2o_controller *c) { - struct i2o_message *msg; + struct i2o_message __iomem *msg; u32 m; u8 *status_block; unsigned long timeout; @@ -1050,7 +1052,7 @@ * * Returns 0 on success or negativer error code on failure. */ -int i2o_hrt_get(struct i2o_controller *c) +static int i2o_hrt_get(struct i2o_controller *c) { int rc; int i; @@ -1059,7 +1061,7 @@ struct device *dev = &c->pdev->dev; for (i = 0; i < I2O_HRT_GET_TRIES; i++) { - struct i2o_message *msg; + struct i2o_message __iomem *msg; u32 m; m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_MESSAGE_GET); @@ -1119,13 +1121,13 @@ memset(c, 0, sizeof(*c)); INIT_LIST_HEAD(&c->devices); - c->lock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&c->lock); init_MUTEX(&c->lct_lock); c->unit = unit++; sprintf(c->name, "iop%d", c->unit); #if BITS_PER_LONG == 64 - c->context_list_lock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&c->context_list_lock); atomic_set(&c->context_list_counter, 0); INIT_LIST_HEAD(&c->context_list); #endif @@ -1214,7 +1216,7 @@ int tcntxt, u32 evt_mask) { struct i2o_controller *c = dev->iop; - struct i2o_message *msg; + struct i2o_message __iomem *msg; u32 m; m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_MESSAGE_GET); @@ -1310,5 +1312,4 @@ EXPORT_SYMBOL(i2o_iop_find_device); EXPORT_SYMBOL(i2o_event_register); EXPORT_SYMBOL(i2o_status_get); -EXPORT_SYMBOL(i2o_hrt_get); EXPORT_SYMBOL(i2o_controllers); diff -Nru a/drivers/mmc/pxamci.c b/drivers/mmc/pxamci.c --- a/drivers/mmc/pxamci.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mmc/pxamci.c 2004-11-29 21:22:08 -08:00 @@ -72,11 +72,6 @@ unsigned int dma_dir; }; -/* - * The base MMC clock rate - */ -#define CLOCKRATE 20000000 - static inline unsigned int ns_to_clocks(unsigned int ns) { return (ns * (CLOCKRATE / 1000000) + 999) / 1000; @@ -244,7 +239,24 @@ if (stat & STAT_TIME_OUT_RESPONSE) { cmd->error = MMC_ERR_TIMEOUT; } else if (stat & STAT_RES_CRC_ERR && cmd->flags & MMC_RSP_CRC) { +#ifdef CONFIG_PXA27x + /* + * workaround for erratum #42: + * Intel PXA27x Family Processor Specification Update Rev 001 + */ + if (cmd->opcode == MMC_ALL_SEND_CID || + cmd->opcode == MMC_SEND_CSD || + cmd->opcode == MMC_SEND_CID) { + /* a bogus CRC error can appear if the msb of + the 15 byte response is a one */ + if ((cmd->resp[0] & 0x80000000) == 0) + cmd->error = MMC_ERR_BADCRC; + } else { + DBG("ignoring CRC from command %d - *risky*\n",cmd->opcode); + } +#else cmd->error = MMC_ERR_BADCRC; +#endif } pxamci_disable_irq(host, END_CMD_RES); @@ -429,8 +441,8 @@ } mmc->ops = &pxamci_ops; - mmc->f_min = 312500; - mmc->f_max = 20000000; + mmc->f_min = CLOCKRATE_MIN; + mmc->f_max = CLOCKRATE_MAX; /* * We can do SG-DMA, but we don't because we never know how much @@ -460,8 +472,7 @@ spin_lock_init(&host->lock); host->res = r; host->irq = irq; - host->imask = TXFIFO_WR_REQ|RXFIFO_RD_REQ|CLK_IS_OFF|STOP_CMD| - END_CMD_RES|PRG_DONE|DATA_TRAN_DONE; + host->imask = MMC_I_MASK_ALL; host->base = ioremap(r->start, SZ_4K); if (!host->base) { @@ -478,10 +489,6 @@ writel(64, host->base + MMC_RESTO); writel(host->imask, host->base + MMC_I_MASK); - pxa_gpio_mode(GPIO6_MMCCLK_MD); - pxa_gpio_mode(GPIO8_MMCCS0_MD); - pxa_set_cken(CKEN12_MMC, 1); - host->dma = pxa_request_dma(DRIVER_NAME, DMA_PRIO_LOW, pxamci_dma_irq, host); if (host->dma < 0) { @@ -497,6 +504,8 @@ if (host->pdata && host->pdata->init) host->pdata->init(dev, pxamci_detect_irq, mmc); + + pxa_set_cken(CKEN12_MMC, 1); mmc_add_host(mmc); diff -Nru a/drivers/mmc/pxamci.h b/drivers/mmc/pxamci.h --- a/drivers/mmc/pxamci.h 2004-11-29 21:22:07 -08:00 +++ b/drivers/mmc/pxamci.h 2004-11-29 21:22:07 -08:00 @@ -70,6 +70,16 @@ #define BUF_PART_FULL (1 << 0) #define MMC_I_MASK 0x0028 + +/*PXA27x MMC interrupts*/ +#define SDIO_SUSPEND_ACK (1 << 12) +#define SDIO_INT (1 << 11) +#define RD_STALLED (1 << 10) +#define RES_ERR (1 << 9) +#define DAT_ERR (1 << 8) +#define TINT (1 << 7) + +/*PXA2xx MMC interrupts*/ #define TXFIFO_WR_REQ (1 << 6) #define RXFIFO_RD_REQ (1 << 5) #define CLK_IS_OFF (1 << 4) @@ -78,6 +88,12 @@ #define PRG_DONE (1 << 1) #define DATA_TRAN_DONE (1 << 0) +#ifdef CONFIG_PXA27x +#define MMC_I_MASK_ALL 0x00001fff +#else +#define MMC_I_MASK_ALL 0x0000007f +#endif + #define MMC_I_REG 0x002c /* same as MMC_I_MASK */ @@ -92,3 +108,17 @@ #define MMC_RXFIFO 0x0040 /* 8 bit */ #define MMC_TXFIFO 0x0044 /* 8 bit */ + +/* + * The base MMC clock rate + */ +#ifdef CONFIG_PXA27x +#define CLOCKRATE_MIN 304688 +#define CLOCKRATE_MAX 19500000 +#else +#define CLOCKRATE_MIN 312500 +#define CLOCKRATE_MAX 20000000 +#endif + +#define CLOCKRATE CLOCKRATE_MAX + diff -Nru a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c --- a/drivers/mtd/chips/cfi_cmdset_0001.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/mtd/chips/cfi_cmdset_0001.c 2004-11-29 21:22:07 -08:00 @@ -4,8 +4,9 @@ * * (C) 2000 Red Hat. GPL'd * - * $Id: cfi_cmdset_0001.c,v 1.157 2004/10/15 20:00:26 nico Exp $ - * + * $Id: cfi_cmdset_0001.c,v 1.160 2004/11/01 06:02:24 nico Exp $ + * (+ suspend fix from v1.162) + * (+ partition detection fix from v1.163) * * 10/10/2000 Nicolas Pitre * - completely revamped method functions so they are aware and @@ -62,7 +63,7 @@ struct mtd_info *cfi_cmdset_0001(struct map_info *, int); static struct mtd_info *cfi_intelext_setup (struct mtd_info *); -static int cfi_intelext_partition_fixup(struct map_info *, struct cfi_private **); +static int cfi_intelext_partition_fixup(struct mtd_info *, struct cfi_private **); static int cfi_intelext_point (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char **mtdbuf); @@ -212,6 +213,66 @@ { 0, 0, NULL, NULL } }; +static inline struct cfi_pri_intelext * +read_pri_intelext(struct map_info *map, __u16 adr) +{ + struct cfi_pri_intelext *extp; + unsigned int extp_size = sizeof(*extp); + + again: + extp = (struct cfi_pri_intelext *)cfi_read_pri(map, adr, extp_size, "Intel/Sharp"); + if (!extp) + return NULL; + + /* Do some byteswapping if necessary */ + extp->FeatureSupport = le32_to_cpu(extp->FeatureSupport); + extp->BlkStatusRegMask = le16_to_cpu(extp->BlkStatusRegMask); + extp->ProtRegAddr = le16_to_cpu(extp->ProtRegAddr); + + if (extp->MajorVersion == '1' && extp->MinorVersion == '3') { + unsigned int extra_size = 0; + int nb_parts, i; + + /* Protection Register info */ + extra_size += (extp->NumProtectionFields - 1) * (4 + 6); + + /* Burst Read info */ + extra_size += 6; + + /* Number of hardware-partitions */ + extra_size += 1; + if (extp_size < sizeof(*extp) + extra_size) + goto need_more; + nb_parts = extp->extra[extra_size - 1]; + + for (i = 0; i < nb_parts; i++) { + struct cfi_intelext_regioninfo *rinfo; + rinfo = (struct cfi_intelext_regioninfo *)&extp->extra[extra_size]; + extra_size += sizeof(*rinfo); + if (extp_size < sizeof(*extp) + extra_size) + goto need_more; + rinfo->NumIdentPartitions=le16_to_cpu(rinfo->NumIdentPartitions); + extra_size += (rinfo->NumBlockTypes - 1) + * sizeof(struct cfi_intelext_blockinfo); + } + + if (extp_size < sizeof(*extp) + extra_size) { + need_more: + extp_size = sizeof(*extp) + extra_size; + kfree(extp); + if (extp_size > 4096) { + printk(KERN_ERR + "%s: cfi_pri_intelext is too fat\n", + __FUNCTION__); + return NULL; + } + goto again; + } + } + + return extp; +} + /* This routine is made available to other mtd code via * inter_module_register. It must only be accessed through * inter_module_get which will bump the use count of this module. The @@ -255,22 +316,17 @@ __u16 adr = primary?cfi->cfiq->P_ADR:cfi->cfiq->A_ADR; struct cfi_pri_intelext *extp; - extp = (struct cfi_pri_intelext*)cfi_read_pri(map, adr, sizeof(*extp), "Intel/Sharp"); + extp = read_pri_intelext(map, adr); if (!extp) { kfree(mtd); return NULL; } - - /* Do some byteswapping if necessary */ - extp->FeatureSupport = le32_to_cpu(extp->FeatureSupport); - extp->BlkStatusRegMask = le16_to_cpu(extp->BlkStatusRegMask); - extp->ProtRegAddr = le16_to_cpu(extp->ProtRegAddr); /* Install our own private info structure */ cfi->cmdset_priv = extp; cfi_fixup(mtd, cfi_fixup_table); - + #ifdef DEBUG_CFI_FEATURES /* Tell the user about it in lots of lovely detail */ cfi_tell_features(extp); @@ -355,7 +411,7 @@ /* This function has the potential to distort the reality a bit and therefore should be called last. */ - if (cfi_intelext_partition_fixup(map, &cfi) != 0) + if (cfi_intelext_partition_fixup(mtd, &cfi) != 0) goto setup_err; __module_get(THIS_MODULE); @@ -371,20 +427,16 @@ return NULL; } -static int cfi_intelext_partition_fixup(struct map_info *map, +static int cfi_intelext_partition_fixup(struct mtd_info *mtd, struct cfi_private **pcfi) { + struct map_info *map = mtd->priv; struct cfi_private *cfi = *pcfi; struct cfi_pri_intelext *extp = cfi->cmdset_priv; /* * Probing of multi-partition flash ships. * - * This is extremely crude at the moment and should probably be - * extracted entirely from the Intel extended query data instead. - * Right now a L18 flash is assumed if multiple operations is - * detected. - * * To support multiple partitions when available, we simply arrange * for each of them to have their own flchip structure even if they * are on the same physical chip. This means completely recreating @@ -393,20 +445,49 @@ * arrangement at this point. This can be rearranged in the future * if someone feels motivated enough. --nico */ - if (extp && extp->FeatureSupport & (1 << 9)) { + if (extp && extp->MajorVersion == '1' && extp->MinorVersion == '3' + && extp->FeatureSupport & (1 << 9)) { struct cfi_private *newcfi; struct flchip *chip; struct flchip_shared *shared; - int numparts, partshift, numvirtchips, i, j; + int offs, numregions, numparts, partshift, numvirtchips, i, j; + + /* Protection Register info */ + offs = (extp->NumProtectionFields - 1) * (4 + 6); + + /* Burst Read info */ + offs += 6; + + /* Number of partition regions */ + numregions = extp->extra[offs]; + offs += 1; + + /* Number of hardware partitions */ + numparts = 0; + for (i = 0; i < numregions; i++) { + struct cfi_intelext_regioninfo *rinfo; + rinfo = (struct cfi_intelext_regioninfo *)&extp->extra[offs]; + numparts += rinfo->NumIdentPartitions; + offs += sizeof(*rinfo) + + (rinfo->NumBlockTypes - 1) * + sizeof(struct cfi_intelext_blockinfo); + } /* - * The L18 flash memory array is divided - * into multiple 8-Mbit partitions. + * All functions below currently rely on all chips having + * the same geometry so we'll just assume that all hardware + * partitions are of the same size too. */ - numparts = 1 << (cfi->cfiq->DevSize - 20); - partshift = 20 + __ffs(cfi->interleave); - numvirtchips = cfi->numchips * numparts; + partshift = cfi->chipshift - __ffs(numparts); + if ((1 << partshift) < mtd->erasesize) { + printk( KERN_ERR + "%s: bad number of hw partitions (%d)\n", + __FUNCTION__, numparts); + return -EINVAL; + } + + numvirtchips = cfi->numchips * numparts; newcfi = kmalloc(sizeof(struct cfi_private) + numvirtchips * sizeof(struct flchip), GFP_KERNEL); if (!newcfi) return -ENOMEM; @@ -436,10 +517,10 @@ } } - printk(KERN_DEBUG "%s: %d sets of %d interleaved chips " - "--> %d partitions of %#x bytes\n", + printk(KERN_DEBUG "%s: %d set(s) of %d interleaved chips " + "--> %d partitions of %d KiB\n", map->name, cfi->numchips, cfi->interleave, - newcfi->numchips, 1<chipshift); + newcfi->numchips, 1<<(newcfi->chipshift-10)); map->fldrv_priv = newcfi; *pcfi = newcfi; @@ -861,6 +942,7 @@ } return ret; } + #if 0 static int cfi_intelext_read_prot_reg (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf, int base_offst, int reg_sz) { @@ -1028,6 +1110,7 @@ /* Done and happy. */ chip->state = FL_STATUS; + /* check for lock bit */ if (map_word_bitsset(map, status, CMD(0x02))) { /* clear status */ @@ -1179,13 +1262,15 @@ if (++z > 20) { /* Argh. Not ready for write to buffer */ + map_word Xstatus; map_write(map, CMD(0x70), cmd_adr); chip->state = FL_STATUS; - printk(KERN_ERR "Chip not ready for buffer write. Xstatus = %lx, status = %lx\n", - status.x[0], map_read(map, cmd_adr).x[0]); + Xstatus = map_read(map, cmd_adr); /* Odd. Clear status bits */ map_write(map, CMD(0x50), cmd_adr); map_write(map, CMD(0x70), cmd_adr); + printk(KERN_ERR "Chip not ready for buffer write. status = %lx, Xstatus = %lx\n", + status.x[0], Xstatus.x[0]); ret = -EIO; goto out; } @@ -1413,16 +1498,17 @@ /* OK Still waiting */ if (time_after(jiffies, timeo)) { + map_word Xstatus; map_write(map, CMD(0x70), adr); chip->state = FL_STATUS; - printk(KERN_ERR "waiting for erase at %08lx to complete timed out. Xstatus = %lx, status = %lx.\n", - adr, status.x[0], map_read(map, adr).x[0]); + Xstatus = map_read(map, adr); /* Clear status bits */ map_write(map, CMD(0x50), adr); map_write(map, CMD(0x70), adr); - DISABLE_VPP(map); - spin_unlock(chip->mutex); - return -EIO; + printk(KERN_ERR "waiting for erase at %08lx to complete timed out. status = %lx, Xstatus = %lx.\n", + adr, status.x[0], Xstatus.x[0]); + ret = -EIO; + goto out; } /* Latency issues. Drop the lock, wait a while and retry */ @@ -1431,9 +1517,6 @@ schedule_timeout(1); spin_lock(chip->mutex); } - - DISABLE_VPP(map); - ret = 0; /* We've broken this before. It doesn't hurt to be safe */ map_write(map, CMD(0x70), adr); @@ -1442,7 +1525,13 @@ /* check for lock bit */ if (map_word_bitsset(map, status, CMD(0x3a))) { - unsigned char chipstatus = status.x[0]; + unsigned char chipstatus; + + /* Reset the error bits */ + map_write(map, CMD(0x50), adr); + map_write(map, CMD(0x70), adr); + + chipstatus = status.x[0]; if (!map_word_equal(map, status, CMD(chipstatus))) { int i, w; for (w=0; wstate = FL_STATUS; + put_chip(map, chip, adr); spin_unlock(chip->mutex); goto retry; } printk(KERN_DEBUG "Chip erase failed at 0x%08lx: status 0x%x\n", adr, chipstatus); ret = -EIO; } + } else { + ret = 0; } - wake_up(&chip->wq); + out: put_chip(map, chip, adr); spin_unlock(chip->mutex); return ret; } @@ -1548,12 +1636,13 @@ unsigned long adr, int len, void *thunk) { struct cfi_private *cfi = map->fldrv_priv; - int ofs_factor = cfi->interleave * cfi->device_type; + int status, ofs_factor = cfi->interleave * cfi->device_type; cfi_send_gen_cmd(0x90, 0x55, 0, map, cfi, cfi->device_type, NULL); - printk(KERN_DEBUG "block status register for 0x%08lx is %x\n", - adr, cfi_read_query(map, adr+(2*ofs_factor))); chip->state = FL_JEDEC_QUERY; + status = cfi_read_query(map, adr+(2*ofs_factor)); + printk(KERN_DEBUG "block status register for 0x%08lx is %x\n", + adr, status); return 0; } #endif @@ -1609,11 +1698,13 @@ /* OK Still waiting */ if (time_after(jiffies, timeo)) { + map_word Xstatus; map_write(map, CMD(0x70), adr); chip->state = FL_STATUS; - printk(KERN_ERR "waiting for unlock to complete timed out. Xstatus = %lx, status = %lx.\n", - status.x[0], map_read(map, adr).x[0]); - DISABLE_VPP(map); + Xstatus = map_read(map, adr); + printk(KERN_ERR "waiting for unlock to complete timed out. status = %lx, Xstatus = %lx.\n", + status.x[0], Xstatus.x[0]); + put_chip(map, chip, adr); spin_unlock(chip->mutex); return -EIO; } @@ -1704,9 +1795,18 @@ * as the whole point is that nobody can do anything * with the chip now anyway. */ + } else { + /* There seems to be an operation pending. We must wait for it. */ + printk(KERN_NOTICE "Flash device refused suspend due to pending operation (oldstate %d)\n", chip->oldstate); + ret = -EAGAIN; } break; default: + /* Should we actually wait? Once upon a time these routines weren't + allowed to. Or should we return -EAGAIN, because the upper layers + ought to have already shut down anything which was using the device + anyway? The latter for now. */ + printk(KERN_NOTICE "Flash device refused suspend due to active operation (state %d)\n", chip->oldstate); ret = -EAGAIN; case FL_PM_SUSPENDED: break; @@ -1727,6 +1827,7 @@ because we're returning failure, and it didn't get power cycled */ chip->state = chip->oldstate; + chip->oldstate = FL_READY; wake_up(&chip->wq); } spin_unlock(chip->mutex); @@ -1752,7 +1853,7 @@ /* Go to known state. Chip may have been power cycled */ if (chip->state == FL_PM_SUSPENDED) { map_write(map, CMD(0xFF), cfi->chips[i].start); - chip->state = FL_READY; + chip->oldstate = chip->state = FL_READY; wake_up(&chip->wq); } diff -Nru a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c --- a/drivers/mtd/chips/cfi_cmdset_0002.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/mtd/chips/cfi_cmdset_0002.c 2004-11-29 21:22:07 -08:00 @@ -13,7 +13,7 @@ * * This code is GPL * - * $Id: cfi_cmdset_0002.c,v 1.110 2004/09/24 04:26:04 eric Exp $ + * $Id: cfi_cmdset_0002.c,v 1.111 2004/11/16 18:29:00 dwmw2 Exp $ * */ @@ -1506,7 +1506,7 @@ static char im_name[]="cfi_cmdset_0002"; -int __init cfi_amdstd_init(void) +static int __init cfi_amdstd_init(void) { inter_module_register(im_name, THIS_MODULE, &cfi_cmdset_0002); return 0; diff -Nru a/drivers/mtd/chips/cfi_cmdset_0020.c b/drivers/mtd/chips/cfi_cmdset_0020.c --- a/drivers/mtd/chips/cfi_cmdset_0020.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/mtd/chips/cfi_cmdset_0020.c 2004-11-29 21:22:07 -08:00 @@ -4,7 +4,7 @@ * * (C) 2000 Red Hat. GPL'd * - * $Id: cfi_cmdset_0020.c,v 1.15 2004/08/09 13:19:43 dwmw2 Exp $ + * $Id: cfi_cmdset_0020.c,v 1.16 2004/11/16 18:29:00 dwmw2 Exp $ * * 10/10/2000 Nicolas Pitre * - completely revamped method functions so they are aware and @@ -1401,7 +1401,7 @@ static char im_name[]="cfi_cmdset_0020"; -int __init cfi_staa_init(void) +static int __init cfi_staa_init(void) { inter_module_register(im_name, THIS_MODULE, &cfi_cmdset_0020); return 0; diff -Nru a/drivers/mtd/chips/cfi_probe.c b/drivers/mtd/chips/cfi_probe.c --- a/drivers/mtd/chips/cfi_probe.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/chips/cfi_probe.c 2004-11-29 21:22:08 -08:00 @@ -39,25 +39,24 @@ struct cfi_private *cfi) { int osf = cfi->interleave * cfi->device_type; // scale factor - map_word val; - map_word qry; + map_word val[3]; + map_word qry[3]; - qry = cfi_build_cmd('Q', map, cfi); - val = map_read(map, base + osf*0x10); + qry[0] = cfi_build_cmd('Q', map, cfi); + qry[1] = cfi_build_cmd('R', map, cfi); + qry[2] = cfi_build_cmd('Y', map, cfi); + + val[0] = map_read(map, base + osf*0x10); + val[1] = map_read(map, base + osf*0x11); + val[2] = map_read(map, base + osf*0x12); - if (!map_word_equal(map, qry, val)) + if (!map_word_equal(map, qry[0], val[0])) return 0; - qry = cfi_build_cmd('R', map, cfi); - val = map_read(map, base + osf*0x11); - - if (!map_word_equal(map, qry, val)) + if (!map_word_equal(map, qry[1], val[1])) return 0; - qry = cfi_build_cmd('Y', map, cfi); - val = map_read(map, base + osf*0x12); - - if (!map_word_equal(map, qry, val)) + if (!map_word_equal(map, qry[2], val[2])) return 0; return 1; // nothing found diff -Nru a/drivers/mtd/chips/chipreg.c b/drivers/mtd/chips/chipreg.c --- a/drivers/mtd/chips/chipreg.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/mtd/chips/chipreg.c 2004-11-29 21:22:07 -08:00 @@ -1,5 +1,5 @@ /* - * $Id: chipreg.c,v 1.16 2003/05/29 09:36:15 dwmw2 Exp $ + * $Id: chipreg.c,v 1.17 2004/11/16 18:29:00 dwmw2 Exp $ * * Registration for chip drivers * @@ -15,7 +15,7 @@ #include #include -spinlock_t chip_drvs_lock = SPIN_LOCK_UNLOCKED; +static spinlock_t chip_drvs_lock = SPIN_LOCK_UNLOCKED; static LIST_HEAD(chip_drvs_list); void register_mtd_chip_driver(struct mtd_chip_driver *drv) diff -Nru a/drivers/mtd/chips/jedec_probe.c b/drivers/mtd/chips/jedec_probe.c --- a/drivers/mtd/chips/jedec_probe.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/chips/jedec_probe.c 2004-11-29 21:22:08 -08:00 @@ -1,7 +1,7 @@ /* Common Flash Interface probe code. (C) 2000 Red Hat. GPL'd. - $Id: jedec_probe.c,v 1.57 2004/09/17 11:45:05 eric Exp $ + $Id: jedec_probe.c,v 1.58 2004/11/16 18:29:00 dwmw2 Exp $ See JEDEC (http://www.jedec.org/) standard JESD21C (section 3.5) for the standard this probe goes back to. @@ -1661,7 +1661,7 @@ static int jedec_probe_chip(struct map_info *map, __u32 base, unsigned long *chip_map, struct cfi_private *cfi); -struct mtd_info *jedec_probe(struct map_info *map); +static struct mtd_info *jedec_probe(struct map_info *map); static inline u32 jedec_read_mfr(struct map_info *map, __u32 base, struct cfi_private *cfi) @@ -2055,7 +2055,7 @@ .probe_chip = jedec_probe_chip }; -struct mtd_info *jedec_probe(struct map_info *map) +static struct mtd_info *jedec_probe(struct map_info *map) { /* * Just use the generic probe stuff to call our CFI-specific @@ -2070,7 +2070,7 @@ .module = THIS_MODULE }; -int __init jedec_probe_init(void) +static int __init jedec_probe_init(void) { register_mtd_chip_driver(&jedec_chipdrv); return 0; diff -Nru a/drivers/mtd/chips/map_absent.c b/drivers/mtd/chips/map_absent.c --- a/drivers/mtd/chips/map_absent.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/chips/map_absent.c 2004-11-29 21:22:08 -08:00 @@ -1,7 +1,7 @@ /* * Common code to handle absent "placeholder" devices * Copyright 2001 Resilience Corporation - * $Id: map_absent.c,v 1.4 2003/05/28 12:51:49 dwmw2 Exp $ + * $Id: map_absent.c,v 1.5 2004/11/16 18:29:00 dwmw2 Exp $ * * This map driver is used to allocate "placeholder" MTD * devices on systems that have socketed/removable media. @@ -98,7 +98,7 @@ /* nop */ } -int __init map_absent_init(void) +static int __init map_absent_init(void) { register_mtd_chip_driver(&map_absent_chipdrv); return 0; diff -Nru a/drivers/mtd/chips/map_ram.c b/drivers/mtd/chips/map_ram.c --- a/drivers/mtd/chips/map_ram.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/mtd/chips/map_ram.c 2004-11-29 21:22:07 -08:00 @@ -1,7 +1,7 @@ /* * Common code to handle map devices which are simple RAM * (C) 2000 Red Hat. GPL'd. - * $Id: map_ram.c,v 1.20 2004/08/09 13:19:43 dwmw2 Exp $ + * $Id: map_ram.c,v 1.21 2004/11/16 18:29:00 dwmw2 Exp $ */ #include @@ -124,7 +124,7 @@ /* Nothing to see here */ } -int __init map_ram_init(void) +static int __init map_ram_init(void) { register_mtd_chip_driver(&mapram_chipdrv); return 0; diff -Nru a/drivers/mtd/chips/map_rom.c b/drivers/mtd/chips/map_rom.c --- a/drivers/mtd/chips/map_rom.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/mtd/chips/map_rom.c 2004-11-29 21:22:07 -08:00 @@ -1,7 +1,7 @@ /* * Common code to handle map devices which are simple ROM * (C) 2000 Red Hat. GPL'd. - * $Id: map_rom.c,v 1.21 2004/07/12 14:06:01 dwmw2 Exp $ + * $Id: map_rom.c,v 1.22 2004/11/16 18:29:00 dwmw2 Exp $ */ #include @@ -19,7 +19,7 @@ static int maprom_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *); static int maprom_write (struct mtd_info *, loff_t, size_t, size_t *, const u_char *); static void maprom_nop (struct mtd_info *); -struct mtd_info *map_rom_probe(struct map_info *map); +static struct mtd_info *map_rom_probe(struct map_info *map); static struct mtd_chip_driver maprom_chipdrv = { .probe = map_rom_probe, @@ -27,7 +27,7 @@ .module = THIS_MODULE }; -struct mtd_info *map_rom_probe(struct map_info *map) +static struct mtd_info *map_rom_probe(struct map_info *map) { struct mtd_info *mtd; @@ -75,7 +75,7 @@ return -EIO; } -int __init map_rom_init(void) +static int __init map_rom_init(void) { register_mtd_chip_driver(&maprom_chipdrv); return 0; diff -Nru a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c --- a/drivers/mtd/cmdlinepart.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/cmdlinepart.c 2004-11-29 21:22:08 -08:00 @@ -1,5 +1,5 @@ /* - * $Id: cmdlinepart.c,v 1.15 2004/09/21 12:11:41 lavinen Exp $ + * $Id: cmdlinepart.c,v 1.16 2004/11/16 18:28:59 dwmw2 Exp $ * * Read flash partition table from command line * @@ -339,7 +339,7 @@ * main.c::checksetup(). Note that we can not yet kmalloc() anything, * so we only save the commandline for later processing. */ -int mtdpart_setup(char *s) +static int mtdpart_setup(char *s) { cmdline = s; return 1; diff -Nru a/drivers/mtd/devices/Kconfig b/drivers/mtd/devices/Kconfig --- a/drivers/mtd/devices/Kconfig 2004-11-29 21:22:09 -08:00 +++ b/drivers/mtd/devices/Kconfig 2004-11-29 21:22:09 -08:00 @@ -1,5 +1,5 @@ # drivers/mtd/maps/Kconfig -# $Id: Kconfig,v 1.12 2004/08/10 13:12:18 dwmw2 Exp $ +# $Id: Kconfig,v 1.13 2004/10/01 21:47:13 gleixner Exp $ menu "Self-contained MTD device drivers" depends on MTD!=n @@ -193,8 +193,8 @@ config MTD_DOCECC tristate - default m if MTD_DOCPROBE!=y && MTD_NAND_DISKONCHIP!=y && (MTD_DOCPROBE=m || MTD_NAND_DISKONCHIP=m) - default y if MTD_DOCPROBE=y || MTD_NAND_DISKONCHIP=y + default m if MTD_DOCPROBE=m + default y if MTD_DOCPROBE=y help This isn't a real config option; it's derived. diff -Nru a/drivers/mtd/devices/blkmtd.c b/drivers/mtd/devices/blkmtd.c --- a/drivers/mtd/devices/blkmtd.c 2004-11-29 21:22:09 -08:00 +++ b/drivers/mtd/devices/blkmtd.c 2004-11-29 21:22:09 -08:00 @@ -1,5 +1,5 @@ /* - * $Id: blkmtd.c,v 1.23 2004/08/09 14:03:19 dwmw2 Exp $ + * $Id: blkmtd.c,v 1.24 2004/11/16 18:29:01 dwmw2 Exp $ * * blkmtd.c - use a block device as a fake MTD * @@ -39,7 +39,7 @@ /* Default erase size in K, always make it a multiple of PAGE_SIZE */ #define CONFIG_MTD_BLKDEV_ERASESIZE (128 << 10) /* 128KiB */ -#define VERSION "$Revision: 1.23 $" +#define VERSION "$Revision: 1.24 $" /* Info for the block device */ struct blkmtd_dev { @@ -59,10 +59,10 @@ #define MAX_DEVICES 4 /* Module parameters passed by insmod/modprobe */ -char *device[MAX_DEVICES]; /* the block device to use */ -int erasesz[MAX_DEVICES]; /* optional default erase size */ -int ro[MAX_DEVICES]; /* optional read only flag */ -int sync; +static char *device[MAX_DEVICES]; /* the block device to use */ +static int erasesz[MAX_DEVICES]; /* optional default erase size */ +static int ro[MAX_DEVICES]; /* optional read only flag */ +static int sync; MODULE_LICENSE("GPL"); diff -Nru a/drivers/mtd/devices/doc2000.c b/drivers/mtd/devices/doc2000.c --- a/drivers/mtd/devices/doc2000.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/mtd/devices/doc2000.c 2004-11-29 21:22:06 -08:00 @@ -4,7 +4,7 @@ * (c) 1999 Machine Vision Holdings, Inc. * (c) 1999, 2000 David Woodhouse * - * $Id: doc2000.c,v 1.62 2004/08/09 14:04:02 dwmw2 Exp $ + * $Id: doc2000.c,v 1.64 2004/11/16 18:29:01 dwmw2 Exp $ */ #include @@ -89,7 +89,7 @@ /* DOC_WaitReady: Wait for RDY line to be asserted by the flash chip */ static int _DoC_WaitReady(struct DiskOnChip *doc) { - unsigned long docptr = doc->virtadr; + void __iomem *docptr = doc->virtadr; unsigned long timeo = jiffies + (HZ * 10); DEBUG(MTD_DEBUG_LEVEL3, @@ -114,7 +114,8 @@ static inline int DoC_WaitReady(struct DiskOnChip *doc) { - unsigned long docptr = doc->virtadr; + void __iomem *docptr = doc->virtadr; + /* This is inline, to optimise the common case, where it's ready instantly */ int ret = 0; @@ -140,7 +141,7 @@ static inline int DoC_Command(struct DiskOnChip *doc, unsigned char command, unsigned char xtraflags) { - unsigned long docptr = doc->virtadr; + void __iomem *docptr = doc->virtadr; if (DoC_is_2000(doc)) xtraflags |= CDSN_CTRL_FLASH_IO; @@ -172,10 +173,8 @@ static int DoC_Address(struct DiskOnChip *doc, int numbytes, unsigned long ofs, unsigned char xtraflags1, unsigned char xtraflags2) { - unsigned long docptr; int i; - - docptr = doc->virtadr; + void __iomem *docptr = doc->virtadr; if (DoC_is_2000(doc)) xtraflags1 |= CDSN_CTRL_FLASH_IO; @@ -240,11 +239,9 @@ { volatile int dummy; int modulus = 0xffff; - unsigned long docptr; + void __iomem *docptr = doc->virtadr; int i; - docptr = doc->virtadr; - if (len <= 0) return; @@ -271,11 +268,9 @@ /* Write a buffer to DoC, taking care of Millennium odditys */ static void DoC_WriteBuf(struct DiskOnChip *doc, const u_char * buf, int len) { - unsigned long docptr; + void __iomem *docptr = doc->virtadr; int i; - docptr = doc->virtadr; - if (len <= 0) return; @@ -292,7 +287,7 @@ static inline int DoC_SelectChip(struct DiskOnChip *doc, int chip) { - unsigned long docptr = doc->virtadr; + void __iomem *docptr = doc->virtadr; /* Software requirement 11.4.4 before writing DeviceSelect */ /* Deassert the CE line to eliminate glitches on the FCE# outputs */ @@ -316,7 +311,7 @@ static inline int DoC_SelectFloor(struct DiskOnChip *doc, int floor) { - unsigned long docptr = doc->virtadr; + void __iomem *docptr = doc->virtadr; /* Select the floor (bank) of chips required */ WriteDOC(floor, docptr, FloorSelect); @@ -639,15 +634,13 @@ size_t * retlen, u_char * buf, u_char * eccbuf, struct nand_oobinfo *oobsel) { struct DiskOnChip *this = (struct DiskOnChip *) mtd->priv; - unsigned long docptr; + void __iomem *docptr = this->virtadr; struct Nand *mychip; unsigned char syndrome[6]; volatile char dummy; int i, len256 = 0, ret=0; size_t left = len; - docptr = this->virtadr; - /* Don't allow read past end of device */ if (from >= this->totlen) return -EINVAL; @@ -799,15 +792,13 @@ { struct DiskOnChip *this = (struct DiskOnChip *) mtd->priv; int di; /* Yes, DI is a hangover from when I was disassembling the binary driver */ - unsigned long docptr; + void __iomem *docptr = this->virtadr; volatile char dummy; int len256 = 0; struct Nand *mychip; size_t left = len; int status; - docptr = this->virtadr; - /* Don't allow write past end of device */ if (to >= this->totlen) return -EINVAL; @@ -1044,13 +1035,10 @@ { struct DiskOnChip *this = (struct DiskOnChip *) mtd->priv; int len256 = 0, ret; - unsigned long docptr; struct Nand *mychip; down(&this->lock); - docptr = this->virtadr; - mychip = &this->chips[ofs >> this->chipshift]; if (this->curfloor != mychip->floor) { @@ -1105,7 +1093,7 @@ { struct DiskOnChip *this = (struct DiskOnChip *) mtd->priv; int len256 = 0; - unsigned long docptr = this->virtadr; + void __iomem *docptr = this->virtadr; struct Nand *mychip = &this->chips[ofs >> this->chipshift]; volatile int dummy; int status; @@ -1222,7 +1210,7 @@ __u32 ofs = instr->addr; __u32 len = instr->len; volatile int dummy; - unsigned long docptr; + void __iomem *docptr = this->virtadr; struct Nand *mychip; int status; @@ -1235,8 +1223,6 @@ instr->state = MTD_ERASING; - docptr = this->virtadr; - /* FIXME: Do this in the background. Use timers or schedule_task() */ while(len) { mychip = &this->chips[ofs >> this->chipshift]; @@ -1290,7 +1276,7 @@ * ****************************************************************************/ -int __init init_doc2000(void) +static int __init init_doc2000(void) { inter_module_register(im_name, THIS_MODULE, &DoC2k_init); return 0; diff -Nru a/drivers/mtd/devices/doc2001.c b/drivers/mtd/devices/doc2001.c --- a/drivers/mtd/devices/doc2001.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/mtd/devices/doc2001.c 2004-11-29 21:22:07 -08:00 @@ -4,7 +4,7 @@ * (c) 1999 Machine Vision Holdings, Inc. * (c) 1999, 2000 David Woodhouse * - * $Id: doc2001.c,v 1.44 2004/08/09 14:04:24 dwmw2 Exp $ + * $Id: doc2001.c,v 1.46 2004/11/16 18:29:01 dwmw2 Exp $ */ #include @@ -52,7 +52,7 @@ static struct mtd_info *docmillist = NULL; /* Perform the required delay cycles by reading from the NOP register */ -static void DoC_Delay(unsigned long docptr, unsigned short cycles) +static void DoC_Delay(void __iomem * docptr, unsigned short cycles) { volatile char dummy; int i; @@ -62,7 +62,7 @@ } /* DOC_WaitReady: Wait for RDY line to be asserted by the flash chip */ -static int _DoC_WaitReady(unsigned long docptr) +static int _DoC_WaitReady(void __iomem * docptr) { unsigned short c = 0xffff; @@ -79,7 +79,7 @@ return (c == 0); } -static inline int DoC_WaitReady(unsigned long docptr) +static inline int DoC_WaitReady(void __iomem * docptr) { /* This is inline, to optimise the common case, where it's ready instantly */ int ret = 0; @@ -103,7 +103,7 @@ with the internal pipeline. Each of 4 delay cycles (read from the NOP register) is required after writing to CDSN Control register, see Software Requirement 11.4 item 3. */ -static inline void DoC_Command(unsigned long docptr, unsigned char command, +static inline void DoC_Command(void __iomem * docptr, unsigned char command, unsigned char xtraflags) { /* Assert the CLE (Command Latch Enable) line to the flash chip */ @@ -123,7 +123,7 @@ with the internal pipeline. Each of 4 delay cycles (read from the NOP register) is required after writing to CDSN Control register, see Software Requirement 11.4 item 3. */ -static inline void DoC_Address(unsigned long docptr, int numbytes, unsigned long ofs, +static inline void DoC_Address(void __iomem * docptr, int numbytes, unsigned long ofs, unsigned char xtraflags1, unsigned char xtraflags2) { /* Assert the ALE (Address Latch Enable) line to the flash chip */ @@ -161,7 +161,7 @@ } /* DoC_SelectChip: Select a given flash chip within the current floor */ -static int DoC_SelectChip(unsigned long docptr, int chip) +static int DoC_SelectChip(void __iomem * docptr, int chip) { /* Select the individual flash chip requested */ WriteDOC(chip, docptr, CDSNDeviceSelect); @@ -172,7 +172,7 @@ } /* DoC_SelectFloor: Select a given floor (bank of flash chips) */ -static int DoC_SelectFloor(unsigned long docptr, int floor) +static int DoC_SelectFloor(void __iomem * docptr, int floor) { /* Select the floor (bank) of chips required */ WriteDOC(floor, docptr, FloorSelect); @@ -417,7 +417,7 @@ volatile char dummy; unsigned char syndrome[6]; struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; - unsigned long docptr = this->virtadr; + void __iomem *docptr = this->virtadr; struct Nand *mychip = &this->chips[from >> (this->chipshift)]; /* Don't allow read past end of device */ @@ -543,7 +543,7 @@ int i,ret = 0; volatile char dummy; struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; - unsigned long docptr = this->virtadr; + void __iomem *docptr = this->virtadr; struct Nand *mychip = &this->chips[to >> (this->chipshift)]; /* Don't allow write past end of device */ @@ -678,7 +678,7 @@ #endif volatile char dummy; struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; - unsigned long docptr = this->virtadr; + void __iomem *docptr = this->virtadr; struct Nand *mychip = &this->chips[ofs >> this->chipshift]; /* Find the chip which is to be used and select it */ @@ -730,7 +730,7 @@ volatile char dummy; int ret = 0; struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; - unsigned long docptr = this->virtadr; + void __iomem *docptr = this->virtadr; struct Nand *mychip = &this->chips[ofs >> this->chipshift]; /* Find the chip which is to be used and select it */ @@ -799,7 +799,7 @@ struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; __u32 ofs = instr->addr; __u32 len = instr->len; - unsigned long docptr = this->virtadr; + void __iomem *docptr = this->virtadr; struct Nand *mychip = &this->chips[ofs >> this->chipshift]; if (len != mtd->erasesize) @@ -856,7 +856,7 @@ * ****************************************************************************/ -int __init init_doc2001(void) +static int __init init_doc2001(void) { inter_module_register(im_name, THIS_MODULE, &DoCMil_init); return 0; diff -Nru a/drivers/mtd/devices/doc2001plus.c b/drivers/mtd/devices/doc2001plus.c --- a/drivers/mtd/devices/doc2001plus.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/mtd/devices/doc2001plus.c 2004-11-29 21:22:06 -08:00 @@ -6,7 +6,7 @@ * (c) 1999 Machine Vision Holdings, Inc. * (c) 1999, 2000 David Woodhouse * - * $Id: doc2001plus.c,v 1.9 2004/08/09 13:19:44 dwmw2 Exp $ + * $Id: doc2001plus.c,v 1.11 2004/11/16 18:29:01 dwmw2 Exp $ * * Released under GPL */ @@ -57,7 +57,7 @@ /* Perform the required delay cycles by writing to the NOP register */ -static void DoC_Delay(unsigned long docptr, int cycles) +static void DoC_Delay(void __iomem * docptr, int cycles) { int i; @@ -68,7 +68,7 @@ #define CDSN_CTRL_FR_B_MASK (CDSN_CTRL_FR_B0 | CDSN_CTRL_FR_B1) /* DOC_WaitReady: Wait for RDY line to be asserted by the flash chip */ -static int _DoC_WaitReady(unsigned long docptr) +static int _DoC_WaitReady(void __iomem * docptr) { unsigned int c = 0xffff; @@ -85,7 +85,7 @@ return (c == 0); } -static inline int DoC_WaitReady(unsigned long docptr) +static inline int DoC_WaitReady(void __iomem * docptr) { /* This is inline, to optimise the common case, where it's ready instantly */ int ret = 0; @@ -106,7 +106,7 @@ * can detect. M-systems suggest always check this on any block level * operation and setting to normal mode if in reset mode. */ -static inline void DoC_CheckASIC(unsigned long docptr) +static inline void DoC_CheckASIC(void __iomem * docptr) { /* Make sure the DoC is in normal mode */ if ((ReadDOC(docptr, Mplus_DOCControl) & DOC_MODE_NORMAL) == 0) { @@ -118,7 +118,7 @@ /* DoC_Command: Send a flash command to the flash chip through the Flash * command register. Need 2 Write Pipeline Terminates to complete send. */ -static inline void DoC_Command(unsigned long docptr, unsigned char command, +static inline void DoC_Command(void __iomem * docptr, unsigned char command, unsigned char xtraflags) { WriteDOC(command, docptr, Mplus_FlashCmd); @@ -133,7 +133,7 @@ unsigned long ofs, unsigned char xtraflags1, unsigned char xtraflags2) { - unsigned long docptr = doc->virtadr; + void __iomem * docptr = doc->virtadr; /* Allow for possible Mill Plus internal flash interleaving */ ofs >>= doc->interleave; @@ -163,14 +163,14 @@ } /* DoC_SelectChip: Select a given flash chip within the current floor */ -static int DoC_SelectChip(unsigned long docptr, int chip) +static int DoC_SelectChip(void __iomem * docptr, int chip) { /* No choice for flash chip on Millennium Plus */ return 0; } /* DoC_SelectFloor: Select a given floor (bank of flash chips) */ -static int DoC_SelectFloor(unsigned long docptr, int floor) +static int DoC_SelectFloor(void __iomem * docptr, int floor) { WriteDOC((floor & 0x3), docptr, Mplus_DeviceSelect); return 0; @@ -253,7 +253,7 @@ return cmd; } -static inline void MemReadDOC(unsigned long docptr, unsigned char *buf, int len) +static inline void MemReadDOC(void __iomem * docptr, unsigned char *buf, int len) { #ifndef USE_MEMCPY int i; @@ -264,7 +264,7 @@ #endif } -static inline void MemWriteDOC(unsigned long docptr, unsigned char *buf, int len) +static inline void MemWriteDOC(void __iomem * docptr, unsigned char *buf, int len) { #ifndef USE_MEMCPY int i; @@ -280,7 +280,7 @@ { int mfr, id, i, j; volatile char dummy; - unsigned long docptr = doc->virtadr; + void __iomem * docptr = doc->virtadr; /* Page in the required floor/chip */ DoC_SelectFloor(docptr, floor); @@ -371,7 +371,7 @@ printk(KERN_NOTICE "Setting DiskOnChip Millennium Plus interleave to %s\n", this->interleave?"on (16-bit)":"off (8-bit)"); conf ^= 4; - WriteDOC(this->virtadr, conf, Mplus_Configuration); + WriteDOC(conf, this->virtadr, Mplus_Configuration); } /* For each floor, find the number of valid chips it contains */ @@ -531,7 +531,7 @@ int i; loff_t fofs; struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; - unsigned long docptr = this->virtadr; + void __iomem * docptr = this->virtadr; struct Nand *mychip = &this->chips[from >> (this->chipshift)]; unsigned char *bp, buf[1056]; char c[32]; @@ -616,7 +616,7 @@ loff_t fofs; unsigned char syndrome[6]; struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; - unsigned long docptr = this->virtadr; + void __iomem * docptr = this->virtadr; struct Nand *mychip = &this->chips[from >> (this->chipshift)]; /* Don't allow read past end of device */ @@ -755,7 +755,7 @@ loff_t fto; volatile char dummy; struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; - unsigned long docptr = this->virtadr; + void __iomem * docptr = this->virtadr; struct Nand *mychip = &this->chips[to >> (this->chipshift)]; /* Don't allow write past end of device */ @@ -881,7 +881,7 @@ { loff_t fofs, base; struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; - unsigned long docptr = this->virtadr; + void __iomem * docptr = this->virtadr; struct Nand *mychip = &this->chips[ofs >> this->chipshift]; size_t i, size, got, want; @@ -959,7 +959,7 @@ volatile char dummy; loff_t fofs, base; struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; - unsigned long docptr = this->virtadr; + void __iomem * docptr = this->virtadr; struct Nand *mychip = &this->chips[ofs >> this->chipshift]; size_t i, size, got, want; int ret = 0; @@ -1061,7 +1061,7 @@ struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; __u32 ofs = instr->addr; __u32 len = instr->len; - unsigned long docptr = this->virtadr; + void __iomem * docptr = this->virtadr; struct Nand *mychip = &this->chips[ofs >> this->chipshift]; DoC_CheckASIC(docptr); @@ -1122,7 +1122,7 @@ * ****************************************************************************/ -int __init init_doc2001plus(void) +static int __init init_doc2001plus(void) { inter_module_register(im_name, THIS_MODULE, &DoCMilPlus_init); return 0; diff -Nru a/drivers/mtd/devices/docprobe.c b/drivers/mtd/devices/docprobe.c --- a/drivers/mtd/devices/docprobe.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/devices/docprobe.c 2004-11-29 21:22:08 -08:00 @@ -4,7 +4,7 @@ /* (C) 1999 Machine Vision Holdings, Inc. */ /* (C) 1999-2003 David Woodhouse */ -/* $Id: docprobe.c,v 1.41 2003/12/03 10:19:57 dwmw2 Exp $ */ +/* $Id: docprobe.c,v 1.43 2004/11/16 18:29:01 dwmw2 Exp $ */ @@ -270,7 +270,7 @@ memset((char *)this, 0, sizeof(struct DiskOnChip)); mtd->priv = this; - this->virtadr = docptr; + this->virtadr = (void __iomem *)docptr; this->physadr = physadr; this->ChipID = ChipID; sprintf(namebuf, "with ChipID %2.2X", ChipID); @@ -328,7 +328,7 @@ * ****************************************************************************/ -int __init init_doc(void) +static int __init init_doc(void) { int i; diff -Nru a/drivers/mtd/devices/mtdram.c b/drivers/mtd/devices/mtdram.c --- a/drivers/mtd/devices/mtdram.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/mtd/devices/mtdram.c 2004-11-29 21:22:06 -08:00 @@ -1,6 +1,6 @@ /* * mtdram - a test mtd device - * $Id: mtdram.c,v 1.33 2004/08/09 13:19:44 dwmw2 Exp $ + * $Id: mtdram.c,v 1.34 2004/11/16 18:29:01 dwmw2 Exp $ * Author: Alexander Larsson * * Copyright (c) 1999 Alexander Larsson @@ -153,7 +153,7 @@ #if CONFIG_MTDRAM_TOTAL_SIZE > 0 #if CONFIG_MTDRAM_ABS_POS > 0 -int __init init_mtdram(void) +static int __init init_mtdram(void) { void *addr; int err; @@ -186,7 +186,7 @@ #else /* CONFIG_MTDRAM_ABS_POS > 0 */ -int __init init_mtdram(void) +static int __init init_mtdram(void) { void *addr; int err; @@ -220,7 +220,7 @@ #else /* CONFIG_MTDRAM_TOTAL_SIZE > 0 */ -int __init init_mtdram(void) +static int __init init_mtdram(void) { return 0; } diff -Nru a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c --- a/drivers/mtd/devices/phram.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/devices/phram.c 2004-11-29 21:22:08 -08:00 @@ -1,6 +1,6 @@ /** * - * $Id: phram.c,v 1.2 2004/08/09 13:19:44 dwmw2 Exp $ + * $Id: phram.c,v 1.3 2004/11/16 18:29:01 dwmw2 Exp $ * * Copyright (c) Jochen Schaeuble * 07/2003 rewritten by Joern Engel @@ -39,7 +39,7 @@ -int phram_erase(struct mtd_info *mtd, struct erase_info *instr) +static int phram_erase(struct mtd_info *mtd, struct erase_info *instr) { u_char *start = (u_char *)mtd->priv; @@ -60,7 +60,7 @@ return 0; } -int phram_point(struct mtd_info *mtd, loff_t from, size_t len, +static int phram_point(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char **mtdbuf) { u_char *start = (u_char *)mtd->priv; @@ -73,11 +73,11 @@ return 0; } -void phram_unpoint(struct mtd_info *mtd, u_char *addr, loff_t from, size_t len) +static void phram_unpoint(struct mtd_info *mtd, u_char *addr, loff_t from, size_t len) { } -int phram_read(struct mtd_info *mtd, loff_t from, size_t len, +static int phram_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf) { u_char *start = (u_char *)mtd->priv; @@ -91,7 +91,7 @@ return 0; } -int phram_write(struct mtd_info *mtd, loff_t to, size_t len, +static int phram_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf) { u_char *start = (u_char *)mtd->priv; @@ -340,7 +340,7 @@ MODULE_PARM_DESC(slram, "List of memory regions to map. \"map=,\""); -int __init init_phram(void) +static int __init init_phram(void) { printk(KERN_ERR "phram loaded\n"); return 0; diff -Nru a/drivers/mtd/devices/pmc551.c b/drivers/mtd/devices/pmc551.c --- a/drivers/mtd/devices/pmc551.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/devices/pmc551.c 2004-11-29 21:22:08 -08:00 @@ -1,5 +1,5 @@ /* - * $Id: pmc551.c,v 1.28 2004/08/09 13:19:44 dwmw2 Exp $ + * $Id: pmc551.c,v 1.29 2004/11/16 18:29:01 dwmw2 Exp $ * * PMC551 PCI Mezzanine Ram Device * @@ -648,7 +648,7 @@ /* * PMC551 Card Initialization */ -int __init init_pmc551(void) +static int __init init_pmc551(void) { struct pci_dev *PCI_Device = NULL; struct mypriv *priv; diff -Nru a/drivers/mtd/devices/slram.c b/drivers/mtd/devices/slram.c --- a/drivers/mtd/devices/slram.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/mtd/devices/slram.c 2004-11-29 21:22:06 -08:00 @@ -1,6 +1,6 @@ /*====================================================================== - $Id: slram.c,v 1.31 2004/08/09 13:19:44 dwmw2 Exp $ + $Id: slram.c,v 1.32 2004/11/16 18:29:01 dwmw2 Exp $ This driver provides a method to access memory not used by the kernel itself (i.e. if the kernel commandline mem=xxx is used). To actually @@ -75,13 +75,13 @@ static slram_mtd_list_t *slram_mtdlist = NULL; -int slram_erase(struct mtd_info *, struct erase_info *); -int slram_point(struct mtd_info *, loff_t, size_t, size_t *, u_char **); -void slram_unpoint(struct mtd_info *, u_char *, loff_t, size_t); -int slram_read(struct mtd_info *, loff_t, size_t, size_t *, u_char *); -int slram_write(struct mtd_info *, loff_t, size_t, size_t *, const u_char *); +static int slram_erase(struct mtd_info *, struct erase_info *); +static int slram_point(struct mtd_info *, loff_t, size_t, size_t *, u_char **); +static void slram_unpoint(struct mtd_info *, u_char *, loff_t, size_t); +static int slram_read(struct mtd_info *, loff_t, size_t, size_t *, u_char *); +static int slram_write(struct mtd_info *, loff_t, size_t, size_t *, const u_char *); -int slram_erase(struct mtd_info *mtd, struct erase_info *instr) +static int slram_erase(struct mtd_info *mtd, struct erase_info *instr) { slram_priv_t *priv = mtd->priv; @@ -103,7 +103,7 @@ return(0); } -int slram_point(struct mtd_info *mtd, loff_t from, size_t len, +static int slram_point(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char **mtdbuf) { slram_priv_t *priv = (slram_priv_t *)mtd->priv; @@ -113,11 +113,11 @@ return(0); } -void slram_unpoint(struct mtd_info *mtd, u_char *addr, loff_t from, size_t len) +static void slram_unpoint(struct mtd_info *mtd, u_char *addr, loff_t from, size_t len) { } -int slram_read(struct mtd_info *mtd, loff_t from, size_t len, +static int slram_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf) { slram_priv_t *priv = (slram_priv_t *)mtd->priv; @@ -128,7 +128,7 @@ return(0); } -int slram_write(struct mtd_info *mtd, loff_t to, size_t len, +static int slram_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf) { slram_priv_t *priv = (slram_priv_t *)mtd->priv; @@ -141,7 +141,7 @@ /*====================================================================*/ -int register_device(char *name, unsigned long start, unsigned long length) +static int register_device(char *name, unsigned long start, unsigned long length) { slram_mtd_list_t **curmtd; @@ -213,7 +213,7 @@ return(0); } -void unregister_devices(void) +static void unregister_devices(void) { slram_mtd_list_t *nextitem; @@ -228,7 +228,7 @@ } } -unsigned long handle_unit(unsigned long value, char *unit) +static unsigned long handle_unit(unsigned long value, char *unit) { if ((*unit == 'M') || (*unit == 'm')) { return(value * 1024 * 1024); @@ -238,7 +238,7 @@ return(value); } -int parse_cmdline(char *devname, char *szstart, char *szlength) +static int parse_cmdline(char *devname, char *szstart, char *szlength) { char *buffer; unsigned long devstart; @@ -285,7 +285,7 @@ #endif -int init_slram(void) +static int init_slram(void) { char *devname; int i; diff -Nru a/drivers/mtd/ftl.c b/drivers/mtd/ftl.c --- a/drivers/mtd/ftl.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/ftl.c 2004-11-29 21:22:08 -08:00 @@ -1,5 +1,5 @@ /* This version ported to the Linux-MTD system by dwmw2@infradead.org - * $Id: ftl.c,v 1.53 2004/08/09 13:55:43 dwmw2 Exp $ + * $Id: ftl.c,v 1.54 2004/11/16 18:33:15 dwmw2 Exp $ * * Fixes: Arnaldo Carvalho de Melo * - fixes some leaks on failure in build_maps and ftl_notify_add, cleanups @@ -1067,16 +1067,18 @@ partition->mbd.blksize = SECTOR_SIZE; partition->mbd.tr = tr; partition->mbd.devnum = -1; - if (add_mtd_blktrans_dev((void *)partition)) - kfree(partition); - - } else - kfree(partition); + if (!add_mtd_blktrans_dev((void *)partition)) + return; + } + + ftl_freepart(partition); + kfree(partition); } static void ftl_remove_dev(struct mtd_blktrans_dev *dev) { del_mtd_blktrans_dev(dev); + ftl_freepart((partition_t *)dev); kfree(dev); } @@ -1094,7 +1096,7 @@ int init_ftl(void) { - DEBUG(0, "$Id: ftl.c,v 1.53 2004/08/09 13:55:43 dwmw2 Exp $\n"); + DEBUG(0, "$Id: ftl.c,v 1.54 2004/11/16 18:33:15 dwmw2 Exp $\n"); return register_mtd_blktrans(&ftl_tr); } diff -Nru a/drivers/mtd/inftlcore.c b/drivers/mtd/inftlcore.c --- a/drivers/mtd/inftlcore.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/mtd/inftlcore.c 2004-11-29 21:22:06 -08:00 @@ -7,7 +7,7 @@ * (c) 1999 Machine Vision Holdings, Inc. * Author: David Woodhouse * - * $Id: inftlcore.c,v 1.17 2004/08/09 13:56:48 dwmw2 Exp $ + * $Id: inftlcore.c,v 1.18 2004/11/16 18:28:59 dwmw2 Exp $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -352,7 +352,7 @@ return targetEUN; } -u16 INFTL_makefreeblock(struct INFTLrecord *inftl, unsigned pendingblock) +static u16 INFTL_makefreeblock(struct INFTLrecord *inftl, unsigned pendingblock) { /* * This is the part that needs some cleverness applied. @@ -877,7 +877,7 @@ return 0; } -struct mtd_blktrans_ops inftl_tr = { +static struct mtd_blktrans_ops inftl_tr = { .name = "inftl", .major = INFTL_MAJOR, .part_bits = INFTL_PARTN_BITS, @@ -891,9 +891,9 @@ extern char inftlmountrev[]; -int __init init_inftl(void) +static int __init init_inftl(void) { - printk(KERN_INFO "INFTL: inftlcore.c $Revision: 1.17 $, " + printk(KERN_INFO "INFTL: inftlcore.c $Revision: 1.18 $, " "inftlmount.c %s\n", inftlmountrev); return register_mtd_blktrans(&inftl_tr); diff -Nru a/drivers/mtd/inftlmount.c b/drivers/mtd/inftlmount.c --- a/drivers/mtd/inftlmount.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/mtd/inftlmount.c 2004-11-29 21:22:06 -08:00 @@ -8,7 +8,7 @@ * Author: Fabrice Bellard (fabrice.bellard@netgem.com) * Copyright (C) 2000 Netgem S.A. * - * $Id: inftlmount.c,v 1.14 2004/08/09 13:57:42 dwmw2 Exp $ + * $Id: inftlmount.c,v 1.15 2004/11/05 21:55:55 kalev Exp $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -41,7 +41,7 @@ #include #include -char inftlmountrev[]="$Revision: 1.14 $"; +char inftlmountrev[]="$Revision: 1.15 $"; /* * find_boot_record: Find the INFTL Media Header and its Spare copy which @@ -222,6 +222,8 @@ if (ip->Reserved0 != ip->firstUnit) { struct erase_info *instr = &inftl->instr; + instr->mtd = inftl->mbd.mtd; + /* * Most likely this is using the * undocumented qiuck mount feature. @@ -386,6 +388,8 @@ struct inftl_unittail uci; struct erase_info *instr = &inftl->instr; int physblock; + + instr->mtd = inftl->mbd.mtd; DEBUG(MTD_DEBUG_LEVEL3, "INFTL: INFTL_formatblock(inftl=%p," "block=%d)\n", inftl, block); diff -Nru a/drivers/mtd/maps/amd76xrom.c b/drivers/mtd/maps/amd76xrom.c --- a/drivers/mtd/maps/amd76xrom.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/mtd/maps/amd76xrom.c 2004-11-29 21:22:07 -08:00 @@ -2,7 +2,7 @@ * amd76xrom.c * * Normal mappings of chips in physical memory - * $Id: amd76xrom.c,v 1.17 2004/09/18 01:59:56 eric Exp $ + * $Id: amd76xrom.c,v 1.18 2004/11/16 18:29:02 dwmw2 Exp $ */ #include @@ -89,7 +89,7 @@ static char *rom_probe_types[] = { "cfi_probe", "jedec_probe", NULL }; u8 byte; struct amd76xrom_window *window = &amd76xrom_window; - struct amd76xrom_map_info *map = 0; + struct amd76xrom_map_info *map = NULL; unsigned long map_top; /* Remember the pci dev I find the window in */ @@ -244,7 +244,7 @@ map->mtd->owner = THIS_MODULE; if (add_mtd_device(map->mtd)) { map_destroy(map->mtd); - map->mtd = 0; + map->mtd = NULL; goto out; } @@ -254,7 +254,7 @@ /* File away the map structure */ list_add(&map->list, &window->maps); - map = 0; + map = NULL; } out: @@ -298,7 +298,7 @@ }; #endif -int __init init_amd76xrom(void) +static int __init init_amd76xrom(void) { struct pci_dev *pdev; struct pci_device_id *id; diff -Nru a/drivers/mtd/maps/arctic-mtd.c b/drivers/mtd/maps/arctic-mtd.c --- a/drivers/mtd/maps/arctic-mtd.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/mtd/maps/arctic-mtd.c 2004-11-29 21:22:07 -08:00 @@ -1,5 +1,5 @@ /* - * $Id: arctic-mtd.c,v 1.12 2004/09/16 23:27:12 gleixner Exp $ + * $Id: arctic-mtd.c,v 1.13 2004/11/04 13:24:14 gleixner Exp $ * * drivers/mtd/maps/arctic-mtd.c MTD mappings and partition tables for * IBM 405LP Arctic boards. @@ -98,7 +98,7 @@ { printk("%s: 0x%08x at 0x%08x\n", NAME, SIZE, PADDR); - arctic_mtd_map.virt = (void __iomem *) ioremap(PADDR, SIZE); + arctic_mtd_map.virt = ioremap(PADDR, SIZE); if (!arctic_mtd_map.virt) { printk("%s: failed to ioremap 0x%x\n", NAME, PADDR); diff -Nru a/drivers/mtd/maps/autcpu12-nvram.c b/drivers/mtd/maps/autcpu12-nvram.c --- a/drivers/mtd/maps/autcpu12-nvram.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/maps/autcpu12-nvram.c 2004-11-29 21:22:08 -08:00 @@ -2,7 +2,7 @@ * NV-RAM memory access on autcpu12 * (C) 2002 Thomas Gleixner (gleixner@autronix.de) * - * $Id: autcpu12-nvram.c,v 1.7 2004/09/16 23:27:12 gleixner Exp $ + * $Id: autcpu12-nvram.c,v 1.8 2004/11/04 13:24:14 gleixner Exp $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -47,7 +47,7 @@ { int err, save0, save1; - autcpu12_sram_map.virt = (void __iomem *)ioremap(0x12000000, SZ_128K); + autcpu12_sram_map.virt = ioremap(0x12000000, SZ_128K); if (!autcpu12_sram_map.virt) { printk("Failed to ioremap autcpu12 NV-RAM space\n"); err = -EIO; diff -Nru a/drivers/mtd/maps/beech-mtd.c b/drivers/mtd/maps/beech-mtd.c --- a/drivers/mtd/maps/beech-mtd.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/mtd/maps/beech-mtd.c 2004-11-29 21:22:07 -08:00 @@ -1,5 +1,5 @@ /* - * $Id: beech-mtd.c,v 1.9 2004/09/16 23:27:12 gleixner Exp $ + * $Id: beech-mtd.c,v 1.10 2004/11/04 13:24:14 gleixner Exp $ * * drivers/mtd/maps/beech-mtd.c MTD mappings and partition tables for * IBM 405LP Beech boards. @@ -74,7 +74,7 @@ { printk("%s: 0x%08x at 0x%08x\n", NAME, SIZE, PADDR); - beech_mtd_map.virt = (void __iomem *) ioremap(PADDR, SIZE); + beech_mtd_map.virt = ioremap(PADDR, SIZE); if (!beech_mtd_map.virt) { printk("%s: failed to ioremap 0x%x\n", NAME, PADDR); diff -Nru a/drivers/mtd/maps/cdb89712.c b/drivers/mtd/maps/cdb89712.c --- a/drivers/mtd/maps/cdb89712.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/maps/cdb89712.c 2004-11-29 21:22:08 -08:00 @@ -1,7 +1,7 @@ /* * Flash on Cirrus CDB89712 * - * $Id: cdb89712.c,v 1.9 2004/09/16 23:27:12 gleixner Exp $ + * $Id: cdb89712.c,v 1.10 2004/11/04 13:24:14 gleixner Exp $ */ #include @@ -44,7 +44,7 @@ goto out; } - cdb89712_flash_map.virt = (void __iomem *)ioremap(FLASH_START, FLASH_SIZE); + cdb89712_flash_map.virt = ioremap(FLASH_START, FLASH_SIZE); if (!cdb89712_flash_map.virt) { printk(KERN_NOTICE "Failed to ioremap Cdb89712 FLASH space\n"); err = -EIO; @@ -114,7 +114,7 @@ goto out; } - cdb89712_sram_map.virt = (void __iomem *)ioremap(SRAM_START, SRAM_SIZE); + cdb89712_sram_map.virt = ioremap(SRAM_START, SRAM_SIZE); if (!cdb89712_sram_map.virt) { printk(KERN_NOTICE "Failed to ioremap Cdb89712 SRAM space\n"); err = -EIO; @@ -182,7 +182,7 @@ goto out; } - cdb89712_bootrom_map.virt = (void __iomem *)ioremap(BOOTROM_START, BOOTROM_SIZE); + cdb89712_bootrom_map.virt = ioremap(BOOTROM_START, BOOTROM_SIZE); if (!cdb89712_bootrom_map.virt) { printk(KERN_NOTICE "Failed to ioremap Cdb89712 BootROM space\n"); err = -EIO; diff -Nru a/drivers/mtd/maps/cfi_flagadm.c b/drivers/mtd/maps/cfi_flagadm.c --- a/drivers/mtd/maps/cfi_flagadm.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/maps/cfi_flagadm.c 2004-11-29 21:22:08 -08:00 @@ -1,7 +1,7 @@ /* * Copyright © 2001 Flaga hf. Medical Devices, Kári Davíðsson * - * $Id: cfi_flagadm.c,v 1.13 2004/09/16 23:27:12 gleixner Exp $ + * $Id: cfi_flagadm.c,v 1.14 2004/11/04 13:24:14 gleixner Exp $ * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -96,7 +96,7 @@ FLASH_SIZE, FLASH_PHYS_ADDR); flagadm_map.phys = FLASH_PHYS_ADDR; - flagadm_map.virt = (void __iomem *s)ioremap(FLASH_PHYS_ADDR, + flagadm_map.virt = ioremap(FLASH_PHYS_ADDR, FLASH_SIZE); if (!flagadm_map.virt) { diff -Nru a/drivers/mtd/maps/cstm_mips_ixx.c b/drivers/mtd/maps/cstm_mips_ixx.c --- a/drivers/mtd/maps/cstm_mips_ixx.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/mtd/maps/cstm_mips_ixx.c 2004-11-29 21:22:06 -08:00 @@ -1,5 +1,5 @@ /* - * $Id: cstm_mips_ixx.c,v 1.11 2004/09/16 23:27:12 gleixner Exp $ + * $Id: cstm_mips_ixx.c,v 1.12 2004/11/04 13:24:14 gleixner Exp $ * * Mapping of a custom board with both AMD CFI and JEDEC flash in partitions. * Config with both CFI and JEDEC device support. @@ -170,7 +170,7 @@ cstm_mips_ixx_map[i].phys = cstm_mips_ixx_board_desc[i].window_addr; - cstm_mips_ixx_map[i].virt = (void __iomem *)ioremap(cstm_mips_ixx_board_desc[i].window_addr, cstm_mips_ixx_board_desc[i].window_size); + cstm_mips_ixx_map[i].virt = ioremap(cstm_mips_ixx_board_desc[i].window_addr, cstm_mips_ixx_board_desc[i].window_size); if (!cstm_mips_ixx_map[i].virt) { printk(KERN_WARNING "Failed to ioremap\n"); return -EIO; diff -Nru a/drivers/mtd/maps/db1550-flash.c b/drivers/mtd/maps/db1550-flash.c --- a/drivers/mtd/maps/db1550-flash.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/mtd/maps/db1550-flash.c 2004-11-29 21:22:07 -08:00 @@ -1,7 +1,7 @@ /* * Flash memory access on Alchemy Db1550 board * - * $Id: db1550-flash.c,v 1.6 2004/10/20 05:50:19 ppopov Exp $ + * $Id: db1550-flash.c,v 1.7 2004/11/04 13:24:14 gleixner Exp $ * * (C) 2004 Embedded Edge, LLC, based on db1550-flash.c: * (C) 2003, 2004 Pete Popov @@ -161,8 +161,7 @@ */ printk(KERN_NOTICE "Db1550 flash: probing %d-bit flash bus\n", db1550_map.bankwidth*8); - db1550_map.virt = - (void __iomem *)ioremap(window_addr, window_size); + db1550_map.virt = ioremap(window_addr, window_size); mymtd = do_map_probe("cfi_probe", &db1550_map); if (!mymtd) return -ENXIO; mymtd->owner = THIS_MODULE; diff -Nru a/drivers/mtd/maps/db1x00-flash.c b/drivers/mtd/maps/db1x00-flash.c --- a/drivers/mtd/maps/db1x00-flash.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/mtd/maps/db1x00-flash.c 2004-11-29 21:22:06 -08:00 @@ -1,7 +1,7 @@ /* * Flash memory access on Alchemy Db1xxx boards * - * $Id: db1x00-flash.c,v 1.5 2004/09/18 23:22:35 ppopov Exp $ + * $Id: db1x00-flash.c,v 1.6 2004/11/04 13:24:14 gleixner Exp $ * * (C) 2003 Pete Popov * @@ -199,7 +199,7 @@ */ printk(KERN_NOTICE "Db1xxx flash: probing %d-bit flash bus\n", db1xxx_mtd_map.bankwidth*8); - db1xxx_mtd_map.virt = (void __iomem *)ioremap(window_addr, window_size); + db1xxx_mtd_map.virt = ioremap(window_addr, window_size); db1xxx_mtd = do_map_probe("cfi_probe", &db1xxx_mtd_map); if (!db1xxx_mtd) return -ENXIO; db1xxx_mtd->owner = THIS_MODULE; diff -Nru a/drivers/mtd/maps/dbox2-flash.c b/drivers/mtd/maps/dbox2-flash.c --- a/drivers/mtd/maps/dbox2-flash.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/maps/dbox2-flash.c 2004-11-29 21:22:08 -08:00 @@ -1,5 +1,5 @@ /* - * $Id: dbox2-flash.c,v 1.12 2004/09/16 23:27:12 gleixner Exp $ + * $Id: dbox2-flash.c,v 1.13 2004/11/04 13:24:14 gleixner Exp $ * * D-Box 2 flash driver */ @@ -75,7 +75,7 @@ int __init init_dbox2_flash(void) { printk(KERN_NOTICE "D-Box 2 flash driver (size->0x%X mem->0x%X)\n", WINDOW_SIZE, WINDOW_ADDR); - dbox2_flash_map.virt = (void __iomem *)ioremap(WINDOW_ADDR, WINDOW_SIZE); + dbox2_flash_map.virt = ioremap(WINDOW_ADDR, WINDOW_SIZE); if (!dbox2_flash_map.virt) { printk("Failed to ioremap\n"); diff -Nru a/drivers/mtd/maps/dilnetpc.c b/drivers/mtd/maps/dilnetpc.c --- a/drivers/mtd/maps/dilnetpc.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/mtd/maps/dilnetpc.c 2004-11-29 21:22:06 -08:00 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: dilnetpc.c,v 1.15 2004/10/21 08:31:32 dwmw2 Exp $ + * $Id: dilnetpc.c,v 1.16 2004/11/04 13:24:14 gleixner Exp $ * * The DIL/Net PC is a tiny embedded PC board made by SSV Embedded Systems * featuring the AMD Elan SC410 processor. There are two variants of this @@ -403,7 +403,7 @@ printk(KERN_NOTICE "DIL/Net %s flash: 0x%lx at 0x%lx\n", is_dnp ? "DNPC" : "ADNP", dnpc_map.size, dnpc_map.phys); - dnpc_map.virt = (void __iomem *)ioremap_nocache(dnpc_map.phys, dnpc_map.size); + dnpc_map.virt = ioremap_nocache(dnpc_map.phys, dnpc_map.size); dnpc_map_flash(dnpc_map.phys, dnpc_map.size); @@ -430,7 +430,7 @@ mymtd->erasesize = 0x10000; if (!mymtd) { - iounmap((void *)dnpc_map.virt); + iounmap(dnpc_map.virt); return -ENXIO; } @@ -481,9 +481,9 @@ map_destroy(mymtd); } if (dnpc_map.virt) { - iounmap((void *)dnpc_map.virt); + iounmap(dnpc_map.virt); dnpc_unmap_flash(); - dnpc_map.virt = 0; + dnpc_map.virt = NULL; } } diff -Nru a/drivers/mtd/maps/dmv182.c b/drivers/mtd/maps/dmv182.c --- a/drivers/mtd/maps/dmv182.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/mtd/maps/dmv182.c 2004-11-29 21:22:06 -08:00 @@ -4,7 +4,7 @@ * * Flash map driver for the Dy4 SVME182 board * - * $Id: dmv182.c,v 1.4 2004/09/16 23:27:13 gleixner Exp $ + * $Id: dmv182.c,v 1.5 2004/11/04 13:24:14 gleixner Exp $ * * Copyright 2003-2004, TimeSys Corporation * @@ -103,8 +103,7 @@ partitions = svme182_partitions; - svme182_map.virt = - (void __iomem *)ioremap(FLASH_BASE_ADDR, svme182_map.size); + svme182_map.virt = ioremap(FLASH_BASE_ADDR, svme182_map.size); if (svme182_map.virt == 0) { printk("Failed to ioremap FLASH memory area.\n"); diff -Nru a/drivers/mtd/maps/ebony.c b/drivers/mtd/maps/ebony.c --- a/drivers/mtd/maps/ebony.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/maps/ebony.c 2004-11-29 21:22:08 -08:00 @@ -1,5 +1,5 @@ /* - * $Id: ebony.c,v 1.12 2004/09/16 23:27:13 gleixner Exp $ + * $Id: ebony.c,v 1.13 2004/11/04 13:24:14 gleixner Exp $ * * Mapping for Ebony user flash * @@ -64,7 +64,7 @@ int __init init_ebony(void) { u8 fpga0_reg; - u8 *fpga0_adr; + u8 __iomem *fpga0_adr; unsigned long long small_flash_base, large_flash_base; fpga0_adr = ioremap64(EBONY_FPGA_ADDR, 16); @@ -93,8 +93,7 @@ large_flash_base = EBONY_LARGE_FLASH_HIGH; ebony_small_map.phys = small_flash_base; - ebony_small_map.virt = - (void __iomem *)ioremap64(small_flash_base, + ebony_small_map.virt = ioremap64(small_flash_base, ebony_small_map.size); if (!ebony_small_map.virt) { @@ -115,8 +114,7 @@ } ebony_large_map.phys = large_flash_base; - ebony_large_map.virt = - (unsigned long)ioremap64(large_flash_base, + ebony_large_map.virt = ioremap64(large_flash_base, ebony_large_map.size); if (!ebony_large_map.virt) { @@ -147,13 +145,13 @@ } if (ebony_small_map.virt) { - iounmap((void *)ebony_small_map.virt); - ebony_small_map.virt = 0; + iounmap(ebony_small_map.virt); + ebony_small_map.virt = NULL; } if (ebony_large_map.virt) { - iounmap((void *)ebony_large_map.virt); - ebony_large_map.virt = 0; + iounmap(ebony_large_map.virt); + ebony_large_map.virt = NULL; } } diff -Nru a/drivers/mtd/maps/edb7312.c b/drivers/mtd/maps/edb7312.c --- a/drivers/mtd/maps/edb7312.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/maps/edb7312.c 2004-11-29 21:22:08 -08:00 @@ -1,5 +1,5 @@ /* - * $Id: edb7312.c,v 1.12 2004/09/16 23:27:13 gleixner Exp $ + * $Id: edb7312.c,v 1.13 2004/11/04 13:24:14 gleixner Exp $ * * Handle mapping of the NOR flash on Cogent EDB7312 boards * @@ -82,8 +82,7 @@ printk(KERN_NOTICE MSG_PREFIX "0x%08x at 0x%08x\n", WINDOW_SIZE, WINDOW_ADDR); - edb7312nor_map.virt = (void __iomem *) - ioremap(WINDOW_ADDR, WINDOW_SIZE); + edb7312nor_map.virt = ioremap(WINDOW_ADDR, WINDOW_SIZE); if (!edb7312nor_map.virt) { printk(MSG_PREFIX "failed to ioremap\n"); diff -Nru a/drivers/mtd/maps/elan-104nc.c b/drivers/mtd/maps/elan-104nc.c --- a/drivers/mtd/maps/elan-104nc.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/mtd/maps/elan-104nc.c 2004-11-29 21:22:07 -08:00 @@ -16,7 +16,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - $Id: elan-104nc.c,v 1.22 2004/09/16 23:27:13 gleixner Exp $ + $Id: elan-104nc.c,v 1.24 2004/11/16 18:29:02 dwmw2 Exp $ The ELAN-104NC has up to 8 Mibyte of Intel StrataFlash (28F320/28F640) in x16 mode. This drivers uses the CFI probe and Intel Extended Command Set drivers. @@ -182,15 +182,15 @@ map_destroy( all_mtd ); } - iounmap((void *)iomapadr); + iounmap(iomapadr); } -int __init init_elan_104nc(void) +static int __init init_elan_104nc(void) { /* Urg! We use I/O port 0x22 without request_region()ing it, because it's already allocated to the PIC. */ - iomapadr = (void __iomem *)ioremap(WINDOW_START, WINDOW_LENGTH); + iomapadr = ioremap(WINDOW_START, WINDOW_LENGTH); if (!iomapadr) { printk( KERN_ERR"%s: failed to ioremap memory region\n", elan_104nc_map.name ); diff -Nru a/drivers/mtd/maps/epxa10db-flash.c b/drivers/mtd/maps/epxa10db-flash.c --- a/drivers/mtd/maps/epxa10db-flash.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/maps/epxa10db-flash.c 2004-11-29 21:22:08 -08:00 @@ -5,7 +5,7 @@ * Copyright (C) 2001 Altera Corporation * Copyright (C) 2001 Red Hat, Inc. * - * $Id: epxa10db-flash.c,v 1.12 2004/09/16 23:27:13 gleixner Exp $ + * $Id: epxa10db-flash.c,v 1.13 2004/11/04 13:24:14 gleixner Exp $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -62,7 +62,7 @@ printk(KERN_NOTICE "%s flash device: 0x%x at 0x%x\n", BOARD_NAME, FLASH_SIZE, FLASH_START); - epxa_map.virt = (void __iomem *)ioremap(FLASH_START, FLASH_SIZE); + epxa_map.virt = ioremap(FLASH_START, FLASH_SIZE); if (!epxa_map.virt) { printk("Failed to ioremap %s flash\n",BOARD_NAME); return -EIO; diff -Nru a/drivers/mtd/maps/fortunet.c b/drivers/mtd/maps/fortunet.c --- a/drivers/mtd/maps/fortunet.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/mtd/maps/fortunet.c 2004-11-29 21:22:07 -08:00 @@ -1,6 +1,6 @@ /* fortunet.c memory map * - * $Id: fortunet.c,v 1.8 2004/09/16 23:27:13 gleixner Exp $ + * $Id: fortunet.c,v 1.9 2004/11/04 13:24:14 gleixner Exp $ */ #include @@ -209,8 +209,8 @@ map_regions[ix].map_info.phys = map_regions[ix].window_addr_physical, - map_regions[ix].map_info.virt = - (void __iomem *)ioremap_nocache( + map_regions[ix].map_info.virt = + ioremap_nocache( map_regions[ix].window_addr_physical, map_regions[ix].map_info.size); if(!map_regions[ix].map_info.virt) diff -Nru a/drivers/mtd/maps/h720x-flash.c b/drivers/mtd/maps/h720x-flash.c --- a/drivers/mtd/maps/h720x-flash.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/mtd/maps/h720x-flash.c 2004-11-29 21:22:06 -08:00 @@ -2,7 +2,7 @@ * Flash memory access on Hynix GMS30C7201/HMS30C7202 based * evaluation boards * - * $Id: h720x-flash.c,v 1.10 2004/09/16 23:27:13 gleixner Exp $ + * $Id: h720x-flash.c,v 1.11 2004/11/04 13:24:14 gleixner Exp $ * * (C) 2002 Jungjun Kim * 2003 Thomas Gleixner @@ -73,7 +73,7 @@ char *part_type = NULL; - h720x_map.virt = (void __iomem *)ioremap(FLASH_PHYS, FLASH_SIZE); + h720x_map.virt = ioremap(FLASH_PHYS, FLASH_SIZE); if (!h720x_map.virt) { printk(KERN_ERR "H720x-MTD: ioremap failed\n"); diff -Nru a/drivers/mtd/maps/ichxrom.c b/drivers/mtd/maps/ichxrom.c --- a/drivers/mtd/maps/ichxrom.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/mtd/maps/ichxrom.c 2004-11-29 21:22:06 -08:00 @@ -2,7 +2,7 @@ * ichxrom.c * * Normal mappings of chips in physical memory - * $Id: ichxrom.c,v 1.14 2004/09/18 01:59:56 eric Exp $ + * $Id: ichxrom.c,v 1.15 2004/11/16 18:29:02 dwmw2 Exp $ */ #include @@ -89,7 +89,7 @@ { static char *rom_probe_types[] = { "cfi_probe", "jedec_probe", NULL }; struct ichxrom_window *window = &ichxrom_window; - struct ichxrom_map_info *map = 0; + struct ichxrom_map_info *map = NULL; unsigned long map_top; u8 byte; u16 word; @@ -291,7 +291,7 @@ map->mtd->owner = THIS_MODULE; if (add_mtd_device(map->mtd)) { map_destroy(map->mtd); - map->mtd = 0; + map->mtd = NULL; goto out; } @@ -301,7 +301,7 @@ /* File away the map structure */ list_add(&map->list, &window->maps); - map = 0; + map = NULL; } out: @@ -349,7 +349,7 @@ }; #endif -int __init init_ichxrom(void) +static int __init init_ichxrom(void) { struct pci_dev *pdev; struct pci_device_id *id; diff -Nru a/drivers/mtd/maps/impa7.c b/drivers/mtd/maps/impa7.c --- a/drivers/mtd/maps/impa7.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/mtd/maps/impa7.c 2004-11-29 21:22:06 -08:00 @@ -1,5 +1,5 @@ /* - * $Id: impa7.c,v 1.12 2004/09/16 23:27:13 gleixner Exp $ + * $Id: impa7.c,v 1.13 2004/11/04 13:24:14 gleixner Exp $ * * Handle mapping of the NOR flash on implementa A7 boards * @@ -91,8 +91,7 @@ pt[i].size, pt[i].addr); impa7_map[i].phys = pt[i].addr; - impa7_map[i].virt = (void __iomem *) - ioremap(pt[i].addr, pt[i].size); + impa7_map[i].virt = ioremap(pt[i].addr, pt[i].size); if (!impa7_map[i].virt) { printk(MSG_PREFIX "failed to ioremap\n"); return -EIO; diff -Nru a/drivers/mtd/maps/ipaq-flash.c b/drivers/mtd/maps/ipaq-flash.c --- a/drivers/mtd/maps/ipaq-flash.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/maps/ipaq-flash.c 2004-11-29 21:22:08 -08:00 @@ -5,7 +5,7 @@ * (C) 2002 Hewlett-Packard Company * (C) 2003 Christian Pellegrin , : concatenation of multiple flashes * - * $Id: ipaq-flash.c,v 1.2 2004/09/16 23:27:13 gleixner Exp $ + * $Id: ipaq-flash.c,v 1.3 2004/11/04 13:24:15 gleixner Exp $ */ #include @@ -246,7 +246,7 @@ ipaq_map[i].size = h3xxx_max_flash_size; ipaq_map[i].set_vpp = h3xxx_set_vpp; ipaq_map[i].phys = cs_phys[i]; - ipaq_map[i].virt = (void __iomem *)__ioremap(cs_phys[i], 0x04000000, 0, 1); + ipaq_map[i].virt = __ioremap(cs_phys[i], 0x04000000, 0, 1); if (machine_is_h3100 () || machine_is_h1900()) ipaq_map[i].bankwidth = 2; } @@ -443,7 +443,7 @@ ipaq_map[0].size = 0x80000; ipaq_map[0].set_vpp = h3xxx_set_vpp; ipaq_map[0].phys = 0x0; - ipaq_map[0].virt = (void __iomem *)__ioremap(0x0, 0x04000000, 0, 1); + ipaq_map[0].virt = __ioremap(0x0, 0x04000000, 0, 1); ipaq_map[0].bankwidth = 2; printk(KERN_NOTICE "iPAQ flash: probing %d-bit flash bus, window=%lx with JEDEC.\n", ipaq_map[0].bankwidth*8, ipaq_map[0].virt); diff -Nru a/drivers/mtd/maps/iq80310.c b/drivers/mtd/maps/iq80310.c --- a/drivers/mtd/maps/iq80310.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/maps/iq80310.c 2004-11-29 21:22:08 -08:00 @@ -1,5 +1,5 @@ /* - * $Id: iq80310.c,v 1.19 2004/09/16 23:27:13 gleixner Exp $ + * $Id: iq80310.c,v 1.20 2004/11/04 13:24:15 gleixner Exp $ * * Mapping for the Intel XScale IQ80310 evaluation board * @@ -68,7 +68,7 @@ int parsed_nr_parts = 0; int ret; - iq80310_map.virt = (void __iomem *)ioremap(WINDOW_ADDR, WINDOW_SIZE); + iq80310_map.virt = ioremap(WINDOW_ADDR, WINDOW_SIZE); if (!iq80310_map.virt) { printk("Failed to ioremap\n"); return -EIO; diff -Nru a/drivers/mtd/maps/ixp2000.c b/drivers/mtd/maps/ixp2000.c --- a/drivers/mtd/maps/ixp2000.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/maps/ixp2000.c 2004-11-29 21:22:08 -08:00 @@ -1,5 +1,5 @@ /* - * $Id: ixp2000.c,v 1.3 2004/09/16 23:27:13 gleixner Exp $ + * $Id: ixp2000.c,v 1.5 2004/11/16 17:15:48 dsaxena Exp $ * * drivers/mtd/maps/ixp2000.c * @@ -208,9 +208,8 @@ goto Error; } - info->map.map_priv_1 = - (void __iomem *) ioremap(dev->resource->start, - dev->resource->end - dev->resource->start + 1); + info->map.map_priv_1 = ioremap(dev->resource->start, + dev->resource->end - dev->resource->start + 1); if (!info->map.map_priv_1) { dev_err(_dev, "Failed to ioremap flash region\n"); err = -EIO; @@ -227,7 +226,7 @@ * Enable erratum 44 workaround for NPUs with broken slowport */ - errata44_workaround = ixp2000_has_broken_slowport(); + erratum44_workaround = ixp2000_has_broken_slowport(); dev_info(_dev, "Erratum 44 workaround %s\n", erratum44_workaround ? "enabled" : "disabled"); #endif diff -Nru a/drivers/mtd/maps/ixp4xx.c b/drivers/mtd/maps/ixp4xx.c --- a/drivers/mtd/maps/ixp4xx.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/mtd/maps/ixp4xx.c 2004-11-29 21:22:06 -08:00 @@ -1,5 +1,5 @@ /* - * $Id: ixp4xx.c,v 1.6 2004/09/17 00:25:06 gleixner Exp $ + * $Id: ixp4xx.c,v 1.7 2004/11/04 13:24:15 gleixner Exp $ * * drivers/mtd/maps/ixp4xx.c * @@ -196,9 +196,8 @@ goto Error; } - info->map.map_priv_1 = - (void __iomem *) ioremap(dev->resource->start, - dev->resource->end - dev->resource->start + 1); + info->map.map_priv_1 = 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"); err = -EIO; diff -Nru a/drivers/mtd/maps/l440gx.c b/drivers/mtd/maps/l440gx.c --- a/drivers/mtd/maps/l440gx.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/maps/l440gx.c 2004-11-29 21:22:08 -08:00 @@ -1,5 +1,5 @@ /* - * $Id: l440gx.c,v 1.14 2004/09/16 23:27:13 gleixner Exp $ + * $Id: l440gx.c,v 1.16 2004/11/16 18:29:02 dwmw2 Exp $ * * BIOS Flash chip on Intel 440GX board. * @@ -30,7 +30,7 @@ /* Is this really the vpp port? */ -void l440gx_set_vpp(struct map_info *map, int vpp) +static void l440gx_set_vpp(struct map_info *map, int vpp) { unsigned long l; @@ -43,7 +43,7 @@ outl(l, VPP_PORT); } -struct map_info l440gx_map = { +static struct map_info l440gx_map = { .name = "L440GX BIOS", .size = WINDOW_SIZE, .bankwidth = BUSWIDTH, @@ -73,7 +73,7 @@ return -ENODEV; } - l440gx_map.virt = (void __iomem *)ioremap_nocache(WINDOW_ADDR, WINDOW_SIZE); + l440gx_map.virt = ioremap_nocache(WINDOW_ADDR, WINDOW_SIZE); if (!l440gx_map.virt) { printk(KERN_WARNING "Failed to ioremap L440GX flash region\n"); @@ -103,7 +103,7 @@ /* Allocate the resource region */ if (pci_assign_resource(pm_dev, PIIXE_IOBASE_RESOURCE) != 0) { printk(KERN_WARNING "Could not allocate pm iobase resource\n"); - iounmap((void *)l440gx_map.virt); + iounmap(l440gx_map.virt); return -ENXIO; } } @@ -137,7 +137,7 @@ return 0; } - iounmap((void *)l440gx_map.virt); + iounmap(l440gx_map.virt); return -ENXIO; } @@ -146,7 +146,7 @@ del_mtd_device(mymtd); map_destroy(mymtd); - iounmap((void *)l440gx_map.virt); + iounmap(l440gx_map.virt); } module_init(init_l440gx); diff -Nru a/drivers/mtd/maps/lasat.c b/drivers/mtd/maps/lasat.c --- a/drivers/mtd/maps/lasat.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/mtd/maps/lasat.c 2004-11-29 21:22:06 -08:00 @@ -7,7 +7,7 @@ * modify it under the terms of the GNU General Public License version * 2 as published by the Free Software Foundation. * - * $Id: lasat.c,v 1.8 2004/09/16 23:27:13 gleixner Exp $ + * $Id: lasat.c,v 1.9 2004/11/04 13:24:15 gleixner Exp $ * */ @@ -50,7 +50,7 @@ ENABLE_VPP((&lasat_map)); lasat_map.phys = lasat_flash_partition_start(LASAT_MTD_BOOTLOADER); - lasat_map.virt = (void __iomem *)ioremap_nocache( + lasat_map.virt = ioremap_nocache( lasat_map.phys, lasat_board_info.li_flash_size); lasat_map.size = lasat_board_info.li_flash_size; diff -Nru a/drivers/mtd/maps/lubbock-flash.c b/drivers/mtd/maps/lubbock-flash.c --- a/drivers/mtd/maps/lubbock-flash.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/maps/lubbock-flash.c 2004-11-29 21:22:08 -08:00 @@ -1,5 +1,5 @@ /* - * $Id: lubbock-flash.c,v 1.18 2004/09/28 18:54:40 nico Exp $ + * $Id: lubbock-flash.c,v 1.19 2004/11/04 13:24:15 gleixner Exp $ * * Map driver for the Lubbock developer platform. * @@ -84,7 +84,7 @@ lubbock_maps[flashboot].name = "Lubbock Boot ROM"; for (i = 0; i < 2; i++) { - lubbock_maps[i].virt = (void __iomem *)ioremap(lubbock_maps[i].phys, WINDOW_SIZE); + lubbock_maps[i].virt = ioremap(lubbock_maps[i].phys, WINDOW_SIZE); if (!lubbock_maps[i].virt) { printk(KERN_WARNING "Failed to ioremap %s\n", lubbock_maps[i].name); if (!ret) diff -Nru a/drivers/mtd/maps/mbx860.c b/drivers/mtd/maps/mbx860.c --- a/drivers/mtd/maps/mbx860.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/mtd/maps/mbx860.c 2004-11-29 21:22:07 -08:00 @@ -1,5 +1,5 @@ /* - * $Id: mbx860.c,v 1.7 2004/09/16 23:27:13 gleixner Exp $ + * $Id: mbx860.c,v 1.8 2004/11/04 13:24:15 gleixner Exp $ * * Handle mapping of the flash on MBX860 boards * @@ -60,7 +60,7 @@ int __init init_mbx(void) { printk(KERN_NOTICE "Motorola MBX flash device: 0x%x at 0x%x\n", WINDOW_SIZE*4, WINDOW_ADDR); - mbx_map.virt = (void __iomem *)ioremap(WINDOW_ADDR, WINDOW_SIZE * 4); + mbx_map.virt = ioremap(WINDOW_ADDR, WINDOW_SIZE * 4); if (!mbx_map.virt) { printk("Failed to ioremap\n"); diff -Nru a/drivers/mtd/maps/netsc520.c b/drivers/mtd/maps/netsc520.c --- a/drivers/mtd/maps/netsc520.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/maps/netsc520.c 2004-11-29 21:22:08 -08:00 @@ -3,7 +3,7 @@ * Copyright (C) 2001 Mark Langsdorf (mark.langsdorf@amd.com) * based on sc520cdp.c by Sysgo Real-Time Solutions GmbH * - * $Id: netsc520.c,v 1.11 2004/09/16 23:27:13 gleixner Exp $ + * $Id: netsc520.c,v 1.12 2004/11/04 13:24:15 gleixner Exp $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -95,7 +95,7 @@ static int __init init_netsc520(void) { printk(KERN_NOTICE "NetSc520 flash device: 0x%lx at 0x%lx\n", netsc520_map.size, netsc520_map.phys); - netsc520_map.virt = (void __iomem *)ioremap_nocache(netsc520_map.phys, netsc520_map.size); + netsc520_map.virt = ioremap_nocache(netsc520_map.phys, netsc520_map.size); if (!netsc520_map.virt) { printk("Failed to ioremap_nocache\n"); @@ -111,7 +111,7 @@ mymtd = do_map_probe("map_rom", &netsc520_map); if (!mymtd) { - iounmap((void *)netsc520_map.virt); + iounmap(netsc520_map.virt); return -ENXIO; } @@ -127,8 +127,8 @@ map_destroy(mymtd); } if (netsc520_map.virt) { - iounmap((void *)netsc520_map.virt); - netsc520_map.virt = 0; + iounmap(netsc520_map.virt); + netsc520_map.virt = NULL; } } diff -Nru a/drivers/mtd/maps/nettel.c b/drivers/mtd/maps/nettel.c --- a/drivers/mtd/maps/nettel.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/mtd/maps/nettel.c 2004-11-29 21:22:07 -08:00 @@ -6,7 +6,7 @@ * (C) Copyright 2000-2001, Greg Ungerer (gerg@snapgear.com) * (C) Copyright 2001-2002, SnapGear (www.snapgear.com) * - * $Id: nettel.c,v 1.7 2004/10/20 22:17:30 dwmw2 Exp $ + * $Id: nettel.c,v 1.8 2004/11/04 13:24:15 gleixner Exp $ */ /****************************************************************************/ @@ -273,7 +273,7 @@ __asm__ ("wbinvd"); nettel_amd_map.phys = amdaddr; - nettel_amd_map.virt = (void __iomem *) ioremap_nocache(amdaddr, maxsize); + nettel_amd_map.virt = ioremap_nocache(amdaddr, maxsize); if (!nettel_amd_map.virt) { printk("SNAPGEAR: failed to ioremap() BOOTCS\n"); return(-EIO); @@ -471,8 +471,8 @@ map_destroy(amd_mtd); } if (nettel_amd_map.virt) { - iounmap((void *)nettel_amd_map.virt); - nettel_amd_map.virt = 0; + iounmap(nettel_amd_map.virt); + nettel_amd_map.virt = NULL; } #ifdef CONFIG_MTD_CFI_INTELEXT if (intel_mtd) { diff -Nru a/drivers/mtd/maps/ocelot.c b/drivers/mtd/maps/ocelot.c --- a/drivers/mtd/maps/ocelot.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/maps/ocelot.c 2004-11-29 21:22:08 -08:00 @@ -1,5 +1,5 @@ /* - * $Id: ocelot.c,v 1.14 2004/09/16 23:27:13 gleixner Exp $ + * $Id: ocelot.c,v 1.15 2004/11/04 13:24:15 gleixner Exp $ * * Flash on Momenco Ocelot */ @@ -81,7 +81,7 @@ iounmap(pld); /* Now ioremap the NVRAM space */ - ocelot_nvram_map.virt = (void __iomem *)ioremap_nocache(NVRAM_WINDOW_ADDR, NVRAM_WINDOW_SIZE); + ocelot_nvram_map.virt = ioremap_nocache(NVRAM_WINDOW_ADDR, NVRAM_WINDOW_SIZE); if (!ocelot_nvram_map.virt) { printk(KERN_NOTICE "Failed to ioremap Ocelot NVRAM space\n"); return -EIO; @@ -101,7 +101,7 @@ nvram_mtd->write = ocelot_ram_write; /* Now map the flash space */ - ocelot_flash_map.virt = (void __iomem *)ioremap_nocache(FLASH_WINDOW_ADDR, FLASH_WINDOW_SIZE); + ocelot_flash_map.virt = ioremap_nocache(FLASH_WINDOW_ADDR, FLASH_WINDOW_SIZE); if (!ocelot_flash_map.virt) { printk(KERN_NOTICE "Failed to ioremap Ocelot flash space\n"); goto fail_2; diff -Nru a/drivers/mtd/maps/ocotea.c b/drivers/mtd/maps/ocotea.c --- a/drivers/mtd/maps/ocotea.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/mtd/maps/ocotea.c 2004-11-29 21:22:06 -08:00 @@ -84,8 +84,7 @@ } ocotea_small_map.phys = small_flash_base; - ocotea_small_map.virt = - (void __iomem *)ioremap64(small_flash_base, + ocotea_small_map.virt = ioremap64(small_flash_base, ocotea_small_map.size); if (!ocotea_small_map.virt) { @@ -106,8 +105,7 @@ } ocotea_large_map.phys = large_flash_base; - ocotea_large_map.virt = - (void __iomem *)ioremap64(large_flash_base, + ocotea_large_map.virt = ioremap64(large_flash_base, ocotea_large_map.size); if (!ocotea_large_map.virt) { diff -Nru a/drivers/mtd/maps/pb1550-flash.c b/drivers/mtd/maps/pb1550-flash.c --- a/drivers/mtd/maps/pb1550-flash.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/mtd/maps/pb1550-flash.c 2004-11-29 21:22:07 -08:00 @@ -1,7 +1,7 @@ /* * Flash memory access on Alchemy Pb1550 board * - * $Id: pb1550-flash.c,v 1.5 2004/09/16 23:27:13 gleixner Exp $ + * $Id: pb1550-flash.c,v 1.6 2004/11/04 13:24:15 gleixner Exp $ * * (C) 2004 Embedded Edge, LLC, based on pb1550-flash.c: * (C) 2003 Pete Popov @@ -178,8 +178,7 @@ */ printk(KERN_NOTICE "Pb1550 flash: probing %d-bit flash bus\n", pb1550_map.bankwidth*8); - pb1550_map.virt = - (void __iomem *)ioremap(window_addr, window_size); + pb1550_map.virt = ioremap(window_addr, window_size); mymtd = do_map_probe("cfi_probe", &pb1550_map); if (!mymtd) return -ENXIO; mymtd->owner = THIS_MODULE; diff -Nru a/drivers/mtd/maps/pb1xxx-flash.c b/drivers/mtd/maps/pb1xxx-flash.c --- a/drivers/mtd/maps/pb1xxx-flash.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/maps/pb1xxx-flash.c 2004-11-29 21:22:08 -08:00 @@ -3,7 +3,7 @@ * * (C) 2001 Pete Popov * - * $Id: pb1xxx-flash.c,v 1.13 2004/09/26 07:33:01 ppopov Exp $ + * $Id: pb1xxx-flash.c,v 1.14 2004/11/04 13:24:15 gleixner Exp $ */ #include @@ -149,7 +149,7 @@ */ printk(KERN_NOTICE "Pb1xxx flash: probing %d-bit flash bus\n", BUSWIDTH*8); - pb1xxx_mtd_map.virt = (void __iomem *)ioremap(WINDOW_ADDR, WINDOW_SIZE); + pb1xxx_mtd_map.virt = ioremap(WINDOW_ADDR, WINDOW_SIZE); simple_map_init(&pb1xxx_mtd_map); diff -Nru a/drivers/mtd/maps/pci.c b/drivers/mtd/maps/pci.c --- a/drivers/mtd/maps/pci.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/mtd/maps/pci.c 2004-11-29 21:22:07 -08:00 @@ -33,7 +33,7 @@ struct map_pci_info { struct map_info map; - void *base; + void __iomem *base; void (*exit)(struct pci_dev *dev, struct map_pci_info *map); unsigned long (*translate)(struct map_pci_info *map, unsigned long ofs); struct pci_dev *dev; @@ -143,7 +143,7 @@ intel_iq80310_exit(struct pci_dev *dev, struct map_pci_info *map) { if (map->base) - iounmap((void *)map->base); + iounmap(map->base); pci_write_config_dword(dev, 0x44, map->map.map_priv_2); } @@ -236,7 +236,7 @@ u32 val; if (map->base) - iounmap((void *)map->base); + iounmap(map->base); /* * We need to undo the PCI BAR2/PCI ROM BAR address alteration. diff -Nru a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c --- a/drivers/mtd/maps/physmap.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/mtd/maps/physmap.c 2004-11-29 21:22:07 -08:00 @@ -1,5 +1,5 @@ /* - * $Id: physmap.c,v 1.35 2004/09/16 23:27:13 gleixner Exp $ + * $Id: physmap.c,v 1.36 2004/11/04 13:24:15 gleixner Exp $ * * Normal mappings of chips in physical memory * @@ -51,7 +51,7 @@ const char **type; printk(KERN_NOTICE "physmap flash device: %lx at %lx\n", physmap_map.size, physmap_map.phys); - physmap_map.virt = (void __iomem *)ioremap(physmap_map.phys, physmap_map.size); + physmap_map.virt = ioremap(physmap_map.phys, physmap_map.size); if (!physmap_map.virt) { printk("Failed to ioremap\n"); @@ -92,7 +92,7 @@ return 0; } - iounmap((void *)physmap_map.virt); + iounmap(physmap_map.virt); return -ENXIO; } @@ -112,8 +112,8 @@ #endif map_destroy(mymtd); - iounmap((void *)physmap_map.virt); - physmap_map.virt = 0; + iounmap(physmap_map.virt); + physmap_map.virt = NULL; } module_init(init_physmap); diff -Nru a/drivers/mtd/maps/pnc2000.c b/drivers/mtd/maps/pnc2000.c --- a/drivers/mtd/maps/pnc2000.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/mtd/maps/pnc2000.c 2004-11-29 21:22:07 -08:00 @@ -5,7 +5,7 @@ * * This code is GPL * - * $Id: pnc2000.c,v 1.16 2004/09/16 23:27:13 gleixner Exp $ + * $Id: pnc2000.c,v 1.17 2004/11/16 18:29:02 dwmw2 Exp $ */ #include @@ -26,7 +26,7 @@ */ -struct map_info pnc_map = { +static struct map_info pnc_map = { .name = "PNC-2000", .size = WINDOW_SIZE, .bankwidth = 4, @@ -62,7 +62,7 @@ */ static struct mtd_info *mymtd; -int __init init_pnc2000(void) +static int __init init_pnc2000(void) { printk(KERN_NOTICE "Photron PNC-2000 flash mapping: %x at %x\n", WINDOW_SIZE, WINDOW_ADDR); diff -Nru a/drivers/mtd/maps/redwood.c b/drivers/mtd/maps/redwood.c --- a/drivers/mtd/maps/redwood.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/maps/redwood.c 2004-11-29 21:22:08 -08:00 @@ -1,5 +1,5 @@ /* - * $Id: redwood.c,v 1.9 2004/09/16 23:27:13 gleixner Exp $ + * $Id: redwood.c,v 1.10 2004/11/04 13:24:15 gleixner Exp $ * * drivers/mtd/maps/redwood.c * @@ -131,8 +131,7 @@ printk(KERN_NOTICE "redwood: flash mapping: %x at %x\n", WINDOW_SIZE, WINDOW_ADDR); - redwood_flash_map.virt = - (void __iomem *)ioremap(WINDOW_ADDR, WINDOW_SIZE); + redwood_flash_map.virt = ioremap(WINDOW_ADDR, WINDOW_SIZE); if (!redwood_flash_map.virt) { printk("init_redwood_flash: failed to ioremap\n"); diff -Nru a/drivers/mtd/maps/rpxlite.c b/drivers/mtd/maps/rpxlite.c --- a/drivers/mtd/maps/rpxlite.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/maps/rpxlite.c 2004-11-29 21:22:08 -08:00 @@ -1,5 +1,5 @@ /* - * $Id: rpxlite.c,v 1.21 2004/09/16 23:27:13 gleixner Exp $ + * $Id: rpxlite.c,v 1.22 2004/11/04 13:24:15 gleixner Exp $ * * Handle mapping of the flash on the RPX Lite and CLLF boards */ @@ -28,7 +28,7 @@ int __init init_rpxlite(void) { printk(KERN_NOTICE "RPX Lite or CLLF flash device: %x at %x\n", WINDOW_SIZE*4, WINDOW_ADDR); - rpxlite_map.virt = (void __iomem *)ioremap(WINDOW_ADDR, WINDOW_SIZE * 4); + rpxlite_map.virt = ioremap(WINDOW_ADDR, WINDOW_SIZE * 4); if (!rpxlite_map.virt) { printk("Failed to ioremap\n"); diff -Nru a/drivers/mtd/maps/sbc_gxx.c b/drivers/mtd/maps/sbc_gxx.c --- a/drivers/mtd/maps/sbc_gxx.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/mtd/maps/sbc_gxx.c 2004-11-29 21:22:07 -08:00 @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - $Id: sbc_gxx.c,v 1.30 2004/09/16 23:27:14 gleixner Exp $ + $Id: sbc_gxx.c,v 1.32 2004/11/16 18:29:02 dwmw2 Exp $ The SBC-MediaGX / SBC-GXx has up to 16 MiB of Intel StrataFlash (28F320/28F640) in x8 mode. @@ -189,13 +189,13 @@ map_destroy( all_mtd ); } - iounmap((void *)iomapadr); + iounmap(iomapadr); release_region(PAGE_IO,PAGE_IO_SIZE); } -int __init init_sbc_gxx(void) +static int __init init_sbc_gxx(void) { - iomapadr = (void __iomem *)ioremap(WINDOW_START, WINDOW_LENGTH); + iomapadr = ioremap(WINDOW_START, WINDOW_LENGTH); if (!iomapadr) { printk( KERN_ERR"%s: failed to ioremap memory region\n", sbc_gxx_map.name ); @@ -206,7 +206,7 @@ printk( KERN_ERR"%s: IO ports 0x%x-0x%x in use\n", sbc_gxx_map.name, PAGE_IO, PAGE_IO+PAGE_IO_SIZE-1 ); - iounmap((void *)iomapadr); + iounmap(iomapadr); return -EAGAIN; } diff -Nru a/drivers/mtd/maps/sc520cdp.c b/drivers/mtd/maps/sc520cdp.c --- a/drivers/mtd/maps/sc520cdp.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/maps/sc520cdp.c 2004-11-29 21:22:08 -08:00 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: sc520cdp.c,v 1.17 2004/09/16 23:27:14 gleixner Exp $ + * $Id: sc520cdp.c,v 1.18 2004/11/04 13:24:15 gleixner Exp $ * * * The SC520CDP is an evaluation board for the Elan SC520 processor available @@ -186,12 +186,12 @@ static void sc520cdp_setup_par(void) { - volatile unsigned long *mmcr; + volatile unsigned long __iomem *mmcr; unsigned long mmcr_val; int i, j; /* map in SC520's MMCR area */ - mmcr = (unsigned long *)ioremap_nocache(SC520_MMCR_BASE, SC520_MMCR_EXTENT); + mmcr = ioremap_nocache(SC520_MMCR_BASE, SC520_MMCR_EXTENT); if(!mmcr) { /* ioremap_nocache failed: skip the PAR reprogramming */ /* force physical address fields to BIOS defaults: */ for(i = 0; i < NUM_FLASH_BANKS; i++) @@ -223,7 +223,7 @@ sc520cdp_map[i].phys = par_table[i].default_address; } } - iounmap((void *)mmcr); + iounmap(mmcr); } #endif @@ -241,7 +241,7 @@ printk(KERN_NOTICE "SC520 CDP flash device: 0x%lx at 0x%lx\n", sc520cdp_map[i].size, sc520cdp_map[i].phys); - sc520cdp_map[i].virt = (void __iomem *)ioremap_nocache(sc520cdp_map[i].phys, sc520cdp_map[i].size); + sc520cdp_map[i].virt = ioremap_nocache(sc520cdp_map[i].phys, sc520cdp_map[i].size); if (!sc520cdp_map[i].virt) { printk("Failed to ioremap_nocache\n"); @@ -261,7 +261,7 @@ ++devices_found; } else { - iounmap((void *)sc520cdp_map[i].virt); + iounmap(sc520cdp_map[i].virt); } } if(devices_found >= 2) { @@ -290,8 +290,8 @@ if (mymtd[i]) map_destroy(mymtd[i]); if (sc520cdp_map[i].virt) { - iounmap((void *)sc520cdp_map[i].virt); - sc520cdp_map[i].virt = 0; + iounmap(sc520cdp_map[i].virt); + sc520cdp_map[i].virt = NULL; } } } diff -Nru a/drivers/mtd/maps/scb2_flash.c b/drivers/mtd/maps/scb2_flash.c --- a/drivers/mtd/maps/scb2_flash.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/mtd/maps/scb2_flash.c 2004-11-29 21:22:07 -08:00 @@ -1,6 +1,6 @@ /* * MTD map driver for BIOS Flash on Intel SCB2 boards - * $Id: scb2_flash.c,v 1.9 2004/09/16 23:27:14 gleixner Exp $ + * $Id: scb2_flash.c,v 1.10 2004/11/16 18:29:02 dwmw2 Exp $ * Copyright (C) 2002 Sun Microsystems, Inc. * Tim Hockin * @@ -62,9 +62,9 @@ #define SCB2_WINDOW 0x00100000 -static void *scb2_ioaddr; +static void __iomem *scb2_ioaddr; static struct mtd_info *scb2_mtd; -struct map_info scb2_map = { +static struct map_info scb2_map = { .name = "SCB2 BIOS Flash", .size = 0, .bankwidth = 1, @@ -163,7 +163,7 @@ } scb2_map.phys = SCB2_ADDR; - scb2_map.virt = (void __iomem *)scb2_ioaddr; + scb2_map.virt = scb2_ioaddr; scb2_map.size = SCB2_WINDOW; simple_map_init(&scb2_map); diff -Nru a/drivers/mtd/maps/scx200_docflash.c b/drivers/mtd/maps/scx200_docflash.c --- a/drivers/mtd/maps/scx200_docflash.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/maps/scx200_docflash.c 2004-11-29 21:22:08 -08:00 @@ -2,7 +2,7 @@ Copyright (c) 2001,2002 Christer Weinigel - $Id: scx200_docflash.c,v 1.7 2004/09/16 23:27:14 gleixner Exp $ + $Id: scx200_docflash.c,v 1.9 2004/11/16 18:29:02 dwmw2 Exp $ National Semiconductor SCx200 flash mapped with DOCCS */ @@ -81,7 +81,7 @@ .name = "NatSemi SCx200 DOCCS Flash", }; -int __init init_scx200_docflash(void) +static int __init init_scx200_docflash(void) { unsigned u; unsigned base; @@ -180,7 +180,7 @@ simple_map_init(&scx200_docflash_map); scx200_docflash_map.phys = docmem.start; - scx200_docflash_map.virt = (void __iomem *)ioremap(docmem.start, scx200_docflash_map.size); + scx200_docflash_map.virt = ioremap(docmem.start, scx200_docflash_map.size); if (!scx200_docflash_map.virt) { printk(KERN_ERR NAME ": failed to ioremap the flash\n"); release_resource(&docmem); @@ -190,7 +190,7 @@ mymtd = do_map_probe(flashtype, &scx200_docflash_map); if (!mymtd) { printk(KERN_ERR NAME ": unable to detect flash\n"); - iounmap((void *)scx200_docflash_map.virt); + iounmap(scx200_docflash_map.virt); release_resource(&docmem); return -ENXIO; } @@ -221,7 +221,7 @@ map_destroy(mymtd); } if (scx200_docflash_map.virt) { - iounmap((void *)scx200_docflash_map.virt); + iounmap(scx200_docflash_map.virt); release_resource(&docmem); } } diff -Nru a/drivers/mtd/maps/sun_uflash.c b/drivers/mtd/maps/sun_uflash.c --- a/drivers/mtd/maps/sun_uflash.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/maps/sun_uflash.c 2004-11-29 21:22:08 -08:00 @@ -1,4 +1,4 @@ -/* $Id: sun_uflash.c,v 1.10 2004/09/16 23:27:14 gleixner Exp $ +/* $Id: sun_uflash.c,v 1.11 2004/11/04 13:24:15 gleixner Exp $ * * sun_uflash - Driver implementation for user-programmable flash * present on many Sun Microsystems SME boardsets. @@ -96,8 +96,7 @@ pdev->map.name = pdev->name; } pdev->map.phys = edev->resource[0].start; - pdev->map.virt = - (void __iomem *)ioremap_nocache(edev->resource[0].start, pdev->map.size); + pdev->map.virt = ioremap_nocache(edev->resource[0].start, pdev->map.size); if(0 == pdev->map.virt) { printk("%s: failed to map device\n", __FUNCTION__); kfree(pdev->name); diff -Nru a/drivers/mtd/maps/tqm8xxl.c b/drivers/mtd/maps/tqm8xxl.c --- a/drivers/mtd/maps/tqm8xxl.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/mtd/maps/tqm8xxl.c 2004-11-29 21:22:06 -08:00 @@ -2,7 +2,7 @@ * Handle mapping of the flash memory access routines * on TQM8xxL based devices. * - * $Id: tqm8xxl.c,v 1.11 2004/07/12 21:59:45 dwmw2 Exp $ + * $Id: tqm8xxl.c,v 1.13 2004/10/20 22:21:53 dwmw2 Exp $ * * based on rpxlite.c * diff -Nru a/drivers/mtd/maps/ts5500_flash.c b/drivers/mtd/maps/ts5500_flash.c --- a/drivers/mtd/maps/ts5500_flash.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/maps/ts5500_flash.c 2004-11-29 21:22:08 -08:00 @@ -79,7 +79,7 @@ { int rc = 0; - ts5500_map.virt = (void*)ioremap_nocache(ts5500_map.phys, ts5500_map.size); + ts5500_map.virt = ioremap_nocache(ts5500_map.phys, ts5500_map.size); if(!ts5500_map.virt) { printk(KERN_ERR "Failed to ioremap_nocache\n"); @@ -110,7 +110,7 @@ err_out_map: map_destroy(mymtd); err_out_ioremap: - iounmap((void *)ts5500_map.virt); + iounmap(ts5500_map.virt); return rc; } @@ -127,8 +127,8 @@ } if (ts5500_map.virt) { - iounmap((void *)ts5500_map.virt); - ts5500_map.virt = 0; + iounmap(ts5500_map.virt); + ts5500_map.virt = NULL; } } diff -Nru a/drivers/mtd/maps/uclinux.c b/drivers/mtd/maps/uclinux.c --- a/drivers/mtd/maps/uclinux.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/maps/uclinux.c 2004-11-29 21:22:08 -08:00 @@ -5,7 +5,7 @@ * * (C) Copyright 2002, Greg Ungerer (gerg@snapgear.com) * - * $Id: uclinux.c,v 1.8 2004/09/16 23:27:14 gleixner Exp $ + * $Id: uclinux.c,v 1.9 2004/11/04 13:24:15 gleixner Exp $ */ /****************************************************************************/ @@ -69,8 +69,7 @@ printk("uclinux[mtd]: RAM probe address=0x%x size=0x%x\n", (int) mapp->map_priv_2, (int) mapp->size); - mapp->virt = (void __iomem *) - ioremap_nocache(mapp->phys, mapp->size); + mapp->virt = ioremap_nocache(mapp->phys, mapp->size); if (mapp->virt == 0) { printk("uclinux[mtd]: ioremap_nocache() failed\n"); diff -Nru a/drivers/mtd/maps/wr_sbc82xx_flash.c b/drivers/mtd/maps/wr_sbc82xx_flash.c --- a/drivers/mtd/maps/wr_sbc82xx_flash.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/mtd/maps/wr_sbc82xx_flash.c 2004-11-29 21:22:06 -08:00 @@ -1,5 +1,5 @@ /* - * $Id: wr_sbc82xx_flash.c,v 1.6 2004/09/16 23:27:14 gleixner Exp $ + * $Id: wr_sbc82xx_flash.c,v 1.7 2004/11/04 13:24:15 gleixner Exp $ * * Map for flash chips on Wind River PowerQUICC II SBC82xx board. * @@ -116,7 +116,7 @@ } printk(" at %08lx)\n", sbc82xx_flash_map[i].phys); - sbc82xx_flash_map[i].virt = (void __iomem *)ioremap(sbc82xx_flash_map[i].phys, sbc82xx_flash_map[i].size); + sbc82xx_flash_map[i].virt = ioremap(sbc82xx_flash_map[i].phys, sbc82xx_flash_map[i].size); if (!sbc82xx_flash_map[i].virt) { printk("Failed to ioremap\n"); diff -Nru a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c --- a/drivers/mtd/mtd_blkdevs.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/mtd/mtd_blkdevs.c 2004-11-29 21:22:06 -08:00 @@ -1,5 +1,5 @@ /* - * $Id: mtd_blkdevs.c,v 1.23 2004/08/19 01:54:36 tpoynor Exp $ + * $Id: mtd_blkdevs.c,v 1.24 2004/11/16 18:28:59 dwmw2 Exp $ * * (C) 2003 David Woodhouse * @@ -143,7 +143,7 @@ } -int blktrans_open(struct inode *i, struct file *f) +static int blktrans_open(struct inode *i, struct file *f) { struct mtd_blktrans_dev *dev; struct mtd_blktrans_ops *tr; @@ -174,7 +174,7 @@ return ret; } -int blktrans_release(struct inode *i, struct file *f) +static int blktrans_release(struct inode *i, struct file *f) { struct mtd_blktrans_dev *dev; struct mtd_blktrans_ops *tr; @@ -326,7 +326,7 @@ return 0; } -void blktrans_notify_remove(struct mtd_info *mtd) +static void blktrans_notify_remove(struct mtd_info *mtd) { struct list_head *this, *this2, *next; @@ -342,7 +342,7 @@ } } -void blktrans_notify_add(struct mtd_info *mtd) +static void blktrans_notify_add(struct mtd_info *mtd) { struct list_head *this; diff -Nru a/drivers/mtd/mtdblock.c b/drivers/mtd/mtdblock.c --- a/drivers/mtd/mtdblock.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/mtd/mtdblock.c 2004-11-29 21:22:07 -08:00 @@ -1,7 +1,7 @@ /* * Direct MTD block device access * - * $Id: mtdblock.c,v 1.64 2003/10/04 17:14:14 dwmw2 Exp $ + * $Id: mtdblock.c,v 1.65 2004/11/16 18:28:59 dwmw2 Exp $ * * (C) 2000-2003 Nicolas Pitre * (C) 1999-2003 David Woodhouse @@ -361,7 +361,7 @@ kfree(dev); } -struct mtd_blktrans_ops mtdblock_tr = { +static struct mtd_blktrans_ops mtdblock_tr = { .name = "mtdblock", .major = 31, .part_bits = 0, @@ -375,7 +375,7 @@ .owner = THIS_MODULE, }; -int __init init_mtdblock(void) +static int __init init_mtdblock(void) { return register_mtd_blktrans(&mtdblock_tr); } diff -Nru a/drivers/mtd/mtdblock.h b/drivers/mtd/mtdblock.h --- a/drivers/mtd/mtdblock.h 2004-11-29 21:22:07 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,35 +0,0 @@ -/* - * drivers/mtd/mtdblock.h - * - * common defines for mtdblock-core and mtdblock-2x - * - * $Id: mtdblock.h,v 1.1 2002/11/27 10:33:37 gleixner Exp $ - * - */ - -#ifndef __MTD_MTDBLOCK_H__ -#define __MTD_MTDBLOCK_H__ - -#define MAJOR_NR MTD_BLOCK_MAJOR -#define DEVICE_NAME "mtdblock" - -struct mtdblk_dev { - struct mtd_info *mtd; /* Locked */ - int count; - struct semaphore cache_sem; - unsigned char *cache_data; - unsigned long cache_offset; - unsigned int cache_size; - enum { STATE_EMPTY, STATE_CLEAN, STATE_DIRTY } cache_state; -}; - -extern int write_cached_data (struct mtdblk_dev *mtdblk); -extern int do_cached_write (struct mtdblk_dev *mtdblk, unsigned long pos, - int len, const char *buf); -extern int do_cached_read (struct mtdblk_dev *mtdblk, unsigned long pos, - int len, char *buf); - -extern void __exit cleanup_mtdblock(void); -extern int __init init_mtdblock(void); - -#endif diff -Nru a/drivers/mtd/mtdblock_ro.c b/drivers/mtd/mtdblock_ro.c --- a/drivers/mtd/mtdblock_ro.c 2004-11-29 21:22:09 -08:00 +++ b/drivers/mtd/mtdblock_ro.c 2004-11-29 21:22:09 -08:00 @@ -1,5 +1,5 @@ /* - * $Id: mtdblock_ro.c,v 1.18 2003/06/23 12:00:08 dwmw2 Exp $ + * $Id: mtdblock_ro.c,v 1.19 2004/11/16 18:28:59 dwmw2 Exp $ * * (C) 2003 David Woodhouse * @@ -58,7 +58,7 @@ kfree(dev); } -struct mtd_blktrans_ops mtdblock_tr = { +static struct mtd_blktrans_ops mtdblock_tr = { .name = "mtdblock", .major = 31, .part_bits = 0, diff -Nru a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c --- a/drivers/mtd/mtdcore.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/mtd/mtdcore.c 2004-11-29 21:22:07 -08:00 @@ -1,5 +1,5 @@ /* - * $Id: mtdcore.c,v 1.43 2004/07/23 15:20:46 dwmw2 Exp $ + * $Id: mtdcore.c,v 1.44 2004/11/16 18:28:59 dwmw2 Exp $ * * Core registration and callback routines for MTD * drivers and users. @@ -382,7 +382,7 @@ /*====================================================================*/ /* Init code */ -int __init init_mtd(void) +static int __init init_mtd(void) { #ifdef CONFIG_PROC_FS if ((proc_mtd = create_proc_entry( "mtd", 0, NULL ))) diff -Nru a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c --- a/drivers/mtd/mtdpart.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/mtdpart.c 2004-11-29 21:22:08 -08:00 @@ -5,7 +5,7 @@ * * This code is GPL * - * $Id: mtdpart.c,v 1.50 2004/08/10 16:18:34 dwmw2 Exp $ + * $Id: mtdpart.c,v 1.51 2004/11/16 18:28:59 dwmw2 Exp $ * * 02-21-2002 Thomas Gleixner * added support for read_oob, write_oob @@ -526,7 +526,7 @@ static spinlock_t part_parser_lock = SPIN_LOCK_UNLOCKED; static LIST_HEAD(part_parsers); -struct mtd_part_parser *get_partition_parser(const char *name) +static struct mtd_part_parser *get_partition_parser(const char *name) { struct list_head *this; void *ret = NULL; diff -Nru a/drivers/mtd/nand/au1550nd.c b/drivers/mtd/nand/au1550nd.c --- a/drivers/mtd/nand/au1550nd.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/mtd/nand/au1550nd.c 2004-11-29 21:22:06 -08:00 @@ -3,7 +3,7 @@ * * Copyright (C) 2004 Embedded Edge, LLC * - * $Id: au1550nd.c,v 1.9 2004/10/20 05:58:30 ppopov Exp $ + * $Id: au1550nd.c,v 1.11 2004/11/04 12:53:10 gleixner Exp $ * * 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 @@ -314,12 +314,12 @@ case NAND_CTL_SETNCE: /* assert (force assert) chip enable */ - au_writel(au_readl(MEM_STNDCTL) | (1<<(4+NAND_CS)) , MEM_STNDCTL); + au_writel((1<<(4+NAND_CS)) , MEM_STNDCTL); break; break; case NAND_CTL_CLRNCE: /* deassert chip enable */ - au_writel(au_readl(MEM_STNDCTL) & ~(1<<(4+NAND_CS)), MEM_STNDCTL); + au_writel(0, MEM_STNDCTL); break; break; } @@ -365,10 +365,7 @@ /* MEM_STNDCTL: disable ints, disable nand boot */ - /* disable interrupts */ - au_writel(au_readl(MEM_STNDCTL) & ~(1<<8), MEM_STNDCTL); - /* disable NAND boot */ - au_writel(au_readl(MEM_STNDCTL) & ~(1<<0), MEM_STNDCTL); + au_writel(0, MEM_STNDCTL); #ifdef CONFIG_MIPS_PB1550 /* set gpio206 high */ @@ -412,7 +409,7 @@ MEM_STADDR1); au_sync(); - p_nand = (void __iomem *)ioremap(NAND_PHYS_ADDR, 0x1000); + p_nand = ioremap(NAND_PHYS_ADDR, 0x1000); /* Set address of hardware control function */ this->hwcontrol = au1550_hwcontrol; diff -Nru a/drivers/mtd/nand/autcpu12.c b/drivers/mtd/nand/autcpu12.c --- a/drivers/mtd/nand/autcpu12.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/mtd/nand/autcpu12.c 2004-11-29 21:22:06 -08:00 @@ -6,7 +6,7 @@ * Derived from drivers/mtd/spia.c * Copyright (C) 2000 Steven J. Hill (sjhill@realitydiluted.com) * - * $Id: autcpu12.c,v 1.21 2004/09/16 23:27:14 gleixner Exp $ + * $Id: autcpu12.c,v 1.22 2004/11/04 12:53:10 gleixner Exp $ * * 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 @@ -50,16 +50,6 @@ static int autcpu12_pedr = AUTCPU12_SMC_PORT_OFFSET; static void __iomem * autcpu12_fio_base; -#ifdef MODULE -MODULE_PARM(autcpu12_fio_pbase, "i"); -MODULE_PARM(autcpu12_fio_ctrl, "i"); -MODULE_PARM(autcpu12_pedr, "i"); - -__setup("autcpu12_fio_pbase=",autcpu12_fio_pbase); -__setup("autcpu12_fio_ctrl=",autcpu12_fio_ctrl); -__setup("autcpu12_pedr=",autcpu12_pedr); -#endif - /* * Define partitions for flash devices */ @@ -150,7 +140,7 @@ } /* map physical adress */ - autcpu12_fio_base=(void __iomem *)ioremap(autcpu12_fio_pbase,SZ_1K); + autcpu12_fio_base = ioremap(autcpu12_fio_pbase,SZ_1K); if(!autcpu12_fio_base){ printk("Ioremap autcpu12 SmartMedia Card failed\n"); err = -EIO; diff -Nru a/drivers/mtd/nand/diskonchip.c b/drivers/mtd/nand/diskonchip.c --- a/drivers/mtd/nand/diskonchip.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/mtd/nand/diskonchip.c 2004-11-29 21:22:07 -08:00 @@ -16,7 +16,7 @@ * * Interface to generic NAND code for M-Systems DiskOnChip devices * - * $Id: diskonchip.c,v 1.38 2004/10/05 22:11:46 gleixner Exp $ + * $Id: diskonchip.c,v 1.42 2004/11/16 18:29:03 dwmw2 Exp $ */ #include @@ -102,17 +102,17 @@ static void doc200x_select_chip(struct mtd_info *mtd, int chip); static int debug=0; -MODULE_PARM(debug, "i"); +module_param(debug, int, 0); static int try_dword=1; -MODULE_PARM(try_dword, "i"); +module_param(try_dword, int, 0); static int no_ecc_failures=0; -MODULE_PARM(no_ecc_failures, "i"); +module_param(no_ecc_failures, int, 0); #ifdef CONFIG_MTD_PARTITIONS static int no_autopart=0; -MODULE_PARM(no_autopart, "i"); +module_param(no_autopart, int, 0); #endif #ifdef MTD_NAND_DISKONCHIP_BBTWRITE @@ -120,10 +120,10 @@ #else static int inftl_bbt_write=0; #endif -MODULE_PARM(inftl_bbt_write, "i"); +module_param(inftl_bbt_write, int, 0); static unsigned long doc_config_location = CONFIG_MTD_DISKONCHIP_PROBE_ADDRESS; -MODULE_PARM(doc_config_location, "l"); +module_param(doc_config_location, ulong, 0); MODULE_PARM_DESC(doc_config_location, "Physical memory address at which to probe for DiskOnChip"); @@ -1505,7 +1505,7 @@ int reg, len, numchips; int ret = 0; - virtadr = (void __iomem *)ioremap(physadr, DOC_IOREMAP_LEN); + virtadr = ioremap(physadr, DOC_IOREMAP_LEN); if (!virtadr) { printk(KERN_ERR "Diskonchip ioremap failed: 0x%x bytes at 0x%lx\n", DOC_IOREMAP_LEN, physadr); return -EIO; @@ -1720,24 +1720,9 @@ } } -int __init init_nanddoc(void) +static int __init init_nanddoc(void) { - int i; - - if (doc_config_location) { - printk(KERN_INFO "Using configured DiskOnChip probe address 0x%lx\n", doc_config_location); - return doc_probe(doc_config_location); - } else { - for (i=0; (doc_locations[i] != 0xffffffff); i++) { - doc_probe(doc_locations[i]); - } - } - /* No banner message any more. Print a message if no DiskOnChip - found, so the user knows we at least tried. */ - if (!doclist) { - printk(KERN_INFO "No valid DiskOnChip devices found\n"); - return -ENODEV; - } + int i, ret = 0; /* We could create the decoder on demand, if memory is a concern. * This way we have it handy, if an error happens @@ -1751,14 +1736,33 @@ rs_decoder = init_rs(10, 0x409, FCR, 1, NROOTS); if (!rs_decoder) { printk (KERN_ERR "DiskOnChip: Could not create a RS decoder\n"); - release_nanddoc(); return -ENOMEM; } + if (doc_config_location) { + printk(KERN_INFO "Using configured DiskOnChip probe address 0x%lx\n", doc_config_location); + ret = doc_probe(doc_config_location); + if (ret < 0) + goto outerr; + } else { + for (i=0; (doc_locations[i] != 0xffffffff); i++) { + doc_probe(doc_locations[i]); + } + } + /* No banner message any more. Print a message if no DiskOnChip + found, so the user knows we at least tried. */ + if (!doclist) { + printk(KERN_INFO "No valid DiskOnChip devices found\n"); + ret = -ENODEV; + goto outerr; + } return 0; +outerr: + free_rs(rs_decoder); + return ret; } -void __exit cleanup_nanddoc(void) +static void __exit cleanup_nanddoc(void) { /* Cleanup the nand/DoC resources */ release_nanddoc(); diff -Nru a/drivers/mtd/nand/edb7312.c b/drivers/mtd/nand/edb7312.c --- a/drivers/mtd/nand/edb7312.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/nand/edb7312.c 2004-11-29 21:22:08 -08:00 @@ -6,7 +6,7 @@ * Derived from drivers/mtd/nand/autcpu12.c * Copyright (c) 2001 Thomas Gleixner (gleixner@autronix.de) * - * $Id: edb7312.c,v 1.10 2004/10/05 13:50:20 gleixner Exp $ + * $Id: edb7312.c,v 1.11 2004/11/04 12:53:10 gleixner Exp $ * * 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 @@ -57,16 +57,6 @@ static void __iomem * ep7312_pxdr = (void __iomem *) EP7312_PXDR; static void __iomem * ep7312_pxddr = (void __iomem *) EP7312_PXDDR; -#ifdef MODULE -MODULE_PARM(ep7312_fio_pbase, "i"); -MODULE_PARM(ep7312_pxdr, "i"); -MODULE_PARM(ep7312_pxddr, "i"); - -__setup("ep7312_fio_pbase=",ep7312_fio_pbase); -__setup("ep7312_pxdr=",ep7312_pxdr); -__setup("ep7312_pxddr=",ep7312_pxddr); -#endif - #ifdef CONFIG_MTD_PARTITIONS /* * Define static partitions for flash device @@ -143,7 +133,7 @@ } /* map physical adress */ - ep7312_fio_base = (void __iomem *)ioremap(ep7312_fio_pbase, SZ_1K); + ep7312_fio_base = ioremap(ep7312_fio_pbase, SZ_1K); if(!ep7312_fio_base) { printk("ioremap EDB7312 NAND flash failed\n"); kfree(ep7312_mtd); diff -Nru a/drivers/mtd/nand/h1910.c b/drivers/mtd/nand/h1910.c --- a/drivers/mtd/nand/h1910.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/mtd/nand/h1910.c 2004-11-29 21:22:07 -08:00 @@ -7,7 +7,7 @@ * Copyright (C) 2002 Marius Gröger (mag@sysgo.de) * Copyright (c) 2001 Thomas Gleixner (gleixner@autronix.de) * - * $Id: h1910.c,v 1.4 2004/10/05 13:50:20 gleixner Exp $ + * $Id: h1910.c,v 1.5 2004/11/04 12:53:10 gleixner Exp $ * * 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 @@ -112,7 +112,7 @@ if (!machine_is_h1900()) return -ENODEV; - nandaddr = (void __iomem *)__ioremap(0x08000000, 0x1000, 0, 1); + nandaddr = __ioremap(0x08000000, 0x1000, 0, 1); if (!nandaddr) { printk("Failed to ioremap nand flash.\n"); return -ENOMEM; diff -Nru a/drivers/mtd/nand/ppchameleonevb.c b/drivers/mtd/nand/ppchameleonevb.c --- a/drivers/mtd/nand/ppchameleonevb.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/nand/ppchameleonevb.c 2004-11-29 21:22:08 -08:00 @@ -6,7 +6,7 @@ * Derived from drivers/mtd/nand/edb7312.c * * - * $Id: ppchameleonevb.c,v 1.4 2004/10/05 13:50:20 gleixner Exp $ + * $Id: ppchameleonevb.c,v 1.6 2004/11/05 16:07:16 kalev Exp $ * * 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 @@ -64,13 +64,14 @@ /* * Module stuff */ -static int ppchameleon_fio_pbase = CFG_NAND0_PADDR; -static int ppchameleonevb_fio_pbase = CFG_NAND1_PADDR; +static unsigned long ppchameleon_fio_pbase = CFG_NAND0_PADDR; +static unsigned long ppchameleonevb_fio_pbase = CFG_NAND1_PADDR; #ifdef MODULE -MODULE_PARM(ppchameleon_fio_pbase, "i"); +module_param(ppchameleon_fio_pbase, ulong, 0); +module_param(ppchameleonevb_fio_pbase, ulong, 0); +#else __setup("ppchameleon_fio_pbase=",ppchameleon_fio_pbase); -MODULE_PARM(ppchameleonevb_fio_pbase, "i"); __setup("ppchameleonevb_fio_pbase=",ppchameleonevb_fio_pbase); #endif @@ -206,7 +207,7 @@ } /* map physical address */ - ppchameleon_fio_base = (void __iomem *) ioremap(ppchameleon_fio_pbase, SZ_4M); + ppchameleon_fio_base = ioremap(ppchameleon_fio_pbase, SZ_4M); if(!ppchameleon_fio_base) { printk("ioremap PPChameleon NAND flash failed\n"); kfree(ppchameleon_mtd); @@ -305,7 +306,7 @@ } /* map physical address */ - ppchameleonevb_fio_base = (void __iomem *)ioremap(ppchameleonevb_fio_pbase, SZ_4M); + ppchameleonevb_fio_base = ioremap(ppchameleonevb_fio_pbase, SZ_4M); if(!ppchameleonevb_fio_base) { printk("ioremap PPChameleonEVB NAND flash failed\n"); kfree(ppchameleonevb_mtd); diff -Nru a/drivers/mtd/nand/rtc_from4.c b/drivers/mtd/nand/rtc_from4.c --- a/drivers/mtd/nand/rtc_from4.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/nand/rtc_from4.c 2004-11-29 21:22:08 -08:00 @@ -6,7 +6,7 @@ * Derived from drivers/mtd/nand/spia.c * Copyright (C) 2000 Steven J. Hill (sjhill@realitydiluted.com) * - * $Id: rtc_from4.c,v 1.6 2004/10/05 22:11:46 gleixner Exp $ + * $Id: rtc_from4.c,v 1.7 2004/11/04 12:53:10 gleixner Exp $ * * 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 @@ -90,8 +90,6 @@ * Module stuff */ static void __iomem *rtc_from4_fio_base = P2SEGADDR(RTC_FROM4_FIO_BASE); - -MODULE_PARM(rtc_from4_fio_base, "i"); const static struct mtd_partition partition_info[] = { { diff -Nru a/drivers/mtd/nand/spia.c b/drivers/mtd/nand/spia.c --- a/drivers/mtd/nand/spia.c 2004-11-29 21:22:09 -08:00 +++ b/drivers/mtd/nand/spia.c 2004-11-29 21:22:09 -08:00 @@ -8,7 +8,7 @@ * to controllines (due to change in nand.c) * page_cache added * - * $Id: spia.c,v 1.23 2004/10/05 13:50:20 gleixner Exp $ + * $Id: spia.c,v 1.24 2004/11/04 12:53:10 gleixner Exp $ * * 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 @@ -59,10 +59,10 @@ static int spia_pedr = SPIA_PEDR; static int spia_peddr = SPIA_PEDDR; -MODULE_PARM(spia_io_base, "i"); -MODULE_PARM(spia_fio_base, "i"); -MODULE_PARM(spia_pedr, "i"); -MODULE_PARM(spia_peddr, "i"); +module_param(spia_io_base, int, 0); +module_param(spia_fio_base, int, 0); +module_param(spia_pedr, int, 0); +module_param(spia_peddr, int, 0); /* * Define partitions for flash device diff -Nru a/drivers/mtd/nftlcore.c b/drivers/mtd/nftlcore.c --- a/drivers/mtd/nftlcore.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/mtd/nftlcore.c 2004-11-29 21:22:06 -08:00 @@ -1,7 +1,7 @@ /* Linux driver for NAND Flash Translation Layer */ /* (c) 1999 Machine Vision Holdings, Inc. */ /* Author: David Woodhouse */ -/* $Id: nftlcore.c,v 1.96 2004/06/28 13:52:55 dbrown Exp $ */ +/* $Id: nftlcore.c,v 1.97 2004/11/16 18:28:59 dwmw2 Exp $ */ /* The contents of this file are distributed under the GNU General @@ -421,7 +421,7 @@ return targetEUN; } -u16 NFTL_makefreeblock( struct NFTLrecord *nftl , unsigned pendingblock) +static u16 NFTL_makefreeblock( struct NFTLrecord *nftl , unsigned pendingblock) { /* This is the part that needs some cleverness applied. For now, I'm doing the minimum applicable to actually @@ -731,7 +731,7 @@ ****************************************************************************/ -struct mtd_blktrans_ops nftl_tr = { +static struct mtd_blktrans_ops nftl_tr = { .name = "nftl", .major = NFTL_MAJOR, .part_bits = NFTL_PARTN_BITS, @@ -747,9 +747,9 @@ extern char nftlmountrev[]; -int __init init_nftl(void) +static int __init init_nftl(void) { - printk(KERN_INFO "NFTL driver: nftlcore.c $Revision: 1.96 $, nftlmount.c %s\n", nftlmountrev); + printk(KERN_INFO "NFTL driver: nftlcore.c $Revision: 1.97 $, nftlmount.c %s\n", nftlmountrev); return register_mtd_blktrans(&nftl_tr); } diff -Nru a/drivers/mtd/nftlmount.c b/drivers/mtd/nftlmount.c --- a/drivers/mtd/nftlmount.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/mtd/nftlmount.c 2004-11-29 21:22:08 -08:00 @@ -4,7 +4,7 @@ * Author: Fabrice Bellard (fabrice.bellard@netgem.com) * Copyright (C) 2000 Netgem S.A. * - * $Id: nftlmount.c,v 1.38 2004/10/20 23:20:26 dwmw2 Exp $ + * $Id: nftlmount.c,v 1.39 2004/11/05 22:51:41 kalev Exp $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -31,7 +31,7 @@ #define SECTORSIZE 512 -char nftlmountrev[]="$Revision: 1.38 $"; +char nftlmountrev[]="$Revision: 1.39 $"; /* find_boot_record: Find the NFTL Media Header and its Spare copy which contains the * various device information of the NFTL partition and Bad Unit Table. Update @@ -301,6 +301,8 @@ unsigned int nb_erases, erase_mark; struct nftl_uci1 uci; struct erase_info *instr = &nftl->instr; + + instr->mtd = nftl->mbd.mtd; /* Read the Unit Control Information #1 for Wear-Leveling */ if (MTD_READOOB(nftl->mbd.mtd, block * nftl->EraseSize + SECTORSIZE + 8, diff -Nru a/drivers/net/e100.c b/drivers/net/e100.c --- a/drivers/net/e100.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/net/e100.c 2004-11-29 21:22:08 -08:00 @@ -2204,8 +2204,6 @@ goto err_out_disable_pdev; } - pci_set_master(pdev); - if((err = pci_set_dma_mask(pdev, 0xFFFFFFFFULL))) { DPRINTK(PROBE, ERR, "No usable DMA configuration, aborting.\n"); goto err_out_free_res; @@ -2226,9 +2224,18 @@ else nic->flags &= ~ich; + e100_get_defaults(nic); + spin_lock_init(&nic->cb_lock); spin_lock_init(&nic->cmd_lock); + /* Reset the device before pci_set_master() in case device is in some + * funky state and has an interrupt pending - hint: we don't have the + * interrupt handler registered yet. */ + e100_hw_reset(nic); + + pci_set_master(pdev); + init_timer(&nic->watchdog); nic->watchdog.function = e100_watchdog; nic->watchdog.data = (unsigned long)nic; @@ -2241,8 +2248,6 @@ goto err_out_iounmap; } - e100_get_defaults(nic); - e100_hw_reset(nic); e100_phy_init(nic); if((err = e100_eeprom_load(nic))) diff -Nru a/drivers/net/hplance.c b/drivers/net/hplance.c --- a/drivers/net/hplance.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/net/hplance.c 2004-11-29 21:22:07 -08:00 @@ -76,25 +76,31 @@ const struct dio_device_id *ent) { struct net_device *dev; - int err; + int err = -ENOMEM; dev = alloc_etherdev(sizeof(struct hplance_private)); if (!dev) - return -ENOMEM; + goto out; - if (!request_mem_region(d->resource.start, d->resource.end-d->resource.start, d->name)) - return -EBUSY; + err = -EBUSY; + if (!request_mem_region(dio_resource_start(d), + dio_resource_len(d), d->name)) + goto out_free_netdev; - SET_MODULE_OWNER(dev); - hplance_init(dev, d); err = register_netdev(dev); - if (err) { - free_netdev(dev); - return err; - } + if (err) + goto out_release_mem_region; + dio_set_drvdata(d, dev); return 0; + + out_release_mem_region: + release_mem_region(dio_resource_start(d), dio_resource_len(d)); + out_free_netdev: + free_netdev(dev); + out: + return err; } static void __devexit hplance_remove_one(struct dio_dev *d) @@ -102,6 +108,7 @@ struct net_device *dev = dio_get_drvdata(d); unregister_netdev(dev); + release_mem_region(dio_resource_start(d), dio_resource_len(d)); free_netdev(dev); } diff -Nru a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c --- a/drivers/net/ibmveth.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/net/ibmveth.c 2004-11-29 21:22:06 -08:00 @@ -598,7 +598,7 @@ } static u32 netdev_get_link(struct net_device *dev) { - return 0; + return 1; } static struct ethtool_ops netdev_ethtool_ops = { diff -Nru a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c --- a/drivers/net/pcmcia/smc91c92_cs.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/net/pcmcia/smc91c92_cs.c 2004-11-29 21:22:08 -08:00 @@ -2115,7 +2115,7 @@ tmp |= TCR_FDUPLX; else tmp &= ~TCR_FDUPLX; - outw(ioaddr + TCR, tmp); + outw(tmp, ioaddr + TCR); return 0; } diff -Nru a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c --- a/drivers/net/pcnet32.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/net/pcnet32.c 2004-11-29 21:22:07 -08:00 @@ -1010,7 +1010,11 @@ return -EBUSY; } - return pcnet32_probe1(ioaddr, 1, pdev); + err = pcnet32_probe1(ioaddr, 1, pdev); + if (err < 0) { + pci_disable_device(pdev); + } + return err; } @@ -2249,6 +2253,7 @@ release_region(dev->base_addr, PCNET32_TOTAL_SIZE); pci_free_consistent(lp->pci_dev, sizeof(*lp), lp, lp->dma_addr); free_netdev(dev); + pci_disable_device(pdev); pci_set_drvdata(pdev, NULL); } } diff -Nru a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c --- a/drivers/net/ppp_generic.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/net/ppp_generic.c 2004-11-29 21:22:08 -08:00 @@ -19,7 +19,7 @@ * PPP driver, written by Michael Callahan and Al Longyear, and * subsequently hacked by Paul Mackerras. * - * ==FILEVERSION 20020217== + * ==FILEVERSION 20041108== */ #include @@ -412,6 +412,17 @@ ret = 0; if (pf->dead) break; + if (pf->kind == INTERFACE) { + /* + * Return 0 (EOF) on an interface that has no + * channels connected, unless it is looping + * network traffic (demand mode). + */ + struct ppp *ppp = PF_TO_PPP(pf); + if (ppp->n_channels == 0 + && (ppp->flags & SC_LOOP_TRAFFIC) == 0) + break; + } ret = -EAGAIN; if (file->f_flags & O_NONBLOCK) break; @@ -491,6 +502,14 @@ mask |= POLLIN | POLLRDNORM; if (pf->dead) mask |= POLLHUP; + else if (pf->kind == INTERFACE) { + /* see comment in ppp_read */ + struct ppp *ppp = PF_TO_PPP(pf); + if (ppp->n_channels == 0 + && (ppp->flags & SC_LOOP_TRAFFIC) == 0) + mask |= POLLIN | POLLRDNORM; + } + return mask; } @@ -2559,7 +2578,8 @@ /* remove it from the ppp unit's list */ ppp_lock(ppp); list_del(&pch->clist); - --ppp->n_channels; + if (--ppp->n_channels == 0) + wake_up_interruptible(&ppp->file.rwait); ppp_unlock(ppp); if (atomic_dec_and_test(&ppp->file.refcnt)) ppp_destroy_interface(ppp); diff -Nru a/drivers/net/smc91x.h b/drivers/net/smc91x.h --- a/drivers/net/smc91x.h 2004-11-29 21:22:08 -08:00 +++ b/drivers/net/smc91x.h 2004-11-29 21:22:08 -08:00 @@ -92,6 +92,25 @@ } while (0) #define set_irq_type(irq, type) +#elif defined(CONFIG_SA1100_PLEB) +/* We can only do 16-bit reads and writes in the static memory space. */ +#define SMC_CAN_USE_8BIT 1 +#define SMC_CAN_USE_16BIT 1 +#define SMC_CAN_USE_32BIT 0 +#define SMC_IO_SHIFT 0 +#define SMC_NOWAIT 1 + +#define SMC_inb(a, r) inb((a) + (r)) +#define SMC_insb(a, r, p, l) insb((a) + (r), p, (l)) +#define SMC_inw(a, r) inw((a) + (r)) +#define SMC_insw(a, r, p, l) insw((a) + (r), p, l) +#define SMC_outb(v, a, r) outb(v, (a) + (r)) +#define SMC_outsb(a, r, p, l) outsb((a) + (r), p, (l)) +#define SMC_outw(v, a, r) outw(v, (a) + (r)) +#define SMC_outsw(a, r, p, l) outsw((a) + (r), p, l) + +#define set_irq_type(irq, type) do {} while (0) + #elif defined(CONFIG_SA1100_ASSABET) #include diff -Nru a/drivers/net/tg3.c b/drivers/net/tg3.c --- a/drivers/net/tg3.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/net/tg3.c 2004-11-29 21:22:07 -08:00 @@ -60,8 +60,8 @@ #define DRV_MODULE_NAME "tg3" #define PFX DRV_MODULE_NAME ": " -#define DRV_MODULE_VERSION "3.13" -#define DRV_MODULE_RELDATE "November 1, 2004" +#define DRV_MODULE_VERSION "3.14" +#define DRV_MODULE_RELDATE "November 15, 2004" #define TG3_DEF_MAC_MODE 0 #define TG3_DEF_RX_MODE 0 @@ -206,6 +206,14 @@ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5751F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, + { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5753, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, + { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5753M, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, + { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5753F, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, + { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5781, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, { PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9DXX, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, { PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9MXX, @@ -881,34 +889,54 @@ GRC_LCLCTRL_GPIO_OUTPUT1)); udelay(100); } else { + int no_gpio2; + u32 grc_local_ctrl; + if (tp_peer != tp && (tp_peer->tg3_flags & TG3_FLAG_INIT_COMPLETE) != 0) return; + /* On 5753 and variants, GPIO2 cannot be used. */ + no_gpio2 = (tp->nic_sram_data_cfg & + NIC_SRAM_DATA_CFG_NO_GPIO2) != 0; + + grc_local_ctrl = GRC_LCLCTRL_GPIO_OE0 | + GRC_LCLCTRL_GPIO_OE1 | + GRC_LCLCTRL_GPIO_OE2 | + GRC_LCLCTRL_GPIO_OUTPUT1 | + GRC_LCLCTRL_GPIO_OUTPUT2; + if (no_gpio2) { + grc_local_ctrl &= ~(GRC_LCLCTRL_GPIO_OE2 | + GRC_LCLCTRL_GPIO_OUTPUT2); + } tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | - (GRC_LCLCTRL_GPIO_OE0 | - GRC_LCLCTRL_GPIO_OE1 | - GRC_LCLCTRL_GPIO_OE2 | - GRC_LCLCTRL_GPIO_OUTPUT1 | - GRC_LCLCTRL_GPIO_OUTPUT2)); + grc_local_ctrl); udelay(100); + grc_local_ctrl = GRC_LCLCTRL_GPIO_OE0 | + GRC_LCLCTRL_GPIO_OE1 | + GRC_LCLCTRL_GPIO_OE2 | + GRC_LCLCTRL_GPIO_OUTPUT0 | + GRC_LCLCTRL_GPIO_OUTPUT1 | + GRC_LCLCTRL_GPIO_OUTPUT2; + if (no_gpio2) { + grc_local_ctrl &= ~(GRC_LCLCTRL_GPIO_OE2 | + GRC_LCLCTRL_GPIO_OUTPUT2); + } tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | - (GRC_LCLCTRL_GPIO_OE0 | - GRC_LCLCTRL_GPIO_OE1 | - GRC_LCLCTRL_GPIO_OE2 | - GRC_LCLCTRL_GPIO_OUTPUT0 | - GRC_LCLCTRL_GPIO_OUTPUT1 | - GRC_LCLCTRL_GPIO_OUTPUT2)); + grc_local_ctrl); udelay(100); - tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | - (GRC_LCLCTRL_GPIO_OE0 | - GRC_LCLCTRL_GPIO_OE1 | - GRC_LCLCTRL_GPIO_OE2 | - GRC_LCLCTRL_GPIO_OUTPUT0 | - GRC_LCLCTRL_GPIO_OUTPUT1)); - udelay(100); + grc_local_ctrl = GRC_LCLCTRL_GPIO_OE0 | + GRC_LCLCTRL_GPIO_OE1 | + GRC_LCLCTRL_GPIO_OE2 | + GRC_LCLCTRL_GPIO_OUTPUT0 | + GRC_LCLCTRL_GPIO_OUTPUT1; + if (!no_gpio2) { + tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | + grc_local_ctrl); + udelay(100); + } } } else { if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5700 && @@ -7619,7 +7647,8 @@ tp->pdev->device == PCI_DEVICE_ID_TIGON3_5901_2 || tp->pdev->device == PCI_DEVICE_ID_TIGON3_5705F)) || (tp->pdev->vendor == PCI_VENDOR_ID_BROADCOM && - tp->pdev->device == PCI_DEVICE_ID_TIGON3_5751F)) + (tp->pdev->device == PCI_DEVICE_ID_TIGON3_5751F || + tp->pdev->device == PCI_DEVICE_ID_TIGON3_5753F))) tp->tg3_flags |= TG3_FLAG_10_100_ONLY; err = tg3_phy_probe(tp); @@ -7926,7 +7955,8 @@ #endif if (tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS) { - tp->dma_rwctrl |= 0x001f0000; + /* DMA read watermark not used on PCIE */ + tp->dma_rwctrl |= 0x00180000; } else if (!(tp->tg3_flags & TG3_FLAG_PCIX_MODE)) { if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 || GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) diff -Nru a/drivers/net/tg3.h b/drivers/net/tg3.h --- a/drivers/net/tg3.h 2004-11-29 21:22:06 -08:00 +++ b/drivers/net/tg3.h 2004-11-29 21:22:06 -08:00 @@ -1436,6 +1436,7 @@ #define NIC_SRAM_DATA_CFG_EEPROM_WP 0x00000100 #define NIC_SRAM_DATA_CFG_MINI_PCI 0x00001000 #define NIC_SRAM_DATA_CFG_FIBER_WOL 0x00004000 +#define NIC_SRAM_DATA_CFG_NO_GPIO2 0x00100000 #define NIC_SRAM_DATA_PHY_ID 0x00000b74 #define NIC_SRAM_DATA_PHY_ID1_MASK 0xffff0000 diff -Nru a/drivers/net/tulip/21142.c b/drivers/net/tulip/21142.c --- a/drivers/net/tulip/21142.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/net/tulip/21142.c 2004-11-29 21:22:06 -08:00 @@ -14,9 +14,9 @@ */ -#include "tulip.h" #include #include +#include "tulip.h" static u16 t21142_csr13[] = { 0x0001, 0x0009, 0x0009, 0x0000, 0x0001, }; diff -Nru a/drivers/net/tulip/eeprom.c b/drivers/net/tulip/eeprom.c --- a/drivers/net/tulip/eeprom.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/net/tulip/eeprom.c 2004-11-29 21:22:08 -08:00 @@ -14,6 +14,7 @@ */ +#include #include "tulip.h" #include #include diff -Nru a/drivers/net/tulip/interrupt.c b/drivers/net/tulip/interrupt.c --- a/drivers/net/tulip/interrupt.c 2004-11-29 21:22:09 -08:00 +++ b/drivers/net/tulip/interrupt.c 2004-11-29 21:22:09 -08:00 @@ -14,10 +14,10 @@ */ +#include #include "tulip.h" #include #include -#include int tulip_rx_copybreak; unsigned int tulip_max_interrupt_work; diff -Nru a/drivers/net/tulip/media.c b/drivers/net/tulip/media.c --- a/drivers/net/tulip/media.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/net/tulip/media.c 2004-11-29 21:22:07 -08:00 @@ -18,6 +18,7 @@ #include #include #include +#include #include "tulip.h" diff -Nru a/drivers/net/tulip/pnic.c b/drivers/net/tulip/pnic.c --- a/drivers/net/tulip/pnic.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/net/tulip/pnic.c 2004-11-29 21:22:08 -08:00 @@ -15,6 +15,7 @@ */ #include +#include #include "tulip.h" diff -Nru a/drivers/net/tulip/pnic2.c b/drivers/net/tulip/pnic2.c --- a/drivers/net/tulip/pnic2.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/net/tulip/pnic2.c 2004-11-29 21:22:06 -08:00 @@ -76,8 +76,8 @@ -#include "tulip.h" #include +#include "tulip.h" #include diff -Nru a/drivers/net/tulip/timer.c b/drivers/net/tulip/timer.c --- a/drivers/net/tulip/timer.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/net/tulip/timer.c 2004-11-29 21:22:06 -08:00 @@ -14,6 +14,7 @@ */ +#include #include "tulip.h" diff -Nru a/drivers/net/tulip/tulip.h b/drivers/net/tulip/tulip.h --- a/drivers/net/tulip/tulip.h 2004-11-29 21:22:08 -08:00 +++ b/drivers/net/tulip/tulip.h 2004-11-29 21:22:08 -08:00 @@ -149,6 +149,9 @@ TxIntr = 0x01, }; +/* bit mask for CSR5 TX/RX process state */ +#define CSR5_TS 0x00700000 +#define CSR5_RS 0x000e0000 enum tulip_mode_bits { TxThreshold = (1 << 22), @@ -460,9 +463,19 @@ u32 csr6 = ioread32(ioaddr + CSR6); if (csr6 & RxTx) { + unsigned i=1300/10; iowrite32(csr6 & ~RxTx, ioaddr + CSR6); barrier(); - (void) ioread32(ioaddr + CSR6); /* mmio sync */ + /* wait until in-flight frame completes. + * Max time @ 10BT: 1500*8b/10Mbps == 1200us (+ 100us margin) + * Typically expect this loop to end in < 50 us on 100BT. + */ + while (--i && (ioread32(ioaddr + CSR5) & (CSR5_TS|CSR5_RS))) + udelay(10); + + if (!i) + printk(KERN_DEBUG "%s: tulip_stop_rxtx() failed\n", + tp->pdev->slot_name); } } diff -Nru a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c --- a/drivers/net/tulip/tulip_core.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/net/tulip/tulip_core.c 2004-11-29 21:22:07 -08:00 @@ -26,8 +26,8 @@ #include -#include "tulip.h" #include +#include "tulip.h" #include #include #include diff -Nru a/drivers/net/wan/pc300.h b/drivers/net/wan/pc300.h --- a/drivers/net/wan/pc300.h 2004-11-29 21:22:07 -08:00 +++ b/drivers/net/wan/pc300.h 2004-11-29 21:22:07 -08:00 @@ -105,14 +105,10 @@ #ifndef CY_TYPES #define CY_TYPES -#if defined(__alpha__) -typedef unsigned long ucdouble; /* 64 bits, unsigned */ -typedef unsigned int uclong; /* 32 bits, unsigned */ -#else -typedef unsigned long uclong; /* 32 bits, unsigned */ -#endif -typedef unsigned short ucshort; /* 16 bits, unsigned */ -typedef unsigned char ucchar; /* 8 bits, unsigned */ +typedef __u64 ucdouble; /* 64 bits, unsigned */ +typedef __u32 uclong; /* 32 bits, unsigned */ +typedef __u16 ucshort; /* 16 bits, unsigned */ +typedef __u8 ucchar; /* 8 bits, unsigned */ #endif /* CY_TYPES */ #define PC300_PROTO_MLPPP 1 diff -Nru a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c --- a/drivers/net/wan/pc300_drv.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/net/wan/pc300_drv.c 2004-11-29 21:22:08 -08:00 @@ -378,9 +378,9 @@ i != ((next_bd + 1) & (N_DMA_TX_BUF - 1)); i = (i + 1) & (N_DMA_TX_BUF - 1), ptdescr = (card->hw.rambase + TX_BD_ADDR(ch, i))) { - printk("\n CH%d TX%d: next=0x%lx, ptbuf=0x%lx, ST=0x%x, len=%d", - ch, i, (uclong) cpc_readl(&ptdescr->next), - (uclong) cpc_readl(&ptdescr->ptbuf), + printk("\n CH%d TX%d: next=0x%x, ptbuf=0x%x, ST=0x%x, len=%d", + ch, i, cpc_readl(&ptdescr->next), + cpc_readl(&ptdescr->ptbuf), cpc_readb(&ptdescr->status), cpc_readw(&ptdescr->len)); } printk("\n"); @@ -400,14 +400,14 @@ printk("#CH%d: f_bd = %d(0x%08x), n_bd = %d(0x%08x)\n", ch, first_bd, TX_BD_ADDR(ch, first_bd), next_bd, TX_BD_ADDR(ch, next_bd)); - printk("TX_CDA=0x%08lx, TX_EDA=0x%08lx\n", - (uclong) cpc_readl(scabase + DTX_REG(CDAL, ch)), - (uclong) cpc_readl(scabase + DTX_REG(EDAL, ch))); + printk("TX_CDA=0x%08x, TX_EDA=0x%08x\n", + cpc_readl(scabase + DTX_REG(CDAL, ch)), + cpc_readl(scabase + DTX_REG(EDAL, ch))); for (i = 0; i < N_DMA_TX_BUF; i++) { ptdescr = (card->hw.rambase + TX_BD_ADDR(ch, i)); - printk("\n CH%d TX%d: next=0x%lx, ptbuf=0x%lx, ST=0x%x, len=%d", - ch, i, (uclong) cpc_readl(&ptdescr->next), - (uclong) cpc_readl(&ptdescr->ptbuf), + printk("\n CH%d TX%d: next=0x%x, ptbuf=0x%x, ST=0x%x, len=%d", + ch, i, cpc_readl(&ptdescr->next), + cpc_readl(&ptdescr->ptbuf), cpc_readb(&ptdescr->status), cpc_readw(&ptdescr->len)); } printk("\n"); @@ -428,9 +428,9 @@ DMA_RX_BD_BASE + ch_factor * sizeof(pcsca_bd_t)); i < N_DMA_RX_BUF; i++, ptdescr++) { if (cpc_readb(&ptdescr->status) & DST_OSB) - printk ("\n CH%d RX%d: next=0x%lx, ptbuf=0x%lx, ST=0x%x, len=%d", - ch, i, (uclong) cpc_readl(&ptdescr->next), - (uclong) cpc_readl(&ptdescr->ptbuf), + printk ("\n CH%d RX%d: next=0x%x, ptbuf=0x%x, ST=0x%x, len=%d", + ch, i, cpc_readl(&ptdescr->next), + cpc_readl(&ptdescr->ptbuf), cpc_readb(&ptdescr->status), cpc_readw(&ptdescr->len)); } @@ -2415,12 +2415,12 @@ printk ("ILAR=0x%02x, WCRL=0x%02x, PCR=0x%02x, BTCR=0x%02x, BOLR=0x%02x\n", ilar, cpc_readb(scabase + WCRL), cpc_readb(scabase + PCR), cpc_readb(scabase + BTCR), cpc_readb(scabase + BOLR)); - printk("TX_CDA=0x%08lx, TX_EDA=0x%08lx\n", - (uclong) cpc_readl(scabase + DTX_REG(CDAL, ch)), - (uclong) cpc_readl(scabase + DTX_REG(EDAL, ch))); - printk("RX_CDA=0x%08lx, RX_EDA=0x%08lx, BFL=0x%04x\n", - (uclong) cpc_readl(scabase + DRX_REG(CDAL, ch)), - (uclong) cpc_readl(scabase + DRX_REG(EDAL, ch)), + printk("TX_CDA=0x%08x, TX_EDA=0x%08x\n", + cpc_readl(scabase + DTX_REG(CDAL, ch)), + cpc_readl(scabase + DTX_REG(EDAL, ch))); + printk("RX_CDA=0x%08x, RX_EDA=0x%08x, BFL=0x%04x\n", + cpc_readl(scabase + DRX_REG(CDAL, ch)), + cpc_readl(scabase + DRX_REG(EDAL, ch)), cpc_readw(scabase + DRX_REG(BFLL, ch))); printk("DMER=0x%02x, DSR_TX=0x%02x, DSR_RX=0x%02x\n", cpc_readb(scabase + DMER), cpc_readb(scabase + DSR_TX(ch)), @@ -2485,7 +2485,7 @@ cpc_readb(scabase + M_REG(IE2, ch)), cpc_readb(scabase + M_REG(IE4, ch)), cpc_readb(scabase + M_REG(FIE, ch))); - printk("IER0=0x%08lx\n", (uclong) cpc_readl(scabase + IER0)); + printk("IER0=0x%08x\n", cpc_readl(scabase + IER0)); if (ilar != 0) { CPC_LOCK(card, flags); @@ -3406,12 +3406,12 @@ printk("RSV "); break; } - printk (" #%d, %ldKB of RAM at 0x%08lx, IRQ%d, channel %d.\n", + printk (" #%d, %dKB of RAM at 0x%08x, IRQ%d, channel %d.\n", board_nbr, card->hw.ramsize / 1024, card->hw.ramphys, card->hw.irq, i + 1); devcount++; } else { - printk ("Dev%d on card(0x%08lx): unable to allocate i/f name.\n", + printk ("Dev%d on card(0x%08x): unable to allocate i/f name.\n", i + 1, card->hw.ramphys); free_netdev(dev); continue; @@ -3491,7 +3491,7 @@ if (!request_region(card->hw.iophys, card->hw.iosize, "PLX Registers")) { /* In case we can't allocate it, warn user */ printk("WARNING: couldn't allocate I/O region for PC300 board " - "at 0x%08lx!\n", card->hw.ramphys); + "at 0x%08x!\n", card->hw.ramphys); } if (card->hw.plxphys) { @@ -3504,7 +3504,7 @@ if (!request_mem_region(card->hw.plxphys, card->hw.plxsize, "PLX Registers")) { - printk("PC300 found at RAM 0x%08lx, " + printk("PC300 found at RAM 0x%08x, " "but could not allocate PLX mem region.\n", card->hw.ramphys); err = -ENODEV; @@ -3512,7 +3512,7 @@ } if (!request_mem_region(card->hw.ramphys, card->hw.alloc_ramsize, "On-board RAM")) { - printk("PC300 found at RAM 0x%08lx, " + printk("PC300 found at RAM 0x%08x, " "but could not allocate RAM mem region.\n", card->hw.ramphys); err = -ENODEV; @@ -3520,7 +3520,7 @@ } if (!request_mem_region(card->hw.scaphys, card->hw.scasize, "SCA-II Registers")) { - printk("PC300 found at RAM 0x%08lx, " + printk("PC300 found at RAM 0x%08x, " "but could not allocate SCA mem region.\n", card->hw.ramphys); err = -ENODEV; @@ -3600,7 +3600,7 @@ /* Allocate IRQ */ if (request_irq(card->hw.irq, cpc_intr, SA_SHIRQ, "Cyclades-PC300", card)) { - printk ("PC300 found at RAM 0x%08lx, but could not allocate IRQ%d.\n", + printk ("PC300 found at RAM 0x%08x, but could not allocate IRQ%d.\n", card->hw.ramphys, card->hw.irq); goto err_io_unmap; } diff -Nru a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c --- a/drivers/parport/parport_pc.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/parport/parport_pc.c 2004-11-29 21:22:08 -08:00 @@ -3154,8 +3154,9 @@ PARPORT_DMA_NONE, PARPORT_DMA_NOFIFO); } -static int __init parport_init_mode_setup(const char *str) { - +#ifdef CONFIG_PCI +static int __init parport_init_mode_setup(char *str) +{ printk(KERN_DEBUG "parport_pc.c: Specified parameter parport_init_mode=%s\n", str); if (!strcmp (str, "spp")) @@ -3170,11 +3171,12 @@ parport_init_mode=5; return 1; } +#endif #ifdef MODULE static const char *irq[PARPORT_PC_MAX_PORTS]; static const char *dma[PARPORT_PC_MAX_PORTS]; -static const char *init_mode; +static char *init_mode; MODULE_PARM_DESC(io, "Base I/O address (SPP regs)"); module_param_array(io, int, NULL, 0); @@ -3189,16 +3191,20 @@ MODULE_PARM_DESC(verbose_probing, "Log chit-chat during initialisation"); module_param(verbose_probing, int, 0644); #endif +#ifdef CONFIG_PCI MODULE_PARM_DESC(init_mode, "Initialise mode for VIA VT8231 port (spp, ps2, epp, ecp or ecpepp)"); MODULE_PARM(init_mode, "s"); +#endif static int __init parse_parport_params(void) { unsigned int i; int val; +#ifdef CONFIG_PCI if (init_mode) parport_init_mode_setup(init_mode); +#endif for (i = 0; i < PARPORT_PC_MAX_PORTS && io[i]; i++) { if (parport_parse_irq(irq[i], &val)) @@ -3313,9 +3319,9 @@ * * parport_init_mode=[spp|ps2|epp|ecp|ecpepp] */ - +#ifdef CONFIG_PCI __setup("parport_init_mode=",parport_init_mode_setup); - +#endif #endif /* "Parser" ends here */ diff -Nru a/drivers/parport/parport_sunbpp.c b/drivers/parport/parport_sunbpp.c --- a/drivers/parport/parport_sunbpp.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/parport/parport_sunbpp.c 2004-11-29 21:22:06 -08:00 @@ -52,7 +52,7 @@ static void parport_sunbpp_disable_irq(struct parport *p) { - struct bpp_regs *regs = (struct bpp_regs *)p->base; + struct bpp_regs __iomem *regs = (struct bpp_regs __iomem *)p->base; u32 tmp; tmp = sbus_readl(®s->p_csr); @@ -62,7 +62,7 @@ static void parport_sunbpp_enable_irq(struct parport *p) { - struct bpp_regs *regs = (struct bpp_regs *)p->base; + struct bpp_regs __iomem *regs = (struct bpp_regs __iomem *)p->base; u32 tmp; tmp = sbus_readl(®s->p_csr); @@ -72,7 +72,7 @@ static void parport_sunbpp_write_data(struct parport *p, unsigned char d) { - struct bpp_regs *regs = (struct bpp_regs *)p->base; + struct bpp_regs __iomem *regs = (struct bpp_regs __iomem *)p->base; sbus_writeb(d, ®s->p_dr); dprintk((KERN_DEBUG "wrote 0x%x\n", d)); @@ -80,7 +80,7 @@ static unsigned char parport_sunbpp_read_data(struct parport *p) { - struct bpp_regs *regs = (struct bpp_regs *)p->base; + struct bpp_regs __iomem *regs = (struct bpp_regs __iomem *)p->base; return sbus_readb(®s->p_dr); } @@ -88,7 +88,7 @@ #if 0 static void control_pc_to_sunbpp(struct parport *p, unsigned char status) { - struct bpp_regs *regs = (struct bpp_regs *)p->base; + struct bpp_regs __iomem *regs = (struct bpp_regs __iomem *)p->base; unsigned char value_tcr = sbus_readb(®s->p_tcr); unsigned char value_or = sbus_readb(®s->p_or); @@ -108,7 +108,7 @@ static unsigned char status_sunbpp_to_pc(struct parport *p) { - struct bpp_regs *regs = (struct bpp_regs *)p->base; + struct bpp_regs __iomem *regs = (struct bpp_regs __iomem *)p->base; unsigned char bits = 0; unsigned char value_tcr = sbus_readb(®s->p_tcr); unsigned char value_ir = sbus_readb(®s->p_ir); @@ -131,7 +131,7 @@ static unsigned char control_sunbpp_to_pc(struct parport *p) { - struct bpp_regs *regs = (struct bpp_regs *)p->base; + struct bpp_regs __iomem *regs = (struct bpp_regs __iomem *)p->base; unsigned char bits = 0; unsigned char value_tcr = sbus_readb(®s->p_tcr); unsigned char value_or = sbus_readb(®s->p_or); @@ -159,7 +159,7 @@ unsigned char mask, unsigned char val) { - struct bpp_regs *regs = (struct bpp_regs *)p->base; + struct bpp_regs __iomem *regs = (struct bpp_regs __iomem *)p->base; unsigned char value_tcr = sbus_readb(®s->p_tcr); unsigned char value_or = sbus_readb(®s->p_or); @@ -216,7 +216,7 @@ static void parport_sunbpp_data_forward (struct parport *p) { - struct bpp_regs *regs = (struct bpp_regs *)p->base; + struct bpp_regs __iomem *regs = (struct bpp_regs __iomem *)p->base; unsigned char value_tcr = sbus_readb(®s->p_tcr); dprintk((KERN_DEBUG "forward\n")); @@ -226,7 +226,7 @@ static void parport_sunbpp_data_reverse (struct parport *p) { - struct bpp_regs *regs = (struct bpp_regs *)p->base; + struct bpp_regs __iomem *regs = (struct bpp_regs __iomem *)p->base; u8 val = sbus_readb(®s->p_tcr); dprintk((KERN_DEBUG "reverse\n")); @@ -299,9 +299,9 @@ struct parport *p; /* at least in theory there may be a "we don't dma" case */ struct parport_operations *ops; - unsigned long base; + void __iomem *base; int irq, dma, err = 0, size; - struct bpp_regs *regs; + struct bpp_regs __iomem *regs; unsigned char value_tcr; Node *node; @@ -328,7 +328,7 @@ memcpy (ops, &parport_sunbpp_ops, sizeof (struct parport_operations)); dprintk(("register_port\n")); - if (!(p = parport_register_port(base, irq, dma, ops))) + if (!(p = parport_register_port((unsigned long)base, irq, dma, ops))) goto out3; p->size = size; @@ -343,7 +343,7 @@ dprintk(("OK\n")); parport_sunbpp_enable_irq(p); - regs = (struct bpp_regs *)p->base; + regs = (struct bpp_regs __iomem *)p->base; dprintk((KERN_DEBUG "forward\n")); value_tcr = sbus_readb(®s->p_tcr); value_tcr &= ~P_TCR_DIR; @@ -395,7 +395,7 @@ parport_sunbpp_disable_irq(p); free_irq(p->irq, p); } - sbus_iounmap(p->base, p->size); + sbus_iounmap((void __iomem *)p->base, p->size); parport_put_port(p); kfree (ops); list_del(&node->list); diff -Nru a/drivers/pci/hotplug/Makefile b/drivers/pci/hotplug/Makefile --- a/drivers/pci/hotplug/Makefile 2004-11-29 21:22:08 -08:00 +++ b/drivers/pci/hotplug/Makefile 2004-11-29 21:22:08 -08:00 @@ -51,7 +51,6 @@ pciehp-objs := pciehp_core.o \ pciehp_ctrl.o \ pciehp_pci.o \ - pciehp_sysfs.o \ pciehp_hpc.o ifdef CONFIG_ACPI_BUS pciehp-objs += pciehprm_acpi.o diff -Nru a/drivers/pci/hotplug/cpcihp_generic.c b/drivers/pci/hotplug/cpcihp_generic.c --- a/drivers/pci/hotplug/cpcihp_generic.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/pci/hotplug/cpcihp_generic.c 2004-11-29 21:22:07 -08:00 @@ -63,7 +63,7 @@ /* local variables */ static int debug; -static char bridge[256]; +static char *bridge; static u8 bridge_busnr; static u8 bridge_slot; static struct pci_bus *bus; diff -Nru a/drivers/pci/hotplug/cpqphp_nvram.c b/drivers/pci/hotplug/cpqphp_nvram.c --- a/drivers/pci/hotplug/cpqphp_nvram.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/pci/hotplug/cpqphp_nvram.c 2004-11-29 21:22:08 -08:00 @@ -92,7 +92,7 @@ static u8 evbuffer_length; static u8 evbuffer[1024]; -static void *compaq_int15_entry_point; +static void __iomem *compaq_int15_entry_point; static spinlock_t int15_lock; /* lock for ordering int15_bios_call() */ @@ -141,7 +141,7 @@ * * returns 0 for non-Compaq ROM, 1 for Compaq ROM */ -static int check_for_compaq_ROM (void *rom_start) +static int check_for_compaq_ROM (void __iomem *rom_start) { u8 temp1, temp2, temp3, temp4, temp5, temp6; int result = 0; @@ -197,7 +197,7 @@ * * Read the hot plug Resource Table from NVRAM */ -static int load_HRT (void *rom_start) +static int load_HRT (void __iomem *rom_start) { u32 available; u32 temp_dword; @@ -231,7 +231,7 @@ * * Save the hot plug Resource Table in NVRAM */ -static u32 store_HRT (void *rom_start) +static u32 store_HRT (void __iomem *rom_start) { u32 *buffer; u32 *pFill; @@ -423,7 +423,7 @@ } -void compaq_nvram_init (void *rom_start) +void compaq_nvram_init (void __iomem *rom_start) { if (rom_start) { compaq_int15_entry_point = (rom_start + ROM_INT15_PHY_ADDR - ROM_PHY_ADDR); @@ -435,7 +435,7 @@ } -int compaq_nvram_load (void *rom_start, struct controller *ctrl) +int compaq_nvram_load (void __iomem *rom_start, struct controller *ctrl) { u8 bus, device, function; u8 nummem, numpmem, numio, numbus; @@ -648,7 +648,7 @@ } -int compaq_nvram_store (void *rom_start) +int compaq_nvram_store (void __iomem *rom_start) { int rc = 1; diff -Nru a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h --- a/drivers/pci/hotplug/pciehp.h 2004-11-29 21:22:08 -08:00 +++ b/drivers/pci/hotplug/pciehp.h 2004-11-29 21:22:08 -08:00 @@ -207,9 +207,6 @@ #define msg_button_cancel "PCI slot #%d - action canceled due to button press.\n" #define msg_button_ignore "PCI slot #%d - button press ignored. (action in progress...)\n" -/* sysfs function for the hotplug controller info */ -extern void pciehp_create_ctrl_files (struct controller *ctrl); - /* controller functions */ extern int pciehprm_find_available_resources (struct controller *ctrl); extern int pciehp_event_start_thread (void); diff -Nru a/drivers/pci/hotplug/pciehp_sysfs.c b/drivers/pci/hotplug/pciehp_sysfs.c --- a/drivers/pci/hotplug/pciehp_sysfs.c 2004-11-29 21:22:08 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,143 +0,0 @@ -/* - * PCI Express Hot Plug Controller Driver - * - * Copyright (C) 1995,2001 Compaq Computer Corporation - * Copyright (C) 2001,2003 Greg Kroah-Hartman (greg@kroah.com) - * Copyright (C) 2001 IBM Corp. - * - * All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or - * NON INFRINGEMENT. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * Send feedback to - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include "pciehp.h" - - -/* A few routines that create sysfs entries for the hot plug controller */ - -static ssize_t show_ctrl (struct device *dev, char *buf) -{ - struct pci_dev *pci_dev; - struct controller *ctrl; - char * out = buf; - int index; - struct pci_resource *res; - - pci_dev = container_of (dev, struct pci_dev, dev); - ctrl = pci_get_drvdata(pci_dev); - - out += sprintf(buf, "Free resources: memory\n"); - index = 11; - res = ctrl->mem_head; - while (res && index--) { - out += sprintf(out, "start = %8.8x, length = %8.8x\n", res->base, res->length); - res = res->next; - } - out += sprintf(out, "Free resources: prefetchable memory\n"); - index = 11; - res = ctrl->p_mem_head; - while (res && index--) { - out += sprintf(out, "start = %8.8x, length = %8.8x\n", res->base, res->length); - res = res->next; - } - out += sprintf(out, "Free resources: IO\n"); - index = 11; - res = ctrl->io_head; - while (res && index--) { - out += sprintf(out, "start = %8.8x, length = %8.8x\n", res->base, res->length); - res = res->next; - } - out += sprintf(out, "Free resources: bus numbers\n"); - index = 11; - res = ctrl->bus_head; - while (res && index--) { - out += sprintf(out, "start = %8.8x, length = %8.8x\n", res->base, res->length); - res = res->next; - } - - return out - buf; -} -static DEVICE_ATTR (ctrl, S_IRUGO, show_ctrl, NULL); - -static ssize_t show_dev (struct device *dev, char *buf) -{ - struct pci_dev *pci_dev; - struct controller *ctrl; - char * out = buf; - int index; - struct pci_resource *res; - struct pci_func *new_slot; - struct slot *slot; - - pci_dev = container_of (dev, struct pci_dev, dev); - ctrl = pci_get_drvdata(pci_dev); - - slot=ctrl->slot; - - while (slot) { - new_slot = pciehp_slot_find(slot->bus, slot->device, 0); - if (!new_slot) - break; - out += sprintf(out, "assigned resources: memory\n"); - index = 11; - res = new_slot->mem_head; - while (res && index--) { - out += sprintf(out, "start = %8.8x, length = %8.8x\n", res->base, res->length); - res = res->next; - } - out += sprintf(out, "assigned resources: prefetchable memory\n"); - index = 11; - res = new_slot->p_mem_head; - while (res && index--) { - out += sprintf(out, "start = %8.8x, length = %8.8x\n", res->base, res->length); - res = res->next; - } - out += sprintf(out, "assigned resources: IO\n"); - index = 11; - res = new_slot->io_head; - while (res && index--) { - out += sprintf(out, "start = %8.8x, length = %8.8x\n", res->base, res->length); - res = res->next; - } - out += sprintf(out, "assigned resources: bus numbers\n"); - index = 11; - res = new_slot->bus_head; - while (res && index--) { - out += sprintf(out, "start = %8.8x, length = %8.8x\n", res->base, res->length); - res = res->next; - } - slot=slot->next; - } - - return out - buf; -} -static DEVICE_ATTR (dev, S_IRUGO, show_dev, NULL); - -void pciehp_create_ctrl_files (struct controller *ctrl) -{ - device_create_file (&ctrl->pci_dev->dev, &dev_attr_ctrl); - device_create_file (&ctrl->pci_dev->dev, &dev_attr_dev); -} diff -Nru a/drivers/pci/hotplug/rpaphp_pci.c b/drivers/pci/hotplug/rpaphp_pci.c --- a/drivers/pci/hotplug/rpaphp_pci.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/pci/hotplug/rpaphp_pci.c 2004-11-29 21:22:06 -08:00 @@ -31,18 +31,17 @@ struct pci_dev *rpaphp_find_pci_dev(struct device_node *dn) { - struct pci_dev *retval_dev = NULL, *dev = NULL; + struct pci_dev *dev = NULL; char bus_id[BUS_ID_SIZE]; - sprintf(bus_id, "%04x:%02x:%02x.%d",dn->phb->global_number, + sprintf(bus_id, "%04x:%02x:%02x.%d", dn->phb->global_number, dn->busno, PCI_SLOT(dn->devfn), PCI_FUNC(dn->devfn)); - while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { + for_each_pci_dev(dev) { if (!strcmp(pci_name(dev), bus_id)) { - retval_dev = dev; break; } } - return retval_dev; + return dev; } EXPORT_SYMBOL_GPL(rpaphp_find_pci_dev); diff -Nru a/drivers/pci/quirks.c b/drivers/pci/quirks.c --- a/drivers/pci/quirks.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/pci/quirks.c 2004-11-29 21:22:06 -08:00 @@ -479,7 +479,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, quirk_via_acpi ); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_via_acpi ); -static void __devinit quirk_via_irqpic(struct pci_dev *dev) +static void quirk_via_irqpic(struct pci_dev *dev) { u8 irq, new_irq = dev->irq & 0xf; @@ -861,7 +861,7 @@ #define EHCI_USBLEGCTLSTS 4 /* legacy control/status */ #define EHCI_USBLEGCTLSTS_SOOE (1 << 13) /* SMI on ownership change */ -int usb_early_handoff __initdata = 0; +int usb_early_handoff __devinitdata = 0; static int __init usb_handoff_early(char *str) { usb_early_handoff = 1; diff -Nru a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c --- a/drivers/pcmcia/ds.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/pcmcia/ds.c 2004-11-29 21:22:08 -08:00 @@ -134,8 +134,6 @@ static int major_dev = -1; -static struct proc_dir_entry *proc_pccard; - /*====================================================================*/ /* code which was in cs.c before */ diff -Nru a/drivers/pcmcia/sa1100_simpad.c b/drivers/pcmcia/sa1100_simpad.c --- a/drivers/pcmcia/sa1100_simpad.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/pcmcia/sa1100_simpad.c 2004-11-29 21:22:08 -08:00 @@ -48,7 +48,7 @@ struct pcmcia_state *state) { unsigned long levels = GPLR; - unsigned long *cs3reg = CS3_BASE; + long cs3reg = get_cs3_shadow(); state->detect=((levels & GPIO_CF_CD)==0)?1:0; state->ready=(levels & GPIO_CF_IRQ)?1:0; @@ -56,7 +56,7 @@ state->bvd2=1; /* Not available on Simpad. */ state->wrprot=0; /* Not available on Simpad. */ - if((*cs3reg & 0x0c) == 0x0c) { + if((cs3reg & 0x0c) == 0x0c) { state->vs_3v=0; state->vs_Xv=0; } else { diff -Nru a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c --- a/drivers/pcmcia/yenta_socket.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/pcmcia/yenta_socket.c 2004-11-29 21:22:07 -08:00 @@ -688,7 +688,7 @@ * Different cardbus controllers have slightly different * initialization sequences etc details. List them here.. */ -struct cardbus_type cardbus_type[] = { +static struct cardbus_type cardbus_type[] = { [CARDBUS_TYPE_TI] = { .override = ti_override, .save_state = ti_save_state, @@ -827,8 +827,7 @@ cb_writel(socket, CB_SOCKET_MASK, CB_CSTSMASK); cb_writel(socket, CB_SOCKET_FORCE, CB_FCARDSTS); - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ/10); + msleep(100); /* disable interrupts */ cb_writel(socket, CB_SOCKET_MASK, 0); @@ -1026,7 +1025,13 @@ pci_save_state(dev); pci_read_config_dword(dev, 16*4, &socket->saved_state[0]); pci_read_config_dword(dev, 17*4, &socket->saved_state[1]); - pci_set_power_state(dev, 3); + + /* + * Some laptops (IBM T22) do not like us putting the Cardbus + * bridge into D3. At a guess, some other laptop will + * probably require this, so leave it commented out for now. + */ + /* pci_set_power_state(dev, 3); */ } return ret; diff -Nru a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c --- a/drivers/s390/block/dasd_devmap.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/s390/block/dasd_devmap.c 2004-11-29 21:22:07 -08:00 @@ -11,7 +11,7 @@ * functions may not be called from interrupt context. In particular * dasd_get_device is a no-no from interrupt context. * - * $Revision: 1.30 $ + * $Revision: 1.33 $ */ #include @@ -204,94 +204,130 @@ } /* - * Read comma separated list of dasd ranges. + * Try to match the first element on the comma separated parse string + * with one of the known keywords. If a keyword is found, take the approprate + * action and return a pointer to the residual string. If the first element + * could not be matched to any keyword then return an error code. + */ +static char * +dasd_parse_keyword( char *parsestring ) { + + char *nextcomma, *residual_str; + int length; + + nextcomma = strchr(parsestring,','); + if (nextcomma) { + length = nextcomma - parsestring; + residual_str = nextcomma + 1; + } else { + length = strlen(parsestring); + residual_str = parsestring + length; + } + if (strncmp ("autodetect", parsestring, length) == 0) { + dasd_autodetect = 1; + MESSAGE (KERN_INFO, "%s", + "turning to autodetection mode"); + return residual_str; + } + if (strncmp ("probeonly", parsestring, length) == 0) { + dasd_probeonly = 1; + MESSAGE(KERN_INFO, "%s", + "turning to probeonly mode"); + return residual_str; + } + return ERR_PTR(-EINVAL); +} + +/* + * Try to interprete the first element on the comma separated parse string + * as a device number or a range of devices. If the interpretation is + * successfull, create the matching dasd_devmap entries and return a pointer + * to the residual string. + * If interpretation fails or in case of an error, return an error code. */ -static inline int -dasd_ranges_list(char *str) -{ +static char * +dasd_parse_range( char *parsestring ) { + struct dasd_devmap *devmap; int from, from_id0, from_id1; int to, to_id0, to_id1; int features, rc; - char bus_id[BUS_ID_SIZE+1], *orig_str; + char bus_id[BUS_ID_SIZE+1], *str; - orig_str = str; - while (1) { - rc = dasd_busid(&str, &from_id0, &from_id1, &from); - if (rc == 0) { - to = from; - to_id0 = from_id0; - to_id1 = from_id1; - if (*str == '-') { - str++; - rc = dasd_busid(&str, &to_id0, &to_id1, &to); - } - } - if (rc == 0 && - (from_id0 != to_id0 || from_id1 != to_id1 || from > to)) - rc = -EINVAL; - if (rc) { - MESSAGE(KERN_ERR, "Invalid device range %s", orig_str); - return rc; - } - features = dasd_feature_list(str, &str); - if (features < 0) - return -EINVAL; - while (from <= to) { - sprintf(bus_id, "%01x.%01x.%04x", - from_id0, from_id1, from++); - devmap = dasd_add_busid(bus_id, features); - if (IS_ERR(devmap)) - return PTR_ERR(devmap); + str = parsestring; + rc = dasd_busid(&str, &from_id0, &from_id1, &from); + if (rc == 0) { + to = from; + to_id0 = from_id0; + to_id1 = from_id1; + if (*str == '-') { + str++; + rc = dasd_busid(&str, &to_id0, &to_id1, &to); } - if (*str != ',') - break; - str++; } - if (*str != '\0') { - MESSAGE(KERN_WARNING, - "junk at end of dasd parameter string: %s\n", str); - return -EINVAL; + if (rc == 0 && + (from_id0 != to_id0 || from_id1 != to_id1 || from > to)) + rc = -EINVAL; + if (rc) { + MESSAGE(KERN_ERR, "Invalid device range %s", parsestring); + return ERR_PTR(rc); } - return 0; + features = dasd_feature_list(str, &str); + if (features < 0) + return ERR_PTR(-EINVAL); + while (from <= to) { + sprintf(bus_id, "%01x.%01x.%04x", + from_id0, from_id1, from++); + devmap = dasd_add_busid(bus_id, features); + if (IS_ERR(devmap)) + return (char *)devmap; + } + if (*str == ',') + return str + 1; + if (*str == '\0') + return str; + MESSAGE(KERN_WARNING, + "junk at end of dasd parameter string: %s\n", str); + return ERR_PTR(-EINVAL); } -/* - * Parse a single dasd= parameter. - */ -static int -dasd_parameter(char *str) -{ - if (strcmp ("autodetect", str) == 0) { - dasd_autodetect = 1; - MESSAGE (KERN_INFO, "%s", - "turning to autodetection mode"); - return 0; - } - if (strcmp ("probeonly", str) == 0) { - dasd_probeonly = 1; - MESSAGE(KERN_INFO, "%s", - "turning to probeonly mode"); - return 0; - } - /* turn off autodetect mode and scan for dasd ranges */ - dasd_autodetect = 0; - return dasd_ranges_list(str); +static inline char * +dasd_parse_next_element( char *parsestring ) { + char * residual_str; + residual_str = dasd_parse_keyword(parsestring); + if (!IS_ERR(residual_str)) + return residual_str; + residual_str = dasd_parse_range(parsestring); + return residual_str; } /* - * Parse parameters stored in dasd[] and dasd_disciplines[]. + * Parse parameters stored in dasd[] + * The 'dasd=...' parameter allows to specify a comma separated list of + * keywords and device ranges. When the dasd driver is build into the kernel, + * the complete list will be stored as one element of the dasd[] array. + * When the dasd driver is build as a module, then the list is broken into + * it's elements and each dasd[] entry contains one element. */ int dasd_parse(void) { int rc, i; + char *parsestring; rc = 0; for (i = 0; i < 256; i++) { if (dasd[i] == NULL) break; - rc = dasd_parameter(dasd[i]); + parsestring = dasd[i]; + /* loop over the comma separated list in the parsestring */ + while (*parsestring) { + parsestring = dasd_parse_next_element(parsestring); + if(IS_ERR(parsestring)) { + rc = PTR_ERR(parsestring); + break; + } + } if (rc) { DBF_EVENT(DBF_ALERT, "%s", "invalid range found"); break; diff -Nru a/drivers/s390/char/con3270.c b/drivers/s390/char/con3270.c --- a/drivers/s390/char/con3270.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/s390/char/con3270.c 2004-11-29 21:22:06 -08:00 @@ -73,14 +73,11 @@ con3270_set_timer(struct con3270 *cp, int expires) { if (expires == 0) { - if (timer_pending(&cp->timer)) - del_timer(&cp->timer); + del_timer(&cp->timer); return; } - if (timer_pending(&cp->timer)) { - if (mod_timer(&cp->timer, jiffies + expires)) - return; - } + if (mod_timer(&cp->timer, jiffies + expires)) + return; cp->timer.function = (void (*)(unsigned long)) con3270_update; cp->timer.data = (unsigned long) cp; cp->timer.expires = jiffies + expires; diff -Nru a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c --- a/drivers/s390/char/raw3270.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/s390/char/raw3270.c 2004-11-29 21:22:08 -08:00 @@ -347,8 +347,11 @@ if (IS_ERR(irb)) rc = RAW3270_IO_RETRY; - else if (irb->scsw.dstat == (DEV_STAT_CHN_END | DEV_STAT_DEV_END | - DEV_STAT_UNIT_EXCEP)) { + else if (irb->scsw.fctl & SCSW_FCTL_HALT_FUNC) { + rq->rc = -EIO; + rc = RAW3270_IO_DONE; + } else if (irb->scsw.dstat == (DEV_STAT_CHN_END | DEV_STAT_DEV_END | + DEV_STAT_UNIT_EXCEP)) { /* Handle CE-DE-UE and subsequent UDE */ set_bit(RAW3270_FLAGS_BUSY, &rp->flags); rc = RAW3270_IO_BUSY; @@ -552,6 +555,8 @@ rc = wait_event_interruptible(wq, raw3270_request_final(rq)); if (rc == -ERESTARTSYS) { /* Interrupted by a signal. */ raw3270_halt_io(view->dev, rq); + /* No wait for the halt to complete. */ + wait_event(wq, raw3270_request_final(rq)); return -ERESTARTSYS; } return rq->rc; @@ -809,9 +814,15 @@ if (rc) return ERR_PTR(rc); set_bit(RAW3270_FLAGS_CONSOLE, &rp->flags); - raw3270_reset_device(rp); - raw3270_size_device(rp); - raw3270_reset_device(rp); + rc = raw3270_reset_device(rp); + if (rc) + return ERR_PTR(rc); + rc = raw3270_size_device(rp); + if (rc) + return ERR_PTR(rc); + rc = raw3270_reset_device(rp); + if (rc) + return ERR_PTR(rc); set_bit(RAW3270_FLAGS_READY, &rp->flags); return rp; } @@ -1030,7 +1041,7 @@ } spin_unlock_irqrestore(get_ccwdev_lock(rp->cdev), flags); /* Wait for reference counter to drop to zero. */ - atomic_sub(2, &view->ref_count); + atomic_dec(&view->ref_count); wait_event(raw3270_wait_queue, atomic_read(&view->ref_count) == 0); if (view->fn->free) view->fn->free(view); @@ -1165,13 +1176,20 @@ { struct raw3270 *rp; struct raw3270_notifier *np; + int rc; rp = raw3270_create_device(cdev); if (IS_ERR(rp)) return PTR_ERR(rp); - raw3270_reset_device(rp); - raw3270_size_device(rp); - raw3270_reset_device(rp); + rc = raw3270_reset_device(rp); + if (rc) + return rc; + rc = raw3270_size_device(rp); + if (rc) + return rc; + rc = raw3270_reset_device(rp); + if (rc) + return rc; raw3270_create_attributes(rp); set_bit(RAW3270_FLAGS_READY, &rp->flags); down(&raw3270_sem); diff -Nru a/drivers/s390/char/tty3270.c b/drivers/s390/char/tty3270.c --- a/drivers/s390/char/tty3270.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/s390/char/tty3270.c 2004-11-29 21:22:07 -08:00 @@ -124,16 +124,12 @@ tty3270_set_timer(struct tty3270 *tp, int expires) { if (expires == 0) { - if (timer_pending(&tp->timer)) { + if (del_timer(&tp->timer)) raw3270_put_view(&tp->view); - del_timer(&tp->timer); - } return; } - if (timer_pending(&tp->timer)) { - if (mod_timer(&tp->timer, jiffies + expires)) - return; - } + if (mod_timer(&tp->timer, jiffies + expires)) + return; raw3270_get_view(&tp->view); tp->timer.function = (void (*)(unsigned long)) tty3270_update; tp->timer.data = (unsigned long) tp; diff -Nru a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c --- a/drivers/s390/cio/css.c 2004-11-29 21:22:09 -08:00 +++ b/drivers/s390/cio/css.c 2004-11-29 21:22:09 -08:00 @@ -1,7 +1,7 @@ /* * drivers/s390/cio/css.c * driver for channel subsystem - * $Revision: 1.82 $ + * $Revision: 1.84 $ * * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, * IBM Corporation @@ -188,6 +188,12 @@ put_device(&sch->dev); return 0; /* Already processed. */ } + /* + * We've got a machine check, so running I/O won't get an interrupt. + * Kill any pending timers. + */ + if (sch) + device_kill_pending_timer(sch); if (!disc && !slow) { if (sch) put_device(&sch->dev); diff -Nru a/drivers/s390/cio/css.h b/drivers/s390/cio/css.h --- a/drivers/s390/cio/css.h 2004-11-29 21:22:08 -08:00 +++ b/drivers/s390/cio/css.h 2004-11-29 21:22:08 -08:00 @@ -66,6 +66,7 @@ struct ccw_device_private { int state; /* device state */ atomic_t onoff; + unsigned long registered; __u16 devno; /* device number */ __u16 irq; /* subchannel number */ __u8 imask; /* lpm mask for SNID/SID/SPGID */ @@ -136,6 +137,9 @@ /* Helper functions for vary on/off. */ void device_set_waiting(struct subchannel *); + +/* Machine check helper function. */ +void device_kill_pending_timer(struct subchannel *); /* Helper functions to build lists for the slow path. */ int css_enqueue_subchannel_slow(unsigned long schid); diff -Nru a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c --- a/drivers/s390/cio/device.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/s390/cio/device.c 2004-11-29 21:22:08 -08:00 @@ -1,7 +1,7 @@ /* * drivers/s390/cio/device.c * bus driver for ccw devices - * $Revision: 1.124 $ + * $Revision: 1.128 $ * * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, * IBM Corporation @@ -68,9 +68,6 @@ if (!cdev) return -ENODEV; - if (cdev->private->state == DEV_STATE_NOT_OPER) - return -ENODEV; - /* what we want to pass to /sbin/hotplug */ envp[i++] = buffer; @@ -501,9 +498,11 @@ if ((ret = device_add(dev))) return ret; - if ((ret = device_add_files(dev))) - device_del(dev); - + set_bit(1, &cdev->private->registered); + if ((ret = device_add_files(dev))) { + if (test_and_clear_bit(1, &cdev->private->registered)) + device_del(dev); + } return ret; } @@ -589,7 +588,8 @@ } else need_rename = 0; device_remove_files(&cdev->dev); - device_del(&cdev->dev); + if (test_and_clear_bit(1, &cdev->private->registered)) + device_del(&cdev->dev); if (need_rename) snprintf (cdev->dev.bus_id, BUS_ID_SIZE, "0.0.%04x", sch->schib.pmcw.dev); @@ -597,8 +597,11 @@ put_device(&cdev->dev); return; } - if (device_add_files(&cdev->dev)) - device_unregister(&cdev->dev); + set_bit(1, &cdev->private->registered); + if (device_add_files(&cdev->dev)) { + if (test_and_clear_bit(1, &cdev->private->registered)) + device_unregister(&cdev->dev); + } } static void @@ -620,6 +623,7 @@ struct ccw_device *cdev; struct subchannel *sch; int ret; + unsigned long flags; cdev = (struct ccw_device *) data; sch = to_subchannel(cdev->dev.parent); @@ -634,10 +638,14 @@ printk (KERN_WARNING "%s: could not register %s\n", __func__, cdev->dev.bus_id); put_device(&cdev->dev); - sch->dev.driver_data = 0; + spin_lock_irqsave(&sch->lock, flags); + sch->dev.driver_data = NULL; + spin_unlock_irqrestore(&sch->lock, flags); kfree (cdev->private); kfree (cdev); put_device(&sch->dev); + if (atomic_dec_and_test(&ccw_device_init_count)) + wake_up(&ccw_device_init_wq); return; } @@ -650,6 +658,8 @@ cdev->private->flags.recog_done = 1; put_device(&sch->dev); wake_up(&cdev->private->wait_q); + if (atomic_dec_and_test(&ccw_device_init_count)) + wake_up(&ccw_device_init_wq); } void @@ -686,9 +696,11 @@ if (!get_device(&cdev->dev)) break; sch = to_subchannel(cdev->dev.parent); - INIT_WORK(&cdev->private->kick_work, - ccw_device_call_sch_unregister, (void *) cdev); + PREPARE_WORK(&cdev->private->kick_work, + ccw_device_call_sch_unregister, (void *) cdev); queue_work(slow_path_wq, &cdev->private->kick_work); + if (atomic_dec_and_test(&ccw_device_init_count)) + wake_up(&ccw_device_init_wq); break; case DEV_STATE_BOXED: /* Device did not respond in time. */ @@ -699,13 +711,11 @@ */ if (!get_device(&cdev->dev)) break; - INIT_WORK(&cdev->private->kick_work, - io_subchannel_register, (void *) cdev); - queue_work(ccw_device_work, &cdev->private->kick_work); + PREPARE_WORK(&cdev->private->kick_work, + io_subchannel_register, (void *) cdev); + queue_work(slow_path_wq, &cdev->private->kick_work); break; } - if (atomic_dec_and_test(&ccw_device_init_count)) - wake_up(&ccw_device_init_wq); } static int @@ -750,6 +760,7 @@ struct subchannel *sch; struct ccw_device *cdev; int rc; + unsigned long flags; sch = to_subchannel(pdev); if (sch->dev.driver_data) { @@ -790,6 +801,7 @@ .parent = pdev, .release = ccw_device_release, }; + INIT_LIST_HEAD(&cdev->private->kick_work.entry); /* Do first half of device_register. */ device_initialize(&cdev->dev); @@ -801,7 +813,9 @@ rc = io_subchannel_recog(cdev, to_subchannel(pdev)); if (rc) { - sch->dev.driver_data = 0; + spin_lock_irqsave(&sch->lock, flags); + sch->dev.driver_data = NULL; + spin_unlock_irqrestore(&sch->lock, flags); if (cdev->dev.release) cdev->dev.release(&cdev->dev); } @@ -809,24 +823,40 @@ return rc; } +static void +ccw_device_unregister(void *data) +{ + struct ccw_device *cdev; + + cdev = (struct ccw_device *)data; + if (test_and_clear_bit(1, &cdev->private->registered)) + device_unregister(&cdev->dev); + put_device(&cdev->dev); +} + static int io_subchannel_remove (struct device *dev) { struct ccw_device *cdev; + unsigned long flags; if (!dev->driver_data) return 0; cdev = dev->driver_data; /* Set ccw device to not operational and drop reference. */ + spin_lock_irqsave(cdev->ccwlock, flags); + dev->driver_data = NULL; cdev->private->state = DEV_STATE_NOT_OPER; + spin_unlock_irqrestore(cdev->ccwlock, flags); /* - * Careful here. Our ccw device might be yet unregistered when - * de-registering its subchannel (machine check during device - * recognition). Better look if the subchannel has children. + * Put unregistration on workqueue to avoid livelocks on the css bus + * semaphore. */ - if (!list_empty(&dev->children)) - device_unregister(&cdev->dev); - dev->driver_data = NULL; + if (get_device(&cdev->dev)) { + PREPARE_WORK(&cdev->private->kick_work, + ccw_device_unregister, (void *) cdev); + queue_work(ccw_device_work, &cdev->private->kick_work); + } return 0; } diff -Nru a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c --- a/drivers/s390/cio/device_fsm.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/s390/cio/device_fsm.c 2004-11-29 21:22:07 -08:00 @@ -93,6 +93,18 @@ add_timer(&cdev->private->timer); } +/* Kill any pending timers after machine check. */ +void +device_kill_pending_timer(struct subchannel *sch) +{ + struct ccw_device *cdev; + + if (!sch->dev.driver_data) + return; + cdev = sch->dev.driver_data; + ccw_device_set_timeout(cdev, 0); +} + /* * Cancel running i/o. This is called repeatedly since halt/clear are * asynchronous operations. We do one try with cio_cancel, two tries @@ -452,7 +464,8 @@ (void *)cdev); queue_work(ccw_device_work, &cdev->private->kick_work); - } + } else + put_device(&sch->dev); } } else { cio_disable_subchannel(sch); @@ -1190,8 +1203,8 @@ CIO_TRACE_EVENT (3, "IRQ"); CIO_TRACE_EVENT (3, pdev->bus_id); - - dev_fsm_event(cdev, DEV_EVENT_INTERRUPT); + if (cdev) + dev_fsm_event(cdev, DEV_EVENT_INTERRUPT); } EXPORT_SYMBOL_GPL(ccw_device_set_timeout); diff -Nru a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c --- a/drivers/s390/cio/qdio.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/s390/cio/qdio.c 2004-11-29 21:22:07 -08:00 @@ -56,7 +56,7 @@ #include "ioasm.h" #include "chsc.h" -#define VERSION_QDIO_C "$Revision: 1.88 $" +#define VERSION_QDIO_C "$Revision: 1.89 $" /****************** MODULE PARAMETER VARIABLES ********************/ MODULE_AUTHOR("Utz Bacher "); @@ -1401,7 +1401,7 @@ int result=-ENOMEM; for (i=0;islib=kmalloc(PAGE_SIZE,GFP_KERNEL|GFP_DMA); + q->slib=kmalloc(PAGE_SIZE,GFP_KERNEL); if (!q->slib) { QDIO_PRINT_ERR("kmalloc of slib failed!\n"); goto out; @@ -1420,7 +1420,7 @@ } for (i=0;islib=kmalloc(PAGE_SIZE,GFP_KERNEL|GFP_DMA); + q->slib=kmalloc(PAGE_SIZE,GFP_KERNEL); if (!q->slib) { QDIO_PRINT_ERR("kmalloc of slib failed!\n"); goto out; diff -Nru a/drivers/s390/crypto/Makefile b/drivers/s390/crypto/Makefile --- a/drivers/s390/crypto/Makefile 2004-11-29 21:22:07 -08:00 +++ b/drivers/s390/crypto/Makefile 2004-11-29 21:22:07 -08:00 @@ -1,5 +1,5 @@ # -# S/390 miscellaneous devices +# S/390 crypto devices # z90crypt-objs := z90main.o z90hardware.o diff -Nru a/drivers/s390/crypto/z90common.h b/drivers/s390/crypto/z90common.h --- a/drivers/s390/crypto/z90common.h 2004-11-29 21:22:08 -08:00 +++ b/drivers/s390/crypto/z90common.h 2004-11-29 21:22:08 -08:00 @@ -1,5 +1,5 @@ /* - * linux/drivers/s390/misc/z90common.h + * linux/drivers/s390/crypto/z90common.h * * z90crypt 1.3.2 * @@ -24,10 +24,10 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef _Z90COMMON_ -#define _Z90COMMON_ +#ifndef _Z90COMMON_H_ +#define _Z90COMMON_H_ -#define VERSION_Z90COMMON_H "$Revision: 1.15 $" +#define VERSION_Z90COMMON_H "$Revision: 1.16 $" #define RESPBUFFSIZE 256 diff -Nru a/drivers/s390/crypto/z90crypt.h b/drivers/s390/crypto/z90crypt.h --- a/drivers/s390/crypto/z90crypt.h 2004-11-29 21:22:07 -08:00 +++ b/drivers/s390/crypto/z90crypt.h 2004-11-29 21:22:07 -08:00 @@ -1,5 +1,5 @@ /* - * linux/drivers/s390/misc/z90crypt.h + * linux/drivers/s390/crypto/z90crypt.h * * z90crypt 1.3.2 * @@ -24,12 +24,12 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef _LINUX_Z90CRYPT_H_ -#define _LINUX_Z90CRYPT_H_ +#ifndef _Z90CRYPT_H_ +#define _Z90CRYPT_H_ #include -#define VERSION_Z90CRYPT_H "$Revision: 1.10 $" +#define VERSION_Z90CRYPT_H "$Revision: 1.11 $" #define z90crypt_VERSION 1 #define z90crypt_RELEASE 3 // 2 = PCIXCC, 3 = rewrite for coding standards @@ -255,4 +255,4 @@ unsigned char qdepth[MASK_LENGTH]; }; -#endif /* _LINUX_Z90CRYPT_H_ */ +#endif /* _Z90CRYPT_H_ */ diff -Nru a/drivers/s390/crypto/z90hardware.c b/drivers/s390/crypto/z90hardware.c --- a/drivers/s390/crypto/z90hardware.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/s390/crypto/z90hardware.c 2004-11-29 21:22:08 -08:00 @@ -1,5 +1,5 @@ /* - * linux/drivers/s390/misc/z90hardware.c + * linux/drivers/s390/crypto/z90hardware.c * * z90crypt 1.3.2 * @@ -32,9 +32,9 @@ #include "z90crypt.h" #include "z90common.h" -#define VERSION_Z90HARDWARE_C "$Revision: 1.32 $" +#define VERSION_Z90HARDWARE_C "$Revision: 1.33 $" -char z90chardware_version[] __initdata = +char z90hardware_version[] __initdata = "z90hardware.o (" VERSION_Z90HARDWARE_C "/" VERSION_Z90COMMON_H "/" VERSION_Z90CRYPT_H ")"; diff -Nru a/drivers/s390/crypto/z90main.c b/drivers/s390/crypto/z90main.c --- a/drivers/s390/crypto/z90main.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/s390/crypto/z90main.c 2004-11-29 21:22:06 -08:00 @@ -1,5 +1,5 @@ /* - * linux/drivers/s390/misc/z90main.c + * linux/drivers/s390/crypto/z90main.c * * z90crypt 1.3.2 * @@ -51,13 +51,13 @@ # error "This kernel is too recent: not supported by this file" #endif -#define VERSION_Z90MAIN_C "$Revision: 1.54 $" +#define VERSION_Z90MAIN_C "$Revision: 1.57 $" -static char z90cmain_version[] __initdata = +static char z90main_version[] __initdata = "z90main.o (" VERSION_Z90MAIN_C "/" VERSION_Z90COMMON_H "/" VERSION_Z90CRYPT_H ")"; -extern char z90chardware_version[]; +extern char z90hardware_version[]; /** * Defaults that may be modified. @@ -97,7 +97,7 @@ * older than CLEANUPTIME seconds in the past. */ #ifndef CLEANUPTIME -#define CLEANUPTIME 15 +#define CLEANUPTIME 20 #endif /** @@ -670,8 +670,8 @@ PRINTKN("Version %d.%d.%d loaded, built on %s %s\n", z90crypt_VERSION, z90crypt_RELEASE, z90crypt_VARIANT, __DATE__, __TIME__); - PRINTKN("%s\n", z90cmain_version); - PRINTKN("%s\n", z90chardware_version); + PRINTKN("%s\n", z90main_version); + PRINTKN("%s\n", z90hardware_version); PDEBUG("create_z90crypt (domain index %d) successful.\n", domain); } else @@ -2372,7 +2372,7 @@ break; } if (dev_ptr->dev_self_x != index) { - PRINTK("Corrupt dev ptr in receive_from_AP\n"); + PRINTKC("Corrupt dev ptr\n"); z90crypt.terminating = 1; rv = REC_FATAL_ERROR; break; diff -Nru a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c --- a/drivers/s390/scsi/zfcp_aux.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/s390/scsi/zfcp_aux.c 2004-11-29 21:22:08 -08:00 @@ -29,8 +29,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* this drivers version (do not edit !!! generated and updated by cvs) */ -#define ZFCP_AUX_REVISION "$Revision: 1.135 $" +#define ZFCP_AUX_REVISION "$Revision: 1.145 $" #include "zfcp_ext.h" @@ -46,7 +45,6 @@ static void zfcp_ns_gid_pn_handler(unsigned long); /* miscellaneous */ - static inline int zfcp_sg_list_alloc(struct zfcp_sg_list *, size_t); static inline void zfcp_sg_list_free(struct zfcp_sg_list *); static inline int zfcp_sg_list_copy_from_user(struct zfcp_sg_list *, @@ -61,7 +59,7 @@ #define ZFCP_CFDC_IOC \ _IOWR(ZFCP_CFDC_IOC_MAGIC, 0, struct zfcp_cfdc_sense_data) -#ifdef CONFIG_S390_SUPPORT +#ifdef CONFIG_COMPAT static struct ioctl_trans zfcp_ioctl_trans = {ZFCP_CFDC_IOC, (void*) sys_ioctl}; #endif @@ -147,7 +145,7 @@ int i; unsigned long flags; - write_lock_irqsave(&adapter->cmd_dbf_lock, flags); + spin_lock_irqsave(&adapter->dbf_lock, flags); if (zfcp_fsf_req_is_scsi_cmnd(fsf_req)) { scsi_cmnd = fsf_req->data.send_fcp_command_task.scsi_cmnd; debug_text_event(adapter->cmd_dbf, level, "fsferror"); @@ -166,7 +164,7 @@ (char *) add_data + i, min(ZFCP_CMD_DBF_LENGTH, add_length - i)); } - write_unlock_irqrestore(&adapter->cmd_dbf_lock, flags); + spin_unlock_irqrestore(&adapter->dbf_lock, flags); } /* XXX additionally log unit if available */ @@ -183,7 +181,7 @@ adapter = (struct zfcp_adapter *) scsi_cmnd->device->host->hostdata[0]; req_data = (union zfcp_req_data *) scsi_cmnd->host_scribble; fsf_req = (req_data ? req_data->send_fcp_command_task.fsf_req : NULL); - write_lock_irqsave(&adapter->cmd_dbf_lock, flags); + spin_lock_irqsave(&adapter->dbf_lock, flags); debug_text_event(adapter->cmd_dbf, level, "hostbyte"); debug_text_event(adapter->cmd_dbf, level, text); debug_event(adapter->cmd_dbf, level, &scsi_cmnd->result, sizeof (u32)); @@ -200,7 +198,7 @@ debug_text_event(adapter->cmd_dbf, level, ""); debug_text_event(adapter->cmd_dbf, level, ""); } - write_unlock_irqrestore(&adapter->cmd_dbf_lock, flags); + spin_unlock_irqrestore(&adapter->dbf_lock, flags); } void @@ -280,7 +278,7 @@ goto out_unit; up(&zfcp_data.config_sema); ccw_device_set_online(adapter->ccw_device); - wait_event(unit->scsi_add_wq, atomic_read(&unit->scsi_add_work) == 0); + zfcp_erp_wait(adapter); down(&zfcp_data.config_sema); zfcp_unit_put(unit); out_unit: @@ -310,14 +308,13 @@ if (!zfcp_transport_template) return -ENODEV; -#ifdef CONFIG_S390_SUPPORT retval = register_ioctl32_conversion(zfcp_ioctl_trans.cmd, zfcp_ioctl_trans.handler); if (retval != 0) { ZFCP_LOG_INFO("registration of ioctl32 conversion failed\n"); - goto out_ioctl32; + goto out; } -#endif + retval = misc_register(&zfcp_cfdc_misc); if (retval != 0) { ZFCP_LOG_INFO("registration of misc device " @@ -352,11 +349,7 @@ out_ccw_register: misc_deregister(&zfcp_cfdc_misc); out_misc_register: -#ifdef CONFIG_S390_SUPPORT unregister_ioctl32_conversion(zfcp_ioctl_trans.cmd); - out_ioctl32: -#endif - out: return retval; } @@ -868,7 +861,6 @@ return NULL; memset(unit, 0, sizeof (struct zfcp_unit)); - init_waitqueue_head(&unit->scsi_add_wq); /* initialise reference count stuff */ atomic_set(&unit->refcount, 0); init_waitqueue_head(&unit->remove_wq); @@ -1042,11 +1034,11 @@ char dbf_name[20]; /* debug feature area which records SCSI command failures (hostbyte) */ - rwlock_init(&adapter->cmd_dbf_lock); + spin_lock_init(&adapter->dbf_lock); + sprintf(dbf_name, ZFCP_CMD_DBF_NAME "%s", zfcp_get_busid_by_adapter(adapter)); - adapter->cmd_dbf = debug_register(dbf_name, - ZFCP_CMD_DBF_INDEX, + adapter->cmd_dbf = debug_register(dbf_name, ZFCP_CMD_DBF_INDEX, ZFCP_CMD_DBF_AREAS, ZFCP_CMD_DBF_LENGTH); debug_register_view(adapter->cmd_dbf, &debug_hex_ascii_view); @@ -1055,40 +1047,38 @@ /* debug feature area which records SCSI command aborts */ sprintf(dbf_name, ZFCP_ABORT_DBF_NAME "%s", zfcp_get_busid_by_adapter(adapter)); - adapter->abort_dbf = debug_register(dbf_name, - ZFCP_ABORT_DBF_INDEX, + adapter->abort_dbf = debug_register(dbf_name, ZFCP_ABORT_DBF_INDEX, ZFCP_ABORT_DBF_AREAS, ZFCP_ABORT_DBF_LENGTH); debug_register_view(adapter->abort_dbf, &debug_hex_ascii_view); debug_set_level(adapter->abort_dbf, ZFCP_ABORT_DBF_LEVEL); - /* debug feature area which records SCSI command aborts */ + /* debug feature area which records incoming ELS commands */ sprintf(dbf_name, ZFCP_IN_ELS_DBF_NAME "%s", zfcp_get_busid_by_adapter(adapter)); - adapter->in_els_dbf = debug_register(dbf_name, - ZFCP_IN_ELS_DBF_INDEX, + adapter->in_els_dbf = debug_register(dbf_name, ZFCP_IN_ELS_DBF_INDEX, ZFCP_IN_ELS_DBF_AREAS, ZFCP_IN_ELS_DBF_LENGTH); debug_register_view(adapter->in_els_dbf, &debug_hex_ascii_view); debug_set_level(adapter->in_els_dbf, ZFCP_IN_ELS_DBF_LEVEL); - /* debug feature area which records erp events */ sprintf(dbf_name, ZFCP_ERP_DBF_NAME "%s", zfcp_get_busid_by_adapter(adapter)); - adapter->erp_dbf = debug_register(dbf_name, - ZFCP_ERP_DBF_INDEX, + adapter->erp_dbf = debug_register(dbf_name, ZFCP_ERP_DBF_INDEX, ZFCP_ERP_DBF_AREAS, ZFCP_ERP_DBF_LENGTH); debug_register_view(adapter->erp_dbf, &debug_hex_ascii_view); debug_set_level(adapter->erp_dbf, ZFCP_ERP_DBF_LEVEL); - if (adapter->cmd_dbf && adapter->abort_dbf && - adapter->in_els_dbf && adapter->erp_dbf) - return 0; + if (!(adapter->cmd_dbf && adapter->abort_dbf && + adapter->in_els_dbf && adapter->erp_dbf)) { + zfcp_adapter_debug_unregister(adapter); + return -ENOMEM; + } + + return 0; - zfcp_adapter_debug_unregister(adapter); - return -ENOMEM; } /** @@ -1098,10 +1088,14 @@ void zfcp_adapter_debug_unregister(struct zfcp_adapter *adapter) { - debug_unregister(adapter->erp_dbf); - debug_unregister(adapter->cmd_dbf); - debug_unregister(adapter->abort_dbf); - debug_unregister(adapter->in_els_dbf); + debug_unregister(adapter->abort_dbf); + debug_unregister(adapter->cmd_dbf); + debug_unregister(adapter->erp_dbf); + debug_unregister(adapter->in_els_dbf); + adapter->abort_dbf = NULL; + adapter->cmd_dbf = NULL; + adapter->erp_dbf = NULL; + adapter->in_els_dbf = NULL; } void @@ -1654,7 +1648,6 @@ zfcp_fsf_incoming_els_rscn(adapter, status_buffer); else zfcp_fsf_incoming_els_unknown(adapter, status_buffer); - } diff -Nru a/drivers/s390/scsi/zfcp_ccw.c b/drivers/s390/scsi/zfcp_ccw.c --- a/drivers/s390/scsi/zfcp_ccw.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/s390/scsi/zfcp_ccw.c 2004-11-29 21:22:07 -08:00 @@ -27,7 +27,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#define ZFCP_CCW_C_REVISION "$Revision: 1.57 $" +#define ZFCP_CCW_C_REVISION "$Revision: 1.58 $" #include "zfcp_ext.h" @@ -302,9 +302,11 @@ { struct zfcp_adapter *adapter; + down(&zfcp_data.config_sema); adapter = dev_get_drvdata(dev); zfcp_erp_adapter_shutdown(adapter, 0); zfcp_erp_wait(adapter); + up(&zfcp_data.config_sema); } #undef ZFCP_LOG_AREA diff -Nru a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h --- a/drivers/s390/scsi/zfcp_def.h 2004-11-29 21:22:07 -08:00 +++ b/drivers/s390/scsi/zfcp_def.h 2004-11-29 21:22:07 -08:00 @@ -13,6 +13,7 @@ * Stefan Bader * Heiko Carstens * Andreas Herrmann + * Volker Sameske * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -34,7 +35,7 @@ #define ZFCP_DEF_H /* this drivers version (do not edit !!! generated and updated by cvs) */ -#define ZFCP_DEF_REVISION "$Revision: 1.98 $" +#define ZFCP_DEF_REVISION "$Revision: 1.110 $" /*************************** INCLUDES *****************************************/ @@ -61,9 +62,7 @@ #include #include #include -#ifdef CONFIG_S390_SUPPORT #include -#endif /************************ DEBUG FLAGS *****************************************/ @@ -71,8 +70,7 @@ /********************* GENERAL DEFINES *********************************/ -/* zfcp version number, it consists of major, minor, and patch-level number */ -#define ZFCP_VERSION "4.1.4" +#define ZFCP_VERSION "4.2.0" /** * zfcp_sg_to_address - determine kernel address from struct scatterlist @@ -290,11 +288,11 @@ #define R_A_TOV 10 /* seconds */ #define ZFCP_ELS_TIMEOUT (2 * R_A_TOV) -#define ZFCP_LS_RTV 0x0E -#define ZFCP_LS_RLS 0x0F -#define ZFCP_LS_PDISC 0x50 +#define ZFCP_LS_RLS 0x0f #define ZFCP_LS_ADISC 0x52 -#define ZFCP_LS_RTV_E_D_TOV_FLAG 0x04000000 +#define ZFCP_LS_RPS 0x56 +#define ZFCP_LS_RSCN 0x61 +#define ZFCP_LS_RNID 0x78 struct zfcp_ls_rjt_par { u8 action; @@ -303,82 +301,22 @@ u8 vendor_unique; } __attribute__ ((packed)); -struct zfcp_ls_rtv { - u8 code; - u8 field[3]; -} __attribute__ ((packed)); - -struct zfcp_ls_rtv_acc { - u8 code; - u8 field[3]; - u32 r_a_tov; - u32 e_d_tov; - u32 qualifier; -} __attribute__ ((packed)); - -struct zfcp_ls_rls { - u8 code; - u8 field[3]; - fc_id_t port_id; -} __attribute__ ((packed)); - -struct zfcp_ls_rls_acc { - u8 code; - u8 field[3]; - u32 link_failure_count; - u32 loss_of_sync_count; - u32 loss_of_signal_count; - u32 prim_seq_prot_error; - u32 invalid_transmition_word; - u32 invalid_crc_count; -} __attribute__ ((packed)); - -struct zfcp_ls_pdisc { - u8 code; - u8 field[3]; - u8 common_svc_parm[16]; - wwn_t wwpn; - wwn_t wwnn; - struct { - u8 class1[16]; - u8 class2[16]; - u8 class3[16]; - } svc_parm; - u8 reserved[16]; - u8 vendor_version[16]; -} __attribute__ ((packed)); - -struct zfcp_ls_pdisc_acc { - u8 code; - u8 field[3]; - u8 common_svc_parm[16]; - wwn_t wwpn; - wwn_t wwnn; - struct { - u8 class1[16]; - u8 class2[16]; - u8 class3[16]; - } svc_parm; - u8 reserved[16]; - u8 vendor_version[16]; -} __attribute__ ((packed)); - struct zfcp_ls_adisc { u8 code; u8 field[3]; - fc_id_t hard_nport_id; - wwn_t wwpn; - wwn_t wwnn; - fc_id_t nport_id; + u32 hard_nport_id; + u64 wwpn; + u64 wwnn; + u32 nport_id; } __attribute__ ((packed)); struct zfcp_ls_adisc_acc { u8 code; u8 field[3]; - fc_id_t hard_nport_id; - wwn_t wwpn; - wwn_t wwnn; - fc_id_t nport_id; + u32 hard_nport_id; + u64 wwpn; + u64 wwnn; + u32 nport_id; } __attribute__ ((packed)); struct zfcp_rc_entry { @@ -441,6 +379,9 @@ #define ZFCP_NAME "zfcp" +/* read-only LUN sharing switch initial value */ +#define ZFCP_RO_LUN_SHARING_DEFAULTS 0 + /* independent log areas */ #define ZFCP_LOG_AREA_OTHER 0 #define ZFCP_LOG_AREA_SCSI 1 @@ -490,7 +431,7 @@ /* logging routine for zfcp */ #define _ZFCP_LOG(fmt, args...) \ printk(KERN_ERR ZFCP_NAME": %s(%d): " fmt, __FUNCTION__, \ - __LINE__ , ##args); + __LINE__ , ##args) #define ZFCP_LOG(level, fmt, args...) \ do { \ @@ -549,8 +490,8 @@ * Note, the leftmost status byte is common among adapter, port * and unit */ -#define ZFCP_COMMON_FLAGS 0xff000000 -#define ZFCP_SPECIFIC_FLAGS 0x00ffffff +#define ZFCP_COMMON_FLAGS 0xfff00000 +#define ZFCP_SPECIFIC_FLAGS 0x000fffff /* common status bits */ #define ZFCP_STATUS_COMMON_REMOVE 0x80000000 @@ -561,6 +502,7 @@ #define ZFCP_STATUS_COMMON_OPEN 0x04000000 #define ZFCP_STATUS_COMMON_CLOSING 0x02000000 #define ZFCP_STATUS_COMMON_ERP_INUSE 0x01000000 +#define ZFCP_STATUS_COMMON_ACCESS_DENIED 0x00800000 /* adapter status */ #define ZFCP_STATUS_ADAPTER_QDIOUP 0x00000002 @@ -591,6 +533,7 @@ #define ZFCP_STATUS_PORT_NO_WWPN 0x00000008 #define ZFCP_STATUS_PORT_NO_SCSI_ID 0x00000010 #define ZFCP_STATUS_PORT_INVALID_WWPN 0x00000020 +#define ZFCP_STATUS_PORT_ACCESS_DENIED 0x00000040 /* for ports with well known addresses */ #define ZFCP_STATUS_PORT_WKA \ @@ -598,9 +541,10 @@ ZFCP_STATUS_PORT_NO_SCSI_ID) /* logical unit status */ -#define ZFCP_STATUS_UNIT_NOTSUPPUNITRESET 0x00000001 -#define ZFCP_STATUS_UNIT_TEMPORARY 0x00000010 - +#define ZFCP_STATUS_UNIT_NOTSUPPUNITRESET 0x00000001 +#define ZFCP_STATUS_UNIT_TEMPORARY 0x00000002 +#define ZFCP_STATUS_UNIT_SHARED 0x00000004 +#define ZFCP_STATUS_UNIT_READONLY 0x00000008 /* FSF request status (this does not have a common part) */ #define ZFCP_STATUS_FSFREQ_NOT_INIT 0x00000000 @@ -956,7 +900,7 @@ debug_info_t *abort_dbf; debug_info_t *in_els_dbf; debug_info_t *cmd_dbf; - rwlock_t cmd_dbf_lock; + spinlock_t dbf_lock; struct zfcp_adapter_mempool pool; /* Adapter memory pools */ struct qdio_initialize qdio_init_data; /* for qdio_establish */ struct device generic_services; /* directory for WKA ports */ @@ -1006,8 +950,6 @@ struct scsi_device *device; /* scsi device struct pointer */ struct zfcp_erp_action erp_action; /* pending error recovery */ atomic_t erp_counter; - atomic_t scsi_add_work; /* used to synchronize */ - wait_queue_head_t scsi_add_wq; /* wait for scsi_add_device */ }; /* FSF request */ diff -Nru a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c --- a/drivers/s390/scsi/zfcp_erp.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/s390/scsi/zfcp_erp.c 2004-11-29 21:22:06 -08:00 @@ -32,12 +32,12 @@ #define ZFCP_LOG_AREA ZFCP_LOG_AREA_ERP /* this drivers version (do not edit !!! generated and updated by cvs) */ -#define ZFCP_ERP_REVISION "$Revision: 1.69 $" +#define ZFCP_ERP_REVISION "$Revision: 1.83 $" #include "zfcp_ext.h" -static int zfcp_els(struct zfcp_port *, u8); -static void zfcp_els_handler(unsigned long); +static int zfcp_erp_adisc(struct zfcp_adapter *, fc_id_t); +static void zfcp_erp_adisc_handler(unsigned long); static int zfcp_erp_adapter_reopen_internal(struct zfcp_adapter *, int); static int zfcp_erp_port_forced_reopen_internal(struct zfcp_port *, int); @@ -294,162 +294,125 @@ } -/* - * function: zfcp_els - * - * purpose: Originator of the ELS commands - * - * returns: 0 - Operation completed successfuly - * -EINVAL - Unknown IOCTL command or invalid sense data record - * -ENOMEM - Insufficient memory - * -EPERM - Cannot create or queue FSF request +/** + * zfcp_erp_adisc - send ADISC ELS command + * @adapter: adapter structure + * @d_id: d_id of port where ADISC is sent to */ int -zfcp_els(struct zfcp_port *port, u8 ls_code) +zfcp_erp_adisc(struct zfcp_adapter *adapter, fc_id_t d_id) { struct zfcp_send_els *send_els; - struct zfcp_ls_rls *rls; - struct zfcp_ls_pdisc *pdisc; struct zfcp_ls_adisc *adisc; - struct page *page = NULL; - void *req; + void *address = NULL; int retval = 0; + struct timer_list *timer; send_els = kmalloc(sizeof(struct zfcp_send_els), GFP_ATOMIC); if (send_els == NULL) goto nomem; + memset(send_els, 0, sizeof(*send_els)); send_els->req = kmalloc(sizeof(struct scatterlist), GFP_ATOMIC); if (send_els->req == NULL) goto nomem; - send_els->req_count = 1; + memset(send_els->req, 0, sizeof(*send_els->req)); send_els->resp = kmalloc(sizeof(struct scatterlist), GFP_ATOMIC); if (send_els->resp == NULL) goto nomem; - send_els->resp_count = 1; + memset(send_els->resp, 0, sizeof(*send_els->resp)); - page = alloc_pages(GFP_ATOMIC, 0); - if (page == NULL) + address = (void *) get_zeroed_page(GFP_ATOMIC); + if (address == NULL) goto nomem; - send_els->req->page = page; - send_els->resp->page = page; - send_els->req->offset = 0; - send_els->resp->offset = PAGE_SIZE >> 1; - - send_els->adapter = port->adapter; - send_els->d_id = port->d_id; - send_els->ls_code = ls_code; - send_els->handler = zfcp_els_handler; - send_els->handler_data = (unsigned long)send_els; - send_els->completion = NULL; - - req = zfcp_sg_to_address(send_els->req); - memset(req, 0, PAGE_SIZE); - - *(u32*)req = 0; - *(u8*)req = ls_code; - - switch (ls_code) { - - case ZFCP_LS_RTV: - send_els->req->length = sizeof(struct zfcp_ls_rtv); - send_els->resp->length = sizeof(struct zfcp_ls_rtv_acc); - ZFCP_LOG_INFO("RTV request from s_id 0x%08x to d_id 0x%08x\n", - port->adapter->s_id, port->d_id); - break; - - case ZFCP_LS_RLS: - send_els->req->length = sizeof(struct zfcp_ls_rls); - send_els->resp->length = sizeof(struct zfcp_ls_rls_acc); - rls = (struct zfcp_ls_rls*)req; - rls->port_id = port->adapter->s_id; - ZFCP_LOG_INFO("RLS request from s_id 0x%08x to d_id 0x%08x " - "(port_id=0x%08x)\n", - port->adapter->s_id, port->d_id, rls->port_id); - break; - - case ZFCP_LS_PDISC: - send_els->req->length = sizeof(struct zfcp_ls_pdisc); - send_els->resp->length = sizeof(struct zfcp_ls_pdisc_acc); - pdisc = (struct zfcp_ls_pdisc*)req; - pdisc->wwpn = port->adapter->wwpn; - pdisc->wwnn = port->adapter->wwnn; - ZFCP_LOG_INFO("PDISC request from s_id 0x%08x to d_id 0x%08x " - "(wwpn=0x%016Lx, wwnn=0x%016Lx)\n", - port->adapter->s_id, port->d_id, - pdisc->wwpn, pdisc->wwnn); - break; - - case ZFCP_LS_ADISC: - send_els->req->length = sizeof(struct zfcp_ls_adisc); - send_els->resp->length = sizeof(struct zfcp_ls_adisc_acc); - adisc = (struct zfcp_ls_adisc*)req; - adisc->hard_nport_id = port->adapter->s_id; - adisc->wwpn = port->adapter->wwpn; - adisc->wwnn = port->adapter->wwnn; - adisc->nport_id = port->adapter->s_id; - ZFCP_LOG_INFO("ADISC request from s_id 0x%08x to d_id 0x%08x " - "(wwpn=0x%016Lx, wwnn=0x%016Lx, " - "hard_nport_id=0x%08x, nport_id=0x%08x)\n", - port->adapter->s_id, port->d_id, - adisc->wwpn, adisc->wwnn, - adisc->hard_nport_id, adisc->nport_id); - break; - default: - ZFCP_LOG_NORMAL("ELS command code 0x%02x is not supported\n", - ls_code); - retval = -EINVAL; - goto invalid_ls_code; - } + zfcp_address_to_sg(address, send_els->req); + address += PAGE_SIZE >> 1; + zfcp_address_to_sg(address, send_els->resp); + send_els->req_count = send_els->resp_count = 1; + + send_els->adapter = adapter; + send_els->d_id = d_id; + send_els->handler = zfcp_erp_adisc_handler; + send_els->handler_data = (unsigned long) send_els; + + adisc = zfcp_sg_to_address(send_els->req); + send_els->ls_code = adisc->code = ZFCP_LS_ADISC; + + send_els->req->length = sizeof(struct zfcp_ls_adisc); + send_els->resp->length = sizeof(struct zfcp_ls_adisc_acc); + + /* acc. to FC-FS, hard_nport_id in ADISC should not be set for ports + without FC-AL-2 capability, so we don't set it */ + adisc->wwpn = adapter->wwpn; + adisc->wwnn = adapter->wwnn; + adisc->nport_id = adapter->s_id; + ZFCP_LOG_INFO("ADISC request from s_id 0x%08x to d_id 0x%08x " + "(wwpn=0x%016Lx, wwnn=0x%016Lx, " + "hard_nport_id=0x%08x, nport_id=0x%08x)\n", + adapter->s_id, d_id, (wwn_t) adisc->wwpn, + (wwn_t) adisc->wwnn, adisc->hard_nport_id, + adisc->nport_id); + + timer = kmalloc(sizeof(struct timer_list), GFP_ATOMIC); + if (!timer) + goto nomem; + + init_timer(timer); + timer->function = zfcp_fsf_request_timeout_handler; + timer->data = (unsigned long) adapter; + timer->expires = ZFCP_FSF_REQUEST_TIMEOUT; + send_els->timer = timer; retval = zfcp_fsf_send_els(send_els); if (retval != 0) { ZFCP_LOG_NORMAL("error: initiation of Send ELS failed for port " - "0x%016Lx on adapter %s\n", - port->wwpn, zfcp_get_busid_by_port(port)); - retval = -EPERM; + "0x%08x on adapter %s\n", d_id, + zfcp_get_busid_by_adapter(adapter)); + del_timer_sync(send_els->timer); + goto freemem; } goto out; -nomem: - ZFCP_LOG_DEBUG("out of memory\n"); + nomem: retval = -ENOMEM; - -invalid_ls_code: - if (page != NULL) - __free_pages(page, 0); + freemem: + if (address != NULL) + __free_pages(send_els->req->page, 0); if (send_els != NULL) { - if (send_els->req != NULL) - kfree(send_els->req); - if (send_els->resp != NULL) - kfree(send_els->resp); + kfree(send_els->timer); + kfree(send_els->req); + kfree(send_els->resp); kfree(send_els); } - -out: + out: return retval; } /** - * zfcp_els_handler - handler for ELS commands + * zfcp_erp_adisc_handler - handler for ADISC ELS command * @data: pointer to struct zfcp_send_els - * If ELS failed (LS_RJT or timed out) forced reopen of the port is triggered. + * + * If ADISC failed (LS_RJT or timed out) forced reopen of the port is triggered. */ void -zfcp_els_handler(unsigned long data) +zfcp_erp_adisc_handler(unsigned long data) { - struct zfcp_send_els *send_els = (struct zfcp_send_els*)data; + struct zfcp_send_els *send_els; struct zfcp_port *port; - struct zfcp_ls_rtv_acc *rtv; - struct zfcp_ls_rls_acc *rls; - struct zfcp_ls_pdisc_acc *pdisc; + struct zfcp_adapter *adapter; + fc_id_t d_id; struct zfcp_ls_adisc_acc *adisc; - void *req, *resp; - u8 req_code; + + send_els = (struct zfcp_send_els *) data; + + del_timer(send_els->timer); + + adapter = send_els->adapter; + d_id = send_els->d_id; read_lock(&zfcp_data.config_lock); port = zfcp_get_port_by_did(send_els->adapter, send_els->d_id); @@ -459,91 +422,60 @@ /* request rejected or timed out */ if (send_els->status != 0) { - ZFCP_LOG_NORMAL("ELS request timed out, force physical port " - "reopen of port 0x%016Lx on adapter %s\n", - port->wwpn, zfcp_get_busid_by_port(port)); - debug_text_event(port->adapter->erp_dbf, 3, "forcreop"); + ZFCP_LOG_NORMAL("ELS request rejected/timed out, " + "force physical port reopen " + "(adapter %s, port d_id=0x%08x)\n", + zfcp_get_busid_by_adapter(adapter), d_id); + debug_text_event(adapter->erp_dbf, 3, "forcreop"); if (zfcp_erp_port_forced_reopen(port, 0)) - ZFCP_LOG_NORMAL("reopen of remote port 0x%016Lx " - "on adapter %s failed\n", port->wwpn, - zfcp_get_busid_by_port(port)); + ZFCP_LOG_NORMAL("failed reopen of port " + "(adapter %s, wwpn=0x%016Lx)\n", + zfcp_get_busid_by_port(port), + port->wwpn); goto out; } - req = zfcp_sg_to_address(send_els->req); - resp = zfcp_sg_to_address(send_els->resp); - req_code = *(u8*)req; - - switch (req_code) { - - case ZFCP_LS_RTV: - rtv = (struct zfcp_ls_rtv_acc*)resp; - ZFCP_LOG_INFO("RTV response from d_id 0x%08x to s_id " - "0x%08x (R_A_TOV=%ds E_D_TOV=%d%cs)\n", - port->d_id, port->adapter->s_id, - rtv->r_a_tov, rtv->e_d_tov, - rtv->qualifier & - ZFCP_LS_RTV_E_D_TOV_FLAG ? 'n' : 'm'); - break; - - case ZFCP_LS_RLS: - rls = (struct zfcp_ls_rls_acc*)resp; - ZFCP_LOG_INFO("RLS response from d_id 0x%08x to s_id " - "0x%08x (link_failure_count=%u, " - "loss_of_sync_count=%u, " - "loss_of_signal_count=%u, " - "primitive_sequence_protocol_error=%u, " - "invalid_transmition_word=%u, " - "invalid_crc_count=%u)\n", - port->d_id, port->adapter->s_id, - rls->link_failure_count, - rls->loss_of_sync_count, - rls->loss_of_signal_count, - rls->prim_seq_prot_error, - rls->invalid_transmition_word, - rls->invalid_crc_count); - break; - - case ZFCP_LS_PDISC: - pdisc = (struct zfcp_ls_pdisc_acc*)resp; - ZFCP_LOG_INFO("PDISC response from d_id 0x%08x to s_id " - "0x%08x (wwpn=0x%016Lx, wwnn=0x%016Lx, " - "vendor='%-16s')\n", port->d_id, - port->adapter->s_id, pdisc->wwpn, - pdisc->wwnn, pdisc->vendor_version); - break; - - case ZFCP_LS_ADISC: - adisc = (struct zfcp_ls_adisc_acc*)resp; - ZFCP_LOG_INFO("ADISC response from d_id 0x%08x to s_id " - "0x%08x (wwpn=0x%016Lx, wwnn=0x%016Lx, " - "hard_nport_id=0x%08x, " - "nport_id=0x%08x)\n", port->d_id, - port->adapter->s_id, adisc->wwpn, - adisc->wwnn, adisc->hard_nport_id, - adisc->nport_id); - /* FIXME: set wwnn in during open port */ - if (port->wwnn == 0) - port->wwnn = adisc->wwnn; - break; + adisc = zfcp_sg_to_address(send_els->resp); + + ZFCP_LOG_INFO("ADISC response from d_id 0x%08x to s_id " + "0x%08x (wwpn=0x%016Lx, wwnn=0x%016Lx, " + "hard_nport_id=0x%08x, nport_id=0x%08x)\n", + d_id, adapter->s_id, (wwn_t) adisc->wwpn, + (wwn_t) adisc->wwnn, adisc->hard_nport_id, + adisc->nport_id); + + /* set wwnn for port */ + if (port->wwnn == 0) + port->wwnn = adisc->wwnn; + + if (port->wwpn != adisc->wwpn) { + ZFCP_LOG_NORMAL("d_id assignment changed, reopening " + "port (adapter %s, wwpn=0x%016Lx, " + "adisc_resp_wwpn=0x%016Lx)\n", + zfcp_get_busid_by_port(port), + port->wwpn, (wwn_t) adisc->wwpn); + if (zfcp_erp_port_reopen(port, 0)) + ZFCP_LOG_NORMAL("failed reopen of port " + "(adapter %s, wwpn=0x%016Lx)\n", + zfcp_get_busid_by_port(port), + port->wwpn); } out: zfcp_port_put(port); __free_pages(send_els->req->page, 0); + kfree(send_els->timer); kfree(send_els->req); kfree(send_els->resp); kfree(send_els); } -/* - * function: zfcp_test_link - * - * purpose: Test a status of a link to a remote port using the ELS command ADISC +/** + * zfcp_test_link - lightweight link test procedure + * @port: port to be tested * - * returns: 0 - Link is OK - * -EPERM - Port forced reopen failed + * Test status of a link to a remote port using the ELS command ADISC. */ int zfcp_test_link(struct zfcp_port *port) @@ -551,7 +483,7 @@ int retval; zfcp_port_get(port); - retval = zfcp_els(port, ZFCP_LS_ADISC); + retval = zfcp_erp_adisc(port->adapter, port->d_id); if (retval != 0) { zfcp_port_put(port); ZFCP_LOG_NORMAL("reopen needed for port 0x%016Lx " @@ -1541,8 +1473,14 @@ zfcp_erp_modify_port_status(port, ZFCP_STATUS_COMMON_ERP_FAILED, ZFCP_SET); - ZFCP_LOG_NORMAL("port erp failed on port 0x%016Lx on adapter %s\n", - port->wwpn, zfcp_get_busid_by_port(port)); + if (atomic_test_mask(ZFCP_STATUS_PORT_WKA, &port->status)) + ZFCP_LOG_NORMAL("port erp failed (adapter %s, " + "port d_id=0x%08x)\n", + zfcp_get_busid_by_port(port), port->d_id); + else + ZFCP_LOG_NORMAL("port erp failed (adapter %s, wwpn=0x%016Lx)\n", + zfcp_get_busid_by_port(port), port->wwpn); + debug_text_event(port->adapter->erp_dbf, 2, "p_pfail"); debug_event(port->adapter->erp_dbf, 2, &port->wwpn, sizeof (wwn_t)); } @@ -1678,63 +1616,6 @@ !(ZFCP_STATUS_ERP_CLOSE_ONLY & erp_status)); } -/** - * zfcp_erp_scsi_add_device - * @data: pointer to a struct zfcp_unit - * - * Registers a logical unit with the SCSI stack. - */ -static void -zfcp_erp_scsi_add_device(void *data) -{ - struct { - struct zfcp_unit *unit; - struct work_struct work; - } *p; - - p = data; - scsi_add_device(p->unit->port->adapter->scsi_host, - 0, p->unit->port->scsi_id, p->unit->scsi_lun); - atomic_set(&p->unit->scsi_add_work, 0); - wake_up(&p->unit->scsi_add_wq); - zfcp_unit_put(p->unit); - kfree(p); -} - -/** - * zfcp_erp_schedule_work - * @unit: pointer to unit which should be registered with SCSI stack - * - * Schedules work which registers a unit with the SCSI stack - */ -static int -zfcp_erp_schedule_work(struct zfcp_unit *unit) -{ - struct { - struct zfcp_unit * unit; - struct work_struct work; - } *p; - - if (atomic_compare_and_swap(0, 1, &unit->scsi_add_work)) - return 0; - - if ((p = kmalloc(sizeof(*p), GFP_KERNEL)) == NULL) { - ZFCP_LOG_NORMAL("error: registration at SCSI stack failed for " - "unit 0x%016Lx on port 0x%016Lx on " - "adapter %s\n", unit->fcp_lun, unit->port->wwpn, - zfcp_get_busid_by_unit(unit)); - atomic_set(&unit->scsi_add_work, 0); - return -ENOMEM; - } - - zfcp_unit_get(unit); - memset(p, 0, sizeof(*p)); - INIT_WORK(&p->work, zfcp_erp_scsi_add_device, p); - p->unit = unit; - schedule_work(&p->work); - return 0; -} - /* * function: * @@ -1904,34 +1785,22 @@ static int zfcp_erp_strategy_check_queues(struct zfcp_adapter *adapter) { - int retval = 0; unsigned long flags; - struct zfcp_port *nport = adapter->nameserver_port; read_lock_irqsave(&zfcp_data.config_lock, flags); read_lock(&adapter->erp_lock); if (list_empty(&adapter->erp_ready_head) && list_empty(&adapter->erp_running_head)) { - if (nport - && atomic_test_mask(ZFCP_STATUS_COMMON_OPEN, - &nport->status)) { - debug_text_event(adapter->erp_dbf, 4, "a_cq_nspsd"); - /* taking down nameserver port */ - zfcp_erp_port_reopen_internal(nport, - ZFCP_STATUS_COMMON_RUNNING | - ZFCP_STATUS_COMMON_ERP_FAILED); - } else { debug_text_event(adapter->erp_dbf, 4, "a_cq_wake"); atomic_clear_mask(ZFCP_STATUS_ADAPTER_ERP_PENDING, &adapter->status); wake_up(&adapter->erp_done_wqh); - } } else debug_text_event(adapter->erp_dbf, 5, "a_cq_notempty"); read_unlock(&adapter->erp_lock); read_unlock_irqrestore(&zfcp_data.config_lock, flags); - return retval; + return 0; } /** @@ -2717,10 +2586,13 @@ /* nameserver port may live again */ atomic_set_mask(ZFCP_STATUS_COMMON_RUNNING, &adapter->nameserver_port->status); - if (zfcp_erp_port_reopen(adapter->nameserver_port, 0) >= 0) { - erp_action->step = ZFCP_ERP_STEP_NAMESERVER_OPEN; + if (zfcp_erp_port_reopen(adapter->nameserver_port, 0) + >= 0) { + erp_action->step = + ZFCP_ERP_STEP_NAMESERVER_OPEN; retval = ZFCP_ERP_CONTINUES; - } else retval = ZFCP_ERP_FAILED; + } else + retval = ZFCP_ERP_FAILED; break; } /* else nameserver port is already open, fall through */ @@ -2924,9 +2796,11 @@ atomic_clear_mask(ZFCP_STATUS_COMMON_OPENING | ZFCP_STATUS_COMMON_CLOSING | + ZFCP_STATUS_COMMON_ACCESS_DENIED | ZFCP_STATUS_PORT_DID_DID | ZFCP_STATUS_PORT_PHYS_CLOSING | - ZFCP_STATUS_PORT_INVALID_WWPN, &port->status); + ZFCP_STATUS_PORT_INVALID_WWPN, + &port->status); return retval; } @@ -3130,7 +3004,11 @@ debug_event(adapter->erp_dbf, 5, &unit->fcp_lun, sizeof (fcp_lun_t)); atomic_clear_mask(ZFCP_STATUS_COMMON_OPENING | - ZFCP_STATUS_COMMON_CLOSING, &unit->status); + ZFCP_STATUS_COMMON_CLOSING | + ZFCP_STATUS_COMMON_ACCESS_DENIED | + ZFCP_STATUS_UNIT_SHARED | + ZFCP_STATUS_UNIT_READONLY, + &unit->status); return retval; } @@ -3467,9 +3345,11 @@ switch (action) { case ZFCP_ERP_ACTION_REOPEN_UNIT: if ((result == ZFCP_ERP_SUCCEEDED) - && (!atomic_test_mask(ZFCP_STATUS_UNIT_TEMPORARY, &unit->status)) + && (!atomic_test_mask(ZFCP_STATUS_UNIT_TEMPORARY, + &unit->status)) && (!unit->device)) - zfcp_erp_schedule_work(unit); + scsi_add_device(unit->port->adapter->scsi_host, 0, + unit->port->scsi_id, unit->scsi_lun); zfcp_unit_put(unit); break; case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED: @@ -3586,6 +3466,122 @@ debug_text_event(adapter->erp_dbf, 6, "a_tore"); debug_event(adapter->erp_dbf, 6, &erp_action->action, sizeof (int)); list_move(&erp_action->list, &erp_action->adapter->erp_ready_head); +} + +/* + * function: zfcp_erp_port_access_denied + * + * purpose: + */ +void +zfcp_erp_port_access_denied(struct zfcp_port *port) +{ + struct zfcp_adapter *adapter = port->adapter; + unsigned long flags; + + debug_text_event(adapter->erp_dbf, 3, "p_access_block"); + debug_event(adapter->erp_dbf, 3, &port->wwpn, sizeof(wwn_t)); + read_lock_irqsave(&zfcp_data.config_lock, flags); + zfcp_erp_modify_port_status(port, + ZFCP_STATUS_COMMON_ERP_FAILED | ZFCP_STATUS_COMMON_ACCESS_DENIED, + ZFCP_SET); + read_unlock_irqrestore(&zfcp_data.config_lock, flags); +} + +/* + * function: zfcp_erp_unit_access_denied + * + * purpose: + */ +void +zfcp_erp_unit_access_denied(struct zfcp_unit *unit) +{ + struct zfcp_adapter *adapter = unit->port->adapter; + + debug_text_event(adapter->erp_dbf, 3, "u_access_block"); + debug_event(adapter->erp_dbf, 3, &unit->fcp_lun, sizeof(fcp_lun_t)); + zfcp_erp_modify_unit_status(unit, + ZFCP_STATUS_COMMON_ERP_FAILED | ZFCP_STATUS_COMMON_ACCESS_DENIED, + ZFCP_SET); +} + +/* + * function: zfcp_erp_adapter_access_changed + * + * purpose: + */ +void +zfcp_erp_adapter_access_changed(struct zfcp_adapter *adapter) +{ + struct zfcp_port *port; + unsigned long flags; + + debug_text_event(adapter->erp_dbf, 3, "a_access_unblock"); + debug_event(adapter->erp_dbf, 3, &adapter->name, 8); + + zfcp_erp_port_access_changed(adapter->nameserver_port); + read_lock_irqsave(&zfcp_data.config_lock, flags); + list_for_each_entry(port, &adapter->port_list_head, list) + if (port != adapter->nameserver_port) + zfcp_erp_port_access_changed(port); + read_unlock_irqrestore(&zfcp_data.config_lock, flags); +} + +/* + * function: zfcp_erp_port_access_changed + * + * purpose: + */ +void +zfcp_erp_port_access_changed(struct zfcp_port *port) +{ + struct zfcp_adapter *adapter = port->adapter; + struct zfcp_unit *unit; + + debug_text_event(adapter->erp_dbf, 3, "p_access_unblock"); + debug_event(adapter->erp_dbf, 3, &port->wwpn, sizeof(wwn_t)); + + if (!atomic_test_mask(ZFCP_STATUS_COMMON_ACCESS_DENIED, &port->status)) { + if (!atomic_test_mask(ZFCP_STATUS_PORT_WKA, &port->status)) + list_for_each_entry(unit, &port->unit_list_head, list) + zfcp_erp_unit_access_changed(unit); + return; + } + + ZFCP_LOG_NORMAL("Trying to reopen port 0x%016Lx on adapter %s " + "due to update to access control table\n", + port->wwpn, zfcp_get_busid_by_adapter(adapter)); + if (zfcp_erp_port_reopen(port, ZFCP_STATUS_COMMON_ERP_FAILED) != 0) + ZFCP_LOG_NORMAL("Reopen of port 0x%016Lx on adapter %s failed\n", + port->wwpn, zfcp_get_busid_by_adapter(adapter)); +} + +/* + * function: zfcp_erp_unit_access_changed + * + * purpose: + */ +void +zfcp_erp_unit_access_changed(struct zfcp_unit *unit) +{ + struct zfcp_adapter *adapter = unit->port->adapter; + + debug_text_event(adapter->erp_dbf, 3, "u_access_unblock"); + debug_event(adapter->erp_dbf, 3, &unit->fcp_lun, sizeof(fcp_lun_t)); + + if (!atomic_test_mask(ZFCP_STATUS_COMMON_ACCESS_DENIED, &unit->status)) + return; + + ZFCP_LOG_NORMAL("Trying to reopen unit 0x%016Lx " + "on port 0x%016Lx on adapter %s " + "due to update to access control table\n", + unit->fcp_lun, unit->port->wwpn, + zfcp_get_busid_by_adapter(adapter)); + if (zfcp_erp_unit_reopen(unit, ZFCP_STATUS_COMMON_ERP_FAILED) != 0) + ZFCP_LOG_NORMAL("Reopen of unit 0x%016Lx " + "on port 0x%016Lx on adapter %s failed\n", + unit->fcp_lun, unit->port->wwpn, + zfcp_get_busid_by_adapter(adapter)); } #undef ZFCP_LOG_AREA diff -Nru a/drivers/s390/scsi/zfcp_ext.h b/drivers/s390/scsi/zfcp_ext.h --- a/drivers/s390/scsi/zfcp_ext.h 2004-11-29 21:22:07 -08:00 +++ b/drivers/s390/scsi/zfcp_ext.h 2004-11-29 21:22:07 -08:00 @@ -32,7 +32,7 @@ #ifndef ZFCP_EXT_H #define ZFCP_EXT_H /* this drivers version (do not edit !!! generated and updated by cvs) */ -#define ZFCP_EXT_REVISION "$Revision: 1.58 $" +#define ZFCP_EXT_REVISION "$Revision: 1.61 $" #include "zfcp_def.h" @@ -170,6 +170,12 @@ extern int zfcp_erp_async_handler(struct zfcp_erp_action *, unsigned long); extern int zfcp_test_link(struct zfcp_port *); + +extern void zfcp_erp_port_access_denied(struct zfcp_port *); +extern void zfcp_erp_unit_access_denied(struct zfcp_unit *); +extern void zfcp_erp_adapter_access_changed(struct zfcp_adapter *); +extern void zfcp_erp_port_access_changed(struct zfcp_port *); +extern void zfcp_erp_unit_access_changed(struct zfcp_unit *); /******************************** AUX ****************************************/ extern void zfcp_cmd_dbf_event_fsf(const char *, struct zfcp_fsf_req *, diff -Nru a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c --- a/drivers/s390/scsi/zfcp_fsf.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/s390/scsi/zfcp_fsf.c 2004-11-29 21:22:08 -08:00 @@ -13,6 +13,7 @@ * Stefan Bader * Heiko Carstens * Andreas Herrmann + * Volker Sameske * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -30,7 +31,7 @@ */ /* this drivers version (do not edit !!! generated and updated by cvs) */ -#define ZFCP_FSF_C_REVISION "$Revision: 1.76 $" +#define ZFCP_FSF_C_REVISION "$Revision: 1.86 $" #include "zfcp_ext.h" @@ -784,12 +785,12 @@ zfcp_fsf_exchange_config_data_handler(fsf_req); break; - case FSF_QTCB_EXCHANGE_PORT_DATA : + case FSF_QTCB_EXCHANGE_PORT_DATA: ZFCP_LOG_FLAGS(2, "FSF_QTCB_EXCHANGE_PORT_DATA\n"); zfcp_fsf_exchange_port_data_handler(fsf_req); break; - case FSF_QTCB_SEND_ELS : + case FSF_QTCB_SEND_ELS: ZFCP_LOG_FLAGS(2, "FSF_QTCB_SEND_ELS\n"); zfcp_fsf_send_els_handler(fsf_req); break; @@ -993,6 +994,15 @@ zfcp_fsf_incoming_els(fsf_req); break; + case FSF_STATUS_READ_SENSE_DATA_AVAIL: + ZFCP_LOG_FLAGS(1, "FSF_STATUS_READ_SENSE_DATA_AVAIL\n"); + debug_text_event(adapter->erp_dbf, 3, "unsol_sense:"); + ZFCP_LOG_INFO("unsolicited sense data received (adapter %s)\n", + zfcp_get_busid_by_adapter(adapter)); + ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL, (char *) status_buffer, + sizeof(struct fsf_status_read_buffer)); + break; + case FSF_STATUS_READ_BIT_ERROR_THRESHOLD: ZFCP_LOG_FLAGS(1, "FSF_STATUS_READ_BIT_ERROR_THRESHOLD\n"); debug_text_event(adapter->erp_dbf, 3, "unsol_bit_err:"); @@ -1025,7 +1035,6 @@ zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED | ZFCP_STATUS_COMMON_ERP_FAILED); - break; case FSF_STATUS_READ_CFDC_UPDATED: @@ -1033,6 +1042,7 @@ debug_text_event(adapter->erp_dbf, 2, "unsol_cfdc_update:"); ZFCP_LOG_INFO("CFDC has been updated on the adapter %s\n", zfcp_get_busid_by_adapter(adapter)); + zfcp_erp_adapter_access_changed(adapter); break; case FSF_STATUS_READ_CFDC_HARDENED: @@ -1290,6 +1300,22 @@ | ZFCP_STATUS_FSFREQ_RETRY; break; + case FSF_LUN_BOXED: + ZFCP_LOG_FLAGS(0, "FSF_LUN_BOXED\n"); + ZFCP_LOG_INFO( + "unit 0x%016Lx on port 0x%016Lx on adapter %s needs " + "to be reopened\n", + unit->fcp_lun, unit->port->wwpn, + zfcp_get_busid_by_unit(unit)); + debug_text_event(new_fsf_req->adapter->erp_dbf, 1, "fsf_s_lboxed"); + zfcp_erp_unit_reopen(unit, 0); + zfcp_cmd_dbf_event_fsf("unitbox", new_fsf_req, + &new_fsf_req->qtcb->header.fsf_status_qual, + sizeof(union fsf_status_qual)); + new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR + | ZFCP_STATUS_FSFREQ_RETRY; + break; + case FSF_ADAPTER_STATUS_AVAILABLE: /* 2 */ ZFCP_LOG_FLAGS(0, "FSF_ADAPTER_STATUS_AVAILABLE\n"); @@ -1521,20 +1547,18 @@ header = &fsf_req->qtcb->header; bottom = &fsf_req->qtcb->bottom.support; - if (fsf_req->status & ZFCP_STATUS_FSFREQ_ERROR) { - /* do not set ZFCP_STATUS_FSFREQ_ABORTSUCCEEDED */ + if (fsf_req->status & ZFCP_STATUS_FSFREQ_ERROR) goto skip_fsfstatus; - } /* evaluate FSF status in QTCB */ switch (header->fsf_status) { - case FSF_GOOD : + case FSF_GOOD: ZFCP_LOG_FLAGS(2,"FSF_GOOD\n"); retval = 0; break; - case FSF_SERVICE_CLASS_NOT_SUPPORTED : + case FSF_SERVICE_CLASS_NOT_SUPPORTED: ZFCP_LOG_FLAGS(2, "FSF_SERVICE_CLASS_NOT_SUPPORTED\n"); if (adapter->fc_service_class <= 3) { ZFCP_LOG_INFO("error: adapter %s does not support fc " @@ -1550,21 +1574,21 @@ } /* stop operation for this adapter */ debug_text_exception(adapter->erp_dbf, 0, "fsf_s_class_nsup"); - zfcp_erp_adapter_shutdown(port->adapter, 0); + zfcp_erp_adapter_shutdown(adapter, 0); fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; break; - case FSF_ADAPTER_STATUS_AVAILABLE : + case FSF_ADAPTER_STATUS_AVAILABLE: ZFCP_LOG_FLAGS(2, "FSF_ADAPTER_STATUS_AVAILABLE\n"); switch (header->fsf_status_qual.word[0]){ - case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE : + case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: ZFCP_LOG_FLAGS(2,"FSF_SQ_INVOKE_LINK_TEST_PROCEDURE\n"); /* reopening link to port */ debug_text_event(adapter->erp_dbf, 1, "fsf_sq_ltest"); zfcp_test_link(port); fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; break; - case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED : + case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED: ZFCP_LOG_FLAGS(2,"FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED\n"); /* ERP strategy will escalate */ debug_text_event(adapter->erp_dbf, 1, "fsf_sq_ulp"); @@ -1580,9 +1604,9 @@ case FSF_ACCESS_DENIED: ZFCP_LOG_FLAGS(2, "FSF_ACCESS_DENIED\n"); - ZFCP_LOG_NORMAL("Access denied, cannot send generic command " - "to port 0x%016Lx on adapter %s\n", port->wwpn, - zfcp_get_busid_by_port(port)); + ZFCP_LOG_NORMAL("access denied, cannot send generic service " + "command (adapter %s, port d_id=0x%08x)\n", + zfcp_get_busid_by_port(port), port->d_id); for (counter = 0; counter < 2; counter++) { subtable = header->fsf_status_qual.halfword[counter * 2]; rule = header->fsf_status_qual.halfword[counter * 2 + 1]; @@ -1596,15 +1620,16 @@ break; } } - debug_text_event(fsf_req->adapter->erp_dbf, 1, "fsf_s_access"); + debug_text_event(adapter->erp_dbf, 1, "fsf_s_access"); + zfcp_erp_port_access_denied(port); fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; break; - case FSF_GENERIC_COMMAND_REJECTED : + case FSF_GENERIC_COMMAND_REJECTED: ZFCP_LOG_FLAGS(2, "FSF_GENERIC_COMMAND_REJECTED\n"); - ZFCP_LOG_INFO("warning: The port 0x%016Lx on adapter %s has " - "rejected a generic services command.\n", - port->wwpn, zfcp_get_busid_by_port(port)); + ZFCP_LOG_INFO("generic service command rejected " + "(adapter %s, port d_id=0x%08x)\n", + zfcp_get_busid_by_port(port), port->d_id); ZFCP_LOG_INFO("status qualifier:\n"); ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_INFO, (char *) &header->fsf_status_qual, @@ -1613,7 +1638,7 @@ fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; break; - case FSF_PORT_HANDLE_NOT_VALID : + case FSF_PORT_HANDLE_NOT_VALID: ZFCP_LOG_FLAGS(2, "FSF_PORT_HANDLE_NOT_VALID\n"); ZFCP_LOG_DEBUG("Temporary port identifier 0x%x for port " "0x%016Lx on adapter %s invalid. This may " @@ -1624,15 +1649,15 @@ (char *) &header->fsf_status_qual, sizeof (union fsf_status_qual)); debug_text_event(adapter->erp_dbf, 1, "fsf_s_phandle_nv"); - zfcp_erp_adapter_reopen(port->adapter, 0); + zfcp_erp_adapter_reopen(adapter, 0); fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; break; - case FSF_PORT_BOXED : + case FSF_PORT_BOXED: ZFCP_LOG_FLAGS(2, "FSF_PORT_BOXED\n"); - ZFCP_LOG_INFO("The remote port 0x%016Lx on adapter %s " - "needs to be reopened\n", - port->wwpn, zfcp_get_busid_by_port(port)); + ZFCP_LOG_INFO("port needs to be reopened " + "(adapter %s, port d_id=0x%08x)\n", + zfcp_get_busid_by_port(port), port->d_id); debug_text_event(adapter->erp_dbf, 2, "fsf_s_pboxed"); zfcp_erp_port_reopen(port, 0); fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR @@ -1674,7 +1699,7 @@ fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; break; - default : + default: ZFCP_LOG_NORMAL("bug: An unknown FSF Status was presented " "(debug info 0x%x)\n", header->fsf_status); debug_text_event(adapter->erp_dbf, 0, "fsf_sq_inval:"); @@ -1959,8 +1984,8 @@ case FSF_ACCESS_DENIED: ZFCP_LOG_FLAGS(2, "FSF_ACCESS_DENIED\n"); - ZFCP_LOG_NORMAL("Access denied, cannot send ELS " - "(adapter: %s, port d_id: 0x%08x)\n", + ZFCP_LOG_NORMAL("access denied, cannot send ELS command " + "(adapter %s, port d_id=0x%08x)\n", zfcp_get_busid_by_adapter(adapter), d_id); for (counter = 0; counter < 2; counter++) { subtable = header->fsf_status_qual.halfword[counter * 2]; @@ -1976,6 +2001,11 @@ } } debug_text_event(adapter->erp_dbf, 1, "fsf_s_access"); + read_lock(&zfcp_data.config_lock); + port = zfcp_get_port_by_did(adapter, d_id); + if (port != NULL) + zfcp_erp_port_access_denied(port); + read_unlock(&zfcp_data.config_lock); fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; break; @@ -2036,7 +2066,7 @@ erp_action->fsf_req->erp_action = erp_action; erp_action->fsf_req->qtcb->bottom.config.feature_selection = - FSF_FEATURE_CFDC; + (FSF_FEATURE_CFDC | FSF_FEATURE_LUN_SHARING); /* start QDIO request for this FSF request */ retval = zfcp_fsf_req_send(erp_action->fsf_req, &erp_action->timer); @@ -2335,7 +2365,7 @@ return; switch (fsf_req->qtcb->header.fsf_status) { - case FSF_GOOD : + case FSF_GOOD: ZFCP_LOG_FLAGS(2,"FSF_GOOD\n"); bottom = &fsf_req->qtcb->bottom.port; memcpy(data, bottom, sizeof(*data)); @@ -2454,7 +2484,7 @@ ZFCP_LOG_FLAGS(2, "FSF_ACCESS_DENIED\n"); ZFCP_LOG_NORMAL("Access denied, cannot open port 0x%016Lx " "on adapter %s\n", - port->wwpn, zfcp_get_busid_by_port(port)); + port->wwpn, zfcp_get_busid_by_port(port)); for (counter = 0; counter < 2; counter++) { subtable = header->fsf_status_qual.halfword[counter * 2]; rule = header->fsf_status_qual.halfword[counter * 2 + 1]; @@ -2469,7 +2499,7 @@ } } debug_text_event(fsf_req->adapter->erp_dbf, 1, "fsf_s_access"); - zfcp_erp_port_failed(port); + zfcp_erp_port_access_denied(port); fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; break; @@ -2589,7 +2619,8 @@ /* should never occure, subtype not set in zfcp_fsf_open_port */ ZFCP_LOG_FLAGS(2, "FSF_UNKNOWN_OP_SUBTYPE\n"); ZFCP_LOG_INFO("unknown operation subtype (adapter: %s, " - "op_subtype=0x%x)\n", zfcp_get_busid_by_port(port), + "op_subtype=0x%x)\n", + zfcp_get_busid_by_port(port), fsf_req->qtcb->bottom.support.operation_subtype); fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; break; @@ -2860,9 +2891,8 @@ case FSF_ACCESS_DENIED: ZFCP_LOG_FLAGS(2, "FSF_ACCESS_DENIED\n"); ZFCP_LOG_NORMAL("Access denied, cannot close " - "physical port 0x%016Lx on " - "adapter %s\n", port->wwpn, - zfcp_get_busid_by_port(port)); + "physical port 0x%016Lx on adapter %s\n", + port->wwpn, zfcp_get_busid_by_port(port)); for (counter = 0; counter < 2; counter++) { subtable = header->fsf_status_qual.halfword[counter * 2]; rule = header->fsf_status_qual.halfword[counter * 2 + 1]; @@ -2877,6 +2907,7 @@ } } debug_text_event(fsf_req->adapter->erp_dbf, 1, "fsf_s_access"); + zfcp_erp_port_access_denied(port); fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; break; @@ -2998,6 +3029,8 @@ erp_action->port->handle; erp_action->fsf_req->qtcb->bottom.support.fcp_lun = erp_action->unit->fcp_lun; + erp_action->fsf_req->qtcb->bottom.support.option = + FSF_OPEN_LUN_SUPPRESS_BOXING; atomic_set_mask(ZFCP_STATUS_COMMON_OPENING, &erp_action->unit->status); erp_action->fsf_req->data.open_unit.unit = erp_action->unit; erp_action->fsf_req->erp_action = erp_action; @@ -3041,18 +3074,77 @@ struct zfcp_unit *unit; struct fsf_qtcb_header *header; struct fsf_qtcb_bottom_support *bottom; + struct fsf_queue_designator *queue_designator; u16 subtable, rule, counter; + u32 allowed, exclusive, readwrite; - adapter = fsf_req->adapter; unit = fsf_req->data.open_unit.unit; - header = &fsf_req->qtcb->header; - bottom = &fsf_req->qtcb->bottom.support; if (fsf_req->status & ZFCP_STATUS_FSFREQ_ERROR) { /* don't change unit status in our bookkeeping */ goto skip_fsfstatus; } + adapter = fsf_req->adapter; + header = &fsf_req->qtcb->header; + bottom = &fsf_req->qtcb->bottom.support; + queue_designator = &header->fsf_status_qual.fsf_queue_designator; + + allowed = bottom->lun_access_info & FSF_UNIT_ACCESS_OPEN_LUN_ALLOWED; + exclusive = bottom->lun_access_info & FSF_UNIT_ACCESS_EXCLUSIVE; + readwrite = bottom->lun_access_info & FSF_UNIT_ACCESS_OUTBOUND_TRANSFER; + + if (!adapter->supported_features & FSF_FEATURE_CFDC) + goto no_cfdc; + + atomic_clear_mask(ZFCP_STATUS_COMMON_ACCESS_DENIED | + ZFCP_STATUS_UNIT_SHARED | + ZFCP_STATUS_UNIT_READONLY, + &unit->status); + + if (!allowed) + atomic_set_mask(ZFCP_STATUS_COMMON_ACCESS_DENIED, &unit->status); + + if (!adapter->supported_features & FSF_FEATURE_LUN_SHARING) + goto no_lun_sharing; + + if (!exclusive) + atomic_set_mask(ZFCP_STATUS_UNIT_SHARED, &unit->status); + + if (!readwrite) { + atomic_set_mask(ZFCP_STATUS_UNIT_READONLY, &unit->status); + ZFCP_LOG_NORMAL("Unit 0x%016Lx on port 0x%016Lx on adapter %s " + "accessed read-only\n", unit->fcp_lun, + unit->port->wwpn, zfcp_get_busid_by_unit(unit)); + } + + if (exclusive && !readwrite) { + ZFCP_LOG_NORMAL("Exclusive access of read-only unit not " + "supported\n"); + zfcp_erp_unit_failed(unit); + fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; + goto skip_fsfstatus; + } + if (!exclusive && readwrite) { + ZFCP_LOG_NORMAL("Shared access of read-write unit is not " + "supported\n"); + zfcp_erp_unit_failed(unit); + fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; + goto skip_fsfstatus; + } + + no_lun_sharing: + no_cfdc: + if (!(adapter->supported_features & FSF_FEATURE_CFDC) && + (adapter->supported_features & FSF_FEATURE_LUN_SHARING)) { + ZFCP_LOG_NORMAL("LUN sharing without access control is not " + "supported.\n"); + zfcp_erp_unit_failed(unit); + fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; + goto skip_fsfstatus; + } + + /* evaluate FSF status in QTCB */ switch (header->fsf_status) { @@ -3103,7 +3195,7 @@ } } debug_text_event(adapter->erp_dbf, 1, "fsf_s_access"); - zfcp_erp_unit_failed(unit); + zfcp_erp_unit_access_denied(unit); fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; break; @@ -3118,17 +3210,18 @@ ZFCP_STATUS_FSFREQ_RETRY; break; - case FSF_LUN_SHARING_VIOLATION : + case FSF_LUN_SHARING_VIOLATION: ZFCP_LOG_FLAGS(2, "FSF_LUN_SHARING_VIOLATION\n"); if (header->fsf_status_qual.word[0] != 0) { ZFCP_LOG_NORMAL("FCP-LUN 0x%Lx at the remote port " "with WWPN 0x%Lx " "connected to the adapter %s " - "is already in use in LPAR%d\n", + "is already in use in LPAR%d, CSS%d\n", unit->fcp_lun, unit->port->wwpn, zfcp_get_busid_by_unit(unit), - header->fsf_status_qual.fsf_queue_designator.hla); + queue_designator->hla, + queue_designator->cssid); } else { subtable = header->fsf_status_qual.halfword[4]; rule = header->fsf_status_qual.halfword[5]; @@ -3229,6 +3322,38 @@ unit->handle); /* mark unit as open */ atomic_set_mask(ZFCP_STATUS_COMMON_OPEN, &unit->status); + + if (adapter->supported_features & FSF_FEATURE_LUN_SHARING){ + if (!exclusive) + atomic_set_mask(ZFCP_STATUS_UNIT_SHARED, + &unit->status); + + if (!readwrite) { + atomic_set_mask(ZFCP_STATUS_UNIT_READONLY, + &unit->status); + ZFCP_LOG_NORMAL("read-only access for unit " + "(adapter %s, wwpn=0x%016Lx, " + "fcp_lun=0x%016Lx)\n", + zfcp_get_busid_by_unit(unit), + unit->port->wwpn, + unit->fcp_lun); + } + + if (exclusive && !readwrite) { + ZFCP_LOG_NORMAL("exclusive access of read-only " + "unit not supported\n"); + zfcp_erp_unit_failed(unit); + fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; + zfcp_erp_unit_shutdown(unit, 0); + } else if (!exclusive && readwrite) { + ZFCP_LOG_NORMAL("shared access of read-write " + "unit not supported\n"); + zfcp_erp_unit_failed(unit); + fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; + zfcp_erp_unit_shutdown(unit, 0); + } + } + retval = 0; break; @@ -3242,7 +3367,7 @@ break; } - skip_fsfstatus: + skip_fsfstatus: atomic_clear_mask(ZFCP_STATUS_COMMON_OPENING, &unit->status); return retval; } @@ -3478,6 +3603,7 @@ unsigned long lock_flags; int real_bytes = 0; int retval = 0; + int mask; /* setup new FSF request */ retval = zfcp_fsf_req_create(adapter, FSF_QTCB_FCP_CMND, req_flags, @@ -3562,14 +3688,14 @@ /* set FCP_LUN in FCP_CMND IU in QTCB */ fcp_cmnd_iu->fcp_lun = unit->fcp_lun; + mask = ZFCP_STATUS_UNIT_READONLY | ZFCP_STATUS_UNIT_SHARED; + /* set task attributes in FCP_CMND IU in QTCB */ - if (likely(scsi_cmnd->device->simple_tags)) { + if (likely((scsi_cmnd->device->simple_tags) || + (atomic_test_mask(mask, &unit->status)))) fcp_cmnd_iu->task_attribute = SIMPLE_Q; - ZFCP_LOG_TRACE("setting SIMPLE_Q task attribute\n"); - } else { + else fcp_cmnd_iu->task_attribute = UNTAGGED; - ZFCP_LOG_TRACE("setting UNTAGGED task attribute\n"); - } /* set additional length of FCP_CDB in FCP_CMND IU in QTCB, if needed */ if (unlikely(scsi_cmnd->cmd_len > FCP_CDB_LENGTH)) { @@ -3904,6 +4030,7 @@ } } debug_text_event(fsf_req->adapter->erp_dbf, 1, "fsf_s_access"); + zfcp_erp_unit_access_denied(unit); fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; break; @@ -3963,16 +4090,15 @@ case FSF_LUN_BOXED: ZFCP_LOG_FLAGS(0, "FSF_LUN_BOXED\n"); - ZFCP_LOG_NORMAL( - "unit 0x%016Lx on port 0x%016Lx on adapter %s needs " - "to be reopened\n", - unit->fcp_lun, unit->port->wwpn, - zfcp_get_busid_by_unit(unit)); + ZFCP_LOG_NORMAL("unit needs to be reopened (adapter %s, " + "wwpn=0x%016Lx, fcp_lun=0x%016Lx)\n", + zfcp_get_busid_by_unit(unit), + unit->port->wwpn, unit->fcp_lun); debug_text_event(fsf_req->adapter->erp_dbf, 1, "fsf_s_lboxed"); zfcp_erp_unit_reopen(unit, 0); zfcp_cmd_dbf_event_fsf("unitbox", fsf_req, - &header->fsf_status_qual, - sizeof(union fsf_status_qual)); + &header->fsf_status_qual, + sizeof(union fsf_status_qual)); fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | ZFCP_STATUS_FSFREQ_RETRY; break; @@ -4621,7 +4747,8 @@ case FSF_UNKNOWN_OP_SUBTYPE: ZFCP_LOG_FLAGS(2, "FSF_UNKNOWN_OP_SUBTYPE\n"); ZFCP_LOG_NORMAL("unknown operation subtype (adapter: %s, " - "op_subtype=0x%x)\n", zfcp_get_busid_by_adapter(adapter), + "op_subtype=0x%x)\n", + zfcp_get_busid_by_adapter(adapter), bottom->operation_subtype); fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; retval = -EINVAL; diff -Nru a/drivers/s390/scsi/zfcp_fsf.h b/drivers/s390/scsi/zfcp_fsf.h --- a/drivers/s390/scsi/zfcp_fsf.h 2004-11-29 21:22:08 -08:00 +++ b/drivers/s390/scsi/zfcp_fsf.h 2004-11-29 21:22:08 -08:00 @@ -11,8 +11,9 @@ * Aron Zeh * Wolfgang Taphorn * Stefan Bader - * Heiko Carstens + * Heiko Carstens * Andreas Herrmann + * Volker Sameske * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -150,6 +151,7 @@ /* status types in status read buffer */ #define FSF_STATUS_READ_PORT_CLOSED 0x00000001 #define FSF_STATUS_READ_INCOMING_ELS 0x00000002 +#define FSF_STATUS_READ_SENSE_DATA_AVAIL 0x00000003 #define FSF_STATUS_READ_BIT_ERROR_THRESHOLD 0x00000004 #define FSF_STATUS_READ_LINK_DOWN 0x00000005 /* FIXME: really? */ #define FSF_STATUS_READ_LINK_UP 0x00000006 @@ -192,11 +194,13 @@ /* channel features */ #define FSF_FEATURE_QTCB_SUPPRESSION 0x00000001 #define FSF_FEATURE_CFDC 0x00000002 +#define FSF_FEATURE_LUN_SHARING 0x00000004 #define FSF_FEATURE_HBAAPI_MANAGEMENT 0x00000010 #define FSF_FEATURE_ELS_CT_CHAINED_SBALS 0x00000020 /* option */ #define FSF_OPEN_LUN_SUPPRESS_BOXING 0x00000001 +#define FSF_OPEN_LUN_REPLICATE_SENSE 0x00000002 /* adapter types */ #define FSF_ADAPTER_TYPE_FICON 0x00000001 @@ -228,6 +232,11 @@ #define FSF_IOSTAT_FABRIC_RJT 0x00000005 #define FSF_IOSTAT_LS_RJT 0x00000009 +/* open LUN access flags*/ +#define FSF_UNIT_ACCESS_OPEN_LUN_ALLOWED 0x01000000 +#define FSF_UNIT_ACCESS_EXCLUSIVE 0x02000000 +#define FSF_UNIT_ACCESS_OUTBOUND_TRANSFER 0x10000000 + struct fsf_queue_designator; struct fsf_status_read_buffer; struct fsf_port_closed_payload; @@ -381,7 +390,8 @@ u32 service_class; u8 res3[3]; u8 timeout; - u8 res4[184]; + u32 lun_access_info; + u8 res4[180]; u32 els1_length; u32 els2_length; u32 req_buf_length; diff -Nru a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c --- a/drivers/s390/scsi/zfcp_scsi.c 2004-11-29 21:22:09 -08:00 +++ b/drivers/s390/scsi/zfcp_scsi.c 2004-11-29 21:22:09 -08:00 @@ -32,7 +32,7 @@ #define ZFCP_LOG_AREA ZFCP_LOG_AREA_SCSI /* this drivers version (do not edit !!! generated and updated by cvs) */ -#define ZFCP_SCSI_REVISION "$Revision: 1.71 $" +#define ZFCP_SCSI_REVISION "$Revision: 1.73 $" #include "zfcp_ext.h" diff -Nru a/drivers/s390/scsi/zfcp_sysfs_port.c b/drivers/s390/scsi/zfcp_sysfs_port.c --- a/drivers/s390/scsi/zfcp_sysfs_port.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/s390/scsi/zfcp_sysfs_port.c 2004-11-29 21:22:08 -08:00 @@ -11,6 +11,7 @@ * Martin Peschke * Heiko Carstens * Andreas Herrmann + * Volker Sameske * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,7 +28,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#define ZFCP_SYSFS_PORT_C_REVISION "$Revision: 1.46 $" +#define ZFCP_SYSFS_PORT_C_REVISION "$Revision: 1.47 $" #include "zfcp_ext.h" @@ -69,6 +70,8 @@ ZFCP_DEFINE_PORT_ATTR(scsi_id, "0x%x\n", port->scsi_id); ZFCP_DEFINE_PORT_ATTR(in_recovery, "%d\n", atomic_test_mask (ZFCP_STATUS_COMMON_ERP_INUSE, &port->status)); +ZFCP_DEFINE_PORT_ATTR(access_denied, "%d\n", atomic_test_mask + (ZFCP_STATUS_COMMON_ACCESS_DENIED, &port->status)); /** * zfcp_sysfs_unit_add_store - add a unit to sysfs tree @@ -245,6 +248,7 @@ &dev_attr_status.attr, &dev_attr_wwnn.attr, &dev_attr_d_id.attr, + &dev_attr_access_denied.attr, NULL }; diff -Nru a/drivers/s390/scsi/zfcp_sysfs_unit.c b/drivers/s390/scsi/zfcp_sysfs_unit.c --- a/drivers/s390/scsi/zfcp_sysfs_unit.c 2004-11-29 21:22:09 -08:00 +++ b/drivers/s390/scsi/zfcp_sysfs_unit.c 2004-11-29 21:22:09 -08:00 @@ -11,6 +11,7 @@ * Martin Peschke * Heiko Carstens * Andreas Herrmann + * Volker Sameske * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,7 +28,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#define ZFCP_SYSFS_UNIT_C_REVISION "$Revision: 1.29 $" +#define ZFCP_SYSFS_UNIT_C_REVISION "$Revision: 1.30 $" #include "zfcp_ext.h" @@ -67,6 +68,12 @@ ZFCP_DEFINE_UNIT_ATTR(scsi_lun, "0x%x\n", unit->scsi_lun); ZFCP_DEFINE_UNIT_ATTR(in_recovery, "%d\n", atomic_test_mask (ZFCP_STATUS_COMMON_ERP_INUSE, &unit->status)); +ZFCP_DEFINE_UNIT_ATTR(access_denied, "%d\n", atomic_test_mask + (ZFCP_STATUS_COMMON_ACCESS_DENIED, &unit->status)); +ZFCP_DEFINE_UNIT_ATTR(access_shared, "%d\n", atomic_test_mask + (ZFCP_STATUS_UNIT_SHARED, &unit->status)); +ZFCP_DEFINE_UNIT_ATTR(access_readonly, "%d\n", atomic_test_mask + (ZFCP_STATUS_UNIT_READONLY, &unit->status)); /** * zfcp_sysfs_unit_failed_store - failed state of unit @@ -135,6 +142,9 @@ &dev_attr_failed.attr, &dev_attr_in_recovery.attr, &dev_attr_status.attr, + &dev_attr_access_denied.attr, + &dev_attr_access_shared.attr, + &dev_attr_access_readonly.attr, NULL }; diff -Nru a/drivers/sbus/char/bbc_i2c.c b/drivers/sbus/char/bbc_i2c.c --- a/drivers/sbus/char/bbc_i2c.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/sbus/char/bbc_i2c.c 2004-11-29 21:22:08 -08:00 @@ -57,8 +57,8 @@ struct bbc_i2c_bus *next; int index; spinlock_t lock; - void *i2c_bussel_reg; - void *i2c_control_regs; + void __iomem *i2c_bussel_reg; + void __iomem *i2c_control_regs; unsigned char own, clock; wait_queue_head_t wq; diff -Nru a/drivers/sbus/char/bpp.c b/drivers/sbus/char/bpp.c --- a/drivers/sbus/char/bpp.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/sbus/char/bpp.c 2004-11-29 21:22:08 -08:00 @@ -89,7 +89,7 @@ #if defined(__i386__) -const unsigned short base_addrs[BPP_NO] = { 0x278, 0x378, 0x3bc }; +static const unsigned short base_addrs[BPP_NO] = { 0x278, 0x378, 0x3bc }; /* * These are for data access. @@ -246,7 +246,7 @@ #define P_ERR_IRP 0x0002 /* RW1 1= rising edge */ #define P_ERR_IRQ_EN 0x0001 /* RW */ -unsigned long base_addrs[BPP_NO]; +static void __iomem *base_addrs[BPP_NO]; #define bpp_outb_p(data, base) sbus_writeb(data, (base) + BPP_DR) #define bpp_inb_p(base) sbus_readb((base) + BPP_DR) @@ -254,7 +254,7 @@ static void set_pins(unsigned short pins, unsigned minor) { - unsigned long base = base_addrs[minor]; + void __iomem *base = base_addrs[minor]; unsigned char bits_tcr = 0, bits_or = 0; if (instances[minor].direction & 0x20) bits_tcr |= P_TCR_DIR; @@ -275,7 +275,7 @@ */ static unsigned short get_pins(unsigned minor) { - unsigned long base = base_addrs[minor]; + void __iomem *base = base_addrs[minor]; unsigned short bits = 0; unsigned value_tcr = sbus_readb(base + BPP_TCR); unsigned value_ir = sbus_readb(base + BPP_IR); @@ -940,7 +940,7 @@ #if defined(__sparc__) -static unsigned long map_bpp(struct sbus_dev *dev, int idx) +static void __iomem *map_bpp(struct sbus_dev *dev, int idx) { return sbus_ioremap(&dev->resource[0], 0, BPP_SIZE, "bpp"); } @@ -969,7 +969,7 @@ static void probeLptPort(unsigned idx) { - unsigned long rp = base_addrs[idx]; + void __iomem *rp = base_addrs[idx]; __u32 csr; char *brand; @@ -983,7 +983,7 @@ init_timer(&instances[idx].timer_list); instances[idx].timer_list.function = bpp_wake_up; - if (rp == 0) return; + if (!rp) return; instances[idx].present = 1; instances[idx].enhanced = 1; /* Sure */ @@ -1014,7 +1014,7 @@ default: brand = "Unknown"; } - printk("bpp%d: %s at 0x%lx\n", idx, brand, rp); + printk("bpp%d: %s at %p\n", idx, brand, rp); /* * Leave the port in compat idle mode. diff -Nru a/drivers/sbus/char/riowatchdog.c b/drivers/sbus/char/riowatchdog.c --- a/drivers/sbus/char/riowatchdog.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/sbus/char/riowatchdog.c 2004-11-29 21:22:07 -08:00 @@ -54,8 +54,8 @@ static spinlock_t riowd_lock = SPIN_LOCK_UNLOCKED; -static void *bbc_regs; -static void *riowd_regs; +static void __iomem *bbc_regs; +static void __iomem *riowd_regs; #define WDTO_INDEX 0x05 static int riowd_timeout = 1; /* in minutes */ diff -Nru a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c --- a/drivers/scsi/3w-9xxx.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/scsi/3w-9xxx.c 2004-11-29 21:22:08 -08:00 @@ -1746,6 +1746,7 @@ twa_free_request_id(tw_dev, request_id); SCpnt->result = (DID_ERROR << 16); done(SCpnt); + retval = 0; } return retval; diff -Nru a/drivers/scsi/3w-9xxx.h b/drivers/scsi/3w-9xxx.h --- a/drivers/scsi/3w-9xxx.h 2004-11-29 21:22:09 -08:00 +++ b/drivers/scsi/3w-9xxx.h 2004-11-29 21:22:09 -08:00 @@ -453,13 +453,13 @@ /* Macros */ #define TW_CONTROL_REG_ADDR(x) (x->base_addr) -#define TW_STATUS_REG_ADDR(x) ((unsigned char *)x->base_addr + 0x4) +#define TW_STATUS_REG_ADDR(x) ((unsigned char __iomem *)x->base_addr + 0x4) #if BITS_PER_LONG > 32 -#define TW_COMMAND_QUEUE_REG_ADDR(x) ((unsigned char *)x->base_addr + 0x20) +#define TW_COMMAND_QUEUE_REG_ADDR(x) ((unsigned char __iomem *)x->base_addr + 0x20) #else -#define TW_COMMAND_QUEUE_REG_ADDR(x) ((unsigned char *)x->base_addr + 0x8) +#define TW_COMMAND_QUEUE_REG_ADDR(x) ((unsigned char __iomem *)x->base_addr + 0x8) #endif -#define TW_RESPONSE_QUEUE_REG_ADDR(x) ((unsigned char *)x->base_addr + 0xC) +#define TW_RESPONSE_QUEUE_REG_ADDR(x) ((unsigned char __iomem *)x->base_addr + 0xC) #define TW_CLEAR_ALL_INTERRUPTS(x) (writel(TW_STATUS_VALID_INTERRUPT, TW_CONTROL_REG_ADDR(x))) #define TW_CLEAR_ATTENTION_INTERRUPT(x) (writel(TW_CONTROL_CLEAR_ATTENTION_INTERRUPT, TW_CONTROL_REG_ADDR(x))) #define TW_CLEAR_HOST_INTERRUPT(x) (writel(TW_CONTROL_CLEAR_HOST_INTERRUPT, TW_CONTROL_REG_ADDR(x))) @@ -655,7 +655,7 @@ } TW_Compatibility_Info; typedef struct TAG_TW_Device_Extension { - u32 *base_addr; + u32 __iomem *base_addr; unsigned long *generic_buffer_virt[TW_Q_LENGTH]; unsigned long generic_buffer_phys[TW_Q_LENGTH]; TW_Command_Full *command_packet_virt[TW_Q_LENGTH]; diff -Nru a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c --- a/drivers/scsi/3w-xxxx.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/scsi/3w-xxxx.c 2004-11-29 21:22:08 -08:00 @@ -2067,6 +2067,7 @@ tw_state_request_finish(tw_dev, request_id); SCpnt->result = (DID_ERROR << 16); done(SCpnt); + retval = 0; } out: return retval; diff -Nru a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig --- a/drivers/scsi/Kconfig 2004-11-29 21:22:08 -08:00 +++ b/drivers/scsi/Kconfig 2004-11-29 21:22:08 -08:00 @@ -1288,6 +1288,7 @@ config SCSI_QLOGIC_1280_1040 bool "Qlogic QLA 1020/1040 SCSI support" + depends on SCSI_QLOGIC_1280 && SCSI_QLOGIC_ISP!=y help Say Y here if you have a QLogic ISP1020/1040 SCSI host adapter and do not want to use the old driver. This option enables support in diff -Nru a/drivers/scsi/NCR_Q720.c b/drivers/scsi/NCR_Q720.c --- a/drivers/scsi/NCR_Q720.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/scsi/NCR_Q720.c 2004-11-29 21:22:06 -08:00 @@ -39,7 +39,7 @@ /* We needs this helper because we have up to four hosts per struct device */ struct NCR_Q720_private { struct device *dev; - __u32 mem_base; + void __iomem * mem_base; __u32 phys_mem_base; __u32 mem_size; __u8 irq; @@ -75,7 +75,7 @@ static int __init NCR_Q720_probe_one(struct NCR_Q720_private *p, int siop, - int irq, int slot, __u32 paddr, __u32 vaddr) + int irq, int slot, __u32 paddr, void __iomem *vaddr) { struct ncr_device device; __u8 scsi_id; @@ -146,7 +146,7 @@ __u8 pos2, pos4, asr2, asr9, asr10; __u16 io_base; __u32 base_addr, mem_size; - __u32 mem_base; + void __iomem *mem_base; p = kmalloc(sizeof(*p), GFP_KERNEL); if (!p) @@ -227,7 +227,7 @@ */ mem_base = (__u32)dma_mark_declared_memory_occupied(dev, base_addr, 1024); - if (IS_ERR((void *)mem_base)) { + if (IS_ERR(mem_base)) { printk("NCR_Q720 failed to reserve memory mapped region\n"); goto out_release; } @@ -271,7 +271,7 @@ } /* disable all the siop interrupts */ for(i = 0; i < siops; i++) { - __u32 reg_scsr1 = mem_base + NCR_Q720_CHIP_REGISTER_OFFSET + void __iomem *reg_scsr1 = mem_base + NCR_Q720_CHIP_REGISTER_OFFSET + i*NCR_Q720_SIOP_SHIFT + NCR_Q720_SCSR_OFFSET + 1; __u8 scsr1 = readb(reg_scsr1); scsr1 |= 0x01; @@ -280,7 +280,7 @@ /* plumb in all 720 chips */ for (i = 0; i < siops; i++) { - __u32 siop_v_base = mem_base + NCR_Q720_CHIP_REGISTER_OFFSET + void __iomem *siop_v_base = mem_base + NCR_Q720_CHIP_REGISTER_OFFSET + i*NCR_Q720_SIOP_SHIFT; __u32 siop_p_base = base_addr + NCR_Q720_CHIP_REGISTER_OFFSET + i*NCR_Q720_SIOP_SHIFT; diff -Nru a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c --- a/drivers/scsi/a100u2w.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/scsi/a100u2w.c 2004-11-29 21:22:08 -08:00 @@ -1078,7 +1078,7 @@ pHCB->pdev = pdev; pHCB->HCS_Base = port; pHCB->HCS_BIOS = bios; - pHCB->BitAllocFlagLock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&pHCB->BitAllocFlagLock); /* Get total memory needed for SCB */ sz = ORC_MAXQUEUE * sizeof(ORC_SCB); diff -Nru a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c --- a/drivers/scsi/aacraid/aachba.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/scsi/aacraid/aachba.c 2004-11-29 21:22:07 -08:00 @@ -894,7 +894,7 @@ aac_io_done(scsicmd); fib_complete(cmd_fibcontext); fib_free(cmd_fibcontext); - return -1; + return 0; } static int aac_write(struct scsi_cmnd * scsicmd, int cid) @@ -928,7 +928,7 @@ if (!(cmd_fibcontext = fib_alloc(dev))) { scsicmd->result = DID_ERROR << 16; aac_io_done(scsicmd); - return -1; + return 0; } fib_init(cmd_fibcontext); @@ -1004,7 +1004,7 @@ fib_complete(cmd_fibcontext); fib_free(cmd_fibcontext); - return -1; + return 0; } diff -Nru a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h --- a/drivers/scsi/aacraid/aacraid.h 2004-11-29 21:22:07 -08:00 +++ b/drivers/scsi/aacraid/aacraid.h 2004-11-29 21:22:07 -08:00 @@ -421,8 +421,6 @@ { void (*adapter_interrupt)(struct aac_dev *dev); void (*adapter_notify)(struct aac_dev *dev, u32 event); - void (*adapter_enable_int)(struct aac_dev *dev, u32 event); - void (*adapter_disable_int)(struct aac_dev *dev, u32 event); int (*adapter_sync_cmd)(struct aac_dev *dev, u32 command, u32 p1, u32 *status); int (*adapter_check_health)(struct aac_dev *dev); }; @@ -881,23 +879,12 @@ u8 dac_support; }; -#define AllocateAndMapFibSpace(dev, MapFibContext) \ - (dev)->a_ops.AllocateAndMapFibSpace(dev, MapFibContext) - -#define UnmapAndFreeFibSpace(dev, MapFibContext) \ - (dev)->a_ops.UnmapAndFreeFibSpace(dev, MapFibContext) - #define aac_adapter_interrupt(dev) \ (dev)->a_ops.adapter_interrupt(dev) #define aac_adapter_notify(dev, event) \ (dev)->a_ops.adapter_notify(dev, event) -#define aac_adapter_enable_int(dev, event) \ - (dev)->a_ops.adapter_enable_int(dev, event) - -#define aac_adapter_disable_int(dev, event) \ - dev->a_ops.adapter_disable_int(dev, event) #define aac_adapter_check_health(dev) \ (dev)->a_ops.adapter_check_health(dev) diff -Nru a/drivers/scsi/aacraid/rkt.c b/drivers/scsi/aacraid/rkt.c --- a/drivers/scsi/aacraid/rkt.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/scsi/aacraid/rkt.c 2004-11-29 21:22:08 -08:00 @@ -88,66 +88,6 @@ } /** - * aac_rkt_enable_interrupt - Enable event reporting - * @dev: Adapter - * @event: Event to enable - * - * Enable event reporting from the i960 for a given event. - */ - -static void aac_rkt_enable_interrupt(struct aac_dev * dev, u32 event) -{ - switch (event) { - - case HostNormCmdQue: - dev->irq_mask &= ~(OUTBOUNDDOORBELL_1); - break; - - case HostNormRespQue: - dev->irq_mask &= ~(OUTBOUNDDOORBELL_2); - break; - - case AdapNormCmdNotFull: - dev->irq_mask &= ~(OUTBOUNDDOORBELL_3); - break; - - case AdapNormRespNotFull: - dev->irq_mask &= ~(OUTBOUNDDOORBELL_4); - break; - } -} - -/** - * aac_rkt_disable_interrupt - Disable event reporting - * @dev: Adapter - * @event: Event to enable - * - * Disable event reporting from the i960 for a given event. - */ - -static void aac_rkt_disable_interrupt(struct aac_dev *dev, u32 event) -{ - switch (event) { - - case HostNormCmdQue: - dev->irq_mask |= (OUTBOUNDDOORBELL_1); - break; - - case HostNormRespQue: - dev->irq_mask |= (OUTBOUNDDOORBELL_2); - break; - - case AdapNormCmdNotFull: - dev->irq_mask |= (OUTBOUNDDOORBELL_3); - break; - - case AdapNormRespNotFull: - dev->irq_mask |= (OUTBOUNDDOORBELL_4); - break; - } -} - -/** * rkt_sync_cmd - send a command and wait * @dev: Adapter * @command: Command to execute @@ -180,7 +120,7 @@ /* * Disable doorbell interrupts */ - rkt_writeb(dev, MUnit.OIMR, dev->OIMR |= 0x04); + rkt_writeb(dev, MUnit.OIMR, dev->OIMR = 0xff); /* * Force the completion of the mask register write before issuing * the interrupt. @@ -221,13 +161,14 @@ /* * Restore interrupt mask even though we timed out */ - rkt_writeb(dev, MUnit.OIMR, dev->OIMR &= 0xfb); + rkt_writeb(dev, MUnit.OIMR, dev->OIMR = 0xfb); return -ETIMEDOUT; } /* * Pull the synch status from Mailbox 0. */ - *status = le32_to_cpu(rkt_readl(dev, IndexRegs.Mailbox[0])); + if (status) + *status = le32_to_cpu(rkt_readl(dev, IndexRegs.Mailbox[0])); /* * Clear the synch command doorbell. */ @@ -235,7 +176,7 @@ /* * Restore interrupt mask */ - rkt_writeb(dev, MUnit.OIMR, dev->OIMR &= 0xfb); + rkt_writeb(dev, MUnit.OIMR, dev->OIMR = 0xfb); return 0; } @@ -334,7 +275,7 @@ */ static int aac_rkt_check_health(struct aac_dev *dev) { - long status = rkt_readl(dev, IndexRegs.Mailbox[7]); + u32 status = le32_to_cpu(rkt_readl(dev, MUnit.OMRx[0])); /* * Check to see if the board failed any self tests. @@ -344,34 +285,42 @@ /* * Check to see if the board panic'd. */ - if (status & KERNEL_PANIC) - { - char * buffer = kmalloc(512, GFP_KERNEL|__GFP_DMA); + if (status & KERNEL_PANIC) { + char * buffer; struct POSTSTATUS { u32 Post_Command; u32 Post_Address; - } * post = kmalloc(sizeof(struct POSTSTATUS), GFP_KERNEL); - dma_addr_t paddr = pci_map_single(dev->pdev, post, sizeof(struct POSTSTATUS), 2); - dma_addr_t baddr = pci_map_single(dev->pdev, buffer, 512, 1); - u32 status = -1; - int ret = -2; - - memset(buffer, 0, 512); - post->Post_Command = cpu_to_le32(COMMAND_POST_RESULTS); - post->Post_Address = cpu_to_le32(baddr); - rkt_writel(dev, MUnit.IMRx[0], cpu_to_le32(paddr)); - rkt_sync_cmd(dev, COMMAND_POST_RESULTS, baddr, &status); - pci_unmap_single(dev->pdev, paddr, sizeof(struct POSTSTATUS),2); - kfree(post); - if ((buffer[0] == '0') && (buffer[1] == 'x')) { - ret = (buffer[2] <= '9') ? (buffer[2] - '0') : (buffer[2] - 'A' + 10); - ret <<= 4; - ret += (buffer[3] <= '9') ? (buffer[3] - '0') : (buffer[3] - 'A' + 10); + } * post; + dma_addr_t paddr, baddr; + int ret; + + if ((status & 0xFF000000L) == 0xBC000000L) + return (status >> 16) & 0xFF; + buffer = pci_alloc_consistent(dev->pdev, 512, &baddr); + ret = -2; + if (buffer == NULL) + return ret; + post = pci_alloc_consistent(dev->pdev, + sizeof(struct POSTSTATUS), &paddr); + if (post == NULL) { + pci_free_consistent(dev->pdev, 512, buffer, baddr); + return ret; } - pci_unmap_single(dev->pdev, baddr, 512, 1); - kfree(buffer); - return ret; - } + memset(buffer, 0, 512); + post->Post_Command = cpu_to_le32(COMMAND_POST_RESULTS); + post->Post_Address = cpu_to_le32(baddr); + rkt_writel(dev, MUnit.IMRx[0], cpu_to_le32(paddr)); + rkt_sync_cmd(dev, COMMAND_POST_RESULTS, baddr, &status); + pci_free_consistent(dev->pdev, sizeof(struct POSTSTATUS), + post, paddr); + if ((buffer[0] == '0') && (buffer[1] == 'x')) { + ret = (buffer[2] <= '9') ? (buffer[2] - '0') : (buffer[2] - 'A' + 10); + ret <<= 4; + ret += (buffer[3] <= '9') ? (buffer[3] - '0') : (buffer[3] - 'A' + 10); + } + pci_free_consistent(dev->pdev, 512, buffer, baddr); + return ret; + } /* * Wait for the adapter to be up and running. */ @@ -455,8 +404,6 @@ * Fill in the function dispatch table. */ dev->a_ops.adapter_interrupt = aac_rkt_interrupt_adapter; - dev->a_ops.adapter_enable_int = aac_rkt_enable_interrupt; - dev->a_ops.adapter_disable_int = aac_rkt_disable_interrupt; dev->a_ops.adapter_notify = aac_rkt_notify_adapter; dev->a_ops.adapter_sync_cmd = rkt_sync_cmd; dev->a_ops.adapter_check_health = aac_rkt_check_health; diff -Nru a/drivers/scsi/aacraid/rx.c b/drivers/scsi/aacraid/rx.c --- a/drivers/scsi/aacraid/rx.c 2004-11-29 21:22:09 -08:00 +++ b/drivers/scsi/aacraid/rx.c 2004-11-29 21:22:09 -08:00 @@ -88,66 +88,6 @@ } /** - * aac_rx_enable_interrupt - Enable event reporting - * @dev: Adapter - * @event: Event to enable - * - * Enable event reporting from the i960 for a given event. - */ - -static void aac_rx_enable_interrupt(struct aac_dev * dev, u32 event) -{ - switch (event) { - - case HostNormCmdQue: - dev->irq_mask &= ~(OUTBOUNDDOORBELL_1); - break; - - case HostNormRespQue: - dev->irq_mask &= ~(OUTBOUNDDOORBELL_2); - break; - - case AdapNormCmdNotFull: - dev->irq_mask &= ~(OUTBOUNDDOORBELL_3); - break; - - case AdapNormRespNotFull: - dev->irq_mask &= ~(OUTBOUNDDOORBELL_4); - break; - } -} - -/** - * aac_rx_disable_interrupt - Disable event reporting - * @dev: Adapter - * @event: Event to enable - * - * Disable event reporting from the i960 for a given event. - */ - -static void aac_rx_disable_interrupt(struct aac_dev *dev, u32 event) -{ - switch (event) { - - case HostNormCmdQue: - dev->irq_mask |= (OUTBOUNDDOORBELL_1); - break; - - case HostNormRespQue: - dev->irq_mask |= (OUTBOUNDDOORBELL_2); - break; - - case AdapNormCmdNotFull: - dev->irq_mask |= (OUTBOUNDDOORBELL_3); - break; - - case AdapNormRespNotFull: - dev->irq_mask |= (OUTBOUNDDOORBELL_4); - break; - } -} - -/** * rx_sync_cmd - send a command and wait * @dev: Adapter * @command: Command to execute @@ -334,7 +274,7 @@ */ static int aac_rx_check_health(struct aac_dev *dev) { - long status = rx_readl(dev, IndexRegs.Mailbox[7]); + u32 status = le32_to_cpu(rx_readl(dev, MUnit.OMRx[0])); /* * Check to see if the board failed any self tests. @@ -345,29 +285,39 @@ * Check to see if the board panic'd. */ if (status & KERNEL_PANIC) { - char * buffer = kmalloc(512, GFP_KERNEL); + char * buffer; struct POSTSTATUS { u32 Post_Command; u32 Post_Address; - } * post = kmalloc(sizeof(struct POSTSTATUS), GFP_KERNEL); - dma_addr_t paddr = pci_map_single(dev->pdev, post, sizeof(struct POSTSTATUS), 2); - dma_addr_t baddr = pci_map_single(dev->pdev, buffer, 512, 1); - u32 status = -1; - int ret = -2; + } * post; + dma_addr_t paddr, baddr; + int ret; + + if ((status & 0xFF000000L) == 0xBC000000L) + return (status >> 16) & 0xFF; + buffer = pci_alloc_consistent(dev->pdev, 512, &baddr); + ret = -2; + if (buffer == NULL) + return ret; + post = pci_alloc_consistent(dev->pdev, + sizeof(struct POSTSTATUS), &paddr); + if (post == NULL) { + pci_free_consistent(dev->pdev, 512, buffer, baddr); + return ret; + } memset(buffer, 0, 512); post->Post_Command = cpu_to_le32(COMMAND_POST_RESULTS); post->Post_Address = cpu_to_le32(baddr); rx_writel(dev, MUnit.IMRx[0], cpu_to_le32(paddr)); rx_sync_cmd(dev, COMMAND_POST_RESULTS, baddr, &status); - pci_unmap_single(dev->pdev, paddr, sizeof(struct POSTSTATUS), 2); - kfree(post); + pci_free_consistent(dev->pdev, sizeof(struct POSTSTATUS), + post, paddr); if ((buffer[0] == '0') && (buffer[1] == 'x')) { ret = (buffer[2] <= '9') ? (buffer[2] - '0') : (buffer[2] - 'A' + 10); ret <<= 4; ret += (buffer[3] <= '9') ? (buffer[3] - '0') : (buffer[3] - 'A' + 10); } - pci_unmap_single(dev->pdev, baddr, 512, 1); - kfree(buffer); + pci_free_consistent(dev->pdev, 512, buffer, baddr); return ret; } /* @@ -379,7 +329,7 @@ * Everything is OK */ return 0; -} /* aac_rx_check_health */ +} /** * aac_rx_init - initialize an i960 based AAC card @@ -454,8 +404,6 @@ * Fill in the function dispatch table. */ dev->a_ops.adapter_interrupt = aac_rx_interrupt_adapter; - dev->a_ops.adapter_enable_int = aac_rx_enable_interrupt; - dev->a_ops.adapter_disable_int = aac_rx_disable_interrupt; dev->a_ops.adapter_notify = aac_rx_notify_adapter; dev->a_ops.adapter_sync_cmd = rx_sync_cmd; dev->a_ops.adapter_check_health = aac_rx_check_health; diff -Nru a/drivers/scsi/aacraid/sa.c b/drivers/scsi/aacraid/sa.c --- a/drivers/scsi/aacraid/sa.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/scsi/aacraid/sa.c 2004-11-29 21:22:07 -08:00 @@ -82,68 +82,6 @@ } /** - * aac_sa_enable_interrupt - enable an interrupt event - * @dev: Which adapter to enable. - * @event: Which adapter event. - * - * This routine will enable the corresponding adapter event to cause an interrupt on - * the host. - */ - -void aac_sa_enable_interrupt(struct aac_dev *dev, u32 event) -{ - switch (event) { - - case HostNormCmdQue: - sa_writew(dev, SaDbCSR.PRICLEARIRQMASK, DOORBELL_1); - break; - - case HostNormRespQue: - sa_writew(dev, SaDbCSR.PRICLEARIRQMASK, DOORBELL_2); - break; - - case AdapNormCmdNotFull: - sa_writew(dev, SaDbCSR.PRICLEARIRQMASK, DOORBELL_3); - break; - - case AdapNormRespNotFull: - sa_writew(dev, SaDbCSR.PRICLEARIRQMASK, DOORBELL_4); - break; - } -} - -/** - * aac_sa_disable_interrupt - disable an interrupt event - * @dev: Which adapter to enable. - * @event: Which adapter event. - * - * This routine will enable the corresponding adapter event to cause an interrupt on - * the host. - */ - -void aac_sa_disable_interrupt (struct aac_dev *dev, u32 event) -{ - switch (event) { - - case HostNormCmdQue: - sa_writew(dev, SaDbCSR.PRISETIRQMASK, DOORBELL_1); - break; - - case HostNormRespQue: - sa_writew(dev, SaDbCSR.PRISETIRQMASK, DOORBELL_2); - break; - - case AdapNormCmdNotFull: - sa_writew(dev, SaDbCSR.PRISETIRQMASK, DOORBELL_3); - break; - - case AdapNormRespNotFull: - sa_writew(dev, SaDbCSR.PRISETIRQMASK, DOORBELL_4); - break; - } -} - -/** * aac_sa_notify_adapter - handle adapter notification * @dev: Adapter that notification is for * @event: Event to notidy @@ -401,8 +339,6 @@ */ dev->a_ops.adapter_interrupt = aac_sa_interrupt_adapter; - dev->a_ops.adapter_enable_int = aac_sa_enable_interrupt; - dev->a_ops.adapter_disable_int = aac_sa_disable_interrupt; dev->a_ops.adapter_notify = aac_sa_notify_adapter; dev->a_ops.adapter_sync_cmd = sa_sync_cmd; dev->a_ops.adapter_check_health = aac_sa_check_health; diff -Nru a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c --- a/drivers/scsi/advansys.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/scsi/advansys.c 2004-11-29 21:22:07 -08:00 @@ -4567,7 +4567,7 @@ boardp->id = asc_board_count - 1; /* Initialize spinlock. */ - boardp->lock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&boardp->lock); /* * Handle both narrow and wide boards. diff -Nru a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c --- a/drivers/scsi/aha152x.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/scsi/aha152x.c 2004-11-29 21:22:06 -08:00 @@ -3830,10 +3830,15 @@ if (setup_countHBAnum = NumberOfAdapters; - cpqfcHBAdata->hba_spinlock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&cpqfcHBAdata->hba_spinlock); // request necessary resources and check for conflicts if( request_irq( HostAdapter->irq, diff -Nru a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c --- a/drivers/scsi/dc395x.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/scsi/dc395x.c 2004-11-29 21:22:06 -08:00 @@ -295,8 +295,8 @@ struct AdapterCtlBlk { struct Scsi_Host *scsi_host; - u16 io_port_base; - u16 io_port_len; + unsigned long io_port_base; + unsigned long io_port_len; struct list_head dcb_list; /* head of going dcb list */ struct DeviceCtlBlk *dcb_run_robin; @@ -311,7 +311,7 @@ u8 sel_timeout; - u8 irq_level; + unsigned int irq_level; u8 tag_max_num; u8 acb_flag; u8 gmode2; @@ -3931,7 +3931,7 @@ * * @io_port: base I/O address **/ -static void __init trms1040_wait_30us(u16 io_port) +static void __init trms1040_wait_30us(unsigned long io_port) { /* ScsiPortStallExecution(30); wait 30 us */ outb(5, io_port + TRM_S1040_GEN_TIMER); @@ -3948,7 +3948,7 @@ * @cmd: SB + op code (command) to send * @addr: address to send **/ -static void __init trms1040_write_cmd(u16 io_port, u8 cmd, u8 addr) +static void __init trms1040_write_cmd(unsigned long io_port, u8 cmd, u8 addr) { int i; u8 send_data; @@ -3993,7 +3993,7 @@ * @addr: offset into EEPROM * @byte: bytes to write **/ -static void __init trms1040_set_data(u16 io_port, u8 addr, u8 byte) +static void __init trms1040_set_data(unsigned long io_port, u8 addr, u8 byte) { int i; u8 send_data; @@ -4047,7 +4047,7 @@ * @eeprom: the data to write * @io_port: the base io port **/ -static void __init trms1040_write_all(struct NvRamType *eeprom, u16 io_port) +static void __init trms1040_write_all(struct NvRamType *eeprom, unsigned long io_port) { u8 *b_eeprom = (u8 *)eeprom; u8 addr; @@ -4087,7 +4087,7 @@ * * Returns the the byte read. **/ -static u8 __init trms1040_get_data(u16 io_port, u8 addr) +static u8 __init trms1040_get_data(unsigned long io_port, u8 addr) { int i; u8 read_byte; @@ -4125,7 +4125,7 @@ * @eeprom: where to store the data * @io_port: the base io port **/ -static void __init trms1040_read_all(struct NvRamType *eeprom, u16 io_port) +static void __init trms1040_read_all(struct NvRamType *eeprom, unsigned long io_port) { u8 *b_eeprom = (u8 *)eeprom; u8 addr; @@ -4155,7 +4155,7 @@ * @eeprom: caller allocated strcuture to read the eeprom data into * @io_port: io port to read from **/ -static void __init check_eeprom(struct NvRamType *eeprom, u16 io_port) +static void __init check_eeprom(struct NvRamType *eeprom, unsigned long io_port) { u16 *w_eeprom = (u16 *)eeprom; u16 w_addr; @@ -4447,7 +4447,7 @@ * * @acb: The adapter which we are to init. **/ -void __init adapter_init_chip(struct AdapterCtlBlk *acb) +static void __init adapter_init_chip(struct AdapterCtlBlk *acb) { struct NvRamType *eeprom = &acb->eeprom; @@ -4500,11 +4500,11 @@ * Returns 0 if the initialization succeeds, any other value on * failure. **/ -static int __init adapter_init(struct AdapterCtlBlk *acb, u32 io_port, - u32 io_port_len, u8 irq) +static int __init adapter_init(struct AdapterCtlBlk *acb, + unsigned long io_port, u32 io_port_len, unsigned int irq) { if (!request_region(io_port, io_port_len, DC395X_NAME)) { - dprintkl(KERN_ERR, "Failed to reserve IO region 0x%x\n", io_port); + dprintkl(KERN_ERR, "Failed to reserve IO region 0x%lx\n", io_port); goto failed; } /* store port base to indicate we have registered it */ @@ -4520,7 +4520,7 @@ acb->irq_level = irq; /* get eeprom configuration information and command line settings etc */ - check_eeprom(&acb->eeprom, (u16)io_port); + check_eeprom(&acb->eeprom, io_port); print_eeprom_settings(&acb->eeprom); /* setup adapter control block */ @@ -4638,8 +4638,8 @@ SPRINTF("SCSI Host Nr %i, ", host->host_no); SPRINTF("DC395U/UW/F DC315/U %s\n", (acb->config & HCC_WIDE_CARD) ? "Wide" : ""); - SPRINTF("io_port_base 0x%04x, ", acb->io_port_base); - SPRINTF("irq_level 0x%02x, ", acb->irq_level); + SPRINTF("io_port_base 0x%04lx, ", acb->io_port_base); + SPRINTF("irq_level 0x%04x, ", acb->irq_level); SPRINTF(" SelTimeout %ims\n", (1638 * acb->sel_timeout) / 1000); SPRINTF("MaxID %i, MaxLUN %i, ", host->max_id, host->max_lun); @@ -4792,11 +4792,11 @@ static int __devinit dc395x_init_one(struct pci_dev *dev, const struct pci_device_id *id) { - struct Scsi_Host *scsi_host; - struct AdapterCtlBlk *acb; - unsigned int io_port_base; + struct Scsi_Host *scsi_host = NULL; + struct AdapterCtlBlk *acb = NULL; + unsigned long io_port_base; unsigned int io_port_len; - u8 irq; + unsigned int irq; dprintkdbg(DBG_0, "Init one instance (%s)\n", pci_name(dev)); banner_display(); @@ -4809,23 +4809,23 @@ io_port_base = pci_resource_start(dev, 0) & PCI_BASE_ADDRESS_IO_MASK; io_port_len = pci_resource_len(dev, 0); irq = dev->irq; - dprintkdbg(DBG_0, "IO_PORT=%04x, IRQ=%x\n", io_port_base, dev->irq); + dprintkdbg(DBG_0, "IO_PORT=0x%04lx, IRQ=0x%x\n", io_port_base, dev->irq); /* allocate scsi host information (includes out adapter) */ scsi_host = scsi_host_alloc(&dc395x_driver_template, sizeof(struct AdapterCtlBlk)); if (!scsi_host) { dprintkl(KERN_INFO, "scsi_host_alloc failed\n"); - return -ENOMEM; + goto fail; } acb = (struct AdapterCtlBlk*)scsi_host->hostdata; acb->scsi_host = scsi_host; + acb->dev = dev; /* initialise the adapter and everything we need */ if (adapter_init(acb, io_port_base, io_port_len, irq)) { dprintkl(KERN_INFO, "adapter init failed\n"); - scsi_host_put(scsi_host); - return -ENODEV; + goto fail; } pci_set_master(dev); @@ -4833,14 +4833,20 @@ /* get the scsi mid level to scan for new devices on the bus */ if (scsi_add_host(scsi_host, &dev->dev)) { dprintkl(KERN_ERR, "scsi_add_host failed\n"); - adapter_uninit(acb); - scsi_host_put(scsi_host); - return -ENODEV; + goto fail; } pci_set_drvdata(dev, scsi_host); scsi_scan_host(scsi_host); return 0; + +fail: + if (acb != NULL) + adapter_uninit(acb); + if (scsi_host != NULL) + scsi_host_put(scsi_host); + pci_disable_device(dev); + return -ENODEV; } @@ -4859,6 +4865,7 @@ scsi_remove_host(scsi_host); adapter_uninit(acb); + pci_disable_device(dev); scsi_host_put(scsi_host); pci_set_drvdata(dev, NULL); } diff -Nru a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c --- a/drivers/scsi/dpt_i2o.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/scsi/dpt_i2o.c 2004-11-29 21:22:08 -08:00 @@ -872,8 +872,8 @@ ulong base_addr1_phys = 0; u32 hba_map0_area_size = 0; u32 hba_map1_area_size = 0; - ulong base_addr_virt = 0; - ulong msg_addr_virt = 0; + void __iomem *base_addr_virt = NULL; + void __iomem *msg_addr_virt = NULL; int raptorFlag = FALSE; int i; @@ -907,17 +907,17 @@ } - base_addr_virt = (ulong)ioremap(base_addr0_phys,hba_map0_area_size); - if(base_addr_virt == 0) { + base_addr_virt = ioremap(base_addr0_phys,hba_map0_area_size); + if (!base_addr_virt) { PERROR("dpti: adpt_config_hba: io remap failed\n"); return -EINVAL; } if(raptorFlag == TRUE) { - msg_addr_virt = (ulong)ioremap(base_addr1_phys, hba_map1_area_size ); - if(msg_addr_virt == 0) { + msg_addr_virt = ioremap(base_addr1_phys, hba_map1_area_size ); + if (!msg_addr_virt) { PERROR("dpti: adpt_config_hba: io remap failed on BAR1\n"); - iounmap((void*)base_addr_virt); + iounmap(base_addr_virt); return -EINVAL; } } else { @@ -928,9 +928,9 @@ pHba = kmalloc(sizeof(adpt_hba), GFP_KERNEL); if( pHba == NULL) { if(msg_addr_virt != base_addr_virt){ - iounmap((void*)msg_addr_virt); + iounmap(msg_addr_virt); } - iounmap((void*)base_addr_virt); + iounmap(base_addr_virt); return -ENOMEM; } memset(pHba, 0, sizeof(adpt_hba)); @@ -961,10 +961,10 @@ // Set up the Virtual Base Address of the I2O Device pHba->base_addr_virt = base_addr_virt; - pHba->msg_addr_virt = msg_addr_virt; - pHba->irq_mask = (ulong)(base_addr_virt+0x30); - pHba->post_port = (ulong)(base_addr_virt+0x40); - pHba->reply_port = (ulong)(base_addr_virt+0x44); + pHba->msg_addr_virt = msg_addr_virt; + pHba->irq_mask = base_addr_virt+0x30; + pHba->post_port = base_addr_virt+0x40; + pHba->reply_port = base_addr_virt+0x44; pHba->hrt = NULL; pHba->lct = NULL; @@ -980,12 +980,12 @@ spin_lock_init(&adpt_post_wait_lock); if(raptorFlag == 0){ - printk(KERN_INFO"Adaptec I2O RAID controller %d at %lx size=%x irq=%d\n", + printk(KERN_INFO"Adaptec I2O RAID controller %d at %p size=%x irq=%d\n", hba_count-1, base_addr_virt, hba_map0_area_size, pDev->irq); } else { printk(KERN_INFO"Adaptec I2O RAID controller %d irq=%d\n",hba_count-1, pDev->irq); - printk(KERN_INFO" BAR0 %lx - size= %x\n",base_addr_virt,hba_map0_area_size); - printk(KERN_INFO" BAR1 %lx - size= %x\n",msg_addr_virt,hba_map1_area_size); + printk(KERN_INFO" BAR0 %p - size= %x\n",base_addr_virt,hba_map0_area_size); + printk(KERN_INFO" BAR1 %p - size= %x\n",msg_addr_virt,hba_map1_area_size); } if (request_irq (pDev->irq, adpt_isr, SA_SHIRQ, pHba->name, pHba)) { @@ -1036,9 +1036,9 @@ hba_count--; up(&adpt_configuration_lock); - iounmap((void*)pHba->base_addr_virt); + iounmap(pHba->base_addr_virt); if(pHba->msg_addr_virt != pHba->base_addr_virt){ - iounmap((void*)pHba->msg_addr_virt); + iounmap(pHba->msg_addr_virt); } if(pHba->hrt) { kfree(pHba->hrt); @@ -1222,7 +1222,7 @@ { u32 m = EMPTY_QUEUE; - u32 *msg; + u32 __iomem *msg; ulong timeout = jiffies + 30*HZ; do { rmb(); @@ -1238,7 +1238,7 @@ schedule_timeout(1); } while(m == EMPTY_QUEUE); - msg = (u32*) (pHba->msg_addr_virt + m); + msg = pHba->msg_addr_virt + m; memcpy_toio(msg, data, len); wmb(); @@ -2638,7 +2638,7 @@ static s32 adpt_send_nop(adpt_hba*pHba,u32 m) { - u32 *msg; + u32 __iomem *msg; ulong timeout = jiffies + 5*HZ; while(m == EMPTY_QUEUE){ @@ -2654,7 +2654,7 @@ set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout(1); } - msg = (u32*)(pHba->msg_addr_virt + m); + msg = (u32 __iomem *)(pHba->msg_addr_virt + m); writel( THREE_WORD_MSG_SIZE | SGL_OFFSET_0,&msg[0]); writel( I2O_CMD_UTIL_NOP << 24 | HOST_TID << 12 | 0,&msg[1]); writel( 0,&msg[2]); @@ -2668,7 +2668,7 @@ static s32 adpt_i2o_init_outbound_q(adpt_hba* pHba) { u8 *status; - u32 *msg = NULL; + u32 __iomem *msg = NULL; int i; ulong timeout = jiffies + TMOUT_INITOUTBOUND*HZ; u32* ptr; @@ -2690,7 +2690,7 @@ schedule_timeout(1); } while(m == EMPTY_QUEUE); - msg=(u32 *)(pHba->msg_addr_virt+m); + msg=(u32 __iomem *)(pHba->msg_addr_virt+m); status = kmalloc(4,GFP_KERNEL|ADDR32); if (status==NULL) { @@ -2775,7 +2775,7 @@ { ulong timeout; u32 m; - u32 *msg; + u32 __iomem *msg; u8 *status_block=NULL; ulong status_block_bus; @@ -2809,7 +2809,7 @@ } while(m==EMPTY_QUEUE); - msg=(u32*)(pHba->msg_addr_virt+m); + msg=(u32 __iomem *)(pHba->msg_addr_virt+m); writel(NINE_WORD_MSG_SIZE|SGL_OFFSET_0, &msg[0]); writel(I2O_CMD_STATUS_GET<<24|HOST_TID<<12|ADAPTER_TID, &msg[1]); diff -Nru a/drivers/scsi/dpti.h b/drivers/scsi/dpti.h --- a/drivers/scsi/dpti.h 2004-11-29 21:22:06 -08:00 +++ b/drivers/scsi/dpti.h 2004-11-29 21:22:06 -08:00 @@ -228,12 +228,12 @@ char name[32]; char detail[55]; - ulong base_addr_virt; - ulong msg_addr_virt; + void __iomem *base_addr_virt; + void __iomem *msg_addr_virt; ulong base_addr_phys; - ulong post_port; - ulong reply_port; - ulong irq_mask; + void __iomem *post_port; + void __iomem *reply_port; + void __iomem *irq_mask; u16 post_count; u32 post_fifo_size; u32 reply_fifo_size; @@ -251,12 +251,12 @@ struct adpt_channel channel[MAX_CHANNEL]; struct proc_dir_entry* proc_entry; /* /proc dir */ - ulong FwDebugBuffer_P; // Virtual Address Of FW Debug Buffer + void __iomem *FwDebugBuffer_P; // Virtual Address Of FW Debug Buffer u32 FwDebugBufferSize; // FW Debug Buffer Size In Bytes - ulong FwDebugStrLength_P; // Virtual Addr Of FW Debug String Len - ulong FwDebugFlags_P; // Virtual Address Of FW Debug Flags - ulong FwDebugBLEDflag_P; // Virtual Addr Of FW Debug BLED - ulong FwDebugBLEDvalue_P; // Virtual Addr Of FW Debug BLED + void __iomem *FwDebugStrLength_P;// Virtual Addr Of FW Debug String Len + void __iomem *FwDebugFlags_P; // Virtual Address Of FW Debug Flags + void __iomem *FwDebugBLEDflag_P;// Virtual Addr Of FW Debug BLED + void __iomem *FwDebugBLEDvalue_P;// Virtual Addr Of FW Debug BLED u32 FwDebugFlags; } adpt_hba; diff -Nru a/drivers/scsi/dtc.c b/drivers/scsi/dtc.c --- a/drivers/scsi/dtc.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/scsi/dtc.c 2004-11-29 21:22:08 -08:00 @@ -219,44 +219,58 @@ { static int current_override = 0, current_base = 0; struct Scsi_Host *instance; - unsigned int base; + unsigned int addr; + void __iomem *base; int sig, count; tpnt->proc_name = "dtc3x80"; tpnt->proc_info = &dtc_proc_info; for (count = 0; current_override < NO_OVERRIDES; ++current_override) { - base = 0; + addr = 0; + base = NULL; - if (overrides[current_override].address) - base = overrides[current_override].address; - else - for (; !base && (current_base < NO_BASES); ++current_base) { + if (overrides[current_override].address) { + addr = overrides[current_override].address; + base = ioremap(addr, 0x2000); + if (!base) + addr = 0; + } else + for (; !addr && (current_base < NO_BASES); ++current_base) { #if (DTCDEBUG & DTCDEBUG_INIT) printk("scsi-dtc : probing address %08x\n", bases[current_base].address); #endif - for (sig = 0; sig < NO_SIGNATURES; ++sig) - if (!bases[current_base].noauto && isa_check_signature(bases[current_base].address + signatures[sig].offset, signatures[sig].string, strlen(signatures[sig].string))) { - base = bases[current_base].address; + if (bases[current_base].noauto) + continue; + base = ioremap(bases[current_base].address, 0x2000); + if (!base) + continue; + for (sig = 0; sig < NO_SIGNATURES; ++sig) { + if (check_signature(base + signatures[sig].offset, signatures[sig].string, strlen(signatures[sig].string))) { + addr = bases[current_base].address; #if (DTCDEBUG & DTCDEBUG_INIT) printk("scsi-dtc : detected board.\n"); #endif - break; + goto found; } + } + iounmap(base); } #if defined(DTCDEBUG) && (DTCDEBUG & DTCDEBUG_INIT) - printk("scsi-dtc : base = %08x\n", base); + printk("scsi-dtc : base = %08x\n", addr); #endif - if (!base) + if (!addr) break; +found: instance = scsi_register(tpnt, sizeof(struct NCR5380_hostdata)); if (instance == NULL) break; - instance->base = base; + instance->base = addr; + ((struct NCR5380_hostdata *)(instance)->hostdata)->base = base; NCR5380_init(instance, 0); @@ -372,7 +386,7 @@ while (NCR5380_read(DTC_CONTROL_REG) & CSR_HOST_BUF_NOT_RDY) ++i; rtrc(3); - isa_memcpy_fromio(d, base + DTC_DATA_BUF, 128); + memcpy_fromio(d, base + DTC_DATA_BUF, 128); d += 128; len -= 128; rtrc(7); @@ -423,7 +437,7 @@ while (NCR5380_read(DTC_CONTROL_REG) & CSR_HOST_BUF_NOT_RDY) ++i; rtrc(3); - isa_memcpy_toio(base + DTC_DATA_BUF, src, 128); + memcpy_toio(base + DTC_DATA_BUF, src, 128); src += 128; len -= 128; } @@ -449,12 +463,15 @@ static int dtc_release(struct Scsi_Host *shost) { + NCR5380_local_declare(); + NCR5380_setup(shost); if (shost->irq) free_irq(shost->irq, NULL); NCR5380_exit(shost); if (shost->io_port && shost->n_io_port) release_region(shost->io_port, shost->n_io_port); scsi_unregister(shost); + iounmap(base); return 0; } diff -Nru a/drivers/scsi/dtc.h b/drivers/scsi/dtc.h --- a/drivers/scsi/dtc.h 2004-11-29 21:22:06 -08:00 +++ b/drivers/scsi/dtc.h 2004-11-29 21:22:06 -08:00 @@ -46,40 +46,40 @@ #endif #define NCR5380_implementation_fields \ - unsigned int base + void __iomem *base #define NCR5380_local_declare() \ - unsigned int base + void __iomem *base #define NCR5380_setup(instance) \ - base = (unsigned int)(instance)->base + base = ((struct NCR5380_hostdata *)(instance)->hostdata)->base #define DTC_address(reg) (base + DTC_5380_OFFSET + reg) #define dbNCR5380_read(reg) \ - (rval=isa_readb(DTC_address(reg)), \ - (((unsigned char) printk("DTC : read register %d at addr %08x is: %02x\n"\ - , (reg), (int)DTC_address(reg), rval)), rval ) ) + (rval=readb(DTC_address(reg)), \ + (((unsigned char) printk("DTC : read register %d at addr %p is: %02x\n"\ + , (reg), DTC_address(reg), rval)), rval ) ) #define dbNCR5380_write(reg, value) do { \ - printk("DTC : write %02x to register %d at address %08x\n", \ - (value), (reg), (int)DTC_address(reg)); \ - isa_writeb(value, DTC_address(reg));} while(0) + printk("DTC : write %02x to register %d at address %p\n", \ + (value), (reg), DTC_address(reg)); \ + writeb(value, DTC_address(reg));} while(0) #if !(DTCDEBUG & DTCDEBUG_TRANSFER) -#define NCR5380_read(reg) (isa_readb(DTC_address(reg))) -#define NCR5380_write(reg, value) (isa_writeb(value, DTC_address(reg))) +#define NCR5380_read(reg) (readb(DTC_address(reg))) +#define NCR5380_write(reg, value) (writeb(value, DTC_address(reg))) #else -#define NCR5380_read(reg) (isa_readb(DTC_address(reg))) +#define NCR5380_read(reg) (readb(DTC_address(reg))) #define xNCR5380_read(reg) \ - (((unsigned char) printk("DTC : read register %d at address %08x\n"\ - , (reg), DTC_address(reg))), isa_readb(DTC_address(reg))) + (((unsigned char) printk("DTC : read register %d at address %p\n"\ + , (reg), DTC_address(reg))), readb(DTC_address(reg))) #define NCR5380_write(reg, value) do { \ - printk("DTC : write %02x to register %d at address %08x\n", \ - (value), (reg), (int)DTC_address(reg)); \ - isa_writeb(value, DTC_address(reg));} while(0) + printk("DTC : write %02x to register %d at address %p\n", \ + (value), (reg), DTC_address(reg)); \ + writeb(value, DTC_address(reg));} while(0) #endif #define NCR5380_intr dtc_intr diff -Nru a/drivers/scsi/fdomain.c b/drivers/scsi/fdomain.c --- a/drivers/scsi/fdomain.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/scsi/fdomain.c 2004-11-29 21:22:08 -08:00 @@ -384,6 +384,7 @@ /* .bss will zero all the static variables below */ static int port_base; static unsigned long bios_base; +static void __iomem * bios_mem; static int bios_major; static int bios_minor; static int PCI_bus; @@ -458,7 +459,7 @@ */ -struct signature { +static struct signature { const char *signature; int sig_offset; int sig_length; @@ -676,12 +677,15 @@ printk( "scsi: fdomain_isa_detect:" ); #endif - for (i = 0; !bios_base && i < ADDRESS_COUNT; i++) { + for (i = 0; i < ADDRESS_COUNT; i++) { + void __iomem *p = ioremap(addresses[i], 0x2000); + if (!p) + continue; #if DEBUG_DETECT printk( " %lx(%lx),", addresses[i], bios_base ); #endif - for (j = 0; !bios_base && j < SIGNATURE_COUNT; j++) { - if (isa_check_signature(addresses[i] + signatures[j].sig_offset, + for (j = 0; j < SIGNATURE_COUNT; j++) { + if (check_signature(p + signatures[j].sig_offset, signatures[j].signature, signatures[j].sig_length )) { bios_major = signatures[j].major_bios_version; @@ -689,10 +693,14 @@ PCI_bus = (signatures[j].flag == 1); Quantum = (signatures[j].flag > 1) ? signatures[j].flag : 0; bios_base = addresses[i]; + bios_mem = p; + goto found; } } + iounmap(p); } - + +found: if (bios_major == 2) { /* The TMC-1660/TMC-1680 has a RAM area just after the BIOS ROM. Assuming the ROM is enabled (otherwise we wouldn't have been @@ -705,13 +713,13 @@ switch (Quantum) { case 2: /* ISA_200S */ case 3: /* ISA_250MG */ - base = isa_readb(bios_base + 0x1fa2) + (isa_readb(bios_base + 0x1fa3) << 8); + base = readb(bios_mem + 0x1fa2) + (readb(bios_mem + 0x1fa3) << 8); break; case 4: /* ISA_200S (another one) */ - base = isa_readb(bios_base + 0x1fa3) + (isa_readb(bios_base + 0x1fa4) << 8); + base = readb(bios_mem + 0x1fa3) + (readb(bios_mem + 0x1fa4) << 8); break; default: - base = isa_readb(bios_base + 0x1fcc) + (isa_readb(bios_base + 0x1fcd) << 8); + base = readb(bios_mem + 0x1fcc) + (readb(bios_mem + 0x1fcd) << 8); break; } @@ -1611,26 +1619,26 @@ case 2: /* ISA_200S */ /* The value of 25 has never been verified. It should probably be 15. */ - offset = bios_base + 0x1f33 + drive * 25; + offset = 0x1f33 + drive * 25; break; case 3: /* ISA_250MG */ - offset = bios_base + 0x1f36 + drive * 15; + offset = 0x1f36 + drive * 15; break; case 4: /* ISA_200S (another one) */ - offset = bios_base + 0x1f34 + drive * 15; + offset = 0x1f34 + drive * 15; break; default: - offset = bios_base + 0x1f31 + drive * 25; + offset = 0x1f31 + drive * 25; break; } - isa_memcpy_fromio( &i, offset, sizeof( struct drive_info ) ); + memcpy_fromio( &i, bios_mem + offset, sizeof( struct drive_info ) ); info_array[0] = i.heads; info_array[1] = i.sectors; info_array[2] = i.cylinders; } else if (bios_major == 3 && bios_minor >= 0 && bios_minor < 4) { /* 3.0 and 3.2 BIOS */ - memcpy_fromio( &i, bios_base + 0x1f71 + drive * 10, + memcpy_fromio( &i, bios_mem + 0x1f71 + drive * 10, sizeof( struct drive_info ) ); info_array[0] = i.heads + 1; info_array[1] = i.sectors; diff -Nru a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c --- a/drivers/scsi/hosts.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/scsi/hosts.c 2004-11-29 21:22:06 -08:00 @@ -50,11 +50,6 @@ .release = scsi_host_cls_release, }; -static int scsi_device_cancel_cb(struct device *dev, void *data) -{ - return scsi_device_cancel(to_scsi_device(dev), *(int *)data); -} - /** * scsi_host_cancel - cancel outstanding IO to this host * @shost: pointer to struct Scsi_Host @@ -62,9 +57,12 @@ **/ void scsi_host_cancel(struct Scsi_Host *shost, int recovery) { + struct scsi_device *sdev; + set_bit(SHOST_CANCEL, &shost->shost_state); - device_for_each_child(&shost->shost_gendev, &recovery, - scsi_device_cancel_cb); + shost_for_each_device(sdev, shost) { + scsi_device_cancel(sdev, recovery); + } wait_event(shost->host_wait, (!test_bit(SHOST_RECOVERY, &shost->shost_state))); } diff -Nru a/drivers/scsi/ibmvscsi/rpa_vscsi.c b/drivers/scsi/ibmvscsi/rpa_vscsi.c --- a/drivers/scsi/ibmvscsi/rpa_vscsi.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/scsi/ibmvscsi/rpa_vscsi.c 2004-11-29 21:22:08 -08:00 @@ -204,7 +204,7 @@ } queue->cur = 0; - queue->lock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&queue->lock); tasklet_init(&hostdata->srp_task, (void *)ibmvscsi_task, (unsigned long)hostdata); diff -Nru a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c --- a/drivers/scsi/ide-scsi.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/scsi/ide-scsi.c 2004-11-29 21:22:07 -08:00 @@ -891,7 +891,7 @@ if (rq) kfree (rq); cmd->result = DID_ERROR << 16; done(cmd); - return 1; + return 0; } static int idescsi_eh_abort (struct scsi_cmnd *cmd) diff -Nru a/drivers/scsi/initio.c b/drivers/scsi/initio.c --- a/drivers/scsi/initio.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/scsi/initio.c 2004-11-29 21:22:07 -08:00 @@ -679,7 +679,7 @@ pCurHcb->HCS_NumScbs = tul_num_scb; pCurHcb->HCS_Semaph = 1; - pCurHcb->HCS_SemaphLock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&pCurHcb->HCS_SemaphLock); pCurHcb->HCS_JSStatus0 = 0; pCurHcb->HCS_Scb = scbp; pCurHcb->HCS_NxtPend = scbp; @@ -694,7 +694,7 @@ pCurHcb->HCS_ScbEnd = pTmpScb; pCurHcb->HCS_FirstAvail = scbp; pCurHcb->HCS_LastAvail = pPrevScb; - pCurHcb->HCS_AvailLock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&pCurHcb->HCS_AvailLock); pCurHcb->HCS_FirstPend = NULL; pCurHcb->HCS_LastPend = NULL; pCurHcb->HCS_FirstBusy = NULL; diff -Nru a/drivers/scsi/mac53c94.c b/drivers/scsi/mac53c94.c --- a/drivers/scsi/mac53c94.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/scsi/mac53c94.c 2004-11-29 21:22:06 -08:00 @@ -41,9 +41,9 @@ }; struct fsc_state { - struct mac53c94_regs *regs; + struct mac53c94_regs __iomem *regs; int intr; - struct dbdma_regs *dma; + struct dbdma_regs __iomem *dma; int dmaintr; int clk_freq; struct Scsi_Host *host; @@ -106,10 +106,10 @@ static int mac53c94_host_reset(struct scsi_cmnd *cmd) { struct fsc_state *state = (struct fsc_state *) cmd->device->host->hostdata; - struct mac53c94_regs *regs = state->regs; - struct dbdma_regs *dma = state->dma; + struct mac53c94_regs __iomem *regs = state->regs; + struct dbdma_regs __iomem *dma = state->dma; - st_le32(&dma->control, (RUN|PAUSE|FLUSH|WAKE) << 16); + writel((RUN|PAUSE|FLUSH|WAKE) << 16, &dma->control); writeb(CMD_SCSI_RESET, ®s->command); /* assert RST */ udelay(100); /* leave it on for a while (>= 25us) */ writeb(CMD_RESET, ®s->command); @@ -121,8 +121,8 @@ static void mac53c94_init(struct fsc_state *state) { - struct mac53c94_regs *regs = state->regs; - struct dbdma_regs *dma = state->dma; + struct mac53c94_regs __iomem *regs = state->regs; + struct dbdma_regs __iomem *dma = state->dma; int x; writeb(state->host->this_id | CF1_PAR_ENABLE, ®s->config1); @@ -143,7 +143,7 @@ static void mac53c94_start(struct fsc_state *state) { struct scsi_cmnd *cmd; - struct mac53c94_regs *regs = state->regs; + struct mac53c94_regs __iomem *regs = state->regs; int i; if (state->phase != idle || state->current_req != NULL) @@ -191,8 +191,8 @@ static void mac53c94_interrupt(int irq, void *dev_id, struct pt_regs *ptregs) { struct fsc_state *state = (struct fsc_state *) dev_id; - struct mac53c94_regs *regs = state->regs; - struct dbdma_regs *dma = state->dma; + struct mac53c94_regs __iomem *regs = state->regs; + struct dbdma_regs __iomem *dma = state->dma; struct scsi_cmnd *cmd = state->current_req; int nb, stat, seq, intr; static int mac53c94_errors; @@ -458,10 +458,10 @@ state->pdev = pdev; state->mdev = mdev; - state->regs = (struct mac53c94_regs *) + state->regs = (struct mac53c94_regs __iomem *) ioremap(macio_resource_start(mdev, 0), 0x1000); state->intr = macio_irq(mdev, 0); - state->dma = (struct dbdma_regs *) + state->dma = (struct dbdma_regs __iomem *) ioremap(macio_resource_start(mdev, 1), 0x1000); state->dmaintr = macio_irq(mdev, 1); if (state->regs == NULL || state->dma == NULL) { diff -Nru a/drivers/scsi/megaraid/megaraid_ioctl.h b/drivers/scsi/megaraid/megaraid_ioctl.h --- a/drivers/scsi/megaraid/megaraid_ioctl.h 2004-11-29 21:22:07 -08:00 +++ b/drivers/scsi/megaraid/megaraid_ioctl.h 2004-11-29 21:22:07 -08:00 @@ -145,6 +145,8 @@ uint8_t pool_index; uint8_t free_buf; + uint8_t timedout; + } __attribute__ ((aligned(1024),packed)) uioc_t; @@ -247,6 +249,7 @@ * @pdev : pci dev; used for allocating dma'ble memory * @issue_uioc : Driver supplied routine to issue uioc_t commands * : issue_uioc(drvr_data, kioc, ISSUE/ABORT, uioc_done) + * @quiescent : flag to indicate if ioctl can be issued to this adp * @list : attach with the global list of adapters * @kioc_list : block of mem for @max_kioc number of kiocs * @kioc_pool : pool of free kiocs @@ -264,7 +267,7 @@ uint32_t unique_id; uint32_t drvr_type; unsigned long drvr_data; - uint8_t timeout; + uint16_t timeout; uint8_t max_kioc; struct pci_dev *pdev; @@ -272,6 +275,7 @@ int(*issue_uioc)(unsigned long, uioc_t *, uint32_t); /* Maintained by common module */ + uint32_t quiescent; struct list_head list; uioc_t *kioc_list; diff -Nru a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c --- a/drivers/scsi/megaraid/megaraid_mbox.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/scsi/megaraid/megaraid_mbox.c 2004-11-29 21:22:07 -08:00 @@ -10,7 +10,7 @@ * 2 of the License, or (at your option) any later version. * * FILE : megaraid_mbox.c - * Version : v2.20.4 (September 27 2004) + * Version : v2.20.4.1 (Nov 04 2004) * * Authors: * Atul Mukker @@ -1559,12 +1559,12 @@ if (scb->dma_direction == PCI_DMA_TODEVICE) { if (!scb->scp->use_sg) { // sg list not used - pci_dma_sync_single_for_cpu(adapter->pdev, ccb->buf_dma_h, + pci_dma_sync_single_for_device(adapter->pdev, ccb->buf_dma_h, scb->scp->request_bufflen, PCI_DMA_TODEVICE); } else { - pci_dma_sync_sg_for_cpu(adapter->pdev, scb->scp->request_buffer, + pci_dma_sync_sg_for_device(adapter->pdev, scb->scp->request_buffer, scb->scp->use_sg, PCI_DMA_TODEVICE); } } @@ -1623,6 +1623,7 @@ if (!scb) { // command already completed done(scp); + return 0; } return if_busy; @@ -3596,7 +3597,7 @@ adp.drvr_data = (unsigned long)adapter; adp.pdev = adapter->pdev; adp.issue_uioc = megaraid_mbox_mm_handler; - adp.timeout = 30; + adp.timeout = 300; adp.max_kioc = MBOX_MAX_USER_CMDS; if ((rval = mraid_mm_register_adp(&adp)) != 0) { diff -Nru a/drivers/scsi/megaraid/megaraid_mbox.h b/drivers/scsi/megaraid/megaraid_mbox.h --- a/drivers/scsi/megaraid/megaraid_mbox.h 2004-11-29 21:22:07 -08:00 +++ b/drivers/scsi/megaraid/megaraid_mbox.h 2004-11-29 21:22:07 -08:00 @@ -21,8 +21,8 @@ #include "megaraid_ioctl.h" -#define MEGARAID_VERSION "2.20.4.0" -#define MEGARAID_EXT_VERSION "(Release Date: Mon Sep 27 22:15:07 EDT 2004)" +#define MEGARAID_VERSION "2.20.4.1" +#define MEGARAID_EXT_VERSION "(Release Date: Thu Nov 4 17:44:59 EST 2004)" /* diff -Nru a/drivers/scsi/megaraid/megaraid_mm.c b/drivers/scsi/megaraid/megaraid_mm.c --- a/drivers/scsi/megaraid/megaraid_mm.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/scsi/megaraid/megaraid_mm.c 2004-11-29 21:22:07 -08:00 @@ -10,7 +10,7 @@ * 2 of the License, or (at your option) any later version. * * FILE : megaraid_mm.c - * Version : v2.20.2.1 (Oct 06 2004) + * Version : v2.20.2.2 (Nov 04 2004) * * Common management module */ @@ -156,6 +156,17 @@ } /* + * Check if adapter can accept ioctl. We may have marked it offline + * if any previous kioc had timedout on this controller. + */ + if (!adp->quiescent) { + con_log(CL_ANN, (KERN_WARNING + "megaraid cmm: controller cannot accept cmds due to " + "earlier errors\n" )); + return -EFAULT; + } + + /* * The following call will block till a kioc is available */ kioc = mraid_mm_alloc_kioc(adp); @@ -171,10 +182,15 @@ kioc->done = ioctl_done; /* - * Issue the IOCTL to the low level driver + * Issue the IOCTL to the low level driver. After the IOCTL completes + * release the kioc if and only if it was _not_ timedout. If it was + * timedout, that means that resources are still with low level driver. */ if ((rval = lld_ioctl(adp, kioc))) { - mraid_mm_dealloc_kioc(adp, kioc); + + if (!kioc->timedout) + mraid_mm_dealloc_kioc(adp, kioc); + return rval; } @@ -581,6 +597,7 @@ kioc->user_data = NULL; kioc->user_data_len = 0; kioc->user_pthru = NULL; + kioc->timedout = 0; return kioc; } @@ -667,6 +684,14 @@ del_timer_sync(tp); } + /* + * If the command had timedout, we mark the controller offline + * before returning + */ + if (kioc->timedout) { + adp->quiescent = 0; + } + return kioc->status; } @@ -679,6 +704,10 @@ static void ioctl_done(uioc_t *kioc) { + uint32_t adapno; + int iterator; + mraid_mmadp_t* adapter; + /* * When the kioc returns from driver, make sure it still doesn't * have ENODATA in status. Otherwise, driver will hang on wait_event @@ -691,7 +720,32 @@ kioc->status = -EINVAL; } - wake_up(&wait_q); + /* + * Check if this kioc was timedout before. If so, nobody is waiting + * on this kioc. We don't have to wake up anybody. Instead, we just + * have to free the kioc + */ + if (kioc->timedout) { + iterator = 0; + adapter = NULL; + adapno = kioc->adapno; + + con_log(CL_ANN, ( KERN_WARNING "megaraid cmm: completed " + "ioctl that was timedout before\n")); + + list_for_each_entry(adapter, &adapters_list_g, list) { + if (iterator++ == adapno) break; + } + + kioc->timedout = 0; + + if (adapter) { + mraid_mm_dealloc_kioc( adapter, kioc ); + } + } + else { + wake_up(&wait_q); + } } @@ -706,6 +760,7 @@ uioc_t *kioc = (uioc_t *)ptr; kioc->status = -ETIME; + kioc->timedout = 1; con_log(CL_ANN, (KERN_WARNING "megaraid cmm: ioctl timed out\n")); @@ -850,6 +905,7 @@ adapter->issue_uioc = lld_adp->issue_uioc; adapter->timeout = lld_adp->timeout; adapter->max_kioc = lld_adp->max_kioc; + adapter->quiescent = 1; /* * Allocate single blocks of memory for all required kiocs, diff -Nru a/drivers/scsi/megaraid/megaraid_mm.h b/drivers/scsi/megaraid/megaraid_mm.h --- a/drivers/scsi/megaraid/megaraid_mm.h 2004-11-29 21:22:06 -08:00 +++ b/drivers/scsi/megaraid/megaraid_mm.h 2004-11-29 21:22:06 -08:00 @@ -29,9 +29,9 @@ #include "megaraid_ioctl.h" -#define LSI_COMMON_MOD_VERSION "2.20.2.1" +#define LSI_COMMON_MOD_VERSION "2.20.2.2" #define LSI_COMMON_MOD_EXT_VERSION \ - "(Release Date: Wed Oct 06 11:15:29 EDT 2004)" + "(Release Date: Thu Nov 4 17:46:29 EST 2004)" #define LSI_DBGLVL dbglevel diff -Nru a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c --- a/drivers/scsi/megaraid.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/scsi/megaraid.c 2004-11-29 21:22:06 -08:00 @@ -634,11 +634,7 @@ } if(!(scb = mega_allocate_scb(adapter, cmd))) { - - cmd->result = (DID_ERROR << 16); - cmd->scsi_done(cmd); *busy = 1; - return NULL; } @@ -677,11 +673,7 @@ /* Allocate a SCB and initialize passthru */ if(!(scb = mega_allocate_scb(adapter, cmd))) { - - cmd->result = (DID_ERROR << 16); - cmd->scsi_done(cmd); *busy = 1; - return NULL; } pthru = scb->pthru; @@ -723,11 +715,7 @@ /* Allocate a SCB and initialize mailbox */ if(!(scb = mega_allocate_scb(adapter, cmd))) { - - cmd->result = (DID_ERROR << 16); - cmd->scsi_done(cmd); *busy = 1; - return NULL; } mbox = (mbox_t *)scb->raw_mbox; @@ -867,11 +855,7 @@ /* Allocate a SCB and initialize mailbox */ if(!(scb = mega_allocate_scb(adapter, cmd))) { - - cmd->result = (DID_ERROR << 16); - cmd->scsi_done(cmd); *busy = 1; - return NULL; } @@ -899,11 +883,7 @@ else { /* Allocate a SCB and initialize passthru */ if(!(scb = mega_allocate_scb(adapter, cmd))) { - - cmd->result = (DID_ERROR << 16); - cmd->scsi_done(cmd); *busy = 1; - return NULL; } diff -Nru a/drivers/scsi/mesh.c b/drivers/scsi/mesh.c --- a/drivers/scsi/mesh.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/scsi/mesh.c 2004-11-29 21:22:08 -08:00 @@ -144,9 +144,9 @@ }; struct mesh_state { - volatile struct mesh_regs *mesh; + volatile struct mesh_regs __iomem *mesh; int meshintr; - volatile struct dbdma_regs *dma; + volatile struct dbdma_regs __iomem *dma; int dmaintr; struct Scsi_Host *host; struct mesh_state *next; @@ -304,8 +304,8 @@ static void mesh_dump_regs(struct mesh_state *ms) { - volatile struct mesh_regs *mr = ms->mesh; - volatile struct dbdma_regs *md = ms->dma; + volatile struct mesh_regs __iomem *mr = ms->mesh; + volatile struct dbdma_regs __iomem *md = ms->dma; int t; struct mesh_target *tp; @@ -338,7 +338,7 @@ /* * Flush write buffers on the bus path to the mesh */ -static inline void mesh_flush_io(volatile struct mesh_regs *mr) +static inline void mesh_flush_io(volatile struct mesh_regs __iomem *mr) { (void)in_8(&mr->mesh_id); } @@ -359,8 +359,8 @@ */ static void mesh_init(struct mesh_state *ms) { - volatile struct mesh_regs *mr = ms->mesh; - volatile struct dbdma_regs *md = ms->dma; + volatile struct mesh_regs __iomem *mr = ms->mesh; + volatile struct dbdma_regs __iomem *md = ms->dma; mesh_flush_io(mr); udelay(100); @@ -406,7 +406,7 @@ static void mesh_start_cmd(struct mesh_state *ms, struct scsi_cmnd *cmd) { - volatile struct mesh_regs *mr = ms->mesh; + volatile struct mesh_regs __iomem *mr = ms->mesh; int t, id; id = cmd->device->id; @@ -467,7 +467,7 @@ dlog(ms, "intr b4 arb, intr/exc/err/fc=%.8x", MKWORD(mr->interrupt, mr->exception, mr->error, mr->fifo_count)); - mesh_interrupt(0, (void *)ms, 0); + mesh_interrupt(0, (void *)ms, NULL); if (ms->phase != arbitrating) return; } @@ -505,7 +505,7 @@ dlog(ms, "intr after disresel, intr/exc/err/fc=%.8x", MKWORD(mr->interrupt, mr->exception, mr->error, mr->fifo_count)); - mesh_interrupt(0, (void *)ms, 0); + mesh_interrupt(0, (void *)ms, NULL); if (ms->phase != arbitrating) return; dlog(ms, "after intr after disresel, intr/exc/err/fc=%.8x", @@ -595,8 +595,8 @@ struct mesh_target *tp = &ms->tgts[ms->conn_tgt]; cmd = ms->current_req; - ms->current_req = 0; - tp->current_req = 0; + ms->current_req = NULL; + tp->current_req = NULL; if (cmd) { cmd->result = (ms->stat << 16) + cmd->SCp.Status; if (ms->stat == DID_OK) @@ -638,7 +638,7 @@ static void set_sdtr(struct mesh_state *ms, int period, int offset) { struct mesh_target *tp = &ms->tgts[ms->conn_tgt]; - volatile struct mesh_regs *mr = ms->mesh; + volatile struct mesh_regs __iomem *mr = ms->mesh; int v, tr; tp->sdtr_state = sdtr_done; @@ -679,8 +679,8 @@ static void start_phase(struct mesh_state *ms) { int i, seq, nb; - volatile struct mesh_regs *mr = ms->mesh; - volatile struct dbdma_regs *md = ms->dma; + volatile struct mesh_regs __iomem *mr = ms->mesh; + volatile struct dbdma_regs __iomem *md = ms->dma; struct scsi_cmnd *cmd = ms->current_req; struct mesh_target *tp = &ms->tgts[ms->conn_tgt]; @@ -823,7 +823,7 @@ static inline void get_msgin(struct mesh_state *ms) { - volatile struct mesh_regs *mr = ms->mesh; + volatile struct mesh_regs __iomem *mr = ms->mesh; int i, n; n = mr->fifo_count; @@ -855,7 +855,7 @@ static void reselected(struct mesh_state *ms) { - volatile struct mesh_regs *mr = ms->mesh; + volatile struct mesh_regs __iomem *mr = ms->mesh; struct scsi_cmnd *cmd; struct mesh_target *tp; int b, t, prev; @@ -988,7 +988,7 @@ int tgt; struct mesh_target *tp; struct scsi_cmnd *cmd; - volatile struct mesh_regs *mr = ms->mesh; + volatile struct mesh_regs __iomem *mr = ms->mesh; for (tgt = 0; tgt < 8; ++tgt) { tp = &ms->tgts[tgt]; @@ -1030,7 +1030,7 @@ static void handle_error(struct mesh_state *ms) { int err, exc, count; - volatile struct mesh_regs *mr = ms->mesh; + volatile struct mesh_regs __iomem *mr = ms->mesh; err = in_8(&mr->error); exc = in_8(&mr->exception); @@ -1124,7 +1124,7 @@ static void handle_exception(struct mesh_state *ms) { int exc; - volatile struct mesh_regs *mr = ms->mesh; + volatile struct mesh_regs __iomem *mr = ms->mesh; exc = in_8(&mr->exception); out_8(&mr->interrupt, INT_EXCEPTION | INT_CMDDONE); @@ -1231,8 +1231,8 @@ } else if (code != cmd->device->lun + IDENTIFY_BASE) { printk(KERN_WARNING "mesh: lun mismatch " "(%d != %d) on reselection from " - "target %d\n", i, cmd->device->lun, - ms->conn_tgt); + "target %d\n", code - IDENTIFY_BASE, + cmd->device->lun, ms->conn_tgt); } break; } @@ -1324,8 +1324,8 @@ static void halt_dma(struct mesh_state *ms) { - volatile struct dbdma_regs *md = ms->dma; - volatile struct mesh_regs *mr = ms->mesh; + volatile struct dbdma_regs __iomem *md = ms->dma; + volatile struct mesh_regs __iomem *mr = ms->mesh; struct scsi_cmnd *cmd = ms->current_req; int t, nb; @@ -1373,7 +1373,7 @@ static void phase_mismatch(struct mesh_state *ms) { - volatile struct mesh_regs *mr = ms->mesh; + volatile struct mesh_regs __iomem *mr = ms->mesh; int phase; dlog(ms, "phasemm ch/cl/seq/fc=%.8x", @@ -1452,7 +1452,7 @@ static void cmd_complete(struct mesh_state *ms) { - volatile struct mesh_regs *mr = ms->mesh; + volatile struct mesh_regs __iomem *mr = ms->mesh; struct scsi_cmnd *cmd = ms->current_req; struct mesh_target *tp = &ms->tgts[ms->conn_tgt]; int seq, n, t; @@ -1618,7 +1618,7 @@ mesh_done(ms, 1); return; case disconnecting: - ms->current_req = 0; + ms->current_req = NULL; ms->phase = idle; mesh_start(ms); return; @@ -1665,7 +1665,7 @@ static void mesh_interrupt(int irq, void *dev_id, struct pt_regs *ptregs) { struct mesh_state *ms = (struct mesh_state *) dev_id; - volatile struct mesh_regs *mr = ms->mesh; + volatile struct mesh_regs __iomem *mr = ms->mesh; int intr; #if 0 @@ -1713,8 +1713,8 @@ static int mesh_host_reset(struct scsi_cmnd *cmd) { struct mesh_state *ms = (struct mesh_state *) cmd->device->host->hostdata; - volatile struct mesh_regs *mr = ms->mesh; - volatile struct dbdma_regs *md = ms->dma; + volatile struct mesh_regs __iomem *mr = ms->mesh; + volatile struct dbdma_regs __iomem *md = ms->dma; printk(KERN_DEBUG "mesh_host_reset\n"); @@ -1762,7 +1762,7 @@ struct mesh_state *ms = (struct mesh_state *)macio_get_drvdata(mdev); unsigned long flags; - if (state == mdev->ofdev.dev.power_state || state < 2) + if (state == mdev->ofdev.dev.power.power_state || state < 2) return 0; scsi_block_requests(ms->host); @@ -1777,7 +1777,7 @@ disable_irq(ms->meshintr); set_mesh_power(ms, 0); - mdev->ofdev.dev.power_state = state; + mdev->ofdev.dev.power.power_state = state; return 0; } @@ -1787,7 +1787,7 @@ struct mesh_state *ms = (struct mesh_state *)macio_get_drvdata(mdev); unsigned long flags; - if (mdev->ofdev.dev.power_state == 0) + if (mdev->ofdev.dev.power.power_state == 0) return 0; set_mesh_power(ms, 1); @@ -1798,7 +1798,7 @@ enable_irq(ms->meshintr); scsi_unblock_requests(ms->host); - mdev->ofdev.dev.power_state = 0; + mdev->ofdev.dev.power.power_state = 0; return 0; } @@ -1813,7 +1813,7 @@ static int mesh_shutdown(struct macio_dev *mdev) { struct mesh_state *ms = (struct mesh_state *)macio_get_drvdata(mdev); - volatile struct mesh_regs *mr; + volatile struct mesh_regs __iomem *mr; unsigned long flags; printk(KERN_INFO "resetting MESH scsi bus(es)\n"); @@ -1892,17 +1892,15 @@ ms->mdev = mdev; ms->pdev = pdev; - ms->mesh = (volatile struct mesh_regs *) - ioremap(macio_resource_start(mdev, 0), 0x1000); + ms->mesh = ioremap(macio_resource_start(mdev, 0), 0x1000); if (ms->mesh == NULL) { printk(KERN_ERR "mesh: can't map registers\n"); goto out_free; } - ms->dma = (volatile struct dbdma_regs *) - ioremap(macio_resource_start(mdev, 1), 0x1000); + ms->dma = ioremap(macio_resource_start(mdev, 1), 0x1000); if (ms->dma == NULL) { printk(KERN_ERR "mesh: can't map registers\n"); - iounmap((void *)ms->mesh); + iounmap(ms->mesh); goto out_free; } @@ -1934,7 +1932,7 @@ for (tgt = 0; tgt < 8; ++tgt) { ms->tgts[tgt].sdtr_state = do_sdtr; ms->tgts[tgt].sync_params = ASYNC_PARAMS; - ms->tgts[tgt].current_req = 0; + ms->tgts[tgt].current_req = NULL; } if ((cfp = (int *) get_property(mesh, "clock-frequency", NULL))) @@ -1968,8 +1966,8 @@ return 0; out_unmap: - iounmap((void *)ms->dma); - iounmap((void *)ms->mesh); + iounmap(ms->dma); + iounmap(ms->mesh); out_free: scsi_host_put(mesh_host); out_release: @@ -1994,8 +1992,8 @@ set_mesh_power(ms, 0); /* Unmap registers & dma controller */ - iounmap((void *) ms->mesh); - iounmap((void *) ms->dma); + iounmap(ms->mesh); + iounmap(ms->dma); /* Free DMA commands memory */ pci_free_consistent(macio_get_pci_dev(mdev), ms->dma_cmd_size, diff -Nru a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c --- a/drivers/scsi/ncr53c8xx.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/scsi/ncr53c8xx.c 2004-11-29 21:22:07 -08:00 @@ -950,11 +950,11 @@ ** Virtual and physical bus addresses of the chip. **---------------------------------------------------------------- */ - unsigned long vaddr; /* Virtual and bus address of */ + void __iomem *vaddr; /* Virtual and bus address of */ unsigned long paddr; /* chip's IO registers. */ unsigned long paddr2; /* On-chip RAM bus address. */ volatile /* Pointer to volatile for */ - struct ncr_reg *reg; /* memory mapped IO. */ + struct ncr_reg __iomem *reg; /* memory mapped IO. */ /*---------------------------------------------------------------- ** SCRIPTS virtual and physical bus addresses. @@ -7517,6 +7517,7 @@ if (sts != DID_OK) { unmap_scsi_data(np, cmd); done(cmd); + sts = 0; } return sts; @@ -7838,7 +7839,7 @@ if (device->slot.base_v) np->vaddr = device->slot.base_v; else - np->vaddr = (unsigned long)ioremap(device->slot.base_c, 128); + np->vaddr = ioremap(device->slot.base_c, 128); if (!np->vaddr) { printk(KERN_ERR @@ -7854,7 +7855,7 @@ * OUTB OUTW OUTL macros can be used safely. */ - np->reg = (struct ncr_reg*) np->vaddr; + np->reg = (struct ncr_reg __iomem *)np->vaddr; /* Do chip dependent initialization. */ ncr_prepare_setting(np); diff -Nru a/drivers/scsi/ncr53c8xx.h b/drivers/scsi/ncr53c8xx.h --- a/drivers/scsi/ncr53c8xx.h 2004-11-29 21:22:07 -08:00 +++ b/drivers/scsi/ncr53c8xx.h 2004-11-29 21:22:07 -08:00 @@ -70,11 +70,11 @@ u_long base_2; u_long base_c; u_long base_2_c; - u_long base_v; - u_long base_2_v; + void __iomem *base_v; + void __iomem *base_2_v; int irq; /* port and reg fields to use INB, OUTB macros */ - volatile struct ncr_reg *reg; + volatile struct ncr_reg __iomem *reg; }; /*========================================================== diff -Nru a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c --- a/drivers/scsi/nsp32.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/scsi/nsp32.c 2004-11-29 21:22:07 -08:00 @@ -970,8 +970,7 @@ data->CurrentSC = NULL; SCpnt->result = DID_NO_CONNECT << 16; done(SCpnt); - - return SCSI_MLQUEUE_HOST_BUSY; + return 0; } /* check target ID is not same as this initiator ID */ @@ -979,7 +978,7 @@ nsp32_dbg(NSP32_DEBUG_QUEUECOMMAND, "terget==host???"); SCpnt->result = DID_BAD_TARGET << 16; done(SCpnt); - return SCSI_MLQUEUE_DEVICE_BUSY; + return 0; } /* check target LUN is allowable value */ @@ -987,7 +986,7 @@ nsp32_dbg(NSP32_DEBUG_QUEUECOMMAND, "no more lun"); SCpnt->result = DID_BAD_TARGET << 16; done(SCpnt); - return SCSI_MLQUEUE_DEVICE_BUSY; + return 0; } show_command(SCpnt); @@ -1019,7 +1018,7 @@ nsp32_msg(KERN_ERR, "SGT fail"); SCpnt->result = DID_ERROR << 16; nsp32_scsi_done(SCpnt); - return SCSI_MLQUEUE_HOST_BUSY; + return 0; } /* Build IDENTIFY */ @@ -1089,7 +1088,6 @@ if (ret != TRUE) { nsp32_dbg(NSP32_DEBUG_QUEUECOMMAND, "selection fail"); nsp32_scsi_done(SCpnt); - return SCSI_MLQUEUE_DEVICE_BUSY; } return 0; diff -Nru a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c --- a/drivers/scsi/pcmcia/nsp_cs.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/scsi/pcmcia/nsp_cs.c 2004-11-29 21:22:08 -08:00 @@ -226,7 +226,7 @@ nsp_msg(KERN_DEBUG, "CurrentSC!=NULL this can't be happen"); SCpnt->result = DID_BAD_TARGET << 16; nsp_scsi_done(SCpnt); - return SCSI_MLQUEUE_HOST_BUSY; + return 0; } #if 0 @@ -273,7 +273,7 @@ nsp_dbg(NSP_DEBUG_QUEUECOMMAND, "selection fail"); SCpnt->result = DID_BUS_BUSY << 16; nsp_scsi_done(SCpnt); - return SCSI_MLQUEUE_DEVICE_BUSY; + return 0; } diff -Nru a/drivers/scsi/pcmcia/sym53c500_cs.c b/drivers/scsi/pcmcia/sym53c500_cs.c --- a/drivers/scsi/pcmcia/sym53c500_cs.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/scsi/pcmcia/sym53c500_cs.c 2004-11-29 21:22:08 -08:00 @@ -85,7 +85,7 @@ module_param(pc_debug, int, 0); #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args) static char *version = -"sym53c500_cs.c 0.9b 2004/05/10 (Bob Tracy)"; +"sym53c500_cs.c 0.9c 2004/10/27 (Bob Tracy)"; #else #define DEBUG(n, args...) #endif @@ -95,7 +95,7 @@ /* Parameters that can be set with 'insmod' */ /* Bit map of interrupts to choose from */ -static unsigned int irq_mask = 0xdeb8; /* 3, 6, 7, 9-12, 14, 15 */ +static unsigned int irq_mask = 0xdeb8; /* 3-5, 7, 9-12, 14, 15 */ static int irq_list[4] = { -1 }; module_param(irq_mask, int, 0); @@ -829,7 +829,7 @@ data = (struct sym53c500_data *)host->hostdata; if (irq_level > 0) { - if (request_irq(irq_level, SYM53C500_intr, 0, "SYM53C500", host)) { + if (request_irq(irq_level, SYM53C500_intr, SA_SHIRQ, "SYM53C500", host)) { printk("SYM53C500: unable to allocate IRQ %d\n", irq_level); goto err_free_scsi; } diff -Nru a/drivers/scsi/ql1040_fw.h b/drivers/scsi/ql1040_fw.h --- a/drivers/scsi/ql1040_fw.h 2004-11-29 21:22:08 -08:00 +++ b/drivers/scsi/ql1040_fw.h 2004-11-29 21:22:08 -08:00 @@ -28,15 +28,13 @@ * Firmware Version 7.65.00 (14:17 Jul 20, 1999) */ -unsigned short risc_code_version = 7*1024+65; - -unsigned char firmware_version[] = {7,65,0}; +static unsigned char firmware_version[] = {7,65,0}; #define FW_VERSION_STRING "7.65.0" -unsigned short risc_code_addr01 = 0x1000 ; +static unsigned short risc_code_addr01 = 0x1000 ; -unsigned short risc_code01[] = { +static unsigned short risc_code01[] = { 0x0078, 0x103a, 0x0000, 0x4057, 0x0000, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2031, 0x3939, 0x3520, 0x514c, 0x4f47, 0x4943, 0x2043, 0x4f52, 0x504f, 0x5241, 0x5449, 0x4f4e, 0x2049, 0x5350, @@ -2097,5 +2095,5 @@ 0x0014, 0x878e, 0x0016, 0xa21c, 0x1035, 0xa8af, 0xa210, 0x3807, 0x300c, 0x817e, 0x872b, 0x8772, 0xa8a8, 0x0000, 0xdf21 }; -unsigned short risc_code_length01 = 0x4057; +static unsigned short risc_code_length01 = 0x4057; diff -Nru a/drivers/scsi/ql12160_fw.h b/drivers/scsi/ql12160_fw.h --- a/drivers/scsi/ql12160_fw.h 2004-11-29 21:22:07 -08:00 +++ b/drivers/scsi/ql12160_fw.h 2004-11-29 21:22:07 -08:00 @@ -26,15 +26,9 @@ */ #ifdef UNIQUE_FW_NAME -unsigned short fw12160i_version = 10*1024+4; +static unsigned char fw12160i_version_str[] = {10,4,32}; #else -unsigned short risc_code_version = 10*1024+4; -#endif - -#ifdef UNIQUE_FW_NAME -unsigned char fw12160i_version_str[] = {10,4,32}; -#else -unsigned char firmware_version[] = {10,4,32}; +static unsigned char firmware_version[] = {10,4,32}; #endif #ifdef UNIQUE_FW_NAME @@ -44,15 +38,15 @@ #endif #ifdef UNIQUE_FW_NAME -unsigned short fw12160i_addr01 = 0x1000; +static unsigned short fw12160i_addr01 = 0x1000; #else -unsigned short risc_code_addr01 = 0x1000; +static unsigned short risc_code_addr01 = 0x1000; #endif #ifdef UNIQUE_FW_NAME -unsigned short fw12160i_code01[] = { +static unsigned short fw12160i_code01[] = { #else -unsigned short risc_code01[] = { +static unsigned short risc_code01[] = { #endif 0x0804, 0x1041, 0x0000, 0x35e6, 0x0000, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2031, 0x3939, 0x312c, 0x3139, 0x3932, 0x2c31, @@ -1781,7 +1775,7 @@ 0x681f, 0x000c, 0x70a0, 0x70a2, 0x0005, 0x7c12 }; #ifdef UNIQUE_FW_NAME -unsigned short fw12160i_length01 = 0x35e6; +static unsigned short fw12160i_length01 = 0x35e6; #else -unsigned short risc_code_length01 = 0x35e6; +static unsigned short risc_code_length01 = 0x35e6; #endif diff -Nru a/drivers/scsi/ql1280_fw.h b/drivers/scsi/ql1280_fw.h --- a/drivers/scsi/ql1280_fw.h 2004-11-29 21:22:08 -08:00 +++ b/drivers/scsi/ql1280_fw.h 2004-11-29 21:22:08 -08:00 @@ -27,15 +27,9 @@ */ #ifdef UNIQUE_FW_NAME -unsigned short fw1280ei_version = 8*1024+15; +static unsigned char fw1280ei_version_str[] = {8,15,0}; #else -unsigned short risc_code_version = 8*1024+15; -#endif - -#ifdef UNIQUE_FW_NAME -unsigned char fw1280ei_version_str[] = {8,15,0}; -#else -unsigned char firmware_version[] = {8,15,0}; +static unsigned char firmware_version[] = {8,15,0}; #endif #ifdef UNIQUE_FW_NAME @@ -45,15 +39,15 @@ #endif #ifdef UNIQUE_FW_NAME -unsigned short fw1280ei_addr01 = 0x1000; +static unsigned short fw1280ei_addr01 = 0x1000; #else -unsigned short risc_code_addr01 = 0x1000; +static unsigned short risc_code_addr01 = 0x1000; #endif #ifdef UNIQUE_FW_NAME -unsigned short fw1280ei_code01[] = { +static unsigned short fw1280ei_code01[] = { #else -unsigned short risc_code01[] = { +static unsigned short risc_code01[] = { #endif 0x0078, 0x1041, 0x0000, 0x3d3b, 0x0000, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2031, 0x3939, 0x312c, 0x3139, 0x3932, 0x2c31, @@ -2017,7 +2011,7 @@ 0x70a2, 0x007c, 0x205b }; #ifdef UNIQUE_FW_NAME -unsigned short fw1280ei_length01 = 0x3d3b; +static unsigned short fw1280ei_length01 = 0x3d3b; #else -unsigned short risc_code_length01 = 0x3d3b; +static unsigned short risc_code_length01 = 0x3d3b; #endif diff -Nru a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c --- a/drivers/scsi/scsi.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/scsi/scsi.c 2004-11-29 21:22:07 -08:00 @@ -1063,6 +1063,7 @@ /* skip devices that we can't get a reference to */ if (!scsi_device_get(next)) break; + next = NULL; list = list->next; } spin_unlock_irqrestore(shost->host_lock, flags); diff -Nru a/drivers/scsi/sd.c b/drivers/scsi/sd.c --- a/drivers/scsi/sd.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/scsi/sd.c 2004-11-29 21:22:08 -08:00 @@ -1104,6 +1104,11 @@ (buffer[9] << 16) | (buffer[10] << 8) | buffer[11]; } + /* Some devices return the total number of sectors, not the + * highest sector number. Make the necessary adjustment. */ + if (sdp->fix_capacity) + --sdkp->capacity; + got_data: if (sector_size == 0) { sector_size = 512; diff -Nru a/drivers/scsi/seagate.c b/drivers/scsi/seagate.c --- a/drivers/scsi/seagate.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/scsi/seagate.c 2004-11-29 21:22:07 -08:00 @@ -237,13 +237,13 @@ calculate memory mapped register location. */ -static unsigned long st0x_cr_sr; /* control register write, status +static void __iomem *st0x_cr_sr; /* control register write, status register read. 256 bytes in length. Read is status of SCSI BUS, as per STAT masks. */ -static unsigned long st0x_dr; /* data register, read write 256 +static void __iomem *st0x_dr; /* data register, read write 256 bytes in length. */ static volatile int st0x_aborted = 0; /* set when we are aborted, ie by a @@ -261,10 +261,10 @@ #define retcode(result) (((result) << 16) | (message << 8) | status) -#define STATUS ((u8) isa_readb(st0x_cr_sr)) -#define DATA ((u8) isa_readb(st0x_dr)) -#define WRITE_CONTROL(d) { isa_writeb((d), st0x_cr_sr); } -#define WRITE_DATA(d) { isa_writeb((d), st0x_dr); } +#define STATUS ((u8) readb(st0x_cr_sr)) +#define DATA ((u8) readb(st0x_dr)) +#define WRITE_CONTROL(d) { writeb((d), st0x_cr_sr); } +#define WRITE_DATA(d) { writeb((d), st0x_dr); } #ifndef OVERRIDE static unsigned int seagate_bases[] = { @@ -420,6 +420,7 @@ { struct Scsi_Host *instance; int i, j; + unsigned long cr, dr; tpnt->proc_name = "seagate"; /* @@ -454,12 +455,18 @@ * space for the on-board RAM instead. */ - for (i = 0; i < (sizeof (seagate_bases) / sizeof (unsigned int)); ++i) - for (j = 0; !base_address && j < NUM_SIGNATURES; ++j) - if (isa_check_signature(seagate_bases[i] + signatures[j].offset, signatures[j].signature, signatures[j].length)) { + for (i = 0; i < (sizeof (seagate_bases) / sizeof (unsigned int)); ++i) { + void __iomem *p = ioremap(seagate_bases[i], 0x2000); + if (!p) + continue; + for (j = 0; j < NUM_SIGNATURES; ++j) + if (check_signature(p + signatures[j].offset, signatures[j].signature, signatures[j].length)) { base_address = seagate_bases[i]; controller_type = signatures[j].type; + break; } + iounmap(p); + } #endif /* OVERRIDE */ } /* (! controller_type) */ @@ -471,11 +478,13 @@ return 0; } - st0x_cr_sr = base_address + (controller_type == SEAGATE ? 0x1a00 : 0x1c00); - st0x_dr = st0x_cr_sr + 0x200; + cr = base_address + (controller_type == SEAGATE ? 0x1a00 : 0x1c00); + dr = cr + 0x200; + st0x_cr_sr = ioremap(cr, 0x100); + st0x_dr = ioremap(dr, 0x100); DANY("%s detected. Base address = %x, cr = %x, dr = %x\n", - tpnt->name, base_address, st0x_cr_sr, st0x_dr); + tpnt->name, base_address, cr, dr); /* * At all times, we will use IRQ 5. Should also check for IRQ3 @@ -1140,7 +1149,7 @@ #endif "loop 1b;" /* output */ : - /* input */ :"D" (phys_to_virt (st0x_dr)), + /* input */ :"D" (st0x_dr), "S" (data), "c" (SCint->transfersize) @@ -1148,19 +1157,7 @@ : "eax", "ecx", "esi"); #else /* SEAGATE_USE_ASM */ - { -#ifdef FAST32 - unsigned int *iop = phys_to_virt (st0x_dr); - const unsigned int *dp =(unsigned int *) data; - int xferlen = transfersize >> 2; -#else - unsigned char *iop = phys_to_virt (st0x_dr); - const unsigned char *dp = data; - int xferlen = transfersize; -#endif - for (; xferlen; --xferlen) - *iop = *dp++; - } + memcpy_toio(st0x_dr, data, transfersize); #endif /* SEAGATE_USE_ASM */ /* SJT: End */ len -= transfersize; @@ -1212,10 +1209,8 @@ "=D" (__dummy_2) /* input */ : "0" (data), "1" (len), - "2" (phys_to_virt - (st0x_cr_sr)), - "3" (phys_to_virt - (st0x_dr)) + "2" (st0x_cr_sr), + "3" (st0x_dr) /* clobbered */ : "eax"); #else /* SEAGATE_USE_ASM */ @@ -1292,7 +1287,7 @@ #endif "loop 1b\n\t" /* output */ : - /* input */ :"S" (phys_to_virt (st0x_dr)), + /* input */ :"S" (st0x_dr), "D" (data), "c" (SCint->transfersize) @@ -1300,22 +1295,7 @@ : "eax", "ecx", "edi"); #else /* SEAGATE_USE_ASM */ - { -#ifdef FAST32 - const unsigned int *iop = - phys_to_virt (st0x_dr); - unsigned int *dp = - (unsigned int *) data; - int xferlen = len >> 2; -#else - const unsigned char *iop = - phys_to_virt (st0x_dr); - unsigned char *dp = data; - int xferlen = len; -#endif - for (; xferlen; --xferlen) - *dp++ = *iop; - } + memcpy_fromio(data, st0x_dr, len); #endif /* SEAGATE_USE_ASM */ /* SJT: End */ len -= transfersize; @@ -1381,10 +1361,8 @@ "=b" (__dummy_4) /* input */ : "0" (data), "1" (len), - "2" (phys_to_virt - (st0x_cr_sr)), - "3" (phys_to_virt - (st0x_dr)) + "2" (st0x_cr_sr), + "3" (st0x_dr) /* clobbered */ : "eax"); #else /* SEAGATE_USE_ASM */ diff -Nru a/drivers/scsi/sg.c b/drivers/scsi/sg.c --- a/drivers/scsi/sg.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/scsi/sg.c 2004-11-29 21:22:07 -08:00 @@ -735,6 +735,18 @@ } static int +sg_srp_done(Sg_request *srp, Sg_fd *sfp) +{ + unsigned long iflags; + int done; + + read_lock_irqsave(&sfp->rq_list_lock, iflags); + done = srp->done; + read_unlock_irqrestore(&sfp->rq_list_lock, iflags); + return done; +} + +static int sg_ioctl(struct inode *inode, struct file *filp, unsigned int cmd_in, unsigned long arg) { @@ -773,7 +785,7 @@ while (1) { result = 0; /* following macro to beat race condition */ __wait_event_interruptible(sfp->read_wait, - (sdp->detached || sfp->closed || srp->done), + (sdp->detached || sfp->closed || sg_srp_done(srp, sfp)), result); if (sdp->detached) return -ENODEV; @@ -784,7 +796,9 @@ srp->orphan = 1; return result; /* -ERESTARTSYS because signal hit process */ } + write_lock_irqsave(&sfp->rq_list_lock, iflags); srp->done = 2; + write_unlock_irqrestore(&sfp->rq_list_lock, iflags); result = sg_new_read(sfp, p, SZ_SG_IO_HDR, srp); return (result < 0) ? result : 0; } @@ -1227,6 +1241,7 @@ Sg_device *sdp = NULL; Sg_fd *sfp; Sg_request *srp = NULL; + unsigned long iflags; if (SCpnt && (SRpnt = SCpnt->sc_request)) srp = (Sg_request *) SRpnt->upper_private_data; @@ -1315,8 +1330,10 @@ if (sfp && srp) { /* Now wake up any sg_read() that is waiting for this packet. */ kill_fasync(&sfp->async_qp, SIGPOLL, POLL_IN); + write_lock_irqsave(&sfp->rq_list_lock, iflags); srp->done = 1; wake_up_interruptible(&sfp->read_wait); + write_unlock_irqrestore(&sfp->rq_list_lock, iflags); } } @@ -1510,7 +1527,7 @@ tsfp = sfp->nextfp; for (srp = sfp->headrp; srp; srp = tsrp) { tsrp = srp->nextrp; - if (sfp->closed || (0 == srp->done)) + if (sfp->closed || (0 == sg_srp_done(srp, sfp))) sg_finish_rem_req(srp); } if (sfp->closed) { @@ -2423,7 +2440,7 @@ return NULL; memset(sfp, 0, sizeof (Sg_fd)); init_waitqueue_head(&sfp->read_wait); - sfp->rq_list_lock = RW_LOCK_UNLOCKED; + rwlock_init(&sfp->rq_list_lock); sfp->timeout = SG_DEFAULT_TIMEOUT; sfp->timeout_user = SG_DEFAULT_TIMEOUT_USER; @@ -2492,7 +2509,7 @@ for (srp = sfp->headrp; srp; srp = tsrp) { tsrp = srp->nextrp; - if (srp->done) + if (sg_srp_done(srp, sfp)) sg_finish_rem_req(srp); else ++dirty; diff -Nru a/drivers/scsi/st.c b/drivers/scsi/st.c --- a/drivers/scsi/st.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/scsi/st.c 2004-11-29 21:22:07 -08:00 @@ -3131,8 +3131,9 @@ * access to the device is prohibited. */ retval = scsi_nonblockable_ioctl(STp->device, cmd_in, p, file); - if (!scsi_block_when_processing_errors(STp->device) || !retval) + if (!scsi_block_when_processing_errors(STp->device) || retval != -ENODEV) goto out; + retval = 0; cmd_type = _IOC_TYPE(cmd_in); cmd_nr = _IOC_NR(cmd_in); diff -Nru a/drivers/scsi/st.h b/drivers/scsi/st.h --- a/drivers/scsi/st.h 2004-11-29 21:22:08 -08:00 +++ b/drivers/scsi/st.h 2004-11-29 21:22:08 -08:00 @@ -67,7 +67,7 @@ u32 last_block_visited; int drv_block; /* The block where the drive head is */ int drv_file; -} ST_partstat; +}; #define ST_NBR_PARTITIONS 4 diff -Nru a/drivers/scsi/sym53c8xx_defs.h b/drivers/scsi/sym53c8xx_defs.h --- a/drivers/scsi/sym53c8xx_defs.h 2004-11-29 21:22:09 -08:00 +++ b/drivers/scsi/sym53c8xx_defs.h 2004-11-29 21:22:09 -08:00 @@ -415,42 +415,42 @@ * MEMORY mapped IO input / output */ -#define INB_OFF(o) readb_raw((char *)np->reg + ncr_offb(o)) -#define OUTB_OFF(o, val) writeb_raw((val), (char *)np->reg + ncr_offb(o)) +#define INB_OFF(o) readb_raw((char __iomem *)np->reg + ncr_offb(o)) +#define OUTB_OFF(o, val) writeb_raw((val), (char __iomem *)np->reg + ncr_offb(o)) #if defined(__BIG_ENDIAN) && !defined(SCSI_NCR_BIG_ENDIAN) -#define INW_OFF(o) readw_l2b((char *)np->reg + ncr_offw(o)) -#define INL_OFF(o) readl_l2b((char *)np->reg + (o)) +#define INW_OFF(o) readw_l2b((char __iomem *)np->reg + ncr_offw(o)) +#define INL_OFF(o) readl_l2b((char __iomem *)np->reg + (o)) -#define OUTW_OFF(o, val) writew_b2l((val), (char *)np->reg + ncr_offw(o)) -#define OUTL_OFF(o, val) writel_b2l((val), (char *)np->reg + (o)) +#define OUTW_OFF(o, val) writew_b2l((val), (char __iomem *)np->reg + ncr_offw(o)) +#define OUTL_OFF(o, val) writel_b2l((val), (char __iomem *)np->reg + (o)) #elif defined(__LITTLE_ENDIAN) && defined(SCSI_NCR_BIG_ENDIAN) -#define INW_OFF(o) readw_b2l((char *)np->reg + ncr_offw(o)) -#define INL_OFF(o) readl_b2l((char *)np->reg + (o)) +#define INW_OFF(o) readw_b2l((char __iomem *)np->reg + ncr_offw(o)) +#define INL_OFF(o) readl_b2l((char __iomem *)np->reg + (o)) -#define OUTW_OFF(o, val) writew_l2b((val), (char *)np->reg + ncr_offw(o)) -#define OUTL_OFF(o, val) writel_l2b((val), (char *)np->reg + (o)) +#define OUTW_OFF(o, val) writew_l2b((val), (char __iomem *)np->reg + ncr_offw(o)) +#define OUTL_OFF(o, val) writel_l2b((val), (char __iomem *)np->reg + (o)) #else #ifdef CONFIG_SCSI_NCR53C8XX_NO_WORD_TRANSFERS /* Only 8 or 32 bit transfers allowed */ -#define INW_OFF(o) (readb((char *)np->reg + ncr_offw(o)) << 8 | readb((char *)np->reg + ncr_offw(o) + 1)) +#define INW_OFF(o) (readb((char __iomem *)np->reg + ncr_offw(o)) << 8 | readb((char __iomem *)np->reg + ncr_offw(o) + 1)) #else -#define INW_OFF(o) readw_raw((char *)np->reg + ncr_offw(o)) +#define INW_OFF(o) readw_raw((char __iomem *)np->reg + ncr_offw(o)) #endif -#define INL_OFF(o) readl_raw((char *)np->reg + (o)) +#define INL_OFF(o) readl_raw((char __iomem *)np->reg + (o)) #ifdef CONFIG_SCSI_NCR53C8XX_NO_WORD_TRANSFERS /* Only 8 or 32 bit transfers allowed */ -#define OUTW_OFF(o, val) do { writeb((char)((val) >> 8), (char *)np->reg + ncr_offw(o)); writeb((char)(val), (char *)np->reg + ncr_offw(o) + 1); } while (0) +#define OUTW_OFF(o, val) do { writeb((char)((val) >> 8), (char __iomem *)np->reg + ncr_offw(o)); writeb((char)(val), (char __iomem *)np->reg + ncr_offw(o) + 1); } while (0) #else -#define OUTW_OFF(o, val) writew_raw((val), (char *)np->reg + ncr_offw(o)) +#define OUTW_OFF(o, val) writew_raw((val), (char __iomem *)np->reg + ncr_offw(o)) #endif -#define OUTL_OFF(o, val) writel_raw((val), (char *)np->reg + (o)) +#define OUTL_OFF(o, val) writel_raw((val), (char __iomem *)np->reg + (o)) #endif diff -Nru a/drivers/scsi/t128.c b/drivers/scsi/t128.c --- a/drivers/scsi/t128.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/scsi/t128.c 2004-11-29 21:22:08 -08:00 @@ -199,6 +199,7 @@ static int current_override = 0, current_base = 0; struct Scsi_Host *instance; unsigned long base; + void __iomem *p; int sig, count; tpnt->proc_name = "t128"; @@ -206,26 +207,34 @@ for (count = 0; current_override < NO_OVERRIDES; ++current_override) { base = 0; + p = NULL; - if (overrides[current_override].address) + if (overrides[current_override].address) { base = overrides[current_override].address; - else + p = ioremap(bases[current_base].address, 0x2000); + if (!p) + base = 0; + } else for (; !base && (current_base < NO_BASES); ++current_base) { #if (TDEBUG & TDEBUG_INIT) printk("scsi-t128 : probing address %08x\n", bases[current_base].address); #endif + if (bases[current_base].noauto) + continue; + p = ioremap(bases[current_base].address, 0x2000); + if (!p) + continue; for (sig = 0; sig < NO_SIGNATURES; ++sig) - if (!bases[current_base].noauto && - isa_check_signature(bases[current_base].address + - signatures[sig].offset, + if (check_signature(p + signatures[sig].offset, signatures[sig].string, strlen(signatures[sig].string))) { base = bases[current_base].address; #if (TDEBUG & TDEBUG_INIT) printk("scsi-t128 : detected board.\n"); #endif - break; + goto found; } + iounmap(p); } #if defined(TDEBUG) && (TDEBUG & TDEBUG_INIT) @@ -235,11 +244,13 @@ if (!base) break; +found: instance = scsi_register (tpnt, sizeof(struct NCR5380_hostdata)); if(instance == NULL) break; instance->base = base; + ((struct NCR5380_hostdata *)instance->hostdata)->base = p; NCR5380_init(instance, 0); @@ -282,12 +293,15 @@ static int t128_release(struct Scsi_Host *shost) { + NCR5380_local_declare(); + NCR5380_setup(shost); if (shost->irq) free_irq(shost->irq, NULL); NCR5380_exit(shost); if (shost->io_port && shost->n_io_port) release_region(shost->io_port, shost->n_io_port); scsi_unregister(shost); + iounmap(base); return 0; } @@ -335,28 +349,30 @@ static inline int NCR5380_pread (struct Scsi_Host *instance, unsigned char *dst, int len) { - unsigned long reg = instance->base + T_DATA_REG_OFFSET; + NCR5380_local_declare(); + void __iomem *reg; unsigned char *d = dst; register int i = len; + NCR5380_setup(instance); + reg = base + T_DATA_REG_OFFSET; #if 0 for (; i; --i) { - while (!(isa_readb(instance->base+T_STATUS_REG_OFFSET) & T_ST_RDY)) barrier(); + while (!(readb(base+T_STATUS_REG_OFFSET) & T_ST_RDY)) barrier(); #else - while (!(isa_readb(instance->base+T_STATUS_REG_OFFSET) & T_ST_RDY)) barrier(); + while (!(readb(base+T_STATUS_REG_OFFSET) & T_ST_RDY)) barrier(); for (; i; --i) { #endif - *d++ = isa_readb(reg); + *d++ = readb(reg); } - if (isa_readb(instance->base + T_STATUS_REG_OFFSET) & T_ST_TIM) { + if (readb(base + T_STATUS_REG_OFFSET) & T_ST_TIM) { unsigned char tmp; - unsigned long foo; - foo = instance->base + T_CONTROL_REG_OFFSET; - tmp = isa_readb(foo); - isa_writeb(tmp | T_CR_CT, foo); - isa_writeb(tmp, foo); + void __iomem *foo = base + T_CONTROL_REG_OFFSET; + tmp = readb(foo); + writeb(tmp | T_CR_CT, foo); + writeb(tmp, foo); printk("scsi%d : watchdog timer fired in NCR5380_pread()\n", instance->host_no); return -1; @@ -379,27 +395,30 @@ static inline int NCR5380_pwrite (struct Scsi_Host *instance, unsigned char *src, int len) { - unsigned long reg = instance->base + T_DATA_REG_OFFSET; + NCR5380_local_declare(); + void __iomem *reg; unsigned char *s = src; register int i = len; + NCR5380_setup(instance); + reg = base + T_DATA_REG_OFFSET; + #if 0 for (; i; --i) { - while (!(isa_readb(instance->base+T_STATUS_REG_OFFSET) & T_ST_RDY)) barrier(); + while (!(readb(base+T_STATUS_REG_OFFSET) & T_ST_RDY)) barrier(); #else - while (!(isa_readb(instance->base+T_STATUS_REG_OFFSET) & T_ST_RDY)) barrier(); + while (!(readb(base+T_STATUS_REG_OFFSET) & T_ST_RDY)) barrier(); for (; i; --i) { #endif - isa_writeb(*s++, reg); + writeb(*s++, reg); } - if (isa_readb(instance->base + T_STATUS_REG_OFFSET) & T_ST_TIM) { + if (readb(base + T_STATUS_REG_OFFSET) & T_ST_TIM) { unsigned char tmp; - unsigned long foo; - foo = instance->base + T_CONTROL_REG_OFFSET; - tmp = isa_readb(foo); - isa_writeb(tmp | T_CR_CT, foo); - isa_writeb(tmp, foo); + void __iomem *foo = base + T_CONTROL_REG_OFFSET; + tmp = readb(foo); + writeb(tmp | T_CR_CT, foo); + writeb(tmp, foo); printk("scsi%d : watchdog timer fired in NCR5380_pwrite()\n", instance->host_no); return -1; diff -Nru a/drivers/scsi/t128.h b/drivers/scsi/t128.h --- a/drivers/scsi/t128.h 2004-11-29 21:22:07 -08:00 +++ b/drivers/scsi/t128.h 2004-11-29 21:22:07 -08:00 @@ -111,28 +111,28 @@ #ifndef HOSTS_C #define NCR5380_implementation_fields \ - unsigned long base + void __iomem *base #define NCR5380_local_declare() \ - unsigned long base + void __iomem *base #define NCR5380_setup(instance) \ - base = (instance)->base + base = ((struct NCR5380_hostdata *)(instance->hostdata))->base #define T128_address(reg) (base + T_5380_OFFSET + ((reg) * 0x20)) #if !(TDEBUG & TDEBUG_TRANSFER) -#define NCR5380_read(reg) isa_readb(T128_address(reg)) -#define NCR5380_write(reg, value) isa_writeb((value),(T128_address(reg))) +#define NCR5380_read(reg) readb(T128_address(reg)) +#define NCR5380_write(reg, value) writeb((value),(T128_address(reg))) #else #define NCR5380_read(reg) \ (((unsigned char) printk("scsi%d : read register %d at address %08x\n"\ - , instance->hostno, (reg), T128_address(reg))), isa_readb(T128_address(reg))) + , instance->hostno, (reg), T128_address(reg))), readb(T128_address(reg))) #define NCR5380_write(reg, value) { \ printk("scsi%d : write %02x to register %d at address %08x\n", \ instance->hostno, (value), (reg), T128_address(reg)); \ - isa_writeb((value), (T128_address(reg))); \ + writeb((value), (T128_address(reg))); \ } #endif diff -Nru a/drivers/scsi/tmscsim.c b/drivers/scsi/tmscsim.c --- a/drivers/scsi/tmscsim.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/scsi/tmscsim.c 2004-11-29 21:22:08 -08:00 @@ -526,21 +526,23 @@ DC390_write8 (ScsiCmd, CLEAR_FIFO_CMD); /* Flush FIFO */ DEBUG1(printk (KERN_INFO "DC390: Start SCSI command: %02x (Sync:%02x)\n",\ scmd->cmnd[0], pDCB->SyncMode)); - disc_allowed = pDCB->DevMode & EN_DISCONNECT_; - try_sync_nego = 0; + /* Don't disconnect on AUTO_REQSENSE, cause it might be an * Contingent Allegiance Condition (6.6), where no tags should be used. * All other have to be allowed to disconnect to prevent Incorrect * Initiator Connection (6.8.2/6.5.2) */ /* Changed KG, 99/06/06 */ - if( /*(((pSRB->pcmd->cmnd[0] == INQUIRY) || (pSRB->pcmd->cmnd[0] == REQUEST_SENSE) || - * (pSRB->pcmd->cmnd[0] == TEST_UNIT_READY)) && pACB->scan_devices) - ||*/ (pSRB->SRBFlag & AUTO_REQSENSE) ) - disc_allowed = 0; - if ( (pDCB->SyncMode & SYNC_ENABLE) && (pDCB->TargetLUN == 0) && sdev->sdtr && - ( ( ( (scmd->cmnd[0] == REQUEST_SENSE) || (pSRB->SRBFlag & AUTO_REQSENSE) ) - && !(pDCB->SyncMode & SYNC_NEGO_DONE) ) || (scmd->cmnd[0] == INQUIRY) ) ) + if (! (pSRB->SRBFlag & AUTO_REQSENSE)) + disc_allowed = pDCB->DevMode & EN_DISCONNECT_; + else + disc_allowed = 0; + + if ((pDCB->SyncMode & SYNC_ENABLE) && pDCB->TargetLUN == 0 && sdev->sdtr && + (((scmd->cmnd[0] == REQUEST_SENSE || (pSRB->SRBFlag & AUTO_REQSENSE)) && + !(pDCB->SyncMode & SYNC_NEGO_DONE)) || scmd->cmnd[0] == INQUIRY)) try_sync_nego = 1; + else + try_sync_nego = 0; pSRB->MsgCnt = 0; cmd = SEL_W_ATN; @@ -548,7 +550,7 @@ /* Change 99/05/31: Don't use tags when not disconnecting (BUSY) */ if ((pDCB->SyncMode & EN_TAG_QUEUEING) && disc_allowed && scsi_populate_tag_msg(scmd, tag)) { DC390_write8(ScsiFifo, tag[0]); - pDCB->TagMask |= (1 << tag[1]); + pDCB->TagMask |= 1 << tag[1]; pSRB->TagNumber = tag[1]; DC390_write8(ScsiFifo, tag[1]); DEBUG1(printk(KERN_INFO "DC390: Select w/DisCn for Cmd %li (SRB %p), block tag %02x\n", scmd->pid, pSRB, tag[1])); @@ -556,7 +558,7 @@ } else { /* No TagQ */ //no_tag: - DEBUG1(printk(KERN_INFO "DC390: Select w%s/DisCn for Cmd %li (SRB %p), No TagQ\n", (disc_allowed ? "" : "o"), scmd->pid, pSRB)); + DEBUG1(printk(KERN_INFO "DC390: Select w%s/DisCn for Cmd %li (SRB %p), No TagQ\n", disc_allowed ? "" : "o", scmd->pid, pSRB)); } pSRB->SRBState = SRB_START_; @@ -1461,14 +1463,13 @@ } else { - u8 bval = 0; DC390_write8 (ScsiFifo, REQUEST_SENSE); pDCB = pACB->pActiveDCB; DC390_write8 (ScsiFifo, pDCB->TargetLUN << 5); - DC390_write8 (ScsiFifo, bval); - DC390_write8 (ScsiFifo, bval); + DC390_write8 (ScsiFifo, 0); + DC390_write8 (ScsiFifo, 0); DC390_write8 (ScsiFifo, sizeof(pSRB->pcmd->sense_buffer)); - DC390_write8 (ScsiFifo, bval); + DC390_write8 (ScsiFifo, 0); DEBUG0(printk(KERN_DEBUG "DC390: AutoReqSense (CmndPhase)!\n")); } pSRB->SRBState = SRB_COMMAND; @@ -1773,7 +1774,7 @@ static void dc390_SRBdone( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_srb* pSRB ) { - u8 bval, status; + u8 status; struct scsi_cmnd *pcmd; pcmd = pSRB->pcmd; @@ -1824,9 +1825,7 @@ } else if( status_byte(status) == QUEUE_FULL ) { - bval = (u8) pDCB->GoingSRBCnt; - bval--; - pDCB->MaxCommand = bval; + scsi_track_queue_full(pcmd->device, pDCB->GoingSRBCnt - 1); pcmd->use_sg = pSRB->SavedSGCount; DEBUG0 (printk ("DC390: RETRY pid %li (%02x), target %02i-%02i\n", pcmd->pid, pcmd->cmnd[0], pcmd->device->id, pcmd->device->lun)); pSRB->TotalXferredLen = 0; @@ -1974,7 +1973,7 @@ struct dc390_dcb *dcb = sdev->hostdata; struct dc390_srb *srb; - if (dcb->MaxCommand <= dcb->GoingSRBCnt) + if (sdev->queue_depth <= dcb->GoingSRBCnt) goto device_busy; if (acb->pActiveDCB) goto host_busy; @@ -2177,7 +2176,6 @@ pDCB->pDCBACB = pACB; pDCB->TargetID = id; pDCB->TargetLUN = lun; - pDCB->MaxCommand = 1; /* * Some values are for all LUNs: Copy them @@ -2270,8 +2268,7 @@ acb->scan_devices = 0; if (sdev->tagged_supported && (dcb->DevMode & TAG_QUEUEING_)) { dcb->SyncMode |= EN_TAG_QUEUEING; - dcb->MaxCommand = dcb->pDCBACB->TagMaxNum; - scsi_activate_tcq(sdev, dcb->MaxCommand); + scsi_activate_tcq(sdev, acb->TagMaxNum); } return 0; @@ -2287,10 +2284,10 @@ .queuecommand = DC390_queuecommand, .eh_abort_handler = DC390_abort, .eh_bus_reset_handler = DC390_bus_reset, - .can_queue = 42, + .can_queue = 1, .this_id = 7, .sg_tablesize = SG_ALL, - .cmd_per_lun = 16, + .cmd_per_lun = 1, .use_clustering = DISABLE_CLUSTERING, }; @@ -2300,198 +2297,157 @@ * **********************************************************************/ - -static void __devinit dc390_EnDisableCE(u8 mode, struct pci_dev *pdev, u8 *regval) +static void __devinit dc390_eeprom_prepare_read(struct pci_dev *pdev, u8 cmd) { - u8 bval; + u8 carryFlag = 1, j = 0x80, bval; + int i; - bval = 0; - if(mode == ENABLE_CE) - *regval = 0xc0; - else - *regval = 0x80; - pci_write_config_byte(pdev, *regval, bval); - if(mode == DISABLE_CE) - pci_write_config_byte(pdev, *regval, bval); - udelay(160); -} + for (i = 0; i < 9; i++) { + if (carryFlag) { + pci_write_config_byte(pdev, 0x80, 0x40); + bval = 0xc0; + } else + bval = 0x80; + udelay(160); + pci_write_config_byte(pdev, 0x80, bval); + udelay(160); + pci_write_config_byte(pdev, 0x80, 0); + udelay(160); -/* Override EEprom values with explicitly set values */ -static void __devinit dc390_EEprom_Override (u8 index) -{ - u8 *ptr = (u8 *) dc390_eepromBuf[index]; - u8 id; - - /* Adapter Settings */ - if (tmscsim[0] != -2) - ptr[EE_ADAPT_SCSI_ID] = (u8)tmscsim[0]; /* Adapter ID */ - if (tmscsim[3] != -2) - ptr[EE_MODE2] = (u8)tmscsim[3]; - if (tmscsim[5] != -2) - ptr[EE_DELAY] = tmscsim[5]; /* Reset delay */ - if (tmscsim[4] != -2) - ptr[EE_TAG_CMD_NUM] = (u8)tmscsim[4]; /* Tagged Cmds */ - - /* Device Settings */ - for (id = 0; id < MAX_SCSI_ID; id++) - { - if (tmscsim[2] != -2) - ptr[id<<2] = (u8)tmscsim[2]; /* EE_MODE1 */ - if (tmscsim[1] != -2) - ptr[(id<<2) + 1] = (u8)tmscsim[1]; /* EE_Speed */ - } + carryFlag = (cmd & j) ? 1 : 0; + j >>= 1; + } } -/* Handle "-1" case */ -static void __devinit dc390_check_for_safe_settings (void) +static u16 __devinit dc390_eeprom_get_data(struct pci_dev *pdev) { - if (tmscsim[0] == -1 || tmscsim[0] > 15) /* modules-2.0.0 passes -1 as string */ - { - tmscsim[0] = 7; tmscsim[1] = 4; - tmscsim[2] = 0x09; tmscsim[3] = 0x0f; - tmscsim[4] = 2; tmscsim[5] = 10; - printk (KERN_INFO "DC390: Using safe settings.\n"); - } -} + int i; + u16 wval = 0; + u8 bval; + for (i = 0; i < 16; i++) { + wval <<= 1; -static int __initdata tmscsim_def[] = {7, 0 /* 10MHz */, - PARITY_CHK_ | SEND_START_ | EN_DISCONNECT_ - | SYNC_NEGO_ | TAG_QUEUEING_, - MORE2_DRV | GREATER_1G | RST_SCSI_BUS | ACTIVE_NEGATION - /* | NO_SEEK */ -# ifdef CONFIG_SCSI_MULTI_LUN - | LUN_CHECK -# endif - , 3 /* 16 Tags per LUN */, 1 /* s delay after Reset */ }; + pci_write_config_byte(pdev, 0x80, 0x80); + udelay(160); + pci_write_config_byte(pdev, 0x80, 0x40); + udelay(160); + pci_read_config_byte(pdev, 0x00, &bval); -/* Copy defaults over set values where missing */ -static void __devinit dc390_fill_with_defaults (void) -{ - int i; - PARSEDEBUG(printk(KERN_INFO "DC390: setup %08x %08x %08x %08x %08x %08x\n", tmscsim[0],\ - tmscsim[1], tmscsim[2], tmscsim[3], tmscsim[4], tmscsim[5])); - for (i = 0; i < 6; i++) - { - if (tmscsim[i] < 0 || tmscsim[i] > 255) - tmscsim[i] = tmscsim_def[i]; + if (bval == 0x22) + wval |= 1; } - /* Sanity checks */ - if (tmscsim[0] > 7) tmscsim[0] = 7; - if (tmscsim[1] > 7) tmscsim[1] = 4; - if (tmscsim[4] > 5) tmscsim[4] = 4; - if (tmscsim[5] > 180) tmscsim[5] = 180; + + return wval; } -static void __devinit dc390_EEpromOutDI(struct pci_dev *pdev, u8 *regval, u8 Carry) +static void __devinit dc390_read_eeprom(struct pci_dev *pdev, u16 *ptr) { - u8 bval; - - bval = 0; - if(Carry) - { - bval = 0x40; - *regval = 0x80; - pci_write_config_byte(pdev, *regval, bval); - } - udelay(160); - bval |= 0x80; - pci_write_config_byte(pdev, *regval, bval); - udelay(160); - bval = 0; - pci_write_config_byte(pdev, *regval, bval); - udelay(160); -} + u8 cmd = EEPROM_READ, i; + for (i = 0; i < 0x40; i++) { + pci_write_config_byte(pdev, 0xc0, 0); + udelay(160); -static u8 __devinit dc390_EEpromInDO(struct pci_dev *pdev) -{ - u8 bval; + dc390_eeprom_prepare_read(pdev, cmd++); + *ptr++ = dc390_eeprom_get_data(pdev); - pci_write_config_byte(pdev, 0x80, 0x80); - udelay(160); - pci_write_config_byte(pdev, 0x80, 0x40); - udelay(160); - pci_read_config_byte(pdev, 0x00, &bval); - if(bval == 0x22) - return(1); - else - return(0); + pci_write_config_byte(pdev, 0x80, 0); + pci_write_config_byte(pdev, 0x80, 0); + udelay(160); + } } - -static u16 __devinit dc390_EEpromGetData1(struct pci_dev *pdev) +/* Override EEprom values with explicitly set values */ +static void __devinit dc390_eeprom_override(u8 index) { - u8 i; - u8 carryFlag; - u16 wval; + u8 *ptr = (u8 *) dc390_eepromBuf[index], id; - wval = 0; - for(i=0; i<16; i++) - { - wval <<= 1; - carryFlag = dc390_EEpromInDO(pdev); - wval |= carryFlag; - } - return(wval); + /* Adapter Settings */ + if (tmscsim[0] != -2) + ptr[EE_ADAPT_SCSI_ID] = (u8)tmscsim[0]; /* Adapter ID */ + if (tmscsim[3] != -2) + ptr[EE_MODE2] = (u8)tmscsim[3]; + if (tmscsim[5] != -2) + ptr[EE_DELAY] = tmscsim[5]; /* Reset delay */ + if (tmscsim[4] != -2) + ptr[EE_TAG_CMD_NUM] = (u8)tmscsim[4]; /* Tagged Cmds */ + + /* Device Settings */ + for (id = 0; id < MAX_SCSI_ID; id++) { + if (tmscsim[2] != -2) + ptr[id << 2] = (u8)tmscsim[2]; /* EE_MODE1 */ + if (tmscsim[1] != -2) + ptr[(id << 2) + 1] = (u8)tmscsim[1]; /* EE_Speed */ + } } +static int __devinitdata tmscsim_def[] = { + 7, + 0 /* 10MHz */, + PARITY_CHK_ | SEND_START_ | EN_DISCONNECT_ | SYNC_NEGO_ | TAG_QUEUEING_, + MORE2_DRV | GREATER_1G | RST_SCSI_BUS | ACTIVE_NEGATION | LUN_CHECK, + 3 /* 16 Tags per LUN */, + 1 /* s delay after Reset */, +}; -static void __devinit dc390_Prepare(struct pci_dev *pdev, u8 *regval, u8 EEpromCmd) +/* Copy defaults over set values where missing */ +static void __devinit dc390_fill_with_defaults (void) { - u8 i,j; - u8 carryFlag; + int i; - carryFlag = 1; - j = 0x80; - for(i=0; i<9; i++) - { - dc390_EEpromOutDI(pdev, regval, carryFlag); - carryFlag = (EEpromCmd & j) ? 1 : 0; - j >>= 1; - } + for (i = 0; i < 6; i++) { + if (tmscsim[i] < 0 || tmscsim[i] > 255) + tmscsim[i] = tmscsim_def[i]; + } + + /* Sanity checks */ + if (tmscsim[0] > 7) + tmscsim[0] = 7; + if (tmscsim[1] > 7) + tmscsim[1] = 4; + if (tmscsim[4] > 5) + tmscsim[4] = 4; + if (tmscsim[5] > 180) + tmscsim[5] = 180; } +static void __devinit dc390_check_eeprom(struct pci_dev *pdev, u8 index) +{ + u8 interpd[] = {1, 3, 5, 10, 16, 30, 60, 120}; + u8 EEbuf[128]; + u16 *ptr = (u16 *)EEbuf, wval = 0; + int i; -static void __devinit dc390_ReadEEprom(struct pci_dev *pdev, u16 *ptr) -{ - u8 regval,cmd; - u8 i; + dc390_read_eeprom(pdev, ptr); + memcpy(dc390_eepromBuf[index], EEbuf, EE_ADAPT_SCSI_ID); + memcpy(&dc390_eepromBuf[index][EE_ADAPT_SCSI_ID], + &EEbuf[REAL_EE_ADAPT_SCSI_ID], EE_LEN - EE_ADAPT_SCSI_ID); - cmd = EEPROM_READ; - for(i=0; i<0x40; i++) - { - dc390_EnDisableCE(ENABLE_CE, pdev, ®val); - dc390_Prepare(pdev, ®val, cmd++); - *ptr++ = dc390_EEpromGetData1(pdev); - dc390_EnDisableCE(DISABLE_CE, pdev, ®val); - } -} + dc390_eepromBuf[index][EE_DELAY] = interpd[dc390_eepromBuf[index][EE_DELAY]]; + for (i = 0; i < 0x40; i++, ptr++) + wval += *ptr; -static void __devinit dc390_interpret_delay (u8 index) -{ - char interpd [] = {1,3,5,10,16,30,60,120}; - dc390_eepromBuf[index][EE_DELAY] = interpd [dc390_eepromBuf[index][EE_DELAY]]; -} + /* no Tekram EEprom found */ + if (wval != 0x1234) { + int speed; -static u8 __devinit dc390_CheckEEpromCheckSum(struct pci_dev *pdev, u8 index) -{ - u8 i; - char EEbuf[128]; - u16 wval, *ptr = (u16 *)EEbuf; + printk(KERN_INFO "DC390_init: No EEPROM found! Trying default settings ...\n"); - dc390_ReadEEprom(pdev, ptr); - memcpy (dc390_eepromBuf[index], EEbuf, EE_ADAPT_SCSI_ID); - memcpy (&dc390_eepromBuf[index][EE_ADAPT_SCSI_ID], - &EEbuf[REAL_EE_ADAPT_SCSI_ID], EE_LEN - EE_ADAPT_SCSI_ID); - dc390_interpret_delay (index); - - wval = 0; - for(i=0; i<0x40; i++, ptr++) - wval += *ptr; - return (wval == 0x1234 ? 0 : 1); + /* + * XXX(hch): bogus, because we might have tekram and + * non-tekram hbas in a single machine. + */ + dc390_fill_with_defaults(); + + speed = dc390_clock_speed[tmscsim[1]]; + printk(KERN_INFO "DC390: Used defaults: AdaptID=%i, SpeedIdx=%i (%i.%i MHz), " + "DevMode=0x%02x, AdaptMode=0x%02x, TaggedCmnds=%i (%i), DelayReset=%is\n", + tmscsim[0], tmscsim[1], speed / 10, speed % 10, + (u8)tmscsim[2], (u8)tmscsim[3], tmscsim[4], 2 << (tmscsim[4]), tmscsim[5]); + } } static void __devinit dc390_init_hw(struct dc390_acb *pACB, u8 index) @@ -2565,26 +2521,11 @@ pACB = (struct dc390_acb *)shost->hostdata; memset(pACB, 0, sizeof(struct dc390_acb)); - if (dc390_CheckEEpromCheckSum(pdev, dc390_adapterCnt)) { - int speed; - printk(KERN_INFO "DC390_init: No EEPROM found! Trying default settings ...\n"); - dc390_check_for_safe_settings(); - dc390_fill_with_defaults(); - dc390_EEprom_Override(dc390_adapterCnt); - speed = dc390_clock_speed[tmscsim[1]]; - printk(KERN_INFO "DC390: Used defaults: AdaptID=%i, SpeedIdx=%i (%i.%i MHz)," - " DevMode=0x%02x, AdaptMode=0x%02x, TaggedCmnds=%i (%i), DelayReset=%is\n", - tmscsim[0], tmscsim[1], speed/10, speed%10, - (u8)tmscsim[2], (u8)tmscsim[3], tmscsim[4], 2 << (tmscsim[4]), tmscsim[5]); - } else { - dc390_check_for_safe_settings(); - dc390_EEprom_Override(dc390_adapterCnt); - } + dc390_check_eeprom(pdev, dc390_adapterCnt); + dc390_eeprom_override(dc390_adapterCnt); io_port = pci_resource_start(pdev, 0); - shost->can_queue = MAX_CMD_QUEUE; - shost->cmd_per_lun = MAX_CMD_PER_LUN; shost->this_id = dc390_eepromBuf[dc390_adapterCnt][EE_ADAPT_SCSI_ID]; shost->io_port = io_port; shost->n_io_port = 0x80; @@ -2708,6 +2649,16 @@ static int __init dc390_module_init(void) { + if (tmscsim[0] == -1 || tmscsim[0] > 15) { + tmscsim[0] = 7; + tmscsim[1] = 4; + tmscsim[2] = PARITY_CHK_ | TAG_QUEUEING_; + tmscsim[3] = MORE2_DRV | GREATER_1G | RST_SCSI_BUS | ACTIVE_NEGATION; + tmscsim[4] = 2; + tmscsim[5] = 10; + printk (KERN_INFO "DC390: Using safe settings.\n"); + } + return pci_module_init(&dc390_driver); } diff -Nru a/drivers/scsi/tmscsim.h b/drivers/scsi/tmscsim.h --- a/drivers/scsi/tmscsim.h 2004-11-29 21:22:08 -08:00 +++ b/drivers/scsi/tmscsim.h 2004-11-29 21:22:08 -08:00 @@ -15,10 +15,8 @@ #define MAX_ADAPTER_NUM 4 #define MAX_SG_LIST_BUF 16 /* Not used */ -#define MAX_CMD_PER_LUN 32 -#define MAX_CMD_QUEUE MAX_CMD_PER_LUN+MAX_CMD_PER_LUN/2+1 #define MAX_SCSI_ID 8 -#define MAX_SRB_CNT MAX_CMD_QUEUE+1 /* Max number of started commands */ +#define MAX_SRB_CNT 50 /* Max number of started commands */ #define SEL_TIMEOUT 153 /* 250 ms selection timeout (@ 40 MHz) */ @@ -90,8 +88,6 @@ struct dc390_srb *pGoingLast; struct dc390_srb *pActiveSRB; u8 GoingSRBCnt; - -u8 MaxCommand; u32 TagMask; diff -Nru a/drivers/scsi/wd7000.c b/drivers/scsi/wd7000.c --- a/drivers/scsi/wd7000.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/scsi/wd7000.c 2004-11-29 21:22:08 -08:00 @@ -1429,16 +1429,16 @@ break; if (i == pass) { - void *biosaddr = ioremap(wd7000_biosaddr[biosaddr_ptr] + signatures[sig_ptr].ofs, + void __iomem *biosaddr = ioremap(wd7000_biosaddr[biosaddr_ptr] + signatures[sig_ptr].ofs, signatures[sig_ptr].len); - short bios_match = 0; + short bios_match = 1; if (biosaddr) - bios_match = memcmp((char *) biosaddr, signatures[sig_ptr].sig, signatures[sig_ptr].len); + bios_match = check_signature(biosaddr, signatures[sig_ptr].sig, signatures[sig_ptr].len); iounmap(biosaddr); - if (!bios_match) + if (bios_match) goto bios_matched; } } diff -Nru a/drivers/serial/8250.c b/drivers/serial/8250.c --- a/drivers/serial/8250.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/serial/8250.c 2004-11-29 21:22:06 -08:00 @@ -2125,6 +2125,41 @@ } late_initcall(serial8250_late_console_init); +static int __init find_port(struct uart_port *p) +{ + int line; + struct uart_port *port; + + for (line = 0; line < UART_NR; line++) { + port = &serial8250_ports[line].port; + if (p->iotype == port->iotype && + p->iobase == port->iobase && + p->membase == port->membase) + return line; + } + return -ENODEV; +} + +int __init serial8250_start_console(struct uart_port *port, char *options) +{ + int line; + + line = find_port(port); + if (line < 0) + return -ENODEV; + + add_preferred_console("ttyS", line, options); + printk("Adding console on ttyS%d at %s 0x%lx (options '%s')\n", + line, port->iotype == UPIO_MEM ? "MMIO" : "I/O port", + port->iotype == UPIO_MEM ? (unsigned long) port->mapbase : + (unsigned long) port->iobase, options); + if (!(serial8250_console.flags & CON_ENABLED)) { + serial8250_console.flags &= ~CON_PRINTBUFFER; + register_console(&serial8250_console); + } + return line; +} + #define SERIAL8250_CONSOLE &serial8250_console #else #define SERIAL8250_CONSOLE NULL diff -Nru a/drivers/serial/8250_early.c b/drivers/serial/8250_early.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/serial/8250_early.c 2004-11-29 21:22:09 -08:00 @@ -0,0 +1,255 @@ +/* + * Early serial console for 8250/16550 devices + * + * (c) Copyright 2004 Hewlett-Packard Development Company, L.P. + * Bjorn Helgaas + * + * 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. + * + * Based on the 8250.c serial driver, Copyright (C) 2001 Russell King, + * and on early_printk.c by Andi Kleen. + * + * This is for use before the serial driver has initialized, in + * particular, before the UARTs have been discovered and named. + * Instead of specifying the console device as, e.g., "ttyS0", + * we locate the device directly by its MMIO or I/O port address. + * + * The user can specify the device directly, e.g., + * console=uart,io,0x3f8,9600n8 + * console=uart,mmio,0xff5e0000,115200n8 + * or platform code can call early_uart_console_init() to set + * the early UART device. + * + * After the normal serial driver starts, we try to locate the + * matching ttyS device and start a console there. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +struct early_uart_device { + struct uart_port port; + char options[16]; /* e.g., 115200n8 */ + unsigned int baud; +}; + +static struct early_uart_device early_device __initdata; +static int early_uart_registered __initdata; + +static unsigned int __init serial_in(struct uart_port *port, int offset) +{ + if (port->iotype == UPIO_MEM) + return readb(port->membase + offset); + else + return inb(port->iobase + offset); +} + +static void __init serial_out(struct uart_port *port, int offset, int value) +{ + if (port->iotype == UPIO_MEM) + writeb(value, port->membase + offset); + else + outb(value, port->iobase + offset); +} + +#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE) + +static void __init wait_for_xmitr(struct uart_port *port) +{ + unsigned int status; + + for (;;) { + status = serial_in(port, UART_LSR); + if ((status & BOTH_EMPTY) == BOTH_EMPTY) + return; + cpu_relax(); + } +} + +static void __init putc(struct uart_port *port, unsigned char c) +{ + wait_for_xmitr(port); + serial_out(port, UART_TX, c); +} + +static void __init early_uart_write(struct console *console, const char *s, unsigned int count) +{ + struct uart_port *port = &early_device.port; + unsigned int ier; + + /* Save the IER and disable interrupts */ + ier = serial_in(port, UART_IER); + serial_out(port, UART_IER, 0); + + while (*s && count-- > 0) { + putc(port, *s); + if (*s == '\n') + putc(port, '\r'); + s++; + } + + /* Wait for transmitter to become empty and restore the IER */ + wait_for_xmitr(port); + serial_out(port, UART_IER, ier); +} + +static unsigned int __init probe_baud(struct uart_port *port) +{ + unsigned char lcr, dll, dlm; + unsigned int quot; + + lcr = serial_in(port, UART_LCR); + serial_out(port, UART_LCR, lcr | UART_LCR_DLAB); + dll = serial_in(port, UART_DLL); + dlm = serial_in(port, UART_DLM); + serial_out(port, UART_LCR, lcr); + + quot = (dlm << 8) | dll; + return (port->uartclk / 16) / quot; +} + +static void __init init_port(struct early_uart_device *device) +{ + struct uart_port *port = &device->port; + unsigned int divisor; + unsigned char c; + + serial_out(port, UART_LCR, 0x3); /* 8n1 */ + serial_out(port, UART_IER, 0); /* no interrupt */ + serial_out(port, UART_FCR, 0); /* no fifo */ + serial_out(port, UART_MCR, 0x3); /* DTR + RTS */ + + divisor = port->uartclk / (16 * device->baud); + c = serial_in(port, UART_LCR); + serial_out(port, UART_LCR, c | UART_LCR_DLAB); + serial_out(port, UART_DLL, divisor & 0xff); + serial_out(port, UART_DLM, (divisor >> 8) & 0xff); + serial_out(port, UART_LCR, c & ~UART_LCR_DLAB); +} + +static int __init parse_options(struct early_uart_device *device, char *options) +{ + struct uart_port *port = &device->port; + int mapsize = 64; + int mmio, length; + + if (!options) + return -ENODEV; + + port->uartclk = BASE_BAUD * 16; + if (!strncmp(options, "mmio,", 5)) { + port->iotype = UPIO_MEM; + port->mapbase = simple_strtoul(options + 5, &options, 0); + port->membase = ioremap(port->mapbase, mapsize); + if (!port->membase) { + printk(KERN_ERR "%s: Couldn't ioremap 0x%lx\n", + __FUNCTION__, port->mapbase); + return -ENOMEM; + } + mmio = 1; + } else if (!strncmp(options, "io,", 3)) { + port->iotype = UPIO_PORT; + port->iobase = simple_strtoul(options + 3, &options, 0); + mmio = 0; + } else + return -EINVAL; + + if ((options = strchr(options, ','))) { + options++; + device->baud = simple_strtoul(options, 0, 0); + length = min(strcspn(options, " "), sizeof(device->options)); + strncpy(device->options, options, length); + } else { + device->baud = probe_baud(port); + snprintf(device->options, sizeof(device->options), "%u", + device->baud); + } + + printk(KERN_INFO "Early serial console at %s 0x%lx (options '%s')\n", + mmio ? "MMIO" : "I/O port", + mmio ? port->mapbase : (unsigned long) port->iobase, + device->options); + return 0; +} + +static int __init early_uart_setup(struct console *console, char *options) +{ + struct early_uart_device *device = &early_device; + int err; + + if (device->port.membase || device->port.iobase) + return 0; + + if ((err = parse_options(device, options)) < 0) + return err; + + init_port(device); + return 0; +} + +static struct console early_uart_console __initdata = { + .name = "uart", + .write = early_uart_write, + .setup = early_uart_setup, + .flags = CON_PRINTBUFFER, + .index = -1, +}; + +static int __init early_uart_console_init(void) +{ + if (!early_uart_registered) { + register_console(&early_uart_console); + early_uart_registered = 1; + } + return 0; +} +console_initcall(early_uart_console_init); + +int __init early_serial_console_init(char *cmdline) +{ + char *options; + int err; + + options = strstr(cmdline, "console=uart,"); + if (!options) + return -ENODEV; + + options = strchr(cmdline, ',') + 1; + if ((err = early_uart_setup(NULL, options)) < 0) + return err; + return early_uart_console_init(); +} + +static int __init early_uart_console_switch(void) +{ + struct early_uart_device *device = &early_device; + struct uart_port *port = &device->port; + int mmio, line; + + if (!(early_uart_console.flags & CON_ENABLED)) + return 0; + + /* Try to start the normal driver on a matching line. */ + mmio = (port->iotype == UPIO_MEM); + line = serial8250_start_console(port, device->options); + if (line < 0) + printk("No ttyS device at %s 0x%lx for console\n", + mmio ? "MMIO" : "I/O port", + mmio ? port->mapbase : + (unsigned long) port->iobase); + + unregister_console(&early_uart_console); + if (mmio) + iounmap(port->membase); + + return 0; +} +late_initcall(early_uart_console_switch); diff -Nru a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c --- a/drivers/serial/8250_pci.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/serial/8250_pci.c 2004-11-29 21:22:08 -08:00 @@ -2116,6 +2116,13 @@ pbn_b0_bt_1_460800 }, /* + * Dell Remote Access Card 4 - Tim_T_Murphy@Dell.com + */ + { PCI_VENDOR_ID_DELL, PCI_DEVICE_ID_DELL_RAC4, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, + pbn_b1_1_1382400 }, + + /* * Dell Remote Access Card III - Tim_T_Murphy@Dell.com */ { PCI_VENDOR_ID_DELL, PCI_DEVICE_ID_DELL_RACIII, diff -Nru a/drivers/serial/Makefile b/drivers/serial/Makefile --- a/drivers/serial/Makefile 2004-11-29 21:22:07 -08:00 +++ b/drivers/serial/Makefile 2004-11-29 21:22:07 -08:00 @@ -16,6 +16,7 @@ obj-$(CONFIG_SERIAL_8250) += 8250.o $(serial-8250-y) obj-$(CONFIG_SERIAL_8250_CS) += serial_cs.o obj-$(CONFIG_SERIAL_8250_ACORN) += 8250_acorn.o +obj-$(CONFIG_SERIAL_8250_CONSOLE) += 8250_early.o obj-$(CONFIG_SERIAL_AMBA_PL010) += amba-pl010.o obj-$(CONFIG_SERIAL_AMBA_PL011) += amba-pl011.o obj-$(CONFIG_SERIAL_CLPS711X) += clps711x.o diff -Nru a/drivers/serial/imx.c b/drivers/serial/imx.c --- a/drivers/serial/imx.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/serial/imx.c 2004-11-29 21:22:08 -08:00 @@ -43,8 +43,6 @@ #include #include #include -#include -#include /* We've been assigned a range on the "Low-density serial ports" major */ #define SERIAL_IMX_MAJOR 204 diff -Nru a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c --- a/drivers/serial/pmac_zilog.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/serial/pmac_zilog.c 2004-11-29 21:22:06 -08:00 @@ -273,7 +273,7 @@ uap->flags &= ~PMACZILOG_FLAG_BREAK; } -#ifdef CONFIG_MAGIC_SYSRQ +#if defined(CONFIG_MAGIC_SYSRQ) && defined(CONFIG_SERIAL_CORE_CONSOLE) #ifdef USE_CTRL_O_SYSRQ /* Handle the SysRq ^O Hack */ if (ch == '\x0f') { @@ -289,7 +289,7 @@ if (swallow) goto next_char; } -#endif /* CONFIG_MAGIC_SYSRQ */ +#endif /* CONFIG_MAGIC_SYSRQ && CONFIG_SERIAL_CORE_CONSOLE */ /* A real serial line, record the character and status. */ if (drop) @@ -1439,7 +1439,7 @@ uap->port.mapbase = np->addrs[0].address; uap->port.membase = ioremap(uap->port.mapbase, 0x1000); - uap->control_reg = (volatile u8 *)uap->port.membase; + uap->control_reg = uap->port.membase; uap->data_reg = uap->control_reg + 0x10; /* @@ -1450,16 +1450,14 @@ uap->flags |= PMACZILOG_FLAG_HAS_DMA; #endif if (ZS_HAS_DMA(uap)) { - uap->tx_dma_regs = (volatile struct dbdma_regs *) - ioremap(np->addrs[np->n_addrs - 2].address, 0x1000); + uap->tx_dma_regs = ioremap(np->addrs[np->n_addrs - 2].address, 0x1000); if (uap->tx_dma_regs == NULL) { uap->flags &= ~PMACZILOG_FLAG_HAS_DMA; goto no_dma; } - uap->rx_dma_regs = (volatile struct dbdma_regs *) - ioremap(np->addrs[np->n_addrs - 1].address, 0x1000); + uap->rx_dma_regs = ioremap(np->addrs[np->n_addrs - 1].address, 0x1000); if (uap->rx_dma_regs == NULL) { - iounmap((void *)uap->tx_dma_regs); + iounmap(uap->tx_dma_regs); uap->tx_dma_regs = NULL; uap->flags &= ~PMACZILOG_FLAG_HAS_DMA; goto no_dma; @@ -1536,9 +1534,9 @@ struct device_node *np; np = uap->node; - iounmap((void *)uap->rx_dma_regs); - iounmap((void *)uap->tx_dma_regs); - iounmap((void *)uap->control_reg); + iounmap(uap->rx_dma_regs); + iounmap(uap->tx_dma_regs); + iounmap(uap->control_reg); uap->node = NULL; of_node_put(np); memset(uap, 0, sizeof(struct uart_pmac_port)); @@ -1603,7 +1601,7 @@ return 0; } - if (pm_state == mdev->ofdev.dev.power_state || pm_state < 2) + if (pm_state == mdev->ofdev.dev.power.power_state || pm_state < 2) return 0; pmz_debug("suspend, switching to state %d\n", pm_state); @@ -1647,7 +1645,7 @@ pmz_debug("suspend, switching complete\n"); - mdev->ofdev.dev.power_state = pm_state; + mdev->ofdev.dev.power.power_state = pm_state; return 0; } @@ -1663,7 +1661,7 @@ if (uap == NULL) return 0; - if (mdev->ofdev.dev.power_state == 0) + if (mdev->ofdev.dev.power.power_state == 0) return 0; pmz_debug("resume, switching to state 0\n"); @@ -1716,7 +1714,7 @@ pmz_debug("resume, switching complete\n"); - mdev->ofdev.dev.power_state = 0; + mdev->ofdev.dev.power.power_state = 0; return 0; } diff -Nru a/drivers/serial/pmac_zilog.h b/drivers/serial/pmac_zilog.h --- a/drivers/serial/pmac_zilog.h 2004-11-29 21:22:07 -08:00 +++ b/drivers/serial/pmac_zilog.h 2004-11-29 21:22:07 -08:00 @@ -52,13 +52,13 @@ unsigned char parity_mask; unsigned char prev_status; - volatile u8 *control_reg; - volatile u8 *data_reg; + volatile u8 __iomem *control_reg; + volatile u8 __iomem *data_reg; unsigned int tx_dma_irq; unsigned int rx_dma_irq; - volatile struct dbdma_regs *tx_dma_regs; - volatile struct dbdma_regs *rx_dma_regs; + volatile struct dbdma_regs __iomem *tx_dma_regs; + volatile struct dbdma_regs __iomem *rx_dma_regs; struct termios termios_cache; }; diff -Nru a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c --- a/drivers/serial/s3c2410.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/serial/s3c2410.c 2004-11-29 21:22:07 -08:00 @@ -1,7 +1,7 @@ /* - * linux/drivers/char/s3c2410.c + * linux/drivers/serial/s3c2410.c * - * Driver for onboard UARTs on the Samsung S3C2410 + * Driver for onboard UARTs on the Samsung S3C24XX * * Based on drivers/char/serial.c and drivers/char/21285.c * @@ -9,55 +9,153 @@ * * Changelog: * - */ + * 22-Jul-2004 BJD Finished off device rewrite + * + * 21-Jul-2004 BJD Thanks to for pointing out + * problems with baud rate and loss of IR settings. Update + * to add configuration via platform_device structure + * + * 28-Sep-2004 BJD Re-write for the following items + * - S3C2410 and S3C2440 serial support + * - Power Management support + * - Fix console via IrDA devices + * - SysReq (Herbert Pötzl) + * - Break character handling (Herbert Pötzl) + * - spin-lock initialisation (Dimitry Andric) + * - added clock control + * - updated init code to use platform_device info +*/ + +/* Hote on 2410 error handling + * + * The s3c2410 manual has a love/hate affair with the contents of the + * UERSTAT register in the UART blocks, and keeps marking some of the + * error bits as reserved. Having checked with the s3c2410x01, + * it copes with BREAKs properly, so I am happy to ignore the RESERVED + * feature from the latter versions of the manual. + * + * If it becomes aparrent that latter versions of the 2410 remove these + * bits, then action will have to be taken to differentiate the versions + * and change the policy on BREAK + * + * BJD, 04-Nov-2004 +*/ + #include + +#if defined(CONFIG_SERIAL_S3C2410_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) +#define SUPPORT_SYSRQ +#endif + #include #include #include #include +#include #include #include #include #include #include +#include #include #include #include +#include + #include +#include + +#include + +/* structures */ + +struct s3c24xx_uart_info { + char *name; + unsigned int type; + unsigned int fifosize; + unsigned long rx_fifomask; + unsigned long rx_fifoshift; + unsigned long rx_fifofull; + unsigned long tx_fifomask; + unsigned long tx_fifoshift; + unsigned long tx_fifofull; + + /* clock source control */ + + int (*get_clksrc)(struct uart_port *, struct s3c24xx_uart_clksrc *clk); + int (*set_clksrc)(struct uart_port *, struct s3c24xx_uart_clksrc *clk); +}; + +struct s3c24xx_uart_port { + unsigned char rx_claimed; + unsigned char tx_claimed; + + struct s3c24xx_uart_info *info; + struct s3c24xx_uart_clksrc *clksrc; + struct clk *clk; + struct clk *baudclk; + struct uart_port port; +}; + + +/* configuration defines */ #if 0 -#include -#define dbg(x...) llprintk(x) +#if 1 +/* send debug to the low-level output routines */ + +extern void printascii(const char *); + +static void +s3c24xx_serial_dbg(const char *fmt, ...) +{ + va_list va; + char buff[256]; + + va_start(va, fmt); + vsprintf(buff, fmt, va); + va_end(va); + + printascii(buff); +} + +#define dbg(x...) s3c24xx_serial_dbg(x) + #else -#define dbg(x...) +#define dbg(x...) printk(KERN_DEBUG "s3c24xx: "); +#endif +#else /* no debug */ +#define dbg(x...) do {} while(0) #endif -#define SERIAL_S3C2410_NAME "ttySAC" -#define SERIAL_S3C2410_MAJOR 204 -#define SERIAL_S3C2410_MINOR 64 +/* UART name and device definitions */ + +#define S3C24XX_SERIAL_NAME "ttySAC" +#define S3C24XX_SERIAL_DEVFS "tts/" +#define S3C24XX_SERIAL_MAJOR 204 +#define S3C24XX_SERIAL_MINOR 64 + + +/* conversion functions */ + +#define s3c24xx_dev_to_port(__dev) (struct uart_port *)dev_get_drvdata(__dev) +#define s3c24xx_dev_to_cfg(__dev) (struct s3c2410_uartcfg *)((__dev)->platform_data) /* we can support 3 uarts, but not always use them */ #define NR_PORTS (3) -static const char serial_s3c2410_name[] = "Samsung S3C2410 UART"; - /* port irq numbers */ #define TX_IRQ(port) ((port)->irq + 1) #define RX_IRQ(port) ((port)->irq) -#define tx_enabled(port) ((port)->unused[0]) -#define rx_enabled(port) ((port)->unused[1]) - -/* flag to ignore all characters comming in */ -#define RXSTAT_DUMMY_READ (0x10000000) - -/* access functions */ +/* register access controls */ -#define portaddr(port, reg) ((void *)((port)->membase + (reg))) +#define portaddr(port, reg) ((port)->membase + (reg)) #define rd_regb(port, reg) (__raw_readb(portaddr(port, reg))) #define rd_regl(port, reg) (__raw_readl(portaddr(port, reg))) @@ -68,102 +166,234 @@ #define wr_regl(port, reg, val) \ do { __raw_writel(val, portaddr(port, reg)); } while(0) +/* macros to change one thing to another */ + +#define tx_enabled(port) ((port)->unused[0]) +#define rx_enabled(port) ((port)->unused[1]) + +/* flag to ignore all characters comming in */ +#define RXSTAT_DUMMY_READ (0x10000000) + +static inline struct s3c24xx_uart_port *to_ourport(struct uart_port *port) +{ + return container_of(port, struct s3c24xx_uart_port, port); +} + +/* translate a port to the device name */ + +static inline char *s3c24xx_serial_portname(struct uart_port *port) +{ + return to_platform_device(port->dev)->name; +} + +static int s3c24xx_serial_txempty_nofifo(struct uart_port *port) +{ + return (rd_regl(port, S3C2410_UTRSTAT) & S3C2410_UTRSTAT_TXE); +} +static void s3c24xx_serial_rx_enable(struct uart_port *port) +{ + unsigned long flags; + unsigned int ucon, ufcon; + int count = 10000; + spin_lock_irqsave(&port->lock, flags); -/* code */ + while (--count && !s3c24xx_serial_txempty_nofifo(port)) + udelay(100); + + ufcon = rd_regl(port, S3C2410_UFCON); + ufcon |= S3C2410_UFCON_RESETRX; + wr_regl(port, S3C2410_UFCON, ufcon); + + ucon = rd_regl(port, S3C2410_UCON); + ucon |= S3C2410_UCON_RXIRQMODE; + wr_regl(port, S3C2410_UCON, ucon); + + rx_enabled(port) = 1; + spin_unlock_irqrestore(&port->lock, flags); +} + +static void s3c24xx_serial_rx_disable(struct uart_port *port) +{ + unsigned long flags; + unsigned int ucon; + + spin_lock_irqsave(&port->lock, flags); + + ucon = rd_regl(port, S3C2410_UCON); + ucon &= ~S3C2410_UCON_RXIRQMODE; + wr_regl(port, S3C2410_UCON, ucon); + + rx_enabled(port) = 0; + spin_unlock_irqrestore(&port->lock, flags); +} static void -serial_s3c2410_stop_tx(struct uart_port *port, unsigned int tty_stop) +s3c24xx_serial_stop_tx(struct uart_port *port, unsigned int tty_stop) { if (tx_enabled(port)) { disable_irq(TX_IRQ(port)); tx_enabled(port) = 0; + if (port->flags & UPF_CONS_FLOW) + s3c24xx_serial_rx_enable(port); } } static void -serial_s3c2410_start_tx(struct uart_port *port, unsigned int tty_start) +s3c24xx_serial_start_tx(struct uart_port *port, unsigned int tty_start) { if (!tx_enabled(port)) { + if (port->flags & UPF_CONS_FLOW) + s3c24xx_serial_rx_disable(port); + enable_irq(TX_IRQ(port)); tx_enabled(port) = 1; } } -static void serial_s3c2410_stop_rx(struct uart_port *port) + +static void s3c24xx_serial_stop_rx(struct uart_port *port) { if (rx_enabled(port)) { - dbg("serial_s3c2410_stop_rx: port=%p\n", port); + dbg("s3c24xx_serial_stop_rx: port=%p\n", port); disable_irq(RX_IRQ(port)); rx_enabled(port) = 0; } } -static void serial_s3c2410_enable_ms(struct uart_port *port) +static void s3c24xx_serial_enable_ms(struct uart_port *port) +{ +} + +static inline struct s3c24xx_uart_info *s3c24xx_port_to_info(struct uart_port *port) +{ + return to_ourport(port)->info; +} + +static inline struct s3c2410_uartcfg *s3c24xx_port_to_cfg(struct uart_port *port) { + if (port->dev == NULL) + return NULL; + + return (struct s3c2410_uartcfg *)port->dev->platform_data; } +static int s3c24xx_serial_rx_fifocnt(struct s3c24xx_uart_port *ourport, + unsigned long ufstat) +{ + struct s3c24xx_uart_info *info = ourport->info; + + if (ufstat & info->rx_fifofull) + return info->fifosize; + + return (ufstat & info->rx_fifomask) >> info->rx_fifoshift; +} + + /* ? - where has parity gone?? */ #define S3C2410_UERSTAT_PARITY (0x1000) static irqreturn_t -serial_s3c2410_rx_chars(int irq, void *dev_id, struct pt_regs *regs) +s3c24xx_serial_rx_chars(int irq, void *dev_id, struct pt_regs *regs) { - struct uart_port *port = dev_id; + struct s3c24xx_uart_port *ourport = dev_id; + struct uart_port *port = &ourport->port; struct tty_struct *tty = port->info->tty; - unsigned int ufcon, ch, flag, rxs, ufstat; - int max_count = 256; + unsigned int ufcon, ch, flag, ufstat, uerstat; + int max_count = 64; while (max_count-- > 0) { ufcon = rd_regl(port, S3C2410_UFCON); ufstat = rd_regl(port, S3C2410_UFSTAT); - if (S3C2410_UFCON_RXC(ufstat) == 0) + if (s3c24xx_serial_rx_fifocnt(ourport, ufstat) == 0) break; if (tty->flip.count >= TTY_FLIPBUF_SIZE) { if (tty->low_latency) tty_flip_buffer_push(tty); + /* * If this failed then we will throw away the * bytes but must do so to clear interrupts */ } + uerstat = rd_regl(port, S3C2410_UERSTAT); ch = rd_regb(port, S3C2410_URXH); + + if (port->flags & UPF_CONS_FLOW) { + int txe = s3c24xx_serial_txempty_nofifo(port); + + if (rx_enabled(port)) { + if (!txe) { + rx_enabled(port) = 0; + continue; + } + } else { + if (txe) { + ufcon |= S3C2410_UFCON_RESETRX; + wr_regl(port, S3C2410_UFCON, ufcon); + rx_enabled(port) = 1; + goto out; + } + continue; + } + } + + /* insert the character into the buffer */ + flag = TTY_NORMAL; port->icount.rx++; - rxs = rd_regb(port, S3C2410_UERSTAT) | RXSTAT_DUMMY_READ; + if (uerstat & S3C2410_UERSTAT_ANY) { + dbg("rxerr: port ch=0x%02x, rxs=0x%08x\n", + ch, uerstat); + + /* check for break */ + if (uerstat & S3C2410_UERSTAT_BREAK) { + dbg("break!\n"); + port->icount.brk++; + if (uart_handle_break(port)) + goto ignore_char; + } - if (rxs & S3C2410_UERSTAT_ANY) { - if (rxs & S3C2410_UERSTAT_FRAME) + if (uerstat & S3C2410_UERSTAT_FRAME) port->icount.frame++; - if (rxs & S3C2410_UERSTAT_OVERRUN) + if (uerstat & S3C2410_UERSTAT_OVERRUN) port->icount.overrun++; - rxs &= port->read_status_mask; + uerstat &= port->read_status_mask; - if (rxs & S3C2410_UERSTAT_PARITY) + if (uerstat & S3C2410_UERSTAT_BREAK) + flag = TTY_BREAK; + else if (uerstat & S3C2410_UERSTAT_PARITY) flag = TTY_PARITY; - else if (rxs & ( S3C2410_UERSTAT_FRAME | S3C2410_UERSTAT_OVERRUN)) + else if (uerstat & ( S3C2410_UERSTAT_FRAME | S3C2410_UERSTAT_OVERRUN)) flag = TTY_FRAME; } - if ((rxs & port->ignore_status_mask) == 0) { + if (uart_handle_sysrq_char(port, ch, regs)) + goto ignore_char; + + if ((uerstat & port->ignore_status_mask) == 0) { tty_insert_flip_char(tty, ch, flag); } - if ((rxs & S3C2410_UERSTAT_OVERRUN) && + if ((uerstat & S3C2410_UERSTAT_OVERRUN) && tty->flip.count < TTY_FLIPBUF_SIZE) { /* * Overrun is special, since it's reported * immediately, and doesn't affect the current * character. */ + tty_insert_flip_char(tty, 0, TTY_OVERRUN); } + + ignore_char: + continue; } tty_flip_buffer_push(tty); @@ -171,10 +401,10 @@ return IRQ_HANDLED; } -static irqreturn_t -serial_s3c2410_tx_chars(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t s3c24xx_serial_tx_chars(int irq, void *id, struct pt_regs *regs) { - struct uart_port *port = (struct uart_port *)dev_id; + struct s3c24xx_uart_port *ourport = id; + struct uart_port *port = &ourport->port; struct circ_buf *xmit = &port->info->xmit; int count = 256; @@ -190,14 +420,14 @@ */ if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { - serial_s3c2410_stop_tx(port, 0); + s3c24xx_serial_stop_tx(port, 0); goto out; } /* try and drain the buffer... */ while (!uart_circ_empty(xmit) && count-- > 0) { - if (rd_regl(port, S3C2410_UFSTAT) & S3C2410_UFSTAT_TXFULL) + if (rd_regl(port, S3C2410_UFSTAT) & ourport->info->tx_fifofull) break; wr_regb(port, S3C2410_UTXH, xmit->buf[xmit->tail]); @@ -209,22 +439,31 @@ uart_write_wakeup(port); if (uart_circ_empty(xmit)) - serial_s3c2410_stop_tx(port, 0); + s3c24xx_serial_stop_tx(port, 0); out: return IRQ_HANDLED; } -static unsigned int -serial_s3c2410_tx_empty(struct uart_port *port) +static unsigned int s3c24xx_serial_tx_empty(struct uart_port *port) { - unsigned int ufcon = rd_regl(port, S3C2410_UFCON); - return (S3C2410_UFCON_TXC(ufcon) != 0) ? 0 : TIOCSER_TEMT; + struct s3c24xx_uart_info *info = s3c24xx_port_to_info(port); + unsigned long ufstat = rd_regl(port, S3C2410_UFSTAT); + unsigned long ufcon = rd_regl(port, S3C2410_UFCON); + + if (ufcon & S3C2410_UFCON_FIFOMODE) { + if ((ufstat & info->tx_fifomask) != 0 || + (ufstat & info->tx_fifofull)) + return 0; + + return 1; + } + + return s3c24xx_serial_txempty_nofifo(port); } /* no modem control lines */ -static unsigned int -serial_s3c2410_get_mctrl(struct uart_port *port) +static unsigned int s3c24xx_serial_get_mctrl(struct uart_port *port) { unsigned int umstat = rd_regb(port,S3C2410_UMSTAT); @@ -234,13 +473,12 @@ return TIOCM_CAR | TIOCM_DSR; } -static void -serial_s3c2410_set_mctrl(struct uart_port *port, unsigned int mctrl) +static void s3c24xx_serial_set_mctrl(struct uart_port *port, unsigned int mctrl) { /* todo - possibly remove AFC and do manual CTS */ } -static void serial_s3c2410_break_ctl(struct uart_port *port, int break_state) +static void s3c24xx_serial_break_ctl(struct uart_port *port, int break_state) { unsigned long flags; unsigned int ucon; @@ -259,46 +497,250 @@ spin_unlock_irqrestore(&port->lock, flags); } -static int serial_s3c2410_startup(struct uart_port *port) +static void s3c24xx_serial_shutdown(struct uart_port *port) { + struct s3c24xx_uart_port *ourport = to_ourport(port); + + if (ourport->tx_claimed) { + free_irq(TX_IRQ(port), ourport); + tx_enabled(port) = 0; + ourport->tx_claimed = 0; + } + + if (ourport->rx_claimed) { + free_irq(RX_IRQ(port), ourport); + ourport->rx_claimed = 0; + rx_enabled(port) = 0; + } +} + + +static int s3c24xx_serial_startup(struct uart_port *port) +{ + struct s3c24xx_uart_port *ourport = to_ourport(port); + unsigned long flags; int ret; - tx_enabled(port) = 1; - rx_enabled(port) = 1; + dbg("s3c24xx_serial_startup: port=%p (%08lx,%p)\n", + port->mapbase, port->membase); - dbg("serial_s3c2410_startup: port=%p (%p)\n", - port, port->mapbase); + local_irq_save(flags); + + rx_enabled(port) = 1; - ret = request_irq(RX_IRQ(port), serial_s3c2410_rx_chars, 0, - serial_s3c2410_name, port); + ret = request_irq(RX_IRQ(port), + s3c24xx_serial_rx_chars, 0, + s3c24xx_serial_portname(port), ourport); - if (ret != 0) + if (ret != 0) { + printk(KERN_ERR "cannot get irq %d\n", RX_IRQ(port)); return ret; + } + + ourport->rx_claimed = 1; + + dbg("requesting tx irq...\n"); + + tx_enabled(port) = 1; - ret = request_irq(TX_IRQ(port), serial_s3c2410_tx_chars, 0, - serial_s3c2410_name, port); + ret = request_irq(TX_IRQ(port), + s3c24xx_serial_tx_chars, 0, + s3c24xx_serial_portname(port), ourport); if (ret) { - free_irq(RX_IRQ(port), port); - return ret; + printk(KERN_ERR "cannot get irq %d\n", TX_IRQ(port)); + goto err; } + ourport->tx_claimed = 1; + + dbg("s3c24xx_serial_startup ok\n"); + /* the port reset code should have done the correct * register setup for the port controls */ + local_irq_restore(flags); + return ret; + + err: + s3c24xx_serial_shutdown(port); + local_irq_restore(flags); return ret; } -static void serial_s3c2410_shutdown(struct uart_port *port) +/* power power management control */ + +static void s3c24xx_serial_pm(struct uart_port *port, unsigned int level, + unsigned int old) { - free_irq(TX_IRQ(port), port); - free_irq(RX_IRQ(port), port); + struct s3c24xx_uart_port *ourport = to_ourport(port); + + switch (level) { + case 3: + if (!IS_ERR(ourport->baudclk) && ourport->baudclk != NULL) + clk_disable(ourport->baudclk); + + clk_disable(ourport->clk); + break; + + case 0: + clk_enable(ourport->clk); + + if (!IS_ERR(ourport->baudclk) && ourport->baudclk != NULL) + clk_enable(ourport->baudclk); + + break; + default: + printk(KERN_ERR "s3c24xx_serial: unknown pm %d\n", level); + } } -static void -serial_s3c2410_set_termios(struct uart_port *port, struct termios *termios, - struct termios *old) +/* baud rate calculation + * + * The UARTs on the S3C2410/S3C2440 can take their clocks from a number + * of different sources, including the peripheral clock ("pclk") and an + * external clock ("uclk"). The S3C2440 also adds the core clock ("fclk") + * with a programmable extra divisor. + * + * The following code goes through the clock sources, and calculates the + * baud clocks (and the resultant actual baud rates) and then tries to + * pick the closest one and select that. + * + * NOTES: + * 1) there is no current code to properly select/deselect FCLK on + * the s3c2440, so only specify FCLK or non-FCLK in the clock + * sources for the UART + * +*/ + + +#define MAX_CLKS (8) + +static struct s3c24xx_uart_clksrc tmp_clksrc = { + .name = "pclk", + .min_baud = 0, + .max_baud = 0, + .divisor = 1, +}; + +static inline int +s3c24xx_serial_getsource(struct uart_port *port, struct s3c24xx_uart_clksrc *c) +{ + struct s3c24xx_uart_info *info = s3c24xx_port_to_info(port); + + return (info->get_clksrc)(port, c); +} + +static inline int +s3c24xx_serial_setsource(struct uart_port *port, struct s3c24xx_uart_clksrc *c) +{ + struct s3c24xx_uart_info *info = s3c24xx_port_to_info(port); + + return (info->set_clksrc)(port, c); +} + +struct baud_calc { + struct s3c24xx_uart_clksrc *clksrc; + unsigned int calc; + unsigned int quot; + struct clk *src; +}; + +static int s3c24xx_serial_calcbaud(struct baud_calc *calc, + struct uart_port *port, + struct s3c24xx_uart_clksrc *clksrc, + unsigned int baud) +{ + unsigned long rate; + + calc->src = clk_get(port->dev, clksrc->name); + if (calc->src == NULL || IS_ERR(calc->src)) + return 0; + + rate = clk_get_rate(calc->src); + + calc->clksrc = clksrc; + calc->quot = (rate + (8 * baud)) / (16 * baud); + calc->calc = (rate / (calc->quot * 16)); + + calc->quot--; + return 1; +} + +static unsigned int s3c24xx_serial_getclk(struct uart_port *port, + struct s3c24xx_uart_clksrc **clksrc, + struct clk **clk, + unsigned int baud) { + struct s3c2410_uartcfg *cfg = s3c24xx_port_to_cfg(port); + struct s3c24xx_uart_clksrc *clkp; + struct baud_calc res[MAX_CLKS]; + struct baud_calc *resptr, *best, *sptr; + int i; + + clkp = cfg->clocks; + best = NULL; + + if (cfg->clocks_size < 2) { + if (cfg->clocks_size == 0) + clkp = &tmp_clksrc; + + s3c24xx_serial_calcbaud(res, port, clkp, baud); + best = res; + resptr = best + 1; + } else { + resptr = res; + + for (i = 0; i < cfg->clocks_size; i++, clkp++) { + if (s3c24xx_serial_calcbaud(resptr, port, clkp, baud)) + resptr++; + } + } + + /* ok, we now need to select the best clock we found */ + + if (!best) { + unsigned int deviation = (1<<30)|((1<<30)-1); + int calc_deviation; + + for (sptr = res; sptr < resptr; sptr++) { + printk(KERN_DEBUG + "found clk %p (%s) quot %d, calc %d\n", + sptr->clksrc, sptr->clksrc->name, + sptr->quot, sptr->calc); + + calc_deviation = baud - sptr->calc; + if (calc_deviation < 0) + calc_deviation = -calc_deviation; + + if (calc_deviation < deviation) { + best = sptr; + deviation = calc_deviation; + } + } + + printk(KERN_DEBUG "best %p (deviation %d)\n", best, deviation); + } + + printk(KERN_DEBUG "selected clock %p (%s) quot %d, calc %d\n", + best->clksrc, best->clksrc->name, best->quot, best->calc); + + /* store results to pass back */ + + *clksrc = best->clksrc; + *clk = best->src; + + return best->quot; +} + +static void s3c24xx_serial_set_termios(struct uart_port *port, + struct termios *termios, + struct termios *old) +{ + struct s3c2410_uartcfg *cfg = s3c24xx_port_to_cfg(port); + struct s3c24xx_uart_port *ourport = to_ourport(port); + struct s3c24xx_uart_clksrc *clksrc; + struct clk *clk; unsigned long flags; unsigned int baud, quot; unsigned int ulcon; @@ -310,15 +752,33 @@ termios->c_cflag |= CLOCAL; /* - * We don't support BREAK character recognition. - */ - termios->c_iflag &= ~(IGNBRK | BRKINT); - - /* * Ask the core to calculate the divisor for us. */ - baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); - quot = uart_get_divisor(port, baud); + + baud = uart_get_baud_rate(port, termios, old, 0, 115200*8); + + if (baud == 38400 && (port->flags & UPF_SPD_MASK) == UPF_SPD_CUST) + quot = port->custom_divisor; + else + quot = s3c24xx_serial_getclk(port, &clksrc, &clk, baud); + + /* check to see if we need to change clock source */ + + if (ourport->clksrc != clksrc || ourport->baudclk != clk) { + s3c24xx_serial_setsource(port, clksrc); + + if (ourport->baudclk != NULL && !IS_ERR(ourport->baudclk)) { + clk_disable(ourport->baudclk); + clk_unuse(ourport->baudclk); + ourport->baudclk = NULL; + } + + clk_use(clk); + clk_enable(clk); + + ourport->clksrc = clksrc; + ourport->baudclk = clk; + } switch (termios->c_cflag & CSIZE) { case CS5: @@ -340,6 +800,9 @@ break; } + /* preserve original lcon IR settings */ + ulcon |= (cfg->ulcon & S3C2410_LCON_IRM); + if (termios->c_cflag & CSTOPB) ulcon |= S3C2410_LCON_STOPB; @@ -352,18 +815,12 @@ ulcon |= S3C2410_LCON_PNONE; } - /* - if (port->fifosize) - enable_fifo() - */ - spin_lock_irqsave(&port->lock, flags); - dbg("setting ulcon to %08x\n", ulcon); - //dbg("\n"); + dbg("setting ulcon to %08x, brddiv to %d\n", ulcon, quot); - /* set the ulcon register */ wr_regl(port, S3C2410_ULCON, ulcon); + wr_regl(port, S3C2410_UBRDIV, quot); dbg("uart: ulcon = 0x%08x, ucon = 0x%08x, ufcon = 0x%08x\n", rd_regl(port, S3C2410_ULCON), @@ -400,113 +857,151 @@ spin_unlock_irqrestore(&port->lock, flags); } -static const char *serial_s3c2410_type(struct uart_port *port) +static const char *s3c24xx_serial_type(struct uart_port *port) { - return port->type == PORT_S3C2410 ? "S3C2410" : NULL; + switch (port->type) { + case PORT_S3C2410: + return "S3C2410"; + case PORT_S3C2440: + return "S3C2440"; + default: + return NULL; + } } #define MAP_SIZE (0x100) -static void -serial_s3c2410_release_port(struct uart_port *port) +static void s3c24xx_serial_release_port(struct uart_port *port) { release_mem_region(port->mapbase, MAP_SIZE); } -static int -serial_s3c2410_request_port(struct uart_port *port) +static int s3c24xx_serial_request_port(struct uart_port *port) { - return request_mem_region(port->mapbase, MAP_SIZE, serial_s3c2410_name) - != NULL ? 0 : -EBUSY; + char *name = s3c24xx_serial_portname(port); + return request_mem_region(port->mapbase, MAP_SIZE, name) ? 0 : -EBUSY; } -static void -serial_s3c2410_config_port(struct uart_port *port, int flags) +static void s3c24xx_serial_config_port(struct uart_port *port, int flags) { + struct s3c24xx_uart_info *info = s3c24xx_port_to_info(port); + if (flags & UART_CONFIG_TYPE && - serial_s3c2410_request_port(port) == 0) - port->type = PORT_S3C2410; + s3c24xx_serial_request_port(port) == 0) + port->type = info->type; } /* * verify the new serial_struct (for TIOCSSERIAL). */ static int -serial_s3c2410_verify_port(struct uart_port *port, struct serial_struct *ser) +s3c24xx_serial_verify_port(struct uart_port *port, struct serial_struct *ser) { - int ret = 0; + struct s3c24xx_uart_info *info = s3c24xx_port_to_info(port); - if (ser->type != PORT_UNKNOWN && ser->type != PORT_S3C2410) - ret = -EINVAL; + if (ser->type != PORT_UNKNOWN && ser->type != info->type) + return -EINVAL; - return ret; + return 0; } -static struct uart_ops serial_s3c2410_ops = { - .tx_empty = serial_s3c2410_tx_empty, - .get_mctrl = serial_s3c2410_get_mctrl, - .set_mctrl = serial_s3c2410_set_mctrl, - .stop_tx = serial_s3c2410_stop_tx, - .start_tx = serial_s3c2410_start_tx, - .stop_rx = serial_s3c2410_stop_rx, - .enable_ms = serial_s3c2410_enable_ms, - .break_ctl = serial_s3c2410_break_ctl, - .startup = serial_s3c2410_startup, - .shutdown = serial_s3c2410_shutdown, - .set_termios = serial_s3c2410_set_termios, - .type = serial_s3c2410_type, - .release_port = serial_s3c2410_release_port, - .request_port = serial_s3c2410_request_port, - .config_port = serial_s3c2410_config_port, - .verify_port = serial_s3c2410_verify_port, -}; - -static struct uart_port serial_s3c2410_ports[NR_PORTS] = { - { - .membase = 0, - .mapbase = 0, - .iotype = UPIO_MEM, - .irq = IRQ_S3CUART_RX0, - .uartclk = 0, - .fifosize = 16, - .ops = &serial_s3c2410_ops, - .flags = UPF_BOOT_AUTOCONF, - .line = 0, + +#ifdef CONFIG_SERIAL_S3C2410_CONSOLE + +static struct console s3c24xx_serial_console; + +#define S3C24XX_SERIAL_CONSOLE &s3c24xx_serial_console +#else +#define S3C24XX_SERIAL_CONSOLE NULL +#endif + +static struct uart_ops s3c24xx_serial_ops = { + .pm = s3c24xx_serial_pm, + .tx_empty = s3c24xx_serial_tx_empty, + .get_mctrl = s3c24xx_serial_get_mctrl, + .set_mctrl = s3c24xx_serial_set_mctrl, + .stop_tx = s3c24xx_serial_stop_tx, + .start_tx = s3c24xx_serial_start_tx, + .stop_rx = s3c24xx_serial_stop_rx, + .enable_ms = s3c24xx_serial_enable_ms, + .break_ctl = s3c24xx_serial_break_ctl, + .startup = s3c24xx_serial_startup, + .shutdown = s3c24xx_serial_shutdown, + .set_termios = s3c24xx_serial_set_termios, + .type = s3c24xx_serial_type, + .release_port = s3c24xx_serial_release_port, + .request_port = s3c24xx_serial_request_port, + .config_port = s3c24xx_serial_config_port, + .verify_port = s3c24xx_serial_verify_port, +}; + + +static struct uart_driver s3c24xx_uart_drv = { + .owner = THIS_MODULE, + .dev_name = "s3c2410_serial", + .nr = 3, + .cons = S3C24XX_SERIAL_CONSOLE, + .driver_name = S3C24XX_SERIAL_NAME, + .devfs_name = S3C24XX_SERIAL_DEVFS, + .major = S3C24XX_SERIAL_MAJOR, + .minor = S3C24XX_SERIAL_MINOR, +}; + +static struct s3c24xx_uart_port s3c24xx_serial_ports[NR_PORTS] = { + [0] = { + .port = { + .lock = SPIN_LOCK_UNLOCKED, + .membase = 0, + .mapbase = 0, + .iotype = UPIO_MEM, + .irq = IRQ_S3CUART_RX0, + .uartclk = 0, + .fifosize = 16, + .ops = &s3c24xx_serial_ops, + .flags = UPF_BOOT_AUTOCONF, + .line = 0, + } + }, + [1] = { + .port = { + .lock = SPIN_LOCK_UNLOCKED, + .membase = 0, + .mapbase = 0, + .iotype = UPIO_MEM, + .irq = IRQ_S3CUART_RX1, + .uartclk = 0, + .fifosize = 16, + .ops = &s3c24xx_serial_ops, + .flags = UPF_BOOT_AUTOCONF, + .line = 1, + } }, - { - .membase = 0, - .mapbase = 0, - .iotype = UPIO_MEM, - .irq = IRQ_S3CUART_RX1, - .uartclk = 0, - .fifosize = 16, - .ops = &serial_s3c2410_ops, - .flags = UPF_BOOT_AUTOCONF, - .line = 1, - } #if NR_PORTS > 2 - , - { - .membase = 0, - .mapbase = 0, - .iotype = UPIO_MEM, - .irq = IRQ_S3CUART_RX2, - .uartclk = 0, - .fifosize = 16, - .ops = &serial_s3c2410_ops, - .flags = UPF_BOOT_AUTOCONF, - .line = 2, + + [2] = { + .port = { + .lock = SPIN_LOCK_UNLOCKED, + .membase = 0, + .mapbase = 0, + .iotype = UPIO_MEM, + .irq = IRQ_S3CUART_RX2, + .uartclk = 0, + .fifosize = 16, + .ops = &s3c24xx_serial_ops, + .flags = UPF_BOOT_AUTOCONF, + .line = 2, + } } #endif }; -static int -serial_s3c2410_resetport(struct uart_port *port, - struct s3c2410_uartcfg *cfg) + +static int s3c24xx_serial_resetport(struct uart_port *port, + struct s3c2410_uartcfg *cfg) { /* ensure registers are setup */ - dbg("serial_s3c2410_resetport: port=%p (%08x), cfg=%p\n", + dbg("s3c24xx_serial_resetport: port=%p (%08lx), cfg=%p\n", port, port->mapbase, cfg); wr_regl(port, S3C2410_UCON, cfg->ucon); @@ -520,105 +1015,431 @@ return 0; } -/* serial_s3c2410_init_ports +/* s3c24xx_serial_init_port * - * initialise the serial ports from the machine provided initialisation - * data. -*/ + * initialise a single serial port from the platform device given + */ -static int serial_s3c2410_init_ports(void) +static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport, + struct s3c24xx_uart_info *info, + struct platform_device *platdev) { - struct uart_port *ptr = serial_s3c2410_ports; - struct s3c2410_uartcfg *cfg = s3c2410_uartcfgs; - static int inited = 0; - int i; + struct uart_port *port = &ourport->port; + struct s3c2410_uartcfg *cfg; + struct resource *res; + + dbg("s3c24xx_serial_init_port: port=%p, platdev=%p\n", port, platdev); + + if (platdev == NULL) + return -ENODEV; - if (inited) + cfg = s3c24xx_dev_to_cfg(&platdev->dev); + + if (port->mapbase != 0) return 0; - inited = 1; - dbg("serial_s3c2410_init_ports: initialising ports...\n"); + if (cfg->hwport > 3) + return -EINVAL; - for (i = 0; i < NR_PORTS; i++, ptr++, cfg++) { + /* setup info for port */ + port->dev = &platdev->dev; + ourport->info = info; - if (cfg->hwport > 3) - continue; + /* copy the info in from provided structure */ + ourport->port.fifosize = info->fifosize; - dbg("serial_s3c2410_init_ports: port %d (hw %d)...\n", - i, cfg->hwport); + dbg("s3c24xx_serial_init_port: %p (hw %d)...\n", port, cfg->hwport); - if (cfg->clock != NULL) - ptr->uartclk = *cfg->clock; + port->uartclk = 1; - switch (cfg->hwport) { - case 0: - ptr->mapbase = S3C2410_PA_UART0; - ptr->membase = (char *)S3C2410_VA_UART0; - ptr->irq = IRQ_S3CUART_RX0; - break; + if (cfg->uart_flags & UPF_CONS_FLOW) { + dbg("s3c24xx_serial_init_port: enabling flow control\n"); + port->flags |= UPF_CONS_FLOW; + } - case 1: - ptr->mapbase = S3C2410_PA_UART1; - ptr->membase = (char *)S3C2410_VA_UART1; - ptr->irq = IRQ_S3CUART_RX1; - break; + /* sort our the physical and virtual addresses for each UART */ - case 2: - ptr->mapbase = S3C2410_PA_UART2; - ptr->membase = (char *)S3C2410_VA_UART2; - ptr->irq = IRQ_S3CUART_RX2; - break; - } + res = platform_get_resource(platdev, IORESOURCE_MEM, 0); + if (res == NULL) { + printk(KERN_ERR "failed to find memory resource for uart\n"); + return -EINVAL; + } + + dbg("resource %p (%lx..%lx)\n", res, res->start, res->end); + + port->mapbase = res->start; + port->membase = (void __iomem *)(res->start - S3C2410_PA_UART); + port->membase += S3C2410_VA_UART; + port->irq = platform_get_irq(platdev, 0); + + ourport->clk = clk_get(&platdev->dev, "uart"); + + if (ourport->clk != NULL && !IS_ERR(ourport->clk)) + clk_use(ourport->clk); + + dbg("port: map=%08x, mem=%08x, irq=%d, clock=%ld\n", + port->mapbase, port->membase, port->irq, port->uartclk); + + /* reset the fifos (and setup the uart) */ + s3c24xx_serial_resetport(port, cfg); + return 0; +} + +/* Device driver serial port probe */ + +static int probe_index = 0; + +int s3c24xx_serial_probe(struct device *_dev, + struct s3c24xx_uart_info *info) +{ + struct s3c24xx_uart_port *ourport; + struct platform_device *dev = to_platform_device(_dev); + int ret; + + dbg("s3c24xx_serial_probe(%p, %p) %d\n", _dev, info, probe_index); + + ourport = &s3c24xx_serial_ports[probe_index]; + probe_index++; + + dbg("%s: initialising port %p...\n", __FUNCTION__, ourport); + + ret = s3c24xx_serial_init_port(ourport, info, dev); + if (ret < 0) + goto probe_err; + + dbg("%s: adding port\n", __FUNCTION__); + uart_add_one_port(&s3c24xx_uart_drv, &ourport->port); + dev_set_drvdata(_dev, &ourport->port); + + return 0; + + probe_err: + return ret; +} + +int s3c24xx_serial_remove(struct device *_dev) +{ + struct uart_port *port = s3c24xx_dev_to_port(_dev); + + if (port) + uart_remove_one_port(&s3c24xx_uart_drv, port); - if (ptr->mapbase == 0) - continue; + return 0; +} + +/* UART power management code */ + +#ifdef CONFIG_PM + +int s3c24xx_serial_suspend(struct device *dev, u32 state, u32 level) +{ + struct uart_port *port = s3c24xx_dev_to_port(dev); + + if (port && level == SUSPEND_DISABLE) + uart_suspend_port(&s3c24xx_uart_drv, port); + + return 0; +} + +int s3c24xx_serial_resume(struct device *dev, u32 level) +{ + struct uart_port *port = s3c24xx_dev_to_port(dev); + struct s3c24xx_uart_port *ourport = to_ourport(port); - /* reset the fifos (and setup the uart */ - serial_s3c2410_resetport(ptr, cfg); + if (port && level == RESUME_ENABLE) { + clk_enable(ourport->clk); + s3c24xx_serial_resetport(port, s3c24xx_port_to_cfg(port)); + clk_disable(ourport->clk); + + uart_resume_port(&s3c24xx_uart_drv, port); } return 0; } +#else +#define s3c24xx_serial_suspend NULL +#define s3c24xx_serial_resume NULL +#endif + +int s3c24xx_serial_init(struct device_driver *drv, + struct s3c24xx_uart_info *info) +{ + dbg("s3c24xx_serial_init(%p,%p)\n", drv, info); + return driver_register(drv); +} + + +/* now comes the code to initialise either the s3c2410 or s3c2440 serial + * port information +*/ + +/* cpu specific variations on the serial port support */ + +#ifdef CONFIG_CPU_S3C2410 + +static int s3c2410_serial_setsource(struct uart_port *port, + struct s3c24xx_uart_clksrc *clk) +{ + unsigned long ucon = rd_regl(port, S3C2410_UCON); + + if (strcmp(clk->name, "uclk") == 0) + ucon |= S3C2410_UCON_UCLK; + else + ucon &= ~S3C2410_UCON_UCLK; + + wr_regl(port, S3C2410_UCON, ucon); + return 0; +} + +static int s3c2410_serial_getsource(struct uart_port *port, + struct s3c24xx_uart_clksrc *clk) +{ + unsigned long ucon = rd_regl(port, S3C2410_UCON); + + clk->divisor = 1; + clk->name = (ucon & S3C2410_UCON_UCLK) ? "uclk" : "pclk"; + + return 0; +} + +static struct s3c24xx_uart_info s3c2410_uart_inf = { + .name = "Samsung S3C2410 UART", + .type = PORT_S3C2410, + .fifosize = 16, + .rx_fifomask = S3C2410_UFSTAT_RXMASK, + .rx_fifoshift = S3C2410_UFSTAT_RXSHIFT, + .rx_fifofull = S3C2410_UFSTAT_RXFULL, + .tx_fifofull = S3C2410_UFSTAT_TXFULL, + .tx_fifomask = S3C2410_UFSTAT_TXMASK, + .tx_fifoshift = S3C2410_UFSTAT_TXSHIFT, + .get_clksrc = s3c2410_serial_getsource, + .set_clksrc = s3c2410_serial_setsource, +}; + +/* device management */ + +static int s3c2410_serial_probe(struct device *dev) +{ + return s3c24xx_serial_probe(dev, &s3c2410_uart_inf); +} + +static struct device_driver s3c2410_serial_drv = { + .name = "s3c2410-uart", + .bus = &platform_bus_type, + .probe = s3c2410_serial_probe, + .remove = s3c24xx_serial_remove, + .suspend = s3c24xx_serial_suspend, + .resume = s3c24xx_serial_resume, +}; + +static inline int s3c2410_serial_init(void) +{ + return s3c24xx_serial_init(&s3c2410_serial_drv, &s3c2410_uart_inf); +} + +static inline void s3c2410_serial_exit(void) +{ + driver_unregister(&s3c2410_serial_drv); +} + +#define s3c2410_uart_inf_at &s3c2410_uart_inf +#else + +static inline int s3c2410_serial_init(void) +{ + return 0; +} + +static inline void s3c2410_serial_exit(void) +{ +} + +#define s3c2410_uart_inf_at NULL + +#endif /* CONFIG_CPU_S3C2410 */ + +#ifdef CONFIG_CPU_S3C2440 + +static int s3c2440_serial_setsource(struct uart_port *port, + struct s3c24xx_uart_clksrc *clk) +{ + unsigned long ucon = rd_regl(port, S3C2410_UCON); + + // todo - proper fclk<>nonfclk switch // + + ucon &= ~S3C2440_UCON_CLKMASK; + + if (strcmp(clk->name, "uclk") == 0) + ucon |= S3C2440_UCON_UCLK; + else if (strcmp(clk->name, "pclk") == 0) + ucon |= S3C2440_UCON_PCLK; + else if (strcmp(clk->name, "fclk") == 0) + ucon |= S3C2440_UCON_FCLK; + else { + printk(KERN_ERR "unknown clock source %s\n", clk->name); + return -EINVAL; + } + + wr_regl(port, S3C2410_UCON, ucon); + return 0; +} + + +static int s3c2440_serial_getsource(struct uart_port *port, + struct s3c24xx_uart_clksrc *clk) +{ + unsigned long ucon = rd_regl(port, S3C2410_UCON); + + switch (ucon & S3C2440_UCON_CLKMASK) { + case S3C2440_UCON_UCLK: + clk->divisor = 1; + clk->name = "uclk"; + break; + + case S3C2440_UCON_PCLK: + case S3C2440_UCON_PCLK2: + clk->divisor = 1; + clk->name = "pclk"; + break; + + case S3C2440_UCON_FCLK: + clk->divisor = 7; /* todo - work out divisor */ + clk->name = "fclk"; + break; + } + + return 0; +} + + +static struct s3c24xx_uart_info s3c2440_uart_inf = { + .name = "Samsung S3C2440 UART", + .type = PORT_S3C2440, + .fifosize = 64, + .rx_fifomask = S3C2440_UFSTAT_RXMASK, + .rx_fifoshift = S3C2440_UFSTAT_RXSHIFT, + .rx_fifofull = S3C2440_UFSTAT_RXFULL, + .tx_fifofull = S3C2440_UFSTAT_TXFULL, + .tx_fifomask = S3C2440_UFSTAT_TXMASK, + .tx_fifoshift = S3C2440_UFSTAT_TXSHIFT, + .get_clksrc = s3c2440_serial_getsource, + .set_clksrc = s3c2440_serial_setsource +}; + +/* device management */ + +static int s3c2440_serial_probe(struct device *dev) +{ + dbg("s3c2440_serial_probe: dev=%p\n", dev); + return s3c24xx_serial_probe(dev, &s3c2440_uart_inf); +} + +static struct device_driver s3c2440_serial_drv = { + .name = "s3c2440-uart", + .bus = &platform_bus_type, + .probe = s3c2440_serial_probe, + .remove = s3c24xx_serial_remove, + .suspend = s3c24xx_serial_suspend, + .resume = s3c24xx_serial_resume, +}; + + +static inline int s3c2440_serial_init(void) +{ + return s3c24xx_serial_init(&s3c2440_serial_drv, &s3c2440_uart_inf); +} + +static inline void s3c2440_serial_exit(void) +{ + driver_unregister(&s3c2440_serial_drv); +} + +#define s3c2440_uart_inf_at &s3c2440_uart_inf +#else + +static inline int s3c2440_serial_init(void) +{ + return 0; +} + +static inline void s3c2440_serial_exit(void) +{ +} + +#define s3c2440_uart_inf_at NULL +#endif /* CONFIG_CPU_S3C2440 */ + +/* module initialisation code */ + +static int __init s3c24xx_serial_modinit(void) +{ + int ret; + + ret = uart_register_driver(&s3c24xx_uart_drv); + if (ret < 0) { + printk(KERN_ERR "failed to register UART driver\n"); + return -1; + } + + s3c2410_serial_init(); + s3c2440_serial_init(); + + return 0; +} + +static void __exit s3c24xx_serial_modexit(void) +{ + s3c2410_serial_exit(); + s3c2440_serial_exit(); + + uart_unregister_driver(&s3c24xx_uart_drv); +} + + +module_init(s3c24xx_serial_modinit); +module_exit(s3c24xx_serial_modexit); + +/* Console code */ + #ifdef CONFIG_SERIAL_S3C2410_CONSOLE static struct uart_port *cons_uart; static int -serial_s3c2410_console_txrdy(struct uart_port *port, unsigned int ufcon) +s3c24xx_serial_console_txrdy(struct uart_port *port, unsigned int ufcon) { + struct s3c24xx_uart_info *info = s3c24xx_port_to_info(port); unsigned long ufstat, utrstat; if (ufcon & S3C2410_UFCON_FIFOMODE) { /* fifo mode - check ammount of data in fifo registers... */ ufstat = rd_regl(port, S3C2410_UFSTAT); - - return S3C2410_UFCON_TXC(ufstat) < 12; + return (ufstat & info->tx_fifofull) ? 0 : 1; } /* in non-fifo mode, we go and use the tx buffer empty */ utrstat = rd_regl(port, S3C2410_UTRSTAT); - - return (utrstat & S3C2410_UTRSTAT_TXFE) ? 1 : 0; + return (utrstat & S3C2410_UTRSTAT_TXE) ? 1 : 0; } static void -serial_s3c2410_console_write(struct console *co, const char *s, +s3c24xx_serial_console_write(struct console *co, const char *s, unsigned int count) { int i; unsigned int ufcon = rd_regl(cons_uart, S3C2410_UFCON); for (i = 0; i < count; i++) { - while (!serial_s3c2410_console_txrdy(cons_uart, ufcon)) + while (!s3c24xx_serial_console_txrdy(cons_uart, ufcon)) barrier(); wr_regb(cons_uart, S3C2410_UTXH, s[i]); if (s[i] == '\n') { - while (!serial_s3c2410_console_txrdy(cons_uart, ufcon)) + while (!s3c24xx_serial_console_txrdy(cons_uart, ufcon)) barrier(); wr_regb(cons_uart, S3C2410_UTXH, '\r'); @@ -627,17 +1448,21 @@ } static void __init -serial_s3c2410_get_options(struct uart_port *port, int *baud, +s3c24xx_serial_get_options(struct uart_port *port, int *baud, int *parity, int *bits) { - - unsigned int ulcon, ucon, ubrdiv; + struct s3c24xx_uart_clksrc clksrc; + struct clk *clk; + unsigned int ulcon; + unsigned int ucon; + unsigned int ubrdiv; + unsigned long rate; ulcon = rd_regl(port, S3C2410_ULCON); ucon = rd_regl(port, S3C2410_UCON); ubrdiv = rd_regl(port, S3C2410_UBRDIV); - dbg("serial_s3c2410_get_options: port=%p\n" + dbg("s3c24xx_serial_get_options: port=%p\n" "registers: ulcon=%08x, ucon=%08x, ubdriv=%08x\n", port, ulcon, ucon, ubrdiv); @@ -669,21 +1494,53 @@ *parity = 'o'; break; - default: case S3C2410_LCON_PNONE: + default: *parity = 'n'; } /* now calculate the baud rate */ - *baud = port->uartclk / ( 16 * (ubrdiv + 1)); + s3c24xx_serial_getsource(port, &clksrc); + + clk = clk_get(port->dev, clksrc.name); + if (!IS_ERR(clk) && clk != NULL) + rate = clk_get_rate(clk); + else + rate = 1; + + + *baud = rate / ( 16 * (ubrdiv + 1)); dbg("calculated baud %d\n", *baud); } } +/* s3c24xx_serial_init_ports + * + * initialise the serial ports from the machine provided initialisation + * data. +*/ + +static int s3c24xx_serial_init_ports(struct s3c24xx_uart_info *info) +{ + struct s3c24xx_uart_port *ptr = s3c24xx_serial_ports; + struct platform_device **platdev_ptr; + int i; + + dbg("s3c24xx_serial_init_ports: initialising ports...\n"); + + platdev_ptr = s3c24xx_uart_devs; + + for (i = 0; i < NR_PORTS; i++, ptr++, platdev_ptr++) { + s3c24xx_serial_init_port(ptr, info, *platdev_ptr); + } + + return 0; +} + static int __init -serial_s3c2410_console_setup(struct console *co, char *options) +s3c24xx_serial_console_setup(struct console *co, char *options) { struct uart_port *port; int baud = 9600; @@ -691,23 +1548,26 @@ int parity = 'n'; int flow = 'n'; + dbg("s3c24xx_serial_console_setup: co=%p (%d), %s\n", + co, co->index, options); + /* is this a valid port */ if (co->index == -1 || co->index >= NR_PORTS) co->index = 0; - port = &serial_s3c2410_ports[co->index]; + port = &s3c24xx_serial_ports[co->index].port; /* is the port configured? */ if (port->mapbase == 0x0) { co->index = 0; - port = &serial_s3c2410_ports[co->index]; + port = &s3c24xx_serial_ports[co->index].port; } cons_uart = port; - dbg("serial_s3c2410_console_setup: port=%p (%d)\n", port, co->index); + dbg("s3c24xx_serial_console_setup: port=%p (%d)\n", port, co->index); /* * Check whether an invalid uart number has been specified, and @@ -717,138 +1577,68 @@ if (options) uart_parse_options(options, &baud, &parity, &bits, &flow); else - serial_s3c2410_get_options(port, &baud, &parity, &bits); + s3c24xx_serial_get_options(port, &baud, &parity, &bits); + + dbg("s3c24xx_serial_console_setup: baud %d\n", baud); return uart_set_options(port, co, baud, parity, bits, flow); } -static struct uart_driver s3c2410_uart_drv; +/* s3c24xx_serial_initconsole + * + * initialise the console from one of the uart drivers +*/ -static struct console serial_s3c2410_console = +static struct console s3c24xx_serial_console = { - .name = SERIAL_S3C2410_NAME, - .write = serial_s3c2410_console_write, + .name = S3C24XX_SERIAL_NAME, .device = uart_console_device, - .setup = serial_s3c2410_console_setup, .flags = CON_PRINTBUFFER, .index = -1, - .data = &s3c2410_uart_drv, -}; - -static int __init s3c2410_console_init(void) -{ - dbg("s3c2410_console_init:\n"); - - serial_s3c2410_init_ports(); - register_console(&serial_s3c2410_console); - return 0; -} -console_initcall(s3c2410_console_init); - -#define SERIAL_S3C2410_CONSOLE &serial_s3c2410_console -#else -#define SERIAL_S3C2410_CONSOLE NULL -#endif - -static struct uart_driver s3c2410_uart_drv = { - .owner = THIS_MODULE, - .driver_name = SERIAL_S3C2410_NAME, - .dev_name = SERIAL_S3C2410_NAME, - .major = SERIAL_S3C2410_MAJOR, - .minor = SERIAL_S3C2410_MINOR, - .nr = 3, - .cons = SERIAL_S3C2410_CONSOLE, -}; - -/* device driver */ - -static int s3c2410_serial_probe(struct device *_dev); -static int s3c2410_serial_remove(struct device *_dev); - -static struct device_driver s3c2410_serial_drv = { - .name = "s3c2410-uart", - .bus = &platform_bus_type, - .probe = s3c2410_serial_probe, - .remove = s3c2410_serial_remove, - .suspend = NULL, - .resume = NULL, + .write = s3c24xx_serial_console_write, + .setup = s3c24xx_serial_console_setup }; -#define s3c2410_dev_to_port(__dev) (struct uart_port *)dev_get_drvdata(__dev) -static int s3c2410_serial_probe(struct device *_dev) +static int s3c24xx_serial_initconsole(void) { - struct platform_device *dev = to_platform_device(_dev); - struct resource *res = dev->resource; - int i; + struct s3c24xx_uart_info *info; + struct platform_device *dev = s3c24xx_uart_devs[0]; - dbg("s3c2410_serial_probe: dev=%p, _dev=%p, res=%p\n", _dev, dev, res); + dbg("s3c24xx_serial_initconsole\n"); - for (i = 0; i < dev->num_resources; i++, res++) - if (res->flags & IORESOURCE_MEM) - break; - - if (i < dev->num_resources) { - struct uart_port *ptr = serial_s3c2410_ports; + /* select driver based on the cpu */ - for (i = 0; i < NR_PORTS; i++, ptr++) { - dbg("s3c2410_serial_probe: ptr=%p (%08x, %08x)\n", - ptr, ptr->mapbase, ptr->membase); - - if (ptr->mapbase != res->start) - continue; - - dbg("s3c2410_serial_probe: got device %p: port=%p\n", - _dev, ptr); - - uart_add_one_port(&s3c2410_uart_drv, ptr); - dev_set_drvdata(_dev, ptr); - break; - } + if (dev == NULL) { + printk(KERN_ERR "s3c24xx: no devices for console init\n"); + return 0; } - return 0; -} + if (strcmp(dev->name, "s3c2410-uart") == 0) { + info = s3c2410_uart_inf_at; + } else if (strcmp(dev->name, "s3c2440-uart") == 0) { + info = s3c2440_uart_inf_at; + } else { + printk(KERN_ERR "s3c24xx: no driver for %s\n", dev->name); + return 0; + } -static int s3c2410_serial_remove(struct device *_dev) -{ - struct uart_port *port = s3c2410_dev_to_port(_dev); + if (info == NULL) { + printk(KERN_ERR "s3c24xx: no driver for console\n"); + return 0; + } - if (port) - uart_remove_one_port(&s3c2410_uart_drv, port); + s3c24xx_serial_console.data = &s3c24xx_uart_drv; + s3c24xx_serial_init_ports(info); + register_console(&s3c24xx_serial_console); return 0; } +console_initcall(s3c24xx_serial_initconsole); - -static int __init serial_s3c2410_init(void) -{ - int ret; - - printk(KERN_INFO "S3C2410X Serial, (c) 2003 Simtec Electronics\n"); - - ret = uart_register_driver(&s3c2410_uart_drv); - if (ret != 0) - return ret; - - ret = driver_register(&s3c2410_serial_drv); - if (ret) { - uart_unregister_driver(&s3c2410_uart_drv); - } - - return ret; -} - -static void __exit serial_s3c2410_exit(void) -{ - driver_unregister(&s3c2410_serial_drv); - uart_unregister_driver(&s3c2410_uart_drv); -} - -module_init(serial_s3c2410_init); -module_exit(serial_s3c2410_exit); +#endif /* CONFIG_SERIAL_S3C2410_CONSOLE */ MODULE_LICENSE("GPL"); MODULE_AUTHOR("Ben Dooks "); -MODULE_DESCRIPTION("Samsung S3C2410X (S3C2410) Serial driver"); +MODULE_DESCRIPTION("Samsung S3C2410/S3C2440 Serial port driver"); diff -Nru a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c --- a/drivers/serial/sunsab.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/serial/sunsab.c 2004-11-29 21:22:07 -08:00 @@ -51,7 +51,7 @@ struct uart_sunsab_port { struct uart_port port; /* Generic UART port */ - union sab82532_async_regs *regs; /* Chip registers */ + union sab82532_async_regs __iomem *regs; /* Chip registers */ unsigned long irqflags; /* IRQ state flags */ int dsr; /* Current DSR state */ unsigned int cec_timeout; /* Chip poll timeout... */ @@ -1125,13 +1125,13 @@ sunserial_current_minor += num_channels; + sunsab_console_init(); + for (i = 0; i < num_channels; i++) { struct uart_sunsab_port *up = &sunsab_ports[i]; uart_add_one_port(&sunsab_reg, &up->port); } - - sunsab_console_init(); return 0; } diff -Nru a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c --- a/drivers/serial/sunsu.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/serial/sunsu.c 2004-11-29 21:22:06 -08:00 @@ -1532,6 +1532,7 @@ if (ret < 0) return ret; + sunsu_serial_console_init(); for (i = 0; i < UART_NR; i++) { struct uart_sunsu_port *up = &sunsu_ports[i]; @@ -1704,7 +1705,6 @@ * Console must be initiated after the generic initialization. */ sunsu_serial_init(); - sunsu_serial_console_init(); return 0; } diff -Nru a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c --- a/drivers/serial/sunzilog.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/serial/sunzilog.c 2004-11-29 21:22:08 -08:00 @@ -112,7 +112,7 @@ #endif }; -#define ZILOG_CHANNEL_FROM_PORT(PORT) ((struct zilog_channel *)((PORT)->membase)) +#define ZILOG_CHANNEL_FROM_PORT(PORT) ((struct zilog_channel __iomem *)((PORT)->membase)) #define UART_ZILOG(PORT) ((struct uart_sunzilog_port *)(PORT)) #define ZS_IS_KEYB(UP) ((UP)->flags & SUNZILOG_FLAG_CONS_KEYB) @@ -133,7 +133,7 @@ * The port lock must be held and local IRQs must be disabled * when {read,write}_zsreg is invoked. */ -static unsigned char read_zsreg(struct zilog_channel *channel, +static unsigned char read_zsreg(struct zilog_channel __iomem *channel, unsigned char reg) { unsigned char retval; @@ -146,7 +146,7 @@ return retval; } -static void write_zsreg(struct zilog_channel *channel, +static void write_zsreg(struct zilog_channel __iomem *channel, unsigned char reg, unsigned char value) { sbus_writeb(reg, &channel->control); @@ -155,7 +155,7 @@ ZSDELAY(); } -static void sunzilog_clear_fifo(struct zilog_channel *channel) +static void sunzilog_clear_fifo(struct zilog_channel __iomem *channel) { int i; @@ -182,7 +182,7 @@ /* This function must only be called when the TX is not busy. The UART * port lock must be held and local interrupts disabled. */ -static void __load_zsregs(struct zilog_channel *channel, unsigned char *regs) +static void __load_zsregs(struct zilog_channel __iomem *channel, unsigned char *regs) { int i; @@ -258,7 +258,7 @@ * The UART port lock must be held and local interrupts disabled. */ static void sunzilog_maybe_update_regs(struct uart_sunzilog_port *up, - struct zilog_channel *channel) + struct zilog_channel __iomem *channel) { if (!ZS_REGS_HELD(up)) { if (ZS_TX_ACTIVE(up)) { @@ -315,7 +315,7 @@ static struct tty_struct * sunzilog_receive_chars(struct uart_sunzilog_port *up, - struct zilog_channel *channel, + struct zilog_channel __iomem *channel, struct pt_regs *regs) { struct tty_struct *tty; @@ -419,7 +419,7 @@ } static void sunzilog_status_handle(struct uart_sunzilog_port *up, - struct zilog_channel *channel, + struct zilog_channel __iomem *channel, struct pt_regs *regs) { unsigned char status; @@ -471,7 +471,7 @@ } static void sunzilog_transmit_chars(struct uart_sunzilog_port *up, - struct zilog_channel *channel) + struct zilog_channel __iomem *channel) { struct circ_buf *xmit; @@ -548,7 +548,7 @@ struct uart_sunzilog_port *up = dev_id; while (up) { - struct zilog_channel *channel + struct zilog_channel __iomem *channel = ZILOG_CHANNEL_FROM_PORT(&up->port); struct tty_struct *tty; unsigned char r3; @@ -609,7 +609,7 @@ */ static __inline__ unsigned char sunzilog_read_channel_status(struct uart_port *port) { - struct zilog_channel *channel; + struct zilog_channel __iomem *channel; unsigned long flags; unsigned char status; @@ -662,7 +662,7 @@ static void sunzilog_set_mctrl(struct uart_port *port, unsigned int mctrl) { struct uart_sunzilog_port *up = (struct uart_sunzilog_port *) port; - struct zilog_channel *channel = ZILOG_CHANNEL_FROM_PORT(port); + struct zilog_channel __iomem *channel = ZILOG_CHANNEL_FROM_PORT(port); unsigned char set_bits, clear_bits; set_bits = clear_bits = 0; @@ -694,7 +694,7 @@ static void sunzilog_start_tx(struct uart_port *port, unsigned int tty_start) { struct uart_sunzilog_port *up = (struct uart_sunzilog_port *) port; - struct zilog_channel *channel = ZILOG_CHANNEL_FROM_PORT(port); + struct zilog_channel __iomem *channel = ZILOG_CHANNEL_FROM_PORT(port); unsigned char status; up->flags |= SUNZILOG_FLAG_TX_ACTIVE; @@ -736,7 +736,7 @@ static void sunzilog_stop_rx(struct uart_port *port) { struct uart_sunzilog_port *up = UART_ZILOG(port); - struct zilog_channel *channel; + struct zilog_channel __iomem *channel; if (ZS_IS_CONS(up)) return; @@ -752,7 +752,7 @@ static void sunzilog_enable_ms(struct uart_port *port) { struct uart_sunzilog_port *up = (struct uart_sunzilog_port *) port; - struct zilog_channel *channel = ZILOG_CHANNEL_FROM_PORT(port); + struct zilog_channel __iomem *channel = ZILOG_CHANNEL_FROM_PORT(port); unsigned char new_reg; new_reg = up->curregs[R15] | (DCDIE | SYNCIE | CTSIE); @@ -768,7 +768,7 @@ static void sunzilog_break_ctl(struct uart_port *port, int break_state) { struct uart_sunzilog_port *up = (struct uart_sunzilog_port *) port; - struct zilog_channel *channel = ZILOG_CHANNEL_FROM_PORT(port); + struct zilog_channel __iomem *channel = ZILOG_CHANNEL_FROM_PORT(port); unsigned char set_bits, clear_bits, new_reg; unsigned long flags; @@ -794,7 +794,7 @@ static void __sunzilog_startup(struct uart_sunzilog_port *up) { - struct zilog_channel *channel; + struct zilog_channel __iomem *channel; channel = ZILOG_CHANNEL_FROM_PORT(&up->port); up->prev_status = sbus_readb(&channel->control); @@ -849,7 +849,7 @@ static void sunzilog_shutdown(struct uart_port *port) { struct uart_sunzilog_port *up = UART_ZILOG(port); - struct zilog_channel *channel; + struct zilog_channel __iomem *channel; unsigned long flags; if (ZS_IS_CONS(up)) @@ -974,6 +974,8 @@ sunzilog_maybe_update_regs(up, ZILOG_CHANNEL_FROM_PORT(port)); + uart_update_timeout(port, termios->c_cflag, baud); + spin_unlock_irqrestore(&up->port.lock, flags); } @@ -1025,7 +1027,7 @@ }; static struct uart_sunzilog_port *sunzilog_port_table; -static struct zilog_layout **sunzilog_chip_regs; +static struct zilog_layout __iomem **sunzilog_chip_regs; static struct uart_sunzilog_port *sunzilog_irq_chain; static int zilog_irq = -1; @@ -1051,10 +1053,10 @@ static void __init sunzilog_alloc_tables(void) { - sunzilog_port_table = (struct uart_sunzilog_port *) + sunzilog_port_table = alloc_one_table(NUM_CHANNELS * sizeof(struct uart_sunzilog_port)); - sunzilog_chip_regs = (struct zilog_layout **) - alloc_one_table(NUM_SUNZILOG * sizeof(struct zilog_layout *)); + sunzilog_chip_regs = + alloc_one_table(NUM_SUNZILOG * sizeof(struct zilog_layout __iomem *)); if (sunzilog_port_table == NULL || sunzilog_chip_regs == NULL) { prom_printf("SunZilog: Cannot allocate tables.\n"); @@ -1067,7 +1069,7 @@ /* We used to attempt to use the address property of the Zilog device node * but that totally is not necessary on sparc64. */ -static struct zilog_layout * __init get_zs_sun4u(int chip, int zsnode) +static struct zilog_layout __iomem * __init get_zs_sun4u(int chip, int zsnode) { unsigned long mapped_addr; unsigned int sun4u_ino; @@ -1131,7 +1133,7 @@ } } - return (struct zilog_layout *) mapped_addr; + return (struct zilog_layout __iomem *) mapped_addr; } #else /* CONFIG_SPARC64 */ @@ -1139,10 +1141,10 @@ * XXX The sun4d case is utterly screwed: it tries to re-walk the tree * (for the 3rd time) in order to find bootbus and cpu. Streamline it. */ -static struct zilog_layout * __init get_zs_sun4cmd(int chip, int node) +static struct zilog_layout __iomem * __init get_zs_sun4cmd(int chip, int node) { struct linux_prom_irqs irq_info[2]; - unsigned long mapped_addr = 0; + void __iomem *mapped_addr = NULL; int zsnode, cpunode, bbnode; struct linux_prom_registers zsreg[4]; struct resource res; @@ -1228,12 +1230,12 @@ prom_halt(); } - return (struct zilog_layout *) mapped_addr; + return (struct zilog_layout __iomem *) mapped_addr; } #endif /* !(CONFIG_SPARC64) */ /* Get the address of the registers for SunZilog instance CHIP. */ -static struct zilog_layout * __init get_zs(int chip, int node) +static struct zilog_layout __iomem * __init get_zs(int chip, int node) { if (chip < 0 || chip >= NUM_SUNZILOG) { prom_printf("SunZilog: Illegal chip number %d in get_zs.\n", chip); @@ -1259,7 +1261,7 @@ zilog_irq = 12; res.end = (res.start + (8 - 1)); res.flags = IORESOURCE_IO; - return (struct zilog_layout *) sbus_ioremap(&res, 0, 8, "SunZilog"); + return sbus_ioremap(&res, 0, 8, "SunZilog"); } return get_zs_sun4cmd(chip, node); @@ -1268,7 +1270,7 @@ #define ZS_PUT_CHAR_MAX_DELAY 2000 /* 10 ms */ -static void sunzilog_put_char(struct zilog_channel *channel, unsigned char ch) +static void sunzilog_put_char(struct zilog_channel __iomem *channel, unsigned char ch) { int loops = ZS_PUT_CHAR_MAX_DELAY; @@ -1483,7 +1485,7 @@ static void __init sunzilog_prepare(void) { struct uart_sunzilog_port *up; - struct zilog_layout *rp; + struct zilog_layout __iomem *rp; int channel, chip; /* @@ -1499,8 +1501,8 @@ for (chip = 0; chip < NUM_SUNZILOG; chip++) { rp = sunzilog_chip_regs[chip]; - up[(chip * 2) + 0].port.membase = (char *) &rp->channelA; - up[(chip * 2) + 1].port.membase = (char *) &rp->channelB; + up[(chip * 2) + 0].port.membase = (void __iomem *)&rp->channelA; + up[(chip * 2) + 1].port.membase = (void __iomem *)&rp->channelB; /* Channel A */ up[(chip * 2) + 0].port.iotype = SERIAL_IO_MEM; @@ -1590,7 +1592,7 @@ for (i = 0; i < NUM_CHANNELS; i++) { struct uart_sunzilog_port *up = &sunzilog_port_table[i]; - struct zilog_channel *channel = ZILOG_CHANNEL_FROM_PORT(&up->port); + struct zilog_channel __iomem *channel = ZILOG_CHANNEL_FROM_PORT(&up->port); unsigned long flags; int baud, brg; @@ -1634,7 +1636,7 @@ } } -static struct zilog_layout * __init get_zs(int chip, int node); +static struct zilog_layout __iomem * __init get_zs(int chip, int node); static void __init sunzilog_scan_probe(struct zs_probe_scan *t, int node) { @@ -1688,6 +1690,7 @@ ret = uart_register_driver(&sunzilog_reg); if (ret == 0) { + sunzilog_console_init(); for (i = 0; i < NUM_CHANNELS; i++) { struct uart_sunzilog_port *up = &sunzilog_port_table[i]; @@ -1736,7 +1739,6 @@ sunzilog_alloc_tables(); sunzilog_ports_init(); - sunzilog_console_init(); return 0; } diff -Nru a/drivers/usb/input/Kconfig b/drivers/usb/input/Kconfig --- a/drivers/usb/input/Kconfig 2004-11-29 21:22:08 -08:00 +++ b/drivers/usb/input/Kconfig 2004-11-29 21:22:08 -08:00 @@ -200,6 +200,9 @@ The driver has been tested on a Xenarc 700TSV monitor with eGalax touchscreen. + Have a look at http://linux.chapter7.ch/touchkit/ for + a usage description and the required user-space stuff. + To compile this driver as a module, choose M here: the module will be called touchkitusb. diff -Nru a/drivers/usb/net/pegasus.c b/drivers/usb/net/pegasus.c --- a/drivers/usb/net/pegasus.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/usb/net/pegasus.c 2004-11-29 21:22:08 -08:00 @@ -322,7 +322,7 @@ *(data + 1) = cpu_to_le16p(®d); set_register(pegasus, PhyCtrl, 0); - set_registers(pegasus, PhyAddr, 4, data); + set_registers(pegasus, PhyAddr, sizeof(data), data); set_register(pegasus, PhyCtrl, (indx | PHY_WRITE)); for (i = 0; i < REG_TIMEOUT; i++) { get_registers(pegasus, PhyCtrl, 1, data); @@ -388,8 +388,8 @@ static int write_eprom_word(pegasus_t * pegasus, __u8 index, __u16 data) { - int i, tmp; - __u8 d[4] = { 0x3f, 0, 0, EPROM_WRITE }; + int i; + __u8 tmp, d[4] = { 0x3f, 0, 0, EPROM_WRITE }; set_registers(pegasus, EpromOffset, 4, d); enable_eprom_write(pegasus); @@ -1114,7 +1114,7 @@ static inline void setup_pegasus_II(pegasus_t * pegasus) { - u16 data = 0xa5; + __u8 data = 0xa5; set_register(pegasus, Reg1d, 0); set_register(pegasus, Reg7b, 1); diff -Nru a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c --- a/drivers/usb/serial/ftdi_sio.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/usb/serial/ftdi_sio.c 2004-11-29 21:22:08 -08:00 @@ -536,6 +536,7 @@ { USB_DEVICE_VER(FTDI_VID, FTDI_MTXORB_5_PID, 0x400, 0xffff) }, { USB_DEVICE_VER(FTDI_VID, FTDI_MTXORB_6_PID, 0x400, 0xffff) }, { USB_DEVICE_VER(FTDI_VID, FTDI_PERLE_ULTRAPORT_PID, 0x400, 0xffff) }, + { USB_DEVICE(FTDI_VID, FTDI_PIEGROUP_PID) }, { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2101_PID) }, { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2102_PID) }, { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2103_PID) }, diff -Nru a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c --- a/drivers/usb/serial/ipaq.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/usb/serial/ipaq.c 2004-11-29 21:22:08 -08:00 @@ -91,47 +91,448 @@ static struct usb_device_id ipaq_id_table [] = { /* The first entry is a placeholder for the insmod-specified device */ - { USB_DEVICE(COMPAQ_VENDOR_ID, COMPAQ_IPAQ_ID) }, - { USB_DEVICE(ASKEY_VENDOR_ID, ASKEY_PRODUCT_ID) }, - { USB_DEVICE(BCOM_VENDOR_ID, BCOM_0065_ID) }, - { USB_DEVICE(BCOM_VENDOR_ID, BCOM_0066_ID) }, - { USB_DEVICE(BCOM_VENDOR_ID, BCOM_0067_ID) }, - { USB_DEVICE(CASIO_VENDOR_ID, CASIO_2001_ID) }, - { USB_DEVICE(CASIO_VENDOR_ID, CASIO_EM500_ID) }, - { USB_DEVICE(COMPAQ_VENDOR_ID, COMPAQ_IPAQ_ID) }, - { USB_DEVICE(COMPAQ_VENDOR_ID, COMPAQ_0032_ID) }, - { USB_DEVICE(DELL_VENDOR_ID, DELL_AXIM_ID) }, - { USB_DEVICE(FSC_VENDOR_ID, FSC_LOOX_ID) }, - { USB_DEVICE(HP_VENDOR_ID, HP_JORNADA_548_ID) }, - { USB_DEVICE(HP_VENDOR_ID, HP_JORNADA_568_ID) }, - { USB_DEVICE(HP_VENDOR_ID, HP_2016_ID) }, - { USB_DEVICE(HP_VENDOR_ID, HP_2116_ID) }, - { USB_DEVICE(HP_VENDOR_ID, HP_2216_ID) }, - { USB_DEVICE(HP_VENDOR_ID, HP_3016_ID) }, - { USB_DEVICE(HP_VENDOR_ID, HP_3116_ID) }, - { USB_DEVICE(HP_VENDOR_ID, HP_3216_ID) }, - { USB_DEVICE(HP_VENDOR_ID, HP_4016_ID) }, - { USB_DEVICE(HP_VENDOR_ID, HP_4116_ID) }, - { USB_DEVICE(HP_VENDOR_ID, HP_4216_ID) }, - { USB_DEVICE(HP_VENDOR_ID, HP_5016_ID) }, - { USB_DEVICE(HP_VENDOR_ID, HP_5116_ID) }, - { USB_DEVICE(HP_VENDOR_ID, HP_5216_ID) }, - { USB_DEVICE(LINKUP_VENDOR_ID, LINKUP_PRODUCT_ID) }, - { USB_DEVICE(MICROSOFT_VENDOR_ID, MICROSOFT_00CE_ID) }, - { USB_DEVICE(PORTATEC_VENDOR_ID, PORTATEC_PRODUCT_ID) }, - { USB_DEVICE(ROVER_VENDOR_ID, ROVER_P5_ID) }, - { USB_DEVICE(SAGEM_VENDOR_ID, SAGEM_WIRELESS_ID) }, - { USB_DEVICE(SOCKET_VENDOR_ID, SOCKET_PRODUCT_ID) }, - { USB_DEVICE(TOSHIBA_VENDOR_ID, TOSHIBA_PRODUCT_ID) }, - { USB_DEVICE(TOSHIBA_VENDOR_ID, TOSHIBA_E310_ID) }, - { USB_DEVICE(TOSHIBA_VENDOR_ID, TOSHIBA_E740_ID) }, - { USB_DEVICE(TOSHIBA_VENDOR_ID, TOSHIBA_E335_ID) }, - { USB_DEVICE(HTC_VENDOR_ID, HTC_PRODUCT_ID) }, - { USB_DEVICE(HTC_VENDOR_ID, HTC_HIMALAYA_ID) }, - { USB_DEVICE(NEC_VENDOR_ID, NEC_PRODUCT_ID) }, - { USB_DEVICE(ASUS_VENDOR_ID, ASUS_A600_PRODUCT_ID) }, - { USB_DEVICE(ASUS_VENDOR_ID, ASUS_A620_PRODUCT_ID) }, - { } /* Terminating entry */ + { USB_DEVICE(0x049F, 0x0003) }, + { USB_DEVICE(0x1690, 0x0601) }, /* Askey USB Sync */ + { USB_DEVICE(0x0960, 0x0065) }, /* BCOM USB Sync 0065 */ + { USB_DEVICE(0x0960, 0x0066) }, /* BCOM USB Sync 0066 */ + { USB_DEVICE(0x0960, 0x0067) }, /* BCOM USB Sync 0067 */ + { USB_DEVICE(0x07CF, 0x2001) }, /* CASIO USB Sync 2001 */ + { USB_DEVICE(0x07CF, 0x2002) }, /* CASIO USB Sync 2002 */ + { USB_DEVICE(0x07CF, 0x2003) }, /* CASIO USB Sync 2003 */ + { USB_DEVICE(0x049F, 0x0003) }, /* Compaq iPAQ USB Sync */ + { USB_DEVICE(0x049F, 0x0032) }, /* Compaq iPAQ USB Sync */ + { USB_DEVICE(0x413C, 0x4001) }, /* Dell Axim USB Sync */ + { USB_DEVICE(0x413C, 0x4002) }, /* Dell Axim USB Sync */ + { USB_DEVICE(0x413C, 0x4003) }, /* Dell Axim USB Sync */ + { USB_DEVICE(0x413C, 0x4004) }, /* Dell Axim USB Sync */ + { USB_DEVICE(0x413C, 0x4005) }, /* Dell Axim USB Sync */ + { USB_DEVICE(0x413C, 0x4006) }, /* Dell Axim USB Sync */ + { USB_DEVICE(0x413C, 0x4007) }, /* Dell Axim USB Sync */ + { USB_DEVICE(0x413C, 0x4008) }, /* Dell Axim USB Sync */ + { USB_DEVICE(0x413C, 0x4009) }, /* Dell Axim USB Sync */ + { USB_DEVICE(0x03F0, 0x1016) }, /* HP USB Sync */ + { USB_DEVICE(0x03F0, 0x1116) }, /* HP USB Sync 1611 */ + { USB_DEVICE(0x03F0, 0x1216) }, /* HP USB Sync 1612 */ + { USB_DEVICE(0x03F0, 0x2016) }, /* HP USB Sync 1620 */ + { USB_DEVICE(0x03F0, 0x2116) }, /* HP USB Sync 1621 */ + { USB_DEVICE(0x03F0, 0x2216) }, /* HP USB Sync 1622 */ + { USB_DEVICE(0x03F0, 0x3016) }, /* HP USB Sync 1630 */ + { USB_DEVICE(0x03F0, 0x3116) }, /* HP USB Sync 1631 */ + { USB_DEVICE(0x03F0, 0x3216) }, /* HP USB Sync 1632 */ + { USB_DEVICE(0x03F0, 0x4016) }, /* HP USB Sync 1640 */ + { USB_DEVICE(0x03F0, 0x4116) }, /* HP USB Sync 1641 */ + { USB_DEVICE(0x03F0, 0x4216) }, /* HP USB Sync 1642 */ + { USB_DEVICE(0x03F0, 0x5016) }, /* HP USB Sync 1650 */ + { USB_DEVICE(0x03F0, 0x5116) }, /* HP USB Sync 1651 */ + { USB_DEVICE(0x03F0, 0x5216) }, /* HP USB Sync 1652 */ + { USB_DEVICE(0x094B, 0x0001) }, /* Linkup Systems USB Sync */ + { USB_DEVICE(0x045E, 0x0400) }, /* Windows Powered Pocket PC 2002 */ + { USB_DEVICE(0x045E, 0x0401) }, /* Windows Powered Pocket PC 2002 */ + { USB_DEVICE(0x045E, 0x0402) }, /* Windows Powered Pocket PC 2002 */ + { USB_DEVICE(0x045E, 0x0403) }, /* Windows Powered Pocket PC 2002 */ + { USB_DEVICE(0x045E, 0x0404) }, /* Windows Powered Pocket PC 2002 */ + { USB_DEVICE(0x045E, 0x0405) }, /* Windows Powered Pocket PC 2002 */ + { USB_DEVICE(0x045E, 0x0406) }, /* Windows Powered Pocket PC 2002 */ + { USB_DEVICE(0x045E, 0x0407) }, /* Windows Powered Pocket PC 2002 */ + { USB_DEVICE(0x045E, 0x0408) }, /* Windows Powered Pocket PC 2002 */ + { USB_DEVICE(0x045E, 0x0409) }, /* Windows Powered Pocket PC 2002 */ + { USB_DEVICE(0x045E, 0x040A) }, /* Windows Powered Pocket PC 2002 */ + { USB_DEVICE(0x045E, 0x040B) }, /* Windows Powered Pocket PC 2002 */ + { USB_DEVICE(0x045E, 0x040C) }, /* Windows Powered Pocket PC 2002 */ + { USB_DEVICE(0x045E, 0x040D) }, /* Windows Powered Pocket PC 2002 */ + { USB_DEVICE(0x045E, 0x040E) }, /* Windows Powered Pocket PC 2002 */ + { USB_DEVICE(0x045E, 0x040F) }, /* Windows Powered Pocket PC 2002 */ + { USB_DEVICE(0x045E, 0x0410) }, /* Windows Powered Pocket PC 2002 */ + { USB_DEVICE(0x045E, 0x0411) }, /* Windows Powered Pocket PC 2002 */ + { USB_DEVICE(0x045E, 0x0412) }, /* Windows Powered Pocket PC 2002 */ + { USB_DEVICE(0x045E, 0x0413) }, /* Windows Powered Pocket PC 2002 */ + { USB_DEVICE(0x045E, 0x0414) }, /* Windows Powered Pocket PC 2002 */ + { USB_DEVICE(0x045E, 0x0415) }, /* Windows Powered Pocket PC 2002 */ + { USB_DEVICE(0x045E, 0x0416) }, /* Windows Powered Pocket PC 2002 */ + { USB_DEVICE(0x045E, 0x0417) }, /* Windows Powered Pocket PC 2002 */ + { USB_DEVICE(0x045E, 0x0432) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0433) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0434) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0435) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0436) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0437) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0438) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0439) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x043A) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x043B) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x043C) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x043D) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x043E) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x043F) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0440) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0441) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0442) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0443) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0444) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0445) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0446) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0447) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0448) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0449) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x044A) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x044B) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x044C) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x044D) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x044E) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x044F) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0450) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0451) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0452) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0453) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0454) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0455) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0456) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0457) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0458) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0459) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x045A) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x045B) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x045C) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x045D) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x045E) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x045F) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0460) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0461) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0462) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0463) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0464) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0465) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0466) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0467) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0468) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0469) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x046A) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x046B) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x046C) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x046D) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x046E) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x046F) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0470) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0471) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0472) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0473) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0474) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0475) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0476) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0477) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0478) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x0479) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x047A) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x047B) }, /* Windows Powered Pocket PC 2003 */ + { USB_DEVICE(0x045E, 0x04C8) }, /* Windows Powered Smartphone 2002 */ + { USB_DEVICE(0x045E, 0x04C9) }, /* Windows Powered Smartphone 2002 */ + { USB_DEVICE(0x045E, 0x04CA) }, /* Windows Powered Smartphone 2002 */ + { USB_DEVICE(0x045E, 0x04CB) }, /* Windows Powered Smartphone 2002 */ + { USB_DEVICE(0x045E, 0x04CC) }, /* Windows Powered Smartphone 2002 */ + { USB_DEVICE(0x045E, 0x04CD) }, /* Windows Powered Smartphone 2002 */ + { USB_DEVICE(0x045E, 0x04CE) }, /* Windows Powered Smartphone 2002 */ + { USB_DEVICE(0x045E, 0x04D7) }, /* Windows Powered Smartphone 2003 */ + { USB_DEVICE(0x045E, 0x04D8) }, /* Windows Powered Smartphone 2003 */ + { USB_DEVICE(0x045E, 0x04D9) }, /* Windows Powered Smartphone 2003 */ + { USB_DEVICE(0x045E, 0x04DA) }, /* Windows Powered Smartphone 2003 */ + { USB_DEVICE(0x045E, 0x04DB) }, /* Windows Powered Smartphone 2003 */ + { USB_DEVICE(0x045E, 0x04DC) }, /* Windows Powered Smartphone 2003 */ + { USB_DEVICE(0x045E, 0x04DD) }, /* Windows Powered Smartphone 2003 */ + { USB_DEVICE(0x045E, 0x04DE) }, /* Windows Powered Smartphone 2003 */ + { USB_DEVICE(0x045E, 0x04DF) }, /* Windows Powered Smartphone 2003 */ + { USB_DEVICE(0x045E, 0x04E0) }, /* Windows Powered Smartphone 2003 */ + { USB_DEVICE(0x045E, 0x04E1) }, /* Windows Powered Smartphone 2003 */ + { USB_DEVICE(0x045E, 0x04E2) }, /* Windows Powered Smartphone 2003 */ + { USB_DEVICE(0x045E, 0x04E3) }, /* Windows Powered Smartphone 2003 */ + { USB_DEVICE(0x045E, 0x04E4) }, /* Windows Powered Smartphone 2003 */ + { USB_DEVICE(0x045E, 0x04E5) }, /* Windows Powered Smartphone 2003 */ + { USB_DEVICE(0x045E, 0x04E6) }, /* Windows Powered Smartphone 2003 */ + { USB_DEVICE(0x045E, 0x04E7) }, /* Windows Powered Smartphone 2003 */ + { USB_DEVICE(0x045E, 0x04E8) }, /* Windows Powered Smartphone 2003 */ + { USB_DEVICE(0x045E, 0x04E9) }, /* Windows Powered Smartphone 2003 */ + { USB_DEVICE(0x045E, 0x04EA) }, /* Windows Powered Smartphone 2003 */ + { USB_DEVICE(0x0961, 0x0010) }, /* Portatec USB Sync */ + { USB_DEVICE(0x5E04, 0xCE00) }, /* SAGEM Wireless Assistant */ + { USB_DEVICE(0x0104, 0x00BE) }, /* Socket USB Sync */ + { USB_DEVICE(0x0930, 0x0700) }, /* TOSHIBA USB Sync 0700 */ + { USB_DEVICE(0x0930, 0x0705) }, /* TOSHIBA Pocket PC e310 */ + { USB_DEVICE(0x0930, 0x0707) }, /* TOSHIBA Pocket PC e330 Series */ + { USB_DEVICE(0x0930, 0x0708) }, /* TOSHIBA Pocket PC e350 Series */ + { USB_DEVICE(0x0930, 0x0706) }, /* TOSHIBA Pocket PC e740 */ + { USB_DEVICE(0x0930, 0x0709) }, /* TOSHIBA Pocket PC e750 Series */ + { USB_DEVICE(0x0930, 0x070A) }, /* TOSHIBA Pocket PC e400 Series */ + { USB_DEVICE(0x0930, 0x070B) }, /* TOSHIBA Pocket PC e800 Series */ + { USB_DEVICE(0x0BB4, 0x00CE) }, /* HTC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A01) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A02) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A03) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A04) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A05) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A06) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A07) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A08) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A09) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A0A) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A0B) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A0C) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A0D) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A0E) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A0F) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A10) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A11) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A12) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A13) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A14) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A15) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A16) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A17) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A18) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A19) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A1A) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A1B) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A1C) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A1D) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A1E) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A1F) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A20) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A21) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A22) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A23) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A24) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A25) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A26) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A27) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A28) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A29) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A2A) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A2B) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A2C) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A2D) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A2E) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A2F) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A30) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A31) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A32) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A33) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A34) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A35) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A36) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A37) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A38) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A39) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A3A) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A3B) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A3C) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A3D) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A3E) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A3F) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A40) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A41) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A42) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A43) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A44) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A45) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A46) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A47) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A48) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A49) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A4A) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A4B) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A4C) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A4D) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A4E) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A4F) }, /* PocketPC USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A50) }, /* HTC SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A51) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A52) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A53) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A54) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A55) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A56) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A57) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A58) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A59) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A5A) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A5B) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A5C) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A5D) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A5E) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A5F) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A60) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A61) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A62) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A63) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A64) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A65) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A66) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A67) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A68) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A69) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A6A) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A6B) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A6C) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A6D) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A6E) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A6F) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A70) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A71) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A72) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A73) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A74) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A75) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A76) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A77) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A78) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A79) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A7A) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A7B) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A7C) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A7D) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A7E) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A7F) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A80) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A81) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A82) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A83) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A84) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A85) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A86) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A87) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A88) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A89) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A8A) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A8B) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A8C) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A8D) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A8E) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A8F) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A90) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A91) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A92) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A93) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A94) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A95) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A96) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A97) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A98) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A99) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A9A) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A9B) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A9C) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A9D) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A9E) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0BB4, 0x0A9F) }, /* SmartPhone USB Sync */ + { USB_DEVICE(0x0409, 0x00D5) }, /* NEC USB Sync */ + { USB_DEVICE(0x0409, 0x00D6) }, /* NEC USB Sync */ + { USB_DEVICE(0x0409, 0x00D7) }, /* NEC USB Sync */ + { USB_DEVICE(0x0409, 0x8024) }, /* NEC USB Sync */ + { USB_DEVICE(0x0409, 0x8025) }, /* NEC USB Sync */ + { USB_DEVICE(0x04A4, 0x0014) }, /* Hitachi USB Sync */ + { USB_DEVICE(0x0BF8, 0x1001) }, /* Fujitsu Siemens Computers USB Sync */ + { USB_DEVICE(0x0F98, 0x0201) }, /* Cyberbank USB Sync */ + { USB_DEVICE(0x0502, 0x16E1) }, /* Acer n10 Handheld USB Sync */ + { USB_DEVICE(0x0502, 0x16E3) }, /* Acer n30 Handheld USB Sync */ + { USB_DEVICE(0x0502, 0x16E2) }, /* Acer n20 Handheld USB Sync */ + { USB_DEVICE(0x0502, 0x1631) }, /* c10 Series */ + { USB_DEVICE(0x0502, 0x1632) }, /* c20 Series */ + { USB_DEVICE(0x0B05, 0x9202) }, /* ASUS USB Sync */ + { USB_DEVICE(0x0B05, 0x420F) }, /* ASUS USB Sync */ + { USB_DEVICE(0x0B05, 0x4200) }, /* ASUS USB Sync */ + { USB_DEVICE(0x0B05, 0x4201) }, /* ASUS USB Sync */ + { USB_DEVICE(0x0B05, 0x4202) }, /* ASUS USB Sync */ + { USB_DEVICE(0x0B05, 0x9200) }, /* ASUS USB Sync */ + { USB_DEVICE(0x0C8E, 0x6000) }, /* Cesscom Luxian Series */ + { USB_DEVICE(0x04AD, 0x0301) }, /* USB Sync 0301 */ + { USB_DEVICE(0x04AD, 0x0302) }, /* USB Sync 0302 */ + { USB_DEVICE(0x04AD, 0x0303) }, /* USB Sync 0303 */ + { USB_DEVICE(0x1066, 0x0300) }, /* E-TEN P3XX Pocket PC */ + { USB_DEVICE(0x1066, 0x0500) }, /* E-TEN P5XX Pocket PC */ + { USB_DEVICE(0x1066, 0x0600) }, /* E-TEN P6XX Pocket PC */ + { USB_DEVICE(0x1066, 0x0700) }, /* E-TEN P7XX Pocket PC */ + { USB_DEVICE(0x1066, 0x00CE) }, /* E-TEN USB Sync */ + { USB_DEVICE(0x0F4E, 0x0200) }, /* Freedom Scientific USB Sync */ + { USB_DEVICE(0x04C5, 0x1058) }, /* FUJITSU USB Sync */ + { USB_DEVICE(0x04C5, 0x1079) }, /* FUJITSU USB Sync */ + { USB_DEVICE(0x067E, 0x1001) }, /* Intermec Mobile Computer */ + { USB_DEVICE(0x04f1, 0x3011) }, /* JVC USB Sync */ + { USB_DEVICE(0x04F1, 0x3012) }, /* JVC USB Sync */ + { USB_DEVICE(0x3708, 0x20CE) }, /* Legend USB Sync */ + { USB_DEVICE(0x3708, 0x21CE) }, /* Lenovo USB Sync */ + { USB_DEVICE(0x043E, 0x9C01) }, /* LGE USB Sync */ + { USB_DEVICE(0x04DA, 0x2500) }, /* Panasonic USB Sync */ + { USB_DEVICE(0x3340, 0x0B1C) }, /* Generic PPC StrongARM */ + { USB_DEVICE(0x3340, 0x0E3A) }, /* Generic PPC USB Sync */ + { USB_DEVICE(0x3340, 0x0F3A) }, /* Generic SmartPhone USB Sync */ + { USB_DEVICE(0x3340, 0x0F1C) }, /* Itautec USB Sync */ + { USB_DEVICE(0x3340, 0x1326) }, /* Itautec USB Sync */ + { USB_DEVICE(0x3340, 0x3326) }, /* MEDION Winodws Moble USB Sync */ + { USB_DEVICE(0x3340, 0x0326) }, /* Mio DigiWalker 338 */ + { USB_DEVICE(0x3340, 0x0426) }, /* Mio DigiWalker 338 */ + { USB_DEVICE(0x3340, 0x011C) }, /* Mio DigiWalker PPC StrongARM */ + { USB_DEVICE(0x3340, 0x053A) }, /* Mio DigiWalker SmartPhone USB Sync */ + { USB_DEVICE(0x3340, 0x043A) }, /* Mio DigiWalker USB Sync */ + { USB_DEVICE(0x3340, 0x071C) }, /* MiTAC USB Sync */ + { USB_DEVICE(0x3340, 0x051C) }, /* MiTAC USB Sync 528 */ + { USB_DEVICE(0x3340, 0x2326) }, /* Vobis USB Sync */ + { USB_DEVICE(0x3340, 0x191C) }, /* YAKUMO USB Sync */ + { USB_DEVICE(0x4113, 0x0210) }, /* Mobile Media Technology USB Sync */ + { USB_DEVICE(0x4113, 0x0211) }, /* Mobile Media Technology USB Sync */ + { USB_DEVICE(0x4113, 0x0400) }, /* Mobile Media Technology USB Sync */ + { USB_DEVICE(0x4113, 0x0410) }, /* Mobile Media Technology USB Sync */ + { USB_DEVICE(0x0CAD, 0x9001) }, /* Motorola PowerPad Pocket PC Device */ + { USB_DEVICE(0x0C44, 0x03A2) }, /* Motorola iDEN Smartphone */ + { USB_DEVICE(0x04E8, 0x6611) }, /* Samsung MITs USB Sync */ + { USB_DEVICE(0x04E8, 0x6613) }, /* Samsung MITs USB Sync */ + { USB_DEVICE(0x04E8, 0x6615) }, /* Samsung MITs USB Sync */ + { USB_DEVICE(0x04E8, 0x6617) }, /* Samsung MITs USB Sync */ + { USB_DEVICE(0x04E8, 0x6619) }, /* Samsung MITs USB Sync */ + { USB_DEVICE(0x04E8, 0x661B) }, /* Samsung MITs USB Sync */ + { USB_DEVICE(0x04E8, 0x5F00) }, /* Samsung NEXiO USB Sync */ + { USB_DEVICE(0x04E8, 0x5F01) }, /* Samsung NEXiO USB Sync */ + { USB_DEVICE(0x04E8, 0x5F02) }, /* Samsung NEXiO USB Sync */ + { USB_DEVICE(0x04E8, 0x5F03) }, /* Samsung NEXiO USB Sync */ + { USB_DEVICE(0x04E8, 0x5F04) }, /* Samsung NEXiO USB Sync */ + { USB_DEVICE(0x04E8, 0x662E) }, /* Samsung MITs USB Sync */ + { USB_DEVICE(0x04E8, 0x6630) }, /* Samsung MITs USB Sync */ + { USB_DEVICE(0x04E8, 0x6632) }, /* Samsung MITs USB Sync */ + { USB_DEVICE(0x4505, 0x0010) }, /* Smartphone */ + { USB_DEVICE(0x05E0, 0x2000) }, /* Symbol USB Sync */ + { USB_DEVICE(0x05E0, 0x2001) }, /* Symbol USB Sync 0x2001 */ + { USB_DEVICE(0x05E0, 0x2002) }, /* Symbol USB Sync 0x2002 */ + { USB_DEVICE(0x05E0, 0x2003) }, /* Symbol USB Sync 0x2003 */ + { USB_DEVICE(0x05E0, 0x2004) }, /* Symbol USB Sync 0x2004 */ + { USB_DEVICE(0x05E0, 0x2005) }, /* Symbol USB Sync 0x2005 */ + { USB_DEVICE(0x05E0, 0x2006) }, /* Symbol USB Sync 0x2006 */ + { USB_DEVICE(0x05E0, 0x2007) }, /* Symbol USB Sync 0x2007 */ + { USB_DEVICE(0x05E0, 0x2008) }, /* Symbol USB Sync 0x2008 */ + { USB_DEVICE(0x05E0, 0x2009) }, /* Symbol USB Sync 0x2009 */ + { USB_DEVICE(0x05E0, 0x200A) }, /* Symbol USB Sync 0x200A */ + { USB_DEVICE(0x1182, 0x1388) }, /* VES USB Sync */ + { USB_DEVICE(0x0543, 0x0ED9) }, /* ViewSonic Color Pocket PC V35 */ + { USB_DEVICE(0x0543, 0x1527) }, /* ViewSonic Color Pocket PC V36 */ + { USB_DEVICE(0x0543, 0x1529) }, /* ViewSonic Color Pocket PC V37 */ + { USB_DEVICE(0x0543, 0x152B) }, /* ViewSonic Color Pocket PC V38 */ + { USB_DEVICE(0x0543, 0x152E) }, /* ViewSonic Pocket PC */ + { USB_DEVICE(0x0543, 0x1921) }, /* ViewSonic Communicator Pocket PC */ + { USB_DEVICE(0x0543, 0x1922) }, /* ViewSonic Smartphone */ + { USB_DEVICE(0x0543, 0x1923) }, /* ViewSonic Pocket PC V30 */ + { USB_DEVICE(0x0536, 0x01A0) }, /* HHP PDT */ + { USB_DEVICE(0x099E, 0x0052) }, /* Trimble GeoExplorer */ + { USB_DEVICE(0x099E, 0x4000) }, /* TDS Data Collector */ + { USB_DEVICE(0x0FB8, 0x3001) }, /* Wistron USB Sync */ + { USB_DEVICE(0x0FB8, 0x3002) }, /* Wistron USB Sync */ + { USB_DEVICE(0x0FB8, 0x3003) }, /* Wistron USB Sync */ + { USB_DEVICE(0x0FB8, 0x4001) }, /* Wistron USB Sync */ + { USB_DEVICE(0x11D9, 0x1003) }, /* Rugged Pocket PC 2003 */ + { USB_DEVICE(0x11D9, 0x1002) }, /* Rugged Pocket PC 2003 */ + { USB_DEVICE(0x22B8, 0x4204) }, /* Motorola MPx200 Smartphone */ + { USB_DEVICE(0x22B8, 0x4214) }, /* Motorola MPc GSM */ + { USB_DEVICE(0x22B8, 0x4224) }, /* Motorola MPx220 Smartphone */ + { USB_DEVICE(0x22B8, 0x4234) }, /* Motorola MPc CDMA */ + { USB_DEVICE(0x22B8, 0x4244) }, /* Motorola MPx100 Smartphone */ + { USB_DEVICE(0x1231, 0xCE01) }, /* USB Sync 03 */ + { USB_DEVICE(0x1231, 0xCE02) }, /* USB Sync 03 */ + { } /* Terminating entry */ }; MODULE_DEVICE_TABLE (usb, ipaq_id_table); diff -Nru a/drivers/usb/serial/ipaq.h b/drivers/usb/serial/ipaq.h --- a/drivers/usb/serial/ipaq.h 2004-11-29 21:22:06 -08:00 +++ b/drivers/usb/serial/ipaq.h 2004-11-29 21:22:06 -08:00 @@ -14,81 +14,6 @@ #ifndef __LINUX_USB_SERIAL_IPAQ_H #define __LINUX_USB_SERIAL_IPAQ_H -#define ASKEY_VENDOR_ID 0x1690 -#define ASKEY_PRODUCT_ID 0x0601 - -#define BCOM_VENDOR_ID 0x0960 -#define BCOM_0065_ID 0x0065 -#define BCOM_0066_ID 0x0066 -#define BCOM_0067_ID 0x0067 - -#define CASIO_VENDOR_ID 0x07cf -#define CASIO_2001_ID 0x2001 -#define CASIO_EM500_ID 0x2002 - -#define COMPAQ_VENDOR_ID 0x049f -#define COMPAQ_IPAQ_ID 0x0003 -#define COMPAQ_0032_ID 0x0032 - -#define DELL_VENDOR_ID 0x413c -#define DELL_AXIM_ID 0x4001 - -#define FSC_VENDOR_ID 0x0bf8 -#define FSC_LOOX_ID 0x1001 - -#define HP_VENDOR_ID 0x03f0 -#define HP_JORNADA_548_ID 0x1016 -#define HP_JORNADA_568_ID 0x1116 -#define HP_2016_ID 0x2016 -#define HP_2116_ID 0x2116 -#define HP_2216_ID 0x2216 -#define HP_3016_ID 0x3016 -#define HP_3116_ID 0x3116 -#define HP_3216_ID 0x3216 -#define HP_4016_ID 0x4016 -#define HP_4116_ID 0x4116 -#define HP_4216_ID 0x4216 -#define HP_5016_ID 0x5016 -#define HP_5116_ID 0x5116 -#define HP_5216_ID 0x5216 - -#define LINKUP_VENDOR_ID 0x094b -#define LINKUP_PRODUCT_ID 0x0001 - -#define MICROSOFT_VENDOR_ID 0x045e -#define MICROSOFT_00CE_ID 0x00ce - -#define PORTATEC_VENDOR_ID 0x0961 -#define PORTATEC_PRODUCT_ID 0x0010 - -#define ROVER_VENDOR_ID 0x047b -#define ROVER_P5_ID 0x3000 - -#define SAGEM_VENDOR_ID 0x5e04 -#define SAGEM_WIRELESS_ID 0xce00 - -#define SOCKET_VENDOR_ID 0x0104 -#define SOCKET_PRODUCT_ID 0x00be - -#define TOSHIBA_VENDOR_ID 0x0930 -#define TOSHIBA_PRODUCT_ID 0x0700 -#define TOSHIBA_E310_ID 0x0705 -#define TOSHIBA_E740_ID 0x0706 -#define TOSHIBA_E335_ID 0x0707 - -#define HTC_VENDOR_ID 0x0bb4 -#define HTC_PRODUCT_ID 0x00ce -#define HTC_HIMALAYA_ID 0x0a02 - -#define NEC_VENDOR_ID 0x0409 -#define NEC_PRODUCT_ID 0x00d5 - -#define ASUS_VENDOR_ID 0x0b05 -#define ASUS_A600_PRODUCT_ID 0x4201 - -#define ASUS_VENDOR_ID 0x0b05 -#define ASUS_A620_PRODUCT_ID 0x4202 - /* * Since we can't queue our bulk write urbs (don't know why - it just * doesn't work), we can send down only one write urb at a time. The simplistic diff -Nru a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c --- a/drivers/usb/serial/pl2303.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/usb/serial/pl2303.c 2004-11-29 21:22:07 -08:00 @@ -77,11 +77,13 @@ static struct usb_device_id id_table [] = { { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ2) }, + { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ3) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_PHAROS) }, { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) }, { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) }, { USB_DEVICE(ATEN_VENDOR_ID2, ATEN_PRODUCT_ID) }, { USB_DEVICE(ELCOM_VENDOR_ID, ELCOM_PRODUCT_ID) }, + { USB_DEVICE(ELCOM_VENDOR_ID, ELCOM_PRODUCT_ID_UCSGT) }, { USB_DEVICE(ITEGNO_VENDOR_ID, ITEGNO_PRODUCT_ID) }, { USB_DEVICE(MA620_VENDOR_ID, MA620_PRODUCT_ID) }, { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID) }, diff -Nru a/drivers/usb/serial/pl2303.h b/drivers/usb/serial/pl2303.h --- a/drivers/usb/serial/pl2303.h 2004-11-29 21:22:07 -08:00 +++ b/drivers/usb/serial/pl2303.h 2004-11-29 21:22:07 -08:00 @@ -11,6 +11,7 @@ #define PL2303_PRODUCT_ID 0x2303 #define PL2303_PRODUCT_ID_RSAQ2 0x04bb #define PL2303_PRODUCT_ID_PHAROS 0xaaa0 +#define PL2303_PRODUCT_ID_RSAQ3 0xaaa2 #define ATEN_VENDOR_ID 0x0557 #define ATEN_VENDOR_ID2 0x0547 @@ -21,6 +22,7 @@ #define ELCOM_VENDOR_ID 0x056e #define ELCOM_PRODUCT_ID 0x5003 +#define ELCOM_PRODUCT_ID_UCSGT 0x5004 #define ITEGNO_VENDOR_ID 0x0eba #define ITEGNO_PRODUCT_ID 0x1080 diff -Nru a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c --- a/drivers/usb/serial/visor.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/usb/serial/visor.c 2004-11-29 21:22:07 -08:00 @@ -930,7 +930,7 @@ if (!((serial->dev->descriptor.idVendor == HANDSPRING_VENDOR_ID) || (serial->dev->descriptor.idVendor == KYOCERA_VENDOR_ID)) || (serial->num_interrupt_in == 0)) - return 0; + goto generic_startup; dbg("%s", __FUNCTION__); @@ -957,6 +957,7 @@ COPY_PORT(serial->port[1], swap_port); kfree(swap_port); +generic_startup: return generic_startup(serial); } diff -Nru a/drivers/usb/storage/isd200.c b/drivers/usb/storage/isd200.c --- a/drivers/usb/storage/isd200.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/usb/storage/isd200.c 2004-11-29 21:22:07 -08:00 @@ -555,7 +555,7 @@ /* if the command gets aborted by the higher layers, we need to * short-circuit all other processing */ - if (us->sm_state == US_STATE_ABORTING) { + if (test_bit(US_FLIDX_TIMED_OUT, &us->flags)) { US_DEBUGP("-- command was aborted\n"); goto Handle_Abort; } @@ -602,7 +602,7 @@ if (need_auto_sense) { result = isd200_read_regs(us); - if (us->sm_state == US_STATE_ABORTING) { + if (test_bit(US_FLIDX_TIMED_OUT, &us->flags)) { US_DEBUGP("-- auto-sense aborted\n"); goto Handle_Abort; } diff -Nru a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c --- a/drivers/usb/storage/scsiglue.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/usb/storage/scsiglue.c 2004-11-29 21:22:07 -08:00 @@ -73,14 +73,11 @@ static int slave_alloc (struct scsi_device *sdev) { /* - * Set default bflags. These can be overridden for individual - * models and vendors via the scsi devinfo mechanism. The only - * flag we need is to force 36-byte INQUIRYs; we don't use any - * of the extra data and many devices choke if asked for more or + * Set the INQUIRY transfer length to 36. We don't use any of + * the extra data and many devices choke if asked for more or * less than 36 bytes. */ - sdev->sdev_bflags = BLIST_INQUIRY_36; - + sdev->inquiry_len = 36; return 0; } @@ -176,10 +173,9 @@ srb->host_scribble = (unsigned char *)us; /* check for state-transition errors */ - if (us->sm_state != US_STATE_IDLE || us->srb != NULL) { - printk(KERN_ERR USB_STORAGE "Error in %s: " - "state = %d, us->srb = %p\n", - __FUNCTION__, us->sm_state, us->srb); + if (us->srb != NULL) { + printk(KERN_ERR USB_STORAGE "Error in %s: us->srb = %p\n", + __FUNCTION__, us->srb); return SCSI_MLQUEUE_HOST_BUSY; } @@ -203,7 +199,7 @@ * Error handling functions ***********************************************************************/ -/* Command abort */ +/* Command timeout and abort */ /* This is always called with scsi_lock(srb->host) held */ static int command_abort(struct scsi_cmnd *srb ) { @@ -218,22 +214,12 @@ return FAILED; } - /* Normally the current state is RUNNING. If the control thread - * hasn't even started processing this command, the state will be - * IDLE. Anything else is a bug. */ - if (us->sm_state != US_STATE_RUNNING - && us->sm_state != US_STATE_IDLE) { - printk(KERN_ERR USB_STORAGE "Error in %s: " - "invalid state %d\n", __FUNCTION__, us->sm_state); - return FAILED; - } - - /* Set state to ABORTING and set the ABORTING bit, but only if + /* Set the TIMED_OUT bit. Also set the ABORTING bit, but only if * a device reset isn't already in progress (to avoid interfering * with the reset). To prevent races with auto-reset, we must * stop any ongoing USB transfers while still holding the host * lock. */ - us->sm_state = US_STATE_ABORTING; + set_bit(US_FLIDX_TIMED_OUT, &us->flags); if (!test_bit(US_FLIDX_RESETTING, &us->flags)) { set_bit(US_FLIDX_ABORTING, &us->flags); usb_stor_stop_transport(us); @@ -246,6 +232,7 @@ /* Reacquire the lock and allow USB transfers to resume */ scsi_lock(host); clear_bit(US_FLIDX_ABORTING, &us->flags); + clear_bit(US_FLIDX_TIMED_OUT, &us->flags); return SUCCESS; } @@ -258,14 +245,7 @@ int result; US_DEBUGP("%s called\n", __FUNCTION__); - if (us->sm_state != US_STATE_IDLE) { - printk(KERN_ERR USB_STORAGE "Error in %s: " - "invalid state %d\n", __FUNCTION__, us->sm_state); - return FAILED; - } - /* set the state and release the lock */ - us->sm_state = US_STATE_RESETTING; scsi_unlock(srb->device->host); /* lock the device pointers and do the reset */ @@ -277,9 +257,8 @@ result = us->transport_reset(us); up(&(us->dev_semaphore)); - /* lock access to the state and clear it */ + /* lock the host for the return */ scsi_lock(srb->device->host); - us->sm_state = US_STATE_IDLE; return result; } @@ -293,14 +272,7 @@ int result, rc; US_DEBUGP("%s called\n", __FUNCTION__); - if (us->sm_state != US_STATE_IDLE) { - printk(KERN_ERR USB_STORAGE "Error in %s: " - "invalid state %d\n", __FUNCTION__, us->sm_state); - return FAILED; - } - /* set the state and release the lock */ - us->sm_state = US_STATE_RESETTING; scsi_unlock(srb->device->host); /* The USB subsystem doesn't handle synchronisation between @@ -328,9 +300,8 @@ } up(&(us->dev_semaphore)); - /* lock access to the state and clear it */ + /* lock the host for the return */ scsi_lock(srb->device->host); - us->sm_state = US_STATE_IDLE; return result < 0 ? FAILED : SUCCESS; } diff -Nru a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c --- a/drivers/usb/storage/transport.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/usb/storage/transport.c 2004-11-29 21:22:07 -08:00 @@ -537,7 +537,7 @@ /* if the command gets aborted by the higher layers, we need to * short-circuit all other processing */ - if (us->sm_state == US_STATE_ABORTING) { + if (test_bit(US_FLIDX_TIMED_OUT, &us->flags)) { US_DEBUGP("-- command was aborted\n"); goto Handle_Abort; } @@ -665,7 +665,7 @@ srb->cmd_len = old_cmd_len; memcpy(srb->cmnd, old_cmnd, MAX_COMMAND_SIZE); - if (us->sm_state == US_STATE_ABORTING) { + if (test_bit(US_FLIDX_TIMED_OUT, &us->flags)) { US_DEBUGP("-- auto-sense aborted\n"); goto Handle_Abort; } diff -Nru a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h --- a/drivers/usb/storage/unusual_devs.h 2004-11-29 21:22:08 -08:00 +++ b/drivers/usb/storage/unusual_devs.h 2004-11-29 21:22:08 -08:00 @@ -266,16 +266,16 @@ US_SC_8070, US_PR_BULK, NULL, US_FL_FIX_INQUIRY ), -/* Reported by Iacopo Spalletti */ -UNUSUAL_DEV( 0x052b, 0x1807, 0x0100, 0x0100, +/* Yakumo Mega Image 37 + * Submitted by Stephan Fuhrmann */ +UNUSUAL_DEV( 0x052b, 0x1801, 0x0100, 0x0100, "Tekom Technologies, Inc", "300_CAMERA", US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), -/* Yakumo Mega Image 37 - * Submitted by Stephan Fuhrmann */ -UNUSUAL_DEV( 0x052b, 0x1801, 0x0100, 0x0100, +/* Reported by Iacopo Spalletti */ +UNUSUAL_DEV( 0x052b, 0x1807, 0x0100, 0x0100, "Tekom Technologies, Inc", "300_CAMERA", US_SC_DEVICE, US_PR_DEVICE, NULL, @@ -284,6 +284,14 @@ /* Yakumo Mega Image 47 * Reported by Bjoern Paetzel */ UNUSUAL_DEV( 0x052b, 0x1905, 0x0100, 0x0100, + "Tekom Technologies, Inc", + "400_CAMERA", + US_SC_DEVICE, US_PR_DEVICE, NULL, + US_FL_IGNORE_RESIDUE ), + +/* Reported by Paul Ortyl + * Note that it's similar to the device above, only different prodID */ +UNUSUAL_DEV( 0x052b, 0x1911, 0x0100, 0x0100, "Tekom Technologies, Inc", "400_CAMERA", US_SC_DEVICE, US_PR_DEVICE, NULL, diff -Nru a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c --- a/drivers/usb/storage/usb.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/usb/storage/usb.c 2004-11-29 21:22:07 -08:00 @@ -50,6 +50,7 @@ #include #include #include +#include #include #include @@ -317,8 +318,8 @@ /* lock access to the state */ scsi_lock(host); - /* has the command been aborted *already* ? */ - if (us->sm_state == US_STATE_ABORTING) { + /* has the command timed out *already* ? */ + if (test_bit(US_FLIDX_TIMED_OUT, &us->flags)) { us->srb->result = DID_ABORT << 16; goto SkipForAbort; } @@ -329,8 +330,6 @@ goto SkipForDisconnect; } - /* set the state and release the lock */ - us->sm_state = US_STATE_RUNNING; scsi_unlock(host); /* reject the command if the direction indicator @@ -391,16 +390,15 @@ /* If an abort request was received we need to signal that * the abort has finished. The proper test for this is - * sm_state == US_STATE_ABORTING, not srb->result == DID_ABORT, - * because an abort request might be received after all the + * the TIMED_OUT flag, not srb->result == DID_ABORT, because + * a timeout/abort request might be received after all the * USB processing was complete. */ - if (us->sm_state == US_STATE_ABORTING) + if (test_bit(US_FLIDX_TIMED_OUT, &us->flags)) complete(&(us->notify)); - /* empty the queue, reset the state, and release the lock */ + /* finished working on this command */ SkipForDisconnect: us->srb = NULL; - us->sm_state = US_STATE_IDLE; scsi_unlock(host); /* unlock the device pointers */ @@ -800,7 +798,6 @@ us->host->hostdata[0] = (unsigned long) us; /* Start up our control thread */ - us->sm_state = US_STATE_IDLE; p = kernel_thread(usb_stor_control_thread, us, CLONE_VM); if (p < 0) { printk(KERN_WARNING USB_STORAGE @@ -828,7 +825,6 @@ /* Wait for the thread to be idle */ down(&us->dev_semaphore); US_DEBUGP("-- sending exit command to thread\n"); - BUG_ON(us->sm_state != US_STATE_IDLE); /* If the SCSI midlayer queued a final command just before * scsi_remove_host() was called, us->srb might not be @@ -897,8 +893,7 @@ * so get rid of all our resources. */ lock_kernel(); - daemonize("usb-stor"); - current->flags |= PF_NOFREEZE; + daemonize("usb-stor-scan"); unlock_kernel(); printk(KERN_DEBUG @@ -908,9 +903,14 @@ if (delay_use > 0) { printk(KERN_DEBUG "usb-storage: waiting for device " "to settle before scanning\n"); +retry: wait_event_interruptible_timeout(us->scsi_scan_wait, test_bit(US_FLIDX_DISCONNECTING, &us->flags), delay_use * HZ); + if (current->flags & PF_FREEZE) { + refrigerator(PF_FREEZE); + goto retry; + } } /* If the device is still connected, perform the scanning */ diff -Nru a/drivers/usb/storage/usb.h b/drivers/usb/storage/usb.h --- a/drivers/usb/storage/usb.h 2004-11-29 21:22:08 -08:00 +++ b/drivers/usb/storage/usb.h 2004-11-29 21:22:08 -08:00 @@ -83,14 +83,9 @@ #define ABORTING_OR_DISCONNECTING ((1UL << US_FLIDX_ABORTING) | \ (1UL << US_FLIDX_DISCONNECTING)) #define US_FLIDX_RESETTING 22 /* 0x00400000 device reset in progress */ +#define US_FLIDX_TIMED_OUT 23 /* 0x00800000 SCSI midlayer timed out */ -/* processing state machine states */ -#define US_STATE_IDLE 1 -#define US_STATE_RUNNING 2 -#define US_STATE_RESETTING 3 -#define US_STATE_ABORTING 4 - #define USB_STOR_STRING_LEN 32 /* @@ -148,7 +143,6 @@ /* thread information */ int pid; /* control thread */ - int sm_state; /* what we are doing */ /* control and bulk communications data */ struct urb *current_urb; /* USB requests */ diff -Nru a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c --- a/drivers/video/aty/atyfb_base.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/video/aty/atyfb_base.c 2004-11-29 21:22:08 -08:00 @@ -440,11 +440,11 @@ switch(par->pci_id) { #ifdef CONFIG_FB_ATY_GX case PCI_CHIP_MACH64GX: - if(type != 0x00d7); + if(type != 0x00d7) return -ENODEV; break; case PCI_CHIP_MACH64CX: - if(type != 0x0057); + if(type != 0x0057) return -ENODEV; break; #endif @@ -659,7 +659,7 @@ aty_st_le32(CRTC_GEN_CNTL, crtc->gen_cntl & ~CRTC_EN, par); DPRINTK("setting up CRTC\n"); - PRINTKI("set primary CRT to %ix%i %c%c composite %c\n", + DPRINTK("set primary CRT to %ix%i %c%c composite %c\n", ((((crtc->h_tot_disp>>16) & 0xff) + 1)<<3), (((crtc->v_tot_disp>>16) & 0x7ff) + 1), (crtc->h_sync_strt_wid & 0x200000)?'N':'P', (crtc->v_sync_strt_wid & 0x200000)?'N':'P', (crtc->gen_cntl & CRTC_CSYNC_EN)?'P':'N'); @@ -692,7 +692,7 @@ aty_st_lcd(LCD_GEN_CNTL, (crtc->lcd_gen_cntl & ~CRTC_RW_SELECT) | (SHADOW_EN | SHADOW_RW_EN), par); - PRINTKI("set secondary CRT to %ix%i %c%c\n", + DPRINTK("set secondary CRT to %ix%i %c%c\n", ((((crtc->shadow_h_tot_disp>>16) & 0xff) + 1)<<3), (((crtc->shadow_v_tot_disp>>16) & 0x7ff) + 1), (crtc->shadow_h_sync_strt_wid & 0x200000)?'N':'P', (crtc->shadow_v_sync_strt_wid & 0x200000)?'N':'P'); @@ -1844,7 +1844,7 @@ size = vma->vm_end - vma->vm_start; /* To stop the swapper from even considering these pages. */ - vma->vm_flags |= (VM_SHM | VM_LOCKED); + vma->vm_flags |= (VM_IO | VM_RESERVED); if (((vma->vm_pgoff == 0) && (size == info->fix.smem_len)) || ((off == info->fix.smem_len) && (size == PAGE_SIZE))) @@ -1890,8 +1890,6 @@ if (!map_size) return -EINVAL; - - vma->vm_flags |= VM_IO; if (!par->mmaped) par->mmaped = 1; diff -Nru a/drivers/video/aty/mach64_cursor.c b/drivers/video/aty/mach64_cursor.c --- a/drivers/video/aty/mach64_cursor.c 2004-11-29 21:22:09 -08:00 +++ b/drivers/video/aty/mach64_cursor.c 2004-11-29 21:22:09 -08:00 @@ -75,7 +75,7 @@ { struct atyfb_par *par = (struct atyfb_par *) info->par; u16 xoff, yoff; - int x, y; + int x, y, h; #ifdef __sparc__ if (par->mmaped) @@ -106,17 +106,20 @@ yoff = 0; } + h = cursor->image.height; + /* - * In doublescan mode, the cursor location also needs to be - * doubled. + * In doublescan mode, the cursor location + * and heigh also needs to be doubled. */ - if (par->crtc.gen_cntl & CRTC_DBL_SCAN_EN) + if (par->crtc.gen_cntl & CRTC_DBL_SCAN_EN) { y<<=1; + h<<=1; + } wait_for_fifo(4, par); aty_st_le32(CUR_OFFSET, (info->fix.smem_len >> 3) + (yoff << 1), par); aty_st_le32(CUR_HORZ_VERT_OFF, - ((u32) (64 - cursor->image.height + yoff) << 16) | xoff, - par); + ((u32) (64 - h + yoff) << 16) | xoff, par); aty_st_le32(CUR_HORZ_VERT_POSN, ((u32) y << 16) | x, par); } diff -Nru a/drivers/video/bw2.c b/drivers/video/bw2.c --- a/drivers/video/bw2.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/video/bw2.c 2004-11-29 21:22:07 -08:00 @@ -110,7 +110,7 @@ struct bw2_par { spinlock_t lock; - struct bw2_regs *regs; + struct bw2_regs __iomem *regs; u32 flags; #define BW2_FLAG_BLANKED 0x00000001 @@ -131,7 +131,7 @@ bw2_blank(int blank, struct fb_info *info) { struct bw2_par *par = (struct bw2_par *) info->par; - struct bw2_regs *regs = par->regs; + struct bw2_regs __iomem *regs = par->regs; unsigned long flags; u8 val; @@ -281,7 +281,7 @@ prom_halt(); } for ( ; *p; p += 2) { - u8 *regp = &((u8 *)par->regs)[p[0]]; + u8 __iomem *regp = &((u8 __iomem *)par->regs)[p[0]]; sbus_writeb(p[1], regp); } } @@ -342,8 +342,7 @@ all->info.var.red.offset = all->info.var.green.offset = all->info.var.blue.offset = 0; - all->par.regs = (struct bw2_regs *) - sbus_ioremap(resp, BWTWO_REGISTER_OFFSET, + all->par.regs = sbus_ioremap(resp, BWTWO_REGISTER_OFFSET, sizeof(struct bw2_regs), "bw2 regs"); if (sdev && !prom_getbool(sdev->prom_node, "width")) @@ -355,11 +354,11 @@ all->info.fbops = &bw2_ops; #if defined(CONFIG_SPARC32) if (sdev) - all->info.screen_base = (char *) + all->info.screen_base = (char __iomem *) prom_getintdefault(sdev->prom_node, "address", 0); #endif if (!all->info.screen_base) - all->info.screen_base = (char *) + all->info.screen_base = sbus_ioremap(resp, 0, all->par.fbsize, "bw2 ram"); all->info.par = &all->par; diff -Nru a/drivers/video/cg14.c b/drivers/video/cg14.c --- a/drivers/video/cg14.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/video/cg14.c 2004-11-29 21:22:08 -08:00 @@ -188,9 +188,9 @@ struct cg14_par { spinlock_t lock; - struct cg14_regs *regs; - struct cg14_clut *clut; - struct cg14_cursor *cursor; + struct cg14_regs __iomem *regs; + struct cg14_clut __iomem *clut; + struct cg14_cursor __iomem *cursor; u32 flags; #define CG14_FLAG_BLANKED 0x00000001 @@ -209,7 +209,7 @@ static void __cg14_reset(struct cg14_par *par) { - struct cg14_regs *regs = par->regs; + struct cg14_regs __iomem *regs = par->regs; u8 val; val = sbus_readb(®s->mcr); @@ -248,13 +248,16 @@ unsigned transp, struct fb_info *info) { struct cg14_par *par = (struct cg14_par *) info->par; - struct cg14_clut *clut = par->clut; + struct cg14_clut __iomem *clut = par->clut; unsigned long flags; u32 val; if (regno >= 256) return 1; + red >>= 8; + green >>= 8; + blue >>= 8; val = (red | (green << 8) | (blue << 16)); spin_lock_irqsave(&par->lock, flags); @@ -277,7 +280,7 @@ unsigned long arg, struct fb_info *info) { struct cg14_par *par = (struct cg14_par *) info->par; - struct cg14_regs *regs = par->regs; + struct cg14_regs __iomem *regs = par->regs; struct mdi_cfginfo kmdi, __user *mdii; unsigned long flags; int cur_mode, mode, ret = 0; @@ -322,7 +325,8 @@ break; case MDI_16_PIX: - cur_mode |= 0x20; + cur_mode |= (CG14_MCR_PIXMODE_16 << + CG14_MCR_PIXMODE_SHIFT); break; case MDI_8_PIX: @@ -341,7 +345,7 @@ default: ret = sbusfb_ioctl_helper(cmd, arg, info, - FBTYPE_MDICOLOR, 24, par->fbsize); + FBTYPE_MDICOLOR, 8, par->fbsize); break; }; @@ -355,11 +359,16 @@ static void cg14_init_fix(struct fb_info *info, int linebytes) { struct cg14_par *par = (struct cg14_par *)info->par; + const char *name; + + name = "cgfourteen"; + if (par->sdev) + name = par->sdev->prom_name; - strlcpy(info->fix.id, par->sdev->prom_name, sizeof(info->fix.id)); + strlcpy(info->fix.id, name, sizeof(info->fix.id)); info->fix.type = FB_TYPE_PACKED_PIXELS; - info->fix.visual = FB_VISUAL_TRUECOLOR; + info->fix.visual = FB_VISUAL_PSEUDOCOLOR; info->fix.line_length = linebytes; @@ -484,8 +493,11 @@ spin_lock_init(&all->par.lock); sbusfb_fill_var(&all->info.var, node, 8); + all->info.var.red.length = 8; + all->info.var.green.length = 8; + all->info.var.blue.length = 8; - linebytes = prom_getintdefault(sdev->prom_node, "linebytes", + linebytes = prom_getintdefault(node, "linebytes", all->info.var.xres); all->par.fbsize = PAGE_ALIGN(linebytes * all->info.var.yres); @@ -495,33 +507,29 @@ all->par.physbase = phys = sdev->reg_addrs[1].phys_addr; all->par.iospace = sdev->reg_addrs[0].which_io; - all->par.regs = (struct cg14_regs *) - sbus_ioremap(&sdev->resource[0], 0, + all->par.regs = sbus_ioremap(&sdev->resource[0], 0, sizeof(struct cg14_regs), "cg14 regs"); - all->par.clut = (struct cg14_clut *) - sbus_ioremap(&sdev->resource[0], CG14_CLUT1, + all->par.clut = sbus_ioremap(&sdev->resource[0], CG14_CLUT1, sizeof(struct cg14_clut), "cg14 clut"); - all->par.cursor = (struct cg14_cursor *) - sbus_ioremap(&sdev->resource[0], CG14_CURSORREGS, + all->par.cursor = sbus_ioremap(&sdev->resource[0], CG14_CURSORREGS, sizeof(struct cg14_cursor), "cg14 cursor"); - all->info.screen_base = (char *) - sbus_ioremap(&sdev->resource[1], 0, + all->info.screen_base = sbus_ioremap(&sdev->resource[1], 0, all->par.fbsize, "cg14 ram"); } else { rphys = __get_phys(bases[0]); all->par.physbase = phys = __get_phys(bases[1]); all->par.iospace = __get_iospace(bases[0]); - all->par.regs = (struct cg14_regs *)(unsigned long)bases[0]; - all->par.clut = (struct cg14_clut *)((unsigned long)bases[0] + + all->par.regs = (struct cg14_regs __iomem *)(unsigned long)bases[0]; + all->par.clut = (struct cg14_clut __iomem *)((unsigned long)bases[0] + CG14_CLUT1); all->par.cursor = - (struct cg14_cursor *)((unsigned long)bases[0] + + (struct cg14_cursor __iomem *)((unsigned long)bases[0] + CG14_CURSORREGS); - all->info.screen_base = (char *)(unsigned long)bases[1]; + all->info.screen_base = (char __iomem *)(unsigned long)bases[1]; } prom_getproperty(node, "reg", (char *) &bases[0], sizeof(bases)); @@ -561,6 +569,7 @@ kfree(all); return; } + fb_set_cmap(&all->info.cmap, &all->info); cg14_init_fix(&all->info, linebytes); @@ -573,8 +582,8 @@ list_add(&all->list, &cg14_list); - printk("cg14: cgfourteen at %lx:%lx\n", - all->par.physbase, all->par.iospace); + printk("cg14: cgfourteen at %lx:%lx, %dMB\n", + all->par.iospace, all->par.physbase, all->par.ramsize >> 20); } diff -Nru a/drivers/video/cg3.c b/drivers/video/cg3.c --- a/drivers/video/cg3.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/video/cg3.c 2004-11-29 21:22:07 -08:00 @@ -111,7 +111,7 @@ struct cg3_par { spinlock_t lock; - struct cg3_regs *regs; + struct cg3_regs __iomem *regs; u32 sw_cmap[((256 * 3) + 3) / 4]; u32 flags; @@ -144,7 +144,7 @@ unsigned transp, struct fb_info *info) { struct cg3_par *par = (struct cg3_par *) info->par; - struct bt_regs *bt = &par->regs->cmap; + struct bt_regs __iomem *bt = &par->regs->cmap; unsigned long flags; u32 *p32; u8 *p8; @@ -190,7 +190,7 @@ cg3_blank(int blank, struct fb_info *info) { struct cg3_par *par = (struct cg3_par *) info->par; - struct cg3_regs *regs = par->regs; + struct cg3_regs __iomem *regs = par->regs; unsigned long flags; u8 val; @@ -198,9 +198,9 @@ switch (blank) { case FB_BLANK_UNBLANK: /* Unblanking */ - val = sbus_readl(®s->control); + val = sbus_readb(®s->control); val |= CG3_CR_ENABLE_VIDEO; - sbus_writel(val, ®s->control); + sbus_writeb(val, ®s->control); par->flags &= ~CG3_FLAG_BLANKED; break; @@ -208,9 +208,9 @@ case FB_BLANK_VSYNC_SUSPEND: /* VESA blank (vsync off) */ case FB_BLANK_HSYNC_SUSPEND: /* VESA blank (hsync off) */ case FB_BLANK_POWERDOWN: /* Poweroff */ - val = sbus_readl(®s->control); + val = sbus_readb(®s->control); val |= CG3_CR_ENABLE_VIDEO; - sbus_writel(val, ®s->control); + sbus_writeb(val, ®s->control); par->flags |= CG3_FLAG_BLANKED; break; } @@ -345,15 +345,15 @@ } for (p = cg3_regvals[type]; *p; p += 2) { - u8 *regp = &((u8 *)par->regs)[p[0]]; + u8 __iomem *regp = &((u8 __iomem *)par->regs)[p[0]]; sbus_writeb(p[1], regp); } for (p = cg3_dacvals; *p; p += 2) { - volatile u8 *regp; + volatile u8 __iomem *regp; - regp = (volatile u8 *)&par->regs->cmap.addr; + regp = (volatile u8 __iomem *)&par->regs->cmap.addr; sbus_writeb(p[0], regp); - regp = (volatile u8 *)&par->regs->cmap.control; + regp = (volatile u8 __iomem *)&par->regs->cmap.control; sbus_writeb(p[1], regp); } } @@ -394,18 +394,17 @@ all->info.var.xres); all->par.fbsize = PAGE_ALIGN(linebytes * all->info.var.yres); - all->par.regs = (struct cg3_regs *) - sbus_ioremap(&sdev->resource[0], CG3_REGS_OFFSET, + all->par.regs = sbus_ioremap(&sdev->resource[0], CG3_REGS_OFFSET, sizeof(struct cg3_regs), "cg3 regs"); all->info.flags = FBINFO_DEFAULT; all->info.fbops = &cg3_ops; #ifdef CONFIG_SPARC32 - all->info.screen_base = (char *) + all->info.screen_base = (char __iomem *) prom_getintdefault(sdev->prom_node, "address", 0); #endif if (!all->info.screen_base) - all->info.screen_base = (char *) + all->info.screen_base = sbus_ioremap(&sdev->resource[0], CG3_RAM_OFFSET, all->par.fbsize, "cg3 ram"); all->info.par = &all->par; diff -Nru a/drivers/video/cg6.c b/drivers/video/cg6.c --- a/drivers/video/cg6.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/video/cg6.c 2004-11-29 21:22:07 -08:00 @@ -250,11 +250,11 @@ struct cg6_par { spinlock_t lock; - struct bt_regs *bt; - struct cg6_fbc *fbc; - struct cg6_thc *thc; - struct cg6_tec *tec; - volatile u32 *fhc; + struct bt_regs __iomem *bt; + struct cg6_fbc __iomem *fbc; + struct cg6_thc __iomem *thc; + struct cg6_tec __iomem *tec; + volatile u32 __iomem *fhc; u32 flags; #define CG6_FLAG_BLANKED 0x00000001 @@ -269,7 +269,7 @@ static int cg6_sync(struct fb_info *info) { struct cg6_par *par = (struct cg6_par *) info->par; - struct cg6_fbc *fbc = par->fbc; + struct cg6_fbc __iomem *fbc = par->fbc; int limit = 10000; do { @@ -292,7 +292,7 @@ static void cg6_fillrect(struct fb_info *info, const struct fb_fillrect *rect) { struct cg6_par *par = (struct cg6_par *) info->par; - struct cg6_fbc *fbc = par->fbc; + struct cg6_fbc __iomem *fbc = par->fbc; unsigned long flags; s32 val; @@ -327,7 +327,7 @@ static void cg6_imageblit(struct fb_info *info, const struct fb_image *image) { struct cg6_par *par = (struct cg6_par *) info->par; - struct cg6_fbc *fbc = par->fbc; + struct cg6_fbc __iomem *fbc = par->fbc; const u8 *data = image->data; unsigned long flags; u32 x, y; @@ -418,7 +418,7 @@ unsigned transp, struct fb_info *info) { struct cg6_par *par = (struct cg6_par *) info->par; - struct bt_regs *bt = par->bt; + struct bt_regs __iomem *bt = par->bt; unsigned long flags; if (regno >= 256) @@ -449,7 +449,7 @@ cg6_blank(int blank, struct fb_info *info) { struct cg6_par *par = (struct cg6_par *) info->par; - struct cg6_thc *thc = par->thc; + struct cg6_thc __iomem *thc = par->thc; unsigned long flags; u32 val; @@ -593,7 +593,7 @@ /* Initialize Brooktree DAC */ static void cg6_bt_init(struct cg6_par *par) { - struct bt_regs *bt = par->bt; + struct bt_regs __iomem *bt = par->bt; sbus_writel(0x04 << 24, &bt->addr); /* color planes */ sbus_writel(0xff << 24, &bt->control); @@ -608,8 +608,8 @@ static void cg6_chip_init(struct fb_info *info) { struct cg6_par *par = (struct cg6_par *) info->par; - struct cg6_tec *tec = par->tec; - struct cg6_fbc *fbc = par->fbc; + struct cg6_tec __iomem *tec = par->tec; + struct cg6_fbc __iomem *fbc = par->fbc; u32 rev, conf, mode, tmp; int i; @@ -696,31 +696,26 @@ if (prom_getbool(sdev->prom_node, "dblbuf")) all->par.fbsize *= 4; - all->par.fbc = (struct cg6_fbc *) - sbus_ioremap(&sdev->resource[0], CG6_FBC_OFFSET, + all->par.fbc = sbus_ioremap(&sdev->resource[0], CG6_FBC_OFFSET, 4096, "cgsix fbc"); - all->par.tec = (struct cg6_tec *) - sbus_ioremap(&sdev->resource[0], CG6_TEC_OFFSET, + all->par.tec = sbus_ioremap(&sdev->resource[0], CG6_TEC_OFFSET, sizeof(struct cg6_tec), "cgsix tec"); - all->par.thc = (struct cg6_thc *) - sbus_ioremap(&sdev->resource[0], CG6_THC_OFFSET, + all->par.thc = sbus_ioremap(&sdev->resource[0], CG6_THC_OFFSET, sizeof(struct cg6_thc), "cgsix thc"); - all->par.bt = (struct bt_regs *) - sbus_ioremap(&sdev->resource[0], CG6_BROOKTREE_OFFSET, + all->par.bt = sbus_ioremap(&sdev->resource[0], CG6_BROOKTREE_OFFSET, sizeof(struct bt_regs), "cgsix dac"); - all->par.fhc = (u32 *) - sbus_ioremap(&sdev->resource[0], CG6_FHC_OFFSET, + all->par.fhc = sbus_ioremap(&sdev->resource[0], CG6_FHC_OFFSET, sizeof(u32), "cgsix fhc"); all->info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT; all->info.fbops = &cg6_ops; #ifdef CONFIG_SPARC32 - all->info.screen_base = (char *) + all->info.screen_base = (char __iomem *) prom_getintdefault(sdev->prom_node, "address", 0); #endif if (!all->info.screen_base) - all->info.screen_base = (char *) + all->info.screen_base = sbus_ioremap(&sdev->resource[0], CG6_RAM_OFFSET, all->par.fbsize, "cgsix ram"); all->info.par = &all->par; diff -Nru a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig --- a/drivers/video/console/Kconfig 2004-11-29 21:22:07 -08:00 +++ b/drivers/video/console/Kconfig 2004-11-29 21:22:07 -08:00 @@ -105,6 +105,7 @@ config FRAMEBUFFER_CONSOLE tristate "Framebuffer Console support" depends on FB + select CRC32 config FONTS bool "Select compiled-in fonts" diff -Nru a/drivers/video/console/bitblit.c b/drivers/video/console/bitblit.c --- a/drivers/video/console/bitblit.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/video/console/bitblit.c 2004-11-29 21:22:08 -08:00 @@ -243,7 +243,7 @@ unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; int w = (vc->vc_font.width + 7) >> 3, c; int y = real_y(p, vc->vc_y); - int attribute; + int attribute, use_sw = (vc->vc_cursor_type & 0x10); char *src; cursor.set = 0; @@ -252,7 +252,8 @@ attribute = get_attribute(info, c); src = vc->vc_font.data + ((c & charmask) * (w * vc->vc_font.height)); - if (ops->cursor_state.image.data != src) { + if (ops->cursor_state.image.data != src || + ops->cursor_reset) { ops->cursor_state.image.data = src; cursor.set |= FB_CUR_SETIMAGE; } @@ -271,34 +272,39 @@ } if (ops->cursor_state.image.fg_color != fg || - ops->cursor_state.image.bg_color != bg) { + ops->cursor_state.image.bg_color != bg || + ops->cursor_reset) { ops->cursor_state.image.fg_color = fg; ops->cursor_state.image.bg_color = bg; cursor.set |= FB_CUR_SETCMAP; } if ((ops->cursor_state.image.dx != (vc->vc_font.width * vc->vc_x)) || - (ops->cursor_state.image.dy != (vc->vc_font.height * y))) { + (ops->cursor_state.image.dy != (vc->vc_font.height * y)) || + ops->cursor_reset) { ops->cursor_state.image.dx = vc->vc_font.width * vc->vc_x; ops->cursor_state.image.dy = vc->vc_font.height * y; cursor.set |= FB_CUR_SETPOS; } if (ops->cursor_state.image.height != vc->vc_font.height || - ops->cursor_state.image.width != vc->vc_font.width) { + ops->cursor_state.image.width != vc->vc_font.width || + ops->cursor_reset) { ops->cursor_state.image.height = vc->vc_font.height; ops->cursor_state.image.width = vc->vc_font.width; cursor.set |= FB_CUR_SETSIZE; } - if (ops->cursor_state.hot.x || ops->cursor_state.hot.y) { + if (ops->cursor_state.hot.x || ops->cursor_state.hot.y || + ops->cursor_reset) { ops->cursor_state.hot.x = cursor.hot.y = 0; cursor.set |= FB_CUR_SETHOT; } - if ((cursor.set & FB_CUR_SETSIZE) || - ((vc->vc_cursor_type & 0x0f) != p->cursor_shape) - || ops->cursor_state.mask == NULL) { + if (cursor.set & FB_CUR_SETSIZE || + vc->vc_cursor_type != p->cursor_shape || + ops->cursor_state.mask == NULL || + ops->cursor_reset) { char *mask = kmalloc(w*vc->vc_font.height, GFP_ATOMIC); int cur_height, size, i = 0; u8 msk = 0xff; @@ -309,10 +315,11 @@ if (ops->cursor_state.mask) kfree(ops->cursor_state.mask); ops->cursor_state.mask = mask; - p->cursor_shape = vc->vc_cursor_type & 0x0f; + + p->cursor_shape = vc->vc_cursor_type; cursor.set |= FB_CUR_SETSHAPE; - switch (vc->vc_cursor_type & 0x0f) { + switch (p->cursor_shape & CUR_HWMASK) { case CUR_NONE: cur_height = 0; break; @@ -348,7 +355,7 @@ case CM_DRAW: case CM_MOVE: default: - ops->cursor_state.enable = 1; + ops->cursor_state.enable = (use_sw) ? 0 : 1; break; } @@ -367,6 +374,8 @@ cursor.rop = ROP_XOR; info->fbops->fb_cursor(info, &cursor); + + ops->cursor_reset = 0; } void fbcon_set_bitops(struct fbcon_ops *ops) diff -Nru a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c --- a/drivers/video/console/fbcon.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/video/console/fbcon.c 2004-11-29 21:22:08 -08:00 @@ -77,7 +77,7 @@ #include #include #include - +#include /* For counting font checksums */ #include #include #include @@ -1889,6 +1889,7 @@ int i, prev_console, do_set_par = 0; info = registered_fb[con2fb_map[vc->vc_num]]; + if (softback_top) { int l = fbcon_softback_size / vc->vc_size_row; if (softback_lines) @@ -1904,6 +1905,7 @@ softback_top = 0; } } + if (logo_shown >= 0) { struct vc_data *conp2 = vc_cons[logo_shown].d; @@ -1953,6 +1955,7 @@ } set_blitting_type(vc, info, p); + ((struct fbcon_ops *)info->fbcon_par)->cursor_reset = 1; vc->vc_can_do_color = (fb_get_color_depth(info) != 1); vc->vc_complement_mask = vc->vc_can_do_color ? 0x7700 : 0x0800; @@ -2257,6 +2260,12 @@ * User asked to set font; we are guaranteed that * a) width and height are in range 1..32 * b) charcount does not exceed 512 + * but lets not assume that, since someone might someday want to use larger + * fonts. And charcount of 512 is small for unicode support. + * + * However, user space gives the font in 32 rows , regardless of + * actual font height. So a new API is needed if support for larger fonts + * is ever implemented. */ static int fbcon_set_font(struct vc_data *vc, struct console_font *font, unsigned flags) @@ -2264,20 +2273,17 @@ unsigned charcount = font->charcount; int w = font->width; int h = font->height; - int size = h; - int i, k; - u8 *new_data, *data = font->data, *p; + int size; + int i, csum; + u8 *new_data, *data = font->data; + int pitch = (font->width+7) >> 3; + /* Is there a reason why fbconsole couldn't handle any charcount >256? + * If not this check should be changed to charcount < 256 */ if (charcount != 256 && charcount != 512) return -EINVAL; - if (w > 8) { - if (w <= 16) - size *= 2; - else - size *= 4; - } - size *= charcount; + size = h * pitch * charcount; new_data = kmalloc(FONT_EXTRA_WORDS * sizeof(int) + size, GFP_USER); @@ -2288,55 +2294,22 @@ FNTSIZE(new_data) = size; FNTCHARCNT(new_data) = charcount; REFCOUNT(new_data) = 0; /* usage counter */ - p = new_data; - if (w <= 8) { - for (i = 0; i < charcount; i++) { - memcpy(p, data, h); - data += 32; - p += h; - } - } else if (w <= 16) { - h *= 2; - for (i = 0; i < charcount; i++) { - memcpy(p, data, h); - data += 64; - p += h; - } - } else if (w <= 24) { - for (i = 0; i < charcount; i++) { - int j; - for (j = 0; j < h; j++) { - memcpy(p, data, 3); - p[3] = 0; - data += 3; - p += sizeof(u32); - } - data += 3 * (32 - h); - } - } else { - h *= 4; - for (i = 0; i < charcount; i++) { - memcpy(p, data, h); - data += 128; - p += h; - } - } - /* we can do it in u32 chunks because of charcount is 256 or 512, so - font length must be multiple of 256, at least. And 256 is multiple - of 4 */ - k = 0; - while (p > new_data) { - p = (u8 *)((u32 *)p - 1); - k += *(u32 *) p; + for (i=0; i< charcount; i++) { + memcpy(new_data + i*h*pitch, data + i*32*pitch, h*pitch); } - FNTSUM(new_data) = k; + + /* Since linux has a nice crc32 function use it for counting font + * checksums. */ + csum = crc32(0, new_data, size); + + FNTSUM(new_data) = csum; /* Check if the same font is on some other console already */ for (i = 0; i < MAX_NR_CONSOLES; i++) { struct vc_data *tmp = vc_cons[i].d; if (fb_display[i].userfont && fb_display[i].fontdata && - FNTSUM(fb_display[i].fontdata) == k && + FNTSUM(fb_display[i].fontdata) == csum && FNTSIZE(fb_display[i].fontdata) == size && tmp->vc_font.width == w && !memcmp(fb_display[i].fontdata, new_data, size)) { diff -Nru a/drivers/video/console/fbcon.h b/drivers/video/console/fbcon.h --- a/drivers/video/console/fbcon.h 2004-11-29 21:22:08 -08:00 +++ b/drivers/video/console/fbcon.h 2004-11-29 21:22:08 -08:00 @@ -65,6 +65,7 @@ struct fb_cursor cursor_state; int currcon; /* Current VC. */ int cursor_flash; + int cursor_reset; char *cursor_data; }; /* diff -Nru a/drivers/video/console/tileblit.c b/drivers/video/console/tileblit.c --- a/drivers/video/console/tileblit.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/video/console/tileblit.c 2004-11-29 21:22:07 -08:00 @@ -84,10 +84,11 @@ struct display *p, int mode, int fg, int bg) { struct fb_tilecursor cursor; + int use_sw = (vc->vc_cursor_type & 0x01); cursor.sx = vc->vc_x; cursor.sy = vc->vc_y; - cursor.mode = (mode == CM_ERASE) ? 0 : 1; + cursor.mode = (mode == CM_ERASE || use_sw) ? 0 : 1; cursor.fg = fg; cursor.bg = bg; diff -Nru a/drivers/video/controlfb.c b/drivers/video/controlfb.c --- a/drivers/video/controlfb.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/video/controlfb.c 2004-11-29 21:22:06 -08:00 @@ -98,14 +98,14 @@ struct fb_par_control par; u32 pseudo_palette[17]; - struct cmap_regs *cmap_regs; + struct cmap_regs __iomem *cmap_regs; unsigned long cmap_regs_phys; - struct control_regs *control_regs; + struct control_regs __iomem *control_regs; unsigned long control_regs_phys; unsigned long control_regs_size; - __u8 *frame_buffer; + __u8 __iomem *frame_buffer; unsigned long frame_buffer_phys; unsigned long fb_orig_base; unsigned long fb_orig_size; @@ -497,7 +497,7 @@ static void control_set_hardware(struct fb_info_control *p, struct fb_par_control *par) { struct control_regvals *r; - volatile struct preg *rp; + volatile struct preg __iomem *rp; int i, cmode; if (PAR_EQUAL(&p->par, par)) { @@ -1017,7 +1017,7 @@ info->fbops = &controlfb_ops; info->pseudo_palette = p->pseudo_palette; info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN; - info->screen_base = (char *) p->frame_buffer + CTRLFB_OFF; + info->screen_base = p->frame_buffer + CTRLFB_OFF; fb_alloc_cmap(&info->cmap, 256, 0); diff -Nru a/drivers/video/fbmem.c b/drivers/video/fbmem.c --- a/drivers/video/fbmem.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/video/fbmem.c 2004-11-29 21:22:06 -08:00 @@ -725,7 +725,10 @@ fb_set_cmap(&info->cmap, info); fb_var_to_videomode(&mode, &info->var); - fb_add_videomode(&mode, &info->modelist); + + if (info->modelist.prev && info->modelist.next && + !list_empty(&info->modelist)) + fb_add_videomode(&mode, &info->modelist); if (info->flags & FBINFO_MISC_MODECHANGEUSER) { struct fb_event event; @@ -906,9 +909,8 @@ off += start; vma->vm_pgoff = off >> PAGE_SHIFT; /* This is an IO map - tell maydump to skip this VMA */ - vma->vm_flags |= VM_IO; + vma->vm_flags |= VM_IO | VM_RESERVED; #if defined(__sparc_v9__) - vma->vm_flags |= (VM_SHM | VM_LOCKED); if (io_remap_page_range(vma, vma->vm_start, off, vma->vm_end - vma->vm_start, vma->vm_page_prot, 0)) return -EAGAIN; diff -Nru a/drivers/video/fm2fb.c b/drivers/video/fm2fb.c --- a/drivers/video/fm2fb.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/video/fm2fb.c 2004-11-29 21:22:07 -08:00 @@ -2,7 +2,7 @@ * linux/drivers/video/fm2fb.c -- BSC FrameMaster II/Rainbow II frame buffer * device * - * Copyright (C) 1998 Steffen A. Mork (mork@ls7.cs.uni-dortmund.de) + * Copyright (C) 1998 Steffen A. Mork (linux-dev@morknet.de) * Copyright (C) 1999 Geert Uytterhoeven * * Written for 2.0.x by Steffen A. Mork diff -Nru a/drivers/video/gbefb.c b/drivers/video/gbefb.c --- a/drivers/video/gbefb.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/video/gbefb.c 2004-11-29 21:22:07 -08:00 @@ -1084,9 +1084,9 @@ int i, ret = 0; #ifndef MODULE - char *option = NULL; + char *options = NULL; - if (fb_get_options("gbefb", &option)) + if (fb_get_options("gbefb", &options)) return -ENODEV; gbefb_setup(options); #endif diff -Nru a/drivers/video/hgafb.c b/drivers/video/hgafb.c --- a/drivers/video/hgafb.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/video/hgafb.c 2004-11-29 21:22:08 -08:00 @@ -59,7 +59,7 @@ /* Description of the hardware layout */ -static unsigned long hga_vram_base; /* Base of video memory */ +static void __iomem *hga_vram; /* Base of video memory */ static unsigned long hga_vram_len; /* Size of video memory */ #define HGA_ROWADDR(row) ((row%4)*8192 + (row>>2)*90) @@ -68,7 +68,7 @@ static inline u8 __iomem * rowaddr(struct fb_info *info, u_int row) { - return (u8 __iomem *) (fb_readl(info->screen_base + HGA_ROWADDR(row))); + return info->screen_base + HGA_ROWADDR(row); } static int hga_mode = -1; /* 0 = txt, 1 = gfx mode */ @@ -176,7 +176,7 @@ fillchar = 0x00; spin_unlock_irqrestore(&hga_reg_lock, flags); if (fillchar != 0xbf) - isa_memset_io(hga_vram_base, fillchar, hga_vram_len); + memset_io(hga_vram, fillchar, hga_vram_len); } static void hga_txt_mode(void) @@ -244,13 +244,13 @@ static void hga_show_logo(struct fb_info *info) { /* - unsigned long dest = hga_vram_base; + void __iomem *dest = hga_vram; char *logo = linux_logo_bw; int x, y; for (y = 134; y < 134 + 80 ; y++) * this needs some cleanup * for (x = 0; x < 10 ; x++) - isa_writeb(~*(logo++),(dest + HGA_ROWADDR(y) + x + 40)); + writeb(~*(logo++),(dest + HGA_ROWADDR(y) + x + 40)); */ } @@ -282,12 +282,13 @@ static int __init hga_card_detect(void) { int count=0; - unsigned long p, q; + void __iomem *p, *q; unsigned short p_save, q_save; - hga_vram_base = 0xb0000; hga_vram_len = 0x08000; + hga_vram = ioremap(0xb0000, hga_vram_len); + if (request_region(0x3b0, 12, "hgafb")) release_io_ports = 1; if (request_region(0x3bf, 1, "hgafb")) @@ -295,14 +296,14 @@ /* do a memory check */ - p = hga_vram_base; - q = hga_vram_base + 0x01000; + p = hga_vram; + q = hga_vram + 0x01000; - p_save = isa_readw(p); q_save = isa_readw(q); + p_save = readw(p); q_save = readw(q); - isa_writew(0xaa55, p); if (isa_readw(p) == 0xaa55) count++; - isa_writew(0x55aa, p); if (isa_readw(p) == 0x55aa) count++; - isa_writew(p_save, p); + writew(0xaa55, p); if (readw(p) == 0xaa55) count++; + writew(0x55aa, p); if (readw(p) == 0x55aa) count++; + writew(p_save, p); if (count != 2) { return 0; @@ -554,13 +555,15 @@ if (! hga_card_detect()) { printk(KERN_INFO "hgafb: HGA card not detected.\n"); + if (hga_vram) + iounmap(hga_vram); return -EINVAL; } printk(KERN_INFO "hgafb: %s with %ldK of memory detected.\n", hga_type_name, hga_vram_len/1024); - hga_fix.smem_start = VGA_MAP_MEM(hga_vram_base); + hga_fix.smem_start = (unsigned long)hga_vram; hga_fix.smem_len = hga_vram_len; fb_info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN; @@ -572,10 +575,12 @@ fb_info.monspecs.vfmax = 10000; fb_info.monspecs.dpms = 0; fb_info.fbops = &hgafb_ops; - fb_info.screen_base = (char __iomem *)hga_fix.smem_start; + fb_info.screen_base = hga_vram; - if (register_framebuffer(&fb_info) < 0) - return -EINVAL; + if (register_framebuffer(&fb_info) < 0) { + iounmap(hga_vram); + return -EINVAL; + } printk(KERN_INFO "fb%d: %s frame buffer device\n", fb_info.node, fb_info.fix.id); @@ -597,6 +602,7 @@ hga_txt_mode(); hga_clear_screen(); unregister_framebuffer(&fb_info); + iounmap(hga_vram); if (release_io_ports) release_region(0x3b0, 12); if (release_io_port) release_region(0x3bf, 1); } diff -Nru a/drivers/video/imsttfb.c b/drivers/video/imsttfb.c --- a/drivers/video/imsttfb.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/video/imsttfb.c 2004-11-29 21:22:07 -08:00 @@ -319,7 +319,7 @@ struct imstt_par { struct imstt_regvals init; - __u32 *dc_regs; + __u32 __iomem *dc_regs; unsigned long cmap_regs_phys; __u8 *cmap_regs; __u32 ramdac; @@ -406,19 +406,19 @@ /* * Register access */ -static inline u32 read_reg_le32(volatile u32 *base, int regindex) +static inline u32 read_reg_le32(volatile u32 __iomem *base, int regindex) { #ifdef __powerpc__ - return in_le32((volatile u32 *) (base + regindex)); + return in_le32(base + regindex); #else return readl(base + regindex); #endif } -static inline void write_reg_le32(volatile u32 *base, int regindex, u32 val) +static inline void write_reg_le32(volatile u32 __iomem *base, int regindex, u32 val) { #ifdef __powerpc__ - out_le32((volatile u32 *) (base + regindex), val); + out_le32(base + regindex, val); #else writel(val, base + regindex); #endif @@ -1519,7 +1519,7 @@ info->fix.smem_start = addr; info->screen_base = (__u8 *)ioremap(addr, par->ramdac == IBM ? 0x400000 : 0x800000); info->fix.mmio_start = addr + 0x800000; - par->dc_regs = (__u32 *)ioremap(addr + 0x800000, 0x1000); + par->dc_regs = ioremap(addr + 0x800000, 0x1000); par->cmap_regs_phys = addr + 0x840000; par->cmap_regs = (__u8 *)ioremap(addr + 0x840000, 0x1000); info->par = par; diff -Nru a/drivers/video/intelfb/intelfb.h b/drivers/video/intelfb/intelfb.h --- a/drivers/video/intelfb/intelfb.h 2004-11-29 21:22:07 -08:00 +++ b/drivers/video/intelfb/intelfb.h 2004-11-29 21:22:07 -08:00 @@ -8,7 +8,7 @@ /*** Version/name ***/ -#define INTELFB_VERSION "0.9.1" +#define INTELFB_VERSION "0.9.2" #define INTELFB_MODULE_NAME "intelfb" #define SUPPORTED_CHIPSETS "830M/845G/852GM/855GM/865G" @@ -199,9 +199,12 @@ struct intelfb_hwstate save_state; /* agpgart structs */ - struct agp_memory *gtt_fb_mem; // use all stolen memory + struct agp_memory *gtt_fb_mem; // use all stolen memory or vram struct agp_memory *gtt_ring_mem; // ring buffer struct agp_memory *gtt_cursor_mem; // hw cursor + + /* use a gart reserved fb mem */ + u8 fbmem_gart; /* mtrr support */ u32 mtrr_reg; diff -Nru a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c --- a/drivers/video/intelfb/intelfbdrv.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/video/intelfb/intelfbdrv.c 2004-11-29 21:22:08 -08:00 @@ -94,6 +94,11 @@ * Use module_param instead of old MODULE_PARM * Some cleanup * + * 11/2004 - Version 0.9.2 + * Add vram option to reserve more memory than stolen by BIOS + * Fix intelfbhw_pan_display typo + * Add __initdata annotations + * * TODO: * * @@ -186,19 +191,22 @@ MODULE_LICENSE("Dual BSD/GPL"); MODULE_DEVICE_TABLE(pci, intelfb_pci_table); -static int accel = 1; -static int hwcursor = 1; -static int mtrr = 1; -static int fixed = 0; -static int noinit = 0; -static int noregister = 0; -static int probeonly = 0; -static int idonly = 0; -static int bailearly = 0; -static char *mode = NULL; +static int accel __initdata = 1; +static int vram __initdata = 4; +static int hwcursor __initdata = 1; +static int mtrr __initdata = 1; +static int fixed __initdata = 0; +static int noinit __initdata = 0; +static int noregister __initdata = 0; +static int probeonly __initdata = 0; +static int idonly __initdata = 0; +static int bailearly __initdata = 0; +static char *mode __initdata = NULL; module_param(accel, bool, S_IRUGO); MODULE_PARM_DESC(accel, "Enable console acceleration"); +module_param(vram, int, S_IRUGO); +MODULE_PARM_DESC(vram, "System RAM to allocate to framebuffer in MiB"); module_param(hwcursor, bool, S_IRUGO); MODULE_PARM_DESC(hwcursor, "Enable HW cursor"); module_param(mtrr, bool, S_IRUGO); @@ -257,6 +265,7 @@ #ifndef MODULE #define OPT_EQUAL(opt, name) (!strncmp(opt, name, strlen(name))) +#define OPT_INTVAL(opt, name) simple_strtoul(opt + strlen(name), NULL, 0) #define OPT_STRVAL(opt, name) (opt + strlen(name)) static __inline__ char * @@ -279,6 +288,19 @@ } static __inline__ int +get_opt_int(const char *this_opt, const char *name, int *ret) +{ + if (!ret) + return 0; + + if (!OPT_EQUAL(this_opt, name)) + return 0; + + *ret = OPT_INTVAL(this_opt, name); + return 1; +} + +static __inline__ int get_opt_bool(const char *this_opt, const char *name, int *ret) { if (!ret) @@ -330,6 +352,8 @@ continue; if (get_opt_bool(this_opt, "accel", &accel)) ; + else if (get_opt_int(this_opt, "vram", &vram)) + ; else if (get_opt_bool(this_opt, "hwcursor", &hwcursor)) ; else if (get_opt_bool(this_opt, "mtrr", &mtrr)) @@ -402,8 +426,10 @@ unset_mtrr(dinfo); - if (dinfo->gtt_fb_mem) + if (dinfo->fbmem_gart && dinfo->gtt_fb_mem) { agp_unbind_memory(dinfo->gtt_fb_mem); + agp_free_memory(dinfo->gtt_fb_mem); + } if (dinfo->gtt_cursor_mem) { agp_unbind_memory(dinfo->gtt_cursor_mem); agp_free_memory(dinfo->gtt_cursor_mem); @@ -560,13 +586,14 @@ dinfo->accel = 0; } - /* Framebuffer parameters - Use all the stolen memory */ - dinfo->fb.size = ROUND_UP_TO_PAGE(stolen_size); - dinfo->fb.offset = 0; // starts at offset 0 - dinfo->fb.physical = dinfo->aperture.physical - + (dinfo->fb.offset << 12); - dinfo->fb.virtual = dinfo->aperture.virtual + (dinfo->fb.offset << 12); - dinfo->fb_start = dinfo->fb.offset << 12; + /* Framebuffer parameters - Use all the stolen memory if >= vram */ + if (ROUND_UP_TO_PAGE(stolen_size) >= MB(vram)) { + dinfo->fb.size = ROUND_UP_TO_PAGE(stolen_size); + dinfo->fbmem_gart = 0; + } else { + dinfo->fb.size = MB(vram); + dinfo->fbmem_gart = 1; + } /* Allocate space for the ring buffer and HW cursor if enabled. */ if (dinfo->accel) { @@ -601,6 +628,11 @@ dinfo->cursor.offset = (stolen_size >> 12) + + gtt_info.current_memory + (dinfo->ring.size >> 12); } + if (dinfo->fbmem_gart) { + dinfo->fb.offset = (stolen_size >> 12) + + + gtt_info.current_memory + (dinfo->ring.size >> 12) + + (dinfo->cursor.size >> 12); + } /* Allocate memories (which aren't stolen) */ if (dinfo->accel) { @@ -652,6 +684,29 @@ dinfo->cursor.virtual = dinfo->aperture.virtual + (dinfo->cursor.offset << 12); } + if (dinfo->fbmem_gart) { + if (!(dinfo->gtt_fb_mem = + agp_allocate_memory(dinfo->fb.size >> 12, + AGP_NORMAL_MEMORY))) { + WRN_MSG("cannot allocate framebuffer memory - use " + "the stolen one\n"); + dinfo->fbmem_gart = 0; + } + if (agp_bind_memory(dinfo->gtt_fb_mem, + dinfo->fb.offset)) { + WRN_MSG("cannot bind framebuffer memory - use " + "the stolen one\n"); + dinfo->fbmem_gart = 0; + } + } + + /* update framebuffer memory parameters */ + if (!dinfo->fbmem_gart) + dinfo->fb.offset = 0; /* starts at offset 0 */ + dinfo->fb.physical = dinfo->aperture.physical + + (dinfo->fb.offset << 12); + dinfo->fb.virtual = dinfo->aperture.virtual + (dinfo->fb.offset << 12); + dinfo->fb_start = dinfo->fb.offset << 12; /* release agpgart */ agp_backend_release(); @@ -673,8 +728,8 @@ (u32 __iomem ) dinfo->cursor.virtual, dinfo->cursor.offset, dinfo->cursor.physical); - DBG_MSG("options: accel = %d, hwcursor = %d, fixed = %d, " - "noinit = %d\n", accel, hwcursor, fixed, noinit); + DBG_MSG("options: vram = %d, accel = %d, hwcursor = %d, fixed = %d, " + "noinit = %d\n", vram, accel, hwcursor, fixed, noinit); DBG_MSG("options: mode = \"%s\"\n", mode ? mode : ""); if (probeonly) diff -Nru a/drivers/video/intelfb/intelfbhw.c b/drivers/video/intelfb/intelfbhw.c --- a/drivers/video/intelfb/intelfbhw.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/video/intelfb/intelfbhw.c 2004-11-29 21:22:06 -08:00 @@ -295,7 +295,7 @@ offset = (yoffset * dinfo->pitch) + (xoffset * var->bits_per_pixel) / 8; - offset += dinfo->fb.offset >> 12; + offset += dinfo->fb.offset << 12; OUTREG(DSPABASE, offset); diff -Nru a/drivers/video/leo.c b/drivers/video/leo.c --- a/drivers/video/leo.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/video/leo.c 2004-11-29 21:22:08 -08:00 @@ -180,11 +180,11 @@ struct leo_par { spinlock_t lock; - struct leo_lx_krn *lx_krn; - struct leo_lc_ss0_usr *lc_ss0_usr; - struct leo_ld_ss0 *ld_ss0; - struct leo_ld_ss1 *ld_ss1; - struct leo_cursor *cursor; + struct leo_lx_krn __iomem *lx_krn; + struct leo_lc_ss0_usr __iomem *lc_ss0_usr; + struct leo_ld_ss0 __iomem *ld_ss0; + struct leo_ld_ss1 __iomem *ld_ss1; + struct leo_cursor __iomem *cursor; u32 extent; u32 clut_data[256]; @@ -198,7 +198,7 @@ struct list_head list; }; -static void leo_wait(struct leo_lx_krn *lx_krn) +static void leo_wait(struct leo_lx_krn __iomem *lx_krn) { int i; @@ -223,7 +223,7 @@ unsigned transp, struct fb_info *info) { struct leo_par *par = (struct leo_par *) info->par; - struct leo_lx_krn *lx_krn = par->lx_krn; + struct leo_lx_krn __iomem *lx_krn = par->lx_krn; unsigned long flags; u32 val; int i; @@ -263,7 +263,7 @@ static int leo_blank(int blank, struct fb_info *info) { struct leo_par *par = (struct leo_par *) info->par; - struct leo_lx_krn *lx_krn = par->lx_krn; + struct leo_lx_krn __iomem *lx_krn = par->lx_krn; unsigned long flags; u32 val; @@ -403,7 +403,7 @@ static void leo_wid_put(struct fb_info *info, struct fb_wid_list *wl) { struct leo_par *par = (struct leo_par *) info->par; - struct leo_lx_krn *lx_krn = par->lx_krn; + struct leo_lx_krn __iomem *lx_krn = par->lx_krn; struct fb_wid_item *wi; unsigned long flags; u32 val; @@ -465,7 +465,7 @@ static void leo_switch_from_graph(struct fb_info *info) { struct leo_par *par = (struct leo_par *) info->par; - struct leo_ld *ss = (struct leo_ld *) par->ld_ss0; + struct leo_ld __iomem *ss = (struct leo_ld __iomem *) par->ld_ss0; unsigned long flags; u32 val; @@ -564,27 +564,27 @@ all->par.fbsize = PAGE_ALIGN(linebytes * all->info.var.yres); #ifdef CONFIG_SPARC32 - all->info.screen_base = (char *) + all->info.screen_base = (char __iomem *) prom_getintdefault(sdev->prom_node, "address", 0); #endif if (!all->info.screen_base) - all->info.screen_base = (char *) + all->info.screen_base = sbus_ioremap(&sdev->resource[0], LEO_OFF_SS0, 0x800000, "leo ram"); - all->par.lc_ss0_usr = (struct leo_lc_ss0_usr *) + all->par.lc_ss0_usr = sbus_ioremap(&sdev->resource[0], LEO_OFF_LC_SS0_USR, 0x1000, "leolc ss0usr"); - all->par.ld_ss0 = (struct leo_ld_ss0 *) + all->par.ld_ss0 = sbus_ioremap(&sdev->resource[0], LEO_OFF_LD_SS0, 0x1000, "leold ss0"); - all->par.ld_ss1 = (struct leo_ld_ss1 *) + all->par.ld_ss1 = sbus_ioremap(&sdev->resource[0], LEO_OFF_LD_SS1, 0x1000, "leold ss1"); - all->par.lx_krn = (struct leo_lx_krn *) + all->par.lx_krn = sbus_ioremap(&sdev->resource[0], LEO_OFF_LX_KRN, 0x1000, "leolx krn"); - all->par.cursor = (struct leo_cursor *) + all->par.cursor = sbus_ioremap(&sdev->resource[0], LEO_OFF_LX_CURSOR, sizeof(struct leo_cursor), "leolx cursor"); diff -Nru a/drivers/video/modedb.c b/drivers/video/modedb.c --- a/drivers/video/modedb.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/video/modedb.c 2004-11-29 21:22:07 -08:00 @@ -24,7 +24,7 @@ ((v).xres == (x) && (v).yres == (y)) #ifdef DEBUG -#define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __FUNCTION__ , ## args) +#define DPRINTK(fmt, args...) printk("modedb %s: " fmt, __FUNCTION__ , ## args) #else #define DPRINTK(fmt, args...) #endif @@ -474,7 +474,7 @@ const struct fb_videomode *default_mode, unsigned int default_bpp) { - int i, j; + int i; /* Set up defaults */ if (!db) { @@ -493,7 +493,7 @@ int res_specified = 0, bpp_specified = 0, refresh_specified = 0; unsigned int xres = 0, yres = 0, bpp = default_bpp, refresh = 0; int yres_specified = 0; - u32 best = -1, diff = -1; + u32 best, diff; for (i = namelen-1; i >= 0; i--) { switch (name[i]) { @@ -532,16 +532,35 @@ res_specified = 1; } done: - for (i = refresh_specified; i >= 0; i--) { - DPRINTK("Trying specified video mode%s %ix%i\n", - i ? "" : " (ignoring refresh rate)", xres, yres); - for (j = 0; j < dbsize; j++) - if ((name_matches(db[j], name, namelen) || - (res_specified && res_matches(db[j], xres, yres))) && - (!i || db[j].refresh == refresh) && - !fb_try_mode(var, info, &db[j], bpp)) - return 2-i; + DPRINTK("Trying specified video mode%s %ix%i\n", + refresh_specified ? "" : " (ignoring refresh rate)", xres, yres); + + diff = refresh; + best = -1; + for (i = 0; i < dbsize; i++) { + if ((name_matches(db[i], name, namelen) && + !fb_try_mode(var, info, &db[i], bpp))) + return 1; + if (res_specified && res_matches(db[i], xres, yres)) { + if(!fb_try_mode(var, info, &db[i], bpp)) { + if(!refresh_specified || db[i].refresh == refresh) + return 1; + else { + if(diff > abs(db[i].refresh - refresh)) { + diff = abs(db[i].refresh - refresh); + best = i; + } + } + } + } + } + if (best != -1) { + fb_try_mode(var, info, &db[best], bpp); + return 2; } + + diff = xres + yres; + best = -1; DPRINTK("Trying best-fit modes\n"); for (i = 0; i < dbsize; i++) { if (xres <= db[i].xres && yres <= db[i].yres) { diff -Nru a/drivers/video/neofb.c b/drivers/video/neofb.c --- a/drivers/video/neofb.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/video/neofb.c 2004-11-29 21:22:07 -08:00 @@ -1481,7 +1481,7 @@ int s_pitch = (image->width * image->depth + 7) >> 3; int scan_align = info->pixmap.scan_align - 1; int buf_align = info->pixmap.buf_align - 1; - int bltCntl_flags, d_pitch, data_len, i; + int bltCntl_flags, d_pitch, data_len; // The data is padded for the hardware d_pitch = (s_pitch + scan_align) & ~scan_align; @@ -1533,8 +1533,7 @@ writel((image->height << 16) | (image->width & 0xffff), &par->neo2200->xyExt); - for (i = 0; i < data_len; i++) - writeb(image->data[i], par->mmio_vbase + 0x100000 + i); + memcpy_toio(par->mmio_vbase + 0x100000, image->data, data_len); } static void diff -Nru a/drivers/video/offb.c b/drivers/video/offb.c --- a/drivers/video/offb.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/video/offb.c 2004-11-29 21:22:08 -08:00 @@ -47,20 +47,14 @@ }; struct offb_par { - volatile unsigned char *cmap_adr; - volatile unsigned char *cmap_data; + volatile void __iomem *cmap_adr; + volatile void __iomem *cmap_data; int cmap_type; int blanked; }; struct offb_par default_par; -#ifdef __powerpc__ -#define mach_eieio() eieio() -#else -#define mach_eieio() do {} while (0) -#endif - /* * Interface used by the world */ @@ -110,44 +104,36 @@ switch (par->cmap_type) { case cmap_m64: - *par->cmap_adr = regno; - mach_eieio(); - *par->cmap_data = red; - mach_eieio(); - *par->cmap_data = green; - mach_eieio(); - *par->cmap_data = blue; - mach_eieio(); + writeb(regno, par->cmap_adr); + writeb(red, par->cmap_data); + writeb(green, par->cmap_data); + writeb(blue, par->cmap_data); break; case cmap_M3A: /* Clear PALETTE_ACCESS_CNTL in DAC_CNTL */ - out_le32((unsigned *) (par->cmap_adr + 0x58), - in_le32((unsigned *) (par->cmap_adr + - 0x58)) & ~0x20); + out_le32(par->cmap_adr + 0x58, + in_le32(par->cmap_adr + 0x58) & ~0x20); case cmap_r128: /* Set palette index & data */ out_8(par->cmap_adr + 0xb0, regno); - out_le32((unsigned *) (par->cmap_adr + 0xb4), + out_le32(par->cmap_adr + 0xb4, (red << 16 | green << 8 | blue)); break; case cmap_M3B: /* Set PALETTE_ACCESS_CNTL in DAC_CNTL */ - out_le32((unsigned *) (par->cmap_adr + 0x58), - in_le32((unsigned *) (par->cmap_adr + - 0x58)) | 0x20); + out_le32(par->cmap_adr + 0x58, + in_le32(par->cmap_adr + 0x58) | 0x20); /* Set palette index & data */ out_8(par->cmap_adr + 0xb0, regno); - out_le32((unsigned *) (par->cmap_adr + 0xb4), - (red << 16 | green << 8 | blue)); + out_le32(par->cmap_adr + 0xb4, (red << 16 | green << 8 | blue)); break; case cmap_radeon: /* Set palette index & data (could be smarter) */ out_8(par->cmap_adr + 0xb0, regno); - out_le32((unsigned *) (par->cmap_adr + 0xb4), - (red << 16 | green << 8 | blue)); + out_le32(par->cmap_adr + 0xb4, (red << 16 | green << 8 | blue)); break; case cmap_gxt2000: - out_le32((unsigned *) par->cmap_adr + regno, + out_le32((unsigned __iomem *) par->cmap_adr + regno, (red << 16 | green << 8 | blue)); break; } @@ -191,47 +177,33 @@ for (i = 0; i < 256; i++) { switch (par->cmap_type) { case cmap_m64: - *par->cmap_adr = i; - mach_eieio(); - for (j = 0; j < 3; j++) { - *par->cmap_data = 0; - mach_eieio(); - } + writeb(i, par->cmap_adr); + for (j = 0; j < 3; j++) + writeb(0, par->cmap_data); break; case cmap_M3A: /* Clear PALETTE_ACCESS_CNTL in DAC_CNTL */ - out_le32((unsigned *) (par->cmap_adr + - 0x58), - in_le32((unsigned *) (par-> - cmap_adr + - 0x58)) & - ~0x20); + out_le32(par->cmap_adr + 0x58, + in_le32(par->cmap_adr + 0x58) & ~0x20); case cmap_r128: /* Set palette index & data */ out_8(par->cmap_adr + 0xb0, i); - out_le32((unsigned *) (par->cmap_adr + - 0xb4), 0); + out_le32(par->cmap_adr + 0xb4, 0); break; case cmap_M3B: /* Set PALETTE_ACCESS_CNTL in DAC_CNTL */ - out_le32((unsigned *) (par->cmap_adr + - 0x58), - in_le32((unsigned *) (par-> - cmap_adr + - 0x58)) | - 0x20); + out_le32(par->cmap_adr + 0x58, + in_le32(par->cmap_adr + 0x58) | 0x20); /* Set palette index & data */ out_8(par->cmap_adr + 0xb0, i); - out_le32((unsigned *) (par->cmap_adr + - 0xb4), 0); + out_le32(par->cmap_adr + 0xb4, 0); break; case cmap_radeon: out_8(par->cmap_adr + 0xb0, i); - out_le32((unsigned *) (par->cmap_adr + - 0xb4), 0); + out_le32(par->cmap_adr + 0xb4, 0); break; case cmap_gxt2000: - out_le32((unsigned *) par->cmap_adr + i, + out_le32((unsigned __iomem *) par->cmap_adr + i, 0); break; } diff -Nru a/drivers/video/p9100.c b/drivers/video/p9100.c --- a/drivers/video/p9100.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/video/p9100.c 2004-11-29 21:22:08 -08:00 @@ -129,7 +129,7 @@ struct p9100_par { spinlock_t lock; - struct p9100_regs *regs; + struct p9100_regs __iomem *regs; u32 flags; #define P9100_FLAG_BLANKED 0x00000001 @@ -155,7 +155,7 @@ unsigned transp, struct fb_info *info) { struct p9100_par *par = (struct p9100_par *) info->par; - struct p9100_regs *regs = par->regs; + struct p9100_regs __iomem *regs = par->regs; unsigned long flags; if (regno >= 256) @@ -186,7 +186,7 @@ p9100_blank(int blank, struct fb_info *info) { struct p9100_par *par = (struct p9100_par *) info->par; - struct p9100_regs *regs = par->regs; + struct p9100_regs __iomem *regs = par->regs; unsigned long flags; u32 val; @@ -293,19 +293,17 @@ all->info.var.xres); all->par.fbsize = PAGE_ALIGN(linebytes * all->info.var.yres); - all->par.regs = (struct p9100_regs *) - sbus_ioremap(&sdev->resource[0], 0, + all->par.regs = sbus_ioremap(&sdev->resource[0], 0, sizeof(struct p9100_regs), "p9100 regs"); all->info.flags = FBINFO_DEFAULT; all->info.fbops = &p9100_ops; #ifdef CONFIG_SPARC32 - all->info.screen_base = (char *) + all->info.screen_base = (char __iomem *) prom_getintdefault(sdev->prom_node, "address", 0); #endif if (!all->info.screen_base) - all->info.screen_base = (char *) - sbus_ioremap(&sdev->resource[2], 0, + all->info.screen_base = sbus_ioremap(&sdev->resource[2], 0, all->par.fbsize, "p9100 ram"); all->info.par = &all->par; diff -Nru a/drivers/video/platinumfb.c b/drivers/video/platinumfb.c --- a/drivers/video/platinumfb.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/video/platinumfb.c 2004-11-29 21:22:07 -08:00 @@ -56,14 +56,14 @@ } palette[256]; u32 pseudo_palette[17]; - volatile struct cmap_regs *cmap_regs; + volatile struct cmap_regs __iomem *cmap_regs; unsigned long cmap_regs_phys; - volatile struct platinum_regs *platinum_regs; + volatile struct platinum_regs __iomem *platinum_regs; unsigned long platinum_regs_phys; - __u8 *frame_buffer; - volatile __u8 *base_frame_buffer; + __u8 __iomem *frame_buffer; + volatile __u8 __iomem *base_frame_buffer; unsigned long frame_buffer_phys; unsigned long total_vram; @@ -141,7 +141,7 @@ if (pinfo->vmode == 13 && pinfo->cmode > 0) offset = 0x10; - info->screen_base = (char *) pinfo->frame_buffer + init->fb_offset + offset; + info->screen_base = pinfo->frame_buffer + init->fb_offset + offset; info->fix.smem_start = (pinfo->frame_buffer_phys) + init->fb_offset + offset; info->fix.visual = (pinfo->cmode == CMODE_8) ? FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_DIRECTCOLOR; @@ -184,7 +184,7 @@ u_int transp, struct fb_info *info) { struct fb_info_platinum *pinfo = info->par; - volatile struct cmap_regs *cmap_regs = pinfo->cmap_regs; + volatile struct cmap_regs __iomem *cmap_regs = pinfo->cmap_regs; if (regno > 255) return 1; @@ -232,7 +232,7 @@ static void set_platinum_clock(struct fb_info_platinum *pinfo) { - volatile struct cmap_regs *cmap_regs = pinfo->cmap_regs; + volatile struct cmap_regs __iomem *cmap_regs = pinfo->cmap_regs; struct platinum_regvals *init; init = platinum_reg_init[pinfo->vmode-1]; @@ -259,8 +259,8 @@ /* Some things in here probably don't need to be done each time. */ static void platinum_set_hardware(struct fb_info_platinum *pinfo) { - volatile struct platinum_regs *platinum_regs = pinfo->platinum_regs; - volatile struct cmap_regs *cmap_regs = pinfo->cmap_regs; + volatile struct platinum_regs __iomem *platinum_regs = pinfo->platinum_regs; + volatile struct cmap_regs __iomem *cmap_regs = pinfo->cmap_regs; struct platinum_regvals *init; int i; int vmode, cmode; @@ -312,7 +312,7 @@ info->fbops = &platinumfb_ops; info->pseudo_palette = pinfo->pseudo_palette; info->flags = FBINFO_DEFAULT; - info->screen_base = (char *) pinfo->frame_buffer + 0x20; + info->screen_base = pinfo->frame_buffer + 0x20; fb_alloc_cmap(&info->cmap, 256, 0); @@ -404,7 +404,7 @@ */ static int read_platinum_sense(struct fb_info_platinum *info) { - volatile struct platinum_regs *platinum_regs = info->platinum_regs; + volatile struct platinum_regs __iomem *platinum_regs = info->platinum_regs; int sense; out_be32(&platinum_regs->reg[23].r, 7); /* turn off drivers */ @@ -637,10 +637,10 @@ size = dp->addrs[i].size; release_mem_region(addr, size); } - iounmap((void *)pinfo->frame_buffer); - iounmap((void *)pinfo->platinum_regs); + iounmap(pinfo->frame_buffer); + iounmap(pinfo->platinum_regs); release_mem_region(pinfo->cmap_regs_phys, 0x1000); - iounmap((void *)pinfo->cmap_regs); + iounmap(pinfo->cmap_regs); framebuffer_release(info); diff -Nru a/drivers/video/pxafb.c b/drivers/video/pxafb.c --- a/drivers/video/pxafb.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/video/pxafb.c 2004-11-29 21:22:07 -08:00 @@ -653,6 +653,7 @@ static void pxafb_setup_gpio(struct pxafb_info *fbi) { + int gpio, ldd_bits; unsigned int lccr0 = fbi->lccr0; /* @@ -663,49 +664,31 @@ if ((lccr0 & LCCR0_CMS) == LCCR0_Mono && (lccr0 & LCCR0_SDS) == LCCR0_Sngl && (lccr0 & LCCR0_DPD) == LCCR0_4PixMono) - { - // bits 58-61 - GPDR1 |= (0xf << 26); - GAFR1_U = (GAFR1_U & ~(0xff << 20)) | (0xaa << 20); - - // bits 74-77 - GPDR2 |= (0xf << 10); - GAFR2_L = (GAFR2_L & ~(0xff << 20)) | (0xaa << 20); - } + ldd_bits = 4; /* 8 bit interface */ else if (((lccr0 & LCCR0_CMS) == LCCR0_Mono && ((lccr0 & LCCR0_SDS) == LCCR0_Dual || (lccr0 & LCCR0_DPD) == LCCR0_8PixMono)) || ((lccr0 & LCCR0_CMS) == LCCR0_Color && (lccr0 & LCCR0_PAS) == LCCR0_Pas && (lccr0 & LCCR0_SDS) == LCCR0_Sngl)) - { - // bits 58-65 - GPDR1 |= (0x3f << 26); - GPDR2 |= (0x3); - - GAFR1_U = (GAFR1_U & ~(0xfff << 20)) | (0xaaa << 20); - GAFR2_L = (GAFR2_L & ~0xf) | (0xa); - - // bits 74-77 - GPDR2 |= (0xf << 10); - GAFR2_L = (GAFR2_L & ~(0xff << 20)) | (0xaa << 20); - } + ldd_bits = 8; /* 16 bit interface */ else if ((lccr0 & LCCR0_CMS) == LCCR0_Color && ((lccr0 & LCCR0_SDS) == LCCR0_Dual || (lccr0 & LCCR0_PAS) == LCCR0_Act)) - { - // bits 58-77 - GPDR1 |= (0x3f << 26); - GPDR2 |= 0x00003fff; - - GAFR1_U = (GAFR1_U & ~(0xfff << 20)) | (0xaaa << 20); - GAFR2_L = (GAFR2_L & 0xf0000000) | 0x0aaaaaaa; - } + ldd_bits = 16; else { printk(KERN_ERR "pxafb_setup_gpio: unable to determine bits per pixel\n"); + return; } + + for (gpio = 58; ldd_bits; gpio++, ldd_bits--) + pxa_gpio_mode(gpio | GPIO_ALT_FN_2_OUT); + pxa_gpio_mode(GPIO74_LCD_FCLK_MD); + pxa_gpio_mode(GPIO75_LCD_LCLK_MD); + pxa_gpio_mode(GPIO76_LCD_PCLK_MD); + pxa_gpio_mode(GPIO77_LCD_ACBIAS_MD); } static void pxafb_enable_controller(struct pxafb_info *fbi) diff -Nru a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c --- a/drivers/video/riva/fbdev.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/video/riva/fbdev.c 2004-11-29 21:22:08 -08:00 @@ -192,6 +192,8 @@ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_700XGL, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, + { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO_5200, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, { 0, } /* terminate list */ }; MODULE_DEVICE_TABLE(pci, rivafb_pci_tbl); @@ -444,6 +446,8 @@ bg = le16_to_cpu(bg); fg = le16_to_cpu(fg); + w = (w + 1) & ~1; + for (i = 0; i < h; i++) { b = *data++; reverse_order(&b); @@ -1108,7 +1112,8 @@ } if (!strictmode) { - if (!fb_validate_mode(var, info)) + if (!info->monspecs.vfmax || !info->monspecs.hfmax || + !info->monspecs.dclkmax || !fb_validate_mode(var, info)) mode_valid = 1; } @@ -1577,6 +1582,10 @@ u16 fg, bg; int i, set = cursor->set; + if (cursor->image.width > MAX_CURS || + cursor->image.height > MAX_CURS) + return soft_cursor(info, cursor); + par->riva.ShowHideCursor(&par->riva, 0); if (par->cursor_reset) { @@ -1606,38 +1615,46 @@ u32 d_pitch = MAX_CURS/8; u8 *dat = (u8 *) cursor->image.data; u8 *msk = (u8 *) cursor->mask; - u8 src[64]; - - switch (cursor->rop) { - case ROP_XOR: - for (i = 0; i < s_pitch * cursor->image.height; - i++) - src[i] = dat[i] ^ msk[i]; - break; - case ROP_COPY: - default: - for (i = 0; i < s_pitch * cursor->image.height; - i++) - src[i] = dat[i] & msk[i]; - break; - } + u8 *src; - fb_sysmove_buf_aligned(info, &info->pixmap, data, d_pitch, src, - s_pitch, cursor->image.height); - - bg = ((info->cmap.red[bg_idx] & 0xf8) << 7) | - ((info->cmap.green[bg_idx] & 0xf8) << 2) | - ((info->cmap.blue[bg_idx] & 0xf8) >> 3) | 1 << 15; - - fg = ((info->cmap.red[fg_idx] & 0xf8) << 7) | - ((info->cmap.green[fg_idx] & 0xf8) << 2) | - ((info->cmap.blue[fg_idx] & 0xf8) >> 3) | 1 << 15; + src = kmalloc(s_pitch * cursor->image.height, GFP_ATOMIC); - par->riva.LockUnlock(&par->riva, 0); + if (src) { + switch (cursor->rop) { + case ROP_XOR: + for (i = 0; i < s_pitch * cursor->image.height; + i++) + src[i] = dat[i] ^ msk[i]; + break; + case ROP_COPY: + default: + for (i = 0; i < s_pitch * cursor->image.height; + i++) + src[i] = dat[i] & msk[i]; + break; + } - rivafb_load_cursor_image(par, data, bg, fg, - cursor->image.width, - cursor->image.height); + fb_sysmove_buf_aligned(info, &info->pixmap, data, + d_pitch, src, s_pitch, + cursor->image.height); + + bg = ((info->cmap.red[bg_idx] & 0xf8) << 7) | + ((info->cmap.green[bg_idx] & 0xf8) << 2) | + ((info->cmap.blue[bg_idx] & 0xf8) >> 3) | + 1 << 15; + + fg = ((info->cmap.red[fg_idx] & 0xf8) << 7) | + ((info->cmap.green[fg_idx] & 0xf8) << 2) | + ((info->cmap.blue[fg_idx] & 0xf8) >> 3) | + 1 << 15; + + par->riva.LockUnlock(&par->riva, 0); + + rivafb_load_cursor_image(par, data, bg, fg, + cursor->image.width, + cursor->image.height); + kfree(src); + } } if (cursor->enable) @@ -1880,31 +1897,37 @@ { struct riva_par *default_par; struct fb_info *info; + int ret; NVTRACE_ENTER(); assert(pd != NULL); info = framebuffer_alloc(sizeof(struct riva_par), &pd->dev); - - if (!info) - goto err_out; - + if (!info) { + printk (KERN_ERR PFX "could not allocate memory\n"); + ret = -ENOMEM; + goto err_ret; + } default_par = (struct riva_par *) info->par; default_par->pdev = pd; info->pixmap.addr = kmalloc(8 * 1024, GFP_KERNEL); - if (info->pixmap.addr == NULL) - goto err_out_kfree; + if (info->pixmap.addr == NULL) { + ret = -ENOMEM; + goto err_framebuffer_release; + } memset(info->pixmap.addr, 0, 8 * 1024); - if (pci_enable_device(pd)) { + ret = pci_enable_device(pd); + if (ret < 0) { printk(KERN_ERR PFX "cannot enable PCI device\n"); - goto err_out_enable; + goto err_free_pixmap; } - if (pci_request_regions(pd, "rivafb")) { + ret = pci_request_regions(pd, "rivafb"); + if (ret < 0) { printk(KERN_ERR PFX "cannot request PCI regions\n"); - goto err_out_request; + goto err_disable_device; } default_par->riva.Architecture = riva_get_arch(pd); @@ -1918,7 +1941,8 @@ if(default_par->riva.Architecture == 0) { printk(KERN_ERR PFX "unknown NV_ARCH\n"); - goto err_out_free_base0; + ret=-ENODEV; + goto err_release_region; } if(default_par->riva.Architecture == NV_ARCH_10 || default_par->riva.Architecture == NV_ARCH_20 || @@ -1952,11 +1976,10 @@ rivafb_fix.mmio_len); if (!default_par->ctrl_base) { printk(KERN_ERR PFX "cannot ioremap MMIO base\n"); - goto err_out_free_base0; + ret = -EIO; + goto err_release_region; } - info->par = default_par; - switch (default_par->riva.Architecture) { case NV_ARCH_03: /* Riva128's PRAMIN is in the "framebuffer" space @@ -1966,7 +1989,8 @@ default_par->riva.PRAMIN = ioremap(rivafb_fix.smem_start + 0x00C00000, 0x00008000); if (!default_par->riva.PRAMIN) { printk(KERN_ERR PFX "cannot ioremap PRAMIN region\n"); - goto err_out_free_nv3_pramin; + ret = -EIO; + goto err_iounmap_ctrl_base; } break; case NV_ARCH_04: @@ -1992,7 +2016,8 @@ rivafb_fix.smem_len); if (!info->screen_base) { printk(KERN_ERR PFX "cannot ioremap FB base\n"); - goto err_out_free_base1; + ret = -EIO; + goto err_iounmap_pramin; } #ifdef CONFIG_MTRR @@ -2015,17 +2040,19 @@ riva_get_EDID(info, pd); riva_get_edidinfo(info); - if (riva_set_fbinfo(info) < 0) { + ret=riva_set_fbinfo(info); + if (ret < 0) { printk(KERN_ERR PFX "error setting initial video mode\n"); - goto err_out_iounmap_fb; + goto err_iounmap_screen_base; } fb_destroy_modedb(info->monspecs.modedb); info->monspecs.modedb = NULL; - if (register_framebuffer(info) < 0) { + ret = register_framebuffer(info); + if (ret < 0) { printk(KERN_ERR PFX "error registering riva framebuffer\n"); - goto err_out_iounmap_fb; + goto err_iounmap_screen_base; } pci_set_drvdata(pd, info); @@ -2044,26 +2071,26 @@ NVTRACE_LEAVE(); return 0; -err_out_iounmap_fb: +err_iounmap_screen_base: #ifdef CONFIG_FB_RIVA_I2C riva_delete_i2c_busses((struct riva_par *) info->par); #endif iounmap(info->screen_base); -err_out_free_base1: +err_iounmap_pramin: if (default_par->riva.Architecture == NV_ARCH_03) iounmap(default_par->riva.PRAMIN); -err_out_free_nv3_pramin: +err_iounmap_ctrl_base: iounmap(default_par->ctrl_base); -err_out_free_base0: +err_release_region: pci_release_regions(pd); -err_out_request: +err_disable_device: pci_disable_device(pd); -err_out_enable: +err_free_pixmap: kfree(info->pixmap.addr); -err_out_kfree: +err_framebuffer_release: framebuffer_release(info); -err_out: - return -ENODEV; +err_ret: + return ret; } static void __exit rivafb_remove(struct pci_dev *pd) @@ -2183,9 +2210,9 @@ module_param(noaccel, bool, 0); MODULE_PARM_DESC(noaccel, "bool: disable acceleration"); -module_param(flatpanel, int, -1); +module_param(flatpanel, int, 0); MODULE_PARM_DESC(flatpanel, "Enables experimental flat panel support for some chipsets. (0 or 1=enabled) (default=0)"); -module_param(forceCRTC, int, -1); +module_param(forceCRTC, int, 0); MODULE_PARM_DESC(forceCRTC, "Forces usage of a particular CRTC in case autodetection fails. (0 or 1) (default=autodetect)"); #ifdef CONFIG_MTRR module_param(nomtrr, bool, 0); diff -Nru a/drivers/video/riva/riva_hw.c b/drivers/video/riva/riva_hw.c --- a/drivers/video/riva/riva_hw.c 2004-11-29 21:22:09 -08:00 +++ b/drivers/video/riva/riva_hw.c 2004-11-29 21:22:09 -08:00 @@ -641,10 +641,8 @@ { int b = fifo_data.graphics_burst_size >> 4; *burst = 0; - while (b) { + while (b >>= 1) (*burst)++; - b >>= 1; - } *lwm = fifo_data.graphics_lwm >> 3; } else @@ -834,10 +832,8 @@ { int b = fifo_data.graphics_burst_size >> 4; *burst = 0; - while (b) { + while (b >>= 1) (*burst)++; - b >>= 1; - } *lwm = fifo_data.graphics_lwm >> 3; } } @@ -1101,10 +1097,8 @@ { int b = fifo_data.graphics_burst_size >> 4; *burst = 0; - while (b) { + while (b >>= 1) (*burst)++; - b >>= 1; - } *lwm = fifo_data.graphics_lwm >> 3; } } @@ -1155,10 +1149,8 @@ { int b = fifo_data.graphics_burst_size >> 4; *burst = 0; - while (b) { + while (b >>= 1) (*burst)++; - b >>= 1; - } *lwm = fifo_data.graphics_lwm >> 3; } } @@ -1556,7 +1548,7 @@ NV_WR32(chip->PGRAPH, 0x0000085C, state->pitch3); NV_WR32(chip->PGRAPH, 0x00000860, state->pitch3); NV_WR32(chip->PGRAPH, 0x00000864, state->pitch3); - NV_WR32(chip->PGRAPH, 0x000009A, NV_RD32(chip->PFB, 0x00000200)); + NV_WR32(chip->PGRAPH, 0x000009A4, NV_RD32(chip->PFB, 0x00000200)); NV_WR32(chip->PGRAPH, 0x000009A8, NV_RD32(chip->PFB, 0x00000204)); } if(chip->twoHeads) { diff -Nru a/drivers/video/savage/savagefb-i2c.c b/drivers/video/savage/savagefb-i2c.c --- a/drivers/video/savage/savagefb-i2c.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/video/savage/savagefb-i2c.c 2004-11-29 21:22:08 -08:00 @@ -141,32 +141,37 @@ static int savage_setup_i2c_bus(struct savagefb_i2c_chan *chan, const char *name) { - int rc; + int (*add_bus)(struct i2c_adapter *) = symbol_get(i2c_bit_add_bus); + int rc = 0; + + if (add_bus && chan->par) { + strcpy(chan->adapter.name, name); + chan->adapter.owner = THIS_MODULE; + chan->adapter.id = I2C_ALGO_SAVAGE; + chan->adapter.algo_data = &chan->algo; + chan->adapter.dev.parent = &chan->par->pcidev->dev; + chan->algo.udelay = 40; + chan->algo.mdelay = 5; + chan->algo.timeout = 20; + chan->algo.data = chan; + + i2c_set_adapdata(&chan->adapter, chan); + + /* Raise SCL and SDA */ + chan->algo.setsda(chan, 1); + chan->algo.setscl(chan, 1); + udelay(20); + + rc = add_bus(&chan->adapter); + if (rc == 0) + dev_dbg(&chan->par->pcidev->dev, + "I2C bus %s registered.\n", name); + else + dev_warn(&chan->par->pcidev->dev, + "Failed to register I2C bus %s.\n", name); + } else + chan->par = NULL; - strcpy(chan->adapter.name, name); - chan->adapter.owner = THIS_MODULE; - chan->adapter.id = I2C_ALGO_SAVAGE; - chan->adapter.algo_data = &chan->algo; - chan->adapter.dev.parent = &chan->par->pcidev->dev; - chan->algo.udelay = 40; - chan->algo.mdelay = 5; - chan->algo.timeout = 20; - chan->algo.data = chan; - - i2c_set_adapdata(&chan->adapter, chan); - - /* Raise SCL and SDA */ - chan->algo.setsda(chan, 1); - chan->algo.setscl(chan, 1); - udelay(20); - - rc = i2c_bit_add_bus(&chan->adapter); - if (rc == 0) - dev_dbg(&chan->par->pcidev->dev, - "I2C bus %s registered.\n", name); - else - dev_warn(&chan->par->pcidev->dev, - "Failed to register I2C bus %s.\n", name); return rc; } @@ -193,6 +198,8 @@ par->chan.algo.getsda = savage4_gpio_getsda; par->chan.algo.getscl = savage4_gpio_getscl; break; + default: + par->chan.par = NULL; } savage_setup_i2c_bus(&par->chan, "SAVAGE DDC2"); @@ -202,9 +209,12 @@ void savagefb_delete_i2c_busses(struct fb_info *info) { struct savagefb_par *par = (struct savagefb_par *)info->par; + int (*del_bus)(struct i2c_adapter *) = + symbol_get(i2c_bit_del_bus); + + if (del_bus && par->chan.par) + del_bus(&par->chan.adapter); - if (par->chan.par) - i2c_bit_del_bus(&par->chan.adapter); par->chan.par = NULL; } EXPORT_SYMBOL(savagefb_delete_i2c_busses); @@ -212,6 +222,8 @@ static u8 *savage_do_probe_i2c_edid(struct savagefb_i2c_chan *chan) { u8 start = 0x0; + int (*transfer)(struct i2c_adapter *, struct i2c_msg *, int) = + symbol_get(i2c_transfer); struct i2c_msg msgs[] = { { .addr = SAVAGE_DDC, @@ -223,20 +235,23 @@ .len = EDID_LENGTH, }, }; - u8 *buf; + u8 *buf = NULL; - buf = kmalloc(EDID_LENGTH, GFP_KERNEL); - if (!buf) { - dev_warn(&chan->par->pcidev->dev, "Out of memory!\n"); - return NULL; + if (transfer && chan->par) { + buf = kmalloc(EDID_LENGTH, GFP_KERNEL); + if (buf) { + msgs[1].buf = buf; + + if (transfer(&chan->adapter, msgs, 2) != 2) { + dev_dbg(&chan->par->pcidev->dev, + "Unable to read EDID block.\n"); + kfree(buf); + buf = NULL; + } + } } - msgs[1].buf = buf; - if (i2c_transfer(&chan->adapter, msgs, 2) == 2) - return buf; - dev_dbg(&chan->par->pcidev->dev, "Unable to read EDID block.\n"); - kfree(buf); - return NULL; + return buf; } int savagefb_probe_i2c_connector(struct savagefb_par *par, u8 **out_edid) diff -Nru a/drivers/video/savage/savagefb.c b/drivers/video/savage/savagefb.c --- a/drivers/video/savage/savagefb.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/video/savage/savagefb.c 2004-11-29 21:22:07 -08:00 @@ -719,7 +719,8 @@ return -EINVAL; } - if (!fb_validate_mode(var, info)) + if (!info->monspecs.hfmax || !info->monspecs.vfmax || + !info->monspecs.dclkmax || !fb_validate_mode(var, info)) mode_valid = 1; /* calculate modeline if supported by monitor */ @@ -738,7 +739,7 @@ } } - if (!mode_valid && !list_empty(&info->modelist)) + if (!mode_valid && info->monspecs.modedb_len) return -EINVAL; /* Is the mode larger than the LCD panel? */ @@ -1797,63 +1798,63 @@ switch (info->fix.accel) { case FB_ACCEL_SUPERSAVAGE: par->chip = S3_SUPERSAVAGE; - snprintf (info->fix.id, 16, "S3 SuperSavage"); + snprintf (info->fix.id, 16, "SuperSavage"); break; case FB_ACCEL_SAVAGE4: par->chip = S3_SAVAGE4; - snprintf (info->fix.id, 16, "S3 Savage4"); + snprintf (info->fix.id, 16, "Savage4"); break; case FB_ACCEL_SAVAGE3D: par->chip = S3_SAVAGE3D; - snprintf (info->fix.id, 16, "S3 Savage3D"); + snprintf (info->fix.id, 16, "Savage3D"); break; case FB_ACCEL_SAVAGE3D_MV: par->chip = S3_SAVAGE3D; - snprintf (info->fix.id, 16, "S3 Savage3D-MV"); + snprintf (info->fix.id, 16, "Savage3D-MV"); break; case FB_ACCEL_SAVAGE2000: par->chip = S3_SAVAGE2000; - snprintf (info->fix.id, 16, "S3 Savage2000"); + snprintf (info->fix.id, 16, "Savage2000"); break; case FB_ACCEL_SAVAGE_MX_MV: par->chip = S3_SAVAGE_MX; - snprintf (info->fix.id, 16, "S3 Savage/MX-MV"); + snprintf (info->fix.id, 16, "Savage/MX-MV"); break; case FB_ACCEL_SAVAGE_MX: par->chip = S3_SAVAGE_MX; - snprintf (info->fix.id, 16, "S3 Savage/MX"); + snprintf (info->fix.id, 16, "Savage/MX"); break; case FB_ACCEL_SAVAGE_IX_MV: par->chip = S3_SAVAGE_MX; - snprintf (info->fix.id, 16, "S3 Savage/IX-MV"); + snprintf (info->fix.id, 16, "Savage/IX-MV"); break; case FB_ACCEL_SAVAGE_IX: par->chip = S3_SAVAGE_MX; - snprintf (info->fix.id, 16, "S3 Savage/IX"); + snprintf (info->fix.id, 16, "Savage/IX"); break; case FB_ACCEL_PROSAVAGE_PM: par->chip = S3_PROSAVAGE; - snprintf (info->fix.id, 16, "S3 ProSavage"); + snprintf (info->fix.id, 16, "ProSavagePM"); break; case FB_ACCEL_PROSAVAGE_KM: par->chip = S3_PROSAVAGE; - snprintf (info->fix.id, 16, "S3 ProSavage"); + snprintf (info->fix.id, 16, "ProSavageKM"); break; case FB_ACCEL_S3TWISTER_P: par->chip = S3_PROSAVAGE; - snprintf (info->fix.id, 16, "S3 Twister"); + snprintf (info->fix.id, 16, "TwisterP"); break; case FB_ACCEL_S3TWISTER_K: par->chip = S3_PROSAVAGE; - snprintf (info->fix.id, 16, "S3 TwisterK"); + snprintf (info->fix.id, 16, "TwisterK"); break; case FB_ACCEL_PROSAVAGE_DDR: par->chip = S3_PROSAVAGE; - snprintf (info->fix.id, 16, "S3 ProSavage DDR"); + snprintf (info->fix.id, 16, "ProSavageDDR"); break; case FB_ACCEL_PROSAVAGE_DDRK: par->chip = S3_PROSAVAGE; - snprintf (info->fix.id, 16, "S3 ProSavage DDR-K"); + snprintf (info->fix.id, 16, "ProSavage8"); break; } @@ -1878,7 +1879,8 @@ info->fbops = &savagefb_ops; info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN | - FBINFO_HWACCEL_XPAN; + FBINFO_HWACCEL_XPAN | + FBINFO_MISC_MODESWITCHLATE; info->pseudo_palette = par->pseudo_palette; @@ -2029,14 +2031,13 @@ fb_destroy_modedb(info->monspecs.modedb); - info->monspecs.modedb_len = 0; info->monspecs.modedb = NULL; err = register_framebuffer (info); if (err < 0) goto failed; - printk (KERN_INFO "fb: %s frame buffer device\n", + printk (KERN_INFO "fb: S3 %s frame buffer device\n", info->fix.id); /* diff -Nru a/drivers/video/sbuslib.c b/drivers/video/sbuslib.c --- a/drivers/video/sbuslib.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/video/sbuslib.c 2004-11-29 21:22:07 -08:00 @@ -52,7 +52,7 @@ off = vma->vm_pgoff << PAGE_SHIFT; /* To stop the swapper from even considering these pages */ - vma->vm_flags |= (VM_SHM | VM_IO | VM_LOCKED); + vma->vm_flags |= (VM_IO | VM_RESERVED); /* Each page, see which map applies */ for (page = 0; page < size; ){ diff -Nru a/drivers/video/softcursor.c b/drivers/video/softcursor.c --- a/drivers/video/softcursor.c 2004-11-29 21:22:07 -08:00 +++ b/drivers/video/softcursor.c 2004-11-29 21:22:07 -08:00 @@ -28,16 +28,17 @@ if (info->state != FBINFO_STATE_RUNNING) return 0; - src = kmalloc(64 + sizeof(struct fb_image), GFP_ATOMIC); + s_pitch = (cursor->image.width + 7) >> 3; + dsize = s_pitch * cursor->image.height; + src = kmalloc(dsize + sizeof(struct fb_image), GFP_ATOMIC); if (!src) return -ENOMEM; - image = (struct fb_image *) (src + 64); + image = (struct fb_image *) (src + dsize); *image = cursor->image; - s_pitch = (image->width + 7) >> 3; - dsize = s_pitch * image->height; d_pitch = (s_pitch + scan_align) & ~scan_align; + size = d_pitch * image->height + buf_align; size &= ~buf_align; dst = fb_get_buffer_offset(info, &info->pixmap, size); diff -Nru a/drivers/video/tcx.c b/drivers/video/tcx.c --- a/drivers/video/tcx.c 2004-11-29 21:22:06 -08:00 +++ b/drivers/video/tcx.c 2004-11-29 21:22:06 -08:00 @@ -106,10 +106,10 @@ struct tcx_par { spinlock_t lock; - struct bt_regs *bt; - struct tcx_thc *thc; - struct tcx_tec *tec; - volatile u32 *cplane; + struct bt_regs __iomem *bt; + struct tcx_thc __iomem *thc; + struct tcx_tec __iomem *tec; + volatile u32 __iomem *cplane; u32 flags; #define TCX_FLAG_BLANKED 0x00000001 @@ -127,7 +127,7 @@ /* Reset control plane so that WID is 8-bit plane. */ static void __tcx_set_control_plane (struct tcx_par *par) { - volatile u32 *p, *pend; + volatile u32 __iomem *p, *pend; if (par->lowdepth) return; @@ -167,7 +167,7 @@ unsigned transp, struct fb_info *info) { struct tcx_par *par = (struct tcx_par *) info->par; - struct bt_regs *bt = par->bt; + struct bt_regs __iomem *bt = par->bt; unsigned long flags; if (regno >= 256) @@ -198,7 +198,7 @@ tcx_blank(int blank, struct fb_info *info) { struct tcx_par *par = (struct tcx_par *) info->par; - struct tcx_thc *thc = par->thc; + struct tcx_thc __iomem *thc = par->thc; unsigned long flags; u32 val; @@ -371,19 +371,15 @@ all->info.var.xres); all->par.fbsize = PAGE_ALIGN(linebytes * all->info.var.yres); - all->par.tec = (struct tcx_tec *) - sbus_ioremap(&sdev->resource[7], 0, + all->par.tec = sbus_ioremap(&sdev->resource[7], 0, sizeof(struct tcx_tec), "tcx tec"); - all->par.thc = (struct tcx_thc *) - sbus_ioremap(&sdev->resource[9], 0, + all->par.thc = sbus_ioremap(&sdev->resource[9], 0, sizeof(struct tcx_thc), "tcx thc"); - all->par.bt = (struct bt_regs *) - sbus_ioremap(&sdev->resource[8], 0, + all->par.bt = sbus_ioremap(&sdev->resource[8], 0, sizeof(struct bt_regs), "tcx dac"); memcpy(&all->par.mmap_map, &__tcx_mmap_map, sizeof(all->par.mmap_map)); if (!all->par.lowdepth) { - all->par.cplane = (volatile u32 *) - sbus_ioremap(&sdev->resource[4], 0, + all->par.cplane = sbus_ioremap(&sdev->resource[4], 0, all->par.fbsize * sizeof(u32), "tcx cplane"); } else { all->par.mmap_map[1].size = SBUS_MMAP_EMPTY; @@ -415,12 +411,11 @@ all->info.flags = FBINFO_DEFAULT; all->info.fbops = &tcx_ops; #ifdef CONFIG_SPARC32 - all->info.screen_base = (char *) + all->info.screen_base = (char __iomem *) prom_getintdefault(sdev->prom_node, "address", 0); #endif if (!all->info.screen_base) - all->info.screen_base = (char *) - sbus_ioremap(&sdev->resource[0], 0, + all->info.screen_base = sbus_ioremap(&sdev->resource[0], 0, all->par.fbsize, "tcx ram"); all->info.par = &all->par; diff -Nru a/drivers/video/tgafb.c b/drivers/video/tgafb.c --- a/drivers/video/tgafb.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/video/tgafb.c 2004-11-29 21:22:08 -08:00 @@ -562,7 +562,8 @@ unsigned long rincr, line_length, shift, pos, is8bpp; unsigned long i, j; const unsigned char *data; - void *regs_base, *fb_base; + void __iomem *regs_base; + void __iomem *fb_base; dx = image->dx; dy = image->dy; @@ -785,7 +786,8 @@ int is8bpp = info->var.bits_per_pixel == 8; u32 dx, dy, width, height, vxres, vyres, color; unsigned long pos, align, line_length, i, j; - void *regs_base, *fb_base; + void __iomem *regs_base; + void __iomem *fb_base; dx = rect->dx; dy = rect->dy; @@ -912,7 +914,7 @@ u32 height, u32 width) { struct tga_par *par = (struct tga_par *) info->par; - void *tga_regs = par->tga_regs_base; + void __iomem *tga_regs = par->tga_regs_base; unsigned long dpos, spos, i, n64; /* Set up the MODE and PIXELSHIFT registers. */ @@ -957,9 +959,10 @@ u32 height, u32 width) { struct tga_par *par = (struct tga_par *) info->par; - void *tga_regs = par->tga_regs_base; - void *tga_fb = par->tga_fb_base; - void *src, *dst; + void __iomem *tga_regs = par->tga_regs_base; + void __iomem *tga_fb = par->tga_fb_base; + void __iomem *src; + void __iomem *dst; unsigned long i, n16; /* Set up the MODE and PIXELSHIFT registers. */ @@ -1010,7 +1013,8 @@ u32 smask_first, dmask_first, dmask_last; int pixel_shift, need_prime, need_second; unsigned long n64, n32, xincr_first; - void *tga_regs, *tga_fb; + void __iomem *tga_regs; + void __iomem *tga_fb; yincr = line_length; if (dy > sy) { @@ -1098,7 +1102,8 @@ for (i = 0; i < height; ++i) { unsigned long j; - void *sfb, *dfb; + void __iomem *sfb; + void __iomem *dfb; sfb = tga_fb + spos; dfb = tga_fb + dpos; @@ -1120,7 +1125,7 @@ dfb += 32; } - if (n64 && (((long)sfb | (long)dfb) & 63)) + if (n64 && (((unsigned long)sfb | (unsigned long)dfb) & 63)) printk(KERN_ERR "tgafb: misaligned copy64 (s:%p, d:%p)\n", sfb, dfb); @@ -1169,7 +1174,8 @@ unsigned long depos, sepos, dealign, sealign; u32 mask_first, mask_last; unsigned long n32; - void *tga_regs, *tga_fb; + void __iomem *tga_regs; + void __iomem *tga_fb; yincr = line_length; if (dy > sy) { @@ -1223,7 +1229,8 @@ for (i = 0; i < height; ++i) { unsigned long j; - void *sfb, *dfb; + void __iomem *sfb; + void __iomem *dfb; sfb = tga_fb + sepos; dfb = tga_fb + depos; @@ -1380,7 +1387,7 @@ u32 pseudo_palette[16]; } *all; - void *mem_base; + void __iomem *mem_base; unsigned long bar0_start, bar0_len; u8 tga_type; int ret; @@ -1429,7 +1436,7 @@ all->info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_FILLRECT; all->info.fbops = &tgafb_ops; - all->info.screen_base = (char *) all->par.tga_fb_base; + all->info.screen_base = all->par.tga_fb_base; all->info.par = &all->par; all->info.pseudo_palette = all->pseudo_palette; diff -Nru a/drivers/video/valkyriefb.c b/drivers/video/valkyriefb.c --- a/drivers/video/valkyriefb.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/video/valkyriefb.c 2004-11-29 21:22:08 -08:00 @@ -89,13 +89,13 @@ struct fb_info_valkyrie { struct fb_info info; struct fb_par_valkyrie par; - struct cmap_regs *cmap_regs; + struct cmap_regs __iomem *cmap_regs; unsigned long cmap_regs_phys; - struct valkyrie_regs *valkyrie_regs; + struct valkyrie_regs __iomem *valkyrie_regs; unsigned long valkyrie_regs_phys; - __u8 *frame_buffer; + __u8 __iomem *frame_buffer; unsigned long frame_buffer_phys; int sense; @@ -142,7 +142,7 @@ static int valkyriefb_set_par(struct fb_info *info) { struct fb_info_valkyrie *p = (struct fb_info_valkyrie *) info; - volatile struct valkyrie_regs *valkyrie_regs = p->valkyrie_regs; + volatile struct valkyrie_regs __iomem *valkyrie_regs = p->valkyrie_regs; struct fb_par_valkyrie *par = info->par; struct valkyrie_regvals *init; int err; @@ -232,7 +232,7 @@ u_int transp, struct fb_info *info) { struct fb_info_valkyrie *p = (struct fb_info_valkyrie *) info; - volatile struct cmap_regs *cmap_regs = p->cmap_regs; + volatile struct cmap_regs __iomem *cmap_regs = p->cmap_regs; struct fb_par_valkyrie *par = info->par; if (regno > 255) @@ -341,21 +341,23 @@ cmap_regs_phys = 0x50f24000; flags = IOMAP_NOCACHE_SER; /* IOMAP_WRITETHROUGH?? */ #else /* ppc (!CONFIG_MAC) */ - struct device_node *dp; + { + struct device_node *dp; - dp = find_devices("valkyrie"); - if (dp == 0) - return 0; - - if (dp->n_addrs != 1) { - printk(KERN_ERR "expecting 1 address for valkyrie (got %d)\n", - dp->n_addrs); - return 0; + dp = find_devices("valkyrie"); + if (dp == 0) + return 0; + + if (dp->n_addrs != 1) { + printk(KERN_ERR "expecting 1 address for valkyrie (got %d)\n", + dp->n_addrs); + return 0; + } + + frame_buffer_phys = dp->addrs[0].address; + cmap_regs_phys = dp->addrs[0].address+0x304000; + flags = _PAGE_WRITETHRU; } - - frame_buffer_phys = dp->addrs[0].address; - cmap_regs_phys = dp->addrs[0].address+0x304000; - flags = _PAGE_WRITETHRU; #endif /* ppc (!CONFIG_MAC) */ p = kmalloc(sizeof(*p), GFP_ATOMIC); @@ -544,7 +546,7 @@ static void __init valkyrie_init_info(struct fb_info *info, struct fb_info_valkyrie *p) { info->fbops = &valkyriefb_ops; - info->screen_base = (char *) p->frame_buffer + 0x1000; + info->screen_base = p->frame_buffer + 0x1000; info->flags = FBINFO_DEFAULT; info->pseudo_palette = p->pseudo_palette; fb_alloc_cmap(&info->cmap, 256, 0); diff -Nru a/drivers/w1/matrox_w1.c b/drivers/w1/matrox_w1.c --- a/drivers/w1/matrox_w1.c 2004-11-29 21:22:08 -08:00 +++ b/drivers/w1/matrox_w1.c 2004-11-29 21:22:08 -08:00 @@ -78,11 +78,13 @@ struct matrox_device { - unsigned long base_addr; - unsigned long port_index, port_data; + void __iomem *base_addr; + void __iomem *port_index; + void __iomem *port_data; u8 data_mask; - unsigned long phys_addr, virt_addr; + unsigned long phys_addr; + void __iomem *virt_addr; unsigned long found; struct w1_bus_master *bus_master; @@ -181,8 +183,7 @@ dev->phys_addr = pci_resource_start(pdev, 1); - dev->virt_addr = - (unsigned long) ioremap_nocache(dev->phys_addr, 16384); + dev->virt_addr = ioremap_nocache(dev->phys_addr, 16384); if (!dev->virt_addr) { dev_err(&pdev->dev, "%s: failed to ioremap(0x%lx, %d).\n", __func__, dev->phys_addr, 16384); @@ -227,7 +228,7 @@ if (dev->found) { w1_remove_master_device(dev->bus_master); - iounmap((void *) dev->virt_addr); + iounmap(dev->virt_addr); } kfree(dev); } diff -Nru a/fs/binfmt_aout.c b/fs/binfmt_aout.c --- a/fs/binfmt_aout.c 2004-11-29 21:22:06 -08:00 +++ b/fs/binfmt_aout.c 2004-11-29 21:22:06 -08:00 @@ -43,13 +43,18 @@ .min_coredump = PAGE_SIZE }; -static void set_brk(unsigned long start, unsigned long end) +#define BAD_ADDR(x) ((unsigned long)(x) >= TASK_SIZE) + +static int set_brk(unsigned long start, unsigned long end) { start = PAGE_ALIGN(start); end = PAGE_ALIGN(end); - if (end <= start) - return; - do_brk(start, end - start); + if (end > start) { + unsigned long addr = do_brk(start, end - start); + if (BAD_ADDR(addr)) + return addr; + } + return 0; } /* @@ -413,7 +418,11 @@ beyond_if: set_binfmt(&aout_format); - set_brk(current->mm->start_brk, current->mm->brk); + retval = set_brk(current->mm->start_brk, current->mm->brk); + if (retval < 0) { + send_sig(SIGKILL, current, 0); + return retval; + } retval = setup_arg_pages(bprm, EXSTACK_DEFAULT); if (retval < 0) { diff -Nru a/fs/binfmt_elf.c b/fs/binfmt_elf.c --- a/fs/binfmt_elf.c 2004-11-29 21:22:07 -08:00 +++ b/fs/binfmt_elf.c 2004-11-29 21:22:07 -08:00 @@ -576,7 +576,8 @@ */ retval = -ENOMEM; - if (elf_ppnt->p_filesz > PATH_MAX) + if (elf_ppnt->p_filesz > PATH_MAX || + elf_ppnt->p_filesz == 0) goto out_free_file; elf_interpreter = (char *) kmalloc(elf_ppnt->p_filesz, GFP_KERNEL); @@ -592,7 +593,9 @@ goto out_free_interp; } /* make sure path is NULL terminated */ - elf_interpreter[elf_ppnt->p_filesz - 1] = '\0'; + retval = -EINVAL; + if (elf_interpreter[elf_ppnt->p_filesz - 1] != '\0') + goto out_free_interp; /* If the program interpreter is one of these two, * then assume an iBCS2 image. Otherwise assume diff -Nru a/fs/bio.c b/fs/bio.c --- a/fs/bio.c 2004-11-29 21:22:07 -08:00 +++ b/fs/bio.c 2004-11-29 21:22:07 -08:00 @@ -461,11 +461,10 @@ bmd->userptr = (void __user *) uaddr; + ret = -ENOMEM; bio = bio_alloc(GFP_KERNEL, end - start); - if (!bio) { - bio_free_map_data(bmd); - return ERR_PTR(-ENOMEM); - } + if (!bio) + goto out_bmd; bio->bi_rw |= (!write_to_vm << BIO_RW); @@ -519,6 +518,8 @@ __free_page(bvec->bv_page); bio_put(bio); +out_bmd: + bio_free_map_data(bmd); return ERR_PTR(ret); } diff -Nru a/fs/char_dev.c b/fs/char_dev.c --- a/fs/char_dev.c 2004-11-29 21:22:07 -08:00 +++ b/fs/char_dev.c 2004-11-29 21:22:07 -08:00 @@ -417,6 +417,7 @@ void cdev_init(struct cdev *cdev, struct file_operations *fops) { + memset(cdev, 0, sizeof *cdev); INIT_LIST_HEAD(&cdev->list); cdev->kobj.ktype = &ktype_cdev_default; kobject_init(&cdev->kobj); diff -Nru a/fs/compat.c b/fs/compat.c --- a/fs/compat.c 2004-11-29 21:22:07 -08:00 +++ b/fs/compat.c 2004-11-29 21:22:07 -08:00 @@ -541,14 +541,7 @@ set_fs(KERNEL_DS); ret = sys_fcntl(fd, cmd, (unsigned long)&f); set_fs(old_fs); - if ((cmd == F_GETLK) && (ret == 0)) { - /* POSIX-2001 now defines negative l_len */ - if (f.l_len < 0) { - f.l_start += f.l_len; - f.l_len = -f.l_len; - } - if (f.l_start < 0) - return -EINVAL; + if (cmd == F_GETLK && ret == 0) { if ((f.l_start >= COMPAT_OFF_T_MAX) || ((f.l_start + f.l_len) > COMPAT_OFF_T_MAX)) ret = -EOVERFLOW; @@ -569,14 +562,7 @@ ((cmd == F_SETLK64) ? F_SETLK : F_SETLKW), (unsigned long)&f); set_fs(old_fs); - if ((cmd == F_GETLK64) && (ret == 0)) { - /* POSIX-2001 now defines negative l_len */ - if (f.l_len < 0) { - f.l_start += f.l_len; - f.l_len = -f.l_len; - } - if (f.l_start < 0) - return -EINVAL; + if (cmd == F_GETLK64 && ret == 0) { if ((f.l_start >= COMPAT_LOFF_T_MAX) || ((f.l_start + f.l_len) > COMPAT_LOFF_T_MAX)) ret = -EOVERFLOW; diff -Nru a/fs/dcache.c b/fs/dcache.c --- a/fs/dcache.c 2004-11-29 21:22:06 -08:00 +++ b/fs/dcache.c 2004-11-29 21:22:06 -08:00 @@ -279,14 +279,18 @@ /** * d_find_alias - grab a hashed alias of inode * @inode: inode in question + * @want_discon: flag, used by d_splice_alias, to request + * that only a DISCONNECTED alias be returned. * - * If inode has a hashed alias - acquire the reference to alias and - * return it. Otherwise return NULL. Notice that if inode is a directory - * there can be only one alias and it can be unhashed only if it has - * no children. + * If inode has a hashed alias, or is a directory and has any alias, + * acquire the reference to alias and return it. Otherwise return NULL. + * Notice that if inode is a directory there can be only one alias and + * it can be unhashed only if it has no children, or if it is the root + * of a filesystem. * * If the inode has a DCACHE_DISCONNECTED alias, then prefer - * any other hashed alias over that one. + * any other hashed alias over that one unless @want_discon is set, + * in which case only return a DCACHE_DISCONNECTED alias. */ static struct dentry * __d_find_alias(struct inode *inode, int want_discon) @@ -301,7 +305,7 @@ next = tmp->next; prefetch(next); alias = list_entry(tmp, struct dentry, d_alias); - if (!d_unhashed(alias)) { + if (S_ISDIR(inode->i_mode) || !d_unhashed(alias)) { if (alias->d_flags & DCACHE_DISCONNECTED) discon_alias = alias; else if (!want_discon) { diff -Nru a/fs/dquot.c b/fs/dquot.c --- a/fs/dquot.c 2004-11-29 21:22:08 -08:00 +++ b/fs/dquot.c 2004-11-29 21:22:08 -08:00 @@ -758,7 +758,7 @@ dquot->dq_dqb.dqb_curinodes -= number; else dquot->dq_dqb.dqb_curinodes = 0; - if (dquot->dq_dqb.dqb_curinodes < dquot->dq_dqb.dqb_isoftlimit) + if (dquot->dq_dqb.dqb_curinodes <= dquot->dq_dqb.dqb_isoftlimit) dquot->dq_dqb.dqb_itime = (time_t) 0; clear_bit(DQ_INODES_B, &dquot->dq_flags); } @@ -769,7 +769,7 @@ dquot->dq_dqb.dqb_curspace -= number; else dquot->dq_dqb.dqb_curspace = 0; - if (toqb(dquot->dq_dqb.dqb_curspace) < dquot->dq_dqb.dqb_bsoftlimit) + if (toqb(dquot->dq_dqb.dqb_curspace) <= dquot->dq_dqb.dqb_bsoftlimit) dquot->dq_dqb.dqb_btime = (time_t) 0; clear_bit(DQ_BLKS_B, &dquot->dq_flags); } diff -Nru a/fs/efs/namei.c b/fs/efs/namei.c --- a/fs/efs/namei.c 2004-11-29 21:22:08 -08:00 +++ b/fs/efs/namei.c 2004-11-29 21:22:08 -08:00 @@ -75,3 +75,36 @@ return NULL; } +struct dentry *efs_get_parent(struct dentry *child) +{ + struct dentry *parent; + struct inode *inode; + efs_ino_t ino; + int error; + + lock_kernel(); + + error = -ENOENT; + ino = efs_find_entry(child->d_inode, "..", 2); + if (!ino) + goto fail; + + error = -EACCES; + inode = iget(child->d_inode->i_sb, ino); + if (!inode) + goto fail; + + error = -ENOMEM; + parent = d_alloc_anon(inode); + if (!parent) + goto fail_iput; + + unlock_kernel(); + return parent; + + fail_iput: + iput(inode); + fail: + unlock_kernel(); + return ERR_PTR(error); +} diff -Nru a/fs/efs/super.c b/fs/efs/super.c --- a/fs/efs/super.c 2004-11-29 21:22:08 -08:00 +++ b/fs/efs/super.c 2004-11-29 21:22:08 -08:00 @@ -95,6 +95,10 @@ .remount_fs = efs_remount, }; +static struct export_operations efs_export_ops = { + .get_parent = efs_get_parent, +}; + static int __init init_efs_fs(void) { int err; printk("EFS: "EFS_VERSION" - http://aeschi.ch.eu.org/efs/\n"); @@ -278,6 +282,7 @@ s->s_flags |= MS_RDONLY; } s->s_op = &efs_superblock_operations; + s->s_export_op = &efs_export_ops; root = iget(s, EFS_ROOTINODE); s->s_root = d_alloc_root(root); diff -Nru a/fs/exec.c b/fs/exec.c --- a/fs/exec.c 2004-11-29 21:22:07 -08:00 +++ b/fs/exec.c 2004-11-29 21:22:07 -08:00 @@ -342,7 +342,7 @@ unsigned long stack_base; struct vm_area_struct *mpnt; struct mm_struct *mm = current->mm; - int i; + int i, ret; long arg_size; #ifdef CONFIG_STACK_GROWSUP @@ -433,7 +433,11 @@ mpnt->vm_flags = VM_STACK_FLAGS; mpnt->vm_flags |= mm->def_flags; mpnt->vm_page_prot = protection_map[mpnt->vm_flags & 0x7]; - insert_vm_struct(mm, mpnt); + if ((ret = insert_vm_struct(mm, mpnt))) { + up_write(&mm->mmap_sem); + kmem_cache_free(vm_area_cachep, mpnt); + return ret; + } mm->stack_vm = mm->total_vm = vma_pages(mpnt); } diff -Nru a/fs/ext3/ioctl.c b/fs/ext3/ioctl.c --- a/fs/ext3/ioctl.c 2004-11-29 21:22:07 -08:00 +++ b/fs/ext3/ioctl.c 2004-11-29 21:22:07 -08:00 @@ -155,7 +155,7 @@ case EXT3_IOC_GETRSVSZ: if (test_opt(inode->i_sb, RESERVATION) && S_ISREG(inode->i_mode)) { rsv_window_size = atomic_read(&ei->i_rsv_window.rsv_goal_size); - return put_user(rsv_window_size, (int *)arg); + return put_user(rsv_window_size, (int __user *)arg); } return -ENOTTY; case EXT3_IOC_SETRSVSZ: @@ -168,7 +168,7 @@ if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER)) return -EACCES; - if (get_user(rsv_window_size, (int *)arg)) + if (get_user(rsv_window_size, (int __user *)arg)) return -EFAULT; if (rsv_window_size > EXT3_MAX_RESERVE_BLOCKS) @@ -186,7 +186,7 @@ if (IS_RDONLY(inode)) return -EROFS; - if (get_user(n_blocks_count, (__u32 *)arg)) + if (get_user(n_blocks_count, (__u32 __user *)arg)) return -EFAULT; err = ext3_group_extend(sb, EXT3_SB(sb)->s_es, n_blocks_count); @@ -207,7 +207,7 @@ if (IS_RDONLY(inode)) return -EROFS; - if (copy_from_user(&input, (struct ext3_new_group_input *)arg, + if (copy_from_user(&input, (struct ext3_new_group_input __user *)arg, sizeof(input))) return -EFAULT; diff -Nru a/fs/jffs2/gc.c b/fs/jffs2/gc.c --- a/fs/jffs2/gc.c 2004-11-29 21:22:07 -08:00 +++ b/fs/jffs2/gc.c 2004-11-29 21:22:07 -08:00 @@ -7,7 +7,7 @@ * * For licensing information, see the file 'LICENCE' in this directory. * - * $Id: gc.c,v 1.137 2004/07/20 13:44:55 dwmw2 Exp $ + * $Id: gc.c,v 1.140 2004/11/13 10:59:22 dedekind Exp $ * */ @@ -628,6 +628,7 @@ jffs2_free_raw_node_ref(nraw); } + jffs2_free_raw_node_ref(nraw); if (!ret) ret = -EIO; goto out_node; @@ -637,10 +638,12 @@ /* Link into per-inode list. This is safe because of the ic state being INO_STATE_GC. Note that if we're doing this - for an inode which is in-code, the 'nraw' pointer is then + for an inode which is in-core, the 'nraw' pointer is then going to be fetched from ic->nodes by our caller. */ + spin_lock(&c->erase_completion_lock); nraw->next_in_ino = ic->nodes; ic->nodes = nraw; + spin_unlock(&c->erase_completion_lock); jffs2_mark_node_obsolete(c, raw); D1(printk(KERN_DEBUG "WHEEE! GC REF_PRISTINE node at 0x%08x succeeded\n", ref_offset(raw))); @@ -828,7 +831,7 @@ continue; } if (retlen != rawlen) { - printk(KERN_WARNING "jffs2_g_c_deletion_dirent(): Short read (%zd not %zd) reading header from obsolete node at %08x\n", + printk(KERN_WARNING "jffs2_g_c_deletion_dirent(): Short read (%zd not %u) reading header from obsolete node at %08x\n", retlen, rawlen, ref_offset(raw)); continue; } diff -Nru a/fs/jffs2/nodelist.c b/fs/jffs2/nodelist.c --- a/fs/jffs2/nodelist.c 2004-11-29 21:22:07 -08:00 +++ b/fs/jffs2/nodelist.c 2004-11-29 21:22:07 -08:00 @@ -7,7 +7,7 @@ * * For licensing information, see the file 'LICENCE' in this directory. * - * $Id: nodelist.c,v 1.86 2003/10/31 15:37:51 dwmw2 Exp $ + * $Id: nodelist.c,v 1.87 2004/11/14 17:07:07 dedekind Exp $ * */ @@ -96,7 +96,7 @@ /* Get tmp_dnode_info and full_dirent for all non-obsolete nodes associated with this ino, returning the former in order of version */ -int jffs2_get_inode_nodes(struct jffs2_sb_info *c, ino_t ino, struct jffs2_inode_info *f, +int jffs2_get_inode_nodes(struct jffs2_sb_info *c, struct jffs2_inode_info *f, struct jffs2_tmp_dnode_info **tnp, struct jffs2_full_dirent **fdp, uint32_t *highest_version, uint32_t *latest_mctime, uint32_t *mctime_ver) @@ -104,16 +104,15 @@ struct jffs2_raw_node_ref *ref = f->inocache->nodes; struct jffs2_tmp_dnode_info *tn, *ret_tn = NULL; struct jffs2_full_dirent *fd, *ret_fd = NULL; - union jffs2_node_union node; size_t retlen; int err; *mctime_ver = 0; - - D1(printk(KERN_DEBUG "jffs2_get_inode_nodes(): ino #%lu\n", ino)); + + D1(printk(KERN_DEBUG "jffs2_get_inode_nodes(): ino #%u\n", f->inocache->ino)); if (!f->inocache->nodes) { - printk(KERN_WARNING "Eep. no nodes for ino #%lu\n", (unsigned long)ino); + printk(KERN_WARNING "Eep. no nodes for ino #%u\n", f->inocache->ino); } spin_lock(&c->erase_completion_lock); diff -Nru a/fs/jffs2/nodelist.h b/fs/jffs2/nodelist.h --- a/fs/jffs2/nodelist.h 2004-11-29 21:22:08 -08:00 +++ b/fs/jffs2/nodelist.h 2004-11-29 21:22:08 -08:00 @@ -7,7 +7,7 @@ * * For licensing information, see the file 'LICENCE' in this directory. * - * $Id: nodelist.h,v 1.120 2004/10/07 15:11:54 havasi Exp $ + * $Id: nodelist.h,v 1.121 2004/11/14 17:07:07 dedekind Exp $ * */ @@ -398,7 +398,7 @@ /* nodelist.c */ D1(void jffs2_print_frag_list(struct jffs2_inode_info *f)); void jffs2_add_fd_to_list(struct jffs2_sb_info *c, struct jffs2_full_dirent *new, struct jffs2_full_dirent **list); -int jffs2_get_inode_nodes(struct jffs2_sb_info *c, ino_t ino, struct jffs2_inode_info *f, +int jffs2_get_inode_nodes(struct jffs2_sb_info *c, struct jffs2_inode_info *f, struct jffs2_tmp_dnode_info **tnp, struct jffs2_full_dirent **fdp, uint32_t *highest_version, uint32_t *latest_mctime, uint32_t *mctime_ver); diff -Nru a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c --- a/fs/jffs2/readinode.c 2004-11-29 21:22:06 -08:00 +++ b/fs/jffs2/readinode.c 2004-11-29 21:22:06 -08:00 @@ -7,7 +7,7 @@ * * For licensing information, see the file 'LICENCE' in this directory. * - * $Id: readinode.c,v 1.113 2003/11/03 13:20:33 dwmw2 Exp $ + * $Id: readinode.c,v 1.114 2004/11/14 17:07:07 dedekind Exp $ * */ @@ -510,7 +510,7 @@ D1(printk(KERN_DEBUG "jffs2_do_read_inode_internal(): ino #%u nlink is %d\n", f->inocache->ino, f->inocache->nlink)); /* Grab all nodes relevant to this ino */ - ret = jffs2_get_inode_nodes(c, f->inocache->ino, f, &tn_list, &fd_list, &f->highest_version, &latest_mctime, &mctime_ver); + ret = jffs2_get_inode_nodes(c, f, &tn_list, &fd_list, &f->highest_version, &latest_mctime, &mctime_ver); if (ret) { printk(KERN_CRIT "jffs2_get_inode_nodes() for ino %u returned %d\n", f->inocache->ino, ret); diff -Nru a/fs/jffs2/super.c b/fs/jffs2/super.c --- a/fs/jffs2/super.c 2004-11-29 21:22:07 -08:00 +++ b/fs/jffs2/super.c 2004-11-29 21:22:07 -08:00 @@ -7,7 +7,7 @@ * * For licensing information, see the file 'LICENCE' in this directory. * - * $Id: super.c,v 1.100 2004/10/21 00:03:50 dwmw2 Exp $ + * $Id: super.c,v 1.102 2004/11/12 02:42:17 tpoynor Exp $ * */ @@ -56,6 +56,16 @@ } } +static int jffs2_sync_fs(struct super_block *sb, int wait) +{ + struct jffs2_sb_info *c = JFFS2_SB_INFO(sb); + + down(&c->alloc_sem); + jffs2_flush_wbuf_pad(c); + up(&c->alloc_sem); + return 0; +} + static struct super_operations jffs2_super_operations = { .alloc_inode = jffs2_alloc_inode, @@ -67,6 +77,7 @@ .remount_fs = jffs2_remount_fs, .clear_inode = jffs2_clear_inode, .dirty_inode = jffs2_dirty_inode, + .sync_fs = jffs2_sync_fs, }; static int jffs2_sb_compare(struct super_block *sb, void *data) diff -Nru a/fs/jffs2/write.c b/fs/jffs2/write.c --- a/fs/jffs2/write.c 2004-11-29 21:22:07 -08:00 +++ b/fs/jffs2/write.c 2004-11-29 21:22:07 -08:00 @@ -7,7 +7,7 @@ * * For licensing information, see the file 'LICENCE' in this directory. * - * $Id: write.c,v 1.85 2004/07/13 08:58:25 dwmw2 Exp $ + * $Id: write.c,v 1.86 2004/11/13 10:44:26 dedekind Exp $ * */ @@ -213,8 +213,10 @@ jffs2_add_physical_node_ref(c, raw); /* Link into per-inode list */ + spin_lock(&c->erase_completion_lock); raw->next_in_ino = f->inocache->nodes; f->inocache->nodes = raw; + spin_unlock(&c->erase_completion_lock); D1(printk(KERN_DEBUG "jffs2_write_dnode wrote node at 0x%08x(%d) with dsize 0x%x, csize 0x%x, node_crc 0x%08x, data_crc 0x%08x, totlen 0x%08x\n", flash_ofs, ref_flags(raw), je32_to_cpu(ri->dsize), @@ -333,8 +335,10 @@ raw->flash_offset |= REF_PRISTINE; jffs2_add_physical_node_ref(c, raw); + spin_lock(&c->erase_completion_lock); raw->next_in_ino = f->inocache->nodes; f->inocache->nodes = raw; + spin_unlock(&c->erase_completion_lock); if (retried) { ACCT_SANITY_CHECK(c,NULL); diff -Nru a/fs/lockd/Makefile b/fs/lockd/Makefile --- a/fs/lockd/Makefile 2004-11-29 21:22:06 -08:00 +++ b/fs/lockd/Makefile 2004-11-29 21:22:06 -08:00 @@ -5,6 +5,6 @@ obj-$(CONFIG_LOCKD) += lockd.o lockd-objs-y := clntlock.o clntproc.o host.o svc.o svclock.o svcshare.o \ - svcproc.o svcsubs.o mon.o xdr.o lockd_syms.o + svcproc.o svcsubs.o mon.o xdr.o lockd-objs-$(CONFIG_LOCKD_V4) += xdr4.o svc4proc.o lockd-objs := $(lockd-objs-y) diff -Nru a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c --- a/fs/lockd/clntproc.c 2004-11-29 21:22:08 -08:00 +++ b/fs/lockd/clntproc.c 2004-11-29 21:22:08 -08:00 @@ -7,6 +7,7 @@ */ #include +#include #include #include #include @@ -278,6 +279,7 @@ nlm_release_host(host); return status; } +EXPORT_SYMBOL(nlmclnt_proc); /* * Allocate an NLM RPC call struct diff -Nru a/fs/lockd/lockd_syms.c b/fs/lockd/lockd_syms.c --- a/fs/lockd/lockd_syms.c 2004-11-29 21:22:07 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,36 +0,0 @@ -/* - * linux/fs/lockd/lockd_syms.c - * - * Symbols exported by the lockd module. - * - * Authors: Olaf Kirch (okir@monad.swb.de) - * - * Copyright (C) 1997 Olaf Kirch - */ - -#include -#include - -#ifdef CONFIG_MODULES - -#include -#include -#include -#include -#include - -#include -#include -#include - -/* Start/stop the daemon */ -EXPORT_SYMBOL(lockd_up); -EXPORT_SYMBOL(lockd_down); - -/* NFS client entry */ -EXPORT_SYMBOL(nlmclnt_proc); - -/* NFS server entry points/hooks */ -EXPORT_SYMBOL(nlmsvc_ops); - -#endif /* CONFIG_MODULES */ diff -Nru a/fs/lockd/svc.c b/fs/lockd/svc.c --- a/fs/lockd/svc.c 2004-11-29 21:22:07 -08:00 +++ b/fs/lockd/svc.c 2004-11-29 21:22:07 -08:00 @@ -39,7 +39,10 @@ #define ALLOWED_SIGS (sigmask(SIGKILL)) extern struct svc_program nlmsvc_program; + struct nlmsvc_binding * nlmsvc_ops; +EXPORT_SYMBOL(nlmsvc_ops); + static DECLARE_MUTEX(nlmsvc_sema); static unsigned int nlmsvc_users; static pid_t nlmsvc_pid; @@ -270,6 +273,7 @@ up(&nlmsvc_sema); return error; } +EXPORT_SYMBOL(lockd_up); /* * Decrement the user count and bring down lockd if we're the last. @@ -311,6 +315,7 @@ out: up(&nlmsvc_sema); } +EXPORT_SYMBOL(lockd_down); /* * Sysctl parameters (same as module parameters, different interface). diff -Nru a/fs/namespace.c b/fs/namespace.c --- a/fs/namespace.c 2004-11-29 21:22:08 -08:00 +++ b/fs/namespace.c 2004-11-29 21:22:08 -08:00 @@ -423,6 +423,7 @@ down_write(&sb->s_umount); if (!(sb->s_flags & MS_RDONLY)) { lock_kernel(); + DQUOT_OFF(sb); retval = do_remount_sb(sb, MS_RDONLY, NULL, 0); unlock_kernel(); } diff -Nru a/fs/proc/base.c b/fs/proc/base.c --- a/fs/proc/base.c 2004-11-29 21:22:07 -08:00 +++ b/fs/proc/base.c 2004-11-29 21:22:07 -08:00 @@ -343,7 +343,7 @@ if (!mm) goto out; if (!mm->arg_end) - goto out; /* Shh! No looking before we're done */ + goto out_mm; /* Shh! No looking before we're done */ len = mm->arg_end - mm->arg_start; @@ -366,8 +366,8 @@ res = strnlen(buffer, res); } } +out_mm: mmput(mm); - out: return res; } diff -Nru a/fs/smbfs/inode.c b/fs/smbfs/inode.c --- a/fs/smbfs/inode.c 2004-11-29 21:22:06 -08:00 +++ b/fs/smbfs/inode.c 2004-11-29 21:22:06 -08:00 @@ -574,10 +574,10 @@ mnt->flags = (oldmnt->file_mode >> 9) | SMB_MOUNT_UID | SMB_MOUNT_GID | SMB_MOUNT_FMODE | SMB_MOUNT_DMODE; } else { - mnt->file_mode = mnt->dir_mode = S_IRWXU | S_IRGRP | S_IXGRP | - S_IROTH | S_IXOTH | S_IFREG; - mnt->dir_mode = mnt->dir_mode = S_IRWXU | S_IRGRP | S_IXGRP | - S_IROTH | S_IXOTH | S_IFDIR; + mnt->file_mode = S_IRWXU | S_IRGRP | S_IXGRP | + S_IROTH | S_IXOTH | S_IFREG; + mnt->dir_mode = S_IRWXU | S_IRGRP | S_IXGRP | + S_IROTH | S_IXOTH | S_IFDIR; if (parse_options(mnt, raw_data)) goto out_bad_option; } diff -Nru a/fs/smbfs/proc.c b/fs/smbfs/proc.c --- a/fs/smbfs/proc.c 2004-11-29 21:22:06 -08:00 +++ b/fs/smbfs/proc.c 2004-11-29 21:22:06 -08:00 @@ -2138,10 +2138,11 @@ if ( (server->mnt->flags & SMB_MOUNT_DMODE) && (S_ISDIR(fattr->f_mode)) ) - fattr->f_mode = (server->mnt->dir_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFDIR; + fattr->f_mode = (server->mnt->dir_mode & S_IRWXUGO) | S_IFDIR; else if ( (server->mnt->flags & SMB_MOUNT_FMODE) && !(S_ISDIR(fattr->f_mode)) ) - fattr->f_mode = (server->mnt->file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG; + fattr->f_mode = (server->mnt->file_mode & S_IRWXUGO) | + (fattr->f_mode & S_IFMT); } diff -Nru a/fs/sysfs/dir.c b/fs/sysfs/dir.c --- a/fs/sysfs/dir.c 2004-11-29 21:22:07 -08:00 +++ b/fs/sysfs/dir.c 2004-11-29 21:22:07 -08:00 @@ -268,7 +268,7 @@ void sysfs_remove_dir(struct kobject * kobj) { struct dentry * dentry = dget(kobj->dentry); - struct sysfs_dirent * parent_sd = dentry->d_fsdata; + struct sysfs_dirent * parent_sd; struct sysfs_dirent * sd, * tmp; if (!dentry) @@ -276,6 +276,7 @@ pr_debug("sysfs %s: removing dir\n",dentry->d_name.name); down(&dentry->d_inode->i_sem); + parent_sd = dentry->d_fsdata; list_for_each_entry_safe(sd, tmp, &parent_sd->s_children, s_sibling) { if (!sd->s_element || !(sd->s_type & SYSFS_NOT_PINNED)) continue; diff -Nru a/include/asm-alpha/io.h b/include/asm-alpha/io.h --- a/include/asm-alpha/io.h 2004-11-29 21:22:08 -08:00 +++ b/include/asm-alpha/io.h 2004-11-29 21:22:08 -08:00 @@ -631,16 +631,6 @@ iounmap(addr); } -static inline int -isa_check_signature(unsigned long offset, const unsigned char *sig, long len) -{ - void __iomem *addr = ioremap(offset, len); - int ret = check_signature(addr, sig, len); - iounmap(addr); - return ret; -} - - /* * The Alpha Jensen hardware for some rather strange reason puts * the RTC clock at 0x170 instead of 0x70. Probably due to some diff -Nru a/include/asm-arm/arch-ixp2000/dma.h b/include/asm-arm/arch-ixp2000/dma.h --- a/include/asm-arm/arch-ixp2000/dma.h 2004-11-29 21:22:08 -08:00 +++ b/include/asm-arm/arch-ixp2000/dma.h 2004-11-29 21:22:08 -08:00 @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/arch-ixdp2400/dma.h + * linux/include/asm-arm/arch-ixp2000/dma.h * * Copyright (C) 2002 Intel Corp. * diff -Nru a/include/asm-arm/arch-ixp2000/io.h b/include/asm-arm/arch-ixp2000/io.h --- a/include/asm-arm/arch-ixp2000/io.h 2004-11-29 21:22:06 -08:00 +++ b/include/asm-arm/arch-ixp2000/io.h 2004-11-29 21:22:06 -08:00 @@ -24,7 +24,7 @@ #define ___io(p) ((unsigned long)((p)+IXP2000_PCI_IO_VIRT_BASE)) /* - * IXP200 does not do proper byte-lane conversion for PCI addresses, + * IXP2000 does not do proper byte-lane conversion for PCI addresses, * so we need to override standard functions. */ #define alignb(addr) ((addr & ~3) + (3 - (addr & 3))) diff -Nru a/include/asm-arm/arch-ixp2000/irqs.h b/include/asm-arm/arch-ixp2000/irqs.h --- a/include/asm-arm/arch-ixp2000/irqs.h 2004-11-29 21:22:08 -08:00 +++ b/include/asm-arm/arch-ixp2000/irqs.h 2004-11-29 21:22:08 -08:00 @@ -28,7 +28,7 @@ * shift operation instead of having to map the IRQ number to * a HW IRQ number. */ -#define IRQ_IXP2000_SWI 0 /* soft interrupt */ +#define IRQ_IXP2000_SOFT_INT 0 /* soft interrupt */ #define IRQ_IXP2000_ERRSUM 1 /* OR of all bits in ErrorStatus reg*/ #define IRQ_IXP2000_UART 2 #define IRQ_IXP2000_GPIO 3 @@ -46,13 +46,12 @@ #define IRQ_IXP2000_PCI 15 /* PCI INTA or INTB */ #define IRQ_IXP2000_THDA0 16 /* thread 0-31A */ #define IRQ_IXP2000_THDA1 17 /* thread 32-63A */ -#define IRQ_IXP2000_THDA2 18 /* thread 64-95A */ -#define IRQ_IXP2000_THDA3 19 /* thread 96-127A */ -#define IRQ_IXP2000_THDB0 24 /* thread 0-31 B */ +#define IRQ_IXP2000_THDA2 18 /* thread 64-95A, IXP2800 only */ +#define IRQ_IXP2000_THDA3 19 /* thread 96-127A, IXP2800 only */ +#define IRQ_IXP2000_THDB0 24 /* thread 0-31B */ #define IRQ_IXP2000_THDB1 25 /* thread 32-63B */ -/* only 64 threads supported for IXP2400, rest or for IXP2800*/ -#define IRQ_IXP2000_THDB2 26 /* thread 64-95B */ -#define IRQ_IXP2000_THDB3 27 /* thread 96-127B */ +#define IRQ_IXP2000_THDB2 26 /* thread 64-95B, IXP2800 only */ +#define IRQ_IXP2000_THDB3 27 /* thread 96-127B, IXP2800 only */ /* define generic GPIOs */ #define IRQ_IXP2000_GPIO0 32 @@ -68,22 +67,7 @@ #define IRQ_IXP2000_PCIA 40 #define IRQ_IXP2000_PCIB 41 -/* Int sources from IRQ_ERROR_STATUS */ -#define IRQ_IXP2000_DRAM0_MIN_ERR 42 -#define IRQ_IXP2000_DRAM0_MAJ_ERR 43 -#define IRQ_IXP2000_DRAM1_MIN_ERR 44 -#define IRQ_IXP2000_DRAM1_MAJ_ERR 45 -#define IRQ_IXP2000_DRAM2_MIN_ERR 46 -#define IRQ_IXP2000_DRAM2_MAJ_ERR 47 -#define IRQ_IXP2000_SRAM0_ERR 48 -#define IRQ_IXP2000_SRAM1_ERR 49 -#define IRQ_IXP2000_SRAM2_ERR 50 -#define IRQ_IXP2000_SRAM3_ERR 51 -#define IRQ_IXP2000_MEDIA_ERR 52 -#define IRQ_IXP2000_PCI_ERR 53 -#define IRQ_IXP2000_SP_INT 54 - -#define NR_IXP2000_IRQS 55 +#define NR_IXP2000_IRQS 42 #define IXP2000_BOARD_IRQ(x) (NR_IXP2000_IRQS + (x)) diff -Nru a/include/asm-arm/arch-ixp2000/ixdp2x00.h b/include/asm-arm/arch-ixp2000/ixdp2x00.h --- a/include/asm-arm/arch-ixp2000/ixdp2x00.h 2004-11-29 21:22:06 -08:00 +++ b/include/asm-arm/arch-ixp2000/ixdp2x00.h 2004-11-29 21:22:06 -08:00 @@ -53,7 +53,7 @@ /* * PCI devfns for on-board devices. We need these to be able to - * properly translte IRQs and for device removal. + * properly translate IRQs and for device removal. */ #define IXDP2400_SLAVE_ENET_DEVFN 0x18 /* Bus 1 */ #define IXDP2400_MASTER_ENET_DEVFN 0x20 /* Bus 1 */ diff -Nru a/include/asm-arm/arch-ixp2000/ixdp2x01.h b/include/asm-arm/arch-ixp2000/ixdp2x01.h --- a/include/asm-arm/arch-ixp2000/ixdp2x01.h 2004-11-29 21:22:06 -08:00 +++ b/include/asm-arm/arch-ixp2000/ixdp2x01.h 2004-11-29 21:22:06 -08:00 @@ -50,4 +50,8 @@ #define IXDP2X01_UART_CLK 1843200 +#define IXDP2X01_GPIO_I2C_ENABLE 0x02 +#define IXDP2X01_GPIO_SCL 0x07 +#define IXDP2X01_GPIO_SDA 0x06 + #endif /* __IXDP2x01_H__ */ diff -Nru a/include/asm-arm/arch-ixp2000/ixp2000-regs.h b/include/asm-arm/arch-ixp2000/ixp2000-regs.h --- a/include/asm-arm/arch-ixp2000/ixp2000-regs.h 2004-11-29 21:22:06 -08:00 +++ b/include/asm-arm/arch-ixp2000/ixp2000-regs.h 2004-11-29 21:22:06 -08:00 @@ -115,7 +115,7 @@ /* * Mask of valid IRQs in the 32-bit IRQ register. We use - * this to mark certain IRQs as being in-valid. + * this to mark certain IRQs as being invalid. */ #define IXP2000_VALID_IRQ_MASK 0x0f0fffff @@ -251,7 +251,7 @@ #define SLOWPORT_CCR_DIV_30 0x0f /* - * PCR values. PCR configure the mode of the interfac3 + * PCR values. PCR configure the mode of the interface. */ #define SLOWPORT_MODE_FLASH 0x00 #define SLOWPORT_MODE_LUCENT 0x01 @@ -260,7 +260,7 @@ #define SLOWPORT_MODE_MOTOROLA_UP 0x04 /* - * ADC values. Defines data and address bus widths + * ADC values. Defines data and address bus widths. */ #define SLOWPORT_ADDR_WIDTH_8 0x00 #define SLOWPORT_ADDR_WIDTH_16 0x01 @@ -272,7 +272,7 @@ #define SLOWPORT_DATA_WIDTH_32 0x30 /* - * Masks and shifts for various fields in the WTC and RTC registers + * Masks and shifts for various fields in the WTC and RTC registers. */ #define SLOWPORT_WRTC_MASK_HD 0x0003 #define SLOWPORT_WRTC_MASK_SU 0x003c @@ -284,7 +284,7 @@ /* - * GPIO registers & GPIO interface + * GPIO registers & GPIO interface. */ #define IXP2000_GPIO_REG(x) ((volatile unsigned long*)(IXP2000_GPIO_VIRT_BASE+(x))) #define IXP2000_GPIO_PLR IXP2000_GPIO_REG(0x00) diff -Nru a/include/asm-arm/arch-ixp2000/platform.h b/include/asm-arm/arch-ixp2000/platform.h --- a/include/asm-arm/arch-ixp2000/platform.h 2004-11-29 21:22:06 -08:00 +++ b/include/asm-arm/arch-ixp2000/platform.h 2004-11-29 21:22:06 -08:00 @@ -16,10 +16,10 @@ #ifndef __ASSEMBLY__ /* - * The IXP2400 B0 silicon contains an errata that causes writes to - * on-chip I/O register to not complete fully. What this means is + * The IXP2400 B0 silicon contains an erratum (#66) that causes writes + * to on-chip I/O register to not complete fully. What this means is * that if you have a write to on-chip I/O followed by a back-to-back - * read or write, the first write will happend twice. OR...if it's + * read or write, the first write will happen twice. OR...if it's * not a back-to-back trasaction, the read or write will generate * incorrect data. * diff -Nru a/include/asm-arm/arch-ixp2000/system.h b/include/asm-arm/arch-ixp2000/system.h --- a/include/asm-arm/arch-ixp2000/system.h 2004-11-29 21:22:07 -08:00 +++ b/include/asm-arm/arch-ixp2000/system.h 2004-11-29 21:22:07 -08:00 @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/arch-ixp2400/system.h + * linux/include/asm-arm/arch-ixp2000/system.h * * Copyright (C) 2002 Intel Corp. * diff -Nru a/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h b/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h --- a/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h 2004-11-29 21:22:06 -08:00 +++ b/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h 2004-11-29 21:22:06 -08:00 @@ -55,7 +55,7 @@ * PCI Config registers */ #define IXP4XX_PCI_CFG_BASE_PHYS (0xC0000000) -#define IXP4XX_PCI_CFG_BASE_VIRT (0xFFBFD000) +#define IXP4XX_PCI_CFG_BASE_VIRT (0xFFBFE000) #define IXP4XX_PCI_CFG_REGION_SIZE (0x00001000) /* 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-11-29 21:22:08 -08:00 +++ b/include/asm-arm/arch-s3c2410/regs-gpio.h 2004-11-29 21:22:08 -08:00 @@ -16,6 +16,8 @@ * 20-07-2004 BJD Added GPIO pin numbers, added Port A definitions * 04-10-2004 BJD Fixed number of bugs, added EXT IRQ filter defs * 17-10-2004 BJD Added GSTATUS1 register definitions + * 18-11-2004 BJD Fixed definitions of GPE3, GPE4, GPE5 and GPE6 + * 18-11-2004 BJD Added S3C2440 AC97 controls */ @@ -424,12 +426,14 @@ #define S3C2410_GPE3_INP (0x00 << 6) #define S3C2410_GPE3_OUTP (0x01 << 6) #define S3C2410_GPE3_I2SSDI (0x02 << 6) +#define S3C2410_GPE3_nSS0 (0x03 << 6) #define S3C2410_GPE3_MASK (0x03 << 6) #define S3C2410_GPE4 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 4) #define S3C2410_GPE4_INP (0x00 << 8) #define S3C2410_GPE4_OUTP (0x01 << 8) #define S3C2410_GPE4_I2SSDO (0x02 << 8) +#define S3C2410_GPE4_I2SSDI (0x03 << 8) #define S3C2410_GPE4_MASK (0x03 << 8) #define S3C2410_GPE5 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 5) @@ -440,12 +444,12 @@ #define S3C2410_GPE6 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 6) #define S3C2410_GPE6_INP (0x00 << 12) #define S3C2410_GPE6_OUTP (0x01 << 12) -#define S3C2410_GPE6_SDCLK (0x02 << 12) +#define S3C2410_GPE6_SDCMD (0x02 << 12) #define S3C2410_GPE7 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 7) #define S3C2410_GPE7_INP (0x00 << 14) #define S3C2410_GPE7_OUTP (0x01 << 14) -#define S3C2410_GPE7_SDCMD (0x02 << 14) +#define S3C2410_GPE7_SDDAT0 (0x02 << 14) #define S3C2410_GPE8 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 8) #define S3C2410_GPE8_INP (0x00 << 16) @@ -488,6 +492,12 @@ #define S3C2410_GPE15_OUTP (0x01 << 30) #define S3C2410_GPE15_IICSDA (0x02 << 30) #define S3C2410_GPE15_MASK (0x03 << 30) + +#define S3C2440_GPE0_ACSYNC (0x03 << 0) +#define S3C2440_GPE1_ACBITCLK (0x03 << 2) +#define S3C2440_GPE2_ACRESET (0x03 << 4) +#define S3C2440_GPE3_ACIN (0x03 << 6) +#define S3C2440_GPE4_ACOUT (0x03 << 8) #define S3C2410_GPE_PUPDIS(x) (1<<(x)) diff -Nru a/include/asm-arm/arch-s3c2410/regs-sdi.h b/include/asm-arm/arch-s3c2410/regs-sdi.h --- a/include/asm-arm/arch-s3c2410/regs-sdi.h 2004-11-29 21:22:06 -08:00 +++ b/include/asm-arm/arch-s3c2410/regs-sdi.h 2004-11-29 21:22:06 -08:00 @@ -11,6 +11,8 @@ * * Changelog: * 18-Aug-2004 Ben Dooks Created initial file + * 29-Nov-2004 Koen Martens Added some missing defines, fixed duplicates + * 29-Nov-2004 Ben Dooks Updated Koen's patch */ #ifndef __ASM_ARM_REGS_SDI @@ -62,8 +64,10 @@ #define S3C2410_SDIDCON_WIDEBUS (1<<16) #define S3C2410_SDIDCON_DMAEN (1<<15) #define S3C2410_SDIDCON_STOP (1<<14) +#define S3C2410_SDIDCON_DATMODE (3<<12) +#define S3C2410_SDIDCON_BLKNUM (0x7ff) -#define S3C2410_SDIDCON_XFER_MASK (3<<12) +/* constants for S3C2410_SDIDCON_DATMODE */ #define S3C2410_SDIDCON_XFER_READY (0<<12) #define S3C2410_SDIDCON_XFER_CHKSTART (1<<12) #define S3C2410_SDIDCON_XFER_RXSTART (2<<12) @@ -73,22 +77,23 @@ #define S3C2410_SDIDSTA_RDYWAITREQ (1<<10) #define S3C2410_SDIDSTA_SDIOIRQDETECT (1<<9) -#define S3C2410_SDIDSTA_FIFOFAIL (1<<8) +#define S3C2410_SDIDSTA_FIFOFAIL (1<<8) /* reserved on 2440 */ #define S3C2410_SDIDSTA_CRCFAIL (1<<7) #define S3C2410_SDIDSTA_RXCRCFAIL (1<<6) #define S3C2410_SDIDSTA_DATATIMEOUT (1<<5) #define S3C2410_SDIDSTA_XFERFINISH (1<<4) #define S3C2410_SDIDSTA_BUSYFINISH (1<<3) +#define S3C2410_SDIDSTA_SBITERR (1<<2) /* reserved on 2410a/2440 */ #define S3C2410_SDIDSTA_TXDATAON (1<<1) #define S3C2410_SDIDSTA_RXDATAON (1<<0) -#define S3C2410_SDIFSTA_TXFULL (1<<13) -#define S3C2410_SDIFSTA_RXFULL (1<<12) +#define S3C2410_SDIFSTA_TFDET (1<<13) +#define S3C2410_SDIFSTA_RFDET (1<<12) #define S3C2410_SDIFSTA_TXHALF (1<<11) #define S3C2410_SDIFSTA_TXEMPTY (1<<10) -#define S3C2410_SDIFSTA_RXLAST (1<<9) -#define S3C2410_SDIFSTA_RXFULL (1<<8) -#define S3C2410_SDIFSTA_RXHALF (1<<7) +#define S3C2410_SDIFSTA_RFLAST (1<<9) +#define S3C2410_SDIFSTA_RFFULL (1<<8) +#define S3C2410_SDIFSTA_RFHALF (1<<7) #define S3C2410_SDIFSTA_COUNTMASK (0x7f) #define S3C2410_SDIIMSK_RESPONSECRC (1<<17) @@ -103,6 +108,7 @@ #define S3C2410_SDIIMSK_DATATIMEOUT (1<<8) #define S3C2410_SDIIMSK_DATAFINISH (1<<7) #define S3C2410_SDIIMSK_BUSYFINISH (1<<6) +#define S3C2410_SDIIMSK_SBITERR (1<<5) /* reserved 2440/2410a */ #define S3C2410_SDIIMSK_TXFIFOHALF (1<<4) #define S3C2410_SDIIMSK_TXFIFOEMPTY (1<<3) #define S3C2410_SDIIMSK_RXFIFOLAST (1<<2) diff -Nru a/include/asm-arm/arch-s3c2410/regs-serial.h b/include/asm-arm/arch-s3c2410/regs-serial.h --- a/include/asm-arm/arch-s3c2410/regs-serial.h 2004-11-29 21:22:07 -08:00 +++ b/include/asm-arm/arch-s3c2410/regs-serial.h 2004-11-29 21:22:07 -08:00 @@ -68,6 +68,12 @@ #define S3C2410_LCON_STOPB (1<<2) #define S3C2410_LCON_IRM (1<<6) +#define S3C2440_UCON_CLKMASK (3<<10) +#define S3C2440_UCON_PCLK (0<<10) +#define S3C2440_UCON_UCLK (1<<10) +#define S3C2440_UCON_PCLK2 (2<<10) +#define S3C2440_UCON_FCLK (3<<10) + #define S3C2410_UCON_UCLK (1<<10) #define S3C2410_UCON_SBREAK (1<<4) @@ -77,19 +83,35 @@ #define S3C2410_UCON_RXIRQMODE (1<<0) #define S3C2410_UCON_RXFIFO_TOI (1<<7) -#define S3C2410_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | S3C2410_UCON_RXILEVEL \ - | S3C2410_UCON_TXIRQMODE | S3C2410_UCON_RXIRQMODE \ - | S3C2410_UCON_RXFIFO_TOI) +#define S3C2410_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ + S3C2410_UCON_RXILEVEL | \ + S3C2410_UCON_TXIRQMODE | \ + S3C2410_UCON_RXIRQMODE | \ + S3C2410_UCON_RXFIFO_TOI) #define S3C2410_UFCON_FIFOMODE (1<<0) #define S3C2410_UFCON_TXTRIG0 (0<<6) #define S3C2410_UFCON_RXTRIG8 (1<<4) #define S3C2410_UFCON_RXTRIG12 (2<<4) +/* S3C2440 FIFO trigger levels */ +#define S3C2440_UFCON_RXTRIG1 (0<<4) +#define S3C2440_UFCON_RXTRIG8 (1<<4) +#define S3C2440_UFCON_RXTRIG16 (2<<4) +#define S3C2440_UFCON_RXTRIG32 (3<<4) + +#define S3C2440_UFCON_TXTRIG0 (0<<6) +#define S3C2440_UFCON_TXTRIG16 (1<<6) +#define S3C2440_UFCON_TXTRIG32 (2<<6) +#define S3C2440_UFCON_TXTRIG48 (3<<6) + #define S3C2410_UFCON_RESETBOTH (3<<1) +#define S3C2410_UFCON_RESETTX (1<<2) +#define S3C2410_UFCON_RESETRX (1<<1) -#define S3C2410_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | S3C2410_UFCON_TXTRIG0 \ - | S3C2410_UFCON_RXTRIG8 ) +#define S3C2410_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \ + S3C2410_UFCON_TXTRIG0 | \ + S3C2410_UFCON_RXTRIG8 ) #define S3C2410_UFSTAT_TXFULL (1<<9) #define S3C2410_UFSTAT_RXFULL (1<<8) @@ -111,32 +133,36 @@ #define S3C2410_UERSTAT_OVERRUN (1<<0) #define S3C2410_UERSTAT_FRAME (1<<2) -#define S3C2410_UERSTAT_ANY (S3C2410_UERSTAT_OVERRUN | S3C2410_UERSTAT_FRAME) - -/* fifo size information */ - -#ifndef __ASSEMBLY__ -static inline int S3C2410_UFCON_RXC(int fcon) -{ - if (fcon & S3C2410_UFSTAT_RXFULL) - return 16; - - return ((fcon) & S3C2410_UFSTAT_RXMASK) >> S3C2410_UFSTAT_RXSHIFT; -} - -static inline int S3C2410_UFCON_TXC(int fcon) -{ - if (fcon & S3C2410_UFSTAT_TXFULL) - return 16; - - return ((fcon) & S3C2410_UFSTAT_TXMASK) >> S3C2410_UFSTAT_TXSHIFT; -} -#endif /* __ASSEMBLY__ */ +#define S3C2410_UERSTAT_BREAK (1<<3) +#define S3C2410_UERSTAT_ANY (S3C2410_UERSTAT_OVERRUN | \ + S3C2410_UERSTAT_FRAME | \ + S3C2410_UERSTAT_BREAK) #define S3C2410_UMSTAT_CTS (1<<0) #define S3C2410_UMSTAT_DeltaCTS (1<<2) #ifndef __ASSEMBLY__ + +/* struct s3c24xx_uart_clksrc + * + * this structure defines a named clock source that can be used for the + * uart, so that the best clock can be selected for the requested baud + * rate. + * + * min_baud and max_baud define the range of baud-rates this clock is + * acceptable for, if they are both zero, it is assumed any baud rate that + * can be generated from this clock will be used. + * + * divisor gives the divisor from the clock to the one seen by the uart +*/ + +struct s3c24xx_uart_clksrc { + const char *name; + unsigned int divisor; + unsigned int min_baud; + unsigned int max_baud; +}; + /* configuration structure for per-machine configurations for the * serial port * @@ -148,15 +174,23 @@ unsigned char hwport; /* hardware port number */ unsigned char unused; unsigned short flags; - - unsigned long *clock; /* pointer to clock rate */ + unsigned long uart_flags; /* default uart flags */ unsigned long ucon; /* value of ucon for port */ unsigned long ulcon; /* value of ulcon for port */ unsigned long ufcon; /* value of ufcon for port */ + + struct s3c24xx_uart_clksrc *clocks; + unsigned int clocks_size; }; -extern struct s3c2410_uartcfg *s3c2410_uartcfgs; +/* s3c24xx_uart_devs + * + * this is exported from the core as we cannot use driver_register(), + * or platform_add_device() before the console_initcall() +*/ + +extern struct platform_device *s3c24xx_uart_devs[3]; #endif /* __ASSEMBLY__ */ diff -Nru a/include/asm-arm/arch-s3c2410/timex.h b/include/asm-arm/arch-s3c2410/timex.h --- a/include/asm-arm/arch-s3c2410/timex.h 2004-11-29 21:22:08 -08:00 +++ b/include/asm-arm/arch-s3c2410/timex.h 2004-11-29 21:22:08 -08:00 @@ -1,6 +1,6 @@ /* linux/include/asm-arm/arch-s3c2410/timex.h * - * (c) 2003 Simtec Electronics + * (c) 2003,2004 Simtec Electronics * Ben Dooks * * S3C2410 - time parameters @@ -12,6 +12,7 @@ * Changelog: * 02-Sep-2003 BJD Created file * 05-Jan-2004 BJD Updated for Linux 2.6.0 + * 22-Nov-2004 BJD Fixed CLOCK_TICK_RATE */ #ifndef __ASM_ARCH_TIMEX_H @@ -26,8 +27,8 @@ #define CLOCK_TICK_RATE (s3c2410_clock_tick_rate) #endif -/* currently, the BAST uses 24MHz as a base clock rate */ -#define CLOCK_TICK_RATE 24000000 +/* currently, the BAST uses 12MHz as a base clock rate */ +#define CLOCK_TICK_RATE 12000000 #endif /* __ASM_ARCH_TIMEX_H */ diff -Nru a/include/asm-arm/arch-s3c2410/uncompress.h b/include/asm-arm/arch-s3c2410/uncompress.h --- a/include/asm-arm/arch-s3c2410/uncompress.h 2004-11-29 21:22:09 -08:00 +++ b/include/asm-arm/arch-s3c2410/uncompress.h 2004-11-29 21:22:09 -08:00 @@ -14,12 +14,13 @@ * 08-Sep-2003 BJD Moved to linux v2.6 * 12-Mar-2004 BJD Updated header protection * 12-Oct-2004 BJD Take account of debug uart configuration + * 15-Nov-2004 BJD Fixed uart configuration */ #ifndef __ASM_ARCH_UNCOMPRESS_H #define __ASM_ARCH_UNCOMPRESS_H -#include +#include /* defines for UART registers */ #include "asm/arch/regs-serial.h" @@ -34,11 +35,7 @@ /* how many bytes we allow into the FIFO at a time in FIFO mode */ #define FIFO_MAX (14) -#if 1 -#define uart_base S3C2410_PA_UART + (0x4000 * CONFIG_DEBUG_S3C2410_UART) -#else -static unsigned int uart_base = S3C2410_PA_UART; -#endif +#define uart_base S3C2410_PA_UART + (0x4000*CONFIG_S3C2410_LOWLEVEL_UART_PORT) static __inline__ void uart_wr(unsigned int reg, unsigned int val) diff -Nru a/include/asm-arm/ecard.h b/include/asm-arm/ecard.h --- a/include/asm-arm/ecard.h 2004-11-29 21:22:08 -08:00 +++ b/include/asm-arm/ecard.h 2004-11-29 21:22:08 -08:00 @@ -143,6 +143,7 @@ #define ecard_resource_end(ec,nr) ((ec)->resource[nr].end) #define ecard_resource_len(ec,nr) ((ec)->resource[nr].end - \ (ec)->resource[nr].start + 1) +#define ecard_resource_flags(ec,nr) ((ec)->resource[nr].flags) /* * This contains all the info needed on an expansion card diff -Nru a/include/asm-arm/io.h b/include/asm-arm/io.h --- a/include/asm-arm/io.h 2004-11-29 21:22:07 -08:00 +++ b/include/asm-arm/io.h 2004-11-29 21:22:07 -08:00 @@ -176,7 +176,7 @@ eth_copy_and_sum((s),__mem_pci(c),(l),(b)) static inline int -check_signature(unsigned long io_addr, const unsigned char *signature, +check_signature(void __iomem *io_addr, const unsigned char *signature, int length) { int retval = 0; @@ -226,23 +226,6 @@ #define isa_eth_io_copy_and_sum(a,b,c,d) \ eth_copy_and_sum((a),__mem_isa(b),(c),(d)) -static inline int -isa_check_signature(unsigned long io_addr, const unsigned char *signature, - int length) -{ - int retval = 0; - do { - if (isa_readb(io_addr) != *signature) - goto out; - io_addr++; - signature++; - length--; - } while (length); - retval = 1; -out: - return retval; -} - #else /* __mem_isa */ #define isa_readb(addr) (__readwrite_bug("isa_readb"),0) @@ -257,8 +240,6 @@ #define isa_eth_io_copy_and_sum(a,b,c,d) \ __readwrite_bug("isa_eth_io_copy_and_sum") - -#define isa_check_signature(io,sig,len) (0) #endif /* __mem_isa */ diff -Nru a/include/asm-arm/mach/irq.h b/include/asm-arm/mach/irq.h --- a/include/asm-arm/mach/irq.h 2004-11-29 21:22:07 -08:00 +++ b/include/asm-arm/mach/irq.h 2004-11-29 21:22:07 -08:00 @@ -97,23 +97,6 @@ void set_irq_chip(unsigned int irq, struct irqchip *); void set_irq_flags(unsigned int irq, unsigned int flags); -#ifdef not_yet -/* - * This is to be used by the top-level machine IRQ decoder only. - */ -static inline void call_irq(struct pt_regs *regs, unsigned int irq) -{ - struct irqdesc *desc = irq_desc + irq; - - spin_lock(&irq_controller_lock); - desc->handle(irq, desc, regs); - spin_unlock(&irq_controller_lock); - - if (softirq_pending(smp_processor_id())) - do_softirq(); -} -#endif - #define IRQF_VALID (1 << 0) #define IRQF_PROBE (1 << 1) #define IRQF_NOAUTOEN (1 << 2) diff -Nru a/include/asm-arm/page.h b/include/asm-arm/page.h --- a/include/asm-arm/page.h 2004-11-29 21:22:06 -08:00 +++ b/include/asm-arm/page.h 2004-11-29 21:22:06 -08:00 @@ -85,14 +85,10 @@ #endif #ifdef CONFIG_CPU_COPY_V6 -# ifdef _USER -# define MULTI_USER 1 -# else -# define _USER v6 -# endif +# define MULTI_USER 1 #endif -#ifndef _USER +#if !defined(_USER) && !defined(MULTI_USER) #error Unknown user operations model #endif diff -Nru a/include/asm-arm/procinfo.h b/include/asm-arm/procinfo.h --- a/include/asm-arm/procinfo.h 2004-11-29 21:22:06 -08:00 +++ b/include/asm-arm/procinfo.h 2004-11-29 21:22:06 -08:00 @@ -24,13 +24,13 @@ * * NOTE! The following structure is defined by assembly * language, NOT C code. For more information, check: - * arch/arm/mm/proc-*.S and arch/arm/kernel/head-armv.S + * arch/arm/mm/proc-*.S and arch/arm/kernel/head.S */ struct proc_info_list { unsigned int cpu_val; unsigned int cpu_mask; - unsigned long __cpu_mmu_flags; /* used by head-armv.S */ - unsigned long __cpu_flush; /* used by head-armv.S */ + unsigned long __cpu_mmu_flags; /* used by head.S */ + unsigned long __cpu_flush; /* used by head.S */ const char *arch_name; const char *elf_name; unsigned int elf_hwcap; diff -Nru a/include/asm-h8300/io.h b/include/asm-h8300/io.h --- a/include/asm-h8300/io.h 2004-11-29 21:22:07 -08:00 +++ b/include/asm-h8300/io.h 2004-11-29 21:22:07 -08:00 @@ -70,15 +70,24 @@ } #define readb(addr) \ - ({ unsigned char __v = (*(volatile unsigned char *) ((addr) & 0x00ffffff)); __v; }) + ({ unsigned char __v = \ + *(volatile unsigned char *)((unsigned long)(addr) & 0x00ffffff); \ + __v; }) #define readw(addr) \ - ({ unsigned short __v = (*(volatile unsigned short *) ((addr) & 0x00ffffff)); __v; }) + ({ unsigned short __v = \ + *(volatile unsigned short *)((unsigned long)(addr) & 0x00ffffff); \ + __v; }) #define readl(addr) \ - ({ unsigned int __v = (*(volatile unsigned int *) ((addr) & 0x00ffffff)); __v; }) + ({ unsigned long __v = \ + *(volatile unsigned long *)((unsigned long)(addr) & 0x00ffffff); \ + __v; }) -#define writeb(b,addr) (void)((*(volatile unsigned char *) ((addr) & 0x00ffffff)) = (b)) -#define writew(b,addr) (void)((*(volatile unsigned short *) ((addr) & 0x00ffffff)) = (b)) -#define writel(b,addr) (void)((*(volatile unsigned int *) ((addr) & 0x00ffffff)) = (b)) +#define writeb(b,addr) (void)((*(volatile unsigned char *) \ + ((unsigned long)(addr) & 0x00ffffff)) = (b)) +#define writew(b,addr) (void)((*(volatile unsigned short *) \ + ((unsigned long)(addr) & 0x00ffffff)) = (b)) +#define writel(b,addr) (void)((*(volatile unsigned long *) \ + ((unsigned long)(addr) & 0x00ffffff)) = (b)) #define readb_relaxed(addr) readb(addr) #define readw_relaxed(addr) readw(addr) #define readl_relaxed(addr) readl(addr) diff -Nru a/include/asm-h8300/sigcontext.h b/include/asm-h8300/sigcontext.h --- a/include/asm-h8300/sigcontext.h 2004-11-29 21:22:06 -08:00 +++ b/include/asm-h8300/sigcontext.h 2004-11-29 21:22:06 -08:00 @@ -8,7 +8,9 @@ unsigned long sc_er1; unsigned long sc_er2; unsigned long sc_er3; + unsigned long sc_er4; unsigned long sc_er5; + unsigned long sc_er6; unsigned short sc_ccr; unsigned long sc_pc; }; diff -Nru a/include/asm-h8300/signal.h b/include/asm-h8300/signal.h --- a/include/asm-h8300/signal.h 2004-11-29 21:22:07 -08:00 +++ b/include/asm-h8300/signal.h 2004-11-29 21:22:07 -08:00 @@ -96,6 +96,8 @@ #define SA_ONESHOT SA_RESETHAND #define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ +#define SA_RESTORER 0x04000000 + /* * sigaltstack controls */ diff -Nru a/include/asm-h8300/ucontext.h b/include/asm-h8300/ucontext.h --- a/include/asm-h8300/ucontext.h 2004-11-29 21:22:07 -08:00 +++ b/include/asm-h8300/ucontext.h 2004-11-29 21:22:07 -08:00 @@ -1,22 +1,11 @@ #ifndef _H8300_UCONTEXT_H #define _H8300_UCONTEXT_H -typedef int greg_t; -#define NGREG 10 -typedef greg_t gregset_t[NGREG]; - -struct mcontext { - int version; - gregset_t gregs; -}; - -#define MCONTEXT_VERSION 1 - struct ucontext { unsigned long uc_flags; struct ucontext *uc_link; stack_t uc_stack; - struct mcontext uc_mcontext; + struct sigcontext uc_mcontext; sigset_t uc_sigmask; /* mask last for extensibility */ }; diff -Nru a/include/asm-h8300/unistd.h b/include/asm-h8300/unistd.h --- a/include/asm-h8300/unistd.h 2004-11-29 21:22:07 -08:00 +++ b/include/asm-h8300/unistd.h 2004-11-29 21:22:07 -08:00 @@ -5,6 +5,7 @@ * This file contains the system call numbers. */ +#define __NR_restart_syscall 0 #define __NR_exit 1 #define __NR_fork 2 #define __NR_read 3 diff -Nru a/include/asm-i386/apic.h b/include/asm-i386/apic.h --- a/include/asm-i386/apic.h 2004-11-29 21:22:08 -08:00 +++ b/include/asm-i386/apic.h 2004-11-29 21:22:08 -08:00 @@ -53,7 +53,8 @@ static __inline__ void apic_wait_icr_idle(void) { - do { } while ( apic_read( APIC_ICR ) & APIC_ICR_BUSY ); + while ( apic_read( APIC_ICR ) & APIC_ICR_BUSY ) + cpu_relax(); } int get_physical_broadcast(void); diff -Nru a/include/asm-i386/io.h b/include/asm-i386/io.h --- a/include/asm-i386/io.h 2004-11-29 21:22:08 -08:00 +++ b/include/asm-i386/io.h 2004-11-29 21:22:08 -08:00 @@ -248,36 +248,6 @@ return retval; } -/** - * isa_check_signature - find BIOS signatures - * @io_addr: mmio address to check - * @signature: signature block - * @length: length of signature - * - * Perform a signature comparison with the ISA mmio address io_addr. - * Returns 1 on a match. - * - * This function is deprecated. New drivers should use ioremap and - * check_signature. - */ - - -static inline int isa_check_signature(unsigned long io_addr, - const unsigned char *signature, int length) -{ - int retval = 0; - do { - if (isa_readb(io_addr) != *signature) - goto out; - io_addr++; - signature++; - length--; - } while (length); - retval = 1; -out: - return retval; -} - /* * Cache management * diff -Nru a/include/asm-i386/thread_info.h b/include/asm-i386/thread_info.h --- a/include/asm-i386/thread_info.h 2004-11-29 21:22:06 -08:00 +++ b/include/asm-i386/thread_info.h 2004-11-29 21:22:06 -08:00 @@ -10,6 +10,7 @@ #ifdef __KERNEL__ #include +#include #include #ifndef __ASSEMBLY__ @@ -92,7 +93,7 @@ } /* how to get the current stack pointer from C */ -register unsigned long current_stack_pointer asm("esp"); +register unsigned long current_stack_pointer asm("esp") __attribute_used__; /* thread information allocation */ #ifdef CONFIG_DEBUG_STACK_USAGE diff -Nru a/include/asm-ia64/hardirq.h b/include/asm-ia64/hardirq.h --- a/include/asm-ia64/hardirq.h 2004-11-29 21:22:07 -08:00 +++ b/include/asm-ia64/hardirq.h 2004-11-29 21:22:07 -08:00 @@ -20,14 +20,7 @@ #define __ARCH_IRQ_STAT 1 #define softirq_pending(cpu) (cpu_data(cpu)->softirq_pending) -#define syscall_count(cpu) /* unused on IA-64 */ -#define ksoftirqd_task(cpu) (cpu_data(cpu)->ksoftirqd) -#define nmi_count(cpu) 0 - #define local_softirq_pending() (local_cpu_data->softirq_pending) -#define local_syscall_count() /* unused on IA-64 */ -#define local_ksoftirqd_task() (local_cpu_data->ksoftirqd) -#define local_nmi_count() 0 #define HARDIRQ_BITS 14 diff -Nru a/include/asm-ia64/pal.h b/include/asm-ia64/pal.h --- a/include/asm-ia64/pal.h 2004-11-29 21:22:08 -08:00 +++ b/include/asm-ia64/pal.h 2004-11-29 21:22:08 -08:00 @@ -1531,7 +1531,7 @@ ia64_pal_tr_read (u64 reg_num, u64 tr_type, u64 *tr_buffer, pal_tr_valid_u_t *tr_valid) { struct ia64_pal_retval iprv; - PAL_CALL_PHYS_STK(iprv, PAL_VM_TR_READ, reg_num, tr_type,(u64)__pa(tr_buffer)); + PAL_CALL_PHYS_STK(iprv, PAL_VM_TR_READ, reg_num, tr_type,(u64)ia64_tpa(tr_buffer)); if (tr_valid) tr_valid->piv_val = iprv.v0; return iprv.status; diff -Nru a/include/asm-ia64/ptrace.h b/include/asm-ia64/ptrace.h --- a/include/asm-ia64/ptrace.h 2004-11-29 21:22:08 -08:00 +++ b/include/asm-ia64/ptrace.h 2004-11-29 21:22:08 -08:00 @@ -2,7 +2,7 @@ #define _ASM_IA64_PTRACE_H /* - * Copyright (C) 1998-2003 Hewlett-Packard Co + * Copyright (C) 1998-2004 Hewlett-Packard Co * David Mosberger-Tang * Stephane Eranian * Copyright (C) 2003 Intel Co @@ -110,7 +110,11 @@ unsigned long cr_ipsr; /* interrupted task's psr */ unsigned long cr_iip; /* interrupted task's instruction pointer */ - unsigned long cr_ifs; /* interrupted task's function state */ + /* + * interrupted task's function state; if bit 63 is cleared, it + * contains syscall's ar.pfs.pfm: + */ + unsigned long cr_ifs; unsigned long ar_unat; /* interrupted task's NaT register (preserved) */ unsigned long ar_pfs; /* prev function state */ diff -Nru a/include/asm-ia64/sn/intr.h b/include/asm-ia64/sn/intr.h --- a/include/asm-ia64/sn/intr.h 2004-11-29 21:22:07 -08:00 +++ b/include/asm-ia64/sn/intr.h 2004-11-29 21:22:07 -08:00 @@ -12,15 +12,20 @@ #define SGI_UART_VECTOR (0xe9) #define SGI_PCIBR_ERROR (0x33) -// These two IRQ's are used by partitioning. +/* Reserved IRQs : Note, not to exceed IA64_SN2_FIRST_DEVICE_VECTOR */ #define SGI_XPC_ACTIVATE (0x30) #define SGI_II_ERROR (0x31) #define SGI_XBOW_ERROR (0x32) #define SGI_PCIBR_ERROR (0x33) #define SGI_ACPI_SCI_INT (0x34) -#define SGI_MMTIMER_VECTOR (0x35) -#define SGI_TIO_ERROR (0x36) +#define SGI_TIOCA_ERROR (0x35) +#define SGI_TIO_ERROR (0x36) +#define SGI_TIOCX_ERROR (0x37) +#define SGI_MMTIMER_VECTOR (0x38) #define SGI_XPC_NOTIFY (0xe7) + +#define IA64_SN2_FIRST_DEVICE_VECTOR (0x3c) +#define IA64_SN2_LAST_DEVICE_VECTOR (0xe6) #define SN2_IRQ_RESERVED (0x1) #define SN2_IRQ_CONNECTED (0x2) diff -Nru a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h --- a/include/asm-ia64/unistd.h 2004-11-29 21:22:06 -08:00 +++ b/include/asm-ia64/unistd.h 2004-11-29 21:22:06 -08:00 @@ -259,6 +259,10 @@ #define __NR_mq_getsetattr 1267 #define __NR_kexec_load 1268 #define __NR_vserver 1269 +#define __NR_waitid 1270 +#define __NR_add_key 1271 +#define __NR_request_key 1272 +#define __NR_keyctl 1273 #ifdef __KERNEL__ @@ -385,7 +389,7 @@ * "Conditional" syscalls * * Note, this macro can only be used in the file which defines sys_ni_syscall, i.e., in - * kernel/sys.c. This version causes warnings because the declaration isn't a + * kernel/sys_ni.c. This version causes warnings because the declaration isn't a * proper prototype, but we can't use __typeof__ either, because not all cond_syscall() * declarations have prototypes at the moment. */ diff -Nru a/include/asm-m32r/ide.h b/include/asm-m32r/ide.h --- a/include/asm-m32r/ide.h 2004-11-29 21:22:07 -08:00 +++ b/include/asm-m32r/ide.h 2004-11-29 21:22:07 -08:00 @@ -35,7 +35,7 @@ static __inline__ int ide_default_irq(unsigned long base) { switch (base) { -#if defined(CONFIG_PLAT_M32700UT) +#if defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_MAPPI2) case 0x1f0: return PLD_IRQ_CFIREQ; default: return 0; diff -Nru a/include/asm-m32r/io.h b/include/asm-m32r/io.h --- a/include/asm-m32r/io.h 2004-11-29 21:22:07 -08:00 +++ b/include/asm-m32r/io.h 2004-11-29 21:22:07 -08:00 @@ -167,7 +167,7 @@ #define flush_write_buffers() do { } while (0) /* M32R_FIXME */ /** - * isa_check_signature - find BIOS signatures + * check_signature - find BIOS signatures * @io_addr: mmio address to check * @signature: signature block * @length: length of signature @@ -179,14 +179,14 @@ * check_signature. */ -static inline int isa_check_signature(unsigned long io_addr, +static inline int check_signature(void __iomem *io_addr, const unsigned char *signature, int length) { int retval = 0; #if 0 -printk("isa_check_signature\n"); +printk("check_signature\n"); do { - if (isa_readb(io_addr) != *signature) + if (readb(io_addr) != *signature) goto out; io_addr++; signature++; diff -Nru a/include/asm-m68k/io.h b/include/asm-m68k/io.h --- a/include/asm-m68k/io.h 2004-11-29 21:22:07 -08:00 +++ b/include/asm-m68k/io.h 2004-11-29 21:22:07 -08:00 @@ -306,6 +306,24 @@ #endif #endif /* CONFIG_PCI */ +#if !defined(CONFIG_ISA) && !defined(CONFIG_PCI) && defined(CONFIG_HP300) +/* + * We need to define dummy functions otherwise drivers/serial/8250.c doesn't link + */ +#define inb(port) 0xff +#define inb_p(port) 0xff +#define outb(val,port) do { } while (0) +#define outb_p(val,port) do { } while (0) + +/* + * These should be valid on any ioremap()ed region + */ +#define readb(addr) in_8(addr) +#define writeb(val,addr) out_8((addr),(val)) +#define readl(addr) in_le32(addr) +#define writel(val,addr) out_le32((addr),(val)) +#endif + #define mmiowb() static inline void *ioremap(unsigned long physaddr, unsigned long size) @@ -327,23 +345,6 @@ return __ioremap(physaddr, size, IOMAP_FULL_CACHING); } -#if !defined(CONFIG_ISA) && !defined(CONFIG_PCI) && defined(CONFIG_HP300) -/* - * We need to define dummy functions otherwise drivers/serial/8250.c doesn't link - */ -#define inb(port) 0xff -#define inb_p(port) 0xff -#define outb(val,port) do { } while (0) -#define outb_p(val,port) do { } while (0) - -/* - * These should be valid on any ioremap()ed region - */ -#define readb(addr) in_8(addr) -#define writeb(val,addr) out_8((addr),(val)) -#define readl(addr) in_le32(addr) -#define writel(val,addr) out_le32((addr),(val)) -#endif /* m68k caches aren't DMA coherent */ extern void dma_cache_wback_inv(unsigned long start, unsigned long size); diff -Nru a/include/asm-m68k/setup.h b/include/asm-m68k/setup.h --- a/include/asm-m68k/setup.h 2004-11-29 21:22:07 -08:00 +++ b/include/asm-m68k/setup.h 2004-11-29 21:22:07 -08:00 @@ -264,7 +264,7 @@ # define MMU_IS_SUN3 (0) #elif defined(CONFIG_M68030) || defined(CONFIG_M68040) || defined(CONFIG_M68060) # define CPU_IS_020 (m68k_cputype & CPU_68020) -# define MMU_IS_851 (m68k_cputype & MMU_68851) +# define MMU_IS_851 (m68k_mmutype & MMU_68851) # define MMU_IS_SUN3 (0) /* Sun3 not supported with other CPU enabled */ #else # define CPU_M68020_ONLY diff -Nru a/include/asm-m68k/unistd.h b/include/asm-m68k/unistd.h --- a/include/asm-m68k/unistd.h 2004-11-29 21:22:07 -08:00 +++ b/include/asm-m68k/unistd.h 2004-11-29 21:22:07 -08:00 @@ -281,8 +281,11 @@ #define __NR_mq_getsetattr 276 #define __NR_waitid 277 #define __NR_vserver 278 +#define __NR_add_key 279 +#define __NR_request_key 280 +#define __NR_keyctl 281 -#define NR_syscalls 279 +#define NR_syscalls 282 /* user-visible error numbers are in the range -1 - -124: see */ diff -Nru a/include/asm-mips/io.h b/include/asm-mips/io.h --- a/include/asm-mips/io.h 2004-11-29 21:22:07 -08:00 +++ b/include/asm-mips/io.h 2004-11-29 21:22:07 -08:00 @@ -388,20 +388,6 @@ return retval; } -/* - * isa_check_signature - find BIOS signatures - * @io_addr: mmio address to check - * @signature: signature block - * @length: length of signature - * - * Perform a signature comparison with the ISA mmio address io_addr. - * Returns 1 on a match. - * - * This function is deprecated. New drivers should use ioremap and - * check_signature. - */ -#define isa_check_signature(io, s, l) check_signature(i,s,l) - static inline void __outb(unsigned char val, unsigned long port) { port = __swizzle_addr_b(port); diff -Nru a/include/asm-ppc/io.h b/include/asm-ppc/io.h --- a/include/asm-ppc/io.h 2004-11-29 21:22:08 -08:00 +++ b/include/asm-ppc/io.h 2004-11-29 21:22:08 -08:00 @@ -452,13 +452,6 @@ return retval; } -/* Make some pcmcia drivers happy */ -static inline int isa_check_signature(unsigned long io_addr, - const unsigned char *signature, int length) -{ - return 0; -} - /* * Here comes the ppc implementation of the IOMAP * interfaces. diff -Nru a/include/asm-ppc/open_pic.h b/include/asm-ppc/open_pic.h --- a/include/asm-ppc/open_pic.h 2004-11-29 21:22:07 -08:00 +++ b/include/asm-ppc/open_pic.h 2004-11-29 21:22:07 -08:00 @@ -55,6 +55,7 @@ extern void smp_openpic_message_pass(int target, int msg, unsigned long data, int wait); extern void openpic_set_k2_cascade(int irq); +extern void openpic_set_priority(u_int pri); extern inline int openpic_to_irq(int irq) { diff -Nru a/include/asm-ppc/pmac_feature.h b/include/asm-ppc/pmac_feature.h --- a/include/asm-ppc/pmac_feature.h 2004-11-29 21:22:08 -08:00 +++ b/include/asm-ppc/pmac_feature.h 2004-11-29 21:22:08 -08:00 @@ -315,7 +315,7 @@ int type; const char *name; int rev; - volatile u32 *base; + volatile u32 __iomem *base; unsigned long flags; /* For use by macio_asic PCI driver */ @@ -333,7 +333,7 @@ extern struct macio_chip* macio_find(struct device_node* child, int type); #define MACIO_FCR32(macio, r) ((macio)->base + ((r) >> 2)) -#define MACIO_FCR8(macio, r) (((volatile u8*)((macio)->base)) + (r)) +#define MACIO_FCR8(macio, r) (((volatile u8 __iomem *)((macio)->base)) + (r)) #define MACIO_IN32(r) (in_le32(MACIO_FCR32(macio,r))) #define MACIO_OUT32(r,v) (out_le32(MACIO_FCR32(macio,r), (v))) diff -Nru a/include/asm-ppc64/pci-bridge.h b/include/asm-ppc64/pci-bridge.h --- a/include/asm-ppc64/pci-bridge.h 2004-11-29 21:22:06 -08:00 +++ b/include/asm-ppc64/pci-bridge.h 2004-11-29 21:22:06 -08:00 @@ -18,21 +18,11 @@ extern struct pci_controller* pci_find_hose_for_OF_device(struct device_node* node); -enum phb_types { - phb_type_unknown = 0x0, - phb_type_hypervisor = 0x1, - phb_type_python = 0x10, - phb_type_speedwagon = 0x11, - phb_type_winnipeg = 0x12, - phb_type_apple = 0xff -}; - /* * Structure of a PCI controller (host bridge) */ struct pci_controller { char what[8]; /* Eye catcher */ - enum phb_types type; /* Type of hardware */ struct pci_bus *bus; char is_dynamic; void *arch_data; @@ -94,26 +84,13 @@ extern int pcibios_remove_root_bus(struct pci_controller *phb); -/* Use this macro after the PCI bus walk for max performance when it - * is known that sysdata is correct. - */ -#define PCI_GET_DN(dev) ((struct device_node *)((dev)->sysdata)) - extern void phbs_remap_io(void); static inline struct pci_controller *pci_bus_to_host(struct pci_bus *bus) { - struct device_node *busdn; + struct device_node *busdn = bus->sysdata; - busdn = bus->sysdata; - if (busdn == 0) { - struct pci_bus *b; - for (b = bus->parent; b && bus->sysdata == 0; b = b->parent) - ; - busdn = b->sysdata; - } - if (busdn == NULL) - return NULL; + BUG_ON(busdn == NULL); return busdn->phb; } diff -Nru a/include/asm-ppc64/pgtable.h b/include/asm-ppc64/pgtable.h --- a/include/asm-ppc64/pgtable.h 2004-11-29 21:22:08 -08:00 +++ b/include/asm-ppc64/pgtable.h 2004-11-29 21:22:08 -08:00 @@ -67,12 +67,6 @@ #define IMALLOC_END (IMALLOC_BASE + PGTABLE_EA_MASK) /* - * Define the address range mapped virt <-> physical - */ -#define KRANGE_START KERNELBASE -#define KRANGE_END (KRANGE_START + PGTABLE_EA_MASK) - -/* * Define the user address range */ #define USER_START (0UL) diff -Nru a/include/asm-ppc64/prom.h b/include/asm-ppc64/prom.h --- a/include/asm-ppc64/prom.h 2004-11-29 21:22:08 -08:00 +++ b/include/asm-ppc64/prom.h 2004-11-29 21:22:08 -08:00 @@ -56,6 +56,8 @@ u32 off_mem_rsvmap; /* offset to memory reserve map */ u32 version; /* format version */ u32 last_comp_version; /* last compatible version */ + /* version 2 fields below */ + u32 boot_cpuid_phys; /* Which physical CPU id we're booting on */ }; diff -Nru a/include/asm-ppc64/rtas.h b/include/asm-ppc64/rtas.h --- a/include/asm-ppc64/rtas.h 2004-11-29 21:22:08 -08:00 +++ b/include/asm-ppc64/rtas.h 2004-11-29 21:22:08 -08:00 @@ -149,7 +149,7 @@ unsigned long target:4; /* Target of failed operation */ unsigned long type:8; /* General event or error*/ unsigned long extended_log_length:32; /* length in bytes */ - unsigned char buffer[1]; /* allocated by klimit bump */ + unsigned char buffer[1]; }; struct flash_block { diff -Nru a/include/asm-ppc64/smp.h b/include/asm-ppc64/smp.h --- a/include/asm-ppc64/smp.h 2004-11-29 21:22:06 -08:00 +++ b/include/asm-ppc64/smp.h 2004-11-29 21:22:06 -08:00 @@ -27,6 +27,7 @@ #include extern int boot_cpuid; +extern int boot_cpuid_phys; extern void cpu_die(void) __attribute__((noreturn)); diff -Nru a/include/asm-ppc64/sstep.h b/include/asm-ppc64/sstep.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-ppc64/sstep.h 2004-11-29 21:22:09 -08:00 @@ -0,0 +1,13 @@ +/* + * Copyright (C) 2004 Paul Mackerras , IBM + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +struct pt_regs; + +/* Emulate instructions that cause a transfer of control. */ +extern int emulate_step(struct pt_regs *regs, unsigned int instr); diff -Nru a/include/asm-ppc64/unistd.h b/include/asm-ppc64/unistd.h --- a/include/asm-ppc64/unistd.h 2004-11-29 21:22:06 -08:00 +++ b/include/asm-ppc64/unistd.h 2004-11-29 21:22:06 -08:00 @@ -202,19 +202,19 @@ #define __NR_vfork 189 #define __NR_ugetrlimit 190 /* SuS compliant getrlimit */ #define __NR_readahead 191 -#define __NR_mmap2 192 -#define __NR_truncate64 193 -#define __NR_ftruncate64 194 -#define __NR_stat64 195 -#define __NR_lstat64 196 -#define __NR_fstat64 197 +/* #define __NR_mmap2 192 32bit only */ +/* #define __NR_truncate64 193 32bit only */ +/* #define __NR_ftruncate64 194 32bit only */ +/* #define __NR_stat64 195 32bit only */ +/* #define __NR_lstat64 196 32bit only */ +/* #define __NR_fstat64 197 32bit only */ #define __NR_pciconfig_read 198 #define __NR_pciconfig_write 199 #define __NR_pciconfig_iobase 200 #define __NR_multiplexer 201 #define __NR_getdents64 202 #define __NR_pivot_root 203 -#define __NR_fcntl64 204 +/* #define __NR_fcntl64 204 32bit only */ #define __NR_madvise 205 #define __NR_mincore 206 #define __NR_gettid 207 @@ -236,7 +236,7 @@ #define __NR_sched_getaffinity 223 /* 224 currently unused */ #define __NR_tuxcall 225 -#define __NR_sendfile64 226 +/* #define __NR_sendfile64 226 32bit only */ #define __NR_io_setup 227 #define __NR_io_destroy 228 #define __NR_io_getevents 229 @@ -264,7 +264,7 @@ #define __NR_utimes 251 #define __NR_statfs64 252 #define __NR_fstatfs64 253 -#define __NR_fadvise64_64 254 +/* #define __NR_fadvise64_64 254 32bit only */ #define __NR_rtas 255 /* Number 256 is reserved for sys_debug_setcontext */ /* Number 257 is reserved for vserver */ diff -Nru a/include/asm-s390/elf.h b/include/asm-s390/elf.h --- a/include/asm-s390/elf.h 2004-11-29 21:22:08 -08:00 +++ b/include/asm-s390/elf.h 2004-11-29 21:22:08 -08:00 @@ -98,6 +98,7 @@ #include #include +#include /* for save_access_regs */ typedef s390_fp_regs elf_fpregset_t; @@ -152,6 +153,7 @@ static inline int dump_regs(struct pt_regs *ptregs, elf_gregset_t *regs) { memcpy(®s->psw, &ptregs->psw, sizeof(regs->psw)+sizeof(regs->gprs)); + save_access_regs(regs->acrs); regs->orig_gpr2 = ptregs->orig_gpr2; return 1; } @@ -160,8 +162,10 @@ static inline int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs) { - dump_regs(__KSTK_PTREGS(tsk), regs); + struct pt_regs *ptregs = __KSTK_PTREGS(tsk); + memcpy(®s->psw, &ptregs->psw, sizeof(regs->psw)+sizeof(regs->gprs)); memcpy(regs->acrs, tsk->thread.acrs, sizeof(regs->acrs)); + regs->orig_gpr2 = ptregs->orig_gpr2; return 1; } @@ -169,7 +173,10 @@ static inline int dump_task_fpu(struct task_struct *tsk, elf_fpregset_t *fpregs) { - memcpy(fpregs, &tsk->thread.fp_regs, sizeof(elf_fpregset_t)); + if (tsk == current) + save_fp_regs(fpregs); + else + memcpy(fpregs, &tsk->thread.fp_regs, sizeof(elf_fpregset_t)); return 1; } diff -Nru a/include/asm-sparc/dma.h b/include/asm-sparc/dma.h --- a/include/asm-sparc/dma.h 2004-11-29 21:22:07 -08:00 +++ b/include/asm-sparc/dma.h 2004-11-29 21:22:07 -08:00 @@ -69,7 +69,7 @@ struct sbus_dma { struct sbus_dma *next; struct sbus_dev *sdev; - unsigned long regs; + void __iomem *regs; /* Status, misc info */ int node; /* Prom node for this DMA device */ diff -Nru a/include/asm-sparc/fbio.h b/include/asm-sparc/fbio.h --- a/include/asm-sparc/fbio.h 2004-11-29 21:22:06 -08:00 +++ b/include/asm-sparc/fbio.h 2004-11-29 21:22:06 -08:00 @@ -53,9 +53,9 @@ struct fbcmap { int index; /* first element (0 origin) */ int count; - unsigned char *red; - unsigned char *green; - unsigned char *blue; + unsigned char __user *red; + unsigned char __user *green; + unsigned char __user *blue; }; #ifdef __KERNEL__ diff -Nru a/include/asm-sparc/io.h b/include/asm-sparc/io.h --- a/include/asm-sparc/io.h 2004-11-29 21:22:06 -08:00 +++ b/include/asm-sparc/io.h 2004-11-29 21:22:06 -08:00 @@ -27,87 +27,78 @@ /* * Memory mapped I/O to PCI - * - * Observe that ioremap returns void* cookie, but accessors, such - * as readb, take unsigned long as address, by API. This mismatch - * happened historically. The ioremap is much older than accessors, - * so at one time ioremap's cookie was used as address (*a = val). - * When accessors came about, they were designed to be compatible across - * buses, so that drivers can select proper ones like sunhme.c did. - * To make that easier, they use same aruments (ulong) for sbus, pci, isa. - * The offshot is, we must cast readb et. al. arguments with a #define. */ -static inline u8 __raw_readb(unsigned long addr) +static inline u8 __raw_readb(const volatile void __iomem *addr) { - return *(volatile u8 *)addr; + return *(__force volatile u8 *)addr; } -static inline u16 __raw_readw(unsigned long addr) +static inline u16 __raw_readw(const volatile void __iomem *addr) { - return *(volatile u16 *)addr; + return *(__force volatile u16 *)addr; } -static inline u32 __raw_readl(unsigned long addr) +static inline u32 __raw_readl(const volatile void __iomem *addr) { - return *(volatile u32 *)addr; + return *(__force volatile u32 *)addr; } -static inline void __raw_writeb(u8 b, unsigned long addr) +static inline void __raw_writeb(u8 b, volatile void __iomem *addr) { - *(volatile u8 *)addr = b; + *(__force volatile u8 *)addr = b; } -static inline void __raw_writew(u16 w, unsigned long addr) +static inline void __raw_writew(u16 w, volatile void __iomem *addr) { - *(volatile u16 *)addr = w; + *(__force volatile u16 *)addr = w; } -static inline void __raw_writel(u32 l, unsigned long addr) +static inline void __raw_writel(u32 l, volatile void __iomem *addr) { - *(volatile u32 *)addr = l; + *(__force volatile u32 *)addr = l; } -static inline u8 __readb(unsigned long addr) +static inline u8 __readb(const volatile void __iomem *addr) { - return *(volatile u8 *)addr; + return *(__force volatile u8 *)addr; } -static inline u16 __readw(unsigned long addr) +static inline u16 __readw(const volatile void __iomem *addr) { - return flip_word(*(volatile u16 *)addr); + return flip_word(*(__force volatile u16 *)addr); } -static inline u32 __readl(unsigned long addr) +static inline u32 __readl(const volatile void __iomem *addr) { - return flip_dword(*(volatile u32 *)addr); + return flip_dword(*(__force volatile u32 *)addr); } -static inline void __writeb(u8 b, unsigned long addr) +static inline void __writeb(u8 b, volatile void __iomem *addr) { - *(volatile u8 *)addr = b; + *(__force volatile u8 *)addr = b; } -static inline void __writew(u16 w, unsigned long addr) +static inline void __writew(u16 w, volatile void __iomem *addr) { - *(volatile u16 *)addr = flip_word(w); + *(__force volatile u16 *)addr = flip_word(w); } -static inline void __writel(u32 l, unsigned long addr) +static inline void __writel(u32 l, volatile void __iomem *addr) { - *(volatile u32 *)addr = flip_dword(l); + *(__force volatile u32 *)addr = flip_dword(l); } -#define readb(__addr) __readb((unsigned long)(__addr)) -#define readw(__addr) __readw((unsigned long)(__addr)) -#define readl(__addr) __readl((unsigned long)(__addr)) +#define readb(__addr) __readb(__addr) +#define readw(__addr) __readw(__addr) +#define readl(__addr) __readl(__addr) #define readb_relaxed(__addr) readb(__addr) #define readw_relaxed(__addr) readw(__addr) #define readl_relaxed(__addr) readl(__addr) -#define writeb(__b, __addr) __writeb((__b),(unsigned long)(__addr)) -#define writew(__w, __addr) __writew((__w),(unsigned long)(__addr)) -#define writel(__l, __addr) __writel((__l),(unsigned long)(__addr)) +#define writeb(__b, __addr) __writeb((__b),(__addr)) +#define writew(__w, __addr) __writew((__w),(__addr)) +#define writel(__l, __addr) __writel((__l),(__addr)) /* * I/O space operations @@ -126,15 +117,15 @@ * mapped somewhere into virtual kernel space and we * can use inb/outb again. */ -#define inb_local(__addr) __readb((unsigned long)(__addr)) -#define inb(__addr) __readb((unsigned long)(__addr)) -#define inw(__addr) __readw((unsigned long)(__addr)) -#define inl(__addr) __readl((unsigned long)(__addr)) - -#define outb_local(__b, __addr) __writeb(__b, (unsigned long)(__addr)) -#define outb(__b, __addr) __writeb(__b, (unsigned long)(__addr)) -#define outw(__w, __addr) __writew(__w, (unsigned long)(__addr)) -#define outl(__l, __addr) __writel(__l, (unsigned long)(__addr)) +#define inb_local(__addr) __readb((void __iomem *)(unsigned long)(__addr)) +#define inb(__addr) __readb((void __iomem *)(unsigned long)(__addr)) +#define inw(__addr) __readw((void __iomem *)(unsigned long)(__addr)) +#define inl(__addr) __readl((void __iomem *)(unsigned long)(__addr)) + +#define outb_local(__b, __addr) __writeb(__b, (void __iomem *)(unsigned long)(__addr)) +#define outb(__b, __addr) __writeb(__b, (void __iomem *)(unsigned long)(__addr)) +#define outw(__w, __addr) __writew(__w, (void __iomem *)(unsigned long)(__addr)) +#define outl(__l, __addr) __writel(__l, (void __iomem *)(unsigned long)(__addr)) #define inb_p(__addr) inb(__addr) #define outb_p(__b, __addr) outb(__b, __addr) @@ -158,73 +149,112 @@ * SBus has only one, memory mapped, I/O space. * We do not need to flip bytes for SBus of course. */ -static inline u8 _sbus_readb(unsigned long addr) +static inline u8 _sbus_readb(const volatile void __iomem *addr) { - return *(volatile u8 *)addr; + return *(__force volatile u8 *)addr; } -static inline u16 _sbus_readw(unsigned long addr) +static inline u16 _sbus_readw(const volatile void __iomem *addr) { - return *(volatile u16 *)addr; + return *(__force volatile u16 *)addr; } -static inline u32 _sbus_readl(unsigned long addr) +static inline u32 _sbus_readl(const volatile void __iomem *addr) { - return *(volatile u32 *)addr; + return *(__force volatile u32 *)addr; } -static inline void _sbus_writeb(u8 b, unsigned long addr) +static inline void _sbus_writeb(u8 b, volatile void __iomem *addr) { - *(volatile u8 *)addr = b; + *(__force volatile u8 *)addr = b; } -static inline void _sbus_writew(u16 w, unsigned long addr) +static inline void _sbus_writew(u16 w, volatile void __iomem *addr) { - *(volatile u16 *)addr = w; + *(__force volatile u16 *)addr = w; } -static inline void _sbus_writel(u32 l, unsigned long addr) +static inline void _sbus_writel(u32 l, volatile void __iomem *addr) { - *(volatile u32 *)addr = l; + *(__force volatile u32 *)addr = l; } /* * The only reason for #define's is to hide casts to unsigned long. */ -#define sbus_readb(__addr) _sbus_readb((unsigned long)(__addr)) -#define sbus_readw(__addr) _sbus_readw((unsigned long)(__addr)) -#define sbus_readl(__addr) _sbus_readl((unsigned long)(__addr)) -#define sbus_writeb(__b, __addr) _sbus_writeb(__b, (unsigned long)(__addr)) -#define sbus_writew(__w, __addr) _sbus_writew(__w, (unsigned long)(__addr)) -#define sbus_writel(__l, __addr) _sbus_writel(__l, (unsigned long)(__addr)) +#define sbus_readb(__addr) _sbus_readb(__addr) +#define sbus_readw(__addr) _sbus_readw(__addr) +#define sbus_readl(__addr) _sbus_readl(__addr) +#define sbus_writeb(__b, __addr) _sbus_writeb(__b, __addr) +#define sbus_writew(__w, __addr) _sbus_writew(__w, __addr) +#define sbus_writel(__l, __addr) _sbus_writel(__l, __addr) -static inline void *sbus_memset_io(void *__dst, int c, __kernel_size_t n) +static inline void sbus_memset_io(volatile void __iomem *__dst, int c, __kernel_size_t n) { - unsigned long dst = (unsigned long)__dst; - while(n--) { - sbus_writeb(c, dst); - dst++; + sbus_writeb(c, __dst); + __dst++; + } +} + +static inline void +_memset_io(volatile void __iomem *dst, int c, __kernel_size_t n) +{ + volatile void __iomem *d = dst; + + while (n--) { + writeb(c, d); + d++; + } +} + +#define memset_io(d,c,sz) _memset_io(d,c,sz) + +static inline void +_memcpy_fromio(void *dst, const volatile void __iomem *src, __kernel_size_t n) +{ + char *d = dst; + + while (n--) { + char tmp = readb(src); + *d++ = tmp; + src++; + } +} + +#define memcpy_fromio(d,s,sz) _memcpy_fromio(d,s,sz) + +static inline void +_memcpy_toio(volatile void __iomem *dst, const void *src, __kernel_size_t n) +{ + const char *s = src; + volatile void __iomem *d = dst; + + while (n--) { + char tmp = *s++; + writeb(tmp, d); + d++; } - return (void *) dst; } +#define memcpy_toio(d,s,sz) _memcpy_toio(d,s,sz) + #ifdef __KERNEL__ /* * Bus number may be embedded in the higher bits of the physical address. * This is why we have no bus number argument to ioremap(). */ -extern void *ioremap(unsigned long offset, unsigned long size); +extern void __iomem *ioremap(unsigned long offset, unsigned long size); #define ioremap_nocache(X,Y) ioremap((X),(Y)) -extern void iounmap(void *addr); +extern void iounmap(volatile void __iomem *addr); /* * Bus number may be in res->flags... somewhere. */ -extern unsigned long sbus_ioremap(struct resource *res, unsigned long offset, +extern void __iomem *sbus_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name); -extern void sbus_iounmap(unsigned long vaddr, unsigned long size); +extern void sbus_iounmap(volatile void __iomem *vaddr, unsigned long size); /* diff -Nru a/include/asm-sparc/mostek.h b/include/asm-sparc/mostek.h --- a/include/asm-sparc/mostek.h 2004-11-29 21:22:08 -08:00 +++ b/include/asm-sparc/mostek.h 2004-11-29 21:22:08 -08:00 @@ -38,8 +38,8 @@ * other than the control register are in binary coded decimal. Some * control bits also live outside the control register. */ -#define mostek_read(_addr) (*((volatile u8 *)(_addr))) -#define mostek_write(_addr,_val) ((*((volatile u8 *)(_addr))) = (_val)) +#define mostek_read(_addr) readb(_addr) +#define mostek_write(_addr,_val) writeb(_val, _addr) #define MOSTEK_EEPROM 0x0000UL #define MOSTEK_IDPROM 0x07d8UL #define MOSTEK_CREG 0x07f8UL @@ -65,7 +65,7 @@ }; extern spinlock_t mostek_lock; -extern unsigned long mstk48t02_regs; +extern void __iomem *mstk48t02_regs; /* Control register values. */ #define MSTK_CREG_WRITE 0x80 /* Must set this before placing values. */ diff -Nru a/include/asm-sparc64/io.h b/include/asm-sparc64/io.h --- a/include/asm-sparc64/io.h 2004-11-29 21:22:08 -08:00 +++ b/include/asm-sparc64/io.h 2004-11-29 21:22:08 -08:00 @@ -114,7 +114,7 @@ #define iowrite32_rep(a,s,c) outsl(a,s,c) /* Memory functions, same as I/O accesses on Ultra. */ -static inline u8 _readb(volatile void __iomem *addr) +static inline u8 _readb(const volatile void __iomem *addr) { u8 ret; __asm__ __volatile__("lduba\t[%1] %2, %0\t/* pci_readb */" @@ -123,7 +123,7 @@ return ret; } -static inline u16 _readw(volatile void __iomem *addr) +static inline u16 _readw(const volatile void __iomem *addr) { u16 ret; __asm__ __volatile__("lduha\t[%1] %2, %0\t/* pci_readw */" @@ -133,7 +133,7 @@ return ret; } -static inline u32 _readl(volatile void __iomem *addr) +static inline u32 _readl(const volatile void __iomem *addr) { u32 ret; __asm__ __volatile__("lduwa\t[%1] %2, %0\t/* pci_readl */" @@ -143,7 +143,7 @@ return ret; } -static inline u64 _readq(volatile void __iomem *addr) +static inline u64 _readq(const volatile void __iomem *addr) { u64 ret; __asm__ __volatile__("ldxa\t[%1] %2, %0\t/* pci_readq */" @@ -284,7 +284,7 @@ /* Now, SBUS variants, only difference from PCI is that we do * not use little-endian ASIs. */ -static inline u8 _sbus_readb(void __iomem *addr) +static inline u8 _sbus_readb(const volatile void __iomem *addr) { u8 ret; @@ -295,7 +295,7 @@ return ret; } -static inline u16 _sbus_readw(void __iomem *addr) +static inline u16 _sbus_readw(const volatile void __iomem *addr) { u16 ret; @@ -306,7 +306,7 @@ return ret; } -static inline u32 _sbus_readl(void __iomem *addr) +static inline u32 _sbus_readl(const volatile void __iomem *addr) { u32 ret; @@ -317,7 +317,7 @@ return ret; } -static inline u64 _sbus_readq(void __iomem *addr) +static inline u64 _sbus_readq(const volatile void __iomem *addr) { u64 ret; @@ -328,28 +328,28 @@ return ret; } -static inline void _sbus_writeb(u8 b, void __iomem *addr) +static inline void _sbus_writeb(u8 b, volatile void __iomem *addr) { __asm__ __volatile__("stba\t%r0, [%1] %2\t/* sbus_writeb */" : /* no outputs */ : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); } -static inline void _sbus_writew(u16 w, void __iomem *addr) +static inline void _sbus_writew(u16 w, volatile void __iomem *addr) { __asm__ __volatile__("stha\t%r0, [%1] %2\t/* sbus_writew */" : /* no outputs */ : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); } -static inline void _sbus_writel(u32 l, void __iomem *addr) +static inline void _sbus_writel(u32 l, volatile void __iomem *addr) { __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* sbus_writel */" : /* no outputs */ : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); } -static inline void _sbus_writeq(u64 l, void __iomem *addr) +static inline void _sbus_writeq(u64 l, volatile void __iomem *addr) { __asm__ __volatile__("stxa\t%r0, [%1] %2\t/* sbus_writeq */" : /* no outputs */ @@ -365,35 +365,31 @@ #define sbus_writel(__l, __addr) _sbus_writel(__l, __addr) #define sbus_writeq(__l, __addr) _sbus_writeq(__l, __addr) -static inline void __iomem*_sbus_memset_io(void __iomem *dst, int c, - __kernel_size_t n) +static inline void _sbus_memset_io(volatile void __iomem *dst, int c, __kernel_size_t n) { while(n--) { sbus_writeb(c, dst); dst++; } - return (void *) dst; } #define sbus_memset_io(d,c,sz) _sbus_memset_io(d,c,sz) -static inline void __iomem * -_memset_io(void __iomem *dst, int c, __kernel_size_t n) +static inline void +_memset_io(volatile void __iomem *dst, int c, __kernel_size_t n) { - void __iomem *d = dst; + volatile void __iomem *d = dst; while (n--) { writeb(c, d); d++; } - - return dst; } #define memset_io(d,c,sz) _memset_io(d,c,sz) -static inline void __iomem * -_memcpy_fromio(void *dst, void __iomem *src, __kernel_size_t n) +static inline void +_memcpy_fromio(void *dst, const volatile void __iomem *src, __kernel_size_t n) { char *d = dst; @@ -402,24 +398,21 @@ *d++ = tmp; src++; } - - return dst; } #define memcpy_fromio(d,s,sz) _memcpy_fromio(d,s,sz) -static inline void __iomem * -_memcpy_toio(void __iomem *dst, const void *src, __kernel_size_t n) +static inline void +_memcpy_toio(volatile void __iomem *dst, const void *src, __kernel_size_t n) { const char *s = src; - void __iomem *d = dst; + volatile void __iomem *d = dst; while (n--) { char tmp = *s++; writeb(tmp, d); d++; } - return dst; } #define memcpy_toio(d,s,sz) _memcpy_toio(d,s,sz) @@ -453,7 +446,7 @@ #define ioremap_nocache(X,Y) ioremap((X),(Y)) -static inline void iounmap(void __iomem *addr) +static inline void iounmap(volatile void __iomem *addr) { } diff -Nru a/include/asm-um/pgtable.h b/include/asm-um/pgtable.h --- a/include/asm-um/pgtable.h 2004-11-29 21:22:08 -08:00 +++ b/include/asm-um/pgtable.h 2004-11-29 21:22:08 -08:00 @@ -405,11 +405,10 @@ #define pte_offset_kernel(dir, address) \ ((pte_t *) pmd_page_kernel(*(dir)) + pte_index(address)) #define pte_offset_map(dir, address) \ - ((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE0) + pte_index(address)) -#define pte_offset_map_nested(dir, address) \ - ((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE1) + pte_index(address)) -#define pte_unmap(pte) kunmap_atomic((pte), KM_PTE0) -#define pte_unmap_nested(pte) kunmap_atomic((pte), KM_PTE1) + ((pte_t *)page_address(pmd_page(*(dir))) + pte_index(address)) +#define pte_offset_map_nested(dir, address) pte_offset_map(dir, address) +#define pte_unmap(pte) do { } while (0) +#define pte_unmap_nested(pte) do { } while (0) #define update_mmu_cache(vma,address,pte) do ; while (0) diff -Nru a/include/asm-um/unistd.h b/include/asm-um/unistd.h --- a/include/asm-um/unistd.h 2004-11-29 21:22:08 -08:00 +++ b/include/asm-um/unistd.h 2004-11-29 21:22:08 -08:00 @@ -13,10 +13,9 @@ extern int um_execve(const char *file, char *const argv[], char *const env[]); #ifdef __KERNEL__ +/* We get __ARCH_WANT_OLD_STAT and __ARCH_WANT_STAT64 from the base arch */ #define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_OLD_READDIR -#define __ARCH_WANT_OLD_STAT -#define __ARCH_WANT_STAT64 #define __ARCH_WANT_SYS_ALARM #define __ARCH_WANT_SYS_GETHOSTNAME #define __ARCH_WANT_SYS_PAUSE @@ -84,7 +83,7 @@ KERNEL_CALL(pid_t, sys_setsid) } -static inline long lseek(unsigned int fd, off_t offset, unsigned int whence) +static inline off_t lseek(unsigned int fd, off_t offset, unsigned int whence) { KERNEL_CALL(long, sys_lseek, fd, offset, whence) } @@ -102,13 +101,12 @@ long sys_mmap2(unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, unsigned long fd, unsigned long pgoff); -int sys_execve(char *file, char **argv, char **env); +long sys_execve(char *file, char **argv, char **env); long sys_clone(unsigned long clone_flags, unsigned long newsp, int *parent_tid, int *child_tid); long sys_fork(void); long sys_vfork(void); -int sys_pipe(unsigned long *fildes); -int sys_ptrace(long request, long pid, long addr, long data); +long sys_pipe(unsigned long *fildes); struct sigaction; asmlinkage long sys_rt_sigaction(int sig, const struct sigaction __user *act, diff -Nru a/include/asm-x86_64/hpet.h b/include/asm-x86_64/hpet.h --- a/include/asm-x86_64/hpet.h 2004-11-29 21:22:08 -08:00 +++ b/include/asm-x86_64/hpet.h 2004-11-29 21:22:08 -08:00 @@ -46,6 +46,7 @@ extern int is_hpet_enabled(void); extern int hpet_rtc_timer_init(void); +extern int oem_force_hpet_timer(void); #ifdef CONFIG_HPET_EMULATE_RTC extern int hpet_mask_rtc_irq_bit(unsigned long bit_mask); @@ -54,7 +55,6 @@ extern int hpet_set_periodic_freq(unsigned long freq); extern int hpet_rtc_dropped_irq(void); extern int hpet_rtc_timer_init(void); -extern int oem_force_hpet_timer(void); #endif /* CONFIG_HPET_EMULATE_RTC */ #endif diff -Nru a/include/asm-x86_64/hw_irq.h b/include/asm-x86_64/hw_irq.h --- a/include/asm-x86_64/hw_irq.h 2004-11-29 21:22:08 -08:00 +++ b/include/asm-x86_64/hw_irq.h 2004-11-29 21:22:08 -08:00 @@ -130,7 +130,7 @@ "push $" #nr "-256 ; " \ "jmp common_interrupt"); -#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_SMP) +#if defined(CONFIG_X86_IO_APIC) static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) { if (IO_APIC_IRQ(i)) send_IPI_self(IO_APIC_VECTOR(i)); diff -Nru a/include/asm-x86_64/io.h b/include/asm-x86_64/io.h --- a/include/asm-x86_64/io.h 2004-11-29 21:22:07 -08:00 +++ b/include/asm-x86_64/io.h 2004-11-29 21:22:07 -08:00 @@ -320,38 +320,6 @@ return retval; } -#ifndef __i386__ -/** - * isa_check_signature - find BIOS signatures - * @io_addr: mmio address to check - * @signature: signature block - * @length: length of signature - * - * Perform a signature comparison with the ISA mmio address io_addr. - * Returns 1 on a match. - * - * This function is deprecated. New drivers should use ioremap and - * check_signature. - */ - - -static inline int isa_check_signature(unsigned long io_addr, - const unsigned char *signature, int length) -{ - int retval = 0; - do { - if (isa_readb(io_addr) != *signature) - goto out; - io_addr++; - signature++; - length--; - } while (length); - retval = 1; -out: - return retval; -} -#endif - /* Nothing to do */ #define dma_cache_inv(_start,_size) do { } while (0) diff -Nru a/include/asm-x86_64/io_apic.h b/include/asm-x86_64/io_apic.h --- a/include/asm-x86_64/io_apic.h 2004-11-29 21:22:06 -08:00 +++ b/include/asm-x86_64/io_apic.h 2004-11-29 21:22:06 -08:00 @@ -199,7 +199,7 @@ * If we use the IO-APIC for IRQ routing, disable automatic * assignment of PCI IRQ's. */ -#define io_apic_assign_pci_irqs (mp_irq_entries && !skip_ioapic_setup) +#define io_apic_assign_pci_irqs (mp_irq_entries && !skip_ioapic_setup && io_apic_irqs) #ifdef CONFIG_ACPI_BOOT extern int io_apic_get_unique_id (int ioapic, int apic_id); diff -Nru a/include/asm-x86_64/vsyscall.h b/include/asm-x86_64/vsyscall.h --- a/include/asm-x86_64/vsyscall.h 2004-11-29 21:22:08 -08:00 +++ b/include/asm-x86_64/vsyscall.h 2004-11-29 21:22:08 -08:00 @@ -21,7 +21,7 @@ #define __section_sys_tz __attribute__ ((unused, __section__ (".sys_tz"), aligned(16))) #define __section_sysctl_vsyscall __attribute__ ((unused, __section__ (".sysctl_vsyscall"), aligned(16))) #define __section_xtime __attribute__ ((unused, __section__ (".xtime"), aligned(16))) -#define __section_xtime_lock __attribute__ ((unused, __section__ (".xtime_lock"), aligned(L1_CACHE_BYTES))) +#define __section_xtime_lock __attribute__ ((unused, __section__ (".xtime_lock"), aligned(16))) #define VXTIME_TSC 1 #define VXTIME_HPET 2 diff -Nru a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h --- a/include/linux/compat_ioctl.h 2004-11-29 21:22:08 -08:00 +++ b/include/linux/compat_ioctl.h 2004-11-29 21:22:08 -08:00 @@ -140,6 +140,7 @@ COMPATIBLE_IOCTL(DM_TABLE_DEPS_32) COMPATIBLE_IOCTL(DM_TABLE_STATUS_32) COMPATIBLE_IOCTL(DM_LIST_VERSIONS_32) +COMPATIBLE_IOCTL(DM_TARGET_MSG_32) COMPATIBLE_IOCTL(DM_VERSION) COMPATIBLE_IOCTL(DM_REMOVE_ALL) COMPATIBLE_IOCTL(DM_LIST_DEVICES) @@ -154,6 +155,7 @@ COMPATIBLE_IOCTL(DM_TABLE_DEPS) COMPATIBLE_IOCTL(DM_TABLE_STATUS) COMPATIBLE_IOCTL(DM_LIST_VERSIONS) +COMPATIBLE_IOCTL(DM_TARGET_MSG) /* Big K */ COMPATIBLE_IOCTL(PIO_FONT) COMPATIBLE_IOCTL(GIO_FONT) diff -Nru a/include/linux/device-mapper.h b/include/linux/device-mapper.h --- a/include/linux/device-mapper.h 2004-11-29 21:22:08 -08:00 +++ b/include/linux/device-mapper.h 2004-11-29 21:22:08 -08:00 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001 Sistina Software (UK) Limited. + * Copyright (C) 2004 Red Hat, Inc. All rights reserved. * * This file is released under the LGPL. */ @@ -57,6 +58,8 @@ typedef int (*dm_status_fn) (struct dm_target *ti, status_type_t status_type, char *result, unsigned int maxlen); +typedef int (*dm_message_fn) (struct dm_target *ti, unsigned argc, char **argv); + void dm_error(const char *message); /* @@ -82,6 +85,7 @@ dm_suspend_fn suspend; dm_resume_fn resume; dm_status_fn status; + dm_message_fn message; }; struct io_restrictions { diff -Nru a/include/linux/dio.h b/include/linux/dio.h --- a/include/linux/dio.h 2004-11-29 21:22:08 -08:00 +++ b/include/linux/dio.h 2004-11-29 21:22:08 -08:00 @@ -254,7 +254,7 @@ #define dio_resource_start(d) ((d)->resource.start) #define dio_resource_end(d) ((d)->resource.end) -#define dio_resource_len(d) ((d)->resource.end-(z)->resource.start+1) +#define dio_resource_len(d) ((d)->resource.end-(d)->resource.start+1) #define dio_resource_flags(d) ((d)->resource.flags) #define dio_request_device(d, name) \ diff -Nru a/include/linux/dm-ioctl.h b/include/linux/dm-ioctl.h --- a/include/linux/dm-ioctl.h 2004-11-29 21:22:06 -08:00 +++ b/include/linux/dm-ioctl.h 2004-11-29 21:22:06 -08:00 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001 - 2003 Sistina Software (UK) Limited. + * Copyright (C) 2004 Red Hat, Inc. All rights reserved. * * This file is released under the LGPL. */ @@ -76,6 +77,9 @@ * * DM_TABLE_STATUS: * Return the targets status for the 'active' table. + * + * DM_TARGET_MSG: + * Pass a message string to the target at a specific offset of a device. */ /* @@ -179,6 +183,15 @@ }; /* + * Used to pass message to a target + */ +struct dm_target_msg { + uint64_t sector; /* Device sector */ + + char message[0]; +}; + +/* * If you change this make sure you make the corresponding change * to dm-ioctl.c:lookup_ioctl() */ @@ -204,6 +217,7 @@ /* Added later */ DM_LIST_VERSIONS_CMD, + DM_TARGET_MSG_CMD, }; /* @@ -232,6 +246,7 @@ #define DM_TABLE_DEPS_32 _IOWR(DM_IOCTL, DM_TABLE_DEPS_CMD, ioctl_struct) #define DM_TABLE_STATUS_32 _IOWR(DM_IOCTL, DM_TABLE_STATUS_CMD, ioctl_struct) #define DM_LIST_VERSIONS_32 _IOWR(DM_IOCTL, DM_LIST_VERSIONS_CMD, ioctl_struct) +#define DM_TARGET_MSG_32 _IOWR(DM_IOCTL, DM_TARGET_MSG_CMD, ioctl_struct) #endif #define DM_IOCTL 0xfd @@ -254,10 +269,12 @@ #define DM_LIST_VERSIONS _IOWR(DM_IOCTL, DM_LIST_VERSIONS_CMD, struct dm_ioctl) +#define DM_TARGET_MSG _IOWR(DM_IOCTL, DM_TARGET_MSG_CMD, struct dm_ioctl) + #define DM_VERSION_MAJOR 4 -#define DM_VERSION_MINOR 1 +#define DM_VERSION_MINOR 3 #define DM_VERSION_PATCHLEVEL 0 -#define DM_VERSION_EXTRA "-ioctl (2003-12-10)" +#define DM_VERSION_EXTRA "-ioctl (2004-09-30)" /* Status bits */ #define DM_READONLY_FLAG (1 << 0) /* In/Out */ diff -Nru a/include/linux/efi.h b/include/linux/efi.h --- a/include/linux/efi.h 2004-11-29 21:22:08 -08:00 +++ b/include/linux/efi.h 2004-11-29 21:22:08 -08:00 @@ -306,7 +306,7 @@ extern struct efi_memory_map memmap; #ifdef CONFIG_EFI_PCDP -extern void __init efi_setup_pcdp_console(char *); +extern int __init efi_setup_pcdp_console(char *); #endif /* diff -Nru a/include/linux/efs_fs.h b/include/linux/efs_fs.h --- a/include/linux/efs_fs.h 2004-11-29 21:22:07 -08:00 +++ b/include/linux/efs_fs.h 2004-11-29 21:22:07 -08:00 @@ -45,6 +45,7 @@ extern int efs_get_block(struct inode *, sector_t, struct buffer_head *, int); extern struct dentry *efs_lookup(struct inode *, struct dentry *, struct nameidata *); +extern struct dentry *efs_get_parent(struct dentry *); extern int efs_bmap(struct inode *, int); #endif /* __EFS_FS_H__ */ diff -Nru a/include/linux/i2o.h b/include/linux/i2o.h --- a/include/linux/i2o.h 2004-11-29 21:22:07 -08:00 +++ b/include/linux/i2o.h 2004-11-29 21:22:07 -08:00 @@ -162,9 +162,9 @@ struct notifier_block *event_notifer; /* Events */ atomic_t users; struct list_head list; /* Controller list */ - void *post_port; /* Inbout port address */ - void *reply_port; /* Outbound port address */ - void *irq_mask; /* Interrupt register address */ + void __iomem *post_port; /* Inbout port address */ + void __iomem *reply_port; /* Outbound port address */ + void __iomem *irq_mask; /* Interrupt register address */ /* Dynamic LCT related data */ @@ -241,8 +241,8 @@ extern struct list_head i2o_controllers; /* Message functions */ -static inline u32 i2o_msg_get(struct i2o_controller *, struct i2o_message **); -extern u32 i2o_msg_get_wait(struct i2o_controller *, struct i2o_message **, +static inline u32 i2o_msg_get(struct i2o_controller *, struct i2o_message __iomem **); +extern u32 i2o_msg_get_wait(struct i2o_controller *, struct i2o_message __iomem **, int); static inline void i2o_msg_post(struct i2o_controller *, u32); static inline int i2o_msg_post_wait(struct i2o_controller *, u32, @@ -263,7 +263,6 @@ /* IOP functions */ extern int i2o_status_get(struct i2o_controller *); -extern int i2o_hrt_get(struct i2o_controller *); extern int i2o_event_register(struct i2o_device *, struct i2o_driver *, int, u32); @@ -385,7 +384,6 @@ /* Exec OSM functions */ extern int i2o_exec_lct_get(struct i2o_controller *); -extern int i2o_exec_lct_notify(struct i2o_controller *, u32); /* device to i2o_device and driver to i2o_driver convertion functions */ #define to_i2o_driver(drv) container_of(drv,struct i2o_driver, driver) @@ -445,7 +443,7 @@ * available returns I2O_QUEUE_EMPTY and msg is leaved untouched. */ static inline u32 i2o_msg_get(struct i2o_controller *c, - struct i2o_message **msg) + struct i2o_message __iomem **msg) { u32 m; @@ -515,10 +513,8 @@ static inline struct i2o_message *i2o_msg_out_to_virt(struct i2o_controller *c, u32 m) { - if (unlikely - (m < c->out_queue.phys - || m >= c->out_queue.phys + c->out_queue.len)) - BUG(); + BUG_ON(m < c->out_queue.phys + || m >= c->out_queue.phys + c->out_queue.len); return c->out_queue.virt + (m - c->out_queue.phys); }; @@ -534,7 +530,7 @@ * work for receive side messages as they are kmalloc objects * in a different pool. */ -static inline struct i2o_message *i2o_msg_in_to_virt(struct i2o_controller *c, +static inline struct i2o_message __iomem *i2o_msg_in_to_virt(struct i2o_controller *c, u32 m) { return c->in_queue.virt + m; @@ -633,7 +629,6 @@ #define i2o_raw_writel(val, mem) __raw_writel(cpu_to_le32(val), mem) extern int i2o_parm_field_get(struct i2o_device *, int, int, void *, int); -extern int i2o_parm_field_set(struct i2o_device *, int, int, void *, int); extern int i2o_parm_table_get(struct i2o_device *, int, int, int, void *, int, void *, int); /* FIXME: remove diff -Nru a/include/linux/jffs2_fs_i.h b/include/linux/jffs2_fs_i.h --- a/include/linux/jffs2_fs_i.h 2004-11-29 21:22:08 -08:00 +++ b/include/linux/jffs2_fs_i.h 2004-11-29 21:22:08 -08:00 @@ -1,10 +1,11 @@ -/* $Id: jffs2_fs_i.h,v 1.16 2003/01/09 14:03:21 dwmw2 Exp $ */ +/* $Id: jffs2_fs_i.h,v 1.17 2004/11/11 23:51:27 dwmw2 Exp $ */ #ifndef _JFFS2_FS_I #define _JFFS2_FS_I #include #include +#include struct jffs2_inode_info { /* We need an internal semaphore similar to inode->i_sem. diff -Nru a/include/linux/mc146818rtc.h b/include/linux/mc146818rtc.h --- a/include/linux/mc146818rtc.h 2004-11-29 21:22:08 -08:00 +++ b/include/linux/mc146818rtc.h 2004-11-29 21:22:08 -08:00 @@ -13,10 +13,12 @@ #include #include /* get the user-level API */ -#include /* spinlock_t */ #include /* register access macros */ +#ifdef __KERNEL__ +#include /* spinlock_t */ extern spinlock_t rtc_lock; /* serialize CMOS RAM access */ +#endif /********************************************************************** * register summary diff -Nru a/include/linux/mm.h b/include/linux/mm.h --- a/include/linux/mm.h 2004-11-29 21:22:06 -08:00 +++ b/include/linux/mm.h 2004-11-29 21:22:06 -08:00 @@ -675,7 +675,7 @@ extern struct anon_vma *find_mergeable_anon_vma(struct vm_area_struct *); extern int split_vma(struct mm_struct *, struct vm_area_struct *, unsigned long addr, int new_below); -extern void insert_vm_struct(struct mm_struct *, struct vm_area_struct *); +extern int insert_vm_struct(struct mm_struct *, struct vm_area_struct *); extern void __vma_link_rb(struct mm_struct *, struct vm_area_struct *, struct rb_node **, struct rb_node *); extern struct vm_area_struct *copy_vma(struct vm_area_struct **, diff -Nru a/include/linux/module.h b/include/linux/module.h --- a/include/linux/module.h 2004-11-29 21:22:08 -08:00 +++ b/include/linux/module.h 2004-11-29 21:22:08 -08:00 @@ -559,7 +559,7 @@ void *addr; }; -static inline void __deprecated MODULE_PARM_(void) { } +static inline void MODULE_PARM_(void) { } #ifdef MODULE /* DEPRECATED: Do not use. */ #define MODULE_PARM(var,type) \ diff -Nru a/include/linux/mount.h b/include/linux/mount.h --- a/include/linux/mount.h 2004-11-29 21:22:06 -08:00 +++ b/include/linux/mount.h 2004-11-29 21:22:06 -08:00 @@ -13,6 +13,8 @@ #ifdef __KERNEL__ #include +#include +#include #define MNT_NOSUID 1 #define MNT_NODEV 2 diff -Nru a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h --- a/include/linux/mtd/cfi.h 2004-11-29 21:22:07 -08:00 +++ b/include/linux/mtd/cfi.h 2004-11-29 21:22:07 -08:00 @@ -1,7 +1,7 @@ /* Common Flash Interface structures * See http://support.intel.com/design/flash/technote/index.htm - * $Id: cfi.h,v 1.48 2004/10/20 23:08:05 dwmw2 Exp $ + * $Id: cfi.h,v 1.49 2004/11/15 20:56:32 nico Exp $ */ #ifndef __MTD_CFI_H__ @@ -145,6 +145,24 @@ uint16_t ProtRegAddr; uint8_t FactProtRegSize; uint8_t UserProtRegSize; + uint8_t extra[0]; +} __attribute__((packed)); + +struct cfi_intelext_blockinfo { + uint16_t NumIdentBlocks; + uint16_t BlockSize; + uint16_t MinBlockEraseCycles; + uint8_t BitsPerCell; + uint8_t BlockCap; +} __attribute__((packed)); + +struct cfi_intelext_regioninfo { + uint16_t NumIdentPartitions; + uint8_t NumOpAllowed; + uint8_t NumOpAllowedSimProgMode; + uint8_t NumOpAllowedSimEraMode; + uint8_t NumBlockTypes; + struct cfi_intelext_blockinfo BlockTypes[1]; } __attribute__((packed)); /* Vendor-Specific PRI for AMD/Fujitsu Extended Command Set (0x0002) */ diff -Nru a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h --- a/include/linux/mtd/partitions.h 2004-11-29 21:22:08 -08:00 +++ b/include/linux/mtd/partitions.h 2004-11-29 21:22:08 -08:00 @@ -5,7 +5,7 @@ * * This code is GPL * - * $Id: partitions.h,v 1.15 2003/07/09 11:15:43 dwmw2 Exp $ + * $Id: partitions.h,v 1.16 2004/11/16 18:34:40 dwmw2 Exp $ */ #ifndef MTD_PARTITIONS_H @@ -64,7 +64,6 @@ int (*parse_fn)(struct mtd_info *, struct mtd_partition **, unsigned long); }; -extern struct mtd_part_parser *get_partition_parser(const char *name); extern int register_mtd_parser(struct mtd_part_parser *parser); extern int deregister_mtd_parser(struct mtd_part_parser *parser); extern int parse_mtd_partitions(struct mtd_info *master, const char **types, diff -Nru a/include/linux/netdevice.h b/include/linux/netdevice.h --- a/include/linux/netdevice.h 2004-11-29 21:22:08 -08:00 +++ b/include/linux/netdevice.h 2004-11-29 21:22:08 -08:00 @@ -925,6 +925,9 @@ extern atomic_t netdev_dropping; extern int netdev_set_master(struct net_device *dev, struct net_device *master); extern int skb_checksum_help(struct sk_buff *skb, int inward); +/* rx skb timestamps */ +extern void net_enable_timestamp(void); +extern void net_disable_timestamp(void); #ifdef CONFIG_SYSCTL extern char *net_sysctl_strdup(const char *s); diff -Nru a/include/linux/netfilter.h b/include/linux/netfilter.h --- a/include/linux/netfilter.h 2004-11-29 21:22:07 -08:00 +++ b/include/linux/netfilter.h 2004-11-29 21:22:07 -08:00 @@ -173,6 +173,7 @@ unsigned int verdict); extern void (*ip_ct_attach)(struct sk_buff *, struct sk_buff *); +extern void nf_ct_attach(struct sk_buff *, struct sk_buff *); #ifdef CONFIG_NETFILTER_DEBUG extern void nf_dump_skb(int pf, struct sk_buff *skb); @@ -183,6 +184,7 @@ #else /* !CONFIG_NETFILTER */ #define NF_HOOK(pf, hook, skb, indev, outdev, okfn) (okfn)(skb) +static inline void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb) {} #endif /*CONFIG_NETFILTER*/ #endif /*__KERNEL__*/ diff -Nru a/include/linux/netfilter_ipv4/ip_nat_protocol.h b/include/linux/netfilter_ipv4/ip_nat_protocol.h --- a/include/linux/netfilter_ipv4/ip_nat_protocol.h 2004-11-29 21:22:07 -08:00 +++ b/include/linux/netfilter_ipv4/ip_nat_protocol.h 2004-11-29 21:22:07 -08:00 @@ -18,7 +18,7 @@ /* Do a packet translation according to the ip_nat_proto_manip * and manip type. Return true if succeeded. */ int (*manip_pkt)(struct sk_buff **pskb, - unsigned int hdroff, + unsigned int iphdroff, const struct ip_conntrack_manip *manip, enum ip_nat_manip_type maniptype); diff -Nru a/include/linux/pci_ids.h b/include/linux/pci_ids.h --- a/include/linux/pci_ids.h 2004-11-29 21:22:09 -08:00 +++ b/include/linux/pci_ids.h 2004-11-29 21:22:09 -08:00 @@ -523,6 +523,7 @@ #define PCI_VENDOR_ID_DELL 0x1028 #define PCI_DEVICE_ID_DELL_RACIII 0x0008 +#define PCI_DEVICE_ID_DELL_RAC4 0x0012 #define PCI_VENDOR_ID_MATROX 0x102B #define PCI_DEVICE_ID_MATROX_MGA_2 0x0518 @@ -1082,6 +1083,7 @@ #define PCI_DEVICE_ID_NVIDIA_NVENET_8 0x0056 #define PCI_DEVICE_ID_NVIDIA_NVENET_9 0x0057 #define PCI_DEVICE_ID_NVIDIA_CK804_AUDIO 0x0059 +#define PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS 0x0064 #define PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE 0x0065 #define PCI_DEVICE_ID_NVIDIA_NVENET_2 0x0066 #define PCI_DEVICE_ID_NVIDIA_MCP2_AUDIO 0x006a @@ -1093,6 +1095,7 @@ #define PCI_DEVICE_ID_NVIDIA_NFORCE3 0x00d1 #define PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO 0x00da #define PCI_DEVICE_ID_NVIDIA_NFORCE3S 0x00e1 +#define PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS 0x00d4 #define PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE 0x00d5 #define PCI_DEVICE_ID_NVIDIA_NVENET_3 0x00d6 #define PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO 0x00da @@ -1140,6 +1143,7 @@ #define PCI_DEVICE_ID_NVIDIA_QUADRO4_900XGL 0x0258 #define PCI_DEVICE_ID_NVIDIA_QUADRO4_750XGL 0x0259 #define PCI_DEVICE_ID_NVIDIA_QUADRO4_700XGL 0x025B +#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO_5200 0x0329 #define PCI_VENDOR_ID_IMS 0x10e0 #define PCI_DEVICE_ID_IMS_8849 0x8849 @@ -1918,11 +1922,15 @@ #define PCI_DEVICE_ID_TIGON3_5704S 0x16a8 #define PCI_DEVICE_ID_TIGON3_5702A3 0x16c6 #define PCI_DEVICE_ID_TIGON3_5703A3 0x16c7 +#define PCI_DEVICE_ID_TIGON3_5781 0x16dd +#define PCI_DEVICE_ID_TIGON3_5753 0x16f7 +#define PCI_DEVICE_ID_TIGON3_5753M 0x16fd +#define PCI_DEVICE_ID_TIGON3_5753F 0x16fe #define PCI_DEVICE_ID_TIGON3_5901 0x170d +#define PCI_DEVICE_ID_BCM4401B1 0x170c #define PCI_DEVICE_ID_TIGON3_5901_2 0x170e #define PCI_DEVICE_ID_BCM4401 0x4401 #define PCI_DEVICE_ID_BCM4401B0 0x4402 -#define PCI_DEVICE_ID_BCM4401B1 0x170c #define PCI_VENDOR_ID_ENE 0x1524 #define PCI_DEVICE_ID_ENE_1211 0x1211 diff -Nru a/include/linux/rmap.h b/include/linux/rmap.h --- a/include/linux/rmap.h 2004-11-29 21:22:06 -08:00 +++ b/include/linux/rmap.h 2004-11-29 21:22:06 -08:00 @@ -89,7 +89,7 @@ /* * Called from mm/vmscan.c to handle paging out */ -int page_referenced(struct page *, int is_locked); +int page_referenced(struct page *, int is_locked, int ignore_token); int try_to_unmap(struct page *); /* @@ -103,7 +103,7 @@ #define anon_vma_prepare(vma) (0) #define anon_vma_link(vma) do {} while (0) -#define page_referenced(page,l) TestClearPageReferenced(page) +#define page_referenced(page,l,i) TestClearPageReferenced(page) #define try_to_unmap(page) SWAP_FAIL #endif /* CONFIG_MMU */ diff -Nru a/include/linux/serial.h b/include/linux/serial.h --- a/include/linux/serial.h 2004-11-29 21:22:06 -08:00 +++ b/include/linux/serial.h 2004-11-29 21:22:06 -08:00 @@ -181,6 +181,8 @@ /* Allow architectures to override entries in serial8250_ports[] at run time: */ struct uart_port; /* forward declaration */ extern int early_serial_setup(struct uart_port *port); +extern int early_serial_console_init(char *options); +extern int serial8250_start_console(struct uart_port *port, char *options); #endif /* __KERNEL__ */ #endif /* _LINUX_SERIAL_H */ diff -Nru a/include/linux/sonypi.h b/include/linux/sonypi.h --- a/include/linux/sonypi.h 2004-11-29 21:22:07 -08:00 +++ b/include/linux/sonypi.h 2004-11-29 21:22:07 -08:00 @@ -122,27 +122,27 @@ /* used only for communication between v4l and sonypi */ -#define SONYPI_COMMAND_GETCAMERA 1 +#define SONYPI_COMMAND_GETCAMERA 1 /* obsolete */ #define SONYPI_COMMAND_SETCAMERA 2 -#define SONYPI_COMMAND_GETCAMERABRIGHTNESS 3 +#define SONYPI_COMMAND_GETCAMERABRIGHTNESS 3 /* obsolete */ #define SONYPI_COMMAND_SETCAMERABRIGHTNESS 4 -#define SONYPI_COMMAND_GETCAMERACONTRAST 5 +#define SONYPI_COMMAND_GETCAMERACONTRAST 5 /* obsolete */ #define SONYPI_COMMAND_SETCAMERACONTRAST 6 -#define SONYPI_COMMAND_GETCAMERAHUE 7 +#define SONYPI_COMMAND_GETCAMERAHUE 7 /* obsolete */ #define SONYPI_COMMAND_SETCAMERAHUE 8 -#define SONYPI_COMMAND_GETCAMERACOLOR 9 +#define SONYPI_COMMAND_GETCAMERACOLOR 9 /* obsolete */ #define SONYPI_COMMAND_SETCAMERACOLOR 10 -#define SONYPI_COMMAND_GETCAMERASHARPNESS 11 +#define SONYPI_COMMAND_GETCAMERASHARPNESS 11 /* obsolete */ #define SONYPI_COMMAND_SETCAMERASHARPNESS 12 -#define SONYPI_COMMAND_GETCAMERAPICTURE 13 +#define SONYPI_COMMAND_GETCAMERAPICTURE 13 /* obsolete */ #define SONYPI_COMMAND_SETCAMERAPICTURE 14 -#define SONYPI_COMMAND_GETCAMERAAGC 15 +#define SONYPI_COMMAND_GETCAMERAAGC 15 /* obsolete */ #define SONYPI_COMMAND_SETCAMERAAGC 16 -#define SONYPI_COMMAND_GETCAMERADIRECTION 17 -#define SONYPI_COMMAND_GETCAMERAROMVERSION 18 -#define SONYPI_COMMAND_GETCAMERAREVISION 19 +#define SONYPI_COMMAND_GETCAMERADIRECTION 17 /* obsolete */ +#define SONYPI_COMMAND_GETCAMERAROMVERSION 18 /* obsolete */ +#define SONYPI_COMMAND_GETCAMERAREVISION 19 /* obsolete */ -u8 sonypi_camera_command(int command, u8 value); +int sonypi_camera_command(int command, u8 value); #endif /* __KERNEL__ */ diff -Nru a/include/linux/sysrq.h b/include/linux/sysrq.h --- a/include/linux/sysrq.h 2004-11-29 21:22:06 -08:00 +++ b/include/linux/sysrq.h 2004-11-29 21:22:06 -08:00 @@ -33,6 +33,7 @@ void __handle_sysrq(int, struct pt_regs *, struct tty_struct *); int register_sysrq_key(int, struct sysrq_key_op *); int unregister_sysrq_key(int, struct sysrq_key_op *); +struct sysrq_key_op *__sysrq_get_key_op(int key); #else diff -Nru a/include/media/saa7146.h b/include/media/saa7146.h --- a/include/media/saa7146.h 2004-11-29 21:22:06 -08:00 +++ b/include/media/saa7146.h 2004-11-29 21:22:06 -08:00 @@ -123,7 +123,7 @@ spinlock_t slock; struct semaphore lock; - unsigned char *mem; /* pointer to mapped IO memory */ + unsigned char __iomem *mem; /* pointer to mapped IO memory */ int revision; /* chip revision; needed for bug-workarounds*/ /* pci-device & irq stuff*/ diff -Nru a/include/media/tuner.h b/include/media/tuner.h --- a/include/media/tuner.h 2004-11-29 21:22:08 -08:00 +++ b/include/media/tuner.h 2004-11-29 21:22:08 -08:00 @@ -76,6 +76,7 @@ #define TUNER_TNF_8831BGFF 48 #define TUNER_MICROTUNE_4042FI5 49 /* FusionHDTV 3 Gold - 4042 FI5 (3X 8147) */ #define TUNER_TCL_2002N 50 +#define TUNER_PHILIPS_FM1256_IH3 51 #define NOTUNER 0 #define PAL 1 /* PAL_BG */ diff -Nru a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h --- a/include/net/bluetooth/hci.h 2004-11-29 21:22:08 -08:00 +++ b/include/net/bluetooth/hci.h 2004-11-29 21:22:08 -08:00 @@ -170,6 +170,8 @@ #define HCI_LM_AUTH 0x0002 #define HCI_LM_ENCRYPT 0x0004 #define HCI_LM_TRUSTED 0x0008 +#define HCI_LM_RELIABLE 0x0010 +#define HCI_LM_SECURE 0x0020 /* ----- HCI Commands ---- */ /* OGF & OCF values */ diff -Nru a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h --- a/include/net/bluetooth/l2cap.h 2004-11-29 21:22:06 -08:00 +++ b/include/net/bluetooth/l2cap.h 2004-11-29 21:22:06 -08:00 @@ -56,6 +56,8 @@ #define L2CAP_LM_AUTH 0x0002 #define L2CAP_LM_ENCRYPT 0x0004 #define L2CAP_LM_TRUSTED 0x0008 +#define L2CAP_LM_RELIABLE 0x0010 +#define L2CAP_LM_SECURE 0x0020 #define L2CAP_QOS 0x04 struct l2cap_qos { diff -Nru a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h --- a/include/net/sctp/sctp.h 2004-11-29 21:22:07 -08:00 +++ b/include/net/sctp/sctp.h 2004-11-29 21:22:07 -08:00 @@ -607,14 +607,14 @@ /* Is a socket of this style? */ #define sctp_style(sk, style) __sctp_style((sk), (SCTP_SOCKET_##style)) -int static inline __sctp_style(const struct sock *sk, sctp_socket_type_t style) +static inline int __sctp_style(const struct sock *sk, sctp_socket_type_t style) { return sctp_sk(sk)->type == style; } /* Is the association in this state? */ #define sctp_state(asoc, state) __sctp_state((asoc), (SCTP_STATE_##state)) -int static inline __sctp_state(const struct sctp_association *asoc, +static inline int __sctp_state(const struct sctp_association *asoc, sctp_state_t state) { return asoc->state == state; @@ -622,7 +622,7 @@ /* Is the socket in this state? */ #define sctp_sstate(sk, state) __sctp_sstate((sk), (SCTP_SS_##state)) -int static inline __sctp_sstate(const struct sock *sk, sctp_sock_state_t state) +static inline int __sctp_sstate(const struct sock *sk, sctp_sock_state_t state) { return sk->sk_state == state; } diff -Nru a/include/net/sock.h b/include/net/sock.h --- a/include/net/sock.h 2004-11-29 21:22:08 -08:00 +++ b/include/net/sock.h 2004-11-29 21:22:08 -08:00 @@ -556,6 +556,8 @@ kmem_cache_t *slab; int slab_obj_size; + struct module *owner; + char name[32]; struct { @@ -1270,19 +1272,7 @@ __kfree_skb(skb); } -extern atomic_t netstamp_needed; extern void sock_enable_timestamp(struct sock *sk); - -static inline void net_timestamp(struct timeval *stamp) -{ - if (atomic_read(&netstamp_needed)) - do_gettimeofday(stamp); - else { - stamp->tv_sec = 0; - stamp->tv_usec = 0; - } -} - extern int sock_get_timestamp(struct sock *, struct timeval __user *); /* diff -Nru a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h --- a/include/scsi/scsi_device.h 2004-11-29 21:22:06 -08:00 +++ b/include/scsi/scsi_device.h 2004-11-29 21:22:06 -08:00 @@ -111,6 +111,7 @@ unsigned allow_restart:1; /* issue START_UNIT in error handler */ unsigned no_uld_attach:1; /* disable connecting to upper level drivers */ unsigned select_no_atn:1; + unsigned fix_capacity:1; /* READ_CAPACITY is too high by 1 */ unsigned int device_blocked; /* Device returned QUEUE_FULL. */ diff -Nru a/include/video/tgafb.h b/include/video/tgafb.h --- a/include/video/tgafb.h 2004-11-29 21:22:08 -08:00 +++ b/include/video/tgafb.h 2004-11-29 21:22:08 -08:00 @@ -176,9 +176,9 @@ struct pci_dev *pdev; /* Device dependent information. */ - void *tga_mem_base; - void *tga_fb_base; - void *tga_regs_base; + void __iomem *tga_mem_base; + void __iomem *tga_fb_base; + void __iomem *tga_regs_base; u8 tga_type; /* TGA_TYPE_XXX */ u8 tga_chip_rev; /* dc21030 revision */ diff -Nru a/init/Kconfig b/init/Kconfig --- a/init/Kconfig 2004-11-29 21:22:08 -08:00 +++ b/init/Kconfig 2004-11-29 21:22:08 -08:00 @@ -326,7 +326,7 @@ which may be appropriate on small systems without swap. config CC_ALIGN_FUNCTIONS - int "Function alignment" if EMBDEDDED + int "Function alignment" if EMBEDDED default 0 help Align the start of functions to the next power-of-two greater than n, diff -Nru a/init/do_mounts.c b/init/do_mounts.c --- a/init/do_mounts.c 2004-11-29 21:22:07 -08:00 +++ b/init/do_mounts.c 2004-11-29 21:22:07 -08:00 @@ -142,7 +142,7 @@ int part; #ifdef CONFIG_SYSFS - sys_mkdir("/sys", 0700); + int mkdir_err = sys_mkdir("/sys", 0700); if (sys_mount("sysfs", "/sys", "sysfs", 0, NULL) < 0) goto out; #endif @@ -197,7 +197,8 @@ #ifdef CONFIG_SYSFS sys_umount("/sys", 0); out: - sys_rmdir("/sys"); + if (!mkdir_err) + sys_rmdir("/sys"); #endif return res; fail: diff -Nru a/kernel/exit.c b/kernel/exit.c --- a/kernel/exit.c 2004-11-29 21:22:08 -08:00 +++ b/kernel/exit.c 2004-11-29 21:22:08 -08:00 @@ -529,7 +529,6 @@ /* We don't want people slaying init. */ if (p->exit_signal != -1) p->exit_signal = SIGCHLD; - p->self_exec_id++; if (p->pdeath_signal) /* We already hold the tasklist_lock here. */ diff -Nru a/kernel/fork.c b/kernel/fork.c --- a/kernel/fork.c 2004-11-29 21:22:06 -08:00 +++ b/kernel/fork.c 2004-11-29 21:22:06 -08:00 @@ -118,10 +118,7 @@ * value: the thread structures can take up at most half * of memory. */ - if (THREAD_SIZE >= PAGE_SIZE) - max_threads = mempages / (THREAD_SIZE/PAGE_SIZE) / 8; - else - max_threads = mempages / 8; + max_threads = mempages / (8 * THREAD_SIZE / PAGE_SIZE); /* * we need to allow at least 20 threads to boot a system diff -Nru a/kernel/futex.c b/kernel/futex.c --- a/kernel/futex.c 2004-11-29 21:22:07 -08:00 +++ b/kernel/futex.c 2004-11-29 21:22:07 -08:00 @@ -6,7 +6,7 @@ * (C) Copyright 2003 Red Hat Inc, All Rights Reserved * * Removed page pinning, fix privately mapped COW pages and other cleanups - * (C) Copyright 2003 Jamie Lokier + * (C) Copyright 2003, 2004 Jamie Lokier * * Thanks to Ben LaHaise for yelling "hashed waitqueues" loudly * enough at me, Linus for the original (flawed) idea, Matthew @@ -486,22 +486,37 @@ if (unlikely(ret != 0)) goto out_release_sem; + queue_me(&q, -1, NULL); + /* - * Access the page after the futex is queued. + * Access the page AFTER the futex is queued. + * Order is important: + * + * Userspace waiter: val = var; if (cond(val)) futex_wait(&var, val); + * Userspace waker: if (cond(var)) { var = new; futex_wake(&var); } + * + * The basic logical guarantee of a futex is that it blocks ONLY + * if cond(var) is known to be true at the time of blocking, for + * any cond. If we queued after testing *uaddr, that would open + * a race condition where we could block indefinitely with + * cond(var) false, which would violate the guarantee. + * + * A consequence is that futex_wait() can return zero and absorb + * a wakeup when *uaddr != val on entry to the syscall. This is + * rare, but normal. + * * We hold the mmap semaphore, so the mapping cannot have changed - * since we looked it up. + * since we looked it up in get_futex_key. */ if (get_user(curval, (int __user *)uaddr) != 0) { ret = -EFAULT; - goto out_release_sem; + goto out_unqueue; } if (curval != val) { ret = -EWOULDBLOCK; - goto out_release_sem; + goto out_unqueue; } - queue_me(&q, -1, NULL); - /* * Now the futex is queued and we have checked the data, we * don't want to hold mmap_sem while we sleep. @@ -538,14 +553,15 @@ return 0; if (time == 0) return -ETIMEDOUT; - /* A spurious wakeup should never happen. */ - WARN_ON(!signal_pending(current)); + /* We expect signal_pending(current), but another thread may + * have handled it for us already. */ return -EINTR; + out_unqueue: /* If we were woken (and unqueued), we succeeded, whatever. */ if (!unqueue_me(&q)) ret = 0; -out_release_sem: + out_release_sem: up_read(¤t->mm->mmap_sem); return ret; } diff -Nru a/kernel/printk.c b/kernel/printk.c --- a/kernel/printk.c 2004-11-29 21:22:08 -08:00 +++ b/kernel/printk.c 2004-11-29 21:22:08 -08:00 @@ -142,7 +142,7 @@ strcpy(name, "ttyS1"); #endif for(s = name; *s; s++) - if (*s >= '0' && *s <= '9') + if ((*s >= '0' && *s <= '9') || *s == ',') break; idx = simple_strtoul(s, NULL, 10); *s = 0; diff -Nru a/kernel/sched.c b/kernel/sched.c --- a/kernel/sched.c 2004-11-29 21:22:08 -08:00 +++ b/kernel/sched.c 2004-11-29 21:22:08 -08:00 @@ -217,7 +217,16 @@ unsigned long cpu_load; #endif unsigned long long nr_switches; - unsigned long expired_timestamp, nr_uninterruptible; + + /* + * This is part of a global counter where only the total sum + * over all CPUs matters. A task can increase this counter on + * one CPU and if it got migrated afterwards it may decrease + * it on another CPU. Always updated under the runqueue lock: + */ + unsigned long nr_uninterruptible; + + unsigned long expired_timestamp; unsigned long long timestamp_last_tick; task_t *curr, *idle; struct mm_struct *prev_mm; @@ -762,8 +771,6 @@ static void deactivate_task(struct task_struct *p, runqueue_t *rq) { rq->nr_running--; - if (p->state == TASK_UNINTERRUPTIBLE) - rq->nr_uninterruptible++; dequeue_task(p, p->array); p->array = NULL; } @@ -983,14 +990,14 @@ int cpu, this_cpu, success = 0; unsigned long flags; long old_state; - runqueue_t *rq, *old_rq; + runqueue_t *rq; #ifdef CONFIG_SMP unsigned long load, this_load; struct sched_domain *sd; int new_cpu; #endif - old_rq = rq = task_rq_lock(p, &flags); + rq = task_rq_lock(p, &flags); schedstat_inc(rq, ttwu_cnt); old_state = p->state; if (!(old_state & state)) @@ -1085,7 +1092,7 @@ out_activate: #endif /* CONFIG_SMP */ if (old_state == TASK_UNINTERRUPTIBLE) { - old_rq->nr_uninterruptible--; + rq->nr_uninterruptible--; /* * Tasks on involuntary sleep don't earn * sleep_avg beyond just interactive state. @@ -1415,6 +1422,13 @@ for_each_cpu(i) sum += cpu_rq(i)->nr_uninterruptible; + /* + * Since we read the counters lockless, it might be slightly + * inaccurate. Do not allow it to go below zero though: + */ + if (unlikely((long)sum < 0)) + sum = 0; + return sum; } @@ -2581,8 +2595,11 @@ if (unlikely((prev->state & TASK_INTERRUPTIBLE) && unlikely(signal_pending(prev)))) prev->state = TASK_RUNNING; - else + else { + if (prev->state == TASK_UNINTERRUPTIBLE) + rq->nr_uninterruptible++; deactivate_task(prev, rq); + } } cpu = smp_processor_id(); @@ -3914,6 +3931,26 @@ __migrate_task(tsk, dead_cpu, dest_cpu); } +/* + * While a dead CPU has no uninterruptible tasks queued at this point, + * it might still have a nonzero ->nr_uninterruptible counter, because + * for performance reasons the counter is not stricly tracking tasks to + * their home CPUs. So we just add the counter to another CPU's counter, + * to keep the global sum constant after CPU-down: + */ +static void migrate_nr_uninterruptible(runqueue_t *rq_src) +{ + runqueue_t *rq_dest = cpu_rq(any_online_cpu(CPU_MASK_ALL)); + unsigned long flags; + + local_irq_save(flags); + double_rq_lock(rq_src, rq_dest); + rq_dest->nr_uninterruptible += rq_src->nr_uninterruptible; + rq_src->nr_uninterruptible = 0; + double_rq_unlock(rq_src, rq_dest); + local_irq_restore(flags); +} + /* Run through task list and migrate tasks from the dead cpu. */ static void migrate_live_tasks(int src_cpu) { @@ -4048,6 +4085,7 @@ __setscheduler(rq->idle, SCHED_NORMAL, 0); migrate_dead_tasks(cpu); task_rq_unlock(rq, &flags); + migrate_nr_uninterruptible(rq); BUG_ON(rq->nr_running != 0); /* No need to migrate the tasks: it was best-effort if diff -Nru a/kernel/timer.c b/kernel/timer.c --- a/kernel/timer.c 2004-11-29 21:22:08 -08:00 +++ b/kernel/timer.c 2004-11-29 21:22:08 -08:00 @@ -308,6 +308,8 @@ goto repeat; } list_del(&timer->entry); + /* Need to make sure that anybody who sees a NULL base also sees the list ops */ + smp_wmb(); timer->base = NULL; spin_unlock_irqrestore(&base->lock, flags); diff -Nru a/lib/Kconfig.debug b/lib/Kconfig.debug --- a/lib/Kconfig.debug 2004-11-29 21:22:08 -08:00 +++ b/lib/Kconfig.debug 2004-11-29 21:22:08 -08:00 @@ -1,14 +1,14 @@ config DEBUG_KERNEL bool "Kernel debugging" - depends on (ALPHA || ARM || CRIS || H8300 || X86 || IA64 || M68K || M68KNOMMU || MIPS || PARISC || PPC32 || PPC64 || ARCH_S390 || SUPERH || SUPERH64 || SPARC32 || SPARC64 || USERMODE || V850 || X86_64) + depends on (ALPHA || ARM || CRIS || H8300 || X86 || IA64 || M32R || M68K || M68KNOMMU || MIPS || PARISC || PPC32 || PPC64 || ARCH_S390 || SUPERH || SUPERH64 || SPARC32 || SPARC64 || USERMODE || V850 || X86_64) help Say Y here if you are developing drivers or trying to debug and identify kernel problems. config MAGIC_SYSRQ bool "Magic SysRq key" - depends on DEBUG_KERNEL && (ALPHA || ARM || X86 || IA64 || M68K || MIPS || PARISC || PPC32 || PPC64 || ARCH_S390 || SUPERH || SUPERH64 || SPARC32 || SPARC64 || X86_64 || USERMODE) + depends on DEBUG_KERNEL && (ALPHA || ARM || X86 || IA64 || M32R || M68K || MIPS || PARISC || PPC32 || PPC64 || ARCH_S390 || SUPERH || SUPERH64 || SPARC32 || SPARC64 || X86_64 || USERMODE) help If you say Y here, you will have some control over the system even if the system crashes for example during kernel debugging (e.g., you @@ -42,7 +42,7 @@ config DEBUG_SLAB bool "Debug memory allocations" - depends on DEBUG_KERNEL && (ALPHA || ARM || X86 || IA64 || M68K || MIPS || PARISC || PPC32 || PPC64 || ARCH_S390 || SPARC32 || SPARC64 || USERMODE || X86_64) + depends on DEBUG_KERNEL && (ALPHA || ARM || X86 || IA64 || M32R || M68K || MIPS || PARISC || PPC32 || PPC64 || ARCH_S390 || SPARC32 || SPARC64 || USERMODE || X86_64) help Say Y here to have the kernel do limited verification on memory allocation as well as poisoning memory on free to catch use of freed @@ -50,7 +50,7 @@ config DEBUG_SPINLOCK bool "Spinlock debugging" - depends on DEBUG_KERNEL && (ALPHA || ARM || X86 || IA64 || MIPS || PARISC || PPC32 || (SUPERH && !SUPERH64) || SPARC32 || SPARC64 || USERMODE || X86_64) + depends on DEBUG_KERNEL && (ALPHA || ARM || X86 || IA64 || M32R || MIPS || PARISC || PPC32 || (SUPERH && !SUPERH64) || SPARC32 || SPARC64 || USERMODE || X86_64) help Say Y here and build SMP to catch missing spinlock initialization and certain other kinds of spinlock errors commonly made. This is @@ -59,7 +59,7 @@ config DEBUG_SPINLOCK_SLEEP bool "Sleep-inside-spinlock checking" - depends on DEBUG_KERNEL && (X86 || IA64 || MIPS || PPC32 || PPC64 || ARCH_S390 || SPARC32 || SPARC64 || USERMODE) + depends on DEBUG_KERNEL && (X86 || IA64 || M32R || MIPS || PPC32 || PPC64 || ARCH_S390 || SPARC32 || SPARC64 || USERMODE) help If you say Y here, various routines which may sleep will become very noisy if they are called with a spinlock held. @@ -80,7 +80,7 @@ config DEBUG_BUGVERBOSE bool "Verbose BUG() reporting (adds 70K)" - depends on DEBUG_KERNEL && (ARM || ARM26 || M68K || SPARC32 || SPARC64) + depends on DEBUG_KERNEL && (ARM || ARM26 || M32R || M68K || SPARC32 || SPARC64) help Say Y here to make BUG() panics output the file name and line number of the BUG call as well as the EIP and oops trace. This aids @@ -88,7 +88,7 @@ config DEBUG_INFO bool "Compile the kernel with debug info" - depends on DEBUG_KERNEL && (ALPHA || CRIS || X86 || IA64 || M68K || MIPS || PARISC || PPC32 || PPC64 || ARCH_S390 || (SUPERH && !SUPERH64) || SPARC64 || V850 || X86_64) + depends on DEBUG_KERNEL && (ALPHA || CRIS || X86 || IA64 || M32R || M68K || MIPS || PARISC || PPC32 || PPC64 || ARCH_S390 || (SUPERH && !SUPERH64) || SPARC64 || V850 || X86_64) help If you say Y here the resulting kernel image will include debugging info resulting in a larger kernel image. diff -Nru a/lib/kobject.c b/lib/kobject.c --- a/lib/kobject.c 2004-11-29 21:22:08 -08:00 +++ b/lib/kobject.c 2004-11-29 21:22:08 -08:00 @@ -232,11 +232,12 @@ va_list args; char * name; - va_start(args,fmt); /* * First, try the static array */ + va_start(args,fmt); need = vsnprintf(kobj->name,limit,fmt,args); + va_end(args); if (need < limit) name = kobj->name; else { @@ -249,7 +250,9 @@ error = -ENOMEM; goto Done; } + va_start(args,fmt); need = vsnprintf(name,limit,fmt,args); + va_end(args); /* Still? Give up. */ if (need >= limit) { @@ -266,7 +269,6 @@ /* Now, set the new name */ kobj->k_name = name; Done: - va_end(args); return error; } diff -Nru a/lib/radix-tree.c b/lib/radix-tree.c --- a/lib/radix-tree.c 2004-11-29 21:22:07 -08:00 +++ b/lib/radix-tree.c 2004-11-29 21:22:07 -08:00 @@ -701,8 +701,10 @@ for (tag = 0; tag < RADIX_TREE_TAGS; tag++) { int idx; - if (!tags[tag]) - tag_clear(pathp[0].node, tag, pathp[0].offset); + if (tags[tag]) + continue; + + tag_clear(pathp[0].node, tag, pathp[0].offset); for (idx = 0; idx < RADIX_TREE_TAG_LONGS; idx++) { if (pathp[0].node->tags[tag][idx]) { diff -Nru a/lib/reed_solomon/decode_rs.c b/lib/reed_solomon/decode_rs.c --- a/lib/reed_solomon/decode_rs.c 2004-11-29 21:22:08 -08:00 +++ b/lib/reed_solomon/decode_rs.c 2004-11-29 21:22:08 -08:00 @@ -9,11 +9,11 @@ * * Adaption to the kernel by Thomas Gleixner (tglx@linutronix.de) * - * $Id: decode_rs.c,v 1.5 2004/10/05 22:07:53 gleixner Exp $ + * $Id: decode_rs.c,v 1.6 2004/10/22 15:41:47 gleixner Exp $ * */ -/* Generic data witdh independend code which is included by the +/* Generic data width independent code which is included by the * wrappers. */ { @@ -28,7 +28,7 @@ uint16_t *index_of = rs->index_of; uint16_t u, q, tmp, num1, num2, den, discr_r, syn_error; /* Err+Eras Locator poly and syndrome poly The maximum value - * of nroots is 8. So the neccecary stacksize will be about + * of nroots is 8. So the necessary stack size will be about * 220 bytes max. */ uint16_t lambda[nroots + 1], syn[nroots]; @@ -42,7 +42,7 @@ if (pad < 0 || pad >= nn) return -ERANGE; - /* Deos the caller provide the syndrome ? */ + /* Does the caller provide the syndrome ? */ if (s != NULL) goto decode; diff -Nru a/lib/reed_solomon/encode_rs.c b/lib/reed_solomon/encode_rs.c --- a/lib/reed_solomon/encode_rs.c 2004-11-29 21:22:07 -08:00 +++ b/lib/reed_solomon/encode_rs.c 2004-11-29 21:22:07 -08:00 @@ -9,11 +9,11 @@ * * Adaption to the kernel by Thomas Gleixner (tglx@linutronix.de) * - * $Id: encode_rs.c,v 1.3 2004/10/05 22:07:53 gleixner Exp $ + * $Id: encode_rs.c,v 1.4 2004/10/22 15:41:47 gleixner Exp $ * */ -/* Generic data witdh independend code which is included by the +/* Generic data width independent code which is included by the * wrappers. * int encode_rsX (struct rs_control *rs, uintX_t *data, int len, uintY_t *par) */ diff -Nru a/mm/memory.c b/mm/memory.c --- a/mm/memory.c 2004-11-29 21:22:07 -08:00 +++ b/mm/memory.c 2004-11-29 21:22:07 -08:00 @@ -739,19 +739,15 @@ pte_t *pte; if (write) /* user gate pages are read-only */ return i ? : -EFAULT; - pgd = pgd_offset_gate(mm, pg); - if (!pgd) - return i ? : -EFAULT; + if (pg > TASK_SIZE) + pgd = pgd_offset_k(pg); + else + pgd = pgd_offset_gate(mm, pg); + BUG_ON(pgd_none(*pgd)); pmd = pmd_offset(pgd, pg); - if (!pmd) - return i ? : -EFAULT; + BUG_ON(pmd_none(*pmd)); pte = pte_offset_map(pmd, pg); - if (!pte) - return i ? : -EFAULT; - if (!pte_present(*pte)) { - pte_unmap(pte); - return i ? : -EFAULT; - } + BUG_ON(pte_none(*pte)); if (pages) { pages[i] = pte_page(*pte); get_page(pages[i]); @@ -765,7 +761,7 @@ continue; } - if (!vma || (pages && (vma->vm_flags & VM_IO)) + if (!vma || (vma->vm_flags & VM_IO) || !(flags & vma->vm_flags)) return i ? : -EFAULT; diff -Nru a/mm/mempolicy.c b/mm/mempolicy.c --- a/mm/mempolicy.c 2004-11-29 21:22:08 -08:00 +++ b/mm/mempolicy.c 2004-11-29 21:22:08 -08:00 @@ -75,6 +75,7 @@ #include #include #include +#include #include static kmem_cache_t *policy_cache; @@ -900,13 +901,13 @@ while (n) { struct sp_node *p = rb_entry(n, struct sp_node, nd); - if (start >= p->end) { + + if (start >= p->end) n = n->rb_right; - } else if (end < p->start) { + else if (end <= p->start) n = n->rb_left; - } else { + else break; - } } if (!n) return NULL; diff -Nru a/mm/mlock.c b/mm/mlock.c --- a/mm/mlock.c 2004-11-29 21:22:06 -08:00 +++ b/mm/mlock.c 2004-11-29 21:22:06 -08:00 @@ -47,7 +47,8 @@ pages = (end - start) >> PAGE_SHIFT; if (newflags & VM_LOCKED) { pages = -pages; - ret = make_pages_present(start, end); + if (!(newflags & VM_IO)) + ret = make_pages_present(start, end); } vma->vm_mm->locked_vm -= pages; @@ -210,10 +211,10 @@ unsigned long lock_limit, locked; int allowed = 0; - spin_lock(&shmlock_user_lock); - locked = size >> PAGE_SHIFT; + locked = (size + PAGE_SIZE - 1) >> PAGE_SHIFT; lock_limit = current->signal->rlim[RLIMIT_MEMLOCK].rlim_cur; lock_limit >>= PAGE_SHIFT; + spin_lock(&shmlock_user_lock); if (locked + user->locked_shm > lock_limit && !capable(CAP_IPC_LOCK)) goto out; get_uid(user); @@ -227,7 +228,7 @@ void user_shm_unlock(size_t size, struct user_struct *user) { spin_lock(&shmlock_user_lock); - user->locked_shm -= (size >> PAGE_SHIFT); + user->locked_shm -= (size + PAGE_SIZE - 1) >> PAGE_SHIFT; spin_unlock(&shmlock_user_lock); free_uid(user); } diff -Nru a/mm/mmap.c b/mm/mmap.c --- a/mm/mmap.c 2004-11-29 21:22:07 -08:00 +++ b/mm/mmap.c 2004-11-29 21:22:07 -08:00 @@ -1871,7 +1871,7 @@ * and into the inode's i_mmap tree. If vm_file is non-NULL * then i_mmap_lock is taken here. */ -void insert_vm_struct(struct mm_struct * mm, struct vm_area_struct * vma) +int insert_vm_struct(struct mm_struct * mm, struct vm_area_struct * vma) { struct vm_area_struct * __vma, * prev; struct rb_node ** rb_link, * rb_parent; @@ -1894,8 +1894,9 @@ } __vma = find_vma_prepare(mm,vma->vm_start,&prev,&rb_link,&rb_parent); if (__vma && __vma->vm_start < vma->vm_end) - BUG(); + return -ENOMEM; vma_link(mm, vma, prev, rb_link, rb_parent); + return 0; } /* diff -Nru a/mm/page_alloc.c b/mm/page_alloc.c --- a/mm/page_alloc.c 2004-11-29 21:22:06 -08:00 +++ b/mm/page_alloc.c 2004-11-29 21:22:06 -08:00 @@ -1945,8 +1945,12 @@ lowmem_pages; } - zone->pages_low = zone->pages_min * 2; - zone->pages_high = zone->pages_min * 3; + /* + * When interpreting these watermarks, just keep in mind that: + * zone->pages_min == (zone->pages_min * 4) / 4; + */ + zone->pages_low = (zone->pages_min * 5) / 4; + zone->pages_high = (zone->pages_min * 6) / 4; spin_unlock_irqrestore(&zone->lru_lock, flags); } } @@ -1955,24 +1959,25 @@ * Initialise min_free_kbytes. * * For small machines we want it small (128k min). For large machines - * we want it large (16MB max). But it is not linear, because network + * we want it large (64MB max). But it is not linear, because network * bandwidth does not increase linearly with machine size. We use * - * min_free_kbytes = sqrt(lowmem_kbytes) + * min_free_kbytes = 4 * sqrt(lowmem_kbytes), for better accuracy: + * min_free_kbytes = sqrt(lowmem_kbytes * 16) * * which yields * - * 16MB: 128k - * 32MB: 181k - * 64MB: 256k - * 128MB: 362k - * 256MB: 512k - * 512MB: 724k - * 1024MB: 1024k - * 2048MB: 1448k - * 4096MB: 2048k - * 8192MB: 2896k - * 16384MB: 4096k + * 16MB: 512k + * 32MB: 724k + * 64MB: 1024k + * 128MB: 1448k + * 256MB: 2048k + * 512MB: 2896k + * 1024MB: 4096k + * 2048MB: 5792k + * 4096MB: 8192k + * 8192MB: 11584k + * 16384MB: 16384k */ static int __init init_per_zone_pages_min(void) { @@ -1980,11 +1985,11 @@ lowmem_kbytes = nr_free_buffer_pages() * (PAGE_SIZE >> 10); - min_free_kbytes = int_sqrt(lowmem_kbytes); + min_free_kbytes = int_sqrt(lowmem_kbytes * 16); if (min_free_kbytes < 128) min_free_kbytes = 128; - if (min_free_kbytes > 16384) - min_free_kbytes = 16384; + if (min_free_kbytes > 65536) + min_free_kbytes = 65536; setup_per_zone_pages_min(); setup_per_zone_protection(); return 0; diff -Nru a/mm/rmap.c b/mm/rmap.c --- a/mm/rmap.c 2004-11-29 21:22:08 -08:00 +++ b/mm/rmap.c 2004-11-29 21:22:08 -08:00 @@ -254,7 +254,7 @@ * repeatedly from either page_referenced_anon or page_referenced_file. */ static int page_referenced_one(struct page *page, - struct vm_area_struct *vma, unsigned int *mapcount) + struct vm_area_struct *vma, unsigned int *mapcount, int ignore_token) { struct mm_struct *mm = vma->vm_mm; unsigned long address; @@ -289,7 +289,7 @@ if (ptep_clear_flush_young(vma, address, pte)) referenced++; - if (mm != current->mm && has_swap_token(mm)) + if (mm != current->mm && !ignore_token && has_swap_token(mm)) referenced++; (*mapcount)--; @@ -302,7 +302,7 @@ return referenced; } -static int page_referenced_anon(struct page *page) +static int page_referenced_anon(struct page *page, int ignore_token) { unsigned int mapcount; struct anon_vma *anon_vma; @@ -315,7 +315,8 @@ mapcount = page_mapcount(page); list_for_each_entry(vma, &anon_vma->head, anon_vma_node) { - referenced += page_referenced_one(page, vma, &mapcount); + referenced += page_referenced_one(page, vma, &mapcount, + ignore_token); if (!mapcount) break; } @@ -334,7 +335,7 @@ * * This function is only called from page_referenced for object-based pages. */ -static int page_referenced_file(struct page *page) +static int page_referenced_file(struct page *page, int ignore_token) { unsigned int mapcount; struct address_space *mapping = page->mapping; @@ -372,7 +373,8 @@ referenced++; break; } - referenced += page_referenced_one(page, vma, &mapcount); + referenced += page_referenced_one(page, vma, &mapcount, + ignore_token); if (!mapcount) break; } @@ -389,7 +391,7 @@ * Quick test_and_clear_referenced for all mappings to a page, * returns the number of ptes which referenced the page. */ -int page_referenced(struct page *page, int is_locked) +int page_referenced(struct page *page, int is_locked, int ignore_token) { int referenced = 0; @@ -401,14 +403,15 @@ if (page_mapped(page) && page->mapping) { if (PageAnon(page)) - referenced += page_referenced_anon(page); + referenced += page_referenced_anon(page, ignore_token); else if (is_locked) - referenced += page_referenced_file(page); + referenced += page_referenced_file(page, ignore_token); else if (TestSetPageLocked(page)) referenced++; else { if (page->mapping) - referenced += page_referenced_file(page); + referenced += page_referenced_file(page, + ignore_token); unlock_page(page); } } diff -Nru a/mm/shmem.c b/mm/shmem.c --- a/mm/shmem.c 2004-11-29 21:22:07 -08:00 +++ b/mm/shmem.c 2004-11-29 21:22:07 -08:00 @@ -1292,7 +1292,6 @@ info = SHMEM_I(inode); memset(info, 0, (char *)inode - (char *)info); spin_lock_init(&info->lock); - mpol_shared_policy_init(&info->policy); INIT_LIST_HEAD(&info->swaplist); switch (mode & S_IFMT) { @@ -1303,6 +1302,7 @@ case S_IFREG: inode->i_op = &shmem_inode_operations; inode->i_fop = &shmem_file_operations; + mpol_shared_policy_init(&info->policy); break; case S_IFDIR: inode->i_nlink++; @@ -1312,8 +1312,17 @@ inode->i_fop = &simple_dir_operations; break; case S_IFLNK: + /* + * Must not load anything in the rbtree, + * mpol_free_shared_policy will not be called. + */ + mpol_shared_policy_init(&info->policy); break; } + } else if (sbinfo) { + spin_lock(&sbinfo->stat_lock); + sbinfo->free_inodes++; + spin_unlock(&sbinfo->stat_lock); } return inode; } @@ -2026,7 +2035,10 @@ static void shmem_destroy_inode(struct inode *inode) { - mpol_free_shared_policy(&SHMEM_I(inode)->policy); + if ((inode->i_mode & S_IFMT) == S_IFREG) { + /* only struct inode is valid if it's an inline symlink */ + mpol_free_shared_policy(&SHMEM_I(inode)->policy); + } kmem_cache_free(shmem_inode_cachep, SHMEM_I(inode)); } diff -Nru a/mm/vmscan.c b/mm/vmscan.c --- a/mm/vmscan.c 2004-11-29 21:22:06 -08:00 +++ b/mm/vmscan.c 2004-11-29 21:22:06 -08:00 @@ -377,7 +377,7 @@ if (page_mapped(page) || PageSwapCache(page)) sc->nr_scanned++; - referenced = page_referenced(page, 1); + referenced = page_referenced(page, 1, sc->priority <= 0); /* In active use or really unfreeable? Activate it. */ if (referenced && page_mapping_inuse(page)) goto activate_locked; @@ -715,7 +715,7 @@ if (page_mapped(page)) { if (!reclaim_mapped || (total_swap_pages == 0 && PageAnon(page)) || - page_referenced(page, 0)) { + page_referenced(page, 0, sc->priority <= 0)) { list_add(&page->lru, &l_active); continue; } diff -Nru a/net/8021q/vlan.c b/net/8021q/vlan.c --- a/net/8021q/vlan.c 2004-11-29 21:22:08 -08:00 +++ b/net/8021q/vlan.c 2004-11-29 21:22:08 -08:00 @@ -96,13 +96,18 @@ printk(KERN_ERR "%s %s: can't create entry in proc filesystem!\n", __FUNCTION__, VLAN_NAME); - return 1; + return err; } dev_add_pack(&vlan_packet_type); /* Register us to receive netdevice events */ - register_netdevice_notifier(&vlan_notifier_block); + err = register_netdevice_notifier(&vlan_notifier_block); + if (err < 0) { + dev_remove_pack(&vlan_packet_type); + vlan_proc_cleanup(); + return err; + } vlan_ioctl_set(vlan_ioctl_handler); @@ -743,7 +748,7 @@ break; case GET_VLAN_REALDEV_NAME_CMD: err = vlan_dev_get_realdev_name(args.device1, args.u.device2); - if (copy_to_user((void*)arg, &args, + if (copy_to_user(arg, &args, sizeof(struct vlan_ioctl_args))) { err = -EFAULT; } @@ -752,7 +757,7 @@ case GET_VLAN_VID_CMD: err = vlan_dev_get_vid(args.device1, &vid); args.u.VID = vid; - if (copy_to_user((void*)arg, &args, + if (copy_to_user(arg, &args, sizeof(struct vlan_ioctl_args))) { err = -EFAULT; } diff -Nru a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c --- a/net/8021q/vlan_dev.c 2004-11-29 21:22:08 -08:00 +++ b/net/8021q/vlan_dev.c 2004-11-29 21:22:08 -08:00 @@ -527,7 +527,7 @@ dev->mtu = new_mtu; - return new_mtu; + return 0; } int vlan_dev_set_ingress_priority(char *dev_name, __u32 skb_prio, short vlan_prio) diff -Nru a/net/appletalk/ddp.c b/net/appletalk/ddp.c --- a/net/appletalk/ddp.c 2004-11-29 21:22:08 -08:00 +++ b/net/appletalk/ddp.c 2004-11-29 21:22:08 -08:00 @@ -563,7 +563,7 @@ retval = -ENOBUFS; if (!rt) - goto out; + goto out_unlock; memset(rt, 0, sizeof(*rt)); rt->next = atalk_routes; diff -Nru a/net/atm/mpc.c b/net/atm/mpc.c --- a/net/atm/mpc.c 2004-11-29 21:22:08 -08:00 +++ b/net/atm/mpc.c 2004-11-29 21:22:08 -08:00 @@ -755,13 +755,18 @@ { struct mpoa_client *mpc; struct lec_priv *priv; + int err; if (mpcs == NULL) { init_timer(&mpc_timer); mpc_timer_refresh(); /* This lets us now how our LECs are doing */ - register_netdevice_notifier(&mpoa_notifier); + err = register_netdevice_notifier(&mpoa_notifier); + if (err < 0) { + del_timer(&mpc_timer); + return err; + } } mpc = find_mpc_by_itfnum(arg); diff -Nru a/net/atm/svc.c b/net/atm/svc.c --- a/net/atm/svc.c 2004-11-29 21:22:08 -08:00 +++ b/net/atm/svc.c 2004-11-29 21:22:08 -08:00 @@ -479,7 +479,7 @@ error = -EINVAL; goto out; } - if (get_user(value, (int *) optval)) { + if (get_user(value, (int __user *) optval)) { error = -EFAULT; goto out; } @@ -597,14 +597,14 @@ case ATM_ADDPARTY: if (!test_bit(ATM_VF_SESSION, &vcc->flags)) return -EINVAL; - if (copy_from_user(&sa, (void *) arg, sizeof(sa))) + if (copy_from_user(&sa, (void __user *) arg, sizeof(sa))) return -EFAULT; error = svc_addparty(sock, (struct sockaddr *) &sa, sizeof(sa), 0); break; case ATM_DROPPARTY: if (!test_bit(ATM_VF_SESSION, &vcc->flags)) return -EINVAL; - if (copy_from_user(&ep_ref, (void *) arg, sizeof(int))) + if (copy_from_user(&ep_ref, (void __user *) arg, sizeof(int))) return -EFAULT; error = svc_dropparty(sock, ep_ref); break; diff -Nru a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c --- a/net/bluetooth/l2cap.c 2004-11-29 21:22:08 -08:00 +++ b/net/bluetooth/l2cap.c 2004-11-29 21:22:08 -08:00 @@ -57,7 +57,7 @@ #define BT_DBG(D...) #endif -#define VERSION "2.5" +#define VERSION "2.6" static struct proto_ops l2cap_sock_ops; @@ -964,6 +964,7 @@ struct sock *s; read_lock(&l->lock); s = __l2cap_get_chan_by_ident(l, ident); + if (s) bh_lock_sock(s); read_unlock(&l->lock); return s; } @@ -1099,6 +1100,22 @@ read_unlock(&l->lock); } +/* Notify sockets that we cannot guaranty reliability anymore */ +static void l2cap_conn_unreliable(struct l2cap_conn *conn, int err) +{ + struct l2cap_chan_list *l = &conn->chan_list; + struct sock *sk; + + BT_DBG("conn %p", conn); + + read_lock(&l->lock); + for (sk = l->head; sk; sk = l2cap_pi(sk)->next_c) { + if (l2cap_pi(sk)->link_mode & L2CAP_LM_RELIABLE) + sk->sk_err = err; + } + read_unlock(&l->lock); +} + static void l2cap_chan_ready(struct sock *sk) { struct sock *parent = bt_sk(sk)->parent; @@ -1427,7 +1444,8 @@ sk->sk_state = BT_CONNECT2; l2cap_pi(sk)->ident = cmd->ident; - if (l2cap_pi(sk)->link_mode & L2CAP_LM_ENCRYPT) { + if ((l2cap_pi(sk)->link_mode & L2CAP_LM_ENCRYPT) || + (l2cap_pi(sk)->link_mode & L2CAP_LM_SECURE)) { if (!hci_conn_encrypt(conn->hcon)) goto done; } else if (l2cap_pi(sk)->link_mode & L2CAP_LM_AUTH) { @@ -1946,7 +1964,8 @@ bh_lock_sock(sk); if (sk->sk_state != BT_CONNECT2 || - (l2cap_pi(sk)->link_mode & L2CAP_LM_ENCRYPT)) { + (l2cap_pi(sk)->link_mode & L2CAP_LM_ENCRYPT) || + (l2cap_pi(sk)->link_mode & L2CAP_LM_SECURE)) { bh_unlock_sock(sk); continue; } @@ -2014,6 +2033,9 @@ l2cap_send_cmd(conn, l2cap_pi(sk)->ident, L2CAP_CONN_RSP, sizeof(rsp), &rsp); + if (l2cap_pi(sk)->link_mode & L2CAP_LM_SECURE) + hci_conn_change_link_key(hcon); + bh_unlock_sock(sk); } @@ -2039,10 +2061,12 @@ kfree_skb(conn->rx_skb); conn->rx_skb = NULL; conn->rx_len = 0; + l2cap_conn_unreliable(conn, ECOMM); } if (skb->len < 2) { BT_ERR("Frame is too short (len %d)", skb->len); + l2cap_conn_unreliable(conn, ECOMM); goto drop; } @@ -2060,6 +2084,7 @@ if (skb->len > len) { BT_ERR("Frame is too long (len %d, expected len %d)", skb->len, len); + l2cap_conn_unreliable(conn, ECOMM); goto drop; } @@ -2074,6 +2099,7 @@ if (!conn->rx_len) { BT_ERR("Unexpected continuation frame (len %d)", skb->len); + l2cap_conn_unreliable(conn, ECOMM); goto drop; } @@ -2083,6 +2109,7 @@ kfree_skb(conn->rx_skb); conn->rx_skb = NULL; conn->rx_len = 0; + l2cap_conn_unreliable(conn, ECOMM); goto drop; } diff -Nru a/net/core/dev.c b/net/core/dev.c --- a/net/core/dev.c 2004-11-29 21:22:07 -08:00 +++ b/net/core/dev.c 2004-11-29 21:22:07 -08:00 @@ -1001,6 +1001,29 @@ return notifier_call_chain(&netdev_chain, val, v); } +/* When > 0 there are consumers of rx skb time stamps */ +static atomic_t netstamp_needed = ATOMIC_INIT(0); + +void net_enable_timestamp(void) +{ + atomic_inc(&netstamp_needed); +} + +void net_disable_timestamp(void) +{ + atomic_dec(&netstamp_needed); +} + +static inline void net_timestamp(struct timeval *stamp) +{ + if (atomic_read(&netstamp_needed)) + do_gettimeofday(stamp); + else { + stamp->tv_sec = 0; + stamp->tv_usec = 0; + } +} + /* * Support routine. Sends outgoing frames to any network * taps currently in use. @@ -3215,6 +3238,8 @@ EXPORT_SYMBOL(synchronize_net); EXPORT_SYMBOL(unregister_netdevice); EXPORT_SYMBOL(unregister_netdevice_notifier); +EXPORT_SYMBOL(net_enable_timestamp); +EXPORT_SYMBOL(net_disable_timestamp); #if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE) EXPORT_SYMBOL(br_handle_frame_hook); diff -Nru a/net/core/netfilter.c b/net/core/netfilter.c --- a/net/core/netfilter.c 2004-11-29 21:22:07 -08:00 +++ b/net/core/netfilter.c 2004-11-29 21:22:07 -08:00 @@ -802,12 +802,21 @@ EXPORT_SYMBOL(nf_log_unregister); EXPORT_SYMBOL(nf_log_packet); -/* This does not belong here, but ipt_REJECT needs it if connection - tracking in use: without this, connection may not be in hash table, - and hence manufactured ICMP or RST packets will not be associated - with it. */ +/* This does not belong here, but locally generated errors need it if connection + tracking in use: without this, connection may not be in hash table, and hence + manufactured ICMP or RST packets will not be associated with it. */ void (*ip_ct_attach)(struct sk_buff *, struct sk_buff *); +void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb) +{ + void (*attach)(struct sk_buff *, struct sk_buff *); + + if (skb->nfct && (attach = ip_ct_attach) != NULL) { + mb(); /* Just to be sure: must be read before executing this */ + attach(new, skb); + } +} + void __init netfilter_init(void) { int i, h; @@ -819,6 +828,7 @@ } EXPORT_SYMBOL(ip_ct_attach); +EXPORT_SYMBOL(nf_ct_attach); EXPORT_SYMBOL(nf_getsockopt); EXPORT_SYMBOL(nf_hook_slow); EXPORT_SYMBOL(nf_hooks); diff -Nru a/net/core/skbuff.c b/net/core/skbuff.c --- a/net/core/skbuff.c 2004-11-29 21:22:08 -08:00 +++ b/net/core/skbuff.c 2004-11-29 21:22:08 -08:00 @@ -1350,7 +1350,7 @@ } #endif -static void inline skb_split_inside_header(struct sk_buff *skb, +static inline void skb_split_inside_header(struct sk_buff *skb, struct sk_buff* skb1, const u32 len, const int pos) { @@ -1371,7 +1371,7 @@ skb->tail = skb->data + len; } -static void inline skb_split_no_header(struct sk_buff *skb, +static inline void skb_split_no_header(struct sk_buff *skb, struct sk_buff* skb1, const u32 len, int pos) { diff -Nru a/net/core/sock.c b/net/core/sock.c --- a/net/core/sock.c 2004-11-29 21:22:08 -08:00 +++ b/net/core/sock.c 2004-11-29 21:22:08 -08:00 @@ -179,7 +179,7 @@ { if (sock_flag(sk, SOCK_TIMESTAMP)) { sock_reset_flag(sk, SOCK_TIMESTAMP); - atomic_dec(&netstamp_needed); + net_disable_timestamp(); } } @@ -1226,9 +1226,6 @@ } EXPORT_SYMBOL(release_sock); -/* When > 0 there are consumers of rx skb time stamps */ -atomic_t netstamp_needed = ATOMIC_INIT(0); - int sock_get_timestamp(struct sock *sk, struct timeval __user *userstamp) { if (!sock_flag(sk, SOCK_TIMESTAMP)) @@ -1246,7 +1243,7 @@ { if (!sock_flag(sk, SOCK_TIMESTAMP)) { sock_set_flag(sk, SOCK_TIMESTAMP); - atomic_inc(&netstamp_needed); + net_enable_timestamp(); } } EXPORT_SYMBOL(sock_enable_timestamp); diff -Nru a/net/decnet/Kconfig b/net/decnet/Kconfig --- a/net/decnet/Kconfig 2004-11-29 21:22:08 -08:00 +++ b/net/decnet/Kconfig 2004-11-29 21:22:08 -08:00 @@ -1,17 +1,6 @@ # # DECnet configuration # -config DECNET_SIOCGIFCONF - bool "DECnet: SIOCGIFCONF support" - depends on DECNET - help - This option should only be turned on if you are really sure that - you know what you are doing. It can break other applications which - use this system call and the proper way to get the information - provided by this call is to use rtnetlink. - - If unsure, say N. - config DECNET_ROUTER bool "DECnet: router support (EXPERIMENTAL)" depends on DECNET && EXPERIMENTAL diff -Nru a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c --- a/net/decnet/af_decnet.c 2004-11-29 21:22:07 -08:00 +++ b/net/decnet/af_decnet.c 2004-11-29 21:22:07 -08:00 @@ -1075,7 +1075,7 @@ skb = dn_wait_for_connect(sk, &timeo); if (IS_ERR(skb)) { release_sock(sk); - return PTR_ERR(sk); + return PTR_ERR(skb); } } diff -Nru a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c --- a/net/decnet/dn_dev.c 2004-11-29 21:22:07 -08:00 +++ b/net/decnet/dn_dev.c 2004-11-29 21:22:07 -08:00 @@ -1291,59 +1291,6 @@ return notifier_chain_unregister(&dnaddr_chain, nb); } -#ifdef CONFIG_DECNET_SIOCGIFCONF -/* - * Now we support multiple addresses per interface. - * Since we don't want to break existing code, you have to enable - * it as a compile time option. Probably you should use the - * rtnetlink interface instead. - */ -int dnet_gifconf(struct net_device *dev, char __user *buf, int len) -{ - struct dn_dev *dn_db = (struct dn_dev *)dev->dn_ptr; - struct dn_ifaddr *ifa; - char buffer[DN_IFREQ_SIZE]; - struct ifreq *ifr = (struct ifreq *)buffer; - struct sockaddr_dn *addr = (struct sockaddr_dn *)&ifr->ifr_addr; - int done = 0; - - if ((dn_db == NULL) || ((ifa = dn_db->ifa_list) == NULL)) - return 0; - - for(; ifa; ifa = ifa->ifa_next) { - if (!buf) { - done += sizeof(DN_IFREQ_SIZE); - continue; - } - if (len < DN_IFREQ_SIZE) - return done; - memset(buffer, 0, DN_IFREQ_SIZE); - - if (ifa->ifa_label) - strcpy(ifr->ifr_name, ifa->ifa_label); - else - strcpy(ifr->ifr_name, dev->name); - - addr->sdn_family = AF_DECnet; - addr->sdn_add.a_len = 2; - memcpy(addr->sdn_add.a_addr, &ifa->ifa_local, - sizeof(dn_address)); - - if (copy_to_user(buf, buffer, DN_IFREQ_SIZE)) { - done = -EFAULT; - break; - } - - buf += DN_IFREQ_SIZE; - len -= DN_IFREQ_SIZE; - done += DN_IFREQ_SIZE; - } - - return done; -} -#endif /* CONFIG_DECNET_SIOCGIFCONF */ - - #ifdef CONFIG_PROC_FS static inline struct net_device *dn_dev_get_next(struct seq_file *seq, struct net_device *dev) { @@ -1502,9 +1449,6 @@ decnet_address = dn_htons((addr[0] << 10) | addr[1]); dn_dev_devices_on(); -#ifdef CONFIG_DECNET_SIOCGIFCONF - register_gifconf(PF_DECnet, dnet_gifconf); -#endif /* CONFIG_DECNET_SIOCGIFCONF */ rtnetlink_links[PF_DECnet] = dnet_rtnetlink_table; @@ -1522,10 +1466,6 @@ void __exit dn_dev_cleanup(void) { rtnetlink_links[PF_DECnet] = NULL; - -#ifdef CONFIG_DECNET_SIOCGIFCONF - unregister_gifconf(PF_DECnet); -#endif /* CONFIG_DECNET_SIOCGIFCONF */ #ifdef CONFIG_SYSCTL { diff -Nru a/net/decnet/dn_neigh.c b/net/decnet/dn_neigh.c --- a/net/decnet/dn_neigh.c 2004-11-29 21:22:08 -08:00 +++ b/net/decnet/dn_neigh.c 2004-11-29 21:22:08 -08:00 @@ -26,6 +26,7 @@ #include #include +#include #include #include #include diff -Nru a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c --- a/net/ipv4/af_inet.c 2004-11-29 21:22:06 -08:00 +++ b/net/ipv4/af_inet.c 2004-11-29 21:22:06 -08:00 @@ -309,7 +309,7 @@ inet->id = 0; sock_init_data(sock, sk); - sk_set_owner(sk, THIS_MODULE); + sk_set_owner(sk, sk->sk_prot->owner); sk->sk_destruct = inet_sock_destruct; sk->sk_family = PF_INET; diff -Nru a/net/ipv4/icmp.c b/net/ipv4/icmp.c --- a/net/ipv4/icmp.c 2004-11-29 21:22:08 -08:00 +++ b/net/ipv4/icmp.c 2004-11-29 21:22:08 -08:00 @@ -338,6 +338,8 @@ to, len, 0); skb->csum = csum_block_add(skb->csum, csum, odd); + if (icmp_pointers[icmp_param->data.icmph.type].error) + nf_ct_attach(skb, icmp_param->skb); return 0; } diff -Nru a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c --- a/net/ipv4/ip_output.c 2004-11-29 21:22:08 -08:00 +++ b/net/ipv4/ip_output.c 2004-11-29 21:22:08 -08:00 @@ -278,7 +278,7 @@ newskb->dev, ip_dev_loopback_xmit); } - if (skb->len > dst_pmtu(&rt->u.dst) || skb_shinfo(skb)->frag_list) + if (skb->len > dst_pmtu(&rt->u.dst)) return ip_fragment(skb, ip_finish_output); else return ip_finish_output(skb); @@ -288,8 +288,7 @@ { IP_INC_STATS(IPSTATS_MIB_OUTREQUESTS); - if ((skb->len > dst_pmtu(skb->dst) || skb_shinfo(skb)->frag_list) && - !skb_shinfo(skb)->tso_size) + if (skb->len > dst_pmtu(skb->dst) && !skb_shinfo(skb)->tso_size) return ip_fragment(skb, ip_finish_output); else return ip_finish_output(skb); diff -Nru a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c --- a/net/ipv4/ipconfig.c 2004-11-29 21:22:06 -08:00 +++ b/net/ipv4/ipconfig.c 2004-11-29 21:22:06 -08:00 @@ -1102,8 +1102,8 @@ jiff = jiffies + (d->next ? CONF_INTER_TIMEOUT : timeout); while (time_before(jiffies, jiff) && !ic_got_reply) { - barrier(); - cpu_relax(); + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(1); } #ifdef IPCONFIG_DHCP /* DHCP isn't done until we get a DHCPACK. */ @@ -1245,7 +1245,6 @@ static int __init ip_auto_config(void) { - unsigned long jiff; u32 addr; #ifdef CONFIG_PROC_FS @@ -1260,18 +1259,16 @@ try_try_again: #endif /* Give hardware a chance to settle */ - jiff = jiffies + CONF_PRE_OPEN; - while (time_before(jiffies, jiff)) - cpu_relax(); + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(CONF_PRE_OPEN); /* Setup all network devices */ if (ic_open_devs() < 0) return -1; /* Give drivers a chance to settle */ - jiff = jiffies + CONF_POST_OPEN; - while (time_before(jiffies, jiff)) - cpu_relax(); + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(CONF_POST_OPEN); /* * If the config information is insufficient (e.g., our IP address or diff -Nru a/net/ipv4/netfilter/ip_nat_core.c b/net/ipv4/netfilter/ip_nat_core.c --- a/net/ipv4/netfilter/ip_nat_core.c 2004-11-29 21:22:06 -08:00 +++ b/net/ipv4/netfilter/ip_nat_core.c 2004-11-29 21:22:06 -08:00 @@ -128,16 +128,13 @@ unsigned int i; for (i = 0; i < mr->rangesize; i++) { - /* If we are allowed to map IPs, then we must be in the - range specified, otherwise we must be unchanged. */ + /* If we are supposed to map IPs, then we must be in the + range specified. */ if (mr->range[i].flags & IP_NAT_RANGE_MAP_IPS) { if (ntohl(tuple->src.ip) < ntohl(mr->range[i].min_ip) || (ntohl(tuple->src.ip) > ntohl(mr->range[i].max_ip))) continue; - } else { - if (tuple->src.ip != tuple->src.ip) - continue; } if (!(mr->range[i].flags & IP_NAT_RANGE_PROTO_SPECIFIED) @@ -687,7 +684,7 @@ iph = (void *)(*pskb)->data + iphdroff; /* Manipulate protcol part. */ - if (!ip_nat_find_proto(proto)->manip_pkt(pskb, iphdroff + iph->ihl*4, + if (!ip_nat_find_proto(proto)->manip_pkt(pskb, iphdroff, manip, maniptype)) return 0; diff -Nru a/net/ipv4/netfilter/ip_nat_proto_icmp.c b/net/ipv4/netfilter/ip_nat_proto_icmp.c --- a/net/ipv4/netfilter/ip_nat_proto_icmp.c 2004-11-29 21:22:07 -08:00 +++ b/net/ipv4/netfilter/ip_nat_proto_icmp.c 2004-11-29 21:22:07 -08:00 @@ -53,11 +53,13 @@ static int icmp_manip_pkt(struct sk_buff **pskb, - unsigned int hdroff, + unsigned int iphdroff, const struct ip_conntrack_manip *manip, enum ip_nat_manip_type maniptype) { + struct iphdr *iph = (struct iphdr *)((*pskb)->data + iphdroff); struct icmphdr *hdr; + unsigned int hdroff = iphdroff + iph->ihl*4; if (!skb_ip_make_writable(pskb, hdroff + sizeof(*hdr))) return 0; diff -Nru a/net/ipv4/netfilter/ip_nat_proto_tcp.c b/net/ipv4/netfilter/ip_nat_proto_tcp.c --- a/net/ipv4/netfilter/ip_nat_proto_tcp.c 2004-11-29 21:22:06 -08:00 +++ b/net/ipv4/netfilter/ip_nat_proto_tcp.c 2004-11-29 21:22:06 -08:00 @@ -84,11 +84,13 @@ static int tcp_manip_pkt(struct sk_buff **pskb, - unsigned int hdroff, + unsigned int iphdroff, const struct ip_conntrack_manip *manip, enum ip_nat_manip_type maniptype) { + struct iphdr *iph = (struct iphdr *)((*pskb)->data + iphdroff); struct tcphdr *hdr; + unsigned int hdroff = iphdroff + iph->ihl*4; u_int32_t oldip; u_int16_t *portptr, oldport; int hdrsize = 8; /* TCP connection tracking guarantees this much */ @@ -106,11 +108,11 @@ if (maniptype == IP_NAT_MANIP_SRC) { /* Get rid of src ip and src pt */ - oldip = (*pskb)->nh.iph->saddr; + oldip = iph->saddr; portptr = &hdr->source; } else { /* Get rid of dst ip and dst pt */ - oldip = (*pskb)->nh.iph->daddr; + oldip = iph->daddr; portptr = &hdr->dest; } diff -Nru a/net/ipv4/netfilter/ip_nat_proto_udp.c b/net/ipv4/netfilter/ip_nat_proto_udp.c --- a/net/ipv4/netfilter/ip_nat_proto_udp.c 2004-11-29 21:22:06 -08:00 +++ b/net/ipv4/netfilter/ip_nat_proto_udp.c 2004-11-29 21:22:06 -08:00 @@ -83,11 +83,13 @@ static int udp_manip_pkt(struct sk_buff **pskb, - unsigned int hdroff, + unsigned int iphdroff, const struct ip_conntrack_manip *manip, enum ip_nat_manip_type maniptype) { + struct iphdr *iph = (struct iphdr *)((*pskb)->data + iphdroff); struct udphdr *hdr; + unsigned int hdroff = iphdroff + iph->ihl*4; u_int32_t oldip; u_int16_t *portptr; @@ -97,11 +99,11 @@ hdr = (void *)(*pskb)->data + hdroff; if (maniptype == IP_NAT_MANIP_SRC) { /* Get rid of src ip and src pt */ - oldip = (*pskb)->nh.iph->saddr; + oldip = iph->saddr; portptr = &hdr->source; } else { /* Get rid of dst ip and dst pt */ - oldip = (*pskb)->nh.iph->daddr; + oldip = iph->daddr; portptr = &hdr->dest; } if (hdr->check) /* 0 is a special case meaning no checksum */ diff -Nru a/net/ipv4/netfilter/ip_nat_proto_unknown.c b/net/ipv4/netfilter/ip_nat_proto_unknown.c --- a/net/ipv4/netfilter/ip_nat_proto_unknown.c 2004-11-29 21:22:07 -08:00 +++ b/net/ipv4/netfilter/ip_nat_proto_unknown.c 2004-11-29 21:22:07 -08:00 @@ -39,7 +39,7 @@ static int unknown_manip_pkt(struct sk_buff **pskb, - unsigned int hdroff, + unsigned int iphdroff, const struct ip_conntrack_manip *manip, enum ip_nat_manip_type maniptype) { diff -Nru a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c --- a/net/ipv4/netfilter/ip_queue.c 2004-11-29 21:22:08 -08:00 +++ b/net/ipv4/netfilter/ip_queue.c 2004-11-29 21:22:08 -08:00 @@ -162,6 +162,7 @@ __ipq_reset(void) { peer_pid = 0; + net_disable_timestamp(); __ipq_set_mode(IPQ_COPY_NONE, 0); __ipq_flush(NF_DROP); } @@ -257,7 +258,8 @@ } if (data_len) - memcpy(pmsg->payload, entry->skb->data, data_len); + if (skb_copy_bits(entry->skb, 0, pmsg->payload, data_len)) + BUG(); nlh->nlmsg_len = skb->tail - old_tail; return skb; @@ -362,6 +364,8 @@ } skb_put(e->skb, diff); } + if (!skb_ip_make_writable(&e->skb, v->data_len)) + return -ENOMEM; memcpy(e->skb->data, v->payload, v->data_len); e->skb->nfcache |= NFC_ALTERED; @@ -514,9 +518,10 @@ write_unlock_bh(&queue_lock); RCV_SKB_FAIL(-EBUSY); } - } - else + } else { + net_enable_timestamp(); peer_pid = pid; + } write_unlock_bh(&queue_lock); diff -Nru a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c --- a/net/ipv4/netfilter/ip_tables.c 2004-11-29 21:22:07 -08:00 +++ b/net/ipv4/netfilter/ip_tables.c 2004-11-29 21:22:07 -08:00 @@ -1292,7 +1292,7 @@ sizeof(info.underflow)); info.num_entries = t->private->number; info.size = t->private->size; - strcpy(info.name, name); + memcpy(info.name, name, sizeof(info.name)); if (copy_to_user(user, &info, *len) != 0) ret = -EFAULT; diff -Nru a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c --- a/net/ipv4/netfilter/ipt_CLUSTERIP.c 2004-11-29 21:22:06 -08:00 +++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c 2004-11-29 21:22:06 -08:00 @@ -664,7 +664,7 @@ return ret; } -static ssize_t clusterip_proc_write(struct file *file, const char *input, +static ssize_t clusterip_proc_write(struct file *file, const char __user *input, size_t size, loff_t *ofs) { #define PROC_WRITELEN 10 diff -Nru a/net/ipv4/netfilter/ipt_MASQUERADE.c b/net/ipv4/netfilter/ipt_MASQUERADE.c --- a/net/ipv4/netfilter/ipt_MASQUERADE.c 2004-11-29 21:22:07 -08:00 +++ b/net/ipv4/netfilter/ipt_MASQUERADE.c 2004-11-29 21:22:07 -08:00 @@ -118,49 +118,57 @@ } static inline int -device_cmp(const struct ip_conntrack *i, void *_ina) +device_cmp(const struct ip_conntrack *i, void *ifindex) { - int ret = 0; - struct in_ifaddr *ina = _ina; + int ret; READ_LOCK(&masq_lock); - /* If it's masquerading out this interface with a different address, - or we don't know the new address of this interface. */ - if (i->nat.masq_index == ina->ifa_dev->dev->ifindex - && i->tuplehash[IP_CT_DIR_REPLY].tuple.dst.ip != ina->ifa_address) - ret = 1; + ret = (i->nat.masq_index == (int)(long)ifindex); READ_UNLOCK(&masq_lock); return ret; } -static inline int -connect_unassure(const struct ip_conntrack *i, void *_ina) +static int masq_device_event(struct notifier_block *this, + unsigned long event, + void *ptr) { - struct in_ifaddr *ina = _ina; + struct net_device *dev = ptr; + + if (event == NETDEV_DOWN) { + /* Device was downed. Search entire table for + conntracks which were associated with that device, + and forget them. */ + IP_NF_ASSERT(dev->ifindex != 0); - /* We reset the ASSURED bit on all connections, so they will - * get reaped under memory pressure. */ - if (i->nat.masq_index == ina->ifa_dev->dev->ifindex) - clear_bit(IPS_ASSURED_BIT, (unsigned long *)&i->status); - return 0; + ip_ct_selective_cleanup(device_cmp, (void *)(long)dev->ifindex); + } + + return NOTIFY_DONE; } static int masq_inet_event(struct notifier_block *this, unsigned long event, void *ptr) { - /* For some configurations, interfaces often come back with - * the same address. If not, clean up old conntrack - * entries. */ - if (event == NETDEV_UP) - ip_ct_selective_cleanup(device_cmp, ptr); - else if (event == NETDEV_DOWN) - ip_ct_selective_cleanup(connect_unassure, ptr); + struct net_device *dev = ((struct in_ifaddr *)ptr)->ifa_dev->dev; + + if (event == NETDEV_DOWN) { + /* IP address was deleted. Search entire table for + conntracks which were associated with that device, + and forget them. */ + IP_NF_ASSERT(dev->ifindex != 0); + + ip_ct_selective_cleanup(device_cmp, (void *)(long)dev->ifindex); + } return NOTIFY_DONE; } +static struct notifier_block masq_dev_notifier = { + .notifier_call = masq_device_event, +}; + static struct notifier_block masq_inet_notifier = { .notifier_call = masq_inet_event, }; @@ -178,9 +186,12 @@ ret = ipt_register_target(&masquerade); - if (ret == 0) + if (ret == 0) { + /* Register for device down reports */ + register_netdevice_notifier(&masq_dev_notifier); /* Register IP address change reports */ register_inetaddr_notifier(&masq_inet_notifier); + } return ret; } @@ -188,6 +199,7 @@ static void __exit fini(void) { ipt_unregister_target(&masquerade); + unregister_netdevice_notifier(&masq_dev_notifier); unregister_inetaddr_notifier(&masq_inet_notifier); } diff -Nru a/net/ipv4/netfilter/ipt_REJECT.c b/net/ipv4/netfilter/ipt_REJECT.c --- a/net/ipv4/netfilter/ipt_REJECT.c 2004-11-29 21:22:08 -08:00 +++ b/net/ipv4/netfilter/ipt_REJECT.c 2004-11-29 21:22:08 -08:00 @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #ifdef CONFIG_BRIDGE_NETFILTER @@ -38,21 +39,8 @@ #define DEBUGP(format, args...) #endif -/* If the original packet is part of a connection, but the connection - is not confirmed, our manufactured reply will not be associated - with it, so we need to do this manually. */ -static void connection_attach(struct sk_buff *new_skb, struct sk_buff *skb) -{ - void (*attach)(struct sk_buff *, struct sk_buff *); - - /* Avoid module unload race with ip_ct_attach being NULLed out */ - if (skb->nfct && (attach = ip_ct_attach) != NULL) { - mb(); /* Just to be sure: must be read before executing this */ - attach(new_skb, skb); - } -} - -static inline struct rtable *route_reverse(struct sk_buff *skb, int hook) +static inline struct rtable *route_reverse(struct sk_buff *skb, + struct tcphdr *tcph, int hook) { struct iphdr *iph = skb->nh.iph; struct dst_entry *odst; @@ -89,10 +77,23 @@ dst_release(&rt->u.dst); rt = (struct rtable *)skb->dst; skb->dst = odst; + + fl.nl_u.ip4_u.daddr = iph->saddr; + fl.nl_u.ip4_u.saddr = iph->daddr; + fl.nl_u.ip4_u.tos = RT_TOS(iph->tos); } if (rt->u.dst.error) { dst_release(&rt->u.dst); + return NULL; + } + + fl.proto = IPPROTO_TCP; + fl.fl_ip_sport = tcph->dest; + fl.fl_ip_dport = tcph->source; + + if (xfrm_lookup((struct dst_entry **)&rt, &fl, NULL, 0)) { + dst_release(&rt->u.dst); rt = NULL; } @@ -124,7 +125,7 @@ return; /* FIXME: Check checksum --RR */ - if ((rt = route_reverse(oldskb, hook)) == NULL) + if ((rt = route_reverse(oldskb, oth, hook)) == NULL) return; hh_len = LL_RESERVED_SPACE(rt->u.dst.dev); @@ -209,7 +210,7 @@ if (nskb->len > dst_pmtu(nskb->dst)) goto free_nskb; - connection_attach(nskb, oldskb); + nf_ct_attach(nskb, oldskb); NF_HOOK(PF_INET, NF_IP_LOCAL_OUT, nskb, NULL, nskb->dst->dev, ip_finish_output); @@ -296,10 +297,23 @@ tos = (iph->tos & IPTOS_TOS_MASK) | IPTOS_PREC_INTERNETCONTROL; { - struct flowi fl = { .nl_u = { .ip4_u = - { .daddr = skb_in->nh.iph->saddr, - .saddr = saddr, - .tos = RT_TOS(tos) } } }; + struct flowi fl = { + .nl_u = { + .ip4_u = { + .daddr = skb_in->nh.iph->saddr, + .saddr = saddr, + .tos = RT_TOS(tos) + } + }, + .proto = IPPROTO_ICMP, + .uli_u = { + .icmpt = { + .type = ICMP_DEST_UNREACH, + .code = code + } + } + }; + if (ip_route_output_key(&rt, &fl)) return; } @@ -360,7 +374,7 @@ icmph->checksum = ip_compute_csum((unsigned char *)icmph, length - sizeof(struct iphdr)); - connection_attach(nskb, skb_in); + nf_ct_attach(nskb, skb_in); NF_HOOK(PF_INET, NF_IP_LOCAL_OUT, nskb, NULL, nskb->dst->dev, ip_finish_output); diff -Nru a/net/ipv4/raw.c b/net/ipv4/raw.c --- a/net/ipv4/raw.c 2004-11-29 21:22:07 -08:00 +++ b/net/ipv4/raw.c 2004-11-29 21:22:07 -08:00 @@ -130,6 +130,9 @@ { int type; + if (!pskb_may_pull(skb, sizeof(struct icmphdr))) + return 1; + type = skb->h.icmph->type; if (type < 32) { __u32 data = raw4_sk(sk)->filter.data; @@ -706,6 +709,7 @@ struct proto raw_prot = { .name = "RAW", + .owner = THIS_MODULE, .close = raw_close, .connect = ip4_datagram_connect, .disconnect = udp_disconnect, diff -Nru a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c --- a/net/ipv4/tcp_ipv4.c 2004-11-29 21:22:07 -08:00 +++ b/net/ipv4/tcp_ipv4.c 2004-11-29 21:22:07 -08:00 @@ -2598,6 +2598,7 @@ struct proto tcp_prot = { .name = "TCP", + .owner = THIS_MODULE, .close = tcp_close, .connect = tcp_v4_connect, .disconnect = tcp_disconnect, diff -Nru a/net/ipv4/udp.c b/net/ipv4/udp.c --- a/net/ipv4/udp.c 2004-11-29 21:22:06 -08:00 +++ b/net/ipv4/udp.c 2004-11-29 21:22:06 -08:00 @@ -1306,6 +1306,7 @@ struct proto udp_prot = { .name = "UDP", + .owner = THIS_MODULE, .close = udp_close, .connect = ip4_datagram_connect, .disconnect = udp_disconnect, diff -Nru a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c --- a/net/ipv6/addrconf.c 2004-11-29 21:22:08 -08:00 +++ b/net/ipv6/addrconf.c 2004-11-29 21:22:08 -08:00 @@ -137,6 +137,7 @@ static void addrconf_dad_timer(unsigned long data); static void addrconf_dad_completed(struct inet6_ifaddr *ifp); static void addrconf_rs_timer(unsigned long data); +static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa); static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa); static void inet6_prefix_notify(int event, struct inet6_dev *idev, @@ -486,10 +487,15 @@ struct inet6_ifaddr *ifa = NULL; struct rt6_info *rt; int hash; - static spinlock_t lock = SPIN_LOCK_UNLOCKED; int err = 0; - spin_lock_bh(&lock); + read_lock_bh(&addrconf_lock); + if (idev->dead) { + err = -ENODEV; /*XXX*/ + goto out2; + } + + write_lock(&addrconf_hash_lock); /* Ignore adding duplicate addresses on an interface */ if (ipv6_chk_same_addr(addr, idev->dev)) { @@ -523,13 +529,6 @@ ifa->flags = flags | IFA_F_TENTATIVE; ifa->cstamp = ifa->tstamp = jiffies; - read_lock(&addrconf_lock); - if (idev->dead) { - read_unlock(&addrconf_lock); - err = -ENODEV; /*XXX*/ - goto out; - } - inet6_ifa_count++; ifa->idev = idev; in6_dev_hold(idev); @@ -539,35 +538,30 @@ /* Add to big hash table */ hash = ipv6_addr_hash(addr); - write_lock_bh(&addrconf_hash_lock); ifa->lst_next = inet6_addr_lst[hash]; inet6_addr_lst[hash] = ifa; in6_ifa_hold(ifa); - write_unlock_bh(&addrconf_hash_lock); + write_unlock(&addrconf_hash_lock); - write_lock_bh(&idev->lock); + write_lock(&idev->lock); /* Add to inet6_dev unicast addr list. */ ifa->if_next = idev->addr_list; idev->addr_list = ifa; #ifdef CONFIG_IPV6_PRIVACY - ifa->regen_count = 0; if (ifa->flags&IFA_F_TEMPORARY) { ifa->tmp_next = idev->tempaddr_list; idev->tempaddr_list = ifa; in6_ifa_hold(ifa); - } else { - ifa->tmp_next = NULL; } #endif ifa->rt = rt; in6_ifa_hold(ifa); - write_unlock_bh(&idev->lock); - read_unlock(&addrconf_lock); -out: - spin_unlock_bh(&lock); + write_unlock(&idev->lock); +out2: + read_unlock_bh(&addrconf_lock); if (unlikely(err == 0)) notifier_call_chain(&inet6addr_chain, NETDEV_UP, ifa); @@ -577,6 +571,9 @@ } return ifa; +out: + write_unlock(&addrconf_hash_lock); + goto out2; } /* This function wants to get referenced ifp and releases it before return */ @@ -645,13 +642,14 @@ #ifdef CONFIG_IPV6_PRIVACY static int ipv6_create_tempaddr(struct inet6_ifaddr *ifp, struct inet6_ifaddr *ift) { - struct inet6_dev *idev; + struct inet6_dev *idev = ifp->idev; struct in6_addr addr, *tmpaddr; - unsigned long tmp_prefered_lft, tmp_valid_lft; + unsigned long tmp_prefered_lft, tmp_valid_lft, tmp_cstamp, tmp_tstamp; int tmp_plen; int ret = 0; int max_addresses; + write_lock(&idev->lock); if (ift) { spin_lock_bh(&ift->lock); memcpy(&addr.s6_addr[8], &ift->addr.s6_addr[8], 8); @@ -661,40 +659,35 @@ tmpaddr = NULL; } retry: - spin_lock_bh(&ifp->lock); - in6_ifa_hold(ifp); - idev = ifp->idev; in6_dev_hold(idev); - memcpy(addr.s6_addr, ifp->addr.s6_addr, 8); - write_lock(&idev->lock); if (idev->cnf.use_tempaddr <= 0) { write_unlock(&idev->lock); - spin_unlock_bh(&ifp->lock); printk(KERN_INFO "ipv6_create_tempaddr(): use_tempaddr is disabled.\n"); in6_dev_put(idev); - in6_ifa_put(ifp); ret = -1; goto out; } + spin_lock_bh(&ifp->lock); if (ifp->regen_count++ >= idev->cnf.regen_max_retry) { idev->cnf.use_tempaddr = -1; /*XXX*/ - write_unlock(&idev->lock); spin_unlock_bh(&ifp->lock); + write_unlock(&idev->lock); printk(KERN_WARNING "ipv6_create_tempaddr(): regeneration time exceeded. disabled temporary address support.\n"); in6_dev_put(idev); - in6_ifa_put(ifp); ret = -1; goto out; } + in6_ifa_hold(ifp); + memcpy(addr.s6_addr, ifp->addr.s6_addr, 8); if (__ipv6_try_regen_rndid(idev, tmpaddr) < 0) { - write_unlock(&idev->lock); spin_unlock_bh(&ifp->lock); + write_unlock(&idev->lock); printk(KERN_WARNING "ipv6_create_tempaddr(): regeneration of randomized interface id failed.\n"); - in6_dev_put(idev); in6_ifa_put(ifp); + in6_dev_put(idev); ret = -1; goto out; } @@ -707,27 +700,33 @@ idev->cnf.temp_prefered_lft - desync_factor / HZ); tmp_plen = ifp->prefix_len; max_addresses = idev->cnf.max_addresses; - write_unlock(&idev->lock); + tmp_cstamp = ifp->cstamp; + tmp_tstamp = ifp->tstamp; spin_unlock_bh(&ifp->lock); + + write_unlock(&idev->lock); ift = !max_addresses || ipv6_count_addresses(idev) < max_addresses ? ipv6_add_addr(idev, &addr, tmp_plen, ipv6_addr_type(&addr)&IPV6_ADDR_SCOPE_MASK, IFA_F_TEMPORARY) : NULL; if (!ift || IS_ERR(ift)) { - in6_dev_put(idev); in6_ifa_put(ifp); + in6_dev_put(idev); printk(KERN_INFO "ipv6_create_tempaddr(): retry temporary address regeneration.\n"); tmpaddr = &addr; + write_lock(&idev->lock); goto retry; } + spin_lock_bh(&ift->lock); ift->ifpub = ifp; ift->valid_lft = tmp_valid_lft; ift->prefered_lft = tmp_prefered_lft; - ift->cstamp = ifp->cstamp; - ift->tstamp = ifp->tstamp; + ift->cstamp = tmp_cstamp; + ift->tstamp = tmp_tstamp; spin_unlock_bh(&ift->lock); + addrconf_dad_start(ift, 0); in6_ifa_put(ift); in6_dev_put(idev); @@ -938,14 +937,12 @@ struct inet6_ifaddr * ifp; u8 hash = ipv6_addr_hash(addr); - read_lock_bh(&addrconf_hash_lock); for(ifp = inet6_addr_lst[hash]; ifp; ifp=ifp->lst_next) { if (ipv6_addr_equal(&ifp->addr, addr)) { if (dev == NULL || ifp->idev->dev == dev) break; } } - read_unlock_bh(&addrconf_hash_lock); return ifp != NULL; } @@ -2049,7 +2046,7 @@ addrconf_del_timer(ifa); write_unlock_bh(&idev->lock); - ipv6_ifa_notify(RTM_DELADDR, ifa); + __ipv6_ifa_notify(RTM_DELADDR, ifa); in6_ifa_put(ifa); write_lock_bh(&idev->lock); @@ -2129,11 +2126,10 @@ */ static void addrconf_dad_start(struct inet6_ifaddr *ifp, int flags) { - struct net_device *dev; + struct inet6_dev *idev = ifp->idev; + struct net_device *dev = idev->dev; unsigned long rand_num; - dev = ifp->idev->dev; - addrconf_join_solict(dev, &ifp->addr); if (ifp->prefix_len != 128 && (ifp->flags&IFA_F_PERMANENT)) @@ -2141,31 +2137,43 @@ flags); net_srandom(ifp->addr.s6_addr32[3]); - rand_num = net_random() % (ifp->idev->cnf.rtr_solicit_delay ? : 1); + rand_num = net_random() % (idev->cnf.rtr_solicit_delay ? : 1); + read_lock_bh(&idev->lock); + if (ifp->dead) + goto out; spin_lock_bh(&ifp->lock); if (dev->flags&(IFF_NOARP|IFF_LOOPBACK) || !(ifp->flags&IFA_F_TENTATIVE)) { ifp->flags &= ~IFA_F_TENTATIVE; spin_unlock_bh(&ifp->lock); + read_unlock_bh(&idev->lock); addrconf_dad_completed(ifp); return; } - ifp->probes = ifp->idev->cnf.dad_transmits; + ifp->probes = idev->cnf.dad_transmits; addrconf_mod_timer(ifp, AC_DAD, rand_num); spin_unlock_bh(&ifp->lock); +out: + read_unlock_bh(&idev->lock); } static void addrconf_dad_timer(unsigned long data) { struct inet6_ifaddr *ifp = (struct inet6_ifaddr *) data; + struct inet6_dev *idev = ifp->idev; struct in6_addr unspec; struct in6_addr mcaddr; + read_lock_bh(&idev->lock); + if (idev->dead) { + read_unlock_bh(&idev->lock); + goto out; + } spin_lock_bh(&ifp->lock); if (ifp->probes == 0) { /* @@ -2174,22 +2182,23 @@ ifp->flags &= ~IFA_F_TENTATIVE; spin_unlock_bh(&ifp->lock); + read_unlock_bh(&idev->lock); addrconf_dad_completed(ifp); - in6_ifa_put(ifp); - return; + goto out; } ifp->probes--; addrconf_mod_timer(ifp, AC_DAD, ifp->idev->nd_parms->retrans_time); spin_unlock_bh(&ifp->lock); + read_unlock_bh(&idev->lock); /* send a neighbour solicitation for our addr */ memset(&unspec, 0, sizeof(unspec)); addrconf_addr_solict_mult(&ifp->addr, &mcaddr); ndisc_send_ns(ifp->idev->dev, NULL, &ifp->addr, &mcaddr, &unspec); - +out: in6_ifa_put(ifp); } @@ -2980,7 +2989,7 @@ .dumpit = inet6_dump_fib, }, }; -static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp) +static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp) { inet6_ifa_notify(event ? : RTM_NEWADDR, ifp); @@ -3005,6 +3014,14 @@ } } +static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp) +{ + read_lock_bh(&addrconf_lock); + if (likely(ifp->idev->dead == 0)) + __ipv6_ifa_notify(event, ifp); + read_unlock_bh(&addrconf_lock); +} + #ifdef CONFIG_SYSCTL static @@ -3387,6 +3404,29 @@ void __init addrconf_init(void) { + /* The addrconf netdev notifier requires that loopback_dev + * has it's ipv6 private information allocated and setup + * before it can bring up and give link-local addresses + * to other devices which are up. + * + * Unfortunately, loopback_dev is not necessarily the first + * entry in the global dev_base list of net devices. In fact, + * it is likely to be the very last entry on that list. + * So this causes the notifier registry below to try and + * give link-local addresses to all devices besides loopback_dev + * first, then loopback_dev, which cases all the non-loopback_dev + * devices to fail to get a link-local address. + * + * So, as a temporary fix, register loopback_dev first by hand. + * Longer term, all of the dependencies ipv6 has upon the loopback + * device and it being up should be removed. + */ + rtnl_lock(); + addrconf_notify(&ipv6_dev_notf, NETDEV_REGISTER, &loopback_dev); + if (loopback_dev.flags & IFF_UP) + addrconf_notify(&ipv6_dev_notf, NETDEV_UP, &loopback_dev); + rtnl_unlock(); + register_netdevice_notifier(&ipv6_dev_notf); #ifdef CONFIG_IPV6_PRIVACY diff -Nru a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c --- a/net/ipv6/af_inet6.c 2004-11-29 21:22:07 -08:00 +++ b/net/ipv6/af_inet6.c 2004-11-29 21:22:07 -08:00 @@ -174,10 +174,10 @@ goto out; sock_init_data(sock, sk); - sk_set_owner(sk, THIS_MODULE); + sk->sk_prot = answer_prot; + sk_set_owner(sk, sk->sk_prot->owner); rc = 0; - sk->sk_prot = answer_prot; sk->sk_no_check = answer_no_check; if (INET_PROTOSW_REUSE & answer_flags) sk->sk_reuse = 1; diff -Nru a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c --- a/net/ipv6/ip6_output.c 2004-11-29 21:22:06 -08:00 +++ b/net/ipv6/ip6_output.c 2004-11-29 21:22:06 -08:00 @@ -147,7 +147,7 @@ int ip6_output(struct sk_buff *skb) { - if ((skb->len > dst_pmtu(skb->dst) || skb_shinfo(skb)->frag_list)) + if (skb->len > dst_pmtu(skb->dst)) return ip6_fragment(skb, ip6_output2); else return ip6_output2(skb); diff -Nru a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c --- a/net/ipv6/netfilter/ip6_queue.c 2004-11-29 21:22:07 -08:00 +++ b/net/ipv6/netfilter/ip6_queue.c 2004-11-29 21:22:07 -08:00 @@ -167,6 +167,7 @@ __ipq_reset(void) { peer_pid = 0; + net_disable_timestamp(); __ipq_set_mode(IPQ_COPY_NONE, 0); __ipq_flush(NF_DROP); } @@ -262,7 +263,8 @@ } if (data_len) - memcpy(pmsg->payload, entry->skb->data, data_len); + if (skb_copy_bits(entry->skb, 0, pmsg->payload, data_len)) + BUG(); nlh->nlmsg_len = skb->tail - old_tail; return skb; @@ -366,6 +368,8 @@ } skb_put(e->skb, diff); } + if (!skb_ip_make_writable(&e->skb, v->data_len)) + return -ENOMEM; memcpy(e->skb->data, v->payload, v->data_len); e->skb->nfcache |= NFC_ALTERED; @@ -517,9 +521,10 @@ write_unlock_bh(&queue_lock); RCV_SKB_FAIL(-EBUSY); } - } - else + } else { + net_enable_timestamp(); peer_pid = pid; + } write_unlock_bh(&queue_lock); diff -Nru a/net/ipv6/netfilter/ip6t_eui64.c b/net/ipv6/netfilter/ip6t_eui64.c --- a/net/ipv6/netfilter/ip6t_eui64.c 2004-11-29 21:22:06 -08:00 +++ b/net/ipv6/netfilter/ip6t_eui64.c 2004-11-29 21:22:06 -08:00 @@ -69,7 +69,7 @@ { if (hook_mask & ~((1 << NF_IP6_PRE_ROUTING) | (1 << NF_IP6_LOCAL_IN) | - (1 << NF_IP6_PRE_ROUTING) )) { + (1 << NF_IP6_FORWARD))) { printk("ip6t_eui64: only valid for PRE_ROUTING, LOCAL_IN or FORWARD.\n"); return 0; } diff -Nru a/net/ipv6/netfilter/ip6t_ipv6header.c b/net/ipv6/netfilter/ip6t_ipv6header.c --- a/net/ipv6/netfilter/ip6t_ipv6header.c 2004-11-29 21:22:08 -08:00 +++ b/net/ipv6/netfilter/ip6t_ipv6header.c 2004-11-29 21:22:08 -08:00 @@ -51,7 +51,7 @@ temp = 0; while (ip6t_ext_hdr(nexthdr)) { - struct ipv6_opt_hdr *hdr; + struct ipv6_opt_hdr _hdr, *hp; int hdrlen; /* Is there enough space for the next ext header? */ @@ -68,15 +68,16 @@ break; } - hdr=(struct ipv6_opt_hdr *)skb->data+ptr; + hp = skb_header_pointer(skb, ptr, sizeof(_hdr), &_hdr); + BUG_ON(hp == NULL); /* Calculate the header length */ if (nexthdr == NEXTHDR_FRAGMENT) { hdrlen = 8; } else if (nexthdr == NEXTHDR_AUTH) - hdrlen = (hdr->hdrlen+2)<<2; + hdrlen = (hp->hdrlen+2)<<2; else - hdrlen = ipv6_optlen(hdr); + hdrlen = ipv6_optlen(hp); /* set the flag */ switch (nexthdr){ @@ -100,7 +101,7 @@ break; } - nexthdr = hdr->nexthdr; + nexthdr = hp->nexthdr; len -= hdrlen; ptr += hdrlen; if (ptr > skb->len) @@ -111,10 +112,14 @@ temp |= MASK_PROTO; if (info->modeflag) - return (!( (temp & info->matchflags) - ^ info->matchflags) ^ info->invflags); - else - return (!( temp ^ info->matchflags) ^ info->invflags); + return !((temp ^ info->matchflags ^ info->invflags) + & info->matchflags); + else { + if (info->invflags) + return temp != info->matchflags; + else + return temp == info->matchflags; + } } static int @@ -124,9 +129,16 @@ unsigned int matchsize, unsigned int hook_mask) { + const struct ip6t_ipv6header_info *info = matchinfo; + /* Check for obvious errors */ /* This match is valid in all hooks! */ if (matchsize != IP6T_ALIGN(sizeof(struct ip6t_ipv6header_info))) + return 0; + + /* invflags is 0 or 0xff in hard mode */ + if ((!info->modeflag) && info->invflags != 0x00 + && info->invflags != 0xFF) return 0; return 1; diff -Nru a/net/ipv6/raw.c b/net/ipv6/raw.c --- a/net/ipv6/raw.c 2004-11-29 21:22:07 -08:00 +++ b/net/ipv6/raw.c 2004-11-29 21:22:07 -08:00 @@ -975,6 +975,7 @@ struct proto rawv6_prot = { .name = "RAW", + .owner = THIS_MODULE, .close = rawv6_close, .connect = ip6_datagram_connect, .disconnect = udp_disconnect, diff -Nru a/net/ipv6/route.c b/net/ipv6/route.c --- a/net/ipv6/route.c 2004-11-29 21:22:08 -08:00 +++ b/net/ipv6/route.c 2004-11-29 21:22:08 -08:00 @@ -476,13 +476,19 @@ BACKTRACK(); if (!rt->rt6i_nexthop && !(rt->rt6i_flags & RTF_NONEXTHOP)) { + struct rt6_info *nrt; + dst_hold(&rt->u.dst); read_unlock_bh(&rt6_lock); - rt = rt6_cow(rt, &skb->nh.ipv6h->daddr, - &skb->nh.ipv6h->saddr); - + nrt = rt6_cow(rt, &skb->nh.ipv6h->daddr, + &skb->nh.ipv6h->saddr); + + dst_release(&rt->u.dst); + rt = nrt; + if (rt->u.dst.error != -EEXIST || --attempts <= 0) goto out2; + /* Race condition! In the gap, when rt6_lock was released someone could insert this route. Relookup. */ @@ -531,9 +537,14 @@ } if (!rt->rt6i_nexthop && !(rt->rt6i_flags & RTF_NONEXTHOP)) { + struct rt6_info *nrt; + dst_hold(&rt->u.dst); read_unlock_bh(&rt6_lock); - rt = rt6_cow(rt, &fl->fl6_dst, &fl->fl6_src); + nrt = rt6_cow(rt, &fl->fl6_dst, &fl->fl6_src); + + dst_release(&rt->u.dst); + rt = nrt; if (rt->u.dst.error != -EEXIST || --attempts <= 0) goto out2; diff -Nru a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c --- a/net/ipv6/tcp_ipv6.c 2004-11-29 21:22:07 -08:00 +++ b/net/ipv6/tcp_ipv6.c 2004-11-29 21:22:07 -08:00 @@ -2132,6 +2132,7 @@ struct proto tcpv6_prot = { .name = "TCPv6", + .owner = THIS_MODULE, .close = tcp_close, .connect = tcp_v6_connect, .disconnect = tcp_disconnect, diff -Nru a/net/ipv6/udp.c b/net/ipv6/udp.c --- a/net/ipv6/udp.c 2004-11-29 21:22:08 -08:00 +++ b/net/ipv6/udp.c 2004-11-29 21:22:08 -08:00 @@ -1033,6 +1033,7 @@ struct proto udpv6_prot = { .name = "UDP", + .owner = THIS_MODULE, .close = udpv6_close, .connect = ip6_datagram_connect, .disconnect = udp_disconnect, diff -Nru a/net/ipv6/xfrm6_output.c b/net/ipv6/xfrm6_output.c --- a/net/ipv6/xfrm6_output.c 2004-11-29 21:22:08 -08:00 +++ b/net/ipv6/xfrm6_output.c 2004-11-29 21:22:08 -08:00 @@ -79,7 +79,7 @@ int mtu, ret = 0; struct dst_entry *dst = skb->dst; - mtu = dst_pmtu(dst) - sizeof(struct ipv6hdr); + mtu = dst_pmtu(dst) - dst->header_len - dst->trailer_len; if (mtu < IPV6_MIN_MTU) mtu = IPV6_MIN_MTU; diff -Nru a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c --- a/net/netlink/af_netlink.c 2004-11-29 21:22:07 -08:00 +++ b/net/netlink/af_netlink.c 2004-11-29 21:22:07 -08:00 @@ -471,9 +471,16 @@ return err; } - nlk->groups = nladdr->nl_groups; - if (nladdr->nl_groups) + if (!nladdr->nl_groups && !nlk->groups) + return 0; + + netlink_table_grab(); + if (nlk->groups && !nladdr->nl_groups) + __sk_del_bind_node(sk); + else if (!nlk->groups && nladdr->nl_groups) sk_add_bind_node(sk, &nl_table[sk->sk_protocol].mc_list); + nlk->groups = nladdr->nl_groups; + netlink_table_ungrab(); return 0; } diff -Nru a/net/sched/police.c b/net/sched/police.c --- a/net/sched/police.c 2004-11-29 21:22:08 -08:00 +++ b/net/sched/police.c 2004-11-29 21:22:08 -08:00 @@ -576,6 +576,7 @@ if (gnet_stats_start_copy_compat(skb, TCA_STATS2, TCA_STATS, TCA_XSTATS, p->stats_lock, &d) < 0) + goto errout; if (gnet_stats_copy_basic(&d, &p->bstats) < 0 || #ifdef CONFIG_NET_ESTIMATOR diff -Nru a/net/sctp/ipv6.c b/net/sctp/ipv6.c --- a/net/sctp/ipv6.c 2004-11-29 21:22:07 -08:00 +++ b/net/sctp/ipv6.c 2004-11-29 21:22:07 -08:00 @@ -78,7 +78,10 @@ #include -extern struct notifier_block sctp_inetaddr_notifier; +extern int sctp_inetaddr_event(struct notifier_block *, unsigned long, void *); +static struct notifier_block sctp_inet6addr_notifier = { + .notifier_call = sctp_inetaddr_event, +}; /* ICMP error handler. */ void sctp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, @@ -983,7 +986,7 @@ sctp_register_af(&sctp_ipv6_specific); /* Register notifier for inet6 address additions/deletions. */ - register_inet6addr_notifier(&sctp_inetaddr_notifier); + register_inet6addr_notifier(&sctp_inet6addr_notifier); rc = 0; out: return rc; @@ -999,6 +1002,6 @@ inet6_del_protocol(&sctpv6_protocol, IPPROTO_SCTP); inet6_unregister_protosw(&sctpv6_seqpacket_protosw); inet6_unregister_protosw(&sctpv6_stream_protosw); - unregister_inet6addr_notifier(&sctp_inetaddr_notifier); + unregister_inet6addr_notifier(&sctp_inet6addr_notifier); sk_free_slab(&sctpv6_prot); } diff -Nru a/net/sctp/protocol.c b/net/sctp/protocol.c --- a/net/sctp/protocol.c 2004-11-29 21:22:07 -08:00 +++ b/net/sctp/protocol.c 2004-11-29 21:22:07 -08:00 @@ -622,8 +622,8 @@ /* Event handler for inet address addition/deletion events. * Basically, whenever there is an event, we re-build our local address list. */ -static int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev, - void *ptr) +int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev, + void *ptr) { unsigned long flags; @@ -824,7 +824,7 @@ }; /* Notifier for inetaddr addition/deletion events. */ -struct notifier_block sctp_inetaddr_notifier = { +static struct notifier_block sctp_inetaddr_notifier = { .notifier_call = sctp_inetaddr_event, }; diff -Nru a/net/sctp/socket.c b/net/sctp/socket.c --- a/net/sctp/socket.c 2004-11-29 21:22:08 -08:00 +++ b/net/sctp/socket.c 2004-11-29 21:22:08 -08:00 @@ -2669,7 +2669,7 @@ goto out; } - SCTP_DEBUG_PRINTK("sctp_getsockopt_sctp_status(%d): %d %d %p\n", + SCTP_DEBUG_PRINTK("sctp_getsockopt_sctp_status(%d): %d %d %d\n", len, status.sstat_state, status.sstat_rwnd, status.sstat_assoc_id); @@ -4652,6 +4652,7 @@ /* This proto struct describes the ULP interface for SCTP. */ struct proto sctp_prot = { .name = "SCTP", + .owner = THIS_MODULE, .close = sctp_close, .connect = sctp_connect, .disconnect = sctp_disconnect, @@ -4675,6 +4676,7 @@ #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) struct proto sctpv6_prot = { .name = "SCTPv6", + .owner = THIS_MODULE, .close = sctp_close, .connect = sctp_connect, .disconnect = sctp_disconnect, diff -Nru a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c --- a/net/sunrpc/svcauth_unix.c 2004-11-29 21:22:07 -08:00 +++ b/net/sunrpc/svcauth_unix.c 2004-11-29 21:22:07 -08:00 @@ -150,11 +150,14 @@ } static struct ip_map *ip_map_lookup(struct ip_map *, int); + static int ip_map_parse(struct cache_detail *cd, char *mesg, int mlen) { /* class ipaddress [domainname] */ - char class[50], buf[50]; + /* should be safe just to use the start of the input buffer + * for scratch: */ + char *buf = mesg; int len; int b1,b2,b3,b4; char c; @@ -167,13 +170,11 @@ mesg[mlen-1] = 0; /* class */ - len = qword_get(&mesg, class, 50); + len = qword_get(&mesg, ipm.m_class, sizeof(ipm.m_class)); if (len <= 0) return -EINVAL; - if (len >= sizeof(ipm.m_class)) - return -EINVAL; /* ip address */ - len = qword_get(&mesg, buf, 50); + len = qword_get(&mesg, buf, mlen); if (len <= 0) return -EINVAL; if (sscanf(buf, "%u.%u.%u.%u%c", &b1, &b2, &b3, &b4, &c) != 4) @@ -184,7 +185,7 @@ return -EINVAL; /* domainname, or empty for NEGATIVE */ - len = qword_get(&mesg, buf, 50); + len = qword_get(&mesg, buf, mlen); if (len < 0) return -EINVAL; if (len) { @@ -194,7 +195,6 @@ } else dom = NULL; - strcpy(ipm.m_class, class); ipm.m_addr.s_addr = htonl((((((b1<<8)|b2)<<8)|b3)<<8)|b4); ipm.h.flags = 0; diff -Nru a/net/unix/af_unix.c b/net/unix/af_unix.c --- a/net/unix/af_unix.c 2004-11-29 21:22:07 -08:00 +++ b/net/unix/af_unix.c 2004-11-29 21:22:07 -08:00 @@ -466,6 +466,8 @@ struct msghdr *, size_t, int); static int unix_dgram_connect(struct socket *, struct sockaddr *, int, int); +static int unix_seqpacket_sendmsg(struct kiocb *, struct socket *, + struct msghdr *, size_t); static struct proto_ops unix_stream_ops = { .family = PF_UNIX, @@ -524,7 +526,7 @@ .shutdown = unix_shutdown, .setsockopt = sock_no_setsockopt, .getsockopt = sock_no_getsockopt, - .sendmsg = unix_dgram_sendmsg, + .sendmsg = unix_seqpacket_sendmsg, .recvmsg = unix_dgram_recvmsg, .mmap = sock_no_mmap, .sendpage = sock_no_sendpage, @@ -1354,9 +1356,11 @@ if (other->sk_shutdown & RCV_SHUTDOWN) goto out_unlock; - err = security_unix_may_send(sk->sk_socket, other->sk_socket); - if (err) - goto out_unlock; + if (sk->sk_type != SOCK_SEQPACKET) { + err = security_unix_may_send(sk->sk_socket, other->sk_socket); + if (err) + goto out_unlock; + } if (unix_peer(other) != sk && (skb_queue_len(&other->sk_receive_queue) > @@ -1506,6 +1510,25 @@ return sent ? : err; } +static int unix_seqpacket_sendmsg(struct kiocb *kiocb, struct socket *sock, + struct msghdr *msg, size_t len) +{ + int err; + struct sock *sk = sock->sk; + + err = sock_error(sk); + if (err) + return err; + + if (sk->sk_state != TCP_ESTABLISHED) + return -ENOTCONN; + + if (msg->msg_namelen) + msg->msg_namelen = 0; + + return unix_dgram_sendmsg(kiocb, sock, msg, len); +} + static void unix_copy_addr(struct msghdr *msg, struct sock *sk) { struct unix_sock *u = unix_sk(sk); @@ -1535,9 +1558,11 @@ msg->msg_namelen = 0; + down(&u->readsem); + skb = skb_recv_datagram(sk, flags, noblock, &err); if (!skb) - goto out; + goto out_unlock; wake_up_interruptible(&u->peer_wait); @@ -1587,6 +1612,8 @@ out_free: skb_free_datagram(sk,skb); +out_unlock: + up(&u->readsem); out: return err; } diff -Nru a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c --- a/net/xfrm/xfrm_policy.c 2004-11-29 21:22:07 -08:00 +++ b/net/xfrm/xfrm_policy.c 2004-11-29 21:22:07 -08:00 @@ -353,6 +353,7 @@ newpos = p; if (delpol) break; + p = &pol->next; } if (newpos) p = newpos; diff -Nru a/security/selinux/hooks.c b/security/selinux/hooks.c --- a/security/selinux/hooks.c 2004-11-29 21:22:08 -08:00 +++ b/security/selinux/hooks.c 2004-11-29 21:22:08 -08:00 @@ -631,10 +631,12 @@ case PF_UNIX: switch (type) { case SOCK_STREAM: + case SOCK_SEQPACKET: return SECCLASS_UNIX_STREAM_SOCKET; case SOCK_DGRAM: return SECCLASS_UNIX_DGRAM_SOCKET; } + break; case PF_INET: case PF_INET6: switch (type) { @@ -645,6 +647,7 @@ case SOCK_RAW: return SECCLASS_RAWIP_SOCKET; } + break; case PF_NETLINK: switch (protocol) { case NETLINK_ROUTE: diff -Nru a/security/selinux/ss/avtab.c b/security/selinux/ss/avtab.c --- a/security/selinux/ss/avtab.c 2004-11-29 21:22:08 -08:00 +++ b/security/selinux/ss/avtab.c 2004-11-29 21:22:08 -08:00 @@ -407,3 +407,8 @@ sizeof(struct avtab_node), 0, SLAB_PANIC, NULL, NULL); } + +void avtab_cache_destroy(void) +{ + kmem_cache_destroy (avtab_node_cachep); +} diff -Nru a/security/selinux/ss/avtab.h b/security/selinux/ss/avtab.h --- a/security/selinux/ss/avtab.h 2004-11-29 21:22:07 -08:00 +++ b/security/selinux/ss/avtab.h 2004-11-29 21:22:07 -08:00 @@ -79,6 +79,7 @@ struct avtab_node *avtab_search_node_next(struct avtab_node *node, int specified); void avtab_cache_init(void); +void avtab_cache_destroy(void); #define AVTAB_HASH_BITS 15 #define AVTAB_HASH_BUCKETS (1 << AVTAB_HASH_BITS) diff -Nru a/security/selinux/ss/services.c b/security/selinux/ss/services.c --- a/security/selinux/ss/services.c 2004-11-29 21:22:08 -08:00 +++ b/security/selinux/ss/services.c 2004-11-29 21:22:08 -08:00 @@ -1037,11 +1037,13 @@ avtab_cache_init(); if (policydb_read(&policydb, fp)) { LOAD_UNLOCK; + avtab_cache_destroy(); return -EINVAL; } if (policydb_load_isids(&policydb, &sidtab)) { LOAD_UNLOCK; policydb_destroy(&policydb); + avtab_cache_destroy(); return -EINVAL; } ss_initialized = 1; diff -Nru a/sound/oss/ad1889.c b/sound/oss/ad1889.c --- a/sound/oss/ad1889.c 2004-11-29 21:22:07 -08:00 +++ b/sound/oss/ad1889.c 2004-11-29 21:22:07 -08:00 @@ -1011,36 +1011,45 @@ if (!(pci_resource_flags(pcidev, 0) & IORESOURCE_MEM)) { printk(KERN_ERR DEVNAME ": memory region not assigned\n"); - goto err_free_mem; + goto out1; + } + + if (pci_request_region(pcidev, 0, DEVNAME)) { + printk(KERN_ERR DEVNAME ": unable to request memory region\n"); + goto out1; + } + + dev->regbase = ioremap_nocache(bar, AD_DSIOMEMSIZE); + if (!dev->regbase) { + printk(KERN_ERR DEVNAME ": unable to remap iomem\n"); + goto out2; } if (request_irq(pcidev->irq, ad1889_interrupt, SA_SHIRQ, DEVNAME, dev) != 0) { printk(KERN_ERR DEVNAME ": unable to request interrupt\n"); - goto err_free_mem; + goto out3; } - request_mem_region(bar, AD_DSIOMEMSIZE, DEVNAME); - dev->regbase = (unsigned long)ioremap_nocache(bar, AD_DSIOMEMSIZE); - - printk(KERN_INFO DEVNAME ": %s at 0x%lx IRQ %d\n", + printk(KERN_INFO DEVNAME ": %s at %p IRQ %d\n", (char *)ent->driver_data, dev->regbase, pcidev->irq); if (ad1889_aclink_reset(pcidev) != 0) - goto err_free_mem; + goto out4; /* register /dev/dsp */ if ((dev->dev_audio = register_sound_dsp(&ad1889_fops, -1)) < 0) { printk(KERN_ERR DEVNAME ": cannot register /dev/dsp\n"); - goto err_free_irq; + goto out4; } if ((err = ad1889_ac97_init(dev, 0)) != 0) - goto err_free_dsp; + goto out5; + /* XXX: cleanups */ if (((proc_root = proc_mkdir("driver/ad1889", NULL)) == NULL) || create_proc_read_entry("ac97", S_IFREG|S_IRUGO, proc_root, ac97_read_proc, dev->ac97_codec) == NULL || create_proc_read_entry("info", S_IFREG|S_IRUGO, proc_root, ad1889_read_proc, dev) == NULL) - goto err_free_dsp; + goto out5; ad1889_initcfg(dev); @@ -1050,13 +1059,15 @@ return 0; -err_free_dsp: +out5: unregister_sound_dsp(dev->dev_audio); - -err_free_irq: +out4: free_irq(pcidev->irq, dev); - -err_free_mem: +out3: + iounmap(dev->regbase); +out2: + pci_release_region(pcidev, 0); +out1: ad1889_free_dev(dev); pci_set_drvdata(pcidev, NULL); @@ -1072,10 +1083,12 @@ unregister_sound_mixer(dev->ac97_codec->dev_mixer); unregister_sound_dsp(dev->dev_audio); free_irq(pcidev->irq, dev); - release_mem_region(dev->regbase, AD_DSIOMEMSIZE); + iounmap(dev->regbase); + pci_release_region(pcidev, 0); /* any hw programming needed? */ ad1889_free_dev(dev); + pci_set_drvdata(pcidev, NULL); } MODULE_AUTHOR("Randolph Chung"); diff -Nru a/sound/oss/ad1889.h b/sound/oss/ad1889.h --- a/sound/oss/ad1889.h 2004-11-29 21:22:08 -08:00 +++ b/sound/oss/ad1889.h 2004-11-29 21:22:08 -08:00 @@ -104,7 +104,7 @@ } ad1889_state_t; typedef struct ad1889_dev { - unsigned long regbase; + void __iomem *regbase; struct pci_dev *pci; spinlock_t lock; diff -Nru a/sound/oss/btaudio.c b/sound/oss/btaudio.c --- a/sound/oss/btaudio.c 2004-11-29 21:22:07 -08:00 +++ b/sound/oss/btaudio.c 2004-11-29 21:22:07 -08:00 @@ -104,7 +104,7 @@ struct pci_dev *pci; unsigned int irq; unsigned long mem; - unsigned long *mmio; + unsigned long __iomem *mmio; /* locking */ int users; diff -Nru a/sound/oss/cs4281/cs4281m.c b/sound/oss/cs4281/cs4281m.c --- a/sound/oss/cs4281/cs4281m.c 2004-11-29 21:22:08 -08:00 +++ b/sound/oss/cs4281/cs4281m.c 2004-11-29 21:22:08 -08:00 @@ -221,7 +221,8 @@ // hardware resources unsigned int pBA0phys, pBA1phys; - char *pBA0, *pBA1; + char __iomem *pBA0; + char __iomem *pBA1; unsigned int irq; // mixer registers diff -Nru a/sound/oss/cs46xx.c b/sound/oss/cs46xx.c --- a/sound/oss/cs46xx.c 2004-11-29 21:22:08 -08:00 +++ b/sound/oss/cs46xx.c 2004-11-29 21:22:08 -08:00 @@ -346,17 +346,17 @@ u32 irq; /* mappings */ - void *ba0; + void __iomem *ba0; union { struct { - u8 *data0; - u8 *data1; - u8 *pmem; - u8 *reg; + u8 __iomem *data0; + u8 __iomem *data1; + u8 __iomem *pmem; + u8 __iomem *reg; } name; - u8 *idx[4]; + u8 __iomem *idx[4]; } ba1; /* Function support */ @@ -4309,7 +4309,7 @@ static void cs461x_download_image(struct cs_card *card) { unsigned i, j, temp1, temp2, offset, count; - unsigned char *pBA1 = ioremap(card->ba1_addr, 0x40000); + unsigned char __iomem *pBA1 = ioremap(card->ba1_addr, 0x40000); for( i=0; i < CLEAR__COUNT; i++) { offset = ClrStat[i].BA1__DestByteOffset; diff -Nru a/sound/oss/dmabuf.c b/sound/oss/dmabuf.c --- a/sound/oss/dmabuf.c 2004-11-29 21:22:06 -08:00 +++ b/sound/oss/dmabuf.c 2004-11-29 21:22:06 -08:00 @@ -88,7 +88,7 @@ while (start_addr == NULL && dmap->buffsize > PAGE_SIZE) { for (sz = 0, size = PAGE_SIZE; size < dmap->buffsize; sz++, size <<= 1); dmap->buffsize = PAGE_SIZE * (1 << sz); - start_addr = (char *) __get_free_pages(GFP_ATOMIC|GFP_DMA, sz); + start_addr = (char *) __get_free_pages(GFP_ATOMIC|GFP_DMA|__GFP_NOWARN, sz); if (start_addr == NULL) dmap->buffsize /= 2; } diff -Nru a/sound/oss/dmasound/dmasound_awacs.c b/sound/oss/dmasound/dmasound_awacs.c --- a/sound/oss/dmasound/dmasound_awacs.c 2004-11-29 21:22:07 -08:00 +++ b/sound/oss/dmasound/dmasound_awacs.c 2004-11-29 21:22:07 -08:00 @@ -118,9 +118,9 @@ * Interrupt numbers and addresses, & info obtained from the device tree. */ static int awacs_irq, awacs_tx_irq, awacs_rx_irq; -static volatile struct awacs_regs *awacs; -static volatile u32 *i2s; -static volatile struct dbdma_regs *awacs_txdma, *awacs_rxdma; +static volatile struct awacs_regs __iomem *awacs; +static volatile u32 __iomem *i2s; +static volatile struct dbdma_regs __iomem *awacs_txdma, *awacs_rxdma; static int awacs_rate_index; static int awacs_subframe; static struct device_node* awacs_node; @@ -146,8 +146,8 @@ /* for earlier powerbooks which need fiddling with mac-io to enable * cd etc. */ -static unsigned char *latch_base; -static unsigned char *macio_base; +static unsigned char __iomem *latch_base; +static unsigned char __iomem *macio_base; /* * Space for the DBDMA command blocks. @@ -661,11 +661,11 @@ free_irq(awacs_rx_irq, NULL); if (awacs) - iounmap((void *)awacs); + iounmap(awacs); if (i2s) - iounmap((void *)i2s); - iounmap((void *)awacs_txdma); - iounmap((void *)awacs_rxdma); + iounmap(i2s); + iounmap(awacs_txdma); + iounmap(awacs_rxdma); release_OF_resource(awacs_node, 0); release_OF_resource(awacs_node, 1); @@ -2915,14 +2915,11 @@ /* all OF versions I've seen use this value */ if (i2s_node) - i2s = (u32 *)ioremap(io->addrs[0].address, 0x1000); + i2s = ioremap(io->addrs[0].address, 0x1000); else - awacs = (volatile struct awacs_regs *) - ioremap(io->addrs[0].address, 0x1000); - awacs_txdma = (volatile struct dbdma_regs *) - ioremap(io->addrs[1].address, 0x100); - awacs_rxdma = (volatile struct dbdma_regs *) - ioremap(io->addrs[2].address, 0x100); + awacs = ioremap(io->addrs[0].address, 0x1000); + awacs_txdma = ioremap(io->addrs[1].address, 0x100); + awacs_rxdma = ioremap(io->addrs[2].address, 0x100); /* first of all make sure that the chip is powered up....*/ pmac_call_feature(PMAC_FTR_SOUND_CHIP_ENABLE, io, 0, 1); @@ -3075,7 +3072,7 @@ * sound input. The 0x100 enables the SCSI bus * terminator power. */ - latch_base = (unsigned char *) ioremap (0xf301a000, 0x1000); + latch_base = ioremap (0xf301a000, 0x1000); in_8(latch_base + 0x190); } else if (is_pbook_g3) { @@ -3084,8 +3081,7 @@ for (mio = io->parent; mio; mio = mio->parent) { if (strcmp(mio->name, "mac-io") == 0 && mio->n_addrs > 0) { - macio_base = (unsigned char *) ioremap - (mio->addrs[0].address, 0x40); + macio_base = ioremap(mio->addrs[0].address, 0x40); break; } } diff -Nru a/sound/oss/i810_audio.c b/sound/oss/i810_audio.c --- a/sound/oss/i810_audio.c 2004-11-29 21:22:08 -08:00 +++ b/sound/oss/i810_audio.c 2004-11-29 21:22:08 -08:00 @@ -429,8 +429,8 @@ unsigned long ac97base_mmio_phys; unsigned long iobase_mmio_phys; - u_int8_t *ac97base_mmio; - u_int8_t *iobase_mmio; + u_int8_t __iomem *ac97base_mmio; + u_int8_t __iomem *iobase_mmio; int use_mmio; diff -Nru a/sound/oss/kahlua.c b/sound/oss/kahlua.c --- a/sound/oss/kahlua.c 2004-11-29 21:22:08 -08:00 +++ b/sound/oss/kahlua.c 2004-11-29 21:22:08 -08:00 @@ -56,7 +56,7 @@ { struct address_info *hw_config; unsigned long base; - void *mem; + void __iomem *mem; unsigned long io; u16 map; u8 irq, dma8, dma16; diff -Nru a/sound/oss/msnd.c b/sound/oss/msnd.c --- a/sound/oss/msnd.c 2004-11-29 21:22:07 -08:00 +++ b/sound/oss/msnd.c 2004-11-29 21:22:07 -08:00 @@ -81,12 +81,12 @@ --num_devs; } -void msnd_init_queue(unsigned long base, int start, int size) +void msnd_init_queue(void __iomem *base, int start, int size) { - isa_writew(PCTODSP_BASED(start), base + JQS_wStart); - isa_writew(PCTODSP_OFFSET(size) - 1, base + JQS_wSize); - isa_writew(0, base + JQS_wHead); - isa_writew(0, base + JQS_wTail); + writew(PCTODSP_BASED(start), base + JQS_wStart); + writew(PCTODSP_OFFSET(size) - 1, base + JQS_wSize); + writew(0, base + JQS_wHead); + writew(0, base + JQS_wTail); } void msnd_fifo_init(msnd_fifo *f) @@ -122,6 +122,37 @@ f->len = f->tail = f->head = 0; } +int msnd_fifo_write_io(msnd_fifo *f, char __iomem *buf, size_t len) +{ + int count = 0; + + while ((count < len) && (f->len != f->n)) { + + int nwritten; + + if (f->head <= f->tail) { + nwritten = len - count; + if (nwritten > f->n - f->tail) + nwritten = f->n - f->tail; + } + else { + nwritten = f->head - f->tail; + if (nwritten > len - count) + nwritten = len - count; + } + + memcpy_fromio(f->data + f->tail, buf, nwritten); + + count += nwritten; + buf += nwritten; + f->len += nwritten; + f->tail += nwritten; + f->tail %= f->n; + } + + return count; +} + int msnd_fifo_write(msnd_fifo *f, const char *buf, size_t len) { int count = 0; @@ -141,7 +172,7 @@ nwritten = len - count; } - isa_memcpy_fromio(f->data + f->tail, (unsigned long) buf, nwritten); + memcpy(f->data + f->tail, buf, nwritten); count += nwritten; buf += nwritten; @@ -153,6 +184,37 @@ return count; } +int msnd_fifo_read_io(msnd_fifo *f, char __iomem *buf, size_t len) +{ + int count = 0; + + while ((count < len) && (f->len > 0)) { + + int nread; + + if (f->tail <= f->head) { + nread = len - count; + if (nread > f->n - f->head) + nread = f->n - f->head; + } + else { + nread = f->tail - f->head; + if (nread > len - count) + nread = len - count; + } + + memcpy_toio(buf, f->data + f->head, nread); + + count += nread; + buf += nread; + f->len -= nread; + f->head += nread; + f->head %= f->n; + } + + return count; +} + int msnd_fifo_read(msnd_fifo *f, char *buf, size_t len) { int count = 0; @@ -172,7 +234,7 @@ nread = len - count; } - isa_memcpy_toio((unsigned long) buf, f->data + f->head, nread); + memcpy(buf, f->data + f->head, nread); count += nread; buf += nread; @@ -327,6 +389,8 @@ EXPORT_SYMBOL(msnd_fifo_free); EXPORT_SYMBOL(msnd_fifo_alloc); EXPORT_SYMBOL(msnd_fifo_make_empty); +EXPORT_SYMBOL(msnd_fifo_write_io); +EXPORT_SYMBOL(msnd_fifo_read_io); EXPORT_SYMBOL(msnd_fifo_write); EXPORT_SYMBOL(msnd_fifo_read); diff -Nru a/sound/oss/msnd.h b/sound/oss/msnd.h --- a/sound/oss/msnd.h 2004-11-29 21:22:07 -08:00 +++ b/sound/oss/msnd.h 2004-11-29 21:22:07 -08:00 @@ -183,7 +183,7 @@ typedef u16 USHORT; typedef u16 WORD; typedef u32 DWORD; -typedef unsigned long LPDAQD; +typedef void __iomem * LPDAQD; /* Generic FIFO */ typedef struct { @@ -203,12 +203,12 @@ int memid, irqid; int irq, irq_ref; unsigned char info; - unsigned long base; + void __iomem *base; /* Motorola 56k DSP SMA */ - unsigned long SMA; - unsigned long DAPQ, DARQ, MODQ, MIDQ, DSPQ; - unsigned long pwDSPQData, pwMIDQData, pwMODQData; + void __iomem *SMA; + void __iomem *DAPQ, *DARQ, *MODQ, *MIDQ, *DSPQ; + void __iomem *pwDSPQData, *pwMIDQData, *pwMODQData; int dspq_data_buff, dspq_buff_size; /* State variables */ @@ -259,12 +259,14 @@ int msnd_register(multisound_dev_t *dev); void msnd_unregister(multisound_dev_t *dev); -void msnd_init_queue(unsigned long, int start, int size); +void msnd_init_queue(void __iomem *, int start, int size); void msnd_fifo_init(msnd_fifo *f); void msnd_fifo_free(msnd_fifo *f); int msnd_fifo_alloc(msnd_fifo *f, size_t n); void msnd_fifo_make_empty(msnd_fifo *f); +int msnd_fifo_write_io(msnd_fifo *f, char __iomem *buf, size_t len); +int msnd_fifo_read_io(msnd_fifo *f, char __iomem *buf, size_t len); int msnd_fifo_write(msnd_fifo *f, const char *buf, size_t len); int msnd_fifo_read(msnd_fifo *f, char *buf, size_t len); diff -Nru a/sound/oss/msnd_pinnacle.c b/sound/oss/msnd_pinnacle.c --- a/sound/oss/msnd_pinnacle.c 2004-11-29 21:22:07 -08:00 +++ b/sound/oss/msnd_pinnacle.c 2004-11-29 21:22:07 -08:00 @@ -109,18 +109,18 @@ LPDAQD lpDAQ; dev.last_playbank = -1; - isa_writew(PCTODSP_OFFSET(0 * DAQDS__size), dev.DAPQ + JQS_wHead); - isa_writew(PCTODSP_OFFSET(0 * DAQDS__size), dev.DAPQ + JQS_wTail); + writew(PCTODSP_OFFSET(0 * DAQDS__size), dev.DAPQ + JQS_wHead); + writew(PCTODSP_OFFSET(0 * DAQDS__size), dev.DAPQ + JQS_wTail); for (n = 0, lpDAQ = dev.base + DAPQ_DATA_BUFF; n < 3; ++n, lpDAQ += DAQDS__size) { - isa_writew(PCTODSP_BASED((DWORD)(DAP_BUFF_SIZE * n)), lpDAQ + DAQDS_wStart); - isa_writew(0, lpDAQ + DAQDS_wSize); - isa_writew(1, lpDAQ + DAQDS_wFormat); - isa_writew(dev.play_sample_size, lpDAQ + DAQDS_wSampleSize); - isa_writew(dev.play_channels, lpDAQ + DAQDS_wChannels); - isa_writew(dev.play_sample_rate, lpDAQ + DAQDS_wSampleRate); - isa_writew(HIMT_PLAY_DONE * 0x100 + n, lpDAQ + DAQDS_wIntMsg); - isa_writew(n, lpDAQ + DAQDS_wFlags); + writew(PCTODSP_BASED((DWORD)(DAP_BUFF_SIZE * n)), lpDAQ + DAQDS_wStart); + writew(0, lpDAQ + DAQDS_wSize); + writew(1, lpDAQ + DAQDS_wFormat); + writew(dev.play_sample_size, lpDAQ + DAQDS_wSampleSize); + writew(dev.play_channels, lpDAQ + DAQDS_wChannels); + writew(dev.play_sample_rate, lpDAQ + DAQDS_wSampleRate); + writew(HIMT_PLAY_DONE * 0x100 + n, lpDAQ + DAQDS_wIntMsg); + writew(n, lpDAQ + DAQDS_wFlags); } } @@ -131,25 +131,25 @@ unsigned long flags; dev.last_recbank = 2; - isa_writew(PCTODSP_OFFSET(0 * DAQDS__size), dev.DARQ + JQS_wHead); - isa_writew(PCTODSP_OFFSET(dev.last_recbank * DAQDS__size), dev.DARQ + JQS_wTail); + writew(PCTODSP_OFFSET(0 * DAQDS__size), dev.DARQ + JQS_wHead); + writew(PCTODSP_OFFSET(dev.last_recbank * DAQDS__size), dev.DARQ + JQS_wTail); /* Critical section: bank 1 access */ spin_lock_irqsave(&dev.lock, flags); msnd_outb(HPBLKSEL_1, dev.io + HP_BLKS); - isa_memset_io(dev.base, 0, DAR_BUFF_SIZE * 3); + memset_io(dev.base, 0, DAR_BUFF_SIZE * 3); msnd_outb(HPBLKSEL_0, dev.io + HP_BLKS); spin_unlock_irqrestore(&dev.lock, flags); for (n = 0, lpDAQ = dev.base + DARQ_DATA_BUFF; n < 3; ++n, lpDAQ += DAQDS__size) { - isa_writew(PCTODSP_BASED((DWORD)(DAR_BUFF_SIZE * n)) + 0x4000, lpDAQ + DAQDS_wStart); - isa_writew(DAR_BUFF_SIZE, lpDAQ + DAQDS_wSize); - isa_writew(1, lpDAQ + DAQDS_wFormat); - isa_writew(dev.rec_sample_size, lpDAQ + DAQDS_wSampleSize); - isa_writew(dev.rec_channels, lpDAQ + DAQDS_wChannels); - isa_writew(dev.rec_sample_rate, lpDAQ + DAQDS_wSampleRate); - isa_writew(HIMT_RECORD_DONE * 0x100 + n, lpDAQ + DAQDS_wIntMsg); - isa_writew(n, lpDAQ + DAQDS_wFlags); + writew(PCTODSP_BASED((DWORD)(DAR_BUFF_SIZE * n)) + 0x4000, lpDAQ + DAQDS_wStart); + writew(DAR_BUFF_SIZE, lpDAQ + DAQDS_wSize); + writew(1, lpDAQ + DAQDS_wFormat); + writew(dev.rec_sample_size, lpDAQ + DAQDS_wSampleSize); + writew(dev.rec_channels, lpDAQ + DAQDS_wChannels); + writew(dev.rec_sample_rate, lpDAQ + DAQDS_wSampleRate); + writew(HIMT_RECORD_DONE * 0x100 + n, lpDAQ + DAQDS_wIntMsg); + writew(n, lpDAQ + DAQDS_wFlags); } } @@ -185,9 +185,9 @@ for (i = 0; i < 3; ++i, lpDAQ += DAQDS__size, lpDARQ += DAQDS__size) { if (file->f_mode & FMODE_WRITE) - isa_writew(data, lpDAQ + DAQDS_wSampleSize); + writew(data, lpDAQ + DAQDS_wSampleSize); if (file->f_mode & FMODE_READ) - isa_writew(data, lpDARQ + DAQDS_wSampleSize); + writew(data, lpDARQ + DAQDS_wSampleSize); } if (file->f_mode & FMODE_WRITE) dev.play_sample_size = data; @@ -318,9 +318,9 @@ for (i = 0; i < 3; ++i, lpDAQ += DAQDS__size, lpDARQ += DAQDS__size) { if (file->f_mode & FMODE_WRITE) - isa_writew(data, lpDAQ + DAQDS_wSampleRate); + writew(data, lpDAQ + DAQDS_wSampleRate); if (file->f_mode & FMODE_READ) - isa_writew(data, lpDARQ + DAQDS_wSampleRate); + writew(data, lpDARQ + DAQDS_wSampleRate); } if (file->f_mode & FMODE_WRITE) dev.play_sample_rate = data; @@ -361,9 +361,9 @@ for (i = 0; i < 3; ++i, lpDAQ += DAQDS__size, lpDARQ += DAQDS__size) { if (file->f_mode & FMODE_WRITE) - isa_writew(data, lpDAQ + DAQDS_wChannels); + writew(data, lpDAQ + DAQDS_wChannels); if (file->f_mode & FMODE_READ) - isa_writew(data, lpDARQ + DAQDS_wChannels); + writew(data, lpDARQ + DAQDS_wChannels); } if (file->f_mode & FMODE_WRITE) dev.play_channels = data; @@ -401,27 +401,27 @@ } #define update_volm(a,b) \ - isa_writew((dev.left_levels[a] >> 1) * \ - isa_readw(dev.SMA + SMA_wCurrMastVolLeft) / 0xffff, \ + writew((dev.left_levels[a] >> 1) * \ + readw(dev.SMA + SMA_wCurrMastVolLeft) / 0xffff, \ dev.SMA + SMA_##b##Left); \ - isa_writew((dev.right_levels[a] >> 1) * \ - isa_readw(dev.SMA + SMA_wCurrMastVolRight) / 0xffff, \ + writew((dev.right_levels[a] >> 1) * \ + readw(dev.SMA + SMA_wCurrMastVolRight) / 0xffff, \ dev.SMA + SMA_##b##Right); #define update_potm(d,s,ar) \ - isa_writeb((dev.left_levels[d] >> 8) * \ - isa_readw(dev.SMA + SMA_wCurrMastVolLeft) / 0xffff, \ + writeb((dev.left_levels[d] >> 8) * \ + readw(dev.SMA + SMA_wCurrMastVolLeft) / 0xffff, \ dev.SMA + SMA_##s##Left); \ - isa_writeb((dev.right_levels[d] >> 8) * \ - isa_readw(dev.SMA + SMA_wCurrMastVolRight) / 0xffff, \ + writeb((dev.right_levels[d] >> 8) * \ + readw(dev.SMA + SMA_wCurrMastVolRight) / 0xffff, \ dev.SMA + SMA_##s##Right); \ if (msnd_send_word(&dev, 0, 0, ar) == 0) \ chk_send_dsp_cmd(&dev, HDEX_AUX_REQ); #define update_pot(d,s,ar) \ - isa_writeb(dev.left_levels[d] >> 8, \ + writeb(dev.left_levels[d] >> 8, \ dev.SMA + SMA_##s##Left); \ - isa_writeb(dev.right_levels[d] >> 8, \ + writeb(dev.right_levels[d] >> 8, \ dev.SMA + SMA_##s##Right); \ if (msnd_send_word(&dev, 0, 0, ar) == 0) \ chk_send_dsp_cmd(&dev, HDEX_AUX_REQ); @@ -450,23 +450,23 @@ /* master volume unscaled controls */ case SOUND_MIXER_LINE: /* line pot control */ /* scaled by IMIX in digital mix */ - isa_writeb(bLeft, dev.SMA + SMA_bInPotPosLeft); - isa_writeb(bRight, dev.SMA + SMA_bInPotPosRight); + writeb(bLeft, dev.SMA + SMA_bInPotPosLeft); + writeb(bRight, dev.SMA + SMA_bInPotPosRight); if (msnd_send_word(&dev, 0, 0, HDEXAR_IN_SET_POTS) == 0) chk_send_dsp_cmd(&dev, HDEX_AUX_REQ); break; #ifndef MSND_CLASSIC case SOUND_MIXER_MIC: /* mic pot control */ /* scaled by IMIX in digital mix */ - isa_writeb(bLeft, dev.SMA + SMA_bMicPotPosLeft); - isa_writeb(bRight, dev.SMA + SMA_bMicPotPosRight); + writeb(bLeft, dev.SMA + SMA_bMicPotPosLeft); + writeb(bRight, dev.SMA + SMA_bMicPotPosRight); if (msnd_send_word(&dev, 0, 0, HDEXAR_MIC_SET_POTS) == 0) chk_send_dsp_cmd(&dev, HDEX_AUX_REQ); break; #endif case SOUND_MIXER_VOLUME: /* master volume */ - isa_writew(wLeft, dev.SMA + SMA_wCurrMastVolLeft); - isa_writew(wRight, dev.SMA + SMA_wCurrMastVolRight); + writew(wLeft, dev.SMA + SMA_wCurrMastVolLeft); + writew(wRight, dev.SMA + SMA_wCurrMastVolRight); /* fall through */ case SOUND_MIXER_LINE1: /* aux pot control */ @@ -815,25 +815,25 @@ LPDAQD DAQD; /* Increment the tail and check for queue wrap */ - wTmp = isa_readw(dev.DARQ + JQS_wTail) + PCTODSP_OFFSET(DAQDS__size); - if (wTmp > isa_readw(dev.DARQ + JQS_wSize)) + wTmp = readw(dev.DARQ + JQS_wTail) + PCTODSP_OFFSET(DAQDS__size); + if (wTmp > readw(dev.DARQ + JQS_wSize)) wTmp = 0; - while (wTmp == isa_readw(dev.DARQ + JQS_wHead) && timeout--) + while (wTmp == readw(dev.DARQ + JQS_wHead) && timeout--) udelay(1); - isa_writew(wTmp, dev.DARQ + JQS_wTail); + writew(wTmp, dev.DARQ + JQS_wTail); /* Get our digital audio queue struct */ DAQD = bank * DAQDS__size + dev.base + DARQ_DATA_BUFF; /* Get length of data */ - size = isa_readw(DAQD + DAQDS_wSize); + size = readw(DAQD + DAQDS_wSize); /* Read data from the head (unprotected bank 1 access okay since this is only called inside an interrupt) */ msnd_outb(HPBLKSEL_1, dev.io + HP_BLKS); - msnd_fifo_write( + msnd_fifo_write_io( &dev.DARF, - (char *)(dev.base + bank * DAR_BUFF_SIZE), + dev.base + bank * DAR_BUFF_SIZE, size); msnd_outb(HPBLKSEL_0, dev.io + HP_BLKS); @@ -846,8 +846,8 @@ register int protect = start, nbanks = 0; LPDAQD DAQD; - DAPQ_tail = isa_readw(dev.DAPQ + JQS_wTail); - while (DAPQ_tail != isa_readw(dev.DAPQ + JQS_wHead) || start) { + DAPQ_tail = readw(dev.DAPQ + JQS_wTail); + while (DAPQ_tail != readw(dev.DAPQ + JQS_wHead) || start) { register int bank_num = DAPQ_tail / PCTODSP_OFFSET(DAQDS__size); register int n; unsigned long flags; @@ -856,15 +856,15 @@ if (protect) { /* Critical section: protect fifo in non-interrupt */ spin_lock_irqsave(&dev.lock, flags); - n = msnd_fifo_read( + n = msnd_fifo_read_io( &dev.DAPF, - (char *)(dev.base + bank_num * DAP_BUFF_SIZE), + dev.base + bank_num * DAP_BUFF_SIZE, DAP_BUFF_SIZE); spin_unlock_irqrestore(&dev.lock, flags); } else { - n = msnd_fifo_read( + n = msnd_fifo_read_io( &dev.DAPF, - (char *)(dev.base + bank_num * DAP_BUFF_SIZE), + dev.base + bank_num * DAP_BUFF_SIZE, DAP_BUFF_SIZE); } if (!n) @@ -877,12 +877,12 @@ DAQD = bank_num * DAQDS__size + dev.base + DAPQ_DATA_BUFF; /* Write size of this bank */ - isa_writew(n, DAQD + DAQDS_wSize); + writew(n, DAQD + DAQDS_wSize); ++nbanks; /* Then advance the tail */ DAPQ_tail = (++bank_num % 3) * PCTODSP_OFFSET(DAQDS__size); - isa_writew(DAPQ_tail, dev.DAPQ + JQS_wTail); + writew(DAPQ_tail, dev.DAPQ + JQS_wTail); /* Tell the DSP to play the bank */ msnd_send_dsp_cmd(&dev, HDEX_PLAY_START); } @@ -1094,15 +1094,15 @@ msnd_inb(dev.io + HP_RXL); /* Evaluate queued DSP messages */ - while (isa_readw(dev.DSPQ + JQS_wTail) != isa_readw(dev.DSPQ + JQS_wHead)) { + while (readw(dev.DSPQ + JQS_wTail) != readw(dev.DSPQ + JQS_wHead)) { register WORD wTmp; - eval_dsp_msg(isa_readw(dev.pwDSPQData + 2*isa_readw(dev.DSPQ + JQS_wHead))); + eval_dsp_msg(readw(dev.pwDSPQData + 2*readw(dev.DSPQ + JQS_wHead))); - if ((wTmp = isa_readw(dev.DSPQ + JQS_wHead) + 1) > isa_readw(dev.DSPQ + JQS_wSize)) - isa_writew(0, dev.DSPQ + JQS_wHead); + if ((wTmp = readw(dev.DSPQ + JQS_wHead) + 1) > readw(dev.DSPQ + JQS_wSize)) + writew(0, dev.DSPQ + JQS_wHead); else - isa_writew(wTmp, dev.DSPQ + JQS_wHead); + writew(wTmp, dev.DSPQ + JQS_wHead); } return IRQ_HANDLED; } @@ -1182,7 +1182,7 @@ } printk(KERN_INFO LOGNAME ": %s revision %s, Xilinx version %s, " #endif /* MSND_CLASSIC */ - "I/O 0x%x-0x%x, IRQ %d, memory mapped to 0x%lX-0x%lX\n", + "I/O 0x%x-0x%x, IRQ %d, memory mapped to %p-%p\n", dev.name, #ifndef MSND_CLASSIC rev, xv, @@ -1206,16 +1206,16 @@ #endif msnd_outb(HPBLKSEL_0, dev.io + HP_BLKS); if (initted) { - mastVolLeft = isa_readw(dev.SMA + SMA_wCurrMastVolLeft); - mastVolRight = isa_readw(dev.SMA + SMA_wCurrMastVolRight); + mastVolLeft = readw(dev.SMA + SMA_wCurrMastVolLeft); + mastVolRight = readw(dev.SMA + SMA_wCurrMastVolRight); } else mastVolLeft = mastVolRight = 0; - isa_memset_io(dev.base, 0, 0x8000); + memset_io(dev.base, 0, 0x8000); /* Critical section: bank 1 access */ spin_lock_irqsave(&dev.lock, flags); msnd_outb(HPBLKSEL_1, dev.io + HP_BLKS); - isa_memset_io(dev.base, 0, 0x8000); + memset_io(dev.base, 0, 0x8000); msnd_outb(HPBLKSEL_0, dev.io + HP_BLKS); spin_unlock_irqrestore(&dev.lock, flags); @@ -1248,19 +1248,19 @@ /* Setup some DSP values */ #ifndef MSND_CLASSIC - isa_writew(1, dev.SMA + SMA_wCurrPlayFormat); - isa_writew(dev.play_sample_size, dev.SMA + SMA_wCurrPlaySampleSize); - isa_writew(dev.play_channels, dev.SMA + SMA_wCurrPlayChannels); - isa_writew(dev.play_sample_rate, dev.SMA + SMA_wCurrPlaySampleRate); -#endif - isa_writew(dev.play_sample_rate, dev.SMA + SMA_wCalFreqAtoD); - isa_writew(mastVolLeft, dev.SMA + SMA_wCurrMastVolLeft); - isa_writew(mastVolRight, dev.SMA + SMA_wCurrMastVolRight); + writew(1, dev.SMA + SMA_wCurrPlayFormat); + writew(dev.play_sample_size, dev.SMA + SMA_wCurrPlaySampleSize); + writew(dev.play_channels, dev.SMA + SMA_wCurrPlayChannels); + writew(dev.play_sample_rate, dev.SMA + SMA_wCurrPlaySampleRate); +#endif + writew(dev.play_sample_rate, dev.SMA + SMA_wCalFreqAtoD); + writew(mastVolLeft, dev.SMA + SMA_wCurrMastVolLeft); + writew(mastVolRight, dev.SMA + SMA_wCurrMastVolRight); #ifndef MSND_CLASSIC - isa_writel(0x00010000, dev.SMA + SMA_dwCurrPlayPitch); - isa_writel(0x00000001, dev.SMA + SMA_dwCurrPlayRate); + writel(0x00010000, dev.SMA + SMA_dwCurrPlayPitch); + writel(0x00000001, dev.SMA + SMA_dwCurrPlayRate); #endif - isa_writew(0x303, dev.SMA + SMA_wCurrInputTagBits); + writew(0x303, dev.SMA + SMA_wCurrInputTagBits); initted = 1; @@ -1269,12 +1269,12 @@ static int __init calibrate_adc(WORD srate) { - isa_writew(srate, dev.SMA + SMA_wCalFreqAtoD); + writew(srate, dev.SMA + SMA_wCalFreqAtoD); if (dev.calibrate_signal == 0) - isa_writew(isa_readw(dev.SMA + SMA_wCurrHostStatusFlags) + writew(readw(dev.SMA + SMA_wCurrHostStatusFlags) | 0x0001, dev.SMA + SMA_wCurrHostStatusFlags); else - isa_writew(isa_readw(dev.SMA + SMA_wCurrHostStatusFlags) + writew(readw(dev.SMA + SMA_wCurrHostStatusFlags) & ~0x0001, dev.SMA + SMA_wCurrHostStatusFlags); if (msnd_send_word(&dev, 0, 0, HDEXAR_CAL_A_TO_D) == 0 && chk_send_dsp_cmd(&dev, HDEX_AUX_REQ) == 0) { @@ -1304,7 +1304,7 @@ return -EBUSY; } #endif - isa_memcpy_toio(dev.base, PERMCODE, PERMCODESIZE); + memcpy_toio(dev.base, PERMCODE, PERMCODESIZE); if (msnd_upload_host(&dev, INITCODE, INITCODESIZE) < 0) { printk(KERN_WARNING LOGNAME ": Error uploading to DSP\n"); return -ENODEV; @@ -1357,7 +1357,7 @@ } timeout = 200; - while (isa_readw(dev.base)) { + while (readw(dev.base)) { mdelay(1); if (!timeout--) { printk(KERN_DEBUG LOGNAME ": DSP reset timeout\n"); @@ -1861,7 +1861,7 @@ dev.io = io; dev.numio = DSP_NUMIO; dev.irq = irq; - dev.base = mem; + dev.base = ioremap(mem, 0x8000); dev.fifosize = fifosize * 1024; dev.calibrate_signal = calibrate_signal ? 1 : 0; dev.recsrc = 0; diff -Nru a/sound/oss/nm256.h b/sound/oss/nm256.h --- a/sound/oss/nm256.h 2004-11-29 21:22:07 -08:00 +++ b/sound/oss/nm256.h 2004-11-29 21:22:07 -08:00 @@ -60,7 +60,7 @@ /* Physical address of the port. */ u32 physaddr; /* Our mapped-in pointer. */ - char *ptr; + char __iomem *ptr; /* PTR's offset within the physical port. */ u32 start_offset; /* And the offset of the end of the buffer. */ @@ -233,14 +233,14 @@ static inline int nm256_writePort##X (struct nm256_info *card,\ int port, int offset, int value)\ {\ - u##X *addr;\ + u##X __iomem *addr;\ \ if (nm256_debug > 1)\ printk (KERN_DEBUG "Writing 0x%x to %d:0x%x\n", value, port, offset);\ \ NM_FIX_PORT;\ \ - addr = (u##X *)(card->port[port - 1].ptr + offset);\ + addr = (u##X __iomem *)(card->port[port - 1].ptr + offset);\ func (value, addr);\ return 0;\ } @@ -253,11 +253,11 @@ static inline u##X nm256_readPort##X (struct nm256_info *card,\ int port, int offset)\ {\ - u##X *addr;\ + u##X __iomem *addr;\ \ NM_FIX_PORT\ \ - addr = (u##X *)(card->port[port - 1].ptr + offset);\ + addr = (u##X __iomem *)(card->port[port - 1].ptr + offset);\ return func(addr);\ } diff -Nru a/sound/oss/nm256_audio.c b/sound/oss/nm256_audio.c --- a/sound/oss/nm256_audio.c 2004-11-29 21:22:07 -08:00 +++ b/sound/oss/nm256_audio.c 2004-11-29 21:22:07 -08:00 @@ -1011,7 +1011,7 @@ u32 port1offset = card->port[0].physaddr + card->port[0].end_offset - 0x0400; /* The signature is located 1K below the end of video RAM. */ - char *temp = ioremap_nocache (port1offset, 16); + char __iomem *temp = ioremap_nocache (port1offset, 16); /* Default buffer end is 5120 bytes below the top of RAM. */ u32 default_value = card->port[0].end_offset - 0x1400; u32 sig; diff -Nru a/sound/oss/rme96xx.c b/sound/oss/rme96xx.c --- a/sound/oss/rme96xx.c 2004-11-29 21:22:07 -08:00 +++ b/sound/oss/rme96xx.c 2004-11-29 21:22:07 -08:00 @@ -273,7 +273,7 @@ /* hardware settings */ int magic; struct pci_dev * pcidev; /* pci_dev structure */ - unsigned long *iobase; + unsigned long __iomem *iobase; unsigned int irq; /* list of rme96xx devices */ diff -Nru a/sound/oss/soundcard.c b/sound/oss/soundcard.c --- a/sound/oss/soundcard.c 2004-11-29 21:22:07 -08:00 +++ b/sound/oss/soundcard.c 2004-11-29 21:22:07 -08:00 @@ -127,7 +127,7 @@ { int n; - if (__get_user(n, (int __user *)(&(((mixer_vol_table *__user )arg)->num)))) + if (__get_user(n, (int __user *)(&(((mixer_vol_table __user *)arg)->num)))) return -EFAULT; if (n < 0 || n >= num_mixer_volumes) return -EINVAL; diff -Nru a/sound/oss/ymfpci.h b/sound/oss/ymfpci.h --- a/sound/oss/ymfpci.h 2004-11-29 21:22:07 -08:00 +++ b/sound/oss/ymfpci.h 2004-11-29 21:22:07 -08:00 @@ -239,7 +239,7 @@ struct ymf_unit { u8 rev; /* PCI revision */ - void *reg_area_virt; + void __iomem *reg_area_virt; void *dma_area_va; dma_addr_t dma_area_ba; unsigned int dma_area_size; diff -Nru a/sound/pci/cs46xx/dsp_spos.c b/sound/pci/cs46xx/dsp_spos.c --- a/sound/pci/cs46xx/dsp_spos.c 2004-11-29 21:22:09 -08:00 +++ b/sound/pci/cs46xx/dsp_spos.c 2004-11-29 21:22:09 -08:00 @@ -914,7 +914,7 @@ int i; for (i = 0; i < size; ++i) { - if (debug_tree) printk ("addr %08x, val %08x\n",(int)spdst,task_data[i]); + if (debug_tree) printk ("addr %p, val %08x\n", spdst,task_data[i]); writel(task_data[i],spdst); spdst += sizeof(u32); } @@ -928,7 +928,7 @@ int i; for (i = 0; i < 0x10; ++i) { - if (debug_scb) printk ("addr %08x, val %08x\n",(int)spdst,scb_data[i]); + if (debug_scb) printk ("addr %p, val %08x\n", spdst,scb_data[i]); writel(scb_data[i],spdst); spdst += sizeof(u32); } diff -Nru a/sound/ppc/pmac.c b/sound/ppc/pmac.c --- a/sound/ppc/pmac.c 2004-11-29 21:22:08 -08:00 +++ b/sound/ppc/pmac.c 2004-11-29 21:22:08 -08:00 @@ -64,7 +64,7 @@ return -ENOMEM; rec->size = size; memset(rec->space, 0, sizeof(struct dbdma_cmd) * (size + 1)); - rec->cmds = (void*)DBDMA_ALIGN(rec->space); + rec->cmds = (void __iomem *)DBDMA_ALIGN(rec->space); rec->addr = virt_to_bus(rec->cmds); return 0; } @@ -200,7 +200,7 @@ static int snd_pmac_pcm_prepare(pmac_t *chip, pmac_stream_t *rec, snd_pcm_substream_t *subs) { int i; - volatile struct dbdma_cmd *cp; + volatile struct dbdma_cmd __iomem *cp; snd_pcm_runtime_t *runtime = subs->runtime; int rate_index; long offset; @@ -263,7 +263,7 @@ static int snd_pmac_pcm_trigger(pmac_t *chip, pmac_stream_t *rec, snd_pcm_substream_t *subs, int cmd) { - volatile struct dbdma_cmd *cp; + volatile struct dbdma_cmd __iomem *cp; int i, command; switch (cmd) { @@ -314,7 +314,7 @@ #if 1 /* hmm.. how can we get the current dma pointer?? */ int stat; - volatile struct dbdma_cmd *cp = &rec->cmd.cmds[rec->cur_period]; + volatile struct dbdma_cmd __iomem *cp = &rec->cmd.cmds[rec->cur_period]; stat = ld_le16(&cp->xfer_status); if (stat & (ACTIVE|DEAD)) { count = in_le16(&cp->res_count); @@ -379,7 +379,7 @@ */ static void snd_pmac_pcm_update(pmac_t *chip, pmac_stream_t *rec) { - volatile struct dbdma_cmd *cp; + volatile struct dbdma_cmd __iomem *cp; int c; int stat; @@ -818,11 +818,11 @@ if (chip->latch_base) iounmap(chip->latch_base); if (chip->awacs) - iounmap((void*)chip->awacs); + iounmap(chip->awacs); if (chip->playback.dma) - iounmap((void*)chip->playback.dma); + iounmap(chip->playback.dma); if (chip->capture.dma) - iounmap((void*)chip->capture.dma); + iounmap(chip->capture.dma); if (chip->node) { for (i = 0; i < 3; i++) { if (chip->of_requested & (1 << i)) @@ -1133,9 +1133,9 @@ chip->of_requested |= (1 << i); } - chip->awacs = (volatile struct awacs_regs *) ioremap(np->addrs[0].address, 0x1000); - chip->playback.dma = (volatile struct dbdma_regs *) ioremap(np->addrs[1].address, 0x100); - chip->capture.dma = (volatile struct dbdma_regs *) ioremap(np->addrs[2].address, 0x100); + chip->awacs = ioremap(np->addrs[0].address, 0x1000); + chip->playback.dma = ioremap(np->addrs[1].address, 0x100); + chip->capture.dma = ioremap(np->addrs[2].address, 0x100); if (chip->model <= PMAC_BURGUNDY) { if (request_irq(np->intrs[0].line, snd_pmac_ctrl_intr, 0, "PMac", (void*)chip)) { @@ -1176,15 +1176,14 @@ * sound input. The 0x100 enables the SCSI bus * terminator power. */ - chip->latch_base = (unsigned char *) ioremap (0xf301a000, 0x1000); + chip->latch_base = ioremap (0xf301a000, 0x1000); in_8(chip->latch_base + 0x190); } else if (chip->is_pbook_G3) { struct device_node* mio; for (mio = chip->node->parent; mio; mio = mio->parent) { if (strcmp(mio->name, "mac-io") == 0 && mio->n_addrs > 0) { - chip->macio_base = (unsigned char *) ioremap - (mio->addrs[0].address, 0x40); + chip->macio_base = ioremap(mio->addrs[0].address, 0x40); break; } } diff -Nru a/sound/ppc/pmac.h b/sound/ppc/pmac.h --- a/sound/ppc/pmac.h 2004-11-29 21:22:08 -08:00 +++ b/sound/ppc/pmac.h 2004-11-29 21:22:08 -08:00 @@ -61,7 +61,7 @@ */ struct snd_pmac_dbdma { unsigned long addr; - struct dbdma_cmd *cmds; + struct dbdma_cmd __iomem *cmds; void *space; int size; }; @@ -80,7 +80,7 @@ int nperiods, cur_period; pmac_dbdma_t cmd; - volatile struct dbdma_regs *dma; + volatile struct dbdma_regs __iomem *dma; snd_pcm_substream_t *substream; @@ -130,12 +130,12 @@ int format; /* current format */ spinlock_t reg_lock; - volatile struct awacs_regs *awacs; + volatile struct awacs_regs __iomem *awacs; int awacs_reg[8]; /* register cache */ unsigned int hp_stat_mask; - unsigned char *latch_base; - unsigned char *macio_base; + unsigned char __iomem *latch_base; + unsigned char __iomem *macio_base; pmac_stream_t playback; pmac_stream_t capture; diff -Nru a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c --- a/sound/sparc/cs4231.c 2004-11-29 21:22:06 -08:00 +++ b/sound/sparc/cs4231.c 2004-11-29 21:22:06 -08:00 @@ -569,7 +569,7 @@ #endif #ifdef CONFIG_SND_DEBUG if (__cs4231_readb(chip, CS4231P(chip, REGSEL)) & CS4231_INIT) - snd_printk("mce_down [0x%lx] - auto calibration time out (0)\n", CS4231P(chip, REGSEL)); + snd_printk("mce_down [%p] - auto calibration time out (0)\n", CS4231P(chip, REGSEL)); #endif chip->mce_bit &= ~CS4231_MCE; timeout = __cs4231_readb(chip, CS4231P(chip, REGSEL)); @@ -1347,7 +1347,7 @@ break; /* this is valid value */ } } - snd_printdd("cs4231: port = 0x%lx, id = 0x%x\n", chip->port, id); + snd_printdd("cs4231: port = %p, id = 0x%x\n", chip->port, id); if (id != 0x0a) return -ENODEV; /* no valid device found */