master.kernel.org:/home/torvalds/BK/linux-2.6 trond.myklebust@fys.uio.no[torvalds]|ChangeSet|20050223042200|45821 trond.myklebust # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2005/02/22 20:22:00-08:00 trond.myklebust@fys.uio.no # [PATCH] NFS: Further fixes for the -onolock case. # # Duh... GETLK returns F_UNLCK if and only if the lock could be placed. # # Signed-off-by: Trond Myklebust # Signed-off-by: Linus Torvalds # # fs/nfs/file.c # 2005/02/22 16:00:00-08:00 trond.myklebust@fys.uio.no +3 -3 # NFS: Further fixes for the -onolock case. # # ChangeSet # 2005/02/22 20:21:46-08:00 benh@kernel.crashing.org # [PATCH] ppc32: kernel mapping breakage # # Christoph Lameter's patch that change page allocators to use GFP_ZERO # broke ppc32 in a subtle way. Our allocator is designed to work before # mem_init_done, in which cases it uses a ppc specific early_get_page() # which doesn't return zeroed pages. However, he removed the call to # clear_page() unconditionally, thus causing the kernel initial page # tables to have random data in them. # # They are initialized with set_pte, which means it's _mostly_ harmless, # except that set_pte on ppc32 preserves the _PAGE_HASHPTE bit, thus we # end up with random bits there, which can cause issues with further # manipulation of the kernel page tables and will slow down all hash # faults to them causing unnecessary searches. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc/mm/pgtable.c # 2005/02/22 19:31:41-08:00 benh@kernel.crashing.org +4 -1 # ppc32: kernel mapping breakage # # ChangeSet # 2005/02/22 16:32:48-08:00 trini@kernel.crashing.org # [PATCH] Fix NR_OPEN header order dependency # # Move back up in , to get the right ordering # for the NR_OPEN dual define (ugh). # # Signed-off-by: Tom Rini # Signed-off-by: Linus Torvalds # # include/linux/fs.h # 2005/02/22 16:17:36-08:00 trini@kernel.crashing.org +1 -1 # Fix NR_OPEN header order dependency # # ChangeSet # 2005/02/22 14:12:49-08:00 trini@kernel.crashing.org # [PATCH] Re-order includes to fix userland breakage # # The following moves all includes (except # and down to below the existing __KERNEL__ test. None # of these includes are needed by the user-visible portions of the header, # and in some cases can cause userland apps to break. # # For example, LTP and sash with an empty will fail # thusly: # # cc -Wall -I../../include -g -Wall -I../../../../include -Wall setrlimit02.c -L../../../../lib -lltp -o setrlimit02 # In file included from /usr/include/asm/atomic.h:6, # from /usr/include/linux/fs.h:20, # from setrlimit02.c:46: # /usr/include/asm/processor.h:68: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function) # /usr/include/asm/processor.h:68: error: requested alignment is not a constant # # Build/run tested with a glibc rebuild as well. # # Signed-off-by: Tom Rini # Signed-off-by: Linus Torvalds # # include/linux/fs.h # 2005/02/22 13:44:27-08:00 trini@kernel.crashing.org +19 -18 # Re-order includes to fix userland breakage # # ChangeSet # 2005/02/22 10:48:28-08:00 acme@conectiva.com.br # [TCP]: Fix excessive stack usage resulting in OOPS with 4KSTACKS. # # Various routines were putting a full struct tcp_sock on # the local stack. What they really wanted was a subset # of this information when doing TCP options processing # when we only have a mini-socket (for example in SYN-RECVD # and TIME_WAIT states). # # Therefore pull out the needed information into a sub-struct # and use that in the TCP options processing routines. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/ipv6/tcp_ipv6.c # 2005/02/22 10:45:32-08:00 acme@conectiva.com.br +14 -13 # [TCP]: Fix excessive stack usage resulting in OOPS with 4KSTACKS. # # net/ipv4/tcp_timer.c # 2005/02/22 10:45:32-08:00 acme@conectiva.com.br +1 -1 # [TCP]: Fix excessive stack usage resulting in OOPS with 4KSTACKS. # # net/ipv4/tcp_output.c # 2005/02/22 10:45:32-08:00 acme@conectiva.com.br +24 -24 # [TCP]: Fix excessive stack usage resulting in OOPS with 4KSTACKS. # # net/ipv4/tcp_minisocks.c # 2005/02/22 10:45:31-08:00 acme@conectiva.com.br +91 -91 # [TCP]: Fix excessive stack usage resulting in OOPS with 4KSTACKS. # # net/ipv4/tcp_ipv4.c # 2005/02/22 10:45:31-08:00 acme@conectiva.com.br +28 -28 # [TCP]: Fix excessive stack usage resulting in OOPS with 4KSTACKS. # # net/ipv4/tcp_input.c # 2005/02/22 10:45:31-08:00 acme@conectiva.com.br +115 -115 # [TCP]: Fix excessive stack usage resulting in OOPS with 4KSTACKS. # # net/ipv4/tcp.c # 2005/02/22 10:45:31-08:00 acme@conectiva.com.br +9 -9 # [TCP]: Fix excessive stack usage resulting in OOPS with 4KSTACKS. # # include/net/tcp.h # 2005/02/22 10:45:31-08:00 acme@conectiva.com.br +29 -29 # [TCP]: Fix excessive stack usage resulting in OOPS with 4KSTACKS. # # include/linux/tcp.h # 2005/02/22 10:45:31-08:00 acme@conectiva.com.br +31 -26 # [TCP]: Fix excessive stack usage resulting in OOPS with 4KSTACKS. # # ChangeSet # 2005/02/22 07:30:32-08:00 mikukkon@gmail.com # [PATCH] Build failure with !CONFIG_PCI and with CONFIG_ISAPNP=y && CONFIG_PNPBIOS=y # # Trying to build latest BK-kernel with !CONFIG_PCI and with CONFIG_ISAPNP=y # and CONFIG_PNPBIOS=y I got the following build error: # # LD vmlinux # drivers/built-in.o(.text+0x5486): In function # 'pnpbios_parse_allocated_irqresource': # : undefined reference to 'pcibios_penalize_isa_irq' # # Clearly pcibios_penalize_isa_irq() is meant to be called only with # CONFIG_PCI=y. # # Signed-off-by: Mika Kukkonen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/pnp/pnpbios/rsparser.c # 2005/02/22 01:32:19-08:00 mikukkon@gmail.com +5 -0 # Build failure with !CONFIG_PCI and with CONFIG_ISAPNP=y && CONFIG_PNPBIOS=y # # ChangeSet # 2005/02/22 07:30:18-08:00 anton@samba.org # [PATCH] ppc64: Fix 32bit largepage issue # # The paca holds a shadow of the context struct, used for the real mode SLB # handler. When we open up a new segment we have to sync up the paca copy # otherwise we will instantiate small page SLB entries until the next context # switch (at which point we resync the paca copy). # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/mm/hugetlbpage.c # 2005/02/22 01:32:19-08:00 anton@samba.org +4 -0 # ppc64: Fix 32bit largepage issue # # ChangeSet # 2005/02/22 07:30:04-08:00 akpm@osdl.org # [PATCH] x86_64: resource layout fix # # Greg's tree changes the order of fields in struct reasource, causing x86_64 to # explode nastily. Fix. # # Cc: Greg KH # Cc: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/setup.c # 2005/02/22 01:32:19-08:00 akpm@osdl.org +68 -21 # x86_64: resource layout fix # # ChangeSet # 2005/02/22 07:29:51-08:00 rddunlap@osdl.org # [PATCH] au1100: fix io_remap_page_range() arg. list # # Fix io_remap_page_range() call to pass a missing arg. # # Signed-off-by: Randy Dunlap # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/au1100fb.c # 2005/02/22 01:32:19-08:00 rddunlap@osdl.org +1 -1 # au1100: fix io_remap_page_range() arg. list # # ChangeSet # 2005/02/22 07:29:37-08:00 akpm@osdl.org # [PATCH] sparc64 usb build fix # # We need asm/irq.h for __irq_itoa() on sparc[64]. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/usb/core/hcd.c # 2005/02/22 02:14:56-08:00 akpm@osdl.org +1 -0 # sparc64 usb build fix # # ChangeSet # 2005/02/22 07:29:24-08:00 akpm@osdl.org # [PATCH] sparc64 rusage build fix # # Some patch in -mm causes the sparc64 build to explode because `struct rusage' # isn't defined or declared in compat.h. So forward-declare it. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/compat.h # 2005/02/22 01:32:18-08:00 akpm@osdl.org +2 -0 # sparc64 rusage build fix # # ChangeSet # 2005/02/22 07:29:10-08:00 akpm@osdl.org # [PATCH] ppc32: resource layout fixes # # Use named initialisers. # # Cc: Greg KH # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/syslib/i8259.c # 2005/02/22 01:32:18-08:00 akpm@osdl.org +12 -3 # ppc32: resource layout fixes # # ChangeSet # 2005/02/22 07:28:56-08:00 akpm@osdl.org # [PATCH] alpha: struct resource fix # # Used named initialisers in this declaration before Greg's tree's struct # resource layout changes come in and break it. # # (Probably "dma page reg" shouldn't have spaces in the name - be friendly to # /proc/ioports parsers?) # # Cc: Richard Henderson # Cc: Greg KH # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/alpha/kernel/setup.c # 2005/02/22 01:32:18-08:00 akpm@osdl.org +8 -8 # alpha: struct resource fix # # ChangeSet # 2005/02/21 16:33:57-08:00 shemminger@osdl.org # [TCP]: Fix BIC max_cwnd calculation error. # # The BIC TCP cwnd problem as identified by Yee-Ting Li and Doug Leith # is that the computation is recalc_ssthresh is incorrect and # BICTCP_1_OVER_BETA/2 should be BICTCP_1_OVER_BETA*2. # # My fix is to implement the code from BIC TCP 1.1 which uses a sysctl # to set the beta. There are a few variable name changes from the 1.1 # code, and made the scaling factor a #define instead of hardcoded. # # I validated this using netem and kprobes, for more details see # http://developer.osdl.org/shemminger/bic-beta-patch.pdf # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # net/ipv4/tcp_input.c # 2005/02/21 16:33:21-08:00 shemminger@osdl.org +1 -0 # [TCP]: Fix BIC max_cwnd calculation error. # # net/ipv4/sysctl_net_ipv4.c # 2005/02/21 16:33:21-08:00 shemminger@osdl.org +8 -0 # [TCP]: Fix BIC max_cwnd calculation error. # # include/net/tcp.h # 2005/02/21 16:33:21-08:00 shemminger@osdl.org +9 -8 # [TCP]: Fix BIC max_cwnd calculation error. # # include/linux/sysctl.h # 2005/02/21 16:33:21-08:00 shemminger@osdl.org +1 -0 # [TCP]: Fix BIC max_cwnd calculation error. # # ChangeSet # 2005/02/21 14:48:18-08:00 jgarzik@pobox.com # [PATCH] libata kfree fix # # Fixes double-kfree that caused slab corruption. # # Signed-off-by: Jeff Garzik # Signed-off-by: Linus Torvalds # # drivers/scsi/libata-core.c # 2005/02/20 20:34:32-08:00 jgarzik@pobox.com +4 -7 # libata kfree fix # # ChangeSet # 2005/02/21 09:37:02-08:00 benh@kernel.crashing.org # [PATCH] ppc32: fix ptep_test_and_clear_young # # ppc32's implementation of ptep_test_and_clear_young() has a logic error # which makes it fail to flush the hash table. Thus PAGE_ACCESSED is # almost never set again after beeing cleared (unless something else cause # that hash entry to be flushed). # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # include/asm-ppc/pgtable.h # 2005/02/20 21:00:26-08:00 benh@kernel.crashing.org +2 -2 # ppc32: fix ptep_test_and_clear_young # # ChangeSet # 2005/02/20 21:18:44-05:00 Gary.Spiess@Intermec.com # [PATCH] natsemi long cable fix # # This is a minor modification to the previous patch submission that does # not assume the default contents of the DSPCFG register are zero. # # When used with Revision D of the DP83815, the "Recommended Registers # Configuration" from page 78 of the DP83815 data sheet is not entirely # compatible with the driver's "short cable patch". When the DSPCFG # register is written with the value suggested in the document, then # do_cable_magic() can't read the DSP coefficient and determines that all # cables attached to the DP83815D are 'short', regardless of actual # length. Short cables (< 30m) cause do_cable_magic to enable additional # attenuation to reduce CRC and idle errors. If the extra attenuation is # unintentionally enabled for long cables (> 50m?), they will not operate # properly. The National Semiconductor driver, 'dp83815.c' from # http://www.national.com/appinfo/networks/files/linux_2_4.tar.gz was used # as a basis for this modification. # # Signed-off-by: Jeff Garzik # # drivers/net/natsemi.c # 2005/02/14 17:45:46-05:00 Gary.Spiess@Intermec.com +3 -1 # natsemi long cable fix # # ChangeSet # 2005/02/20 20:46:04-05:00 ravinandan.arakali@neterion.com # [PATCH] S2io: Multicast fix # # Attached is the patch to address the incorrect programming of # individual multicast address into the NIC. # # Signed-off-by: Ravinandan Arakali # Signed-off-by: Jeff Garzik # # drivers/net/s2io.c # 2005/02/15 06:47:42-05:00 ravinandan.arakali@neterion.com +5 -0 # S2io: Multicast fix # # ChangeSet # 2005/02/20 20:22:38-05:00 akpm@osdl.org # [PATCH] strip.c build fix # # Someone added a new dev_set_mac_address() to netdevice.h # # Signed-off-by: Andrew Morton # Signed-off-by: Jeff Garzik # # drivers/net/wireless/strip.c # 2005/02/19 05:53:30-05:00 akpm@osdl.org +2 -2 # strip.c build fix # # ChangeSet # 2005/02/20 12:51:20-08:00 torvalds@evo.osdl.org # x86: when choosing PCI starting address, print out gap information # # This makes for better messages on what is going on. It also # allows us (if we want to), to pick the PCI starting address # somewhere else in the gap. That may be a good idea (ie do a # # pci_mem_start = (gapstart + (gapsize >> 3) + 0xfffff) & ~0xfffff; # # or similar. # # arch/i386/kernel/setup.c # 2005/02/20 12:51:09-08:00 torvalds@evo.osdl.org +20 -4 # x86: when choosing PCI starting address, print out gap information # # ChangeSet # 2005/02/20 12:16:12-08:00 torvalds@ppc970.osdl.org # Be more careful about looking for gaps in the e820 table. # # We really don't care about anything beyond the 4GB mark, # so make the tests for that explicit (and add a comment), # and use regular "unsigned long" for the gap information. # # arch/i386/kernel/setup.c # 2005/02/20 12:16:05-08:00 torvalds@ppc970.osdl.org +14 -6 # Be more careful about looking for gaps in the e820 table. # # We really don't care about anything beyond the 4GB mark, # so make the tests for that explicit (and add a comment), # and use regular "unsigned long" for the gap information. # # ChangeSet # 2005/02/20 09:43:19-08:00 torvalds@ppc970.osdl.org # Use e820 memory map to determine PCI allocation area. # # Don't use the VM numbers (max_low_pfn and friends), since they depend # on the partial kernel linear mapping and only partially on the actual # physical memory layout. # # arch/i386/kernel/setup.c # 2005/02/20 09:43:12-08:00 torvalds@ppc970.osdl.org +19 -6 # Use e820 memory map to determine PCI allocation area. # # Don't use the VM numbers (max_low_pfn and friends), since they depend # on the partial kernel linear mapping and only partially on the actual # physical memory layout. # # ChangeSet # 2005/02/20 14:55:31+01:00 ben-linux@fluff.org # [ide] Kconfig for VR1000 machine driver selection # # Fix the use of CONFIG_MACH_VR1000, which was missing an # trailing zero from the configuration variable, so never # being shown if only the VR1000 was selected # # Signed-off-by: Ben Dooks # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/Kconfig # 2005/02/18 11:54:21+01:00 ben-linux@fluff.org +1 -1 # [ide] Kconfig for VR1000 machine driver selection # # ChangeSet # 2005/02/20 14:51:35+01:00 mikukkon@gmail.com # [ide] small compile fix to ide.c with !CONFIG_PCI # # Small patch to fix following warning with CONFIG_IDE && !CONFIG_PCI: # # CC drivers/ide/ide.o # drivers/ide/ide.c: In function 'ide_system_bus_speed': # drivers/ide/ide.c:338: warning: unused variable 'pci_default' # # I decided to save some bytes by #ifdef:ing the struct in question. # CC:ing Hanna because she did the change (and just to say hi ;-). # # Signed-off-by: Mika Kukkonen # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/ide.c # 2005/02/20 12:48:59+01:00 mikukkon@gmail.com +4 -0 # [ide] small compile fix to ide.c with !CONFIG_PCI # # ChangeSet # 2005/02/19 17:16:24-08:00 daniel.ritz@gmx.ch # [PATCH] PCI: support PCI_PM_CAP version 1 # # A check for the PM_CAP version was recently added but i breaks devices # with version 1. if they're in power-save mode they never get out of it. # # Change it to also support v1. # # Signed-off-by: Daniel Ritz # Signed-off-by: Linus Torvalds # # drivers/pci/pci.c # 2005/02/19 16:44:39-08:00 daniel.ritz@gmx.ch +1 -1 # PCI: support PCI_PM_CAP version 1 # # ChangeSet # 2005/02/19 16:00:45-08:00 benh@kernel.crashing.org # [PATCH] radeonfb: Workaround memory corruption accel problem # # A conflict between X and radeonfb can cause system memory corruption # when switching console from X (note that this is not realted to the # recent radeonfb patches, the problem has been there forever as far as I # can tell). # # This patch works around it in radeonfb by making sure the "offsets" # register that driver the memory mapping of the accel engine are always # properly set before every accel op. A better fix should be done in fbcon # ultimately. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # drivers/video/aty/radeon_accel.c # 2005/02/19 15:41:37-08:00 benh@kernel.crashing.org +39 -0 # radeonfb: Workaround memory corruption accel problem # # ChangeSet # 2005/02/19 15:48:10-08:00 takata@linux-m32r.org # [PATCH] m32r: warning fix # # /project/m32r-linux/kernel/linux-2.6.11-rc4-bk4/b/include/linux/nodemask.h: In function `__first_unset_node': # /project/m32r-linux/kernel/linux-2.6.11-rc4-bk4/b/include/linux/nodemask.h:246: warning: passing arg 1 of `find_next_zero_bit' discards qualifiers from pointer target type # # Signed-off-by: Hirokazu Takata # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-m32r/bitops.h # 2005/02/16 22:09:43-08:00 takata@linux-m32r.org +3 -2 # m32r: warning fix # # ChangeSet # 2005/02/19 15:47:55-08:00 akpm@osdl.org # [PATCH] end_buffer_async_read printk ratelimiting # # ratelimit the disk I/O error reporting in end_buffer_async_read(). # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/buffer.c # 2005/02/18 01:44:07-08:00 akpm@osdl.org +2 -1 # end_buffer_async_read printk ratelimiting # # ChangeSet # 2005/02/19 15:47:41-08:00 akpm@osdl.org # [PATCH] mca resource layout fix # # Greg's tree changes the layout of struct resource, so mca.c blows up. # Preemptively fix it. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/kernel/mca.c # 2005/02/19 01:58:36-08:00 akpm@osdl.org +7 -7 # mca resource layout fix # # ChangeSet # 2005/02/19 17:38:07+01:00 bzolnier@trik.(none) # [ide] fix ide_get_error_location() for LBA28 # # Higher bits (16-23) of the address were ignored. # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/ide-io.c # 2005/02/19 17:37:55+01:00 bzolnier@trik.(none) +3 -2 # [ide] fix ide_get_error_location() for LBA28 # # ChangeSet # 2005/02/18 23:26:25+01:00 marcel@holtmann.org # [Bluetooth] The new Microsoft dongle needs HCI_Reset # # For the new Microsoft Wireless Transceiver for Bluetooth 2.0 it is # necessary to send the HCI_Reset on every device initialization. # # Signed-off-by: Marcel Holtmann # # ChangeSet # 2005/02/18 22:24:01+00:00 rmk@flint.arm.linux.org.uk # [ARM] Take account of vm_pgoff for DMA mmap # # The DMA mmap code was ignoring vm_pgoff which prevented a partial # mmap() of a DMA buffer. # # Signed-off-by: Russell King # # drivers/bluetooth/hci_usb.c # 2005/02/18 23:22:20+01:00 marcel@holtmann.org +1 -1 # The new Microsoft dongle needs HCI_Reset # # arch/arm/mm/consistent.c # 2005/02/18 22:19:54+00:00 rmk@flint.arm.linux.org.uk +5 -3 # Fix dma_mmap to take account of the vm_pgoff. # # ChangeSet # 2005/02/18 21:55:29+00:00 buytenh@org.rmk.(none) # [ARM PATCH] 2494/1: fix 'CONFGI_' -> 'CONFIG_' in mach-ixp2000/ixdp2x00.c # # Patch from Lennert Buytenhek # # Fix a misspelled config symbol name in the ixp2000 code. # # Signed-off-by: Lennert Buytenhek # Signed-off-by: Russell King # # arch/arm/mach-ixp2000/ixdp2x00.c # 2005/02/17 17:50:28+00:00 buytenh@org.rmk.(none) +1 -1 # [PATCH] 2494/1: fix 'CONFGI_' -> 'CONFIG_' in mach-ixp2000/ixdp2x00.c # # ChangeSet # 2005/02/18 21:48:16+00:00 buytenh@org.rmk.(none) # [ARM PATCH] 2493/1: put IXP2000 slowport in 8-bit mode after boot # # Patch from Lennert Buytenhek # # This is an old patch from 2.6.9-rc3-ds2 that never made it upstream. # The IXP2000 slowport has two modes of operation, 8-bit and 32-bit. # The slowport itself is a byte-wide bus, and in 8-bit mode, it does the # more-or-less obvious thing: every word read causes four byte reads, # and those bytes are then combined into a word according to the xscale # core's current endian setting. So, what value you get depends on what # endianity your IXP2000 is running in. # In 32-bit mode, however, it is the slowport itself which combines # bytes into words, and for this it unconditionally uses little endian # mode. In this mode, word reads from the slowport will return the # same value no matter whether the xscale core is running in big or # little endian mode. This can be a plus in some cases. Byte (and # halfword) accesses in 32-bit mode have rather useless semantics # due to this, though. # The usefulness of 32-bit mode is limited to the initial boot. When # the IXP2000 resets, the slowport is always in 32-bit mode, so if you # flash the bootloader into flash (which is connected to the slowport) # using little-endian byte ordering, the xscale will always read the # instruction stream correctly, no matter whether it's running in big # or little endian mode. # After booting it makes no sense to use 32-bit mode anymore. Especially # since the slowport's word ordering in 32-bit mode is little endian, # and the IXP2000 is conventionally run in big endian, which gives all # kinds of fun issues when trying to access peripherals connected to # the slowport. # In fact, the current MTD map driver for IXP2000 already sets the # slowport to 8-bit mode because it cannot access the flash otherwise. # However, this means that if the MTD map driver is not compiled in for # some reason, the slowport will stay in 32-bit mode after the initial # boot, which will cause peripheral accesses to unexpectedly break! # # Signed-off-by: Lennert Buytenhek # Signed-off-by: Russell King # # arch/arm/mach-ixp2000/core.c # 2005/02/17 17:48:07+00:00 buytenh@org.rmk.(none) +3 -0 # [PATCH] 2493/1: put IXP2000 slowport in 8-bit mode after boot # # ChangeSet # 2005/02/18 10:25:55-08:00 davem@nuts.davemloft.net # [SPARC64]: BUG on rediculious memcpy lengths. # # Anything larger than MAX_INT is suspect. Do this # for user copies too. # # Signed-off-by: David S. Miller # # arch/sparc64/lib/U3memcpy.S # 2005/02/18 10:25:06-08:00 davem@nuts.davemloft.net +3 -0 # [SPARC64]: BUG on rediculious memcpy lengths. # # arch/sparc64/lib/U1memcpy.S # 2005/02/18 10:25:06-08:00 davem@nuts.davemloft.net +3 -0 # [SPARC64]: BUG on rediculious memcpy lengths. # # ChangeSet # 2005/02/17 21:53:25-08:00 davem@nuts.davemloft.net # [SPARC64]: Use common sys_ipc() compat code. # # No need to duplicate it locally. This also fixes # several arg sign extension bugs and the subsequent # ltp testsuite failures. # # Signed-off-by: David S. Miller # # include/asm-sparc64/compat.h # 2005/02/17 21:53:03-08:00 davem@nuts.davemloft.net +59 -0 # [SPARC64]: Use common sys_ipc() compat code. # # No need to duplicate it locally. This also fixes # several arg sign extension bugs and the subsequent # ltp testsuite failures. # # Signed-off-by: David S. Miller # # arch/sparc64/kernel/sys_sparc32.c # 2005/02/17 21:53:03-08:00 davem@nuts.davemloft.net +57 -589 # [SPARC64]: Use common sys_ipc() compat code. # # No need to duplicate it locally. This also fixes # several arg sign extension bugs and the subsequent # ltp testsuite failures. # # Signed-off-by: David S. Miller # # arch/sparc64/defconfig # 2005/02/17 21:53:03-08:00 davem@nuts.davemloft.net +3 -2 # [SPARC64]: Use common sys_ipc() compat code. # # No need to duplicate it locally. This also fixes # several arg sign extension bugs and the subsequent # ltp testsuite failures. # # Signed-off-by: David S. Miller # # arch/sparc64/Kconfig # 2005/02/17 21:53:03-08:00 davem@nuts.davemloft.net +5 -0 # [SPARC64]: Use common sys_ipc() compat code. # # No need to duplicate it locally. This also fixes # several arg sign extension bugs and the subsequent # ltp testsuite failures. # # Signed-off-by: David S. Miller # # ChangeSet # 2005/02/17 11:59:58-08:00 zaitcev@redhat.com # [PATCH] ub: fix Add ioctls to ub patch # # I am awfully sorry, but that patch contained a bug. The code dereferenced # cmd->back as if it were a pointer to a request even when it wasn't. It worked # by accident, because rq->flags overlapped with a zeroed memory in other case. # Here is a corrective patch. # # Signed-off-by: Pete Zaitcev # Signed-off-by: Greg Kroah-Hartman # # drivers/block/ub.c # 2005/02/17 10:59:12-08:00 zaitcev@redhat.com +17 -16 # ub: fix Add ioctls to ub patch # # ChangeSet # 2005/02/17 11:56:54-08:00 zaitcev@redhat.com # [PATCH] USB: Add ioctls to ub # # This patch adds support for ioctls to ub, with the help of scsi_ioctl_cmd(). # Now ub can eject CDs. But do not try to burn CDs yet, it's not tested. # # Original patch from Peter Jones (aka deviant-). # # Signed-off-by: Pete Zaitcev # Signed-off-by: Greg Kroah-Hartman # # drivers/block/ub.c # 2005/02/17 10:59:21-08:00 zaitcev@redhat.com +103 -61 # USB: Add ioctls to ub # # ChangeSet # 2005/02/17 10:08:34-08:00 rddunlap@osdl.org # [PATCH] sis: fix sparse warnings # # drivers/video/sis/sis_main.c:2204:2: warning: undefined identifier 'lock_kernel' # drivers/video/sis/sis_main.c:2206:2: warning: undefined identifier 'unlock_kernel' # drivers/video/sis/sis_main.c:2204: warning: implicit declaration of function `lock_kernel' # drivers/video/sis/sis_main.c:2206: warning: implicit declaration of function `unlock_kernel' # # Signed-off-by: Randy Dunlap # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/sis/sis_main.c # 2005/02/16 17:32:38-08:00 rddunlap@osdl.org +1 -0 # sis: fix sparse warnings # # ChangeSet # 2005/02/17 10:08:20-08:00 takata@linux-m32r.org # [PATCH] m32r: defconfig updates # # Here is a patchset to update defconfig files for m32r. The m32r kernel's # API/ABI has been changed since 2.6.11-rc1. # # Signed-off-by: Hirokazu Takata # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/m32r/opsput/defconfig.opsput # 2005/02/16 21:32:24-08:00 takata@linux-m32r.org +42 -12 # m32r: defconfig updates # # arch/m32r/oaks32r/defconfig.nommu # 2005/02/16 21:32:24-08:00 takata@linux-m32r.org +35 -9 # m32r: defconfig updates # # arch/m32r/mappi2/defconfig.vdec2 # 2005/02/16 21:32:24-08:00 takata@linux-m32r.org +35 -8 # m32r: defconfig updates # # arch/m32r/mappi/defconfig.up # 2005/02/16 21:32:24-08:00 takata@linux-m32r.org +37 -7 # m32r: defconfig updates # # arch/m32r/mappi/defconfig.smp # 2005/02/16 21:32:24-08:00 takata@linux-m32r.org +37 -7 # m32r: defconfig updates # # arch/m32r/mappi/defconfig.nommu # 2005/02/16 21:32:24-08:00 takata@linux-m32r.org +35 -10 # m32r: defconfig updates # # arch/m32r/m32700ut/defconfig.m32700ut.up # 2005/02/16 21:32:24-08:00 takata@linux-m32r.org +36 -8 # m32r: defconfig updates # # arch/m32r/m32700ut/defconfig.m32700ut.smp # 2005/02/16 21:32:24-08:00 takata@linux-m32r.org +36 -8 # m32r: defconfig updates # # arch/m32r/defconfig # 2005/02/16 21:32:24-08:00 takata@linux-m32r.org +36 -8 # m32r: defconfig updates # # ChangeSet # 2005/02/17 10:08:06-08:00 takata@linux-m32r.org # [PATCH] m32r: fix sys_clone() # # This patch is required to fix sys_clone() for m32r. # # * arch/m32r/kernel/process.c: # - Fix sys_clone; add arguments, parent_tidptr and child_tidptr. # - Cosmetics: Change indentation of function parameters for # sys_clone(), sys_vfork(). # # Signed-off-by: Hirokazu Takata # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/m32r/kernel/process.c # 2005/02/16 20:33:21-08:00 takata@linux-m32r.org +10 -8 # m32r: fix sys_clone() # # ChangeSet # 2005/02/17 10:07:53-08:00 takata@linux-m32r.org # [PATCH] m32r: build fix for SMP kernel # # Here is a patch to fix compile errors of 2.6.11-rc4 for the m32r SMP # kernel. # # # * include/asm-m32r/spinlock.h: # - Add read_can_lock() and write_can_lock() to fix build errors for SMP. # - Rename 'lock' to 'slock'. (cf. Changesets 1.1966.85.1) # # * arch/m32r/kernel/smp.c: # - Rename 'lock' to 'slock'. (cf. Changesets 1.1966.85.1) # # Signed-off-by: Hirokazu Takata # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-m32r/spinlock.h # 2005/02/16 20:32:41-08:00 takata@linux-m32r.org +35 -33 # m32r: build fix for SMP kernel # # arch/m32r/kernel/smp.c # 2005/02/16 20:32:41-08:00 takata@linux-m32r.org +1 -1 # m32r: build fix for SMP kernel # # ChangeSet # 2005/02/17 08:54:52-08:00 davem@nuts.davemloft.net # [SPARC64]: Fix access_ok() args in sys_sparc32.c:get_tv32(). # # Signed-off-by: David S. Miller # # arch/sparc64/kernel/sys_sparc32.c # 2005/02/17 08:54:19-08:00 davem@nuts.davemloft.net +1 -1 # [SPARC64]: Fix access_ok() args in sys_sparc32.c:get_tv32(). # # ChangeSet # 2005/02/17 16:09:14+00:00 buytenh@org.rmk.(none) # [ARM PATCH] 2487/1: minor IRQ routing tweaks for ENP-2611 # # Patch from Lennert Buytenhek # # - The PCI2050B bridge is not wired to any interrupt pin. # - The SPI-3 option board slot is wired to PCI_B. # - Don't printk every time enp2611_map_pci_irq is called. # - Complain loudly if we encounter an unknown device. # # Signed-off-by: Lennert Buytenhek # Signed-off-by: Russell King # # arch/arm/mach-ixp2000/enp2611.c # 2005/02/15 21:37:32+00:00 buytenh@org.rmk.(none) +15 -7 # [PATCH] 2487/1: minor IRQ routing tweaks for ENP-2611 # # ChangeSet # 2005/02/17 16:01:50+00:00 buytenh@org.rmk.(none) # [ARM PATCH] 2486/1: fix incorrect comment in arch/arm/kernel/debug.S # # Patch from Lennert Buytenhek # # arch/arm/kernel/debug.S has a comment at the top stating that the # file is called debug-armv.S, which is clearly not so. # # Signed-off-by: Lennert Buytenhek # Signed-off-by: Russell King # # ChangeSet # 2005/02/17 07:57:40-08:00 nickpiggin@yahoo.com.au # [PATCH] optimise copy page range # # Suggested by Linus: optimise a condition in the clear_p?d_range functions. # Results in one less conditional branch on i386 with gcc-3.4.4 # # Signed-off-by: Nick Piggin # Signed-off-by: Linus Torvalds # # mm/memory.c # 2005/02/15 18:45:11-08:00 nickpiggin@yahoo.com.au +6 -3 # optimise copy page range # # arch/arm/kernel/debug.S # 2005/02/05 22:54:33+00:00 buytenh@org.rmk.(none) +1 -1 # [PATCH] 2486/1: fix incorrect comment in arch/arm/kernel/debug.S # # ChangeSet # 2005/02/17 07:54:19-08:00 benh@kernel.crashing.org # [PATCH] Fix buf in zeromap_pud_range() losing virtual address # # This patch fixes a nasty bug that took us almost a week to track down on # ppc64, introduced by the 4L page table changes, and resulting in random # memory corruption. All archs that rely on a PTE page's struct page to # contain the mm & address (in mapping/index) will be affected. # # zeromap_pud_range() is one of these page tables walking functions that # split the address into a base and an offset. It forgets to add back the # "base" when calling the lower level zeromap_pmd_range(), thus passing a # bogus virtual address. Most archs won't care, unless they do the above, # since the lower level can allocate a PTE page. # # Kudo's to Michael Ellerman too who spent that week running tests after # tests to track it down, since the only way we managed to get it to show # up was after about 1 to 2h of LTP runs ... # # (Note: We are in _urgent_ need to consolidate all those page table # walking functions, they all do things in a subtely different way, with # different checks (sometimes redudant) and inconsitent with each other, # even within a given set of them. Hopefully, Nick has some work in # progress there). # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # mm/memory.c # 2005/02/16 23:11:15-08:00 benh@kernel.crashing.org +2 -1 # Fix buf in zeromap_pud_range() losing virtual address # # ChangeSet # 2005/02/17 07:54:05-08:00 benh@kernel.crashing.org # [PATCH] Check for wraps in copy_page_range # # While browsing the 4 level page table changes (looking for a bug), I # noticed that copy_page_range, unlike others, do not check for # wraparound, which I suppose could be a problem with 4G/4G architectures # or that sort of thing. # # This patch fixes it. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # ChangeSet # 2005/02/17 15:54:04+00:00 buytenh@org.rmk.(none) # [ARM PATCH] 2485/1: fix enp2611 coexistence with other machine types # # Patch from Lennert Buytenhek # # If enp2611 support is compiled in, the kernel will unconditionally # perform enp2611-style PCI initialisation. Conditionalise this on # machine_is_enp2611(). # # Signed-off-by: Lennert Buytenhek # Signed-off-by: Russell King # # mm/memory.c # 2005/02/15 19:51:37-08:00 benh@kernel.crashing.org +2 -2 # Check for wraps in copy_page_range # # ChangeSet # 2005/02/17 07:53:51-08:00 benh@kernel.crashing.org # [PATCH] Fix possible race with 4level-fixup.h # # When using 4level-fixup.h, a PMD page may end up beeing freed before the # matching PGD entry is cleared due to the way the compatibility macros # work. This can cause nasty races on some architectures. # # This patch fixes it by defining pud_clear() to be pgd_clear(). That # means we'll actually write 0 twice, a small price to pay here, # especially seeing how easy it is to convert to the new headers anyway # (hint hint, ppc & ppc64 patches as soon as 2.6.11 is out). # # Signed-off-by: Nick Piggin # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # include/asm-generic/4level-fixup.h # 2005/02/16 23:10:38-08:00 benh@kernel.crashing.org +1 -1 # Fix possible race with 4level-fixup.h # # arch/arm/mach-ixp2000/enp2611.c # 2005/02/12 02:16:43+00:00 buytenh@org.rmk.(none) +3 -1 # [PATCH] 2485/1: fix enp2611 coexistence with other machine types # # ChangeSet # 2005/02/16 15:37:06-08:00 davem@nuts.davemloft.net # [SPARC64]: Fix access_ok() and friends warnings. # # The implementation is a nop on sparc64, we always return # true, but we have to add at least a (void) reference to # the arguments to avoid compiler/checker warnings. # # Signed-off-by: David S. Miller # # include/asm-sparc64/uaccess.h # 2005/02/16 15:35:57-08:00 davem@nuts.davemloft.net +3 -3 # [SPARC64]: Fix access_ok() and friends warnings. # # ChangeSet # 2005/02/16 15:33:43-08:00 davem@nuts.davemloft.net # [SPARC64]: Put PROM trampolines into asm file. # # No need for these enormous inline asm statements. # # Signed-off-by: David S. Miller # # arch/sparc64/prom/p1275.c # 2005/02/16 15:32:48-08:00 davem@nuts.davemloft.net +2 -219 # [SPARC64]: Put PROM trampolines into asm file. # # arch/sparc64/prom/Makefile # 2005/02/16 15:32:48-08:00 davem@nuts.davemloft.net +1 -1 # [SPARC64]: Put PROM trampolines into asm file. # # arch/sparc64/prom/cif.S # 2005/02/16 15:32:38-08:00 davem@nuts.davemloft.net +225 -0 # [SPARC64]: Put PROM trampolines into asm file. # # arch/sparc64/prom/cif.S # 2005/02/16 15:32:38-08:00 davem@nuts.davemloft.net +0 -0 # BitKeeper file /disk1/BK/sparc-2.6/arch/sparc64/prom/cif.S # # ChangeSet # 2005/02/16 15:15:42-08:00 trini@kernel.crashing.org # [PATCH] ppc32: fixup of previous PCI9 patch # # Previous PCI9 patch had a #endif placed wrong for some unknown reason (was # correct in local tree) This fixes it. # # Signed-off-by: Rune Torgersen # Signed-off-by: Tom Rini # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc/io.h # 2005/02/16 10:51:09-08:00 trini@kernel.crashing.org +2 -1 # ppc32: fixup of previous PCI9 patch # # ChangeSet # 2005/02/16 15:15:27-08:00 ntl@pobox.com # [PATCH] kthread_bind new worker threads when onlining cpu # # We weren't binding new worker threads to their cpu when onlining. Using # preempt and the debug version of smp_processor_id found this. # # Signed-off-by: Nathan Lynch # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/workqueue.c # 2005/02/16 10:51:24-08:00 ntl@pobox.com +3 -1 # kthread_bind new worker threads when onlining cpu # # ChangeSet # 2005/02/16 14:27:17-08:00 david-b@pacbell.net # [PATCH] USB: ehci requeue revisit # # This gets rid of a bug found in some IRQ handling logic, after tripping # a debug assertion. Basically, a recent patch called the wrong routine to # unlink a QH. Net result, it wasn't allowing for the case that some other # QH was already being unlinked. This patch uses the correct routine; the # names are confusingly similar, and the effect is often identical. # # The consequence of using the wrong routine was that the driver could # lose one of the pending unlinks (probably wedging some activity) and # treat the other one as completed before it was safe to do so (which # probably wouldn't oops, but could cause other nasty corruption). # # From: Brian Murphy # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/ehci-q.c # 2005/02/10 14:59:03-08:00 david-b@pacbell.net +2 -1 # USB: ehci requeue revisit # # ChangeSet # 2005/02/16 14:26:53-08:00 stern@rowland.harvard.edu # [PATCH] USB Hub driver: Add reset recovery-time delay # # This patch is clearly needed for us to be in compliance with the USB spec. # It adds the mandated recovery-time delay following a port reset. # Regardless of anything else we do to alter the device initialization # sequence, this is necessary. # # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/core/hub.c # 2005/02/09 07:17:53-08:00 stern@rowland.harvard.edu +3 -0 # USB Hub driver: Add reset recovery-time delay # # ChangeSet # 2005/02/16 14:26:30-08:00 david-b@pacbell.net # [PATCH] USB: ehci patch for NF4 port miscounting # # Turns out that a workaround for a different EHCI chip trips up at # least one NForce4 board. Neither controller can multiply right. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/ehci-hcd.c # 2005/02/05 11:12:57-08:00 david-b@pacbell.net +23 -2 # USB: ehci patch for NF4 port miscounting # # ChangeSet # 2005/02/16 12:33:23-08:00 davem@nuts.davemloft.net # [SPARC64]: auxio_register is pointer not integer. # # Signed-off-by: David S. Miller # # arch/sparc64/kernel/auxio.c # 2005/02/16 12:32:39-08:00 davem@nuts.davemloft.net +1 -1 # [SPARC64]: auxio_register is pointer not integer. # # ChangeSet # 2005/02/16 08:41:34-08:00 adaplas@hotpop.com # [PATCH] fbdev: Fix gcc 4.0 compile failure # # From: Art Haas # # The current GCC cvs code does not like the include/linux/fb.h file: # # In file included from drivers/video/aty/atyfb_base.c:63: # include/linux/fb.h:865: error: array type has incomplete element type # # This error is due to recent changes in GCC. A thread discussing this # change can be found by following the link below: # # http://gcc.gnu.org/ml/gcc/2005-02/msg00053.html # # The patch moves the array declaration after the definition of the # fb_modelist structure, and with this small change GCC is happy once # again. # # Signed-off-by: Antonino Daplas # Signed-off-by: Linus Torvalds # # include/linux/fb.h # 2005/02/15 09:38:28-08:00 adaplas@hotpop.com +2 -1 # fbdev: Fix gcc 4.0 compile failure # # ChangeSet # 2005/02/16 08:09:40-08:00 Robert.Olsson@data.slu.se # [PKTGEN]: Bug fixes, bump to version 2.56. # # - Fix printing of running list, do not stop at first # not-running device, instead scan them all. # - Do not free SKB before final access via show_results() # # Signed-off-by: David S. Miller # # net/core/pktgen.c # 2005/02/16 08:07:54-08:00 Robert.Olsson@data.slu.se +18 -24 # [PKTGEN]: Bug fixes, bump to version 2.56. # # ChangeSet # 2005/02/15 22:30:04-05:00 len.brown@intel.com # [ACPI] ACPICA 20050211 from Bob Moore # # Implemented ACPI 3.0 support for implicit conversion within # the Match() operator. match_obj can now be of type # integer, buffer, or string instead of just type integer. # Package elements are implicitly converted to the type # of the match_obj. This change aligns the behavior of # Match() with the behavior of the other logical operators # (LLess(), etc.) It also requires an errata change to the # ACPI specification as this support was intended for ACPI # 3.0, but was inadvertently omitted. # # Fixed a problem with the internal implicit "to buffer" # conversion. Strings that are converted to buffers will # cause buffer truncation if the string is smaller than the # target buffer. Integers that are converted to buffers will # not cause buffer truncation, only zero extension (both as # per the ACPI spec.) The problem was introduced when code # was added to truncate the buffer, but this should not be # performed in all cases, only the string case. # # Fixed a problem with the Buffer and Package operators # where the interpreter would get confused if two such # operators were used as operands to an ASL operator (such # as LLess(Buffer(1){0},Buffer(1){1}). The internal result # stack was not being popped after the execution of these # operators, resulting in an AE_NO_RETURN_VALUE exception. # # Fixed a problem with constructs of the form # Store(Index(...),...). The reference object returned from # Index was inadvertently resolved to an actual value. This # problem was introduced in version 20050114 when the # behavior of Store() was modified to restrict the object # types that can be used as the source operand (to match # the ACPI specification.) # # Reduced stack use in acpi_get_object_info(). # # include/acpi/platform/aclinux.h # 2005/02/15 21:56:14-05:00 len.brown@intel.com +2 -0 # ACPICA 20050211 # # include/acpi/acinterp.h # 2005/02/15 21:56:14-05:00 len.brown@intel.com +3 -2 # ACPICA 20050211 # # include/acpi/acconfig.h # 2005/02/15 21:56:14-05:00 len.brown@intel.com +1 -1 # ACPICA 20050211 # # drivers/acpi/tables/tbconvrt.c # 2005/02/15 22:29:45-05:00 len.brown@intel.com +2 -2 # ACPICA 20050211 # # drivers/acpi/parser/psopcode.c # 2005/02/15 21:56:18-05:00 len.brown@intel.com +1 -1 # ACPICA 20050211 # # drivers/acpi/namespace/nsxfname.c # 2005/02/15 21:56:18-05:00 len.brown@intel.com +27 -24 # ACPICA 20050211 # # drivers/acpi/executer/exstorob.c # 2005/02/15 21:56:18-05:00 len.brown@intel.com +10 -2 # ACPICA 20050211 # # drivers/acpi/executer/exstoren.c # 2005/02/15 21:56:18-05:00 len.brown@intel.com +14 -6 # ACPICA 20050211 # # drivers/acpi/executer/exresop.c # 2005/02/15 21:56:18-05:00 len.brown@intel.com +1 -1 # ACPICA 20050211 # # drivers/acpi/executer/exoparg6.c # 2005/02/15 21:56:18-05:00 len.brown@intel.com +91 -42 # ACPICA 20050211 # # drivers/acpi/dispatcher/dswexec.c # 2005/02/15 21:56:18-05:00 len.brown@intel.com +7 -0 # ACPICA 20050211 # # ChangeSet # 2005/02/15 18:44:43-08:00 breuerr@mc.net # [SPARC]: Check prom_getproperty return value. # # Errors should not be ignored, so add __must_check # tag to this function as well. # # Signed-off-by: David S. Miller # # include/asm-sparc/oplib.h # 2005/02/15 18:43:33-08:00 breuerr@mc.net +3 -2 # [SPARC]: Check prom_getproperty return value. # # include/asm-sparc/floppy.h # 2005/02/15 18:43:33-08:00 breuerr@mc.net +2 -2 # [SPARC]: Check prom_getproperty return value. # # arch/sparc/prom/console.c # 2005/02/15 18:43:33-08:00 breuerr@mc.net +25 -18 # [SPARC]: Check prom_getproperty return value. # # arch/sparc/mm/sun4c.c # 2005/02/15 18:43:33-08:00 breuerr@mc.net +2 -1 # [SPARC]: Check prom_getproperty return value. # # arch/sparc/mm/iommu.c # 2005/02/15 18:43:33-08:00 breuerr@mc.net +10 -8 # [SPARC]: Check prom_getproperty return value. # # arch/sparc/mm/io-unit.c # 2005/02/15 18:43:33-08:00 breuerr@mc.net +9 -7 # [SPARC]: Check prom_getproperty return value. # # arch/sparc/kernel/sun4c_irq.c # 2005/02/15 18:43:33-08:00 breuerr@mc.net +11 -6 # [SPARC]: Check prom_getproperty return value. # # arch/sparc/kernel/idprom.c # 2005/02/15 18:43:33-08:00 breuerr@mc.net +4 -5 # [SPARC]: Check prom_getproperty return value. # # arch/sparc/kernel/auxio.c # 2005/02/15 18:43:33-08:00 breuerr@mc.net +4 -2 # [SPARC]: Check prom_getproperty return value. # # ChangeSet # 2005/02/15 18:38:35-08:00 benh@kernel.crashing.org # [PATCH] radeonfb: Fix hang on boot with some laptops # # It appears that access to the PLL registers of the radeon chip is # unreliable while the card is in "legacy VGA" text mode. I don't have a # good explanation yet, it might be the BIOS mucking around behind my # back. This fixes the lockup by moving the code that enables/disables the # dynamic power management to after the mode is set. # # I'm still waiting for a proper explanation from ATI... # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # drivers/video/aty/radeon_base.c # 2005/02/15 18:25:30-08:00 benh@kernel.crashing.org +7 -7 # radeonfb: Fix hang on boot with some laptops # # ChangeSet # 2005/02/15 14:51:04-08:00 yoshfuji@linux-ipv6.org # [IPV6]: Fix IPV6_PKTINFO et al. handling in udpv6_recvmsg(). # # CMSG reception needs to occur even if msg_name is not # set. # # Signed-off-by: Hideaki YOSHIFUJI # Signed-off-by: David S. Miller # # net/ipv6/udp.c # 2005/02/15 14:50:43-08:00 yoshfuji@linux-ipv6.org +11 -9 # [IPV6]: Fix IPV6_PKTINFO et al. handling in udpv6_recvmsg(). # # CMSG reception needs to occur even if msg_name is not # set. # # Signed-off-by: Hideaki YOSHIFUJI # Signed-off-by: David S. Miller # # ChangeSet # 2005/02/15 14:23:32-08:00 herbert@gondor.apana.org.au # [NET]: Add netdev argument to dst ifdown. # # This patch adds a net_device argument to ifdown. After all, # it's a bit silly to notify someone of an ifdown event without # telling them what which device it was for :) # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/xfrm/xfrm_policy.c # 2005/02/15 14:23:11-08:00 herbert@gondor.apana.org.au +2 -3 # [NET]: Add netdev argument to dst ifdown. # # This patch adds a net_device argument to ifdown. After all, # it's a bit silly to notify someone of an ifdown event without # telling them what which device it was for :) # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/route.c # 2005/02/15 14:23:11-08:00 herbert@gondor.apana.org.au +5 -3 # [NET]: Add netdev argument to dst ifdown. # # This patch adds a net_device argument to ifdown. After all, # it's a bit silly to notify someone of an ifdown event without # telling them what which device it was for :) # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/route.c # 2005/02/15 14:23:10-08:00 herbert@gondor.apana.org.au +5 -3 # [NET]: Add netdev argument to dst ifdown. # # This patch adds a net_device argument to ifdown. After all, # it's a bit silly to notify someone of an ifdown event without # telling them what which device it was for :) # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/core/dst.c # 2005/02/15 14:23:10-08:00 herbert@gondor.apana.org.au +7 -6 # [NET]: Add netdev argument to dst ifdown. # # This patch adds a net_device argument to ifdown. After all, # it's a bit silly to notify someone of an ifdown event without # telling them what which device it was for :) # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/net/dst.h # 2005/02/15 14:23:10-08:00 herbert@gondor.apana.org.au +2 -1 # [NET]: Add netdev argument to dst ifdown. # # This patch adds a net_device argument to ifdown. After all, # it's a bit silly to notify someone of an ifdown event without # telling them what which device it was for :) # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/02/15 14:22:41-08:00 herbert@gondor.apana.org.au # [IPSEC]: Move dst->child loop from dst_ifdown to xfrm_dst_ifdown. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/xfrm/xfrm_policy.c # 2005/02/15 14:22:08-08:00 herbert@gondor.apana.org.au +17 -0 # [IPSEC]: Move dst->child loop from dst_ifdown to xfrm_dst_ifdown. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/core/dst.c # 2005/02/15 14:22:08-08:00 herbert@gondor.apana.org.au +12 -17 # [IPSEC]: Move dst->child loop from dst_ifdown to xfrm_dst_ifdown. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/02/15 13:04:21-08:00 torvalds@ppc970.osdl.org # Input: fix ALPS protocol validation rules # # We checked the wrong byte, causing the touchpad # to lose sync if an absolute packet is received # after a relative packet with negative Y displacement. # # Signed-off-by: Dmitry Torokhov # Signed-off-by: Linus Torvalds # # drivers/input/mouse/alps.c # 2005/02/15 13:04:13-08:00 torvalds@ppc970.osdl.org +2 -2 # Input: fix ALPS protocol validation rules # # ChangeSet # 2005/02/15 12:59:34-08:00 torvalds@ppc970.osdl.org # Fix bogus opost buffer size check # # Noted while going through the n_tty code: that buffer check # used to check against the size of the temporary kernel buffer, # but since the tty layer was changed to use kernel buffers # though-out, the kernel buffer array became just a pointer, and # the check was limiting the opost blocksize to the size of a # pointer, which makes no sense. # # Just remove it, since now the whole buffer is always in kernel # space. # # drivers/char/n_tty.c # 2005/02/15 12:59:26-08:00 torvalds@ppc970.osdl.org +0 -2 # Fix bogus opost buffer size check # # Noted while going through the n_tty code: that buffer check # used to check against the size of the temporary kernel buffer, # but since the tty layer was changed to use kernel buffers # though-out, the kernel buffer array became just a pointer, and # the check was limiting the opost blocksize to the size of a # pointer, which makes no sense. # # Just remove it, since now the whole buffer is always in kernel # space. # # ChangeSet # 2005/02/15 11:52:29-08:00 torvalds@ppc970.osdl.org # Limit tty IO chunking to 2kB # # The NTTY code can get confused by 4kB chunks, apparently # because n_tty_receive_room() will claim to have more room # than n_tty_receive_buf() can actually accept. # # Until somebody figures out what the real n_tty_receive_room() # logic should be, let's just limit it to a safe 2kB. # # Thanks go to Andreas Schwab for finding a test-case. # # drivers/char/tty_io.c # 2005/02/15 11:52:21-08:00 torvalds@ppc970.osdl.org +6 -1 # Limit tty IO chunking to 2kB # # The NTTY code can get confused by 4kB chunks, apparently # because n_tty_receive_room() will claim to have more room # than n_tty_receive_buf() can actually accept. # # ChangeSet # 2005/02/15 09:53:23-08:00 olh@suse.de # [NET]: Fix socket.h comment typo. # # Signed-off-by: Olaf Hering # Signed-off-by: David S. Miller # # include/linux/socket.h # 2005/02/15 09:53:02-08:00 olh@suse.de +1 -1 # [NET]: Fix socket.h comment typo. # # Signed-off-by: Olaf Hering # Signed-off-by: David S. Miller # # ChangeSet # 2005/02/15 09:35:53-08:00 ahaas@airmail.net # [SPARC]:Check prom_getproperty() return value in prom_nodematch(). # # Signed-off-by: David S. Miller # # arch/sparc/prom/tree.c # 2005/02/15 09:35:23-08:00 ahaas@airmail.net +4 -1 # [SPARC]:Check prom_getproperty() return value in prom_nodematch(). # # Signed-off-by: David S. Miller # # ChangeSet # 2005/02/15 09:28:16-08:00 ralf@linux-mips.org # [NETROM/ROSE]: Use netdev_priv() # # Signed-off-by: David S. Miller # # net/rose/rose_dev.c # 2005/02/15 09:27:37-08:00 ralf@linux-mips.org +3 -3 # [NETROM/ROSE]: Use netdev_priv() # # Signed-off-by: David S. Miller # # net/netrom/nr_dev.c # 2005/02/15 09:27:37-08:00 ralf@linux-mips.org +4 -4 # [NETROM/ROSE]: Use netdev_priv() # # Signed-off-by: David S. Miller # # ChangeSet # 2005/02/15 09:12:27-08:00 krzysztof.h1@wp.pl # [SPARC32]: Need to clear PSR_EF in psr of childregs on fork() on SMP. # # Signed-off-by: David S. Miller # # arch/sparc/kernel/process.c # 2005/02/15 09:11:47-08:00 krzysztof.h1@wp.pl +5 -0 # h ### Change the comments to ChangeSet|1.2050 below # [SPARC32]: Need to clear PSR_EF in psr of childregs on fork() on SMP. # # Signed-off-by: David S. Miller # # [SPARC32]: Need to clear PSR_EF in psr of childregs on fork() on SMP. # # ChangeSet # 2005/02/15 08:49:36-08:00 davem@nuts.davemloft.net # [TG3]: Update driver version and reldate. # # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2005/02/15 08:48:54-08:00 davem@nuts.davemloft.net +2 -2 # [TG3]: Update driver version and reldate. # # ChangeSet # 2005/02/15 08:48:26-08:00 davem@nuts.davemloft.net # [TG3]: Always check tg3_readphy() return value. # # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2005/02/15 08:47:52-08:00 davem@nuts.davemloft.net +70 -54 # [TG3]: Always check tg3_readphy() return value. # # ChangeSet # 2005/02/15 08:23:00-08:00 davem@nuts.davemloft.net # [SPARC]: Fix video mode probing in atyfb driver. # # On Sparc, if the user does not specify a mode option, we # should use the PROM probed values in default_var always. # # Signed-off-by: David S. Miller # # drivers/video/aty/atyfb_base.c # 2005/02/15 08:22:09-08:00 davem@nuts.davemloft.net +9 -1 # [SPARC]: Fix video mode probing in atyfb driver. # # ChangeSet # 2005/02/15 07:41:38-08:00 davem@nuts.davemloft.net # [SPARC]: Fix cg3 fb blanking. # # cg3_blank() needs to clear the video enable register bit # to blank the screen, not set it. # # Signed-off-by: David S. Miller # # drivers/video/cg3.c # 2005/02/15 07:40:51-08:00 davem@nuts.davemloft.net +1 -1 # [SPARC]: Fix cg3 fb blanking. # # ChangeSet # 2005/02/14 14:40:27-08:00 davem@nuts.davemloft.net # [COMPAT]: TUNSETIFF needs to copy back data after ioctl. # # It is defined as a _IOW() which is erroneous, it should # have been defined as _IORW() but that cannot be changed # now without breaking all existing applications using this # ioctl. # # Signed-off-by: David S. Miller # # fs/compat_ioctl.c # 2005/02/14 14:39:23-08:00 davem@nuts.davemloft.net +5 -0 # [COMPAT]: TUNSETIFF needs to copy back data after ioctl. # # ChangeSet # 2005/02/14 14:21:09-08:00 eike-kernel@sf-tec.de # [PATCH] make ACPI_BLACKLIST_YEAR depend on ACPI_INTERPRETER # # this oneliner fixes the situation that I can enter a year to blacklist # ACPI devices even if ACPI is completely disabled. # # Signed-off-by: Rolf Eike Beer # Signed-off-by: Linus Torvalds # # drivers/acpi/Kconfig # 2005/02/12 10:58:24-08:00 eike-kernel@sf-tec.de +1 -0 # make ACPI_BLACKLIST_YEAR depend on ACPI_INTERPRETER # # ChangeSet # 2005/02/14 14:20:06-08:00 hch@lst.de # [PATCH] block new writers on frozen filesystems # # When the lockfs patches went in an important bit got lost, the call in # generic_file_write to put newly incoming writers to sleep when a filesystem # is frozen. Nathan added back the call in the now separate XFS write patch, # and the patch for the generic code is below: # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/filemap.c # 2005/02/14 10:31:41-08:00 hch@lst.de +2 -0 # block new writers on frozen filesystems # # ChangeSet # 2005/02/14 14:19:53-08:00 minyard@acm.org # [PATCH] IPMI: Fix LAN bridging # # The size of LAN bridged messages was not being returned properly from the # function that calculated address sizes. # # Signed-off-by: Corey Minyard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/ipmi/ipmi_msghandler.c # 2005/02/14 10:31:41-08:00 minyard@acm.org +3 -0 # IPMI: Fix LAN bridging # # ChangeSet # 2005/02/14 14:19:40-08:00 olh@suse.de # [PATCH] ppc64: remove extra whitespace before preprocessor token # # unifdef complains about the space before #ifndef. # # Signed-off-by: Olaf Hering # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/io.h # 2005/02/14 10:31:40-08:00 olh@suse.de +1 -1 # ppc64: remove extra whitespace before preprocessor token # # ChangeSet # 2005/02/14 14:19:26-08:00 herbert@gondor.apana.org.au # [PATCH] ISDN locking fix # # isdn_net_get_locked_lp is doing a local_bh_enable with hard IRQs disabled. # This is not allowed. # # The following patch fixes the problem by removing the unnecessary # local_bh_enable while the hard IRQs are disabled. # # Signed-off-by: Herbert Xu # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/isdn/i4l/isdn_net.h # 2005/02/14 10:31:40-08:00 herbert@gondor.apana.org.au +4 -3 # ISDN locking fix # # ChangeSet # 2005/02/14 18:09:02+00:00 rmk@flint.arm.linux.org.uk # [ARM] Fix sparse warnings for Integrator builds. # # Add some missing __iomem annotations for Integrator machines. # # Signed-off-by: Russell King # # drivers/input/serio/ambakmi.c # 2005/02/14 18:03:31+00:00 rmk@flint.arm.linux.org.uk +1 -1 # Add sparse __iomem annotations. # # arch/arm/mach-integrator/time.c # 2005/02/14 18:03:31+00:00 rmk@flint.arm.linux.org.uk +4 -4 # Add sparse __iomem annotations. # Use "dev" rather than "rtc_base" for the device id when requesting # the RTC interrupt. # # arch/arm/mach-integrator/impd1.c # 2005/02/14 18:03:31+00:00 rmk@flint.arm.linux.org.uk +1 -1 # Add sparse __iomem annotations. # # ChangeSet # 2005/02/14 17:32:31+00:00 rmk@flint.arm.linux.org.uk # [ARM] Fix SA1111 and PXA iomem sparse warnings. # # This adds some missing annotations found by making the raw IO # operations check their pointer type. # # Signed-off-by: Russell King # # include/asm-arm/hardware/sa1111.h # 2005/02/14 17:26:50+00:00 rmk@flint.arm.linux.org.uk +3 -3 # Add sparse __iomem annotations. # Use __raw_{read,write}l() rather than our own cast. # # drivers/pcmcia/soc_common.h # 2005/02/14 17:26:50+00:00 rmk@flint.arm.linux.org.uk +1 -1 # Add sparse __iomem annotations. # # drivers/pcmcia/soc_common.c # 2005/02/14 17:26:50+00:00 rmk@flint.arm.linux.org.uk +2 -2 # Use skt->socket.io_offset rather than skt->virt_io - they're # essentially the same. # # drivers/mmc/pxamci.c # 2005/02/14 17:26:50+00:00 rmk@flint.arm.linux.org.uk +1 -1 # Add sparse __iomem annotations. # # drivers/input/serio/sa1111ps2.c # 2005/02/14 17:26:49+00:00 rmk@flint.arm.linux.org.uk +2 -2 # Add sparse __iomem annotations. # # arch/arm/common/sa1111.c # 2005/02/14 17:26:49+00:00 rmk@flint.arm.linux.org.uk +23 -22 # Add sparse __iomem annotations. # # ChangeSet # 2005/02/14 16:59:51+00:00 rmk@flint.arm.linux.org.uk # [ARM] Add missing __user annotations to sys_clone() # # Signed-off-by: Russell King # # arch/arm/kernel/sys_arm.c # 2005/02/14 16:55:24+00:00 rmk@flint.arm.linux.org.uk +2 -2 # Appropriately annotate sys_clone() with __user # # ChangeSet # 2005/02/14 16:05:37+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2481/1: IXP2000 - replace sti/cli with local_irq{save,restore} # # Patch from Ben Dooks # # Fix the following: # arch/arm/mach-ixp2000/pci.c:148: warning: `cli' is deprecated (declared at include/linux/interrupt.h:65) # arch/arm/mach-ixp2000/pci.c:161: warning: `sti' is deprecated (declared at include/linux/interrupt.h:69) # arch/arm/mach-ixp2000/pci.c:178: warning: `cli' is deprecated (declared at include/linux/interrupt.h:65) # arch/arm/mach-ixp2000/pci.c:191: warning: `sti' is deprecated (declared at include/linux/interrupt.h:69) # By replacing cli() wht local_irq_save() and sti() with local_irq_restore(). # This patch has not been tested. # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # arch/arm/mach-ixp2000/pci.c # 2005/02/14 00:22:28+00:00 ben-linux@org.rmk.(none) +6 -4 # [PATCH] 2481/1: IXP2000 - replace sti/cli with local_irq{save,restore} # # ChangeSet # 2005/02/14 15:58:47+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2480/1: IXP4XX - cleanup resource for i2c controller # # Patch from Ben Dooks # # Fix the following: # arch/arm/mach-ixp4xx/common.c:305: warning: initialization from incompatible pointer type # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # arch/arm/mach-ixp4xx/common.c # 2005/02/14 00:17:08+00:00 ben-linux@org.rmk.(none) +1 -1 # [PATCH] 2480/1: IXP4XX - cleanup resource for i2c controller # # ChangeSet # 2005/02/13 20:33:48+00:00 tglx@de.rmk.(none) # [ARM PATCH] 2478/1: Remove NULL initializers # # Patch from Thomas Gleixner # # Remove NULL initializers of static variables. # # Signed-off-by: Thomas Gleixner # Signed-off-by: Russell King # # arch/arm/mach-shark/irq.c # 2005/02/13 00:00:00+00:00 tglx@de.rmk.(none) +0 -3 # [PATCH] 2478/1: Remove NULL initializers # # ChangeSet # 2005/02/13 20:09:13+00:00 tglx@de.rmk.(none) # [ARM PATCH] 2476/1: Fix compile for shannon # # Patch from Thomas Gleixner # # Trivial build fix for shannon platform # # Signed-off-by: Thomas Gleixner # Signed-off-by: Russell King # # arch/arm/mach-sa1100/shannon.c # 2005/02/13 00:00:00+00:00 tglx@de.rmk.(none) +4 -2 # [PATCH] 2476/1: Fix compile for shannon # # ChangeSet # 2005/02/13 20:02:48+00:00 tglx@de.rmk.(none) # [ARM PATCH] 2474/1: Fix compile for badge4 # # Patch from Thomas Gleixner # # Trivial build fix for badge4 platform # # Signed-off-by: Thomas Gleixner # Signed-off-by: Russell King # # arch/arm/mach-sa1100/badge4.c # 2005/02/13 00:00:00+00:00 tglx@de.rmk.(none) +2 -3 # [PATCH] 2474/1: Fix compile for badge4 # # ChangeSet # 2005/02/13 11:07:36-08:00 torvalds@ppc970.osdl.org # Eicon driver: remove ^M for real this time. # # Really. # # drivers/isdn/hardware/eicon/xdi_vers.h # 2005/02/13 11:06:46-08:00 torvalds@ppc970.osdl.org +26 -25 # Remove newlines # # ChangeSet # 2005/02/13 10:14:10-08:00 arjan@infradead.org # [PATCH] Allow heap to be marked executable too # # This makes it possible to mark binaries to have both an executable stack # and heap, allowing for a NX system to disable NX on a per-binary level. # # Signed-off-by: Arjan van de Ven # Signed-off-by: Linus Torvalds # # include/asm-x86_64/elf.h # 2005/02/06 03:31:39-08:00 arjan@infradead.org +1 -8 # Allow heap to be marked executable too # # include/asm-ia64/elf.h # 2005/02/06 03:32:47-08:00 arjan@infradead.org +2 -2 # Allow heap to be marked executable too # # include/asm-i386/elf.h # 2005/02/06 03:29:55-08:00 arjan@infradead.org +1 -1 # Allow heap to be marked executable too # # fs/binfmt_elf.c # 2005/02/06 03:29:02-08:00 arjan@infradead.org +1 -1 # Allow heap to be marked executable too # # ChangeSet # 2005/02/13 12:53:23-05:00 mporter@kernel.crashing.org # [PATCH] emac: fix mdio delay # # Fixes MDIO delay. Please apply. # # Signed-off-by: Ralph Siemsen # Signed-off-by: Matt Porter # Signed-off-by: Jeff Garzik # # drivers/net/ibm_emac/ibm_emac_core.c # 2005/01/20 15:25:10-05:00 mporter@kernel.crashing.org +3 -2 # emac: fix mdio delay # # ChangeSet # 2005/02/13 12:53:11-05:00 mporter@kernel.crashing.org # [PATCH] emac: fix jumbo frame support # # Fixes a bug in RX buffer allocation so that jumbo size skbs are # allocated when the MTU size is changed. Also removes the deprecated # restore_flags() call. Please apply. # # Signed-off-by: Matt Porter # Signed-off-by: Jeff Garzik # # drivers/net/ibm_emac/ibm_emac_core.h # 2005/02/09 00:24:52-05:00 mporter@kernel.crashing.org +0 -2 # emac: fix jumbo frame support # # drivers/net/ibm_emac/ibm_emac_core.c # 2005/02/09 00:25:39-05:00 mporter@kernel.crashing.org +1 -2 # emac: fix jumbo frame support # # ChangeSet # 2005/02/12 20:23:28-08:00 benh@kernel.crashing.org # [PATCH] radeonfb: typos fixes # # The dynamic clock code in radeonfb comes almost as-is from X.org (where # it was contributed by ATI). It has a few typos (wrong register access # macros) that this patch fixes. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # drivers/video/aty/radeon_pm.c # 2005/02/12 20:01:11-08:00 benh@kernel.crashing.org +2 -2 # radeonfb: typos fixes # # ChangeSet # 2005/02/12 20:23:14-08:00 joe.korty@ccur.com # [PATCH] memset argument order misuses # # A simple 'grep memset.*\<0);' shows argument order errors in several # uses of memset. # # This grep was inspired by Al Viro's recent patch, megaraid_mbox fix, # which fixed this problem in the megaraid driver. # # drivers/s390/cio/css.c # 2005/02/12 18:56:20-08:00 joe.korty@ccur.com +1 -1 # memset argument order misuses # # drivers/s390/cio/cmf.c # 2005/02/12 18:56:08-08:00 joe.korty@ccur.com +2 -2 # memset argument order misuses # # drivers/s390/block/dasd_genhd.c # 2005/02/12 18:55:49-08:00 joe.korty@ccur.com +2 -2 # memset argument order misuses # # ChangeSet # 2005/02/11 17:09:07-05:00 bjorn-helgaas@comcast.net # [PATCH] de214x.c uses uninitialized pci_dev->irq # # Don't use pci_dev->irq until after pci_enable_device(). # Andy Esten reported that his NIC stopped working in # 2.6.10 because of this problem. # # Signed-off-by: Bjorn Helgaas # Signed-off-by: Jeff Garzik # # drivers/net/tulip/de2104x.c # 2005/02/07 11:51:57-05:00 bjorn-helgaas@comcast.net +2 -2 # de214x.c uses uninitialized pci_dev->irq # # ChangeSet # 2005/02/11 11:12:42+11:00 nathans@sgi.com # [XFS] Fix problems with synchronous writes returning EAGAIN incorrectly # for pinned inodes. # # SGI-PV: 930364 # SGI-Modid: xfs-linux-melb:xfs-kern:21460a # Signed-off-by: Nathan Scott # # fs/xfs/xfs_vnodeops.c # 2005/02/11 11:12:08+11:00 nathans@sgi.com +9 -9 # [XFS] Fix problems with synchronous writes returning EAGAIN incorrectly # for pinned inodes. # # fs/xfs/linux-2.6/xfs_super.c # 2005/02/11 11:12:08+11:00 nathans@sgi.com +6 -0 # [XFS] Fix problems with synchronous writes returning EAGAIN incorrectly # for pinned inodes. # # fs/xfs/linux-2.6/xfs_lrw.c # 2005/02/11 11:12:08+11:00 nathans@sgi.com +2 -2 # [XFS] Fix problems with synchronous writes returning EAGAIN incorrectly # for pinned inodes. # # ChangeSet # 2005/02/07 10:57:23+11:00 nathans@sgi.com # [XFS] Prevent releasepage from releasing pages early, while they still # have delayed allocate buffers. Affects filesystem blocksizes smaller # than the pagesize only. # # SGI-PV: 929309 # SGI-Modid: xfs-linux-melb:xfs-kern:21409a # Signed-off-by: Nathan Scott # # fs/xfs/linux-2.6/xfs_aops.c # 2005/02/07 10:56:54+11:00 nathans@sgi.com +19 -17 # [XFS] Prevent releasepage from releasing pages early, while they still # have delayed allocate buffers. Affects filesystem blocksizes smaller # than the pagesize only. # # ChangeSet # 2005/02/07 10:04:19+11:00 nathans@sgi.com # [XFS] Reinstate missing frozen check on write, fixes snapshots and # xfs_freeze. # # SGI-PV: 925910 # SGI-Modid: xfs-linux-melb:xfs-kern:21407a # Signed-off-by: Nathan Scott # # fs/xfs/linux-2.6/xfs_lrw.c # 2005/02/07 10:03:45+11:00 nathans@sgi.com +2 -0 # [XFS] Reinstate missing frozen check on write, fixes snapshots and # xfs_freeze. # # ChangeSet # 2005/01/27 15:58:59-05:00 romieu@fr.zoreil.com # [PATCH] dscc4: removal of unneeded variable # # Removal of unneeded variable and more spaces for my eyes. # # Signed-off-by: Francois Romieu # Signed-off-by: Jeff Garzik # # drivers/net/wan/dscc4.c # 2005/01/13 18:55:23-05:00 romieu@fr.zoreil.com +2 -5 # dscc4: removal of unneeded variable # # ChangeSet # 2005/01/27 15:58:47-05:00 romieu@fr.zoreil.com # [PATCH] dscc4: removal of unneeded casts # # Removal of unneeded casts. # # Signed-off-by: Francois Romieu # Signed-off-by: Jeff Garzik # # drivers/net/wan/dscc4.c # 2005/01/13 18:54:54-05:00 romieu@fr.zoreil.com +3 -4 # dscc4: removal of unneeded casts # # ChangeSet # 2005/01/27 15:58:36-05:00 romieu@fr.zoreil.com # [PATCH] dscc4: error status checking and pci janitoring # # Error status checking and PCI janitoring # - propagation of the error code; # - pci_request_region use in dscc4_init_one; # - missing pci_disable_device() added to the error path; # # Signed-off-by: Francois Romieu # Signed-off-by: Jeff Garzik # # drivers/net/wan/dscc4.c # 2005/01/13 18:54:49-05:00 romieu@fr.zoreil.com +45 -35 # dscc4: error status checking and pci janitoring # # ChangeSet # 2005/01/27 15:58:21-05:00 romieu@fr.zoreil.com # [PATCH] dscc4: code factorisation # # Small code factorization. # # Signed-off-by: Francois Romieu # Signed-off-by: Jeff Garzik # # drivers/net/wan/dscc4.c # 2005/01/13 18:54:44-05:00 romieu@fr.zoreil.com +6 -9 # dscc4: code factorisation # # ChangeSet # 2005/01/27 15:58:04-05:00 romieu@fr.zoreil.com # [PATCH] dscc4: use of uncompletely initialized struct # # dscc4_set_quartz() is issued with an argument in an unitialized state and # the kernel does not like it. # # Signed-off-by: Francois Romieu # Signed-off-by: Jeff Garzik # # drivers/net/wan/dscc4.c # 2005/01/13 18:06:02-05:00 romieu@fr.zoreil.com +6 -4 # dscc4: use of uncompletely initialized struct # diff -Nru a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c --- a/arch/alpha/kernel/setup.c 2005-02-22 20:30:43 -08:00 +++ b/arch/alpha/kernel/setup.c 2005-02-22 20:30:43 -08:00 @@ -213,14 +213,14 @@ reserve_std_resources(void) { static struct resource standard_io_resources[] = { - { "rtc", -1, -1 }, - { "dma1", 0x00, 0x1f }, - { "pic1", 0x20, 0x3f }, - { "timer", 0x40, 0x5f }, - { "keyboard", 0x60, 0x6f }, - { "dma page reg", 0x80, 0x8f }, - { "pic2", 0xa0, 0xbf }, - { "dma2", 0xc0, 0xdf }, + { .name = "rtc", .start = -1, .end = -1 }, + { .name = "dma1", .start = 0x00, .end = 0x1f }, + { .name = "pic1", .start = 0x20, .end = 0x3f }, + { .name = "timer", .start = 0x40, .end = 0x5f }, + { .name = "keyboard", .start = 0x60, .end = 0x6f }, + { .name = "dma page reg", .start = 0x80, .end = 0x8f }, + { .name = "pic2", .start = 0xa0, .end = 0xbf }, + { .name = "dma2", .start = 0xc0, .end = 0xdf }, }; struct resource *io = &ioport_resource; diff -Nru a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c --- a/arch/arm/common/sa1111.c 2005-02-22 20:30:44 -08:00 +++ b/arch/arm/common/sa1111.c 2005-02-22 20:30:44 -08:00 @@ -53,7 +53,7 @@ unsigned long phys; int irq; spinlock_t lock; - void *base; + void __iomem *base; }; /* @@ -141,15 +141,16 @@ sa1111_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) { unsigned int stat0, stat1, i; + void __iomem *base = desc->data; - stat0 = sa1111_readl(desc->data + SA1111_INTSTATCLR0); - stat1 = sa1111_readl(desc->data + SA1111_INTSTATCLR1); + stat0 = sa1111_readl(base + SA1111_INTSTATCLR0); + stat1 = sa1111_readl(base + SA1111_INTSTATCLR1); - sa1111_writel(stat0, desc->data + SA1111_INTSTATCLR0); + sa1111_writel(stat0, base + SA1111_INTSTATCLR0); desc->chip->ack(irq); - sa1111_writel(stat1, desc->data + SA1111_INTSTATCLR1); + sa1111_writel(stat1, base + SA1111_INTSTATCLR1); if (stat0 == 0 && stat1 == 0) { do_bad_IRQ(irq, desc, regs); @@ -177,7 +178,7 @@ static void sa1111_mask_lowirq(unsigned int irq) { - void *mapbase = get_irq_chipdata(irq); + void __iomem *mapbase = get_irq_chipdata(irq); unsigned long ie0; ie0 = sa1111_readl(mapbase + SA1111_INTEN0); @@ -187,7 +188,7 @@ static void sa1111_unmask_lowirq(unsigned int irq) { - void *mapbase = get_irq_chipdata(irq); + void __iomem *mapbase = get_irq_chipdata(irq); unsigned long ie0; ie0 = sa1111_readl(mapbase + SA1111_INTEN0); @@ -205,7 +206,7 @@ static int sa1111_retrigger_lowirq(unsigned int irq) { unsigned int mask = SA1111_IRQMASK_LO(irq); - void *mapbase = get_irq_chipdata(irq); + void __iomem *mapbase = get_irq_chipdata(irq); unsigned long ip0; int i; @@ -226,7 +227,7 @@ static int sa1111_type_lowirq(unsigned int irq, unsigned int flags) { unsigned int mask = SA1111_IRQMASK_LO(irq); - void *mapbase = get_irq_chipdata(irq); + void __iomem *mapbase = get_irq_chipdata(irq); unsigned long ip0; if (flags == IRQT_PROBE) @@ -249,7 +250,7 @@ static int sa1111_wake_lowirq(unsigned int irq, unsigned int on) { unsigned int mask = SA1111_IRQMASK_LO(irq); - void *mapbase = get_irq_chipdata(irq); + void __iomem *mapbase = get_irq_chipdata(irq); unsigned long we0; we0 = sa1111_readl(mapbase + SA1111_WAKEEN0); @@ -273,7 +274,7 @@ static void sa1111_mask_highirq(unsigned int irq) { - void *mapbase = get_irq_chipdata(irq); + void __iomem *mapbase = get_irq_chipdata(irq); unsigned long ie1; ie1 = sa1111_readl(mapbase + SA1111_INTEN1); @@ -283,7 +284,7 @@ static void sa1111_unmask_highirq(unsigned int irq) { - void *mapbase = get_irq_chipdata(irq); + void __iomem *mapbase = get_irq_chipdata(irq); unsigned long ie1; ie1 = sa1111_readl(mapbase + SA1111_INTEN1); @@ -301,7 +302,7 @@ static int sa1111_retrigger_highirq(unsigned int irq) { unsigned int mask = SA1111_IRQMASK_HI(irq); - void *mapbase = get_irq_chipdata(irq); + void __iomem *mapbase = get_irq_chipdata(irq); unsigned long ip1; int i; @@ -322,7 +323,7 @@ static int sa1111_type_highirq(unsigned int irq, unsigned int flags) { unsigned int mask = SA1111_IRQMASK_HI(irq); - void *mapbase = get_irq_chipdata(irq); + void __iomem *mapbase = get_irq_chipdata(irq); unsigned long ip1; if (flags == IRQT_PROBE) @@ -345,7 +346,7 @@ static int sa1111_wake_highirq(unsigned int irq, unsigned int on) { unsigned int mask = SA1111_IRQMASK_HI(irq); - void *mapbase = get_irq_chipdata(irq); + void __iomem *mapbase = get_irq_chipdata(irq); unsigned long we1; we1 = sa1111_readl(mapbase + SA1111_WAKEEN1); @@ -369,7 +370,7 @@ static void sa1111_setup_irq(struct sa1111 *sachip) { - void *irqbase = sachip->base + SA1111_INTC; + void __iomem *irqbase = sachip->base + SA1111_INTC; unsigned int irq; /* @@ -723,7 +724,7 @@ static void __sa1111_remove(struct sa1111 *sachip) { struct list_head *l, *n; - void *irqbase = sachip->base + SA1111_INTC; + void __iomem *irqbase = sachip->base + SA1111_INTC; list_for_each_safe(l, n, &sachip->dev->children) { struct device *d = list_to_dev(l); @@ -805,7 +806,7 @@ struct sa1111_save_data *save; unsigned long flags; unsigned int val; - char *base; + void __iomem *base; if (level != SUSPEND_DISABLE) return 0; @@ -866,7 +867,7 @@ struct sa1111 *sachip = dev_get_drvdata(dev); struct sa1111_save_data *save; unsigned long flags, id; - char *base; + void __iomem *base; if (level != RESUME_ENABLE) return 0; @@ -1094,7 +1095,7 @@ struct sa1111 *sachip = sa1111_chip_driver(sadev); unsigned long flags; unsigned int val; - void *gpio = sachip->base + SA1111_GPIO; + void __iomem *gpio = sachip->base + SA1111_GPIO; #define MODIFY_BITS(port, mask, dir) \ if (mask) { \ @@ -1120,7 +1121,7 @@ struct sa1111 *sachip = sa1111_chip_driver(sadev); unsigned long flags; unsigned int val; - void *gpio = sachip->base + SA1111_GPIO; + void __iomem *gpio = sachip->base + SA1111_GPIO; spin_lock_irqsave(&sachip->lock, flags); MODIFY_BITS(gpio + SA1111_GPIO_PADWR, bits & 15, v); @@ -1134,7 +1135,7 @@ struct sa1111 *sachip = sa1111_chip_driver(sadev); unsigned long flags; unsigned int val; - void *gpio = sachip->base + SA1111_GPIO; + void __iomem *gpio = sachip->base + SA1111_GPIO; spin_lock_irqsave(&sachip->lock, flags); MODIFY_BITS(gpio + SA1111_GPIO_PASSR, bits & 15, v); diff -Nru a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S --- a/arch/arm/kernel/debug.S 2005-02-22 20:30:43 -08:00 +++ b/arch/arm/kernel/debug.S 2005-02-22 20:30:43 -08:00 @@ -1,5 +1,5 @@ /* - * linux/arch/arm/kernel/debug-armv.S + * linux/arch/arm/kernel/debug.S * * Copyright (C) 1994-1999 Russell King * diff -Nru a/arch/arm/kernel/sys_arm.c b/arch/arm/kernel/sys_arm.c --- a/arch/arm/kernel/sys_arm.c 2005-02-22 20:30:43 -08:00 +++ b/arch/arm/kernel/sys_arm.c 2005-02-22 20:30:43 -08:00 @@ -242,8 +242,8 @@ * This is called indirectly via a small wrapper */ asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, - int *parent_tidptr, int tls_val, int *child_tidptr, - struct pt_regs *regs) + int __user *parent_tidptr, int tls_val, + int __user *child_tidptr, struct pt_regs *regs) { if (!newsp) newsp = regs->ARM_sp; diff -Nru a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c --- a/arch/arm/mach-integrator/impd1.c 2005-02-22 20:30:43 -08:00 +++ b/arch/arm/mach-integrator/impd1.c 2005-02-22 20:30:43 -08:00 @@ -35,7 +35,7 @@ MODULE_PARM_DESC(lmid, "logic module stack position"); struct impd1_module { - void *base; + void __iomem *base; struct clk vcos[2]; }; diff -Nru a/arch/arm/mach-integrator/time.c b/arch/arm/mach-integrator/time.c --- a/arch/arm/mach-integrator/time.c 2005-02-22 20:30:43 -08:00 +++ b/arch/arm/mach-integrator/time.c 2005-02-22 20:30:43 -08:00 @@ -32,7 +32,7 @@ #define RTC_CR_MIE (1 << 0) extern int (*set_rtc)(void); -static void *rtc_base; +static void __iomem *rtc_base; static int integrator_set_rtc(void) { @@ -118,7 +118,7 @@ xtime.tv_sec = __raw_readl(rtc_base + RTC_DR); ret = request_irq(dev->irq[0], rtc_interrupt, SA_INTERRUPT, - "rtc-pl030", rtc_base); + "rtc-pl030", dev); if (ret) goto map_out; @@ -130,7 +130,7 @@ return 0; irq_out: - free_irq(dev->irq[0], rtc_base); + free_irq(dev->irq[0], dev); map_out: iounmap(rtc_base); rtc_base = NULL; @@ -146,7 +146,7 @@ writel(0, rtc_base + RTC_CR); - free_irq(dev->irq[0], rtc_base); + free_irq(dev->irq[0], dev); unregister_rtc(&rtc_ops); iounmap(rtc_base); diff -Nru a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c --- a/arch/arm/mach-ixp2000/core.c 2005-02-22 20:30:44 -08:00 +++ b/arch/arm/mach-ixp2000/core.c 2005-02-22 20:30:44 -08:00 @@ -160,6 +160,9 @@ iotable_init(ixp2000_small_io_desc, ARRAY_SIZE(ixp2000_small_io_desc)); iotable_init(ixp2000_large_io_desc, ARRAY_SIZE(ixp2000_large_io_desc)); early_serial_setup(&ixp2000_serial_port); + + /* Set slowport to 8-bit mode. */ + ixp2000_reg_write(IXP2000_SLOWPORT_FRM, 1); } /************************************************************************* diff -Nru a/arch/arm/mach-ixp2000/enp2611.c b/arch/arm/mach-ixp2000/enp2611.c --- a/arch/arm/mach-ixp2000/enp2611.c 2005-02-22 20:30:43 -08:00 +++ b/arch/arm/mach-ixp2000/enp2611.c 2005-02-22 20:30:43 -08:00 @@ -124,20 +124,28 @@ { int irq; - if (dev->bus->number == 0x00 && PCI_SLOT(dev->devfn) == 0x01) { + if (dev->bus->number == 0 && PCI_SLOT(dev->devfn) == 0) { + /* IXP2400. */ + irq = IRQ_IXP2000_PCIA; + } else if (dev->bus->number == 0 && PCI_SLOT(dev->devfn) == 1) { /* 21555 non-transparent bridge. */ irq = IRQ_IXP2000_PCIB; - } else if (dev->bus->number == 0x01 && PCI_SLOT(dev->devfn) == 0x00) { + } else if (dev->bus->number == 0 && PCI_SLOT(dev->devfn) == 4) { + /* PCI2050B transparent bridge. */ + irq = -1; + } else if (dev->bus->number == 1 && PCI_SLOT(dev->devfn) == 0) { /* 82559 ethernet. */ irq = IRQ_IXP2000_PCIA; + } else if (dev->bus->number == 1 && PCI_SLOT(dev->devfn) == 1) { + /* SPI-3 option board. */ + irq = IRQ_IXP2000_PCIB; } else { - printk(KERN_INFO "enp2611_pci_map_irq for unknown device\n"); - irq = IRQ_IXP2000_PCI; + printk(KERN_ERR "enp2611_pci_map_irq() called for unknown " + "device PCI:%d:%d:%d\n", dev->bus->number, + PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)); + irq = -1; } - printk(KERN_INFO "Assigned IRQ %d to PCI:%d:%d:%d\n", irq, - dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)); - return irq; } @@ -151,7 +159,9 @@ int __init enp2611_pci_init(void) { - pci_common_init(&enp2611_pci); + if (machine_is_enp2611()) + pci_common_init(&enp2611_pci); + return 0; } diff -Nru a/arch/arm/mach-ixp2000/ixdp2x00.c b/arch/arm/mach-ixp2000/ixdp2x00.c --- a/arch/arm/mach-ixp2000/ixdp2x00.c 2005-02-22 20:30:43 -08:00 +++ b/arch/arm/mach-ixp2000/ixdp2x00.c 2005-02-22 20:30:43 -08:00 @@ -91,7 +91,7 @@ unsigned long dummy; static struct slowport_cfg old_cfg; -#ifdef CONFGI_ARCH_IXDP2400 +#ifdef CONFIG_ARCH_IXDP2400 if (machine_is_ixdp2400()) ixp2000_acquire_slowport(&slowport_cpld_cfg, &old_cfg); #endif diff -Nru a/arch/arm/mach-ixp2000/pci.c b/arch/arm/mach-ixp2000/pci.c --- a/arch/arm/mach-ixp2000/pci.c 2005-02-22 20:30:44 -08:00 +++ b/arch/arm/mach-ixp2000/pci.c 2005-02-22 20:30:44 -08:00 @@ -142,10 +142,11 @@ { volatile u32 temp; + unsigned long flags; pci_master_aborts = 1; - cli(); + local_irq_save(flags); temp = *(IXP2000_PCI_CONTROL); if (temp & ((1 << 8) | (1 << 5))) { ixp2000_reg_write(IXP2000_PCI_CONTROL, temp); @@ -158,7 +159,7 @@ temp = *(IXP2000_PCI_CMDSTAT); } } - sti(); + local_irq_restore(flags); /* * If it was an imprecise abort, then we need to correct the @@ -174,8 +175,9 @@ clear_master_aborts(void) { volatile u32 temp; + unsigned long flags; - cli(); + local_irq_save(flags); temp = *(IXP2000_PCI_CONTROL); if (temp & ((1 << 8) | (1 << 5))) { ixp2000_reg_write(IXP2000_PCI_CONTROL, temp); @@ -188,7 +190,7 @@ temp = *(IXP2000_PCI_CMDSTAT); } } - sti(); + local_irq_restore(flags); return 0; } diff -Nru a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c --- a/arch/arm/mach-ixp4xx/common.c 2005-02-22 20:30:43 -08:00 +++ b/arch/arm/mach-ixp4xx/common.c 2005-02-22 20:30:43 -08:00 @@ -301,7 +301,7 @@ .name = "IOP3xx-I2C", .id = 0, .num_resources = 2, - .resource = &ixp46x_i2c_resources + .resource = ixp46x_i2c_resources }; static struct platform_device *ixp46x_devices[] __initdata = { diff -Nru a/arch/arm/mach-sa1100/badge4.c b/arch/arm/mach-sa1100/badge4.c --- a/arch/arm/mach-sa1100/badge4.c 2005-02-22 20:30:43 -08:00 +++ b/arch/arm/mach-sa1100/badge4.c 2005-02-22 20:30:43 -08:00 @@ -57,7 +57,7 @@ .name = "sa1111", .id = 0, .dev = { - .dma_mask = &sa1111_dmamask; + .dma_mask = &sa1111_dmamask, .coherent_dma_mask = 0xffffffff, }, .num_resources = ARRAY_SIZE(sa1111_resources), @@ -212,8 +212,7 @@ /* maybe turn on 5v0 from the start */ badge4_set_5V(BADGE4_5V_INITIALLY, five_v_on); - sa11x0_set_flash_data(badge4_flash_data, badge4_flash_resources, - ARRAY_SIZE(badge4_flash_resources); + sa11x0_set_flash_data(&badge4_flash_data, &badge4_flash_resource, 1); return 0; } diff -Nru a/arch/arm/mach-sa1100/shannon.c b/arch/arm/mach-sa1100/shannon.c --- a/arch/arm/mach-sa1100/shannon.c 2005-02-22 20:30:44 -08:00 +++ b/arch/arm/mach-sa1100/shannon.c 2005-02-22 20:30:44 -08:00 @@ -2,15 +2,17 @@ * linux/arch/arm/mach-sa1100/shannon.c */ +#include #include +#include #include #include #include #include #include +#include #include -#include #include #include @@ -52,7 +54,7 @@ static void __init shannon_init(void) { - sa11x0_set_flash_data(&shannon_flash_data, shannon_flash_resource, 1); + sa11x0_set_flash_data(&shannon_flash_data, &shannon_flash_resource, 1); } static void __init shannon_map_io(void) diff -Nru a/arch/arm/mach-shark/irq.c b/arch/arm/mach-shark/irq.c --- a/arch/arm/mach-shark/irq.c 2005-02-22 20:30:44 -08:00 +++ b/arch/arm/mach-shark/irq.c 2005-02-22 20:30:44 -08:00 @@ -103,10 +103,7 @@ //request_region(0xA0,0x2,"pic2"); cascade.handler = bogus_int; - cascade.flags = 0; cascade.name = "cascade"; - cascade.next = NULL; - cascade.dev_id = NULL; setup_irq(2,&cascade); } diff -Nru a/arch/arm/mm/consistent.c b/arch/arm/mm/consistent.c --- a/arch/arm/mm/consistent.c 2005-02-22 20:30:44 -08:00 +++ b/arch/arm/mm/consistent.c 2005-02-22 20:30:44 -08:00 @@ -284,13 +284,15 @@ spin_unlock_irqrestore(&consistent_lock, flags); if (c) { + unsigned long off = vma->vm_pgoff; + kern_size = (c->vm_end - c->vm_start) >> PAGE_SHIFT; - if (vma->vm_pgoff < kern_size && - user_size <= (kern_size - vma->vm_pgoff)) { + if (off < kern_size && + user_size <= (kern_size - off)) { vma->vm_flags |= VM_RESERVED; ret = remap_pfn_range(vma, vma->vm_start, - page_to_pfn(c->vm_pages), + page_to_pfn(c->vm_pages) + off, user_size, vma->vm_page_prot); } } diff -Nru a/arch/i386/kernel/mca.c b/arch/i386/kernel/mca.c --- a/arch/i386/kernel/mca.c 2005-02-22 20:30:44 -08:00 +++ b/arch/i386/kernel/mca.c 2005-02-22 20:30:44 -08:00 @@ -123,13 +123,13 @@ /*--------------------------------------------------------------------*/ static struct resource mca_standard_resources[] = { - { "system control port B (MCA)", 0x60, 0x60 }, - { "arbitration (MCA)", 0x90, 0x90 }, - { "card Select Feedback (MCA)", 0x91, 0x91 }, - { "system Control port A (MCA)", 0x92, 0x92 }, - { "system board setup (MCA)", 0x94, 0x94 }, - { "POS (MCA)", 0x96, 0x97 }, - { "POS (MCA)", 0x100, 0x107 } + { .start = 0x60, .end = 0x60, .name = "system control port B (MCA)" }, + { .start = 0x90, .end = 0x90, .name = "arbitration (MCA)" }, + { .start = 0x91, .end = 0x91, .name = "card Select Feedback (MCA)" }, + { .start = 0x92, .end = 0x92, .name = "system Control port A (MCA)" }, + { .start = 0x94, .end = 0x94, .name = "system board setup (MCA)" }, + { .start = 0x96, .end = 0x97, .name = "POS (MCA)" }, + { .start = 0x100, .end = 0x107, .name = "POS (MCA)" } }; #define MCA_STANDARD_RESOURCES (sizeof(mca_standard_resources)/sizeof(struct resource)) diff -Nru a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c --- a/arch/i386/kernel/setup.c 2005-02-22 20:30:43 -08:00 +++ b/arch/i386/kernel/setup.c 2005-02-22 20:30:43 -08:00 @@ -1166,9 +1166,10 @@ /* * Request address space for all standard resources */ -static void __init register_memory(unsigned long max_low_pfn) +static void __init register_memory(void) { - unsigned long low_mem_size; + unsigned long gapstart, gapsize; + unsigned long long last; int i; if (efi_enabled) @@ -1183,10 +1184,46 @@ for (i = 0; i < STANDARD_IO_RESOURCES; i++) request_resource(&ioport_resource, &standard_io_resources[i]); - /* Tell the PCI layer not to allocate too close to the RAM area.. */ - low_mem_size = ((max_low_pfn << PAGE_SHIFT) + 0xfffff) & ~0xfffff; - if (low_mem_size > pci_mem_start) - pci_mem_start = low_mem_size; + /* + * Search for the bigest gap in the low 32 bits of the e820 + * memory space. + */ + last = 0x100000000ull; + gapstart = 0x10000000; + gapsize = 0x400000; + i = e820.nr_map; + while (--i >= 0) { + unsigned long long start = e820.map[i].addr; + unsigned long long end = start + e820.map[i].size; + + /* + * Since "last" is at most 4GB, we know we'll + * fit in 32 bits if this condition is true + */ + if (last > end) { + unsigned long gap = last - end; + + if (gap > gapsize) { + gapsize = gap; + gapstart = end; + } + } + if (start < last) + last = start; + } + + /* + * Start allocating dynamic PCI memory a bit into the gap, + * aligned up to the nearest megabyte. + * + * Question: should we try to pad it up a bit (do something + * like " + (gapsize >> 3)" in there too?). We now have the + * technology. + */ + pci_mem_start = (gapstart + 0xfffff) & ~0xfffff; + + printk("Allocating PCI resources starting at %08lx (gap: %08lx:%08lx)\n", + pci_mem_start, gapstart, gapsize); } /* Use inline assembly to define this because the nops are defined @@ -1432,7 +1469,7 @@ get_smp_config(); #endif - register_memory(max_low_pfn); + register_memory(); #ifdef CONFIG_VT #if defined(CONFIG_VGA_CONSOLE) diff -Nru a/arch/m32r/defconfig b/arch/m32r/defconfig --- a/arch/m32r/defconfig 2005-02-22 20:30:44 -08:00 +++ b/arch/m32r/defconfig 2005-02-22 20:30:44 -08:00 @@ -1,11 +1,13 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10-rc1-bk21 -# Fri Nov 12 16:08:49 2004 +# Linux kernel version: 2.6.11-rc4 +# Wed Feb 16 21:10:44 2005 # CONFIG_M32R=y -CONFIG_UID16=y +# CONFIG_UID16 is not set CONFIG_GENERIC_ISA_DMA=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y # # Code maturity level options @@ -81,6 +83,7 @@ # CONFIG_DISCONTIGMEM is not set CONFIG_RWSEM_GENERIC_SPINLOCK=y # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_PREEMPT=y # CONFIG_HAVE_DEC_LOCK is not set # CONFIG_SMP is not set @@ -96,7 +99,6 @@ # CONFIG_PCCARD=y # CONFIG_PCMCIA_DEBUG is not set -# CONFIG_PCMCIA_OBSOLETE is not set CONFIG_PCMCIA=y # @@ -146,10 +148,12 @@ # Block devices # # CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set CONFIG_BLK_DEV_NBD=y CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 # CONFIG_BLK_DEV_INITRD is not set CONFIG_INITRAMFS_SOURCE="" @@ -162,6 +166,7 @@ # CONFIG_IOSCHED_AS is not set CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set # # ATA/ATAPI/MFM/RLL support @@ -219,12 +224,12 @@ # # CONFIG_SCSI_SPI_ATTRS is not set # CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set # # SCSI low-level drivers # # CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_QLOGIC_1280_1040 is not set # CONFIG_SCSI_DEBUG is not set # @@ -396,6 +401,7 @@ # CONFIG_SERIO_I8042 is not set CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_LIBPS2 is not set # CONFIG_SERIO_RAW is not set # @@ -450,7 +456,6 @@ # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set # @@ -524,6 +529,7 @@ CONFIG_LOGO_LINUX_MONO=y CONFIG_LOGO_LINUX_VGA16=y CONFIG_LOGO_LINUX_CLUT224=y +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set # # Sound @@ -537,11 +543,25 @@ # CONFIG_USB_ARCH_HAS_OHCI is not set # +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# + +# # USB Gadget Support # # CONFIG_USB_GADGET is not set # +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# InfiniBand support +# +# CONFIG_INFINIBAND is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -558,6 +578,10 @@ # CONFIG_REISERFS_PROC_INFO is not set # CONFIG_REISERFS_FS_XATTR is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set @@ -628,7 +652,6 @@ CONFIG_ROOT_NFS=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_RPCSEC_GSS_SPKM3 is not set @@ -697,7 +720,8 @@ # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +CONFIG_DEBUG_PREEMPT=y +# CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_FRAME_POINTER is not set # @@ -710,6 +734,10 @@ # Cryptographic options # # CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# # # Library routines diff -Nru a/arch/m32r/kernel/process.c b/arch/m32r/kernel/process.c --- a/arch/m32r/kernel/process.c 2005-02-22 20:30:44 -08:00 +++ b/arch/m32r/kernel/process.c 2005-02-22 20:30:44 -08:00 @@ -1,6 +1,5 @@ /* * linux/arch/m32r/kernel/process.c - * orig : sh * * Copyright (c) 2001, 2002 Hiroyuki Kondo, Hirokazu Takata, * Hitoshi Yamamoto @@ -290,13 +289,16 @@ } asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, - unsigned long r2, unsigned long r3, unsigned long r4, unsigned long r5, - unsigned long r6, struct pt_regs regs) + unsigned long parent_tidptr, + unsigned long child_tidptr, + unsigned long r4, unsigned long r5, unsigned long r6, + struct pt_regs regs) { if (!newsp) newsp = regs.spu; - return do_fork(clone_flags, newsp, ®s, 0, NULL, NULL); + return do_fork(clone_flags, newsp, ®s, 0, + (int __user *)parent_tidptr, (int __user *)child_tidptr); } /* @@ -320,9 +322,10 @@ /* * sys_execve() executes a new program. */ -asmlinkage int sys_execve(char __user *ufilename, char __user * __user *uargv, char __user * __user *uenvp, - unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, - struct pt_regs regs) +asmlinkage int sys_execve(char __user *ufilename, char __user * __user *uargv, + char __user * __user *uenvp, + unsigned long r3, unsigned long r4, unsigned long r5, + unsigned long r6, struct pt_regs regs) { int error; char *filename; @@ -354,4 +357,3 @@ /* M32R_FIXME */ return (0); } - diff -Nru a/arch/m32r/kernel/smp.c b/arch/m32r/kernel/smp.c --- a/arch/m32r/kernel/smp.c 2005-02-22 20:30:44 -08:00 +++ b/arch/m32r/kernel/smp.c 2005-02-22 20:30:44 -08:00 @@ -953,7 +953,7 @@ "ldi r4, #1 \n\t" "st r4, @%2 \n\t" : "=&r"(ipicr_val) - : "r"(flags), "r"(&ipilock->lock), "r"(ipicr_addr), + : "r"(flags), "r"(&ipilock->slock), "r"(ipicr_addr), "r"(mask), "r"(try), "r"(my_physid_mask) : "memory", "r4" #ifdef CONFIG_CHIP_M32700_TS1 diff -Nru a/arch/m32r/m32700ut/defconfig.m32700ut.smp b/arch/m32r/m32700ut/defconfig.m32700ut.smp --- a/arch/m32r/m32700ut/defconfig.m32700ut.smp 2005-02-22 20:30:43 -08:00 +++ b/arch/m32r/m32700ut/defconfig.m32700ut.smp 2005-02-22 20:30:43 -08:00 @@ -1,11 +1,13 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10-rc1-bk21 -# Fri Nov 12 16:08:45 2004 +# Linux kernel version: 2.6.11-rc4 +# Wed Feb 16 21:10:50 2005 # CONFIG_M32R=y -CONFIG_UID16=y +# CONFIG_UID16 is not set CONFIG_GENERIC_ISA_DMA=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y # # Code maturity level options @@ -81,6 +83,7 @@ # CONFIG_DISCONTIGMEM is not set CONFIG_RWSEM_GENERIC_SPINLOCK=y # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_PREEMPT=y # CONFIG_HAVE_DEC_LOCK is not set CONFIG_SMP=y @@ -99,7 +102,6 @@ # CONFIG_PCCARD=y # CONFIG_PCMCIA_DEBUG is not set -# CONFIG_PCMCIA_OBSOLETE is not set CONFIG_PCMCIA=y # @@ -149,10 +151,12 @@ # Block devices # # CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set CONFIG_BLK_DEV_NBD=y CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 # CONFIG_BLK_DEV_INITRD is not set CONFIG_INITRAMFS_SOURCE="" @@ -165,6 +169,7 @@ # CONFIG_IOSCHED_AS is not set CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set # # ATA/ATAPI/MFM/RLL support @@ -222,12 +227,12 @@ # # CONFIG_SCSI_SPI_ATTRS is not set # CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set # # SCSI low-level drivers # # CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_QLOGIC_1280_1040 is not set # CONFIG_SCSI_DEBUG is not set # @@ -399,6 +404,7 @@ # CONFIG_SERIO_I8042 is not set CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_LIBPS2 is not set # CONFIG_SERIO_RAW is not set # @@ -453,7 +459,6 @@ # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set # @@ -527,6 +532,7 @@ CONFIG_LOGO_LINUX_MONO=y CONFIG_LOGO_LINUX_VGA16=y CONFIG_LOGO_LINUX_CLUT224=y +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set # # Sound @@ -540,11 +546,25 @@ # CONFIG_USB_ARCH_HAS_OHCI is not set # +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# + +# # USB Gadget Support # # CONFIG_USB_GADGET is not set # +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# InfiniBand support +# +# CONFIG_INFINIBAND is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -561,6 +581,10 @@ # CONFIG_REISERFS_PROC_INFO is not set # CONFIG_REISERFS_FS_XATTR is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set @@ -631,7 +655,6 @@ CONFIG_ROOT_NFS=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_RPCSEC_GSS_SPKM3 is not set @@ -700,7 +723,8 @@ # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +CONFIG_DEBUG_PREEMPT=y +# CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_FRAME_POINTER is not set # @@ -713,6 +737,10 @@ # Cryptographic options # # CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# # # Library routines diff -Nru a/arch/m32r/m32700ut/defconfig.m32700ut.up b/arch/m32r/m32700ut/defconfig.m32700ut.up --- a/arch/m32r/m32700ut/defconfig.m32700ut.up 2005-02-22 20:30:44 -08:00 +++ b/arch/m32r/m32700ut/defconfig.m32700ut.up 2005-02-22 20:30:44 -08:00 @@ -1,11 +1,13 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10-rc1-bk21 -# Fri Nov 12 16:08:49 2004 +# Linux kernel version: 2.6.11-rc4 +# Wed Feb 16 21:10:54 2005 # CONFIG_M32R=y -CONFIG_UID16=y +# CONFIG_UID16 is not set CONFIG_GENERIC_ISA_DMA=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y # # Code maturity level options @@ -81,6 +83,7 @@ # CONFIG_DISCONTIGMEM is not set CONFIG_RWSEM_GENERIC_SPINLOCK=y # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_PREEMPT=y # CONFIG_HAVE_DEC_LOCK is not set # CONFIG_SMP is not set @@ -96,7 +99,6 @@ # CONFIG_PCCARD=y # CONFIG_PCMCIA_DEBUG is not set -# CONFIG_PCMCIA_OBSOLETE is not set CONFIG_PCMCIA=y # @@ -146,10 +148,12 @@ # Block devices # # CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set CONFIG_BLK_DEV_NBD=y CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 # CONFIG_BLK_DEV_INITRD is not set CONFIG_INITRAMFS_SOURCE="" @@ -162,6 +166,7 @@ # CONFIG_IOSCHED_AS is not set CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set # # ATA/ATAPI/MFM/RLL support @@ -219,12 +224,12 @@ # # CONFIG_SCSI_SPI_ATTRS is not set # CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set # # SCSI low-level drivers # # CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_QLOGIC_1280_1040 is not set # CONFIG_SCSI_DEBUG is not set # @@ -396,6 +401,7 @@ # CONFIG_SERIO_I8042 is not set CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_LIBPS2 is not set # CONFIG_SERIO_RAW is not set # @@ -450,7 +456,6 @@ # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set # @@ -524,6 +529,7 @@ CONFIG_LOGO_LINUX_MONO=y CONFIG_LOGO_LINUX_VGA16=y CONFIG_LOGO_LINUX_CLUT224=y +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set # # Sound @@ -537,11 +543,25 @@ # CONFIG_USB_ARCH_HAS_OHCI is not set # +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# + +# # USB Gadget Support # # CONFIG_USB_GADGET is not set # +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# InfiniBand support +# +# CONFIG_INFINIBAND is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -558,6 +578,10 @@ # CONFIG_REISERFS_PROC_INFO is not set # CONFIG_REISERFS_FS_XATTR is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set @@ -628,7 +652,6 @@ CONFIG_ROOT_NFS=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_RPCSEC_GSS_SPKM3 is not set @@ -697,7 +720,8 @@ # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +CONFIG_DEBUG_PREEMPT=y +# CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_FRAME_POINTER is not set # @@ -710,6 +734,10 @@ # Cryptographic options # # CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# # # Library routines diff -Nru a/arch/m32r/mappi/defconfig.nommu b/arch/m32r/mappi/defconfig.nommu --- a/arch/m32r/mappi/defconfig.nommu 2005-02-22 20:30:44 -08:00 +++ b/arch/m32r/mappi/defconfig.nommu 2005-02-22 20:30:44 -08:00 @@ -1,11 +1,13 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10-rc1-bk21 -# Fri Nov 12 16:08:51 2004 +# Linux kernel version: 2.6.11-rc4 +# Wed Feb 16 21:10:57 2005 # CONFIG_M32R=y -CONFIG_UID16=y +# CONFIG_UID16 is not set CONFIG_GENERIC_ISA_DMA=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y # # Code maturity level options @@ -34,12 +36,11 @@ # CONFIG_FUTEX is not set # CONFIG_EPOLL is not set # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SHMEM=y CONFIG_CC_ALIGN_FUNCTIONS=0 CONFIG_CC_ALIGN_LABELS=0 CONFIG_CC_ALIGN_LOOPS=0 CONFIG_CC_ALIGN_JUMPS=0 -# CONFIG_TINY_SHMEM is not set +CONFIG_TINY_SHMEM=y # # Loadable module support @@ -79,6 +80,7 @@ # CONFIG_DISCONTIGMEM is not set CONFIG_RWSEM_GENERIC_SPINLOCK=y # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_PREEMPT=y # CONFIG_HAVE_DEC_LOCK is not set # CONFIG_SMP is not set @@ -94,7 +96,6 @@ # CONFIG_PCCARD=y # CONFIG_PCMCIA_DEBUG is not set -# CONFIG_PCMCIA_OBSOLETE is not set CONFIG_PCMCIA=y # @@ -144,10 +145,12 @@ # Block devices # # CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set CONFIG_BLK_DEV_NBD=y CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 # CONFIG_BLK_DEV_INITRD is not set CONFIG_INITRAMFS_SOURCE="" @@ -160,6 +163,7 @@ # CONFIG_IOSCHED_AS is not set CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set # # ATA/ATAPI/MFM/RLL support @@ -329,6 +333,7 @@ # CONFIG_SERIO_I8042 is not set CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_LIBPS2 is not set # CONFIG_SERIO_RAW is not set # @@ -380,7 +385,6 @@ # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set # @@ -430,11 +434,25 @@ # CONFIG_USB_ARCH_HAS_OHCI is not set # +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# + +# # USB Gadget Support # # CONFIG_USB_GADGET is not set # +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# InfiniBand support +# +# CONFIG_INFINIBAND is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -443,6 +461,10 @@ # CONFIG_JBD is not set # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set @@ -468,7 +490,6 @@ # Pseudo filesystems # CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y CONFIG_SYSFS=y CONFIG_DEVFS_FS=y CONFIG_DEVFS_MOUNT=y @@ -507,7 +528,6 @@ CONFIG_ROOT_NFS=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_RPCSEC_GSS_SPKM3 is not set @@ -576,7 +596,8 @@ # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +CONFIG_DEBUG_PREEMPT=y +# CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_FRAME_POINTER is not set # @@ -589,6 +610,10 @@ # Cryptographic options # # CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# # # Library routines diff -Nru a/arch/m32r/mappi/defconfig.smp b/arch/m32r/mappi/defconfig.smp --- a/arch/m32r/mappi/defconfig.smp 2005-02-22 20:30:44 -08:00 +++ b/arch/m32r/mappi/defconfig.smp 2005-02-22 20:30:44 -08:00 @@ -1,11 +1,13 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10-rc1-bk21 -# Fri Nov 12 16:08:53 2004 +# Linux kernel version: 2.6.11-rc4 +# Wed Feb 16 21:11:02 2005 # CONFIG_M32R=y -CONFIG_UID16=y +# CONFIG_UID16 is not set CONFIG_GENERIC_ISA_DMA=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y # # Code maturity level options @@ -84,6 +86,7 @@ CONFIG_IRAM_SIZE=0x00080000 CONFIG_RWSEM_GENERIC_SPINLOCK=y # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_PREEMPT=y # CONFIG_HAVE_DEC_LOCK is not set CONFIG_SMP=y @@ -102,7 +105,6 @@ # CONFIG_PCCARD=y # CONFIG_PCMCIA_DEBUG is not set -# CONFIG_PCMCIA_OBSOLETE is not set CONFIG_PCMCIA=y # @@ -140,6 +142,7 @@ CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set CONFIG_MTD_REDBOOT_PARTS=y +CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 # CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set # CONFIG_MTD_REDBOOT_PARTS_READONLY is not set # CONFIG_MTD_CMDLINE_PARTS is not set @@ -185,6 +188,7 @@ # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -211,10 +215,12 @@ # Block devices # # CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set CONFIG_BLK_DEV_NBD=m CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y CONFIG_INITRAMFS_SOURCE="" @@ -227,6 +233,7 @@ # CONFIG_IOSCHED_AS is not set CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set # # ATA/ATAPI/MFM/RLL support @@ -421,6 +428,7 @@ # CONFIG_SERIO_I8042 is not set # CONFIG_SERIO_SERPORT is not set # CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_LIBPS2 is not set # CONFIG_SERIO_RAW is not set # @@ -472,7 +480,6 @@ # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set # @@ -522,11 +529,25 @@ # CONFIG_USB_ARCH_HAS_OHCI is not set # +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# + +# # USB Gadget Support # # CONFIG_USB_GADGET is not set # +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# InfiniBand support +# +# CONFIG_INFINIBAND is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -535,6 +556,10 @@ # CONFIG_JBD is not set # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set CONFIG_ROMFS_FS=y @@ -593,6 +618,7 @@ CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 # CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -615,7 +641,6 @@ CONFIG_ROOT_NFS=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_RPCSEC_GSS_SPKM3 is not set @@ -684,7 +709,8 @@ # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +CONFIG_DEBUG_PREEMPT=y +# CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_FRAME_POINTER is not set # @@ -697,6 +723,10 @@ # Cryptographic options # # CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# # # Library routines diff -Nru a/arch/m32r/mappi/defconfig.up b/arch/m32r/mappi/defconfig.up --- a/arch/m32r/mappi/defconfig.up 2005-02-22 20:30:43 -08:00 +++ b/arch/m32r/mappi/defconfig.up 2005-02-22 20:30:43 -08:00 @@ -1,11 +1,13 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10-rc1-bk21 -# Fri Nov 12 16:08:55 2004 +# Linux kernel version: 2.6.11-rc4 +# Wed Feb 16 21:11:07 2005 # CONFIG_M32R=y -CONFIG_UID16=y +# CONFIG_UID16 is not set CONFIG_GENERIC_ISA_DMA=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y # # Code maturity level options @@ -83,6 +85,7 @@ CONFIG_IRAM_SIZE=0x00080000 CONFIG_RWSEM_GENERIC_SPINLOCK=y # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_PREEMPT=y # CONFIG_HAVE_DEC_LOCK is not set # CONFIG_SMP is not set @@ -98,7 +101,6 @@ # CONFIG_PCCARD=y # CONFIG_PCMCIA_DEBUG is not set -# CONFIG_PCMCIA_OBSOLETE is not set CONFIG_PCMCIA=y # @@ -136,6 +138,7 @@ CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set CONFIG_MTD_REDBOOT_PARTS=y +CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 # CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set # CONFIG_MTD_REDBOOT_PARTS_READONLY is not set # CONFIG_MTD_CMDLINE_PARTS is not set @@ -181,6 +184,7 @@ # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -207,10 +211,12 @@ # Block devices # # CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set CONFIG_BLK_DEV_NBD=m CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y CONFIG_INITRAMFS_SOURCE="" @@ -223,6 +229,7 @@ # CONFIG_IOSCHED_AS is not set CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set # # ATA/ATAPI/MFM/RLL support @@ -417,6 +424,7 @@ # CONFIG_SERIO_I8042 is not set # CONFIG_SERIO_SERPORT is not set # CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_LIBPS2 is not set # CONFIG_SERIO_RAW is not set # @@ -468,7 +476,6 @@ # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set # @@ -518,11 +525,25 @@ # CONFIG_USB_ARCH_HAS_OHCI is not set # +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# + +# # USB Gadget Support # # CONFIG_USB_GADGET is not set # +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# InfiniBand support +# +# CONFIG_INFINIBAND is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -531,6 +552,10 @@ # CONFIG_JBD is not set # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set CONFIG_ROMFS_FS=y @@ -589,6 +614,7 @@ CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 # CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -611,7 +637,6 @@ CONFIG_ROOT_NFS=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_RPCSEC_GSS_SPKM3 is not set @@ -680,7 +705,8 @@ # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +CONFIG_DEBUG_PREEMPT=y +# CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_FRAME_POINTER is not set # @@ -693,6 +719,10 @@ # Cryptographic options # # CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# # # Library routines diff -Nru a/arch/m32r/mappi2/defconfig.vdec2 b/arch/m32r/mappi2/defconfig.vdec2 --- a/arch/m32r/mappi2/defconfig.vdec2 2005-02-22 20:30:44 -08:00 +++ b/arch/m32r/mappi2/defconfig.vdec2 2005-02-22 20:30:44 -08:00 @@ -1,11 +1,13 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10-rc1-bk21 -# Fri Nov 12 16:08:58 2004 +# Linux kernel version: 2.6.11-rc4 +# Wed Feb 16 21:11:10 2005 # CONFIG_M32R=y -CONFIG_UID16=y +# CONFIG_UID16 is not set CONFIG_GENERIC_ISA_DMA=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y # # Code maturity level options @@ -79,6 +81,7 @@ # CONFIG_DISCONTIGMEM is not set CONFIG_RWSEM_GENERIC_SPINLOCK=y # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_PREEMPT=y # CONFIG_HAVE_DEC_LOCK is not set # CONFIG_SMP is not set @@ -94,7 +97,6 @@ # CONFIG_PCCARD=y # CONFIG_PCMCIA_DEBUG is not set -# CONFIG_PCMCIA_OBSOLETE is not set CONFIG_PCMCIA=y # @@ -142,10 +144,12 @@ # Block devices # # CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set CONFIG_BLK_DEV_NBD=y CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 # CONFIG_BLK_DEV_INITRD is not set CONFIG_INITRAMFS_SOURCE="" @@ -158,6 +162,7 @@ # CONFIG_IOSCHED_AS is not set CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set # # ATA/ATAPI/MFM/RLL support @@ -215,12 +220,12 @@ # # CONFIG_SCSI_SPI_ATTRS is not set # CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set # # SCSI low-level drivers # # CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_QLOGIC_1280_1040 is not set # CONFIG_SCSI_DEBUG is not set # @@ -392,6 +397,7 @@ # CONFIG_SERIO_I8042 is not set CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_LIBPS2 is not set # CONFIG_SERIO_RAW is not set # @@ -445,7 +451,6 @@ # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set # @@ -516,11 +521,25 @@ # CONFIG_USB_ARCH_HAS_OHCI is not set # +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# + +# # USB Gadget Support # # CONFIG_USB_GADGET is not set # +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# InfiniBand support +# +# CONFIG_INFINIBAND is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -537,6 +556,10 @@ # CONFIG_REISERFS_PROC_INFO is not set # CONFIG_REISERFS_FS_XATTR is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set @@ -607,7 +630,6 @@ CONFIG_ROOT_NFS=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_RPCSEC_GSS_SPKM3 is not set @@ -676,7 +698,8 @@ # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +CONFIG_DEBUG_PREEMPT=y +# CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_FRAME_POINTER is not set # @@ -689,6 +712,10 @@ # Cryptographic options # # CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# # # Library routines diff -Nru a/arch/m32r/oaks32r/defconfig.nommu b/arch/m32r/oaks32r/defconfig.nommu --- a/arch/m32r/oaks32r/defconfig.nommu 2005-02-22 20:30:43 -08:00 +++ b/arch/m32r/oaks32r/defconfig.nommu 2005-02-22 20:30:43 -08:00 @@ -1,11 +1,13 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10-rc1-bk21 -# Fri Nov 12 16:09:00 2004 +# Linux kernel version: 2.6.11-rc4 +# Wed Feb 16 21:11:13 2005 # CONFIG_M32R=y -CONFIG_UID16=y +# CONFIG_UID16 is not set CONFIG_GENERIC_ISA_DMA=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y # # Code maturity level options @@ -33,12 +35,11 @@ # CONFIG_FUTEX is not set # CONFIG_EPOLL is not set # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SHMEM=y CONFIG_CC_ALIGN_FUNCTIONS=0 CONFIG_CC_ALIGN_LABELS=0 CONFIG_CC_ALIGN_LOOPS=0 CONFIG_CC_ALIGN_JUMPS=0 -# CONFIG_TINY_SHMEM is not set +CONFIG_TINY_SHMEM=y # # Loadable module support @@ -74,6 +75,7 @@ # CONFIG_DISCONTIGMEM is not set CONFIG_RWSEM_GENERIC_SPINLOCK=y # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_PREEMPT=y # CONFIG_HAVE_DEC_LOCK is not set # CONFIG_SMP is not set @@ -134,10 +136,12 @@ # Block devices # # CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set CONFIG_BLK_DEV_NBD=y CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 # CONFIG_BLK_DEV_INITRD is not set CONFIG_INITRAMFS_SOURCE="" @@ -150,6 +154,7 @@ # CONFIG_IOSCHED_AS is not set CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set # # ATA/ATAPI/MFM/RLL support @@ -314,6 +319,7 @@ # CONFIG_SERIO_I8042 is not set CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_LIBPS2 is not set # CONFIG_SERIO_RAW is not set # @@ -365,7 +371,6 @@ # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set @@ -410,11 +415,25 @@ # CONFIG_USB_ARCH_HAS_OHCI is not set # +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# + +# # USB Gadget Support # # CONFIG_USB_GADGET is not set # +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# InfiniBand support +# +# CONFIG_INFINIBAND is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -423,6 +442,10 @@ # CONFIG_JBD is not set # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set @@ -448,7 +471,6 @@ # Pseudo filesystems # CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y CONFIG_SYSFS=y # CONFIG_DEVFS_FS is not set CONFIG_DEVPTS_FS_XATTR=y @@ -485,7 +507,6 @@ CONFIG_ROOT_NFS=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_RPCSEC_GSS_SPKM3 is not set @@ -554,7 +575,8 @@ # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +CONFIG_DEBUG_PREEMPT=y +# CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_FRAME_POINTER is not set # @@ -567,6 +589,10 @@ # Cryptographic options # # CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# # # Library routines diff -Nru a/arch/m32r/opsput/defconfig.opsput b/arch/m32r/opsput/defconfig.opsput --- a/arch/m32r/opsput/defconfig.opsput 2005-02-22 20:30:43 -08:00 +++ b/arch/m32r/opsput/defconfig.opsput 2005-02-22 20:30:43 -08:00 @@ -1,11 +1,13 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10-rc1-bk21 -# Fri Nov 12 16:09:02 2004 +# Linux kernel version: 2.6.11-rc4 +# Wed Feb 16 21:11:41 2005 # CONFIG_M32R=y -CONFIG_UID16=y +# CONFIG_UID16 is not set CONFIG_GENERIC_ISA_DMA=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y # # Code maturity level options @@ -80,6 +82,7 @@ # CONFIG_DISCONTIGMEM is not set CONFIG_RWSEM_GENERIC_SPINLOCK=y # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set +CONFIG_GENERIC_CALIBRATE_DELAY=y # CONFIG_PREEMPT is not set # CONFIG_SMP is not set @@ -94,7 +97,6 @@ # CONFIG_PCCARD=y # CONFIG_PCMCIA_DEBUG is not set -# CONFIG_PCMCIA_OBSOLETE is not set CONFIG_PCMCIA=y # @@ -144,10 +146,12 @@ # Block devices # # CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_COW_COMMON 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_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 # CONFIG_BLK_DEV_INITRD is not set CONFIG_INITRAMFS_SOURCE="" @@ -160,6 +164,7 @@ # CONFIG_IOSCHED_AS is not set CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set # # ATA/ATAPI/MFM/RLL support @@ -194,12 +199,12 @@ # # CONFIG_SCSI_SPI_ATTRS is not set # CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set # # SCSI low-level drivers # # CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_QLOGIC_1280_1040 is not set # CONFIG_SCSI_DEBUG is not set # @@ -371,6 +376,7 @@ # CONFIG_SERIO_I8042 is not set CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_LIBPS2 is not set # CONFIG_SERIO_RAW is not set # @@ -423,7 +429,6 @@ # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set # @@ -473,11 +478,25 @@ # CONFIG_USB_ARCH_HAS_OHCI is not set # +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# + +# # USB Gadget Support # # CONFIG_USB_GADGET is not set # +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# InfiniBand support +# +# CONFIG_INFINIBAND is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -494,6 +513,10 @@ # CONFIG_REISERFS_PROC_INFO is not set # CONFIG_REISERFS_FS_XATTR is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set @@ -564,7 +587,6 @@ CONFIG_ROOT_NFS=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_RPCSEC_GSS_SPKM3 is not set @@ -633,15 +655,19 @@ # Kernel hacking # CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_STACKOVERFLOW is not set -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_IOVIRT is not set # CONFIG_MAGIC_SYSRQ is not set +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_PAGEALLOC is not set -CONFIG_DEBUG_INFO=y # CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +CONFIG_DEBUG_INFO=y +# CONFIG_DEBUG_FS is not set # CONFIG_FRAME_POINTER is not set +# CONFIG_DEBUG_STACKOVERFLOW is not set +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_DEBUG_PAGEALLOC is not set # # Security options @@ -653,6 +679,10 @@ # Cryptographic options # # CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# # # Library routines diff -Nru a/arch/ppc/mm/pgtable.c b/arch/ppc/mm/pgtable.c --- a/arch/ppc/mm/pgtable.c 2005-02-22 20:30:43 -08:00 +++ b/arch/ppc/mm/pgtable.c 2005-02-22 20:30:43 -08:00 @@ -107,8 +107,11 @@ ptepage->mapping = (void *) mm; ptepage->index = address & PMD_MASK; } - } else + } else { pte = (pte_t *)early_get_page(); + if (pte) + clear_page(pte); + } return pte; } diff -Nru a/arch/ppc/syslib/i8259.c b/arch/ppc/syslib/i8259.c --- a/arch/ppc/syslib/i8259.c 2005-02-22 20:30:43 -08:00 +++ b/arch/ppc/syslib/i8259.c 2005-02-22 20:30:43 -08:00 @@ -140,15 +140,24 @@ }; static struct resource pic1_iores = { - "8259 (master)", 0x20, 0x21, IORESOURCE_BUSY + .name = "8259 (master)", + .start = 0x20, + .end = 0x21, + .flags = IORESOURCE_BUSY, }; static struct resource pic2_iores = { - "8259 (slave)", 0xa0, 0xa1, IORESOURCE_BUSY + .name = "8259 (slave)", + .start = 0xa0, + .end = 0xa1, + .flags = IORESOURCE_BUSY, }; static struct resource pic_edgectrl_iores = { - "8259 edge control", 0x4d0, 0x4d1, IORESOURCE_BUSY + .name = "8259 edge control", + .start = 0x4d0, + .end = 0x4d1, + .flags = IORESOURCE_BUSY, }; static struct irqaction i8259_irqaction = { diff -Nru a/arch/ppc64/mm/hugetlbpage.c b/arch/ppc64/mm/hugetlbpage.c --- a/arch/ppc64/mm/hugetlbpage.c 2005-02-22 20:30:43 -08:00 +++ b/arch/ppc64/mm/hugetlbpage.c 2005-02-22 20:30:43 -08:00 @@ -264,6 +264,10 @@ return -EBUSY; mm->context.htlb_segs |= newsegs; + + /* update the paca copy of the context struct */ + get_paca()->context = mm->context; + /* the context change must make it to memory before the flush, * so that further SLB misses do the right thing. */ mb(); diff -Nru a/arch/sparc/kernel/auxio.c b/arch/sparc/kernel/auxio.c --- a/arch/sparc/kernel/auxio.c 2005-02-22 20:30:44 -08:00 +++ b/arch/sparc/kernel/auxio.c 2005-02-22 20:30:44 -08:00 @@ -53,7 +53,8 @@ #endif } } - prom_getproperty(auxio_nd, "reg", (char *) auxregs, sizeof(auxregs)); + if(prom_getproperty(auxio_nd, "reg", (char *) auxregs, sizeof(auxregs)) <= 0) + return; prom_apply_obio_ranges(auxregs, 0x1); /* Map the register both read and write */ r.flags = auxregs[0].which_io & 0xF; @@ -121,7 +122,8 @@ return; /* Map the power control register. */ - prom_getproperty(node, "reg", (char *)®s, sizeof(regs)); + if (prom_getproperty(node, "reg", (char *)®s, sizeof(regs)) <= 0) + return; prom_apply_obio_ranges(®s, 1); memset(&r, 0, sizeof(r)); r.flags = regs.which_io & 0xF; diff -Nru a/arch/sparc/kernel/idprom.c b/arch/sparc/kernel/idprom.c --- a/arch/sparc/kernel/idprom.c 2005-02-22 20:30:43 -08:00 +++ b/arch/sparc/kernel/idprom.c 2005-02-22 20:30:43 -08:00 @@ -53,13 +53,12 @@ for (i = 0; i < NUM_SUN_MACHINES; i++) { if(Sun_Machines[i].id_machtype == machtype) { - if (machtype != (SM_SUN4M_OBP | 0x00)) + if (machtype != (SM_SUN4M_OBP | 0x00) || + prom_getproperty(prom_root_node, "banner-name", + sysname, sizeof(sysname)) <= 0) printk("TYPE: %s\n", Sun_Machines[i].name); - else { - prom_getproperty(prom_root_node, "banner-name", - sysname, sizeof(sysname)); + else printk("TYPE: %s\n", sysname); - } return; } } diff -Nru a/arch/sparc/kernel/process.c b/arch/sparc/kernel/process.c --- a/arch/sparc/kernel/process.c 2005-02-22 20:30:43 -08:00 +++ b/arch/sparc/kernel/process.c 2005-02-22 20:30:43 -08:00 @@ -549,6 +549,11 @@ } } +#ifdef CONFIG_SMP + /* FPU must be disabled on SMP. */ + childregs->psr &= ~PSR_EF; +#endif + /* Set the return value for the child. */ childregs->u_regs[UREG_I0] = current->pid; childregs->u_regs[UREG_I1] = 1; diff -Nru a/arch/sparc/kernel/sun4c_irq.c b/arch/sparc/kernel/sun4c_irq.c --- a/arch/sparc/kernel/sun4c_irq.c 2005-02-22 20:30:43 -08:00 +++ b/arch/sparc/kernel/sun4c_irq.c 2005-02-22 20:30:43 -08:00 @@ -217,13 +217,18 @@ panic("Cannot find /interrupt-enable node"); /* Depending on the "address" property is bad news... */ - prom_getproperty(ie_node, "reg", (char *) int_regs, sizeof(int_regs)); - memset(&phyres, 0, sizeof(struct resource)); - phyres.flags = int_regs[0].which_io; - phyres.start = int_regs[0].phys_addr; - interrupt_enable = (char *) sbus_ioremap(&phyres, 0, - int_regs[0].reg_size, "sun4c_intr"); + interrupt_enable = NULL; + if (prom_getproperty(ie_node, "reg", (char *) int_regs, + sizeof(int_regs)) != -1) { + memset(&phyres, 0, sizeof(struct resource)); + phyres.flags = int_regs[0].which_io; + phyres.start = int_regs[0].phys_addr; + interrupt_enable = (char *) sbus_ioremap(&phyres, 0, + int_regs[0].reg_size, "sun4c_intr"); + } } + if (!interrupt_enable) + panic("Cannot map interrupt_enable"); BTFIXUPSET_CALL(sbint_to_irq, sun4c_sbint_to_irq, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(enable_irq, sun4c_enable_irq, BTFIXUPCALL_NORM); diff -Nru a/arch/sparc/mm/io-unit.c b/arch/sparc/mm/io-unit.c --- a/arch/sparc/mm/io-unit.c 2005-02-22 20:30:43 -08:00 +++ b/arch/sparc/mm/io-unit.c 2005-02-22 20:30:43 -08:00 @@ -52,13 +52,15 @@ iounit->rotor[1] = IOUNIT_BMAP2_START; iounit->rotor[2] = IOUNIT_BMAPM_START; - prom_getproperty(sbi_node, "reg", (void *) iommu_promregs, - sizeof(iommu_promregs)); - prom_apply_generic_ranges(io_node, 0, iommu_promregs, 3); - memset(&r, 0, sizeof(r)); - r.flags = iommu_promregs[2].which_io; - r.start = iommu_promregs[2].phys_addr; - xpt = (iopte_t *) sbus_ioremap(&r, 0, PAGE_SIZE * 16, "XPT"); + xpt = NULL; + if(prom_getproperty(sbi_node, "reg", (void *) iommu_promregs, + sizeof(iommu_promregs)) != -1) { + prom_apply_generic_ranges(io_node, 0, iommu_promregs, 3); + memset(&r, 0, sizeof(r)); + r.flags = iommu_promregs[2].which_io; + r.start = iommu_promregs[2].phys_addr; + xpt = (iopte_t *) sbus_ioremap(&r, 0, PAGE_SIZE * 16, "XPT"); + } if(!xpt) panic("Cannot map External Page Table."); sbus->iommu = (struct iommu_struct *)iounit; diff -Nru a/arch/sparc/mm/iommu.c b/arch/sparc/mm/iommu.c --- a/arch/sparc/mm/iommu.c 2005-02-22 20:30:44 -08:00 +++ b/arch/sparc/mm/iommu.c 2005-02-22 20:30:44 -08:00 @@ -71,14 +71,16 @@ prom_printf("Unable to allocate iommu structure\n"); prom_halt(); } - prom_getproperty(iommund, "reg", (void *) iommu_promregs, - sizeof(iommu_promregs)); - memset(&r, 0, sizeof(r)); - r.flags = iommu_promregs[0].which_io; - r.start = iommu_promregs[0].phys_addr; - iommu->regs = (struct iommu_regs *) - sbus_ioremap(&r, 0, PAGE_SIZE * 3, "iommu_regs"); - if(!iommu->regs) { + iommu->regs = NULL; + if (prom_getproperty(iommund, "reg", (void *) iommu_promregs, + sizeof(iommu_promregs)) != -1) { + memset(&r, 0, sizeof(r)); + r.flags = iommu_promregs[0].which_io; + r.start = iommu_promregs[0].phys_addr; + iommu->regs = (struct iommu_regs *) + sbus_ioremap(&r, 0, PAGE_SIZE * 3, "iommu_regs"); + } + if (!iommu->regs) { prom_printf("Cannot map IOMMU registers\n"); prom_halt(); } diff -Nru a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c --- a/arch/sparc/mm/sun4c.c 2005-02-22 20:30:44 -08:00 +++ b/arch/sparc/mm/sun4c.c 2005-02-22 20:30:44 -08:00 @@ -511,7 +511,8 @@ node = prom_searchsiblings(prom_root_node, "memory-error"); if (!node) return; - prom_getproperty(node, "reg", (char *)regs, sizeof(regs)); + if (prom_getproperty(node, "reg", (char *)regs, sizeof(regs)) <= 0) + return; /* hmm I think regs[0].which_io is zero here anyways */ sun4c_memerr_reg = ioremap(regs[0].phys_addr, regs[0].reg_size); } diff -Nru a/arch/sparc/prom/console.c b/arch/sparc/prom/console.c --- a/arch/sparc/prom/console.c 2005-02-22 20:30:43 -08:00 +++ b/arch/sparc/prom/console.c 2005-02-22 20:30:43 -08:00 @@ -111,6 +111,7 @@ int st_p; char propb[64]; char *p; + int propl; switch(prom_vers) { case PROM_V0: @@ -139,14 +140,16 @@ if(strncmp(propb, "serial", sizeof("serial"))) return PROMDEV_I_UNK; } - prom_getproperty(prom_root_node, "stdin-path", propb, sizeof(propb)); - p = propb; - while(*p) p++; p -= 2; - if(p[0] == ':') { - if(p[1] == 'a') - return PROMDEV_ITTYA; - else if(p[1] == 'b') - return PROMDEV_ITTYB; + propl = prom_getproperty(prom_root_node, "stdin-path", propb, sizeof(propb)); + if(propl > 2) { + p = propb; + while(*p) p++; p -= 2; + if(p[0] == ':') { + if(p[1] == 'a') + return PROMDEV_ITTYA; + else if(p[1] == 'b') + return PROMDEV_ITTYB; + } } return PROMDEV_I_UNK; } @@ -179,7 +182,7 @@ restore_current(); spin_unlock_irqrestore(&prom_lock, flags); propl = prom_getproperty(st_p, "device_type", propb, sizeof(propb)); - if (propl >= 0 && propl == sizeof("display") && + if (propl == sizeof("display") && strncmp("display", propb, sizeof("display")) == 0) { return PROMDEV_OSCREEN; @@ -188,16 +191,20 @@ if(propl >= 0 && strncmp("serial", propb, sizeof("serial")) != 0) return PROMDEV_O_UNK; - prom_getproperty(prom_root_node, "stdout-path", propb, sizeof(propb)); - if(strncmp(propb, con_name_jmc, CON_SIZE_JMC) == 0) + propl = prom_getproperty(prom_root_node, "stdout-path", + propb, sizeof(propb)); + if(propl == CON_SIZE_JMC && + strncmp(propb, con_name_jmc, CON_SIZE_JMC) == 0) return PROMDEV_OTTYA; - p = propb; - while(*p) p++; p -= 2; - if(p[0]==':') { - if(p[1] == 'a') - return PROMDEV_OTTYA; - else if(p[1] == 'b') - return PROMDEV_OTTYB; + if(propl > 2) { + p = propb; + while(*p) p++; p-= 2; + if(p[0]==':') { + if(p[1] == 'a') + return PROMDEV_OTTYA; + else if(p[1] == 'b') + return PROMDEV_OTTYB; + } } } else { switch(*romvec->pv_stdin) { diff -Nru a/arch/sparc/prom/tree.c b/arch/sparc/prom/tree.c --- a/arch/sparc/prom/tree.c 2005-02-22 20:30:43 -08:00 +++ b/arch/sparc/prom/tree.c 2005-02-22 20:30:43 -08:00 @@ -176,8 +176,11 @@ */ int prom_nodematch(int node, char *name) { + int error; + static char namebuf[128]; - prom_getproperty(node, "name", namebuf, sizeof(namebuf)); + error = prom_getproperty(node, "name", namebuf, sizeof(namebuf)); + if (error == -1) return 0; if(strcmp(namebuf, name) == 0) return 1; return 0; } diff -Nru a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig --- a/arch/sparc64/Kconfig 2005-02-22 20:30:44 -08:00 +++ b/arch/sparc64/Kconfig 2005-02-22 20:30:44 -08:00 @@ -18,6 +18,11 @@ source "init/Kconfig" +config SYSVIPC_COMPAT + bool + depends on COMPAT && SYSVIPC + default y + menu "General machine setup" config BBC_I2C diff -Nru a/arch/sparc64/defconfig b/arch/sparc64/defconfig --- a/arch/sparc64/defconfig 2005-02-22 20:30:43 -08:00 +++ b/arch/sparc64/defconfig 2005-02-22 20:30:43 -08:00 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.11-rc3 -# Mon Feb 7 15:29:00 2005 +# Linux kernel version: 2.6.11-rc4 +# Thu Feb 17 15:32:19 2005 # CONFIG_64BIT=y CONFIG_MMU=y @@ -53,6 +53,7 @@ CONFIG_MODULE_SRCVERSION_ALL=y CONFIG_KMOD=y CONFIG_STOP_MACHINE=y +CONFIG_SYSVIPC_COMPAT=y # # General machine setup diff -Nru a/arch/sparc64/kernel/auxio.c b/arch/sparc64/kernel/auxio.c --- a/arch/sparc64/kernel/auxio.c 2005-02-22 20:30:44 -08:00 +++ b/arch/sparc64/kernel/auxio.c 2005-02-22 20:30:44 -08:00 @@ -17,7 +17,7 @@ #include /* This cannot be static, as it is referenced in entry.S */ -void __iomem *auxio_register = 0UL; +void __iomem *auxio_register = NULL; enum auxio_type { AUXIO_TYPE_NODEV, diff -Nru a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c --- a/arch/sparc64/kernel/sys_sparc32.c 2005-02-22 20:30:44 -08:00 +++ b/arch/sparc64/kernel/sys_sparc32.c 2005-02-22 20:30:44 -08:00 @@ -242,7 +242,7 @@ static long get_tv32(struct timeval *o, struct compat_timeval __user *i) { - return (!access_ok(VERIFY_READ, tv32, sizeof(*tv32)) || + return (!access_ok(VERIFY_READ, i, sizeof(*i)) || (__get_user(o->tv_sec, &i->tv_sec) | __get_user(o->tv_usec, &i->tv_usec))); } @@ -254,602 +254,70 @@ __put_user(i->tv_usec, &o->tv_usec))); } -struct msgbuf32 { s32 mtype; char mtext[1]; }; - -struct ipc_perm32 { - key_t key; - compat_uid_t uid; - compat_gid_t gid; - compat_uid_t cuid; - compat_gid_t cgid; - compat_mode_t mode; - unsigned short seq; -}; - -struct semid_ds32 { - struct ipc_perm32 sem_perm; /* permissions .. see ipc.h */ - compat_time_t sem_otime; /* last semop time */ - compat_time_t sem_ctime; /* last change time */ - u32 sem_base; /* ptr to first semaphore in array */ - u32 sem_pending; /* pending operations to be processed */ - u32 sem_pending_last; /* last pending operation */ - u32 undo; /* undo requests on this array */ - unsigned short sem_nsems; /* no. of semaphores in array */ -}; - -struct semid64_ds32 { - struct ipc64_perm sem_perm; /* this structure is the same on sparc32 and sparc64 */ - unsigned int __pad1; - compat_time_t sem_otime; - unsigned int __pad2; - compat_time_t sem_ctime; - u32 sem_nsems; - u32 __unused1; - u32 __unused2; -}; - -struct msqid_ds32 -{ - struct ipc_perm32 msg_perm; - u32 msg_first; - u32 msg_last; - compat_time_t msg_stime; - compat_time_t msg_rtime; - compat_time_t msg_ctime; - u32 wwait; - u32 rwait; - unsigned short msg_cbytes; - unsigned short msg_qnum; - unsigned short msg_qbytes; - compat_ipc_pid_t msg_lspid; - compat_ipc_pid_t msg_lrpid; -}; - -struct msqid64_ds32 { - struct ipc64_perm msg_perm; - unsigned int __pad1; - compat_time_t msg_stime; - unsigned int __pad2; - compat_time_t msg_rtime; - unsigned int __pad3; - compat_time_t msg_ctime; - unsigned int msg_cbytes; - unsigned int msg_qnum; - unsigned int msg_qbytes; - compat_pid_t msg_lspid; - compat_pid_t msg_lrpid; - unsigned int __unused1; - unsigned int __unused2; -}; - - -struct shmid_ds32 { - struct ipc_perm32 shm_perm; - int shm_segsz; - compat_time_t shm_atime; - compat_time_t shm_dtime; - compat_time_t shm_ctime; - compat_ipc_pid_t shm_cpid; - compat_ipc_pid_t shm_lpid; - unsigned short shm_nattch; -}; - -struct shmid64_ds32 { - struct ipc64_perm shm_perm; - unsigned int __pad1; - compat_time_t shm_atime; - unsigned int __pad2; - compat_time_t shm_dtime; - unsigned int __pad3; - compat_time_t shm_ctime; - compat_size_t shm_segsz; - compat_pid_t shm_cpid; - compat_pid_t shm_lpid; - unsigned int shm_nattch; - unsigned int __unused1; - unsigned int __unused2; -}; - - -/* - * sys32_ipc() is the de-multiplexer for the SysV IPC calls in 32bit emulation.. - * - * This is really horribly ugly. - */ -#define IPCOP_MASK(__x) (1UL << ((__x)&~IPC_64)) -static int do_sys32_semctl(int first, int second, int third, - compat_uptr_t __user *uptr) -{ - union semun fourth; - compat_uptr_t pad; - int err = -EINVAL; - - if (!uptr) - goto out; - err = -EFAULT; - if (get_user(pad, uptr)) - goto out; - if ((third & ~IPC_64) == SETVAL) - fourth.val = (int)pad; - else - fourth.__pad = compat_ptr(pad); - if (IPCOP_MASK (third) & - (IPCOP_MASK (IPC_INFO) | IPCOP_MASK (SEM_INFO) | IPCOP_MASK (GETVAL) | - IPCOP_MASK (GETPID) | IPCOP_MASK (GETNCNT) | IPCOP_MASK (GETZCNT) | - IPCOP_MASK (GETALL) | IPCOP_MASK (SETALL) | IPCOP_MASK (IPC_RMID))) { - err = sys_semctl (first, second, third, fourth); - } else if (third & IPC_64) { - struct semid64_ds s; - struct semid64_ds32 __user *usp = compat_ptr(pad); - mm_segment_t old_fs; - int need_back_translation; - - if (third == (IPC_SET|IPC_64)) { - err = get_user (s.sem_perm.uid, &usp->sem_perm.uid); - err |= __get_user (s.sem_perm.gid, &usp->sem_perm.gid); - err |= __get_user (s.sem_perm.mode, &usp->sem_perm.mode); - if (err) - goto out; - fourth.__pad = (void __user *) &s; - } - need_back_translation = - (IPCOP_MASK (third) & - (IPCOP_MASK (SEM_STAT) | IPCOP_MASK (IPC_STAT))) != 0; - if (need_back_translation) - fourth.__pad = (void __user *) &s; - old_fs = get_fs (); - set_fs (KERNEL_DS); - err = sys_semctl (first, second, third, fourth); - set_fs (old_fs); - if (need_back_translation) { - int err2 = copy_to_user (&usp->sem_perm, &s.sem_perm, sizeof(struct ipc64_perm) + 2*sizeof(time_t)); - err2 |= __put_user (s.sem_nsems, &usp->sem_nsems); - if (err2) err = -EFAULT; - } - } else { - struct semid_ds s; - struct semid_ds32 __user *usp = compat_ptr(pad); - mm_segment_t old_fs; - int need_back_translation; - - if (third == IPC_SET) { - err = get_user (s.sem_perm.uid, &usp->sem_perm.uid); - err |= __get_user (s.sem_perm.gid, &usp->sem_perm.gid); - err |= __get_user (s.sem_perm.mode, &usp->sem_perm.mode); - if (err) - goto out; - fourth.__pad = (void __user *) &s; - } - need_back_translation = - (IPCOP_MASK (third) & - (IPCOP_MASK (SEM_STAT) | IPCOP_MASK (IPC_STAT))) != 0; - if (need_back_translation) - fourth.__pad = (void __user *) &s; - old_fs = get_fs (); - set_fs (KERNEL_DS); - err = sys_semctl (first, second, third, fourth); - set_fs (old_fs); - if (need_back_translation) { - int err2 = put_user (s.sem_perm.key, &usp->sem_perm.key); - err2 |= __put_user (high2lowuid(s.sem_perm.uid), &usp->sem_perm.uid); - err2 |= __put_user (high2lowgid(s.sem_perm.gid), &usp->sem_perm.gid); - err2 |= __put_user (high2lowuid(s.sem_perm.cuid), &usp->sem_perm.cuid); - err2 |= __put_user (high2lowgid(s.sem_perm.cgid), &usp->sem_perm.cgid); - err2 |= __put_user (s.sem_perm.mode, &usp->sem_perm.mode); - err2 |= __put_user (s.sem_perm.seq, &usp->sem_perm.seq); - err2 |= __put_user (s.sem_otime, &usp->sem_otime); - err2 |= __put_user (s.sem_ctime, &usp->sem_ctime); - err2 |= __put_user (s.sem_nsems, &usp->sem_nsems); - if (err2) err = -EFAULT; - } - } -out: - return err; -} - -static int do_sys32_msgsnd(int first, int second, int third, - void __user *uptr) -{ - struct msgbuf32 __user *up = uptr; - struct msgbuf *p; - mm_segment_t old_fs; - int err; - - p = kmalloc(second + sizeof (struct msgbuf), GFP_USER); - if (!p) - return -ENOMEM; - err = -EFAULT; - if (get_user (p->mtype, &up->mtype) || - __copy_from_user (p->mtext, &up->mtext, second)) - goto out; - old_fs = get_fs (); - set_fs (KERNEL_DS); - err = sys_msgsnd (first, (struct msgbuf __user *) p, - second, third); - set_fs (old_fs); -out: - kfree (p); - return err; -} - -static int do_sys32_msgrcv(int first, int second, int msgtyp, int third, - int version, void __user *uptr) -{ - struct msgbuf32 __user *up; - struct msgbuf *p; - mm_segment_t old_fs; - int err; - - if (!version) { - struct ipc_kludge __user *uipck = uptr; - struct ipc_kludge ipck; - - err = -EINVAL; - if (!uptr) - goto out; - err = -EFAULT; - if (copy_from_user (&ipck, uipck, - sizeof (struct ipc_kludge))) - goto out; - uptr = compat_ptr(ipck.msgp); - msgtyp = ipck.msgtyp; - } - err = -ENOMEM; - p = kmalloc(second + sizeof (struct msgbuf), GFP_USER); - if (!p) - goto out; - old_fs = get_fs (); - set_fs (KERNEL_DS); - err = sys_msgrcv (first, (struct msgbuf __user *) p, second, - msgtyp, third); - set_fs (old_fs); - if (err < 0) - goto free_then_out; - up = uptr; - if (put_user (p->mtype, &up->mtype) || - __copy_to_user (&up->mtext, p->mtext, err)) - err = -EFAULT; -free_then_out: - kfree (p); -out: - return err; -} - -static int do_sys32_msgctl(int first, int second, void __user *uptr) -{ - int err; - - if (IPCOP_MASK (second) & - (IPCOP_MASK (IPC_INFO) | IPCOP_MASK (MSG_INFO) | - IPCOP_MASK (IPC_RMID))) { - err = sys_msgctl (first, second, uptr); - } else if (second & IPC_64) { - struct msqid64_ds m; - struct msqid64_ds32 __user *up = uptr; - mm_segment_t old_fs; - - if (second == (IPC_SET|IPC_64)) { - err = get_user (m.msg_perm.uid, - &up->msg_perm.uid); - err |= __get_user (m.msg_perm.gid, - &up->msg_perm.gid); - err |= __get_user (m.msg_perm.mode, - &up->msg_perm.mode); - err |= __get_user (m.msg_qbytes, - &up->msg_qbytes); - if (err) - goto out; - } - old_fs = get_fs (); - set_fs (KERNEL_DS); - err = sys_msgctl(first, second, - (struct msqid_ds __user *)&m); - set_fs (old_fs); - if (IPCOP_MASK (second) & - (IPCOP_MASK (MSG_STAT) | IPCOP_MASK (IPC_STAT))) { - int err2 = copy_to_user(&up->msg_perm, - &m.msg_perm, - (sizeof(struct ipc64_perm) + 3*sizeof(time_t))); - err2 |= __put_user (m.msg_cbytes, - &up->msg_cbytes); - err2 |= __put_user (m.msg_qnum, &up->msg_qnum); - err2 |= __put_user (m.msg_qbytes, - &up->msg_qbytes); - err2 |= __put_user (m.msg_lspid, &up->msg_lspid); - err2 |= __put_user (m.msg_lrpid, &up->msg_lrpid); - if (err2) - err = -EFAULT; - } - } else { - struct msqid_ds m; - struct msqid_ds32 __user *up = uptr; - mm_segment_t old_fs; - - if (second == IPC_SET) { - err = get_user(m.msg_perm.uid, - &up->msg_perm.uid); - err |= __get_user(m.msg_perm.gid, - &up->msg_perm.gid); - err |= __get_user(m.msg_perm.mode, - &up->msg_perm.mode); - err |= __get_user(m.msg_qbytes, - &up->msg_qbytes); - if (err) - goto out; - } - old_fs = get_fs (); - set_fs (KERNEL_DS); - err = sys_msgctl(first, second, - (struct msqid_ds __user *) &m); - set_fs (old_fs); - if (IPCOP_MASK (second) & - (IPCOP_MASK (MSG_STAT) | IPCOP_MASK (IPC_STAT))) { - int err2 = put_user(m.msg_perm.key, - &up->msg_perm.key); - err2 |= __put_user(high2lowuid(m.msg_perm.uid), - &up->msg_perm.uid); - err2 |= __put_user(high2lowgid(m.msg_perm.gid), - &up->msg_perm.gid); - err2 |= __put_user(high2lowuid(m.msg_perm.cuid), - &up->msg_perm.cuid); - err2 |= __put_user(high2lowgid(m.msg_perm.cgid), - &up->msg_perm.cgid); - err2 |= __put_user(m.msg_perm.mode, - &up->msg_perm.mode); - err2 |= __put_user(m.msg_perm.seq, - &up->msg_perm.seq); - err2 |= __put_user(m.msg_stime, &up->msg_stime); - err2 |= __put_user(m.msg_rtime, &up->msg_rtime); - err2 |= __put_user(m.msg_ctime, &up->msg_ctime); - err2 |= __put_user(m.msg_cbytes, - &up->msg_cbytes); - err2 |= __put_user(m.msg_qnum, &up->msg_qnum); - err2 |= __put_user(m.msg_qbytes, - &up->msg_qbytes); - err2 |= __put_user(m.msg_lspid, &up->msg_lspid); - err2 |= __put_user(m.msg_lrpid, &up->msg_lrpid); - if (err2) - err = -EFAULT; - } - } - -out: - return err; -} - -static int do_sys32_shmat (int first, int second, int third, int version, void __user *uptr) -{ - unsigned long raddr; - u32 __user *uaddr = compat_ptr((compat_uptr_t)third); - int err = -EINVAL; - - if (version == 1) - goto out; - err = do_shmat (first, uptr, second, &raddr); - if (err) - goto out; - err = put_user (raddr, uaddr); -out: - return err; -} - -static int do_sys32_shmctl(int first, int second, void __user *uptr) -{ - int err; - - if (IPCOP_MASK (second) & - (IPCOP_MASK (IPC_INFO) | IPCOP_MASK (SHM_LOCK) | - IPCOP_MASK (SHM_UNLOCK) | IPCOP_MASK (IPC_RMID))) { - if (second == (IPC_INFO|IPC_64)) { - /* So that we don't have to translate it */ - second = IPC_INFO; - } - err = sys_shmctl(first, second, uptr); - } else if ((second & IPC_64) && second != (SHM_INFO|IPC_64)) { - struct shmid64_ds s; - struct shmid64_ds32 __user *up = uptr; - mm_segment_t old_fs; - - if (second == (IPC_SET|IPC_64)) { - err = get_user(s.shm_perm.uid, - &up->shm_perm.uid); - err |= __get_user(s.shm_perm.gid, - &up->shm_perm.gid); - err |= __get_user(s.shm_perm.mode, - &up->shm_perm.mode); - if (err) - goto out; - } - old_fs = get_fs(); - set_fs(KERNEL_DS); - err = sys_shmctl(first, second, - (struct shmid_ds __user *)&s); - set_fs(old_fs); - if (err < 0) - goto out; - - /* Mask it even in this case so it becomes a CSE. */ - if (IPCOP_MASK (second) & - (IPCOP_MASK (SHM_STAT) | IPCOP_MASK (IPC_STAT))) { - int err2 = copy_to_user(&up->shm_perm, - &s.shm_perm, - sizeof(struct ipc64_perm) + 3*sizeof(time_t)); - err2 |= __put_user(s.shm_segsz, &up->shm_segsz); - err2 |= __put_user(s.shm_nattch,&up->shm_nattch); - err2 |= __put_user(s.shm_cpid, &up->shm_cpid); - err2 |= __put_user(s.shm_lpid, &up->shm_lpid); - if (err2) - err = -EFAULT; - } - } else { - struct shmid_ds s; - struct shmid_ds32 __user *up = uptr; - mm_segment_t old_fs; - - second &= ~IPC_64; - if (second == IPC_SET) { - err = get_user(s.shm_perm.uid, - &up->shm_perm.uid); - err |= __get_user(s.shm_perm.gid, - &up->shm_perm.gid); - err |= __get_user(s.shm_perm.mode, - &up->shm_perm.mode); - if (err) - goto out; - } - old_fs = get_fs(); - set_fs(KERNEL_DS); - err = sys_shmctl(first, second, - (struct shmid_ds __user *) &s); - set_fs(old_fs); - if (err < 0) - goto out; - - /* Mask it even in this case so it becomes a CSE. */ - if (second == SHM_INFO) { - struct shm_info32 { - int used_ids; - u32 shm_tot, shm_rss, shm_swp; - u32 swap_attempts, swap_successes; - }; - struct shm_info32 __user *uip = uptr; - struct shm_info *kp = (struct shm_info *) &s; - int err2 = put_user(kp->used_ids, - &uip->used_ids); - err2 |= __put_user(kp->shm_tot, &uip->shm_tot); - err2 |= __put_user(kp->shm_rss, &uip->shm_rss); - err2 |= __put_user(kp->shm_swp, &uip->shm_swp); - err2 |= __put_user(kp->swap_attempts, - &uip->swap_attempts); - err2 |= __put_user(kp->swap_successes, - &uip->swap_successes); - if (err2) - err = -EFAULT; - } else if (IPCOP_MASK (second) & - (IPCOP_MASK (SHM_STAT) | - IPCOP_MASK (IPC_STAT))) { - int err2; - - err2 = put_user(s.shm_perm.key, - &up->shm_perm.key); - err2 |= __put_user(high2lowuid(s.shm_perm.uid), - &up->shm_perm.uid); - err2 |= __put_user(high2lowuid(s.shm_perm.gid), - &up->shm_perm.gid); - err2 |= __put_user(high2lowuid(s.shm_perm.cuid), - &up->shm_perm.cuid); - err2 |= __put_user(high2lowuid(s.shm_perm.cgid), - &up->shm_perm.cgid); - err2 |= __put_user(s.shm_perm.mode, - &up->shm_perm.mode); - err2 |= __put_user(s.shm_perm.seq, - &up->shm_perm.seq); - err2 |= __put_user(s.shm_atime, &up->shm_atime); - err2 |= __put_user(s.shm_dtime, &up->shm_dtime); - err2 |= __put_user(s.shm_ctime, &up->shm_ctime); - err2 |= __put_user(s.shm_segsz, &up->shm_segsz); - err2 |= __put_user(s.shm_nattch,&up->shm_nattch); - err2 |= __put_user(s.shm_cpid, &up->shm_cpid); - err2 |= __put_user(s.shm_lpid, &up->shm_lpid); - if (err2) - err = -EFAULT; - } - } -out: - return err; -} - -static int sys32_semtimedop(int semid, struct sembuf __user *tsems, - int nsems, - const struct compat_timespec __user *timeout32) -{ - struct compat_timespec t32; - struct timespec __user *t64; - - t64 = compat_alloc_user_space(sizeof(*t64)); - if (copy_from_user(&t32, timeout32, sizeof(t32))) - return -EFAULT; - - if (put_user(t32.tv_sec, &t64->tv_sec) || - put_user(t32.tv_nsec, &t64->tv_nsec)) - return -EFAULT; - - return sys_semtimedop(semid, tsems, nsems, t64); -} - -asmlinkage long compat_sys_ipc(u32 call, int first, int second, int third, compat_uptr_t __ptr, u32 fifth) +#ifdef CONFIG_SYSVIPC +asmlinkage long compat_sys_ipc(u32 call, u32 first, u32 second, u32 third, compat_uptr_t ptr, u32 fifth) { - int version, err; - void __user *ptr = compat_ptr(__ptr); + int version; version = call >> 16; /* hack for backward compatibility */ call &= 0xffff; - if (call <= SEMCTL) { - switch (call) { - case SEMOP: - /* struct sembuf is the same on 32 and 64 :)) */ - err = sys_semtimedop (first, ptr, second, NULL); - goto out; - case SEMTIMEDOP: - err = sys32_semtimedop(first, ptr, second, - compat_ptr(fifth)); - case SEMGET: - err = sys_semget(first, second, third); - goto out; - case SEMCTL: - err = do_sys32_semctl(first, second, third, ptr); - goto out; - default: - err = -ENOSYS; - goto out; - }; - } - if (call <= MSGCTL) { - switch (call) { - case MSGSND: - err = do_sys32_msgsnd(first, second, third, ptr); - goto out; - case MSGRCV: - err = do_sys32_msgrcv(first, second, fifth, - third, version, ptr); - goto out; - case MSGGET: - err = sys_msgget((key_t) first, second); - goto out; - case MSGCTL: - err = do_sys32_msgctl(first, second, ptr); - goto out; - default: - err = -ENOSYS; - goto out; - }; - } - if (call <= SHMCTL) { - switch (call) { - case SHMAT: - err = do_sys32_shmat(first, second, third, - version, ptr); - goto out; - case SHMDT: - err = sys_shmdt(ptr); - goto out; - case SHMGET: - err = sys_shmget(first, (unsigned)second, third); - goto out; - case SHMCTL: - err = do_sys32_shmctl(first, second, ptr); - goto out; - default: - err = -ENOSYS; - goto out; - }; - } - err = -ENOSYS; + switch (call) { + case SEMTIMEDOP: + if (third) + /* sign extend semid */ + return compat_sys_semtimedop((int)first, + compat_ptr(ptr), second, + compat_ptr(third)); + /* else fall through for normal semop() */ + case SEMOP: + /* struct sembuf is the same on 32 and 64bit :)) */ + /* sign extend semid */ + return sys_semtimedop((int)first, compat_ptr(ptr), second, + NULL); + case SEMGET: + /* sign extend key, nsems */ + return sys_semget((int)first, (int)second, third); + case SEMCTL: + /* sign extend semid, semnum */ + return compat_sys_semctl((int)first, (int)second, third, + compat_ptr(ptr)); + + case MSGSND: + /* sign extend msqid */ + return compat_sys_msgsnd((int)first, (int)second, third, + compat_ptr(ptr)); + case MSGRCV: + /* sign extend msqid, msgtyp */ + return compat_sys_msgrcv((int)first, second, (int)fifth, + third, version, compat_ptr(ptr)); + case MSGGET: + /* sign extend key */ + return sys_msgget((int)first, second); + case MSGCTL: + /* sign extend msqid */ + return compat_sys_msgctl((int)first, second, compat_ptr(ptr)); + + case SHMAT: + /* sign extend shmid */ + return compat_sys_shmat((int)first, second, third, version, + compat_ptr(ptr)); + case SHMDT: + return sys_shmdt(compat_ptr(ptr)); + case SHMGET: + /* sign extend key_t */ + return sys_shmget((int)first, second, third); + case SHMCTL: + /* sign extend shmid */ + return compat_sys_shmctl((int)first, second, compat_ptr(ptr)); + + default: + return -ENOSYS; + }; -out: - return err; + return -ENOSYS; } +#endif asmlinkage long sys32_truncate64(const char __user * path, unsigned long high, unsigned long low) { diff -Nru a/arch/sparc64/lib/U1memcpy.S b/arch/sparc64/lib/U1memcpy.S --- a/arch/sparc64/lib/U1memcpy.S 2005-02-22 20:30:43 -08:00 +++ b/arch/sparc64/lib/U1memcpy.S 2005-02-22 20:30:43 -08:00 @@ -119,6 +119,9 @@ .globl FUNC_NAME .type FUNC_NAME,#function FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */ + srlx %o2, 31, %g2 + cmp %g2, 0 + tne %xcc, 5 PREAMBLE mov %o0, %g5 cmp %o2, 0 diff -Nru a/arch/sparc64/lib/U3memcpy.S b/arch/sparc64/lib/U3memcpy.S --- a/arch/sparc64/lib/U3memcpy.S 2005-02-22 20:30:44 -08:00 +++ b/arch/sparc64/lib/U3memcpy.S 2005-02-22 20:30:44 -08:00 @@ -80,6 +80,9 @@ .globl FUNC_NAME .type FUNC_NAME,#function FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */ + srlx %o2, 31, %g2 + cmp %g2, 0 + tne %xcc, 5 PREAMBLE mov %o0, %g5 cmp %o2, 0 diff -Nru a/arch/sparc64/prom/Makefile b/arch/sparc64/prom/Makefile --- a/arch/sparc64/prom/Makefile 2005-02-22 20:30:44 -08:00 +++ b/arch/sparc64/prom/Makefile 2005-02-22 20:30:44 -08:00 @@ -7,4 +7,4 @@ EXTRA_CFLAGS := -Werror lib-y := bootstr.o devops.o init.o memory.o misc.o \ - tree.o console.o printf.o p1275.o map.o + tree.o console.o printf.o p1275.o map.o cif.o diff -Nru a/arch/sparc64/prom/cif.S b/arch/sparc64/prom/cif.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/sparc64/prom/cif.S 2005-02-22 20:30:44 -08:00 @@ -0,0 +1,225 @@ +/* cif.S: PROM entry/exit assembler trampolines. + * + * Copyright (C) 1996,1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) + * Copyright (C) 2005 David S. Miller + */ + +#include + + .text + .globl prom_cif_interface +prom_cif_interface: + sethi %hi(p1275buf), %o0 + or %o0, %lo(p1275buf), %o0 + ldx [%o0 + 0x010], %o1 ! prom_cif_stack + save %o1, -0x190, %sp + ldx [%i0 + 0x008], %l2 ! prom_cif_handler + rdpr %pstate, %l4 + wrpr %g0, 0x15, %pstate ! save alternate globals + stx %g1, [%sp + 2047 + 0x0b0] + stx %g2, [%sp + 2047 + 0x0b8] + stx %g3, [%sp + 2047 + 0x0c0] + stx %g4, [%sp + 2047 + 0x0c8] + stx %g5, [%sp + 2047 + 0x0d0] + stx %g6, [%sp + 2047 + 0x0d8] + stx %g7, [%sp + 2047 + 0x0e0] + wrpr %g0, 0x814, %pstate ! save interrupt globals + stx %g1, [%sp + 2047 + 0x0e8] + stx %g2, [%sp + 2047 + 0x0f0] + stx %g3, [%sp + 2047 + 0x0f8] + stx %g4, [%sp + 2047 + 0x100] + stx %g5, [%sp + 2047 + 0x108] + stx %g6, [%sp + 2047 + 0x110] + stx %g7, [%sp + 2047 + 0x118] + wrpr %g0, 0x14, %pstate ! save normal globals + stx %g1, [%sp + 2047 + 0x120] + stx %g2, [%sp + 2047 + 0x128] + stx %g3, [%sp + 2047 + 0x130] + stx %g4, [%sp + 2047 + 0x138] + stx %g5, [%sp + 2047 + 0x140] + stx %g6, [%sp + 2047 + 0x148] + stx %g7, [%sp + 2047 + 0x150] + wrpr %g0, 0x414, %pstate ! save mmu globals + stx %g1, [%sp + 2047 + 0x158] + stx %g2, [%sp + 2047 + 0x160] + stx %g3, [%sp + 2047 + 0x168] + stx %g4, [%sp + 2047 + 0x170] + stx %g5, [%sp + 2047 + 0x178] + stx %g6, [%sp + 2047 + 0x180] + stx %g7, [%sp + 2047 + 0x188] + mov %g1, %l0 ! also save to locals, so we can handle + mov %g2, %l1 ! tlb faults later on, when accessing + mov %g3, %l3 ! the stack. + mov %g7, %l5 + wrpr %l4, PSTATE_IE, %pstate ! turn off interrupts + call %l2 + add %i0, 0x018, %o0 ! prom_args + wrpr %g0, 0x414, %pstate ! restore mmu globals + mov %l0, %g1 + mov %l1, %g2 + mov %l3, %g3 + mov %l5, %g7 + wrpr %g0, 0x14, %pstate ! restore normal globals + ldx [%sp + 2047 + 0x120], %g1 + ldx [%sp + 2047 + 0x128], %g2 + ldx [%sp + 2047 + 0x130], %g3 + ldx [%sp + 2047 + 0x138], %g4 + ldx [%sp + 2047 + 0x140], %g5 + ldx [%sp + 2047 + 0x148], %g6 + ldx [%sp + 2047 + 0x150], %g7 + wrpr %g0, 0x814, %pstate ! restore interrupt globals + ldx [%sp + 2047 + 0x0e8], %g1 + ldx [%sp + 2047 + 0x0f0], %g2 + ldx [%sp + 2047 + 0x0f8], %g3 + ldx [%sp + 2047 + 0x100], %g4 + ldx [%sp + 2047 + 0x108], %g5 + ldx [%sp + 2047 + 0x110], %g6 + ldx [%sp + 2047 + 0x118], %g7 + wrpr %g0, 0x15, %pstate ! restore alternate globals + ldx [%sp + 2047 + 0x0b0], %g1 + ldx [%sp + 2047 + 0x0b8], %g2 + ldx [%sp + 2047 + 0x0c0], %g3 + ldx [%sp + 2047 + 0x0c8], %g4 + ldx [%sp + 2047 + 0x0d0], %g5 + ldx [%sp + 2047 + 0x0d8], %g6 + ldx [%sp + 2047 + 0x0e0], %g7 + wrpr %l4, 0, %pstate ! restore original pstate + ret + restore + + .globl prom_cif_callback +prom_cif_callback: + sethi %hi(p1275buf), %o1 + or %o1, %lo(p1275buf), %o1 + save %sp, -0x270, %sp + rdpr %pstate, %l4 + wrpr %g0, 0x15, %pstate ! save PROM alternate globals + stx %g1, [%sp + 2047 + 0x0b0] + stx %g2, [%sp + 2047 + 0x0b8] + stx %g3, [%sp + 2047 + 0x0c0] + stx %g4, [%sp + 2047 + 0x0c8] + stx %g5, [%sp + 2047 + 0x0d0] + stx %g6, [%sp + 2047 + 0x0d8] + stx %g7, [%sp + 2047 + 0x0e0] + ! restore Linux alternate globals + ldx [%sp + 2047 + 0x190], %g1 + ldx [%sp + 2047 + 0x198], %g2 + ldx [%sp + 2047 + 0x1a0], %g3 + ldx [%sp + 2047 + 0x1a8], %g4 + ldx [%sp + 2047 + 0x1b0], %g5 + ldx [%sp + 2047 + 0x1b8], %g6 + ldx [%sp + 2047 + 0x1c0], %g7 + wrpr %g0, 0x814, %pstate ! save PROM interrupt globals + stx %g1, [%sp + 2047 + 0x0e8] + stx %g2, [%sp + 2047 + 0x0f0] + stx %g3, [%sp + 2047 + 0x0f8] + stx %g4, [%sp + 2047 + 0x100] + stx %g5, [%sp + 2047 + 0x108] + stx %g6, [%sp + 2047 + 0x110] + stx %g7, [%sp + 2047 + 0x118] + ! restore Linux interrupt globals + ldx [%sp + 2047 + 0x1c8], %g1 + ldx [%sp + 2047 + 0x1d0], %g2 + ldx [%sp + 2047 + 0x1d8], %g3 + ldx [%sp + 2047 + 0x1e0], %g4 + ldx [%sp + 2047 + 0x1e8], %g5 + ldx [%sp + 2047 + 0x1f0], %g6 + ldx [%sp + 2047 + 0x1f8], %g7 + wrpr %g0, 0x14, %pstate ! save PROM normal globals + stx %g1, [%sp + 2047 + 0x120] + stx %g2, [%sp + 2047 + 0x128] + stx %g3, [%sp + 2047 + 0x130] + stx %g4, [%sp + 2047 + 0x138] + stx %g5, [%sp + 2047 + 0x140] + stx %g6, [%sp + 2047 + 0x148] + stx %g7, [%sp + 2047 + 0x150] + ! restore Linux normal globals + ldx [%sp + 2047 + 0x200], %g1 + ldx [%sp + 2047 + 0x208], %g2 + ldx [%sp + 2047 + 0x210], %g3 + ldx [%sp + 2047 + 0x218], %g4 + ldx [%sp + 2047 + 0x220], %g5 + ldx [%sp + 2047 + 0x228], %g6 + ldx [%sp + 2047 + 0x230], %g7 + wrpr %g0, 0x414, %pstate ! save PROM mmu globals + stx %g1, [%sp + 2047 + 0x158] + stx %g2, [%sp + 2047 + 0x160] + stx %g3, [%sp + 2047 + 0x168] + stx %g4, [%sp + 2047 + 0x170] + stx %g5, [%sp + 2047 + 0x178] + stx %g6, [%sp + 2047 + 0x180] + stx %g7, [%sp + 2047 + 0x188] + ! restore Linux mmu globals + ldx [%sp + 2047 + 0x238], %o0 + ldx [%sp + 2047 + 0x240], %o1 + ldx [%sp + 2047 + 0x248], %l2 + ldx [%sp + 2047 + 0x250], %l3 + ldx [%sp + 2047 + 0x258], %l5 + ldx [%sp + 2047 + 0x260], %l6 + ldx [%sp + 2047 + 0x268], %l7 + ! switch to Linux tba + sethi %hi(sparc64_ttable_tl0), %l1 + rdpr %tba, %l0 ! save PROM tba + mov %o0, %g1 + mov %o1, %g2 + mov %l2, %g3 + mov %l3, %g4 + mov %l5, %g5 + mov %l6, %g6 + mov %l7, %g7 + wrpr %l1, %tba ! install Linux tba + wrpr %l4, 0, %pstate ! restore PSTATE + call prom_world + mov %g0, %o0 + ldx [%i1 + 0x000], %l2 + call %l2 + mov %i0, %o0 + mov %o0, %l1 + call prom_world + or %g0, 1, %o0 + wrpr %g0, 0x14, %pstate ! interrupts off + ! restore PROM mmu globals + ldx [%sp + 2047 + 0x158], %o0 + ldx [%sp + 2047 + 0x160], %o1 + ldx [%sp + 2047 + 0x168], %l2 + ldx [%sp + 2047 + 0x170], %l3 + ldx [%sp + 2047 + 0x178], %l5 + ldx [%sp + 2047 + 0x180], %l6 + ldx [%sp + 2047 + 0x188], %l7 + wrpr %g0, 0x414, %pstate ! restore PROM mmu globals + mov %o0, %g1 + mov %o1, %g2 + mov %l2, %g3 + mov %l3, %g4 + mov %l5, %g5 + mov %l6, %g6 + mov %l7, %g7 + wrpr %l0, %tba ! restore PROM tba + wrpr %g0, 0x14, %pstate ! restore PROM normal globals + ldx [%sp + 2047 + 0x120], %g1 + ldx [%sp + 2047 + 0x128], %g2 + ldx [%sp + 2047 + 0x130], %g3 + ldx [%sp + 2047 + 0x138], %g4 + ldx [%sp + 2047 + 0x140], %g5 + ldx [%sp + 2047 + 0x148], %g6 + ldx [%sp + 2047 + 0x150], %g7 + wrpr %g0, 0x814, %pstate ! restore PROM interrupt globals + ldx [%sp + 2047 + 0x0e8], %g1 + ldx [%sp + 2047 + 0x0f0], %g2 + ldx [%sp + 2047 + 0x0f8], %g3 + ldx [%sp + 2047 + 0x100], %g4 + ldx [%sp + 2047 + 0x108], %g5 + ldx [%sp + 2047 + 0x110], %g6 + ldx [%sp + 2047 + 0x118], %g7 + wrpr %g0, 0x15, %pstate ! restore PROM alternate globals + ldx [%sp + 2047 + 0x0b0], %g1 + ldx [%sp + 2047 + 0x0b8], %g2 + ldx [%sp + 2047 + 0x0c0], %g3 + ldx [%sp + 2047 + 0x0c8], %g4 + ldx [%sp + 2047 + 0x0d0], %g5 + ldx [%sp + 2047 + 0x0d8], %g6 + ldx [%sp + 2047 + 0x0e0], %g7 + wrpr %l4, 0, %pstate + ret + restore %l1, 0, %o0 + diff -Nru a/arch/sparc64/prom/p1275.c b/arch/sparc64/prom/p1275.c --- a/arch/sparc64/prom/p1275.c 2005-02-22 20:30:43 -08:00 +++ b/arch/sparc64/prom/p1275.c 2005-02-22 20:30:43 -08:00 @@ -27,225 +27,8 @@ extern void prom_world(int); -void prom_cif_interface (void) -{ - __asm__ __volatile__ ( -" mov %0, %%o0\n" -" ldx [%%o0 + 0x010], %%o1 ! prom_cif_stack\n" -" save %%o1, -0x190, %%sp\n" -" ldx [%%i0 + 0x008], %%l2 ! prom_cif_handler\n" -" rdpr %%pstate, %%l4\n" -" wrpr %%g0, 0x15, %%pstate ! save alternate globals\n" -" stx %%g1, [%%sp + 2047 + 0x0b0]\n" -" stx %%g2, [%%sp + 2047 + 0x0b8]\n" -" stx %%g3, [%%sp + 2047 + 0x0c0]\n" -" stx %%g4, [%%sp + 2047 + 0x0c8]\n" -" stx %%g5, [%%sp + 2047 + 0x0d0]\n" -" stx %%g6, [%%sp + 2047 + 0x0d8]\n" -" stx %%g7, [%%sp + 2047 + 0x0e0]\n" -" wrpr %%g0, 0x814, %%pstate ! save interrupt globals\n" -" stx %%g1, [%%sp + 2047 + 0x0e8]\n" -" stx %%g2, [%%sp + 2047 + 0x0f0]\n" -" stx %%g3, [%%sp + 2047 + 0x0f8]\n" -" stx %%g4, [%%sp + 2047 + 0x100]\n" -" stx %%g5, [%%sp + 2047 + 0x108]\n" -" stx %%g6, [%%sp + 2047 + 0x110]\n" -" stx %%g7, [%%sp + 2047 + 0x118]\n" -" wrpr %%g0, 0x14, %%pstate ! save normal globals\n" -" stx %%g1, [%%sp + 2047 + 0x120]\n" -" stx %%g2, [%%sp + 2047 + 0x128]\n" -" stx %%g3, [%%sp + 2047 + 0x130]\n" -" stx %%g4, [%%sp + 2047 + 0x138]\n" -" stx %%g5, [%%sp + 2047 + 0x140]\n" -" stx %%g6, [%%sp + 2047 + 0x148]\n" -" stx %%g7, [%%sp + 2047 + 0x150]\n" -" wrpr %%g0, 0x414, %%pstate ! save mmu globals\n" -" stx %%g1, [%%sp + 2047 + 0x158]\n" -" stx %%g2, [%%sp + 2047 + 0x160]\n" -" stx %%g3, [%%sp + 2047 + 0x168]\n" -" stx %%g4, [%%sp + 2047 + 0x170]\n" -" stx %%g5, [%%sp + 2047 + 0x178]\n" -" stx %%g6, [%%sp + 2047 + 0x180]\n" -" stx %%g7, [%%sp + 2047 + 0x188]\n" -" mov %%g1, %%l0 ! also save to locals, so we can handle\n" -" mov %%g2, %%l1 ! tlb faults later on, when accessing\n" -" mov %%g3, %%l3 ! the stack.\n" -" mov %%g7, %%l5\n" -" wrpr %%l4, %1, %%pstate ! turn off interrupts\n" -" call %%l2\n" -" add %%i0, 0x018, %%o0 ! prom_args\n" -" wrpr %%g0, 0x414, %%pstate ! restore mmu globals\n" -" mov %%l0, %%g1\n" -" mov %%l1, %%g2\n" -" mov %%l3, %%g3\n" -" mov %%l5, %%g7\n" -" wrpr %%g0, 0x14, %%pstate ! restore normal globals\n" -" ldx [%%sp + 2047 + 0x120], %%g1\n" -" ldx [%%sp + 2047 + 0x128], %%g2\n" -" ldx [%%sp + 2047 + 0x130], %%g3\n" -" ldx [%%sp + 2047 + 0x138], %%g4\n" -" ldx [%%sp + 2047 + 0x140], %%g5\n" -" ldx [%%sp + 2047 + 0x148], %%g6\n" -" ldx [%%sp + 2047 + 0x150], %%g7\n" -" wrpr %%g0, 0x814, %%pstate ! restore interrupt globals\n" -" ldx [%%sp + 2047 + 0x0e8], %%g1\n" -" ldx [%%sp + 2047 + 0x0f0], %%g2\n" -" ldx [%%sp + 2047 + 0x0f8], %%g3\n" -" ldx [%%sp + 2047 + 0x100], %%g4\n" -" ldx [%%sp + 2047 + 0x108], %%g5\n" -" ldx [%%sp + 2047 + 0x110], %%g6\n" -" ldx [%%sp + 2047 + 0x118], %%g7\n" -" wrpr %%g0, 0x15, %%pstate ! restore alternate globals\n" -" ldx [%%sp + 2047 + 0x0b0], %%g1\n" -" ldx [%%sp + 2047 + 0x0b8], %%g2\n" -" ldx [%%sp + 2047 + 0x0c0], %%g3\n" -" ldx [%%sp + 2047 + 0x0c8], %%g4\n" -" ldx [%%sp + 2047 + 0x0d0], %%g5\n" -" ldx [%%sp + 2047 + 0x0d8], %%g6\n" -" ldx [%%sp + 2047 + 0x0e0], %%g7\n" -" wrpr %%l4, 0, %%pstate ! restore original pstate\n" -" ret\n" -" restore\n" -" " : : "r" (&p1275buf), "i" (PSTATE_IE)); -} - -void prom_cif_callback(void) -{ - __asm__ __volatile__ ( -" mov %0, %%o1\n" -" save %%sp, -0x270, %%sp\n" -" rdpr %%pstate, %%l4\n" -" wrpr %%g0, 0x15, %%pstate ! save PROM alternate globals\n" -" stx %%g1, [%%sp + 2047 + 0x0b0]\n" -" stx %%g2, [%%sp + 2047 + 0x0b8]\n" -" stx %%g3, [%%sp + 2047 + 0x0c0]\n" -" stx %%g4, [%%sp + 2047 + 0x0c8]\n" -" stx %%g5, [%%sp + 2047 + 0x0d0]\n" -" stx %%g6, [%%sp + 2047 + 0x0d8]\n" -" stx %%g7, [%%sp + 2047 + 0x0e0]\n" -" ! restore Linux alternate globals\n" -" ldx [%%sp + 2047 + 0x190], %%g1\n" -" ldx [%%sp + 2047 + 0x198], %%g2\n" -" ldx [%%sp + 2047 + 0x1a0], %%g3\n" -" ldx [%%sp + 2047 + 0x1a8], %%g4\n" -" ldx [%%sp + 2047 + 0x1b0], %%g5\n" -" ldx [%%sp + 2047 + 0x1b8], %%g6\n" -" ldx [%%sp + 2047 + 0x1c0], %%g7\n" -" wrpr %%g0, 0x814, %%pstate ! save PROM interrupt globals\n" -" stx %%g1, [%%sp + 2047 + 0x0e8]\n" -" stx %%g2, [%%sp + 2047 + 0x0f0]\n" -" stx %%g3, [%%sp + 2047 + 0x0f8]\n" -" stx %%g4, [%%sp + 2047 + 0x100]\n" -" stx %%g5, [%%sp + 2047 + 0x108]\n" -" stx %%g6, [%%sp + 2047 + 0x110]\n" -" stx %%g7, [%%sp + 2047 + 0x118]\n" -" ! restore Linux interrupt globals\n" -" ldx [%%sp + 2047 + 0x1c8], %%g1\n" -" ldx [%%sp + 2047 + 0x1d0], %%g2\n" -" ldx [%%sp + 2047 + 0x1d8], %%g3\n" -" ldx [%%sp + 2047 + 0x1e0], %%g4\n" -" ldx [%%sp + 2047 + 0x1e8], %%g5\n" -" ldx [%%sp + 2047 + 0x1f0], %%g6\n" -" ldx [%%sp + 2047 + 0x1f8], %%g7\n" -" wrpr %%g0, 0x14, %%pstate ! save PROM normal globals\n" -" stx %%g1, [%%sp + 2047 + 0x120]\n" -" stx %%g2, [%%sp + 2047 + 0x128]\n" -" stx %%g3, [%%sp + 2047 + 0x130]\n" -" stx %%g4, [%%sp + 2047 + 0x138]\n" -" stx %%g5, [%%sp + 2047 + 0x140]\n" -" stx %%g6, [%%sp + 2047 + 0x148]\n" -" stx %%g7, [%%sp + 2047 + 0x150]\n" -" ! restore Linux normal globals\n" -" ldx [%%sp + 2047 + 0x200], %%g1\n" -" ldx [%%sp + 2047 + 0x208], %%g2\n" -" ldx [%%sp + 2047 + 0x210], %%g3\n" -" ldx [%%sp + 2047 + 0x218], %%g4\n" -" ldx [%%sp + 2047 + 0x220], %%g5\n" -" ldx [%%sp + 2047 + 0x228], %%g6\n" -" ldx [%%sp + 2047 + 0x230], %%g7\n" -" wrpr %%g0, 0x414, %%pstate ! save PROM mmu globals\n" -" stx %%g1, [%%sp + 2047 + 0x158]\n" -" stx %%g2, [%%sp + 2047 + 0x160]\n" -" stx %%g3, [%%sp + 2047 + 0x168]\n" -" stx %%g4, [%%sp + 2047 + 0x170]\n" -" stx %%g5, [%%sp + 2047 + 0x178]\n" -" stx %%g6, [%%sp + 2047 + 0x180]\n" -" stx %%g7, [%%sp + 2047 + 0x188]\n" -" ! restore Linux mmu globals\n" -" ldx [%%sp + 2047 + 0x238], %%o0\n" -" ldx [%%sp + 2047 + 0x240], %%o1\n" -" ldx [%%sp + 2047 + 0x248], %%l2\n" -" ldx [%%sp + 2047 + 0x250], %%l3\n" -" ldx [%%sp + 2047 + 0x258], %%l5\n" -" ldx [%%sp + 2047 + 0x260], %%l6\n" -" ldx [%%sp + 2047 + 0x268], %%l7\n" -" ! switch to Linux tba\n" -" sethi %%hi(sparc64_ttable_tl0), %%l1\n" -" rdpr %%tba, %%l0 ! save PROM tba\n" -" mov %%o0, %%g1\n" -" mov %%o1, %%g2\n" -" mov %%l2, %%g3\n" -" mov %%l3, %%g4\n" -" mov %%l5, %%g5\n" -" mov %%l6, %%g6\n" -" mov %%l7, %%g7\n" -" wrpr %%l1, %%tba ! install Linux tba\n" -" wrpr %%l4, 0, %%pstate ! restore PSTATE\n" -" call prom_world\n" -" mov %%g0, %%o0\n" -" ldx [%%i1 + 0x000], %%l2\n" -" call %%l2\n" -" mov %%i0, %%o0\n" -" mov %%o0, %%l1\n" -" call prom_world\n" -" or %%g0, 1, %%o0\n" -" wrpr %%g0, 0x14, %%pstate ! interrupts off\n" -" ! restore PROM mmu globals\n" -" ldx [%%sp + 2047 + 0x158], %%o0\n" -" ldx [%%sp + 2047 + 0x160], %%o1\n" -" ldx [%%sp + 2047 + 0x168], %%l2\n" -" ldx [%%sp + 2047 + 0x170], %%l3\n" -" ldx [%%sp + 2047 + 0x178], %%l5\n" -" ldx [%%sp + 2047 + 0x180], %%l6\n" -" ldx [%%sp + 2047 + 0x188], %%l7\n" -" wrpr %%g0, 0x414, %%pstate ! restore PROM mmu globals\n" -" mov %%o0, %%g1\n" -" mov %%o1, %%g2\n" -" mov %%l2, %%g3\n" -" mov %%l3, %%g4\n" -" mov %%l5, %%g5\n" -" mov %%l6, %%g6\n" -" mov %%l7, %%g7\n" -" wrpr %%l0, %%tba ! restore PROM tba\n" -" wrpr %%g0, 0x14, %%pstate ! restore PROM normal globals\n" -" ldx [%%sp + 2047 + 0x120], %%g1\n" -" ldx [%%sp + 2047 + 0x128], %%g2\n" -" ldx [%%sp + 2047 + 0x130], %%g3\n" -" ldx [%%sp + 2047 + 0x138], %%g4\n" -" ldx [%%sp + 2047 + 0x140], %%g5\n" -" ldx [%%sp + 2047 + 0x148], %%g6\n" -" ldx [%%sp + 2047 + 0x150], %%g7\n" -" wrpr %%g0, 0x814, %%pstate ! restore PROM interrupt globals\n" -" ldx [%%sp + 2047 + 0x0e8], %%g1\n" -" ldx [%%sp + 2047 + 0x0f0], %%g2\n" -" ldx [%%sp + 2047 + 0x0f8], %%g3\n" -" ldx [%%sp + 2047 + 0x100], %%g4\n" -" ldx [%%sp + 2047 + 0x108], %%g5\n" -" ldx [%%sp + 2047 + 0x110], %%g6\n" -" ldx [%%sp + 2047 + 0x118], %%g7\n" -" wrpr %%g0, 0x15, %%pstate ! restore PROM alternate globals\n" -" ldx [%%sp + 2047 + 0x0b0], %%g1\n" -" ldx [%%sp + 2047 + 0x0b8], %%g2\n" -" ldx [%%sp + 2047 + 0x0c0], %%g3\n" -" ldx [%%sp + 2047 + 0x0c8], %%g4\n" -" ldx [%%sp + 2047 + 0x0d0], %%g5\n" -" ldx [%%sp + 2047 + 0x0d8], %%g6\n" -" ldx [%%sp + 2047 + 0x0e0], %%g7\n" -" wrpr %%l4, 0, %%pstate\n" -" ret\n" -" restore %%l1, 0, %%o0\n" -" " : : "r" (&p1275buf), "i" (PSTATE_PRIV)); -} +extern void prom_cif_interface(void); +extern void prom_cif_callback(void); /* * This provides SMP safety on the p1275buf. prom_callback() drops this lock diff -Nru a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c --- a/arch/x86_64/kernel/setup.c 2005-02-22 20:30:43 -08:00 +++ b/arch/x86_64/kernel/setup.c 2005-02-22 20:30:43 -08:00 @@ -111,15 +111,24 @@ char command_line[COMMAND_LINE_SIZE]; struct resource standard_io_resources[] = { - { "dma1", 0x00, 0x1f, IORESOURCE_BUSY | IORESOURCE_IO }, - { "pic1", 0x20, 0x21, IORESOURCE_BUSY | IORESOURCE_IO }, - { "timer0", 0x40, 0x43, IORESOURCE_BUSY | IORESOURCE_IO }, - { "timer1", 0x50, 0x53, IORESOURCE_BUSY | IORESOURCE_IO }, - { "keyboard", 0x60, 0x6f, IORESOURCE_BUSY | IORESOURCE_IO }, - { "dma page reg", 0x80, 0x8f, IORESOURCE_BUSY | IORESOURCE_IO }, - { "pic2", 0xa0, 0xa1, IORESOURCE_BUSY | IORESOURCE_IO }, - { "dma2", 0xc0, 0xdf, IORESOURCE_BUSY | IORESOURCE_IO }, - { "fpu", 0xf0, 0xff, IORESOURCE_BUSY | IORESOURCE_IO } + { .name = "dma1", .start = 0x00, .end = 0x1f, + .flags = IORESOURCE_BUSY | IORESOURCE_IO }, + { .name = "pic1", .start = 0x20, .end = 0x21, + .flags = IORESOURCE_BUSY | IORESOURCE_IO }, + { .name = "timer0", .start = 0x40, .end = 0x43, + .flags = IORESOURCE_BUSY | IORESOURCE_IO }, + { .name = "timer1", .start = 0x50, .end = 0x53, + .flags = IORESOURCE_BUSY | IORESOURCE_IO }, + { .name = "keyboard", .start = 0x60, .end = 0x6f, + .flags = IORESOURCE_BUSY | IORESOURCE_IO }, + { .name = "dma page reg", .start = 0x80, .end = 0x8f, + .flags = IORESOURCE_BUSY | IORESOURCE_IO }, + { .name = "pic2", .start = 0xa0, .end = 0xa1, + .flags = IORESOURCE_BUSY | IORESOURCE_IO }, + { .name = "dma2", .start = 0xc0, .end = 0xdf, + .flags = IORESOURCE_BUSY | IORESOURCE_IO }, + { .name = "fpu", .start = 0xf0, .end = 0xff, + .flags = IORESOURCE_BUSY | IORESOURCE_IO } }; #define STANDARD_IO_RESOURCES \ @@ -127,28 +136,66 @@ #define IORESOURCE_RAM (IORESOURCE_BUSY | IORESOURCE_MEM) -struct resource data_resource = { "Kernel data", 0, 0, IORESOURCE_RAM }; -struct resource code_resource = { "Kernel code", 0, 0, IORESOURCE_RAM }; +struct resource data_resource = { + .name = "Kernel data", + .start = 0, + .end = 0, + .flags = IORESOURCE_RAM, +}; +struct resource code_resource = { + .name = "Kernel code", + .start = 0, + .end = 0, + .flags = IORESOURCE_RAM, +}; #define IORESOURCE_ROM (IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM) -static struct resource system_rom_resource = { "System ROM", 0xf0000, 0xfffff, IORESOURCE_ROM }; -static struct resource extension_rom_resource = { "Extension ROM", 0xe0000, 0xeffff, IORESOURCE_ROM }; +static struct resource system_rom_resource = { + .name = "System ROM", + .start = 0xf0000, + .end = 0xfffff, + .flags = IORESOURCE_ROM, +}; + +static struct resource extension_rom_resource = { + .name = "Extension ROM", + .start = 0xe0000, + .end = 0xeffff, + .flags = IORESOURCE_ROM, +}; static struct resource adapter_rom_resources[] = { - { "Adapter ROM", 0xc8000, 0, IORESOURCE_ROM }, - { "Adapter ROM", 0, 0, IORESOURCE_ROM }, - { "Adapter ROM", 0, 0, IORESOURCE_ROM }, - { "Adapter ROM", 0, 0, IORESOURCE_ROM }, - { "Adapter ROM", 0, 0, IORESOURCE_ROM }, - { "Adapter ROM", 0, 0, IORESOURCE_ROM } + { .name = "Adapter ROM", .start = 0xc8000, .end = 0, + .flags = IORESOURCE_ROM }, + { .name = "Adapter ROM", .start = 0, .end = 0, + .flags = IORESOURCE_ROM }, + { .name = "Adapter ROM", .start = 0, .end = 0, + .flags = IORESOURCE_ROM }, + { .name = "Adapter ROM", .start = 0, .end = 0, + .flags = IORESOURCE_ROM }, + { .name = "Adapter ROM", .start = 0, .end = 0, + .flags = IORESOURCE_ROM }, + { .name = "Adapter ROM", .start = 0, .end = 0, + .flags = IORESOURCE_ROM } }; #define ADAPTER_ROM_RESOURCES \ (sizeof adapter_rom_resources / sizeof adapter_rom_resources[0]) -static struct resource video_rom_resource = { "Video ROM", 0xc0000, 0xc7fff, IORESOURCE_ROM }; -static struct resource video_ram_resource = { "Video RAM area", 0xa0000, 0xbffff, IORESOURCE_RAM }; +static struct resource video_rom_resource = { + .name = "Video ROM", + .start = 0xc0000, + .end = 0xc7fff, + .flags = IORESOURCE_ROM, +}; + +static struct resource video_ram_resource = { + .name = "Video RAM area", + .start = 0xa0000, + .end = 0xbffff, + .flags = IORESOURCE_RAM, +}; #define romsignature(x) (*(unsigned short *)(x) == 0xaa55) diff -Nru a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig --- a/drivers/acpi/Kconfig 2005-02-22 20:30:44 -08:00 +++ b/drivers/acpi/Kconfig 2005-02-22 20:30:44 -08:00 @@ -259,6 +259,7 @@ config ACPI_BLACKLIST_YEAR int "Disable ACPI for systems before Jan 1st this year" + depends on ACPI_INTERPRETER default 0 help enter a 4-digit year, eg. 2001 to disable ACPI by default diff -Nru a/drivers/acpi/dispatcher/dswexec.c b/drivers/acpi/dispatcher/dswexec.c --- a/drivers/acpi/dispatcher/dswexec.c 2005-02-22 20:30:44 -08:00 +++ b/drivers/acpi/dispatcher/dswexec.c 2005-02-22 20:30:44 -08:00 @@ -578,6 +578,13 @@ break; } + /* Done with this result state (Now that operand stack is built) */ + + status = acpi_ds_result_stack_pop (walk_state); + if (ACPI_FAILURE (status)) { + goto cleanup; + } + /* * If a result object was returned from above, push it on the * current result stack diff -Nru a/drivers/acpi/executer/exoparg6.c b/drivers/acpi/executer/exoparg6.c --- a/drivers/acpi/executer/exoparg6.c 2005-02-22 20:30:44 -08:00 +++ b/drivers/acpi/executer/exoparg6.c 2005-02-22 20:30:44 -08:00 @@ -81,75 +81,119 @@ * FUNCTION: acpi_ex_do_match * * PARAMETERS: match_op - The AML match operand - * package_value - Value from the target package - * match_value - Value to be matched + * package_obj - Object from the target package + * match_obj - Object to be matched * * RETURN: TRUE if the match is successful, FALSE otherwise * - * DESCRIPTION: Implements the low-level match for the ASL Match operator + * DESCRIPTION: Implements the low-level match for the ASL Match operator. + * Package elements will be implicitly converted to the type of + * the match object (Integer/Buffer/String). * ******************************************************************************/ u8 acpi_ex_do_match ( u32 match_op, - acpi_integer package_value, - acpi_integer match_value) + union acpi_operand_object *package_obj, + union acpi_operand_object *match_obj) { + u8 logical_result = TRUE; + acpi_status status; + + /* + * Note: Since the package_obj/match_obj ordering is opposite to that of + * the standard logical operators, we have to reverse them when we call + * do_logical_op in order to make the implicit conversion rules work + * correctly. However, this means we have to flip the entire equation + * also. A bit ugly perhaps, but overall, better than fussing the + * parameters around at runtime, over and over again. + * + * Below, P[i] refers to the package element, M refers to the Match object. + */ switch (match_op) { - case MATCH_MTR: /* always true */ + case MATCH_MTR: - break; + /* Always true */ + break; - case MATCH_MEQ: /* true if equal */ + case MATCH_MEQ: - if (package_value != match_value) { + /* + * True if equal: (P[i] == M) + * Change to: (M == P[i]) + */ + status = acpi_ex_do_logical_op (AML_LEQUAL_OP, match_obj, package_obj, + &logical_result); + if (ACPI_FAILURE (status)) { return (FALSE); } break; + case MATCH_MLE: - case MATCH_MLE: /* true if less than or equal */ - - if (package_value > match_value) { + /* + * True if less than or equal: (P[i] <= M) (P[i] not_greater than M) + * Change to: (M >= P[i]) (M not_less than P[i]) + */ + status = acpi_ex_do_logical_op (AML_LLESS_OP, match_obj, package_obj, + &logical_result); + if (ACPI_FAILURE (status)) { return (FALSE); } + logical_result = (u8) !logical_result; break; + case MATCH_MLT: - case MATCH_MLT: /* true if less than */ - - if (package_value >= match_value) { + /* + * True if less than: (P[i] < M) + * Change to: (M > P[i]) + */ + status = acpi_ex_do_logical_op (AML_LGREATER_OP, match_obj, package_obj, + &logical_result); + if (ACPI_FAILURE (status)) { return (FALSE); } break; + case MATCH_MGE: - case MATCH_MGE: /* true if greater than or equal */ - - if (package_value < match_value) { + /* + * True if greater than or equal: (P[i] >= M) (P[i] not_less than M) + * Change to: (M <= P[i]) (M not_greater than P[i]) + */ + status = acpi_ex_do_logical_op (AML_LGREATER_OP, match_obj, package_obj, + &logical_result); + if (ACPI_FAILURE (status)) { return (FALSE); } + logical_result = (u8)!logical_result; break; + case MATCH_MGT: - case MATCH_MGT: /* true if greater than */ - - if (package_value <= match_value) { + /* + * True if greater than: (P[i] > M) + * Change to: (M < P[i]) + */ + status = acpi_ex_do_logical_op (AML_LLESS_OP, match_obj, package_obj, + &logical_result); + if (ACPI_FAILURE (status)) { return (FALSE); } break; + default: - default: /* undefined */ + /* Undefined */ return (FALSE); } - - return TRUE; + return logical_result; } @@ -182,19 +226,21 @@ switch (walk_state->opcode) { case AML_MATCH_OP: /* - * Match (search_package[0], match_op1[1], match_object1[2], - * match_op2[3], match_object2[4], start_index[5]) + * Match (search_pkg[0], match_op1[1], match_obj1[2], + * match_op2[3], match_obj2[4], start_index[5]) */ - /* Validate match comparison sub-opcodes */ + /* Validate both Match Term Operators (MTR, MEQ, etc.) */ if ((operand[1]->integer.value > MAX_MATCH_OPERATOR) || (operand[3]->integer.value > MAX_MATCH_OPERATOR)) { - ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "operation encoding out of range\n")); + ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Match operator out of range\n")); status = AE_AML_OPERAND_VALUE; goto cleanup; } + /* Get the package start_index, validate against the package length */ + index = (u32) operand[5]->integer.value; if (index >= (u32) operand[0]->package.count) { ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Index beyond package end\n")); @@ -202,6 +248,8 @@ goto cleanup; } + /* Create an integer for the return value */ + return_desc = acpi_ut_create_internal_object (ACPI_TYPE_INTEGER); if (!return_desc) { status = AE_NO_MEMORY; @@ -214,37 +262,39 @@ return_desc->integer.value = ACPI_INTEGER_MAX; /* - * Examine each element until a match is found. Within the loop, + * Examine each element until a match is found. Both match conditions + * must be satisfied for a match to occur. Within the loop, * "continue" signifies that the current element does not match * and the next should be examined. * * Upon finding a match, the loop will terminate via "break" at - * the bottom. If it terminates "normally", match_value will be -1 - * (its initial value) indicating that no match was found. When - * returned as a Number, this will produce the Ones value as specified. + * the bottom. If it terminates "normally", match_value will be + * ACPI_INTEGER_MAX (Ones) (its initial value) indicating that no + * match was found. */ for ( ; index < operand[0]->package.count; index++) { + /* Get the current package element */ + this_element = operand[0]->package.elements[index]; - /* - * Treat any NULL or non-numeric elements as non-matching. - */ - if (!this_element || - ACPI_GET_OBJECT_TYPE (this_element) != ACPI_TYPE_INTEGER) { + /* Treat any uninitialized (NULL) elements as non-matching */ + + if (!this_element) { continue; } /* - * "continue" (proceed to next iteration of enclosing - * "for" loop) signifies a non-match. + * Both match conditions must be satisfied. Execution of a continue + * (proceed to next iteration of enclosing for loop) signifies a + * non-match. */ if (!acpi_ex_do_match ((u32) operand[1]->integer.value, - this_element->integer.value, operand[2]->integer.value)) { + this_element, operand[2])) { continue; } if (!acpi_ex_do_match ((u32) operand[3]->integer.value, - this_element->integer.value, operand[4]->integer.value)) { + this_element, operand[4])) { continue; } @@ -253,7 +303,6 @@ return_desc->integer.value = index; break; } - break; diff -Nru a/drivers/acpi/executer/exresop.c b/drivers/acpi/executer/exresop.c --- a/drivers/acpi/executer/exresop.c 2005-02-22 20:30:44 -08:00 +++ b/drivers/acpi/executer/exresop.c 2005-02-22 20:30:44 -08:00 @@ -312,7 +312,7 @@ goto next_operand; - case ARGI_ANYTYPE: + case ARGI_DATAREFOBJ: /* Store operator only */ /* * We don't want to resolve index_op reference objects during diff -Nru a/drivers/acpi/executer/exstoren.c b/drivers/acpi/executer/exstoren.c --- a/drivers/acpi/executer/exstoren.c 2005-02-22 20:30:43 -08:00 +++ b/drivers/acpi/executer/exstoren.c 2005-02-22 20:30:43 -08:00 @@ -206,6 +206,7 @@ { union acpi_operand_object *actual_src_desc; acpi_status status = AE_OK; + acpi_object_type original_src_type; ACPI_FUNCTION_TRACE_PTR ("ex_store_object_to_object", source_desc); @@ -222,7 +223,8 @@ return_ACPI_STATUS (status); } - if (ACPI_GET_OBJECT_TYPE (source_desc) != ACPI_GET_OBJECT_TYPE (dest_desc)) { + original_src_type = ACPI_GET_OBJECT_TYPE (source_desc); + if (original_src_type != ACPI_GET_OBJECT_TYPE (dest_desc)) { /* * The source type does not match the type of the destination. * Perform the "implicit conversion" of the source to the current type @@ -232,15 +234,15 @@ * Otherwise, actual_src_desc is a temporary object to hold the * converted object. */ - status = acpi_ex_convert_to_target_type (ACPI_GET_OBJECT_TYPE (dest_desc), source_desc, - &actual_src_desc, walk_state); + status = acpi_ex_convert_to_target_type (ACPI_GET_OBJECT_TYPE (dest_desc), + source_desc, &actual_src_desc, walk_state); if (ACPI_FAILURE (status)) { return_ACPI_STATUS (status); } if (source_desc == actual_src_desc) { /* - * No conversion was performed. Return the source_desc as the + * No conversion was performed. Return the source_desc as the * new object. */ *new_desc = source_desc; @@ -269,12 +271,18 @@ case ACPI_TYPE_BUFFER: - status = acpi_ex_store_buffer_to_buffer (actual_src_desc, dest_desc); + /* + * Note: There is different store behavior depending on the original + * source type + */ + status = acpi_ex_store_buffer_to_buffer (original_src_type, actual_src_desc, + dest_desc); break; case ACPI_TYPE_PACKAGE: - status = acpi_ut_copy_iobject_to_iobject (actual_src_desc, &dest_desc, walk_state); + status = acpi_ut_copy_iobject_to_iobject (actual_src_desc, &dest_desc, + walk_state); break; default: diff -Nru a/drivers/acpi/executer/exstorob.c b/drivers/acpi/executer/exstorob.c --- a/drivers/acpi/executer/exstorob.c 2005-02-22 20:30:44 -08:00 +++ b/drivers/acpi/executer/exstorob.c 2005-02-22 20:30:44 -08:00 @@ -66,6 +66,7 @@ acpi_status acpi_ex_store_buffer_to_buffer ( + acpi_object_type original_src_type, union acpi_operand_object *source_desc, union acpi_operand_object *target_desc) { @@ -104,9 +105,16 @@ ACPI_MEMSET (target_desc->buffer.pointer, 0, target_desc->buffer.length); ACPI_MEMCPY (target_desc->buffer.pointer, buffer, length); - /* Set the new length of the target */ + /* + * If the original source was a string, we must truncate the buffer, + * according to the ACPI spec. Integer-to-Buffer and Buffer-to-Buffer + * copy must not truncate the original buffer. + */ + if (original_src_type == ACPI_TYPE_STRING) { + /* Set the new length of the target */ - target_desc->buffer.length = length; + target_desc->buffer.length = length; + } } else { /* Truncate the source, copy only what will fit */ diff -Nru a/drivers/acpi/namespace/nsxfname.c b/drivers/acpi/namespace/nsxfname.c --- a/drivers/acpi/namespace/nsxfname.c 2005-02-22 20:30:44 -08:00 +++ b/drivers/acpi/namespace/nsxfname.c 2005-02-22 20:30:44 -08:00 @@ -237,7 +237,7 @@ { acpi_status status; struct acpi_namespace_node *node; - struct acpi_device_info info; + struct acpi_device_info *info; struct acpi_device_info *return_info; struct acpi_compatible_id_list *cid_list = NULL; acpi_size size; @@ -254,55 +254,59 @@ return (status); } + info = ACPI_MEM_CALLOCATE (sizeof (struct acpi_device_info)); + if (!info) { + return (AE_NO_MEMORY); + } + status = acpi_ut_acquire_mutex (ACPI_MTX_NAMESPACE); if (ACPI_FAILURE (status)) { - return (status); + goto cleanup; } node = acpi_ns_map_handle_to_node (handle); if (!node) { (void) acpi_ut_release_mutex (ACPI_MTX_NAMESPACE); - return (AE_BAD_PARAMETER); + goto cleanup; } /* Init return structure */ size = sizeof (struct acpi_device_info); - ACPI_MEMSET (&info, 0, size); - info.type = node->type; - info.name = node->name.integer; - info.valid = 0; + info->type = node->type; + info->name = node->name.integer; + info->valid = 0; status = acpi_ut_release_mutex (ACPI_MTX_NAMESPACE); if (ACPI_FAILURE (status)) { - return (status); + goto cleanup; } /* If not a device, we are all done */ - if (info.type == ACPI_TYPE_DEVICE) { + if (info->type == ACPI_TYPE_DEVICE) { /* * Get extra info for ACPI Devices objects only: * Run the Device _HID, _UID, _CID, _STA, _ADR and _sx_d methods. * * Note: none of these methods are required, so they may or may - * not be present for this device. The Info.Valid bitfield is used + * not be present for this device. The Info->Valid bitfield is used * to indicate which methods were found and ran successfully. */ /* Execute the Device._HID method */ - status = acpi_ut_execute_HID (node, &info.hardware_id); + status = acpi_ut_execute_HID (node, &info->hardware_id); if (ACPI_SUCCESS (status)) { - info.valid |= ACPI_VALID_HID; + info->valid |= ACPI_VALID_HID; } /* Execute the Device._UID method */ - status = acpi_ut_execute_UID (node, &info.unique_id); + status = acpi_ut_execute_UID (node, &info->unique_id); if (ACPI_SUCCESS (status)) { - info.valid |= ACPI_VALID_UID; + info->valid |= ACPI_VALID_UID; } /* Execute the Device._CID method */ @@ -311,32 +315,30 @@ if (ACPI_SUCCESS (status)) { size += ((acpi_size) cid_list->count - 1) * sizeof (struct acpi_compatible_id); - info.valid |= ACPI_VALID_CID; + info->valid |= ACPI_VALID_CID; } /* Execute the Device._STA method */ - status = acpi_ut_execute_STA (node, &info.current_status); + status = acpi_ut_execute_STA (node, &info->current_status); if (ACPI_SUCCESS (status)) { - info.valid |= ACPI_VALID_STA; + info->valid |= ACPI_VALID_STA; } /* Execute the Device._ADR method */ status = acpi_ut_evaluate_numeric_object (METHOD_NAME__ADR, node, - &info.address); + &info->address); if (ACPI_SUCCESS (status)) { - info.valid |= ACPI_VALID_ADR; + info->valid |= ACPI_VALID_ADR; } /* Execute the Device._sx_d methods */ - status = acpi_ut_execute_sxds (node, info.highest_dstates); + status = acpi_ut_execute_sxds (node, info->highest_dstates); if (ACPI_SUCCESS (status)) { - info.valid |= ACPI_VALID_SXDS; + info->valid |= ACPI_VALID_SXDS; } - - status = AE_OK; } /* Validate/Allocate/Clear caller buffer */ @@ -349,7 +351,7 @@ /* Populate the return buffer */ return_info = buffer->pointer; - ACPI_MEMCPY (return_info, &info, sizeof (struct acpi_device_info)); + ACPI_MEMCPY (return_info, info, sizeof (struct acpi_device_info)); if (cid_list) { ACPI_MEMCPY (&return_info->compatibility_id, cid_list, cid_list->size); @@ -357,6 +359,7 @@ cleanup: + ACPI_MEM_FREE (info); if (cid_list) { ACPI_MEM_FREE (cid_list); } diff -Nru a/drivers/acpi/parser/psopcode.c b/drivers/acpi/parser/psopcode.c --- a/drivers/acpi/parser/psopcode.c 2005-02-22 20:30:43 -08:00 +++ b/drivers/acpi/parser/psopcode.c 2005-02-22 20:30:43 -08:00 @@ -289,7 +289,7 @@ #define ARGI_LOCAL6 ARG_NONE #define ARGI_LOCAL7 ARG_NONE #define ARGI_LOR_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER) -#define ARGI_MATCH_OP ARGI_LIST6 (ARGI_PACKAGE, ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER) +#define ARGI_MATCH_OP ARGI_LIST6 (ARGI_PACKAGE, ARGI_INTEGER, ARGI_COMPUTEDATA, ARGI_INTEGER,ARGI_COMPUTEDATA,ARGI_INTEGER) #define ARGI_METHOD_OP ARGI_INVALID_OPCODE #define ARGI_METHODCALL_OP ARGI_INVALID_OPCODE #define ARGI_MID_OP ARGI_LIST4 (ARGI_BUFFER_OR_STRING,ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) diff -Nru a/drivers/acpi/tables/tbconvrt.c b/drivers/acpi/tables/tbconvrt.c --- a/drivers/acpi/tables/tbconvrt.c 2005-02-22 20:30:43 -08:00 +++ b/drivers/acpi/tables/tbconvrt.c 2005-02-22 20:30:43 -08:00 @@ -269,8 +269,8 @@ * that immediately follows. */ ACPI_MEMCPY (&local_fadt->reset_register, - &((struct fadt_descriptor_rev2_minus *) original_fadt)->reset_register, - sizeof (struct acpi_generic_address) + 1); + &(ACPI_CAST_PTR (struct fadt_descriptor_rev2_minus, original_fadt))->reset_register, + sizeof (struct acpi_generic_address) + 1); } else { /* diff -Nru a/drivers/block/ub.c b/drivers/block/ub.c --- a/drivers/block/ub.c 2005-02-22 20:30:44 -08:00 +++ b/drivers/block/ub.c 2005-02-22 20:30:44 -08:00 @@ -300,6 +300,11 @@ /* */ +static int ub_bd_rq_fn_1(struct ub_dev *sc, struct request *rq); +static int ub_cmd_build_block(struct ub_dev *sc, struct ub_scsi_cmd *cmd, + struct request *rq); +static int ub_cmd_build_packet(struct ub_dev *sc, struct ub_scsi_cmd *cmd, + struct request *rq); static void ub_rw_cmd_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd); static void ub_end_rq(struct request *rq, int uptodate); static int ub_submit_scsi(struct ub_dev *sc, struct ub_scsi_cmd *cmd); @@ -591,40 +596,73 @@ * The request function is our main entry point */ -static inline int ub_bd_rq_fn_1(request_queue_t *q) +static void ub_bd_rq_fn(request_queue_t *q) { -#if 0 - int writing = 0, pci_dir, i, n_elem; - u32 tmp; - unsigned int msg_size; -#endif struct ub_dev *sc = q->queuedata; struct request *rq; -#if 0 /* We use rq->buffer for now */ - struct scatterlist *sg; - int n_elem; -#endif + + while ((rq = elv_next_request(q)) != NULL) { + if (ub_bd_rq_fn_1(sc, rq) != 0) { + blk_stop_queue(q); + break; + } + } +} + +static int ub_bd_rq_fn_1(struct ub_dev *sc, struct request *rq) +{ struct ub_scsi_cmd *cmd; - int ub_dir; - unsigned int block, nblks; int rc; - if ((rq = elv_next_request(q)) == NULL) - return 1; - if (atomic_read(&sc->poison) || sc->changed) { blkdev_dequeue_request(rq); ub_end_rq(rq, 0); return 0; } - if ((cmd = ub_get_cmd(sc)) == NULL) { - blk_stop_queue(q); - return 1; - } + if ((cmd = ub_get_cmd(sc)) == NULL) + return -1; + memset(cmd, 0, sizeof(struct ub_scsi_cmd)); blkdev_dequeue_request(rq); + if (blk_pc_request(rq)) { + rc = ub_cmd_build_packet(sc, cmd, rq); + } else { + rc = ub_cmd_build_block(sc, cmd, rq); + } + if (rc != 0) { + ub_put_cmd(sc, cmd); + ub_end_rq(rq, 0); + blk_start_queue(sc->disk->queue); + return 0; + } + + cmd->state = UB_CMDST_INIT; + cmd->done = ub_rw_cmd_done; + cmd->back = rq; + + cmd->tag = sc->tagcnt++; + if ((rc = ub_submit_scsi(sc, cmd)) != 0) { + ub_put_cmd(sc, cmd); + ub_end_rq(rq, 0); + blk_start_queue(sc->disk->queue); + return 0; + } + + return 0; +} + +static int ub_cmd_build_block(struct ub_dev *sc, struct ub_scsi_cmd *cmd, + struct request *rq) +{ + int ub_dir; +#if 0 /* We use rq->buffer for now */ + struct scatterlist *sg; + int n_elem; +#endif + unsigned int block, nblks; + if (rq_data_dir(rq) == WRITE) ub_dir = UB_DIR_WRITE; else @@ -652,6 +690,7 @@ return 0; } #endif + /* * XXX Unfortunately, this check does not work. It is quite possible * to get bogus non-null rq->buffer if you allow sg by mistake. @@ -663,13 +702,12 @@ */ static int do_print = 1; if (do_print) { - printk(KERN_WARNING "%s: unmapped request\n", sc->name); + printk(KERN_WARNING "%s: unmapped block request" + " flags 0x%lx sectors %lu\n", + sc->name, rq->flags, rq->nr_sectors); do_print = 0; } - ub_put_cmd(sc, cmd); - ub_end_rq(rq, 0); - blk_start_queue(q); - return 0; + return -1; } /* @@ -681,7 +719,6 @@ block = rq->sector >> sc->capacity.bshift; nblks = rq->nr_sectors >> sc->capacity.bshift; - memset(cmd, 0, sizeof(struct ub_scsi_cmd)); cmd->cdb[0] = (ub_dir == UB_DIR_READ)? READ_10: WRITE_10; /* 10-byte uses 4 bytes of LBA: 2147483648KB, 2097152MB, 2048GB */ cmd->cdb[2] = block >> 24; @@ -691,27 +728,44 @@ cmd->cdb[7] = nblks >> 8; cmd->cdb[8] = nblks; cmd->cdb_len = 10; + cmd->dir = ub_dir; - cmd->state = UB_CMDST_INIT; cmd->data = rq->buffer; cmd->len = rq->nr_sectors * 512; - cmd->done = ub_rw_cmd_done; - cmd->back = rq; - - cmd->tag = sc->tagcnt++; - if ((rc = ub_submit_scsi(sc, cmd)) != 0) { - ub_put_cmd(sc, cmd); - ub_end_rq(rq, 0); - blk_start_queue(q); - return 0; - } return 0; } -static void ub_bd_rq_fn(request_queue_t *q) +static int ub_cmd_build_packet(struct ub_dev *sc, struct ub_scsi_cmd *cmd, + struct request *rq) { - do { } while (ub_bd_rq_fn_1(q) == 0); + + if (rq->data_len != 0 && rq->data == NULL) { + static int do_print = 1; + if (do_print) { + printk(KERN_WARNING "%s: unmapped packet request" + " flags 0x%lx length %d\n", + sc->name, rq->flags, rq->data_len); + do_print = 0; + } + return -1; + } + + memcpy(&cmd->cdb, rq->cmd, rq->cmd_len); + cmd->cdb_len = rq->cmd_len; + + if (rq->data_len == 0) { + cmd->dir = UB_DIR_NONE; + } else { + if (rq_data_dir(rq) == WRITE) + cmd->dir = UB_DIR_WRITE; + else + cmd->dir = UB_DIR_READ; + } + cmd->data = rq->data; + cmd->len = rq->data_len; + + return 0; } static void ub_rw_cmd_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd) @@ -721,6 +775,12 @@ request_queue_t *q = disk->queue; int uptodate; + if (blk_pc_request(rq)) { + /* UB_SENSE_SIZE is smaller than SCSI_SENSE_BUFFERSIZE */ + memcpy(rq->sense, sc->top_sense, UB_SENSE_SIZE); + rq->sense_len = UB_SENSE_SIZE; + } + if (cmd->error == 0) uptodate = 1; else @@ -779,6 +839,17 @@ bcb = &sc->work_bcb; + /* + * ``If the allocation length is eighteen or greater, and a device + * server returns less than eithteen bytes of data, the application + * client should assume that the bytes not transferred would have been + * zeroes had the device server returned those bytes.'' + * + * We zero sense for all commands so that when a packet request + * fails it does not return a stale sense. + */ + memset(&sc->top_sense, 0, UB_SENSE_SIZE); + /* set up the command wrapper */ bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); bcb->Tag = cmd->tag; /* Endianness is not important */ @@ -1222,14 +1293,6 @@ goto error; } - /* - * ``If the allocation length is eighteen or greater, and a device - * server returns less than eithteen bytes of data, the application - * client should assume that the bytes not transferred would have been - * zeroes had the device server returned those bytes.'' - */ - memset(&sc->top_sense, 0, UB_SENSE_SIZE); - scmd = &sc->top_rqs_cmd; scmd->cdb[0] = REQUEST_SENSE; scmd->cdb[4] = UB_SENSE_SIZE; @@ -1495,30 +1558,10 @@ static int ub_bd_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) { -// void __user *usermem = (void *) arg; -// struct carm_port *port = ino->i_bdev->bd_disk->private_data; -// struct hd_geometry geom; - -#if 0 - switch (cmd) { - case HDIO_GETGEO: - if (usermem == NULL) // XXX Bizzare. Why? - return -EINVAL; - - geom.heads = (u8) port->dev_geom_head; - geom.sectors = (u8) port->dev_geom_sect; - geom.cylinders = port->dev_geom_cyl; - geom.start = get_start_sect(ino->i_bdev); - - if (copy_to_user(usermem, &geom, sizeof(geom))) - return -EFAULT; - return 0; - - default: ; - } -#endif + struct gendisk *disk = inode->i_bdev->bd_disk; + void __user *usermem = (void __user *) arg; - return -ENOTTY; + return scsi_cmd_ioctl(filp, disk, cmd, usermem); } /* diff -Nru a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c --- a/drivers/bluetooth/hci_usb.c 2005-02-22 20:30:44 -08:00 +++ b/drivers/bluetooth/hci_usb.c 2005-02-22 20:30:44 -08:00 @@ -108,7 +108,7 @@ { USB_DEVICE(0x0a5c, 0x2009), .driver_info = HCI_BCM92035 }, /* Microsoft Wireless Transceiver for Bluetooth 2.0 */ - { USB_DEVICE(0x045e, 0x009c), .driver_info = HCI_BCM92035 }, + { USB_DEVICE(0x045e, 0x009c), .driver_info = HCI_RESET }, /* ISSC Bluetooth Adapter v3.1 */ { USB_DEVICE(0x1131, 0x1001), .driver_info = HCI_RESET }, diff -Nru a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c --- a/drivers/char/ipmi/ipmi_msghandler.c 2005-02-22 20:30:44 -08:00 +++ b/drivers/char/ipmi/ipmi_msghandler.c 2005-02-22 20:30:44 -08:00 @@ -443,6 +443,9 @@ return sizeof(struct ipmi_ipmb_addr); } + if (addr_type == IPMI_LAN_ADDR_TYPE) + return sizeof(struct ipmi_lan_addr); + return 0; } diff -Nru a/drivers/char/n_tty.c b/drivers/char/n_tty.c --- a/drivers/char/n_tty.c 2005-02-22 20:30:43 -08:00 +++ b/drivers/char/n_tty.c 2005-02-22 20:30:43 -08:00 @@ -317,8 +317,6 @@ return 0; if (nr > space) nr = space; - if (nr > sizeof(buf)) - nr = sizeof(buf); for (i = 0, cp = buf; i < nr; i++, cp++) { switch (*cp) { diff -Nru a/drivers/char/tty_io.c b/drivers/char/tty_io.c --- a/drivers/char/tty_io.c 2005-02-22 20:30:44 -08:00 +++ b/drivers/char/tty_io.c 2005-02-22 20:30:44 -08:00 @@ -1047,8 +1047,13 @@ * * But if TTY_NO_WRITE_SPLIT is set, we should use a * big chunk-size.. + * + * The default chunk-size is 2kB, because the NTTY + * layer has problems with bigger chunks. It will + * claim to be able to handle more characters than + * it actually does. */ - chunk = 4096; + chunk = 2048; if (test_bit(TTY_NO_WRITE_SPLIT, &tty->flags)) chunk = 65536; if (count < chunk) diff -Nru a/drivers/ide/Kconfig b/drivers/ide/Kconfig --- a/drivers/ide/Kconfig 2005-02-22 20:30:43 -08:00 +++ b/drivers/ide/Kconfig 2005-02-22 20:30:43 -08:00 @@ -812,7 +812,7 @@ config BLK_DEV_IDE_BAST tristate "Simtec BAST / Thorcom VR1000 IDE support" - depends on ARM && (ARCH_BAST || MACH_VR100) + depends on ARM && (ARCH_BAST || MACH_VR1000) help Say Y here if you want to support the onboard IDE channels on the Simtec BAST or the Thorcom VR1000 diff -Nru a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c --- a/drivers/ide/ide-io.c 2005-02-22 20:30:44 -08:00 +++ b/drivers/ide/ide-io.c 2005-02-22 20:30:44 -08:00 @@ -238,9 +238,10 @@ high = ide_read_24(drive); } else { u8 cur = HWIF(drive)->INB(IDE_SELECT_REG); - if (cur & 0x40) + if (cur & 0x40) { + high = cur & 0xf; low = (hcyl << 16) | (lcyl << 8) | sect; - else { + } else { low = hcyl * drive->head * drive->sect; low += lcyl * drive->sect; low += sect - 1; diff -Nru a/drivers/ide/ide.c b/drivers/ide/ide.c --- a/drivers/ide/ide.c 2005-02-22 20:30:43 -08:00 +++ b/drivers/ide/ide.c 2005-02-22 20:30:43 -08:00 @@ -335,10 +335,14 @@ static int ide_system_bus_speed(void) { +#ifdef CONFIG_PCI static struct pci_device_id pci_default[] = { { PCI_DEVICE(PCI_ANY_ID, PCI_ANY_ID) }, { } }; +#else +#define pci_default 0 +#endif /* CONFIG_PCI */ if (!system_bus_speed) { if (idebus_parameter) { diff -Nru a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c --- a/drivers/input/mouse/alps.c 2005-02-22 20:30:44 -08:00 +++ b/drivers/input/mouse/alps.c 2005-02-22 20:30:44 -08:00 @@ -175,8 +175,8 @@ return PSMOUSE_BAD_DATA; /* Bytes 2 - 6 should have 0 in the highest bit */ - if (psmouse->pktcnt > 1 && psmouse->pktcnt <= 6 && - (psmouse->packet[psmouse->pktcnt] & 0x80)) + if (psmouse->pktcnt >= 2 && psmouse->pktcnt <= 6 && + (psmouse->packet[psmouse->pktcnt-1] & 0x80)) return PSMOUSE_BAD_DATA; if (psmouse->pktcnt == 6) { diff -Nru a/drivers/input/serio/ambakmi.c b/drivers/input/serio/ambakmi.c --- a/drivers/input/serio/ambakmi.c 2005-02-22 20:30:44 -08:00 +++ b/drivers/input/serio/ambakmi.c 2005-02-22 20:30:44 -08:00 @@ -31,7 +31,7 @@ struct amba_kmi_port { struct serio *io; struct clk *clk; - unsigned char *base; + void __iomem *base; unsigned int irq; unsigned int divisor; unsigned int open; diff -Nru a/drivers/input/serio/sa1111ps2.c b/drivers/input/serio/sa1111ps2.c --- a/drivers/input/serio/sa1111ps2.c 2005-02-22 20:30:44 -08:00 +++ b/drivers/input/serio/sa1111ps2.c 2005-02-22 20:30:44 -08:00 @@ -28,7 +28,7 @@ struct ps2if { struct serio *io; struct sa1111_dev *dev; - unsigned long base; + void __iomem *base; unsigned int open; spinlock_t lock; unsigned int head; @@ -272,7 +272,7 @@ /* * Our parent device has already mapped the region. */ - ps2if->base = (unsigned long)dev->mapbase; + ps2if->base = dev->mapbase; sa1111_enable_device(ps2if->dev); diff -Nru a/drivers/isdn/hardware/eicon/xdi_vers.h b/drivers/isdn/hardware/eicon/xdi_vers.h --- a/drivers/isdn/hardware/eicon/xdi_vers.h 2005-02-22 20:30:44 -08:00 +++ b/drivers/isdn/hardware/eicon/xdi_vers.h 2005-02-22 20:30:44 -08:00 @@ -1,25 +1,26 @@ -/* - * - Copyright (c) Eicon Networks, 2002. - * - This source file is supplied for the use with - Eicon Networks range of DIVA Server Adapters. - * - Eicon File Revision : 2.1 - * - 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, or (at your option) - any later version. - * - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY - implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - * - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ -static char diva_xdi_common_code_build[] = "102-52"; + +/* + * + Copyright (c) Eicon Networks, 2002. + * + This source file is supplied for the use with + Eicon Networks range of DIVA Server Adapters. + * + Eicon File Revision : 2.1 + * + 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, or (at your option) + any later version. + * + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details. + * + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ +static char diva_xdi_common_code_build[] = "102-52"; diff -Nru a/drivers/isdn/i4l/isdn_net.h b/drivers/isdn/i4l/isdn_net.h --- a/drivers/isdn/i4l/isdn_net.h 2005-02-22 20:30:44 -08:00 +++ b/drivers/isdn/i4l/isdn_net.h 2005-02-22 20:30:44 -08:00 @@ -78,18 +78,19 @@ spin_lock_irqsave(&nd->queue_lock, flags); lp = nd->queue; /* get lp on top of queue */ - spin_lock_bh(&nd->queue->xmit_lock); + spin_lock(&nd->queue->xmit_lock); while (isdn_net_lp_busy(nd->queue)) { - spin_unlock_bh(&nd->queue->xmit_lock); + spin_unlock(&nd->queue->xmit_lock); nd->queue = nd->queue->next; if (nd->queue == lp) { /* not found -- should never happen */ lp = NULL; goto errout; } - spin_lock_bh(&nd->queue->xmit_lock); + spin_lock(&nd->queue->xmit_lock); } lp = nd->queue; nd->queue = nd->queue->next; + local_bh_disable(); errout: spin_unlock_irqrestore(&nd->queue_lock, flags); return lp; diff -Nru a/drivers/mmc/pxamci.c b/drivers/mmc/pxamci.c --- a/drivers/mmc/pxamci.c 2005-02-22 20:30:44 -08:00 +++ b/drivers/mmc/pxamci.c 2005-02-22 20:30:44 -08:00 @@ -52,7 +52,7 @@ struct mmc_host *mmc; spinlock_t lock; struct resource *res; - void *base; + void __iomem *base; int irq; int dma; unsigned int clkrt; diff -Nru a/drivers/net/ibm_emac/ibm_emac_core.c b/drivers/net/ibm_emac/ibm_emac_core.c --- a/drivers/net/ibm_emac/ibm_emac_core.c 2005-02-22 20:30:43 -08:00 +++ b/drivers/net/ibm_emac/ibm_emac_core.c 2005-02-22 20:30:43 -08:00 @@ -475,8 +475,9 @@ out_be32(&emacp->em0stacr, stacr); - while (((stacr = in_be32(&emacp->em0stacr) & EMAC_STACR_OC) == 0) - && (count++ < 5000)) + count = 0; + while ((((stacr = in_be32(&emacp->em0stacr)) & EMAC_STACR_OC) == 0) + && (count++ < MDIO_DELAY)) udelay(1); MDIO_DEBUG((" (count was %d)\n", count)); @@ -912,7 +913,6 @@ PKT_DEBUG(("emac_start_xmit() stopping queue\n")); netif_stop_queue(dev); spin_unlock_irqrestore(&fep->lock, flags); - restore_flags(flags); return -EBUSY; } @@ -1281,7 +1281,7 @@ /* Format the receive descriptor ring. */ ep->rx_slot = 0; /* Default is MTU=1500 + Ethernet overhead */ - ep->rx_buffer_size = ENET_DEF_BUF_SIZE; + ep->rx_buffer_size = dev->mtu + ENET_HEADER_SIZE + ENET_FCS_SIZE; emac_rx_fill(dev, 0); if (ep->rx_slot != 0) { printk(KERN_ERR diff -Nru a/drivers/net/ibm_emac/ibm_emac_core.h b/drivers/net/ibm_emac/ibm_emac_core.h --- a/drivers/net/ibm_emac/ibm_emac_core.h 2005-02-22 20:30:43 -08:00 +++ b/drivers/net/ibm_emac/ibm_emac_core.h 2005-02-22 20:30:43 -08:00 @@ -77,8 +77,6 @@ #define ENET_HEADER_SIZE 14 #define ENET_FCS_SIZE 4 -#define ENET_DEF_MTU_SIZE 1500 -#define ENET_DEF_BUF_SIZE (ENET_DEF_MTU_SIZE + ENET_HEADER_SIZE + ENET_FCS_SIZE) #define EMAC_MIN_FRAME 64 #define EMAC_MAX_FRAME 9018 #define EMAC_MIN_MTU (EMAC_MIN_FRAME - ENET_HEADER_SIZE - ENET_FCS_SIZE) diff -Nru a/drivers/net/natsemi.c b/drivers/net/natsemi.c --- a/drivers/net/natsemi.c 2005-02-22 20:30:43 -08:00 +++ b/drivers/net/natsemi.c 2005-02-22 20:30:43 -08:00 @@ -441,6 +441,7 @@ #define DSPCFG_VAL 0x5040 #define SDCFG_VAL 0x008c /* set voltage thresholds for Signal Detect */ #define DSPCFG_LOCK 0x20 /* coefficient lock bit in DSPCFG */ +#define DSPCFG_COEF 0x1000 /* see coefficient (in TSTDAT) bit in DSPCFG */ #define TSTDAT_FIXED 0xe8 /* magic number for bad coefficients */ /* misc PCI space registers */ @@ -1243,7 +1244,8 @@ writew(1, ioaddr + PGSEL); writew(PMDCSR_VAL, ioaddr + PMDCSR); writew(TSTDAT_VAL, ioaddr + TSTDAT); - np->dspcfg = DSPCFG_VAL; + np->dspcfg = (np->srr <= SRR_DP83815_C)? + DSPCFG_VAL : (DSPCFG_COEF | readw(ioaddr + DSPCFG)); writew(np->dspcfg, ioaddr + DSPCFG); writew(SDCFG_VAL, ioaddr + SDCFG); writew(0, ioaddr + PGSEL); diff -Nru a/drivers/net/s2io.c b/drivers/net/s2io.c --- a/drivers/net/s2io.c 2005-02-22 20:30:44 -08:00 +++ b/drivers/net/s2io.c 2005-02-22 20:30:44 -08:00 @@ -3025,6 +3025,8 @@ for (i = 0; i < prev_cnt; i++) { writeq(RMAC_ADDR_DATA0_MEM_ADDR(dis_addr), &bar0->rmac_addr_data0_mem); + writeq(RMAC_ADDR_DATA1_MEM_MASK(0ULL), + &bar0->rmac_addr_data1_mem); val64 = RMAC_ADDR_CMD_MEM_WE | RMAC_ADDR_CMD_MEM_STROBE_NEW_CMD | RMAC_ADDR_CMD_MEM_OFFSET @@ -3049,8 +3051,11 @@ mac_addr |= mclist->dmi_addr[j]; mac_addr <<= 8; } + mac_addr >>= 8; writeq(RMAC_ADDR_DATA0_MEM_ADDR(mac_addr), &bar0->rmac_addr_data0_mem); + writeq(RMAC_ADDR_DATA1_MEM_MASK(0ULL), + &bar0->rmac_addr_data1_mem); val64 = RMAC_ADDR_CMD_MEM_WE | RMAC_ADDR_CMD_MEM_STROBE_NEW_CMD | diff -Nru a/drivers/net/tg3.c b/drivers/net/tg3.c --- a/drivers/net/tg3.c 2005-02-22 20:30:43 -08:00 +++ b/drivers/net/tg3.c 2005-02-22 20:30:43 -08:00 @@ -60,8 +60,8 @@ #define DRV_MODULE_NAME "tg3" #define PFX DRV_MODULE_NAME ": " -#define DRV_MODULE_VERSION "3.22" -#define DRV_MODULE_RELDATE "February 11, 2005" +#define DRV_MODULE_VERSION "3.23" +#define DRV_MODULE_RELDATE "February 15, 2005" #define TG3_DEF_MAC_MODE 0 #define TG3_DEF_RX_MODE 0 @@ -591,9 +591,10 @@ if (tp->tg3_flags2 & TG3_FLG2_NO_ETH_WIRE_SPEED) return; - tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x7007); - tg3_readphy(tp, MII_TG3_AUX_CTRL, &val); - tg3_writephy(tp, MII_TG3_AUX_CTRL, (val | (1 << 15) | (1 << 4))); + if (!tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x7007) && + !tg3_readphy(tp, MII_TG3_AUX_CTRL, &val)) + tg3_writephy(tp, MII_TG3_AUX_CTRL, + (val | (1 << 15) | (1 << 4))); } static int tg3_bmcr_reset(struct tg3 *tp) @@ -634,9 +635,10 @@ while (limit--) { u32 tmp32; - tg3_readphy(tp, 0x16, &tmp32); - if ((tmp32 & 0x1000) == 0) - break; + if (!tg3_readphy(tp, 0x16, &tmp32)) { + if ((tmp32 & 0x1000) == 0) + break; + } } if (limit <= 0) return -EBUSY; @@ -688,9 +690,9 @@ for (i = 0; i < 6; i += 2) { u32 low, high; - tg3_readphy(tp, MII_TG3_DSP_RW_PORT, &low); - tg3_readphy(tp, MII_TG3_DSP_RW_PORT, &high); - if (tg3_wait_macro_done(tp)) { + if (tg3_readphy(tp, MII_TG3_DSP_RW_PORT, &low) || + tg3_readphy(tp, MII_TG3_DSP_RW_PORT, &high) || + tg3_wait_macro_done(tp)) { *resetp = 1; return -EBUSY; } @@ -746,7 +748,9 @@ } /* Disable transmitter and interrupt. */ - tg3_readphy(tp, MII_TG3_EXT_CTRL, ®32); + if (tg3_readphy(tp, MII_TG3_EXT_CTRL, ®32)) + continue; + reg32 |= 0x3000; tg3_writephy(tp, MII_TG3_EXT_CTRL, reg32); @@ -755,7 +759,9 @@ BMCR_FULLDPLX | TG3_BMCR_SPEED1000); /* Set to master mode. */ - tg3_readphy(tp, MII_TG3_CTRL, &phy9_orig); + if (tg3_readphy(tp, MII_TG3_CTRL, &phy9_orig)) + continue; + tg3_writephy(tp, MII_TG3_CTRL, (MII_TG3_CTRL_AS_MASTER | MII_TG3_CTRL_ENABLE_AS_MASTER)); @@ -793,9 +799,11 @@ tg3_writephy(tp, MII_TG3_CTRL, phy9_orig); - tg3_readphy(tp, MII_TG3_EXT_CTRL, ®32); - reg32 &= ~0x3000; - tg3_writephy(tp, MII_TG3_EXT_CTRL, reg32); + if (!tg3_readphy(tp, MII_TG3_EXT_CTRL, ®32)) { + reg32 &= ~0x3000; + tg3_writephy(tp, MII_TG3_EXT_CTRL, reg32); + } else if (!err) + err = -EBUSY; return err; } @@ -859,9 +867,9 @@ u32 phy_reg; /* Set bit 14 with read-modify-write to preserve other bits */ - tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0007); - tg3_readphy(tp, MII_TG3_AUX_CTRL, &phy_reg); - tg3_writephy(tp, MII_TG3_AUX_CTRL, phy_reg | 0x4000); + if (!tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0007) && + !tg3_readphy(tp, MII_TG3_AUX_CTRL, &phy_reg)) + tg3_writephy(tp, MII_TG3_AUX_CTRL, phy_reg | 0x4000); } tg3_phy_set_wirespeed(tp); return 0; @@ -1244,7 +1252,7 @@ }; } -static int tg3_phy_copper_begin(struct tg3 *tp) +static void tg3_phy_copper_begin(struct tg3 *tp) { u32 new_adv; int i; @@ -1359,15 +1367,16 @@ if (tp->link_config.duplex == DUPLEX_FULL) bmcr |= BMCR_FULLDPLX; - tg3_readphy(tp, MII_BMCR, &orig_bmcr); - if (bmcr != orig_bmcr) { + if (!tg3_readphy(tp, MII_BMCR, &orig_bmcr) && + (bmcr != orig_bmcr)) { tg3_writephy(tp, MII_BMCR, BMCR_LOOPBACK); for (i = 0; i < 1500; i++) { u32 tmp; udelay(10); - tg3_readphy(tp, MII_BMSR, &tmp); - tg3_readphy(tp, MII_BMSR, &tmp); + if (tg3_readphy(tp, MII_BMSR, &tmp) || + tg3_readphy(tp, MII_BMSR, &tmp)) + continue; if (!(tmp & BMSR_LSTATUS)) { udelay(40); break; @@ -1380,8 +1389,6 @@ tg3_writephy(tp, MII_BMCR, BMCR_ANENABLE | BMCR_ANRESTART); } - - return 0; } static int tg3_init_5401phy_dsp(struct tg3 *tp) @@ -1416,7 +1423,9 @@ { u32 adv_reg, all_mask; - tg3_readphy(tp, MII_ADVERTISE, &adv_reg); + if (tg3_readphy(tp, MII_ADVERTISE, &adv_reg)) + return 0; + all_mask = (ADVERTISE_10HALF | ADVERTISE_10FULL | ADVERTISE_100HALF | ADVERTISE_100FULL); if ((adv_reg & all_mask) != all_mask) @@ -1424,7 +1433,9 @@ if (!(tp->tg3_flags & TG3_FLAG_10_100_ONLY)) { u32 tg3_ctrl; - tg3_readphy(tp, MII_TG3_CTRL, &tg3_ctrl); + if (tg3_readphy(tp, MII_TG3_CTRL, &tg3_ctrl)) + return 0; + all_mask = (MII_TG3_CTRL_ADV_1000_HALF | MII_TG3_CTRL_ADV_1000_FULL); if ((tg3_ctrl & all_mask) != all_mask) @@ -1464,8 +1475,8 @@ GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) && netif_carrier_ok(tp->dev)) { tg3_readphy(tp, MII_BMSR, &bmsr); - tg3_readphy(tp, MII_BMSR, &bmsr); - if (!(bmsr & BMSR_LSTATUS)) + if (!tg3_readphy(tp, MII_BMSR, &bmsr) && + !(bmsr & BMSR_LSTATUS)) force_reset = 1; } if (force_reset) @@ -1473,9 +1484,8 @@ if ((tp->phy_id & PHY_ID_MASK) == PHY_ID_BCM5401) { tg3_readphy(tp, MII_BMSR, &bmsr); - tg3_readphy(tp, MII_BMSR, &bmsr); - - if (!(tp->tg3_flags & TG3_FLAG_INIT_COMPLETE)) + if (tg3_readphy(tp, MII_BMSR, &bmsr) || + !(tp->tg3_flags & TG3_FLAG_INIT_COMPLETE)) bmsr = 0; if (!(bmsr & BMSR_LSTATUS)) { @@ -1486,8 +1496,8 @@ tg3_readphy(tp, MII_BMSR, &bmsr); for (i = 0; i < 1000; i++) { udelay(10); - tg3_readphy(tp, MII_BMSR, &bmsr); - if (bmsr & BMSR_LSTATUS) { + if (!tg3_readphy(tp, MII_BMSR, &bmsr) && + (bmsr & BMSR_LSTATUS)) { udelay(40); break; } @@ -1549,8 +1559,8 @@ bmsr = 0; for (i = 0; i < 100; i++) { tg3_readphy(tp, MII_BMSR, &bmsr); - tg3_readphy(tp, MII_BMSR, &bmsr); - if (bmsr & BMSR_LSTATUS) + if (!tg3_readphy(tp, MII_BMSR, &bmsr) && + (bmsr & BMSR_LSTATUS)) break; udelay(40); } @@ -1561,8 +1571,8 @@ tg3_readphy(tp, MII_TG3_AUX_STAT, &aux_stat); for (i = 0; i < 2000; i++) { udelay(10); - tg3_readphy(tp, MII_TG3_AUX_STAT, &aux_stat); - if (aux_stat) + if (!tg3_readphy(tp, MII_TG3_AUX_STAT, &aux_stat) && + aux_stat) break; } @@ -1573,7 +1583,8 @@ bmcr = 0; for (i = 0; i < 200; i++) { tg3_readphy(tp, MII_BMCR, &bmcr); - tg3_readphy(tp, MII_BMCR, &bmcr); + if (tg3_readphy(tp, MII_BMCR, &bmcr)) + continue; if (bmcr && bmcr != 0x7fff) break; udelay(10); @@ -1610,10 +1621,13 @@ (tp->link_config.autoneg == AUTONEG_ENABLE)) { u32 local_adv, remote_adv; - tg3_readphy(tp, MII_ADVERTISE, &local_adv); + if (tg3_readphy(tp, MII_ADVERTISE, &local_adv)) + local_adv = 0; local_adv &= (ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM); - tg3_readphy(tp, MII_LPA, &remote_adv); + if (tg3_readphy(tp, MII_LPA, &remote_adv)) + remote_adv = 0; + remote_adv &= (LPA_PAUSE_CAP | LPA_PAUSE_ASYM); /* If we are not advertising full pause capability, @@ -1632,8 +1646,8 @@ tg3_phy_copper_begin(tp); tg3_readphy(tp, MII_BMSR, &tmp); - tg3_readphy(tp, MII_BMSR, &tmp); - if (tmp & BMSR_LSTATUS) + if (!tg3_readphy(tp, MII_BMSR, &tmp) && + (tmp & BMSR_LSTATUS)) current_link_up = 1; } @@ -5441,9 +5455,10 @@ u32 tmp; /* Clear CRC stats. */ - tg3_readphy(tp, 0x1e, &tmp); - tg3_writephy(tp, 0x1e, tmp | 0x8000); - tg3_readphy(tp, 0x14, &tmp); + if (!tg3_readphy(tp, 0x1e, &tmp)) { + tg3_writephy(tp, 0x1e, tmp | 0x8000); + tg3_readphy(tp, 0x14, &tmp); + } } __tg3_set_rx_mode(tp->dev); @@ -6033,9 +6048,11 @@ u32 val; spin_lock_irqsave(&tp->lock, flags); - tg3_readphy(tp, 0x1e, &val); - tg3_writephy(tp, 0x1e, val | 0x8000); - tg3_readphy(tp, 0x14, &val); + if (!tg3_readphy(tp, 0x1e, &val)) { + tg3_writephy(tp, 0x1e, val | 0x8000); + tg3_readphy(tp, 0x14, &val); + } else + val = 0; spin_unlock_irqrestore(&tp->lock, flags); tp->phy_crc_errors += val; @@ -6651,10 +6668,10 @@ int r; spin_lock_irq(&tp->lock); - tg3_readphy(tp, MII_BMCR, &bmcr); - tg3_readphy(tp, MII_BMCR, &bmcr); r = -EINVAL; - if (bmcr & BMCR_ANENABLE) { + tg3_readphy(tp, MII_BMCR, &bmcr); + if (!tg3_readphy(tp, MII_BMCR, &bmcr) && + (bmcr & BMCR_ANENABLE)) { tg3_writephy(tp, MII_BMCR, bmcr | BMCR_ANRESTART); r = 0; } @@ -7654,9 +7671,8 @@ u32 bmsr, adv_reg, tg3_ctrl; tg3_readphy(tp, MII_BMSR, &bmsr); - tg3_readphy(tp, MII_BMSR, &bmsr); - - if (bmsr & BMSR_LSTATUS) + if (!tg3_readphy(tp, MII_BMSR, &bmsr) && + (bmsr & BMSR_LSTATUS)) goto skip_phy_reset; err = tg3_phy_reset(tp); diff -Nru a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c --- a/drivers/net/tulip/de2104x.c 2005-02-22 20:30:44 -08:00 +++ b/drivers/net/tulip/de2104x.c 2005-02-22 20:30:44 -08:00 @@ -1960,8 +1960,6 @@ dev->tx_timeout = de_tx_timeout; dev->watchdog_timeo = TX_TIMEOUT; - dev->irq = pdev->irq; - de = dev->priv; de->de21040 = ent->driver_data == 0 ? 1 : 0; de->pdev = pdev; @@ -1996,6 +1994,8 @@ pdev->irq, pci_name(pdev)); goto err_out_res; } + + dev->irq = pdev->irq; /* obtain and check validity of PCI I/O address */ pciaddr = pci_resource_start(pdev, 1); diff -Nru a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c --- a/drivers/net/wan/dscc4.c 2005-02-22 20:30:44 -08:00 +++ b/drivers/net/wan/dscc4.c 2005-02-22 20:30:44 -08:00 @@ -691,7 +691,7 @@ root = ppriv->root; for (i = 0; i < dev_per_card; i++) - unregister_hdlc_device(dscc4_to_dev(&root[i])); + unregister_hdlc_device(dscc4_to_dev(root + i)); pci_set_drvdata(pdev, NULL); @@ -706,33 +706,36 @@ { struct dscc4_pci_priv *priv; struct dscc4_dev_priv *dpriv; - static int cards_found = 0; void __iomem *ioaddr; - int i; + int i, rc; printk(KERN_DEBUG "%s", version); - if (pci_enable_device(pdev)) - goto err_out; - if (!request_mem_region(pci_resource_start(pdev, 0), - pci_resource_len(pdev, 0), "registers")) { + rc = pci_enable_device(pdev); + if (rc < 0) + goto out; + + rc = pci_request_region(pdev, 0, "registers"); + if (rc < 0) { printk(KERN_ERR "%s: can't reserve MMIO region (regs)\n", DRV_NAME); - goto err_out; + goto err_disable_0; } - if (!request_mem_region(pci_resource_start(pdev, 1), - pci_resource_len(pdev, 1), "LBI interface")) { + rc = pci_request_region(pdev, 1, "LBI interface"); + if (rc < 0) { printk(KERN_ERR "%s: can't reserve MMIO region (lbi)\n", DRV_NAME); - goto err_out_free_mmio_region0; + goto err_free_mmio_region_1; } + ioaddr = ioremap(pci_resource_start(pdev, 0), pci_resource_len(pdev, 0)); if (!ioaddr) { printk(KERN_ERR "%s: cannot remap MMIO region %lx @ %lx\n", DRV_NAME, pci_resource_len(pdev, 0), pci_resource_start(pdev, 0)); - goto err_out_free_mmio_region; + rc = -EIO; + goto err_free_mmio_regions_2; } printk(KERN_DEBUG "Siemens DSCC4, MMIO at %#lx (regs), %#lx (lbi), IRQ %d\n", pci_resource_start(pdev, 0), @@ -742,14 +745,16 @@ pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0xf8); pci_set_master(pdev); - if (dscc4_found1(pdev, ioaddr)) - goto err_out_iounmap; + rc = dscc4_found1(pdev, ioaddr); + if (rc < 0) + goto err_iounmap_3; - priv = (struct dscc4_pci_priv *)pci_get_drvdata(pdev); + priv = pci_get_drvdata(pdev); - if (request_irq(pdev->irq, &dscc4_irq, SA_SHIRQ, DRV_NAME, priv->root)){ + rc = request_irq(pdev->irq, dscc4_irq, SA_SHIRQ, DRV_NAME, priv->root); + if (rc < 0) { printk(KERN_WARNING "%s: IRQ %d busy\n", DRV_NAME, pdev->irq); - goto err_out_free1; + goto err_release_4; } /* power up/little endian/dma core controlled via lrda/ltda */ @@ -769,9 +774,11 @@ priv->iqcfg = (u32 *) pci_alloc_consistent(pdev, IRQ_RING_SIZE*sizeof(u32), &priv->iqcfg_dma); if (!priv->iqcfg) - goto err_out_free_irq; + goto err_free_irq_5; writel(priv->iqcfg_dma, ioaddr + IQCFG); + rc = -ENOMEM; + /* * SCC 0-3 private rx/tx irq structures * IQRX/TXi needs to be set soon. Learned it the hard way... @@ -781,7 +788,7 @@ dpriv->iqtx = (u32 *) pci_alloc_consistent(pdev, IRQ_RING_SIZE*sizeof(u32), &dpriv->iqtx_dma); if (!dpriv->iqtx) - goto err_out_free_iqtx; + goto err_free_iqtx_6; writel(dpriv->iqtx_dma, ioaddr + IQTX0 + i*4); } for (i = 0; i < dev_per_card; i++) { @@ -789,7 +796,7 @@ dpriv->iqrx = (u32 *) pci_alloc_consistent(pdev, IRQ_RING_SIZE*sizeof(u32), &dpriv->iqrx_dma); if (!dpriv->iqrx) - goto err_out_free_iqrx; + goto err_free_iqrx_7; writel(dpriv->iqrx_dma, ioaddr + IQRX0 + i*4); } @@ -804,17 +811,18 @@ writel(0xff200001, ioaddr + GCMDR); - cards_found++; - return 0; + rc = 0; +out: + return rc; -err_out_free_iqrx: +err_free_iqrx_7: while (--i >= 0) { dpriv = priv->root + i; pci_free_consistent(pdev, IRQ_RING_SIZE*sizeof(u32), dpriv->iqrx, dpriv->iqrx_dma); } i = dev_per_card; -err_out_free_iqtx: +err_free_iqtx_6: while (--i >= 0) { dpriv = priv->root + i; pci_free_consistent(pdev, IRQ_RING_SIZE*sizeof(u32), @@ -822,20 +830,19 @@ } pci_free_consistent(pdev, IRQ_RING_SIZE*sizeof(u32), priv->iqcfg, priv->iqcfg_dma); -err_out_free_irq: +err_free_irq_5: free_irq(pdev->irq, priv->root); -err_out_free1: +err_release_4: dscc4_free1(pdev); -err_out_iounmap: +err_iounmap_3: iounmap (ioaddr); -err_out_free_mmio_region: - release_mem_region(pci_resource_start(pdev, 1), - pci_resource_len(pdev, 1)); -err_out_free_mmio_region0: - release_mem_region(pci_resource_start(pdev, 0), - pci_resource_len(pdev, 0)); -err_out: - return -ENODEV; +err_free_mmio_regions_2: + pci_release_region(pdev, 1); +err_free_mmio_region_1: + pci_release_region(pdev, 0); +err_disable_0: + pci_disable_device(pdev); + goto out; }; /* @@ -882,8 +889,7 @@ struct dscc4_dev_priv *root; int i, ret = -ENOMEM; - root = (struct dscc4_dev_priv *) - kmalloc(dev_per_card*sizeof(*root), GFP_KERNEL); + root = kmalloc(dev_per_card*sizeof(*root), GFP_KERNEL); if (!root) { printk(KERN_ERR "%s: can't allocate data\n", DRV_NAME); goto err_out; @@ -892,22 +898,17 @@ for (i = 0; i < dev_per_card; i++) { root[i].dev = alloc_hdlcdev(root + i); - if (!root[i].dev) { - while (i--) - free_netdev(root[i].dev); + if (!root[i].dev) goto err_free_dev; - } } - ppriv = (struct dscc4_pci_priv *) kmalloc(sizeof(*ppriv), GFP_KERNEL); + ppriv = kmalloc(sizeof(*ppriv), GFP_KERNEL); if (!ppriv) { printk(KERN_ERR "%s: can't allocate private data\n", DRV_NAME); - goto err_free_dev2; + goto err_free_dev; } memset(ppriv, 0, sizeof(struct dscc4_pci_priv)); - ret = dscc4_set_quartz(root, quartz); - if (ret < 0) - goto err_free_priv; + ppriv->root = root; spin_lock_init(&ppriv->lock); @@ -951,20 +952,24 @@ goto err_unregister; } } + + ret = dscc4_set_quartz(root, quartz); + if (ret < 0) + goto err_unregister; + pci_set_drvdata(pdev, ppriv); return ret; err_unregister: - while (--i >= 0) { + while (i-- > 0) { dscc4_release_ring(root + i); - unregister_hdlc_device(dscc4_to_dev(&root[i])); + unregister_hdlc_device(dscc4_to_dev(root + i)); } -err_free_priv: kfree(ppriv); -err_free_dev2: - for (i = 0; i < dev_per_card; i++) - free_netdev(root[i].dev); + i = dev_per_card; err_free_dev: + while (i-- > 0) + free_netdev(root[i].dev); kfree(root); err_out: return ret; @@ -1998,10 +2003,10 @@ iounmap(ioaddr); - release_mem_region(pci_resource_start(pdev, 1), - pci_resource_len(pdev, 1)); - release_mem_region(pci_resource_start(pdev, 0), - pci_resource_len(pdev, 0)); + pci_release_region(pdev, 1); + pci_release_region(pdev, 0); + + pci_disable_device(pdev); } static int dscc4_hdlc_attach(struct net_device *dev, unsigned short encoding, diff -Nru a/drivers/net/wireless/strip.c b/drivers/net/wireless/strip.c --- a/drivers/net/wireless/strip.c 2005-02-22 20:30:44 -08:00 +++ b/drivers/net/wireless/strip.c 2005-02-22 20:30:44 -08:00 @@ -2398,7 +2398,7 @@ return 0; } -static int dev_set_mac_address(struct net_device *dev, void *addr) +static int strip_set_mac_address(struct net_device *dev, void *addr) { struct strip *strip_info = (struct strip *) (dev->priv); struct sockaddr *sa = addr; @@ -2552,7 +2552,7 @@ dev->hard_start_xmit = strip_xmit; dev->hard_header = strip_header; dev->rebuild_header = strip_rebuild_header; - dev->set_mac_address = dev_set_mac_address; + dev->set_mac_address = strip_set_mac_address; dev->get_stats = strip_get_stats; dev->change_mtu = strip_change_mtu; } diff -Nru a/drivers/pci/pci.c b/drivers/pci/pci.c --- a/drivers/pci/pci.c 2005-02-22 20:30:43 -08:00 +++ b/drivers/pci/pci.c 2005-02-22 20:30:43 -08:00 @@ -268,7 +268,7 @@ return -EIO; pci_read_config_word(dev,pm + PCI_PM_PMC,&pmc); - if ((pmc & PCI_PM_CAP_VER_MASK) != 2) { + if ((pmc & PCI_PM_CAP_VER_MASK) > 2) { printk(KERN_DEBUG "PCI: %s has unsupported PM cap regs version (%u)\n", dev->slot_name, pmc & PCI_PM_CAP_VER_MASK); diff -Nru a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c --- a/drivers/pcmcia/soc_common.c 2005-02-22 20:30:43 -08:00 +++ b/drivers/pcmcia/soc_common.c 2005-02-22 20:30:43 -08:00 @@ -397,8 +397,8 @@ map->stop = PAGE_SIZE-1; map->stop -= map->start; - map->stop += (unsigned long)skt->virt_io; - map->start = (unsigned long)skt->virt_io; + map->stop += skt->socket.io_offset; + map->start = skt->socket.io_offset; return 0; } diff -Nru a/drivers/pcmcia/soc_common.h b/drivers/pcmcia/soc_common.h --- a/drivers/pcmcia/soc_common.h 2005-02-22 20:30:44 -08:00 +++ b/drivers/pcmcia/soc_common.h 2005-02-22 20:30:44 -08:00 @@ -53,7 +53,7 @@ struct resource res_io; struct resource res_mem; struct resource res_attr; - void *virt_io; + void __iomem *virt_io; unsigned int irq_state; diff -Nru a/drivers/pnp/pnpbios/rsparser.c b/drivers/pnp/pnpbios/rsparser.c --- a/drivers/pnp/pnpbios/rsparser.c 2005-02-22 20:30:43 -08:00 +++ b/drivers/pnp/pnpbios/rsparser.c 2005-02-22 20:30:43 -08:00 @@ -7,7 +7,12 @@ #include #include #include + +#ifdef CONFIG_PCI #include +#else +inline void pcibios_penalize_isa_irq(int irq) {} +#endif /* CONFIG_PCI */ #include "pnpbios.h" diff -Nru a/drivers/s390/block/dasd_genhd.c b/drivers/s390/block/dasd_genhd.c --- a/drivers/s390/block/dasd_genhd.c 2005-02-22 20:30:44 -08:00 +++ b/drivers/s390/block/dasd_genhd.c 2005-02-22 20:30:44 -08:00 @@ -149,8 +149,8 @@ * Can't call delete_partitions directly. Use ioctl. * The ioctl also does locking and invalidation. */ - memset(&bpart, sizeof(struct blkpg_partition), 0); - memset(&barg, sizeof(struct blkpg_ioctl_arg), 0); + memset(&bpart, 0, sizeof(struct blkpg_partition)); + memset(&barg, 0, sizeof(struct blkpg_ioctl_arg)); barg.data = &bpart; barg.op = BLKPG_DEL_PARTITION; for (bpart.pno = device->gdp->minors - 1; bpart.pno > 0; bpart.pno--) diff -Nru a/drivers/s390/cio/cmf.c b/drivers/s390/cio/cmf.c --- a/drivers/s390/cio/cmf.c 2005-02-22 20:30:43 -08:00 +++ b/drivers/s390/cio/cmf.c 2005-02-22 20:30:43 -08:00 @@ -526,7 +526,7 @@ time = get_clock() - cdev->private->cmb_start_time; spin_unlock_irqrestore(cdev->ccwlock, flags); - memset(data, sizeof(struct cmbdata), 0); + memset(data, 0, sizeof(struct cmbdata)); /* we only know values before device_busy_time */ data->size = offsetof(struct cmbdata, device_busy_time); @@ -736,7 +736,7 @@ time = get_clock() - cdev->private->cmb_start_time; spin_unlock_irqrestore(cdev->ccwlock, flags); - memset (data, sizeof(struct cmbdata), 0); + memset (data, 0, sizeof(struct cmbdata)); /* we only know values before device_busy_time */ data->size = offsetof(struct cmbdata, device_busy_time); diff -Nru a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c --- a/drivers/s390/cio/css.c 2005-02-22 20:30:44 -08:00 +++ b/drivers/s390/cio/css.c 2005-02-22 20:30:44 -08:00 @@ -527,7 +527,7 @@ new_slow_sch = kmalloc(sizeof(struct slow_subchannel), GFP_ATOMIC); if (!new_slow_sch) return -ENOMEM; - memset(new_slow_sch, sizeof(struct slow_subchannel), 0); + memset(new_slow_sch, 0, sizeof(struct slow_subchannel)); new_slow_sch->schid = schid; spin_lock_irqsave(&slow_subchannel_lock, flags); list_add_tail(&new_slow_sch->slow_list, &slow_subchannels_head); diff -Nru a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c --- a/drivers/scsi/libata-core.c 2005-02-22 20:30:43 -08:00 +++ b/drivers/scsi/libata-core.c 2005-02-22 20:30:43 -08:00 @@ -2800,7 +2800,7 @@ return 1; /* fall through */ - + default: return 0; } @@ -3743,16 +3743,13 @@ if (legacy_mode) { if (legacy_mode & (1 << 0)) ata_device_add(probe_ent); - else - kfree(probe_ent); if (legacy_mode & (1 << 1)) ata_device_add(probe_ent2); - else - kfree(probe_ent2); - } else { + } else ata_device_add(probe_ent); - } + kfree(probe_ent); + kfree(probe_ent2); return 0; diff -Nru a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c --- a/drivers/usb/core/hcd.c 2005-02-22 20:30:44 -08:00 +++ b/drivers/usb/core/hcd.c 2005-02-22 20:30:44 -08:00 @@ -39,6 +39,7 @@ #include #include #include +#include #include #include diff -Nru a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c --- a/drivers/usb/core/hub.c 2005-02-22 20:30:43 -08:00 +++ b/drivers/usb/core/hub.c 2005-02-22 20:30:43 -08:00 @@ -1382,6 +1382,9 @@ /* return on disconnect or reset */ switch (status) { case 0: + /* TRSTRCY = 10 ms */ + msleep(10); + /* FALL THROUGH */ case -ENOTCONN: case -ENODEV: clear_port_feature(hub->hdev, diff -Nru a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c --- a/drivers/usb/host/ehci-hcd.c 2005-02-22 20:30:44 -08:00 +++ b/drivers/usb/host/ehci-hcd.c 2005-02-22 20:30:44 -08:00 @@ -389,8 +389,29 @@ temp = HCS_N_CC(ehci->hcs_params) * HCS_N_PCC(ehci->hcs_params); temp &= 0x0f; if (temp && HCS_N_PORTS(ehci->hcs_params) > temp) { - temp |= (ehci->hcs_params & ~0xf); - ehci->hcs_params = temp; + ehci_dbg (ehci, "bogus port configuration: " + "cc=%d x pcc=%d < ports=%d\n", + HCS_N_CC(ehci->hcs_params), + HCS_N_PCC(ehci->hcs_params), + HCS_N_PORTS(ehci->hcs_params)); + +#ifdef CONFIG_PCI + if (hcd->self.controller->bus == &pci_bus_type) { + struct pci_dev *pdev; + + pdev = to_pci_dev(hcd->self.controller); + switch (pdev->vendor) { + case 0x17a0: /* GENESYS */ + /* GL880S: should be PORTS=2 */ + temp |= (ehci->hcs_params & ~0xf); + ehci->hcs_params = temp; + break; + case PCI_VENDOR_ID_NVIDIA: + /* NF4: should be PCC=10 */ + break; + } + } +#endif } /* force HC to halt state */ diff -Nru a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c --- a/drivers/usb/host/ehci-q.c 2005-02-22 20:30:44 -08:00 +++ b/drivers/usb/host/ehci-q.c 2005-02-22 20:30:44 -08:00 @@ -267,6 +267,7 @@ } static void start_unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh); +static void unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh); static void intr_deschedule (struct ehci_hcd *ehci, struct ehci_qh *qh); static int qh_schedule (struct ehci_hcd *ehci, struct ehci_qh *qh); @@ -430,7 +431,7 @@ intr_deschedule (ehci, qh); (void) qh_schedule (ehci, qh); } else - start_unlink_async (ehci, qh); + unlink_async (ehci, qh); break; /* otherwise, unlink already started */ } diff -Nru a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c --- a/drivers/video/aty/atyfb_base.c 2005-02-22 20:30:44 -08:00 +++ b/drivers/video/aty/atyfb_base.c 2005-02-22 20:30:44 -08:00 @@ -2511,7 +2511,15 @@ } } else #endif /* !CONFIG_PPC */ - if (!fb_find_mode(&var, info, mode, NULL, 0, &defmode, 8)) + if ( +#if defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64) + /* On Sparc, unless the user gave a specific mode + * specification, use the PROM probed values in + * default_var. + */ + !mode || +#endif + !fb_find_mode(&var, info, mode, NULL, 0, &defmode, 8)) var = default_var; if (noaccel) diff -Nru a/drivers/video/aty/radeon_accel.c b/drivers/video/aty/radeon_accel.c --- a/drivers/video/aty/radeon_accel.c 2005-02-22 20:30:44 -08:00 +++ b/drivers/video/aty/radeon_accel.c 2005-02-22 20:30:44 -08:00 @@ -4,6 +4,41 @@ * "ACCEL_MMIO" ifdef branches in XFree86 * --dte */ + +static void radeon_fixup_offset(struct radeonfb_info *rinfo) +{ + u32 local_base; + + /* *** Ugly workaround *** */ + /* + * On some platforms, the video memory is mapped at 0 in radeon chip space + * (like PPCs) by the firmware. X will always move it up so that it's seen + * by the chip to be at the same address as the PCI BAR. + * That means that when switching back from X, there is a mismatch between + * the offsets programmed into the engine. This means that potentially, + * accel operations done before radeonfb has a chance to re-init the engine + * will have incorrect offsets, and potentially trash system memory ! + * + * The correct fix is for fbcon to never call any accel op before the engine + * has properly been re-initialized (by a call to set_var), but this is a + * complex fix. This workaround in the meantime, called before every accel + * operation, makes sure the offsets are in sync. + */ + + radeon_fifo_wait (1); + local_base = INREG(MC_FB_LOCATION) << 16; + if (local_base == rinfo->fb_local_base) + return; + + rinfo->fb_local_base = local_base; + + radeon_fifo_wait (3); + OUTREG(DEFAULT_PITCH_OFFSET, (rinfo->pitch << 0x16) | + (rinfo->fb_local_base >> 10)); + OUTREG(DST_PITCH_OFFSET, (rinfo->pitch << 0x16) | (rinfo->fb_local_base >> 10)); + OUTREG(SRC_PITCH_OFFSET, (rinfo->pitch << 0x16) | (rinfo->fb_local_base >> 10)); +} + static void radeonfb_prim_fillrect(struct radeonfb_info *rinfo, const struct fb_fillrect *region) { @@ -38,6 +73,8 @@ return; } + radeon_fixup_offset(rinfo); + vxres = info->var.xres_virtual; vyres = info->var.yres_virtual; @@ -104,6 +141,8 @@ cfb_copyarea(info, area); return; } + + radeon_fixup_offset(rinfo); vxres = info->var.xres_virtual; vyres = info->var.yres_virtual; diff -Nru a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c --- a/drivers/video/aty/radeon_base.c 2005-02-22 20:30:43 -08:00 +++ b/drivers/video/aty/radeon_base.c 2005-02-22 20:30:43 -08:00 @@ -2361,13 +2361,6 @@ pci_set_drvdata(pdev, info); - /* Setup Power Management capabilities */ - if (default_dynclk < -1) { - /* -2 is special: means ON on mobility chips and do not change on others */ - radeonfb_pm_init(rinfo, rinfo->is_mobility ? 1 : -1); - } else - radeonfb_pm_init(rinfo, default_dynclk); - /* Register with fbdev layer */ ret = register_framebuffer(info); if (ret < 0) { @@ -2375,6 +2368,13 @@ pci_name(rinfo->pdev)); goto err_unmap_fb; } + + /* Setup Power Management capabilities */ + if (default_dynclk < -1) { + /* -2 is special: means ON on mobility chips and do not change on others */ + radeonfb_pm_init(rinfo, rinfo->is_mobility ? 1 : -1); + } else + radeonfb_pm_init(rinfo, default_dynclk); #ifdef CONFIG_MTRR rinfo->mtrr_hdl = nomtrr ? -1 : mtrr_add(rinfo->fb_base_phys, diff -Nru a/drivers/video/aty/radeon_pm.c b/drivers/video/aty/radeon_pm.c --- a/drivers/video/aty/radeon_pm.c 2005-02-22 20:30:44 -08:00 +++ b/drivers/video/aty/radeon_pm.c 2005-02-22 20:30:44 -08:00 @@ -180,7 +180,7 @@ tmp = INPLL(pllMCLK_CNTL); tmp &= ~(MCLK_CNTL__FORCE_MCLKA | MCLK_CNTL__FORCE_YCLKA); - OUTREG(pllMCLK_CNTL, tmp); + OUTPLL(pllMCLK_CNTL, tmp); radeon_msleep(16); } /* Hrm... same shit, X doesn't do that but I have to */ @@ -404,7 +404,7 @@ ((INREG(CONFIG_CNTL) & CFG_ATI_REV_ID_MASK) < CFG_ATI_REV_A13)) { tmp = INPLL(pllPLL_PWRMGT_CNTL); tmp |= PLL_PWRMGT_CNTL__TCL_BYPASS_DISABLE; - OUTREG(pllPLL_PWRMGT_CNTL, tmp); + OUTPLL(pllPLL_PWRMGT_CNTL, tmp); radeon_msleep(15); } diff -Nru a/drivers/video/au1100fb.c b/drivers/video/au1100fb.c --- a/drivers/video/au1100fb.c 2005-02-22 20:30:43 -08:00 +++ b/drivers/video/au1100fb.c 2005-02-22 20:30:43 -08:00 @@ -408,7 +408,7 @@ /* This is an IO map - tell maydump to skip this VMA */ vma->vm_flags |= VM_IO; - if (io_remap_page_range(vma->vm_start, off, + if (io_remap_page_range(vma, vma->vm_start, off, vma->vm_end - vma->vm_start, vma->vm_page_prot)) { return -EAGAIN; diff -Nru a/drivers/video/cg3.c b/drivers/video/cg3.c --- a/drivers/video/cg3.c 2005-02-22 20:30:44 -08:00 +++ b/drivers/video/cg3.c 2005-02-22 20:30:44 -08:00 @@ -209,7 +209,7 @@ case FB_BLANK_HSYNC_SUSPEND: /* VESA blank (hsync off) */ case FB_BLANK_POWERDOWN: /* Poweroff */ val = sbus_readb(®s->control); - val |= CG3_CR_ENABLE_VIDEO; + val &= ~CG3_CR_ENABLE_VIDEO; sbus_writeb(val, ®s->control); par->flags |= CG3_FLAG_BLANKED; break; diff -Nru a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c --- a/drivers/video/sis/sis_main.c 2005-02-22 20:30:44 -08:00 +++ b/drivers/video/sis/sis_main.c 2005-02-22 20:30:44 -08:00 @@ -39,6 +39,7 @@ #include #endif #include +#include #include #include #include diff -Nru a/fs/binfmt_elf.c b/fs/binfmt_elf.c --- a/fs/binfmt_elf.c 2005-02-22 20:30:43 -08:00 +++ b/fs/binfmt_elf.c 2005-02-22 20:30:43 -08:00 @@ -757,7 +757,7 @@ /* Do this immediately, since STACK_TOP as used in setup_arg_pages may depend on the personality. */ SET_PERSONALITY(loc->elf_ex, ibcs2_interpreter); - if (elf_read_implies_exec(loc->elf_ex, have_pt_gnu_stack)) + if (elf_read_implies_exec(loc->elf_ex, executable_stack)) current->personality |= READ_IMPLIES_EXEC; arch_pick_mmap_layout(current->mm); diff -Nru a/fs/buffer.c b/fs/buffer.c --- a/fs/buffer.c 2005-02-22 20:30:44 -08:00 +++ b/fs/buffer.c 2005-02-22 20:30:44 -08:00 @@ -550,7 +550,8 @@ set_buffer_uptodate(bh); } else { clear_buffer_uptodate(bh); - buffer_io_error(bh); + if (printk_ratelimit()) + buffer_io_error(bh); SetPageError(page); } diff -Nru a/fs/compat_ioctl.c b/fs/compat_ioctl.c --- a/fs/compat_ioctl.c 2005-02-22 20:30:44 -08:00 +++ b/fs/compat_ioctl.c 2005-02-22 20:30:44 -08:00 @@ -687,6 +687,11 @@ set_fs (old_fs); if (!err) { switch (cmd) { + /* TUNSETIFF is defined as _IOW, it should be _IORW + * as the data is copied back to user space, but that + * cannot be fixed without breaking all existing apps. + */ + case TUNSETIFF: case SIOCGIFFLAGS: case SIOCGIFMETRIC: case SIOCGIFMTU: diff -Nru a/fs/nfs/file.c b/fs/nfs/file.c --- a/fs/nfs/file.c 2005-02-22 20:30:44 -08:00 +++ b/fs/nfs/file.c 2005-02-22 20:30:44 -08:00 @@ -303,10 +303,10 @@ status = NFS_PROTO(inode)->lock(filp, cmd, fl); else { struct file_lock *cfl = posix_test_lock(filp, fl); - if (cfl != NULL) { + + fl->fl_type = F_UNLCK; + if (cfl != NULL) memcpy(fl, cfl, sizeof(*fl)); - fl->fl_type = F_UNLCK; - } } unlock_kernel(); return status; diff -Nru a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c --- a/fs/xfs/linux-2.6/xfs_aops.c 2005-02-22 20:30:44 -08:00 +++ b/fs/xfs/linux-2.6/xfs_aops.c 2005-02-22 20:30:44 -08:00 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 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 @@ -156,9 +156,7 @@ { ASSERT(!private || inode == (struct inode *)private); - /* private indicates an unwritten extent lay beneath this IO, - * see linvfs_get_block_core. - */ + /* private indicates an unwritten extent lay beneath this IO */ if (private && size > 0) { vnode_t *vp = LINVFS_GET_VP(inode); int error; @@ -728,11 +726,9 @@ pgoff_t end_index, last_index, tlast; int len, err, i, cnt = 0, uptodate = 1; int flags = startio ? 0 : BMAPI_TRYLOCK; - int page_dirty = 1; - int delalloc = 0; - + int page_dirty, delalloc = 0; - /* Are we off the end of the file ? */ + /* Is this page beyond the end of the file? */ offset = i_size_read(inode); end_index = offset >> PAGE_CACHE_SHIFT; last_index = (offset - 1) >> PAGE_CACHE_SHIFT; @@ -751,7 +747,13 @@ bh = head = page_buffers(page); iomp = NULL; + /* + * page_dirty is initially a count of buffers on the page and + * is decrememted as we move each into a cleanable state. + */ len = bh->b_size; + page_dirty = PAGE_CACHE_SIZE / len; + do { if (offset >= end_offset) break; @@ -794,7 +796,7 @@ } BUG_ON(!buffer_locked(bh)); bh_arr[cnt++] = bh; - page_dirty = 0; + page_dirty--; } /* * Second case, allocate space for a delalloc buffer. @@ -821,7 +823,7 @@ unlock_buffer(bh); mark_buffer_dirty(bh); } - page_dirty = 0; + page_dirty--; } } else if ((buffer_uptodate(bh) || PageUptodate(page)) && (unmapped || startio)) { @@ -857,13 +859,13 @@ unlock_buffer(bh); mark_buffer_dirty(bh); } - page_dirty = 0; + page_dirty--; } } else if (startio) { if (buffer_uptodate(bh) && !test_and_set_bit(BH_Lock, &bh->b_state)) { bh_arr[cnt++] = bh; - page_dirty = 0; + page_dirty--; } } } @@ -907,7 +909,7 @@ } STATIC int -linvfs_get_block_core( +__linvfs_get_block( struct inode *inode, sector_t iblock, unsigned long blocks, @@ -977,10 +979,10 @@ if (iomap.iomap_flags & IOMAP_DELAY) { BUG_ON(direct); if (create) { - set_buffer_mapped(bh_result); set_buffer_uptodate(bh_result); + set_buffer_mapped(bh_result); + set_buffer_delay(bh_result); } - set_buffer_delay(bh_result); } if (blocks) { @@ -999,7 +1001,7 @@ struct buffer_head *bh_result, int create) { - return linvfs_get_block_core(inode, iblock, 0, bh_result, + return __linvfs_get_block(inode, iblock, 0, bh_result, create, 0, BMAPI_WRITE); } @@ -1011,7 +1013,7 @@ struct buffer_head *bh_result, int create) { - return linvfs_get_block_core(inode, iblock, max_blocks, bh_result, + return __linvfs_get_block(inode, iblock, max_blocks, bh_result, create, 1, BMAPI_WRITE|BMAPI_DIRECT); } diff -Nru a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c --- a/fs/xfs/linux-2.6/xfs_lrw.c 2005-02-22 20:30:43 -08:00 +++ b/fs/xfs/linux-2.6/xfs_lrw.c 2005-02-22 20:30:43 -08:00 @@ -676,6 +676,8 @@ if (XFS_FORCED_SHUTDOWN(mp)) return -EIO; + fs_check_frozen(vp->v_vfsp, SB_FREEZE_WRITE); + if (ioflags & IO_ISDIRECT) { xfs_buftarg_t *target = (xip->i_d.di_flags & XFS_DIFLAG_REALTIME) ? @@ -960,9 +962,9 @@ xfs_trans_set_sync(tp); error = xfs_trans_commit(tp, 0, NULL); xfs_iunlock(xip, XFS_ILOCK_EXCL); - if (error) - goto out_unlock_internal; } + if (error) + goto out_unlock_internal; } xfs_rwunlock(bdp, locktype); diff -Nru a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c --- a/fs/xfs/linux-2.6/xfs_super.c 2005-02-22 20:30:44 -08:00 +++ b/fs/xfs/linux-2.6/xfs_super.c 2005-02-22 20:30:44 -08:00 @@ -348,6 +348,12 @@ if (sync) flags |= FLUSH_SYNC; VOP_IFLUSH(vp, flags, error); + if (error == EAGAIN) { + if (sync) + VOP_IFLUSH(vp, flags | FLUSH_LOG, error); + else + error = 0; + } } return -error; diff -Nru a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c --- a/fs/xfs/xfs_vnodeops.c 2005-02-22 20:30:44 -08:00 +++ b/fs/xfs/xfs_vnodeops.c 2005-02-22 20:30:44 -08:00 @@ -3681,27 +3681,27 @@ { xfs_inode_t *ip; xfs_mount_t *mp; + xfs_inode_log_item_t *iip; int error = 0; ip = XFS_BHVTOI(bdp); mp = ip->i_mount; + iip = ip->i_itemp; if (XFS_FORCED_SHUTDOWN(mp)) return XFS_ERROR(EIO); - /* Bypass inodes which have already been cleaned by + /* + * Bypass inodes which have already been cleaned by * the inode flush clustering code inside xfs_iflush */ if ((ip->i_update_core == 0) && - ((ip->i_itemp == NULL) || - !(ip->i_itemp->ili_format.ilf_fields & XFS_ILOG_ALL))) + ((iip == NULL) || !(iip->ili_format.ilf_fields & XFS_ILOG_ALL))) return 0; if (flags & FLUSH_LOG) { - xfs_inode_log_item_t *iip = ip->i_itemp; - if (iip && iip->ili_last_lsn) { - xlog_t *log = mp->m_log; + xlog_t *log = mp->m_log; xfs_lsn_t sync_lsn; int s, log_flags = XFS_LOG_FORCE; @@ -3714,12 +3714,12 @@ if (flags & FLUSH_SYNC) log_flags |= XFS_LOG_SYNC; - return xfs_log_force(mp, iip->ili_last_lsn, - log_flags); + return xfs_log_force(mp, iip->ili_last_lsn, log_flags); } } - /* We make this non-blocking if the inode is contended, + /* + * We make this non-blocking if the inode is contended, * return EAGAIN to indicate to the caller that they * did not succeed. This prevents the flush path from * blocking on inodes inside another operation right diff -Nru a/include/acpi/acconfig.h b/include/acpi/acconfig.h --- a/include/acpi/acconfig.h 2005-02-22 20:30:44 -08:00 +++ b/include/acpi/acconfig.h 2005-02-22 20:30:44 -08:00 @@ -64,7 +64,7 @@ /* Version string */ -#define ACPI_CA_VERSION 0x20050125 +#define ACPI_CA_VERSION 0x20050211 /* * OS name, used for the _OS object. The _OS object is essentially obsolete, diff -Nru a/include/acpi/acinterp.h b/include/acpi/acinterp.h --- a/include/acpi/acinterp.h 2005-02-22 20:30:44 -08:00 +++ b/include/acpi/acinterp.h 2005-02-22 20:30:44 -08:00 @@ -217,8 +217,8 @@ u8 acpi_ex_do_match ( u32 match_op, - acpi_integer package_value, - acpi_integer match_value); + union acpi_operand_object *package_obj, + union acpi_operand_object *match_obj); acpi_status acpi_ex_get_object_reference ( @@ -617,6 +617,7 @@ acpi_status acpi_ex_store_buffer_to_buffer ( + acpi_object_type original_src_type, union acpi_operand_object *source_desc, union acpi_operand_object *target_desc); diff -Nru a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h --- a/include/acpi/platform/aclinux.h 2005-02-22 20:30:44 -08:00 +++ b/include/acpi/platform/aclinux.h 2005-02-22 20:30:44 -08:00 @@ -81,6 +81,8 @@ #define ACPI_USE_NATIVE_DIVIDE #endif +#define __cdecl +#define ACPI_FLUSH_CPU_CACHE() #endif /* __KERNEL__ */ /* Linux uses GCC */ diff -Nru a/include/asm-arm/hardware/sa1111.h b/include/asm-arm/hardware/sa1111.h --- a/include/asm-arm/hardware/sa1111.h 2005-02-22 20:30:44 -08:00 +++ b/include/asm-arm/hardware/sa1111.h 2005-02-22 20:30:44 -08:00 @@ -49,8 +49,8 @@ */ #define __CCREG(x) __REGP(SA1111_VBASE + (x)) -#define sa1111_writel(val,addr) ({ *(volatile unsigned int *)(addr) = (val); }) -#define sa1111_readl(addr) (*(volatile unsigned int *)(addr)) +#define sa1111_writel(val,addr) __raw_writel(val, addr) +#define sa1111_readl(addr) __raw_readl(addr) /* * System Bus Interface (SBI) @@ -551,7 +551,7 @@ struct device dev; unsigned int devid; struct resource res; - void *mapbase; + void __iomem *mapbase; unsigned int skpcr_mask; unsigned int irq[6]; u64 dma_mask; diff -Nru a/include/asm-generic/4level-fixup.h b/include/asm-generic/4level-fixup.h --- a/include/asm-generic/4level-fixup.h 2005-02-22 20:30:43 -08:00 +++ b/include/asm-generic/4level-fixup.h 2005-02-22 20:30:43 -08:00 @@ -24,7 +24,7 @@ #define pud_bad(pud) 0 #define pud_present(pud) 1 #define pud_ERROR(pud) do { } while (0) -#define pud_clear(pud) do { } while (0) +#define pud_clear(pud) pgd_clear(pud) #undef pud_free_tlb #define pud_free_tlb(tlb, x) do { } while (0) diff -Nru a/include/asm-i386/elf.h b/include/asm-i386/elf.h --- a/include/asm-i386/elf.h 2005-02-22 20:30:44 -08:00 +++ b/include/asm-i386/elf.h 2005-02-22 20:30:44 -08:00 @@ -123,7 +123,7 @@ * An executable for which elf_read_implies_exec() returns TRUE will * have the READ_IMPLIES_EXEC personality flag set automatically. */ -#define elf_read_implies_exec(ex, have_pt_gnu_stack) (!(have_pt_gnu_stack)) +#define elf_read_implies_exec(ex, executable_stack) (executable_stack != EXSTACK_DISABLE_X) extern int dump_task_regs (struct task_struct *, elf_gregset_t *); extern int dump_task_fpu (struct task_struct *, elf_fpregset_t *); diff -Nru a/include/asm-ia64/elf.h b/include/asm-ia64/elf.h --- a/include/asm-ia64/elf.h 2005-02-22 20:30:44 -08:00 +++ b/include/asm-ia64/elf.h 2005-02-22 20:30:44 -08:00 @@ -186,8 +186,8 @@ #ifdef __KERNEL__ #define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX) -#define elf_read_implies_exec(ex, have_pt_gnu_stack) \ - (!(have_pt_gnu_stack) && ((ex).e_flags & EF_IA_64_LINUX_EXECUTABLE_STACK) != 0) +#define elf_read_implies_exec(ex, executable_stack) \ + ((executable_stack!=EXSTACK_DISABLE_X) && ((ex).e_flags & EF_IA_64_LINUX_EXECUTABLE_STACK) != 0) struct task_struct; diff -Nru a/include/asm-m32r/bitops.h b/include/asm-m32r/bitops.h --- a/include/asm-m32r/bitops.h 2005-02-22 20:30:43 -08:00 +++ b/include/asm-m32r/bitops.h 2005-02-22 20:30:43 -08:00 @@ -405,9 +405,10 @@ * @offset: The bitnumber to start searching at * @size: The maximum size to search */ -static __inline__ int find_next_zero_bit(void *addr, int size, int offset) +static __inline__ int find_next_zero_bit(const unsigned long *addr, + int size, int offset) { - unsigned long *p = ((unsigned long *) addr) + (offset >> 5); + const unsigned long *p = addr + (offset >> 5); unsigned long result = offset & ~31UL; unsigned long tmp; diff -Nru a/include/asm-m32r/spinlock.h b/include/asm-m32r/spinlock.h --- a/include/asm-m32r/spinlock.h 2005-02-22 20:30:44 -08:00 +++ b/include/asm-m32r/spinlock.h 2005-02-22 20:30:44 -08:00 @@ -20,23 +20,13 @@ #define RW_LOCK_BIAS 0x01000000 #define RW_LOCK_BIAS_STR "0x01000000" -/* It seems that people are forgetting to - * initialize their spinlocks properly, tsk tsk. - * Remember to turn this off in 2.4. -ben - */ -#if defined(CONFIG_DEBUG_SPINLOCK) -#define SPINLOCK_DEBUG 1 -#else -#define SPINLOCK_DEBUG 0 -#endif - /* * Your basic SMP spinlocks, allowing only a single CPU anywhere */ typedef struct { - volatile int lock; -#if SPINLOCK_DEBUG + volatile int slock; +#ifdef CONFIG_DEBUG_SPINLOCK unsigned magic; #endif #ifdef CONFIG_PREEMPT @@ -46,7 +36,7 @@ #define SPINLOCK_MAGIC 0xdead4ead -#if SPINLOCK_DEBUG +#ifdef CONFIG_DEBUG_SPINLOCK #define SPINLOCK_MAGIC_INIT , SPINLOCK_MAGIC #else #define SPINLOCK_MAGIC_INIT /* */ @@ -63,7 +53,7 @@ * We make no fairness assumptions. They have a cost. */ -#define spin_is_locked(x) (*(volatile int *)(&(x)->lock) <= 0) +#define spin_is_locked(x) (*(volatile int *)(&(x)->slock) <= 0) #define spin_unlock_wait(x) do { barrier(); } while(spin_is_locked(x)) #define _raw_spin_lock_flags(lock, flags) _raw_spin_lock(lock) @@ -80,11 +70,11 @@ unsigned long tmp1, tmp2; /* - * lock->lock : =1 : unlock - * : <=0 : lock + * lock->slock : =1 : unlock + * : <=0 : lock * { - * oldval = lock->lock; <--+ need atomic operation - * lock->lock = 0; <--+ + * oldval = lock->slock; <--+ need atomic operation + * lock->slock = 0; <--+ * } */ __asm__ __volatile__ ( @@ -97,7 +87,7 @@ "unlock %1, @%3; \n\t" "mvtc %2, psw; \n\t" : "=&r" (oldval), "=&r" (tmp1), "=&r" (tmp2) - : "r" (&lock->lock) + : "r" (&lock->slock) : "memory" #ifdef CONFIG_CHIP_M32700_TS1 , "r6" @@ -111,22 +101,22 @@ { unsigned long tmp0, tmp1; -#if SPINLOCK_DEBUG +#ifdef CONFIG_DEBUG_SPINLOCK __label__ here; here: if (lock->magic != SPINLOCK_MAGIC) { - printk("eip: %p\n", &&here); + printk("pc: %p\n", &&here); BUG(); } #endif /* - * lock->lock : =1 : unlock - * : <=0 : lock + * lock->slock : =1 : unlock + * : <=0 : lock * * for ( ; ; ) { - * lock->lock -= 1; <-- need atomic operation - * if (lock->lock == 0) break; - * for ( ; lock->lock <= 0 ; ); + * lock->slock -= 1; <-- need atomic operation + * if (lock->slock == 0) break; + * for ( ; lock->slock <= 0 ; ); * } */ __asm__ __volatile__ ( @@ -149,7 +139,7 @@ "bra 2b; \n\t" LOCK_SECTION_END : "=&r" (tmp0), "=&r" (tmp1) - : "r" (&lock->lock) + : "r" (&lock->slock) : "memory" #ifdef CONFIG_CHIP_M32700_TS1 , "r6" @@ -159,12 +149,12 @@ static inline void _raw_spin_unlock(spinlock_t *lock) { -#if SPINLOCK_DEBUG +#ifdef CONFIG_DEBUG_SPINLOCK BUG_ON(lock->magic != SPINLOCK_MAGIC); BUG_ON(!spin_is_locked(lock)); #endif mb(); - lock->lock = 1; + lock->slock = 1; } /* @@ -179,7 +169,7 @@ */ typedef struct { volatile int lock; -#if SPINLOCK_DEBUG +#ifdef CONFIG_DEBUG_SPINLOCK unsigned magic; #endif #ifdef CONFIG_PREEMPT @@ -189,7 +179,7 @@ #define RWLOCK_MAGIC 0xdeaf1eed -#if SPINLOCK_DEBUG +#ifdef CONFIG_DEBUG_SPINLOCK #define RWLOCK_MAGIC_INIT , RWLOCK_MAGIC #else #define RWLOCK_MAGIC_INIT /* */ @@ -199,6 +189,18 @@ #define rwlock_init(x) do { *(x) = RW_LOCK_UNLOCKED; } while(0) +/** + * read_can_lock - would read_trylock() succeed? + * @lock: the rwlock in question. + */ +#define read_can_lock(x) ((int)(x)->lock > 0) + +/** + * write_can_lock - would write_trylock() succeed? + * @lock: the rwlock in question. + */ +#define write_can_lock(x) ((x)->lock == RW_LOCK_BIAS) + /* * On x86, we implement read-write locks as a 32-bit counter * with the high bit (sign) being the "contended" bit. @@ -214,7 +216,7 @@ { unsigned long tmp0, tmp1; -#if SPINLOCK_DEBUG +#ifdef CONFIG_DEBUG_SPINLOCK BUG_ON(rw->magic != RWLOCK_MAGIC); #endif /* @@ -268,7 +270,7 @@ { unsigned long tmp0, tmp1, tmp2; -#if SPINLOCK_DEBUG +#ifdef CONFIG_DEBUG_SPINLOCK BUG_ON(rw->magic != RWLOCK_MAGIC); #endif /* diff -Nru a/include/asm-ppc/io.h b/include/asm-ppc/io.h --- a/include/asm-ppc/io.h 2005-02-22 20:30:44 -08:00 +++ b/include/asm-ppc/io.h 2005-02-22 20:30:44 -08:00 @@ -360,6 +360,7 @@ { memcpy((void __force *) dst, src, count); } +#endif #define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void __force *)(void __iomem *)(b),(c),(d)) @@ -408,7 +409,7 @@ return (void*) mm_ptov (address); #endif } -#endif + /* * Change virtual addresses to physical addresses and vv, for * addresses in the area where the kernel has the RAM mapped. diff -Nru a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h --- a/include/asm-ppc/pgtable.h 2005-02-22 20:30:44 -08:00 +++ b/include/asm-ppc/pgtable.h 2005-02-22 20:30:44 -08:00 @@ -560,12 +560,12 @@ static inline int ptep_test_and_clear_young(pte_t *ptep) { unsigned long old; - old = (pte_update(ptep, _PAGE_ACCESSED, 0) & _PAGE_ACCESSED); + old = pte_update(ptep, _PAGE_ACCESSED, 0); #if _PAGE_HASHPTE != 0 if (old & _PAGE_HASHPTE) flush_hash_one_pte(ptep); #endif - return old != 0; + return (old & _PAGE_ACCESSED) != 0; } static inline int ptep_test_and_clear_dirty(pte_t *ptep) diff -Nru a/include/asm-ppc64/io.h b/include/asm-ppc64/io.h --- a/include/asm-ppc64/io.h 2005-02-22 20:30:44 -08:00 +++ b/include/asm-ppc64/io.h 2005-02-22 20:30:44 -08:00 @@ -1,4 +1,4 @@ - #ifndef _PPC64_IO_H +#ifndef _PPC64_IO_H #define _PPC64_IO_H /* diff -Nru a/include/asm-sparc/floppy.h b/include/asm-sparc/floppy.h --- a/include/asm-sparc/floppy.h 2005-02-22 20:30:43 -08:00 +++ b/include/asm-sparc/floppy.h 2005-02-22 20:30:43 -08:00 @@ -312,8 +312,8 @@ } /* The sun4m lets us know if the controller is actually usable. */ - if(sparc_cpu_model == sun4m) { - prom_getproperty(fd_node, "status", state, sizeof(state)); + if(sparc_cpu_model == sun4m && + prom_getproperty(fd_node, "status", state, sizeof(state)) != -1) { if(!strcmp(state, "disabled")) { goto no_sun_fdc; } diff -Nru a/include/asm-sparc/oplib.h b/include/asm-sparc/oplib.h --- a/include/asm-sparc/oplib.h 2005-02-22 20:30:44 -08:00 +++ b/include/asm-sparc/oplib.h 2005-02-22 20:30:44 -08:00 @@ -10,6 +10,7 @@ #include #include +#include /* The master romvec pointer... */ extern struct linux_romvec *romvec; @@ -244,8 +245,8 @@ /* Fetch the requested property using the given buffer. Returns * the number of bytes the prom put into your buffer or -1 on error. */ -extern int prom_getproperty(int thisnode, char *property, - char *prop_buffer, int propbuf_size); +extern int __must_check prom_getproperty(int thisnode, char *property, + char *prop_buffer, int propbuf_size); /* Acquire an integer property. */ extern int prom_getint(int node, char *property); diff -Nru a/include/asm-sparc64/compat.h b/include/asm-sparc64/compat.h --- a/include/asm-sparc64/compat.h 2005-02-22 20:30:44 -08:00 +++ b/include/asm-sparc64/compat.h 2005-02-22 20:30:44 -08:00 @@ -24,6 +24,7 @@ typedef s32 compat_daddr_t; typedef u32 compat_caddr_t; typedef __kernel_fsid_t compat_fsid_t; +typedef s32 compat_key_t; typedef s32 compat_int_t; typedef s32 compat_long_t; @@ -138,5 +139,63 @@ return (void __user *) (usp - len); } + +struct compat_ipc64_perm { + compat_key_t key; + __kernel_uid_t uid; + __kernel_gid_t gid; + __kernel_uid_t cuid; + __kernel_gid_t cgid; + unsigned short __pad1; + compat_mode_t mode; + unsigned short __pad2; + unsigned short seq; + unsigned long __unused1; /* yes they really are 64bit pads */ + unsigned long __unused2; +}; + +struct compat_semid64_ds { + struct compat_ipc64_perm sem_perm; + unsigned int __pad1; + compat_time_t sem_otime; + unsigned int __pad2; + compat_time_t sem_ctime; + u32 sem_nsems; + u32 __unused1; + u32 __unused2; +}; + +struct compat_msqid64_ds { + struct compat_ipc64_perm msg_perm; + unsigned int __pad1; + compat_time_t msg_stime; + unsigned int __pad2; + compat_time_t msg_rtime; + unsigned int __pad3; + compat_time_t msg_ctime; + unsigned int msg_cbytes; + unsigned int msg_qnum; + unsigned int msg_qbytes; + compat_pid_t msg_lspid; + compat_pid_t msg_lrpid; + unsigned int __unused1; + unsigned int __unused2; +}; + +struct compat_shmid64_ds { + struct compat_ipc64_perm shm_perm; + unsigned int __pad1; + compat_time_t shm_atime; + unsigned int __pad2; + compat_time_t shm_dtime; + unsigned int __pad3; + compat_time_t shm_ctime; + compat_size_t shm_segsz; + compat_pid_t shm_cpid; + compat_pid_t shm_lpid; + unsigned int shm_nattch; + unsigned int __unused1; + unsigned int __unused2; +}; #endif /* _ASM_SPARC64_COMPAT_H */ diff -Nru a/include/asm-sparc64/uaccess.h b/include/asm-sparc64/uaccess.h --- a/include/asm-sparc64/uaccess.h 2005-02-22 20:30:44 -08:00 +++ b/include/asm-sparc64/uaccess.h 2005-02-22 20:30:44 -08:00 @@ -49,10 +49,10 @@ __asm__ __volatile__ ("wr %%g0, %0, %%asi" : : "r" ((val).seg)); \ } while(0) -#define __user_ok(addr,size) 1 +#define __user_ok(addr,size) ((void)(addr), (void)(size), 1) #define __kernel_ok (segment_eq(get_fs(), KERNEL_DS)) -#define __access_ok(addr,size) 1 -#define access_ok(type,addr,size) 1 +#define __access_ok(addr,size) ((void)(addr), (void)(size), 1) +#define access_ok(type,addr,size) ((void)(type), (void)(addr), (void)(size), 1) static inline int verify_area(int type, const void __user * addr, unsigned long size) { diff -Nru a/include/asm-x86_64/elf.h b/include/asm-x86_64/elf.h --- a/include/asm-x86_64/elf.h 2005-02-22 20:30:44 -08:00 +++ b/include/asm-x86_64/elf.h 2005-02-22 20:30:44 -08:00 @@ -147,14 +147,7 @@ * An executable for which elf_read_implies_exec() returns TRUE will * have the READ_IMPLIES_EXEC personality flag set automatically. */ -#define elf_read_implies_exec(ex, have_pt_gnu_stack) (!(have_pt_gnu_stack)) - -/* - * An executable for which elf_read_implies_exec() returns TRUE will - * have the READ_IMPLIES_EXEC personality flag set automatically. - */ -#define elf_read_implies_exec_binary(ex, have_pt_gnu_stack) \ - (!(have_pt_gnu_stack)) +#define elf_read_implies_exec(ex, executable_stack) (executable_stack != EXSTACK_DISABLE_X) extern int dump_task_regs (struct task_struct *, elf_gregset_t *); extern int dump_task_fpu (struct task_struct *, elf_fpregset_t *); diff -Nru a/include/linux/compat.h b/include/linux/compat.h --- a/include/linux/compat.h 2005-02-22 20:30:43 -08:00 +++ b/include/linux/compat.h 2005-02-22 20:30:43 -08:00 @@ -18,6 +18,8 @@ #define compat_jiffies_to_clock_t(x) \ (((unsigned long)(x) * COMPAT_USER_HZ) / HZ) +struct rusage; + struct compat_itimerspec { struct compat_timespec it_interval; struct compat_timespec it_value; diff -Nru a/include/linux/fb.h b/include/linux/fb.h --- a/include/linux/fb.h 2005-02-22 20:30:43 -08:00 +++ b/include/linux/fb.h 2005-02-22 20:30:43 -08:00 @@ -862,7 +862,6 @@ /* drivers/video/modedb.c */ #define VESA_MODEDB_SIZE 34 -extern const struct fb_videomode vesa_modes[]; extern void fb_var_to_videomode(struct fb_videomode *mode, struct fb_var_screeninfo *var); extern void fb_videomode_to_var(struct fb_var_screeninfo *var, @@ -906,6 +905,8 @@ u32 vmode; u32 flag; }; + +extern const struct fb_videomode vesa_modes[]; struct fb_modelist { struct list_head list; diff -Nru a/include/linux/fs.h b/include/linux/fs.h --- a/include/linux/fs.h 2005-02-22 20:30:43 -08:00 +++ b/include/linux/fs.h 2005-02-22 20:30:43 -08:00 @@ -7,25 +7,8 @@ */ #include -#include #include -#include -#include -#include #include -#include -#include -#include -#include -#include - -struct iovec; -struct nameidata; -struct pipe_inode_info; -struct poll_table_struct; -struct kstatfs; -struct vm_area_struct; -struct vfsmount; /* * It's silly to have NR_OPEN bigger than NR_FILE, but you can change @@ -216,13 +199,31 @@ #ifdef __KERNEL__ +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include #include + +#include #include #include + +struct iovec; +struct nameidata; +struct pipe_inode_info; +struct poll_table_struct; +struct kstatfs; +struct vm_area_struct; +struct vfsmount; /* Used to be a macro which just called the function, now just a function */ extern void update_atime (struct inode *); diff -Nru a/include/linux/socket.h b/include/linux/socket.h --- a/include/linux/socket.h 2005-02-22 20:30:44 -08:00 +++ b/include/linux/socket.h 2005-02-22 20:30:44 -08:00 @@ -120,7 +120,7 @@ * Now it always returns valid, not truncated ancillary object * HEADER. But caller still MUST check, that cmsg->cmsg_len is * inside range, given by msg->msg_controllen before using - * ansillary object DATA. --ANK (980731) + * ancillary object DATA. --ANK (980731) */ __KINLINE struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size, diff -Nru a/include/linux/sysctl.h b/include/linux/sysctl.h --- a/include/linux/sysctl.h 2005-02-22 20:30:43 -08:00 +++ b/include/linux/sysctl.h 2005-02-22 20:30:43 -08:00 @@ -344,6 +344,7 @@ NET_TCP_DEFAULT_WIN_SCALE=105, NET_TCP_MODERATE_RCVBUF=106, NET_TCP_TSO_WIN_DIVISOR=107, + NET_TCP_BIC_BETA=108, }; enum { diff -Nru a/include/linux/tcp.h b/include/linux/tcp.h --- a/include/linux/tcp.h 2005-02-22 20:30:43 -08:00 +++ b/include/linux/tcp.h 2005-02-22 20:30:43 -08:00 @@ -210,6 +210,27 @@ TCP_BIC, }; +struct tcp_options_received { +/* PAWS/RTTM data */ + long ts_recent_stamp;/* Time we stored ts_recent (for aging) */ + __u32 ts_recent; /* Time stamp to echo next */ + __u32 rcv_tsval; /* Time stamp value */ + __u32 rcv_tsecr; /* Time stamp echo reply */ + char saw_tstamp; /* Saw TIMESTAMP on last packet */ + char tstamp_ok; /* TIMESTAMP seen on SYN packet */ + char sack_ok; /* SACK seen on SYN packet */ + char wscale_ok; /* Wscale seen on SYN packet */ + __u8 snd_wscale; /* Window scaling received from sender */ + __u8 rcv_wscale; /* Window scaling to send to receiver */ +/* SACKs data */ + __u8 dsack; /* D-SACK is scheduled */ + __u8 eff_sacks; /* Size of SACK array to send with next packet */ + __u8 num_sacks; /* Number of SACK blocks */ + __u8 __pad; + __u16 user_mss; /* mss requested by user in ioctl */ + __u16 mss_clamp; /* Maximal mss, negotiated at connection setup */ +}; + struct tcp_sock { /* inet_sock has to be the first member of tcp_sock */ struct inet_sock inet; @@ -262,22 +283,19 @@ __u32 pmtu_cookie; /* Last pmtu seen by socket */ __u32 mss_cache; /* Cached effective mss, not including SACKS */ __u16 mss_cache_std; /* Like mss_cache, but without TSO */ - __u16 mss_clamp; /* Maximal mss, negotiated at connection setup */ __u16 ext_header_len; /* Network protocol overhead (IP/IPv6 options) */ __u16 ext2_header_len;/* Options depending on route */ __u8 ca_state; /* State of fast-retransmit machine */ __u8 retransmits; /* Number of unrecovered RTO timeouts. */ + __u32 frto_highmark; /* snd_nxt when RTO occurred */ __u8 reordering; /* Packet reordering metric. */ __u8 frto_counter; /* Number of new acks after RTO */ - __u32 frto_highmark; /* snd_nxt when RTO occurred */ __u8 adv_cong; /* Using Vegas, Westwood, or BIC */ __u8 defer_accept; /* User waits for some data after accept() */ - /* one byte hole, try to pack */ /* RTT measurement */ - __u8 backoff; /* backoff */ __u32 srtt; /* smoothed round trip time << 3 */ __u32 mdev; /* medium deviation */ __u32 mdev_max; /* maximal mdev for the last rtt period */ @@ -288,7 +306,15 @@ __u32 packets_out; /* Packets which are "in flight" */ __u32 left_out; /* Packets which leaved network */ __u32 retrans_out; /* Retransmitted packets out */ + __u8 backoff; /* backoff */ +/* + * Options received (usually on last packet, some only on SYN packets). + */ + __u8 nonagle; /* Disable Nagle algorithm? */ + __u8 keepalive_probes; /* num of allowed keep alive probes */ + __u8 probes_out; /* unanswered 0 window probes */ + struct tcp_options_received rx_opt; /* * Slow start and congestion control (see also Nagle, and Karn & Partridge) @@ -314,40 +340,19 @@ __u32 write_seq; /* Tail(+1) of data held in tcp send buffer */ __u32 pushed_seq; /* Last pushed seq, required to talk to windows */ __u32 copied_seq; /* Head of yet unread data */ -/* - * Options received (usually on last packet, some only on SYN packets). - */ - char tstamp_ok, /* TIMESTAMP seen on SYN packet */ - wscale_ok, /* Wscale seen on SYN packet */ - sack_ok; /* SACK seen on SYN packet */ - char saw_tstamp; /* Saw TIMESTAMP on last packet */ - __u8 snd_wscale; /* Window scaling received from sender */ - __u8 rcv_wscale; /* Window scaling to send to receiver */ - __u8 nonagle; /* Disable Nagle algorithm? */ - __u8 keepalive_probes; /* num of allowed keep alive probes */ - -/* PAWS/RTTM data */ - __u32 rcv_tsval; /* Time stamp value */ - __u32 rcv_tsecr; /* Time stamp echo reply */ - __u32 ts_recent; /* Time stamp to echo next */ - long ts_recent_stamp;/* Time we stored ts_recent (for aging) */ /* SACKs data */ - __u16 user_mss; /* mss requested by user in ioctl */ - __u8 dsack; /* D-SACK is scheduled */ - __u8 eff_sacks; /* Size of SACK array to send with next packet */ struct tcp_sack_block duplicate_sack[1]; /* D-SACK block */ struct tcp_sack_block selective_acks[4]; /* The SACKS themselves*/ __u32 window_clamp; /* Maximal window to advertise */ __u32 rcv_ssthresh; /* Current window clamp */ - __u8 probes_out; /* unanswered 0 window probes */ - __u8 num_sacks; /* Number of SACK blocks */ __u16 advmss; /* Advertised MSS */ __u8 syn_retries; /* num of allowed syn retries */ __u8 ecn_flags; /* ECN status bits. */ __u16 prior_ssthresh; /* ssthresh saved at recovery start */ + __u16 __pad1; __u32 lost_out; /* Lost packets */ __u32 sacked_out; /* SACK'd packets */ __u32 fackets_out; /* FACK'd packets */ diff -Nru a/include/net/dst.h b/include/net/dst.h --- a/include/net/dst.h 2005-02-22 20:30:44 -08:00 +++ b/include/net/dst.h 2005-02-22 20:30:44 -08:00 @@ -89,7 +89,8 @@ int (*gc)(void); struct dst_entry * (*check)(struct dst_entry *, __u32 cookie); void (*destroy)(struct dst_entry *); - void (*ifdown)(struct dst_entry *, int how); + void (*ifdown)(struct dst_entry *, + struct net_device *dev, int how); struct dst_entry * (*negative_advice)(struct dst_entry *); void (*link_failure)(struct sk_buff *); void (*update_pmtu)(struct dst_entry *dst, u32 mtu); diff -Nru a/include/net/tcp.h b/include/net/tcp.h --- a/include/net/tcp.h 2005-02-22 20:30:43 -08:00 +++ b/include/net/tcp.h 2005-02-22 20:30:43 -08:00 @@ -505,9 +505,8 @@ # define TCP_TW_RECYCLE_TICK (12+2-TCP_TW_RECYCLE_SLOTS_LOG) #endif -#define BICTCP_1_OVER_BETA 8 /* - * Fast recovery - * multiplicative decrease factor +#define BICTCP_BETA_SCALE 1024 /* Scale factor beta calculation + * max_cwnd = snd_cwnd * beta */ #define BICTCP_MAX_INCREMENT 32 /* * Limit on the amount of @@ -606,6 +605,7 @@ extern int sysctl_tcp_bic; extern int sysctl_tcp_bic_fast_convergence; extern int sysctl_tcp_bic_low_window; +extern int sysctl_tcp_bic_beta; extern int sysctl_tcp_moderate_rcvbuf; extern int sysctl_tcp_tso_win_divisor; @@ -832,9 +832,9 @@ memset(&tp->ack, 0, sizeof(tp->ack)); } -static inline void tcp_clear_options(struct tcp_sock *tp) +static inline void tcp_clear_options(struct tcp_options_received *rx_opt) { - tp->tstamp_ok = tp->sack_ok = tp->wscale_ok = tp->snd_wscale = 0; + rx_opt->tstamp_ok = rx_opt->sack_ok = rx_opt->wscale_ok = rx_opt->snd_wscale = 0; } enum tcp_tw_status @@ -883,7 +883,7 @@ extern int tcp_listen_start(struct sock *sk); extern void tcp_parse_options(struct sk_buff *skb, - struct tcp_sock *tp, + struct tcp_options_received *opt_rx, int estab); /* @@ -1071,7 +1071,7 @@ static __inline__ void tcp_fast_path_on(struct tcp_sock *tp) { - __tcp_fast_path_on(tp, tp->snd_wnd>>tp->snd_wscale); + __tcp_fast_path_on(tp, tp->snd_wnd >> tp->rx_opt.snd_wscale); } static inline void tcp_fast_path_check(struct sock *sk, struct tcp_sock *tp) @@ -1244,15 +1244,16 @@ if (tcp_is_bic(tp)) { if (sysctl_tcp_bic_fast_convergence && tp->snd_cwnd < tp->bictcp.last_max_cwnd) - tp->bictcp.last_max_cwnd - = (tp->snd_cwnd * (2*BICTCP_1_OVER_BETA-1)) - / (BICTCP_1_OVER_BETA/2); + tp->bictcp.last_max_cwnd = (tp->snd_cwnd * + (BICTCP_BETA_SCALE + + sysctl_tcp_bic_beta)) + / (2 * BICTCP_BETA_SCALE); else tp->bictcp.last_max_cwnd = tp->snd_cwnd; if (tp->snd_cwnd > sysctl_tcp_bic_low_window) - return max(tp->snd_cwnd - (tp->snd_cwnd/BICTCP_1_OVER_BETA), - 2U); + return max((tp->snd_cwnd * sysctl_tcp_bic_beta) + / BICTCP_BETA_SCALE, 2U); } return max(tp->snd_cwnd >> 1U, 2U); @@ -1322,7 +1323,7 @@ static inline void tcp_sync_left_out(struct tcp_sock *tp) { - if (tp->sack_ok && + if (tp->rx_opt.sack_ok && (tp->sacked_out >= tp->packets_out - tp->lost_out)) tp->sacked_out = tp->packets_out - tp->lost_out; tp->left_out = tp->sacked_out + tp->lost_out; @@ -1648,39 +1649,39 @@ tcp_destroy_sock(sk); } -static __inline__ void tcp_sack_reset(struct tcp_sock *tp) +static __inline__ void tcp_sack_reset(struct tcp_options_received *rx_opt) { - tp->dsack = 0; - tp->eff_sacks = 0; - tp->num_sacks = 0; + rx_opt->dsack = 0; + rx_opt->eff_sacks = 0; + rx_opt->num_sacks = 0; } static __inline__ void tcp_build_and_update_options(__u32 *ptr, struct tcp_sock *tp, __u32 tstamp) { - if (tp->tstamp_ok) { + if (tp->rx_opt.tstamp_ok) { *ptr++ = __constant_htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) | (TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP); *ptr++ = htonl(tstamp); - *ptr++ = htonl(tp->ts_recent); + *ptr++ = htonl(tp->rx_opt.ts_recent); } - if (tp->eff_sacks) { - struct tcp_sack_block *sp = tp->dsack ? tp->duplicate_sack : tp->selective_acks; + if (tp->rx_opt.eff_sacks) { + struct tcp_sack_block *sp = tp->rx_opt.dsack ? tp->duplicate_sack : tp->selective_acks; int this_sack; *ptr++ = __constant_htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) | (TCPOPT_SACK << 8) | (TCPOLEN_SACK_BASE + - (tp->eff_sacks * TCPOLEN_SACK_PERBLOCK))); - for(this_sack = 0; this_sack < tp->eff_sacks; this_sack++) { + (tp->rx_opt.eff_sacks * TCPOLEN_SACK_PERBLOCK))); + for(this_sack = 0; this_sack < tp->rx_opt.eff_sacks; this_sack++) { *ptr++ = htonl(sp[this_sack].start_seq); *ptr++ = htonl(sp[this_sack].end_seq); } - if (tp->dsack) { - tp->dsack = 0; - tp->eff_sacks--; + if (tp->rx_opt.dsack) { + tp->rx_opt.dsack = 0; + tp->rx_opt.eff_sacks--; } } } @@ -1826,17 +1827,17 @@ } static __inline__ void tcp_openreq_init(struct open_request *req, - struct tcp_sock *tp, + struct tcp_options_received *rx_opt, struct sk_buff *skb) { req->rcv_wnd = 0; /* So that tcp_send_synack() knows! */ req->rcv_isn = TCP_SKB_CB(skb)->seq; - req->mss = tp->mss_clamp; - req->ts_recent = tp->saw_tstamp ? tp->rcv_tsval : 0; - req->tstamp_ok = tp->tstamp_ok; - req->sack_ok = tp->sack_ok; - req->snd_wscale = tp->snd_wscale; - req->wscale_ok = tp->wscale_ok; + req->mss = rx_opt->mss_clamp; + req->ts_recent = rx_opt->saw_tstamp ? rx_opt->rcv_tsval : 0; + req->tstamp_ok = rx_opt->tstamp_ok; + req->sack_ok = rx_opt->sack_ok; + req->snd_wscale = rx_opt->snd_wscale; + req->wscale_ok = rx_opt->wscale_ok; req->acked = 0; req->ecn_ok = 0; req->rmt_port = skb->h.th->source; @@ -1885,11 +1886,11 @@ return fin_timeout; } -static inline int tcp_paws_check(const struct tcp_sock *tp, int rst) +static inline int tcp_paws_check(const struct tcp_options_received *rx_opt, int rst) { - if ((s32)(tp->rcv_tsval - tp->ts_recent) >= 0) + if ((s32)(rx_opt->rcv_tsval - rx_opt->ts_recent) >= 0) return 0; - if (xtime.tv_sec >= tp->ts_recent_stamp + TCP_PAWS_24DAYS) + if (xtime.tv_sec >= rx_opt->ts_recent_stamp + TCP_PAWS_24DAYS) return 0; /* RST segments are not recommended to carry timestamp, @@ -1904,7 +1905,7 @@ However, we can relax time bounds for RST segments to MSL. */ - if (rst && xtime.tv_sec >= tp->ts_recent_stamp + TCP_PAWS_MSL) + if (rst && xtime.tv_sec >= rx_opt->ts_recent_stamp + TCP_PAWS_MSL) return 0; return 1; } diff -Nru a/kernel/workqueue.c b/kernel/workqueue.c --- a/kernel/workqueue.c 2005-02-22 20:30:44 -08:00 +++ b/kernel/workqueue.c 2005-02-22 20:30:44 -08:00 @@ -485,8 +485,10 @@ case CPU_ONLINE: /* Kick off worker threads. */ - list_for_each_entry(wq, &workqueues, list) + list_for_each_entry(wq, &workqueues, list) { + kthread_bind(wq->cpu_wq[hotcpu].thread, hotcpu); wake_up_process(wq->cpu_wq[hotcpu].thread); + } break; case CPU_UP_CANCELED: diff -Nru a/mm/filemap.c b/mm/filemap.c --- a/mm/filemap.c 2005-02-22 20:30:44 -08:00 +++ b/mm/filemap.c 2005-02-22 20:30:44 -08:00 @@ -2078,6 +2078,8 @@ count = ocount; pos = *ppos; + vfs_check_frozen(inode->i_sb, SB_FREEZE_WRITE); + /* We can write back this queue in page reclaim */ current->backing_dev_info = mapping->backing_dev_info; written = 0; diff -Nru a/mm/memory.c b/mm/memory.c --- a/mm/memory.c 2005-02-22 20:30:43 -08:00 +++ b/mm/memory.c 2005-02-22 20:30:43 -08:00 @@ -98,7 +98,8 @@ pmd_clear(pmd); return; } - if (!(start & ~PMD_MASK) && !(end & ~PMD_MASK)) { + if (!((start | end) & ~PMD_MASK)) { + /* Only clear full, aligned ranges */ page = pmd_page(*pmd); pmd_clear(pmd); dec_page_state(nr_page_table_pages); @@ -131,7 +132,8 @@ addr = next; } while (addr && (addr < end)); - if (!(start & ~PUD_MASK) && !(end & ~PUD_MASK)) { + if (!((start | end) & ~PUD_MASK)) { + /* Only clear full, aligned ranges */ pud_clear(pud); pmd_free_tlb(tlb, __pmd); } @@ -162,7 +164,8 @@ addr = next; } while (addr && (addr < end)); - if (!(start & ~PGDIR_MASK) && !(end & ~PGDIR_MASK)) { + if (!((start | end) & ~PGDIR_MASK)) { + /* Only clear full, aligned ranges */ pgd_clear(pgd); pud_free_tlb(tlb, __pud); } @@ -358,7 +361,7 @@ for (; addr < end; addr = next, src_pmd++, dst_pmd++) { next = (addr + PMD_SIZE) & PMD_MASK; - if (next > end) + if (next > end || next <= addr) next = end; if (pmd_none(*src_pmd)) continue; @@ -390,7 +393,7 @@ for (; addr < end; addr = next, src_pud++, dst_pud++) { next = (addr + PUD_SIZE) & PUD_MASK; - if (next > end) + if (next > end || next <= addr) next = end; if (pud_none(*src_pud)) continue; @@ -1041,7 +1044,8 @@ error = -ENOMEM; if (!pmd) break; - error = zeromap_pmd_range(mm, pmd, address, end - address, prot); + error = zeromap_pmd_range(mm, pmd, base + address, + end - address, prot); if (error) break; address = (address + PUD_SIZE) & PUD_MASK; diff -Nru a/net/core/dst.c b/net/core/dst.c --- a/net/core/dst.c 2005-02-22 20:30:44 -08:00 +++ b/net/core/dst.c 2005-02-22 20:30:44 -08:00 @@ -220,31 +220,28 @@ * * Commented and originally written by Alexey. */ -static void dst_ifdown(struct dst_entry *dst, int unregister) +static inline void dst_ifdown(struct dst_entry *dst, struct net_device *dev, + int unregister) { - struct net_device *dev = dst->dev; + if (dst->ops->ifdown) + dst->ops->ifdown(dst, dev, unregister); + + if (dev != dst->dev) + return; if (!unregister) { dst->input = dst_discard_in; dst->output = dst_discard_out; - } - - do { - if (unregister) { - dst->dev = &loopback_dev; - dev_hold(&loopback_dev); + } else { + dst->dev = &loopback_dev; + dev_hold(&loopback_dev); + dev_put(dev); + if (dst->neighbour && dst->neighbour->dev == dev) { + dst->neighbour->dev = &loopback_dev; dev_put(dev); - if (dst->neighbour && dst->neighbour->dev == dev) { - dst->neighbour->dev = &loopback_dev; - dev_put(dev); - dev_hold(&loopback_dev); - } + dev_hold(&loopback_dev); } - - if (dst->ops->ifdown) - dst->ops->ifdown(dst, unregister); - } while ((dst = dst->child) && dst->flags & DST_NOHASH && - dst->dev == dev); + } } static int dst_dev_event(struct notifier_block *this, unsigned long event, void *ptr) @@ -257,8 +254,7 @@ case NETDEV_DOWN: spin_lock_bh(&dst_lock); for (dst = dst_garbage_list; dst; dst = dst->next) { - if (dst->dev == dev) - dst_ifdown(dst, event != NETDEV_DOWN); + dst_ifdown(dst, dev, event != NETDEV_DOWN); } spin_unlock_bh(&dst_lock); break; diff -Nru a/net/core/pktgen.c b/net/core/pktgen.c --- a/net/core/pktgen.c 2005-02-22 20:30:44 -08:00 +++ b/net/core/pktgen.c 2005-02-22 20:30:44 -08:00 @@ -148,7 +148,7 @@ #include -#define VERSION "pktgen v2.54: Packet Generator for packet performance testing.\n" +#define VERSION "pktgen v2.56: Packet Generator for packet performance testing.\n" /* #define PG_DEBUG(a) a */ #define PG_DEBUG(a) @@ -167,9 +167,6 @@ #define F_TXSIZE_RND (1<<6) /* Transmit size is random */ #define F_IPV6 (1<<7) /* Interface in IPV6 Mode */ -#define L_PUSH(t, i) {i->next = t; t=i;} -#define L_POP(t, i) {i=t; if(i) t = i->next;} - /* Thread control flag bits */ #define T_TERMINATE (1<<0) #define T_STOP (1<<1) /* Stop run */ @@ -1366,19 +1363,15 @@ p += sprintf(p, "Running: "); if_lock(t); - pkt_dev = t->if_list; - while (pkt_dev && pkt_dev->running) { - p += sprintf(p, "%s ", pkt_dev->ifname); - pkt_dev = pkt_dev->next; - } + for(pkt_dev = t->if_list;pkt_dev; pkt_dev = pkt_dev->next) + if(pkt_dev->running) + p += sprintf(p, "%s ", pkt_dev->ifname); + p += sprintf(p, "\nStopped: "); - pkt_dev = t->if_list; - while (pkt_dev && !pkt_dev->running) { - p += sprintf(p, "%s ", pkt_dev->ifname); - pkt_dev = pkt_dev->next; - } - + for(pkt_dev = t->if_list;pkt_dev; pkt_dev = pkt_dev->next) + if(!pkt_dev->running) + p += sprintf(p, "%s ", pkt_dev->ifname); if (t->result[0]) p += sprintf(p, "\nResult: %s\n", t->result); @@ -2393,7 +2386,7 @@ thread_unlock(); } -static int running(struct pktgen_thread *t ) +static int thread_is_running(struct pktgen_thread *t ) { struct pktgen_dev *next; int res = 0; @@ -2415,7 +2408,7 @@ if_lock(t); - while(running(t)) { + while(thread_is_running(t)) { if_unlock(t); interruptible_sleep_on_timeout(&queue, HZ/10); @@ -2520,13 +2513,15 @@ return -EINVAL; } - if (pkt_dev->skb) - kfree_skb(pkt_dev->skb); - pkt_dev->stopped_at = getCurUs(); pkt_dev->running = 0; show_results(pkt_dev, skb_shinfo(pkt_dev->skb)->nr_frags); + + if (pkt_dev->skb) + kfree_skb(pkt_dev->skb); + + pkt_dev->skb = NULL; return 0; } @@ -2860,10 +2855,10 @@ for(pkt_dev=t->if_list; pkt_dev; pkt_dev = pkt_dev->next ) { if (strcmp(pkt_dev->ifname, ifname) == 0) { - goto out; + break; } } - out: + if_unlock(t); PG_DEBUG(printk("pktgen: find_dev(%s) returning %p\n", ifname,pkt_dev)); return pkt_dev; @@ -2884,8 +2879,7 @@ rv = -EBUSY; goto out; } - - L_PUSH(t->if_list, pkt_dev); + pkt_dev->next =t->if_list; t->if_list=pkt_dev; pkt_dev->pg_thread = t; pkt_dev->running = 0; diff -Nru a/net/ipv4/route.c b/net/ipv4/route.c --- a/net/ipv4/route.c 2005-02-22 20:30:44 -08:00 +++ b/net/ipv4/route.c 2005-02-22 20:30:44 -08:00 @@ -138,7 +138,8 @@ static struct dst_entry *ipv4_dst_check(struct dst_entry *dst, u32 cookie); static void ipv4_dst_destroy(struct dst_entry *dst); -static void ipv4_dst_ifdown(struct dst_entry *dst, int how); +static void ipv4_dst_ifdown(struct dst_entry *dst, + struct net_device *dev, int how); static struct dst_entry *ipv4_negative_advice(struct dst_entry *dst); static void ipv4_link_failure(struct sk_buff *skb); static void ip_rt_update_pmtu(struct dst_entry *dst, u32 mtu); @@ -1342,11 +1343,12 @@ } } -static void ipv4_dst_ifdown(struct dst_entry *dst, int how) +static void ipv4_dst_ifdown(struct dst_entry *dst, struct net_device *dev, + int how) { struct rtable *rt = (struct rtable *) dst; struct in_device *idev = rt->idev; - if (idev && idev->dev != &loopback_dev) { + if (dev != &loopback_dev && idev && idev->dev == dev) { struct in_device *loopback_idev = in_dev_get(&loopback_dev); if (loopback_idev) { rt->idev = loopback_idev; diff -Nru a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c --- a/net/ipv4/sysctl_net_ipv4.c 2005-02-22 20:30:44 -08:00 +++ b/net/ipv4/sysctl_net_ipv4.c 2005-02-22 20:30:44 -08:00 @@ -682,6 +682,14 @@ .mode = 0644, .proc_handler = &proc_dointvec, }, + { + .ctl_name = NET_TCP_BIC_BETA, + .procname = "tcp_bic_beta", + .data = &sysctl_tcp_bic_beta, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, { .ctl_name = 0 } }; diff -Nru a/net/ipv4/tcp.c b/net/ipv4/tcp.c --- a/net/ipv4/tcp.c 2005-02-22 20:30:43 -08:00 +++ b/net/ipv4/tcp.c 2005-02-22 20:30:43 -08:00 @@ -1829,8 +1829,8 @@ tcp_clear_retrans(tp); tcp_delack_init(tp); sk->sk_send_head = NULL; - tp->saw_tstamp = 0; - tcp_sack_reset(tp); + tp->rx_opt.saw_tstamp = 0; + tcp_sack_reset(&tp->rx_opt); __sk_dst_reset(sk); BUG_TRAP(!inet->num || tp->bind_hash); @@ -1969,7 +1969,7 @@ err = -EINVAL; break; } - tp->user_mss = val; + tp->rx_opt.user_mss = val; break; case TCP_NODELAY: @@ -2119,14 +2119,14 @@ info->tcpi_probes = tp->probes_out; info->tcpi_backoff = tp->backoff; - if (tp->tstamp_ok) + if (tp->rx_opt.tstamp_ok) info->tcpi_options |= TCPI_OPT_TIMESTAMPS; - if (tp->sack_ok) + if (tp->rx_opt.sack_ok) info->tcpi_options |= TCPI_OPT_SACK; - if (tp->wscale_ok) { + if (tp->rx_opt.wscale_ok) { info->tcpi_options |= TCPI_OPT_WSCALE; - info->tcpi_snd_wscale = tp->snd_wscale; - info->tcpi_rcv_wscale = tp->rcv_wscale; + info->tcpi_snd_wscale = tp->rx_opt.snd_wscale; + info->tcpi_rcv_wscale = tp->rx_opt.rcv_wscale; } if (tp->ecn_flags&TCP_ECN_OK) @@ -2186,7 +2186,7 @@ case TCP_MAXSEG: val = tp->mss_cache_std; if (!val && ((1 << sk->sk_state) & (TCPF_CLOSE | TCPF_LISTEN))) - val = tp->user_mss; + val = tp->rx_opt.user_mss; break; case TCP_NODELAY: val = !!(tp->nonagle&TCP_NAGLE_OFF); diff -Nru a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c --- a/net/ipv4/tcp_input.c 2005-02-22 20:30:44 -08:00 +++ b/net/ipv4/tcp_input.c 2005-02-22 20:30:44 -08:00 @@ -102,6 +102,7 @@ int sysctl_tcp_bic = 1; int sysctl_tcp_bic_fast_convergence = 1; int sysctl_tcp_bic_low_window = 14; +int sysctl_tcp_bic_beta = 819; /* = 819/1024 (BICTCP_BETA_SCALE) */ #define FLAG_DATA 0x01 /* Incoming frame contained data. */ #define FLAG_WIN_UPDATE 0x02 /* Incoming ACK was a window update. */ @@ -118,9 +119,9 @@ #define FLAG_CA_ALERT (FLAG_DATA_SACKED|FLAG_ECE) #define FLAG_FORWARD_PROGRESS (FLAG_ACKED|FLAG_DATA_SACKED) -#define IsReno(tp) ((tp)->sack_ok == 0) -#define IsFack(tp) ((tp)->sack_ok & 2) -#define IsDSack(tp) ((tp)->sack_ok & 4) +#define IsReno(tp) ((tp)->rx_opt.sack_ok == 0) +#define IsFack(tp) ((tp)->rx_opt.sack_ok & 2) +#define IsDSack(tp) ((tp)->rx_opt.sack_ok & 4) #define TCP_REMNANT (TCP_FLAG_FIN|TCP_FLAG_URG|TCP_FLAG_SYN|TCP_FLAG_PSH) @@ -204,7 +205,7 @@ static void tcp_fixup_sndbuf(struct sock *sk) { - int sndmem = tcp_sk(sk)->mss_clamp + MAX_TCP_HEADER + 16 + + int sndmem = tcp_sk(sk)->rx_opt.mss_clamp + MAX_TCP_HEADER + 16 + sizeof(struct sk_buff); if (sk->sk_sndbuf < 3 * sndmem) @@ -439,10 +440,10 @@ static inline void tcp_rcv_rtt_measure_ts(struct tcp_sock *tp, struct sk_buff *skb) { - if (tp->rcv_tsecr && + if (tp->rx_opt.rcv_tsecr && (TCP_SKB_CB(skb)->end_seq - TCP_SKB_CB(skb)->seq >= tp->ack.rcv_mss)) - tcp_rcv_rtt_update(tp, tcp_time_stamp - tp->rcv_tsecr, 0); + tcp_rcv_rtt_update(tp, tcp_time_stamp - tp->rx_opt.rcv_tsecr, 0); } /* @@ -832,7 +833,7 @@ } if (dst_metric(dst, RTAX_REORDERING) && tp->reordering != dst_metric(dst, RTAX_REORDERING)) { - tp->sack_ok &= ~2; + tp->rx_opt.sack_ok &= ~2; tp->reordering = dst_metric(dst, RTAX_REORDERING); } @@ -866,7 +867,7 @@ } tcp_set_rto(tp); tcp_bound_rto(tp); - if (tp->rto < TCP_TIMEOUT_INIT && !tp->saw_tstamp) + if (tp->rto < TCP_TIMEOUT_INIT && !tp->rx_opt.saw_tstamp) goto reset; tp->snd_cwnd = tcp_init_cwnd(tp, dst); tp->snd_cwnd_stamp = tcp_time_stamp; @@ -877,7 +878,7 @@ * supported, TCP will fail to recalculate correct * rtt, if initial rto is too small. FORGET ALL AND RESET! */ - if (!tp->saw_tstamp && tp->srtt) { + if (!tp->rx_opt.saw_tstamp && tp->srtt) { tp->srtt = 0; tp->mdev = tp->mdev_max = tp->rttvar = TCP_TIMEOUT_INIT; tp->rto = TCP_TIMEOUT_INIT; @@ -900,14 +901,14 @@ NET_INC_STATS_BH(LINUX_MIB_TCPSACKREORDER); #if FASTRETRANS_DEBUG > 1 printk(KERN_DEBUG "Disorder%d %d %u f%u s%u rr%d\n", - tp->sack_ok, tp->ca_state, + tp->rx_opt.sack_ok, tp->ca_state, tp->reordering, tp->fackets_out, tp->sacked_out, tp->undo_marker ? tp->undo_retrans : 0); #endif /* Disable FACK yet. */ - tp->sack_ok &= ~2; + tp->rx_opt.sack_ok &= ~2; } } @@ -997,13 +998,13 @@ if (before(start_seq, ack)) { dup_sack = 1; - tp->sack_ok |= 4; + tp->rx_opt.sack_ok |= 4; NET_INC_STATS_BH(LINUX_MIB_TCPDSACKRECV); } else if (num_sacks > 1 && !after(end_seq, ntohl(sp[1].end_seq)) && !before(start_seq, ntohl(sp[1].start_seq))) { dup_sack = 1; - tp->sack_ok |= 4; + tp->rx_opt.sack_ok |= 4; NET_INC_STATS_BH(LINUX_MIB_TCPDSACKOFORECV); } @@ -1628,8 +1629,8 @@ static inline int tcp_packet_delayed(struct tcp_sock *tp) { return !tp->retrans_stamp || - (tp->saw_tstamp && tp->rcv_tsecr && - (__s32)(tp->rcv_tsecr - tp->retrans_stamp) < 0); + (tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr && + (__s32)(tp->rx_opt.rcv_tsecr - tp->retrans_stamp) < 0); } /* Undo procedures. */ @@ -1977,7 +1978,7 @@ * answer arrives rto becomes 120 seconds! If at least one of segments * in window is lost... Voila. --ANK (010210) */ - seq_rtt = tcp_time_stamp - tp->rcv_tsecr; + seq_rtt = tcp_time_stamp - tp->rx_opt.rcv_tsecr; tcp_rtt_estimator(tp, seq_rtt); tcp_set_rto(tp); tp->backoff = 0; @@ -2008,7 +2009,7 @@ int flag, s32 seq_rtt) { /* Note that peer MAY send zero echo. In this case it is ignored. (rfc1323) */ - if (tp->saw_tstamp && tp->rcv_tsecr) + if (tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr) tcp_ack_saw_tstamp(tp, flag); else if (seq_rtt >= 0) tcp_ack_no_tstamp(tp, seq_rtt, flag); @@ -2482,7 +2483,7 @@ BUG_TRAP((int)tp->sacked_out >= 0); BUG_TRAP((int)tp->lost_out >= 0); BUG_TRAP((int)tp->retrans_out >= 0); - if (!tp->packets_out && tp->sack_ok) { + if (!tp->packets_out && tp->rx_opt.sack_ok) { if (tp->lost_out) { printk(KERN_DEBUG "Leak l=%u %d\n", tp->lost_out, tp->ca_state); @@ -2558,7 +2559,7 @@ u32 nwin = ntohs(skb->h.th->window); if (likely(!skb->h.th->syn)) - nwin <<= tp->snd_wscale; + nwin <<= tp->rx_opt.snd_wscale; if (tcp_may_update_window(tp, ack, ack_seq, nwin)) { flag |= FLAG_WIN_UPDATE; @@ -2978,14 +2979,14 @@ * But, this can also be called on packets in the established flow when * the fast version below fails. */ -void tcp_parse_options(struct sk_buff *skb, struct tcp_sock *tp, int estab) +void tcp_parse_options(struct sk_buff *skb, struct tcp_options_received *opt_rx, int estab) { unsigned char *ptr; struct tcphdr *th = skb->h.th; int length=(th->doff*4)-sizeof(struct tcphdr); ptr = (unsigned char *)(th + 1); - tp->saw_tstamp = 0; + opt_rx->saw_tstamp = 0; while(length>0) { int opcode=*ptr++; @@ -3008,41 +3009,41 @@ if(opsize==TCPOLEN_MSS && th->syn && !estab) { u16 in_mss = ntohs(*(__u16 *)ptr); if (in_mss) { - if (tp->user_mss && tp->user_mss < in_mss) - in_mss = tp->user_mss; - tp->mss_clamp = in_mss; + if (opt_rx->user_mss && opt_rx->user_mss < in_mss) + in_mss = opt_rx->user_mss; + opt_rx->mss_clamp = in_mss; } } break; case TCPOPT_WINDOW: if(opsize==TCPOLEN_WINDOW && th->syn && !estab) if (sysctl_tcp_window_scaling) { - tp->wscale_ok = 1; - tp->snd_wscale = *(__u8 *)ptr; - if(tp->snd_wscale > 14) { + opt_rx->wscale_ok = 1; + opt_rx->snd_wscale = *(__u8 *)ptr; + if(opt_rx->snd_wscale > 14) { if(net_ratelimit()) printk(KERN_INFO "tcp_parse_options: Illegal window " "scaling value %d >14 received.\n", - tp->snd_wscale); - tp->snd_wscale = 14; + opt_rx->snd_wscale); + opt_rx->snd_wscale = 14; } } break; case TCPOPT_TIMESTAMP: if(opsize==TCPOLEN_TIMESTAMP) { - if ((estab && tp->tstamp_ok) || + if ((estab && opt_rx->tstamp_ok) || (!estab && sysctl_tcp_timestamps)) { - tp->saw_tstamp = 1; - tp->rcv_tsval = ntohl(*(__u32 *)ptr); - tp->rcv_tsecr = ntohl(*(__u32 *)(ptr+4)); + opt_rx->saw_tstamp = 1; + opt_rx->rcv_tsval = ntohl(*(__u32 *)ptr); + opt_rx->rcv_tsecr = ntohl(*(__u32 *)(ptr+4)); } } break; case TCPOPT_SACK_PERM: if(opsize==TCPOLEN_SACK_PERM && th->syn && !estab) { if (sysctl_tcp_sack) { - tp->sack_ok = 1; - tcp_sack_reset(tp); + opt_rx->sack_ok = 1; + tcp_sack_reset(opt_rx); } } break; @@ -3050,7 +3051,7 @@ case TCPOPT_SACK: if((opsize >= (TCPOLEN_SACK_BASE + TCPOLEN_SACK_PERBLOCK)) && !((opsize - TCPOLEN_SACK_BASE) % TCPOLEN_SACK_PERBLOCK) && - tp->sack_ok) { + opt_rx->sack_ok) { TCP_SKB_CB(skb)->sacked = (ptr - 2) - (unsigned char *)th; } }; @@ -3067,34 +3068,34 @@ struct tcp_sock *tp) { if (th->doff == sizeof(struct tcphdr)>>2) { - tp->saw_tstamp = 0; + tp->rx_opt.saw_tstamp = 0; return 0; - } else if (tp->tstamp_ok && + } else if (tp->rx_opt.tstamp_ok && th->doff == (sizeof(struct tcphdr)>>2)+(TCPOLEN_TSTAMP_ALIGNED>>2)) { __u32 *ptr = (__u32 *)(th + 1); if (*ptr == ntohl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) | (TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP)) { - tp->saw_tstamp = 1; + tp->rx_opt.saw_tstamp = 1; ++ptr; - tp->rcv_tsval = ntohl(*ptr); + tp->rx_opt.rcv_tsval = ntohl(*ptr); ++ptr; - tp->rcv_tsecr = ntohl(*ptr); + tp->rx_opt.rcv_tsecr = ntohl(*ptr); return 1; } } - tcp_parse_options(skb, tp, 1); + tcp_parse_options(skb, &tp->rx_opt, 1); return 1; } static inline void tcp_store_ts_recent(struct tcp_sock *tp) { - tp->ts_recent = tp->rcv_tsval; - tp->ts_recent_stamp = xtime.tv_sec; + tp->rx_opt.ts_recent = tp->rx_opt.rcv_tsval; + tp->rx_opt.ts_recent_stamp = xtime.tv_sec; } static inline void tcp_replace_ts_recent(struct tcp_sock *tp, u32 seq) { - if (tp->saw_tstamp && !after(seq, tp->rcv_wup)) { + if (tp->rx_opt.saw_tstamp && !after(seq, tp->rcv_wup)) { /* PAWS bug workaround wrt. ACK frames, the PAWS discard * extra check below makes sure this can only happen * for pure ACK frames. -DaveM @@ -3102,8 +3103,8 @@ * Not only, also it occurs for expired timestamps. */ - if((s32)(tp->rcv_tsval - tp->ts_recent) >= 0 || - xtime.tv_sec >= tp->ts_recent_stamp + TCP_PAWS_24DAYS) + if((s32)(tp->rx_opt.rcv_tsval - tp->rx_opt.ts_recent) >= 0 || + xtime.tv_sec >= tp->rx_opt.ts_recent_stamp + TCP_PAWS_24DAYS) tcp_store_ts_recent(tp); } } @@ -3144,16 +3145,16 @@ ack == tp->snd_una && /* 3. ... and does not update window. */ - !tcp_may_update_window(tp, ack, seq, ntohs(th->window)<snd_wscale) && + !tcp_may_update_window(tp, ack, seq, ntohs(th->window) << tp->rx_opt.snd_wscale) && /* 4. ... and sits in replay window. */ - (s32)(tp->ts_recent - tp->rcv_tsval) <= (tp->rto*1024)/HZ); + (s32)(tp->rx_opt.ts_recent - tp->rx_opt.rcv_tsval) <= (tp->rto*1024)/HZ); } static inline int tcp_paws_discard(struct tcp_sock *tp, struct sk_buff *skb) { - return ((s32)(tp->ts_recent - tp->rcv_tsval) > TCP_PAWS_WINDOW && - xtime.tv_sec < tp->ts_recent_stamp + TCP_PAWS_24DAYS && + return ((s32)(tp->rx_opt.ts_recent - tp->rx_opt.rcv_tsval) > TCP_PAWS_WINDOW && + xtime.tv_sec < tp->rx_opt.ts_recent_stamp + TCP_PAWS_24DAYS && !tcp_disordered_ack(tp, skb)); } @@ -3266,8 +3267,8 @@ * Probably, we should reset in this case. For now drop them. */ __skb_queue_purge(&tp->out_of_order_queue); - if (tp->sack_ok) - tcp_sack_reset(tp); + if (tp->rx_opt.sack_ok) + tcp_sack_reset(&tp->rx_opt); sk_stream_mem_reclaim(sk); if (!sock_flag(sk, SOCK_DEAD)) { @@ -3297,22 +3298,22 @@ static inline void tcp_dsack_set(struct tcp_sock *tp, u32 seq, u32 end_seq) { - if (tp->sack_ok && sysctl_tcp_dsack) { + if (tp->rx_opt.sack_ok && sysctl_tcp_dsack) { if (before(seq, tp->rcv_nxt)) NET_INC_STATS_BH(LINUX_MIB_TCPDSACKOLDSENT); else NET_INC_STATS_BH(LINUX_MIB_TCPDSACKOFOSENT); - tp->dsack = 1; + tp->rx_opt.dsack = 1; tp->duplicate_sack[0].start_seq = seq; tp->duplicate_sack[0].end_seq = end_seq; - tp->eff_sacks = min(tp->num_sacks+1, 4-tp->tstamp_ok); + tp->rx_opt.eff_sacks = min(tp->rx_opt.num_sacks + 1, 4 - tp->rx_opt.tstamp_ok); } } static inline void tcp_dsack_extend(struct tcp_sock *tp, u32 seq, u32 end_seq) { - if (!tp->dsack) + if (!tp->rx_opt.dsack) tcp_dsack_set(tp, seq, end_seq); else tcp_sack_extend(tp->duplicate_sack, seq, end_seq); @@ -3327,7 +3328,7 @@ NET_INC_STATS_BH(LINUX_MIB_DELAYEDACKLOST); tcp_enter_quickack_mode(tp); - if (tp->sack_ok && sysctl_tcp_dsack) { + if (tp->rx_opt.sack_ok && sysctl_tcp_dsack) { u32 end_seq = TCP_SKB_CB(skb)->end_seq; if (after(TCP_SKB_CB(skb)->end_seq, tp->rcv_nxt)) @@ -3351,16 +3352,16 @@ /* See if the recent change to the first SACK eats into * or hits the sequence space of other SACK blocks, if so coalesce. */ - for (this_sack = 1; this_sack < tp->num_sacks; ) { + for (this_sack = 1; this_sack < tp->rx_opt.num_sacks; ) { if (tcp_sack_extend(sp, swalk->start_seq, swalk->end_seq)) { int i; /* Zap SWALK, by moving every further SACK up by one slot. * Decrease num_sacks. */ - tp->num_sacks--; - tp->eff_sacks = min(tp->num_sacks+tp->dsack, 4-tp->tstamp_ok); - for(i=this_sack; i < tp->num_sacks; i++) + tp->rx_opt.num_sacks--; + tp->rx_opt.eff_sacks = min(tp->rx_opt.num_sacks + tp->rx_opt.dsack, 4 - tp->rx_opt.tstamp_ok); + for(i=this_sack; i < tp->rx_opt.num_sacks; i++) sp[i] = sp[i+1]; continue; } @@ -3385,7 +3386,7 @@ { struct tcp_sock *tp = tcp_sk(sk); struct tcp_sack_block *sp = &tp->selective_acks[0]; - int cur_sacks = tp->num_sacks; + int cur_sacks = tp->rx_opt.num_sacks; int this_sack; if (!cur_sacks) @@ -3410,7 +3411,7 @@ */ if (this_sack >= 4) { this_sack--; - tp->num_sacks--; + tp->rx_opt.num_sacks--; sp--; } for(; this_sack > 0; this_sack--, sp--) @@ -3420,8 +3421,8 @@ /* Build the new head SACK, and we're done. */ sp->start_seq = seq; sp->end_seq = end_seq; - tp->num_sacks++; - tp->eff_sacks = min(tp->num_sacks + tp->dsack, 4 - tp->tstamp_ok); + tp->rx_opt.num_sacks++; + tp->rx_opt.eff_sacks = min(tp->rx_opt.num_sacks + tp->rx_opt.dsack, 4 - tp->rx_opt.tstamp_ok); } /* RCV.NXT advances, some SACKs should be eaten. */ @@ -3429,13 +3430,13 @@ static void tcp_sack_remove(struct tcp_sock *tp) { struct tcp_sack_block *sp = &tp->selective_acks[0]; - int num_sacks = tp->num_sacks; + int num_sacks = tp->rx_opt.num_sacks; int this_sack; /* Empty ofo queue, hence, all the SACKs are eaten. Clear. */ if (skb_queue_len(&tp->out_of_order_queue) == 0) { - tp->num_sacks = 0; - tp->eff_sacks = tp->dsack; + tp->rx_opt.num_sacks = 0; + tp->rx_opt.eff_sacks = tp->rx_opt.dsack; return; } @@ -3456,9 +3457,9 @@ this_sack++; sp++; } - if (num_sacks != tp->num_sacks) { - tp->num_sacks = num_sacks; - tp->eff_sacks = min(tp->num_sacks+tp->dsack, 4-tp->tstamp_ok); + if (num_sacks != tp->rx_opt.num_sacks) { + tp->rx_opt.num_sacks = num_sacks; + tp->rx_opt.eff_sacks = min(tp->rx_opt.num_sacks + tp->rx_opt.dsack, 4 - tp->rx_opt.tstamp_ok); } } @@ -3516,10 +3517,10 @@ TCP_ECN_accept_cwr(tp, skb); - if (tp->dsack) { - tp->dsack = 0; - tp->eff_sacks = min_t(unsigned int, tp->num_sacks, - 4 - tp->tstamp_ok); + if (tp->rx_opt.dsack) { + tp->rx_opt.dsack = 0; + tp->rx_opt.eff_sacks = min_t(unsigned int, tp->rx_opt.num_sacks, + 4 - tp->rx_opt.tstamp_ok); } /* Queue data for delivery to the user. @@ -3577,7 +3578,7 @@ tp->ack.pingpong = 0; } - if (tp->num_sacks) + if (tp->rx_opt.num_sacks) tcp_sack_remove(tp); tcp_fast_path_check(sk, tp); @@ -3644,10 +3645,10 @@ if (!skb_peek(&tp->out_of_order_queue)) { /* Initial out of order segment, build 1 SACK. */ - if (tp->sack_ok) { - tp->num_sacks = 1; - tp->dsack = 0; - tp->eff_sacks = 1; + if (tp->rx_opt.sack_ok) { + tp->rx_opt.num_sacks = 1; + tp->rx_opt.dsack = 0; + tp->rx_opt.eff_sacks = 1; tp->selective_acks[0].start_seq = TCP_SKB_CB(skb)->seq; tp->selective_acks[0].end_seq = TCP_SKB_CB(skb)->end_seq; @@ -3661,7 +3662,7 @@ if (seq == TCP_SKB_CB(skb1)->end_seq) { __skb_append(skb1, skb); - if (!tp->num_sacks || + if (!tp->rx_opt.num_sacks || tp->selective_acks[0].end_seq != seq) goto add_sack; @@ -3709,7 +3710,7 @@ } add_sack: - if (tp->sack_ok) + if (tp->rx_opt.sack_ok) tcp_sack_new_ofo_skb(sk, seq, end_seq); } } @@ -3891,8 +3892,8 @@ * is in a sad state like this, we care only about integrity * of the connection not performance. */ - if (tp->sack_ok) - tcp_sack_reset(tp); + if (tp->rx_opt.sack_ok) + tcp_sack_reset(&tp->rx_opt); sk_stream_mem_reclaim(sk); } @@ -3947,7 +3948,7 @@ !(sk->sk_userlocks & SOCK_SNDBUF_LOCK) && !tcp_memory_pressure && atomic_read(&tcp_memory_allocated) < sysctl_tcp_mem[0]) { - int sndmem = max_t(u32, tp->mss_clamp, tp->mss_cache_std) + + int sndmem = max_t(u32, tp->rx_opt.mss_clamp, tp->mss_cache_std) + MAX_TCP_HEADER + 16 + sizeof(struct sk_buff), demanded = max_t(unsigned int, tp->snd_cwnd, tp->reordering + 1); @@ -4214,7 +4215,7 @@ * We do checksum and copy also but from device to kernel. */ - tp->saw_tstamp = 0; + tp->rx_opt.saw_tstamp = 0; /* pred_flags is 0xS?10 << 16 + snd_wnd * if header_predition is to be made @@ -4243,14 +4244,14 @@ | (TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP)) goto slow_path; - tp->saw_tstamp = 1; + tp->rx_opt.saw_tstamp = 1; ++ptr; - tp->rcv_tsval = ntohl(*ptr); + tp->rx_opt.rcv_tsval = ntohl(*ptr); ++ptr; - tp->rcv_tsecr = ntohl(*ptr); + tp->rx_opt.rcv_tsecr = ntohl(*ptr); /* If PAWS failed, check it more carefully in slow path */ - if ((s32)(tp->rcv_tsval - tp->ts_recent) < 0) + if ((s32)(tp->rx_opt.rcv_tsval - tp->rx_opt.ts_recent) < 0) goto slow_path; /* DO NOT update ts_recent here, if checksum fails @@ -4376,7 +4377,7 @@ /* * RFC1323: H1. Apply PAWS check first. */ - if (tcp_fast_parse_options(skb, th, tp) && tp->saw_tstamp && + if (tcp_fast_parse_options(skb, th, tp) && tp->rx_opt.saw_tstamp && tcp_paws_discard(tp, skb)) { if (!th->rst) { NET_INC_STATS_BH(LINUX_MIB_PAWSESTABREJECTED); @@ -4448,9 +4449,9 @@ struct tcphdr *th, unsigned len) { struct tcp_sock *tp = tcp_sk(sk); - int saved_clamp = tp->mss_clamp; + int saved_clamp = tp->rx_opt.mss_clamp; - tcp_parse_options(skb, tp, 0); + tcp_parse_options(skb, &tp->rx_opt, 0); if (th->ack) { /* rfc793: @@ -4467,8 +4468,8 @@ if (TCP_SKB_CB(skb)->ack_seq != tp->snd_nxt) goto reset_and_undo; - if (tp->saw_tstamp && tp->rcv_tsecr && - !between(tp->rcv_tsecr, tp->retrans_stamp, + if (tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr && + !between(tp->rx_opt.rcv_tsecr, tp->retrans_stamp, tcp_time_stamp)) { NET_INC_STATS_BH(LINUX_MIB_PAWSACTIVEREJECTED); goto reset_and_undo; @@ -4523,13 +4524,13 @@ tp->snd_wnd = ntohs(th->window); tcp_init_wl(tp, TCP_SKB_CB(skb)->ack_seq, TCP_SKB_CB(skb)->seq); - if (!tp->wscale_ok) { - tp->snd_wscale = tp->rcv_wscale = 0; + if (!tp->rx_opt.wscale_ok) { + tp->rx_opt.snd_wscale = tp->rx_opt.rcv_wscale = 0; tp->window_clamp = min(tp->window_clamp, 65535U); } - if (tp->saw_tstamp) { - tp->tstamp_ok = 1; + if (tp->rx_opt.saw_tstamp) { + tp->rx_opt.tstamp_ok = 1; tp->tcp_header_len = sizeof(struct tcphdr) + TCPOLEN_TSTAMP_ALIGNED; tp->advmss -= TCPOLEN_TSTAMP_ALIGNED; @@ -4538,8 +4539,8 @@ tp->tcp_header_len = sizeof(struct tcphdr); } - if (tp->sack_ok && sysctl_tcp_fack) - tp->sack_ok |= 2; + if (tp->rx_opt.sack_ok && sysctl_tcp_fack) + tp->rx_opt.sack_ok |= 2; tcp_sync_mss(sk, tp->pmtu_cookie); tcp_initialize_rcv_mss(sk); @@ -4566,7 +4567,7 @@ if (sock_flag(sk, SOCK_KEEPOPEN)) tcp_reset_keepalive_timer(sk, keepalive_time_when(tp)); - if (!tp->snd_wscale) + if (!tp->rx_opt.snd_wscale) __tcp_fast_path_on(tp, tp->snd_wnd); else tp->pred_flags = 0; @@ -4613,7 +4614,7 @@ } /* PAWS check. */ - if (tp->ts_recent_stamp && tp->saw_tstamp && tcp_paws_check(tp, 0)) + if (tp->rx_opt.ts_recent_stamp && tp->rx_opt.saw_tstamp && tcp_paws_check(&tp->rx_opt, 0)) goto discard_and_undo; if (th->syn) { @@ -4623,8 +4624,8 @@ */ tcp_set_state(sk, TCP_SYN_RECV); - if (tp->saw_tstamp) { - tp->tstamp_ok = 1; + if (tp->rx_opt.saw_tstamp) { + tp->rx_opt.tstamp_ok = 1; tcp_store_ts_recent(tp); tp->tcp_header_len = sizeof(struct tcphdr) + TCPOLEN_TSTAMP_ALIGNED; @@ -4671,13 +4672,13 @@ */ discard_and_undo: - tcp_clear_options(tp); - tp->mss_clamp = saved_clamp; + tcp_clear_options(&tp->rx_opt); + tp->rx_opt.mss_clamp = saved_clamp; goto discard; reset_and_undo: - tcp_clear_options(tp); - tp->mss_clamp = saved_clamp; + tcp_clear_options(&tp->rx_opt); + tp->rx_opt.mss_clamp = saved_clamp; return 1; } @@ -4695,7 +4696,7 @@ struct tcp_sock *tp = tcp_sk(sk); int queued = 0; - tp->saw_tstamp = 0; + tp->rx_opt.saw_tstamp = 0; switch (sk->sk_state) { case TCP_CLOSE: @@ -4750,7 +4751,7 @@ return 0; } - if (tcp_fast_parse_options(skb, th, tp) && tp->saw_tstamp && + if (tcp_fast_parse_options(skb, th, tp) && tp->rx_opt.saw_tstamp && tcp_paws_discard(tp, skb)) { if (!th->rst) { NET_INC_STATS_BH(LINUX_MIB_PAWSESTABREJECTED); @@ -4810,7 +4811,7 @@ tp->snd_una = TCP_SKB_CB(skb)->ack_seq; tp->snd_wnd = ntohs(th->window) << - tp->snd_wscale; + tp->rx_opt.snd_wscale; tcp_init_wl(tp, TCP_SKB_CB(skb)->ack_seq, TCP_SKB_CB(skb)->seq); @@ -4818,11 +4819,11 @@ * and does not calculate rtt. * Fix it at least with timestamps. */ - if (tp->saw_tstamp && tp->rcv_tsecr && + if (tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr && !tp->srtt) tcp_ack_saw_tstamp(tp, 0); - if (tp->tstamp_ok) + if (tp->rx_opt.tstamp_ok) tp->advmss -= TCPOLEN_TSTAMP_ALIGNED; /* Make sure socket is routed, for diff -Nru a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c --- a/net/ipv4/tcp_ipv4.c 2005-02-22 20:30:43 -08:00 +++ b/net/ipv4/tcp_ipv4.c 2005-02-22 20:30:43 -08:00 @@ -591,8 +591,8 @@ if ((tp->write_seq = tw->tw_snd_nxt + 65535 + 2) == 0) tp->write_seq = 1; - tp->ts_recent = tw->tw_ts_recent; - tp->ts_recent_stamp = tw->tw_ts_recent_stamp; + tp->rx_opt.ts_recent = tw->tw_ts_recent; + tp->rx_opt.ts_recent_stamp = tw->tw_ts_recent_stamp; sock_hold(sk2); goto unique; } else @@ -783,25 +783,25 @@ inet->saddr = rt->rt_src; inet->rcv_saddr = inet->saddr; - if (tp->ts_recent_stamp && inet->daddr != daddr) { + if (tp->rx_opt.ts_recent_stamp && inet->daddr != daddr) { /* Reset inherited state */ - tp->ts_recent = 0; - tp->ts_recent_stamp = 0; - tp->write_seq = 0; + tp->rx_opt.ts_recent = 0; + tp->rx_opt.ts_recent_stamp = 0; + tp->write_seq = 0; } if (sysctl_tcp_tw_recycle && - !tp->ts_recent_stamp && rt->rt_dst == daddr) { + !tp->rx_opt.ts_recent_stamp && rt->rt_dst == daddr) { struct inet_peer *peer = rt_get_peer(rt); /* VJ's idea. We save last timestamp seen from * the destination in peer table, when entering state TIME-WAIT - * and initialize ts_recent from it, when trying new connection. + * and initialize rx_opt.ts_recent from it, when trying new connection. */ if (peer && peer->tcp_ts_stamp + TCP_PAWS_MSL >= xtime.tv_sec) { - tp->ts_recent_stamp = peer->tcp_ts_stamp; - tp->ts_recent = peer->tcp_ts; + tp->rx_opt.ts_recent_stamp = peer->tcp_ts_stamp; + tp->rx_opt.ts_recent = peer->tcp_ts; } } @@ -812,7 +812,7 @@ if (inet->opt) tp->ext_header_len = inet->opt->optlen; - tp->mss_clamp = 536; + tp->rx_opt.mss_clamp = 536; /* Socket identity is still unknown (sport may be zero). * However we set state to SYN-SENT and not releasing socket @@ -1393,7 +1393,7 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb) { - struct tcp_sock tp; + struct tcp_options_received tmp_opt; struct open_request *req; __u32 saddr = skb->nh.iph->saddr; __u32 daddr = skb->nh.iph->daddr; @@ -1435,29 +1435,29 @@ if (!req) goto drop; - tcp_clear_options(&tp); - tp.mss_clamp = 536; - tp.user_mss = tcp_sk(sk)->user_mss; + tcp_clear_options(&tmp_opt); + tmp_opt.mss_clamp = 536; + tmp_opt.user_mss = tcp_sk(sk)->rx_opt.user_mss; - tcp_parse_options(skb, &tp, 0); + tcp_parse_options(skb, &tmp_opt, 0); if (want_cookie) { - tcp_clear_options(&tp); - tp.saw_tstamp = 0; + tcp_clear_options(&tmp_opt); + tmp_opt.saw_tstamp = 0; } - if (tp.saw_tstamp && !tp.rcv_tsval) { + if (tmp_opt.saw_tstamp && !tmp_opt.rcv_tsval) { /* Some OSes (unknown ones, but I see them on web server, which * contains information interesting only for windows' * users) do not send their stamp in SYN. It is easy case. * We simply do not advertise TS support. */ - tp.saw_tstamp = 0; - tp.tstamp_ok = 0; + tmp_opt.saw_tstamp = 0; + tmp_opt.tstamp_ok = 0; } - tp.tstamp_ok = tp.saw_tstamp; + tmp_opt.tstamp_ok = tmp_opt.saw_tstamp; - tcp_openreq_init(req, &tp, skb); + tcp_openreq_init(req, &tmp_opt, skb); req->af.v4_req.loc_addr = daddr; req->af.v4_req.rmt_addr = saddr; @@ -1483,7 +1483,7 @@ * timewait bucket, so that all the necessary checks * are made in the function processing timewait state. */ - if (tp.saw_tstamp && + if (tmp_opt.saw_tstamp && sysctl_tcp_tw_recycle && (dst = tcp_v4_route_req(sk, req)) != NULL && (peer = rt_get_peer((struct rtable *)dst)) != NULL && @@ -1987,11 +1987,11 @@ } if (peer) { - if ((s32)(peer->tcp_ts - tp->ts_recent) <= 0 || + if ((s32)(peer->tcp_ts - tp->rx_opt.ts_recent) <= 0 || (peer->tcp_ts_stamp + TCP_PAWS_MSL < xtime.tv_sec && - peer->tcp_ts_stamp <= tp->ts_recent_stamp)) { - peer->tcp_ts_stamp = tp->ts_recent_stamp; - peer->tcp_ts = tp->ts_recent; + peer->tcp_ts_stamp <= tp->rx_opt.ts_recent_stamp)) { + peer->tcp_ts_stamp = tp->rx_opt.ts_recent_stamp; + peer->tcp_ts = tp->rx_opt.ts_recent; } if (release_it) inet_putpeer(peer); diff -Nru a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c --- a/net/ipv4/tcp_minisocks.c 2005-02-22 20:30:44 -08:00 +++ b/net/ipv4/tcp_minisocks.c 2005-02-22 20:30:44 -08:00 @@ -125,17 +125,17 @@ tcp_timewait_state_process(struct tcp_tw_bucket *tw, struct sk_buff *skb, struct tcphdr *th, unsigned len) { - struct tcp_sock tp; + struct tcp_options_received tmp_opt; int paws_reject = 0; - tp.saw_tstamp = 0; + tmp_opt.saw_tstamp = 0; if (th->doff > (sizeof(struct tcphdr) >> 2) && tw->tw_ts_recent_stamp) { - tcp_parse_options(skb, &tp, 0); + tcp_parse_options(skb, &tmp_opt, 0); - if (tp.saw_tstamp) { - tp.ts_recent = tw->tw_ts_recent; - tp.ts_recent_stamp = tw->tw_ts_recent_stamp; - paws_reject = tcp_paws_check(&tp, th->rst); + if (tmp_opt.saw_tstamp) { + tmp_opt.ts_recent = tw->tw_ts_recent; + tmp_opt.ts_recent_stamp = tw->tw_ts_recent_stamp; + paws_reject = tcp_paws_check(&tmp_opt, th->rst); } } @@ -176,9 +176,9 @@ /* FIN arrived, enter true time-wait state. */ tw->tw_substate = TCP_TIME_WAIT; tw->tw_rcv_nxt = TCP_SKB_CB(skb)->end_seq; - if (tp.saw_tstamp) { + if (tmp_opt.saw_tstamp) { tw->tw_ts_recent_stamp = xtime.tv_sec; - tw->tw_ts_recent = tp.rcv_tsval; + tw->tw_ts_recent = tmp_opt.rcv_tsval; } /* I am shamed, but failed to make it more elegant. @@ -231,8 +231,8 @@ } tcp_tw_schedule(tw, TCP_TIMEWAIT_LEN); - if (tp.saw_tstamp) { - tw->tw_ts_recent = tp.rcv_tsval; + if (tmp_opt.saw_tstamp) { + tw->tw_ts_recent = tmp_opt.rcv_tsval; tw->tw_ts_recent_stamp = xtime.tv_sec; } @@ -259,7 +259,7 @@ if (th->syn && !th->rst && !th->ack && !paws_reject && (after(TCP_SKB_CB(skb)->seq, tw->tw_rcv_nxt) || - (tp.saw_tstamp && (s32)(tw->tw_ts_recent - tp.rcv_tsval) < 0))) { + (tmp_opt.saw_tstamp && (s32)(tw->tw_ts_recent - tmp_opt.rcv_tsval) < 0))) { u32 isn = tw->tw_snd_nxt + 65535 + 2; if (isn == 0) isn++; @@ -332,7 +332,7 @@ struct tcp_sock *tp = tcp_sk(sk); int recycle_ok = 0; - if (sysctl_tcp_tw_recycle && tp->ts_recent_stamp) + if (sysctl_tcp_tw_recycle && tp->rx_opt.ts_recent_stamp) recycle_ok = tp->af_specific->remember_stamp(sk); if (tcp_tw_count < sysctl_tcp_max_tw_buckets) @@ -353,15 +353,15 @@ tw->tw_dport = inet->dport; tw->tw_family = sk->sk_family; tw->tw_reuse = sk->sk_reuse; - tw->tw_rcv_wscale = tp->rcv_wscale; + tw->tw_rcv_wscale = tp->rx_opt.rcv_wscale; atomic_set(&tw->tw_refcnt, 1); tw->tw_hashent = sk->sk_hashent; tw->tw_rcv_nxt = tp->rcv_nxt; tw->tw_snd_nxt = tp->snd_nxt; tw->tw_rcv_wnd = tcp_receive_window(tp); - tw->tw_ts_recent = tp->ts_recent; - tw->tw_ts_recent_stamp = tp->ts_recent_stamp; + tw->tw_ts_recent = tp->rx_opt.ts_recent; + tw->tw_ts_recent_stamp = tp->rx_opt.ts_recent_stamp; tw_dead_node_init(tw); #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) @@ -780,13 +780,13 @@ newtp->pushed_seq = newtp->write_seq; newtp->copied_seq = req->rcv_isn + 1; - newtp->saw_tstamp = 0; + newtp->rx_opt.saw_tstamp = 0; - newtp->dsack = 0; - newtp->eff_sacks = 0; + newtp->rx_opt.dsack = 0; + newtp->rx_opt.eff_sacks = 0; newtp->probes_out = 0; - newtp->num_sacks = 0; + newtp->rx_opt.num_sacks = 0; newtp->urg_data = 0; newtp->listen_opt = NULL; newtp->accept_queue = newtp->accept_queue_tail = NULL; @@ -809,36 +809,36 @@ newsk->sk_sleep = NULL; newsk->sk_owner = NULL; - newtp->tstamp_ok = req->tstamp_ok; - if((newtp->sack_ok = req->sack_ok) != 0) { + newtp->rx_opt.tstamp_ok = req->tstamp_ok; + if((newtp->rx_opt.sack_ok = req->sack_ok) != 0) { if (sysctl_tcp_fack) - newtp->sack_ok |= 2; + newtp->rx_opt.sack_ok |= 2; } newtp->window_clamp = req->window_clamp; newtp->rcv_ssthresh = req->rcv_wnd; newtp->rcv_wnd = req->rcv_wnd; - newtp->wscale_ok = req->wscale_ok; - if (newtp->wscale_ok) { - newtp->snd_wscale = req->snd_wscale; - newtp->rcv_wscale = req->rcv_wscale; + newtp->rx_opt.wscale_ok = req->wscale_ok; + if (newtp->rx_opt.wscale_ok) { + newtp->rx_opt.snd_wscale = req->snd_wscale; + newtp->rx_opt.rcv_wscale = req->rcv_wscale; } else { - newtp->snd_wscale = newtp->rcv_wscale = 0; + newtp->rx_opt.snd_wscale = newtp->rx_opt.rcv_wscale = 0; newtp->window_clamp = min(newtp->window_clamp, 65535U); } - newtp->snd_wnd = ntohs(skb->h.th->window) << newtp->snd_wscale; + newtp->snd_wnd = ntohs(skb->h.th->window) << newtp->rx_opt.snd_wscale; newtp->max_window = newtp->snd_wnd; - if (newtp->tstamp_ok) { - newtp->ts_recent = req->ts_recent; - newtp->ts_recent_stamp = xtime.tv_sec; + if (newtp->rx_opt.tstamp_ok) { + newtp->rx_opt.ts_recent = req->ts_recent; + newtp->rx_opt.ts_recent_stamp = xtime.tv_sec; newtp->tcp_header_len = sizeof(struct tcphdr) + TCPOLEN_TSTAMP_ALIGNED; } else { - newtp->ts_recent_stamp = 0; + newtp->rx_opt.ts_recent_stamp = 0; newtp->tcp_header_len = sizeof(struct tcphdr); } if (skb->len >= TCP_MIN_RCVMSS+newtp->tcp_header_len) newtp->ack.last_seg_size = skb->len-newtp->tcp_header_len; - newtp->mss_clamp = req->mss; + newtp->rx_opt.mss_clamp = req->mss; TCP_ECN_openreq_child(newtp, req); if (newtp->ecn_flags&TCP_ECN_OK) newsk->sk_no_largesend = 1; @@ -863,21 +863,21 @@ struct tcp_sock *tp = tcp_sk(sk); u32 flg = tcp_flag_word(th) & (TCP_FLAG_RST|TCP_FLAG_SYN|TCP_FLAG_ACK); int paws_reject = 0; - struct tcp_sock ttp; + struct tcp_options_received tmp_opt; struct sock *child; - ttp.saw_tstamp = 0; + tmp_opt.saw_tstamp = 0; if (th->doff > (sizeof(struct tcphdr)>>2)) { - tcp_parse_options(skb, &ttp, 0); + tcp_parse_options(skb, &tmp_opt, 0); - if (ttp.saw_tstamp) { - ttp.ts_recent = req->ts_recent; + if (tmp_opt.saw_tstamp) { + tmp_opt.ts_recent = req->ts_recent; /* We do not store true stamp, but it is not required, * it can be estimated (approximately) * from another data. */ - ttp.ts_recent_stamp = xtime.tv_sec - ((TCP_TIMEOUT_INIT/HZ)<retrans); - paws_reject = tcp_paws_check(&ttp, th->rst); + tmp_opt.ts_recent_stamp = xtime.tv_sec - ((TCP_TIMEOUT_INIT/HZ)<retrans); + paws_reject = tcp_paws_check(&tmp_opt, th->rst); } } @@ -982,63 +982,63 @@ /* In sequence, PAWS is OK. */ - if (ttp.saw_tstamp && !after(TCP_SKB_CB(skb)->seq, req->rcv_isn+1)) - req->ts_recent = ttp.rcv_tsval; + if (tmp_opt.saw_tstamp && !after(TCP_SKB_CB(skb)->seq, req->rcv_isn+1)) + req->ts_recent = tmp_opt.rcv_tsval; - if (TCP_SKB_CB(skb)->seq == req->rcv_isn) { - /* Truncate SYN, it is out of window starting - at req->rcv_isn+1. */ - flg &= ~TCP_FLAG_SYN; - } + if (TCP_SKB_CB(skb)->seq == req->rcv_isn) { + /* Truncate SYN, it is out of window starting + at req->rcv_isn+1. */ + flg &= ~TCP_FLAG_SYN; + } - /* RFC793: "second check the RST bit" and - * "fourth, check the SYN bit" - */ - if (flg & (TCP_FLAG_RST|TCP_FLAG_SYN)) - goto embryonic_reset; + /* RFC793: "second check the RST bit" and + * "fourth, check the SYN bit" + */ + if (flg & (TCP_FLAG_RST|TCP_FLAG_SYN)) + goto embryonic_reset; - /* ACK sequence verified above, just make sure ACK is - * set. If ACK not set, just silently drop the packet. - */ - if (!(flg & TCP_FLAG_ACK)) - return NULL; + /* ACK sequence verified above, just make sure ACK is + * set. If ACK not set, just silently drop the packet. + */ + if (!(flg & TCP_FLAG_ACK)) + return NULL; - /* If TCP_DEFER_ACCEPT is set, drop bare ACK. */ - if (tp->defer_accept && TCP_SKB_CB(skb)->end_seq == req->rcv_isn+1) { - req->acked = 1; - return NULL; - } + /* If TCP_DEFER_ACCEPT is set, drop bare ACK. */ + if (tp->defer_accept && TCP_SKB_CB(skb)->end_seq == req->rcv_isn+1) { + req->acked = 1; + return NULL; + } - /* OK, ACK is valid, create big socket and - * feed this segment to it. It will repeat all - * the tests. THIS SEGMENT MUST MOVE SOCKET TO - * ESTABLISHED STATE. If it will be dropped after - * socket is created, wait for troubles. - */ - child = tp->af_specific->syn_recv_sock(sk, skb, req, NULL); - if (child == NULL) - goto listen_overflow; - - sk_set_owner(child, sk->sk_owner); - tcp_synq_unlink(tp, req, prev); - tcp_synq_removed(sk, req); - - tcp_acceptq_queue(sk, req, child); - return child; - -listen_overflow: - if (!sysctl_tcp_abort_on_overflow) { - req->acked = 1; - return NULL; - } + /* OK, ACK is valid, create big socket and + * feed this segment to it. It will repeat all + * the tests. THIS SEGMENT MUST MOVE SOCKET TO + * ESTABLISHED STATE. If it will be dropped after + * socket is created, wait for troubles. + */ + child = tp->af_specific->syn_recv_sock(sk, skb, req, NULL); + if (child == NULL) + goto listen_overflow; + + sk_set_owner(child, sk->sk_owner); + tcp_synq_unlink(tp, req, prev); + tcp_synq_removed(sk, req); + + tcp_acceptq_queue(sk, req, child); + return child; + + listen_overflow: + if (!sysctl_tcp_abort_on_overflow) { + req->acked = 1; + return NULL; + } -embryonic_reset: - NET_INC_STATS_BH(LINUX_MIB_EMBRYONICRSTS); - if (!(flg & TCP_FLAG_RST)) - req->class->send_reset(skb); + embryonic_reset: + NET_INC_STATS_BH(LINUX_MIB_EMBRYONICRSTS); + if (!(flg & TCP_FLAG_RST)) + req->class->send_reset(skb); - tcp_synq_drop(sk, req, prev); - return NULL; + tcp_synq_drop(sk, req, prev); + return NULL; } /* diff -Nru a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c --- a/net/ipv4/tcp_output.c 2005-02-22 20:30:44 -08:00 +++ b/net/ipv4/tcp_output.c 2005-02-22 20:30:44 -08:00 @@ -236,13 +236,13 @@ /* Make sure we do not exceed the maximum possible * scaled window. */ - if (!tp->rcv_wscale) + if (!tp->rx_opt.rcv_wscale) new_win = min(new_win, MAX_TCP_WINDOW); else - new_win = min(new_win, (65535U << tp->rcv_wscale)); + new_win = min(new_win, (65535U << tp->rx_opt.rcv_wscale)); /* RFC1323 scaling applied */ - new_win >>= tp->rcv_wscale; + new_win >>= tp->rx_opt.rcv_wscale; /* If we advertise zero window, disable fast path. */ if (new_win == 0) @@ -296,12 +296,12 @@ if(!(sysctl_flags & SYSCTL_FLAG_TSTAMPS)) tcp_header_size += TCPOLEN_SACKPERM_ALIGNED; } - } else if (tp->eff_sacks) { + } else if (tp->rx_opt.eff_sacks) { /* A SACK is 2 pad bytes, a 2 byte header, plus * 2 32-bit sequence numbers for each SACK block. */ tcp_header_size += (TCPOLEN_SACK_BASE_ALIGNED + - (tp->eff_sacks * TCPOLEN_SACK_PERBLOCK)); + (tp->rx_opt.eff_sacks * TCPOLEN_SACK_PERBLOCK)); } /* @@ -349,9 +349,9 @@ (sysctl_flags & SYSCTL_FLAG_TSTAMPS), (sysctl_flags & SYSCTL_FLAG_SACK), (sysctl_flags & SYSCTL_FLAG_WSCALE), - tp->rcv_wscale, + tp->rx_opt.rcv_wscale, tcb->when, - tp->ts_recent); + tp->rx_opt.ts_recent); } else { tcp_build_and_update_options((__u32 *)(th + 1), tp, tcb->when); @@ -607,10 +607,10 @@ /* This function synchronize snd mss to current pmtu/exthdr set. - tp->user_mss is mss set by user by TCP_MAXSEG. It does NOT counts + tp->rx_opt.user_mss is mss set by user by TCP_MAXSEG. It does NOT counts for TCP options, but includes only bare TCP header. - tp->mss_clamp is mss negotiated at connection setup. + tp->rx_opt.mss_clamp is mss negotiated at connection setup. It is minumum of user_mss and mss received with SYN. It also does not include TCP options. @@ -619,7 +619,7 @@ tp->mss_cache is current effective sending mss, including all tcp options except for SACKs. It is evaluated, taking into account current pmtu, but never exceeds - tp->mss_clamp. + tp->rx_opt.mss_clamp. NOTE1. rfc1122 clearly states that advertised MSS DOES NOT include either tcp or ip options. @@ -643,8 +643,8 @@ mss_now = pmtu - tp->af_specific->net_header_len - sizeof(struct tcphdr); /* Clamp it (mss_clamp does not include tcp options) */ - if (mss_now > tp->mss_clamp) - mss_now = tp->mss_clamp; + if (mss_now > tp->rx_opt.mss_clamp) + mss_now = tp->rx_opt.mss_clamp; /* Now subtract optional transport overhead */ mss_now -= tp->ext_header_len + tp->ext2_header_len; @@ -723,9 +723,9 @@ mss_now = tp->mss_cache; } - if (tp->eff_sacks) + if (tp->rx_opt.eff_sacks) mss_now -= (TCPOLEN_SACK_BASE_ALIGNED + - (tp->eff_sacks * TCPOLEN_SACK_PERBLOCK)); + (tp->rx_opt.eff_sacks * TCPOLEN_SACK_PERBLOCK)); return mss_now; } @@ -875,16 +875,16 @@ * scaled window will not line up with the MSS boundary anyway. */ window = tp->rcv_wnd; - if (tp->rcv_wscale) { + if (tp->rx_opt.rcv_wscale) { window = free_space; /* Advertise enough space so that it won't get scaled away. * Import case: prevent zero window announcement if * 1< mss. */ - if (((window >> tp->rcv_wscale) << tp->rcv_wscale) != window) - window = (((window >> tp->rcv_wscale) + 1) - << tp->rcv_wscale); + if (((window >> tp->rx_opt.rcv_wscale) << tp->rx_opt.rcv_wscale) != window) + window = (((window >> tp->rx_opt.rcv_wscale) + 1) + << tp->rx_opt.rcv_wscale); } else { /* Get the largest window that is a nice multiple of mss. * Window clamp already applied above. @@ -962,7 +962,7 @@ tp->left_out -= tcp_skb_pcount(next_skb); } /* Reno case is special. Sigh... */ - if (!tp->sack_ok && tp->sacked_out) { + if (!tp->rx_opt.sack_ok && tp->sacked_out) { tcp_dec_pcount_approx(&tp->sacked_out, next_skb); tp->left_out -= tcp_skb_pcount(next_skb); } @@ -1200,7 +1200,7 @@ return; /* No forward retransmissions in Reno are possible. */ - if (!tp->sack_ok) + if (!tp->rx_opt.sack_ok) return; /* Yeah, we have to make difficult choice between forward transmission @@ -1439,8 +1439,8 @@ (sysctl_tcp_timestamps ? TCPOLEN_TSTAMP_ALIGNED : 0); /* If user gave his TCP_MAXSEG, record it to clamp */ - if (tp->user_mss) - tp->mss_clamp = tp->user_mss; + if (tp->rx_opt.user_mss) + tp->rx_opt.mss_clamp = tp->rx_opt.user_mss; tp->max_window = 0; tcp_sync_mss(sk, dst_pmtu(dst)); @@ -1451,11 +1451,11 @@ tcp_ca_init(tp); tcp_select_initial_window(tcp_full_space(sk), - tp->advmss - (tp->ts_recent_stamp ? tp->tcp_header_len - sizeof(struct tcphdr) : 0), + tp->advmss - (tp->rx_opt.ts_recent_stamp ? tp->tcp_header_len - sizeof(struct tcphdr) : 0), &tp->rcv_wnd, &tp->window_clamp, sysctl_tcp_window_scaling, - &tp->rcv_wscale); + &tp->rx_opt.rcv_wscale); tp->rcv_ssthresh = tp->rcv_wnd; diff -Nru a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c --- a/net/ipv4/tcp_timer.c 2005-02-22 20:30:44 -08:00 +++ b/net/ipv4/tcp_timer.c 2005-02-22 20:30:44 -08:00 @@ -353,7 +353,7 @@ if (tp->retransmits == 0) { if (tp->ca_state == TCP_CA_Disorder || tp->ca_state == TCP_CA_Recovery) { - if (tp->sack_ok) { + if (tp->rx_opt.sack_ok) { if (tp->ca_state == TCP_CA_Recovery) NET_INC_STATS_BH(LINUX_MIB_TCPSACKRECOVERYFAIL); else diff -Nru a/net/ipv6/route.c b/net/ipv6/route.c --- a/net/ipv6/route.c 2005-02-22 20:30:44 -08:00 +++ b/net/ipv6/route.c 2005-02-22 20:30:44 -08:00 @@ -84,7 +84,8 @@ static struct dst_entry *ip6_dst_check(struct dst_entry *dst, u32 cookie); static struct dst_entry *ip6_negative_advice(struct dst_entry *); static void ip6_dst_destroy(struct dst_entry *); -static void ip6_dst_ifdown(struct dst_entry *, int how); +static void ip6_dst_ifdown(struct dst_entry *, + struct net_device *dev, int how); static int ip6_dst_gc(void); static int ip6_pkt_discard(struct sk_buff *skb); @@ -153,12 +154,13 @@ } } -static void ip6_dst_ifdown(struct dst_entry *dst, int how) +static void ip6_dst_ifdown(struct dst_entry *dst, struct net_device *dev, + int how) { struct rt6_info *rt = (struct rt6_info *)dst; struct inet6_dev *idev = rt->rt6i_idev; - if (idev != NULL && idev->dev != &loopback_dev) { + if (dev != &loopback_dev && idev != NULL && idev->dev == dev) { struct inet6_dev *loopback_idev = in6_dev_get(&loopback_dev); if (loopback_idev != NULL) { rt->rt6i_idev = loopback_idev; diff -Nru a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c --- a/net/ipv6/tcp_ipv6.c 2005-02-22 20:30:44 -08:00 +++ b/net/ipv6/tcp_ipv6.c 2005-02-22 20:30:44 -08:00 @@ -473,8 +473,8 @@ tp->write_seq = tw->tw_snd_nxt + 65535 + 2; if (!tp->write_seq) tp->write_seq = 1; - tp->ts_recent = tw->tw_ts_recent; - tp->ts_recent_stamp = tw->tw_ts_recent_stamp; + tp->rx_opt.ts_recent = tw->tw_ts_recent; + tp->rx_opt.ts_recent_stamp = tw->tw_ts_recent_stamp; sock_hold(sk2); goto unique; } else @@ -609,10 +609,10 @@ return -EINVAL; } - if (tp->ts_recent_stamp && + if (tp->rx_opt.ts_recent_stamp && !ipv6_addr_equal(&np->daddr, &usin->sin6_addr)) { - tp->ts_recent = 0; - tp->ts_recent_stamp = 0; + tp->rx_opt.ts_recent = 0; + tp->rx_opt.ts_recent_stamp = 0; tp->write_seq = 0; } @@ -703,7 +703,7 @@ tp->ext_header_len = np->opt->opt_flen + np->opt->opt_nflen; tp->ext2_header_len = dst->header_len; - tp->mss_clamp = IPV6_MIN_MTU - sizeof(struct tcphdr) - sizeof(struct ipv6hdr); + tp->rx_opt.mss_clamp = IPV6_MIN_MTU - sizeof(struct tcphdr) - sizeof(struct ipv6hdr); inet->dport = usin->sin6_port; @@ -1202,7 +1202,8 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb) { struct ipv6_pinfo *np = inet6_sk(sk); - struct tcp_sock tmptp, *tp = tcp_sk(sk); + struct tcp_options_received tmp_opt; + struct tcp_sock *tp = tcp_sk(sk); struct open_request *req = NULL; __u32 isn = TCP_SKB_CB(skb)->when; @@ -1228,14 +1229,14 @@ if (req == NULL) goto drop; - tcp_clear_options(&tmptp); - tmptp.mss_clamp = IPV6_MIN_MTU - sizeof(struct tcphdr) - sizeof(struct ipv6hdr); - tmptp.user_mss = tp->user_mss; + tcp_clear_options(&tmp_opt); + tmp_opt.mss_clamp = IPV6_MIN_MTU - sizeof(struct tcphdr) - sizeof(struct ipv6hdr); + tmp_opt.user_mss = tp->rx_opt.user_mss; - tcp_parse_options(skb, &tmptp, 0); + tcp_parse_options(skb, &tmp_opt, 0); - tmptp.tstamp_ok = tmptp.saw_tstamp; - tcp_openreq_init(req, &tmptp, skb); + tmp_opt.tstamp_ok = tmp_opt.saw_tstamp; + tcp_openreq_init(req, &tmp_opt, skb); req->class = &or_ipv6; ipv6_addr_copy(&req->af.v6_req.rmt_addr, &skb->nh.ipv6h->saddr); diff -Nru a/net/ipv6/udp.c b/net/ipv6/udp.c --- a/net/ipv6/udp.c 2005-02-22 20:30:44 -08:00 +++ b/net/ipv6/udp.c 2005-02-22 20:30:44 -08:00 @@ -219,6 +219,7 @@ int noblock, int flags, int *addr_len) { struct ipv6_pinfo *np = inet6_sk(sk); + struct inet_sock *inet = inet_sk(sk); struct sk_buff *skb; size_t copied; int err; @@ -268,21 +269,22 @@ sin6->sin6_flowinfo = 0; sin6->sin6_scope_id = 0; - if (skb->protocol == htons(ETH_P_IP)) { - struct inet_sock *inet = inet_sk(sk); - + if (skb->protocol == htons(ETH_P_IP)) ipv6_addr_set(&sin6->sin6_addr, 0, 0, htonl(0xffff), skb->nh.iph->saddr); - if (inet->cmsg_flags) - ip_cmsg_recv(msg, skb); - } else { + else { ipv6_addr_copy(&sin6->sin6_addr, &skb->nh.ipv6h->saddr); - - if (np->rxopt.all) - datagram_recv_ctl(sk, msg, skb); if (ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL) sin6->sin6_scope_id = IP6CB(skb)->iif; } + + } + if (skb->protocol == htons(ETH_P_IP)) { + if (inet->cmsg_flags) + ip_cmsg_recv(msg, skb); + } else { + if (np->rxopt.all) + datagram_recv_ctl(sk, msg, skb); } err = copied; diff -Nru a/net/netrom/nr_dev.c b/net/netrom/nr_dev.c --- a/net/netrom/nr_dev.c 2005-02-22 20:30:44 -08:00 +++ b/net/netrom/nr_dev.c 2005-02-22 20:30:44 -08:00 @@ -46,7 +46,7 @@ int nr_rx_ip(struct sk_buff *skb, struct net_device *dev) { - struct net_device_stats *stats = (struct net_device_stats *)dev->priv; + struct net_device_stats *stats = netdev_priv(dev); if (!netif_running(dev)) { stats->rx_errors++; @@ -73,7 +73,7 @@ static int nr_rebuild_header(struct sk_buff *skb) { struct net_device *dev = skb->dev; - struct net_device_stats *stats = (struct net_device_stats *)dev->priv; + struct net_device_stats *stats = netdev_priv(dev); struct sk_buff *skbn; unsigned char *bp = skb->data; int len; @@ -186,7 +186,7 @@ static int nr_xmit(struct sk_buff *skb, struct net_device *dev) { - struct net_device_stats *stats = (struct net_device_stats *)dev->priv; + struct net_device_stats *stats = netdev_priv(dev); dev_kfree_skb(skb); stats->tx_errors++; return 0; @@ -194,7 +194,7 @@ static struct net_device_stats *nr_get_stats(struct net_device *dev) { - return (struct net_device_stats *)dev->priv; + return netdev_priv(dev); } void nr_setup(struct net_device *dev) diff -Nru a/net/rose/rose_dev.c b/net/rose/rose_dev.c --- a/net/rose/rose_dev.c 2005-02-22 20:30:43 -08:00 +++ b/net/rose/rose_dev.c 2005-02-22 20:30:43 -08:00 @@ -57,7 +57,7 @@ static int rose_rebuild_header(struct sk_buff *skb) { struct net_device *dev = skb->dev; - struct net_device_stats *stats = (struct net_device_stats *)dev->priv; + struct net_device_stats *stats = netdev_priv(dev); unsigned char *bp = (unsigned char *)skb->data; struct sk_buff *skbn; @@ -117,7 +117,7 @@ static int rose_xmit(struct sk_buff *skb, struct net_device *dev) { - struct net_device_stats *stats = (struct net_device_stats *)dev->priv; + struct net_device_stats *stats = netdev_priv(dev); if (!netif_running(dev)) { printk(KERN_ERR "ROSE: rose_xmit - called when iface is down\n"); @@ -130,7 +130,7 @@ static struct net_device_stats *rose_get_stats(struct net_device *dev) { - return (struct net_device_stats *)dev->priv; + return netdev_priv(dev); } void rose_setup(struct net_device *dev) diff -Nru a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c --- a/net/xfrm/xfrm_policy.c 2005-02-22 20:30:43 -08:00 +++ b/net/xfrm/xfrm_policy.c 2005-02-22 20:30:43 -08:00 @@ -1043,6 +1043,19 @@ dst->xfrm = NULL; } +static void xfrm_dst_ifdown(struct dst_entry *dst, struct net_device *dev, + int unregister) +{ + if (!unregister) + return; + + while ((dst = dst->child) && dst->xfrm && dst->dev == dev) { + dst->dev = &loopback_dev; + dev_hold(&loopback_dev); + dev_put(dev); + } +} + static void xfrm_link_failure(struct sk_buff *skb) { /* Impossible. Such dst must be popped before reaches point of failure. */ @@ -1166,6 +1179,8 @@ dst_ops->check = xfrm_dst_check; if (likely(dst_ops->destroy == NULL)) dst_ops->destroy = xfrm_dst_destroy; + if (likely(dst_ops->ifdown == NULL)) + dst_ops->ifdown = xfrm_dst_ifdown; if (likely(dst_ops->negative_advice == NULL)) dst_ops->negative_advice = xfrm_negative_advice; if (likely(dst_ops->link_failure == NULL)) @@ -1198,6 +1213,7 @@ dst_ops->kmem_cachep = NULL; dst_ops->check = NULL; dst_ops->destroy = NULL; + dst_ops->ifdown = NULL; dst_ops->negative_advice = NULL; dst_ops->link_failure = NULL; dst_ops->get_mss = NULL;