http://linux.bkbits.net/linux-2.5 torvalds@ppc970.osdl.org|ChangeSet|20041118013257|23992 torvalds # This is a BitKeeper generated diff -Nru style patch. # # 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/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 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 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 # # 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 # # 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 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 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 # # 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 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 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-17 19:32:52 -08:00 +++ b/Documentation/DocBook/librs.tmpl 2004-11-17 19:32:52 -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/kernel-parameters.txt b/Documentation/kernel-parameters.txt --- a/Documentation/kernel-parameters.txt 2004-11-17 19:32:52 -08:00 +++ b/Documentation/kernel-parameters.txt 2004-11-17 19:32:52 -08:00 @@ -504,10 +504,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 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-17 19:32:52 -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/arch/alpha/Makefile b/arch/alpha/Makefile --- a/arch/alpha/Makefile 2004-11-17 19:32:52 -08:00 +++ b/arch/alpha/Makefile 2004-11-17 19:32:52 -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/boot/compressed/head.S b/arch/arm/boot/compressed/head.S --- a/arch/arm/boot/compressed/head.S 2004-11-17 19:32:52 -08:00 +++ b/arch/arm/boot/compressed/head.S 2004-11-17 19:32:52 -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/configs/bast_defconfig b/arch/arm/configs/bast_defconfig --- a/arch/arm/configs/bast_defconfig 2004-11-17 19:32:52 -08:00 +++ b/arch/arm/configs/bast_defconfig 2004-11-17 19:32:52 -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/s3c2410_defconfig b/arch/arm/configs/s3c2410_defconfig --- a/arch/arm/configs/s3c2410_defconfig 2004-11-17 19:32:52 -08:00 +++ b/arch/arm/configs/s3c2410_defconfig 2004-11-17 19:32:52 -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/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig --- a/arch/arm/mach-s3c2410/Kconfig 2004-11-17 19:32:52 -08:00 +++ b/arch/arm/mach-s3c2410/Kconfig 2004-11-17 19:32:52 -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/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c --- a/arch/arm/mach-s3c2410/mach-bast.c 2004-11-17 19:32:52 -08:00 +++ b/arch/arm/mach-s3c2410/mach-bast.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/arch/arm/mach-s3c2410/s3c2440.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/arch/arm/mach-s3c2410/time.c 2004-11-17 19:32:52 -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/h8300/kernel/setup.c b/arch/h8300/kernel/setup.c --- a/arch/h8300/kernel/setup.c 2004-11-17 19:32:51 -08:00 +++ b/arch/h8300/kernel/setup.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/arch/h8300/kernel/signal.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/h8300/kernel/vmlinux.lds.S 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/h8300/platform/h8300h/entry.S 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/h8300/platform/h8s/entry.S 2004-11-17 19:32:52 -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/apic.c b/arch/i386/kernel/apic.c --- a/arch/i386/kernel/apic.c 2004-11-17 19:32:52 -08:00 +++ b/arch/i386/kernel/apic.c 2004-11-17 19:32:52 -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++; } } 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-17 19:32:52 -08:00 +++ b/arch/i386/kernel/cpu/mcheck/k7.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/i386/kernel/cpu/mcheck/mce.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/arch/i386/kernel/cpu/mcheck/mce.h 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/arch/i386/kernel/cpu/mcheck/p4.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/i386/kernel/cpu/mcheck/p5.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/i386/kernel/cpu/mcheck/p6.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/i386/kernel/cpu/mcheck/winchip.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/arch/i386/kernel/cpu/mtrr/main.c 2004-11-17 19:32:51 -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/smp.c b/arch/i386/kernel/smp.c --- a/arch/i386/kernel/smp.c 2004-11-17 19:32:51 -08:00 +++ b/arch/i386/kernel/smp.c 2004-11-17 19:32:51 -08:00 @@ -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; diff -Nru a/arch/i386/mm/discontig.c b/arch/i386/mm/discontig.c --- a/arch/i386/mm/discontig.c 2004-11-17 19:32:52 -08:00 +++ b/arch/i386/mm/discontig.c 2004-11-17 19:32:52 -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/kernel/entry.S b/arch/ia64/kernel/entry.S --- a/arch/ia64/kernel/entry.S 2004-11-17 19:32:52 -08:00 +++ b/arch/ia64/kernel/entry.S 2004-11-17 19:32:52 -08:00 @@ -1526,8 +1526,8 @@ 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 // reserved for vserver + data8 sys_waitid // 1270 data8 sys_ni_syscall data8 sys_ni_syscall data8 sys_ni_syscall diff -Nru a/arch/ia64/kernel/ivt.S b/arch/ia64/kernel/ivt.S --- a/arch/ia64/kernel/ivt.S 2004-11-17 19:32:51 -08:00 +++ b/arch/ia64/kernel/ivt.S 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/arch/ia64/kernel/mca.c 2004-11-17 19:32:52 -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/ptrace.c b/arch/ia64/kernel/ptrace.c --- a/arch/ia64/kernel/ptrace.c 2004-11-17 19:32:52 -08:00 +++ b/arch/ia64/kernel/ptrace.c 2004-11-17 19:32:52 -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/signal.c b/arch/ia64/kernel/signal.c --- a/arch/ia64/kernel/signal.c 2004-11-17 19:32:52 -08:00 +++ b/arch/ia64/kernel/signal.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/ia64/kernel/smp.c 2004-11-17 19:32:52 -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/m32r/boot/compressed/Makefile b/arch/m32r/boot/compressed/Makefile --- a/arch/m32r/boot/compressed/Makefile 2004-11-17 19:32:51 -08:00 +++ b/arch/m32r/boot/compressed/Makefile 2004-11-17 19:32:51 -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-17 19:32:51 -08:00 +++ b/arch/m32r/boot/compressed/head.S 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/arch/m32r/boot/compressed/m32r_sio.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/arch/m32r/boot/compressed/misc.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/arch/m32r/boot/compressed/vmlinux.lds.S 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/arch/m32r/boot/compressed/vmlinux.scr 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/arch/m32r/boot/setup.S 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/m32r/defconfig 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/m32r/kernel/io_m32700ut.c 2004-11-17 19:32:52 -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. * @@ -32,8 +32,8 @@ 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) { 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-17 19:32:52 -08:00 +++ b/arch/m32r/kernel/io_mappi2.c 2004-11-17 19:32:52 -08:00 @@ -13,6 +13,7 @@ #include #include #include +#include #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) #include @@ -39,6 +40,27 @@ #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) { @@ -70,22 +92,13 @@ 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) { - unsigned short tmp; unsigned char *buf = addr; - tmp = *(volatile unsigned char *)portp; while (count--) *buf++ = *(volatile unsigned char *)portp; } @@ -96,13 +109,18 @@ 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; @@ -118,8 +136,13 @@ { 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) + else if (port >= 0x340 && port < 0x3a0) return *(volatile unsigned short *)PORT2ADDR_USB(port); #endif @@ -149,9 +172,14 @@ { 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; @@ -169,9 +197,14 @@ { 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) v = *(volatile unsigned short *)PORT2ADDR_USB(port); @@ -204,6 +237,11 @@ 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); @@ -217,6 +255,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; @@ -245,6 +288,11 @@ 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); @@ -260,6 +308,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; @@ -285,6 +338,13 @@ { 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); @@ -302,13 +362,18 @@ 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; #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); #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; @@ -329,9 +394,14 @@ 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); +#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); @@ -347,9 +417,14 @@ 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++; +#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); 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-17 19:32:52 -08:00 +++ b/arch/m32r/kernel/setup_mappi2.c 2004-11-17 19:32:52 -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/m32700ut/defconfig.m32700ut.smp b/arch/m32r/m32700ut/defconfig.m32700ut.smp --- a/arch/m32r/m32700ut/defconfig.m32700ut.smp 2004-11-17 19:32:52 -08:00 +++ b/arch/m32r/m32700ut/defconfig.m32700ut.smp 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/m32r/m32700ut/defconfig.m32700ut.up 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/m32r/m32700ut/dot.gdbinit_200MHz_16MB 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/m32r/m32700ut/dot.gdbinit_300MHz_32MB 2004-11-17 19:32:52 -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-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/m32r/mappi/defconfig.nommu 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/m32r/mappi/defconfig.smp 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/m32r/mappi/defconfig.up 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/arch/m32r/mappi/dot.gdbinit 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/arch/m32r/mappi/dot.gdbinit.nommu 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/arch/m32r/mappi/dot.gdbinit.smp 2004-11-17 19:32:51 -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-17 19:32:52 -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-17 19:32:52 -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/oaks32r/defconfig.nommu b/arch/m32r/oaks32r/defconfig.nommu --- a/arch/m32r/oaks32r/defconfig.nommu 2004-11-17 19:32:51 -08:00 +++ b/arch/m32r/oaks32r/defconfig.nommu 2004-11-17 19:32:51 -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-17 19:32:51 -08:00 +++ b/arch/m32r/oaks32r/dot.gdbinit.nommu 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/arch/m32r/opsput/defconfig.opsput 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/m32r/opsput/dot.gdbinit 2004-11-17 19:32:52 -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/ppc/platforms/sandpoint.c b/arch/ppc/platforms/sandpoint.c --- a/arch/ppc/platforms/sandpoint.c 2004-11-17 19:32:52 -08:00 +++ b/arch/ppc/platforms/sandpoint.c 2004-11-17 19:32:52 -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/ppc64/kernel/iSeries_pci.c b/arch/ppc64/kernel/iSeries_pci.c --- a/arch/ppc64/kernel/iSeries_pci.c 2004-11-17 19:32:52 -08:00 +++ b/arch/ppc64/kernel/iSeries_pci.c 2004-11-17 19:32:52 -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/lparcfg.c b/arch/ppc64/kernel/lparcfg.c --- a/arch/ppc64/kernel/lparcfg.c 2004-11-17 19:32:51 -08:00 +++ b/arch/ppc64/kernel/lparcfg.c 2004-11-17 19:32:51 -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->xLpPaca.xEmulatedTimeBase; + +#ifdef PURR_DEBUG + printk(KERN_INFO "get_purr for cpu (%d) has value (%ld) \n", + cpu, lpaca->xLpPaca.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-17 19:32:52 -08:00 +++ b/arch/ppc64/kernel/maple_pci.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/ppc64/kernel/mpic.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/arch/ppc64/kernel/nvram.c 2004-11-17 19:32:51 -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-17 19:32:51 -08:00 +++ b/arch/ppc64/kernel/pSeries_iommu.c 2004-11-17 19:32:51 -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) { @@ -427,7 +431,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-17 19:32:52 -08:00 +++ b/arch/ppc64/kernel/pSeries_pci.c 2004-11-17 19:32:52 -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/pci.c b/arch/ppc64/kernel/pci.c --- a/arch/ppc64/kernel/pci.c 2004-11-17 19:32:52 -08:00 +++ b/arch/ppc64/kernel/pci.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/arch/ppc64/kernel/pci.h 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/arch/ppc64/kernel/pci_iommu.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/ppc64/kernel/pmac_pci.c 2004-11-17 19:32:52 -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/rtas.c b/arch/ppc64/kernel/rtas.c --- a/arch/ppc64/kernel/rtas.c 2004-11-17 19:32:51 -08:00 +++ b/arch/ppc64/kernel/rtas.c 2004-11-17 19:32:51 -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 { @@ -539,26 +558,6 @@ enter_rtas(__pa(rtas_args)); panic("Alas, I survived.\n"); -} - -/* - * 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; } /* diff -Nru a/arch/ppc64/kernel/rtasd.c b/arch/ppc64/kernel/rtasd.c --- a/arch/ppc64/kernel/rtasd.c 2004-11-17 19:32:52 -08:00 +++ b/arch/ppc64/kernel/rtasd.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/ppc64/kernel/rtc.c 2004-11-17 19:32:52 -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/sysfs.c b/arch/ppc64/kernel/sysfs.c --- a/arch/ppc64/kernel/sysfs.c 2004-11-17 19:32:51 -08:00 +++ b/arch/ppc64/kernel/sysfs.c 2004-11-17 19:32:51 -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/mm/hash_native.c b/arch/ppc64/mm/hash_native.c --- a/arch/ppc64/mm/hash_native.c 2004-11-17 19:32:52 -08:00 +++ b/arch/ppc64/mm/hash_native.c 2004-11-17 19:32:52 -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/s390/boot/Makefile b/arch/s390/boot/Makefile --- a/arch/s390/boot/Makefile 2004-11-17 19:32:52 -08:00 +++ b/arch/s390/boot/Makefile 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/s390/defconfig 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/s390/kernel/binfmt_elf32.c 2004-11-17 19:32:52 -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/sparc/kernel/process.c b/arch/sparc/kernel/process.c --- a/arch/sparc/kernel/process.c 2004-11-17 19:32:51 -08:00 +++ b/arch/sparc/kernel/process.c 2004-11-17 19:32:51 -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/sparc64/Makefile b/arch/sparc64/Makefile --- a/arch/sparc64/Makefile 2004-11-17 19:32:52 -08:00 +++ b/arch/sparc64/Makefile 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/sparc64/defconfig 2004-11-17 19:32:52 -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 @@ -745,6 +749,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 +1153,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 +1185,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 +1195,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 +1685,7 @@ CONFIG_USB_W9968CF=m # -# USB Network adaptors +# USB Network Adapters # CONFIG_USB_CATC=m CONFIG_USB_KAWETH=m @@ -1694,6 +1702,7 @@ CONFIG_USB_GENESYS=y CONFIG_USB_NET1080=y CONFIG_USB_PL2301=y +CONFIG_USB_KC2190=y # # Intelligent USB Devices/Gadgets @@ -1720,6 +1729,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 +1868,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-17 19:32:51 -08:00 +++ b/arch/sparc64/kernel/pci.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/arch/sparc64/mm/fault.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/sparc64/mm/generic.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/um/Makefile 2004-11-17 19:32:52 -08:00 @@ -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-17 19:32:52 -08:00 +++ b/arch/um/Makefile-i386 2004-11-17 19:32:52 -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-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/um/defconfig 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/um/drivers/cow_user.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/um/include/frame_kern.h 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/um/include/kern_util.h 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/um/include/syscall_user.h 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/um/kernel/exec_kern.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/um/kernel/frame_kern.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/um/kernel/process_kern.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/um/kernel/ptrace.c 2004-11-17 19:32:52 -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/signal_kern.c b/arch/um/kernel/signal_kern.c --- a/arch/um/kernel/signal_kern.c 2004-11-17 19:32:52 -08:00 +++ b/arch/um/kernel/signal_kern.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/um/kernel/skas/Makefile 2004-11-17 19:32:52 -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-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/arch/um/kernel/skas/process.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/um/kernel/skas/syscall_user.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/um/kernel/syscall_kern.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/um/kernel/syscall_user.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/arch/um/kernel/tt/syscall_user.c 2004-11-17 19:32:52 -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/x86_64/kernel/smp.c b/arch/x86_64/kernel/smp.c --- a/arch/x86_64/kernel/smp.c 2004-11-17 19:32:52 -08:00 +++ b/arch/x86_64/kernel/smp.c 2004-11-17 19:32:52 -08:00 @@ -310,10 +310,10 @@ /* Wait for response */ while (atomic_read(&data.started) != cpus) - barrier(); + cpu_relax(); while (atomic_read(&data.finished) != cpus) - barrier(); + cpu_relax(); } /* 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-17 19:32:51 -08:00 +++ b/drivers/block/ll_rw_blk.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/drivers/block/scsi_ioctl.c 2004-11-17 19:32:52 -08:00 @@ -130,7 +130,6 @@ 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), diff -Nru a/drivers/block/swim3.c b/drivers/block/swim3.c --- a/drivers/block/swim3.c 2004-11-17 19:32:52 -08:00 +++ b/drivers/block/swim3.c 2004-11-17 19:32:52 -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); @@ -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/cdrom/viocd.c b/drivers/cdrom/viocd.c --- a/drivers/cdrom/viocd.c 2004-11-17 19:32:52 -08:00 +++ b/drivers/cdrom/viocd.c 2004-11-17 19:32:52 -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/tty_io.c b/drivers/char/tty_io.c --- a/drivers/char/tty_io.c 2004-11-17 19:32:52 -08:00 +++ b/drivers/char/tty_io.c 2004-11-17 19:32:52 -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/ide/cris/ide-v10.c b/drivers/ide/cris/ide-v10.c --- a/drivers/ide/cris/ide-v10.c 2004-11-17 19:32:52 -08:00 +++ b/drivers/ide/cris/ide-v10.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/ide/ide-cd.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/ide/ide-cd.h 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/ide/ide-disk.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/ide/ide-dma.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/ide/ide-probe.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/ide/ide-proc.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/ide/ide.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/ide/legacy/hd.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/drivers/ide/legacy/qd65xx.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/drivers/ide/legacy/qd65xx.h 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/ide/pci/aec62xx.h 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/drivers/ide/pci/cs5520.c 2004-11-17 19:32:51 -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-17 19:32:51 -08:00 +++ b/drivers/ide/pci/cy82c693.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/drivers/ide/pci/hpt366.h 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/ide/pci/pdc202xx_new.c 2004-11-17 19:32:52 -08:00 @@ -234,62 +234,6 @@ 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) { 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-17 19:32:52 -08:00 +++ b/drivers/ide/pci/pdc202xx_old.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/ide/pci/sc1200.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/ide/pci/serverworks.h 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/ide/pci/trm290.c 2004-11-17 19:32:52 -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/isdn/divert/divert_init.c b/drivers/isdn/divert/divert_init.c --- a/drivers/isdn/divert/divert_init.c 2004-11-17 19:32:52 -08:00 +++ b/drivers/isdn/divert/divert_init.c 2004-11-17 19:32:52 -08:00 @@ -12,6 +12,7 @@ #include #include #include + #include "isdn_divert.h" MODULE_DESCRIPTION("ISDN4Linux: Call diversion support"); @@ -59,23 +60,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-17 19:32:52 -08:00 +++ b/drivers/isdn/divert/divert_procfs.c 2004-11-17 19:32:52 -08:00 @@ -22,6 +22,7 @@ #include #include "isdn_divert.h" + /*********************************/ /* Variables for interface queue */ /*********************************/ @@ -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; 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-17 19:32:52 -08:00 +++ b/drivers/isdn/divert/isdn_divert.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/isdn/divert/isdn_divert.h 2004-11-17 19:32:52 -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/i4l/Kconfig b/drivers/isdn/i4l/Kconfig --- a/drivers/isdn/i4l/Kconfig 2004-11-17 19:32:52 -08:00 +++ b/drivers/isdn/i4l/Kconfig 2004-11-17 19:32:52 -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/macintosh/mediabay.c b/drivers/macintosh/mediabay.c --- a/drivers/macintosh/mediabay.c 2004-11-17 19:32:52 -08:00 +++ b/drivers/macintosh/mediabay.c 2004-11-17 19:32:52 -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 __iomem u8*)((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/md/dm-crypt.c b/drivers/md/dm-crypt.c --- a/drivers/md/dm-crypt.c 2004-11-17 19:32:51 -08:00 +++ b/drivers/md/dm-crypt.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/drivers/md/dm-ioctl.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/md/dm-table.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/md/dm.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/md/dm.h 2004-11-17 19:32:52 -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/message/i2o/debug.c b/drivers/message/i2o/debug.c --- a/drivers/message/i2o/debug.c 2004-11-17 19:32:52 -08:00 +++ b/drivers/message/i2o/debug.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/message/i2o/device.c 2004-11-17 19:32:52 -08:00 @@ -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; @@ -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-17 19:32:52 -08:00 +++ b/drivers/message/i2o/driver.c 2004-11-17 19:32:52 -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; /** @@ -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-17 19:32:52 -08:00 +++ b/drivers/message/i2o/exec-osm.c 2004-11-17 19:32:52 -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 *); @@ -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; 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 @@ -205,10 +202,12 @@ struct i2o_message *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); /* @@ -436,7 +435,7 @@ * 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; @@ -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_config.c b/drivers/message/i2o/i2o_config.c --- a/drivers/message/i2o/i2o_config.c 2004-11-17 19:32:52 -08:00 +++ b/drivers/message/i2o/i2o_config.c 2004-11-17 19:32:52 -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" }; @@ -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-17 19:32:52 -08:00 +++ b/drivers/message/i2o/i2o_proc.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/message/i2o/i2o_scsi.c 2004-11-17 19:32:52 -08:00 @@ -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); @@ -717,7 +717,7 @@ * 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; diff -Nru a/drivers/message/i2o/iop.c b/drivers/message/i2o/iop.c --- a/drivers/message/i2o/iop.c 2004-11-17 19:32:52 -08:00 +++ b/drivers/message/i2o/iop.c 2004-11-17 19:32:52 -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 *); @@ -564,7 +566,7 @@ * * 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; @@ -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; @@ -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 @@ -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/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c --- a/drivers/mtd/chips/cfi_cmdset_0001.c 2004-11-17 19:32:52 -08:00 +++ b/drivers/mtd/chips/cfi_cmdset_0001.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/chips/cfi_cmdset_0002.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/chips/cfi_cmdset_0020.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/chips/cfi_probe.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/chips/chipreg.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/chips/jedec_probe.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/chips/map_absent.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/chips/map_ram.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/chips/map_rom.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/cmdlinepart.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/devices/Kconfig 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/devices/blkmtd.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/drivers/mtd/devices/doc2000.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/devices/doc2001.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/drivers/mtd/devices/doc2001plus.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/devices/docprobe.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/drivers/mtd/devices/mtdram.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/devices/phram.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/devices/pmc551.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/drivers/mtd/devices/slram.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/ftl.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/drivers/mtd/inftlcore.c 2004-11-17 19:32:51 -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-17 19:32:51 -08:00 +++ b/drivers/mtd/inftlmount.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/amd76xrom.c 2004-11-17 19:32:52 -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 @@ -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-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/arctic-mtd.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/autcpu12-nvram.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/beech-mtd.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/cdb89712.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/cfi_flagadm.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/drivers/mtd/maps/cstm_mips_ixx.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/db1550-flash.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/drivers/mtd/maps/db1x00-flash.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/dbox2-flash.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/drivers/mtd/maps/dilnetpc.c 2004-11-17 19:32:51 -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); diff -Nru a/drivers/mtd/maps/dmv182.c b/drivers/mtd/maps/dmv182.c --- a/drivers/mtd/maps/dmv182.c 2004-11-17 19:32:51 -08:00 +++ b/drivers/mtd/maps/dmv182.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/ebony.c 2004-11-17 19:32:52 -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 * @@ -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) { diff -Nru a/drivers/mtd/maps/edb7312.c b/drivers/mtd/maps/edb7312.c --- a/drivers/mtd/maps/edb7312.c 2004-11-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/edb7312.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/elan-104nc.c 2004-11-17 19:32:52 -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. @@ -185,12 +185,12 @@ iounmap((void *)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-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/epxa10db-flash.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/drivers/mtd/maps/fortunet.c 2004-11-17 19:32:51 -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-17 19:32:51 -08:00 +++ b/drivers/mtd/maps/h720x-flash.c 2004-11-17 19:32:51 -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-17 19:32:51 -08:00 +++ b/drivers/mtd/maps/ichxrom.c 2004-11-17 19:32:51 -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 @@ -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-17 19:32:51 -08:00 +++ b/drivers/mtd/maps/impa7.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/ipaq-flash.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/iq80310.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/ixp2000.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/drivers/mtd/maps/ixp4xx.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/l440gx.c 2004-11-17 19:32:52 -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"); diff -Nru a/drivers/mtd/maps/lasat.c b/drivers/mtd/maps/lasat.c --- a/drivers/mtd/maps/lasat.c 2004-11-17 19:32:51 -08:00 +++ b/drivers/mtd/maps/lasat.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/lubbock-flash.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/mbx860.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/netsc520.c 2004-11-17 19:32:52 -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"); diff -Nru a/drivers/mtd/maps/nettel.c b/drivers/mtd/maps/nettel.c --- a/drivers/mtd/maps/nettel.c 2004-11-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/nettel.c 2004-11-17 19:32:52 -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); diff -Nru a/drivers/mtd/maps/ocelot.c b/drivers/mtd/maps/ocelot.c --- a/drivers/mtd/maps/ocelot.c 2004-11-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/ocelot.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/drivers/mtd/maps/ocotea.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/pb1550-flash.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/pb1xxx-flash.c 2004-11-17 19:32:52 -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/physmap.c b/drivers/mtd/maps/physmap.c --- a/drivers/mtd/maps/physmap.c 2004-11-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/physmap.c 2004-11-17 19:32:52 -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"); diff -Nru a/drivers/mtd/maps/pnc2000.c b/drivers/mtd/maps/pnc2000.c --- a/drivers/mtd/maps/pnc2000.c 2004-11-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/pnc2000.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/redwood.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/rpxlite.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/sbc_gxx.c 2004-11-17 19:32:52 -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. @@ -193,9 +193,9 @@ 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 ); diff -Nru a/drivers/mtd/maps/sc520cdp.c b/drivers/mtd/maps/sc520cdp.c --- a/drivers/mtd/maps/sc520cdp.c 2004-11-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/sc520cdp.c 2004-11-17 19:32:52 -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 @@ -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"); 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-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/scb2_flash.c 2004-11-17 19:32:52 -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 * @@ -64,7 +64,7 @@ static void *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, 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-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/scx200_docflash.c 2004-11-17 19:32:52 -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); 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-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/sun_uflash.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/drivers/mtd/maps/tqm8xxl.c 2004-11-17 19:32:51 -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/uclinux.c b/drivers/mtd/maps/uclinux.c --- a/drivers/mtd/maps/uclinux.c 2004-11-17 19:32:52 -08:00 +++ b/drivers/mtd/maps/uclinux.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/drivers/mtd/maps/wr_sbc82xx_flash.c 2004-11-17 19:32:51 -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-17 19:32:51 -08:00 +++ b/drivers/mtd/mtd_blkdevs.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/mtdblock.c 2004-11-17 19:32:52 -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-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/mtdblock_ro.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/mtdcore.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/mtdpart.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/drivers/mtd/nand/au1550nd.c 2004-11-17 19:32:51 -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-17 19:32:51 -08:00 +++ b/drivers/mtd/nand/autcpu12.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/nand/diskonchip.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/nand/edb7312.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/nand/h1910.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/nand/ppchameleonevb.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/nand/rtc_from4.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/nand/spia.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/drivers/mtd/nftlcore.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/drivers/mtd/nftlmount.c 2004-11-17 19:32:52 -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/ppp_generic.c b/drivers/net/ppp_generic.c --- a/drivers/net/ppp_generic.c 2004-11-17 19:32:52 -08:00 +++ b/drivers/net/ppp_generic.c 2004-11-17 19:32:52 -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/tg3.c b/drivers/net/tg3.c --- a/drivers/net/tg3.c 2004-11-17 19:32:52 -08:00 +++ b/drivers/net/tg3.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/drivers/net/tg3.h 2004-11-17 19:32:51 -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/pci/quirks.c b/drivers/pci/quirks.c --- a/drivers/pci/quirks.c 2004-11-17 19:32:51 -08:00 +++ b/drivers/pci/quirks.c 2004-11-17 19:32:51 -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; 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-17 19:32:52 -08:00 +++ b/drivers/s390/block/dasd_devmap.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/drivers/s390/char/con3270.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/drivers/s390/char/raw3270.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/drivers/s390/char/tty3270.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/drivers/s390/cio/css.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/s390/cio/css.h 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/s390/cio/device.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/s390/cio/device_fsm.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/s390/cio/qdio.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/s390/crypto/Makefile 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/s390/crypto/z90common.h 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/s390/crypto/z90crypt.h 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/s390/crypto/z90hardware.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/drivers/s390/crypto/z90main.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/drivers/s390/scsi/zfcp_aux.c 2004-11-17 19:32:52 -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.144 $" #include "zfcp_ext.h" @@ -46,14 +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 *, - void __user *, size_t); -static inline int zfcp_sg_list_copy_to_user(void __user *, - struct zfcp_sg_list *, size_t); - static int zfcp_cfdc_dev_ioctl(struct inode *, struct file *, unsigned int, unsigned long); @@ -61,7 +52,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 +138,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 +157,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 +174,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 +191,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 +271,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 +301,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 " @@ -347,16 +337,15 @@ if (zfcp_device_setup(device)) zfcp_init_device_configure(); + init_waitqueue_head(&zfcp_callbacks.wq); + goto out; + 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; } @@ -570,7 +559,7 @@ * elements of the scatter-gather list. The maximum size of a single element * in the scatter-gather list is PAGE_SIZE. */ -static inline int +int zfcp_sg_list_alloc(struct zfcp_sg_list *sg_list, size_t size) { struct scatterlist *sg; @@ -618,7 +607,7 @@ * Memory for each element in the scatter-gather list is freed. * Finally sg_list->sg is freed itself and sg_list->count is reset. */ -static inline void +void zfcp_sg_list_free(struct zfcp_sg_list *sg_list) { struct scatterlist *sg; @@ -663,7 +652,7 @@ * @size: number of bytes to be copied * Return: 0 on success, -EFAULT if copy_from_user fails. */ -static inline int +int zfcp_sg_list_copy_from_user(struct zfcp_sg_list *sg_list, void __user *user_buffer, size_t size) @@ -701,7 +690,7 @@ * @size: number of bytes to be copied * Return: 0 on success, -EFAULT if copy_to_user fails */ -static inline int +int zfcp_sg_list_copy_to_user(void __user *user_buffer, struct zfcp_sg_list *sg_list, size_t size) @@ -868,7 +857,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 +1030,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 +1043,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 +1084,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 @@ -1428,6 +1418,8 @@ zfcp_adapter_get(adapter); + zfcp_cb_port_add(port); + return port; } @@ -1655,6 +1647,7 @@ else zfcp_fsf_incoming_els_unknown(adapter, status_buffer); + zfcp_cb_incoming_els(adapter, status_buffer->payload); } @@ -1981,4 +1974,161 @@ return ret; } + #undef ZFCP_LOG_AREA + +/****************************************************************/ +/******* HBA API Support related Functions *********************/ +/****************************************************************/ +#define ZFCP_LOG_AREA ZFCP_LOG_AREA_FC + +struct zfcp_callbacks zfcp_callbacks = { }; + +/** + * zfcp_register_callbacks - register callbacks for event handling in HBA API + * @callbacks: set of callback functions to be registered + */ +void +zfcp_register_callbacks(struct zfcp_callbacks *callbacks) +{ + zfcp_callbacks.incoming_els = callbacks->incoming_els; + zfcp_callbacks.link_down = callbacks->link_down; + zfcp_callbacks.link_up = callbacks->link_up; + zfcp_callbacks.adapter_add = callbacks->adapter_add; + zfcp_callbacks.port_add = callbacks->port_add; + zfcp_callbacks.unit_add = callbacks->unit_add; +} + +/** + * zfcp_unregister_callbacks - deregister callbacks for event handling + */ +void +zfcp_unregister_callbacks(void) +{ + zfcp_callbacks.incoming_els = NULL; + zfcp_callbacks.link_down = NULL; + zfcp_callbacks.link_up = NULL; + zfcp_callbacks.adapter_add = NULL; + zfcp_callbacks.port_add = NULL; + zfcp_callbacks.unit_add = NULL; + + /* wait until all callbacks returned */ + wait_event(zfcp_callbacks.wq, + atomic_read(&zfcp_callbacks.refcount) == 0); +} + +/** + * zfcp_cb_incoming_els - make callback for incoming els + * @adpater: adapter where ELS was received + * @payload: received ELS payload + */ +void +zfcp_cb_incoming_els(struct zfcp_adapter *adapter, void *payload) +{ + zfcp_cb_incoming_els_t cb; + + atomic_inc(&zfcp_callbacks.refcount); + cb = zfcp_callbacks.incoming_els; + if (cb) + cb(adapter, payload); + if (atomic_dec_return(&zfcp_callbacks.refcount) == 0) + wake_up(&zfcp_callbacks.wq); +} + +/** + * zfcp_cb_link_down - make callback for link down event + * @adapter: adapter where link down occurred + */ +void +zfcp_cb_link_down(struct zfcp_adapter *adapter) +{ + zfcp_cb_link_down_t cb; + atomic_inc(&zfcp_callbacks.refcount); + cb = zfcp_callbacks.link_down; + if (cb) + cb(adapter); + if (atomic_dec_return(&zfcp_callbacks.refcount) == 0) + wake_up(&zfcp_callbacks.wq); +} + +/** + * zfcp_cb_link_up - make callback for link up event + * @adapter: adapter where link up occurred + */ +void +zfcp_cb_link_up(struct zfcp_adapter *adapter) +{ + zfcp_cb_link_up_t cb; + atomic_inc(&zfcp_callbacks.refcount); + cb = zfcp_callbacks.link_up; + if (cb) + cb(adapter); + if (atomic_dec_return(&zfcp_callbacks.refcount) == 0) + wake_up(&zfcp_callbacks.wq); +} + +/** + * zfcp_cb_adapter_add - make callback for adapter add event + * @adapter: adapter which was added/activated + */ +void +zfcp_cb_adapter_add(struct zfcp_adapter *adapter) +{ + zfcp_cb_adapter_add_t cb; + atomic_inc(&zfcp_callbacks.refcount); + cb = zfcp_callbacks.adapter_add; + if (cb) + cb(adapter); + if (atomic_dec_return(&zfcp_callbacks.refcount) == 0) + wake_up(&zfcp_callbacks.wq); +} + +/** + * zfcp_cb_port_add - make callback for port add event + * @port: port which was added + */ +void +zfcp_cb_port_add(struct zfcp_port *port) +{ + zfcp_cb_port_add_t cb; + atomic_inc(&zfcp_callbacks.refcount); + cb = zfcp_callbacks.port_add; + if (cb) + cb(port); + if (atomic_dec_return(&zfcp_callbacks.refcount) == 0) + wake_up(&zfcp_callbacks.wq); +} + +/** + * zfcp_cb_unit_add - make callback for unit add event + * @unit: unit which was added + */ +void +zfcp_cb_unit_add(struct zfcp_unit *unit) +{ + zfcp_cb_unit_add_t cb; + atomic_inc(&zfcp_callbacks.refcount); + cb = zfcp_callbacks.unit_add; + if (cb) + cb(unit); + if (atomic_dec_return(&zfcp_callbacks.refcount) == 0) + wake_up(&zfcp_callbacks.wq); +} + +#undef ZFCP_LOG_AREA + +EXPORT_SYMBOL(zfcp_sg_list_alloc); +EXPORT_SYMBOL(zfcp_sg_list_free); +EXPORT_SYMBOL(zfcp_sg_size); +EXPORT_SYMBOL(zfcp_sg_list_copy_from_user); +EXPORT_SYMBOL(zfcp_sg_list_copy_to_user); +EXPORT_SYMBOL(zfcp_get_unit_by_lun); +EXPORT_SYMBOL(zfcp_get_port_by_wwpn); +EXPORT_SYMBOL(zfcp_get_port_by_did); +EXPORT_SYMBOL(zfcp_get_adapter_by_busid); +EXPORT_SYMBOL(zfcp_register_callbacks); +EXPORT_SYMBOL(zfcp_unregister_callbacks); +EXPORT_SYMBOL(zfcp_port_enqueue); +EXPORT_SYMBOL(zfcp_unit_enqueue); +EXPORT_SYMBOL(zfcp_unit_dequeue); +EXPORT_SYMBOL(zfcp_check_ct_response); 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-17 19:32:52 -08:00 +++ b/drivers/s390/scsi/zfcp_ccw.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/s390/scsi/zfcp_def.h 2004-11-17 19:32:52 -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.107 $" /*************************** 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 */ @@ -1175,5 +1117,30 @@ { wait_event(adapter->remove_wq, atomic_read(&adapter->refcount) == 0); } + + +/* + * stuff needed for callback handling + */ + +typedef void (*zfcp_cb_incoming_els_t) (struct zfcp_adapter *, void *); +typedef void (*zfcp_cb_link_down_t) (struct zfcp_adapter *); +typedef void (*zfcp_cb_link_up_t) (struct zfcp_adapter *); +typedef void (*zfcp_cb_adapter_add_t) (struct zfcp_adapter *); +typedef void (*zfcp_cb_port_add_t) (struct zfcp_port *); +typedef void (*zfcp_cb_unit_add_t) (struct zfcp_unit *); + +struct zfcp_callbacks { + atomic_t refcount; + wait_queue_head_t wq; + zfcp_cb_incoming_els_t incoming_els; + zfcp_cb_link_down_t link_down; + zfcp_cb_link_up_t link_up; + zfcp_cb_adapter_add_t adapter_add; + zfcp_cb_port_add_t port_add; + zfcp_cb_unit_add_t unit_add; +}; + +extern struct zfcp_callbacks zfcp_callbacks; #endif /* ZFCP_DEF_H */ 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-17 19:32:51 -08:00 +++ b/drivers/s390/scsi/zfcp_erp.c 2004-11-17 19:32:51 -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.79 $" #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,13 @@ switch (action) { case ZFCP_ERP_ACTION_REOPEN_UNIT: if ((result == ZFCP_ERP_SUCCEEDED) - && (!atomic_test_mask(ZFCP_STATUS_UNIT_TEMPORARY, &unit->status)) - && (!unit->device)) - zfcp_erp_schedule_work(unit); + && (!atomic_test_mask(ZFCP_STATUS_UNIT_TEMPORARY, + &unit->status)) + && (!unit->device)) { + scsi_add_device(unit->port->adapter->scsi_host, 0, + unit->port->scsi_id, unit->scsi_lun); + zfcp_cb_unit_add(unit); + } zfcp_unit_put(unit); break; case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED: @@ -3588,4 +3470,126 @@ 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 + +EXPORT_SYMBOL(zfcp_erp_wait); +EXPORT_SYMBOL(zfcp_erp_port_reopen); +EXPORT_SYMBOL(zfcp_erp_unit_reopen); +EXPORT_SYMBOL(zfcp_erp_unit_shutdown); +EXPORT_SYMBOL(zfcp_fsf_request_timeout_handler); 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-17 19:32:52 -08:00 +++ b/drivers/s390/scsi/zfcp_ext.h 2004-11-17 19:32:52 -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.60 $" #include "zfcp_def.h" @@ -171,10 +171,34 @@ 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 *, void *, int); extern void zfcp_cmd_dbf_event_scsi(const char *, struct scsi_cmnd *); extern void zfcp_in_els_dbf_event(struct zfcp_adapter *, const char *, struct fsf_status_read_buffer *, int); +extern int zfcp_sg_list_alloc(struct zfcp_sg_list *, size_t); +extern void zfcp_sg_list_free(struct zfcp_sg_list *); +extern int zfcp_sg_list_copy_from_user(struct zfcp_sg_list *, void __user *, + size_t); +extern int zfcp_sg_list_copy_to_user(void __user *, struct zfcp_sg_list *, + size_t); +extern size_t zfcp_sg_size(struct scatterlist *, unsigned int); + +void zfcp_register_callbacks(struct zfcp_callbacks *); +void zfcp_unregister_callbacks(void); + +extern void zfcp_cb_incoming_els(struct zfcp_adapter *, void *); +extern void zfcp_cb_link_down(struct zfcp_adapter *); +extern void zfcp_cb_link_up(struct zfcp_adapter *); +extern void zfcp_cb_adapter_add(struct zfcp_adapter *); +extern void zfcp_cb_port_add(struct zfcp_port *); +extern void zfcp_cb_unit_add(struct zfcp_unit *); + #endif /* ZFCP_EXT_H */ 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-17 19:32:52 -08:00 +++ b/drivers/s390/scsi/zfcp_fsf.c 2004-11-17 19:32:52 -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.83 $" #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:"); @@ -1010,6 +1020,8 @@ atomic_set_mask(ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED, &adapter->status); zfcp_erp_adapter_failed(adapter); + + zfcp_cb_link_down(adapter); break; case FSF_STATUS_READ_LINK_UP: @@ -1026,6 +1038,8 @@ ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED | ZFCP_STATUS_COMMON_ERP_FAILED); + zfcp_cb_link_up(adapter); + break; case FSF_STATUS_READ_CFDC_UPDATED: @@ -1033,6 +1047,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 +1305,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 +1552,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 +1579,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 +1609,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 +1625,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 +1643,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 +1654,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 +1704,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 +1989,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 +2006,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 +2071,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); @@ -2220,6 +2255,8 @@ } atomic_set_mask(ZFCP_STATUS_ADAPTER_XCONFIG_OK, &adapter->status); + zfcp_cb_adapter_add(adapter); + break; case FSF_EXCHANGE_CONFIG_DATA_INCOMPLETE: debug_text_event(adapter->erp_dbf, 0, "xchg-inco"); @@ -2335,7 +2372,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 +2491,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 +2506,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 +2626,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 +2898,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 +2914,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 +3036,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 +3081,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 +3202,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 +3217,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 +3329,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 +3374,7 @@ break; } - skip_fsfstatus: + skip_fsfstatus: atomic_clear_mask(ZFCP_STATUS_COMMON_OPENING, &unit->status); return retval; } @@ -3478,6 +3610,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 +3695,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 +4037,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 +4097,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 +4754,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; @@ -5004,3 +5138,7 @@ } #undef ZFCP_LOG_AREA + +EXPORT_SYMBOL(zfcp_fsf_exchange_port_data); +EXPORT_SYMBOL(zfcp_fsf_send_ct); +EXPORT_SYMBOL(zfcp_fsf_send_els); 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-17 19:32:52 -08:00 +++ b/drivers/s390/scsi/zfcp_fsf.h 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/s390/scsi/zfcp_scsi.c 2004-11-17 19:32:52 -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.72 $" #include "zfcp_ext.h" @@ -948,3 +948,6 @@ }; #undef ZFCP_LOG_AREA + +EXPORT_SYMBOL(zfcp_data); +EXPORT_SYMBOL(zfcp_scsi_command_sync); 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-17 19:32:52 -08:00 +++ b/drivers/s390/scsi/zfcp_sysfs_port.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/s390/scsi/zfcp_sysfs_unit.c 2004-11-17 19:32:52 -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/scsi/mac53c94.c b/drivers/scsi/mac53c94.c --- a/drivers/scsi/mac53c94.c 2004-11-17 19:32:51 -08:00 +++ b/drivers/scsi/mac53c94.c 2004-11-17 19:32:51 -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/mesh.c b/drivers/scsi/mesh.c --- a/drivers/scsi/mesh.c 2004-11-17 19:32:52 -08:00 +++ b/drivers/scsi/mesh.c 2004-11-17 19:32:52 -08:00 @@ -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; } @@ -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; } diff -Nru a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c --- a/drivers/serial/pmac_zilog.c 2004-11-17 19:32:51 -08:00 +++ b/drivers/serial/pmac_zilog.c 2004-11-17 19:32:51 -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) @@ -1603,7 +1603,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 +1647,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 +1663,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 +1716,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/s3c2410.c b/drivers/serial/s3c2410.c --- a/drivers/serial/s3c2410.c 2004-11-17 19:32:52 -08:00 +++ b/drivers/serial/s3c2410.c 2004-11-17 19:32:52 -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,152 @@ * * 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 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 +165,230 @@ #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; + 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 +396,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 +415,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 +434,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 +468,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 +492,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); - ret = request_irq(RX_IRQ(port), serial_s3c2410_rx_chars, 0, - serial_s3c2410_name, port); + rx_enabled(port) = 1; + + 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; - ret = request_irq(TX_IRQ(port), serial_s3c2410_tx_chars, 0, - serial_s3c2410_name, port); + dbg("requesting tx irq...\n"); + + tx_enabled(port) = 1; + + 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 +747,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 +795,9 @@ break; } + /* preserve original lcon IR settings */ + ulcon |= (cfg->ulcon & S3C2410_LCON_IRM); + if (termios->c_cflag & CSTOPB) ulcon |= S3C2410_LCON_STOPB; @@ -352,18 +810,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 +852,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 +1010,429 @@ 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; + + cfg = s3c24xx_dev_to_cfg(&platdev->dev); - if (inited) + 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); + + 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); + + 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, + .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; + } - if (ptr->mapbase == 0) - continue; + 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, + .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); +} - /* reset the fifos (and setup the uart */ - serial_s3c2410_resetport(ptr, cfg); +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 +1441,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 +1487,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 +1541,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 +1570,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/sunzilog.c b/drivers/serial/sunzilog.c --- a/drivers/serial/sunzilog.c 2004-11-17 19:32:52 -08:00 +++ b/drivers/serial/sunzilog.c 2004-11-17 19:32:52 -08:00 @@ -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); } 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-17 19:32:52 -08:00 +++ b/drivers/video/aty/atyfb_base.c 2004-11-17 19:32:52 -08:00 @@ -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-17 19:32:52 -08:00 +++ b/drivers/video/aty/mach64_cursor.c 2004-11-17 19:32:52 -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/cg14.c b/drivers/video/cg14.c --- a/drivers/video/cg14.c 2004-11-17 19:32:52 -08:00 +++ b/drivers/video/cg14.c 2004-11-17 19:32:52 -08:00 @@ -255,6 +255,9 @@ if (regno >= 256) return 1; + red >>= 8; + green >>= 8; + blue >>= 8; val = (red | (green << 8) | (blue << 16)); spin_lock_irqsave(&par->lock, flags); @@ -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); @@ -561,6 +573,7 @@ kfree(all); return; } + fb_set_cmap(&all->info.cmap, &all->info); cg14_init_fix(&all->info, linebytes); @@ -573,8 +586,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-17 19:32:52 -08:00 +++ b/drivers/video/cg3.c 2004-11-17 19:32:52 -08:00 @@ -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; } diff -Nru a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig --- a/drivers/video/console/Kconfig 2004-11-17 19:32:52 -08:00 +++ b/drivers/video/console/Kconfig 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/video/console/bitblit.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/video/console/fbcon.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/video/console/fbcon.h 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/video/console/tileblit.c 2004-11-17 19:32:52 -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/fbmem.c b/drivers/video/fbmem.c --- a/drivers/video/fbmem.c 2004-11-17 19:32:51 -08:00 +++ b/drivers/video/fbmem.c 2004-11-17 19:32:51 -08:00 @@ -906,9 +906,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/intelfb/intelfb.h b/drivers/video/intelfb/intelfb.h --- a/drivers/video/intelfb/intelfb.h 2004-11-17 19:32:52 -08:00 +++ b/drivers/video/intelfb/intelfb.h 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/video/intelfb/intelfbdrv.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/drivers/video/intelfb/intelfbhw.c 2004-11-17 19:32:51 -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/modedb.c b/drivers/video/modedb.c --- a/drivers/video/modedb.c 2004-11-17 19:32:52 -08:00 +++ b/drivers/video/modedb.c 2004-11-17 19:32:52 -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/riva/fbdev.c b/drivers/video/riva/fbdev.c --- a/drivers/video/riva/fbdev.c 2004-11-17 19:32:52 -08:00 +++ b/drivers/video/riva/fbdev.c 2004-11-17 19:32:52 -08:00 @@ -444,6 +444,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); @@ -1577,6 +1579,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 +1612,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); + src = kmalloc(s_pitch * cursor->image.height, GFP_ATOMIC); - 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); + 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) 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-17 19:32:52 -08:00 +++ b/drivers/video/savage/savagefb-i2c.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/video/savage/savagefb.c 2004-11-17 19:32:52 -08:00 @@ -738,7 +738,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? */ @@ -1817,43 +1817,43 @@ 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; } @@ -2029,14 +2029,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-17 19:32:52 -08:00 +++ b/drivers/video/sbuslib.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/drivers/video/softcursor.c 2004-11-17 19:32:52 -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/fs/binfmt_aout.c b/fs/binfmt_aout.c --- a/fs/binfmt_aout.c 2004-11-17 19:32:51 -08:00 +++ b/fs/binfmt_aout.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/fs/binfmt_elf.c 2004-11-17 19:32:52 -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/char_dev.c b/fs/char_dev.c --- a/fs/char_dev.c 2004-11-17 19:32:52 -08:00 +++ b/fs/char_dev.c 2004-11-17 19:32:52 -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/dcache.c b/fs/dcache.c --- a/fs/dcache.c 2004-11-17 19:32:51 -08:00 +++ b/fs/dcache.c 2004-11-17 19:32:51 -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/exec.c b/fs/exec.c --- a/fs/exec.c 2004-11-17 19:32:52 -08:00 +++ b/fs/exec.c 2004-11-17 19:32:52 -08:00 @@ -413,6 +413,7 @@ down_write(&mm->mmap_sem); { + struct vm_area_struct *vma; mpnt->vm_mm = mm; #ifdef CONFIG_STACK_GROWSUP mpnt->vm_start = stack_base; @@ -433,6 +434,12 @@ mpnt->vm_flags = VM_STACK_FLAGS; mpnt->vm_flags |= mm->def_flags; mpnt->vm_page_prot = protection_map[mpnt->vm_flags & 0x7]; + vma = find_vma(mm, mpnt->vm_start); + if (vma) { + up_write(&mm->mmap_sem); + kmem_cache_free(vm_area_cachep, mpnt); + return -ENOMEM; + } insert_vm_struct(mm, mpnt); mm->stack_vm = mm->total_vm = vma_pages(mpnt); } diff -Nru a/fs/jffs2/gc.c b/fs/jffs2/gc.c --- a/fs/jffs2/gc.c 2004-11-17 19:32:52 -08:00 +++ b/fs/jffs2/gc.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/fs/jffs2/nodelist.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/fs/jffs2/nodelist.h 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/fs/jffs2/readinode.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/fs/jffs2/super.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/fs/jffs2/write.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/fs/lockd/Makefile 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/fs/lockd/clntproc.c 2004-11-17 19:32:52 -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-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/fs/lockd/svc.c 2004-11-17 19:32:52 -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/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-17 19:32:52 -08:00 +++ b/include/asm-arm/arch-s3c2410/regs-serial.h 2004-11-17 19:32:52 -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/uncompress.h b/include/asm-arm/arch-s3c2410/uncompress.h --- a/include/asm-arm/arch-s3c2410/uncompress.h 2004-11-17 19:32:52 -08:00 +++ b/include/asm-arm/arch-s3c2410/uncompress.h 2004-11-17 19:32:52 -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-h8300/io.h b/include/asm-h8300/io.h --- a/include/asm-h8300/io.h 2004-11-17 19:32:52 -08:00 +++ b/include/asm-h8300/io.h 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/include/asm-h8300/sigcontext.h 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/include/asm-h8300/signal.h 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/include/asm-h8300/ucontext.h 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/include/asm-h8300/unistd.h 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/include/asm-i386/apic.h 2004-11-17 19:32:52 -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-ia64/ptrace.h b/include/asm-ia64/ptrace.h --- a/include/asm-ia64/ptrace.h 2004-11-17 19:32:52 -08:00 +++ b/include/asm-ia64/ptrace.h 2004-11-17 19:32:52 -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/unistd.h b/include/asm-ia64/unistd.h --- a/include/asm-ia64/unistd.h 2004-11-17 19:32:51 -08:00 +++ b/include/asm-ia64/unistd.h 2004-11-17 19:32:51 -08:00 @@ -259,6 +259,7 @@ #define __NR_mq_getsetattr 1267 #define __NR_kexec_load 1268 #define __NR_vserver 1269 +#define __NR_waitid 1270 #ifdef __KERNEL__ @@ -385,7 +386,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-17 19:32:52 -08:00 +++ b/include/asm-m32r/ide.h 2004-11-17 19:32:52 -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-ppc64/pci-bridge.h b/include/asm-ppc64/pci-bridge.h --- a/include/asm-ppc64/pci-bridge.h 2004-11-17 19:32:51 -08:00 +++ b/include/asm-ppc64/pci-bridge.h 2004-11-17 19:32:51 -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; @@ -93,11 +83,6 @@ struct device_node *dev); 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); diff -Nru a/include/asm-ppc64/pgtable.h b/include/asm-ppc64/pgtable.h --- a/include/asm-ppc64/pgtable.h 2004-11-17 19:32:52 -08:00 +++ b/include/asm-ppc64/pgtable.h 2004-11-17 19:32:52 -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/unistd.h b/include/asm-ppc64/unistd.h --- a/include/asm-ppc64/unistd.h 2004-11-17 19:32:51 -08:00 +++ b/include/asm-ppc64/unistd.h 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/include/asm-s390/elf.h 2004-11-17 19:32:52 -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-um/pgtable.h b/include/asm-um/pgtable.h --- a/include/asm-um/pgtable.h 2004-11-17 19:32:52 -08:00 +++ b/include/asm-um/pgtable.h 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/include/asm-um/unistd.h 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/include/asm-x86_64/hpet.h 2004-11-17 19:32:52 -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/linux/compat_ioctl.h b/include/linux/compat_ioctl.h --- a/include/linux/compat_ioctl.h 2004-11-17 19:32:52 -08:00 +++ b/include/linux/compat_ioctl.h 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/include/linux/device-mapper.h 2004-11-17 19:32:52 -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/dm-ioctl.h b/include/linux/dm-ioctl.h --- a/include/linux/dm-ioctl.h 2004-11-17 19:32:51 -08:00 +++ b/include/linux/dm-ioctl.h 2004-11-17 19:32:51 -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/i2o.h b/include/linux/i2o.h --- a/include/linux/i2o.h 2004-11-17 19:32:51 -08:00 +++ b/include/linux/i2o.h 2004-11-17 19:32:51 -08:00 @@ -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) @@ -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); }; @@ -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-17 19:32:52 -08:00 +++ b/include/linux/jffs2_fs_i.h 2004-11-17 19:32:52 -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/mtd/cfi.h b/include/linux/mtd/cfi.h --- a/include/linux/mtd/cfi.h 2004-11-17 19:32:52 -08:00 +++ b/include/linux/mtd/cfi.h 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/include/linux/mtd/partitions.h 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/include/linux/netdevice.h 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/include/linux/netfilter.h 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/include/linux/netfilter_ipv4/ip_nat_protocol.h 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/include/linux/pci_ids.h 2004-11-17 19:32:52 -08:00 @@ -1918,11 +1918,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/sysrq.h b/include/linux/sysrq.h --- a/include/linux/sysrq.h 2004-11-17 19:32:51 -08:00 +++ b/include/linux/sysrq.h 2004-11-17 19:32:51 -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/net/sock.h b/include/net/sock.h --- a/include/net/sock.h 2004-11-17 19:32:52 -08:00 +++ b/include/net/sock.h 2004-11-17 19:32:52 -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/init/do_mounts.c b/init/do_mounts.c --- a/init/do_mounts.c 2004-11-17 19:32:52 -08:00 +++ b/init/do_mounts.c 2004-11-17 19:32:52 -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/fork.c b/kernel/fork.c --- a/kernel/fork.c 2004-11-17 19:32:51 -08:00 +++ b/kernel/fork.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/kernel/futex.c 2004-11-17 19:32:52 -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. @@ -542,10 +557,11 @@ WARN_ON(!signal_pending(current)); 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/lib/radix-tree.c b/lib/radix-tree.c --- a/lib/radix-tree.c 2004-11-17 19:32:51 -08:00 +++ b/lib/radix-tree.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/lib/reed_solomon/decode_rs.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/lib/reed_solomon/encode_rs.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/mm/memory.c 2004-11-17 19:32:52 -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]); diff -Nru a/mm/page_alloc.c b/mm/page_alloc.c --- a/mm/page_alloc.c 2004-11-17 19:32:51 -08:00 +++ b/mm/page_alloc.c 2004-11-17 19:32:51 -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/shmem.c b/mm/shmem.c --- a/mm/shmem.c 2004-11-17 19:32:52 -08:00 +++ b/mm/shmem.c 2004-11-17 19:32:52 -08:00 @@ -1314,6 +1314,10 @@ case S_IFLNK: break; } + } else if (sbinfo) { + spin_lock(&sbinfo->stat_lock); + sbinfo->free_inodes++; + spin_unlock(&sbinfo->stat_lock); } return inode; } diff -Nru a/net/appletalk/ddp.c b/net/appletalk/ddp.c --- a/net/appletalk/ddp.c 2004-11-17 19:32:52 -08:00 +++ b/net/appletalk/ddp.c 2004-11-17 19:32:52 -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/core/dev.c b/net/core/dev.c --- a/net/core/dev.c 2004-11-17 19:32:52 -08:00 +++ b/net/core/dev.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/net/core/netfilter.c 2004-11-17 19:32:52 -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/sock.c b/net/core/sock.c --- a/net/core/sock.c 2004-11-17 19:32:52 -08:00 +++ b/net/core/sock.c 2004-11-17 19:32:52 -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/ipv4/af_inet.c b/net/ipv4/af_inet.c --- a/net/ipv4/af_inet.c 2004-11-17 19:32:51 -08:00 +++ b/net/ipv4/af_inet.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/net/ipv4/icmp.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/net/ipv4/ip_output.c 2004-11-17 19:32:52 -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/netfilter/ip_nat_core.c b/net/ipv4/netfilter/ip_nat_core.c --- a/net/ipv4/netfilter/ip_nat_core.c 2004-11-17 19:32:51 -08:00 +++ b/net/ipv4/netfilter/ip_nat_core.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/net/ipv4/netfilter/ip_nat_proto_icmp.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/net/ipv4/netfilter/ip_nat_proto_tcp.c 2004-11-17 19:32:51 -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-17 19:32:51 -08:00 +++ b/net/ipv4/netfilter/ip_nat_proto_udp.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/net/ipv4/netfilter/ip_nat_proto_unknown.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/net/ipv4/netfilter/ip_queue.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/net/ipv4/netfilter/ip_tables.c 2004-11-17 19:32:52 -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_MASQUERADE.c b/net/ipv4/netfilter/ipt_MASQUERADE.c --- a/net/ipv4/netfilter/ipt_MASQUERADE.c 2004-11-17 19:32:52 -08:00 +++ b/net/ipv4/netfilter/ipt_MASQUERADE.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/net/ipv4/netfilter/ipt_REJECT.c 2004-11-17 19:32:52 -08:00 @@ -38,20 +38,6 @@ #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) { struct iphdr *iph = skb->nh.iph; @@ -209,7 +195,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); @@ -360,7 +346,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-17 19:32:52 -08:00 +++ b/net/ipv4/raw.c 2004-11-17 19:32:52 -08:00 @@ -706,6 +706,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-17 19:32:52 -08:00 +++ b/net/ipv4/tcp_ipv4.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/net/ipv4/udp.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/net/ipv6/addrconf.c 2004-11-17 19:32:52 -08:00 @@ -3387,6 +3387,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-17 19:32:52 -08:00 +++ b/net/ipv6/af_inet6.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/net/ipv6/ip6_output.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/net/ipv6/netfilter/ip6_queue.c 2004-11-17 19:32:52 -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-17 19:32:51 -08:00 +++ b/net/ipv6/netfilter/ip6t_eui64.c 2004-11-17 19:32:51 -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-17 19:32:52 -08:00 +++ b/net/ipv6/netfilter/ip6t_ipv6header.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/net/ipv6/raw.c 2004-11-17 19:32:52 -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/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c --- a/net/ipv6/tcp_ipv6.c 2004-11-17 19:32:52 -08:00 +++ b/net/ipv6/tcp_ipv6.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/net/ipv6/udp.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/net/ipv6/xfrm6_output.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/net/netlink/af_netlink.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/net/sched/police.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/net/sctp/ipv6.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/net/sctp/protocol.c 2004-11-17 19:32:52 -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-17 19:32:52 -08:00 +++ b/net/sctp/socket.c 2004-11-17 19:32:52 -08:00 @@ -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/unix/af_unix.c b/net/unix/af_unix.c --- a/net/unix/af_unix.c 2004-11-17 19:32:52 -08:00 +++ b/net/unix/af_unix.c 2004-11-17 19:32:52 -08:00 @@ -1535,9 +1535,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 +1589,8 @@ out_free: skb_free_datagram(sk,skb); +out_unlock: + up(&u->readsem); out: return err; } diff -Nru a/sound/oss/dmabuf.c b/sound/oss/dmabuf.c --- a/sound/oss/dmabuf.c 2004-11-17 19:32:51 -08:00 +++ b/sound/oss/dmabuf.c 2004-11-17 19:32:51 -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; }