http://linus.bkbits.net/linux-2.5 chrisw@osdl.org[torvalds]|ChangeSet|20040505014834|49142 chrisw # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/05/04 18:48:34-07:00 chrisw@osdl.org # [PATCH] fix queues_count accounting in mqueue_delete_inode() # # During mqueue_get_inode(), it's possible that kmalloc() of the # info->messages array will fail. This failure mode will cause the # queues_count to be (incorrectly) decremented twice. This patch uses # info->messages on mqueue_delete_inode() to determine whether the # mqueue was every truly created, and hence proper accounting is needed # on destruction. # # ipc/mqueue.c # 2004/05/04 15:16:34-07:00 chrisw@osdl.org +5 -3 # fix queues_count accounting in mqueue_delete_inode() # # ChangeSet # 2004/05/04 18:10:36-07:00 akpm@osdl.org # [PATCH] report size of printk buffer # # From: # # In the old days the printk log buffer had a constant size, and dmesg asked # for the 4096, later 8192, later 16384 bytes in there. These days the # printk log buffer has variable size, and it is not easy for dmesg to do the # right thing, especially when doing a "read and clear". The patch below # adds a syslog subfuntion that reports the buffer size. # # kernel/printk.c # 2004/05/04 10:48:06-07:00 akpm@osdl.org +4 -0 # report size of printk buffer # # ChangeSet # 2004/05/04 18:10:25-07:00 chrisw@osdl.org # [PATCH] fix memleak in sys_mq_timedsend # # Move error handling to capture all three possible error conditions on # sending to a full queue. Without this fix any unprivileged user can # leak arbitrary amounts of kernel memory. # # ipc/mqueue.c # 2004/05/04 15:10:59-07:00 chrisw@osdl.org +2 -2 # fix memleak in sys_mq_timedsend # # ChangeSet # 2004/05/05 00:17:47+01:00 rmk@flint.arm.linux.org.uk # [SERIAL] Remove unused variable. # # drivers/serial/8250_pci.c # 2004/05/05 00:15:48+01:00 rmk@flint.arm.linux.org.uk +1 -1 # Remove 'maxnr' - it's unused. # # ChangeSet # 2004/05/04 21:31:38+01:00 daniel.ritz@ch.rmk.(none) # [PCMCIA] add EnE specific initialization to fix HDSP # # Patch from Daniel Ritz. # # This patch clears an almost undocumented EnE specific test register # that makes sound on RME Hammerfall DSP Carbus work...should even work # after suspend. # # drivers/pcmcia/ti113x.h # 2004/05/04 21:28:51+01:00 daniel.ritz@ch.rmk.(none) +21 -0 # [PATCH] add EnE specific initialization to fix HDSP # # ChangeSet # 2004/05/04 12:30:47-07:00 torvalds@ppc970.osdl.org # Be more careful about waking up rwsem waiters # # Get a reference count on the the sleeper, so that # it can't possibly go away before we've sent it the # wakeup event. # # Noted by Nick Piggin # David Howells # # lib/rwsem.c # 2004/05/04 12:30:41-07:00 torvalds@ppc970.osdl.org +5 -2 # Be more careful about waking up rwsem waiters # # Get a reference count on the the sleeper, so that # it can't possibly go away before we've sent it the # wakeup event. # # Noted by Nick Piggin # David Howells # # lib/rwsem-spinlock.c # 2004/05/04 12:30:41-07:00 torvalds@ppc970.osdl.org +8 -3 # Be more careful about waking up rwsem waiters # # Get a reference count on the the sleeper, so that # it can't possibly go away before we've sent it the # wakeup event. # # Noted by Nick Piggin # David Howells # # ChangeSet # 2004/05/04 14:26:19-05:00 shaggy@austin.ibm.com # JFS: [CHECKER] get rid of txAbortCommit # # txAbortCommit is broken and fixing it makes it equivalent to txAbort, # so get rid of it and use txAbort instead. # # fs/jfs/jfs_txnmgr.c # 2004/05/04 14:26:03-05:00 shaggy@austin.ibm.com +1 -60 # kill txAbortCommit # # ChangeSet # 2004/05/04 14:20:12-05:00 shaggy@austin.ibm.com # JFS: [CHECKER] Memory leak in jfs_link # # fs/jfs/namei.c # 2004/05/04 14:19:56-05:00 shaggy@austin.ibm.com +5 -2 # Memory leak in jfs_link # # ChangeSet # 2004/05/04 12:19:26-07:00 hugh@veritas.com # [PATCH] add_to_page_cache comments # # Remove two layers of the fossil record from comments on add_to_page_cache: # 2.6.6 moves swapcache handling away, and we long ago stopped masking flags. # # mm/filemap.c # 2004/04/29 13:17:27-07:00 hugh@veritas.com +0 -6 # add_to_page_cache comments # # ChangeSet # 2004/05/04 12:19:15-07:00 hugh@veritas.com # [PATCH] mremap pte_unmap NULL # # Old bug noone seems to have hit, but mremap's pte_unmap dst might be # NULL: would get preempt count wrong even when not DEBUG_HIGHMEM. # # mm/mremap.c # 2004/04/29 13:15:44-07:00 hugh@veritas.com +2 -1 # mremap pte_unmap NULL # # ChangeSet # 2004/05/04 17:56:47+01:00 bjorn.helgaas@com.rmk.(none) # [SERIAL] default to serial console when possible # # Patch from Bjorn Helgaas # # This adds efi_uart_console_only() so we can default to using a serial # console if the EFI console path only contains UARTs. # # include/linux/efi.h # 2004/05/04 17:54:32+01:00 bjorn.helgaas@com.rmk.(none) +47 -0 # [PATCH] default to serial console when possible # # drivers/serial/8250_hcdp.c # 2004/05/04 17:54:32+01:00 bjorn.helgaas@com.rmk.(none) +8 -0 # [PATCH] default to serial console when possible # # arch/ia64/kernel/efi.c # 2004/05/04 17:54:31+01:00 bjorn.helgaas@com.rmk.(none) +44 -0 # [PATCH] default to serial console when possible # # ChangeSet # 2004/05/04 17:49:24+01:00 rmk@flint.arm.linux.org.uk # [ARM] Update mach-types file again. # # arch/arm/tools/mach-types # 2004/05/04 17:47:26+01:00 rmk@flint.arm.linux.org.uk +13 -3 # Update mach-types. # # ChangeSet # 2004/05/04 17:33:57+01:00 rmk@flint.arm.linux.org.uk # [ARM] Fix potential oops and kill unused variable warning in sa1111.c # # This fixes a potential oops/use after free bug, and removes an unused # variable warning. # # arch/arm/common/sa1111.c # 2004/05/04 17:31:58+01:00 rmk@flint.arm.linux.org.uk +2 -4 # Fix potential oops if dmabounce_register_dev fails. # Kill unused dma_mask warning # # ChangeSet # 2004/05/04 16:18:13+01:00 alex.williamson@com.rmk.(none) # [SERIAL] 8250_hcdp needs irq sharing # # Patch from Alex Williamson # # Here's a trivial patch that makes 8250_hcdp setup the correct flags # when IRQ sharing is enabled for serial ports. # # The HCDP table tells us if the device is a PCI UART. We can use this # to set the shared interrupt flag as well as program the interrupt with # the correct polarity/trigger (should get rid of "changing vector # from IO-SAPIC-edge to IO-SAPIC-level" messages at bootup). This also # allows non-PCI UARTs to be left un-shareable, which is likely much # more safe (edge triggered). # # The bit that I'm keying on is still part of the older 1.0a HCDP spec, # so should be implemented (it was on all the boxes I tested). If # there's firmware out there that doesn't set this bit or the interrupt # supported flag, the HCDP UART may run in polling mode, but should # still be functional. # # drivers/serial/8250_hcdp.h # 2004/05/04 16:16:18+01:00 alex.williamson@com.rmk.(none) +3 -0 # [PATCH] 8250_hcdp needs irq sharing # # drivers/serial/8250_hcdp.c # 2004/05/04 16:16:17+01:00 alex.williamson@com.rmk.(none) +17 -6 # [PATCH] 8250_hcdp needs irq sharing # # ChangeSet # 2004/05/04 07:57:39-07:00 paulus@samba.org # [PATCH] ppc32: Updated boot fix # # This fixes booting on some PPC32 machines, notably CHRP and powermac # machines. This is a modified version of Tom Rini's patch that addresses # the concerns I had with it. # # The problem was that the linker script was getting included in the list # of things that got put together to make some of the sorts of bootable # images that we produce. This removes ld.script in cases where it wasn't # appropriate and changes the rules in others so that although we have the # dependency on ld.script, it doesn't get included in the list of things # to link. # # arch/ppc/boot/openfirmware/Makefile # 2004/05/03 20:46:36-07:00 paulus@samba.org +12 -9 # ppc32: Updated boot fix # # ChangeSet # 2004/05/04 07:57:29-07:00 david@gibson.dropbear.id.au # [PATCH] ppc64: Use slbie, not slbia in hugepage code # # On PPC64, when we prepare segments below 4G for use with hugepages, we # need to flush their entries from the SLB, in case SLB entries # specifying normal pages were already present. # # Previously we did that by flushing the entire SLB, the patch below # changes this to individually flush each necessary segment with slbie. # The new version may well be slightly faster, but the real reason for # it is so that this code path doesn't need to be changed to reinstate # any bolted SLB entries, if we add them. The existing version has # already caused problems (read, crashes) when combined with some # patches that add bolted SLB entries. # # arch/ppc64/mm/hugetlbpage.c # 2004/05/04 03:07:00-07:00 david@gibson.dropbear.id.au +15 -4 # ppc64: Use slbie, not slbia in hugepage code # # ChangeSet # 2004/05/04 07:57:17-07:00 akpm@osdl.org # [PATCH] cancel_delayed_work() fix # # cancel_delayed_work() forgets to clear the workqueue's pending flag. This # makes the workqueue appear to be permanently busy, so any subsequent attempts # to use it will fail. # # include/linux/workqueue.h # 2004/05/03 20:53:14-07:00 akpm@osdl.org +7 -2 # cancel_delayed_work() fix # # ChangeSet # 2004/05/04 15:09:30+01:00 SKolodynski@com.rmk.(none) # [SERIAL] Add support for SBS Tech. Inc. PMC-OCTPRO and P-OCTAL cards. # # Patch from Slawomir Kolodynski # # drivers/serial/8250_pci.c # 2004/05/04 15:07:28+01:00 SKolodynski@com.rmk.(none) +167 -7 # Add support for SBS Technologies Inc. PMC-OCTPRO and P-OCTAL cards. # # ChangeSet # 2004/05/03 23:11:44-07:00 wesolows@foobazco.org # [SPARC32]: Reduce fragmentation in the bitmap allocator # # The existing allocator is first-fit with wraparound. This allows # a large number of small holes to accumulate in the early part of the # region, leading to heavy fragmentation. This adjusts the algorithm # to rescan the region when smaller sizes are requested, reducing # early fragmentation. # # include/asm-sparc/bitext.h # 2004/05/03 23:11:38-07:00 wesolows@foobazco.org +2 -0 # [SPARC32]: Reduce fragmentation in the bitmap allocator # # arch/sparc/lib/bitext.c # 2004/05/03 23:11:38-07:00 wesolows@foobazco.org +13 -1 # [SPARC32]: Reduce fragmentation in the bitmap allocator # # ChangeSet # 2004/05/03 22:54:53-07:00 wesolows@foobazco.org # [SPARC32]: Trivial reformatting patch for arch/sparc/mm/init.c # # From Art Haas # # arch/sparc/mm/init.c # 2004/05/03 22:54:47-07:00 wesolows@foobazco.org +2 -3 # [SPARC32]: Trivial reformatting patch for arch/sparc/mm/init.c # # From Art Haas # # ChangeSet # 2004/05/03 22:47:03-07:00 wesolows@foobazco.org # [SPARC32]: Correct calculation of num_physpages # # Previously num_physpages only took into consideration low memory. # Since nr_free_pages returned something much larger, the caches # init would oops. # # arch/sparc/mm/init.c # 2004/05/03 22:45:17-07:00 wesolows@foobazco.org +15 -5 # [SPARC32]: Correct calculation of num_physpages # # ChangeSet # 2004/05/03 11:17:48-07:00 sri@us.ibm.com # [SCTP] Rename SCTP_ADDR_REACHABLE as SCTP_ADDR_AVAILABLE to be # consistent with the SCTP sockets API draft. # # net/sctp/associola.c # 2004/05/03 11:17:29-07:00 sri@us.ibm.com +1 -1 # [SCTP] Rename SCTP_ADDR_REACHABLE as SCTP_ADDR_AVAILABLE to be # consistent with the SCTP sockets API draft. # # include/net/sctp/user.h # 2004/05/03 11:17:29-07:00 sri@us.ibm.com +2 -2 # [SCTP] Rename SCTP_ADDR_REACHABLE as SCTP_ADDR_AVAILABLE to be # consistent with the SCTP sockets API draft. # # include/net/sctp/constants.h # 2004/05/03 11:17:29-07:00 sri@us.ibm.com +0 -5 # [SCTP] Rename SCTP_ADDR_REACHABLE as SCTP_ADDR_AVAILABLE to be # consistent with the SCTP sockets API draft. # # ChangeSet # 2004/05/03 11:14:28-07:00 sri@us.ibm.com # [SCTP] Fix bugs in handling overlapping INIT and peer restart over a # multihomed association. # # net/sctp/associola.c # 2004/05/03 11:14:11-07:00 sri@us.ibm.com +19 -9 # [SCTP] Fix bugs in handling overlapping INIT and peer restart over a # multihomed association. # # ChangeSet # 2004/05/03 11:11:07-07:00 shemminger@osdl.org # [PATCH] SCTP crc table can be static const # # net/sctp/crc32c.c # 2004/04/29 07:45:24-07:00 sri@us.ibm.com +1 -1 # SCTP crc table can be static const # # ChangeSet # 2004/05/02 22:31:59-07:00 rusty@rustcorp.com.au # [NET]: Fix MODULE_PARM_DESC typo in dummy driver. # # drivers/net/dummy.c # 2004/05/02 22:31:47-07:00 rusty@rustcorp.com.au +1 -1 # [NET]: Fix MODULE_PARM_DESC typo in dummy driver. # # ChangeSet # 2004/05/02 13:06:12-07:00 torvalds@ppc970.osdl.org # Be more careful about semaphore contention memory ordering. # # Don't touch the wakee stack after marking it runnable. # # lib/rwsem.c # 2004/05/02 13:06:07-07:00 torvalds@ppc970.osdl.org +11 -6 # Be more careful about semaphore contention memory ordering. # # Don't touch the wakee stack after marking it runnable. # # lib/rwsem-spinlock.c # 2004/05/02 13:06:07-07:00 torvalds@ppc970.osdl.org +17 -9 # Be more careful about semaphore contention memory ordering. # # Don't touch the wakee stack after marking it runnable. # # ChangeSet # 2004/05/02 13:04:40-07:00 torvalds@ppc970.osdl.org # Make types of big integers in bitops.h explicit. # # "sparse" warns about implicit type conversions that may cause # surprising results. Did you know that large decimal types have # different type conversions from large hexadecimals? # # include/linux/bitops.h # 2004/05/02 13:04:34-07:00 torvalds@ppc970.osdl.org +6 -6 # Make types of big integers in bitops.h explicit. # # "sparse" warns about implicit type conversions that may cause # surprising results. Did you know that large decimal types have # different type conversions from large hexadecimals? # # ChangeSet # 2004/05/02 20:47:52+01:00 rmk@flint.arm.linux.org.uk # [SERIAL] Fix the calculation of the number of UARTs # # The calculation ended up believing we had one less UART than we # really had. Fix it. # # drivers/serial/8250_pci.c # 2004/05/02 20:45:55+01:00 rmk@flint.arm.linux.org.uk +1 -1 # The calculation of the maximum number of uarts was incorrect; we # end up with one less uart than we really have. Fix it. # # ChangeSet # 2004/05/02 11:26:25-07:00 hirofumi@mail.parknet.co.jp # [PATCH] FAT: remove symbols exports from msdosfs/vfat # # From Christoph Hellwig # # If we're ever going to ressurect umsdos it should be a stackable # filesystem.. # # include/linux/msdos_fs.h # 2004/05/02 03:15:47-07:00 hirofumi@mail.parknet.co.jp +0 -23 # FAT: remove symbols exports from msdosfs/vfat # # fs/vfat/namei.c # 2004/05/02 03:15:47-07:00 hirofumi@mail.parknet.co.jp +41 -12 # FAT: remove symbols exports from msdosfs/vfat # # fs/vfat/Makefile # 2004/05/02 03:15:47-07:00 hirofumi@mail.parknet.co.jp +1 -1 # FAT: remove symbols exports from msdosfs/vfat # # fs/msdos/namei.c # 2004/05/02 03:15:47-07:00 hirofumi@mail.parknet.co.jp +41 -15 # FAT: remove symbols exports from msdosfs/vfat # # fs/msdos/Makefile # 2004/05/02 03:15:47-07:00 hirofumi@mail.parknet.co.jp +1 -1 # FAT: remove symbols exports from msdosfs/vfat # # BitKeeper/deleted/.del-vfatfs_syms.c~6fb67530726bf026 # 2004/05/02 11:26:19-07:00 hirofumi@mail.parknet.co.jp +0 -0 # Delete: fs/vfat/vfatfs_syms.c # # BitKeeper/deleted/.del-msdosfs_syms.c~5dd4f87bd1b8ff9f # 2004/05/02 11:26:19-07:00 hirofumi@mail.parknet.co.jp +0 -0 # Delete: fs/msdos/msdosfs_syms.c # # ChangeSet # 2004/05/02 11:26:13-07:00 hirofumi@mail.parknet.co.jp # [PATCH] FAT: small cleanup # # fs/fat/misc.c # 2004/05/02 03:15:43-07:00 hirofumi@mail.parknet.co.jp +1 -1 # FAT: small cleanup # # fs/fat/file.c # 2004/05/02 03:15:43-07:00 hirofumi@mail.parknet.co.jp +1 -1 # FAT: small cleanup # # ChangeSet # 2004/05/02 11:26:03-07:00 hirofumi@mail.parknet.co.jp # [PATCH] FAT: simple error handling cleanup # # From: René Scharfe # # the following patch converts the error handling paths in VFAT fs to use # goto, making it more consistent with other filesystem code. Shrinks the # resulting binary by 144 bytes in my build. # # fs/vfat/namei.c # 2004/05/02 03:15:39-07:00 hirofumi@mail.parknet.co.jp +23 -30 # FAT: simple error handling cleanup # # ChangeSet # 2004/05/02 11:25:52-07:00 hirofumi@mail.parknet.co.jp # [PATCH] FAT: Fix nfsv2 support # # The ->dentry_to_fh() can use the 20 bytes in the case of NFSv2, but # fat_dentry_to_fh() requires 24 bytes by my patch. # # So nfsd reply the EOPNOTSUPP to nfs client, then nfs client convert # the unknown error to -EIO. # # This patch fixes the problem by pushing the handle data into 20 bytes. # # fs/fat/inode.c # 2004/05/02 03:15:34-07:00 hirofumi@mail.parknet.co.jp +26 -16 # FAT: Fix nfsv2 support # # ChangeSet # 2004/05/02 11:13:48-05:00 stevef@steveft21.ltcsamba # do not refresh mode (e.g. in revalidate) to windows servers # # fs/cifs/inode.c # 2004/05/02 11:13:29-05:00 stevef@steveft21.ltcsamba +11 -5 # do not refresh mode (e.g. in revalidate) to windows servers # # fs/cifs/file.c # 2004/05/02 11:13:28-05:00 stevef@steveft21.ltcsamba +13 -6 # do not refresh mode (e.g. in revalidate) to windows servers # # ChangeSet # 2004/05/02 08:53:52-05:00 stevef@steveft21.ltcsamba # reduce excessive stack space usage in smb password hashing # # fs/cifs/smbdes.c # 2004/05/02 08:53:31-05:00 stevef@steveft21.ltcsamba +44 -14 # reduce excessive stack space usage in smb password hashing # # fs/cifs/CHANGES # 2004/05/02 08:53:31-05:00 stevef@steveft21.ltcsamba +2 -1 # update change log # # ChangeSet # 2004/05/01 22:12:12-05:00 stevef@smfhome.smfdom # even if O_CREAT specified do not reset mode when file not actually created # # ChangeSet # 2004/05/02 03:33:19-05:00 stevef@steveft21.ltcsamba # fix ppc64 build problem due to missing header # # fs/cifs/file.c # 2004/05/01 22:09:30-05:00 stevef@smfhome.smfdom +13 -10 # even if O_CREAT specified do not reset mode when file not actually created # # fs/cifs/connect.c # 2004/05/01 22:09:30-05:00 stevef@smfhome.smfdom +3 -2 # debug message cleanup # # fs/cifs/file.c # 2004/05/02 03:32:56-05:00 stevef@steveft21.ltcsamba +25 -6 # add defensive code for cifs_write to handle close overlapping write retry # # fs/cifs/connect.c # 2004/05/02 03:32:56-05:00 stevef@steveft21.ltcsamba +1 -0 # fix ppc64 build problem due to missing header # # fs/cifs/dir.c # 2004/05/01 22:09:30-05:00 stevef@smfhome.smfdom +24 -32 # even if O_CREAT specified do not reset mode when file not actually created # # fs/cifs/cifssmb.c # 2004/05/01 22:09:30-05:00 stevef@smfhome.smfdom +6 -3 # even if O_CREAT specified do not reset mode when file not actually created # # fs/cifs/cifspdu.h # 2004/05/01 22:09:29-05:00 stevef@smfhome.smfdom +3 -0 # even if O_CREAT specified do not reset mode when file not actually created # # fs/cifs/cifsfs.h # 2004/05/01 22:09:29-05:00 stevef@smfhome.smfdom +2 -1 # add module version string to cifs module # # fs/cifs/cifsfs.c # 2004/05/01 22:09:29-05:00 stevef@smfhome.smfdom +2 -1 # add module version string to cifs module # # fs/cifs/CHANGES # 2004/05/01 22:09:29-05:00 stevef@smfhome.smfdom +6 -0 # update cifs change log # # ChangeSet # 2004/05/01 19:53:15-07:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] mcdx.c insanity removal # # The mcdx.c author had pulled off something absolutely amazing - he had # declared several unsigned variables (ISA port numbers) as void *, using # explicit cast to unsigned in almost all places that used them. # Exception: printk. There he proudly used them as pointers - with %3p in # format. That cute trick allowed him to avoid using %03x, which # apparently scared him for some reason. # # Switched to use of unsigned, killed casts, replaced %3p with %03x in # formats. BTW, the code had been that way since the initial merge back # in 1.3.7... # # drivers/cdrom/mcdx.c # 2004/05/01 15:35:29-07:00 viro@parcelfarce.linux.theplanet.co.uk +39 -54 # mcdx.c insanity removal # # ChangeSet # 2004/05/01 19:10:20-07:00 paulus@samba.org # [PATCH] ppc64: fix incorrect signal handler argument # # This fixes a bug in the ppc64 signal delivery code where the signal # number argument to a signal handler can get corrupted before the handler # is called. The specific scenario is that a process is in a blocking # system call when two signals get generated for it, both of which have # handlers. # # The signal code will stack up two signal frames on the process stack # (assuming the mask for the first signal delivered doesn't block the # second signal) and return to userspace to run the handler for the second # signal. On return from that handler the first handler gets run with an # incorrect signal number argument because we end up with regs->result # still having a negative value (left over from when the system call was # interrupted) when it should be zero. This patch sets it to zero when we # set up the signal frame (in three places; for 64-bit processes, and for # 32-bit processes for RT and non-RT signals). # # The way we handle signal delivery and signal handler return using the # regs->result field in ppc64 is more complicated than it needs to be. In # ppc32 I have already simplified it and eliminated use of the # regs->result field. I am going to do the same in the ppc64 code, but I # think this patch should go in for now to fix the bug. # # The patch also fixes a couple of places where we were unnecessarily and # incorrectly truncating the regs->result value to 32 bits # (sys32_sigreturn and sys32_rt_sigreturn return a long value, as all # syscalls do, and if regs->result is negative we need those syscalls to # return a negative value). # # Thanks to Maneesh Soni for identifying the specific circumstances # under which this bug shows up. # # arch/ppc64/kernel/signal32.c # 2004/05/01 05:51:32-07:00 paulus@samba.org +2 -2 # ppc64: fix incorrect signal handler argument # # arch/ppc64/kernel/signal.c # 2004/05/01 03:43:40-07:00 paulus@samba.org +1 -0 # ppc64: fix incorrect signal handler argument # # ChangeSet # 2004/05/01 17:39:13-07:00 herbert@gondor.apana.org.au # [IPV4/IPV6]: Fix listing of listening sockets. # # There is a bug in listening_get_first() which used by /proc/net/tcp* # where it wasn't looping through all the sockets in each hash chain. # This problem doesn't show up unless the first socket in a chain doesn't # match the family that is being looked up. # # The following patch fixes this by getting rid of listening_get_first() # altogether. # # net/ipv4/tcp_ipv4.c # 2004/05/01 17:38:53-07:00 herbert@gondor.apana.org.au +7 -41 # [IPV4/IPV6]: Fix listing of listening sockets. # # There is a bug in listening_get_first() which used by /proc/net/tcp* # where it wasn't looping through all the sockets in each hash chain. # This problem doesn't show up unless the first socket in a chain doesn't # match the family that is being looked up. # # The following patch fixes this by getting rid of listening_get_first() # altogether. # # ChangeSet # 2004/05/01 17:32:45-07:00 vda@port.imtp.ilyichevsk.odessa.ua # [PATCH] add missing #include # # There's a subtle problem with "inline" usage in : # # : # this pulls in __constant_c_and_count_memset() # # : # this pulls , re-defining # inline == __inline__ __attribute__((always_inline)). # # But by now it is too late! The compiler has already seen the bare # "inline" in string.h, and hasn't inlined it. # # Result: # # # grep __constant System.map # c0144670 t __constant_c_and_count_memset # c0145c60 t __constant_c_and_count_memset # ... many more copies of this function ... # # Fixed by including early enough. # # include/linux/string.h # 2004/04/21 02:17:32-07:00 vda@port.imtp.ilyichevsk.odessa.ua +1 -0 # add missing #include # # ChangeSet # 2004/05/01 15:01:22-07:00 cifs.adm@hostme.bitkeeper.com # Merge bk://linux.bkbits.net/linux-2.5 # into hostme.bitkeeper.com:/repos/c/cifs/linux-2.5cifs # # fs/cifs/cifssmb.c # 2004/05/01 15:01:16-07:00 cifs.adm@hostme.bitkeeper.com +0 -0 # Auto merged # # ChangeSet # 2004/05/01 11:02:13-07:00 rth@kanga.twiddle.home # [ALPHA] Add message queue syscalls. # # include/asm-alpha/unistd.h # 2004/05/01 11:01:54-07:00 rth@kanga.twiddle.home +12 -1 # Add message queue syscalls. # # arch/alpha/kernel/systbls.S # 2004/05/01 11:01:54-07:00 rth@kanga.twiddle.home +10 -0 # Add message queue syscalls. # # ChangeSet # 2004/05/01 09:11:44-07:00 B.Zolnierkiewicz@elka.pw.edu.pl # [PATCH] serverworks.c: fix DMA for OSB4 # # From: Patrick Wildi # # On OSB4 the hwif->ultra_mask is set to not support UDMA. # Unfortunately in that case svwks_config_drive_xfer_rate() # falls through to the end of the function, instead of trying # other DMA modes. # # drivers/ide/pci/serverworks.c # 2004/04/30 15:00:38-07:00 B.Zolnierkiewicz@elka.pw.edu.pl +3 -1 # serverworks.c: fix DMA for OSB4 # # ChangeSet # 2004/04/30 21:28:54-07:00 torvalds@ppc970.osdl.org # Fix fixed fadvice length handling # # - Correctly handle wraparound on offset+len # - fix FADV_WILLNEED handling of non-page-aligned (offset+len) # # Let's hope we don't need to fix the fixed fix. # # mm/fadvise.c # 2004/04/30 21:28:49-07:00 torvalds@ppc970.osdl.org +25 -7 # Fix fixed fadvice length handling # # - Correctly handle wraparound on offset+len # - fix FADV_WILLNEED handling of non-page-aligned (offset+len) # # Let's hope we don't need to fix the fixed fix. # # ChangeSet # 2004/04/30 21:09:43-07:00 akpm@osdl.org # [PATCH] usb linkage fix # # On sparc64 toolchain: # # drivers/built-in.o(.init.text+0xaf8c): In function `usb_init': # : undefined reference to `usbfs_cleanup' # # usb_init() is __init and usbfs_cleanup() is __exit. No can do. # # drivers/usb/core/inode.c # 2004/04/30 20:37:56-07:00 akpm@osdl.org +1 -1 # usb linkage fix # # ChangeSet # 2004/04/30 14:51:54-07:00 akpm@osdl.org # [PATCH] task_struct alignment fix # # The recent slab alignment changes broke an unknown number of architectures # (parisc and x86_64 for sure) by causing task_structs to be insufficiently # aligned. # # We need good alignemnt because architectures do things like dumping FP state # into the task_struct with instructions which require particular alignment (I # think). # # So change the default alignment to L1_CACHE_BYTES, which is what we used to # have, via SLAB_HW_CACHE_ALIGN. # # kernel/fork.c # 2004/04/30 06:32:48-07:00 akpm@osdl.org +1 -1 # task_struct alignment fix # # drivers/mtd/mtdconcat.c # 2004/04/30 13:22:05-07:00 rmk@arm.linux.org.uk +400 -399 # Update MTD concatenating driver # # ChangeSet # 2004/04/30 20:59:26+01:00 nico@org.rmk.(none) # [ARM PATCH] 1841/1: Lubbock defconfig update # # Patch from Nicolas Pitre # # # arch/arm/configs/lubbock_defconfig # 2004/04/30 03:47:13+01:00 nico@org.rmk.(none) +277 -420 # [PATCH] 1841/1: Lubbock defconfig update # # ChangeSet # 2004/04/30 20:55:03+01:00 nico@org.rmk.(none) # [ARM PATCH] 1840/1: recognize more XScale CPU variants # # Patch from Nicolas Pitre # # ... including the new PXA270 aka Bulverde. # # arch/arm/mm/proc-xscale.S # 2004/04/28 21:29:17+01:00 nico@org.rmk.(none) +43 -1 # [PATCH] 1840/1: recognize more XScale CPU variants # # ChangeSet # 2004/04/30 20:51:18+01:00 nico@org.rmk.(none) # [ARM PATCH] 1839/1: fix lubbock_flash.c which used a bogus reg name # # Patch from Nicolas Pitre # # Before previous patch this driver compiled OK but was buggy. # Now it doesn't compile anymore as the bogus macro has been # deleted. Fix that in any case. # # The same fix has been committed to the MTD CVS already, but please forward # this to Linus otherwise Lubbock won't compile from kernel.org tree anymore # (waiting for dwmw2 to update this might prove ... hrm ... long) # # drivers/mtd/maps/lubbock-flash.c # 2004/04/30 03:39:03+01:00 nico@org.rmk.(none) +1 -1 # [PATCH] 1839/1: fix lubbock_flash.c which used a bogus reg name # # ChangeSet # 2004/04/30 20:47:10+01:00 nico@org.rmk.(none) # [ARM PATCH] 1838/1: Lubbock leds and macro namespace cleanup # # Patch from Nicolas Pitre # # Too many macro with too generic names. Let's remove unneeded code and # redundant/unused macros. This also prevent namespace clash with upcoming # patches. # # include/asm-arm/arch-pxa/lubbock.h # 2004/04/29 21:16:17+01:00 nico@org.rmk.(none) +12 -87 # [PATCH] 1838/1: Lubbock leds and macro namespace cleanup # # arch/arm/mach-pxa/leds-lubbock.c # 2004/04/29 21:23:42+01:00 nico@org.rmk.(none) +33 -43 # [PATCH] 1838/1: Lubbock leds and macro namespace cleanup # # ChangeSet # 2004/04/30 20:43:05+01:00 nico@org.rmk.(none) # [ARM PATCH] 1837/1: small Lubbock cleanup # # Patch from Nicolas Pitre # # Minor cleanup of Lubbock specific code, like removal of # redundant mappings. # Also a prerequisite for some upcoming patches. # # arch/arm/mach-pxa/lubbock.c # 2004/04/30 16:21:59+01:00 nico@org.rmk.(none) +2 -8 # [PATCH] 1837/1: small Lubbock cleanup # # ChangeSet # 2004/04/30 20:39:17+01:00 nico@org.rmk.(none) # [ARM PATCH] 1836/1: don't hardcode virtual addresses # # Patch from Nicolas Pitre # # virtual address mapping can change. # # ChangeSet # 2004/04/30 12:37:45-07:00 rmk@arm.linux.org.uk # [PATCH] Update MTD concatenating driver # # This patch updates the MTD concatenating driver from MTD CVS, which # fixes issues found with this driver which concatenates multiple MTD # devices into one MTD device. # # From David Woodhouse, through CVS: # # revision 1.8 # date: 2003/06/30 11:01:26; author: dwmw2; state: Exp; lines: +5 -5 # I will not commit stuff whilst pissed # I will not commit stuff whilst pissed # # revision 1.7 # date: 2003/06/29 21:26:34; author: dwmw2; state: Exp; lines: +9 -9 # Fix ecc/oob subdev comparisions # # revision 1.6 # date: 2003/06/25 12:37:50; author: dwmw2; state: Exp; lines: +14 -6 # Don't pretend to have {read,write}_{oob,ecc} functions if subdevices don't # # revision 1.5 # date: 2003/06/25 12:21:16; author: dwmw2; state: Exp; lines: +390 -397 # coding style cleanup # # arch/arm/mach-pxa/idp.c # 2004/04/28 04:04:11+01:00 nico@org.rmk.(none) +1 -1 # [PATCH] 1836/1: don't hardcode virtual addresses # # ChangeSet # 2004/04/30 14:08:29-05:00 shaggy@austin.ibm.com # JFS: [CHECKER] Fix a possible null-pointer dereference # # fs/jfs/jfs_dtree.c # 2004/04/30 14:08:12-05:00 shaggy@austin.ibm.com +6 -1 # need to check for null pointer # # ChangeSet # 2004/04/30 10:26:18-07:00 davidm@tiger.hpl.hp.com # Cset exclude: davidm@tiger.hpl.hp.com|ChangeSet|20040427053149|28511 # # arch/ia64/kernel/smp.c # 2004/04/30 10:26:15-07:00 davidm@tiger.hpl.hp.com +0 -0 # Exclude # # ChangeSet # 2004/04/30 07:42:49-07:00 akpm@osdl.org # [PATCH] fadvise length handling fix # # POSIX sez: "If len is zero, all data following offset is specified." # # mm/fadvise.c # 2004/04/30 00:59:03-07:00 akpm@osdl.org +3 -0 # fadvise length handling fix # # ChangeSet # 2004/04/30 07:42:38-07:00 akpm@osdl.org # [PATCH] ppc64: shmget() translation bugfix # # From: David Gibson # # The 32->64 bit syscall translation layer on ppc64 incorrectly sign- # extends rather than zero-extending the second parameter to shmget(), # which should be a size_t. This means that it is impossible to shmget() # more 2GB or more from a 32-bit process. # # arch/ppc64/kernel/sys_ppc32.c # 2004/04/29 23:01:44-07:00 akpm@osdl.org +1 -1 # ppc64: shmget() translation bugfix # # ChangeSet # 2004/04/30 07:42:26-07:00 akpm@osdl.org # [PATCH] make ikconfig quiet # # From: "Randy.Dunlap" # # From: Pavel Machek # # Kill uninformative boot-time message. # # kernel/configs.c # 2004/04/29 08:59:04-07:00 akpm@osdl.org +0 -3 # make ikconfig quiet # # ChangeSet # 2004/04/30 07:42:14-07:00 akpm@osdl.org # [PATCH] s390: oprofile Kconfig fixes # # From: Arnd Bergmann # # Enable basic profiling code on s390 depending on CONFIG_PROFILING, not # CONFIG_OPROFILE. # # CONFIG_PROFILING should enable the generic profiling code here, even if # CONFIG_OPROFILE is not set. Note that the identical code on i386 is always # compiled in, regardless of CONFIG_PROFILING and CONFIG_OPROFILE. # # arch/s390/oprofile/Kconfig # 2004/04/29 08:56:38-07:00 akpm@osdl.org +2 -2 # s390: oprofile Kconfig fixes # # arch/s390/kernel/time.c # 2004/04/29 08:56:38-07:00 akpm@osdl.org +2 -2 # s390: oprofile Kconfig fixes # # ChangeSet # 2004/04/30 07:42:01-07:00 akpm@osdl.org # [PATCH] DVB:Fix adapter module removal bug # # From: Michael Hunold # # unfortunately it's possible to remove a DVB adapter module even if a DVB # network device has been set up using this adapter. # # The attached patch fixes this problem. # # drivers/media/dvb/dvb-core/dvb_net.c # 2004/04/29 08:49:26-07:00 akpm@osdl.org +15 -2 # DVB:Fix adapter module removal bug # # ChangeSet # 2004/04/30 07:41:49-07:00 akpm@osdl.org # [PATCH] efivars sysfs fix # # From: Matt Tolentino # # This trailing space in sysfs contents is not needed. # # drivers/firmware/efivars.c # 2004/04/29 17:37:40-07:00 akpm@osdl.org +0 -1 # efivars sysfs fix # # ChangeSet # 2004/04/30 07:41:36-07:00 akpm@osdl.org # [PATCH] nfs printk warning fix # # From: Trond Myklebust # # fs/nfs/direct.c: In function `nfs_direct_IO': # fs/nfs/direct.c:458: warning: int format, different type arg (arg 2) # # fs/nfs/direct.c # 2004/04/29 09:21:40-07:00 akpm@osdl.org +1 -1 # nfs printk warning fix # # ChangeSet # 2004/04/29 22:17:22-07:00 akpm@osdl.org # [PATCH] parport pnp detection fix # # From: Adam Belay # # Fix http://bugme.osdl.org/show_bug.cgi?id=2540 # # It prevents PnP detection if devices were already detected by SuperIO. # # drivers/parport/parport_pc.c # 2004/04/29 22:17:16-07:00 akpm@osdl.org +7 -4 # parport pnp detection fix # # ChangeSet # 2004/04/29 22:17:01-07:00 trond.myklebust@fys.uio.no # [PATCH] NFSv3: Fix SETATTR call after O_EXCL create # # Ensure that when we send the SETATTR call after doing an O_EXCL create, # we always set the atime and ctime fields. # # See RFC1813 for details on why the server is allowed to clobber these # two fields in order to cache a verifier that protects CREATE in case of # a timeout+resend from the client. # # Patch is by Olaf Kirch. # # fs/nfs/nfs3proc.c # 2004/04/20 14:14:11-07:00 trond.myklebust@fys.uio.no +5 -0 # NFSv3: Fix SETATTR call after O_EXCL create # # ChangeSet # 2004/04/29 16:26:49-07:00 shemminger@osdl.org # [NET]: More network layer static funcs and data. # # net/ipv6/ndisc.c # 2004/04/29 16:26:35-07:00 shemminger@osdl.org +1 -1 # [NET]: More network layer static funcs and data. # # net/ipv6/af_inet6.c # 2004/04/29 16:26:35-07:00 shemminger@osdl.org +1 -1 # [NET]: More network layer static funcs and data. # # net/ipv4/route.c # 2004/04/29 16:26:35-07:00 shemminger@osdl.org +3 -3 # [NET]: More network layer static funcs and data. # # net/core/neighbour.c # 2004/04/29 16:26:35-07:00 shemminger@osdl.org +1 -1 # [NET]: More network layer static funcs and data. # # ChangeSet # 2004/04/29 15:15:15-07:00 pfg@sgi.com # [PATCH] ia64: SN2 fix # # Move HW interrupt register init. to the proper place # and don't force an interrupt if the IRQ is disabled # or in progress. # # arch/ia64/sn/kernel/irq.c # 2004/04/28 09:20:53-07:00 pfg@sgi.com +5 -1 # ia64: SN2 fix # # arch/ia64/sn/io/machvec/pci_bus_cvlink.c # 2004/04/28 09:20:53-07:00 pfg@sgi.com +0 -5 # ia64: SN2 fix # # arch/ia64/sn/io/io.c # 2004/04/28 09:20:53-07:00 pfg@sgi.com +4 -0 # ia64: SN2 fix # # ChangeSet # 2004/04/29 15:14:05-07:00 davidm@tiger.hpl.hp.com # ia64: Fix Exec-Only stack patch so X can work again. # # No pun intended, but X can't work if it can't turn on eXecute-permission # on the some data pages... # # include/asm-ia64/pgtable.h # 2004/04/29 15:13:58-07:00 davidm@tiger.hpl.hp.com +2 -2 # (__P110): Replace PAGE_COPY with PAGE_COPY_EXEC. # (__P111): Likewise. # # ChangeSet # 2004/04/29 14:13:28-07:00 hugh@veritas.com # [PATCH] mremap offset type # # Just found I never changed type of move_page_tables when I changed it to # return offset: einormous mremap moves would fail on 64-bit. # # mm/mremap.c # 2004/04/29 13:15:44-07:00 hugh@veritas.com +1 -1 # mremap offset type # # ChangeSet # 2004/04/29 07:21:10-07:00 akpm@osdl.org # [PATCH] writeback livelock fix # # To avoid various livelocks, the writeback code parks all the dirty inodes onto # sb->s_io and then works through that list until it is empty. This assumes # that each inode will be moved to some other list as it is processed. # # But there's a loophole: if the ->writepages() implementation does nothing at # all, the inode is not redirtied (which would move it to s_dirty). This causes # s_io to not empty and pdflush goes nuts. # # So when this happens, move the inode onto s_dirty within # __sync_single_inode(). Use list_move_tail() to attempt to preserve the # time-ordering of the s_dirty list. # # fs/fs-writeback.c # 2004/04/29 02:43:55-07:00 akpm@osdl.org +5 -3 # writeback livelock fix # # ChangeSet # 2004/04/29 07:20:56-07:00 akpm@osdl.org # [PATCH] gcc-3.4.0 fixes # # From: Mikael Pettersson # # This patch fixes three warnings from gcc-3.4.0 in 2.6.6-rc3: # # - arch/i386/pci/pcbios.c: use of "+m" constraint # # - drivers/char/ftape/: use of cast-as-lvalue # # - drivers/char/ftape/: __attribute__((packed)) on something containing only # bytes # # drivers/char/ftape/zftape/zftape-eof.c # 2004/04/29 02:41:09-07:00 akpm@osdl.org +1 -1 # gcc-3.4.0 fixes # # drivers/char/ftape/lowlevel/ftape-bsm.h # 2004/04/29 02:41:09-07:00 akpm@osdl.org +1 -1 # gcc-3.4.0 fixes # # drivers/char/ftape/lowlevel/ftape-bsm.c # 2004/04/29 02:41:09-07:00 akpm@osdl.org +4 -2 # gcc-3.4.0 fixes # # arch/i386/pci/pcbios.c # 2004/04/29 02:41:09-07:00 akpm@osdl.org +4 -2 # gcc-3.4.0 fixes # # ChangeSet # 2004/04/29 07:20:44-07:00 akpm@osdl.org # [PATCH] Fix support for the Motorola PrPMC800 # # From: Tom Rini # # Makes the Motorola PrPMC800 platform functional again. This comes from Randy # Vinson . # # include/linux/harrier_defs.h # 2004/04/29 07:20:38-07:00 akpm@osdl.org +212 -0 # # arch/ppc/platforms/prpmc800.c # 2004/04/29 07:20:38-07:00 akpm@osdl.org +481 -0 # # include/linux/pci_ids.h # 2004/04/29 02:41:09-07:00 akpm@osdl.org +1 -0 # Fix support for the Motorola PrPMC800 # # include/linux/harrier_defs.h # 2004/04/29 07:20:38-07:00 akpm@osdl.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/linux/harrier_defs.h # # include/asm-ppc/harrier.h # 2004/04/29 02:41:09-07:00 akpm@osdl.org +18 -73 # Fix support for the Motorola PrPMC800 # # arch/ppc/syslib/harrier.c # 2004/04/29 02:41:09-07:00 akpm@osdl.org +147 -57 # Fix support for the Motorola PrPMC800 # # arch/ppc/syslib/Makefile # 2004/04/29 02:41:09-07:00 akpm@osdl.org +2 -2 # Fix support for the Motorola PrPMC800 # # arch/ppc/platforms/prpmc800.h # 2004/04/29 02:41:09-07:00 akpm@osdl.org +27 -15 # Fix support for the Motorola PrPMC800 # # arch/ppc/platforms/prpmc800.c # 2004/04/29 07:20:38-07:00 akpm@osdl.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/platforms/prpmc800.c # # arch/ppc/platforms/Makefile # 2004/04/29 02:41:09-07:00 akpm@osdl.org +1 -1 # Fix support for the Motorola PrPMC800 # # arch/ppc/configs/prpmc800_defconfig # 2004/04/29 02:41:09-07:00 akpm@osdl.org +219 -163 # Fix support for the Motorola PrPMC800 # # arch/ppc/Kconfig # 2004/04/29 02:41:09-07:00 akpm@osdl.org +14 -1 # Fix support for the Motorola PrPMC800 # # BitKeeper/deleted/.del-prpmc800_setup.c~5ca527a2f23673da # 2004/04/29 07:20:38-07:00 akpm@osdl.org +0 -0 # Delete: arch/ppc/platforms/prpmc800_setup.c # # BitKeeper/deleted/.del-prpmc800_pci.c~9dd04a0b3ae0656a # 2004/04/29 07:20:38-07:00 akpm@osdl.org +0 -0 # Delete: arch/ppc/platforms/prpmc800_pci.c # # ChangeSet # 2004/04/29 07:20:22-07:00 akpm@osdl.org # [PATCH] static functions in as-iosched.c # # From: Stephen Hemminger # # drivers/block/as-iosched.c # 2004/04/29 02:41:09-07:00 akpm@osdl.org +2 -2 # static functions in as-iosched.c # # ChangeSet # 2004/04/29 07:20:11-07:00 akpm@osdl.org # [PATCH] s390: oprofile for s390 # # From: Martin Schwidefsky # # Add oprofile support for s/390. # # arch/s390/oprofile/init.c # 2004/04/29 02:41:09-07:00 akpm@osdl.org +26 -0 # s390: oprofile for s390 # # arch/s390/oprofile/Makefile # 2004/04/29 02:41:09-07:00 akpm@osdl.org +9 -0 # s390: oprofile for s390 # # arch/s390/oprofile/Kconfig # 2004/04/29 02:41:09-07:00 akpm@osdl.org +23 -0 # s390: oprofile for s390 # # include/asm-s390/unistd.h # 2004/04/29 02:41:09-07:00 akpm@osdl.org +1 -0 # s390: oprofile for s390 # # drivers/s390/cio/cio.c # 2004/04/29 02:41:09-07:00 akpm@osdl.org +0 -9 # s390: oprofile for s390 # # arch/s390/oprofile/init.c # 2004/04/29 02:41:09-07:00 akpm@osdl.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/s390/oprofile/init.c # # arch/s390/oprofile/Makefile # 2004/04/29 02:41:09-07:00 akpm@osdl.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/s390/oprofile/Makefile # # arch/s390/oprofile/Kconfig # 2004/04/29 02:41:09-07:00 akpm@osdl.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/s390/oprofile/Kconfig # # arch/s390/kernel/time.c # 2004/04/29 02:41:09-07:00 akpm@osdl.org +50 -0 # s390: oprofile for s390 # # arch/s390/kernel/syscalls.S # 2004/04/29 02:41:09-07:00 akpm@osdl.org +1 -1 # s390: oprofile for s390 # # arch/s390/kernel/profile.c # 2004/04/29 02:41:09-07:00 akpm@osdl.org +56 -0 # s390: oprofile for s390 # # arch/s390/kernel/compat_wrapper.S # 2004/04/29 02:41:09-07:00 akpm@osdl.org +8 -0 # s390: oprofile for s390 # # arch/s390/kernel/Makefile # 2004/04/29 02:41:09-07:00 akpm@osdl.org +1 -1 # s390: oprofile for s390 # # arch/s390/defconfig # 2004/04/29 02:41:09-07:00 akpm@osdl.org +5 -0 # s390: oprofile for s390 # # arch/s390/Makefile # 2004/04/29 02:41:09-07:00 akpm@osdl.org +3 -0 # s390: oprofile for s390 # # arch/s390/Kconfig # 2004/04/29 02:41:09-07:00 akpm@osdl.org +1 -0 # s390: oprofile for s390 # # arch/s390/kernel/profile.c # 2004/04/29 02:41:09-07:00 akpm@osdl.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/s390/kernel/profile.c # # ChangeSet # 2004/04/29 07:19:55-07:00 akpm@osdl.org # [PATCH] s390: zfcp host adapter # # From: Martin Schwidefsky # # zfcp host adapter change: # - Fix addressing exception due to uninitialized host_scribble pointer. # # drivers/s390/scsi/zfcp_scsi.c # 2004/04/29 02:41:09-07:00 akpm@osdl.org +2 -2 # s390: zfcp host adapter # # ChangeSet # 2004/04/29 07:19:43-07:00 akpm@osdl.org # [PATCH] s390: 3270 console driver # # From: Martin Schwidefsky # # 3270 device driver change: # - Add missing irb error checking. # # drivers/s390/char/raw3270.c # 2004/04/29 02:41:08-07:00 akpm@osdl.org +4 -2 # s390: 3270 console driver # # ChangeSet # 2004/04/29 07:19:30-07:00 akpm@osdl.org # [PATCH] s390: network driver # # From: Martin Schwidefsky # # Network driver changes: # - ctc: Add missing irb error checking. # - iucv: Add name of net_device to iucvMagic to more than one # connection between two guests. # - qeth: Don't send IPA command if card is not in state SOFTSETUP or UP. # - qeth: Fix number base in simple_strtoul call for buffer_count attribute. # - qeth: Fix reallocating of buffers when buffer_count attribute is changed. # - qeth: Correct handling of return codes in qeth_realloc_buffer_pool. # - qeth: Don't call dev_close/dev_open on STOPLAN/STARTLAN commands. # Use netif_carrier_off/netif_carrier_on instead. # # drivers/s390/net/qeth_sys.c # 2004/04/29 02:41:08-07:00 akpm@osdl.org +32 -46 # s390: network driver # # drivers/s390/net/qeth_main.c # 2004/04/29 02:41:08-07:00 akpm@osdl.org +149 -60 # s390: network driver # # drivers/s390/net/qeth.h # 2004/04/29 02:41:08-07:00 akpm@osdl.org +12 -15 # s390: network driver # # drivers/s390/net/netiucv.c # 2004/04/29 02:41:08-07:00 akpm@osdl.org +26 -9 # s390: network driver # # drivers/s390/net/ctcmain.c # 2004/04/29 02:41:08-07:00 akpm@osdl.org +32 -3 # s390: network driver # # ChangeSet # 2004/04/29 07:19:17-07:00 akpm@osdl.org # [PATCH] s390: common i/o layer # # From: Martin Schwidefsky # # Common i/o layer changes: # - Don't use bus ids in crw debug feature. # - Use cio_oper for oper notification to disconnected devices. # - Remove __get_subchannel_by_stsch. # - Make cio workqueue a single threaded workqueue. # - Introduce addiotnal cio_notify workqueue for device driver notification. # - Switch off path in vpm if cio_start returned -ENODEV. # - Fix rescan for new subchannels after a logical vary on. # # drivers/s390/cio/device_pgid.c # 2004/04/29 02:41:08-07:00 akpm@osdl.org +1 -1 # s390: common i/o layer # # drivers/s390/cio/device_fsm.c # 2004/04/29 02:41:08-07:00 akpm@osdl.org +19 -13 # s390: common i/o layer # # drivers/s390/cio/device.h # 2004/04/29 02:41:08-07:00 akpm@osdl.org +2 -1 # s390: common i/o layer # # drivers/s390/cio/device.c # 2004/04/29 02:41:08-07:00 akpm@osdl.org +25 -9 # s390: common i/o layer # # drivers/s390/cio/css.c # 2004/04/29 02:41:08-07:00 akpm@osdl.org +2 -26 # s390: common i/o layer # # drivers/s390/cio/chsc.c # 2004/04/29 02:41:08-07:00 akpm@osdl.org +6 -7 # s390: common i/o layer # # ChangeSet # 2004/04/29 07:19:03-07:00 akpm@osdl.org # [PATCH] s390: core s390 # # From: Martin Schwidefsky # # s390 core changes: # - Move setting/clearing of TIF_31BIT thread flag to SET_PERSONALITY. # - Use TASK_UNMAPPED_BASE in elf_map32 for mmaps with address 0. # - Define ARCH_KMALLOC_MINALIGN. # - Define ARCH_MIN_TASKALIGN. # # include/asm-s390/processor.h # 2004/04/29 02:41:08-07:00 akpm@osdl.org +2 -0 # s390: core s390 # # include/asm-s390/elf.h # 2004/04/29 02:41:08-07:00 akpm@osdl.org +2 -8 # s390: core s390 # # include/asm-s390/cache.h # 2004/04/29 02:41:08-07:00 akpm@osdl.org +2 -0 # s390: core s390 # # arch/s390/kernel/sys_s390.c # 2004/04/29 02:41:08-07:00 akpm@osdl.org +1 -0 # s390: core s390 # # arch/s390/kernel/binfmt_elf32.c # 2004/04/29 02:41:08-07:00 akpm@osdl.org +3 -6 # s390: core s390 # # ChangeSet # 2004/04/29 07:18:52-07:00 akpm@osdl.org # [PATCH] cciss MAINTAINERS update # # From: # # Here's an update for the MAINTAINERS file. # # MAINTAINERS # 2004/04/29 02:41:08-07:00 akpm@osdl.org +10 -10 # cciss MAINTAINERS update # # ChangeSet # 2004/04/29 07:18:37-07:00 akpm@osdl.org # [PATCH] cciss build fix # # From: # # This patch fixes the linux/include/cciss_ioctl.h file. When support for the # cciss big ioctl was added the stucture in the header was put in the wrong # place. If an application includes the file it will fail to compile. # # include/linux/cciss_ioctl.h # 2004/04/29 02:41:08-07:00 akpm@osdl.org +10 -11 # cciss build fix # # ChangeSet # 2004/04/29 07:18:25-07:00 akpm@osdl.org # [PATCH] Update kerneltraffic link in SubmittingDrivers and kernel-docs.txt # # From: Coywolf Qi Hunt # # This updates the kerneltraffic url link found in # Documentation/SubmittingDrivers and Documentation/kernel-docs.txt. # # Documentation/kernel-docs.txt # 2004/04/29 02:41:08-07:00 akpm@osdl.org +1 -1 # Update kerneltraffic link in SubmittingDrivers and kernel-docs.txt # # Documentation/SubmittingDrivers # 2004/04/29 02:41:08-07:00 akpm@osdl.org +1 -1 # Update kerneltraffic link in SubmittingDrivers and kernel-docs.txt # # ChangeSet # 2004/04/29 07:18:11-07:00 akpm@osdl.org # [PATCH] ppc32: compile error in signal.c # # From: Meelis Roos # # arch/ppc/kernel/signal.c: In function `handle_signal': # arch/ppc/kernel/signal.c:518: error: `newspp' undeclared (first use in this function) # arch/ppc/kernel/signal.c:518: error: (Each undeclared identifier is reported only once # arch/ppc/kernel/signal.c:518: error: for each function it appears in.) # arch/ppc/kernel/signal.c:518: warning: long unsigned int format, pointer arg (arg 3) # # arch/ppc/kernel/signal.c # 2004/04/29 02:41:07-07:00 akpm@osdl.org +2 -2 # ppc32: compile error in signal.c # # ChangeSet # 2004/04/29 07:17:59-07:00 akpm@osdl.org # [PATCH] cifssmb.c warning fix # # On ppc64, __u64 is `unsigned long', so: # # fs/cifs/cifssmb.c: In function `CIFSSMBSetFileSize': # fs/cifs/cifssmb.c:2466: warning: long long int format, __u64 arg (arg 2) # # fs/cifs/cifssmb.c # 2004/04/29 02:40:21-07:00 akpm@osdl.org +2 -1 # cifssmb.c warning fix # # ChangeSet # 2004/04/29 07:15:20-07:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] Fix might_sleep in /proc/swaps code # # This fixes a locking problem noted by Tim Hockin: # * /proc/swaps uses seq_file code, calling seq_path() with swaplock held # * seq_path() calls d_path() # * d_path() calls mntput() which might_sleep() # # We add a new semaphore protecting insertions/removals in the set of swap # components + switch of ->start()/->stop() to the same semaphore [fixes # deadlocks] + trivial cleanup of ->next(). # # mm/swapfile.c # 2004/04/28 14:34:30-07:00 viro@parcelfarce.linux.theplanet.co.uk +10 -4 # Fix might_sleep in /proc/swaps code # # ChangeSet # 2004/04/29 07:12:31-07:00 david@gibson.dropbear.id.au # [PATCH] POWER5 erratum workaround # # Early POWER5 revisions (irq and it will # be overwritten by ide_init_default_irq() if CONFIG_PCI is defined. Fix # it. # # I will clean it up properly later after killing ide_init_hwif_ports() on # ARM{26}. Doing it now is just wasted effort. # # drivers/ide/ide.c # 2004/04/24 14:20:33-07:00 B.Zolnierkiewicz@elka.pw.edu.pl +2 -0 # fix default IDE interfaces initialization for PPC32 # # ChangeSet # 2004/04/29 14:08:42+01:00 dirk.behme@com.rmk.(none) # [ARM PATCH] 1835/1: Make ALTERA Excalibur work again in 2.6.5 # # Patch from Dirk Behme # # Make ALTERA Excalibur work again in 2.6.4. Update serial driver uart00.c and defconfig. # # This is an update of patch 1833/1. # # Remove #include , it isn't necessary at all. # # drivers/serial/uart00.c # 2004/04/29 13:14:52+01:00 dirk.behme@com.rmk.(none) +9 -5 # [PATCH] 1835/1: Make ALTERA Excalibur work again in 2.6.5 # # arch/arm/configs/epxa10db_defconfig # 2004/04/29 13:13:55+01:00 dirk.behme@com.rmk.(none) +203 -171 # [PATCH] 1835/1: Make ALTERA Excalibur work again in 2.6.5 # # ChangeSet # 2004/04/29 12:50:28+01:00 rmk@flint.arm.linux.org.uk # [ARM] Add Versatile default configuration # # arch/arm/configs/versatile_defconfig # 2004/04/29 12:48:01+01:00 rmk@flint.arm.linux.org.uk +845 -0 # # arch/arm/configs/versatile_defconfig # 2004/04/29 12:48:01+01:00 rmk@flint.arm.linux.org.uk +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/configs/versatile_defconfig # # ChangeSet # 2004/04/29 09:59:19+01:00 rmk@flint.arm.linux.org.uk # [ARM] Move all page fault handling code to fault.c # # arch/arm/mm/fault-armv.c # 2004/04/29 09:50:09+01:00 rmk@flint.arm.linux.org.uk +0 -109 # Remove 32-bit fault handling code; now in fault.c # # arch/arm/mm/fault.h # 2004/04/29 09:49:34+01:00 rmk@flint.arm.linux.org.uk +0 -4 # No need for do_page_fault and do_translation_fault to be global # anymore. # # arch/arm/mm/fault.c # 2004/04/29 09:48:58+01:00 rmk@flint.arm.linux.org.uk +116 -26 # Import 32-bit fault handling code from fault-armv.c # # arch/arm/mm/Makefile # 2004/04/29 09:48:18+01:00 rmk@flint.arm.linux.org.uk +1 -1 # fault-common.o is now fault.o # # arch/arm/mm/fault.c # 2004/04/29 09:42:37+01:00 rmk@flint.arm.linux.org.uk +0 -0 # Rename: arch/arm/mm/fault-common.c -> arch/arm/mm/fault.c # # ChangeSet # 2004/04/28 16:08:37-07:00 torvalds@ppc970.osdl.org # Tell the sparse checker to use 64-bit mode when checking # a ppc64 tree. # # arch/ppc64/Makefile # 2004/04/28 16:08:30-07:00 torvalds@ppc970.osdl.org +1 -0 # Tell the sparse checker to use 64-bit mode when checking # a ppc64 tree. # # ChangeSet # 2004/04/28 16:06:55-07:00 torvalds@ppc970.osdl.org # Add __user annotations to ppc64 user access functions. # # include/asm-ppc64/uaccess.h # 2004/04/28 16:06:49-07:00 torvalds@ppc970.osdl.org +17 -17 # Add __user annotations to ppc64 user access functions. # # ChangeSet # 2004/04/28 16:05:29-07:00 shemminger@osdl.org # [NETLINK]: Mark some functions/data static. # # net/netlink/af_netlink.c # 2004/04/28 16:04:48-07:00 shemminger@osdl.org +4 -4 # [NETLINK]: Mark some functions/data static. # # net/core/rtnetlink.c # 2004/04/28 16:04:48-07:00 shemminger@osdl.org +2 -2 # [NETLINK]: Mark some functions/data static. # # ChangeSet # 2004/04/28 22:24:57+01:00 rmk@flint.arm.linux.org.uk # [ARM] Fix atomic bitops earlyclobber # # atomic_dec_and_test and atomic_add_negative didn't mark their # temporary variables as early-clobber. Fix this. # # include/asm-arm/atomic.h # 2004/04/28 22:22:41+01:00 rmk@flint.arm.linux.org.uk +2 -2 # Temporary output registers may be written to before the input # registers have been used. Mark them early-clobber. # # ChangeSet # 2004/04/28 12:51:11-07:00 davem@nuts.davemloft.net # [SPARC64]: Update defconfig. # # arch/sparc64/defconfig # 2004/04/28 12:50:54-07:00 davem@nuts.davemloft.net +3 -0 # [SPARC64]: Update defconfig. # # ChangeSet # 2004/04/28 12:34:04-07:00 chaapala@cisco.com # [CRYPTO]: Provide crc32c as a type of digest. # # crypto/tcrypt.c # 2004/04/28 12:33:46-07:00 chaapala@cisco.com +108 -2 # [CRYPTO]: Provide crc32c as a type of digest. # # crypto/Makefile # 2004/04/28 12:33:46-07:00 chaapala@cisco.com +1 -0 # [CRYPTO]: Provide crc32c as a type of digest. # # crypto/Kconfig # 2004/04/28 12:33:46-07:00 chaapala@cisco.com +10 -0 # [CRYPTO]: Provide crc32c as a type of digest. # # crypto/crc32c.c # 2004/04/28 12:33:41-07:00 chaapala@cisco.com +110 -0 # [CRYPTO]: Provide crc32c as a type of digest. # # crypto/crc32c.c # 2004/04/28 12:33:41-07:00 chaapala@cisco.com +0 -0 # BitKeeper file /disk1/BK/net-2.6/crypto/crc32c.c # # ChangeSet # 2004/04/28 20:32:24+01:00 rmk@flint.arm.linux.org.uk # [ARM] Fix read_cpuid() # # include/asm-arm/system.h # 2004/04/28 20:30:20+01:00 rmk@flint.arm.linux.org.uk +6 -6 # Should've stringified "reg" # # ChangeSet # 2004/04/28 12:30:17-07:00 chaapala@cisco.com # [LIB]: Use compiler.h's pure attribute macros in crc32.c. # # lib/crc32.c # 2004/04/28 12:30:03-07:00 chaapala@cisco.com +5 -11 # [LIB]: Use compiler.h's pure attribute macros in crc32.c. # # ChangeSet # 2004/04/28 12:29:12-07:00 chaapala@cisco.com # [LIB]: Add CRC32c (Castagnoli, et al Cyclic Redundancy-Check) # # lib/Makefile # 2004/04/28 12:28:53-07:00 chaapala@cisco.com +1 -0 # [LIB]: Add CRC32c (Castagnoli, et al Cyclic Redundancy-Check) # # lib/Kconfig # 2004/04/28 12:28:53-07:00 chaapala@cisco.com +9 -0 # [LIB]: Add CRC32c (Castagnoli, et al Cyclic Redundancy-Check) # # lib/libcrc32c.c # 2004/04/28 12:28:48-07:00 chaapala@cisco.com +200 -0 # [LIB]: Add CRC32c (Castagnoli, et al Cyclic Redundancy-Check) # # lib/libcrc32c.c # 2004/04/28 12:28:48-07:00 chaapala@cisco.com +0 -0 # BitKeeper file /disk1/BK/net-2.6/lib/libcrc32c.c # # include/linux/crc32c.h # 2004/04/28 12:28:47-07:00 chaapala@cisco.com +11 -0 # [LIB]: Add CRC32c (Castagnoli, et al Cyclic Redundancy-Check) # # include/linux/crc32c.h # 2004/04/28 12:28:47-07:00 chaapala@cisco.com +0 -0 # BitKeeper file /disk1/BK/net-2.6/include/linux/crc32c.h # # ChangeSet # 2004/04/28 12:26:48-07:00 shemminger@osdl.org # [IPV4]: Use static in several places. # # More functions and data that should be static. # # net/ipv4/tcp_input.c # 2004/04/28 12:26:35-07:00 shemminger@osdl.org +1 -1 # [IPV4]: Use static in several places. # # More functions and data that should be static. # # net/ipv4/tcp.c # 2004/04/28 12:26:35-07:00 shemminger@osdl.org +1 -4 # [IPV4]: Use static in several places. # # More functions and data that should be static. # # net/ipv4/devinet.c # 2004/04/28 12:26:35-07:00 shemminger@osdl.org +1 -1 # [IPV4]: Use static in several places. # # More functions and data that should be static. # # ChangeSet # 2004/04/28 20:22:33+01:00 rmk@flint.arm.linux.org.uk # [ARM] Fix shared mmap()ings for ARM VIPT caches. # # This allows us to appropriately align shared mappings on VIPT caches # with aliasing issues. # # arch/arm/mm/mmap.c # 2004/04/28 20:20:19+01:00 rmk@flint.arm.linux.org.uk +109 -0 # # include/asm-arm/shmparam.h # 2004/04/28 20:20:19+01:00 rmk@flint.arm.linux.org.uk +6 -5 # Increase SHMLBA. # Force SHMLBA to be obeyed in shmat # # include/asm-arm/pgtable.h # 2004/04/28 20:20:19+01:00 rmk@flint.arm.linux.org.uk +5 -0 # Define HAVE_ARCH_UNMAPPED_AREA # # arch/arm/mm/mmap.c # 2004/04/28 20:20:19+01:00 rmk@flint.arm.linux.org.uk +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mm/mmap.c # # arch/arm/mm/Makefile # 2004/04/28 20:20:18+01:00 rmk@flint.arm.linux.org.uk +1 -1 # Add mmap.o # # ChangeSet # 2004/04/28 19:06:49+01:00 rmk@flint.arm.linux.org.uk # [ARM] Remove Anakin default configuration file. # # BitKeeper/deleted/.del-anakin_defconfig~4e634b9c45703b4d # 2004/04/28 19:03:31+01:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: arch/arm/configs/anakin_defconfig # # ChangeSet # 2004/04/28 09:58:52-07:00 ink@jurassic.park.msu.ru # [PATCH] Fix rwsem contention case on alpha/s390x # # Thanks to Dru , who provided an easy way to reproduce # the problem. # # What we have in lib/rwsem.c:__rwsem_do_wake(): # int woken, loop; # ^^^ # and several lines below: # loop = woken; # woken *= RWSEM_ACTIVE_BIAS-RWSEM_WAITING_BIAS; # woken -= RWSEM_ACTIVE_BIAS; # # However, rw_semaphore->count is 64-bit on Alpha, so # RWSEM_WAITING_BIAS has been defined as -0x0000000100000000L. # Obviously, this blows up in the write contention case. # # lib/rwsem.c # 2004/04/27 13:04:14-07:00 ink@jurassic.park.msu.ru +1 -2 # Fix rwsem contention case on alpha/s390x # # ChangeSet # 2004/04/28 17:51:49+01:00 rmk@flint.arm.linux.org.uk # [ARM] Fix monspecs in ARM-related framebuffer drivers. # # Use named initialisers for monspecs; the format of the structure # changed a while back and it broke. # # drivers/video/sa1100fb.c # 2004/04/28 17:49:29+01:00 rmk@flint.arm.linux.org.uk +4 -1 # Use named initialisers for monspecs; the format of the structure # changed and it broke. # # drivers/video/acornfb.c # 2004/04/28 17:49:28+01:00 rmk@flint.arm.linux.org.uk +31 -6 # Use named initialisers for monspecs; the format of the structure # changed and it broke. # # ChangeSet # 2004/04/28 17:33:54+01:00 rmk@flint.arm.linux.org.uk # [ARM] Oprofile should use asm/irq.h not asm/arch/irqs.h # # arch/arm/oprofile/op_model_xscale.c # 2004/04/28 17:32:04+01:00 rmk@flint.arm.linux.org.uk +1 -1 # Should use asm/irq.h not asm/arch/irqs.h # # ChangeSet # 2004/04/28 17:24:24+01:00 rmk@flint.arm.linux.org.uk # [ARM] Fix dependencies of SERIO_AMBAKMI and SERIO_RPCKBD # # drivers/input/serio/Kconfig # 2004/04/28 17:22:34+01:00 rmk@flint.arm.linux.org.uk +2 -2 # SERIO_AMBAKMI should depend on ARM_AMBA. # SERIO_RPCKBD should be available on CLPS7500 platforms. # # ChangeSet # 2004/04/28 16:52:43+01:00 rmk@flint.arm.linux.org.uk # [ARM] Update ioremap implementation. # # Use flush_cache_vmap() after creating mappings. Also use BUG_ON() # rather than if() BUG(). # # ChangeSet # 2004/04/28 08:50:59-07:00 armin@melware.de # [PATCH] ISDN CAPI: fix ncci list semaphore # # Fix new ISDN CAPI's internal ncci list semaphore if # CONFIG_ISDN_CAPI_MIDDLEWARE is disabled. # # Thanks to Florian Schirmer. # # drivers/isdn/capi/capi.c # 2004/04/28 04:50:12-07:00 armin@melware.de +3 -3 # ISDN CAPI: fix ncci list semaphore # # arch/arm/mm/ioremap.c # 2004/04/28 16:50:48+01:00 rmk@flint.arm.linux.org.uk +34 -27 # ioremap updates: # - use BUG_ON not if () BUG(); # - use flush_cache_vmap() after creating mappings # # ChangeSet # 2004/04/28 16:16:11+01:00 rmk@flint.arm.linux.org.uk # [ARM] Update assabet_defconfig. # # ChangeSet # 2004/04/28 08:16:03-07:00 akpm@osdl.org # [PATCH] ppc32: Update Motorola PrPMC750 support # # From: Tom Rini # # This patch updates support for the Motorola PrPMC750 platform. Most of the # size in this patch comes from merging prpmc750_pci.c and prpmc750_setup.c into # just prpmc750.c. # # arch/ppc/platforms/prpmc750.c # 2004/04/28 08:15:57-07:00 akpm@osdl.org +367 -0 # # arch/ppc/platforms/prpmc750.h # 2004/04/28 00:21:32-07:00 akpm@osdl.org +43 -23 # ppc32: Update Motorola PrPMC750 support # # arch/ppc/platforms/prpmc750.c # 2004/04/28 08:15:57-07:00 akpm@osdl.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/platforms/prpmc750.c # # arch/ppc/platforms/Makefile # 2004/04/28 00:21:32-07:00 akpm@osdl.org +1 -1 # ppc32: Update Motorola PrPMC750 support # # arch/ppc/configs/prpmc750_defconfig # 2004/04/28 00:21:32-07:00 akpm@osdl.org +159 -164 # ppc32: Update Motorola PrPMC750 support # # arch/ppc/Kconfig # 2004/04/28 00:21:32-07:00 akpm@osdl.org +1 -1 # ppc32: Update Motorola PrPMC750 support # # BitKeeper/deleted/.del-prpmc750_setup.c~b1a24de17db2be31 # 2004/04/28 08:15:57-07:00 akpm@osdl.org +0 -0 # Delete: arch/ppc/platforms/prpmc750_setup.c # # BitKeeper/deleted/.del-prpmc750_pci.c~c16f2ab71a50fb4e # 2004/04/28 08:15:57-07:00 akpm@osdl.org +0 -0 # Delete: arch/ppc/platforms/prpmc750_pci.c # # ChangeSet # 2004/04/28 08:15:12-07:00 akpm@osdl.org # [PATCH] ppc32: Add openpic_hookup_cascade() # # From: Tom Rini # # This patch adds openpic_hookup_cascade(offset, name, handler) which allows for # an arbitrary interrupt controller to be hooked up as a cascade to the openpic. # This also allows for platforms to just not have a cascaded controller. # # include/asm-ppc/open_pic.h # 2004/04/28 00:21:32-07:00 akpm@osdl.org +2 -0 # ppc32: Add openpic_hookup_cascade() # # arch/ppc/syslib/open_pic.c # 2004/04/28 00:21:32-07:00 akpm@osdl.org +27 -14 # ppc32: Add openpic_hookup_cascade() # # arch/ppc/syslib/Makefile # 2004/04/28 00:21:32-07:00 akpm@osdl.org +1 -1 # ppc32: Add openpic_hookup_cascade() # # arch/ppc/platforms/sandpoint.c # 2004/04/28 00:21:32-07:00 akpm@osdl.org +2 -0 # ppc32: Add openpic_hookup_cascade() # # arch/ppc/platforms/prep_setup.c # 2004/04/28 00:21:32-07:00 akpm@osdl.org +5 -1 # ppc32: Add openpic_hookup_cascade() # # arch/ppc/platforms/pplus.c # 2004/04/28 00:21:32-07:00 akpm@osdl.org +2 -0 # ppc32: Add openpic_hookup_cascade() # # arch/ppc/platforms/mvme5100_setup.c # 2004/04/28 00:21:32-07:00 akpm@osdl.org +1 -0 # ppc32: Add openpic_hookup_cascade() # # arch/ppc/platforms/mcpn765.c # 2004/04/28 00:21:32-07:00 akpm@osdl.org +2 -3 # ppc32: Add openpic_hookup_cascade() # # arch/ppc/platforms/lopec_setup.c # 2004/04/28 00:21:32-07:00 akpm@osdl.org +3 -0 # ppc32: Add openpic_hookup_cascade() # # arch/ppc/platforms/chrp_setup.c # 2004/04/28 00:21:32-07:00 akpm@osdl.org +3 -0 # ppc32: Add openpic_hookup_cascade() # # ChangeSet # 2004/04/28 08:15:00-07:00 akpm@osdl.org # [PATCH] ppc32: Update SBS K2 support # # From: Tom Rini # # This patch updates support for the SBS K2 platform. Most of the size in this # patch comes from merging k2_pci.c and k2_setup.c into just k2.c. # # arch/ppc/platforms/k2.c # 2004/04/28 08:14:54-07:00 akpm@osdl.org +616 -0 # # arch/ppc/syslib/cpc710.h # 2004/04/28 00:21:31-07:00 akpm@osdl.org +2 -0 # ppc32: Update SBS K2 support # # arch/ppc/platforms/k2.c # 2004/04/28 08:14:54-07:00 akpm@osdl.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/platforms/k2.c # # arch/ppc/platforms/Makefile # 2004/04/28 00:22:06-07:00 akpm@osdl.org +1 -1 # ppc32: Update SBS K2 support # # arch/ppc/configs/k2_defconfig # 2004/04/28 00:21:31-07:00 akpm@osdl.org +192 -125 # ppc32: Update SBS K2 support # # arch/ppc/Kconfig # 2004/04/28 00:22:06-07:00 akpm@osdl.org +1 -1 # ppc32: Update SBS K2 support # # BitKeeper/deleted/.del-k2_setup.c~3833a1237b09e5e # 2004/04/28 08:14:54-07:00 akpm@osdl.org +0 -0 # Delete: arch/ppc/platforms/k2_setup.c # # BitKeeper/deleted/.del-k2_pci.c~fda3100f668bb25 # 2004/04/28 08:14:54-07:00 akpm@osdl.org +0 -0 # Delete: arch/ppc/platforms/k2_pci.c # # ChangeSet # 2004/04/28 08:14:38-07:00 akpm@osdl.org # [PATCH] fix warning in arch/ppc/boot/simple/misc.c # # From: Christoph Hellwig # # asm-ppc/elf.h uses a pointer to struct task_struct without any # forward-declaration. # # In file included from include/linux/elf.h:5, # from arch/ppc/boot/simple/misc.c:20: # include/asm/elf.h:102: warning: `struct task_struct' declared inside parameter list # include/asm/elf.h:102: warning: its scope is only this definition or declaration, which is probably not what you want # # include/asm-ppc/elf.h # 2004/04/28 00:21:31-07:00 akpm@osdl.org +2 -0 # fix warning in arch/ppc/boot/simple/misc.c # # ChangeSet # 2004/04/28 08:14:27-07:00 akpm@osdl.org # [PATCH] Fix thinkos in #if -> #ifdef conversions #2 # # From: Tom Rini # # And when trying to catch up on old patches, I forgot this hunk: # # arch/ppc/platforms/prep_setup.c # 2004/04/28 00:22:06-07:00 akpm@osdl.org +1 -0 # Fix thinkos in #if -> #ifdef conversions #2 # # ChangeSet # 2004/04/28 08:14:13-07:00 akpm@osdl.org # [PATCH] Fix thinkos in #if -> #ifdef conversions # # From: Tom Rini # # When I changed some '#if FOO' tests to '#ifdef FOO' I forgot to make sure # that nothing was doing #define FOO 0. So after auditing all of the changes # I made, the following is needed: # # arch/ppc/kernel/signal.c # 2004/04/28 00:21:30-07:00 akpm@osdl.org +1 -1 # Fix thinkos in #if -> #ifdef conversions # # arch/ppc/4xx_io/serial_sicc.c # 2004/04/28 00:21:30-07:00 akpm@osdl.org +7 -19 # Fix thinkos in #if -> #ifdef conversions # # ChangeSet # 2004/04/28 08:14:02-07:00 akpm@osdl.org # [PATCH] ppc64: Set memory-only nodes online # # From: Olof Johansson # # On pSeries LPARs we might end up with NUMA nodes that only have memory and # no CPUs. Only the CPU configuration code actually set a node online, so # memory-only nodes wouldn't show up in sysfs. Below patch adds the # set_online call to the memory loop too. # # arch/ppc64/mm/numa.c # 2004/04/28 00:21:30-07:00 akpm@osdl.org +2 -0 # ppc64: Set memory-only nodes online # # ChangeSet # 2004/04/28 08:13:48-07:00 akpm@osdl.org # [PATCH] fix warning in fs/dquot.c # # From: "Luiz Fernando N. Capitulino" # # fs/dquot.c: In function `vfs_quota_off': # fs/dquot.c:1328: warning: label `out' defined but not used # # fs/dquot.c # 2004/04/28 00:21:29-07:00 akpm@osdl.org +0 -1 # fix warning in fs/dquot.c # # arch/arm/configs/assabet_defconfig # 2004/04/28 16:13:00+01:00 rmk@flint.arm.linux.org.uk +382 -443 # Bring assabet_defconfig up to date. # # ChangeSet # 2004/04/28 14:15:04+01:00 rmk@flint.arm.linux.org.uk # [ARM] Fix BE find_*_bit operations # # These broke when find_first_bit/find_next_bit was added. # # arch/arm/lib/findbit.S # 2004/04/28 14:12:59+01:00 rmk@flint.arm.linux.org.uk +14 -8 # Fix BE find_*_bit operations. # # ChangeSet # 2004/04/28 14:02:29+01:00 rmk@flint.arm.linux.org.uk # [ARM] Add read_cpuid() to aid reading CPU ID registers. # # include/asm-arm/system.h # 2004/04/28 14:00:06+01:00 rmk@flint.arm.linux.org.uk +13 -0 # Add read_cpuid() implementation # # arch/arm/oprofile/op_model_xscale.c # 2004/04/28 14:00:06+01:00 rmk@flint.arm.linux.org.uk +2 -2 # Use read_cpuid() # # arch/arm/kernel/setup.c # 2004/04/28 14:00:05+01:00 rmk@flint.arm.linux.org.uk +2 -6 # Use read_cpuid() # # ChangeSet # 2004/04/28 12:58:49+01:00 dvrabel@com.rmk.(none) # [ARM PATCH] 1832/1: Typo in dma_unregister_dev printk # # Patch from David Vrabel # # Fix a trivial typo in a dma_unregister_dev printk. # # arch/arm/common/dmabounce.c # 2004/04/27 10:39:54+01:00 dvrabel@com.rmk.(none) +1 -1 # [PATCH] 1832/1: Typo in dma_unregister_dev printk # # ChangeSet # 2004/04/28 14:45:34+10:00 hch@sgi.com # [XFS] close external blockdevice after final flush # # SGI Modid: xfs-linux:xfs-kern:170489a # # fs/xfs/xfs_vfsops.c # 2004/04/28 14:45:14+10:00 hch@sgi.com +6 -3 # [XFS] close external blockdevice after final flush # # fs/xfs/xfs_mount.c # 2004/04/28 14:45:14+10:00 hch@sgi.com +5 -16 # [XFS] close external blockdevice after final flush # # fs/xfs/linux/xfs_super.h # 2004/04/28 14:45:14+10:00 hch@sgi.com +0 -8 # [XFS] close external blockdevice after final flush # # fs/xfs/linux/xfs_super.c # 2004/04/28 14:45:14+10:00 hch@sgi.com +0 -70 # [XFS] close external blockdevice after final flush # # fs/xfs/linux/xfs_linux.h # 2004/04/28 14:45:14+10:00 hch@sgi.com +1 -0 # [XFS] close external blockdevice after final flush # # fs/xfs/linux/xfs_buf.h # 2004/04/28 14:45:14+10:00 hch@sgi.com +20 -17 # [XFS] close external blockdevice after final flush # # fs/xfs/linux/xfs_buf.c # 2004/04/28 14:45:14+10:00 hch@sgi.com +67 -7 # [XFS] close external blockdevice after final flush # # ChangeSet # 2004/04/28 14:39:46+10:00 roehrich@sgi.com # [XFS] Remove now that linvfs_mprotect doesn't need it. # # SGI Modid: xfs-linux:xfs-kern:170509a # # fs/xfs/linux/xfs_file.c # 2004/04/28 14:39:27+10:00 roehrich@sgi.com +0 -1 # [XFS] Remove now that linvfs_mprotect doesn't need it. # # ChangeSet # 2004/04/28 14:24:24+10:00 roehrich@sgi.com # [XFS] Fix dmapi/mprotect interaction # # SGI Modid: xfs-linux:xfs-kern:170448a # # fs/xfs/linux/xfs_file.c # 2004/04/28 14:24:02+10:00 roehrich@sgi.com +1 -1 # [XFS] Fix dmapi/mprotect interaction # # ChangeSet # 2004/04/27 20:35:28-07:00 davem@nuts.davemloft.net # [SPARC64]: Fix MAP_FIXED+shared address check, noticed by rmk. # # arch/sparc64/kernel/sys_sparc.c # 2004/04/27 20:35:08-07:00 davem@nuts.davemloft.net +2 -1 # [SPARC64]: Fix MAP_FIXED+shared address check, noticed by rmk. # # ChangeSet # 2004/04/27 20:29:45-07:00 shemminger@osdl.org # [TCP]: tcp_send_skb code pruning # # The function tcp_send_skb is only called from tcp_fin, and is always called # with force_queue=1. Therefore, it no longer needs to be global and the code # to send right now can be removed. Because it always queues, change the # name as well, and fix up the comment. # # net/ipv4/tcp_output.c # 2004/04/27 20:29:32-07:00 shemminger@osdl.org +4 -16 # [TCP]: tcp_send_skb code pruning # # The function tcp_send_skb is only called from tcp_fin, and is always called # with force_queue=1. Therefore, it no longer needs to be global and the code # to send right now can be removed. Because it always queues, change the # name as well, and fix up the comment. # # include/net/tcp.h # 2004/04/27 20:29:32-07:00 shemminger@osdl.org +0 -1 # [TCP]: tcp_send_skb code pruning # # The function tcp_send_skb is only called from tcp_fin, and is always called # with force_queue=1. Therefore, it no longer needs to be global and the code # to send right now can be removed. Because it always queues, change the # name as well, and fix up the comment. # # ChangeSet # 2004/04/27 15:05:49-07:00 shemminger@osdl.org # [NET]: Eliminate large inlines in skbuff.h # # net/core/skbuff.c # 2004/04/27 15:05:36-07:00 shemminger@osdl.org +167 -0 # [NET]: Eliminate large inlines in skbuff.h # # include/linux/skbuff.h # 2004/04/27 15:05:36-07:00 shemminger@osdl.org +8 -160 # [NET]: Eliminate large inlines in skbuff.h # # ChangeSet # 2004/04/27 16:50:50-05:00 stevef@stevef95.austin.ibm.com # fix double entry typo # # fs/cifs/cifssmb.c # 2004/04/27 16:50:43-05:00 stevef@stevef95.austin.ibm.com +1 -1 # fix double entry typo # # ChangeSet # 2004/04/27 16:43:22-05:00 stevef@stevef95.austin.ibm.com # fixes for socket retry and error handling of misc. error paths # # fs/cifs/transport.c # 2004/04/27 16:43:14-05:00 stevef@stevef95.austin.ibm.com +39 -39 # fix partial socket write retry # # fs/cifs/file.c # 2004/04/27 16:43:13-05:00 stevef@stevef95.austin.ibm.com +5 -0 # log out of memory getting resume key # # fs/cifs/connect.c # 2004/04/27 16:43:13-05:00 stevef@stevef95.austin.ibm.com +4 -3 # on low memory do not prematurely exit demux thread # # fs/cifs/cifssmb.c # 2004/04/27 16:43:13-05:00 stevef@stevef95.austin.ibm.com +7 -3 # Improve UnixQPathInfo error handling # # fs/cifs/CHANGES # 2004/04/27 16:43:13-05:00 stevef@stevef95.austin.ibm.com +7 -2 # update cifs vfs change log for 1.12 # # include/asm-ia64/sn/sn_sal.h # 2004/04/27 02:55:57-07:00 kaos@sgi.com +1 -1 # ia64: SN_SAL_PRINT_ERROR is reentrant # # ChangeSet # 2004/04/27 00:42:42-05:00 stevef@smfhome.smfsambadom # Merge bk://cifs.bkbits.net/linux-2.5cifs # into smfhome.smfsambadom:/suse/home/stevef/bk/linux-2.5cifs # # ChangeSet # 2004/04/27 00:56:04-05:00 stevef@steveft21.ltcsamba # rfc1001 session init name parsing fix # # fs/cifs/connect.c # 2004/04/27 00:42:28-05:00 stevef@smfhome.smfsambadom +0 -0 # Auto merged # # fs/cifs/connect.c # 2004/04/27 00:55:47-05:00 stevef@steveft21.ltcsamba +48 -17 # rfc1001 session init name parsing fix # # ChangeSet # 2004/04/27 00:33:08-05:00 stevef@smfhome.smfsambadom # do not block (writing back to the filesystem potentially) while allocating smb buffers # # fs/cifs/misc.c # 2004/04/27 00:33:01-05:00 stevef@smfhome.smfsambadom +1 -1 # do not block (writing back to the filesystem potentially) while allocating smb buffers # # fs/cifs/connect.c # 2004/04/27 00:33:01-05:00 stevef@smfhome.smfsambadom +2 -1 # do not block allocating memory in cifs daemon # # ChangeSet # 2004/04/26 17:10:47-07:00 kaos@sgi.com # [PATCH] ia64: SN_SAL_PRINT_ERROR is reentrant # # ChangeSet # 2004/04/26 17:32:50-05:00 stevef@stevef95.austin.ibm.com # update rfc1001 handling # # fs/cifs/cifsglob.h # 2004/04/26 17:32:42-05:00 stevef@stevef95.austin.ibm.com +1 -1 # move rfc1001 workstation name from per smb session struct to per tcp connection where it belongs # # fs/cifs/cifsfs.c # 2004/04/26 17:32:42-05:00 stevef@stevef95.austin.ibm.com +4 -2 # missing fdatawait in invalidate path # # fs/cifs/TODO # 2004/04/26 17:32:42-05:00 stevef@stevef95.austin.ibm.com +15 -2 # update cifs todo list # # fs/cifs/README # 2004/04/26 17:32:42-05:00 stevef@stevef95.austin.ibm.com +11 -2 # add updated cifs readme info on nt # # fs/cifs/CHANGES # 2004/04/26 17:32:42-05:00 stevef@stevef95.austin.ibm.com +1 -1 # Update CIFS VFS change log for 1.11a # # ChangeSet # 2004/04/26 14:12:28-05:00 stevef@stevef95.austin.ibm.com # fix memory allocation of rfc1002 sess init struct # # fs/cifs/connect.c # 2004/04/26 14:12:20-05:00 stevef@stevef95.austin.ibm.com +1 -1 # fix memory allocation of rfc1002 sess init struct # # ChangeSet # 2004/04/26 11:38:19-05:00 stevef@stevef95.austin.ibm.com # Merge bk://cifs.bkbits.net/linux-2.5cifs # into stevef95.austin.ibm.com:/usr/src/bk/linux-2.5cifs # # fs/cifs/file.c # 2004/04/26 11:38:08-05:00 stevef@stevef95.austin.ibm.com +0 -0 # Auto merged # # ChangeSet # 2004/04/26 11:34:15-05:00 stevef@stevef95.austin.ibm.com # Flush writebehind before invalidate in file open path # # fs/cifs/file.c # 2004/04/26 11:34:07-05:00 stevef@stevef95.austin.ibm.com +10 -4 # Flush writebehind before invalidate in file open path # # fs/cifs/CHANGES # 2004/04/26 11:34:04-05:00 stevef@stevef95.austin.ibm.com +5 -0 # Update CIFS VFS changelog for version 1.11 # # fs/cifs/AUTHORS # 2004/04/26 11:34:04-05:00 stevef@stevef95.austin.ibm.com +3 -1 # Update CIFS contributors # # ChangeSet # 2004/04/25 22:43:20-05:00 stevef@smfhome.smfsambadom # Remove unneeded debug statement # # fs/cifs/connect.c # 2004/04/25 22:42:58-05:00 stevef@smfhome.smfsambadom +0 -1 # Remove unneeded debug statement # # ChangeSet # 2004/04/25 22:41:35-05:00 stevef@smfhome.smfsambadom # Fix port 139 connections to Windows 2K adding missing RFC1002 session_init # # fs/cifs/rfc1002pdu.h # 2004/04/25 22:41:28-05:00 stevef@smfhome.smfsambadom +6 -2 # Fix port 139 connections to Windows 2K adding missing RFC1002 session_init # # fs/cifs/file.c # 2004/04/25 22:41:28-05:00 stevef@smfhome.smfsambadom +1 -1 # fix typo in comment # # fs/cifs/connect.c # 2004/04/25 22:41:28-05:00 stevef@smfhome.smfsambadom +74 -11 # Fix port 139 connections to Windows 2K adding missing RFC1002 session_init # # fs/cifs/cifsglob.h # 2004/04/25 22:41:28-05:00 stevef@smfhome.smfsambadom +1 -0 # Fix port 139 connections to Windows 2K adding missing RFC1002 session_init # # ChangeSet # 2004/04/25 18:31:28-07:00 wesolows@foobazco.org # [SPARC32]: Ensure swap entries do not overlap the PRESENT or FILE bits. # # Recent changes to the swap code force us to actually support the # entire range of swap encodings. The old encodings could cause the # FILE bit to be set, causing a BUG. # # include/asm-sparc/pgtsun4c.h # 2004/04/25 18:31:22-07:00 wesolows@foobazco.org +15 -0 # [SPARC32]: Ensure swap entries do not overlap the PRESENT or FILE bits. # # include/asm-sparc/pgtsrmmu.h # 2004/04/25 18:31:22-07:00 wesolows@foobazco.org +16 -0 # [SPARC32]: Ensure swap entries do not overlap the PRESENT or FILE bits. # # include/asm-sparc/pgtable.h # 2004/04/25 18:31:22-07:00 wesolows@foobazco.org +9 -3 # [SPARC32]: Ensure swap entries do not overlap the PRESENT or FILE bits. # # arch/sparc/mm/sun4c.c # 2004/04/25 18:31:22-07:00 wesolows@foobazco.org +21 -0 # [SPARC32]: Ensure swap entries do not overlap the PRESENT or FILE bits. # # arch/sparc/mm/srmmu.c # 2004/04/25 18:31:22-07:00 wesolows@foobazco.org +21 -0 # [SPARC32]: Ensure swap entries do not overlap the PRESENT or FILE bits. # # ChangeSet # 2004/04/22 08:48:02+10:00 nathans@sgi.com # Merge sgi.com:/source2/linux-2.6 into sgi.com:/source2/xfs-linux-2.6 # # fs/xfs/xfs_vfsops.c # 2004/04/22 08:47:35+10:00 nathans@sgi.com +0 -0 # Auto merged # # fs/xfs/linux/xfs_super.c # 2004/04/22 08:47:35+10:00 nathans@sgi.com +0 -0 # Auto merged # # fs/xfs/linux/xfs_lrw.c # 2004/04/22 08:47:35+10:00 nathans@sgi.com +0 -0 # Auto merged # # fs/xfs/linux/xfs_ioctl.c # 2004/04/22 08:47:35+10:00 nathans@sgi.com +0 -0 # Auto merged # # ChangeSet # 2004/04/22 08:30:42+10:00 nathans@sgi.com # [XFS] Revive an accidentally dropped pagesize > blocksize assert. # # fs/xfs/linux/xfs_buf.c # 2004/04/22 08:30:23+10:00 nathans@sgi.com +1 -0 # [XFS] Revive an accidentally dropped pagesize > blocksize assert. # # ChangeSet # 2004/04/22 07:59:11+10:00 hch@sgi.com # [XFS] Don't reset buffer offset before using it. # # SGI Modid: xfs-linux:xfs-kern:168692a # # fs/xfs/linux/xfs_buf.c # 2004/04/22 07:58:52+10:00 hch@sgi.com +1 -1 # [XFS] Don't reset buffer offset before using it. # # ChangeSet # 2004/04/21 17:57:18+10:00 nathans@sgi.com # [XFS] Fix up a trivial merge botch. # # fs/xfs/linux/xfs_globals.c # 2004/04/21 17:56:59+10:00 nathans@sgi.com +1 -1 # [XFS] Fix up a trivial merge botch. # # fs/xfs/linux/xfs_buf.h # 2004/04/21 17:56:59+10:00 nathans@sgi.com +2 -4 # [XFS] Fix up a trivial merge botch. # # fs/xfs/linux/xfs_aops.c # 2004/04/21 17:56:59+10:00 nathans@sgi.com +2 -1 # [XFS] Fix up a trivial merge botch. # # ChangeSet # 2004/04/21 17:47:47+10:00 nathans@sgi.com # [XFS] cleanup pagebuf flag usage and simplify pagebuf_free. # # SGI Modid: xfs-linux:xfs-kern:169276a # # fs/xfs/linux/xfs_buf.h # 2004/04/21 17:47:25+10:00 nathans@sgi.com +14 -18 # [XFS] cleanup pagebuf flag usage and simplify pagebuf_free. # # fs/xfs/linux/xfs_buf.c # 2004/04/21 17:47:25+10:00 nathans@sgi.com +44 -82 # [XFS] cleanup pagebuf flag usage and simplify pagebuf_free. # # ChangeSet # 2004/04/21 16:14:20+10:00 nathans@sgi.com # [XFS] Fix vmtruncate abuse in the XFS setattr ATTR_SIZE operation. # # SGI Modid: xfs-linux:xfs-kern:170344a # # fs/xfs/xfs_vnodeops.c # 2004/04/21 16:13:58+10:00 nathans@sgi.com +5 -11 # [XFS] Fix vmtruncate abuse in the XFS setattr ATTR_SIZE operation. # # fs/xfs/linux/xfs_linux.h # 2004/04/21 16:13:58+10:00 nathans@sgi.com +5 -4 # [XFS] Fix vmtruncate abuse in the XFS setattr ATTR_SIZE operation. # # ChangeSet # 2004/04/21 16:08:37+10:00 cattelan@sgi.com # [XFS] Fix for the xfs dir2 rebalance bug. # # SGI Modid: xfs-linux:xfs-kern:170221a # # fs/xfs/xfs_dir2_node.c # 2004/04/21 16:08:16+10:00 cattelan@sgi.com +23 -2 # [XFS] Fix for the xfs dir2 rebalance bug. # # ChangeSet # 2004/04/21 16:03:50+10:00 nathans@sgi.com # [XFS] Bump up age_buffer and sync_interval maxima for laptop mode. From Bart Samwel. # # SGI Modid: xfs-linux:xfs-kern:170057a # # fs/xfs/linux/xfs_globals.c # 2004/04/21 16:03:27+10:00 nathans@sgi.com +1 -1 # [XFS] Bump up age_buffer and sync_interval maxima for laptop mode. # From Bart Samwel. # # ChangeSet # 2004/04/21 15:35:32+10:00 nathans@sgi.com # [XFS] Use USER_HZ in XFS sysctl interfaces. Fix from Bart Samwel. # # SGI Modid: xfs-linux:xfs-kern:170056a # # fs/xfs/linux/xfs_linux.h # 2004/04/21 15:35:11+10:00 nathans@sgi.com +3 -3 # [XFS] Use USER_HZ in XFS sysctl interfaces. Fix from Bart Samwel. # # fs/xfs/linux/xfs_globals.c # 2004/04/21 15:35:11+10:00 nathans@sgi.com +12 -12 # [XFS] Use USER_HZ in XFS sysctl interfaces. Fix from Bart Samwel. # # ChangeSet # 2004/04/21 15:13:01+10:00 nathans@sgi.com # [XFS] Allow xfsbufd flush intervals to take immediate effect after changing the flush sysctl value. Fix from Bart Samwel. # # SGI Modid: xfs-linux:xfs-kern:170053a # # fs/xfs/linux/xfs_buf.h # 2004/04/21 15:12:41+10:00 nathans@sgi.com +1 -1 # [XFS] Allow xfsbufd flush intervals to take immediate effect after # changing the flush sysctl value. Fix from Bart Samwel. # # fs/xfs/linux/xfs_buf.c # 2004/04/21 15:12:40+10:00 nathans@sgi.com +4 -2 # [XFS] Allow xfsbufd flush intervals to take immediate effect after # changing the flush sysctl value. Fix from Bart Samwel. # # ChangeSet # 2004/04/21 15:01:47+10:00 nathans@sgi.com # [XFS] Fix some cases where we returned fill_super success, instead # of failing. # # SGI Modid: xfs-linux:xfs-kern:169865a # # fs/xfs/linux/xfs_super.c # 2004/04/21 15:01:25+10:00 nathans@sgi.com +10 -6 # [XFS] Fix some cases where we returned fill_super success, instead # of failing. # # ChangeSet # 2004/04/21 14:54:39+10:00 nathans@sgi.com # [XFS] Only use page->private to track page state for page cache pages # # SGI Modid: xfs-linux:xfs-kern:169801a # # fs/xfs/linux/xfs_buf.c # 2004/04/21 14:54:18+10:00 nathans@sgi.com +2 -1 # [XFS] Only use page->private to track page state for page cache pages # # ChangeSet # 2004/04/21 14:48:24+10:00 jpk@sgi.com # [XFS] Correct the (file size >= stripe unit) check inside # xfs_iomap_write_delay. It was comparing the file size, in # bytes, against the stripe unit size, in FSBs. (PV 911469) # # SGI Modid: xfs-linux:xfs-kern:169744b # # fs/xfs/xfs_iomap.c # 2004/04/21 14:48:03+10:00 jpk@sgi.com +4 -3 # [XFS] Correct the (file size >= stripe unit) check inside # xfs_iomap_write_delay. It was comparing the file size, in # bytes, against the stripe unit size, in FSBs. # # ChangeSet # 2004/04/21 14:33:51+10:00 nathans@sgi.com # [XFS] Return the right error code on an ACL xattr version mismatch. # # SGI Modid: xfs-linux:xfs-kern:169622a # # fs/xfs/xfs_acl.c # 2004/04/21 14:33:30+10:00 nathans@sgi.com +1 -1 # [XFS] Return the right error code on an ACL xattr version mismatch. # # ChangeSet # 2004/04/21 14:17:04+10:00 nathans@sgi.com # [XFS] Make buffer error checking consistent, add a value range check. # # SGI Modid: xfs-linux:xfs-kern:169542a # # fs/xfs/linux/xfs_buf.h # 2004/04/21 14:16:43+10:00 nathans@sgi.com +1 -1 # [XFS] Make buffer error checking consistent, add a value range check. # # fs/xfs/linux/xfs_buf.c # 2004/04/21 14:16:43+10:00 nathans@sgi.com +3 -2 # [XFS] Make buffer error checking consistent, add a value range check. # # ChangeSet # 2004/04/21 13:30:04+10:00 nathans@sgi.com # [XFS] Fix delayed write buffer handling to use the correct list # interfaces, add validity checks, remove unused code, fix comments. # # SGI Modid: xfs-linux:xfs-kern:169043a # # fs/xfs/xfs_vfsops.c # 2004/04/21 13:29:43+10:00 nathans@sgi.com +10 -10 # [XFS] Fix delayed write buffer handling to use the correct list # interfaces, add validity checks, remove unused code, fix comments. # # fs/xfs/linux/xfs_super.c # 2004/04/21 13:29:43+10:00 nathans@sgi.com +11 -9 # [XFS] Fix delayed write buffer handling to use the correct list # interfaces, add validity checks, remove unused code, fix comments. # # fs/xfs/linux/xfs_buf.h # 2004/04/21 13:29:43+10:00 nathans@sgi.com +2 -6 # [XFS] Fix delayed write buffer handling to use the correct list # interfaces, add validity checks, remove unused code, fix comments. # # fs/xfs/linux/xfs_buf.c # 2004/04/21 13:29:43+10:00 nathans@sgi.com +40 -77 # [XFS] Fix delayed write buffer handling to use the correct list # interfaces, add validity checks, remove unused code, fix comments. # # ChangeSet # 2004/04/21 13:04:38+10:00 nathans@sgi.com # [XFS] Fix a very hard-to-hit, small-block-size only corruption. # # SGI Modid: xfs-linux:xfs-kern:168987a # # fs/xfs/linux/xfs_buf.c # 2004/04/21 13:04:18+10:00 nathans@sgi.com +19 -13 # [XFS] Fix a very hard-to-hit, small-block-size only corruption. # # ChangeSet # 2004/04/21 12:52:18+10:00 sandeen@sgi.com # [XFS] Use pgoff_t for page indices, and remove other type confusion # # SGI Modid: xfs-linux:xfs-kern:168484a # # fs/xfs/linux/xfs_buf.c # 2004/04/21 12:51:58+10:00 sandeen@sgi.com +1 -1 # [XFS] Use pgoff_t for page indices, and remove other type confusion # # fs/xfs/linux/xfs_aops.c # 2004/04/21 12:51:58+10:00 sandeen@sgi.com +18 -16 # [XFS] Use pgoff_t for page indices, and remove other type confusion # # ChangeSet # 2004/04/21 12:45:09+10:00 hch@sgi.com # [XFS] clarify pagebuf page lookup logic # # SGI Modid: xfs-linux:xfs-kern:168168a # # fs/xfs/linux/xfs_buf.h # 2004/04/21 12:44:49+10:00 hch@sgi.com +0 -1 # [XFS] clarify pagebuf page lookup logic # # fs/xfs/linux/xfs_buf.c # 2004/04/21 12:44:49+10:00 hch@sgi.com +115 -140 # [XFS] clarify pagebuf page lookup logic # # ChangeSet # 2004/04/21 12:36:08+10:00 hch@sgi.com # [XFS] really kill the pagebuf vs xfs_buf confusion # # SGI Modid: xfs-linux:xfs-kern:167628a # # fs/xfs/linux/xfs_super.h # 2004/04/21 12:35:48+10:00 hch@sgi.com +8 -8 # [XFS] really kill the pagebuf vs xfs_buf confusion # # fs/xfs/linux/xfs_lrw.h # 2004/04/21 12:35:48+10:00 hch@sgi.com +3 -3 # [XFS] really kill the pagebuf vs xfs_buf confusion # # fs/xfs/linux/xfs_lrw.c # 2004/04/21 12:35:47+10:00 hch@sgi.com +2 -2 # [XFS] really kill the pagebuf vs xfs_buf confusion # # fs/xfs/linux/xfs_ioctl.c # 2004/04/21 12:35:47+10:00 hch@sgi.com +1 -1 # [XFS] really kill the pagebuf vs xfs_buf confusion # # fs/xfs/linux/xfs_buf.h # 2004/04/21 12:35:47+10:00 hch@sgi.com +53 -62 # [XFS] really kill the pagebuf vs xfs_buf confusion # # fs/xfs/linux/xfs_buf.c # 2004/04/21 12:35:47+10:00 hch@sgi.com +65 -65 # [XFS] really kill the pagebuf vs xfs_buf confusion # # ChangeSet # 2004/04/21 12:27:47+10:00 hch@sgi.com # [XFS] kill the pagebuf vs xfs_buf confusion # # SGI Modid: xfs-linux:xfs-kern:167627a # # fs/xfs/linux/xfs_aops.c # 2004/04/21 12:27:25+10:00 hch@sgi.com +3 -3 # [XFS] kill the pagebuf vs xfs_buf confusion # # ChangeSet # 2004/04/21 11:26:12+10:00 hch@sgi.com # [XFS] use kmem_alloc for noaddr buffers # # SGI Modid: xfs-linux:xfs-kern:167609a # # fs/xfs/linux/xfs_buf.c # 2004/04/21 11:18:46+10:00 hch@sgi.com +49 -45 # [XFS] use kmem_alloc for noaddr buffers # diff -Nru a/Documentation/SubmittingDrivers b/Documentation/SubmittingDrivers --- a/Documentation/SubmittingDrivers Tue May 4 21:53:36 2004 +++ b/Documentation/SubmittingDrivers Tue May 4 21:53:36 2004 @@ -119,7 +119,7 @@ Kernel traffic: Weekly summary of kernel list activity (much easier to read) - [http://kt.zork.net/kernel-traffic] + http://www.kerneltraffic.org/kernel-traffic/ Linux USB project: http://sourceforge.net/projects/linux-usb/ diff -Nru a/Documentation/kernel-docs.txt b/Documentation/kernel-docs.txt --- a/Documentation/kernel-docs.txt Tue May 4 21:53:36 2004 +++ b/Documentation/kernel-docs.txt Tue May 4 21:53:36 2004 @@ -694,7 +694,7 @@ produced during the week. Published every Thursday. * Name: "Kernel Traffic" - URL: http://kt.zork.net/kernel-traffic/ + URL: http://www.kerneltraffic.org/kernel-traffic/ Keywords: linux-kernel mailing list, weekly kernel news. Description: Weekly newsletter covering the most relevant discussions of the linux-kernel mailing list. diff -Nru a/MAINTAINERS b/MAINTAINERS --- a/MAINTAINERS Tue May 4 21:53:36 2004 +++ b/MAINTAINERS Tue May 4 21:53:36 2004 @@ -895,21 +895,21 @@ HEWLETT-PACKARD FIBRE CHANNEL 64-bit/66MHz PCI non-intelligent HBA P: Chase Maupin -M: Chase Maupin (support@compaq.com) - L: compaqandlinux@cpqlin.van-dijk.net - S: Supported +M: chase.maupin@hp.com +L: iss_storagedev@hp.com +S: Maintained HEWLETT-PACKARD SMART2 RAID DRIVER P: Francis Wiran -M: Francis Wiran - L: compaqandlinux@cpqlin.van-dijk.net - S: Supported +M: francis.wiran@hp.com +L: iss_storagedev@hp.com +S: Maintained HEWLETT-PACKARD SMART CISS RAID DRIVER -P: Mike Miller, Michael Ni -M: Mike Miller, Michael Ni - L: compaqandlinux@cpqlin.van-dijk.net - S: Supported +P: Mike Miller +M: mike.miller@hp.com +L: iss_storagedev@hp.com +S: Supported HP100: Driver for HP 10/100 Mbit/s Voice Grade Network Adapter Series P: Jaroslav Kysela diff -Nru a/arch/alpha/kernel/systbls.S b/arch/alpha/kernel/systbls.S --- a/arch/alpha/kernel/systbls.S Tue May 4 21:53:36 2004 +++ b/arch/alpha/kernel/systbls.S Tue May 4 21:53:36 2004 @@ -447,6 +447,16 @@ .quad sys_stat64 /* 425 */ .quad sys_lstat64 .quad sys_fstat64 + .quad sys_ni_syscall /* sys_vserver */ + .quad sys_ni_syscall /* sys_mbind */ + .quad sys_ni_syscall /* sys_get_mempolicy */ + .quad sys_ni_syscall /* sys_set_mempolicy */ + .quad sys_mq_open + .quad sys_mq_unlink + .quad sys_mq_timedsend + .quad sys_mq_timedreceive /* 435 */ + .quad sys_mq_notify + .quad sys_mq_getsetattr .size sys_call_table, . - sys_call_table .type sys_call_table, @object diff -Nru a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c --- a/arch/arm/common/dmabounce.c Tue May 4 21:53:35 2004 +++ b/arch/arm/common/dmabounce.c Tue May 4 21:53:35 2004 @@ -636,7 +636,7 @@ } if (!list_empty(&device_info->safe_buffers)) { - printk(KERN_ERR, + printk(KERN_ERR "%s: Removing from dmabounce with pending buffers!\n", dev->bus_id); BUG(); diff -Nru a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c --- a/arch/arm/common/sa1111.c Tue May 4 21:53:36 2004 +++ b/arch/arm/common/sa1111.c Tue May 4 21:53:36 2004 @@ -589,8 +589,7 @@ ret = dmabounce_register_dev(&dev->dev, 1024, 4096); if (ret) { printk("SA1111: Failed to register %s with dmabounce", dev->dev.bus_id); - kfree(dev); - device_unregister(dev); + device_unregister(&dev->dev); } } } @@ -779,8 +778,7 @@ /* * Check to see if either the start or end are illegal. */ - return ((addr & ~(*dev->dma_mask))) || - ((addr + size - 1) & ~(*dev->dma_mask)); + return ((addr & ~dma_mask)) || ((addr + size - 1) & ~dma_mask); } struct sa1111_save_data { diff -Nru a/arch/arm/configs/anakin_defconfig b/arch/arm/configs/anakin_defconfig --- a/arch/arm/configs/anakin_defconfig Tue May 4 21:53:35 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,632 +0,0 @@ -# -# Automatically generated make config: don't edit -# -CONFIG_ARM=y -# CONFIG_EISA is not set -# CONFIG_SBUS is not set -# CONFIG_MCA is not set -CONFIG_UID16=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set -# CONFIG_GENERIC_BUST_SPINLOCK is not set -# CONFIG_GENERIC_ISA_DMA is not set - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y - -# -# General setup -# -CONFIG_NET=y -# CONFIG_SYSVIPC is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_SYSCTL is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -# CONFIG_MODVERSIONS is not set -# CONFIG_KMOD is not set - -# -# System Type -# -# CONFIG_ARCH_ADIFCC is not set -CONFIG_ARCH_ANAKIN=y -# CONFIG_ARCH_ARCA5K is not set -# CONFIG_ARCH_CLPS7500 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_CO285 is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_CAMELOT is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_IOP310 is not set -# CONFIG_ARCH_L7200 is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_SHARK is not set - -# -# Archimedes/A5000 Implementations -# - -# -# Archimedes/A5000 Implementations (select only ONE) -# -# CONFIG_ARCH_ARC is not set -# CONFIG_ARCH_A5K is not set - -# -# Footbridge Implementations -# -# CONFIG_ARCH_CATS is not set -# CONFIG_ARCH_PERSONAL_SERVER is not set -# CONFIG_ARCH_EBSA285_ADDIN is not set -# CONFIG_ARCH_EBSA285_HOST is not set -# CONFIG_ARCH_NETWINDER is not set - -# -# SA11x0 Implementations -# -# CONFIG_SA1100_ASSABET is not set -# CONFIG_ASSABET_NEPONSET is not set -# CONFIG_SA1100_ADSBITSY is not set -# CONFIG_SA1100_BRUTUS is not set -# CONFIG_SA1100_CERF is not set -# CONFIG_SA1100_H3100 is not set -# CONFIG_SA1100_H3600 is not set -# CONFIG_SA1100_H3800 is not set -# CONFIG_SA1100_H3XXX is not set -# CONFIG_SA1100_EXTENEX1 is not set -# CONFIG_SA1100_FLEXANET is not set -# CONFIG_SA1100_FREEBIRD is not set -# CONFIG_SA1100_GRAPHICSCLIENT is not set -# CONFIG_SA1100_GRAPHICSMASTER is not set -# CONFIG_SA1100_BADGE4 is not set -# CONFIG_SA1100_JORNADA720 is not set -# CONFIG_SA1100_HUW_WEBPANEL is not set -# CONFIG_SA1100_ITSY is not set -# CONFIG_SA1100_LART is not set -# CONFIG_SA1100_NANOENGINE is not set -# CONFIG_SA1100_OMNIMETER is not set -# CONFIG_SA1100_PANGOLIN is not set -# CONFIG_SA1100_PLEB is not set -# CONFIG_SA1100_PT_SYSTEM3 is not set -# CONFIG_SA1100_SHANNON is not set -# CONFIG_SA1100_SHERMAN is not set -# CONFIG_SA1100_SIMPAD is not set -# CONFIG_SA1100_PFS168 is not set -# CONFIG_SA1100_VICTOR is not set -# CONFIG_SA1100_XP860 is not set -# CONFIG_SA1100_YOPY is not set -# CONFIG_SA1100_STORK is not set -# CONFIG_SA1100_USB is not set -# CONFIG_SA1100_USB_NETLINK is not set -# CONFIG_SA1100_USB_CHAR is not set -# CONFIG_H3600_SLEEVE is not set - -# -# CLPS711X/EP721X Implementations -# -# CONFIG_ARCH_AUTCPU12 is not set -# CONFIG_ARCH_CDB89712 is not set -# CONFIG_ARCH_CLEP7312 is not set -# CONFIG_ARCH_EDB7211 is not set -# CONFIG_ARCH_P720T is not set -# CONFIG_ARCH_FORTUNET is not set -# CONFIG_ARCH_EP7211 is not set -# CONFIG_ARCH_EP7212 is not set -# CONFIG_ARCH_ACORN is not set -# CONFIG_FOOTBRIDGE is not set -# CONFIG_FOOTBRIDGE_HOST is not set -# CONFIG_FOOTBRIDGE_ADDIN is not set -CONFIG_CPU_32=y -# CONFIG_CPU_26 is not set - -# -# Processor Type -# -# CONFIG_CPU_32v3 is not set -CONFIG_CPU_32v4=y -# CONFIG_CPU_32v5 is not set -# CONFIG_CPU_ARM610 is not set -# CONFIG_CPU_ARM710 is not set -# CONFIG_CPU_ARM720T is not set -# CONFIG_CPU_ARM920T is not set -# CONFIG_CPU_ARM922T is not set -# CONFIG_CPU_ARM926T is not set -# CONFIG_CPU_ARM1020 is not set -CONFIG_CPU_SA110=y -# CONFIG_CPU_SA1100 is not set -# CONFIG_CPU_XSCALE is not set -# CONFIG_XSCALE_PMU is not set - -# -# Processor Features -# - -# -# General setup -# -# CONFIG_DISCONTIGMEM is not set -# CONFIG_PCI is not set -# CONFIG_ISA is not set -# CONFIG_ISA_DMA is not set -# CONFIG_FIQ is not set -# CONFIG_ZBOOT_ROM is not set -CONFIG_ZBOOT_ROM_TEXT=0 -CONFIG_ZBOOT_ROM_BSS=0 -# CONFIG_HOTPLUG is not set -# CONFIG_PCMCIA is not set - -# -# At least one math emulation must be selected -# -CONFIG_FPE_NWFPE=y -# CONFIG_FPE_FASTFPE is not set -CONFIG_KCORE_ELF=y -# CONFIG_KCORE_AOUT is not set -CONFIG_BINFMT_AOUT=y -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_MISC is not set -# CONFIG_PM is not set -# CONFIG_PREEMPT is not set -# CONFIG_APM is not set -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="root=/dev/ram initrd=0xc0800000,4M" -CONFIG_ALIGNMENT_TRAP=y - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Plug and Play configuration -# -# CONFIG_PNP is not set -# CONFIG_ISAPNP is not set -# CONFIG_PNPBIOS is not set - -# -# Block devices -# -# CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_DEV_XD is not set -# CONFIG_PARIDE is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_CISS_SCSI_TAPE is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_LOOP is not set -# CONFIG_BLK_DEV_NBD is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_BLK_DEV_INITRD=y - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set -# CONFIG_BLK_DEV_MD is not set -# CONFIG_MD_LINEAR is not set -# CONFIG_MD_RAID0 is not set -# CONFIG_MD_RAID1 is not set -# CONFIG_MD_RAID5 is not set -# CONFIG_MD_MULTIPATH is not set -# CONFIG_BLK_DEV_LVM is not set - -# -# Networking options -# -# CONFIG_PACKET is not set -# CONFIG_NETLINK_DEV is not set -# CONFIG_NETFILTER is not set -# CONFIG_FILTER is not set -CONFIG_UNIX=y -CONFIG_INET=y -# CONFIG_IP_MULTICAST is not set -# CONFIG_IP_ADVANCED_ROUTER is not set -# CONFIG_IP_PNP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_ARPD is not set -# CONFIG_INET_ECN is not set -# CONFIG_SYN_COOKIES is not set -# CONFIG_IPV6 is not set -# CONFIG_KHTTPD is not set -# CONFIG_ATM is not set -# CONFIG_VLAN_8021Q is not set - -# -# -# -# CONFIG_IPX is not set -# CONFIG_ATALK is not set - -# -# Appletalk devices -# -# CONFIG_DEV_APPLETALK is not set -# CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_LLC is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set -# CONFIG_NET_FASTROUTE is not set -# CONFIG_NET_HW_FLOWCONTROL is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network device support -# -# CONFIG_NETDEVICES is not set - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set - -# -# IrDA (infrared) support -# -CONFIG_IRDA=y - -# -# IrDA protocols -# -# CONFIG_IRLAN is not set -# CONFIG_IRCOMM is not set -# CONFIG_IRDA_ULTRA is not set - -# -# IrDA options -# -# CONFIG_IRDA_CACHE_LAST_LSAP is not set -# CONFIG_IRDA_FAST_RR is not set -# CONFIG_IRDA_DEBUG is not set - -# -# Infrared-port device drivers -# - -# -# SIR device drivers -# -CONFIG_IRTTY_SIR=y -# CONFIG_IRPORT_SIR is not set - -# -# Dongle support -# -# CONFIG_DONGLE is not set - -# -# FIR device drivers -# -# CONFIG_USB_IRDA is not set -# CONFIG_NSC_FIR is not set -# CONFIG_WINBOND_FIR is not set -# CONFIG_TOSHIBA_FIR is not set -# CONFIG_SMC_IRCC_FIR is not set -# CONFIG_ALI_FIR is not set -# CONFIG_VLSI_FIR is not set - -# -# ATA/IDE/MFM/RLL support -# -# CONFIG_IDE is not set -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI support -# -# CONFIG_SCSI is not set - -# -# I2O device support -# -# CONFIG_I2O is not set -# CONFIG_I2O_BLOCK is not set -# CONFIG_I2O_LAN is not set -# CONFIG_I2O_SCSI is not set -# CONFIG_I2O_PROC is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN_BOOL is not set - -# -# Input device support -# -# CONFIG_INPUT is not set -# CONFIG_INPUT_KEYBDEV is not set -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_EVDEV is not set -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -# CONFIG_GAMEPORT_NS558 is not set -# CONFIG_GAMEPORT_L4 is not set -# CONFIG_INPUT_EMU10K1 is not set -# CONFIG_GAMEPORT_PCIGAME is not set -# CONFIG_GAMEPORT_FM801 is not set -# CONFIG_GAMEPORT_CS461x is not set -# CONFIG_SERIO is not set -# CONFIG_SERIO_SERPORT is not set - -# -# Character devices -# -CONFIG_VT=y -# CONFIG_VT_CONSOLE is not set -# CONFIG_SERIAL_EXTENDED is not set -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set -# CONFIG_SERIAL_8250_CONSOLE is not set -# CONFIG_SERIAL_8250_EXTENDED is not set -# CONFIG_SERIAL_8250_MANY_PORTS is not set -# CONFIG_SERIAL_8250_SHARE_IRQ is not set -# CONFIG_SERIAL_8250_DETECT_IRQ is not set -# CONFIG_SERIAL_8250_MULTIPORT is not set -# CONFIG_SERIAL_8250_RSA is not set - -# -# Non-8250 serial port support -# - -# -# ARM Serial drivers -# -# CONFIG_ATOMWIDE_SERIAL is not set -# CONFIG_DUALSP_SERIAL is not set -CONFIG_SERIAL_ANAKIN=y -CONFIG_SERIAL_ANAKIN_CONSOLE=y -CONFIG_ANAKIN_DEFAULT_BAUDRATE=115200 -# CONFIG_SERIAL_AMBA is not set -# CONFIG_SERIAL_AMBA_CONSOLE is not set -# CONFIG_SERIAL_CLPS711X is not set -# CONFIG_SERIAL_CLPS711X_CONSOLE is not set -# CONFIG_SERIAL_21285 is not set -# CONFIG_SERIAL_21285_OLD is not set -# CONFIG_SERIAL_21285_CONSOLE is not set -# CONFIG_SERIAL_UART00 is not set -# CONFIG_SERIAL_UART00_CONSOLE is not set -# CONFIG_SERIAL_SA1100 is not set -# CONFIG_SERIAL_SA1100_CONSOLE is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_TOUCHSCREEN_ANAKIN=y -# CONFIG_UNIX98_PTYS is not set - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# L3 serial bus support -# -# CONFIG_L3 is not set -# CONFIG_L3_ALGOBIT is not set -# CONFIG_L3_BIT_SA1100_GPIO is not set - -# -# Other L3 adapters -# -# CONFIG_L3_SA1111 is not set -# CONFIG_BIT_SA1100_GPIO is not set - -# -# Mice -# -# CONFIG_BUSMOUSE is not set -# CONFIG_MOUSE is not set -# CONFIG_QIC02_TAPE is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -# CONFIG_INTEL_RNG is not set -# CONFIG_NVRAM is not set -# CONFIG_RTC is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set -# CONFIG_DRM is not set - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# File systems -# -# CONFIG_QUOTA is not set -# CONFIG_QFMT_V1 is not set -# CONFIG_QFMT_V2 is not set -# CONFIG_QIFACE_COMPAT is not set -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_REISERFS_FS is not set -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set -# CONFIG_ADFS_FS is not set -# CONFIG_ADFS_FS_RW is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EXT3_FS is not set -# CONFIG_JBD is not set -# CONFIG_JBD_DEBUG is not set -# CONFIG_FAT_FS is not set -# CONFIG_MSDOS_FS is not set -# CONFIG_UMSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -# CONFIG_JFFS2_FS is not set -# CONFIG_CRAMFS is not set -# CONFIG_TMPFS is not set -CONFIG_RAMFS=y -# CONFIG_ISO9660_FS is not set -# CONFIG_JOLIET is not set -# CONFIG_ZISOFS is not set -# CONFIG_JFS_FS is not set -# CONFIG_JFS_DEBUG is not set -# CONFIG_JFS_STATISTICS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_NTFS_FS is not set -# CONFIG_NTFS_DEBUG is not set -# CONFIG_NTFS_RW is not set -# CONFIG_HPFS_FS is not set -CONFIG_PROC_FS=y -# CONFIG_DEVFS_FS is not set -# CONFIG_DEVFS_MOUNT is not set -# CONFIG_DEVFS_DEBUG is not set -# CONFIG_DEVPTS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX4FS_RW is not set -# CONFIG_ROMFS_FS is not set -CONFIG_EXT2_FS=y -# CONFIG_SYSV_FS is not set -# CONFIG_UDF_FS is not set -# CONFIG_UDF_RW is not set -# CONFIG_UFS_FS is not set -# CONFIG_UFS_FS_WRITE is not set - -# -# Network File Systems -# -# CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set -# CONFIG_NFS_FS is not set -# CONFIG_NFS_V3 is not set -# CONFIG_ROOT_NFS is not set -# CONFIG_NFSD is not set -# CONFIG_NFSD_V3 is not set -# CONFIG_NFSD_TCP is not set -# CONFIG_SUNRPC is not set -# CONFIG_LOCKD is not set -# CONFIG_EXPORTFS is not set -# CONFIG_SMB_FS is not set -# CONFIG_NCP_FS is not set -# CONFIG_NCPFS_PACKET_SIGNING is not set -# CONFIG_NCPFS_IOCTL_LOCKING is not set -# CONFIG_NCPFS_STRONG is not set -# CONFIG_NCPFS_NFS_NS is not set -# CONFIG_NCPFS_OS2_NS is not set -# CONFIG_NCPFS_SMALLDOS is not set -# CONFIG_NCPFS_NLS is not set -# CONFIG_NCPFS_EXTRAS is not set -# CONFIG_ZISOFS_FS is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -# CONFIG_SMB_NLS is not set -# CONFIG_NLS is not set - -# -# Console drivers -# -CONFIG_PC_KEYMAP=y -# CONFIG_VGA_CONSOLE is not set - -# -# Frame-buffer support -# -CONFIG_FB=y -CONFIG_DUMMY_CONSOLE=y -# CONFIG_FB_ACORN is not set -CONFIG_FB_ANAKIN=y -# CONFIG_FB_CLPS711X is not set -# CONFIG_FB_SA1100 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_VIRTUAL is not set -# CONFIG_FBCON_ADVANCED is not set -CONFIG_FBCON_CFB16=y -# CONFIG_FBCON_FONTWIDTH8_ONLY is not set -# CONFIG_FBCON_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Multimedia Capabilities Port drivers -# -# CONFIG_MCP is not set -# CONFIG_MCP_SA1100 is not set -# CONFIG_MCP_UCB1200 is not set -# CONFIG_MCP_UCB1200_AUDIO is not set -# CONFIG_MCP_UCB1200_TS is not set - -# -# Console Switches -# -# CONFIG_SWITCHES is not set - -# -# USB support -# -# CONFIG_USB is not set - -# -# Bluetooth support -# -# CONFIG_BT is not set - -# -# Kernel hacking -# -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_USER=y -# CONFIG_DEBUG_INFO is not set -# CONFIG_DEBUG_KERNEL is not set -# CONFIG_DEBUG_SLAB is not set -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_WAITQ is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_DEBUG_ERRORS is not set -# CONFIG_DEBUG_LL is not set -# CONFIG_DEBUG_DC21285_PORT is not set -# CONFIG_DEBUG_CLPS711X_UART2 is not set - -# -# Library routines -# -# CONFIG_CRC32 is not set -# CONFIG_ZLIB_INFLATE is not set -# CONFIG_ZLIB_DEFLATE is not set diff -Nru a/arch/arm/configs/assabet_defconfig b/arch/arm/configs/assabet_defconfig --- a/arch/arm/configs/assabet_defconfig Tue May 4 21:53:35 2004 +++ b/arch/arm/configs/assabet_defconfig Tue May 4 21:53:35 2004 @@ -2,62 +2,95 @@ # Automatically generated make config: don't edit # CONFIG_ARM=y -# CONFIG_EISA is not set -# CONFIG_SBUS is not set -# CONFIG_MCA is not set +CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y -# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set -# CONFIG_GENERIC_BUST_SPINLOCK is not set -# CONFIG_GENERIC_ISA_DMA is not set # # Code maturity level options # CONFIG_EXPERIMENTAL=y -# CONFIG_OBSOLETE is not set +CONFIG_CLEAN_COMPILE=y +CONFIG_STANDALONE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_HOTPLUG=y +# CONFIG_IKCONFIG is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y # # Loadable module support # CONFIG_MODULES=y +# CONFIG_MODULE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set # CONFIG_KMOD is not set # # System Type # -# CONFIG_ARCH_ARCA5K is not set +# CONFIG_ARCH_ADIFCC is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set +# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_EBSA110 is not set # CONFIG_ARCH_CAMELOT is not set # CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_IOP3XX is not set # CONFIG_ARCH_L7200 is not set # CONFIG_ARCH_RPC is not set CONFIG_ARCH_SA1100=y # CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE_PB is not set # -# Archimedes/A5000 Implementations +# CLPS711X/EP721X Implementations # # -# Archimedes/A5000 Implementations (select only ONE) +# Epxa10db # -# CONFIG_ARCH_ARC is not set -# CONFIG_ARCH_A5K is not set # # Footbridge Implementations # -# CONFIG_ARCH_CATS is not set -# CONFIG_ARCH_PERSONAL_SERVER is not set -# CONFIG_ARCH_EBSA285_ADDIN is not set -# CONFIG_ARCH_EBSA285_HOST is not set -# CONFIG_ARCH_NETWINDER is not set + +# +# IOP3xx Implementation Options +# +# CONFIG_ARCH_IOP310 is not set +# CONFIG_ARCH_IOP321 is not set + +# +# IOP3xx Chipset Features +# + +# +# Intel PXA250/210 Implementations +# # # SA11x0 Implementations @@ -67,13 +100,17 @@ # CONFIG_SA1100_ADSBITSY is not set # CONFIG_SA1100_BRUTUS is not set # CONFIG_SA1100_CERF is not set +# CONFIG_SA1100_H3100 is not set # CONFIG_SA1100_H3600 is not set +# CONFIG_SA1100_H3800 is not set # CONFIG_SA1100_EXTENEX1 is not set # CONFIG_SA1100_FLEXANET is not set # CONFIG_SA1100_FREEBIRD is not set # CONFIG_SA1100_GRAPHICSCLIENT is not set # CONFIG_SA1100_GRAPHICSMASTER is not set +# CONFIG_SA1100_BADGE4 is not set # CONFIG_SA1100_JORNADA720 is not set +# CONFIG_SA1100_HACKKIT is not set # CONFIG_SA1100_HUW_WEBPANEL is not set # CONFIG_SA1100_ITSY is not set # CONFIG_SA1100_LART is not set @@ -81,80 +118,91 @@ # CONFIG_SA1100_OMNIMETER is not set # CONFIG_SA1100_PANGOLIN is not set # CONFIG_SA1100_PLEB is not set +# CONFIG_SA1100_PT_SYSTEM3 is not set +# CONFIG_SA1100_SHANNON is not set # CONFIG_SA1100_SHERMAN is not set # CONFIG_SA1100_SIMPAD is not set # CONFIG_SA1100_PFS168 is not set # CONFIG_SA1100_VICTOR is not set # CONFIG_SA1100_XP860 is not set # CONFIG_SA1100_YOPY is not set +# CONFIG_SA1100_STORK is not set +# CONFIG_SA1100_SSP is not set CONFIG_SA1100_USB=m CONFIG_SA1100_USB_NETLINK=m # CONFIG_SA1100_USB_CHAR is not set # -# CLPS711X/EP721X Implementations +# TI OMAP Implementations +# + +# +# OMAP Feature Selections +# + +# +# S3C2410 Implementations # -# CONFIG_ARCH_CDB89712 is not set -# CONFIG_ARCH_CLEP7312 is not set -# CONFIG_ARCH_EDB7211 is not set -# CONFIG_ARCH_P720T is not set -# CONFIG_ARCH_EP7211 is not set -# CONFIG_ARCH_EP7212 is not set -# CONFIG_ARCH_ACORN is not set -# CONFIG_FOOTBRIDGE is not set -# CONFIG_FOOTBRIDGE_HOST is not set -# CONFIG_FOOTBRIDGE_ADDIN is not set -CONFIG_CPU_32=y -# CONFIG_CPU_26 is not set # # Processor Type # -# CONFIG_CPU_32v3 is not set -CONFIG_CPU_32v4=y -# CONFIG_CPU_ARM610 is not set -# CONFIG_CPU_ARM710 is not set -# CONFIG_CPU_ARM720T is not set -# CONFIG_CPU_ARM920T is not set -# CONFIG_CPU_ARM1020 is not set -# CONFIG_CPU_SA110 is not set +CONFIG_CPU_32=y CONFIG_CPU_SA1100=y -# CONFIG_ARM_THUMB is not set -CONFIG_DISCONTIGMEM=y +CONFIG_CPU_32v4=y +CONFIG_CPU_ABRT_EV4=y +CONFIG_CPU_CACHE_V4WB=y +CONFIG_CPU_TLB_V4WB=y +CONFIG_CPU_MINICACHE=y + +# +# Processor Features +# # # General setup # -# CONFIG_PCI is not set +CONFIG_DISCONTIGMEM=y CONFIG_ISA=y -# CONFIG_ISA_DMA is not set +# CONFIG_ZBOOT_ROM is not set +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_CPU_FREQ=y -CONFIG_HOTPLUG=y +CONFIG_CPU_FREQ_SA1110=y +# CONFIG_CPU_FREQ_PROC_INTF is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y +# CONFIG_CPU_FREQ_GOV_PERFORMANCE is not set +# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_24_API=y # # PCMCIA/CardBus support # CONFIG_PCMCIA=y +# CONFIG_PCMCIA_DEBUG is not set # CONFIG_I82365 is not set # CONFIG_TCIC is not set -# CONFIG_PCMCIA_CLPS6700 is not set CONFIG_PCMCIA_SA1100=y -CONFIG_NET=y -CONFIG_SYSVIPC=y -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y # # At least one math emulation must be selected # CONFIG_FPE_NWFPE=y +# CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set -CONFIG_KCORE_ELF=y -# CONFIG_KCORE_AOUT is not set -# CONFIG_BINFMT_AOUT is not set CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set + +# +# Generic Driver Options +# +# CONFIG_FW_LOADER is not set CONFIG_PM=y +# CONFIG_PREEMPT is not set +# CONFIG_APM is not set # CONFIG_ARTHUR is not set CONFIG_CMDLINE="mem=32M console=ttySA0,38400n8 initrd=0xc0800000,3M root=/dev/ram" CONFIG_LEDS=y @@ -173,8 +221,9 @@ CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_CONCAT is not set CONFIG_MTD_REDBOOT_PARTS=y -# CONFIG_MTD_BOOTLDR_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set # CONFIG_MTD_AFS_PARTS is not set # @@ -184,6 +233,7 @@ CONFIG_MTD_BLOCK=y # CONFIG_FTL is not set # CONFIG_NFTL is not set +# CONFIG_INFTL is not set # # RAM/ROM/Flash chip drivers @@ -199,35 +249,31 @@ # CONFIG_MTD_CFI_B1 is not set # CONFIG_MTD_CFI_B2 is not set CONFIG_MTD_CFI_B4=y +# CONFIG_MTD_CFI_B8 is not set # CONFIG_MTD_CFI_I1 is not set CONFIG_MTD_CFI_I2=y # CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set CONFIG_MTD_CFI_INTELEXT=y # CONFIG_MTD_CFI_AMDSTD is not set +# CONFIG_MTD_CFI_STAA is not set # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set # CONFIG_MTD_OBSOLETE_CHIPS is not set -# CONFIG_MTD_AMDSTD is not set -# CONFIG_MTD_SHARP is not set -# CONFIG_MTD_JEDEC is not set # # Mapping drivers for chip access # +# CONFIG_MTD_COMPLEX_MAPPINGS is not set # CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_NORA is not set # CONFIG_MTD_ARM_INTEGRATOR is not set -# CONFIG_MTD_CDB89712 is not set CONFIG_MTD_SA1100=y -# CONFIG_MTD_DC21285 is not set -# CONFIG_MTD_IQ80310 is not set -# CONFIG_MTD_PCI is not set +# CONFIG_MTD_EDB7312 is not set # # Self-contained MTD device drivers # -# CONFIG_MTD_PMC551 is not set # CONFIG_MTD_SLRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set @@ -235,10 +281,9 @@ # # Disk-On-Chip Device Drivers # -# CONFIG_MTD_DOC1000 is not set # CONFIG_MTD_DOC2000 is not set # CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOCPROBE is not set +# CONFIG_MTD_DOC2001PLUS is not set # # NAND Flash Device Drivers @@ -246,23 +291,17 @@ # CONFIG_MTD_NAND is not set # -# Plug and Play configuration +# Plug and Play support # # CONFIG_PNP is not set -# CONFIG_ISAPNP is not set -# CONFIG_PNPBIOS is not set # # Block devices # # CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_DEV_XD is not set -# CONFIG_PARIDE is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_CISS_SCSI_TAPE is not set -# CONFIG_BLK_DEV_DAC960 is not set CONFIG_BLK_DEV_LOOP=m +# CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 @@ -272,44 +311,46 @@ # Multi-device support (RAID and LVM) # # CONFIG_MD is not set -# CONFIG_BLK_DEV_MD is not set -# CONFIG_MD_LINEAR is not set -# CONFIG_MD_RAID0 is not set -# CONFIG_MD_RAID1 is not set -# CONFIG_MD_RAID5 is not set -# CONFIG_MD_MULTIPATH is not set -# CONFIG_BLK_DEV_LVM is not set + +# +# Networking support +# +CONFIG_NET=y # # Networking options # # CONFIG_PACKET is not set -# CONFIG_NETLINK is not set -# CONFIG_NETFILTER is not set -# CONFIG_FILTER is not set +# CONFIG_NETLINK_DEV is not set CONFIG_UNIX=y +# CONFIG_NET_KEY is not set CONFIG_INET=y # CONFIG_IP_MULTICAST is not set # CONFIG_IP_ADVANCED_ROUTER is not set # CONFIG_IP_PNP is not set # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set -# CONFIG_INET_ECN 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_IPV6 is not set -# CONFIG_KHTTPD is not set -# CONFIG_ATM 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_DECNET is not set -# CONFIG_BRIDGE is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set -# CONFIG_LLC is not set # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set @@ -322,29 +363,77 @@ # CONFIG_NET_SCHED is not set # -# Network device support +# Network testing # -CONFIG_NETDEVICES=y +# CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +CONFIG_IRDA=m # -# ARCnet devices +# IrDA protocols # -# CONFIG_ARCNET is not set +CONFIG_IRLAN=m +# CONFIG_IRCOMM is not set +# CONFIG_IRDA_ULTRA is not set + +# +# IrDA options +# +# CONFIG_IRDA_CACHE_LAST_LSAP is not set +# CONFIG_IRDA_FAST_RR is not set +# CONFIG_IRDA_DEBUG is not set + +# +# Infrared-port device drivers +# + +# +# SIR device drivers +# +# CONFIG_IRTTY_SIR is not set + +# +# Dongle support +# + +# +# Old SIR device drivers +# +# CONFIG_IRPORT_SIR is not set + +# +# Old Serial dongle support +# + +# +# FIR device drivers +# +# CONFIG_NSC_FIR is not set +# CONFIG_WINBOND_FIR is not set +# CONFIG_TOSHIBA_FIR is not set +# CONFIG_SMC_IRCC_FIR is not set +# CONFIG_ALI_FIR is not set +CONFIG_SA1100_FIR=m +# CONFIG_VIA_FIR is not set +# CONFIG_BT is not set +CONFIG_NETDEVICES=y # CONFIG_DUMMY is not set # CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set # CONFIG_TUN is not set # +# ARCnet devices +# +# CONFIG_ARCNET is not set + +# # Ethernet (10 or 100Mbit) # CONFIG_NET_ETHERNET=y -# CONFIG_ARM_AM79C961A is not set -# CONFIG_SUNLANCE is not set -# CONFIG_SUNBMAC is not set -# CONFIG_SUNQE is not set -# CONFIG_SUNLANCE is not set -# CONFIG_SUNGEM is not set +# CONFIG_MII is not set # CONFIG_NET_VENDOR_3COM is not set # CONFIG_LANCE is not set # CONFIG_NET_VENDOR_SMC is not set @@ -359,36 +448,20 @@ # # Ethernet (1000 Mbit) # -# CONFIG_ACENIC is not set -# CONFIG_DL2K is not set -# CONFIG_MYRI_SBUS is not set -# CONFIG_NS83820 is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_SK98LIN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set # -# Wireless LAN (non-hamradio) +# Ethernet (10000 Mbit) # -# CONFIG_NET_RADIO is not set # # Token Ring devices # # CONFIG_TR is not set -# CONFIG_NET_FC is not set -# CONFIG_RCPCI is not set -# CONFIG_SHAPER is not set # -# Wan interfaces +# Wireless LAN (non-hamradio) # -# CONFIG_WAN is not set +# CONFIG_NET_RADIO is not set # # PCMCIA network device support @@ -401,201 +474,143 @@ # CONFIG_PCMCIA_NMCLAN is not set # CONFIG_PCMCIA_SMC91C92 is not set # CONFIG_PCMCIA_XIRC2PS is not set -# CONFIG_ARCNET_COM20020_CS is not set -# CONFIG_PCMCIA_IBMTR is not set -# CONFIG_NET_PCMCIA_RADIO is not set - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set - -# -# IrDA (infrared) support -# -CONFIG_IRDA=m - -# -# IrDA protocols -# -CONFIG_IRLAN=m -# CONFIG_IRNET is not set -# CONFIG_IRCOMM is not set -# CONFIG_IRDA_ULTRA is not set -# CONFIG_IRDA_OPTIONS is not set - -# -# Infrared-port device drivers -# - -# -# SIR device drivers -# -# CONFIG_IRTTY_SIR is not set -# CONFIG_IRPORT_SIR is not set - -# -# Dongle support -# -# CONFIG_DONGLE is not set +# CONFIG_PCMCIA_AXNET is not set # -# FIR device drivers +# Wan interfaces # -# CONFIG_USB_IRDA is not set -# CONFIG_NSC_FIR is not set -# CONFIG_WINBOND_FIR is not set -# CONFIG_TOSHIBA_FIR is not set -# CONFIG_SMC_IRCC_FIR is not set -# CONFIG_ALI_FIR is not set -# CONFIG_VLSI_FIR is not set -CONFIG_SA1100_FIR=m +# CONFIG_WAN is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # -# ATA/IDE/MFM/RLL support +# ATA/ATAPI/MFM/RLL support # CONFIG_IDE=y - -# -# IDE, ATA and ATAPI Block devices -# CONFIG_BLK_DEV_IDE=y # # Please see Documentation/ide.txt for help/info on IDE drives # -# CONFIG_BLK_DEV_HD_IDE is not set -# CONFIG_BLK_DEV_HD is not set CONFIG_BLK_DEV_IDEDISK=y # CONFIG_IDEDISK_MULTI_MODE is not set -CONFIG_BLK_DEV_IDECS=y +# CONFIG_IDEDISK_STROKE is not set # CONFIG_BLK_DEV_IDECD is not set # 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 +# CONFIG_IDE_TASKFILE_IO is not set # # IDE chipset support/bugfixes # -# CONFIG_BLK_DEV_CMD640 is not set -# CONFIG_BLK_DEV_CMD640_ENHANCED is not set -# CONFIG_BLK_DEV_ISAPNP is not set +CONFIG_IDE_GENERIC=y # CONFIG_IDE_CHIPSETS is not set +# CONFIG_BLK_DEV_IDEDMA is not set # CONFIG_IDEDMA_AUTO is not set -# CONFIG_BLK_DEV_ATARAID is not set -# CONFIG_BLK_DEV_ATARAID_PDC is not set -# CONFIG_BLK_DEV_ATARAID_HPT is not set +# CONFIG_BLK_DEV_HD is not set # -# SCSI support +# SCSI device support # # CONFIG_SCSI is not set # -# I2O device support +# Fusion MPT device support # -# CONFIG_I2O is not set -# CONFIG_I2O_BLOCK is not set -# CONFIG_I2O_LAN is not set -# CONFIG_I2O_SCSI is not set -# CONFIG_I2O_PROC is not set # -# ISDN subsystem +# IEEE 1394 (FireWire) support # -# CONFIG_ISDN is not set +# CONFIG_IEEE1394 is not set # -# Input core support +# I2O device support # -# CONFIG_INPUT is not set -# CONFIG_INPUT_KEYBDEV is not set -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_EVDEV is not set # -# Character devices +# ISDN subsystem # -CONFIG_VT=y -# CONFIG_VT_CONSOLE is not set -# CONFIG_SERIAL is not set -# CONFIG_SERIAL_EXTENDED is not set -# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_ISDN is not set # -# Serial drivers +# Input device support # -# CONFIG_SERIAL_AMBA is not set -# CONFIG_SERIAL_AMBA_CONSOLE is not set -# CONFIG_SERIAL_CLPS711X is not set -# CONFIG_SERIAL_CLPS711X_CONSOLE is not set -# CONFIG_SERIAL_21285 is not set -# CONFIG_SERIAL_21285_OLD is not set -# CONFIG_SERIAL_21285_CONSOLE is not set -# CONFIG_SERIAL_UART00 is not set -# CONFIG_SERIAL_UART00_CONSOLE is not set -CONFIG_SERIAL_SA1100=y -CONFIG_SERIAL_SA1100_CONSOLE=y -CONFIG_SA1100_DEFAULT_BAUDRATE=38400 -CONFIG_SERIAL_8250=m -# CONFIG_SERIAL_8250_CONSOLE is not set -# CONFIG_SERIAL_8250_EXTENDED is not set -# CONFIG_SERIAL_8250_MANY_PORTS is not set -# CONFIG_SERIAL_8250_SHARE_IRQ is not set -# CONFIG_SERIAL_8250_DETECT_IRQ is not set -# CONFIG_SERIAL_8250_MULTIPORT is not set -# CONFIG_SERIAL_8250_HUB6 is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=32 +CONFIG_INPUT=y # -# I2C support +# Userland interfaces # -# CONFIG_I2C is not set +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_TSDEV=y +CONFIG_INPUT_TSDEV_SCREEN_X=240 +CONFIG_INPUT_TSDEV_SCREEN_Y=320 +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set # -# L3 serial bus support +# Input I/O drivers # -CONFIG_L3=y -CONFIG_L3_ALGOBIT=y -CONFIG_L3_BIT_SA1100_GPIO=y +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y +# CONFIG_SERIO is not set +# CONFIG_SERIO_I8042 is not set # -# Other L3 adapters +# Input Device Drivers # -# CONFIG_L3_SA1111 is not set -CONFIG_BIT_SA1100_GPIO=y +# 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 # -# Mice +# Character devices # -# CONFIG_BUSMOUSE is not set -# CONFIG_MOUSE is not set +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_SERIAL_NONSTANDARD is not set # -# Joysticks +# Serial drivers # -# CONFIG_INPUT_GAMEPORT is not set +CONFIG_SERIAL_8250=m +# CONFIG_SERIAL_8250_CS is not set +CONFIG_SERIAL_8250_NR_UARTS=4 +# CONFIG_SERIAL_8250_EXTENDED is not set # -# Input core support is needed for gameports +# Non-8250 serial port support # +CONFIG_SERIAL_SA1100=y +CONFIG_SERIAL_SA1100_CONSOLE=y +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 +# CONFIG_QIC02_TAPE is not set # -# Input core support is needed for joysticks +# IPMI # -# CONFIG_QIC02_TAPE is not set +# CONFIG_IPMI_HANDLER is not set # # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_INTEL_RNG is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set +# CONFIG_GEN_RTC is not set CONFIG_SA1100_RTC=y # CONFIG_DTLK is not set # CONFIG_R3964 is not set @@ -611,8 +626,21 @@ # # PCMCIA character devices # -CONFIG_PCMCIA_SERIAL_CS=m -# CONFIG_MWAVE is not set +# CONFIG_SYNCLINK_CS is not set +# CONFIG_RAW_DRIVER is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# L3 serial bus support +# +CONFIG_L3=y +CONFIG_L3_ALGOBIT=y +CONFIG_L3_BIT_SA1100_GPIO=y +CONFIG_BIT_SA1100_GPIO=y # # Multimedia devices @@ -620,81 +648,95 @@ # CONFIG_VIDEO_DEV is not set # +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set -# CONFIG_REISERFS_FS is not set -# CONFIG_REISERFS_CHECK is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +# CONFIG_VFAT_FS is not set +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_SYSFS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVPTS_FS_XATTR is not set +CONFIG_TMPFS=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# # CONFIG_ADFS_FS is not set -# CONFIG_ADFS_FS_RW 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_CMS_FS is not set -# CONFIG_EXT3_FS is not set -# CONFIG_JBD is not set -# CONFIG_JBD_DEBUG is not set -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -# CONFIG_UMSDOS_FS is not set -# CONFIG_VFAT_FS is not set # CONFIG_EFS_FS is not set # CONFIG_JFFS_FS is not set CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 +# CONFIG_JFFS2_FS_NAND is not set # CONFIG_CRAMFS is not set -CONFIG_TMPFS=y -# CONFIG_RAMFS is not set -# CONFIG_ISO9660_FS is not set -# CONFIG_JOLIET is not set -# CONFIG_ZISOFS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_FREEVXFS_FS is not set -# CONFIG_NTFS_FS is not set -# CONFIG_NTFS_DEBUG is not set -# CONFIG_NTFS_RW is not set +# CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set -CONFIG_PROC_FS=y -# CONFIG_DEVFS_FS is not set -# CONFIG_DEVFS_MOUNT is not set -# CONFIG_DEVFS_DEBUG is not set -CONFIG_DEVPTS_FS=y # CONFIG_QNX4FS_FS is not set -# CONFIG_QNX4FS_RW is not set -# CONFIG_ROMFS_FS is not set -CONFIG_EXT2_FS=y # CONFIG_SYSV_FS is not set -# CONFIG_UDF_FS is not set -# CONFIG_UDF_RW is not set # CONFIG_UFS_FS is not set -# CONFIG_UFS_FS_WRITE is not set # # Network File Systems # -# CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set CONFIG_NFS_FS=y # CONFIG_NFS_V3 is not set -# CONFIG_ROOT_NFS is not set +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set # CONFIG_NFSD is not set -# CONFIG_NFSD_V3 is not set -CONFIG_SUNRPC=y CONFIG_LOCKD=y +# CONFIG_EXPORTFS is not set +CONFIG_SUNRPC=y +# CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set # CONFIG_NCP_FS is not set -# CONFIG_NCPFS_PACKET_SIGNING is not set -# CONFIG_NCPFS_IOCTL_LOCKING is not set -# CONFIG_NCPFS_STRONG is not set -# CONFIG_NCPFS_NFS_NS is not set -# CONFIG_NCPFS_OS2_NS is not set -# CONFIG_NCPFS_SMALLDOS is not set -# CONFIG_NCPFS_NLS is not set -# CONFIG_NCPFS_EXTRAS is not set -# CONFIG_ZISOFS_FS is not set -# CONFIG_ZLIB_FS_INFLATE is not set +# CONFIG_CODA_FS is not set +# CONFIG_INTERMEZZO_FS is not set +# CONFIG_AFS_FS is not set # # Partition Types @@ -711,15 +753,16 @@ # CONFIG_SOLARIS_X86_PARTITION is not set # CONFIG_UNIXWARE_DISKLABEL is not set # CONFIG_LDM_PARTITION is not set +# CONFIG_NEC98_PARTITION is not set # CONFIG_SGI_PARTITION is not set # CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set -# CONFIG_SMB_NLS is not set -CONFIG_NLS=y +# CONFIG_EFI_PARTITION is not set # # Native Language Support # +CONFIG_NLS=y CONFIG_NLS_DEFAULT="iso8859-1" CONFIG_NLS_CODEPAGE_437=y # CONFIG_NLS_CODEPAGE_737 is not set @@ -742,6 +785,7 @@ # 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_ISO8859_1 is not set # CONFIG_NLS_ISO8859_2 is not set @@ -759,67 +803,52 @@ # CONFIG_NLS_UTF8 is not set # -# Console drivers +# Profiling support # -CONFIG_PC_KEYMAP=y -# CONFIG_VGA_CONSOLE is not set +# CONFIG_PROFILING is not set # -# Frame-buffer support +# Graphics support # CONFIG_FB=y -CONFIG_DUMMY_CONSOLE=y -# CONFIG_FB_ACORN is not set -# CONFIG_FB_CLPS711X is not set CONFIG_FB_SA1100=y -# CONFIG_FB_CYBER2000 is not set # CONFIG_FB_VIRTUAL is not set -# CONFIG_FBCON_ADVANCED is not set -CONFIG_FBCON_CFB2=y -CONFIG_FBCON_CFB4=y -CONFIG_FBCON_CFB8=y -CONFIG_FBCON_CFB16=y -CONFIG_FBCON_FONTWIDTH8_ONLY=y -CONFIG_FBCON_FONTS=y -CONFIG_FONT_8x8=y -# CONFIG_FONT_8x16 is not set -# CONFIG_FONT_SUN8x16 is not set -# CONFIG_FONT_PEARL_8x8 is not set -# CONFIG_FONT_ACORN_8x8 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 is not set + +# +# Logo configuration +# +# CONFIG_LOGO is not set # # Sound # CONFIG_SOUND=y -# CONFIG_SOUND_BT878 is not set -# CONFIG_SOUND_CMPCI is not set -# CONFIG_SOUND_EMU10K1 is not set -# CONFIG_MIDI_EMU10K1 is not set -# CONFIG_SOUND_FUSION is not set -# CONFIG_SOUND_CS4281 is not set -# CONFIG_SOUND_ES1370 is not set -# CONFIG_SOUND_ES1371 is not set -# CONFIG_SOUND_ESSSOLO1 is not set -# CONFIG_SOUND_MAESTRO is not set -# CONFIG_SOUND_MAESTRO3 is not set -# CONFIG_SOUND_ICH is not set -# CONFIG_SOUND_RME96XX is not set -# CONFIG_SOUND_SONICVIBES is not set -# CONFIG_SOUND_TRIDENT is not set -# CONFIG_SOUND_MSNDCLAS is not set -# CONFIG_SOUND_MSNDPIN is not set -# CONFIG_SOUND_VIA82CXXX is not set -# CONFIG_MIDI_VIA82CXXX is not set + +# +# Advanced Linux Sound Architecture +# +# CONFIG_SND is not set + +# +# Open Sound System +# +# CONFIG_SOUND_PRIME is not set CONFIG_SOUND_SA1100=y CONFIG_SOUND_UDA1341=y CONFIG_SOUND_ASSABET_UDA1341=y -# CONFIG_SOUND_H3600_UDA1341 is not set -# CONFIG_SOUND_PANGOLIN_UDA1341 is not set -# CONFIG_SOUND_SA1111_UDA1341 is not set # CONFIG_SOUND_SA1100SSP is not set -# CONFIG_SOUND_OSS is not set -# CONFIG_SOUND_WAVEARTIST is not set -# CONFIG_SOUND_TVMIXER is not set + +# +# Misc devices +# # # Multimedia Capabilities Port drivers @@ -840,123 +869,33 @@ # # USB support # -# CONFIG_USB is not set - -# -# USB Controllers -# -# CONFIG_USB_UHCI is not set -# CONFIG_USB_UHCI_ALT is not set -# CONFIG_USB_OHCI is not set -# CONFIG_USB_OHCI_SA1111 is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_AUDIO is not set -# CONFIG_USB_BLUETOOTH is not set -# CONFIG_USB_STORAGE is not set -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_DATAFAB is not set -# CONFIG_USB_STORAGE_FREECOM is not set -# CONFIG_USB_STORAGE_ISD200 is not set -# CONFIG_USB_STORAGE_DPCM is not set -# CONFIG_USB_STORAGE_HP8200e is not set -# CONFIG_USB_STORAGE_SDDR09 is not set -# CONFIG_USB_STORAGE_JUMPSHOT is not set -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set - -# -# USB Human Interface Devices (HID) -# - -# -# Input core support is needed for USB HID -# - -# -# USB Imaging devices -# -# CONFIG_USB_DC2XX is not set -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_SCANNER is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USB_HPUSBSCSI is not set - -# -# USB Multimedia devices -# - -# -# Video4Linux support is needed for USB Multimedia device support -# - -# -# USB Network adaptors -# -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_CATC is not set -# CONFIG_USB_CDCETHER is not set -# CONFIG_USB_USBNET is not set # -# USB port drivers +# USB Gadget Support # -# CONFIG_USB_USS720 is not set +# CONFIG_USB_GADGET is not set # -# USB Serial Converter support +# Kernel hacking # -# CONFIG_USB_SERIAL is not set -# CONFIG_USB_SERIAL_GENERIC is not set -# CONFIG_USB_SERIAL_BELKIN is not set -# CONFIG_USB_SERIAL_WHITEHEAT is not set -# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set -# CONFIG_USB_SERIAL_EMPEG is not set -# CONFIG_USB_SERIAL_FTDI_SIO is not set -# CONFIG_USB_SERIAL_VISOR is not set -# CONFIG_USB_SERIAL_IR is not set -# CONFIG_USB_SERIAL_EDGEPORT is not set -# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set -# CONFIG_USB_SERIAL_KEYSPAN is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set -# CONFIG_USB_SERIAL_MCT_U232 is not set -# CONFIG_USB_SERIAL_PL2303 is not set -# CONFIG_USB_SERIAL_CYBERJACK is not set -# CONFIG_USB_SERIAL_XIRCOM is not set -# CONFIG_USB_SERIAL_OMNINET is not set +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_KERNEL is not set # -# USB Miscellaneous drivers +# Security options # -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_ID75 is not set +# CONFIG_SECURITY is not set # -# Bluetooth support +# Cryptographic options # -# CONFIG_BT is not set +# CONFIG_CRYPTO is not set # -# Kernel hacking +# Library routines # -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_USER=y -# CONFIG_DEBUG_INFO is not set -# CONFIG_DEBUG_SLAB is not set -CONFIG_MAGIC_SYSRQ=y -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_NO_PGT_CACHE is not set -# CONFIG_DEBUG_LL is not set -# CONFIG_DEBUG_DC21285_PORT is not set -# CONFIG_DEBUG_CLPS711X_UART2 is not set +CONFIG_CRC32=y +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y diff -Nru a/arch/arm/configs/epxa10db_defconfig b/arch/arm/configs/epxa10db_defconfig --- a/arch/arm/configs/epxa10db_defconfig Tue May 4 21:53:35 2004 +++ b/arch/arm/configs/epxa10db_defconfig Tue May 4 21:53:35 2004 @@ -3,7 +3,6 @@ # CONFIG_ARM=y CONFIG_MMU=y -CONFIG_SWAP=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y @@ -11,28 +10,44 @@ # Code maturity level options # CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_STANDALONE=y +CONFIG_BROKEN_ON_SMP=y # # General setup # +CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_HOTPLUG is not set +# CONFIG_IKCONFIG is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y # # Loadable module support # CONFIG_MODULES=y -# CONFIG_MODULE_UNLOAD is not set +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set # CONFIG_KMOD is not set # # System Type # # CONFIG_ARCH_ADIFCC is not set -# CONFIG_ARCH_ARCA5K is not set +# CONFIG_ARCH_ANAKIN is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set @@ -41,21 +56,13 @@ CONFIG_ARCH_CAMELOT=y # CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_IOP310 is not set +# CONFIG_ARCH_IOP3XX is not set # CONFIG_ARCH_L7200 is not set # CONFIG_ARCH_RPC is not set # CONFIG_ARCH_SA1100 is not set # CONFIG_ARCH_SHARK is not set # -# Archimedes/A5000 Implementations -# - -# -# Archimedes/A5000 Implementations (select only ONE) -# - -# # CLPS711X/EP721X Implementations # @@ -74,11 +81,13 @@ # # -# IOP310 Implementation Options +# IOP3xx Implementation Options # +# CONFIG_ARCH_IOP310 is not set +# CONFIG_ARCH_IOP321 is not set # -# IOP310 Chipset Features +# IOP3xx Chipset Features # # @@ -95,6 +104,10 @@ CONFIG_CPU_32=y CONFIG_CPU_ARM922T=y CONFIG_CPU_32v4=y +CONFIG_CPU_ABRT_EV4T=y +CONFIG_CPU_CACHE_V4WT=y +CONFIG_CPU_COPY_V4WB=y +CONFIG_CPU_TLB_V4WBI=y # # Processor Features @@ -108,24 +121,26 @@ # General setup # # CONFIG_ZBOOT_ROM is not set -CONFIG_ZBOOT_ROM_TEXT=0 -CONFIG_ZBOOT_ROM_BSS=0 -# CONFIG_HOTPLUG is not set +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 # # At least one math emulation must be selected # CONFIG_FPE_NWFPE=y +# CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set -CONFIG_KCORE_ELF=y -# CONFIG_KCORE_AOUT is not set -CONFIG_BINFMT_AOUT=y CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set + +# +# Generic Driver Options +# # CONFIG_PM is not set # CONFIG_PREEMPT is not set # CONFIG_ARTHUR is not set -CONFIG_CMDLINE="mem=32M console=ttyUA0,38400 root=/dev/mtdblock0 rw" +CONFIG_CMDLINE="mem=32M console=ttyUA0,115200 initrd=0x00200000,8M root=/dev/ram0 rw" CONFIG_ALIGNMENT_TRAP=y # @@ -136,80 +151,22 @@ # # Memory Technology Devices (MTD) # -CONFIG_MTD=y -CONFIG_MTD_DEBUG=y -CONFIG_MTD_DEBUG_VERBOSE=0 -CONFIG_MTD_PARTITIONS=y -# CONFIG_MTD_CONCAT is not set -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=y -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_GEN_PROBE=y -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -CONFIG_MTD_CFI_INTELEXT=y -# CONFIG_MTD_CFI_AMDSTD is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_NORA is not set -# CONFIG_MTD_ARM_INTEGRATOR is not set -CONFIG_MTD_EPXA10DB=y -# CONFIG_MTD_EDB7312 is not set -# CONFIG_MTD_UCLINUX is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLKMTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC1000 is not set -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set - -# -# NAND Flash Device Drivers -# -# CONFIG_MTD_NAND is not set +# CONFIG_MTD is not set # # Plug and Play support # -# CONFIG_PNP is not set # # Block devices # # CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_DEV_LOOP is not set +CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=8192 -# CONFIG_BLK_DEV_INITRD is not set +CONFIG_BLK_DEV_INITRD=y # # Multi-device support (RAID and LVM) @@ -227,26 +184,28 @@ CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set # CONFIG_NETLINK_DEV is not set -# CONFIG_NETFILTER is not set -# CONFIG_FILTER is not set CONFIG_UNIX=y # CONFIG_NET_KEY is not set CONFIG_INET=y -# CONFIG_IP_MULTICAST is not set +CONFIG_IP_MULTICAST=y # CONFIG_IP_ADVANCED_ROUTER is not set CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y +# CONFIG_IP_PNP_DHCP is not set +# 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_IP_MROUTE is not set # CONFIG_ARPD is not set # CONFIG_INET_ECN is not set # CONFIG_SYN_COOKIES is not set # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set -# CONFIG_XFRM_USER is not set +# CONFIG_INET_IPCOMP is not set # CONFIG_IPV6 is not set +# CONFIG_DECNET is not set +# CONFIG_BRIDGE is not set +# CONFIG_NETFILTER is not set # # SCTP Configuration (EXPERIMENTAL) @@ -255,9 +214,9 @@ # CONFIG_IP_SCTP is not set # CONFIG_ATM is not set # CONFIG_VLAN_8021Q is not set -# CONFIG_LLC is not set -# CONFIG_DECNET is not set -# CONFIG_BRIDGE 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 @@ -280,22 +239,25 @@ # CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set # CONFIG_TUN is not set -# CONFIG_ETHERTAP is not set # # Ethernet (10 or 100Mbit) # -CONFIG_NET_ETHERNET=y -CONFIG_ETHER00=m +# CONFIG_NET_ETHERNET is not set # # Ethernet (1000 Mbit) # + +# +# Ethernet (10000 Mbit) +# CONFIG_PPP=y CONFIG_PPP_MULTILINK=y +# CONFIG_PPP_FILTER is not set CONFIG_PPP_ASYNC=y CONFIG_PPP_SYNC_TTY=y -# CONFIG_PPP_DEFLATE is not set +CONFIG_PPP_DEFLATE=y # CONFIG_PPP_BSDCOMP is not set # CONFIG_PPPOE is not set # CONFIG_SLIP is not set @@ -306,7 +268,7 @@ # CONFIG_NET_RADIO is not set # -# Token Ring devices (depends on LLC=y) +# Token Ring devices # # CONFIG_SHAPER is not set @@ -316,14 +278,19 @@ # CONFIG_WAN is not set # +# Amateur Radio support +# +# CONFIG_HAMRADIO is not set + +# # IrDA (infrared) support # # CONFIG_IRDA is not set # -# Amateur Radio support +# Bluetooth support # -# CONFIG_HAMRADIO is not set +# CONFIG_BT is not set # # ATA/ATAPI/MFM/RLL support @@ -331,43 +298,70 @@ # CONFIG_IDE is not set # -# SCSI support +# SCSI device support # # CONFIG_SCSI is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# # I2O device support # -# CONFIG_I2O is not set # # ISDN subsystem # -# CONFIG_ISDN_BOOL is not set +# CONFIG_ISDN is not set # # Input device support # -# CONFIG_INPUT is not set +CONFIG_INPUT=y # # Userland interfaces # +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set # # Input I/O drivers # # CONFIG_GAMEPORT is not set CONFIG_SOUND_GAMEPORT=y -# CONFIG_SERIO is not set +CONFIG_SERIO=y +# CONFIG_SERIO_I8042 is not set +CONFIG_SERIO_SERPORT=y +# CONFIG_SERIO_CT82C710 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 # @@ -378,31 +372,13 @@ # # Non-8250 serial port support # -# CONFIG_SERIAL_DZ is not set CONFIG_SERIAL_UART00=y CONFIG_SERIAL_UART00_CONSOLE=y CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# I2C Hardware Sensors Mainboard support -# - -# -# I2C Hardware Sensors Chip support -# - -# -# L3 serial bus support -# -# CONFIG_L3 is not set +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 # # Mice @@ -435,68 +411,86 @@ # CONFIG_RAW_DRIVER is not set # +# I2C support +# +# CONFIG_I2C is not set + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set # +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# # File systems # -# CONFIG_QUOTA is not set -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set # CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_QUOTA is not set +CONFIG_AUTOFS_FS=y +CONFIG_AUTOFS4_FS=y + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +# CONFIG_FAT_FS is not set +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVPTS_FS_XATTR is not set +# CONFIG_TMPFS is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# # CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set -# CONFIG_EXT3_FS is not set -# CONFIG_JBD is not set -# CONFIG_FAT_FS is not set # CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_DEBUG=0 -# CONFIG_JFFS2_FS_NAND is not set # CONFIG_CRAMFS is not set -CONFIG_TMPFS=y -CONFIG_RAMFS=y -# CONFIG_ISO9660_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_MINIX_FS is not set # CONFIG_VXFS_FS is not set -# CONFIG_NTFS_FS is not set # CONFIG_HPFS_FS is not set -CONFIG_PROC_FS=y -# CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS=y # CONFIG_QNX4FS_FS is not set -CONFIG_ROMFS_FS=y -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set # CONFIG_SYSV_FS is not set -# CONFIG_UDF_FS is not set # CONFIG_UFS_FS is not set -# CONFIG_XFS_FS is not set # # Network File Systems # -# CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set -CONFIG_NFS_FS=y -# CONFIG_NFS_V3 is not set -# CONFIG_NFS_V4 is not set -# CONFIG_ROOT_NFS is not set +# CONFIG_NFS_FS is not set # CONFIG_NFSD is not set -CONFIG_SUNRPC=y -# CONFIG_SUNRPC_GSS is not set -CONFIG_LOCKD=y # CONFIG_EXPORTFS is not set +CONFIG_SMB_FS=y +# CONFIG_SMB_NLS_DEFAULT is not set # CONFIG_CIFS is not set -# CONFIG_SMB_FS is not set # CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set # @@ -505,6 +499,54 @@ # CONFIG_PARTITION_ADVANCED is not set # +# 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_ISO8859_1 is not set +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_UTF8 is not set + +# +# Profiling support +# +# CONFIG_PROFILING is not set + +# # Graphics support # # CONFIG_FB is not set @@ -521,23 +563,13 @@ # # -# Multimedia Capabilities Port drivers -# -# CONFIG_MCP is not set - -# -# Console Switches -# -# CONFIG_SWITCHES is not set - -# # USB support # # -# Bluetooth support +# USB Gadget Support # -# CONFIG_BT is not set +# CONFIG_USB_GADGET is not set # # Kernel hacking @@ -560,6 +592,6 @@ # # Library routines # -# CONFIG_CRC32 is not set +CONFIG_CRC32=y CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y diff -Nru a/arch/arm/configs/lubbock_defconfig b/arch/arm/configs/lubbock_defconfig --- a/arch/arm/configs/lubbock_defconfig Tue May 4 21:53:35 2004 +++ b/arch/arm/configs/lubbock_defconfig Tue May 4 21:53:35 2004 @@ -2,32 +2,46 @@ # Automatically generated make config: don't edit # CONFIG_ARM=y -# CONFIG_EISA is not set -# CONFIG_SBUS is not set -# CONFIG_MCA is not set +CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y -# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set -# CONFIG_GENERIC_BUST_SPINLOCK is not set -# CONFIG_GENERIC_ISA_DMA is not set # # Code maturity level options # CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_STANDALONE=y +CONFIG_BROKEN_ON_SMP=y # # General setup # -CONFIG_NET=y +CONFIG_SWAP=y CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_HOTPLUG=y +# CONFIG_IKCONFIG is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y # # Loadable module support # CONFIG_MODULES=y +# CONFIG_MODULE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set # CONFIG_KMOD is not set @@ -35,7 +49,6 @@ # System Type # # CONFIG_ARCH_ADIFCC is not set -# CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set @@ -44,171 +57,112 @@ # CONFIG_ARCH_CAMELOT is not set # CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_IOP310 is not set +# CONFIG_ARCH_IOP3XX is not set # CONFIG_ARCH_L7200 is not set # CONFIG_ARCH_RPC is not set # CONFIG_ARCH_SA1100 is not set # CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE_PB is not set # -# Archimedes/A5000 Implementations +# CLPS711X/EP721X Implementations # # -# Archimedes/A5000 Implementations (select only ONE) +# Epxa10db # -# CONFIG_ARCH_ARC is not set -# CONFIG_ARCH_A5K is not set # # Footbridge Implementations # -# CONFIG_ARCH_CATS is not set -# CONFIG_ARCH_PERSONAL_SERVER is not set -# CONFIG_ARCH_EBSA285_ADDIN is not set -# CONFIG_ARCH_EBSA285_HOST is not set -# CONFIG_ARCH_NETWINDER is not set # -# SA11x0 Implementations +# IOP3xx Implementation Options +# +# CONFIG_ARCH_IOP310 is not set +# CONFIG_ARCH_IOP321 is not set + +# +# IOP3xx Chipset Features # -# CONFIG_SA1100_ASSABET is not set -# CONFIG_ASSABET_NEPONSET is not set -# CONFIG_SA1100_ADSBITSY is not set -# CONFIG_SA1100_BRUTUS is not set -# CONFIG_SA1100_CERF is not set -# CONFIG_SA1100_H3100 is not set -# CONFIG_SA1100_H3600 is not set -# CONFIG_SA1100_H3800 is not set -# CONFIG_SA1100_H3XXX is not set -# CONFIG_SA1100_EXTENEX1 is not set -# CONFIG_SA1100_FLEXANET is not set -# CONFIG_SA1100_FREEBIRD is not set -# CONFIG_SA1100_GRAPHICSCLIENT is not set -# CONFIG_SA1100_GRAPHICSMASTER is not set -# CONFIG_SA1100_BADGE4 is not set -# CONFIG_SA1100_JORNADA720 is not set -# CONFIG_SA1100_HUW_WEBPANEL is not set -# CONFIG_SA1100_ITSY is not set -# CONFIG_SA1100_LART is not set -# CONFIG_SA1100_NANOENGINE is not set -# CONFIG_SA1100_OMNIMETER is not set -# CONFIG_SA1100_PANGOLIN is not set -# CONFIG_SA1100_PLEB is not set -# CONFIG_SA1100_PT_SYSTEM3 is not set -# CONFIG_SA1100_SHANNON is not set -# CONFIG_SA1100_SHERMAN is not set -# CONFIG_SA1100_SIMPAD is not set -# CONFIG_SA1100_PFS168 is not set -# CONFIG_SA1100_VICTOR is not set -# CONFIG_SA1100_XP860 is not set -# CONFIG_SA1100_YOPY is not set -# CONFIG_SA1100_STORK is not set -# CONFIG_SA1100_USB is not set -# CONFIG_SA1100_USB_NETLINK is not set -# CONFIG_SA1100_USB_CHAR is not set -# CONFIG_H3600_SLEEVE is not set # -# Intel PXA250/210 Implementations +# Intel PXA2xx Implementations # CONFIG_ARCH_LUBBOCK=y +# CONFIG_MACH_MAINSTONE is not set # CONFIG_ARCH_PXA_IDP is not set -CONFIG_SA1111=y +CONFIG_PXA25x=y # -# CLPS711X/EP721X Implementations +# SA11x0 Implementations # -# CONFIG_ARCH_AUTCPU12 is not set -# CONFIG_ARCH_CDB89712 is not set -# CONFIG_ARCH_CLEP7312 is not set -# CONFIG_ARCH_EDB7211 is not set -# CONFIG_ARCH_P720T is not set -# CONFIG_ARCH_FORTUNET is not set -# CONFIG_ARCH_EP7211 is not set -# CONFIG_ARCH_EP7212 is not set - -# -# IOP310 Implementation Options -# -# CONFIG_ARCH_IQ80310 is not set - -# -# IOP310 Chipset Features -# -# CONFIG_IOP310_AAU is not set -# CONFIG_IOP310_DMA is not set -# CONFIG_IOP310_MU is not set -# CONFIG_IOP310_PMON is not set -# CONFIG_ARCH_ACORN is not set -# CONFIG_FOOTBRIDGE is not set -# CONFIG_FOOTBRIDGE_HOST is not set -# CONFIG_FOOTBRIDGE_ADDIN is not set -CONFIG_CPU_32=y -# CONFIG_CPU_26 is not set + +# +# TI OMAP Implementations +# + +# +# OMAP Feature Selections +# + +# +# S3C2410 Implementations +# +CONFIG_SA1111=y +CONFIG_FORCE_MAX_ZONEORDER=9 +CONFIG_DMABOUNCE=y # # Processor Type # -# CONFIG_CPU_32v3 is not set -# CONFIG_CPU_32v4 is not set -CONFIG_CPU_32v5=y -# CONFIG_CPU_ARM610 is not set -# CONFIG_CPU_ARM710 is not set -# CONFIG_CPU_ARM720T is not set -# CONFIG_CPU_ARM920T is not set -# CONFIG_CPU_ARM922T is not set -# CONFIG_CPU_ARM926T is not set -# CONFIG_CPU_ARM1020 is not set -# CONFIG_CPU_SA110 is not set -# CONFIG_CPU_SA1100 is not set +CONFIG_CPU_32=y CONFIG_CPU_XSCALE=y -CONFIG_XSCALE_CACHE_ERRATA=y -CONFIG_XSCALE_PMU=y +CONFIG_CPU_32v5=y +CONFIG_CPU_ABRT_EV5T=y +CONFIG_CPU_TLB_V4WBI=y +CONFIG_CPU_MINICACHE=y # # Processor Features # # CONFIG_ARM_THUMB is not set +CONFIG_XSCALE_PMU=y # # General setup # -# CONFIG_DISCONTIGMEM is not set -# CONFIG_PCI is not set -# CONFIG_ISA is not set -# CONFIG_ISA_DMA is not set -# CONFIG_FIQ is not set # CONFIG_ZBOOT_ROM is not set -CONFIG_ZBOOT_ROM_TEXT=0 -CONFIG_ZBOOT_ROM_BSS=0 -CONFIG_HOTPLUG=y +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 # # PCMCIA/CardBus support # CONFIG_PCMCIA=y -CONFIG_PCMCIA_PROBE=y -# CONFIG_I82092 is not set -# CONFIG_I82365 is not set +# CONFIG_PCMCIA_DEBUG is not set # CONFIG_TCIC is not set -# CONFIG_PCMCIA_CLPS6700 is not set -# CONFIG_PCMCIA_SA1100 is not set -CONFIG_PCMCIA_PXA=y +CONFIG_PCMCIA_PXA2XX=y # # At least one math emulation must be selected # CONFIG_FPE_NWFPE=y +# CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set -CONFIG_KCORE_ELF=y -# CONFIG_KCORE_AOUT is not set -# CONFIG_BINFMT_AOUT is not set CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set + +# +# Generic Driver Options +# +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set # CONFIG_PM is not set # CONFIG_PREEMPT is not set -# CONFIG_APM is not set # CONFIG_ARTHUR is not set CONFIG_CMDLINE="root=/dev/nfs ip=bootp console=ttyS0,115200 mem=64M" CONFIG_LEDS=y @@ -229,7 +183,7 @@ CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set CONFIG_MTD_REDBOOT_PARTS=y -# CONFIG_MTD_BOOTLDR_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set # CONFIG_MTD_AFS_PARTS is not set # @@ -239,6 +193,7 @@ CONFIG_MTD_BLOCK=y # CONFIG_FTL is not set # CONFIG_NFTL is not set +# CONFIG_INFTL is not set # # RAM/ROM/Flash chip drivers @@ -254,39 +209,31 @@ # CONFIG_MTD_CFI_B1 is not set # CONFIG_MTD_CFI_B2 is not set CONFIG_MTD_CFI_B4=y +# CONFIG_MTD_CFI_B8 is not set # CONFIG_MTD_CFI_I1 is not set CONFIG_MTD_CFI_I2=y # CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set CONFIG_MTD_CFI_INTELEXT=y # CONFIG_MTD_CFI_AMDSTD is not set +# CONFIG_MTD_CFI_STAA is not set # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set # CONFIG_MTD_OBSOLETE_CHIPS is not set -# CONFIG_MTD_AMDSTD is not set -# CONFIG_MTD_SHARP is not set -# CONFIG_MTD_JEDEC is not set # # Mapping drivers for chip access # +# CONFIG_MTD_COMPLEX_MAPPINGS is not set # CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_NORA is not set -# CONFIG_MTD_ARM_INTEGRATOR is not set -# CONFIG_MTD_CDB89712 is not set -# CONFIG_MTD_SA1100 is not set -# CONFIG_MTD_2PARTS_IPAQ is not set -# CONFIG_MTD_DC21285 is not set -# CONFIG_MTD_IQ80310 is not set CONFIG_MTD_LUBBOCK=y -# CONFIG_MTD_EPXA10DB is not set -# CONFIG_MTD_FORTUNET is not set -# CONFIG_MTD_PCI is not set +# CONFIG_MTD_ARM_INTEGRATOR is not set +# CONFIG_MTD_EDB7312 is not set # # Self-contained MTD device drivers # -# CONFIG_MTD_PMC551 is not set # CONFIG_MTD_SLRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set @@ -294,10 +241,9 @@ # # Disk-On-Chip Device Drivers # -# CONFIG_MTD_DOC1000 is not set # CONFIG_MTD_DOC2000 is not set # CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOCPROBE is not set +# CONFIG_MTD_DOC2001PLUS is not set # # NAND Flash Device Drivers @@ -305,48 +251,34 @@ # CONFIG_MTD_NAND is not set # -# Plug and Play configuration +# Plug and Play support # -# CONFIG_PNP is not set -# CONFIG_ISAPNP is not set -# CONFIG_PNPBIOS is not set # # Block devices # # CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_DEV_XD is not set -# CONFIG_PARIDE is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_CISS_SCSI_TAPE is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_RAM is not set -# CONFIG_BLK_DEV_INITRD is not set # # Multi-device support (RAID and LVM) # # CONFIG_MD is not set -# CONFIG_BLK_DEV_MD is not set -# CONFIG_MD_LINEAR is not set -# CONFIG_MD_RAID0 is not set -# CONFIG_MD_RAID1 is not set -# CONFIG_MD_RAID5 is not set -# CONFIG_MD_MULTIPATH is not set -# CONFIG_BLK_DEV_LVM is not set + +# +# Networking support +# +CONFIG_NET=y # # Networking options # # CONFIG_PACKET is not set # CONFIG_NETLINK_DEV is not set -# CONFIG_NETFILTER is not set -# CONFIG_FILTER 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 @@ -357,28 +289,26 @@ # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set # CONFIG_ARPD is not set -# CONFIG_INET_ECN 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_IPV6 is not set -# CONFIG_KHTTPD is not set -# CONFIG_ATM is not set -# CONFIG_VLAN_8021Q 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 - -# -# Appletalk devices -# -# CONFIG_DEV_APPLETALK is not set -# CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set -# CONFIG_LLC is not set # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set @@ -391,82 +321,43 @@ # CONFIG_NET_SCHED is not set # -# Network device support +# 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 - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set # CONFIG_DUMMY is not set # CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set # CONFIG_TUN is not set -# CONFIG_ETHERTAP is not set # # Ethernet (10 or 100Mbit) # CONFIG_NET_ETHERNET=y -# CONFIG_ARM_AM79C961A is not set -# CONFIG_SUNLANCE is not set -# CONFIG_SUNBMAC is not set -# CONFIG_SUNQE is not set -# CONFIG_SUNGEM is not set -# CONFIG_NET_VENDOR_3COM is not set -# CONFIG_LANCE is not set -CONFIG_NET_VENDOR_SMC=y -# CONFIG_WD80x3 is not set -# CONFIG_ULTRAMCA is not set -# CONFIG_ULTRA is not set -# CONFIG_ULTRA32 is not set -CONFIG_SMC9194=y -# CONFIG_NET_VENDOR_RACAL is not set -# CONFIG_NET_ISA is not set -# CONFIG_NET_PCI is not set -# CONFIG_NET_POCKET is not set +CONFIG_MII=y +CONFIG_SMC91X=y # # Ethernet (1000 Mbit) # -# CONFIG_ACENIC is not set -# CONFIG_DL2K is not set -# CONFIG_E1000 is not set -# CONFIG_MYRI_SBUS is not set -# CONFIG_NS83820 is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_SK98LIN is not set -# CONFIG_TIGON3 is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set # -# Wireless LAN (non-hamradio) +# Ethernet (10000 Mbit) # -# CONFIG_NET_RADIO is not set # # Token Ring devices # -# CONFIG_TR is not set -# CONFIG_NET_FC is not set -# CONFIG_RCPCI is not set -# CONFIG_SHAPER is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set # -# Tulip family network device support +# Wireless LAN (non-hamradio) # -# CONFIG_NET_TULIP is not set +# CONFIG_NET_RADIO is not set # # PCMCIA network device support @@ -480,163 +371,126 @@ # CONFIG_PCMCIA_SMC91C92 is not set # CONFIG_PCMCIA_XIRC2PS is not set # CONFIG_PCMCIA_AXNET is not set -# CONFIG_ARCNET_COM20020_CS is not set -# CONFIG_PCMCIA_IBMTR is not set -# CONFIG_NET_PCMCIA_RADIO is not set # -# Amateur Radio support +# Wan interfaces # -# CONFIG_HAMRADIO is not set +# 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 # -# IrDA (infrared) support +# ATA/ATAPI/MFM/RLL support # -# CONFIG_IRDA is not set +# CONFIG_IDE is not set # -# ATA/IDE/MFM/RLL support +# SCSI device support # -# CONFIG_IDE is not set -# CONFIG_BLK_DEV_HD is not set +# CONFIG_SCSI is not set # -# SCSI support +# Fusion MPT device support # -# CONFIG_SCSI is not set + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set # # I2O device support # -# CONFIG_I2O is not set -# CONFIG_I2O_BLOCK is not set -# CONFIG_I2O_LAN is not set -# CONFIG_I2O_SCSI is not set -# CONFIG_I2O_PROC is not set # # ISDN subsystem # -# CONFIG_ISDN_BOOL is not set +# CONFIG_ISDN is not set # # Input device support # CONFIG_INPUT=y -# CONFIG_INPUT_KEYBDEV is not set -# CONFIG_INPUT_MOUSEDEV is not set + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input I/O drivers +# # CONFIG_GAMEPORT is not set CONFIG_SOUND_GAMEPORT=y -# CONFIG_GAMEPORT_NS558 is not set -# CONFIG_GAMEPORT_L4 is not set -# CONFIG_INPUT_EMU10K1 is not set -# CONFIG_GAMEPORT_PCIGAME is not set -# CONFIG_GAMEPORT_FM801 is not set -# CONFIG_GAMEPORT_CS461x is not set -# CONFIG_SERIO is not set +CONFIG_SERIO=y +# CONFIG_SERIO_I8042 is not set # CONFIG_SERIO_SERPORT is not set +# CONFIG_SERIO_CT82C710 is not set +CONFIG_SERIO_SA1111=y + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=y +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_VSXXXAA is not set # CONFIG_INPUT_JOYSTICK is not set -# CONFIG_JOYSTICK_ANALOG is not set -# CONFIG_JOYSTICK_A3D is not set -# CONFIG_JOYSTICK_ADI is not set -# CONFIG_JOYSTICK_COBRA is not set -# CONFIG_JOYSTICK_GF2K is not set -# CONFIG_JOYSTICK_GRIP is not set -# CONFIG_JOYSTICK_INTERACT is not set -# CONFIG_JOYSTICK_SIDEWINDER is not set -# CONFIG_JOYSTICK_TMDC is not set -# CONFIG_JOYSTICK_IFORCE_USB is not set -# CONFIG_JOYSTICK_IFORCE_232 is not set -# CONFIG_JOYSTICK_WARRIOR is not set -# CONFIG_JOYSTICK_MAGELLAN is not set -# CONFIG_JOYSTICK_SPACEORB is not set -# CONFIG_JOYSTICK_SPACEBALL is not set -# CONFIG_JOYSTICK_STINGER is not set -# CONFIG_JOYSTICK_DB9 is not set -# CONFIG_JOYSTICK_GAMECON is not set -# CONFIG_JOYSTICK_TURBOGRAFX is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set # # Character devices # -# CONFIG_VT is not set +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y # CONFIG_SERIAL_NONSTANDARD is not set # # Serial drivers # -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_SERIAL_8250_CS is not set -# CONFIG_SERIAL_8250_EXTENDED is not set -# CONFIG_SERIAL_8250_MANY_PORTS is not set -# CONFIG_SERIAL_8250_SHARE_IRQ is not set -# CONFIG_SERIAL_8250_DETECT_IRQ is not set -# CONFIG_SERIAL_8250_MULTIPORT is not set -# CONFIG_SERIAL_8250_RSA is not set +# CONFIG_SERIAL_8250 is not set # # Non-8250 serial port support # -# CONFIG_ATOMWIDE_SERIAL is not set -# CONFIG_DUALSP_SERIAL is not set -# CONFIG_SERIAL_AMBA is not set -# CONFIG_SERIAL_AMBA_CONSOLE is not set -# CONFIG_SERIAL_CLPS711X is not set -# CONFIG_SERIAL_CLPS711X_CONSOLE is not set -# CONFIG_SERIAL_CLPS711X_OLD_NAME is not set -# CONFIG_SERIAL_21285 is not set -# CONFIG_SERIAL_21285_OLD is not set -# CONFIG_SERIAL_21285_CONSOLE is not set -# CONFIG_SERIAL_UART00 is not set -# CONFIG_SERIAL_UART00_CONSOLE is not set -# CONFIG_SERIAL_SA1100 is not set -# CONFIG_SERIAL_SA1100_CONSOLE is not set +CONFIG_SERIAL_PXA=y +CONFIG_SERIAL_PXA_CONSOLE=y CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# L3 serial bus support -# -# CONFIG_L3 is not set -# CONFIG_L3_ALGOBIT is not set -# CONFIG_L3_BIT_SA1100_GPIO is not set - -# -# Other L3 adapters -# -# CONFIG_L3_SA1111 is not set -# CONFIG_BIT_SA1100_GPIO is not set +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 +# CONFIG_QIC02_TAPE is not set # -# Mice +# IPMI # -CONFIG_BUSMOUSE=y -# CONFIG_ATIXL_BUSMOUSE is not set -# CONFIG_LOGIBUSMOUSE is not set -# CONFIG_MS_BUSMOUSE is not set -CONFIG_MOUSE=y -CONFIG_PSMOUSE=y -# CONFIG_82C710_MOUSE is not set -# CONFIG_PC110_PAD is not set -# CONFIG_QIC02_TAPE is not set +# CONFIG_IPMI_HANDLER is not set # # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_INTEL_RNG is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set +# CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set @@ -652,6 +506,12 @@ # PCMCIA character devices # # CONFIG_SYNCLINK_CS is not set +# CONFIG_RAW_DRIVER is not set + +# +# I2C support +# +# CONFIG_I2C is not set # # Multimedia devices @@ -659,99 +519,101 @@ # CONFIG_VIDEO_DEV is not set # +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# # File systems # +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set -# CONFIG_QFMT_V1 is not set -# CONFIG_QFMT_V2 is not set # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set -# CONFIG_REISERFS_FS is not set -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +# CONFIG_VFAT_FS is not set +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_SYSFS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVPTS_FS_XATTR is not set +# CONFIG_TMPFS is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# # CONFIG_ADFS_FS is not set -# CONFIG_ADFS_FS_RW 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_EXT3_FS is not set -# CONFIG_JBD is not set -# CONFIG_JBD_DEBUG is not set -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -# CONFIG_UMSDOS_FS is not set -# CONFIG_VFAT_FS is not set # CONFIG_EFS_FS is not set # CONFIG_JFFS_FS is not set CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 # CONFIG_JFFS2_FS_NAND is not set # CONFIG_CRAMFS is not set -# CONFIG_TMPFS is not set -CONFIG_RAMFS=y -# CONFIG_ISO9660_FS is not set -# CONFIG_JOLIET is not set -# CONFIG_ZISOFS is not set -# CONFIG_JFS_FS is not set -# CONFIG_JFS_DEBUG is not set -# CONFIG_JFS_STATISTICS is not set -# CONFIG_MINIX_FS is not set # CONFIG_VXFS_FS is not set -# CONFIG_NTFS_FS is not set -# CONFIG_NTFS_DEBUG is not set -# CONFIG_NTFS_RW is not set # CONFIG_HPFS_FS is not set -CONFIG_PROC_FS=y -# CONFIG_DEVFS_FS is not set -# CONFIG_DEVFS_MOUNT is not set -# CONFIG_DEVFS_DEBUG is not set -CONFIG_DEVPTS_FS=y # CONFIG_QNX4FS_FS is not set -# CONFIG_QNX4FS_RW is not set -# CONFIG_ROMFS_FS is not set -CONFIG_EXT2_FS=y # CONFIG_SYSV_FS is not set -# CONFIG_UDF_FS is not set -# CONFIG_UDF_RW is not set # CONFIG_UFS_FS is not set -# CONFIG_UFS_FS_WRITE is not set # # Network File Systems # -# CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set CONFIG_NFS_FS=y # CONFIG_NFS_V3 is not set -CONFIG_ROOT_NFS=y +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set # CONFIG_NFSD is not set -# CONFIG_NFSD_V3 is not set -# CONFIG_NFSD_TCP is not set -CONFIG_SUNRPC=y +CONFIG_ROOT_NFS=y CONFIG_LOCKD=y # CONFIG_EXPORTFS is not set +CONFIG_SUNRPC=y +# CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set # CONFIG_NCP_FS is not set -# CONFIG_NCPFS_PACKET_SIGNING is not set -# CONFIG_NCPFS_IOCTL_LOCKING is not set -# CONFIG_NCPFS_STRONG is not set -# CONFIG_NCPFS_NFS_NS is not set -# CONFIG_NCPFS_OS2_NS is not set -# CONFIG_NCPFS_SMALLDOS is not set -# CONFIG_NCPFS_NLS is not set -# CONFIG_NCPFS_EXTRAS is not set -# CONFIG_ZISOFS_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_INTERMEZZO_FS is not set +# CONFIG_AFS_FS is not set # # Partition Types # # CONFIG_PARTITION_ADVANCED is not set -# CONFIG_SMB_NLS is not set -CONFIG_NLS=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 @@ -792,57 +654,30 @@ # CONFIG_NLS_UTF8 is not set # -# Sound +# Profiling support # -CONFIG_SOUND=y +# CONFIG_PROFILING is not set # -# Open Sound System +# Graphics support # -CONFIG_SOUND_PRIME=y -# CONFIG_SOUND_BT878 is not set -# CONFIG_SOUND_CMPCI is not set -# CONFIG_SOUND_EMU10K1 is not set -# CONFIG_MIDI_EMU10K1 is not set -# CONFIG_SOUND_FUSION is not set -# CONFIG_SOUND_CS4281 is not set -# CONFIG_SOUND_ES1370 is not set -# CONFIG_SOUND_ES1371 is not set -# CONFIG_SOUND_ESSSOLO1 is not set -# CONFIG_SOUND_MAESTRO is not set -# CONFIG_SOUND_MAESTRO3 is not set -# CONFIG_SOUND_ICH is not set -# CONFIG_SOUND_RME96XX is not set -# CONFIG_SOUND_SONICVIBES is not set -# CONFIG_SOUND_TRIDENT is not set -# CONFIG_SOUND_MSNDCLAS is not set -# CONFIG_SOUND_MSNDPIN is not set -# CONFIG_SOUND_VIA82CXXX is not set -# CONFIG_MIDI_VIA82CXXX is not set -# CONFIG_SOUND_OSS is not set -# CONFIG_SOUND_WAVEARTIST is not set -# CONFIG_SOUND_PXA_AC97 is not set -# CONFIG_SOUND_TVMIXER is not set - -# -# Advanced Linux Sound Architecture -# -# CONFIG_SND is not set - -# -# Multimedia Capabilities Port drivers -# -# CONFIG_MCP is not set -# CONFIG_MCP_SA1100 is not set -# CONFIG_MCP_UCB1200 is not set -# CONFIG_MCP_UCB1200_AUDIO is not set -# CONFIG_MCP_UCB1200_TS is not set -# CONFIG_MCP_UCB1400_TS is not set +# CONFIG_FB is not set # -# Console Switches +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +# CONFIG_MDA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# Misc devices # -# CONFIG_SWITCHES is not set # # USB support @@ -850,9 +685,22 @@ # CONFIG_USB is not set # -# Bluetooth support +# USB Gadget Support # -# CONFIG_BT is not set +CONFIG_USB_GADGET=y +# CONFIG_USB_GADGET_NET2280 is not set +CONFIG_USB_GADGET_PXA2XX=y +CONFIG_USB_PXA2XX=y +CONFIG_USB_PXA2XX_SMALL=y +# CONFIG_USB_GADGET_GOKU is not set +# CONFIG_USB_GADGET_SA1100 is not set +# CONFIG_USB_GADGET_DUMMY_HCD is not set +# CONFIG_USB_GADGET_DUALSPEED is not set +# CONFIG_USB_ZERO is not set +# CONFIG_USB_ETH is not set +# CONFIG_USB_GADGETFS is not set +# CONFIG_USB_FILE_STORAGE is not set +CONFIG_USB_G_SERIAL=y # # Kernel hacking @@ -868,8 +716,17 @@ CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_ERRORS=y CONFIG_DEBUG_LL=y -# CONFIG_DEBUG_DC21285_PORT is not set -# CONFIG_DEBUG_CLPS711X_UART2 is not set +# CONFIG_DEBUG_ICEDCC is not set + +# +# Security options +# +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +# CONFIG_CRYPTO is not set # # Library routines diff -Nru a/arch/arm/configs/versatile_defconfig b/arch/arm/configs/versatile_defconfig --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm/configs/versatile_defconfig Tue May 4 21:53:36 2004 @@ -0,0 +1,845 @@ +# +# Automatically generated make config: don't edit +# +CONFIG_ARM=y +CONFIG_MMU=y +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_STANDALONE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_HOTPLUG=y +# CONFIG_IKCONFIG is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y + +# +# System Type +# +# CONFIG_ARCH_ADIFCC is not set +# CONFIG_ARCH_CLPS7500 is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_CO285 is not set +# CONFIG_ARCH_PXA is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_CAMELOT is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_IOP3XX is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_OMAP is not set +CONFIG_ARCH_VERSATILE_PB=y + +# +# CLPS711X/EP721X Implementations +# + +# +# Epxa10db +# + +# +# Footbridge Implementations +# + +# +# IOP3xx Implementation Options +# +# CONFIG_ARCH_IOP310 is not set +# CONFIG_ARCH_IOP321 is not set + +# +# IOP3xx Chipset Features +# + +# +# Intel PXA250/210 Implementations +# + +# +# SA11x0 Implementations +# + +# +# TI OMAP Implementations +# + +# +# OMAP Feature Selections +# + +# +# S3C2410 Implementations +# + +# +# Processor Type +# +CONFIG_CPU_32=y +CONFIG_CPU_ARM926T=y +CONFIG_CPU_32v5=y +CONFIG_CPU_ABRT_EV5TJ=y +CONFIG_CPU_COPY_V4WB=y +CONFIG_CPU_TLB_V4WBI=y + +# +# Processor Features +# +CONFIG_ARM_THUMB=y +# CONFIG_CPU_ICACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_WRITETHROUGH is not set +# CONFIG_CPU_CACHE_ROUND_ROBIN is not set + +# +# General setup +# +CONFIG_ARM_AMBA=y +# CONFIG_ZBOOT_ROM is not set +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 + +# +# PCMCIA/CardBus support +# +# CONFIG_PCMCIA is not set + +# +# At least one math emulation must be selected +# +# CONFIG_FPE_NWFPE is not set +CONFIG_FPE_FASTFPE=y +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_AOUT is not set +# CONFIG_BINFMT_MISC is not set + +# +# Generic Driver Options +# +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set +CONFIG_PM=y +# CONFIG_PREEMPT is not set +# CONFIG_APM is not set +# CONFIG_ARTHUR is not set +CONFIG_CMDLINE="root=1f03 mem=32M" +CONFIG_LEDS=y +CONFIG_LEDS_TIMER=y +CONFIG_LEDS_CPU=y +CONFIG_ALIGNMENT_TRAP=y + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Memory Technology Devices (MTD) +# +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_CONCAT is not set +# CONFIG_MTD_REDBOOT_PARTS is not set +CONFIG_MTD_CMDLINE_PARTS=y +# CONFIG_MTD_AFS_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set + +# +# RAM/ROM/Flash chip drivers +# +CONFIG_MTD_CFI=y +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_GEN_PROBE=y +CONFIG_MTD_CFI_ADV_OPTIONS=y +CONFIG_MTD_CFI_NOSWAP=y +# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set +# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set +# CONFIG_MTD_CFI_GEOMETRY is not set +CONFIG_MTD_CFI_INTELEXT=y +# CONFIG_MTD_CFI_AMDSTD is not set +# CONFIG_MTD_CFI_STAA is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_OBSOLETE_CHIPS is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PHYSMAP is not set +CONFIG_MTD_ARM_INTEGRATOR=y +# CONFIG_MTD_EDB7312 is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLKMTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set + +# +# NAND Flash Device Drivers +# +# CONFIG_MTD_NAND is not set + +# +# Plug and Play support +# + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_LOOP is not set +# CONFIG_BLK_DEV_NBD is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_INITRD=y + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Networking support +# +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +CONFIG_PACKET_MMAP=y +# CONFIG_NETLINK_DEV is not set +CONFIG_UNIX=y +# CONFIG_NET_KEY is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_PNP=y +# CONFIG_IP_PNP_DHCP is not set +CONFIG_IP_PNP_BOOTP=y +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_IP_MROUTE 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_IPV6 is not set +# CONFIG_NETFILTER is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_FASTROUTE is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED 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 + +# +# Ethernet (1000 Mbit) +# + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set +# CONFIG_HOSTAP is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Input device support +# +CONFIG_INPUT=y + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_TSLIBDEV 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 is not set +# CONFIG_SERIO_CT82C710 is not set +CONFIG_SERIO_AMBAKMI=y + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=y +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=m +CONFIG_SERIAL_8250_NR_UARTS=4 +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_MANY_PORTS=y +CONFIG_SERIAL_8250_SHARE_IRQ=y +# CONFIG_SERIAL_8250_DETECT_IRQ is not set +CONFIG_SERIAL_8250_MULTIPORT=y +CONFIG_SERIAL_8250_RSA=y + +# +# Non-8250 serial port support +# +# CONFIG_SERIAL_AMBA_PL010 is not set +CONFIG_SERIAL_AMBA_PL011=y +CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=16 +# CONFIG_QIC02_TAPE is not set + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set +# CONFIG_GEN_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_FTAPE is not set +# CONFIG_AGP is not set +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# I2C support +# +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=m + +# +# I2C Algorithms +# +CONFIG_I2C_ALGOBIT=y +# CONFIG_I2C_ALGOPCF is not set + +# +# I2C Hardware Bus support +# +# CONFIG_I2C_AMD756 is not set +# CONFIG_I2C_AMD8111 is not set +# CONFIG_I2C_ISA is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_SCx200_ACB is not set + +# +# Hardware Sensors Chip support +# +CONFIG_I2C_SENSOR=m +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ASB100 is not set +# CONFIG_SENSORS_DS1621 is not set +# CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set +# CONFIG_SENSORS_LM83 is not set +# CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_VIA686A is not set +# CONFIG_SENSORS_W83781D is not set +# CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83627HF is not set + +# +# Other I2C Chip support +# +CONFIG_SENSORS_EEPROM=m +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set + +# +# L3 serial bus support +# +# CONFIG_L3 is not set + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# MMC/SD Card support +# +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +CONFIG_MMC_BLOCK=y +CONFIG_MMC_ARMMMCI=m + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +CONFIG_MINIX_FS=y +CONFIG_ROMFS_FS=y +# CONFIG_QUOTA is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=m +# CONFIG_MSDOS_FS is not set +CONFIG_VFAT_FS=m +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_SYSFS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVPTS_FS_XATTR is not set +# CONFIG_TMPFS is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +# CONFIG_JFFS2_FS_NAND is not set +CONFIG_CRAMFS=y +# 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=y +CONFIG_NFSD_V3=y +# CONFIG_NFSD_V4 is not set +# CONFIG_NFSD_TCP is not set +CONFIG_ROOT_NFS=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=y +CONFIG_SUNRPC=y +# CONFIG_RPCSEC_GSS_KRB5 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_INTERMEZZO_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_NEC98_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_EFI_PARTITION is not set + +# +# Native Language Support +# +CONFIG_NLS=m +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=m +# 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_ISO8859_1=m +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_UTF8 is not set + +# +# Profiling support +# +# CONFIG_PROFILING is not set + +# +# Graphics support +# +CONFIG_FB=y +CONFIG_FB_ARMCLCD=y +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +# CONFIG_MDA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_PCI_CONSOLE=y +CONFIG_FONTS=y +# CONFIG_FONT_8x8 is not set +# CONFIG_FONT_8x16 is not set +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_PEARL_8x8 is not set +CONFIG_FONT_ACORN_8x8=y +# CONFIG_FONT_MINI_4x6 is not set +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set + +# +# Logo configuration +# +# CONFIG_LOGO is not set + +# +# Sound +# +CONFIG_SOUND=y + +# +# Advanced Linux Sound Architecture +# +CONFIG_SND=m +CONFIG_SND_TIMER=m +CONFIG_SND_PCM=m +# CONFIG_SND_SEQUENCER is not set +CONFIG_SND_OSSEMUL=y +CONFIG_SND_MIXER_OSS=m +CONFIG_SND_PCM_OSS=m +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set + +# +# Generic devices +# +# CONFIG_SND_DUMMY is not set +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_MPU401 is not set +CONFIG_SND_AC97_CODEC=m + +# +# ALSA ARM devices +# +CONFIG_SND_ARMAACI=m + +# +# Open Sound System +# +# CONFIG_SOUND_PRIME is not set + +# +# Misc devices +# + +# +# Multimedia Capabilities Port drivers +# +# CONFIG_MCP is not set + +# +# Console Switches +# +# CONFIG_SWITCHES is not set + +# +# USB support +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# Kernel hacking +# +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_INFO is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SLAB is not set +CONFIG_MAGIC_SYSRQ=y +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_WAITQ is not set +CONFIG_DEBUG_BUGVERBOSE=y +CONFIG_DEBUG_ERRORS=y +CONFIG_DEBUG_LL=y +# CONFIG_DEBUG_ICEDCC is not set + +# +# Security options +# +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# +# Library routines +# +CONFIG_CRC32=y +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y diff -Nru a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c --- a/arch/arm/kernel/setup.c Tue May 4 21:53:36 2004 +++ b/arch/arm/kernel/setup.c Tue May 4 21:53:36 2004 @@ -219,9 +219,7 @@ static void __init dump_cpu_info(void) { - unsigned int info; - - asm("mrc p15, 0, %0, c0, c0, 1" : "=r" (info)); + unsigned int info = read_cpuid(CPUID_CACHETYPE); if (info != processor_id) { printk("CPU: D %s cache\n", cache_types[CACHE_TYPE(info)]); @@ -803,9 +801,7 @@ seq_printf(m, "CPU revision\t: %d\n", processor_id & 15); { - unsigned int cache_info; - - asm("mrc p15, 0, %0, c0, c0, 1" : "=r" (cache_info)); + unsigned int cache_info = read_cpuid(CPUID_CACHETYPE); if (cache_info != processor_id) { seq_printf(m, "Cache type\t: %s\n" "Cache clean\t: %s\n" diff -Nru a/arch/arm/lib/findbit.S b/arch/arm/lib/findbit.S --- a/arch/arm/lib/findbit.S Tue May 4 21:53:35 2004 +++ b/arch/arm/lib/findbit.S Tue May 4 21:53:35 2004 @@ -40,7 +40,7 @@ */ ENTRY(_find_next_zero_bit_le) teq r1, #0 - beq 2b + beq 3b ands ip, r2, #7 beq 1b @ If new byte, goto old routine ldrb r3, [r0, r2, lsr #3] @@ -74,7 +74,7 @@ */ ENTRY(_find_next_bit_le) teq r1, #0 - beq 2b + beq 3b ands ip, r2, #7 beq 1b @ If new byte, goto old routine ldrb r3, [r0, r2, lsr #3] @@ -101,15 +101,18 @@ RETINSTR(mov,pc,lr) ENTRY(_find_next_zero_bit_be) + teq r1, #0 + beq 3b ands ip, r2, #7 beq 1b @ If new byte, goto old routine eor r3, r2, #0x18 @ big endian byte ordering ldrb r3, [r0, r3, lsr #3] eor r3, r3, #0xff @ now looking for a 1 bit movs r3, r3, lsr ip @ shift off unused bits - orreq r2, r2, #7 @ if zero, then no bits here - addeq r2, r2, #1 @ align bit pointer - beq 2b @ loop for next bit + bne .found + orr r2, r2, #7 @ if zero, then no bits here + add r2, r2, #1 @ align bit pointer + b 2b @ loop for next bit ENTRY(_find_first_bit_be) teq r1, #0 @@ -126,14 +129,17 @@ RETINSTR(mov,pc,lr) ENTRY(_find_next_bit_be) + teq r1, #0 + beq 3b ands ip, r2, #7 beq 1b @ If new byte, goto old routine eor r3, r2, #0x18 @ big endian byte ordering ldrb r3, [r0, r3, lsr #3] movs r3, r3, lsr ip @ shift off unused bits - orreq r2, r2, #7 @ if zero, then no bits here - addeq r2, r2, #1 @ align bit pointer - beq 2b @ loop for next bit + bne .found + orr r2, r2, #7 @ if zero, then no bits here + add r2, r2, #1 @ align bit pointer + b 2b @ loop for next bit #endif diff -Nru a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c --- a/arch/arm/mach-pxa/idp.c Tue May 4 21:53:35 2004 +++ b/arch/arm/mach-pxa/idp.c Tue May 4 21:53:35 2004 @@ -113,7 +113,7 @@ MACHINE_START(PXA_IDP, "Accelent Xscale IDP") MAINTAINER("Accelent Systems Inc.") - BOOT_MEM(0xa0000000, 0x40000000, 0xfc000000) + BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000)) MAPIO(idp_map_io) INITIRQ(idp_init_irq) INIT_MACHINE(idp_init) diff -Nru a/arch/arm/mach-pxa/leds-lubbock.c b/arch/arm/mach-pxa/leds-lubbock.c --- a/arch/arm/mach-pxa/leds-lubbock.c Tue May 4 21:53:35 2004 +++ b/arch/arm/mach-pxa/leds-lubbock.c Tue May 4 21:53:35 2004 @@ -7,12 +7,10 @@ * * Original (leds-footbridge.c) by Russell King * - * See leds.h for bit definitions. The first version defines D28 on the - * Lubbock dev board as the heartbeat, and D27 as the Sys_busy led. - * There's plenty more if you're interested in adding them :) + * Major surgery on April 2004 by Nicolas Pitre for less global + * namespace collision. Mostly adapted the Mainstone version. */ - #include #include @@ -22,6 +20,21 @@ #include "leds.h" +/* + * 8 discrete leds available for general use: + * + * Note: bits [15-8] are used to enable/blank the 8 7 segment hex displays + * so be sure to not monkey with them here. + */ + +#define D28 (1 << 0) +#define D27 (1 << 1) +#define D26 (1 << 2) +#define D25 (1 << 3) +#define D24 (1 << 4) +#define D23 (1 << 5) +#define D22 (1 << 6) +#define D21 (1 << 7) #define LED_STATE_ENABLED 1 #define LED_STATE_CLAIMED 2 @@ -37,7 +50,7 @@ switch (evt) { case led_start: - hw_led_state = HEARTBEAT_LED | SYS_BUSY_LED; + hw_led_state = 0; led_state = LED_STATE_ENABLED; break; @@ -47,30 +60,27 @@ case led_claim: led_state |= LED_STATE_CLAIMED; - hw_led_state = HEARTBEAT_LED | SYS_BUSY_LED; + hw_led_state = 0; break; case led_release: led_state &= ~LED_STATE_CLAIMED; - hw_led_state = HEARTBEAT_LED | SYS_BUSY_LED; + hw_led_state = 0; break; #ifdef CONFIG_LEDS_TIMER case led_timer: - if (!(led_state & LED_STATE_CLAIMED)) - hw_led_state ^= HEARTBEAT_LED; + hw_led_state ^= D26; break; #endif #ifdef CONFIG_LEDS_CPU case led_idle_start: - if (!(led_state & LED_STATE_CLAIMED)) - hw_led_state |= SYS_BUSY_LED; + hw_led_state &= ~D27; break; case led_idle_end: - if (!(led_state & LED_STATE_CLAIMED)) - hw_led_state &= ~SYS_BUSY_LED; + hw_led_state |= D27; break; #endif @@ -78,29 +88,27 @@ break; case led_green_on: - if (led_state & LED_STATE_CLAIMED) - hw_led_state &= ~HEARTBEAT_LED; + hw_led_state |= D21;; break; case led_green_off: - if (led_state & LED_STATE_CLAIMED) - hw_led_state |= HEARTBEAT_LED; + hw_led_state &= ~D21; break; case led_amber_on: + hw_led_state |= D22;; break; case led_amber_off: + hw_led_state &= ~D22; break; case led_red_on: - if (led_state & LED_STATE_CLAIMED) - hw_led_state &= ~SYS_BUSY_LED; + hw_led_state |= D23;; break; case led_red_off: - if (led_state & LED_STATE_CLAIMED) - hw_led_state |= SYS_BUSY_LED; + hw_led_state &= ~D23; break; default: @@ -108,27 +116,9 @@ } if (led_state & LED_STATE_ENABLED) - { - switch (hw_led_state) { - case 0: // all on - HEARTBEAT_LED_ON; - SYS_BUSY_LED_ON; - break; - case 1: // turn off heartbeat, status on: - HEARTBEAT_LED_OFF; - SYS_BUSY_LED_ON; - break; - case 2: // status off, heartbeat on: - HEARTBEAT_LED_ON; - SYS_BUSY_LED_OFF; - break; - case 3: // turn them both off... - HEARTBEAT_LED_OFF; - SYS_BUSY_LED_OFF; - break; - default: - break; - } - } + LUB_DISC_BLNK_LED = (LUB_DISC_BLNK_LED | 0xff) & ~hw_led_state; + else + LUB_DISC_BLNK_LED |= 0xff; + local_irq_restore(flags); } diff -Nru a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c --- a/arch/arm/mach-pxa/lubbock.c Tue May 4 21:53:35 2004 +++ b/arch/arm/mach-pxa/lubbock.c Tue May 4 21:53:35 2004 @@ -28,7 +28,6 @@ #include #include -#include #include #include @@ -156,11 +155,7 @@ } static struct map_desc lubbock_io_desc[] __initdata = { - /* virtual physical length type */ - { 0xf0000000, 0x08000000, 0x00100000, MT_DEVICE }, /* CPLD */ - { 0xf1000000, 0x0c000000, 0x00100000, MT_DEVICE }, /* LAN91C96 IO */ - { 0xf1100000, 0x0e000000, 0x00100000, MT_DEVICE }, /* LAN91C96 Attr */ - { 0xf4000000, 0x10000000, 0x00800000, MT_DEVICE }, /* SA1111 */ + { LUBBOCK_FPGA_VIRT, LUBBOCK_FPGA_PHYS, 0x00100000, MT_DEVICE }, /* CPLD */ }; static void __init lubbock_map_io(void) @@ -169,7 +164,6 @@ iotable_init(lubbock_io_desc, ARRAY_SIZE(lubbock_io_desc)); /* This enables the BTUART */ - CKEN |= CKEN7_BTUART; pxa_gpio_mode(GPIO42_BTRXD_MD); pxa_gpio_mode(GPIO43_BTTXD_MD); pxa_gpio_mode(GPIO44_BTCTS_MD); @@ -188,7 +182,7 @@ PCFR |= PCFR_OPDE; } -MACHINE_START(LUBBOCK, "Intel DBPXA250 Development Platform") +MACHINE_START(LUBBOCK, "Intel DBPXA250 Development Platform (aka Lubbock)") MAINTAINER("MontaVista Software Inc.") BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000)) MAPIO(lubbock_map_io) diff -Nru a/arch/arm/mm/Makefile b/arch/arm/mm/Makefile --- a/arch/arm/mm/Makefile Tue May 4 21:53:36 2004 +++ b/arch/arm/mm/Makefile Tue May 4 21:53:36 2004 @@ -3,7 +3,7 @@ # obj-y := consistent.o extable.o fault-armv.o \ - fault-common.o init.o ioremap.o mm-armv.o + fault.o init.o ioremap.o mmap.o mm-armv.o obj-$(CONFIG_MODULES) += proc-syms.o diff -Nru a/arch/arm/mm/fault-armv.c b/arch/arm/mm/fault-armv.c --- a/arch/arm/mm/fault-armv.c Tue May 4 21:53:35 2004 +++ b/arch/arm/mm/fault-armv.c Tue May 4 21:53:35 2004 @@ -10,123 +10,14 @@ */ #include #include -#include -#include #include #include #include #include #include -#include #include #include - -#include "fault.h" - -/* - * Some section permission faults need to be handled gracefully. - * They can happen due to a __{get,put}_user during an oops. - */ -static int -do_sect_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) -{ - struct task_struct *tsk = current; - do_bad_area(tsk, tsk->active_mm, addr, fsr, regs); - return 0; -} - -/* - * This abort handler always returns "fault". - */ -static int -do_bad(unsigned long addr, unsigned int fsr, struct pt_regs *regs) -{ - return 1; -} - -static struct fsr_info { - int (*fn)(unsigned long addr, unsigned int fsr, struct pt_regs *regs); - int sig; - const char *name; -} fsr_info[] = { - /* - * The following are the standard ARMv3 and ARMv4 aborts. ARMv5 - * defines these to be "precise" aborts. - */ - { do_bad, SIGSEGV, "vector exception" }, - { do_bad, SIGILL, "alignment exception" }, - { do_bad, SIGKILL, "terminal exception" }, - { do_bad, SIGILL, "alignment exception" }, - { do_bad, SIGBUS, "external abort on linefetch" }, - { do_translation_fault, SIGSEGV, "section translation fault" }, - { do_bad, SIGBUS, "external abort on linefetch" }, - { do_page_fault, SIGSEGV, "page translation fault" }, - { do_bad, SIGBUS, "external abort on non-linefetch" }, - { do_bad, SIGSEGV, "section domain fault" }, - { do_bad, SIGBUS, "external abort on non-linefetch" }, - { do_bad, SIGSEGV, "page domain fault" }, - { do_bad, SIGBUS, "external abort on translation" }, - { do_sect_fault, SIGSEGV, "section permission fault" }, - { do_bad, SIGBUS, "external abort on translation" }, - { do_page_fault, SIGSEGV, "page permission fault" }, - /* - * The following are "imprecise" aborts, which are signalled by bit - * 10 of the FSR, and may not be recoverable. These are only - * supported if the CPU abort handler supports bit 10. - */ - { do_bad, SIGBUS, "unknown 16" }, - { do_bad, SIGBUS, "unknown 17" }, - { do_bad, SIGBUS, "unknown 18" }, - { do_bad, SIGBUS, "unknown 19" }, - { do_bad, SIGBUS, "lock abort" }, /* xscale */ - { do_bad, SIGBUS, "unknown 21" }, - { do_bad, SIGBUS, "imprecise external abort" }, /* xscale */ - { do_bad, SIGBUS, "unknown 23" }, - { do_bad, SIGBUS, "dcache parity error" }, /* xscale */ - { do_bad, SIGBUS, "unknown 25" }, - { do_bad, SIGBUS, "unknown 26" }, - { do_bad, SIGBUS, "unknown 27" }, - { do_bad, SIGBUS, "unknown 28" }, - { do_bad, SIGBUS, "unknown 29" }, - { do_bad, SIGBUS, "unknown 30" }, - { do_bad, SIGBUS, "unknown 31" } -}; - -void __init -hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, struct pt_regs *), - int sig, const char *name) -{ - if (nr >= 0 && nr < ARRAY_SIZE(fsr_info)) { - fsr_info[nr].fn = fn; - fsr_info[nr].sig = sig; - fsr_info[nr].name = name; - } -} - -/* - * Dispatch a data abort to the relevant handler. - */ -asmlinkage void -do_DataAbort(unsigned long addr, unsigned int fsr, struct pt_regs *regs) -{ - const struct fsr_info *inf = fsr_info + (fsr & 15) + ((fsr & (1 << 10)) >> 6); - - if (!inf->fn(addr, fsr, regs)) - return; - - printk(KERN_ALERT "Unhandled fault: %s (0x%03x) at 0x%08lx\n", - inf->name, fsr, addr); - force_sig(inf->sig, current); - show_pte(current->mm, addr); - die_if_kernel("Oops", regs, 0); -} - -asmlinkage void -do_PrefetchAbort(unsigned long addr, struct pt_regs *regs) -{ - do_translation_fault(addr, 0, regs); -} static unsigned long shared_pte_mask = L_PTE_CACHEABLE; diff -Nru a/arch/arm/mm/fault-common.c b/arch/arm/mm/fault-common.c --- a/arch/arm/mm/fault-common.c Tue May 4 21:53:36 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,374 +0,0 @@ -/* - * linux/arch/arm/mm/fault-common.c - * - * Copyright (C) 1995 Linus Torvalds - * Modifications for ARM processor (c) 1995-2001 Russell King - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "fault.h" - -#ifdef CONFIG_CPU_26 -#define FAULT_CODE_WRITE 0x02 -#define FAULT_CODE_FORCECOW 0x01 -#define DO_COW(m) ((m) & (FAULT_CODE_WRITE|FAULT_CODE_FORCECOW)) -#define READ_FAULT(m) (!((m) & FAULT_CODE_WRITE)) -#else -/* - * "code" is actually the FSR register. Bit 11 set means the - * instruction was performing a write. - */ -#define DO_COW(code) ((code) & (1 << 11)) -#define READ_FAULT(code) (!DO_COW(code)) -#endif - -/* - * This is useful to dump out the page tables associated with - * 'addr' in mm 'mm'. - */ -void show_pte(struct mm_struct *mm, unsigned long addr) -{ - pgd_t *pgd; - - if (!mm) - mm = &init_mm; - - printk(KERN_ALERT "pgd = %p\n", mm->pgd); - pgd = pgd_offset(mm, addr); - printk(KERN_ALERT "[%08lx] *pgd=%08lx", addr, pgd_val(*pgd)); - - do { - pmd_t *pmd; - pte_t *pte; - - if (pgd_none(*pgd)) - break; - - if (pgd_bad(*pgd)) { - printk("(bad)"); - break; - } - - pmd = pmd_offset(pgd, addr); -#if PTRS_PER_PMD != 1 - printk(", *pmd=%08lx", pmd_val(*pmd)); -#endif - - if (pmd_none(*pmd)) - break; - - if (pmd_bad(*pmd)) { - printk("(bad)"); - break; - } - -#ifndef CONFIG_HIGHMEM - /* We must not map this if we have highmem enabled */ - pte = pte_offset_map(pmd, addr); - printk(", *pte=%08lx", pte_val(*pte)); -#ifdef CONFIG_CPU_32 - printk(", *ppte=%08lx", pte_val(pte[-PTRS_PER_PTE])); -#endif - pte_unmap(pte); -#endif - } while(0); - - printk("\n"); -} - -/* - * Oops. The kernel tried to access some page that wasn't present. - */ -static void -__do_kernel_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr, - struct pt_regs *regs) -{ - /* - * Are we prepared to handle this kernel fault? - */ - if (fixup_exception(regs)) - return; - - /* - * No handler, we'll have to terminate things with extreme prejudice. - */ - bust_spinlocks(1); - printk(KERN_ALERT - "Unable to handle kernel %s at virtual address %08lx\n", - (addr < PAGE_SIZE) ? "NULL pointer dereference" : - "paging request", addr); - - show_pte(mm, addr); - die("Oops", regs, fsr); - bust_spinlocks(0); - do_exit(SIGKILL); -} - -/* - * Something tried to access memory that isn't in our memory map.. - * User mode accesses just cause a SIGSEGV - */ -static void -__do_user_fault(struct task_struct *tsk, unsigned long addr, - unsigned int fsr, int code, struct pt_regs *regs) -{ - struct siginfo si; - -#ifdef CONFIG_DEBUG_USER - if (user_debug & UDBG_SEGV) { - printk(KERN_DEBUG "%s: unhandled page fault at 0x%08lx, code 0x%03x\n", - tsk->comm, addr, fsr); - show_pte(tsk->mm, addr); - show_regs(regs); - } -#endif - - tsk->thread.address = addr; - tsk->thread.error_code = fsr; - tsk->thread.trap_no = 14; - si.si_signo = SIGSEGV; - si.si_errno = 0; - si.si_code = code; - si.si_addr = (void *)addr; - force_sig_info(SIGSEGV, &si, tsk); -} - -void -do_bad_area(struct task_struct *tsk, struct mm_struct *mm, unsigned long addr, - unsigned int fsr, struct pt_regs *regs) -{ - /* - * If we are in kernel mode at this point, we - * have no context to handle this fault with. - */ - if (user_mode(regs)) - __do_user_fault(tsk, addr, fsr, SEGV_MAPERR, regs); - else - __do_kernel_fault(mm, addr, fsr, regs); -} - -#define VM_FAULT_BADMAP (-20) -#define VM_FAULT_BADACCESS (-21) - -static int -__do_page_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr, - struct task_struct *tsk) -{ - struct vm_area_struct *vma; - int fault, mask; - - vma = find_vma(mm, addr); - fault = VM_FAULT_BADMAP; - if (!vma) - goto out; - if (vma->vm_start > addr) - goto check_stack; - - /* - * Ok, we have a good vm_area for this - * memory access, so we can handle it. - */ -good_area: - if (READ_FAULT(fsr)) /* read? */ - mask = VM_READ|VM_EXEC; - else - mask = VM_WRITE; - - fault = VM_FAULT_BADACCESS; - if (!(vma->vm_flags & mask)) - goto out; - - /* - * If for any reason at all we couldn't handle - * the fault, make sure we exit gracefully rather - * than endlessly redo the fault. - */ -survive: - fault = handle_mm_fault(mm, vma, addr & PAGE_MASK, DO_COW(fsr)); - - /* - * Handle the "normal" cases first - successful and sigbus - */ - switch (fault) { - case VM_FAULT_MAJOR: - tsk->maj_flt++; - return fault; - case VM_FAULT_MINOR: - tsk->min_flt++; - case VM_FAULT_SIGBUS: - return fault; - } - - if (tsk->pid != 1) - goto out; - - /* - * If we are out of memory for pid1, - * sleep for a while and retry - */ - yield(); - goto survive; - -check_stack: - if (vma->vm_flags & VM_GROWSDOWN && !expand_stack(vma, addr)) - goto good_area; -out: - return fault; -} - -int do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) -{ - struct task_struct *tsk; - struct mm_struct *mm; - int fault; - - tsk = current; - mm = tsk->mm; - - /* - * If we're in an interrupt or have no user - * context, we must not take the fault.. - */ - if (in_interrupt() || !mm) - goto no_context; - - down_read(&mm->mmap_sem); - fault = __do_page_fault(mm, addr, fsr, tsk); - up_read(&mm->mmap_sem); - - /* - * Handle the "normal" case first - */ - if (fault > 0) - return 0; - - /* - * We had some memory, but were unable to - * successfully fix up this page fault. - */ - if (fault == 0) - goto do_sigbus; - - /* - * If we are in kernel mode at this point, we - * have no context to handle this fault with. - */ - if (!user_mode(regs)) - goto no_context; - - if (fault == VM_FAULT_OOM) { - /* - * We ran out of memory, or some other thing happened to - * us that made us unable to handle the page fault gracefully. - */ - printk("VM: killing process %s\n", tsk->comm); - do_exit(SIGKILL); - } else - __do_user_fault(tsk, addr, fsr, fault == VM_FAULT_BADACCESS ? - SEGV_ACCERR : SEGV_MAPERR, regs); - return 0; - - -/* - * We ran out of memory, or some other thing happened to us that made - * us unable to handle the page fault gracefully. - */ -do_sigbus: - /* - * Send a sigbus, regardless of whether we were in kernel - * or user mode. - */ - tsk->thread.address = addr; - tsk->thread.error_code = fsr; - tsk->thread.trap_no = 14; - force_sig(SIGBUS, tsk); -#ifdef CONFIG_DEBUG_USER - if (user_debug & UDBG_BUS) { - printk(KERN_DEBUG "%s: sigbus at 0x%08lx, pc=0x%08lx\n", - current->comm, addr, instruction_pointer(regs)); - } -#endif - - /* Kernel mode? Handle exceptions or die */ - if (user_mode(regs)) - return 0; - -no_context: - __do_kernel_fault(mm, addr, fsr, regs); - return 0; -} - -/* - * First Level Translation Fault Handler - * - * We enter here because the first level page table doesn't contain - * a valid entry for the address. - * - * If the address is in kernel space (>= TASK_SIZE), then we are - * probably faulting in the vmalloc() area. - * - * If the init_task's first level page tables contains the relevant - * entry, we copy the it to this task. If not, we send the process - * a signal, fixup the exception, or oops the kernel. - * - * NOTE! We MUST NOT take any locks for this case. We may be in an - * interrupt or a critical region, and should only copy the information - * from the master page table, nothing more. - */ -int do_translation_fault(unsigned long addr, unsigned int fsr, - struct pt_regs *regs) -{ - struct task_struct *tsk; - unsigned int index; - pgd_t *pgd, *pgd_k; - pmd_t *pmd, *pmd_k; - - if (addr < TASK_SIZE) - return do_page_fault(addr, fsr, regs); - - index = pgd_index(addr); - - /* - * FIXME: CP15 C1 is write only on ARMv3 architectures. - */ - pgd = cpu_get_pgd() + index; - pgd_k = init_mm.pgd + index; - - if (pgd_none(*pgd_k)) - goto bad_area; - - if (!pgd_present(*pgd)) - set_pgd(pgd, *pgd_k); - - pmd_k = pmd_offset(pgd_k, addr); - pmd = pmd_offset(pgd, addr); - - if (pmd_none(*pmd_k)) - goto bad_area; - - set_pmd(pmd, *pmd_k); - return 0; - -bad_area: - tsk = current; - - do_bad_area(tsk, tsk->active_mm, addr, fsr, regs); - return 0; -} diff -Nru a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm/mm/fault.c Tue May 4 21:53:36 2004 @@ -0,0 +1,464 @@ +/* + * linux/arch/arm/mm/fault.c + * + * Copyright (C) 1995 Linus Torvalds + * Modifications for ARM processor (c) 1995-2004 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "fault.h" + +/* + * This is useful to dump out the page tables associated with + * 'addr' in mm 'mm'. + */ +void show_pte(struct mm_struct *mm, unsigned long addr) +{ + pgd_t *pgd; + + if (!mm) + mm = &init_mm; + + printk(KERN_ALERT "pgd = %p\n", mm->pgd); + pgd = pgd_offset(mm, addr); + printk(KERN_ALERT "[%08lx] *pgd=%08lx", addr, pgd_val(*pgd)); + + do { + pmd_t *pmd; + pte_t *pte; + + if (pgd_none(*pgd)) + break; + + if (pgd_bad(*pgd)) { + printk("(bad)"); + break; + } + + pmd = pmd_offset(pgd, addr); +#if PTRS_PER_PMD != 1 + printk(", *pmd=%08lx", pmd_val(*pmd)); +#endif + + if (pmd_none(*pmd)) + break; + + if (pmd_bad(*pmd)) { + printk("(bad)"); + break; + } + +#ifndef CONFIG_HIGHMEM + /* We must not map this if we have highmem enabled */ + pte = pte_offset_map(pmd, addr); + printk(", *pte=%08lx", pte_val(*pte)); +#ifdef CONFIG_CPU_32 + printk(", *ppte=%08lx", pte_val(pte[-PTRS_PER_PTE])); +#endif + pte_unmap(pte); +#endif + } while(0); + + printk("\n"); +} + +/* + * Oops. The kernel tried to access some page that wasn't present. + */ +static void +__do_kernel_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr, + struct pt_regs *regs) +{ + /* + * Are we prepared to handle this kernel fault? + */ + if (fixup_exception(regs)) + return; + + /* + * No handler, we'll have to terminate things with extreme prejudice. + */ + bust_spinlocks(1); + printk(KERN_ALERT + "Unable to handle kernel %s at virtual address %08lx\n", + (addr < PAGE_SIZE) ? "NULL pointer dereference" : + "paging request", addr); + + show_pte(mm, addr); + die("Oops", regs, fsr); + bust_spinlocks(0); + do_exit(SIGKILL); +} + +/* + * Something tried to access memory that isn't in our memory map.. + * User mode accesses just cause a SIGSEGV + */ +static void +__do_user_fault(struct task_struct *tsk, unsigned long addr, + unsigned int fsr, int code, struct pt_regs *regs) +{ + struct siginfo si; + +#ifdef CONFIG_DEBUG_USER + if (user_debug & UDBG_SEGV) { + printk(KERN_DEBUG "%s: unhandled page fault at 0x%08lx, code 0x%03x\n", + tsk->comm, addr, fsr); + show_pte(tsk->mm, addr); + show_regs(regs); + } +#endif + + tsk->thread.address = addr; + tsk->thread.error_code = fsr; + tsk->thread.trap_no = 14; + si.si_signo = SIGSEGV; + si.si_errno = 0; + si.si_code = code; + si.si_addr = (void *)addr; + force_sig_info(SIGSEGV, &si, tsk); +} + +void +do_bad_area(struct task_struct *tsk, struct mm_struct *mm, unsigned long addr, + unsigned int fsr, struct pt_regs *regs) +{ + /* + * If we are in kernel mode at this point, we + * have no context to handle this fault with. + */ + if (user_mode(regs)) + __do_user_fault(tsk, addr, fsr, SEGV_MAPERR, regs); + else + __do_kernel_fault(mm, addr, fsr, regs); +} + +#define VM_FAULT_BADMAP (-20) +#define VM_FAULT_BADACCESS (-21) + +static int +__do_page_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr, + struct task_struct *tsk) +{ + struct vm_area_struct *vma; + int fault, mask; + + vma = find_vma(mm, addr); + fault = VM_FAULT_BADMAP; + if (!vma) + goto out; + if (vma->vm_start > addr) + goto check_stack; + + /* + * Ok, we have a good vm_area for this + * memory access, so we can handle it. + */ +good_area: + if (fsr & (1 << 11)) /* write? */ + mask = VM_WRITE; + else + mask = VM_READ|VM_EXEC; + + fault = VM_FAULT_BADACCESS; + if (!(vma->vm_flags & mask)) + goto out; + + /* + * If for any reason at all we couldn't handle + * the fault, make sure we exit gracefully rather + * than endlessly redo the fault. + */ +survive: + fault = handle_mm_fault(mm, vma, addr & PAGE_MASK, fsr & (1 << 11)); + + /* + * Handle the "normal" cases first - successful and sigbus + */ + switch (fault) { + case VM_FAULT_MAJOR: + tsk->maj_flt++; + return fault; + case VM_FAULT_MINOR: + tsk->min_flt++; + case VM_FAULT_SIGBUS: + return fault; + } + + if (tsk->pid != 1) + goto out; + + /* + * If we are out of memory for pid1, + * sleep for a while and retry + */ + yield(); + goto survive; + +check_stack: + if (vma->vm_flags & VM_GROWSDOWN && !expand_stack(vma, addr)) + goto good_area; +out: + return fault; +} + +static int +do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) +{ + struct task_struct *tsk; + struct mm_struct *mm; + int fault; + + tsk = current; + mm = tsk->mm; + + /* + * If we're in an interrupt or have no user + * context, we must not take the fault.. + */ + if (in_interrupt() || !mm) + goto no_context; + + down_read(&mm->mmap_sem); + fault = __do_page_fault(mm, addr, fsr, tsk); + up_read(&mm->mmap_sem); + + /* + * Handle the "normal" case first + */ + if (fault > 0) + return 0; + + /* + * We had some memory, but were unable to + * successfully fix up this page fault. + */ + if (fault == 0) + goto do_sigbus; + + /* + * If we are in kernel mode at this point, we + * have no context to handle this fault with. + */ + if (!user_mode(regs)) + goto no_context; + + if (fault == VM_FAULT_OOM) { + /* + * We ran out of memory, or some other thing happened to + * us that made us unable to handle the page fault gracefully. + */ + printk("VM: killing process %s\n", tsk->comm); + do_exit(SIGKILL); + } else + __do_user_fault(tsk, addr, fsr, fault == VM_FAULT_BADACCESS ? + SEGV_ACCERR : SEGV_MAPERR, regs); + return 0; + + +/* + * We ran out of memory, or some other thing happened to us that made + * us unable to handle the page fault gracefully. + */ +do_sigbus: + /* + * Send a sigbus, regardless of whether we were in kernel + * or user mode. + */ + tsk->thread.address = addr; + tsk->thread.error_code = fsr; + tsk->thread.trap_no = 14; + force_sig(SIGBUS, tsk); +#ifdef CONFIG_DEBUG_USER + if (user_debug & UDBG_BUS) { + printk(KERN_DEBUG "%s: sigbus at 0x%08lx, pc=0x%08lx\n", + current->comm, addr, instruction_pointer(regs)); + } +#endif + + /* Kernel mode? Handle exceptions or die */ + if (user_mode(regs)) + return 0; + +no_context: + __do_kernel_fault(mm, addr, fsr, regs); + return 0; +} + +/* + * First Level Translation Fault Handler + * + * We enter here because the first level page table doesn't contain + * a valid entry for the address. + * + * If the address is in kernel space (>= TASK_SIZE), then we are + * probably faulting in the vmalloc() area. + * + * If the init_task's first level page tables contains the relevant + * entry, we copy the it to this task. If not, we send the process + * a signal, fixup the exception, or oops the kernel. + * + * NOTE! We MUST NOT take any locks for this case. We may be in an + * interrupt or a critical region, and should only copy the information + * from the master page table, nothing more. + */ +static int +do_translation_fault(unsigned long addr, unsigned int fsr, + struct pt_regs *regs) +{ + struct task_struct *tsk; + unsigned int index; + pgd_t *pgd, *pgd_k; + pmd_t *pmd, *pmd_k; + + if (addr < TASK_SIZE) + return do_page_fault(addr, fsr, regs); + + index = pgd_index(addr); + + /* + * FIXME: CP15 C1 is write only on ARMv3 architectures. + */ + pgd = cpu_get_pgd() + index; + pgd_k = init_mm.pgd + index; + + if (pgd_none(*pgd_k)) + goto bad_area; + + if (!pgd_present(*pgd)) + set_pgd(pgd, *pgd_k); + + pmd_k = pmd_offset(pgd_k, addr); + pmd = pmd_offset(pgd, addr); + + if (pmd_none(*pmd_k)) + goto bad_area; + + set_pmd(pmd, *pmd_k); + return 0; + +bad_area: + tsk = current; + + do_bad_area(tsk, tsk->active_mm, addr, fsr, regs); + return 0; +} + +/* + * Some section permission faults need to be handled gracefully. + * They can happen due to a __{get,put}_user during an oops. + */ +static int +do_sect_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) +{ + struct task_struct *tsk = current; + do_bad_area(tsk, tsk->active_mm, addr, fsr, regs); + return 0; +} + +/* + * This abort handler always returns "fault". + */ +static int +do_bad(unsigned long addr, unsigned int fsr, struct pt_regs *regs) +{ + return 1; +} + +static struct fsr_info { + int (*fn)(unsigned long addr, unsigned int fsr, struct pt_regs *regs); + int sig; + const char *name; +} fsr_info[] = { + /* + * The following are the standard ARMv3 and ARMv4 aborts. ARMv5 + * defines these to be "precise" aborts. + */ + { do_bad, SIGSEGV, "vector exception" }, + { do_bad, SIGILL, "alignment exception" }, + { do_bad, SIGKILL, "terminal exception" }, + { do_bad, SIGILL, "alignment exception" }, + { do_bad, SIGBUS, "external abort on linefetch" }, + { do_translation_fault, SIGSEGV, "section translation fault" }, + { do_bad, SIGBUS, "external abort on linefetch" }, + { do_page_fault, SIGSEGV, "page translation fault" }, + { do_bad, SIGBUS, "external abort on non-linefetch" }, + { do_bad, SIGSEGV, "section domain fault" }, + { do_bad, SIGBUS, "external abort on non-linefetch" }, + { do_bad, SIGSEGV, "page domain fault" }, + { do_bad, SIGBUS, "external abort on translation" }, + { do_sect_fault, SIGSEGV, "section permission fault" }, + { do_bad, SIGBUS, "external abort on translation" }, + { do_page_fault, SIGSEGV, "page permission fault" }, + /* + * The following are "imprecise" aborts, which are signalled by bit + * 10 of the FSR, and may not be recoverable. These are only + * supported if the CPU abort handler supports bit 10. + */ + { do_bad, SIGBUS, "unknown 16" }, + { do_bad, SIGBUS, "unknown 17" }, + { do_bad, SIGBUS, "unknown 18" }, + { do_bad, SIGBUS, "unknown 19" }, + { do_bad, SIGBUS, "lock abort" }, /* xscale */ + { do_bad, SIGBUS, "unknown 21" }, + { do_bad, SIGBUS, "imprecise external abort" }, /* xscale */ + { do_bad, SIGBUS, "unknown 23" }, + { do_bad, SIGBUS, "dcache parity error" }, /* xscale */ + { do_bad, SIGBUS, "unknown 25" }, + { do_bad, SIGBUS, "unknown 26" }, + { do_bad, SIGBUS, "unknown 27" }, + { do_bad, SIGBUS, "unknown 28" }, + { do_bad, SIGBUS, "unknown 29" }, + { do_bad, SIGBUS, "unknown 30" }, + { do_bad, SIGBUS, "unknown 31" } +}; + +void __init +hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, struct pt_regs *), + int sig, const char *name) +{ + if (nr >= 0 && nr < ARRAY_SIZE(fsr_info)) { + fsr_info[nr].fn = fn; + fsr_info[nr].sig = sig; + fsr_info[nr].name = name; + } +} + +/* + * Dispatch a data abort to the relevant handler. + */ +asmlinkage void +do_DataAbort(unsigned long addr, unsigned int fsr, struct pt_regs *regs) +{ + const struct fsr_info *inf = fsr_info + (fsr & 15) + ((fsr & (1 << 10)) >> 6); + + if (!inf->fn(addr, fsr, regs)) + return; + + printk(KERN_ALERT "Unhandled fault: %s (0x%03x) at 0x%08lx\n", + inf->name, fsr, addr); + force_sig(inf->sig, current); + show_pte(current->mm, addr); + die_if_kernel("Oops", regs, 0); +} + +asmlinkage void +do_PrefetchAbort(unsigned long addr, struct pt_regs *regs) +{ + do_translation_fault(addr, 0, regs); +} + diff -Nru a/arch/arm/mm/fault.h b/arch/arm/mm/fault.h --- a/arch/arm/mm/fault.h Tue May 4 21:53:36 2004 +++ b/arch/arm/mm/fault.h Tue May 4 21:53:36 2004 @@ -3,8 +3,4 @@ void show_pte(struct mm_struct *mm, unsigned long addr); -int do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs); - -int do_translation_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs); - unsigned long search_exception_table(unsigned long addr); diff -Nru a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c --- a/arch/arm/mm/ioremap.c Tue May 4 21:53:36 2004 +++ b/arch/arm/mm/ioremap.c Tue May 4 21:53:36 2004 @@ -28,8 +28,9 @@ #include #include -static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned long size, - unsigned long phys_addr, pgprot_t pgprot) +static inline void +remap_area_pte(pte_t * pte, unsigned long address, unsigned long size, + unsigned long phys_addr, pgprot_t pgprot) { unsigned long end; @@ -37,22 +38,26 @@ end = address + size; if (end > PMD_SIZE) end = PMD_SIZE; - if (address >= end) - BUG(); + BUG_ON(address >= end); do { - if (!pte_none(*pte)) { - printk("remap_area_pte: page already exists\n"); - BUG(); - } + if (!pte_none(*pte)) + goto bad; + set_pte(pte, pfn_pte(phys_addr >> PAGE_SHIFT, pgprot)); address += PAGE_SIZE; phys_addr += PAGE_SIZE; pte++; } while (address && (address < end)); + return; + + bad: + printk("remap_area_pte: page already exists\n"); + BUG(); } -static inline int remap_area_pmd(pmd_t * pmd, unsigned long address, unsigned long size, - unsigned long phys_addr, unsigned long flags) +static inline int +remap_area_pmd(pmd_t * pmd, unsigned long address, unsigned long size, + unsigned long phys_addr, unsigned long flags) { unsigned long end; pgprot_t pgprot; @@ -64,8 +69,7 @@ end = PGDIR_SIZE; phys_addr -= address; - if (address >= end) - BUG(); + BUG_ON(address >= end); pgprot = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | L_PTE_WRITE | flags); do { @@ -79,35 +83,38 @@ return 0; } -static int remap_area_pages(unsigned long address, unsigned long phys_addr, - unsigned long size, unsigned long flags) +static int +remap_area_pages(unsigned long start, unsigned long phys_addr, + unsigned long size, unsigned long flags) { - int error; + unsigned long address = start; + unsigned long end = start + size; + int err = 0; pgd_t * dir; - unsigned long end = address + size; phys_addr -= address; dir = pgd_offset(&init_mm, address); - flush_cache_all(); - if (address >= end) - BUG(); + BUG_ON(address >= end); spin_lock(&init_mm.page_table_lock); do { - pmd_t *pmd; - pmd = pmd_alloc(&init_mm, dir, address); - error = -ENOMEM; - if (!pmd) + pmd_t *pmd = pmd_alloc(&init_mm, dir, address); + if (!pmd) { + err = -ENOMEM; break; + } if (remap_area_pmd(pmd, address, end - address, - phys_addr + address, flags)) + phys_addr + address, flags)) { + err = -ENOMEM; break; - error = 0; + } + address = (address + PGDIR_SIZE) & PGDIR_MASK; dir++; } while (address && (address < end)); + spin_unlock(&init_mm.page_table_lock); - flush_tlb_all(); - return error; + flush_cache_vmap(start, end); + return err; } /* diff -Nru a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm/mm/mmap.c Tue May 4 21:53:36 2004 @@ -0,0 +1,109 @@ +/* + * linux/arch/arm/mm/mmap.c + */ +#include +#include +#include +#include +#include + +#include + +#define COLOUR_ALIGN(addr,pgoff) \ + ((((addr)+SHMLBA-1)&~(SHMLBA-1)) + \ + (((pgoff)<mm; + struct vm_area_struct *vma; + unsigned long start_addr; +#ifdef CONFIG_CPU_V6 + unsigned int cache_type; + int do_align = 0, aliasing = 0; + + /* + * We only need to do colour alignment if either the I or D + * caches alias. This is indicated by bits 9 and 21 of the + * cache type register. + */ + cache_type = read_cpuid(CPUID_CACHETYPE); + if (cache_type != read_cpuid(CPUID_ID)) { + aliasing = (cache_type | cache_type >> 12) & (1 << 9); + if (aliasing) + do_align = filp || flags & MAP_SHARED; + } +#else +#define do_align 0 +#define aliasing 0 +#endif + + /* + * We should enforce the MAP_FIXED case. However, currently + * the generic kernel code doesn't allow us to handle this. + */ + if (flags & MAP_FIXED) { + if (aliasing && flags & MAP_SHARED && addr & (SHMLBA - 1)) + return -EINVAL; + return addr; + } + + if (len > TASK_SIZE) + return -ENOMEM; + + if (addr) { + if (do_align) + addr = COLOUR_ALIGN(addr, pgoff); + else + addr = PAGE_ALIGN(addr); + + vma = find_vma(mm, addr); + if (TASK_SIZE - len >= addr && + (!vma || addr + len <= vma->vm_start)) + return addr; + } + start_addr = addr = mm->free_area_cache; + +full_search: + if (do_align) + addr = COLOUR_ALIGN(addr, pgoff); + else + addr = PAGE_ALIGN(addr); + + for (vma = find_vma(mm, addr); ; vma = vma->vm_next) { + /* At this point: (!vma || addr < vma->vm_end). */ + if (TASK_SIZE - len < addr) { + /* + * Start a new search - just in case we missed + * some holes. + */ + if (start_addr != TASK_UNMAPPED_BASE) { + start_addr = addr = TASK_UNMAPPED_BASE; + goto full_search; + } + return -ENOMEM; + } + if (!vma || addr + len <= vma->vm_start) { + /* + * Remember the place where we stopped the search: + */ + mm->free_area_cache = addr + len; + return addr; + } + addr = vma->vm_end; + if (do_align) + addr = COLOUR_ALIGN(addr, pgoff); + } +} + diff -Nru a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S --- a/arch/arm/mm/proc-xscale.S Tue May 4 21:53:36 2004 +++ b/arch/arm/mm/proc-xscale.S Tue May 4 21:53:36 2004 @@ -647,6 +647,16 @@ .asciz "XScale-PXA210" .size cpu_pxa210_name, . - cpu_pxa210_name + .type cpu_pxa255_name, #object +cpu_pxa255_name: + .asciz "XScale-PXA255" + .size cpu_pxa255_name, . - cpu_pxa255_name + + .type cpu_pxa270_name, #object +cpu_pxa270_name: + .asciz "XScale-PXA270" + .size cpu_pxa270_name, . - cpu_pxa270_name + .align .section ".proc.info", #alloc, #execinstr @@ -686,7 +696,7 @@ .type __pxa250_proc_info,#object __pxa250_proc_info: .long 0x69052100 - .long 0xfffff3f0 + .long 0xfffff7f0 .long 0x00000c0e b __xscale_setup .long cpu_arch_name @@ -714,4 +724,36 @@ .long xscale_mc_user_fns .long xscale_cache_fns .size __pxa210_proc_info, . - __pxa210_proc_info + + .type __pxa255_proc_info,#object +__pxa255_proc_info: + .long 0x69052d00 + .long 0xfffffff0 + .long 0x00000c0e + b __xscale_setup + .long cpu_arch_name + .long cpu_elf_name + .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP + .long cpu_pxa255_name + .long xscale_processor_functions + .long v4wbi_tlb_fns + .long xscale_mc_user_fns + .long xscale_cache_fns + .size __pxa255_proc_info, . - __pxa255_proc_info + + .type __pxa270_proc_info,#object +__pxa270_proc_info: + .long 0x69054110 + .long 0xfffffff0 + .long 0x00000c0e + b __xscale_setup + .long cpu_arch_name + .long cpu_elf_name + .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP + .long cpu_pxa270_name + .long xscale_processor_functions + .long v4wbi_tlb_fns + .long xscale_mc_user_fns + .long xscale_cache_fns + .size __pxa270_proc_info, . - __pxa270_proc_info diff -Nru a/arch/arm/oprofile/op_model_xscale.c b/arch/arm/oprofile/op_model_xscale.c --- a/arch/arm/oprofile/op_model_xscale.c Tue May 4 21:53:36 2004 +++ b/arch/arm/oprofile/op_model_xscale.c Tue May 4 21:53:36 2004 @@ -20,7 +20,8 @@ #include #include #include -#include +#include +#include #include "op_counter.h" #include "op_arm_model.h" @@ -399,8 +400,7 @@ int ret = 0; u32 id; - __asm__ __volatile__ ("mrc p15, 0, %0, c0, c0, 0" : "=r" (id)); - id = (id >> 13) & 0x7; + id = (read_cpuid(CPUID_ID) >> 13) & 0x7; switch (id) { case 1: diff -Nru a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types --- a/arch/arm/tools/mach-types Tue May 4 21:53:36 2004 +++ b/arch/arm/tools/mach-types Tue May 4 21:53:36 2004 @@ -6,7 +6,7 @@ # To add an entry into this database, please see Documentation/arm/README, # or contact rmk@arm.linux.org.uk # -# Last update: Thu Apr 15 10:14:37 2004 +# Last update: Thu Apr 29 19:06:33 2004 # # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number # @@ -242,7 +242,7 @@ yoho ARCH_YOHO YOHO 231 jasper ARCH_JASPER JASPER 232 dsc25 ARCH_DSC25 DSC25 233 -innovator ARCH_INNOVATOR INNOVATOR 234 +omap_innovator MACH_OMAP_INNOVATOR OMAP_INNOVATOR 234 ramses ARCH_RAMSES RAMSES 235 s28x ARCH_S28X S28X 236 mport3 ARCH_MPORT3 MPORT3 237 @@ -390,7 +390,7 @@ mp1x ARCH_MP1X MP1X 379 at91rm9200tb ARCH_AT91RM9200TB AT91RM9200TB 380 adsvgx ARCH_ADSVGX ADSVGX 381 -omap_h2 ARCH_OMAP_H2 OMAP_H2 382 +omap_h2 MACH_OMAP_H2 OMAP_H2 382 pelee ARCH_PELEE PELEE 383 e740 MACH_E740 E740 384 iq80331 ARCH_IQ80331 IQ80331 385 @@ -523,3 +523,13 @@ sg560 MACH_SG560 SG560 513 dp1000 MACH_DP1000 DP1000 514 omap_osk MACH_OMAP_OSK OMAP_OSK 515 +rg100v3 MACH_RG100V3 RG100V3 516 +mx2ads MACH_MX2ADS MX2ADS 517 +pxa_kilo MACH_PXA_KILO PXA_KILO 518 +ixp4xx_eagle MACH_IXP4XX_EAGLE IXP4XX_EAGLE 519 +tosa MACH_TOSA TOSA 520 +mb2520f MACH_MB2520F MB2520F 521 +emc1000 MACH_EMC1000 EMC1000 522 +tidsc25 MACH_TIDSC25 TIDSC25 523 +akcpmxl MACH_AKCPMXL AKCPMXL 524 +av3xx MACH_AV3XX AV3XX 525 diff -Nru a/arch/i386/pci/pcbios.c b/arch/i386/pci/pcbios.c --- a/arch/i386/pci/pcbios.c Tue May 4 21:53:35 2004 +++ b/arch/i386/pci/pcbios.c Tue May 4 21:53:35 2004 @@ -431,11 +431,13 @@ "1:" : "=a" (ret), "=b" (map), - "+m" (opt) + "=m" (opt) : "0" (PCIBIOS_GET_ROUTING_OPTIONS), "1" (0), "D" ((long) &opt), - "S" (&pci_indirect)); + "S" (&pci_indirect), + "m" (opt) + : "memory"); DBG("OK ret=%d, size=%d, map=%x\n", ret, opt.size, map); if (ret & 0xff00) printk(KERN_ERR "PCI: Error %02x when fetching IRQ routing table.\n", (ret >> 8) & 0xff); diff -Nru a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c --- a/arch/ia64/kernel/efi.c Tue May 4 21:53:35 2004 +++ b/arch/ia64/kernel/efi.c Tue May 4 21:53:35 2004 @@ -733,3 +733,47 @@ return 0; } +int __init +efi_uart_console_only(void) +{ + efi_status_t status; + char *s, name[] = "ConOut"; + efi_guid_t guid = EFI_GLOBAL_VARIABLE_GUID; + efi_char16_t *utf16, name_utf16[32]; + unsigned char data[1024]; + unsigned long size = sizeof(data); + struct efi_generic_dev_path *hdr, *end_addr; + int uart = 0; + + /* Convert to UTF-16 */ + utf16 = name_utf16; + s = name; + while (*s) + *utf16++ = *s++ & 0x7f; + *utf16 = 0; + + status = efi.get_variable(name_utf16, &guid, NULL, &size, data); + if (status != EFI_SUCCESS) { + printk(KERN_ERR "No EFI %s variable?\n", name); + return 0; + } + + hdr = (struct efi_generic_dev_path *) data; + end_addr = (struct efi_generic_dev_path *) ((u8 *) data + size); + while (hdr < end_addr) { + if (hdr->type == EFI_DEV_MSG && + hdr->sub_type == EFI_DEV_MSG_UART) + uart = 1; + else if (hdr->type == EFI_DEV_END_PATH || + hdr->type == EFI_DEV_END_PATH2) { + if (!uart) + return 0; + if (hdr->sub_type == EFI_DEV_END_ENTIRE) + return 1; + uart = 0; + } + hdr = (struct efi_generic_dev_path *) ((u8 *) hdr + hdr->length); + } + printk(KERN_ERR "Malformed %s value\n", name); + return 0; +} diff -Nru a/arch/ia64/sn/io/io.c b/arch/ia64/sn/io/io.c --- a/arch/ia64/sn/io/io.c Tue May 4 21:53:35 2004 +++ b/arch/ia64/sn/io/io.c Tue May 4 21:53:35 2004 @@ -529,7 +529,11 @@ void hub_provider_startup(vertex_hdl_t hubv) { + hubinfo_t hubinfo; + + hubinfo_get(hubv, &hubinfo); hub_pio_init(hubv); + intr_init_vecblk(nasid_to_cnodeid(hubinfo->h_nasid)); } /* diff -Nru a/arch/ia64/sn/io/machvec/pci_bus_cvlink.c b/arch/ia64/sn/io/machvec/pci_bus_cvlink.c --- a/arch/ia64/sn/io/machvec/pci_bus_cvlink.c Tue May 4 21:53:36 2004 +++ b/arch/ia64/sn/io/machvec/pci_bus_cvlink.c Tue May 4 21:53:36 2004 @@ -813,11 +813,6 @@ */ sgi_master_io_infr_init(); - for (cnode = 0; cnode < numnodes; cnode++) { - extern void intr_init_vecblk(cnodeid_t); - intr_init_vecblk(cnode); - } - sn_init_cpei_timer(); #ifdef CONFIG_PROC_FS diff -Nru a/arch/ia64/sn/kernel/irq.c b/arch/ia64/sn/kernel/irq.c --- a/arch/ia64/sn/kernel/irq.c Tue May 4 21:53:35 2004 +++ b/arch/ia64/sn/kernel/irq.c Tue May 4 21:53:35 2004 @@ -40,6 +40,7 @@ static void force_interrupt(int irq); extern void pcibr_force_interrupt(pcibr_intr_t intr); extern int sn_force_interrupt_flag; +struct irq_desc * sn_irq_desc(unsigned int irq); struct sn_intr_list_t { struct sn_intr_list_t *next; @@ -101,6 +102,8 @@ int nasid; int ivec; unsigned long event_occurred; + irq_desc_t *desc = sn_irq_desc(irq); + unsigned int status = desc->status; ivec = irq & 0xff; if (ivec == SGI_UART_VECTOR) { @@ -115,7 +118,8 @@ } __clear_bit(ivec, (volatile void *)pda->sn_in_service_ivecs); if (sn_force_interrupt_flag) - force_interrupt(irq); + if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS))) + force_interrupt(irq); } static void diff -Nru a/arch/ppc/4xx_io/serial_sicc.c b/arch/ppc/4xx_io/serial_sicc.c --- a/arch/ppc/4xx_io/serial_sicc.c Tue May 4 21:53:35 2004 +++ b/arch/ppc/4xx_io/serial_sicc.c Tue May 4 21:53:35 2004 @@ -32,6 +32,7 @@ #include #include +#include #include #include #include @@ -190,10 +191,6 @@ #define FALSE 0 #endif -#define DEBUG 0 - - - /* * Things needed by tty driver */ @@ -763,9 +760,7 @@ cflag = info->tty->termios->c_cflag; -#ifdef DEBUG - printk("siccuart_set_cflag(0x%x) called\n", cflag); -#endif + pr_debug("siccuart_set_cflag(0x%x) called\n", cflag); /* byte size and parity */ switch (cflag & CSIZE) { case CS7: lcr_h = _LCR_PE_DISABLE | _LCR_DB_7_BITS | _LCR_SB_1_BIT; bits = 9; break; @@ -1027,9 +1022,7 @@ struct SICC_info *info = tty->driver_data; unsigned long flags; -#ifdef DEBUG - printk("siccuart_flush_buffer(%d) called\n", tty->index); -#endif + pr_debug("siccuart_flush_buffer(%d) called\n", tty->index); save_flags(flags); cli(); info->xmit.head = info->xmit.tail = 0; restore_flags(flags); @@ -1433,9 +1426,7 @@ state = info->state; -#ifdef DEBUG - //printk("siccuart_close() called\n"); -#endif + //pr_debug("siccuart_close() called\n"); save_flags(flags); cli(); @@ -1544,11 +1535,9 @@ timeout = 2 * info->timeout; expire = jiffies + timeout; -#ifdef DEBUG - printk("siccuart_wait_until_sent(%d), jiff=%lu, expire=%lu char_time=%lu...\n", + pr_debug("siccuart_wait_until_sent(%d), jiff=%lu, expire=%lu char_time=%lu...\n", tty->index, jiffies, expire, char_time); -#endif while ((readb(info->port->uart_base + BL_SICC_LSR) & _LSR_TX_ALL) != _LSR_TX_ALL) { set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(char_time); @@ -1831,9 +1820,8 @@ unsigned int status; char *w; int c; -#ifdef DEBUG - printk("siccuart_console_read() called\n"); -#endif + + pr_debug("siccuart_console_read() called\n"); c = 0; w = s; diff -Nru a/arch/ppc/Kconfig b/arch/ppc/Kconfig --- a/arch/ppc/Kconfig Tue May 4 21:53:36 2004 +++ b/arch/ppc/Kconfig Tue May 4 21:53:36 2004 @@ -609,7 +609,7 @@ config PPC_GEN550 bool - depends on SANDPOINT || MCPN765 || SPRUCE || PPLUS || PCORE + depends on SANDPOINT || MCPN765 || SPRUCE || PPLUS || PCORE || PRPMC750 || K2 || PRPMC800 default y config FORCE @@ -622,6 +622,15 @@ depends on EV64260 default y +config NONMONARCH_SUPPORT + bool "Enable Non-Monarch Support" + depends on PRPMC800 + +config HARRIER + bool + depends on PRPMC800 + default y + config EPIC_SERIAL_MODE bool depends on 6xx && (LOPEC || SANDPOINT) @@ -639,6 +648,10 @@ config CPC710_DATA_GATHERING bool "Enable CPC710 data gathering" depends on K2 + +config HARRIER_STORE_GATHERING + bool "Enable Harrier store gathering" + depends on HARRIER config MVME5100_IPMC761_PRESENT bool "MVME5100 configured with an IPMC761" diff -Nru a/arch/ppc/boot/openfirmware/Makefile b/arch/ppc/boot/openfirmware/Makefile --- a/arch/ppc/boot/openfirmware/Makefile Tue May 4 21:53:35 2004 +++ b/arch/ppc/boot/openfirmware/Makefile Tue May 4 21:53:35 2004 @@ -89,13 +89,14 @@ $(call if_changed_dep,as_o_S) quiet_cmd_gencoffb = COFF $@ - cmd_gencoffb = $(LD) -o $@ $(COFF_LD_ARGS) $(filter-out FORCE,$^) && \ + cmd_gencoffb = $(LD) -o $@ $(COFF_LD_ARGS) $(COFFOBJS) $< $(LIBS) && \ $(OBJCOPY) $@ $@ -R .comment $(del-ramdisk-sec) targets += coffboot -$(obj)/coffboot: $(COFFOBJS) $(obj)/image.o $(LIBS) FORCE +$(obj)/coffboot: $(obj)/image.o $(COFFOBJS) $(LIBS) $(boot)/ld.script FORCE $(call if_changed,gencoffb) targets += coffboot.initrd -$(obj)/coffboot.initrd: $(COFFOBJS) $(obj)/image.initrd.o $(LIBS) FORCE +$(obj)/coffboot.initrd: $(obj)/image.initrd.o $(COFFOBJS) $(LIBS) \ + $(boot)/ld.script FORCE $(call if_changed,gencoffb) @@ -104,10 +105,10 @@ $(HACKCOFF) $@ && \ ln -sf $(notdir $@) $(images)/zImage$(initrd).pmac -$(images)/vmlinux.coff: $(obj)/coffboot $(boot)/ld.script +$(images)/vmlinux.coff: $(obj)/coffboot $(call cmd,gen-coff) -$(images)/vmlinux.initrd.coff: $(obj)/coffboot.initrd $(boot)/ld.script +$(images)/vmlinux.initrd.coff: $(obj)/coffboot.initrd $(call cmd,gen-coff) quiet_cmd_gen-elf-pmac = ELF $@ @@ -116,19 +117,21 @@ $(OBJCOPY) $@ $@ --add-section=.note=$(obj)/note \ -R .comment $(del-ramdisk-sec) -$(images)/vmlinux.elf-pmac: $(obj)/image.o $(NEWWORLDOBJS) $(LIBS) $(obj)/note $(boot)/ld.script +$(images)/vmlinux.elf-pmac: $(obj)/image.o $(NEWWORLDOBJS) $(LIBS) \ + $(obj)/note $(boot)/ld.script $(call cmd,gen-elf-pmac) $(images)/vmlinux.initrd.elf-pmac: $(obj)/image.initrd.o $(NEWWORLDOBJS) \ $(LIBS) $(obj)/note $(boot)/ld.script $(call cmd,gen-elf-pmac) quiet_cmd_gen-chrp = CHRP $@ - cmd_gen-chrp = $(LD) $(CHRP_LD_ARGS) -o $@ $^ && \ + cmd_gen-chrp = $(LD) $(CHRP_LD_ARGS) -o $@ $(CHRPOBJS) $< $(LIBS) && \ $(OBJCOPY) $@ $@ -R .comment $(del-ramdisk-sec) -$(images)/zImage.chrp: $(CHRPOBJS) $(obj)/image.o $(LIBS) $(boot)/ld.script +$(images)/zImage.chrp: $(obj)/image.o $(CHRPOBJS) $(LIBS) $(boot)/ld.script $(call cmd,gen-chrp) -$(images)/zImage.initrd.chrp: $(CHRPOBJS) $(obj)/image.initrd.o $(LIBS) $(boot)/ld.script +$(images)/zImage.initrd.chrp: $(obj)/image.initrd.o $(CHRPOBJS) $(LIBS) \ + $(boot)/ld.script $(call cmd,gen-chrp) quiet_cmd_addnote = ADDNOTE $@ diff -Nru a/arch/ppc/configs/k2_defconfig b/arch/ppc/configs/k2_defconfig --- a/arch/ppc/configs/k2_defconfig Tue May 4 21:53:35 2004 +++ b/arch/ppc/configs/k2_defconfig Tue May 4 21:53:35 2004 @@ -4,23 +4,39 @@ CONFIG_MMU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_HAVE_DEC_LOCK=y +CONFIG_PPC=y +CONFIG_PPC32=y +CONFIG_GENERIC_NVRAM=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_STANDALONE=y +CONFIG_BROKEN_ON_SMP=y # # General setup # CONFIG_SWAP=y CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_EMBEDDED is not set +# CONFIG_HOTPLUG is not set +# CONFIG_IKCONFIG is not set +CONFIG_EMBEDDED=y +CONFIG_KALLSYMS=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 # # Loadable module support @@ -33,24 +49,25 @@ CONFIG_KMOD=y # -# Platform support +# Processor # -CONFIG_PPC=y -CONFIG_PPC32=y CONFIG_6xx=y # CONFIG_40x is not set +# CONFIG_44x is not set # CONFIG_POWER3 is not set +# CONFIG_POWER4 is not set # CONFIG_8xx is not set +# CONFIG_ALTIVEC is not set +# CONFIG_TAU is not set +# CONFIG_CPU_FREQ is not set +CONFIG_PPC_STD_MMU=y # -# IBM 4xx options +# Platform options # -# CONFIG_8260 is not set -CONFIG_GENERIC_ISA_DMA=y -CONFIG_PPC_STD_MMU=y # CONFIG_PPC_MULTIPLATFORM is not set # CONFIG_APUS is not set -# CONFIG_WILLOW_2 is not set +# CONFIG_WILLOW is not set # CONFIG_PCORE is not set # CONFIG_POWERPMC250 is not set # CONFIG_EV64260 is not set @@ -66,34 +83,29 @@ CONFIG_K2=y # CONFIG_PAL4 is not set # CONFIG_GEMINI is not set +# CONFIG_EST8260 is not set +# CONFIG_SBS8260 is not set +# CONFIG_RPX6 is not set +# CONFIG_TQM8260 is not set +CONFIG_PPC_GEN550=y # CONFIG_CPC710_DATA_GATHERING is not set # CONFIG_SMP is not set # CONFIG_PREEMPT is not set -# CONFIG_ALTIVEC is not set -# CONFIG_TAU is not set -# CONFIG_CPU_FREQ is not set +# CONFIG_HIGHMEM is not set +CONFIG_KERNEL_ELF=y +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +CONFIG_CMDLINE_BOOL=y +CONFIG_CMDLINE="ip=on" # -# General setup +# Bus options # -# CONFIG_HIGHMEM is not set +CONFIG_GENERIC_ISA_DMA=y CONFIG_PCI=y CONFIG_PCI_DOMAINS=y -CONFIG_KCORE_ELF=y -CONFIG_BINFMT_ELF=y -CONFIG_KERNEL_ELF=y -# CONFIG_BINFMT_MISC is not set # CONFIG_PCI_LEGACY_PROC is not set # CONFIG_PCI_NAMES is not set -# CONFIG_HOTPLUG is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set -# CONFIG_PPC601_SYNC_FIX is not set -CONFIG_CMDLINE_BOOL=y -CONFIG_CMDLINE="ip=on" # # Advanced setup @@ -110,14 +122,26 @@ CONFIG_BOOT_LOAD=0x00800000 # +# Device Drivers +# + +# +# Generic Driver Options +# + +# # Memory Technology Devices (MTD) # # CONFIG_MTD is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # -# CONFIG_PNP is not set # # Block devices @@ -128,53 +152,89 @@ # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_CARMEL is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +# CONFIG_LBD is not set # -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# ATA/IDE/MFM/RLL support +# ATA/ATAPI/MFM/RLL support # CONFIG_IDE=y - -# -# IDE, ATA and ATAPI Block devices -# CONFIG_BLK_DEV_IDE=y # # Please see Documentation/ide.txt for help/info on IDE drives # -# CONFIG_BLK_DEV_HD is not set CONFIG_BLK_DEV_IDEDISK=y # CONFIG_IDEDISK_MULTI_MODE is not set # CONFIG_IDEDISK_STROKE is not set # CONFIG_BLK_DEV_IDECD is not set +# 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 # -# CONFIG_BLK_DEV_IDEPCI is not set +# CONFIG_IDE_GENERIC is not set +CONFIG_BLK_DEV_IDEPCI=y +# CONFIG_IDEPCI_SHARE_IRQ is not set +# CONFIG_BLK_DEV_OFFBOARD is not set +# CONFIG_BLK_DEV_GENERIC is not set +# CONFIG_BLK_DEV_OPTI621 is not set +# CONFIG_BLK_DEV_SL82C105 is not set +CONFIG_BLK_DEV_IDEDMA_PCI=y +# CONFIG_BLK_DEV_IDEDMA_FORCED is not set +# CONFIG_IDEDMA_PCI_AUTO is not set +CONFIG_BLK_DEV_ADMA=y +# CONFIG_BLK_DEV_AEC62XX is not set +CONFIG_BLK_DEV_ALI15X3=y +# CONFIG_WDC_ALI15X3 is not set +# CONFIG_BLK_DEV_AMD74XX is not set +# CONFIG_BLK_DEV_CMD64X is not set +# CONFIG_BLK_DEV_TRIFLEX is not set +# CONFIG_BLK_DEV_CY82C693 is not set +# CONFIG_BLK_DEV_CS5520 is not set +# CONFIG_BLK_DEV_CS5530 is not set +# CONFIG_BLK_DEV_HPT34X is not set +# CONFIG_BLK_DEV_HPT366 is not set +# CONFIG_BLK_DEV_SC1200 is not set +# CONFIG_BLK_DEV_PIIX is not set +# CONFIG_BLK_DEV_NS87415 is not set +# CONFIG_BLK_DEV_PDC202XX_OLD is not set +# CONFIG_BLK_DEV_PDC202XX_NEW is not set +# CONFIG_BLK_DEV_SVWKS is not set +# CONFIG_BLK_DEV_SIIMAGE is not set +# CONFIG_BLK_DEV_SLC90E66 is not set +# CONFIG_BLK_DEV_TRM290 is not set +# CONFIG_BLK_DEV_VIA82CXXX is not set +CONFIG_BLK_DEV_IDEDMA=y +# CONFIG_IDEDMA_IVB is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_BLK_DEV_HD is not set # -# SCSI support +# SCSI device support # # CONFIG_SCSI is not set # +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# # Fusion MPT device support # +# CONFIG_FUSION is not set # -# IEEE 1394 (FireWire) support (EXPERIMENTAL) +# IEEE 1394 (FireWire) support # # CONFIG_IEEE1394 is not set @@ -184,6 +244,10 @@ # CONFIG_I2O is not set # +# Macintosh device drivers +# + +# # Networking support # CONFIG_NET=y @@ -194,8 +258,6 @@ CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set # CONFIG_NETLINK_DEV is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set CONFIG_UNIX=y # CONFIG_NET_KEY is not set CONFIG_INET=y @@ -208,13 +270,20 @@ # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set # CONFIG_ARPD is not set -# CONFIG_INET_ECN 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 # +# IP: Virtual Server Configuration +# +# CONFIG_IP_VS is not set +# CONFIG_IPV6 is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set + +# # IP: Netfilter Configuration # CONFIG_IP_NF_CONNTRACK=m @@ -225,11 +294,13 @@ # CONFIG_IP_NF_QUEUE is not set CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_LIMIT=m +# CONFIG_IP_NF_MATCH_IPRANGE is not set CONFIG_IP_NF_MATCH_MAC=m CONFIG_IP_NF_MATCH_PKTTYPE=m CONFIG_IP_NF_MATCH_MARK=m CONFIG_IP_NF_MATCH_MULTIPORT=m CONFIG_IP_NF_MATCH_TOS=m +# CONFIG_IP_NF_MATCH_RECENT is not set CONFIG_IP_NF_MATCH_ECN=m CONFIG_IP_NF_MATCH_DSCP=m CONFIG_IP_NF_MATCH_AH_ESP=m @@ -239,15 +310,15 @@ CONFIG_IP_NF_MATCH_HELPER=m CONFIG_IP_NF_MATCH_STATE=m CONFIG_IP_NF_MATCH_CONNTRACK=m -CONFIG_IP_NF_MATCH_UNCLEAN=m CONFIG_IP_NF_MATCH_OWNER=m CONFIG_IP_NF_FILTER=m CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_MIRROR=m CONFIG_IP_NF_NAT=m CONFIG_IP_NF_NAT_NEEDED=y CONFIG_IP_NF_TARGET_MASQUERADE=m CONFIG_IP_NF_TARGET_REDIRECT=m +# CONFIG_IP_NF_TARGET_NETMAP is not set +# CONFIG_IP_NF_TARGET_SAME is not set # CONFIG_IP_NF_NAT_LOCAL is not set # CONFIG_IP_NF_NAT_SNMP_BASIC is not set CONFIG_IP_NF_NAT_FTP=m @@ -257,21 +328,22 @@ CONFIG_IP_NF_TARGET_TCPMSS=m CONFIG_IP_NF_ARPTABLES=m CONFIG_IP_NF_ARPFILTER=m +# CONFIG_IP_NF_ARP_MANGLE is not set CONFIG_IP_NF_COMPAT_IPCHAINS=m # CONFIG_IP_NF_COMPAT_IPFWADM is not set -# CONFIG_IPV6 is not set -# CONFIG_XFRM_USER is not set +# CONFIG_IP_NF_RAW is not set # # SCTP Configuration (EXPERIMENTAL) # -CONFIG_IPV6_SCTP__=y # CONFIG_IP_SCTP is not set # CONFIG_ATM is not set +# CONFIG_BRIDGE is not set # CONFIG_VLAN_8021Q is not set -# CONFIG_LLC is not set # CONFIG_DECNET is not set -# CONFIG_BRIDGE 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 @@ -289,17 +361,21 @@ # Network testing # # CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set # # ARCnet devices # # CONFIG_ARCNET is not set -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set -# CONFIG_ETHERTAP is not set # # Ethernet (10 or 100Mbit) @@ -321,6 +397,7 @@ # CONFIG_AMD8111_ETH is not set # CONFIG_ADAPTEC_STARFIRE is not set # CONFIG_B44 is not set +# CONFIG_FORCEDETH is not set # CONFIG_DGRS is not set CONFIG_EEPRO100=y # CONFIG_EEPRO100_PIO is not set @@ -353,51 +430,39 @@ # Ethernet (10000 Mbit) # # CONFIG_IXGB is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set +# CONFIG_S2IO is not set # -# Wireless LAN (non-hamradio) +# Token Ring devices # -# CONFIG_NET_RADIO is not set +# CONFIG_TR is not set # -# Token Ring devices (depends on LLC=y) +# Wireless LAN (non-hamradio) # -# CONFIG_RCPCI is not set -# CONFIG_SHAPER is not set +# CONFIG_NET_RADIO is not set # # Wan interfaces # # CONFIG_WAN is not set - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set - -# -# IrDA (infrared) support -# -# CONFIG_IRDA is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_RCPCI is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # # ISDN subsystem # -# CONFIG_ISDN_BOOL is not set +# CONFIG_ISDN is not set # -# Graphics support +# Telephony Support # -# CONFIG_FB is not set - -# -# Old CD-ROM drivers (not SCSI, not IDE) -# -# CONFIG_CD_NO_IDESCSI is not set +# CONFIG_PHONE is not set # # Input device support @@ -414,18 +479,16 @@ # CONFIG_GAMEPORT is not set CONFIG_SOUND_GAMEPORT=y # CONFIG_SERIO is not set +# CONFIG_SERIO_I8042 is not set # # Input Device Drivers # # -# Macintosh device drivers -# - -# # Character devices # +# CONFIG_VT is not set # CONFIG_SERIAL_NONSTANDARD is not set # @@ -433,6 +496,7 @@ # CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=2 # CONFIG_SERIAL_8250_EXTENDED is not set # @@ -441,26 +505,8 @@ CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# I2C Hardware Sensors Mainboard support -# - -# -# I2C Hardware Sensors Chip support -# -# CONFIG_I2C_SENSOR is not set - -# -# Mice -# -# CONFIG_BUSMOUSE is not set +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 # CONFIG_QIC02_TAPE is not set # @@ -486,7 +532,15 @@ # CONFIG_AGP is not set # CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set -# CONFIG_HANGCHECK_TIMER is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Misc devices +# # # Multimedia devices @@ -499,6 +553,26 @@ # CONFIG_DVB is not set # +# Graphics support +# +# CONFIG_FB is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -530,10 +604,12 @@ # Pseudo filesystems # CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y # CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS=y # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y # @@ -542,6 +618,7 @@ # 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 @@ -558,12 +635,13 @@ CONFIG_NFS_FS=y # CONFIG_NFS_V3 is not set # 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_EXPORTFS is not set CONFIG_SUNRPC=y -# CONFIG_SUNRPC_GSS is not set +# CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set @@ -578,20 +656,9 @@ CONFIG_MSDOS_PARTITION=y # -# Sound +# Native Language Support # -# CONFIG_SOUND is not set - -# -# USB support -# -# CONFIG_USB is not set -# CONFIG_USB_GADGET is not set - -# -# Bluetooth support -# -# CONFIG_BT is not set +# CONFIG_NLS is not set # # Library routines @@ -602,7 +669,7 @@ # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set -# CONFIG_KALLSYMS is not set +# CONFIG_SERIAL_TEXT_DEBUG is not set # # Security options diff -Nru a/arch/ppc/configs/prpmc750_defconfig b/arch/ppc/configs/prpmc750_defconfig --- a/arch/ppc/configs/prpmc750_defconfig Tue May 4 21:53:35 2004 +++ b/arch/ppc/configs/prpmc750_defconfig Tue May 4 21:53:35 2004 @@ -4,23 +4,39 @@ CONFIG_MMU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_HAVE_DEC_LOCK=y +CONFIG_PPC=y +CONFIG_PPC32=y +CONFIG_GENERIC_NVRAM=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_STANDALONE=y +CONFIG_BROKEN_ON_SMP=y # # General setup # CONFIG_SWAP=y CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_HOTPLUG is not set +# CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y +# CONFIG_KALLSYMS is not set CONFIG_FUTEX=y # CONFIG_EPOLL is not set +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set # # Loadable module support @@ -33,24 +49,25 @@ CONFIG_KMOD=y # -# Platform support +# Processor # -CONFIG_PPC=y -CONFIG_PPC32=y CONFIG_6xx=y # CONFIG_40x is not set +# CONFIG_44x is not set # CONFIG_POWER3 is not set +# CONFIG_POWER4 is not set # CONFIG_8xx is not set +# CONFIG_ALTIVEC is not set +# CONFIG_TAU is not set +# CONFIG_CPU_FREQ is not set +CONFIG_PPC_STD_MMU=y # -# IBM 4xx options +# Platform options # -# CONFIG_8260 is not set -CONFIG_GENERIC_ISA_DMA=y -CONFIG_PPC_STD_MMU=y # CONFIG_PPC_MULTIPLATFORM is not set # CONFIG_APUS is not set -# CONFIG_WILLOW_2 is not set +# CONFIG_WILLOW is not set # CONFIG_PCORE is not set # CONFIG_POWERPMC250 is not set # CONFIG_EV64260 is not set @@ -66,33 +83,28 @@ # CONFIG_K2 is not set # CONFIG_PAL4 is not set # CONFIG_GEMINI is not set +# CONFIG_EST8260 is not set +# CONFIG_SBS8260 is not set +# CONFIG_RPX6 is not set +# CONFIG_TQM8260 is not set +CONFIG_PPC_GEN550=y # CONFIG_SMP is not set # CONFIG_PREEMPT is not set -# CONFIG_ALTIVEC is not set -# CONFIG_TAU is not set -# CONFIG_CPU_FREQ is not set +# CONFIG_HIGHMEM is not set +CONFIG_KERNEL_ELF=y +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +CONFIG_CMDLINE_BOOL=y +CONFIG_CMDLINE="ip=on" # -# General setup +# Bus options # -# CONFIG_HIGHMEM is not set +CONFIG_GENERIC_ISA_DMA=y CONFIG_PCI=y CONFIG_PCI_DOMAINS=y -CONFIG_KCORE_ELF=y -CONFIG_BINFMT_ELF=y -CONFIG_KERNEL_ELF=y -# CONFIG_BINFMT_MISC is not set # CONFIG_PCI_LEGACY_PROC is not set # CONFIG_PCI_NAMES is not set -# CONFIG_HOTPLUG is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set -# CONFIG_PPC601_SYNC_FIX is not set -CONFIG_CMDLINE_BOOL=y -CONFIG_CMDLINE="ip=on" # # Advanced setup @@ -109,14 +121,26 @@ CONFIG_BOOT_LOAD=0x00800000 # +# Device Drivers +# + +# +# Generic Driver Options +# + +# # Memory Technology Devices (MTD) # # CONFIG_MTD is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # -# CONFIG_PNP is not set # # Block devices @@ -128,31 +152,34 @@ # CONFIG_BLK_DEV_UMEM is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_CARMEL is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +# CONFIG_LBD is not set # -# Multi-device support (RAID and LVM) +# ATA/ATAPI/MFM/RLL support # -# CONFIG_MD is not set +# CONFIG_IDE is not set # -# ATA/IDE/MFM/RLL support +# SCSI device support # -# CONFIG_IDE is not set +# CONFIG_SCSI is not set # -# SCSI support +# Multi-device support (RAID and LVM) # -# CONFIG_SCSI is not set +# CONFIG_MD is not set # # Fusion MPT device support # +# CONFIG_FUSION is not set # -# IEEE 1394 (FireWire) support (EXPERIMENTAL) +# IEEE 1394 (FireWire) support # # CONFIG_IEEE1394 is not set @@ -162,6 +189,10 @@ # CONFIG_I2O is not set # +# Macintosh device drivers +# + +# # Networking support # CONFIG_NET=y @@ -172,8 +203,6 @@ CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set # CONFIG_NETLINK_DEV is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set CONFIG_UNIX=y # CONFIG_NET_KEY is not set CONFIG_INET=y @@ -187,71 +216,24 @@ # CONFIG_NET_IPGRE is not set # CONFIG_IP_MROUTE is not set # CONFIG_ARPD is not set -# CONFIG_INET_ECN 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 - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -# CONFIG_IP_NF_TFTP is not set -# CONFIG_IP_NF_AMANDA is not set -# CONFIG_IP_NF_QUEUE is not set -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_LIMIT=m -CONFIG_IP_NF_MATCH_MAC=m -CONFIG_IP_NF_MATCH_PKTTYPE=m -CONFIG_IP_NF_MATCH_MARK=m -CONFIG_IP_NF_MATCH_MULTIPORT=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m -CONFIG_IP_NF_MATCH_LENGTH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_TCPMSS=m -CONFIG_IP_NF_MATCH_HELPER=m -CONFIG_IP_NF_MATCH_STATE=m -CONFIG_IP_NF_MATCH_CONNTRACK=m -CONFIG_IP_NF_MATCH_UNCLEAN=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_MIRROR=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -# CONFIG_IP_NF_NAT_LOCAL is not set -# CONFIG_IP_NF_NAT_SNMP_BASIC is not set -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -# CONFIG_IP_NF_MANGLE is not set -# CONFIG_IP_NF_TARGET_LOG is not set -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_COMPAT_IPCHAINS=m -# CONFIG_IP_NF_COMPAT_IPFWADM is not set # CONFIG_IPV6 is not set -# CONFIG_XFRM_USER is not set +# CONFIG_NETFILTER is not set # # SCTP Configuration (EXPERIMENTAL) # -CONFIG_IPV6_SCTP__=y # CONFIG_IP_SCTP is not set # CONFIG_ATM is not set +# CONFIG_BRIDGE is not set # CONFIG_VLAN_8021Q is not set -# CONFIG_LLC is not set # CONFIG_DECNET is not set -# CONFIG_BRIDGE 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 @@ -269,17 +251,21 @@ # Network testing # # CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set # # ARCnet devices # # CONFIG_ARCNET is not set -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set -# CONFIG_ETHERTAP is not set # # Ethernet (10 or 100Mbit) @@ -294,13 +280,22 @@ # # Tulip family network device support # -# CONFIG_NET_TULIP is not set +CONFIG_NET_TULIP=y +# CONFIG_DE2104X is not set +CONFIG_TULIP=y +# CONFIG_TULIP_MWI is not set +CONFIG_TULIP_MMIO=y +# CONFIG_TULIP_NAPI is not set +# CONFIG_DE4X5 is not set +# CONFIG_WINBOND_840 is not set +# CONFIG_DM9102 is not set # CONFIG_HP100 is not set CONFIG_NET_PCI=y # CONFIG_PCNET32 is not set # CONFIG_AMD8111_ETH is not set # CONFIG_ADAPTEC_STARFIRE is not set # CONFIG_B44 is not set +# CONFIG_FORCEDETH is not set # CONFIG_DGRS is not set CONFIG_EEPRO100=y # CONFIG_EEPRO100_PIO is not set @@ -333,60 +328,53 @@ # Ethernet (10000 Mbit) # # CONFIG_IXGB is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set +# CONFIG_S2IO is not set # -# Wireless LAN (non-hamradio) +# Token Ring devices # -# CONFIG_NET_RADIO is not set +# CONFIG_TR is not set # -# Token Ring devices (depends on LLC=y) +# Wireless LAN (non-hamradio) # -# CONFIG_RCPCI is not set -# CONFIG_SHAPER is not set +# CONFIG_NET_RADIO is not set # # Wan interfaces # # CONFIG_WAN is not set - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set - -# -# IrDA (infrared) support -# -# CONFIG_IRDA is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_RCPCI is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # # ISDN subsystem # -# CONFIG_ISDN_BOOL is not set - -# -# Graphics support -# -# CONFIG_FB is not set +# CONFIG_ISDN is not set # -# Old CD-ROM drivers (not SCSI, not IDE) +# Telephony Support # -# CONFIG_CD_NO_IDESCSI is not set +# CONFIG_PHONE is not set # # Input device support # -# CONFIG_INPUT is not set +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 @@ -394,18 +382,21 @@ # CONFIG_GAMEPORT is not set CONFIG_SOUND_GAMEPORT=y # CONFIG_SERIO is not set +# CONFIG_SERIO_I8042 is not set # # Input Device Drivers # - -# -# Macintosh 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 is not set # CONFIG_SERIAL_NONSTANDARD is not set # @@ -413,6 +404,7 @@ # CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=4 # CONFIG_SERIAL_8250_EXTENDED is not set # @@ -421,26 +413,8 @@ CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# I2C Hardware Sensors Mainboard support -# - -# -# I2C Hardware Sensors Chip support -# -# CONFIG_I2C_SENSOR is not set - -# -# Mice -# -CONFIG_BUSMOUSE=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 # CONFIG_QIC02_TAPE is not set # @@ -466,7 +440,15 @@ # CONFIG_AGP is not set # CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set -# CONFIG_HANGCHECK_TIMER is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Misc devices +# # # Multimedia devices @@ -479,6 +461,26 @@ # CONFIG_DVB is not set # +# Graphics support +# +# CONFIG_FB is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -515,10 +517,12 @@ # Pseudo filesystems # CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y # CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS=y # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y # @@ -527,6 +531,7 @@ # 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 @@ -543,12 +548,13 @@ CONFIG_NFS_FS=y # CONFIG_NFS_V3 is not set # 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_EXPORTFS is not set CONFIG_SUNRPC=y -# CONFIG_SUNRPC_GSS is not set +# CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set @@ -563,31 +569,20 @@ CONFIG_MSDOS_PARTITION=y # -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -# CONFIG_USB is not set -# CONFIG_USB_GADGET is not set - -# -# Bluetooth support +# Native Language Support # -# CONFIG_BT is not set +# CONFIG_NLS is not set # # Library routines # -# CONFIG_CRC32 is not set +CONFIG_CRC32=y # # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set -# CONFIG_KALLSYMS is not set +# CONFIG_SERIAL_TEXT_DEBUG is not set # # Security options diff -Nru a/arch/ppc/configs/prpmc800_defconfig b/arch/ppc/configs/prpmc800_defconfig --- a/arch/ppc/configs/prpmc800_defconfig Tue May 4 21:53:36 2004 +++ b/arch/ppc/configs/prpmc800_defconfig Tue May 4 21:53:36 2004 @@ -4,23 +4,39 @@ CONFIG_MMU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_HAVE_DEC_LOCK=y +CONFIG_PPC=y +CONFIG_PPC32=y +CONFIG_GENERIC_NVRAM=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_STANDALONE=y +CONFIG_BROKEN_ON_SMP=y # # General setup # CONFIG_SWAP=y CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_HOTPLUG is not set +# CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y +# CONFIG_KALLSYMS is not set CONFIG_FUTEX=y # CONFIG_EPOLL is not set +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set # # Loadable module support @@ -33,24 +49,25 @@ CONFIG_KMOD=y # -# Platform support +# Processor # -CONFIG_PPC=y -CONFIG_PPC32=y CONFIG_6xx=y # CONFIG_40x is not set +# CONFIG_44x is not set # CONFIG_POWER3 is not set +# CONFIG_POWER4 is not set # CONFIG_8xx is not set +CONFIG_ALTIVEC=y +# CONFIG_TAU is not set +# CONFIG_CPU_FREQ is not set +CONFIG_PPC_STD_MMU=y # -# IBM 4xx options +# Platform options # -# CONFIG_8260 is not set -CONFIG_GENERIC_ISA_DMA=y -CONFIG_PPC_STD_MMU=y # CONFIG_PPC_MULTIPLATFORM is not set # CONFIG_APUS is not set -# CONFIG_WILLOW_2 is not set +# CONFIG_WILLOW is not set # CONFIG_PCORE is not set # CONFIG_POWERPMC250 is not set # CONFIG_EV64260 is not set @@ -66,33 +83,31 @@ # CONFIG_K2 is not set # CONFIG_PAL4 is not set # CONFIG_GEMINI is not set +# CONFIG_EST8260 is not set +# CONFIG_SBS8260 is not set +# CONFIG_RPX6 is not set +# CONFIG_TQM8260 is not set +CONFIG_PPC_GEN550=y +# CONFIG_NONMONARCH_SUPPORT is not set +CONFIG_HARRIER=y +# CONFIG_HARRIER_STORE_GATHERING is not set # CONFIG_SMP is not set # CONFIG_PREEMPT is not set -# CONFIG_ALTIVEC is not set -# CONFIG_TAU is not set -# CONFIG_CPU_FREQ is not set +# CONFIG_HIGHMEM is not set +CONFIG_KERNEL_ELF=y +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +CONFIG_CMDLINE_BOOL=y +CONFIG_CMDLINE="ip=on" # -# General setup +# Bus options # -# CONFIG_HIGHMEM is not set +CONFIG_GENERIC_ISA_DMA=y CONFIG_PCI=y CONFIG_PCI_DOMAINS=y -CONFIG_KCORE_ELF=y -CONFIG_BINFMT_ELF=y -CONFIG_KERNEL_ELF=y -# CONFIG_BINFMT_MISC is not set # CONFIG_PCI_LEGACY_PROC is not set # CONFIG_PCI_NAMES is not set -# CONFIG_HOTPLUG is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set -# CONFIG_PPC601_SYNC_FIX is not set -CONFIG_CMDLINE_BOOL=y -CONFIG_CMDLINE="ip=on" # # Advanced setup @@ -109,14 +124,26 @@ CONFIG_BOOT_LOAD=0x00800000 # +# Device Drivers +# + +# +# Generic Driver Options +# + +# # Memory Technology Devices (MTD) # # CONFIG_MTD is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # -# CONFIG_PNP is not set # # Block devices @@ -128,31 +155,100 @@ # CONFIG_BLK_DEV_UMEM is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_CARMEL is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +# CONFIG_LBD is not set # -# Multi-device support (RAID and LVM) +# ATA/ATAPI/MFM/RLL support # -# CONFIG_MD is not set +# CONFIG_IDE is not set # -# ATA/IDE/MFM/RLL support +# SCSI device support # -# CONFIG_IDE is not set +CONFIG_SCSI=y +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_ST=y +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=y +# CONFIG_BLK_DEV_SR_VENDOR is not set +# CONFIG_CHR_DEV_SG is not set + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_REPORT_LUNS is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +CONFIG_SCSI_SPI_ATTRS=y +# CONFIG_SCSI_FC_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_SCSI_ACARD is not set +# CONFIG_SCSI_AACRAID is not set +# CONFIG_SCSI_AIC7XXX is not set +# CONFIG_SCSI_AIC7XXX_OLD is not set +# CONFIG_SCSI_AIC79XX is not set +# CONFIG_SCSI_ADVANSYS is not set +# CONFIG_SCSI_MEGARAID is not set +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_BUSLOGIC is not set +# CONFIG_SCSI_CPQFCTS is not set +# CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_EATA is not set +# CONFIG_SCSI_EATA_PIO is not set +# CONFIG_SCSI_FUTURE_DOMAIN is not set +# CONFIG_SCSI_GDTH is not set +# CONFIG_SCSI_IPS is not set +# CONFIG_SCSI_INIA100 is not set +CONFIG_SCSI_SYM53C8XX_2=y +CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 +CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 +CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 +# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set +# CONFIG_SCSI_QLOGIC_ISP is not set +# CONFIG_SCSI_QLOGIC_FC is not set +# CONFIG_SCSI_QLOGIC_1280 is not set +CONFIG_SCSI_QLA2XXX=y +# CONFIG_SCSI_QLA21XX is not set +# CONFIG_SCSI_QLA22XX is not set +# CONFIG_SCSI_QLA2300 is not set +# CONFIG_SCSI_QLA2322 is not set +# CONFIG_SCSI_QLA6312 is not set +# CONFIG_SCSI_QLA6322 is not set +# CONFIG_SCSI_DC395x is not set +# CONFIG_SCSI_DC390T is not set +# CONFIG_SCSI_NSP32 is not set +# CONFIG_SCSI_DEBUG is not set # -# SCSI support +# Multi-device support (RAID and LVM) # -# CONFIG_SCSI is not set +# CONFIG_MD is not set # # Fusion MPT device support # +# CONFIG_FUSION is not set # -# IEEE 1394 (FireWire) support (EXPERIMENTAL) +# IEEE 1394 (FireWire) support # # CONFIG_IEEE1394 is not set @@ -162,6 +258,10 @@ # CONFIG_I2O is not set # +# Macintosh device drivers +# + +# # Networking support # CONFIG_NET=y @@ -172,8 +272,6 @@ CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set # CONFIG_NETLINK_DEV is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set CONFIG_UNIX=y # CONFIG_NET_KEY is not set CONFIG_INET=y @@ -187,71 +285,24 @@ # CONFIG_NET_IPGRE is not set # CONFIG_IP_MROUTE is not set # CONFIG_ARPD is not set -# CONFIG_INET_ECN 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 - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -# CONFIG_IP_NF_TFTP is not set -# CONFIG_IP_NF_AMANDA is not set -# CONFIG_IP_NF_QUEUE is not set -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_LIMIT=m -CONFIG_IP_NF_MATCH_MAC=m -CONFIG_IP_NF_MATCH_PKTTYPE=m -CONFIG_IP_NF_MATCH_MARK=m -CONFIG_IP_NF_MATCH_MULTIPORT=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m -CONFIG_IP_NF_MATCH_LENGTH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_TCPMSS=m -CONFIG_IP_NF_MATCH_HELPER=m -CONFIG_IP_NF_MATCH_STATE=m -CONFIG_IP_NF_MATCH_CONNTRACK=m -CONFIG_IP_NF_MATCH_UNCLEAN=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_MIRROR=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -# CONFIG_IP_NF_NAT_LOCAL is not set -# CONFIG_IP_NF_NAT_SNMP_BASIC is not set -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -# CONFIG_IP_NF_MANGLE is not set -# CONFIG_IP_NF_TARGET_LOG is not set -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_COMPAT_IPCHAINS=m -# CONFIG_IP_NF_COMPAT_IPFWADM is not set # CONFIG_IPV6 is not set -# CONFIG_XFRM_USER is not set +# CONFIG_NETFILTER is not set # # SCTP Configuration (EXPERIMENTAL) # -CONFIG_IPV6_SCTP__=y # CONFIG_IP_SCTP is not set # CONFIG_ATM is not set +# CONFIG_BRIDGE is not set # CONFIG_VLAN_8021Q is not set -# CONFIG_LLC is not set # CONFIG_DECNET is not set -# CONFIG_BRIDGE 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 @@ -269,17 +320,21 @@ # Network testing # # CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set # # ARCnet devices # # CONFIG_ARCNET is not set -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set -# CONFIG_ETHERTAP is not set # # Ethernet (10 or 100Mbit) @@ -301,6 +356,7 @@ # CONFIG_AMD8111_ETH is not set # CONFIG_ADAPTEC_STARFIRE is not set # CONFIG_B44 is not set +# CONFIG_FORCEDETH is not set # CONFIG_DGRS is not set CONFIG_EEPRO100=y # CONFIG_EEPRO100_PIO is not set @@ -333,60 +389,54 @@ # Ethernet (10000 Mbit) # # CONFIG_IXGB is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set +# CONFIG_S2IO is not set # -# Wireless LAN (non-hamradio) +# Token Ring devices # -# CONFIG_NET_RADIO is not set +# CONFIG_TR is not set # -# Token Ring devices (depends on LLC=y) +# Wireless LAN (non-hamradio) # -# CONFIG_RCPCI is not set -# CONFIG_SHAPER is not set +# CONFIG_NET_RADIO is not set # # Wan interfaces # # CONFIG_WAN is not set - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set - -# -# IrDA (infrared) support -# -# CONFIG_IRDA is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_NET_FC is not set +# CONFIG_RCPCI is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # # ISDN subsystem # -# CONFIG_ISDN_BOOL is not set - -# -# Graphics support -# -# CONFIG_FB is not set +# CONFIG_ISDN is not set # -# Old CD-ROM drivers (not SCSI, not IDE) +# Telephony Support # -# CONFIG_CD_NO_IDESCSI is not set +# CONFIG_PHONE is not set # # Input device support # -# CONFIG_INPUT is not set +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 @@ -394,18 +444,21 @@ # CONFIG_GAMEPORT is not set CONFIG_SOUND_GAMEPORT=y # CONFIG_SERIO is not set +# CONFIG_SERIO_I8042 is not set # # Input Device Drivers # - -# -# Macintosh 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 is not set # CONFIG_SERIAL_NONSTANDARD is not set # @@ -413,6 +466,7 @@ # CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=4 # CONFIG_SERIAL_8250_EXTENDED is not set # @@ -421,26 +475,8 @@ CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# I2C Hardware Sensors Mainboard support -# - -# -# I2C Hardware Sensors Chip support -# -# CONFIG_I2C_SENSOR is not set - -# -# Mice -# -CONFIG_BUSMOUSE=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 # CONFIG_QIC02_TAPE is not set # @@ -466,7 +502,15 @@ # CONFIG_AGP is not set # CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set -# CONFIG_HANGCHECK_TIMER is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Misc devices +# # # Multimedia devices @@ -479,6 +523,26 @@ # CONFIG_DVB is not set # +# Graphics support +# +# CONFIG_FB is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -515,10 +579,12 @@ # Pseudo filesystems # CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y # CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS=y # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y # @@ -527,6 +593,7 @@ # 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 @@ -543,12 +610,13 @@ CONFIG_NFS_FS=y # CONFIG_NFS_V3 is not set # 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_EXPORTFS is not set CONFIG_SUNRPC=y -# CONFIG_SUNRPC_GSS is not set +# CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set @@ -563,20 +631,9 @@ CONFIG_MSDOS_PARTITION=y # -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -# CONFIG_USB is not set -# CONFIG_USB_GADGET is not set - -# -# Bluetooth support +# Native Language Support # -# CONFIG_BT is not set +# CONFIG_NLS is not set # # Library routines @@ -587,8 +644,7 @@ # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set -# CONFIG_KALLSYMS is not set -CONFIG_SERIAL_TEXT_DEBUG=y +# CONFIG_SERIAL_TEXT_DEBUG is not set # # Security options diff -Nru a/arch/ppc/kernel/signal.c b/arch/ppc/kernel/signal.c --- a/arch/ppc/kernel/signal.c Tue May 4 21:53:36 2004 +++ b/arch/ppc/kernel/signal.c Tue May 4 21:53:36 2004 @@ -33,7 +33,7 @@ #include #include -#define DEBUG_SIG 0 +#undef DEBUG_SIG #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) @@ -514,8 +514,8 @@ badframe: #ifdef DEBUG_SIG - printk("badframe in handle_signal, regs=%p frame=%lx newsp=%lx\n", - regs, frame, *newspp); + printk("badframe in handle_signal, regs=%p frame=%p newsp=%lx\n", + regs, frame, newsp); #endif if (sig == SIGSEGV) ka->sa.sa_handler = SIG_DFL; diff -Nru a/arch/ppc/platforms/Makefile b/arch/ppc/platforms/Makefile --- a/arch/ppc/platforms/Makefile Tue May 4 21:53:36 2004 +++ b/arch/ppc/platforms/Makefile Tue May 4 21:53:36 2004 @@ -33,7 +33,7 @@ obj-$(CONFIG_TQM8260) += tqm8260_setup.o obj-$(CONFIG_EV64260) += ev64260_setup.o obj-$(CONFIG_GEMINI) += gemini_pci.o gemini_setup.o gemini_prom.o -obj-$(CONFIG_K2) += k2_setup.o k2_pci.o +obj-$(CONFIG_K2) += k2.o obj-$(CONFIG_LOPEC) += lopec_setup.o lopec_pci.o obj-$(CONFIG_MCPN765) += mcpn765.o obj-$(CONFIG_MENF1) += menf1_setup.o menf1_pci.o @@ -42,8 +42,8 @@ obj-$(CONFIG_PCORE) += pcore.o obj-$(CONFIG_POWERPMC250) += powerpmc250.o obj-$(CONFIG_PPLUS) += pplus.o -obj-$(CONFIG_PRPMC750) += prpmc750_setup.o prpmc750_pci.o -obj-$(CONFIG_PRPMC800) += prpmc800_setup.o prpmc800_pci.o +obj-$(CONFIG_PRPMC750) += prpmc750.o +obj-$(CONFIG_PRPMC800) += prpmc800.o obj-$(CONFIG_SANDPOINT) += sandpoint.o obj-$(CONFIG_SPRUCE) += spruce.o diff -Nru a/arch/ppc/platforms/chrp_setup.c b/arch/ppc/platforms/chrp_setup.c --- a/arch/ppc/platforms/chrp_setup.c Tue May 4 21:53:36 2004 +++ b/arch/ppc/platforms/chrp_setup.c Tue May 4 21:53:36 2004 @@ -407,6 +407,9 @@ OpenPIC_NumInitSenses = NR_IRQS - NUM_8259_INTERRUPTS; openpic_init(NUM_8259_INTERRUPTS); + /* We have a cascade on OpenPIC IRQ 0, Linux IRQ 16 */ + openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade", + i8259_irq); for (i = 0; i < NUM_8259_INTERRUPTS; i++) irq_desc[i].handler = &i8259_pic; diff -Nru a/arch/ppc/platforms/k2.c b/arch/ppc/platforms/k2.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/ppc/platforms/k2.c Tue May 4 21:53:36 2004 @@ -0,0 +1,616 @@ +/* + * arch/ppc/platforms/k2.c + * + * Board setup routines for SBS K2 + * + * Author: Matt Porter + * + * Updated by: Randy Vinson +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include "k2.h" + +extern unsigned long loops_per_jiffy; +extern void gen550_progress(char *, unsigned short); + +static unsigned int cpu_7xx[16] = { + 0, 15, 14, 0, 0, 13, 5, 9, 6, 11, 8, 10, 16, 12, 7, 0 +}; +static unsigned int cpu_6xx[16] = { + 0, 0, 14, 0, 0, 13, 5, 9, 6, 11, 8, 10, 0, 12, 7, 0 +}; + +static inline int __init +k2_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) +{ + struct pci_controller *hose = pci_bus_to_hose(dev->bus->number); + /* + * Check our hose index. If we are zero then we are on the + * local PCI hose, otherwise we are on the cPCI hose. + */ + if (!hose->index) { + static char pci_irq_table[][4] = + /* + * PCI IDSEL/INTPIN->INTLINE + * A B C D + */ + { + {1, 0, 0, 0}, /* Ethernet */ + {5, 5, 5, 5}, /* PMC Site 1 */ + {6, 6, 6, 6}, /* PMC Site 2 */ + {0, 0, 0, 0}, /* unused */ + {0, 0, 0, 0}, /* unused */ + {0, 0, 0, 0}, /* PCI-ISA Bridge */ + {0, 0, 0, 0}, /* unused */ + {0, 0, 0, 0}, /* unused */ + {0, 0, 0, 0}, /* unused */ + {0, 0, 0, 0}, /* unused */ + {0, 0, 0, 0}, /* unused */ + {0, 0, 0, 0}, /* unused */ + {0, 0, 0, 0}, /* unused */ + {0, 0, 0, 0}, /* unused */ + {15, 0, 0, 0}, /* M5229 IDE */ + }; + const long min_idsel = 3, max_idsel = 17, irqs_per_slot = 4; + return PCI_IRQ_TABLE_LOOKUP; + } else { + static char pci_irq_table[][4] = + /* + * PCI IDSEL/INTPIN->INTLINE + * A B C D + */ + { + {10, 11, 12, 9}, /* cPCI slot 8 */ + {11, 12, 9, 10}, /* cPCI slot 7 */ + {12, 9, 10, 11}, /* cPCI slot 6 */ + {9, 10, 11, 12}, /* cPCI slot 5 */ + {10, 11, 12, 9}, /* cPCI slot 4 */ + {11, 12, 9, 10}, /* cPCI slot 3 */ + {12, 9, 10, 11}, /* cPCI slot 2 */ + }; + const long min_idsel = 15, max_idsel = 21, irqs_per_slot = 4; + return PCI_IRQ_TABLE_LOOKUP; + } +} + +void k2_pcibios_fixup(void) +{ +#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) + struct pci_dev *ide_dev; + + /* + * Enable DMA support on hdc + */ + ide_dev = pci_find_device(PCI_VENDOR_ID_AL, + PCI_DEVICE_ID_AL_M5229, NULL); + + if (ide_dev) { + + unsigned long ide_dma_base; + + ide_dma_base = pci_resource_start(ide_dev, 4); + outb(0x00, ide_dma_base + 0x2); + outb(0x20, ide_dma_base + 0xa); + } +#endif +} + +void k2_pcibios_fixup_resources(struct pci_dev *dev) +{ + int i; + + if ((dev->vendor == PCI_VENDOR_ID_IBM) && + (dev->device == PCI_DEVICE_ID_IBM_CPC710_PCI64)) { + pr_debug("Fixup CPC710 resources\n"); + for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { + dev->resource[i].start = 0; + dev->resource[i].end = 0; + } + } +} + +void k2_setup_hoses(void) +{ + struct pci_controller *hose_a, *hose_b; + + /* + * Reconfigure CPC710 memory map so + * we have some more PCI memory space. + */ + + /* Set FPHB mode */ + __raw_writel(0x808000e0, PGCHP); /* Set FPHB mode */ + + /* PCI32 mappings */ + __raw_writel(0x00000000, K2_PCI32_BAR + PIBAR); /* PCI I/O base */ + __raw_writel(0x00000000, K2_PCI32_BAR + PMBAR); /* PCI Mem base */ + __raw_writel(0xf0000000, K2_PCI32_BAR + MSIZE); /* 256MB */ + __raw_writel(0xfff00000, K2_PCI32_BAR + IOSIZE); /* 1MB */ + __raw_writel(0xc0000000, K2_PCI32_BAR + SMBAR); /* Base@0xc0000000 */ + __raw_writel(0x80000000, K2_PCI32_BAR + SIBAR); /* Base@0x80000000 */ + __raw_writel(0x000000c0, K2_PCI32_BAR + PSSIZE); /* 1GB space */ + __raw_writel(0x000000c0, K2_PCI32_BAR + PPSIZE); /* 1GB space */ + __raw_writel(0x00000000, K2_PCI32_BAR + BARPS); /* Base@0x00000000 */ + __raw_writel(0x00000000, K2_PCI32_BAR + BARPP); /* Base@0x00000000 */ + __raw_writel(0x00000080, K2_PCI32_BAR + PSBAR); /* Base@0x80 */ + __raw_writel(0x00000000, K2_PCI32_BAR + PPBAR); + + __raw_writel(0xc0000000, K2_PCI32_BAR + BPMDLK); + __raw_writel(0xd0000000, K2_PCI32_BAR + TPMDLK); + __raw_writel(0x80000000, K2_PCI32_BAR + BIODLK); + __raw_writel(0x80100000, K2_PCI32_BAR + TIODLK); + __raw_writel(0xe0008000, K2_PCI32_BAR + DLKCTRL); + __raw_writel(0xffffffff, K2_PCI32_BAR + DLKDEV); + + /* PCI64 mappings */ + __raw_writel(0x00100000, K2_PCI64_BAR + PIBAR); /* PCI I/O base */ + __raw_writel(0x10000000, K2_PCI64_BAR + PMBAR); /* PCI Mem base */ + __raw_writel(0xf0000000, K2_PCI64_BAR + MSIZE); /* 256MB */ + __raw_writel(0xfff00000, K2_PCI64_BAR + IOSIZE); /* 1MB */ + __raw_writel(0xd0000000, K2_PCI64_BAR + SMBAR); /* Base@0xd0000000 */ + __raw_writel(0x80100000, K2_PCI64_BAR + SIBAR); /* Base@0x80100000 */ + __raw_writel(0x000000c0, K2_PCI64_BAR + PSSIZE); /* 1GB space */ + __raw_writel(0x000000c0, K2_PCI64_BAR + PPSIZE); /* 1GB space */ + __raw_writel(0x00000000, K2_PCI64_BAR + BARPS); /* Base@0x00000000 */ + __raw_writel(0x00000000, K2_PCI64_BAR + BARPP); /* Base@0x00000000 */ + + /* Setup PCI32 hose */ + hose_a = pcibios_alloc_controller(); + if (!hose_a) + return; + + hose_a->first_busno = 0; + hose_a->last_busno = 0xff; + hose_a->pci_mem_offset = K2_PCI32_MEM_BASE; + + pci_init_resource(&hose_a->io_resource, + K2_PCI32_LOWER_IO, + K2_PCI32_UPPER_IO, + IORESOURCE_IO, "PCI32 host bridge"); + + pci_init_resource(&hose_a->mem_resources[0], + K2_PCI32_LOWER_MEM + K2_PCI32_MEM_BASE, + K2_PCI32_UPPER_MEM + K2_PCI32_MEM_BASE, + IORESOURCE_MEM, "PCI32 host bridge"); + + hose_a->io_space.start = K2_PCI32_LOWER_IO; + hose_a->io_space.end = K2_PCI32_UPPER_IO; + hose_a->mem_space.start = K2_PCI32_LOWER_MEM; + hose_a->mem_space.end = K2_PCI32_UPPER_MEM; + hose_a->io_base_virt = (void *)K2_ISA_IO_BASE; + + setup_indirect_pci(hose_a, K2_PCI32_CONFIG_ADDR, K2_PCI32_CONFIG_DATA); + + /* Initialize PCI32 bus registers */ + early_write_config_byte(hose_a, + hose_a->first_busno, + PCI_DEVFN(0, 0), + CPC710_BUS_NUMBER, hose_a->first_busno); + + early_write_config_byte(hose_a, + hose_a->first_busno, + PCI_DEVFN(0, 0), + CPC710_SUB_BUS_NUMBER, hose_a->last_busno); + + /* Enable PCI interrupt polling */ + early_write_config_byte(hose_a, + hose_a->first_busno, + PCI_DEVFN(8, 0), 0x45, 0x80); + + /* Route polled PCI interrupts */ + early_write_config_byte(hose_a, + hose_a->first_busno, + PCI_DEVFN(8, 0), 0x48, 0x58); + + early_write_config_byte(hose_a, + hose_a->first_busno, + PCI_DEVFN(8, 0), 0x49, 0x07); + + early_write_config_byte(hose_a, + hose_a->first_busno, + PCI_DEVFN(8, 0), 0x4a, 0x31); + + early_write_config_byte(hose_a, + hose_a->first_busno, + PCI_DEVFN(8, 0), 0x4b, 0xb9); + + /* route secondary IDE channel interrupt to IRQ 15 */ + early_write_config_byte(hose_a, + hose_a->first_busno, + PCI_DEVFN(8, 0), 0x75, 0x0f); + + /* enable IDE controller IDSEL */ + early_write_config_byte(hose_a, + hose_a->first_busno, + PCI_DEVFN(8, 0), 0x58, 0x48); + + /* Enable IDE function */ + early_write_config_byte(hose_a, + hose_a->first_busno, + PCI_DEVFN(17, 0), 0x50, 0x03); + + /* Set M5229 IDE controller to native mode */ + early_write_config_byte(hose_a, + hose_a->first_busno, + PCI_DEVFN(17, 0), PCI_CLASS_PROG, 0xdf); + + hose_a->last_busno = pciauto_bus_scan(hose_a, hose_a->first_busno); + + /* Write out correct max subordinate bus number for hose A */ + early_write_config_byte(hose_a, + hose_a->first_busno, + PCI_DEVFN(0, 0), + CPC710_SUB_BUS_NUMBER, hose_a->last_busno); + + /* Only setup PCI64 hose if we are in the system slot */ + if (!(readb(K2_MISC_REG) & K2_SYS_SLOT_MASK)) { + /* Setup PCI64 hose */ + hose_b = pcibios_alloc_controller(); + if (!hose_b) + return; + + hose_b->first_busno = hose_a->last_busno + 1; + hose_b->last_busno = 0xff; + + /* Reminder: quit changing the following, it is correct. */ + hose_b->pci_mem_offset = K2_PCI32_MEM_BASE; + + pci_init_resource(&hose_b->io_resource, + K2_PCI64_LOWER_IO, + K2_PCI64_UPPER_IO, + IORESOURCE_IO, "PCI64 host bridge"); + + pci_init_resource(&hose_b->mem_resources[0], + K2_PCI64_LOWER_MEM + K2_PCI32_MEM_BASE, + K2_PCI64_UPPER_MEM + K2_PCI32_MEM_BASE, + IORESOURCE_MEM, "PCI64 host bridge"); + + hose_b->io_space.start = K2_PCI64_LOWER_IO; + hose_b->io_space.end = K2_PCI64_UPPER_IO; + hose_b->mem_space.start = K2_PCI64_LOWER_MEM; + hose_b->mem_space.end = K2_PCI64_UPPER_MEM; + hose_b->io_base_virt = (void *)K2_ISA_IO_BASE; + + setup_indirect_pci(hose_b, + K2_PCI64_CONFIG_ADDR, K2_PCI64_CONFIG_DATA); + + /* Initialize PCI64 bus registers */ + early_write_config_byte(hose_b, + 0, + PCI_DEVFN(0, 0), + CPC710_SUB_BUS_NUMBER, 0xff); + + early_write_config_byte(hose_b, + 0, + PCI_DEVFN(0, 0), + CPC710_BUS_NUMBER, hose_b->first_busno); + + hose_b->last_busno = pciauto_bus_scan(hose_b, + hose_b->first_busno); + + /* Write out correct max subordinate bus number for hose B */ + early_write_config_byte(hose_b, + hose_b->first_busno, + PCI_DEVFN(0, 0), + CPC710_SUB_BUS_NUMBER, + hose_b->last_busno); + + /* Configure PCI64 PSBAR */ + early_write_config_dword(hose_b, + hose_b->first_busno, + PCI_DEVFN(0, 0), + PCI_BASE_ADDRESS_0, + K2_PCI64_SYS_MEM_BASE); + } + + /* Configure i8259 level/edge settings */ + outb(0x62, 0x4d0); + outb(0xde, 0x4d1); + +#ifdef CONFIG_CPC710_DATA_GATHERING + { + unsigned int tmp; + tmp = __raw_readl(ABCNTL); + /* Enable data gathering on both PCI interfaces */ + __raw_writel(tmp | 0x05000000, ABCNTL); + } +#endif + + ppc_md.pcibios_fixup = k2_pcibios_fixup; + ppc_md.pcibios_fixup_resources = k2_pcibios_fixup_resources; + ppc_md.pci_swizzle = common_swizzle; + ppc_md.pci_map_irq = k2_map_irq; +} + +static int k2_get_bus_speed(void) +{ + int bus_speed; + unsigned char board_id; + + board_id = *(unsigned char *)K2_BOARD_ID_REG; + + switch (K2_BUS_SPD(board_id)) { + + case 0: + default: + bus_speed = 100000000; + break; + + case 1: + bus_speed = 83333333; + break; + + case 2: + bus_speed = 75000000; + break; + + case 3: + bus_speed = 66666666; + break; + } + return bus_speed; +} + +static int k2_get_cpu_speed(void) +{ + unsigned long hid1; + int cpu_speed; + + hid1 = mfspr(HID1) >> 28; + + if ((mfspr(PVR) >> 16) == 8) + hid1 = cpu_7xx[hid1]; + else + hid1 = cpu_6xx[hid1]; + + cpu_speed = k2_get_bus_speed() * hid1 / 2; + return cpu_speed; +} + +static void __init k2_calibrate_decr(void) +{ + int freq, divisor = 4; + + /* determine processor bus speed */ + freq = k2_get_bus_speed(); + tb_ticks_per_jiffy = freq / HZ / divisor; + tb_to_us = mulhwu_scale_factor(freq / divisor, 1000000); +} + +static int k2_show_cpuinfo(struct seq_file *m) +{ + unsigned char k2_geo_bits, k2_system_slot; + + seq_printf(m, "vendor\t\t: SBS\n"); + seq_printf(m, "machine\t\t: K2\n"); + seq_printf(m, "cpu speed\t: %dMhz\n", k2_get_cpu_speed() / 1000000); + seq_printf(m, "bus speed\t: %dMhz\n", k2_get_bus_speed() / 1000000); + seq_printf(m, "memory type\t: SDRAM\n"); + + k2_geo_bits = readb(K2_MSIZ_GEO_REG) & K2_GEO_ADR_MASK; + k2_system_slot = !(readb(K2_MISC_REG) & K2_SYS_SLOT_MASK); + seq_printf(m, "backplane\t: %s slot board", + k2_system_slot ? "System" : "Non system"); + seq_printf(m, "with geographical address %x\n", k2_geo_bits); + + return 0; +} + +TODC_ALLOC(); + +static void __init k2_setup_arch(void) +{ + unsigned int cpu; + + /* Setup TODC access */ + TODC_INIT(TODC_TYPE_MK48T37, 0, 0, + ioremap(K2_RTC_BASE_ADDRESS, K2_RTC_SIZE), 8); + + /* init to some ~sane value until calibrate_delay() runs */ + loops_per_jiffy = 50000000 / HZ; + + /* make FLASH transactions higher priority than PCI to avoid deadlock */ + __raw_writel(__raw_readl(SIOC1) | 0x80000000, SIOC1); + + /* Set hardware to access FLASH page 2 */ + __raw_writel(1 << 29, GPOUT); + + /* Setup PCI host bridges */ + k2_setup_hoses(); + +#ifdef CONFIG_BLK_DEV_INITRD + if (initrd_start) + ROOT_DEV = Root_RAM0; + else +#endif +#ifdef CONFIG_ROOT_NFS + ROOT_DEV = Root_NFS; +#else + ROOT_DEV = Root_HDC1; +#endif + +#ifdef CONFIG_DUMMY_CONSOLE + conswitchp = &dummy_con; +#endif + + /* Identify the system */ + printk(KERN_INFO "System Identification: SBS K2 - PowerPC 750 @ " + "%d Mhz\n", k2_get_cpu_speed() / 1000000); + printk(KERN_INFO "Port by MontaVista Software, Inc. " + "(source@mvista.com)\n"); + + /* Identify the CPU manufacturer */ + cpu = PVR_REV(mfspr(PVR)); + printk(KERN_INFO "CPU manufacturer: %s [rev=%04x]\n", + (cpu & (1 << 15)) ? "IBM" : "Motorola", cpu); +} + +static void k2_restart(char *cmd) +{ + local_irq_disable(); + + /* Flip FLASH back to page 1 to access firmware image */ + __raw_writel(0, GPOUT); + + /* SRR0 has system reset vector, SRR1 has default MSR value */ + /* rfi restores MSR from SRR1 and sets the PC to the SRR0 value */ + mtspr(SRR0, 0xfff00100); + mtspr(SRR1, 0); + __asm__ __volatile__("rfi\n\t"); + + /* not reached */ + for (;;) ; +} + +static void k2_power_off(void) +{ + for (;;) ; +} + +static void k2_halt(void) +{ + k2_restart(NULL); +} + +/* + * Set BAT 3 to map PCI32 I/O space. + */ +static __inline__ void k2_set_bat(void) +{ + /* wait for all outstanding memory accesses to complete */ + mb(); + + /* setup DBATs */ + mtspr(DBAT2U, 0x80001ffe); + mtspr(DBAT2L, 0x8000002a); + mtspr(DBAT3U, 0xf0001ffe); + mtspr(DBAT3L, 0xf000002a); + + /* wait for updates */ + mb(); +} + +static unsigned long __init k2_find_end_of_memory(void) +{ + unsigned long total; + unsigned char msize = 7; /* Default to 128MB */ + + msize = K2_MEM_SIZE(readb(K2_MSIZ_GEO_REG)); + + switch (msize) { + case 2: + /* + * This will break without a lowered + * KERNELBASE or CONFIG_HIGHMEM on. + * It seems non 1GB builds exist yet, + * though. + */ + total = K2_MEM_SIZE_1GB; + break; + case 3: + case 4: + total = K2_MEM_SIZE_512MB; + break; + case 5: + case 6: + total = K2_MEM_SIZE_256MB; + break; + case 7: + total = K2_MEM_SIZE_128MB; + break; + default: + printk + ("K2: Invalid memory size detected, defaulting to 128MB\n"); + total = K2_MEM_SIZE_128MB; + break; + } + return total; +} + +static void __init k2_map_io(void) +{ + io_block_mapping(K2_PCI32_IO_BASE, + K2_PCI32_IO_BASE, 0x00200000, _PAGE_IO); + io_block_mapping(0xff000000, 0xff000000, 0x01000000, _PAGE_IO); +} + +static void __init k2_init_irq(void) +{ + int i; + + for (i = 0; i < 16; i++) + irq_desc[i].handler = &i8259_pic; + + i8259_init(0); +} + +void __init platform_init(unsigned long r3, unsigned long r4, + unsigned long r5, unsigned long r6, unsigned long r7) +{ + parse_bootinfo((struct bi_record *)(r3 + KERNELBASE)); + + k2_set_bat(); + + isa_io_base = K2_ISA_IO_BASE; + isa_mem_base = K2_ISA_MEM_BASE; + pci_dram_offset = K2_PCI32_SYS_MEM_BASE; + + ppc_md.setup_arch = k2_setup_arch; + ppc_md.show_cpuinfo = k2_show_cpuinfo; + ppc_md.init_IRQ = k2_init_irq; + ppc_md.get_irq = i8259_irq; + + ppc_md.find_end_of_memory = k2_find_end_of_memory; + ppc_md.setup_io_mappings = k2_map_io; + + ppc_md.restart = k2_restart; + ppc_md.power_off = k2_power_off; + ppc_md.halt = k2_halt; + + ppc_md.time_init = todc_time_init; + ppc_md.set_rtc_time = todc_set_rtc_time; + ppc_md.get_rtc_time = todc_get_rtc_time; + ppc_md.calibrate_decr = k2_calibrate_decr; + + ppc_md.nvram_read_val = todc_direct_read_val; + ppc_md.nvram_write_val = todc_direct_write_val; + +#ifdef CONFIG_SERIAL_TEXT_DEBUG + ppc_md.progress = gen550_progress; +#endif +} diff -Nru a/arch/ppc/platforms/k2_pci.c b/arch/ppc/platforms/k2_pci.c --- a/arch/ppc/platforms/k2_pci.c Tue May 4 21:53:36 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,371 +0,0 @@ -/* - * arch/ppc/platforms/k2_pci.c - * - * PCI support for SBS K2 - * - * Author: Matt Porter - * - * 2001 (c) MontaVista, Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#include "k2.h" - -#undef DEBUG -#ifdef DEBUG -#define DBG(x...) printk(x) -#else -#define DBG(x...) -#endif /* DEBUG */ - -static inline int __init -k2_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) -{ - struct pci_controller *hose = pci_bus_to_hose(dev->bus->number); - /* - * Check our hose index. If we are zero then we are on the - * local PCI hose, otherwise we are on the cPCI hose. - */ - if (!hose->index) - { - static char pci_irq_table[][4] = - /* - * PCI IDSEL/INTPIN->INTLINE - * A B C D - */ - { - {1, 0, 0, 0}, /* Ethernet */ - {5, 5, 5, 5}, /* PMC Site 1 */ - {6, 6, 6, 6}, /* PMC Site 2 */ - {0, 0, 0, 0}, /* unused */ - {0, 0, 0, 0}, /* unused */ - {0, 0, 0, 0}, /* PCI-ISA Bridge */ - {0, 0, 0, 0}, /* unused */ - {0, 0, 0, 0}, /* unused */ - {0, 0, 0, 0}, /* unused */ - {0, 0, 0, 0}, /* unused */ - {0, 0, 0, 0}, /* unused */ - {0, 0, 0, 0}, /* unused */ - {0, 0, 0, 0}, /* unused */ - {0, 0, 0, 0}, /* unused */ - {15, 0, 0, 0}, /* M5229 IDE */ - }; - const long min_idsel = 3, max_idsel = 17, irqs_per_slot = 4; - return PCI_IRQ_TABLE_LOOKUP; - } - else - { - static char pci_irq_table[][4] = - /* - * PCI IDSEL/INTPIN->INTLINE - * A B C D - */ - { - {10, 11, 12, 9}, /* cPCI slot 8 */ - {11, 12, 9, 10}, /* cPCI slot 7 */ - {12, 9, 10, 11}, /* cPCI slot 6 */ - {9, 10, 11, 12}, /* cPCI slot 5 */ - {10, 11, 12, 9}, /* cPCI slot 4 */ - {11, 12, 9, 10}, /* cPCI slot 3 */ - {12, 9, 10, 11}, /* cPCI slot 2 */ - }; - const long min_idsel = 15, max_idsel = 21, irqs_per_slot = 4; - return PCI_IRQ_TABLE_LOOKUP; - } -} - -void k2_pcibios_fixup(void) -{ -#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) - struct pci_dev *ide_dev; - - /* - * Enable DMA support on hdc - */ - ide_dev = pci_find_device(PCI_VENDOR_ID_AL, - PCI_DEVICE_ID_AL_M5229, - NULL); - - if (ide_dev) { - - unsigned long ide_dma_base; - - ide_dma_base = pci_resource_start(ide_dev, 4); - outb(0x00, ide_dma_base+0x2); - outb(0x20, ide_dma_base+0xa); - } -#endif -} - -void k2_pcibios_fixup_resources(struct pci_dev *dev) -{ - int i; - - if ((dev->vendor == PCI_VENDOR_ID_IBM) && - (dev->device == PCI_DEVICE_ID_IBM_CPC710_PCI64)) - { - DBG("Fixup CPC710 resources\n"); - for (i=0; iresource[i].start = 0; - dev->resource[i].end = 0; - } - } -} - -void k2_setup_hoses(void) -{ - struct pci_controller *hose_a, *hose_b; - - /* - * Reconfigure CPC710 memory map so - * we have some more PCI memory space. - */ - - /* Set FPHB mode */ - __raw_writel(0x808000e0, PGCHP); /* Set FPHB mode */ - - /* PCI32 mappings */ - __raw_writel(0x00000000, K2_PCI32_BAR+PIBAR); /* PCI I/O base */ - __raw_writel(0x00000000, K2_PCI32_BAR+PMBAR); /* PCI Mem base */ - __raw_writel(0xf0000000, K2_PCI32_BAR+MSIZE); /* 256MB */ - __raw_writel(0xfff00000, K2_PCI32_BAR+IOSIZE); /* 1MB */ - __raw_writel(0xc0000000, K2_PCI32_BAR+SMBAR); /* Base@0xc0000000 */ - __raw_writel(0x80000000, K2_PCI32_BAR+SIBAR); /* Base@0x80000000 */ - __raw_writel(0x000000c0, K2_PCI32_BAR+PSSIZE); /* 1GB space */ - __raw_writel(0x000000c0, K2_PCI32_BAR+PPSIZE); /* 1GB space */ - __raw_writel(0x00000000, K2_PCI32_BAR+BARPS); /* Base@0x00000000 */ - __raw_writel(0x00000000, K2_PCI32_BAR+BARPP); /* Base@0x00000000 */ - __raw_writel(0x00000080, K2_PCI32_BAR+PSBAR); /* Base@0x80 */ - __raw_writel(0x00000000, K2_PCI32_BAR+PPBAR); - - __raw_writel(0xc0000000, K2_PCI32_BAR+BPMDLK); - __raw_writel(0xd0000000, K2_PCI32_BAR+TPMDLK); - __raw_writel(0x80000000, K2_PCI32_BAR+BIODLK); - __raw_writel(0x80100000, K2_PCI32_BAR+TIODLK); - __raw_writel(0xe0008000, K2_PCI32_BAR+DLKCTRL); - __raw_writel(0xffffffff, K2_PCI32_BAR+DLKDEV); - - /* PCI64 mappings */ - __raw_writel(0x00100000, K2_PCI64_BAR+PIBAR); /* PCI I/O base */ - __raw_writel(0x10000000, K2_PCI64_BAR+PMBAR); /* PCI Mem base */ - __raw_writel(0xf0000000, K2_PCI64_BAR+MSIZE); /* 256MB */ - __raw_writel(0xfff00000, K2_PCI64_BAR+IOSIZE); /* 1MB */ - __raw_writel(0xd0000000, K2_PCI64_BAR+SMBAR); /* Base@0xd0000000 */ - __raw_writel(0x80100000, K2_PCI64_BAR+SIBAR); /* Base@0x80100000 */ - __raw_writel(0x000000c0, K2_PCI64_BAR+PSSIZE); /* 1GB space */ - __raw_writel(0x000000c0, K2_PCI64_BAR+PPSIZE); /* 1GB space */ - __raw_writel(0x00000000, K2_PCI64_BAR+BARPS); /* Base@0x00000000 */ - __raw_writel(0x00000000, K2_PCI64_BAR+BARPP); /* Base@0x00000000 */ - - /* Setup PCI32 hose */ - hose_a = pcibios_alloc_controller(); - if (!hose_a) - return; - - hose_a->first_busno = 0; - hose_a->last_busno = 0xff; - hose_a->pci_mem_offset = K2_PCI32_MEM_BASE; - - pci_init_resource(&hose_a->io_resource, - K2_PCI32_LOWER_IO, - K2_PCI32_UPPER_IO, - IORESOURCE_IO, - "PCI32 host bridge"); - - pci_init_resource(&hose_a->mem_resources[0], - K2_PCI32_LOWER_MEM + K2_PCI32_MEM_BASE, - K2_PCI32_UPPER_MEM + K2_PCI32_MEM_BASE, - IORESOURCE_MEM, - "PCI32 host bridge"); - - hose_a->io_space.start = K2_PCI32_LOWER_IO; - hose_a->io_space.end = K2_PCI32_UPPER_IO; - hose_a->mem_space.start = K2_PCI32_LOWER_MEM; - hose_a->mem_space.end = K2_PCI32_UPPER_MEM; - hose_a->io_base_virt = (void *)K2_ISA_IO_BASE; - - setup_indirect_pci(hose_a, K2_PCI32_CONFIG_ADDR, K2_PCI32_CONFIG_DATA); - - /* Initialize PCI32 bus registers */ - early_write_config_byte(hose_a, - hose_a->first_busno, - PCI_DEVFN(0, 0), - CPC710_BUS_NUMBER, - hose_a->first_busno); - - early_write_config_byte(hose_a, - hose_a->first_busno, - PCI_DEVFN(0, 0), - CPC710_SUB_BUS_NUMBER, - hose_a->last_busno); - - /* Enable PCI interrupt polling */ - early_write_config_byte(hose_a, - hose_a->first_busno, - PCI_DEVFN(8, 0), - 0x45, - 0x80); - - /* Route polled PCI interrupts */ - early_write_config_byte(hose_a, - hose_a->first_busno, - PCI_DEVFN(8, 0), - 0x48, - 0x58); - - early_write_config_byte(hose_a, - hose_a->first_busno, - PCI_DEVFN(8, 0), - 0x49, - 0x07); - - early_write_config_byte(hose_a, - hose_a->first_busno, - PCI_DEVFN(8, 0), - 0x4a, - 0x31); - - early_write_config_byte(hose_a, - hose_a->first_busno, - PCI_DEVFN(8, 0), - 0x4b, - 0xb9); - - /* route secondary IDE channel interrupt to IRQ 15 */ - early_write_config_byte(hose_a, - hose_a->first_busno, - PCI_DEVFN(8, 0), - 0x75, - 0x0f); - - /* enable IDE controller IDSEL */ - early_write_config_byte(hose_a, - hose_a->first_busno, - PCI_DEVFN(8, 0), - 0x58, - 0x48); - - /* Enable IDE function */ - early_write_config_byte(hose_a, - hose_a->first_busno, - PCI_DEVFN(17, 0), - 0x50, - 0x03); - - /* Set M5229 IDE controller to native mode */ - early_write_config_byte(hose_a, - hose_a->first_busno, - PCI_DEVFN(17, 0), - PCI_CLASS_PROG, - 0xdf); - - hose_a->last_busno = pciauto_bus_scan(hose_a, hose_a->first_busno); - - /* Write out correct max subordinate bus number for hose A */ - early_write_config_byte(hose_a, - hose_a->first_busno, - PCI_DEVFN(0, 0), - CPC710_SUB_BUS_NUMBER, - hose_a->last_busno); - - /* Only setup PCI64 hose if we are in the system slot */ - if (!(readb(K2_MISC_REG) & K2_SYS_SLOT_MASK)) - { - /* Setup PCI64 hose */ - hose_b = pcibios_alloc_controller(); - if (!hose_b) - return; - - hose_b->first_busno = hose_a->last_busno + 1; - hose_b->last_busno = 0xff; - - /* Reminder: quit changing the following, it is correct. */ - hose_b->pci_mem_offset = K2_PCI32_MEM_BASE; - - pci_init_resource(&hose_b->io_resource, - K2_PCI64_LOWER_IO, - K2_PCI64_UPPER_IO, - IORESOURCE_IO, - "PCI64 host bridge"); - - pci_init_resource(&hose_b->mem_resources[0], - K2_PCI64_LOWER_MEM + K2_PCI32_MEM_BASE, - K2_PCI64_UPPER_MEM + K2_PCI32_MEM_BASE, - IORESOURCE_MEM, - "PCI64 host bridge"); - - hose_b->io_space.start = K2_PCI64_LOWER_IO; - hose_b->io_space.end = K2_PCI64_UPPER_IO; - hose_b->mem_space.start = K2_PCI64_LOWER_MEM; - hose_b->mem_space.end = K2_PCI64_UPPER_MEM; - hose_b->io_base_virt = (void *)K2_ISA_IO_BASE; - - setup_indirect_pci(hose_b, - K2_PCI64_CONFIG_ADDR, - K2_PCI64_CONFIG_DATA); - - /* Initialize PCI64 bus registers */ - early_write_config_byte(hose_b, - 0, - PCI_DEVFN(0, 0), - CPC710_SUB_BUS_NUMBER, - 0xff); - - early_write_config_byte(hose_b, - 0, - PCI_DEVFN(0, 0), - CPC710_BUS_NUMBER, - hose_b->first_busno); - - hose_b->last_busno = pciauto_bus_scan(hose_b, - hose_b->first_busno); - - /* Write out correct max subordinate bus number for hose B */ - early_write_config_byte(hose_b, - hose_b->first_busno, - PCI_DEVFN(0, 0), - CPC710_SUB_BUS_NUMBER, - hose_b->last_busno); - - /* Configure PCI64 PSBAR */ - early_write_config_dword(hose_b, - hose_b->first_busno, - PCI_DEVFN(0, 0), - PCI_BASE_ADDRESS_0, - K2_PCI64_SYS_MEM_BASE); - } - - /* Configure i8259 level/edge settings */ - outb(0x62, 0x4d0); - outb(0xde, 0x4d1); - -#ifdef CONFIG_CPC710_DATA_GATHERING - { - unsigned int tmp; - tmp = __raw_readl(ABCNTL); - /* Enable data gathering on both PCI interfaces */ - __raw_writel(tmp | 0x05000000, ABCNTL); - } -#endif - - ppc_md.pcibios_fixup = k2_pcibios_fixup; - ppc_md.pcibios_fixup_resources = k2_pcibios_fixup_resources; - ppc_md.pci_swizzle = common_swizzle; - ppc_md.pci_map_irq = k2_map_irq; -} diff -Nru a/arch/ppc/platforms/k2_setup.c b/arch/ppc/platforms/k2_setup.c --- a/arch/ppc/platforms/k2_setup.c Tue May 4 21:53:36 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,354 +0,0 @@ -/* - * arch/ppc/platforms/k2_setup.c - * - * Board setup routines for SBS K2 - * - * Author: Matt Porter - * - * 2001 (c) MontaVista, Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "k2.h" - -extern void k2_setup_hoses(void); -extern unsigned long loops_per_jiffy; - -static unsigned int cpu_7xx[16] = { - 0, 15, 14, 0, 0, 13, 5, 9, 6, 11, 8, 10, 16, 12, 7, 0 -}; -static unsigned int cpu_6xx[16] = { - 0, 0, 14, 0, 0, 13, 5, 9, 6, 11, 8, 10, 0, 12, 7, 0 -}; - -#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) -/* IDE functions */ - -static void __init -k2_ide_init_hwif_ports (hw_regs_t *hw, unsigned long data_port, - unsigned long ctrl_port, int *irq) -{ - unsigned long reg = data_port; - int i = 8; - - for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { - hw->io_ports[i] = reg; - reg += 1; - } - if (ctrl_port) - hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port; - else - hw->io_ports[IDE_CONTROL_OFFSET] = - hw->io_ports[IDE_DATA_OFFSET] + 0x206; - - if (irq != NULL) - *irq = 0; -} -#endif - -static int -k2_get_bus_speed(void) -{ - int bus_speed; - unsigned char board_id; - - board_id = *(unsigned char *)K2_BOARD_ID_REG; - - switch( K2_BUS_SPD(board_id) ) { - - case 0: - default: - bus_speed = 100000000; - break; - - case 1: - bus_speed = 83333333; - break; - - case 2: - bus_speed = 75000000; - break; - - case 3: - bus_speed = 66666666; - break; - } - return bus_speed; -} - -static int -k2_get_cpu_speed(void) -{ - unsigned long hid1; - int cpu_speed; - - hid1 = mfspr(HID1) >> 28; - - if ((mfspr(PVR) >> 16) == 8) - hid1 = cpu_7xx[hid1]; - else - hid1 = cpu_6xx[hid1]; - - cpu_speed = k2_get_bus_speed()*hid1/2; - return cpu_speed; -} - -static void __init -k2_calibrate_decr(void) -{ - int freq, divisor = 4; - - /* determine processor bus speed */ - freq = k2_get_bus_speed(); - tb_ticks_per_jiffy = freq / HZ / divisor; - tb_to_us = mulhwu_scale_factor(freq/divisor, 1000000); -} - -static int -k2_show_cpuinfo(struct seq_file *m) -{ - unsigned char k2_geo_bits, k2_system_slot; - - seq_printf(m, "vendor\t\t: SBS\n"); - seq_printf(m, "machine\t\t: K2\n"); - seq_printf(m, "cpu speed\t: %dMhz\n", k2_get_cpu_speed()/1000000); - seq_printf(m, "bus speed\t: %dMhz\n", k2_get_bus_speed()/1000000); - seq_printf(m, "memory type\t: SDRAM\n"); - - k2_geo_bits = readb(K2_MSIZ_GEO_REG) & K2_GEO_ADR_MASK; - k2_system_slot = !(readb(K2_MISC_REG) & K2_SYS_SLOT_MASK); - seq_printf(m, "backplane\t: %s slot board", - k2_system_slot ? "System" : "Non system"); - seq_printf(m, "with geographical address %x\n", k2_geo_bits); - - return 0; -} - -extern char cmd_line[]; - -TODC_ALLOC(); - -static void __init -k2_setup_arch(void) -{ - unsigned int cpu; - - /* Setup TODC access */ - TODC_INIT(TODC_TYPE_MK48T37, 0, 0, - ioremap(K2_RTC_BASE_ADDRESS, K2_RTC_SIZE), - 8); - - /* init to some ~sane value until calibrate_delay() runs */ - loops_per_jiffy = 50000000/HZ; - - /* Setup PCI host bridges */ - k2_setup_hoses(); - -#ifdef CONFIG_BLK_DEV_INITRD - if (initrd_start) - ROOT_DEV = Root_RAM0; - else -#endif -#ifdef CONFIG_ROOT_NFS - ROOT_DEV = Root_NFS; -#else - ROOT_DEV = Root_HDC1; -#endif - -#ifdef CONFIG_DUMMY_CONSOLE - conswitchp = &dummy_con; -#endif - - /* Identify the system */ - printk("System Identification: SBS K2 - PowerPC 750 @ %d Mhz\n", k2_get_cpu_speed()/1000000); - printk("SBS K2 port (C) 2001 MontaVista Software, Inc. (source@mvista.com)\n"); - - /* Identify the CPU manufacturer */ - cpu = PVR_REV(mfspr(PVR)); - printk("CPU manufacturer: %s [rev=%04x]\n", (cpu & (1<<15)) ? "IBM" : - "Motorola", cpu); -} - -static void -k2_restart(char *cmd) -{ - local_irq_disable(); - /* SRR0 has system reset vector, SRR1 has default MSR value */ - /* rfi restores MSR from SRR1 and sets the PC to the SRR0 value */ - __asm__ __volatile__ - ("lis 3,0xfff0\n\t" - "ori 3,3,0x0100\n\t" - "mtspr 26,3\n\t" - "li 3,0\n\t" - "mtspr 27,3\n\t" - "rfi\n\t"); - for(;;); -} - -static void -k2_power_off(void) -{ - for(;;); -} - -static void -k2_halt(void) -{ - k2_restart(NULL); -} - -/* - * Set BAT 3 to map PCI32 I/O space. - */ -static __inline__ void -k2_set_bat(void) -{ - unsigned long bat3u, bat3l; - static int mapping_set = 0; - - if (!mapping_set) - { - __asm__ __volatile__ - ("lis %0,0x8000\n\t" - "ori %1,%0,0x002a\n\t" - "ori %0,%0,0x1ffe\n\t" - "mtspr 0x21e,%0\n\t" - "mtspr 0x21f,%1\n\t" - "isync\n\t" - "sync\n\t" - : "=r" (bat3u), "=r" (bat3l)); - - mapping_set = 1; - } - return; -} - -static unsigned long __init -k2_find_end_of_memory(void) -{ - unsigned long total; - unsigned char msize = 7; /* Default to 128MB */ - - k2_set_bat(); - - msize = K2_MEM_SIZE(readb(K2_MSIZ_GEO_REG)); - - switch (msize) - { - case 2: - /* - * This will break without a lowered - * KERNELBASE or CONFIG_HIGHMEM on. - * It seems non 1GB builds exist yet, - * though. - */ - total = K2_MEM_SIZE_1GB; - break; - case 3: - case 4: - total = K2_MEM_SIZE_512MB; - break; - case 5: - case 6: - total = K2_MEM_SIZE_256MB; - break; - case 7: - total = K2_MEM_SIZE_128MB; - break; - default: - printk("K2: Invalid memory size detected, defaulting to 128MB\n"); - total = K2_MEM_SIZE_128MB; - break; - } - return total; -} - -static void __init -k2_map_io(void) -{ - io_block_mapping(K2_PCI32_IO_BASE, - K2_PCI32_IO_BASE, - 0x00200000, - _PAGE_IO); - io_block_mapping(0xff000000, - 0xff000000, - 0x01000000, - _PAGE_IO); -} - -static void __init -k2_init_irq(void) -{ - int i; - - for ( i = 0 ; i < 16 ; i++ ) - irq_desc[i].handler = &i8259_pic; - - i8259_init(NULL); -} - -void __init platform_init(unsigned long r3, unsigned long r4, - unsigned long r5, unsigned long r6, unsigned long r7) -{ - parse_bootinfo((struct bi_record *) (r3 + KERNELBASE)); - - isa_io_base = K2_ISA_IO_BASE; - isa_mem_base = K2_ISA_MEM_BASE; - pci_dram_offset = K2_PCI32_SYS_MEM_BASE; - - ppc_md.setup_arch = k2_setup_arch; - ppc_md.show_cpuinfo = k2_show_cpuinfo; - ppc_md.init_IRQ = k2_init_irq; - ppc_md.get_irq = i8259_irq; - - ppc_md.find_end_of_memory = k2_find_end_of_memory; - ppc_md.setup_io_mappings = k2_map_io; - - ppc_md.restart = k2_restart; - ppc_md.power_off = k2_power_off; - ppc_md.halt = k2_halt; - - ppc_md.time_init = todc_time_init; - ppc_md.set_rtc_time = todc_set_rtc_time; - ppc_md.get_rtc_time = todc_get_rtc_time; - ppc_md.calibrate_decr = k2_calibrate_decr; - - ppc_md.nvram_read_val = todc_direct_read_val; - ppc_md.nvram_write_val = todc_direct_write_val; - -#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) - ppc_ide_md.ide_init_hwif = k2_ide_init_hwif_ports; -#endif -} - diff -Nru a/arch/ppc/platforms/lopec_setup.c b/arch/ppc/platforms/lopec_setup.c --- a/arch/ppc/platforms/lopec_setup.c Tue May 4 21:53:36 2004 +++ b/arch/ppc/platforms/lopec_setup.c Tue May 4 21:53:36 2004 @@ -208,6 +208,9 @@ openpic_set_sources(19, 1, OpenPIC_Addr + 0x110C0); openpic_init(NUM_8259_INTERRUPTS); + /* We have a cascade on OpenPIC IRQ 0, Linux IRQ 16 */ + openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade", + &i8259_irq); /* Map i8259 interrupts */ for(i = 0; i < NUM_8259_INTERRUPTS; i++) diff -Nru a/arch/ppc/platforms/mcpn765.c b/arch/ppc/platforms/mcpn765.c --- a/arch/ppc/platforms/mcpn765.c Tue May 4 21:53:36 2004 +++ b/arch/ppc/platforms/mcpn765.c Tue May 4 21:53:36 2004 @@ -30,9 +30,6 @@ #include #include #include -#if 0 -#include -#endif #include #include #include @@ -385,6 +382,8 @@ ppc_md.progress("init_irq: enter", 0); openpic_init(NUM_8259_INTERRUPTS); + openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade", + i8259_irq); for(i=0; i < NUM_8259_INTERRUPTS; i++) irq_desc[i].handler = &i8259_pic; diff -Nru a/arch/ppc/platforms/mvme5100_setup.c b/arch/ppc/platforms/mvme5100_setup.c --- a/arch/ppc/platforms/mvme5100_setup.c Tue May 4 21:53:35 2004 +++ b/arch/ppc/platforms/mvme5100_setup.c Tue May 4 21:53:35 2004 @@ -138,6 +138,7 @@ #ifdef CONFIG_MVME5100_IPMC761_PRESENT openpic_init(1, NUM_8259_INTERRUPTS, NULL, -1); + openpic_hookup_cascade(NUM_8259_INTERRUPTS,"82c59 cascade",&i8259_irq); for(i=0; i < NUM_8259_INTERRUPTS; i++) irq_desc[i].handler = &i8259_pic; diff -Nru a/arch/ppc/platforms/pplus.c b/arch/ppc/platforms/pplus.c --- a/arch/ppc/platforms/pplus.c Tue May 4 21:53:36 2004 +++ b/arch/ppc/platforms/pplus.c Tue May 4 21:53:36 2004 @@ -672,6 +672,8 @@ openpic_set_sources(0, 16, OpenPIC_Addr + 0x10000); openpic_init(NUM_8259_INTERRUPTS); + openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade", + i8259_irq); ppc_md.get_irq = openpic_get_irq; } diff -Nru a/arch/ppc/platforms/prep_setup.c b/arch/ppc/platforms/prep_setup.c --- a/arch/ppc/platforms/prep_setup.c Tue May 4 21:53:36 2004 +++ b/arch/ppc/platforms/prep_setup.c Tue May 4 21:53:36 2004 @@ -134,6 +134,7 @@ #define PREP_IBM_CAROLINA_IDE_0 0xf0 #define PREP_IBM_CAROLINA_IDE_1 0xf1 #define PREP_IBM_CAROLINA_IDE_2 0xf2 +#define PREP_IBM_CAROLINA_IDE_3 0xf3 /* 7248-43P */ #define PREP_IBM_CAROLINA_SCSI_0 0xf4 #define PREP_IBM_CAROLINA_SCSI_1 0xf5 @@ -855,8 +856,12 @@ int i; unsigned int pci_viddid, pci_did; - if (OpenPIC_Addr != NULL) + if (OpenPIC_Addr != NULL) { openpic_init(NUM_8259_INTERRUPTS); + /* We have a cascade on OpenPIC IRQ 0, Linux IRQ 16 */ + openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade", + i8259_irq); + } for ( i = 0 ; i < NUM_8259_INTERRUPTS ; i++ ) irq_desc[i].handler = &i8259_pic; /* If we have a Raven PCI bridge or a Hawk PCI bridge / Memory diff -Nru a/arch/ppc/platforms/prpmc750.c b/arch/ppc/platforms/prpmc750.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/ppc/platforms/prpmc750.c Tue May 4 21:53:36 2004 @@ -0,0 +1,367 @@ +/* + * arch/ppc/platforms/prpmc750_setup.c + * + * Board setup routines for Motorola PrPMC750 + * + * Author: Matt Porter + * + * 2001-2004 (c) MontaVista, Software, Inc. This file is licensed under + * the terms of the GNU General Public License version 2. This program + * is licensed "as is" without any warranty of any kind, whether express + * or implied. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "prpmc750.h" + +extern unsigned long loops_per_jiffy; + +extern void gen550_progress(char *, unsigned short); + +static u_char prpmc750_openpic_initsenses[] __initdata = +{ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC750_INT_HOSTINT0 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC750_INT_UART */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC750_INT_DEBUGINT */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC750_INT_HAWK_WDT */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC750_INT_UNUSED */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC750_INT_ABORT */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC750_INT_HOSTINT1 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC750_INT_HOSTINT2 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC750_INT_HOSTINT3 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC750_INT_PMC_INTA */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC750_INT_PMC_INTB */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC750_INT_PMC_INTC */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC750_INT_PMC_INTD */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC750_INT_UNUSED */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC750_INT_UNUSED */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC750_INT_UNUSED */ +}; + +/* + * Motorola PrPMC750/PrPMC800 in PrPMCBASE or PrPMC-Carrier + * Combined irq tables. Only Base has IDSEL 14, only Carrier has 21 and 22. + */ +static inline int +prpmc_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) +{ + static char pci_irq_table[][4] = + /* + * PCI IDSEL/INTPIN->INTLINE + * A B C D + */ + { + {12, 0, 0, 0}, /* IDSEL 14 - Ethernet, base */ + {0, 0, 0, 0}, /* IDSEL 15 - unused */ + {10, 11, 12, 9}, /* IDSEL 16 - PMC A1, PMC1 */ + {10, 11, 12, 9}, /* IDSEL 17 - PrPMC-A-B, PMC2-B */ + {11, 12, 9, 10}, /* IDSEL 18 - PMC A1-B, PMC1-B */ + {0, 0, 0, 0}, /* IDSEL 19 - unused */ + {9, 10, 11, 12}, /* IDSEL 20 - P2P Bridge */ + {11, 12, 9, 10}, /* IDSEL 21 - PMC A2, carrier */ + {12, 9, 10, 11}, /* IDSEL 22 - PMC A2-B, carrier */ + }; + const long min_idsel = 14, max_idsel = 22, irqs_per_slot = 4; + return PCI_IRQ_TABLE_LOOKUP; +}; + +static void __init prpmc750_pcibios_fixup(void) +{ + struct pci_dev *dev; + unsigned short wtmp; + + /* + * Kludge to clean up after PPC6BUG which doesn't + * configure the CL5446 VGA card. Also the + * resource subsystem doesn't fixup the + * PCI mem resources on the CL5446. + */ + if ((dev = pci_find_device(PCI_VENDOR_ID_CIRRUS, + PCI_DEVICE_ID_CIRRUS_5446, 0))) { + dev->resource[0].start += PRPMC750_PCI_PHY_MEM_OFFSET; + dev->resource[0].end += PRPMC750_PCI_PHY_MEM_OFFSET; + pci_read_config_word(dev, PCI_COMMAND, &wtmp); + pci_write_config_word(dev, PCI_COMMAND, wtmp | 3); + /* Enable Color mode in MISC reg */ + outb(0x03, 0x3c2); + /* Select DRAM config reg */ + outb(0x0f, 0x3c4); + /* Set proper DRAM config */ + outb(0xdf, 0x3c5); + } +} + +void __init prpmc750_find_bridges(void) +{ + struct pci_controller *hose; + + hose = pcibios_alloc_controller(); + if (!hose) + return; + + hose->first_busno = 0; + hose->last_busno = 0xff; + hose->io_base_virt = (void *)PRPMC750_ISA_IO_BASE; + hose->pci_mem_offset = PRPMC750_PCI_PHY_MEM_OFFSET; + + pci_init_resource(&hose->io_resource, + PRPMC750_PCI_IO_START, + PRPMC750_PCI_IO_END, + IORESOURCE_IO, "PCI host bridge"); + + pci_init_resource(&hose->mem_resources[0], + PRPMC750_PROC_PCI_MEM_START, + PRPMC750_PROC_PCI_MEM_END, + IORESOURCE_MEM, "PCI host bridge"); + + hose->io_space.start = PRPMC750_PCI_IO_START; + hose->io_space.end = PRPMC750_PCI_IO_END; + hose->mem_space.start = PRPMC750_PCI_MEM_START; + hose->mem_space.end = PRPMC750_PCI_MEM_END - HAWK_MPIC_SIZE; + + if (hawk_init(hose, PRPMC750_HAWK_PPC_REG_BASE, + PRPMC750_PROC_PCI_MEM_START, + PRPMC750_PROC_PCI_MEM_END - HAWK_MPIC_SIZE, + PRPMC750_PROC_PCI_IO_START, PRPMC750_PROC_PCI_IO_END, + PRPMC750_PROC_PCI_MEM_END - HAWK_MPIC_SIZE + 1) + != 0) { + printk(KERN_CRIT "Could not initialize host bridge\n"); + } + + hose->last_busno = pciauto_bus_scan(hose, hose->first_busno); + + ppc_md.pcibios_fixup = prpmc750_pcibios_fixup; + ppc_md.pci_swizzle = common_swizzle; + ppc_md.pci_map_irq = prpmc_map_irq; +} +static int prpmc750_show_cpuinfo(struct seq_file *m) +{ + seq_printf(m, "machine\t\t: PrPMC750\n"); + + return 0; +} + +static void __init prpmc750_setup_arch(void) +{ + /* init to some ~sane value until calibrate_delay() runs */ + loops_per_jiffy = 50000000 / HZ; + + /* Lookup PCI host bridges */ + prpmc750_find_bridges(); + +#ifdef CONFIG_BLK_DEV_INITRD + if (initrd_start) + ROOT_DEV = Root_RAM0; + else +#endif +#ifdef CONFIG_ROOT_NFS + ROOT_DEV = Root_NFS; +#else + ROOT_DEV = Root_SDA2; +#endif + +#ifdef CONFIG_DUMMY_CONSOLE + conswitchp = &dummy_con; +#endif + + OpenPIC_InitSenses = prpmc750_openpic_initsenses; + OpenPIC_NumInitSenses = sizeof(prpmc750_openpic_initsenses); + + printk(KERN_INFO "Port by MontaVista Software, Inc. " + "(source@mvista.com)\n"); +} + +/* + * Compute the PrPMC750's bus speed using the baud clock as a + * reference. + */ +static unsigned long __init prpmc750_get_bus_speed(void) +{ + unsigned long tbl_start, tbl_end; + unsigned long current_state, old_state, bus_speed; + unsigned char lcr, dll, dlm; + int baud_divisor, count; + + /* Read the UART's baud clock divisor */ + lcr = readb(PRPMC750_SERIAL_0_LCR); + writeb(lcr | UART_LCR_DLAB, PRPMC750_SERIAL_0_LCR); + dll = readb(PRPMC750_SERIAL_0_DLL); + dlm = readb(PRPMC750_SERIAL_0_DLM); + writeb(lcr & ~UART_LCR_DLAB, PRPMC750_SERIAL_0_LCR); + baud_divisor = (dlm << 8) | dll; + + /* + * Use the baud clock divisor and base baud clock + * to determine the baud rate and use that as + * the number of baud clock edges we use for + * the time base sample. Make it half the baud + * rate. + */ + count = PRPMC750_BASE_BAUD / (baud_divisor * 16); + + /* Find the first edge of the baud clock */ + old_state = readb(PRPMC750_STATUS_REG) & PRPMC750_BAUDOUT_MASK; + do { + current_state = readb(PRPMC750_STATUS_REG) & + PRPMC750_BAUDOUT_MASK; + } while (old_state == current_state); + + old_state = current_state; + + /* Get the starting time base value */ + tbl_start = get_tbl(); + + /* + * Loop until we have found a number of edges equal + * to half the count (half the baud rate) + */ + do { + do { + current_state = readb(PRPMC750_STATUS_REG) & + PRPMC750_BAUDOUT_MASK; + } while (old_state == current_state); + old_state = current_state; + } while (--count); + + /* Get the ending time base value */ + tbl_end = get_tbl(); + + /* Compute bus speed */ + bus_speed = (tbl_end - tbl_start) * 128; + + return bus_speed; +} + +static void __init prpmc750_calibrate_decr(void) +{ + unsigned long freq; + int divisor = 4; + + freq = prpmc750_get_bus_speed(); + + tb_ticks_per_jiffy = freq / (HZ * divisor); + tb_to_us = mulhwu_scale_factor(freq / divisor, 1000000); +} + +static void prpmc750_restart(char *cmd) +{ + local_irq_disable(); + writeb(PRPMC750_MODRST_MASK, PRPMC750_MODRST_REG); + while (1) ; +} + +static void prpmc750_halt(void) +{ + local_irq_disable(); + while (1) ; +} + +static void prpmc750_power_off(void) +{ + prpmc750_halt(); +} + +static void __init prpmc750_init_IRQ(void) +{ + openpic_init(0); +} + +/* + * Set BAT 3 to map 0xf0000000 to end of physical memory space. + */ +static __inline__ void prpmc750_set_bat(void) +{ + mb(); + mtspr(DBAT1U, 0xf0001ffe); + mtspr(DBAT1L, 0xf000002a); + mb(); +} + +/* + * We need to read the Falcon/Hawk memory controller + * to properly determine this value + */ +static unsigned long __init prpmc750_find_end_of_memory(void) +{ + /* Read the memory size from the Hawk SMC */ + return hawk_get_mem_size(PRPMC750_HAWK_SMC_BASE); +} + +static void __init prpmc750_map_io(void) +{ + io_block_mapping(PRPMC750_ISA_IO_BASE, PRPMC750_ISA_IO_BASE, + 0x10000000, _PAGE_IO); +#if 0 + io_block_mapping(0xf0000000, 0xc0000000, 0x08000000, _PAGE_IO); +#endif + io_block_mapping(0xf8000000, 0xf8000000, 0x08000000, _PAGE_IO); +} + +void __init +platform_init(unsigned long r3, unsigned long r4, unsigned long r5, + unsigned long r6, unsigned long r7) +{ + parse_bootinfo(find_bootinfo()); + + /* Cover the Hawk registers with a BAT */ + prpmc750_set_bat(); + + isa_io_base = PRPMC750_ISA_IO_BASE; + isa_mem_base = PRPMC750_ISA_MEM_BASE; + pci_dram_offset = PRPMC750_PCI_DRAM_OFFSET; + + ppc_md.setup_arch = prpmc750_setup_arch; + ppc_md.show_cpuinfo = prpmc750_show_cpuinfo; + ppc_md.init_IRQ = prpmc750_init_IRQ; + ppc_md.get_irq = openpic_get_irq; + + ppc_md.find_end_of_memory = prpmc750_find_end_of_memory; + ppc_md.setup_io_mappings = prpmc750_map_io; + + ppc_md.restart = prpmc750_restart; + ppc_md.power_off = prpmc750_power_off; + ppc_md.halt = prpmc750_halt; + + /* PrPMC750 has no timekeeper part */ + ppc_md.time_init = NULL; + ppc_md.get_rtc_time = NULL; + ppc_md.set_rtc_time = NULL; + ppc_md.calibrate_decr = prpmc750_calibrate_decr; + +#ifdef CONFIG_SERIAL_TEXT_DEBUG + ppc_md.progress = gen550_progress; +#endif /* CONFIG_SERIAL_TEXT_DEBUG */ +} diff -Nru a/arch/ppc/platforms/prpmc750.h b/arch/ppc/platforms/prpmc750.h --- a/arch/ppc/platforms/prpmc750.h Tue May 4 21:53:35 2004 +++ b/arch/ppc/platforms/prpmc750.h Tue May 4 21:53:35 2004 @@ -19,27 +19,47 @@ #include -#define PRPMC750_PCI_CONFIG_ADDR 0x80000cf8 -#define PRPMC750_PCI_CONFIG_DATA 0x80000cfc - -#define PRPMC750_PCI_PHY_MEM_BASE 0xc0000000 -#define PRPMC750_PCI_MEM_BASE 0xf0000000 -#define PRPMC750_PCI_IO_BASE 0x80000000 - -#define PRPMC750_ISA_IO_BASE PRPMC750_PCI_IO_BASE -#define PRPMC750_ISA_MEM_BASE PRPMC750_PCI_MEM_BASE -#define PRPMC750_PCI_MEM_OFFSET PRPMC750_PCI_PHY_MEM_BASE - -#define PRPMC750_SYS_MEM_BASE 0x80000000 - -#define PRPMC750_PCI_LOWER_MEM 0x00000000 -#define PRPMC750_PCI_UPPER_MEM_AUTO 0x3bf7ffff -#define PRPMC750_PCI_UPPER_MEM 0x3bffffff -#define PRPMC750_PCI_LOWER_IO 0x00000000 -#define PRPMC750_PCI_UPPER_IO 0x0ff7ffff - -#define PRPMC750_HAWK_MPIC_BASE 0xfbf80000 -#define PRPMC750_HAWK_SMC_BASE 0xfef80000 +/* + * Due to limiations imposed by legacy hardware (primaryily IDE controllers), + * the PrPMC750 carrier board operates using a PReP address map. + * + * From Processor (physical) -> PCI: + * PCI Mem Space: 0xc0000000 - 0xfe000000 -> 0x00000000 - 0x3e000000 (768 MB) + * PCI I/O Space: 0x80000000 - 0x90000000 -> 0x00000000 - 0x10000000 (256 MB) + * Note: Must skip 0xfe000000-0xfe400000 for CONFIG_HIGHMEM/PKMAP area + * + * From PCI -> Processor (physical): + * System Memory: 0x80000000 -> 0x00000000 + */ + +#define PRPMC750_ISA_IO_BASE PREP_ISA_IO_BASE +#define PRPMC750_ISA_MEM_BASE PREP_ISA_MEM_BASE + +/* PCI Memory space mapping info */ +#define PRPMC750_PCI_MEM_SIZE 0x30000000U +#define PRPMC750_PROC_PCI_MEM_START PRPMC750_ISA_MEM_BASE +#define PRPMC750_PROC_PCI_MEM_END (PRPMC750_PROC_PCI_MEM_START + \ + PRPMC750_PCI_MEM_SIZE - 1) +#define PRPMC750_PCI_MEM_START 0x00000000U +#define PRPMC750_PCI_MEM_END (PRPMC750_PCI_MEM_START + \ + PRPMC750_PCI_MEM_SIZE - 1) + +/* PCI I/O space mapping info */ +#define PRPMC750_PCI_IO_SIZE 0x10000000U +#define PRPMC750_PROC_PCI_IO_START PRPMC750_ISA_IO_BASE +#define PRPMC750_PROC_PCI_IO_END (PRPMC750_PROC_PCI_IO_START + \ + PRPMC750_PCI_IO_SIZE - 1) +#define PRPMC750_PCI_IO_START 0x00000000U +#define PRPMC750_PCI_IO_END (PRPMC750_PCI_IO_START + \ + PRPMC750_PCI_IO_SIZE - 1) + +/* System memory mapping info */ +#define PRPMC750_PCI_DRAM_OFFSET PREP_PCI_DRAM_OFFSET +#define PRPMC750_PCI_PHY_MEM_OFFSET (PRPMC750_ISA_MEM_BASE-PRPMC750_PCI_MEM_START) + +/* Register address definitions */ +#define PRPMC750_HAWK_SMC_BASE 0xfef80000U +#define PRPMC750_HAWK_PPC_REG_BASE 0xfeff0000U #define PRPMC750_BASE_BAUD 1843200 #define PRPMC750_SERIAL_0 0xfef88000 @@ -61,5 +81,5 @@ #define PRPMC750_TBEN_REG 0xfef880c0 #define PRPMC750_TBEN_MASK 0x01 -#endif /* __ASM_PRPMC750_H__ */ -#endif /* __KERNEL__ */ +#endif /* __ASM_PRPMC750_H__ */ +#endif /* __KERNEL__ */ diff -Nru a/arch/ppc/platforms/prpmc750_pci.c b/arch/ppc/platforms/prpmc750_pci.c --- a/arch/ppc/platforms/prpmc750_pci.c Tue May 4 21:53:36 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,145 +0,0 @@ -/* - * arch/ppc/platforms/prpmc750_pci.c - * - * PCI support for Motorola PrPMC750 - * - * Author: Matt Porter - * - * 2001 (c) MontaVista, Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -/* - * Motorola PrPMC750/PrPMC800 in PrPMCBASE or PrPMC-Carrier - * Combined irq tables. Only Base has IDSEL 14, only Carrier has 21 and 22. - */ -static inline int -prpmc_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) -{ - static char pci_irq_table[][4] = - /* - * PCI IDSEL/INTPIN->INTLINE - * A B C D - */ - { - {12, 0, 0, 0}, /* IDSEL 14 - Ethernet, base */ - {0, 0, 0, 0}, /* IDSEL 15 - unused */ - {10, 11, 12, 9}, /* IDSEL 16 - PMC A1, PMC1 */ - {10, 11, 12, 9}, /* IDSEL 17 - PrPMC-A-B, PMC2-B */ - {11, 12, 9, 10}, /* IDSEL 18 - PMC A1-B, PMC1-B */ - {0, 0, 0, 0}, /* IDSEL 19 - unused */ - {9, 10, 11, 12}, /* IDSEL 20 - P2P Bridge */ - {11, 12, 9, 10}, /* IDSEL 21 - PMC A2, carrier */ - {12, 9, 10, 11}, /* IDSEL 22 - PMC A2-B, carrier */ - }; - const long min_idsel = 14, max_idsel = 22, irqs_per_slot = 4; - return PCI_IRQ_TABLE_LOOKUP; -}; - -static void __init -prpmc750_pcibios_fixup(void) -{ - struct pci_dev *dev; - unsigned short wtmp; - - /* - * Kludge to clean up after PPC6BUG which doesn't - * configure the CL5446 VGA card. Also the - * resource subsystem doesn't fixup the - * PCI mem resources on the CL5446. - */ - if ((dev = pci_find_device(PCI_VENDOR_ID_CIRRUS, - PCI_DEVICE_ID_CIRRUS_5446, 0))) - { - dev->resource[0].start += PRPMC750_PCI_PHY_MEM_BASE; - dev->resource[0].end += PRPMC750_PCI_PHY_MEM_BASE; - pci_read_config_word(dev, - PCI_COMMAND, - &wtmp); - pci_write_config_word(dev, - PCI_COMMAND, - wtmp|3); - /* Enable Color mode in MISC reg */ - outb(0x03, 0x3c2); - /* Select DRAM config reg */ - outb(0x0f, 0x3c4); - /* Set proper DRAM config */ - outb(0xdf, 0x3c5); - } -} - -void __init -prpmc750_find_bridges(void) -{ - struct pci_controller* hose; - - hose = pcibios_alloc_controller(); - if (!hose) - return; - - hose->first_busno = 0; - hose->last_busno = 0xff; - hose->pci_mem_offset = PRPMC750_PCI_PHY_MEM_BASE; - - pci_init_resource(&hose->io_resource, - PRPMC750_PCI_LOWER_IO, - PRPMC750_PCI_UPPER_IO, - IORESOURCE_IO, - "PCI host bridge"); - - pci_init_resource(&hose->mem_resources[0], - PRPMC750_PCI_LOWER_MEM + PRPMC750_PCI_PHY_MEM_BASE, - PRPMC750_PCI_UPPER_MEM + PRPMC750_PCI_PHY_MEM_BASE, - IORESOURCE_MEM, - "PCI host bridge"); - - hose->io_space.start = PRPMC750_PCI_LOWER_IO; - hose->io_space.end = PRPMC750_PCI_UPPER_IO; - hose->mem_space.start = PRPMC750_PCI_LOWER_MEM; - hose->mem_space.end = PRPMC750_PCI_UPPER_MEM_AUTO; - - hose->io_base_virt = (void *)PRPMC750_ISA_IO_BASE; - - setup_indirect_pci(hose, - PRPMC750_PCI_CONFIG_ADDR, - PRPMC750_PCI_CONFIG_DATA); - - /* - * Disable MPIC response to PCI I/O space (BAR 0). - * Make MPIC respond to PCI Mem space at specified address. - * (BAR 1). - */ - early_write_config_dword(hose, - 0, - PCI_DEVFN(0,0), - PCI_BASE_ADDRESS_0, - 0x00000000 | 0x1); - - early_write_config_dword(hose, - 0, - PCI_DEVFN(0,0), - PCI_BASE_ADDRESS_1, - (PRPMC750_HAWK_MPIC_BASE - - PRPMC750_PCI_MEM_OFFSET) | 0x0); - - hose->last_busno = pciauto_bus_scan(hose, hose->first_busno); - - ppc_md.pcibios_fixup = prpmc750_pcibios_fixup; - ppc_md.pci_swizzle = common_swizzle; - ppc_md.pci_map_irq = prpmc_map_irq; -} diff -Nru a/arch/ppc/platforms/prpmc750_setup.c b/arch/ppc/platforms/prpmc750_setup.c --- a/arch/ppc/platforms/prpmc750_setup.c Tue May 4 21:53:35 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,284 +0,0 @@ -/* - * arch/ppc/platforms/prpmc750_setup.c - * - * Board setup routines for Motorola PrPMC750 - * - * Author: Matt Porter - * - * 2001 (c) MontaVista, Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -extern void prpmc750_find_bridges(void); -extern int mpic_init(void); -extern unsigned long loops_per_jiffy; - -static u_char prpmc750_openpic_initsenses[] __initdata = -{ - 1, /* PRPMC750_INT_HOSTINT0 */ - 1, /* PRPMC750_INT_UART */ - 1, /* PRPMC750_INT_DEBUGINT */ - 1, /* PRPMC750_INT_HAWK_WDT */ - 1, /* PRPMC750_INT_UNUSED */ - 1, /* PRPMC750_INT_ABORT */ - 1, /* PRPMC750_INT_HOSTINT1 */ - 1, /* PRPMC750_INT_HOSTINT2 */ - 1, /* PRPMC750_INT_HOSTINT3 */ - 1, /* PRPMC750_INT_PMC_INTA */ - 1, /* PRPMC750_INT_PMC_INTB */ - 1, /* PRPMC750_INT_PMC_INTC */ - 1, /* PRPMC750_INT_PMC_INTD */ - 1, /* PRPMC750_INT_UNUSED */ - 1, /* PRPMC750_INT_UNUSED */ - 1, /* PRPMC750_INT_UNUSED */ -}; - -static int -prpmc750_show_cpuinfo(struct seq_file *m) -{ - seq_printf(m, "machine\t\t: PrPMC750\n"); - - return 0; -} - -static void __init -prpmc750_setup_arch(void) -{ - /* init to some ~sane value until calibrate_delay() runs */ - loops_per_jiffy = 50000000/HZ; - - /* Lookup PCI host bridges */ - prpmc750_find_bridges(); - -#ifdef CONFIG_BLK_DEV_INITRD - if (initrd_start) - ROOT_DEV = Root_RAM0; - else -#endif -#ifdef CONFIG_ROOT_NFS - ROOT_DEV = Root_NFS; -#else - ROOT_DEV = Root_SDA2; -#endif - -#ifdef CONFIG_DUMMY_CONSOLE - conswitchp = &dummy_con; -#endif - - /* Find and map our OpenPIC */ - pplus_mpic_init(PRPMC750_PCI_MEM_OFFSET); - OpenPIC_InitSenses = prpmc750_openpic_initsenses; - OpenPIC_NumInitSenses = sizeof(prpmc750_openpic_initsenses); - - printk("PrPMC750 port (C) 2001 MontaVista Software, Inc. (source@mvista.com)\n"); -} - -/* - * Compute the PrPMC750's bus speed using the baud clock as a - * reference. - */ -static unsigned long __init -prpmc750_get_bus_speed(void) -{ - unsigned long tbl_start, tbl_end; - unsigned long current_state, old_state, bus_speed; - unsigned char lcr, dll, dlm; - int baud_divisor, count; - - /* Read the UART's baud clock divisor */ - lcr = readb(PRPMC750_SERIAL_0_LCR); - writeb(lcr | UART_LCR_DLAB, PRPMC750_SERIAL_0_LCR); - dll = readb(PRPMC750_SERIAL_0_DLL); - dlm = readb(PRPMC750_SERIAL_0_DLM); - writeb(lcr & ~UART_LCR_DLAB, PRPMC750_SERIAL_0_LCR); - baud_divisor = (dlm << 8) | dll; - - /* - * Use the baud clock divisor and base baud clock - * to determine the baud rate and use that as - * the number of baud clock edges we use for - * the time base sample. Make it half the baud - * rate. - */ - count = PRPMC750_BASE_BAUD / (baud_divisor * 16); - - /* Find the first edge of the baud clock */ - old_state = readb(PRPMC750_STATUS_REG) & PRPMC750_BAUDOUT_MASK; - do { - current_state = readb(PRPMC750_STATUS_REG) & - PRPMC750_BAUDOUT_MASK; - } while(old_state == current_state); - - old_state = current_state; - - /* Get the starting time base value */ - tbl_start = get_tbl(); - - /* - * Loop until we have found a number of edges equal - * to half the count (half the baud rate) - */ - do { - do { - current_state = readb(PRPMC750_STATUS_REG) & - PRPMC750_BAUDOUT_MASK; - } while(old_state == current_state); - old_state = current_state; - } while (--count); - - /* Get the ending time base value */ - tbl_end = get_tbl(); - - /* Compute bus speed */ - bus_speed = (tbl_end-tbl_start)*128; - - return bus_speed; -} - -static void __init -prpmc750_calibrate_decr(void) -{ - unsigned long freq; - int divisor = 4; - - freq = prpmc750_get_bus_speed(); - - tb_ticks_per_jiffy = freq / (HZ * divisor); - tb_to_us = mulhwu_scale_factor(freq/divisor, 1000000); -} - -static void -prpmc750_restart(char *cmd) -{ - local_irq_disable(); - writeb(PRPMC750_MODRST_MASK, PRPMC750_MODRST_REG); - while(1); -} - -static void -prpmc750_halt(void) -{ - local_irq_disable(); - while (1); -} - -static void -prpmc750_power_off(void) -{ - prpmc750_halt(); -} - -static void __init -prpmc750_init_IRQ(void) -{ - openpic_init(1, 0, 0, -1); -} - -/* - * Set BAT 3 to map 0xf0000000 to end of physical memory space. - */ -static __inline__ void -prpmc750_set_bat(void) -{ - unsigned long bat3u, bat3l; - static int mapping_set = 0; - - if (!mapping_set) - { - __asm__ __volatile__( - " lis %0,0xf000\n \ - ori %1,%0,0x002a\n \ - ori %0,%0,0x1ffe\n \ - mtspr 0x21e,%0\n \ - mtspr 0x21f,%1\n \ - isync\n \ - sync " - : "=r" (bat3u), "=r" (bat3l)); - - mapping_set = 1; - } - return; -} - -/* - * We need to read the Falcon/Hawk memory controller - * to properly determine this value - */ -static unsigned long __init -prpmc750_find_end_of_memory(void) -{ - /* Cover the Hawk registers with a BAT */ - prpmc750_set_bat(); - - /* Read the memory size from the Hawk SMC */ - return pplus_get_mem_size(PRPMC750_HAWK_SMC_BASE); -} - -static void __init -prpmc750_map_io(void) -{ - io_block_mapping(0x80000000, 0x80000000, 0x10000000, _PAGE_IO); - io_block_mapping(0xf0000000, 0xc0000000, 0x08000000, _PAGE_IO); - io_block_mapping(0xf8000000, 0xf8000000, 0x08000000, _PAGE_IO); -} - -void __init -platform_init(unsigned long r3, unsigned long r4, unsigned long r5, - unsigned long r6, unsigned long r7) -{ - parse_bootinfo(find_bootinfo()); - - isa_io_base = PRPMC750_ISA_IO_BASE; - isa_mem_base = PRPMC750_ISA_MEM_BASE; - pci_dram_offset = PRPMC750_SYS_MEM_BASE; - - ppc_md.setup_arch = prpmc750_setup_arch; - ppc_md.show_cpuinfo = prpmc750_show_cpuinfo; - ppc_md.init_IRQ = prpmc750_init_IRQ; - ppc_md.get_irq = openpic_get_irq; - - ppc_md.find_end_of_memory = prpmc750_find_end_of_memory; - ppc_md.setup_io_mappings = prpmc750_map_io; - - ppc_md.restart = prpmc750_restart; - ppc_md.power_off = prpmc750_power_off; - ppc_md.halt = prpmc750_halt; - - /* PrPMC750 has no timekeeper part */ - ppc_md.time_init = NULL; - ppc_md.get_rtc_time = NULL; - ppc_md.set_rtc_time = NULL; - ppc_md.calibrate_decr = prpmc750_calibrate_decr; -} diff -Nru a/arch/ppc/platforms/prpmc800.c b/arch/ppc/platforms/prpmc800.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/ppc/platforms/prpmc800.c Tue May 4 21:53:36 2004 @@ -0,0 +1,481 @@ +/* + * arch/ppc/platforms/prpmc800.c + * + * Author: Dale Farnsworth + * + * 2001-2004 (c) MontaVista, Software, Inc. This file is licensed under + * the terms of the GNU General Public License version 2. This program + * is licensed "as is" without any warranty of any kind, whether express + * or implied. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "prpmc800.h" + +#define HARRIER_REVI_REG (PRPMC800_HARRIER_XCSR_BASE+HARRIER_REVI_OFF) +#define HARRIER_UCTL_REG (PRPMC800_HARRIER_XCSR_BASE+HARRIER_UCTL_OFF) +#define HARRIER_MISC_CSR_REG (PRPMC800_HARRIER_XCSR_BASE+HARRIER_MISC_CSR_OFF) +#define HARRIER_IFEVP_REG (PRPMC800_HARRIER_MPIC_BASE+HARRIER_MPIC_IFEVP_OFF) +#define HARRIER_IFEDE_REG (PRPMC800_HARRIER_MPIC_BASE+HARRIER_MPIC_IFEDE_OFF) +#define HARRIER_FEEN_REG (PRPMC800_HARRIER_XCSR_BASE+HARRIER_FEEN_OFF) +#define HARRIER_FEMA_REG (PRPMC800_HARRIER_XCSR_BASE+HARRIER_FEMA_OFF) + +#define HARRIER_VENI_REG (PRPMC800_HARRIER_XCSR_BASE + HARRIER_VENI_OFF) +#define HARRIER_MISC_CSR (PRPMC800_HARRIER_XCSR_BASE + \ + HARRIER_MISC_CSR_OFF) + +#define MONARCH (monarch != 0) +#define NON_MONARCH (monarch == 0) + +extern int mpic_init(void); +extern unsigned long loops_per_jiffy; +extern void gen550_progress(char *, unsigned short); + +static int monarch = 0; +static int found_self = 0; +static int self = 0; + +static u_char prpmc800_openpic_initsenses[] __initdata = +{ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC800_INT_HOSTINT0 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC800_INT_UNUSED */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC800_INT_DEBUGINT */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC800_INT_HARRIER_WDT */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC800_INT_UNUSED */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC800_INT_UNUSED */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC800_INT_HOSTINT1 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC800_INT_HOSTINT2 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC800_INT_HOSTINT3 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC800_INT_PMC_INTA */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC800_INT_PMC_INTB */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC800_INT_PMC_INTC */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC800_INT_PMC_INTD */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC800_INT_UNUSED */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC800_INT_UNUSED */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC800_INT_UNUSED */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PRPMC800_INT_HARRIER_INT (UARTS, ABORT, DMA) */ +}; + +/* + * Motorola PrPMC750/PrPMC800 in PrPMCBASE or PrPMC-Carrier + * Combined irq tables. Only Base has IDSEL 14, only Carrier has 21 and 22. + */ +static inline int +prpmc_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) +{ + static char pci_irq_table[][4] = + /* + * PCI IDSEL/INTPIN->INTLINE + * A B C D + */ + { + {12, 0, 0, 0}, /* IDSEL 14 - Ethernet, base */ + {0, 0, 0, 0}, /* IDSEL 15 - unused */ + {10, 11, 12, 9}, /* IDSEL 16 - PMC A1, PMC1 */ + {10, 11, 12, 9}, /* IDSEL 17 - PrPMC-A-B, PMC2-B */ + {11, 12, 9, 10}, /* IDSEL 18 - PMC A1-B, PMC1-B */ + {0, 0, 0, 0}, /* IDSEL 19 - unused */ + {9, 10, 11, 12}, /* IDSEL 20 - P2P Bridge */ + {11, 12, 9, 10}, /* IDSEL 21 - PMC A2, carrier */ + {12, 9, 10, 11}, /* IDSEL 22 - PMC A2-B, carrier */ + }; + const long min_idsel = 14, max_idsel = 22, irqs_per_slot = 4; + return PCI_IRQ_TABLE_LOOKUP; +}; + +static int +prpmc_read_config_dword(struct pci_controller *hose, u8 bus, u8 devfn, + int offset, u32 * val) +{ + /* paranoia */ + if ((hose == NULL) || + (hose->cfg_addr == NULL) || (hose->cfg_data == NULL)) + return PCIBIOS_DEVICE_NOT_FOUND; + + out_be32(hose->cfg_addr, ((offset & 0xfc) << 24) | (devfn << 16) + | ((bus - hose->bus_offset) << 8) | 0x80); + *val = in_le32((u32 *) (hose->cfg_data + (offset & 3))); + + return PCIBIOS_SUCCESSFUL; +} + +#define HARRIER_PCI_VEND_DEV_ID (PCI_VENDOR_ID_MOTOROLA | \ + (PCI_DEVICE_ID_MOTOROLA_HARRIER << 16)) +static int prpmc_self(u8 bus, u8 devfn) +{ + /* + * Harriers always view themselves as being on bus 0. If we're not + * looking at bus 0, we're not going to find ourselves. + */ + if (bus != 0) + return PCIBIOS_DEVICE_NOT_FOUND; + else { + int result; + int val; + struct pci_controller *hose; + + hose = pci_bus_to_hose(bus); + + /* See if target device is a Harrier */ + result = prpmc_read_config_dword(hose, bus, devfn, + PCI_VENDOR_ID, &val); + if ((result != PCIBIOS_SUCCESSFUL) || + (val != HARRIER_PCI_VEND_DEV_ID)) + return PCIBIOS_DEVICE_NOT_FOUND; + + /* + * LBA bit is set if target Harrier == initiating Harrier + * (i.e. if we are reading our own PCI header). + */ + result = prpmc_read_config_dword(hose, bus, devfn, + HARRIER_LBA_OFF, &val); + if ((result != PCIBIOS_SUCCESSFUL) || + ((val & HARRIER_LBA_MSK) != HARRIER_LBA_MSK)) + return PCIBIOS_DEVICE_NOT_FOUND; + + /* It's us, save our location for later */ + self = devfn; + found_self = 1; + return PCIBIOS_SUCCESSFUL; + } +} + +static int prpmc_exclude_device(u8 bus, u8 devfn) +{ + /* + * Monarch is allowed to access all PCI devices. Non-monarch is + * only allowed to access its own Harrier. + */ + + if (MONARCH) + return PCIBIOS_SUCCESSFUL; + if (found_self) + if ((bus == 0) && (devfn == self)) + return PCIBIOS_SUCCESSFUL; + else + return PCIBIOS_DEVICE_NOT_FOUND; + else + return prpmc_self(bus, devfn); +} + +void __init prpmc800_find_bridges(void) +{ + struct pci_controller *hose; + int host_bridge; + + hose = pcibios_alloc_controller(); + if (!hose) + return; + + hose->first_busno = 0; + hose->last_busno = 0xff; + + ppc_md.pci_exclude_device = prpmc_exclude_device; + ppc_md.pcibios_fixup = NULL; + ppc_md.pcibios_fixup_bus = NULL; + ppc_md.pci_swizzle = common_swizzle; + ppc_md.pci_map_irq = prpmc_map_irq; + + setup_indirect_pci(hose, + PRPMC800_PCI_CONFIG_ADDR, PRPMC800_PCI_CONFIG_DATA); + + /* Get host bridge vendor/dev id */ + + host_bridge = in_be32((uint *) (HARRIER_VENI_REG)); + + if (host_bridge != HARRIER_VEND_DEV_ID) { + printk(KERN_CRIT "Host bridge 0x%x not supported\n", + host_bridge); + return; + } + + monarch = in_be32((uint *) HARRIER_MISC_CSR) & HARRIER_SYSCON; + + printk(KERN_INFO "Running as %s.\n", + MONARCH ? "Monarch" : "Non-Monarch"); + + hose->io_space.start = PRPMC800_PCI_IO_START; + hose->io_space.end = PRPMC800_PCI_IO_END; + hose->io_base_virt = (void *)PRPMC800_ISA_IO_BASE; + hose->pci_mem_offset = PRPMC800_PCI_PHY_MEM_OFFSET; + + pci_init_resource(&hose->io_resource, + PRPMC800_PCI_IO_START, PRPMC800_PCI_IO_END, + IORESOURCE_IO, "PCI host bridge"); + + if (MONARCH) { + hose->mem_space.start = PRPMC800_PCI_MEM_START; + hose->mem_space.end = PRPMC800_PCI_MEM_END; + + pci_init_resource(&hose->mem_resources[0], + PRPMC800_PCI_MEM_START, + PRPMC800_PCI_MEM_END, + IORESOURCE_MEM, "PCI host bridge"); + + if (harrier_init(hose, + PRPMC800_HARRIER_XCSR_BASE, + PRPMC800_PROC_PCI_MEM_START, + PRPMC800_PROC_PCI_MEM_END, + PRPMC800_PROC_PCI_IO_START, + PRPMC800_PROC_PCI_IO_END, + PRPMC800_HARRIER_MPIC_BASE) != 0) + printk(KERN_CRIT "Could not initialize HARRIER " + "bridge\n"); + + harrier_release_eready(PRPMC800_HARRIER_XCSR_BASE); + harrier_wait_eready(PRPMC800_HARRIER_XCSR_BASE); + hose->last_busno = pciauto_bus_scan(hose, hose->first_busno); + + } else { + pci_init_resource(&hose->mem_resources[0], + PRPMC800_NM_PCI_MEM_START, + PRPMC800_NM_PCI_MEM_END, + IORESOURCE_MEM, "PCI host bridge"); + + hose->mem_space.start = PRPMC800_NM_PCI_MEM_START; + hose->mem_space.end = PRPMC800_NM_PCI_MEM_END; + + if (harrier_init(hose, + PRPMC800_HARRIER_XCSR_BASE, + PRPMC800_NM_PROC_PCI_MEM_START, + PRPMC800_NM_PROC_PCI_MEM_END, + PRPMC800_PROC_PCI_IO_START, + PRPMC800_PROC_PCI_IO_END, + PRPMC800_HARRIER_MPIC_BASE) != 0) + printk(KERN_CRIT "Could not initialize HARRIER " + "bridge\n"); + + harrier_setup_nonmonarch(PRPMC800_HARRIER_XCSR_BASE, + HARRIER_ITSZ_1MB); + harrier_release_eready(PRPMC800_HARRIER_XCSR_BASE); + } +} + +static int prpmc800_show_cpuinfo(struct seq_file *m) +{ + seq_printf(m, "machine\t\t: PrPMC800\n"); + + return 0; +} + +static void __init prpmc800_setup_arch(void) +{ + /* init to some ~sane value until calibrate_delay() runs */ + loops_per_jiffy = 50000000 / HZ; + + /* Lookup PCI host bridges */ + prpmc800_find_bridges(); + +#ifdef CONFIG_BLK_DEV_INITRD + if (initrd_start) + ROOT_DEV = Root_RAM0; + else +#endif +#ifdef CONFIG_ROOT_NFS + ROOT_DEV = Root_NFS; +#else + ROOT_DEV = Root_SDA2; +#endif + +#ifdef CONFIG_DUMMY_CONSOLE + conswitchp = &dummy_con; +#endif + + printk(KERN_INFO "Port by MontaVista Software, Inc. " + "(source@mvista.com)\n"); +} + +/* + * Compute the PrPMC800's tbl frequency using the baud clock as a reference. + */ +static void __init prpmc800_calibrate_decr(void) +{ + unsigned long tbl_start, tbl_end; + unsigned long current_state, old_state, tb_ticks_per_second; + unsigned int count; + unsigned int harrier_revision; + + harrier_revision = readb(HARRIER_REVI_REG); + if (harrier_revision < 2) { + /* XTAL64 was broken in harrier revision 1 */ + printk(KERN_INFO "time_init: Harrier revision %d, assuming " + "100 Mhz bus\n", harrier_revision); + tb_ticks_per_second = 100000000 / 4; + tb_ticks_per_jiffy = tb_ticks_per_second / HZ; + tb_to_us = mulhwu_scale_factor(tb_ticks_per_second, 1000000); + return; + } + + /* + * The XTAL64 bit oscillates at the 1/64 the base baud clock + * Set count to XTAL64 cycles per second. Since we'll count + * half-cycles, we'll reach the count in half a second. + */ + count = PRPMC800_BASE_BAUD / 64; + + /* Find the first edge of the baud clock */ + old_state = readb(HARRIER_UCTL_REG) & HARRIER_XTAL64_MASK; + do { + current_state = readb(HARRIER_UCTL_REG) & HARRIER_XTAL64_MASK; + } while (old_state == current_state); + + old_state = current_state; + + /* Get the starting time base value */ + tbl_start = get_tbl(); + + /* + * Loop until we have found a number of edges (half-cycles) + * equal to the count (half a second) + */ + do { + do { + current_state = readb(HARRIER_UCTL_REG) & + HARRIER_XTAL64_MASK; + } while (old_state == current_state); + old_state = current_state; + } while (--count); + + /* Get the ending time base value */ + tbl_end = get_tbl(); + + /* We only counted for half a second, so double to get ticks/second */ + tb_ticks_per_second = (tbl_end - tbl_start) * 2; + tb_ticks_per_jiffy = tb_ticks_per_second / HZ; + tb_to_us = mulhwu_scale_factor(tb_ticks_per_second, 1000000); +} + +static void prpmc800_restart(char *cmd) +{ + ulong temp; + + local_irq_disable(); + temp = in_be32((uint *) HARRIER_MISC_CSR_REG); + temp |= HARRIER_RSTOUT; + out_be32((uint *) HARRIER_MISC_CSR_REG, temp); + while (1) ; +} + +static void prpmc800_halt(void) +{ + local_irq_disable(); + while (1) ; +} + +static void prpmc800_power_off(void) +{ + prpmc800_halt(); +} + +static void __init prpmc800_init_IRQ(void) +{ + OpenPIC_InitSenses = prpmc800_openpic_initsenses; + OpenPIC_NumInitSenses = sizeof(prpmc800_openpic_initsenses); + + /* Setup external interrupt sources. */ + openpic_set_sources(0, 16, OpenPIC_Addr + 0x10000); + /* Setup internal UART interrupt source. */ + openpic_set_sources(16, 1, OpenPIC_Addr + 0x10200); + + /* Do the MPIC initialization based on the above settings. */ + openpic_init(0); + + /* enable functional exceptions for uarts and abort */ + out_8((u8 *) HARRIER_FEEN_REG, (HARRIER_FE_UA0 | HARRIER_FE_UA1)); + out_8((u8 *) HARRIER_FEMA_REG, ~(HARRIER_FE_UA0 | HARRIER_FE_UA1)); +} + +/* + * Set BAT 3 to map 0xf0000000 to end of physical memory space. + */ +static __inline__ void prpmc800_set_bat(void) +{ + mb(); + mtspr(DBAT1U, 0xf0001ffe); + mtspr(DBAT1L, 0xf000002a); + mb(); +} + +/* + * We need to read the Harrier memory controller + * to properly determine this value + */ +static unsigned long __init prpmc800_find_end_of_memory(void) +{ + /* Read the memory size from the Harrier XCSR */ + return harrier_get_mem_size(PRPMC800_HARRIER_XCSR_BASE); +} + +static void __init prpmc800_map_io(void) +{ + io_block_mapping(0x80000000, 0x80000000, 0x10000000, _PAGE_IO); + io_block_mapping(0xf0000000, 0xf0000000, 0x10000000, _PAGE_IO); +} + +void __init +platform_init(unsigned long r3, unsigned long r4, unsigned long r5, + unsigned long r6, unsigned long r7) +{ + parse_bootinfo(find_bootinfo()); + + prpmc800_set_bat(); + + isa_io_base = PRPMC800_ISA_IO_BASE; + isa_mem_base = PRPMC800_ISA_MEM_BASE; + pci_dram_offset = PRPMC800_PCI_DRAM_OFFSET; + + ppc_md.setup_arch = prpmc800_setup_arch; + ppc_md.show_cpuinfo = prpmc800_show_cpuinfo; + ppc_md.init_IRQ = prpmc800_init_IRQ; + ppc_md.get_irq = openpic_get_irq; + + ppc_md.find_end_of_memory = prpmc800_find_end_of_memory; + ppc_md.setup_io_mappings = prpmc800_map_io; + + ppc_md.restart = prpmc800_restart; + ppc_md.power_off = prpmc800_power_off; + ppc_md.halt = prpmc800_halt; + + /* PrPMC800 has no timekeeper part */ + ppc_md.time_init = NULL; + ppc_md.get_rtc_time = NULL; + ppc_md.set_rtc_time = NULL; + ppc_md.calibrate_decr = prpmc800_calibrate_decr; +#ifdef CONFIG_SERIAL_TEXT_DEBUG + ppc_md.progress = gen550_progress; +#else /* !CONFIG_SERIAL_TEXT_DEBUG */ + ppc_md.progress = NULL; +#endif /* CONFIG_SERIAL_TEXT_DEBUG */ +} diff -Nru a/arch/ppc/platforms/prpmc800.h b/arch/ppc/platforms/prpmc800.h --- a/arch/ppc/platforms/prpmc800.h Tue May 4 21:53:36 2004 +++ b/arch/ppc/platforms/prpmc800.h Tue May 4 21:53:36 2004 @@ -5,21 +5,22 @@ * * Author: Dale Farnsworth * - * 2001 (c) MontaVista, Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - /* - * From Processor to PCI: - * PCI Mem Space: 0x80000000 - 0xa0000000 -> 0x80000000 - 0xa0000000 (512 MB) - * PCI I/O Space: 0xfe400000 - 0xfeef0000 -> 0x00000000 - 0x00b00000 (11 MB) - * Note: Must skip 0xfe000000-0xfe400000 for CONFIG_HIGHMEM/PKMAP area + * Copyright 2001 MontaVista Software Inc. * - * From PCI to Processor: - * System Memory: 0x00000000 -> 0x00000000 + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. */ - + /* + * From Processor to PCI: + * PCI Mem Space: 0x80000000 - 0xa0000000 -> 0x80000000 - 0xa0000000 (512 MB) + * PCI I/O Space: 0xfe400000 - 0xfeef0000 -> 0x00000000 - 0x00b00000 (11 MB) + * Note: Must skip 0xfe000000-0xfe400000 for CONFIG_HIGHMEM/PKMAP area + * + * From PCI to Processor: + * System Memory: 0x00000000 -> 0x00000000 + */ #ifndef __ASMPPC_PRPMC800_H #define __ASMPPC_PRPMC800_H @@ -37,18 +38,29 @@ #define PRPMC800_PCI_MEM_START 0x80000000U #define PRPMC800_PCI_MEM_END 0x9fffffffU +#define PRPMC800_NM_PROC_PCI_MEM_START 0x40000000U +#define PRPMC800_NM_PROC_PCI_MEM_END 0xdfffffffU +#define PRPMC800_NM_PCI_MEM_START 0x40000000U +#define PRPMC800_NM_PCI_MEM_END 0xdfffffffU + #define PRPMC800_PCI_DRAM_OFFSET 0x00000000U #define PRPMC800_PCI_PHY_MEM_OFFSET 0x00000000U #define PRPMC800_ISA_IO_BASE PRPMC800_PROC_PCI_IO_START #define PRPMC800_ISA_MEM_BASE 0x00000000U -#define PRPMC800_HARRIER_XCSR_BASE 0xfeff0000 +#define PRPMC800_HARRIER_XCSR_BASE HARRIER_DEFAULT_XCSR_BASE #define PRPMC800_HARRIER_MPIC_BASE 0xff000000 #define PRPMC800_SERIAL_1 0xfeff00c0 #define PRPMC800_BASE_BAUD 1843200 +/* + * interrupt vector number and priority for harrier internal interrupt + * sources + */ +#define PRPMC800_INT_IRQ 16 +#define PRPMC800_INT_PRI 15 -#endif /* __ASMPPC_PRPMC800_H */ +#endif /* __ASMPPC_PRPMC800_H */ diff -Nru a/arch/ppc/platforms/prpmc800_pci.c b/arch/ppc/platforms/prpmc800_pci.c --- a/arch/ppc/platforms/prpmc800_pci.c Tue May 4 21:53:36 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,120 +0,0 @@ -/* - * arch/ppc/platforms/prpmc800_pci.c - * - * PCI support for Motorola PrPMC800 - * - * Author: Dale Farnsworth - * - * 2001 (c) MontaVista, Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * Motorola PrPMC750/PrPMC800 in PrPMCBASE or PrPMC-Carrier - * Combined irq tables. Only Base has IDSEL 14, only Carrier has 21 and 22. - */ -static inline int -prpmc_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) -{ - static char pci_irq_table[][4] = - /* - * PCI IDSEL/INTPIN->INTLINE - * A B C D - */ - { - {12, 0, 0, 0}, /* IDSEL 14 - Ethernet, base */ - {0, 0, 0, 0}, /* IDSEL 15 - unused */ - {10, 11, 12, 9}, /* IDSEL 16 - PMC A1, PMC1 */ - {10, 11, 12, 9}, /* IDSEL 17 - PrPMC-A-B, PMC2-B */ - {11, 12, 9, 10}, /* IDSEL 18 - PMC A1-B, PMC1-B */ - {0, 0, 0, 0}, /* IDSEL 19 - unused */ - {9, 10, 11, 12}, /* IDSEL 20 - P2P Bridge */ - {11, 12, 9, 10}, /* IDSEL 21 - PMC A2, carrier */ - {12, 9, 10, 11}, /* IDSEL 22 - PMC A2-B, carrier */ - }; - const long min_idsel = 14, max_idsel = 22, irqs_per_slot = 4; - return PCI_IRQ_TABLE_LOOKUP; -}; - -void __init -prpmc800_find_bridges(void) -{ - struct pci_controller* hose; - int host_bridge; - - hose = pcibios_alloc_controller(); - if (!hose) - return; - - hose->first_busno = 0; - hose->last_busno = 0xff; - hose->pci_mem_offset = PRPMC800_PCI_PHY_MEM_OFFSET; - - pci_init_resource(&hose->io_resource, - PRPMC800_PCI_IO_START, - PRPMC800_PCI_IO_END, - IORESOURCE_IO, - "PCI host bridge"); - - pci_init_resource(&hose->mem_resources[0], - PRPMC800_PCI_MEM_START, - PRPMC800_PCI_MEM_END, - IORESOURCE_MEM, - "PCI host bridge"); - - hose->io_space.start = PRPMC800_PCI_IO_START; - hose->io_space.end = PRPMC800_PCI_IO_END; - hose->mem_space.start = PRPMC800_PCI_MEM_START; - hose->mem_space.end = PRPMC800_PCI_MEM_END; - hose->io_base_virt = (void *)PRPMC800_ISA_IO_BASE; - - setup_indirect_pci(hose, - PRPMC800_PCI_CONFIG_ADDR, - PRPMC800_PCI_CONFIG_DATA); - - /* Get host bridge vendor/dev id */ - early_read_config_dword(hose, - 0, - PCI_DEVFN(0,0), - PCI_VENDOR_ID, - &host_bridge); - - switch (host_bridge) { - case HARRIER_VEND_DEV_ID: - if (harrier_init(hose, - PRPMC800_HARRIER_XCSR_BASE, - PRPMC800_PROC_PCI_MEM_START, - PRPMC800_PROC_PCI_MEM_END, - PRPMC800_PROC_PCI_IO_START, - PRPMC800_PROC_PCI_IO_END, - PRPMC800_HARRIER_MPIC_BASE) != 0) { - printk("Could not initialize HARRIER bridge\n"); - } - break; - default: - printk("Host bridge 0x%x not supported\n", host_bridge); - } - - hose->last_busno = pciauto_bus_scan(hose, hose->first_busno); - - ppc_md.pcibios_fixup = NULL; - ppc_md.pcibios_fixup_bus = NULL; - ppc_md.pci_swizzle = common_swizzle; - ppc_md.pci_map_irq = prpmc_map_irq; -} diff -Nru a/arch/ppc/platforms/prpmc800_setup.c b/arch/ppc/platforms/prpmc800_setup.c --- a/arch/ppc/platforms/prpmc800_setup.c Tue May 4 21:53:36 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,329 +0,0 @@ -/* - * - * Author: Dale Farnsworth - * - * 2001 (c) MontaVista, Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define HARRIER_REVI_REG (PRPMC800_HARRIER_XCSR_BASE+HARRIER_REVI_OFF) -#define HARRIER_UCTL_REG (PRPMC800_HARRIER_XCSR_BASE+HARRIER_UCTL_OFF) -#define HARRIER_MISC_CSR_REG (PRPMC800_HARRIER_XCSR_BASE+HARRIER_MISC_CSR_OFF) -#define HARRIER_IFEVP_REG (PRPMC800_HARRIER_MPIC_BASE+HARRIER_MPIC_IFEVP_OFF) -#define HARRIER_IFEDE_REG (PRPMC800_HARRIER_MPIC_BASE+HARRIER_MPIC_IFEDE_OFF) -#define HARRIER_FEEN_REG (PRPMC800_HARRIER_XCSR_BASE+HARRIER_FEEN_OFF) -#define HARRIER_FEMA_REG (PRPMC800_HARRIER_XCSR_BASE+HARRIER_FEMA_OFF) - -extern void prpmc800_find_bridges(void); -extern int mpic_init(void); -extern unsigned long loops_per_jiffy; - -static u_char prpmc800_openpic_initsenses[] __initdata = -{ - 1, /* PRPMC800_INT_HOSTINT0 */ - 1, /* PRPMC800_INT_UNUSED */ - 1, /* PRPMC800_INT_DEBUGINT */ - 1, /* PRPMC800_INT_HARRIER_WDT */ - 1, /* PRPMC800_INT_UNUSED */ - 1, /* PRPMC800_INT_UNUSED */ - 1, /* PRPMC800_INT_HOSTINT1 */ - 1, /* PRPMC800_INT_HOSTINT2 */ - 1, /* PRPMC800_INT_HOSTINT3 */ - 1, /* PRPMC800_INT_PMC_INTA */ - 1, /* PRPMC800_INT_PMC_INTB */ - 1, /* PRPMC800_INT_PMC_INTC */ - 1, /* PRPMC800_INT_PMC_INTD */ - 1, /* PRPMC800_INT_UNUSED */ - 1, /* PRPMC800_INT_UNUSED */ - 1, /* PRPMC800_INT_UNUSED */ - 1, /* PRPMC800_INT_HARRIER_INT (UARTS, ABORT, DMA) */ -}; - -static int -prpmc800_show_cpuinfo(struct seq_file *m) -{ - seq_printf(m, "machine\t\t: PrPMC800\n"); - - return 0; -} - -static void __init -prpmc800_setup_arch(void) -{ - - /* init to some ~sane value until calibrate_delay() runs */ - loops_per_jiffy = 50000000/HZ; - - /* Lookup PCI host bridges */ - prpmc800_find_bridges(); - -#ifdef CONFIG_BLK_DEV_INITRD - if (initrd_start) - ROOT_DEV = Root_RAM0; - else -#endif -#ifdef CONFIG_ROOT_NFS - ROOT_DEV = Root_NFS; -#else - ROOT_DEV = Root_SDA2; -#endif - -#ifdef CONFIG_DUMMY_CONSOLE - conswitchp = &dummy_con; -#endif - - OpenPIC_InitSenses = prpmc800_openpic_initsenses; - OpenPIC_NumInitSenses = sizeof(prpmc800_openpic_initsenses); - - printk("PrPMC800 port (C) 2001 MontaVista Software, Inc. (source@mvista.com)\n"); -} - -/* - * Compute the PrPMC800's tbl frequency using the baud clock as a reference. - */ - -static void __init -prpmc800_calibrate_decr(void) -{ - unsigned long tbl_start, tbl_end; - unsigned long current_state, old_state, tb_ticks_per_second; - unsigned int count; - unsigned int harrier_revision; - - harrier_revision = readb(HARRIER_REVI_REG); - if (harrier_revision < 2) { - /* XTAL64 was broken in harrier revision 1 */ - printk("time_init: Harrier revision %d, assuming 100 Mhz bus\n", - harrier_revision); - tb_ticks_per_second = 100000000/4; - tb_ticks_per_jiffy = tb_ticks_per_second / HZ; - tb_to_us = mulhwu_scale_factor(tb_ticks_per_second, 1000000); - return; - } - - /* - * The XTAL64 bit oscillates at the 1/64 the base baud clock - * Set count to XTAL64 cycles per second. Since we'll count - * half-cycles, we'll reach the count in half a second. - */ - count = PRPMC800_BASE_BAUD / 64; - - /* Find the first edge of the baud clock */ - old_state = readb(HARRIER_UCTL_REG) & HARRIER_XTAL64_MASK; - do { - current_state = readb(HARRIER_UCTL_REG) & - HARRIER_XTAL64_MASK; - } while(old_state == current_state); - - old_state = current_state; - - /* Get the starting time base value */ - tbl_start = get_tbl(); - - /* - * Loop until we have found a number of edges (half-cycles) - * equal to the count (half a second) - */ - do { - do { - current_state = readb(HARRIER_UCTL_REG) & - HARRIER_XTAL64_MASK; - } while(old_state == current_state); - old_state = current_state; - } while (--count); - - /* Get the ending time base value */ - tbl_end = get_tbl(); - - /* We only counted for half a second, so double to get ticks/second */ - tb_ticks_per_second = (tbl_end - tbl_start) * 2; - tb_ticks_per_jiffy = tb_ticks_per_second / HZ; - tb_to_us = mulhwu_scale_factor(tb_ticks_per_second, 1000000); -} - -static void -prpmc800_restart(char *cmd) -{ - local_irq_disable(); - writeb(HARRIER_RSTOUT_MASK, HARRIER_MISC_CSR_REG); - while(1); -} - -static void -prpmc800_halt(void) -{ - local_irq_disable(); - while (1); -} - -static void -prpmc800_power_off(void) -{ - prpmc800_halt(); -} - -static void __init -prpmc800_init_IRQ(void) -{ - openpic_init(1, 0, 0, -1); - -#define PRIORITY 15 -#define VECTOR 16 -#define PROCESSOR 0 - /* initialize the harrier's internal interrupt priority 15, irq 1 */ - out_be32((u32 *)HARRIER_IFEVP_REG, (PRIORITY<<16) | VECTOR); - out_be32((u32 *)HARRIER_IFEDE_REG, (1< -#include -#include -#include - -static struct serial_state rs_table[RS_TABLE_SIZE] = { - SERIAL_PORT_DFNS /* Defined in */ -}; - -void -prpmc800_progress(char *s, unsigned short hex) -{ - volatile char c; - volatile unsigned char *com_port; - volatile unsigned char *com_port_lsr; - - com_port = (volatile unsigned char *) rs_table[0].port; - com_port_lsr = com_port + UART_LSR; - - while ((c = *s++) != 0) { - while ((*com_port_lsr & UART_LSR_THRE) == 0) - ; - *com_port = c; - - if (c == '\n') { - while ((*com_port_lsr & UART_LSR_THRE) == 0) - ; - *com_port = '\r'; - } - } -} -#endif /* CONFIG_SERIAL_TEXT_DEBUG */ - -/* - * We need to read the Harrier memory controller - * to properly determine this value - */ -static unsigned long __init -prpmc800_find_end_of_memory(void) -{ - /* Cover the harrier registers with a BAT */ - prpmc800_set_bat(); - - /* Read the memory size from the Harrier XCSR */ - return harrier_get_mem_size(PRPMC800_HARRIER_XCSR_BASE); -} - -static void __init -prpmc800_map_io(void) -{ - io_block_mapping(0x80000000, 0x80000000, 0x10000000, _PAGE_IO); - io_block_mapping(0xf0000000, 0xf0000000, 0x10000000, _PAGE_IO); -} - -void __init -platform_init(unsigned long r3, unsigned long r4, unsigned long r5, - unsigned long r6, unsigned long r7) -{ - parse_bootinfo(find_bootinfo()); - - prpmc800_set_bat(); - - isa_io_base = PRPMC800_ISA_IO_BASE; - isa_mem_base = PRPMC800_ISA_MEM_BASE; - pci_dram_offset = PRPMC800_PCI_DRAM_OFFSET; - - ppc_md.setup_arch = prpmc800_setup_arch; - ppc_md.show_cpuinfo = prpmc800_show_cpuinfo; - ppc_md.init_IRQ = prpmc800_init_IRQ; - ppc_md.get_irq = openpic_get_irq; - - ppc_md.find_end_of_memory = prpmc800_find_end_of_memory; - ppc_md.setup_io_mappings = prpmc800_map_io; - - ppc_md.restart = prpmc800_restart; - ppc_md.power_off = prpmc800_power_off; - ppc_md.halt = prpmc800_halt; - - /* PrPMC800 has no timekeeper part */ - ppc_md.time_init = NULL; - ppc_md.get_rtc_time = NULL; - ppc_md.set_rtc_time = NULL; - ppc_md.calibrate_decr = prpmc800_calibrate_decr; -#ifdef CONFIG_SERIAL_TEXT_DEBUG - ppc_md.progress = prpmc800_progress; -#else /* !CONFIG_SERIAL_TEXT_DEBUG */ - ppc_md.progress = NULL; -#endif /* CONFIG_SERIAL_TEXT_DEBUG */ -} diff -Nru a/arch/ppc/platforms/sandpoint.c b/arch/ppc/platforms/sandpoint.c --- a/arch/ppc/platforms/sandpoint.c Tue May 4 21:53:36 2004 +++ b/arch/ppc/platforms/sandpoint.c Tue May 4 21:53:36 2004 @@ -444,6 +444,8 @@ openpic_set_sources(0, 16, OpenPIC_Addr + 0x10200); openpic_init(NUM_8259_INTERRUPTS); + openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade", + i8259_irq); /* * openpic_init() has set up irq_desc[16-31] to be openpic diff -Nru a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile --- a/arch/ppc/syslib/Makefile Tue May 4 21:53:35 2004 +++ b/arch/ppc/syslib/Makefile Tue May 4 21:53:35 2004 @@ -39,7 +39,7 @@ obj-$(CONFIG_EBONY) += indirect_pci.o pci_auto.o todc_time.o obj-$(CONFIG_EV64260) += gt64260_common.o gt64260_pic.o \ indirect_pci.o todc_time.o pci_auto.o -obj-$(CONFIG_GEMINI) += open_pic.o i8259.o indirect_pci.o +obj-$(CONFIG_GEMINI) += open_pic.o indirect_pci.o obj-$(CONFIG_K2) += i8259.o indirect_pci.o todc_time.o \ pci_auto.o obj-$(CONFIG_LOPEC) += pci_auto.o open_pic.o i8259.o todc_time.o @@ -57,8 +57,8 @@ indirect_pci.o todc_time.o pci_auto.o obj-$(CONFIG_PRPMC750) += open_pic.o indirect_pci.o pci_auto.o \ hawk_common.o -obj-$(CONFIG_PRPMC800) += open_pic.o indirect_pci.o pci_auto.o \ - hawk_common.o harrier.o +obj-$(CONFIG_HARRIER) += harrier.o +obj-$(CONFIG_PRPMC800) += open_pic.o indirect_pci.o pci_auto.o obj-$(CONFIG_SANDPOINT) += i8259.o open_pic.o pci_auto.o todc_time.o obj-$(CONFIG_SPRUCE) += cpc700_pic.o indirect_pci.o pci_auto.o \ todc_time.o diff -Nru a/arch/ppc/syslib/cpc710.h b/arch/ppc/syslib/cpc710.h --- a/arch/ppc/syslib/cpc710.h Tue May 4 21:53:35 2004 +++ b/arch/ppc/syslib/cpc710.h Tue May 4 21:53:35 2004 @@ -26,8 +26,10 @@ #define ERRC 0xff001050 #define SESR 0xff001060 #define SEAR 0xff001070 +#define SIOC1 0xff001090 #define PGCHP 0xff001100 #define GPDIR 0xff001130 +#define GPOUT 0xff001150 #define ATAS 0xff001160 #define AVDG 0xff001170 #define MCCR 0xff001200 diff -Nru a/arch/ppc/syslib/harrier.c b/arch/ppc/syslib/harrier.c --- a/arch/ppc/syslib/harrier.c Tue May 4 21:53:35 2004 +++ b/arch/ppc/syslib/harrier.c Tue May 4 21:53:35 2004 @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -23,6 +24,93 @@ #include #include +/* define defaults for inbound windows */ +#define HARRIER_ITAT_DEFAULT (HARRIER_ITAT_ENA | \ + HARRIER_ITAT_MEM | \ + HARRIER_ITAT_WPE | \ + HARRIER_ITAT_GBL) + +#define HARRIER_MPAT_DEFAULT (HARRIER_ITAT_ENA | \ + HARRIER_ITAT_MEM | \ + HARRIER_ITAT_WPE | \ + HARRIER_ITAT_GBL) + +/* + * Initialize the inbound window size on a non-monarch harrier. + */ +void __init harrier_setup_nonmonarch(uint ppc_reg_base, uint in0_size) +{ + u16 temps; + u32 temp; + + if (in0_size > HARRIER_ITSZ_2GB) { + printk + ("harrier_setup_nonmonarch: Invalid window size code %d\n", + in0_size); + return; + } + + /* Clear the PCI memory enable bit. If we don't, then when the + * inbound windows are enabled below, the corresponding BARs will be + * "live" and start answering to PCI memory reads from their default + * addresses (0x0), which overlap with system RAM. + */ + temps = in_le16((u16 *) (ppc_reg_base + + HARRIER_XCSR_CONFIG(PCI_COMMAND))); + temps &= ~(PCI_COMMAND_MEMORY); + out_le16((u16 *) (ppc_reg_base + HARRIER_XCSR_CONFIG(PCI_COMMAND)), + temps); + + /* Setup a non-prefetchable inbound window */ + out_le32((u32 *) (ppc_reg_base + + HARRIER_XCSR_CONFIG(HARRIER_ITSZ0_OFF)), in0_size); + + temp = in_le32((u32 *) (ppc_reg_base + + HARRIER_XCSR_CONFIG(HARRIER_ITAT0_OFF))); + temp &= ~HARRIER_ITAT_PRE; + temp |= HARRIER_ITAT_DEFAULT; + out_le32((u32 *) (ppc_reg_base + + HARRIER_XCSR_CONFIG(HARRIER_ITAT0_OFF)), temp); + + /* Enable the message passing block */ + temp = in_le32((u32 *) (ppc_reg_base + + HARRIER_XCSR_CONFIG(HARRIER_MPAT_OFF))); + temp |= HARRIER_MPAT_DEFAULT; + out_le32((u32 *) (ppc_reg_base + + HARRIER_XCSR_CONFIG(HARRIER_MPAT_OFF)), temp); +} + +void __init harrier_release_eready(uint ppc_reg_base) +{ + ulong temp; + + /* + * Set EREADY to allow the line to be pulled up after everyone is + * ready. + */ + temp = in_be32((uint *) (ppc_reg_base + HARRIER_MISC_CSR_OFF)); + temp |= HARRIER_EREADY; + out_be32((uint *) (ppc_reg_base + HARRIER_MISC_CSR_OFF), temp); +} + +void __init harrier_wait_eready(uint ppc_reg_base) +{ + ulong temp; + + /* + * Poll the ERDYS line until it goes high to indicate that all + * non-monarch PrPMCs are ready for bus enumeration (or that there are + * no PrPMCs present). + */ + + /* FIXME: Add a timeout of some kind to prevent endless waits. */ + do { + + temp = in_be32((uint *) (ppc_reg_base + HARRIER_MISC_CSR_OFF)); + + } while (!(temp & HARRIER_ERDYS)); +} + /* * Initialize the Motorola MCG Harrier host bridge. * @@ -40,25 +128,25 @@ ulong processor_pci_mem_start, ulong processor_pci_mem_end, ulong processor_pci_io_start, - ulong processor_pci_io_end, - ulong processor_mpic_base) + ulong processor_pci_io_end, ulong processor_mpic_base) { - uint addr, offset; + uint addr, offset; /* * Some sanity checks... */ - if (((processor_pci_mem_start&0xffff0000) != processor_pci_mem_start) || - ((processor_pci_io_start &0xffff0000) != processor_pci_io_start)) { + if (((processor_pci_mem_start & 0xffff0000) != processor_pci_mem_start) + || ((processor_pci_io_start & 0xffff0000) != + processor_pci_io_start)) { printk("harrier_init: %s\n", - "PPC to PCI mappings must start on 64 KB boundaries"); + "PPC to PCI mappings must start on 64 KB boundaries"); return -1; } - if (((processor_pci_mem_end &0x0000ffff) != 0x0000ffff) || - ((processor_pci_io_end &0x0000ffff) != 0x0000ffff)) { + if (((processor_pci_mem_end & 0x0000ffff) != 0x0000ffff) || + ((processor_pci_io_end & 0x0000ffff) != 0x0000ffff)) { printk("harrier_init: PPC to PCI mappings %s\n", - "must end just before a 64 KB boundaries"); + "must end just before a 64 KB boundaries"); return -1; } @@ -67,19 +155,19 @@ ((processor_pci_io_end - processor_pci_io_start) != (hose->io_space.end - hose->io_space.start))) { printk("harrier_init: %s\n", - "PPC and PCI memory or I/O space sizes don't match"); + "PPC and PCI memory or I/O space sizes don't match"); return -1; } if ((processor_mpic_base & 0xfffc0000) != processor_mpic_base) { printk("harrier_init: %s\n", - "MPIC address must start on 256 KB boundary"); + "MPIC address must start on 256 KB boundary"); return -1; } if ((pci_dram_offset & 0xffff0000) != pci_dram_offset) { printk("harrier_init: %s\n", - "pci_dram_offset must be multiple of 64 KB"); + "pci_dram_offset must be multiple of 64 KB"); return -1; } @@ -89,28 +177,32 @@ * the PCI bus. * * Note: Don't need to 'AND' start/end addresses with 0xffff0000 - * because sanity check above ensures that they are properly - * aligned. + * because sanity check above ensures that they are properly + * aligned. */ /* Set up PPC->PCI Mem mapping */ addr = processor_pci_mem_start | (processor_pci_mem_end >> 16); +#ifdef CONFIG_HARRIER_STORE_GATHERING + offset = (hose->mem_space.start - processor_pci_mem_start) | 0x9a; +#else offset = (hose->mem_space.start - processor_pci_mem_start) | 0x92; - out_be32((uint *)(ppc_reg_base + HARRIER_OTAD0_OFF), addr); - out_be32((uint *)(ppc_reg_base + HARRIER_OTOF0_OFF), offset); +#endif + out_be32((uint *) (ppc_reg_base + HARRIER_OTAD0_OFF), addr); + out_be32((uint *) (ppc_reg_base + HARRIER_OTOF0_OFF), offset); /* Set up PPC->PCI I/O mapping -- Contiguous I/O space */ addr = processor_pci_io_start | (processor_pci_io_end >> 16); offset = (hose->io_space.start - processor_pci_io_start) | 0x80; - out_be32((uint *)(ppc_reg_base + HARRIER_OTAD1_OFF), addr); - out_be32((uint *)(ppc_reg_base + HARRIER_OTOF1_OFF), offset); + out_be32((uint *) (ppc_reg_base + HARRIER_OTAD1_OFF), addr); + out_be32((uint *) (ppc_reg_base + HARRIER_OTOF1_OFF), offset); /* Enable MPIC */ OpenPIC_Addr = (void *)processor_mpic_base; addr = (processor_mpic_base >> 16) | 1; - out_be16((ushort *)(ppc_reg_base + HARRIER_MBAR_OFF), addr); - out_8((u_char *)(ppc_reg_base + HARRIER_MPIC_CSR_OFF), - HARRIER_MPIC_OPI_ENABLE); + out_be16((ushort *) (ppc_reg_base + HARRIER_MBAR_OFF), addr); + out_8((u_char *) (ppc_reg_base + HARRIER_MPIC_CSR_OFF), + HARRIER_MPIC_OPI_ENABLE); return 0; } @@ -127,22 +219,22 @@ #define MB (1024*1024UL) static uint harrier_size_table[] __initdata = { - 0 * MB, /* 0 ==> 0 MB */ - 32 * MB, /* 1 ==> 32 MB */ - 64 * MB, /* 2 ==> 64 MB */ - 64 * MB, /* 3 ==> 64 MB */ - 128 * MB, /* 4 ==> 128 MB */ - 128 * MB, /* 5 ==> 128 MB */ - 128 * MB, /* 6 ==> 128 MB */ - 256 * MB, /* 7 ==> 256 MB */ - 256 * MB, /* 8 ==> 256 MB */ - 256 * MB, /* 9 ==> 256 MB */ - 512 * MB, /* a ==> 512 MB */ - 512 * MB, /* b ==> 512 MB */ - 512 * MB, /* c ==> 512 MB */ - 1024 * MB, /* d ==> 1024 MB */ - 1024 * MB, /* e ==> 1024 MB */ - 2048 * MB, /* f ==> 2048 MB */ + 0 * MB, /* 0 ==> 0 MB */ + 32 * MB, /* 1 ==> 32 MB */ + 64 * MB, /* 2 ==> 64 MB */ + 64 * MB, /* 3 ==> 64 MB */ + 128 * MB, /* 4 ==> 128 MB */ + 128 * MB, /* 5 ==> 128 MB */ + 128 * MB, /* 6 ==> 128 MB */ + 256 * MB, /* 7 ==> 256 MB */ + 256 * MB, /* 8 ==> 256 MB */ + 256 * MB, /* 9 ==> 256 MB */ + 512 * MB, /* a ==> 512 MB */ + 512 * MB, /* b ==> 512 MB */ + 512 * MB, /* c ==> 512 MB */ + 1024 * MB, /* d ==> 1024 MB */ + 1024 * MB, /* e ==> 1024 MB */ + 2048 * MB, /* f ==> 2048 MB */ }; /* @@ -152,23 +244,22 @@ * memory. Assumes that the memory controller registers are already mapped * into virtual memory--too early to use ioremap(). */ -unsigned long __init -harrier_get_mem_size(uint xcsr_base) +unsigned long __init harrier_get_mem_size(uint xcsr_base) { - ulong last_addr; - int i; - uint vend_dev_id; - uint *size_table; - uint val; - uint *csrp; - uint size; - int size_table_entries; + ulong last_addr; + int i; + uint vend_dev_id; + uint *size_table; + uint val; + uint *csrp; + uint size; + int size_table_entries; - vend_dev_id = in_be32((uint *)xcsr_base + PCI_VENDOR_ID); + vend_dev_id = in_be32((uint *) xcsr_base + PCI_VENDOR_ID); if (((vend_dev_id & 0xffff0000) >> 16) != PCI_VENDOR_ID_MOTOROLA) { printk("harrier_get_mem_size: %s (0x%x)\n", - "Not a Motorola Memory Controller", vend_dev_id); + "Not a Motorola Memory Controller", vend_dev_id); return 0; } @@ -177,18 +268,17 @@ if (vend_dev_id == PCI_DEVICE_ID_MOTOROLA_HARRIER) { size_table = harrier_size_table; size_table_entries = sizeof(harrier_size_table) / - sizeof(harrier_size_table[0]); - } - else { + sizeof(harrier_size_table[0]); + } else { printk("harrier_get_mem_size: %s (0x%x)\n", - "Not a Harrier", vend_dev_id); + "Not a Harrier", vend_dev_id); return 0; } last_addr = 0; - csrp = (uint *)(xcsr_base + HARRIER_SDBA_OFF); - for (i=0; i<8; i++) { + csrp = (uint *) (xcsr_base + HARRIER_SDBA_OFF); + for (i = 0; i < 8; i++) { val = in_be32(csrp++); if (val & 0x100) { /* If enabled */ @@ -198,8 +288,8 @@ break; /* Register not set correctly */ } size = size_table[size]; - - val &= ~(size-1); + + val &= ~(size - 1); val += size; if (val > last_addr) { diff -Nru a/arch/ppc/syslib/open_pic.c b/arch/ppc/syslib/open_pic.c --- a/arch/ppc/syslib/open_pic.c Tue May 4 21:53:36 2004 +++ b/arch/ppc/syslib/open_pic.c Tue May 4 21:53:36 2004 @@ -48,6 +48,8 @@ static u_int NumSources; static int open_pic_irq_offset; static volatile OpenPIC_Source *ISR[NR_IRQS]; +static int openpic_cascade_irq = -1; +static int (*openpic_cascade_fn)(struct pt_regs *); /* Global Operations */ static void openpic_disable_8259_pass_through(void); @@ -416,13 +418,6 @@ /* Initialize the spurious interrupt */ if (ppc_md.progress) ppc_md.progress("openpic: spurious",0x3bd); openpic_set_spurious(OPENPIC_VEC_SPURIOUS+offset); - - /* Initialize the cascade */ - if (offset) { - if (request_irq(offset, no_action, SA_INTERRUPT, - "82c59 cascade", NULL)) - printk("Unable to get OpenPIC IRQ 0 for cascade\n"); - } openpic_disable_8259_pass_through(); #ifdef CONFIG_EPIC_SERIAL_MODE openpic_eicr_set_clk(7); /* Slowest value until we know better */ @@ -682,6 +677,19 @@ * */ +/* + * Hookup a cascade to the OpenPIC. + */ +void __init +openpic_hookup_cascade(u_int irq, char *name, + int (*cascade_fn)(struct pt_regs *)) +{ + openpic_cascade_irq = irq; + openpic_cascade_fn = cascade_fn; + if (request_irq(irq, no_action, SA_INTERRUPT, name, NULL)) + printk("Unable to get OpenPIC IRQ %d for cascade\n", + irq - open_pic_irq_offset); +} /* * Enable/disable an external interrupt source @@ -841,14 +849,19 @@ int irq = openpic_irq(); /* - * This needs to be cleaned up. We don't necessarily have - * an i8259 cascaded or even a cascade. + * Check for the cascade interrupt and call the cascaded + * interrupt controller function (usually i8259_irq) if so. + * This should move to irq.c eventually. -- paulus */ - if (open_pic_irq_offset && irq == open_pic_irq_offset) { - /* Get the IRQ from the cascade. */ - irq = i8259_irq(regs); - openpic_eoi(); - } else if (irq == OPENPIC_VEC_SPURIOUS + open_pic_irq_offset) + if (irq == openpic_cascade_irq && openpic_cascade_fn != NULL) { + int cirq = openpic_cascade_fn(regs); + + /* Allow for the cascade being shared with other devices */ + if (cirq != -1) { + irq = cirq; + openpic_eoi(); + } + } else if (irq == OPENPIC_VEC_SPURIOUS + open_pic_irq_offset) irq = -1; return irq; } diff -Nru a/arch/ppc64/Makefile b/arch/ppc64/Makefile --- a/arch/ppc64/Makefile Tue May 4 21:53:35 2004 +++ b/arch/ppc64/Makefile Tue May 4 21:53:35 2004 @@ -20,6 +20,7 @@ AS := $(AS) -64 LD := $(LD) -m elf64ppc CC := $(CC) -m64 +CHECK := $(CHECK) -m64 endif LDFLAGS := -m elf64ppc diff -Nru a/arch/ppc64/kernel/entry.S b/arch/ppc64/kernel/entry.S --- a/arch/ppc64/kernel/entry.S Tue May 4 21:53:35 2004 +++ b/arch/ppc64/kernel/entry.S Tue May 4 21:53:35 2004 @@ -311,6 +311,7 @@ beq 2f /* if yes, don't slbie it */ oris r6,r6,0x0800 /* set C (class) bit */ slbie r6 + slbie r6 /* Workaround POWER5 < DD2.1 issue */ 2: END_FTR_SECTION_IFSET(CPU_FTR_SLB) clrrdi r7,r8,THREAD_SHIFT /* base of new stack */ diff -Nru a/arch/ppc64/kernel/signal.c b/arch/ppc64/kernel/signal.c --- a/arch/ppc64/kernel/signal.c Tue May 4 21:53:35 2004 +++ b/arch/ppc64/kernel/signal.c Tue May 4 21:53:35 2004 @@ -430,6 +430,7 @@ regs->gpr[1] = newsp; err |= get_user(regs->gpr[2], &funct_desc_ptr->toc); regs->gpr[3] = signr; + regs->result = 0; if (ka->sa.sa_flags & SA_SIGINFO) { err |= get_user(regs->gpr[4], (unsigned long *)&frame->pinfo); err |= get_user(regs->gpr[5], (unsigned long *)&frame->puc); diff -Nru a/arch/ppc64/kernel/signal32.c b/arch/ppc64/kernel/signal32.c --- a/arch/ppc64/kernel/signal32.c Tue May 4 21:53:36 2004 +++ b/arch/ppc64/kernel/signal32.c Tue May 4 21:53:36 2004 @@ -676,6 +676,7 @@ regs->nip = (unsigned long) ka->sa.sa_handler; regs->link = (unsigned long) frame->tramp; regs->trap = 0; + regs->result = 0; return; @@ -784,7 +785,6 @@ */ sys32_sigaltstack((u32)(u64)&rt_sf->uc.uc_stack, 0, 0, 0, 0, 0, regs); - regs->result &= 0xFFFFFFFF; ret = regs->result; return ret; @@ -841,6 +841,7 @@ regs->nip = (unsigned long) ka->sa.sa_handler; regs->link = (unsigned long) frame->mctx.tramp; regs->trap = 0; + regs->result = 0; return; @@ -885,7 +886,6 @@ || restore_user_regs(regs, sr, 1)) goto badframe; - regs->result &= 0xFFFFFFFF; ret = regs->result; return ret; diff -Nru a/arch/ppc64/kernel/stab.c b/arch/ppc64/kernel/stab.c --- a/arch/ppc64/kernel/stab.c Tue May 4 21:53:36 2004 +++ b/arch/ppc64/kernel/stab.c Tue May 4 21:53:36 2004 @@ -474,14 +474,14 @@ void flush_slb(struct task_struct *tsk, struct mm_struct *mm) { unsigned long offset = __get_cpu_var(stab_cache_ptr); + union { + unsigned long word0; + slb_dword0 data; + } esid_data; + if (offset <= NR_STAB_CACHE_ENTRIES) { int i; - union { - unsigned long word0; - slb_dword0 data; - } esid_data; - asm volatile("isync" : : : "memory"); for (i = 0; i < offset; i++) { esid_data.word0 = 0; @@ -491,6 +491,17 @@ asm volatile("isync" : : : "memory"); } else { asm volatile("isync; slbia; isync" : : : "memory"); + } + + /* Workaround POWER5 < DD2.1 issue */ + if (offset == 1 || offset > NR_STAB_CACHE_ENTRIES) { + /* + * flush segment in EEH region, we dont normally access + * addresses in this region. + */ + esid_data.word0 = 0; + esid_data.data.esid = EEH_REGION_ID; + asm volatile("slbie %0" : : "r" (esid_data)); } __get_cpu_var(stab_cache_ptr) = 0; diff -Nru a/arch/ppc64/kernel/sys_ppc32.c b/arch/ppc64/kernel/sys_ppc32.c --- a/arch/ppc64/kernel/sys_ppc32.c Tue May 4 21:53:36 2004 +++ b/arch/ppc64/kernel/sys_ppc32.c Tue May 4 21:53:36 2004 @@ -1666,7 +1666,7 @@ err = sys_shmdt((char *)AA(ptr)); break; case SHMGET: - err = sys_shmget(first, second, third); + err = sys_shmget(first, second_parm, third); break; case SHMCTL: err = do_sys32_shmctl(first, second, (void *)AA(ptr)); diff -Nru a/arch/ppc64/mm/fault.c b/arch/ppc64/mm/fault.c --- a/arch/ppc64/mm/fault.c Tue May 4 21:53:36 2004 +++ b/arch/ppc64/mm/fault.c Tue May 4 21:53:36 2004 @@ -38,6 +38,44 @@ #include /* + * Check whether the instruction at regs->nip is a store using + * an update addressing form which will update r1. + */ +static int store_updates_sp(struct pt_regs *regs) +{ + unsigned int inst; + + if (get_user(inst, (unsigned int *)regs->nip)) + return 0; + /* check for 1 in the rA field */ + if (((inst >> 16) & 0x1f) != 1) + return 0; + /* check major opcode */ + switch (inst >> 26) { + case 37: /* stwu */ + case 39: /* stbu */ + case 45: /* sthu */ + case 53: /* stfsu */ + case 55: /* stfdu */ + return 1; + case 62: /* std or stdu */ + return (inst & 3) == 1; + case 31: + /* check minor opcode */ + switch ((inst >> 1) & 0x3ff) { + case 181: /* stdux */ + case 183: /* stwux */ + case 247: /* stbux */ + case 439: /* sthux */ + case 695: /* stfsux */ + case 759: /* stfdux */ + return 1; + } + } + return 0; +} + +/* * The error_code parameter is * - DSISR for a non-SLB data access fault, * - SRR1 & 0x08000000 for a non-SLB instruction access fault @@ -82,6 +120,39 @@ } if (!(vma->vm_flags & VM_GROWSDOWN)) goto bad_area; + + /* + * N.B. The POWER/Open ABI allows programs to access up to + * 288 bytes below the stack pointer. + * The kernel signal delivery code writes up to about 1.5kB + * below the stack pointer (r1) before decrementing it. + * The exec code can write slightly over 640kB to the stack + * before setting the user r1. Thus we allow the stack to + * expand to 1MB without further checks. + */ + if (address + 0x100000 < vma->vm_end) { + /* get user regs even if this fault is in kernel mode */ + struct pt_regs *uregs = current->thread.regs; + if (uregs == NULL) + goto bad_area; + + /* + * A user-mode access to an address a long way below + * the stack pointer is only valid if the instruction + * is one which would update the stack pointer to the + * address accessed if the instruction completed, + * i.e. either stwu rs,n(r1) or stwux rs,r1,rb + * (or the byte, halfword, float or double forms). + * + * If we don't check this then any write to the area + * between the last mapped region and the stack will + * expand the stack rather than segfaulting. + */ + if (address + 2048 < uregs->gpr[1] + && (!user_mode(regs) || !store_updates_sp(regs))) + goto bad_area; + } + if (expand_stack(vma, address)) goto bad_area; diff -Nru a/arch/ppc64/mm/hugetlbpage.c b/arch/ppc64/mm/hugetlbpage.c --- a/arch/ppc64/mm/hugetlbpage.c Tue May 4 21:53:36 2004 +++ b/arch/ppc64/mm/hugetlbpage.c Tue May 4 21:53:36 2004 @@ -155,9 +155,20 @@ return 0; } -static void do_slbia(void *unused) +static void flush_segments(void *parm) { - asm volatile ("isync; slbia; isync":::"memory"); + u16 segs = (unsigned long) parm; + unsigned long i; + + asm volatile("isync" : : : "memory"); + + for (i = 0; i < 16; i++) { + if (! (segs & (1U << i))) + continue; + asm volatile("slbie %0" : : "r" (i << SID_SHIFT)); + } + + asm volatile("isync" : : : "memory"); } static int prepare_low_seg_for_htlb(struct mm_struct *mm, unsigned long seg) @@ -226,10 +237,10 @@ return -EBUSY; mm->context.htlb_segs |= newsegs; - /* the context change must make it to memory before the slbia, + /* the context change must make it to memory before the flush, * so that further SLB misses do the right thing. */ mb(); - on_each_cpu(do_slbia, NULL, 0, 1); + on_each_cpu(flush_segments, (void *)(unsigned long)newsegs, 0, 1); return 0; } diff -Nru a/arch/ppc64/mm/numa.c b/arch/ppc64/mm/numa.c --- a/arch/ppc64/mm/numa.c Tue May 4 21:53:36 2004 +++ b/arch/ppc64/mm/numa.c Tue May 4 21:53:36 2004 @@ -184,6 +184,8 @@ if (numa_domain >= MAX_NUMNODES) BUG(); + node_set_online(numa_domain); + if (max_domain < numa_domain) max_domain = numa_domain; diff -Nru a/arch/s390/Kconfig b/arch/s390/Kconfig --- a/arch/s390/Kconfig Tue May 4 21:53:35 2004 +++ b/arch/s390/Kconfig Tue May 4 21:53:35 2004 @@ -368,6 +368,7 @@ source "fs/Kconfig" +source "arch/s390/oprofile/Kconfig" menu "Kernel hacking" diff -Nru a/arch/s390/Makefile b/arch/s390/Makefile --- a/arch/s390/Makefile Tue May 4 21:53:35 2004 +++ b/arch/s390/Makefile Tue May 4 21:53:35 2004 @@ -50,6 +50,9 @@ drivers-y += drivers/s390/ drivers-$(CONFIG_MATHEMU) += arch/$(ARCH)/math-emu/ +# must be linked after kernel +drivers-$(CONFIG_OPROFILE) += arch/s390/oprofile/ + boot := arch/$(ARCH)/boot all: image diff -Nru a/arch/s390/defconfig b/arch/s390/defconfig --- a/arch/s390/defconfig Tue May 4 21:53:36 2004 +++ b/arch/s390/defconfig Tue May 4 21:53:36 2004 @@ -464,6 +464,11 @@ # CONFIG_NLS is not set # +# Profiling support +# +# CONFIG_PROFILING is not set + +# # Kernel hacking # CONFIG_DEBUG_KERNEL=y diff -Nru a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile --- a/arch/s390/kernel/Makefile Tue May 4 21:53:36 2004 +++ b/arch/s390/kernel/Makefile Tue May 4 21:53:36 2004 @@ -6,7 +6,7 @@ obj-y := bitmap.o traps.o time.o process.o \ setup.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o \ - semaphore.o s390_ext.o debug.o + semaphore.o s390_ext.o debug.o profile.o extra-$(CONFIG_ARCH_S390_31) += head.o extra-$(CONFIG_ARCH_S390X) += head64.o diff -Nru a/arch/s390/kernel/binfmt_elf32.c b/arch/s390/kernel/binfmt_elf32.c --- a/arch/s390/kernel/binfmt_elf32.c Tue May 4 21:53:36 2004 +++ b/arch/s390/kernel/binfmt_elf32.c Tue May 4 21:53:36 2004 @@ -40,8 +40,7 @@ passed in R14. */ #define ELF_PLAT_INIT(_r, load_addr) \ do { \ - _r->gprs[14] = 0; \ - set_thread_flag(TIF_31BIT); \ + _r->gprs[14] = 0; \ } while(0) #define USE_ELF_CORE_DUMP @@ -82,6 +81,7 @@ set_personality(PER_SVR4); \ else if (current->personality != PER_LINUX32) \ set_personality(PER_LINUX); \ + set_thread_flag(TIF_31BIT); \ } while (0) #include "compat_linux.h" @@ -194,10 +194,7 @@ unsigned long map_addr; if (!addr) - addr = 0x40000000; - - if (prot & PROT_READ) - prot |= PROT_EXEC; + addr = TASK_UNMAPPED_BASE; down_write(¤t->mm->mmap_sem); map_addr = do_mmap(filep, ELF_PAGESTART(addr), diff -Nru a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S --- a/arch/s390/kernel/compat_wrapper.S Tue May 4 21:53:36 2004 +++ b/arch/s390/kernel/compat_wrapper.S Tue May 4 21:53:36 2004 @@ -1234,6 +1234,14 @@ lgfr %r5,%r5 # int jg sys_epoll_wait # branch to system call + .globl sys32_lookup_dcookie_wrapper +sys32_lookup_dcookie_wrapper: + sllg %r2,%r2,32 # get high word of 64bit dcookie + or %r2,%r3 # get low word of 64bit dcookie + llgtr %r3,%r4 # char * + llgfr %r4,%r5 # size_t + jg sys_lookup_dcookie + .globl sys32_fadvise64_wrapper sys32_fadvise64_wrapper: lgfr %r2,%r2 # int diff -Nru a/arch/s390/kernel/profile.c b/arch/s390/kernel/profile.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/s390/kernel/profile.c Tue May 4 21:53:36 2004 @@ -0,0 +1,56 @@ +/* + * arch/s390/kernel/profile.c + * + * Copyright (C) 2003 IBM Deutschland Entwicklung GmbH, IBM Corporation + * Author(s): Thomas Spatzier (tspat@de.ibm.com) + * + */ +#include + +static struct proc_dir_entry * root_irq_dir; + +static int prof_cpu_mask_read_proc (char *page, char **start, off_t off, + int count, int *eof, void *data) +{ + int len = cpumask_scnprintf(page, count, *(cpumask_t *)data); + if (count - len < 2) + return -EINVAL; + len += sprintf(page + len, "\n"); + return len; +} + +static int prof_cpu_mask_write_proc (struct file *file, const char *buffer, + unsigned long count, void *data) +{ + cpumask_t *mask = (cpumask_t *)data; + unsigned long full_count = count, err; + cpumask_t new_value; + + err = cpumask_parse(buffer, count, new_value); + if (err) + return err; + + *mask = new_value; + return full_count; +} + +cpumask_t prof_cpu_mask = CPU_MASK_ALL; + +void init_irq_proc(void) +{ + struct proc_dir_entry *entry; + + /* create /proc/irq */ + root_irq_dir = proc_mkdir("irq", 0); + + /* create /proc/irq/prof_cpu_mask */ + entry = create_proc_entry("prof_cpu_mask", 0600, root_irq_dir); + + if (!entry) + return; + + entry->nlink = 1; + entry->data = (void *)&prof_cpu_mask; + entry->read_proc = prof_cpu_mask_read_proc; + entry->write_proc = prof_cpu_mask_write_proc; +} diff -Nru a/arch/s390/kernel/sys_s390.c b/arch/s390/kernel/sys_s390.c --- a/arch/s390/kernel/sys_s390.c Tue May 4 21:53:35 2004 +++ b/arch/s390/kernel/sys_s390.c Tue May 4 21:53:35 2004 @@ -4,6 +4,7 @@ * S390 version * Copyright (C) 1999,2000 IBM Deutschland Entwicklung GmbH, IBM Corporation * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com), + * Thomas Spatzier (tspat@de.ibm.com) * * Derived from "arch/i386/kernel/sys_i386.c" * diff -Nru a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S --- a/arch/s390/kernel/syscalls.S Tue May 4 21:53:35 2004 +++ b/arch/s390/kernel/syscalls.S Tue May 4 21:53:35 2004 @@ -118,7 +118,7 @@ SYSCALL(sys_newlstat,sys_newlstat,compat_sys_newlstat_wrapper) SYSCALL(sys_newfstat,sys_newfstat,compat_sys_newfstat_wrapper) NI_SYSCALL /* old uname syscall */ -NI_SYSCALL /* reserved for sys_lookup_dcache */ +SYSCALL(sys_lookup_dcookie,sys_lookup_dcookie,sys32_lookup_dcookie_wrapper) /* 110 */ SYSCALL(sys_vhangup,sys_vhangup,sys_vhangup) NI_SYSCALL /* old "idle" system call */ NI_SYSCALL /* vm86old for i386 */ diff -Nru a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c --- a/arch/s390/kernel/time.c Tue May 4 21:53:35 2004 +++ b/arch/s390/kernel/time.c Tue May 4 21:53:35 2004 @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -177,6 +178,54 @@ #endif /* CONFIG_ARCH_S390X */ + +#ifdef CONFIG_PROFILING +extern char _stext, _etext; + +/* + * The profiling function is SMP safe. (nothing can mess + * around with "current", and the profiling counters are + * updated with atomic operations). This is especially + * useful with a profiling multiplier != 1 + */ +static inline void s390_do_profile(struct pt_regs * regs) +{ + unsigned long eip; + extern cpumask_t prof_cpu_mask; + + profile_hook(regs); + + if (user_mode(regs)) + return; + + if (!prof_buffer) + return; + + eip = instruction_pointer(regs); + + /* + * Only measure the CPUs specified by /proc/irq/prof_cpu_mask. + * (default is all CPUs.) + */ + if (!cpu_isset(smp_processor_id(), prof_cpu_mask)) + return; + + eip -= (unsigned long) &_stext; + eip >>= prof_shift; + /* + * Don't ignore out-of-bounds EIP values silently, + * put them into the last histogram slot, so if + * present, they will show up as a sharp peak. + */ + if (eip > prof_len-1) + eip = prof_len-1; + atomic_inc((atomic_t *)&prof_buffer[eip]); +} +#else +#define s390_do_profile(regs) do { ; } while(0) +#endif /* CONFIG_PROFILING */ + + /* * timer_interrupt() needs to keep up the real-time clock, * as well as call the "do_timer()" routine every clocktick @@ -231,6 +280,7 @@ while (ticks--) do_timer(regs); #endif + s390_do_profile(regs); } #ifdef CONFIG_VIRT_TIMER diff -Nru a/arch/s390/oprofile/Kconfig b/arch/s390/oprofile/Kconfig --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/s390/oprofile/Kconfig Tue May 4 21:53:36 2004 @@ -0,0 +1,23 @@ + +menu "Profiling support" + depends on EXPERIMENTAL + +config PROFILING + bool "Profiling support (EXPERIMENTAL)" + help + Say Y here to enable profiling support mechanisms used by + profilers such as readprofile or OProfile. + + +config OPROFILE + tristate "OProfile system profiling (EXPERIMENTAL)" + depends on PROFILING + help + OProfile is a profiling system capable of profiling the + whole system, include the kernel, kernel modules, libraries, + and applications. + + If unsure, say N. + +endmenu + diff -Nru a/arch/s390/oprofile/Makefile b/arch/s390/oprofile/Makefile --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/s390/oprofile/Makefile Tue May 4 21:53:36 2004 @@ -0,0 +1,9 @@ +obj-$(CONFIG_OPROFILE) += oprofile.o + +DRIVER_OBJS = $(addprefix ../../../drivers/oprofile/, \ + oprof.o cpu_buffer.o buffer_sync.o \ + event_buffer.o oprofile_files.o \ + oprofilefs.o oprofile_stats.o \ + timer_int.o ) + +oprofile-y := $(DRIVER_OBJS) init.o diff -Nru a/arch/s390/oprofile/init.c b/arch/s390/oprofile/init.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/s390/oprofile/init.c Tue May 4 21:53:36 2004 @@ -0,0 +1,26 @@ +/** + * arch/s390/oprofile/init.c + * + * S390 Version + * Copyright (C) 2003 IBM Deutschland Entwicklung GmbH, IBM Corporation + * Author(s): Thomas Spatzier (tspat@de.ibm.com) + * + * @remark Copyright 2002 OProfile authors + */ + +#include +#include +#include + +//extern int irq_init(struct oprofile_operations** ops); +extern void timer_init(struct oprofile_operations** ops); + +int __init oprofile_arch_init(struct oprofile_operations** ops) +{ + timer_init(ops); + return 0; +} + +void oprofile_arch_exit(void) +{ +} diff -Nru a/arch/sparc/lib/bitext.c b/arch/sparc/lib/bitext.c --- a/arch/sparc/lib/bitext.c Tue May 4 21:53:35 2004 +++ b/arch/sparc/lib/bitext.c Tue May 4 21:53:35 2004 @@ -42,7 +42,10 @@ BUG(); spin_lock(&t->lock); - offset = t->last_off & ~align1; + if (len < t->last_size) + offset = t->first_free; + else + offset = t->last_off & ~align1; count = 0; for (;;) { off_new = find_next_zero_bit(t->map, t->size, offset); @@ -71,9 +74,14 @@ if (i == len) { for (i = 0; i < len; i++) __set_bit(offset + i, t->map); + if (offset == t->first_free) + t->first_free = find_next_zero_bit + (t->map, t->size, + t->first_free + len); if ((t->last_off = offset + len) >= t->size) t->last_off = 0; t->used += len; + t->last_size = len; spin_unlock(&t->lock); return offset; } @@ -96,6 +104,8 @@ BUG(); __clear_bit(offset + i, t->map); } + if (offset < t->first_free) + t->first_free = offset; t->used -= len; spin_unlock(&t->lock); } @@ -111,4 +121,6 @@ spin_lock_init(&t->lock); t->map = map; t->size = size; + t->last_size = 0; + t->first_free = 0; } diff -Nru a/arch/sparc/mm/init.c b/arch/sparc/mm/init.c --- a/arch/sparc/mm/init.c Tue May 4 21:53:35 2004 +++ b/arch/sparc/mm/init.c Tue May 4 21:53:35 2004 @@ -369,9 +369,8 @@ end = start + sp_banks[i].num_bytes; while (start < end) { - set_bit (start >> 20, - sparc_valid_addr_bitmap); - start += PAGE_SIZE; + set_bit(start >> 20, sparc_valid_addr_bitmap); + start += PAGE_SIZE; } } } @@ -400,6 +399,7 @@ int codepages = 0; int datapages = 0; int initpages = 0; + int reservedpages = 0; int i; highmem_start_page = pfn_to_page(highstart_pfn); @@ -434,12 +434,14 @@ max_mapnr = last_valid_pfn - pfn_base; high_memory = __va(max_low_pfn << PAGE_SHIFT); - num_physpages = totalram_pages = free_all_bootmem(); + totalram_pages = free_all_bootmem(); for (i = 0; sp_banks[i].num_bytes != 0; i++) { unsigned long start_pfn = sp_banks[i].base_addr >> PAGE_SHIFT; unsigned long end_pfn = (sp_banks[i].base_addr + sp_banks[i].num_bytes) >> PAGE_SHIFT; + num_physpages += sp_banks[i].num_bytes >> PAGE_SHIFT; + if (end_pfn <= highstart_pfn) continue; @@ -458,13 +460,20 @@ initpages = (((unsigned long) &__init_end) - ((unsigned long) &__init_begin)); initpages = PAGE_ALIGN(initpages) >> PAGE_SHIFT; - printk(KERN_INFO "Memory: %dk available (%dk kernel code, %dk data, %dk init, %ldk highmem) [%08lx,%08lx]\n", - nr_free_pages() << (PAGE_SHIFT-10), + /* Ignore memory holes for the purpose of counting reserved pages */ + for (i=0; i < max_low_pfn; i++) + if (test_bit(i >> (20 - PAGE_SHIFT), sparc_valid_addr_bitmap) + && PageReserved(pfn_to_page(i))) + reservedpages++; + + printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, %dk reserved, %dk data, %dk init, %ldk highmem)\n", + (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), + num_physpages << (PAGE_SHIFT - 10), codepages << (PAGE_SHIFT-10), + reservedpages << (PAGE_SHIFT - 10), datapages << (PAGE_SHIFT-10), initpages << (PAGE_SHIFT-10), - totalhigh_pages << (PAGE_SHIFT-10), - (unsigned long)PAGE_OFFSET, (last_valid_pfn << PAGE_SHIFT)); + totalhigh_pages << (PAGE_SHIFT-10)); } void free_initmem (void) diff -Nru a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c --- a/arch/sparc/mm/srmmu.c Tue May 4 21:53:36 2004 +++ b/arch/sparc/mm/srmmu.c Tue May 4 21:53:36 2004 @@ -276,6 +276,23 @@ ((address >> PAGE_SHIFT) & (SRMMU_PTRS_PER_PTE_SOFT - 1)); } +static unsigned long srmmu_swp_type(swp_entry_t entry) +{ + return (entry.val >> SRMMU_SWP_TYPE_SHIFT) & SRMMU_SWP_TYPE_MASK; +} + +static unsigned long srmmu_swp_offset(swp_entry_t entry) +{ + return (entry.val >> SRMMU_SWP_OFF_SHIFT) & SRMMU_SWP_OFF_MASK; +} + +static swp_entry_t srmmu_swp_entry(unsigned long type, unsigned long offset) +{ + return (swp_entry_t) { + (type & SRMMU_SWP_TYPE_MASK) << SRMMU_SWP_TYPE_SHIFT + | (offset & SRMMU_SWP_OFF_MASK) << SRMMU_SWP_OFF_SHIFT }; +} + /* * size: bytes to allocate in the nocache area. * align: bytes, number to align at. @@ -2204,6 +2221,10 @@ BTFIXUPSET_CALL(sparc_mapiorange, srmmu_mapiorange, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(sparc_unmapiorange, srmmu_unmapiorange, BTFIXUPCALL_NORM); + + BTFIXUPSET_CALL(__swp_type, srmmu_swp_type, BTFIXUPCALL_NORM); + BTFIXUPSET_CALL(__swp_offset, srmmu_swp_offset, BTFIXUPCALL_NORM); + BTFIXUPSET_CALL(__swp_entry, srmmu_swp_entry, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(mmu_info, srmmu_mmu_info, BTFIXUPCALL_NORM); diff -Nru a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c --- a/arch/sparc/mm/sun4c.c Tue May 4 21:53:36 2004 +++ b/arch/sparc/mm/sun4c.c Tue May 4 21:53:36 2004 @@ -1863,6 +1863,23 @@ ((address >> PAGE_SHIFT) & (SUN4C_PTRS_PER_PTE - 1)); } +static unsigned long sun4c_swp_type(swp_entry_t entry) +{ + return (entry.val & SUN4C_SWP_TYPE_MASK); +} + +static unsigned long sun4c_swp_offset(swp_entry_t entry) +{ + return (entry.val >> SUN4C_SWP_OFF_SHIFT) & SUN4C_SWP_OFF_MASK; +} + +static swp_entry_t sun4c_swp_entry(unsigned long type, unsigned long offset) +{ + return (swp_entry_t) { + (offset & SUN4C_SWP_OFF_MASK) << SUN4C_SWP_OFF_SHIFT + | (type & SUN4C_SWP_TYPE_MASK) }; +} + static void sun4c_free_pte_slow(pte_t *pte) { free_page((unsigned long)pte); @@ -2241,6 +2258,10 @@ BTFIXUPSET_CALL(sparc_mapiorange, sun4c_mapiorange, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(sparc_unmapiorange, sun4c_unmapiorange, BTFIXUPCALL_NORM); + + BTFIXUPSET_CALL(__swp_type, sun4c_swp_type, BTFIXUPCALL_NORM); + BTFIXUPSET_CALL(__swp_offset, sun4c_swp_offset, BTFIXUPCALL_NORM); + BTFIXUPSET_CALL(__swp_entry, sun4c_swp_entry, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(alloc_thread_info, sun4c_alloc_thread_info, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(free_thread_info, sun4c_free_thread_info, BTFIXUPCALL_NORM); diff -Nru a/arch/sparc64/defconfig b/arch/sparc64/defconfig --- a/arch/sparc64/defconfig Tue May 4 21:53:35 2004 +++ b/arch/sparc64/defconfig Tue May 4 21:53:35 2004 @@ -934,6 +934,7 @@ CONFIG_ATM_FORE200E_PCA_DEFAULT_FW=y CONFIG_ATM_FORE200E_SBA=y CONFIG_ATM_FORE200E_SBA_DEFAULT_FW=y +CONFIG_ATM_FORE200E_USE_TASKLET=y CONFIG_ATM_FORE200E_TX_RETRY=16 CONFIG_ATM_FORE200E_DEBUG=0 CONFIG_ATM_FORE200E=m @@ -1750,11 +1751,13 @@ CONFIG_CRYPTO_ARC4=m CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_MICHAEL_MIC=m +CONFIG_CRYPTO_CRC32C=m CONFIG_CRYPTO_TEST=m # # Library routines # CONFIG_CRC32=y +CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y diff -Nru a/arch/sparc64/kernel/sys_sparc.c b/arch/sparc64/kernel/sys_sparc.c --- a/arch/sparc64/kernel/sys_sparc.c Tue May 4 21:53:36 2004 +++ b/arch/sparc64/kernel/sys_sparc.c Tue May 4 21:53:36 2004 @@ -57,7 +57,8 @@ /* We do not accept a shared mapping if it would violate * cache aliasing constraints. */ - if ((flags & MAP_SHARED) && (addr & (SHMLBA - 1))) + if ((flags & MAP_SHARED) && + ((addr - (pgoff << PAGE_SHIFT)) & (SHMLBA - 1))) return -EINVAL; return addr; } diff -Nru a/crypto/Kconfig b/crypto/Kconfig --- a/crypto/Kconfig Tue May 4 21:53:36 2004 +++ b/crypto/Kconfig Tue May 4 21:53:36 2004 @@ -183,6 +183,16 @@ should not be used for other purposes because of the weakness of the algorithm. +config CRYPTO_CRC32C + tristate "CRC32c CRC algorithm" + depends on CRYPTO + select LIBCRC32C + help + Castagnoli, et al Cyclic Redundancy-Check Algorithm. Used + by iSCSI for header and data digests and by others. + See Castagnoli93. This implementation uses lib/libcrc32c. + Module will be crc32c. + config CRYPTO_TEST tristate "Testing module" depends on CRYPTO diff -Nru a/crypto/Makefile b/crypto/Makefile --- a/crypto/Makefile Tue May 4 21:53:36 2004 +++ b/crypto/Makefile Tue May 4 21:53:36 2004 @@ -24,5 +24,6 @@ obj-$(CONFIG_CRYPTO_ARC4) += arc4.o obj-$(CONFIG_CRYPTO_DEFLATE) += deflate.o obj-$(CONFIG_CRYPTO_MICHAEL_MIC) += michael_mic.o +obj-$(CONFIG_CRYPTO_CRC32C) += crc32c.o obj-$(CONFIG_CRYPTO_TEST) += tcrypt.o diff -Nru a/crypto/crc32c.c b/crypto/crc32c.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/crypto/crc32c.c Tue May 4 21:53:36 2004 @@ -0,0 +1,110 @@ +/* + * Cryptographic API. + * + * CRC32C chksum + * + * This module file is a wrapper to invoke the lib/crc32c routines. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + */ +#include +#include +#include +#include +#include +#include + +#define CHKSUM_BLOCK_SIZE 32 +#define CHKSUM_DIGEST_SIZE 4 + +struct chksum_ctx { + u32 crc; +}; + +/* + * Steps through buffer one byte at at time, calculates reflected + * crc using table. + */ + +static void chksum_init(void *ctx) +{ + struct chksum_ctx *mctx = ctx; + + mctx->crc = ~(u32)0; /* common usage */ +} + +/* + * Setting the seed allows arbitrary accumulators and flexible XOR policy + * If your algorithm starts with ~0, then XOR with ~0 before you set + * the seed. + */ +static int chksum_setkey(void *ctx, const u8 *key, unsigned int keylen, + u32 *flags) +{ + struct chksum_ctx *mctx = ctx; + + if (keylen != sizeof(mctx->crc)) { + if (flags) + *flags = CRYPTO_TFM_RES_BAD_KEY_LEN; + return -EINVAL; + } + mctx->crc = __cpu_to_le32(*(u32 *)key); + return 0; +} + +static void chksum_update(void *ctx, const u8 *data, size_t length) +{ + struct chksum_ctx *mctx = ctx; + u32 mcrc; + + mcrc = crc32c(mctx->crc, data, length); + + mctx->crc = mcrc; +} + +static void chksum_final(void *ctx, u8 *out) +{ + struct chksum_ctx *mctx = ctx; + u32 mcrc = (mctx->crc ^ ~(u32)0); + + *(u32 *)out = __le32_to_cpu(mcrc); +} + +static struct crypto_alg alg = { + .cra_name = "crc32c", + .cra_flags = CRYPTO_ALG_TYPE_DIGEST, + .cra_blocksize = CHKSUM_BLOCK_SIZE, + .cra_ctxsize = sizeof(struct chksum_ctx), + .cra_module = THIS_MODULE, + .cra_list = LIST_HEAD_INIT(alg.cra_list), + .cra_u = { + .digest = { + .dia_digestsize= CHKSUM_DIGEST_SIZE, + .dia_setkey = chksum_setkey, + .dia_init = chksum_init, + .dia_update = chksum_update, + .dia_final = chksum_final + } + } +}; + +static int __init init(void) +{ + return crypto_register_alg(&alg); +} + +static void __exit fini(void) +{ + crypto_unregister_alg(&alg); +} + +module_init(init); +module_exit(fini); + +MODULE_AUTHOR("Clay Haapala "); +MODULE_DESCRIPTION("CRC32c (Castagnoli) calculations wrapper for lib/crc32c"); +MODULE_LICENSE("GPL"); diff -Nru a/crypto/tcrypt.c b/crypto/tcrypt.c --- a/crypto/tcrypt.c Tue May 4 21:53:36 2004 +++ b/crypto/tcrypt.c Tue May 4 21:53:36 2004 @@ -61,7 +61,7 @@ static char *check[] = { "des", "md5", "des3_ede", "rot13", "sha1", "sha256", "blowfish", "twofish", "serpent", "sha384", "sha512", "md4", "aes", "cast6", - "arc4", "michael_mic", "deflate", NULL + "arc4", "michael_mic", "deflate", "crc32c", NULL }; static void @@ -496,6 +496,107 @@ } static void +test_crc32c(void) +{ +#define NUMVEC 6 +#define VECSIZE 40 + + int i, j, pass; + u32 crc; + u8 b, test_vec[NUMVEC][VECSIZE]; + static u32 vec_results[NUMVEC] = { + 0x0e2c157f, 0xe980ebf6, 0xde74bded, + 0xd579c862, 0xba979ad0, 0x2b29d913 + }; + static u32 tot_vec_results = 0x24c5d375; + + struct scatterlist sg[NUMVEC]; + struct crypto_tfm *tfm; + char *fmtdata = "testing crc32c initialized to %08x: %s\n"; +#define SEEDTESTVAL 0xedcba987 + u32 seed; + + printk("\ntesting crc32c\n"); + + tfm = crypto_alloc_tfm("crc32c", 0); + if (tfm == NULL) { + printk("failed to load transform for crc32c\n"); + return; + } + + crypto_digest_init(tfm); + crypto_digest_final(tfm, (u8*)&crc); + printk(fmtdata, crc, (crc == 0) ? "pass" : "ERROR"); + + /* + * stuff test_vec with known values, simple incrementing + * byte values. + */ + b = 0; + for (i = 0; i < NUMVEC; i++) { + for (j = 0; j < VECSIZE; j++) + test_vec[i][j] = ++b; + sg[i].page = virt_to_page(test_vec[i]); + sg[i].offset = offset_in_page(test_vec[i]); + sg[i].length = VECSIZE; + } + + seed = SEEDTESTVAL; + (void)crypto_digest_setkey(tfm, (const u8*)&seed, sizeof(u32)); + crypto_digest_final(tfm, (u8*)&crc); + printk("testing crc32c setkey returns %08x : %s\n", crc, (crc == (SEEDTESTVAL ^ ~(u32)0)) ? + "pass" : "ERROR"); + + printk("testing crc32c using update/final:\n"); + + pass = 1; /* assume all is well */ + + for (i = 0; i < NUMVEC; i++) { + seed = ~(u32)0; + (void)crypto_digest_setkey(tfm, (const u8*)&seed, sizeof(u32)); + crypto_digest_update(tfm, &sg[i], 1); + crypto_digest_final(tfm, (u8*)&crc); + if (crc == vec_results[i]) { + printk(" %08x:OK", crc); + } else { + printk(" %08x:BAD, wanted %08x\n", crc, vec_results[i]); + pass = 0; + } + } + + printk("\ntesting crc32c using incremental accumulator:\n"); + crc = 0; + for (i = 0; i < NUMVEC; i++) { + seed = (crc ^ ~(u32)0); + (void)crypto_digest_setkey(tfm, (const u8*)&seed, sizeof(u32)); + crypto_digest_update(tfm, &sg[i], 1); + crypto_digest_final(tfm, (u8*)&crc); + } + if (crc == tot_vec_results) { + printk(" %08x:OK", crc); + } else { + printk(" %08x:BAD, wanted %08x\n", crc, tot_vec_results); + pass = 0; + } + + printk("\ntesting crc32c using digest:\n"); + seed = ~(u32)0; + (void)crypto_digest_setkey(tfm, (const u8*)&seed, sizeof(u32)); + crypto_digest_digest(tfm, sg, NUMVEC, (u8*)&crc); + if (crc == tot_vec_results) { + printk(" %08x:OK", crc); + } else { + printk(" %08x:BAD, wanted %08x\n", crc, tot_vec_results); + pass = 0; + } + + printk("\n%s\n", pass ? "pass" : "ERROR"); + + crypto_free_tfm(tfm); + printk("crc32c test complete\n"); +} + +static void test_available(void) { char **name = check; @@ -566,7 +667,8 @@ test_hash("sha384", sha384_tv_template, SHA384_TEST_VECTORS); test_hash("sha512", sha512_tv_template, SHA512_TEST_VECTORS); - test_deflate(); + test_deflate(); + test_crc32c(); #ifdef CONFIG_CRYPTO_HMAC test_hmac("md5", hmac_md5_tv_template, HMAC_MD5_TEST_VECTORS); test_hmac("sha1", hmac_sha1_tv_template, HMAC_SHA1_TEST_VECTORS); @@ -655,6 +757,10 @@ case 17: test_hash("michael_mic", michael_mic_tv_template, MICHAEL_MIC_TEST_VECTORS); + break; + + case 18: + test_crc32c(); break; #ifdef CONFIG_CRYPTO_HMAC diff -Nru a/drivers/block/as-iosched.c b/drivers/block/as-iosched.c --- a/drivers/block/as-iosched.c Tue May 4 21:53:35 2004 +++ b/drivers/block/as-iosched.c Tue May 4 21:53:35 2004 @@ -914,7 +914,7 @@ /* * Gathers timings and resizes the write batch automatically */ -void update_write_batch(struct as_data *ad) +static void update_write_batch(struct as_data *ad) { unsigned long batch = ad->batch_expire[REQ_ASYNC]; long write_time; @@ -2049,7 +2049,7 @@ .store = as_attr_store, }; -struct kobj_type as_ktype = { +static struct kobj_type as_ktype = { .sysfs_ops = &as_sysfs_ops, .default_attrs = default_attrs, }; diff -Nru a/drivers/cdrom/mcdx.c b/drivers/cdrom/mcdx.c --- a/drivers/cdrom/mcdx.c Tue May 4 21:53:35 2004 +++ b/drivers/cdrom/mcdx.c Tue May 4 21:53:36 2004 @@ -81,10 +81,6 @@ #define mcdx_drive_map mcdx #include "mcdx.h" -#if BITS_PER_LONG != 32 -# error FIXME: this driver only works on 32-bit platforms -#endif - #ifndef HZ #error HZ not defined #endif @@ -189,12 +185,12 @@ #endif /* AK2 */ /* adds and odds */ - void *wreg_data; /* w data */ - void *wreg_reset; /* w hardware reset */ - void *wreg_hcon; /* w hardware conf */ - void *wreg_chn; /* w channel */ - void *rreg_data; /* r data */ - void *rreg_status; /* r status */ + unsigned wreg_data; /* w data */ + unsigned wreg_reset; /* w hardware reset */ + unsigned wreg_hcon; /* w hardware conf */ + unsigned wreg_chn; /* w channel */ + unsigned rreg_data; /* r data */ + unsigned rreg_status; /* r status */ int irq; /* irq used by this drive */ int present; /* drive present and its capabilities */ @@ -274,7 +270,7 @@ static unsigned int msf2log(const struct cdrom_msf0 *); static unsigned int uint2bcd(unsigned int); static unsigned int bcd2uint(unsigned char); -static char *port(int *); +static unsigned port(int *); static int irq(int *); static void mcdx_delay(struct s_drive_stuff *, long jifs); static int mcdx_transfer(struct s_drive_stuff *, char *buf, int sector, @@ -868,7 +864,7 @@ #endif /* AK2 */ /* get the interrupt status */ - b = inb((unsigned int) stuffp->rreg_status); + b = inb(stuffp->rreg_status); stuffp->introk = ~b & MCDX_RBIT_DTEN; /* NOTE: We only should get interrupts if the data we @@ -882,7 +878,7 @@ xtrace(IRQ, "intr() irq %d hw status 0x%02x\n", irq, b); if (~b & MCDX_RBIT_STEN) { xinfo("intr() irq %d status 0x%02x\n", - irq, inb((unsigned int) stuffp->rreg_data)); + irq, inb(stuffp->rreg_data)); } else { xinfo("intr() irq %d ambiguous hw status\n", irq); } @@ -945,7 +941,7 @@ char *bp = (char *) buffer; size_t sz = size; - outsb((unsigned int) stuffp->wreg_data, cmd, cmdlen); + outsb(stuffp->wreg_data, cmd, cmdlen); xtrace(TALK, "talk() command sent\n"); /* get the status byte */ @@ -1049,8 +1045,7 @@ continue; } put_disk(stuffp->disk); - release_region((unsigned long) stuffp->wreg_data, - MCDX_IO_SIZE); + release_region(stuffp->wreg_data, MCDX_IO_SIZE); free_irq(stuffp->irq, NULL); if (stuffp->toc) { xtrace(MALLOC, "cleanup_module() free toc @ %p\n", @@ -1116,8 +1111,7 @@ /* setup our irq and i/o addresses */ stuffp->irq = irq(mcdx_drive_map[drive]); - stuffp->wreg_data = stuffp->rreg_data = - port(mcdx_drive_map[drive]); + stuffp->wreg_data = stuffp->rreg_data = port(mcdx_drive_map[drive]); stuffp->wreg_reset = stuffp->rreg_status = stuffp->wreg_data + 1; stuffp->wreg_hcon = stuffp->wreg_reset + 1; stuffp->wreg_chn = stuffp->wreg_hcon + 1; @@ -1127,10 +1121,9 @@ init_waitqueue_head(&stuffp->sleepq); /* check if i/o addresses are available */ - if (!request_region((unsigned int) stuffp->wreg_data, MCDX_IO_SIZE, - "mcdx")) { - xwarn("0x%3p,%d: Init failed. " - "I/O ports (0x%3p..0x%3p) already in use.\n", + if (!request_region(stuffp->wreg_data, MCDX_IO_SIZE, "mcdx")) { + xwarn("0x%03x,%d: Init failed. " + "I/O ports (0x%03x..0x%03x) already in use.\n", stuffp->wreg_data, stuffp->irq, stuffp->wreg_data, stuffp->wreg_data + MCDX_IO_SIZE - 1); @@ -1141,7 +1134,7 @@ return 0; /* next drive */ } - xtrace(INIT, "init() i/o port is available at 0x%3p\n", + xtrace(INIT, "init() i/o port is available at 0x%03x\n" stuffp->wreg_data); xtrace(INIT, "init() hardware reset\n"); mcdx_reset(stuffp, HARD, 1); @@ -1149,9 +1142,8 @@ xtrace(INIT, "init() get version\n"); if (-1 == mcdx_requestversion(stuffp, &version, 4)) { /* failed, next drive */ - release_region((unsigned long) stuffp->wreg_data, - MCDX_IO_SIZE); - xwarn("%s=0x%3p,%d: Init failed. Can't get version.\n", + release_region(stuffp->wreg_data, MCDX_IO_SIZE); + xwarn("%s=0x%03x,%d: Init failed. Can't get version.\n", MCDX, stuffp->wreg_data, stuffp->irq); xtrace(MALLOC, "init() free stuffp @ %p\n", stuffp); kfree(stuffp); @@ -1181,9 +1173,8 @@ stuffp->playcmd = READ1X; if (!stuffp->present) { - release_region((unsigned long) stuffp->wreg_data, - MCDX_IO_SIZE); - xwarn("%s=0x%3p,%d: Init failed. No Mitsumi CD-ROM?.\n", + release_region(stuffp->wreg_data, MCDX_IO_SIZE); + xwarn("%s=0x%03x,%d: Init failed. No Mitsumi CD-ROM?.\n", MCDX, stuffp->wreg_data, stuffp->irq); kfree(stuffp); put_disk(disk); @@ -1192,8 +1183,7 @@ xtrace(INIT, "init() register blkdev\n"); if (register_blkdev(MAJOR_NR, "mcdx")) { - release_region((unsigned long) stuffp->wreg_data, - MCDX_IO_SIZE); + release_region(stuffp->wreg_data, MCDX_IO_SIZE); kfree(stuffp); put_disk(disk); return 1; @@ -1202,8 +1192,7 @@ mcdx_queue = blk_init_queue(do_mcdx_request, &mcdx_lock); if (!mcdx_queue) { unregister_blkdev(MAJOR_NR, "mcdx"); - release_region((unsigned long) stuffp->wreg_data, - MCDX_IO_SIZE); + release_region(stuffp->wreg_data, MCDX_IO_SIZE); kfree(stuffp); put_disk(disk); return 1; @@ -1212,9 +1201,8 @@ xtrace(INIT, "init() subscribe irq and i/o\n"); mcdx_irq_map[stuffp->irq] = stuffp; if (request_irq(stuffp->irq, mcdx_intr, SA_INTERRUPT, "mcdx", NULL)) { - release_region((unsigned long) stuffp->wreg_data, - MCDX_IO_SIZE); - xwarn("%s=0x%3p,%d: Init failed. Can't get irq (%d).\n", + release_region(stuffp->wreg_data, MCDX_IO_SIZE); + xwarn("%s=0x%03x,%d: Init failed. Can't get irq (%d).\n", MCDX, stuffp->wreg_data, stuffp->irq, stuffp->irq); stuffp->irq = 0; blk_cleanup_queue(mcdx_queue); @@ -1228,13 +1216,13 @@ int i; mcdx_delay(stuffp, HZ / 2); for (i = 100; i; i--) - (void) inb((unsigned int) stuffp->rreg_status); + (void) inb(stuffp->rreg_status); } #if WE_KNOW_WHY /* irq 11 -> channel register */ - outb(0x50, (unsigned int) stuffp->wreg_chn); + outb(0x50, stuffp->wreg_chn); #endif xtrace(INIT, "init() set non dma but irq mode\n"); @@ -1252,15 +1240,14 @@ disk->flags = GENHD_FL_CD; stuffp->disk = disk; - sprintf(msg, " mcdx: Mitsumi CD-ROM installed at 0x%3p, irq %d." + sprintf(msg, " mcdx: Mitsumi CD-ROM installed at 0x%03x, irq %d." " (Firmware version %c %x)\n", stuffp->wreg_data, stuffp->irq, version.code, version.ver); mcdx_stuffp[drive] = stuffp; xtrace(INIT, "init() mcdx_stuffp[%d] = %p\n", drive, stuffp); if (register_cdrom(&stuffp->info) != 0) { printk("Cannot register Mitsumi CD-ROM!\n"); - release_region((unsigned long) stuffp->wreg_data, - MCDX_IO_SIZE); + release_region(stuffp->wreg_data, MCDX_IO_SIZE); free_irq(stuffp->irq, NULL); kfree(stuffp); put_disk(disk); @@ -1413,19 +1400,17 @@ const int HEAD = CD_FRAMESIZE_RAW - CD_XA_TAIL - CD_FRAMESIZE; - insb((unsigned int) stuffp->rreg_data, p, - HEAD); + insb(stuffp->rreg_data, p, HEAD); } /* now actually read the data */ - insb((unsigned int) stuffp->rreg_data, p, 512); + insb(stuffp->rreg_data, p, 512); /* test if it's the last sector of a block, * if so, we have to handle XA special */ if ((3 == (stuffp->pending & 3)) && stuffp->xa) { char dummy[CD_XA_TAIL]; - insb((unsigned int) stuffp->rreg_data, - &dummy[0], CD_XA_TAIL); + insb(stuffp->rreg_data, &dummy[0], CD_XA_TAIL); } if (stuffp->pending == sector) { @@ -1493,7 +1478,7 @@ stuffp->busy = 1; /* Now really issue the request command */ - outsb((unsigned int) stuffp->wreg_data, cmd, sizeof cmd); + outsb(stuffp->wreg_data, cmd, sizeof cmd); } #ifdef AK2 @@ -1514,9 +1499,9 @@ /* Access to elements of the mcdx_drive_map members */ -static char *port(int *ip) +static unsigned port(int *ip) { - return (char *) ip[0]; + return ip[0]; } static int irq(int *ip) { @@ -1682,7 +1667,7 @@ "%02x:%02x:%02x -- %02x:%02x:%02x\n", cmd[0], cmd[1], cmd[2], cmd[3], cmd[4], cmd[5], cmd[6]); - outsb((unsigned int) stuffp->wreg_data, cmd, sizeof cmd); + outsb(stuffp->wreg_data, cmd, sizeof cmd); if (-1 == mcdx_getval(stuffp, 3 * HZ, 0, NULL)) { xwarn("playmsf() timeout\n"); @@ -1910,8 +1895,8 @@ static int mcdx_reset(struct s_drive_stuff *stuffp, enum resetmodes mode, int tries) { if (mode == HARD) { - outb(0, (unsigned int) stuffp->wreg_chn); /* no dma, no irq -> hardware */ - outb(0, (unsigned int) stuffp->wreg_reset); /* hw reset */ + outb(0, stuffp->wreg_chn); /* no dma, no irq -> hardware */ + outb(0, stuffp->wreg_reset); /* hw reset */ return 0; } else return mcdx_talk(stuffp, "\x60", 1, NULL, 1, 5 * HZ, tries); @@ -1945,13 +1930,13 @@ if (!buf) buf = &c; - while (inb((unsigned int) stuffp->rreg_status) & MCDX_RBIT_STEN) { + while (inb(stuffp->rreg_status) & MCDX_RBIT_STEN) { if (time_after(jiffies, timeout)) return -1; mcdx_delay(stuffp, delay); } - *buf = (unsigned char) inb((unsigned int) stuffp->rreg_data) & 0xff; + *buf = (unsigned char) inb(stuffp->rreg_data) & 0xff; return 0; } diff -Nru a/drivers/char/ftape/lowlevel/ftape-bsm.c b/drivers/char/ftape/lowlevel/ftape-bsm.c --- a/drivers/char/ftape/lowlevel/ftape-bsm.c Tue May 4 21:53:35 2004 +++ b/drivers/char/ftape/lowlevel/ftape-bsm.c Tue May 4 21:53:35 2004 @@ -203,6 +203,7 @@ ft_format_code == fmt_1100ft) { SectorCount *ptr = (SectorCount *)bad_sector_map; unsigned int sector; + __u16 *ptr16; while((sector = get_sector(ptr++)) != 0) { if ((ft_format_code == fmt_big || @@ -218,9 +219,10 @@ } /* Display old ftape's end-of-file marks */ - while ((sector = get_unaligned(((__u16*)ptr)++)) != 0) { + ptr16 = (__u16*)ptr; + while ((sector = get_unaligned(ptr16++)) != 0) { TRACE(ft_t_noise, "Old ftape eof mark: %4d/%2d", - sector, get_unaligned(((__u16*)ptr)++)); + sector, get_unaligned(ptr16++)); } } else { /* fixed size format */ for (i = ft_first_data_segment; diff -Nru a/drivers/char/ftape/lowlevel/ftape-bsm.h b/drivers/char/ftape/lowlevel/ftape-bsm.h --- a/drivers/char/ftape/lowlevel/ftape-bsm.h Tue May 4 21:53:35 2004 +++ b/drivers/char/ftape/lowlevel/ftape-bsm.h Tue May 4 21:53:35 2004 @@ -47,7 +47,7 @@ */ typedef struct NewSectorMap { __u8 bytes[3]; -} SectorCount __attribute__((packed)); +} SectorCount; /* diff -Nru a/drivers/char/ftape/zftape/zftape-eof.c b/drivers/char/ftape/zftape/zftape-eof.c --- a/drivers/char/ftape/zftape/zftape-eof.c Tue May 4 21:53:36 2004 +++ b/drivers/char/ftape/zftape/zftape-eof.c Tue May 4 21:53:36 2004 @@ -123,7 +123,7 @@ while (ptr + 3 < limit) { if (get_unaligned((__u32*)ptr)) { - ++(__u32*)ptr; + ptr += sizeof(__u32); } else { return ptr; } diff -Nru a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c --- a/drivers/firmware/efivars.c Tue May 4 21:53:36 2004 +++ b/drivers/firmware/efivars.c Tue May 4 21:53:36 2004 @@ -633,7 +633,6 @@ *(short_name + strlen(short_name)) = '-'; efi_guid_unparse(vendor_guid, short_name + strlen(short_name)); - *(short_name + strlen(short_name)) = ' '; kobject_set_name(&new_efivar->kobj, short_name); kobj_set_kset_s(new_efivar, vars_subsys); diff -Nru a/drivers/ide/ide.c b/drivers/ide/ide.c --- a/drivers/ide/ide.c Tue May 4 21:53:35 2004 +++ b/drivers/ide/ide.c Tue May 4 21:53:35 2004 @@ -307,8 +307,10 @@ hwif = &ide_hwifs[index]; init_hwif_data(hwif, index); init_hwif_default(hwif, index); +#if !defined(CONFIG_PPC32) || !defined(CONFIG_PCI) hwif->irq = hwif->hw.irq = ide_init_default_irq(hwif->io_ports[IDE_DATA_OFFSET]); +#endif } /* OBSOLETE: still needed on arm26 and arm */ diff -Nru a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c --- a/drivers/ide/pci/serverworks.c Tue May 4 21:53:35 2004 +++ b/drivers/ide/pci/serverworks.c Tue May 4 21:53:35 2004 @@ -472,7 +472,9 @@ int dma = config_chipset_for_dma(drive); if ((id->field_valid & 2) && !dma) goto try_dma_modes; - } + } else + /* UDMA disabled by mask, try other DMA modes */ + goto try_dma_modes; } else if (id->field_valid & 2) { try_dma_modes: if ((id->dma_mword & hwif->mwdma_mask) || diff -Nru a/drivers/input/serio/Kconfig b/drivers/input/serio/Kconfig --- a/drivers/input/serio/Kconfig Tue May 4 21:53:36 2004 +++ b/drivers/input/serio/Kconfig Tue May 4 21:53:36 2004 @@ -80,7 +80,7 @@ config SERIO_RPCKBD tristate "Acorn RiscPC keyboard controller" - depends on ARCH_ACORN && SERIO + depends on (ARCH_ACORN || ARCH_CLPS7500) && SERIO default y help Say Y here if you have the Acorn RiscPC and want to use an AT @@ -91,7 +91,7 @@ config SERIO_AMBAKMI tristate "AMBA KMI keyboard controller" - depends on ARCH_INTEGRATOR && SERIO + depends on ARM_AMBA && SERIO config SERIO_SA1111 tristate "Intel SA1111 keyboard controller" diff -Nru a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c --- a/drivers/isdn/capi/capi.c Tue May 4 21:53:36 2004 +++ b/drivers/isdn/capi/capi.c Tue May 4 21:53:36 2004 @@ -1,4 +1,4 @@ -/* $Id: capi.c,v 1.1.2.6 2004/04/26 09:33:07 armin Exp $ +/* $Id: capi.c,v 1.1.2.7 2004/04/28 09:48:59 armin Exp $ * * CAPI 2.0 Interface for Linux * @@ -45,7 +45,7 @@ #include "capifs.h" #endif -static char *revision = "$Revision: 1.1.2.6 $"; +static char *revision = "$Revision: 1.1.2.7 $"; MODULE_DESCRIPTION("CAPI4Linux: Userspace /dev/capi20 interface"); MODULE_AUTHOR("Carsten Paeth"); @@ -927,8 +927,8 @@ if ((mp = nccip->minorp) != 0) { count += atomic_read(&mp->ttyopencount); } - up(&cdev->ncci_list_sem); #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ + up(&cdev->ncci_list_sem); return count; } return 0; diff -Nru a/drivers/media/dvb/dvb-core/dvb_net.c b/drivers/media/dvb/dvb-core/dvb_net.c --- a/drivers/media/dvb/dvb-core/dvb_net.c Tue May 4 21:53:35 2004 +++ b/drivers/media/dvb/dvb-core/dvb_net.c Tue May 4 21:53:35 2004 @@ -1095,9 +1095,15 @@ if (!capable(CAP_SYS_ADMIN)) return -EPERM; + + if (!try_module_get(dvbdev->adapter->module)) + return -EPERM; + result=dvb_net_add_if(dvbnet, dvbnetif->pid, dvbnetif->feedtype); - if (result<0) + if (result<0) { + module_put(dvbdev->adapter->module); return result; + } dvbnetif->if_num=result; break; } @@ -1120,6 +1126,7 @@ case NET_REMOVE_IF: if (!capable(CAP_SYS_ADMIN)) return -EPERM; + module_put(dvbdev->adapter->module); return dvb_net_remove_if(dvbnet, (int) (long) parg); /* binary compatiblity cruft */ @@ -1130,9 +1137,15 @@ if (!capable(CAP_SYS_ADMIN)) return -EPERM; + + if (!try_module_get(dvbdev->adapter->module)) + return -EPERM; + result=dvb_net_add_if(dvbnet, dvbnetif->pid, DVB_NET_FEEDTYPE_MPE); - if (result<0) + if (result<0) { + module_put(dvbdev->adapter->module); return result; + } dvbnetif->if_num=result; break; } diff -Nru a/drivers/mtd/maps/lubbock-flash.c b/drivers/mtd/maps/lubbock-flash.c --- a/drivers/mtd/maps/lubbock-flash.c Tue May 4 21:53:36 2004 +++ b/drivers/mtd/maps/lubbock-flash.c Tue May 4 21:53:36 2004 @@ -60,7 +60,7 @@ static int __init init_lubbock(void) { - int flashboot = (CONF_SWITCHES & 1); + int flashboot = (LUB_CONF_SWITCHES & 1); int ret = 0, i; lubbock_maps[0].buswidth = lubbock_maps[1].buswidth = diff -Nru a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c --- a/drivers/mtd/mtdconcat.c Tue May 4 21:53:36 2004 +++ b/drivers/mtd/mtdconcat.c Tue May 4 21:53:36 2004 @@ -7,7 +7,7 @@ * * This code is GPL * - * $Id: mtdconcat.c,v 1.4 2003/03/07 17:44:59 rkaiser Exp $ + * $Id: mtdconcat.c,v 1.8 2003/06/30 11:01:26 dwmw2 Exp $ */ #include @@ -26,7 +26,7 @@ */ struct mtd_concat { struct mtd_info mtd; - int num_subdev; + int num_subdev; struct mtd_info **subdev; }; @@ -37,21 +37,20 @@ #define SIZEOF_STRUCT_MTD_CONCAT(num_subdev) \ ((sizeof(struct mtd_concat) + (num_subdev) * sizeof(struct mtd_info *))) - /* * Given a pointer to the MTD object in the mtd_concat structure, * we can retrieve the pointer to that structure with this macro. */ #define CONCAT(x) ((struct mtd_concat *)(x)) - /* * MTD methods which look up the relevant subdevice, translate the * effective address and pass through to the subdevice. */ -static int concat_read (struct mtd_info *mtd, loff_t from, size_t len, - size_t *retlen, u_char *buf) +static int +concat_read(struct mtd_info *mtd, loff_t from, size_t len, + size_t * retlen, u_char * buf) { struct mtd_concat *concat = CONCAT(mtd); int err = -EINVAL; @@ -59,43 +58,43 @@ *retlen = 0; - for(i = 0; i < concat->num_subdev; i++) - { + for (i = 0; i < concat->num_subdev; i++) { struct mtd_info *subdev = concat->subdev[i]; size_t size, retsize; - if (from >= subdev->size) - { /* Not destined for this subdev */ - size = 0; + if (from >= subdev->size) { + /* Not destined for this subdev */ + size = 0; from -= subdev->size; + continue; } + if (from + len > subdev->size) + /* First part goes into this subdev */ + size = subdev->size - from; else - { - if (from + len > subdev->size) - size = subdev->size - from; /* First part goes into this subdev */ - else - size = len; /* Entire transaction goes into this subdev */ - - err = subdev->read(subdev, from, size, &retsize, buf); - - if(err) - break; - - *retlen += retsize; - len -= size; - if(len == 0) - break; + /* Entire transaction goes into this subdev */ + size = len; - err = -EINVAL; - buf += size; - from = 0; - } + err = subdev->read(subdev, from, size, &retsize, buf); + + if (err) + break; + + *retlen += retsize; + len -= size; + if (len == 0) + break; + + err = -EINVAL; + buf += size; + from = 0; } return err; } -static int concat_write (struct mtd_info *mtd, loff_t to, size_t len, - size_t *retlen, const u_char *buf) +static int +concat_write(struct mtd_info *mtd, loff_t to, size_t len, + size_t * retlen, const u_char * buf) { struct mtd_concat *concat = CONCAT(mtd); int err = -EINVAL; @@ -106,46 +105,44 @@ *retlen = 0; - for(i = 0; i < concat->num_subdev; i++) - { + for (i = 0; i < concat->num_subdev; i++) { struct mtd_info *subdev = concat->subdev[i]; size_t size, retsize; - if (to >= subdev->size) - { - size = 0; + if (to >= subdev->size) { + size = 0; to -= subdev->size; + continue; } + if (to + len > subdev->size) + size = subdev->size - to; else - { - if (to + len > subdev->size) - size = subdev->size - to; - else - size = len; - - if (!(subdev->flags & MTD_WRITEABLE)) - err = -EROFS; - else - err = subdev->write(subdev, to, size, &retsize, buf); - - if(err) - break; - - *retlen += retsize; - len -= size; - if(len == 0) - break; + size = len; - err = -EINVAL; - buf += size; - to = 0; - } + if (!(subdev->flags & MTD_WRITEABLE)) + err = -EROFS; + else + err = subdev->write(subdev, to, size, &retsize, buf); + + if (err) + break; + + *retlen += retsize; + len -= size; + if (len == 0) + break; + + err = -EINVAL; + buf += size; + to = 0; } return err; } -static int concat_read_ecc (struct mtd_info *mtd, loff_t from, size_t len, - size_t *retlen, u_char *buf, u_char *eccbuf, struct nand_oobinfo *oobsel) +static int +concat_read_ecc(struct mtd_info *mtd, loff_t from, size_t len, + size_t * retlen, u_char * buf, u_char * eccbuf, + struct nand_oobinfo *oobsel) { struct mtd_concat *concat = CONCAT(mtd); int err = -EINVAL; @@ -153,53 +150,56 @@ *retlen = 0; - for(i = 0; i < concat->num_subdev; i++) - { + for (i = 0; i < concat->num_subdev; i++) { struct mtd_info *subdev = concat->subdev[i]; size_t size, retsize; - - if (from >= subdev->size) - { /* Not destined for this subdev */ - size = 0; + + if (from >= subdev->size) { + /* Not destined for this subdev */ + size = 0; from -= subdev->size; + continue; } + + if (from + len > subdev->size) + /* First part goes into this subdev */ + size = subdev->size - from; else - { - if (from + len > subdev->size) - size = subdev->size - from; /* First part goes into this subdev */ - else - size = len; /* Entire transaction goes into this subdev */ - - if (subdev->read_ecc) - err = subdev->read_ecc(subdev, from, size, &retsize, buf, eccbuf, oobsel); - else - err = -EINVAL; - - if(err) - break; - - *retlen += retsize; - len -= size; - if(len == 0) - break; + /* Entire transaction goes into this subdev */ + size = len; + if (subdev->read_ecc) + err = subdev->read_ecc(subdev, from, size, + &retsize, buf, eccbuf, oobsel); + else err = -EINVAL; - buf += size; - if (eccbuf) - { - eccbuf += subdev->oobsize; - /* in nand.c at least, eccbufs are tagged with 2 (int)eccstatus', - we must account for these */ - eccbuf += 2 * (sizeof(int)); - } - from = 0; + + if (err) + break; + + *retlen += retsize; + len -= size; + if (len == 0) + break; + + err = -EINVAL; + buf += size; + if (eccbuf) { + eccbuf += subdev->oobsize; + /* in nand.c at least, eccbufs are + tagged with 2 (int)eccstatus'; we + must account for these */ + eccbuf += 2 * (sizeof (int)); } + from = 0; } return err; } -static int concat_write_ecc (struct mtd_info *mtd, loff_t to, size_t len, - size_t *retlen, const u_char *buf, u_char *eccbuf, struct nand_oobinfo *oobsel) +static int +concat_write_ecc(struct mtd_info *mtd, loff_t to, size_t len, + size_t * retlen, const u_char * buf, u_char * eccbuf, + struct nand_oobinfo *oobsel) { struct mtd_concat *concat = CONCAT(mtd); int err = -EINVAL; @@ -210,50 +210,48 @@ *retlen = 0; - for(i = 0; i < concat->num_subdev; i++) - { + for (i = 0; i < concat->num_subdev; i++) { struct mtd_info *subdev = concat->subdev[i]; size_t size, retsize; - - if (to >= subdev->size) - { - size = 0; + + if (to >= subdev->size) { + size = 0; to -= subdev->size; + continue; } + if (to + len > subdev->size) + size = subdev->size - to; else - { - if (to + len > subdev->size) - size = subdev->size - to; - else - size = len; - - if (!(subdev->flags & MTD_WRITEABLE)) - err = -EROFS; - else if (subdev->write_ecc) - err = subdev->write_ecc(subdev, to, size, &retsize, buf, eccbuf, oobsel); - else - err = -EINVAL; - - if(err) - break; - - *retlen += retsize; - len -= size; - if(len == 0) - break; + size = len; + if (!(subdev->flags & MTD_WRITEABLE)) + err = -EROFS; + else if (subdev->write_ecc) + err = subdev->write_ecc(subdev, to, size, + &retsize, buf, eccbuf, oobsel); + else err = -EINVAL; - buf += size; - if (eccbuf) - eccbuf += subdev->oobsize; - to = 0; - } + + if (err) + break; + + *retlen += retsize; + len -= size; + if (len == 0) + break; + + err = -EINVAL; + buf += size; + if (eccbuf) + eccbuf += subdev->oobsize; + to = 0; } return err; } -static int concat_read_oob (struct mtd_info *mtd, loff_t from, size_t len, - size_t *retlen, u_char *buf) +static int +concat_read_oob(struct mtd_info *mtd, loff_t from, size_t len, + size_t * retlen, u_char * buf) { struct mtd_concat *concat = CONCAT(mtd); int err = -EINVAL; @@ -261,46 +259,47 @@ *retlen = 0; - for(i = 0; i < concat->num_subdev; i++) - { + for (i = 0; i < concat->num_subdev; i++) { struct mtd_info *subdev = concat->subdev[i]; size_t size, retsize; - - if (from >= subdev->size) - { /* Not destined for this subdev */ - size = 0; + + if (from >= subdev->size) { + /* Not destined for this subdev */ + size = 0; from -= subdev->size; + continue; } + if (from + len > subdev->size) + /* First part goes into this subdev */ + size = subdev->size - from; + else + /* Entire transaction goes into this subdev */ + size = len; + + if (subdev->read_oob) + err = subdev->read_oob(subdev, from, size, + &retsize, buf); else - { - if (from + len > subdev->size) - size = subdev->size - from; /* First part goes into this subdev */ - else - size = len; /* Entire transaction goes into this subdev */ - - if (subdev->read_oob) - err = subdev->read_oob(subdev, from, size, &retsize, buf); - else - err = -EINVAL; - - if(err) - break; - - *retlen += retsize; - len -= size; - if(len == 0) - break; - err = -EINVAL; - buf += size; - from = 0; - } + + if (err) + break; + + *retlen += retsize; + len -= size; + if (len == 0) + break; + + err = -EINVAL; + buf += size; + from = 0; } return err; } -static int concat_write_oob (struct mtd_info *mtd, loff_t to, size_t len, - size_t *retlen, const u_char *buf) +static int +concat_write_oob(struct mtd_info *mtd, loff_t to, size_t len, + size_t * retlen, const u_char * buf) { struct mtd_concat *concat = CONCAT(mtd); int err = -EINVAL; @@ -311,50 +310,46 @@ *retlen = 0; - for(i = 0; i < concat->num_subdev; i++) - { + for (i = 0; i < concat->num_subdev; i++) { struct mtd_info *subdev = concat->subdev[i]; size_t size, retsize; - - if (to >= subdev->size) - { - size = 0; + + if (to >= subdev->size) { + size = 0; to -= subdev->size; + continue; } + if (to + len > subdev->size) + size = subdev->size - to; else - { - if (to + len > subdev->size) - size = subdev->size - to; - else - size = len; - - if (!(subdev->flags & MTD_WRITEABLE)) - err = -EROFS; - else if (subdev->write_oob) - err = subdev->write_oob(subdev, to, size, &retsize, buf); - else - err = -EINVAL; - - if(err) - break; - - *retlen += retsize; - len -= size; - if(len == 0) - break; + size = len; + if (!(subdev->flags & MTD_WRITEABLE)) + err = -EROFS; + else if (subdev->write_oob) + err = subdev->write_oob(subdev, to, size, &retsize, + buf); + else err = -EINVAL; - buf += size; - to = 0; - } + + if (err) + break; + + *retlen += retsize; + len -= size; + if (len == 0) + break; + + err = -EINVAL; + buf += size; + to = 0; } return err; } - -static void concat_erase_callback (struct erase_info *instr) +static void concat_erase_callback(struct erase_info *instr) { - wake_up((wait_queue_head_t *)instr->priv); + wake_up((wait_queue_head_t *) instr->priv); } static int concat_dev_erase(struct mtd_info *mtd, struct erase_info *erase) @@ -370,18 +365,18 @@ erase->mtd = mtd; erase->callback = concat_erase_callback; - erase->priv = (unsigned long)&waitq; - + erase->priv = (unsigned long) &waitq; + /* * FIXME: Allow INTERRUPTIBLE. Which means * not having the wait_queue head on the stack. */ err = mtd->erase(mtd, erase); - if (!err) - { + if (!err) { set_current_state(TASK_UNINTERRUPTIBLE); add_wait_queue(&waitq, &wait); - if (erase->state != MTD_ERASE_DONE && erase->state != MTD_ERASE_FAILED) + if (erase->state != MTD_ERASE_DONE + && erase->state != MTD_ERASE_FAILED) schedule(); remove_wait_queue(&waitq, &wait); set_current_state(TASK_RUNNING); @@ -391,7 +386,7 @@ return err; } -static int concat_erase (struct mtd_info *mtd, struct erase_info *instr) +static int concat_erase(struct mtd_info *mtd, struct erase_info *instr) { struct mtd_concat *concat = CONCAT(mtd); struct mtd_info *subdev; @@ -402,10 +397,10 @@ if (!(mtd->flags & MTD_WRITEABLE)) return -EROFS; - if(instr->addr > concat->mtd.size) + if (instr->addr > concat->mtd.size) return -EINVAL; - if(instr->len + instr->addr > concat->mtd.size) + if (instr->len + instr->addr > concat->mtd.size) return -EINVAL; /* @@ -414,23 +409,22 @@ * region info rather than looking at each particular sub-device * in turn. */ - if (!concat->mtd.numeraseregions) - { /* the easy case: device has uniform erase block size */ - if(instr->addr & (concat->mtd.erasesize - 1)) + if (!concat->mtd.numeraseregions) { + /* the easy case: device has uniform erase block size */ + if (instr->addr & (concat->mtd.erasesize - 1)) return -EINVAL; - if(instr->len & (concat->mtd.erasesize - 1)) + if (instr->len & (concat->mtd.erasesize - 1)) return -EINVAL; - } - else - { /* device has variable erase size */ - struct mtd_erase_region_info *erase_regions = concat->mtd.eraseregions; + } else { + /* device has variable erase size */ + struct mtd_erase_region_info *erase_regions = + concat->mtd.eraseregions; /* * Find the erase region where the to-be-erased area begins: */ - for(i = 0; i < concat->mtd.numeraseregions && - instr->addr >= erase_regions[i].offset; i++) - ; + for (i = 0; i < concat->mtd.numeraseregions && + instr->addr >= erase_regions[i].offset; i++) ; --i; /* @@ -438,25 +432,26 @@ * to-be-erased area begins. Verify that the starting * offset is aligned to this region's erase size: */ - if (instr->addr & (erase_regions[i].erasesize-1)) + if (instr->addr & (erase_regions[i].erasesize - 1)) return -EINVAL; /* * now find the erase region where the to-be-erased area ends: */ - for(; i < concat->mtd.numeraseregions && - (instr->addr + instr->len) >= erase_regions[i].offset ; ++i) - ; + for (; i < concat->mtd.numeraseregions && + (instr->addr + instr->len) >= erase_regions[i].offset; + ++i) ; --i; /* * check if the ending offset is aligned to this region's erase size */ - if ((instr->addr + instr->len) & (erase_regions[i].erasesize-1)) + if ((instr->addr + instr->len) & (erase_regions[i].erasesize - + 1)) return -EINVAL; } /* make a local copy of instr to avoid modifying the caller's struct */ - erase = kmalloc(sizeof(struct erase_info),GFP_KERNEL); + erase = kmalloc(sizeof (struct erase_info), GFP_KERNEL); if (!erase) return -ENOMEM; @@ -468,39 +463,40 @@ * find the subdevice where the to-be-erased area begins, adjust * starting offset to be relative to the subdevice start */ - for(i = 0; i < concat->num_subdev; i++) - { + for (i = 0; i < concat->num_subdev; i++) { subdev = concat->subdev[i]; - if(subdev->size <= erase->addr) + if (subdev->size <= erase->addr) erase->addr -= subdev->size; else break; - } - if(i >= concat->num_subdev) /* must never happen since size */ - BUG(); /* limit has been verified above */ + } + + /* must never happen since size limit has been verified above */ + if (i >= concat->num_subdev) + BUG(); /* now do the erase: */ err = 0; - for(;length > 0; i++) /* loop for all subevices affected by this request */ - { - subdev = concat->subdev[i]; /* get current subdevice */ + for (; length > 0; i++) { + /* loop for all subdevices affected by this request */ + subdev = concat->subdev[i]; /* get current subdevice */ /* limit length to subdevice's size: */ - if(erase->addr + length > subdev->size) + if (erase->addr + length > subdev->size) erase->len = subdev->size - erase->addr; else erase->len = length; - if (!(subdev->flags & MTD_WRITEABLE)) - { + if (!(subdev->flags & MTD_WRITEABLE)) { err = -EROFS; break; } length -= erase->len; - if ((err = concat_dev_erase(subdev, erase))) - { - if(err == -EINVAL) /* sanity check: must never happen since */ - BUG(); /* block alignment has been checked above */ + if ((err = concat_dev_erase(subdev, erase))) { + /* sanity check: should never happen since + * block alignment has been checked above */ + if (err == -EINVAL) + BUG(); break; } /* @@ -523,85 +519,79 @@ return 0; } -static int concat_lock (struct mtd_info *mtd, loff_t ofs, size_t len) +static int concat_lock(struct mtd_info *mtd, loff_t ofs, size_t len) { struct mtd_concat *concat = CONCAT(mtd); int i, err = -EINVAL; - if ((len + ofs) > mtd->size) + if ((len + ofs) > mtd->size) return -EINVAL; - for(i = 0; i < concat->num_subdev; i++) - { + for (i = 0; i < concat->num_subdev; i++) { struct mtd_info *subdev = concat->subdev[i]; size_t size; - if (ofs >= subdev->size) - { - size = 0; + if (ofs >= subdev->size) { + size = 0; ofs -= subdev->size; + continue; } + if (ofs + len > subdev->size) + size = subdev->size - ofs; else - { - if (ofs + len > subdev->size) - size = subdev->size - ofs; - else - size = len; - - err = subdev->lock(subdev, ofs, size); - - if(err) - break; - - len -= size; - if(len == 0) - break; + size = len; - err = -EINVAL; - ofs = 0; - } + err = subdev->lock(subdev, ofs, size); + + if (err) + break; + + len -= size; + if (len == 0) + break; + + err = -EINVAL; + ofs = 0; } + return err; } -static int concat_unlock (struct mtd_info *mtd, loff_t ofs, size_t len) +static int concat_unlock(struct mtd_info *mtd, loff_t ofs, size_t len) { struct mtd_concat *concat = CONCAT(mtd); int i, err = 0; - if ((len + ofs) > mtd->size) + if ((len + ofs) > mtd->size) return -EINVAL; - for(i = 0; i < concat->num_subdev; i++) - { + for (i = 0; i < concat->num_subdev; i++) { struct mtd_info *subdev = concat->subdev[i]; size_t size; - if (ofs >= subdev->size) - { - size = 0; + if (ofs >= subdev->size) { + size = 0; ofs -= subdev->size; + continue; } + if (ofs + len > subdev->size) + size = subdev->size - ofs; else - { - if (ofs + len > subdev->size) - size = subdev->size - ofs; - else - size = len; - - err = subdev->unlock(subdev, ofs, size); - - if(err) - break; - - len -= size; - if(len == 0) - break; + size = len; - err = -EINVAL; - ofs = 0; - } + err = subdev->unlock(subdev, ofs, size); + + if (err) + break; + + len -= size; + if (len == 0) + break; + + err = -EINVAL; + ofs = 0; } + return err; } @@ -610,8 +600,7 @@ struct mtd_concat *concat = CONCAT(mtd); int i; - for(i = 0; i < concat->num_subdev; i++) - { + for (i = 0; i < concat->num_subdev; i++) { struct mtd_info *subdev = concat->subdev[i]; subdev->sync(subdev); } @@ -622,10 +611,9 @@ struct mtd_concat *concat = CONCAT(mtd); int i, rc = 0; - for(i = 0; i < concat->num_subdev; i++) - { + for (i = 0; i < concat->num_subdev; i++) { struct mtd_info *subdev = concat->subdev[i]; - if((rc = subdev->suspend(subdev)) < 0) + if ((rc = subdev->suspend(subdev)) < 0) return rc; } return rc; @@ -636,8 +624,7 @@ struct mtd_concat *concat = CONCAT(mtd); int i; - for(i = 0; i < concat->num_subdev; i++) - { + for (i = 0; i < concat->num_subdev; i++) { struct mtd_info *subdev = concat->subdev[i]; subdev->resume(subdev); } @@ -649,11 +636,10 @@ * stored to *new_dev upon success. This function does _not_ * register any devices: this is the caller's responsibility. */ -struct mtd_info *mtd_concat_create( - struct mtd_info *subdev[], /* subdevices to concatenate */ - int num_devs, /* number of subdevices */ - char *name) /* name for the new device */ -{ +struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to concatenate */ + int num_devs, /* number of subdevices */ + char *name) +{ /* name for the new device */ int i; size_t size; struct mtd_concat *concat; @@ -661,94 +647,103 @@ int num_erase_region; printk(KERN_NOTICE "Concatenating MTD devices:\n"); - for(i = 0; i < num_devs; i++) + for (i = 0; i < num_devs; i++) printk(KERN_NOTICE "(%d): \"%s\"\n", i, subdev[i]->name); printk(KERN_NOTICE "into device \"%s\"\n", name); /* allocate the device structure */ size = SIZEOF_STRUCT_MTD_CONCAT(num_devs); - concat = kmalloc (size, GFP_KERNEL); - if(!concat) - { - printk ("memory allocation error while creating concatenated device \"%s\"\n", - name); - return NULL; + concat = kmalloc(size, GFP_KERNEL); + if (!concat) { + printk + ("memory allocation error while creating concatenated device \"%s\"\n", + name); + return NULL; } memset(concat, 0, size); - concat->subdev = (struct mtd_info **)(concat + 1); + concat->subdev = (struct mtd_info **) (concat + 1); /* * Set up the new "super" device's MTD object structure, check for * incompatibilites between the subdevices. */ - concat->mtd.type = subdev[0]->type; - concat->mtd.flags = subdev[0]->flags; - concat->mtd.size = subdev[0]->size; + concat->mtd.type = subdev[0]->type; + concat->mtd.flags = subdev[0]->flags; + concat->mtd.size = subdev[0]->size; concat->mtd.erasesize = subdev[0]->erasesize; - concat->mtd.oobblock = subdev[0]->oobblock; - concat->mtd.oobsize = subdev[0]->oobsize; - concat->mtd.ecctype = subdev[0]->ecctype; - concat->mtd.eccsize = subdev[0]->eccsize; - - concat->subdev[0] = subdev[0]; - - for(i = 1; i < num_devs; i++) - { - if(concat->mtd.type != subdev[i]->type) - { + concat->mtd.oobblock = subdev[0]->oobblock; + concat->mtd.oobsize = subdev[0]->oobsize; + concat->mtd.ecctype = subdev[0]->ecctype; + concat->mtd.eccsize = subdev[0]->eccsize; + if (subdev[0]->read_ecc) + concat->mtd.read_ecc = concat_read_ecc; + if (subdev[0]->write_ecc) + concat->mtd.write_ecc = concat_write_ecc; + if (subdev[0]->read_oob) + concat->mtd.read_oob = concat_read_oob; + if (subdev[0]->write_oob) + concat->mtd.write_oob = concat_write_oob; + + concat->subdev[0] = subdev[0]; + + for (i = 1; i < num_devs; i++) { + if (concat->mtd.type != subdev[i]->type) { kfree(concat); - printk ("Incompatible device type on \"%s\"\n", subdev[i]->name); + printk("Incompatible device type on \"%s\"\n", + subdev[i]->name); return NULL; } - if(concat->mtd.flags != subdev[i]->flags) - { /* - * Expect all flags except MTD_WRITEABLE to be equal on - * all subdevices. + if (concat->mtd.flags != subdev[i]->flags) { + /* + * Expect all flags except MTD_WRITEABLE to be + * equal on all subdevices. */ - if((concat->mtd.flags ^ subdev[i]->flags) & ~MTD_WRITEABLE) - { + if ((concat->mtd.flags ^ subdev[i]-> + flags) & ~MTD_WRITEABLE) { kfree(concat); - printk ("Incompatible device flags on \"%s\"\n", subdev[i]->name); + printk("Incompatible device flags on \"%s\"\n", + subdev[i]->name); return NULL; - } - else /* if writeable attribute differs, make super device writeable */ - concat->mtd.flags |= subdev[i]->flags & MTD_WRITEABLE; + } else + /* if writeable attribute differs, + make super device writeable */ + concat->mtd.flags |= + subdev[i]->flags & MTD_WRITEABLE; } concat->mtd.size += subdev[i]->size; - if(concat->mtd.oobblock != subdev[i]->oobblock || - concat->mtd.oobsize != subdev[i]->oobsize || - concat->mtd.ecctype != subdev[i]->ecctype || - concat->mtd.eccsize != subdev[i]->eccsize) - { + if (concat->mtd.oobblock != subdev[i]->oobblock || + concat->mtd.oobsize != subdev[i]->oobsize || + concat->mtd.ecctype != subdev[i]->ecctype || + concat->mtd.eccsize != subdev[i]->eccsize || + !concat->mtd.read_ecc != !subdev[i]->read_ecc || + !concat->mtd.write_ecc != !subdev[i]->write_ecc || + !concat->mtd.read_oob != !subdev[i]->read_oob || + !concat->mtd.write_oob != !subdev[i]->write_oob) { kfree(concat); - printk ("Incompatible OOB or ECC data on \"%s\"\n", subdev[i]->name); + printk("Incompatible OOB or ECC data on \"%s\"\n", + subdev[i]->name); return NULL; } concat->subdev[i] = subdev[i]; - + } - concat->num_subdev = num_devs; - concat->mtd.name = name; + concat->num_subdev = num_devs; + concat->mtd.name = name; /* * NOTE: for now, we do not provide any readv()/writev() methods * because they are messy to implement and they are not * used to a great extent anyway. */ - concat->mtd.erase = concat_erase; - concat->mtd.read = concat_read; - concat->mtd.write = concat_write; - concat->mtd.read_ecc = concat_read_ecc; - concat->mtd.write_ecc = concat_write_ecc; - concat->mtd.read_oob = concat_read_oob; - concat->mtd.write_oob = concat_write_oob; - concat->mtd.sync = concat_sync; - concat->mtd.lock = concat_lock; - concat->mtd.unlock = concat_unlock; - concat->mtd.suspend = concat_suspend; - concat->mtd.resume = concat_resume; - + concat->mtd.erase = concat_erase; + concat->mtd.read = concat_read; + concat->mtd.write = concat_write; + concat->mtd.sync = concat_sync; + concat->mtd.lock = concat_lock; + concat->mtd.unlock = concat_unlock; + concat->mtd.suspend = concat_suspend; + concat->mtd.resume = concat_resume; /* * Combine the erase block size info of the subdevices: @@ -758,44 +753,44 @@ */ max_erasesize = curr_erasesize = subdev[0]->erasesize; num_erase_region = 1; - for(i = 0; i < num_devs; i++) - { - if(subdev[i]->numeraseregions == 0) - { /* current subdevice has uniform erase size */ - if(subdev[i]->erasesize != curr_erasesize) - { /* if it differs from the last subdevice's erase size, count it */ + for (i = 0; i < num_devs; i++) { + if (subdev[i]->numeraseregions == 0) { + /* current subdevice has uniform erase size */ + if (subdev[i]->erasesize != curr_erasesize) { + /* if it differs from the last subdevice's erase size, count it */ ++num_erase_region; curr_erasesize = subdev[i]->erasesize; - if(curr_erasesize > max_erasesize) + if (curr_erasesize > max_erasesize) max_erasesize = curr_erasesize; } - } - else - { /* current subdevice has variable erase size */ + } else { + /* current subdevice has variable erase size */ int j; - for(j = 0; j < subdev[i]->numeraseregions; j++) - { /* walk the list of erase regions, count any changes */ - if(subdev[i]->eraseregions[j].erasesize != curr_erasesize) - { + for (j = 0; j < subdev[i]->numeraseregions; j++) { + + /* walk the list of erase regions, count any changes */ + if (subdev[i]->eraseregions[j].erasesize != + curr_erasesize) { ++num_erase_region; - curr_erasesize = subdev[i]->eraseregions[j].erasesize; - if(curr_erasesize > max_erasesize) + curr_erasesize = + subdev[i]->eraseregions[j]. + erasesize; + if (curr_erasesize > max_erasesize) max_erasesize = curr_erasesize; } } } } - if(num_erase_region == 1) - { /* + if (num_erase_region == 1) { + /* * All subdevices have the same uniform erase size. * This is easy: */ concat->mtd.erasesize = curr_erasesize; concat->mtd.numeraseregions = 0; - } - else - { /* + } else { + /* * erase block size varies across the subdevices: allocate * space to store the data describing the variable erase regions */ @@ -804,13 +799,14 @@ concat->mtd.erasesize = max_erasesize; concat->mtd.numeraseregions = num_erase_region; - concat->mtd.eraseregions = erase_region_p = kmalloc ( - num_erase_region * sizeof(struct mtd_erase_region_info), GFP_KERNEL); - if(!erase_region_p) - { + concat->mtd.eraseregions = erase_region_p = + kmalloc(num_erase_region * + sizeof (struct mtd_erase_region_info), GFP_KERNEL); + if (!erase_region_p) { kfree(concat); - printk ("memory allocation error while creating erase region list" - " for device \"%s\"\n", name); + printk + ("memory allocation error while creating erase region list" + " for device \"%s\"\n", name); return NULL; } @@ -820,46 +816,53 @@ */ curr_erasesize = subdev[0]->erasesize; begin = position = 0; - for(i = 0; i < num_devs; i++) - { - if(subdev[i]->numeraseregions == 0) - { /* current subdevice has uniform erase size */ - if(subdev[i]->erasesize != curr_erasesize) - { /* + for (i = 0; i < num_devs; i++) { + if (subdev[i]->numeraseregions == 0) { + /* current subdevice has uniform erase size */ + if (subdev[i]->erasesize != curr_erasesize) { + /* * fill in an mtd_erase_region_info structure for the area * we have walked so far: */ - erase_region_p->offset = begin; - erase_region_p->erasesize = curr_erasesize; - erase_region_p->numblocks = (position - begin) / curr_erasesize; + erase_region_p->offset = begin; + erase_region_p->erasesize = + curr_erasesize; + erase_region_p->numblocks = + (position - begin) / curr_erasesize; begin = position; curr_erasesize = subdev[i]->erasesize; ++erase_region_p; } position += subdev[i]->size; - } - else - { /* current subdevice has variable erase size */ + } else { + /* current subdevice has variable erase size */ int j; - for(j = 0; j < subdev[i]->numeraseregions; j++) - { /* walk the list of erase regions, count any changes */ - if(subdev[i]->eraseregions[j].erasesize != curr_erasesize) - { - erase_region_p->offset = begin; - erase_region_p->erasesize = curr_erasesize; - erase_region_p->numblocks = (position - begin) / curr_erasesize; + for (j = 0; j < subdev[i]->numeraseregions; j++) { + /* walk the list of erase regions, count any changes */ + if (subdev[i]->eraseregions[j]. + erasesize != curr_erasesize) { + erase_region_p->offset = begin; + erase_region_p->erasesize = + curr_erasesize; + erase_region_p->numblocks = + (position - + begin) / curr_erasesize; begin = position; - curr_erasesize = subdev[i]->eraseregions[j].erasesize; + curr_erasesize = + subdev[i]->eraseregions[j]. + erasesize; ++erase_region_p; } - position += subdev[i]->eraseregions[j].numblocks * curr_erasesize; + position += + subdev[i]->eraseregions[j]. + numblocks * curr_erasesize; } } } /* Now write the final entry */ - erase_region_p->offset = begin; + erase_region_p->offset = begin; erase_region_p->erasesize = curr_erasesize; erase_region_p->numblocks = (position - begin) / curr_erasesize; } @@ -874,15 +877,13 @@ void mtd_concat_destroy(struct mtd_info *mtd) { struct mtd_concat *concat = CONCAT(mtd); - if(concat->mtd.numeraseregions) + if (concat->mtd.numeraseregions) kfree(concat->mtd.eraseregions); kfree(concat); } - EXPORT_SYMBOL(mtd_concat_create); EXPORT_SYMBOL(mtd_concat_destroy); - MODULE_LICENSE("GPL"); MODULE_AUTHOR("Robert Kaiser "); diff -Nru a/drivers/net/dummy.c b/drivers/net/dummy.c --- a/drivers/net/dummy.c Tue May 4 21:53:35 2004 +++ b/drivers/net/dummy.c Tue May 4 21:53:35 2004 @@ -104,7 +104,7 @@ /* Number of dummy devices to be set up by this module. */ module_param(numdummies, int, 0); -MODULE_PARM_DESC(numdimmies, "Number of dummy psuedo devices"); +MODULE_PARM_DESC(numdummies, "Number of dummy pseudo devices"); static int __init dummy_init_one(int index) { diff -Nru a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c --- a/drivers/parport/parport_pc.c Tue May 4 21:53:36 2004 +++ b/drivers/parport/parport_pc.c Tue May 4 21:53:36 2004 @@ -2955,10 +2955,13 @@ /* Onboard SuperIO chipsets that show themselves on the PCI bus. */ count += parport_pc_init_superio (autoirq, autodma); - r = pnp_register_driver (&parport_pc_pnp_driver); - if (r >= 0) { - pnp_registered_parport = 1; - count += r; + /* PnP ports, skip detection if SuperIO already found them */ + if (!count) { + r = pnp_register_driver (&parport_pc_pnp_driver); + if (r >= 0) { + pnp_registered_parport = 1; + count += r; + } } /* ISA ports and whatever (see asm/parport.h). */ diff -Nru a/drivers/pcmcia/ti113x.h b/drivers/pcmcia/ti113x.h --- a/drivers/pcmcia/ti113x.h Tue May 4 21:53:35 2004 +++ b/drivers/pcmcia/ti113x.h Tue May 4 21:53:35 2004 @@ -150,6 +150,10 @@ /* ExCA IO offset registers */ #define TI113X_IO_OFFSET(map) (0x36+((map)<<1)) +/* EnE test register */ +#define ENE_TEST_C9 0xc9 /* 8bit */ +#define ENE_TEST_C9_TLTENABLE 0x02 + #ifdef CONFIG_CARDBUS /* @@ -160,6 +164,7 @@ #define ti_devctl(socket) ((socket)->private[2]) #define ti_diag(socket) ((socket)->private[3]) #define ti_mfunc(socket) ((socket)->private[4]) +#define ene_test_c9(socket) ((socket)->private[5]) /* * These are the TI specific power management handlers. @@ -171,6 +176,9 @@ ti_cardctl(socket) = config_readb(socket, TI113X_CARD_CONTROL); ti_devctl(socket) = config_readb(socket, TI113X_DEVICE_CONTROL); ti_diag(socket) = config_readb(socket, TI1250_DIAGNOSTIC); + + if (socket->dev->vendor == PCI_VENDOR_ID_ENE) + ene_test_c9(socket) = config_readb(socket, ENE_TEST_C9); } static void ti_restore_state(struct yenta_socket *socket) @@ -180,6 +188,9 @@ config_writeb(socket, TI113X_CARD_CONTROL, ti_cardctl(socket)); config_writeb(socket, TI113X_DEVICE_CONTROL, ti_devctl(socket)); config_writeb(socket, TI1250_DIAGNOSTIC, ti_diag(socket)); + + if (socket->dev->vendor == PCI_VENDOR_ID_ENE) + config_writeb(socket, ENE_TEST_C9, ene_test_c9(socket)); } /* @@ -589,6 +600,16 @@ printk(KERN_INFO "Yenta: Enabling burst memory read transactions\n"); val |= TI122X_SCR_MRBURSTUP; config_writel(socket, TI113X_SYSTEM_CONTROL, val); + } + + /* + * for EnE bridges only: clear testbit TLTEnable. this makes the + * RME Hammerfall DSP sound card working. + */ + if (socket->dev->vendor == PCI_VENDOR_ID_ENE) { + u8 test_c9 = config_readb(socket, ENE_TEST_C9); + test_c9 &= ~ENE_TEST_C9_TLTENABLE; + config_writeb(socket, ENE_TEST_C9, test_c9); } /* diff -Nru a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c --- a/drivers/s390/char/raw3270.c Tue May 4 21:53:36 2004 +++ b/drivers/s390/char/raw3270.c Tue May 4 21:53:36 2004 @@ -345,8 +345,10 @@ rq = (struct raw3270_request *) intparm; view = rq ? rq->view : rp->view; - if (irb->scsw.dstat == - (DEV_STAT_CHN_END | DEV_STAT_DEV_END | DEV_STAT_UNIT_EXCEP)) { + 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)) { /* Handle CE-DE-UE and subsequent UDE */ set_bit(RAW3270_FLAGS_BUSY, &rp->flags); rc = RAW3270_IO_BUSY; diff -Nru a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c --- a/drivers/s390/cio/chsc.c Tue May 4 21:53:36 2004 +++ b/drivers/s390/cio/chsc.c Tue May 4 21:53:36 2004 @@ -1,7 +1,7 @@ /* * drivers/s390/cio/chsc.c * S/390 common I/O routines -- channel subsystem call - * $Revision: 1.107 $ + * $Revision: 1.110 $ * * Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH, * IBM Corporation @@ -148,7 +148,7 @@ */ if (ssd_area->st > 3) { /* uhm, that looks strange... */ CIO_CRW_EVENT(0, "Strange subchannel type %d" - " for sch %s\n", ssd_area->st, sch->dev.bus_id); + " for sch %04x\n", ssd_area->st, sch->irq); /* * There may have been a new subchannel type defined in the * time since this code was written; since we don't know which @@ -157,8 +157,8 @@ return 0; } else { const char *type[4] = {"I/O", "chsc", "message", "ADM"}; - CIO_CRW_EVENT(6, "ssd: sch %s is %s subchannel\n", - sch->dev.bus_id, type[ssd_area->st]); + CIO_CRW_EVENT(6, "ssd: sch %04x is %s subchannel\n", + sch->irq, type[ssd_area->st]); sch->ssd_info.valid = 1; sch->ssd_info.type = ssd_area->st; @@ -818,6 +818,8 @@ for (irq = 0; irq < __MAX_SUBCHANNELS; irq++) { struct schib schib; + if (need_rescan) + break; sch = get_subchannel_by_schid(irq); if (sch) { put_device(&sch->dev); @@ -826,15 +828,12 @@ if (stsch(irq, &schib)) /* We're through */ break; - if (need_rescan) - continue; /* Put it on the slow path. */ ret = css_enqueue_subchannel_slow(irq); if (ret) { css_clear_subchannel_slow_list(); need_rescan = 1; } - continue; } if (need_rescan || css_slow_subchannels_exist()) schedule_work(&varyonoff_work); diff -Nru a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c --- a/drivers/s390/cio/cio.c Tue May 4 21:53:36 2004 +++ b/drivers/s390/cio/cio.c Tue May 4 21:53:36 2004 @@ -52,15 +52,6 @@ __setup ("cio_msg=", cio_setup); - -#ifdef CONFIG_PROC_FS -void -init_irq_proc(void) -{ - /* For now, nothing... */ -} -#endif - /* * Function: cio_debug_init * Initializes three debug logs (under /proc/s390dbf) for common I/O: diff -Nru a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c --- a/drivers/s390/cio/css.c Tue May 4 21:53:35 2004 +++ b/drivers/s390/cio/css.c Tue May 4 21:53:35 2004 @@ -1,7 +1,7 @@ /* * drivers/s390/cio/css.c * driver for channel subsystem - * $Revision: 1.72 $ + * $Revision: 1.73 $ * * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, * IBM Corporation @@ -124,24 +124,6 @@ return ret; } -static struct subchannel * -__get_subchannel_by_stsch(int irq) -{ - struct subchannel *sch; - int cc; - struct schib schib; - - cc = stsch(irq, &schib); - if (cc || !schib.pmcw.dnv) - return NULL; - sch = (struct subchannel *)(unsigned long)schib.pmcw.intparm; - if (!sch) - return NULL; - if (get_device(&sch->dev)) - return sch; - return NULL; -} - struct subchannel * get_subchannel_by_schid(int irq) { @@ -151,13 +133,8 @@ if (!get_bus(&css_bus_type)) return NULL; - - /* Try to get subchannel from pmcw first. */ - sch = __get_subchannel_by_stsch(irq); - if (sch) - goto out; down_read(&css_bus_type.subsys.rwsem); - + sch = NULL; list_for_each(entry, &css_bus_type.devices.list) { dev = get_device(container_of(entry, struct device, bus_list)); @@ -170,7 +147,6 @@ sch = NULL; } up_read(&css_bus_type.subsys.rwsem); -out: put_bus(&css_bus_type); return sch; diff -Nru a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c --- a/drivers/s390/cio/device.c Tue May 4 21:53:36 2004 +++ b/drivers/s390/cio/device.c Tue May 4 21:53:36 2004 @@ -1,7 +1,7 @@ /* * drivers/s390/cio/device.c * bus driver for ccw devices - * $Revision: 1.113 $ + * $Revision: 1.115 $ * * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, * IBM Corporation @@ -138,6 +138,7 @@ }; struct workqueue_struct *ccw_device_work; +struct workqueue_struct *ccw_device_notify_work; static wait_queue_head_t ccw_device_init_wq; static atomic_t ccw_device_init_count; @@ -149,20 +150,30 @@ init_waitqueue_head(&ccw_device_init_wq); atomic_set(&ccw_device_init_count, 0); - ccw_device_work = create_workqueue("cio"); + ccw_device_work = create_singlethread_workqueue("cio"); if (!ccw_device_work) return -ENOMEM; /* FIXME: better errno ? */ - + ccw_device_notify_work = create_singlethread_workqueue("cio_notify"); + if (!ccw_device_notify_work) { + ret = -ENOMEM; /* FIXME: better errno ? */ + goto out_err; + } if ((ret = bus_register (&ccw_bus_type))) - return ret; + goto out_err; if ((ret = driver_register(&io_subchannel_driver.drv))) - return ret; + goto out_err; wait_event(ccw_device_init_wq, atomic_read(&ccw_device_init_count) == 0); flush_workqueue(ccw_device_work); return 0; +out_err: + if (ccw_device_work) + destroy_workqueue(ccw_device_work); + if (ccw_device_notify_work) + destroy_workqueue(ccw_device_notify_work); + return ret; } static void __exit @@ -170,6 +181,7 @@ { driver_unregister(&io_subchannel_driver.drv); bus_unregister(&ccw_bus_type); + destroy_workqueue(ccw_device_notify_work); destroy_workqueue(ccw_device_work); } @@ -553,18 +565,21 @@ wake_up(&cdev->private->wait_q); } -static void -device_call_sch_unregister(void *data) +void +ccw_device_call_sch_unregister(void *data) { struct ccw_device *cdev = data; struct subchannel *sch; sch = to_subchannel(cdev->dev.parent); - device_unregister(&sch->dev); + /* Check if device is registered. */ + if (!list_empty(&sch->dev.node)) + device_unregister(&sch->dev); /* Reset intparm to zeroes. */ sch->schib.pmcw.intparm = 0; cio_modify(sch); put_device(&cdev->dev); + put_device(&sch->dev); } /* @@ -587,7 +602,7 @@ break; sch = to_subchannel(cdev->dev.parent); INIT_WORK(&cdev->private->kick_work, - device_call_sch_unregister, (void *) cdev); + ccw_device_call_sch_unregister, (void *) cdev); queue_work(ccw_device_work, &cdev->private->kick_work); break; case DEV_STATE_BOXED: @@ -982,3 +997,4 @@ EXPORT_SYMBOL(get_ccwdev_by_busid); EXPORT_SYMBOL(ccw_bus_type); EXPORT_SYMBOL(ccw_device_work); +EXPORT_SYMBOL(ccw_device_notify_work); diff -Nru a/drivers/s390/cio/device.h b/drivers/s390/cio/device.h --- a/drivers/s390/cio/device.h Tue May 4 21:53:36 2004 +++ b/drivers/s390/cio/device.h Tue May 4 21:53:36 2004 @@ -66,6 +66,7 @@ } extern struct workqueue_struct *ccw_device_work; +extern struct workqueue_struct *ccw_device_notify_work; void io_subchannel_recog_done(struct ccw_device *cdev); @@ -73,7 +74,7 @@ int ccw_device_register(struct ccw_device *); void ccw_device_do_unreg_rereg(void *); - +void ccw_device_call_sch_unregister(void *); int ccw_device_recognition(struct ccw_device *); int ccw_device_online(struct ccw_device *); diff -Nru a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c --- a/drivers/s390/cio/device_fsm.c Tue May 4 21:53:36 2004 +++ b/drivers/s390/cio/device_fsm.c Tue May 4 21:53:36 2004 @@ -328,7 +328,7 @@ cdev->private->flags.donotify = 0; PREPARE_WORK(&cdev->private->kick_work, ccw_device_oper_notify, (void *)cdev); - queue_work(ccw_device_work, &cdev->private->kick_work); + queue_work(ccw_device_notify_work, &cdev->private->kick_work); } wake_up(&cdev->private->wait_q); @@ -441,10 +441,13 @@ if (get_device(&sch->dev)) { /* Driver doesn't want to keep device. */ cio_disable_subchannel(sch); - device_unregister(&sch->dev); - sch->schib.pmcw.intparm = 0; - cio_modify(sch); - put_device(&sch->dev); + if (get_device(&cdev->dev)) { + PREPARE_WORK(&cdev->private->kick_work, + ccw_device_call_sch_unregister, + (void *)cdev); + queue_work(ccw_device_work, + &cdev->private->kick_work); + } } } else { cio_disable_subchannel(sch); @@ -464,7 +467,7 @@ cdev = sch->dev.driver_data; PREPARE_WORK(&cdev->private->kick_work, ccw_device_nopath_notify, (void *)cdev); - queue_work(ccw_device_work, &cdev->private->kick_work); + queue_work(ccw_device_notify_work, &cdev->private->kick_work); } @@ -482,7 +485,7 @@ default: PREPARE_WORK(&cdev->private->kick_work, ccw_device_nopath_notify, (void *)cdev); - queue_work(ccw_device_work, &cdev->private->kick_work); + queue_work(ccw_device_notify_work, &cdev->private->kick_work); ccw_device_done(cdev, DEV_STATE_NOT_OPER); break; } @@ -722,7 +725,8 @@ if (!sch->lpm) { PREPARE_WORK(&cdev->private->kick_work, ccw_device_nopath_notify, (void *)cdev); - queue_work(ccw_device_work, &cdev->private->kick_work); + queue_work(ccw_device_notify_work, + &cdev->private->kick_work); } else dev_fsm_event(cdev, DEV_EVENT_NOTOPER); } else if (cdev->handler) @@ -798,7 +802,7 @@ if (!sch->lpm) { PREPARE_WORK(&cdev->private->kick_work, ccw_device_nopath_notify, (void *)cdev); - queue_work(ccw_device_work, &cdev->private->kick_work); + queue_work(ccw_device_notify_work, &cdev->private->kick_work); } else if (cdev->private->flags.doverify) /* Start delayed path verification. */ ccw_device_online_verify(cdev, 0); @@ -821,7 +825,8 @@ if (!sch->lpm) { PREPARE_WORK(&cdev->private->kick_work, ccw_device_nopath_notify, (void *)cdev); - queue_work(ccw_device_work, &cdev->private->kick_work); + queue_work(ccw_device_notify_work, + &cdev->private->kick_work); } else dev_fsm_event(cdev, DEV_EVENT_NOTOPER); return; @@ -871,7 +876,7 @@ if (!sch->lpm) { PREPARE_WORK(&cdev->private->kick_work, ccw_device_nopath_notify, (void *)cdev); - queue_work(ccw_device_work, &cdev->private->kick_work); + queue_work(ccw_device_notify_work, &cdev->private->kick_work); } else if (cdev->private->flags.doverify) ccw_device_online_verify(cdev, 0); } @@ -894,7 +899,8 @@ if (!sch->lpm) { PREPARE_WORK(&cdev->private->kick_work, ccw_device_nopath_notify, (void *)cdev); - queue_work(ccw_device_work, &cdev->private->kick_work); + queue_work(ccw_device_notify_work, + &cdev->private->kick_work); } else dev_fsm_event(cdev, DEV_EVENT_NOTOPER); return; @@ -905,7 +911,7 @@ if (!sch->lpm) { PREPARE_WORK(&cdev->private->kick_work, ccw_device_nopath_notify, (void *)cdev); - queue_work(ccw_device_work, &cdev->private->kick_work); + queue_work(ccw_device_notify_work, &cdev->private->kick_work); } else if (cdev->private->flags.doverify) /* Start delayed path verification. */ ccw_device_online_verify(cdev, 0); diff -Nru a/drivers/s390/cio/device_pgid.c b/drivers/s390/cio/device_pgid.c --- a/drivers/s390/cio/device_pgid.c Tue May 4 21:53:36 2004 +++ b/drivers/s390/cio/device_pgid.c Tue May 4 21:53:36 2004 @@ -227,7 +227,7 @@ ret = cio_start (sch, cdev->private->iccws, cdev->private->imask); /* ret is 0, -EBUSY, -EACCES or -ENODEV */ - if (ret != -EACCES) + if ((ret != -EACCES) && (ret != -ENODEV)) return ret; } /* PGID command failed on this path. Switch it off. */ diff -Nru a/drivers/s390/net/ctcmain.c b/drivers/s390/net/ctcmain.c --- a/drivers/s390/net/ctcmain.c Tue May 4 21:53:35 2004 +++ b/drivers/s390/net/ctcmain.c Tue May 4 21:53:35 2004 @@ -1,5 +1,5 @@ /* - * $Id: ctcmain.c,v 1.58 2004/03/24 10:51:56 ptiedem Exp $ + * $Id: ctcmain.c,v 1.59 2004/04/21 17:10:13 ptiedem Exp $ * * CTC / ESCON network driver * @@ -36,7 +36,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * RELEASE-TAG: CTC/ESCON network driver $Revision: 1.58 $ + * RELEASE-TAG: CTC/ESCON network driver $Revision: 1.59 $ * */ @@ -319,7 +319,7 @@ print_banner(void) { static int printed = 0; - char vbuf[] = "$Revision: 1.58 $"; + char vbuf[] = "$Revision: 1.59 $"; char *version = vbuf; if (printed) @@ -2045,6 +2045,32 @@ return ret; } +static long +__ctc_check_irb_error(struct ccw_device *cdev, struct irb *irb) +{ + if (!IS_ERR(irb)) + return 0; + + switch (PTR_ERR(irb)) { + case -EIO: + ctc_pr_warn("i/o-error on device %s\n", cdev->dev.bus_id); +// CTC_DBF_TEXT(trace, 2, "ckirberr"); +// CTC_DBF_TEXT_(trace, 2, " rc%d", -EIO); + break; + case -ETIMEDOUT: + ctc_pr_warn("timeout on device %s\n", cdev->dev.bus_id); +// CTC_DBF_TEXT(trace, 2, "ckirberr"); +// CTC_DBF_TEXT_(trace, 2, " rc%d", -ETIMEDOUT); + break; + default: + ctc_pr_warn("unknown error %ld on device %s\n", PTR_ERR(irb), + cdev->dev.bus_id); +// CTC_DBF_TEXT(trace, 2, "ckirberr"); +// CTC_DBF_TEXT(trace, 2, " rc???"); + } + return PTR_ERR(irb); +} + /** * Main IRQ handler. * @@ -2058,6 +2084,9 @@ struct channel *ch; struct net_device *dev; struct ctc_priv *priv; + + if (__ctc_check_irb_error(cdev, irb)) + return; /* Check for unsolicited interrupts. */ if (!cdev->dev.driver_data) { diff -Nru a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c --- a/drivers/s390/net/netiucv.c Tue May 4 21:53:36 2004 +++ b/drivers/s390/net/netiucv.c Tue May 4 21:53:36 2004 @@ -1,5 +1,5 @@ /* - * $Id: netiucv.c,v 1.49 2004/04/15 06:37:54 braunu Exp $ + * $Id: netiucv.c,v 1.51 2004/04/23 08:11:21 mschwide Exp $ * * IUCV network driver * @@ -30,7 +30,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * RELEASE-TAG: IUCV network driver $Revision: 1.49 $ + * RELEASE-TAG: IUCV network driver $Revision: 1.51 $ * */ @@ -169,10 +169,10 @@ } static __u8 iucv_host[8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -static __u8 iucvMagic[16] = { - 0xF0, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, - 0xF0, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40 -}; +//static __u8 iucvMagic[16] = { +// 0xF0, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, +// 0xF0, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40 +//}; /** * This mask means the 16-byte IUCV "magic" and the origin userid must @@ -693,13 +693,20 @@ conn_action_connreject(fsm_instance *fi, int event, void *arg) { struct iucv_event *ev = (struct iucv_event *)arg; - // struct iucv_connection *conn = ev->conn; + struct iucv_connection *conn = ev->conn; + struct net_device *netdev = conn->netdev; iucv_ConnectionPending *eib = (iucv_ConnectionPending *)ev->data; __u8 udata[16]; pr_debug("%s() called\n", __FUNCTION__); iucv_sever(eib->ippathid, udata); + if (eib->ippathid != conn->pathid) { + printk(KERN_INFO + "%s: IR pathid %d does not match original pathid %d\n", + netdev->name, eib->ippathid, conn->pathid); + iucv_sever(conn->pathid, udata); + } } static void @@ -715,7 +722,12 @@ fsm_deltimer(&conn->timer); fsm_newstate(fi, CONN_STATE_IDLE); - conn->pathid = eib->ippathid; + if (eib->ippathid != conn->pathid) { + printk(KERN_INFO + "%s: IR pathid %d does not match original pathid %d\n", + netdev->name, eib->ippathid, conn->pathid); + conn->pathid = eib->ippathid; + } netdev->tx_queue_len = eib->ipmsglim; fsm_event(privptr->fsm, DEV_EVENT_CONUP, netdev); } @@ -759,9 +771,14 @@ struct iucv_connection *conn = ev->conn; __u16 msglimit; int rc; + __u8 iucvMagic[16] = { + 0xF0, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, + 0xF0, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40 + }; pr_debug("%s() called\n", __FUNCTION__); + memcpy(iucvMagic, conn->netdev->name, IFNAMSIZ); if (conn->handle == 0) { conn->handle = iucv_register_program(iucvMagic, conn->userid, mask, @@ -1882,7 +1899,7 @@ static void netiucv_banner(void) { - char vbuf[] = "$Revision: 1.49 $"; + char vbuf[] = "$Revision: 1.51 $"; char *version = vbuf; if ((version = strchr(version, ':'))) { diff -Nru a/drivers/s390/net/qeth.h b/drivers/s390/net/qeth.h --- a/drivers/s390/net/qeth.h Tue May 4 21:53:35 2004 +++ b/drivers/s390/net/qeth.h Tue May 4 21:53:35 2004 @@ -23,7 +23,7 @@ #include "qeth_mpc.h" -#define VERSION_QETH_H "$Revision: 1.100 $" +#define VERSION_QETH_H "$Revision: 1.102 $" #ifdef CONFIG_QETH_IPV6 #define QETH_VERSION_IPV6 ":IPv6" @@ -398,11 +398,6 @@ struct qdio_buffer qdio_bufs[QDIO_MAX_BUFFERS_PER_Q]; struct qeth_qdio_buffer bufs[QDIO_MAX_BUFFERS_PER_Q]; /* - * buf_to_process means "buffer primed by hardware, - * has to be read in by driver"; current state PRIMED - */ - volatile int next_buf_to_process; - /* * buf_to_init means "buffer must be initialized by driver and must * be made available for hardware" -> state is set to EMPTY */ @@ -493,8 +488,7 @@ CARD_STATE_DOWN, CARD_STATE_HARDSETUP, CARD_STATE_SOFTSETUP, - CARD_STATE_UP_LAN_OFFLINE, - CARD_STATE_UP_LAN_ONLINE, + CARD_STATE_UP, CARD_STATE_RECOVER, }; @@ -981,24 +975,27 @@ extern int qeth_setrouting_v6(struct qeth_card *); -int +extern int qeth_add_ipato_entry(struct qeth_card *, struct qeth_ipato_entry *); -void +extern void qeth_del_ipato_entry(struct qeth_card *, enum qeth_prot_versions, u8 *, int); -int +extern int qeth_add_vipa(struct qeth_card *, enum qeth_prot_versions, const u8 *); -void +extern void qeth_del_vipa(struct qeth_card *, enum qeth_prot_versions, const u8 *); -int +extern int qeth_add_rxip(struct qeth_card *, enum qeth_prot_versions, const u8 *); -void +extern void qeth_del_rxip(struct qeth_card *, enum qeth_prot_versions, const u8 *); -void +extern void qeth_schedule_recovery(struct qeth_card *); + +extern int +qeth_realloc_buffer_pool(struct qeth_card *, int); #endif /* __QETH_H__ */ diff -Nru a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c --- a/drivers/s390/net/qeth_main.c Tue May 4 21:53:36 2004 +++ b/drivers/s390/net/qeth_main.c Tue May 4 21:53:36 2004 @@ -1,6 +1,6 @@ /* * - * linux/drivers/s390/net/qeth_main.c ($Revision: 1.82 $) + * linux/drivers/s390/net/qeth_main.c ($Revision: 1.89 $) * * Linux on zSeries OSA Express and HiperSockets support * @@ -12,7 +12,7 @@ * Frank Pavlic (pavlic@de.ibm.com) and * Thomas Spatzier * - * $Revision: 1.82 $ $Date: 2004/04/21 08:27:21 $ + * $Revision: 1.89 $ $Date: 2004/04/27 16:27:26 $ * * 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 @@ -78,7 +78,7 @@ #include "qeth_mpc.h" #include "qeth_fs.h" -#define VERSION_QETH_C "$Revision: 1.82 $" +#define VERSION_QETH_C "$Revision: 1.89 $" static const char *version = "qeth S/390 OSA-Express driver (" VERSION_QETH_C "/" VERSION_QETH_H "/" VERSION_QETH_MPC_H QETH_VERSION_IPV6 QETH_VERSION_VLAN ")"; @@ -457,8 +457,7 @@ ccw_device_set_offline(CARD_DDEV(card)); ccw_device_set_offline(CARD_WDEV(card)); ccw_device_set_offline(CARD_RDEV(card)); - if ((recover_flag == CARD_STATE_UP_LAN_ONLINE) || - (recover_flag == CARD_STATE_UP_LAN_OFFLINE)) + if (recover_flag == CARD_STATE_UP) card->state = CARD_STATE_RECOVER; return 0; } @@ -485,7 +484,8 @@ write_lock_irqsave(&qeth_card_list.rwlock, flags); list_del(&card->list); write_unlock_irqrestore(&qeth_card_list.rwlock, flags); - unregister_netdev(card->dev); + if (card->dev) + unregister_netdev(card->dev); qeth_remove_device_attributes(&cgdev->dev); qeth_free_card(card); cgdev->dev.driver_data = NULL; @@ -1504,11 +1504,21 @@ spin_unlock_irqrestore(&reply->card->lock, flags); } +static void +qeth_reset_ip_addresses(struct qeth_card *card) +{ + QETH_DBF_TEXT(trace, 2, "rstipadd"); + + qeth_clear_ip_list(card, 0, 1); + qeth_set_thread_start_bit(card, QETH_SET_IP_THREAD); + qeth_set_thread_start_bit(card, QETH_SET_MC_THREAD); + schedule_work(&card->kernel_thread_starter); +} + static struct qeth_ipa_cmd * qeth_check_ipa_data(struct qeth_card *card, struct qeth_cmd_buffer *iob) { struct qeth_ipa_cmd *cmd = NULL; - enum qeth_card_states old_state; QETH_DBF_TEXT(trace,5,"chkipad"); if (IS_IPA(iob->data)){ @@ -1521,30 +1531,27 @@ PRINT_WARN("Link failure on %s (CHPID 0x%X) - " "there is a network problem or " "someone pulled the cable or " - "disabled the port. Setting state " - "of interface to DOWN.\n", + "disabled the port.\n", card->info.if_name, card->info.chpid); card->lan_online = 0; - old_state = card->state; - rtnl_lock(); - dev_close(card->dev); - rtnl_unlock(); - if ((old_state == CARD_STATE_UP_LAN_ONLINE) || - (old_state == CARD_STATE_UP_LAN_OFFLINE)) - card->state = CARD_STATE_UP_LAN_OFFLINE; + if (netif_carrier_ok(card->dev)) { + netif_carrier_off(card->dev); + netif_stop_queue(card->dev); + } return NULL; case IPA_CMD_STARTLAN: PRINT_INFO("Link reestablished on %s " - "(CHPID 0x%X)\n", + "(CHPID 0x%X). Scheduling " + "IP address reset.\n", card->info.if_name, card->info.chpid); card->lan_online = 1; - if (card->state == CARD_STATE_UP_LAN_OFFLINE){ - rtnl_lock(); - dev_open(card->dev); - rtnl_unlock(); + if (!netif_carrier_ok(card->dev)) { + netif_carrier_on(card->dev); + netif_wake_queue(card->dev); } + qeth_reset_ip_addresses(card); return NULL; case IPA_CMD_REGISTER_LOCAL_ADDR: QETH_DBF_TEXT(trace,3, "irla"); @@ -2674,6 +2681,7 @@ void *ptr; int i, j; + QETH_DBF_TEXT(trace,5,"clwkpool"); for (i = 0; i < card->qdio.init_pool.buf_count; ++i){ pool_entry = kmalloc(sizeof(*pool_entry), GFP_KERNEL); if (!pool_entry){ @@ -2694,12 +2702,27 @@ } list_add(&pool_entry->init_list, &card->qdio.init_pool.entry_list); - list_add(&pool_entry->list, - &card->qdio.in_buf_pool.entry_list); } return 0; } +int +qeth_realloc_buffer_pool(struct qeth_card *card, int bufcnt) +{ + QETH_DBF_TEXT(trace, 2, "realcbp"); + + if ((card->state != CARD_STATE_DOWN) && + (card->state != CARD_STATE_RECOVER)) + return -EPERM; + + /* TODO: steel/add buffers from/to a running card's buffer pool (?) */ + qeth_clear_working_pool_list(card); + qeth_free_buffer_pool(card); + card->qdio.in_buf_pool.buf_count = bufcnt; + card->qdio.init_pool.buf_count = bufcnt; + return qeth_alloc_buffer_pool(card); +} + static int qeth_alloc_qdio_buffers(struct qeth_card *card) { @@ -2707,10 +2730,9 @@ QETH_DBF_TEXT(setup, 2, "allcqdbf"); - if (card->qdio.state == QETH_QDIO_ALLOCATED) { - qeth_initialize_working_pool_list(card); + if (card->qdio.state == QETH_QDIO_ALLOCATED) return 0; - } + card->qdio.in_q = kmalloc(sizeof(struct qeth_qdio_q), GFP_KERNEL); if (!card->qdio.in_q) return - ENOMEM; @@ -2823,14 +2845,13 @@ /* inbound queue */ memset(card->qdio.in_q->qdio_bufs, 0, QDIO_MAX_BUFFERS_PER_Q * sizeof(struct qdio_buffer)); - card->qdio.in_q->next_buf_to_process = 0; - card->qdio.in_q->next_buf_to_init = 0; + qeth_initialize_working_pool_list(card); /*give only as many buffers to hardware as we have buffer pool entries*/ - for (i = 0; i < card->qdio.in_buf_pool.buf_count; ++i) + for (i = 0; i < card->qdio.in_buf_pool.buf_count - 1; ++i) qeth_init_input_buffer(card, &card->qdio.in_q->bufs[i]); - card->qdio.in_q->next_buf_to_init = card->qdio.in_buf_pool.buf_count; + card->qdio.in_q->next_buf_to_init = card->qdio.in_buf_pool.buf_count - 1; rc = do_QDIO(CARD_DDEV(card), QDIO_FLAG_SYNC_INPUT, 0, 0, - card->qdio.in_buf_pool.buf_count, NULL); + card->qdio.in_buf_pool.buf_count - 1, NULL); if (rc) { QETH_DBF_TEXT_(setup, 2, "1err%d", rc); return rc; @@ -3168,7 +3189,7 @@ card->stats.tx_errors++; return -EIO; } - if (card->state != CARD_STATE_UP_LAN_ONLINE) { + if ((card->state != CARD_STATE_UP) || !netif_carrier_ok(dev)) { card->stats.tx_dropped++; card->stats.tx_errors++; card->stats.tx_carrier_errors++; @@ -3271,18 +3292,19 @@ card = (struct qeth_card *) dev->priv; - if ((card->state != CARD_STATE_SOFTSETUP) && - (card->state != CARD_STATE_UP_LAN_OFFLINE)) + if (card->state != CARD_STATE_SOFTSETUP) return -ENODEV; - if (!card->lan_online){ - card->state = CARD_STATE_UP_LAN_OFFLINE; - return -EIO; - } card->dev->flags |= IFF_UP; netif_start_queue(dev); card->data.state = CH_STATE_UP; - card->state = CARD_STATE_UP_LAN_ONLINE; + card->state = CARD_STATE_UP; + + if (!card->lan_online){ + if (netif_carrier_ok(dev)) + netif_carrier_off(dev); + netif_stop_queue(dev); + } return 0; } @@ -3297,8 +3319,7 @@ netif_stop_queue(dev); card->dev->flags &= ~IFF_UP; - if ((card->state == CARD_STATE_UP_LAN_ONLINE) || - (card->state == CARD_STATE_UP_LAN_OFFLINE)) + if (card->state == CARD_STATE_UP) card->state = CARD_STATE_SOFTSETUP; return 0; } @@ -3925,13 +3946,17 @@ iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SETASSPARMS, proto); memcpy(iob->data, IPA_PDU_HEADER, IPA_PDU_HEADER_SIZE); - /* adjust sizes in IPA_PDU_HEADER */ - s1 = (u32) IPA_PDU_HEADER_SIZE + QETH_ARP_CMD_BASE_LEN + data_len; - s2 = (u32) QETH_ARP_CMD_BASE_LEN + data_len; - memcpy(QETH_IPA_PDU_LEN_TOTAL(iob->data), &s1, 2); - memcpy(QETH_IPA_PDU_LEN_PDU1(iob->data), &s2, 2); - memcpy(QETH_IPA_PDU_LEN_PDU2(iob->data), &s2, 2); - memcpy(QETH_IPA_PDU_LEN_PDU3(iob->data), &s2, 2); + + if ((IPA_PDU_HEADER_SIZE + QETH_ARP_CMD_BASE_LEN + data_len) > 256) { + /* adjust sizes in IPA_PDU_HEADER */ + s1 = (u32) IPA_PDU_HEADER_SIZE + QETH_ARP_CMD_BASE_LEN + + data_len; + s2 = (u32) QETH_ARP_CMD_BASE_LEN + data_len; + memcpy(QETH_IPA_PDU_LEN_TOTAL(iob->data), &s1, 2); + memcpy(QETH_IPA_PDU_LEN_PDU1(iob->data), &s2, 2); + memcpy(QETH_IPA_PDU_LEN_PDU2(iob->data), &s2, 2); + memcpy(QETH_IPA_PDU_LEN_PDU3(iob->data), &s2, 2); + } cmd = (struct qeth_ipa_arp_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); cmd->shdr.assist_no = IPA_ARP_PROCESSING; @@ -3975,7 +4000,12 @@ QETH_DBF_TEXT(trace,3,"arpquery"); - /* TODO: really not supported by GuestLAN? */ + /* + * currently GuestLAN does only deliver all zeros on query arp, + * even though arp processing is supported (according to IPA supp. + * funcs flags); since all zeros is no valueable information, + * we say EOPNOTSUPP for all ARP functions + */ if (card->info.guestlan) return -EOPNOTSUPP; if (!qeth_is_supported(card,IPA_ARP_PROCESSING)) { @@ -3997,9 +4027,11 @@ return -ENOMEM; } memset(qdata, 0, sizeof(struct qeth_arp_query_data)); + /* do not give sizeof(struct qeth_arp_query_data) to next command; + * this would cause the IPA PDU size to be set to a value of > 256 + * and this is to much for HiperSockets */ iob = qeth_get_ipa_arp_cmd_buffer(card, IPA_CMD_ASS_ARP_QUERY_INFO, - sizeof(struct qeth_arp_query_data), - QETH_PROT_IPV4); + 0, QETH_PROT_IPV4); rc = qeth_send_ipa_arp_cmd(card, iob, (char *) qdata, sizeof(struct qeth_arp_query_data), @@ -4043,7 +4075,12 @@ QETH_DBF_TEXT(trace,3,"arpadent"); - /* TODO: really not supported by GuestLAN? */ + /* + * currently GuestLAN does only deliver all zeros on query arp, + * even though arp processing is supported (according to IPA supp. + * funcs flags); since all zeros is no valueable information, + * we say EOPNOTSUPP for all ARP functions + */ if (card->info.guestlan) return -EOPNOTSUPP; if (!qeth_is_supported(card,IPA_ARP_PROCESSING)) { @@ -4081,7 +4118,12 @@ QETH_DBF_TEXT(trace,3,"arprment"); - /* TODO: really not supported by GuestLAN? */ + /* + * currently GuestLAN does only deliver all zeros on query arp, + * even though arp processing is supported (according to IPA supp. + * funcs flags); since all zeros is no valueable information, + * we say EOPNOTSUPP for all ARP functions + */ if (card->info.guestlan) return -EOPNOTSUPP; if (!qeth_is_supported(card,IPA_ARP_PROCESSING)) { @@ -4117,7 +4159,12 @@ QETH_DBF_TEXT(trace,3,"arpflush"); - /* TODO: really not supported by GuestLAN? */ + /* + * currently GuestLAN does only deliver all zeros on query arp, + * even though arp processing is supported (according to IPA supp. + * funcs flags); since all zeros is no valueable information, + * we say EOPNOTSUPP for all ARP functions + */ if (card->info.guestlan) return -EOPNOTSUPP; if (!qeth_is_supported(card,IPA_ARP_PROCESSING)) { @@ -4147,8 +4194,7 @@ if (!card) return -ENODEV; - if ((card->state != CARD_STATE_UP_LAN_ONLINE) && - (card->state != CARD_STATE_UP_LAN_OFFLINE)) + if (card->state != CARD_STATE_UP) return -ENODEV; switch (cmd){ @@ -5551,6 +5597,47 @@ } +static void +qeth_correct_routing_type(struct qeth_card *card, enum qeth_routing_types *type, + enum qeth_prot_versions prot) +{ + if (card->info.type == QETH_CARD_TYPE_IQD) { + switch (*type) { + case NO_ROUTER: + case PRIMARY_CONNECTOR: + case SECONDARY_CONNECTOR: + case MULTICAST_ROUTER: + return; + default: + goto out_inval; + } + } else { + switch (*type) { + case NO_ROUTER: + case PRIMARY_ROUTER: + case SECONDARY_ROUTER: + return; + case MULTICAST_ROUTER: + if (qeth_is_ipafunc_supported(card, prot, + IPA_OSA_MC_ROUTER)) + return; + default: + goto out_inval; + } + } +out_inval: + PRINT_WARN("Routing type '%s' not supported for interface %s.\n" + "Router status set to 'no router'.\n", + ((*type == PRIMARY_ROUTER)? "primary router" : + (*type == SECONDARY_ROUTER)? "secondary router" : + (*type == PRIMARY_CONNECTOR)? "primary connector" : + (*type == SECONDARY_CONNECTOR)? "secondary connector" : + (*type == MULTICAST_ROUTER)? "multicast router" : + "unknown"), + card->dev->name); + *type = NO_ROUTER; +} + int qeth_setrouting_v4(struct qeth_card *card) { @@ -5558,8 +5645,8 @@ QETH_DBF_TEXT(trace,3,"setrtg4"); - if (card->options.route4.type == NO_ROUTER) - return 0; + qeth_correct_routing_type(card, &card->options.route4.type, + QETH_PROT_IPV4); rc = qeth_send_setrouting(card, card->options.route4.type, QETH_PROT_IPV4); @@ -5580,6 +5667,9 @@ QETH_DBF_TEXT(trace,3,"setrtg6"); #ifdef CONFIG_QETH_IPV6 + qeth_correct_routing_type(card, &card->options.route6.type, + QETH_PROT_IPV6); + if ((card->options.route6.type == NO_ROUTER) || ((card->info.type == QETH_CARD_TYPE_OSAE) && (card->options.route6.type == MULTICAST_ROUTER) && @@ -5775,8 +5865,7 @@ return -ERESTARTSYS; if (card->read.state == CH_STATE_UP && card->write.state == CH_STATE_UP && - ((card->state == CARD_STATE_UP_LAN_ONLINE) || - (card->state == CARD_STATE_UP_LAN_OFFLINE))) { + (card->state == CARD_STATE_UP)) { recover_flag = 1; rtnl_lock(); dev_close(card->dev); diff -Nru a/drivers/s390/net/qeth_sys.c b/drivers/s390/net/qeth_sys.c --- a/drivers/s390/net/qeth_sys.c Tue May 4 21:53:36 2004 +++ b/drivers/s390/net/qeth_sys.c Tue May 4 21:53:36 2004 @@ -1,6 +1,6 @@ /* * - * linux/drivers/s390/net/qeth_sys.c ($Revision: 1.19 $) + * linux/drivers/s390/net/qeth_sys.c ($Revision: 1.24 $) * * Linux on zSeries OSA Express and HiperSockets support * This file contains code related to sysfs. @@ -41,10 +41,11 @@ return sprintf(buf, "HARDSETUP\n"); case CARD_STATE_SOFTSETUP: return sprintf(buf, "SOFTSETUP\n"); - case CARD_STATE_UP_LAN_OFFLINE: - return sprintf(buf, "UP (LAN OFFLINE)\n"); - case CARD_STATE_UP_LAN_ONLINE: + case CARD_STATE_UP: + if (card->lan_online) return sprintf(buf, "UP (LAN ONLINE)\n"); + else + return sprintf(buf, "UP (LAN OFFLINE)\n"); case CARD_STATE_RECOVER: return sprintf(buf, "RECOVER\n"); default: @@ -293,7 +294,8 @@ { struct qeth_card *card = dev->driver_data; char *tmp; - unsigned int cnt; + int cnt, old_cnt; + int rc; if (!card) return -EINVAL; @@ -302,12 +304,15 @@ (card->state != CARD_STATE_RECOVER)) return -EPERM; - cnt = simple_strtoul(buf, &tmp, 16); + old_cnt = card->qdio.in_buf_pool.buf_count; + cnt = simple_strtoul(buf, &tmp, 10); cnt = (cnt < QETH_IN_BUF_COUNT_MIN) ? QETH_IN_BUF_COUNT_MIN : ((cnt > QETH_IN_BUF_COUNT_MAX) ? QETH_IN_BUF_COUNT_MAX : cnt); - card->qdio.in_buf_pool.buf_count = cnt; - /* TODO: steel/add buffers from/to a running card's buffer pool (?) */ - + if (old_cnt != cnt) { + if ((rc = qeth_realloc_buffer_pool(card, cnt))) + PRINT_WARN("Error (%d) while setting " + "buffer count.\n", rc); + } return count; } @@ -356,45 +361,31 @@ if (!strcmp(tmp, "no_router")){ route->type = NO_ROUTER; - goto check_reset; - } - - if (card->info.type == QETH_CARD_TYPE_IQD) { - if (!strcmp(tmp, "primary_connector")) { - route->type = PRIMARY_CONNECTOR; - } else if (!strcmp(tmp, "secondary_connector")) { - route->type = SECONDARY_CONNECTOR; - } else if (!strcmp(tmp, "multicast_router")) { - route->type = MULTICAST_ROUTER; - } else - goto out_inval; + } else if (!strcmp(tmp, "primary_connector")) { + route->type = PRIMARY_CONNECTOR; + } else if (!strcmp(tmp, "secondary_connector")) { + route->type = SECONDARY_CONNECTOR; + } else if (!strcmp(tmp, "multicast_router")) { + route->type = MULTICAST_ROUTER; + } else if (!strcmp(tmp, "primary_router")) { + route->type = PRIMARY_ROUTER; + } else if (!strcmp(tmp, "secondary_router")) { + route->type = SECONDARY_ROUTER; + } else if (!strcmp(tmp, "multicast_router")) { + route->type = MULTICAST_ROUTER; } else { - if (!strcmp(tmp, "primary_router")) { - route->type = PRIMARY_ROUTER; - } else if (!strcmp(tmp, "secondary_router")) { - route->type = SECONDARY_ROUTER; - } else if (!strcmp(tmp, "multicast_router")) { - if (qeth_is_ipafunc_supported(card, prot, - IPA_OSA_MC_ROUTER)) - route->type = MULTICAST_ROUTER; - else - goto out_inval; - } else - goto out_inval; + PRINT_WARN("Invalid routing type '%s'.\n", tmp); + return -EINVAL; } -check_reset: - if (old_route_type != route->type){ + if (((card->state == CARD_STATE_SOFTSETUP) || + (card->state == CARD_STATE_UP)) && + (old_route_type != route->type)){ if (prot == QETH_PROT_IPV4) rc = qeth_setrouting_v4(card); else if (prot == QETH_PROT_IPV6) rc = qeth_setrouting_v6(card); } return count; -out_inval: - PRINT_WARN("Routing type '%s' not supported for interface %s.\n" - "Router status not changed.\n", - tmp, card->info.if_name); - return -EINVAL; } static ssize_t @@ -572,8 +563,7 @@ if (!card) return -EINVAL; - if ((card->state != CARD_STATE_UP_LAN_ONLINE) && - (card->state != CARD_STATE_UP_LAN_OFFLINE)) + if (card->state != CARD_STATE_UP) return -EPERM; i = simple_strtoul(buf, &tmp, 16); @@ -585,7 +575,6 @@ static DEVICE_ATTR(recover, 0200, NULL, qeth_dev_recover_store); -/* TODO */ static ssize_t qeth_dev_broadcast_mode_show(struct device *dev, char *buf) { @@ -603,7 +592,6 @@ "all rings":"local"); } -/* TODO */ static ssize_t qeth_dev_broadcast_mode_store(struct device *dev, const char *buf, size_t count) { @@ -642,7 +630,6 @@ static DEVICE_ATTR(broadcast_mode, 0644, qeth_dev_broadcast_mode_show, qeth_dev_broadcast_mode_store); -/* TODO */ static ssize_t qeth_dev_canonical_macaddr_show(struct device *dev, char *buf) { @@ -659,7 +646,6 @@ QETH_TR_MACADDR_CANONICAL)? 1:0); } -/* TODO */ static ssize_t qeth_dev_canonical_macaddr_store(struct device *dev, const char *buf, size_t count) diff -Nru a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c --- a/drivers/s390/scsi/zfcp_scsi.c Tue May 4 21:53:35 2004 +++ b/drivers/s390/scsi/zfcp_scsi.c Tue May 4 21:53:35 2004 @@ -31,7 +31,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.60 $" +#define ZFCP_SCSI_REVISION "$Revision: 1.61 $" #include @@ -345,7 +345,7 @@ /* reset the status for this request */ scpnt->result = 0; - /* save address of mid layer call back function */ + scpnt->host_scribble = NULL; scpnt->scsi_done = done; /* diff -Nru a/drivers/serial/8250_hcdp.c b/drivers/serial/8250_hcdp.c --- a/drivers/serial/8250_hcdp.c Tue May 4 21:53:36 2004 +++ b/drivers/serial/8250_hcdp.c Tue May 4 21:53:36 2004 @@ -11,6 +11,7 @@ */ #include +#include #include #include #include @@ -44,6 +45,7 @@ unsigned long iobase; hcdp_t hcdp; int gsi, nr; + static char options[16]; #if 0 static int shift_once = 1; #endif @@ -147,7 +149,7 @@ printk(" gsi = %d, baud rate = %lu, bits = %d, clock = %d\n", gsi, (unsigned long) hcdp_dev->baud, hcdp_dev->bits, hcdp_dev->clock_rate); - if (hcdp_dev->base_addr.space_id == ACPI_PCICONF_SPACE) + if (HCDP_PCI_UART(hcdp_dev)) printk(" PCI id: %02x:%02x:%02x, vendor ID=0x%x, " "dev ID=0x%x\n", hcdp_dev->pci_seg, hcdp_dev->pci_bus, hcdp_dev->pci_dev, @@ -179,16 +181,26 @@ printk(KERN_WARNING"warning: No support for PCI serial console\n"); return; } + + if (HCDP_IRQ_SUPPORTED(hcdp_dev)) { #ifdef CONFIG_IA64 - port.irq = acpi_register_irq(gsi, ACPI_ACTIVE_HIGH, - ACPI_EDGE_SENSITIVE); + if (HCDP_PCI_UART(hcdp_dev)) + port.irq = acpi_register_irq(gsi, + ACPI_ACTIVE_LOW, ACPI_LEVEL_SENSITIVE); + else + port.irq = acpi_register_irq(gsi, + ACPI_ACTIVE_HIGH, ACPI_EDGE_SENSITIVE); #else - port.irq = gsi; + port.irq = gsi; #endif - port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF | UPF_RESOURCES; - if (gsi) port.flags |= UPF_AUTO_IRQ; + if (HCDP_PCI_UART(hcdp_dev)) + port.flags |= UPF_SHARE_IRQ; + } + + port.flags |= UPF_SKIP_TEST | UPF_BOOT_AUTOCONF | UPF_RESOURCES; + /* * Note: the above memset() initializes port.line to 0, * so we register this port as ttyS0. @@ -197,7 +209,14 @@ printk("setup_serial_hcdp(): early_serial_setup() " "for HCDP serial console port failed. " "Will try any additional consoles in HCDP.\n"); + memset(&port, 0, sizeof(port)); continue; + } + + if (efi_uart_console_only()) { + snprintf(options, sizeof(options), "%lun%d", + hcdp_dev->baud, hcdp_dev->bits); + add_preferred_console("ttyS", port.line, options); } break; } diff -Nru a/drivers/serial/8250_hcdp.h b/drivers/serial/8250_hcdp.h --- a/drivers/serial/8250_hcdp.h Tue May 4 21:53:35 2004 +++ b/drivers/serial/8250_hcdp.h Tue May 4 21:53:35 2004 @@ -77,3 +77,6 @@ u32 num_entries; hcdp_dev_t hcdp_dev[MAX_HCDP_DEVICES]; } hcdp_t; + +#define HCDP_PCI_UART(x) (x->pci_func & 1UL<<7) +#define HCDP_IRQ_SUPPORTED(x) (x->pci_func & 1UL<<6) diff -Nru a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c --- a/drivers/serial/8250_pci.c Tue May 4 21:53:36 2004 +++ b/drivers/serial/8250_pci.c Tue May 4 21:53:36 2004 @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -305,6 +306,72 @@ } } +/* SBS Technologies Inc. PMC-OCTPRO and P-OCTAL cards */ +static int +sbs_setup(struct pci_dev *dev, struct pci_board *board, + struct serial_struct *req, int idx) +{ + unsigned int bar, offset = board->first_offset; + + bar = 0; + + if (idx < 4) { + /* first four channels map to 0, 0x100, 0x200, 0x300 */ + offset += idx * board->uart_offset; + } else if (idx < 8) { + /* last four channels map to 0x1000, 0x1100, 0x1200, 0x1300 */ + offset += idx * board->uart_offset + 0xC00; + } else /* we have only 8 ports on PMC-OCTALPRO */ + return 1; + + return setup_port(dev, req, bar, offset, board->reg_shift); +} + +/* +* This does initialization for PMC OCTALPRO cards: +* maps the device memory, resets the UARTs (needed, bc +* if the module is removed and inserted again, the card +* is in the sleep mode) and enables global interrupt. +*/ + +/* global control register offset for SBS PMC-OctalPro */ +#define OCT_REG_CR_OFF 0x500 + +static int __devinit sbs_init(struct pci_dev *dev) +{ + u8 * p; + + p = ioremap(pci_resource_start(dev, 0),pci_resource_len(dev,0)); + + if (p == NULL) + return -ENOMEM; + /* Set bit-4 Control Register (UART RESET) in to reset the uarts */ + writeb(0x10,p + OCT_REG_CR_OFF); + udelay(50); + writeb(0x0,p + OCT_REG_CR_OFF); + + /* Set bit-2 (INTENABLE) of Control Register */ + writeb(0x4, p + OCT_REG_CR_OFF); + iounmap(p); + + return 0; +} + +/* + * Disables the global interrupt of PMC-OctalPro + */ + +static void __devexit sbs_exit(struct pci_dev *dev) +{ + u8 * p; + + p = ioremap(pci_resource_start(dev, 0),pci_resource_len(dev,0)); + if (p != NULL) { + writeb(0, p + OCT_REG_CR_OFF); + } + iounmap(p); +} + /* * SIIG serial cards have an PCI interface chip which also controls * the UART clocking frequency. Each UART can be clocked independently @@ -525,7 +592,7 @@ else offset += idx * board->uart_offset; - maxnr = (pci_resource_len(dev, bar) - board->uart_offset) / + maxnr = (pci_resource_len(dev, bar) - board->first_offset) / (8 << board->reg_shift); if (board->flags & FL_REGION_SZ_CAP && idx >= maxnr) @@ -534,6 +601,15 @@ return setup_port(dev, req, bar, offset, board->reg_shift); } +/* This should be in linux/pci_ids.h */ +#define PCI_VENDOR_ID_SBSMODULARIO 0x124B +#define PCI_SUBVENDOR_ID_SBSMODULARIO 0x124B +#define PCI_DEVICE_ID_OCTPRO 0x0001 +#define PCI_SUBDEVICE_ID_OCTPRO232 0x0108 +#define PCI_SUBDEVICE_ID_OCTPRO422 0x0208 +#define PCI_SUBDEVICE_ID_POCTAL232 0x0308 +#define PCI_SUBDEVICE_ID_POCTAL422 0x0408 + /* * Master list of serial port init/setup/exit quirks. * This does not describe the general nature of the port. @@ -619,6 +695,55 @@ .exit = __devexit_p(pci_plx9050_exit), }, /* + * SBS Technologies, Inc., PMC-OCTALPRO 232 + */ + { + .vendor = PCI_VENDOR_ID_SBSMODULARIO, + .device = PCI_DEVICE_ID_OCTPRO, + .subvendor = PCI_SUBVENDOR_ID_SBSMODULARIO, + .subdevice = PCI_SUBDEVICE_ID_OCTPRO232, + .init = sbs_init, + .setup = sbs_setup, + .exit = sbs_exit + }, + /* + * SBS Technologies, Inc., PMC-OCTALPRO 422 + */ + { + .vendor = PCI_VENDOR_ID_SBSMODULARIO, + .device = PCI_DEVICE_ID_OCTPRO, + .subvendor = PCI_SUBVENDOR_ID_SBSMODULARIO, + .subdevice = PCI_SUBDEVICE_ID_OCTPRO422, + .init = sbs_init, + .setup = sbs_setup, + .exit = sbs_exit + }, + /* + * SBS Technologies, Inc., P-Octal 232 + */ + { + .vendor = PCI_VENDOR_ID_SBSMODULARIO, + .device = PCI_DEVICE_ID_OCTPRO, + .subvendor = PCI_SUBVENDOR_ID_SBSMODULARIO, + .subdevice = PCI_SUBDEVICE_ID_POCTAL232, + .init = sbs_init, + .setup = sbs_setup, + .exit = sbs_exit + }, + /* + * SBS Technologies, Inc., P-Octal 422 + */ + { + .vendor = PCI_VENDOR_ID_SBSMODULARIO, + .device = PCI_DEVICE_ID_OCTPRO, + .subvendor = PCI_SUBVENDOR_ID_SBSMODULARIO, + .subdevice = PCI_SUBDEVICE_ID_POCTAL422, + .init = sbs_init, + .setup = sbs_setup, + .exit = sbs_exit + }, + + /* * SIIG cards. * It is not clear whether these could be collapsed. */ @@ -944,8 +1069,19 @@ pbn_computone_4, pbn_computone_6, pbn_computone_8, + pbn_sbsxrsio, }; +/* + * uart_offset - the space between channels + * reg_shift - describes how the UART registers are mapped + * to PCI memory by the card. + * For example IER register on SBS, Inc. PMC-OctPro is located at + * offset 0x10 from the UART base, while UART_IER is defined as 1 + * in include/linux/serial_reg.h, + * see first lines of serial_in() and serial_out() in 8250.c +*/ + static struct pci_board pci_boards[] __devinitdata = { [pbn_default] = { .flags = FL_BASE0, @@ -1348,6 +1484,13 @@ .reg_shift = 2, .first_offset = 0x200, }, + [pbn_sbsxrsio] = { + .flags = FL_BASE0, + .num_ports = 8, + .base_baud = 460800, + .uart_offset = 256, + .reg_shift = 4, + } }; /* @@ -1755,26 +1898,43 @@ 0x10b5, 0x106a, 0, 0, pbn_plx_romulus }, { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_QSC100, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, pbn_b1_4_115200 }, { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_DSC100, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, pbn_b1_2_115200 }, { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_ESC100D, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, pbn_b1_8_115200 }, { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_ESC100M, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, pbn_b1_8_115200 }, { PCI_VENDOR_ID_SPECIALIX, PCI_DEVICE_ID_OXSEMI_16PCI954, - PCI_VENDOR_ID_SPECIALIX, PCI_SUBDEVICE_ID_SPECIALIX_SPEED4, 0, 0, + PCI_VENDOR_ID_SPECIALIX, PCI_SUBDEVICE_ID_SPECIALIX_SPEED4, 0, 0, pbn_b0_4_921600 }, { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, pbn_b0_4_115200 }, { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI952, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, pbn_b0_bt_2_921600 }, + + /* + * SBS Technologies, Inc. P-Octal and PMC-OCTPRO cards, + * from skokodyn@yahoo.com + */ + { PCI_VENDOR_ID_SBSMODULARIO, PCI_DEVICE_ID_OCTPRO, + PCI_SUBVENDOR_ID_SBSMODULARIO, PCI_SUBDEVICE_ID_OCTPRO232, 0, 0, + pbn_sbsxrsio }, + { PCI_VENDOR_ID_SBSMODULARIO, PCI_DEVICE_ID_OCTPRO, + PCI_SUBVENDOR_ID_SBSMODULARIO, PCI_SUBDEVICE_ID_OCTPRO422, 0, 0, + pbn_sbsxrsio }, + { PCI_VENDOR_ID_SBSMODULARIO, PCI_DEVICE_ID_OCTPRO, + PCI_SUBVENDOR_ID_SBSMODULARIO, PCI_SUBDEVICE_ID_POCTAL232, 0, 0, + pbn_sbsxrsio }, + { PCI_VENDOR_ID_SBSMODULARIO, PCI_DEVICE_ID_OCTPRO, + PCI_SUBVENDOR_ID_SBSMODULARIO, PCI_SUBDEVICE_ID_POCTAL422, 0, 0, + pbn_sbsxrsio }, /* * Digitan DS560-558, from jimd@esoft.com diff -Nru a/drivers/serial/uart00.c b/drivers/serial/uart00.c --- a/drivers/serial/uart00.c Tue May 4 21:53:35 2004 +++ b/drivers/serial/uart00.c Tue May 4 21:53:35 2004 @@ -7,6 +7,8 @@ * Deep Blue Solutions Ltd. * Copyright 2001 Altera Corporation * + * Update for 2.6.4 by Dirk Behme + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -32,7 +34,6 @@ #include #include #include -#include #include #include @@ -251,7 +252,7 @@ wake_up_interruptible(&port->info->delta_msr_wait); } -static void uart00_int(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t uart00_int(int irq, void *dev_id, struct pt_regs *regs) { struct uart_port *port = dev_id; unsigned int status, pass_counter = 0; @@ -269,6 +270,8 @@ status = UART_GET_INT_STATUS(port); } while (status); + + return IRQ_HANDLED; } static unsigned int uart00_tx_empty(struct uart_port *port) @@ -613,7 +616,7 @@ static int __init uart00_console_setup(struct console *co, char *options) { struct uart_port *port; - int baud = 38400; + int baud = 115200; int bits = 8; int parity = 'n'; int flow = 'n'; @@ -639,7 +642,7 @@ .setup = uart00_console_setup, .flags = CON_PRINTBUFFER, .index = 0, - .data = &uart00_reg; + .data = &uart00_reg, }; static int __init uart00_console_init(void) @@ -669,9 +672,10 @@ struct uart_port *port; }; +#ifdef CONFIG_PLD_HOTSWAP + static struct dev_port_entry dev_port_map[UART_NR]; -#ifdef CONFIG_PLD_HOTSWAP /* * Keep a mapping of dev_info addresses -> port lines to use when * removing ports dev==NULL indicates unused entry diff -Nru a/drivers/usb/core/inode.c b/drivers/usb/core/inode.c --- a/drivers/usb/core/inode.c Tue May 4 21:53:35 2004 +++ b/drivers/usb/core/inode.c Tue May 4 21:53:35 2004 @@ -766,7 +766,7 @@ return 0; } -void __exit usbfs_cleanup(void) +void usbfs_cleanup(void) { usb_deregister(&usbdevfs_driver); unregister_filesystem(&usb_fs_type); diff -Nru a/drivers/video/acornfb.c b/drivers/video/acornfb.c --- a/drivers/video/acornfb.c Tue May 4 21:53:36 2004 +++ b/drivers/video/acornfb.c Tue May 4 21:53:36 2004 @@ -67,12 +67,37 @@ */ #define NR_MONTYPES 6 static struct fb_monspecs monspecs[NR_MONTYPES] __initdata = { - { 15469, 15781, 49, 51, 0 }, /* TV */ - { 0, 99999, 0, 199, 0 }, /* Multi Freq */ - { 58608, 58608, 64, 64, 0 }, /* Hi-res mono */ - { 30000, 70000, 60, 60, 0 }, /* VGA */ - { 30000, 70000, 56, 75, 0 }, /* SVGA */ - { 30000, 70000, 60, 60, 0 } + { /* TV */ + .hfmin = 15469, + .hfmax = 15781, + .vfmin = 49, + .vfmax = 51, + }, { /* Multi Freq */ + .hfmin = 0, + .hfmax = 99999, + .vfmin = 0, + .vfmax = 199, + }, { /* Hi-res mono */ + .hfmin = 58608, + .hfmax = 58608, + .vfmin = 64, + .vfmax = 64, + }, { /* VGA */ + .hfmin = 30000, + .hfmax = 70000, + .vfmin = 60, + .vfmax = 60, + }, { /* SVGA */ + .hfmin = 30000, + .hfmax = 70000, + .vfmin = 56, + .vfmax = 75, + }, { + .hfmin = 30000, + .hfmax = 70000, + .vfmin = 60, + .vfmax = 60, + } }; static struct fb_info fb_info; diff -Nru a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c --- a/drivers/video/sa1100fb.c Tue May 4 21:53:35 2004 +++ b/drivers/video/sa1100fb.c Tue May 4 21:53:35 2004 @@ -1615,7 +1615,10 @@ /* Fake monspecs to fill in fbinfo structure */ static struct fb_monspecs monspecs __initdata = { - 30000, 70000, 50, 65, 0 /* Generic */ + .hfmin = 30000, + .hfmax = 70000, + .vfmin = 50, + .vfmax = 65, }; diff -Nru a/fs/cifs/AUTHORS b/fs/cifs/AUTHORS --- a/fs/cifs/AUTHORS Tue May 4 21:53:35 2004 +++ b/fs/cifs/AUTHORS Tue May 4 21:53:35 2004 @@ -21,11 +21,13 @@ Andi Kleen Amrut Joshi Shobhit Dayal +Sergey Vlasov Test case and Bug Report contributors ------------------------------------- Thanks to those in the community who have submitted detailed bug reports and debug of problems they have found: Jochen Dolze, David Blaine, Rene Scharfe, Martin Josefsson, Alexander Wild, Anthony Liguori, -Urban Widmark, Massimiliano Ferrero, Howard Owen and others. +Lars Muller, Urban Widmark, Massimiliano Ferrero, Howard Owen, +Kieron Briggs and others. diff -Nru a/fs/cifs/CHANGES b/fs/cifs/CHANGES --- a/fs/cifs/CHANGES Tue May 4 21:53:36 2004 +++ b/fs/cifs/CHANGES Tue May 4 21:53:36 2004 @@ -1,3 +1,20 @@ +Version 1.13 +------------ +Fix open of files in which O_CREATE can cause the mode to change in +some cases. Fix case in which retry of write overlaps file close. +Fix PPC64 build error. Reduce excessive stack usage in smb password +hashing. + +Version 1.12 +------------ +Fixes for large file copy, signal handling, socket retry, buffer +allocation and low memory situations. + +Version 1.11 +------------ +Better port 139 support to Windows servers (RFC1001/RFC1002 Session_Initialize) +also now allowing support for specifying client netbiosname. NT4 support added. + Version 1.10 ------------ Fix reconnection (and certain failed mounts) to properly wake up the diff -Nru a/fs/cifs/README b/fs/cifs/README --- a/fs/cifs/README Tue May 4 21:53:36 2004 +++ b/fs/cifs/README Tue May 4 21:53:36 2004 @@ -148,8 +148,8 @@ Restrictions ============ Servers must support the NTLM SMB dialect (which is the most recent, supported -by Samba and Windows NT, 2000 and XP and many other SMB/CIFS servers) and -servers must support either "pure-TCP" (port 445 TCP/IP CIFS connections) or RFC +by Samba and Windows NT version 4, 2000 and XP and many other SMB/CIFS servers) +Servers must support either "pure-TCP" (port 445 TCP/IP CIFS connections) or RFC 1001/1002 support for "Netbios-Over-TCP/IP." Neither of these is likely to be a problem as most servers support this. IPv6 support is planned for the future. @@ -275,6 +275,15 @@ and for more extensive tracing including the start of smb requests and responses echo 1 > /proc/fs/cifs/traceSMB + +Three other experimental features are under development and to test +require enabling an ifdef (e.g. by adding "#define CIFS_FCNTL" in cifsglob.h) + + CIFS_QUOTA + + CIFS_XATTR + + CIFS_FCNTL (fcntl needed for support of directory change notification) Also note that "cat /proc/fs/cifs/DebugData" will display some information about the active sessions and the shares that are mounted. Note: NTLMv2 enablement diff -Nru a/fs/cifs/TODO b/fs/cifs/TODO --- a/fs/cifs/TODO Tue May 4 21:53:36 2004 +++ b/fs/cifs/TODO Tue May 4 21:53:36 2004 @@ -65,14 +65,27 @@ 3) create of new files to FAT partitions on Windows servers can succeed but still return access denied (appears to be Windows not client problem). NTFS partitions do not have this problem. +4) debug connectathon special test case nfs_idem (which does +some invalid symlink naming, or at least what Samba thinks +is an invalid symlink target). +5) debug connectation lock test case 10 which fails against +Samba (may be unmappable due to POSIX to Windows lock model +differences but worth investigating). Also debug Samba to +see why lock test case 7 takes longer to complete to Samba +than to Windows. Misc testing to do ================= 1) check out max path names and max path name components against various server types. -2) Run dbench. Modify file portion of ltp so it can run against a mounted network +2) Modify file portion of ltp so it can run against a mounted network share and run it against cifs vfs. -3) Additional performance testing and optimization using iozone and similar tools. +3) Additional performance testing and optimization using iozone and similar - +there are some easy changes that can be done to parallelize sequential writes, +and when signing is disabled to request larger read sizes (larger than +negotiated size) and send larger write sizes to modern servers. + +4) More exhaustively test the recently added NT4 support diff -Nru a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c --- a/fs/cifs/cifsfs.c Tue May 4 21:53:36 2004 +++ b/fs/cifs/cifsfs.c Tue May 4 21:53:36 2004 @@ -672,8 +672,10 @@ /* down(&inode->i_sem);*/ if (S_ISREG(inode->i_mode)) { rc = filemap_fdatawrite(inode->i_mapping); - if(CIFS_I(inode)->clientCanCacheRead == 0) + if(CIFS_I(inode)->clientCanCacheRead == 0) { + filemap_fdatawait(inode->i_mapping); invalidate_remote_inode(inode); + } } else rc = 0; /* up(&inode->i_sem);*/ @@ -773,5 +775,6 @@ MODULE_LICENSE("GPL"); /* combination of LGPL + GPL source behaves as GPL */ MODULE_DESCRIPTION ("VFS to access servers complying with the SNIA CIFS Specification e.g. Samba and Windows"); +MODULE_VERSION(CIFS_VERSION); module_init(init_cifs) module_exit(exit_cifs) diff -Nru a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h --- a/fs/cifs/cifsfs.h Tue May 4 21:53:35 2004 +++ b/fs/cifs/cifsfs.h Tue May 4 21:53:35 2004 @@ -93,4 +93,5 @@ size_t, int); extern ssize_t cifs_getxattr(struct dentry *, const char *, void *, size_t); extern ssize_t cifs_listxattr(struct dentry *, char *, size_t); -#endif /* _CIFSSMB_H */ +#define CIFS_VERSION "1.13" +#endif /* _CIFSFS_H */ diff -Nru a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h --- a/fs/cifs/cifsglob.h Tue May 4 21:53:35 2004 +++ b/fs/cifs/cifsglob.h Tue May 4 21:53:35 2004 @@ -139,6 +139,7 @@ int capabilities; /* allow selective disabling of caps by smb sess */ __u16 timeZone; char cryptKey[CIFS_CRYPTO_KEY_SIZE]; + char workstation_RFC1001_name[16]; /* 16th byte is always zero */ }; /* diff -Nru a/fs/cifs/cifspdu.h b/fs/cifs/cifspdu.h --- a/fs/cifs/cifspdu.h Tue May 4 21:53:36 2004 +++ b/fs/cifs/cifspdu.h Tue May 4 21:53:36 2004 @@ -641,6 +641,9 @@ #define OPLOCK_BATCH 2 #define OPLOCK_READ 3 /* level 2 oplock */ +/* open response for CreateAction shifted left */ +#define CIFS_CREATE_ACTION 0x20000 /* file created */ + typedef struct smb_com_open_rsp { struct smb_hdr hdr; /* wct = 34 BB */ __u8 AndXCommand; diff -Nru a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c --- a/fs/cifs/cifssmb.c Tue May 4 21:53:35 2004 +++ b/fs/cifs/cifssmb.c Tue May 4 21:53:35 2004 @@ -446,8 +446,8 @@ if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { name_len = cifs_strtoUCS((wchar_t *) pSMB->DirName, dirName, 530 - /* find define for this maxpathcomponent */ - , nls_codepage); + /* find define for this maxpathcomponent */ + , nls_codepage); name_len++; /* trailing null */ name_len *= 2; } else { /* BB improve the check for buffer overruns BB */ @@ -594,7 +594,10 @@ } else { *pOplock = pSMBr->OplockLevel; /* one byte no need to le_to_cpu */ *netfid = pSMBr->Fid; /* cifs fid stays in le */ - /* Do we care about the CreateAction in any cases? */ + /* Let caller know file was created so we can set the mode. */ + /* Do we care about the CreateAction in any other cases? */ + if(cpu_to_le32(FILE_CREATE) == pSMBr->CreateAction) + *pOplock |= CIFS_CREATE_ACTION; if(pfile_info) { memcpy((char *)pfile_info,(char *)&pSMBr->CreationTime, 36 /* CreationTime to Attributes */); @@ -1509,7 +1512,7 @@ TRANSACTION2_QPI_REQ *pSMB = NULL; TRANSACTION2_QPI_RSP *pSMBr = NULL; int rc = 0; - int bytes_returned; + int bytes_returned = 0; int name_len; cFYI(1, ("In QPathInfo (Unix) the path %s", searchName)); @@ -1565,9 +1568,13 @@ } else { /* decode response */ pSMBr->DataOffset = le16_to_cpu(pSMBr->DataOffset); /* BB also check if enough total bytes returned */ - if ((pSMBr->ByteCount < 40) || (pSMBr->DataOffset > 512)) + if ((pSMBr->ByteCount < sizeof(FILE_UNIX_BASIC_INFO)) || + (pSMBr->DataOffset > 512) || + (pSMBr->DataOffset < sizeof(struct smb_hdr))) { + cFYI(1,("UnixQPathinfo invalid data offset %d bytes returned %d", + (int)pSMBr->DataOffset,bytes_returned)); rc = -EIO; /* bad smb */ - else { + } else { memcpy((char *) pFindData, (char *) &pSMBr->hdr.Protocol + pSMBr->DataOffset, @@ -2463,7 +2470,8 @@ int bytes_returned = 0; __u32 tmp; - cFYI(1, ("SetFileSize (via SetFileInfo) %lld",size)); + cFYI(1, ("SetFileSize (via SetFileInfo) %lld", + (long long)size)); rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, (void **) &pSMBr); if (rc) diff -Nru a/fs/cifs/connect.c b/fs/cifs/connect.c --- a/fs/cifs/connect.c Tue May 4 21:53:36 2004 +++ b/fs/cifs/connect.c Tue May 4 21:53:36 2004 @@ -26,6 +26,8 @@ #include #include #include +#include +#include #include #include #include "cifspdu.h" @@ -54,7 +56,7 @@ char *UNC; char *UNCip; char *iocharset; /* local code page for mapping to and from Unicode */ - char *source_rfc1001_name; /* netbios name of client */ + char source_rfc1001_name[16]; /* netbios name of client */ uid_t linux_uid; gid_t linux_gid; mode_t file_mode; @@ -67,8 +69,11 @@ unsigned short int port; }; -int ipv4_connect(struct sockaddr_in *psin_server, struct socket **csocket); -int ipv6_connect(struct sockaddr_in6 *psin_server, struct socket **csocket); +static int ipv4_connect(struct sockaddr_in *psin_server, + struct socket **csocket, + char * netb_name); +static int ipv6_connect(struct sockaddr_in6 *psin_server, + struct socket **csocket); /* @@ -149,7 +154,9 @@ if(server->protocolType == IPV6) { rc = ipv6_connect(&server->addr.sockAddr6,&server->ssocket); } else { - rc = ipv4_connect(&server->addr.sockAddr, &server->ssocket); + rc = ipv4_connect(&server->addr.sockAddr, + &server->ssocket, + server->workstation_RFC1001_name); } if(rc) { set_current_state(TASK_INTERRUPTIBLE); @@ -160,7 +167,6 @@ wake_up(&server->response_q); } } - return rc; } @@ -182,7 +188,7 @@ daemonize("cifsd"); allow_signal(SIGKILL); - + current->flags |= PF_MEMALLOC; server->tsk = current; /* save process info to wake at shutdown */ cFYI(1, ("Demultiplex PID: %d", current->pid)); @@ -196,9 +202,10 @@ memset(smb_buffer, 0, sizeof (struct smb_hdr)); if (smb_buffer == NULL) { - cERROR(1, - ("Can not get mem for SMB response buffer ")); - return -ENOMEM; + cERROR(1,("Can not get memory for SMB response")); + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(HZ * 3); /* give system time to free memory */ + continue; } iov.iov_base = smb_buffer; iov.iov_len = sizeof (struct smb_hdr) - 1; @@ -249,7 +256,7 @@ pdu_length = 4 + ntohl(smb_buffer->smb_buf_length); /* Ony read pdu_length after below checks for too short (due to e.g. int overflow) and too long ie beyond end of buf */ - cFYI(1, ("Peek length rcvd: %d with smb length: %d", length, pdu_length)); + cFYI(1, ("Peek length rcvd: 0x%x beginning 0x%x)", length, pdu_length)); temp = (char *) smb_buffer; if (length > 3) { @@ -456,12 +463,21 @@ { char *value; char *data; - int temp_len, i, j; + unsigned int temp_len, i, j; char separator[2]; separator[0] = ','; separator[1] = 0; + memset(vol->source_rfc1001_name,0x20,15); + for(i=0;i < strnlen(system_utsname.nodename,15);i++) { + /* does not have to be a perfect mapping since the field is + informational, only used for servers that do not support + port 445 and it can be overridden at mount time */ + vol->source_rfc1001_name[i] = toupper(system_utsname.nodename[i]); + } + vol->source_rfc1001_name[15] = 0; + vol->linux_uid = current->uid; /* current->euid instead? */ vol->linux_gid = current->gid; vol->dir_mode = S_IRWXUGO; @@ -590,6 +606,8 @@ printk(KERN_WARNING "CIFS: invalid domain name\n"); return 1; /* needs_arg; */ } + /* BB are there cases in which a comma can be valid in + a domain name and need special handling? */ if (strnlen(value, 65) < 65) { vol->domainname = value; cFYI(1, ("Domain name set")); @@ -652,12 +670,25 @@ simple_strtoul(value, &value, 0); } } else if (strnicmp(data, "netbiosname", 4) == 0) { - if (!value || !*value) { - vol->source_rfc1001_name = NULL; - } else if (strnlen(value, 17) < 17) { - vol->source_rfc1001_name = value; + if (!value || !*value || (*value == ' ')) { + cFYI(1,("invalid (empty) netbiosname specified")); } else { - printk(KERN_WARNING "CIFS: netbiosname too long (more than 15)\n"); + memset(vol->source_rfc1001_name,0x20,15); + for(i=0;i<15;i++) { + /* BB are there cases in which a comma can be + valid in this workstation netbios name (and need + special handling)? */ + + /* We do not uppercase netbiosname for user */ + if (value[i]==0) + break; + else + vol->source_rfc1001_name[i] = value[i]; + } + /* The string has 16th byte zero still from + set at top of the function */ + if((i==15) && (value[i] != 0)) + printk(KERN_WARNING "CIFS: netbiosname longer than 15 and was truncated.\n"); } } else if (strnicmp(data, "version", 3) == 0) { /* ignore */ @@ -845,8 +876,24 @@ return rc; } -int -ipv4_connect(struct sockaddr_in *psin_server, struct socket **csocket) +/* See RFC1001 section 14 on representation of Netbios names */ +static void rfc1002mangle(char * target,char * source, unsigned int length) +{ + unsigned int i,j; + + for(i=0,j=0;i<(length);i++) { + /* mask a nibble at a time and encode */ + target[j] = 'A' + (0x0F & (source[i] >> 4)); + target[j+1] = 'A' + (0x0F & source[i]); + j+=2; + } + +} + + +static int +ipv4_connect(struct sockaddr_in *psin_server, struct socket **csocket, + char * netbios_name) { int rc = 0; int connected = 0; @@ -861,11 +908,11 @@ } else { /* BB other socket options to set KEEPALIVE, NODELAY? */ cFYI(1,("Socket created")); + /* (*csocket)->sk->allocation = GFP_NOFS; */ /* BB is there equivalent in 2.6 */ } } psin_server->sin_family = AF_INET; - if(psin_server->sin_port) { /* user overrode default port */ rc = (*csocket)->ops->connect(*csocket, (struct sockaddr *) psin_server, @@ -912,11 +959,48 @@ the default. sock_setsockopt not used because it expects user space buffer */ (*csocket)->sk->sk_rcvtimeo = 7 * HZ; + + /* send RFC1001 sessinit */ + + if(psin_server->sin_port == htons(139)) { + /* some servers require RFC1001 sessinit before sending + negprot - BB check reconnection in case where second + sessinit is sent but no second negprot */ + struct rfc1002_session_packet * ses_init_buf; + struct smb_hdr * smb_buf; + ses_init_buf = cifs_kcalloc(sizeof(struct rfc1002_session_packet), GFP_KERNEL); + if(ses_init_buf) { + ses_init_buf->trailer.session_req.called_len = 32; + rfc1002mangle(ses_init_buf->trailer.session_req.called_name, + DEFAULT_CIFS_CALLED_NAME,16); + ses_init_buf->trailer.session_req.calling_len = 32; + /* calling name ends in null (byte 16) from old smb + convention. */ + if(netbios_name && (netbios_name[0] !=0)) { + rfc1002mangle(ses_init_buf->trailer.session_req.calling_name, + netbios_name,16); + } else { + rfc1002mangle(ses_init_buf->trailer.session_req.calling_name, + "LINUX_CIFS_CLNT",16); + } + ses_init_buf->trailer.session_req.scope1 = 0; + ses_init_buf->trailer.session_req.scope2 = 0; + smb_buf = (struct smb_hdr *)ses_init_buf; + /* sizeof RFC1002_SESSION_REQUEST with no scope */ + smb_buf->smb_buf_length = 0x81000044; + rc = smb_send(*csocket, smb_buf, 0x44, + (struct sockaddr *)psin_server); + kfree(ses_init_buf); + } + /* else the negprot may still work without this + even though malloc failed */ + + } return rc; } -int +static int ipv6_connect(struct sockaddr_in6 *psin_server, struct socket **csocket) { int rc = 0; @@ -1000,7 +1084,6 @@ /* cFYI(1, ("Entering cifs_mount. Xid: %d with: %s", xid, mount_data)); */ memset(&volume_info,0,sizeof(struct smb_vol)); - if (cifs_parse_mount_options(mount_data, devname, &volume_info)) { if(volume_info.UNC) kfree(volume_info.UNC); @@ -1049,6 +1132,12 @@ } else if (volume_info.UNCip){ /* BB using ip addr as server name connect to the DFS root below */ cERROR(1,("Connecting to DFS root not implemented yet")); + if(volume_info.UNC) + kfree(volume_info.UNC); + if(volume_info.password) + kfree(volume_info.password); + FreeXid(xid); + return -EINVAL; } else /* which servers DFS root would we conect to */ { cERROR(1, ("CIFS mount error: No UNC path (e.g. -o unc=//192.168.1.100/public) specified ")); @@ -1087,7 +1176,7 @@ sin_server.sin_port = htons(volume_info.port); else sin_server.sin_port = 0; - rc = ipv4_connect(&sin_server, &csocket); + rc = ipv4_connect(&sin_server,&csocket,volume_info.source_rfc1001_name); if (rc < 0) { cERROR(1, ("Error connecting to IPv4 socket. Aborting operation")); @@ -1123,6 +1212,7 @@ init_MUTEX(&srvTcp->tcpSem); kernel_thread((void *)(void *)cifs_demultiplex_thread, srvTcp, CLONE_FS | CLONE_FILES | CLONE_VM); + memcpy(srvTcp->workstation_RFC1001_name, volume_info.source_rfc1001_name,16); } } @@ -1131,6 +1221,7 @@ cFYI(1, ("Existing smb sess found ")); if(volume_info.password) kfree(volume_info.password); + /* volume_info.UNC freed at end of function */ } else if (!rc) { cFYI(1, ("Existing smb sess not found ")); pSesInfo = sesInfoAlloc(); @@ -1142,7 +1233,8 @@ NIPQUAD(sin_server.sin_addr.s_addr)); } - if (!rc){ + if (!rc){ + /* volume_info.password freed at unmount */ if (volume_info.password) pSesInfo->password = volume_info.password; if (volume_info.username) @@ -1263,6 +1355,11 @@ if (tcon->ses->capabilities & CAP_UNIX) CIFSSMBQFSUnixInfo(xid, tcon, cifs_sb->local_nls); } + + /* volume_info.password is freed above when existing session found + (in which case it is not needed anymore) but when new sesion is created + the password ptr is put in the new session structure (in which case the + password will be freed at unmount time) */ if(volume_info.UNC) kfree(volume_info.UNC); FreeXid(xid); diff -Nru a/fs/cifs/dir.c b/fs/cifs/dir.c --- a/fs/cifs/dir.c Tue May 4 21:53:36 2004 +++ b/fs/cifs/dir.c Tue May 4 21:53:36 2004 @@ -179,14 +179,31 @@ if (rc) { cFYI(1, ("cifs_create returned 0x%x ", rc)); } else { - /* BB for case of overwriting existing file can we use the inode that was - passed in rather than creating new one?? */ + /* If Open reported that we actually created a file + then we now have to set the mode if possible */ + if ((cifs_sb->tcon->ses->capabilities & CAP_UNIX) && + (oplock & CIFS_CREATE_ACTION)) + CIFSSMBUnixSetPerms(xid, pTcon, full_path, mode, + (__u64)-1, + (__u64)-1, + 0 /* dev */, + cifs_sb->local_nls); + else { + /* BB implement via Windows security descriptors */ + /* eg CIFSSMBWinSetPerms(xid,pTcon,full_path,mode,-1,-1,local_nls);*/ + /* could set r/o dos attribute if mode & 0222 == 0 */ + } + + /* BB server might mask mode so we have to query for Unix case*/ if (pTcon->ses->capabilities & CAP_UNIX) rc = cifs_get_inode_info_unix(&newinode, full_path, - inode->i_sb); - else + inode->i_sb); + else { rc = cifs_get_inode_info(&newinode, full_path, buf, inode->i_sb); + if(newinode) + newinode->i_mode = mode; + } if (rc != 0) { cFYI(1,("Create worked but get_inode_info failed with rc = %d", @@ -198,21 +215,7 @@ if((nd->flags & LOOKUP_OPEN) == FALSE) { /* mknod case - do not leave file open */ CIFSSMBClose(xid, pTcon, fileHandle); - if(newinode) - newinode->i_mode = mode; - if (cifs_sb->tcon->ses->capabilities & CAP_UNIX) - CIFSSMBUnixSetPerms(xid, pTcon, full_path, mode, - (__u64)-1, - (__u64)-1, - 0 /* dev */, - cifs_sb->local_nls); - else { /* BB implement via Windows security descriptors */ - /* eg CIFSSMBWinSetPerms(xid,pTcon,full_path,mode,-1,-1,local_nls);*/ - /* in the meantime could set r/o dos attribute when perms are eg: - mode & 0222 == 0 */ - } } else if(newinode) { - newinode->i_mode = mode; pCifsFile = (struct cifsFileInfo *) kmalloc(sizeof (struct cifsFileInfo), GFP_KERNEL); @@ -231,26 +234,15 @@ pCifsInode = CIFS_I(newinode); if(pCifsInode) { list_add(&pCifsFile->flist,&pCifsInode->openFileList); - if(oplock == OPLOCK_EXCLUSIVE) { + if((oplock & 0xF) == OPLOCK_EXCLUSIVE) { pCifsInode->clientCanCacheAll = TRUE; pCifsInode->clientCanCacheRead = TRUE; cFYI(1,("Exclusive Oplock granted on inode %p",newinode)); - } else if(oplock == OPLOCK_READ) + } else if((oplock & 0xF) == OPLOCK_READ) pCifsInode->clientCanCacheRead = TRUE; } write_unlock(&GlobalSMBSeslock); - if (cifs_sb->tcon->ses->capabilities & CAP_UNIX) - CIFSSMBUnixSetPerms(xid, pTcon, full_path, inode->i_mode, - (__u64)-1, - (__u64)-1, - 0 /* dev */, - cifs_sb->local_nls); - else { /* BB implement via Windows security descriptors */ - /* eg CIFSSMBWinSetPerms(xid,pTcon,full_path,mode,-1,-1,local_nls);*/ - /* in the meantime could set r/o dos attribute when perms are eg: - mode & 0222 == 0 */ - } - } + } } } diff -Nru a/fs/cifs/file.c b/fs/cifs/file.c --- a/fs/cifs/file.c Tue May 4 21:53:35 2004 +++ b/fs/cifs/file.c Tue May 4 21:53:35 2004 @@ -62,8 +62,8 @@ read_lock(&GlobalSMBSeslock); list_for_each(tmp, &pCifsInode->openFileList) { pCifsFile = list_entry(tmp,struct cifsFileInfo, flist); - if((pCifsFile->pfile == NULL)&& (pCifsFile->pid = current->pid)){ - /* set mode ?? */ + if((pCifsFile->pfile == NULL)&& (pCifsFile->pid = current->pid)){ + /* mode set in cifs_create */ pCifsFile->pfile = file; /* needed for writepage */ file->private_data = pCifsFile; break; @@ -187,6 +187,12 @@ (file->f_dentry->d_inode->i_size == (loff_t)le64_to_cpu(buf->EndOfFile))) { cFYI(1,("inode unchanged on server")); } else { + if(file->f_dentry->d_inode->i_mapping) { + /* BB no need to lock inode until after invalidate*/ + /* since namei code should already have it locked?*/ + filemap_fdatawrite(file->f_dentry->d_inode->i_mapping); + filemap_fdatawait(file->f_dentry->d_inode->i_mapping); + } cFYI(1,("invalidating remote inode since open detected it changed")); invalidate_remote_inode(file->f_dentry->d_inode); } @@ -199,17 +205,17 @@ rc = cifs_get_inode_info(&file->f_dentry->d_inode, full_path, buf, inode->i_sb); - if(oplock == OPLOCK_EXCLUSIVE) { + if((oplock & 0xF) == OPLOCK_EXCLUSIVE) { pCifsInode->clientCanCacheAll = TRUE; pCifsInode->clientCanCacheRead = TRUE; cFYI(1,("Exclusive Oplock granted on inode %p",file->f_dentry->d_inode)); - } else if(oplock == OPLOCK_READ) + } else if((oplock & 0xF) == OPLOCK_READ) pCifsInode->clientCanCacheRead = TRUE; } else { write_unlock(&GlobalSMBSeslock); write_unlock(&file->f_owner.lock); } - if(file->f_flags & O_CREAT) { + if(oplock & CIFS_CREATE_ACTION) { /* time to set mode which we can not set earlier due to problems creating new read-only files */ if (cifs_sb->tcon->ses->capabilities & CAP_UNIX) @@ -330,11 +336,11 @@ rc = cifs_get_inode_info(&inode, full_path, buf, inode->i_sb); - if(oplock == OPLOCK_EXCLUSIVE) { + if((oplock & 0xF) == OPLOCK_EXCLUSIVE) { pCifsInode->clientCanCacheAll = TRUE; pCifsInode->clientCanCacheRead = TRUE; cFYI(1,("Exclusive Oplock granted on inode %p",file->f_dentry->d_inode)); - } else if(oplock == OPLOCK_READ) { + } else if((oplock & 0xF) == OPLOCK_READ) { pCifsInode->clientCanCacheRead = TRUE; pCifsInode->clientCanCacheAll = FALSE; } else { @@ -555,6 +561,10 @@ } open_file = (struct cifsFileInfo *) file->private_data; + if(file->f_dentry->d_inode == NULL) { + FreeXid(xid); + return -EBADF; + } if (*poffset > file->f_dentry->d_inode->i_size) long_op = 2; /* writes past end of file can take a long time */ @@ -565,7 +575,16 @@ total_written += bytes_written) { rc = -EAGAIN; while(rc == -EAGAIN) { + if(file->private_data == NULL) { + /* file has been closed on us */ + FreeXid(xid); + return total_written; + } if ((open_file->invalidHandle) && (!open_file->closePend)) { + if((file->f_dentry == NULL) || (file->f_dentry->d_inode == NULL)) { + FreeXid(xid); + return total_written; + } rc = cifs_reopen_file(file->f_dentry->d_inode,file); if(rc != 0) break; @@ -588,13 +607,19 @@ *poffset += bytes_written; long_op = FALSE; /* subsequent writes fast - 15 seconds is plenty */ } - file->f_dentry->d_inode->i_ctime = file->f_dentry->d_inode->i_mtime = - CURRENT_TIME; - if (bytes_written > 0) { - if (*poffset > file->f_dentry->d_inode->i_size) - i_size_write(file->f_dentry->d_inode, *poffset); + + /* since the write may have blocked check these pointers again */ + if(file->f_dentry) { + if(file->f_dentry->d_inode) { + file->f_dentry->d_inode->i_ctime = file->f_dentry->d_inode->i_mtime = + CURRENT_TIME; + if (bytes_written > 0) { + if (*poffset > file->f_dentry->d_inode->i_size) + i_size_write(file->f_dentry->d_inode, *poffset); + } + mark_inode_dirty_sync(file->f_dentry->d_inode); + } } - mark_inode_dirty_sync(file->f_dentry->d_inode); FreeXid(xid); return total_written; } @@ -1049,7 +1074,7 @@ } else if (bytes_read > 0) { pSMBr = (struct smb_com_read_rsp *)smb_read_data; cifs_copy_cache_pages(mapping, page_list, bytes_read, - smb_read_data + 4 /* RFC1000 hdr */ + + smb_read_data + 4 /* RFC1001 hdr */ + le16_to_cpu(pSMBr->DataOffset), &lru_pvec); i += bytes_read >> PAGE_CACHE_SHIFT; @@ -1159,7 +1184,6 @@ pfindData->EndOfFile = le64_to_cpu(pfindData->EndOfFile); cifsInfo->cifsAttrs = pfindData->ExtFileAttributes; cifsInfo->time = jiffies; - atomic_inc(&cifsInfo->inUse); /* inc on every refresh of inode info */ /* Linux can not store file creation time unfortunately so ignore it */ tmp_inode->i_atime = @@ -1172,10 +1196,12 @@ /* 2767 perms - indicate mandatory locking */ /* BB fill in uid and gid here? with help from winbind? or retrieve from NTFS stream extended attribute */ - tmp_inode->i_uid = cifs_sb->mnt_uid; - tmp_inode->i_gid = cifs_sb->mnt_gid; - /* set default mode. will override for dirs below */ - tmp_inode->i_mode = cifs_sb->mnt_file_mode; + if(atomic_read(&cifsInfo->inUse) == 0) { + tmp_inode->i_uid = cifs_sb->mnt_uid; + tmp_inode->i_gid = cifs_sb->mnt_gid; + /* set default mode. will override for dirs below */ + tmp_inode->i_mode = cifs_sb->mnt_file_mode; + } cFYI(0, ("CIFS FFIRST: Attributes came in as 0x%x", @@ -1187,7 +1213,9 @@ } else if (pfindData->ExtFileAttributes & ATTR_DIRECTORY) { *pobject_type = DT_DIR; /* override default perms since we do not lock dirs */ - tmp_inode->i_mode = cifs_sb->mnt_dir_mode; + if(atomic_read(&cifsInfo->inUse) == 0) { + tmp_inode->i_mode = cifs_sb->mnt_dir_mode; + } tmp_inode->i_mode |= S_IFDIR; } else { *pobject_type = DT_REG; @@ -1198,6 +1226,10 @@ }/* could add code here - to validate if device or weird share type? */ /* can not fill in nlink here as in qpathinfo version and Unx search */ + if(atomic_read(&cifsInfo->inUse) == 0) { + atomic_set(&cifsInfo->inUse,1); + } + i_size_write(tmp_inode,pfindData->EndOfFile); tmp_inode->i_blocks = (tmp_inode->i_blksize - 1 + pfindData->AllocationSize) >> tmp_inode->i_blkbits; @@ -1277,20 +1309,20 @@ (tmp_inode->i_blksize - 1 + pfindData->NumOfBytes) >> tmp_inode->i_blkbits; if (S_ISREG(tmp_inode->i_mode)) { - cFYI(1, (" File inode ")); + cFYI(1, ("File inode")); tmp_inode->i_op = &cifs_file_inode_ops; tmp_inode->i_fop = &cifs_file_ops; tmp_inode->i_data.a_ops = &cifs_addr_ops; } else if (S_ISDIR(tmp_inode->i_mode)) { - cFYI(1, (" Directory inode")); + cFYI(1, ("Directory inode")); tmp_inode->i_op = &cifs_dir_inode_ops; tmp_inode->i_fop = &cifs_dir_ops; } else if (S_ISLNK(tmp_inode->i_mode)) { - cFYI(1, (" Symbolic Link inode ")); + cFYI(1, ("Symbolic Link inode")); tmp_inode->i_op = &cifs_symlink_inode_ops; /* tmp_inode->i_fop = *//* do not need to set to anything */ } else { - cFYI(1, (" Init special inode ")); + cFYI(1, ("Special inode")); init_special_inode(tmp_inode, tmp_inode->i_mode, tmp_inode->i_rdev); } @@ -1356,6 +1388,11 @@ cifsFile->search_resume_name = kmalloc(cifsFile->resume_name_length, GFP_KERNEL); + if(cifsFile->search_resume_name == NULL) { + cERROR(1,("failed new resume key allocate, length %d", + cifsFile->resume_name_length)); + return; + } if(Unicode) cifs_strtoUCS((wchar_t *) cifsFile->search_resume_name, filename, len, nls_tab); @@ -1842,15 +1879,18 @@ file->f_pos++; } } - pfindData = (FILE_DIRECTORY_INFO *) ((char *) pfindData + le32_to_cpu(pfindData->NextEntryOffset)); /* works also for Unix find struct since this is the first field of both */ - /* BB also should check to make sure that pointer is not beyond the end of the SMB */ + pfindData = (FILE_DIRECTORY_INFO *) ((char *) pfindData + + le32_to_cpu(pfindData->NextEntryOffset)); + /* works also for Unix find struct since first field of both */ + /* BB also should check to ensure pointer not beyond end of SMB */ } /* end for loop */ if (findNextParms.EndofSearch != 0) { cifsFile->endOfSearch = TRUE; } } else { cifsFile->endOfSearch = TRUE; - rc = 0; /* unless parent directory disappeared - do not return error here (eg Access Denied or no more files) */ + rc = 0; /* unless parent directory disappeared - do not + return error here (eg Access Denied or no more files) */ } } } /* end switch */ diff -Nru a/fs/cifs/inode.c b/fs/cifs/inode.c --- a/fs/cifs/inode.c Tue May 4 21:53:35 2004 +++ b/fs/cifs/inode.c Tue May 4 21:53:35 2004 @@ -94,7 +94,7 @@ cFYI(1, (" Old time %ld ", cifsInfo->time)); cifsInfo->time = jiffies; cFYI(1, (" New time %ld ", cifsInfo->time)); - atomic_inc(&cifsInfo->inUse); /* inc on every refresh of inode */ + atomic_set(&cifsInfo->inUse,1); /* ok to set on every refresh of inode */ inode->i_atime = cifs_NTtimeToUnix(le64_to_cpu(findData.LastAccessTime)); @@ -238,7 +238,6 @@ cFYI(1, (" Old time %ld ", cifsInfo->time)); cifsInfo->time = jiffies; cFYI(1, (" New time %ld ", cifsInfo->time)); - atomic_inc(&cifsInfo->inUse); /* inc on every refresh of inode */ /* blksize needs to be multiple of two. So safer to default to blksize and blkbits set in superblock so 2**blkbits and blksize will match */ @@ -256,7 +255,9 @@ (" Attributes came in as 0x%x ", pfindData->Attributes)); /* set default mode. will override for dirs below */ - inode->i_mode = cifs_sb->mnt_file_mode; + if(atomic_read(&cifsInfo->inUse) == 0) + /* new inode, can safely set these fields */ + inode->i_mode = cifs_sb->mnt_file_mode; if (pfindData->Attributes & ATTR_REPARSE) { /* Can IFLNK be set as it basically is on windows with IFREG or IFDIR? */ @@ -281,8 +282,13 @@ /* BB fill in uid and gid here? with help from winbind? or retrieve from NTFS stream extended attribute */ - inode->i_uid = cifs_sb->mnt_uid; - inode->i_gid = cifs_sb->mnt_gid; + if(atomic_read(&cifsInfo->inUse) == 0) { + inode->i_uid = cifs_sb->mnt_uid; + inode->i_gid = cifs_sb->mnt_gid; + /* set so we do not keep refreshing these fields with + bad data after user has changed them in memory */ + atomic_set(&cifsInfo->inUse,1); + } if (S_ISREG(inode->i_mode)) { cFYI(1, (" File inode ")); diff -Nru a/fs/cifs/misc.c b/fs/cifs/misc.c --- a/fs/cifs/misc.c Tue May 4 21:53:36 2004 +++ b/fs/cifs/misc.c Tue May 4 21:53:36 2004 @@ -153,7 +153,7 @@ albeit slightly larger than necessary and maxbuffersize defaults to this and can not be bigger */ ret_buf = - (struct smb_hdr *) kmem_cache_alloc(cifs_req_cachep, SLAB_KERNEL); + (struct smb_hdr *) kmem_cache_alloc(cifs_req_cachep, SLAB_KERNEL | SLAB_NOFS); /* clear the first few header bytes */ if (ret_buf) { diff -Nru a/fs/cifs/rfc1002pdu.h b/fs/cifs/rfc1002pdu.h --- a/fs/cifs/rfc1002pdu.h Tue May 4 21:53:35 2004 +++ b/fs/cifs/rfc1002pdu.h Tue May 4 21:53:35 2004 @@ -42,8 +42,12 @@ __u16 length; union { struct { - __u8 called_name[16]; - __u8 calling_name[16]; + __u8 called_len; + __u8 called_name[32]; + __u8 scope1; /* null */ + __u8 calling_len; + __u8 calling_name[32]; + __u8 scope2; /* null */ } session_req; struct { __u32 retarget_ip_addr; diff -Nru a/fs/cifs/smbdes.c b/fs/cifs/smbdes.c --- a/fs/cifs/smbdes.c Tue May 4 21:53:36 2004 +++ b/fs/cifs/smbdes.c Tue May 4 21:53:36 2004 @@ -6,7 +6,7 @@ SMB authentication protocol Copyright (C) Andrew Tridgell 1998 - Modified by Steve French (sfrench@us.ibm.com) 2002,2003 + Modified by Steve French (sfrench@us.ibm.com) 2002,2004 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 @@ -44,7 +44,7 @@ should confirm it for yourself (and maybe let me know if you come up with a different answer to the one above) */ - +#include #define uchar unsigned char static uchar perm1[56] = { 57, 49, 41, 33, 25, 17, 9, @@ -191,14 +191,23 @@ dohash(char *out, char *in, char *key, int forw) { int i, j, k; - char pk1[56]; + char *pk1; char c[28]; char d[28]; - char cd[56]; + char *cd; char ki[16][48]; - char pd1[64]; + char *pd1; char l[32], r[32]; - char rl[64]; + char *rl; + + /* Have to reduce stack usage */ + pk1 = kmalloc(56+56+64+64,GFP_KERNEL); + if(pk1 == NULL) + return; + + cd = pk1 + 56; + pd1= cd + 56; + rl = pd1 + 64; permute(pk1, key, perm1, 56); @@ -223,12 +232,22 @@ } for (i = 0; i < 16; i++) { - char er[48]; - char erk[48]; + char *er; /* er[48] */ + char *erk; /* erk[48] */ char b[8][6]; - char cb[32]; - char pcb[32]; - char r2[32]; + char *cb; /* cb[32] */ + char *pcb; /* pcb[32] */ + char *r2; /* r2[32] */ + + er = kmalloc(48+48+32+32+32, GFP_KERNEL); + if(er == NULL) { + kfree(pk1); + return; + } + erk = er+48; + cb = erk+48; + pcb = cb+32; + r2 = pcb+32; permute(er, r, perm4, 48); @@ -262,11 +281,14 @@ for (j = 0; j < 32; j++) r[j] = r2[j]; + + kfree(er); } concat(rl, r, l, 32, 32); permute(out, rl, perm6, 64); + kfree(pk1); } static void @@ -291,11 +313,18 @@ smbhash(unsigned char *out, unsigned char *in, unsigned char *key, int forw) { int i; - char outb[64]; - char inb[64]; - char keyb[64]; + char *outb; /* outb[64] */ + char *inb; /* inb[64] */ + char *keyb; /* keyb[64] */ unsigned char key2[8]; + outb = kmalloc(64 * 3,GFP_KERNEL); + if(outb == NULL) + return; + + inb = outb + 64; + keyb = inb + 64; + str_to_key(key, key2); for (i = 0; i < 64; i++) { @@ -314,6 +343,7 @@ if (outb[i]) out[i / 8] |= (1 << (7 - (i % 8))); } + kfree(outb); } void diff -Nru a/fs/cifs/transport.c b/fs/cifs/transport.c --- a/fs/cifs/transport.c Tue May 4 21:53:35 2004 +++ b/fs/cifs/transport.c Tue May 4 21:53:35 2004 @@ -149,19 +149,25 @@ temp_fs = get_fs(); /* we must turn off socket api parm checking */ set_fs(get_ds()); - rc = sock_sendmsg(ssocket, &smb_msg, smb_buf_length + 4); - while((rc == -ENOSPC) || (rc == -EAGAIN)) { - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ/2); + while(iov.iov_len > 0) { rc = sock_sendmsg(ssocket, &smb_msg, smb_buf_length + 4); + if ((rc == -ENOSPC) || (rc == -EAGAIN)) { + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(HZ/2); + continue; + } + if (rc < 0) + break; + iov.iov_base += rc; + iov.iov_len -= rc; } set_fs(temp_fs); if (rc < 0) { - cERROR(1, - ("Error %d sending data on socket to server.", rc)); - } else + cERROR(1,("Error %d sending data on socket to server.", rc)); + } else { rc = 0; + } return rc; } @@ -239,7 +245,7 @@ but we still give response a change to complete */ if(midQ->midState & MID_REQUEST_SUBMITTED) { set_current_state(TASK_UNINTERRUPTIBLE); - timeout = schedule_timeout(2 * HZ); + timeout = sleep_on_timeout(&ses->server->response_q,2 * HZ); } } else { /* using normal timeout */ /* timeout = wait_event_interruptible_timeout(ses->server->response_q, @@ -250,44 +256,38 @@ /* Can not allow user interrupts- wreaks havoc with performance */ if(midQ->midState & MID_REQUEST_SUBMITTED) { set_current_state(TASK_UNINTERRUPTIBLE); - timeout = schedule_timeout(timeout); + timeout = sleep_on_timeout(&ses->server->response_q,timeout); } } - if (signal_pending(current)) { - if (midQ->resp_buf == NULL) - rc = -EINTR; /* BB are we supposed to return -ERESTARTSYS ? */ - DeleteMidQEntry(midQ); - return rc; /* why bother returning an error if it succeeded */ - } else { /* BB spinlock protect this against races with demux thread */ - spin_lock(&GlobalMid_Lock); - if (midQ->resp_buf) { - spin_unlock(&GlobalMid_Lock); - receive_len = - be32_to_cpu(midQ->resp_buf->smb_buf_length); - } else { - cFYI(1,("No response buffer")); - if(midQ->midState == MID_REQUEST_SUBMITTED) { - if(ses->server->tcpStatus == CifsExiting) - rc = -EHOSTDOWN; - else { - ses->server->tcpStatus = CifsNeedReconnect; - midQ->midState = MID_RETRY_NEEDED; - } + + spin_lock(&GlobalMid_Lock); + if (midQ->resp_buf) { + spin_unlock(&GlobalMid_Lock); + receive_len = be32_to_cpu(midQ->resp_buf->smb_buf_length); + } else { + cERROR(1,("No response buffer")); + if(midQ->midState == MID_REQUEST_SUBMITTED) { + if(ses->server->tcpStatus == CifsExiting) + rc = -EHOSTDOWN; + else { + ses->server->tcpStatus = CifsNeedReconnect; + midQ->midState = MID_RETRY_NEEDED; } + } - if (rc != -EHOSTDOWN) { - if(midQ->midState == MID_RETRY_NEEDED) { - rc = -EAGAIN; - cFYI(1,("marking request for retry")); - } else { - rc = -EIO; - } + if (rc != -EHOSTDOWN) { + if(midQ->midState == MID_RETRY_NEEDED) { + rc = -EAGAIN; + cFYI(1,("marking request for retry")); + } else { + rc = -EIO; } - spin_unlock(&GlobalMid_Lock); - DeleteMidQEntry(midQ); - return rc; } + spin_unlock(&GlobalMid_Lock); + DeleteMidQEntry(midQ); + return rc; } + if (receive_len > CIFS_MAX_MSGSIZE + MAX_CIFS_HDR_SIZE) { cERROR(1, diff -Nru a/fs/dquot.c b/fs/dquot.c --- a/fs/dquot.c Tue May 4 21:53:36 2004 +++ b/fs/dquot.c Tue May 4 21:53:36 2004 @@ -1325,7 +1325,6 @@ dqopt->ops[cnt] = NULL; } up(&dqopt->dqonoff_sem); -out: return 0; } diff -Nru a/fs/fat/file.c b/fs/fat/file.c --- a/fs/fat/file.c Tue May 4 21:53:35 2004 +++ b/fs/fat/file.c Tue May 4 21:53:35 2004 @@ -50,7 +50,7 @@ BUG(); return -EIO; } - if (!((unsigned long)iblock % MSDOS_SB(sb)->sec_per_clus)) { + if (!((unsigned long)iblock & (MSDOS_SB(sb)->sec_per_clus - 1))) { int error; error = fat_add_cluster(inode); diff -Nru a/fs/fat/inode.c b/fs/fat/inode.c --- a/fs/fat/inode.c Tue May 4 21:53:35 2004 +++ b/fs/fat/inode.c Tue May 4 21:53:35 2004 @@ -557,11 +557,13 @@ * 0/ i_ino - for fast, reliable lookup if still in the cache * 1/ i_generation - to see if i_ino is still valid * bit 0 == 0 iff directory - * 2/ i_pos - if ino has changed, but still in cache (hi) - * 3/ i_pos - if ino has changed, but still in cache (low) - * 4/ i_logstart - to semi-verify inode found at i_location - * 5/ parent->i_logstart - maybe used to hunt for the file on disc + * 2/ i_pos(8-39) - if ino has changed, but still in cache + * 3/ i_pos(4-7)|i_logstart - to semi-verify inode found at i_pos + * 4/ i_pos(0-3)|parent->i_logstart - maybe used to hunt for the file on disc * + * Hack for NFSv2: Maximum FAT entry number is 28bits and maximum + * i_pos is 40bits (blocknr(32) + dir offset(8)), so two 4bits + * of i_logstart is used to store the directory entry offset. */ struct dentry *fat_decode_fh(struct super_block *sb, __u32 *fh, @@ -572,7 +574,7 @@ if (fhtype != 3) return ERR_PTR(-ESTALE); - if (len < 6) + if (len < 5) return ERR_PTR(-ESTALE); return sb->s_export_op->find_exported_dentry(sb, fh, NULL, acceptable, context); @@ -585,13 +587,17 @@ __u32 *fh = inump; inode = iget(sb, fh[0]); - if (!inode || is_bad_inode(inode) || - inode->i_generation != fh[1]) { - if (inode) iput(inode); + if (!inode || is_bad_inode(inode) || inode->i_generation != fh[1]) { + if (inode) + iput(inode); inode = NULL; } if (!inode) { - loff_t i_pos = ((loff_t)fh[2] << 32) | fh[3]; + loff_t i_pos; + int i_logstart = fh[3] & 0x0fffffff; + + i_pos = (loff_t)fh[2] << 8; + i_pos |= ((fh[3] >> 24) & 0xf0) | (fh[4] >> 28); /* try 2 - see if i_pos is in F-d-c * require i_logstart to be the same @@ -599,7 +605,7 @@ */ inode = fat_iget(sb, i_pos); - if (inode && MSDOS_I(inode)->i_logstart != fh[4]) { + if (inode && MSDOS_I(inode)->i_logstart != i_logstart) { iput(inode); inode = NULL; } @@ -638,17 +644,21 @@ { int len = *lenp; struct inode *inode = de->d_inode; + u32 ipos_h, ipos_m, ipos_l; - if (len < 6) + if (len < 5) return 255; /* no room */ - *lenp = 6; + + ipos_h = MSDOS_I(inode)->i_pos >> 8; + ipos_m = (MSDOS_I(inode)->i_pos & 0xf0) << 24; + ipos_l = (MSDOS_I(inode)->i_pos & 0x0f) << 28; + *lenp = 5; fh[0] = inode->i_ino; fh[1] = inode->i_generation; - fh[2] = (__u32)(MSDOS_I(inode)->i_pos >> 32); - fh[3] = (__u32)MSDOS_I(inode)->i_pos; - fh[4] = MSDOS_I(inode)->i_logstart; + fh[2] = ipos_h; + fh[3] = ipos_m | MSDOS_I(inode)->i_logstart; spin_lock(&de->d_lock); - fh[5] = MSDOS_I(de->d_parent->d_inode)->i_logstart; + fh[4] = ipos_l | MSDOS_I(de->d_parent->d_inode)->i_logstart; spin_unlock(&de->d_lock); return 3; } diff -Nru a/fs/fat/misc.c b/fs/fat/misc.c --- a/fs/fat/misc.c Tue May 4 21:53:36 2004 +++ b/fs/fat/misc.c Tue May 4 21:53:36 2004 @@ -205,7 +205,7 @@ if (inode->i_size & (sb->s_blocksize - 1)) { fat_fs_panic(sb, "Odd directory size"); inode->i_size = (inode->i_size + sb->s_blocksize) - & ~(sb->s_blocksize - 1); + & ~((loff_t)sb->s_blocksize - 1); } inode->i_size += MSDOS_SB(sb)->cluster_size; MSDOS_I(inode)->mmu_private += MSDOS_SB(sb)->cluster_size; diff -Nru a/fs/fs-writeback.c b/fs/fs-writeback.c --- a/fs/fs-writeback.c Tue May 4 21:53:36 2004 +++ b/fs/fs-writeback.c Tue May 4 21:53:36 2004 @@ -170,17 +170,19 @@ if (!(inode->i_state & I_DIRTY) && mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) { /* - * We didn't write back all the pages. Redirty the - * inode. It is still on sb->s_dirty. + * We didn't write back all the pages. nfs_writepages() + * sometimes bales out without doing anything. Redirty + * the inode. It is still on sb->s_io. */ if (wbc->for_kupdate) { /* * For the kupdate function we leave the inode - * where it is on sb_dirty so it will get more + * at the head of sb_dirty so it will get more * writeout as soon as the queue becomes * uncongested. */ inode->i_state |= I_DIRTY_PAGES; + list_move_tail(&inode->i_list, &sb->s_dirty); } else { /* * Otherwise fully redirty the inode so that diff -Nru a/fs/jfs/jfs_dtree.c b/fs/jfs/jfs_dtree.c --- a/fs/jfs/jfs_dtree.c Tue May 4 21:53:36 2004 +++ b/fs/jfs/jfs_dtree.c Tue May 4 21:53:36 2004 @@ -982,7 +982,9 @@ split->pxdlist = &pxdlist; rc = dtSplitRoot(tid, ip, split, &rmp); - DT_PUTPAGE(rmp); + if (!rc) + DT_PUTPAGE(rmp); + DT_PUTPAGE(smp); goto freeKeyName; @@ -1876,6 +1878,9 @@ xlen = lengthPXD(pxd); xsize = xlen << JFS_SBI(sb)->l2bsize; rmp = get_metapage(ip, rbn, xsize, 1); + if (!rmp) + return -EIO; + rp = rmp->data; BT_MARK_DIRTY(rmp, ip); diff -Nru a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c --- a/fs/jfs/jfs_txnmgr.c Tue May 4 21:53:36 2004 +++ b/fs/jfs/jfs_txnmgr.c Tue May 4 21:53:36 2004 @@ -176,7 +176,6 @@ struct tlock * tlck); static void mapLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, struct tlock * tlck); -static void txAbortCommit(struct commit * cd); static void txAllocPMap(struct inode *ip, struct maplock * maplock, struct tblock * tblk); static void txForce(struct tblock * tblk); @@ -1315,7 +1314,7 @@ out: if (rc != 0) - txAbortCommit(&cd); + txAbort(tid, 1); TheEnd: jfs_info("txCommit: tid = %d, returning %d", tid, rc); @@ -2646,64 +2645,6 @@ return; } - - -/* - * txAbortCommit() - * - * function: abort commit. - * - * frees tlocks of transaction; line-locks and segment locks for all - * segments in comdata structure. frees malloc storage - * sets state of file-system to FM_MDIRTY in super-block. - * log age of page-frames in memory for which caller has - * are reset to 0 (to avoid logwarap). - */ -static void txAbortCommit(struct commit * cd) -{ - struct tblock *tblk; - tid_t tid; - lid_t lid, next; - struct metapage *mp; - - jfs_warn("txAbortCommit: cd:0x%p", cd); - - /* - * free tlocks of the transaction - */ - tid = cd->tid; - tblk = tid_to_tblock(tid); - for (lid = tblk->next; lid; lid = next) { - next = lid_to_tlock(lid)->next; - - mp = lid_to_tlock(lid)->mp; - if (mp) { - mp->lid = 0; - - /* - * reset lsn of page to avoid logwarap; - */ - if (mp->xflag & COMMIT_PAGE) - LogSyncRelease(mp); - } - - /* insert tlock at head of freelist */ - TXN_LOCK(); - txLockFree(lid); - TXN_UNLOCK(); - } - - tblk->next = tblk->last = 0; - - /* free the transaction block */ - txEnd(tid); - - /* - * mark filesystem dirty - */ - jfs_error(cd->sb, "txAbortCommit"); -} - /* * txLazyCommit(void) diff -Nru a/fs/jfs/namei.c b/fs/jfs/namei.c --- a/fs/jfs/namei.c Tue May 4 21:53:36 2004 +++ b/fs/jfs/namei.c Tue May 4 21:53:36 2004 @@ -792,14 +792,14 @@ goto out; if ((rc = dtSearch(dir, &dname, &ino, &btstack, JFS_CREATE))) - goto out; + goto free_dname; /* * create entry for new link in parent directory */ ino = ip->i_ino; if ((rc = dtInsert(tid, dir, &dname, &ino, &btstack))) - goto out; + goto free_dname; /* update object inode */ ip->i_nlink++; /* for new link */ @@ -811,6 +811,9 @@ iplist[0] = ip; iplist[1] = dir; rc = txCommit(tid, 2, &iplist[0], 0); + + free_dname: + free_UCSname(&dname); out: txEnd(tid); diff -Nru a/fs/msdos/Makefile b/fs/msdos/Makefile --- a/fs/msdos/Makefile Tue May 4 21:53:36 2004 +++ b/fs/msdos/Makefile Tue May 4 21:53:36 2004 @@ -4,4 +4,4 @@ obj-$(CONFIG_MSDOS_FS) += msdos.o -msdos-objs := namei.o msdosfs_syms.o +msdos-y := namei.o diff -Nru a/fs/msdos/msdosfs_syms.c b/fs/msdos/msdosfs_syms.c --- a/fs/msdos/msdosfs_syms.c Tue May 4 21:53:36 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,53 +0,0 @@ -/* - * linux/fs/msdos/msdosfs_syms.c - * - * Exported kernel symbols for the MS-DOS filesystem. - * These symbols are used by umsdos. - */ - -#include - -#include -#include -#include - -/* - * Support for umsdos fs - * - * These symbols are _always_ exported, in case someone - * wants to install the umsdos module later. - */ -EXPORT_SYMBOL(msdos_create); -EXPORT_SYMBOL(msdos_lookup); -EXPORT_SYMBOL(msdos_mkdir); -EXPORT_SYMBOL(msdos_rename); -EXPORT_SYMBOL(msdos_rmdir); -EXPORT_SYMBOL(msdos_unlink); - -static struct super_block *msdos_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data) -{ - return get_sb_bdev(fs_type, flags, dev_name, data, msdos_fill_super); -} - -static struct file_system_type msdos_fs_type = { - .owner = THIS_MODULE, - .name = "msdos", - .get_sb = msdos_get_sb, - .kill_sb = kill_block_super, - .fs_flags = FS_REQUIRES_DEV, -}; - -static int __init init_msdos_fs(void) -{ - return register_filesystem(&msdos_fs_type); -} - -static void __exit exit_msdos_fs(void) -{ - unregister_filesystem(&msdos_fs_type); -} - -module_init(init_msdos_fs) -module_exit(exit_msdos_fs) -MODULE_LICENSE("GPL"); diff -Nru a/fs/msdos/namei.c b/fs/msdos/namei.c --- a/fs/msdos/namei.c Tue May 4 21:53:36 2004 +++ b/fs/msdos/namei.c Tue May 4 21:53:36 2004 @@ -193,7 +193,8 @@ */ /***** Get inode using directory and name */ -struct dentry *msdos_lookup(struct inode *dir,struct dentry *dentry, struct nameidata *nd) +static struct dentry *msdos_lookup(struct inode *dir, struct dentry *dentry, + struct nameidata *nd) { struct super_block *sb = dir->i_sb; struct inode *inode = NULL; @@ -257,12 +258,8 @@ return 0; } -/* - * AV. Huh??? It's exported. Oughtta check usage. - */ - /***** Create a file */ -int msdos_create(struct inode *dir,struct dentry *dentry,int mode, +static int msdos_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd) { struct super_block *sb = dir->i_sb; @@ -307,7 +304,7 @@ } /***** Remove a directory */ -int msdos_rmdir(struct inode *dir, struct dentry *dentry) +static int msdos_rmdir(struct inode *dir, struct dentry *dentry) { struct inode *inode = dentry->d_inode; loff_t i_pos; @@ -346,7 +343,7 @@ } /***** Make a directory */ -int msdos_mkdir(struct inode *dir,struct dentry *dentry,int mode) +static int msdos_mkdir(struct inode *dir, struct dentry *dentry, int mode) { struct super_block *sb = dir->i_sb; struct buffer_head *bh; @@ -413,7 +410,7 @@ } /***** Unlink a file */ -int msdos_unlink( struct inode *dir, struct dentry *dentry) +static int msdos_unlink(struct inode *dir, struct dentry *dentry) { struct inode *inode = dentry->d_inode; loff_t i_pos; @@ -539,8 +536,8 @@ } /***** Rename, a wrapper for rename_same_dir & rename_diff_dir */ -int msdos_rename(struct inode *old_dir,struct dentry *old_dentry, - struct inode *new_dir,struct dentry *new_dentry) +static int msdos_rename(struct inode *old_dir, struct dentry *old_dentry, + struct inode *new_dir, struct dentry *new_dentry) { struct buffer_head *old_bh; struct msdos_dir_entry *old_de; @@ -576,9 +573,7 @@ return error; } - -/* The public inode operations for the msdos fs */ -struct inode_operations msdos_dir_inode_operations = { +static struct inode_operations msdos_dir_inode_operations = { .create = msdos_create, .lookup = msdos_lookup, .unlink = msdos_unlink, @@ -588,7 +583,7 @@ .setattr = fat_notify_change, }; -int msdos_fill_super(struct super_block *sb,void *data, int silent) +static int msdos_fill_super(struct super_block *sb,void *data, int silent) { int res; @@ -599,3 +594,34 @@ sb->s_root->d_op = &msdos_dentry_operations; return 0; } + +static struct super_block *msdos_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) +{ + return get_sb_bdev(fs_type, flags, dev_name, data, msdos_fill_super); +} + +static struct file_system_type msdos_fs_type = { + .owner = THIS_MODULE, + .name = "msdos", + .get_sb = msdos_get_sb, + .kill_sb = kill_block_super, + .fs_flags = FS_REQUIRES_DEV, +}; + +static int __init init_msdos_fs(void) +{ + return register_filesystem(&msdos_fs_type); +} + +static void __exit exit_msdos_fs(void) +{ + unregister_filesystem(&msdos_fs_type); +} + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Werner Almesberger"); +MODULE_DESCRIPTION("MS-DOS filesystem support"); + +module_init(init_msdos_fs) +module_exit(exit_msdos_fs) diff -Nru a/fs/nfs/direct.c b/fs/nfs/direct.c --- a/fs/nfs/direct.c Tue May 4 21:53:36 2004 +++ b/fs/nfs/direct.c Tue May 4 21:53:36 2004 @@ -455,6 +455,6 @@ } out: - dprintk("NFS: direct_IO result=%d\n", result); + dprintk("NFS: direct_IO result=%zd\n", result); return result; } diff -Nru a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c --- a/fs/nfs/nfs3proc.c Tue May 4 21:53:36 2004 +++ b/fs/nfs/nfs3proc.c Tue May 4 21:53:36 2004 @@ -374,6 +374,11 @@ }; dprintk("NFS call setattr (post-create)\n"); + if (!(sattr->ia_valid & ATTR_ATIME_SET)) + sattr->ia_valid |= ATTR_ATIME; + if (!(sattr->ia_valid & ATTR_MTIME_SET)) + sattr->ia_valid |= ATTR_MTIME; + /* Note: we could use a guarded setattr here, but I'm * not sure this buys us anything (and I'd have * to revamp the NFSv3 XDR code) */ diff -Nru a/fs/vfat/Makefile b/fs/vfat/Makefile --- a/fs/vfat/Makefile Tue May 4 21:53:36 2004 +++ b/fs/vfat/Makefile Tue May 4 21:53:36 2004 @@ -4,4 +4,4 @@ obj-$(CONFIG_VFAT_FS) += vfat.o -vfat-objs := namei.o vfatfs_syms.o +vfat-y := namei.o diff -Nru a/fs/vfat/namei.c b/fs/vfat/namei.c --- a/fs/vfat/namei.c Tue May 4 21:53:36 2004 +++ b/fs/vfat/namei.c Tue May 4 21:53:36 2004 @@ -805,7 +805,8 @@ return res ? res : -ENOENT; } -struct dentry *vfat_lookup(struct inode *dir,struct dentry *dentry, struct nameidata *nd) +static struct dentry *vfat_lookup(struct inode *dir, struct dentry *dentry, + struct nameidata *nd) { int res; struct vfat_slot_info sinfo; @@ -854,7 +855,7 @@ return dentry; } -int vfat_create(struct inode *dir,struct dentry* dentry,int mode, +static int vfat_create(struct inode *dir, struct dentry* dentry, int mode, struct nameidata *nd) { struct super_block *sb = dir->i_sb; @@ -866,24 +867,22 @@ lock_kernel(); res = vfat_add_entry(dir, &dentry->d_name, 0, &sinfo, &bh, &de); - if (res < 0) { - unlock_kernel(); - return res; - } + if (res < 0) + goto out; inode = fat_build_inode(sb, de, sinfo.i_pos, &res); brelse(bh); - if (!inode) { - unlock_kernel(); - return res; - } + if (!inode) + goto out; + res = 0; inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; mark_inode_dirty(inode); inode->i_version++; dir->i_version++; dentry->d_time = dentry->d_parent->d_inode->i_version; d_instantiate(dentry,inode); +out: unlock_kernel(); - return 0; + return res; } static void vfat_remove_entry(struct inode *dir,struct vfat_slot_info *sinfo, @@ -910,7 +909,7 @@ brelse(bh); } -int vfat_rmdir(struct inode *dir,struct dentry* dentry) +static int vfat_rmdir(struct inode *dir, struct dentry* dentry) { int res; struct vfat_slot_info sinfo; @@ -919,16 +918,13 @@ lock_kernel(); res = fat_dir_empty(dentry->d_inode); - if (res) { - unlock_kernel(); - return res; - } + if (res) + goto out; res = vfat_find(dir,&dentry->d_name,&sinfo, &bh, &de); - if (res<0) { - unlock_kernel(); - return res; - } + if (res < 0) + goto out; + res = 0; dentry->d_inode->i_nlink = 0; dentry->d_inode->i_mtime = dentry->d_inode->i_atime = CURRENT_TIME; fat_detach(dentry->d_inode); @@ -936,11 +932,12 @@ /* releases bh */ vfat_remove_entry(dir,&sinfo,bh,de); dir->i_nlink--; +out: unlock_kernel(); - return 0; + return res; } -int vfat_unlink(struct inode *dir, struct dentry* dentry) +static int vfat_unlink(struct inode *dir, struct dentry *dentry) { int res; struct vfat_slot_info sinfo; @@ -949,23 +946,21 @@ lock_kernel(); res = vfat_find(dir,&dentry->d_name,&sinfo,&bh,&de); - if (res < 0) { - unlock_kernel(); - return res; - } + if (res < 0) + goto out; dentry->d_inode->i_nlink = 0; dentry->d_inode->i_mtime = dentry->d_inode->i_atime = CURRENT_TIME; fat_detach(dentry->d_inode); mark_inode_dirty(dentry->d_inode); /* releases bh */ vfat_remove_entry(dir,&sinfo,bh,de); +out: unlock_kernel(); return res; } - -int vfat_mkdir(struct inode *dir,struct dentry* dentry,int mode) +static int vfat_mkdir(struct inode *dir,struct dentry* dentry,int mode) { struct super_block *sb = dir->i_sb; struct inode *inode = NULL; @@ -976,13 +971,11 @@ lock_kernel(); res = vfat_add_entry(dir, &dentry->d_name, 1, &sinfo, &bh, &de); - if (res < 0) { - unlock_kernel(); - return res; - } + if (res < 0) + goto out; inode = fat_build_inode(sb, de, sinfo.i_pos, &res); if (!inode) - goto out; + goto out_brelse; inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; mark_inode_dirty(inode); inode->i_version++; @@ -994,8 +987,9 @@ goto mkdir_failed; dentry->d_time = dentry->d_parent->d_inode->i_version; d_instantiate(dentry,inode); -out: +out_brelse: brelse(bh); +out: unlock_kernel(); return res; @@ -1008,12 +1002,11 @@ vfat_remove_entry(dir,&sinfo,bh,de); iput(inode); dir->i_nlink--; - unlock_kernel(); - return res; + goto out; } -int vfat_rename(struct inode *old_dir,struct dentry *old_dentry, - struct inode *new_dir,struct dentry *new_dentry) +static int vfat_rename(struct inode *old_dir, struct dentry *old_dentry, + struct inode *new_dir, struct dentry *new_dentry) { struct buffer_head *old_bh,*new_bh,*dotdot_bh; struct msdos_dir_entry *old_de,*new_de,*dotdot_de; @@ -1101,9 +1094,7 @@ } - -/* Public inode operations for the VFAT fs */ -struct inode_operations vfat_dir_inode_operations = { +static struct inode_operations vfat_dir_inode_operations = { .create = vfat_create, .lookup = vfat_lookup, .unlink = vfat_unlink, @@ -1113,7 +1104,7 @@ .setattr = fat_notify_change, }; -int vfat_fill_super(struct super_block *sb, void *data, int silent) +static int vfat_fill_super(struct super_block *sb, void *data, int silent) { int res; @@ -1128,3 +1119,34 @@ return 0; } + +static struct super_block *vfat_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) +{ + return get_sb_bdev(fs_type, flags, dev_name, data, vfat_fill_super); +} + +static struct file_system_type vfat_fs_type = { + .owner = THIS_MODULE, + .name = "vfat", + .get_sb = vfat_get_sb, + .kill_sb = kill_block_super, + .fs_flags = FS_REQUIRES_DEV, +}; + +static int __init init_vfat_fs(void) +{ + return register_filesystem(&vfat_fs_type); +} + +static void __exit exit_vfat_fs(void) +{ + unregister_filesystem(&vfat_fs_type); +} + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("VFAT filesystem support"); +MODULE_AUTHOR("Gordon Chaffee"); + +module_init(init_vfat_fs) +module_exit(exit_vfat_fs) diff -Nru a/fs/vfat/vfatfs_syms.c b/fs/vfat/vfatfs_syms.c --- a/fs/vfat/vfatfs_syms.c Tue May 4 21:53:36 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,47 +0,0 @@ -/* - * linux/fs/msdos/vfatfs_syms.c - * - * Exported kernel symbols for the VFAT filesystem. - * These symbols are used by dmsdos. - */ - -#include -#include - -#include -#include - -static struct super_block *vfat_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data) -{ - return get_sb_bdev(fs_type, flags, dev_name, data, vfat_fill_super); -} - -static struct file_system_type vfat_fs_type = { - .owner = THIS_MODULE, - .name = "vfat", - .get_sb = vfat_get_sb, - .kill_sb = kill_block_super, - .fs_flags = FS_REQUIRES_DEV, -}; - -EXPORT_SYMBOL(vfat_create); -EXPORT_SYMBOL(vfat_unlink); -EXPORT_SYMBOL(vfat_mkdir); -EXPORT_SYMBOL(vfat_rmdir); -EXPORT_SYMBOL(vfat_rename); -EXPORT_SYMBOL(vfat_lookup); - -static int __init init_vfat_fs(void) -{ - return register_filesystem(&vfat_fs_type); -} - -static void __exit exit_vfat_fs(void) -{ - unregister_filesystem(&vfat_fs_type); -} - -module_init(init_vfat_fs) -module_exit(exit_vfat_fs) -MODULE_LICENSE("GPL"); diff -Nru a/fs/xfs/linux/xfs_aops.c b/fs/xfs/linux/xfs_aops.c --- a/fs/xfs/linux/xfs_aops.c Tue May 4 21:53:36 2004 +++ b/fs/xfs/linux/xfs_aops.c Tue May 4 21:53:36 2004 @@ -108,7 +108,7 @@ struct buffer_head *bh, int uptodate) { - page_buf_t *pb = (page_buf_t *)bh->b_private; + xfs_buf_t *pb = (xfs_buf_t *)bh->b_private; ASSERT(buffer_unwritten(bh)); bh->b_end_io = NULL; @@ -265,9 +265,9 @@ STATIC struct page * xfs_probe_unwritten_page( struct address_space *mapping, - unsigned long index, + pgoff_t index, xfs_iomap_t *iomapp, - page_buf_t *pb, + xfs_buf_t *pb, unsigned long max_offset, unsigned long *fsbs, unsigned int bbits) @@ -316,7 +316,7 @@ STATIC unsigned int xfs_probe_unmapped_page( struct address_space *mapping, - unsigned long index, + pgoff_t index, unsigned int pg_offset) { struct page *page; @@ -356,8 +356,8 @@ struct buffer_head *bh, struct buffer_head *head) { - unsigned long tindex, tlast, tloff; - unsigned int len, total = 0; + pgoff_t tindex, tlast, tloff; + unsigned int pg_offset, len, total = 0; struct address_space *mapping = inode->i_mapping; /* First sum forwards in this page */ @@ -382,9 +382,9 @@ total += len; } if (tindex == tlast && - (tloff = i_size_read(inode) & (PAGE_CACHE_SIZE - 1))) { + (pg_offset = i_size_read(inode) & (PAGE_CACHE_SIZE - 1))) { total += xfs_probe_unmapped_page(mapping, - tindex, tloff); + tindex, pg_offset); } } return total; @@ -398,7 +398,7 @@ STATIC struct page * xfs_probe_delalloc_page( struct inode *inode, - unsigned long index) + pgoff_t index) { struct page *page; @@ -445,7 +445,7 @@ { struct buffer_head *bh = curr; xfs_iomap_t *tmp; - page_buf_t *pb; + xfs_buf_t *pb; loff_t offset, size; unsigned long nblocks = 0; @@ -497,8 +497,9 @@ */ if (bh == head) { struct address_space *mapping = inode->i_mapping; - unsigned long tindex, tloff, tlast, bs; - unsigned int bbits = inode->i_blkbits; + pgoff_t tindex, tloff, tlast; + unsigned long bs; + unsigned int pg_offset, bbits = inode->i_blkbits; struct page *page; tlast = i_size_read(inode) >> PAGE_CACHE_SHIFT; @@ -522,10 +523,10 @@ } if (tindex == tlast && - (tloff = (i_size_read(inode) & (PAGE_CACHE_SIZE - 1)))) { + (pg_offset = (i_size_read(inode) & (PAGE_CACHE_SIZE - 1)))) { page = xfs_probe_unwritten_page(mapping, tindex, iomapp, pb, - tloff, &bs, bbits); + pg_offset, &bs, bbits); if (page) { nblocks += bs; atomic_add(bs, &pb->pb_io_remaining); @@ -603,7 +604,8 @@ { struct buffer_head *bh_arr[MAX_BUF_PER_PAGE], *bh, *head; xfs_iomap_t *mp = iomapp, *tmp; - unsigned long end, offset, end_index; + unsigned long end, offset; + pgoff_t end_index; int i = 0, index = 0; int bbits = inode->i_blkbits; @@ -671,12 +673,12 @@ STATIC void xfs_cluster_write( struct inode *inode, - unsigned long tindex, + pgoff_t tindex, xfs_iomap_t *iomapp, int startio, int all_bh) { - unsigned long tlast; + pgoff_t tlast; struct page *page; tlast = (iomapp->iomap_offset + iomapp->iomap_bsize) >> PAGE_CACHE_SHIFT; @@ -716,7 +718,8 @@ { struct buffer_head *bh_arr[MAX_BUF_PER_PAGE], *bh, *head; xfs_iomap_t *iomp, iomap; - unsigned long p_offset = 0, end_index; + unsigned long p_offset = 0; + pgoff_t end_index; loff_t offset; unsigned long long end_offset; int len, err, i, cnt = 0, uptodate = 1; diff -Nru a/fs/xfs/linux/xfs_buf.c b/fs/xfs/linux/xfs_buf.c --- a/fs/xfs/linux/xfs_buf.c Tue May 4 21:53:35 2004 +++ b/fs/xfs/linux/xfs_buf.c Tue May 4 21:53:35 2004 @@ -31,14 +31,10 @@ */ /* - * page_buf.c - * - * The page_buf module provides an abstract buffer cache model on top of - * the Linux page cache. Cached metadata blocks for a file system are - * hashed to the inode for the block device. The page_buf module - * assembles buffer (page_buf_t) objects on demand to aggregate such - * cached pages for I/O. - * + * The xfs_buf.c code provides an abstract buffer cache model on top + * of the Linux page cache. Cached metadata blocks for a file system + * are hashed to the inode for the block device. xfs_buf.c assembles + * buffers (xfs_buf_t) on demand to aggregate such cached pages for I/O. * * Written by Steve Lord, Jim Mostek, Russell Cattelan * and Rajagopal Ananthanarayanan ("ananth") at SGI. @@ -51,7 +47,6 @@ #include #include #include -#include #include #include #include @@ -71,7 +66,7 @@ STATIC kmem_cache_t *pagebuf_cache; STATIC void pagebuf_daemon_wakeup(void); -STATIC void pagebuf_delwri_queue(page_buf_t *, int); +STATIC void pagebuf_delwri_queue(xfs_buf_t *, int); STATIC struct workqueue_struct *pagebuf_logio_workqueue; STATIC struct workqueue_struct *pagebuf_dataio_workqueue; @@ -82,7 +77,7 @@ #ifdef PAGEBUF_TRACE void pagebuf_trace( - page_buf_t *pb, + xfs_buf_t *pb, char *id, void *data, void *ra) @@ -169,8 +164,6 @@ * Mapping of multi-page buffers into contiguous virtual space */ -STATIC void *pagebuf_mapout_locked(page_buf_t *); - typedef struct a_list { void *vm_addr; struct a_list *next; @@ -229,8 +222,8 @@ STATIC void _pagebuf_initialize( - page_buf_t *pb, - pb_target_t *target, + xfs_buf_t *pb, + xfs_buftarg_t *target, loff_t range_base, size_t range_length, page_buf_flags_t flags) @@ -240,7 +233,7 @@ */ flags &= ~(PBF_LOCK|PBF_MAPPED|PBF_DONT_BLOCK|PBF_READ_AHEAD); - memset(pb, 0, sizeof(page_buf_t)); + memset(pb, 0, sizeof(xfs_buf_t)); atomic_set(&pb->pb_hold, 1); init_MUTEX_LOCKED(&pb->pb_iodonesema); INIT_LIST_HEAD(&pb->pb_list); @@ -251,12 +244,12 @@ pb->pb_file_offset = range_base; /* * Set buffer_length and count_desired to the same value initially. - * IO routines should use count_desired, which will be the same in + * I/O routines should use count_desired, which will be the same in * most cases but may be reset (e.g. XFS recovery). */ pb->pb_buffer_length = pb->pb_count_desired = range_length; pb->pb_flags = flags | PBF_NONE; - pb->pb_bn = PAGE_BUF_DADDR_NULL; + pb->pb_bn = XFS_BUF_DADDR_NULL; atomic_set(&pb->pb_pin_count, 0); init_waitqueue_head(&pb->pb_waiters); @@ -270,7 +263,7 @@ */ STATIC int _pagebuf_get_pages( - page_buf_t *pb, + xfs_buf_t *pb, int page_count, page_buf_flags_t flags) { @@ -292,164 +285,124 @@ } /* - * Walk a pagebuf releasing all the pages contained within it. + * Frees pb_pages if it was malloced. */ -STATIC inline void -_pagebuf_freepages( - page_buf_t *pb) +STATIC void +_pagebuf_free_pages( + xfs_buf_t *bp) { - int buf_index; - - for (buf_index = 0; buf_index < pb->pb_page_count; buf_index++) { - struct page *page = pb->pb_pages[buf_index]; - - if (page) { - pb->pb_pages[buf_index] = NULL; - page_cache_release(page); - } + if (bp->pb_pages != bp->pb_page_array) { + kmem_free(bp->pb_pages, + bp->pb_page_count * sizeof(struct page *)); } } /* - * pagebuf_free + * Releases the specified buffer. * - * pagebuf_free releases the specified buffer. The modification - * state of any associated pages is left unchanged. + * The modification state of any associated pages is left unchanged. + * The buffer most not be on any hash - use pagebuf_rele instead for + * hashed and refcounted buffers */ void pagebuf_free( - page_buf_t *pb) + xfs_buf_t *bp) { - PB_TRACE(pb, "free", 0); - - ASSERT(list_empty(&pb->pb_hash_list)); - - /* release any virtual mapping */ ; - if (pb->pb_flags & _PBF_ADDR_ALLOCATED) { - void *vaddr = pagebuf_mapout_locked(pb); - if (vaddr) { - free_address(vaddr); - } - } + PB_TRACE(bp, "free", 0); - if (pb->pb_flags & _PBF_MEM_ALLOCATED) { - if (pb->pb_pages) { - /* release the pages in the address list */ - if ((pb->pb_pages[0]) && - (pb->pb_flags & _PBF_MEM_SLAB)) { - kfree(pb->pb_addr); - } else { - _pagebuf_freepages(pb); - } - if (pb->pb_pages != pb->pb_page_array) - kfree(pb->pb_pages); - pb->pb_pages = NULL; - } - pb->pb_flags &= ~(_PBF_MEM_ALLOCATED|_PBF_MEM_SLAB); + ASSERT(list_empty(&bp->pb_hash_list)); + + if (bp->pb_flags & _PBF_PAGE_CACHE) { + uint i; + + if ((bp->pb_flags & PBF_MAPPED) && (bp->pb_page_count > 1)) + free_address(bp->pb_addr - bp->pb_offset); + + for (i = 0; i < bp->pb_page_count; i++) + page_cache_release(bp->pb_pages[i]); + _pagebuf_free_pages(bp); + } else if (bp->pb_flags & _PBF_KMEM_ALLOC) { + /* + * XXX(hch): bp->pb_count_desired might be incorrect (see + * pagebuf_associate_memory for details), but fortunately + * the Linux version of kmem_free ignores the len argument.. + */ + kmem_free(bp->pb_addr, bp->pb_count_desired); + _pagebuf_free_pages(bp); } - pagebuf_deallocate(pb); + pagebuf_deallocate(bp); } /* - * _pagebuf_lookup_pages - * - * _pagebuf_lookup_pages finds all pages which match the buffer - * in question and the range of file offsets supplied, - * and builds the page list for the buffer, if the - * page list is not already formed or if not all of the pages are - * already in the list. Invalid pages (pages which have not yet been - * read in from disk) are assigned for any pages which are not found. + * Finds all pages for buffer in question and builds it's page list. */ STATIC int _pagebuf_lookup_pages( - page_buf_t *pb, - struct address_space *aspace, - page_buf_flags_t flags) + xfs_buf_t *bp, + uint flags) { - loff_t next_buffer_offset; - unsigned long page_count, pi, index; - struct page *page; + struct address_space *mapping = bp->pb_target->pbr_mapping; + unsigned int sectorshift = bp->pb_target->pbr_sshift; + size_t blocksize = bp->pb_target->pbr_bsize; + size_t size = bp->pb_count_desired; + size_t nbytes, offset; int gfp_mask = pb_to_gfp(flags); - int all_mapped, good_pages, nbytes, rval, retries; - unsigned int blocksize, sectorshift; - size_t size, offset; - - next_buffer_offset = pb->pb_file_offset + pb->pb_buffer_length; - good_pages = page_count = (page_buf_btoc(next_buffer_offset) - - page_buf_btoct(pb->pb_file_offset)); - - if (pb->pb_flags & _PBF_ALL_PAGES_MAPPED) { - /* Bring pages forward in cache */ - for (pi = 0; pi < page_count; pi++) { - mark_page_accessed(pb->pb_pages[pi]); - } - if ((flags & PBF_MAPPED) && !(pb->pb_flags & PBF_MAPPED)) { - all_mapped = 1; - rval = 0; - goto mapit; - } - return 0; - } + unsigned short page_count, i; + pgoff_t first; + loff_t end; + int error; - /* Ensure pb_pages field has been initialised */ - rval = _pagebuf_get_pages(pb, page_count, flags); - if (rval) - return rval; + end = bp->pb_file_offset + bp->pb_buffer_length; + page_count = page_buf_btoc(end) - page_buf_btoct(bp->pb_file_offset); - all_mapped = 1; - blocksize = pb->pb_target->pbr_bsize; - sectorshift = pb->pb_target->pbr_sshift; - size = pb->pb_count_desired; - offset = pb->pb_offset; - - /* Enter the pages in the page list */ - index = (pb->pb_file_offset - pb->pb_offset) >> PAGE_CACHE_SHIFT; - for (pi = 0; pi < page_count; pi++, index++) { - if (pb->pb_pages[pi] == 0) { - retries = 0; - retry: - page = find_or_create_page(aspace, index, gfp_mask); - if (!page) { - if (flags & PBF_READ_AHEAD) - return -ENOMEM; - /* - * This could deadlock. But until all the - * XFS lowlevel code is revamped to handle - * buffer allocation failures we can't do - * much. - */ - if (!(++retries % 100)) { - printk(KERN_ERR - "possibly deadlocking in %s\n", - __FUNCTION__); - } - XFS_STATS_INC(pb_page_retries); - pagebuf_daemon_wakeup(); - current->state = TASK_UNINTERRUPTIBLE; - schedule_timeout(10); - goto retry; + error = _pagebuf_get_pages(bp, page_count, flags); + if (unlikely(error)) + return error; + + offset = bp->pb_offset; + first = bp->pb_file_offset >> PAGE_CACHE_SHIFT; + + for (i = 0; i < bp->pb_page_count; i++) { + struct page *page; + uint retries = 0; + + retry: + page = find_or_create_page(mapping, first + i, gfp_mask); + if (unlikely(page == NULL)) { + if (flags & PBF_READ_AHEAD) + return -ENOMEM; + + /* + * This could deadlock. + * + * But until all the XFS lowlevel code is revamped to + * handle buffer allocation failures we can't do much. + */ + if (!(++retries % 100)) { + printk(KERN_ERR "possibly deadlocking in %s\n", + __FUNCTION__); } - XFS_STATS_INC(pb_page_found); - mark_page_accessed(page); - pb->pb_pages[pi] = page; - } else { - page = pb->pb_pages[pi]; - lock_page(page); + + XFS_STATS_INC(pb_page_retries); + pagebuf_daemon_wakeup(); + current->state = TASK_UNINTERRUPTIBLE; + schedule_timeout(10); + goto retry; } - nbytes = PAGE_CACHE_SIZE - offset; - if (nbytes > size) - nbytes = size; + XFS_STATS_INC(pb_page_found); + + nbytes = min_t(size_t, size, PAGE_CACHE_SIZE - offset); size -= nbytes; if (!PageUptodate(page)) { + page_count--; if (blocksize == PAGE_CACHE_SIZE) { if (flags & PBF_READ) - pb->pb_locked = 1; - good_pages--; + bp->pb_locked = 1; } else if (!PagePrivate(page)) { - unsigned long i, range; + unsigned long j, range; /* * In this case page->private holds a bitmap @@ -457,60 +410,62 @@ */ ASSERT(blocksize < PAGE_CACHE_SIZE); range = (offset + nbytes) >> sectorshift; - for (i = offset >> sectorshift; i < range; i++) - if (!test_bit(i, &page->private)) + for (j = offset >> sectorshift; j < range; j++) + if (!test_bit(j, &page->private)) break; - if (i != range) - good_pages--; - } else { - good_pages--; + if (j == range) + page_count++; } } + + bp->pb_pages[i] = page; offset = 0; } - if (!pb->pb_locked) { - for (pi = 0; pi < page_count; pi++) { - if (pb->pb_pages[pi]) - unlock_page(pb->pb_pages[pi]); - } + if (!bp->pb_locked) { + for (i = 0; i < bp->pb_page_count; i++) + unlock_page(bp->pb_pages[i]); } - pb->pb_flags |= _PBF_PAGECACHE; -mapit: - pb->pb_flags |= _PBF_MEM_ALLOCATED; - if (all_mapped) { - pb->pb_flags |= _PBF_ALL_PAGES_MAPPED; - - /* A single page buffer is always mappable */ - if (page_count == 1) { - pb->pb_addr = (caddr_t) - page_address(pb->pb_pages[0]) + pb->pb_offset; - pb->pb_flags |= PBF_MAPPED; - } else if (flags & PBF_MAPPED) { - if (as_list_len > 64) - purge_addresses(); - pb->pb_addr = vmap(pb->pb_pages, page_count, - VM_MAP, PAGE_KERNEL); - if (pb->pb_addr == NULL) - return -ENOMEM; - pb->pb_addr += pb->pb_offset; - pb->pb_flags |= PBF_MAPPED | _PBF_ADDR_ALLOCATED; - } - } - /* If some pages were found with data in them - * we are not in PBF_NONE state. - */ - if (good_pages != 0) { - pb->pb_flags &= ~(PBF_NONE); - if (good_pages != page_count) { - pb->pb_flags |= PBF_PARTIAL; - } + bp->pb_flags |= _PBF_PAGE_CACHE; + + if (page_count) { + /* if we have any uptodate pages, mark that in the buffer */ + bp->pb_flags &= ~PBF_NONE; + + /* if some pages aren't uptodate, mark that in the buffer */ + if (page_count != bp->pb_page_count) + bp->pb_flags |= PBF_PARTIAL; } - PB_TRACE(pb, "lookup_pages", (long)good_pages); + PB_TRACE(bp, "lookup_pages", (long)page_count); + return error; +} - return rval; +/* + * Map buffer into kernel address-space if nessecary. + */ +STATIC int +_pagebuf_map_pages( + xfs_buf_t *bp, + uint flags) +{ + /* A single page buffer is always mappable */ + if (bp->pb_page_count == 1) { + bp->pb_addr = page_address(bp->pb_pages[0]) + bp->pb_offset; + bp->pb_flags |= PBF_MAPPED; + } else if (flags & PBF_MAPPED) { + if (as_list_len > 64) + purge_addresses(); + bp->pb_addr = vmap(bp->pb_pages, bp->pb_page_count, + VM_MAP, PAGE_KERNEL); + if (unlikely(bp->pb_addr == NULL)) + return -ENOMEM; + bp->pb_addr += bp->pb_offset; + bp->pb_flags |= PBF_MAPPED; + } + + return 0; } /* @@ -527,20 +482,19 @@ * which may imply that this call will block until those buffers * are unlocked. No I/O is implied by this call. */ -STATIC page_buf_t * +STATIC xfs_buf_t * _pagebuf_find( /* find buffer for block */ - pb_target_t *target,/* target for block */ + xfs_buftarg_t *target,/* target for block */ loff_t ioff, /* starting offset of range */ size_t isize, /* length of range */ page_buf_flags_t flags, /* PBF_TRYLOCK */ - page_buf_t *new_pb)/* newly allocated buffer */ + xfs_buf_t *new_pb)/* newly allocated buffer */ { loff_t range_base; size_t range_length; int hval; pb_hash_t *h; - struct list_head *p; - page_buf_t *pb; + xfs_buf_t *pb, *n; int not_locked; range_base = (ioff << BBSHIFT); @@ -556,9 +510,7 @@ h = &pbhash[hval]; spin_lock(&h->pb_hash_lock); - list_for_each(p, &h->pb_hash) { - pb = list_entry(p, page_buf_t, pb_hash_list); - + list_for_each_entry_safe(pb, n, &h->pb_hash, pb_hash_list) { if (pb->pb_target == target && pb->pb_file_offset == range_base && pb->pb_buffer_length == range_length) { @@ -616,11 +568,7 @@ } if (pb->pb_flags & PBF_STALE) - pb->pb_flags &= PBF_MAPPED | \ - _PBF_ALL_PAGES_MAPPED | \ - _PBF_ADDR_ALLOCATED | \ - _PBF_MEM_ALLOCATED | \ - _PBF_MEM_SLAB; + pb->pb_flags &= PBF_MAPPED; PB_TRACE(pb, "got_lock", 0); XFS_STATS_INC(pb_get_locked); return (pb); @@ -637,10 +585,10 @@ * pages are present in the buffer, not all of every page may be * valid. */ -page_buf_t * +xfs_buf_t * pagebuf_find( /* find buffer for block */ /* if the block is in memory */ - pb_target_t *target,/* target for block */ + xfs_buftarg_t *target,/* target for block */ loff_t ioff, /* starting offset of range */ size_t isize, /* length of range */ page_buf_flags_t flags) /* PBF_TRYLOCK */ @@ -657,37 +605,48 @@ * although backing storage may not be. If PBF_READ is set in * flags, pagebuf_iostart is called also. */ -page_buf_t * +xfs_buf_t * pagebuf_get( /* allocate a buffer */ - pb_target_t *target,/* target for buffer */ + xfs_buftarg_t *target,/* target for buffer */ loff_t ioff, /* starting offset of range */ size_t isize, /* length of range */ page_buf_flags_t flags) /* PBF_TRYLOCK */ { - page_buf_t *pb, *new_pb; - int error; + xfs_buf_t *pb, *new_pb; + int error = 0, i; new_pb = pagebuf_allocate(flags); if (unlikely(!new_pb)) - return (NULL); + return NULL; pb = _pagebuf_find(target, ioff, isize, flags, new_pb); - if (pb != new_pb) { + if (pb == new_pb) { + error = _pagebuf_lookup_pages(pb, flags); + if (unlikely(error)) { + printk(KERN_WARNING + "pagebuf_get: failed to lookup pages\n"); + goto no_buffer; + } + } else { pagebuf_deallocate(new_pb); - if (unlikely(!pb)) - return (NULL); + if (unlikely(pb == NULL)) + return NULL; } - XFS_STATS_INC(pb_get); + for (i = 0; i < pb->pb_page_count; i++) + mark_page_accessed(pb->pb_pages[i]); - /* fill in any missing pages */ - error = _pagebuf_lookup_pages(pb, pb->pb_target->pbr_mapping, flags); - if (unlikely(error)) { - printk(KERN_WARNING - "pagebuf_get: warning, failed to lookup pages\n"); - goto no_buffer; + if (!(pb->pb_flags & PBF_MAPPED)) { + error = _pagebuf_map_pages(pb, flags); + if (unlikely(error)) { + printk(KERN_WARNING + "pagebuf_get: failed to map pages\n"); + goto no_buffer; + } } + XFS_STATS_INC(pb_get); + /* * Always fill in the block number now, the mapped cases can do * their own overlay of this later. @@ -728,14 +687,14 @@ /* * Create a skeletal pagebuf (no pages associated with it). */ -page_buf_t * +xfs_buf_t * pagebuf_lookup( - struct pb_target *target, + xfs_buftarg_t *target, loff_t ioff, size_t isize, page_buf_flags_t flags) { - page_buf_t *pb; + xfs_buf_t *pb; pb = pagebuf_allocate(flags); if (pb) { @@ -750,7 +709,7 @@ */ void pagebuf_readahead( - pb_target_t *target, + xfs_buftarg_t *target, loff_t ioff, size_t isize, page_buf_flags_t flags) @@ -767,12 +726,12 @@ pagebuf_get(target, ioff, isize, flags); } -page_buf_t * +xfs_buf_t * pagebuf_get_empty( size_t len, - pb_target_t *target) + xfs_buftarg_t *target) { - page_buf_t *pb; + xfs_buf_t *pb; pb = pagebuf_allocate(0); if (pb) @@ -794,7 +753,7 @@ int pagebuf_associate_memory( - page_buf_t *pb, + xfs_buf_t *pb, void *mem, size_t len) { @@ -811,9 +770,9 @@ page_count++; /* Free any previous set of page pointers */ - if (pb->pb_pages && (pb->pb_pages != pb->pb_page_array)) { - kfree(pb->pb_pages); - } + if (pb->pb_pages) + _pagebuf_free_pages(pb); + pb->pb_pages = NULL; pb->pb_addr = mem; @@ -843,55 +802,55 @@ return 0; } -page_buf_t * +xfs_buf_t * pagebuf_get_no_daddr( size_t len, - pb_target_t *target) + xfs_buftarg_t *target) { - int rval; - void *rmem = NULL; - page_buf_flags_t flags = PBF_FORCEIO; - page_buf_t *pb; - size_t tlen = 0; + size_t malloc_len = len; + xfs_buf_t *bp; + void *data; + int error; if (unlikely(len > 0x20000)) - return NULL; - - pb = pagebuf_allocate(flags); - if (!pb) - return NULL; - - _pagebuf_initialize(pb, target, 0, len, flags); - - do { - if (tlen == 0) { - tlen = len; /* first time */ - } else { - kfree(rmem); /* free the mem from the previous try */ - tlen <<= 1; /* double the size and try again */ - } - if ((rmem = kmalloc(tlen, GFP_KERNEL)) == 0) { - pagebuf_free(pb); - return NULL; - } - } while ((size_t)rmem != ((size_t)rmem & ~target->pbr_smask)); - - if ((rval = pagebuf_associate_memory(pb, rmem, len)) != 0) { - kfree(rmem); - pagebuf_free(pb); - return NULL; - } - /* otherwise pagebuf_free just ignores it */ - pb->pb_flags |= (_PBF_MEM_ALLOCATED | _PBF_MEM_SLAB); - PB_CLEAR_OWNER(pb); - up(&pb->pb_sema); /* Return unlocked pagebuf */ - - PB_TRACE(pb, "no_daddr", rmem); + goto fail; - return pb; + bp = pagebuf_allocate(0); + if (unlikely(bp == NULL)) + goto fail; + _pagebuf_initialize(bp, target, 0, len, PBF_FORCEIO); + + try_again: + data = kmem_alloc(malloc_len, KM_SLEEP); + if (unlikely(data == NULL)) + goto fail_free_buf; + + /* check whether alignment matches.. */ + if ((__psunsigned_t)data != + ((__psunsigned_t)data & ~target->pbr_smask)) { + /* .. else double the size and try again */ + kmem_free(data, malloc_len); + malloc_len <<= 1; + goto try_again; + } + + error = pagebuf_associate_memory(bp, data, len); + if (error) + goto fail_free_mem; + bp->pb_flags |= _PBF_KMEM_ALLOC; + + pagebuf_unlock(bp); + + PB_TRACE(bp, "no_daddr", data); + return bp; + fail_free_mem: + kmem_free(data, malloc_len); + fail_free_buf: + pagebuf_free(bp); + fail: + return NULL; } - /* * pagebuf_hold * @@ -902,7 +861,7 @@ */ void pagebuf_hold( - page_buf_t *pb) + xfs_buf_t *pb) { atomic_inc(&pb->pb_hold); PB_TRACE(pb, "hold", 0); @@ -916,7 +875,7 @@ */ void pagebuf_rele( - page_buf_t *pb) + xfs_buf_t *pb) { pb_hash_t *hash = pb_hash(pb); @@ -975,7 +934,7 @@ int pagebuf_cond_lock( /* lock buffer, if not locked */ /* returns -EBUSY if locked) */ - page_buf_t *pb) + xfs_buf_t *pb) { int locked; @@ -994,7 +953,7 @@ */ int pagebuf_lock_value( - page_buf_t *pb) + xfs_buf_t *pb) { return(atomic_read(&pb->pb_sema.count)); } @@ -1009,7 +968,7 @@ */ int pagebuf_lock( - page_buf_t *pb) + xfs_buf_t *pb) { PB_TRACE(pb, "lock", 0); if (atomic_read(&pb->pb_io_remaining)) @@ -1029,7 +988,7 @@ */ void pagebuf_unlock( /* unlock buffer */ - page_buf_t *pb) /* buffer to unlock */ + xfs_buf_t *pb) /* buffer to unlock */ { PB_CLEAR_OWNER(pb); up(&pb->pb_sema); @@ -1057,7 +1016,7 @@ */ void pagebuf_pin( - page_buf_t *pb) + xfs_buf_t *pb) { atomic_inc(&pb->pb_pin_count); PB_TRACE(pb, "pin", (long)pb->pb_pin_count.counter); @@ -1072,7 +1031,7 @@ */ void pagebuf_unpin( - page_buf_t *pb) + xfs_buf_t *pb) { if (atomic_dec_and_test(&pb->pb_pin_count)) { wake_up_all(&pb->pb_waiters); @@ -1082,7 +1041,7 @@ int pagebuf_ispin( - page_buf_t *pb) + xfs_buf_t *pb) { return atomic_read(&pb->pb_pin_count); } @@ -1096,7 +1055,7 @@ */ static inline void _pagebuf_wait_unpin( - page_buf_t *pb) + xfs_buf_t *pb) { DECLARE_WAITQUEUE (wait, current); @@ -1131,23 +1090,17 @@ pagebuf_iodone_work( void *v) { - page_buf_t *pb = (page_buf_t *)v; + xfs_buf_t *bp = (xfs_buf_t *)v; - if (pb->pb_iodone) { - (*(pb->pb_iodone)) (pb); - return; - } - - if (pb->pb_flags & PBF_ASYNC) { - if (!pb->pb_relse) - pagebuf_unlock(pb); - pagebuf_rele(pb); - } + if (bp->pb_iodone) + (*(bp->pb_iodone))(bp); + else if (bp->pb_flags & PBF_ASYNC) + xfs_buf_relse(bp); } void pagebuf_iodone( - page_buf_t *pb, + xfs_buf_t *pb, int dataio, int schedule) { @@ -1178,10 +1131,11 @@ */ void pagebuf_ioerror( /* mark/clear buffer error flag */ - page_buf_t *pb, /* buffer to mark */ - unsigned int error) /* error to store (0 if none) */ + xfs_buf_t *pb, /* buffer to mark */ + int error) /* error to store (0 if none) */ { - pb->pb_error = error; + ASSERT(error >= 0 && error <= 0xffff); + pb->pb_error = (unsigned short)error; PB_TRACE(pb, "ioerror", (unsigned long)error); } @@ -1199,7 +1153,7 @@ */ int pagebuf_iostart( /* start I/O on a buffer */ - page_buf_t *pb, /* buffer to start */ + xfs_buf_t *pb, /* buffer to start */ page_buf_flags_t flags) /* PBF_LOCK, PBF_ASYNC, PBF_READ, */ /* PBF_WRITE, PBF_DELWRI, */ /* PBF_DONT_BLOCK */ @@ -1216,11 +1170,11 @@ } pb->pb_flags &= ~(PBF_READ | PBF_WRITE | PBF_ASYNC | PBF_DELWRI | \ - PBF_READ_AHEAD | PBF_RUN_QUEUES); + PBF_READ_AHEAD | _PBF_RUN_QUEUES); pb->pb_flags |= flags & (PBF_READ | PBF_WRITE | PBF_ASYNC | \ - PBF_READ_AHEAD | PBF_RUN_QUEUES); + PBF_READ_AHEAD | _PBF_RUN_QUEUES); - BUG_ON(pb->pb_bn == PAGE_BUF_DADDR_NULL); + BUG_ON(pb->pb_bn == XFS_BUF_DADDR_NULL); /* For writes allow an alternate strategy routine to precede * the actual I/O request (which may not be issued at all in @@ -1246,7 +1200,7 @@ STATIC __inline__ int _pagebuf_iolocked( - page_buf_t *pb) + xfs_buf_t *pb) { ASSERT(pb->pb_flags & (PBF_READ|PBF_WRITE)); if (pb->pb_flags & PBF_READ) @@ -1256,7 +1210,7 @@ STATIC __inline__ void _pagebuf_iodone( - page_buf_t *pb, + xfs_buf_t *pb, int schedule) { if (atomic_dec_and_test(&pb->pb_io_remaining) == 1) { @@ -1271,7 +1225,7 @@ unsigned int bytes_done, int error) { - page_buf_t *pb = (page_buf_t *)bio->bi_private; + xfs_buf_t *pb = (xfs_buf_t *)bio->bi_private; unsigned int i, blocksize = pb->pb_target->pbr_bsize; unsigned int sectorshift = pb->pb_target->pbr_sshift; struct bio_vec *bvec = bio->bi_io_vec; @@ -1289,8 +1243,9 @@ SetPageError(page); } else if (blocksize == PAGE_CACHE_SIZE) { SetPageUptodate(page); - } else if (!PagePrivate(page)) { - unsigned int j, range; + } else if (!PagePrivate(page) && + (pb->pb_flags & _PBF_PAGE_CACHE)) { + unsigned long j, range; ASSERT(blocksize < PAGE_CACHE_SIZE); range = (bvec->bv_offset + bvec->bv_len) >> sectorshift; @@ -1312,7 +1267,7 @@ void _pagebuf_ioapply( - page_buf_t *pb) + xfs_buf_t *pb) { int i, map_i, total_nr_pages, nr_pages; struct bio *bio; @@ -1404,34 +1359,19 @@ pagebuf_ioerror(pb, EIO); } - if (pb->pb_flags & PBF_RUN_QUEUES) { - pb->pb_flags &= ~PBF_RUN_QUEUES; + if (pb->pb_flags & _PBF_RUN_QUEUES) { + pb->pb_flags &= ~_PBF_RUN_QUEUES; if (atomic_read(&pb->pb_io_remaining) > 1) blk_run_address_space(pb->pb_target->pbr_mapping); } } /* - * pagebuf_iorequest - * - * pagebuf_iorequest is the core I/O request routine. - * It assumes that the buffer is well-formed and - * mapped and ready for physical I/O, unlike - * pagebuf_iostart() and pagebuf_iophysio(). Those - * routines call the pagebuf_ioinitiate routine to start I/O, - * if it is present, or else call pagebuf_iorequest() - * directly if the pagebuf_ioinitiate routine is not present. - * - * This function will be responsible for ensuring access to the - * pages is restricted whilst I/O is in progress - for locking - * pagebufs the pagebuf lock is the mediator, for non-locking - * pagebufs the pages will be locked. In the locking case we - * need to use the pagebuf lock as multiple meta-data buffers - * will reference the same page. + * pagebuf_iorequest -- the core I/O request routine. */ int pagebuf_iorequest( /* start real I/O */ - page_buf_t *pb) /* buffer to convey to device */ + xfs_buf_t *pb) /* buffer to convey to device */ { PB_TRACE(pb, "iorequest", 0); @@ -1467,7 +1407,7 @@ */ int pagebuf_iowait( - page_buf_t *pb) + xfs_buf_t *pb) { PB_TRACE(pb, "iowait", 0); if (atomic_read(&pb->pb_io_remaining)) @@ -1477,28 +1417,9 @@ return pb->pb_error; } -STATIC void * -pagebuf_mapout_locked( - page_buf_t *pb) -{ - void *old_addr = NULL; - - if (pb->pb_flags & PBF_MAPPED) { - if (pb->pb_flags & _PBF_ADDR_ALLOCATED) - old_addr = pb->pb_addr - pb->pb_offset; - pb->pb_addr = NULL; - pb->pb_flags &= ~(PBF_MAPPED | _PBF_ADDR_ALLOCATED); - } - - return old_addr; /* Caller must free the address space, - * we are under a spin lock, probably - * not safe to do vfree here - */ -} - caddr_t pagebuf_offset( - page_buf_t *pb, + xfs_buf_t *pb, size_t offset) { struct page *page; @@ -1516,7 +1437,7 @@ */ void pagebuf_iomove( - page_buf_t *pb, /* buffer to process */ + xfs_buf_t *pb, /* buffer to process */ size_t boff, /* starting buffer offset */ size_t bsize, /* length to copy */ caddr_t data, /* data address */ @@ -1550,6 +1471,64 @@ } } +/* + * Handling of buftargs. + */ + +void +xfs_free_buftarg( + xfs_buftarg_t *btp, + int external) +{ + xfs_flush_buftarg(btp, 1); + if (external) + xfs_blkdev_put(btp->pbr_bdev); + kmem_free(btp, sizeof(*btp)); +} + +void +xfs_incore_relse( + xfs_buftarg_t *btp, + int delwri_only, + int wait) +{ + invalidate_bdev(btp->pbr_bdev, 1); + truncate_inode_pages(btp->pbr_mapping, 0LL); +} + +void +xfs_setsize_buftarg( + xfs_buftarg_t *btp, + unsigned int blocksize, + unsigned int sectorsize) +{ + btp->pbr_bsize = blocksize; + btp->pbr_sshift = ffs(sectorsize) - 1; + btp->pbr_smask = sectorsize - 1; + + if (set_blocksize(btp->pbr_bdev, sectorsize)) { + printk(KERN_WARNING + "XFS: Cannot set_blocksize to %u on device %s\n", + sectorsize, XFS_BUFTARG_NAME(btp)); + } +} + +xfs_buftarg_t * +xfs_alloc_buftarg( + struct block_device *bdev) +{ + xfs_buftarg_t *btp; + + btp = kmem_zalloc(sizeof(*btp), KM_SLEEP); + + btp->pbr_dev = bdev->bd_dev; + btp->pbr_bdev = bdev; + btp->pbr_mapping = bdev->bd_inode->i_mapping; + xfs_setsize_buftarg(btp, PAGE_CACHE_SIZE, bdev_hardsect_size(bdev)); + + return btp; +} + /* * Pagebuf delayed write buffer handling @@ -1560,10 +1539,12 @@ STATIC void pagebuf_delwri_queue( - page_buf_t *pb, + xfs_buf_t *pb, int unlock) { PB_TRACE(pb, "delwri_q", (long)unlock); + ASSERT(pb->pb_flags & PBF_DELWRI); + spin_lock(&pbd_delwrite_lock); /* If already in the queue, dequeue and place at tail */ if (!list_empty(&pb->pb_list)) { @@ -1574,7 +1555,7 @@ } list_add_tail(&pb->pb_list, &pbd_delwrite_queue); - pb->pb_flushtime = jiffies + xfs_age_buffer; + pb->pb_queuetime = jiffies; spin_unlock(&pbd_delwrite_lock); if (unlock) @@ -1583,7 +1564,7 @@ void pagebuf_delwri_dequeue( - page_buf_t *pb) + xfs_buf_t *pb) { PB_TRACE(pb, "delwri_uq", 0); spin_lock(&pbd_delwrite_lock); @@ -1617,8 +1598,8 @@ pagebuf_daemon( void *data) { - page_buf_t *pb; - struct list_head *curr, *next, tmp; + struct list_head tmp; + xfs_buf_t *pb, *n; /* Set up the thread */ daemonize("xfsbufd"); @@ -1638,16 +1619,15 @@ schedule_timeout(xfs_flush_interval); spin_lock(&pbd_delwrite_lock); - - list_for_each_safe(curr, next, &pbd_delwrite_queue) { - pb = list_entry(curr, page_buf_t, pb_list); - + list_for_each_entry_safe(pb, n, &pbd_delwrite_queue, pb_list) { PB_TRACE(pb, "walkq1", (long)pagebuf_ispin(pb)); + ASSERT(pb->pb_flags & PBF_DELWRI); - if ((pb->pb_flags & PBF_DELWRI) && - !pagebuf_ispin(pb) && !pagebuf_cond_lock(pb)) { + if (!pagebuf_ispin(pb) && !pagebuf_cond_lock(pb)) { if (!force_flush && - time_before(jiffies, pb->pb_flushtime)) { + time_before(jiffies, + pb->pb_queuetime + + xfs_age_buffer)) { pagebuf_unlock(pb); break; } @@ -1657,12 +1637,11 @@ list_move(&pb->pb_list, &tmp); } } - spin_unlock(&pbd_delwrite_lock); + while (!list_empty(&tmp)) { - pb = list_entry(tmp.next, page_buf_t, pb_list); + pb = list_entry(tmp.next, xfs_buf_t, pb_list); list_del_init(&pb->pb_list); - pagebuf_iostrategy(pb); blk_run_address_space(pb->pb_target->pbr_mapping); } @@ -1676,34 +1655,31 @@ complete_and_exit(&pagebuf_daemon_done, 0); } -void -pagebuf_delwri_flush( - pb_target_t *target, - u_long flags, - int *pinptr) +/* + * Go through all incore buffers, and release buffers if they belong to + * the given device. This is used in filesystem error handling to + * preserve the consistency of its metadata. + */ +int +xfs_flush_buftarg( + xfs_buftarg_t *target, + int wait) { - page_buf_t *pb; - struct list_head *curr, *next, tmp; + struct list_head tmp; + xfs_buf_t *pb, *n; int pincount = 0; pagebuf_runall_queues(pagebuf_dataio_workqueue); pagebuf_runall_queues(pagebuf_logio_workqueue); - spin_lock(&pbd_delwrite_lock); INIT_LIST_HEAD(&tmp); + spin_lock(&pbd_delwrite_lock); + list_for_each_entry_safe(pb, n, &pbd_delwrite_queue, pb_list) { - list_for_each_safe(curr, next, &pbd_delwrite_queue) { - pb = list_entry(curr, page_buf_t, pb_list); - - /* - * Skip other targets, markers and in progress buffers - */ - - if ((pb->pb_flags == 0) || (pb->pb_target != target) || - !(pb->pb_flags & PBF_DELWRI)) { + if (pb->pb_target != target) continue; - } + ASSERT(pb->pb_flags & PBF_DELWRI); PB_TRACE(pb, "walkq2", (long)pagebuf_ispin(pb)); if (pagebuf_ispin(pb)) { pincount++; @@ -1714,37 +1690,36 @@ pb->pb_flags |= PBF_WRITE; list_move(&pb->pb_list, &tmp); } - /* ok found all the items that can be worked on - * drop the lock and process the private list */ spin_unlock(&pbd_delwrite_lock); - list_for_each_safe(curr, next, &tmp) { - pb = list_entry(curr, page_buf_t, pb_list); - - if (flags & PBDF_WAIT) + /* + * Dropped the delayed write list lock, now walk the temporary list + */ + list_for_each_entry_safe(pb, n, &tmp, pb_list) { + if (wait) pb->pb_flags &= ~PBF_ASYNC; else - list_del_init(curr); + list_del_init(&pb->pb_list); pagebuf_lock(pb); pagebuf_iostrategy(pb); } + /* + * Remaining list items must be flushed before returning + */ while (!list_empty(&tmp)) { - pb = list_entry(tmp.next, page_buf_t, pb_list); + pb = list_entry(tmp.next, xfs_buf_t, pb_list); list_del_init(&pb->pb_list); - pagebuf_iowait(pb); - if (!pb->pb_relse) - pagebuf_unlock(pb); - pagebuf_rele(pb); + xfs_iowait(pb); + xfs_buf_relse(pb); } - if (flags & PBDF_WAIT) + if (wait) blk_run_address_space(target->pbr_mapping); - if (pinptr) - *pinptr = pincount; + return pincount; } STATIC int @@ -1796,7 +1771,7 @@ { int i; - pagebuf_cache = kmem_cache_create("page_buf_t", sizeof(page_buf_t), 0, + pagebuf_cache = kmem_cache_create("xfs_buf_t", sizeof(xfs_buf_t), 0, SLAB_HWCACHE_ALIGN, NULL, NULL); if (pagebuf_cache == NULL) { printk("pagebuf: couldn't init pagebuf cache\n"); diff -Nru a/fs/xfs/linux/xfs_buf.h b/fs/xfs/linux/xfs_buf.h --- a/fs/xfs/linux/xfs_buf.h Tue May 4 21:53:36 2004 +++ b/fs/xfs/linux/xfs_buf.h Tue May 4 21:53:36 2004 @@ -51,10 +51,7 @@ * Base types */ -/* daddr must be signed since -1 is used for bmaps that are not yet allocated */ -typedef loff_t page_buf_daddr_t; - -#define PAGE_BUF_DADDR_NULL ((page_buf_daddr_t) (-1LL)) +#define XFS_BUF_DADDR_NULL ((xfs_daddr_t) (-1LL)) #define page_buf_ctob(pp) ((pp) * PAGE_CACHE_SIZE) #define page_buf_btoc(dd) (((dd) + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT) @@ -76,44 +73,39 @@ PBF_ASYNC = (1 << 4), /* initiator will not wait for completion */ PBF_NONE = (1 << 5), /* buffer not read at all */ PBF_DELWRI = (1 << 6), /* buffer has dirty pages */ - PBF_STALE = (1 << 10), /* buffer has been staled, do not find it */ - PBF_FS_MANAGED = (1 << 11), /* filesystem controls freeing memory */ - PBF_FS_DATAIOD = (1 << 12), /* schedule IO completion on fs datad */ + PBF_STALE = (1 << 7), /* buffer has been staled, do not find it */ + PBF_FS_MANAGED = (1 << 8), /* filesystem controls freeing memory */ + PBF_FS_DATAIOD = (1 << 9), /* schedule IO completion on fs datad */ + PBF_FORCEIO = (1 << 10), /* ignore any cache state */ + PBF_FLUSH = (1 << 11), /* flush disk write cache */ + PBF_READ_AHEAD = (1 << 12), /* asynchronous read-ahead */ /* flags used only as arguments to access routines */ - PBF_LOCK = (1 << 13), /* lock requested */ - PBF_TRYLOCK = (1 << 14), /* lock requested, but do not wait */ - PBF_DONT_BLOCK = (1 << 15), /* do not block in current thread */ + PBF_LOCK = (1 << 14), /* lock requested */ + PBF_TRYLOCK = (1 << 15), /* lock requested, but do not wait */ + PBF_DONT_BLOCK = (1 << 16), /* do not block in current thread */ /* flags used only internally */ - _PBF_PAGECACHE = (1 << 16), /* backed by pagecache */ - _PBF_ALL_PAGES_MAPPED = (1 << 18), /* all pages in range mapped */ - _PBF_ADDR_ALLOCATED = (1 << 19), /* pb_addr space was allocated */ - _PBF_MEM_ALLOCATED = (1 << 20), /* underlying pages are allocated */ - _PBF_MEM_SLAB = (1 << 21), /* underlying pages are slab allocated */ - - PBF_FORCEIO = (1 << 22), /* ignore any cache state */ - PBF_FLUSH = (1 << 23), /* flush disk write cache */ - PBF_READ_AHEAD = (1 << 24), /* asynchronous read-ahead */ - PBF_RUN_QUEUES = (1 << 25), /* run block device task queue */ - + _PBF_PAGE_CACHE = (1 << 17),/* backed by pagecache */ + _PBF_KMEM_ALLOC = (1 << 18),/* backed by kmem_alloc() */ + _PBF_RUN_QUEUES = (1 << 19),/* run block device task queue */ } page_buf_flags_t; #define PBF_UPDATE (PBF_READ | PBF_WRITE) #define PBF_NOT_DONE(pb) (((pb)->pb_flags & (PBF_PARTIAL|PBF_NONE)) != 0) #define PBF_DONE(pb) (((pb)->pb_flags & (PBF_PARTIAL|PBF_NONE)) == 0) -typedef struct pb_target { +typedef struct xfs_buftarg { dev_t pbr_dev; struct block_device *pbr_bdev; struct address_space *pbr_mapping; unsigned int pbr_bsize; unsigned int pbr_sshift; size_t pbr_smask; -} pb_target_t; +} xfs_buftarg_t; /* - * page_buf_t: Buffer structure for page cache-based buffers + * xfs_buf_t: Buffer structure for page cache-based buffers * * This buffer structure is used by the page cache buffer management routines * to refer to an assembly of pages forming a logical buffer. The actual @@ -128,26 +120,26 @@ * to indicate which disk blocks in the page are not valid. */ -struct page_buf_s; -typedef void (*page_buf_iodone_t)(struct page_buf_s *); +struct xfs_buf; +typedef void (*page_buf_iodone_t)(struct xfs_buf *); /* call-back function on I/O completion */ -typedef void (*page_buf_relse_t)(struct page_buf_s *); +typedef void (*page_buf_relse_t)(struct xfs_buf *); /* call-back function on I/O completion */ -typedef int (*page_buf_bdstrat_t)(struct page_buf_s *); +typedef int (*page_buf_bdstrat_t)(struct xfs_buf *); #define PB_PAGES 4 -typedef struct page_buf_s { +typedef struct xfs_buf { struct semaphore pb_sema; /* semaphore for lockables */ - unsigned long pb_flushtime; /* time to flush pagebuf */ + unsigned long pb_queuetime; /* time buffer was queued */ atomic_t pb_pin_count; /* pin count */ wait_queue_head_t pb_waiters; /* unpin waiters */ struct list_head pb_list; page_buf_flags_t pb_flags; /* status flags */ struct list_head pb_hash_list; - struct pb_target *pb_target; /* logical object */ + xfs_buftarg_t *pb_target; /* logical object */ atomic_t pb_hold; /* reference count */ - page_buf_daddr_t pb_bn; /* block number for I/O */ + xfs_daddr_t pb_bn; /* block number for I/O */ loff_t pb_file_offset; /* offset in file */ size_t pb_buffer_length; /* size of buffer in bytes */ size_t pb_count_desired; /* desired transfer size */ @@ -171,52 +163,52 @@ #ifdef PAGEBUF_LOCK_TRACKING int pb_last_holder; #endif -} page_buf_t; +} xfs_buf_t; /* Finding and Reading Buffers */ -extern page_buf_t *pagebuf_find( /* find buffer for block if */ +extern xfs_buf_t *pagebuf_find( /* find buffer for block if */ /* the block is in memory */ - struct pb_target *, /* inode for block */ + xfs_buftarg_t *, /* inode for block */ loff_t, /* starting offset of range */ size_t, /* length of range */ page_buf_flags_t); /* PBF_LOCK */ -extern page_buf_t *pagebuf_get( /* allocate a buffer */ - struct pb_target *, /* inode for buffer */ +extern xfs_buf_t *pagebuf_get( /* allocate a buffer */ + xfs_buftarg_t *, /* inode for buffer */ loff_t, /* starting offset of range */ size_t, /* length of range */ page_buf_flags_t); /* PBF_LOCK, PBF_READ, */ /* PBF_ASYNC */ -extern page_buf_t *pagebuf_lookup( - struct pb_target *, +extern xfs_buf_t *pagebuf_lookup( + xfs_buftarg_t *, loff_t, /* starting offset of range */ size_t, /* length of range */ page_buf_flags_t); /* PBF_READ, PBF_WRITE, */ /* PBF_FORCEIO, */ -extern page_buf_t *pagebuf_get_empty( /* allocate pagebuf struct with */ +extern xfs_buf_t *pagebuf_get_empty( /* allocate pagebuf struct with */ /* no memory or disk address */ size_t len, - struct pb_target *); /* mount point "fake" inode */ + xfs_buftarg_t *); /* mount point "fake" inode */ -extern page_buf_t *pagebuf_get_no_daddr(/* allocate pagebuf struct */ +extern xfs_buf_t *pagebuf_get_no_daddr(/* allocate pagebuf struct */ /* without disk address */ size_t len, - struct pb_target *); /* mount point "fake" inode */ + xfs_buftarg_t *); /* mount point "fake" inode */ extern int pagebuf_associate_memory( - page_buf_t *, + xfs_buf_t *, void *, size_t); extern void pagebuf_hold( /* increment reference count */ - page_buf_t *); /* buffer to hold */ + xfs_buf_t *); /* buffer to hold */ extern void pagebuf_readahead( /* read ahead into cache */ - struct pb_target *, /* target for buffer (or NULL) */ + xfs_buftarg_t *, /* target for buffer (or NULL) */ loff_t, /* starting offset of range */ size_t, /* length of range */ page_buf_flags_t); /* additional read flags */ @@ -224,63 +216,63 @@ /* Releasing Buffers */ extern void pagebuf_free( /* deallocate a buffer */ - page_buf_t *); /* buffer to deallocate */ + xfs_buf_t *); /* buffer to deallocate */ extern void pagebuf_rele( /* release hold on a buffer */ - page_buf_t *); /* buffer to release */ + xfs_buf_t *); /* buffer to release */ /* Locking and Unlocking Buffers */ extern int pagebuf_cond_lock( /* lock buffer, if not locked */ /* (returns -EBUSY if locked) */ - page_buf_t *); /* buffer to lock */ + xfs_buf_t *); /* buffer to lock */ extern int pagebuf_lock_value( /* return count on lock */ - page_buf_t *); /* buffer to check */ + xfs_buf_t *); /* buffer to check */ extern int pagebuf_lock( /* lock buffer */ - page_buf_t *); /* buffer to lock */ + xfs_buf_t *); /* buffer to lock */ extern void pagebuf_unlock( /* unlock buffer */ - page_buf_t *); /* buffer to unlock */ + xfs_buf_t *); /* buffer to unlock */ /* Buffer Read and Write Routines */ extern void pagebuf_iodone( /* mark buffer I/O complete */ - page_buf_t *, /* buffer to mark */ + xfs_buf_t *, /* buffer to mark */ int, /* use data/log helper thread. */ int); /* run completion locally, or in * a helper thread. */ extern void pagebuf_ioerror( /* mark buffer in error (or not) */ - page_buf_t *, /* buffer to mark */ - unsigned int); /* error to store (0 if none) */ + xfs_buf_t *, /* buffer to mark */ + int); /* error to store (0 if none) */ extern int pagebuf_iostart( /* start I/O on a buffer */ - page_buf_t *, /* buffer to start */ + xfs_buf_t *, /* buffer to start */ page_buf_flags_t); /* PBF_LOCK, PBF_ASYNC, */ /* PBF_READ, PBF_WRITE, */ /* PBF_DELWRI */ extern int pagebuf_iorequest( /* start real I/O */ - page_buf_t *); /* buffer to convey to device */ + xfs_buf_t *); /* buffer to convey to device */ extern int pagebuf_iowait( /* wait for buffer I/O done */ - page_buf_t *); /* buffer to wait on */ + xfs_buf_t *); /* buffer to wait on */ extern void pagebuf_iomove( /* move data in/out of pagebuf */ - page_buf_t *, /* buffer to manipulate */ + xfs_buf_t *, /* buffer to manipulate */ size_t, /* starting buffer offset */ size_t, /* length in buffer */ caddr_t, /* data pointer */ page_buf_rw_t); /* direction */ -static inline int pagebuf_iostrategy(page_buf_t *pb) +static inline int pagebuf_iostrategy(xfs_buf_t *pb) { return pb->pb_strat ? pb->pb_strat(pb) : pagebuf_iorequest(pb); } -static inline int pagebuf_geterror(page_buf_t *pb) +static inline int pagebuf_geterror(xfs_buf_t *pb) { return pb ? pb->pb_error : ENOMEM; } @@ -288,30 +280,23 @@ /* Buffer Utility Routines */ extern caddr_t pagebuf_offset( /* pointer at offset in buffer */ - page_buf_t *, /* buffer to offset into */ + xfs_buf_t *, /* buffer to offset into */ size_t); /* offset */ /* Pinning Buffer Storage in Memory */ extern void pagebuf_pin( /* pin buffer in memory */ - page_buf_t *); /* buffer to pin */ + xfs_buf_t *); /* buffer to pin */ extern void pagebuf_unpin( /* unpin buffered data */ - page_buf_t *); /* buffer to unpin */ + xfs_buf_t *); /* buffer to unpin */ extern int pagebuf_ispin( /* check if buffer is pinned */ - page_buf_t *); /* buffer to check */ + xfs_buf_t *); /* buffer to check */ /* Delayed Write Buffer Routines */ -#define PBDF_WAIT 0x01 -extern void pagebuf_delwri_flush( - pb_target_t *, - unsigned long, - int *); - -extern void pagebuf_delwri_dequeue( - page_buf_t *); +extern void pagebuf_delwri_dequeue(xfs_buf_t *); /* Buffer Daemon Setup Routines */ @@ -322,7 +307,7 @@ #ifdef PAGEBUF_TRACE extern ktrace_t *pagebuf_trace_buf; extern void pagebuf_trace( - page_buf_t *, /* buffer being traced */ + xfs_buf_t *, /* buffer being traced */ char *, /* description of operation */ void *, /* arbitrary diagnostic value */ void *); /* return address */ @@ -369,7 +354,7 @@ #define XFS_BUF_MANAGE PBF_FS_MANAGED #define XFS_BUF_UNMANAGE(x) ((x)->pb_flags &= ~PBF_FS_MANAGED) -static inline void xfs_buf_undelay(page_buf_t *pb) +static inline void xfs_buf_undelay(xfs_buf_t *pb) { if (pb->pb_flags & PBF_DELWRI) { if (pb->pb_list.next != &pb->pb_list) { @@ -423,12 +408,6 @@ #define XFS_BUF_BP_ISMAPPED(bp) 1 -typedef struct page_buf_s xfs_buf_t; -#define xfs_buf page_buf_s - -typedef struct pb_target xfs_buftarg_t; -#define xfs_buftarg pb_target - #define XFS_BUF_DATAIO(x) ((x)->pb_flags |= PBF_FS_DATAIOD) #define XFS_BUF_UNDATAIO(x) ((x)->pb_flags &= ~PBF_FS_DATAIOD) @@ -461,7 +440,7 @@ #define XFS_BUF_PTR(bp) (xfs_caddr_t)((bp)->pb_addr) -extern inline xfs_caddr_t xfs_buf_offset(page_buf_t *bp, size_t offset) +extern inline xfs_caddr_t xfs_buf_offset(xfs_buf_t *bp, size_t offset) { if (bp->pb_flags & PBF_MAPPED) return XFS_BUF_PTR(bp) + offset; @@ -472,7 +451,7 @@ pagebuf_associate_memory(bp, val, count) #define XFS_BUF_ADDR(bp) ((bp)->pb_bn) #define XFS_BUF_SET_ADDR(bp, blk) \ - ((bp)->pb_bn = (page_buf_daddr_t)(blk)) + ((bp)->pb_bn = (blk)) #define XFS_BUF_OFFSET(bp) ((bp)->pb_file_offset) #define XFS_BUF_SET_OFFSET(bp, off) \ ((bp)->pb_file_offset = (off)) @@ -517,15 +496,15 @@ #define xfs_buf_get_flags(target, blkno, len, flags) \ pagebuf_get((target), (blkno), (len), (flags)) -static inline int xfs_bawrite(void *mp, page_buf_t *bp) +static inline int xfs_bawrite(void *mp, xfs_buf_t *bp) { bp->pb_fspriv3 = mp; bp->pb_strat = xfs_bdstrat_cb; xfs_buf_undelay(bp); - return pagebuf_iostart(bp, PBF_WRITE | PBF_ASYNC | PBF_RUN_QUEUES); + return pagebuf_iostart(bp, PBF_WRITE | PBF_ASYNC | _PBF_RUN_QUEUES); } -static inline void xfs_buf_relse(page_buf_t *bp) +static inline void xfs_buf_relse(xfs_buf_t *bp) { if (!bp->pb_relse) pagebuf_unlock(bp); @@ -553,13 +532,13 @@ pagebuf_iomove((pb), (off), (len), NULL, PBRW_ZERO) -static inline int XFS_bwrite(page_buf_t *pb) +static inline int XFS_bwrite(xfs_buf_t *pb) { int iowait = (pb->pb_flags & PBF_ASYNC) == 0; int error = 0; if (!iowait) - pb->pb_flags |= PBF_RUN_QUEUES; + pb->pb_flags |= _PBF_RUN_QUEUES; xfs_buf_undelay(pb); pagebuf_iostrategy(pb); @@ -573,7 +552,7 @@ #define XFS_bdwrite(pb) \ pagebuf_iostart(pb, PBF_DELWRI | PBF_ASYNC) -static inline int xfs_bdwrite(void *mp, page_buf_t *bp) +static inline int xfs_bdwrite(void *mp, xfs_buf_t *bp) { bp->pb_strat = xfs_bdstrat_cb; bp->pb_fspriv3 = mp; @@ -585,21 +564,6 @@ #define xfs_iowait(pb) pagebuf_iowait(pb) - -/* - * Go through all incore buffers, and release buffers - * if they belong to the given device. This is used in - * filesystem error handling to preserve the consistency - * of its metadata. - */ - -#define xfs_binval(buftarg) xfs_flush_buftarg(buftarg) - -#define XFS_bflush(buftarg) xfs_flush_buftarg(buftarg) - -#define xfs_incore_relse(buftarg,delwri_only,wait) \ - xfs_relse_buftarg(buftarg) - #define xfs_baread(target, rablkno, ralen) \ pagebuf_readahead((target), (rablkno), (ralen), PBF_DONT_BLOCK) @@ -607,5 +571,24 @@ #define xfs_buf_get_noaddr(len, target) pagebuf_get_no_daddr((len), (target)) #define xfs_buf_free(bp) pagebuf_free(bp) -#endif /* __XFS_BUF_H__ */ +/* + * Handling of buftargs. + */ + +extern xfs_buftarg_t *xfs_alloc_buftarg(struct block_device *); +extern void xfs_free_buftarg(xfs_buftarg_t *, int); +extern void xfs_setsize_buftarg(xfs_buftarg_t *, unsigned int, unsigned int); +extern void xfs_incore_relse(xfs_buftarg_t *, int, int); +extern int xfs_flush_buftarg(xfs_buftarg_t *, int); + +#define xfs_getsize_buftarg(buftarg) \ + block_size((buftarg)->pbr_bdev) +#define xfs_readonly_buftarg(buftarg) \ + bdev_read_only((buftarg)->pbr_bdev) +#define xfs_binval(buftarg) \ + xfs_flush_buftarg(buftarg, 1) +#define XFS_bflush(buftarg) \ + xfs_flush_buftarg(buftarg, 1) + +#endif /* __XFS_BUF_H__ */ diff -Nru a/fs/xfs/linux/xfs_file.c b/fs/xfs/linux/xfs_file.c --- a/fs/xfs/linux/xfs_file.c Tue May 4 21:53:36 2004 +++ b/fs/xfs/linux/xfs_file.c Tue May 4 21:53:36 2004 @@ -53,7 +53,6 @@ #include "xfs_rw.h" #include -#include /* for PROT_WRITE */ static struct vm_operations_struct linvfs_file_vm_ops; @@ -488,7 +487,7 @@ if ((vp->v_type == VREG) && (vp->v_vfsp->vfs_flag & VFS_DMI)) { if ((vma->vm_flags & VM_MAYSHARE) && - (newflags & PROT_WRITE) && !(vma->vm_flags & PROT_WRITE)) { + (newflags & VM_WRITE) && !(vma->vm_flags & VM_WRITE)) { xfs_mount_t *mp = XFS_VFSTOM(vp->v_vfsp); error = XFS_SEND_MMAP(mp, vma, VM_WRITE); diff -Nru a/fs/xfs/linux/xfs_globals.c b/fs/xfs/linux/xfs_globals.c --- a/fs/xfs/linux/xfs_globals.c Tue May 4 21:53:36 2004 +++ b/fs/xfs/linux/xfs_globals.c Tue May 4 21:53:36 2004 @@ -50,19 +50,19 @@ */ xfs_param_t xfs_params = { - /* MIN DFLT MAX */ - .restrict_chown = { 0, 1, 1 }, - .sgid_inherit = { 0, 0, 1 }, - .symlink_mode = { 0, 0, 1 }, - .panic_mask = { 0, 0, 127 }, - .error_level = { 0, 3, 11 }, - .sync_interval = { HZ, 30*HZ, 60*HZ }, - .stats_clear = { 0, 0, 1 }, - .inherit_sync = { 0, 1, 1 }, - .inherit_nodump = { 0, 1, 1 }, - .inherit_noatim = { 0, 1, 1 }, - .flush_interval = { HZ/2, HZ, 30*HZ }, - .age_buffer = { 1*HZ, 15*HZ, 300*HZ }, + /* MIN DFLT MAX */ + .restrict_chown = { 0, 1, 1 }, + .sgid_inherit = { 0, 0, 1 }, + .symlink_mode = { 0, 0, 1 }, + .panic_mask = { 0, 0, 127 }, + .error_level = { 0, 3, 11 }, + .sync_interval = { USER_HZ, 30*USER_HZ, 7200*USER_HZ }, + .stats_clear = { 0, 0, 1 }, + .inherit_sync = { 0, 1, 1 }, + .inherit_nodump = { 0, 1, 1 }, + .inherit_noatim = { 0, 1, 1 }, + .flush_interval = { USER_HZ/2, USER_HZ, 30*USER_HZ }, + .age_buffer = { 1*USER_HZ, 15*USER_HZ, 7200*USER_HZ }, }; /* diff -Nru a/fs/xfs/linux/xfs_ioctl.c b/fs/xfs/linux/xfs_ioctl.c --- a/fs/xfs/linux/xfs_ioctl.c Tue May 4 21:53:36 2004 +++ b/fs/xfs/linux/xfs_ioctl.c Tue May 4 21:53:36 2004 @@ -659,7 +659,7 @@ case XFS_IOC_DIOINFO: { struct dioattr da; - pb_target_t *target = + xfs_buftarg_t *target = (ip->i_d.di_flags & XFS_DIFLAG_REALTIME) ? mp->m_rtdev_targp : mp->m_ddev_targp; diff -Nru a/fs/xfs/linux/xfs_linux.h b/fs/xfs/linux/xfs_linux.h --- a/fs/xfs/linux/xfs_linux.h Tue May 4 21:53:35 2004 +++ b/fs/xfs/linux/xfs_linux.h Tue May 4 21:53:35 2004 @@ -72,6 +72,7 @@ #include #include +#include #include #include #include @@ -134,13 +135,13 @@ #define irix_symlink_mode xfs_params.symlink_mode.val #define xfs_panic_mask xfs_params.panic_mask.val #define xfs_error_level xfs_params.error_level.val -#define xfs_syncd_interval xfs_params.sync_interval.val +#define xfs_syncd_interval (xfs_params.sync_interval.val * HZ / USER_HZ) #define xfs_stats_clear xfs_params.stats_clear.val #define xfs_inherit_sync xfs_params.inherit_sync.val #define xfs_inherit_nodump xfs_params.inherit_nodump.val #define xfs_inherit_noatime xfs_params.inherit_noatim.val -#define xfs_flush_interval xfs_params.flush_interval.val -#define xfs_age_buffer xfs_params.age_buffer.val +#define xfs_flush_interval (xfs_params.flush_interval.val * HZ / USER_HZ) +#define xfs_age_buffer (xfs_params.age_buffer.val * HZ / USER_HZ) #define current_cpu() smp_processor_id() #define current_pid() (current->pid) @@ -247,10 +248,11 @@ #define howmany(x, y) (((x)+((y)-1))/(y)) #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) -static inline void xfs_stack_trace(void) -{ - dump_stack(); -} +#define xfs_stack_trace() dump_stack() + +#define xfs_itruncate_data(ip, off) \ + (-vmtruncate(LINVFS_GET_IP(XFS_ITOV(ip)), (off))) + /* Move the kernel do_div definition off to one side */ diff -Nru a/fs/xfs/linux/xfs_lrw.c b/fs/xfs/linux/xfs_lrw.c --- a/fs/xfs/linux/xfs_lrw.c Tue May 4 21:53:35 2004 +++ b/fs/xfs/linux/xfs_lrw.c Tue May 4 21:53:35 2004 @@ -301,7 +301,7 @@ /* END copy & waste from filemap.c */ if (ioflags & IO_ISDIRECT) { - pb_target_t *target = + xfs_buftarg_t *target = (ip->i_d.di_flags & XFS_DIFLAG_REALTIME) ? mp->m_rtdev_targp : mp->m_ddev_targp; if ((*offset & target->pbr_smask) || @@ -687,7 +687,7 @@ } if (ioflags & IO_ISDIRECT) { - pb_target_t *target = + xfs_buftarg_t *target = (xip->i_d.di_flags & XFS_DIFLAG_REALTIME) ? mp->m_rtdev_targp : mp->m_ddev_targp; diff -Nru a/fs/xfs/linux/xfs_lrw.h b/fs/xfs/linux/xfs_lrw.h --- a/fs/xfs/linux/xfs_lrw.h Tue May 4 21:53:35 2004 +++ b/fs/xfs/linux/xfs_lrw.h Tue May 4 21:53:35 2004 @@ -38,7 +38,7 @@ struct xfs_iocore; struct xfs_inode; struct xfs_bmbt_irec; -struct page_buf_s; +struct xfs_buf; struct xfs_iomap; #if defined(XFS_RW_TRACE) @@ -89,8 +89,8 @@ extern int xfs_bmap(struct bhv_desc *, xfs_off_t, ssize_t, int, struct xfs_iomap *, int *); -extern int xfsbdstrat(struct xfs_mount *, struct page_buf_s *); -extern int xfs_bdstrat_cb(struct page_buf_s *); +extern int xfsbdstrat(struct xfs_mount *, struct xfs_buf *); +extern int xfs_bdstrat_cb(struct xfs_buf *); extern int xfs_zero_eof(struct vnode *, struct xfs_iocore *, xfs_off_t, xfs_fsize_t, xfs_fsize_t); diff -Nru a/fs/xfs/linux/xfs_super.c b/fs/xfs/linux/xfs_super.c --- a/fs/xfs/linux/xfs_super.c Tue May 4 21:53:36 2004 +++ b/fs/xfs/linux/xfs_super.c Tue May 4 21:53:36 2004 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as @@ -67,7 +67,6 @@ #include "xfs_utils.h" #include "xfs_version.h" -#include #include #include #include @@ -153,8 +152,7 @@ inode->i_mapping->a_ops = &linvfs_aops; } else { inode->i_op = &linvfs_file_inode_operations; - init_special_inode(inode, inode->i_mode, - inode->i_rdev); + init_special_inode(inode, inode->i_mode, inode->i_rdev); } } @@ -283,75 +281,6 @@ close_bdev_excl(bdev); } -void -xfs_flush_buftarg( - xfs_buftarg_t *btp) -{ - pagebuf_delwri_flush(btp, PBDF_WAIT, NULL); -} - -void -xfs_free_buftarg( - xfs_buftarg_t *btp) -{ - xfs_flush_buftarg(btp); - kmem_free(btp, sizeof(*btp)); -} - -int -xfs_readonly_buftarg( - xfs_buftarg_t *btp) -{ - return bdev_read_only(btp->pbr_bdev); -} - -void -xfs_relse_buftarg( - xfs_buftarg_t *btp) -{ - invalidate_bdev(btp->pbr_bdev, 1); - truncate_inode_pages(btp->pbr_mapping, 0LL); -} - -unsigned int -xfs_getsize_buftarg( - xfs_buftarg_t *btp) -{ - return block_size(btp->pbr_bdev); -} - -void -xfs_setsize_buftarg( - xfs_buftarg_t *btp, - unsigned int blocksize, - unsigned int sectorsize) -{ - btp->pbr_bsize = blocksize; - btp->pbr_sshift = ffs(sectorsize) - 1; - btp->pbr_smask = sectorsize - 1; - - if (set_blocksize(btp->pbr_bdev, sectorsize)) { - printk(KERN_WARNING - "XFS: Cannot set_blocksize to %u on device %s\n", - sectorsize, XFS_BUFTARG_NAME(btp)); - } -} - -xfs_buftarg_t * -xfs_alloc_buftarg( - struct block_device *bdev) -{ - xfs_buftarg_t *btp; - - btp = kmem_zalloc(sizeof(*btp), KM_SLEEP); - - btp->pbr_dev = bdev->bd_dev; - btp->pbr_bdev = bdev; - btp->pbr_mapping = bdev->bd_inode->i_mapping; - xfs_setsize_buftarg(btp, PAGE_CACHE_SIZE, bdev_hardsect_size(bdev)); - - return btp; -} STATIC struct inode * linvfs_alloc_inode( @@ -448,7 +377,8 @@ #define SYNCD_FLAGS (SYNC_FSDATA|SYNC_BDFLUSH|SYNC_ATTR) STATIC int -syncd(void *arg) +xfssyncd( + void *arg) { vfs_t *vfsp = (vfs_t *) arg; int error; @@ -480,20 +410,22 @@ } STATIC int -linvfs_start_syncd(vfs_t *vfsp) +linvfs_start_syncd( + vfs_t *vfsp) { - int pid; + int pid; - pid = kernel_thread(syncd, (void *) vfsp, + pid = kernel_thread(xfssyncd, (void *) vfsp, CLONE_VM | CLONE_FS | CLONE_FILES); if (pid < 0) - return pid; + return -pid; wait_event(vfsp->vfs_wait_sync_task, vfsp->vfs_sync_task); return 0; } STATIC void -linvfs_stop_syncd(vfs_t *vfsp) +linvfs_stop_syncd( + vfs_t *vfsp) { vfsp->vfs_flag |= VFS_UMOUNT; wmb(); @@ -735,7 +667,7 @@ struct vfs *vfsp = vfs_allocate(); struct xfs_mount_args *args = xfs_args_allocate(sb); struct kstatfs statvfs; - int error; + int error, error2; vfsp->vfs_super = sb; LINVFS_SET_VFS(sb, vfsp); @@ -776,11 +708,15 @@ goto fail_unmount; sb->s_root = d_alloc_root(LINVFS_GET_IP(rootvp)); - if (!sb->s_root) + if (!sb->s_root) { + error = ENOMEM; goto fail_vnrele; - if (is_bad_inode(sb->s_root->d_inode)) + } + if (is_bad_inode(sb->s_root->d_inode)) { + error = EINVAL; goto fail_vnrele; - if (linvfs_start_syncd(vfsp)) + } + if ((error = linvfs_start_syncd(vfsp))) goto fail_vnrele; vn_trace_exit(rootvp, __FUNCTION__, (inst_t *)__return_address); @@ -796,7 +732,7 @@ } fail_unmount: - VFS_UNMOUNT(vfsp, 0, NULL, error); + VFS_UNMOUNT(vfsp, 0, NULL, error2); fail_vfsop: vfs_deallocate(vfsp); diff -Nru a/fs/xfs/linux/xfs_super.h b/fs/xfs/linux/xfs_super.h --- a/fs/xfs/linux/xfs_super.h Tue May 4 21:53:35 2004 +++ b/fs/xfs/linux/xfs_super.h Tue May 4 21:53:35 2004 @@ -112,7 +112,7 @@ struct xfs_inode; struct xfs_mount; -struct pb_target; +struct xfs_buftarg; struct block_device; extern __uint64_t xfs_max_file_offset(unsigned int); @@ -125,13 +125,5 @@ extern int xfs_blkdev_get(struct xfs_mount *, const char *, struct block_device **); extern void xfs_blkdev_put(struct block_device *); - -extern struct pb_target *xfs_alloc_buftarg(struct block_device *); -extern void xfs_relse_buftarg(struct pb_target *); -extern void xfs_free_buftarg(struct pb_target *); -extern void xfs_flush_buftarg(struct pb_target *); -extern int xfs_readonly_buftarg(struct pb_target *); -extern void xfs_setsize_buftarg(struct pb_target *, unsigned int, unsigned int); -extern unsigned int xfs_getsize_buftarg(struct pb_target *); #endif /* __XFS_SUPER_H__ */ diff -Nru a/fs/xfs/xfs_acl.c b/fs/xfs/xfs_acl.c --- a/fs/xfs/xfs_acl.c Tue May 4 21:53:35 2004 +++ b/fs/xfs/xfs_acl.c Tue May 4 21:53:35 2004 @@ -111,7 +111,7 @@ return EINVAL; if (src->a_version != cpu_to_le32(POSIX_ACL_XATTR_VERSION)) - return EINVAL; + return EOPNOTSUPP; memset(dest, 0, sizeof(xfs_acl_t)); dest->acl_cnt = posix_acl_xattr_count(size); diff -Nru a/fs/xfs/xfs_dir2_node.c b/fs/xfs/xfs_dir2_node.c --- a/fs/xfs/xfs_dir2_node.c Tue May 4 21:53:35 2004 +++ b/fs/xfs/xfs_dir2_node.c Tue May 4 21:53:35 2004 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as @@ -224,12 +224,21 @@ mp = dp->i_mount; tp = args->trans; leaf = bp->data; + + /* + * Quick check just to make sure we are not going to index + * into other peoples memory + */ + if (index < 0) + return XFS_ERROR(EFSCORRUPTED); + /* * If there are already the maximum number of leaf entries in * the block, if there are no stale entries it won't fit. * Caller will do a split. If there are stale entries we'll do * a compact. */ + if (INT_GET(leaf->hdr.count, ARCH_CONVERT) == XFS_DIR2_MAX_LEAF_ENTS(mp)) { if (INT_ISZERO(leaf->hdr.stale, ARCH_CONVERT)) return XFS_ERROR(ENOSPC); @@ -828,12 +837,24 @@ state->inleaf = !swap; else state->inleaf = - swap ^ (args->hashval < INT_GET(leaf2->ents[0].hashval, ARCH_CONVERT)); + swap ^ (blk1->index <= INT_GET(leaf1->hdr.count, ARCH_CONVERT)); /* * Adjust the expected index for insertion. */ if (!state->inleaf) blk2->index = blk1->index - INT_GET(leaf1->hdr.count, ARCH_CONVERT); + + /* + * Finally sanity check just to make sure we are not returning a negative index + */ + if(blk2->index < 0) { + state->inleaf = 1; + blk2->index = 0; + cmn_err(CE_ALERT, + "xfs_dir2_leafn_rebalance: picked the wrong leaf? reverting orignal leaf: " + "blk1->index %d\n", + blk1->index); + } } /* diff -Nru a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c --- a/fs/xfs/xfs_iomap.c Tue May 4 21:53:36 2004 +++ b/fs/xfs/xfs_iomap.c Tue May 4 21:53:36 2004 @@ -591,10 +591,11 @@ firstblock = NULLFSBLOCK; /* - * roundup the allocation request to m_dalign boundary if file size - * is greater that 512K and we are allocating past the allocation eof + * Roundup the allocation request to a stripe unit (m_dalign) boundary + * if the file size is >= stripe unit size, and we are allocating past + * the allocation eof. */ - if (mp->m_dalign && (isize >= mp->m_dalign) && aeof) { + if (mp->m_dalign && (isize >= XFS_FSB_TO_B(mp, mp->m_dalign)) && aeof) { int eof; xfs_fileoff_t new_last_fsb; new_last_fsb = roundup_64(last_fsb, mp->m_dalign); diff -Nru a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c --- a/fs/xfs/xfs_mount.c Tue May 4 21:53:35 2004 +++ b/fs/xfs/xfs_mount.c Tue May 4 21:53:35 2004 @@ -1126,22 +1126,11 @@ void xfs_unmountfs_close(xfs_mount_t *mp, struct cred *cr) { - int have_logdev = (mp->m_logdev_targp != mp->m_ddev_targp); - - if (mp->m_ddev_targp) { - xfs_free_buftarg(mp->m_ddev_targp); - mp->m_ddev_targp = NULL; - } - if (mp->m_rtdev_targp) { - xfs_blkdev_put(mp->m_rtdev_targp->pbr_bdev); - xfs_free_buftarg(mp->m_rtdev_targp); - mp->m_rtdev_targp = NULL; - } - if (mp->m_logdev_targp && have_logdev) { - xfs_blkdev_put(mp->m_logdev_targp->pbr_bdev); - xfs_free_buftarg(mp->m_logdev_targp); - mp->m_logdev_targp = NULL; - } + if (mp->m_logdev_targp != mp->m_ddev_targp) + xfs_free_buftarg(mp->m_logdev_targp, 1); + if (mp->m_rtdev_targp) + xfs_free_buftarg(mp->m_rtdev_targp, 1); + xfs_free_buftarg(mp->m_ddev_targp, 0); } int diff -Nru a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c --- a/fs/xfs/xfs_vfsops.c Tue May 4 21:53:35 2004 +++ b/fs/xfs/xfs_vfsops.c Tue May 4 21:53:35 2004 @@ -213,9 +213,9 @@ */ STATIC int xfs_start_flags( + struct vfs *vfs, struct xfs_mount_args *ap, - struct xfs_mount *mp, - int ronly) + struct xfs_mount *mp) { /* Values are in BBs */ if ((ap->flags & XFSMNT_NOALIGN) != XFSMNT_NOALIGN) { @@ -305,7 +305,7 @@ * no recovery flag requires a read-only mount */ if (ap->flags & XFSMNT_NORECOVERY) { - if (!ronly) { + if (!(vfs->vfs_flag & VFS_RDONLY)) { cmn_err(CE_WARN, "XFS: tried to mount a FS read-write without recovery!"); return XFS_ERROR(EINVAL); @@ -327,10 +327,12 @@ */ STATIC int xfs_finish_flags( + struct vfs *vfs, struct xfs_mount_args *ap, - struct xfs_mount *mp, - int ronly) + struct xfs_mount *mp) { + int ronly = (vfs->vfs_flag & VFS_RDONLY); + /* Fail a mount where the logbuf is smaller then the log stripe */ if (XFS_SB_VERSION_HASLOGV2(&mp->m_sb)) { if ((ap->logbufsize == -1) && @@ -420,7 +422,6 @@ struct bhv_desc *p; struct xfs_mount *mp = XFS_BHVTOM(bhvp); struct block_device *ddev, *logdev, *rtdev; - int ronly = (vfsp->vfs_flag & VFS_RDONLY); int flags = 0, error; ddev = vfsp->vfs_super->s_bdev; @@ -472,13 +473,13 @@ /* * Setup flags based on mount(2) options and then the superblock */ - error = xfs_start_flags(args, mp, ronly); + error = xfs_start_flags(vfsp, args, mp); if (error) goto error; error = xfs_readsb(mp); if (error) goto error; - error = xfs_finish_flags(args, mp, ronly); + error = xfs_finish_flags(vfsp, args, mp); if (error) { xfs_freesb(mp); goto error; @@ -624,7 +625,7 @@ if (*flags & MS_RDONLY) { xfs_refcache_purge_mp(mp); - pagebuf_delwri_flush(mp->m_ddev_targp, 0, NULL); + xfs_flush_buftarg(mp->m_ddev_targp, 0); xfs_finish_reclaim_all(mp, 0); /* This loop must run at least twice. @@ -636,9 +637,11 @@ */ do { VFS_SYNC(vfsp, REMOUNT_READONLY_FLAGS, NULL, error); - pagebuf_delwri_flush(mp->m_ddev_targp, PBDF_WAIT, - &pincount); - if(0 == pincount) { delay(50); count++; } + pincount = xfs_flush_buftarg(mp->m_ddev_targp, 1); + if (!pincount) { + delay(50); + count++; + } } while (count < 2); /* Ok now write out an unmount record */ diff -Nru a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c --- a/fs/xfs/xfs_vnodeops.c Tue May 4 21:53:36 2004 +++ b/fs/xfs/xfs_vnodeops.c Tue May 4 21:53:36 2004 @@ -680,18 +680,12 @@ * once it is a part of the transaction. */ if (mask & XFS_AT_SIZE) { - if (vap->va_size > ip->i_d.di_size) { + code = 0; + if (vap->va_size > ip->i_d.di_size) code = xfs_igrow_start(ip, vap->va_size, credp); - xfs_iunlock(ip, XFS_ILOCK_EXCL); - } else if (vap->va_size <= ip->i_d.di_size) { - xfs_iunlock(ip, XFS_ILOCK_EXCL); - xfs_itruncate_start(ip, XFS_ITRUNC_DEFINITE, - (xfs_fsize_t)vap->va_size); - code = 0; - } else { - xfs_iunlock(ip, XFS_ILOCK_EXCL); - code = 0; - } + xfs_iunlock(ip, XFS_ILOCK_EXCL); + if (!code) + code = xfs_itruncate_data(ip, vap->va_size); if (code) { ASSERT(tp == NULL); lock_flags &= ~XFS_ILOCK_EXCL; diff -Nru a/include/asm-alpha/unistd.h b/include/asm-alpha/unistd.h --- a/include/asm-alpha/unistd.h Tue May 4 21:53:35 2004 +++ b/include/asm-alpha/unistd.h Tue May 4 21:53:35 2004 @@ -363,7 +363,18 @@ #define __NR_stat64 425 #define __NR_lstat64 426 #define __NR_fstat64 427 -#define NR_SYSCALLS 428 +#define __NR_vserver 428 +#define __NR_mbind 429 +#define __NR_get_mempolicy 430 +#define __NR_set_mempolicy 431 +#define __NR_mq_open 432 +#define __NR_mq_unlink 433 +#define __NR_mq_timedsend 434 +#define __NR_mq_timedreceive 435 +#define __NR_mq_notify 436 +#define __NR_mq_getsetattr 437 + +#define NR_SYSCALLS 438 #if defined(__GNUC__) diff -Nru a/include/asm-arm/arch-pxa/lubbock.h b/include/asm-arm/arch-pxa/lubbock.h --- a/include/asm-arm/arch-pxa/lubbock.h Tue May 4 21:53:35 2004 +++ b/include/asm-arm/arch-pxa/lubbock.h Tue May 4 21:53:35 2004 @@ -10,11 +10,10 @@ * published by the Free Software Foundation. */ -#define LUBBOCK_FPGA_PHYS PXA_CS2_PHYS -#define LUBBOCK_FPGA_VIRT (0xf0000000) /* phys 0x08000000 */ #define LUBBOCK_ETH_PHYS PXA_CS3_PHYS -#define LUBBOCK_ETH_VIRT (0xf1000000) +#define LUBBOCK_FPGA_PHYS PXA_CS2_PHYS +#define LUBBOCK_FPGA_VIRT (0xf0000000) #define LUB_P2V(x) ((x) - LUBBOCK_FPGA_PHYS + LUBBOCK_FPGA_VIRT) #define LUB_V2P(x) ((x) - LUBBOCK_FPGA_VIRT + LUBBOCK_FPGA_PHYS) @@ -24,89 +23,15 @@ # define __LUB_REG(x) LUB_P2V(x) #endif -/* board level registers in the CPLD: (offsets from CPLD_BASE) */ - -#define WHOAMI 0 // card ID's (see programmers manual) -#define HEX_LED 0x10 // R/W access to 8 7 segment displays -#define DISC_BLNK_LED 0x40 // R/W [15-8] enables for hex leds, [7-0] discrete LEDs -#define CONF_SWITCHES 0x50 // RO [1] flash wrt prot, [0] 0= boot from rom, 1= flash -#define USER_SWITCHES 0x60 // RO [15-8] dip switches, [7-0] 2 hex encoding switches -#define MISC_WR 0x80 // R/W various system controls -see manual -#define MISC_RD 0x90 // RO various system status bits -see manual -//#define LUB_IRQ_MASK_EN 0xC0 // R/W 0= mask, 1= enable of TS, codec, ethernet, USB, SA1111, and card det. irq's -//#define LUB_IRQ_SET_CLR 0xD0 // R/W 1= set, 0 = clear IRQ's from TS, codec, etc... -//#define LUB_GP 0x100 // R/W [15-0] 16 bits of general purpose I/o for hacking - - -/* FPGA register physical addresses */ -#define _LUB_WHOAMI (LUBBOCK_FPGA_PHYS + 0x000) -#define _LUB_HEXLED (LUBBOCK_FPGA_PHYS + 0x010) -#define _LUB_DISC_BLNK_LED (LUBBOCK_FPGA_PHYS + 0x040) -#define _LUB_CONF_SWITCHES (LUBBOCK_FPGA_PHYS + 0x050) -#define _LUB_USER_SWITCHES (LUBBOCK_FPGA_PHYS + 0x060) -#define _LUB_MISC_WR (LUBBOCK_FPGA_PHYS + 0x080) -#define _LUB_MISC_RD (LUBBOCK_FPGA_PHYS + 0x090) -#define _LUB_IRQ_MASK_EN (LUBBOCK_FPGA_PHYS + 0x0C0) -#define _LUB_IRQ_SET_CLR (LUBBOCK_FPGA_PHYS + 0x0D0) -#define _LUB_GP (LUBBOCK_FPGA_PHYS + 0x100) - /* FPGA register virtual addresses */ -#define LUB_WHOAMI __LUB_REG(_LUB_WHOAMI) -#define LUB_HEXLED __LUB_REG(_LUB_HEXLED) -#define LUB_DISC_BLNK_LED __LUB_REG(_LUB_DISC_BLNK_LED) -#define LUB_CONF_SWITCHES __LUB_REG(_LUB_CONF_SWITCHES) -#define LUB_USER_SWITCHES __LUB_REG(_LUB_USER_SWITCHES) -#define LUB_MISC_WR __LUB_REG(_LUB_MISC_WR) -#define LUB_MISC_RD __LUB_REG(_LUB_MISC_RD) -#define LUB_IRQ_MASK_EN __LUB_REG(_LUB_IRQ_MASK_EN) -#define LUB_IRQ_SET_CLR __LUB_REG(_LUB_IRQ_SET_CLR) -#define LUB_GP __LUB_REG(_LUB_GP) - -/* GPIOs */ - -#define GPIO_LUBBOCK_IRQ 0 -#define IRQ_GPIO_LUBBOCK_IRQ IRQ_GPIO0 - - -/* - * LED macros - */ - -#define LEDS_BASE LUB_DISC_BLNK_LED - -// 8 discrete leds available for general use: - -#define D28 0x1 -#define D27 0x2 -#define D26 0x4 -#define D25 0x8 -#define D24 0x10 -#define D23 0x20 -#define D22 0x40 -#define D21 0x80 - -/* Note: bits [15-8] are used to enable/blank the 8 7 segment hex displays so -* be sure to not monkey with them here. -*/ - -#define HEARTBEAT_LED D28 -#define SYS_BUSY_LED D27 -#define HEXLEDS_BASE LUB_HEXLED - -#define HEARTBEAT_LED_ON (LEDS_BASE &= ~HEARTBEAT_LED) -#define HEARTBEAT_LED_OFF (LEDS_BASE |= HEARTBEAT_LED) -#define SYS_BUSY_LED_OFF (LEDS_BASE |= SYS_BUSY_LED) -#define SYS_BUSY_LED_ON (LEDS_BASE &= ~SYS_BUSY_LED) - -// use x = D26-D21 for these, please... -#define DISCRETE_LED_ON(x) (LEDS_BASE &= ~(x)) -#define DISCRETE_LED_OFF(x) (LEDS_BASE |= (x)) - -#ifndef __ASSEMBLY__ - -//extern int hexled_val = 0; - -#endif +#define LUB_WHOAMI __LUB_REG(LUBBOCK_FPGA_PHYS + 0x000) +#define LUB_HEXLED __LUB_REG(LUBBOCK_FPGA_PHYS + 0x010) +#define LUB_DISC_BLNK_LED __LUB_REG(LUBBOCK_FPGA_PHYS + 0x040) +#define LUB_CONF_SWITCHES __LUB_REG(LUBBOCK_FPGA_PHYS + 0x050) +#define LUB_USER_SWITCHES __LUB_REG(LUBBOCK_FPGA_PHYS + 0x060) +#define LUB_MISC_WR __LUB_REG(LUBBOCK_FPGA_PHYS + 0x080) +#define LUB_MISC_RD __LUB_REG(LUBBOCK_FPGA_PHYS + 0x090) +#define LUB_IRQ_MASK_EN __LUB_REG(LUBBOCK_FPGA_PHYS + 0x0c0) +#define LUB_IRQ_SET_CLR __LUB_REG(LUBBOCK_FPGA_PHYS + 0x0d0) +#define LUB_GP __LUB_REG(LUBBOCK_FPGA_PHYS + 0x100) -#define BUMP_COUNTER (HEXLEDS_BASE = hexled_val++) -#define DEC_COUNTER (HEXLEDS_BASE = hexled_val--) diff -Nru a/include/asm-arm/atomic.h b/include/asm-arm/atomic.h --- a/include/asm-arm/atomic.h Tue May 4 21:53:35 2004 +++ b/include/asm-arm/atomic.h Tue May 4 21:53:35 2004 @@ -88,7 +88,7 @@ " strex %1, %0, [%2]\n" " teq %1, #0\n" " bne 1b" - : "=&r" (result), "=r" (tmp) + : "=&r" (result), "=&r" (tmp) : "r" (&v->counter) : "cc"); @@ -106,7 +106,7 @@ " strex %1, %0, [%2]\n" " teq %1, #0\n" " bne 1b" - : "=&r" (result), "=r" (tmp) + : "=&r" (result), "=&r" (tmp) : "r" (&v->counter), "Ir" (i) : "cc"); diff -Nru a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h --- a/include/asm-arm/pgtable.h Tue May 4 21:53:35 2004 +++ b/include/asm-arm/pgtable.h Tue May 4 21:53:35 2004 @@ -396,6 +396,11 @@ #include /* + * We provide our own arch_get_unmapped_area to cope with VIPT caches. + */ +#define HAVE_ARCH_UNMAPPED_AREA + +/* * remap a physical address `phys' of size `size' with page protection `prot' * into virtual address `from' */ diff -Nru a/include/asm-arm/shmparam.h b/include/asm-arm/shmparam.h --- a/include/asm-arm/shmparam.h Tue May 4 21:53:36 2004 +++ b/include/asm-arm/shmparam.h Tue May 4 21:53:36 2004 @@ -6,10 +6,11 @@ * or page size, whichever is greater since the cache aliases * every size/ways bytes. */ -#if __LINUX_ARM_ARCH__ > 5 -#define SHMLBA (4 * PAGE_SIZE) -#else -#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */ -#endif +#define SHMLBA (4 * PAGE_SIZE) /* attach addr a multiple of this */ + +/* + * Enforce SHMLBA in shmat + */ +#define __ARCH_FORCE_SHMLBA #endif /* _ASMARM_SHMPARAM_H */ diff -Nru a/include/asm-arm/system.h b/include/asm-arm/system.h --- a/include/asm-arm/system.h Tue May 4 21:53:35 2004 +++ b/include/asm-arm/system.h Tue May 4 21:53:35 2004 @@ -42,6 +42,19 @@ #define CR_XP (1 << 23) /* Extended page tables */ #define CR_VE (1 << 24) /* Vectored interrupts */ +#define CPUID_ID 0 +#define CPUID_CACHETYPE 1 +#define CPUID_TCM 2 +#define CPUID_TLBTYPE 3 + +#define read_cpuid(reg) \ + ({ \ + unsigned int __val; \ + asm("mrc%? p15, 0, %0, c0, c0, " __stringify(reg) \ + : "=r" (__val)); \ + __val; \ + }) + /* * This is used to ensure the compiler did actually allocate the register we * asked it for some inline assembly sequences. Apparently we can't trust diff -Nru a/include/asm-ia64/pgtable.h b/include/asm-ia64/pgtable.h --- a/include/asm-ia64/pgtable.h Tue May 4 21:53:35 2004 +++ b/include/asm-ia64/pgtable.h Tue May 4 21:53:35 2004 @@ -147,8 +147,8 @@ #define __P011 PAGE_READONLY /* ditto */ #define __P100 __pgprot(__ACCESS_BITS | _PAGE_PL_3 | _PAGE_AR_X_RX) #define __P101 __pgprot(__ACCESS_BITS | _PAGE_PL_3 | _PAGE_AR_RX) -#define __P110 PAGE_COPY -#define __P111 PAGE_COPY +#define __P110 PAGE_COPY_EXEC +#define __P111 PAGE_COPY_EXEC #define __S000 PAGE_NONE #define __S001 PAGE_READONLY diff -Nru a/include/asm-ia64/sn/sn_sal.h b/include/asm-ia64/sn/sn_sal.h --- a/include/asm-ia64/sn/sn_sal.h Tue May 4 21:53:36 2004 +++ b/include/asm-ia64/sn/sn_sal.h Tue May 4 21:53:36 2004 @@ -288,7 +288,7 @@ ret_stuff.v0 = 0; ret_stuff.v1 = 0; ret_stuff.v2 = 0; - SAL_CALL_NOLOCK(ret_stuff, SN_SAL_PRINT_ERROR, (uint64_t)hook, (uint64_t)rec, 0, 0, 0, 0, 0); + SAL_CALL_REENTRANT(ret_stuff, SN_SAL_PRINT_ERROR, (uint64_t)hook, (uint64_t)rec, 0, 0, 0, 0, 0); return ret_stuff.status; } diff -Nru a/include/asm-ppc/elf.h b/include/asm-ppc/elf.h --- a/include/asm-ppc/elf.h Tue May 4 21:53:35 2004 +++ b/include/asm-ppc/elf.h Tue May 4 21:53:35 2004 @@ -74,6 +74,8 @@ #ifdef __KERNEL__ +struct task_struct; + /* * This is used to ensure we don't load something for the wrong architecture. */ diff -Nru a/include/asm-ppc/harrier.h b/include/asm-ppc/harrier.h --- a/include/asm-ppc/harrier.h Tue May 4 21:53:35 2004 +++ b/include/asm-ppc/harrier.h Tue May 4 21:53:35 2004 @@ -1,90 +1,29 @@ /* - * include/asm-ppc/harrier.h + * arch/ppc/kernel/harrier.h * * Definitions for Motorola MCG Harrier North Bridge & Memory controller * * Author: Dale Farnsworth * dale.farnsworth@mvista.com * - * 2001 (c) MontaVista, Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. + * Modified by: Randy Vinson + * rvinson@mvista.com + * + * Copyright 2001-2002 MontaVista Software Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. */ #ifndef __ASMPPC_HARRIER_H #define __ASMPPC_HARRIER_H +#include #include -#define HARRIER_VEND_DEV_ID 0x480b1057 - -/* - * Define outbound register offsets. - */ -#define HARRIER_OTAD0_OFF 0x220 -#define HARRIER_OTOF0_OFF 0x224 -#define HARRIER_OTAD1_OFF 0x228 -#define HARRIER_OTOF1_OFF 0x22c -#define HARRIER_OTAD2_OFF 0x230 -#define HARRIER_OTOF2_OFF 0x234 -#define HARRIER_OTAD3_OFF 0x238 -#define HARRIER_OTOF3_OFF 0x23c - -/* - * Define inbound register offsets. - */ -#define HARRIER_ITSZ0_OFF 0x348 -#define HARRIER_ITSZ1_OFF 0x350 -#define HARRIER_ITSZ2_OFF 0x358 -#define HARRIER_ITSZ3_OFF 0x360 - -/* - * Define the Memory Controller register offsets. - */ -#define HARRIER_SDBA_OFF 0x110 -#define HARRIER_SDBB_OFF 0x114 -#define HARRIER_SDBC_OFF 0x118 -#define HARRIER_SDBD_OFF 0x11c -#define HARRIER_SDBE_OFF 0x120 -#define HARRIER_SDBF_OFF 0x124 -#define HARRIER_SDBG_OFF 0x128 -#define HARRIER_SDBH_OFF 0x12c - -#define HARRIER_SDB_ENABLE 0x00000100 -#define HARRIER_SDB_SIZE_MASK 0xf -#define HARRIER_SDB_SIZE_SHIFT 16 -#define HARRIER_SDB_BASE_MASK 0xff -#define HARRIER_SDB_BASE_SHIFT 24 - -#define HARRIER_SERIAL_0_OFF 0xc0 - -#define HARRIER_REVI_OFF 0x05 -#define HARRIER_UCTL_OFF 0xd0 -#define HARRIER_XTAL64_MASK 0x02 - -#define HARRIER_MISC_CSR_OFF 0x1c -#define HARRIER_RSTOUT_MASK 0x01 - -#define HARRIER_MBAR_OFF 0xe0 -#define HARRIER_MPIC_CSR_OFF 0xe4 -#define HARRIER_MPIC_OPI_ENABLE 0x40 -#define HARRIER_MPIC_IFEVP_OFF 0x10200 -#define HARRIER_MPIC_IFEDE_OFF 0x10210 -#define HARRIER_FEEN_OFF 0x40 -#define HARRIER_FEST_OFF 0x44 -#define HARRIER_FEMA_OFF 0x48 - -#define HARRIER_FE_DMA 0x80 -#define HARRIER_FE_MIDB 0x40 -#define HARRIER_FE_MIM0 0x20 -#define HARRIER_FE_MIM1 0x10 -#define HARRIER_FE_MIP 0x08 -#define HARRIER_FE_UA0 0x04 -#define HARRIER_FE_UA1 0x02 -#define HARRIER_FE_ABT 0x01 - - +struct pci_controller; int harrier_init(struct pci_controller *hose, uint ppc_reg_base, ulong processor_pci_mem_start, @@ -96,5 +35,11 @@ unsigned long harrier_get_mem_size(uint smc_base); int harrier_mpic_init(unsigned int pci_mem_offset); + +void harrier_setup_nonmonarch(uint ppc_reg_base, + uint in0_size); +void harrier_release_eready(uint ppc_reg_base); + +void harrier_wait_eready(uint ppc_reg_base); #endif /* __ASMPPC_HARRIER_H */ diff -Nru a/include/asm-ppc/open_pic.h b/include/asm-ppc/open_pic.h --- a/include/asm-ppc/open_pic.h Tue May 4 21:53:35 2004 +++ b/include/asm-ppc/open_pic.h Tue May 4 21:53:35 2004 @@ -41,6 +41,8 @@ extern void openpic_set_sources(int first_irq, int num_irqs, void *isr); extern void openpic_init(int linux_irq_offset); extern void openpic_init_nmi_irq(u_int irq); +extern void openpic_hookup_cascade(u_int irq, char *name, + int (*cascade_fn)(struct pt_regs *)); extern u_int openpic_irq(void); extern void openpic_eoi(void); extern void openpic_request_IPIs(void); diff -Nru a/include/asm-ppc64/uaccess.h b/include/asm-ppc64/uaccess.h --- a/include/asm-ppc64/uaccess.h Tue May 4 21:53:36 2004 +++ b/include/asm-ppc64/uaccess.h Tue May 4 21:53:36 2004 @@ -56,7 +56,7 @@ #define access_ok(type,addr,size) \ __access_ok(((unsigned long)(addr)),(size),get_fs()) -static inline int verify_area(int type, const void *addr, unsigned long size) +static inline int verify_area(int type, const void __user *addr, unsigned long size) { return access_ok(type,addr,size) ? 0 : -EFAULT; } @@ -214,7 +214,7 @@ /* more complex routines */ -extern unsigned long __copy_tofrom_user(void *to, const void *from, +extern unsigned long __copy_tofrom_user(void __user *to, const void __user *from, unsigned long size); static inline unsigned long @@ -239,7 +239,7 @@ return ret; } } - return __copy_tofrom_user(to, from, n); + return __copy_tofrom_user((void __user *) to, from, n); } static inline unsigned long @@ -251,27 +251,27 @@ switch (n) { case 1: - __put_user_size(*(u8 *)from, (u8 *)to, 1, ret, 1); + __put_user_size(*(u8 *)from, (u8 __user *)to, 1, ret, 1); return ret; case 2: - __put_user_size(*(u16 *)from, (u16 *)to, 2, ret, 2); + __put_user_size(*(u16 *)from, (u16 __user *)to, 2, ret, 2); return ret; case 4: - __put_user_size(*(u32 *)from, (u32 *)to, 4, ret, 4); + __put_user_size(*(u32 *)from, (u32 __user *)to, 4, ret, 4); return ret; case 8: - __put_user_size(*(u64 *)from, (u64 *)to, 8, ret, 8); + __put_user_size(*(u64 *)from, (u64 __user *)to, 8, ret, 8); return ret; } } - return __copy_tofrom_user(to, from, n); + return __copy_tofrom_user(to, (const void __user *) from, n); } #define __copy_in_user(to, from, size) \ __copy_tofrom_user((to), (from), (size)) static inline unsigned long -copy_from_user(void *to, const void *from, unsigned long n) +copy_from_user(void *to, const void __user *from, unsigned long n) { if (likely(access_ok(VERIFY_READ, from, n))) n = __copy_from_user(to, from, n); @@ -281,7 +281,7 @@ } static inline unsigned long -copy_to_user(void *to, const void *from, unsigned long n) +copy_to_user(void __user *to, const void *from, unsigned long n) { if (likely(access_ok(VERIFY_WRITE, to, n))) n = __copy_to_user(to, from, n); @@ -289,7 +289,7 @@ } static inline unsigned long -copy_in_user(void *to, const void *from, unsigned long n) +copy_in_user(void __user *to, const void __user *from, unsigned long n) { might_sleep(); if (likely(access_ok(VERIFY_READ, from, n) && @@ -298,10 +298,10 @@ return n; } -extern unsigned long __clear_user(void *addr, unsigned long size); +extern unsigned long __clear_user(void __user *addr, unsigned long size); static inline unsigned long -clear_user(void *addr, unsigned long size) +clear_user(void __user *addr, unsigned long size) { might_sleep(); if (likely(access_ok(VERIFY_WRITE, addr, size))) @@ -309,10 +309,10 @@ return size; } -extern int __strncpy_from_user(char *dst, const char *src, long count); +extern int __strncpy_from_user(char *dst, const char __user *src, long count); static inline long -strncpy_from_user(char *dst, const char *src, long count) +strncpy_from_user(char *dst, const char __user *src, long count) { might_sleep(); if (likely(access_ok(VERIFY_READ, src, 1))) @@ -325,14 +325,14 @@ * * Return 0 for error */ -extern int __strnlen_user(const char *str, long len); +extern int __strnlen_user(const char __user *str, long len); /* * Returns the length of the string at str (including the null byte), * or 0 if we hit a page we can't access, * or something > len if we didn't find a null byte. */ -static inline int strnlen_user(const char *str, long len) +static inline int strnlen_user(const char __user *str, long len) { might_sleep(); if (likely(access_ok(VERIFY_READ, str, 1))) diff -Nru a/include/asm-s390/cache.h b/include/asm-s390/cache.h --- a/include/asm-s390/cache.h Tue May 4 21:53:35 2004 +++ b/include/asm-s390/cache.h Tue May 4 21:53:35 2004 @@ -15,4 +15,6 @@ #define L1_CACHE_SHIFT 8 #define L1_CACHE_SHIFT_MAX 8 /* largest L1 which this arch supports */ +#define ARCH_KMALLOC_MINALIGN 8 + #endif diff -Nru a/include/asm-s390/elf.h b/include/asm-s390/elf.h --- a/include/asm-s390/elf.h Tue May 4 21:53:36 2004 +++ b/include/asm-s390/elf.h Tue May 4 21:53:36 2004 @@ -123,16 +123,10 @@ /* For SVR4/S390 the function pointer to be registered with `atexit` is passed in R14. */ -#ifndef __s390x__ -#define ELF_PLAT_INIT(_r, load_addr) \ - _r->gprs[14] = 0 -#else /* __s390x__ */ #define ELF_PLAT_INIT(_r, load_addr) \ do { \ - _r->gprs[14] = 0; \ - clear_thread_flag(TIF_31BIT); \ - } while(0) -#endif /* __s390x__ */ + _r->gprs[14] = 0; \ + } while (0) #define USE_ELF_CORE_DUMP #define ELF_EXEC_PAGESIZE 4096 diff -Nru a/include/asm-s390/processor.h b/include/asm-s390/processor.h --- a/include/asm-s390/processor.h Tue May 4 21:53:36 2004 +++ b/include/asm-s390/processor.h Tue May 4 21:53:36 2004 @@ -98,6 +98,8 @@ typedef struct thread_struct thread_struct; +#define ARCH_MIN_TASKALIGN 8 + #ifndef __s390x__ # define __SWAPPER_PG_DIR __pa(&swapper_pg_dir[0]) + _SEGMENT_TABLE #else /* __s390x__ */ diff -Nru a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h --- a/include/asm-s390/unistd.h Tue May 4 21:53:36 2004 +++ b/include/asm-s390/unistd.h Tue May 4 21:53:36 2004 @@ -105,6 +105,7 @@ #define __NR_stat 106 #define __NR_lstat 107 #define __NR_fstat 108 +#define __NR_lookup_dcookie 110 #define __NR_vhangup 111 #define __NR_idle 112 #define __NR_wait4 114 diff -Nru a/include/asm-sparc/bitext.h b/include/asm-sparc/bitext.h --- a/include/asm-sparc/bitext.h Tue May 4 21:53:36 2004 +++ b/include/asm-sparc/bitext.h Tue May 4 21:53:36 2004 @@ -15,6 +15,8 @@ int size; int used; int last_off; + int last_size; + int first_free; }; extern int bit_map_string_get(struct bit_map *t, int len, int align); diff -Nru a/include/asm-sparc/pgtable.h b/include/asm-sparc/pgtable.h --- a/include/asm-sparc/pgtable.h Tue May 4 21:53:36 2004 +++ b/include/asm-sparc/pgtable.h Tue May 4 21:53:36 2004 @@ -11,6 +11,7 @@ #include #include +#include #include #ifdef CONFIG_SUN4 #include @@ -401,9 +402,14 @@ extern int invalid_segment; /* Encode and de-code a swap entry */ -#define __swp_type(x) (((x).val >> 2) & 0x7f) -#define __swp_offset(x) (((x).val >> 9) & 0x3ffff) -#define __swp_entry(type,offset) ((swp_entry_t) { (((type) & 0x7f) << 2) | (((offset) & 0x3ffff) << 9) }) +BTFIXUPDEF_CALL(unsigned long, __swp_type, swp_entry_t) +BTFIXUPDEF_CALL(unsigned long, __swp_offset, swp_entry_t) +BTFIXUPDEF_CALL(swp_entry_t, __swp_entry, unsigned long, unsigned long) + +#define __swp_type(__x) BTFIXUP_CALL(__swp_type)(__x) +#define __swp_offset(__x) BTFIXUP_CALL(__swp_offset)(__x) +#define __swp_entry(__type,__off) BTFIXUP_CALL(__swp_entry)(__type,__off) + #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) diff -Nru a/include/asm-sparc/pgtsrmmu.h b/include/asm-sparc/pgtsrmmu.h --- a/include/asm-sparc/pgtsrmmu.h Tue May 4 21:53:35 2004 +++ b/include/asm-sparc/pgtsrmmu.h Tue May 4 21:53:35 2004 @@ -90,6 +90,22 @@ #define SRMMU_CHG_MASK (0xffffff00 | SRMMU_REF | SRMMU_DIRTY) +/* SRMMU swap entry encoding + * + * We use 5 bits for the type and 19 for the offset. This gives us + * 32 swapfiles of 4GB each. Encoding looks like: + * + * oooooooooooooooooootttttRRRRRRRR + * fedcba9876543210fedcba9876543210 + * + * The bottom 8 bits are reserved for protection and status bits, especially + * FILE and PRESENT. + */ +#define SRMMU_SWP_TYPE_MASK 0x1f +#define SRMMU_SWP_TYPE_SHIFT SRMMU_PTE_FILE_SHIFT +#define SRMMU_SWP_OFF_MASK 0x7ffff +#define SRMMU_SWP_OFF_SHIFT (SRMMU_PTE_FILE_SHIFT + 5) + /* Some day I will implement true fine grained access bits for * user pages because the SRMMU gives us the capabilities to * enforce all the protection levels that vma's can have. diff -Nru a/include/asm-sparc/pgtsun4c.h b/include/asm-sparc/pgtsun4c.h --- a/include/asm-sparc/pgtsun4c.h Tue May 4 21:53:35 2004 +++ b/include/asm-sparc/pgtsun4c.h Tue May 4 21:53:35 2004 @@ -74,6 +74,21 @@ #define SUN4C_PAGE_KERNEL __pgprot(_SUN4C_READABLE|_SUN4C_WRITEABLE|\ _SUN4C_PAGE_DIRTY|_SUN4C_PAGE_PRIV) +/* SUN4C swap entry encoding + * + * We use 5 bits for the type and 19 for the offset. This gives us + * 32 swapfiles of 4GB each. Encoding looks like: + * + * RRRRRRRRooooooooooooooooooottttt + * fedcba9876543210fedcba9876543210 + * + * The top 8 bits are reserved for protection and status bits, especially + * FILE and PRESENT. + */ +#define SUN4C_SWP_TYPE_MASK 0x1f +#define SUN4C_SWP_OFF_MASK 0x7ffff +#define SUN4C_SWP_OFF_SHIFT 5 + #ifndef __ASSEMBLY__ static inline unsigned long sun4c_get_synchronous_error(void) diff -Nru a/include/linux/bitops.h b/include/linux/bitops.h --- a/include/linux/bitops.h Tue May 4 21:53:36 2004 +++ b/include/linux/bitops.h Tue May 4 21:53:36 2004 @@ -115,12 +115,12 @@ generic_hweight32((unsigned int)w); #else u64 res; - res = (w & 0x5555555555555555) + ((w >> 1) & 0x5555555555555555); - res = (res & 0x3333333333333333) + ((res >> 2) & 0x3333333333333333); - res = (res & 0x0F0F0F0F0F0F0F0F) + ((res >> 4) & 0x0F0F0F0F0F0F0F0F); - res = (res & 0x00FF00FF00FF00FF) + ((res >> 8) & 0x00FF00FF00FF00FF); - res = (res & 0x0000FFFF0000FFFF) + ((res >> 16) & 0x0000FFFF0000FFFF); - return (res & 0x00000000FFFFFFFF) + ((res >> 32) & 0x00000000FFFFFFFF); + res = (w & 0x5555555555555555ul) + ((w >> 1) & 0x5555555555555555ul); + res = (res & 0x3333333333333333ul) + ((res >> 2) & 0x3333333333333333ul); + res = (res & 0x0F0F0F0F0F0F0F0Ful) + ((res >> 4) & 0x0F0F0F0F0F0F0F0Ful); + res = (res & 0x00FF00FF00FF00FFul) + ((res >> 8) & 0x00FF00FF00FF00FFul); + res = (res & 0x0000FFFF0000FFFFul) + ((res >> 16) & 0x0000FFFF0000FFFFul); + return (res & 0x00000000FFFFFFFFul) + ((res >> 32) & 0x00000000FFFFFFFFul); #endif } diff -Nru a/include/linux/cciss_ioctl.h b/include/linux/cciss_ioctl.h --- a/include/linux/cciss_ioctl.h Tue May 4 21:53:35 2004 +++ b/include/linux/cciss_ioctl.h Tue May 4 21:53:35 2004 @@ -35,17 +35,6 @@ #define MAX_KMALLOC_SIZE 128000 -typedef struct _BIG_IOCTL_Command_struct { - LUNAddr_struct LUN_info; - RequestBlock_struct Request; - ErrorInfo_struct error_info; - DWORD malloc_size; /* < MAX_KMALLOC_SIZE in cciss.c */ - DWORD buf_size; /* size in bytes of the buf */ - /* < malloc_size * MAXSGENTRIES */ - BYTE *buf; -} BIG_IOCTL_Command_struct; - - #ifndef CCISS_CMD_H // This defines are duplicated in cciss_cmd.h in the driver directory @@ -180,6 +169,16 @@ WORD buf_size; /* size in bytes of the buf */ BYTE *buf; } IOCTL_Command_struct; + +typedef struct _BIG_IOCTL_Command_struct { + LUNAddr_struct LUN_info; + RequestBlock_struct Request; + ErrorInfo_struct error_info; + DWORD malloc_size; /* < MAX_KMALLOC_SIZE in cciss.c */ + DWORD buf_size; /* size in bytes of the buf */ + /* < malloc_size * MAXSGENTRIES */ + BYTE *buf; +} BIG_IOCTL_Command_struct; typedef struct _LogvolInfo_struct{ __u32 LunID; diff -Nru a/include/linux/crc32c.h b/include/linux/crc32c.h --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/include/linux/crc32c.h Tue May 4 21:53:36 2004 @@ -0,0 +1,11 @@ +#ifndef _LINUX_CRC32C_H +#define _LINUX_CRC32C_H + +#include + +extern u32 crc32c_le(u32 crc, unsigned char const *address, size_t length); +extern u32 crc32c_be(u32 crc, unsigned char const *address, size_t length); + +#define crc32c(seed, data, length) crc32c_le(seed, (unsigned char const *)data, length) + +#endif /* _LINUX_CRC32C_H */ diff -Nru a/include/linux/efi.h b/include/linux/efi.h --- a/include/linux/efi.h Tue May 4 21:53:36 2004 +++ b/include/linux/efi.h Tue May 4 21:53:36 2004 @@ -212,6 +212,9 @@ #define UGA_IO_PROTOCOL_GUID \ EFI_GUID( 0x61a4d49e, 0x6f68, 0x4f1b, 0xb9, 0x22, 0xa8, 0x6e, 0xed, 0xb, 0x7, 0xa2 ) +#define EFI_GLOBAL_VARIABLE_GUID \ + EFI_GUID( 0x8be4df61, 0x93ca, 0x11d2, 0xaa, 0x0d, 0x00, 0xe0, 0x98, 0x03, 0x2b, 0x8c ) + typedef struct { efi_guid_t guid; unsigned long table; @@ -294,6 +297,7 @@ extern u64 efi_get_iobase (void); extern u32 efi_mem_type (unsigned long phys_addr); extern u64 efi_mem_attributes (unsigned long phys_addr); +extern int __init efi_uart_console_only (void); extern void efi_initialize_iomem_resources(struct resource *code_resource, struct resource *data_resource); extern efi_status_t phys_efi_get_time(efi_time_t *tm, efi_time_cap_t *tc); @@ -322,6 +326,49 @@ #define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x0000000000000002 #define EFI_VARIABLE_RUNTIME_ACCESS 0x0000000000000004 +/* + * EFI Device Path information + */ +#define EFI_DEV_HW 0x01 +#define EFI_DEV_PCI 1 +#define EFI_DEV_PCCARD 2 +#define EFI_DEV_MEM_MAPPED 3 +#define EFI_DEV_VENDOR 4 +#define EFI_DEV_CONTROLLER 5 +#define EFI_DEV_ACPI 0x02 +#define EFI_DEV_BASIC_ACPI 1 +#define EFI_DEV_EXPANDED_ACPI 2 +#define EFI_DEV_MSG 0x03 +#define EFI_DEV_MSG_ATAPI 1 +#define EFI_DEV_MSG_SCSI 2 +#define EFI_DEV_MSG_FC 3 +#define EFI_DEV_MSG_1394 4 +#define EFI_DEV_MSG_USB 5 +#define EFI_DEV_MSG_USB_CLASS 15 +#define EFI_DEV_MSG_I20 6 +#define EFI_DEV_MSG_MAC 11 +#define EFI_DEV_MSG_IPV4 12 +#define EFI_DEV_MSG_IPV6 13 +#define EFI_DEV_MSG_INFINIBAND 9 +#define EFI_DEV_MSG_UART 14 +#define EFI_DEV_MSG_VENDOR 10 +#define EFI_DEV_MEDIA 0x04 +#define EFI_DEV_MEDIA_HARD_DRIVE 1 +#define EFI_DEV_MEDIA_CDROM 2 +#define EFI_DEV_MEDIA_VENDOR 3 +#define EFI_DEV_MEDIA_FILE 4 +#define EFI_DEV_MEDIA_PROTOCOL 5 +#define EFI_DEV_BIOS_BOOT 0x05 +#define EFI_DEV_END_PATH 0x7F +#define EFI_DEV_END_PATH2 0xFF +#define EFI_DEV_END_INSTANCE 0x01 +#define EFI_DEV_END_ENTIRE 0xFF + +struct efi_generic_dev_path { + u8 type; + u8 sub_type; + u16 length; +} __attribute ((packed)); /* * efi_dir is allocated in arch/ia64/kernel/efi.c. diff -Nru a/include/linux/harrier_defs.h b/include/linux/harrier_defs.h --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/include/linux/harrier_defs.h Tue May 4 21:53:36 2004 @@ -0,0 +1,212 @@ +/* + * asm-ppc/harrier_defs.h + * + * Definitions for Motorola MCG Harrier North Bridge & Memory controller + * + * Author: Dale Farnsworth + * dale.farnsworth@mvista.com + * + * Extracted from asm-ppc/harrier.h by: + * Randy Vinson + * rvinson@mvista.com + * + * Copyright 2001-2002 MontaVista Software Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +#ifndef __ASMPPC_HARRIER_DEFS_H +#define __ASMPPC_HARRIER_DEFS_H + +#define HARRIER_DEFAULT_XCSR_BASE 0xfeff0000 + +#define HARRIER_VEND_DEV_ID 0x1057480b + +#define HARRIER_VENI_OFF 0x00 + +#define HARRIER_REVI_OFF 0x05 +#define HARRIER_UCTL_OFF 0xd0 +#define HARRIER_XTAL64_MASK 0x02 + +#define HARRIER_MISC_CSR_OFF 0x1c +#define HARRIER_RSTOUT 0x01000000 +#define HARRIER_SYSCON 0x08000000 +#define HARRIER_EREADY 0x10000000 +#define HARRIER_ERDYS 0x20000000 + +/* Function exception registers */ +#define HARRIER_FEEN_OFF 0x40 /* enable */ +#define HARRIER_FEST_OFF 0x44 /* status */ +#define HARRIER_FEMA_OFF 0x48 /* mask */ +#define HARRIER_FECL_OFF 0x4c /* clear */ + +#define HARRIER_FE_DMA 0x80 +#define HARRIER_FE_MIDB 0x40 +#define HARRIER_FE_MIM0 0x20 +#define HARRIER_FE_MIM1 0x10 +#define HARRIER_FE_MIP 0x08 +#define HARRIER_FE_UA0 0x04 +#define HARRIER_FE_UA1 0x02 +#define HARRIER_FE_ABT 0x01 + +#define HARRIER_SERIAL_0_OFF 0xc0 + +#define HARRIER_MBAR_OFF 0xe0 +#define HARRIER_MBAR_MSK 0xfffc0000 +#define HARRIER_MPIC_CSR_OFF 0xe4 +#define HARRIER_MPIC_OPI_ENABLE 0x40 +#define HARRIER_MPIC_IFEVP_OFF 0x10200 +#define HARRIER_MPIC_IFEVP_VECT_MSK 0xff +#define HARRIER_MPIC_IFEDE_OFF 0x10210 + +/* + * Define the Memory Controller register offsets. + */ +#define HARRIER_SDBA_OFF 0x110 +#define HARRIER_SDBB_OFF 0x114 +#define HARRIER_SDBC_OFF 0x118 +#define HARRIER_SDBD_OFF 0x11c +#define HARRIER_SDBE_OFF 0x120 +#define HARRIER_SDBF_OFF 0x124 +#define HARRIER_SDBG_OFF 0x128 +#define HARRIER_SDBH_OFF 0x12c + +#define HARRIER_SDB_ENABLE 0x00000100 +#define HARRIER_SDB_SIZE_MASK 0xf +#define HARRIER_SDB_SIZE_SHIFT 16 +#define HARRIER_SDB_BASE_MASK 0xff +#define HARRIER_SDB_BASE_SHIFT 24 + +/* + * Define outbound register offsets. + */ +#define HARRIER_OTAD0_OFF 0x220 +#define HARRIER_OTOF0_OFF 0x224 +#define HARRIER_OTAD1_OFF 0x228 +#define HARRIER_OTOF1_OFF 0x22c +#define HARRIER_OTAD2_OFF 0x230 +#define HARRIER_OTOF2_OFF 0x234 +#define HARRIER_OTAD3_OFF 0x238 +#define HARRIER_OTOF3_OFF 0x23c + +#define HARRIER_OTADX_START_MSK 0xffff0000UL +#define HARRIER_OTADX_END_MSK 0x0000ffffUL + +#define HARRIER_OTOFX_OFF_MSK 0xffff0000UL +#define HARRIER_OTOFX_ENA 0x80UL +#define HARRIER_OTOFX_WPE 0x10UL +#define HARRIER_OTOFX_SGE 0x08UL +#define HARRIER_OTOFX_RAE 0x04UL +#define HARRIER_OTOFX_MEM 0x02UL +#define HARRIER_OTOFX_IOM 0x01UL + +/* + * Define generic message passing register offsets + */ +/* Mirrored registers (visible from both PowerPC and PCI space) */ +#define HARRIER_XCSR_MP_BASE_OFF 0x290 /* base offset in XCSR space */ +#define HARRIER_PMEP_MP_BASE_OFF 0x100 /* base offset in PMEM space */ +#define HARRIER_MGOM0_OFF 0x00 /* outbound msg 0 */ +#define HARRIER_MGOM1_OFF 0x04 /* outbound msg 1 */ +#define HARRIER_MGOD_OFF 0x08 /* outbound doorbells */ + +#define HARRIER_MGIM0_OFF 0x10 /* inbound msg 0 */ +#define HARRIER_MGIM1_OFF 0x14 /* inbound msg 1 */ +#define HARRIER_MGID_OFF 0x18 /* inbound doorbells */ + +/* PowerPC-only registers */ +#define HARRIER_MGIDM_OFF 0x20 /* inbound doorbell mask */ + +/* PCI-only registers */ +#define HARRIER_PMEP_MGST_OFF 0x20 /* (outbound) interrupt status */ +#define HARRIER_PMEP_MGMS_OFF 0x24 /* (outbound) interrupt mask */ +#define HARRIER_MG_OMI0 (1<<4) +#define HARRIER_MG_OMI1 (1<<5) + +#define HARRIER_PMEP_MGODM_OFF 0x28 /* outbound doorbell mask */ + +/* + * Define PCI configuration space register offsets + */ +#define HARRIER_XCSR_TO_PCFS_OFF 0x300 + +/* + * Define message passing attribute register offset + */ +#define HARRIER_MPAT_OFF 0x44 + +/* + * Define inbound attribute register offsets. + */ +#define HARRIER_ITSZ0_OFF 0x48 +#define HARRIER_ITAT0_OFF 0x4c + +#define HARRIER_ITSZ1_OFF 0x50 +#define HARRIER_ITAT1_OFF 0x54 + +#define HARRIER_ITSZ2_OFF 0x58 +#define HARRIER_ITAT2_OFF 0x5c + +#define HARRIER_ITSZ3_OFF 0x60 +#define HARRIER_ITAT3_OFF 0x64 + +/* inbound translation size constants */ +#define HARRIER_ITSZ_MSK 0xff +#define HARRIER_ITSZ_4KB 0x00 +#define HARRIER_ITSZ_8KB 0x01 +#define HARRIER_ITSZ_16KB 0x02 +#define HARRIER_ITSZ_32KB 0x03 +#define HARRIER_ITSZ_64KB 0x04 +#define HARRIER_ITSZ_128KB 0x05 +#define HARRIER_ITSZ_256KB 0x06 +#define HARRIER_ITSZ_512KB 0x07 +#define HARRIER_ITSZ_1MB 0x08 +#define HARRIER_ITSZ_2MB 0x09 +#define HARRIER_ITSZ_4MB 0x0A +#define HARRIER_ITSZ_8MB 0x0B +#define HARRIER_ITSZ_16MB 0x0C +#define HARRIER_ITSZ_32MB 0x0D +#define HARRIER_ITSZ_64MB 0x0E +#define HARRIER_ITSZ_128MB 0x0F +#define HARRIER_ITSZ_256MB 0x10 +#define HARRIER_ITSZ_512MB 0x11 +#define HARRIER_ITSZ_1GB 0x12 +#define HARRIER_ITSZ_2GB 0x13 + +/* inbound translation offset */ +#define HARRIER_ITOF_SHIFT 0x10 +#define HARRIER_ITOF_MSK 0xffff + +/* inbound translation atttributes */ +#define HARRIER_ITAT_PRE (1<<3) +#define HARRIER_ITAT_RAE (1<<4) +#define HARRIER_ITAT_WPE (1<<5) +#define HARRIER_ITAT_MEM (1<<6) +#define HARRIER_ITAT_ENA (1<<7) +#define HARRIER_ITAT_GBL (1<<16) + +#define HARRIER_LBA_OFF 0x80 +#define HARRIER_LBA_MSK (1<<31) + +#define HARRIER_XCSR_SIZE 1024 + +/* macros to calculate message passing register offsets */ +#define HARRIER_MP_XCSR(x) ((u32)HARRIER_XCSR_MP_BASE_OFF + (u32)x) + +#define HARRIER_MP_PMEP(x) ((u32)HARRIER_PMEP_MP_BASE_OFF + (u32)x) + +/* + * Define PCI configuration space register offsets + */ +#define HARRIER_MPBAR_OFF PCI_BASE_ADDRESS_0 +#define HARRIER_ITBAR0_OFF PCI_BASE_ADDRESS_1 +#define HARRIER_ITBAR1_OFF PCI_BASE_ADDRESS_2 +#define HARRIER_ITBAR2_OFF PCI_BASE_ADDRESS_3 +#define HARRIER_ITBAR3_OFF PCI_BASE_ADDRESS_4 + +#define HARRIER_XCSR_CONFIG(x) ((u32)HARRIER_XCSR_TO_PCFS_OFF + (u32)x) + +#endif /* __ASMPPC_HARRIER_DEFS_H */ diff -Nru a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h --- a/include/linux/msdos_fs.h Tue May 4 21:53:36 2004 +++ b/include/linux/msdos_fs.h Tue May 4 21:53:36 2004 @@ -309,29 +309,6 @@ return fat__get_entry(dir, pos, bh, de, i_pos); } -/* msdos/namei.c - these are for Umsdos */ -extern struct dentry *msdos_lookup(struct inode *dir, struct dentry *, struct nameidata *); -extern int msdos_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *); -extern int msdos_rmdir(struct inode *dir, struct dentry *dentry); -extern int msdos_mkdir(struct inode *dir, struct dentry *dentry, int mode); -extern int msdos_unlink(struct inode *dir, struct dentry *dentry); -extern int msdos_rename(struct inode *old_dir, struct dentry *old_dentry, - struct inode *new_dir, struct dentry *new_dentry); -extern int msdos_fill_super(struct super_block *sb, void *data, int silent); - -/* vfat/namei.c - these are for dmsdos */ -extern struct dentry *vfat_lookup(struct inode *dir, struct dentry *, struct nameidata *); -extern int vfat_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *); -extern int vfat_rmdir(struct inode *dir, struct dentry *dentry); -extern int vfat_unlink(struct inode *dir, struct dentry *dentry); -extern int vfat_mkdir(struct inode *dir, struct dentry *dentry, int mode); -extern int vfat_rename(struct inode *old_dir, struct dentry *old_dentry, - struct inode *new_dir, struct dentry *new_dentry); -extern int vfat_fill_super(struct super_block *sb, void *data, int silent); - -/* vfat/vfatfs_syms.c */ -extern struct file_system_type vfat_fs_type; - #endif /* __KERNEL__ */ #endif diff -Nru a/include/linux/pci_ids.h b/include/linux/pci_ids.h --- a/include/linux/pci_ids.h Tue May 4 21:53:35 2004 +++ b/include/linux/pci_ids.h Tue May 4 21:53:35 2004 @@ -759,6 +759,7 @@ #define PCI_DEVICE_ID_MOTOROLA_FALCON 0x4802 #define PCI_DEVICE_ID_MOTOROLA_HAWK 0x4803 #define PCI_DEVICE_ID_MOTOROLA_CPX8216 0x4806 +#define PCI_DEVICE_ID_MOTOROLA_HARRIER 0x480b #define PCI_VENDOR_ID_PROMISE 0x105a #define PCI_DEVICE_ID_PROMISE_20265 0x0d30 diff -Nru a/include/linux/skbuff.h b/include/linux/skbuff.h --- a/include/linux/skbuff.h Tue May 4 21:53:36 2004 +++ b/include/linux/skbuff.h Tue May 4 21:53:36 2004 @@ -511,6 +511,7 @@ * * A buffer cannot be placed on two lists at the same time. */ +extern void skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk); static inline void __skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk) { @@ -525,28 +526,6 @@ next->prev = prev->next = newsk; } - -/** - * skb_queue_head - queue a buffer at the list head - * @list: list to use - * @newsk: buffer to queue - * - * Queue a buffer at the start of the list. This function takes the - * list lock and can be used safely with other locking &sk_buff functions - * safely. - * - * A buffer cannot be placed on two lists at the same time. - */ -static inline void skb_queue_head(struct sk_buff_head *list, - struct sk_buff *newsk) -{ - unsigned long flags; - - spin_lock_irqsave(&list->lock, flags); - __skb_queue_head(list, newsk); - spin_unlock_irqrestore(&list->lock, flags); -} - /** * __skb_queue_tail - queue a buffer at the list tail * @list: list to use @@ -557,6 +536,7 @@ * * A buffer cannot be placed on two lists at the same time. */ +extern void skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk); static inline void __skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk) { @@ -571,26 +551,6 @@ next->prev = prev->next = newsk; } -/** - * skb_queue_tail - queue a buffer at the list tail - * @list: list to use - * @newsk: buffer to queue - * - * Queue a buffer at the tail of the list. This function takes the - * list lock and can be used safely with other locking &sk_buff functions - * safely. - * - * A buffer cannot be placed on two lists at the same time. - */ -static inline void skb_queue_tail(struct sk_buff_head *list, - struct sk_buff *newsk) -{ - unsigned long flags; - - spin_lock_irqsave(&list->lock, flags); - __skb_queue_tail(list, newsk); - spin_unlock_irqrestore(&list->lock, flags); -} /** * __skb_dequeue - remove from the head of the queue @@ -600,6 +560,7 @@ * so must be used with appropriate locks held only. The head item is * returned or %NULL if the list is empty. */ +extern struct sk_buff *skb_dequeue(struct sk_buff_head *list); static inline struct sk_buff *__skb_dequeue(struct sk_buff_head *list) { struct sk_buff *next, *prev, *result; @@ -619,30 +580,11 @@ return result; } -/** - * skb_dequeue - remove from the head of the queue - * @list: list to dequeue from - * - * Remove the head of the list. The list lock is taken so the function - * may be used safely with other locking list functions. The head item is - * returned or %NULL if the list is empty. - */ - -static inline struct sk_buff *skb_dequeue(struct sk_buff_head *list) -{ - unsigned long flags; - struct sk_buff *result; - - spin_lock_irqsave(&list->lock, flags); - result = __skb_dequeue(list); - spin_unlock_irqrestore(&list->lock, flags); - return result; -} /* * Insert a packet on a list. */ - +extern void skb_insert(struct sk_buff *old, struct sk_buff *newsk); static inline void __skb_insert(struct sk_buff *newsk, struct sk_buff *prev, struct sk_buff *next, struct sk_buff_head *list) @@ -654,58 +596,20 @@ list->qlen++; } -/** - * skb_insert - insert a buffer - * @old: buffer to insert before - * @newsk: buffer to insert - * - * Place a packet before a given packet in a list. The list locks are taken - * and this function is atomic with respect to other list locked calls - * A buffer cannot be placed on two lists at the same time. - */ - -static inline void skb_insert(struct sk_buff *old, struct sk_buff *newsk) -{ - unsigned long flags; - - spin_lock_irqsave(&old->list->lock, flags); - __skb_insert(newsk, old->prev, old, old->list); - spin_unlock_irqrestore(&old->list->lock, flags); -} - /* * Place a packet after a given packet in a list. */ - +extern void skb_append(struct sk_buff *old, struct sk_buff *newsk); static inline void __skb_append(struct sk_buff *old, struct sk_buff *newsk) { __skb_insert(newsk, old, old->next, old->list); } -/** - * skb_append - append a buffer - * @old: buffer to insert after - * @newsk: buffer to insert - * - * Place a packet after a given packet in a list. The list locks are taken - * and this function is atomic with respect to other list locked calls. - * A buffer cannot be placed on two lists at the same time. - */ - - -static inline void skb_append(struct sk_buff *old, struct sk_buff *newsk) -{ - unsigned long flags; - - spin_lock_irqsave(&old->list->lock, flags); - __skb_append(old, newsk); - spin_unlock_irqrestore(&old->list->lock, flags); -} - /* * remove sk_buff from list. _Must_ be called atomically, and with * the list known.. */ +extern void skb_unlink(struct sk_buff *skb); static inline void __skb_unlink(struct sk_buff *skb, struct sk_buff_head *list) { struct sk_buff *next, *prev; @@ -719,31 +623,6 @@ prev->next = next; } -/** - * skb_unlink - remove a buffer from a list - * @skb: buffer to remove - * - * Place a packet after a given packet in a list. The list locks are taken - * and this function is atomic with respect to other list locked calls - * - * Works even without knowing the list it is sitting on, which can be - * handy at times. It also means that THE LIST MUST EXIST when you - * unlink. Thus a list must have its contents unlinked before it is - * destroyed. - */ -static inline void skb_unlink(struct sk_buff *skb) -{ - struct sk_buff_head *list = skb->list; - - if (list) { - unsigned long flags; - - spin_lock_irqsave(&list->lock, flags); - if (skb->list == list) - __skb_unlink(skb, skb->list); - spin_unlock_irqrestore(&list->lock, flags); - } -} /* XXX: more streamlined implementation */ @@ -755,6 +634,7 @@ * so must be used with appropriate locks held only. The tail item is * returned or %NULL if the list is empty. */ +extern struct sk_buff *skb_dequeue_tail(struct sk_buff_head *list); static inline struct sk_buff *__skb_dequeue_tail(struct sk_buff_head *list) { struct sk_buff *skb = skb_peek_tail(list); @@ -763,24 +643,6 @@ return skb; } -/** - * skb_dequeue_tail - remove from the tail of the queue - * @list: list to dequeue from - * - * Remove the tail of the list. The list lock is taken so the function - * may be used safely with other locking list functions. The tail item is - * returned or %NULL if the list is empty. - */ -static inline struct sk_buff *skb_dequeue_tail(struct sk_buff_head *list) -{ - unsigned long flags; - struct sk_buff *result; - - spin_lock_irqsave(&list->lock, flags); - result = __skb_dequeue_tail(list); - spin_unlock_irqrestore(&list->lock, flags); - return result; -} static inline int skb_is_nonlinear(const struct sk_buff *skb) { @@ -1012,21 +874,6 @@ } /** - * skb_queue_purge - empty a list - * @list: list to empty - * - * Delete all buffers on an &sk_buff list. Each buffer is removed from - * the list and one reference dropped. This function takes the list - * lock and is atomic with respect to other list locking functions. - */ -static inline void skb_queue_purge(struct sk_buff_head *list) -{ - struct sk_buff *skb; - while ((skb = skb_dequeue(list)) != NULL) - kfree_skb(skb); -} - -/** * __skb_queue_purge - empty a list * @list: list to empty * @@ -1034,6 +881,7 @@ * the list and one reference dropped. This function does not take the * list lock and the caller must hold the relevant locks to use it. */ +extern void skb_queue_purge(struct sk_buff_head *list); static inline void __skb_queue_purge(struct sk_buff_head *list) { struct sk_buff *skb; diff -Nru a/include/linux/string.h b/include/linux/string.h --- a/include/linux/string.h Tue May 4 21:53:35 2004 +++ b/include/linux/string.h Tue May 4 21:53:35 2004 @@ -5,6 +5,7 @@ #ifdef __KERNEL__ +#include /* for inline */ #include /* for size_t */ #include /* for NULL */ diff -Nru a/include/linux/workqueue.h b/include/linux/workqueue.h --- a/include/linux/workqueue.h Tue May 4 21:53:36 2004 +++ b/include/linux/workqueue.h Tue May 4 21:53:36 2004 @@ -7,6 +7,7 @@ #include #include +#include struct workqueue_struct; @@ -75,8 +76,12 @@ */ static inline int cancel_delayed_work(struct work_struct *work) { - return del_timer_sync(&work->timer); + int ret; + + ret = del_timer_sync(&work->timer); + if (ret) + clear_bit(0, &work->pending); + return ret; } #endif - diff -Nru a/include/net/sctp/constants.h b/include/net/sctp/constants.h --- a/include/net/sctp/constants.h Tue May 4 21:53:35 2004 +++ b/include/net/sctp/constants.h Tue May 4 21:53:35 2004 @@ -231,11 +231,6 @@ /* This is a table of printable names of sctp_state_t's. */ extern const char *sctp_state_tbl[], *sctp_evttype_tbl[], *sctp_status_tbl[]; -/* SCTP reachability state for each address */ -#define SCTP_ADDR_NOHB 4 -#define SCTP_ADDR_REACHABLE 2 -#define SCTP_ADDR_NOT_REACHABLE 1 - /* Maximum chunk length considering padding requirements. */ enum { SCTP_MAX_CHUNK_LEN = ((1<<16) - sizeof(__u32)) }; diff -Nru a/include/net/sctp/user.h b/include/net/sctp/user.h --- a/include/net/sctp/user.h Tue May 4 21:53:35 2004 +++ b/include/net/sctp/user.h Tue May 4 21:53:35 2004 @@ -1,7 +1,7 @@ /* SCTP kernel reference Implementation + * (C) Copyright IBM Corp. 2001, 2004 * Copyright (c) 1999-2000 Cisco, Inc. * Copyright (c) 1999-2001 Motorola, Inc. - * Copyright (c) 2001-2003 International Business Machines, Corp. * Copyright (c) 2002 Intel Corp. * * This file is part of the SCTP kernel reference Implementation @@ -246,7 +246,7 @@ * event that happened to the address. They include: */ enum sctp_spc_state { - SCTP_ADDR_REACHABLE, + SCTP_ADDR_AVAILABLE, SCTP_ADDR_UNREACHABLE, SCTP_ADDR_REMOVED, SCTP_ADDR_ADDED, diff -Nru a/include/net/tcp.h b/include/net/tcp.h --- a/include/net/tcp.h Tue May 4 21:53:35 2004 +++ b/include/net/tcp.h Tue May 4 21:53:35 2004 @@ -929,7 +929,6 @@ extern void tcp_send_active_reset(struct sock *sk, int priority); extern int tcp_send_synack(struct sock *); extern int tcp_transmit_skb(struct sock *, struct sk_buff *); -extern void tcp_send_skb(struct sock *, struct sk_buff *, int force_queue, unsigned mss_now); extern void tcp_push_one(struct sock *, unsigned mss_now); extern void tcp_send_ack(struct sock *sk); extern void tcp_send_delayed_ack(struct sock *sk); diff -Nru a/ipc/mqueue.c b/ipc/mqueue.c --- a/ipc/mqueue.c Tue May 4 21:53:36 2004 +++ b/ipc/mqueue.c Tue May 4 21:53:36 2004 @@ -215,9 +215,11 @@ clear_inode(inode); - spin_lock(&mq_lock); - queues_count--; - spin_unlock(&mq_lock); + if (info->messages) { + spin_lock(&mq_lock); + queues_count--; + spin_unlock(&mq_lock); + } } static int mqueue_create(struct inode *dir, struct dentry *dentry, @@ -811,9 +813,9 @@ wait.msg = (void *) msg_ptr; wait.state = STATE_NONE; ret = wq_sleep(info, SEND, timeout, &wait); - if (ret < 0) - free_msg(msg_ptr); } + if (ret < 0) + free_msg(msg_ptr); } else { receiver = wq_get_first_waiter(info, RECV); if (receiver) { diff -Nru a/kernel/configs.c b/kernel/configs.c --- a/kernel/configs.c Tue May 4 21:53:35 2004 +++ b/kernel/configs.c Tue May 4 21:53:35 2004 @@ -77,9 +77,6 @@ { struct proc_dir_entry *entry; - printk(KERN_INFO "ikconfig %s with /proc/config*\n", - IKCONFIG_VERSION); - /* create the current config file */ entry = create_proc_entry("config.gz", S_IFREG | S_IRUGO, &proc_root); diff -Nru a/kernel/fork.c b/kernel/fork.c --- a/kernel/fork.c Tue May 4 21:53:35 2004 +++ b/kernel/fork.c Tue May 4 21:53:35 2004 @@ -211,7 +211,7 @@ { #ifndef __HAVE_ARCH_TASK_STRUCT_ALLOCATOR #ifndef ARCH_MIN_TASKALIGN -#define ARCH_MIN_TASKALIGN 0 +#define ARCH_MIN_TASKALIGN L1_CACHE_BYTES #endif /* create a slab on which task_structs can be allocated */ task_struct_cachep = diff -Nru a/kernel/printk.c b/kernel/printk.c --- a/kernel/printk.c Tue May 4 21:53:36 2004 +++ b/kernel/printk.c Tue May 4 21:53:36 2004 @@ -240,6 +240,7 @@ * 7 -- Enable printk's to console * 8 -- Set level of messages printed to console * 9 -- Return number of unread characters in the log buffer + * 10 -- Return size of the log buffer */ int do_syslog(int type, char __user * buf, int len) { @@ -358,6 +359,9 @@ break; case 9: /* Number of chars in the log buffer */ error = log_end - log_start; + break; + case 10: /* Size of the log buffer */ + error = log_buf_len; break; default: error = -EINVAL; diff -Nru a/lib/Kconfig b/lib/Kconfig --- a/lib/Kconfig Tue May 4 21:53:36 2004 +++ b/lib/Kconfig Tue May 4 21:53:36 2004 @@ -12,6 +12,15 @@ kernel tree does. Such modules that use library CRC32 functions require M here. +config LIBCRC32C + tristate "CRC32c (Castagnoli, et al) Cyclic Redundancy-Check" + help + This option is provided for the case where no in-kernel-tree + modules require CRC32c functions, but a module built outside the + kernel tree does. Such modules that use library CRC32c functions + require M here. See Castagnoli93. + Module will be libcrc32c. + # # compression support is select'ed if needed # diff -Nru a/lib/Makefile b/lib/Makefile --- a/lib/Makefile Tue May 4 21:53:35 2004 +++ b/lib/Makefile Tue May 4 21:53:35 2004 @@ -19,6 +19,7 @@ endif obj-$(CONFIG_CRC32) += crc32.o +obj-$(CONFIG_LIBCRC32C) += libcrc32c.o obj-$(CONFIG_ZLIB_INFLATE) += zlib_inflate/ obj-$(CONFIG_ZLIB_DEFLATE) += zlib_deflate/ diff -Nru a/lib/crc32.c b/lib/crc32.c --- a/lib/crc32.c Tue May 4 21:53:35 2004 +++ b/lib/crc32.c Tue May 4 21:53:35 2004 @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -37,13 +38,6 @@ #endif #include "crc32table.h" -#if __GNUC__ >= 3 /* 2.x has "attribute", but only 3.0 has "pure */ -#define attribute(x) __attribute__(x) -#else -#define attribute(x) -#endif - - MODULE_AUTHOR("Matt Domsch "); MODULE_DESCRIPTION("Ethernet CRC32 calculations"); MODULE_LICENSE("GPL"); @@ -62,7 +56,7 @@ * @len - length of buffer @p * */ -u32 attribute((pure)) crc32_le(u32 crc, unsigned char const *p, size_t len) +u32 __attribute_pure__ crc32_le(u32 crc, unsigned char const *p, size_t len) { int i; while (len--) { @@ -82,7 +76,7 @@ * @len - length of buffer @p * */ -u32 attribute((pure)) crc32_le(u32 crc, unsigned char const *p, size_t len) +u32 __attribute_pure__ crc32_le(u32 crc, unsigned char const *p, size_t len) { # if CRC_LE_BITS == 8 const u32 *b =(u32 *)p; @@ -165,7 +159,7 @@ * @len - length of buffer @p * */ -u32 attribute((pure)) crc32_be(u32 crc, unsigned char const *p, size_t len) +u32 __attribute_pure__ crc32_be(u32 crc, unsigned char const *p, size_t len) { int i; while (len--) { @@ -187,7 +181,7 @@ * @len - length of buffer @p * */ -u32 attribute((pure)) crc32_be(u32 crc, unsigned char const *p, size_t len) +u32 __attribute_pure__ crc32_be(u32 crc, unsigned char const *p, size_t len) { # if CRC_BE_BITS == 8 const u32 *b =(u32 *)p; diff -Nru a/lib/libcrc32c.c b/lib/libcrc32c.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/lib/libcrc32c.c Tue May 4 21:53:36 2004 @@ -0,0 +1,200 @@ +/* + * CRC32C + *@Article{castagnoli-crc, + * author = { Guy Castagnoli and Stefan Braeuer and Martin Herrman}, + * title = {{Optimization of Cyclic Redundancy-Check Codes with 24 + * and 32 Parity Bits}}, + * journal = IEEE Transactions on Communication, + * year = {1993}, + * volume = {41}, + * number = {6}, + * pages = {}, + * month = {June}, + *} + * Used by the iSCSI driver, possibly others, and derived from the + * the iscsi-crc.c module of the linux-iscsi driver at + * http://linux-iscsi.sourceforge.net. + * + * Following the example of lib/crc32, this function is intended to be + * flexible and useful for all users. Modules that currently have their + * own crc32c, but hopefully may be able to use this one are: + * net/sctp (please add all your doco to here if you change to + * use this one!) + * + * + * Copyright (c) 2004 Cisco Systems, Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + */ +#include +#include +#include +#include + +MODULE_AUTHOR("Clay Haapala "); +MODULE_DESCRIPTION("CRC32c (Castagnoli) calculations"); +MODULE_LICENSE("GPL"); + +#define CRC32C_POLY_BE 0x1EDC6F41 +#define CRC32C_POLY_LE 0x82F63B78 + +#ifndef CRC_LE_BITS +# define CRC_LE_BITS 8 +#endif + + +/* + * Haven't generated a big-endian table yet, but the bit-wise version + * should at least work. + */ +#if defined CRC_BE_BITS && CRC_BE_BITS != 1 +#undef CRC_BE_BITS +#endif +#ifndef CRC_BE_BITS +# define CRC_BE_BITS 1 +#endif + +EXPORT_SYMBOL(crc32c_le); + +#if CRC_LE_BITS == 1 +/* + * Compute things bit-wise, as done in crc32.c. We could share the tight + * loop below with crc32 and vary the POLY if we don't find value in terms + * of space and maintainability in keeping the two modules separate. + */ +u32 __attribute_pure__ +crc32c_le(u32 crc, unsigned char const *p, size_t len) +{ + int i; + while (len--) { + crc ^= *p++; + for (i = 0; i < 8; i++) + crc = (crc >> 1) ^ ((crc & 1) ? CRC32C_POLY_LE : 0); + } + return crc; +} +#else + +/* + * This is the CRC-32C table + * Generated with: + * width = 32 bits + * poly = 0x1EDC6F41 + * reflect input bytes = true + * reflect output bytes = true + */ + +static u32 crc32c_table[256] = { + 0x00000000L, 0xF26B8303L, 0xE13B70F7L, 0x1350F3F4L, + 0xC79A971FL, 0x35F1141CL, 0x26A1E7E8L, 0xD4CA64EBL, + 0x8AD958CFL, 0x78B2DBCCL, 0x6BE22838L, 0x9989AB3BL, + 0x4D43CFD0L, 0xBF284CD3L, 0xAC78BF27L, 0x5E133C24L, + 0x105EC76FL, 0xE235446CL, 0xF165B798L, 0x030E349BL, + 0xD7C45070L, 0x25AFD373L, 0x36FF2087L, 0xC494A384L, + 0x9A879FA0L, 0x68EC1CA3L, 0x7BBCEF57L, 0x89D76C54L, + 0x5D1D08BFL, 0xAF768BBCL, 0xBC267848L, 0x4E4DFB4BL, + 0x20BD8EDEL, 0xD2D60DDDL, 0xC186FE29L, 0x33ED7D2AL, + 0xE72719C1L, 0x154C9AC2L, 0x061C6936L, 0xF477EA35L, + 0xAA64D611L, 0x580F5512L, 0x4B5FA6E6L, 0xB93425E5L, + 0x6DFE410EL, 0x9F95C20DL, 0x8CC531F9L, 0x7EAEB2FAL, + 0x30E349B1L, 0xC288CAB2L, 0xD1D83946L, 0x23B3BA45L, + 0xF779DEAEL, 0x05125DADL, 0x1642AE59L, 0xE4292D5AL, + 0xBA3A117EL, 0x4851927DL, 0x5B016189L, 0xA96AE28AL, + 0x7DA08661L, 0x8FCB0562L, 0x9C9BF696L, 0x6EF07595L, + 0x417B1DBCL, 0xB3109EBFL, 0xA0406D4BL, 0x522BEE48L, + 0x86E18AA3L, 0x748A09A0L, 0x67DAFA54L, 0x95B17957L, + 0xCBA24573L, 0x39C9C670L, 0x2A993584L, 0xD8F2B687L, + 0x0C38D26CL, 0xFE53516FL, 0xED03A29BL, 0x1F682198L, + 0x5125DAD3L, 0xA34E59D0L, 0xB01EAA24L, 0x42752927L, + 0x96BF4DCCL, 0x64D4CECFL, 0x77843D3BL, 0x85EFBE38L, + 0xDBFC821CL, 0x2997011FL, 0x3AC7F2EBL, 0xC8AC71E8L, + 0x1C661503L, 0xEE0D9600L, 0xFD5D65F4L, 0x0F36E6F7L, + 0x61C69362L, 0x93AD1061L, 0x80FDE395L, 0x72966096L, + 0xA65C047DL, 0x5437877EL, 0x4767748AL, 0xB50CF789L, + 0xEB1FCBADL, 0x197448AEL, 0x0A24BB5AL, 0xF84F3859L, + 0x2C855CB2L, 0xDEEEDFB1L, 0xCDBE2C45L, 0x3FD5AF46L, + 0x7198540DL, 0x83F3D70EL, 0x90A324FAL, 0x62C8A7F9L, + 0xB602C312L, 0x44694011L, 0x5739B3E5L, 0xA55230E6L, + 0xFB410CC2L, 0x092A8FC1L, 0x1A7A7C35L, 0xE811FF36L, + 0x3CDB9BDDL, 0xCEB018DEL, 0xDDE0EB2AL, 0x2F8B6829L, + 0x82F63B78L, 0x709DB87BL, 0x63CD4B8FL, 0x91A6C88CL, + 0x456CAC67L, 0xB7072F64L, 0xA457DC90L, 0x563C5F93L, + 0x082F63B7L, 0xFA44E0B4L, 0xE9141340L, 0x1B7F9043L, + 0xCFB5F4A8L, 0x3DDE77ABL, 0x2E8E845FL, 0xDCE5075CL, + 0x92A8FC17L, 0x60C37F14L, 0x73938CE0L, 0x81F80FE3L, + 0x55326B08L, 0xA759E80BL, 0xB4091BFFL, 0x466298FCL, + 0x1871A4D8L, 0xEA1A27DBL, 0xF94AD42FL, 0x0B21572CL, + 0xDFEB33C7L, 0x2D80B0C4L, 0x3ED04330L, 0xCCBBC033L, + 0xA24BB5A6L, 0x502036A5L, 0x4370C551L, 0xB11B4652L, + 0x65D122B9L, 0x97BAA1BAL, 0x84EA524EL, 0x7681D14DL, + 0x2892ED69L, 0xDAF96E6AL, 0xC9A99D9EL, 0x3BC21E9DL, + 0xEF087A76L, 0x1D63F975L, 0x0E330A81L, 0xFC588982L, + 0xB21572C9L, 0x407EF1CAL, 0x532E023EL, 0xA145813DL, + 0x758FE5D6L, 0x87E466D5L, 0x94B49521L, 0x66DF1622L, + 0x38CC2A06L, 0xCAA7A905L, 0xD9F75AF1L, 0x2B9CD9F2L, + 0xFF56BD19L, 0x0D3D3E1AL, 0x1E6DCDEEL, 0xEC064EEDL, + 0xC38D26C4L, 0x31E6A5C7L, 0x22B65633L, 0xD0DDD530L, + 0x0417B1DBL, 0xF67C32D8L, 0xE52CC12CL, 0x1747422FL, + 0x49547E0BL, 0xBB3FFD08L, 0xA86F0EFCL, 0x5A048DFFL, + 0x8ECEE914L, 0x7CA56A17L, 0x6FF599E3L, 0x9D9E1AE0L, + 0xD3D3E1ABL, 0x21B862A8L, 0x32E8915CL, 0xC083125FL, + 0x144976B4L, 0xE622F5B7L, 0xF5720643L, 0x07198540L, + 0x590AB964L, 0xAB613A67L, 0xB831C993L, 0x4A5A4A90L, + 0x9E902E7BL, 0x6CFBAD78L, 0x7FAB5E8CL, 0x8DC0DD8FL, + 0xE330A81AL, 0x115B2B19L, 0x020BD8EDL, 0xF0605BEEL, + 0x24AA3F05L, 0xD6C1BC06L, 0xC5914FF2L, 0x37FACCF1L, + 0x69E9F0D5L, 0x9B8273D6L, 0x88D28022L, 0x7AB90321L, + 0xAE7367CAL, 0x5C18E4C9L, 0x4F48173DL, 0xBD23943EL, + 0xF36E6F75L, 0x0105EC76L, 0x12551F82L, 0xE03E9C81L, + 0x34F4F86AL, 0xC69F7B69L, 0xD5CF889DL, 0x27A40B9EL, + 0x79B737BAL, 0x8BDCB4B9L, 0x988C474DL, 0x6AE7C44EL, + 0xBE2DA0A5L, 0x4C4623A6L, 0x5F16D052L, 0xAD7D5351L +}; + +/* + * Steps through buffer one byte at at time, calculates reflected + * crc using table. + */ + +u32 __attribute_pure__ +crc32c_le(u32 seed, unsigned char const *data, size_t length) +{ + u32 crc = __cpu_to_le32(seed); + + while (length--) + crc = + crc32c_table[(crc ^ *data++) & 0xFFL] ^ (crc >> 8); + + return __le32_to_cpu(crc); +} + +#endif /* CRC_LE_BITS == 8 */ + +EXPORT_SYMBOL(crc32c_be); + +#if CRC_BE_BITS == 1 +u32 __attribute_pure__ +crc32c_be(u32 crc, unsigned char const *p, size_t len) +{ + int i; + while (len--) { + crc ^= *p++ << 24; + for (i = 0; i < 8; i++) + crc = + (crc << 1) ^ ((crc & 0x80000000) ? CRC32C_POLY_BE : + 0); + } + return crc; +} +#endif + +/* + * Unit test + * + * A small unit test suite is implemented as part of the crypto suite. + * Select CRYPTO_CRC32C and use the tcrypt module to run the tests. + */ diff -Nru a/lib/rwsem-spinlock.c b/lib/rwsem-spinlock.c --- a/lib/rwsem-spinlock.c Tue May 4 21:53:35 2004 +++ b/lib/rwsem-spinlock.c Tue May 4 21:53:35 2004 @@ -45,12 +45,13 @@ * - the 'active count' _reached_ zero * - the 'waiting count' is non-zero * - the spinlock must be held by the caller - * - woken process blocks are discarded from the list after having flags zeroised + * - woken process blocks are discarded from the list after having task zeroed * - writers are only woken if wakewrite is non-zero */ static inline struct rw_semaphore *__rwsem_do_wake(struct rw_semaphore *sem, int wakewrite) { struct rwsem_waiter *waiter; + struct task_struct *tsk; int woken; rwsemtrace(sem,"Entering __rwsem_do_wake"); @@ -70,8 +71,11 @@ if (waiter->flags & RWSEM_WAITING_FOR_WRITE) { sem->activity = -1; list_del(&waiter->list); - waiter->flags = 0; - wake_up_process(waiter->task); + tsk = waiter->task; + mb(); + waiter->task = NULL; + wake_up_process(tsk); + put_task_struct(tsk); goto out; } @@ -82,8 +86,11 @@ struct list_head *next = waiter->list.next; list_del(&waiter->list); - waiter->flags = 0; - wake_up_process(waiter->task); + tsk = waiter->task; + mb(); + waiter->task = NULL; + wake_up_process(tsk); + put_task_struct(tsk); woken++; if (list_empty(&sem->wait_list)) break; @@ -103,14 +110,18 @@ static inline struct rw_semaphore *__rwsem_wake_one_writer(struct rw_semaphore *sem) { struct rwsem_waiter *waiter; + struct task_struct *tsk; sem->activity = -1; waiter = list_entry(sem->wait_list.next,struct rwsem_waiter,list); list_del(&waiter->list); - waiter->flags = 0; - wake_up_process(waiter->task); + tsk = waiter->task; + mb(); + waiter->task = NULL; + wake_up_process(tsk); + put_task_struct(tsk); return sem; } @@ -139,6 +150,7 @@ /* set up my own style of waitqueue */ waiter.task = tsk; waiter.flags = RWSEM_WAITING_FOR_READ; + get_task_struct(tsk); list_add_tail(&waiter.list,&sem->wait_list); @@ -147,7 +159,7 @@ /* wait to be given the lock */ for (;;) { - if (!waiter.flags) + if (!waiter.task) break; schedule(); set_task_state(tsk, TASK_UNINTERRUPTIBLE); @@ -207,6 +219,7 @@ /* set up my own style of waitqueue */ waiter.task = tsk; waiter.flags = RWSEM_WAITING_FOR_WRITE; + get_task_struct(tsk); list_add_tail(&waiter.list,&sem->wait_list); @@ -215,7 +228,7 @@ /* wait to be given the lock */ for (;;) { - if (!waiter.flags) + if (!waiter.task) break; schedule(); set_task_state(tsk, TASK_UNINTERRUPTIBLE); diff -Nru a/lib/rwsem.c b/lib/rwsem.c --- a/lib/rwsem.c Tue May 4 21:53:35 2004 +++ b/lib/rwsem.c Tue May 4 21:53:35 2004 @@ -34,15 +34,15 @@ * - the 'waiting part' of the count (&0xffff0000) is negative (and will still be so) * - there must be someone on the queue * - the spinlock must be held by the caller - * - woken process blocks are discarded from the list after having flags zeroised + * - woken process blocks are discarded from the list after having task zeroed * - writers are only woken if wakewrite is non-zero */ static inline struct rw_semaphore *__rwsem_do_wake(struct rw_semaphore *sem, int wakewrite) { struct rwsem_waiter *waiter; + struct task_struct *tsk; struct list_head *next; - signed long oldcount; - int woken, loop; + signed long oldcount, woken, loop; rwsemtrace(sem,"Entering __rwsem_do_wake"); @@ -65,8 +65,11 @@ goto readers_only; list_del(&waiter->list); - waiter->flags = 0; - wake_up_process(waiter->task); + tsk = waiter->task; + mb(); + waiter->task = NULL; + wake_up_process(tsk); + put_task_struct(tsk); goto out; /* don't want to wake any writers */ @@ -100,8 +103,11 @@ for (; loop>0; loop--) { waiter = list_entry(next,struct rwsem_waiter,list); next = waiter->list.next; - waiter->flags = 0; - wake_up_process(waiter->task); + tsk = waiter->task; + mb(); + waiter->task = NULL; + wake_up_process(tsk); + put_task_struct(tsk); } sem->wait_list.next = next; @@ -133,6 +139,7 @@ /* set up my own style of waitqueue */ spin_lock(&sem->wait_lock); waiter->task = tsk; + get_task_struct(tsk); list_add_tail(&waiter->list,&sem->wait_list); @@ -149,7 +156,7 @@ /* wait to be given the lock */ for (;;) { - if (!waiter->flags) + if (!waiter->task) break; schedule(); set_task_state(tsk, TASK_UNINTERRUPTIBLE); diff -Nru a/mm/fadvise.c b/mm/fadvise.c --- a/mm/fadvise.c Tue May 4 21:53:35 2004 +++ b/mm/fadvise.c Tue May 4 21:53:35 2004 @@ -25,8 +25,10 @@ struct file *file = fget(fd); struct address_space *mapping; struct backing_dev_info *bdi; + loff_t endbyte; pgoff_t start_index; pgoff_t end_index; + unsigned long nrpages; int ret = 0; if (!file) @@ -38,6 +40,11 @@ goto out; } + /* Careful about overflows. Len == 0 means "as much as possible" */ + endbyte = offset + len; + if (!len || endbyte < len) + endbyte = -1; + bdi = mapping->backing_dev_info; switch (advice) { @@ -56,18 +63,32 @@ ret = -EINVAL; break; } + + /* First and last PARTIAL page! */ + start_index = offset >> PAGE_CACHE_SHIFT; + end_index = (endbyte-1) >> PAGE_CACHE_SHIFT; + + /* Careful about overflow on the "+1" */ + nrpages = end_index - start_index + 1; + if (!nrpages) + nrpages = ~0UL; + ret = force_page_cache_readahead(mapping, file, - offset >> PAGE_CACHE_SHIFT, - max_sane_readahead(len >> PAGE_CACHE_SHIFT)); + start_index, + max_sane_readahead(nrpages)); if (ret > 0) ret = 0; break; case POSIX_FADV_DONTNEED: if (!bdi_write_congested(mapping->backing_dev_info)) filemap_flush(mapping); - start_index = (offset + PAGE_CACHE_SIZE-1) >> PAGE_CACHE_SHIFT; - end_index = ((offset + len) >> PAGE_CACHE_SHIFT) - 1; - invalidate_mapping_pages(mapping, start_index, end_index); + + /* First and last FULL page! */ + start_index = (offset + (PAGE_CACHE_SIZE-1)) >> PAGE_CACHE_SHIFT; + end_index = (endbyte >> PAGE_CACHE_SHIFT); + + if (end_index > start_index) + invalidate_mapping_pages(mapping, start_index, end_index-1); break; default: ret = -EINVAL; diff -Nru a/mm/filemap.c b/mm/filemap.c --- a/mm/filemap.c Tue May 4 21:53:35 2004 +++ b/mm/filemap.c Tue May 4 21:53:35 2004 @@ -240,12 +240,6 @@ } /* - * This adds a page to the page cache, starting out as locked, unreferenced, - * not uptodate and with no errors. - * - * This function is used for two things: adding newly allocated pagecache - * pages and for moving existing anon pages into swapcache. - * * This function is used to add newly allocated pagecache pages: * the page is new, so we can just run SetPageLocked() against it. * The other page state flags were set by rmqueue(). diff -Nru a/mm/mremap.c b/mm/mremap.c --- a/mm/mremap.c Tue May 4 21:53:36 2004 +++ b/mm/mremap.c Tue May 4 21:53:36 2004 @@ -137,7 +137,8 @@ error = -ENOMEM; pte_unmap_nested(src); } - pte_unmap(dst); + if (dst) + pte_unmap(dst); } spin_unlock(&mm->page_table_lock); pte_chain_free(pte_chain); @@ -145,7 +146,7 @@ return error; } -static int move_page_tables(struct vm_area_struct *vma, +static unsigned long move_page_tables(struct vm_area_struct *vma, unsigned long new_addr, unsigned long old_addr, unsigned long len) { unsigned long offset; diff -Nru a/mm/swapfile.c b/mm/swapfile.c --- a/mm/swapfile.c Tue May 4 21:53:35 2004 +++ b/mm/swapfile.c Tue May 4 21:53:35 2004 @@ -45,6 +45,8 @@ struct swap_info_struct swap_info[MAX_SWAPFILES]; +static DECLARE_MUTEX(swapon_sem); + /* * Array of backing blockdevs, for swap_unplug_fn. We need this because the * bdev->unplug_fn can sleep and we cannot hold swap_list_lock while calling @@ -1158,6 +1160,7 @@ swap_list_unlock(); goto out_dput; } + down(&swapon_sem); down(&swap_bdevs_sem); swap_list_lock(); swap_device_lock(p); @@ -1172,6 +1175,7 @@ swap_list_unlock(); remove_swap_bdev(p->bdev); up(&swap_bdevs_sem); + up(&swapon_sem); vfree(swap_map); if (S_ISBLK(mapping->host->i_mode)) { struct block_device *bdev = I_BDEV(mapping->host); @@ -1197,7 +1201,7 @@ int i; loff_t l = *pos; - swap_list_lock(); + down(&swapon_sem); for (i = 0; i < nr_swapfiles; i++, ptr++) { if (!(ptr->flags & SWP_USED) || !ptr->swap_map) @@ -1212,9 +1216,9 @@ static void *swap_next(struct seq_file *swap, void *v, loff_t *pos) { struct swap_info_struct *ptr = v; - void *endptr = (void *) swap_info + nr_swapfiles * sizeof(struct swap_info_struct); + struct swap_info_struct *endptr = swap_info + nr_swapfiles; - for (++ptr; ptr < (struct swap_info_struct *) endptr; ptr++) { + for (++ptr; ptr < endptr; ptr++) { if (!(ptr->flags & SWP_USED) || !ptr->swap_map) continue; ++*pos; @@ -1226,7 +1230,7 @@ static void swap_stop(struct seq_file *swap, void *v) { - swap_list_unlock(); + up(&swapon_sem); } static int swap_show(struct seq_file *swap, void *v) @@ -1513,6 +1517,7 @@ if (error) goto bad_swap; + down(&swapon_sem); down(&swap_bdevs_sem); swap_list_lock(); swap_device_lock(p); @@ -1541,6 +1546,7 @@ swap_list_unlock(); install_swap_bdev(p->bdev); up(&swap_bdevs_sem); + up(&swapon_sem); error = 0; goto out; bad_swap: diff -Nru a/net/core/neighbour.c b/net/core/neighbour.c --- a/net/core/neighbour.c Tue May 4 21:53:35 2004 +++ b/net/core/neighbour.c Tue May 4 21:53:35 2004 @@ -1479,7 +1479,7 @@ #ifdef CONFIG_SYSCTL -struct neigh_sysctl_table { +static struct neigh_sysctl_table { struct ctl_table_header *sysctl_header; ctl_table neigh_vars[17]; ctl_table neigh_dev[2]; diff -Nru a/net/core/rtnetlink.c b/net/core/rtnetlink.c --- a/net/core/rtnetlink.c Tue May 4 21:53:36 2004 +++ b/net/core/rtnetlink.c Tue May 4 21:53:36 2004 @@ -280,7 +280,7 @@ return err; } -int rtnetlink_dump_all(struct sk_buff *skb, struct netlink_callback *cb) +static int rtnetlink_dump_all(struct sk_buff *skb, struct netlink_callback *cb) { int idx; int s_idx = cb->family; @@ -553,7 +553,7 @@ return NOTIFY_DONE; } -struct notifier_block rtnetlink_dev_notifier = { +static struct notifier_block rtnetlink_dev_notifier = { .notifier_call = rtnetlink_event, }; diff -Nru a/net/core/skbuff.c b/net/core/skbuff.c --- a/net/core/skbuff.c Tue May 4 21:53:36 2004 +++ b/net/core/skbuff.c Tue May 4 21:53:36 2004 @@ -1091,6 +1091,165 @@ } } +/** + * skb_dequeue - remove from the head of the queue + * @list: list to dequeue from + * + * Remove the head of the list. The list lock is taken so the function + * may be used safely with other locking list functions. The head item is + * returned or %NULL if the list is empty. + */ + +struct sk_buff *skb_dequeue(struct sk_buff_head *list) +{ + unsigned long flags; + struct sk_buff *result; + + spin_lock_irqsave(&list->lock, flags); + result = __skb_dequeue(list); + spin_unlock_irqrestore(&list->lock, flags); + return result; +} + +/** + * skb_dequeue_tail - remove from the tail of the queue + * @list: list to dequeue from + * + * Remove the tail of the list. The list lock is taken so the function + * may be used safely with other locking list functions. The tail item is + * returned or %NULL if the list is empty. + */ +struct sk_buff *skb_dequeue_tail(struct sk_buff_head *list) +{ + unsigned long flags; + struct sk_buff *result; + + spin_lock_irqsave(&list->lock, flags); + result = __skb_dequeue_tail(list); + spin_unlock_irqrestore(&list->lock, flags); + return result; +} + +/** + * skb_queue_purge - empty a list + * @list: list to empty + * + * Delete all buffers on an &sk_buff list. Each buffer is removed from + * the list and one reference dropped. This function takes the list + * lock and is atomic with respect to other list locking functions. + */ +void skb_queue_purge(struct sk_buff_head *list) +{ + struct sk_buff *skb; + while ((skb = skb_dequeue(list)) != NULL) + kfree_skb(skb); +} + +/** + * skb_queue_head - queue a buffer at the list head + * @list: list to use + * @newsk: buffer to queue + * + * Queue a buffer at the start of the list. This function takes the + * list lock and can be used safely with other locking &sk_buff functions + * safely. + * + * A buffer cannot be placed on two lists at the same time. + */ +void skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk) +{ + unsigned long flags; + + spin_lock_irqsave(&list->lock, flags); + __skb_queue_head(list, newsk); + spin_unlock_irqrestore(&list->lock, flags); +} + +/** + * skb_queue_tail - queue a buffer at the list tail + * @list: list to use + * @newsk: buffer to queue + * + * Queue a buffer at the tail of the list. This function takes the + * list lock and can be used safely with other locking &sk_buff functions + * safely. + * + * A buffer cannot be placed on two lists at the same time. + */ +void skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk) +{ + unsigned long flags; + + spin_lock_irqsave(&list->lock, flags); + __skb_queue_tail(list, newsk); + spin_unlock_irqrestore(&list->lock, flags); +} +/** + * skb_unlink - remove a buffer from a list + * @skb: buffer to remove + * + * Place a packet after a given packet in a list. The list locks are taken + * and this function is atomic with respect to other list locked calls + * + * Works even without knowing the list it is sitting on, which can be + * handy at times. It also means that THE LIST MUST EXIST when you + * unlink. Thus a list must have its contents unlinked before it is + * destroyed. + */ +void skb_unlink(struct sk_buff *skb) +{ + struct sk_buff_head *list = skb->list; + + if (list) { + unsigned long flags; + + spin_lock_irqsave(&list->lock, flags); + if (skb->list == list) + __skb_unlink(skb, skb->list); + spin_unlock_irqrestore(&list->lock, flags); + } +} + + +/** + * skb_append - append a buffer + * @old: buffer to insert after + * @newsk: buffer to insert + * + * Place a packet after a given packet in a list. The list locks are taken + * and this function is atomic with respect to other list locked calls. + * A buffer cannot be placed on two lists at the same time. + */ + +void skb_append(struct sk_buff *old, struct sk_buff *newsk) +{ + unsigned long flags; + + spin_lock_irqsave(&old->list->lock, flags); + __skb_append(old, newsk); + spin_unlock_irqrestore(&old->list->lock, flags); +} + + +/** + * skb_insert - insert a buffer + * @old: buffer to insert before + * @newsk: buffer to insert + * + * Place a packet before a given packet in a list. The list locks are taken + * and this function is atomic with respect to other list locked calls + * A buffer cannot be placed on two lists at the same time. + */ + +void skb_insert(struct sk_buff *old, struct sk_buff *newsk) +{ + unsigned long flags; + + spin_lock_irqsave(&old->list->lock, flags); + __skb_insert(newsk, old->prev, old, old->list); + spin_unlock_irqrestore(&old->list->lock, flags); +} + #if 0 /* * Tune the memory allocator for a new MTU size. @@ -1133,3 +1292,11 @@ EXPORT_SYMBOL(skb_pad); EXPORT_SYMBOL(skb_realloc_headroom); EXPORT_SYMBOL(skb_under_panic); +EXPORT_SYMBOL(skb_dequeue); +EXPORT_SYMBOL(skb_dequeue_tail); +EXPORT_SYMBOL(skb_insert); +EXPORT_SYMBOL(skb_queue_purge); +EXPORT_SYMBOL(skb_queue_head); +EXPORT_SYMBOL(skb_queue_tail); +EXPORT_SYMBOL(skb_unlink); +EXPORT_SYMBOL(skb_append); diff -Nru a/net/ipv4/devinet.c b/net/ipv4/devinet.c --- a/net/ipv4/devinet.c Tue May 4 21:53:35 2004 +++ b/net/ipv4/devinet.c Tue May 4 21:53:35 2004 @@ -998,7 +998,7 @@ return NOTIFY_DONE; } -struct notifier_block ip_netdev_notifier = { +static struct notifier_block ip_netdev_notifier = { .notifier_call =inetdev_event, }; diff -Nru a/net/ipv4/route.c b/net/ipv4/route.c --- a/net/ipv4/route.c Tue May 4 21:53:36 2004 +++ b/net/ipv4/route.c Tue May 4 21:53:36 2004 @@ -144,7 +144,7 @@ static int rt_garbage_collect(void); -struct dst_ops ipv4_dst_ops = { +static struct dst_ops ipv4_dst_ops = { .family = AF_INET, .protocol = __constant_htons(ETH_P_IP), .gc = rt_garbage_collect, @@ -1525,7 +1525,7 @@ * 2. IP spoofing attempts are filtered with 100% of guarantee. */ -int ip_route_input_slow(struct sk_buff *skb, u32 daddr, u32 saddr, +static int ip_route_input_slow(struct sk_buff *skb, u32 daddr, u32 saddr, u8 tos, struct net_device *dev) { struct fib_result res; @@ -1910,7 +1910,7 @@ * Major route resolver routine. */ -int ip_route_output_slow(struct rtable **rp, const struct flowi *oldflp) +static int ip_route_output_slow(struct rtable **rp, const struct flowi *oldflp) { u32 tos = oldflp->fl4_tos & (IPTOS_RT_MASK | RTO_ONLINK); struct flowi fl = { .nl_u = { .ip4_u = diff -Nru a/net/ipv4/tcp.c b/net/ipv4/tcp.c --- a/net/ipv4/tcp.c Tue May 4 21:53:35 2004 +++ b/net/ipv4/tcp.c Tue May 4 21:53:35 2004 @@ -753,9 +753,6 @@ goto out; } -ssize_t do_tcp_sendpages(struct sock *sk, struct page **pages, int poffset, - size_t psize, int flags); - static inline int can_coalesce(struct sk_buff *skb, int i, struct page *page, int off) { @@ -836,7 +833,7 @@ return err; } -ssize_t do_tcp_sendpages(struct sock *sk, struct page **pages, int poffset, +static ssize_t do_tcp_sendpages(struct sock *sk, struct page **pages, int poffset, size_t psize, int flags) { struct tcp_opt *tp = tcp_sk(sk); diff -Nru a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c --- a/net/ipv4/tcp_input.c Tue May 4 21:53:36 2004 +++ b/net/ipv4/tcp_input.c Tue May 4 21:53:36 2004 @@ -1059,7 +1059,7 @@ * which indicates that we should follow the traditional RTO recovery, * i.e. mark everything lost and do go-back-N retransmission. */ -void tcp_enter_frto_loss(struct sock *sk) +static void tcp_enter_frto_loss(struct sock *sk) { struct tcp_opt *tp = tcp_sk(sk); struct sk_buff *skb; diff -Nru a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c --- a/net/ipv4/tcp_ipv4.c Tue May 4 21:53:35 2004 +++ b/net/ipv4/tcp_ipv4.c Tue May 4 21:53:35 2004 @@ -2137,46 +2137,6 @@ hlist_entry(tw->tw_node.next, typeof(*tw), tw_node) : NULL; } -static void *listening_get_first(struct seq_file *seq) -{ - struct tcp_iter_state* st = seq->private; - void *rc = NULL; - - for (st->bucket = 0; st->bucket < TCP_LHTABLE_SIZE; ++st->bucket) { - struct open_request *req; - struct tcp_opt *tp; - struct sock *sk = sk_head(&tcp_listening_hash[st->bucket]); - - if (!sk) - continue; - if (sk->sk_family == st->family) { - rc = sk; - goto out; - } - tp = tcp_sk(sk); - read_lock_bh(&tp->syn_wait_lock); - if (tp->listen_opt && tp->listen_opt->qlen) { - st->uid = sock_i_uid(sk); - st->syn_wait_sk = sk; - st->state = TCP_SEQ_STATE_OPENREQ; - for (st->sbucket = 0; st->sbucket < TCP_SYNQ_HSIZE; - ++st->sbucket) { - for (req = tp->listen_opt->syn_table[st->sbucket]; - req; req = req->dl_next) { - if (req->class->family != st->family) - continue; - rc = req; - goto out; - } - } - st->state = TCP_SEQ_STATE_LISTENING; - } - read_unlock_bh(&tp->syn_wait_lock); - } -out: - return rc; -} - static void *listening_get_next(struct seq_file *seq, void *cur) { struct tcp_opt *tp; @@ -2184,6 +2144,12 @@ struct sock *sk = cur; struct tcp_iter_state* st = seq->private; + if (!sk) { + st->bucket = 0; + sk = sk_head(&tcp_listening_hash[0]); + goto get_sk; + } + ++st->num; if (st->state == TCP_SEQ_STATE_OPENREQ) { @@ -2237,7 +2203,7 @@ static void *listening_get_idx(struct seq_file *seq, loff_t *pos) { - void *rc = listening_get_first(seq); + void *rc = listening_get_next(seq, NULL); while (rc && *pos) { rc = listening_get_next(seq, rc); diff -Nru a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c --- a/net/ipv4/tcp_output.c Tue May 4 21:53:36 2004 +++ b/net/ipv4/tcp_output.c Tue May 4 21:53:36 2004 @@ -314,13 +314,12 @@ } -/* This is the main buffer sending routine. We queue the buffer - * and decide whether to queue or transmit now. +/* This routine just queue's the buffer * * NOTE: probe0 timer is not checked, do not forget tcp_push_pending_frames, * otherwise socket can stall. */ -void tcp_send_skb(struct sock *sk, struct sk_buff *skb, int force_queue, unsigned cur_mss) +static void tcp_queue_skb(struct sock *sk, struct sk_buff *skb) { struct tcp_opt *tp = tcp_sk(sk); @@ -329,17 +328,6 @@ __skb_queue_tail(&sk->sk_write_queue, skb); tcp_charge_skb(sk, skb); - if (!force_queue && tp->send_head == NULL && tcp_snd_test(tp, skb, cur_mss, tp->nonagle)) { - /* Send it out now. */ - TCP_SKB_CB(skb)->when = tcp_time_stamp; - if (!tcp_transmit_skb(sk, skb_clone(skb, sk->sk_allocation))) { - tp->snd_nxt = TCP_SKB_CB(skb)->end_seq; - tcp_minshall_update(tp, cur_mss, skb); - if (tp->packets_out++ == 0) - tcp_reset_xmit_timer(sk, TCP_TIME_RETRANS, tp->rto); - return; - } - } /* Queue it, remembering where we must start sending. */ if (tp->send_head == NULL) tp->send_head = skb; @@ -1120,10 +1108,10 @@ TCP_SKB_CB(skb)->flags = (TCPCB_FLAG_ACK | TCPCB_FLAG_FIN); TCP_SKB_CB(skb)->sacked = 0; - /* FIN eats a sequence byte, write_seq advanced by tcp_send_skb(). */ + /* FIN eats a sequence byte, write_seq advanced by tcp_queue_skb(). */ TCP_SKB_CB(skb)->seq = tp->write_seq; TCP_SKB_CB(skb)->end_seq = TCP_SKB_CB(skb)->seq + 1; - tcp_send_skb(sk, skb, 1, mss_now); + tcp_queue_skb(sk, skb); } __tcp_push_pending_frames(sk, tp, mss_now, TCP_NAGLE_OFF); } diff -Nru a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c --- a/net/ipv6/af_inet6.c Tue May 4 21:53:36 2004 +++ b/net/ipv6/af_inet6.c Tue May 4 21:53:36 2004 @@ -539,7 +539,7 @@ .sendpage = sock_no_sendpage, }; -struct net_proto_family inet6_family_ops = { +static struct net_proto_family inet6_family_ops = { .family = PF_INET6, .create = inet6_create, .owner = THIS_MODULE, diff -Nru a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c --- a/net/ipv6/ndisc.c Tue May 4 21:53:36 2004 +++ b/net/ipv6/ndisc.c Tue May 4 21:53:36 2004 @@ -1418,7 +1418,7 @@ return NOTIFY_DONE; } -struct notifier_block ndisc_netdev_notifier = { +static struct notifier_block ndisc_netdev_notifier = { .notifier_call = ndisc_netdev_event, }; diff -Nru a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c --- a/net/netlink/af_netlink.c Tue May 4 21:53:36 2004 +++ b/net/netlink/af_netlink.c Tue May 4 21:53:36 2004 @@ -809,7 +809,7 @@ return err ? : copied; } -void netlink_data_ready(struct sock *sk, int len) +static void netlink_data_ready(struct sock *sk, int len) { struct netlink_opt *nlk = nlk_sk(sk); @@ -1126,7 +1126,7 @@ return 0; } -struct seq_operations netlink_seq_ops = { +static struct seq_operations netlink_seq_ops = { .start = netlink_seq_start, .next = netlink_seq_next, .stop = netlink_seq_stop, @@ -1159,7 +1159,7 @@ return notifier_chain_unregister(&netlink_chain, nb); } -struct proto_ops netlink_ops = { +static struct proto_ops netlink_ops = { .family = PF_NETLINK, .owner = THIS_MODULE, .release = netlink_release, @@ -1180,7 +1180,7 @@ .sendpage = sock_no_sendpage, }; -struct net_proto_family netlink_family_ops = { +static struct net_proto_family netlink_family_ops = { .family = PF_NETLINK, .create = netlink_create, .owner = THIS_MODULE, /* for consistency 8) */ diff -Nru a/net/sctp/associola.c b/net/sctp/associola.c --- a/net/sctp/associola.c Tue May 4 21:53:35 2004 +++ b/net/sctp/associola.c Tue May 4 21:53:35 2004 @@ -608,7 +608,7 @@ switch (command) { case SCTP_TRANSPORT_UP: transport->active = SCTP_ACTIVE; - spc_state = SCTP_ADDR_REACHABLE; + spc_state = SCTP_ADDR_AVAILABLE; break; case SCTP_TRANSPORT_DOWN: @@ -936,6 +936,9 @@ void sctp_assoc_update(struct sctp_association *asoc, struct sctp_association *new) { + struct sctp_transport *trans; + struct list_head *pos, *temp; + /* Copy in new parameters of peer. */ asoc->c = new->c; asoc->peer.rwnd = new->peer.rwnd; @@ -944,20 +947,19 @@ sctp_tsnmap_init(&asoc->peer.tsn_map, SCTP_TSN_MAP_SIZE, asoc->peer.i.initial_tsn); - /* FIXME: - * Do we need to copy primary_path etc? - * - * More explicitly, addresses may have been removed and - * this needs accounting for. - */ + /* Remove any peer addresses not present in the new association. */ + list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) { + trans = list_entry(pos, struct sctp_transport, transports); + if (!sctp_assoc_lookup_paddr(new, &trans->ipaddr)) + sctp_assoc_del_peer(asoc, &trans->ipaddr); + } /* If the case is A (association restart), use * initial_tsn as next_tsn. If the case is B, use * current next_tsn in case data sent to peer * has been discarded and needs retransmission. */ - if (sctp_state(asoc, ESTABLISHED)) { - + if (asoc->state >= SCTP_STATE_ESTABLISHED) { asoc->next_tsn = new->next_tsn; asoc->ctsn_ack_point = new->ctsn_ack_point; asoc->adv_peer_ack_point = new->adv_peer_ack_point; @@ -968,6 +970,15 @@ sctp_ssnmap_clear(asoc->ssnmap); } else { + /* Add any peer addresses from the new association. */ + list_for_each(pos, &new->peer.transport_addr_list) { + trans = list_entry(pos, struct sctp_transport, + transports); + if (!sctp_assoc_lookup_paddr(asoc, &trans->ipaddr)) + sctp_assoc_add_peer(asoc, &trans->ipaddr, + GFP_ATOMIC); + } + asoc->ctsn_ack_point = asoc->next_tsn - 1; asoc->adv_peer_ack_point = asoc->ctsn_ack_point; if (!asoc->ssnmap) { @@ -976,7 +987,6 @@ new->ssnmap = NULL; } } - } /* Update the retran path for sending a retransmitted packet. diff -Nru a/net/sctp/crc32c.c b/net/sctp/crc32c.c --- a/net/sctp/crc32c.c Tue May 4 21:53:36 2004 +++ b/net/sctp/crc32c.c Tue May 4 21:53:36 2004 @@ -69,7 +69,7 @@ /* with 24 and 32 Parity Bits", */ /* IEEE Transactions on Communications, Vol.41, No.6, June 1993 */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -__u32 crc_c[256] = { +static const __u32 crc_c[256] = { 0x00000000, 0xF26B8303, 0xE13B70F7, 0x1350F3F4, 0xC79A971F, 0x35F1141C, 0x26A1E7E8, 0xD4CA64EB, 0x8AD958CF, 0x78B2DBCC, 0x6BE22838, 0x9989AB3B,