master.kernel.org:/home/torvalds/BK/linux-2.6 torvalds@ppc970.osdl.org|ChangeSet|20050307220742|51594 torvalds # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2005/03/07 14:07:42-08:00 torvalds@ppc970.osdl.org # Merge bk://linux-1394.bkbits.net/1394-2.6 # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # MAINTAINERS # 2005/03/07 14:07:36-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2005/03/07 13:54:45-08:00 torvalds@ppc970.osdl.org # Merge pcnet32 conflicting updates manually # # drivers/net/pcnet32.c # 2005/03/07 13:54:36-08:00 torvalds@ppc970.osdl.org +25 -25 # Merge pcnet32 conflicting updates manually # # include/linux/pci_ids.h # 2005/03/07 13:51:42-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2005/03/07 13:50:19-08:00 alan@lxorguk.ukuu.org.uk # [PATCH] resync ATI PCI idents into base kernel # # include/linux/pci_ids.h # 2005/03/05 08:19:27-08:00 alan@lxorguk.ukuu.org.uk +11 -0 # resync ATI PCI idents into base kernel # # ChangeSet # 2005/03/07 13:50:06-08:00 alan@lxorguk.ukuu.org.uk # [PATCH] stallion ressurection, phase 1 # # This gets the stallion driver working again non-SMP. Patch by Wayne # Meissner # # Signed-off-by: Alan Cox # Signed-off-by: Linus Torvalds # # include/linux/stallion.h # 2005/03/05 07:41:16-08:00 alan@lxorguk.ukuu.org.uk +1 -1 # stallion ressurection, phase 1 # # drivers/char/stallion.c # 2005/03/05 07:32:33-08:00 alan@lxorguk.ukuu.org.uk +51 -71 # stallion ressurection, phase 1 # # ChangeSet # 2005/03/07 13:49:53-08:00 alan@lxorguk.ukuu.org.uk # [PATCH] PCI idents for PCnet32 fix # # Sorry forgot I made these constants # # include/linux/pci_ids.h # 2005/03/05 08:19:27-08:00 alan@lxorguk.ukuu.org.uk +4 -0 # PCI idents for PCnet32 fix # # ChangeSet # 2005/03/07 13:49:40-08:00 alan@lxorguk.ukuu.org.uk # [PATCH] Restore PWC driver # # PWC has a new maintainer (Luc Saillard) and also the various contentious # binary hooks removed and replaced with reverse engineering work. # # Please restore it to the kernel # # Alan # # Signed-off-by: Luc Saillard # Signed-off-by: Alan Cox # Signed-off-by: Linus Torvalds # # drivers/usb/media/pwc/pwc.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +278 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc-uncompress.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +41 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc-uncompress.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +147 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc-timon.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +61 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc-timon.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +1446 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc-nala.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +66 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc-misc.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +140 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc-kiara.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +45 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc-kiara.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +891 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc-ioctl.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +292 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc-if.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +2211 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc-dec23.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +58 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc-dec23.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +623 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc-dec1.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +36 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc-dec1.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +42 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc-ctrl.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +1630 -0 # Restore PWC driver # # drivers/usb/media/pwc/philips.txt # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +236 -0 # Restore PWC driver # # drivers/usb/media/pwc/Makefile # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +20 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc.h # # drivers/usb/media/pwc/pwc-uncompress.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc-uncompress.h # # drivers/usb/media/pwc/pwc-uncompress.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc-uncompress.c # # drivers/usb/media/pwc/pwc-timon.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc-timon.h # # drivers/usb/media/pwc/pwc-timon.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc-timon.c # # drivers/usb/media/pwc/pwc-nala.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc-nala.h # # drivers/usb/media/pwc/pwc-misc.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc-misc.c # # drivers/usb/media/pwc/pwc-kiara.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc-kiara.h # # drivers/usb/media/pwc/pwc-kiara.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc-kiara.c # # drivers/usb/media/pwc/pwc-ioctl.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc-ioctl.h # # drivers/usb/media/pwc/pwc-if.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc-if.c # # drivers/usb/media/pwc/pwc-dec23.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc-dec23.h # # drivers/usb/media/pwc/pwc-dec23.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc-dec23.c # # drivers/usb/media/pwc/pwc-dec1.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc-dec1.h # # drivers/usb/media/pwc/pwc-dec1.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc-dec1.c # # drivers/usb/media/pwc/pwc-ctrl.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc-ctrl.c # # drivers/usb/media/pwc/philips.txt # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/philips.txt # # drivers/usb/media/pwc/Makefile # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/Makefile # # drivers/usb/media/pwc/ChangeLog # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +143 -0 # Restore PWC driver # # drivers/usb/media/Makefile # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +1 -0 # Restore PWC driver # # drivers/usb/media/Kconfig # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +36 -0 # Restore PWC driver # # drivers/usb/media/pwc/ChangeLog # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/ChangeLog # # ChangeSet # 2005/03/07 13:49:26-08:00 alan@lxorguk.ukuu.org.uk # [PATCH] Add ATP88x support to the ATP870U driver (Vendor patch) # # Patch-by: ARTOP Corp. # # Basically this adds the small bits for the new card and makes one set of items # an array because the new card is multi-channel. # # Signed-off-by: Alan Cox # Signed-off-by: Linus Torvalds # # include/linux/pci_ids.h # 2005/03/05 08:19:27-08:00 alan@lxorguk.ukuu.org.uk +3 -0 # Add ATP88x support to the ATP870U driver (Vendor patch) # # drivers/scsi/atp870u.h # 2005/03/05 08:14:06-08:00 alan@lxorguk.ukuu.org.uk +53 -39 # Add ATP88x support to the ATP870U driver (Vendor patch) # # drivers/scsi/atp870u.c # 2005/03/05 08:14:06-08:00 alan@lxorguk.ukuu.org.uk +1845 -714 # Add ATP88x support to the ATP870U driver (Vendor patch) # # drivers/scsi/Kconfig # 2005/03/05 08:14:25-08:00 alan@lxorguk.ukuu.org.uk +2 -2 # Add ATP88x support to the ATP870U driver (Vendor patch) # # ChangeSet # 2005/03/07 13:49:13-08:00 alan@lxorguk.ukuu.org.uk # [PATCH] Fibre attached pcnet/32 # # The current driver does workarounds for errata that do not work with # fibre attached devices. This patch avoids doing the workaround on the # only known fibre attach pcnet/32 hardware. All handling is automated on # pci sub-ids # # Patch by: Guido Guenther # Signed-off-by: Alan Cox # Signed-off-by: Linus Torvalds # # drivers/net/pcnet32.c # 2005/03/05 08:12:01-08:00 alan@lxorguk.ukuu.org.uk +25 -19 # Fibre attached pcnet/32 # # ChangeSet # 2005/03/07 13:49:00-08:00 alan@lxorguk.ukuu.org.uk # [PATCH] Document a "don't do that" case for the tty layer # # Documentation/tty.txt # 2005/03/05 07:30:59-08:00 alan@lxorguk.ukuu.org.uk +5 -0 # Document a "don't do that" case for the tty layer # # ChangeSet # 2005/03/07 13:34:58-08:00 willy@parisc-linux.org # [PATCH] PA-RISC Makefile updates # # - Support sparse # - Use CONFIG_64BIT instead of CONFIG_PARISC64 # - Find palo in /sbin even if it's not in our $PATH # # Signed-off-by: Randolph Chung # Signed-off-by: Matthew Wilcox # Signed-off-by: Linus Torvalds # # arch/parisc/Makefile # 2005/03/02 03:25:23-08:00 willy@parisc-linux.org +10 -3 # PA-RISC Makefile updates # # ChangeSet # 2005/03/07 13:34:43-08:00 willy@parisc-linux.org # [PATCH] PA-RISC Kconfig updates # # - Use def_bool where possible # - Eliminate PARISC64 # # Signed-off-by: Matthew Wilcox # Signed-off-by: Linus Torvalds # # arch/parisc/Kconfig # 2005/03/02 03:25:23-08:00 willy@parisc-linux.org +8 -16 # PA-RISC Kconfig updates # # ChangeSet # 2005/03/07 13:34:29-08:00 willy@parisc-linux.org # [PATCH] Update PA-RISC IOSAPIC driver # # - Fix all ioremap abuse noticed by CONFIG_DEBUG_IOREMAP on an N4000. # - F_EXTEND doesn't do what I thought it did on a 32-bit box. # - New calling convention for txn_alloc_irq() # - Replace CONFIG_PARISC64 with CONFIG_64BIT # - Ensure alignment of the irt buffer to 8 bytes even when slab debugging # is enabled # # Signed-off-by: Matthew Wilcox # Signed-off-by: Linus Torvalds # # drivers/parisc/iosapic.c # 2005/03/02 03:25:37-08:00 willy@parisc-linux.org +95 -137 # Update PA-RISC IOSAPIC driver # # ChangeSet # 2005/03/07 13:34:15-08:00 willy@parisc-linux.org # [PATCH] Update PA-RISC IOMMU code # # - The pdc_io_reset_devices() call necessary for USB keyboard kills the # serial console. Use a test that seems to work for both. # - Don't bounce >4G buffers on machines with IOMMU # - Remove ASSERT code and cleanup iomem * related warnings # - Fix comment that was pointing to the old file location # - Expand comment about PDC reset to describe broken GFX+USB console at # powerup by direct linux to serial console # - Fix all ioremap abuse noticed by CONFIG_DEBUG_IOREMAP on an N4000 # - Remove casts from "READ_REG" and "WRITE_REG" macro # - Set D4 and DD bits in IOC_CTRL # - Allow all memory in machine to be in-flight DMA at once, up to 4GB # # Signed-off-by: Grant Grundler # Signed-off-by: Matthew Wilcox # Signed-off-by: Linus Torvalds # # drivers/parisc/sba_iommu.c # 2005/03/02 03:25:38-08:00 willy@parisc-linux.org +141 -189 # Update PA-RISC IOMMU code # # ChangeSet # 2005/03/07 13:34:01-08:00 willy@parisc-linux.org # [PATCH] Update PA-RISC PCI host adapter # # - Use CONFIG_64BIT instead of CONFIG_PARISC64 # - Rename lba_cfg_ops to elroy_cfg_ops # - Don't check for a non-1,2 or 4 size in the cfg_ops # - Call LBA_CFG_ADDR_SETUP instead of LBA_CFG_TR4_ADDR_SETUP in elroy_cfg_ops # - Don't read back from LBA_PCI_CFG_ADDR in LBA_CFG_TR4_ADDR_SETUP # - Remove LBA_FLAG_NO_DMA_DURING_CFG since it's always set for elroy_cfg_ops # - Remove LBA_TR4PLUS since we no longer need to test for it. # - Inline lba_common_init() into lba_driver_probe() # - Move TR2.1 check into an elroy-only path # - Check for LBAs that aren't Elroy, Mercury or Quicksilver. # - Remove all casts to 'int' in the driver, got rid of some unnecessary parens # and deleted the obsolete part of a comment. # - Return -EINVAL for config space >255 # - Always return 0 on config read success # - Remove definitions of TRUE and FALSE # - ioremap fix for port-io on non-PAT machines # - Remove the bad casts from the register accessors # - With those gone, I could see the piop_base needed to be remapped. # - Fix all ioremap abuse noticed by CONFIG_DEBUG_IOREMAP on an N4000. # # Signed-off-by: Grant Grundler # Signed-off-by: Matthew Wilcox # Signed-off-by: Linus Torvalds # # drivers/parisc/lba_pci.c # 2005/03/02 03:25:37-08:00 willy@parisc-linux.org +211 -325 # Update PA-RISC PCI host adapter # # ChangeSet # 2005/03/07 13:33:46-08:00 willy@parisc-linux.org # [PATCH] PA-RISC defconfig update # # Update a500_defconfig # Remove n4000_defconfig as a500_defconfig is now suitable for both boxes # # Signed-off-by: Matthew Wilcox # Signed-off-by: Linus Torvalds # # arch/parisc/configs/a500_defconfig # 2005/03/02 03:25:23-08:00 willy@parisc-linux.org +46 -18 # PA-RISC defconfig update # # BitKeeper/deleted/.del-n4000_defconfig~f54e9fd42d2c0c9c # 2005/03/07 13:33:37-08:00 willy@parisc-linux.org +0 -0 # Delete: arch/parisc/configs/n4000_defconfig # # ChangeSet # 2005/03/07 13:33:32-08:00 willy@parisc-linux.org # [PATCH] ALSA Harmony sound driver for PA-RISC # # ALSA Harmony rewrite # # Signed-Off-By: Kyle McMartin # Signed-off-by: Stuart Brady # Signed-off-by: Matthew Wilcox # Signed-off-by: Linus Torvalds # # sound/parisc/harmony.h # 2005/03/02 03:25:14-08:00 willy@parisc-linux.org +151 -0 # ALSA Harmony sound driver for PA-RISC # # sound/parisc/harmony.c # 2005/03/02 03:26:02-08:00 willy@parisc-linux.org +730 -885 # ALSA Harmony sound driver for PA-RISC # # sound/parisc/Kconfig # 2005/03/02 03:26:01-08:00 willy@parisc-linux.org +1 -1 # ALSA Harmony sound driver for PA-RISC # # MAINTAINERS # 2005/03/02 03:25:15-08:00 willy@parisc-linux.org +7 -0 # ALSA Harmony sound driver for PA-RISC # # sound/parisc/harmony.h # 2005/03/02 03:25:14-08:00 willy@parisc-linux.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/sound/parisc/harmony.h # # ChangeSet # 2005/03/07 13:33:16-08:00 willy@parisc-linux.org # [PATCH] PA-RISC PDC stable storage driver # # Add PDC stable storage driver. Also reorganise PA-RISC Kconfig a little. # # Signed-off-by: Thibaut VARENE # Signed-off-by: Matthew Wilcox # Signed-off-by: Linus Torvalds # # drivers/parisc/pdc_stable.c # 2005/03/02 03:24:55-08:00 willy@parisc-linux.org +735 -0 # PA-RISC PDC stable storage driver # # drivers/parisc/Makefile # 2005/03/02 03:25:37-08:00 willy@parisc-linux.org +1 -0 # PA-RISC PDC stable storage driver # # drivers/parisc/Kconfig # 2005/03/02 03:25:37-08:00 willy@parisc-linux.org +21 -4 # PA-RISC PDC stable storage driver # # drivers/parisc/pdc_stable.c # 2005/03/02 03:24:55-08:00 willy@parisc-linux.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/parisc/pdc_stable.c # # ChangeSet # 2005/03/07 13:33:01-08:00 willy@parisc-linux.org # [PATCH] Convert from a struct dev to a firmware hwpath # # PA-RISC firmware needs a hwpath which can be constructed from a pci_dev # or a parisc_device. Previously we've known what type of device we had, # but when using sysfs we have to figure it out. # # Signed-off-by: Thibaut VARENE # Signed-off-by: Linus Torvalds # # include/asm-parisc/hardware.h # 2005/03/02 03:25:51-08:00 willy@parisc-linux.org +1 -0 # Convert from a struct dev to a firmware hwpath # # arch/parisc/kernel/drivers.c # 2005/03/02 03:25:23-08:00 willy@parisc-linux.org +19 -1 # Convert from a struct dev to a firmware hwpath # # ChangeSet # 2005/03/07 13:32:46-08:00 willy@parisc-linux.org # [PATCH] Convert PARISC64 to 64BIT # # More CONFIG_PARISC64 to CONFIG_64BIT conversion # # Signed-off-by: Matthew Wilcox # Signed-off-by: Linus Torvalds # # arch/parisc/kernel/vmlinux.lds.S # 2005/03/02 03:25:26-08:00 willy@parisc-linux.org +4 -4 # Convert PARISC64 to 64BIT # # arch/parisc/kernel/perf_asm.S # 2005/03/02 03:25:25-08:00 willy@parisc-linux.org +2 -2 # Convert PARISC64 to 64BIT # # arch/parisc/kernel/pdc_chassis.c # 2005/03/02 03:25:25-08:00 willy@parisc-linux.org +2 -2 # Convert PARISC64 to 64BIT # # arch/parisc/kernel/Makefile # 2005/03/02 03:25:23-08:00 willy@parisc-linux.org +2 -2 # Convert PARISC64 to 64BIT # # ChangeSet # 2005/03/07 13:32:32-08:00 willy@parisc-linux.org # [PATCH] GCC 3.4 fixes for PA-RISC parport support # # - Move include/asm/parport_gsc.h to drivers/parport/ # - Fix gcc 3.4 compilation (redefined extern inline functions are not # considered for inlining) # # From: Joel Soete # Signed-off-by: Grant Grundler # Signed-off-by: Matthew Wilcox # Signed-off-by: Linus Torvalds # # drivers/parport/parport_gsc.h # 2005/01/19 12:49:36-08:00 willy@parisc-linux.org +52 -23 # GCC 3.4 fixes for PA-RISC parport support # # drivers/parport/parport_gsc.c # 2005/01/19 12:55:28-08:00 willy@parisc-linux.org +1 -90 # GCC 3.4 fixes for PA-RISC parport support # # ChangeSet # 2005/03/07 13:31:48-08:00 willy@parisc-linux.org # [PATCH] PA-RISC copy/clear_user_page improvements # # - Performance improvement to __clear_user_page_asm # - White space cleanup # - 64-bit version of copy_user_page_asm # - Add prefetching to copy_user_page_asm # - remove NOP and "bundle" comments # # Contributions from Joel Soete # Signed-off-by: Grant Grundler # Signed-off-by: Matthew Wilcox # Signed-off-by: Linus Torvalds # # arch/parisc/kernel/pacache.S # 2005/03/02 03:25:24-08:00 willy@parisc-linux.org +610 -524 # PA-RISC copy/clear_user_page improvements # # ChangeSet # 2005/03/07 09:34:59-08:00 herbert@gondor.apana.org.au # [IPSEC]: Kill redundant dst_release check in xfrm_dst_destroy # # Here's a trivial patch to get rid of a redundant check that I added # in patch 3/4. dst_release already checks for dst == NULL. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/xfrm/xfrm_policy.c # 2005/03/07 09:34:47-08:00 herbert@gondor.apana.org.au +1 -2 # [IPSEC]: Kill redundant dst_release check in xfrm_dst_destroy # # Here's a trivial patch to get rid of a redundant check that I added # in patch 3/4. dst_release already checks for dst == NULL. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/07 09:33:29-08:00 akpm@osdl.org # [ATALK]: linux/atalk.h needs net/sock.h # # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # include/linux/atalk.h # 2005/03/07 09:33:17-08:00 akpm@osdl.org +3 -0 # [ATALK]: linux/atalk.h needs net/sock.h # # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/07 09:32:25-08:00 herbert@gondor.apana.org.au # [IPSEC]: Get rid of dst_pmtu/ext2_header_len # # Here is a patch that replaces all occurrences of dst_pmtu in the TCP # stack. As a result we no longer need ext2_header_len. # # This has a nice synergetic effect with Arnaldo's latest change to # linux/tcp.h :) # # I'll be removing other users of dst->path/dst_pmtu next. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/tcp_ipv6.c # 2005/03/07 09:32:09-08:00 herbert@gondor.apana.org.au +3 -7 # [IPSEC]: Get rid of dst_pmtu/ext2_header_len # # Here is a patch that replaces all occurrences of dst_pmtu in the TCP # stack. As a result we no longer need ext2_header_len. # # This has a nice synergetic effect with Arnaldo's latest change to # linux/tcp.h :) # # I'll be removing other users of dst->path/dst_pmtu next. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/tcp_output.c # 2005/03/07 09:32:09-08:00 herbert@gondor.apana.org.au +5 -11 # [IPSEC]: Get rid of dst_pmtu/ext2_header_len # # Here is a patch that replaces all occurrences of dst_pmtu in the TCP # stack. As a result we no longer need ext2_header_len. # # This has a nice synergetic effect with Arnaldo's latest change to # linux/tcp.h :) # # I'll be removing other users of dst->path/dst_pmtu next. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/tcp_ipv4.c # 2005/03/07 09:32:09-08:00 herbert@gondor.apana.org.au +3 -7 # [IPSEC]: Get rid of dst_pmtu/ext2_header_len # # Here is a patch that replaces all occurrences of dst_pmtu in the TCP # stack. As a result we no longer need ext2_header_len. # # This has a nice synergetic effect with Arnaldo's latest change to # linux/tcp.h :) # # I'll be removing other users of dst->path/dst_pmtu next. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/linux/tcp.h # 2005/03/07 09:32:09-08:00 herbert@gondor.apana.org.au +4 -6 # [IPSEC]: Get rid of dst_pmtu/ext2_header_len # # Here is a patch that replaces all occurrences of dst_pmtu in the TCP # stack. As a result we no longer need ext2_header_len. # # This has a nice synergetic effect with Arnaldo's latest change to # linux/tcp.h :) # # I'll be removing other users of dst->path/dst_pmtu next. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/07 09:31:04-08:00 herbert@gondor.apana.org.au # [IPSEC]: Check dst validity harder in xfrm_bundle_ok # # There is another bug in xfrm_bundle_ok where I forgot to # check the validity of xdst->route. In fact, the check # on dst->path isn't strong enough either. For IPv6 entries, # dst->path->obsolete is always negative until you call # ipv6_dst_check. So we really need to do that here. # # Here's the patch to fix those two problems. Yes I know # my dst_check implementation is lame. I'll come back and # fix up all the dst_check functions by moving their dst_release # calls out. It proves that you were right in that IPv6 dst # leak thread :) # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/xfrm/xfrm_policy.c # 2005/03/07 09:30:52-08:00 herbert@gondor.apana.org.au +3 -1 # [IPSEC]: Check dst validity harder in xfrm_bundle_ok # # There is another bug in xfrm_bundle_ok where I forgot to # check the validity of xdst->route. In fact, the check # on dst->path isn't strong enough either. For IPv6 entries, # dst->path->obsolete is always negative until you call # ipv6_dst_check. So we really need to do that here. # # Here's the patch to fix those two problems. Yes I know # my dst_check implementation is lame. I'll come back and # fix up all the dst_check functions by moving their dst_release # calls out. It proves that you were right in that IPv6 dst # leak thread :) # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/net/dst.h # 2005/03/07 09:30:52-08:00 herbert@gondor.apana.org.au +9 -0 # [IPSEC]: Check dst validity harder in xfrm_bundle_ok # # There is another bug in xfrm_bundle_ok where I forgot to # check the validity of xdst->route. In fact, the check # on dst->path isn't strong enough either. For IPv6 entries, # dst->path->obsolete is always negative until you call # ipv6_dst_check. So we really need to do that here. # # Here's the patch to fix those two problems. Yes I know # my dst_check implementation is lame. I'll come back and # fix up all the dst_check functions by moving their dst_release # calls out. It proves that you were right in that IPv6 dst # leak thread :) # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/07 01:52:19-05:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/linux-2.6 # into pobox.com:/garz/repo/libata-dev/remove-one-fix # # drivers/scsi/libata-core.c # 2005/03/07 01:52:11-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/03/07 01:48:21-05:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/libata-dev/janitor # into pobox.com:/garz/repo/libata-2.6 # # drivers/scsi/sata_vsc.c # 2005/03/07 01:48:15-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/03/07 01:37:25-05:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/netdev-2.6/smc91x # into pobox.com:/garz/repo/net-drivers-2.6 # # drivers/net/Kconfig # 2005/03/07 01:37:22-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/03/07 01:35:21-05:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/netdev-2.6/s2io # into pobox.com:/garz/repo/net-drivers-2.6 # # drivers/net/s2io.c # 2005/03/07 01:35:18-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/03/07 01:33:21-05:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/netdev-2.6/pm_message_t # into pobox.com:/garz/repo/net-drivers-2.6 # # drivers/net/via-velocity.c # 2005/03/07 01:33:18-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/typhoon.c # 2005/03/07 01:33:18-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/tg3.c # 2005/03/07 01:33:18-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/eepro100.c # 2005/03/07 01:33:18-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/amd8111e.c # 2005/03/07 01:33:18-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/8139too.c # 2005/03/07 01:33:18-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/03/07 01:30:13-05:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/netdev-2.6/bonding # into pobox.com:/garz/repo/net-drivers-2.6 # # drivers/net/Kconfig # 2005/03/07 01:30:10-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/03/06 21:36:51-08:00 herbert@gondor.apana.org.au # [IPSEC]: Get metrics for xfrm_dst from top dst # # For the metrics other than MTU, we should also be getting it from # the top dst as opposed to the bottom dst. With this change, the # user is able to manipulate values such as advmss for individual # hosts behind a remote IPsec gateway. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/xfrm6_policy.c # 2005/03/06 21:36:27-08:00 herbert@gondor.apana.org.au +1 -1 # [IPSEC]: Get metrics for xfrm_dst from top dst # # For the metrics other than MTU, we should also be getting it from # the top dst as opposed to the bottom dst. With this change, the # user is able to manipulate values such as advmss for individual # hosts behind a remote IPsec gateway. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/xfrm4_policy.c # 2005/03/06 21:36:27-08:00 herbert@gondor.apana.org.au +1 -1 # [IPSEC]: Get metrics for xfrm_dst from top dst # # For the metrics other than MTU, we should also be getting it from # the top dst as opposed to the bottom dst. With this change, the # user is able to manipulate values such as advmss for individual # hosts behind a remote IPsec gateway. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/06 21:35:27-08:00 herbert@gondor.apana.org.au # [IPSEC]: Fix xfrm[46]_update_pmtu to update top dst # # Let's also fix IPsec PMTU storage. When we get an MTU update for an # xfrm_dst, it should be done to the top dst, not the bottom dst. # # For example, when we get a need-to-frag message for host C behind # a our IPsec peer B, we should be updating the dst entry for C and # not B as we do now. # # I've removed the boundary checks since the same checks are done # in ipv[46]/route.c already. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/xfrm6_policy.c # 2005/03/06 21:35:03-08:00 herbert@gondor.apana.org.au +3 -5 # [IPSEC]: Fix xfrm[46]_update_pmtu to update top dst # # Let's also fix IPsec PMTU storage. When we get an MTU update for an # xfrm_dst, it should be done to the top dst, not the bottom dst. # # For example, when we get a need-to-frag message for host C behind # a our IPsec peer B, we should be updating the dst entry for C and # not B as we do now. # # I've removed the boundary checks since the same checks are done # in ipv[46]/route.c already. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/xfrm4_policy.c # 2005/03/06 21:35:03-08:00 herbert@gondor.apana.org.au +2 -4 # [IPSEC]: Fix xfrm[46]_update_pmtu to update top dst # # Let's also fix IPsec PMTU storage. When we get an MTU update for an # xfrm_dst, it should be done to the top dst, not the bottom dst. # # For example, when we get a need-to-frag message for host C behind # a our IPsec peer B, we should be updating the dst entry for C and # not B as we do now. # # I've removed the boundary checks since the same checks are done # in ipv[46]/route.c already. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/06 21:34:23-08:00 herbert@gondor.apana.org.au # [IPSEC]: Use dst_mtu i n xfrm[46]_output # # There was a lot of fun in laying the foundations. Now it's time # to start using it. # # This patch fixes the calculations in xfrm[46]_output so that we don't # reject properly sized packets from the TCP stack. The previous # calculation is wrong because the xfrm overhead is not constant. # # After this I'll start cleaning stuff up. For example, tcp's # ext2_header_len and dst's path can both be removed. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/xfrm6_output.c # 2005/03/06 21:33:59-08:00 herbert@gondor.apana.org.au +1 -1 # [IPSEC]: Use dst_mtu i n xfrm[46]_output # # There was a lot of fun in laying the foundations. Now it's time # to start using it. # # This patch fixes the calculations in xfrm[46]_output so that we don't # reject properly sized packets from the TCP stack. The previous # calculation is wrong because the xfrm overhead is not constant. # # After this I'll start cleaning stuff up. For example, tcp's # ext2_header_len and dst's path can both be removed. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/xfrm4_output.c # 2005/03/06 21:33:59-08:00 herbert@gondor.apana.org.au +1 -1 # [IPSEC]: Use dst_mtu i n xfrm[46]_output # # There was a lot of fun in laying the foundations. Now it's time # to start using it. # # This patch fixes the calculations in xfrm[46]_output so that we don't # reject properly sized packets from the TCP stack. The previous # calculation is wrong because the xfrm overhead is not constant. # # After this I'll start cleaning stuff up. For example, tcp's # ext2_header_len and dst's path can both be removed. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/net/dst.h # 2005/03/06 21:33:59-08:00 herbert@gondor.apana.org.au +10 -0 # [IPSEC]: Use dst_mtu i n xfrm[46]_output # # There was a lot of fun in laying the foundations. Now it's time # to start using it. # # This patch fixes the calculations in xfrm[46]_output so that we don't # reject properly sized packets from the TCP stack. The previous # calculation is wrong because the xfrm overhead is not constant. # # After this I'll start cleaning stuff up. For example, tcp's # ext2_header_len and dst's path can both be removed. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/06 21:31:52-08:00 herbert@gondor.apana.org.au # [IPSEC]: Store MTU at each xfrm_dst # # Finally this is the patch that sets the MTU values of each xfrm_dst # and keeps it up-to-date. # # To recap, at this point we've obtained accurate MTU values at each # xfrm_dst. The next step would be to start using it as # dst_pmtu(xfrm_dst). # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/xfrm/xfrm_policy.c # 2005/03/06 21:31:30-08:00 herbert@gondor.apana.org.au +63 -2 # [IPSEC]: Store MTU at each xfrm_dst # # Finally this is the patch that sets the MTU values of each xfrm_dst # and keeps it up-to-date. # # To recap, at this point we've obtained accurate MTU values at each # xfrm_dst. The next step would be to start using it as # dst_pmtu(xfrm_dst). # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/xfrm6_policy.c # 2005/03/06 21:31:30-08:00 herbert@gondor.apana.org.au +2 -0 # [IPSEC]: Store MTU at each xfrm_dst # # Finally this is the patch that sets the MTU values of each xfrm_dst # and keeps it up-to-date. # # To recap, at this point we've obtained accurate MTU values at each # xfrm_dst. The next step would be to start using it as # dst_pmtu(xfrm_dst). # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/xfrm4_policy.c # 2005/03/06 21:31:30-08:00 herbert@gondor.apana.org.au +2 -0 # [IPSEC]: Store MTU at each xfrm_dst # # Finally this is the patch that sets the MTU values of each xfrm_dst # and keeps it up-to-date. # # To recap, at this point we've obtained accurate MTU values at each # xfrm_dst. The next step would be to start using it as # dst_pmtu(xfrm_dst). # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/net/xfrm.h # 2005/03/06 21:31:30-08:00 herbert@gondor.apana.org.au +3 -0 # [IPSEC]: Store MTU at each xfrm_dst # # Finally this is the patch that sets the MTU values of each xfrm_dst # and keeps it up-to-date. # # To recap, at this point we've obtained accurate MTU values at each # xfrm_dst. The next step would be to start using it as # dst_pmtu(xfrm_dst). # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/06 21:27:44-08:00 herbert@gondor.apana.org.au # [IPSEC]: Add route element to xfrm_dst # # This patch adds a pointer to the route corresponding to the specific # flow over the SA of an xfrm_dst that's being used. # # It also sets the next pointer of each xfrm_dst to the one above it. # This allows to traverse the list upwards from the bottom. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/xfrm/xfrm_policy.c # 2005/03/06 21:27:20-08:00 herbert@gondor.apana.org.au +5 -0 # [IPSEC]: Add route element to xfrm_dst # # This patch adds a pointer to the route corresponding to the specific # flow over the SA of an xfrm_dst that's being used. # # It also sets the next pointer of each xfrm_dst to the one above it. # This allows to traverse the list upwards from the bottom. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/xfrm6_policy.c # 2005/03/06 21:27:20-08:00 herbert@gondor.apana.org.au +33 -17 # [IPSEC]: Add route element to xfrm_dst # # This patch adds a pointer to the route corresponding to the specific # flow over the SA of an xfrm_dst that's being used. # # It also sets the next pointer of each xfrm_dst to the one above it. # This allows to traverse the list upwards from the bottom. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/xfrm4_policy.c # 2005/03/06 21:27:20-08:00 herbert@gondor.apana.org.au +33 -15 # [IPSEC]: Add route element to xfrm_dst # # This patch adds a pointer to the route corresponding to the specific # flow over the SA of an xfrm_dst that's being used. # # It also sets the next pointer of each xfrm_dst to the one above it. # This allows to traverse the list upwards from the bottom. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/net/xfrm.h # 2005/03/06 21:27:20-08:00 herbert@gondor.apana.org.au +1 -0 # [IPSEC]: Add route element to xfrm_dst # # This patch adds a pointer to the route corresponding to the specific # flow over the SA of an xfrm_dst that's being used. # # It also sets the next pointer of each xfrm_dst to the one above it. # This allows to traverse the list upwards from the bottom. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/06 21:24:19-08:00 herbert@gondor.apana.org.au # [IPSEC]: Add xfrm_state_mtu() # # This patch introduces the function xfrm_state_mtu which calculates # the MTU under a specific SA. This function can be simplified once # we get rid all other uses of get_max_size as we can move the calculation # into the invidual SA type. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/xfrm/xfrm_state.c # 2005/03/06 21:23:53-08:00 herbert@gondor.apana.org.au +30 -0 # [IPSEC]: Add xfrm_state_mtu() # # This patch introduces the function xfrm_state_mtu which calculates # the MTU under a specific SA. This function can be simplified once # we get rid all other uses of get_max_size as we can move the calculation # into the invidual SA type. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/net/xfrm.h # 2005/03/06 21:23:53-08:00 herbert@gondor.apana.org.au +1 -0 # [IPSEC]: Add xfrm_state_mtu() # # This patch introduces the function xfrm_state_mtu which calculates # the MTU under a specific SA. This function can be simplified once # we get rid all other uses of get_max_size as we can move the calculation # into the invidual SA type. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/06 21:03:21-08:00 herbert@gondor.apana.org.au # [CRYPTO]: Mark myself as co-maintainer. # # James is stepping down for a while. # # Signed-off-by: David S. Miller # # MAINTAINERS # 2005/03/06 21:02:57-08:00 herbert@gondor.apana.org.au +2 -3 # [CRYPTO]: Mark myself as co-maintainer. # # James is stepping down for a while. # # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/06 17:25:39-08:00 sfr@canb.auug.org.au # [PATCH] Consolidate compat_sys_waitid # # This patch does: # - consolidate the three implementations of compat_sys_waitid # (some were called sys32_waitid). # - adds sys_waitid syscall to ppc # - adds sys_waitid and compat_sys_waitid syscalls to ppc64 # # I have left PARISC and MIPS to their own devices (by request). # # Signed-off-by: Stephen Rothwell # Signed-off-by: Linus Torvalds # # kernel/compat.c # 2005/03/06 15:58:58-08:00 sfr@canb.auug.org.au +31 -0 # Consolidate compat_sys_waitid # # include/linux/compat.h # 2005/03/06 15:58:58-08:00 sfr@canb.auug.org.au +6 -1 # Consolidate compat_sys_waitid # # include/asm-ppc64/unistd.h # 2005/03/06 15:58:58-08:00 sfr@canb.auug.org.au +2 -1 # Consolidate compat_sys_waitid # # include/asm-ppc/unistd.h # 2005/03/06 15:58:58-08:00 sfr@canb.auug.org.au +2 -1 # Consolidate compat_sys_waitid # # arch/x86_64/ia32/sys_ia32.c # 2005/03/06 15:58:58-08:00 sfr@canb.auug.org.au +0 -26 # Consolidate compat_sys_waitid # # arch/x86_64/ia32/ia32entry.S # 2005/03/06 15:58:58-08:00 sfr@canb.auug.org.au +1 -1 # Consolidate compat_sys_waitid # # arch/sparc64/kernel/sys_sparc32.c # 2005/03/06 15:58:58-08:00 sfr@canb.auug.org.au +0 -31 # Consolidate compat_sys_waitid # # arch/ppc64/kernel/misc.S # 2005/03/06 15:58:58-08:00 sfr@canb.auug.org.au +2 -0 # Consolidate compat_sys_waitid # # arch/ppc/kernel/misc.S # 2005/03/06 15:58:58-08:00 sfr@canb.auug.org.au +1 -0 # Consolidate compat_sys_waitid # # arch/ia64/ia32/sys_ia32.c # 2005/03/06 15:58:57-08:00 sfr@canb.auug.org.au +0 -26 # Consolidate compat_sys_waitid # # arch/ia64/ia32/ia32_entry.S # 2005/03/06 15:58:57-08:00 sfr@canb.auug.org.au +1 -1 # Consolidate compat_sys_waitid # # ChangeSet # 2005/03/06 17:04:35-08:00 torvalds@ppc970.osdl.org # Merge bk://gkernel.bkbits.net/net-drivers-2.6 # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # MAINTAINERS # 2005/03/06 17:04:30-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2005/03/06 17:03:25-08:00 torvalds@ppc970.osdl.org # Merge bk://bk.arm.linux.org.uk/linux-2.6-rmk # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # include/asm-arm/pgtable.h # 2005/03/06 17:03:21-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2005/03/06 16:59:24-08:00 torvalds@ppc970.osdl.org # Merge bk://linux-dj.bkbits.net/agpgart # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # include/linux/agp_backend.h # 2005/03/06 16:59:19-08:00 torvalds@ppc970.osdl.org +0 -1 # Auto merged # # drivers/char/agp/sis-agp.c # 2005/03/06 16:59:19-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # drivers/char/agp/generic.c # 2005/03/06 16:59:19-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2005/03/06 16:58:12-08:00 torvalds@ppc970.osdl.org # Merge http://jfs.bkbits.net/linux-2.5 # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # MAINTAINERS # 2005/03/06 16:58:07-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2005/03/06 16:56:53-08:00 torvalds@ppc970.osdl.org # Merge bk://kernel.bkbits.net/davem/net-2.6 # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # drivers/net/tg3.c # 2005/03/06 16:56:48-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2005/03/06 16:55:28-08:00 torvalds@ppc970.osdl.org # Merge bk://kernel.bkbits.net/davem/flush_cache_page-2.6 # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # mm/rmap.c # 2005/03/06 16:55:23-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # mm/memory.c # 2005/03/06 16:55:23-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # mm/fremap.c # 2005/03/06 16:55:23-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2005/03/06 16:52:04-08:00 dan@debian.org # [PATCH] x86: fix TF bit corner case with ptrace and signals # # If a debugger set the TF bit, make sure to clear it when creating a # signal context. Otherwise, TF will be incorrectly restored by # sigreturn. # # Signed-off-by: Daniel Jacobowitz # Signed-off-by: Linus Torvalds # # arch/i386/kernel/signal.c # 2005/03/06 12:36:41-08:00 dan@debian.org +12 -0 # x86: fix TF bit corner case with ptrace and signals # # ChangeSet # 2005/03/06 18:11:09-05:00 davej@redhat.com # [AGPGART] vfree() checking cleanups # # generic.c vfree() checking cleanups. # # Signed-off by: James Lamanna # Signed-off-by: Domen Puncer # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/03/06 18:11:00-05:00 davej@redhat.com +1 -3 # [AGPGART] vfree() checking cleanups # # generic.c vfree() checking cleanups. # # Signed-off by: James Lamanna # Signed-off-by: Domen Puncer # Signed-off-by: Dave Jones # # ChangeSet # 2005/03/06 23:07:50+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2515/1: S3C2410 - allow serial to use fclk on s3c2440 # # Patch from Ben Dooks # # This patch extends the s3c2410 serial driver to allow it # to use fclk and correctly determine the uart dividers. The # necessary defines are added to the serial headers as well. # Also modified is the header to point at the current # Simtec linux pages, as well as extend the copyright. # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # include/asm-arm/arch-s3c2410/regs-serial.h # 2005/03/06 12:59:10+00:00 ben-linux@org.rmk.(none) +5 -0 # [PATCH] 2515/1: S3C2410 - allow serial to use fclk on s3c2440 # # drivers/serial/s3c2410.c # 2005/03/06 14:36:49+00:00 ben-linux@org.rmk.(none) +116 -25 # [PATCH] 2515/1: S3C2410 - allow serial to use fclk on s3c2440 # # ChangeSet # 2005/03/06 22:33:13+00:00 rmk@flint.arm.linux.org.uk # [ARM] Update mach-types from website. # # Signed-off-by: Russell King # # arch/arm/tools/mach-types # 2005/03/06 22:28:32+00:00 rmk@flint.arm.linux.org.uk +44 -3 # Update from web site. # # ChangeSet # 2005/03/06 19:53:37+00:00 rmk@flint.arm.linux.org.uk # [ARM] Simplify /proc/driver/rtc procfs interface. # # The read method doesn't need to calculate eof/start offsets. # # Signed-off-by: Russell King # # arch/arm/common/rtctime.c # 2005/03/06 19:49:31+00:00 rmk@flint.arm.linux.org.uk +1 -8 # Simplify /proc/driver/rtc procfs interface. # # The read method doesn't need to calculate eof/start offsets. # # ChangeSet # 2005/03/06 19:05:01+00:00 rmk@flint.arm.linux.org.uk # [ARM] Add validation function for struct rtc_time # # Signed-off-by: Russell King # # include/asm-arm/rtc.h # 2005/03/06 19:00:53+00:00 rmk@flint.arm.linux.org.uk +1 -0 # Add new function prototype for rtc_valid_tm() # # arch/arm/common/rtctime.c # 2005/03/06 19:00:52+00:00 rmk@flint.arm.linux.org.uk +20 -9 # Add rtc_valid_tm() to check validity of a struct rtc_time. # Move check for valid rtc_time into rtc_set_time. # # ChangeSet # 2005/03/05 21:23:33-08:00 lethal@linux-sh.org # [SH]: Cache flush simplifications after flush_cache_page() arg change. # # Signed-off-by: David S. Miller # # arch/sh64/mm/cache.c # 2005/03/05 21:23:02-08:00 lethal@linux-sh.org +1 -6 # [SH]: Cache flush simplifications after flush_cache_page() arg change. # # arch/sh/mm/cache-sh4.c # 2005/03/05 21:23:02-08:00 lethal@linux-sh.org +1 -2 # [SH]: Cache flush simplifications after flush_cache_page() arg change. # # ChangeSet # 2005/03/05 21:15:21-08:00 davem@picasso.davemloft.net # Merge davem@nuts:/disk1/BK/flush_cache_page-2.6 # into picasso.davemloft.net:/home/davem/src/BK/flush_cache_page-2.6 # # mm/rmap.c # 2005/03/05 21:15:17-08:00 davem@picasso.davemloft.net +0 -0 # Auto merged # # mm/memory.c # 2005/03/05 21:15:17-08:00 davem@picasso.davemloft.net +0 -0 # Auto merged # # include/asm-ppc64/cacheflush.h # 2005/03/05 21:15:17-08:00 davem@picasso.davemloft.net +0 -0 # Auto merged # # include/asm-parisc/cacheflush.h # 2005/03/05 21:15:17-08:00 davem@picasso.davemloft.net +0 -0 # Auto merged # # include/asm-arm/cacheflush.h # 2005/03/05 21:15:17-08:00 davem@picasso.davemloft.net +0 -0 # Auto merged # # fs/binfmt_elf.c # 2005/03/05 21:15:17-08:00 davem@picasso.davemloft.net +0 -0 # Auto merged # # ChangeSet # 2005/03/05 20:52:11-08:00 davem@nuts.davemloft.net # Merge http://linux-mh.bkbits.net/bluetooth-2.6 # into nuts.davemloft.net:/disk1/BK/net-2.6 # # MAINTAINERS # 2005/03/05 20:51:58-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # ChangeSet # 2005/03/05 20:48:01-08:00 davem@picasso.davemloft.net # Merge davem@nuts:/disk1/BK/set_pte-2.6 # into picasso.davemloft.net:/home/davem/src/BK/set_pte-2.6 # # mm/swapfile.c # 2005/03/05 20:47:57-08:00 davem@picasso.davemloft.net +0 -0 # Auto merged # # mm/rmap.c # 2005/03/05 20:47:57-08:00 davem@picasso.davemloft.net +0 -0 # Auto merged # # mm/mremap.c # 2005/03/05 20:47:57-08:00 davem@picasso.davemloft.net +0 -0 # Auto merged # # mm/memory.c # 2005/03/05 20:47:57-08:00 davem@picasso.davemloft.net +0 -0 # Auto merged # # include/asm-arm/pgtable.h # 2005/03/05 20:47:56-08:00 davem@picasso.davemloft.net +0 -0 # Auto merged # # fs/exec.c # 2005/03/05 20:47:56-08:00 davem@picasso.davemloft.net +0 -0 # Auto merged # # arch/ppc64/mm/init.c # 2005/03/05 20:47:56-08:00 davem@picasso.davemloft.net +0 -0 # Auto merged # # arch/ppc64/mm/hugetlbpage.c # 2005/03/05 20:47:56-08:00 davem@picasso.davemloft.net +0 -0 # Auto merged # # ChangeSet # 2005/03/05 20:43:56-08:00 davem@nuts.davemloft.net # Merge nuts.davemloft.net:/disk1/BK/net-2.6.12 # into nuts.davemloft.net:/disk1/BK/net-2.6 # # net/ipv4/route.c # 2005/03/05 20:43:44-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # include/linux/random.h # 2005/03/05 20:43:43-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # drivers/net/ixgb/ixgb_main.c # 2005/03/05 20:43:43-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # drivers/net/e1000/e1000_main.c # 2005/03/05 20:43:43-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # drivers/char/random.c # 2005/03/05 20:43:43-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # ChangeSet # 2005/03/05 16:26:40-08:00 torvalds@evo.osdl.org # x86: make put_user() out-of-line # # This makes the resulting assembly not only easier to read, # it results in roughly a 0.5% savings in code size. # # Fixes from Richard Henderson for the original broken asm # constraints. # # arch/i386/lib/putuser.S # 2005/03/05 16:26:28-08:00 torvalds@evo.osdl.org +87 -0 # # include/asm-i386/uaccess.h # 2005/03/05 16:26:28-08:00 torvalds@evo.osdl.org +27 -13 # x86: make put_user() out-of-line # # arch/i386/lib/putuser.S # 2005/03/05 16:26:28-08:00 torvalds@evo.osdl.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/i386/lib/putuser.S # # arch/i386/lib/Makefile # 2005/03/05 16:26:28-08:00 torvalds@evo.osdl.org +1 -1 # x86: make put_user() out-of-line # # arch/i386/kernel/i386_ksyms.c # 2005/03/05 16:26:28-08:00 torvalds@evo.osdl.org +5 -0 # x86: make put_user() out-of-line # # ChangeSet # 2005/03/05 18:11:05-05:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/netdev-2.6/mips # into pobox.com:/garz/repo/net-drivers-2.6 # # drivers/net/s2io.c # 2005/03/05 18:11:02-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/Kconfig # 2005/03/05 18:11:02-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/03/05 18:10:00-05:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/netdev-2.6/sk98lin # into pobox.com:/garz/repo/net-drivers-2.6 # # drivers/net/sk98lin/skge.c # 2005/03/05 18:09:57-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/03/05 18:08:48-05:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/netdev-2.6/wan-fixes # into pobox.com:/garz/repo/net-drivers-2.6 # # MAINTAINERS # 2005/03/05 18:08:45-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/03/05 18:07:32-05:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/netdev-2.6/pcnet32 # into pobox.com:/garz/repo/net-drivers-2.6 # # include/linux/pci_ids.h # 2005/03/05 18:07:29-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/03/05 17:55:29-05:00 galak@freescale.com # [PATCH] initialize a spin lock in gianfar driver # # Initialize the mdio_lock spin lock in mii_info struct, which is otherwise # accessed prior to initialization. # # Signed-off-by: Jaka Mocnik # Signed-off-by: Kumar Gala # Signed-off-by: Jeff Garzik # # drivers/net/gianfar.c # 2005/03/05 00:03:27-05:00 galak@freescale.com +2 -0 # initialize a spin lock in gianfar driver # # ChangeSet # 2005/03/05 17:50:51-05:00 lethal@linux-sh.org # [PATCH] net: port smc91x to SH4-202 Microdev. # # Here is a patch that gets the smc91x driver working on the # SH4-202 Microdev board. # # Signed-off-by: Paul Mundt # Signed-off-by: Jeff Garzik # # drivers/net/smc91x.h # 2005/03/04 13:40:57-05:00 lethal@linux-sh.org +19 -0 # net: port smc91x to SH4-202 Microdev. # # drivers/net/Kconfig # 2005/03/04 13:40:57-05:00 lethal@linux-sh.org +1 -1 # net: port smc91x to SH4-202 Microdev. # # ChangeSet # 2005/03/05 13:26:50-08:00 torvalds@ppc970.osdl.org # Merge bk://gkernel.bkbits.net/net-drivers-2.6 # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # drivers/net/typhoon.c # 2005/03/05 13:26:45-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # drivers/net/Kconfig # 2005/03/05 13:26:45-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2005/03/05 09:37:01-08:00 yuasa@hh.iij4u.or.jp # [PATCH] mips: update CMU # # This patch updates cmu.c to get the resource by standard method. # # Signed-off-by: Yoichi Yuasa # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/mips/vr41xx/common/cmu.c # 2005/03/04 22:41:56-08:00 yuasa@hh.iij4u.or.jp +47 -20 # mips: update CMU # # arch/mips/pci/pci-vr41xx.c # 2005/03/04 22:41:56-08:00 yuasa@hh.iij4u.or.jp +1 -1 # mips: update CMU # # ChangeSet # 2005/03/05 09:36:48-08:00 yuasa@hh.iij4u.or.jp # [PATCH] mips: calculate clock at any time # # This patch changes bcu.c to calculate clock at any time. Because clock can # be changed. Moreover, EXPORT_SYMBOL_GPLs are added to it. # # Signed-off-by: Yoichi Yuasa # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-mips/vr41xx/vr41xx.h # 2005/03/04 22:41:55-08:00 yuasa@hh.iij4u.or.jp +1 -0 # mips: calculate clock at any time # # arch/mips/vr41xx/common/ksyms.c # 2005/03/04 22:41:55-08:00 yuasa@hh.iij4u.or.jp +0 -3 # mips: calculate clock at any time # # arch/mips/vr41xx/common/init.c # 2005/03/04 22:41:55-08:00 yuasa@hh.iij4u.or.jp +16 -1 # mips: calculate clock at any time # # arch/mips/vr41xx/common/bcu.c # 2005/03/04 22:41:55-08:00 yuasa@hh.iij4u.or.jp +10 -15 # mips: calculate clock at any time # # ChangeSet # 2005/03/05 09:36:33-08:00 yuasa@hh.iij4u.or.jp # [PATCH] mips: add TANBAC TB0219 base board driver # # This patch adds GPIO/LED/DIPSW driver for TANBAC TB0219. # # Signed-off-by: Yoichi Yuasa # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/tb0219.c # 2005/03/05 09:36:24-08:00 yuasa@hh.iij4u.or.jp +347 -0 # # drivers/char/Makefile # 2005/03/04 22:41:55-08:00 yuasa@hh.iij4u.or.jp +1 -0 # mips: add TANBAC TB0219 base board driver # # drivers/char/Kconfig # 2005/03/04 22:41:55-08:00 yuasa@hh.iij4u.or.jp +4 -0 # mips: add TANBAC TB0219 base board driver # # arch/mips/vr41xx/tanbac-tb0229/Makefile # 2005/03/04 22:41:55-08:00 yuasa@hh.iij4u.or.jp +0 -2 # mips: add TANBAC TB0219 base board driver # # arch/mips/Kconfig # 2005/03/04 22:41:55-08:00 yuasa@hh.iij4u.or.jp +0 -4 # mips: add TANBAC TB0219 base board driver # # drivers/char/tb0219.c # 2005/03/05 09:36:24-08:00 yuasa@hh.iij4u.or.jp +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/char/tb0219.c # # BitKeeper/deleted/.del-tb0219.c~8b2edbef490c5193 # 2005/03/05 09:36:24-08:00 yuasa@hh.iij4u.or.jp +0 -0 # Delete: arch/mips/vr41xx/tanbac-tb0229/tb0219.c # # ChangeSet # 2005/03/05 09:35:39-08:00 moilanen@austin.ibm.com # [PATCH] ppc64: offb remapped address # # The offb code did not take into account a remapped pci address. Adding in # the pci_mem_offset fixed a DSI in offb. # # Signed-off-by: Jake Moilanen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/offb.c # 2005/03/04 22:41:55-08:00 moilanen@austin.ibm.com +10 -1 # ppc64: offb remapped address # # ChangeSet # 2005/03/05 09:35:25-08:00 benh@kernel.crashing.org # [PATCH] ppc64: Fix zImage wrapper incorrect size to flush_cache() # # This patch fixes a bug in the ppc64 zImage wrapper causing it to pass an # incorrect size to flush_cache() when flushing the data and instruction # caches prior to jumping to the kernel entry. This causes crashes on # firmare environment that do strict MMU mapping only of actually allocated # areas # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/boot/main.c # 2005/03/04 22:41:55-08:00 benh@kernel.crashing.org +1 -1 # ppc64: Fix zImage wrapper incorrect size to flush_cache() # # ChangeSet # 2005/03/05 09:35:12-08:00 benh@kernel.crashing.org # [PATCH] ppc64: Fix thinko in prom_init.c # # (It's a real bug, but I suspect it doesn't trigger normally as we tend # to allocate the initrd low, but it should be fixed anyway). # # This patch fixes an error in prom_init.c in the check for the initrd # location vs. the memory allocation mecanism. # # Signed-off-by: Arnd Bergmann # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/prom_init.c # 2005/03/04 22:41:55-08:00 benh@kernel.crashing.org +1 -2 # ppc64: Fix thinko in prom_init.c # # ChangeSet # 2005/03/05 09:34:58-08:00 david@gibson.dropbear.id.au # [PATCH] ppc64: functions to reserve performance monitor hardware # # The PPC64 interrupt code includes a hook to call when an exception # from the performance monitor unit occurs. However, there's no way of # reserving the hook properly, so if more than one bit of code tries to # use it things will get ugly. Currently oprofile is the only user, but # there are likely to be more in future e.g. perfctr, if and when it # reaches a fit state for merging. # # This patch creates functions to reserve and release the performance # monitor hardware (including its interrupt), and makes oprofile use # them. It also creates a new arch/ppc64/kernel/pmc.c, in which we can # put any future helper functions for handling the performance monitor # counters. # # Signed-off-by: David Gibson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/pmc.h # 2005/03/04 22:41:55-08:00 david@gibson.dropbear.id.au +29 -0 # ppc64: functions to reserve performance monitor hardware # # include/asm-ppc64/pmc.h # 2005/03/04 22:41:55-08:00 david@gibson.dropbear.id.au +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/asm-ppc64/pmc.h # # arch/ppc64/oprofile/common.c # 2005/03/04 22:41:55-08:00 david@gibson.dropbear.id.au +7 -11 # ppc64: functions to reserve performance monitor hardware # # arch/ppc64/kernel/traps.c # 2005/03/04 22:41:55-08:00 david@gibson.dropbear.id.au +2 -12 # ppc64: functions to reserve performance monitor hardware # # arch/ppc64/kernel/pmc.c # 2005/03/04 22:41:55-08:00 david@gibson.dropbear.id.au +64 -0 # ppc64: functions to reserve performance monitor hardware # # arch/ppc64/kernel/Makefile # 2005/03/04 22:41:55-08:00 david@gibson.dropbear.id.au +1 -1 # ppc64: functions to reserve performance monitor hardware # # arch/ppc64/kernel/pmc.c # 2005/03/04 22:41:55-08:00 david@gibson.dropbear.id.au +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/pmc.c # # ChangeSet # 2005/03/05 09:34:42-08:00 olh@suse.de # [PATCH] ppc64: use vmlinux during make install on ppc64 # # make install passes the zImage to the installkernel script. When an initrd is # used, this script has to pull out the vmlinux from the zImage because yaboot # can not boot a zImage+initrd combo. It can only handle vmlinux+initrd or # zImage.initrd. Its simple to just pass the plain vmlinux instead. # # Signed-off-by: Olaf Hering # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/boot/install.sh # 2005/03/04 22:41:55-08:00 olh@suse.de +2 -1 # ppc64: use vmlinux during make install on ppc64 # # arch/ppc64/boot/Makefile # 2005/03/04 22:41:55-08:00 olh@suse.de +2 -2 # ppc64: use vmlinux during make install on ppc64 # # arch/ppc64/Makefile # 2005/03/04 22:41:55-08:00 olh@suse.de +9 -3 # ppc64: use vmlinux during make install on ppc64 # # ChangeSet # 2005/03/05 09:34:28-08:00 olh@suse.de # [PATCH] ppc64: disable HMT for RS64 cpus # # Hardware multithreading for RS64 cpus is currently broken. Anton sent me a # patch a few weeks ago, but it did not work. So just hide the config option # for the time being. # # Signed-off-by: Olaf Hering # Acked-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/Kconfig # 2005/03/04 22:41:54-08:00 olh@suse.de +4 -1 # ppc64: disable HMT for RS64 cpus # # ChangeSet # 2005/03/05 09:34:14-08:00 akpm@osdl.org # [PATCH] ppc64: generic hotplug cpu support fix # # Fix a false-positive from the smp_processor_id() debugging code. Idle threads # are per-cpu anwyay. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/idle.c # 2005/03/04 22:41:54-08:00 akpm@osdl.org +1 -1 # ppc64: generic hotplug cpu support fix # # ChangeSet # 2005/03/05 09:34:00-08:00 zwane@arm.linux.org.uk # [PATCH] ppc64: generic hotplug cpu support # # Patch provides a generic hotplug cpu implementation, with the only current # user being pmac. This doesn't replace real hotplug code as is currently # used by LPAR systems. Ben i can add the additional pmac specific code to # put the processor into a sleeping state seperately. Thanks to Nathan for # testing. # # Signed-off-by: Zwane Mwaikambo # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/smp.h # 2005/03/04 22:41:54-08:00 zwane@arm.linux.org.uk +8 -1 # ppc64: generic hotplug cpu support # # include/asm-ppc64/machdep.h # 2005/03/04 22:41:54-08:00 zwane@arm.linux.org.uk +1 -0 # ppc64: generic hotplug cpu support # # arch/ppc64/kernel/sysfs.c # 2005/03/04 22:41:54-08:00 zwane@arm.linux.org.uk +2 -4 # ppc64: generic hotplug cpu support # # arch/ppc64/kernel/smp.c # 2005/03/04 22:41:54-08:00 zwane@arm.linux.org.uk +80 -0 # ppc64: generic hotplug cpu support # # arch/ppc64/kernel/setup.c # 2005/03/04 22:41:54-08:00 zwane@arm.linux.org.uk +0 -3 # ppc64: generic hotplug cpu support # # arch/ppc64/kernel/pmac_smp.c # 2005/03/04 22:41:54-08:00 zwane@arm.linux.org.uk +5 -0 # ppc64: generic hotplug cpu support # # arch/ppc64/kernel/pmac_setup.c # 2005/03/04 22:41:54-08:00 zwane@arm.linux.org.uk +3 -0 # ppc64: generic hotplug cpu support # # arch/ppc64/kernel/pSeries_setup.c # 2005/03/04 22:41:54-08:00 zwane@arm.linux.org.uk +3 -2 # ppc64: generic hotplug cpu support # # arch/ppc64/kernel/irq.c # 2005/03/04 22:41:54-08:00 zwane@arm.linux.org.uk +29 -0 # ppc64: generic hotplug cpu support # # arch/ppc64/kernel/idle.c # 2005/03/04 23:17:15-08:00 zwane@arm.linux.org.uk +4 -0 # ppc64: generic hotplug cpu support # # arch/ppc64/Kconfig # 2005/03/04 23:17:15-08:00 zwane@arm.linux.org.uk +1 -1 # ppc64: generic hotplug cpu support # # ChangeSet # 2005/03/05 09:33:46-08:00 akpm@osdl.org # [PATCH] ppc64-implement-a-vdso-and-use-it-for-signal-trampoline gas workaround # # I cannot find a version of binutils which doesn't either do # # arch/ppc64/kernel/vdso32/gettimeofday.S: Assembler messages: # arch/ppc64/kernel/vdso32/gettimeofday.S:33: Error: syntax error; found `@' but expected `,' # # or # # arch/ppc64/kernel/vdso32/gettimeofday.S: Assembler messages: # arch/ppc64/kernel/vdso32/gettimeofday.S:33: Internal error, aborting at ../../gas/config/tc-ppc.c line 2658 in md_assemble # # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/vdso32/gettimeofday.S # 2005/03/04 22:41:54-08:00 akpm@osdl.org +2 -2 # ppc64-implement-a-vdso-and-use-it-for-signal-trampoline gas workaround # # arch/ppc64/kernel/vdso32/datapage.S # 2005/03/04 22:41:54-08:00 akpm@osdl.org +1 -1 # ppc64-implement-a-vdso-and-use-it-for-signal-trampoline gas workaround # # ChangeSet # 2005/03/05 09:33:32-08:00 benh@kernel.crashing.org # [PATCH] ppc64: Implement a vDSO and use it for signal trampoline # # This patch adds to the ppc64 kernel a virtual .so (vDSO) that is mapped # into every process space, similar to the x86 vsyscall page. However, the # implementation is very different (and doesn't use the gate area mecanism). # Actually, it contains two implementations, a 32 bits and a 64 bits one. # # These vDSO's are currently mapped at 0x100000 (+1Mb) when possible (when a # process load section isn't already there). In the future, we can randomize # that address, or even imagine having a special phdr entry letting apps that # wnat finer control over their address space to put it elsewhere (or not at # all). # # The implementation adds a hook to binfmt_elf to let the architecture add a # real VMA to the process space instead of using the gate area mecanism. # This mecanism wasn't very suitable for ppc, we couldn't just "shove" PTE # entries mapping kernel addresses into userland without expensive changes to # our hash table management. Instead, I made the vDSO be a normal VMA which, # additionally, means it supports copy-on-write semantics if made writable # via ptrace/mprotect, thus allowing breakpoints in the vDSO code. # # The current implementation of the vDSOs contain the signal trampolines with # appropriate DWARF informations, which enable us to use non-executable # stacks (patches to come later) along with a few more functions that we hope # glibc will soon make good use of (this is the "hard" part now :) Note that # the symbols exposed by the vDSO aren't "normal" function symbols, apps # can't be expected to link against them directly, the vDSO's are both seen # as if they were linked at 0 and the symbols just contain offsets to the # various functions. This is done on purpose to avoid a relocation step # (ppc64 functions normally have descriptors with abs addresses in them). # When glibc uses those functions, it's expected to use it's own trampolines # that know how to reach them. # # In some cases, the vDSO contains several versions of a given function (for # various CPUs), the kernel will "patch" the symbol table at boot to make it # point to the appropriate one transparently. What is currently implemented # is: # # - int __kernel_gettimeofday(struct timeval *tv, struct timezone *tz); # # This is a fully userland implementation of gettimeofday, with no barriers # and no locks, and providing 100% equivalent results to the syscall version # # - void __kernel_sync_dicache(unsigned long start, unsigned long end) # # This function sync's the data and instruction caches (for making data # executable), it is expected that userland loaders use this instead of # doing it themselves, as the kernel will provide optimized versions for the # current CPU. Currently, the vDSO procides a full one for all CPUs prior # to POWER5 and a nop one for POWER5 which implements hardware snooping at # the L1 level. In the future, an intermediate implementation may be done # for the POWER4 and 970 which don't need the "dcbst" loop (the L1D cache is # write-through on those). # # - void *__kernel_get_syscall_map(unsigned int *syscall_count); # # Returns a pointer to a map of implemented syscalls on the currently # running kernel. The map is agnostic to the size of "long", unlike kernel # bitops, it stores bits from top to bottom so that memory actually contains # a linear bitmap check for syscall N by testing bit (0x80000000 >> (N & # 0x1f)) of * 32 bits int at N >> 5. # # Note about backward compatibility issues: A bug in the ppc64 libgcc # unwinder makes it unable to unwind stacks properly accross signals if the # signal trampoline isn't on the stack. This has been fixed in CVS for gcc # 4.0 and will be soon on the stable branch, but the problem exist will all # currently used versions. # # That means that until glibc gets the patch to enable it's use of the vDSO # symbols for the DWARF unwinder (rather trivial patch that will be pushed to # glibc CVS soon hopefully), unwinding from a signal handler will not work # for 64 bits applications. # # I consider this as a non-issue though as a patch is about to be produced, # which can easily get pushed to "live" distros like debian, gentoo, fedora, # etc... soon enough (it breaks compatilbity with kernels below 2.4.20 # unfortunately as our signal stack layout changed, crap crap crap), as there # are few 64 bits applications out there (expect gentoo), as it's only really # an issue with C++ code relying on throwing exceptions out of signal # handlers (extremely rare it seems), and as "release" distros like SLES or # RHEL will probably have the vDSO enabled glibc _and_ the unwinder fix by # the time they release a version with a 2.6.11 or 2.6.12 kernel anyway :) # # So far, I yet have to see an app failing because of that... # # Finally, many many many thanks to Alan Modra for writing the DWARF # information of the signal handlers and debugging the libgcc issues ! # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/vdso.h # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +83 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso64/vdso64_wrapper.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +13 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso64/vdso64.lds.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +110 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso64/sigtramp.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +294 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso64/gettimeofday.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +91 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso64/datapage.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +68 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso64/cacheflush.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +64 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso64/Makefile # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +35 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso32/vdso32_wrapper.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +13 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso32/vdso32.lds.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +111 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso32/sigtramp.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +300 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso32/gettimeofday.S # 2005/03/04 23:17:16-08:00 benh@kernel.crashing.org +139 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso32/datapage.S # 2005/03/04 23:17:16-08:00 benh@kernel.crashing.org +68 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso32/Makefile # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +36 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso.c # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +614 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # include/asm-ppc64/vdso.h # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/asm-ppc64/vdso.h # # include/asm-ppc64/time.h # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +1 -1 # ppc64: Implement a vDSO and use it for signal trampoline # # include/asm-ppc64/systemcfg.h # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +7 -1 # ppc64: Implement a vDSO and use it for signal trampoline # # include/asm-ppc64/processor.h # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +3 -3 # ppc64: Implement a vDSO and use it for signal trampoline # # include/asm-ppc64/page.h # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +3 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # include/asm-ppc64/elf.h # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +12 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # include/asm-ppc64/a.out.h # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +4 -7 # ppc64: Implement a vDSO and use it for signal trampoline # # fs/binfmt_elf.c # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +8 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/mm/init.c # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +3 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso64/vdso64_wrapper.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/vdso64/vdso64_wrapper.S # # arch/ppc64/kernel/vdso64/vdso64.lds.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/vdso64/vdso64.lds.S # # arch/ppc64/kernel/vdso64/sigtramp.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/vdso64/sigtramp.S # # arch/ppc64/kernel/vdso64/gettimeofday.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/vdso64/gettimeofday.S # # arch/ppc64/kernel/vdso64/datapage.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/vdso64/datapage.S # # arch/ppc64/kernel/vdso64/cacheflush.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/vdso64/cacheflush.S # # arch/ppc64/kernel/vdso64/Makefile # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/vdso64/Makefile # # arch/ppc64/kernel/vdso32/vdso32_wrapper.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/vdso32/vdso32_wrapper.S # # arch/ppc64/kernel/vdso32/vdso32.lds.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/vdso32/vdso32.lds.S # # arch/ppc64/kernel/vdso32/sigtramp.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/vdso32/sigtramp.S # # arch/ppc64/kernel/vdso32/gettimeofday.S # 2005/03/04 23:17:16-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/vdso32/gettimeofday.S # # arch/ppc64/kernel/vdso32/datapage.S # 2005/03/04 23:17:16-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/vdso32/datapage.S # # arch/ppc64/kernel/vdso32/cacheflush.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +65 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso32/Makefile # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/vdso32/Makefile # # arch/ppc64/kernel/vdso.c # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/vdso.c # # arch/ppc64/kernel/time.c # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +59 -27 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/smp.c # 2005/03/04 23:17:15-08:00 benh@kernel.crashing.org +1 -1 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/signal32.c # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +20 -7 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/signal.c # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +9 -5 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/setup.c # 2005/03/04 23:17:15-08:00 benh@kernel.crashing.org +31 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/head.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +0 -1 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/asm-offsets.c # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +22 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/Makefile # 2005/03/04 23:17:14-08:00 benh@kernel.crashing.org +2 -1 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/boot/Makefile # 2005/03/04 23:17:15-08:00 benh@kernel.crashing.org +5 -11 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/Makefile # 2005/03/04 23:17:15-08:00 benh@kernel.crashing.org +21 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso32/cacheflush.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/vdso32/cacheflush.S # # ChangeSet # 2005/03/05 09:33:16-08:00 sfr@canb.auug.org.au # [PATCH] ppc64: distribute EXPORT_SYMBOLs # # This patch just moves as many as possible EXPORT_SYMBOL()s from # arch/ppc64/kernel/ppc_ksyms.c to where the symbols are defined. This has # been compiled on pSeries, iSeries and pmac. # # Signed-off-by: Stephen Rothwell # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/lmb.h # 2005/03/04 22:41:53-08:00 sfr@canb.auug.org.au +0 -2 # ppc64: distribute EXPORT_SYMBOLs # # arch/ppc64/mm/init.c # 2005/03/04 23:17:16-08:00 sfr@canb.auug.org.au +8 -0 # ppc64: distribute EXPORT_SYMBOLs # # arch/ppc64/kernel/time.c # 2005/03/04 23:17:16-08:00 sfr@canb.auug.org.au +1 -0 # ppc64: distribute EXPORT_SYMBOLs # # arch/ppc64/kernel/signal.c # 2005/03/04 23:17:16-08:00 sfr@canb.auug.org.au +3 -3 # ppc64: distribute EXPORT_SYMBOLs # # arch/ppc64/kernel/setup.c # 2005/03/04 23:17:16-08:00 sfr@canb.auug.org.au +1 -0 # ppc64: distribute EXPORT_SYMBOLs # # arch/ppc64/kernel/semaphore.c # 2005/03/04 22:41:53-08:00 sfr@canb.auug.org.au +5 -0 # ppc64: distribute EXPORT_SYMBOLs # # arch/ppc64/kernel/prom_init.c # 2005/03/04 23:17:14-08:00 sfr@canb.auug.org.au +0 -1 # ppc64: distribute EXPORT_SYMBOLs # # arch/ppc64/kernel/prom.c # 2005/03/04 22:41:53-08:00 sfr@canb.auug.org.au +10 -0 # ppc64: distribute EXPORT_SYMBOLs # # arch/ppc64/kernel/process.c # 2005/03/04 22:41:53-08:00 sfr@canb.auug.org.au +2 -0 # ppc64: distribute EXPORT_SYMBOLs # # arch/ppc64/kernel/ppc_ksyms.c # 2005/03/04 22:41:53-08:00 sfr@canb.auug.org.au +2 -66 # ppc64: distribute EXPORT_SYMBOLs # # arch/ppc64/kernel/pci.c # 2005/03/04 22:41:53-08:00 sfr@canb.auug.org.au +2 -0 # ppc64: distribute EXPORT_SYMBOLs # # arch/ppc64/kernel/pacaData.c # 2005/03/04 22:41:53-08:00 sfr@canb.auug.org.au +1 -0 # ppc64: distribute EXPORT_SYMBOLs # # arch/ppc64/kernel/irq.c # 2005/03/04 23:17:15-08:00 sfr@canb.auug.org.au +1 -0 # ppc64: distribute EXPORT_SYMBOLs # # arch/ppc64/kernel/cputable.c # 2005/03/04 22:41:53-08:00 sfr@canb.auug.org.au +3 -0 # ppc64: distribute EXPORT_SYMBOLs # # arch/ppc64/kernel/LparData.c # 2005/03/04 22:41:53-08:00 sfr@canb.auug.org.au +1 -0 # ppc64: distribute EXPORT_SYMBOLs # # ChangeSet # 2005/03/05 09:33:01-08:00 olh@suse.de # [PATCH] ppc64: defconfig updates # # Update several ppc64 defconfigs. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/defconfig # 2005/03/04 22:41:53-08:00 olh@suse.de +421 -173 # ppc64: defconfig updates # # arch/ppc64/configs/pSeries_defconfig # 2005/03/04 22:41:53-08:00 olh@suse.de +149 -46 # ppc64: defconfig updates # # arch/ppc64/configs/maple_defconfig # 2005/03/04 22:41:53-08:00 olh@suse.de +102 -23 # ppc64: defconfig updates # # arch/ppc64/configs/iSeries_defconfig # 2005/03/04 22:41:53-08:00 olh@suse.de +110 -46 # ppc64: defconfig updates # # arch/ppc64/configs/g5_defconfig # 2005/03/04 22:41:53-08:00 olh@suse.de +220 -125 # ppc64: defconfig updates # # ChangeSet # 2005/03/05 09:32:46-08:00 benh@kernel.crashing.org # [PATCH] ppc64: Move systemcfg out of head.S # # The "systemcfg" data structure in the ppc64 kernel is something that used # to be defined to be at a hard-coded page number in the kernel image. This # is not necessary (at least not any more) and is a possible problem with # future developements. This patch removes that constraint, which also # simplifies various bits of assembly in head.S that were dealing with it. # # This is the first step of a deeper cleanup of systemcfg definition of usage # (and ultimately removal in it's current incarnation). # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/systemcfg.h # 2005/03/04 23:17:16-08:00 benh@kernel.crashing.org +0 -5 # ppc64: Move systemcfg out of head.S # # arch/ppc64/kernel/proc_ppc64.c # 2005/03/04 22:41:53-08:00 benh@kernel.crashing.org +1 -1 # ppc64: Move systemcfg out of head.S # # arch/ppc64/kernel/pacaData.c # 2005/03/04 23:17:17-08:00 benh@kernel.crashing.org +6 -1 # ppc64: Move systemcfg out of head.S # # arch/ppc64/kernel/head.S # 2005/03/04 23:17:16-08:00 benh@kernel.crashing.org +5 -27 # ppc64: Move systemcfg out of head.S # # arch/ppc64/kernel/LparData.c # 2005/03/04 23:17:17-08:00 benh@kernel.crashing.org +1 -1 # ppc64: Move systemcfg out of head.S # # ChangeSet # 2005/03/05 09:32:31-08:00 paulus@samba.org # [PATCH] ppc64: collect and export low-level cpu usage statistics # # POWER5 machines have a per-hardware-thread register which counts at a rate # which is proportional to the percentage of cycles on which the cpu # dispatches an instruction for this thread (if the thread gets all the # dispatch cycles it counts at the same rate as the timebase register). This # register is also context-switched by the hypervisor. Thus it gives a # fine-grained measure of the actual cpu usage by the thread over time. # # This patch adds code to read this register every timer interrupt and on # every context switch. The total over all virtual processors is available # through the existing /proc/ppc64/lparcfg file, giving a way to measure the # total cpu usage over the whole partition. # # Signed-off-by: Manish Ahuja # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/time.h # 2005/03/04 23:17:16-08:00 paulus@samba.org +9 -0 # ppc64: collect and export low-level cpu usage statistics # # include/asm-ppc64/processor.h # 2005/03/04 23:17:16-08:00 paulus@samba.org +3 -1 # ppc64: collect and export low-level cpu usage statistics # # arch/ppc64/kernel/time.c # 2005/03/04 23:17:17-08:00 paulus@samba.org +8 -0 # ppc64: collect and export low-level cpu usage statistics # # arch/ppc64/kernel/process.c # 2005/03/04 23:17:17-08:00 paulus@samba.org +18 -0 # ppc64: collect and export low-level cpu usage statistics # # arch/ppc64/kernel/lparcfg.c # 2005/03/04 22:41:53-08:00 paulus@samba.org +13 -5 # ppc64: collect and export low-level cpu usage statistics # # ChangeSet # 2005/03/05 09:32:17-08:00 olh@suse.de # [PATCH] remove unneeded includes from pSeries_nvram.c # # The pseries nvram driver started probably as a copy of nvram.c. These # includes are not needed to build it. # # Signed-off-by: Olaf Hering # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pSeries_nvram.c # 2005/03/04 22:41:53-08:00 olh@suse.de +0 -5 # remove unneeded includes from pSeries_nvram.c # # ChangeSet # 2005/03/05 09:32:03-08:00 galak@freescale.com # [PATCH] ppc32: PowerQUICC II Pro subarch support # # Patch adds support for the initial PowerQUICC II Pro processors # (MPC8343/E, MPC8347/E, and MPC8349/E) and the first reference platform # (MPC834x SYS) from Freescale. # # The initial support is limited to existing drivers that overlap with the # MPC85xx subarch (ethernet, I2C, uart). # # Signed-off-by: Kumar Gala # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc/mpc83xx.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +114 -0 # ppc32: PowerQUICC II Pro subarch support # # include/asm-ppc/ipic.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +85 -0 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/syslib/ppc83xx_setup.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +53 -0 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/syslib/ppc83xx_setup.c # 2005/03/04 22:41:52-08:00 galak@freescale.com +138 -0 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/syslib/ipic.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +49 -0 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/syslib/ipic.c # 2005/03/04 22:41:52-08:00 galak@freescale.com +646 -0 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/platforms/83xx/mpc83xx_sys.c # 2005/03/04 22:41:52-08:00 galak@freescale.com +100 -0 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/platforms/83xx/mpc83xx_devices.c # 2005/03/04 22:41:52-08:00 galak@freescale.com +237 -0 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/platforms/83xx/mpc834x_sys.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +51 -0 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/platforms/83xx/mpc834x_sys.c # 2005/03/04 22:41:52-08:00 galak@freescale.com +290 -0 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/platforms/83xx/Makefile # 2005/03/04 22:41:52-08:00 galak@freescale.com +6 -0 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/platforms/83xx/Kconfig # 2005/03/04 22:41:52-08:00 galak@freescale.com +30 -0 # ppc32: PowerQUICC II Pro subarch support # # include/asm-ppc/serial.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +2 -0 # ppc32: PowerQUICC II Pro subarch support # # include/asm-ppc/ppcboot.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +4 -2 # ppc32: PowerQUICC II Pro subarch support # # include/asm-ppc/ppc_sys.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +3 -1 # ppc32: PowerQUICC II Pro subarch support # # include/asm-ppc/mpc83xx.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/asm-ppc/mpc83xx.h # # include/asm-ppc/irq.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +10 -0 # ppc32: PowerQUICC II Pro subarch support # # include/asm-ppc/ipic.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/asm-ppc/ipic.h # # include/asm-ppc/io.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +2 -0 # ppc32: PowerQUICC II Pro subarch support # # drivers/net/Kconfig # 2005/03/04 22:41:52-08:00 galak@freescale.com +1 -1 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/syslib/ppc83xx_setup.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/syslib/ppc83xx_setup.h # # arch/ppc/syslib/ppc83xx_setup.c # 2005/03/04 22:41:52-08:00 galak@freescale.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/syslib/ppc83xx_setup.c # # arch/ppc/syslib/ipic.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/syslib/ipic.h # # arch/ppc/syslib/ipic.c # 2005/03/04 22:41:52-08:00 galak@freescale.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/syslib/ipic.c # # arch/ppc/syslib/Makefile # 2005/03/04 22:41:52-08:00 galak@freescale.com +4 -0 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/platforms/83xx/mpc83xx_sys.c # 2005/03/04 22:41:52-08:00 galak@freescale.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/platforms/83xx/mpc83xx_sys.c # # arch/ppc/platforms/83xx/mpc83xx_devices.c # 2005/03/04 22:41:52-08:00 galak@freescale.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/platforms/83xx/mpc83xx_devices.c # # arch/ppc/platforms/83xx/mpc834x_sys.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/platforms/83xx/mpc834x_sys.h # # arch/ppc/platforms/83xx/mpc834x_sys.c # 2005/03/04 22:41:52-08:00 galak@freescale.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/platforms/83xx/mpc834x_sys.c # # arch/ppc/platforms/83xx/Makefile # 2005/03/04 22:41:52-08:00 galak@freescale.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/platforms/83xx/Makefile # # arch/ppc/platforms/83xx/Kconfig # 2005/03/04 22:41:52-08:00 galak@freescale.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/platforms/83xx/Kconfig # # arch/ppc/kernel/setup.c # 2005/03/04 22:41:52-08:00 galak@freescale.com +4 -0 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/kernel/ppc_ksyms.c # 2005/03/04 22:41:52-08:00 galak@freescale.com +2 -1 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/kernel/cputable.c # 2005/03/04 22:41:52-08:00 galak@freescale.com +12 -0 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/configs/mpc834x_sys_defconfig # 2005/03/04 22:41:52-08:00 galak@freescale.com +644 -0 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/Makefile # 2005/03/04 22:41:52-08:00 galak@freescale.com +1 -0 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/Kconfig # 2005/03/04 22:41:52-08:00 galak@freescale.com +10 -9 # ppc32: PowerQUICC II Pro subarch support # # MAINTAINERS # 2005/03/04 22:41:52-08:00 galak@freescale.com +1 -1 # ppc32: PowerQUICC II Pro subarch support # # CREDITS # 2005/03/04 22:41:52-08:00 galak@freescale.com +1 -1 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/configs/mpc834x_sys_defconfig # 2005/03/04 22:41:52-08:00 galak@freescale.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/configs/mpc834x_sys_defconfig # # ChangeSet # 2005/03/05 09:31:47-08:00 galak@freescale.com # [PATCH] ppc32: Trivial bug fix in CRITICAL_EXCEPTION macro # # This patch fixes a trival bug in the CRITICAL_EXCEPTION macro # # Signed-off-by: Takeharu KATO # Signed-off-by: Kumar Gala # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/kernel/head_booke.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +2 -2 # ppc32: Trivial bug fix in CRITICAL_EXCEPTION macro # # ChangeSet # 2005/03/05 09:31:34-08:00 galak@freescale.com # [PATCH] ppc32: Add support to use the DS1553 RTC/NVRAM on MPC8555 CDS system # # This patch makes the MPC8555 CDS system utilize the DS1553 RTC/NVRAM. # # Signed-off-by: Kumar Gala # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/syslib/Makefile # 2005/03/04 23:17:19-08:00 galak@freescale.com +1 -0 # ppc32: Add support to use the DS1553 RTC/NVRAM on MPC8555 CDS system # # arch/ppc/platforms/85xx/mpc85xx_cds_common.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +4 -0 # ppc32: Add support to use the DS1553 RTC/NVRAM on MPC8555 CDS system # # arch/ppc/platforms/85xx/mpc85xx_cds_common.c # 2005/03/04 22:41:52-08:00 galak@freescale.com +17 -3 # ppc32: Add support to use the DS1553 RTC/NVRAM on MPC8555 CDS system # # ChangeSet # 2005/03/05 09:31:20-08:00 galak@freescale.com # [PATCH] ppc32: Add support for the Dallas 1553 RTC/NVRAM # # This patch adds support for the Dallas 1553 RTC/NVRAM. # # Signed-off-by: Kumar Gala # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc/todc.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +23 -0 # ppc32: Add support for the Dallas 1553 RTC/NVRAM # # arch/ppc/syslib/todc_time.c # 2005/03/04 22:41:52-08:00 galak@freescale.com +4 -0 # ppc32: Add support for the Dallas 1553 RTC/NVRAM # # ChangeSet # 2005/03/05 09:31:06-08:00 mporter@kernel.crashing.org # [PATCH] ppc32: support OpenBIOS/U-Boot for Ebony # # This patch adds support for OpenBios on Ebony, as Matt Porter has # suggested. It will provide same functionality as the pibs extension for # Luan and Ocotea. # # Signed-off-by: Gerhard Jaeger # Signed-off-by: Matt Porter # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/platforms/4xx/ebony.h # 2005/03/04 22:41:48-08:00 mporter@kernel.crashing.org +3 -7 # ppc32: support OpenBIOS/U-Boot for Ebony # # arch/ppc/platforms/4xx/ebony.c # 2005/03/04 22:41:48-08:00 mporter@kernel.crashing.org +26 -6 # ppc32: support OpenBIOS/U-Boot for Ebony # # arch/ppc/boot/simple/openbios.c # 2005/03/04 22:41:48-08:00 mporter@kernel.crashing.org +37 -0 # ppc32: support OpenBIOS/U-Boot for Ebony # # arch/ppc/boot/simple/Makefile # 2005/03/04 22:41:48-08:00 mporter@kernel.crashing.org +1 -0 # ppc32: support OpenBIOS/U-Boot for Ebony # # arch/ppc/boot/simple/openbios.c # 2005/03/04 22:41:48-08:00 mporter@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/boot/simple/openbios.c # # ChangeSet # 2005/03/05 09:30:51-08:00 mgreer@mvista.com # [PATCH] ppc32: Add GPIO/IRQ definitions for mv64x60 parts # # Add mv64x60 GPP IO pin/IRQ register definitions # # Signed-off-by: James Chapman # Signed-off-by: Mark A. Greer # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc/mv64x60_defs.h # 2005/03/04 22:41:17-08:00 mgreer@mvista.com +41 -0 # ppc32: Add GPIO/IRQ definitions for mv64x60 parts # # ChangeSet # 2005/03/05 09:30:37-08:00 mgreer@mvista.com # [PATCH] ppc32: mv64360_pic non-zero irq base # # Add support for non-zero irq base to mv64360_pic code. # # - Fix mv64360 pic code to handle non-zero mv64x60_irq_base # - Cleanup mv64360 entries in /proc/interrupts # # Signed-off-by: James Chapman # Signed-off-by: Mark A. Greer # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc/mv64x60_defs.h # 2005/03/04 23:17:20-08:00 mgreer@mvista.com +1 -0 # ppc32: mv64360_pic non-zero irq base # # arch/ppc/syslib/mv64360_pic.c # 2005/03/04 22:41:17-08:00 mgreer@mvista.com +17 -12 # ppc32: mv64360_pic non-zero irq base # # ChangeSet # 2005/03/05 09:30:23-08:00 galak@freescale.com # [PATCH] ppc32: Move from using #define SVR_ to cur_ppc_sys_spec name for 85xx platform # # Removes explicit defines for SVR_85xx and use the information in the # ppc_sys_specs table in platform code. Changed the ppc_sys_name strings to # be a bit more generic so we have a bit more flexilibity when we display # them. # # Signed-off-by: Kumar Gala # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc/reg.h # 2005/03/04 22:41:17-08:00 galak@freescale.com +0 -6 # ppc32: Move from using #define SVR_ to cur_ppc_sys_spec name for 85xx platform # # arch/ppc/platforms/85xx/stx_gp3.c # 2005/03/04 22:41:17-08:00 galak@freescale.com +4 -12 # ppc32: Move from using #define SVR_ to cur_ppc_sys_spec name for 85xx platform # # arch/ppc/platforms/85xx/sbc85xx.c # 2005/03/04 22:41:17-08:00 galak@freescale.com +3 -12 # ppc32: Move from using #define SVR_ to cur_ppc_sys_spec name for 85xx platform # # arch/ppc/platforms/85xx/mpc85xx_sys.c # 2005/03/04 22:41:17-08:00 galak@freescale.com +6 -6 # ppc32: Move from using #define SVR_ to cur_ppc_sys_spec name for 85xx platform # # arch/ppc/platforms/85xx/mpc85xx_cds_common.c # 2005/03/04 23:17:19-08:00 galak@freescale.com +2 -1 # ppc32: Move from using #define SVR_ to cur_ppc_sys_spec name for 85xx platform # # arch/ppc/platforms/85xx/mpc85xx_ads_common.c # 2005/03/04 22:41:17-08:00 galak@freescale.com +3 -12 # ppc32: Move from using #define SVR_ to cur_ppc_sys_spec name for 85xx platform # # ChangeSet # 2005/03/05 09:30:10-08:00 galak@freescale.com # [PATCH] ppc32: fix whitespace for 85xx CDS common platform # # Fix whitespace in arch/ppc/platforms/85xx/mpc85xx_cds_common.c # # Signed-off-by: Kumar Gala # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/platforms/85xx/mpc85xx_cds_common.c # 2005/03/04 23:17:20-08:00 galak@freescale.com +150 -150 # ppc32: fix whitespace for 85xx CDS common platform # # ChangeSet # 2005/03/05 09:29:56-08:00 benh@kernel.crashing.org # [PATCH] ppc32: Bogus definition of __cmpxchg_u32() # # This patch fix bogus types in the definition of __cmpxchg_u32() on ppc32. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc/system.h # 2005/03/04 22:41:17-08:00 benh@kernel.crashing.org +2 -2 # ppc32: Bogus definition of __cmpxchg_u32() # # ChangeSet # 2005/03/05 09:29:42-08:00 mgreer@mvista.com # [PATCH] ppc32: incorrect #define in include/asm-ppc/cpm2.h # # This patch fixes the incorrect definition of a macro that sets the transmit # parity to even on a cpm uart device. # # Signed-off-by: Mark A. Greer # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc/cpm2.h # 2005/03/04 22:41:17-08:00 mgreer@mvista.com +1 -1 # ppc32: incorrect #define in include/asm-ppc/cpm2.h # # ChangeSet # 2005/03/05 09:29:28-08:00 ebs@ebshome.net # [PATCH] ppc32: PPC4xx PIC: ack parent UIC in disable_irq # # This patch fixes bug in PPC4xx disable_irq implementation. We need to ACK # parent UIC to prevent false triggering in case IRQ we just disabled was # already pending. # # Signed-off-by: Eugene Surovegin # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/syslib/ppc4xx_pic.c # 2005/03/04 22:41:17-08:00 ebs@ebshome.net +2 -1 # ppc32: PPC4xx PIC: ack parent UIC in disable_irq # # ChangeSet # 2005/03/05 09:29:14-08:00 ebs@ebshome.net # [PATCH] ppc32: Lindentify PPC4xx PIC driver # # This patch fixes whitespace in PPC4xx PIC driver. # # Signed-off-by: Eugene Surovegin # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc/ppc4xx_pic.h # 2005/03/04 22:41:16-08:00 ebs@ebshome.net +4 -4 # ppc32: Lindentify PPC4xx PIC driver # # arch/ppc/syslib/ppc4xx_pic.c # 2005/03/04 23:17:21-08:00 ebs@ebshome.net +26 -20 # ppc32: Lindentify PPC4xx PIC driver # # ChangeSet # 2005/03/05 09:28:59-08:00 mporter@kernel.crashing.org # [PATCH] ppc32: move irq_desc[].status, IRQ_LEVEL bit setup to xilinx_pic.c # # Move the code that informs the kernel if the particular interrupt is edge # triggered or level sensitive from the board specific file to a # "CONFIG_VIRTEX_II_PRO-specific" file. Using old IRQ numbering in that code # is also fixed. # # Signed-off-by: Andrei Konovalov # Signed-off-by: Matt Porter # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/syslib/xilinx_pic.c # 2005/03/04 22:41:16-08:00 mporter@kernel.crashing.org +15 -1 # ppc32: move irq_desc[].status, IRQ_LEVEL bit setup to xilinx_pic.c # # arch/ppc/platforms/4xx/xilinx_ml300.c # 2005/03/04 22:41:16-08:00 mporter@kernel.crashing.org +0 -18 # ppc32: move irq_desc[].status, IRQ_LEVEL bit setup to xilinx_pic.c # # ChangeSet # 2005/03/05 09:28:45-08:00 mgreer@mvista.com # [PATCH] ppc32: Artesyn Katana enet update # # - Adapt Katana to the new names used by the ethernet driver. # - Remove SRAM allocation code for mv643xx_enet until it's had more review. # # Signed-off-by: Dale Farnsworth # Signed-off-by: Mark A. Greer # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/syslib/mv64x60.c # 2005/03/04 22:41:16-08:00 mgreer@mvista.com +10 -10 # ppc32: Artesyn Katana enet update # # arch/ppc/platforms/katana.c # 2005/03/04 22:41:16-08:00 mgreer@mvista.com +4 -18 # ppc32: Artesyn Katana enet update # # ChangeSet # 2005/03/05 09:28:32-08:00 mgreer@mvista.com # [PATCH] ppc32: Artesyn Katana platform update # # - Adds MTD support for the soldered FLASH # - Adds cmdline parsing # - Turns on the Blue LED when the system is halted # - Moves some of the device window left by the firmware to proper alignments # - Handles possibility of different frequencies for TCLK & SysCLK in 64460 # - Misc. code clean up # # Signed-off-by: Mark A. Greer # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc/mv64x60_defs.h # 2005/03/04 23:17:20-08:00 mgreer@mvista.com +3 -1 # ppc32: Artesyn Katana platform update # # arch/ppc/platforms/katana.h # 2005/03/04 22:41:16-08:00 mgreer@mvista.com +18 -27 # ppc32: Artesyn Katana platform update # # arch/ppc/platforms/katana.c # 2005/03/04 23:17:22-08:00 mgreer@mvista.com +144 -49 # ppc32: Artesyn Katana platform update # # arch/ppc/configs/katana_defconfig # 2005/03/04 22:41:16-08:00 mgreer@mvista.com +86 -7 # ppc32: Artesyn Katana platform update # # ChangeSet # 2005/03/05 09:28:17-08:00 olh@suse.de # [PATCH] ppc32: update arch/ppc/configs/pmac_defconfig # # enable drm/agp, cpufreq, pppoe and new pccard option # # Signed-off-by: Olaf Hering # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/configs/pmac_defconfig # 2005/03/04 22:41:16-08:00 olh@suse.de +262 -101 # ppc32: update arch/ppc/configs/pmac_defconfig # # ChangeSet # 2005/03/05 09:28:04-08:00 mgreer@mvista.com # [PATCH] ppc32: fix mv64x60 register relocation bug in bootwrapper # # The gt64260 looks at the highest 20 bits while the mv64[34]60 looks at only # the highest 16 bits when determining the base address for the bridge's # registers. This patch adds support for both. # # Signed-off-by: Nate Case # Signed-off-by: Mark A. Greer # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/boot/simple/misc-mv64x60.S # 2005/03/04 22:41:16-08:00 mgreer@mvista.com +4 -0 # ppc32: fix mv64x60 register relocation bug in bootwrapper # # ChangeSet # 2005/03/05 09:27:51-08:00 trini@kernel.crashing.org # [PATCH] ppc32: Don't create .tmp_gas_check # # This changes how the ppc32 'checkbin' target works. Previously we did all # of the tests using variables which would be evaluated for any and every # make target. This meant that 'make tags' for example would leave behind a # '.tmp_gas_check' file even though we didn't actually compile up anything, # and would get in the way of diffs. By moving all of this logic directly # into the 'checkbin' target, we only test gcc/gas versions when we're going # to compile. # # Signed-off-by: Olaf Hering # Signed-off-by: Tom Rini # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/Makefile # 2005/03/04 23:17:19-08:00 trini@kernel.crashing.org +14 -16 # ppc32: Don't create .tmp_gas_check # # ChangeSet # 2005/03/05 09:27:37-08:00 olof@austin.ibm.com # [PATCH] PPC/PPC64: Abstract cpu_feature checks. # # Abstract most manual mask checks of cpu_features with cpu_has_feature() # # Signed-off-by: Olof Johansson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/page.h # 2005/03/04 23:17:16-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # include/asm-ppc64/mmu_context.h # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +2 -2 # PPC/PPC64: Abstract cpu_feature checks. # # include/asm-ppc64/cputable.h # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +5 -0 # PPC/PPC64: Abstract cpu_feature checks. # # include/asm-ppc64/cacheflush.h # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # include/asm-ppc/cputable.h # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +5 -0 # PPC/PPC64: Abstract cpu_feature checks. # # drivers/md/raid6altivec.uc # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # drivers/macintosh/via-pmu.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/xmon/xmon.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +4 -4 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/oprofile/op_model_rs64.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/oprofile/op_model_power4.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/mm/stab.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/mm/slb.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +2 -2 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/mm/init.c # 2005/03/04 23:17:17-08:00 olof@austin.ibm.com +5 -5 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/mm/hugetlbpage.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/mm/hash_utils.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/mm/hash_native.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +7 -7 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/kernel/sysfs.c # 2005/03/04 23:17:15-08:00 olof@austin.ibm.com +11 -11 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/kernel/smp.c # 2005/03/04 23:17:16-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/kernel/setup.c # 2005/03/04 23:17:17-08:00 olof@austin.ibm.com +3 -3 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/kernel/process.c # 2005/03/04 23:17:18-08:00 olof@austin.ibm.com +2 -2 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/kernel/pSeries_lpar.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/kernel/iSeries_setup.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/kernel/align.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc/platforms/sandpoint.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +3 -3 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc/platforms/pmac_smp.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +2 -2 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc/platforms/pmac_setup.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc/platforms/pmac_cpufreq.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc/mm/ppc_mmu.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +2 -2 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc/mm/mmu_decl.h # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc/kernel/temp.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc/kernel/setup.c # 2005/03/04 23:17:19-08:00 olof@austin.ibm.com +2 -2 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc/kernel/ppc_htab.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +4 -4 # PPC/PPC64: Abstract cpu_feature checks. # # ChangeSet # 2005/03/05 09:27:21-08:00 bill.irwin@oracle.com # [PATCH] make mapping->tree_lock an rwlock # # Convert mapping->tree_lock to an rwlock. # # with: # # dd if=/dev/zero of=foo bs=1 count=2M 0.80s user 4.15s system 99% cpu 4.961 total # dd if=/dev/zero of=foo bs=1 count=2M 0.73s user 4.26s system 100% cpu 4.987 total # dd if=/dev/zero of=foo bs=1 count=2M 0.79s user 4.25s system 100% cpu 5.034 total # # dd if=foo of=/dev/null bs=1 0.80s user 3.12s system 99% cpu 3.928 total # dd if=foo of=/dev/null bs=1 0.77s user 3.15s system 100% cpu 3.914 total # dd if=foo of=/dev/null bs=1 0.92s user 3.02s system 100% cpu 3.935 total # # (3.926: 1.87 usecs) # # without: # # dd if=/dev/zero of=foo bs=1 count=2M 0.85s user 3.92s system 99% cpu 4.780 total # dd if=/dev/zero of=foo bs=1 count=2M 0.78s user 4.02s system 100% cpu 4.789 total # dd if=/dev/zero of=foo bs=1 count=2M 0.82s user 3.94s system 99% cpu 4.763 total # dd if=/dev/zero of=foo bs=1 count=2M 0.71s user 4.10s system 99% cpu 4.810 tota # # dd if=foo of=/dev/null bs=1 0.76s user 2.68s system 100% cpu 3.438 total # dd if=foo of=/dev/null bs=1 0.74s user 2.72s system 99% cpu 3.465 total # dd if=foo of=/dev/null bs=1 0.67s user 2.82s system 100% cpu 3.489 total # dd if=foo of=/dev/null bs=1 0.70s user 2.62s system 99% cpu 3.326 total # # (3.430: 1.635 usecs) # # # So on a P4, the additional cost of the rwlock is ~240 nsecs for a # one-byte-write(). On the other hand: # # From: Peter Chubb # # As part of the Gelato scalability focus group, we've been running OSDL's # Re-AIM7 benchmark with an I/O intensive load with varying numbers of # processors. The current kernel shows severe contention on the tree_lock in # the address space structure when running on tmpfs or ext2 on a RAM disk. # # # Lockstat output for a 12-way: # # SPINLOCKS HOLD WAIT # UTIL CON MEAN( MAX ) MEAN( MAX )(% CPU) TOTAL NOWAIT SPIN RJECT NAME # # 5.5% 0.4us(3177us) 28us( 20ms)(44.2%) 131821954 94.5% 5.5% 0.00% *TOTAL* # # 72.3% 13.1% 0.5us( 9.5us) 29us( 20ms)(42.5%) 50542055 86.9% 13.1% 0% find_lock_page+0x30 # 23.8% 0% 385us(3177us) 0us 23235 100% 0% 0% exit_mmap+0x50 # 11.5% 0.82% 0.1us( 101us) 17us(5670us)( 1.6%) 50665658 99.2% 0.82% 0% dnotify_parent+0x70 # # # Replacing the spinlock with a multi-reader lock fixes this problem, # without unduly affecting anything else. # # Here are the benchmark results (jobs per minute at a 50-client level, average # of 5 runs, standard deviation in parens) on an HP Olympia with 3 cells, 12 # processors, and dnotify turned off (after this spinlock, the spinlock in # dnotify_parent is the worst contended for this workload). # # tmpfs............... ext2............... # #CPUs spinlock rwlock spinlock rwlock # 1 7556(15) 7588(17) +0.42% 3744(20) 3791(16) +1.25% # 2 13743(31) 13791(33) +0.35% 6405(30) 6413(24) +0.12% # 4 23334(111) 22881(154) -2% 9648(51) 9595(50) -0.55% # 8 33580(240) 36163(190) +7.7% 13183(63) 13070(68) -0.85% # 12 28748(170) 44064(238)+53% 12681(49) 14504(105)+14% # # And on a pentium3 single processsor: # 1 4177(4) 4169(2) -0.2% 3811(4) 3820(3) +0.23% # # I'm not sure what's happening in the 4-processor case. The important thing to # note is that with a spinlock, the benchmark shows worse performance for a 12 # than for an 8-way box; with the patch, the 12 way performs better, as # expected. We've done some runs with 16-way as well; without the patch below, # the 16-way performs worse than the 12-way. # # # It's a tricky tradeoff, but large-smp is hurt a lot more by the spinlocks than # small-smp is by the rwlocks. And I don't think we really want to implement # compile-time either-or-locks. # # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/vmscan.c # 2005/03/04 22:41:15-08:00 bill.irwin@oracle.com +4 -4 # make mapping->tree_lock an rwlock # # mm/truncate.c # 2005/03/04 22:41:15-08:00 bill.irwin@oracle.com +3 -3 # make mapping->tree_lock an rwlock # # mm/swapfile.c # 2005/03/04 22:41:15-08:00 bill.irwin@oracle.com +6 -6 # make mapping->tree_lock an rwlock # # mm/swap_state.c # 2005/03/04 22:41:15-08:00 bill.irwin@oracle.com +9 -9 # make mapping->tree_lock an rwlock # # mm/readahead.c # 2005/03/04 22:41:15-08:00 bill.irwin@oracle.com +4 -4 # make mapping->tree_lock an rwlock # # mm/page-writeback.c # 2005/03/04 22:41:15-08:00 bill.irwin@oracle.com +14 -14 # make mapping->tree_lock an rwlock # # mm/filemap.c # 2005/03/04 22:41:15-08:00 bill.irwin@oracle.com +16 -16 # make mapping->tree_lock an rwlock # # include/linux/fs.h # 2005/03/04 22:41:15-08:00 bill.irwin@oracle.com +1 -1 # make mapping->tree_lock an rwlock # # include/asm-parisc/cacheflush.h # 2005/03/04 22:41:15-08:00 bill.irwin@oracle.com +2 -2 # make mapping->tree_lock an rwlock # # include/asm-arm/cacheflush.h # 2005/03/04 22:41:15-08:00 bill.irwin@oracle.com +2 -2 # make mapping->tree_lock an rwlock # # fs/inode.c # 2005/03/04 22:41:15-08:00 bill.irwin@oracle.com +1 -1 # make mapping->tree_lock an rwlock # # fs/buffer.c # 2005/03/04 22:41:15-08:00 bill.irwin@oracle.com +2 -2 # make mapping->tree_lock an rwlock # # drivers/mtd/devices/block2mtd.c # 2005/03/04 22:41:15-08:00 bill.irwin@oracle.com +4 -4 # make mapping->tree_lock an rwlock # # ChangeSet # 2005/03/05 09:27:06-08:00 zach.brown@oracle.com # [PATCH] only unmap what intersects a direct_IO op # # Now that we're only invalidating the pages that intersected a direct IO # write we might as well only unmap the intersecting bytes as well. This # passed a light fsx load with page cache, direct, and mmap IO. # # Signed-off-by: Zach Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/filemap.c # 2005/03/04 23:17:24-08:00 zach.brown@oracle.com +8 -4 # only unmap what intersects a direct_IO op # # ChangeSet # 2005/03/05 09:26:52-08:00 zach.brown@oracle.com # [PATCH] write and wait on range before direct io read # # This adds filemap_write_and_wait_range(mapping, lstart, lend) which starts # writeback and waits on a range of pages. We call this from # __blkdev_direct_IO with just the range that is going to be read by the # direct_IO read. It was lightly tested with fsx and ext3 and passed. # # Signed-off-by: Zach Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/filemap.c # 2005/03/04 23:17:24-08:00 zach.brown@oracle.com +16 -0 # write and wait on range before direct io read # # include/linux/fs.h # 2005/03/04 23:17:24-08:00 zach.brown@oracle.com +2 -0 # write and wait on range before direct io read # # fs/direct-io.c # 2005/03/04 22:41:15-08:00 zach.brown@oracle.com +5 -2 # write and wait on range before direct io read # # ChangeSet # 2005/03/05 09:26:38-08:00 zach.brown@oracle.com # [PATCH] invalidate range of pages after direct IO write # # Presently we invalidate all of a file's pages when writing to any part of # that file with direct-IO. # # After a direct IO write only invalidate the pages that the write intersected. # invalidate_inode_pages2_range(mapping, pgoff start, pgoff end) is added and # called from generic_file_direct_IO(). # # While we're in there, invalidate_inode_pages2() was calling # unmap_mapping_range() with the wrong convention in the single page case. # It was providing the byte offset of the final page rather than the length # of the hole being unmapped. This is also fixed. # # This was lightly tested with a 10k op fsx run with O_DIRECT on a 16MB file # in ext3 on a junky old IDE drive. Totaling vmstat columns of blocks read # and written during the runs shows that read traffic drops significantly. # The run time seems to have gone down a little. # # Two runs before the patch gave the following user/real/sys times and total # blocks in and out: # # 0m28.029s 0m20.093s 0m3.166s 16673 125107 # 0m27.949s 0m20.068s 0m3.227s 18426 126094 # # and after the patch: # # 0m26.775s 0m19.996s 0m3.060s 3505 124982 # 0m26.856s 0m19.935s 0m3.052s 3505 125279 # # akpm: # # - Don't look up more pages than we're going to use # # - Don't test page->index until we've locked the page # # - Check for the cursor wrapping at the end of the mapping. # # Signed-off-by: Zach Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/truncate.c # 2005/03/04 23:17:24-08:00 zach.brown@oracle.com +37 -14 # invalidate range of pages after direct IO write # # mm/filemap.c # 2005/03/04 23:17:25-08:00 zach.brown@oracle.com +4 -1 # invalidate range of pages after direct IO write # # include/linux/fs.h # 2005/03/04 23:17:25-08:00 zach.brown@oracle.com +2 -0 # invalidate range of pages after direct IO write # # ChangeSet # 2005/03/05 09:26:24-08:00 clameter@sgi.com # [PATCH] Move accounting function calls out of critical vm code paths # # In the 2.6.11 development cycle function calls have been added to lots # of hot vm paths to do accounting. I think these should not go into the # final 2.6.1 release because these statistics can be collected in a different # way that does not require the updating of counters from frequently used # vm code paths and is consistent with the methods use elsewhere in the kernel # to obtain statistics. # # These function calls are # # acct_update_integrals -> Account for processes based on stime changes # update_mem_hiwater -> takes rss and total_vm hiwater marks. # # acct_update_integrals is only useful to call if stime changes otherwise # it will simply return. It is therefore best to relocate the function call # to acct_update_integral into the function that updates stime which is # account_system_time and remove it from the vm code paths. # # update_mem_hiwater finds the rss hiwater mark. We call that from timer # context as well. This means that processes' high-water marks are now # sampled statistically, at timer-interrupt time rather than # deterministically. This may or may not be a problem.. # # This means that the rss limit is not always updated if rss is increased # and thus not as accurate. But the benefit is that the rss checks do no # pollute the vm paths and that it is consistent with the rss limit check. # # The following patch removes acct_update_integrals and update_mem_hiwater # from the hot vm paths. # # Signed-off-by: Christoph Lameter # # From: Jay Lan # # The new "move-accounting-function-calls-out-of-critical-vm-code-paths" # patch in 2.6.11-rc3-mm2 was different from the code i tested. # # In particular, it mistakenly dropped the accounting routine calls # in fs/exec.c. The calls in do_execve() are needed to properly # initialize accounting fields. Specifically, the tsk->acct_stimexpd # needs to be initialized to tsk->stime. # # I have discussed this with Christoph Lameter and he gave me full # blessings to bring the calls back. # # Signed-off-by: Jay Lan # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/swapfile.c # 2005/03/04 23:17:24-08:00 clameter@sgi.com +0 -3 # Move accounting function calls out of critical vm code paths # # mm/rmap.c # 2005/03/04 22:41:14-08:00 clameter@sgi.com +0 -3 # Move accounting function calls out of critical vm code paths # # mm/nommu.c # 2005/03/04 22:41:14-08:00 clameter@sgi.com +1 -3 # Move accounting function calls out of critical vm code paths # # mm/mremap.c # 2005/03/04 22:41:14-08:00 clameter@sgi.com +0 -6 # Move accounting function calls out of critical vm code paths # # mm/mmap.c # 2005/03/04 22:41:14-08:00 clameter@sgi.com +0 -7 # Move accounting function calls out of critical vm code paths # # mm/memory.c # 2005/03/04 22:41:14-08:00 clameter@sgi.com +3 -16 # Move accounting function calls out of critical vm code paths # # kernel/sched.c # 2005/03/04 22:41:14-08:00 clameter@sgi.com +5 -0 # Move accounting function calls out of critical vm code paths # # kernel/exit.c # 2005/03/04 22:41:14-08:00 clameter@sgi.com +2 -2 # Move accounting function calls out of critical vm code paths # # kernel/acct.c # 2005/03/04 22:41:14-08:00 clameter@sgi.com +1 -3 # Move accounting function calls out of critical vm code paths # # include/linux/mm.h # 2005/03/04 22:41:14-08:00 clameter@sgi.com +1 -1 # Move accounting function calls out of critical vm code paths # # include/linux/acct.h # 2005/03/04 22:41:14-08:00 clameter@sgi.com +2 -2 # Move accounting function calls out of critical vm code paths # # fs/exec.c # 2005/03/04 22:41:14-08:00 clameter@sgi.com +2 -2 # Move accounting function calls out of critical vm code paths # # ChangeSet # 2005/03/05 09:26:09-08:00 arjan@infradead.org # [PATCH] Randomisation: top-of-stack randomization # # In addition to randomisation of the stack pointer within the stack, the stack # itself should be randomized too. We need both approaches, we can only # randomize the stack itself in pagesize increments. However randomizing large # ranges with the stackpointer runs into the situation where a huge chunk of the # stack rlimit is used by the randomisation; this is undesirable so we need to # do both. # # Signed-off-by: Arjan van de Ven # Signed-off-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/exec.c # 2005/03/04 23:17:25-08:00 arjan@infradead.org +1 -1 # Randomisation: top-of-stack randomization # # fs/binfmt_elf.c # 2005/03/04 23:17:16-08:00 arjan@infradead.org +16 -1 # Randomisation: top-of-stack randomization # # ChangeSet # 2005/03/05 09:25:55-08:00 arjan@infradead.org # [PATCH] Randomisation: add ADDR_NO_RANDOMIZE personality # # Introduce a personality that disables randomisation, so that users can use # setarch and related commands to run specific applications without # randomisation. # # Signed-off-by: Arjan van de Ven # Signed-off-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/personality.h # 2005/03/04 22:41:14-08:00 arjan@infradead.org +2 -1 # Randomisation: add ADDR_NO_RANDOMIZE personality # # fs/binfmt_elf.c # 2005/03/04 23:17:25-08:00 arjan@infradead.org +1 -1 # Randomisation: add ADDR_NO_RANDOMIZE personality # # ChangeSet # 2005/03/05 09:25:41-08:00 arjan@infradead.org # [PATCH] Randomisation: enable by default # # Signed-off-by: Arjan van de Ven # Signed-off-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sysctl.c # 2005/03/04 22:41:14-08:00 arjan@infradead.org +1 -1 # Randomisation: enable by default # # include/linux/kernel.h # 2005/03/04 22:41:14-08:00 arjan@infradead.org +1 -1 # Randomisation: enable by default # # ChangeSet # 2005/03/05 09:25:27-08:00 arjan@infradead.org # [PATCH] Randomisation: mmap randomisation # # The patch below randomizes the starting point of the mmap area. # # This has the effect that all non-prelinked shared libaries and all bigger # malloc()s will be randomized between various invocations of the binary. # Prelinked binaries get a address-hint from ld.so in their mmap and are thus # exempt from this randomisation, in order to not break the prelink advantage. # The randomisation range is 1 megabyte (this is bigger than the stack # randomisation since the stack randomisation only needs 16 bytes alignment # while the mmap needs page alignment, a 64kb range would not have given enough # entropy to be effective) # # Signed-off-by: Arjan van de Ven # Signed-off-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/mm/mmap.c # 2005/03/04 22:41:14-08:00 arjan@infradead.org +6 -1 # Randomisation: mmap randomisation # # ChangeSet # 2005/03/05 09:25:13-08:00 arjan@infradead.org # [PATCH] Randomisation: stack randomisation # # The patch below replaces the existing 8Kb randomisation of the userspace stack # pointer (which is currently only done for Hyperthreaded P-IVs) with a more # general randomisation over a 64Kb range. 64Kb is not a lot, but it's a start # and once the dust settles we can increase this value to a more agressive # value. # # Signed-off-by: Arjan van de Ven # Signed-off-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-v850/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-sparc64/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-sparc/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-sh64/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-sh/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-s390/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-ppc64/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-ppc/system.h # 2005/03/04 23:17:21-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-parisc/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-mips/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-m68knommu/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +1 -0 # Randomisation: stack randomisation # # include/asm-m68k/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-m32r/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-ia64/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +3 -0 # Randomisation: stack randomisation # # include/asm-i386/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-h8300/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-frv/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-cris/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-arm26/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-arm/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-alpha/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # fs/exec.c # 2005/03/04 23:17:25-08:00 arjan@infradead.org +2 -1 # Randomisation: stack randomisation # # fs/binfmt_elf.c # 2005/03/04 23:17:26-08:00 arjan@infradead.org +2 -9 # Randomisation: stack randomisation # # arch/x86_64/kernel/process.c # 2005/03/04 22:41:13-08:00 arjan@infradead.org +8 -0 # Randomisation: stack randomisation # # arch/i386/kernel/process.c # 2005/03/04 22:41:13-08:00 arjan@infradead.org +7 -0 # Randomisation: stack randomisation # # ChangeSet # 2005/03/05 09:24:57-08:00 arjan@infradead.org # [PATCH] Randomisation: add PF_RANDOMIZE # # Even though there is a global flag to disable randomisation, it's useful to # have a per process flag too; the patch below introduces this per process flag # and automatically sets it for "new" binaries. # # Eventually we will want to tie this to the legacy-va-space personality # # Signed-off-by: Arjan van de Ven # Signed-off-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/sched.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +1 -0 # Randomisation: add PF_RANDOMIZE # # fs/exec.c # 2005/03/04 23:17:27-08:00 arjan@infradead.org +1 -0 # Randomisation: add PF_RANDOMIZE # # fs/binfmt_elf.c # 2005/03/04 23:17:27-08:00 arjan@infradead.org +2 -0 # Randomisation: add PF_RANDOMIZE # # ChangeSet # 2005/03/05 09:24:44-08:00 arjan@infradead.org # [PATCH] Randomisation: infrastructure # # The patch below introduces get_random_int() and randomize_range(), two helpers # used in later patches in the series. get_random_int() shares the tcp/ip # random number stuff so the CONFIG_INET ifdef needs to move slightly, and to # reduce the damange due to that, secure_ip_id() needs to move inside random.c # From: Frank Sorenson # Acked-By: Jeff Dike # # The stack randomization patches that went into 2.6.11-rc3-mm1 broke # compilation of ARCH=um. This patch fixes compiling by adding arch_align_stack # back in. # # Signed-off-by: Arjan van de Ven # Signed-off-by: Ingo Molnar # Signed-off-by: Frank Sorenson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/random.h # 2005/03/04 22:38:34-08:00 arjan@infradead.org +3 -0 # Randomisation: infrastructure # # drivers/char/random.c # 2005/03/04 22:38:34-08:00 arjan@infradead.org +62 -22 # Randomisation: infrastructure # # arch/um/kernel/process_kern.c # 2005/03/04 22:38:38-08:00 arjan@infradead.org +9 -0 # Randomisation: infrastructure # # ChangeSet # 2005/03/05 09:24:30-08:00 arjan@infradead.org # [PATCH] Randomisation: global sysctl # # This first patch of the series introduces a sysctl (default off) that # enables/disables the randomisation feature globally. Since randomisation may # make it harder to debug really tricky situations (reproducability goes down), # the sysadmin needs a way to disable it globally. # # Signed-off-by: Arjan van de Ven # Signed-off-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sysctl.c # 2005/03/04 23:17:26-08:00 arjan@infradead.org +11 -0 # Randomisation: global sysctl # # include/linux/sysctl.h # 2005/03/04 22:32:56-08:00 arjan@infradead.org +1 -0 # Randomisation: global sysctl # # include/linux/kernel.h # 2005/03/04 23:17:26-08:00 arjan@infradead.org +6 -0 # Randomisation: global sysctl # # ChangeSet # 2005/03/05 09:24:16-08:00 galak@freescale.com # [PATCH] initialize a spin lock in CPM2 uart driver # # Static initialization of spin locks that are otherwise accessed prior to # initialization. # # Signed-off-by: Jaka Mocnik # Signed-off-by: Kumar Gala # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/serial/cpm_uart/cpm_uart_core.c # 2005/03/04 22:32:56-08:00 galak@freescale.com +6 -0 # initialize a spin lock in CPM2 uart driver # # ChangeSet # 2005/03/05 09:24:03-08:00 sean.hefty@intel.com # [PATCH] IB: MAD cancel callbacks from thread # # Modify ib_cancel_mad() to invoke a user's send completion callback from # a different thread context than that used by the caller. This allows a # caller to hold a lock while calling cancel that is also acquired from # their send handler. # # Signed-off-by: Sean Hefty # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/core/mad_priv.h # 2005/03/04 22:32:56-08:00 sean.hefty@intel.com +2 -0 # IB: MAD cancel callbacks from thread # # drivers/infiniband/core/mad.c # 2005/03/04 22:32:56-08:00 sean.hefty@intel.com +39 -11 # IB: MAD cancel callbacks from thread # # ChangeSet # 2005/03/05 09:23:48-08:00 mst@mellanox.co.il # [PATCH] IB/mthca: implement query of device caps # # Set device_cap_flags field in mthca's query_device method. # # Signed-off-by: Michael S. Tsirkin # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_provider.c # 2005/03/04 22:32:56-08:00 mst@mellanox.co.il +8 -5 # IB/mthca: implement query of device caps # # drivers/infiniband/hw/mthca/mthca_main.c # 2005/03/04 22:32:56-08:00 mst@mellanox.co.il +27 -0 # IB/mthca: implement query of device caps # # drivers/infiniband/hw/mthca/mthca_dev.h # 2005/03/04 22:32:56-08:00 mst@mellanox.co.il +1 -0 # IB/mthca: implement query of device caps # # drivers/infiniband/hw/mthca/mthca_cmd.h # 2005/03/04 22:32:56-08:00 mst@mellanox.co.il +15 -1 # IB/mthca: implement query of device caps # # ChangeSet # 2005/03/05 09:23:36-08:00 mst@mellanox.co.il # [PATCH] IB/mthca: QP locking optimization # # 1. Split the QP spinlock into separate send and receive locks. # # The only place where we have to lock both is upon modify_qp, and # that is not on data path. # # 2. Avoid taking any QP locks when polling CQ. # # This last part is achieved by getting rid of the cur field in # mthca_wq, and calculating the number of outstanding WQEs by # comparing the head and tail fields. head is only updated by # post, tail is only updated by poll. # # In a rare case where an overrun is detected, a CQ is locked and the # overrun condition is re-tested, to avoid any potential for stale # tail values. # # Signed-off-by: Michael S. Tsirkin # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_qp.c # 2005/03/04 22:32:56-08:00 mst@mellanox.co.il +77 -46 # IB/mthca: QP locking optimization # # drivers/infiniband/hw/mthca/mthca_provider.h # 2005/03/04 22:32:56-08:00 mst@mellanox.co.il +11 -10 # IB/mthca: QP locking optimization # # drivers/infiniband/hw/mthca/mthca_cq.c # 2005/03/04 22:32:56-08:00 mst@mellanox.co.il +2 -16 # IB/mthca: QP locking optimization # # ChangeSet # 2005/03/05 09:23:21-08:00 roland@topspin.com # [PATCH] IB/mthca: mem-free multicast table # # Tie up one last loose end by mapping enough context memory to cover # the whole multicast table during initialization, and then enable # mem-free mode. mthca now supports enough of mem-free mode so that # IPoIB works with a mem-free HCA. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_main.c # 2005/03/04 23:17:29-08:00 roland@topspin.com +28 -9 # IB/mthca: mem-free multicast table # # drivers/infiniband/hw/mthca/mthca_dev.h # 2005/03/04 23:17:29-08:00 roland@topspin.com +3 -2 # IB/mthca: mem-free multicast table # # ChangeSet # 2005/03/05 09:23:08-08:00 roland@topspin.com # [PATCH] IB/mthca: mem-free work request posting # # Implement posting send and receive work requests for mem-free mode. # Also tidy up a few things in send/receive posting for Tavor mode (fix # smp_wmb()s that should really be just wmb()s, annotate tests in the # fast path with likely()/unlikely()). # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_qp.c # 2005/03/04 23:17:29-08:00 roland@topspin.com +266 -26 # IB/mthca: mem-free work request posting # # drivers/infiniband/hw/mthca/mthca_provider.c # 2005/03/04 23:17:29-08:00 roland@topspin.com +7 -4 # IB/mthca: mem-free work request posting # # drivers/infiniband/hw/mthca/mthca_dev.h # 2005/03/04 23:17:29-08:00 roland@topspin.com +8 -4 # IB/mthca: mem-free work request posting # # ChangeSet # 2005/03/05 09:22:54-08:00 roland@topspin.com # [PATCH] IB/mthca: mem-free address vectors # # Update address vector handling to support mem-free mode. In mem-free # mode, the address vector (in hardware format) is copied by the driver # into each send work queue entry, so our address handle creation can # become pretty trivial: we just kmalloc() a buffer to hold the # formatted address vector. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_provider.h # 2005/03/04 23:17:29-08:00 roland@topspin.com +11 -5 # IB/mthca: mem-free address vectors # # drivers/infiniband/hw/mthca/mthca_av.c # 2005/03/04 22:32:55-08:00 roland@topspin.com +34 -12 # IB/mthca: mem-free address vectors # # ChangeSet # 2005/03/05 09:22:41-08:00 roland@topspin.com # [PATCH] IB/mthca: mem-free QP initialization # # Update QP initialization and cleanup to handle mem-free mode. In # mem-free mode, work queue sizes have to be rounded up to a power of 2, # we need to allocate doorbells, there must be memory mapped for the # entries in the QP and extended QP context table that we use, and the # entries of the receive queue must be initialized. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_qp.c # 2005/03/04 23:17:29-08:00 roland@topspin.com +175 -30 # IB/mthca: mem-free QP initialization # # drivers/infiniband/hw/mthca/mthca_provider.h # 2005/03/04 23:17:29-08:00 roland@topspin.com +3 -0 # IB/mthca: mem-free QP initialization # # ChangeSet # 2005/03/05 09:22:27-08:00 roland@topspin.com # [PATCH] IB/mthca: mem-free CQ operations # # Add support for CQ data path operations (request notification, update # consumer index) in mem-free mode. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_qp.c # 2005/03/04 23:17:30-08:00 roland@topspin.com +5 -2 # IB/mthca: mem-free CQ operations # # drivers/infiniband/hw/mthca/mthca_provider.h # 2005/03/04 23:17:30-08:00 roland@topspin.com +1 -1 # IB/mthca: mem-free CQ operations # # drivers/infiniband/hw/mthca/mthca_provider.c # 2005/03/04 23:17:29-08:00 roland@topspin.com +5 -8 # IB/mthca: mem-free CQ operations # # drivers/infiniband/hw/mthca/mthca_dev.h # 2005/03/04 23:17:29-08:00 roland@topspin.com +3 -3 # IB/mthca: mem-free CQ operations # # drivers/infiniband/hw/mthca/mthca_cq.c # 2005/03/04 23:17:29-08:00 roland@topspin.com +79 -27 # IB/mthca: mem-free CQ operations # # ChangeSet # 2005/03/05 09:22:12-08:00 roland@topspin.com # [PATCH] IB/mthca: mem-free CQ initialization # # Update CQ initialization and cleanup to handle mem-free mode: we need # to make sure the HCA has memory mapped for the entry in the CQ context # table we will use and also allocate doorbell records. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_provider.h # 2005/03/04 23:17:30-08:00 roland@topspin.com +8 -0 # IB/mthca: mem-free CQ initialization # # drivers/infiniband/hw/mthca/mthca_cq.c # 2005/03/04 23:17:30-08:00 roland@topspin.com +45 -3 # IB/mthca: mem-free CQ initialization # # ChangeSet # 2005/03/05 09:21:58-08:00 roland@topspin.com # [PATCH] IB/mthca: refactor CQ buffer allocate/free # # Factor the allocation and freeing of completion queue buffers into # mthca_alloc_cq_buf() and mthca_free_cq_buf(). This makes the code # more readable and will eventually make handling userspace CQs simpler # (the kernel doesn't have to allocate a buffer at all). # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_provider.c # 2005/03/04 23:17:30-08:00 roland@topspin.com +1 -2 # IB/mthca: refactor CQ buffer allocate/free # # drivers/infiniband/hw/mthca/mthca_cq.c # 2005/03/04 23:17:30-08:00 roland@topspin.com +84 -78 # IB/mthca: refactor CQ buffer allocate/free # # ChangeSet # 2005/03/05 09:21:44-08:00 roland@topspin.com # [PATCH] IB/mthca: mem-free doorbell record writing # # Add a mthca_write_db_rec() to wrap writing doorbell records. On # 64-bit archs, this is just a 64-bit write, while on 32-bit archs it # splits the write into two 32-bit writes with a memory barrier to make # sure the two halves of the record are written in the correct order. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_doorbell.h # 2005/03/04 22:32:55-08:00 roland@topspin.com +12 -0 # IB/mthca: mem-free doorbell record writing # # ChangeSet # 2005/03/05 09:21:30-08:00 roland@topspin.com # [PATCH] IB/mthca: mem-free doorbell record allocation # # Mem-free mode requires the driver to allocate additional doorbell pages # for each user access region. Add support for this in mthca_memfree.c, # and have the driver allocate a table in db_tab for kernel use. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_uar.c # 2005/03/04 22:32:54-08:00 roland@topspin.com +9 -0 # IB/mthca: mem-free doorbell record allocation # # drivers/infiniband/hw/mthca/mthca_profile.c # 2005/03/04 22:32:54-08:00 roland@topspin.com +5 -3 # IB/mthca: mem-free doorbell record allocation # # drivers/infiniband/hw/mthca/mthca_memfree.h # 2005/03/04 22:32:54-08:00 roland@topspin.com +33 -0 # IB/mthca: mem-free doorbell record allocation # # drivers/infiniband/hw/mthca/mthca_memfree.c # 2005/03/04 22:32:54-08:00 roland@topspin.com +196 -0 # IB/mthca: mem-free doorbell record allocation # # drivers/infiniband/hw/mthca/mthca_dev.h # 2005/03/04 23:17:30-08:00 roland@topspin.com +4 -3 # IB/mthca: mem-free doorbell record allocation # # ChangeSet # 2005/03/05 09:21:17-08:00 roland@topspin.com # [PATCH] IB/mthca: tweak MAP_ICM_page firmware command # # Have MAP_ICM_page() firmware command map assume pages are always the # HCA-native 4K size rather than using the kernel's page size. This # will make handling doorbell pages for mem-free mode simpler. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_cmd.c # 2005/03/04 22:32:54-08:00 roland@topspin.com +1 -1 # IB/mthca: tweak MAP_ICM_page firmware command # # ChangeSet # 2005/03/05 09:21:04-08:00 roland@topspin.com # [PATCH] IB/mthca: tweak firmware command debug messages # # Slightly improve debugging output for UNMAP_ICM and MODIFY_QP firmware commands. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_cmd.c # 2005/03/04 23:17:31-08:00 roland@topspin.com +5 -2 # IB/mthca: tweak firmware command debug messages # # ChangeSet # 2005/03/05 09:20:51-08:00 roland@topspin.com # [PATCH] IB/mthca: mem-free interrupt handling # # Update interrupt handling code to handle mem-free mode. While we're # at it, improve the Tavor interrupt handling to avoid an extra MMIO # read of the event cause register. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_provider.h # 2005/03/04 23:17:30-08:00 roland@topspin.com +1 -1 # IB/mthca: mem-free interrupt handling # # drivers/infiniband/hw/mthca/mthca_main.c # 2005/03/04 23:17:29-08:00 roland@topspin.com +10 -9 # IB/mthca: mem-free interrupt handling # # drivers/infiniband/hw/mthca/mthca_eq.c # 2005/03/04 22:32:54-08:00 roland@topspin.com +120 -39 # IB/mthca: mem-free interrupt handling # # drivers/infiniband/hw/mthca/mthca_dev.h # 2005/03/04 23:17:30-08:00 roland@topspin.com +1 -0 # IB/mthca: mem-free interrupt handling # # ChangeSet # 2005/03/05 09:20:37-08:00 roland@topspin.com # [PATCH] IB/mthca: mem-free EQ initialization # # Add code to initialize EQ context properly in both Tavor and mem-free mode. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_eq.c # 2005/03/04 23:17:31-08:00 roland@topspin.com +13 -6 # IB/mthca: mem-free EQ initialization # # ChangeSet # 2005/03/05 09:20:23-08:00 roland@topspin.com # [PATCH] IB/mthca: mem-free memory region support # # Add support for mem-free mode to memory region code. This mostly # amounts to properly munging between keys and indices. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_mr.c # 2005/03/04 22:32:54-08:00 roland@topspin.com +33 -13 # IB/mthca: mem-free memory region support # # ChangeSet # 2005/03/05 09:20:10-08:00 roland@topspin.com # [PATCH] IB/mthca: dynamic context memory mapping for mem-free mode # # Add support for mapping more memory into HCA's context to cover # context tables when new objects are allocated. Pass the object # size into mthca_alloc_icm_table(), reference count the ICM chunks, # and add new mthca_table_get() and mthca_table_put() functions to # handle mapping memory when allocating or destroying objects. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_memfree.h # 2005/03/04 23:17:30-08:00 roland@topspin.com +9 -3 # IB/mthca: dynamic context memory mapping for mem-free mode # # drivers/infiniband/hw/mthca/mthca_memfree.c # 2005/03/04 23:17:30-08:00 roland@topspin.com +70 -7 # IB/mthca: dynamic context memory mapping for mem-free mode # # drivers/infiniband/hw/mthca/mthca_main.c # 2005/03/04 23:17:31-08:00 roland@topspin.com +10 -15 # IB/mthca: dynamic context memory mapping for mem-free mode # # ChangeSet # 2005/03/05 09:19:57-08:00 roland@topspin.com # [PATCH] IB/mthca: add UAR allocation # # Add support for allocating user access regions (UARs). Use this to # allocate a region for kernel at driver init instead using hard-coded # MTHCA_KAR_PAGE index. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_uar.c # 2005/03/04 23:17:30-08:00 roland@topspin.com +69 -0 # IB/mthca: add UAR allocation # # drivers/infiniband/hw/mthca/mthca_uar.c # 2005/03/04 23:17:30-08:00 roland@topspin.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/infiniband/hw/mthca/mthca_uar.c # # drivers/infiniband/hw/mthca/mthca_qp.c # 2005/03/04 23:17:30-08:00 roland@topspin.com +1 -1 # IB/mthca: add UAR allocation # # drivers/infiniband/hw/mthca/mthca_provider.h # 2005/03/04 23:17:31-08:00 roland@topspin.com +5 -0 # IB/mthca: add UAR allocation # # drivers/infiniband/hw/mthca/mthca_profile.c # 2005/03/04 23:17:30-08:00 roland@topspin.com +1 -0 # IB/mthca: add UAR allocation # # drivers/infiniband/hw/mthca/mthca_main.c # 2005/03/04 23:17:31-08:00 roland@topspin.com +42 -21 # IB/mthca: add UAR allocation # # drivers/infiniband/hw/mthca/mthca_eq.c # 2005/03/04 23:17:31-08:00 roland@topspin.com +1 -1 # IB/mthca: add UAR allocation # # drivers/infiniband/hw/mthca/mthca_dev.h # 2005/03/04 23:17:31-08:00 roland@topspin.com +14 -1 # IB/mthca: add UAR allocation # # drivers/infiniband/hw/mthca/mthca_cq.c # 2005/03/04 23:17:30-08:00 roland@topspin.com +1 -1 # IB/mthca: add UAR allocation # # drivers/infiniband/hw/mthca/Makefile # 2005/03/04 22:32:53-08:00 roland@topspin.com +1 -1 # IB/mthca: add UAR allocation # # ChangeSet # 2005/03/05 09:19:43-08:00 roland@topspin.com # [PATCH] IB/mthca: map registers for mem-free mode # # Move the request/ioremap of regions related to event handling into # mthca_eq.c. Map the correct regions depending on whether we're in # Tavor or native mem-free mode. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_main.c # 2005/03/04 23:17:32-08:00 roland@topspin.com +15 -81 # IB/mthca: map registers for mem-free mode # # drivers/infiniband/hw/mthca/mthca_eq.c # 2005/03/04 23:17:32-08:00 roland@topspin.com +135 -3 # IB/mthca: map registers for mem-free mode # # drivers/infiniband/hw/mthca/mthca_dev.h # 2005/03/04 23:17:32-08:00 roland@topspin.com +10 -2 # IB/mthca: map registers for mem-free mode # # drivers/infiniband/hw/mthca/mthca_config_reg.h # 2005/03/04 22:32:53-08:00 roland@topspin.com +1 -0 # IB/mthca: map registers for mem-free mode # # ChangeSet # 2005/03/05 09:19:29-08:00 mst@mellanox.co.il # [PATCH] IB: remove unsignaled receives # # Remove support for unsignaled receive requests. This is a # non-standard extension to the IB spec that is not used by any known # applications or protocols, and is not supported by newer hardware. # # Signed-off-by: Michael S. Tsirkin # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/ulp/ipoib/ipoib_verbs.c # 2005/03/04 22:32:53-08:00 mst@mellanox.co.il +0 -1 # IB: remove unsignaled receives # # drivers/infiniband/ulp/ipoib/ipoib_ib.c # 2005/03/04 22:32:53-08:00 mst@mellanox.co.il +0 -1 # IB: remove unsignaled receives # # drivers/infiniband/include/ib_verbs.h # 2005/03/04 22:32:53-08:00 mst@mellanox.co.il +0 -7 # IB: remove unsignaled receives # # drivers/infiniband/hw/mthca/mthca_qp.c # 2005/03/04 23:17:32-08:00 mst@mellanox.co.il +7 -14 # IB: remove unsignaled receives # # drivers/infiniband/hw/mthca/mthca_provider.h # 2005/03/04 23:17:32-08:00 mst@mellanox.co.il +1 -1 # IB: remove unsignaled receives # # drivers/infiniband/hw/mthca/mthca_provider.c # 2005/03/04 23:17:30-08:00 mst@mellanox.co.il +2 -2 # IB: remove unsignaled receives # # drivers/infiniband/hw/mthca/mthca_dev.h # 2005/03/04 23:17:32-08:00 mst@mellanox.co.il +0 -2 # IB: remove unsignaled receives # # drivers/infiniband/core/mad.c # 2005/03/04 23:17:28-08:00 mst@mellanox.co.il +0 -2 # IB: remove unsignaled receives # # ChangeSet # 2005/03/05 09:19:15-08:00 roland@topspin.com # [PATCH] IB/mthca: CQ cleanups # # Simplify some of the code for CQ handling slightly. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_cq.c # 2005/03/04 23:17:32-08:00 roland@topspin.com +6 -10 # IB/mthca: CQ cleanups # # ChangeSet # 2005/03/05 09:19:00-08:00 mst@mellanox.co.il # [PATCH] IB/mthca: improve CQ locking part 2 # # Locking during the poll cq operation can be reduced by locking the cq # while qp is being removed from the qp array. This also avoids an # extra atomic operation for reference counting. # # Signed-off-by: Michael S. Tsirkin # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_qp.c # 2005/03/04 23:17:32-08:00 mst@mellanox.co.il +33 -4 # IB/mthca: improve CQ locking part 2 # # drivers/infiniband/hw/mthca/mthca_cq.c # 2005/03/04 23:17:32-08:00 mst@mellanox.co.il +6 -10 # IB/mthca: improve CQ locking part 2 # # ChangeSet # 2005/03/05 09:18:47-08:00 mst@mellanox.co.il # [PATCH] IB/mthca: improve CQ locking part 1 # # Avoid taking the CQ table lock in the fast path path by using # synchronize_irq() after removing a CQ from the table to make sure that # no completion events are still in progress. This gets a nice speedup # (about 4%) in IP over IB on my hardware. # # Signed-off-by: Michael S. Tsirkin # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_cq.c # 2005/03/04 23:17:33-08:00 mst@mellanox.co.il +6 -7 # IB/mthca: improve CQ locking part 1 # # ChangeSet # 2005/03/05 09:18:33-08:00 mst@mellanox.co.il # [PATCH] IB/mthca: CQ minor tweaks # # Clean up CQ code so that we only calculate the address of a CQ entry # once when using it. # # Signed-off-by: Michael S. Tsirkin # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_cq.c # 2005/03/04 23:17:33-08:00 mst@mellanox.co.il +13 -13 # IB/mthca: CQ minor tweaks # # ChangeSet # 2005/03/05 09:18:19-08:00 sean.hefty@intel.com # [PATCH] IB: fix ib_find_cached_gid() port numbering # # Fix ib_find_cached_gid() to return the correct port number relative to # the port numbering used by the device. # # Signed-off-by: Sean Hefty # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/core/cache.c # 2005/03/04 22:32:52-08:00 sean.hefty@intel.com +1 -1 # IB: fix ib_find_cached_gid() port numbering # # ChangeSet # 2005/03/05 09:18:04-08:00 roland@topspin.com # [PATCH] IB/ipoib: fix locking on path deletion # # Fix up locking for IPoIB path table. Make sure that destruction of address # handles, neighbour info and path structs is locked properly to avoid races and # deadlocks. (Problem originally diagnosed by Shirley Ma) # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/ulp/ipoib/ipoib_main.c # 2005/03/04 22:32:52-08:00 roland@topspin.com +28 -9 # IB/ipoib: fix locking on path deletion # # ChangeSet # 2005/03/05 09:17:51-08:00 xma@us.ibm.com # [PATCH] IB/ipoib: don't call ipoib_put_ah with lock held # # ipoib_put_ah() may call ipoib_free_ah(), which might take the device's lock. # Therefore we need to make sure we don't call ipoib_put_ah() when holding the # lock already. # # Signed-off-by: Shirley Ma # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/ulp/ipoib/ipoib_multicast.c # 2005/03/04 22:32:52-08:00 xma@us.ibm.com +7 -1 # IB/ipoib: don't call ipoib_put_ah with lock held # # drivers/infiniband/ulp/ipoib/ipoib_main.c # 2005/03/04 23:17:33-08:00 xma@us.ibm.com +5 -1 # IB/ipoib: don't call ipoib_put_ah with lock held # # ChangeSet # 2005/03/05 09:17:36-08:00 xma@us.ibm.com # [PATCH] IB/ipoib: small fixes # # IPoIB small fixes: Initialize path->ah to NULL, and fix dereference after free # of neigh in error path of neigh_add_path(). # # Signed-off-by: Shirley Ma # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/ulp/ipoib/ipoib_main.c # 2005/03/04 23:17:34-08:00 xma@us.ibm.com +3 -2 # IB/ipoib: small fixes # # ChangeSet # 2005/03/05 09:17:23-08:00 roland@topspin.com # [PATCH] IB/ipoib: rename global symbols # # Make IPoIB data_debug_level module parameter static to the single file # where it is used. Also Rename IPoIB module parameter variable from # "debug_level" to "ipoib_debug_level". This avoids possible name # clashes if IPoIB is built into the kernel. We use module_param_named # so that the user-visible parameter names remain the same. # # Signed-off-by: Tom Duffy # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/ulp/ipoib/ipoib_main.c # 2005/03/04 23:17:34-08:00 roland@topspin.com +2 -2 # IB/ipoib: rename global symbols # # drivers/infiniband/ulp/ipoib/ipoib_ib.c # 2005/03/04 23:17:32-08:00 roland@topspin.com +1 -1 # IB/ipoib: rename global symbols # # drivers/infiniband/ulp/ipoib/ipoib.h # 2005/03/04 22:32:52-08:00 roland@topspin.com +2 -2 # IB/ipoib: rename global symbols # # ChangeSet # 2005/03/05 09:17:09-08:00 xma@us.ibm.com # [PATCH] IB/ipoib: use list_for_each_entry_safe when required # # Change uses of list_for_each_entry() where the loop variable is freed # inside the loop to list_for_each_entry_safe(). # # Signed-off-by: Shirley Ma # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/ulp/ipoib/ipoib_multicast.c # 2005/03/04 23:17:34-08:00 xma@us.ibm.com +2 -2 # IB/ipoib: use list_for_each_entry_safe when required # # ChangeSet # 2005/03/05 09:16:56-08:00 roland@topspin.com # [PATCH] IB/ipoib: fix rx memory leak # # Fix memory leak when posting a receive buffer (pointed out by Shirley Ma). # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/ulp/ipoib/ipoib_ib.c # 2005/03/04 23:17:34-08:00 roland@topspin.com +3 -0 # IB/ipoib: fix rx memory leak # # ChangeSet # 2005/03/05 09:16:43-08:00 roland@topspin.com # [PATCH] IB/mthca: fix reset value endianness # # MTHCA_RESET_VALUE must always be swapped, since the HCA expects to see # it in big-endian order and we write it with writel. This means on # little-endian systems we have to swap it to big-endian order before # writing, and on big-endian systems we need to swap it to make up for # the additional swap that writel will do. This fixes resetting the HCA # on big-endian machines. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_reset.c # 2005/03/04 22:32:51-08:00 roland@topspin.com +1 -1 # IB/mthca: fix reset value endianness # # ChangeSet # 2005/03/05 09:16:29-08:00 roland@topspin.com # [PATCH] IB/mthca: add missing break # # Add missing break statements in switch in mthca_profile.c (pointed out # by Michael Tsirkin). # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_profile.c # 2005/03/04 23:17:32-08:00 roland@topspin.com +2 -0 # IB/mthca: add missing break # # ChangeSet # 2005/03/05 09:16:17-08:00 tduffy@sun.com # [PATCH] IB: sparse fixes # # Fix some sparse warnings by making sure we have appropriate "extern" # declarations visible. # # Signed-off-by: Tom Duffy # Signed-off-by: Hal Rosenstock ( # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/core/smi.c # 2005/03/04 22:32:51-08:00 tduffy@sun.com +1 -1 # IB: sparse fixes # # drivers/infiniband/core/mad_priv.h # 2005/03/04 23:17:28-08:00 tduffy@sun.com +2 -0 # IB: sparse fixes # # drivers/infiniband/core/cache.c # 2005/03/04 23:17:33-08:00 tduffy@sun.com +2 -0 # IB: sparse fixes # # drivers/infiniband/core/agent.c # 2005/03/04 22:32:51-08:00 tduffy@sun.com +1 -4 # IB: sparse fixes # # ChangeSet # 2005/03/05 09:16:03-08:00 shaharf@voltaire.com # [PATCH] IB: fix vendor MAD deregistration # # Fix bug when deregistering a vendor class MAD agent. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/core/mad_priv.h # 2005/03/04 23:17:35-08:00 shaharf@voltaire.com +2 -2 # IB: fix vendor MAD deregistration # # drivers/infiniband/core/mad.c # 2005/03/04 23:17:32-08:00 shaharf@voltaire.com +9 -4 # IB: fix vendor MAD deregistration # # ChangeSet # 2005/03/05 09:15:49-08:00 halr@voltaire.com # [PATCH] IB: simplify MAD code # # Remove unneeded MAD agent registration by using a single agent for # both directed-route and LID-routed MADs. # # Signed-off-by: Hal Rosenstock # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/core/agent_priv.h # 2005/03/04 22:32:50-08:00 halr@voltaire.com +1 -2 # IB: simplify MAD code # # drivers/infiniband/core/agent.c # 2005/03/04 23:17:35-08:00 halr@voltaire.com +19 -42 # IB: simplify MAD code # # ChangeSet # 2005/03/05 09:15:36-08:00 yuasa@hh.iij4u.or.jp # [PATCH] audit mips fix # # CC arch/mips/kernel/ptrace.o # arch/mips/kernel/ptrace.c: In function 'do_syscall_trace': # arch/mips/kernel/ptrace.c:310: warning: implicit declaration of function 'audit_syscall_entry' # arch/mips/kernel/ptrace.c:310: error: 'struct pt_regs' has no member named 'orig_eax' # arch/mips/kernel/ptrace.c:314: warning: implicit declaration of function 'audit_syscall_exit' # # Signed-off-by: Yoichi Yuasa # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/mips/kernel/ptrace.c # 2005/03/04 22:32:50-08:00 yuasa@hh.iij4u.or.jp +2 -1 # audit mips fix # # ChangeSet # 2005/03/05 09:15:23-08:00 rddunlap@osdl.org # [PATCH] aoe: fix printk warning # # u64's are not longlongs on sparc64 and ppc64. # # Signed-off-by: Randy Dunlap # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/block/aoe/aoeblk.c # 2005/03/04 22:32:50-08:00 rddunlap@osdl.org +4 -2 # aoe: fix printk warning # # ChangeSet # 2005/03/05 09:15:09-08:00 neilb@cse.unsw.edu.au # [PATCH] nfsd: discard CACHE_HASHED flag, keeping information in refcount instead. # # This patch should fix a problem that has been experienced on at-least one # busy NFS server, but it has not had lots of testing yet. If -mm could provide # that ..... # # The rpc auth cache currently differentiates between a reference due to # being in a hash chain (signalled by CACHE_HASHED flag) and any other # reference (counted in refcnt). # # This is an artificial difference due to an historical accident, and it # makes cache_put unsafe. # # This patch removes the distinction so now existance in a hash chain is # counted just like any other reference. Thus a race window in cache_put is # closed. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # net/sunrpc/svcauth.c # 2005/03/04 22:32:50-08:00 neilb@cse.unsw.edu.au +4 -4 # nfsd: discard CACHE_HASHED flag, keeping information in refcount instead. # # net/sunrpc/cache.c # 2005/03/04 22:32:50-08:00 neilb@cse.unsw.edu.au +1 -3 # nfsd: discard CACHE_HASHED flag, keeping information in refcount instead. # # include/linux/sunrpc/cache.h # 2005/03/04 22:32:50-08:00 neilb@cse.unsw.edu.au +5 -14 # nfsd: discard CACHE_HASHED flag, keeping information in refcount instead. # # ChangeSet # 2005/03/05 09:14:56-08:00 neilb@cse.unsw.edu.au # [PATCH] nfsd: change nfsd reply cache to use list.h lists # # also kmalloc the cache one entry at a time, instead of in one big slab. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/nfsd/cache.h # 2005/03/04 22:32:50-08:00 neilb@cse.unsw.edu.au +3 -4 # nfsd: change nfsd reply cache to use list.h lists # # fs/nfsd/nfscache.c # 2005/03/04 22:32:50-08:00 neilb@cse.unsw.edu.au +43 -88 # nfsd: change nfsd reply cache to use list.h lists # # ChangeSet # 2005/03/05 09:14:42-08:00 neilb@cse.unsw.edu.au # [PATCH] nfsd: global/static cleanups for nfsd # # The patch below contains the following cleanups: # - make some needlessly global code static # # Signed-off-by: Adrian Bunk # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/nfsd/vfs.c # 2005/03/04 22:32:50-08:00 neilb@cse.unsw.edu.au +4 -4 # nfsd: global/static cleanups for nfsd # # fs/nfsd/nfssvc.c # 2005/03/04 22:32:50-08:00 neilb@cse.unsw.edu.au +1 -1 # nfsd: global/static cleanups for nfsd # # fs/nfsd/nfsfh.c # 2005/03/04 22:32:50-08:00 neilb@cse.unsw.edu.au +6 -5 # nfsd: global/static cleanups for nfsd # # fs/nfsd/lockd.c # 2005/03/04 22:32:50-08:00 neilb@cse.unsw.edu.au +1 -1 # nfsd: global/static cleanups for nfsd # # fs/nfsd/export.c # 2005/03/04 22:32:50-08:00 neilb@cse.unsw.edu.au +11 -11 # nfsd: global/static cleanups for nfsd # # ChangeSet # 2005/03/05 09:14:29-08:00 neilb@cse.unsw.edu.au # [PATCH] nfsd: nfsd: remove pg_authenticate field # # The pg_authenticate (now pg_authenticate_obsolete) callback was only being # used by the nfs4 client callback code to circumvent the svcauth_unix code's # insistence on checking all requests against the export table. With that # problem solved, we no longer need it. # # Signed-off-by: J. Bruce Fields # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # net/sunrpc/svc.c # 2005/03/04 22:32:49-08:00 neilb@cse.unsw.edu.au +1 -4 # nfsd: nfsd: remove pg_authenticate field # # include/linux/sunrpc/svc.h # 2005/03/04 22:32:49-08:00 neilb@cse.unsw.edu.au +0 -2 # nfsd: nfsd: remove pg_authenticate field # # ChangeSet # 2005/03/05 09:14:15-08:00 neilb@cse.unsw.edu.au # [PATCH] nfsd: lockd: don't try to match callback requests against export table # # On lockd callbacks, we're a client, and the source address is that of a # server, so we shouldn't be trying to match the source address of the callback # request against our export table. # # Signed-off-by: J. Bruce Fields # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/lockd/svc.c # 2005/03/04 22:32:49-08:00 neilb@cse.unsw.edu.au +18 -0 # nfsd: lockd: don't try to match callback requests against export table # # ChangeSet # 2005/03/05 09:14:01-08:00 neilb@cse.unsw.edu.au # [PATCH] nfsd: nfs4: use new pg_set_client method to simplify nfs4 callback authentication # # Use new pg_authenticate method to simplify nfs4 callback authentication. # # This also has the effect of changing the error return from rejectedcred to # badcred. I believe the change is correct. # # Signed-off-by: J. Bruce Fields # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/nfs/callback.c # 2005/03/04 22:32:49-08:00 neilb@cse.unsw.edu.au +9 -147 # nfsd: nfs4: use new pg_set_client method to simplify nfs4 callback authentication # # ChangeSet # 2005/03/05 09:13:48-08:00 neilb@cse.unsw.edu.au # [PATCH] nfsd: svcrpc: move export table checks to a per-program pg_add_client method # # svcauth_null_accept() and svcauth_unix_accept() are currently hard-wired to # check the source ip address on an incoming request against the export table, # which make sense for nfsd but not necessarily for other rpc-based services. # # So instead we have the accept() method call a program-specific # pg_authenticate() method. We also move the call to this method into # svc_process instead of calling it from the flavor-specific accept() routines. # # Signed-off-by: J. Bruce Fields # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # net/sunrpc/svcauth_unix.c # 2005/03/04 22:32:49-08:00 neilb@cse.unsw.edu.au +2 -16 # nfsd: svcrpc: move export table checks to a per-program pg_add_client method # # net/sunrpc/svc.c # 2005/03/04 23:17:36-08:00 neilb@cse.unsw.edu.au +11 -1 # nfsd: svcrpc: move export table checks to a per-program pg_add_client method # # net/sunrpc/auth_gss/svcauth_gss.c # 2005/03/04 22:32:49-08:00 neilb@cse.unsw.edu.au +2 -7 # nfsd: svcrpc: move export table checks to a per-program pg_add_client method # # include/linux/sunrpc/svc.h # 2005/03/04 23:17:36-08:00 neilb@cse.unsw.edu.au +1 -0 # nfsd: svcrpc: move export table checks to a per-program pg_add_client method # # fs/nfsd/nfssvc.c # 2005/03/04 23:17:36-08:00 neilb@cse.unsw.edu.au +2 -0 # nfsd: svcrpc: move export table checks to a per-program pg_add_client method # # fs/lockd/svc.c # 2005/03/04 23:17:36-08:00 neilb@cse.unsw.edu.au +15 -0 # nfsd: svcrpc: move export table checks to a per-program pg_add_client method # # ChangeSet # 2005/03/05 09:13:35-08:00 neilb@cse.unsw.edu.au # [PATCH] nfsd: svcrpc: rename pg_authenticate # # Later patches remove pg_authenticate and use the name for a different purpose; # so rename it to pg_authenticate_obsolete for now. # # Signed-off-by: J. Bruce Fields # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # net/sunrpc/svc.c # 2005/03/04 23:17:37-08:00 neilb@cse.unsw.edu.au +2 -2 # nfsd: svcrpc: rename pg_authenticate # # include/linux/sunrpc/svc.h # 2005/03/04 23:17:37-08:00 neilb@cse.unsw.edu.au +1 -1 # nfsd: svcrpc: rename pg_authenticate # # fs/nfs/callback.c # 2005/03/04 23:17:37-08:00 neilb@cse.unsw.edu.au +1 -1 # nfsd: svcrpc: rename pg_authenticate # # ChangeSet # 2005/03/05 09:13:22-08:00 neilb@cse.unsw.edu.au # [PATCH] nfsd: svcrpc: add a per-flavor set_client method # # Add a set_client method to the server rpc auth_ops struct, used to set the # client (for the purposes of nfsd export authorization) using flavor-specific # information. # # Signed-off-by: J. Bruce Fields # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # net/sunrpc/svcauth_unix.c # 2005/03/04 23:17:37-08:00 neilb@cse.unsw.edu.au +2 -0 # nfsd: svcrpc: add a per-flavor set_client method # # net/sunrpc/svcauth.c # 2005/03/04 23:17:36-08:00 neilb@cse.unsw.edu.au +5 -0 # nfsd: svcrpc: add a per-flavor set_client method # # net/sunrpc/sunrpc_syms.c # 2005/03/04 22:32:49-08:00 neilb@cse.unsw.edu.au +1 -0 # nfsd: svcrpc: add a per-flavor set_client method # # net/sunrpc/auth_gss/svcauth_gss.c # 2005/03/04 23:17:37-08:00 neilb@cse.unsw.edu.au +14 -0 # nfsd: svcrpc: add a per-flavor set_client method # # include/linux/sunrpc/svcauth.h # 2005/03/04 22:32:49-08:00 neilb@cse.unsw.edu.au +2 -0 # nfsd: svcrpc: add a per-flavor set_client method # # ChangeSet # 2005/03/05 09:13:08-08:00 neilb@cse.unsw.edu.au # [PATCH] nfsd: exportfs: reduce stack usage # # find_exported_dentry() declares # char nbuf[NAME_MAX+1]; # in 2 separate places, and gcc allocates space on the stack for both # of them. Having just one of them will suffice, if we can put put # with its scope. # # Reduces function stack usage on x86-32 from 0x230 to 0x130. # # Signed-off-by: Randy Dunlap # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/exportfs/expfs.c # 2005/03/04 22:32:49-08:00 neilb@cse.unsw.edu.au +1 -3 # nfsd: exportfs: reduce stack usage # # ChangeSet # 2005/03/05 09:12:54-08:00 neilb@cse.unsw.edu.au # [PATCH] SGI 921857: find broken with nohide on NFSv3 # # This patch makes "find" work when traversing nohide exports on NFSv3. The # READDIRPLUS reply needs to not return a file handle for the ".." entry when # the directory is a server side mountpoint, which would be the directory # itself, otherwise the client remembers the wrong file handle and gets # confused. # # Signed-off-by: Greg Banks # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/nfsd/nfs3xdr.c # 2005/03/04 22:32:48-08:00 neilb@cse.unsw.edu.au +5 -0 # SGI 921857: find broken with nohide on NFSv3 # # ChangeSet # 2005/03/05 15:55:50+00:00 rmk@flint.arm.linux.org.uk # [ARM] Remove ARM specific set_pmd() # # set_pmd has specific behaviour on ARM which may be unexpected. Since # it is rather too close to macros used by other architectures, open # code this functionality. # # Signed-off-by: Russell King # # include/asm-arm/pgtable.h # 2005/03/05 15:51:55+00:00 rmk@flint.arm.linux.org.uk +0 -6 # set_pmd has specific behaviour on ARM which may be unexpected. Since # it is rather too close to macros used by other architectures, open # code this functionality. # # arch/arm/mm/mm-armv.c # 2005/03/05 15:51:55+00:00 rmk@flint.arm.linux.org.uk +5 -3 # set_pmd has specific behaviour on ARM which may be unexpected. Since # it is rather too close to macros used by other architectures, open # code this functionality. # # arch/arm/mach-sa1100/assabet.c # 2005/03/05 15:51:54+00:00 rmk@flint.arm.linux.org.uk +5 -3 # set_pmd has specific behaviour on ARM which may be unexpected. Since # it is rather too close to macros used by other architectures, open # code this functionality. # # ChangeSet # 2005/03/05 14:29:38+00:00 rmk@flint.arm.linux.org.uk # [ARM] Fix sparse warnings for ebsa110 IO implementation # # Signed-off-by: Russell King # # arch/arm/mach-ebsa110/io.c # 2005/03/05 14:25:03+00:00 rmk@flint.arm.linux.org.uk +32 -55 # Fix sparse warnings for ebsa110 IO implementation # # ChangeSet # 2005/03/05 14:20:51+00:00 rmk@flint.arm.linux.org.uk # [ARM] Add __iomem checking for __raw_{read,write}[bwl] # # Signed-off-by: Russell King # # include/asm-arm/io.h # 2005/03/05 14:16:24+00:00 rmk@flint.arm.linux.org.uk +6 -6 # Add __iomem checking for __raw_{read,write}[bwl] # # ChangeSet # 2005/03/05 14:22:13+01:00 marcel@holtmann.org # [Bluetooth] Update entry for the BPA 100/105 driver # # This patch adds the missing entry for the BPA 100/105 driver # into the MAINTAINERS file. # # Signed-off-by: Marcel Holtmann # # MAINTAINERS # 2005/03/05 14:20:42+01:00 marcel@holtmann.org +5 -0 # Update entry for the BPA 100/105 driver # # ChangeSet # 2005/03/05 14:10:28+01:00 marcel@holtmann.org # [Bluetooth] Enhance HCI callback interface # # This patch adds callback functions for changing the link key and # switching the role to the Bluetooth core interface. # # Signed-off-by: Marcel Holtmann # # net/bluetooth/hci_conn.c # 2005/03/05 14:08:48+01:00 marcel@holtmann.org +18 -0 # Enhance HCI callback interface # # net/bluetooth/hci_event.c # 2005/03/05 14:08:45+01:00 marcel@holtmann.org +31 -7 # Enhance HCI callback interface # # include/net/bluetooth/hci_core.h # 2005/03/05 14:05:56+01:00 marcel@holtmann.org +31 -1 # Enhance HCI callback interface # # ChangeSet # 2005/03/05 13:45:00+01:00 marcel@holtmann.org # [Bluetooth] Convert clock offset value from little endian # # The clock offset value is stored in little endian and so convert # it before showing it in the inquiry cache list. # # Signed-off-by: Marcel Holtmann # # net/bluetooth/hci_sysfs.c # 2005/03/05 13:43:03+01:00 marcel@holtmann.org +1 -1 # Convert clock offset value from little endian # # ChangeSet # 2005/03/05 13:31:32+01:00 marcel@holtmann.org # [Bluetooth] Remove interruptible_sleep_on_timeout() usage # # Remove deprecated interruptible_sleep_on_timeout() function calls # and replace them with direct wait-queue usage. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Marcel Holtmann # # drivers/bluetooth/bluecard_cs.c # 2005/03/05 13:30:19+01:00 marcel@holtmann.org +9 -5 # Remove interruptible_sleep_on_timeout() usage # # ChangeSet # 2005/03/05 13:29:30+01:00 marcel@holtmann.org # [Bluetooth] Don't use ISOC transfers for sniffer devices # # The sniffer devices present themself as a full H:2 device, but # actually they don't need any ISOC transfers and so don't start # them. # # Signed-off-by: Marcel Holtmann # # drivers/bluetooth/hci_usb.c # 2005/03/05 13:27:09+01:00 marcel@holtmann.org +1 -1 # Don't use ISOC transfers for sniffer devices # # ChangeSet # 2005/03/04 20:21:20-08:00 davem@northbeach.davemloft.net.davemloft.net # [TIGON3]: Update driver version and reldate. # # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2005/03/04 20:21:03-08:00 davem@northbeach.davemloft.net.davemloft.net +2 -2 # [TIGON3]: Update driver version and reldate. # # ChangeSet # 2005/03/04 20:20:02-08:00 davem@northbeach.davemloft.net.davemloft.net # [TIGON3]: Do not touch NIC_SRAM_FIRMWARE_MBOX when TG3_FLG2_SUN_570X. # # There is no firmware on these chips, so accessing this # value is pointless. But, more importantly, touching # this area on such chips results in PCI PIO timeouts. # # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2005/03/04 20:19:37-08:00 davem@northbeach.davemloft.net.davemloft.net +17 -15 # [TIGON3]: Do not touch NIC_SRAM_FIRMWARE_MBOX when TG3_FLG2_SUN_570X. # # ChangeSet # 2005/03/04 16:47:05-08:00 davem@northbeach.davemloft.net.davemloft.net # [SPARC64]: Tomatillo PCI controller bug fixes. # # - Error handlers were mis-calculating ICLR register to # ACK on Tomatillo. # - PCI error handlers should not ACK other IRQ. # - Fix Tomatillo version comparison for PCI Timeout # Interval setting # - Tomatillo PCI control register prefetch enable bits # were off. # - Tomatillo revs <= 1 need bit 61 set, all others should # have it clear. This is in the PCI control register. # # Signed-off-by: David S. Miller # # arch/sparc64/kernel/pci_schizo.c # 2005/03/04 16:46:31-08:00 davem@northbeach.davemloft.net.davemloft.net +69 -43 # [SPARC64]: Tomatillo PCI controller bug fixes. # # ChangeSet # 2005/03/04 16:12:52-08:00 torvalds@ppc970.osdl.org # Merge bk://kernel.bkbits.net/gregkh/linux/pci-2.6 # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # include/linux/pci_ids.h # 2005/03/04 16:12:48-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2005/03/04 23:55:22+00:00 rmk@flint.arm.linux.org.uk # [ARM] Fix two missed ether1_outw() function calls. # # Signed-off-by: Russell King # # drivers/net/arm/ether1.c # 2005/03/04 23:51:18+00:00 rmk@flint.arm.linux.org.uk +2 -2 # Fix two missed ether1_outw() function calls. # # ChangeSet # 2005/03/04 23:13:29+00:00 nico@org.rmk.(none) # [ARM PATCH] 2514/1: save iWMMXt context to ram before entering sleep mode # # Patch from Nicolas Pitre # # Signed-off-by: Nicolas Pitre # Signed-off-by: Russell King # # arch/arm/mach-pxa/pm.c # 2005/03/04 00:00:00+00:00 nico@org.rmk.(none) +5 -0 # [PATCH] 2514/1: save iWMMXt context to ram before entering sleep mode # # ChangeSet # 2005/03/04 22:07:11+00:00 rmk@flint.arm.linux.org.uk # [MMC] Use bus dev_attrs instead of handling device attrs manually # # Convert MMC to use bus dev_attrs instead of handling the registration # of these attributes itself. # # Signed-off-by: Russell King # # drivers/mmc/mmc_sysfs.c # 2005/03/04 22:01:12+00:00 rmk@flint.arm.linux.org.uk +37 -40 # Convert MMC to use bus dev_attrs instead of handling the registration # of these attributes itself. # # ChangeSet # 2005/03/04 21:19:20+00:00 gtj.member@com.rmk.(none) # [ARM PATCH] 2472/1: Updates 8250.c to correctly detect XScale UARTs # # Patch from George Joseph # # Modifications to autoconfig_16550a to add a testcase # to detect XScale UARTS. # # Signed-off-by: George Joseph # Signed-off-by: Russell King # # drivers/serial/8250.c # 2005/01/24 16:00:57+00:00 gtj.member@com.rmk.(none) +35 -0 # [PATCH] 2472/1: Updates 8250.c to correctly detect XScale UARTs # # ChangeSet # 2005/03/04 18:43:44+00:00 nico@org.rmk.(none) # [ARM PATCH] 2513/1: more PXA27x regs to save for sleep mode # # Patch from Nicolas Pitre # # ... plus Mainstone bits. # # Signed-off-by: Nicolas Pitre # Signed-off-by: Russell King # # arch/arm/mach-pxa/pm.c # 2005/03/04 00:00:00+00:00 nico@org.rmk.(none) +34 -7 # [PATCH] 2513/1: more PXA27x regs to save for sleep mode # # arch/arm/mach-pxa/mainstone.c # 2005/03/04 00:00:00+00:00 nico@org.rmk.(none) +9 -0 # [PATCH] 2513/1: more PXA27x regs to save for sleep mode # # ChangeSet # 2005/03/04 18:19:21+00:00 davis_g@com.rmk.(none) # [ARM PATCH] 2459/1: ARMv6 supersections for static kernel direct mapped memory regions [updated] # # Patch from George G. Davis # # Use ARMv6 supersections for 16MiB static kernel direct mapped memory # regions when possible. # Based on comments received for the first version of this patch, this # version has added a comment to clarify that ARMv6 supersections are # only valid for the domain == 0 case and moved the supersection address # mask and size macros before the hardware page table definitions. # # Signed-off-by: George G. Davis # Signed-off-by: Russell King # # include/asm-arm/pgtable.h # 2005/03/04 00:00:00+00:00 davis_g@com.rmk.(none) +8 -0 # [PATCH] 2459/1: ARMv6 supersections for static kernel direct mapped memory regions [updated] # # arch/arm/mm/mm-armv.c # 2005/03/04 00:00:00+00:00 davis_g@com.rmk.(none) +43 -1 # [PATCH] 2459/1: ARMv6 supersections for static kernel direct mapped memory regions [updated] # # ChangeSet # 2005/03/04 17:01:00+00:00 andrew@com.rmk.(none) # [ARM PATCH] 1941/2: End-of-interrupt (irq_finish) macro on ARM # # Patch from SAN People # # On some ARM-based processor's (eg, Atmel's AT91RM9200) it is necessary # to signal the end-of-interrupt to the interrupt controller. This is # necessary so it can restore its internal priority levels, etc. # This patch is equivalent to the version in the current 2.4 kernels. # Patch now updated to 2.6.11 # # Signed-off-by: Andrew Victor # Signed-off-by: Russell King # # arch/arm/kernel/irq.c # 2005/03/04 10:08:06+00:00 andrew@com.rmk.(none) +9 -0 # [PATCH] 1941/2: End-of-interrupt (irq_finish) macro on ARM # # ChangeSet # 2005/03/04 16:47:29+00:00 rpurdie@net.rmk.(none) # [ARM PATCH] 2510/1: PXA: Disable pxa_gpio_irq_type printks # # Patch from Richard Purdie # # The printks inside pxa_gpio_irq_type damage performance and are of little value in a production kernel. They should be disabled. # # Signed-off-by: Richard PurdieSigned-off-by: Nicolas Pitre # Signed-off-by: Russell King # # arch/arm/mach-pxa/irq.c # 2005/03/02 21:35:46+00:00 rpurdie@net.rmk.(none) +4 -4 # [PATCH] 2510/1: PXA: Disable pxa_gpio_irq_type printks # # ChangeSet # 2005/03/04 16:24:42+00:00 tglx@de.rmk.(none) # [ARM PATCH] 2477/1: Move double defined macro to header file # # Patch from Thomas Gleixner # # IRQ_DISPATCH is defined in two c files. Move it to the common header file. # # Signed-off-by: Thomas Gleixner # Signed-off-by: Russell King # # arch/arm/mach-lh7a40x/irq-lpd7a40x.c # 2005/03/04 00:00:00+00:00 tglx@de.rmk.(none) +0 -2 # [PATCH] 2477/1: Move double defined macro to header file # # arch/arm/mach-lh7a40x/common.h # 2005/03/04 00:00:00+00:00 tglx@de.rmk.(none) +2 -0 # [PATCH] 2477/1: Move double defined macro to header file # # arch/arm/mach-lh7a40x/arch-lpd7a40x.c # 2005/03/04 00:00:00+00:00 tglx@de.rmk.(none) +0 -2 # [PATCH] 2477/1: Move double defined macro to header file # # ChangeSet # 2005/03/03 23:15:05+00:00 nico@org.rmk.(none) # [ARM PATCH] 2509/1: fix watchdog timer frequency for PXA27x # # Patch from Nicolas Pitre # # Signed-off-by: Nicolas Pitre # Signed-off-by: Russell King # # drivers/char/watchdog/sa1100_wdt.c # 2005/02/25 18:53:29+00:00 nico@org.rmk.(none) +1 -1 # [PATCH] 2509/1: fix watchdog timer frequency for PXA27x # # ChangeSet # 2005/03/03 22:57:33+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2512/1: S3C2410 - remove bast-cpld.h from include/asm-arm/arch-s3c2410/hardware.h # # Patch from Ben Dooks # # Remove the include of bast-cpld.h, as it shouldn't be here as # it only defines some extra bast-specific registers, and does # not affect the configuration of the hardware dependenat items. # Ensure that the file is included in the one place it is needed # and not included. # This should discourage anyone else putting include files in # which do not affect the over-all hardware definitions. # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # include/asm-arm/arch-s3c2410/hardware.h # 2005/03/03 14:10:27+00:00 ben-linux@org.rmk.(none) +1 -5 # [PATCH] 2512/1: S3C2410 - remove bast-cpld.h from include/asm-arm/arch-s3c2410/hardware.h # # arch/arm/mach-s3c2410/mach-bast.c # 2005/03/03 14:11:23+00:00 ben-linux@org.rmk.(none) +2 -0 # [PATCH] 2512/1: S3C2410 - remove bast-cpld.h from include/asm-arm/arch-s3c2410/hardware.h # # ChangeSet # 2005/03/03 22:35:54+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2511/1: SMDK2440 - base machine support # # Patch from Ben Dooks # # SMDK2440 core board support # # Signed-off-by: Ben Dooks # # Signed-off-by: Dimitry Andric # Signed-off-by: Russell King # # arch/arm/mach-s3c2410/Makefile # 2005/03/03 10:30:16+00:00 ben-linux@org.rmk.(none) +1 -0 # [PATCH] 2511/1: SMDK2440 - base machine support # # arch/arm/mach-s3c2410/Kconfig # 2005/03/03 10:30:16+00:00 ben-linux@org.rmk.(none) +6 -0 # [PATCH] 2511/1: SMDK2440 - base machine support # # arch/arm/configs/s3c2410_defconfig # 2005/03/03 10:43:43+00:00 ben-linux@org.rmk.(none) +1 -0 # [PATCH] 2511/1: SMDK2440 - base machine support # # Documentation/arm/Samsung-S3C24XX/Overview.txt # 2005/03/03 10:31:25+00:00 ben-linux@org.rmk.(none) +5 -0 # [PATCH] 2511/1: SMDK2440 - base machine support # # arch/arm/mach-s3c2410/mach-smdk2440.c # 2005/03/03 10:30:16+00:00 ben-linux@org.rmk.(none) +133 -0 # [PATCH] 2511/1: SMDK2440 - base machine support # # arch/arm/mach-s3c2410/mach-smdk2440.c # 2005/03/03 10:30:16+00:00 ben-linux@org.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-s3c2410/mach-smdk2440.c # # Documentation/arm/Samsung-S3C24XX/SMDK2440.txt # 2005/03/03 10:30:16+00:00 ben-linux@org.rmk.(none) +56 -0 # [PATCH] 2511/1: SMDK2440 - base machine support # # Documentation/arm/Samsung-S3C24XX/SMDK2440.txt # 2005/03/03 10:30:16+00:00 ben-linux@org.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/Documentation/arm/Samsung-S3C24XX/SMDK2440.txt # # ChangeSet # 2005/03/03 22:09:57+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2508/1: S3C2440 - timer and irq device updates # # Patch from Ben Dooks # # The patch does a number of updates, which are inter-dependant # on each other, for the s3c2440 support and some clean-ups for # all s3c24xx architecture in general. # 1) Remove the s3c24xx_{fclk,hclk,pclk} variables, and pass # these values to the clock core on initialisation. This # removes the needless double copy, as only the timer code # uses these directly (see point 4). # Add an over-all xtal clock to the clock core # 2) Add a sysdev driver to the clock code to ensure all the # s3c2440 clocks are added if an s3c2440 is present. # 3) Add the new IRQs to irq.c, and initialise them if the # sysdev for the s3c2440 is present. # 4) Change the timer code to request the timer clk and # use it to get the frequency. # Depends on patch 2467/1 # Thanks to Guillaume Gourat for the original patches that # prompted this re-write. # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # include/asm-arm/arch-s3c2410/irqs.h # 2005/03/01 00:54:26+00:00 ben-linux@org.rmk.(none) +13 -4 # [PATCH] 2508/1: S3C2440 - timer and irq device updates # # arch/arm/mach-s3c2410/time.c # 2005/03/01 00:29:07+00:00 ben-linux@org.rmk.(none) +20 -3 # [PATCH] 2508/1: S3C2440 - timer and irq device updates # # arch/arm/mach-s3c2410/s3c2440.c # 2005/03/01 00:41:52+00:00 ben-linux@org.rmk.(none) +30 -42 # [PATCH] 2508/1: S3C2440 - timer and irq device updates # # arch/arm/mach-s3c2410/s3c2410.c # 2005/03/01 00:29:07+00:00 ben-linux@org.rmk.(none) +9 -8 # [PATCH] 2508/1: S3C2440 - timer and irq device updates # # arch/arm/mach-s3c2410/irq.c # 2005/03/01 01:02:28+00:00 ben-linux@org.rmk.(none) +173 -0 # [PATCH] 2508/1: S3C2440 - timer and irq device updates # # arch/arm/mach-s3c2410/cpu.h # 2005/03/01 00:29:07+00:00 ben-linux@org.rmk.(none) +5 -0 # [PATCH] 2508/1: S3C2440 - timer and irq device updates # # arch/arm/mach-s3c2410/cpu.c # 2005/03/01 00:29:07+00:00 ben-linux@org.rmk.(none) +5 -4 # [PATCH] 2508/1: S3C2440 - timer and irq device updates # # arch/arm/mach-s3c2410/clock.h # 2005/03/01 00:29:07+00:00 ben-linux@org.rmk.(none) +6 -9 # [PATCH] 2508/1: S3C2440 - timer and irq device updates # # arch/arm/mach-s3c2410/clock.c # 2005/03/01 00:29:07+00:00 ben-linux@org.rmk.(none) +83 -13 # [PATCH] 2508/1: S3C2440 - timer and irq device updates # # ChangeSet # 2005/03/03 21:58:16+00:00 buytenh@org.rmk.(none) # [ARM PATCH] 2491/1: make ixp2000 use section mappings for on-chip registers # # Patch from Lennert Buytenhek # # This patch makes the ixp2000 port use section mappings for on-chip # registers. This has two advantages: # 1. It saves some TLB entries. # 2. It enables us to work around ixp2400 erratum #66, for which the # suggested (and only) fix involves mapping all on-chip registers # using XCB=101 instead of XCB=000. # This patch was derived from an older patch for the same erratum # (ARM patch ID 2265/1), made by Deepak Saxena. # Note that this patch does not actually constitute a workaround for # erratum #66, it merely lays the foundation for such a workaround. # # Signed-off-by: Lennert BuytenhekSigned-off-by: Deepak Saxena # Signed-off-by: Russell King # # include/asm-arm/arch-ixp2000/vmalloc.h # 2005/02/16 23:49:43+00:00 buytenh@org.rmk.(none) +1 -1 # [PATCH] 2491/1: make ixp2000 use section mappings for on-chip registers # # include/asm-arm/arch-ixp2000/ixp2000-regs.h # 2005/02/16 23:51:04+00:00 buytenh@org.rmk.(none) +33 -26 # [PATCH] 2491/1: make ixp2000 use section mappings for on-chip registers # # include/asm-arm/arch-ixp2000/ixdp2x01.h # 2005/02/16 23:49:43+00:00 buytenh@org.rmk.(none) +2 -2 # [PATCH] 2491/1: make ixp2000 use section mappings for on-chip registers # # include/asm-arm/arch-ixp2000/ixdp2x00.h # 2005/02/16 23:49:43+00:00 buytenh@org.rmk.(none) +1 -1 # [PATCH] 2491/1: make ixp2000 use section mappings for on-chip registers # # include/asm-arm/arch-ixp2000/entry-macro.S # 2005/02/16 23:49:43+00:00 buytenh@org.rmk.(none) +3 -4 # [PATCH] 2491/1: make ixp2000 use section mappings for on-chip registers # # arch/arm/mach-ixp2000/core.c # 2005/02/16 23:50:16+00:00 buytenh@org.rmk.(none) +6 -31 # [PATCH] 2491/1: make ixp2000 use section mappings for on-chip registers # # ChangeSet # 2005/03/03 21:35:52+00:00 jelenz@edu.rmk.(none) # [ARM PATCH] 2461/1: base support for poodle machine # # Patch from John Lenz # # Adds support for the Sharp Zaurus SL-5600 # Add the ability to compile any collection of poodle and # corgi support under the PXA_SHARPSL option. # arch/arm/boot/compressed/head-sharpsl.S already has code # to detect the poodle machine. # # Signed-off-by: John Lenz # Signed-off-by: Russell King # # include/asm-arm/arch-pxa/poodle.h # 2005/03/03 00:00:00+00:00 jelenz@edu.rmk.(none) +111 -0 # [PATCH] 2461/1: base support for poodle machine # # include/asm-arm/arch-pxa/irqs.h # 2005/03/03 00:00:00+00:00 jelenz@edu.rmk.(none) +32 -0 # [PATCH] 2461/1: base support for poodle machine # # arch/arm/mach-pxa/Makefile # 2005/03/03 00:00:00+00:00 jelenz@edu.rmk.(none) +2 -1 # [PATCH] 2461/1: base support for poodle machine # # arch/arm/mach-pxa/Kconfig # 2005/03/03 00:00:00+00:00 jelenz@edu.rmk.(none) +16 -3 # [PATCH] 2461/1: base support for poodle machine # # arch/arm/Kconfig # 2005/03/03 00:00:00+00:00 jelenz@edu.rmk.(none) +1 -1 # [PATCH] 2461/1: base support for poodle machine # # include/asm-arm/arch-pxa/poodle.h # 2005/03/03 00:00:00+00:00 jelenz@edu.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-pxa/poodle.h # # arch/arm/mach-pxa/poodle.c # 2005/03/03 00:00:00+00:00 jelenz@edu.rmk.(none) +181 -0 # [PATCH] 2461/1: base support for poodle machine # # arch/arm/mach-pxa/poodle.c # 2005/03/03 00:00:00+00:00 jelenz@edu.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-pxa/poodle.c # # ChangeSet # 2005/03/03 08:29:59+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2506/1: S3C2410 - dma descriptor slab # # Patch from Ben Dooks # # Use slab allocator instead of kmalloc() to allocate the # dma buffer descriptors. This should allow the tracking # of dma descriptors, and to check if they are being freed # correctly. # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # arch/arm/mach-s3c2410/dma.c # 2005/02/28 12:57:12+00:00 ben-linux@org.rmk.(none) +24 -3 # [PATCH] 2506/1: S3C2410 - dma descriptor slab # # ChangeSet # 2005/03/03 08:13:07+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2503/1: S3C2410 - add brief documentation for HP IPAQ H1940 # # Patch from Ben Dooks # # Brief documentation for Documents/arm/Samsung-S3C24XX for the # HP IPAQ H1940 # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # Documentation/arm/Samsung-S3C24XX/H1940.txt # 2005/02/25 12:45:38+00:00 ben-linux@org.rmk.(none) +40 -0 # [PATCH] 2503/1: S3C2410 - add brief documentation for HP IPAQ H1940 # # Documentation/arm/Samsung-S3C24XX/H1940.txt # 2005/02/25 12:45:38+00:00 ben-linux@org.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/Documentation/arm/Samsung-S3C24XX/H1940.txt # # ChangeSet # 2005/03/03 07:53:43+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2502/1: S3C2410 - watchdog during kernel uncompression # # Patch from Ben Dooks # # Enable the watchdog at the start of the kernel uncompression # stage, so that if any errors occur before the kernel reaches # the stage where it can start running processes then the system # will be reset. # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # include/asm-arm/arch-s3c2410/uncompress.h # 2005/02/25 12:16:22+00:00 ben-linux@org.rmk.(none) +48 -15 # [PATCH] 2502/1: S3C2410 - watchdog during kernel uncompression # # arch/arm/mach-s3c2410/Kconfig # 2005/02/25 12:30:13+00:00 ben-linux@org.rmk.(none) +20 -0 # [PATCH] 2502/1: S3C2410 - watchdog during kernel uncompression # # ChangeSet # 2005/03/02 23:18:01-08:00 gregkh@suse.de # Merge suse.de:/home/greg/linux/BK/bleed-2.6 # into suse.de:/home/greg/linux/BK/pci-2.6 # # include/linux/pci_ids.h # 2005/03/02 23:17:58-08:00 gregkh@suse.de +0 -0 # Auto merged # # drivers/scsi/qla2xxx/qla_os.c # 2005/03/02 23:17:58-08:00 gregkh@suse.de +0 -0 # Auto merged # # drivers/pci/pci.c # 2005/03/02 23:17:57-08:00 gregkh@suse.de +0 -0 # Auto merged # # drivers/net/s2io.c # 2005/03/02 23:17:57-08:00 gregkh@suse.de +0 -0 # Auto merged # # drivers/net/r8169.c # 2005/03/02 23:17:57-08:00 gregkh@suse.de +0 -0 # Auto merged # # ChangeSet # 2005/03/03 00:56:29-05:00 jchapman@katalix.com # [PATCH] mii: add GigE support # # Add support for GigE PHYs in MII support library. # # This patch allows GigE drivers to use the MII library the same way # 10/100 drivers do. # # Since the MII library is already used by lots of network drivers and the # GigE MII register bit definitions were reserved when many 10/100 PHYs # were designed, the new GigE registers are accessed only if a driver # specifically enables it. Existing 10/100 drivers should see no behavior # differences with this change. # # Signed-off-by: James Chapman # Signed-off-by: Jeff Garzik # # include/linux/mii.h # 2005/02/25 16:12:07-05:00 jchapman@katalix.com +18 -6 # mii: add GigE support # # drivers/net/mii.c # 2005/02/25 16:12:07-05:00 jchapman@katalix.com +54 -9 # mii: add GigE support # # ChangeSet # 2005/03/02 21:36:48-08:00 yoshfuji@linux-ipv6.org # [TCP]: Put back tcp_timer_bug_msg[] symbol export. # # It is needed for tcp_reset_xmit_timer(), which is invoked by # tcp_prequeue() which is invoked from tcp_ipv6.c # # Signed-off-by: Hideaki YOSHIFUJI # Signed-off-by: David S. Miller # # net/ipv4/tcp_timer.c # 2005/03/02 21:36:38-08:00 yoshfuji@linux-ipv6.org +1 -0 # [TCP]: Put back tcp_timer_bug_msg[] symbol export. # # It is needed for tcp_reset_xmit_timer(), which is invoked by # tcp_prequeue() which is invoked from tcp_ipv6.c # # Signed-off-by: Hideaki YOSHIFUJI # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/03 00:23:55-05:00 xose@wanadoo.es # [PATCH] 2.6 eepro100: replace and delete duplicate ids # # - replace PCI_DEVICE_ID_INTEL_82557 and PCI_DEVICE_ID_INTEL_82559ER # with theirs hex numbers # - PCI_DEVICE_ID_INTEL_82801BA_7 is a duplicate of 0x2449. # # Signed-off-by: Jeff Garzik # # drivers/net/eepro100.c # 2005/02/01 15:10:15-05:00 xose@wanadoo.es +2 -6 # 2.6 eepro100: replace and delete duplicate ids # # ChangeSet # 2005/03/03 00:22:23-05:00 akpm@osdl.org # [PATCH] drivers/net/wan/z85230.c interrupt handling fix # # From: tom watson # # While working on a driver for z85230 based board I noticed what looks like # it could be a problem. If the interrupt handler is handling an interrupt # on port b and an interrupt comes in for port a, it seems to me that the # port b handler would be called instead of the port a handler, and possibly # hang the board until reset. # # Attached is a patch to set the irq methods back to port a before attempting # to call them. # # Signed-off-by: Andrew Morton # Signed-off-by: Jeff Garzik # # drivers/net/wan/z85230.c # 2005/02/24 12:39:03-05:00 akpm@osdl.org +3 -1 # drivers/net/wan/z85230.c interrupt handling fix # # ChangeSet # 2005/03/03 00:21:30-05:00 bunk@stusta.de # [PATCH] drivers/scsi/sata_*: make code static # # This patch makes needlessly global code static. # # Signed-off-by: Adrian Bunk # Signed-off-by: Jeff Garzik # # drivers/scsi/sata_vsc.c # 2005/02/28 13:55:40-05:00 bunk@stusta.de +2 -1 # drivers/scsi/sata_*: make code static # # drivers/scsi/sata_svw.c # 2005/02/28 13:55:06-05:00 bunk@stusta.de +2 -2 # drivers/scsi/sata_*: make code static # # drivers/scsi/sata_sil.c # 2005/02/28 13:54:34-05:00 bunk@stusta.de +1 -1 # drivers/scsi/sata_*: make code static # # drivers/scsi/sata_nv.c # 2005/02/28 13:54:00-05:00 bunk@stusta.de +4 -2 # drivers/scsi/sata_*: make code static # # ChangeSet # 2005/03/03 00:19:59-05:00 khc@pm.waw.pl # [PATCH] WAN drivers fix: N2, C101, PCI200SYN - quite fatal # # The last change to drivers/wan/hd6457x.c was a bit fatal to drivers # using it - the attached patch fixes NULL pointer dereference on RX. # # I've updated URLs in MAINTAINERS and wan/Kconfig as well. # # Signed-off-by: Krzysztof Halasa # Signed-off-by: Jeff Garzik # # drivers/net/wan/hd6457x.c # 2005/02/28 19:58:08-05:00 khc@pm.waw.pl +1 -1 # WAN drivers fix: N2, C101, PCI200SYN - quite fatal # # drivers/net/wan/Kconfig # 2005/02/28 19:58:08-05:00 khc@pm.waw.pl +6 -5 # WAN drivers fix: N2, C101, PCI200SYN - quite fatal # # MAINTAINERS # 2005/02/28 19:58:08-05:00 khc@pm.waw.pl +2 -2 # WAN drivers fix: N2, C101, PCI200SYN - quite fatal # # ChangeSet # 2005/03/03 00:18:38-05:00 mporter@kernel.crashing.org # [PATCH] emac: fix skb allocation for full-size jumbo frames # # Sets jumbo frame handling based on MTU and allocates rx buffers # large to handle full-size jumbo frames. # # Signed-off-by: Matt Porter # Signed-off-by: Jeff Garzik # # drivers/net/ibm_emac/ibm_emac_core.h # 2005/02/18 11:30:07-05:00 mporter@kernel.crashing.org +2 -0 # emac: fix skb allocation for full-size jumbo frames # # drivers/net/ibm_emac/ibm_emac_core.c # 2005/02/18 11:23:08-05:00 mporter@kernel.crashing.org +12 -4 # emac: fix skb allocation for full-size jumbo frames # # ChangeSet # 2005/03/03 00:17:59-05:00 rddunlap@osdl.org # [PATCH] tulip/de2104x: don't mix __init & __devinit sections # # tulip/de2104x: fix section usage, don't mix __init & __devinit: # # Error: ./drivers/net/tulip/de2104x.o .text refers to 000000000000176d R_X86_64_PC32 .init.text+0xfffffffffffffffc # Error: ./drivers/net/tulip/de2104x.o .text refers to 0000000000001798 R_X86_64_PC32 .init.text+0xfffffffffffffffc # # Signed-off-by: Randy Dunlap # Signed-off-by: Jeff Garzik # # drivers/net/tulip/de2104x.c # 2005/03/02 12:49:14-05:00 rddunlap@osdl.org +1 -1 # tulip/de2104x: don't mix __init & __devinit sections # # ChangeSet # 2005/03/03 00:17:18-05:00 rddunlap@osdl.org # [PATCH] net/wan/sbni: fix section usage # # net/wan/sbni data reference can be initdata: # # Error: ./drivers/net/wan/sbni.o .data refers to 0000000000000000 R_X86_64_64 .init.data+0x0000000000000060 # Error: ./drivers/net/wan/sbni.o .data refers to 0000000000000008 R_X86_64_64 .init.data+0x0000000000000140 # Error: ./drivers/net/wan/sbni.o .data refers to 0000000000000010 R_X86_64_64 .init.data+0x0000000000000180 # Error: ./drivers/net/wan/sbni.o .data refers to 0000000000000018 R_X86_64_64 .init.data+0x0000000000000020 # Error: ./drivers/net/wan/sbni.o .data refers to 0000000000000020 R_X86_64_64 .init.data+0x00000000000001c0 # # Signed-off-by: Randy Dunlap # Signed-off-by: Jeff Garzik # # drivers/net/wan/sbni.c # 2005/03/02 12:45:09-05:00 rddunlap@osdl.org +1 -1 # net/wan/sbni: fix section usage # # ChangeSet # 2005/03/03 00:15:00-05:00 liml@rtr.ca # [PATCH] sata_qstor: eh_timeout fix # # Here is an update to sata_qstor.c to enable full/proper # register access during eh_timeout handling. # # Signed-off-by: Mark Lord # Signed-off-by: Jeff Garzik # # drivers/scsi/sata_qstor.c # 2005/02/28 11:19:31-05:00 liml@rtr.ca +24 -6 # sata_qstor: eh_timeout fix # # ChangeSet # 2005/03/03 00:09:04-05:00 rddunlap@osdl.org # [PATCH] prism54: fix printk format warnings # # prism54 build shows some printk format complaints: # (sparc64 build warning) # # drivers/net/wireless/prism54/isl_38xx.c:131: warning: long int format, different type arg (arg 3) # drivers/net/wireless/prism54/isl_38xx.c:151: warning: long int format, different type arg (arg 3) # # cross-compile results: # https://www.osdl.org/plm-cgi/plm?module=patch_info&patch_id=4240 # # Signed-off-by: Randy Dunlap # Signed-off-by: Jeff Garzik # # drivers/net/wireless/prism54/isl_38xx.c # 2005/03/01 23:15:00-05:00 rddunlap@osdl.org +6 -6 # prism54: fix printk format warnings # # ChangeSet # 2005/03/03 00:07:46-05:00 takis@lumumba.luc.ac.be # [PATCH] Possible AMD8111e free irq issue # # It seems to me that if in the amd8111e_open() fuction dev->irq isn't # zero and the irq request succeeds it might not get released anymore. # # Specifically, on failure of the amd8111e_restart() call the function # returns -ENOMEM without releasing the irq. The amd8111e_restart() # function can fail because of various pci_alloc_consistent() and # dev_alloc_skb() calls in amd8111e_init_ring() which is being # called by amd8111e_restart. # # 1374 if(dev->irq ==0 || request_irq(dev->irq, amd8111e_interrupt, SA_SHIRQ, # 1375 dev->name, dev)) # 1376 return -EAGAIN; # # Signed-off-by: Jeff Garzik # # drivers/net/amd8111e.c # 2005/02/28 07:45:09-05:00 takis@lumumba.luc.ac.be +2 -0 # Possible AMD8111e free irq issue # # ChangeSet # 2005/03/03 00:04:43-05:00 tvignaud@mandrakesoft.com # [PATCH] fix driver name in dl2k as returned by ETHTOOL_GDRVINFO # # The GDRVINFO command of the ETHTOOL ioctl returns a bogus driver name. # # this bug confusees various network config tools... # # see mdk bug #12609 (http://qa.mandrakesoft.com/show_bug.cgi?id=12609) # for reference # # Signed-off-by: Thierry Vignaud # Signed-off-by: Jeff Garzik # # drivers/net/dl2k.c # 2005/02/25 13:26:52-05:00 tvignaud@mandrakesoft.com +1 -1 # fix driver name in dl2k as returned by ETHTOOL_GDRVINFO # # ChangeSet # 2005/03/03 00:02:38-05:00 sfeldma@pobox.com # [PATCH] eepro100: remove ID for 82556 # # 82556 support doesn't work with eepro100, so this removes the ID # (0x1228) for 82556. See this thread for more info: # # http://marc.theaimsgroup.com/?l=linux-kernel&m=110726223221165&w=2 # # Signed-off-by: Scott Feldman # Signed-off-by: Jeff Garzik # # drivers/net/eepro100.c # 2005/03/03 00:02:31-05:00 sfeldma@pobox.com +0 -1 # [PATCH] eepro100: remove ID for 82556 # # 82556 support doesn't work with eepro100, so this removes the ID # (0x1228) for 82556. See this thread for more info: # # http://marc.theaimsgroup.com/?l=linux-kernel&m=110726223221165&w=2 # # Signed-off-by: Scott Feldman # Signed-off-by: Jeff Garzik # # ChangeSet # 2005/03/03 00:01:46-05:00 linville@redhat.com # [PATCH] sk98lin: add MODULE_DEVICE_TABLE entry # # Signed-off-by: Jeff Garzik # # drivers/net/sk98lin/skge.c # 2005/03/03 00:01:39-05:00 linville@redhat.com +2 -0 # [PATCH] sk98lin: add MODULE_DEVICE_TABLE entry # # Signed-off-by: Jeff Garzik # # ChangeSet # 2005/03/03 00:00:49-05:00 pavel@suse.cz # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/via-velocity.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +2 -2 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/via-rhine.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +1 -1 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/typhoon.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +5 -5 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/tulip/tulip_core.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +1 -1 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/tg3.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +2 -2 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/sungem.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +1 -1 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/sis900.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +1 -1 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/ne2k-pci.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +2 -2 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/natsemi.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +1 -1 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/irda/donauboe.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +1 -1 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/epic100.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +1 -1 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/eepro100.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +3 -3 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/e100.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +2 -2 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/b44.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +1 -1 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/amd8111e.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +1 -1 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/8139too.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +1 -1 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/3c59x.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +1 -1 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # ChangeSet # 2005/03/02 23:58:29-05:00 mporter@kernel.crashing.org # [PATCH] Add PPC440SP support to IBM EMAC driver # # Configures EMAC thresholds appropriately for the EMAC on the PPC440SP. # # Signed-off-by: Matt Porter # Signed-off-by: Jeff Garzik # # drivers/net/ibm_emac/ibm_emac.h # 2005/03/02 23:58:23-05:00 mporter@kernel.crashing.org +4 -0 # [PATCH] Add PPC440SP support to IBM EMAC driver # # Configures EMAC thresholds appropriately for the EMAC on the PPC440SP. # # Signed-off-by: Matt Porter # Signed-off-by: Jeff Garzik # # ChangeSet # 2005/03/02 23:57:27-05:00 sfeldma@pobox.com # [PATCH] e100: remove reference to NAPI config option # # e100 is NAPI all the time, so the Kconfig option is wasting space. # # Signed-off-by: Scott Feldman # Signed-off-by: Jeff Garzik # # drivers/net/Kconfig # 2005/03/02 23:57:20-05:00 sfeldma@pobox.com +0 -17 # [PATCH] e100: remove reference to NAPI config option # # e100 is NAPI all the time, so the Kconfig option is wasting space. # # Signed-off-by: Scott Feldman # Signed-off-by: Jeff Garzik # # Documentation/networking/e100.txt # 2005/03/02 23:57:20-05:00 sfeldma@pobox.com +1 -2 # [PATCH] e100: remove reference to NAPI config option # # e100 is NAPI all the time, so the Kconfig option is wasting space. # # Signed-off-by: Scott Feldman # Signed-off-by: Jeff Garzik # # ChangeSet # 2005/03/02 23:55:36-05:00 akpm@osdl.org # [PATCH] smc91x: power down PHY on suspend # # From: Ian Campbell # # Powering down the PHY saves something like 100mA at 5V on my platform. # Currently it is only done when the interface is brought down but it makes # sense to do it on suspend as well. # # Signed-off-by: Ian Campbell # Signed-off-by: Nicolas Pitre # Signed-off-by: Andrew Morton # Signed-off-by: Jeff Garzik # # drivers/net/smc91x.c # 2005/03/02 23:55:29-05:00 akpm@osdl.org +20 -17 # [PATCH] smc91x: power down PHY on suspend # # From: Ian Campbell # # Powering down the PHY saves something like 100mA at 5V on my platform. # Currently it is only done when the interface is brought down but it makes # sense to do it on suspend as well. # # Signed-off-by: Ian Campbell # Signed-off-by: Nicolas Pitre # Signed-off-by: Andrew Morton # Signed-off-by: Jeff Garzik # # ChangeSet # 2005/03/02 23:54:56-05:00 jgarzik@pobox.com # [wireless atmel] Add support LG LW2100N WLAN PCMCIA card # # Originally from Serge A. Suchkov . # # drivers/net/wireless/atmel_cs.c # 2005/03/02 23:54:50-05:00 jgarzik@pobox.com +2 -1 # [wireless atmel] Add support LG LW2100N WLAN PCMCIA card # # Originally from Serge A. Suchkov . # # ChangeSet # 2005/03/02 23:50:42-05:00 akpm@osdl.org # [PATCH] Add OMAP support to smc91x Ethernet driver # # From: Tony Lindgren # # Following patch adds support for various OMAP boards to smc91x. # # Signed-off-by: Tony Lindgren # Signed-off-by: Andrew Morton # Signed-off-by: Jeff Garzik # # drivers/net/smc91x.h # 2005/03/02 23:50:34-05:00 akpm@osdl.org +20 -0 # [PATCH] Add OMAP support to smc91x Ethernet driver # # From: Tony Lindgren # # Following patch adds support for various OMAP boards to smc91x. # # Signed-off-by: Tony Lindgren # Signed-off-by: Andrew Morton # Signed-off-by: Jeff Garzik # # ChangeSet # 2005/03/02 23:49:14-05:00 rddunlap@osdl.org # [PATCH] (v2) arlan: remove gcc warning with CONFIG_PROC_FS=n # # Signed-off-by: Jeff Garzik # # drivers/net/wireless/arlan.h # 2005/03/02 23:49:07-05:00 rddunlap@osdl.org +2 -2 # [PATCH] (v2) arlan: remove gcc warning with CONFIG_PROC_FS=n # # Signed-off-by: Jeff Garzik # # ChangeSet # 2005/03/02 23:48:04-05:00 ganesh.venkatesan@intel.com # [PATCH] ixgb: Documentation/networking/ixgb.txt # # Signed-off-by: Jeff Garzik # # Documentation/networking/ixgb.txt # 2005/03/02 23:47:54-05:00 ganesh.venkatesan@intel.com +4 -5 # [PATCH] ixgb: Documentation/networking/ixgb.txt # # Signed-off-by: Jeff Garzik # # ChangeSet # 2005/03/03 02:32:18+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2500/1: S3C2410 - include/asm-arm/arch-s3c2410/regs-adc.h # # Patch from Ben Dooks # # S3C2410 ADC register definitions # Patch from Shannon Holland # # Signed-off-by: Shannon Holland # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # include/asm-arm/arch-s3c2410/regs-adc.h # 2005/02/22 18:03:36+00:00 ben-linux@org.rmk.(none) +63 -0 # [PATCH] 2500/1: S3C2410 - include/asm-arm/arch-s3c2410/regs-adc.h # # include/asm-arm/arch-s3c2410/regs-adc.h # 2005/02/22 18:03:36+00:00 ben-linux@org.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-s3c2410/regs-adc.h # # ChangeSet # 2005/03/03 02:11:30+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2495/1: 21285 - fix build warnings # # Patch from Ben Dooks # # 21285 serial driver has a couple of sparse errors from zero # initialiser, as well as an unused label. # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # drivers/serial/21285.c # 2005/02/21 12:34:22+00:00 ben-linux@org.rmk.(none) +0 -3 # [PATCH] 2495/1: 21285 - fix build warnings # # ChangeSet # 2005/03/03 01:52:00+00:00 cbrake@com.rmk.(none) # [ARM PATCH] 2488/1: Update Vibren PXA255 IDP support # # Patch from Cliff Brake # # Changes to machine specific files and add defconfig so the CONFIG_ARCH_PXA_IDP machine will build and run. Changes are mostly related to the 2.6 driver model. Also removed code that is no longer required -- support for older versions of hardware, etc. # # Signed-off-by: Cliff Brake # Signed-off-by: Russell King # # include/asm-arm/arch-pxa/idp.h # 2005/02/16 16:52:21+00:00 cbrake@com.rmk.(none) +13 -277 # [PATCH] 2488/1: Update Vibren PXA255 IDP support # # arch/arm/mach-pxa/leds-idp.c # 2005/02/16 16:52:21+00:00 cbrake@com.rmk.(none) +1 -0 # [PATCH] 2488/1: Update Vibren PXA255 IDP support # # arch/arm/mach-pxa/idp.c # 2005/02/16 16:52:21+00:00 cbrake@com.rmk.(none) +113 -47 # [PATCH] 2488/1: Update Vibren PXA255 IDP support # # arch/arm/configs/pxa255-idp_defconfig # 2005/02/16 16:52:21+00:00 cbrake@com.rmk.(none) +765 -0 # [PATCH] 2488/1: Update Vibren PXA255 IDP support # # arch/arm/configs/pxa255-idp_defconfig # 2005/02/16 16:52:21+00:00 cbrake@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/configs/pxa255-idp_defconfig # # ChangeSet # 2005/03/03 01:37:23+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2483/1: S3C2410 - serial sparse error # # Patch from Ben Dooks # # Eliminate NULL initiated fields in the port structures # which where causing errors from sparse. # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # drivers/serial/s3c2410.c # 2005/02/14 16:58:39+00:00 ben-linux@org.rmk.(none) +0 -6 # [PATCH] 2483/1: S3C2410 - serial sparse error # # ChangeSet # 2005/03/03 01:16:06+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2482/1: IXP2000 - header cleanup # # Patch from Ben Dooks # # fix the following problems: # lib/iomap.c:140: warning: passing arg 1 of `__raw_readsb' makes pointer from integer without a cast # lib/iomap.c:156: warning: passing arg 1 of `__raw_writesb' makes pointer from integer without a cast # include/asm-arm/arch-ixp2000/io.h modified to have (void __iomem *) in front of the alignment code # include/asm/arch/system.h:22: warning: `cli' is deprecated (declared at include/linux/interrupt.h:65) # cli() replace by local_irq_disable # arch/arm/mach-ixp2000/ixdp2x01.c:116: warning: passing arg 1 of `ixp2000_reg_write' from incompatible pointer type # arch/arm/mach-ixp2000/ixdp2x01.c:117: warning: passing arg 1 of `ixp2000_reg_write' from incompatible pointer type # fixed definition of the cpld registers IXDP2X01_CPLD_VIRT_REG() # # Signed-off-by: Ben DooksLooks okay. Test-booted on ENP-2611, no problem. # # # Signed-off-by: Lennert Buytenhek # Signed-off-by: Russell King # # ChangeSet # 2005/03/02 16:59:57-08:00 c.lucas@ifrance.com # [PATCH] drivers/w1/*: convert to pci_register_driver # # convert from pci_module_init to pci_register_driver # (from:http://kerneljanitors.org/TODO). # # Signed-off-by: Christophe Lucas # Signed-off-by: Greg Kroah-Hartman # # drivers/w1/matrox_w1.c # 2005/03/02 09:56:32-08:00 c.lucas@ifrance.com +1 -1 # drivers/w1/*: convert to pci_register_driver # # ChangeSet # 2005/03/02 16:59:41-08:00 johnpol@2ka.mipt.ru # [PATCH] w1: get rid of the potential problems with atomic operations. # # Get rid of the potential problems with atomic operations. # # According to upcoming atomic_ops.txt by David Miller and Anton Blanchard # some archs may reoder atomic operations with nonatomic, since # the former are always visible but the latter are not, this can lead # to unpredicted behaviour. # # Signed-off-by: Evgeniy Polyakov # Signed-off-by: Greg Kroah-Hartman # # drivers/w1/w1_therm.c # 2005/03/02 09:56:44-08:00 johnpol@2ka.mipt.ru +2 -0 # w1: get rid of the potential problems with atomic operations. # # drivers/w1/w1_family.c # 2005/03/02 09:56:44-08:00 johnpol@2ka.mipt.ru +2 -0 # w1: get rid of the potential problems with atomic operations. # # ChangeSet # 2005/03/02 16:59:25-08:00 johnpol@2ka.mipt.ru # [PATCH] w1: replace obsoleted *sleep_on* # # Remove obsoleded *sleep_on*. # # Since they are used only to wait for a given flags and awakening # only happens on signals, we can just replace them with # msleep_interruptible. # # Signed-off-by: Evgeniy Polyakov # Signed-off-by: Greg Kroah-Hartman # # drivers/w1/w1_int.c # 2005/03/02 09:56:50-08:00 johnpol@2ka.mipt.ru +0 -1 # w1: replace obsoleted *sleep_on* # # drivers/w1/w1.h # 2005/03/02 09:56:50-08:00 johnpol@2ka.mipt.ru +0 -1 # w1: replace obsoleted *sleep_on* # # drivers/w1/w1.c # 2005/03/02 09:56:50-08:00 johnpol@2ka.mipt.ru +5 -13 # w1: replace obsoleted *sleep_on* # # ChangeSet # 2005/03/02 16:59:08-08:00 greg@kroah.com # [PATCH] w1: fix some compiler warnings generated by the last "static" patch. # # Signed-off-by: Greg Kroah-Hartman # # drivers/w1/dscore.h # 2005/03/02 09:57:48-08:00 greg@kroah.com +0 -3 # w1: fix some compiler warnings generated by the last "static" patch. # # drivers/w1/dscore.c # 2005/03/02 09:57:48-08:00 greg@kroah.com +0 -3 # w1: fix some compiler warnings generated by the last "static" patch. # # ChangeSet # 2005/03/02 16:58:52-08:00 johnpol@2ka.mipt.ru # [PATCH] w1: Core cleanup 1/2 # # Trivial cleanups, mostly static/non static, removed unneded exports. # It fuzzes a bit, sorry, patch is quite old. # # Signed-off-by: Evgeniy Polyakov # Signed-off-by: Greg Kroah-Hartman # # drivers/w1/w1_int.c # 2005/03/02 09:57:55-08:00 johnpol@2ka.mipt.ru +0 -3 # w1: Core cleanup 1/2 # # drivers/w1/w1_family.c # 2005/03/02 09:57:55-08:00 johnpol@2ka.mipt.ru +0 -2 # w1: Core cleanup 1/2 # # drivers/w1/w1.c # 2005/03/02 09:57:55-08:00 johnpol@2ka.mipt.ru +10 -13 # w1: Core cleanup 1/2 # # ChangeSet # 2005/03/02 16:58:36-08:00 johnpol@2ka.mipt.ru # [PATCH] w1: dscore cleanups. 2/2 # # Trivial cleanups, mostly static/non static, removed unneded exports. # # Signed-off-by: Evgeniy Polyakov # Signed-off-by: Greg Kroah-Hartman # # drivers/w1/dscore.c # 2005/03/02 09:58:02-08:00 johnpol@2ka.mipt.ru +14 -10 # w1: dscore cleanups. 2/2 # # ChangeSet # 2005/03/02 16:58:20-08:00 nacc@us.ibm.com # [PATCH] w1/w1_therm: replace schedule_timeout() with msleep_interruptible() # # Description: Use msleep_interruptible() instead of schedule_timeout() to # guarantee the task delays as expected. Changed tm to an int, as it now is in # terms of msecs, not jiffies. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Evgeniy Polyakov # Signed-off-by: Greg Kroah-Hartman # # drivers/w1/w1_therm.c # 2005/03/02 09:59:29-08:00 nacc@us.ibm.com +4 -6 # w1/w1_therm: replace schedule_timeout() with msleep_interruptible() # # include/asm-arm/arch-ixp2000/system.h # 2005/02/14 00:35:09+00:00 ben-linux@org.rmk.(none) +1 -1 # [PATCH] 2482/1: IXP2000 - header cleanup # # include/asm-arm/arch-ixp2000/ixdp2x01.h # 2005/02/14 00:34:41+00:00 ben-linux@org.rmk.(none) +1 -1 # [PATCH] 2482/1: IXP2000 - header cleanup # # include/asm-arm/arch-ixp2000/io.h # 2005/02/14 00:39:16+00:00 ben-linux@org.rmk.(none) +2 -2 # [PATCH] 2482/1: IXP2000 - header cleanup # # ChangeSet # 2005/03/03 00:55:12+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2470/1: S3C2410 Documentation - add Guillaume Gourat # # Patch from Ben Dooks # # Add Guillaume Gourat to list of port contributors # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # Documentation/arm/Samsung-S3C24XX/Overview.txt # 2005/02/11 00:02:19+00:00 ben-linux@org.rmk.(none) +2 -0 # [PATCH] 2470/1: S3C2410 Documentation - add Guillaume Gourat # # ChangeSet # 2005/03/03 00:37:40+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2469/1: S3C2410 - add S3C2410_TCFG1_MUX4_SHIFT definition # # Patch from Ben Dooks # # Add missing S3C2410_TCFG1_MUX4_SHIFT # Patch from Guillaume Gourat # # Signed-off-by: Guillaume GOURAT # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # include/asm-arm/arch-s3c2410/regs-timer.h # 2005/02/11 00:04:43+00:00 ben-linux@org.rmk.(none) +2 -0 # [PATCH] 2469/1: S3C2410 - add S3C2410_TCFG1_MUX4_SHIFT definition # # ChangeSet # 2005/03/03 00:18:41+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2467/1: S3C2440 - camera interface device # # Patch from Ben Dooks # # Add s3c2440 camera interface device definition # Patch from Guillaume GOURAT # # Signed-off-by: Guillaume GOURAT # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # ChangeSet # 2005/03/02 16:13:45-08:00 khali@linux-fr.org # [PATCH] I2C: Trivial indentation fix in i2c/chips/Kconfig # # Hi Greg, # # Quoting myself: # # > (...) I also think I see an indentation issue on the "tristate" line, # > seemingly copied from the SENSORS_DS1621 section which would need to # > be fixed as well. # # Here is the trivial patch fixing that, if you want to apply it. # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/Kconfig # 2005/03/02 07:15:12-08:00 khali@linux-fr.org +1 -1 # I2C: Trivial indentation fix in i2c/chips/Kconfig # # ChangeSet # 2005/03/02 16:13:14-08:00 khali@linux-fr.org # [PATCH] I2C: Change of i2c co-maintainer # # Since I am working more actively than Philip (or anyone else, for that # matter) on the i2c subsystem these days, it would probably make sense # that I am listed as the co-maintainer instead of him. # # Signed-off-by: Jean Delvare # Acked-by: Philip Edelbrock # Signed-off-by: Greg Kroah-Hartman # # MAINTAINERS # 2005/03/02 10:50:04-08:00 khali@linux-fr.org +2 -2 # I2C: Change of i2c co-maintainer # # include/asm-arm/arch-s3c2410/map.h # 2005/02/10 17:35:15+00:00 ben-linux@org.rmk.(none) +5 -0 # [PATCH] 2467/1: S3C2440 - camera interface device # # include/asm-arm/arch-s3c2410/irqs.h # 2005/02/10 17:41:08+00:00 ben-linux@org.rmk.(none) +3 -1 # [PATCH] 2467/1: S3C2440 - camera interface device # # arch/arm/mach-s3c2410/devs.h # 2005/02/10 17:40:27+00:00 ben-linux@org.rmk.(none) +12 -0 # [PATCH] 2467/1: S3C2440 - camera interface device # # arch/arm/mach-s3c2410/devs.c # 2005/02/10 17:39:56+00:00 ben-linux@org.rmk.(none) +36 -0 # [PATCH] 2467/1: S3C2440 - camera interface device # # ChangeSet # 2005/03/03 00:00:59+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2465/1: VR1000 - add power-off hook # # Patch from Ben Dooks # # Add PM hook to power board down when requested # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # ChangeSet # 2005/03/02 15:50:42-08:00 gregkh@suse.de # [PATCH] I2C: fixed up the i2c-id.h algo ids. # # Thanks to Jean Delvare for the help with this. # # Signed-off-by: Greg Kroah-Hartman # # include/linux/i2c-id.h # 2005/03/02 15:48:37-08:00 gregkh@suse.de +9 -6 # I2C: fixed up the i2c-id.h algo ids. # # arch/arm/mach-s3c2410/mach-vr1000.c # 2005/02/10 15:03:12+00:00 ben-linux@org.rmk.(none) +9 -1 # [PATCH] 2465/1: VR1000 - add power-off hook # # ChangeSet # 2005/03/02 23:39:59+00:00 jelenz@edu.rmk.(none) # [ARM PATCH] 2460/1: fix up resource usage on locomo # # Patch from John Lenz # # Add the list of devices on the locomo chip, and change around # how resources and struct resource are used. There is only one # struct resource for the entire locomo, but each driver will # call request_mem_region on the pieces it is using. # Secondly, add a few helper functions to locomo.c to control # GPIOs and DAC. # # Signed-off-by: John Lenz # Signed-off-by: Russell King # # include/asm-arm/hardware/locomo.h # 2005/03/02 00:00:00+00:00 jelenz@edu.rmk.(none) +113 -111 # [PATCH] 2460/1: fix up resource usage on locomo # # arch/arm/common/locomo.c # 2005/03/02 00:00:00+00:00 jelenz@edu.rmk.(none) +330 -29 # [PATCH] 2460/1: fix up resource usage on locomo # # ChangeSet # 2005/03/02 23:20:52+00:00 dsaxena@net.rmk.(none) # [ARM PATCH] 2450/1: Add missing REG_OFFSET to ixp4xx platform.h header # # Patch from Deepak Saxena # # Patch 2449/1 depends on this since it removes REG_OFFSET from the # individual board implementations. # # Signed-off-by: Deepak Saxena # Signed-off-by: Russell King # # ChangeSet # 2005/03/02 15:03:48-08:00 khali@linux-fr.org # [PATCH] I2C: w83627hf needs i2c-isa # # The w83627hf driver is useless unless i2c-isa is present. All other # drivers in this case do select I2C_ISA through Kconfig, so this one # should as well do. # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/Kconfig # 2005/03/02 09:54:07-08:00 khali@linux-fr.org +1 -0 # I2C: w83627hf needs i2c-isa # # ChangeSet # 2005/03/02 15:03:32-08:00 akpm@osdl.org # [PATCH] I2C: saa7146 build fix # # include/media/saa7146.h:160: parse error before `*' # include/media/saa7146.h:160: warning: function declaration isn't a prototype # # # Signed-off-by: Andrew Morton # Signed-off-by: Greg Kroah-Hartman # # include/media/saa7146.h # 2005/03/02 09:54:20-08:00 akpm@osdl.org +1 -1 # I2C: saa7146 build fix # # ChangeSet # 2005/03/02 15:03:15-08:00 khali@linux-fr.org # [PATCH] Add class definition to the elektor bus driver # # Hi Frank, all, # # > > Which bus driver are you using? It obviously lacks class declaration, # > > so the correct fix is to add the class there. # > # > The modules that are loading are (in reverse order): # > adm1031 # > ad5321 # > mic184 # > pca9540 # > i2c_sensor # > i2c_elektor # > i2c_algo_pcf # > i2c_core # > # > So I believe what you are asking for is the i2c_elektor driver for the # > PCF8584 ISA to I2C chip. # # Correct, I just checked and this one actually lacks its class. Patch # follows. # # This patch adds a class definition to the elektor i2c bus driver. # Without this definition, hardware monitoring chips located on such # busses cannot possibly be driven. # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/busses/i2c-elektor.c # 2005/03/02 09:54:29-08:00 khali@linux-fr.org +1 -0 # Add class definition to the elektor bus driver # # ChangeSet # 2005/03/02 15:03:00-08:00 minyard@acm.org # [PATCH] I2C: minor I2C cleanups # # This is one in a series of patches for adding a non-blocking interface # to the I2C driver for supporting the IPMI SMBus driver. This patch is a # simply some minor cleanups and is in addition to the patch by Mickey # Stein (http://marc.theaimsgroup.com/?l=linux-kernel&m=110919738708916&w=2). # # Clean up some general I2C things. Fix some grammar and put () # around all the #defines that are compound to avoid nasty # side-effects. # # Signed-off-by: Corey Minyard # Signed-off-by: Greg Kroah-Hartman # # include/linux/i2c.h # 2005/03/02 09:54:36-08:00 minyard@acm.org +25 -25 # I2C: minor I2C cleanups # # ChangeSet # 2005/03/02 15:02:43-08:00 ben-linux@fluff.org # [PATCH] I2C: S3C2410 missing I2C_CLASS_HWMON # # None of the standard sensor drivers currently recognise the s3c24xx # I2C controller as it does not have I2C_CLASS_HWMON set in the # adapter class field. # # The attached patch initialises the adapter class to I2C_CLASS_HWMON # # Signed-off-by: Ben Dooks # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/busses/i2c-s3c2410.c # 2005/03/02 09:54:46-08:00 ben-linux@fluff.org +1 -0 # I2C: S3C2410 missing I2C_CLASS_HWMON # # ChangeSet # 2005/03/02 15:02:27-08:00 yekkim@pacbell.net # [PATCH] I2C: Fix some gcc 4.0 compile failures and warnings # # gcc 4.0.x cvs seems to dislike "include/linux/i2c.h file" and others due # to a current gcc 4.0.x change having to do with array declarations. # # Example error msg: include/linux/i2c.h:{55,194} error: array type has # incomplete element type # # A. Daplas has recently done a workaround for this on another header # file. A thread discussing this can be found by following the link below: # # http://gcc.gnu.org/ml/gcc/2005-02/msg00053.html # # The patch changes the array(struct i2c_msg) declaration used by # *i2c_transfer and *master_xfer from "struct i2c_msg msg[]" format to # "struct i2c_msg *msg". # # After some grepping, I came up with about a dozen files that used the # format disliked by gcc4 that're addressed by the attached patch. # Tested on gcc 3.x & gcc 4.x by configuring kernel with all i2c switches # enabled as module, and saw no errors or warnings in i2c. # # Signed-off-by: Mickey Stein # Signed-off-by: Greg Kroah-Hartman # # include/media/saa7146.h # 2005/03/02 09:55:02-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # include/linux/i2c.h # 2005/03/02 09:55:02-08:00 yekkim@pacbell.net +2 -2 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/media/video/saa7134/saa7134-i2c.c # 2005/03/02 09:55:02-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/media/video/bttv-i2c.c # 2005/03/02 09:55:02-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c # 2005/03/02 09:55:03-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c # 2005/03/02 09:55:03-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/media/dvb/b2c2/skystar2.c # 2005/03/02 09:55:03-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/media/common/saa7146_i2c.c # 2005/03/02 09:55:03-08:00 yekkim@pacbell.net +4 -4 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/i2c/i2c-core.c # 2005/03/02 09:55:02-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/i2c/busses/i2c-s3c2410.c # 2005/03/02 09:55:02-08:00 yekkim@pacbell.net +2 -2 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/i2c/busses/i2c-mpc.c # 2005/03/02 09:55:02-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/i2c/busses/i2c-keywest.c # 2005/03/02 09:55:02-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/i2c/busses/i2c-iop3xx.c # 2005/03/02 09:55:02-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/i2c/busses/i2c-ibm_iic.c # 2005/03/02 09:55:03-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/i2c/busses/i2c-au1550.c # 2005/03/02 09:55:03-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/i2c/algos/i2c-algo-sgi.c # 2005/03/02 09:55:02-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/i2c/algos/i2c-algo-pcf.c # 2005/03/02 09:55:03-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/i2c/algos/i2c-algo-pca.c # 2005/03/02 09:55:02-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/i2c/algos/i2c-algo-ite.c # 2005/03/02 09:55:03-08:00 yekkim@pacbell.net +2 -2 # I2C: Fix some gcc 4.0 compile failures and warnings # # Documentation/i2c/writing-clients # 2005/03/02 09:55:02-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # ChangeSet # 2005/03/02 15:02:10-08:00 khali@linux-fr.org # [PATCH] I2C: Make i2c list terminators explicitely unsigned # # Shouldn't the i2c list terminators be explicitely declared as unsigned? # I'd hope it to help code analysis tools and possibly avoid false # positives. Coverity's SWAT pointed my attention to these constants. # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # include/linux/i2c.h # 2005/03/02 09:55:12-08:00 khali@linux-fr.org +2 -2 # I2C: Make i2c list terminators explicitely unsigned # # ChangeSet # 2005/03/02 15:01:52-08:00 khali@linux-fr.org # [PATCH] I2C: Remove NULL client checks in rtc8564 driver # # Several functions in your rtc8564 driver verify the non-NULLity of the # i2c client that is passed to them. It doesn't seem to be necessary, as I # can't think of any case where these functions could possibly be called # with a NULL i2c client. As a matter of fact, I couldn't find any similar # driver doing such checks. # # My attention was brought on this by Coverity's SWAT which correctly # noticed that three of these functions contain explicit or hidden # dereferences of the i2c client pointer *before* the NULL check. I guess # it wasn't a problem because the NULL case cannot happen (unless I miss # something), but this still is confusing code. # # Thus I propose the following changes: # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/rtc8564.c # 2005/03/02 09:55:20-08:00 khali@linux-fr.org +8 -8 # I2C: Remove NULL client checks in rtc8564 driver # # include/asm-arm/arch-ixp4xx/platform.h # 2005/02/02 18:09:04+00:00 dsaxena@net.rmk.(none) +6 -0 # [PATCH] 2450/1: Add missing REG_OFFSET to ixp4xx platform.h header # # ChangeSet # 2005/03/02 22:57:50+00:00 dsaxena@net.rmk.(none) # [ARM PATCH] 2449/1: Make IXP4xx use platform devices for serial ports # # Patch from Deepak Saxena # # Signed-off-by: Deepak Saxena # Signed-off-by: Russell King # # arch/arm/mach-ixp4xx/ixdp425-setup.c # 2005/02/02 18:10:24+00:00 dsaxena@net.rmk.(none) +47 -41 # [PATCH] 2449/1: Make IXP4xx use platform devices for serial ports # # arch/arm/mach-ixp4xx/coyote-setup.c # 2005/02/02 18:10:13+00:00 dsaxena@net.rmk.(none) +38 -34 # [PATCH] 2449/1: Make IXP4xx use platform devices for serial ports # # ChangeSet # 2005/03/02 22:33:50+00:00 dsaxena@net.rmk.(none) # [ARM PATCH] 2448/1: Remove PrPMC1100 platform # # Patch from Deepak Saxena # # No longer maintained, not sure one can even buy one of these. # # Signed-off-by: Deepak Saxena # Signed-off-by: Russell King # # arch/arm/mach-ixp4xx/Makefile # 2005/02/02 17:59:45+00:00 dsaxena@net.rmk.(none) +0 -1 # [PATCH] 2448/1: Remove PrPMC1100 platform # # BitKeeper/deleted/.del-prpmc1100-setup.c~d52922ff42d9b621 # 2005/03/02 22:29:26+00:00 dsaxena@net.rmk.(none) +0 -0 # Delete: arch/arm/mach-ixp4xx/prpmc1100-setup.c # # BitKeeper/deleted/.del-prpmc1100-pci.c~da88e9014dd6125b # 2005/03/02 22:29:24+00:00 dsaxena@net.rmk.(none) +0 -0 # Delete: arch/arm/mach-ixp4xx/prpmc1100-pci.c # # ChangeSet # 2005/03/02 22:21:51+00:00 rmk@flint.arm.linux.org.uk # [ARM] Acorn expansion card core update. # # Add __iomem annotations and use iomem functions where appropriate. # Separate out expansion card allocation/initialisation and freeing. # Convert device attributes to be handled by driver core. # Clean up deprecated function warnings for internal ecard_address # usage. # # Signed-off-by: Russell King # # include/asm-arm/ecard.h # 2005/03/02 22:16:28+00:00 rmk@flint.arm.linux.org.uk +11 -4 # Add __iomem annotations to irqaddr and fiqaddr. # Stop deprecated warnings for ecard_address usage within ecard.c # # arch/arm/kernel/ecard.c # 2005/03/02 22:16:28+00:00 rmk@flint.arm.linux.org.uk +122 -94 # Stop deprecated warnings for ecard_address usage within ecard.c # Provide function to free an expansion_card. # Move expansion card structure allocation/initialisation to separate # function. # Convert device attributes to be registered/unregistered by driver # core. # Move test for calling expansion card loaders at reset up to top level. # # ChangeSet # 2005/03/02 14:03:27-08:00 davem@nuts.davemloft.net # [SPARC64]: Accept 'm5823' clock chip as seen on SB1500. # # Signed-off-by: David S. Miller # # arch/sparc64/kernel/time.c # 2005/03/02 14:02:54-08:00 davem@nuts.davemloft.net +5 -2 # [SPARC64]: Accept 'm5823' clock chip as seen on SB1500. # # ChangeSet # 2005/03/02 21:28:32+00:00 rmk@flint.arm.linux.org.uk # [ARM] Add card type specific data structure. # # Signed-off-by: Russell King # # drivers/net/arm/ether3.h # 2005/03/02 21:23:30+00:00 rmk@flint.arm.linux.org.uk +5 -0 # Add card type specific data structure. # # drivers/net/arm/ether3.c # 2005/03/02 21:23:30+00:00 rmk@flint.arm.linux.org.uk +27 -35 # Add barrier()'s to loops. # Add card type specific data. # # ChangeSet # 2005/03/02 21:09:16+00:00 rmk@flint.arm.linux.org.uk # [ARM] Net: Convert ether1 and ether3 to use iomem accesses. # # Signed-off-by: Russell King # # drivers/net/arm/ether3.h # 2005/03/02 21:04:45+00:00 rmk@flint.arm.linux.org.uk +11 -9 # Convert ether3 to use iomem accesses. # # drivers/net/arm/ether3.c # 2005/03/02 21:04:45+00:00 rmk@flint.arm.linux.org.uk +32 -21 # Convert ether3 to use iomem accesses. # # drivers/net/arm/ether1.h # 2005/03/02 21:04:45+00:00 rmk@flint.arm.linux.org.uk +5 -4 # Convert ether1 to use iomem accesses. # # drivers/net/arm/ether1.c # 2005/03/02 21:04:44+00:00 rmk@flint.arm.linux.org.uk +78 -67 # Convert ether1 to use iomem accesses. # # ChangeSet # 2005/03/02 20:35:25+00:00 rmk@flint.arm.linux.org.uk # [ARM] Use ecard_{request,release}_resources() for resource management # # Signed-off-by: Russell King # # drivers/net/arm/ether3.c # 2005/03/02 20:30:38+00:00 rmk@flint.arm.linux.org.uk +14 -18 # Claim/release expansion card resources with ecard_request_resources() # and ecard_release_resources() # # drivers/net/arm/ether1.c # 2005/03/02 20:30:38+00:00 rmk@flint.arm.linux.org.uk +13 -18 # Claim/release expansion card resources with ecard_request_resources() # and ecard_release_resources() # # ChangeSet # 2005/03/02 12:18:53-08:00 hfvogt@gmx.net # [PATCH] I2C i2c-nforce2: add support for nForce4 (patch against 2.6.11-rc4) # # can you please apply the attached patch (against 2.6.11-rc4, but works # as well for 2.6.11-rc3-mm2), that adds support for the two SMBusses of # the nForce4 to the i2c-nforce2 i2c bus driver. The patch is reported to # work on the standard nForce4 (i.e. non-Ultra, non-SLI), but I expect # that it works as well for the other nForce4 chipsets, that seem to have # the same PCI-id for the SMBus-device. # # This patch was proposed by Chuck , thanks to him for the # information, testing and his patch. # # Signed-off-by: Hans-Frieder Vogt # Signed-off-by: Greg Kroah-Hartman # # include/linux/pci_ids.h # 2005/03/02 09:55:27-08:00 hfvogt@gmx.net +1 -0 # I2C i2c-nforce2: add support for nForce4 (patch against 2.6.11-rc4) # # drivers/i2c/busses/i2c-nforce2.c # 2005/03/02 09:55:27-08:00 hfvogt@gmx.net +4 -2 # I2C i2c-nforce2: add support for nForce4 (patch against 2.6.11-rc4) # # ChangeSet # 2005/03/02 12:18:36-08:00 icampbell@arcom.com # [PATCH] I2C: fix typo in drivers/i2c/busses/i2c-ixp4xx.c # # I was looking at your ixp4xx gpio i2c driver for inspiration (for a # similar pxa2xx one) and I just happened to notice a tiny typo. # # Signed-off-by: Ian Campbell # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/busses/i2c-ixp4xx.c # 2005/03/02 09:55:39-08:00 icampbell@arcom.com +2 -2 # I2C: fix typo in drivers/i2c/busses/i2c-ixp4xx.c # # ChangeSet # 2005/03/02 12:18:19-08:00 macro@linux-mips.org # [PATCH] I2C: Enable I2C_PIIX4 for 64-bit platforms # # Is there any specific reason for the PIIX4 SMBus driver to be disabled on # 64-bit platforms? If not, then please apply the following change. The # MIPS Technologies Malta development board has the 82371EB chip and # supports 64-bit configurations. I've verified the driver to work # correctly using 64-bit kernels for both endiannesses. # # Signed-off-by: Maciej W. Rozycki # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/busses/Kconfig # 2005/03/02 09:55:46-08:00 macro@linux-mips.org +1 -1 # I2C: Enable I2C_PIIX4 for 64-bit platforms # # ChangeSet # 2005/03/02 12:18:03-08:00 icampbell@arcom.com # [PATCH] I2C: improve debugging output # # Rework the pca_xfer() function to always print the number of # successfully completed transfers in a series when debugging, even when # exiting with an error. # # Signed-off-by: Ian Campbell # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/algos/i2c-algo-pca.c # 2005/03/02 09:55:52-08:00 icampbell@arcom.com +16 -12 # I2C: improve debugging output # # ChangeSet # 2005/03/02 20:17:47+00:00 rmk@flint.arm.linux.org.uk # [ARM] Net: add macro to access driver specific netdev data. # # Signed-off-by: Russell King # # ChangeSet # 2005/03/02 12:17:46-08:00 maartendeprez@scarlet.be # [PATCH] I2C: add GL520SM Sensor Chip driver # # Port of the Genesys Logic 520SM sensor chip driver from linux 2.4 # # Signed-off-by: Maarten Deprez # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/gl520sm.c # 2005/03/02 09:55:58-08:00 maartendeprez@scarlet.be +754 -0 # I2C: add GL520SM Sensor Chip driver # # drivers/i2c/chips/Makefile # 2005/03/02 09:55:58-08:00 maartendeprez@scarlet.be +1 -0 # I2C: add GL520SM Sensor Chip driver # # drivers/i2c/chips/Kconfig # 2005/03/02 09:55:58-08:00 maartendeprez@scarlet.be +11 -0 # I2C: add GL520SM Sensor Chip driver # # drivers/i2c/chips/gl520sm.c # 2005/03/02 09:55:58-08:00 maartendeprez@scarlet.be +0 -0 # BitKeeper file /home/greg/linux/BK/do/i2c-2.6/drivers/i2c/chips/gl520sm.c # # ChangeSet # 2005/03/02 12:17:29-08:00 mgreer@mvista.com # [PATCH] I2C: add Marvell mv64xxx i2c driver # # Marvell makes a line of host bridge for PPC and MIPS systems. On those # bridges is an i2c controller. This patch adds the driver for that i2c # controller. # # Please apply. # # Depends on patch submitted by Jean Delvare: # http://archives.andrew.net.au/lm-sensors/msg29405.html # # Signed-off-by: Mark A. Greer # Signed-off-by: Greg Kroah-Hartman # # include/linux/mv643xx.h # 2005/03/02 09:56:05-08:00 mgreer@mvista.com +11 -6 # I2C: add Marvell mv64xxx i2c driver # # include/linux/i2c-id.h # 2005/03/02 09:56:05-08:00 mgreer@mvista.com +3 -0 # I2C: add Marvell mv64xxx i2c driver # # drivers/i2c/busses/i2c-mv64xxx.c # 2005/03/02 09:56:05-08:00 mgreer@mvista.com +596 -0 # I2C: add Marvell mv64xxx i2c driver # # drivers/i2c/busses/Makefile # 2005/03/02 09:56:05-08:00 mgreer@mvista.com +1 -0 # I2C: add Marvell mv64xxx i2c driver # # drivers/i2c/busses/Kconfig # 2005/03/02 09:56:05-08:00 mgreer@mvista.com +10 -0 # I2C: add Marvell mv64xxx i2c driver # # drivers/i2c/busses/i2c-mv64xxx.c # 2005/03/02 09:56:05-08:00 mgreer@mvista.com +0 -0 # BitKeeper file /home/greg/linux/BK/do/i2c-2.6/drivers/i2c/busses/i2c-mv64xxx.c # # ChangeSet # 2005/03/02 12:17:12-08:00 aurelien@aurel32.net # [PATCH] I2C: New chip driver: sis5595 # # Please find below the new version of the patch against kernel # 2.6.11-rc3-mm1 to add the sis5595 driver (sensor part). # # As you suggested, I have changed the PCI part of the driver, taking the # via686a driver as an example. I have also changed the comparison of # jiffies by using time_after. # # # Signed-off-by: Aurelien Jarno # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/sis5595.c # 2005/03/02 09:56:12-08:00 aurelien@aurel32.net +794 -0 # I2C: New chip driver: sis5595 # # drivers/i2c/chips/Makefile # 2005/03/02 09:56:12-08:00 aurelien@aurel32.net +1 -0 # I2C: New chip driver: sis5595 # # drivers/i2c/chips/Kconfig # 2005/03/02 09:56:12-08:00 aurelien@aurel32.net +12 -0 # I2C: New chip driver: sis5595 # # drivers/i2c/chips/sis5595.c # 2005/03/02 09:56:12-08:00 aurelien@aurel32.net +0 -0 # BitKeeper file /home/greg/linux/BK/do/i2c-2.6/drivers/i2c/chips/sis5595.c # # ChangeSet # 2005/03/02 12:16:55-08:00 mgreer@mvista.com # [PATCH] I2C: add ST M41T00 I2C RTC chip driver # # This patch adds support for the ST M41T00 I2C RTC chip. # # This rtc chip has no mechanism to freeze it's registers while being # read; however, it will delay updating the external values of the # registers for 250ms after a register is read. To ensure that a sane # time value is read, the driver verifies that the same registers values # were read twice before returning. # # Also, when setting the rtc from an interrupt handler, a tasklet is used # to provide the context required by the i2c core code. # # # Signed-off-by: Mark A. Greer # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/m41t00.c # 2005/03/02 09:56:19-08:00 mgreer@mvista.com +247 -0 # I2C: add ST M41T00 I2C RTC chip driver # # drivers/i2c/chips/Makefile # 2005/03/02 09:56:19-08:00 mgreer@mvista.com +1 -0 # I2C: add ST M41T00 I2C RTC chip driver # # drivers/i2c/chips/Kconfig # 2005/03/02 09:56:19-08:00 mgreer@mvista.com +9 -0 # I2C: add ST M41T00 I2C RTC chip driver # # drivers/i2c/chips/m41t00.c # 2005/03/02 09:56:19-08:00 mgreer@mvista.com +0 -0 # BitKeeper file /home/greg/linux/BK/do/i2c-2.6/drivers/i2c/chips/m41t00.c # # ChangeSet # 2005/03/02 12:16:37-08:00 adobriyan@mail.ru # [PATCH] I2C: use time_after instead of comparing jiffies # # Signed-off-by: Alexey Dobriyan # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/w83l785ts.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +2 -3 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/w83781d.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +3 -3 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/w83627hf.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +3 -2 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/via686a.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +3 -3 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/smsc47m1.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +2 -2 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/smsc47b397.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +2 -3 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/pc87360.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +2 -2 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/max1619.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +2 -4 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/lm90.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +2 -3 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/lm87.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +2 -3 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/lm85.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +3 -2 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/lm83.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +2 -3 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/lm80.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +2 -3 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/lm78.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +3 -2 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/lm77.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +3 -2 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/lm75.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +3 -2 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/lm63.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +2 -3 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/it87.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +3 -2 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/gl518sm.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +3 -2 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/fscher.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +2 -2 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/eeprom.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +2 -2 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/ds1621.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +3 -2 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/asb100.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +2 -2 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/adm1031.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +3 -2 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/adm1026.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +4 -3 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/adm1025.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +2 -3 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/adm1021.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +3 -2 # I2C: use time_after instead of comparing jiffies # # ChangeSet # 2005/03/02 12:12:54-08:00 bunk@stusta.de # [PATCH] i2c-core.c: make some code static # # This patch makes some needlessly global code static. # # Signed-off-by: Adrian Bunk # Signed-off-by: Greg Kroah-Hartman # # include/linux/i2c.h # 2005/03/02 09:57:42-08:00 bunk@stusta.de +0 -2 # i2c-core.c: make some code static # # drivers/i2c/i2c-core.c # 2005/03/02 09:57:42-08:00 bunk@stusta.de +39 -40 # i2c-core.c: make some code static # # drivers/net/arm/ether3.h # 2005/03/02 20:12:26+00:00 rmk@flint.arm.linux.org.uk +2 -0 # Add macro to access driver private netdev data. # # drivers/net/arm/ether3.c # 2005/03/02 20:12:26+00:00 rmk@flint.arm.linux.org.uk +97 -116 # Use a macro to access driver-specific netdev data. # # drivers/net/arm/ether1.h # 2005/03/02 20:12:26+00:00 rmk@flint.arm.linux.org.uk +2 -0 # Add macro to access driver private netdev data. # # drivers/net/arm/ether1.c # 2005/03/02 20:12:25+00:00 rmk@flint.arm.linux.org.uk +58 -70 # Use a macro to access driver-specific netdev data. # # ChangeSet # 2005/03/02 12:10:18-08:00 shawn.starr@rogers.com # [PATCH] I2C: lm80 driver improvement # # Description: Cleanup some cluttered macros, add error checking for fan divisor value set. # # Signed-off-by: Sytse Wielinga # Signed-off-by: Aurelien Jarno # Signed-off-by: Shawn Starr # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/lm80.c # 2005/03/02 09:58:09-08:00 shawn.starr@rogers.com +12 -5 # I2C: lm80 driver improvement # # ChangeSet # 2005/03/02 12:10:01-08:00 mhoffman@lightlink.com # [PATCH] I2C: unnecessary #includes in asb100.c # # * Jean Delvare [2005-01-25 10:14:49 +0100]: # > Any reson why asb100.c (in linux 2.6.11-rc2) includes linux/ioport.h and # > asm/io.h? As an i2c-only chip driver, I don't think it needs these. # > # > As a side note, I also wonder what the inclusions of linux/config.h, # > linux/types.h and asm/errno.h are there for. # # Because they look pretty? Here's a patch Greg, please apply... # # Signed-off-by: Mark M. Hoffman # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/asb100.c # 2005/03/02 09:58:27-08:00 mhoffman@lightlink.com +0 -5 # I2C: unnecessary #includes in asb100.c # # ChangeSet # 2005/03/02 12:09:45-08:00 khali@linux-fr.org # [PATCH] I2C: Kill unused includes in i2c-sensor-detect.c # # Looks to me like i2c-sensor-detect.c includes a handful of headers it # doesn't need at all. This patch removes them. # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/i2c-sensor-detect.c # 2005/03/02 09:58:33-08:00 khali@linux-fr.org +0 -7 # I2C: Kill unused includes in i2c-sensor-detect.c # # ChangeSet # 2005/03/02 12:09:28-08:00 khali@linux-fr.org # [PATCH] I2C: Enable w83781d and w83627hf temperature channels # # The chips supported by the w83781d and w83627hf drivers might come up # with their temperature channels disabled. Currently, the w83781d driver # does so for temp3 but omits temp2, while the w83627hf driver omits both. # The following patch fixes that, and prints warning messages when the # driver has to enable the channels (normally the BIOS should do it for # us). We also skip this initialization step for the AS99127F chips, for # which we have no documentation. # # This should hopefully solve the problem reported here: # http://archives.andrew.net.au/lm-sensors/msg29150.html # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/w83781d.c # 2005/03/02 09:58:47-08:00 khali@linux-fr.org +20 -3 # I2C: Enable w83781d and w83627hf temperature channels # # drivers/i2c/chips/w83627hf.c # 2005/03/02 09:58:47-08:00 khali@linux-fr.org +21 -0 # I2C: Enable w83781d and w83627hf temperature channels # # ChangeSet # 2005/03/02 12:04:28-08:00 aurelien@aurel32.net # [PATCH] I2C: lm78 driver improvement # # The following patch against kernel 2.6.11-rc2-mm1 improves the lm78 # driver. I used it as a model to port the sis5595 driver to the 2.6 # kernel, and I then applied the changes suggested by Jean Delvare on # the sis5595 driver to this one. # # # Signed-off-by: Aurelien Jarno # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/lm78.c # 2005/03/02 09:58:53-08:00 aurelien@aurel32.net +24 -29 # I2C: lm78 driver improvement # # ChangeSet # 2005/03/02 12:04:12-08:00 mhoffman@lightlink.com # [PATCH] I2C: i2c-dev namespace cleanup # # This patch is namespace cleanup for the i2c-dev module. Please apply. # # Signed-off-by Mark M. Hoffman # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/i2c-dev.c # 2005/03/02 09:59:08-08:00 mhoffman@lightlink.com +4 -4 # I2C: i2c-dev namespace cleanup # # ChangeSet # 2005/03/02 15:03:29-05:00 davej@redhat.com # [AGPGART] Fix typo. # # From: Joern Heissler # Signed-off-by: Dave Jones # # include/linux/agp_backend.h # 2005/03/02 15:03:19-05:00 davej@redhat.com +1 -1 # [AGPGART] Fix typo. # # From: Joern Heissler # Signed-off-by: Dave Jones # # ChangeSet # 2005/03/02 11:59:41-08:00 stefan@desire.ch # [PATCH] I2C: fix for fscpos voltage values # # Multiplied the voltage multipliers by 10 in order to comply with the sysfs # guidelines. # # Signed-off-by: Stefan Ott # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/fscpos.c # 2005/03/02 10:00:05-08:00 stefan@desire.ch +3 -3 # I2C: fix for fscpos voltage values # # ChangeSet # 2005/03/02 11:58:47-08:00 greg@kroah.com # [PATCH] I2C: just delete the id field, let's not delay it any longer # # Becides, sparse keeps complaining when it sees this attribute within a structure... # # Signed-off-by: Greg Kroah-Hartman # # include/linux/i2c.h # 2005/03/02 10:00:35-08:00 greg@kroah.com +0 -1 # I2C: just delete the id field, let's not delay it any longer # # ChangeSet # 2005/03/02 11:58:29-08:00 khali@linux-fr.org # [PATCH] I2C: Kill i2c_client.id (5/5) # # > (5/5) Documentation update. # # Finally, updates are required to the i2c/writing-client and # i2c/porting-client documents. Remove any reference to i2c_client id and # invite porters to discard that struct member. # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # Documentation/i2c/writing-clients # 2005/03/02 10:00:42-08:00 khali@linux-fr.org +0 -4 # I2C: Kill i2c_client.id (5/5) # # Documentation/i2c/porting-clients # 2005/03/02 10:00:42-08:00 khali@linux-fr.org +3 -3 # I2C: Kill i2c_client.id (5/5) # # ChangeSet # 2005/03/02 11:52:48-08:00 khali@linux-fr.org # [PATCH] I2C: Kill i2c_client.id (4/5) # # > (4/5) Deprecate i2c_client.id. # # Now that i2c_client.id has no more users in the kernel (none that I # could find at least) we could remove that struct member. I however think # that it's better to only deprecate it at the moment, in case I missed # users or any of the other patches are delayed for some reason. We could # then delete the id member definitely in a month or so. # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # include/linux/i2c.h # 2005/03/02 10:00:49-08:00 khali@linux-fr.org +1 -1 # I2C: Kill i2c_client.id (4/5) # # ChangeSet # 2005/03/02 11:52:31-08:00 khali@linux-fr.org # [PATCH] I2C: Kill i2c_client.id (3/5) # # (3/5) Stop using i2c_client.id in misc drivers. # # Affected drivers: # * acorn/char/pcf8583 # * acorn/char/i2c # * i2c/i2c-dev # * macintosh/therm_windtunnel # * sound/oss/dmasound/dac3550a # * sound/ppc/keywest # # The Acorn pcf8583 driver would give the i2c_client id the same value as # the i2c_driver id, and later test that client id (in i2c). I changed it # to test the client's driver id instead. The result is the same and the # client id is then useless and can be removed. # # All other drivers here would allocate the client id to some value and # then never use it. They are unaffected by the change. # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # sound/ppc/keywest.c # 2005/03/02 10:00:56-08:00 khali@linux-fr.org +0 -2 # I2C: Kill i2c_client.id (3/5) # # sound/oss/dmasound/dac3550a.c # 2005/03/02 10:00:56-08:00 khali@linux-fr.org +0 -4 # I2C: Kill i2c_client.id (3/5) # # drivers/macintosh/therm_windtunnel.c # 2005/03/02 10:00:56-08:00 khali@linux-fr.org +0 -4 # I2C: Kill i2c_client.id (3/5) # # drivers/i2c/i2c-dev.c # 2005/03/02 10:00:56-08:00 khali@linux-fr.org +0 -1 # I2C: Kill i2c_client.id (3/5) # # drivers/acorn/char/pcf8583.c # 2005/03/02 10:00:56-08:00 khali@linux-fr.org +0 -1 # I2C: Kill i2c_client.id (3/5) # # drivers/acorn/char/i2c.c # 2005/03/02 10:00:56-08:00 khali@linux-fr.org +1 -1 # I2C: Kill i2c_client.id (3/5) # # ChangeSet # 2005/03/02 11:52:15-08:00 khali@linux-fr.org # [PATCH] I2C: Kill i2c_client.id (2/5) # # (2/5) Stop using i2c_client.id in media/video drivers. # # Affected drivers: # * adv7170 # * adv7175 # * bt819 # * bt856 # * bttv # * cx88 # * ovcamchip # * saa5246a # * saa5249 # * saa7110 # * saa7111 # * saa7114 # * saa7134 # * saa7185 # * tda7432 # * tda9840 # * tda9875 # * tea6415c # * tea6420 # * tuner-3036 # * vpx3220 # # Most drivers here would include the id as part of their i2c client name # (e.g. adv7170[0]). This looks more like an habit than something really # needed, so I replaced the various printf by strlcpy, which should be # slightly faster. As said earlier, clients can be differenciated thanks # to their bus id and address if needed, so I don't think that including # this information in the client name is wise anyway. # # Other drivers would either set the id to -1 or to a unique value but # then never use it. These drivers are unaffected by the changes. # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # drivers/media/video/vpx3220.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +8 -11 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/tuner-3036.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +0 -1 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/tea6420.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +0 -4 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/tea6415c.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +0 -4 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/tda9875.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +0 -1 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/tda9840.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +0 -4 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/tda7432.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +0 -1 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/saa7185.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +1 -4 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/saa7134/saa7134-i2c.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +0 -1 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/saa7114.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +1 -4 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/saa7111.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +1 -4 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/saa7110.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +1 -4 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/saa5249.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +0 -1 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/saa5246a.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +0 -1 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/ovcamchip/ovcamchip_core.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +0 -1 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/cx88/cx88-i2c.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +0 -1 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/bttv-i2c.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +0 -1 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/bt856.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +1 -4 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/bt819.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +3 -8 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/adv7175.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +1 -4 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/adv7170.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +1 -4 # I2C: Kill i2c_client.id (2/5) # # ChangeSet # 2005/03/02 11:51:51-08:00 khali@linux-fr.org # [PATCH] I2C: Kill i2c_client.id (1/5) # # (1/5) Stop using i2c_client.id in i2c/chips drivers (mostly hardware # monitoring drivers). # # Drivers affected: # * adm1021 # * adm1025 # * adm1026 # * adm1031 # * ds1621 # * fscher # * gl518sm # * isp1301_omap # * lm75 # * lm77 # * lm80 # * lm83 # * lm85 # * lm87 # * lm90 # * max1619 # * pcf8574 # * pcf8591 # * rtc8564 # * smsc47m1 # * w83l785ts # # The vast majority of these drivers simply defined the i2c_client id # struct member but never used it, so they are not affected at all by the # change. Exceptions are: # # * lm85 and rtc8564, which would at least display the id in a debug # message when assigning it. Not really useful though, as the id was then # never used. # # * adm1026, which used the assigned id in all driver messages. However, # since dev_* calls will append the bus number and client address to these # messages, the id information is redundant and can go away. Also, the # driver would allow some GPIO reprogramming on the first client only # (id=0) and removing the id doesn't allow that anymore. I would restore a # similar functionality if needed, but the ADM1026 chip is found on very # few motherboards and none of these has more than one ADM1026 chip AFAIK, # so it doesn't seem to be worth the effort. # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/w83l785ts.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -7 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/smsc47m1.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -5 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/rtc8564.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -2 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/pcf8591.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -4 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/pcf8574.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -4 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/max1619.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -7 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/lm90.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -7 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/lm87.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -7 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/lm85.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -9 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/lm83.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -7 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/lm80.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -8 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/lm77.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -4 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/lm75.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -4 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/isp1301_omap.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -1 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/gl518sm.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -7 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/fscher.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -7 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/ds1621.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -4 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/adm1031.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -4 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/adm1026.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +32 -48 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/adm1025.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -7 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/adm1021.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -4 # I2C: Kill i2c_client.id (1/5) # # ChangeSet # 2005/03/02 11:51:21-08:00 greg@kroah.com # [PATCH] I2C: Fix up some build warnings in the fscpos driver. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/fscpos.c # 2005/03/02 10:01:19-08:00 greg@kroah.com +1 -3 # I2C: Fix up some build warnings in the fscpos driver. # # ChangeSet # 2005/03/02 11:50:10-08:00 khali@linux-fr.org # [PATCH] I2C: Allow it87 pwm reconfiguration # # Quoting myself: # # > As soon as you will have confirmed that everything worked as expected, # > Jonas and I will provide a patch adding a pwm polarity reconfiguration # > module parameter for you to test. This should give you access to the # > PWM features of your it87 chip again, but in a safe way for a change # > ;) # # Here comes this patch. The new "fix_pwm_polarity" module parameter # allows one to force the it87 chip reconfiguration. This is only # supported in the case the original PWM configuration is suspected to be # bogus, and only if we think that reconfiguring the chip is safe. # # I wish to thank Rudolf Marek and Jonas Munsin again for their testing # and review of my code. # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/it87.c # 2005/03/02 10:01:25-08:00 khali@linux-fr.org +59 -12 # I2C: Allow it87 pwm reconfiguration # # ChangeSet # 2005/03/02 19:16:04+00:00 rmk@flint.arm.linux.org.uk # [ARM] Unuse scsi host->base # # This eliminates the final usage of deprecated elements in scsi_host by # Acorn SCSI drivers. # # Signed-off-by: Russell King # # drivers/scsi/arm/powertec.c # 2005/03/02 19:11:57+00:00 rmk@flint.arm.linux.org.uk +0 -2 # Remove host->base. # # drivers/scsi/arm/fas216.h # 2005/03/02 19:11:57+00:00 rmk@flint.arm.linux.org.uk +1 -2 # Mark info->scsi.io_base with __iomem. # Remove info->scsi.io_port. # # drivers/scsi/arm/fas216.c # 2005/03/02 19:11:57+00:00 rmk@flint.arm.linux.org.uk +6 -12 # Remove inb / outb. # Use info->scsi.io_base instead of info->host->io_port. # # drivers/scsi/arm/eesox.c # 2005/03/02 19:11:56+00:00 rmk@flint.arm.linux.org.uk +0 -2 # Remove host->base. # # drivers/scsi/arm/cumana_2.c # 2005/03/02 19:11:56+00:00 rmk@flint.arm.linux.org.uk +0 -2 # Remove host->base. # # drivers/scsi/arm/arxescsi.c # 2005/03/02 19:11:56+00:00 rmk@flint.arm.linux.org.uk +0 -2 # Remove host->base. # # ChangeSet # 2005/03/02 11:04:17-08:00 stefan@desire.ch # [PATCH] I2C: add fscpos chip driver # # This patch against 2.6.11-rc1 contains a driver for fscpos sensors. # # Signed-off-by: Stefan Ott # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/Makefile # 2005/03/02 10:01:31-08:00 stefan@desire.ch +1 -0 # I2C: add fscpos chip driver # # drivers/i2c/chips/Kconfig # 2005/03/02 10:01:31-08:00 stefan@desire.ch +11 -0 # I2C: add fscpos chip driver # # drivers/i2c/chips/fscpos.c # 2005/03/02 10:01:31-08:00 stefan@desire.ch +633 -0 # I2C: add fscpos chip driver # # drivers/i2c/chips/fscpos.c # 2005/03/02 10:01:31-08:00 stefan@desire.ch +0 -0 # BitKeeper file /home/greg/linux/BK/do/i2c-2.6/drivers/i2c/chips/fscpos.c # # ChangeSet # 2005/03/02 18:50:36+00:00 rmk@flint.arm.linux.org.uk # [ARM] SCSI: Move host->dma_channel to info->scsi.dma # # Signed-off-by: Russell King # # drivers/scsi/arm/powertec.c # 2005/03/02 18:45:41+00:00 rmk@flint.arm.linux.org.uk +14 -13 # Move host->dma_channel to info->scsi.dma # # drivers/scsi/arm/fas216.h # 2005/03/02 18:45:41+00:00 rmk@flint.arm.linux.org.uk +1 -0 # Add scsi dma channel # # drivers/scsi/arm/fas216.c # 2005/03/02 18:45:40+00:00 rmk@flint.arm.linux.org.uk +1 -1 # Move host->dma_channel to info->scsi.dma # # drivers/scsi/arm/eesox.c # 2005/03/02 18:45:39+00:00 rmk@flint.arm.linux.org.uk +14 -13 # Move host->dma_channel to info->scsi.dma # # drivers/scsi/arm/cumana_2.c # 2005/03/02 18:45:39+00:00 rmk@flint.arm.linux.org.uk +13 -13 # Move host->dma_channel to info->scsi.dma # # drivers/scsi/arm/arxescsi.c # 2005/03/02 18:45:39+00:00 rmk@flint.arm.linux.org.uk +1 -1 # Move host->dma_channel to info->scsi.dma # # ChangeSet # 2005/03/02 17:28:15+00:00 rmk@flint.arm.linux.org.uk # [ARM] Don't use host->irq # # Signed-off-by: Russell King # # drivers/scsi/arm/powertec.c # 2005/03/02 17:22:48+00:00 rmk@flint.arm.linux.org.uk +5 -6 # Don't use host->irq. # # drivers/scsi/arm/fas216.c # 2005/03/02 17:22:48+00:00 rmk@flint.arm.linux.org.uk +1 -1 # Don't use host->irq. # # drivers/scsi/arm/eesox.c # 2005/03/02 17:22:48+00:00 rmk@flint.arm.linux.org.uk +5 -6 # Don't use host->irq. # # drivers/scsi/arm/cumana_2.c # 2005/03/02 17:22:47+00:00 rmk@flint.arm.linux.org.uk +5 -6 # Don't use host->irq. # # drivers/scsi/arm/arxescsi.c # 2005/03/02 17:22:47+00:00 rmk@flint.arm.linux.org.uk +1 -2 # Don't use host->irq. # # ChangeSet # 2005/03/02 16:56:54+00:00 rmk@flint.arm.linux.org.uk # [ARM] Acorn SCSI: Ensure iomem pointers are marked as such. # # Signed-off-by: Russell King # # drivers/scsi/arm/powertec.c # 2005/03/02 16:50:55+00:00 rmk@flint.arm.linux.org.uk +18 -16 # Ensure iomem pointers are marked as such. # # drivers/scsi/arm/eesox.c # 2005/03/02 16:50:54+00:00 rmk@flint.arm.linux.org.uk +22 -22 # Ensure iomem pointers are marked as such. # # drivers/scsi/arm/cumana_2.c # 2005/03/02 16:50:54+00:00 rmk@flint.arm.linux.org.uk +28 -30 # Ensure iomem pointers are marked as such. # # drivers/scsi/arm/arxescsi.c # 2005/03/02 16:50:54+00:00 rmk@flint.arm.linux.org.uk +7 -4 # Ensure iomem pointers are marked as such. # # ChangeSet # 2005/03/02 16:07:18+00:00 rmk@flint.arm.linux.org.uk # [ARM] Fix sparse warnings in ARM IDE drivers. # # Signed-off-by: Russell King # # drivers/ide/arm/rapide.c # 2005/03/02 16:02:29+00:00 rmk@flint.arm.linux.org.uk +1 -1 # "ctrl" is an iomem pointer. Mark it as such. # # drivers/ide/arm/icside.c # 2005/03/02 16:02:28+00:00 rmk@flint.arm.linux.org.uk +1 -1 # "idmem" is an iomem pointer. Mark it as such. # # ChangeSet # 2005/03/02 15:32:02+00:00 rmk@flint.arm.linux.org.uk # [ARM] Fix set_fiq_regs()/get_fiq_regs() # # Make these "naked" functions. This allows us to eliminate the # clobbers which later gcc versions complain about. # # Signed-off-by: Russell King # # arch/arm/kernel/fiq.c # 2005/03/02 15:26:19+00:00 rmk@flint.arm.linux.org.uk +20 -27 # Convert [sg]et_fiq_regs() to be "naked" functions. # # ChangeSet # 2005/03/02 15:09:38+00:00 rmk@flint.arm.linux.org.uk # [ARM] Update syscall table # # Add demultiplexed socket and ipc syscalls. Add key syscalls. # # Leave the new numbers for the demultiplexed socket and ipc syscalls # commented out in asm-arm/unistd.h for the time being. # # Signed-off-by: Russell King # # include/asm-arm/unistd.h # 2005/03/02 15:05:14+00:00 rmk@flint.arm.linux.org.uk +40 -2 # Add syscall numbers. Comment out unmuxed socket and ipc calls for # the time being. # # arch/arm/kernel/sys_arm.c # 2005/03/02 15:05:14+00:00 rmk@flint.arm.linux.org.uk +12 -0 # Add sys_shmat, required for demultiplexed IPC. # # arch/arm/kernel/calls.S # 2005/03/02 15:05:14+00:00 rmk@flint.arm.linux.org.uk +33 -2 # Update syscall table - demultiplexed socket calls, IPC calls and # key syscalls. # # ChangeSet # 2005/03/01 15:38:13-08:00 davem@nuts.davemloft.net # Resolve conflicts. # # arch/ppc64/mm/tlb.c # 2005/03/01 15:37:54-08:00 davem@nuts.davemloft.net +0 -6 # Resolve conflicts with bug fix. # # ChangeSet # 2005/03/01 15:33:45-08:00 davem@nuts.davemloft.net # Resolve conflicts. # # mm/highmem.c # 2005/03/01 15:04:37-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # arch/arm/mm/consistent.c # 2005/03/01 15:04:36-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # ChangeSet # 2005/03/01 15:00:34-08:00 davem@nuts.davemloft.net # [S390]: Fix build after set_pte_at() changes. # # Signed-off-by: David S. Miller # # include/asm-s390/pgtable.h # 2005/03/01 15:00:00-08:00 davem@nuts.davemloft.net +1 -1 # [S390]: Fix build after set_pte_at() changes. # # ChangeSet # 2005/02/27 11:34:35-08:00 davem@nuts.davemloft.net # [SPARC64]: Do the init_mm check inline in set_pte_at(). # # Signed-off-by: David S. Miller # # include/asm-sparc64/pgtable.h # 2005/02/27 11:33:59-08:00 davem@nuts.davemloft.net +8 -5 # [SPARC64]: Do the init_mm check inline in set_pte_at(). # # arch/sparc64/mm/tlb.c # 2005/02/27 11:33:59-08:00 davem@nuts.davemloft.net +2 -11 # [SPARC64]: Do the init_mm check inline in set_pte_at(). # # ChangeSet # 2005/02/26 20:51:23-08:00 davem@nuts.davemloft.net # [MM]: Pass correct address down to bottom of page table iterators. # # Some routines, namely zeromap_pte_range, remap_pte_range, # change_pte_range, unmap_area_pte, and map_area_pte, were # using a chopped off address. This causes bogus addresses # to be passed into set_pte_at() and friends, resulting # in missed TLB flushes and other nasties. # # Signed-off-by: David S. Miller # # mm/vmalloc.c # 2005/02/26 20:50:16-08:00 davem@nuts.davemloft.net +13 -9 # [MM]: Pass correct address down to bottom of page table iterators. # # mm/mprotect.c # 2005/02/26 20:50:16-08:00 davem@nuts.davemloft.net +10 -7 # [MM]: Pass correct address down to bottom of page table iterators. # # mm/memory.c # 2005/02/26 20:50:16-08:00 davem@nuts.davemloft.net +7 -5 # [MM]: Pass correct address down to bottom of page table iterators. # # ChangeSet # 2005/02/26 04:10:55-05:00 dcbw@redhat.com # [PATCH] wireless: Make Atmel driver use SET_NETDEV_DEV # # Make the Atmel wireless driver use SET_NETDEV_DEV to get the correct # entries in sysfs. Seems like somebody meant to do this but it got lost. # atmel_cs.c was previously fixed to pass in the correct struct device * # via handle_to_dev() but the driver never actually used it. # # Signed-off-by: Dan Williams # Signed-off-by: Jeff Garzik # # drivers/net/wireless/atmel.c # 2005/02/01 16:15:55-05:00 dcbw@redhat.com +2 -0 # wireless: Make Atmel driver use SET_NETDEV_DEV # # ChangeSet # 2005/02/26 04:10:42-05:00 dcbw@redhat.com # [PATCH] wireless: WEXT quality cleanups + max rssi # # (resend) # # Use correct maximum rssi level for at76c502e-type cards, and correct # values in the qual.updated field to more closely match the current # Wireless Extensions API. # # Signed-off-by: Dan Williams # Signed-off-by: Jeff Garzik # # drivers/net/wireless/atmel.c # 2005/02/01 16:25:53-05:00 dcbw@redhat.com +28 -11 # wireless: WEXT quality cleanups + max rssi # # ChangeSet # 2005/02/26 04:10:29-05:00 dcbw@redhat.com # [PATCH] wireless: Clean up firmware loading in # # (resend) # # Identify different firmware by enums, not strings, as we need to have # some integral firmware identifier for choosing maximum rssi values for # each different firmware type. Consolidate the information about # firmware filenames and capabilities in the atmel module, not in atmel_cs # or atmel_pci. Move common prototypes and firmware enum into new atmel.h # file. The atmel_cs driver also thought that init_atmel_card() took "int # irq" as the first parameter, this is now fixed to be "unsigned short # irq". # # Signed-off-by: Dan Williams # Signed-off-by: Jeff Garzik # # drivers/net/wireless/atmel.h # 2005/01/30 18:33:31-05:00 dcbw@redhat.com +43 -0 # wireless: Clean up firmware loading in # # drivers/net/wireless/atmel_pci.c # 2005/01/30 14:05:30-05:00 dcbw@redhat.com +2 -4 # wireless: Clean up firmware loading in # # drivers/net/wireless/atmel_cs.c # 2005/01/30 14:05:08-05:00 dcbw@redhat.com +22 -26 # wireless: Clean up firmware loading in # # drivers/net/wireless/atmel.h # 2005/01/30 18:33:31-05:00 dcbw@redhat.com +0 -0 # BitKeeper file /garz/repo/netdev-2.6/atmel/drivers/net/wireless/atmel.h # # drivers/net/wireless/atmel.c # 2005/02/01 16:22:26-05:00 dcbw@redhat.com +45 -17 # wireless: Clean up firmware loading in # # ChangeSet # 2005/02/25 16:36:06-08:00 davem@nuts.davemloft.net # [MM]: Add 'pfn' arg to flush_cache_page(). # # Based almost entirely upon a patch by Russell King. # # Signed-off-by: David S. Miller # # mm/rmap.c # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +2 -2 # [MM]: Add 'pfn' arg to flush_cache_page(). # # mm/memory.c # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +2 -2 # [MM]: Add 'pfn' arg to flush_cache_page(). # # mm/fremap.c # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-x86_64/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-v850/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-sparc64/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +7 -7 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-sparc/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +7 -7 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-sh64/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +3 -3 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-sh/cpu-sh4/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-sh/cpu-sh3/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +3 -3 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-sh/cpu-sh2/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +2 -2 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-sh/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +2 -2 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-s390/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-ppc64/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-ppc/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-parisc/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +3 -3 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-mips/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +2 -3 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-m68knommu/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-m68k/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +7 -8 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-m32r/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +3 -3 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-ia64/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-i386/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-h8300/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-frv/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-cris/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-arm26/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-arm/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +8 -8 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-alpha/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # fs/binfmt_elf.c # 2005/02/25 16:35:19-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # arch/sparc/mm/srmmu.c # 2005/02/25 16:35:19-08:00 davem@nuts.davemloft.net +1 -2 # [MM]: Add 'pfn' arg to flush_cache_page(). # # arch/sh64/mm/cache.c # 2005/02/25 16:35:19-08:00 davem@nuts.davemloft.net +4 -24 # [MM]: Add 'pfn' arg to flush_cache_page(). # # arch/sh/mm/cache-sh7705.c # 2005/02/25 16:35:19-08:00 davem@nuts.davemloft.net +2 -18 # [MM]: Add 'pfn' arg to flush_cache_page(). # # arch/sh/mm/cache-sh4.c # 2005/02/25 16:35:19-08:00 davem@nuts.davemloft.net +11 -30 # [MM]: Add 'pfn' arg to flush_cache_page(). # # arch/mips/mm/cache.c # 2005/02/25 16:35:19-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # arch/mips/mm/c-tx39.c # 2005/02/25 16:35:19-08:00 davem@nuts.davemloft.net +1 -2 # [MM]: Add 'pfn' arg to flush_cache_page(). # # arch/mips/mm/c-sb1.c # 2005/02/25 16:35:19-08:00 davem@nuts.davemloft.net +6 -5 # [MM]: Add 'pfn' arg to flush_cache_page(). # # arch/mips/mm/c-r4k.c # 2005/02/25 16:35:19-08:00 davem@nuts.davemloft.net +1 -2 # [MM]: Add 'pfn' arg to flush_cache_page(). # # arch/mips/mm/c-r3k.c # 2005/02/25 16:35:19-08:00 davem@nuts.davemloft.net +1 -2 # [MM]: Add 'pfn' arg to flush_cache_page(). # # arch/arm/mm/flush.c # 2005/02/25 16:35:19-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # arch/arm/mm/fault-armv.c # 2005/02/25 16:35:19-08:00 davem@nuts.davemloft.net +2 -2 # [MM]: Add 'pfn' arg to flush_cache_page(). # # Documentation/cachetlb.txt # 2005/02/25 16:35:19-08:00 davem@nuts.davemloft.net +9 -3 # [MM]: Add 'pfn' arg to flush_cache_page(). # # ChangeSet # 2005/02/25 15:48:28-08:00 khali@linux-fr.org # [PATCH] PCI: One more Asus SMBus quirk # # One more Asus laptop requiring the SMBus quirk (W1N model). # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/quirks.c # 2005/02/14 11:10:24-08:00 khali@linux-fr.org +1 -0 # PCI: One more Asus SMBus quirk # # ChangeSet # 2005/02/25 15:48:12-08:00 alexn@dsv.su.se # [PATCH] PCI: fix hotplug double free # # With the brackets missed out func could be freed twice. # # Found by Coverity tool # # Signed-off-by: Alexander Nyberg # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/hotplug/pciehp_ctrl.c # 2005/02/23 01:26:22-08:00 alexn@dsv.su.se +2 -1 # PCI: fix hotplug double free # # ChangeSet # 2005/02/25 15:47:53-08:00 akpm@osdl.org # [PATCH] PCI: tone down pci=routeirq message # # From: Bjorn Helgaas # # Tone down the message about using "pci=routeirq". I do still get a few # reports, but most are now prompted just by the fact that my email address # appears in dmesg in an "error-type" message. # # Signed-off-by: Bjorn Helgaas # Signed-off-by: Andrew Morton # Signed-off-by: Greg Kroah-Hartman # # arch/ia64/pci/pci.c # 2005/02/22 18:53:24-08:00 akpm@osdl.org +3 -13 # PCI: tone down pci=routeirq message # # arch/i386/pci/acpi.c # 2005/02/22 18:53:24-08:00 akpm@osdl.org +4 -13 # PCI: tone down pci=routeirq message # # ChangeSet # 2005/02/25 14:36:10-08:00 benh@kernel.crashing.org # [PATCH] PCI: Apple PCI IDs update # # please sent that to Andrew/Linus in your next batch for after 2.6.11, # those new IDs will be needed for support of the new iMac G5. # # The changes to pci.ids match the changes already submitted to the web # database. # # From: Benjamin Herrenschmidt # Signed-off-by: Greg Kroah-Hartman # # include/linux/pci_ids.h # 2005/02/17 19:26:36-08:00 benh@kernel.crashing.org +3 -0 # PCI: Apple PCI IDs update # # ChangeSet # 2005/02/25 08:26:11-08:00 gregkh@suse.de # PCI: remove pci_find_device usage from pci sysfs code. # # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/pci-sysfs.c # 2005/02/25 08:25:55-08:00 gregkh@suse.de +1 -1 # PCI: remove pci_find_device usage from pci sysfs code. # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2005/02/24 14:52:48-05:00 jgarzik@pobox.com # [libata ahci] Print out port id on error messages # # Pointed out by Justin Cormack, Brett Russ, and others. # # drivers/scsi/ahci.c # 2005/02/24 14:52:41-05:00 jgarzik@pobox.com +1 -1 # [libata ahci] Print out port id on error messages # # Pointed out by Justin Cormack, Brett Russ, and others. # # ChangeSet # 2005/02/24 11:25:26-08:00 ajgrothe@yahoo.com # [CRYPTO]: Add Tiger digest algorithms. # # Signed-off-by: James Morris # Signed-off-by: David S. Miller # # crypto/tcrypt.h # 2005/02/24 11:24:22-08:00 ajgrothe@yahoo.com +131 -0 # [CRYPTO]: Add Tiger digest algorithms. # # crypto/tcrypt.c # 2005/02/24 11:24:22-08:00 ajgrothe@yahoo.com +16 -0 # [CRYPTO]: Add Tiger digest algorithms. # # crypto/Makefile # 2005/02/24 11:24:22-08:00 ajgrothe@yahoo.com +1 -0 # [CRYPTO]: Add Tiger digest algorithms. # # crypto/Kconfig # 2005/02/24 11:24:22-08:00 ajgrothe@yahoo.com +13 -0 # [CRYPTO]: Add Tiger digest algorithms. # # Documentation/crypto/api-intro.txt # 2005/02/24 11:24:22-08:00 ajgrothe@yahoo.com +3 -0 # [CRYPTO]: Add Tiger digest algorithms. # # crypto/tgr192.c # 2005/02/24 11:24:18-08:00 ajgrothe@yahoo.com +735 -0 # [CRYPTO]: Add Tiger digest algorithms. # # crypto/tgr192.c # 2005/02/24 11:24:18-08:00 ajgrothe@yahoo.com +0 -0 # BitKeeper file /disk1/BK/net-2.6.12/crypto/tgr192.c # # ChangeSet # 2005/02/24 10:59:51-08:00 herbert@gondor.apana.org.au # [IXGB]: Check skb_header_cloned for TSO packets. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # drivers/net/ixgb/ixgb_main.c # 2005/02/24 10:59:26-08:00 herbert@gondor.apana.org.au +18 -4 # [IXGB]: Check skb_header_cloned for TSO packets. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/02/24 00:33:29-05:00 tklauser@nuerscht.ch # [PATCH] drivers/scsi/ahci: Use the DMA_{64,32}BIT_MASK constants # # Use the DMA_{64,32}BIT_MASK constants from dma-mapping.h # when calling pci_set_dma_mask() or pci_set_consistent_dma_mask() # See http://marc.theaimsgroup.com/?t=108001993000001&r=1&w=2 for details # # Signed-off-by: Tobias Klauser # Signed-off-by: Jeff Garzik # # drivers/scsi/ahci.c # 2005/02/16 15:19:53-05:00 tklauser@nuerscht.ch +5 -5 # drivers/scsi/ahci: Use the DMA_{64,32}BIT_MASK constants # # ChangeSet # 2005/02/24 00:33:15-05:00 tklauser@nuerscht.ch # [PATCH] drivers/scsi/sata_vsc: Use the DMA_{64,32}BIT_MASK constants # # Use the DMA_{64,32}BIT_MASK constants from dma-mapping.h # when calling pci_set_dma_mask() or pci_set_consistent_dma_mask() # See http://marc.theaimsgroup.com/?t=108001993000001&r=1&w=2 for details # # Signed-off-by: Tobias Klauser # Signed-off-by: Jeff Garzik # # drivers/scsi/sata_vsc.c # 2005/02/16 15:25:01-05:00 tklauser@nuerscht.ch +2 -2 # drivers/scsi/sata_vsc: Use the DMA_{64,32}BIT_MASK constants # # ChangeSet # 2005/02/24 00:25:36-05:00 mlord@pobox.com # [libata qstor] minor update per LKML comments # # * use __le{32,64} # * use DMA_{32,64}BIT_MASK # # drivers/scsi/sata_qstor.c # 2005/02/24 00:25:30-05:00 mlord@pobox.com +10 -10 # [libata qstor] minor update per LKML comments # # * use __le{32,64} # * use DMA_{32,64}BIT_MASK # # ChangeSet # 2005/02/24 00:17:17-05:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] smc91x iomem annotations # # usual iomem annotations; # Signed-off-by: Al Viro # Signed-off-by: Jeff Garzik # # drivers/net/smc91x.c # 2005/02/15 13:38:10-05:00 viro@parcelfarce.linux.theplanet.co.uk +41 -33 # smc91x iomem annotations # # ChangeSet # 2005/02/24 00:12:34-05:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/linux-2.6 # into pobox.com:/garz/repo/netdev-2.6/smc91x # # arch/arm/mach-pxa/lubbock.c # 2005/02/24 00:12:31-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/02/23 19:57:33-08:00 laforge@netfilter.org # [NETFILTER]: ipt_hashlimit: use hlist instead of list head # # Use hlist instead of list_head to save lots of memory for the hash buckets. # # Signed-off-by: Samuel Jean # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ipt_hashlimit.c # 2005/02/23 19:57:13-08:00 laforge@netfilter.org +35 -24 # [NETFILTER]: ipt_hashlimit: use hlist instead of list head # # Use hlist instead of list_head to save lots of memory for the hash buckets. # # Signed-off-by: Samuel Jean # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # ChangeSet # 2005/02/23 19:56:46-08:00 laforge@netfilter.org # [NETFILTER]: ipt_hashlimit: replace rwlock with spinlock # # As Samuel points out, the rwlock doesn't really make much sense. # # Signed-off-by: Samuel Jean # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ipt_hashlimit.c # 2005/02/23 19:56:26-08:00 laforge@netfilter.org +8 -8 # [NETFILTER]: ipt_hashlimit: replace rwlock with spinlock # # As Samuel points out, the rwlock doesn't really make much sense. # # Signed-off-by: Samuel Jean # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # ChangeSet # 2005/02/23 19:51:56-08:00 davem@nuts.davemloft.net # Merge nuts.davemloft.net:/disk1/BK/net-2.6 # into nuts.davemloft.net:/disk1/BK/net-2.6.12 # # net/ipv6/addrconf.c # 2005/02/23 19:51:43-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # ChangeSet # 2005/02/23 19:27:50-08:00 davem@nuts.davemloft.net # [PPC]: Use new set_pte_at() w/mm+address args. # # Based almost entirely upon an earlier patch by # Benjamin Herrenschmidt. # # Signed-off-by: David S. Miller # # include/asm-ppc64/pgtable.h # 2005/02/23 19:26:53-08:00 davem@nuts.davemloft.net +32 -20 # [PPC]: Use new set_pte_at() w/mm+address args. # # include/asm-ppc64/pgalloc.h # 2005/02/23 19:26:53-08:00 davem@nuts.davemloft.net +6 -22 # [PPC]: Use new set_pte_at() w/mm+address args. # # include/asm-ppc/pgtable.h # 2005/02/23 19:26:53-08:00 davem@nuts.davemloft.net +33 -28 # [PPC]: Use new set_pte_at() w/mm+address args. # # include/asm-ppc/highmem.h # 2005/02/23 19:26:53-08:00 davem@nuts.davemloft.net +1 -1 # [PPC]: Use new set_pte_at() w/mm+address args. # # arch/ppc64/mm/tlb.c # 2005/02/23 19:26:53-08:00 davem@nuts.davemloft.net +2 -9 # [PPC]: Use new set_pte_at() w/mm+address args. # # arch/ppc/mm/tlb.c # 2005/02/23 19:26:53-08:00 davem@nuts.davemloft.net +0 -20 # [PPC]: Use new set_pte_at() w/mm+address args. # # arch/ppc/mm/pgtable.c # 2005/02/23 19:26:53-08:00 davem@nuts.davemloft.net +2 -12 # [PPC]: Use new set_pte_at() w/mm+address args. # # arch/ppc/mm/init.c # 2005/02/23 19:26:53-08:00 davem@nuts.davemloft.net +0 -12 # [PPC]: Use new set_pte_at() w/mm+address args. # # arch/ppc/kernel/dma-mapping.c # 2005/02/23 19:26:53-08:00 davem@nuts.davemloft.net +5 -2 # [PPC]: Use new set_pte_at() w/mm+address args. # # ChangeSet # 2005/02/23 19:18:34-08:00 herbert@gondor.apana.org.au # [NET]: Add skb_header_cloned and use it in e1000/tg3 # # This patch adds skb_header_cloned which tells us whether we need to # copy the data before we can modify the header part of the skb. Again, # what constitutes the header is left up to the users of the skb to define. # # This patch then uses this function in e1000/tg3 to copy the data before # the TCP/IP header is modified. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/linux/skbuff.h # 2005/02/23 19:18:14-08:00 herbert@gondor.apana.org.au +19 -0 # [NET]: Add skb_header_cloned and use it in e1000/tg3 # # This patch adds skb_header_cloned which tells us whether we need to # copy the data before we can modify the header part of the skb. Again, # what constitutes the header is left up to the users of the skb to define. # # This patch then uses this function in e1000/tg3 to copy the data before # the TCP/IP header is modified. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2005/02/23 19:18:14-08:00 herbert@gondor.apana.org.au +6 -0 # [NET]: Add skb_header_cloned and use it in e1000/tg3 # # This patch adds skb_header_cloned which tells us whether we need to # copy the data before we can modify the header part of the skb. Again, # what constitutes the header is left up to the users of the skb to define. # # This patch then uses this function in e1000/tg3 to copy the data before # the TCP/IP header is modified. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # drivers/net/e1000/e1000_main.c # 2005/02/23 19:18:14-08:00 herbert@gondor.apana.org.au +18 -4 # [NET]: Add skb_header_cloned and use it in e1000/tg3 # # This patch adds skb_header_cloned which tells us whether we need to # copy the data before we can modify the header part of the skb. Again, # what constitutes the header is left up to the users of the skb to define. # # This patch then uses this function in e1000/tg3 to copy the data before # the TCP/IP header is modified. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/02/23 19:17:24-08:00 herbert@gondor.apana.org.au # [NET]: Add skb_header_release and use it in net/ipv4/tcp # # This patch adds skb_header_release which can be called when the owner # of an skb no longer needs to access the header at all. What constitutes # the header is left up to the users of the skb to define. # # For instance, for outbound TCP packets we define the header to be # anything in front of the TCP payload. Therefore we add skb_header_release # calls to all the paths where outound TCP packets are produced. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/tcp_output.c # 2005/02/23 19:16:59-08:00 herbert@gondor.apana.org.au +3 -0 # [NET]: Add skb_header_release and use it in net/ipv4/tcp # # This patch adds skb_header_release which can be called when the owner # of an skb no longer needs to access the header at all. What constitutes # the header is left up to the users of the skb to define. # # For instance, for outbound TCP packets we define the header to be # anything in front of the TCP payload. Therefore we add skb_header_release # calls to all the paths where outound TCP packets are produced. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/tcp.c # 2005/02/23 19:16:58-08:00 herbert@gondor.apana.org.au +1 -0 # [NET]: Add skb_header_release and use it in net/ipv4/tcp # # This patch adds skb_header_release which can be called when the owner # of an skb no longer needs to access the header at all. What constitutes # the header is left up to the users of the skb to define. # # For instance, for outbound TCP packets we define the header to be # anything in front of the TCP payload. Therefore we add skb_header_release # calls to all the paths where outound TCP packets are produced. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/core/skbuff.c # 2005/02/23 19:16:58-08:00 herbert@gondor.apana.org.au +4 -1 # [NET]: Add skb_header_release and use it in net/ipv4/tcp # # This patch adds skb_header_release which can be called when the owner # of an skb no longer needs to access the header at all. What constitutes # the header is left up to the users of the skb to define. # # For instance, for outbound TCP packets we define the header to be # anything in front of the TCP payload. Therefore we add skb_header_release # calls to all the paths where outound TCP packets are produced. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/linux/skbuff.h # 2005/02/23 19:16:58-08:00 herbert@gondor.apana.org.au +34 -2 # [NET]: Add skb_header_release and use it in net/ipv4/tcp # # This patch adds skb_header_release which can be called when the owner # of an skb no longer needs to access the header at all. What constitutes # the header is left up to the users of the skb to define. # # For instance, for outbound TCP packets we define the header to be # anything in front of the TCP payload. Therefore we add skb_header_release # calls to all the paths where outound TCP packets are produced. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/02/23 17:46:43-08:00 davem@nuts.davemloft.net # [SPARC64]: Pass mm/addr directly to tlb_batch_add() # # No longer need to store this information in the pte table # page struct. # # Signed-off-by: David S. Miller # # include/asm-sparc64/pgtable.h # 2005/02/23 17:45:37-08:00 davem@nuts.davemloft.net +6 -5 # [SPARC64]: Pass mm/addr directly to tlb_batch_add() # # include/asm-sparc64/pgalloc.h # 2005/02/23 17:45:37-08:00 davem@nuts.davemloft.net +5 -15 # [SPARC64]: Pass mm/addr directly to tlb_batch_add() # # arch/sparc64/mm/tlb.c # 2005/02/23 17:45:37-08:00 davem@nuts.davemloft.net +7 -10 # [SPARC64]: Pass mm/addr directly to tlb_batch_add() # # arch/sparc64/mm/init.c # 2005/02/23 17:45:36-08:00 davem@nuts.davemloft.net +2 -1 # [SPARC64]: Pass mm/addr directly to tlb_batch_add() # # arch/sparc64/mm/hugetlbpage.c # 2005/02/23 17:45:36-08:00 davem@nuts.davemloft.net +6 -4 # [SPARC64]: Pass mm/addr directly to tlb_batch_add() # # arch/sparc64/mm/generic.c # 2005/02/23 17:45:36-08:00 davem@nuts.davemloft.net +14 -11 # [SPARC64]: Pass mm/addr directly to tlb_batch_add() # # ChangeSet # 2005/02/23 19:36:15-05:00 davej@redhat.com # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # drivers/char/agp/uninorth-agp.c # 2005/02/23 19:36:05-05:00 davej@redhat.com +10 -10 # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # drivers/char/agp/sworks-agp.c # 2005/02/23 19:36:05-05:00 davej@redhat.com +7 -7 # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # drivers/char/agp/sis-agp.c # 2005/02/23 19:36:05-05:00 davej@redhat.com +3 -3 # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # drivers/char/agp/nvidia-agp.c # 2005/02/23 19:36:05-05:00 davej@redhat.com +2 -1 # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # drivers/char/agp/intel-agp.c # 2005/02/23 19:36:05-05:00 davej@redhat.com +15 -11 # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # drivers/char/agp/i460-agp.c # 2005/02/23 19:36:05-05:00 davej@redhat.com +9 -6 # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # drivers/char/agp/hp-agp.c # 2005/02/23 19:36:05-05:00 davej@redhat.com +9 -6 # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # drivers/char/agp/generic.c # 2005/02/23 19:36:05-05:00 davej@redhat.com +47 -44 # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # drivers/char/agp/efficeon-agp.c # 2005/02/23 19:36:05-05:00 davej@redhat.com +3 -3 # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # drivers/char/agp/backend.c # 2005/02/23 19:36:05-05:00 davej@redhat.com +4 -4 # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # drivers/char/agp/ati-agp.c # 2005/02/23 19:36:05-05:00 davej@redhat.com +4 -3 # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # drivers/char/agp/amd64-agp.c # 2005/02/23 19:36:05-05:00 davej@redhat.com +2 -1 # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # drivers/char/agp/amd-k7-agp.c # 2005/02/23 19:36:05-05:00 davej@redhat.com +4 -3 # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # drivers/char/agp/alpha-agp.c # 2005/02/23 19:36:05-05:00 davej@redhat.com +4 -3 # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # drivers/char/agp/agp.h # 2005/02/23 19:36:05-05:00 davej@redhat.com +10 -8 # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # ChangeSet # 2005/02/23 15:42:56-08:00 davem@nuts.davemloft.net # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # I'm taking a slightly different approach this time around so things # are easier to integrate. Here is the first patch which builds the # infrastructure. Basically: # # 1) Add set_pte_at() which is set_pte() with 'mm' and 'addr' arguments # added. All generic code uses set_pte_at(). # # Most platforms simply get this define: # #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) # # I chose this method over simply changing all set_pte() call sites # because many platforms implement this in assembler and it would # take forever to preserve the build and stabilize things if modifying # that was necessary. # # Soon, with platform maintainer's help, we can kill of set_pte() entirely. # To be honest, there are only a handful of set_pte() call sites in the # arch specific code. # # Actually, in this patch ppc64 is completely set_pte() free and does not # define it. # # 2) pte_clear() gets 'mm' and 'addr' arguments now. # This had a cascading effect on many ptep_test_and_*() routines. Specifically: # a) ptep_test_and_clear_{young,dirty}() now take 'vma' and 'address' args. # b) ptep_get_and_clear now take 'mm' and 'address' args. # c) ptep_mkdirty was deleted, unused by any code. # d) ptep_set_wrprotect now takes 'mm' and 'address' args. # # I've tested this patch as follows: # # 1) compile and run tested on sparc64/SMP # 2) compile tested on: # a) ppc64/SMP # b) i386 both with and without PAE enabled # # Signed-off-by: David S. Miller # # mm/vmalloc.c # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +2 -2 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # mm/swapfile.c # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +2 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # mm/rmap.c # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +2 -2 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # mm/mremap.c # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # mm/mprotect.c # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +10 -10 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # mm/memory.c # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +21 -18 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # mm/highmem.c # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +4 -2 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # mm/fremap.c # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +3 -3 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-x86_64/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +9 -7 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-um/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-um/pgtable-3level.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +1 -0 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-um/pgtable-2level.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +1 -0 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-sparc64/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +3 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-sparc/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +2 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-sh64/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +2 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-sh/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +2 -2 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-sh/pgtable-2level.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +2 -0 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-s390/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +11 -16 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-s390/pgalloc.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +4 -2 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-ppc64/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +12 -9 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-ppc/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +6 -11 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-ppc/highmem.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-parisc/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +10 -20 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-mips/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +8 -6 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-m68k/sun3_pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +4 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-m68k/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +1 -0 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-m68k/motorola_pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-m32r/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +4 -10 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-m32r/pgtable-2level.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +2 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-ia64/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +10 -21 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-i386/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +7 -6 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-i386/pgtable-3level.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +3 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-i386/pgtable-2level.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +2 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-generic/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +38 -37 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-frv/pgtable.h # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +6 -12 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-cris/pgtable.h # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +3 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-arm26/pgtable.h # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +2 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-arm/pgtable.h # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +2 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-alpha/pgtable.h # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +5 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # fs/exec.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/sparc64/mm/hugetlbpage.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/sparc/mm/highmem.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/sparc/mm/generic.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +6 -6 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/sh64/mm/ioremap.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/sh64/mm/hugetlbpage.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/sh/mm/pg-sh7705.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +2 -2 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/sh/mm/pg-sh4.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +4 -4 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/sh/mm/hugetlbpage.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/s390/mm/init.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +2 -2 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/ppc64/mm/init.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +2 -2 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/ppc64/mm/hugetlbpage.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +6 -5 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/ppc/kernel/dma-mapping.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +4 -2 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/parisc/mm/kmap.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +2 -2 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/parisc/kernel/pci-dma.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/mips/mm/highmem.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/ia64/mm/hugetlbpage.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/i386/mm/hugetlbpage.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/i386/mm/highmem.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/arm/mm/consistent.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +4 -2 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # ChangeSet # 2005/02/23 18:19:13-05:00 davej@redhat.com # [FB] add support for new multiple agp bridge agpgart api # # From: Michael Werner # # This patch adds fb support for new multiple agp bridge agpgart api. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/video/intelfb/intelfbdrv.c # 2005/02/23 18:19:04-05:00 davej@redhat.com +12 -11 # [FB] add support for new multiple agp bridge agpgart api # # From: Michael Werner # # This patch adds fb support for new multiple agp bridge agpgart api. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/video/i810/i810_main.c # 2005/02/23 18:19:04-05:00 davej@redhat.com +9 -8 # [FB] add support for new multiple agp bridge agpgart api # # From: Michael Werner # # This patch adds fb support for new multiple agp bridge agpgart api. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/23 18:18:13-05:00 davej@redhat.com # [DRM] add support for new multiple agp bridge agpgart api # # From: Michael Werner # # This patch adds drm support for new multiple agp bridge agpgart api. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/drm/drm_stub.c # 2005/02/23 18:18:04-05:00 davej@redhat.com +1 -1 # [DRM] add support for new multiple agp bridge agpgart api # # From: Michael Werner # # This patch adds drm support for new multiple agp bridge agpgart api. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/drm/drm_memory.c # 2005/02/23 18:18:04-05:00 davej@redhat.com +2 -2 # [DRM] add support for new multiple agp bridge agpgart api # # From: Michael Werner # # This patch adds drm support for new multiple agp bridge agpgart api. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/drm/drm_drv.c # 2005/02/23 18:18:04-05:00 davej@redhat.com +1 -1 # [DRM] add support for new multiple agp bridge agpgart api # # From: Michael Werner # # This patch adds drm support for new multiple agp bridge agpgart api. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/drm/drm_agpsupport.c # 2005/02/23 18:18:04-05:00 davej@redhat.com +16 -12 # [DRM] add support for new multiple agp bridge agpgart api # # From: Michael Werner # # This patch adds drm support for new multiple agp bridge agpgart api. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/drm/drmP.h # 2005/02/23 18:18:04-05:00 davej@redhat.com +5 -4 # [DRM] add support for new multiple agp bridge agpgart api # # From: Michael Werner # # This patch adds drm support for new multiple agp bridge agpgart api. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/23 18:17:02-05:00 davej@redhat.com # [AGPGART] allow drivers to allocate memory local to the bridge # # From: Michael Werner # # This patch allows drivers to allocate memory local to the bridge using # platform specific alloc_page routines. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/agp/intel-agp.c # 2005/02/23 18:16:53-05:00 davej@redhat.com +1 -1 # [AGPGART] allow drivers to allocate memory local to the bridge # # From: Michael Werner # # This patch allows drivers to allocate memory local to the bridge using # platform specific alloc_page routines. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/agp/i460-agp.c # 2005/02/23 18:16:53-05:00 davej@redhat.com +2 -2 # [AGPGART] allow drivers to allocate memory local to the bridge # # From: Michael Werner # # This patch allows drivers to allocate memory local to the bridge using # platform specific alloc_page routines. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/23 18:16:53-05:00 davej@redhat.com +2 -2 # [AGPGART] allow drivers to allocate memory local to the bridge # # From: Michael Werner # # This patch allows drivers to allocate memory local to the bridge using # platform specific alloc_page routines. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/agp/backend.c # 2005/02/23 18:16:53-05:00 davej@redhat.com +1 -1 # [AGPGART] allow drivers to allocate memory local to the bridge # # From: Michael Werner # # This patch allows drivers to allocate memory local to the bridge using # platform specific alloc_page routines. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/agp/ali-agp.c # 2005/02/23 18:16:53-05:00 davej@redhat.com +2 -2 # [AGPGART] allow drivers to allocate memory local to the bridge # # From: Michael Werner # # This patch allows drivers to allocate memory local to the bridge using # platform specific alloc_page routines. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/agp/agp.h # 2005/02/23 18:16:53-05:00 davej@redhat.com +2 -2 # [AGPGART] allow drivers to allocate memory local to the bridge # # From: Michael Werner # # This patch allows drivers to allocate memory local to the bridge using # platform specific alloc_page routines. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/23 18:15:47-05:00 davej@redhat.com # [AGPGART] add agp_find_bridge function # # From: Michael Werner # # This patch gives non-generic platforms a method for using platform specific # agp_find_bridge functions. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # include/linux/agp_backend.h # 2005/02/23 18:15:38-05:00 davej@redhat.com +2 -0 # [AGPGART] add agp_find_bridge function # # From: Michael Werner # # This patch gives non-generic platforms a method for using platform specific # agp_find_bridge functions. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/agp/backend.c # 2005/02/23 18:15:38-05:00 davej@redhat.com +4 -1 # [AGPGART] add agp_find_bridge function # # From: Michael Werner # # This patch gives non-generic platforms a method for using platform specific # agp_find_bridge functions. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/23 18:12:13-05:00 davej@redhat.com # [AGPGART] allow multiple backends to be initialized. # # From: Michael Werner # # This patch adds support for initializing and addressing multiple AGP # bridges using the agpgart driver. In particular, it extends agp_acquire # and agp_allocate_memory so that different bridges can be acquired and # memory allocated within a specific AGP aperature. # # From: Brice Goglin # # It seems that memsetting the whole bridge structure to 0 (instead of juste # the agp_in_use field) fixes Benoit's problem too. No idea which field was # responsible for this. New patch attached. # # From: Mike Werner # # add bridge assignment missed in agp_allocate_memory # # From: Andi Kleen # # Here's the correct fix. agp_bridge is defined in drivers/char/agp/agp.h. # It's a bit ugly though. # # Signed-off-by: Mike Werner # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # include/linux/agp_backend.h # 2005/02/23 18:12:04-05:00 davej@redhat.com +14 -7 # [AGPGART] allow multiple backends to be initialized. # # From: Michael Werner # # This patch adds support for initializing and addressing multiple AGP # bridges using the agpgart driver. In particular, it extends agp_acquire # and agp_allocate_memory so that different bridges can be acquired and # memory allocated within a specific AGP aperature. # # From: Brice Goglin # # It seems that memsetting the whole bridge structure to 0 (instead of juste # the agp_in_use field) fixes Benoit's problem too. No idea which field was # responsible for this. New patch attached. # # From: Mike Werner # # add bridge assignment missed in agp_allocate_memory # # From: Andi Kleen # # Here's the correct fix. agp_bridge is defined in drivers/char/agp/agp.h. # It's a bit ugly though. # # Signed-off-by: Mike Werner # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/23 18:12:04-05:00 davej@redhat.com +71 -47 # [AGPGART] allow multiple backends to be initialized. # # From: Michael Werner # # This patch adds support for initializing and addressing multiple AGP # bridges using the agpgart driver. In particular, it extends agp_acquire # and agp_allocate_memory so that different bridges can be acquired and # memory allocated within a specific AGP aperature. # # From: Brice Goglin # # It seems that memsetting the whole bridge structure to 0 (instead of juste # the agp_in_use field) fixes Benoit's problem too. No idea which field was # responsible for this. New patch attached. # # From: Mike Werner # # add bridge assignment missed in agp_allocate_memory # # From: Andi Kleen # # Here's the correct fix. agp_bridge is defined in drivers/char/agp/agp.h. # It's a bit ugly though. # # Signed-off-by: Mike Werner # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/agp/frontend.c # 2005/02/23 18:12:04-05:00 davej@redhat.com +17 -13 # [AGPGART] allow multiple backends to be initialized. # # From: Michael Werner # # This patch adds support for initializing and addressing multiple AGP # bridges using the agpgart driver. In particular, it extends agp_acquire # and agp_allocate_memory so that different bridges can be acquired and # memory allocated within a specific AGP aperature. # # From: Brice Goglin # # It seems that memsetting the whole bridge structure to 0 (instead of juste # the agp_in_use field) fixes Benoit's problem too. No idea which field was # responsible for this. New patch attached. # # From: Mike Werner # # add bridge assignment missed in agp_allocate_memory # # From: Andi Kleen # # Here's the correct fix. agp_bridge is defined in drivers/char/agp/agp.h. # It's a bit ugly though. # # Signed-off-by: Mike Werner # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/agp/backend.c # 2005/02/23 18:12:04-05:00 davej@redhat.com +60 -44 # [AGPGART] allow multiple backends to be initialized. # # From: Michael Werner # # This patch adds support for initializing and addressing multiple AGP # bridges using the agpgart driver. In particular, it extends agp_acquire # and agp_allocate_memory so that different bridges can be acquired and # memory allocated within a specific AGP aperature. # # From: Brice Goglin # # It seems that memsetting the whole bridge structure to 0 (instead of juste # the agp_in_use field) fixes Benoit's problem too. No idea which field was # responsible for this. New patch attached. # # From: Mike Werner # # add bridge assignment missed in agp_allocate_memory # # From: Andi Kleen # # Here's the correct fix. agp_bridge is defined in drivers/char/agp/agp.h. # It's a bit ugly though. # # Signed-off-by: Mike Werner # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/agp/agp.h # 2005/02/23 18:12:04-05:00 davej@redhat.com +3 -0 # [AGPGART] allow multiple backends to be initialized. # # From: Michael Werner # # This patch adds support for initializing and addressing multiple AGP # bridges using the agpgart driver. In particular, it extends agp_acquire # and agp_allocate_memory so that different bridges can be acquired and # memory allocated within a specific AGP aperature. # # From: Brice Goglin # # It seems that memsetting the whole bridge structure to 0 (instead of juste # the agp_in_use field) fixes Benoit's problem too. No idea which field was # responsible for this. New patch attached. # # From: Mike Werner # # add bridge assignment missed in agp_allocate_memory # # From: Andi Kleen # # Here's the correct fix. agp_bridge is defined in drivers/char/agp/agp.h. # It's a bit ugly though. # # Signed-off-by: Mike Werner # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # arch/x86_64/kernel/pci-gart.c # 2005/02/23 18:12:04-05:00 davej@redhat.com +1 -1 # [AGPGART] allow multiple backends to be initialized. # # From: Michael Werner # # This patch adds support for initializing and addressing multiple AGP # bridges using the agpgart driver. In particular, it extends agp_acquire # and agp_allocate_memory so that different bridges can be acquired and # memory allocated within a specific AGP aperature. # # From: Brice Goglin # # It seems that memsetting the whole bridge structure to 0 (instead of juste # the agp_in_use field) fixes Benoit's problem too. No idea which field was # responsible for this. New patch attached. # # From: Mike Werner # # add bridge assignment missed in agp_allocate_memory # # From: Andi Kleen # # Here's the correct fix. agp_bridge is defined in drivers/char/agp/agp.h. # It's a bit ugly though. # # Signed-off-by: Mike Werner # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/23 18:02:50-05:00 davej@redhat.com # [AGPGART] Rework AGPv2 rate verification. # # The spec says its valid for multiple bits to be set when we read rate, # however we must take care to ensure that we only write 1 bit back. # # This removes some bogus warnings that appeared on some boxes. # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/23 18:02:41-05:00 davej@redhat.com +18 -11 # [AGPGART] Rework AGPv2 rate verification. # # The spec says its valid for multiple bits to be set when we read rate, # however we must take care to ensure that we only write 1 bit back. # # This removes some bogus warnings that appeared on some boxes. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/23 12:37:52-05:00 davej@redhat.com # [AGPGART] aper_base can't be signed. # # We pass this to remap_pfn_range after shifting it right. # Nasty things happen as a result. # # Signed-off-by: Dave Jones # # include/linux/agp_backend.h # 2005/02/23 12:37:43-05:00 davej@redhat.com +3 -3 # [AGPGART] aper_base can't be signed. # # We pass this to remap_pfn_range after shifting it right. # Nasty things happen as a result. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/23 12:36:42-05:00 davej@redhat.com # [AGPGART] Compile fixes. # # Somehow the conversion to the extra arg for agp_collect_device_status() got dropped. # # Signed-off-by: Dave Jones # # drivers/char/agp/sworks-agp.c # 2005/02/23 12:36:32-05:00 davej@redhat.com +1 -1 # [AGPGART] Compile fixes. # # Somehow the conversion to the extra arg for agp_collect_device_status() got dropped. # # Signed-off-by: Dave Jones # # drivers/char/agp/sis-agp.c # 2005/02/23 12:36:32-05:00 davej@redhat.com +3 -3 # [AGPGART] Compile fixes. # # Somehow the conversion to the extra arg for agp_collect_device_status() got dropped. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/23 03:46:53-05:00 davej@redhat.com # [AGPGART] yet more whitespace removal. # # Signed-off-by: Dave Jones # # drivers/char/agp/frontend.c # 2005/02/23 03:46:44-05:00 davej@redhat.com +20 -20 # [AGPGART] yet more whitespace removal. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 19:23:21-08:00 davem@nuts.davemloft.net # Merge nuts.davemloft.net:/disk1/BK/network-2.6.12 # into nuts.davemloft.net:/disk1/BK/net-2.6.12 # # net/xfrm/xfrm_policy.c # 2005/02/22 19:23:09-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # net/ipv6/tcp_ipv6.c # 2005/02/22 19:23:09-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # net/ipv4/tcp_ipv4.c # 2005/02/22 19:23:09-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # net/ipv4/route.c # 2005/02/22 19:23:09-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # kernel/workqueue.c # 2005/02/22 19:23:08-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # ChangeSet # 2005/02/22 22:00:10-05:00 davej@redhat.com # [AGPGART] i810 suspend/resume support. # # From Nigel Cunningham/Karol Kozimor # Signed-off-by: Dave Jones # # drivers/char/agp/intel-agp.c # 2005/02/22 22:00:00-05:00 davej@redhat.com +2 -0 # [AGPGART] i810 suspend/resume support. # # From Nigel Cunningham/Karol Kozimor # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:53:10-05:00 davej@delerium.kernelslacker.org # [AGPGART] Convert from pci_module_init to pci_register_driver # # Signed-off-by: Christophe Lucas # Signed-off-by: Dave Jones # # drivers/char/agp/via-agp.c # 2005/02/22 19:56:06-05:00 davej@delerium.kernelslacker.org +1 -1 # [AGPGART] Convert from pci_module_init to pci_register_driver # # Signed-off-by: Christophe Lucas # Signed-off-by: Dave Jones # # drivers/char/agp/uninorth-agp.c # 2005/02/22 19:56:06-05:00 davej@delerium.kernelslacker.org +1 -1 # [AGPGART] Convert from pci_module_init to pci_register_driver # # Signed-off-by: Christophe Lucas # Signed-off-by: Dave Jones # # drivers/char/agp/sworks-agp.c # 2005/02/22 19:56:06-05:00 davej@delerium.kernelslacker.org +1 -1 # [AGPGART] Convert from pci_module_init to pci_register_driver # # Signed-off-by: Christophe Lucas # Signed-off-by: Dave Jones # # drivers/char/agp/sis-agp.c # 2005/02/22 19:56:06-05:00 davej@delerium.kernelslacker.org +1 -1 # [AGPGART] Convert from pci_module_init to pci_register_driver # # Signed-off-by: Christophe Lucas # Signed-off-by: Dave Jones # # drivers/char/agp/nvidia-agp.c # 2005/02/22 19:56:06-05:00 davej@delerium.kernelslacker.org +1 -1 # [AGPGART] Convert from pci_module_init to pci_register_driver # # Signed-off-by: Christophe Lucas # Signed-off-by: Dave Jones # # drivers/char/agp/intel-agp.c # 2005/02/22 19:56:06-05:00 davej@delerium.kernelslacker.org +1 -1 # [AGPGART] Convert from pci_module_init to pci_register_driver # # Signed-off-by: Christophe Lucas # Signed-off-by: Dave Jones # # drivers/char/agp/i460-agp.c # 2005/02/22 19:56:06-05:00 davej@delerium.kernelslacker.org +1 -1 # [AGPGART] Convert from pci_module_init to pci_register_driver # # Signed-off-by: Christophe Lucas # Signed-off-by: Dave Jones # # drivers/char/agp/efficeon-agp.c # 2005/02/22 19:56:06-05:00 davej@delerium.kernelslacker.org +1 -1 # [AGPGART] Convert from pci_module_init to pci_register_driver # # Signed-off-by: Christophe Lucas # Signed-off-by: Dave Jones # # drivers/char/agp/ati-agp.c # 2005/02/22 19:56:06-05:00 davej@delerium.kernelslacker.org +1 -1 # [AGPGART] Convert from pci_module_init to pci_register_driver # # Signed-off-by: Christophe Lucas # Signed-off-by: Dave Jones # # drivers/char/agp/amd64-agp.c # 2005/02/22 19:56:06-05:00 davej@delerium.kernelslacker.org +1 -1 # [AGPGART] Convert from pci_module_init to pci_register_driver # # Signed-off-by: Christophe Lucas # Signed-off-by: Dave Jones # # drivers/char/agp/amd-k7-agp.c # 2005/02/22 19:56:06-05:00 davej@delerium.kernelslacker.org +1 -1 # [AGPGART] Convert from pci_module_init to pci_register_driver # # Signed-off-by: Christophe Lucas # Signed-off-by: Dave Jones # # drivers/char/agp/ali-agp.c # 2005/02/22 19:56:06-05:00 davej@delerium.kernelslacker.org +1 -1 # [AGPGART] Convert from pci_module_init to pci_register_driver # # Signed-off-by: Christophe Lucas # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:35:30-05:00 davej@delerium.kernelslacker.org # [AGPGART] Drop the Intel-mch AGP driver. # # Andi Kleen points out that the intel-agp driver actually works on i865's, where # the -mch driver doesn't. The -mch driver was something of a failed experiment. # Hoping that the code would be much cleaner, I forked the intel-agp driver into # this variant, and removed some legacy bits. The result was a third the size, # but it still was no work of art, worse yet -- it didn't even do what it said on the can. # # intel-agp still supports everything that the -mch driver did, so we can just # remove this from the tree and fall back to the old driver. # # Signed-off-by: Dave Jones # # BitKeeper/deleted/.del-intel-mch-agp.c~ada34657bfa6d42b # 2005/02/22 21:35:14-05:00 davej@delerium.kernelslacker.org +0 -0 # Delete: drivers/char/agp/intel-mch-agp.c # # drivers/char/agp/Makefile # 2005/02/22 19:55:59-05:00 davej@delerium.kernelslacker.org +0 -1 # [AGPGART] Drop the Intel-mch AGP driver. # # Andi Kleen points out that the intel-agp driver actually works on i865's, where # the -mch driver doesn't. The -mch driver was something of a failed experiment. # Hoping that the code would be much cleaner, I forked the intel-agp driver into # this variant, and removed some legacy bits. The result was a third the size, # but it still was no work of art, worse yet -- it didn't even do what it said on the can. # # intel-agp still supports everything that the -mch driver did, so we can just # remove this from the tree and fall back to the old driver. # # Signed-off-by: Dave Jones # # drivers/char/agp/Kconfig # 2005/02/22 19:55:59-05:00 davej@delerium.kernelslacker.org +0 -10 # [AGPGART] Drop the Intel-mch AGP driver. # # Andi Kleen points out that the intel-agp driver actually works on i865's, where # the -mch driver doesn't. The -mch driver was something of a failed experiment. # Hoping that the code would be much cleaner, I forked the intel-agp driver into # this variant, and removed some legacy bits. The result was a third the size, # but it still was no work of art, worse yet -- it didn't even do what it said on the can. # # intel-agp still supports everything that the -mch driver did, so we can just # remove this from the tree and fall back to the old driver. # # Signed-off-by: Dave Jones # # arch/x86_64/defconfig # 2005/02/22 19:55:59-05:00 davej@delerium.kernelslacker.org +0 -1 # [AGPGART] Drop the Intel-mch AGP driver. # # Andi Kleen points out that the intel-agp driver actually works on i865's, where # the -mch driver doesn't. The -mch driver was something of a failed experiment. # Hoping that the code would be much cleaner, I forked the intel-agp driver into # this variant, and removed some legacy bits. The result was a third the size, # but it still was no work of art, worse yet -- it didn't even do what it said on the can. # # intel-agp still supports everything that the -mch driver did, so we can just # remove this from the tree and fall back to the old driver. # # Signed-off-by: Dave Jones # # arch/i386/defconfig # 2005/02/22 19:55:59-05:00 davej@delerium.kernelslacker.org +0 -1 # [AGPGART] Drop the Intel-mch AGP driver. # # Andi Kleen points out that the intel-agp driver actually works on i865's, where # the -mch driver doesn't. The -mch driver was something of a failed experiment. # Hoping that the code would be much cleaner, I forked the intel-agp driver into # this variant, and removed some legacy bits. The result was a third the size, # but it still was no work of art, worse yet -- it didn't even do what it said on the can. # # intel-agp still supports everything that the -mch driver did, so we can just # remove this from the tree and fall back to the old driver. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:27:52-05:00 davej@delerium.kernelslacker.org # [AGPGART] Lower 7 bits of TLB flush register must be zero. # # Signed-off-by: Dave Jones # # drivers/char/agp/via-agp.c # 2005/02/22 19:55:02-05:00 davej@delerium.kernelslacker.org +2 -0 # [AGPGART] Lower 7 bits of TLB flush register must be zero. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:27:37-05:00 davej@delerium.kernelslacker.org # [AGPGART] Various "I'm a dumbass" compile fixes. # # Signed-off-by: Dave Jones # # drivers/char/agp/via-agp.c # 2005/02/22 19:55:09-05:00 davej@delerium.kernelslacker.org +4 -4 # [AGPGART] Various "I'm a dumbass" compile fixes. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:27:22-05:00 davej@delerium.kernelslacker.org # [AGPGART] Don't clobber other bits in control register when flushing TLB on VIA. # # Signed-off-by: Dave Jones # # drivers/char/agp/via-agp.c # 2005/02/22 19:55:17-05:00 davej@delerium.kernelslacker.org +7 -2 # [AGPGART] Don't clobber other bits in control register when flushing TLB on VIA. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:27:07-05:00 davej@delerium.kernelslacker.org # [AGPGART] VIA AGPGARTs can support really small aperture sizes. # # Signed-off-by: Dave Jones # # drivers/char/agp/via-agp.c # 2005/02/22 19:55:24-05:00 davej@delerium.kernelslacker.org +2 -0 # [AGPGART] VIA AGPGARTs can support really small aperture sizes. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:26:52-05:00 davej@delerium.kernelslacker.org # [AGPGART] Trailing whitespace removal de jour. # # Signed-off-by: Dave Jones # # drivers/char/agp/via-agp.c # 2005/02/22 19:55:31-05:00 davej@delerium.kernelslacker.org +4 -4 # [AGPGART] Trailing whitespace removal de jour. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:26:36-05:00 davej@delerium.kernelslacker.org # [AGPGART] Print diagnostic info when failing to determine aperture size on VIA systems. # # I've seen this happen a few times, and never got to the bottom of it, so hopefully # this will make things a little easier to diagnose what's going on. # # Signed-off-by: Dave Jones # # drivers/char/agp/via-agp.c # 2005/02/22 19:55:38-05:00 davej@delerium.kernelslacker.org +1 -0 # [AGPGART] Print diagnostic info when failing to determine aperture size on VIA systems. # # I've seen this happen a few times, and never got to the bottom of it, so hopefully # this will make things a little easier to diagnose what's going on. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:26:21-05:00 davej@delerium.kernelslacker.org # [AGPGART] Trailing whitespace removal. # # Signed-off-by: Dave Jones # # drivers/char/agp/backend.c # 2005/02/22 19:55:45-05:00 davej@delerium.kernelslacker.org +6 -6 # [AGPGART] Trailing whitespace removal. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:26:04-05:00 davej@delerium.kernelslacker.org # [AGPGART] Make agp=off boot param work for Intel AGP drivers. # # Signed-off-by: Dave Jones # # drivers/char/agp/intel-mch-agp.c # 2005/02/22 19:56:13-05:00 davej@delerium.kernelslacker.org +2 -0 # [AGPGART] Make agp=off boot param work for Intel AGP drivers. # # Signed-off-by: Dave Jones # # drivers/char/agp/intel-agp.c # 2005/02/22 19:56:13-05:00 davej@delerium.kernelslacker.org +2 -0 # [AGPGART] Make agp=off boot param work for Intel AGP drivers. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:25:49-05:00 davej@delerium.kernelslacker.org # [AGPGART] Make sure we don't give up searching for gfx cards. # # We need to clear the previously found cap_ptr, or we exit after # finding the first one, even if its not the one plugged into the # bridge we're looking at. # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/22 19:56:20-05:00 davej@delerium.kernelslacker.org +1 -0 # [AGPGART] Make sure we don't give up searching for gfx cards. # # We need to clear the previously found cap_ptr, or we exit after # finding the first one, even if its not the one plugged into the # bridge we're looking at. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:25:33-05:00 davej@delerium.kernelslacker.org # [AGPGART] Map the graphic card to the bridge its connected to. # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/22 19:56:27-05:00 davej@delerium.kernelslacker.org +5 -0 # [AGPGART] Map the graphic card to the bridge its connected to. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:25:18-05:00 davej@delerium.kernelslacker.org # [AGPGART] Silly thinko in reserve bit masking. # # Stupid inversion meant we passed '0' to userspace, and madness # ensued resulting in very funky visuals. # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/22 19:56:34-05:00 davej@delerium.kernelslacker.org +2 -2 # [AGPGART] Silly thinko in reserve bit masking. # # Stupid inversion meant we passed '0' to userspace, and madness # ensued resulting in very funky visuals. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:25:03-05:00 davej@delerium.kernelslacker.org # [AGPGART] Fix the same pci_get_class bug in the amd-k7 driver. # # Signed-off-by: Dave Jones # # drivers/char/agp/amd-k7-agp.c # 2005/02/22 19:56:41-05:00 davej@delerium.kernelslacker.org +1 -1 # [AGPGART] Fix the same pci_get_class bug in the amd-k7 driver. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:24:48-05:00 davej@delerium.kernelslacker.org # [AGPGART] Fix stupid thinko in device discovery. # # Should fix the 'cant find AGP VGA controller' warnings. # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/22 19:56:48-05:00 davej@delerium.kernelslacker.org +1 -1 # [AGPGART] Fix stupid thinko in device discovery. # # Should fix the 'cant find AGP VGA controller' warnings. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:24:32-05:00 davej@delerium.kernelslacker.org # [AGPGART] In AGP2.0 mode, if we're in 1X mode, disable fast writes. # # In this mode, fast writes are just ignored, and treated as regular PCI # writes, but disabling them explicitly doesn't hurt. # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/22 19:56:55-05:00 davej@delerium.kernelslacker.org +4 -0 # [AGPGART] In AGP2.0 mode, if we're in 1X mode, disable fast writes. # # In this mode, fast writes are just ignored, and treated as regular PCI # writes, but disabling them explicitly doesn't hurt. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:24:12-05:00 davej@delerium.kernelslacker.org # [AGPGART] Mask out the reserved bits of the agp mode register before handing them to userspace. # # X munges what we hand to it, so with luck, this will lower the possibility # of it handing us something with reserved bits set. # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/22 19:57:02-05:00 davej@delerium.kernelslacker.org +17 -14 # [AGPGART] Mask out the reserved bits of the agp mode register before handing them to userspace. # # X munges what we hand to it, so with luck, this will lower the possibility # of it handing us something with reserved bits set. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:23:57-05:00 davej@delerium.kernelslacker.org # [AGPGART] Introduce routine to check current operating mode of agp bridge. # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/22 19:57:08-05:00 davej@delerium.kernelslacker.org +17 -11 # [AGPGART] Introduce routine to check current operating mode of agp bridge. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:23:42-05:00 davej@delerium.kernelslacker.org # [AGPGART] Remove pointless tests for bridge vendor from amd-k7-agp driver. # # If we got far enough to run this code, we *must* have an AMD bridge. # # Signed-off-by: Dave Jones # # drivers/char/agp/amd-k7-agp.c # 2005/02/22 19:57:15-05:00 davej@delerium.kernelslacker.org +2 -4 # [AGPGART] Remove pointless tests for bridge vendor from amd-k7-agp driver. # # If we got far enough to run this code, we *must* have an AMD bridge. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:23:27-05:00 davej@delerium.kernelslacker.org # [AGPGART] AMD 751 errata workaround. # Some combinations of NVidia GeForce cards and this AGP chipset cause lockups # when operated in AGP x2 mode. Force them to x1 mode for safety. # # Signed-off-by: Dave Jones # # drivers/char/agp/amd-k7-agp.c # 2005/02/22 19:57:22-05:00 davej@delerium.kernelslacker.org +31 -0 # [AGPGART] AMD 751 errata workaround. # Some combinations of NVidia GeForce cards and this AGP chipset cause lockups # when operated in AGP x2 mode. Force them to x1 mode for safety. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:23:12-05:00 davej@delerium.kernelslacker.org # [AGPGART] AMD 761 errata workaround. # B0/B1 steppings of this chipset were horribly broken, # and couldn't do fast writes, or side band addressing. # Looking through the errata on this one reads like a horror story, it's # a miracle it could get AGP x1 working. # # Signed-off-by: Dave Jones # # drivers/char/agp/amd-k7-agp.c # 2005/02/22 19:57:29-05:00 davej@delerium.kernelslacker.org +18 -0 # [AGPGART] AMD 761 errata workaround. # B0/B1 steppings of this chipset were horribly broken, # and couldn't do fast writes, or side band addressing. # Looking through the errata on this one reads like a horror story, it's # a miracle it could get AGP x1 working. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:22:57-05:00 davej@delerium.kernelslacker.org # [AGPGART] Add mechanism for chipset specific errata. # # Allow chipset drivers to tell the generic routines not to enable # certain features if they have errata when those features are used. # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/22 19:57:36-05:00 davej@delerium.kernelslacker.org +29 -3 # [AGPGART] Add mechanism for chipset specific errata. # # Allow chipset drivers to tell the generic routines not to enable # certain features if they have errata when those features are used. # # Signed-off-by: Dave Jones # # drivers/char/agp/agp.h # 2005/02/22 19:57:36-05:00 davej@delerium.kernelslacker.org +5 -0 # [AGPGART] Add mechanism for chipset specific errata. # # Allow chipset drivers to tell the generic routines not to enable # certain features if they have errata when those features are used. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:22:42-05:00 davej@delerium.kernelslacker.org # [AGPGART] Name & Shame the apps passing bad flags. # (Basically a distinction between XFree and Xorg) # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/22 19:57:43-05:00 davej@delerium.kernelslacker.org +6 -6 # [AGPGART] Name & Shame the apps passing bad flags. # (Basically a distinction between XFree and Xorg) # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:22:27-05:00 davej@delerium.kernelslacker.org # [AGPGART] Do some sanity checks on the rates that userspace passes. # # The AGP specifications define the following... # # agp2 agp3 # 000 BAD BAD # 001 x1 x4 # 010 x2 x8 # 011 BAD x8 # 100 x4 BAD # 101 BAD BAD # 110 BAD BAD # 111 BAD BAD # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/22 19:57:50-05:00 davej@delerium.kernelslacker.org +33 -0 # [AGPGART] Do some sanity checks on the rates that userspace passes. # # The AGP specifications define the following... # # agp2 agp3 # 000 BAD BAD # 001 x1 x4 # 010 x2 x8 # 011 BAD x8 # 100 x4 BAD # 101 BAD BAD # 110 BAD BAD # 111 BAD BAD # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:22:11-05:00 davej@delerium.kernelslacker.org # [AGPGART] Fix up the reserved bits. # The previous checks were against AGP_STAT values, but userspace passes us # an agp command register. # # drivers/char/agp/agp.h # 2005/02/22 19:57:57-05:00 davej@delerium.kernelslacker.org +2 -2 # [AGPGART] Fix up the reserved bits. # The previous checks were against AGP_STAT values, but userspace passes us # an agp command register. # # ChangeSet # 2005/02/22 21:21:55-05:00 davej@delerium.kernelslacker.org # [AGPGART] Warn and fix up mode if userspace passes nonsense. # Check the reserved bits in the agp mode register. # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/22 19:58:04-05:00 davej@delerium.kernelslacker.org +11 -1 # [AGPGART] Warn and fix up mode if userspace passes nonsense. # Check the reserved bits in the agp mode register. # # Signed-off-by: Dave Jones # # drivers/char/agp/agp.h # 2005/02/22 19:58:04-05:00 davej@delerium.kernelslacker.org +3 -0 # [AGPGART] Warn and fix up mode if userspace passes nonsense. # Check the reserved bits in the agp mode register. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:21:40-05:00 davej@delerium.kernelslacker.org # [AGPGART] Check the bridge is in 3.0 mode, not the graphic card. # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/22 19:58:11-05:00 davej@delerium.kernelslacker.org +4 -3 # [AGPGART] Check the bridge is in 3.0 mode, not the graphic card. # # Signed-off-by: Dave Jones # # drivers/char/agp/agp.h # 2005/02/22 19:58:11-05:00 davej@delerium.kernelslacker.org +1 -1 # [AGPGART] Check the bridge is in 3.0 mode, not the graphic card. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:21:25-05:00 davej@delerium.kernelslacker.org # [AGPGART] Fix refcount bug in mode parsing code. # # The pci_get_class conversion leaked this refcount. # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/22 19:58:17-05:00 davej@delerium.kernelslacker.org +4 -3 # [AGPGART] Fix refcount bug in mode parsing code. # # The pci_get_class conversion leaked this refcount. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:21:09-05:00 davej@delerium.kernelslacker.org # [AGPGART] Rename a bunch of ambiguous variables. # mode = What X wants us to set the mode to (As set by AGPMode in X config) # cmd = PCI_AGP_STATUS from the AGP bridge. # tmp = PCI_AGP_STATUS from the graphic card. # # mode -> requested_mode # cmd -> bridge_agpstat # tmp -> vga_agpstat # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/22 19:58:24-05:00 davej@delerium.kernelslacker.org +74 -72 # [AGPGART] Rename a bunch of ambiguous variables. # mode = What X wants us to set the mode to (As set by AGPMode in X config) # cmd = PCI_AGP_STATUS from the AGP bridge. # tmp = PCI_AGP_STATUS from the graphic card. # # mode -> requested_mode # cmd -> bridge_agpstat # tmp -> vga_agpstat # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:20:54-05:00 davej@delerium.kernelslacker.org # [AGPGART] Don't scan whole bus for a VGA card. # Use the handy pci_get_class() function instead of implementing our own # pci bus walking loop. Also makes it skip non-VGA devices fixing up a # long-standing FIXME. Previously, it may have been tripping up on AGP # bridges, which could have caused all sorts of sillyness. # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/22 19:58:31-05:00 davej@delerium.kernelslacker.org +45 -29 # [AGPGART] Don't scan whole bus for a VGA card. # Use the handy pci_get_class() function instead of implementing our own # pci bus walking loop. Also makes it skip non-VGA devices fixing up a # long-standing FIXME. Previously, it may have been tripping up on AGP # bridges, which could have caused all sorts of sillyness. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:09:45-05:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/linux-2.6 # into pobox.com:/garz/repo/netdev-2.6/mii # # drivers/net/tg3.h # 2005/02/22 21:09:42-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/02/20 21:11:56-05:00 mallikarjuna.chilakala@intel.com # [PATCH] e1000: Driver version white space, # # 10 Driver version number, white space, comments, device id & other changes # Signed-off-by: Mallikarjuna R Chilakala # Signed-off-by: Ganesh Venkatesan # Signed-off-by: John Ronciak # Signed-off-by: Jeff Garzik # # drivers/net/e1000/e1000_main.c # 2005/02/02 02:10:27-05:00 mallikarjuna.chilakala@intel.com +13 -7 # e1000: Driver version white space, # # drivers/net/e1000/e1000_hw.h # 2005/02/02 02:10:27-05:00 mallikarjuna.chilakala@intel.com +9 -2 # e1000: Driver version white space, # # drivers/net/e1000/e1000_hw.c # 2005/02/02 02:10:27-05:00 mallikarjuna.chilakala@intel.com +4 -5 # e1000: Driver version white space, # # ChangeSet # 2005/02/20 21:11:41-05:00 mallikarjuna.chilakala@intel.com # [PATCH] e1000: Fixes related to Cable length # # 9 Fixes related to Cable length estimation # Signed-off-by: Mallikarjuna R Chilakala # Signed-off-by: Ganesh Venkatesan # Signed-off-by: John Ronciak # Signed-off-by: Jeff Garzik # # drivers/net/e1000/e1000_hw.c # 2005/02/02 02:10:27-05:00 mallikarjuna.chilakala@intel.com +42 -37 # e1000: Fixes related to Cable length # # ChangeSet # 2005/02/20 21:11:30-05:00 mallikarjuna.chilakala@intel.com # [PATCH] e1000: Report failure code when loopback # # 8 Report failure code when loopback test fails # Signed-off-by: Mallikarjuna R Chilakala # Signed-off-by: Ganesh Venkatesan # Signed-off-by: John Ronciak # Signed-off-by: Jeff Garzik # # drivers/net/e1000/e1000_ethtool.c # 2005/02/02 02:10:26-05:00 mallikarjuna.chilakala@intel.com +6 -5 # e1000: Report failure code when loopback # # ChangeSet # 2005/02/20 21:11:15-05:00 mallikarjuna.chilakala@intel.com # [PATCH] e1000: Checks for desc ring/rx data # # 7 Add checks for desc ring/rx data bufs spanning 64k address boundary # Signed-off-by: Mallikarjuna R Chilakala # Signed-off-by: Ganesh Venkatesan # Signed-off-by: John Ronciak # Signed-off-by: Jeff Garzik # # drivers/net/e1000/e1000_main.c # 2005/02/02 02:10:27-05:00 mallikarjuna.chilakala@intel.com +133 -2 # e1000: Checks for desc ring/rx data # # ChangeSet # 2005/02/20 21:11:01-05:00 mallikarjuna.chilakala@intel.com # [PATCH] e1000: Patch from Peter Kjellstroem -- # # 6 Patch from Peter Kjellstroem -- fix lockup with 82547 # Signed-off-by: Mallikarjuna R Chilakala # Signed-off-by: Ganesh Venkatesan # Signed-off-by: John Ronciak # Signed-off-by: Jeff Garzik # # drivers/net/e1000/e1000_main.c # 2005/02/02 02:10:27-05:00 mallikarjuna.chilakala@intel.com +18 -0 # e1000: Patch from Peter Kjellstroem -- # # ChangeSet # 2005/02/20 21:10:46-05:00 mallikarjuna.chilakala@intel.com # [PATCH] e1000: Fix WOL settings in 82544 based # # 5 Fix WOL settings in 82544 based adapters # Signed-off-by: Mallikarjuna R Chilakala # Signed-off-by: Ganesh Venkatesan # Signed-off-by: John Ronciak # Signed-off-by: Jeff Garzik # # drivers/net/e1000/e1000_main.c # 2005/02/02 02:10:27-05:00 mallikarjuna.chilakala@intel.com +7 -1 # e1000: Fix WOL settings in 82544 based # # drivers/net/e1000/e1000.h # 2005/02/02 02:10:26-05:00 mallikarjuna.chilakala@intel.com +1 -0 # e1000: Fix WOL settings in 82544 based # # ChangeSet # 2005/02/20 21:10:31-05:00 mallikarjuna.chilakala@intel.com # [PATCH] e1000: Delay clean-up of last Tx buffer # # 4 Delay clean-up of last Tx buffer to fix pre-mature writeback of Tx descriptors. # Signed-off-by: Mallikarjuna R Chilakala # Signed-off-by: Ganesh Venkatesan # Signed-off-by: John Ronciak # Signed-off-by: Jeff Garzik # # drivers/net/e1000/e1000_main.c # 2005/02/02 02:10:27-05:00 mallikarjuna.chilakala@intel.com +30 -1 # e1000: Delay clean-up of last Tx buffer # # drivers/net/e1000/e1000.h # 2005/02/02 02:10:26-05:00 mallikarjuna.chilakala@intel.com +1 -0 # e1000: Delay clean-up of last Tx buffer # # ChangeSet # 2005/02/20 21:10:20-05:00 mallikarjuna.chilakala@intel.com # [PATCH] e1000: Avoid race between e1000_watchdog # # 3 Avoid race condition between e1000_watchdog and e1000_clean_tx_irq # Signed-off-by: Mallikarjuna R Chilakala # Signed-off-by: Ganesh Venkatesan # Signed-off-by: John Ronciak # Signed-off-by: Jeff Garzik # # drivers/net/e1000/e1000_main.c # 2005/02/02 02:10:27-05:00 mallikarjuna.chilakala@intel.com +12 -7 # e1000: Avoid race between e1000_watchdog # # drivers/net/e1000/e1000.h # 2005/02/02 02:10:26-05:00 mallikarjuna.chilakala@intel.com +1 -0 # e1000: Avoid race between e1000_watchdog # # ChangeSet # 2005/02/20 21:10:06-05:00 mallikarjuna.chilakala@intel.com # [PATCH] e1000: use netif_poll_{enable|disable} # # 2 use netif_poll_{enable|disable} to synchronize between poll and i/f down/up # Signed-off-by: Mallikarjuna R Chilakala # Signed-off-by: Ganesh Venkatesan # Signed-off-by: John Ronciak # Signed-off-by: Jeff Garzik # # drivers/net/e1000/e1000_main.c # 2005/02/02 02:10:27-05:00 mallikarjuna.chilakala@intel.com +7 -0 # e1000: use netif_poll_{enable|disable} # # ChangeSet # 2005/02/20 21:09:54-05:00 mallikarjuna.chilakala@intel.com # [PATCH] e1000: Robert Olsson's fix and refinement # # 1 Robert Olsson's fix and refinement to the poll routine # Signed-off-by: Mallikarjuna R Chilakala # Signed-off-by: Ganesh Venkatesan # Signed-off-by: John Ronciak # Signed-off-by: Jeff Garzik # # drivers/net/e1000/e1000_main.c # 2005/02/02 02:10:27-05:00 mallikarjuna.chilakala@intel.com +4 -7 # e1000: Robert Olsson's fix and refinement # # ChangeSet # 2005/02/20 20:59:40-05:00 mallikarjuna.chilakala@intel.com # [PATCH] ixgb: Driver version, white space, other stuff # # Driver version number, white space, comments, device id & other changes # Signed-off-by: Mallikarjuna R Chilakala # Signed-off-by: Ganesh Venkatesan # Signed-off-by: John Ronciak # Signed-off-by: Jeff Garzik # # drivers/net/ixgb/ixgb_param.c # 2005/02/07 02:33:02-05:00 mallikarjuna.chilakala@intel.com +1 -1 # ixgb: Driver version, white space, # # drivers/net/ixgb/ixgb_osdep.h # 2005/02/07 02:33:02-05:00 mallikarjuna.chilakala@intel.com +1 -1 # ixgb: Driver version, white space, # # drivers/net/ixgb/ixgb_main.c # 2005/02/07 02:33:02-05:00 mallikarjuna.chilakala@intel.com +20 -15 # ixgb: Driver version, white space, # # drivers/net/ixgb/ixgb_ids.h # 2005/02/07 02:33:02-05:00 mallikarjuna.chilakala@intel.com +1 -1 # ixgb: Driver version, white space, # # drivers/net/ixgb/ixgb_hw.h # 2005/02/07 02:33:02-05:00 mallikarjuna.chilakala@intel.com +1 -1 # ixgb: Driver version, white space, # # drivers/net/ixgb/ixgb_hw.c # 2005/02/07 02:33:02-05:00 mallikarjuna.chilakala@intel.com +1 -1 # ixgb: Driver version, white space, # # drivers/net/ixgb/ixgb_ethtool.c # 2005/02/07 02:33:02-05:00 mallikarjuna.chilakala@intel.com +4 -1 # ixgb: Driver version, white space, # # drivers/net/ixgb/ixgb_ee.h # 2005/02/07 02:33:01-05:00 mallikarjuna.chilakala@intel.com +1 -1 # ixgb: Driver version, white space, # # drivers/net/ixgb/ixgb_ee.c # 2005/02/07 02:33:01-05:00 mallikarjuna.chilakala@intel.com +1 -1 # ixgb: Driver version, white space, # # drivers/net/ixgb/ixgb.h # 2005/02/07 02:33:02-05:00 mallikarjuna.chilakala@intel.com +1 -1 # ixgb: Driver version, white space, # # ChangeSet # 2005/02/20 20:59:28-05:00 mallikarjuna.chilakala@intel.com # [PATCH] ixgb: Invalidate software cache, when EEPROM write occurs # # Added code to invalidate software cache, when a write is made to the EEPROM. # Signed-off-by: Mallikarjuna R Chilakala # Signed-off-by: Ganesh Venkatesan # Signed-off-by: John Ronciak # Signed-off-by: Jeff Garzik # # drivers/net/ixgb/ixgb_ee.h # 2005/02/07 02:33:01-05:00 mallikarjuna.chilakala@intel.com +1 -0 # ixgb: Invalidate software cache, when # # drivers/net/ixgb/ixgb_ee.c # 2005/02/07 02:33:01-05:00 mallikarjuna.chilakala@intel.com +10 -4 # ixgb: Invalidate software cache, when # # ChangeSet # 2005/02/20 20:59:16-05:00 mallikarjuna.chilakala@intel.com # [PATCH] ixgb: Robert Olsson's fix and refinement to poll # # obert Olsson's fix and refinement to the poll routine # Signed-off-by: Mallikarjuna R Chilakala # Signed-off-by: Ganesh Venkatesan # Signed-off-by: John Ronciak # Signed-off-by: Jeff Garzik # # drivers/net/ixgb/ixgb_main.c # 2005/02/07 02:33:02-05:00 mallikarjuna.chilakala@intel.com +4 -8 # ixgb: Robert Olsson's fix and refinement # # ChangeSet # 2005/02/20 20:59:04-05:00 mallikarjuna.chilakala@intel.com # [PATCH] ixgb: Avoid race e1000_watchdog and ixgb_clean_tx_irq # # Avoid race between e1000_watchdog and ixgb_clean_tx_irq # Signed-off-by: Mallikarjuna R Chilakala # Signed-off-by: Ganesh Venkatesan # Signed-off-by: John Ronciak # Signed-off-by: Jeff Garzik # # drivers/net/ixgb/ixgb_main.c # 2005/02/07 02:33:02-05:00 mallikarjuna.chilakala@intel.com +13 -7 # ixgb: Avoid race e1000_watchdog and # # drivers/net/ixgb/ixgb.h # 2005/02/07 02:33:02-05:00 mallikarjuna.chilakala@intel.com +1 -0 # ixgb: Avoid race e1000_watchdog and # # ChangeSet # 2005/02/20 20:58:53-05:00 mallikarjuna.chilakala@intel.com # [PATCH] ixgb: use netif_poll_{enable|disable} # # 1 use netif_poll_{enable|disable} to synchronize between poll and i/f down/up # Signed-off-by: Mallikarjuna R Chilakala # Signed-off-by: Ganesh Venkatesan # Signed-off-by: John Ronciak # Signed-off-by: Jeff Garzik # # drivers/net/ixgb/ixgb_main.c # 2005/02/07 02:33:02-05:00 mallikarjuna.chilakala@intel.com +6 -0 # ixgb: use netif_poll_{enable|disable} # # ChangeSet # 2005/02/18 16:45:25-06:00 shaggy@austin.ibm.com # JFS: change project url to http://jfs.sourceforge.net/ # # Signed-off-by: Dave Kleikamp # # MAINTAINERS # 2005/02/18 16:45:14-06:00 shaggy@austin.ibm.com +2 -2 # move to sourceforge.net # # Documentation/Changes # 2005/02/18 16:45:14-06:00 shaggy@austin.ibm.com +1 -1 # move to sourceforge.net # # ChangeSet # 2005/02/18 16:41:17-06:00 shaggy@austin.ibm.com # JFS: allow iocharset=none mount option # # iocharset=none is an explicit option to specify the default # character translation be used (no translation). This allows # remounting a partition which was mounted with a different setting, # and allows the same mount options to be used between 2.6 and 2.4 # kernels, where there is a different default. # # Signed-off-by: Dave Kleikamp # # fs/jfs/super.c # 2005/02/18 16:41:05-06:00 shaggy@austin.ibm.com +13 -8 # Allow iocharset=none mount option # # Documentation/filesystems/jfs.txt # 2005/02/18 16:41:05-06:00 shaggy@austin.ibm.com +3 -9 # Allow iocharset=none mount option # # ChangeSet # 2005/02/17 15:07:21-08:00 c-d.hailfinger.devel.2005@gmx.net # [PATCH] PCI: pci.ids update # # this patch partially updates drivers/pci/pci.ids to the current # version from http://pciids.sf.net. I have gone over the diff to # ensure nothing gets deleted/changed erroneously. There are some # differences where I couldn't verify whether the in-kernel or # the upstream version are correct, so I left them alone. # # Patch checked for build warnings and I'm running a kernel with # it on my machine right now. # # Signed-off-by: Carl-Daniel Hailfinger # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/pci.ids # 2005/02/16 19:05:44-08:00 c-d.hailfinger.devel.2005@gmx.net +1011 -126 # PCI: pci.ids update # # ChangeSet # 2005/02/17 15:07:01-08:00 roland@topspin.com # [PATCH] PCI: clean up the msi api # # Remove the call to request_mem_region() in msix_capability_init() to # grab the MSI-X vector table. Drivers should be using # pci_request_regions() so that they own all of the PCI BARs, and the # MSI-X core should trust it's being called by a correct driver. # # Signed-off-by: Roland Dreier # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/msi.c # 2005/02/16 16:00:00-08:00 roland@topspin.com +2 -11 # PCI: clean up the msi api # # ChangeSet # 2005/02/17 15:06:37-08:00 c-d.hailfinger.devel.2005@gmx.net # [PATCH] pci/quirks.c: unhide SMBus device on Samsung P35 laptop # # this patch is needed to make the SMBus device on my Samsung P35 # laptop visible. By default, it doesn't appear as a pci device. # # Patch tested, works perfectly for me. Please apply. # # Signed-off-by: Carl-Daniel Hailfinger # Signed-off-by: Greg Kroah-Hartman # # include/linux/pci_ids.h # 2005/02/16 14:48:09-08:00 c-d.hailfinger.devel.2005@gmx.net +2 -0 # pci/quirks.c: unhide SMBus device on Samsung P35 laptop # # drivers/pci/quirks.c # 2005/02/16 14:50:49-08:00 c-d.hailfinger.devel.2005@gmx.net +6 -0 # pci/quirks.c: unhide SMBus device on Samsung P35 laptop # # ChangeSet # 2005/02/17 15:06:16-08:00 ak@muc.de # [PATCH] PCI: allow x86_64 to do pci express # # On Mon, Feb 14, 2005 at 10:47:01AM +0100, Piotr Kaczuba wrote: # > On Mon, Feb 14, 2005 at 10:18:43AM +0100, Andi Kleen wrote: # > > Piotr Kaczuba writes: # > > > Is there a reason why "PCI access mode" config option isn't available for # > > > x86_64? Due to this, PCIE config options aren't available either. # > > # > > There is no 64bit PCI BIOS, so access is always direct. # > > # > > I assume you mean mmconfig access with "PCIE config options", that is # > > a separate config option and available. # > # > I mean the PCIEPORTBUS option which depends on PCI_GOMMCONFIG or # > PCI_GOANY. I assume that due to PCI_MMCONFIG / PCI_GOMMCONFIG mismatch # > it's not available on x86_64. # # Ok, that's a bug in PCIEPORTBUS. Best is probably to # completely remove the dependency, it doesn't make much sense # (the code has to handle the case of mmconfig not being available at # runtime anyways) # # Remove bogus dependency in PCI Express root driver. # # Signed-off-by: Andi Kleen # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/pcie/Kconfig # 2005/02/14 03:59:46-08:00 ak@muc.de +0 -1 # PCI: allow x86_64 to do pci express # # ChangeSet # 2005/02/17 15:05:53-08:00 khali@linux-fr.org # [PATCH] PCI: Add PCI quirk for SMBus on the Toshiba Satellite A40 # # The Toshiba Satellite A40 laptop hides its SMBus device, much like a # number of Asus boards reputedly do. This prevents access to the LM90 # hardware monitoring chip. This simple patch extends the PCI quirk used # for the Asus and HP systems to this Toshiba laptop. # # Signed-off-by: Frans Pop # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/quirks.c # 2005/02/13 03:35:28-08:00 khali@linux-fr.org +6 -0 # PCI: Add PCI quirk for SMBus on the Toshiba Satellite A40 # # ChangeSet # 2005/02/17 15:05:32-08:00 dlsy@snoqualmie.dp.intel.com # [PATCH] PCI Hotplug: Fix OSHP calls in shpchp and pciehp drivers # # Here is a patch to fix a problem in OSHP calls in shpchp and pciehp # drivers that was detected in 2.6.11-rc3. In this kernel, calls to # acpi_evaluate_object() to evaluate OSHP returned AE_BUFFER_OVERFLOW # with the existing code. Earlier kernels didn't return this error # code. The correct fix should be making return_buffer pointer NULL # for no value is returned from this method. # # Signed-off-by: Dely Sy # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/hotplug/shpchprm_acpi.c # 2005/02/08 14:04:19-08:00 dlsy@snoqualmie.dp.intel.com +1 -2 # PCI Hotplug: Fix OSHP calls in shpchp and pciehp drivers # # drivers/pci/hotplug/pciehprm_acpi.c # 2005/02/08 14:03:48-08:00 dlsy@snoqualmie.dp.intel.com +1 -2 # PCI Hotplug: Fix OSHP calls in shpchp and pciehp drivers # # ChangeSet # 2005/02/17 15:05:08-08:00 c.lucas@ifrance.com # [PATCH] drivers/pci/*: convert to pci_register_driver # # convert from pci_module_init to pci_register_driver # (from:http://kerneljanitors.org/TODO). # # Signed-off-by: Christophe Lucas # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/pcie/portdrv_pci.c # 2005/02/07 00:41:08-08:00 c.lucas@ifrance.com +1 -1 # drivers/pci/*: convert to pci_register_driver # # ChangeSet # 2005/02/15 15:16:58-08:00 herbert@gondor.apana.org.au # [XFRM]: stale_bundle()'s test was reversed # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/xfrm/xfrm_policy.c # 2005/02/15 15:16:04-08:00 herbert@gondor.apana.org.au +1 -1 # [XFRM]: stale_bundle()'s test was reversed # # ChangeSet # 2005/02/15 14:10:35-08:00 herbert@gondor.apana.org.au # [IPV6]: Make loopback idev stick around. # # Mirror the ipv4 change. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/addrconf.c # 2005/02/15 14:10:14-08:00 herbert@gondor.apana.org.au +8 -2 # [IPV6]: Make loopback idev stick around. # # Mirror the ipv4 change. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/02/15 14:09:38-08:00 herbert@gondor.apana.org.au # [IPV4]: Make loopback idev stick around. # # As it is when loopback_dev loses all of its IPv4 addresses its # corresponding idev will be destroyed. Unfortunately as of last # August route.c relies on the loopback idev to kill references # to other idev objects. # # The end result is that when you do ip a f dev lo, unregistering # other devices will hang until those dst objects referring to # their idev objects die of natural causes. Of course this may # never happen if the processes holding those references get # dead-locked by invoking an operation that takes the RTNL. # # A simple solution is to make sure that loopback's idev sticks # around all the time. # # Incidentally this also fixes the setting of some flags on the # loopback idev object as currently the code that does it won't # be called if you add the addresses to lo after bring it up. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/devinet.c # 2005/02/15 14:09:16-08:00 herbert@gondor.apana.org.au +13 -4 # [IPV4]: Make loopback idev stick around. # # As it is when loopback_dev loses all of its IPv4 addresses its # corresponding idev will be destroyed. Unfortunately as of last # August route.c relies on the loopback idev to kill references # to other idev objects. # # The end result is that when you do ip a f dev lo, unregistering # other devices will hang until those dst objects referring to # their idev objects die of natural causes. Of course this may # never happen if the processes holding those references get # dead-locked by invoking an operation that takes the RTNL. # # A simple solution is to make sure that loopback's idev sticks # around all the time. # # Incidentally this also fixes the setting of some flags on the # loopback idev object as currently the code that does it won't # be called if you add the addresses to lo after bring it up. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/02/15 13:58:56-08:00 akpm@osdl.org # [IPVS]: Fix deadlock in update_defense_level() # # This function invokes si_meminfo() from timer context, # which doesn't work due to bdev_lock not being an IRQ # safe lock. # # So move it to keventd context. # # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/ipv4/ipvs/ip_vs_ctl.c # 2005/02/15 13:58:35-08:00 akpm@osdl.org +8 -11 # [IPVS]: Fix deadlock in update_defense_level() # # This function invokes si_meminfo() from timer context, # which doesn't work due to bdev_lock not being an IRQ # safe lock. # # So move it to keventd context. # # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # ChangeSet # 2005/02/15 13:57:16-08:00 akpm@osdl.org # [WORKQUEUE]: Add cancel_rearming_delayed_work() # # From: Arjan van de Ven # # cancel_rearming_delayed_workqueue() is only used inside workqueue.c; make # this function static (the more useful wrapper around it later in that # function remains non-static and exported) # # Signed-off-by: Arjan van de Ven # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # kernel/workqueue.c # 2005/02/15 13:56:55-08:00 akpm@osdl.org +24 -0 # [WORKQUEUE]: Add cancel_rearming_delayed_work() # # From: Arjan van de Ven # # cancel_rearming_delayed_workqueue() is only used inside workqueue.c; make # this function static (the more useful wrapper around it later in that # function remains non-static and exported) # # Signed-off-by: Arjan van de Ven # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # include/linux/workqueue.h # 2005/02/15 13:56:55-08:00 akpm@osdl.org +1 -0 # [WORKQUEUE]: Add cancel_rearming_delayed_work() # # From: Arjan van de Ven # # cancel_rearming_delayed_workqueue() is only used inside workqueue.c; make # this function static (the more useful wrapper around it later in that # function remains non-static and exported) # # Signed-off-by: Arjan van de Ven # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # ChangeSet # 2005/02/15 15:47:08-06:00 shaggy@austin.ibm.com # JFS: Fix array overflow # # On a system with more than 64 processors, commit_threads was too # big and caused an array overflow. Always limit it to MAX_COMMIT_THREADS. # # Also, avoid waking up more than one commit thread at a time. # # Signed-off-by: Dave Kleikamp # # fs/jfs/super.c # 2005/02/15 15:46:55-06:00 shaggy@austin.ibm.com +1 -1 # Prevent array overflow by limiting commit_threads to MAX_COMMIT_THREADS # # fs/jfs/jfs_txnmgr.c # 2005/02/15 15:46:55-06:00 shaggy@austin.ibm.com +7 -2 # Only wake up one commit thread at a time # # ChangeSet # 2005/02/15 13:46:51-08:00 herbert@gondor.apana.org.au # [IPSEC]: Merge xfrm{4,6}_bundle_ok/stale_bundle # # This patch merges __xfrm4_bundle_ok/__xfrm6_bundle_ok/stale_bundle # so that when I add MTU verification code I don't have to put it in # three places. # # It also moves the tests on dst->dev and dst->obsolete outside the # loop since the former is identical throughout the bundle and the # latter can only be positive on the final element which also happens # to be dst->path. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/xfrm/xfrm_policy.c # 2005/02/15 13:46:16-08:00 herbert@gondor.apana.org.au +26 -12 # [IPSEC]: Merge xfrm{4,6}_bundle_ok/stale_bundle # # net/ipv6/xfrm6_policy.c # 2005/02/15 13:46:16-08:00 herbert@gondor.apana.org.au +1 -21 # [IPSEC]: Merge xfrm{4,6}_bundle_ok/stale_bundle # # net/ipv4/xfrm4_policy.c # 2005/02/15 13:46:16-08:00 herbert@gondor.apana.org.au +1 -21 # [IPSEC]: Merge xfrm{4,6}_bundle_ok/stale_bundle # # include/net/xfrm.h # 2005/02/15 13:46:16-08:00 herbert@gondor.apana.org.au +1 -0 # [IPSEC]: Merge xfrm{4,6}_bundle_ok/stale_bundle # # ChangeSet # 2005/02/15 13:36:18-08:00 davem@nuts.davemloft.net # [TIMER]: Export avenrun for packet scheduler meta ematch. # # Signed-off-by: David S. Miller # # kernel/timer.c # 2005/02/15 13:35:45-08:00 davem@nuts.davemloft.net +2 -0 # [TIMER]: Export avenrun for packet scheduler meta ematch. # # ChangeSet # 2005/02/15 13:04:52-08:00 davem@nuts.davemloft.net # [ATM]: fore200e needs to be converted over to sk_atm(). # # Signed-off-by: David S. Miller # # drivers/atm/fore200e.c # 2005/02/15 13:04:20-08:00 davem@nuts.davemloft.net +6 -6 # [ATM]: fore200e needs to be converted over to sk_atm(). # # ChangeSet # 2005/02/15 12:21:22-08:00 davem@nuts.davemloft.net # [PKT_SCHED]: Basic classifier # # The basic classifier is the most simple classifier one can think of, # it doesn't do anything on its own but to support extended matches and # actions. A basic classifier returns true if no ematches or actions # are configured and thus can also be used as a catch-all classifier. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/Makefile # 2005/02/15 12:20:47-08:00 davem@nuts.davemloft.net +1 -0 # [PKT_SCHED]: Basic classifier # # net/sched/Kconfig # 2005/02/15 12:20:47-08:00 davem@nuts.davemloft.net +10 -0 # [PKT_SCHED]: Basic classifier # # include/linux/pkt_cls.h # 2005/02/15 12:20:47-08:00 davem@nuts.davemloft.net +14 -0 # [PKT_SCHED]: Basic classifier # # net/sched/cls_basic.c # 2005/02/15 12:20:45-08:00 davem@nuts.davemloft.net +303 -0 # [PKT_SCHED]: Basic classifier # # net/sched/cls_basic.c # 2005/02/15 12:20:45-08:00 davem@nuts.davemloft.net +0 -0 # BitKeeper file /disk1/BK/net-2.6.12/net/sched/cls_basic.c # # ChangeSet # 2005/02/15 12:20:03-08:00 davem@nuts.davemloft.net # [PKT_SCHED]: Metadata ematch (meta) # # The meta ematch allows comparing various metadata values against # static values from usersapce or other metadata values. It currently # supports various numeric meta values such as netfilter mark, packet # length, security level, interface indices, tc classid, load average, # a random value but also variable length values such as interface # names. Adding support for additional meta values is as easy as # writing a data collector (usually 1-5 lines of code) and assign it # to a id and type by putting it into the meta operations table. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/Makefile # 2005/02/15 12:19:29-08:00 davem@nuts.davemloft.net +1 -0 # [PKT_SCHED]: Metadata ematch (meta) # # net/sched/Kconfig # 2005/02/15 12:19:29-08:00 davem@nuts.davemloft.net +11 -0 # [PKT_SCHED]: Metadata ematch (meta) # # include/linux/pkt_cls.h # 2005/02/15 12:19:29-08:00 davem@nuts.davemloft.net +1 -0 # [PKT_SCHED]: Metadata ematch (meta) # # net/sched/em_meta.c # 2005/02/15 12:19:25-08:00 davem@nuts.davemloft.net +661 -0 # [PKT_SCHED]: Metadata ematch (meta) # # net/sched/em_meta.c # 2005/02/15 12:19:25-08:00 davem@nuts.davemloft.net +0 -0 # BitKeeper file /disk1/BK/net-2.6.12/net/sched/em_meta.c # # include/linux/tc_ematch/tc_em_meta.h # 2005/02/15 12:19:24-08:00 davem@nuts.davemloft.net +69 -0 # [PKT_SCHED]: Metadata ematch (meta) # # include/linux/tc_ematch/tc_em_meta.h # 2005/02/15 12:19:24-08:00 davem@nuts.davemloft.net +0 -0 # BitKeeper file /disk1/BK/net-2.6.12/include/linux/tc_ematch/tc_em_meta.h # # ChangeSet # 2005/02/15 12:18:11-08:00 davem@nuts.davemloft.net # [PKT_SCHED]: u32 ematch # # The u32 ematch behaves exactly the same as a u32 match and will replace # it in the long term. It allows the underlying classifiers to give hints # about the position of the next protocol header (i.e. nexthdr+). # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/Makefile # 2005/02/15 12:17:28-08:00 davem@nuts.davemloft.net +1 -0 # [PKT_SCHED]: u32 ematch # # net/sched/Kconfig # 2005/02/15 12:17:28-08:00 davem@nuts.davemloft.net +10 -0 # [PKT_SCHED]: u32 ematch # # include/net/pkt_cls.h # 2005/02/15 12:17:28-08:00 davem@nuts.davemloft.net +2 -0 # [PKT_SCHED]: u32 ematch # # include/linux/pkt_cls.h # 2005/02/15 12:17:28-08:00 davem@nuts.davemloft.net +1 -0 # [PKT_SCHED]: u32 ematch # # net/sched/em_u32.c # 2005/02/15 12:17:19-08:00 davem@nuts.davemloft.net +63 -0 # [PKT_SCHED]: u32 ematch # # net/sched/em_u32.c # 2005/02/15 12:17:19-08:00 davem@nuts.davemloft.net +0 -0 # BitKeeper file /disk1/BK/net-2.6.12/net/sched/em_u32.c # # ChangeSet # 2005/02/15 12:16:10-08:00 davem@nuts.davemloft.net # [PKT_SCHED]: Multi byte comparison ematch (nbyte) # # The nbyte ematch allows comparing any number of bytes at an arbitary # offset based on one of the skb layers. Its main usage is intended # for IPv6 addresses but may be used for any kind of pattern. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/em_nbyte.c # 2005/02/15 12:15:35-08:00 davem@nuts.davemloft.net +82 -0 # [PKT_SCHED]: Multi byte comparison ematch (nbyte) # # net/sched/Makefile # 2005/02/15 12:15:36-08:00 davem@nuts.davemloft.net +1 -0 # [PKT_SCHED]: Multi byte comparison ematch (nbyte) # # net/sched/Kconfig # 2005/02/15 12:15:36-08:00 davem@nuts.davemloft.net +10 -0 # [PKT_SCHED]: Multi byte comparison ematch (nbyte) # # include/linux/pkt_cls.h # 2005/02/15 12:15:36-08:00 davem@nuts.davemloft.net +1 -0 # [PKT_SCHED]: Multi byte comparison ematch (nbyte) # # net/sched/em_nbyte.c # 2005/02/15 12:15:35-08:00 davem@nuts.davemloft.net +0 -0 # BitKeeper file /disk1/BK/net-2.6.12/net/sched/em_nbyte.c # # include/linux/tc_ematch/tc_em_nbyte.h # 2005/02/15 12:15:33-08:00 davem@nuts.davemloft.net +13 -0 # [PKT_SCHED]: Multi byte comparison ematch (nbyte) # # include/linux/tc_ematch/tc_em_nbyte.h # 2005/02/15 12:15:33-08:00 davem@nuts.davemloft.net +0 -0 # BitKeeper file /disk1/BK/net-2.6.12/include/linux/tc_ematch/tc_em_nbyte.h # # ChangeSet # 2005/02/15 12:14:44-08:00 davem@nuts.davemloft.net # [PKT_SCHED]: Simple comparison ematch (cmp) # # The cmp ematch compares a static value provided by userspace against # a 8, 16, or 32bit chunk read from the packet. The reading offset is # provided by userspace and based on one of the skb layers (mac|nh|h). # The ematch provides functionality to transform the byte order of # the chunk and/or apply a mask and understands the operands eq, lt, # and gt. Basically, it is very similiar to the u32 (e)match but tries # filling the gaps left behind. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/Makefile # 2005/02/15 12:13:58-08:00 davem@nuts.davemloft.net +1 -0 # [PKT_SCHED]: Simple comparison ematch (cmp) # # net/sched/Kconfig # 2005/02/15 12:13:58-08:00 davem@nuts.davemloft.net +10 -0 # [PKT_SCHED]: Simple comparison ematch (cmp) # # include/net/pkt_cls.h # 2005/02/15 12:13:58-08:00 davem@nuts.davemloft.net +20 -0 # [PKT_SCHED]: Simple comparison ematch (cmp) # # include/linux/pkt_cls.h # 2005/02/15 12:13:58-08:00 davem@nuts.davemloft.net +8 -0 # [PKT_SCHED]: Simple comparison ematch (cmp) # # net/sched/em_cmp.c # 2005/02/15 12:13:56-08:00 davem@nuts.davemloft.net +101 -0 # [PKT_SCHED]: Simple comparison ematch (cmp) # # net/sched/em_cmp.c # 2005/02/15 12:13:56-08:00 davem@nuts.davemloft.net +0 -0 # BitKeeper file /disk1/BK/net-2.6.12/net/sched/em_cmp.c # # include/linux/tc_ematch/tc_em_cmp.h # 2005/02/15 12:13:55-08:00 davem@nuts.davemloft.net +26 -0 # [PKT_SCHED]: Simple comparison ematch (cmp) # # include/linux/tc_ematch/tc_em_cmp.h # 2005/02/15 12:13:55-08:00 davem@nuts.davemloft.net +0 -0 # BitKeeper file /disk1/BK/net-2.6.12/include/linux/tc_ematch/tc_em_cmp.h # # ChangeSet # 2005/02/15 12:13:15-08:00 davem@nuts.davemloft.net # [PKT_SCHED]: Extended Matches API # # An extended match (ematch) is a small classifiction tool not worth # writing a full classifier for. Ematches can be interconnected to form # a logic expression and get attached to classifiers to extend their # functionatlity. # # The userspace part transforms the logic expressions into an array # consisting of multiple sequences of interconnected ematches separated # by markers. Precedence is implemented by a special ematch kind # referencing a sequence beyond the marker of the current sequence # causing the current position in the sequence to be pushed onto a stack # to allow the current position to be overwritten by the position # referenced in the special ematch. Matching continues in the new sequence # until a marker is reached causing the position to be restored from the # stack. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/Makefile # 2005/02/15 12:12:37-08:00 davem@nuts.davemloft.net +1 -0 # [PKT_SCHED]: Extended Matches API # # net/sched/Kconfig # 2005/02/15 12:12:37-08:00 davem@nuts.davemloft.net +23 -0 # [PKT_SCHED]: Extended Matches API # # include/net/pkt_cls.h # 2005/02/15 12:12:37-08:00 davem@nuts.davemloft.net +170 -0 # [PKT_SCHED]: Extended Matches API # # include/linux/rtnetlink.h # 2005/02/15 12:12:37-08:00 davem@nuts.davemloft.net +5 -0 # [PKT_SCHED]: Extended Matches API # # include/linux/pkt_cls.h # 2005/02/15 12:12:37-08:00 davem@nuts.davemloft.net +72 -0 # [PKT_SCHED]: Extended Matches API # # net/sched/ematch.c # 2005/02/15 12:12:33-08:00 davem@nuts.davemloft.net +524 -0 # [PKT_SCHED]: Extended Matches API # # net/sched/ematch.c # 2005/02/15 12:12:33-08:00 davem@nuts.davemloft.net +0 -0 # BitKeeper file /disk1/BK/net-2.6.12/net/sched/ematch.c # # ChangeSet # 2005/02/15 11:54:41-08:00 davem@nuts.davemloft.net # Merge nuts.davemloft.net:/disk1/BK/network-2.6.12 # into nuts.davemloft.net:/disk1/BK/net-2.6.12 # # net/ipv4/route.c # 2005/02/15 11:54:29-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # net/core/sock.c # 2005/02/15 11:54:29-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # drivers/char/random.c # 2005/02/15 11:54:29-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # drivers/atm/iphase.c # 2005/02/15 11:54:29-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # ChangeSet # 2005/02/13 12:50:34-05:00 nacc@us.ibm.com # [PATCH] net/s2io: replace schedule_timeout() with msleep() # # Use msleep() instead of schedule_timeout() to guarantee the task delays # as expected. This makes the code independent of HZ values (particularly # important when HZ changes or is dynamic). Compile- and boot-tested. # # Signed-off-by: Nishanth Aravamudan # Acked-by: Ravinandan Arakali # Signed-off-by: Jeff Garzik # # drivers/net/s2io.c # 2005/02/09 14:08:48-05:00 nacc@us.ibm.com +18 -35 # net/s2io: replace schedule_timeout() with msleep() # # ChangeSet # 2005/02/11 16:59:53-05:00 andi@cosy.sbg.ac.at # [PATCH] sundance: attempt to address high irqs due to TX overflow # # In at least some versions of Kernel 2.6 (2.6.8.1, 2.6.11-rc2) # the driver drivers/net/sundance.c creates high interrupt load # (~ 100 interrupts per second) even in case of no network traffic # at all. # # It seems that some sort of TX overflow handling is misplaced # and triggers interrupts very often even in case of no data to # send. The TX overflow handling has been moved to a more # appropriate place. # # While there, an off by one error of reading the TX status has # also been corrected by moving the read after the break. # # Thanks to Jeroen who tested the patch (also with high workload). # Interrupts are down to normal and there are no obvious side # effects. # # drivers/net/sundance.c # 2005/02/11 16:59:47-05:00 andi@cosy.sbg.ac.at +4 -3 # [PATCH] sundance: attempt to address high irqs due to TX overflow # # In at least some versions of Kernel 2.6 (2.6.8.1, 2.6.11-rc2) # the driver drivers/net/sundance.c creates high interrupt load # (~ 100 interrupts per second) even in case of no network traffic # at all. # # It seems that some sort of TX overflow handling is misplaced # and triggers interrupts very often even in case of no data to # send. The TX overflow handling has been moved to a more # appropriate place. # # While there, an off by one error of reading the TX status has # also been corrected by moving the read after the break. # # Thanks to Jeroen who tested the patch (also with high workload). # Interrupts are down to normal and there are no obvious side # effects. # # ChangeSet # 2005/02/11 16:55:06-05:00 fubar@us.ibm.com # [PATCH] bonding: Update/rewrite bonding.txt # # This is a complete overhaul of the bonding.txt documentation. # # Signed-off-by: Jay Vosburgh # Signed-off-by: Jeff Garzik # # Documentation/networking/bonding.txt # 2005/02/11 04:44:37-05:00 fubar@us.ibm.com +1367 -741 # bonding: Update/rewrite bonding.txt # # ChangeSet # 2005/02/11 16:54:54-05:00 fubar@us.ibm.com # [PATCH] bonding: Update kconfig description # # This patch updates the very-outdated Kconfig description for bonding. # Users reading the help text in menuconfig or xconfig would see text that # implied that bonding only supports static link aggregation, and required a # specific switch to make it work. The new description mentions multiple # bonding modes and points the user to the bonding.txt documentation. # # Signed-off-by: Mitch Williams # Signed-off-by: Jay Vosburgh # Signed-off-by: Jeff Garzik # # drivers/net/Kconfig # 2005/02/08 17:05:06-05:00 fubar@us.ibm.com +5 -8 # bonding: Update kconfig description # # ChangeSet # 2005/02/11 16:54:40-05:00 fubar@us.ibm.com # [PATCH] bonding: change misleading warning # # This updates a warning message that the bonding driver issues # when some modes are unable to determine the link speed of a slave # device. The old message led users to believe that bonding was slowing # their gigabit devices to 100 Mb/sec. # # Signed-off-by: Jay Vosburgh # Signed-off-by: Jeff Garzik # # drivers/net/bonding/bond_main.c # 2005/02/11 02:00:02-05:00 fubar@us.ibm.com +2 -2 # bonding: change misleading warning # # ChangeSet # 2005/02/11 16:54:28-05:00 fubar@us.ibm.com # [PATCH] : bonding: use wrappers to change mtu and MAC # # This updates the bonding driver to use the dev_set_mtu() and # dev_set_mac_address() wrapper functions. # # Signed-off-by: Jay Vosburgh # Signed-off-by: Jeff Garzik # # drivers/net/bonding/bond_main.c # 2005/02/11 01:20:08-05:00 fubar@us.ibm.com +11 -20 # : bonding: use wrappers to change mtu and MAC # # drivers/net/bonding/bond_alb.c # 2005/02/11 01:16:32-05:00 fubar@us.ibm.com +4 -4 # : bonding: use wrappers to change mtu and MAC # # ChangeSet # 2005/02/11 16:54:16-05:00 fubar@us.ibm.com # [PATCH] : net/core: move set MAC into separate function # # This moves the SIOCSIFHWADDR code from dev_ifsioc() into a # separate new function, dev_set_mac_address(). This provides a single # entry point for all callers performing MAC address changes. # # Signed-off-by: Jay Vosburgh # Signed-off-by: Jeff Garzik # # net/core/dev.c # 2005/02/11 00:54:32-05:00 fubar@us.ibm.com +17 -11 # : net/core: move set MAC into separate function # # include/linux/netdevice.h # 2005/02/11 00:54:25-05:00 fubar@us.ibm.com +2 -0 # : net/core: move set MAC into separate function # # ChangeSet # 2005/02/08 20:26:38-08:00 herbert@gondor.apana.org.au # [IPSEC]: Stop using dst->xfrm # # Here is a precursor to the xfrm dst consolidation that I talked about. # In order to be able to store multiple SAs in one dst, we need to stop # using dst->xfrm directly. # # The following patch does that for the ->output() functions. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/xfrm6_tunnel.c # 2005/02/08 20:26:16-08:00 herbert@gondor.apana.org.au +1 -1 # [IPSEC]: Stop using dst->xfrm # # Here is a precursor to the xfrm dst consolidation that I talked about. # In order to be able to store multiple SAs in one dst, we need to stop # using dst->xfrm directly. # # The following patch does that for the ->output() functions. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/xfrm6_output.c # 2005/02/08 20:26:16-08:00 herbert@gondor.apana.org.au +1 -1 # [IPSEC]: Stop using dst->xfrm # # Here is a precursor to the xfrm dst consolidation that I talked about. # In order to be able to store multiple SAs in one dst, we need to stop # using dst->xfrm directly. # # The following patch does that for the ->output() functions. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/ipcomp6.c # 2005/02/08 20:26:16-08:00 herbert@gondor.apana.org.au +1 -3 # [IPSEC]: Stop using dst->xfrm # # Here is a precursor to the xfrm dst consolidation that I talked about. # In order to be able to store multiple SAs in one dst, we need to stop # using dst->xfrm directly. # # The following patch does that for the ->output() functions. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/esp6.c # 2005/02/08 20:26:16-08:00 herbert@gondor.apana.org.au +1 -3 # [IPSEC]: Stop using dst->xfrm # # Here is a precursor to the xfrm dst consolidation that I talked about. # In order to be able to store multiple SAs in one dst, we need to stop # using dst->xfrm directly. # # The following patch does that for the ->output() functions. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/ah6.c # 2005/02/08 20:26:16-08:00 herbert@gondor.apana.org.au +1 -3 # [IPSEC]: Stop using dst->xfrm # # Here is a precursor to the xfrm dst consolidation that I talked about. # In order to be able to store multiple SAs in one dst, we need to stop # using dst->xfrm directly. # # The following patch does that for the ->output() functions. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/xfrm4_tunnel.c # 2005/02/08 20:26:16-08:00 herbert@gondor.apana.org.au +1 -1 # [IPSEC]: Stop using dst->xfrm # # Here is a precursor to the xfrm dst consolidation that I talked about. # In order to be able to store multiple SAs in one dst, we need to stop # using dst->xfrm directly. # # The following patch does that for the ->output() functions. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/xfrm4_output.c # 2005/02/08 20:26:16-08:00 herbert@gondor.apana.org.au +1 -1 # [IPSEC]: Stop using dst->xfrm # # Here is a precursor to the xfrm dst consolidation that I talked about. # In order to be able to store multiple SAs in one dst, we need to stop # using dst->xfrm directly. # # The following patch does that for the ->output() functions. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/ipcomp.c # 2005/02/08 20:26:16-08:00 herbert@gondor.apana.org.au +1 -3 # [IPSEC]: Stop using dst->xfrm # # Here is a precursor to the xfrm dst consolidation that I talked about. # In order to be able to store multiple SAs in one dst, we need to stop # using dst->xfrm directly. # # The following patch does that for the ->output() functions. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/esp4.c # 2005/02/08 20:26:16-08:00 herbert@gondor.apana.org.au +1 -3 # [IPSEC]: Stop using dst->xfrm # # Here is a precursor to the xfrm dst consolidation that I talked about. # In order to be able to store multiple SAs in one dst, we need to stop # using dst->xfrm directly. # # The following patch does that for the ->output() functions. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/ah4.c # 2005/02/08 20:26:16-08:00 herbert@gondor.apana.org.au +1 -3 # [IPSEC]: Stop using dst->xfrm # # Here is a precursor to the xfrm dst consolidation that I talked about. # In order to be able to store multiple SAs in one dst, we need to stop # using dst->xfrm directly. # # The following patch does that for the ->output() functions. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/net/xfrm.h # 2005/02/08 20:26:16-08:00 herbert@gondor.apana.org.au +1 -1 # [IPSEC]: Stop using dst->xfrm # # Here is a precursor to the xfrm dst consolidation that I talked about. # In order to be able to store multiple SAs in one dst, we need to stop # using dst->xfrm directly. # # The following patch does that for the ->output() functions. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/02/08 20:17:48-08:00 davem@nuts.davemloft.net # Resolve ATM conflicts. # # net/atm/svc.c # 2005/02/08 20:17:29-08:00 davem@nuts.davemloft.net +1 -1 # Resolve ATM conflicts. # # ChangeSet # 2005/02/08 20:13:46-08:00 davem@nuts.davemloft.net # Resolve ATM conflicts. # # net/netlink/af_netlink.c # 2005/02/08 20:09:15-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # net/key/af_key.c # 2005/02/08 20:09:15-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # net/atm/lec.c # 2005/02/08 20:09:15-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # net/atm/clip.c # 2005/02/08 20:09:15-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # include/linux/atalk.h # 2005/02/08 20:09:15-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # drivers/net/pppoe.c # 2005/02/08 20:09:15-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # drivers/atm/he.c # 2005/02/08 20:09:14-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # ChangeSet # 2005/02/08 20:06:58-08:00 shemminger@osdl.org # [IPV6]: match TCP port selection behavior with ipv4 # # This patch makes TCP over IPV6 select ports the same way the current # TCPv4 code does. It uses a hash function to provide a starting offset # and a free running counter to provide seed. # # This changes the port selection semantics to match TCPv4 as well. # If the port is in use but to a different remote address, it will get # reused. It looks like the TCPv6 code was not updated when the TCPv4 # code changed. Now the code in ipv4/tcp_ipv4.c and ipv6/tcp_ipv6.c are # almost identical for tcp_hash_connect. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # net/ipv6/tcp_ipv6.c # 2005/02/08 20:06:36-08:00 shemminger@osdl.org +104 -23 # [IPV6]: match TCP port selection behavior with ipv4 # # This patch makes TCP over IPV6 select ports the same way the current # TCPv4 code does. It uses a hash function to provide a starting offset # and a free running counter to provide seed. # # This changes the port selection semantics to match TCPv4 as well. # If the port is in use but to a different remote address, it will get # reused. It looks like the TCPv6 code was not updated when the TCPv4 # code changed. Now the code in ipv4/tcp_ipv4.c and ipv6/tcp_ipv6.c are # almost identical for tcp_hash_connect. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # net/ipv4/tcp_ipv4.c # 2005/02/08 20:06:36-08:00 shemminger@osdl.org +1 -0 # [IPV6]: match TCP port selection behavior with ipv4 # # This patch makes TCP over IPV6 select ports the same way the current # TCPv4 code does. It uses a hash function to provide a starting offset # and a free running counter to provide seed. # # This changes the port selection semantics to match TCPv4 as well. # If the port is in use but to a different remote address, it will get # reused. It looks like the TCPv6 code was not updated when the TCPv4 # code changed. Now the code in ipv4/tcp_ipv4.c and ipv6/tcp_ipv6.c are # almost identical for tcp_hash_connect. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # include/linux/random.h # 2005/02/08 20:06:36-08:00 shemminger@osdl.org +2 -0 # [IPV6]: match TCP port selection behavior with ipv4 # # This patch makes TCP over IPV6 select ports the same way the current # TCPv4 code does. It uses a hash function to provide a starting offset # and a free running counter to provide seed. # # This changes the port selection semantics to match TCPv4 as well. # If the port is in use but to a different remote address, it will get # reused. It looks like the TCPv6 code was not updated when the TCPv4 # code changed. Now the code in ipv4/tcp_ipv4.c and ipv6/tcp_ipv6.c are # almost identical for tcp_hash_connect. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # drivers/char/random.c # 2005/02/08 20:06:36-08:00 shemminger@osdl.org +15 -0 # [IPV6]: match TCP port selection behavior with ipv4 # # This patch makes TCP over IPV6 select ports the same way the current # TCPv4 code does. It uses a hash function to provide a starting offset # and a free running counter to provide seed. # # This changes the port selection semantics to match TCPv4 as well. # If the port is in use but to a different remote address, it will get # reused. It looks like the TCPv6 code was not updated when the TCPv4 # code changed. Now the code in ipv4/tcp_ipv4.c and ipv6/tcp_ipv6.c are # almost identical for tcp_hash_connect. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # ChangeSet # 2005/02/08 20:02:47-08:00 kaber@trash.net # [NET]: Remove protocol specific hacks in skb_ip_make_writable() # # These cause more trouble than anything else. In fact these # silly checks keep the ipt action from working with targets # that mangle the data area. # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # net/core/netfilter.c # 2005/02/08 20:02:09-08:00 kaber@trash.net +1 -33 # [NET]: Remove protocol specific hacks in skb_ip_make_writable() # # These cause more trouble than anything else. In fact these # silly checks keep the ipt action from working with targets # that mangle the data area. # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # ChangeSet # 2005/02/08 12:23:18-08:00 brking@us.ibm.com # [PATCH] PCI: Dynids - passing driver data # # Currently, code exists in the pci layer to allow userspace to specify # driver data when adding a pci dynamic id from sysfs. However, this data # is never used and there exists no way in the existing code to use it. # This patch allows device drivers to indicate that they want driver data # passed to them on dynamic id adds by initializing use_driver_data in their # pci_driver->pci_dynids struct. The documentation has also been updated # to reflect this. # # Signed-off-by: Brian King # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/pci-driver.c # 2005/02/07 13:58:21-08:00 brking@us.ibm.com +0 -1 # PCI: Dynids - passing driver data # # Documentation/pci.txt # 2005/02/07 13:58:21-08:00 brking@us.ibm.com +4 -4 # PCI: Dynids - passing driver data # # ChangeSet # 2005/02/08 12:22:53-08:00 Mark.Haigh@spirentcom.com # [PATCH] arch/i386/kernel/pci/irq.c: Wrong message output # # The following has been reported in the wild for kernel 2.6.8-24: # # PCI: Enabling device 0000:00:05.0 (0000 -> 0002) # PCI: No IRQ known for interrupt pin @ of device 0000:00:05.0. Probably # buggy MP table. # # It should read "No IRQ known for interrupt pin A", but the 'pin' # variable has already been decremented (from 1 to 0), so the line: # # printk(KERN_WARNING "PCI: No IRQ known for interrupt pin %c of device # %s.%s\n", 'A' + pin - 1, dev->slot_name, msg); # # causes "pin @" to be output, because 'A' + 0 - 1 == '@'. # # The supplied patch should fix it. It also removes a redundant check for # a nonzero pin. # # Signed-off-by: Mark F. Haigh # Signed-off-by: Greg Kroah-Hartman # # arch/i386/pci/irq.c # 2005/02/07 21:39:15-08:00 Mark.Haigh@spirentcom.com +36 -37 # arch/i386/kernel/pci/irq.c: Wrong message output # # ChangeSet # 2005/02/07 16:21:16-08:00 bjorn.helgaas@hp.com # [PATCH] PCI: pci_raw_ops should use unsigned args # # Convert pci_raw_ops to use unsigned segment (aka domain), # bus, and devfn. With the previous code, various ia64 config # accesses fail due to segment sign-extension problems. # # ia64: # - With a signed seg >= 0x8, unwanted sign-extension occurs when # "seg << 28" is cast to u64 in PCI_SAL_EXT_ADDRESS() # - PCI_SAL_EXT_ADDRESS(): cast to u64 *before* shifting; otherwise # "seg << 28" is evaluated as unsigned int (32 bits) and gets # truncated when seg > 0xf # - pci_sal_read(): validate "value" ptr as other arches do # - pci_sal_{read,write}(): return -EINVAL rather than SAL error status # # arch/i386/pci/direct.c | 12 ++++++---- # arch/i386/pci/mmconfig.c | 6 +++-- # arch/i386/pci/numa.c | 6 +++-- # arch/i386/pci/pcbios.c | 6 +++-- # arch/ia64/pci/pci.c | 53 ++++++++++++++++++--------------------------- # arch/x86_64/pci/mmconfig.c | 8 ++++-- # include/linux/pci.h | 6 +++-- # 7 files changed, 51 insertions(+), 46 deletions(-) # # Signed-off-by: Bjorn Helgaas # Acked-by: Matthew Wilcox # Signed-off-by: Greg Kroah-Hartman # # include/linux/pci.h # 2005/02/03 10:08:22-08:00 bjorn.helgaas@hp.com +4 -2 # PCI: pci_raw_ops should use unsigned args # # arch/x86_64/pci/mmconfig.c # 2005/02/03 10:08:22-08:00 bjorn.helgaas@hp.com +5 -3 # PCI: pci_raw_ops should use unsigned args # # arch/ia64/pci/pci.c # 2005/02/03 10:08:22-08:00 bjorn.helgaas@hp.com +22 -31 # PCI: pci_raw_ops should use unsigned args # # arch/i386/pci/pcbios.c # 2005/02/03 10:08:21-08:00 bjorn.helgaas@hp.com +4 -2 # PCI: pci_raw_ops should use unsigned args # # arch/i386/pci/numa.c # 2005/02/03 10:55:05-08:00 bjorn.helgaas@hp.com +4 -2 # PCI: pci_raw_ops should use unsigned args # # arch/i386/pci/mmconfig.c # 2005/02/03 10:08:21-08:00 bjorn.helgaas@hp.com +4 -2 # PCI: pci_raw_ops should use unsigned args # # arch/i386/pci/direct.c # 2005/02/03 10:08:21-08:00 bjorn.helgaas@hp.com +8 -4 # PCI: pci_raw_ops should use unsigned args # # ChangeSet # 2005/02/07 16:20:50-08:00 bjorn.helgaas@hp.com # [PATCH] PCI: NUMA-Q PCI config access arg validation # # Fix NUMA-Q PCI config access bus validation. "bus" indexes # into BUS2QUAD, which is mp_bus_id_to_node[MAX_MP_BUSSES]. # # This depends on the "pci_raw_ops should use unsigned args" # patch I posted earlier today (no functional dependency; it # just happens to be very close textually). # # Signed-off-by: Bjorn Helgaas # Signed-off-by: Martin J. Bligh # Signed-off-by: Greg Kroah-Hartman # # arch/i386/pci/numa.c # 2005/02/03 15:24:27-08:00 bjorn.helgaas@hp.com +2 -2 # PCI: NUMA-Q PCI config access arg validation # # ChangeSet # 2005/02/07 16:20:26-08:00 muneda.takahiro@jp.fujitsu.com # [PATCH] PCI: fix pci_remove_legacy_files() crash # # The legacy_io which is the member of pci_bus struct might be # NULL. It should be checked. # # This patch checks 'b->legacy_io', NULL or not. # # Signed-off-by: MUNEDA Takahiro # Acked-by: Jesse Barnes # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/probe.c # 2005/02/02 18:21:51-08:00 muneda.takahiro@jp.fujitsu.com +5 -3 # PCI: fix pci_remove_legacy_files() crash # # ChangeSet # 2005/02/07 14:38:32-08:00 matthew@wil.cx # [PATCH] PCI: Make pci_claim_resource __devinit # # ia64 calls pci_claim_resource() from pcibios_fixup_bus(), which is # __devinit, so pci_claim_resource() needs to be __devinit too. # # Signed-off-by: Matthew Wilcox # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/setup-res.c # 2005/02/07 12:51:58-08:00 matthew@wil.cx +1 -1 # PCI: Make pci_claim_resource __devinit # # ChangeSet # 2005/02/07 14:38:06-08:00 matthew@wil.cx # [PATCH] PCI: pci_proc_domain # # There's no need for the architectures to know how to name busses, # so replace pci_name_bus with pci_proc_domain -- a predicate to allow # architectures to choose whether domains are included in /proc/bus/pci # or not. I've converted all architectures but only tested ia64 and a # CONFIG_PCI_DOMAINS=n build. # # Signed-off-by: Matthew Wilcox # Signed-off-by: Greg Kroah-Hartman # # include/linux/pci.h # 2005/02/07 12:52:02-08:00 matthew@wil.cx +1 -2 # PCI: pci_proc_domain # # include/asm-sparc64/pci.h # 2005/02/07 12:52:02-08:00 matthew@wil.cx +4 -1 # PCI: pci_proc_domain # # include/asm-ppc64/pci.h # 2005/02/07 12:52:02-08:00 matthew@wil.cx +2 -2 # PCI: pci_proc_domain # # include/asm-ppc/pci.h # 2005/02/07 12:52:02-08:00 matthew@wil.cx +1 -2 # PCI: pci_proc_domain # # include/asm-mips/pci.h # 2005/02/07 12:52:02-08:00 matthew@wil.cx +2 -9 # PCI: pci_proc_domain # # include/asm-ia64/pci.h # 2005/02/07 12:52:02-08:00 matthew@wil.cx +2 -7 # PCI: pci_proc_domain # # include/asm-alpha/pci.h # 2005/02/07 12:52:02-08:00 matthew@wil.cx +2 -9 # PCI: pci_proc_domain # # drivers/pci/proc.c # 2005/02/07 12:52:02-08:00 matthew@wil.cx +13 -7 # PCI: pci_proc_domain # # arch/sparc64/kernel/pci.c # 2005/02/07 12:52:02-08:00 matthew@wil.cx +0 -6 # PCI: pci_proc_domain # # arch/ppc64/kernel/pci.c # 2005/02/07 12:52:02-08:00 matthew@wil.cx +6 -10 # PCI: pci_proc_domain # # ChangeSet # 2005/02/07 14:37:42-08:00 eike-hotplug@sf-tec.de # [PATCH] PCI Hotplug: Remove unneeded instructions from ibmphp_pci.c # # this patch removes some unneeded code from ibmphp_pci.c. First I thought it # is a bug and the second line should have been "sec_no = (int) sec_number". # But than I found exactly the same read only 9 lines higher and after it the # line I expected the second one to be. Between the 2 pci_bus_read_config_byte's # are only some checks so I don't expect them to return different results. And # sec_no is and int so removing this wont change anything at all. # # # Signed-off-by: Rolf Eike Beer # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/hotplug/ibmphp_pci.c # 2005/02/07 12:52:07-08:00 eike-hotplug@sf-tec.de +0 -3 # PCI Hotplug: Remove unneeded instructions from ibmphp_pci.c # # ChangeSet # 2005/02/07 14:37:01-08:00 davej@redhat.com # [PATCH] Remove pci_dev->slot_name # # This is a pointer to dev.bus_id, which is properly accessed through the # pci_name() function. # # Signed-off-by: Dave Jones # Signed-off-by: Greg Kroah-Hartman # # include/linux/pci.h # 2005/02/07 12:52:49-08:00 davej@redhat.com +0 -2 # Remove pci_dev->slot_name # # ChangeSet # 2005/02/07 14:36:14-08:00 davej@redhat.com # [PATCH] convert pci_dev->slot_name usage to pci_name() # # Prepare for removal of pci_dev->slot_name # # Signed-off-by: Dave Jones # Signed-off-by: Greg Kroah-Hartman # # drivers/scsi/qla2xxx/qla_os.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +7 -7 # convert pci_dev->slot_name usage to pci_name() # # drivers/pcmcia/yenta_socket.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/pci/setup-res.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/pci/probe.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +0 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/pci/pci.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/parisc/dino.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +2 -3 # convert pci_dev->slot_name usage to pci_name() # # drivers/net/wan/wanxl.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +16 -22 # convert pci_dev->slot_name usage to pci_name() # # drivers/net/via-velocity.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/net/typhoon.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/net/tulip/tulip.h # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/net/sk98lin/skge.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/net/sk98lin/skethtool.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/net/s2io.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/net/r8169.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +2 -2 # convert pci_dev->slot_name usage to pci_name() # # drivers/net/defxx.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/media/video/zoran_driver.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/media/video/meye.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/media/common/saa7146_video.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/isdn/hisax/hisax_fcpcipnp.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/ide/pci/sgiioc4.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +3 -3 # convert pci_dev->slot_name usage to pci_name() # # drivers/char/agp/sis-agp.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/char/agp/generic.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # arch/sh64/kernel/pcibios.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +2 -2 # convert pci_dev->slot_name usage to pci_name() # # arch/sh64/kernel/pci_sh5.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # arch/sh/drivers/pci/pci-st40.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # arch/sh/drivers/pci/pci-sh7751.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +4 -4 # convert pci_dev->slot_name usage to pci_name() # # arch/sh/drivers/pci/fixups-sh03.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +2 -2 # convert pci_dev->slot_name usage to pci_name() # # arch/ppc/kernel/pci.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # arch/mips/pmc-sierra/yosemite/ht.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +3 -3 # convert pci_dev->slot_name usage to pci_name() # # arch/frv/mb93090-mb00/pci-vdk.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +3 -3 # convert pci_dev->slot_name usage to pci_name() # # arch/frv/mb93090-mb00/pci-frv.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +2 -2 # convert pci_dev->slot_name usage to pci_name() # # ChangeSet # 2005/02/07 12:20:33-05:00 scjody@modernduck.com # Merge modernduck.com:/usr/src/bk/linux-2.5 # into modernduck.com:/usr/src/bk/1394-2.6 # # MAINTAINERS # 2005/02/07 12:20:26-05:00 scjody@modernduck.com +0 -0 # Auto merged # # BitKeeper/etc/ignore # 2005/02/07 12:19:58-05:00 scjody@modernduck.com +10 -10 # auto-union # # ChangeSet # 2005/02/05 23:12:30-05:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/linux-2.6 # into pobox.com:/garz/repo/libata-dev/remove-one-fix # # drivers/scsi/libata-core.c # 2005/02/05 23:12:26-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/02/05 23:08:09-05:00 adam@yggdrasil.com # [PATCH] ata_pci_remove_one used freed memory # # Attempting to unload a serial ATA driver module gave me a kernel # memory fault. I think this problem occurs in all configurations, but # I should mention that my configuration may be slightly unusual in that # I configured my BIOS not to do IDE emulation with SATA disks, and I don't # actually have any disks plugged in. # # The problem was that ata_pci_remove_one would call # scsi_host_put(ap->host), which would free the memory used to hold # host_set->ports, but host_set->ports was used later in ata_pci_remove_one. # # So, the following patch reorders some of the steps in # ata_pci_remove_one and seems to eliminate the problem, at least to # the extent that I can unload and reload the module, although I do not # have a SATA disk handy for testing (I'm expecting one to arrive later # today). # # The patch actually makes the code four lines shorter, although # two of those lines come from putting an assignement and variable # declaration in the same line. Since the patch is a little hard to # read, here is a description of the edit steps. # # 1. Moved pci_release_regions() to toward the end of the routine # to facilitate merging the loops before and after it. Also, I think that # calls that are good candidates for consolidating into the bus-level code # in the future (instead of individual drivers) are best put at the beginning # or end of the driver routines so that it is clearer if there would be # problems doing such consolidation. # # 2. Moved the cacluation of ioaddr into the only if-branch that # uses it. # # 3. Moved the call to scsi_host_put to after the code that # checks ATA_FLAG_NO_LEGACY. # # Signed-off-by: Jeff Garzik # # drivers/scsi/libata-core.c # 2004/12/24 21:15:45-05:00 adam@yggdrasil.com +6 -10 # ata_pci_remove_one used freed memory # # ChangeSet # 2005/02/04 14:49:20-05:00 scjody@modernduck.com # Merge modernduck.com:/usr/src/bk/linux-2.5 # into modernduck.com:/usr/src/bk/1394-2.6 # # MAINTAINERS # 2005/02/04 14:49:13-05:00 scjody@modernduck.com +0 -0 # Auto merged # # ChangeSet # 2005/02/03 14:17:57-05:00 scjody@modernduck.com # Re-added Ben Collins to 1394. # # Signed-off-by: Jody McIntyre # # MAINTAINERS # 2005/02/03 14:17:34-05:00 scjody@modernduck.com +6 -0 # Re-added Ben Collins to 1394. # # ChangeSet # 2005/02/03 13:32:52-05:00 scjody@modernduck.com # Merge modernduck.com:/usr/src/bk/linux-2.5 # into modernduck.com:/usr/src/bk/1394-2.6 # # MAINTAINERS # 2005/02/03 13:32:44-05:00 scjody@modernduck.com +0 -0 # Auto merged # # ChangeSet # 2005/02/02 16:50:23-08:00 lkml@einar-lueck.de # [IPV4]: Splitting of ip_route_{in,out}put_slow(). # # From: Einar Lueck # # This patch splits up ip_route_[in|out]put_slow in inlined functions. # Basic idea: # * improve overall comprehensibility # * allow for an easier application of patch for improved multipath # support # # Signed-off-by: David S. Miller # # net/ipv4/route.c # 2005/02/02 16:49:29-08:00 lkml@einar-lueck.de +332 -207 # [IPV4]: Splitting of ip_route_{in,out}put_slow(). # # BitKeeper/etc/ignore # 2005/02/02 14:11:07-05:00 scjody@modernduck.com +3 -0 # added patches/pcilynx-stack-reduction.patch patches/select-net.patch patches/series # # ChangeSet # 2005/02/02 13:33:22-05:00 scjody@modernduck.com # 1394 uses skbs, so select NET. # # drivers/ieee1394/Kconfig # 2005/02/02 13:32:57-05:00 scjody@modernduck.com +1 -0 # 1394 uses skbs, so select NET. # # ChangeSet # 2005/02/02 00:37:41-05:00 akpm@osdl.org # [PATCH] use datacs in smc91x driver # # From: Ian Campbell # # Below is a patch to support the second 32-bit DATACS chipselect in the # smc91x driver to transfer data. Support is enabled by adding a resource to # the platform device named 'smc91x-data32'. # # My platform has a 16-bit chip select for the primary IO region and no DMA. # I found that throughput went from roughly 50mbit/s to 80mbit/s. I tested # by throwing UDP packets at it using mgen (9000 packets/second with UDP # payload of 1472 bytes is roughly 100mbit/s, I think) and counting the # packets received in 60s, I then did the same for transmitting. The # measurements are very rough but the improvement seems fairly significant to # me. # # Patch was compiled for lubbock and neponset and compiled and tested on my # PXA platform. # # Signed-off-by: Ian Campbell # Signed-off-by: Nicolas Pitre # Signed-off-by: Andrew Morton # Signed-off-by: Jeff Garzik # # drivers/net/smc91x.h # 2005/01/28 22:36:52-05:00 akpm@osdl.org +52 -7 # use datacs in smc91x driver # # drivers/net/smc91x.c # 2005/01/28 22:36:52-05:00 akpm@osdl.org +108 -42 # use datacs in smc91x driver # # arch/arm/mach-sa1100/neponset.c # 2005/01/28 22:36:52-05:00 akpm@osdl.org +2 -0 # use datacs in smc91x driver # # arch/arm/mach-pxa/lubbock.c # 2005/01/28 22:36:52-05:00 akpm@osdl.org +2 -0 # use datacs in smc91x driver # # ChangeSet # 2005/02/02 00:37:29-05:00 nico@cam.org # [PATCH] smc91x: allow RX of VLAN packets # # This patch allows for VLAN packets to be received. The initial patch # was from Andrew de Quincey. # # While there, it also adds a test against an impossible hardware state # in theory but that happened in practice where the chip returns a # packet length of 0 which, once the status words have been substracted, # causes the transfer of data with a negative length. Flaky hardware is # probably to blame here but better guard ourselves against that than # crashing the kernel. David Brownell was the happy victim of such hw. # # Signed-off-by: Nicolas Pitre # Signed-off-by: Jeff Garzik # # drivers/net/smc91x.c # 2005/01/27 22:16:44-05:00 nico@cam.org +14 -2 # smc91x: allow RX of VLAN packets # # ChangeSet # 2005/02/01 17:05:14-05:00 scjody@modernduck.com # pcilynx.c: # pcilynx: reduce stack usage in add_card(), # from 800 to 308 bytes (on i386), by dynamically allocating # struct i2c_adapter i2c_adapter; /* 492 bytes */ # # Signed-off-by: Randy Dunlap # Signed-off-by: Jody McIntyre # # drivers/ieee1394/pcilynx.c # 2005/02/01 17:03:20-05:00 scjody@modernduck.com +18 -11 # pcilynx: reduce stack usage in add_card(), # from 800 to 308 bytes (on i386), by dynamically allocating # struct i2c_adapter i2c_adapter; /* 492 bytes */ # # ChangeSet # 2005/01/31 16:19:48-05:00 scjody@modernduck.com # Update ieee1394 maintainers. # # Signed-off-by: Jody McIntyre # # MAINTAINERS # 2005/01/31 16:19:25-05:00 scjody@modernduck.com +18 -8 # Update ieee1394 maintainers. # # ChangeSet # 2005/01/31 16:02:58-05:00 scjody@modernduck.com # Fix PCILynx bus resets. # # Signed-off-by: Ben Collins # Signed-off-by: Jody McIntyre # # drivers/ieee1394/pcilynx.c # 2005/01/31 16:02:35-05:00 scjody@modernduck.com +2 -2 # Fix PCILynx bus resets. # # ChangeSet # 2005/01/31 15:51:07-05:00 scjody@modernduck.com # Dan Dennedy: change allocation to GPF_ATOMIC to fix timing issue when this # is called from raw1394.c:arm_register(). # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/highlevel.c # 2005/01/31 15:50:32-05:00 scjody@modernduck.com +1 -1 # Dan Dennedy: change allocation to GPF_ATOMIC to fix timing issue when this # is called from raw1394.c:arm_register(). # # Signed-off-by: Jody McIntyre # # ChangeSet # 2005/01/31 15:50:09-05:00 scjody@modernduck.com # Fix whitespace/indenting to match SVN. # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/eth1394.c # 2005/01/31 15:49:38-05:00 scjody@modernduck.com +2 -2 # Fix whitespace/indenting to match SVN. # # Signed-off-by: Jody McIntyre # # ChangeSet # 2005/01/31 15:47:36-05:00 scjody@modernduck.com # Fix revisions to match svn # Signed-off-by: Jody McIntyre # # drivers/ieee1394/ohci1394.c # 2005/01/31 15:46:02-05:00 scjody@modernduck.com +1 -1 # Fix revisions to match svn # Signed-off-by: Jody McIntyre # # drivers/ieee1394/eth1394.c # 2005/01/31 15:46:02-05:00 scjody@modernduck.com +2 -2 # Fix revisions to match svn # Signed-off-by: Jody McIntyre # # ChangeSet # 2005/01/31 01:16:24-05:00 scjody@modernduck.com # Dan Dennedy: # # reorganise LUN handling to resolve oops # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/nodemgr.c # 2005/01/31 01:15:47-05:00 scjody@modernduck.com +2 -5 # # ChangeSet # 2005/01/31 01:15:11-05:00 scjody@modernduck.com # # Adds a disable_irm option to ieee1394.ko which disables all Isochronous # Resource Manager functionality, useful to work around certain problems, # e.g. iPod detection. # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/pcilynx.c # 2005/01/31 01:14:29-05:00 scjody@modernduck.com +23 -16 # # drivers/ieee1394/ohci1394.c # 2005/01/31 01:14:29-05:00 scjody@modernduck.com +8 -4 # # drivers/ieee1394/nodemgr.c # 2005/01/31 01:14:29-05:00 scjody@modernduck.com +2 -1 # # drivers/ieee1394/ieee1394_core.h # 2005/01/31 01:14:29-05:00 scjody@modernduck.com +1 -0 # # drivers/ieee1394/ieee1394_core.c # 2005/01/31 01:14:29-05:00 scjody@modernduck.com +17 -1 # # drivers/ieee1394/ieee1394.h # 2005/01/31 01:14:29-05:00 scjody@modernduck.com +24 -0 # # ChangeSet # 2005/01/31 01:13:34-05:00 scjody@modernduck.com # Dan Dennedy: # # bugfix for logical unit directory lun number # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/sbp2.c # 2005/01/31 01:12:53-05:00 scjody@modernduck.com +4 -1 # # ChangeSet # 2005/01/31 01:10:23-05:00 scjody@modernduck.com # # Bugfix for Logical Unit Number in unit directory -- popular with multi-bay # enclosures -- while not breaking Logical Unit Directory. # # Signed-off-by: Dan Dennedy # Signed-off-by: Jody McIntyre # # drivers/ieee1394/sbp2.c # 2005/01/31 01:09:18-05:00 scjody@modernduck.com +2 -2 # # drivers/ieee1394/nodemgr.h # 2005/01/31 01:09:18-05:00 scjody@modernduck.com +2 -0 # # drivers/ieee1394/nodemgr.c # 2005/01/31 01:09:17-05:00 scjody@modernduck.com +20 -5 # # ChangeSet # 2005/01/31 01:08:05-05:00 scjody@modernduck.com # # Fixed removal of old partial datagrams. Since max_partial_datagrams can # be changed at runtime, there may be _more_ than max_partial_datagrams # in the list. Also removed obsolote comment. # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/eth1394.c # 2005/01/31 01:07:26-05:00 scjody@modernduck.com +2 -3 # # ChangeSet # 2005/01/31 01:06:59-05:00 scjody@modernduck.com # # dma.c vfree() checking cleanups. # # Signed-off by: James Lamanna # Signed-off-by: Domen Puncer # Signed-off-by: Jody McIntyre # # drivers/ieee1394/dma.c # 2005/01/31 01:06:22-05:00 scjody@modernduck.com +5 -9 # # ChangeSet # 2005/01/31 01:05:55-05:00 scjody@modernduck.com # # Sets the sendtime of a packet _before_ adding it to pending_packet_queue, # to prevent premature expiry (which leads to "unsolicited response packet" # errors, among other things). # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/ieee1394_core.c # 2005/01/31 01:05:18-05:00 scjody@modernduck.com +1 -0 # # ChangeSet # 2005/01/31 01:04:34-05:00 scjody@modernduck.com # # We need to update the old csr1212 cache's bus generation after a bus # reset once we decide it is still valid. # Closes a vmalloc leak on *every* bus reset. # # Signed-off-by: Jim Radford # Signed-off-by: Jody McIntyre # # drivers/ieee1394/nodemgr.c # 2005/01/31 01:03:52-05:00 scjody@modernduck.com +7 -0 # # ChangeSet # 2005/01/31 01:03:20-05:00 scjody@modernduck.com # # This closes a small vmalloc leak on insmod/rmmod. # # Signed-off-by: Jim Radford # Signed-off-by: Jody McIntyre # # drivers/ieee1394/config_roms.c # 2005/01/31 01:02:41-05:00 scjody@modernduck.com +1 -1 # # ChangeSet # 2005/01/31 01:00:27-05:00 scjody@modernduck.com # # Dan Dennedy: # # Ignore any return value from devfs since it is non-critical, and a # EEXIST return prevents the module from loading! # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/raw1394.c # 2005/01/31 00:59:32-05:00 scjody@modernduck.com +1 -4 # # ChangeSet # 2005/01/31 00:58:01-05:00 scjody@modernduck.com # # Move simple class to ieee1394 core and register as # /sys/class/ieee1394_protocol. # Add sysfs/udev support to video1394 and dv1394 using simple class # ieee1394_protocol. # # Signed-off-by: Dan Dennedy # Signed-off-by: Jody McIntyre # # drivers/ieee1394/video1394.c # 2005/01/31 00:57:19-05:00 scjody@modernduck.com +8 -2 # # drivers/ieee1394/raw1394.c # 2005/01/31 00:57:18-05:00 scjody@modernduck.com +16 -25 # # drivers/ieee1394/ieee1394_core.h # 2005/01/31 00:57:18-05:00 scjody@modernduck.com +1 -0 # # drivers/ieee1394/ieee1394_core.c # 2005/01/31 00:57:18-05:00 scjody@modernduck.com +13 -3 # # drivers/ieee1394/dv1394.c # 2005/01/31 00:57:18-05:00 scjody@modernduck.com +5 -0 # # ChangeSet # 2005/01/31 00:56:15-05:00 scjody@modernduck.com # Cleanup with Lindent. # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/raw1394.c # 2005/01/31 00:51:42-05:00 scjody@modernduck.com +1525 -1538 # # ChangeSet # 2005/01/31 00:49:36-05:00 scjody@modernduck.com # Some Lindent cleanup (most removed to its own patch by scjody) # Adds basic sysfs support for udev etc. # # Signed-off-by: Daniel Drake # Signed-off-by: Jody McIntyre # # drivers/ieee1394/raw1394.c # 2005/01/31 00:47:36-05:00 scjody@modernduck.com +531 -335 # # ChangeSet # 2005/01/31 00:34:02-05:00 scjody@modernduck.com # # Change some variables and functions that were needlessly global static. # Removes several functions that weren't used anywhere in the kernel. # Removes many unnecessary EXPORT_SYMBOL's. # # Signed-off-by: Adrian Bunk # Signed-off-by: Jody McIntyre # # drivers/ieee1394/video1394.c # 2005/01/31 00:33:22-05:00 scjody@modernduck.com +5 -5 # # drivers/ieee1394/sbp2.c # 2005/01/31 00:33:22-05:00 scjody@modernduck.com +2 -2 # # drivers/ieee1394/nodemgr.c # 2005/01/31 00:33:22-05:00 scjody@modernduck.com +2 -45 # # drivers/ieee1394/ieee1394_transactions.c # 2005/01/31 00:33:22-05:00 scjody@modernduck.com +0 -28 # # drivers/ieee1394/ieee1394_core.h # 2005/01/31 00:33:22-05:00 scjody@modernduck.com +0 -1 # # drivers/ieee1394/ieee1394_core.c # 2005/01/31 00:33:22-05:00 scjody@modernduck.com +3 -27 # # drivers/ieee1394/highlevel.c # 2005/01/31 00:33:22-05:00 scjody@modernduck.com +0 -32 # # drivers/ieee1394/dv1394.c # 2005/01/31 00:33:22-05:00 scjody@modernduck.com +1 -1 # # drivers/ieee1394/amdtp.c # 2005/01/31 00:33:22-05:00 scjody@modernduck.com +8 -8 # # ChangeSet # 2005/01/31 00:32:16-05:00 scjody@modernduck.com # # Fixes a bug in the channel reservation : # If dma resources allocation fails, the channel was not freed. I fixed # that by marking the channel allocated after the dma resources allocation # succeeded. Also changed the error return value from ioctl. # # Signed-off-by: Philippe De Muyter # Signed-off-by: Dan Dennedy # Signed-off-by: Jody McIntyre # # drivers/ieee1394/video1394.c # 2005/01/31 00:31:38-05:00 scjody@modernduck.com +55 -37 # # ChangeSet # 2005/01/30 23:28:23-05:00 scjody@modernduck.com # Damien Douxchamps: # # I have tested and updated a patch from Randy Dunlap that fixes missing # entries in the modules.ieee1394map file. The patch is against latest SVN # (1234). # # The patch adds the following entries for IIDC cameras that would not be # detected otherwise: # # video1394 0x0000000c 0x000000 0x000000 0x00a02d 0x000101 # video1394 0x0000000c 0x000000 0x000000 0x00a02d 0x000102 # raw1394 0x0000000c 0x000000 0x000000 0x00a02d 0x000101 # raw1394 0x0000000c 0x000000 0x000000 0x00a02d 0x000102 # # This is necessary because the IIDC consortium interpreted the 1394 # specifications differently. They have been summoned by the 1394TA to # change their numbering policy so that these entries are final and will # not grow forever in number. # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/video1394.c # 2005/01/30 23:27:16-05:00 scjody@modernduck.com +10 -0 # # drivers/ieee1394/raw1394.c # 2005/01/30 23:27:07-05:00 scjody@modernduck.com +10 -0 # # ChangeSet # 2005/01/30 23:24:06-05:00 scjody@modernduck.com # From Stefan Richter: # # In trunk/ohci1394.c, duplicate code has slipped in which sets # max_packet_size to 512 and prints a log notice. See "Serial EEPROM # Sanity check" further down in ohci_initialize(). Since the latter code # is more appropriate, the former is deleted by the attached patch. # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/ohci1394.c # 2005/01/30 23:20:38-05:00 scjody@modernduck.com +0 -6 # # ChangeSet # 2005/01/30 23:00:14-05:00 scjody@modernduck.com # This patch makes sure we check the return value of copy_to_user() in # drivers/ieee1394/raw1394.c::raw1394_read() with the added bonus of # silencing this warning: # include/asm/uaccess.h: In function `raw1394_read': # drivers/ieee1394/raw1394.c:446: warning: ignoring return value of `__copy_to_user', declared with attribute warn_unused_result # # I've submitted this before, but never got an ACK or NACK, and the patch is # still relevant against latest Linus bk (2.6.10-rc2-bk11 atm). # # # Signed-off-by: Jesper Juhl # Signed-off-by: Jody McIntyre # # drivers/ieee1394/raw1394.c # 2005/01/30 22:58:41-05:00 scjody@modernduck.com +8 -2 # # ChangeSet # 2005/01/30 22:30:46-05:00 scjody@modernduck.com # Olaf Hering: Fix sw-suspend issue # # sw-suspend does not work with our kernel. # khpsbpkt will die because down_interruptible returns -EINTR on suspend. # As a result, hpsb packet delivery will not work anymore after resume. # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/ieee1394_core.c # 2005/01/30 22:28:36-05:00 scjody@modernduck.com +10 -6 # # ChangeSet # 2005/01/30 22:11:26-05:00 scjody@modernduck.com # Christoph Hellwig: avoid obsolete scsi APIs in sbp2 # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/sbp2.h # 2005/01/30 22:10:07-05:00 scjody@modernduck.com +9 -7 # # drivers/ieee1394/sbp2.c # 2005/01/30 22:10:07-05:00 scjody@modernduck.com +36 -33 # # ChangeSet # 2005/01/29 15:28:42-05:00 scjody@modernduck.com # fix nodemgr parsing subdirectories in unit directory and tiny bugfix in # sbp2 unit directory parsing (for PowerFile) # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/sbp2.c # 2005/01/29 15:28:18-05:00 scjody@modernduck.com +1 -1 # # drivers/ieee1394/nodemgr.c # 2005/01/29 15:28:18-05:00 scjody@modernduck.com +59 -48 # # ChangeSet # 2005/01/29 15:27:50-05:00 scjody@modernduck.com # # Fix GCC 3.4 compile error with inline keyword in function prototype. # # Signed-off-by: Adrian Bunk # Signed-off-by: Steve Kinneberg # Signed-off-by: Jody McIntyre # # drivers/ieee1394/eth1394.c # 2005/01/29 15:27:27-05:00 scjody@modernduck.com +2 -2 # # ChangeSet # 2005/01/29 15:25:53-05:00 scjody@modernduck.com # # Use wmb() to make sure things get flushed before setting the wakup bit. # # Signed-off-by: Ben Collins # Submitted-by: Keith Bengston # Signed-off-by: Jody McIntyre # # drivers/ieee1394/ohci1394.c # 2005/01/29 15:25:30-05:00 scjody@modernduck.com +4 -0 # # ChangeSet # 2005/01/29 15:24:28-05:00 scjody@modernduck.com # # Fix buffer overflow in csr1212.c. # # Signed-off-by: Steve Kinneberg # Signed-off-by: Jody McIntyre # # drivers/ieee1394/csr1212.c # 2005/01/29 15:24:05-05:00 scjody@modernduck.com +5 -2 # # ChangeSet # 2005/01/29 15:21:50-05:00 scjody@modernduck.com # # Fix bug where 4 times Extended ROM Leaf size would be read when parsing in csr1212. Added NULL check for csr1212_rom_cache_malloc return value. # # Signed-off-by: Steve Kinneberg # Signed-off-by: Jody McIntyre # # drivers/ieee1394/csr1212.c # 2005/01/29 15:21:26-05:00 scjody@modernduck.com +7 -5 # # ChangeSet # 2005/01/29 15:16:50-05:00 scjody@modernduck.com # # Fix bugs generating and parsing ConfigROMs with Extended ROM entries. # # Signed-off-by: Steve Kinneberg # Signed-off-by: Jody McIntyre # # drivers/ieee1394/csr1212.c # 2005/01/29 15:16:02-05:00 scjody@modernduck.com +75 -44 # # ChangeSet # 2005/01/28 00:16:10-05:00 ralf@linux-mips.org # [PATCH] SGI Seeq updates # # o Support for setting the MAC address # o Make some sort of attempt at dealing with multicast in order to support # IPv6 etc. The Seeq 8003 was built in the assumption nobody was ever going # to need multicast, it seems. # # Signed-off-by: Jeff Garzik # # drivers/net/sgiseeq.c # 2005/01/27 21:11:40-05:00 ralf@linux-mips.org +52 -18 # SGI Seeq updates # # ChangeSet # 2005/01/28 00:15:58-05:00 ralf@linux-mips.org # [PATCH] SB1250 driver updates # # o Fix initialization of internal sbmac eth1 # o Clean up comments # o Add in new module parameter handling # o Fix printing of device name before register_netdevice # # Signed-off-by: Jeff Garzik # # drivers/net/sb1250-mac.c # 2005/01/27 21:08:04-05:00 ralf@linux-mips.org +58 -51 # SB1250 driver updates # # ChangeSet # 2005/01/28 00:15:46-05:00 ralf@linux-mips.org # [PATCH] S2IO syntax fixes # # Syntactic nitpicking - C wants a space between the "include" and "<" just # gcc happens to be tollerant. # # Signed-off-by: Jeff Garzik # # drivers/net/s2io.c # 2005/01/27 21:05:03-05:00 ralf@linux-mips.org +23 -22 # S2IO syntax fixes # # ChangeSet # 2005/01/28 00:15:32-05:00 ralf@linux-mips.org # [PATCH] Meth driver updates # # General driver updates, now approaching reliability of some definition. # # Signed-off-by: Jeff Garzik # # drivers/net/meth.h # 2005/01/27 21:03:34-05:00 ralf@linux-mips.org +1 -1 # Meth driver updates # # drivers/net/meth.c # 2005/01/27 21:03:34-05:00 ralf@linux-mips.org +143 -132 # Meth driver updates # # ChangeSet # 2005/01/28 00:12:42-05:00 ralf@linux-mips.org # [PATCH] Marvell MV-64340 driver upda # # o Momentum Ocelot 3 also features a MV-64340 # o Momentum Jaguar ATX does not need the special casing in the driver. # # Signed-off-by: Jeff Garzik # # drivers/net/mv643xx_eth.c # 2005/01/27 21:01:51-05:00 ralf@linux-mips.org +0 -2 # Marvell MV-64340 driver upda # # drivers/net/Kconfig # 2005/01/27 21:01:51-05:00 ralf@linux-mips.org +1 -1 # Marvell MV-64340 driver upda # # ChangeSet # 2005/01/28 00:12:28-05:00 ralf@linux-mips.org # [PATCH] Jazzsonic driver updates # # o Resurrect the Jazz SONIC driver after years of it not having been tested # o Convert from Space.c initialization to module_init / platform device. # # Signed-off-by: Jeff Garzik # # drivers/net/sonic.c # 2005/01/27 20:59:23-05:00 ralf@linux-mips.org +2 -2 # Jazzsonic driver updates # # drivers/net/jazzsonic.c # 2005/01/27 20:59:23-05:00 ralf@linux-mips.org +146 -71 # Jazzsonic driver updates # # drivers/net/Space.c # 2005/01/27 20:59:23-05:00 ralf@linux-mips.org +0 -8 # Jazzsonic driver updates # # drivers/net/Kconfig # 2005/01/27 20:59:23-05:00 ralf@linux-mips.org +1 -1 # Jazzsonic driver updates # # ChangeSet # 2005/01/28 00:12:15-05:00 ralf@linux-mips.org # [PATCH] IOC3 driver updates # # o Fix build if CONFIG_SERIAL_8250 is disabled. # o Add support for setting the MAC address via ifconfig # o Generally try to pretend we're a better PCI citizen than the broken piece # of silicon that the IOC3 is actually is. # # Signed-off-by: Jeff Garzik # # drivers/net/ioc3-eth.c # 2005/01/27 20:55:14-05:00 ralf@linux-mips.org +71 -11 # IOC3 driver updates # # drivers/net/Kconfig # 2005/01/27 20:55:14-05:00 ralf@linux-mips.org +1 -1 # IOC3 driver updates # # ChangeSet # 2005/01/28 00:09:27-05:00 ralf@linux-mips.org # [PATCH] Remove Baget network driver # # Remove the support for Baget, a Russian embedded system suffering from # bitrot for way too long. # # Signed-off-by: Jeff Garzik # # drivers/net/Space.c # 2005/01/27 20:47:03-05:00 ralf@linux-mips.org +0 -3 # Remove Baget network driver # # drivers/net/Makefile # 2005/01/27 20:47:03-05:00 ralf@linux-mips.org +0 -1 # Remove Baget network driver # # drivers/net/Kconfig # 2005/01/27 20:47:03-05:00 ralf@linux-mips.org +0 -8 # Remove Baget network driver # # BitKeeper/deleted/.del-bagetlance.c~e863fc0ebec8bb67 # 2005/01/28 00:09:20-05:00 ralf@linux-mips.org +0 -0 # Delete: drivers/net/bagetlance.c # # ChangeSet # 2005/01/28 00:09:14-05:00 ralf@linux-mips.org # [PATCH] Au1000 driver updates # # o mii-tool support # o MAC address memcpy fix # o VLAN support # # Signed-off-by: Jeff Garzik # # drivers/net/au1000_eth.h # 2005/01/27 20:46:47-05:00 ralf@linux-mips.org +32 -23 # Au1000 driver updates # # drivers/net/au1000_eth.c # 2005/01/27 20:46:47-05:00 ralf@linux-mips.org +1114 -247 # Au1000 driver updates # # ChangeSet # 2005/01/27 17:18:18-05:00 dhollis@davehollis.com # Move MII-related constants from b44/tg3 drivers to linux/mii.h. # # include/linux/mii.h # 2005/01/27 17:18:11-05:00 dhollis@davehollis.com +4 -0 # Move MII-related constants from b44/tg3 drivers to linux/mii.h. # # drivers/net/tg3.h # 2005/01/27 17:18:11-05:00 dhollis@davehollis.com +0 -14 # Move MII-related constants from b44/tg3 drivers to linux/mii.h. # # drivers/net/b44.h # 2005/01/27 17:18:11-05:00 dhollis@davehollis.com +0 -14 # Move MII-related constants from b44/tg3 drivers to linux/mii.h. # # ChangeSet # 2005/01/27 16:58:32-05:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] ibmlana part 2 (iomem annotations and isa-ectomy) # # the usual switch to ioremap and normal iomem access primitives # Signed-off-by: Al Viro # Signed-off-by: Jeff Garzik # # drivers/net/ibmlana.h # 2004/12/27 21:29:49-05:00 viro@parcelfarce.linux.theplanet.co.uk +1 -0 # ibmlana part 2 (iomem annotations and isa-ectomy) # # drivers/net/ibmlana.c # 2004/12/27 21:29:49-05:00 viro@parcelfarce.linux.theplanet.co.uk +38 -30 # ibmlana part 2 (iomem annotations and isa-ectomy) # # ChangeSet # 2005/01/27 16:58:20-05:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] ibmlana part 1 (netdev_priv()) # # switched to netdev_priv() # Signed-off-by: Al Viro # Signed-off-by: Jeff Garzik # # drivers/net/ibmlana.c # 2004/12/27 01:04:19-05:00 viro@parcelfarce.linux.theplanet.co.uk +14 -17 # ibmlana part 1 (netdev_priv()) # # ChangeSet # 2005/01/27 16:55:13-05:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] sk_mca - iomem and isa-ectomy # # usual isa-ectomy and iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Jeff Garzik # # drivers/net/sk_mca.h # 2005/01/19 18:58:13-05:00 viro@parcelfarce.linux.theplanet.co.uk +5 -14 # sk_mca - iomem and isa-ectomy # # drivers/net/sk_mca.c # 2005/01/19 18:58:13-05:00 viro@parcelfarce.linux.theplanet.co.uk +50 -46 # sk_mca - iomem and isa-ectomy # # ChangeSet # 2005/01/27 16:54:59-05:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] sk_mca - netdev_priv() # # Signed-off-by: Al Viro # Signed-off-by: Jeff Garzik # # drivers/net/sk_mca.c # 2005/01/19 18:58:13-05:00 viro@parcelfarce.linux.theplanet.co.uk +14 -16 # sk_mca - netdev_priv() # # ChangeSet # 2005/01/27 15:55:00-05:00 brazilnut@us.ibm.com # [PATCH] pcnet32: 79c976 with fiber optic fix # # After testing this patch I agree that it should be applied. The one # change I made was to print the device name (ethN) instead of 'pcnet32'. # Tested ia32. # # From: Guido Guenther , # Lars Munch # # Skip PHY selection on Allied Telesyn 2701FX, it looses the link otherwise. # Fix up the AT 2700FX as well. # # Signed-Off-By: Guido Guenther # Signed-off-by: Andrew Morton # signed-off-by: Don Fry # Signed-off-by: Jeff Garzik # # include/linux/pci_ids.h # 2005/01/05 00:57:36-05:00 brazilnut@us.ibm.com +5 -0 # pcnet32: 79c976 with fiber optic fix # # drivers/net/pcnet32.c # 2005/01/05 00:57:36-05:00 brazilnut@us.ibm.com +29 -18 # pcnet32: 79c976 with fiber optic fix # # ChangeSet # 2005/01/24 09:09:37-06:00 shaggy@austin.ibm.com # Merge jfs@jfs.bkbits.net:linux-2.5 # into austin.ibm.com:/home/shaggy/bk/jfs-2.5 # # fs/jfs/jfs_txnmgr.c # 2005/01/24 09:09:26-06:00 shaggy@austin.ibm.com +0 -0 # Auto merged # # fs/jfs/jfs_metapage.c # 2005/01/24 09:09:26-06:00 shaggy@austin.ibm.com +0 -0 # Auto merged # # fs/jfs/jfs_logmgr.c # 2005/01/24 09:09:26-06:00 shaggy@austin.ibm.com +0 -0 # Auto merged # # ChangeSet # 2005/01/21 00:17:51-02:00 acme@toy.ghostprotocols.net # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/sched/sch_atm.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +1 -1 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/atm/svc.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +37 -34 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/atm/signaling.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +22 -19 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/atm/raw.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +9 -5 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/atm/proc.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +9 -9 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/atm/pppoatm.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +2 -1 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/atm/mpc.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +18 -10 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/atm/lec.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +23 -15 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/atm/ioctl.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +5 -4 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/atm/common.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +24 -31 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/atm/clip.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +11 -8 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/atm/br2684.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +2 -2 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/atm/atm_misc.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +4 -3 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # include/linux/atmdev.h # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +20 -8 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # drivers/atm/iphase.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +7 -5 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # drivers/atm/idt77252.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +5 -4 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # drivers/atm/he.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +1 -1 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # drivers/atm/atmtcp.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +7 -7 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2005/01/21 00:16:19-02:00 acme@toy.ghostprotocols.net # [PPPOX] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # include/linux/if_pppox.h # 2005/01/21 00:16:04-02:00 acme@toy.ghostprotocols.net +15 -4 # [PPPOX] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # drivers/net/pppox.c # 2005/01/21 00:16:04-02:00 acme@toy.ghostprotocols.net +1 -1 # [PPPOX] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # drivers/net/pppoe.c # 2005/01/21 00:16:04-02:00 acme@toy.ghostprotocols.net +39 -62 # [PPPOX] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2005/01/20 21:21:48-02:00 acme@toy.ghostprotocols.net # [IRDA] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/irda/af_irda.c # 2005/01/20 21:21:35-02:00 acme@toy.ghostprotocols.net +14 -24 # [IRDA] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # include/net/irda/af_irda.h # 2005/01/20 21:21:35-02:00 acme@toy.ghostprotocols.net +7 -2 # [IRDA] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2005/01/20 21:17:52-02:00 acme@toy.ghostprotocols.net # [LLC] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/llc/llc_sap.c # 2005/01/20 21:17:39-02:00 acme@toy.ghostprotocols.net +1 -1 # [LLC] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/llc/llc_proc.c # 2005/01/20 21:17:39-02:00 acme@toy.ghostprotocols.net +4 -4 # [LLC] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/llc/llc_if.c # 2005/01/20 21:17:39-02:00 acme@toy.ghostprotocols.net +2 -2 # [LLC] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/llc/llc_conn.c # 2005/01/20 21:17:39-02:00 acme@toy.ghostprotocols.net +18 -32 # [LLC] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/llc/llc_c_ev.c # 2005/01/20 21:17:39-02:00 acme@toy.ghostprotocols.net +1 -1 # [LLC] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/llc/llc_c_ac.c # 2005/01/20 21:17:39-02:00 acme@toy.ghostprotocols.net +46 -46 # [LLC] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/llc/af_llc.c # 2005/01/20 21:17:39-02:00 acme@toy.ghostprotocols.net +11 -11 # [LLC] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # include/net/llc_conn.h # 2005/01/20 21:17:39-02:00 acme@toy.ghostprotocols.net +8 -3 # [LLC] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2005/01/20 21:09:34-02:00 acme@toy.ghostprotocols.net # [PF_KEY] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/key/af_key.c # 2005/01/20 21:09:22-02:00 acme@toy.ghostprotocols.net +14 -19 # [PF_KEY] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2005/01/20 20:59:08-02:00 acme@toy.ghostprotocols.net # [X25] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/x25/x25_timer.c # 2005/01/20 20:58:55-02:00 acme@toy.ghostprotocols.net +7 -7 # [X25] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/x25/x25_subr.c # 2005/01/20 20:58:55-02:00 acme@toy.ghostprotocols.net +7 -7 # [X25] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/x25/x25_proc.c # 2005/01/20 20:58:55-02:00 acme@toy.ghostprotocols.net +1 -1 # [X25] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/x25/x25_out.c # 2005/01/20 20:58:55-02:00 acme@toy.ghostprotocols.net +4 -4 # [X25] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/x25/x25_in.c # 2005/01/20 20:58:55-02:00 acme@toy.ghostprotocols.net +5 -5 # [X25] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/x25/x25_facilities.c # 2005/01/20 20:58:55-02:00 acme@toy.ghostprotocols.net +1 -1 # [X25] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/x25/af_x25.c # 2005/01/20 20:58:55-02:00 acme@toy.ghostprotocols.net +13 -23 # [X25] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # include/net/x25.h # 2005/01/20 20:58:55-02:00 acme@toy.ghostprotocols.net +7 -3 # [X25] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2005/01/20 20:54:11-02:00 acme@toy.ghostprotocols.net # [NETLINK] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/netlink/af_netlink.c # 2005/01/20 20:53:58-02:00 acme@toy.ghostprotocols.net +28 -30 # [NETLINK] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2005/01/20 20:44:56-02:00 acme@toy.ghostprotocols.net # [ECONET] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/econet/af_econet.c # 2005/01/20 20:44:43-02:00 acme@toy.ghostprotocols.net +8 -13 # [ECONET] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # include/linux/if_ec.h # 2005/01/20 20:44:43-02:00 acme@toy.ghostprotocols.net +7 -3 # [ECONET] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2005/01/20 20:41:35-02:00 acme@toy.ghostprotocols.net # [AF_PACKET] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/packet/af_packet.c # 2005/01/20 20:41:21-02:00 acme@toy.ghostprotocols.net +26 -29 # [AF_PACKET] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2005/01/20 20:36:07-02:00 acme@toy.ghostprotocols.net # [DECNET] Don't use sk_protinfo + private sock slab cache # # DecNET already uses a private sock slab cache, but initializes sk->sk_protinfo, # pointing to (sk + 1), this is wrong because at sk_free time we call # sk->sk_destruct, that by default points to sock_def_destruct, that does a kfree # on sk->sk_protinfo, since it was initialized at net_proto_family->create() time # (dn_create), but in decnet sk_protinfo was not kmalloced, it was allocated # piggybacked to struct sock. # # This doesn't causes problems because decnet sets sk->sk_destruct to a custom # function that doesn't calls kfree(sk->sk_protinfo), but to reach a long time # goal of killing sk_protinfo lets just make DN_SK return sk + 1. # # I left merging dn_scp with dn_sock for later, as the current state suits my # needs to introduce connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/decnet/af_decnet.c # 2005/01/20 20:35:54-02:00 acme@toy.ghostprotocols.net +1 -2 # [DECNET] Don't use sk_protinfo + private sock slab cache # # DecNET already uses a private sock slab cache, but initializes sk->sk_protinfo, # pointing to (sk + 1), this is wrong because at sk_free time we call # sk->sk_destruct, that by default points to sock_def_destruct, that does a kfree # on sk->sk_protinfo, since it was initialized at net_proto_family->create() time # (dn_create), but in decnet sk_protinfo was not kmalloced, it was allocated # piggybacked to struct sock. # # This doesn't causes problems because decnet sets sk->sk_destruct to a custom # function that doesn't calls kfree(sk->sk_protinfo), but to reach a long time # goal of killing sk_protinfo lets just make DN_SK return sk + 1. # # I left merging dn_scp with dn_sock for later, as the current state suits my # needs to introduce connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # include/net/dn.h # 2005/01/20 20:35:54-02:00 acme@toy.ghostprotocols.net +5 -1 # [DECNET] Don't use sk_protinfo + private sock slab cache # # DecNET already uses a private sock slab cache, but initializes sk->sk_protinfo, # pointing to (sk + 1), this is wrong because at sk_free time we call # sk->sk_destruct, that by default points to sock_def_destruct, that does a kfree # on sk->sk_protinfo, since it was initialized at net_proto_family->create() time # (dn_create), but in decnet sk_protinfo was not kmalloced, it was allocated # piggybacked to struct sock. # # This doesn't causes problems because decnet sets sk->sk_destruct to a custom # function that doesn't calls kfree(sk->sk_protinfo), but to reach a long time # goal of killing sk_protinfo lets just make DN_SK return sk + 1. # # I left merging dn_scp with dn_sock for later, as the current state suits my # needs to introduce connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2005/01/20 20:32:38-02:00 acme@toy.ghostprotocols.net # [APPLETALK] stop using sk_protinfo # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/appletalk/ddp.c # 2005/01/20 20:32:26-02:00 acme@toy.ghostprotocols.net +2 -9 # [APPLETALK] stop using sk_protinfo # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # include/linux/atalk.h # 2005/01/20 20:32:26-02:00 acme@toy.ghostprotocols.net +7 -2 # [APPLETALK] stop using sk_protinfo # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2005/01/20 20:25:41-02:00 acme@toy.ghostprotocols.net # [SOCK] make sk_alloc use kmalloc for non performance critical families # # With this we can have aggregate protocol specific struct proto_sock # allocated for non performance critical protocols. # # We still check for slab == NULL && zero_it == 1 to allocate from the # generic "sock" slab cache, but this will be removed when all the # network families stop using sk_protinfo, when the generic "sock" # slab cache will be removed. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/core/sock.c # 2005/01/20 20:25:26-02:00 acme@toy.ghostprotocols.net +14 -3 # [SOCK] make sk_alloc use kmalloc for non performance critical families # # With this we can have aggregate protocol specific struct proto_sock # allocated for non performance critical protocols. # # We still check for slab == NULL && zero_it == 1 to allocate from the # generic "sock" slab cache, but this will be removed when all the # network families stop using sk_protinfo, when the generic "sock" # slab cache will be removed. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2005/01/20 14:46:30-06:00 shaggy@austin.ibm.com # JFS: replace schedule_timeout() with msleep() # # Use msleep() instead of schedule_timeout() to guarantee the task # delays as expected. The current code uses TASK_INTERRUPTIBLE; # however, it does not check for signals, so I do not think the # change to msleep() is necessarily bad. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Dave Kleikamp # # fs/jfs/jfs_logmgr.c # 2005/01/20 14:46:19-06:00 shaggy@austin.ibm.com +2 -2 # replace schedule_timeout() with msleep() # # ChangeSet # 2005/01/20 14:22:50-06:00 shaggy@austin.ibm.com # JFS: add missing include # # This is why it's a good idea to compile & test before checking in # the code. # # Signed-off-by: Dave Kleikamp # # fs/jfs/jfs_metapage.c # 2005/01/20 14:22:33-06:00 shaggy@austin.ibm.com +1 -0 # add missing include # # ChangeSet # 2005/01/20 14:14:19-06:00 shaggy@austin.ibm.com # JFS: fix livelock waiting for stale metapage # # Several waitors were keeping mp->count from going to zero, so we # would never release the page. Simplify the logic by doing a busy # wait without locking the metapage. # # Signed-off-by: Dave Kleikamp # # fs/jfs/jfs_metapage.c # 2005/01/20 14:13:55-06:00 shaggy@austin.ibm.com +6 -17 # many waitors for stale metapage resulted in livelock # # ChangeSet # 2005/01/18 01:43:40-05:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/linux-2.6 # into pobox.com:/garz/repo/netdev-2.6/8139too # # drivers/net/8139too.c # 2005/01/18 01:43:27-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/01/18 00:56:24-05:00 jgarzik@pobox.com # Merge http://typhoon.bkbits.net/typhoon-2.6 # into pobox.com:/garz/repo/netdev-2.6/typhoon # # drivers/net/typhoon.c # 2005/01/18 00:56:21-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/01/14 13:10:38-06:00 shaggy@austin.ibm.com # JFS: base static allocations on physical memory size # # On larger systems, performance is improved with a larger # allocation of tlocks & tblocks. Base the default size of these # allocations on the physical memory size. # # Signed-off-by: Dave Kleikamp # # fs/jfs/jfs_txnmgr.c # 2005/01/14 13:10:22-06:00 shaggy@austin.ibm.com +28 -6 # base default number of tlocks & tblocks on size of phyiscal memory # # ChangeSet # 2005/01/07 01:25:03-05:00 dave@thedillows.org # Bump version and release date. # # Signed-off-by: David Dillow # # drivers/net/typhoon.c # 2005/01/07 01:24:46-05:00 dave@thedillows.org +2 -2 # Bump version and release date. # # Signed-off-by: David Dillow # # ChangeSet # 2005/01/07 01:23:22-05:00 dave@thedillows.org # Version 03.001.008 of the Typhoon firmware, courtesy of 3Com. # Fixes various crypto bugs on the 3CR990B family, among other # issues. # # Signed-off-by: David Dillow # # drivers/net/typhoon-firmware.h # 2005/01/07 01:23:05-05:00 dave@thedillows.org +2525 -3043 # Version 03.001.008 of the Typhoon firmware, courtesy of 3Com. # Fixes various crypto bugs on the 3CR990B family, among other # issues. # # Signed-off-by: David Dillow # # ChangeSet # 2005/01/07 01:22:08-05:00 dave@thedillows.org # Fixup the version reporting to match 3Com. # # Signed-off-by: David Dillow # # drivers/net/typhoon.c # 2005/01/07 01:21:50-05:00 dave@thedillows.org +6 -3 # Fixup the version reporting to match 3Com. # # Signed-off-by: David Dillow # # ChangeSet # 2005/01/07 01:18:58-05:00 dave@thedillows.org # Use module_param() and add descriptions. # # Signed-off-by: David Dillow # # drivers/net/typhoon.c # 2005/01/07 01:18:41-05:00 dave@thedillows.org +8 -2 # Use module_param() and add descriptions. # # Signed-off-by: David Dillow # # ChangeSet # 2005/01/07 00:55:41-05:00 dave@thedillows.org # Teach typhoon to use port IO on machines that need it. It will attempt # to use MMIO, but if that fails (or the user asks), it will fallback # to port IO. # # Signed-off-by: David Dillow # # drivers/net/typhoon.c # 2005/01/07 00:55:21-05:00 dave@thedillows.org +144 -72 # Teach typhoon to use port IO on machines that need it. It will attempt # to use MMIO, but if that fails (or the user asks), it will fallback # to port IO. # # Signed-off-by: David Dillow # # ChangeSet # 2005/01/07 00:53:27-05:00 dave@thedillows.org # Enable bus mastering before saving our state, or we'll only be able # to load the modules one time. # # Signed-off-by: David Dillow # # drivers/net/typhoon.c # 2005/01/07 00:53:08-05:00 dave@thedillows.org +3 -4 # Enable bus mastering before saving our state, or we'll only be able # to load the modules one time. # # Signed-off-by: David Dillow # # ChangeSet # 2004/10/30 09:06:31-04:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/netdev-2.6/tmp # into pobox.com:/garz/repo/netdev-2.6/8139too # # drivers/net/8139too.c # 2004/10/30 09:06:28-04:00 jgarzik@pobox.com +0 -1 # Auto merged # # ChangeSet # 2004/10/30 09:05:22-04:00 tglx@linutronix.de # [PATCH] rtl8139too.c: Fix missing pci_disable_dev # # Simple fix to make pci_enable/disable symetric and avoid the warning on # module unload. # # Signed-off-by: Thomas Gleixner # Signed-off-by: Jeff Garzik # # drivers/net/8139too.c # 2004/10/21 20:00:00-04:00 tglx@linutronix.de +1 -1 # rtl8139too.c: Fix missing pci_disable_dev # # ChangeSet # 2004/10/26 17:10:11-04:00 akpm@osdl.org # [PATCH] rtl8139too.c: Fix missing pci_disable_dev # # From: Thomas Gleixner # # Simple fix to make pci_enable/disable symetric and avoid the warning on # module unload. # # Signed-off-by: Thomas Gleixner # Signed-off-by: Andrew Morton # Signed-off-by: Jeff Garzik # # drivers/net/8139too.c # 2004/10/24 06:32:54-04:00 akpm@osdl.org +1 -1 # rtl8139too.c: Fix missing pci_disable_dev # # ChangeSet # 2004/10/26 17:00:44-04:00 jgarzik@pobox.com # Hand-merge upstream pci_{save,restore}_state() stuff. # # drivers/net/8139too.c # 2004/10/26 17:00:39-04:00 jgarzik@pobox.com +0 -1 # Hand-merge upstream pci_{save,restore}_state() stuff. # # ChangeSet # 2004/10/15 19:25:35-04:00 shemminger@osdl.org # [PATCH] 8139too: use netdev_priv # # Use netdev_priv where appropriate, and get rid of "can't happen anymore" assert's. # # Signed-off-by: Stephen Hemminger # # drivers/net/8139too.c # 2004/10/15 18:25:02-04:00 shemminger@osdl.org +38 -45 # 8139too: use netdev_priv # # ChangeSet # 2004/08/28 19:06:15-04:00 rene.herman@keyaccess.nl # [PATCH] 8139too Interframe Gap Time # # drivers/net/8139too.c # 2004/04/30 10:29:08-04:00 rene.herman@keyaccess.nl +9 -5 # 8139too Interframe Gap Time # diff -Nru a/CREDITS b/CREDITS --- a/CREDITS 2005-03-07 14:54:17 -08:00 +++ b/CREDITS 2005-03-07 14:54:17 -08:00 @@ -1095,7 +1095,7 @@ N: Kumar Gala E: kumar.gala@freescale.com -D: Embedded PowerPC 6xx/7xx/74xx/82xx/85xx support +D: Embedded PowerPC 6xx/7xx/74xx/82xx/83xx/85xx support S: Austin, Texas 78729 S: USA diff -Nru a/Documentation/Changes b/Documentation/Changes --- a/Documentation/Changes 2005-03-07 14:54:18 -08:00 +++ b/Documentation/Changes 2005-03-07 14:54:18 -08:00 @@ -339,7 +339,7 @@ JFSutils -------- -o +o Reiserfsprogs ------------- diff -Nru a/Documentation/arm/Samsung-S3C24XX/H1940.txt b/Documentation/arm/Samsung-S3C24XX/H1940.txt --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/Documentation/arm/Samsung-S3C24XX/H1940.txt 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,40 @@ + HP IPAQ H1940 + ============= + +http://www.handhelds.org/projects/h1940.html + +Introduction +------------ + + The HP H1940 is a S3C2410 based handheld device, with + bluetooth connectivity. + + +Support +------- + + A variety of information is available + + handhelds.org project page: + + http://www.handhelds.org/projects/h1940.html + + handhelds.org wiki page: + + http://handhelds.org/moin/moin.cgi/HpIpaqH1940 + + Herbert Pötzl pages: + + http://vserver.13thfloor.at/H1940/ + + +Maintainers +----------- + + This project is being maintained and developed by a variety + of people, including Ben Dooks, Arnaud Patard, and Herbert Pötzl. + + Thanks to the many others who have also provided support. + + +(c) 2005 Ben Dooks \ No newline at end of file diff -Nru a/Documentation/arm/Samsung-S3C24XX/Overview.txt b/Documentation/arm/Samsung-S3C24XX/Overview.txt --- a/Documentation/arm/Samsung-S3C24XX/Overview.txt 2005-03-07 14:54:18 -08:00 +++ b/Documentation/arm/Samsung-S3C24XX/Overview.txt 2005-03-07 14:54:18 -08:00 @@ -36,6 +36,10 @@ Samsung's own development board, geared for PDA work. + Samsung/Meritech SMDK2440 + + The S3C2440 compatible version of the SMDK2440 + Thorcom VR1000 Custom embedded board @@ -98,6 +102,7 @@ Klaus Fetscher Dimitry Andric Shannon Holland + Guillaume Gourat (NexVision) Document Changes @@ -108,6 +113,8 @@ 25 Oct 2004 - BJD - Added Dimitry Andric to list of contributors 25 Oct 2004 - BJD - Updated the MTD from the 2.6.9 merge 21 Jan 2005 - BJD - Added rx3715, added Shannon to contributors + 10 Feb 2005 - BJD - Added Guillaume Gourat to contributors + 02 Mar 2005 - BJD - Added SMDK2440 to list of machines Document Author --------------- diff -Nru a/Documentation/arm/Samsung-S3C24XX/SMDK2440.txt b/Documentation/arm/Samsung-S3C24XX/SMDK2440.txt --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/Documentation/arm/Samsung-S3C24XX/SMDK2440.txt 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,56 @@ + Samsung/Meritech SMDK2440 + ========================= + +Introduction +------------ + + The SMDK2440 is a two part evaluation board for the Samsung S3C2440 + processor. It includes support for LCD, SmartMedia, Audio, SD and + 10MBit Ethernet, and expansion headers for various signals, including + the camera and unused GPIO. + + +Configuration +------------- + + To set the default configuration, use `make smdk2440_defconfig` which + will configure the common features of this board, or use + `make s3c2410_config` to include support for all s3c2410/s3c2440 machines + + +Support +------- + + Ben Dooks' SMDK2440 site at http://www.fluff.org/ben/smdk2440/ which + includes linux based USB download tools. + + Some of the h1940 patches that can be found from the H1940 project + site at http://www.handhelds.org/projects/h1940.html can also be + applied to this board. + + +Peripherals +----------- + + There is no current support for any of the extra peripherals on the + base-board itself. + + +MTD +--- + + The NAND flash should be supported by the in kernel MTD NAND support, + NOR flash will be added later. + + +Maintainers +----------- + + This board is being maintained by Ben Dooks, for more info, see + http://www.fluff.org/ben/smdk2440/ + + Many thanks to Dimitry Andric of TomTom for the loan of the SMDK2440, + and to Simtec Electronics for allowing me time to work on this. + + +(c) 2004 Ben Dooks \ No newline at end of file diff -Nru a/Documentation/cachetlb.txt b/Documentation/cachetlb.txt --- a/Documentation/cachetlb.txt 2005-03-07 14:54:16 -08:00 +++ b/Documentation/cachetlb.txt 2005-03-07 14:54:16 -08:00 @@ -155,7 +155,7 @@ change_range_of_page_tables(mm, start, end); flush_tlb_range(vma, start, end); - 3) flush_cache_page(vma, addr); + 3) flush_cache_page(vma, addr, pfn); set_pte(pte_pointer, new_pte_val); flush_tlb_page(vma, addr); @@ -203,7 +203,7 @@ call flush_cache_page (see below) for each entry which may be modified. -3) void flush_cache_page(struct vm_area_struct *vma, unsigned long addr) +3) void flush_cache_page(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn) This time we need to remove a PAGE_SIZE sized range from the cache. The 'vma' is the backing structure used by @@ -213,8 +213,14 @@ executable (and thus could be in the 'instruction cache' in "Harvard" type cache layouts). + The 'pfn' indicates the physical page frame (shift this value + left by PAGE_SHIFT to get the physical address) that 'addr' + translates to. It is this mapping which should be removed from + the cache. + After running, there will be no entries in the cache for - 'vma->vm_mm' for virtual address 'addr'. + 'vma->vm_mm' for virtual address 'addr' which translates + to 'pfn'. This is used primarily during fault processing. diff -Nru a/Documentation/crypto/api-intro.txt b/Documentation/crypto/api-intro.txt --- a/Documentation/crypto/api-intro.txt 2005-03-07 14:54:17 -08:00 +++ b/Documentation/crypto/api-intro.txt 2005-03-07 14:54:17 -08:00 @@ -234,6 +234,9 @@ Anubis algorithm contributors: Aaron Grothe +Tiger algorithm contributors: + Aaron Grothe + Generic scatterwalk code by Adam J. Richter Please send any credits updates or corrections to: diff -Nru a/Documentation/filesystems/jfs.txt b/Documentation/filesystems/jfs.txt --- a/Documentation/filesystems/jfs.txt 2005-03-07 14:54:17 -08:00 +++ b/Documentation/filesystems/jfs.txt 2005-03-07 14:54:17 -08:00 @@ -1,13 +1,6 @@ IBM's Journaled File System (JFS) for Linux -JFS Homepage: http://oss.software.ibm.com/jfs/ - -Team members ------------- -Dave Kleikamp shaggy@austin.ibm.com -Dave Blaschke blaschke@us.ibm.com -Steve Best sbest@us.ibm.com -Barry Arndt barndt@us.ibm.com +JFS Homepage: http://jfs.sourceforge.net/ The following mount options are supported: @@ -15,6 +8,7 @@ ASCII. The default is to do no conversion. Use iocharset=utf8 for UTF8 translations. This requires CONFIG_NLS_UTF8 to be set in the kernel .config file. + iocharset=none specifies the default behavior explicitly. resize=value Resize the volume to blocks. JFS only supports growing a volume, not shrinking it. This option is only @@ -38,4 +32,4 @@ Please send bugs, comments, cards and letters to shaggy@austin.ibm.com. The JFS mailing list can be subscribed to by using the link labeled -"Mail list Subscribe" at our web page http://oss.software.ibm.com/jfs/. +"Mail list Subscribe" at our web page http://jfs.sourceforge.net/ diff -Nru a/Documentation/i2c/porting-clients b/Documentation/i2c/porting-clients --- a/Documentation/i2c/porting-clients 2005-03-07 14:54:16 -08:00 +++ b/Documentation/i2c/porting-clients 2005-03-07 14:54:16 -08:00 @@ -49,9 +49,8 @@ static void lm75_update_client(struct i2c_client *client); * [Sysctl] All sysctl stuff is of course gone (defines, ctl_table - and functions). Instead, right after the static id definition - line, you have to define show and set functions for each sysfs - file. Only define set for writable values. Take a look at an + and functions). Instead, you have to define show and set functions for + each sysfs file. Only define set for writable values. Take a look at an existing 2.6 driver for details (lm78 for example). Don't forget to define the attributes for each file (this is that step that links callback functions). Use the file names specified in @@ -86,6 +85,7 @@ Replace the sysctl directory registration by calls to device_create_file. Move the driver initialization before any sysfs file creation. + Drop client->id. * [Init] Limits must not be set by the driver (can be done later in user-space). Chip should not be reset default (although a module diff -Nru a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients --- a/Documentation/i2c/writing-clients 2005-03-07 14:54:16 -08:00 +++ b/Documentation/i2c/writing-clients 2005-03-07 14:54:16 -08:00 @@ -344,9 +344,6 @@ For now, you can ignore the `flags' parameter. It is there for future use. - /* Unique ID allocation */ - static int foo_id = 0; - int foo_detect_client(struct i2c_adapter *adapter, int address, unsigned short flags, int kind) { @@ -482,7 +479,6 @@ data->type = kind; /* SENSORS ONLY END */ - new_client->id = foo_id++; /* Automatically unique */ data->valid = 0; /* Only if you use this field */ init_MUTEX(&data->update_lock); /* Only if you use this field */ @@ -642,7 +638,7 @@ parameter contains the bytes the read/write, the third the length of the buffer. Returned is the actual number of bytes read/written. - extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[], + extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msg, int num); This sends a series of messages. Each message can be a read or write, diff -Nru a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt --- a/Documentation/networking/bonding.txt 2005-03-07 14:54:16 -08:00 +++ b/Documentation/networking/bonding.txt 2005-03-07 14:54:16 -08:00 @@ -1,5 +1,5 @@ - Linux Ethernet Bonding Driver mini-howto + Linux Ethernet Bonding Driver HOWTO Initial release : Thomas Davis Corrections, HA extensions : 2000/10/03-15 : @@ -9,8 +9,11 @@ - Janice Girouard - Jay Vosburgh +Reorganized and updated Feb 2005 by Jay Vosburgh + Note : ------ + The bonding driver originally came from Donald Becker's beowulf patches for kernel 2.0. It has changed quite a bit since, and the original tools from extreme-linux and beowulf sites will not work with this version of the driver. @@ -18,218 +21,190 @@ For new versions of the driver, patches for older kernels and the updated userspace tools, please follow the links at the end of this file. - Table of Contents ================= -Installation -Bond Configuration -Module Parameters -Configuring Multiple Bonds -Switch Configuration -Verifying Bond Configuration -Frequently Asked Questions -High Availability -Promiscuous Sniffing notes -8021q VLAN support -Limitations -Resources and Links - - -Installation -============ - -1) Build kernel with the bonding driver ---------------------------------------- -For the latest version of the bonding driver, use kernel 2.4.12 or above -(otherwise you will need to apply a patch). - -Configure kernel with `make menuconfig/xconfig/config', and select "Bonding -driver support" in the "Network device support" section. It is recommended -to configure the driver as module since it is currently the only way to -pass parameters to the driver and configure more than one bonding device. - -Build and install the new kernel and modules. - -2) Get and install the userspace tools --------------------------------------- -This version of the bonding driver requires updated ifenslave program. The -original one from extreme-linux and beowulf will not work. Kernels 2.4.12 -and above include the updated version of ifenslave.c in -Documentation/networking directory. For older kernels, please follow the -links at the end of this file. - -IMPORTANT!!! If you are running on Redhat 7.1 or greater, you need -to be careful because /usr/include/linux is no longer a symbolic link -to /usr/src/linux/include/linux. If you build ifenslave while this is -true, ifenslave will appear to succeed but your bond won't work. The purpose -of the -I option on the ifenslave compile line is to make sure it uses -/usr/src/linux/include/linux/if_bonding.h instead of the version from -/usr/include/linux. - -To install ifenslave.c, do: - # gcc -Wall -Wstrict-prototypes -O -I/usr/src/linux/include ifenslave.c -o ifenslave - # cp ifenslave /sbin/ifenslave +1. Bonding Driver Installation +2. Bonding Driver Options -Bond Configuration -================== +3. Configuring Bonding Devices +3.1 Configuration with sysconfig support +3.2 Configuration with initscripts support +3.3 Configuring Bonding Manually +3.4 Configuring Multiple Bonds -You will need to add at least the following line to /etc/modprobe.conf -so the bonding driver will automatically load when the bond0 interface is -configured. Refer to the modprobe.conf manual page for specific modprobe.conf -syntax details. The Module Parameters section of this document describes each -bonding driver parameter. - - alias bond0 bonding - -Use standard distribution techniques to define the bond0 network interface. For -example, on modern Red Hat distributions, create an ifcfg-bond0 file in -the /etc/sysconfig/network-scripts directory that resembles the following: +5. Querying Bonding Configuration +5.1 Bonding Configuration +5.2 Network Configuration -DEVICE=bond0 -IPADDR=192.168.1.1 -NETMASK=255.255.255.0 -NETWORK=192.168.1.0 -BROADCAST=192.168.1.255 -ONBOOT=yes -BOOTPROTO=none -USERCTL=no +6. Switch Configuration -(use appropriate values for your network above) +7. 802.1q VLAN Support -All interfaces that are part of a bond should have SLAVE and MASTER -definitions. For example, in the case of Red Hat, if you wish to make eth0 and -eth1 a part of the bonding interface bond0, their config files (ifcfg-eth0 and -ifcfg-eth1) should resemble the following: +8. Link Monitoring +8.1 ARP Monitor Operation +8.2 Configuring Multiple ARP Targets +8.3 MII Monitor Operation -DEVICE=eth0 -USERCTL=no -ONBOOT=yes -MASTER=bond0 -SLAVE=yes -BOOTPROTO=none +9. Potential Trouble Sources +9.1 Adventures in Routing +9.2 Ethernet Device Renaming +9.3 Painfully Slow Or No Failed Link Detection By Miimon -Use DEVICE=eth1 in the ifcfg-eth1 config file. If you configure a second -bonding interface (bond1), use MASTER=bond1 in the config file to make the -network interface be a slave of bond1. - -Restart the networking subsystem or just bring up the bonding device if your -administration tools allow it. Otherwise, reboot. On Red Hat distros you can -issue `ifup bond0' or `/etc/rc.d/init.d/network restart'. - -If the administration tools of your distribution do not support -master/slave notation in configuring network interfaces, you will need to -manually configure the bonding device with the following commands: - - # /sbin/ifconfig bond0 192.168.1.1 netmask 255.255.255.0 \ - broadcast 192.168.1.255 up - - # /sbin/ifenslave bond0 eth0 - # /sbin/ifenslave bond0 eth1 - -(use appropriate values for your network above) - -You can then create a script containing these commands and place it in the -appropriate rc directory. - -If you specifically need all network drivers loaded before the bonding driver, -adding the following line to modprobe.conf will cause the network driver for -eth0 and eth1 to be loaded before the bonding driver. - -install bond0 /sbin/modprobe -a eth0 eth1 && /sbin/modprobe bonding - -Be careful not to reference bond0 itself at the end of the line, or modprobe -will die in an endless recursive loop. - -If running SNMP agents, the bonding driver should be loaded before any network -drivers participating in a bond. This requirement is due to the the interface -index (ipAdEntIfIndex) being associated to the first interface found with a -given IP address. That is, there is only one ipAdEntIfIndex for each IP -address. For example, if eth0 and eth1 are slaves of bond0 and the driver for -eth0 is loaded before the bonding driver, the interface for the IP address -will be associated with the eth0 interface. This configuration is shown below, -the IP address 192.168.1.1 has an interface index of 2 which indexes to eth0 -in the ifDescr table (ifDescr.2). +10. SNMP agents - interfaces.ifTable.ifEntry.ifDescr.1 = lo - interfaces.ifTable.ifEntry.ifDescr.2 = eth0 - interfaces.ifTable.ifEntry.ifDescr.3 = eth1 - interfaces.ifTable.ifEntry.ifDescr.4 = eth2 - interfaces.ifTable.ifEntry.ifDescr.5 = eth3 - interfaces.ifTable.ifEntry.ifDescr.6 = bond0 - ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.10.10.10.10 = 5 - ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.192.168.1.1 = 2 - ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.10.74.20.94 = 4 - ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.127.0.0.1 = 1 +11. Promiscuous mode -This problem is avoided by loading the bonding driver before any network -drivers participating in a bond. Below is an example of loading the bonding -driver first, the IP address 192.168.1.1 is correctly associated with -ifDescr.2. +12. High Availability Information +12.1 High Availability in a Single Switch Topology +12.1.1 Bonding Mode Selection for Single Switch Topology +12.1.2 Link Monitoring for Single Switch Topology +12.2 High Availability in a Multiple Switch Topology +12.2.1 Bonding Mode Selection for Multiple Switch Topology +12.2.2 Link Monitoring for Multiple Switch Topology +12.3 Switch Behavior Issues for High Availability - interfaces.ifTable.ifEntry.ifDescr.1 = lo - interfaces.ifTable.ifEntry.ifDescr.2 = bond0 - interfaces.ifTable.ifEntry.ifDescr.3 = eth0 - interfaces.ifTable.ifEntry.ifDescr.4 = eth1 - interfaces.ifTable.ifEntry.ifDescr.5 = eth2 - interfaces.ifTable.ifEntry.ifDescr.6 = eth3 - ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.10.10.10.10 = 6 - ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.192.168.1.1 = 2 - ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.10.74.20.94 = 5 - ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.127.0.0.1 = 1 +13. Hardware Specific Considerations +13.1 IBM BladeCenter -While some distributions may not report the interface name in ifDescr, -the association between the IP address and IfIndex remains and SNMP -functions such as Interface_Scan_Next will report that association. +14. Frequently Asked Questions +15. Resources and Links -Module Parameters -================= -Optional parameters for the bonding driver can be supplied as command line -arguments to the insmod command. Typically, these parameters are specified in -the file /etc/modprobe.conf (see the manual page for modprobe.conf). The -available bonding driver parameters are listed below. If a parameter is not -specified the default value is used. When initially configuring a bond, it -is recommended "tail -f /var/log/messages" be run in a separate window to -watch for bonding driver error messages. - -It is critical that either the miimon or arp_interval and arp_ip_target -parameters be specified, otherwise serious network degradation will occur -during link failures. +1. Bonding Driver Installation +============================== + + Most popular distro kernels ship with the bonding driver +already available as a module and the ifenslave user level control +program installed and ready for use. If your distro does not, or you +have need to compile bonding from source (e.g., configuring and +installing a mainline kernel from kernel.org), you'll need to perform +the following steps: + +1.1 Configure and build the kernel with bonding +----------------------------------------------- + + The latest version of the bonding driver is available in the +drivers/net/bonding subdirectory of the most recent kernel source +(which is available on http://kernel.org). + + Prior to the 2.4.11 kernel, the bonding driver was maintained +largely outside the kernel tree; patches for some earlier kernels are +available on the bonding sourceforge site, although those patches are +still several years out of date. Most users will want to use either +the most recent kernel from kernel.org or whatever kernel came with +their distro. + + Configure kernel with "make menuconfig" (or "make xconfig" or +"make config"), then select "Bonding driver support" in the "Network +device support" section. It is recommended that you configure the +driver as module since it is currently the only way to pass parameters +to the driver or configure more than one bonding device. + + Build and install the new kernel and modules, then proceed to +step 2. + +1.2 Install ifenslave Control Utility +------------------------------------- + + The ifenslave user level control program is included in the +kernel source tree, in the file Documentation/networking/ifenslave.c. +It is generally recommended that you use the ifenslave that +corresponds to the kernel that you are using (either from the same +source tree or supplied with the distro), however, ifenslave +executables from older kernels should function (but features newer +than the ifenslave release are not supported). Running an ifenslave +that is newer than the kernel is not supported, and may or may not +work. + + To install ifenslave, do the following: + +# gcc -Wall -O -I/usr/src/linux/include ifenslave.c -o ifenslave +# cp ifenslave /sbin/ifenslave + + If your kernel source is not in "/usr/src/linux," then replace +"/usr/src/linux/include" in the above with the location of your kernel +source include directory. + + You may wish to back up any existing /sbin/ifenslave, or, for +testing or informal use, tag the ifenslave to the kernel version +(e.g., name the ifenslave executable /sbin/ifenslave-2.6.10). + +IMPORTANT NOTE: + + If you omit the "-I" or specify an incorrect directory, you +may end up with an ifenslave that is incompatible with the kernel +you're trying to build it for. Some distros (e.g., Red Hat from 7.1 +onwards) do not have /usr/include/linux symbolically linked to the +default kernel source include directory. + + +2. Bonding Driver Options +========================= + + Options for the bonding driver are supplied as parameters to +the bonding module at load time. They may be given as command line +arguments to the insmod or modprobe command, but are usually specified +in either the /etc/modprobe.conf configuration file, or in a +distro-specific configuration file (some of which are detailed in the +next section). + + The available bonding driver parameters are listed below. If a +parameter is not specified the default value is used. When initially +configuring a bond, it is recommended "tail -f /var/log/messages" be +run in a separate window to watch for bonding driver error messages. + + It is critical that either the miimon or arp_interval and +arp_ip_target parameters be specified, otherwise serious network +degradation will occur during link failures. Very few devices do not +support at least miimon, so there is really no reason not to use it. + + Options with textual values will accept either the text name + or, for backwards compatibility, the option value. E.g., + "mode=802.3ad" and "mode=4" set the same mode. + + The parameters are as follows: arp_interval - Specifies the ARP monitoring frequency in milli-seconds. - If ARP monitoring is used in a load-balancing mode (mode 0 or 2), the - switch should be configured in a mode that evenly distributes packets - across all links - such as round-robin. If the switch is configured to - distribute the packets in an XOR fashion, all replies from the ARP - targets will be received on the same link which could cause the other - team members to fail. ARP monitoring should not be used in conjunction - with miimon. A value of 0 disables ARP monitoring. The default value - is 0. + Specifies the ARP monitoring frequency in milli-seconds. If + ARP monitoring is used in a load-balancing mode (mode 0 or 2), + the switch should be configured in a mode that evenly + distributes packets across all links - such as round-robin. If + the switch is configured to distribute the packets in an XOR + fashion, all replies from the ARP targets will be received on + the same link which could cause the other team members to + fail. ARP monitoring should not be used in conjunction with + miimon. A value of 0 disables ARP monitoring. The default + value is 0. arp_ip_target - Specifies the ip addresses to use when arp_interval is > 0. These - are the targets of the ARP request sent to determine the health of - the link to the targets. Specify these values in ddd.ddd.ddd.ddd - format. Multiple ip adresses must be seperated by a comma. At least - one ip address needs to be given for ARP monitoring to work. The - maximum number of targets that can be specified is set at 16. + Specifies the ip addresses to use when arp_interval is > 0. + These are the targets of the ARP request sent to determine the + health of the link to the targets. Specify these values in + ddd.ddd.ddd.ddd format. Multiple ip adresses must be + seperated by a comma. At least one IP address must be given + for ARP monitoring to function. The maximum number of targets + that can be specified is 16. The default value is no IP + addresses. downdelay - Specifies the delay time in milli-seconds to disable a link after a - link failure has been detected. This should be a multiple of miimon - value, otherwise the value will be rounded. The default value is 0. + Specifies the time, in milliseconds, to wait before disabling + a slave after a link failure has been detected. This option + is only valid for the miimon link monitor. The downdelay + value should be a multiple of the miimon value; if not, it + will be rounded down to the nearest multiple. The default + value is 0. lacp_rate - Option specifying the rate in which we'll ask our link partner to - transmit LACPDU packets in 802.3ad mode. Possible values are: + Option specifying the rate in which we'll ask our link partner + to transmit LACPDU packets in 802.3ad mode. Possible values + are: slow or 0 Request partner to transmit LACPDUs every 30 seconds (default) @@ -246,69 +221,76 @@ miimon - Specifies the frequency in milli-seconds that MII link monitoring - will occur. A value of zero disables MII link monitoring. A value - of 100 is a good starting point. See High Availability section for - additional information. The default value is 0. + Specifies the frequency in milli-seconds that MII link + monitoring will occur. A value of zero disables MII link + monitoring. A value of 100 is a good starting point. The + use_carrier option, below, affects how the link state is + determined. See the High Availability section for additional + information. The default value is 0. mode Specifies one of the bonding policies. The default is - round-robin (balance-rr). Possible values are (you can use - either the text or numeric option): + balance-rr (round robin). Possible values are: balance-rr or 0 - Round-robin policy: Transmit in a sequential order - from the first available slave through the last. This - mode provides load balancing and fault tolerance. + Round-robin policy: Transmit packets in sequential + order from the first available slave through the + last. This mode provides load balancing and fault + tolerance. active-backup or 1 Active-backup policy: Only one slave in the bond is - active. A different slave becomes active if, and only - if, the active slave fails. The bond's MAC address is + active. A different slave becomes active if, and only + if, the active slave fails. The bond's MAC address is externally visible on only one port (network adapter) to avoid confusing the switch. This mode provides - fault tolerance. + fault tolerance. The primary option affects the + behavior of this mode. balance-xor or 2 XOR policy: Transmit based on [(source MAC address - XOR'd with destination MAC address) modula slave - count]. This selects the same slave for each - destination MAC address. This mode provides load + XOR'd with destination MAC address) modulo slave + count]. This selects the same slave for each + destination MAC address. This mode provides load balancing and fault tolerance. broadcast or 3 Broadcast policy: transmits everything on all slave - interfaces. This mode provides fault tolerance. + interfaces. This mode provides fault tolerance. 802.3ad or 4 - IEEE 802.3ad Dynamic link aggregation. Creates aggregation - groups that share the same speed and duplex settings. - Transmits and receives on all slaves in the active - aggregator. + IEEE 802.3ad Dynamic link aggregation. Creates + aggregation groups that share the same speed and + duplex settings. Utilizes all slaves in the active + aggregator according to the 802.3ad specification. Pre-requisites: - 1. Ethtool support in the base drivers for retrieving the - speed and duplex of each slave. + 1. Ethtool support in the base drivers for retrieving + the speed and duplex of each slave. 2. A switch that supports IEEE 802.3ad Dynamic link aggregation. + Most switches will require some type of configuration + to enable 802.3ad mode. + balance-tlb or 5 - Adaptive transmit load balancing: channel bonding that does - not require any special switch support. The outgoing - traffic is distributed according to the current load - (computed relative to the speed) on each slave. Incoming - traffic is received by the current slave. If the receiving - slave fails, another slave takes over the MAC address of - the failed receiving slave. + Adaptive transmit load balancing: channel bonding that + does not require any special switch support. The + outgoing traffic is distributed according to the + current load (computed relative to the speed) on each + slave. Incoming traffic is received by the current + slave. If the receiving slave fails, another slave + takes over the MAC address of the failed receiving + slave. Prerequisite: @@ -317,205 +299,452 @@ balance-alb or 6 - Adaptive load balancing: includes balance-tlb + receive - load balancing (rlb) for IPV4 traffic and does not require - any special switch support. The receive load balancing is - achieved by ARP negotiation. The bonding driver intercepts - the ARP Replies sent by the server on their way out and - overwrites the src hw address with the unique hw address of - one of the slaves in the bond such that different clients - use different hw addresses for the server. - - Receive traffic from connections created by the server is - also balanced. When the server sends an ARP Request the - bonding driver copies and saves the client's IP information - from the ARP. When the ARP Reply arrives from the client, - its hw address is retrieved and the bonding driver - initiates an ARP reply to this client assigning it to one - of the slaves in the bond. A problematic outcome of using - ARP negotiation for balancing is that each time that an ARP - request is broadcasted it uses the hw address of the - bond. Hence, clients learn the hw address of the bond and - the balancing of receive traffic collapses to the current - salve. This is handled by sending updates (ARP Replies) to - all the clients with their assigned hw address such that - the traffic is redistributed. Receive traffic is also - redistributed when a new slave is added to the bond and - when an inactive slave is re-activated. The receive load is - distributed sequentially (round robin) among the group of - highest speed slaves in the bond. - - When a link is reconnected or a new slave joins the bond - the receive traffic is redistributed among all active - slaves in the bond by intiating ARP Replies with the - selected mac address to each of the clients. The updelay - modeprobe parameter must be set to a value equal or greater - than the switch's forwarding delay so that the ARP Replies - sent to the clients will not be blocked by the switch. + Adaptive load balancing: includes balance-tlb plus + receive load balancing (rlb) for IPV4 traffic, and + does not require any special switch support. The + receive load balancing is achieved by ARP negotiation. + The bonding driver intercepts the ARP Replies sent by + the local system on their way out and overwrites the + source hardware address with the unique hardware + address of one of the slaves in the bond such that + different peers use different hardware addresses for + the server. + + Receive traffic from connections created by the server + is also balanced. When the local system sends an ARP + Request the bonding driver copies and saves the peer's + IP information from the ARP packet. When the ARP + Reply arrives from the peer, its hardware address is + retrieved and the bonding driver initiates an ARP + reply to this peer assigning it to one of the slaves + in the bond. A problematic outcome of using ARP + negotiation for balancing is that each time that an + ARP request is broadcast it uses the hardware address + of the bond. Hence, peers learn the hardware address + of the bond and the balancing of receive traffic + collapses to the current slave. This is handled by + sending updates (ARP Replies) to all the peers with + their individually assigned hardware address such that + the traffic is redistributed. Receive traffic is also + redistributed when a new slave is added to the bond + and when an inactive slave is re-activated. The + receive load is distributed sequentially (round robin) + among the group of highest speed slaves in the bond. + + When a link is reconnected or a new slave joins the + bond the receive traffic is redistributed among all + active slaves in the bond by intiating ARP Replies + with the selected mac address to each of the + clients. The updelay parameter (detailed below) must + be set to a value equal or greater than the switch's + forwarding delay so that the ARP Replies sent to the + peers will not be blocked by the switch. Prerequisites: - 1. Ethtool support in the base drivers for retrieving the - speed of each slave. + 1. Ethtool support in the base drivers for retrieving + the speed of each slave. - 2. Base driver support for setting the hw address of a - device also when it is open. This is required so that there - will always be one slave in the team using the bond hw - address (the curr_active_slave) while having a unique hw - address for each slave in the bond. If the curr_active_slave - fails it's hw address is swapped with the new curr_active_slave - that was chosen. + 2. Base driver support for setting the hardware + address of a device while it is open. This is + required so that there will always be one slave in the + team using the bond hardware address (the + curr_active_slave) while having a unique hardware + address for each slave in the bond. If the + curr_active_slave fails its hardware address is + swapped with the new curr_active_slave that was + chosen. primary - A string (eth0, eth2, etc) to equate to a primary device. If this - value is entered, and the device is on-line, it will be used first - as the output media. Only when this device is off-line, will - alternate devices be used. Otherwise, once a failover is detected - and a new default output is chosen, it will remain the output media - until it too fails. This is useful when one slave was preferred - over another, i.e. when one slave is 1000Mbps and another is - 100Mbps. If the 1000Mbps slave fails and is later restored, it may - be preferred the faster slave gracefully become the active slave - - without deliberately failing the 100Mbps slave. Specifying a - primary is only valid in active-backup mode. + A string (eth0, eth2, etc) specifying which slave is the + primary device. The specified device will always be the + active slave while it is available. Only when the primary is + off-line will alternate devices be used. This is useful when + one slave is preferred over another, e.g., when one slave has + higher throughput than another. + + The primary option is only valid for active-backup mode. updelay - Specifies the delay time in milli-seconds to enable a link after a - link up status has been detected. This should be a multiple of miimon - value, otherwise the value will be rounded. The default value is 0. + Specifies the time, in milliseconds, to wait before enabling a + slave after a link recovery has been detected. This option is + only valid for the miimon link monitor. The updelay value + should be a multiple of the miimon value; if not, it will be + rounded down to the nearest multiple. The default value is 0. use_carrier - Specifies whether or not miimon should use MII or ETHTOOL - ioctls vs. netif_carrier_ok() to determine the link status. - The MII or ETHTOOL ioctls are less efficient and utilize a - deprecated calling sequence within the kernel. The - netif_carrier_ok() relies on the device driver to maintain its - state with netif_carrier_on/off; at this writing, most, but - not all, device drivers support this facility. - - If bonding insists that the link is up when it should not be, - it may be that your network device driver does not support - netif_carrier_on/off. This is because the default state for - netif_carrier is "carrier on." In this case, disabling - use_carrier will cause bonding to revert to the MII / ETHTOOL - ioctl method to determine the link state. - - A value of 1 enables the use of netif_carrier_ok(), a value of - 0 will use the deprecated MII / ETHTOOL ioctls. The default - value is 1. - - -Configuring Multiple Bonds -========================== - -If several bonding interfaces are required, either specify the max_bonds -parameter (described above), or load the driver multiple times. Using -the max_bonds parameter is less complicated, but has the limitation that -all bonding instances created will have the same options. Loading the -driver multiple times allows each instance of the driver to have differing -options. - -For example, to configure two bonding interfaces, one with mii link -monitoring performed every 100 milliseconds, and one with ARP link -monitoring performed every 200 milliseconds, the /etc/conf.modules should -resemble the following: + Specifies whether or not miimon should use MII or ETHTOOL + ioctls vs. netif_carrier_ok() to determine the link + status. The MII or ETHTOOL ioctls are less efficient and + utilize a deprecated calling sequence within the kernel. The + netif_carrier_ok() relies on the device driver to maintain its + state with netif_carrier_on/off; at this writing, most, but + not all, device drivers support this facility. + + If bonding insists that the link is up when it should not be, + it may be that your network device driver does not support + netif_carrier_on/off. The default state for netif_carrier is + "carrier on," so if a driver does not support netif_carrier, + it will appear as if the link is always up. In this case, + setting use_carrier to 0 will cause bonding to revert to the + MII / ETHTOOL ioctl method to determine the link state. + + A value of 1 enables the use of netif_carrier_ok(), a value of + 0 will use the deprecated MII / ETHTOOL ioctls. The default + value is 1. + + + +3. Configuring Bonding Devices +============================== + + There are, essentially, two methods for configuring bonding: +with support from the distro's network initialization scripts, and +without. Distros generally use one of two packages for the network +initialization scripts: initscripts or sysconfig. Recent versions of +these packages have support for bonding, while older versions do not. + + We will first describe the options for configuring bonding for +distros using versions of initscripts and sysconfig with full or +partial support for bonding, then provide information on enabling +bonding without support from the network initialization scripts (i.e., +older versions of initscripts or sysconfig). + + If you're unsure whether your distro uses sysconfig or +initscripts, or don't know if it's new enough, have no fear. +Determining this is fairly straightforward. + + First, issue the command: + +$ rpm -qf /sbin/ifup + + It will respond with a line of text starting with either +"initscripts" or "sysconfig," followed by some numbers. This is the +package that provides your network initialization scripts. + + Next, to determine if your installation supports bonding, +issue the command: + +$ grep ifenslave /sbin/ifup + + If this returns any matches, then your initscripts or +sysconfig has support for bonding. + +3.1 Configuration with sysconfig support +---------------------------------------- + + This section applies to distros using a version of sysconfig +with bonding support, for example, SuSE Linux Enterprise Server 9. + + SuSE SLES 9's networking configuration system does support +bonding, however, at this writing, the YaST system configuration +frontend does not provide any means to work with bonding devices. +Bonding devices can be managed by hand, however, as follows. + + First, if they have not already been configured, configure the +slave devices. On SLES 9, this is most easily done by running the +yast2 sysconfig configuration utility. The goal is for to create an +ifcfg-id file for each slave device. The simplest way to accomplish +this is to configure the devices for DHCP. The name of the +configuration file for each device will be of the form: + +ifcfg-id-xx:xx:xx:xx:xx:xx + + Where the "xx" portion will be replaced with the digits from +the device's permanent MAC address. + + Once the set of ifcfg-id-xx:xx:xx:xx:xx:xx files has been +created, it is necessary to edit the configuration files for the slave +devices (the MAC addresses correspond to those of the slave devices). +Before editing, the file will contain muliple lines, and will look +something like this: + +BOOTPROTO='dhcp' +STARTMODE='on' +USERCTL='no' +UNIQUE='XNzu.WeZGOGF+4wE' +_nm_name='bus-pci-0001:61:01.0' + + Change the BOOTPROTO and STARTMODE lines to the following: + +BOOTPROTO='none' +STARTMODE='off' + + Do not alter the UNIQUE or _nm_name lines. Remove any other +lines (USERCTL, etc). + + Once the ifcfg-id-xx:xx:xx:xx:xx:xx files have been modified, +it's time to create the configuration file for the bonding device +itself. This file is named ifcfg-bondX, where X is the number of the +bonding device to create, starting at 0. The first such file is +ifcfg-bond0, the second is ifcfg-bond1, and so on. The sysconfig +network configuration system will correctly start multiple instances +of bonding. + + The contents of the ifcfg-bondX file is as follows: + +BOOTPROTO="static" +BROADCAST="10.0.2.255" +IPADDR="10.0.2.10" +NETMASK="255.255.0.0" +NETWORK="10.0.2.0" +REMOTE_IPADDR="" +STARTMODE="onboot" +BONDING_MASTER="yes" +BONDING_MODULE_OPTS="mode=active-backup miimon=100" +BONDING_SLAVE0="eth0" +BONDING_SLAVE1="eth1" + + Replace the sample BROADCAST, IPADDR, NETMASK and NETWORK +values with the appropriate values for your network. + + Note that configuring the bonding device with BOOTPROTO='dhcp' +does not work; the scripts attempt to obtain the device address from +DHCP prior to adding any of the slave devices. Without active slaves, +the DHCP requests are not sent to the network. + + The STARTMODE specifies when the device is brought online. +The possible values are: + + onboot: The device is started at boot time. If you're not + sure, this is probably what you want. + + manual: The device is started only when ifup is called + manually. Bonding devices may be configured this + way if you do not wish them to start automatically + at boot for some reason. + + hotplug: The device is started by a hotplug event. This is not + a valid choice for a bonding device. + + off or ignore: The device configuration is ignored. + + The line BONDING_MASTER='yes' indicates that the device is a +bonding master device. The only useful value is "yes." + + The contents of BONDING_MODULE_OPTS are supplied to the +instance of the bonding module for this device. Specify the options +for the bonding mode, link monitoring, and so on here. Do not include +the max_bonds bonding parameter; this will confuse the configuration +system if you have multiple bonding devices. + + Finally, supply one BONDING_SLAVEn="ethX" for each slave, +where "n" is an increasing value, one for each slave, and "ethX" is +the name of the slave device (eth0, eth1, etc). + + When all configuration files have been modified or created, +networking must be restarted for the configuration changes to take +effect. This can be accomplished via the following: + +# /etc/init.d/network restart + + Note that the network control script (/sbin/ifdown) will +remove the bonding module as part of the network shutdown processing, +so it is not necessary to remove the module by hand if, e.g., the +module paramters have changed. + + Also, at this writing, YaST/YaST2 will not manage bonding +devices (they do not show bonding interfaces on its list of network +devices). It is necessary to edit the configuration file by hand to +change the bonding configuration. + + Additional general options and details of the ifcfg file +format can be found in an example ifcfg template file: + +/etc/sysconfig/network/ifcfg.template + + Note that the template does not document the various BONDING_ +settings described above, but does describe many of the other options. + +3.2 Configuration with initscripts support +------------------------------------------ + + This section applies to distros using a version of initscripts +with bonding support, for example, Red Hat Linux 9 or Red Hat +Enterprise Linux version 3. On these systems, the network +initialization scripts have some knowledge of bonding, and can be +configured to control bonding devices. + + These distros will not automatically load the network adapter +driver unless the ethX device is configured with an IP address. +Because of this constraint, users must manually configure a +network-script file for all physical adapters that will be members of +a bondX link. Network script files are located in the directory: + +/etc/sysconfig/network-scripts + + The file name must be prefixed with "ifcfg-eth" and suffixed +with the adapter's physical adapter number. For example, the script +for eth0 would be named /etc/sysconfig/network-scripts/ifcfg-eth0. +Place the following text in the file: -alias bond0 bonding -alias bond1 bonding +DEVICE=eth0 +USERCTL=no +ONBOOT=yes +MASTER=bond0 +SLAVE=yes +BOOTPROTO=none -options bond0 miimon=100 -options bond1 -o bonding1 arp_interval=200 arp_ip_target=10.0.0.1 + The DEVICE= line will be different for every ethX device and +must correspond with the name of the file, i.e., ifcfg-eth1 must have +a device line of DEVICE=eth1. The setting of the MASTER= line will +also depend on the final bonding interface name chosen for your bond. +As with other network devices, these typically start at 0, and go up +one for each device, i.e., the first bonding instance is bond0, the +second is bond1, and so on. + + Next, create a bond network script. The file name for this +script will be /etc/sysconfig/network-scripts/ifcfg-bondX where X is +the number of the bond. For bond0 the file is named "ifcfg-bond0", +for bond1 it is named "ifcfg-bond1", and so on. Within that file, +place the following text: -Configuring Multiple ARP Targets -================================ +DEVICE=bond0 +IPADDR=192.168.1.1 +NETMASK=255.255.255.0 +NETWORK=192.168.1.0 +BROADCAST=192.168.1.255 +ONBOOT=yes +BOOTPROTO=none +USERCTL=no -While ARP monitoring can be done with just one target, it can be useful -in a High Availability setup to have several targets to monitor. In the -case of just one target, the target itself may go down or have a problem -making it unresponsive to ARP requests. Having an additional target (or -several) increases the reliability of the ARP monitoring. + Be sure to change the networking specific lines (IPADDR, +NETMASK, NETWORK and BROADCAST) to match your network configuration. -Multiple ARP targets must be seperated by commas as follows: + Finally, it is necessary to edit /etc/modules.conf to load the +bonding module when the bond0 interface is brought up. The following +sample lines in /etc/modules.conf will load the bonding module, and +select its options: -# example options for ARP monitoring with three targets alias bond0 bonding -options bond0 arp_interval=60 arp_ip_target=192.168.0.1,192.168.0.3,192.168.0.9 +options bond0 mode=balance-alb miimon=100 -For just a single target the options would resemble: + Replace the sample parameters with the appropriate set of +options for your configuration. -# example options for ARP monitoring with one target + Finally run "/etc/rc.d/init.d/network restart" as root. This +will restart the networking subsystem and your bond link should be now +up and running. + + +3.3 Configuring Bonding Manually +-------------------------------- + + This section applies to distros whose network initialization +scripts (the sysconfig or initscripts package) do not have specific +knowledge of bonding. One such distro is SuSE Linux Enterprise Server +version 8. + + The general methodology for these systems is to place the +bonding module parameters into /etc/modprobe.conf, then add modprobe +and/or ifenslave commands to the system's global init script. The +name of the global init script differs; for sysconfig, it is +/etc/init.d/boot.local and for initscripts it is /etc/rc.d/rc.local. + + For example, if you wanted to make a simple bond of two e100 +devices (presumed to be eth0 and eth1), and have it persist across +reboots, edit the appropriate file (/etc/init.d/boot.local or +/etc/rc.d/rc.local), and add the following: + +modprobe bonding -obond0 mode=balance-alb miimon=100 +modprobe e100 +ifconfig bond0 192.168.1.1 netmask 255.255.255.0 up +ifenslave bond0 eth0 +ifenslave bond0 eth1 + + Replace the example bonding module parameters and bond0 +network configuration (IP address, netmask, etc) with the appropriate +values for your configuration. The above example loads the bonding +module with the name "bond0," this simplifies the naming if multiple +bonding modules are loaded (each successive instance of the module is +given a different name, and the module instance names match the +bonding interface names). + + Unfortunately, this method will not provide support for the +ifup and ifdown scripts on the bond devices. To reload the bonding +configuration, it is necessary to run the initialization script, e.g., + +# /etc/init.d/boot.local + + or + +# /etc/rc.d/rc.local + + It may be desirable in such a case to create a separate script +which only initializes the bonding configuration, then call that +separate script from within boot.local. This allows for bonding to be +enabled without re-running the entire global init script. + + To shut down the bonding devices, it is necessary to first +mark the bonding device itself as being down, then remove the +appropriate device driver modules. For our example above, you can do +the following: + +# ifconfig bond0 down +# rmmod bond0 +# rmmod e100 + + Again, for convenience, it may be desirable to create a script +with these commands. + + +3.4 Configuring Multiple Bonds +------------------------------ + + This section contains information on configuring multiple +bonding devices with differing options. If you require multiple +bonding devices, but all with the same options, see the "max_bonds" +module paramter, documented above. + + To create multiple bonding devices with differing options, it +is necessary to load the bonding driver multiple times. Note that +current versions of the sysconfig network initialization scripts +handle this automatically; if your distro uses these scripts, no +special action is needed. See the section Configuring Bonding +Devices, above, if you're not sure about your network initialization +scripts. + + To load multiple instances of the module, it is necessary to +specify a different name for each instance (the module loading system +requires that every loaded module, even multiple instances of the same +module, have a unique name). This is accomplished by supplying +multiple sets of bonding options in /etc/modprobe.conf, for example: + alias bond0 bonding -options bond0 arp_interval=60 arp_ip_target=192.168.0.100 - -Potential Problems When Using ARP Monitor -========================================= +options bond0 -o bond0 mode=balance-rr miimon=100 -1. Driver support - -The ARP monitor relies on the network device driver to maintain two -statistics: the last receive time (dev->last_rx), and the last -transmit time (dev->trans_start). If the network device driver does -not update one or both of these, then the typical result will be that, -upon startup, all links in the bond will immediately be declared down, -and remain that way. A network monitoring tool (tcpdump, e.g.) will -show ARP requests and replies being sent and received on the bonding -device. - -The possible resolutions for this are to (a) fix the device driver, or -(b) discontinue the ARP monitor (using miimon as an alternative, for -example). - -2. Adventures in Routing - -When bonding is set up with the ARP monitor, it is important that the -slave devices not have routes that supercede routes of the master (or, -generally, not have routes at all). For example, suppose the bonding -device bond0 has two slaves, eth0 and eth1, and the routing table is -as follows: - -Kernel IP routing table -Destination Gateway Genmask Flags MSS Window irtt Iface -10.0.0.0 0.0.0.0 255.255.0.0 U 40 0 0 eth0 -10.0.0.0 0.0.0.0 255.255.0.0 U 40 0 0 eth1 -10.0.0.0 0.0.0.0 255.255.0.0 U 40 0 0 bond0 -127.0.0.0 0.0.0.0 255.0.0.0 U 40 0 0 lo +alias bond1 bonding +options bond1 -o bond1 mode=balance-alb miimon=50 -In this case, the ARP monitor (and ARP itself) may become confused, -because ARP requests will be sent on one interface (bond0), but the -corresponding reply will arrive on a different interface (eth0). This -reply looks to ARP as an unsolicited ARP reply (because ARP matches -replies on an interface basis), and is discarded. This will likely -still update the receive/transmit times in the driver, but will lose -packets. - -The resolution here is simply to insure that slaves do not have routes -of their own, and if for some reason they must, those routes do not -supercede routes of their master. This should generally be the case, -but unusual configurations or errant manual or automatic static route -additions may cause trouble. + will load the bonding module two times. The first instance is +named "bond0" and creates the bond0 device in balance-rr mode with an +miimon of 100. The second instance is named "bond1" and creates the +bond1 device in balance-alb mode with an miimon of 50. -Switch Configuration -==================== + This may be repeated any number of times, specifying a new and +unique name in place of bond0 or bond1 for each instance. -While the switch does not need to be configured when the active-backup, -balance-tlb or balance-alb policies (mode=1,5,6) are used, it does need to -be configured for the round-robin, XOR, broadcast, or 802.3ad policies -(mode=0,2,3,4). + When the appropriate module paramters are in place, then +configure bonding according to the instructions for your distro. +5. Querying Bonding Configuration +================================= -Verifying Bond Configuration -============================ +5.1 Bonding Configuration +------------------------- -1) Bonding information files ----------------------------- -The bonding driver information files reside in the /proc/net/bonding directory. + Each bonding device has a read-only file residing in the +/proc/net/bonding directory. The file contents include information +about the bonding configuration, options and state of each slave. -Sample contents of /proc/net/bonding/bond0 after the driver is loaded with -parameters of mode=0 and miimon=1000 is shown below. + For example, the contents of /proc/net/bonding/bond0 after the +driver is loaded with parameters of mode=0 and miimon=1000 is +generally as follows: + Ethernet Channel Bonding Driver: 2.6.1 (October 29, 2004) Bonding Mode: load balancing (round-robin) Currently Active Slave: eth0 MII Status: up @@ -531,15 +760,23 @@ MII Status: up Link Failure Count: 1 -2) Network verification ------------------------ -The network configuration can be verified using the ifconfig command. In -the example below, the bond0 interface is the master (MASTER) while eth0 and -eth1 are slaves (SLAVE). Notice all slaves of bond0 have the same MAC address -(HWaddr) as bond0 for all modes except TLB and ALB that require a unique MAC -address for each slave. + The precise format and contents will change depending upon the +bonding configuration, state, and version of the bonding driver. + +5.2 Network configuration +------------------------- + + The network configuration can be inspected using the ifconfig +command. Bonding devices will have the MASTER flag set; Bonding slave +devices will have the SLAVE flag set. The ifconfig output does not +contain information on which slaves are associated with which masters. + + In the example below, the bond0 interface is the master +(MASTER) while eth0 and eth1 are slaves (SLAVE). Notice all slaves of +bond0 have the same MAC address (HWaddr) as bond0 for all modes except +TLB and ALB that require a unique MAC address for each slave. -[root]# /sbin/ifconfig +# /sbin/ifconfig bond0 Link encap:Ethernet HWaddr 00:C0:F0:1F:37:B4 inet addr:XXX.XXX.XXX.YYY Bcast:XXX.XXX.XXX.255 Mask:255.255.252.0 UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1 @@ -563,430 +800,819 @@ collisions:0 txqueuelen:100 Interrupt:9 Base address:0x1400 +6. Switch Configuration +======================= -Frequently Asked Questions -========================== + For this section, "switch" refers to whatever system the +bonded devices are directly connected to (i.e., where the other end of +the cable plugs into). This may be an actual dedicated switch device, +or it may be another regular system (e.g., another computer running +Linux), + + The active-backup, balance-tlb and balance-alb modes do not +require any specific configuration of the switch. + + The 802.3ad mode requires that the switch have the appropriate +ports configured as an 802.3ad aggregation. The precise method used +to configure this varies from switch to switch, but, for example, a +Cisco 3550 series switch requires that the appropriate ports first be +grouped together in a single etherchannel instance, then that +etherchannel is set to mode "lacp" to enable 802.3ad (instead of +standard EtherChannel). + + The balance-rr, balance-xor and broadcast modes generally +require that the switch have the appropriate ports grouped together. +The nomenclature for such a group differs between switches, it may be +called an "etherchannel" (as in the Cisco example, above), a "trunk +group" or some other similar variation. For these modes, each switch +will also have its own configuration options for the switch's transmit +policy to the bond. Typical choices include XOR of either the MAC or +IP addresses. The transmit policy of the two peers does not need to +match. For these three modes, the bonding mode really selects a +transmit policy for an EtherChannel group; all three will interoperate +with another EtherChannel group. + + +7. 802.1q VLAN Support +====================== + + It is possible to configure VLAN devices over a bond interface +using the 8021q driver. However, only packets coming from the 8021q +driver and passing through bonding will be tagged by default. Self +generated packets, for example, bonding's learning packets or ARP +packets generated by either ALB mode or the ARP monitor mechanism, are +tagged internally by bonding itself. As a result, bonding must +"learn" the VLAN IDs configured above it, and use those IDs to tag +self generated packets. + + For reasons of simplicity, and to support the use of adapters +that can do VLAN hardware acceleration offloding, the bonding +interface declares itself as fully hardware offloaing capable, it gets +the add_vid/kill_vid notifications to gather the necessary +information, and it propagates those actions to the slaves. In case +of mixed adapter types, hardware accelerated tagged packets that +should go through an adapter that is not offloading capable are +"un-accelerated" by the bonding driver so the VLAN tag sits in the +regular location. + + VLAN interfaces *must* be added on top of a bonding interface +only after enslaving at least one slave. The bonding interface has a +hardware address of 00:00:00:00:00:00 until the first slave is added. +If the VLAN interface is created prior to the first enslavement, it +would pick up the all-zeroes hardware address. Once the first slave +is attached to the bond, the bond device itself will pick up the +slave's hardware address, which is then available for the VLAN device. + + Also, be aware that a similar problem can occur if all slaves +are released from a bond that still has one or more VLAN interfaces on +top of it. When a new slave is added, the bonding interface will +obtain its hardware address from the first slave, which might not +match the hardware address of the VLAN interfaces (which was +ultimately copied from an earlier slave). + + There are two methods to insure that the VLAN device operates +with the correct hardware address if all slaves are removed from a +bond interface: + + 1. Remove all VLAN interfaces then recreate them + + 2. Set the bonding interface's hardware address so that it +matches the hardware address of the VLAN interfaces. + + Note that changing a VLAN interface's HW address would set the +underlying device -- i.e. the bonding interface -- to promiscouos +mode, which might not be what you want. -1. Is it SMP safe? - - Yes. The old 2.0.xx channel bonding patch was not SMP safe. - The new driver was designed to be SMP safe from the start. -2. What type of cards will work with it? - - Any Ethernet type cards (you can even mix cards - a Intel - EtherExpress PRO/100 and a 3com 3c905b, for example). - You can even bond together Gigabit Ethernet cards! +8. Link Monitoring +================== -3. How many bonding devices can I have? + The bonding driver at present supports two schemes for +monitoring a slave device's link state: the ARP monitor and the MII +monitor. + + At the present time, due to implementation restrictions in the +bonding driver itself, it is not possible to enable both ARP and MII +monitoring simultaneously. + +8.1 ARP Monitor Operation +------------------------- + + The ARP monitor operates as its name suggests: it sends ARP +queries to one or more designated peer systems on the network, and +uses the response as an indication that the link is operating. This +gives some assurance that traffic is actually flowing to and from one +or more peers on the local network. + + The ARP monitor relies on the device driver itself to verify +that traffic is flowing. In particular, the driver must keep up to +date the last receive time, dev->last_rx, and transmit start time, +dev->trans_start. If these are not updated by the driver, then the +ARP monitor will immediately fail any slaves using that driver, and +those slaves will stay down. If networking monitoring (tcpdump, etc) +shows the ARP requests and replies on the network, then it may be that +your device driver is not updating last_rx and trans_start. - There is no limit. +8.2 Configuring Multiple ARP Targets +------------------------------------ -4. How many slaves can a bonding device have? + While ARP monitoring can be done with just one target, it can +be useful in a High Availability setup to have several targets to +monitor. In the case of just one target, the target itself may go +down or have a problem making it unresponsive to ARP requests. Having +an additional target (or several) increases the reliability of the ARP +monitoring. - Limited by the number of network interfaces Linux supports and/or the - number of network cards you can place in your system. + Multiple ARP targets must be seperated by commas as follows: -5. What happens when a slave link dies? +# example options for ARP monitoring with three targets +alias bond0 bonding +options bond0 arp_interval=60 arp_ip_target=192.168.0.1,192.168.0.3,192.168.0.9 - If your ethernet cards support MII or ETHTOOL link status monitoring - and the MII monitoring has been enabled in the driver (see description - of module parameters), there will be no adverse consequences. This - release of the bonding driver knows how to get the MII information and - enables or disables its slaves according to their link status. - See section on High Availability for additional information. - - For ethernet cards not supporting MII status, the arp_interval and - arp_ip_target parameters must be specified for bonding to work - correctly. If packets have not been sent or received during the - specified arp_interval duration, an ARP request is sent to the - targets to generate send and receive traffic. If after this - interval, either the successful send and/or receive count has not - incremented, the next slave in the sequence will become the active - slave. - - If neither mii_monitor and arp_interval is configured, the bonding - driver will not handle this situation very well. The driver will - continue to send packets but some packets will be lost. Retransmits - will cause serious degradation of performance (in the case when one - of two slave links fails, 50% packets will be lost, which is a serious - problem for both TCP and UDP). + For just a single target the options would resemble: -6. Can bonding be used for High Availability? +# example options for ARP monitoring with one target +alias bond0 bonding +options bond0 arp_interval=60 arp_ip_target=192.168.0.100 - Yes, if you use MII monitoring and ALL your cards support MII link - status reporting. See section on High Availability for more - information. -7. Which switches/systems does it work with? +8.3 MII Monitor Operation +------------------------- - In round-robin and XOR mode, it works with systems that support - trunking: + The MII monitor monitors only the carrier state of the local +network interface. It accomplishes this in one of three ways: by +depending upon the device driver to maintain its carrier state, by +querying the device's MII registers, or by making an ethtool query to +the device. + + If the use_carrier module parameter is 1 (the default value), +then the MII monitor will rely on the driver for carrier state +information (via the netif_carrier subsystem). As explained in the +use_carrier parameter information, above, if the MII monitor fails to +detect carrier loss on the device (e.g., when the cable is physically +disconnected), it may be that the driver does not support +netif_carrier. + + If use_carrier is 0, then the MII monitor will first query the +device's (via ioctl) MII registers and check the link state. If that +request fails (not just that it returns carrier down), then the MII +monitor will make an ethtool ETHOOL_GLINK request to attempt to obtain +the same information. If both methods fail (i.e., the driver either +does not support or had some error in processing both the MII register +and ethtool requests), then the MII monitor will assume the link is +up. - * Many Cisco switches and routers (look for EtherChannel support). - * SunTrunking software. - * Alteon AceDirector switches / WebOS (use Trunks). - * BayStack Switches (trunks must be explicitly configured). Stackable - models (450) can define trunks between ports on different physical - units. - * Linux bonding, of course ! - - In 802.3ad mode, it works with with systems that support IEEE 802.3ad - Dynamic Link Aggregation: - - * Extreme networks Summit 7i (look for link-aggregation). - * Many Cisco switches and routers (look for LACP support; this may - require an upgrade to your IOS software; LACP support was added - by Cisco in late 2002). - * Foundry Big Iron 4000 +9. Potential Sources of Trouble +=============================== - In active-backup, balance-tlb and balance-alb modes, it should work - with any Layer-II switch. +9.1 Adventures in Routing +------------------------- + When bonding is configured, it is important that the slave +devices not have routes that supercede routes of the master (or, +generally, not have routes at all). For example, suppose the bonding +device bond0 has two slaves, eth0 and eth1, and the routing table is +as follows: -8. Where does a bonding device get its MAC address from? +Kernel IP routing table +Destination Gateway Genmask Flags MSS Window irtt Iface +10.0.0.0 0.0.0.0 255.255.0.0 U 40 0 0 eth0 +10.0.0.0 0.0.0.0 255.255.0.0 U 40 0 0 eth1 +10.0.0.0 0.0.0.0 255.255.0.0 U 40 0 0 bond0 +127.0.0.0 0.0.0.0 255.0.0.0 U 40 0 0 lo - If not explicitly configured with ifconfig, the MAC address of the - bonding device is taken from its first slave device. This MAC address - is then passed to all following slaves and remains persistent (even if - the the first slave is removed) until the bonding device is brought - down or reconfigured. + This routing configuration will likely still update the +receive/transmit times in the driver (needed by the ARP monitor), but +may bypass the bonding driver (because outgoing traffic to, in this +case, another host on network 10 would use eth0 or eth1 before bond0). + + The ARP monitor (and ARP itself) may become confused by this +configuration, because ARP requests (generated by the ARP monitor) +will be sent on one interface (bond0), but the corresponding reply +will arrive on a different interface (eth0). This reply looks to ARP +as an unsolicited ARP reply (because ARP matches replies on an +interface basis), and is discarded. The MII monitor is not affected +by the state of the routing table. + + The solution here is simply to insure that slaves do not have +routes of their own, and if for some reason they must, those routes do +not supercede routes of their master. This should generally be the +case, but unusual configurations or errant manual or automatic static +route additions may cause trouble. - If you wish to change the MAC address, you can set it with ifconfig: +9.2 Ethernet Device Renaming +---------------------------- - # ifconfig bond0 hw ether 00:11:22:33:44:55 + On systems with network configuration scripts that do not +associate physical devices directly with network interface names (so +that the same physical device always has the same "ethX" name), it may +be necessary to add some special logic to either /etc/modules.conf or +/etc/modprobe.conf (depending upon which is installed on the system). - The MAC address can be also changed by bringing down/up the device - and then changing its slaves (or their order): + For example, given a modules.conf containing the following: - # ifconfig bond0 down ; modprobe -r bonding - # ifconfig bond0 .... up - # ifenslave bond0 eth... +alias bond0 bonding +options bond0 mode=some-mode miimon=50 +alias eth0 tg3 +alias eth1 tg3 +alias eth2 e1000 +alias eth3 e1000 + + If neither eth0 and eth1 are slaves to bond0, then when the +bond0 interface comes up, the devices may end up reordered. This +happens because bonding is loaded first, then its slave device's +drivers are loaded next. Since no other drivers have been loaded, +when the e1000 driver loads, it will receive eth0 and eth1 for its +devices, but the bonding configuration tries to enslave eth2 and eth3 +(which may later be assigned to the tg3 devices). + + Adding the following: + +add above bonding e1000 tg3 + + causes modprobe to load e1000 then tg3, in that order, when +bonding is loaded. This command is fully documented in the +modules.conf manual page. + + On systems utilizing modprobe.conf (or modprobe.conf.local), +an equivalent problem can occur. In this case, the following can be +added to modprobe.conf (or modprobe.conf.local, as appropriate), as +follows (all on one line; it has been split here for clarity): + +install bonding /sbin/modprobe tg3; /sbin/modprobe e1000; + /sbin/modprobe --ignore-install bonding + + This will, when loading the bonding module, rather than +performing the normal action, instead execute the provided command. +This command loads the device drivers in the order needed, then calls +modprobe with --ingore-install to cause the normal action to then take +place. Full documentation on this can be found in the modprobe.conf +and modprobe manual pages. + +9.3. Painfully Slow Or No Failed Link Detection By Miimon +--------------------------------------------------------- + + By default, bonding enables the use_carrier option, which +instructs bonding to trust the driver to maintain carrier state. + + As discussed in the options section, above, some drivers do +not support the netif_carrier_on/_off link state tracking system. +With use_carrier enabled, bonding will always see these links as up, +regardless of their actual state. + + Additionally, other drivers do support netif_carrier, but do +not maintain it in real time, e.g., only polling the link state at +some fixed interval. In this case, miimon will detect failures, but +only after some long period of time has expired. If it appears that +miimon is very slow in detecting link failures, try specifying +use_carrier=0 to see if that improves the failure detection time. If +it does, then it may be that the driver checks the carrier state at a +fixed interval, but does not cache the MII register values (so the +use_carrier=0 method of querying the registers directly works). If +use_carrier=0 does not improve the failover, then the driver may cache +the registers, or the problem may be elsewhere. + + Also, remember that miimon only checks for the device's +carrier state. It has no way to determine the state of devices on or +beyond other ports of a switch, or if a switch is refusing to pass +traffic while still maintaining carrier on. + +10. SNMP agents +=============== + + If running SNMP agents, the bonding driver should be loaded +before any network drivers participating in a bond. This requirement +is due to the the interface index (ipAdEntIfIndex) being associated to +the first interface found with a given IP address. That is, there is +only one ipAdEntIfIndex for each IP address. For example, if eth0 and +eth1 are slaves of bond0 and the driver for eth0 is loaded before the +bonding driver, the interface for the IP address will be associated +with the eth0 interface. This configuration is shown below, the IP +address 192.168.1.1 has an interface index of 2 which indexes to eth0 +in the ifDescr table (ifDescr.2). - This method will automatically take the address from the next slave - that will be added. + interfaces.ifTable.ifEntry.ifDescr.1 = lo + interfaces.ifTable.ifEntry.ifDescr.2 = eth0 + interfaces.ifTable.ifEntry.ifDescr.3 = eth1 + interfaces.ifTable.ifEntry.ifDescr.4 = eth2 + interfaces.ifTable.ifEntry.ifDescr.5 = eth3 + interfaces.ifTable.ifEntry.ifDescr.6 = bond0 + ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.10.10.10.10 = 5 + ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.192.168.1.1 = 2 + ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.10.74.20.94 = 4 + ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.127.0.0.1 = 1 - To restore your slaves' MAC addresses, you need to detach them - from the bond (`ifenslave -d bond0 eth0'). The bonding driver will then - restore the MAC addresses that the slaves had before they were enslaved. + This problem is avoided by loading the bonding driver before +any network drivers participating in a bond. Below is an example of +loading the bonding driver first, the IP address 192.168.1.1 is +correctly associated with ifDescr.2. -9. Which transmit polices can be used? + interfaces.ifTable.ifEntry.ifDescr.1 = lo + interfaces.ifTable.ifEntry.ifDescr.2 = bond0 + interfaces.ifTable.ifEntry.ifDescr.3 = eth0 + interfaces.ifTable.ifEntry.ifDescr.4 = eth1 + interfaces.ifTable.ifEntry.ifDescr.5 = eth2 + interfaces.ifTable.ifEntry.ifDescr.6 = eth3 + ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.10.10.10.10 = 6 + ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.192.168.1.1 = 2 + ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.10.74.20.94 = 5 + ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.127.0.0.1 = 1 - Round-robin, based on the order of enslaving, the output device - is selected base on the next available slave. Regardless of - the source and/or destination of the packet. + While some distributions may not report the interface name in +ifDescr, the association between the IP address and IfIndex remains +and SNMP functions such as Interface_Scan_Next will report that +association. - Active-backup policy that ensures that one and only one device will - transmit at any given moment. Active-backup policy is useful for - implementing high availability solutions using two hubs (see - section on High Availability). +11. Promiscuous mode +==================== - XOR, based on (src hw addr XOR dst hw addr) % slave count. This - policy selects the same slave for each destination hw address. + When running network monitoring tools, e.g., tcpdump, it is +common to enable promiscuous mode on the device, so that all traffic +is seen (instead of seeing only traffic destined for the local host). +The bonding driver handles promiscuous mode changes to the bonding +master device (e.g., bond0), and propogates the setting to the slave +devices. + + For the balance-rr, balance-xor, broadcast, and 802.3ad modes, +the promiscuous mode setting is propogated to all slaves. + + For the active-backup, balance-tlb and balance-alb modes, the +promiscuous mode setting is propogated only to the active slave. + + For balance-tlb mode, the active slave is the slave currently +receiving inbound traffic. + + For balance-alb mode, the active slave is the slave used as a +"primary." This slave is used for mode-specific control traffic, for +sending to peers that are unassigned or if the load is unbalanced. + + For the active-backup, balance-tlb and balance-alb modes, when +the active slave changes (e.g., due to a link failure), the +promiscuous setting will be propogated to the new active slave. + +12. High Availability Information +================================= + + High Availability refers to configurations that provide +maximum network availability by having redundant or backup devices, +links and switches between the host and the rest of the world. + + There are currently two basic methods for configuring to +maximize availability. They are dependent on the network topology and +the primary goal of the configuration, but in general, a configuration +can be optimized for maximum available bandwidth, or for maximum +network availability. + +12.1 High Availability in a Single Switch Topology +-------------------------------------------------- + + If two hosts (or a host and a switch) are directly connected +via multiple physical links, then there is no network availability +penalty for optimizing for maximum bandwidth: there is only one switch +(or peer), so if it fails, you have no alternative access to fail over +to. - Broadcast policy transmits everything on all slave interfaces. +Example 1 : host to switch (or other host) - 802.3ad, based on XOR but distributes traffic among all interfaces - in the active aggregator. + +----------+ +----------+ + | |eth0 eth0| switch | + | Host A +--------------------------+ or | + | +--------------------------+ other | + | |eth1 eth1| host | + +----------+ +----------+ - Transmit load balancing (balance-tlb) balances the traffic - according to the current load on each slave. The balancing is - clients based and the least loaded slave is selected for each new - client. The load of each slave is calculated relative to its speed - and enables load balancing in mixed speed teams. - Adaptive load balancing (balance-alb) uses the Transmit load - balancing for the transmit load. The receive load is balanced only - among the group of highest speed active slaves in the bond. The - load is distributed with round-robin i.e. next available slave in - the high speed group of active slaves. +12.1.1 Bonding Mode Selection for single switch topology +-------------------------------------------------------- -High Availability -================= + This configuration is the easiest to set up and to understand, +although you will have to decide which bonding mode best suits your +needs. The tradeoffs for each mode are detailed below: + +balance-rr: This mode is the only mode that will permit a single + TCP/IP connection to stripe traffic across multiple + interfaces. It is therefore the only mode that will allow a + single TCP/IP stream to utilize more than one interface's + worth of throughput. This comes at a cost, however: the + striping often results in peer systems receiving packets out + of order, causing TCP/IP's congestion control system to kick + in, often by retransmitting segments. + + It is possible to adjust TCP/IP's congestion limits by + altering the net.ipv4.tcp_reordering sysctl parameter. The + usual default value is 3, and the maximum useful value is 127. + For a four interface balance-rr bond, expect that a single + TCP/IP stream will utilize no more than approximately 2.3 + interface's worth of throughput, even after adjusting + tcp_reordering. + + If you are utilizing protocols other than TCP/IP, UDP for + example, and your application can tolerate out of order + delivery, then this mode can allow for single stream datagram + performance that scales near linearly as interfaces are added + to the bond. + + This mode requires the switch to have the appropriate ports + configured for "etherchannel" or "trunking." + +active-backup: There is not much advantage in this network topology to + the active-backup mode, as the inactive backup devices are all + connected to the same peer as the primary. In this case, a + load balancing mode (with link monitoring) will provide the + same level of network availability, but with increased + available bandwidth. On the plus side, it does not require + any configuration of the switch. + +balance-xor: This mode will limit traffic such that packets destined + for specific peers will always be sent over the same + interface. Since the destination is determined by the MAC + addresses involved, this may be desirable if you have a large + network with many hosts. It is likely to be suboptimal if all + your traffic is passed through a single router, however. As + with balance-rr, the switch ports need to be configured for + "etherchannel" or "trunking." + +broadcast: Like active-backup, there is not much advantage to this + mode in this type of network topology. + +802.3ad: This mode can be a good choice for this type of network + topology. The 802.3ad mode is an IEEE standard, so all peers + that implement 802.3ad should interoperate well. The 802.3ad + protocol includes automatic configuration of the aggregates, + so minimal manual configuration of the switch is needed + (typically only to designate that some set of devices is + usable for 802.3ad). The 802.3ad standard also mandates that + frames be delivered in order (within certain limits), so in + general single connections will not see misordering of + packets. The 802.3ad mode does have some drawbacks: the + standard mandates that all devices in the aggregate operate at + the same speed and duplex. Also, as with all bonding load + balance modes other than balance-rr, no single connection will + be able to utilize more than a single interface's worth of + bandwidth. Additionally, the linux bonding 802.3ad + implementation distributes traffic by peer (using an XOR of + MAC addresses), so in general all traffic to a particular + destination will use the same interface. Finally, the 802.3ad + mode mandates the use of the MII monitor, therefore, the ARP + monitor is not available in this mode. + +balance-tlb: This mode is also a good choice for this type of + topology. It has no special switch configuration + requirements, and balances outgoing traffic by peer, in a + vaguely intelligent manner (not a simple XOR as in balance-xor + or 802.3ad mode), so that unlucky MAC addresses will not all + "bunch up" on a single interface. Interfaces may be of + differing speeds. On the down side, in this mode all incoming + traffic arrives over a single interface, this mode requires + certain ethtool support in the network device driver of the + slave interfaces, and the ARP monitor is not available. + +balance-alb: This mode is everything that balance-tlb is, and more. It + has all of the features (and restrictions) of balance-tlb, and + will also balance incoming traffic from peers (as described in + the Bonding Module Options section, above). The only extra + down side to this mode is that the network device driver must + support changing the hardware address while the device is + open. + +12.1.2 Link Monitoring for Single Switch Topology +------------------------------------------------- + + The choice of link monitoring may largely depend upon which +mode you choose to use. The more advanced load balancing modes do not +support the use of the ARP monitor, and are thus restricted to using +the MII monitor (which does not provide as high a level of assurance +as the ARP monitor). + + +12.2 High Availability in a Multiple Switch Topology +---------------------------------------------------- + + With multiple switches, the configuration of bonding and the +network changes dramatically. In multiple switch topologies, there is +a tradeoff between network availability and usable bandwidth. -To implement high availability using the bonding driver, the driver needs to be -compiled as a module, because currently it is the only way to pass parameters -to the driver. This may change in the future. - -High availability is achieved by using MII or ETHTOOL status reporting. You -need to verify that all your interfaces support MII or ETHTOOL link status -reporting. On Linux kernel 2.2.17, all the 100 Mbps capable drivers and -yellowfin gigabit driver support MII. To determine if ETHTOOL link reporting -is available for interface eth0, type "ethtool eth0" and the "Link detected:" -line should contain the correct link status. If your system has an interface -that does not support MII or ETHTOOL status reporting, a failure of its link -will not be detected! A message indicating MII and ETHTOOL is not supported by -a network driver is logged when the bonding driver is loaded with a non-zero -miimon value. - -The bonding driver can regularly check all its slaves links using the ETHTOOL -IOCTL (ETHTOOL_GLINK command) or by checking the MII status registers. The -check interval is specified by the module argument "miimon" (MII monitoring). -It takes an integer that represents the checking time in milliseconds. It -should not come to close to (1000/HZ) (10 milli-seconds on i386) because it -may then reduce the system interactivity. A value of 100 seems to be a good -starting point. It means that a dead link will be detected at most 100 -milli-seconds after it goes down. - -Example: - - # modprobe bonding miimon=100 - -Or, put the following line in /etc/modprobe.conf: - - options bond0 miimon=100 - -There are currently two policies for high availability. They are dependent on -whether: - - a) hosts are connected to a single host or switch that support trunking - - b) hosts are connected to several different switches or a single switch that - does not support trunking - - -1) High Availability on a single switch or host - load balancing ----------------------------------------------------------------- -It is the easiest to set up and to understand. Simply configure the -remote equipment (host or switch) to aggregate traffic over several -ports (Trunk, EtherChannel, etc.) and configure the bonding interfaces. -If the module has been loaded with the proper MII option, it will work -automatically. You can then try to remove and restore different links -and see in your logs what the driver detects. When testing, you may -encounter problems on some buggy switches that disable the trunk for a -long time if all ports in a trunk go down. This is not Linux, but really -the switch (reboot it to ensure). + Below is a sample network, configured to maximize the +availability of the network: -Example 1 : host to host at twice the speed + | | + |port3 port3| + +-----+----+ +-----+----+ + | |port2 ISL port2| | + | switch A +--------------------------+ switch B | + | | | | + +-----+----+ +-----++---+ + |port1 port1| + | +-------+ | + +-------------+ host1 +---------------+ + eth0 +-------+ eth1 - +----------+ +----------+ - | |eth0 eth0| | - | Host A +--------------------------+ Host B | - | +--------------------------+ | - | |eth1 eth1| | - +----------+ +----------+ + In this configuration, there is a link between the two +switches (ISL, or inter switch link), and multiple ports connecting to +the outside world ("port3" on each switch). There is no technical +reason that this could not be extended to a third switch. + +12.2.1 Bonding Mode Selection for Multiple Switch Topology +---------------------------------------------------------- + + In a topology such as this, the active-backup and broadcast +modes are the only useful bonding modes; the other modes require all +links to terminate on the same peer for them to behave rationally. + +active-backup: This is generally the preferred mode, particularly if + the switches have an ISL and play together well. If the + network configuration is such that one switch is specifically + a backup switch (e.g., has lower capacity, higher cost, etc), + then the primary option can be used to insure that the + preferred link is always used when it is available. + +broadcast: This mode is really a special purpose mode, and is suitable + only for very specific needs. For example, if the two + switches are not connected (no ISL), and the networks beyond + them are totally independant. In this case, if it is + necessary for some specific one-way traffic to reach both + independent networks, then the broadcast mode may be suitable. + +12.2.2 Link Monitoring Selection for Multiple Switch Topology +------------------------------------------------------------- + + The choice of link monitoring ultimately depends upon your +switch. If the switch can reliably fail ports in response to other +failures, then either the MII or ARP monitors should work. For +example, in the above example, if the "port3" link fails at the remote +end, the MII monitor has no direct means to detect this. The ARP +monitor could be configured with a target at the remote end of port3, +thus detecting that failure without switch support. + + In general, however, in a multiple switch topology, the ARP +monitor can provide a higher level of reliability in detecting link +failures. Additionally, it should be configured with multiple targets +(at least one for each switch in the network). This will insure that, +regardless of which switch is active, the ARP monitor has a suitable +target to query. + + +12.3 Switch Behavior Issues for High Availability +------------------------------------------------- + + You may encounter issues with the timing of link up and down +reporting by the switch. + + First, when a link comes up, some switches may indicate that +the link is up (carrier available), but not pass traffic over the +interface for some period of time. This delay is typically due to +some type of autonegotiation or routing protocol, but may also occur +during switch initialization (e.g., during recovery after a switch +failure). If you find this to be a problem, specify an appropriate +value to the updelay bonding module option to delay the use of the +relevant interface(s). + + Second, some switches may "bounce" the link state one or more +times while a link is changing state. This occurs most commonly while +the switch is initializing. Again, an appropriate updelay value may +help, but note that if all links are down, then updelay is ignored +when any link becomes active (the slave closest to completing its +updelay is chosen). + + Note that when a bonding interface has no active links, the +driver will immediately reuse the first link that goes up, even if +updelay parameter was specified. If there are slave interfaces +waiting for the updelay timeout to expire, the interface that first +went into that state will be immediately reused. This reduces down +time of the network if the value of updelay has been overestimated. + + In addition to the concerns about switch timings, if your +switches take a long time to go into backup mode, it may be desirable +to not activate a backup interface immediately after a link goes down. +Failover may be delayed via the downdelay bonding module option. + +13. Hardware Specific Considerations +==================================== + + This section contains additional information for configuring +bonding on specific hardware platforms, or for interfacing bonding +with particular switches or other devices. + +13.1 IBM BladeCenter +-------------------- + + This applies to the JS20 and similar systems. + + On the JS20 blades, the bonding driver supports only +balance-rr, active-backup, balance-tlb and balance-alb modes. This is +largely due to the network topology inside the BladeCenter, detailed +below. + +JS20 network adapter information +-------------------------------- + + All JS20s come with two Broadcom Gigabit Ethernet ports +integrated on the planar. In the BladeCenter chassis, the eth0 port +of all JS20 blades is hard wired to I/O Module #1; similarly, all eth1 +ports are wired to I/O Module #2. An add-on Broadcom daughter card +can be installed on a JS20 to provide two more Gigabit Ethernet ports. +These ports, eth2 and eth3, are wired to I/O Modules 3 and 4, +respectively. + + Each I/O Module may contain either a switch or a passthrough +module (which allows ports to be directly connected to an external +switch). Some bonding modes require a specific BladeCenter internal +network topology in order to function; these are detailed below. - On each host : - # modprobe bonding miimon=100 - # ifconfig bond0 addr - # ifenslave bond0 eth0 eth1 + Additional BladeCenter-specific networking information can be +found in two IBM Redbooks (www.ibm.com/redbooks): -Example 2 : host to switch at twice the speed +"IBM eServer BladeCenter Networking Options" +"IBM eServer BladeCenter Layer 2-7 Network Switching" - +----------+ +----------+ - | |eth0 port1| | - | Host A +--------------------------+ switch | - | +--------------------------+ | - | |eth1 port2| | - +----------+ +----------+ +BladeCenter networking configuration +------------------------------------ - On host A : On the switch : - # modprobe bonding miimon=100 # set up a trunk on port1 - # ifconfig bond0 addr and port2 - # ifenslave bond0 eth0 eth1 + Because a BladeCenter can be configured in a very large number +of ways, this discussion will be confined to describing basic +configurations. + + Normally, Ethernet Switch Modules (ESM) are used in I/O +modules 1 and 2. In this configuration, the eth0 and eth1 ports of a +JS20 will be connected to different internal switches (in the +respective I/O modules). + + An optical passthru module (OPM) connects the I/O module +directly to an external switch. By using OPMs in I/O module #1 and +#2, the eth0 and eth1 interfaces of a JS20 can be redirected to the +outside world and connected to a common external switch. + + Depending upon the mix of ESM and OPM modules, the network +will appear to bonding as either a single switch topology (all OPM +modules) or as a multiple switch topology (one or more ESM modules, +zero or more OPM modules). It is also possible to connect ESM modules +together, resulting in a configuration much like the example in "High +Availability in a multiple switch topology." + +Requirements for specifc modes +------------------------------ + + The balance-rr mode requires the use of OPM modules for +devices in the bond, all connected to an common external switch. That +switch must be configured for "etherchannel" or "trunking" on the +appropriate ports, as is usual for balance-rr. + + The balance-alb and balance-tlb modes will function with +either switch modules or passthrough modules (or a mix). The only +specific requirement for these modes is that all network interfaces +must be able to reach all destinations for traffic sent over the +bonding device (i.e., the network must converge at some point outside +the BladeCenter). + + The active-backup mode has no additional requirements. + +Link monitoring issues +---------------------- + + When an Ethernet Switch Module is in place, only the ARP +monitor will reliably detect link loss to an external switch. This is +nothing unusual, but examination of the BladeCenter cabinet would +suggest that the "external" network ports are the ethernet ports for +the system, when it fact there is a switch between these "external" +ports and the devices on the JS20 system itself. The MII monitor is +only able to detect link failures between the ESM and the JS20 system. + + When a passthrough module is in place, the MII monitor does +detect failures to the "external" port, which is then directly +connected to the JS20 system. + +Other concerns +-------------- + + The Serial Over LAN link is established over the primary +ethernet (eth0) only, therefore, any loss of link to eth0 will result +in losing your SoL connection. It will not fail over with other +network traffic. + + It may be desirable to disable spanning tree on the switch +(either the internal Ethernet Switch Module, or an external switch) to +avoid fail-over delays issues when using bonding. + + +14. Frequently Asked Questions +============================== +1. Is it SMP safe? -2) High Availability on two or more switches (or a single switch without - trunking support) ---------------------------------------------------------------------------- -This mode is more problematic because it relies on the fact that there -are multiple ports and the host's MAC address should be visible on one -port only to avoid confusing the switches. + Yes. The old 2.0.xx channel bonding patch was not SMP safe. +The new driver was designed to be SMP safe from the start. -If you need to know which interface is the active one, and which ones are -backup, use ifconfig. All backup interfaces have the NOARP flag set. +2. What type of cards will work with it? -To use this mode, pass "mode=1" to the module at load time : + Any Ethernet type cards (you can even mix cards - a Intel +EtherExpress PRO/100 and a 3com 3c905b, for example). They need not +be of the same speed. - # modprobe bonding miimon=100 mode=active-backup +3. How many bonding devices can I have? - or: + There is no limit. - # modprobe bonding miimon=100 mode=1 +4. How many slaves can a bonding device have? -Or, put in your /etc/modprobe.conf : + This is limited only by the number of network interfaces Linux +supports and/or the number of network cards you can place in your +system. - options bond0 miimon=100 mode=active-backup +5. What happens when a slave link dies? -Example 1: Using multiple host and multiple switches to build a "no single -point of failure" solution. + If link monitoring is enabled, then the failing device will be +disabled. The active-backup mode will fail over to a backup link, and +other modes will ignore the failed link. The link will continue to be +monitored, and should it recover, it will rejoin the bond (in whatever +manner is appropriate for the mode). See the section on High +Availability for additional information. + + Link monitoring can be enabled via either the miimon or +arp_interval paramters (described in the module paramters section, +above). In general, miimon monitors the carrier state as sensed by +the underlying network device, and the arp monitor (arp_interval) +monitors connectivity to another host on the local network. + + If no link monitoring is configured, the bonding driver will +be unable to detect link failures, and will assume that all links are +always available. This will likely result in lost packets, and a +resulting degredation of performance. The precise performance loss +depends upon the bonding mode and network configuration. +6. Can bonding be used for High Availability? - | | - |port3 port3| - +-----+----+ +-----+----+ - | |port7 ISL port7| | - | switch A +--------------------------+ switch B | - | +--------------------------+ | - | |port8 port8| | - +----++----+ +-----++---+ - port2||port1 port1||port2 - || +-------+ || - |+-------------+ host1 +---------------+| - | eth0 +-------+ eth1 | - | | - | +-------+ | - +--------------+ host2 +----------------+ - eth0 +-------+ eth1 + Yes. See the section on High Availability for details. -In this configuration, there is an ISL - Inter Switch Link (could be a trunk), -several servers (host1, host2 ...) attached to both switches each, and one or -more ports to the outside world (port3...). One and only one slave on each host -is active at a time, while all links are still monitored (the system can -detect a failure of active and backup links). - -Each time a host changes its active interface, it sticks to the new one until -it goes down. In this example, the hosts are negligibly affected by the -expiration time of the switches' forwarding tables. - -If host1 and host2 have the same functionality and are used in load balancing -by another external mechanism, it is good to have host1's active interface -connected to one switch and host2's to the other. Such system will survive -a failure of a single host, cable, or switch. The worst thing that may happen -in the case of a switch failure is that half of the hosts will be temporarily -unreachable until the other switch expires its tables. +7. Which switches/systems does it work with? -Example 2: Using multiple ethernet cards connected to a switch to configure - NIC failover (switch is not required to support trunking). + The full answer to this depends upon the desired mode. + In the basic balance modes (balance-rr and balance-xor), it +works with any system that supports etherchannel (also called +trunking). Most managed switches currently available have such +support, and many unmananged switches as well. + + The advanced balance modes (balance-tlb and balance-alb) do +not have special switch requirements, but do need device drivers that +support specific features (described in the appropriate section under +module paramters, above). + + In 802.3ad mode, it works with with systems that support IEEE +802.3ad Dynamic Link Aggregation. Most managed and many unmanaged +switches currently available support 802.3ad. - +----------+ +----------+ - | |eth0 port1| | - | Host A +--------------------------+ switch | - | +--------------------------+ | - | |eth1 port2| | - +----------+ +----------+ + The active-backup mode should work with any Layer-II switch. - On host A : On the switch : - # modprobe bonding miimon=100 mode=1 # (optional) minimize the time - # ifconfig bond0 addr # for table expiration - # ifenslave bond0 eth0 eth1 +8. Where does a bonding device get its MAC address from? -Each time the host changes its active interface, it sticks to the new one until -it goes down. In this example, the host is strongly affected by the expiration -time of the switch forwarding table. + If not explicitly configured with ifconfig, the MAC address of +the bonding device is taken from its first slave device. This MAC +address is then passed to all following slaves and remains persistent +(even if the the first slave is removed) until the bonding device is +brought down or reconfigured. + + If you wish to change the MAC address, you can set it with +ifconfig: + +# ifconfig bond0 hw ether 00:11:22:33:44:55 + + The MAC address can be also changed by bringing down/up the +device and then changing its slaves (or their order): + +# ifconfig bond0 down ; modprobe -r bonding +# ifconfig bond0 .... up +# ifenslave bond0 eth... + This method will automatically take the address from the next +slave that is added. -3) Adapting to your switches' timing ------------------------------------- -If your switches take a long time to go into backup mode, it may be -desirable not to activate a backup interface immediately after a link goes -down. It is possible to delay the moment at which a link will be -completely disabled by passing the module parameter "downdelay" (in -milliseconds, must be a multiple of miimon). - -When a switch reboots, it is possible that its ports report "link up" status -before they become usable. This could fool a bond device by causing it to -use some ports that are not ready yet. It is possible to delay the moment at -which an active link will be reused by passing the module parameter "updelay" -(in milliseconds, must be a multiple of miimon). - -A similar situation can occur when a host re-negotiates a lost link with the -switch (a case of cable replacement). - -A special case is when a bonding interface has lost all slave links. Then the -driver will immediately reuse the first link that goes up, even if updelay -parameter was specified. (If there are slave interfaces in the "updelay" state, -the interface that first went into that state will be immediately reused.) This -allows to reduce down-time if the value of updelay has been overestimated. - -Examples : - - # modprobe bonding miimon=100 mode=1 downdelay=2000 updelay=5000 - # modprobe bonding miimon=100 mode=balance-rr downdelay=0 updelay=5000 - - -Promiscuous Sniffing notes -========================== - -If you wish to bond channels together for a network sniffing -application --- you wish to run tcpdump, or ethereal, or an IDS like -snort, with its input aggregated from multiple interfaces using the -bonding driver --- then you need to handle the Promiscuous interface -setting by hand. Specifically, when you "ifconfing bond0 up" you -must add the promisc flag there; it will be propagated down to the -slave interfaces at ifenslave time; a full example might look like: - - ifconfig bond0 promisc up - for if in eth1 eth2 ...;do - ifconfig $if up - ifenslave bond0 $if - done - snort ... -i bond0 ... - -Ifenslave also wants to propagate addresses from interface to -interface, appropriately for its design functions in HA and channel -capacity aggregating; but it works fine for unnumbered interfaces; -just ignore all the warnings it emits. + To restore your slaves' MAC addresses, you need to detach them +from the bond (`ifenslave -d bond0 eth0'). The bonding driver will +then restore the MAC addresses that the slaves had before they were +enslaved. +15. Resources and Links +======================= -8021q VLAN support -================== +The latest version of the bonding driver can be found in the latest +version of the linux kernel, found on http://kernel.org -It is possible to configure VLAN devices over a bond interface using the 8021q -driver. However, only packets coming from the 8021q driver and passing through -bonding will be tagged by default. Self generated packets, like bonding's -learning packets or ARP packets generated by either ALB mode or the ARP -monitor mechanism, are tagged internally by bonding itself. As a result, -bonding has to "learn" what VLAN IDs are configured on top of it, and it uses -those IDs to tag self generated packets. - -For simplicity reasons, and to support the use of adapters that can do VLAN -hardware acceleration offloding, the bonding interface declares itself as -fully hardware offloaing capable, it gets the add_vid/kill_vid notifications -to gather the necessary information, and it propagates those actions to the -slaves. -In case of mixed adapter types, hardware accelerated tagged packets that should -go through an adapter that is not offloading capable are "un-accelerated" by the -bonding driver so the VLAN tag sits in the regular location. - -VLAN interfaces *must* be added on top of a bonding interface only after -enslaving at least one slave. This is because until the first slave is added the -bonding interface has a HW address of 00:00:00:00:00:00, which will be copied by -the VLAN interface when it is created. - -Notice that a problem would occur if all slaves are released from a bond that -still has VLAN interfaces on top of it. When later coming to add new slaves, the -bonding interface would get a HW address from the first slave, which might not -match that of the VLAN interfaces. It is recommended that either all VLANs are -removed and then re-added, or to manually set the bonding interface's HW -address so it matches the VLAN's. (Note: changing a VLAN interface's HW address -would set the underlying device -- i.e. the bonding interface -- to promiscouos -mode, which might not be what you want). - - -Limitations -=========== -The main limitations are : - - only the link status is monitored. If the switch on the other side is - partially down (e.g. doesn't forward anymore, but the link is OK), the link - won't be disabled. Another way to check for a dead link could be to count - incoming frames on a heavily loaded host. This is not applicable to small - servers, but may be useful when the front switches send multicast - information on their links (e.g. VRRP), or even health-check the servers. - Use the arp_interval/arp_ip_target parameters to count incoming/outgoing - frames. +Discussions regarding the bonding driver take place primarily on the +bonding-devel mailing list, hosted at sourceforge.net. If you have +questions or problems, post them to the list. +bonding-devel@lists.sourceforge.net +https://lists.sourceforge.net/lists/listinfo/bonding-devel -Resources and Links -=================== +There is also a project site on sourceforge. -Current development on this driver is posted to: - - http://www.sourceforge.net/projects/bonding/ +http://www.sourceforge.net/projects/bonding Donald Becker's Ethernet Drivers and diag programs may be found at : - http://www.scyld.com/network/ -You will also find a lot of information regarding Ethernet, NWay, MII, etc. at -www.scyld.com. - -Patches for 2.2 kernels are at Willy Tarreau's site : - - http://wtarreau.free.fr/pub/bonding/ - - http://www-miaif.lip6.fr/~tarreau/pub/bonding/ - -To get latest informations about Linux Kernel development, please consult -the Linux Kernel Mailing List Archives at : - http://www.ussg.iu.edu/hypermail/linux/kernel/ +You will also find a lot of information regarding Ethernet, NWay, MII, +etc. at www.scyld.com. -- END -- diff -Nru a/Documentation/networking/e100.txt b/Documentation/networking/e100.txt --- a/Documentation/networking/e100.txt 2005-03-07 14:54:18 -08:00 +++ b/Documentation/networking/e100.txt 2005-03-07 14:54:18 -08:00 @@ -140,8 +140,7 @@ NAPI ---- - NAPI (Rx polling mode) is supported in the e100 driver. NAPI is enabled - or disabled based on the configuration of the kernel. + NAPI (Rx polling mode) is supported in the e100 driver. See www.cyberus.ca/~hadi/usenix-paper.tgz for more information on NAPI. diff -Nru a/Documentation/networking/ixgb.txt b/Documentation/networking/ixgb.txt --- a/Documentation/networking/ixgb.txt 2005-03-07 14:54:17 -08:00 +++ b/Documentation/networking/ixgb.txt 2005-03-07 14:54:17 -08:00 @@ -1,7 +1,7 @@ Linux* Base Driver for the Intel(R) PRO/10GbE Family of Adapters ================================================================ -September 13, 2004 +November 17, 2004 Contents @@ -18,8 +18,7 @@ =============== This file describes the Linux* Base Driver for the Intel(R) PRO/10GbE Family -of Adapters, version 1.0.x. This driver includes support for Itanium(TM)2 and -EM64T systems. +of Adapters, version 1.0.x. For questions related to hardware requirements, refer to the documentation supplied with your Intel PRO/10GbE adapter. All hardware requirements listed @@ -71,8 +70,8 @@ Ethernet PAUSE frames. RxDescriptors -Valid Range: 64-4096 -Default Value: 1024 +Valid Range: 64-512 +Default Value: 512 This value is the number of receive descriptors allocated by the driver. Increasing this value allows the driver to buffer more incoming packets. Each descriptor is 16 bytes. A receive buffer is also allocated for diff -Nru a/Documentation/pci.txt b/Documentation/pci.txt --- a/Documentation/pci.txt 2005-03-07 14:54:17 -08:00 +++ b/Documentation/pci.txt 2005-03-07 14:54:17 -08:00 @@ -99,10 +99,10 @@ Users need pass only as many fields as necessary; vendor, device, subvendor, and subdevice fields default to PCI_ANY_ID (FFFFFFFF), class and classmask fields default to 0, and driver_data defaults to -0UL. Device drivers must call - pci_dynids_set_use_driver_data(pci_driver *, 1) -in order for the driver_data field to get passed to the driver. -Otherwise, only a 0 is passed in that field. +0UL. Device drivers must initialize use_driver_data in the dynids struct +in their pci_driver struct prior to calling pci_register_driver in order +for the driver_data field to get passed to the driver. Otherwise, only a +0 is passed in that field. When the driver exits, it just calls pci_unregister_driver() and the PCI layer automatically calls the remove hook for all devices handled by the driver. diff -Nru a/Documentation/tty.txt b/Documentation/tty.txt --- a/Documentation/tty.txt 2005-03-07 14:54:18 -08:00 +++ b/Documentation/tty.txt 2005-03-07 14:54:18 -08:00 @@ -93,6 +93,11 @@ ldisc must be careful about setting order and to handle unexpected calls. Must not sleep. + The driver is forbidden from calling this directly + from the ->write call from the ldisc as the ldisc + is permitted to call the driver write method from + this function. In such a situation defer it. + Locking diff -Nru a/MAINTAINERS b/MAINTAINERS --- a/MAINTAINERS 2005-03-07 14:54:17 -08:00 +++ b/MAINTAINERS 2005-03-07 14:54:17 -08:00 @@ -457,6 +457,11 @@ M: marcel@holtmann.org S: Maintained +BLUETOOTH HCI BPA10X DRIVER +P: Marcel Holtmann +M: marcel@holtmann.org +S: Maintained + BLUETOOTH HCI BFUSB DRIVER P: Marcel Holtmann M: marcel@holtmann.org @@ -596,11 +601,10 @@ S: Maintained CRYPTO API -P: James Morris -M: jmorris@redhat.com +P: Herbert Xu +M: herbert@gondor.apana.org.au P: David S. Miller M: davem@davemloft.net -W http://samba.org/~jamesm/crypto/ L: linux-kernel@vger.kernel.org S: Maintained @@ -910,10 +914,17 @@ W: http://www.icp-vortex.com/ S: Supported -GENERIC HDLC DRIVER, N2 AND C101 DRIVERS +GENERIC HDLC DRIVER, N2, C101, PCI200SYN and WANXL DRIVERS P: Krzysztof Halasa M: khc@pm.waw.pl -W: http://hq.pm.waw.pl/hdlc/ +W: http://www.kernel.org/pub/linux/utils/net/hdlc/ +S: Maintained + +HARMONY SOUND DRIVER +P: Kyle McMartin +M: kyle@parisc-linux.org +W: http://www.parisc-linux.org/~kyle/harmony/ +L: parisc-linux@lists.parisc-linux.org S: Maintained HAYES ESP SERIAL DRIVER @@ -991,8 +1002,8 @@ I2C AND SENSORS DRIVERS P: Greg Kroah-Hartman M: greg@kroah.com -P: Philip Edelbrock -M: phil@netroedge.com +P: Jean Delvare +M: khali@linux-fr.org L: sensors@stimpy.netroedge.com W: http://www.lm-sensors.nu/ S: Maintained @@ -1082,9 +1093,21 @@ L: linux-kernel@vger.kernel.org S: Maintained +IEEE 1394 ETHERNET (eth1394) +L: linux1394-devel@lists.sourceforge.net +W: http://www.linux1394.org/ +S: Orphan + +IEEE 1394 SBP2 +L: linux1394-devel@lists.sourceforge.net +W: http://www.linux1394.org/ +S: Orphan + IEEE 1394 SUBSYSTEM P: Ben Collins M: bcollins@debian.org +P: Jody McIntyre +M: scjody@steamballoon.com L: linux1394-devel@lists.sourceforge.net W: http://www.linux1394.org/ S: Maintained @@ -1092,13 +1115,15 @@ IEEE 1394 OHCI DRIVER P: Ben Collins M: bcollins@debian.org +P: Jody McIntyre +M: scjody@steamballoon.com L: linux1394-devel@lists.sourceforge.net W: http://www.linux1394.org/ S: Maintained IEEE 1394 PCILYNX DRIVER -P: Andreas Bombe -M: andreas.bombe@munich.netsurf.de +P: Jody McIntyre +M: scjody@steamballoon.com L: linux1394-devel@lists.sourceforge.net W: http://www.linux1394.org/ S: Maintained @@ -1106,6 +1131,8 @@ IEEE 1394 RAW I/O DRIVER P: Ben Collins M: bcollins@debian.org +P: Dan Dennedy +M: dan@dennedy.org L: linux1394-devel@lists.sourceforge.net W: http://www.linux1394.org/ S: Maintained @@ -1247,8 +1274,8 @@ JFS FILESYSTEM P: Dave Kleikamp M: shaggy@austin.ibm.com -L: jfs-discussion@oss.software.ibm.com -W: http://oss.software.ibm.com/jfs/ +L: jfs-discussion@lists.sourceforge.net +W: http://jfs.sourceforge.net/ S: Supported KCONFIG @@ -1372,7 +1399,7 @@ L: linuxppc-embedded@ozlabs.org S: Maintained -LINUX FOR POWERPC EMBEDDED PPC85XX +LINUX FOR POWERPC EMBEDDED PPC83XX AND PPC85XX P: Kumar Gala M: kumar.gala@freescale.com W: http://www.penguinppc.org/ diff -Nru a/arch/arm/Kconfig b/arch/arm/Kconfig --- a/arch/arm/Kconfig 2005-03-07 14:54:17 -08:00 +++ b/arch/arm/Kconfig 2005-03-07 14:54:17 -08:00 @@ -231,7 +231,7 @@ config SHARP_LOCOMO bool - depends on SA1100_COLLIE + depends on SA1100_COLLIE || MACH_POODLE default y config SHARP_SCOOP diff -Nru a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c --- a/arch/arm/common/locomo.c 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/common/locomo.c 2005-03-07 14:54:16 -08:00 @@ -34,11 +34,33 @@ #include +/* M62332 output channel selection */ +#define M62332_EVR_CH 1 /* M62332 volume channel number */ + /* 0 : CH.1 , 1 : CH. 2 */ +/* DAC send data */ +#define M62332_SLAVE_ADDR 0x4e /* Slave address */ +#define M62332_W_BIT 0x00 /* W bit (0 only) */ +#define M62332_SUB_ADDR 0x00 /* Sub address */ +#define M62332_A_BIT 0x00 /* A bit (0 only) */ + +/* DAC setup and hold times (expressed in us) */ +#define DAC_BUS_FREE_TIME 5 /* 4.7 us */ +#define DAC_START_SETUP_TIME 5 /* 4.7 us */ +#define DAC_STOP_SETUP_TIME 4 /* 4.0 us */ +#define DAC_START_HOLD_TIME 5 /* 4.7 us */ +#define DAC_SCL_LOW_HOLD_TIME 5 /* 4.7 us */ +#define DAC_SCL_HIGH_HOLD_TIME 4 /* 4.0 us */ +#define DAC_DATA_SETUP_TIME 1 /* 250 ns */ +#define DAC_DATA_HOLD_TIME 1 /* 300 ns */ +#define DAC_LOW_SETUP_TIME 1 /* 300 ns */ +#define DAC_HIGH_SETUP_TIME 1 /* 1000 ns */ + /* the following is the overall data for the locomo chip */ struct locomo { struct device *dev; unsigned long phys; unsigned int irq; + spinlock_t lock; void *base; }; @@ -50,7 +72,57 @@ const char * name; }; +/* All the locomo devices. If offset is non-zero, the mapbase for the + * locomo_dev will be set to the chip base plus offset. If offset is + * zero, then the mapbase for the locomo_dev will be set to zero. An + * offset of zero means the device only uses GPIOs or other helper + * functions inside this file */ static struct locomo_dev_info locomo_devices[] = { + { + .devid = LOCOMO_DEVID_KEYBOARD, + .irq = { + IRQ_LOCOMO_KEY, + }, + .name = "locomo-keyboard", + .offset = LOCOMO_KEYBOARD, + .length = 16, + }, + { + .devid = LOCOMO_DEVID_FRONTLIGHT, + .irq = {}, + .name = "locomo-frontlight", + .offset = LOCOMO_FRONTLIGHT, + .length = 8, + + }, + { + .devid = LOCOMO_DEVID_BACKLIGHT, + .irq = {}, + .name = "locomo-backlight", + .offset = LOCOMO_BACKLIGHT, + .length = 8, + }, + { + .devid = LOCOMO_DEVID_AUDIO, + .irq = {}, + .name = "locomo-audio", + .offset = LOCOMO_AUDIO, + .length = 4, + }, + { + .devid = LOCOMO_DEVID_LED, + .irq = {}, + .name = "locomo-led", + .offset = LOCOMO_LED, + .length = 8, + }, + { + .devid = LOCOMO_DEVID_UART, + .irq = {}, + .name = "locomo-uart", + .offset = 0, + .length = 0, + }, }; @@ -146,7 +218,7 @@ struct irqdesc *d; void *mapbase = get_irq_chipdata(irq); - if (locomo_readl(mapbase + LOCOMO_KIC) & 0x0001) { + if (locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC) & 0x0001) { d = irq_desc + LOCOMO_IRQ_KEY_START; d->handle(LOCOMO_IRQ_KEY_START, d, regs); } @@ -156,27 +228,27 @@ { void *mapbase = get_irq_chipdata(irq); unsigned int r; - r = locomo_readl(mapbase + LOCOMO_KIC); + r = locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC); r &= ~(0x0100 << (irq - LOCOMO_IRQ_KEY_START)); - locomo_writel(r, mapbase + LOCOMO_KIC); + locomo_writel(r, mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC); } static void locomo_key_mask_irq(unsigned int irq) { void *mapbase = get_irq_chipdata(irq); unsigned int r; - r = locomo_readl(mapbase + LOCOMO_KIC); + r = locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC); r &= ~(0x0010 << (irq - LOCOMO_IRQ_KEY_START)); - locomo_writel(r, mapbase + LOCOMO_KIC); + locomo_writel(r, mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC); } static void locomo_key_unmask_irq(unsigned int irq) { void *mapbase = get_irq_chipdata(irq); unsigned int r; - r = locomo_readl(mapbase + LOCOMO_KIC); + r = locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC); r |= (0x0010 << (irq - LOCOMO_IRQ_KEY_START)); - locomo_writel(r, mapbase + LOCOMO_KIC); + locomo_writel(r, mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC); } static struct irqchip locomo_key_chip = { @@ -421,13 +493,11 @@ { struct locomo_dev *dev = LOCOMO_DEV(_dev); - release_resource(&dev->res); kfree(dev); } static int -locomo_init_one_child(struct locomo *lchip, struct resource *parent, - struct locomo_dev_info *info) +locomo_init_one_child(struct locomo *lchip, struct locomo_dev_info *info) { struct locomo_dev *dev; int ret; @@ -454,25 +524,17 @@ dev->dev.bus = &locomo_bus_type; dev->dev.release = locomo_dev_release; dev->dev.coherent_dma_mask = lchip->dev->coherent_dma_mask; - dev->res.start = lchip->phys + info->offset; - dev->res.end = dev->res.start + info->length; - dev->res.name = dev->dev.bus_id; - dev->res.flags = IORESOURCE_MEM; - dev->mapbase = lchip->base + info->offset; - memmove(dev->irq, info->irq, sizeof(dev->irq)); - if (info->length) { - ret = request_resource(parent, &dev->res); - if (ret) { - printk("LoCoMo: failed to allocate resource for %s\n", - dev->res.name); - goto out; - } - } + if (info->offset) + dev->mapbase = lchip->base + info->offset; + else + dev->mapbase = 0; + dev->length = info->length; + + memmove(dev->irq, info->irq, sizeof(dev->irq)); ret = device_register(&dev->dev); if (ret) { - release_resource(&dev->res); out: kfree(dev); } @@ -504,6 +566,8 @@ memset(lchip, 0, sizeof(struct locomo)); + spin_lock_init(&lchip->lock); + lchip->dev = me; dev_set_drvdata(lchip->dev, lchip); @@ -523,7 +587,7 @@ /* locomo initialize */ locomo_writel(0, lchip->base + LOCOMO_ICR); /* KEYBOARD */ - locomo_writel(0, lchip->base + LOCOMO_KIC); + locomo_writel(0, lchip->base + LOCOMO_KEYBOARD + LOCOMO_KIC); /* GPIO */ locomo_writel(0, lchip->base + LOCOMO_GPO); @@ -534,8 +598,8 @@ locomo_writel(0, lchip->base + LOCOMO_GIE); /* FrontLight */ - locomo_writel(0, lchip->base + LOCOMO_ALS); - locomo_writel(0, lchip->base + LOCOMO_ALD); + locomo_writel(0, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALS); + locomo_writel(0, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALD); /* Longtime timer */ locomo_writel(0, lchip->base + LOCOMO_LTINT); /* SPI */ @@ -578,7 +642,7 @@ locomo_setup_irq(lchip); for (i = 0; i < ARRAY_SIZE(locomo_devices); i++) - locomo_init_one_child(lchip, mem, &locomo_devices[i]); + locomo_init_one_child(lchip, &locomo_devices[i]); return 0; @@ -654,6 +718,238 @@ return (struct locomo *)dev_get_drvdata(ldev->dev.parent); } +void locomo_gpio_set_dir(struct locomo_dev *ldev, unsigned int bits, unsigned int dir) +{ + struct locomo *lchip = locomo_chip_driver(ldev); + unsigned long flags; + unsigned int r; + + spin_lock_irqsave(&lchip->lock, flags); + + r = locomo_readl(lchip->base + LOCOMO_GPD); + r &= ~bits; + locomo_writel(r, lchip->base + LOCOMO_GPD); + + r = locomo_readl(lchip->base + LOCOMO_GPE); + if (dir) + r |= bits; + else + r &= ~bits; + locomo_writel(r, lchip->base + LOCOMO_GPE); + + spin_unlock_irqrestore(&lchip->lock, flags); +} + +unsigned int locomo_gpio_read_level(struct locomo_dev *ldev, unsigned int bits) +{ + struct locomo *lchip = locomo_chip_driver(ldev); + unsigned long flags; + unsigned int ret; + + spin_lock_irqsave(&lchip->lock, flags); + ret = locomo_readl(lchip->base + LOCOMO_GPL); + spin_unlock_irqrestore(&lchip->lock, flags); + + ret &= bits; + return ret; +} + +unsigned int locomo_gpio_read_output(struct locomo_dev *ldev, unsigned int bits) +{ + struct locomo *lchip = locomo_chip_driver(ldev); + unsigned long flags; + unsigned int ret; + + spin_lock_irqsave(&lchip->lock, flags); + ret = locomo_readl(lchip->base + LOCOMO_GPO); + spin_unlock_irqrestore(&lchip->lock, flags); + + ret &= bits; + return ret; +} + +void locomo_gpio_write(struct locomo_dev *ldev, unsigned int bits, unsigned int set) +{ + struct locomo *lchip = locomo_chip_driver(ldev); + unsigned long flags; + unsigned int r; + + spin_lock_irqsave(&lchip->lock, flags); + + r = locomo_readl(lchip->base + LOCOMO_GPO); + if (set) + r |= bits; + else + r &= ~bits; + locomo_writel(r, lchip->base + LOCOMO_GPO); + + spin_unlock_irqrestore(&lchip->lock, flags); +} + +static void locomo_m62332_sendbit(void *mapbase, int bit) +{ + unsigned int r; + + r = locomo_readl(mapbase + LOCOMO_DAC); + r &= ~(LOCOMO_DAC_SCLOEB); + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_LOW_SETUP_TIME); /* 300 nsec */ + udelay(DAC_DATA_HOLD_TIME); /* 300 nsec */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r &= ~(LOCOMO_DAC_SCLOEB); + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_LOW_SETUP_TIME); /* 300 nsec */ + udelay(DAC_SCL_LOW_HOLD_TIME); /* 4.7 usec */ + + if (bit & 1) { + r = locomo_readl(mapbase + LOCOMO_DAC); + r |= LOCOMO_DAC_SDAOEB; + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_HIGH_SETUP_TIME); /* 1000 nsec */ + } else { + r = locomo_readl(mapbase + LOCOMO_DAC); + r &= ~(LOCOMO_DAC_SDAOEB); + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_LOW_SETUP_TIME); /* 300 nsec */ + } + + udelay(DAC_DATA_SETUP_TIME); /* 250 nsec */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r |= LOCOMO_DAC_SCLOEB; + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_HIGH_SETUP_TIME); /* 1000 nsec */ + udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.0 usec */ +} + +void locomo_m62332_senddata(struct locomo_dev *ldev, unsigned int dac_data, int channel) +{ + struct locomo *lchip = locomo_chip_driver(ldev); + int i; + unsigned char data; + unsigned int r; + void *mapbase = lchip->base; + unsigned long flags; + + spin_lock_irqsave(&lchip->lock, flags); + + /* Start */ + udelay(DAC_BUS_FREE_TIME); /* 5.0 usec */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r |= LOCOMO_DAC_SCLOEB | LOCOMO_DAC_SDAOEB; + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_HIGH_SETUP_TIME); /* 1000 nsec */ + udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.0 usec */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r &= ~(LOCOMO_DAC_SDAOEB); + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_START_HOLD_TIME); /* 5.0 usec */ + udelay(DAC_DATA_HOLD_TIME); /* 300 nsec */ + + /* Send slave address and W bit (LSB is W bit) */ + data = (M62332_SLAVE_ADDR << 1) | M62332_W_BIT; + for (i = 1; i <= 8; i++) { + locomo_m62332_sendbit(mapbase, data >> (8 - i)); + } + + /* Check A bit */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r &= ~(LOCOMO_DAC_SCLOEB); + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_LOW_SETUP_TIME); /* 300 nsec */ + udelay(DAC_SCL_LOW_HOLD_TIME); /* 4.7 usec */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r &= ~(LOCOMO_DAC_SDAOEB); + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_LOW_SETUP_TIME); /* 300 nsec */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r |= LOCOMO_DAC_SCLOEB; + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_HIGH_SETUP_TIME); /* 1000 nsec */ + udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.7 usec */ + if (locomo_readl(mapbase + LOCOMO_DAC) & LOCOMO_DAC_SDAOEB) { /* High is error */ + printk(KERN_WARNING "locomo: m62332_senddata Error 1\n"); + return; + } + + /* Send Sub address (LSB is channel select) */ + /* channel = 0 : ch1 select */ + /* = 1 : ch2 select */ + data = M62332_SUB_ADDR + channel; + for (i = 1; i <= 8; i++) { + locomo_m62332_sendbit(mapbase, data >> (8 - i)); + } + + /* Check A bit */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r &= ~(LOCOMO_DAC_SCLOEB); + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_LOW_SETUP_TIME); /* 300 nsec */ + udelay(DAC_SCL_LOW_HOLD_TIME); /* 4.7 usec */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r &= ~(LOCOMO_DAC_SDAOEB); + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_LOW_SETUP_TIME); /* 300 nsec */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r |= LOCOMO_DAC_SCLOEB; + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_HIGH_SETUP_TIME); /* 1000 nsec */ + udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.7 usec */ + if (locomo_readl(mapbase + LOCOMO_DAC) & LOCOMO_DAC_SDAOEB) { /* High is error */ + printk(KERN_WARNING "locomo: m62332_senddata Error 2\n"); + return; + } + + /* Send DAC data */ + for (i = 1; i <= 8; i++) { + locomo_m62332_sendbit(mapbase, dac_data >> (8 - i)); + } + + /* Check A bit */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r &= ~(LOCOMO_DAC_SCLOEB); + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_LOW_SETUP_TIME); /* 300 nsec */ + udelay(DAC_SCL_LOW_HOLD_TIME); /* 4.7 usec */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r &= ~(LOCOMO_DAC_SDAOEB); + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_LOW_SETUP_TIME); /* 300 nsec */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r |= LOCOMO_DAC_SCLOEB; + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_HIGH_SETUP_TIME); /* 1000 nsec */ + udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.7 usec */ + if (locomo_readl(mapbase + LOCOMO_DAC) & LOCOMO_DAC_SDAOEB) { /* High is error */ + printk(KERN_WARNING "locomo: m62332_senddata Error 3\n"); + return; + } + + /* stop */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r &= ~(LOCOMO_DAC_SCLOEB); + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_LOW_SETUP_TIME); /* 300 nsec */ + udelay(DAC_SCL_LOW_HOLD_TIME); /* 4.7 usec */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r |= LOCOMO_DAC_SCLOEB; + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_HIGH_SETUP_TIME); /* 1000 nsec */ + udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4 usec */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r |= LOCOMO_DAC_SDAOEB; + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_HIGH_SETUP_TIME); /* 1000 nsec */ + udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4 usec */ + + r = locomo_readl(mapbase + LOCOMO_DAC); + r |= LOCOMO_DAC_SCLOEB | LOCOMO_DAC_SDAOEB; + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_LOW_SETUP_TIME); /* 1000 nsec */ + udelay(DAC_SCL_LOW_HOLD_TIME); /* 4.7 usec */ + + spin_unlock_irqrestore(&lchip->lock, flags); +} + /* * LoCoMo "Register Access Bus." * @@ -755,3 +1051,8 @@ EXPORT_SYMBOL(locomo_driver_register); EXPORT_SYMBOL(locomo_driver_unregister); +EXPORT_SYMBOL(locomo_gpio_set_dir); +EXPORT_SYMBOL(locomo_gpio_read_level); +EXPORT_SYMBOL(locomo_gpio_read_output); +EXPORT_SYMBOL(locomo_gpio_write); +EXPORT_SYMBOL(locomo_m62332_senddata); diff -Nru a/arch/arm/common/rtctime.c b/arch/arm/common/rtctime.c --- a/arch/arm/common/rtctime.c 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/common/rtctime.c 2005-03-07 14:54:16 -08:00 @@ -94,15 +94,11 @@ EXPORT_SYMBOL(rtc_time_to_tm); /* - * Convert Gregorian date to seconds since 01-01-1970 00:00:00. + * Does the rtc_time represent a valid date/time? */ -int rtc_tm_to_time(struct rtc_time *tm, unsigned long *time) +int rtc_valid_tm(struct rtc_time *tm) { - unsigned int yrs = tm->tm_year + 1900; - - *time = 0; - - if (yrs < 1970 || + if (tm->tm_year < 70 || tm->tm_mon >= 12 || tm->tm_mday < 1 || tm->tm_mday > month_days(tm->tm_mon, yrs) || @@ -111,7 +107,16 @@ tm->tm_sec >= 60) return -EINVAL; - *time = mktime(yrs, tm->tm_mon + 1, tm->tm_mday, + return 0; +} +EXPORT_SYMBOL(rtc_valid_tm); + +/* + * Convert Gregorian date to seconds since 01-01-1970 00:00:00. + */ +int rtc_tm_to_time(struct rtc_time *tm, unsigned long *time) +{ + *time = mktime(tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec); return 0; @@ -144,7 +149,13 @@ static inline int rtc_set_time(struct rtc_ops *ops, struct rtc_time *tm) { - return ops->set_time(tm); + int ret; + + ret = rtc_valid_tm(tm); + if (ret == 0) + ret = ops->set_time(tm); + + return ret; } static inline int rtc_read_alarm(struct rtc_ops *ops, struct rtc_wkalrm *alrm) @@ -412,7 +423,6 @@ struct rtc_wkalrm alrm; struct rtc_time tm; char *p = page; - int len; rtc_read_time(ops, &tm); @@ -461,13 +471,7 @@ if (ops->proc) p += ops->proc(p); - len = (p - page) - off; - if (len < 0) - len = 0; - *eof = len <= count; - *start = page + off; - - return len; + return p - page; } int register_rtc(struct rtc_ops *ops) diff -Nru a/arch/arm/configs/pxa255-idp_defconfig b/arch/arm/configs/pxa255-idp_defconfig --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/configs/pxa255-idp_defconfig 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,765 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.11-rc3 +# Fri Feb 11 16:53:43 2005 +# +CONFIG_ARM=y +CONFIG_MMU=y +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_LOCALVERSION="" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y +# CONFIG_IKCONFIG is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +# CONFIG_MODULE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +# CONFIG_KMOD is not set + +# +# System Type +# +# CONFIG_ARCH_CLPS7500 is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_CO285 is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_CAMELOT is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_IOP3XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_L7200 is not set +CONFIG_ARCH_PXA=y +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set + +# +# Intel PXA2xx Implementations +# +# CONFIG_ARCH_LUBBOCK is not set +# CONFIG_MACH_MAINSTONE is not set +CONFIG_ARCH_PXA_IDP=y +# CONFIG_PXA_SHARPSL is not set +CONFIG_PXA25x=y + +# +# Processor Type +# +CONFIG_CPU_32=y +CONFIG_CPU_XSCALE=y +CONFIG_CPU_32v5=y +CONFIG_CPU_ABRT_EV5T=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_TLB_V4WBI=y +CONFIG_CPU_MINICACHE=y + +# +# Processor Features +# +# CONFIG_ARM_THUMB is not set +CONFIG_XSCALE_PMU=y + +# +# General setup +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +# CONFIG_XIP_KERNEL is not set + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# PC-card bridges +# + +# +# At least one math emulation must be selected +# +CONFIG_FPE_NWFPE=y +# CONFIG_FPE_NWFPE_XP is not set +# CONFIG_FPE_FASTFPE is not set +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_AOUT is not set +# CONFIG_BINFMT_MISC is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_PM is not set +# CONFIG_PREEMPT is not set +# CONFIG_ARTHUR is not set +CONFIG_CMDLINE="root=/dev/nfs ip=dhcp console=ttyS0,115200 mem=64M" +CONFIG_LEDS=y +CONFIG_LEDS_TIMER=y +CONFIG_LEDS_CPU=y +CONFIG_ALIGNMENT_TRAP=y + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Memory Technology Devices (MTD) +# +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_CONCAT is not set +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set +# CONFIG_MTD_AFS_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set + +# +# RAM/ROM/Flash chip drivers +# +CONFIG_MTD_CFI=y +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_GEN_PROBE=y +CONFIG_MTD_CFI_ADV_OPTIONS=y +CONFIG_MTD_CFI_NOSWAP=y +# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set +# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set +CONFIG_MTD_CFI_GEOMETRY=y +# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_2 is not set +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +# CONFIG_MTD_CFI_I1 is not set +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +CONFIG_MTD_CFI_INTELEXT=y +# CONFIG_MTD_CFI_AMDSTD is not set +# CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_XIP is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PHYSMAP is not set +# CONFIG_MTD_ARM_INTEGRATOR is not set +# CONFIG_MTD_EDB7312 is not set +# CONFIG_MTD_SHARP_SL is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set + +# +# NAND Flash Device Drivers +# +# CONFIG_MTD_NAND is not set + +# +# Plug and Play support +# + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set +# CONFIG_BLK_DEV_LOOP is not set +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_RAM is not set +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Networking support +# +CONFIG_NET=y + +# +# Networking options +# +# CONFIG_PACKET is not set +# CONFIG_NETLINK_DEV is not set +CONFIG_UNIX=y +# CONFIG_NET_KEY is not set +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +# CONFIG_IP_PNP_BOOTP is not set +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +CONFIG_IP_TCPDIAG=y +# CONFIG_IP_TCPDIAG_IPV6 is not set +# CONFIG_IPV6 is not set +# CONFIG_NETFILTER is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +CONFIG_SMC91X=y + +# +# Ethernet (1000 Mbit) +# + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set + +# +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=y +CONFIG_BLK_DEV_IDE=y + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_BLK_DEV_IDEDISK=y +# CONFIG_IDEDISK_MULTI_MODE is not set +# CONFIG_BLK_DEV_IDECD is not set +# CONFIG_BLK_DEV_IDETAPE is not set +# CONFIG_BLK_DEV_IDEFLOPPY is not set +# CONFIG_IDE_TASK_IOCTL is not set + +# +# IDE chipset support/bugfixes +# +# CONFIG_IDE_GENERIC is not set +# CONFIG_IDE_ARM is not set +# CONFIG_BLK_DEV_IDEDMA is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Input device support +# +CONFIG_INPUT=y + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input I/O drivers +# +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y +CONFIG_SERIO=y +# CONFIG_SERIO_SERPORT is not set +# CONFIG_SERIO_CT82C710 is not set +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_PXA=y +CONFIG_SERIAL_PXA_CONSOLE=y +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT3_FS is not set +# 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 +# CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +# CONFIG_VFAT_FS is not set +CONFIG_FAT_DEFAULT_CODEPAGE=437 +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_SYSFS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVPTS_FS_XATTR is not set +# CONFIG_TMPFS is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +# CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set +# CONFIG_CRAMFS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=y +# CONFIG_NFS_V3 is not set +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set +# CONFIG_NFSD is not set +CONFIG_ROOT_NFS=y +CONFIG_LOCKD=y +CONFIG_SUNRPC=y +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set +# CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y + +# +# Native Language Support +# +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +# CONFIG_NLS_CODEPAGE_437 is not set +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set +CONFIG_NLS_ISO8859_1=y +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_UTF8 is not set + +# +# Profiling support +# +# CONFIG_PROFILING is not set + +# +# Graphics support +# +CONFIG_FB=y +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set +CONFIG_FB_PXA=y +# CONFIG_FB_PXA_PARAMETERS is not set +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y + +# +# Logo configuration +# +CONFIG_LOGO=y +CONFIG_LOGO_LINUX_MONO=y +CONFIG_LOGO_LINUX_VGA16=y +CONFIG_LOGO_LINUX_CLUT224=y +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# Misc devices +# + +# +# USB support +# +# CONFIG_USB is not set +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set + +# +# 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 + +# +# Kernel hacking +# +CONFIG_DEBUG_KERNEL=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_BUGVERBOSE=y +CONFIG_DEBUG_INFO=y +# CONFIG_DEBUG_FS is not set +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_WAITQ is not set +CONFIG_DEBUG_ERRORS=y +CONFIG_DEBUG_LL=y +# CONFIG_DEBUG_ICEDCC is not set + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# + +# +# Library routines +# +# CONFIG_CRC_CCITT is not set +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y diff -Nru a/arch/arm/configs/s3c2410_defconfig b/arch/arm/configs/s3c2410_defconfig --- a/arch/arm/configs/s3c2410_defconfig 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/configs/s3c2410_defconfig 2005-03-07 14:54:16 -08:00 @@ -87,6 +87,7 @@ CONFIG_ARCH_BAST=y CONFIG_ARCH_H1940=y CONFIG_ARCH_SMDK2410=y +CONFIG_ARCH_S3C2440=y CONFIG_MACH_VR1000=y CONFIG_MACH_RX3715=y CONFIG_CPU_S3C2410=y diff -Nru a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S --- a/arch/arm/kernel/calls.S 2005-03-07 14:54:18 -08:00 +++ b/arch/arm/kernel/calls.S 2005-03-07 14:54:18 -08:00 @@ -1,7 +1,7 @@ /* * linux/arch/arm/kernel/calls.S * - * Copyright (C) 1995-2004 Russell King + * Copyright (C) 1995-2005 Russell King * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -10,7 +10,7 @@ * This file is included twice in entry-common.S */ #ifndef NR_syscalls -#define NR_syscalls 288 +#define NR_syscalls 320 #else __syscall_start: @@ -295,6 +295,37 @@ .long sys_mq_notify .long sys_mq_getsetattr /* 280 */ .long sys_waitid + .long sys_socket + .long sys_bind + .long sys_connect + .long sys_listen +/* 285 */ .long sys_accept + .long sys_getsockname + .long sys_getpeername + .long sys_socketpair + .long sys_send +/* 290 */ .long sys_sendto + .long sys_recv + .long sys_recvfrom + .long sys_shutdown + .long sys_setsockopt +/* 295 */ .long sys_getsockopt + .long sys_sendmsg + .long sys_recvmsg + .long sys_semop + .long sys_semget +/* 300 */ .long sys_semctl + .long sys_msgsnd + .long sys_msgrcv + .long sys_msgget + .long sys_msgctl +/* 305 */ .long sys_shmat + .long sys_shmdt + .long sys_shmget + .long sys_shmctl + .long sys_add_key +/* 310 */ .long sys_request_key + .long sys_keyctl __syscall_end: .rept NR_syscalls - (__syscall_end - __syscall_start) / 4 diff -Nru a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c --- a/arch/arm/kernel/ecard.c 2005-03-07 14:54:18 -08:00 +++ b/arch/arm/kernel/ecard.c 2005-03-07 14:54:18 -08:00 @@ -85,27 +85,21 @@ }; asmlinkage extern int -ecard_loader_reset(volatile unsigned char *pa, loader_t loader); +ecard_loader_reset(unsigned long base, loader_t loader); asmlinkage extern int -ecard_loader_read(int off, volatile unsigned char *pa, loader_t loader); +ecard_loader_read(int off, unsigned long base, loader_t loader); -static const struct ecard_id * -ecard_match_device(const struct ecard_id *ids, struct expansion_card *ec); - -static inline unsigned short -ecard_getu16(unsigned char *v) +static inline unsigned short ecard_getu16(unsigned char *v) { return v[0] | v[1] << 8; } -static inline signed long -ecard_gets24(unsigned char *v) +static inline signed long ecard_gets24(unsigned char *v) { return v[0] | v[1] << 8 | v[2] << 16 | ((v[2] & 0x80) ? 0xff000000 : 0); } -static inline ecard_t * -slot_to_ecard(unsigned int slot) +static inline ecard_t *slot_to_ecard(unsigned int slot) { return slot < MAX_ECARDS ? slot_to_expcard[slot] : NULL; } @@ -122,26 +116,31 @@ * From a security standpoint, we trust the card vendors. This * may be a misplaced trust. */ -#define BUS_ADDR(x) ((((unsigned long)(x)) << 2) + IO_BASE) -#define POD_INT_ADDR(x) ((volatile unsigned char *)\ - ((BUS_ADDR((x)) - IO_BASE) + IO_START)) - static void ecard_task_reset(struct ecard_request *req) { struct expansion_card *ec = req->ec; - if (ec->loader) - ecard_loader_reset(POD_INT_ADDR(ec->podaddr), ec->loader); + struct resource *res; + + res = ec->slot_no == 8 + ? &ec->resource[ECARD_RES_MEMC] + : ec->type == ECARD_EASI + ? &ec->resource[ECARD_RES_EASI] + : &ec->resource[ECARD_RES_IOCSYNC]; + + ecard_loader_reset(res->start, ec->loader); } static void ecard_task_readbytes(struct ecard_request *req) { - unsigned char *buf = (unsigned char *)req->buffer; - volatile unsigned char *base_addr = - (volatile unsigned char *)POD_INT_ADDR(req->ec->podaddr); + struct expansion_card *ec = req->ec; + unsigned char *buf = req->buffer; unsigned int len = req->length; unsigned int off = req->address; - if (req->ec->slot_no == 8) { + if (ec->slot_no == 8) { + void __iomem *base = (void __iomem *) + ec->resource[ECARD_RES_MEMC].start; + /* * The card maintains an index which increments the address * into a 4096-byte page on each access. We need to keep @@ -161,7 +160,7 @@ * greater than the offset, reset the hardware index counter. */ if (off == 0 || index > off) { - *base_addr = 0; + writeb(0, base); index = 0; } @@ -170,21 +169,24 @@ * required offset. The read bytes are discarded. */ while (index < off) { - unsigned char byte; - byte = base_addr[page]; + readb(base + page); index += 1; } while (len--) { - *buf++ = base_addr[page]; + *buf++ = readb(base + page); index += 1; } } else { + unsigned long base = (ec->type == ECARD_EASI + ? &ec->resource[ECARD_RES_EASI] + : &ec->resource[ECARD_RES_IOCSYNC])->start; + void __iomem *pbase = (void __iomem *)base; - if (!req->use_loader || !req->ec->loader) { + if (!req->use_loader || !ec->loader) { off *= 4; while (len--) { - *buf++ = base_addr[off]; + *buf++ = readb(pbase + off); off += 4; } } else { @@ -194,8 +196,8 @@ * expansion card loader programs. */ *(unsigned long *)0x108 = 0; - *buf++ = ecard_loader_read(off++, base_addr, - req->ec->loader); + *buf++ = ecard_loader_read(off++, base, + ec->loader); } } } @@ -406,7 +408,7 @@ static int ecard_def_irq_pending(ecard_t *ec) { - return !ec->irqmask || ec->irqaddr[0] & ec->irqmask; + return !ec->irqmask || readb(ec->irqaddr) & ec->irqmask; } static void ecard_def_fiq_enable(ecard_t *ec, int fiqnr) @@ -421,7 +423,7 @@ static int ecard_def_fiq_pending(ecard_t *ec) { - return !ec->fiqmask || ec->fiqaddr[0] & ec->fiqmask; + return !ec->fiqmask || readb(ec->fiqaddr) & ec->fiqmask; } static expansioncard_ops_t ecard_default_ops = { @@ -522,7 +524,7 @@ ec->ops->irqpending(ec) ? "" : "not "); else printk("irqaddr %p, mask = %02X, status = %02X\n", - ec->irqaddr, ec->irqmask, *ec->irqaddr); + ec->irqaddr, ec->irqmask, readb(ec->irqaddr)); } } @@ -675,7 +677,7 @@ #define IO_EC_MEMC8_BASE 0 #endif -unsigned int ecard_address(ecard_t *ec, card_type_t type, card_speed_t speed) +unsigned int __ecard_address(ecard_t *ec, card_type_t type, card_speed_t speed) { unsigned long address = 0; int slot = ec->slot_no; @@ -779,55 +781,89 @@ get_ecard_dev_info); } -#define ec_set_resource(ec,nr,st,sz,flg) \ +#define ec_set_resource(ec,nr,st,sz) \ do { \ (ec)->resource[nr].name = ec->dev.bus_id; \ (ec)->resource[nr].start = st; \ (ec)->resource[nr].end = (st) + (sz) - 1; \ - (ec)->resource[nr].flags = flg; \ + (ec)->resource[nr].flags = IORESOURCE_MEM; \ } while (0) -static void __init ecard_init_resources(struct expansion_card *ec) +static void __init ecard_free_card(struct expansion_card *ec) +{ + int i; + + for (i = 0; i < ECARD_NUM_RESOURCES; i++) + if (ec->resource[i].flags) + release_resource(&ec->resource[i]); + + kfree(ec); +} + +static struct expansion_card *__init ecard_alloc_card(int type, int slot) { - unsigned long base = PODSLOT_IOC4_BASE; - unsigned int slot = ec->slot_no; + struct expansion_card *ec; + unsigned long base; int i; + ec = kmalloc(sizeof(ecard_t), GFP_KERNEL); + if (!ec) { + ec = ERR_PTR(-ENOMEM); + goto nomem; + } + + memset(ec, 0, sizeof(ecard_t)); + + ec->slot_no = slot; + ec->type = type; + ec->irq = NO_IRQ; + ec->fiq = NO_IRQ; + ec->dma = NO_DMA; + ec->ops = &ecard_default_ops; + + snprintf(ec->dev.bus_id, sizeof(ec->dev.bus_id), "ecard%d", slot); + ec->dev.parent = NULL; + ec->dev.bus = &ecard_bus_type; + ec->dev.dma_mask = &ec->dma_mask; + ec->dma_mask = (u64)0xffffffff; + if (slot < 4) { ec_set_resource(ec, ECARD_RES_MEMC, PODSLOT_MEMC_BASE + (slot << 14), - PODSLOT_MEMC_SIZE, IORESOURCE_MEM); - base = PODSLOT_IOC0_BASE; - } + PODSLOT_MEMC_SIZE); + base = PODSLOT_IOC0_BASE + (slot << 14); + } else + base = PODSLOT_IOC4_BASE + ((slot - 4) << 14); #ifdef CONFIG_ARCH_RPC if (slot < 8) { ec_set_resource(ec, ECARD_RES_EASI, PODSLOT_EASI_BASE + (slot << 24), - PODSLOT_EASI_SIZE, IORESOURCE_MEM); + PODSLOT_EASI_SIZE); } if (slot == 8) { - ec_set_resource(ec, ECARD_RES_MEMC, NETSLOT_BASE, - NETSLOT_SIZE, IORESOURCE_MEM); + ec_set_resource(ec, ECARD_RES_MEMC, NETSLOT_BASE, NETSLOT_SIZE); } else #endif - for (i = 0; i <= ECARD_RES_IOCSYNC - ECARD_RES_IOCSLOW; i++) { + for (i = 0; i <= ECARD_RES_IOCSYNC - ECARD_RES_IOCSLOW; i++) ec_set_resource(ec, i + ECARD_RES_IOCSLOW, - base + (slot << 14) + (i << 19), - PODSLOT_IOC_SIZE, IORESOURCE_MEM); - } + base + (i << 19), PODSLOT_IOC_SIZE); for (i = 0; i < ECARD_NUM_RESOURCES; i++) { - if (ec->resource[i].start && + if (ec->resource[i].flags && request_resource(&iomem_resource, &ec->resource[i])) { printk(KERN_ERR "%s: resource(s) not available\n", ec->dev.bus_id); ec->resource[i].end -= ec->resource[i].start; ec->resource[i].start = 0; + ec->resource[i].flags = 0; } } + + nomem: + return ec; } static ssize_t ecard_show_irq(struct device *dev, char *buf) @@ -836,16 +872,12 @@ return sprintf(buf, "%u\n", ec->irq); } -static DEVICE_ATTR(irq, S_IRUGO, ecard_show_irq, NULL); - static ssize_t ecard_show_dma(struct device *dev, char *buf) { struct expansion_card *ec = ECARD_DEV(dev); return sprintf(buf, "%u\n", ec->dma); } -static DEVICE_ATTR(dma, S_IRUGO, ecard_show_dma, NULL); - static ssize_t ecard_show_resources(struct device *dev, char *buf) { struct expansion_card *ec = ECARD_DEV(dev); @@ -861,23 +893,33 @@ return str - buf; } -static DEVICE_ATTR(resource, S_IRUGO, ecard_show_resources, NULL); - static ssize_t ecard_show_vendor(struct device *dev, char *buf) { struct expansion_card *ec = ECARD_DEV(dev); return sprintf(buf, "%u\n", ec->cid.manufacturer); } -static DEVICE_ATTR(vendor, S_IRUGO, ecard_show_vendor, NULL); - static ssize_t ecard_show_device(struct device *dev, char *buf) { struct expansion_card *ec = ECARD_DEV(dev); return sprintf(buf, "%u\n", ec->cid.product); } -static DEVICE_ATTR(device, S_IRUGO, ecard_show_device, NULL); +static ssize_t ecard_show_type(struct device *dev, char *buf) +{ + struct expansion_card *ec = ECARD_DEV(dev); + return sprintf(buf, "%s\n", ec->type == ECARD_EASI ? "EASI" : "IOC"); +} + +static struct device_attribute ecard_dev_attrs[] = { + __ATTR(device, S_IRUGO, ecard_show_device, NULL), + __ATTR(dma, S_IRUGO, ecard_show_dma, NULL), + __ATTR(irq, S_IRUGO, ecard_show_irq, NULL), + __ATTR(resource, S_IRUGO, ecard_show_resources, NULL), + __ATTR(type, S_IRUGO, ecard_show_type, NULL), + __ATTR(vendor, S_IRUGO, ecard_show_vendor, NULL), + __ATTR_NULL, +}; int ecard_request_resources(struct expansion_card *ec) @@ -927,21 +969,13 @@ ecard_t **ecp; ecard_t *ec; struct ex_ecid cid; - int i, rc = -ENOMEM; + int i, rc; - ec = kmalloc(sizeof(ecard_t), GFP_KERNEL); - if (!ec) + ec = ecard_alloc_card(type, slot); + if (IS_ERR(ec)) { + rc = PTR_ERR(ec); goto nomem; - - memset(ec, 0, sizeof(ecard_t)); - - ec->slot_no = slot; - ec->type = type; - ec->irq = NO_IRQ; - ec->fiq = NO_IRQ; - ec->dma = NO_DMA; - ec->card_desc = NULL; - ec->ops = &ecard_default_ops; + } rc = -ENODEV; if ((ec->podaddr = ecard_address(ec, type, ECARD_SYNC)) == 0) @@ -964,7 +998,7 @@ ec->cid.fiqmask = cid.r_fiqmask; ec->cid.fiqoff = ecard_gets24(cid.r_fiqoff); ec->fiqaddr = - ec->irqaddr = (unsigned char *)ioaddr(ec->podaddr); + ec->irqaddr = (void __iomem *)ioaddr(ec->podaddr); if (ec->cid.is) { ec->irqmask = ec->cid.irqmask; @@ -983,14 +1017,6 @@ break; } - snprintf(ec->dev.bus_id, sizeof(ec->dev.bus_id), "ecard%d", slot); - ec->dev.parent = NULL; - ec->dev.bus = &ecard_bus_type; - ec->dev.dma_mask = &ec->dma_mask; - ec->dma_mask = (u64)0xffffffff; - - ecard_init_resources(ec); - /* * hook the interrupt handlers */ @@ -1017,17 +1043,12 @@ slot_to_expcard[slot] = ec; device_register(&ec->dev); - device_create_file(&ec->dev, &dev_attr_dma); - device_create_file(&ec->dev, &dev_attr_irq); - device_create_file(&ec->dev, &dev_attr_resource); - device_create_file(&ec->dev, &dev_attr_vendor); - device_create_file(&ec->dev, &dev_attr_device); return 0; -nodev: - kfree(ec); -nomem: + nodev: + ecard_free_card(ec); + nomem: return rc; } @@ -1128,9 +1149,15 @@ if (drv->shutdown) drv->shutdown(ec); ecard_release(ec); - req.fn = ecard_task_reset; - req.ec = ec; - ecard_call(&req); + + /* + * If this card has a loader, call the reset handler. + */ + if (ec->loader) { + req.fn = ecard_task_reset; + req.ec = ec; + ecard_call(&req); + } } int ecard_register_driver(struct ecard_driver *drv) @@ -1164,8 +1191,9 @@ } struct bus_type ecard_bus_type = { - .name = "ecard", - .match = ecard_match, + .name = "ecard", + .dev_attrs = ecard_dev_attrs, + .match = ecard_match, }; static int ecard_bus_init(void) @@ -1176,7 +1204,7 @@ postcore_initcall(ecard_bus_init); EXPORT_SYMBOL(ecard_readchunk); -EXPORT_SYMBOL(ecard_address); +EXPORT_SYMBOL(__ecard_address); EXPORT_SYMBOL(ecard_register_driver); EXPORT_SYMBOL(ecard_remove_driver); EXPORT_SYMBOL(ecard_bus_type); diff -Nru a/arch/arm/kernel/fiq.c b/arch/arm/kernel/fiq.c --- a/arch/arm/kernel/fiq.c 2005-03-07 14:54:18 -08:00 +++ b/arch/arm/kernel/fiq.c 2005-03-07 14:54:18 -08:00 @@ -46,12 +46,6 @@ #include #include -#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -#warning This file requires GCC 3.3.x or older to build. Alternatively, -#warning please talk to GCC people to resolve the issues with the -#warning assembly clobber list. -#endif - static unsigned long no_fiq_insn; /* Default reacquire function @@ -91,44 +85,43 @@ /* * Taking an interrupt in FIQ mode is death, so both these functions - * disable irqs for the duration. + * disable irqs for the duration. Note - these functions are almost + * entirely coded in assembly. */ -void set_fiq_regs(struct pt_regs *regs) +void __attribute__((naked)) set_fiq_regs(struct pt_regs *regs) { register unsigned long tmp; - __asm__ volatile ( - "mrs %0, cpsr\n\ + asm volatile ( + "mov ip, sp\n\ + stmfd sp!, {fp, ip, lr, pc}\n\ + sub fp, ip, #4\n\ + mrs %0, cpsr\n\ msr cpsr_c, %2 @ select FIQ mode\n\ mov r0, r0\n\ ldmia %1, {r8 - r14}\n\ msr cpsr_c, %0 @ return to SVC mode\n\ - mov r0, r0" + mov r0, r0\n\ + ldmea fp, {fp, sp, pc}" : "=&r" (tmp) - : "r" (®s->ARM_r8), "I" (PSR_I_BIT | PSR_F_BIT | FIQ_MODE) - /* These registers aren't modified by the above code in a way - visible to the compiler, but we mark them as clobbers anyway - so that GCC won't put any of the input or output operands in - them. */ - : "r8", "r9", "r10", "r11", "r12", "r13", "r14"); + : "r" (®s->ARM_r8), "I" (PSR_I_BIT | PSR_F_BIT | FIQ_MODE)); } -void get_fiq_regs(struct pt_regs *regs) +void __attribute__((naked)) get_fiq_regs(struct pt_regs *regs) { register unsigned long tmp; - __asm__ volatile ( - "mrs %0, cpsr\n\ + asm volatile ( + "mov ip, sp\n\ + stmfd sp!, {fp, ip, lr, pc}\n\ + sub fp, ip, #4\n\ + mrs %0, cpsr\n\ msr cpsr_c, %2 @ select FIQ mode\n\ mov r0, r0\n\ stmia %1, {r8 - r14}\n\ msr cpsr_c, %0 @ return to SVC mode\n\ - mov r0, r0" + mov r0, r0\n\ + ldmea fp, {fp, sp, pc}" : "=&r" (tmp) - : "r" (®s->ARM_r8), "I" (PSR_I_BIT | PSR_F_BIT | FIQ_MODE) - /* These registers aren't modified by the above code in a way - visible to the compiler, but we mark them as clobbers anyway - so that GCC won't put any of the input or output operands in - them. */ - : "r8", "r9", "r10", "r11", "r12", "r13", "r14"); + : "r" (®s->ARM_r8), "I" (PSR_I_BIT | PSR_F_BIT | FIQ_MODE)); } int claim_fiq(struct fiq_handler *f) diff -Nru a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c --- a/arch/arm/kernel/irq.c 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/kernel/irq.c 2005-03-07 14:54:16 -08:00 @@ -56,6 +56,13 @@ void (*init_arch_irq)(void) __initdata = NULL; /* + * No architecture-specific irq_finish function defined in arm/arch/irqs.h. + */ +#ifndef irq_finish +#define irq_finish(irq) do { } while (0) +#endif + +/* * Dummy mask/unmask handler */ void dummy_mask_unmask_irq(unsigned int irq) @@ -531,6 +538,8 @@ */ if (!list_empty(&irq_pending)) do_pending_irqs(regs); + + irq_finish(irq); spin_unlock(&irq_controller_lock); irq_exit(); diff -Nru a/arch/arm/kernel/sys_arm.c b/arch/arm/kernel/sys_arm.c --- a/arch/arm/kernel/sys_arm.c 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/kernel/sys_arm.c 2005-03-07 14:54:16 -08:00 @@ -230,6 +230,18 @@ } } +asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg, + unsigned long __user *addr) +{ + unsigned long ret; + long err; + + err = do_shmat(shmid, shmaddr, shmflg, &ret); + if (err == 0) + err = put_user(ret, addr); + return err; +} + /* Fork a new task - this creates a new program thread. * This is called indirectly via a small wrapper */ diff -Nru a/arch/arm/mach-ebsa110/io.c b/arch/arm/mach-ebsa110/io.c --- a/arch/arm/mach-ebsa110/io.c 2005-03-07 14:54:18 -08:00 +++ b/arch/arm/mach-ebsa110/io.c 2005-03-07 14:54:18 -08:00 @@ -153,9 +153,9 @@ * The SuperIO registers use sane addressing techniques... */ if (SUPERIO_PORT(port)) - ret = __raw_readb(ISAIO_BASE + (port << 2)); + ret = __raw_readb((void __iomem *)ISAIO_BASE + (port << 2)); else { - void __iomem *a = ISAIO_BASE + ((port & ~1) << 1); + void __iomem *a = (void __iomem *)ISAIO_BASE + ((port & ~1) << 1); /* * Shame nothing else does @@ -174,45 +174,33 @@ */ u8 __inb16(unsigned int port) { - u32 ret; + unsigned int offset; /* * The SuperIO registers use sane addressing techniques... */ if (SUPERIO_PORT(port)) - ret = __raw_readb(ISAIO_BASE + (port << 2)); - else { - void __iomem *a = ISAIO_BASE + ((port & ~1) << 1); + offset = port << 2; + else + offset = (port & ~1) << 1 | (port & 1); - /* - * Shame nothing else does - */ - ret = __raw_readb(a + (port & 1)); - } - return ret; + return __raw_readb((void __iomem *)ISAIO_BASE + offset); } u16 __inw(unsigned int port) { - u32 ret; + unsigned int offset; /* * The SuperIO registers use sane addressing techniques... */ if (SUPERIO_PORT(port)) - ret = __raw_readw(ISAIO_BASE + (port << 2)); + offset = port << 2; else { - void __iomem *a = ISAIO_BASE + ((port & ~1) << 1); - - /* - * Shame nothing else does - */ - if (port & 1) - BUG(); - - ret = __raw_readw(a); + offset = port << 1; + BUG_ON(port & 1); } - return ret; + return __raw_readw((void __iomem *)ISAIO_BASE + offset); } /* @@ -225,7 +213,7 @@ if (SUPERIO_PORT(port) || port & 3) BUG(); - a = ISAIO_BASE + (port << 1); + a = (void __iomem *)ISAIO_BASE + ((port & ~1) << 1); return __raw_readw(a) | __raw_readw(a + 4) << 16; } @@ -241,9 +229,9 @@ * The SuperIO registers use sane addressing techniques... */ if (SUPERIO_PORT(port)) - __raw_writeb(val, ISAIO_BASE + (port << 2)); + __raw_writeb(val, (void __iomem *)ISAIO_BASE + (port << 2)); else { - void __iomem *a = ISAIO_BASE + ((port & ~1) << 1); + void __iomem *a = (void __iomem *)ISAIO_BASE + ((port & ~1) << 1); /* * Shame nothing else does @@ -257,37 +245,33 @@ void __outb16(u8 val, unsigned int port) { + unsigned int offset; + /* * The SuperIO registers use sane addressing techniques... */ if (SUPERIO_PORT(port)) - __raw_writeb(val, ISAIO_BASE + (port << 2)); - else { - void __iomem *a = ISAIO_BASE + ((port & ~1) << 1); + offset = port << 2; + else + offset = (port & ~1) << 1 | (port & 1); - /* - * Shame nothing else does - */ - __raw_writeb(val, a + (port & 1)); - } + __raw_writeb(val, (void __iomem *)ISAIO_BASE + offset); } void __outw(u16 val, unsigned int port) { - u32 off; + unsigned int offset; /* * The SuperIO registers use sane addressing techniques... */ if (SUPERIO_PORT(port)) - off = port << 2; + offset = port << 2; else { - off = port << 1; - if (port & 1) - BUG(); - + offset = port << 1; + BUG_ON(port & 1); } - __raw_writew(val, ISAIO_BASE + off); + __raw_writew(val, (void __iomem *)ISAIO_BASE + offset); } void __outl(u32 val, unsigned int port) @@ -300,13 +284,6 @@ EXPORT_SYMBOL(__outw); EXPORT_SYMBOL(__outl); -extern void __arch_writesb(unsigned long virt, const void *from, int len); -extern void __arch_writesw(unsigned long virt, const void *from, int len); -extern void __arch_writesl(unsigned long virt, const void *from, int len); -extern void __arch_readsb(unsigned long virt, void *from, int len); -extern void __arch_readsw(unsigned long virt, void *from, int len); -extern void __arch_readsl(unsigned long virt, void *from, int len); - void outsb(unsigned int port, const void *from, int len) { u32 off; @@ -319,7 +296,7 @@ BUG(); } - __raw_writesb(ISAIO_BASE + off, from, len); + __raw_writesb((void __iomem *)ISAIO_BASE + off, from, len); } void insb(unsigned int port, void *from, int len) @@ -334,7 +311,7 @@ BUG(); } - __raw_readsb(ISAIO_BASE + off, from, len); + __raw_readsb((void __iomem *)ISAIO_BASE + off, from, len); } EXPORT_SYMBOL(outsb); @@ -352,7 +329,7 @@ BUG(); } - __raw_writesw(ISAIO_BASE + off, from, len); + __raw_writesw((void __iomem *)ISAIO_BASE + off, from, len); } void insw(unsigned int port, void *from, int len) @@ -367,7 +344,7 @@ BUG(); } - __raw_readsw(ISAIO_BASE + off, from, len); + __raw_readsw((void __iomem *)ISAIO_BASE + off, from, len); } EXPORT_SYMBOL(outsw); @@ -384,7 +361,7 @@ if (SUPERIO_PORT(port) || port & 3) BUG(); - __raw_writesw(ISAIO_BASE + off, from, len << 1); + __raw_writesw((void __iomem *)ISAIO_BASE + off, from, len << 1); } void insl(unsigned int port, void *from, int len) @@ -394,7 +371,7 @@ if (SUPERIO_PORT(port) || port & 3) BUG(); - __raw_readsw(ISAIO_BASE + off, from, len << 1); + __raw_readsw((void __iomem *)ISAIO_BASE + off, from, len << 1); } EXPORT_SYMBOL(outsl); diff -Nru a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c --- a/arch/arm/mach-ixp2000/core.c 2005-03-07 14:54:18 -08:00 +++ b/arch/arm/mach-ixp2000/core.c 2005-03-07 14:54:18 -08:00 @@ -79,31 +79,11 @@ /************************************************************************* * Chip specific mappings shared by all IXP2000 systems *************************************************************************/ -static struct map_desc ixp2000_small_io_desc[] __initdata = { +static struct map_desc ixp2000_io_desc[] __initdata = { { - .virtual = IXP2000_GLOBAL_REG_VIRT_BASE, - .physical = IXP2000_GLOBAL_REG_PHYS_BASE, - .length = IXP2000_GLOBAL_REG_SIZE, - .type = MT_DEVICE - }, { - .virtual = IXP2000_GPIO_VIRT_BASE, - .physical = IXP2000_GPIO_PHYS_BASE, - .length = IXP2000_GPIO_SIZE, - .type = MT_DEVICE - }, { - .virtual = IXP2000_TIMER_VIRT_BASE, - .physical = IXP2000_TIMER_PHYS_BASE, - .length = IXP2000_TIMER_SIZE, - .type = MT_DEVICE - }, { - .virtual = IXP2000_UART_VIRT_BASE, - .physical = IXP2000_UART_PHYS_BASE, - .length = IXP2000_UART_SIZE, - .type = MT_DEVICE - }, { - .virtual = IXP2000_SLOWPORT_CSR_VIRT_BASE, - .physical = IXP2000_SLOWPORT_CSR_PHYS_BASE, - .length = IXP2000_SLOWPORT_CSR_SIZE, + .virtual = IXP2000_CAP_VIRT_BASE, + .physical = IXP2000_CAP_PHYS_BASE, + .length = IXP2000_CAP_SIZE, .type = MT_DEVICE }, { .virtual = IXP2000_INTCTL_VIRT_BASE, @@ -115,11 +95,7 @@ .physical = IXP2000_PCI_CREG_PHYS_BASE, .length = IXP2000_PCI_CREG_SIZE, .type = MT_DEVICE - } -}; - -static struct map_desc ixp2000_large_io_desc[] __initdata = { - { + }, { .virtual = IXP2000_PCI_CSR_VIRT_BASE, .physical = IXP2000_PCI_CSR_PHYS_BASE, .length = IXP2000_PCI_CSR_SIZE, @@ -157,8 +133,7 @@ void __init ixp2000_map_io(void) { - iotable_init(ixp2000_small_io_desc, ARRAY_SIZE(ixp2000_small_io_desc)); - iotable_init(ixp2000_large_io_desc, ARRAY_SIZE(ixp2000_large_io_desc)); + iotable_init(ixp2000_io_desc, ARRAY_SIZE(ixp2000_io_desc)); early_serial_setup(&ixp2000_serial_port); /* Set slowport to 8-bit mode. */ diff -Nru a/arch/arm/mach-ixp4xx/Makefile b/arch/arm/mach-ixp4xx/Makefile --- a/arch/arm/mach-ixp4xx/Makefile 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mach-ixp4xx/Makefile 2005-03-07 14:54:16 -08:00 @@ -7,6 +7,5 @@ obj-$(CONFIG_ARCH_IXDP4XX) += ixdp425-pci.o ixdp425-setup.o obj-$(CONFIG_MACH_IXDPG425) += ixdpg425-pci.o coyote-setup.o obj-$(CONFIG_ARCH_ADI_COYOTE) += coyote-pci.o coyote-setup.o -obj-$(CONFIG_ARCH_PRPMC1100) += prpmc1100-pci.o prpmc1100-setup.o obj-$(CONFIG_MACH_GTWX5715) += gtwx5715-pci.o gtwx5715-setup.o diff -Nru a/arch/arm/mach-ixp4xx/coyote-setup.c b/arch/arm/mach-ixp4xx/coyote-setup.c --- a/arch/arm/mach-ixp4xx/coyote-setup.c 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mach-ixp4xx/coyote-setup.c 2005-03-07 14:54:16 -08:00 @@ -3,7 +3,7 @@ * * Board setup for ADI Engineering and IXDGP425 boards * - * Copyright (C) 2003-2004 MontaVista Software, Inc. + * Copyright (C) 2003-2005 MontaVista Software, Inc. * * Author: Deepak Saxena */ @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include @@ -24,39 +24,8 @@ #include #include -#ifdef __ARMEB__ -#define REG_OFFSET 3 -#else -#define REG_OFFSET 0 -#endif - -/* - * Only one serial port is connected on the Coyote & IXDPG425 - */ -static struct uart_port coyote_serial_port = { - .membase = (char*)(IXP4XX_UART2_BASE_VIRT + REG_OFFSET), - .mapbase = (IXP4XX_UART2_BASE_PHYS), - .irq = IRQ_IXP4XX_UART2, - .flags = UPF_SKIP_TEST, - .iotype = UPIO_MEM, - .regshift = 2, - .uartclk = IXP4XX_UART_XTAL, - .line = 0, - .type = PORT_XSCALE, - .fifosize = 32 -}; - void __init coyote_map_io(void) { - if (machine_is_ixdpg425()) { - coyote_serial_port.membase = - (char*)(IXP4XX_UART1_BASE_VIRT + REG_OFFSET); - coyote_serial_port.mapbase = IXP4XX_UART1_BASE_PHYS; - coyote_serial_port.irq = IRQ_IXP4XX_UART1; - } - - early_serial_setup(&coyote_serial_port); - ixp4xx_map_io(); } @@ -81,14 +50,49 @@ .resource = &coyote_flash_resource, }; +static struct resource coyote_uart_resource = { + .start = IXP4XX_UART2_BASE_PHYS, + .end = IXP4XX_UART2_BASE_PHYS + 0x0fff, + .flags = IORESOURCE_MEM, +}; + +static struct plat_serial8250_port coyote_uart_data = { + .mapbase = IXP4XX_UART2_BASE_PHYS, + .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET, + .irq = IRQ_IXP4XX_UART2, + .flags = UPF_BOOT_AUTOCONF, + .iotype = UPIO_MEM, + .regshift = 2, + .uartclk = IXP4XX_UART_XTAL, +}; + +static struct platform_device coyote_uart = { + .name = "serial8250", + .id = 0, + .dev = { + .platform_data = &coyote_uart_data, + }, + .num_resources = 1, + .resource = &coyote_uart_resource, +}; + static struct platform_device *coyote_devices[] __initdata = { - &coyote_flash + &coyote_flash, + &coyote_uart }; static void __init coyote_init(void) { *IXP4XX_EXP_CS0 |= IXP4XX_FLASH_WRITABLE; *IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0; + + if (machine_is_ixdpg425()) { + coyote_uart_data.membase = + (char*)(IXP4XX_UART1_BASE_VIRT + REG_OFFSET); + coyote_uart_data.mapbase = IXP4XX_UART1_BASE_PHYS; + coyote_uart_data.irq = IRQ_IXP4XX_UART1; + } + ixp4xx_sys_init(); platform_add_devices(coyote_devices, ARRAY_SIZE(coyote_devices)); diff -Nru a/arch/arm/mach-ixp4xx/ixdp425-setup.c b/arch/arm/mach-ixp4xx/ixdp425-setup.c --- a/arch/arm/mach-ixp4xx/ixdp425-setup.c 2005-03-07 14:54:17 -08:00 +++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c 2005-03-07 14:54:17 -08:00 @@ -3,7 +3,7 @@ * * IXDP425/IXCDP1100 board-setup * - * Copyright (C) 2003-2004 MontaVista Software, Inc. + * Copyright (C) 2003-2005 MontaVista Software, Inc. * * Author: Deepak Saxena */ @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include @@ -24,46 +24,8 @@ #include #include -#ifdef __ARMEB__ -#define REG_OFFSET 3 -#else -#define REG_OFFSET 0 -#endif - -/* - * IXDP425 uses both chipset serial ports - */ -static struct uart_port ixdp425_serial_ports[] = { - { - .membase = (char*)(IXP4XX_UART1_BASE_VIRT + REG_OFFSET), - .mapbase = (IXP4XX_UART1_BASE_PHYS), - .irq = IRQ_IXP4XX_UART1, - .flags = UPF_SKIP_TEST, - .iotype = UPIO_MEM, - .regshift = 2, - .uartclk = IXP4XX_UART_XTAL, - .line = 0, - .type = PORT_XSCALE, - .fifosize = 32 - } , { - .membase = (char*)(IXP4XX_UART2_BASE_VIRT + REG_OFFSET), - .mapbase = (IXP4XX_UART2_BASE_PHYS), - .irq = IRQ_IXP4XX_UART2, - .flags = UPF_SKIP_TEST, - .iotype = UPIO_MEM, - .regshift = 2, - .uartclk = IXP4XX_UART_XTAL, - .line = 1, - .type = PORT_XSCALE, - .fifosize = 32 - } -}; - void __init ixdp425_map_io(void) { - early_serial_setup(&ixdp425_serial_ports[0]); - early_serial_setup(&ixdp425_serial_ports[1]); - ixp4xx_map_io(); } @@ -102,10 +64,54 @@ .num_resources = 0 }; +static struct resource ixdp425_uart_resources[] = { + { + .start = IXP4XX_UART1_BASE_PHYS, + .end = IXP4XX_UART1_BASE_PHYS + 0x0fff, + .flags = IORESOURCE_MEM + }, + { + .start = IXP4XX_UART2_BASE_PHYS, + .end = IXP4XX_UART2_BASE_PHYS + 0x0fff, + .flags = IORESOURCE_MEM + } +}; + +static struct plat_serial8250_port ixdp425_uart_data[] = { + { + .mapbase = IXP4XX_UART1_BASE_PHYS, + .membase = (char *)IXP4XX_UART1_BASE_VIRT + REG_OFFSET, + .irq = IRQ_IXP4XX_UART1, + .flags = UPF_BOOT_AUTOCONF, + .iotype = UPIO_MEM, + .regshift = 2, + .uartclk = IXP4XX_UART_XTAL, + }, + { + .mapbase = IXP4XX_UART2_BASE_PHYS, + .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET, + .irq = IRQ_IXP4XX_UART1, + .flags = UPF_BOOT_AUTOCONF, + .iotype = UPIO_MEM, + .regshift = 2, + .uartclk = IXP4XX_UART_XTAL, + } +}; + +static struct platform_device ixdp425_uart = { + .name = "serial8250", + .id = 0, + .dev.platform_data = ixdp425_uart_data, + .num_resources = 2, + .resource = ixdp425_uart_resources +}; + static struct platform_device *ixdp425_devices[] __initdata = { &ixdp425_i2c_controller, - &ixdp425_flash + &ixdp425_flash, + &ixdp425_uart }; + static void __init ixdp425_init(void) { diff -Nru a/arch/arm/mach-ixp4xx/prpmc1100-pci.c b/arch/arm/mach-ixp4xx/prpmc1100-pci.c --- a/arch/arm/mach-ixp4xx/prpmc1100-pci.c 2005-03-07 14:54:16 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,120 +0,0 @@ -/* - * arch/arm/mach-ixp4xx/prpmc1100-pci.c - * - * PrPMC1100 PCI initialization - * - * Copyright (C) 2003-2004 MontaVista Sofwtare, Inc. - * Based on IXDP425 code originally (C) Intel Corporation - * - * Author: Deepak Saxena - * - * PrPMC1100 PCI init code. GPIO usage is similar to that on - * IXDP425, but the IRQ routing is completely different and - * depends on what carrier you are using. This code is written - * to work on the Motorola PrPMC800 ATX carrier board. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - */ - -#include -#include -#include -#include - -#include -#include -#include - -#include - - -void __init prpmc1100_pci_preinit(void) -{ - gpio_line_config(PRPMC1100_PCI_INTA_PIN, - IXP4XX_GPIO_IN | IXP4XX_GPIO_ACTIVE_LOW); - gpio_line_config(PRPMC1100_PCI_INTB_PIN, - IXP4XX_GPIO_IN | IXP4XX_GPIO_ACTIVE_LOW); - gpio_line_config(PRPMC1100_PCI_INTC_PIN, - IXP4XX_GPIO_IN | IXP4XX_GPIO_ACTIVE_LOW); - gpio_line_config(PRPMC1100_PCI_INTD_PIN, - IXP4XX_GPIO_IN | IXP4XX_GPIO_ACTIVE_LOW); - - gpio_line_isr_clear(PRPMC1100_PCI_INTA_PIN); - gpio_line_isr_clear(PRPMC1100_PCI_INTB_PIN); - gpio_line_isr_clear(PRPMC1100_PCI_INTC_PIN); - gpio_line_isr_clear(PRPMC1100_PCI_INTD_PIN); - - ixp4xx_pci_preinit(); -} - - -static int __init prpmc1100_map_irq(struct pci_dev *dev, u8 slot, u8 pin) -{ - int irq = -1; - - static int pci_irq_table[][4] = { - { /* IDSEL 16 - PMC A1 */ - IRQ_PRPMC1100_PCI_INTD, - IRQ_PRPMC1100_PCI_INTA, - IRQ_PRPMC1100_PCI_INTB, - IRQ_PRPMC1100_PCI_INTC - }, { /* IDSEL 17 - PRPMC-A-B */ - IRQ_PRPMC1100_PCI_INTD, - IRQ_PRPMC1100_PCI_INTA, - IRQ_PRPMC1100_PCI_INTB, - IRQ_PRPMC1100_PCI_INTC - }, { /* IDSEL 18 - PMC A1-B */ - IRQ_PRPMC1100_PCI_INTA, - IRQ_PRPMC1100_PCI_INTB, - IRQ_PRPMC1100_PCI_INTC, - IRQ_PRPMC1100_PCI_INTD - }, { /* IDSEL 19 - Unused */ - 0, 0, 0, 0 - }, { /* IDSEL 20 - P2P Bridge */ - IRQ_PRPMC1100_PCI_INTA, - IRQ_PRPMC1100_PCI_INTB, - IRQ_PRPMC1100_PCI_INTC, - IRQ_PRPMC1100_PCI_INTD - }, { /* IDSEL 21 - PMC A2 */ - IRQ_PRPMC1100_PCI_INTC, - IRQ_PRPMC1100_PCI_INTD, - IRQ_PRPMC1100_PCI_INTA, - IRQ_PRPMC1100_PCI_INTB - }, { /* IDSEL 22 - PMC A2-B */ - IRQ_PRPMC1100_PCI_INTD, - IRQ_PRPMC1100_PCI_INTA, - IRQ_PRPMC1100_PCI_INTB, - IRQ_PRPMC1100_PCI_INTC - }, - }; - - if (slot >= PRPMC1100_PCI_MIN_DEVID && slot <= PRPMC1100_PCI_MAX_DEVID - && pin >= 1 && pin <= PRPMC1100_PCI_IRQ_LINES) { - irq = pci_irq_table[slot - PRPMC1100_PCI_MIN_DEVID][pin - 1]; - } - - return irq; -} - - -struct hw_pci prpmc1100_pci __initdata = { - .nr_controllers = 1, - .preinit = prpmc1100_pci_preinit, - .swizzle = pci_std_swizzle, - .setup = ixp4xx_setup, - .scan = ixp4xx_scan_bus, - .map_irq = prpmc1100_map_irq, -}; - -int __init prpmc1100_pci_init(void) -{ - if (machine_is_prpmc1100()) - pci_common_init(&prpmc1100_pci); - return 0; -} - -subsys_initcall(prpmc1100_pci_init); - diff -Nru a/arch/arm/mach-ixp4xx/prpmc1100-setup.c b/arch/arm/mach-ixp4xx/prpmc1100-setup.c --- a/arch/arm/mach-ixp4xx/prpmc1100-setup.c 2005-03-07 14:54:16 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,98 +0,0 @@ -/* - * arch/arm/mach-ixp4xx/prpmc1100-setup.c - * - * Motorola PrPMC1100 board setup - * - * Copyright (C) 2003-2004 MontaVista Software, Inc. - * - * Author: Deepak Saxena - */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef __ARMEB__ -#define REG_OFFSET 3 -#else -#define REG_OFFSET 0 -#endif - -/* - * Only one serial port is connected on the PrPMC1100 - */ -static struct uart_port prpmc1100_serial_port = { - .membase = (char*)(IXP4XX_UART1_BASE_VIRT + REG_OFFSET), - .mapbase = (IXP4XX_UART1_BASE_PHYS), - .irq = IRQ_IXP4XX_UART1, - .flags = UPF_SKIP_TEST, - .iotype = UPIO_MEM, - .regshift = 2, - .uartclk = IXP4XX_UART_XTAL, - .line = 0, - .type = PORT_XSCALE, - .fifosize = 32 -}; - -void __init prpmc1100_map_io(void) -{ - early_serial_setup(&prpmc1100_serial_port); - - ixp4xx_map_io(); -} - -static struct flash_platform_data prpmc1100_flash_data = { - .map_name = "cfi_probe", - .width = 2, -}; - -static struct resource prpmc1100_flash_resource = { - .start = PRPMC1100_FLASH_BASE, - .end = PRPMC1100_FLASH_BASE + PRPMC1100_FLASH_SIZE, - .flags = IORESOURCE_MEM, -}; - -static struct platform_device prpmc1100_flash = { - .name = "IXP4XX-Flash", - .id = 0, - .dev = { - .platform_data = &prpmc1100_flash_data, - }, - .num_resources = 1, - .resource = &prpmc1100_flash_resource, -}; - -static struct platform_device *prpmc1100_devices[] __initdata = { - &prpmc1100_flash -}; - -static void __init prpmc1100_init(void) -{ - ixp4xx_sys_init(); - - platform_add_devices(prpmc1100_devices, ARRAY_SIZE(prpmc1100_devices)); -} - -MACHINE_START(PRPMC1100, "Motorola PrPMC1100") - MAINTAINER("MontaVista Software, Inc.") - BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS, - IXP4XX_PERIPHERAL_BASE_VIRT) - MAPIO(prpmc1100_map_io) - INITIRQ(ixp4xx_init_irq) - .timer = &ixp4xx_timer, - BOOT_PARAMS(0x0100) - INIT_MACHINE(prpmc1100_init) -MACHINE_END - diff -Nru a/arch/arm/mach-lh7a40x/arch-lpd7a40x.c b/arch/arm/mach-lh7a40x/arch-lpd7a40x.c --- a/arch/arm/mach-lh7a40x/arch-lpd7a40x.c 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mach-lh7a40x/arch-lpd7a40x.c 2005-03-07 14:54:16 -08:00 @@ -157,8 +157,6 @@ .unmask = lh7a40x_unmask_cpld_irq, }; -#define IRQ_DISPATCH(irq) irq_desc[irq].handle ((irq), &irq_desc[irq], regs) - static void lpd7a40x_cpld_handler (unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) { diff -Nru a/arch/arm/mach-lh7a40x/common.h b/arch/arm/mach-lh7a40x/common.h --- a/arch/arm/mach-lh7a40x/common.h 2005-03-07 14:54:17 -08:00 +++ b/arch/arm/mach-lh7a40x/common.h 2005-03-07 14:54:17 -08:00 @@ -12,3 +12,5 @@ extern void lh7a400_init_irq (void); extern void lh7a404_init_irq (void); + +#define IRQ_DISPATCH(irq) irq_desc[irq].handle ((irq), &irq_desc[irq], regs) diff -Nru a/arch/arm/mach-lh7a40x/irq-lpd7a40x.c b/arch/arm/mach-lh7a40x/irq-lpd7a40x.c --- a/arch/arm/mach-lh7a40x/irq-lpd7a40x.c 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mach-lh7a40x/irq-lpd7a40x.c 2005-03-07 14:54:16 -08:00 @@ -55,8 +55,6 @@ .unmask = lh7a40x_unmask_cpld_irq, }; -#define IRQ_DISPATCH(irq) irq_desc[irq].handle ((irq), &irq_desc[irq], regs) - static void lh7a40x_cpld_handler (unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) { diff -Nru a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig --- a/arch/arm/mach-pxa/Kconfig 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mach-pxa/Kconfig 2005-03-07 14:54:16 -08:00 @@ -19,28 +19,36 @@ select PXA25x config PXA_SHARPSL - bool "SHARP SL-C7xx Models (Corgi, Shepherd and Husky)" + bool "SHARP SL-5600 and SL-C7xx Models" select PXA25x help Say Y here if you intend to run this kernel on a - Sharp SL-C700 (Corgi), SL-C750 (Shepherd) or a - Sharp SL-C760 (Husky) handheld computer. + Sharp SL-5600 (Poodle), Sharp SL-C700 (Corgi), + SL-C750 (Shepherd) or a Sharp SL-C760 (Husky) + handheld computer. endchoice endmenu +config MACH_POODLE + bool "Enable Sharp SL-5600 (Poodle) Support" + depends PXA_SHARPSL + config MACH_CORGI bool "Enable Sharp SL-C700 (Corgi) Support" depends PXA_SHARPSL + select PXA_SHARP_C7xx config MACH_SHEPHERD bool "Enable Sharp SL-C750 (Shepherd) Support" depends PXA_SHARPSL + select PXA_SHARP_C7xx config MACH_HUSKY bool "Enable Sharp SL-C760 (Husky) Support" depends PXA_SHARPSL + select PXA_SHARP_C7xx config PXA25x bool @@ -56,5 +64,10 @@ bool help Enable support for iWMMXt + +config PXA_SHARP_C7xx + bool + help + Enable support for all Sharp C7xx models endif diff -Nru a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile --- a/arch/arm/mach-pxa/Makefile 2005-03-07 14:54:17 -08:00 +++ b/arch/arm/mach-pxa/Makefile 2005-03-07 14:54:17 -08:00 @@ -11,7 +11,8 @@ obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o obj-$(CONFIG_ARCH_PXA_IDP) += idp.o -obj-$(CONFIG_PXA_SHARPSL) += corgi.o corgi_ssp.o ssp.o +obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o corgi_ssp.o ssp.o +obj-$(CONFIG_MACH_POODLE) += poodle.o # Support for blinky lights led-y := leds.o diff -Nru a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c --- a/arch/arm/mach-pxa/idp.c 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mach-pxa/idp.c 2005-03-07 14:54:16 -08:00 @@ -10,13 +10,16 @@ * 2001-09-13: Cliff Brake * Initial code * - * Expected command line: mem=32M initrd=0xa1000000,4M root=/dev/ram ramdisk=8192 + * 2005-02-15: Cliff Brake + * + * Updated for 2.6 kernel + * */ -#include + #include -#include -#include #include +#include +#include #include #include @@ -29,68 +32,133 @@ #include #include +#include +#include +#include #include "generic.h" -#ifndef PXA_IDP_REV02 -/* shadow registers for write only registers */ -unsigned int idp_cpld_led_control_shadow = 0x1; -unsigned int idp_cpld_periph_pwr_shadow = 0xd; -unsigned int ipd_cpld_cir_shadow = 0; -unsigned int idp_cpld_kb_col_high_shadow = 0; -unsigned int idp_cpld_kb_col_low_shadow = 0; -unsigned int idp_cpld_pccard_en_shadow = 0xC3; -unsigned int idp_cpld_gpioh_dir_shadow = 0; -unsigned int idp_cpld_gpioh_value_shadow = 0; -unsigned int idp_cpld_gpiol_dir_shadow = 0; -unsigned int idp_cpld_gpiol_value_shadow = 0; - -/* - * enable all LCD signals -- they should still be on - * write protect flash - * enable all serial port transceivers +/* TODO: + * - add pxa2xx_audio_ops_t device structure + * - Ethernet interrupt */ -unsigned int idp_control_port_shadow = ((0x7 << 21) | /* LCD power */ - (0x1 << 19) | /* disable flash write enable */ - (0x7 << 9)); /* enable serial port transeivers */ +static struct resource smc91x_resources[] = { + [0] = { + .start = (IDP_ETH_PHYS + 0x300), + .end = (IDP_ETH_PHYS + 0xfffff), + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_GPIO(4), + .end = IRQ_GPIO(4), + .flags = IORESOURCE_IRQ, + } +}; + +static struct platform_device smc91x_device = { + .name = "smc91x", + .id = 0, + .num_resources = ARRAY_SIZE(smc91x_resources), + .resource = smc91x_resources, +}; + +static void idp_backlight_power(int on) +{ + if (on) { + IDP_CPLD_LCD |= (1<<1); + } else { + IDP_CPLD_LCD &= ~(1<<1); + } +} + +static void idp_vlcd(int on) +{ + if (on) { + IDP_CPLD_LCD |= (1<<2); + } else { + IDP_CPLD_LCD &= ~(1<<2); + } +} + +static void idp_lcd_power(int on) +{ + if (on) { + IDP_CPLD_LCD |= (1<<0); + } else { + IDP_CPLD_LCD &= ~(1<<0); + } + + /* call idp_vlcd for now as core driver does not support + * both power and vlcd hooks. Note, this is not technically + * the correct sequence, but seems to work. Disclaimer: + * this may eventually damage the display. + */ + + idp_vlcd(on); +} + +static struct pxafb_mach_info sharp_lm8v31 __initdata = { + .pixclock = 270000, + .xres = 640, + .yres = 480, + .bpp = 16, + .hsync_len = 1, + .left_margin = 3, + .right_margin = 3, + .vsync_len = 1, + .upper_margin = 0, + .lower_margin = 0, + .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, + .cmap_greyscale = 0, + .cmap_inverse = 0, + .cmap_static = 0, + .lccr0 = LCCR0_SDS, + .lccr3 = LCCR3_PCP | LCCR3_Acb(255), + .pxafb_backlight_power = &idp_backlight_power, + .pxafb_lcd_power = &idp_lcd_power +}; + +static int idp_mci_init(struct device *dev, irqreturn_t (*idp_detect_int)(int, void *, struct pt_regs *), void *data) +{ + /* setup GPIO for PXA25x MMC controller */ + pxa_gpio_mode(GPIO6_MMCCLK_MD); + pxa_gpio_mode(GPIO8_MMCCS0_MD); + + return 0; +} -#endif +static struct pxamci_platform_data idp_mci_platform_data = { + .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, + .init = idp_mci_init, +}; static void __init idp_init(void) { printk("idp_init()\n"); + + platform_device_register(&smc91x_device); + //platform_device_register(&mst_audio_device); + set_pxa_fb_info(&sharp_lm8v31); + pxa_set_mci_info(&idp_mci_platform_data); } static void __init idp_init_irq(void) { + pxa_init_irq(); + + set_irq_type(TOUCH_PANEL_IRQ, TOUCH_PANEL_IRQ_EDGE); } static struct map_desc idp_io_desc[] __initdata = { /* virtual physical length type */ - -#ifndef PXA_IDP_REV02 - { IDP_CTRL_PORT_BASE, - IDP_CTRL_PORT_PHYS, - IDP_CTRL_PORT_SIZE, - MT_DEVICE }, -#endif - - { IDP_IDE_BASE, - IDP_IDE_PHYS, - IDP_IDE_SIZE, - MT_DEVICE }, - { IDP_ETH_BASE, - IDP_ETH_PHYS, - IDP_ETH_SIZE, - MT_DEVICE }, - { IDP_COREVOLT_BASE, + { IDP_COREVOLT_VIRT, IDP_COREVOLT_PHYS, IDP_COREVOLT_SIZE, MT_DEVICE }, - { IDP_CPLD_BASE, + { IDP_CPLD_VIRT, IDP_CPLD_PHYS, IDP_CPLD_SIZE, MT_DEVICE } @@ -101,8 +169,6 @@ pxa_map_io(); iotable_init(idp_io_desc, ARRAY_SIZE(idp_io_desc)); - set_irq_type(TOUCH_PANEL_IRQ, TOUCH_PANEL_IRQ_EDGE); - // serial ports 2 & 3 pxa_gpio_mode(GPIO42_BTRXD_MD); pxa_gpio_mode(GPIO43_BTTXD_MD); @@ -114,8 +180,8 @@ } -MACHINE_START(PXA_IDP, "Accelent Xscale IDP") - MAINTAINER("Accelent Systems Inc.") +MACHINE_START(PXA_IDP, "Vibren PXA255 IDP") + MAINTAINER("Vibren Technologies") BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000)) MAPIO(idp_map_io) INITIRQ(idp_init_irq) diff -Nru a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c --- a/arch/arm/mach-pxa/irq.c 2005-03-07 14:54:18 -08:00 +++ b/arch/arm/mach-pxa/irq.c 2005-03-07 14:54:18 -08:00 @@ -97,23 +97,23 @@ type = __IRQT_RISEDGE | __IRQT_FALEDGE; } - printk(KERN_DEBUG "IRQ%d (GPIO%d): ", irq, gpio); + /* printk(KERN_DEBUG "IRQ%d (GPIO%d): ", irq, gpio); */ pxa_gpio_mode(gpio | GPIO_IN); if (type & __IRQT_RISEDGE) { - printk("rising "); + /* printk("rising "); */ __set_bit (gpio, GPIO_IRQ_rising_edge); } else __clear_bit (gpio, GPIO_IRQ_rising_edge); if (type & __IRQT_FALEDGE) { - printk("falling "); + /* printk("falling "); */ __set_bit (gpio, GPIO_IRQ_falling_edge); } else __clear_bit (gpio, GPIO_IRQ_falling_edge); - printk("edges\n"); + /* printk("edges\n"); */ GRER(gpio) = GPIO_IRQ_rising_edge[idx] & GPIO_IRQ_mask[idx]; GFER(gpio) = GPIO_IRQ_falling_edge[idx] & GPIO_IRQ_mask[idx]; diff -Nru a/arch/arm/mach-pxa/leds-idp.c b/arch/arm/mach-pxa/leds-idp.c --- a/arch/arm/mach-pxa/leds-idp.c 2005-03-07 14:54:18 -08:00 +++ b/arch/arm/mach-pxa/leds-idp.c 2005-03-07 14:54:18 -08:00 @@ -19,6 +19,7 @@ #include #include +#include #include #include "leds.h" diff -Nru a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c --- a/arch/arm/mach-pxa/lubbock.c 2005-03-07 14:54:18 -08:00 +++ b/arch/arm/mach-pxa/lubbock.c 2005-03-07 14:54:18 -08:00 @@ -138,6 +138,7 @@ static struct resource smc91x_resources[] = { [0] = { + .name = "smc91x-regs", .start = 0x0c000000, .end = 0x0c0fffff, .flags = IORESOURCE_MEM, @@ -148,6 +149,7 @@ .flags = IORESOURCE_IRQ, }, [2] = { + .name = "smc91x-attrib", .start = 0x0e000000, .end = 0x0e0fffff, .flags = IORESOURCE_MEM, diff -Nru a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c --- a/arch/arm/mach-pxa/mainstone.c 2005-03-07 14:54:18 -08:00 +++ b/arch/arm/mach-pxa/mainstone.c 2005-03-07 14:54:18 -08:00 @@ -295,6 +295,15 @@ { pxa_map_io(); iotable_init(mainstone_io_desc, ARRAY_SIZE(mainstone_io_desc)); + + /* initialize sleep mode regs (wake-up sources, etc) */ + PGSR0 = 0x00008800; + PGSR1 = 0x00000002; + PGSR2 = 0x0001FC00; + PGSR3 = 0x00001F81; + PWER = 0xC0000002; + PRER = 0x00000002; + PFER = 0x00000002; } MACHINE_START(MAINSTONE, "Intel HCDDBBVA0 Development Platform (aka Mainstone)") diff -Nru a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c --- a/arch/arm/mach-pxa/pm.c 2005-03-07 14:54:17 -08:00 +++ b/arch/arm/mach-pxa/pm.c 2005-03-07 14:54:17 -08:00 @@ -47,12 +47,18 @@ */ enum { SLEEP_SAVE_START = 0, - SLEEP_SAVE_GPLR0, SLEEP_SAVE_GPLR1, SLEEP_SAVE_GPLR2, - SLEEP_SAVE_GPDR0, SLEEP_SAVE_GPDR1, SLEEP_SAVE_GPDR2, - SLEEP_SAVE_GRER0, SLEEP_SAVE_GRER1, SLEEP_SAVE_GRER2, - SLEEP_SAVE_GFER0, SLEEP_SAVE_GFER1, SLEEP_SAVE_GFER2, - SLEEP_SAVE_GAFR0_L, SLEEP_SAVE_GAFR1_L, SLEEP_SAVE_GAFR2_L, - SLEEP_SAVE_GAFR0_U, SLEEP_SAVE_GAFR1_U, SLEEP_SAVE_GAFR2_U, + SLEEP_SAVE_GPLR0, SLEEP_SAVE_GPLR1, SLEEP_SAVE_GPLR2, SLEEP_SAVE_GPLR3, + SLEEP_SAVE_GPDR0, SLEEP_SAVE_GPDR1, SLEEP_SAVE_GPDR2, SLEEP_SAVE_GPDR3, + SLEEP_SAVE_GRER0, SLEEP_SAVE_GRER1, SLEEP_SAVE_GRER2, SLEEP_SAVE_GRER3, + SLEEP_SAVE_GFER0, SLEEP_SAVE_GFER1, SLEEP_SAVE_GFER2, SLEEP_SAVE_GFER3, + SLEEP_SAVE_PGSR0, SLEEP_SAVE_PGSR1, SLEEP_SAVE_PGSR2, SLEEP_SAVE_PGSR3, + + SLEEP_SAVE_GAFR0_L, SLEEP_SAVE_GAFR0_U, + SLEEP_SAVE_GAFR1_L, SLEEP_SAVE_GAFR1_U, + SLEEP_SAVE_GAFR2_L, SLEEP_SAVE_GAFR2_U, + SLEEP_SAVE_GAFR3_L, SLEEP_SAVE_GAFR3_U, + + SLEEP_SAVE_PSTR, SLEEP_SAVE_ICMR, SLEEP_SAVE_CKEN, @@ -73,6 +79,11 @@ if (state != PM_SUSPEND_MEM) return -EINVAL; +#ifdef CONFIG_IWMMXT + /* force any iWMMXt context to ram **/ + iwmmxt_task_disable(NULL); +#endif + /* preserve current time */ rtc.tv_sec = RCNR; rtc.tv_nsec = 0; @@ -82,20 +93,32 @@ SAVE(GPDR0); SAVE(GPDR1); SAVE(GPDR2); SAVE(GRER0); SAVE(GRER1); SAVE(GRER2); SAVE(GFER0); SAVE(GFER1); SAVE(GFER2); + SAVE(PGSR0); SAVE(PGSR1); SAVE(PGSR2); + SAVE(GAFR0_L); SAVE(GAFR0_U); SAVE(GAFR1_L); SAVE(GAFR1_U); SAVE(GAFR2_L); SAVE(GAFR2_U); +#ifdef CONFIG_PXA27x + SAVE(GPLR3); SAVE(GPDR3); SAVE(GRER3); SAVE(GFER3); SAVE(PGSR3); + SAVE(GAFR3_L); SAVE(GAFR3_U); +#endif + SAVE(ICMR); ICMR = 0; SAVE(CKEN); CKEN = 0; + SAVE(PSTR); + /* Note: wake up source are set up in each machine specific files */ /* clear GPIO transition detect bits */ GEDR0 = GEDR0; GEDR1 = GEDR1; GEDR2 = GEDR2; +#ifdef CONFIG_PXA27x + GEDR3 = GEDR3; +#endif /* Clear sleep reset status */ RCSR = RCSR_SMR; @@ -121,7 +144,8 @@ #ifdef CONFIG_ARCH_LUBBOCK LUB_HEXLED = 0xbadbadc5; #endif - while (1); + while (1) + pxa_cpu_suspend(); } /* ensure not to come back here if it wasn't intended */ @@ -135,6 +159,12 @@ RESTORE(GPDR0); RESTORE(GPDR1); RESTORE(GPDR2); RESTORE(GRER0); RESTORE(GRER1); RESTORE(GRER2); RESTORE(GFER0); RESTORE(GFER1); RESTORE(GFER2); + RESTORE(PGSR0); RESTORE(PGSR1); RESTORE(PGSR2); + +#ifdef CONFIG_PXA27x + RESTORE(GAFR3_L); RESTORE(GAFR3_U); RESTORE_GPLEVEL(3); + RESTORE(GPDR3); RESTORE(GRER3); RESTORE(GFER3); RESTORE(PGSR3); +#endif PSSR = PSSR_RDH | PSSR_PH; @@ -143,6 +173,8 @@ ICLR = 0; ICCR = 1; RESTORE(ICMR); + + RESTORE(PSTR); /* restore current time */ rtc.tv_sec = RCNR; diff -Nru a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/mach-pxa/poodle.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,181 @@ +/* + * linux/arch/arm/mach-pxa/poodle.c + * + * Support for the SHARP Poodle Board. + * + * Based on: + * linux/arch/arm/mach-pxa/lubbock.c Author: Nicolas Pitre + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Change Log + * 12-Dec-2002 Sharp Corporation for Poodle + * John Lenz updates to 2.6 + */ +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include "generic.h" + +static struct resource poodle_scoop_resources[] = { + [0] = { + .start = 0x10800000, + .end = 0x10800fff, + .flags = IORESOURCE_MEM, + }, +}; + +static struct scoop_config poodle_scoop_setup = { + .io_dir = POODLE_SCOOP_IO_DIR, + .io_out = POODLE_SCOOP_IO_OUT, +}; + +static struct platform_device poodle_scoop_device = { + .name = "sharp-scoop", + .id = -1, + .dev = { + .platform_data = &poodle_scoop_setup, + }, + .num_resources = ARRAY_SIZE(poodle_scoop_resources), + .resource = poodle_scoop_resources, +}; + + +/* LoCoMo device */ +static struct resource locomo_resources[] = { + [0] = { + .start = 0x10000000, + .end = 0x10001fff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_GPIO(10), + .end = IRQ_GPIO(10), + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device locomo_device = { + .name = "locomo", + .id = 0, + .num_resources = ARRAY_SIZE(locomo_resources), + .resource = locomo_resources, +}; + +/* PXAFB device */ +static struct pxafb_mach_info poodle_fb_info __initdata = { + .pixclock = 144700, + + .xres = 320, + .yres = 240, + .bpp = 16, + + .hsync_len = 7, + .left_margin = 11, + .right_margin = 30, + + .vsync_len = 2, + .upper_margin = 2, + .lower_margin = 0, + .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, + + .lccr0 = LCCR0_Act | LCCR0_Sngl | LCCR0_Color, + .lccr3 = 0, + + .pxafb_backlight_power = NULL, + .pxafb_lcd_power = NULL, +}; + +static struct platform_device *devices[] __initdata = { + &locomo_device, + &poodle_scoop_device, +}; + +static void __init poodle_init(void) +{ + int ret = 0; + + /* cpu initialize */ + /* Pgsr Register */ + PGSR0 = 0x0146dd80; + PGSR1 = 0x03bf0890; + PGSR2 = 0x0001c000; + + /* Alternate Register */ + GAFR0_L = 0x01001000; + GAFR0_U = 0x591a8010; + GAFR1_L = 0x900a8451; + GAFR1_U = 0xaaa5aaaa; + GAFR2_L = 0x8aaaaaaa; + GAFR2_U = 0x00000002; + + /* Direction Register */ + GPDR0 = 0xd3f0904c; + GPDR1 = 0xfcffb7d3; + GPDR2 = 0x0001ffff; + + /* Output Register */ + GPCR0 = 0x00000000; + GPCR1 = 0x00000000; + GPCR2 = 0x00000000; + + GPSR0 = 0x00400000; + GPSR1 = 0x00000000; + GPSR2 = 0x00000000; + + set_pxa_fb_info(&poodle_fb_info); + + ret = platform_add_devices(devices, ARRAY_SIZE(devices)); + if (ret) { + printk(KERN_WARNING "poodle: Unable to register LoCoMo device\n"); + } +} + +static struct map_desc poodle_io_desc[] __initdata = { + /* virtual physical length */ + { 0xef800000, 0x00000000, 0x00800000, MT_DEVICE }, /* Boot Flash */ +}; + +static void __init poodle_map_io(void) +{ + pxa_map_io(); + iotable_init(poodle_io_desc, ARRAY_SIZE(poodle_io_desc)); + + /* setup sleep mode values */ + PWER = 0x00000002; + PFER = 0x00000000; + PRER = 0x00000002; + PGSR0 = 0x00008000; + PGSR1 = 0x003F0202; + PGSR2 = 0x0001C000; + PCFR |= PCFR_OPDE; +} + +MACHINE_START(POODLE, "SHARP Poodle") + BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000)) + MAPIO(poodle_map_io) + INITIRQ(pxa_init_irq) + .timer = &pxa_timer, + .init_machine = poodle_init, +MACHINE_END diff -Nru a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig --- a/arch/arm/mach-s3c2410/Kconfig 2005-03-07 14:54:17 -08:00 +++ b/arch/arm/mach-s3c2410/Kconfig 2005-03-07 14:54:17 -08:00 @@ -26,6 +26,12 @@ Say Y here if you are using the SMDK2410 or the derived module A9M2410 +config ARCH_S3C2440 + bool "SMDK2440" + select CPU_S3C2440 + help + Say Y here if you are using the SMDK2440. + config MACH_VR1000 bool "Thorcom VR1000" select CPU_S3C2410 @@ -58,6 +64,26 @@ depends on ARCH_S3C2410 help Support for S3C2440 Samsung Mobile CPU based systems. + +comment "S3C2410 Boot" + +config S3C2410_BOOT_WATCHDOG + bool "S3C2410 Initialisation watchdog" + depends on ARCH_S3C2410 && S3C2410_WATCHDOG + help + Say y to enable the watchdog during the kernel decompression + stage. If the kernel fails to uncompress, then the watchdog + will trigger a reset and the system should restart. + + Although this uses the same hardware unit as the kernel watchdog + driver, it is not a replacement for it. If you use this option, + you will have to use the watchdg driver to either stop the timeout + or restart it. If you do not, then your kernel will reboot after + startup. + + The driver uses a fixed timeout value, so the exact time till the + system resets depends on the value of PCLK. The timeout on an + 200MHz s3c2410 should be about 30 seconds. comment "S3C2410 Setup" diff -Nru a/arch/arm/mach-s3c2410/Makefile b/arch/arm/mach-s3c2410/Makefile --- a/arch/arm/mach-s3c2410/Makefile 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mach-s3c2410/Makefile 2005-03-07 14:54:16 -08:00 @@ -28,5 +28,6 @@ obj-$(CONFIG_ARCH_BAST) += mach-bast.o usb-simtec.o obj-$(CONFIG_ARCH_H1940) += mach-h1940.o obj-$(CONFIG_ARCH_SMDK2410) += mach-smdk2410.o +obj-$(CONFIG_ARCH_S3C2440) += mach-smdk2440.o obj-$(CONFIG_MACH_VR1000) += mach-vr1000.o usb-simtec.o obj-$(CONFIG_MACH_RX3715) += mach-rx3715.o diff -Nru a/arch/arm/mach-s3c2410/clock.c b/arch/arm/mach-s3c2410/clock.c --- a/arch/arm/mach-s3c2410/clock.c 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mach-s3c2410/clock.c 2005-03-07 14:54:16 -08:00 @@ -1,7 +1,7 @@ /* linux/arch/arm/mach-s3c2410/clock.c * - * Copyright (c) 2004 Simtec Electronics - * Ben Dooks + * Copyright (c) 2004-2005 Simtec Electronics + * Ben Dooks * * S3C2410 Clock control support * @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -46,18 +47,13 @@ #include #include "clock.h" +#include "cpu.h" /* clock information */ -unsigned long s3c24xx_xtal = 12*1000*1000; /* default 12MHz */ -unsigned long s3c24xx_fclk; -unsigned long s3c24xx_hclk; -unsigned long s3c24xx_pclk; - static LIST_HEAD(clocks); static DECLARE_MUTEX(clocks_sem); - /* old functions */ void inline s3c24xx_clk_enable(unsigned int clocks, unsigned int enable) @@ -206,6 +202,14 @@ /* base clocks */ +static struct clk clk_xtal = { + .name = "xtal", + .id = -1, + .rate = 0, + .parent = NULL, + .ctrlbit = 0, +}; + static struct clk clk_f = { .name = "fclk", .id = -1, @@ -286,6 +290,7 @@ .ctrlbit = S3C2410_CLKCON_USBD }, { .name = "timers", + .id = -1, .parent = &clk_p, .enable = s3c24xx_clkcon_enable, .ctrlbit = S3C2410_CLKCON_PWMT @@ -378,19 +383,24 @@ /* initalise all the clocks */ -int __init s3c24xx_setup_clocks(void) +int __init s3c24xx_setup_clocks(unsigned long xtal, + unsigned long fclk, + unsigned long hclk, + unsigned long pclk) { struct clk *clkp = init_clocks; int ptr; int ret; - printk(KERN_INFO "S3C2410 Clock control, (c) 2004 Simtec Electronics\n"); + printk(KERN_INFO "S3C2410 Clocks, (c) 2004 Simtec Electronics\n"); /* initialise the main system clocks */ - clk_h.rate = s3c24xx_hclk; - clk_p.rate = s3c24xx_pclk; - clk_f.rate = s3c24xx_fclk; + clk_xtal.rate = xtal; + + clk_h.rate = hclk; + clk_p.rate = pclk; + clk_f.rate = fclk; /* it looks like just setting the register here is not good * enough, and causes the odd hang at initial boot time, so @@ -414,6 +424,9 @@ /* register our clocks */ + if (s3c24xx_register_clock(&clk_xtal) < 0) + printk(KERN_ERR "failed to register master xtal\n"); + if (s3c24xx_register_clock(&clk_f) < 0) printk(KERN_ERR "failed to register cpu fclk\n"); @@ -423,6 +436,8 @@ if (s3c24xx_register_clock(&clk_p) < 0) printk(KERN_ERR "failed to register cpu pclk\n"); + /* register clocks from clock array */ + for (ptr = 0; ptr < ARRAY_SIZE(init_clocks); ptr++, clkp++) { ret = s3c24xx_register_clock(clkp); if (ret < 0) { @@ -434,4 +449,59 @@ return 0; } +/* S3C2440 extended clock support */ + +#ifdef CONFIG_CPU_S3C2440 + +static struct clk s3c2440_clk_upll = { + .name = "upll", + .id = -1, +}; + +static struct clk s3c2440_clk_cam = { + .name = "camif", + .parent = &clk_h, + .id = -1, + .enable = s3c24xx_clkcon_enable, + .ctrlbit = S3C2440_CLKCON_CAMERA, +}; + +static struct clk s3c2440_clk_ac97 = { + .name = "ac97", + .parent = &clk_p, + .id = -1, + .enable = s3c24xx_clkcon_enable, + .ctrlbit = S3C2440_CLKCON_CAMERA, +}; + +static int s3c2440_clk_add(struct sys_device *sysdev) +{ + unsigned long upllcon = __raw_readl(S3C2410_UPLLCON); + + s3c2440_clk_upll.rate = s3c2410_get_pll(upllcon, clk_xtal.rate) * 2; + + printk("S3C2440: Clock Support, UPLL %ld.%03ld MHz\n", + print_mhz(s3c2440_clk_upll.rate)); + + s3c24xx_register_clock(&s3c2440_clk_ac97); + s3c24xx_register_clock(&s3c2440_clk_cam); + s3c24xx_register_clock(&s3c2440_clk_upll); + + clk_disable(&s3c2440_clk_ac97); + clk_disable(&s3c2440_clk_cam); + + return 0; +} + +static struct sysdev_driver s3c2440_clk_driver = { + .add = s3c2440_clk_add, +}; + +static int s3c24xx_clk_driver(void) +{ + return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_clk_driver); +} + +arch_initcall(s3c24xx_clk_driver); +#endif /* CONFIG_CPU_S3C2440 */ diff -Nru a/arch/arm/mach-s3c2410/clock.h b/arch/arm/mach-s3c2410/clock.h --- a/arch/arm/mach-s3c2410/clock.h 2005-03-07 14:54:17 -08:00 +++ b/arch/arm/mach-s3c2410/clock.h 2005-03-07 14:54:17 -08:00 @@ -1,7 +1,8 @@ /* * linux/arch/arm/mach-s3c2410/clock.h * - * Copyright (c) 2004 Simtec Electronics + * Copyright (c) 2004-2005 Simtec Electronics + * http://www.simtec.co.uk/products/SWLINUX/ * Written by Ben Dooks, * * This program is free software; you can redistribute it and/or modify @@ -29,13 +30,6 @@ extern struct clk s3c24xx_clkout1; extern struct clk s3c24xx_uclk; -/* processor clock settings, in Hz */ - -extern unsigned long s3c24xx_xtal; -extern unsigned long s3c24xx_pclk; -extern unsigned long s3c24xx_hclk; -extern unsigned long s3c24xx_fclk; - /* exports for arch/arm/mach-s3c2410 * * Please DO NOT use these outside of arch/arm/mach-s3c2410 @@ -44,4 +38,7 @@ extern int s3c24xx_clkcon_enable(struct clk *clk, int enable); extern int s3c24xx_register_clock(struct clk *clk); -extern int s3c24xx_setup_clocks(void); +extern int s3c24xx_setup_clocks(unsigned long xtal, + unsigned long fclk, + unsigned long hclk, + unsigned long pclk); diff -Nru a/arch/arm/mach-s3c2410/cpu.c b/arch/arm/mach-s3c2410/cpu.c --- a/arch/arm/mach-s3c2410/cpu.c 2005-03-07 14:54:17 -08:00 +++ b/arch/arm/mach-s3c2410/cpu.c 2005-03-07 14:54:17 -08:00 @@ -1,7 +1,8 @@ /* linux/arch/arm/mach-s3c2410/cpu.c * - * Copyright (c) 2004 Simtec Electronics - * Ben Dooks + * Copyright (c) 2004-2005 Simtec Electronics + * http://www.simtec.co.uk/products/SWLINUX/ + * Ben Dooks * * S3C24XX CPU Support * @@ -181,8 +182,8 @@ void __init s3c24xx_init_clocks(int xtal) { - if (xtal != 0) - s3c24xx_xtal = xtal; + if (xtal == 0) + xtal = 12*1000*1000; if (cpu == NULL) panic("s3c24xx_init_clocks: no cpu setup?\n"); diff -Nru a/arch/arm/mach-s3c2410/cpu.h b/arch/arm/mach-s3c2410/cpu.h --- a/arch/arm/mach-s3c2410/cpu.h 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mach-s3c2410/cpu.h 2005-03-07 14:54:16 -08:00 @@ -27,6 +27,7 @@ /* forward declaration */ struct s3c2410_uartcfg; +struct map_desc; /* core initialisation functions */ @@ -58,3 +59,7 @@ struct sys_timer; extern struct sys_timer s3c24xx_timer; + +/* system device classes */ + +extern struct sysdev_class s3c2440_sysclass; diff -Nru a/arch/arm/mach-s3c2410/devs.c b/arch/arm/mach-s3c2410/devs.c --- a/arch/arm/mach-s3c2410/devs.c 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mach-s3c2410/devs.c 2005-03-07 14:54:16 -08:00 @@ -10,6 +10,7 @@ * published by the Free Software Foundation. * * Modifications: + * 10-Feb-2005 BJD Added camera from guillaume.gourat@nexvision.tv * 29-Aug-2004 BJD Added timers 0 through 3 * 29-Aug-2004 BJD Changed index of devices we only have one of to -1 * 21-Aug-2004 BJD Added IRQ_TICK to RTC resources @@ -446,3 +447,38 @@ }; EXPORT_SYMBOL(s3c_device_timer3); + +#ifdef CONFIG_CPU_S3C2440 + +/* Camif Controller */ + +static struct resource s3c_camif_resource[] = { + [0] = { + .start = S3C2440_PA_CAMIF, + .end = S3C2440_PA_CAMIF + S3C2440_SZ_CAMIF, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_CAM, + .end = IRQ_CAM, + .flags = IORESOURCE_IRQ, + } + +}; + +static u64 s3c_device_camif_dmamask = 0xffffffffUL; + +struct platform_device s3c_device_camif = { + .name = "s3c2440-camif", + .id = -1, + .num_resources = ARRAY_SIZE(s3c_camif_resource), + .resource = s3c_camif_resource, + .dev = { + .dma_mask = &s3c_device_camif_dmamask, + .coherent_dma_mask = 0xffffffffUL + } +}; + +EXPORT_SYMBOL(s3c_device_camif); + +#endif // CONFIG_CPU_S32440 diff -Nru a/arch/arm/mach-s3c2410/devs.h b/arch/arm/mach-s3c2410/devs.h --- a/arch/arm/mach-s3c2410/devs.h 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mach-s3c2410/devs.h 2005-03-07 14:54:16 -08:00 @@ -12,7 +12,11 @@ * Modifications: * 18-Aug-2004 BJD Created initial version * 27-Aug-2004 BJD Added timers 0 through 3 + * 10-Feb-2005 BJD Added camera from guillaume.gourat@nexvision.tv */ +#include + +extern struct platform_device *s3c24xx_uart_devs[]; extern struct platform_device s3c_device_usb; extern struct platform_device s3c_device_lcd; @@ -34,3 +38,11 @@ extern struct platform_device s3c_device_timer3; extern struct platform_device s3c_device_usbgadget; + +/* s3c2440 specific devices */ + +#ifdef CONFIG_CPU_S3C2440 + +extern struct platform_device s3c_device_camif; + +#endif diff -Nru a/arch/arm/mach-s3c2410/dma.c b/arch/arm/mach-s3c2410/dma.c --- a/arch/arm/mach-s3c2410/dma.c 2005-03-07 14:54:18 -08:00 +++ b/arch/arm/mach-s3c2410/dma.c 2005-03-07 14:54:18 -08:00 @@ -1,6 +1,6 @@ /* linux/arch/arm/mach-bast/dma.c * - * (c) 2003,2004 Simtec Electronics + * (c) 2003-2005 Simtec Electronics * Ben Dooks * * S3C2410 DMA core @@ -12,6 +12,7 @@ * published by the Free Software Foundation. * * Changelog: + * 27-Feb-2005 BJD Added kmem cache for dma descriptors * 18-Nov-2004 BJD Removed error for loading onto stopped channel * 10-Nov-2004 BJD Ensure all external symbols exported for modules * 10-Nov-2004 BJD Use sys_device and sysdev_class for power management @@ -57,6 +58,7 @@ /* io map for dma */ static void __iomem *dma_base; +static kmem_cache_t *dma_kmem; /* dma channel state information */ s3c2410_dma_chan_t s3c2410_chans[S3C2410_DMA_CHANNELS]; @@ -432,7 +434,7 @@ pr_debug("%s: id=%p, data=%08x, size=%d\n", __FUNCTION__, id, (unsigned int)data, size); - buf = (s3c2410_dma_buf_t *)kmalloc(sizeof(*buf), GFP_ATOMIC); + buf = kmem_cache_alloc(dma_kmem, GFP_ATOMIC); if (buf == NULL) { pr_debug("%s: out of memory (%d alloc)\n", __FUNCTION__, sizeof(*buf)); @@ -511,7 +513,7 @@ buf->magic = -1; if (magicok) { - kfree(buf); + kmem_cache_free(dma_kmem, buf); } else { printk("s3c2410_dma_freebuf: buff %p with bad magic\n", buf); } @@ -1128,6 +1130,14 @@ .resume = s3c2410_dma_resume, }; +/* kmem cache implementation */ + +static void s3c2410_dma_cache_ctor(void *p, kmem_cache_t *c, unsigned long f) +{ + memset(p, 0, sizeof(s3c2410_dma_buf_t)); +} + + /* initialisation code */ static int __init s3c2410_init_dma(void) @@ -1150,6 +1160,16 @@ goto err; } + dma_kmem = kmem_cache_create("dma_desc", sizeof(s3c2410_dma_buf_t), 0, + SLAB_HWCACHE_ALIGN, + s3c2410_dma_cache_ctor, NULL); + + if (dma_kmem == NULL) { + printk(KERN_ERR "dma failed to make kmem cache\n"); + ret = -ENOMEM; + goto err; + } + for (channel = 0; channel < S3C2410_DMA_CHANNELS; channel++) { cp = &s3c2410_chans[channel]; @@ -1181,6 +1201,7 @@ return 0; err: + kmem_cache_destroy(dma_kmem); iounmap(dma_base); dma_base = NULL; return ret; diff -Nru a/arch/arm/mach-s3c2410/irq.c b/arch/arm/mach-s3c2410/irq.c --- a/arch/arm/mach-s3c2410/irq.c 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mach-s3c2410/irq.c 2005-03-07 14:54:16 -08:00 @@ -57,6 +57,7 @@ #include #include +#include "cpu.h" #include "pm.h" #define irqdbf(x...) @@ -628,6 +629,7 @@ s3c_irq_demux_uart(IRQ_S3CUART_RX2, regs); } + /* s3c24xx_init_irq * * Initialise S3C2410 IRQ system @@ -771,3 +773,174 @@ irqdbf("s3c2410: registered interrupt handlers\n"); } + +/* s3c2440 irq code +*/ + +#ifdef CONFIG_CPU_S3C2440 + +/* WDT/AC97 */ + +static void s3c_irq_demux_wdtac97(unsigned int irq, + struct irqdesc *desc, + struct pt_regs *regs) +{ + unsigned int subsrc, submsk; + struct irqdesc *mydesc; + + /* read the current pending interrupts, and the mask + * for what it is available */ + + subsrc = __raw_readl(S3C2410_SUBSRCPND); + submsk = __raw_readl(S3C2410_INTSUBMSK); + + subsrc &= ~submsk; + subsrc >>= 13; + subsrc &= 3; + + if (subsrc != 0) { + if (subsrc & 1) { + mydesc = irq_desc + IRQ_S3C2440_WDT; + mydesc->handle( IRQ_S3C2440_WDT, mydesc, regs); + } + if (subsrc & 2) { + mydesc = irq_desc + IRQ_S3C2440_AC97; + mydesc->handle(IRQ_S3C2440_AC97, mydesc, regs); + } + } +} + + +#define INTMSK_WDT (1UL << (IRQ_WDT - IRQ_EINT0)) + +static void +s3c_irq_wdtac97_mask(unsigned int irqno) +{ + s3c_irqsub_mask(irqno, INTMSK_WDT, 3<<13); +} + +static void +s3c_irq_wdtac97_unmask(unsigned int irqno) +{ + s3c_irqsub_unmask(irqno, INTMSK_WDT); +} + +static void +s3c_irq_wdtac97_ack(unsigned int irqno) +{ + s3c_irqsub_maskack(irqno, INTMSK_WDT, 3<<13); +} + +static struct irqchip s3c_irq_wdtac97 = { + .mask = s3c_irq_wdtac97_mask, + .unmask = s3c_irq_wdtac97_unmask, + .ack = s3c_irq_wdtac97_ack, +}; + +/* camera irq */ + +static void s3c_irq_demux_cam(unsigned int irq, + struct irqdesc *desc, + struct pt_regs *regs) +{ + unsigned int subsrc, submsk; + struct irqdesc *mydesc; + + /* read the current pending interrupts, and the mask + * for what it is available */ + + subsrc = __raw_readl(S3C2410_SUBSRCPND); + submsk = __raw_readl(S3C2410_INTSUBMSK); + + subsrc &= ~submsk; + subsrc >>= 11; + subsrc &= 3; + + if (subsrc != 0) { + if (subsrc & 1) { + mydesc = irq_desc + IRQ_S3C2440_CAM_C; + mydesc->handle( IRQ_S3C2440_WDT, mydesc, regs); + } + if (subsrc & 2) { + mydesc = irq_desc + IRQ_S3C2440_CAM_P; + mydesc->handle(IRQ_S3C2440_AC97, mydesc, regs); + } + } +} + +#define INTMSK_CAM (1UL << (IRQ_CAM - IRQ_EINT0)) + +static void +s3c_irq_cam_mask(unsigned int irqno) +{ + s3c_irqsub_mask(irqno, INTMSK_CAM, 3<<11); +} + +static void +s3c_irq_cam_unmask(unsigned int irqno) +{ + s3c_irqsub_unmask(irqno, INTMSK_CAM); +} + +static void +s3c_irq_cam_ack(unsigned int irqno) +{ + s3c_irqsub_maskack(irqno, INTMSK_CAM, 3<<11); +} + +static struct irqchip s3c_irq_cam = { + .mask = s3c_irq_cam_mask, + .unmask = s3c_irq_cam_unmask, + .ack = s3c_irq_cam_ack, +}; + +static int s3c2440_irq_add(struct sys_device *sysdev) +{ + unsigned int irqno; + + printk("S3C2440: IRQ Support\n"); + + set_irq_chip(IRQ_NFCON, &s3c_irq_level_chip); + set_irq_handler(IRQ_NFCON, do_level_IRQ); + set_irq_flags(IRQ_NFCON, IRQF_VALID); + + /* add new chained handler for wdt, ac7 */ + + set_irq_chip(IRQ_WDT, &s3c_irq_level_chip); + set_irq_handler(IRQ_WDT, do_level_IRQ); + set_irq_chained_handler(IRQ_WDT, s3c_irq_demux_wdtac97); + + for (irqno = IRQ_S3C2440_WDT; irqno <= IRQ_S3C2440_AC97; irqno++) { + set_irq_chip(irqno, &s3c_irq_wdtac97); + set_irq_handler(irqno, do_level_IRQ); + set_irq_flags(irqno, IRQF_VALID); + } + + /* add chained handler for camera */ + + set_irq_chip(IRQ_CAM, &s3c_irq_level_chip); + set_irq_handler(IRQ_CAM, do_level_IRQ); + set_irq_chained_handler(IRQ_CAM, s3c_irq_demux_cam); + + for (irqno = IRQ_S3C2440_CAM_C; irqno <= IRQ_S3C2440_CAM_P; irqno++) { + set_irq_chip(irqno, &s3c_irq_cam); + set_irq_handler(irqno, do_level_IRQ); + set_irq_flags(irqno, IRQF_VALID); + } + + return 0; +} + +static struct sysdev_driver s3c2440_irq_driver = { + .add = s3c2440_irq_add, +}; + +static int s3c24xx_irq_driver(void) +{ + return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_irq_driver); +} + +arch_initcall(s3c24xx_irq_driver); + +#endif /* CONFIG_CPU_S3C2440 */ + diff -Nru a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c --- a/arch/arm/mach-s3c2410/mach-bast.c 2005-03-07 14:54:17 -08:00 +++ b/arch/arm/mach-s3c2410/mach-bast.c 2005-03-07 14:54:17 -08:00 @@ -23,6 +23,7 @@ * 04-Jan-2005 BJD New uart init call * 10-Jan-2005 BJD Removed include of s3c2410.h * 14-Jan-2005 BJD Add support for muitlple NAND devices + * 03-Mar-2005 BJD Ensured that bast-cpld.h is included */ #include @@ -39,6 +40,7 @@ #include #include +#include #include #include diff -Nru a/arch/arm/mach-s3c2410/mach-smdk2440.c b/arch/arm/mach-s3c2410/mach-smdk2440.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/mach-s3c2410/mach-smdk2440.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,133 @@ +/* linux/arch/arm/mach-s3c2410/mach-smdk2440.c + * + * Copyright (c) 2004,2005 Simtec Electronics + * Ben Dooks + * + * http://www.fluff.org/ben/smdk2440/ + * + * Thanks to Dimity Andric and TomTom for the loan of an SMDK2440. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Modifications: + * 01-Nov-2004 BJD Initial version + * 12-Nov-2004 BJD Updated for release + * 04-Jan-2005 BJD Fixes for pre-release + * 22-Feb-2005 BJD Updated for 2.6.11-rc5 relesa +*/ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +//#include +#include +#include +#include + +#include "s3c2410.h" +#include "s3c2440.h" +#include "clock.h" +#include "devs.h" +#include "cpu.h" +#include "pm.h" + +static struct map_desc smdk2440_iodesc[] __initdata = { + /* ISA IO Space map (memory space selected by A24) */ + + { S3C2410_VA_ISA_WORD, S3C2410_CS2, SZ_16M, MT_DEVICE }, + { S3C2410_VA_ISA_BYTE, S3C2410_CS2, SZ_16M, MT_DEVICE }, +}; + +#define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK +#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB +#define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE + +static struct s3c2410_uartcfg smdk2440_uartcfgs[] = { + [0] = { + .hwport = 0, + .flags = 0, + .ucon = 0x3c5, + .ulcon = 0x03, + .ufcon = 0x51, + }, + [1] = { + .hwport = 1, + .flags = 0, + .ucon = 0x3c5, + .ulcon = 0x03, + .ufcon = 0x51, + }, + /* IR port */ + [2] = { + .hwport = 2, + .flags = 0, + .ucon = 0x3c5, + .ulcon = 0x43, + .ufcon = 0x51, + } +}; + +static struct platform_device *smdk2440_devices[] __initdata = { + &s3c_device_usb, + &s3c_device_lcd, + &s3c_device_wdt, + &s3c_device_i2c, + &s3c_device_iis, +}; + +static struct s3c24xx_board smdk2440_board __initdata = { + .devices = smdk2440_devices, + .devices_count = ARRAY_SIZE(smdk2440_devices) +}; + +void __init smdk2440_map_io(void) +{ + s3c24xx_init_io(smdk2440_iodesc, ARRAY_SIZE(smdk2440_iodesc)); + s3c24xx_init_clocks(16934400); + s3c24xx_init_uarts(smdk2440_uartcfgs, ARRAY_SIZE(smdk2440_uartcfgs)); + s3c24xx_set_board(&smdk2440_board); +} + +void __init smdk2440_machine_init(void) +{ + /* Configure the LEDs (even if we have no LED support)*/ + + s3c2410_gpio_cfgpin(S3C2410_GPF4, S3C2410_GPF4_OUTP); + s3c2410_gpio_cfgpin(S3C2410_GPF5, S3C2410_GPF5_OUTP); + s3c2410_gpio_cfgpin(S3C2410_GPF6, S3C2410_GPF6_OUTP); + s3c2410_gpio_cfgpin(S3C2410_GPF7, S3C2410_GPF7_OUTP); + + s3c2410_gpio_setpin(S3C2410_GPF4, 0); + s3c2410_gpio_setpin(S3C2410_GPF5, 0); + s3c2410_gpio_setpin(S3C2410_GPF6, 0); + s3c2410_gpio_setpin(S3C2410_GPF7, 0); + + s3c2410_pm_init(); +} + +MACHINE_START(S3C2440, "SMDK2440") + MAINTAINER("Ben Dooks ") + BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, S3C2410_VA_UART) + BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) + + .init_irq = s3c24xx_init_irq, + .map_io = smdk2440_map_io, + .init_machine = smdk2440_machine_init, + .timer = &s3c24xx_timer, +MACHINE_END diff -Nru a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c --- a/arch/arm/mach-s3c2410/mach-vr1000.c 2005-03-07 14:54:18 -08:00 +++ b/arch/arm/mach-s3c2410/mach-vr1000.c 2005-03-07 14:54:18 -08:00 @@ -24,6 +24,7 @@ * 14-Jan-2005 BJD Added clock init * 15-Jan-2005 BJD Add serial port device definition * 20-Jan-2005 BJD Use UPF_IOREMAP for ports + * 10-Feb-2005 BJD Added power-off capability */ #include @@ -52,8 +53,8 @@ #include #include -//#include #include +#include #include "clock.h" #include "devs.h" @@ -269,6 +270,11 @@ .clocks_count = ARRAY_SIZE(vr1000_clocks), }; +static void vr1000_power_off(void) +{ + s3c2410_gpio_cfgpin(S3C2410_GPB9, S3C2410_GPB9_OUTP); + s3c2410_gpio_setpin(S3C2410_GPB9, 1); +} void __init vr1000_map_io(void) { @@ -284,6 +290,8 @@ s3c24xx_clkout1.parent = &s3c24xx_dclk1; s3c24xx_uclk.parent = &s3c24xx_clkout1; + + pm_power_off = vr1000_power_off; s3c24xx_init_io(vr1000_iodesc, ARRAY_SIZE(vr1000_iodesc)); s3c24xx_init_clocks(0); diff -Nru a/arch/arm/mach-s3c2410/s3c2410.c b/arch/arm/mach-s3c2410/s3c2410.c --- a/arch/arm/mach-s3c2410/s3c2410.c 2005-03-07 14:54:17 -08:00 +++ b/arch/arm/mach-s3c2410/s3c2410.c 2005-03-07 14:54:17 -08:00 @@ -17,7 +17,7 @@ * 21-Aug-2004 BJD Added new struct s3c2410_board handler * 28-Sep-2004 BJD Updates for new serial port bits * 04-Nov-2004 BJD Updated UART configuration process - * 10-Jan-2004 BJD Removed s3c2410_clock_tick_rate + * 10-Jan-2005 BJD Removed s3c2410_clock_tick_rate */ #include @@ -164,31 +164,32 @@ void __init s3c2410_init_clocks(int xtal) { unsigned long tmp; + unsigned long fclk; + unsigned long hclk; + unsigned long pclk; /* now we've got our machine bits initialised, work out what * clocks we've got */ - s3c24xx_fclk = s3c2410_get_pll(__raw_readl(S3C2410_MPLLCON), - s3c24xx_xtal); + fclk = s3c2410_get_pll(__raw_readl(S3C2410_MPLLCON), xtal); tmp = __raw_readl(S3C2410_CLKDIVN); /* work out clock scalings */ - s3c24xx_hclk = s3c24xx_fclk / ((tmp & S3C2410_CLKDIVN_HDIVN) ? 2 : 1); - s3c24xx_pclk = s3c24xx_hclk / ((tmp & S3C2410_CLKDIVN_PDIVN) ? 2 : 1); + hclk = fclk / ((tmp & S3C2410_CLKDIVN_HDIVN) ? 2 : 1); + pclk = hclk / ((tmp & S3C2410_CLKDIVN_PDIVN) ? 2 : 1); /* print brieft summary of clocks, etc */ printk("S3C2410: core %ld.%03ld MHz, memory %ld.%03ld MHz, peripheral %ld.%03ld MHz\n", - print_mhz(s3c24xx_fclk), print_mhz(s3c24xx_hclk), - print_mhz(s3c24xx_pclk)); + print_mhz(fclk), print_mhz(hclk), print_mhz(pclk)); /* initialise the clocks here, to allow other things like the * console to use them */ - s3c24xx_setup_clocks(); + s3c24xx_setup_clocks(xtal, fclk, hclk, pclk); } int __init s3c2410_init(void) diff -Nru a/arch/arm/mach-s3c2410/s3c2440.c b/arch/arm/mach-s3c2410/s3c2440.c --- a/arch/arm/mach-s3c2410/s3c2440.c 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mach-s3c2410/s3c2440.c 2005-03-07 14:54:16 -08:00 @@ -109,7 +109,6 @@ .resource = s3c_uart0_resource, }; - static struct platform_device s3c_uart1 = { .name = "s3c2440-uart", .id = 1, @@ -149,19 +148,6 @@ s3c2440_uart_count = uart; } -/* s3c2440 specific clock sources */ - -static struct clk s3c2440_clk_cam = { - .name = "camera", - .enable = s3c24xx_clkcon_enable, - .ctrlbit = S3C2440_CLKCON_CAMERA -}; - -static struct clk s3c2440_clk_ac97 = { - .name = "ac97", - .enable = s3c24xx_clkcon_enable, - .ctrlbit = S3C2440_CLKCON_CAMERA -}; #ifdef CONFIG_PM @@ -190,7 +176,7 @@ #define s3c2440_resume NULL #endif -static struct sysdev_class s3c2440_sysclass = { +struct sysdev_class s3c2440_sysclass = { set_kset_name("s3c2440-core"), .suspend = s3c2440_suspend, .resume = s3c2440_resume @@ -209,19 +195,24 @@ /* rename any peripherals used differing from the s3c2410 */ s3c_device_i2c.name = "s3c2440-i2c"; + + /* change irq for watchdog */ + + s3c_device_wdt.resource[1].start = IRQ_S3C2440_WDT; + s3c_device_wdt.resource[1].end = IRQ_S3C2440_WDT; } void __init s3c2440_init_clocks(int xtal) { unsigned long clkdiv; unsigned long camdiv; - int s3c2440_hdiv = 1; + unsigned long hclk, fclk, pclk; + int hdiv = 1; /* now we've got our machine bits initialised, work out what * clocks we've got */ - s3c24xx_fclk = s3c2410_get_pll(__raw_readl(S3C2410_MPLLCON), - s3c24xx_xtal) * 2; + fclk = s3c2410_get_pll(__raw_readl(S3C2410_MPLLCON), xtal) * 2; clkdiv = __raw_readl(S3C2410_CLKDIVN); camdiv = __raw_readl(S3C2440_CAMDIVN); @@ -230,63 +221,60 @@ switch (clkdiv & S3C2440_CLKDIVN_HDIVN_MASK) { case S3C2440_CLKDIVN_HDIVN_1: - s3c2440_hdiv = 1; + hdiv = 1; break; case S3C2440_CLKDIVN_HDIVN_2: - s3c2440_hdiv = 1; + hdiv = 1; break; case S3C2440_CLKDIVN_HDIVN_4_8: - s3c2440_hdiv = (camdiv & S3C2440_CAMDIVN_HCLK4_HALF) ? 8 : 4; + hdiv = (camdiv & S3C2440_CAMDIVN_HCLK4_HALF) ? 8 : 4; break; case S3C2440_CLKDIVN_HDIVN_3_6: - s3c2440_hdiv = (camdiv & S3C2440_CAMDIVN_HCLK3_HALF) ? 6 : 3; + hdiv = (camdiv & S3C2440_CAMDIVN_HCLK3_HALF) ? 6 : 3; break; } - s3c24xx_hclk = s3c24xx_fclk / s3c2440_hdiv; - s3c24xx_pclk = s3c24xx_hclk / ((clkdiv & S3C2440_CLKDIVN_PDIVN)? 2:1); + hclk = fclk / hdiv; + pclk = hclk / ((clkdiv & S3C2440_CLKDIVN_PDIVN)? 2:1); /* print brief summary of clocks, etc */ printk("S3C2440: core %ld.%03ld MHz, memory %ld.%03ld MHz, peripheral %ld.%03ld MHz\n", - print_mhz(s3c24xx_fclk), print_mhz(s3c24xx_hclk), - print_mhz(s3c24xx_pclk)); + print_mhz(fclk), print_mhz(hclk), print_mhz(pclk)); /* initialise the clocks here, to allow other things like the * console to use them, and to add new ones after the initialisation */ - s3c24xx_setup_clocks(); - - /* add s3c2440 specific clocks */ - - s3c2440_clk_cam.parent = clk_get(NULL, "hclk"); - s3c2440_clk_ac97.parent = clk_get(NULL, "pclk"); + s3c24xx_setup_clocks(xtal, fclk, hclk, pclk); +} - s3c24xx_register_clock(&s3c2440_clk_ac97); - s3c24xx_register_clock(&s3c2440_clk_cam); +/* need to register class before we actually register the device, and + * we also need to ensure that it has been initialised before any of the + * drivers even try to use it (even if not on an s3c2440 based system) + * as a driver which may support both 2410 and 2440 may try and use it. +*/ - clk_disable(&s3c2440_clk_ac97); - clk_disable(&s3c2440_clk_cam); +int __init s3c2440_core_init(void) +{ + return sysdev_class_register(&s3c2440_sysclass); } +core_initcall(s3c2440_core_init); + int __init s3c2440_init(void) { int ret; printk("S3C2440: Initialising architecture\n"); - ret = sysdev_class_register(&s3c2440_sysclass); - if (ret == 0) - ret = sysdev_register(&s3c2440_sysdev); - + ret = sysdev_register(&s3c2440_sysdev); if (ret != 0) printk(KERN_ERR "failed to register sysdev for s3c2440\n"); - - if (ret == 0) + else ret = platform_add_devices(s3c24xx_uart_devs, s3c2440_uart_count); return ret; diff -Nru a/arch/arm/mach-s3c2410/time.c b/arch/arm/mach-s3c2410/time.c --- a/arch/arm/mach-s3c2410/time.c 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mach-s3c2410/time.c 2005-03-07 14:54:16 -08:00 @@ -1,6 +1,6 @@ /* linux/arch/arm/mach-s3c2410/time.c * - * Copyright (C) 2003,2004 Simtec Electronics + * Copyright (C) 2003-2005 Simtec Electronics * Ben Dooks, * * This program is free software; you can redistribute it and/or modify @@ -23,6 +23,8 @@ #include #include #include +#include + #include #include #include @@ -33,6 +35,7 @@ #include #include #include +#include #include "clock.h" @@ -169,6 +172,9 @@ tcfg1 &= ~S3C2410_TCFG1_MUX4_MASK; tcfg1 |= S3C2410_TCFG1_MUX4_TCLK1; } else { + unsigned long pclk; + struct clk *clk; + /* for the h1940 (and others), we use the pclk from the core * to generate the timer values. since values around 50 to * 70MHz are not values we can directly generate the timer @@ -180,7 +186,18 @@ /* this is used as default if no other timer can be found */ - timer_usec_ticks = timer_mask_usec_ticks(6, s3c24xx_pclk); + clk = clk_get(NULL, "timers"); + if (IS_ERR(clk)) + panic("failed to get clock for system timer"); + + clk_use(clk); + clk_enable(clk); + + pclk = clk_get_rate(clk); + + /* configure clock tick */ + + timer_usec_ticks = timer_mask_usec_ticks(6, pclk); tcfg1 &= ~S3C2410_TCFG1_MUX4_MASK; tcfg1 |= S3C2410_TCFG1_MUX4_DIV2; @@ -188,7 +205,7 @@ tcfg0 &= ~S3C2410_TCFG_PRESCALER1_MASK; tcfg0 |= ((6 - 1) / 2) << S3C2410_TCFG_PRESCALER1_SHIFT; - tcnt = (s3c24xx_pclk / 6) / HZ; + tcnt = (pclk / 6) / HZ; } /* timers reload after counting zero, so reduce the count by 1 */ diff -Nru a/arch/arm/mach-sa1100/assabet.c b/arch/arm/mach-sa1100/assabet.c --- a/arch/arm/mach-sa1100/assabet.c 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mach-sa1100/assabet.c 2005-03-07 14:54:16 -08:00 @@ -259,9 +259,11 @@ unsigned long phys = __PREG(GPLR) & PMD_MASK; unsigned long virt = io_p2v(phys); int prot = PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_DOMAIN(DOMAIN_IO); - pmd_t pmd; - pmd_val(pmd) = phys | prot; - set_pmd(pmd_offset(pgd_offset_k(virt), virt), pmd); + pmd_t *pmd; + + pmd = pmd_offset(pgd_offset_k(virt), virt); + *pmd = __pmd(phys | prot); + flush_pmd_entry(pmd); } /* diff -Nru a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c --- a/arch/arm/mach-sa1100/neponset.c 2005-03-07 14:54:17 -08:00 +++ b/arch/arm/mach-sa1100/neponset.c 2005-03-07 14:54:17 -08:00 @@ -266,6 +266,7 @@ static struct resource smc91x_resources[] = { [0] = { + .name = "smc91x-regs", .start = SA1100_CS3_PHYS, .end = SA1100_CS3_PHYS + 0x01ffffff, .flags = IORESOURCE_MEM, @@ -276,6 +277,7 @@ .flags = IORESOURCE_IRQ, }, [2] = { + .name = "smc91x-attrib", .start = SA1100_CS3_PHYS + 0x02000000, .end = SA1100_CS3_PHYS + 0x03ffffff, .flags = IORESOURCE_MEM, diff -Nru a/arch/arm/mm/consistent.c b/arch/arm/mm/consistent.c --- a/arch/arm/mm/consistent.c 2005-03-07 14:54:17 -08:00 +++ b/arch/arm/mm/consistent.c 2005-03-07 14:54:17 -08:00 @@ -323,7 +323,7 @@ void dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, dma_addr_t handle) { struct vm_region *c; - unsigned long flags; + unsigned long flags, addr; pte_t *ptep; size = PAGE_ALIGN(size); @@ -342,11 +342,13 @@ } ptep = consistent_pte + CONSISTENT_OFFSET(c->vm_start); + addr = c->vm_start; do { - pte_t pte = ptep_get_and_clear(ptep); + pte_t pte = ptep_get_and_clear(&init_mm, addr, ptep); unsigned long pfn; ptep++; + addr += PAGE_SIZE; if (!pte_none(pte) && pte_present(pte)) { pfn = pte_pfn(pte); diff -Nru a/arch/arm/mm/fault-armv.c b/arch/arm/mm/fault-armv.c --- a/arch/arm/mm/fault-armv.c 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mm/fault-armv.c 2005-03-07 14:54:16 -08:00 @@ -54,7 +54,7 @@ * fault (ie, is old), we can safely ignore any issues. */ if (pte_present(entry) && pte_val(entry) & shared_pte_mask) { - flush_cache_page(vma, address); + flush_cache_page(vma, address, pte_pfn(entry)); pte_val(entry) &= ~shared_pte_mask; set_pte(pte, entry); flush_tlb_page(vma, address); @@ -115,7 +115,7 @@ if (aliases) adjust_pte(vma, addr); else - flush_cache_page(vma, addr); + flush_cache_page(vma, addr, page_to_pfn(page)); } /* diff -Nru a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c --- a/arch/arm/mm/flush.c 2005-03-07 14:54:17 -08:00 +++ b/arch/arm/mm/flush.c 2005-03-07 14:54:17 -08:00 @@ -56,7 +56,7 @@ if (!(mpnt->vm_flags & VM_MAYSHARE)) continue; offset = (pgoff - mpnt->vm_pgoff) << PAGE_SHIFT; - flush_cache_page(mpnt, mpnt->vm_start + offset); + flush_cache_page(mpnt, mpnt->vm_start + offset, page_to_pfn(page)); if (cache_is_vipt()) break; } diff -Nru a/arch/arm/mm/mm-armv.c b/arch/arm/mm/mm-armv.c --- a/arch/arm/mm/mm-armv.c 2005-03-07 14:54:17 -08:00 +++ b/arch/arm/mm/mm-armv.c 2005-03-07 14:54:17 -08:00 @@ -252,7 +252,25 @@ if (virt & (1 << 20)) pmdp++; - set_pmd(pmdp, __pmd(phys | prot)); + *pmdp = __pmd(phys | prot); + flush_pmd_entry(pmdp); +} + +/* + * Create a SUPER SECTION PGD between VIRT and PHYS with protection PROT + */ +static inline void +alloc_init_supersection(unsigned long virt, unsigned long phys, int prot) +{ + int i; + + for (i = 0; i < 16; i += 1) { + alloc_init_section(virt, phys & SUPERSECTION_MASK, + prot | PMD_SECT_SUPER); + + virt += (PGDIR_SIZE / 2); + phys += (PGDIR_SIZE / 2); + } } /* @@ -436,7 +454,8 @@ * Create the page directory entries and any necessary * page tables for the mapping specified by `md'. We * are able to cope here with varying sizes and address - * offsets, and we take full advantage of sections. + * offsets, and we take full advantage of sections and + * supersections. */ static void __init create_mapping(struct map_desc *md) { @@ -483,6 +502,30 @@ length -= PAGE_SIZE; } + /* N.B. ARMv6 supersections are only defined to work with domain 0. + * Since domain assignments can in fact be arbitrary, the + * 'domain == 0' check below is required to insure that ARMv6 + * supersections are only allocated for domain 0 regardless + * of the actual domain assignments in use. + */ + if (cpu_architecture() >= CPU_ARCH_ARMv6 && domain == 0) { + /* Align to supersection boundary */ + while ((virt & ~SUPERSECTION_MASK || (virt + off) & + ~SUPERSECTION_MASK) && length >= (PGDIR_SIZE / 2)) { + alloc_init_section(virt, virt + off, prot_sect); + + virt += (PGDIR_SIZE / 2); + length -= (PGDIR_SIZE / 2); + } + + while (length >= SUPERSECTION_SIZE) { + alloc_init_supersection(virt, virt + off, prot_sect); + + virt += SUPERSECTION_SIZE; + length -= SUPERSECTION_SIZE; + } + } + /* * A section mapping covers half a "pgdir" entry. */ @@ -526,8 +569,9 @@ if (cpu_arch <= CPU_ARCH_ARMv5) pmdval |= PMD_BIT4; pmd = pmd_offset(pgd + i, i << PGDIR_SHIFT); - set_pmd(pmd, __pmd(pmdval)); - set_pmd(pmd + 1, __pmd(pmdval + (1 << (PGDIR_SHIFT - 1)))); + pmd[0] = __pmd(pmdval); + pmd[1] = __pmd(pmdval + (1 << (PGDIR_SHIFT - 1))); + flush_pmd_entry(pmd); } } diff -Nru a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types --- a/arch/arm/tools/mach-types 2005-03-07 14:54:17 -08:00 +++ b/arch/arm/tools/mach-types 2005-03-07 14:54:17 -08:00 @@ -6,7 +6,7 @@ # To add an entry into this database, please see Documentation/arm/README, # or contact rmk@arm.linux.org.uk # -# Last update: Thu Jan 6 00:10:23 2005 +# Last update: Wed Mar 2 11:32:53 2005 # # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number # @@ -226,7 +226,7 @@ pnp1110 SA1100_PNP1110 PNP1110 215 csb226 ARCH_CSB226 CSB226 216 arnold SA1100_ARNOLD ARNOLD 217 -voiceblue SA1100_PSIBOARD PSIBOARD 218 +voiceblue MACH_VOICEBLUE VOICEBLUE 218 jz8028 ARCH_JZ8028 JZ8028 219 h5400 ARCH_H5400 H5400 220 forte SA1100_FORTE FORTE 221 @@ -381,7 +381,7 @@ spearhead ARCH_SPEARHEAD SPEARHEAD 370 pantera ARCH_PANTERA PANTERA 371 prayoglite ARCH_PRAYOGLITE PRAYOGLITE 372 -gumstik ARCH_GUMSTIK GUMSTIK 373 +gumstix ARCH_GUMSTIK GUMSTIK 373 rcube ARCH_RCUBE RCUBE 374 rea_olv ARCH_REA_OLV REA_OLV 375 pxa_iphone ARCH_PXA_IPHONE PXA_IPHONE 376 @@ -667,3 +667,44 @@ manga_ks8695 MACH_MANGA_KS8695 MANGA_KS8695 657 ajax MACH_AJAX AJAX 658 nec_mp900 MACH_NEC_MP900 NEC_MP900 659 +vvtk1000 MACH_VVTK1000 VVTK1000 661 +kafa MACH_KAFA KAFA 662 +vvtk3000 MACH_VVTK3000 VVTK3000 663 +pimx1 MACH_PIMX1 PIMX1 664 +ollie MACH_OLLIE OLLIE 665 +skymax MACH_SKYMAX SKYMAX 666 +jazz MACH_JAZZ JAZZ 667 +tel_t3 MACH_TEL_T3 TEL_T3 668 +aisino_fcr255 MACH_AISINO_FCR255 AISINO_FCR255 669 +btweb MACH_BTWEB BTWEB 670 +dbg_lh79520 MACH_DBG_LH79520 DBG_LH79520 671 +cm41xx MACH_CM41XX CM41XX 672 +ts72xx MACH_TS72XX TS72XX 673 +nggpxa MACH_NGGPXA NGGPXA 674 +csb535 MACH_CSB535 CSB535 675 +csb536 MACH_CSB536 CSB536 676 +pxa_trakpod MACH_PXA_TRAKPOD PXA_TRAKPOD 677 +praxis MACH_PRAXIS PRAXIS 678 +lh75411 MACH_LH75411 LH75411 679 +otom MACH_OTOM OTOM 680 +nexcoder_2440 MACH_NEXCODER_2440 NEXCODER_2440 681 +loox410 MACH_LOOX410 LOOX410 682 +westlake MACH_WESTLAKE WESTLAKE 683 +nsb MACH_NSB NSB 684 +esl_sarva_stn MACH_ESL_SARVA_STN ESL_SARVA_STN 685 +esl_sarva_tft MACH_ESL_SARVA_TFT ESL_SARVA_TFT 686 +esl_sarva_iad MACH_ESL_SARVA_IAD ESL_SARVA_IAD 687 +esl_sarva_acc MACH_ESL_SARVA_ACC ESL_SARVA_ACC 688 +typhoon MACH_TYPHOON TYPHOON 689 +cnav MACH_CNAV CNAV 690 +a730 MACH_A730 A730 691 +netstar MACH_NETSTAR NETSTAR 692 +supercon MACH_PHASEFALE_SUPERCON PHASEFALE_SUPERCON 693 +shiva1100 MACH_SHIVA1100 SHIVA1100 694 +etexsc MACH_ETEXSC ETEXSC 695 +ixdpg465 MACH_IXDPG465 IXDPG465 696 +a9m2410 MACH_A9M2410 A9M2410 697 +a9m2440 MACH_A9M2440 A9M2440 698 +a9m9750 MACH_A9M9750 A9M9750 699 +a9m9360 MACH_A9M9360 A9M9360 700 +unc90 MACH_UNC90 UNC90 701 diff -Nru a/arch/frv/mb93090-mb00/pci-frv.c b/arch/frv/mb93090-mb00/pci-frv.c --- a/arch/frv/mb93090-mb00/pci-frv.c 2005-03-07 14:54:16 -08:00 +++ b/arch/frv/mb93090-mb00/pci-frv.c 2005-03-07 14:54:16 -08:00 @@ -43,7 +43,7 @@ pci_read_config_dword(dev, reg, &check); if ((new ^ check) & ((new & PCI_BASE_ADDRESS_SPACE_IO) ? PCI_BASE_ADDRESS_IO_MASK : PCI_BASE_ADDRESS_MEM_MASK)) { printk(KERN_ERR "PCI: Error while updating region " - "%s/%d (%08x != %08x)\n", dev->slot_name, resource, + "%s/%d (%08x != %08x)\n", pci_name(dev), resource, new, check); } } @@ -128,7 +128,7 @@ continue; pr = pci_find_parent_resource(dev, r); if (!pr || request_resource(pr, r) < 0) - printk(KERN_ERR "PCI: Cannot allocate resource region %d of bridge %s\n", idx, dev->slot_name); + printk(KERN_ERR "PCI: Cannot allocate resource region %d of bridge %s\n", idx, pci_name(dev)); } } pcibios_allocate_bus_resources(&bus->children); diff -Nru a/arch/frv/mb93090-mb00/pci-vdk.c b/arch/frv/mb93090-mb00/pci-vdk.c --- a/arch/frv/mb93090-mb00/pci-vdk.c 2005-03-07 14:54:18 -08:00 +++ b/arch/frv/mb93090-mb00/pci-vdk.c 2005-03-07 14:54:18 -08:00 @@ -294,7 +294,7 @@ */ int i; - printk("PCI: Fixing base address flags for device %s\n", d->slot_name); + printk("PCI: Fixing base address flags for device %s\n", pci_name(d)); for(i=0; i<4; i++) d->resource[i].flags |= PCI_BASE_ADDRESS_SPACE_IO; } @@ -308,7 +308,7 @@ */ if ((d->class >> 8) != PCI_CLASS_STORAGE_IDE) return; - printk("PCI: IDE base address fixup for %s\n", d->slot_name); + printk("PCI: IDE base address fixup for %s\n", pci_name(d)); for(i=0; i<4; i++) { struct resource *r = &d->resource[i]; if ((r->start & ~0x80) == 0x374) { @@ -326,7 +326,7 @@ * There exist PCI IDE controllers which have utter garbage * in first four base registers. Ignore that. */ - printk("PCI: IDE base address trash cleared for %s\n", d->slot_name); + printk("PCI: IDE base address trash cleared for %s\n", pci_name(d)); for(i=0; i<4; i++) d->resource[i].start = d->resource[i].end = d->resource[i].flags = 0; } diff -Nru a/arch/i386/defconfig b/arch/i386/defconfig --- a/arch/i386/defconfig 2005-03-07 14:54:17 -08:00 +++ b/arch/i386/defconfig 2005-03-07 14:54:17 -08:00 @@ -802,7 +802,6 @@ # CONFIG_AGP_AMD is not set # CONFIG_AGP_AMD64 is not set CONFIG_AGP_INTEL=y -CONFIG_AGP_INTEL_MCH=m # CONFIG_AGP_NVIDIA is not set # CONFIG_AGP_SIS is not set # CONFIG_AGP_SWORKS is not set diff -Nru a/arch/i386/kernel/i386_ksyms.c b/arch/i386/kernel/i386_ksyms.c --- a/arch/i386/kernel/i386_ksyms.c 2005-03-07 14:54:18 -08:00 +++ b/arch/i386/kernel/i386_ksyms.c 2005-03-07 14:54:18 -08:00 @@ -97,6 +97,11 @@ EXPORT_SYMBOL(__get_user_2); EXPORT_SYMBOL(__get_user_4); +EXPORT_SYMBOL(__put_user_1); +EXPORT_SYMBOL(__put_user_2); +EXPORT_SYMBOL(__put_user_4); +EXPORT_SYMBOL(__put_user_8); + EXPORT_SYMBOL(strpbrk); EXPORT_SYMBOL(strstr); diff -Nru a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c --- a/arch/i386/kernel/process.c 2005-03-07 14:54:16 -08:00 +++ b/arch/i386/kernel/process.c 2005-03-07 14:54:16 -08:00 @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -828,3 +829,9 @@ return 0; } +unsigned long arch_align_stack(unsigned long sp) +{ + if (randomize_va_space) + sp -= get_random_int() % 8192; + return sp & ~0xf; +} diff -Nru a/arch/i386/kernel/signal.c b/arch/i386/kernel/signal.c --- a/arch/i386/kernel/signal.c 2005-03-07 14:54:17 -08:00 +++ b/arch/i386/kernel/signal.c 2005-03-07 14:54:17 -08:00 @@ -277,6 +277,18 @@ { int tmp, err = 0; + /* + * If TF is set due to a debugger (PT_DTRACE), clear the TF + * flag so that register information in the sigcontext is + * correct. + */ + if (unlikely(regs->eflags & TF_MASK)) { + if (likely(current->ptrace & PT_DTRACE)) { + current->ptrace &= ~PT_DTRACE; + regs->eflags &= ~TF_MASK; + } + } + tmp = 0; __asm__("movl %%gs,%0" : "=r"(tmp): "0"(tmp)); err |= __put_user(tmp, (unsigned int __user *)&sc->gs); diff -Nru a/arch/i386/lib/Makefile b/arch/i386/lib/Makefile --- a/arch/i386/lib/Makefile 2005-03-07 14:54:18 -08:00 +++ b/arch/i386/lib/Makefile 2005-03-07 14:54:18 -08:00 @@ -3,7 +3,7 @@ # -lib-y = checksum.o delay.o usercopy.o getuser.o memcpy.o strstr.o \ +lib-y = checksum.o delay.o usercopy.o getuser.o putuser.o memcpy.o strstr.o \ bitops.o lib-$(CONFIG_X86_USE_3DNOW) += mmx.o diff -Nru a/arch/i386/lib/putuser.S b/arch/i386/lib/putuser.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/i386/lib/putuser.S 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,87 @@ +/* + * __put_user functions. + * + * (C) Copyright 2005 Linus Torvalds + * + * These functions have a non-standard call interface + * to make them more efficient, especially as they + * return an error value in addition to the "real" + * return value. + */ +#include + + +/* + * __put_user_X + * + * Inputs: %eax[:%edx] contains the data + * %ecx contains the address + * + * Outputs: %eax is error code (0 or -EFAULT) + * + * These functions should not modify any other registers, + * as they get called from within inline assembly. + */ + +#define ENTER pushl %ebx ; GET_THREAD_INFO(%ebx) +#define EXIT popl %ebx ; ret + +.text +.align 4 +.globl __put_user_1 +__put_user_1: + ENTER + cmpl TI_addr_limit(%ebx),%ecx + jae bad_put_user +1: movb %al,(%ecx) + xorl %eax,%eax + EXIT + +.align 4 +.globl __put_user_2 +__put_user_2: + ENTER + movl TI_addr_limit(%ebx),%ebx + subl $1,%ebx + cmpl %ebx,%ecx + jae bad_put_user +2: movw %ax,(%ecx) + xorl %eax,%eax + EXIT + +.align 4 +.globl __put_user_4 +__put_user_4: + ENTER + movl TI_addr_limit(%ebx),%ebx + subl $3,%ebx + cmpl %ebx,%ecx + jae bad_put_user +3: movl %eax,(%ecx) + xorl %eax,%eax + EXIT + +.align 4 +.globl __put_user_8 +__put_user_8: + ENTER + movl TI_addr_limit(%ebx),%ebx + subl $7,%ebx + cmpl %ebx,%ecx + jae bad_put_user +4: movl %eax,(%ecx) +5: movl %edx,4(%ecx) + xorl %eax,%eax + EXIT + +bad_put_user: + movl $-14,%eax + EXIT + +.section __ex_table,"a" + .long 1b,bad_put_user + .long 2b,bad_put_user + .long 3b,bad_put_user + .long 4b,bad_put_user + .long 5b,bad_put_user +.previous diff -Nru a/arch/i386/mm/highmem.c b/arch/i386/mm/highmem.c --- a/arch/i386/mm/highmem.c 2005-03-07 14:54:17 -08:00 +++ b/arch/i386/mm/highmem.c 2005-03-07 14:54:17 -08:00 @@ -66,7 +66,7 @@ * force other mappings to Oops if they'll try to access * this pte without first remap it */ - pte_clear(kmap_pte-idx); + pte_clear(&init_mm, vaddr, kmap_pte-idx); __flush_tlb_one(vaddr); #endif diff -Nru a/arch/i386/mm/hugetlbpage.c b/arch/i386/mm/hugetlbpage.c --- a/arch/i386/mm/hugetlbpage.c 2005-03-07 14:54:18 -08:00 +++ b/arch/i386/mm/hugetlbpage.c 2005-03-07 14:54:18 -08:00 @@ -216,7 +216,7 @@ BUG_ON(end & (HPAGE_SIZE - 1)); for (address = start; address < end; address += HPAGE_SIZE) { - pte = ptep_get_and_clear(huge_pte_offset(mm, address)); + pte = ptep_get_and_clear(mm, address, huge_pte_offset(mm, address)); if (pte_none(pte)) continue; page = pte_page(pte); diff -Nru a/arch/i386/mm/mmap.c b/arch/i386/mm/mmap.c --- a/arch/i386/mm/mmap.c 2005-03-07 14:54:17 -08:00 +++ b/arch/i386/mm/mmap.c 2005-03-07 14:54:17 -08:00 @@ -26,6 +26,7 @@ #include #include +#include /* * Top of mmap area (just below the process stack). @@ -38,13 +39,17 @@ static inline unsigned long mmap_base(struct mm_struct *mm) { unsigned long gap = current->signal->rlim[RLIMIT_STACK].rlim_cur; + unsigned long random_factor = 0; + + if (current->flags & PF_RANDOMIZE) + random_factor = get_random_int() % (1024*1024); if (gap < MIN_GAP) gap = MIN_GAP; else if (gap > MAX_GAP) gap = MAX_GAP; - return TASK_SIZE - (gap & PAGE_MASK); + return PAGE_ALIGN(TASK_SIZE - gap - random_factor); } /* diff -Nru a/arch/i386/pci/acpi.c b/arch/i386/pci/acpi.c --- a/arch/i386/pci/acpi.c 2005-03-07 14:54:17 -08:00 +++ b/arch/i386/pci/acpi.c 2005-03-07 14:54:17 -08:00 @@ -37,21 +37,12 @@ * also do it here in case there are still broken drivers that * don't use pci_enable_device(). */ - printk(KERN_INFO "** Routing PCI interrupts for all devices because \"pci=routeirq\"\n"); - printk(KERN_INFO "** was specified. If this was required to make a driver work,\n"); - printk(KERN_INFO "** please email the output of \"lspci\" to bjorn.helgaas@hp.com\n"); - printk(KERN_INFO "** so I can fix the driver.\n"); + printk(KERN_INFO "PCI: Routing PCI interrupts for all devices because \"pci=routeirq\" specified\n"); while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) acpi_pci_irq_enable(dev); - } else { - printk(KERN_INFO "** PCI interrupts are no longer routed automatically. If this\n"); - printk(KERN_INFO "** causes a device to stop working, it is probably because the\n"); - printk(KERN_INFO "** driver failed to call pci_enable_device(). As a temporary\n"); - printk(KERN_INFO "** workaround, the \"pci=routeirq\" argument restores the old\n"); - printk(KERN_INFO "** behavior. If this argument makes the device work again,\n"); - printk(KERN_INFO "** please email the output of \"lspci\" to bjorn.helgaas@hp.com\n"); - printk(KERN_INFO "** so I can fix the driver.\n"); - } + } else + printk(KERN_INFO "PCI: If a device doesn't work, try \"pci=routeirq\". If it helps, post a report\n"); + #ifdef CONFIG_X86_IO_APIC if (acpi_ioapic) print_IO_APIC(); diff -Nru a/arch/i386/pci/direct.c b/arch/i386/pci/direct.c --- a/arch/i386/pci/direct.c 2005-03-07 14:54:16 -08:00 +++ b/arch/i386/pci/direct.c 2005-03-07 14:54:16 -08:00 @@ -13,7 +13,8 @@ #define PCI_CONF1_ADDRESS(bus, devfn, reg) \ (0x80000000 | (bus << 16) | (devfn << 8) | (reg & ~3)) -static int pci_conf1_read (int seg, int bus, int devfn, int reg, int len, u32 *value) +static int pci_conf1_read(unsigned int seg, unsigned int bus, + unsigned int devfn, int reg, int len, u32 *value) { unsigned long flags; @@ -41,7 +42,8 @@ return 0; } -static int pci_conf1_write (int seg, int bus, int devfn, int reg, int len, u32 value) +static int pci_conf1_write(unsigned int seg, unsigned int bus, + unsigned int devfn, int reg, int len, u32 value) { unsigned long flags; @@ -83,7 +85,8 @@ #define PCI_CONF2_ADDRESS(dev, reg) (u16)(0xC000 | (dev << 8) | reg) -static int pci_conf2_read(int seg, int bus, int devfn, int reg, int len, u32 *value) +static int pci_conf2_read(unsigned int seg, unsigned int bus, + unsigned int devfn, int reg, int len, u32 *value) { unsigned long flags; int dev, fn; @@ -121,7 +124,8 @@ return 0; } -static int pci_conf2_write (int seg, int bus, int devfn, int reg, int len, u32 value) +static int pci_conf2_write(unsigned int seg, unsigned int bus, + unsigned int devfn, int reg, int len, u32 value) { unsigned long flags; int dev, fn; diff -Nru a/arch/i386/pci/irq.c b/arch/i386/pci/irq.c --- a/arch/i386/pci/irq.c 2005-03-07 14:54:18 -08:00 +++ b/arch/i386/pci/irq.c 2005-03-07 14:54:18 -08:00 @@ -1031,56 +1031,55 @@ pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin); if (pin && !pcibios_lookup_irq(dev, 1) && !dev->irq) { - char *msg; - msg = ""; + char *msg = ""; + + pin--; /* interrupt pins are numbered starting from 1 */ + if (io_apic_assign_pci_irqs) { int irq; - if (pin) { - pin--; /* interrupt pins are numbered starting from 1 */ - irq = IO_APIC_get_PCI_irq_vector(dev->bus->number, PCI_SLOT(dev->devfn), pin); - /* - * Busses behind bridges are typically not listed in the MP-table. - * In this case we have to look up the IRQ based on the parent bus, - * parent slot, and pin number. The SMP code detects such bridged - * busses itself so we should get into this branch reliably. - */ - temp_dev = dev; - while (irq < 0 && dev->bus->parent) { /* go back to the bridge */ - struct pci_dev * bridge = dev->bus->self; - - pin = (pin + PCI_SLOT(dev->devfn)) % 4; - irq = IO_APIC_get_PCI_irq_vector(bridge->bus->number, - PCI_SLOT(bridge->devfn), pin); - if (irq >= 0) - printk(KERN_WARNING "PCI: using PPB %s[%c] to get irq %d\n", - pci_name(bridge), 'A' + pin, irq); - dev = bridge; - } - dev = temp_dev; - if (irq >= 0) { + irq = IO_APIC_get_PCI_irq_vector(dev->bus->number, PCI_SLOT(dev->devfn), pin); + /* + * Busses behind bridges are typically not listed in the MP-table. + * In this case we have to look up the IRQ based on the parent bus, + * parent slot, and pin number. The SMP code detects such bridged + * busses itself so we should get into this branch reliably. + */ + temp_dev = dev; + while (irq < 0 && dev->bus->parent) { /* go back to the bridge */ + struct pci_dev * bridge = dev->bus->self; + + pin = (pin + PCI_SLOT(dev->devfn)) % 4; + irq = IO_APIC_get_PCI_irq_vector(bridge->bus->number, + PCI_SLOT(bridge->devfn), pin); + if (irq >= 0) + printk(KERN_WARNING "PCI: using PPB %s[%c] to get irq %d\n", + pci_name(bridge), 'A' + pin, irq); + dev = bridge; + } + dev = temp_dev; + if (irq >= 0) { #ifdef CONFIG_PCI_MSI - if (!platform_legacy_irq(irq)) - irq = IO_APIC_VECTOR(irq); + if (!platform_legacy_irq(irq)) + irq = IO_APIC_VECTOR(irq); #endif - printk(KERN_INFO "PCI->APIC IRQ transform: %s[%c] -> IRQ %d\n", - pci_name(dev), 'A' + pin, irq); - dev->irq = irq; - return 0; - } else - msg = " Probably buggy MP table."; - } + printk(KERN_INFO "PCI->APIC IRQ transform: %s[%c] -> IRQ %d\n", + pci_name(dev), 'A' + pin, irq); + dev->irq = irq; + return 0; + } else + msg = " Probably buggy MP table."; } else if (pci_probe & PCI_BIOS_IRQ_SCAN) msg = ""; else msg = " Please try using pci=biosirq."; - + /* With IDE legacy devices the IRQ lookup failure is not a problem.. */ if (dev->class >> 8 == PCI_CLASS_STORAGE_IDE && !(dev->class & 0x5)) return 0; - + printk(KERN_WARNING "PCI: No IRQ known for interrupt pin %c of device %s.%s\n", - 'A' + pin - 1, pci_name(dev), msg); + 'A' + pin, pci_name(dev), msg); } /* VIA bridges use interrupt line for apic/pci steering across the V-Link */ diff -Nru a/arch/i386/pci/mmconfig.c b/arch/i386/pci/mmconfig.c --- a/arch/i386/pci/mmconfig.c 2005-03-07 14:54:17 -08:00 +++ b/arch/i386/pci/mmconfig.c 2005-03-07 14:54:17 -08:00 @@ -34,7 +34,8 @@ } } -static int pci_mmcfg_read(int seg, int bus, int devfn, int reg, int len, u32 *value) +static int pci_mmcfg_read(unsigned int seg, unsigned int bus, + unsigned int devfn, int reg, int len, u32 *value) { unsigned long flags; @@ -62,7 +63,8 @@ return 0; } -static int pci_mmcfg_write(int seg, int bus, int devfn, int reg, int len, u32 value) +static int pci_mmcfg_write(unsigned int seg, unsigned int bus, + unsigned int devfn, int reg, int len, u32 value) { unsigned long flags; diff -Nru a/arch/i386/pci/numa.c b/arch/i386/pci/numa.c --- a/arch/i386/pci/numa.c 2005-03-07 14:54:16 -08:00 +++ b/arch/i386/pci/numa.c 2005-03-07 14:54:16 -08:00 @@ -14,11 +14,12 @@ #define PCI_CONF1_MQ_ADDRESS(bus, devfn, reg) \ (0x80000000 | (BUS2LOCAL(bus) << 16) | (devfn << 8) | (reg & ~3)) -static int pci_conf1_mq_read (int seg, int bus, int devfn, int reg, int len, u32 *value) +static int pci_conf1_mq_read(unsigned int seg, unsigned int bus, + unsigned int devfn, int reg, int len, u32 *value) { unsigned long flags; - if (!value || (bus > MAX_MP_BUSSES) || (devfn > 255) || (reg > 255)) + if (!value || (bus >= MAX_MP_BUSSES) || (devfn > 255) || (reg > 255)) return -EINVAL; spin_lock_irqsave(&pci_config_lock, flags); @@ -42,11 +43,12 @@ return 0; } -static int pci_conf1_mq_write (int seg, int bus, int devfn, int reg, int len, u32 value) +static int pci_conf1_mq_write(unsigned int seg, unsigned int bus, + unsigned int devfn, int reg, int len, u32 value) { unsigned long flags; - if ((bus > MAX_MP_BUSSES) || (devfn > 255) || (reg > 255)) + if ((bus >= MAX_MP_BUSSES) || (devfn > 255) || (reg > 255)) return -EINVAL; spin_lock_irqsave(&pci_config_lock, flags); diff -Nru a/arch/i386/pci/pcbios.c b/arch/i386/pci/pcbios.c --- a/arch/i386/pci/pcbios.c 2005-03-07 14:54:18 -08:00 +++ b/arch/i386/pci/pcbios.c 2005-03-07 14:54:18 -08:00 @@ -172,7 +172,8 @@ return (int) (ret & 0xff00) >> 8; } -static int pci_bios_read (int seg, int bus, int devfn, int reg, int len, u32 *value) +static int pci_bios_read(unsigned int seg, unsigned int bus, + unsigned int devfn, int reg, int len, u32 *value) { unsigned long result = 0; unsigned long flags; @@ -227,7 +228,8 @@ return (int)((result & 0xff00) >> 8); } -static int pci_bios_write (int seg, int bus, int devfn, int reg, int len, u32 value) +static int pci_bios_write(unsigned int seg, unsigned int bus, + unsigned int devfn, int reg, int len, u32 value) { unsigned long result = 0; unsigned long flags; diff -Nru a/arch/ia64/ia32/ia32_entry.S b/arch/ia64/ia32/ia32_entry.S --- a/arch/ia64/ia32/ia32_entry.S 2005-03-07 14:54:17 -08:00 +++ b/arch/ia64/ia32/ia32_entry.S 2005-03-07 14:54:17 -08:00 @@ -494,7 +494,7 @@ data8 compat_sys_mq_notify data8 compat_sys_mq_getsetattr data8 sys_ni_syscall /* reserved for kexec */ - data8 sys32_waitid + data8 compat_sys_waitid // guard against failures to increase IA32_NR_syscalls .org ia32_syscall_table + 8*IA32_NR_syscalls diff -Nru a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c --- a/arch/ia64/ia32/sys_ia32.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ia64/ia32/sys_ia32.c 2005-03-07 14:54:17 -08:00 @@ -2633,32 +2633,6 @@ advice); } -asmlinkage long sys32_waitid(int which, compat_pid_t pid, - compat_siginfo_t __user *uinfo, int options, - struct compat_rusage __user *uru) -{ - siginfo_t info; - struct rusage ru; - long ret; - mm_segment_t old_fs = get_fs(); - - info.si_signo = 0; - set_fs (KERNEL_DS); - ret = sys_waitid(which, pid, (siginfo_t __user *) &info, options, - uru ? (struct rusage __user *) &ru : NULL); - set_fs (old_fs); - - if (ret < 0 || info.si_signo == 0) - return ret; - - if (uru && (ret = put_compat_rusage(&ru, uru))) - return ret; - - BUG_ON(info.si_code & __SI_MASK); - info.si_code |= __SI_CHLD; - return copy_siginfo_to_user32(uinfo, &info); -} - #ifdef NOTYET /* UNTESTED FOR IA64 FROM HERE DOWN */ asmlinkage long sys32_setreuid(compat_uid_t ruid, compat_uid_t euid) diff -Nru a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c --- a/arch/ia64/mm/hugetlbpage.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ia64/mm/hugetlbpage.c 2005-03-07 14:54:17 -08:00 @@ -244,7 +244,7 @@ continue; page = pte_page(*pte); put_page(page); - pte_clear(pte); + pte_clear(mm, address, pte); } mm->rss -= (end - start) >> PAGE_SHIFT; flush_tlb_range(vma, start, end); diff -Nru a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c --- a/arch/ia64/pci/pci.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ia64/pci/pci.c 2005-03-07 14:54:17 -08:00 @@ -3,9 +3,9 @@ * * Derived from bios32.c of i386 tree. * - * Copyright (C) 2002 Hewlett-Packard Co + * (c) Copyright 2002, 2005 Hewlett-Packard Development Company, L.P. * David Mosberger-Tang - * Bjorn Helgaas + * Bjorn Helgaas * Copyright (C) 2004 Silicon Graphics, Inc. * * Note: Above list of copyright holders is incomplete... @@ -27,26 +27,12 @@ #include #include #include - #include - - -#ifdef CONFIG_SMP -# include -#endif +#include #include #include -#undef DEBUG -#define DEBUG - -#ifdef DEBUG -#define DBG(x...) printk(x) -#else -#define DBG(x...) -#endif - static int pci_routeirq; /* @@ -55,23 +41,22 @@ * synchronization mechanism here. */ -#define PCI_SAL_ADDRESS(seg, bus, devfn, reg) \ - ((u64)(seg << 24) | (u64)(bus << 16) | \ - (u64)(devfn << 8) | (u64)(reg)) +#define PCI_SAL_ADDRESS(seg, bus, devfn, reg) \ + (((u64) seg << 24) | (bus << 16) | (devfn << 8) | (reg)) /* SAL 3.2 adds support for extended config space. */ #define PCI_SAL_EXT_ADDRESS(seg, bus, devfn, reg) \ - ((u64)(seg << 28) | (u64)(bus << 20) | \ - (u64)(devfn << 12) | (u64)(reg)) + (((u64) seg << 28) | (bus << 20) | (devfn << 12) | (reg)) static int -pci_sal_read (int seg, int bus, int devfn, int reg, int len, u32 *value) +pci_sal_read (unsigned int seg, unsigned int bus, unsigned int devfn, + int reg, int len, u32 *value) { - u64 addr, mode, data = 0; - int result = 0; + u64 addr, data = 0; + int mode, result; - if ((seg > 65535) || (bus > 255) || (devfn > 255) || (reg > 4095)) + if (!value || (seg > 65535) || (bus > 255) || (devfn > 255) || (reg > 4095)) return -EINVAL; if ((seg | reg) <= 255) { @@ -82,16 +67,19 @@ mode = 1; } result = ia64_sal_pci_config_read(addr, mode, len, &data); + if (result != 0) + return -EINVAL; *value = (u32) data; - - return result; + return 0; } static int -pci_sal_write (int seg, int bus, int devfn, int reg, int len, u32 value) +pci_sal_write (unsigned int seg, unsigned int bus, unsigned int devfn, + int reg, int len, u32 value) { - u64 addr, mode; + u64 addr; + int mode, result; if ((seg > 65535) || (bus > 255) || (devfn > 255) || (reg > 4095)) return -EINVAL; @@ -103,7 +91,10 @@ addr = PCI_SAL_EXT_ADDRESS(seg, bus, devfn, reg); mode = 1; } - return ia64_sal_pci_config_write(addr, mode, len, value); + result = ia64_sal_pci_config_write(addr, mode, len, value); + if (result != 0) + return -EINVAL; + return 0; } static struct pci_raw_ops pci_sal_ops = { @@ -160,21 +151,11 @@ * also do it here in case there are still broken drivers that * don't use pci_enable_device(). */ - printk(KERN_INFO "** Routing PCI interrupts for all devices because \"pci=routeirq\"\n"); - printk(KERN_INFO "** was specified. If this was required to make a driver work,\n"); - printk(KERN_INFO "** please email the output of \"lspci\" to bjorn.helgaas@hp.com\n"); - printk(KERN_INFO "** so I can fix the driver.\n"); + printk(KERN_INFO "PCI: Routing interrupts for all devices because \"pci=routeirq\" specified\n"); for_each_pci_dev(dev) acpi_pci_irq_enable(dev); - } else { - printk(KERN_INFO "** PCI interrupts are no longer routed automatically. If this\n"); - printk(KERN_INFO "** causes a device to stop working, it is probably because the\n"); - printk(KERN_INFO "** driver failed to call pci_enable_device(). As a temporary\n"); - printk(KERN_INFO "** workaround, the \"pci=routeirq\" argument restores the old\n"); - printk(KERN_INFO "** behavior. If this argument makes the device work again,\n"); - printk(KERN_INFO "** please email the output of \"lspci\" to bjorn.helgaas@hp.com\n"); - printk(KERN_INFO "** so I can fix the driver.\n"); - } + } else + printk(KERN_INFO "PCI: If a device doesn't work, try \"pci=routeirq\". If it helps, post a report\n"); return 0; } diff -Nru a/arch/mips/Kconfig b/arch/mips/Kconfig --- a/arch/mips/Kconfig 2005-03-07 14:54:17 -08:00 +++ b/arch/mips/Kconfig 2005-03-07 14:54:17 -08:00 @@ -122,10 +122,6 @@ The TANBAC TB0229 (VR4131DIMM) is a MIPS-based platform manufactured by TANBAC. Please refer to about VR4131DIMM. -config TANBAC_TB0219 - bool "Added TANBAC TB0219 Base board support" - depends on TANBAC_TB0229 - config VICTOR_MPC30X bool "Support for Victor MP-C303/304" select DMA_NONCOHERENT diff -Nru a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c --- a/arch/mips/kernel/ptrace.c 2005-03-07 14:54:18 -08:00 +++ b/arch/mips/kernel/ptrace.c 2005-03-07 14:54:18 -08:00 @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -307,7 +308,7 @@ { if (unlikely(current->audit_context)) { if (!entryexit) - audit_syscall_entry(current, regs->orig_eax, + audit_syscall_entry(current, regs->regs[2], regs->regs[4], regs->regs[5], regs->regs[6], regs->regs[7]); else diff -Nru a/arch/mips/mm/c-r3k.c b/arch/mips/mm/c-r3k.c --- a/arch/mips/mm/c-r3k.c 2005-03-07 14:54:17 -08:00 +++ b/arch/mips/mm/c-r3k.c 2005-03-07 14:54:17 -08:00 @@ -254,8 +254,7 @@ { } -static void r3k_flush_cache_page(struct vm_area_struct *vma, - unsigned long page) +static void r3k_flush_cache_page(struct vm_area_struct *vma, unsigned long page, unsigned long pfn) { } diff -Nru a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c --- a/arch/mips/mm/c-r4k.c 2005-03-07 14:54:18 -08:00 +++ b/arch/mips/mm/c-r4k.c 2005-03-07 14:54:18 -08:00 @@ -426,8 +426,7 @@ } } -static void r4k_flush_cache_page(struct vm_area_struct *vma, - unsigned long page) +static void r4k_flush_cache_page(struct vm_area_struct *vma, unsigned long page, unsigned long pfn) { struct flush_cache_page_args args; diff -Nru a/arch/mips/mm/c-sb1.c b/arch/mips/mm/c-sb1.c --- a/arch/mips/mm/c-sb1.c 2005-03-07 14:54:17 -08:00 +++ b/arch/mips/mm/c-sb1.c 2005-03-07 14:54:17 -08:00 @@ -160,8 +160,7 @@ * dcache first, then invalidate the icache. If the page isn't * executable, nothing is required. */ -static void local_sb1_flush_cache_page(struct vm_area_struct *vma, - unsigned long addr) +static void local_sb1_flush_cache_page(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn) { int cpu = smp_processor_id(); @@ -183,17 +182,18 @@ struct flush_cache_page_args { struct vm_area_struct *vma; unsigned long addr; + unsigned long pfn; }; static void sb1_flush_cache_page_ipi(void *info) { struct flush_cache_page_args *args = info; - local_sb1_flush_cache_page(args->vma, args->addr); + local_sb1_flush_cache_page(args->vma, args->addr, args->pfn); } /* Dirty dcache could be on another CPU, so do the IPIs */ -static void sb1_flush_cache_page(struct vm_area_struct *vma, unsigned long addr) +static void sb1_flush_cache_page(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn) { struct flush_cache_page_args args; @@ -203,10 +203,11 @@ addr &= PAGE_MASK; args.vma = vma; args.addr = addr; + args.pfn = pfn; on_each_cpu(sb1_flush_cache_page_ipi, (void *) &args, 1, 1); } #else -void sb1_flush_cache_page(struct vm_area_struct *vma, unsigned long addr) +void sb1_flush_cache_page(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn) __attribute__((alias("local_sb1_flush_cache_page"))); #endif diff -Nru a/arch/mips/mm/c-tx39.c b/arch/mips/mm/c-tx39.c --- a/arch/mips/mm/c-tx39.c 2005-03-07 14:54:18 -08:00 +++ b/arch/mips/mm/c-tx39.c 2005-03-07 14:54:18 -08:00 @@ -178,8 +178,7 @@ } } -static void tx39_flush_cache_page(struct vm_area_struct *vma, - unsigned long page) +static void tx39_flush_cache_page(struct vm_area_struct *vma, unsigned long page, unsigned long pfn) { int exec = vma->vm_flags & VM_EXEC; struct mm_struct *mm = vma->vm_mm; diff -Nru a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c --- a/arch/mips/mm/cache.c 2005-03-07 14:54:16 -08:00 +++ b/arch/mips/mm/cache.c 2005-03-07 14:54:16 -08:00 @@ -23,7 +23,7 @@ void (*flush_cache_mm)(struct mm_struct *mm); void (*flush_cache_range)(struct vm_area_struct *vma, unsigned long start, unsigned long end); -void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page); +void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page, unsigned long pfn); void (*flush_icache_range)(unsigned long start, unsigned long end); void (*flush_icache_page)(struct vm_area_struct *vma, struct page *page); diff -Nru a/arch/mips/mm/highmem.c b/arch/mips/mm/highmem.c --- a/arch/mips/mm/highmem.c 2005-03-07 14:54:16 -08:00 +++ b/arch/mips/mm/highmem.c 2005-03-07 14:54:16 -08:00 @@ -75,7 +75,7 @@ * force other mappings to Oops if they'll try to access * this pte without first remap it */ - pte_clear(kmap_pte-idx); + pte_clear(&init_mm, vaddr, kmap_pte-idx); local_flush_tlb_one(vaddr); #endif diff -Nru a/arch/mips/pci/pci-vr41xx.c b/arch/mips/pci/pci-vr41xx.c --- a/arch/mips/pci/pci-vr41xx.c 2005-03-07 14:54:18 -08:00 +++ b/arch/mips/pci/pci-vr41xx.c 2005-03-07 14:54:18 -08:00 @@ -288,4 +288,4 @@ return 0; } -early_initcall(vr41xx_pciu_init); +arch_initcall(vr41xx_pciu_init); diff -Nru a/arch/mips/pmc-sierra/yosemite/ht.c b/arch/mips/pmc-sierra/yosemite/ht.c --- a/arch/mips/pmc-sierra/yosemite/ht.c 2005-03-07 14:54:18 -08:00 +++ b/arch/mips/pmc-sierra/yosemite/ht.c 2005-03-07 14:54:18 -08:00 @@ -303,7 +303,7 @@ if (!r->start && r->end) { printk(KERN_ERR "PCI: Device %s not available because of " - "resource collisions\n", dev->slot_name); + "resource collisions\n", pci_name(dev)); return -EINVAL; } if (r->flags & IORESOURCE_IO) @@ -377,7 +377,7 @@ ((new & PCI_BASE_ADDRESS_SPACE_IO) ? PCI_BASE_ADDRESS_IO_MASK : PCI_BASE_ADDRESS_MEM_MASK)) { printk(KERN_ERR "PCI: Error while updating region " - "%s/%d (%08x != %08x)\n", dev->slot_name, resource, + "%s/%d (%08x != %08x)\n", pci_name(dev), resource, new, check); } } @@ -396,7 +396,7 @@ addresses kilobyte aligned. */ if (size > 0x100) { printk(KERN_ERR "PCI: I/O Region %s/%d too large" - " (%ld bytes)\n", dev->slot_name, + " (%ld bytes)\n", pci_name(dev), dev->resource - res, size); } diff -Nru a/arch/mips/vr41xx/common/bcu.c b/arch/mips/vr41xx/common/bcu.c --- a/arch/mips/vr41xx/common/bcu.c 2005-03-07 14:54:18 -08:00 +++ b/arch/mips/vr41xx/common/bcu.c 2005-03-07 14:54:18 -08:00 @@ -3,7 +3,7 @@ * * Copyright (C) 2002 MontaVista Software Inc. * Author: Yoichi Yuasa - * Copyright (C) 2003-2004 Yoichi Yuasa + * Copyright (C) 2003-2005 Yoichi Yuasa * * 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 @@ -28,20 +28,16 @@ * Yoichi Yuasa * - Added support for NEC VR4133. */ -#include -#include #include +#include #include #include #include #include -#define IO_MEM_RESOURCE_START 0UL -#define IO_MEM_RESOURCE_END 0x1fffffffUL - -#define CLKSPEEDREG_TYPE1 KSEG1ADDR(0x0b000014) -#define CLKSPEEDREG_TYPE2 KSEG1ADDR(0x0f000014) +#define CLKSPEEDREG_TYPE1 (void __iomem *)KSEG1ADDR(0x0b000014) +#define CLKSPEEDREG_TYPE2 (void __iomem *)KSEG1ADDR(0x0f000014) #define CLKSP(x) ((x) & 0x001f) #define CLKSP_VR4133(x) ((x) & 0x0007) @@ -63,11 +59,15 @@ return vr41xx_vtclock; } +EXPORT_SYMBOL_GPL(vr41xx_get_vtclock_frequency); + unsigned long vr41xx_get_tclock_frequency(void) { return vr41xx_tclock; } +EXPORT_SYMBOL_GPL(vr41xx_get_tclock_frequency); + static inline uint16_t read_clkspeed(void) { switch (current_cpu_data.cputype) { @@ -207,7 +207,7 @@ return tclock; } -static int __init vr41xx_bcu_init(void) +void vr41xx_calculate_clock_frequency(void) { unsigned long pclock; uint16_t clkspeed; @@ -217,11 +217,6 @@ pclock = calculate_pclock(clkspeed); vr41xx_vtclock = calculate_vtclock(clkspeed, pclock); vr41xx_tclock = calculate_tclock(clkspeed, pclock, vr41xx_vtclock); - - iomem_resource.start = IO_MEM_RESOURCE_START; - iomem_resource.end = IO_MEM_RESOURCE_END; - - return 0; } -early_initcall(vr41xx_bcu_init); +EXPORT_SYMBOL_GPL(vr41xx_calculate_clock_frequency); diff -Nru a/arch/mips/vr41xx/common/cmu.c b/arch/mips/vr41xx/common/cmu.c --- a/arch/mips/vr41xx/common/cmu.c 2005-03-07 14:54:16 -08:00 +++ b/arch/mips/vr41xx/common/cmu.c 2005-03-07 14:54:16 -08:00 @@ -3,7 +3,7 @@ * * Copyright (C) 2001-2002 MontaVista Software Inc. * Author: Yoichi Yuasa - * Copuright (C) 2003-2004 Yoichi Yuasa + * Copuright (C) 2003-2005 Yoichi Yuasa * * 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 @@ -29,6 +29,8 @@ * - Added support for NEC VR4133. */ #include +#include +#include #include #include #include @@ -37,8 +39,16 @@ #include #include -#define CMUCLKMSK_TYPE1 KSEG1ADDR(0x0b000060) -#define CMUCLKMSK_TYPE2 KSEG1ADDR(0x0f000060) +#define CMU_TYPE1_BASE 0x0b000060UL +#define CMU_TYPE1_SIZE 0x4 + +#define CMU_TYPE2_BASE 0x0f000060UL +#define CMU_TYPE2_SIZE 0x4 + +#define CMU_TYPE3_BASE 0x0f000060UL +#define CMU_TYPE3_SIZE 0x8 + +#define CMUCLKMSK 0x0 #define MSKPIU 0x0001 #define MSKSIU 0x0002 #define MSKAIU 0x0004 @@ -52,19 +62,17 @@ #define MSKFFIR 0x0400 #define MSKSCSI 0x1000 #define MSKPPCIU 0x2000 -#define CMUCLKMSK2 KSEG1ADDR(0x0f000064) +#define CMUCLKMSK2 0x4 #define MSKCEU 0x0001 #define MSKMAC0 0x0002 #define MSKMAC1 0x0004 -static uint32_t cmu_base; +static void __iomem *cmu_base; static uint16_t cmuclkmsk, cmuclkmsk2; static spinlock_t cmu_lock; -#define read_cmuclkmsk() readw(cmu_base) -#define read_cmuclkmsk2() readw(CMUCLKMSK2) -#define write_cmuclkmsk() writew(cmuclkmsk, cmu_base) -#define write_cmuclkmsk2() writew(cmuclkmsk2, CMUCLKMSK2) +#define cmu_read(offset) readw(cmu_base + (offset)) +#define cmu_write(offset, value) writew((value), cmu_base + (offset)) void vr41xx_supply_clock(vr41xx_clock_t clock) { @@ -120,13 +128,15 @@ if (clock == CEU_CLOCK || clock == ETHER0_CLOCK || clock == ETHER1_CLOCK) - write_cmuclkmsk2(); + cmu_write(CMUCLKMSK2, cmuclkmsk2); else - write_cmuclkmsk(); + cmu_write(CMUCLKMSK, cmuclkmsk); spin_unlock_irq(&cmu_lock); } +EXPORT_SYMBOL_GPL(vr41xx_supply_clock); + void vr41xx_mask_clock(vr41xx_clock_t clock) { spin_lock_irq(&cmu_lock); @@ -193,38 +203,55 @@ if (clock == CEU_CLOCK || clock == ETHER0_CLOCK || clock == ETHER1_CLOCK) - write_cmuclkmsk2(); + cmu_write(CMUCLKMSK2, cmuclkmsk2); else - write_cmuclkmsk(); + cmu_write(CMUCLKMSK, cmuclkmsk); spin_unlock_irq(&cmu_lock); } +EXPORT_SYMBOL_GPL(vr41xx_mask_clock); + static int __init vr41xx_cmu_init(void) { + unsigned long start, size; + switch (current_cpu_data.cputype) { case CPU_VR4111: case CPU_VR4121: - cmu_base = CMUCLKMSK_TYPE1; + start = CMU_TYPE1_BASE; + size = CMU_TYPE1_SIZE; break; case CPU_VR4122: case CPU_VR4131: - cmu_base = CMUCLKMSK_TYPE2; - break; + start = CMU_TYPE2_BASE; + size = CMU_TYPE2_SIZE; + break; case CPU_VR4133: - cmu_base = CMUCLKMSK_TYPE2; - cmuclkmsk2 = read_cmuclkmsk2(); + start = CMU_TYPE3_BASE; + size = CMU_TYPE3_SIZE; break; default: panic("Unexpected CPU of NEC VR4100 series"); break; } - cmuclkmsk = read_cmuclkmsk(); + if (request_mem_region(start, size, "CMU") == NULL) + return -EBUSY; + + cmu_base = ioremap(start, size); + if (cmu_base == NULL) { + release_mem_region(start, size); + return -EBUSY; + } + + cmuclkmsk = cmu_read(CMUCLKMSK); + if (current_cpu_data.cputype == CPU_VR4133) + cmuclkmsk2 = cmu_read(CMUCLKMSK2); spin_lock_init(&cmu_lock); return 0; } -early_initcall(vr41xx_cmu_init); +core_initcall(vr41xx_cmu_init); diff -Nru a/arch/mips/vr41xx/common/init.c b/arch/mips/vr41xx/common/init.c --- a/arch/mips/vr41xx/common/init.c 2005-03-07 14:54:17 -08:00 +++ b/arch/mips/vr41xx/common/init.c 2005-03-07 14:54:17 -08:00 @@ -1,7 +1,7 @@ /* * init.c, Common initialization routines for NEC VR4100 series. * - * Copyright (C) 2003-2004 Yoichi Yuasa + * Copyright (C) 2003-2005 Yoichi Yuasa * * 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 @@ -18,9 +18,20 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include +#include #include #include +#include + +#define IO_MEM_RESOURCE_START 0UL +#define IO_MEM_RESOURCE_END 0x1fffffffUL + +static void __init iomem_resource_init(void) +{ + iomem_resource.start = IO_MEM_RESOURCE_START; + iomem_resource.end = IO_MEM_RESOURCE_END; +} void __init prom_init(void) { @@ -35,6 +46,10 @@ if (i < (argc - 1)) strcat(arcs_cmdline, " "); } + + vr41xx_calculate_clock_frequency(); + + iomem_resource_init(); } unsigned long __init prom_free_prom_memory (void) diff -Nru a/arch/mips/vr41xx/common/ksyms.c b/arch/mips/vr41xx/common/ksyms.c --- a/arch/mips/vr41xx/common/ksyms.c 2005-03-07 14:54:16 -08:00 +++ b/arch/mips/vr41xx/common/ksyms.c 2005-03-07 14:54:16 -08:00 @@ -22,9 +22,6 @@ #include -EXPORT_SYMBOL(vr41xx_get_vtclock_frequency); -EXPORT_SYMBOL(vr41xx_get_tclock_frequency); - EXPORT_SYMBOL(vr41xx_set_rtclong1_cycle); EXPORT_SYMBOL(vr41xx_read_rtclong1_counter); EXPORT_SYMBOL(vr41xx_set_rtclong2_cycle); diff -Nru a/arch/mips/vr41xx/tanbac-tb0229/Makefile b/arch/mips/vr41xx/tanbac-tb0229/Makefile --- a/arch/mips/vr41xx/tanbac-tb0229/Makefile 2005-03-07 14:54:17 -08:00 +++ b/arch/mips/vr41xx/tanbac-tb0229/Makefile 2005-03-07 14:54:17 -08:00 @@ -3,5 +3,3 @@ # obj-y := setup.o - -obj-$(CONFIG_TANBAC_TB0219) += tb0219.o diff -Nru a/arch/mips/vr41xx/tanbac-tb0229/tb0219.c b/arch/mips/vr41xx/tanbac-tb0229/tb0219.c --- a/arch/mips/vr41xx/tanbac-tb0229/tb0219.c 2005-03-07 14:54:16 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,44 +0,0 @@ -/* - * tb0219.c, Setup for the TANBAC TB0219 - * - * Copyright (C) 2003 Megasolution Inc. - * Copyright (C) 2004 Yoichi Yuasa - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#include - -#include -#include - -#define TB0219_RESET_REGS KSEG1ADDR(0x0a00000e) - -#define tb0219_hard_reset() writew(0, TB0219_RESET_REGS) - -static void tanbac_tb0219_restart(char *command) -{ - local_irq_disable(); - tb0219_hard_reset(); - while (1); -} - -static int __init tanbac_tb0219_setup(void) -{ - _machine_restart = tanbac_tb0219_restart; - - return 0; -} - -early_initcall(tanbac_tb0219_setup); diff -Nru a/arch/parisc/Kconfig b/arch/parisc/Kconfig --- a/arch/parisc/Kconfig 2005-03-07 14:54:17 -08:00 +++ b/arch/parisc/Kconfig 2005-03-07 14:54:17 -08:00 @@ -6,8 +6,7 @@ mainmenu "Linux/PA-RISC Kernel Configuration" config PARISC - bool - default y + def_bool y help The PA-RISC microprocessor is designed by Hewlett-Packard and used in many of their workstations & servers (HP9000 700 and 800 series, @@ -15,19 +14,16 @@ at . config MMU - bool - default y + def_bool y config STACK_GROWSUP - bool - default y + def_bool y config UID16 bool config RWSEM_GENERIC_SPINLOCK - bool - default y + def_bool y config RWSEM_XCHGADD_ALGORITHM bool @@ -111,7 +107,7 @@ def_bool y depends on PA8X00 -config PARISC64 +config 64BIT bool "64-bit kernel" depends on PA8X00 help @@ -124,9 +120,6 @@ enable this option otherwise. The 64bit kernel is significantly bigger and slower than the 32bit one. -config 64BIT - def_bool PARISC64 - config SMP bool "Symmetric multi-processing support" ---help--- @@ -166,13 +159,12 @@ default n config COMPAT - bool - depends on PARISC64 - default y + def_bool y + depends on 64BIT config HPUX bool "Support for HP-UX binaries" - depends on !PARISC64 + depends on !64BIT config NR_CPUS int "Maximum number of CPUs (2-32)" diff -Nru a/arch/parisc/Makefile b/arch/parisc/Makefile --- a/arch/parisc/Makefile 2005-03-07 14:54:18 -08:00 +++ b/arch/parisc/Makefile 2005-03-07 14:54:18 -08:00 @@ -17,9 +17,12 @@ # Mike Shaver, Helge Deller and Martin K. Petersen # NM = sh $(srctree)/arch/parisc/nm -ifdef CONFIG_PARISC64 +CHECKFLAGS += -D__hppa__=1 + +ifdef CONFIG_64BIT CROSS_COMPILE := hppa64-linux- UTS_MACHINE := parisc64 +CHECKFLAGS += -D__LP64__=1 -m64 else MACHINE := $(subst 64,,$(shell uname -m)) ifneq ($(MACHINE),parisc) @@ -65,8 +68,12 @@ drivers-$(CONFIG_OPROFILE) += arch/parisc/oprofile/ +PALO := $(shell if which palo; then : ; \ + elif [ -x /sbin/palo ]; then echo /sbin/palo; \ + fi) + palo: vmlinux - @if [ $$(palo -f /dev/null >/dev/null 2>&1 ; echo $$?) != 2 ]; then \ + @if [ -x $PALO ]; then \ echo 'ERROR: Please install palo first (apt-get install palo)';\ echo 'or build it from source and install it somewhere in your $$PATH';\ false; \ @@ -78,7 +85,7 @@ echo 'WARNING: the "lifimage" file is now placed in this directory by default!'; \ false; \ fi - palo -f ./palo.conf + $(PALO) -f ./palo.conf oldpalo: vmlinux export TOPDIR=`pwd`; \ diff -Nru a/arch/parisc/configs/a500_defconfig b/arch/parisc/configs/a500_defconfig --- a/arch/parisc/configs/a500_defconfig 2005-03-07 14:54:16 -08:00 +++ b/arch/parisc/configs/a500_defconfig 2005-03-07 14:54:16 -08:00 @@ -1,12 +1,15 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10-pa5 -# Wed Jan 5 13:22:34 2005 +# Linux kernel version: 2.6.11-rc4-pa1 +# Wed Feb 16 11:32:49 2005 # CONFIG_PARISC=y CONFIG_MMU=y CONFIG_STACK_GROWSUP=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y # # Code maturity level options @@ -68,7 +71,6 @@ CONFIG_PA8X00=y CONFIG_PA20=y CONFIG_PREFETCH=y -CONFIG_PARISC64=y CONFIG_64BIT=y CONFIG_SMP=y CONFIG_HOTPLUG_CPU=y @@ -87,16 +89,12 @@ CONFIG_PCI_LBA=y CONFIG_IOSAPIC=y CONFIG_IOMMU_SBA=y -# CONFIG_SUPERIO is not set -# CONFIG_CHASSIS_LCD_LED is not set -CONFIG_PDC_CHASSIS=y # # PCCARD (PCMCIA/CardBus) support # CONFIG_PCCARD=m # CONFIG_PCMCIA_DEBUG is not set -# CONFIG_PCMCIA_OBSOLETE is not set CONFIG_PCMCIA=m CONFIG_CARDBUS=y @@ -107,6 +105,7 @@ CONFIG_PD6729=m CONFIG_I82092=m CONFIG_TCIC=m +CONFIG_PCCARD_NONSTATIC=m # # PCI Hotplug Support @@ -114,6 +113,14 @@ # CONFIG_HOTPLUG_PCI is not set # +# PA-RISC specific drivers +# +# CONFIG_SUPERIO is not set +# CONFIG_CHASSIS_LCD_LED is not set +CONFIG_PDC_CHASSIS=y +CONFIG_PDC_STABLE=y + +# # Executable file formats # CONFIG_BINFMT_ELF=y @@ -153,6 +160,7 @@ # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set CONFIG_BLK_DEV_UMEM=m +# 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 @@ -171,6 +179,7 @@ CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set # # ATA/ATAPI/MFM/RLL support @@ -205,6 +214,7 @@ # CONFIG_SCSI_SPI_ATTRS=y CONFIG_SCSI_FC_ATTRS=m +CONFIG_SCSI_ISCSI_ATTRS=m # # SCSI low-level drivers @@ -231,10 +241,10 @@ # CONFIG_SCSI_INITIO is not set # CONFIG_SCSI_INIA100 is not set CONFIG_SCSI_SYM53C8XX_2=y -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0 +CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -CONFIG_SCSI_SYM53C8XX_IOMAPPED=y +# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set # CONFIG_SCSI_IPR is not set # CONFIG_SCSI_PCI2000 is not set # CONFIG_SCSI_PCI2220I is not set @@ -249,7 +259,6 @@ CONFIG_SCSI_QLA2300=m CONFIG_SCSI_QLA2322=m CONFIG_SCSI_QLA6312=m -CONFIG_SCSI_QLA6322=m # CONFIG_SCSI_DC395x is not set # CONFIG_SCSI_DC390T is not set CONFIG_SCSI_DEBUG=m @@ -399,8 +408,6 @@ CONFIG_IP_NF_ARPTABLES=m CONFIG_IP_NF_ARPFILTER=m CONFIG_IP_NF_ARP_MANGLE=m -# CONFIG_IP_NF_COMPAT_IPCHAINS is not set -# CONFIG_IP_NF_COMPAT_IPFWADM is not set CONFIG_XFRM=y CONFIG_XFRM_USER=m @@ -465,7 +472,7 @@ # CONFIG_NET_TULIP=y CONFIG_DE2104X=m -CONFIG_TULIP=m +CONFIG_TULIP=y # CONFIG_TULIP_MWI is not set CONFIG_TULIP_MMIO=y # CONFIG_TULIP_NAPI is not set @@ -483,7 +490,6 @@ # CONFIG_FORCEDETH is not set # CONFIG_DGRS is not set CONFIG_EEPRO100=m -# CONFIG_EEPRO100_PIO is not set CONFIG_E100=m CONFIG_E100_NAPI=y # CONFIG_FEALNX is not set @@ -524,6 +530,7 @@ CONFIG_IXGB_NAPI=y CONFIG_S2IO=m CONFIG_S2IO_NAPI=y +# CONFIG_2BUFF_MODE is not set # # Token Ring devices @@ -691,7 +698,6 @@ # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set # @@ -733,9 +739,9 @@ # # Console display driver support # +CONFIG_DUMMY_CONSOLE=y CONFIG_DUMMY_CONSOLE_COLUMNS=160 CONFIG_DUMMY_CONSOLE_ROWS=64 -CONFIG_DUMMY_CONSOLE=y # # Sound @@ -764,6 +770,15 @@ # CONFIG_MMC is not set # +# InfiniBand support +# +CONFIG_INFINIBAND=m +CONFIG_INFINIBAND_MTHCA=m +# CONFIG_INFINIBAND_MTHCA_DEBUG is not set +CONFIG_INFINIBAND_IPOIB=m +# CONFIG_INFINIBAND_IPOIB_DEBUG is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -775,10 +790,16 @@ # CONFIG_REISERFS_FS is not set CONFIG_JFS_FS=m # CONFIG_JFS_POSIX_ACL is not set +# CONFIG_JFS_SECURITY is not set # CONFIG_JFS_DEBUG is not set # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y + +# +# XFS support +# CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y # CONFIG_XFS_RT is not set # CONFIG_XFS_QUOTA is not set # CONFIG_XFS_SECURITY is not set @@ -786,7 +807,7 @@ # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set -# CONFIG_DNOTIFY is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set CONFIG_AUTOFS4_FS=y @@ -817,7 +838,8 @@ CONFIG_SYSFS=y # CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set -# CONFIG_TMPFS is not set +CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLBFS is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -935,6 +957,8 @@ # CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_IOREMAP is not set +# CONFIG_DEBUG_FS is not set # CONFIG_DEBUG_RWLOCK is not set # @@ -971,6 +995,10 @@ CONFIG_CRYPTO_MICHAEL_MIC=m CONFIG_CRYPTO_CRC32C=m CONFIG_CRYPTO_TEST=m + +# +# Hardware crypto devices +# # # Library routines diff -Nru a/arch/parisc/configs/n4000_defconfig b/arch/parisc/configs/n4000_defconfig --- a/arch/parisc/configs/n4000_defconfig 2005-03-07 14:54:18 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,927 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.10-pa5 -# Wed Jan 5 13:40:36 2005 -# -CONFIG_PARISC=y -CONFIG_MMU=y -CONFIG_STACK_GROWSUP=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -# CONFIG_CLEAN_COMPILE is not set -CONFIG_BROKEN=y -CONFIG_BROKEN_ON_SMP=y - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=16 -CONFIG_HOTPLUG=y -CONFIG_KOBJECT_UEVENT=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_EMBEDDED=y -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_FUTEX=y -CONFIG_EPOLL=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 -# CONFIG_TINY_SHMEM is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_OBSOLETE_MODPARM=y -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y - -# -# Processor type and features -# -# CONFIG_PA7000 is not set -# CONFIG_PA7100LC is not set -# CONFIG_PA7200 is not set -# CONFIG_PA7300LC is not set -CONFIG_PA8X00=y -CONFIG_PA20=y -CONFIG_PREFETCH=y -CONFIG_PARISC64=y -CONFIG_64BIT=y -# CONFIG_SMP is not set -CONFIG_DISCONTIGMEM=y -# CONFIG_PREEMPT is not set -CONFIG_COMPAT=y - -# -# Bus options (PCI, PCMCIA, EISA, GSC, ISA) -# -# CONFIG_GSC is not set -CONFIG_PCI=y -CONFIG_PCI_LEGACY_PROC=y -CONFIG_PCI_NAMES=y -CONFIG_PCI_LBA=y -CONFIG_IOSAPIC=y -CONFIG_IOMMU_SBA=y -# CONFIG_SUPERIO is not set -CONFIG_CHASSIS_LCD_LED=y -# CONFIG_PDC_CHASSIS is not set - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# PC-card bridges -# - -# -# PCI Hotplug Support -# -# CONFIG_HOTPLUG_PCI is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_MISC is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -# CONFIG_STANDALONE is not set -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -CONFIG_BLK_DEV_UMEM=m -CONFIG_BLK_DEV_LOOP=y -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_SX8 is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=6144 -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_CDROM_PKTCDVD=m -CONFIG_CDROM_PKTCDVD_BUFFERS=8 -# CONFIG_CDROM_PKTCDVD_WCACHE is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y - -# -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -CONFIG_SCSI=y -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -CONFIG_CHR_DEV_ST=y -# CONFIG_CHR_DEV_OSST is not set -CONFIG_BLK_DEV_SR=y -# CONFIG_BLK_DEV_SR_VENDOR is not set -CONFIG_CHR_DEV_SG=y - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=y -CONFIG_SCSI_FC_ATTRS=m - -# -# SCSI low-level drivers -# -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_ADVANSYS is not set -# CONFIG_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_CPQFCTS is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_EATA_PIO is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_GDTH is not set -# CONFIG_SCSI_IPS is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -CONFIG_SCSI_SYM53C8XX_2=y -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -CONFIG_SCSI_SYM53C8XX_IOMAPPED=y -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_PCI2000 is not set -# CONFIG_SCSI_PCI2220I is not set -# CONFIG_SCSI_QLOGIC_ISP is not set -CONFIG_SCSI_QLOGIC_FC=m -# CONFIG_SCSI_QLOGIC_FC_FIRMWARE is not set -CONFIG_SCSI_QLOGIC_1280=m -# CONFIG_SCSI_QLOGIC_1280_1040 is not set -CONFIG_SCSI_QLA2XXX=y -# CONFIG_SCSI_QLA21XX is not set -# CONFIG_SCSI_QLA22XX is not set -CONFIG_SCSI_QLA2300=m -CONFIG_SCSI_QLA2322=m -CONFIG_SCSI_QLA6312=m -CONFIG_SCSI_QLA6322=m -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -CONFIG_SCSI_DEBUG=m - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=y -CONFIG_MD_RAID0=y -CONFIG_MD_RAID1=y -# CONFIG_MD_RAID10 is not set -# CONFIG_MD_RAID5 is not set -# CONFIG_MD_RAID6 is not set -# CONFIG_MD_MULTIPATH is not set -# CONFIG_MD_FAULTY is not set -# CONFIG_BLK_DEV_DM is not set - -# -# Fusion MPT device support -# -CONFIG_FUSION=m -CONFIG_FUSION_MAX_SGE=40 -CONFIG_FUSION_CTL=m - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Networking support -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_NETLINK_DEV=y -CONFIG_UNIX=y -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -# CONFIG_SYN_COOKIES is not set -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_TUNNEL is not set -CONFIG_IP_TCPDIAG=y -# CONFIG_IP_TCPDIAG_IPV6 is not set - -# -# IP: Virtual Server Configuration -# -# CONFIG_IP_VS is not set -# CONFIG_IPV6 is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -# CONFIG_IP_NF_CT_ACCT is not set -# CONFIG_IP_NF_CONNTRACK_MARK is not set -# CONFIG_IP_NF_CT_PROTO_SCTP is not set -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_LIMIT=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_MAC=m -CONFIG_IP_NF_MATCH_PKTTYPE=m -CONFIG_IP_NF_MATCH_MARK=m -CONFIG_IP_NF_MATCH_MULTIPORT=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m -CONFIG_IP_NF_MATCH_LENGTH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_TCPMSS=m -CONFIG_IP_NF_MATCH_HELPER=m -CONFIG_IP_NF_MATCH_STATE=m -CONFIG_IP_NF_MATCH_CONNTRACK=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_REALM=m -CONFIG_IP_NF_MATCH_SCTP=m -CONFIG_IP_NF_MATCH_COMMENT=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_MARK=m -CONFIG_IP_NF_TARGET_CLASSIFY=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_TARGET_NOTRACK=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m -# CONFIG_IP_NF_COMPAT_IPCHAINS is not set -# CONFIG_IP_NF_COMPAT_IPFWADM is not set -CONFIG_XFRM=y -CONFIG_XFRM_USER=m - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -CONFIG_LLC=m -CONFIG_LLC2=m -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set -CONFIG_NET_CLS_ROUTE=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -CONFIG_NETDEVICES=y -CONFIG_DUMMY=m -CONFIG_BONDING=m -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m -# CONFIG_ETHERTAP is not set - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=y -CONFIG_TULIP=y -# CONFIG_TULIP_MWI is not set -CONFIG_TULIP_MMIO=y -# CONFIG_TULIP_NAPI is not set -# CONFIG_DE4X5 is not set -# CONFIG_WINBOND_840 is not set -# CONFIG_DM9102 is not set -CONFIG_HP100=m -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -# CONFIG_AMD8111_ETH is not set -# CONFIG_ADAPTEC_STARFIRE is not set -# CONFIG_B44 is not set -# CONFIG_FORCEDETH is not set -# CONFIG_DGRS is not set -CONFIG_EEPRO100=m -# CONFIG_EEPRO100_PIO is not set -CONFIG_E100=m -CONFIG_E100_NAPI=y -# CONFIG_FEALNX is not set -CONFIG_NATSEMI=m -# CONFIG_NE2K_PCI is not set -# CONFIG_8139CP is not set -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -# CONFIG_8139TOO_8129 is not set -# CONFIG_8139_OLD_RX_RESET is not set -# CONFIG_SIS900 is not set -CONFIG_EPIC100=m -# CONFIG_SUNDANCE is not set -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -CONFIG_ACENIC_OMIT_TIGON_I=y -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -# CONFIG_NS83820 is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_R8169 is not set -# CONFIG_SK98LIN is not set -# CONFIG_VIA_VELOCITY is not set -CONFIG_TIGON3=m - -# -# Ethernet (10000 Mbit) -# -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y - -# -# Token Ring devices -# -# CONFIG_TR is not set - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -# CONFIG_STRIP is not set - -# -# Wireless 802.11b ISA/PCI cards support -# -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_PCI_HERMES=m -# CONFIG_ATMEL is not set - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -# CONFIG_PRISM54 is not set -CONFIG_NET_WIRELESS=y - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -CONFIG_PPP=m -# CONFIG_PPP_MULTILINK is not set -# CONFIG_PPP_FILTER is not set -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -# CONFIG_PPPOE is not set -# CONFIG_SLIP is not set -# CONFIG_NET_FC is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -# CONFIG_INPUT_EVDEV is not set -# CONFIG_INPUT_EVBUG is not set - -# -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -# CONFIG_SERIO is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_NR_UARTS=8 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -# CONFIG_SERIAL_8250_DETECT_IRQ is not set -# CONFIG_SERIAL_8250_MULTIPORT is not set -# CONFIG_SERIAL_8250_RSA is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_MUX is not set -CONFIG_PDC_CONSOLE=y -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -CONFIG_GEN_RTC=y -CONFIG_GEN_RTC_X=y -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_AGP is not set -# CONFIG_DRM is not set -CONFIG_RAW_DRIVER=y -CONFIG_MAX_RAW_DEVS=256 - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Misc devices -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -# CONFIG_FB is not set - -# -# Console display driver support -# -CONFIG_DUMMY_CONSOLE_COLUMNS=160 -CONFIG_DUMMY_CONSOLE_ROWS=64 -CONFIG_DUMMY_CONSOLE=y - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -# CONFIG_USB is not set -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y - -# -# 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 - -# -# File systems -# -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set -CONFIG_EXT3_FS=y -# CONFIG_EXT3_FS_XATTR is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -# CONFIG_REISERFS_FS is not set -CONFIG_JFS_FS=m -# CONFIG_JFS_POSIX_ACL is not set -# CONFIG_JFS_DEBUG is not set -# CONFIG_JFS_STATISTICS is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_XFS_FS=m -# CONFIG_XFS_RT is not set -# CONFIG_XFS_QUOTA is not set -# CONFIG_XFS_SECURITY is not set -# CONFIG_XFS_POSIX_ACL is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_QUOTA is not set -# CONFIG_DNOTIFY is not set -# CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=y - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -# CONFIG_ZISOFS is not set -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -# CONFIG_DEVFS_FS is not set -# CONFIG_DEVPTS_FS_XATTR is not set -CONFIG_TMPFS=y -# CONFIG_TMPFS_XATTR is not set -# CONFIG_HUGETLBFS is not set -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_CRAMFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_ROOT_NFS=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -CONFIG_RPCSEC_GSS_KRB5=y -# CONFIG_RPCSEC_GSS_SPKM3 is not set -CONFIG_SMB_FS=m -CONFIG_SMB_NLS_DEFAULT=y -CONFIG_SMB_NLS_REMOTE="cp437" -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -# CONFIG_CIFS_XATTR is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=m -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -CONFIG_NLS_CODEPAGE_863=m -# CONFIG_NLS_CODEPAGE_864 is not set -CONFIG_NLS_CODEPAGE_865=m -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_950 is not set -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -# CONFIG_NLS_ASCII is not set -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -CONFIG_NLS_ISO8859_15=m -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -CONFIG_NLS_UTF8=m - -# -# Profiling support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m - -# -# Kernel hacking -# -CONFIG_DEBUG_KERNEL=y -CONFIG_MAGIC_SYSRQ=y -# CONFIG_SCHEDSTATS is not set -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_INFO is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -# CONFIG_CRYPTO_ARC4 is not set -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m -# CONFIG_CRYPTO_MICHAEL_MIC is not set -CONFIG_CRYPTO_CRC32C=m -CONFIG_CRYPTO_TEST=m - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=m -CONFIG_ZLIB_DEFLATE=m diff -Nru a/arch/parisc/kernel/Makefile b/arch/parisc/kernel/Makefile --- a/arch/parisc/kernel/Makefile 2005-03-07 14:54:16 -08:00 +++ b/arch/parisc/kernel/Makefile 2005-03-07 14:54:16 -08:00 @@ -19,6 +19,6 @@ obj-$(CONFIG_PA11) += pci-dma.o obj-$(CONFIG_PCI) += pci.o obj-$(CONFIG_MODULES) += module.o -obj-$(CONFIG_PARISC64) += binfmt_elf32.o sys_parisc32.o ioctl32.o signal32.o +obj-$(CONFIG_64BIT) += binfmt_elf32.o sys_parisc32.o ioctl32.o signal32.o # only supported for PCX-W/U in 64-bit mode at the moment -obj-$(CONFIG_PARISC64) += perf.o perf_asm.o +obj-$(CONFIG_64BIT) += perf.o perf_asm.o diff -Nru a/arch/parisc/kernel/drivers.c b/arch/parisc/kernel/drivers.c --- a/arch/parisc/kernel/drivers.c 2005-03-07 14:54:18 -08:00 +++ b/arch/parisc/kernel/drivers.c 2005-03-07 14:54:18 -08:00 @@ -10,7 +10,7 @@ * Copyright (c) 2001 Matthew Wilcox for Hewlett Packard * Copyright (c) 2001 Helge Deller * Copyright (c) 2001,2002 Ryan Bradetich - * Copyright (c) 2004 Thibaut VARENE + * Copyright (c) 2004-2005 Thibaut VARENE * * The file handles registering devices and drivers, then matching them. * It's the closest we get to a dating agency. @@ -610,6 +610,24 @@ return parse_tree_node(parent, 6, modpath); } EXPORT_SYMBOL(hwpath_to_device); + +/** + * device_to_hwpath - Populates the hwpath corresponding to the given device. + * @param dev the target device + * @param path pointer to a previously allocated hwpath struct to be filled in + */ +void device_to_hwpath(struct device *dev, struct hardware_path *path) +{ + struct parisc_device *padev; + if (dev->bus == &parisc_bus_type) { + padev = to_parisc_device(dev); + get_node_path(dev->parent, path); + path->mod = padev->hw_path; + } else if (is_pci_dev(dev)) { + get_node_path(dev, path); + } +} +EXPORT_SYMBOL(device_to_hwpath); #define BC_PORT_MASK 0x8 #define BC_LOWER_PORT 0x8 diff -Nru a/arch/parisc/kernel/pacache.S b/arch/parisc/kernel/pacache.S --- a/arch/parisc/kernel/pacache.S 2005-03-07 14:54:16 -08:00 +++ b/arch/parisc/kernel/pacache.S 2005-03-07 14:54:16 -08:00 @@ -27,17 +27,17 @@ */ #ifdef __LP64__ -#define ADDIB addib,* -#define CMPB cmpb,* -#define ANDCM andcm,* +#define ADDIB addib,* +#define CMPB cmpb,* +#define ANDCM andcm,* - .level 2.0w + .level 2.0w #else -#define ADDIB addib, -#define CMPB cmpb, -#define ANDCM andcm +#define ADDIB addib, +#define CMPB cmpb, +#define ANDCM andcm - .level 2.0 + .level 2.0 #endif #include @@ -46,7 +46,7 @@ #include .text - .align 128 + .align 128 .export flush_tlb_all_local,code @@ -68,7 +68,7 @@ * consolidated. */ - rsm PSW_SM_I,%r19 /* relied upon translation! PA 2.0 Arch. F-5 */ + rsm PSW_SM_I, %r19 /* relied upon translation! PA 2.0 Arch. F-5 */ nop nop nop @@ -77,127 +77,127 @@ nop nop - rsm PSW_SM_Q,%r0 /* Turn off Q bit to load iia queue */ - ldil L%REAL_MODE_PSW, %r1 - ldo R%REAL_MODE_PSW(%r1), %r1 - mtctl %r1, %cr22 - mtctl %r0, %cr17 /* Clear IIASQ tail */ - mtctl %r0, %cr17 /* Clear IIASQ head */ - ldil L%PA(1f),%r1 - ldo R%PA(1f)(%r1),%r1 - mtctl %r1, %cr18 /* IIAOQ head */ - ldo 4(%r1), %r1 - mtctl %r1, %cr18 /* IIAOQ tail */ + rsm PSW_SM_Q, %r0 /* Turn off Q bit to load iia queue */ + ldil L%REAL_MODE_PSW, %r1 + ldo R%REAL_MODE_PSW(%r1), %r1 + mtctl %r1, %cr22 + mtctl %r0, %cr17 /* Clear IIASQ tail */ + mtctl %r0, %cr17 /* Clear IIASQ head */ + ldil L%PA(1f), %r1 + ldo R%PA(1f)(%r1), %r1 + mtctl %r1, %cr18 /* IIAOQ head */ + ldo 4(%r1), %r1 + mtctl %r1, %cr18 /* IIAOQ tail */ rfi nop -1: ldil L%PA(cache_info),%r1 - ldo R%PA(cache_info)(%r1),%r1 +1: ldil L%PA(cache_info), %r1 + ldo R%PA(cache_info)(%r1), %r1 /* Flush Instruction Tlb */ - LDREG ITLB_SID_BASE(%r1),%r20 - LDREG ITLB_SID_STRIDE(%r1),%r21 - LDREG ITLB_SID_COUNT(%r1),%r22 - LDREG ITLB_OFF_BASE(%r1),%arg0 - LDREG ITLB_OFF_STRIDE(%r1),%arg1 - LDREG ITLB_OFF_COUNT(%r1),%arg2 - LDREG ITLB_LOOP(%r1),%arg3 - - ADDIB= -1,%arg3,fitoneloop /* Preadjust and test */ - movb,<,n %arg3,%r31,fitdone /* If loop < 0, skip */ - copy %arg0,%r28 /* Init base addr */ - -fitmanyloop: /* Loop if LOOP >= 2 */ - mtsp %r20,%sr1 - add %r21,%r20,%r20 /* increment space */ - copy %arg2,%r29 /* Init middle loop count */ - -fitmanymiddle: /* Loop if LOOP >= 2 */ - ADDIB> -1,%r31,fitmanymiddle /* Adjusted inner loop decr */ - pitlbe 0(%sr1,%r28) - pitlbe,m %arg1(%sr1,%r28) /* Last pitlbe and addr adjust */ - ADDIB> -1,%r29,fitmanymiddle /* Middle loop decr */ - copy %arg3,%r31 /* Re-init inner loop count */ - - movb,tr %arg0,%r28,fitmanyloop /* Re-init base addr */ - ADDIB<=,n -1,%r22,fitdone /* Outer loop count decr */ - -fitoneloop: /* Loop if LOOP = 1 */ - mtsp %r20,%sr1 - copy %arg0,%r28 /* init base addr */ - copy %arg2,%r29 /* init middle loop count */ - -fitonemiddle: /* Loop if LOOP = 1 */ - ADDIB> -1,%r29,fitonemiddle /* Middle loop count decr */ - pitlbe,m %arg1(%sr1,%r28) /* pitlbe for one loop */ + LDREG ITLB_SID_BASE(%r1), %r20 + LDREG ITLB_SID_STRIDE(%r1), %r21 + LDREG ITLB_SID_COUNT(%r1), %r22 + LDREG ITLB_OFF_BASE(%r1), %arg0 + LDREG ITLB_OFF_STRIDE(%r1), %arg1 + LDREG ITLB_OFF_COUNT(%r1), %arg2 + LDREG ITLB_LOOP(%r1), %arg3 + + ADDIB= -1, %arg3, fitoneloop /* Preadjust and test */ + movb,<,n %arg3, %r31, fitdone /* If loop < 0, skip */ + copy %arg0, %r28 /* Init base addr */ + +fitmanyloop: /* Loop if LOOP >= 2 */ + mtsp %r20, %sr1 + add %r21, %r20, %r20 /* increment space */ + copy %arg2, %r29 /* Init middle loop count */ + +fitmanymiddle: /* Loop if LOOP >= 2 */ + ADDIB> -1, %r31, fitmanymiddle /* Adjusted inner loop decr */ + pitlbe 0(%sr1, %r28) + pitlbe,m %arg1(%sr1, %r28) /* Last pitlbe and addr adjust */ + ADDIB> -1, %r29, fitmanymiddle /* Middle loop decr */ + copy %arg3, %r31 /* Re-init inner loop count */ + + movb,tr %arg0, %r28, fitmanyloop /* Re-init base addr */ + ADDIB<=,n -1, %r22, fitdone /* Outer loop count decr */ + +fitoneloop: /* Loop if LOOP = 1 */ + mtsp %r20, %sr1 + copy %arg0, %r28 /* init base addr */ + copy %arg2, %r29 /* init middle loop count */ + +fitonemiddle: /* Loop if LOOP = 1 */ + ADDIB> -1, %r29, fitonemiddle /* Middle loop count decr */ + pitlbe,m %arg1(%sr1, %r28) /* pitlbe for one loop */ - ADDIB> -1,%r22,fitoneloop /* Outer loop count decr */ - add %r21,%r20,%r20 /* increment space */ + ADDIB> -1, %r22, fitoneloop /* Outer loop count decr */ + add %r21, %r20, %r20 /* increment space */ fitdone: /* Flush Data Tlb */ - LDREG DTLB_SID_BASE(%r1),%r20 - LDREG DTLB_SID_STRIDE(%r1),%r21 - LDREG DTLB_SID_COUNT(%r1),%r22 - LDREG DTLB_OFF_BASE(%r1),%arg0 - LDREG DTLB_OFF_STRIDE(%r1),%arg1 - LDREG DTLB_OFF_COUNT(%r1),%arg2 - LDREG DTLB_LOOP(%r1),%arg3 - - ADDIB= -1,%arg3,fdtoneloop /* Preadjust and test */ - movb,<,n %arg3,%r31,fdtdone /* If loop < 0, skip */ - copy %arg0,%r28 /* Init base addr */ - -fdtmanyloop: /* Loop if LOOP >= 2 */ - mtsp %r20,%sr1 - add %r21,%r20,%r20 /* increment space */ - copy %arg2,%r29 /* Init middle loop count */ - -fdtmanymiddle: /* Loop if LOOP >= 2 */ - ADDIB> -1,%r31,fdtmanymiddle /* Adjusted inner loop decr */ - pdtlbe 0(%sr1,%r28) - pdtlbe,m %arg1(%sr1,%r28) /* Last pdtlbe and addr adjust */ - ADDIB> -1,%r29,fdtmanymiddle /* Middle loop decr */ - copy %arg3,%r31 /* Re-init inner loop count */ - - movb,tr %arg0,%r28,fdtmanyloop /* Re-init base addr */ - ADDIB<=,n -1,%r22,fdtdone /* Outer loop count decr */ - -fdtoneloop: /* Loop if LOOP = 1 */ - mtsp %r20,%sr1 - copy %arg0,%r28 /* init base addr */ - copy %arg2,%r29 /* init middle loop count */ - -fdtonemiddle: /* Loop if LOOP = 1 */ - ADDIB> -1,%r29,fdtonemiddle /* Middle loop count decr */ - pdtlbe,m %arg1(%sr1,%r28) /* pdtlbe for one loop */ + LDREG DTLB_SID_BASE(%r1), %r20 + LDREG DTLB_SID_STRIDE(%r1), %r21 + LDREG DTLB_SID_COUNT(%r1), %r22 + LDREG DTLB_OFF_BASE(%r1), %arg0 + LDREG DTLB_OFF_STRIDE(%r1), %arg1 + LDREG DTLB_OFF_COUNT(%r1), %arg2 + LDREG DTLB_LOOP(%r1), %arg3 + + ADDIB= -1, %arg3, fdtoneloop /* Preadjust and test */ + movb,<,n %arg3, %r31, fdtdone /* If loop < 0, skip */ + copy %arg0, %r28 /* Init base addr */ + +fdtmanyloop: /* Loop if LOOP >= 2 */ + mtsp %r20, %sr1 + add %r21, %r20, %r20 /* increment space */ + copy %arg2, %r29 /* Init middle loop count */ + +fdtmanymiddle: /* Loop if LOOP >= 2 */ + ADDIB> -1, %r31, fdtmanymiddle /* Adjusted inner loop decr */ + pdtlbe 0(%sr1, %r28) + pdtlbe,m %arg1(%sr1, %r28) /* Last pdtlbe and addr adjust */ + ADDIB> -1, %r29, fdtmanymiddle /* Middle loop decr */ + copy %arg3, %r31 /* Re-init inner loop count */ + + movb,tr %arg0, %r28, fdtmanyloop /* Re-init base addr */ + ADDIB<=,n -1, %r22,fdtdone /* Outer loop count decr */ + +fdtoneloop: /* Loop if LOOP = 1 */ + mtsp %r20, %sr1 + copy %arg0, %r28 /* init base addr */ + copy %arg2, %r29 /* init middle loop count */ + +fdtonemiddle: /* Loop if LOOP = 1 */ + ADDIB> -1, %r29, fdtonemiddle /* Middle loop count decr */ + pdtlbe,m %arg1(%sr1, %r28) /* pdtlbe for one loop */ - ADDIB> -1,%r22,fdtoneloop /* Outer loop count decr */ - add %r21,%r20,%r20 /* increment space */ + ADDIB> -1, %r22, fdtoneloop /* Outer loop count decr */ + add %r21, %r20, %r20 /* increment space */ fdtdone: /* Switch back to virtual mode */ - rsm PSW_SM_Q,%r0 /* clear Q bit to load iia queue */ - ldil L%KERNEL_PSW, %r1 - ldo R%KERNEL_PSW(%r1), %r1 - or %r1,%r19,%r1 /* Set I bit if set on entry */ - mtctl %r1, %cr22 - mtctl %r0, %cr17 /* Clear IIASQ tail */ - mtctl %r0, %cr17 /* Clear IIASQ head */ - ldil L%(2f), %r1 - ldo R%(2f)(%r1), %r1 - mtctl %r1, %cr18 /* IIAOQ head */ - ldo 4(%r1), %r1 - mtctl %r1, %cr18 /* IIAOQ tail */ + rsm PSW_SM_Q, %r0 /* clear Q bit to load iia queue */ + ldil L%KERNEL_PSW, %r1 + ldo R%KERNEL_PSW(%r1), %r1 + or %r1, %r19, %r1 /* Set I bit if set on entry */ + mtctl %r1, %cr22 + mtctl %r0, %cr17 /* Clear IIASQ tail */ + mtctl %r0, %cr17 /* Clear IIASQ head */ + ldil L%(2f), %r1 + ldo R%(2f)(%r1), %r1 + mtctl %r1, %cr18 /* IIAOQ head */ + ldo 4(%r1), %r1 + mtctl %r1, %cr18 /* IIAOQ tail */ rfi nop -2: bv %r0(%r2) +2: bv %r0(%r2) nop .exit @@ -211,140 +211,198 @@ .callinfo NO_CALLS .entry - mtsp %r0,%sr1 - ldil L%cache_info,%r1 - ldo R%cache_info(%r1),%r1 + mtsp %r0, %sr1 + ldil L%cache_info, %r1 + ldo R%cache_info(%r1), %r1 /* Flush Instruction Cache */ - LDREG ICACHE_BASE(%r1),%arg0 - LDREG ICACHE_STRIDE(%r1),%arg1 - LDREG ICACHE_COUNT(%r1),%arg2 - LDREG ICACHE_LOOP(%r1),%arg3 - rsm PSW_SM_I,%r22 /* No mmgt ops during loop*/ - ADDIB= -1,%arg3,fioneloop /* Preadjust and test */ - movb,<,n %arg3,%r31,fisync /* If loop < 0, do sync */ - -fimanyloop: /* Loop if LOOP >= 2 */ - ADDIB> -1,%r31,fimanyloop /* Adjusted inner loop decr */ - fice 0(%sr1,%arg0) - fice,m %arg1(%sr1,%arg0) /* Last fice and addr adjust */ - movb,tr %arg3,%r31,fimanyloop /* Re-init inner loop count */ - ADDIB<=,n -1,%arg2,fisync /* Outer loop decr */ - -fioneloop: /* Loop if LOOP = 1 */ - ADDIB> -1,%arg2,fioneloop /* Outer loop count decr */ - fice,m %arg1(%sr1,%arg0) /* Fice for one loop */ + LDREG ICACHE_BASE(%r1), %arg0 + LDREG ICACHE_STRIDE(%r1), %arg1 + LDREG ICACHE_COUNT(%r1), %arg2 + LDREG ICACHE_LOOP(%r1), %arg3 + rsm PSW_SM_I, %r22 /* No mmgt ops during loop*/ + ADDIB= -1, %arg3, fioneloop /* Preadjust and test */ + movb,<,n %arg3, %r31, fisync /* If loop < 0, do sync */ + +fimanyloop: /* Loop if LOOP >= 2 */ + ADDIB> -1, %r31, fimanyloop /* Adjusted inner loop decr */ + fice 0(%sr1, %arg0) + fice,m %arg1(%sr1, %arg0) /* Last fice and addr adjust */ + movb,tr %arg3, %r31, fimanyloop /* Re-init inner loop count */ + ADDIB<=,n -1, %arg2, fisync /* Outer loop decr */ + +fioneloop: /* Loop if LOOP = 1 */ + ADDIB> -1, %arg2, fioneloop /* Outer loop count decr */ + fice,m %arg1(%sr1, %arg0) /* Fice for one loop */ fisync: sync - mtsm %r22 - bv %r0(%r2) + mtsm %r22 + bv %r0(%r2) nop .exit .procend - .export flush_data_cache_local,code - .import cache_info,data + .export flush_data_cache_local, code + .import cache_info, data flush_data_cache_local: .proc .callinfo NO_CALLS .entry - mtsp %r0,%sr1 - ldil L%cache_info,%r1 - ldo R%cache_info(%r1),%r1 + mtsp %r0, %sr1 + ldil L%cache_info, %r1 + ldo R%cache_info(%r1), %r1 /* Flush Data Cache */ - LDREG DCACHE_BASE(%r1),%arg0 - LDREG DCACHE_STRIDE(%r1),%arg1 - LDREG DCACHE_COUNT(%r1),%arg2 - LDREG DCACHE_LOOP(%r1),%arg3 - rsm PSW_SM_I,%r22 - ADDIB= -1,%arg3,fdoneloop /* Preadjust and test */ - movb,<,n %arg3,%r31,fdsync /* If loop < 0, do sync */ - -fdmanyloop: /* Loop if LOOP >= 2 */ - ADDIB> -1,%r31,fdmanyloop /* Adjusted inner loop decr */ - fdce 0(%sr1,%arg0) - fdce,m %arg1(%sr1,%arg0) /* Last fdce and addr adjust */ - movb,tr %arg3,%r31,fdmanyloop /* Re-init inner loop count */ - ADDIB<=,n -1,%arg2,fdsync /* Outer loop decr */ - -fdoneloop: /* Loop if LOOP = 1 */ - ADDIB> -1,%arg2,fdoneloop /* Outer loop count decr */ - fdce,m %arg1(%sr1,%arg0) /* Fdce for one loop */ + LDREG DCACHE_BASE(%r1), %arg0 + LDREG DCACHE_STRIDE(%r1), %arg1 + LDREG DCACHE_COUNT(%r1), %arg2 + LDREG DCACHE_LOOP(%r1), %arg3 + rsm PSW_SM_I, %r22 + ADDIB= -1, %arg3, fdoneloop /* Preadjust and test */ + movb,<,n %arg3, %r31, fdsync /* If loop < 0, do sync */ + +fdmanyloop: /* Loop if LOOP >= 2 */ + ADDIB> -1, %r31, fdmanyloop /* Adjusted inner loop decr */ + fdce 0(%sr1, %arg0) + fdce,m %arg1(%sr1, %arg0) /* Last fdce and addr adjust */ + movb,tr %arg3, %r31, fdmanyloop /* Re-init inner loop count */ + ADDIB<=,n -1, %arg2, fdsync /* Outer loop decr */ + +fdoneloop: /* Loop if LOOP = 1 */ + ADDIB> -1, %arg2, fdoneloop /* Outer loop count decr */ + fdce,m %arg1(%sr1, %arg0) /* Fdce for one loop */ fdsync: syncdma sync - mtsm %r22 - bv %r0(%r2) + mtsm %r22 + bv %r0(%r2) nop .exit .procend .export copy_user_page_asm,code + .align 16 copy_user_page_asm: .proc .callinfo NO_CALLS .entry - ldi 64,%r1 +#ifdef __LP64__ + /* PA8x00 CPUs can consume 2 loads or 1 store per cycle. + * Unroll the loop by hand and arrange insn appropriately. + * GCC probably can do this just as well. + */ + + ldd 0(%r25), %r19 + ldi 32, %r1 /* PAGE_SIZE/128 == 32 */ + ldw 64(%r25), %r0 /* prefetch 1 cacheline ahead */ + ldw 128(%r25), %r0 /* prefetch 2 */ + +1: ldd 8(%r25), %r20 + ldw 192(%r25), %r0 /* prefetch 3 */ + ldw 256(%r25), %r0 /* prefetch 4 */ + + ldd 16(%r25), %r21 + ldd 24(%r25), %r22 + std %r19, 0(%r26) + std %r20, 8(%r26) + + ldd 32(%r25), %r19 + ldd 40(%r25), %r20 + std %r21, 16(%r26) + std %r22, 24(%r26) + + ldd 48(%r25), %r21 + ldd 56(%r25), %r22 + std %r19, 32(%r26) + std %r20, 40(%r26) + + ldd 64(%r25), %r19 + ldd 72(%r25), %r20 + std %r21, 48(%r26) + std %r22, 56(%r26) + + ldd 80(%r25), %r21 + ldd 88(%r25), %r22 + std %r19, 64(%r26) + std %r20, 72(%r26) + + ldd 96(%r25), %r19 + ldd 104(%r25), %r20 + std %r21, 80(%r26) + std %r22, 88(%r26) + + ldd 112(%r25), %r21 + ldd 120(%r25), %r22 + std %r19, 96(%r26) + std %r20, 104(%r26) + + ldo 128(%r25), %r25 + std %r21, 112(%r26) + std %r22, 120(%r26) + ldo 128(%r26), %r26 + + ADDIB> -1, %r1, 1b /* bundle 10 */ + ldd 0(%r25), %r19 /* start next loads */ + +#else /* * This loop is optimized for PCXL/PCXL2 ldw/ldw and stw/stw - * bundles (very restricted rules for bundling). It probably - * does OK on PCXU and better, but we could do better with - * ldd/std instructions. Note that until (if) we start saving + * bundles (very restricted rules for bundling). + * Note that until (if) we start saving * the full 64 bit register values on interrupt, we can't * use ldd/std on a 32 bit kernel. */ - + ldi 64, %r1 /* PAGE_SIZE/64 == 64 */ 1: - ldw 0(%r25),%r19 - ldw 4(%r25),%r20 - ldw 8(%r25),%r21 - ldw 12(%r25),%r22 - stw %r19,0(%r26) - stw %r20,4(%r26) - stw %r21,8(%r26) - stw %r22,12(%r26) - ldw 16(%r25),%r19 - ldw 20(%r25),%r20 - ldw 24(%r25),%r21 - ldw 28(%r25),%r22 - stw %r19,16(%r26) - stw %r20,20(%r26) - stw %r21,24(%r26) - stw %r22,28(%r26) - ldw 32(%r25),%r19 - ldw 36(%r25),%r20 - ldw 40(%r25),%r21 - ldw 44(%r25),%r22 - stw %r19,32(%r26) - stw %r20,36(%r26) - stw %r21,40(%r26) - stw %r22,44(%r26) - ldw 48(%r25),%r19 - ldw 52(%r25),%r20 - ldw 56(%r25),%r21 - ldw 60(%r25),%r22 - stw %r19,48(%r26) - stw %r20,52(%r26) - stw %r21,56(%r26) - stw %r22,60(%r26) - ldo 64(%r26),%r26 - ADDIB> -1,%r1,1b - ldo 64(%r25),%r25 - - bv %r0(%r2) + ldw 0(%r25), %r19 + ldw 4(%r25), %r20 + ldw 8(%r25), %r21 + ldw 12(%r25), %r22 + stw %r19, 0(%r26) + stw %r20, 4(%r26) + stw %r21, 8(%r26) + stw %r22, 12(%r26) + ldw 16(%r25), %r19 + ldw 20(%r25), %r20 + ldw 24(%r25), %r21 + ldw 28(%r25), %r22 + stw %r19, 16(%r26) + stw %r20, 20(%r26) + stw %r21, 24(%r26) + stw %r22, 28(%r26) + ldw 32(%r25), %r19 + ldw 36(%r25), %r20 + ldw 40(%r25), %r21 + ldw 44(%r25), %r22 + stw %r19, 32(%r26) + stw %r20, 36(%r26) + stw %r21, 40(%r26) + stw %r22, 44(%r26) + ldw 48(%r25), %r19 + ldw 52(%r25), %r20 + ldw 56(%r25), %r21 + ldw 60(%r25), %r22 + stw %r19, 48(%r26) + stw %r20, 52(%r26) + stw %r21, 56(%r26) + stw %r22, 60(%r26) + ldo 64(%r26), %r26 + ADDIB> -1, %r1, 1b + ldo 64(%r25), %r25 +#endif + bv %r0(%r2) nop .exit @@ -393,33 +451,33 @@ .callinfo NO_CALLS .entry - ldil L%(__PAGE_OFFSET),%r1 - sub %r26,%r1,%r26 - sub %r25,%r1,%r23 /* move physical addr into non shadowed reg */ - - ldil L%(TMPALIAS_MAP_START),%r28 -#ifdef __LP64__ - extrd,u %r26,56,32,%r26 /* convert phys addr to tlb insert format */ - extrd,u %r23,56,32,%r23 /* convert phys addr to tlb insert format */ - depd %r24,63,22,%r28 /* Form aliased virtual address 'to' */ - depdi 0,63,12,%r28 /* Clear any offset bits */ - copy %r28,%r29 - depdi 1,41,1,%r29 /* Form aliased virtual address 'from' */ -#else - extrw,u %r26,24,25,%r26 /* convert phys addr to tlb insert format */ - extrw,u %r23,24,25,%r23 /* convert phys addr to tlb insert format */ - depw %r24,31,22,%r28 /* Form aliased virtual address 'to' */ - depwi 0,31,12,%r28 /* Clear any offset bits */ - copy %r28,%r29 - depwi 1,9,1,%r29 /* Form aliased virtual address 'from' */ + ldil L%(__PAGE_OFFSET), %r1 + sub %r26, %r1, %r26 + sub %r25, %r1, %r23 /* move physical addr into non shadowed reg */ + + ldil L%(TMPALIAS_MAP_START), %r28 +#ifdef __LP64__ + extrd,u %r26,56,32, %r26 /* convert phys addr to tlb insert format */ + extrd,u %r23,56,32, %r23 /* convert phys addr to tlb insert format */ + depd %r24,63,22, %r28 /* Form aliased virtual address 'to' */ + depdi 0, 63,12, %r28 /* Clear any offset bits */ + copy %r28, %r29 + depdi 1, 41,1, %r29 /* Form aliased virtual address 'from' */ +#else + extrw,u %r26, 24,25, %r26 /* convert phys addr to tlb insert format */ + extrw,u %r23, 24,25, %r23 /* convert phys addr to tlb insert format */ + depw %r24, 31,22, %r28 /* Form aliased virtual address 'to' */ + depwi 0, 31,12, %r28 /* Clear any offset bits */ + copy %r28, %r29 + depwi 1, 9,1, %r29 /* Form aliased virtual address 'from' */ #endif /* Purge any old translations */ - pdtlb 0(%r28) - pdtlb 0(%r29) + pdtlb 0(%r28) + pdtlb 0(%r29) - ldi 64,%r1 + ldi 64, %r1 /* * This loop is optimized for PCXL/PCXL2 ldw/ldw and stw/stw @@ -432,43 +490,43 @@ 1: - ldw 0(%r29),%r19 - ldw 4(%r29),%r20 - ldw 8(%r29),%r21 - ldw 12(%r29),%r22 - stw %r19,0(%r28) - stw %r20,4(%r28) - stw %r21,8(%r28) - stw %r22,12(%r28) - ldw 16(%r29),%r19 - ldw 20(%r29),%r20 - ldw 24(%r29),%r21 - ldw 28(%r29),%r22 - stw %r19,16(%r28) - stw %r20,20(%r28) - stw %r21,24(%r28) - stw %r22,28(%r28) - ldw 32(%r29),%r19 - ldw 36(%r29),%r20 - ldw 40(%r29),%r21 - ldw 44(%r29),%r22 - stw %r19,32(%r28) - stw %r20,36(%r28) - stw %r21,40(%r28) - stw %r22,44(%r28) - ldw 48(%r29),%r19 - ldw 52(%r29),%r20 - ldw 56(%r29),%r21 - ldw 60(%r29),%r22 - stw %r19,48(%r28) - stw %r20,52(%r28) - stw %r21,56(%r28) - stw %r22,60(%r28) - ldo 64(%r28),%r28 - ADDIB> -1,%r1,1b - ldo 64(%r29),%r29 + ldw 0(%r29), %r19 + ldw 4(%r29), %r20 + ldw 8(%r29), %r21 + ldw 12(%r29), %r22 + stw %r19, 0(%r28) + stw %r20, 4(%r28) + stw %r21, 8(%r28) + stw %r22, 12(%r28) + ldw 16(%r29), %r19 + ldw 20(%r29), %r20 + ldw 24(%r29), %r21 + ldw 28(%r29), %r22 + stw %r19, 16(%r28) + stw %r20, 20(%r28) + stw %r21, 24(%r28) + stw %r22, 28(%r28) + ldw 32(%r29), %r19 + ldw 36(%r29), %r20 + ldw 40(%r29), %r21 + ldw 44(%r29), %r22 + stw %r19, 32(%r28) + stw %r20, 36(%r28) + stw %r21, 40(%r28) + stw %r22, 44(%r28) + ldw 48(%r29), %r19 + ldw 52(%r29), %r20 + ldw 56(%r29), %r21 + ldw 60(%r29), %r22 + stw %r19, 48(%r28) + stw %r20, 52(%r28) + stw %r21, 56(%r28) + stw %r22, 60(%r28) + ldo 64(%r28), %r28 + ADDIB> -1, %r1,1b + ldo 64(%r29), %r29 - bv %r0(%r2) + bv %r0(%r2) nop .exit @@ -482,49 +540,77 @@ .callinfo NO_CALLS .entry - tophys_r1 %r26 + tophys_r1 %r26 - ldil L%(TMPALIAS_MAP_START),%r28 + ldil L%(TMPALIAS_MAP_START), %r28 #ifdef __LP64__ #if (TMPALIAS_MAP_START >= 0x80000000) - depdi 0,31,32,%r28 /* clear any sign extension */ + depdi 0, 31,32, %r28 /* clear any sign extension */ #endif - extrd,u %r26,56,32,%r26 /* convert phys addr to tlb insert format */ - depd %r25,63,22,%r28 /* Form aliased virtual address 'to' */ - depdi 0,63,12,%r28 /* Clear any offset bits */ -#else - extrw,u %r26,24,25,%r26 /* convert phys addr to tlb insert format */ - depw %r25,31,22,%r28 /* Form aliased virtual address 'to' */ - depwi 0,31,12,%r28 /* Clear any offset bits */ + extrd,u %r26, 56,32, %r26 /* convert phys addr to tlb insert format */ + depd %r25, 63,22, %r28 /* Form aliased virtual address 'to' */ + depdi 0, 63,12, %r28 /* Clear any offset bits */ +#else + extrw,u %r26, 24,25, %r26 /* convert phys addr to tlb insert format */ + depw %r25, 31,22, %r28 /* Form aliased virtual address 'to' */ + depwi 0, 31,12, %r28 /* Clear any offset bits */ #endif /* Purge any old translation */ - pdtlb 0(%r28) + pdtlb 0(%r28) - ldi 64,%r1 +#ifdef __LP64__ + ldi 32, %r1 /* PAGE_SIZE/128 == 32 */ + + /* PREFETCH (Write) has not (yet) been proven to help here */ +/* #define PREFETCHW_OP ldd 256(%0), %r0 */ + +1: std %r0, 0(%r28) + std %r0, 8(%r28) + std %r0, 16(%r28) + std %r0, 24(%r28) + std %r0, 32(%r28) + std %r0, 40(%r28) + std %r0, 48(%r28) + std %r0, 56(%r28) + std %r0, 64(%r28) + std %r0, 72(%r28) + std %r0, 80(%r28) + std %r0, 88(%r28) + std %r0, 96(%r28) + std %r0, 104(%r28) + std %r0, 112(%r28) + std %r0, 120(%r28) + ADDIB> -1, %r1, 1b + ldo 128(%r28), %r28 + +#else /* ! __LP64 */ + + ldi 64, %r1 /* PAGE_SIZE/64 == 64 */ 1: - stw %r0,0(%r28) - stw %r0,4(%r28) - stw %r0,8(%r28) - stw %r0,12(%r28) - stw %r0,16(%r28) - stw %r0,20(%r28) - stw %r0,24(%r28) - stw %r0,28(%r28) - stw %r0,32(%r28) - stw %r0,36(%r28) - stw %r0,40(%r28) - stw %r0,44(%r28) - stw %r0,48(%r28) - stw %r0,52(%r28) - stw %r0,56(%r28) - stw %r0,60(%r28) - ADDIB> -1,%r1,1b - ldo 64(%r28),%r28 + stw %r0, 0(%r28) + stw %r0, 4(%r28) + stw %r0, 8(%r28) + stw %r0, 12(%r28) + stw %r0, 16(%r28) + stw %r0, 20(%r28) + stw %r0, 24(%r28) + stw %r0, 28(%r28) + stw %r0, 32(%r28) + stw %r0, 36(%r28) + stw %r0, 40(%r28) + stw %r0, 44(%r28) + stw %r0, 48(%r28) + stw %r0, 52(%r28) + stw %r0, 56(%r28) + stw %r0, 60(%r28) + ADDIB> -1, %r1, 1b + ldo 64(%r28), %r28 +#endif /* __LP64 */ - bv %r0(%r2) + bv %r0(%r2) nop .exit @@ -537,38 +623,38 @@ .callinfo NO_CALLS .entry - ldil L%dcache_stride,%r1 - ldw R%dcache_stride(%r1),%r23 + ldil L%dcache_stride, %r1 + ldw R%dcache_stride(%r1), %r23 #ifdef __LP64__ - depdi,z 1,63-PAGE_SHIFT,1,%r25 + depdi,z 1, 63-PAGE_SHIFT,1, %r25 #else - depwi,z 1,31-PAGE_SHIFT,1,%r25 + depwi,z 1, 31-PAGE_SHIFT,1, %r25 #endif - add %r26,%r25,%r25 - sub %r25,%r23,%r25 - - -1: fdc,m %r23(%r26) - fdc,m %r23(%r26) - fdc,m %r23(%r26) - fdc,m %r23(%r26) - fdc,m %r23(%r26) - fdc,m %r23(%r26) - fdc,m %r23(%r26) - fdc,m %r23(%r26) - fdc,m %r23(%r26) - fdc,m %r23(%r26) - fdc,m %r23(%r26) - fdc,m %r23(%r26) - fdc,m %r23(%r26) - fdc,m %r23(%r26) - fdc,m %r23(%r26) - CMPB<< %r26,%r25,1b - fdc,m %r23(%r26) + add %r26, %r25, %r25 + sub %r25, %r23, %r25 + + +1: fdc,m %r23(%r26) + fdc,m %r23(%r26) + fdc,m %r23(%r26) + fdc,m %r23(%r26) + fdc,m %r23(%r26) + fdc,m %r23(%r26) + fdc,m %r23(%r26) + fdc,m %r23(%r26) + fdc,m %r23(%r26) + fdc,m %r23(%r26) + fdc,m %r23(%r26) + fdc,m %r23(%r26) + fdc,m %r23(%r26) + fdc,m %r23(%r26) + fdc,m %r23(%r26) + CMPB<< %r26, %r25,1b + fdc,m %r23(%r26) sync - bv %r0(%r2) + bv %r0(%r2) nop .exit @@ -581,38 +667,38 @@ .callinfo NO_CALLS .entry - ldil L%dcache_stride,%r1 - ldw R%dcache_stride(%r1),%r23 + ldil L%dcache_stride, %r1 + ldw R%dcache_stride(%r1), %r23 #ifdef __LP64__ - depdi,z 1,63-PAGE_SHIFT,1,%r25 + depdi,z 1,63-PAGE_SHIFT,1, %r25 #else - depwi,z 1,31-PAGE_SHIFT,1,%r25 + depwi,z 1,31-PAGE_SHIFT,1, %r25 #endif - add %r26,%r25,%r25 - sub %r25,%r23,%r25 - - -1: fdc,m %r23(%sr3,%r26) - fdc,m %r23(%sr3,%r26) - fdc,m %r23(%sr3,%r26) - fdc,m %r23(%sr3,%r26) - fdc,m %r23(%sr3,%r26) - fdc,m %r23(%sr3,%r26) - fdc,m %r23(%sr3,%r26) - fdc,m %r23(%sr3,%r26) - fdc,m %r23(%sr3,%r26) - fdc,m %r23(%sr3,%r26) - fdc,m %r23(%sr3,%r26) - fdc,m %r23(%sr3,%r26) - fdc,m %r23(%sr3,%r26) - fdc,m %r23(%sr3,%r26) - fdc,m %r23(%sr3,%r26) - CMPB<< %r26,%r25,1b - fdc,m %r23(%sr3,%r26) + add %r26, %r25, %r25 + sub %r25, %r23, %r25 + + +1: fdc,m %r23(%sr3, %r26) + fdc,m %r23(%sr3, %r26) + fdc,m %r23(%sr3, %r26) + fdc,m %r23(%sr3, %r26) + fdc,m %r23(%sr3, %r26) + fdc,m %r23(%sr3, %r26) + fdc,m %r23(%sr3, %r26) + fdc,m %r23(%sr3, %r26) + fdc,m %r23(%sr3, %r26) + fdc,m %r23(%sr3, %r26) + fdc,m %r23(%sr3, %r26) + fdc,m %r23(%sr3, %r26) + fdc,m %r23(%sr3, %r26) + fdc,m %r23(%sr3, %r26) + fdc,m %r23(%sr3, %r26) + CMPB<< %r26, %r25,1b + fdc,m %r23(%sr3, %r26) sync - bv %r0(%r2) + bv %r0(%r2) nop .exit @@ -625,38 +711,38 @@ .callinfo NO_CALLS .entry - ldil L%dcache_stride,%r1 - ldw R%dcache_stride(%r1),%r23 + ldil L%dcache_stride, %r1 + ldw R%dcache_stride(%r1), %r23 #ifdef __LP64__ - depdi,z 1,63-PAGE_SHIFT,1,%r25 + depdi,z 1, 63-PAGE_SHIFT,1, %r25 #else - depwi,z 1,31-PAGE_SHIFT,1,%r25 + depwi,z 1, 31-PAGE_SHIFT,1, %r25 #endif - add %r26,%r25,%r25 - sub %r25,%r23,%r25 - - -1: fic,m %r23(%sr3,%r26) - fic,m %r23(%sr3,%r26) - fic,m %r23(%sr3,%r26) - fic,m %r23(%sr3,%r26) - fic,m %r23(%sr3,%r26) - fic,m %r23(%sr3,%r26) - fic,m %r23(%sr3,%r26) - fic,m %r23(%sr3,%r26) - fic,m %r23(%sr3,%r26) - fic,m %r23(%sr3,%r26) - fic,m %r23(%sr3,%r26) - fic,m %r23(%sr3,%r26) - fic,m %r23(%sr3,%r26) - fic,m %r23(%sr3,%r26) - fic,m %r23(%sr3,%r26) - CMPB<< %r26,%r25,1b - fic,m %r23(%sr3,%r26) + add %r26, %r25, %r25 + sub %r25, %r23, %r25 + + +1: fic,m %r23(%sr3, %r26) + fic,m %r23(%sr3, %r26) + fic,m %r23(%sr3, %r26) + fic,m %r23(%sr3, %r26) + fic,m %r23(%sr3, %r26) + fic,m %r23(%sr3, %r26) + fic,m %r23(%sr3, %r26) + fic,m %r23(%sr3, %r26) + fic,m %r23(%sr3, %r26) + fic,m %r23(%sr3, %r26) + fic,m %r23(%sr3, %r26) + fic,m %r23(%sr3, %r26) + fic,m %r23(%sr3, %r26) + fic,m %r23(%sr3, %r26) + fic,m %r23(%sr3, %r26) + CMPB<< %r26, %r25,1b + fic,m %r23(%sr3, %r26) sync - bv %r0(%r2) + bv %r0(%r2) nop .exit @@ -670,37 +756,37 @@ .callinfo NO_CALLS .entry - ldil L%dcache_stride,%r1 - ldw R%dcache_stride(%r1),%r23 + ldil L%dcache_stride, %r1 + ldw R%dcache_stride(%r1), %r23 #ifdef __LP64__ - depdi,z 1,63-PAGE_SHIFT,1,%r25 + depdi,z 1, 63-PAGE_SHIFT,1, %r25 #else - depwi,z 1,31-PAGE_SHIFT,1,%r25 + depwi,z 1, 31-PAGE_SHIFT,1, %r25 #endif - add %r26,%r25,%r25 - sub %r25,%r23,%r25 - -1: pdc,m %r23(%r26) - pdc,m %r23(%r26) - pdc,m %r23(%r26) - pdc,m %r23(%r26) - pdc,m %r23(%r26) - pdc,m %r23(%r26) - pdc,m %r23(%r26) - pdc,m %r23(%r26) - pdc,m %r23(%r26) - pdc,m %r23(%r26) - pdc,m %r23(%r26) - pdc,m %r23(%r26) - pdc,m %r23(%r26) - pdc,m %r23(%r26) - pdc,m %r23(%r26) - CMPB<< %r26,%r25,1b - pdc,m %r23(%r26) + add %r26, %r25, %r25 + sub %r25, %r23, %r25 + +1: pdc,m %r23(%r26) + pdc,m %r23(%r26) + pdc,m %r23(%r26) + pdc,m %r23(%r26) + pdc,m %r23(%r26) + pdc,m %r23(%r26) + pdc,m %r23(%r26) + pdc,m %r23(%r26) + pdc,m %r23(%r26) + pdc,m %r23(%r26) + pdc,m %r23(%r26) + pdc,m %r23(%r26) + pdc,m %r23(%r26) + pdc,m %r23(%r26) + pdc,m %r23(%r26) + CMPB<< %r26, %r25, 1b + pdc,m %r23(%r26) sync - bv %r0(%r2) + bv %r0(%r2) nop .exit @@ -718,54 +804,54 @@ .callinfo NO_CALLS .entry - tophys_r1 %r26 + tophys_r1 %r26 - ldil L%(TMPALIAS_MAP_START),%r28 + ldil L%(TMPALIAS_MAP_START), %r28 #ifdef __LP64__ - extrd,u %r26,56,32,%r26 /* convert phys addr to tlb insert format */ - depd %r25,63,22,%r28 /* Form aliased virtual address 'to' */ - depdi 0,63,12,%r28 /* Clear any offset bits */ + extrd,u %r26, 56,32, %r26 /* convert phys addr to tlb insert format */ + depd %r25, 63,22, %r28 /* Form aliased virtual address 'to' */ + depdi 0, 63,12, %r28 /* Clear any offset bits */ #else - extrw,u %r26,24,25,%r26 /* convert phys addr to tlb insert format */ - depw %r25,31,22,%r28 /* Form aliased virtual address 'to' */ - depwi 0,31,12,%r28 /* Clear any offset bits */ + extrw,u %r26, 24,25, %r26 /* convert phys addr to tlb insert format */ + depw %r25, 31,22, %r28 /* Form aliased virtual address 'to' */ + depwi 0, 31,12, %r28 /* Clear any offset bits */ #endif /* Purge any old translation */ - pdtlb 0(%r28) + pdtlb 0(%r28) - ldil L%dcache_stride,%r1 - ldw R%dcache_stride(%r1),%r23 + ldil L%dcache_stride, %r1 + ldw R%dcache_stride(%r1), %r23 #ifdef __LP64__ - depdi,z 1,63-PAGE_SHIFT,1,%r29 + depdi,z 1, 63-PAGE_SHIFT,1, %r29 #else - depwi,z 1,31-PAGE_SHIFT,1,%r29 -#endif - add %r28,%r29,%r29 - sub %r29,%r23,%r29 - -1: fdc,m %r23(%r28) - fdc,m %r23(%r28) - fdc,m %r23(%r28) - fdc,m %r23(%r28) - fdc,m %r23(%r28) - fdc,m %r23(%r28) - fdc,m %r23(%r28) - fdc,m %r23(%r28) - fdc,m %r23(%r28) - fdc,m %r23(%r28) - fdc,m %r23(%r28) - fdc,m %r23(%r28) - fdc,m %r23(%r28) - fdc,m %r23(%r28) - fdc,m %r23(%r28) - CMPB<< %r28,%r29,1b - fdc,m %r23(%r28) + depwi,z 1, 31-PAGE_SHIFT,1, %r29 +#endif + add %r28, %r29, %r29 + sub %r29, %r23, %r29 + +1: fdc,m %r23(%r28) + fdc,m %r23(%r28) + fdc,m %r23(%r28) + fdc,m %r23(%r28) + fdc,m %r23(%r28) + fdc,m %r23(%r28) + fdc,m %r23(%r28) + fdc,m %r23(%r28) + fdc,m %r23(%r28) + fdc,m %r23(%r28) + fdc,m %r23(%r28) + fdc,m %r23(%r28) + fdc,m %r23(%r28) + fdc,m %r23(%r28) + fdc,m %r23(%r28) + CMPB<< %r28, %r29, 1b + fdc,m %r23(%r28) sync - bv %r0(%r2) + bv %r0(%r2) nop .exit @@ -779,16 +865,16 @@ .callinfo NO_CALLS .entry - ldil L%dcache_stride,%r1 - ldw R%dcache_stride(%r1),%r23 - ldo -1(%r23),%r21 - ANDCM %r26,%r21,%r26 + ldil L%dcache_stride, %r1 + ldw R%dcache_stride(%r1), %r23 + ldo -1(%r23), %r21 + ANDCM %r26, %r21, %r26 -1: CMPB<<,n %r26,%r25,1b - fdc,m %r23(%sr3,%r26) +1: CMPB<<,n %r26, %r25, 1b + fdc,m %r23(%sr3, %r26) sync - bv %r0(%r2) + bv %r0(%r2) nop .exit @@ -801,17 +887,17 @@ .callinfo NO_CALLS .entry - ldil L%dcache_stride,%r1 - ldw R%dcache_stride(%r1),%r23 - ldo -1(%r23),%r21 - ANDCM %r26,%r21,%r26 + ldil L%dcache_stride, %r1 + ldw R%dcache_stride(%r1), %r23 + ldo -1(%r23), %r21 + ANDCM %r26, %r21, %r26 -1: CMPB<<,n %r26,%r25,1b - fdc,m %r23(%r26) +1: CMPB<<,n %r26, %r25,1b + fdc,m %r23(%r26) sync syncdma - bv %r0(%r2) + bv %r0(%r2) nop .exit @@ -824,16 +910,16 @@ .callinfo NO_CALLS .entry - ldil L%icache_stride,%r1 - ldw R%icache_stride(%r1),%r23 - ldo -1(%r23),%r21 - ANDCM %r26,%r21,%r26 + ldil L%icache_stride, %r1 + ldw R%icache_stride(%r1), %r23 + ldo -1(%r23), %r21 + ANDCM %r26, %r21, %r26 -1: CMPB<<,n %r26,%r25,1b - fic,m %r23(%sr3,%r26) +1: CMPB<<,n %r26, %r25,1b + fic,m %r23(%sr3, %r26) sync - bv %r0(%r2) + bv %r0(%r2) nop .exit @@ -846,38 +932,38 @@ .callinfo NO_CALLS .entry - ldil L%icache_stride,%r1 - ldw R%icache_stride(%r1),%r23 + ldil L%icache_stride, %r1 + ldw R%icache_stride(%r1), %r23 #ifdef __LP64__ - depdi,z 1,63-PAGE_SHIFT,1,%r25 + depdi,z 1, 63-PAGE_SHIFT,1, %r25 #else - depwi,z 1,31-PAGE_SHIFT,1,%r25 + depwi,z 1, 31-PAGE_SHIFT,1, %r25 #endif - add %r26,%r25,%r25 - sub %r25,%r23,%r25 - - -1: fic,m %r23(%r26) - fic,m %r23(%r26) - fic,m %r23(%r26) - fic,m %r23(%r26) - fic,m %r23(%r26) - fic,m %r23(%r26) - fic,m %r23(%r26) - fic,m %r23(%r26) - fic,m %r23(%r26) - fic,m %r23(%r26) - fic,m %r23(%r26) - fic,m %r23(%r26) - fic,m %r23(%r26) - fic,m %r23(%r26) - fic,m %r23(%r26) - CMPB<< %r26,%r25,1b - fic,m %r23(%r26) + add %r26, %r25, %r25 + sub %r25, %r23, %r25 + + +1: fic,m %r23(%r26) + fic,m %r23(%r26) + fic,m %r23(%r26) + fic,m %r23(%r26) + fic,m %r23(%r26) + fic,m %r23(%r26) + fic,m %r23(%r26) + fic,m %r23(%r26) + fic,m %r23(%r26) + fic,m %r23(%r26) + fic,m %r23(%r26) + fic,m %r23(%r26) + fic,m %r23(%r26) + fic,m %r23(%r26) + fic,m %r23(%r26) + CMPB<< %r26, %r25, 1b + fic,m %r23(%r26) sync - bv %r0(%r2) + bv %r0(%r2) nop .exit @@ -890,22 +976,22 @@ .callinfo NO_CALLS .entry - ldil L%icache_stride,%r1 - ldw R%icache_stride(%r1),%r23 - ldo -1(%r23),%r21 - ANDCM %r26,%r21,%r26 + ldil L%icache_stride, %r1 + ldw R%icache_stride(%r1), %r23 + ldo -1(%r23), %r21 + ANDCM %r26, %r21, %r26 -1: CMPB<<,n %r26,%r25,1b - fic,m %r23(%r26) +1: CMPB<<,n %r26, %r25, 1b + fic,m %r23(%r26) sync - bv %r0(%r2) + bv %r0(%r2) nop .exit .procend - .align 128 + .align 128 .export disable_sr_hashing_asm,code @@ -916,7 +1002,7 @@ /* Switch to real mode */ - ssm 0,%r0 /* relied upon translation! */ + ssm 0, %r0 /* relied upon translation! */ nop nop nop @@ -925,73 +1011,73 @@ nop nop - rsm (PSW_SM_Q|PSW_SM_I),%r0 /* disable Q&I to load the iia queue */ - ldil L%REAL_MODE_PSW, %r1 - ldo R%REAL_MODE_PSW(%r1), %r1 - mtctl %r1, %cr22 - mtctl %r0, %cr17 /* Clear IIASQ tail */ - mtctl %r0, %cr17 /* Clear IIASQ head */ - ldil L%PA(1f),%r1 - ldo R%PA(1f)(%r1),%r1 - mtctl %r1, %cr18 /* IIAOQ head */ - ldo 4(%r1), %r1 - mtctl %r1, %cr18 /* IIAOQ tail */ + rsm (PSW_SM_Q|PSW_SM_I), %r0 /* disable Q&I to load the iia queue */ + ldil L%REAL_MODE_PSW, %r1 + ldo R%REAL_MODE_PSW(%r1), %r1 + mtctl %r1, %cr22 + mtctl %r0, %cr17 /* Clear IIASQ tail */ + mtctl %r0, %cr17 /* Clear IIASQ head */ + ldil L%PA(1f), %r1 + ldo R%PA(1f)(%r1), %r1 + mtctl %r1, %cr18 /* IIAOQ head */ + ldo 4(%r1), %r1 + mtctl %r1, %cr18 /* IIAOQ tail */ rfi nop -1: cmpib,=,n SRHASH_PCXST,%r26,srdis_pcxs - cmpib,=,n SRHASH_PCXL,%r26,srdis_pcxl - cmpib,=,n SRHASH_PA20,%r26,srdis_pa20 - b,n srdis_done +1: cmpib,=,n SRHASH_PCXST, %r26,srdis_pcxs + cmpib,=,n SRHASH_PCXL, %r26,srdis_pcxl + cmpib,=,n SRHASH_PA20, %r26,srdis_pa20 + b,n srdis_done srdis_pcxs: /* Disable Space Register Hashing for PCXS,PCXT,PCXT' */ - .word 0x141c1a00 /* mfdiag %dr0,%r28 */ - .word 0x141c1a00 /* must issue twice */ - depwi 0,18,1,%r28 /* Clear DHE (dcache hash enable) */ - depwi 0,20,1,%r28 /* Clear IHE (icache hash enable) */ - .word 0x141c1600 /* mtdiag %r28,%dr0 */ - .word 0x141c1600 /* must issue twice */ - b,n srdis_done + .word 0x141c1a00 /* mfdiag %dr0, %r28 */ + .word 0x141c1a00 /* must issue twice */ + depwi 0,18,1, %r28 /* Clear DHE (dcache hash enable) */ + depwi 0,20,1, %r28 /* Clear IHE (icache hash enable) */ + .word 0x141c1600 /* mtdiag %r28, %dr0 */ + .word 0x141c1600 /* must issue twice */ + b,n srdis_done srdis_pcxl: /* Disable Space Register Hashing for PCXL */ - .word 0x141c0600 /* mfdiag %dr0,%r28 */ - depwi 0,28,2,%r28 /* Clear DHASH_EN & IHASH_EN */ - .word 0x141c0240 /* mtdiag %r28,%dr0 */ - b,n srdis_done + .word 0x141c0600 /* mfdiag %dr0, %r28 */ + depwi 0,28,2, %r28 /* Clear DHASH_EN & IHASH_EN */ + .word 0x141c0240 /* mtdiag %r28, %dr0 */ + b,n srdis_done srdis_pa20: /* Disable Space Register Hashing for PCXU,PCXU+,PCXW,PCXW+ */ - .word 0x144008bc /* mfdiag %dr2,%r28 */ - depdi 0,54,1,%r28 /* clear DIAG_SPHASH_ENAB (bit 54) */ - .word 0x145c1840 /* mtdiag %r28,%dr2 */ + .word 0x144008bc /* mfdiag %dr2, %r28 */ + depdi 0, 54,1, %r28 /* clear DIAG_SPHASH_ENAB (bit 54) */ + .word 0x145c1840 /* mtdiag %r28, %dr2 */ srdis_done: /* Switch back to virtual mode */ - rsm PSW_SM_Q,%r0 /* clear Q bit to load iia queue */ - ldil L%KERNEL_PSW, %r1 - ldo R%KERNEL_PSW(%r1), %r1 - mtctl %r1, %cr22 - mtctl %r0, %cr17 /* Clear IIASQ tail */ - mtctl %r0, %cr17 /* Clear IIASQ head */ - ldil L%(2f), %r1 - ldo R%(2f)(%r1), %r1 - mtctl %r1, %cr18 /* IIAOQ head */ - ldo 4(%r1), %r1 - mtctl %r1, %cr18 /* IIAOQ tail */ + rsm PSW_SM_Q, %r0 /* clear Q bit to load iia queue */ + ldil L%KERNEL_PSW, %r1 + ldo R%KERNEL_PSW(%r1), %r1 + mtctl %r1, %cr22 + mtctl %r0, %cr17 /* Clear IIASQ tail */ + mtctl %r0, %cr17 /* Clear IIASQ head */ + ldil L%(2f), %r1 + ldo R%(2f)(%r1), %r1 + mtctl %r1, %cr18 /* IIAOQ head */ + ldo 4(%r1), %r1 + mtctl %r1, %cr18 /* IIAOQ tail */ rfi nop -2: bv %r0(%r2) +2: bv %r0(%r2) nop .exit diff -Nru a/arch/parisc/kernel/pci-dma.c b/arch/parisc/kernel/pci-dma.c --- a/arch/parisc/kernel/pci-dma.c 2005-03-07 14:54:18 -08:00 +++ b/arch/parisc/kernel/pci-dma.c 2005-03-07 14:54:18 -08:00 @@ -180,7 +180,7 @@ end = PMD_SIZE; do { pte_t page = *pte; - pte_clear(pte); + pte_clear(&init_mm, vaddr, pte); purge_tlb_start(); pdtlb_kernel(orig_vaddr); purge_tlb_end(); diff -Nru a/arch/parisc/kernel/pdc_chassis.c b/arch/parisc/kernel/pdc_chassis.c --- a/arch/parisc/kernel/pdc_chassis.c 2005-03-07 14:54:17 -08:00 +++ b/arch/parisc/kernel/pdc_chassis.c 2005-03-07 14:54:17 -08:00 @@ -182,7 +182,7 @@ DPRINTK(KERN_DEBUG "%s: pdc_chassis_send_status(%d)\n", __FILE__, message); -#ifdef CONFIG_PARISC64 +#ifdef CONFIG_64BIT if (is_pdc_pat()) { switch(message) { case PDC_CHASSIS_DIRECT_BSTART: @@ -238,7 +238,7 @@ retval = -1; } } else retval = -1; -#endif /* CONFIG_PARISC64 */ +#endif /* CONFIG_64BIT */ } /* if (pdc_chassis_enabled) */ #endif /* CONFIG_PDC_CHASSIS */ return retval; diff -Nru a/arch/parisc/kernel/perf_asm.S b/arch/parisc/kernel/perf_asm.S --- a/arch/parisc/kernel/perf_asm.S 2005-03-07 14:54:17 -08:00 +++ b/arch/parisc/kernel/perf_asm.S 2005-03-07 14:54:17 -08:00 @@ -22,9 +22,9 @@ #include #include -#ifdef __LP64__ +#ifdef CONFIG_64BIT .level 2.0w -#endif /* __LP64__ */ +#endif /* CONFIG_64BIT */ #define MTDIAG_1(gr) .word 0x14201840 + gr*0x10000 #define MTDIAG_2(gr) .word 0x14401840 + gr*0x10000 diff -Nru a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S --- a/arch/parisc/kernel/vmlinux.lds.S 2005-03-07 14:54:16 -08:00 +++ b/arch/parisc/kernel/vmlinux.lds.S 2005-03-07 14:54:16 -08:00 @@ -29,7 +29,7 @@ #include /* ld script to make hppa Linux kernel */ -#ifndef CONFIG_PARISC64 +#ifndef CONFIG_64BIT OUTPUT_FORMAT("elf32-hppa-linux") OUTPUT_ARCH(hppa) #else @@ -38,7 +38,7 @@ #endif ENTRY(_stext) -#ifndef CONFIG_PARISC64 +#ifndef CONFIG_64BIT jiffies = jiffies_64 + 4; #else jiffies = jiffies_64; @@ -112,7 +112,7 @@ . = ALIGN(16384); init_istack : { *(init_istack) } -#ifdef CONFIG_PARISC64 +#ifdef CONFIG_64BIT . = ALIGN(16); /* Linkage tables */ .opd : { *(.opd) } PROVIDE (__gp = .); .plt : { *(.plt) } @@ -180,7 +180,7 @@ /* Sections to be discarded */ /DISCARD/ : { *(.exitcall.exit) -#ifdef CONFIG_PARISC64 +#ifdef CONFIG_64BIT /* temporary hack until binutils is fixed to not emit these for static binaries */ *(.interp) diff -Nru a/arch/parisc/mm/kmap.c b/arch/parisc/mm/kmap.c --- a/arch/parisc/mm/kmap.c 2005-03-07 14:54:17 -08:00 +++ b/arch/parisc/mm/kmap.c 2005-03-07 14:54:17 -08:00 @@ -49,10 +49,10 @@ * unmap_uncached_page() and save a little code space but I didn't * do that since I'm not certain whether this is the right path. -PB */ -static void unmap_cached_pte(pte_t * pte, unsigned long arg) +static void unmap_cached_pte(pte_t * pte, unsigned long addr, unsigned long arg) { pte_t page = *pte; - pte_clear(pte); + pte_clear(&init_mm, addr, pte); if (!pte_none(page)) { if (pte_present(page)) { unsigned long map_nr = pte_pagenr(page); diff -Nru a/arch/ppc/Kconfig b/arch/ppc/Kconfig --- a/arch/ppc/Kconfig 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/Kconfig 2005-03-07 14:54:18 -08:00 @@ -52,17 +52,17 @@ default 6xx config 6xx - bool "6xx/7xx/74xx/52xx/8260" + bool "6xx/7xx/74xx/52xx/82xx/83xx" help There are four types of PowerPC chips supported. The more common types (601, 603, 604, 740, 750, 7400), the Motorola embedded - versions (821, 823, 850, 855, 860, 52xx, 8260), the IBM embedded + versions (821, 823, 850, 855, 860, 52xx, 82xx, 83xx), the IBM embedded versions (403 and 405) and the high end 64 bit Power processors (POWER 3, POWER4, and IBM 970 also known as G5) Unless you are building a kernel for one of the embedded processor systems, 64 bit IBM RS/6000 or an Apple G5, choose 6xx. Note that the kernel runs in 32-bit mode even on 64-bit chips. - Also note that because the 52xx & 82xx family has a 603e core, + Also note that because the 52xx, 82xx, & 83xx family has a 603e core, specific support for that chipset is asked later on. config 40x @@ -109,7 +109,7 @@ config ALTIVEC bool "AltiVec Support" depends on 6xx || POWER4 - depends on !8260 + depends on !8260 && !83xx ---help--- This option enables kernel support for the Altivec extensions to the PowerPC processor. The kernel currently supports saving and restoring @@ -140,7 +140,7 @@ config TAU bool "Thermal Management Support" - depends on 6xx && !8260 + depends on 6xx && !8260 && !83xx help G3 and G4 processors have an on-chip temperature sensor called the 'Thermal Assist Unit (TAU)', which, in theory, can measure the on-die @@ -228,6 +228,7 @@ If in doubt, say Y here. source arch/ppc/platforms/4xx/Kconfig +source arch/ppc/platforms/83xx/Kconfig source arch/ppc/platforms/85xx/Kconfig config PPC64BRIDGE @@ -475,7 +476,7 @@ choice prompt "Machine Type" - depends on 6xx || POWER3 || POWER4 + depends on (6xx && !83xx) || POWER3 || POWER4 default PPC_MULTIPLATFORM ---help--- Linux currently supports several different kinds of PowerPC-based @@ -660,7 +661,7 @@ config 8260 bool "CPM2 Support" if WILLOW - depends on 6xx + depends on 6xx && !83xx default y if TQM8260 || RPX8260 || EST8260 || SBS8260 || SBC82xx || PQ2FADS help The MPC8260 is a typical embedded CPU made by Motorola. Selecting @@ -1079,8 +1080,8 @@ bool config PCI - bool "PCI support" if 40x || CPM2 || 85xx - default y if !40x && !CPM2 && !8xx && !APUS && !85xx + bool "PCI support" if 40x || CPM2 || 83xx || 85xx + default y if !40x && !CPM2 && !8xx && !APUS && !83xx && !85xx default PCI_PERMEDIA if !4xx && !CPM2 && !8xx && APUS default PCI_QSPAN if !4xx && !CPM2 && 8xx help diff -Nru a/arch/ppc/Makefile b/arch/ppc/Makefile --- a/arch/ppc/Makefile 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/Makefile 2005-03-07 14:54:18 -08:00 @@ -57,6 +57,7 @@ core-y += arch/ppc/kernel/ arch/ppc/platforms/ \ arch/ppc/mm/ arch/ppc/lib/ arch/ppc/syslib/ core-$(CONFIG_4xx) += arch/ppc/platforms/4xx/ +core-$(CONFIG_83xx) += arch/ppc/platforms/83xx/ core-$(CONFIG_85xx) += arch/ppc/platforms/85xx/ core-$(CONFIG_MATH_EMULATION) += arch/ppc/math-emu/ core-$(CONFIG_XMON) += arch/ppc/xmon/ @@ -112,26 +113,24 @@ TOUT := .tmp_gas_check # Ensure this is binutils 2.12.1 (or 2.12.90.0.7) or later for altivec # instructions. -AS_ALTIVEC := $(shell echo dssall | $(AS) -many -o $(TOUT) >/dev/null 2>&1 ; echo $$?) # gcc-3.4 and binutils-2.14 are a fatal combination. GCC_VERSION := $(call cc-version) -BAD_GCC_AS := $(shell echo mftb 5 | $(AS) -mppc -many -o $(TOUT) >/dev/null 2>&1 && echo 0 || echo 1) checkbin: -ifeq ($(GCC_VERSION)$(BAD_GCC_AS),03041) - @echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build ' - @echo 'correctly with gcc-3.4 and your version of binutils.' - @echo '*** Please upgrade your binutils or downgrade your gcc' - @false -endif -ifneq ($(AS_ALTIVEC),0) - echo $(AS_ALTIVEC) - @echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build ' - @echo 'correctly with old versions of binutils.' - @echo '*** Please upgrade your binutils to 2.12.1 or newer' - @false -endif - @true + @if test "$(GCC_VERSION)" = "0304" ; then \ + if ! /bin/echo mftb 5 | $(AS) -v -mppc -many -o $(TOUT) >/dev/null 2>&1 ; then \ + echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build '; \ + echo 'correctly with gcc-3.4 and your version of binutils.'; \ + echo '*** Please upgrade your binutils or downgrade your gcc'; \ + false; \ + fi ; \ + fi + @if ! /bin/echo dssall | $(AS) -many -o $(TOUT) >/dev/null 2>&1 ; then \ + echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build ' ; \ + echo 'correctly with old versions of binutils.' ; \ + echo '*** Please upgrade your binutils to 2.12.1 or newer' ; \ + false ; \ + fi CLEAN_FILES += include/asm-$(ARCH)/offsets.h \ arch/$(ARCH)/kernel/asm-offsets.s \ diff -Nru a/arch/ppc/boot/simple/Makefile b/arch/ppc/boot/simple/Makefile --- a/arch/ppc/boot/simple/Makefile 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc/boot/simple/Makefile 2005-03-07 14:54:16 -08:00 @@ -65,6 +65,7 @@ zimageinitrd-$(CONFIG_EBONY) := zImage.initrd-TREE end-$(CONFIG_EBONY) := ebony entrypoint-$(CONFIG_EBONY) := 0x01000000 + extra.o-$(CONFIG_EBONY) := openbios.o zimage-$(CONFIG_LUAN) := zImage-TREE zimageinitrd-$(CONFIG_LUAN) := zImage.initrd-TREE diff -Nru a/arch/ppc/boot/simple/misc-mv64x60.S b/arch/ppc/boot/simple/misc-mv64x60.S --- a/arch/ppc/boot/simple/misc-mv64x60.S 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc/boot/simple/misc-mv64x60.S 2005-03-07 14:54:17 -08:00 @@ -32,7 +32,11 @@ #if (CONFIG_MV64X60_NEW_BASE != CONFIG_MV64X60_BASE) move_base: li r20,0 +#ifdef CONFIG_GT64260 li r23,20 +#else /* Must be mv64[34]60 which uses top 16 bits */ + li r23,16 +#endif /* Relocate bridge's regs */ addis r25,0,CONFIG_MV64X60_BASE@h diff -Nru a/arch/ppc/boot/simple/openbios.c b/arch/ppc/boot/simple/openbios.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/boot/simple/openbios.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,37 @@ +/* + * arch/ppc/boot/simple/openbios.c + * + * 2005 (c) SYSGO AG - g.jaeger@sysgo.com + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without + * any warranty of any kind, whether express or implied. + * + * Derived from arch/ppc/boot/simple/pibs.c (from MontaVista) + */ + +#include +#include +#include +#include +#include + +extern unsigned long decompress_kernel(unsigned long load_addr, int num_words, + unsigned long cksum); + +/* We need to make sure that this is before the images to ensure + * that it's in a mapped location. */ +bd_t hold_resid_buf __attribute__ ((__section__ (".data.boot"))); +bd_t *hold_residual = &hold_resid_buf; + +void * +load_kernel(unsigned long load_addr, int num_words, unsigned long cksum, + void *ign1, void *ign2) +{ + decompress_kernel(load_addr, num_words, cksum); + + /* simply copy the MAC addresses */ + memcpy(hold_residual->bi_enetaddr, (char *)EBONY_OPENBIOS_MAC_BASE, 6); + memcpy(hold_residual->bi_enet1addr, (char *)(EBONY_OPENBIOS_MAC_BASE+EBONY_OPENBIOS_MAC_OFFSET), 6); + + return (void *)hold_residual; +} diff -Nru a/arch/ppc/configs/katana_defconfig b/arch/ppc/configs/katana_defconfig --- a/arch/ppc/configs/katana_defconfig 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/configs/katana_defconfig 2005-03-07 14:54:18 -08:00 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.11-rc2 -# Tue Jan 25 16:31:13 2005 +# Linux kernel version: 2.6.11-rc4 +# Tue Feb 15 14:27:12 2005 # CONFIG_MMU=y CONFIG_GENERIC_HARDIRQS=y @@ -152,8 +152,8 @@ CONFIG_TASK_SIZE=0x80000000 CONFIG_CONSISTENT_START_BOOL=y CONFIG_CONSISTENT_START=0xf0000000 -# CONFIG_CONSISTENT_SIZE_BOOL is not set -CONFIG_CONSISTENT_SIZE=0x00200000 +CONFIG_CONSISTENT_SIZE_BOOL=y +CONFIG_CONSISTENT_SIZE=0x00400000 # CONFIG_BOOT_LOAD_BOOL is not set CONFIG_BOOT_LOAD=0x00800000 @@ -171,7 +171,82 @@ # # Memory Technology Devices (MTD) # -# CONFIG_MTD is not set +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +CONFIG_MTD_PARTITIONS=y +CONFIG_MTD_CONCAT=y +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set + +# +# RAM/ROM/Flash chip drivers +# +CONFIG_MTD_CFI=y +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_GEN_PROBE=y +CONFIG_MTD_CFI_ADV_OPTIONS=y +CONFIG_MTD_CFI_NOSWAP=y +# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set +# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set +CONFIG_MTD_CFI_GEOMETRY=y +# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_2 is not set +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +# CONFIG_MTD_CFI_I1 is not set +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +CONFIG_MTD_CFI_INTELEXT=y +# CONFIG_MTD_CFI_AMDSTD is not set +# CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_XIP is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +CONFIG_MTD_PHYSMAP=y +CONFIG_MTD_PHYSMAP_START=0xe0000000 +CONFIG_MTD_PHYSMAP_LEN=0x0 +CONFIG_MTD_PHYSMAP_BANKWIDTH=4 + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_PMC551 is not set +# CONFIG_MTD_SLRAM is not set +CONFIG_MTD_PHRAM=y +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set + +# +# NAND Flash Device Drivers +# +# CONFIG_MTD_NAND is not set # # Parallel port support @@ -531,7 +606,6 @@ # # CONFIG_VGA_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set # # Sound @@ -573,6 +647,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 @@ -619,6 +697,8 @@ # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +# CONFIG_JFFS2_FS is not set # CONFIG_CRAMFS is not set # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set @@ -637,7 +717,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 diff -Nru a/arch/ppc/configs/mpc834x_sys_defconfig b/arch/ppc/configs/mpc834x_sys_defconfig --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/configs/mpc834x_sys_defconfig 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,644 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.11-rc4 +# Thu Feb 17 16:12:23 2005 +# +CONFIG_MMU=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_HAVE_DEC_LOCK=y +CONFIG_PPC=y +CONFIG_PPC32=y +CONFIG_GENERIC_NVRAM=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_LOCALVERSION="" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y +# CONFIG_IKCONFIG is not set +CONFIG_EMBEDDED=y +# CONFIG_KALLSYMS is not set +CONFIG_FUTEX=y +# CONFIG_EPOLL is not set +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set + +# +# Loadable module support +# +# CONFIG_MODULES is not set + +# +# Processor +# +CONFIG_6xx=y +# CONFIG_40x is not set +# CONFIG_44x is not set +# CONFIG_POWER3 is not set +# CONFIG_POWER4 is not set +# CONFIG_8xx is not set +# CONFIG_E500 is not set +# CONFIG_CPU_FREQ is not set +CONFIG_PPC_GEN550=y +CONFIG_83xx=y + +# +# Freescale 83xx options +# +CONFIG_MPC834x_SYS=y +CONFIG_MPC834x=y +CONFIG_PPC_STD_MMU=y + +# +# Platform options +# +# CONFIG_SMP is not set +# CONFIG_PREEMPT is not set +# CONFIG_HIGHMEM is not set +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +# CONFIG_CMDLINE_BOOL is not set + +# +# Bus options +# +CONFIG_GENERIC_ISA_DMA=y +# CONFIG_PCI is not set +# CONFIG_PCI_DOMAINS is not set + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# PC-card bridges +# + +# +# Advanced setup +# +# CONFIG_ADVANCED_OPTIONS is not set + +# +# Default settings for advanced configuration options are used +# +CONFIG_HIGHMEM_START=0xfe000000 +CONFIG_LOWMEM_SIZE=0x30000000 +CONFIG_KERNEL_START=0xc0000000 +CONFIG_TASK_SIZE=0x80000000 +CONFIG_BOOT_LOAD=0x00800000 + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_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=32768 +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_LBD is not set +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Macintosh device drivers +# + +# +# Networking support +# +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +# CONFIG_NETLINK_DEV is not set +CONFIG_UNIX=y +# CONFIG_NET_KEY is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_IP_MROUTE is not set +# CONFIG_ARPD is not set +CONFIG_SYN_COOKIES=y +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +CONFIG_IP_TCPDIAG=y +# CONFIG_IP_TCPDIAG_IPV6 is not set +# CONFIG_IPV6 is not set +# CONFIG_NETFILTER is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=y + +# +# Ethernet (1000 Mbit) +# +CONFIG_GIANFAR=y +# CONFIG_GFAR_NAPI is not set + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Telephony Support +# +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y + +# +# Userland interfaces +# +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input I/O drivers +# +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y +# CONFIG_SERIO is not set +# CONFIG_SERIO_I8042 is not set + +# +# Input Device Drivers +# +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Character devices +# +# CONFIG_VT is not set +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=4 +# CONFIG_SERIAL_8250_EXTENDED is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_NVRAM is not set +CONFIG_GEN_RTC=y +# CONFIG_GEN_RTC_X is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_AGP is not set +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# I2C support +# +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y + +# +# I2C Algorithms +# +# CONFIG_I2C_ALGOBIT is not set +# CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set + +# +# I2C Hardware Bus support +# +# CONFIG_I2C_ISA is not set +CONFIG_I2C_MPC=y +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_PCA_ISA is not set + +# +# Hardware Sensors Chip support +# +# CONFIG_I2C_SENSOR is not set +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1031 is not set +# CONFIG_SENSORS_ASB100 is not set +# CONFIG_SENSORS_DS1621 is not set +# CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_LM63 is not set +# CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set +# CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set +# CONFIG_SENSORS_LM83 is not set +# CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set +# CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SMSC47M1 is not set +# CONFIG_SENSORS_W83781D is not set +# CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83627HF is not set + +# +# Other I2C Chip support +# +# CONFIG_SENSORS_EEPROM is not set +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_RTC8564 is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Misc devices +# + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +# CONFIG_FB is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +# CONFIG_USB_ARCH_HAS_HCD is not set +# 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 +# CONFIG_EXT2_FS_XATTR is not set +CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_XATTR=y +# CONFIG_EXT3_FS_POSIX_ACL is not set +# CONFIG_EXT3_FS_SECURITY is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_FS_MBCACHE=y +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set + +# +# XFS support +# +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +# CONFIG_MSDOS_FS is not set +# CONFIG_VFAT_FS is not set +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVPTS_FS_XATTR is not set +CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_CRAMFS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=y +# CONFIG_NFS_V3 is not set +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set +# CONFIG_NFSD is not set +CONFIG_ROOT_NFS=y +CONFIG_LOCKD=y +CONFIG_SUNRPC=y +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set +# CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +# CONFIG_MSDOS_PARTITION is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_EFI_PARTITION is not set + +# +# Native Language Support +# +# CONFIG_NLS is not set + +# +# Library routines +# +# CONFIG_CRC_CCITT is not set +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set + +# +# Profiling support +# +# CONFIG_PROFILING is not set + +# +# Kernel hacking +# +# CONFIG_DEBUG_KERNEL is not set +# CONFIG_SERIAL_TEXT_DEBUG is not set + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# diff -Nru a/arch/ppc/configs/pmac_defconfig b/arch/ppc/configs/pmac_defconfig --- a/arch/ppc/configs/pmac_defconfig 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/configs/pmac_defconfig 2005-03-07 14:54:18 -08:00 @@ -1,8 +1,12 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.11-rc4 +# Sun Feb 13 14:56:58 2005 # CONFIG_MMU=y +CONFIG_GENERIC_HARDIRQS=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_HAVE_DEC_LOCK=y CONFIG_PPC=y CONFIG_PPC32=y @@ -13,40 +17,45 @@ # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y -# CONFIG_STANDALONE is not set CONFIG_BROKEN_ON_SMP=y # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 +CONFIG_LOG_BUF_SHIFT=16 CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set # # Loadable module support # CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y -# CONFIG_MODVERSIONS is not set +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y CONFIG_KMOD=y # @@ -58,17 +67,21 @@ # CONFIG_POWER3 is not set # CONFIG_POWER4 is not set # CONFIG_8xx is not set +# CONFIG_E500 is not set CONFIG_ALTIVEC=y CONFIG_TAU=y # CONFIG_TAU_INT is not set # CONFIG_TAU_AVERAGE is not set CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_PROC_INTF=y +# CONFIG_CPU_FREQ_DEBUG is not set +CONFIG_CPU_FREQ_STAT=m +CONFIG_CPU_FREQ_STAT_DETAILS=y CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set -# CONFIG_CPU_FREQ_GOV_USERSPACE is not set +CONFIG_CPU_FREQ_GOV_POWERSAVE=m +CONFIG_CPU_FREQ_GOV_USERSPACE=m +CONFIG_CPU_FREQ_GOV_ONDEMAND=m CONFIG_CPU_FREQ_PMAC=y CONFIG_CPU_FREQ_TABLE=y CONFIG_PPC601_SYNC_FIX=y @@ -80,11 +93,14 @@ # CONFIG_PPC_MULTIPLATFORM=y # CONFIG_APUS is not set +# CONFIG_KATANA is not set # CONFIG_WILLOW is not set +# CONFIG_CPCI690 is not set # CONFIG_PCORE is not set # CONFIG_POWERPMC250 is not set -# CONFIG_EV64260 is not set +# CONFIG_CHESTNUT is not set # CONFIG_SPRUCE is not set +# CONFIG_EV64260 is not set # CONFIG_LOPEC is not set # CONFIG_MCPN765 is not set # CONFIG_MVME5100 is not set @@ -97,9 +113,13 @@ # CONFIG_PAL4 is not set # CONFIG_GEMINI is not set # CONFIG_EST8260 is not set +# CONFIG_SBC82xx is not set # CONFIG_SBS8260 is not set -# CONFIG_RPX6 is not set +# CONFIG_RPX8260 is not set # CONFIG_TQM8260 is not set +# CONFIG_ADS8272 is not set +# CONFIG_PQ2FADS is not set +# CONFIG_LITE5200 is not set CONFIG_PPC_CHRP=y CONFIG_PPC_PMAC=y CONFIG_PPC_PREP=y @@ -108,11 +128,9 @@ # CONFIG_SMP is not set # CONFIG_PREEMPT is not set # CONFIG_HIGHMEM is not set -CONFIG_KERNEL_ELF=y CONFIG_BINFMT_ELF=y CONFIG_BINFMT_MISC=m CONFIG_PROC_DEVICETREE=y -CONFIG_PPC_RTAS=y # CONFIG_PREP_RESIDUAL is not set # CONFIG_CMDLINE_BOOL is not set @@ -127,14 +145,21 @@ CONFIG_PCI_NAMES=y # -# PCMCIA/CardBus support +# PCCARD (PCMCIA/CardBus) support # -CONFIG_PCMCIA=m +CONFIG_PCCARD=m # CONFIG_PCMCIA_DEBUG is not set -CONFIG_YENTA=m +CONFIG_PCMCIA=m CONFIG_CARDBUS=y -CONFIG_I82092=m -CONFIG_TCIC=m + +# +# PC-card bridges +# +CONFIG_YENTA=m +# CONFIG_PD6729 is not set +# CONFIG_I82092 is not set +# CONFIG_TCIC is not set +CONFIG_PCCARD_NONSTATIC=m # # Advanced setup @@ -156,7 +181,10 @@ # # Generic Driver Options # +# CONFIG_STANDALONE is not set +CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set # # Memory Technology Devices (MTD) @@ -176,18 +204,35 @@ # Block devices # # CONFIG_BLK_DEV_FD is not set +CONFIG_MAC_FLOPPY=m # CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_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_CARMEL is not set +# CONFIG_BLK_DEV_SX8 is not set +# CONFIG_BLK_DEV_UB is not set 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="" CONFIG_LBD=y +CONFIG_CDROM_PKTCDVD=m +CONFIG_CDROM_PKTCDVD_BUFFERS=8 +# CONFIG_CDROM_PKTCDVD_WCACHE is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set # # ATA/ATAPI/MFM/RLL support @@ -198,16 +243,15 @@ # # Please see Documentation/ide.txt for help/info on IDE drives # +# CONFIG_BLK_DEV_IDE_SATA is not set CONFIG_BLK_DEV_IDEDISK=y # CONFIG_IDEDISK_MULTI_MODE is not set -# CONFIG_IDEDISK_STROKE is not set -CONFIG_BLK_DEV_IDECS=m +# CONFIG_BLK_DEV_IDECS is not set CONFIG_BLK_DEV_IDECD=y # CONFIG_BLK_DEV_IDETAPE is not set CONFIG_BLK_DEV_IDEFLOPPY=y CONFIG_BLK_DEV_IDESCSI=y # CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set # # IDE chipset support/bugfixes @@ -218,12 +262,11 @@ # CONFIG_BLK_DEV_OFFBOARD is not set CONFIG_BLK_DEV_GENERIC=y # CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_SL82C105=y +# CONFIG_BLK_DEV_SL82C105 is not set CONFIG_BLK_DEV_IDEDMA_PCI=y # CONFIG_BLK_DEV_IDEDMA_FORCED is not set CONFIG_IDEDMA_PCI_AUTO=y # CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_ADMA=y # CONFIG_BLK_DEV_AEC62XX is not set # CONFIG_BLK_DEV_ALI15X3 is not set # CONFIG_BLK_DEV_AMD74XX is not set @@ -249,7 +292,7 @@ CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y CONFIG_BLK_DEV_IDEDMA_PMAC=y CONFIG_BLK_DEV_IDE_PMAC_BLINK=y -CONFIG_BLK_DEV_IDEDMA_PMAC_AUTO=y +# CONFIG_IDE_ARM is not set CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set CONFIG_IDEDMA_AUTO=y @@ -275,7 +318,6 @@ # Some SCSI devices (e.g. CD jukebox) support multiple LUNs # # CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_REPORT_LUNS is not set CONFIG_SCSI_CONSTANTS=y # CONFIG_SCSI_LOGGING is not set @@ -284,33 +326,35 @@ # CONFIG_SCSI_SPI_ATTRS=y # CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set # # SCSI low-level drivers # # CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_SCSI_3W_9XXX is not set # CONFIG_SCSI_ACARD is not set # CONFIG_SCSI_AACRAID is not set CONFIG_SCSI_AIC7XXX=m CONFIG_AIC7XXX_CMDS_PER_DEVICE=253 CONFIG_AIC7XXX_RESET_DELAY_MS=15000 -# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set CONFIG_AIC7XXX_DEBUG_ENABLE=y CONFIG_AIC7XXX_DEBUG_MASK=0 CONFIG_AIC7XXX_REG_PRETTY_PRINT=y CONFIG_SCSI_AIC7XXX_OLD=m # CONFIG_SCSI_AIC79XX is not set -CONFIG_SCSI_ADVANSYS=m -# CONFIG_SCSI_MEGARAID is not set +# CONFIG_SCSI_DPT_I2O is not set +# CONFIG_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_LEGACY is not set # CONFIG_SCSI_SATA is not set # CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_CPQFCTS is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_EATA is not set # CONFIG_SCSI_EATA_PIO is not set # CONFIG_SCSI_FUTURE_DOMAIN is not set # CONFIG_SCSI_GDTH is not set # CONFIG_SCSI_IPS is not set +# CONFIG_SCSI_INITIO is not set # CONFIG_SCSI_INIA100 is not set CONFIG_SCSI_SYM53C8XX_2=y CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0 @@ -327,7 +371,6 @@ # CONFIG_SCSI_QLA2300 is not set # CONFIG_SCSI_QLA2322 is not set # CONFIG_SCSI_QLA6312 is not set -# CONFIG_SCSI_QLA6322 is not set # CONFIG_SCSI_DC395x is not set # CONFIG_SCSI_DC390T is not set # CONFIG_SCSI_NSP32 is not set @@ -384,7 +427,8 @@ CONFIG_IEEE1394_ETH1394=m CONFIG_IEEE1394_DV1394=m CONFIG_IEEE1394_RAWIO=m -# CONFIG_IEEE1394_CMP is not set +CONFIG_IEEE1394_CMP=m +CONFIG_IEEE1394_AMDTP=m # # I2O device support @@ -400,8 +444,6 @@ CONFIG_PMAC_PBOOK=y CONFIG_PMAC_APM_EMU=y CONFIG_PMAC_BACKLIGHT=y -# CONFIG_MAC_FLOPPY is not set -CONFIG_MAC_SERIAL=y CONFIG_ADB_MACIO=y CONFIG_INPUT_ADBHID=y CONFIG_MAC_EMUMOUSEBTN=y @@ -434,6 +476,9 @@ # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +CONFIG_IP_TCPDIAG=y +# CONFIG_IP_TCPDIAG_IPV6 is not set # # IP: Virtual Server Configuration @@ -447,11 +492,14 @@ # IP: Netfilter Configuration # CONFIG_IP_NF_CONNTRACK=m +CONFIG_IP_NF_CT_ACCT=y +CONFIG_IP_NF_CONNTRACK_MARK=y +CONFIG_IP_NF_CT_PROTO_SCTP=m CONFIG_IP_NF_FTP=m CONFIG_IP_NF_IRC=m CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m -# CONFIG_IP_NF_QUEUE is not set +CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_LIMIT=m CONFIG_IP_NF_MATCH_IPRANGE=m @@ -471,8 +519,17 @@ CONFIG_IP_NF_MATCH_STATE=m CONFIG_IP_NF_MATCH_CONNTRACK=m CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_REALM=m +CONFIG_IP_NF_MATCH_SCTP=m +CONFIG_IP_NF_MATCH_COMMENT=m +CONFIG_IP_NF_MATCH_CONNMARK=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m CONFIG_IP_NF_FILTER=m CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TARGET_TCPMSS=m CONFIG_IP_NF_NAT=m CONFIG_IP_NF_NAT_NEEDED=y CONFIG_IP_NF_TARGET_MASQUERADE=m @@ -484,17 +541,19 @@ CONFIG_IP_NF_NAT_FTP=m CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m -# CONFIG_IP_NF_MANGLE is not set -# CONFIG_IP_NF_TARGET_LOG is not set -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_DSCP=m +CONFIG_IP_NF_TARGET_MARK=m +CONFIG_IP_NF_TARGET_CLASSIFY=m +CONFIG_IP_NF_TARGET_CONNMARK=m +CONFIG_IP_NF_TARGET_CLUSTERIP=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_TARGET_NOTRACK=m CONFIG_IP_NF_ARPTABLES=m CONFIG_IP_NF_ARPFILTER=m CONFIG_IP_NF_ARP_MANGLE=m -CONFIG_IP_NF_COMPAT_IPCHAINS=m -# CONFIG_IP_NF_COMPAT_IPFWADM is not set -CONFIG_IP_NF_TARGET_NOTRACK=m -CONFIG_IP_NF_RAW=m # # SCTP Configuration (EXPERIMENTAL) @@ -512,12 +571,12 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +CONFIG_NET_CLS_ROUTE=y # # Network testing @@ -593,7 +652,6 @@ CONFIG_MACE=y # CONFIG_MACE_AAUI_PORT is not set CONFIG_BMAC=y -# CONFIG_OAKNET is not set # CONFIG_HAPPYMEAL is not set CONFIG_SUNGEM=y # CONFIG_NET_VENDOR_3COM is not set @@ -634,6 +692,7 @@ # CONFIG_YELLOWFIN is not set # CONFIG_R8169 is not set # CONFIG_SK98LIN is not set +# CONFIG_VIA_VELOCITY is not set # CONFIG_TIGON3 is not set # @@ -667,7 +726,6 @@ # # Wireless 802.11b ISA/PCI cards support # -# CONFIG_AIRO is not set CONFIG_HERMES=m CONFIG_APPLE_AIRPORT=m # CONFIG_PLX_HERMES is not set @@ -691,15 +749,7 @@ # # PCMCIA network device support # -CONFIG_NET_PCMCIA=y -# CONFIG_PCMCIA_3C589 is not set -# CONFIG_PCMCIA_3C574 is not set -# CONFIG_PCMCIA_FMVJ18X is not set -# CONFIG_PCMCIA_PCNET is not set -# CONFIG_PCMCIA_NMCLAN is not set -# CONFIG_PCMCIA_SMC91C92 is not set -# CONFIG_PCMCIA_XIRC2PS is not set -# CONFIG_PCMCIA_AXNET is not set +# CONFIG_NET_PCMCIA is not set # # Wan interfaces @@ -714,10 +764,9 @@ CONFIG_PPP_SYNC_TTY=m CONFIG_PPP_DEFLATE=y CONFIG_PPP_BSDCOMP=m -# CONFIG_PPPOE is not set +CONFIG_PPPOE=m # CONFIG_SLIP is not set # CONFIG_NET_FC is not set -# CONFIG_RCPCI is not set # CONFIG_SHAPER is not set # CONFIG_NETCONSOLE is not set @@ -740,7 +789,7 @@ # Userland interfaces # CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # CONFIG_INPUT_JOYDEV is not set @@ -753,11 +802,8 @@ # # CONFIG_GAMEPORT is not set CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y +# CONFIG_SERIO is not set # CONFIG_SERIO_I8042 is not set -# CONFIG_SERIO_SERPORT is not set -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PCIPS2 is not set # # Input Device Drivers @@ -796,12 +842,12 @@ # Non-8250 serial port support # CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_SERIAL_PMACZILOG=y -# CONFIG_SERIAL_PMACZILOG_CONSOLE is not set +CONFIG_SERIAL_PMACZILOG_CONSOLE=y CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -822,9 +868,14 @@ # # Ftape, the floppy tape device driver # -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set -# CONFIG_DRM is not set +CONFIG_AGP=m +CONFIG_AGP_UNINORTH=m +CONFIG_DRM=m +# CONFIG_DRM_TDFX is not set +CONFIG_DRM_R128=m +CONFIG_DRM_RADEON=m +# CONFIG_DRM_MGA is not set +# CONFIG_DRM_SIS is not set # # PCMCIA character devices @@ -843,6 +894,7 @@ # CONFIG_I2C_ALGOBIT=y # CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set # # I2C Hardware Bus support @@ -857,6 +909,7 @@ # CONFIG_I2C_I810 is not set # CONFIG_I2C_ISA is not set CONFIG_I2C_KEYWEST=m +# CONFIG_I2C_MPC is not set # CONFIG_I2C_NFORCE2 is not set # CONFIG_I2C_PARPORT_LIGHT is not set # CONFIG_I2C_PIIX4 is not set @@ -866,26 +919,38 @@ # CONFIG_I2C_SIS5595 is not set # CONFIG_I2C_SIS630 is not set # CONFIG_I2C_SIS96X is not set +# CONFIG_I2C_STUB is not set # CONFIG_I2C_VIA is not set # CONFIG_I2C_VIAPRO is not set # CONFIG_I2C_VOODOO3 is not set +# CONFIG_I2C_PCA_ISA is not set # # Hardware Sensors Chip support # # CONFIG_I2C_SENSOR is not set # CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1031 is not set # CONFIG_SENSORS_ASB100 is not set # CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_FSCHER is not set # CONFIG_SENSORS_GL518SM is not set # CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_LM63 is not set # CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set # CONFIG_SENSORS_LM78 is not set # CONFIG_SENSORS_LM80 is not set # CONFIG_SENSORS_LM83 is not set # CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set # CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_W83781D is not set # CONFIG_SENSORS_W83L785TS is not set @@ -897,12 +962,18 @@ # CONFIG_SENSORS_EEPROM is not set # CONFIG_SENSORS_PCF8574 is not set # CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_RTC8564 is not set # CONFIG_I2C_DEBUG_CORE is not set # CONFIG_I2C_DEBUG_ALGO is not set # CONFIG_I2C_DEBUG_BUS is not set # CONFIG_I2C_DEBUG_CHIP is not set # +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# # Misc devices # @@ -920,6 +991,9 @@ # Graphics support # CONFIG_FB=y +CONFIG_FB_MODE_HELPERS=y +CONFIG_FB_TILEBLITTING=y +# CONFIG_FB_CIRRUS is not set # CONFIG_FB_PM2 is not set # CONFIG_FB_CYBER2000 is not set CONFIG_FB_OF=y @@ -927,16 +1001,14 @@ CONFIG_FB_PLATINUM=y CONFIG_FB_VALKYRIE=y CONFIG_FB_CT65550=y +# CONFIG_FB_ASILIANT is not set CONFIG_FB_IMSTT=y -# CONFIG_FB_S3TRIO is not set # CONFIG_FB_VGA16 is not set # CONFIG_FB_RIVA is not set CONFIG_FB_MATROX=y CONFIG_FB_MATROX_MILLENIUM=y CONFIG_FB_MATROX_MYSTIQUE=y -# CONFIG_FB_MATROX_G450 is not set -CONFIG_FB_MATROX_G100A=y -CONFIG_FB_MATROX_G100=y +CONFIG_FB_MATROX_G=y # CONFIG_FB_MATROX_I2C is not set # CONFIG_FB_MATROX_MULTIHEAD is not set # CONFIG_FB_RADEON_OLD is not set @@ -946,12 +1018,15 @@ CONFIG_FB_ATY128=y CONFIG_FB_ATY=y CONFIG_FB_ATY_CT=y -CONFIG_FB_ATY_GX=y +CONFIG_FB_ATY_GENERIC_LCD=y # CONFIG_FB_ATY_XL_INIT is not set +CONFIG_FB_ATY_GX=y +# CONFIG_FB_SAVAGE is not set # CONFIG_FB_SIS is not set # CONFIG_FB_NEOMAGIC is not set # CONFIG_FB_KYRO is not set CONFIG_FB_3DFX=y +CONFIG_FB_3DFX_ACCEL=y # CONFIG_FB_VOODOO1 is not set # CONFIG_FB_TRIDENT is not set # CONFIG_FB_VIRTUAL is not set @@ -960,10 +1035,8 @@ # Console display driver support # # CONFIG_VGA_CONSOLE is not set -# CONFIG_MDA_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_PCI_CONSOLE=y # CONFIG_FONTS is not set CONFIG_FONT_8x8=y CONFIG_FONT_8x16=y @@ -975,6 +1048,11 @@ CONFIG_LOGO_LINUX_MONO=y CONFIG_LOGO_LINUX_VGA16=y CONFIG_LOGO_LINUX_CLUT224=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_BACKLIGHT_DEVICE=y +CONFIG_LCD_CLASS_DEVICE=y +CONFIG_LCD_DEVICE=y # # Sound @@ -989,6 +1067,7 @@ CONFIG_SND=m CONFIG_SND_TIMER=m CONFIG_SND_PCM=m +CONFIG_SND_HWDEP=m CONFIG_SND_RAWMIDI=m CONFIG_SND_SEQUENCER=m CONFIG_SND_SEQ_DUMMY=m @@ -1013,6 +1092,7 @@ # # CONFIG_SND_ALI5451 is not set # CONFIG_SND_ATIIXP is not set +# CONFIG_SND_ATIIXP_MODEM is not set # CONFIG_SND_AU8810 is not set # CONFIG_SND_AU8820 is not set # CONFIG_SND_AU8830 is not set @@ -1021,6 +1101,8 @@ # CONFIG_SND_CS46XX is not set # CONFIG_SND_CS4281 is not set # CONFIG_SND_EMU10K1 is not set +# CONFIG_SND_EMU10K1X is not set +# CONFIG_SND_CA0106 is not set # CONFIG_SND_KORG1212 is not set # CONFIG_SND_MIXART is not set # CONFIG_SND_NM256 is not set @@ -1044,6 +1126,7 @@ # CONFIG_SND_INTEL8X0M is not set # CONFIG_SND_SONICVIBES is not set # CONFIG_SND_VIA82XX is not set +# CONFIG_SND_VIA82XX_MODEM is not set # CONFIG_SND_VX222 is not set # @@ -1052,9 +1135,10 @@ CONFIG_SND_POWERMAC=m # -# ALSA USB devices +# USB devices # CONFIG_SND_USB_AUDIO=m +CONFIG_SND_USB_USX2Y=m # # PCMCIA devices @@ -1077,6 +1161,10 @@ CONFIG_USB_DEVICEFS=y # CONFIG_USB_BANDWIDTH is not set CONFIG_USB_DYNAMIC_MINORS=y +CONFIG_USB_SUSPEND=y +# CONFIG_USB_OTG is not set +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y # # USB Host Controller Drivers @@ -1084,6 +1172,7 @@ # CONFIG_USB_EHCI_HCD is not set CONFIG_USB_OHCI_HCD=y # CONFIG_USB_UHCI_HCD is not set +# CONFIG_USB_SL811_HCD is not set # # USB Device Class drivers @@ -1093,20 +1182,25 @@ # CONFIG_USB_MIDI is not set CONFIG_USB_ACM=m CONFIG_USB_PRINTER=m + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# # CONFIG_USB_STORAGE is not set # -# USB Human Interface Devices (HID) +# USB Input Devices # CONFIG_USB_HID=y CONFIG_USB_HIDINPUT=y # CONFIG_HID_FF is not set -# CONFIG_USB_HIDDEV is not set +CONFIG_USB_HIDDEV=y # CONFIG_USB_AIPTEK is not set # CONFIG_USB_WACOM is not set # CONFIG_USB_KBTAB is not set # CONFIG_USB_POWERMATE is not set # CONFIG_USB_MTOUCH is not set +# CONFIG_USB_EGALAX is not set # CONFIG_USB_XPAD is not set # CONFIG_USB_ATI_REMOTE is not set @@ -1115,7 +1209,6 @@ # # CONFIG_USB_MDC800 is not set # CONFIG_USB_MICROTEK is not set -# CONFIG_USB_HPUSBSCSI is not set # # USB Multimedia devices @@ -1127,11 +1220,11 @@ # # -# USB Network adaptors +# USB Network Adapters # # CONFIG_USB_CATC is not set # CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set +CONFIG_USB_PEGASUS=m # CONFIG_USB_RTL8150 is not set # CONFIG_USB_USBNET is not set @@ -1147,6 +1240,7 @@ # CONFIG_USB_SERIAL_BELKIN is not set # CONFIG_USB_SERIAL_WHITEHEAT is not set # CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set +# CONFIG_USB_SERIAL_CYPRESS_M8 is not set # CONFIG_USB_SERIAL_EMPEG is not set # CONFIG_USB_SERIAL_FTDI_SIO is not set CONFIG_USB_SERIAL_VISOR=m @@ -1154,41 +1248,75 @@ # CONFIG_USB_SERIAL_IR is not set # CONFIG_USB_SERIAL_EDGEPORT is not set # CONFIG_USB_SERIAL_EDGEPORT_TI is not set +# CONFIG_USB_SERIAL_GARMIN is not set +# CONFIG_USB_SERIAL_IPW is not set # CONFIG_USB_SERIAL_KEYSPAN_PDA is not set -# CONFIG_USB_SERIAL_KEYSPAN is not set +CONFIG_USB_SERIAL_KEYSPAN=m +CONFIG_USB_SERIAL_KEYSPAN_MPR=y +CONFIG_USB_SERIAL_KEYSPAN_USA28=y +CONFIG_USB_SERIAL_KEYSPAN_USA28X=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y +CONFIG_USB_SERIAL_KEYSPAN_USA19=y +CONFIG_USB_SERIAL_KEYSPAN_USA18X=y +CONFIG_USB_SERIAL_KEYSPAN_USA19W=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y +CONFIG_USB_SERIAL_KEYSPAN_USA49W=y +CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y # CONFIG_USB_SERIAL_KLSI is not set # CONFIG_USB_SERIAL_KOBIL_SCT is not set # CONFIG_USB_SERIAL_MCT_U232 is not set # CONFIG_USB_SERIAL_PL2303 is not set # CONFIG_USB_SERIAL_SAFE is not set +# CONFIG_USB_SERIAL_TI is not set # CONFIG_USB_SERIAL_CYBERJACK is not set # CONFIG_USB_SERIAL_XIRCOM is not set # CONFIG_USB_SERIAL_OMNINET is not set +CONFIG_USB_EZUSB=y # # USB Miscellaneous drivers # # CONFIG_USB_EMI62 is not set # CONFIG_USB_EMI26 is not set -# CONFIG_USB_TIGL is not set # CONFIG_USB_AUERSWALD is not set # CONFIG_USB_RIO500 is not set # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set # CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGETKIT is not set +# CONFIG_USB_PHIDGETSERVO is not set +# CONFIG_USB_IDMOUSE is not set # CONFIG_USB_TEST is not set # +# USB ATM/DSL drivers +# + +# # 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 -# CONFIG_EXT2_FS_XATTR is not set +CONFIG_EXT2_FS_XATTR=y +# CONFIG_EXT2_FS_POSIX_ACL is not set +# CONFIG_EXT2_FS_SECURITY is not set CONFIG_EXT3_FS=y CONFIG_EXT3_FS_XATTR=y # CONFIG_EXT3_FS_POSIX_ACL is not set @@ -1198,10 +1326,15 @@ CONFIG_FS_MBCACHE=y # 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 # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -1211,7 +1344,8 @@ CONFIG_ISO9660_FS=y # CONFIG_JOLIET is not set # CONFIG_ZISOFS is not set -# CONFIG_UDF_FS is not set +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y # # DOS/FAT/NT Filesystems @@ -1219,6 +1353,8 @@ CONFIG_FAT_FS=m CONFIG_MSDOS_FS=m CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" # CONFIG_NTFS_FS is not set # @@ -1227,11 +1363,12 @@ CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y CONFIG_SYSFS=y -CONFIG_DEVFS_FS=y -# CONFIG_DEVFS_MOUNT is not set -# CONFIG_DEVFS_DEBUG is not set -# CONFIG_DEVPTS_FS_XATTR is not set +# CONFIG_DEVFS_FS is not set +CONFIG_DEVPTS_FS_XATTR=y +CONFIG_DEVPTS_FS_SECURITY=y CONFIG_TMPFS=y +CONFIG_TMPFS_XATTR=y +CONFIG_TMPFS_SECURITY=y # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -1245,7 +1382,7 @@ # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set -# CONFIG_CRAMFS is not set +CONFIG_CRAMFS=m # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set # CONFIG_QNX4FS_FS is not set @@ -1256,16 +1393,19 @@ # Network File Systems # CONFIG_NFS_FS=y -# CONFIG_NFS_V3 is not set +CONFIG_NFS_V3=y # CONFIG_NFS_V4 is not set # CONFIG_NFS_DIRECTIO is not set CONFIG_NFSD=y -# CONFIG_NFSD_V3 is not set -# CONFIG_NFSD_TCP is not set +CONFIG_NFSD_V3=y +# CONFIG_NFSD_V4 is not set +CONFIG_NFSD_TCP=y CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y CONFIG_EXPORTFS=y CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set CONFIG_SMB_FS=m # CONFIG_SMB_NLS_DEFAULT is not set # CONFIG_CIFS is not set @@ -1288,7 +1428,6 @@ # CONFIG_SOLARIS_X86_PARTITION is not set # CONFIG_UNIXWARE_DISKLABEL is not set # CONFIG_LDM_PARTITION is not set -# CONFIG_NEC98_PARTITION is not set # CONFIG_SGI_PARTITION is not set # CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set @@ -1320,8 +1459,9 @@ # CONFIG_NLS_CODEPAGE_949 is not set # CONFIG_NLS_CODEPAGE_874 is not set # CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=m CONFIG_NLS_ISO8859_1=m # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -1332,31 +1472,52 @@ # CONFIG_NLS_ISO8859_9 is not set # CONFIG_NLS_ISO8859_13 is not set # CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set +CONFIG_NLS_ISO8859_15=m # CONFIG_NLS_KOI8_R is not set # CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_UTF8 is not set +CONFIG_NLS_UTF8=m # # Library routines # +CONFIG_CRC_CCITT=y CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y # +# Profiling support +# +# CONFIG_PROFILING is not set + +# # Kernel hacking # -# CONFIG_DEBUG_KERNEL is not set +CONFIG_DEBUG_KERNEL=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_XMON is not set +# CONFIG_BDI_SWITCH is not set CONFIG_BOOTX_TEXT=y # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # # Cryptographic options # # CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# diff -Nru a/arch/ppc/kernel/cputable.c b/arch/ppc/kernel/cputable.c --- a/arch/ppc/kernel/cputable.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc/kernel/cputable.c 2005-03-07 14:54:17 -08:00 @@ -560,6 +560,18 @@ .dcache_bsize = 32, .cpu_setup = __setup_cpu_603 }, + { /* e300 (a 603e core, plus some) on 83xx */ + .pvr_mask = 0x7fff0000, + .pvr_value = 0x00830000, + .cpu_name = "e300", + .cpu_features = CPU_FTR_SPLIT_ID_CACHE | + CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | + CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_HAS_HIGH_BATS, + .cpu_user_features = COMMON_PPC, + .icache_bsize = 32, + .dcache_bsize = 32, + .cpu_setup = __setup_cpu_603 + }, { /* default match, we assume split I/D cache & TB (non-601)... */ .pvr_mask = 0x00000000, .pvr_value = 0x00000000, diff -Nru a/arch/ppc/kernel/dma-mapping.c b/arch/ppc/kernel/dma-mapping.c --- a/arch/ppc/kernel/dma-mapping.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc/kernel/dma-mapping.c 2005-03-07 14:54:16 -08:00 @@ -219,7 +219,8 @@ c = vm_region_alloc(&consistent_head, size, gfp & ~(__GFP_DMA | __GFP_HIGHMEM)); if (c) { - pte_t *pte = consistent_pte + CONSISTENT_OFFSET(c->vm_start); + unsigned long vaddr = c->vm_start; + pte_t *pte = consistent_pte + CONSISTENT_OFFSET(vaddr); struct page *end = page + (1 << order); /* @@ -232,9 +233,11 @@ set_page_count(page, 1); SetPageReserved(page); - set_pte(pte, mk_pte(page, pgprot_noncached(PAGE_KERNEL))); + set_pte_at(&init_mm, vaddr, + pte, mk_pte(page, pgprot_noncached(PAGE_KERNEL))); page++; pte++; + vaddr += PAGE_SIZE; } while (size -= PAGE_SIZE); /* @@ -262,7 +265,7 @@ void __dma_free_coherent(size_t size, void *vaddr) { struct vm_region *c; - unsigned long flags; + unsigned long flags, addr; pte_t *ptep; size = PAGE_ALIGN(size); @@ -281,11 +284,13 @@ } ptep = consistent_pte + CONSISTENT_OFFSET(c->vm_start); + addr = c->vm_start; do { - pte_t pte = ptep_get_and_clear(ptep); + pte_t pte = ptep_get_and_clear(&init_mm, addr, ptep); unsigned long pfn; ptep++; + addr += PAGE_SIZE; if (!pte_none(pte) && pte_present(pte)) { pfn = pte_pfn(pte); diff -Nru a/arch/ppc/kernel/head_booke.h b/arch/ppc/kernel/head_booke.h --- a/arch/ppc/kernel/head_booke.h 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc/kernel/head_booke.h 2005-03-07 14:54:16 -08:00 @@ -194,8 +194,8 @@ CRITICAL_EXCEPTION_PROLOG; \ addi r3,r1,STACK_FRAME_OVERHEAD; \ EXC_XFER_TEMPLATE(hdlr, n+2, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \ - NOCOPY, transfer_to_handler_full, \ - ret_from_except_full) + NOCOPY, crit_transfer_to_handler, \ + ret_from_crit_exc) #define MCHECK_EXCEPTION(n, label, hdlr) \ START_EXCEPTION(label); \ diff -Nru a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S --- a/arch/ppc/kernel/misc.S 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/kernel/misc.S 2005-03-07 14:54:18 -08:00 @@ -1450,3 +1450,4 @@ .long sys_add_key .long sys_request_key /* 270 */ .long sys_keyctl + .long sys_waitid diff -Nru a/arch/ppc/kernel/pci.c b/arch/ppc/kernel/pci.c --- a/arch/ppc/kernel/pci.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc/kernel/pci.c 2005-03-07 14:54:17 -08:00 @@ -1058,7 +1058,7 @@ return; res = *(bus->resource[0]); - DBG("Remapping Bus %d, bridge: %s\n", bus->number, bridge->slot_name); + DBG("Remapping Bus %d, bridge: %s\n", bus->number, pci_name(bridge)); res.start -= ((unsigned long) hose->io_base_virt - isa_io_base); res.end -= ((unsigned long) hose->io_base_virt - isa_io_base); DBG(" IO window: %08lx-%08lx\n", res.start, res.end); diff -Nru a/arch/ppc/kernel/ppc_htab.c b/arch/ppc/kernel/ppc_htab.c --- a/arch/ppc/kernel/ppc_htab.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/kernel/ppc_htab.c 2005-03-07 14:54:18 -08:00 @@ -108,7 +108,7 @@ PTE *ptr; #endif /* CONFIG_PPC_STD_MMU */ - if (cur_cpu_spec[0]->cpu_features & CPU_FTR_604_PERF_MON) { + if (cpu_has_feature(CPU_FTR_604_PERF_MON)) { mmcr0 = mfspr(SPRN_MMCR0); pmc1 = mfspr(SPRN_PMC1); pmc2 = mfspr(SPRN_PMC2); @@ -209,7 +209,7 @@ if ( !strncmp( buffer, "reset", 5) ) { - if (cur_cpu_spec[0]->cpu_features & CPU_FTR_604_PERF_MON) { + if (cpu_has_feature(CPU_FTR_604_PERF_MON)) { /* reset PMC1 and PMC2 */ mtspr(SPRN_PMC1, 0); mtspr(SPRN_PMC2, 0); @@ -221,7 +221,7 @@ } /* Everything below here requires the performance monitor feature. */ - if ( !cur_cpu_spec[0]->cpu_features & CPU_FTR_604_PERF_MON ) + if (!cpu_has_feature(CPU_FTR_604_PERF_MON)) return count; /* turn off performance monitoring */ @@ -339,7 +339,7 @@ "0.5", "1.0", "(reserved2)", "(reserved3)" }; - if (!(cur_cpu_spec[0]->cpu_features & CPU_FTR_L2CR)) + if (!cpu_has_feature(CPU_FTR_L2CR)) return -EFAULT; if ( /*!table->maxlen ||*/ (*ppos && !write)) { diff -Nru a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c --- a/arch/ppc/kernel/ppc_ksyms.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/kernel/ppc_ksyms.c 2005-03-07 14:54:18 -08:00 @@ -319,7 +319,8 @@ EXPORT_SYMBOL(cpm_install_handler); EXPORT_SYMBOL(cpm_free_handler); #endif /* CONFIG_8xx */ -#if defined(CONFIG_8xx) || defined(CONFIG_40x) || defined(CONFIG_85xx) +#if defined(CONFIG_8xx) || defined(CONFIG_40x) || defined(CONFIG_85xx) ||\ + defined(CONFIG_83xx) EXPORT_SYMBOL(__res); #endif diff -Nru a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c --- a/arch/ppc/kernel/setup.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/kernel/setup.c 2005-03-07 14:54:18 -08:00 @@ -227,6 +227,10 @@ maj = ((pvr >> 8) & 0xFF) - 1; min = pvr & 0xFF; break; + case 0x8083: /* e300 */ + maj = PVR_MAJ(pvr); + min = PVR_MIN(pvr); + break; case 0x8020: /* e500 */ maj = PVR_MAJ(pvr); min = PVR_MIN(pvr); @@ -619,7 +623,7 @@ /* Checks "l2cr=xxxx" command-line option */ int __init ppc_setup_l2cr(char *str) { - if (cur_cpu_spec[0]->cpu_features & CPU_FTR_L2CR) { + if (cpu_has_feature(CPU_FTR_L2CR)) { unsigned long val = simple_strtoul(str, NULL, 0); printk(KERN_INFO "l2cr set to %lx\n", val); _set_L2CR(0); /* force invalidate by disable cache */ @@ -720,7 +724,7 @@ * Systems with OF can look in the properties on the cpu node(s) * for a possibly more accurate value. */ - if (cur_cpu_spec[0]->cpu_features & CPU_FTR_SPLIT_ID_CACHE) { + if (cpu_has_feature(CPU_FTR_SPLIT_ID_CACHE)) { dcache_bsize = cur_cpu_spec[0]->dcache_bsize; icache_bsize = cur_cpu_spec[0]->icache_bsize; ucache_bsize = 0; diff -Nru a/arch/ppc/kernel/temp.c b/arch/ppc/kernel/temp.c --- a/arch/ppc/kernel/temp.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc/kernel/temp.c 2005-03-07 14:54:17 -08:00 @@ -223,7 +223,7 @@ /* We assume in SMP that if one CPU has TAU support, they * all have it --BenH */ - if (!(cur_cpu_spec[0]->cpu_features & CPU_FTR_TAU)) { + if (!cpu_has_feature(CPU_FTR_TAU)) { printk("Thermal assist unit not available\n"); tau_initialized = 0; return 1; diff -Nru a/arch/ppc/mm/init.c b/arch/ppc/mm/init.c --- a/arch/ppc/mm/init.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc/mm/init.c 2005-03-07 14:54:16 -08:00 @@ -490,18 +490,6 @@ printk(KERN_INFO "AGP special page: 0x%08lx\n", agp_special_page); #endif - /* Make sure all our pagetable pages have page->mapping - and page->index set correctly. */ - for (addr = KERNELBASE; addr != 0; addr += PGDIR_SIZE) { - struct page *pg; - pmd_t *pmd = pmd_offset(pgd_offset_k(addr), addr); - if (pmd_present(*pmd)) { - pg = pmd_page(*pmd); - pg->mapping = (void *) &init_mm; - pg->index = addr; - } - } - mem_init_done = 1; } diff -Nru a/arch/ppc/mm/mmu_decl.h b/arch/ppc/mm/mmu_decl.h --- a/arch/ppc/mm/mmu_decl.h 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc/mm/mmu_decl.h 2005-03-07 14:54:17 -08:00 @@ -75,7 +75,7 @@ unsigned long pdval) { if ((Hash != 0) && - (cur_cpu_spec[0]->cpu_features & CPU_FTR_HPTE_TABLE)) + cpu_has_feature(CPU_FTR_HPTE_TABLE)) flush_hash_pages(0, va, pdval, 1); else _tlbie(va); diff -Nru a/arch/ppc/mm/pgtable.c b/arch/ppc/mm/pgtable.c --- a/arch/ppc/mm/pgtable.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc/mm/pgtable.c 2005-03-07 14:54:16 -08:00 @@ -102,11 +102,6 @@ if (mem_init_done) { pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO); - if (pte) { - struct page *ptepage = virt_to_page(pte); - ptepage->mapping = (void *) mm; - ptepage->index = address & PMD_MASK; - } } else { pte = (pte_t *)early_get_page(); if (pte) @@ -126,11 +121,8 @@ #endif ptepage = alloc_pages(flags, 0); - if (ptepage) { - ptepage->mapping = (void *) mm; - ptepage->index = address & PMD_MASK; + if (ptepage) clear_highpage(ptepage); - } return ptepage; } @@ -139,7 +131,6 @@ #ifdef CONFIG_SMP hash_page_sync(); #endif - virt_to_page(pte)->mapping = NULL; free_page((unsigned long)pte); } @@ -148,7 +139,6 @@ #ifdef CONFIG_SMP hash_page_sync(); #endif - ptepage->mapping = NULL; __free_page(ptepage); } @@ -298,7 +288,7 @@ pg = pte_alloc_kernel(&init_mm, pd, va); if (pg != 0) { err = 0; - set_pte(pg, pfn_pte(pa >> PAGE_SHIFT, __pgprot(flags))); + set_pte_at(&init_mm, va, pg, pfn_pte(pa >> PAGE_SHIFT, __pgprot(flags))); if (mem_init_done) flush_HPTE(0, va, pmd_val(*pd)); } diff -Nru a/arch/ppc/mm/ppc_mmu.c b/arch/ppc/mm/ppc_mmu.c --- a/arch/ppc/mm/ppc_mmu.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc/mm/ppc_mmu.c 2005-03-07 14:54:16 -08:00 @@ -138,7 +138,7 @@ union ubat *bat = BATS[index]; if (((flags & _PAGE_NO_CACHE) == 0) && - (cur_cpu_spec[0]->cpu_features & CPU_FTR_NEED_COHERENT)) + cpu_has_feature(CPU_FTR_NEED_COHERENT)) flags |= _PAGE_COHERENT; bl = (size >> 17) - 1; @@ -191,7 +191,7 @@ extern unsigned int hash_page[]; extern unsigned int flush_hash_patch_A[], flush_hash_patch_B[]; - if ((cur_cpu_spec[0]->cpu_features & CPU_FTR_HPTE_TABLE) == 0) { + if (!cpu_has_feature(CPU_FTR_HPTE_TABLE)) { /* * Put a blr (procedure return) instruction at the * start of hash_page, since we can still get DSI diff -Nru a/arch/ppc/mm/tlb.c b/arch/ppc/mm/tlb.c --- a/arch/ppc/mm/tlb.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/mm/tlb.c 2005-03-07 14:54:18 -08:00 @@ -47,26 +47,6 @@ } /* - * Called by ptep_test_and_clear_young() - */ -void flush_hash_one_pte(pte_t *ptep) -{ - struct page *ptepage; - struct mm_struct *mm; - unsigned long ptephys; - unsigned long addr; - - if (Hash == 0) - return; - - ptepage = virt_to_page(ptep); - mm = (struct mm_struct *) ptepage->mapping; - ptephys = __pa(ptep) & PAGE_MASK; - addr = ptepage->index + (((unsigned long)ptep & ~PAGE_MASK) << 10); - flush_hash_pages(mm->context, addr, ptephys, 1); -} - -/* * Called by ptep_set_access_flags, must flush on CPUs for which the * DSI handler can't just "fixup" the TLB on a write fault */ diff -Nru a/arch/ppc/platforms/4xx/ebony.c b/arch/ppc/platforms/4xx/ebony.c --- a/arch/ppc/platforms/4xx/ebony.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/platforms/4xx/ebony.c 2005-03-07 14:54:18 -08:00 @@ -49,8 +49,19 @@ #include #include #include +#include #include +#include + +/* + * This is a horrible kludge, we eventually need to abstract this + * generic PHY stuff, so the standard phy mode defines can be + * easily used from arch code. + */ +#include "../../../../drivers/net/ibm_emac/ibm_emac_phy.h" + +bd_t __res; static struct ibm44x_clocks clocks __initdata; @@ -258,19 +269,21 @@ static void __init ebony_setup_arch(void) { - unsigned char * vpd_base; struct ocp_def *def; struct ocp_func_emac_data *emacdata; /* Set mac_addr for each EMAC */ - vpd_base = ioremap64(EBONY_VPD_BASE, EBONY_VPD_SIZE); def = ocp_get_one_device(OCP_VENDOR_IBM, OCP_FUNC_EMAC, 0); emacdata = def->additions; - memcpy(emacdata->mac_addr, EBONY_NA0_ADDR(vpd_base), 6); + emacdata->phy_map = 0x00000001; /* Skip 0x00 */ + emacdata->phy_mode = PHY_MODE_RMII; + memcpy(emacdata->mac_addr, __res.bi_enetaddr, 6); + def = ocp_get_one_device(OCP_VENDOR_IBM, OCP_FUNC_EMAC, 1); emacdata = def->additions; - memcpy(emacdata->mac_addr, EBONY_NA1_ADDR(vpd_base), 6); - iounmap(vpd_base); + emacdata->phy_map = 0x00000001; /* Skip 0x00 */ + emacdata->phy_mode = PHY_MODE_RMII; + memcpy(emacdata->mac_addr, __res.bi_enet1addr, 6); /* * Determine various clocks. @@ -314,7 +327,14 @@ void __init platform_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) { - parse_bootinfo((struct bi_record *) (r3 + KERNELBASE)); + parse_bootinfo(find_bootinfo()); + + /* + * If we were passed in a board information, copy it into the + * residual data area. + */ + if (r3) + __res = *(bd_t *)(r3 + KERNELBASE); ibm44x_platform_init(); diff -Nru a/arch/ppc/platforms/4xx/ebony.h b/arch/ppc/platforms/4xx/ebony.h --- a/arch/ppc/platforms/4xx/ebony.h 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc/platforms/4xx/ebony.h 2005-03-07 14:54:17 -08:00 @@ -23,13 +23,9 @@ /* F/W TLB mapping used in bootloader glue to reset EMAC */ #define PPC44x_EMAC0_MR0 0xE0000800 -/* Macros to get at Ebony VPD info */ -#define EBONY_VPD_BASE 0x00000001fffffe00ULL -#define EBONY_VPD_SIZE 0x24 -#define EBONY_NA0_OFFSET 0x0c -#define EBONY_NA1_OFFSET 0x18 -#define EBONY_NA0_ADDR(base) (base + EBONY_NA0_OFFSET) -#define EBONY_NA1_ADDR(base) (base + EBONY_NA1_OFFSET) +/* Where to find the MAC info */ +#define EBONY_OPENBIOS_MAC_BASE 0xfffffe0c +#define EBONY_OPENBIOS_MAC_OFFSET 0x0c /* Default clock rates for Rev. B and Rev. C silicon */ #define EBONY_440GP_RB_SYSCLK 33000000 diff -Nru a/arch/ppc/platforms/4xx/xilinx_ml300.c b/arch/ppc/platforms/4xx/xilinx_ml300.c --- a/arch/ppc/platforms/4xx/xilinx_ml300.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc/platforms/4xx/xilinx_ml300.c 2005-03-07 14:54:16 -08:00 @@ -122,25 +122,7 @@ void __init ml300_init_irq(void) { - unsigned int i; - ppc4xx_init_IRQ(); - - /* - * For PowerPC 405 cores the default value for NR_IRQS is 32. - * See include/asm-ppc/irq.h for details. - * This is just fine for ML300. - */ -#if (NR_IRQS != 32) -#error NR_IRQS must be 32 for ML300 -#endif - - for (i = 0; i < NR_IRQS; i++) { - if (XPAR_INTC_0_KIND_OF_INTR & (0x80000000 >> i)) - irq_desc[i].status &= ~IRQ_LEVEL; - else - irq_desc[i].status |= IRQ_LEVEL; - } } void __init diff -Nru a/arch/ppc/platforms/83xx/Kconfig b/arch/ppc/platforms/83xx/Kconfig --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/platforms/83xx/Kconfig 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,30 @@ +config 83xx + bool "PowerQUICC II Pro (83xx) Support" + depends on 6xx + +menu "Freescale 83xx options" + depends on 83xx + +choice + prompt "Machine Type" + depends on 83xx + default MPC834x_SYS + +config MPC834x_SYS + bool "Freescale MPC834x SYS" + help + This option enables support for the MPC 834x SYS evaluation board. + +endchoice + +config MPC834x + bool + depends on MPC834x_SYS + default y + +config PPC_GEN550 + bool + depends on 83xx + default y + +endmenu diff -Nru a/arch/ppc/platforms/83xx/Makefile b/arch/ppc/platforms/83xx/Makefile --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/platforms/83xx/Makefile 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,6 @@ +# +# Makefile for the PowerPC 83xx linux kernel. +# +obj-$(CONFIG_83xx) += mpc83xx_sys.o mpc83xx_devices.o + +obj-$(CONFIG_MPC834x_SYS) += mpc834x_sys.o diff -Nru a/arch/ppc/platforms/83xx/mpc834x_sys.c b/arch/ppc/platforms/83xx/mpc834x_sys.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/platforms/83xx/mpc834x_sys.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,290 @@ +/* + * arch/ppc/platforms/83xx/mpc834x_sys.c + * + * MPC834x SYS board specific routines + * + * Maintainer: Kumar Gala + * + * Copyright 2005 Freescale Semiconductor Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* for linux/serial_core.h */ +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#ifndef CONFIG_PCI +unsigned long isa_io_base = 0; +unsigned long isa_mem_base = 0; +#endif + +extern unsigned long total_memory; /* in mm/init */ + +unsigned char __res[sizeof (bd_t)]; + +#ifdef CONFIG_PCI +#error "PCI is not supported" +/* NEED mpc83xx_map_irq & mpc83xx_exclude_device + see platforms/85xx/mpc85xx_ads_common.c */ +#endif /* CONFIG_PCI */ + +/* ************************************************************************ + * + * Setup the architecture + * + */ +static void __init +mpc834x_sys_setup_arch(void) +{ + bd_t *binfo = (bd_t *) __res; + unsigned int freq; + struct gianfar_platform_data *pdata; + + /* get the core frequency */ + freq = binfo->bi_intfreq; + + /* Set loops_per_jiffy to a half-way reasonable value, + for use until calibrate_delay gets called. */ + loops_per_jiffy = freq / HZ; + +#ifdef CONFIG_PCI + /* setup PCI host bridges */ + mpc83xx_sys_setup_hose(); +#endif + mpc83xx_early_serial_map(); + + /* setup the board related information for the enet controllers */ + pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC83xx_TSEC1); + pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; + pdata->interruptPHY = MPC83xx_IRQ_EXT1; + pdata->phyid = 0; + /* fixup phy address */ + pdata->phy_reg_addr += binfo->bi_immr_base; + memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6); + + pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC83xx_TSEC2); + pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; + pdata->interruptPHY = MPC83xx_IRQ_EXT2; + pdata->phyid = 1; + /* fixup phy address */ + pdata->phy_reg_addr += binfo->bi_immr_base; + memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6); + +#ifdef CONFIG_BLK_DEV_INITRD + if (initrd_start) + ROOT_DEV = Root_RAM0; + else +#endif +#ifdef CONFIG_ROOT_NFS + ROOT_DEV = Root_NFS; +#else + ROOT_DEV = Root_HDA1; +#endif +} + +static void __init +mpc834x_sys_map_io(void) +{ + /* we steal the lowest ioremap addr for virt space */ + io_block_mapping(VIRT_IMMRBAR, immrbar, 1024*1024, _PAGE_IO); + io_block_mapping(BCSR_VIRT_ADDR, BCSR_PHYS_ADDR, BCSR_SIZE, _PAGE_IO); +} + +int +mpc834x_sys_show_cpuinfo(struct seq_file *m) +{ + uint pvid, svid, phid1; + bd_t *binfo = (bd_t *) __res; + unsigned int freq; + + /* get the core frequency */ + freq = binfo->bi_intfreq; + + pvid = mfspr(PVR); + svid = mfspr(SVR); + + seq_printf(m, "chip\t\t: MPC%s\n", cur_ppc_sys_spec->ppc_sys_name); + seq_printf(m, "Vendor\t\t: Freescale Inc.\n"); + seq_printf(m, "Machine\t\t: mpc%s sys\n", cur_ppc_sys_spec->ppc_sys_name); + seq_printf(m, "core clock\t: %d MHz\n" + "bus clock\t: %d MHz\n", + (int)(binfo->bi_intfreq / 1000000), + (int)(binfo->bi_busfreq / 1000000)); + seq_printf(m, "PVR\t\t: 0x%x\n", pvid); + seq_printf(m, "SVR\t\t: 0x%x\n", svid); + + /* Display cpu Pll setting */ + phid1 = mfspr(HID1); + seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); + + /* Display the amount of memory */ + seq_printf(m, "Memory\t\t: %d MB\n", (int)(binfo->bi_memsize / (1024 * 1024))); + + return 0; +} + + +void __init +mpc834x_sys_init_IRQ(void) +{ + bd_t *binfo = (bd_t *) __res; + + u8 senses[8] = { + 0, /* EXT 0 */ + IRQ_SENSE_LEVEL, /* EXT 1 */ + IRQ_SENSE_LEVEL, /* EXT 2 */ + 0, /* EXT 3 */ + 0, /* EXT 4 */ + 0, /* EXT 5 */ + 0, /* EXT 6 */ + 0, /* EXT 7 */ + }; + + ipic_init(binfo->bi_immr_base + 0x00700, 0, MPC83xx_IPIC_IRQ_OFFSET, senses, 8); + + /* Initialize the default interrupt mapping priorities, + * in case the boot rom changed something on us. + */ + ipic_set_default_priority(); +} + +static __inline__ void +mpc834x_sys_set_bat(void) +{ + /* we steal the lowest ioremap addr for virt space */ + mb(); + mtspr(DBAT1U, VIRT_IMMRBAR | 0x1e); + mtspr(DBAT1L, immrbar | 0x2a); + mb(); +} + +void __init +platform_init(unsigned long r3, unsigned long r4, unsigned long r5, + unsigned long r6, unsigned long r7) +{ + bd_t *binfo = (bd_t *) __res; + + /* parse_bootinfo must always be called first */ + parse_bootinfo(find_bootinfo()); + + /* + * If we were passed in a board information, copy it into the + * residual data area. + */ + if (r3) { + memcpy((void *) __res, (void *) (r3 + KERNELBASE), + sizeof (bd_t)); + } + +#if defined(CONFIG_BLK_DEV_INITRD) + /* + * If the init RAM disk has been configured in, and there's a valid + * starting address for it, set it up. + */ + if (r4) { + initrd_start = r4 + KERNELBASE; + initrd_end = r5 + KERNELBASE; + } +#endif /* CONFIG_BLK_DEV_INITRD */ + + /* Copy the kernel command line arguments to a safe place. */ + if (r6) { + *(char *) (r7 + KERNELBASE) = 0; + strcpy(cmd_line, (char *) (r6 + KERNELBASE)); + } + + immrbar = binfo->bi_immr_base; + + mpc834x_sys_set_bat(); + +#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG) + { + struct uart_port p; + + memset(&p, 0, sizeof (p)); + p.iotype = SERIAL_IO_MEM; + p.membase = (unsigned char __iomem *)immrbar + 0x4500; + p.uartclk = binfo->bi_busfreq; + + gen550_init(0, &p); + + memset(&p, 0, sizeof (p)); + p.iotype = SERIAL_IO_MEM; + p.membase = (unsigned char __iomem *)immrbar + 0x4500; + p.uartclk = binfo->bi_busfreq; + + gen550_init(1, &p); + } +#endif + + identify_ppc_sys_by_id(mfspr(SVR)); + + /* setup the PowerPC module struct */ + ppc_md.setup_arch = mpc834x_sys_setup_arch; + ppc_md.show_cpuinfo = mpc834x_sys_show_cpuinfo; + + ppc_md.init_IRQ = mpc834x_sys_init_IRQ; + ppc_md.get_irq = ipic_get_irq; + + ppc_md.restart = mpc83xx_restart; + ppc_md.power_off = mpc83xx_power_off; + ppc_md.halt = mpc83xx_halt; + + ppc_md.find_end_of_memory = mpc83xx_find_end_of_memory; + ppc_md.setup_io_mappings = mpc834x_sys_map_io; + + ppc_md.time_init = mpc83xx_time_init; + ppc_md.set_rtc_time = NULL; + ppc_md.get_rtc_time = NULL; + ppc_md.calibrate_decr = mpc83xx_calibrate_decr; + + ppc_md.early_serial_map = mpc83xx_early_serial_map; +#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG) + ppc_md.progress = gen550_progress; +#endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */ + + if (ppc_md.progress) + ppc_md.progress("mpc834x_sys_init(): exit", 0); + + return; +} diff -Nru a/arch/ppc/platforms/83xx/mpc834x_sys.h b/arch/ppc/platforms/83xx/mpc834x_sys.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/platforms/83xx/mpc834x_sys.h 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,51 @@ +/* + * arch/ppc/platforms/83xx/mpc834x_sys.h + * + * MPC834X SYS common board definitions + * + * Maintainer: Kumar Gala + * + * Copyright 2005 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + */ + +#ifndef __MACH_MPC83XX_SYS_H__ +#define __MACH_MPC83XX_SYS_H__ + +#include +#include +#include +#include +#include + +#define VIRT_IMMRBAR ((uint)0xfe000000) + +#define BCSR_PHYS_ADDR ((uint)0xf8000000) +#define BCSR_VIRT_ADDR ((uint)0xfe100000) +#define BCSR_SIZE ((uint)(32 * 1024)) + +#ifdef CONFIG_PCI +/* PCI interrupt controller */ +#define PIRQA MPC83xx_IRQ_IRQ4 +#define PIRQB MPC83xx_IRQ_IRQ5 +#define PIRQC MPC83xx_IRQ_IRQ6 +#define PIRQD MPC83xx_IRQ_IRQ7 + +#define MPC834x_SYS_PCI1_LOWER_IO 0x00000000 +#define MPC834x_SYS_PCI1_UPPER_IO 0x00ffffff + +#define MPC834x_SYS_PCI1_LOWER_MEM 0x80000000 +#define MPC834x_SYS_PCI1_UPPER_MEM 0x9fffffff + +#define MPC834x_SYS_PCI1_IO_BASE 0xe2000000 +#define MPC834x_SYS_PCI1_MEM_OFFSET 0x00000000 + +#define MPC834x_SYS_PCI1_IO_SIZE 0x01000000 +#endif /* CONFIG_PCI */ + +#endif /* __MACH_MPC83XX_SYS_H__ */ diff -Nru a/arch/ppc/platforms/83xx/mpc83xx_devices.c b/arch/ppc/platforms/83xx/mpc83xx_devices.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/platforms/83xx/mpc83xx_devices.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,237 @@ +/* + * arch/ppc/platforms/83xx/mpc83xx_devices.c + * + * MPC83xx Device descriptions + * + * Maintainer: Kumar Gala + * + * Copyright 2005 Freescale Semiconductor Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +/* We use offsets for IORESOURCE_MEM since we do not know at compile time + * what IMMRBAR is, will get fixed up by mach_mpc83xx_fixup + */ + +static struct gianfar_platform_data mpc83xx_tsec1_pdata = { + .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT | + FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON | + FSL_GIANFAR_DEV_HAS_MULTI_INTR, + .phy_reg_addr = 0x24000, +}; + +static struct gianfar_platform_data mpc83xx_tsec2_pdata = { + .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT | + FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON | + FSL_GIANFAR_DEV_HAS_MULTI_INTR, + .phy_reg_addr = 0x24000, +}; + +static struct fsl_i2c_platform_data mpc83xx_fsl_i2c1_pdata = { + .device_flags = FSL_I2C_DEV_SEPARATE_DFSRR, +}; + +static struct fsl_i2c_platform_data mpc83xx_fsl_i2c2_pdata = { + .device_flags = FSL_I2C_DEV_SEPARATE_DFSRR, +}; + +static struct plat_serial8250_port serial_platform_data[] = { + [0] = { + .mapbase = 0x4500, + .irq = MPC83xx_IRQ_UART1, + .iotype = UPIO_MEM, + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, + }, + [1] = { + .mapbase = 0x4600, + .irq = MPC83xx_IRQ_UART2, + .iotype = UPIO_MEM, + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, + }, +}; + +struct platform_device ppc_sys_platform_devices[] = { + [MPC83xx_TSEC1] = { + .name = "fsl-gianfar", + .id = 1, + .dev.platform_data = &mpc83xx_tsec1_pdata, + .num_resources = 4, + .resource = (struct resource[]) { + { + .start = 0x24000, + .end = 0x24fff, + .flags = IORESOURCE_MEM, + }, + { + .name = "tx", + .start = MPC83xx_IRQ_TSEC1_TX, + .end = MPC83xx_IRQ_TSEC1_TX, + .flags = IORESOURCE_IRQ, + }, + { + .name = "rx", + .start = MPC83xx_IRQ_TSEC1_RX, + .end = MPC83xx_IRQ_TSEC1_RX, + .flags = IORESOURCE_IRQ, + }, + { + .name = "error", + .start = MPC83xx_IRQ_TSEC1_ERROR, + .end = MPC83xx_IRQ_TSEC1_ERROR, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC83xx_TSEC2] = { + .name = "fsl-gianfar", + .id = 2, + .dev.platform_data = &mpc83xx_tsec2_pdata, + .num_resources = 4, + .resource = (struct resource[]) { + { + .start = 0x25000, + .end = 0x25fff, + .flags = IORESOURCE_MEM, + }, + { + .name = "tx", + .start = MPC83xx_IRQ_TSEC2_TX, + .end = MPC83xx_IRQ_TSEC2_TX, + .flags = IORESOURCE_IRQ, + }, + { + .name = "rx", + .start = MPC83xx_IRQ_TSEC2_RX, + .end = MPC83xx_IRQ_TSEC2_RX, + .flags = IORESOURCE_IRQ, + }, + { + .name = "error", + .start = MPC83xx_IRQ_TSEC2_ERROR, + .end = MPC83xx_IRQ_TSEC2_ERROR, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC83xx_IIC1] = { + .name = "fsl-i2c", + .id = 1, + .dev.platform_data = &mpc83xx_fsl_i2c1_pdata, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = 0x3000, + .end = 0x30ff, + .flags = IORESOURCE_MEM, + }, + { + .start = MPC83xx_IRQ_IIC1, + .end = MPC83xx_IRQ_IIC1, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC83xx_IIC2] = { + .name = "fsl-i2c", + .id = 2, + .dev.platform_data = &mpc83xx_fsl_i2c2_pdata, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = 0x3100, + .end = 0x31ff, + .flags = IORESOURCE_MEM, + }, + { + .start = MPC83xx_IRQ_IIC2, + .end = MPC83xx_IRQ_IIC2, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC83xx_DUART] = { + .name = "serial8250", + .id = 0, + .dev.platform_data = serial_platform_data, + }, + [MPC83xx_SEC2] = { + .name = "fsl-sec2", + .id = 1, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = 0x30000, + .end = 0x3ffff, + .flags = IORESOURCE_MEM, + }, + { + .start = MPC83xx_IRQ_SEC2, + .end = MPC83xx_IRQ_SEC2, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC83xx_USB2_DR] = { + .name = "fsl-usb2-dr", + .id = 1, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = 0x22000, + .end = 0x22fff, + .flags = IORESOURCE_MEM, + }, + { + .start = MPC83xx_IRQ_USB2_DR, + .end = MPC83xx_IRQ_USB2_DR, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC83xx_USB2_MPH] = { + .name = "fsl-usb2-mph", + .id = 1, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = 0x23000, + .end = 0x23fff, + .flags = IORESOURCE_MEM, + }, + { + .start = MPC83xx_IRQ_USB2_MPH, + .end = MPC83xx_IRQ_USB2_MPH, + .flags = IORESOURCE_IRQ, + }, + }, + }, +}; + +static int __init mach_mpc83xx_fixup(struct platform_device *pdev) +{ + ppc_sys_fixup_mem_resource(pdev, immrbar); + return 0; +} + +static int __init mach_mpc83xx_init(void) +{ + if (ppc_md.progress) + ppc_md.progress("mach_mpc83xx_init:enter", 0); + ppc_sys_device_fixup = mach_mpc83xx_fixup; + return 0; +} + +postcore_initcall(mach_mpc83xx_init); diff -Nru a/arch/ppc/platforms/83xx/mpc83xx_sys.c b/arch/ppc/platforms/83xx/mpc83xx_sys.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/platforms/83xx/mpc83xx_sys.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,100 @@ +/* + * arch/ppc/platforms/83xx/mpc83xx_sys.c + * + * MPC83xx System descriptions + * + * Maintainer: Kumar Gala + * + * Copyright 2005 Freescale Semiconductor Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +#include +#include +#include +#include + +struct ppc_sys_spec *cur_ppc_sys_spec; +struct ppc_sys_spec ppc_sys_specs[] = { + { + .ppc_sys_name = "8349E", + .mask = 0xFFFF0000, + .value = 0x80500000, + .num_devices = 8, + .device_list = (enum ppc_sys_devices[]) + { + MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, + MPC83xx_IIC2, MPC83xx_DUART, MPC83xx_SEC2, + MPC83xx_USB2_DR, MPC83xx_USB2_MPH + }, + }, + { + .ppc_sys_name = "8349", + .mask = 0xFFFF0000, + .value = 0x80510000, + .num_devices = 7, + .device_list = (enum ppc_sys_devices[]) + { + MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, + MPC83xx_IIC2, MPC83xx_DUART, + MPC83xx_USB2_DR, MPC83xx_USB2_MPH + }, + }, + { + .ppc_sys_name = "8347E", + .mask = 0xFFFF0000, + .value = 0x80520000, + .num_devices = 8, + .device_list = (enum ppc_sys_devices[]) + { + MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, + MPC83xx_IIC2, MPC83xx_DUART, MPC83xx_SEC2, + MPC83xx_USB2_DR, MPC83xx_USB2_MPH + }, + }, + { + .ppc_sys_name = "8347", + .mask = 0xFFFF0000, + .value = 0x80530000, + .num_devices = 7, + .device_list = (enum ppc_sys_devices[]) + { + MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, + MPC83xx_IIC2, MPC83xx_DUART, + MPC83xx_USB2_DR, MPC83xx_USB2_MPH + }, + }, + { + .ppc_sys_name = "8343E", + .mask = 0xFFFF0000, + .value = 0x80540000, + .num_devices = 7, + .device_list = (enum ppc_sys_devices[]) + { + MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, + MPC83xx_IIC2, MPC83xx_DUART, MPC83xx_SEC2, + MPC83xx_USB2_DR, + }, + }, + { + .ppc_sys_name = "8343", + .mask = 0xFFFF0000, + .value = 0x80550000, + .num_devices = 6, + .device_list = (enum ppc_sys_devices[]) + { + MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, + MPC83xx_IIC2, MPC83xx_DUART, + MPC83xx_USB2_DR, + }, + }, + { /* default match */ + .ppc_sys_name = "", + .mask = 0x00000000, + .value = 0x00000000, + }, +}; diff -Nru a/arch/ppc/platforms/85xx/mpc85xx_ads_common.c b/arch/ppc/platforms/85xx/mpc85xx_ads_common.c --- a/arch/ppc/platforms/85xx/mpc85xx_ads_common.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/platforms/85xx/mpc85xx_ads_common.c 2005-03-07 14:54:18 -08:00 @@ -43,6 +43,7 @@ #include #include #include +#include #include @@ -128,19 +129,9 @@ pvid = mfspr(PVR); svid = mfspr(SVR); + seq_printf(m, "chip\t\t: MPC%s\n", cur_ppc_sys_spec->ppc_sys_name); seq_printf(m, "Vendor\t\t: Freescale Semiconductor\n"); - - switch (svid & 0xffff0000) { - case SVR_8540: - seq_printf(m, "Machine\t\t: mpc8540ads\n"); - break; - case SVR_8560: - seq_printf(m, "Machine\t\t: mpc8560ads\n"); - break; - default: - seq_printf(m, "Machine\t\t: unknown\n"); - break; - } + seq_printf(m, "Machine\t\t: mpc%sads\n", cur_ppc_sys_spec->ppc_sys_name); seq_printf(m, "clock\t\t: %dMHz\n", freq / 1000000); seq_printf(m, "PVR\t\t: 0x%x\n", pvid); seq_printf(m, "SVR\t\t: 0x%x\n", svid); diff -Nru a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c --- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c 2005-03-07 14:54:18 -08:00 @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -73,60 +74,60 @@ /* Internal interrupts are all Level Sensitive, and Positive Polarity */ static u_char mpc85xx_cds_openpic_initsenses[] __initdata = { - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 0: L2 Cache */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 1: ECM */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 2: DDR DRAM */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 3: LBIU */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 4: DMA 0 */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 5: DMA 1 */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 6: DMA 2 */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 7: DMA 3 */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 8: PCI/PCI-X */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 9: RIO Inbound Port Write Error */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 10: RIO Doorbell Inbound */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 11: RIO Outbound Message */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 12: RIO Inbound Message */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 13: TSEC 0 Transmit */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 14: TSEC 0 Receive */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 15: Unused */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 16: Unused */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 17: Unused */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 18: TSEC 0 Receive/Transmit Error */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 19: TSEC 1 Transmit */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 20: TSEC 1 Receive */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 21: Unused */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 22: Unused */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 23: Unused */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 24: TSEC 1 Receive/Transmit Error */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 25: Fast Ethernet */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 26: DUART */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 27: I2C */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 28: Performance Monitor */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 29: Unused */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 30: CPM */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 31: Unused */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 0: L2 Cache */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 1: ECM */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 2: DDR DRAM */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 3: LBIU */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 4: DMA 0 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 5: DMA 1 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 6: DMA 2 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 7: DMA 3 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 8: PCI/PCI-X */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 9: RIO Inbound Port Write Error */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 10: RIO Doorbell Inbound */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 11: RIO Outbound Message */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 12: RIO Inbound Message */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 13: TSEC 0 Transmit */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 14: TSEC 0 Receive */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 15: Unused */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 16: Unused */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 17: Unused */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 18: TSEC 0 Receive/Transmit Error */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 19: TSEC 1 Transmit */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 20: TSEC 1 Receive */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 21: Unused */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 22: Unused */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 23: Unused */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 24: TSEC 1 Receive/Transmit Error */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 25: Fast Ethernet */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 26: DUART */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 27: I2C */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 28: Performance Monitor */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 29: Unused */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 30: CPM */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 31: Unused */ #if defined(CONFIG_PCI) - (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 0: PCI1 slot */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 1: PCI1 slot */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 2: PCI1 slot */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 3: PCI1 slot */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 0: PCI1 slot */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 1: PCI1 slot */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 2: PCI1 slot */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 3: PCI1 slot */ #else - 0x0, /* External 0: */ - 0x0, /* External 1: */ - 0x0, /* External 2: */ - 0x0, /* External 3: */ -#endif - 0x0, /* External 4: */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 5: PHY */ - 0x0, /* External 6: */ - 0x0, /* External 7: */ - 0x0, /* External 8: */ - 0x0, /* External 9: */ - 0x0, /* External 10: */ + 0x0, /* External 0: */ + 0x0, /* External 1: */ + 0x0, /* External 2: */ + 0x0, /* External 3: */ +#endif + 0x0, /* External 4: */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 5: PHY */ + 0x0, /* External 6: */ + 0x0, /* External 7: */ + 0x0, /* External 8: */ + 0x0, /* External 9: */ + 0x0, /* External 10: */ #if defined(CONFIG_85xx_PCI2) && defined(CONFIG_PCI) - (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 11: PCI2 slot 0 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 11: PCI2 slot 0 */ #else - 0x0, /* External 11: */ + 0x0, /* External 11: */ #endif }; @@ -134,31 +135,32 @@ int mpc85xx_cds_show_cpuinfo(struct seq_file *m) { - uint pvid, svid, phid1; - uint memsize = total_memory; - bd_t *binfo = (bd_t *) __res; - unsigned int freq; + uint pvid, svid, phid1; + uint memsize = total_memory; + bd_t *binfo = (bd_t *) __res; + unsigned int freq; - /* get the core frequency */ - freq = binfo->bi_intfreq; + /* get the core frequency */ + freq = binfo->bi_intfreq; - pvid = mfspr(PVR); - svid = mfspr(SVR); + pvid = mfspr(PVR); + svid = mfspr(SVR); - seq_printf(m, "Vendor\t\t: Freescale Semiconductor\n"); - seq_printf(m, "Machine\t\t: CDS (%x)\n", cadmus[CM_VER]); + seq_printf(m, "chip\t\t: MPC%s\n", cur_ppc_sys_spec->ppc_sys_name); + seq_printf(m, "Vendor\t\t: Freescale Semiconductor\n"); + seq_printf(m, "Machine\t\t: CDS - MPC%s (%x)\n", cur_ppc_sys_spec->ppc_sys_name, cadmus[CM_VER]); seq_printf(m, "clock\t\t: %dMHz\n", freq / 1000000); - seq_printf(m, "PVR\t\t: 0x%x\n", pvid); - seq_printf(m, "SVR\t\t: 0x%x\n", svid); + seq_printf(m, "PVR\t\t: 0x%x\n", pvid); + seq_printf(m, "SVR\t\t: 0x%x\n", svid); - /* Display cpu Pll setting */ - phid1 = mfspr(HID1); - seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); + /* Display cpu Pll setting */ + phid1 = mfspr(HID1); + seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); - /* Display the amount of memory */ - seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024)); + /* Display the amount of memory */ + seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024)); - return 0; + return 0; } #ifdef CONFIG_CPM2 @@ -185,21 +187,21 @@ int i; #endif - /* Determine the Physical Address of the OpenPIC regs */ - phys_addr_t OpenPIC_PAddr = binfo->bi_immr_base + MPC85xx_OPENPIC_OFFSET; - OpenPIC_Addr = ioremap(OpenPIC_PAddr, MPC85xx_OPENPIC_SIZE); - OpenPIC_InitSenses = mpc85xx_cds_openpic_initsenses; - OpenPIC_NumInitSenses = sizeof (mpc85xx_cds_openpic_initsenses); - - /* Skip reserved space and internal sources */ - openpic_set_sources(0, 32, OpenPIC_Addr + 0x10200); - /* Map PIC IRQs 0-11 */ - openpic_set_sources(32, 12, OpenPIC_Addr + 0x10000); - - /* we let openpic interrupts starting from an offset, to - * leave space for cascading interrupts underneath. - */ - openpic_init(MPC85xx_OPENPIC_IRQ_OFFSET); + /* Determine the Physical Address of the OpenPIC regs */ + phys_addr_t OpenPIC_PAddr = binfo->bi_immr_base + MPC85xx_OPENPIC_OFFSET; + OpenPIC_Addr = ioremap(OpenPIC_PAddr, MPC85xx_OPENPIC_SIZE); + OpenPIC_InitSenses = mpc85xx_cds_openpic_initsenses; + OpenPIC_NumInitSenses = sizeof (mpc85xx_cds_openpic_initsenses); + + /* Skip reserved space and internal sources */ + openpic_set_sources(0, 32, OpenPIC_Addr + 0x10200); + /* Map PIC IRQs 0-11 */ + openpic_set_sources(32, 12, OpenPIC_Addr + 0x10000); + + /* we let openpic interrupts starting from an offset, to + * leave space for cascading interrupts underneath. + */ + openpic_init(MPC85xx_OPENPIC_IRQ_OFFSET); #ifdef CONFIG_CPM2 /* disable all CPM interupts */ @@ -219,7 +221,7 @@ setup_irq(MPC85xx_IRQ_CPM, &cpm2_irqaction); #endif - return; + return; } #ifdef CONFIG_PCI @@ -278,8 +280,8 @@ } } -#define ARCADIA_HOST_BRIDGE_IDSEL 17 -#define ARCADIA_2ND_BRIDGE_IDSEL 3 +#define ARCADIA_HOST_BRIDGE_IDSEL 17 +#define ARCADIA_2ND_BRIDGE_IDSEL 3 extern int mpc85xx_pci1_last_busno; @@ -289,7 +291,7 @@ if (bus == 0 && PCI_SLOT(devfn) == 0) return PCIBIOS_DEVICE_NOT_FOUND; #ifdef CONFIG_85xx_PCI2 - if (mpc85xx_pci1_last_busno) + if (mpc85xx_pci1_last_busno) if (bus == (mpc85xx_pci1_last_busno + 1) && PCI_SLOT(devfn) == 0) return PCIBIOS_DEVICE_NOT_FOUND; #endif @@ -303,6 +305,8 @@ } #endif /* CONFIG_PCI */ +TODC_ALLOC(); + /* ************************************************************************ * * Setup the architecture @@ -311,14 +315,14 @@ static void __init mpc85xx_cds_setup_arch(void) { - bd_t *binfo = (bd_t *) __res; - unsigned int freq; + bd_t *binfo = (bd_t *) __res; + unsigned int freq; struct gianfar_platform_data *pdata; - /* get the core frequency */ - freq = binfo->bi_intfreq; + /* get the core frequency */ + freq = binfo->bi_intfreq; - printk("mpc85xx_cds_setup_arch\n"); + printk("mpc85xx_cds_setup_arch\n"); #ifdef CONFIG_CPM2 cpm2_reset(); @@ -328,17 +332,24 @@ cds_pci_slot = ((cadmus[CM_CSR] >> 6) & 0x3) + 1; printk("CDS Version = %x in PCI slot %d\n", cadmus[CM_VER], cds_pci_slot); - /* Set loops_per_jiffy to a half-way reasonable value, - for use until calibrate_delay gets called. */ - loops_per_jiffy = freq / HZ; + /* Setup TODC access */ + TODC_INIT(TODC_TYPE_DS1743, + 0, + 0, + ioremap(CDS_RTC_ADDR, CDS_RTC_SIZE), + 8); + + /* Set loops_per_jiffy to a half-way reasonable value, + for use until calibrate_delay gets called. */ + loops_per_jiffy = freq / HZ; #ifdef CONFIG_PCI - /* setup PCI host bridges */ - mpc85xx_setup_hose(); + /* setup PCI host bridges */ + mpc85xx_setup_hose(); #endif #ifdef CONFIG_SERIAL_8250 - mpc85xx_early_serial_map(); + mpc85xx_early_serial_map(); #endif #ifdef CONFIG_SERIAL_TEXT_DEBUG @@ -366,14 +377,14 @@ #ifdef CONFIG_BLK_DEV_INITRD - if (initrd_start) - ROOT_DEV = Root_RAM0; - else + if (initrd_start) + ROOT_DEV = Root_RAM0; + else #endif #ifdef CONFIG_ROOT_NFS - ROOT_DEV = Root_NFS; + ROOT_DEV = Root_NFS; #else - ROOT_DEV = Root_HDA1; + ROOT_DEV = Root_HDA1; #endif } @@ -382,18 +393,18 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) { - /* parse_bootinfo must always be called first */ - parse_bootinfo(find_bootinfo()); + /* parse_bootinfo must always be called first */ + parse_bootinfo(find_bootinfo()); - /* - * If we were passed in a board information, copy it into the - * residual data area. - */ - if (r3) { - memcpy((void *) __res, (void *) (r3 + KERNELBASE), - sizeof (bd_t)); + /* + * If we were passed in a board information, copy it into the + * residual data area. + */ + if (r3) { + memcpy((void *) __res, (void *) (r3 + KERNELBASE), + sizeof (bd_t)); - } + } #ifdef CONFIG_SERIAL_TEXT_DEBUG { bd_t *binfo = (bd_t *) __res; @@ -401,7 +412,7 @@ /* Use the last TLB entry to map CCSRBAR to allow access to DUART regs */ settlbcam(NUM_TLBCAMS - 1, binfo->bi_immr_base, - binfo->bi_immr_base, MPC85xx_CCSRBAR_SIZE, _PAGE_IO, 0); + binfo->bi_immr_base, MPC85xx_CCSRBAR_SIZE, _PAGE_IO, 0); memset(&p, 0, sizeof (p)); p.iotype = SERIAL_IO_MEM; @@ -420,49 +431,53 @@ #endif #if defined(CONFIG_BLK_DEV_INITRD) - /* - * If the init RAM disk has been configured in, and there's a valid - * starting address for it, set it up. - */ - if (r4) { - initrd_start = r4 + KERNELBASE; - initrd_end = r5 + KERNELBASE; - } -#endif /* CONFIG_BLK_DEV_INITRD */ - - /* Copy the kernel command line arguments to a safe place. */ - - if (r6) { - *(char *) (r7 + KERNELBASE) = 0; - strcpy(cmd_line, (char *) (r6 + KERNELBASE)); - } + /* + * If the init RAM disk has been configured in, and there's a valid + * starting address for it, set it up. + */ + if (r4) { + initrd_start = r4 + KERNELBASE; + initrd_end = r5 + KERNELBASE; + } +#endif /* CONFIG_BLK_DEV_INITRD */ + + /* Copy the kernel command line arguments to a safe place. */ + + if (r6) { + *(char *) (r7 + KERNELBASE) = 0; + strcpy(cmd_line, (char *) (r6 + KERNELBASE)); + } identify_ppc_sys_by_id(mfspr(SVR)); - /* setup the PowerPC module struct */ - ppc_md.setup_arch = mpc85xx_cds_setup_arch; - ppc_md.show_cpuinfo = mpc85xx_cds_show_cpuinfo; - - ppc_md.init_IRQ = mpc85xx_cds_init_IRQ; - ppc_md.get_irq = openpic_get_irq; - - ppc_md.restart = mpc85xx_restart; - ppc_md.power_off = mpc85xx_power_off; - ppc_md.halt = mpc85xx_halt; - - ppc_md.find_end_of_memory = mpc85xx_find_end_of_memory; - - ppc_md.time_init = NULL; - ppc_md.set_rtc_time = NULL; - ppc_md.get_rtc_time = NULL; - ppc_md.calibrate_decr = mpc85xx_calibrate_decr; + /* setup the PowerPC module struct */ + ppc_md.setup_arch = mpc85xx_cds_setup_arch; + ppc_md.show_cpuinfo = mpc85xx_cds_show_cpuinfo; + + ppc_md.init_IRQ = mpc85xx_cds_init_IRQ; + ppc_md.get_irq = openpic_get_irq; + + ppc_md.restart = mpc85xx_restart; + ppc_md.power_off = mpc85xx_power_off; + ppc_md.halt = mpc85xx_halt; + + ppc_md.find_end_of_memory = mpc85xx_find_end_of_memory; + + ppc_md.calibrate_decr = mpc85xx_calibrate_decr; + + ppc_md.time_init = todc_time_init; + ppc_md.set_rtc_time = todc_set_rtc_time; + ppc_md.get_rtc_time = todc_get_rtc_time; + + ppc_md.nvram_read_val = todc_direct_read_val; + ppc_md.nvram_write_val = todc_direct_write_val; #if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG) - ppc_md.progress = gen550_progress; + ppc_md.progress = gen550_progress; #endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */ - if (ppc_md.progress) - ppc_md.progress("mpc85xx_cds_init(): exit", 0); + if (ppc_md.progress) + ppc_md.progress("mpc85xx_cds_init(): exit", 0); - return; + return; } diff -Nru a/arch/ppc/platforms/85xx/mpc85xx_cds_common.h b/arch/ppc/platforms/85xx/mpc85xx_cds_common.h --- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.h 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.h 2005-03-07 14:54:16 -08:00 @@ -33,6 +33,10 @@ #define CM_CSR (1) #define CM_RST (2) +/* CDS NVRAM/RTC */ +#define CDS_RTC_ADDR (0xf8000000) +#define CDS_RTC_SIZE (8 * 1024) + /* PCI config */ #define PCI1_CFG_ADDR_OFFSET (0x8000) #define PCI1_CFG_DATA_OFFSET (0x8004) diff -Nru a/arch/ppc/platforms/85xx/mpc85xx_sys.c b/arch/ppc/platforms/85xx/mpc85xx_sys.c --- a/arch/ppc/platforms/85xx/mpc85xx_sys.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc/platforms/85xx/mpc85xx_sys.c 2005-03-07 14:54:16 -08:00 @@ -21,7 +21,7 @@ struct ppc_sys_spec *cur_ppc_sys_spec; struct ppc_sys_spec ppc_sys_specs[] = { { - .ppc_sys_name = "MPC8540", + .ppc_sys_name = "8540", .mask = 0xFFFF0000, .value = 0x80300000, .num_devices = 10, @@ -33,7 +33,7 @@ }, }, { - .ppc_sys_name = "MPC8560", + .ppc_sys_name = "8560", .mask = 0xFFFF0000, .value = 0x80700000, .num_devices = 19, @@ -49,7 +49,7 @@ }, }, { - .ppc_sys_name = "MPC8541", + .ppc_sys_name = "8541", .mask = 0xFFFF0000, .value = 0x80720000, .num_devices = 13, @@ -63,7 +63,7 @@ }, }, { - .ppc_sys_name = "MPC8541E", + .ppc_sys_name = "8541E", .mask = 0xFFFF0000, .value = 0x807A0000, .num_devices = 14, @@ -77,7 +77,7 @@ }, }, { - .ppc_sys_name = "MPC8555", + .ppc_sys_name = "8555", .mask = 0xFFFF0000, .value = 0x80710000, .num_devices = 20, @@ -94,7 +94,7 @@ }, }, { - .ppc_sys_name = "MPC8555E", + .ppc_sys_name = "8555E", .mask = 0xFFFF0000, .value = 0x80790000, .num_devices = 21, diff -Nru a/arch/ppc/platforms/85xx/sbc85xx.c b/arch/ppc/platforms/85xx/sbc85xx.c --- a/arch/ppc/platforms/85xx/sbc85xx.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc/platforms/85xx/sbc85xx.c 2005-03-07 14:54:17 -08:00 @@ -42,6 +42,7 @@ #include #include #include +#include #include @@ -128,19 +129,9 @@ pvid = mfspr(PVR); svid = mfspr(SVR); + seq_printf(m, "chip\t\t: MPC%s\n", cur_ppc_sys_spec->ppc_sys_name); seq_printf(m, "Vendor\t\t: Wind River\n"); - - switch (svid & 0xffff0000) { - case SVR_8540: - seq_printf(m, "Machine\t\t: hhmmm, this board isn't made yet!\n"); - break; - case SVR_8560: - seq_printf(m, "Machine\t\t: SBC8560\n"); - break; - default: - seq_printf(m, "Machine\t\t: unknown\n"); - break; - } + seq_printf(m, "Machine\t\t: SBC%s\n", cur_ppc_sys_spec->ppc_sys_name); seq_printf(m, "clock\t\t: %dMHz\n", freq / 1000000); seq_printf(m, "PVR\t\t: 0x%x\n", pvid); seq_printf(m, "SVR\t\t: 0x%x\n", svid); diff -Nru a/arch/ppc/platforms/85xx/stx_gp3.c b/arch/ppc/platforms/85xx/stx_gp3.c --- a/arch/ppc/platforms/85xx/stx_gp3.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc/platforms/85xx/stx_gp3.c 2005-03-07 14:54:17 -08:00 @@ -34,8 +34,10 @@ #include #include #include +#include #include #include +#include #include #include @@ -266,19 +268,9 @@ memsize = total_memory; + seq_printf(m, "chip\t\t: MPC%s\n", cur_ppc_sys_spec->ppc_sys_name); seq_printf(m, "Vendor\t\t: RPC Electronics STx \n"); - - switch (svid & 0xffff0000) { - case SVR_8540: - seq_printf(m, "Machine\t\t: GP3 - MPC8540\n"); - break; - case SVR_8560: - seq_printf(m, "Machine\t\t: GP3 - MPC8560\n"); - break; - default: - seq_printf(m, "Machine\t\t: unknown\n"); - break; - } + seq_printf(m, "Machine\t\t: GP3 - MPC%s\n", cur_ppc_sys_spec->ppc_sys_name); seq_printf(m, "bus freq\t: %u.%.6u MHz\n", freq / 1000000, freq % 1000000); seq_printf(m, "PVR\t\t: 0x%x\n", pvid); diff -Nru a/arch/ppc/platforms/katana.c b/arch/ppc/platforms/katana.c --- a/arch/ppc/platforms/katana.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/platforms/katana.c 2005-03-07 14:54:18 -08:00 @@ -1,9 +1,10 @@ /* * arch/ppc/platforms/katana.c * - * Board setup routines for the Artesyn Katana 750 based boards. + * Board setup routines for the Artesyn Katana cPCI boards. * - * Tim Montgomery + * Athor: Tim Montgomery + * Maintained by: Mark A. Greer * * Based on code done by Rabeeh Khoury - rabeeh@galileo.co.il * Based on code done by - Mark A. Greer @@ -26,7 +27,8 @@ #include #include #include -#include +#include +#include #include #ifdef CONFIG_BOOTIMG #include @@ -36,13 +38,19 @@ #include #include #include +#include #include #include static struct mv64x60_handle bh; static katana_id_t katana_id; -static u32 cpld_base; -static u32 sram_base; +static void __iomem *cpld_base; +static void __iomem *sram_base; + +static u32 katana_flash_size_0; +static u32 katana_flash_size_1; + +unsigned char __res[sizeof(bd_t)]; /* PCI Interrupt routing */ static int __init @@ -105,7 +113,7 @@ void __init katana_get_board_id(void) { - switch (in_8((volatile char *)(cpld_base + KATANA_CPLD_PRODUCT_ID))) { + switch (in_8(cpld_base + KATANA_CPLD_PRODUCT_ID)) { case KATANA_PRODUCT_ID_3750: katana_id = KATANA_ID_3750; break; @@ -170,7 +178,7 @@ static inline int katana_is_monarch(void) { - return in_8((volatile char *)(cpld_base + KATANA_CPLD_BD_CFG_3)) & + return in_8(cpld_base + KATANA_CPLD_BD_CFG_3) & KATANA_CPLD_BD_CFG_3_MONARCH; } @@ -180,18 +188,17 @@ u8 reset_out; /* Enable access to IPMI ctlr by clearing IPMI PORTSEL bit in CPLD */ - reset_out = in_8((volatile char *)(cpld_base + KATANA_CPLD_RESET_OUT)); + reset_out = in_8(cpld_base + KATANA_CPLD_RESET_OUT); reset_out &= ~KATANA_CPLD_RESET_OUT_PORTSEL; - out_8((volatile void *)(cpld_base + KATANA_CPLD_RESET_OUT), reset_out); - return; + out_8(cpld_base + KATANA_CPLD_RESET_OUT, reset_out); } -static unsigned long +static u32 katana_bus_freq(void) { u8 bd_cfg_0; - bd_cfg_0 = in_8((volatile char *)(cpld_base + KATANA_CPLD_BD_CFG_0)); + bd_cfg_0 = in_8(cpld_base + KATANA_CPLD_BD_CFG_0); switch (bd_cfg_0 & KATANA_CPLD_BD_CFG_0_SYSCLK_MASK) { case KATANA_CPLD_BD_CFG_0_SYSCLK_200: @@ -263,13 +270,12 @@ * BIT25 summarizes GPP interrupts 8-15 */ mv64x60_set_bits(&bh, MV64360_IC_CPU0_INTR_MASK_HI, (1<<25)); - return; } void __init katana_setup_peripherals(void) { - u32 base, size_0, size_1; + u32 base; /* Set up windows for boot CS, soldered & socketed flash, and CPLD */ mv64x60_set_32bit_window(&bh, MV64x60_CPU2BOOT_WIN, @@ -277,19 +283,22 @@ bh.ci->enable_window_32bit(&bh, MV64x60_CPU2BOOT_WIN); /* Assume firmware set up window sizes correctly for dev 0 & 1 */ - mv64x60_get_32bit_window(&bh, MV64x60_CPU2DEV_0_WIN, &base, &size_0); + mv64x60_get_32bit_window(&bh, MV64x60_CPU2DEV_0_WIN, &base, + &katana_flash_size_0); - if (size_0 > 0) { + if (katana_flash_size_0 > 0) { mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_0_WIN, - KATANA_SOLDERED_FLASH_BASE, size_0, 0); + KATANA_SOLDERED_FLASH_BASE, katana_flash_size_0, 0); bh.ci->enable_window_32bit(&bh, MV64x60_CPU2DEV_0_WIN); } - mv64x60_get_32bit_window(&bh, MV64x60_CPU2DEV_1_WIN, &base, &size_1); + mv64x60_get_32bit_window(&bh, MV64x60_CPU2DEV_1_WIN, &base, + &katana_flash_size_1); - if (size_1 > 0) { + if (katana_flash_size_1 > 0) { mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_1_WIN, - (KATANA_SOLDERED_FLASH_BASE + size_0), size_1, 0); + (KATANA_SOLDERED_FLASH_BASE + katana_flash_size_0), + katana_flash_size_1, 0); bh.ci->enable_window_32bit(&bh, MV64x60_CPU2DEV_1_WIN); } @@ -300,12 +309,12 @@ mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_3_WIN, KATANA_CPLD_BASE, KATANA_CPLD_SIZE, 0); bh.ci->enable_window_32bit(&bh, MV64x60_CPU2DEV_3_WIN); - cpld_base = (u32)ioremap(KATANA_CPLD_BASE, KATANA_CPLD_SIZE); + cpld_base = ioremap(KATANA_CPLD_BASE, KATANA_CPLD_SIZE); mv64x60_set_32bit_window(&bh, MV64x60_CPU2SRAM_WIN, KATANA_INTERNAL_SRAM_BASE, MV64360_SRAM_SIZE, 0); bh.ci->enable_window_32bit(&bh, MV64x60_CPU2SRAM_WIN); - sram_base = (u32)ioremap(KATANA_INTERNAL_SRAM_BASE, MV64360_SRAM_SIZE); + sram_base = ioremap(KATANA_INTERNAL_SRAM_BASE, MV64360_SRAM_SIZE); /* Set up Enet->SRAM window */ mv64x60_set_32bit_window(&bh, MV64x60_ENET2MEM_4_WIN, @@ -339,13 +348,11 @@ * internal data path in SRAM since it's first time accessing it * while after reset it's not configured. */ - memset((void *)sram_base, 0, MV64360_SRAM_SIZE); + memset(sram_base, 0, MV64360_SRAM_SIZE); /* Only processor zero [on 3750] is an PCI interrupt controller */ if (katana_get_proc_num() == 0) katana_intr_setup(); - - return; } static void __init @@ -356,7 +363,7 @@ memset(&si, 0, sizeof(si)); - si.phys_reg_base = KATANA_BRIDGE_REG_BASE; + si.phys_reg_base = CONFIG_MV64X60_NEW_BASE; si.pci_1.enable_bus = 1; si.pci_1.pci_io.cpu_base = KATANA_PCI1_IO_START_PROC_ADDR; @@ -410,10 +417,77 @@ mv64x60_set_bus(&bh, 1, 0); bh.hose_b->first_busno = 0; bh.hose_b->last_busno = 0xff; +} + +#ifdef CONFIG_MTD_PHYSMAP - return; +#ifndef MB +#define MB (1 << 20) +#endif + +/* + * MTD Layout depends on amount of soldered FLASH in system. Sizes in MB. + * + * FLASH Amount: 128 64 32 16 + * ------------- --- -- -- -- + * Monitor: 1 1 1 1 + * Primary Kernel: 1.5 1.5 1.5 1.5 + * Primary fs: 30 30 + * Secondary Kernel: 1.5 1.5 N/A N/A + * Secondary fs: N/A N/A + * User: + */ +static int __init +katana_setup_mtd(void) +{ + u32 size; + int ptbl_entries; + static struct mtd_partition *ptbl; + + size = katana_flash_size_0 + katana_flash_size_1; + if (!size) + return -ENOMEM; + + ptbl_entries = (size >= (64*MB)) ? 6 : 4; + + if ((ptbl = kmalloc(ptbl_entries * sizeof(struct mtd_partition), + GFP_KERNEL)) == NULL) { + + printk(KERN_WARNING "Can't alloc MTD partition table\n"); + return -ENOMEM; + } + memset(ptbl, 0, ptbl_entries * sizeof(struct mtd_partition)); + + ptbl[0].name = "Monitor"; + ptbl[0].size = KATANA_MTD_MONITOR_SIZE; + ptbl[1].name = "Primary Kernel"; + ptbl[1].offset = MTDPART_OFS_NXTBLK; + ptbl[1].size = 0x00180000; /* 1.5 MB */ + ptbl[2].name = "Primary Filesystem"; + ptbl[2].offset = MTDPART_OFS_APPEND; + ptbl[2].size = MTDPART_SIZ_FULL; /* Correct for 16 & 32 MB */ + ptbl[ptbl_entries-1].name = "User FLASH"; + ptbl[ptbl_entries-1].offset = KATANA_MTD_MONITOR_SIZE; + ptbl[ptbl_entries-1].size = MTDPART_SIZ_FULL; + + if (size >= (64*MB)) { + ptbl[2].size = 30*MB; + ptbl[3].name = "Secondary Kernel"; + ptbl[3].offset = MTDPART_OFS_NXTBLK; + ptbl[3].size = 0x00180000; /* 1.5 MB */ + ptbl[4].name = "Secondary Filesystem"; + ptbl[4].offset = MTDPART_OFS_APPEND; + ptbl[4].size = MTDPART_SIZ_FULL; + } + + physmap_map.size = size; + physmap_set_partitions(ptbl, ptbl_entries); + return 0; } +arch_initcall(katana_setup_mtd); +#endif + static void __init katana_setup_arch(void) { @@ -444,8 +518,7 @@ printk(KERN_INFO "DD2.0 detected. Setting L2 cache" "to Writethrough mode\n"); _set_L2CR(L2CR_L2E | L2CR_L2PE | L2CR_L2WT); - } - else + } else _set_L2CR(L2CR_L2E | L2CR_L2PE); if (ppc_md.progress) @@ -458,7 +531,6 @@ printk(KERN_INFO "Artesyn Communication Products, LLC - Katana(TM)\n"); if (ppc_md.progress) ppc_md.progress("katana_setup_arch: exit", 0); - return; } /* Platform device data fixup routines. */ @@ -473,9 +545,12 @@ pdata->max_idle = 40; pdata->default_baud = KATANA_DEFAULT_BAUD; pdata->brg_clk_src = KATANA_MPSC_CLK_SRC; - pdata->brg_clk_freq = KATANA_MPSC_CLK_FREQ; - - return; + /* + * TCLK (not SysCLk) is routed to BRG, then to the MPSC. On most parts, + * TCLK == SysCLK but on 64460, they are separate pins. + * SysCLK can go up to 200 MHz but TCLK can only go up to 133 MHz. + */ + pdata->brg_clk_freq = min(katana_bus_freq(), MV64x60_TCLK_FREQ_MAX); } #endif @@ -483,32 +558,18 @@ static void __init katana_fixup_eth_pdata(struct platform_device *pdev) { - struct mv64xxx_eth_platform_data *eth_pd; + struct mv643xx_eth_platform_data *eth_pd; static u16 phy_addr[] = { KATANA_ETH0_PHY_ADDR, KATANA_ETH1_PHY_ADDR, KATANA_ETH2_PHY_ADDR, }; - int rx_size = KATANA_ETH_RX_QUEUE_SIZE * MV64340_ETH_DESC_SIZE; - int tx_size = KATANA_ETH_TX_QUEUE_SIZE * MV64340_ETH_DESC_SIZE; eth_pd = pdev->dev.platform_data; eth_pd->force_phy_addr = 1; eth_pd->phy_addr = phy_addr[pdev->id]; eth_pd->tx_queue_size = KATANA_ETH_TX_QUEUE_SIZE; eth_pd->rx_queue_size = KATANA_ETH_RX_QUEUE_SIZE; - eth_pd->tx_sram_addr = mv643xx_sram_alloc(tx_size); - - if (eth_pd->tx_sram_addr) - eth_pd->tx_sram_size = tx_size; - else - printk(KERN_ERR "mv643xx_sram_alloc failed\n"); - - eth_pd->rx_sram_addr = mv643xx_sram_alloc(rx_size); - if (eth_pd->rx_sram_addr) - eth_pd->rx_sram_size = rx_size; - else - printk(KERN_ERR "mv643xx_sram_alloc failed\n"); } #endif @@ -524,9 +585,9 @@ { MPSC_CTLR_NAME "1", katana_fixup_mpsc_pdata }, #endif #if defined(CONFIG_MV643XX_ETH) - { MV64XXX_ETH_NAME "0", katana_fixup_eth_pdata }, - { MV64XXX_ETH_NAME "1", katana_fixup_eth_pdata }, - { MV64XXX_ETH_NAME "2", katana_fixup_eth_pdata }, + { MV643XX_ETH_NAME "0", katana_fixup_eth_pdata }, + { MV643XX_ETH_NAME "1", katana_fixup_eth_pdata }, + { MV643XX_ETH_NAME "2", katana_fixup_eth_pdata }, #endif }; struct platform_device *pdev; @@ -548,11 +609,10 @@ static void katana_restart(char *cmd) { - volatile ulong i = 10000000; + ulong i = 10000000; /* issue hard reset to the reset command register */ - out_8((volatile char *)(cpld_base + KATANA_CPLD_RST_CMD), - KATANA_CPLD_RST_CMD_HR); + out_8(cpld_base + KATANA_CPLD_RST_CMD, KATANA_CPLD_RST_CMD_HR); while (i-- > 0) ; panic("restart failed\n"); @@ -561,6 +621,14 @@ static void katana_halt(void) { + u8 v; + + if (katana_id == KATANA_ID_752I) { + v = in_8(cpld_base + HSL_PLD_BASE + HSL_PLD_HOT_SWAP_OFF); + v |= HSL_PLD_HOT_SWAP_LED_BIT; + out_8(cpld_base + HSL_PLD_BASE + HSL_PLD_HOT_SWAP_OFF, v); + } + while (1) ; /* NOTREACHED */ } @@ -598,12 +666,13 @@ } seq_printf(m, "product ID\t: 0x%x\n", - in_8((volatile char *)(cpld_base + KATANA_CPLD_PRODUCT_ID))); + in_8(cpld_base + KATANA_CPLD_PRODUCT_ID)); seq_printf(m, "hardware rev\t: 0x%x\n", - in_8((volatile char *)(cpld_base+KATANA_CPLD_HARDWARE_VER))); + in_8(cpld_base+KATANA_CPLD_HARDWARE_VER)); seq_printf(m, "PLD rev\t\t: 0x%x\n", - in_8((volatile char *)(cpld_base + KATANA_CPLD_PLD_VER))); - seq_printf(m, "PLB freq\t: %ldMhz\n", katana_bus_freq() / 1000000); + in_8(cpld_base + KATANA_CPLD_PLD_VER)); + seq_printf(m, "PLB freq\t: %ldMhz\n", + (long)katana_bus_freq() / 1000000); seq_printf(m, "PCI\t\t: %sMonarch\n", katana_is_monarch()? "" : "Non-"); return 0; @@ -612,23 +681,21 @@ static void __init katana_calibrate_decr(void) { - ulong freq; + u32 freq; freq = katana_bus_freq() / 4; printk(KERN_INFO "time_init: decrementer frequency = %lu.%.6lu MHz\n", - freq / 1000000, freq % 1000000); + (long)freq / 1000000, (long)freq % 1000000); tb_ticks_per_jiffy = freq / HZ; tb_to_us = mulhwu_scale_factor(freq, 1000000); - - return; } unsigned long __init katana_find_end_of_memory(void) { - return mv64x60_get_mem_size(KATANA_BRIDGE_REG_BASE, + return mv64x60_get_mem_size(CONFIG_MV64X60_NEW_BASE, MV64x60_TYPE_MV64360); } @@ -639,8 +706,6 @@ mtspr(DBAT2U, 0xf0001ffe); mtspr(DBAT2L, 0xf000002a); mb(); - - return; } #if defined(CONFIG_SERIAL_TEXT_DEBUG) && defined(CONFIG_SERIAL_MPSC_CONSOLE) @@ -657,6 +722,23 @@ { parse_bootinfo(find_bootinfo()); + /* ASSUMPTION: If both r3 (bd_t pointer) and r6 (cmdline pointer) + * are non-zero, then we should use the board info from the bd_t + * structure and the cmdline pointed to by r6 instead of the + * information from birecs, if any. Otherwise, use the information + * from birecs as discovered by the preceeding call to + * parse_bootinfo(). This rule should work with both PPCBoot, which + * uses a bd_t board info structure, and the kernel boot wrapper, + * which uses birecs. + */ + if (r3 && r6) { + /* copy board info structure */ + memcpy( (void *)__res,(void *)(r3+KERNELBASE), sizeof(bd_t) ); + /* copy command line */ + *(char *)(r7+KERNELBASE) = 0; + strcpy(cmd_line, (char *)(r6+KERNELBASE)); + } + isa_mem_base = 0; ppc_md.setup_arch = katana_setup_arch; @@ -672,7 +754,7 @@ #if defined(CONFIG_SERIAL_TEXT_DEBUG) && defined(CONFIG_SERIAL_MPSC_CONSOLE) ppc_md.setup_io_mappings = katana_map_io; ppc_md.progress = mv64x60_mpsc_progress; - mv64x60_progress_init(KATANA_BRIDGE_REG_BASE); + mv64x60_progress_init(CONFIG_MV64X60_NEW_BASE); #endif #if defined(CONFIG_SERIAL_MPSC) || defined(CONFIG_MV643XX_ETH) @@ -680,5 +762,4 @@ #endif katana_set_bat(); /* Need for katana_find_end_of_memory and progress */ - return; } diff -Nru a/arch/ppc/platforms/katana.h b/arch/ppc/platforms/katana.h --- a/arch/ppc/platforms/katana.h 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/platforms/katana.h 2005-03-07 14:54:18 -08:00 @@ -19,18 +19,17 @@ * PCI I/O space and 4 windows from the CPU bus to PCI MEM space. * We'll only use one PCI MEM window on each PCI bus. * - * This is the CPU physical memory map (windows must be at least 1MB and start + * This is the CPU physical memory map (windows must be at least 64 KB and start * on a boundary that is a multiple of the window size): * * 0xff800000-0xffffffff - Boot window * 0xf8400000-0xf85fffff - Internal SRAM - * 0xf8200000-0xf823ffff - CPLD - * 0xf8100000-0xf810ffff - MV64360 Registers - * 0xf8000000-0xf80fffff - PLCC socket - * 0xf0000000-0xf01fffff - Consistent memory pool - * 0xe8000000-0xefffffff - soldered flash - * 0xc0000000-0xc0ffffff - PCI I/O - * 0x80000000-0xbfffffff - PCI MEM + * 0xf8200000-0xf83fffff - CPLD + * 0xf8100000-0xf810ffff - MV64360 Registers (CONFIG_MV64X60_NEW_BASE) + * 0xf8000000-0xf80fffff - Socketed FLASH + * 0xe0000000-0xefffffff - Soldered FLASH + * 0xc0000000-0xc3ffffff - PCI I/O (second hose) + * 0x80000000-0xbfffffff - PCI MEM (second hose) */ #ifndef __PPC_PLATFORMS_KATANA_H @@ -38,33 +37,22 @@ /* CPU Physical Memory Map setup. */ #define KATANA_BOOT_WINDOW_BASE 0xff800000 +#define KATANA_BOOT_WINDOW_SIZE 0x00800000 /* 8 MB */ #define KATANA_INTERNAL_SRAM_BASE 0xf8400000 #define KATANA_CPLD_BASE 0xf8200000 -#define KATANA_BRIDGE_REG_BASE 0xf8100000 +#define KATANA_CPLD_SIZE 0x00200000 /* 2 MB */ #define KATANA_SOCKET_BASE 0xf8000000 -#define KATANA_SOLDERED_FLASH_BASE 0xe8000000 - -#define KATANA_BOOT_WINDOW_SIZE_ACTUAL 0x00800000 /* 8MB */ -#define KATANA_CPLD_SIZE_ACTUAL 0x00020000 /* 128KB */ -#define KATANA_SOCKETED_FLASH_SIZE_ACTUAL 0x00080000 /* 512KB */ -#define KATANA_SOLDERED_FLASH_SIZE_ACTUAL 0x02000000 /* 32MB */ - -#define KATANA_BOOT_WINDOW_SIZE max(MV64360_WINDOW_SIZE_MIN, \ - KATANA_BOOT_WINDOW_SIZE_ACTUAL) -#define KATANA_CPLD_SIZE max(MV64360_WINDOW_SIZE_MIN, \ - KATANA_CPLD_SIZE_ACTUAL) -#define KATANA_SOCKETED_FLASH_SIZE max(MV64360_WINDOW_SIZE_MIN, \ - KATANA_SOCKETED_FLASH_SIZE_ACTUAL) -#define KATANA_SOLDERED_FLASH_SIZE max(MV64360_WINDOW_SIZE_MIN, \ - KATANA_SOLDERED_FLASH_SIZE_ACTUAL) +#define KATANA_SOCKETED_FLASH_SIZE 0x00100000 /* 1 MB */ +#define KATANA_SOLDERED_FLASH_BASE 0xe0000000 +#define KATANA_SOLDERED_FLASH_SIZE 0x10000000 /* 256 MB */ #define KATANA_PCI1_MEM_START_PROC_ADDR 0x80000000 #define KATANA_PCI1_MEM_START_PCI_HI_ADDR 0x00000000 #define KATANA_PCI1_MEM_START_PCI_LO_ADDR 0x80000000 -#define KATANA_PCI1_MEM_SIZE 0x40000000 +#define KATANA_PCI1_MEM_SIZE 0x40000000 /* 1 GB */ #define KATANA_PCI1_IO_START_PROC_ADDR 0xc0000000 #define KATANA_PCI1_IO_START_PCI_ADDR 0x00000000 -#define KATANA_PCI1_IO_SIZE 0x01000000 +#define KATANA_PCI1_IO_SIZE 0x04000000 /* 64 MB */ /* Board-specific IRQ info */ #define KATANA_PCI_INTA_IRQ_3750 64+8 @@ -138,6 +126,8 @@ #define HSL_PLD_J4SGA_REG_OFF 0 #define HSL_PLD_J4GA_REG_OFF 1 #define HSL_PLD_J2GA_REG_OFF 2 +#define HSL_PLD_HOT_SWAP_OFF 6 +#define HSL_PLD_HOT_SWAP_LED_BIT 0x1 #define GA_MASK 0x1f #define HSL_PLD_SIZE 0x1000 #define K3750_GPP_GEO_ADDR_PINS 0xf8000000 @@ -162,7 +152,8 @@ #define KATANA_DEFAULT_BAUD 9600 #define KATANA_MPSC_CLK_SRC 8 /* TCLK */ -#define KATANA_MPSC_CLK_FREQ 133333333 /* 133.3333... MHz */ + +#define KATANA_MTD_MONITOR_SIZE (1 << 20) /* 1 MB */ #define KATANA_ETH0_PHY_ADDR 12 #define KATANA_ETH1_PHY_ADDR 11 diff -Nru a/arch/ppc/platforms/pmac_cpufreq.c b/arch/ppc/platforms/pmac_cpufreq.c --- a/arch/ppc/platforms/pmac_cpufreq.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc/platforms/pmac_cpufreq.c 2005-03-07 14:54:17 -08:00 @@ -230,7 +230,7 @@ enable_kernel_fp(); #ifdef CONFIG_ALTIVEC - if (cur_cpu_spec[0]->cpu_features & CPU_FTR_ALTIVEC) + if (cpu_has_feature(CPU_FTR_ALTIVEC)) enable_kernel_altivec(); #endif /* CONFIG_ALTIVEC */ diff -Nru a/arch/ppc/platforms/pmac_setup.c b/arch/ppc/platforms/pmac_setup.c --- a/arch/ppc/platforms/pmac_setup.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc/platforms/pmac_setup.c 2005-03-07 14:54:17 -08:00 @@ -274,7 +274,7 @@ pmac_find_bridges(); /* Checks "l2cr-value" property in the registry */ - if (cur_cpu_spec[0]->cpu_features & CPU_FTR_L2CR) { + if (cpu_has_feature(CPU_FTR_L2CR)) { struct device_node *np = find_devices("cpus"); if (np == 0) np = find_type_devices("cpu"); diff -Nru a/arch/ppc/platforms/pmac_smp.c b/arch/ppc/platforms/pmac_smp.c --- a/arch/ppc/platforms/pmac_smp.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc/platforms/pmac_smp.c 2005-03-07 14:54:17 -08:00 @@ -119,7 +119,7 @@ static void __init core99_init_caches(int cpu) { - if (!(cur_cpu_spec[0]->cpu_features & CPU_FTR_L2CR)) + if (!cpu_has_feature(CPU_FTR_L2CR)) return; if (cpu == 0) { @@ -132,7 +132,7 @@ printk("CPU%d: L2CR set to %lx\n", cpu, core99_l2_cache); } - if (!(cur_cpu_spec[0]->cpu_features & CPU_FTR_L3CR)) + if (!cpu_has_feature(CPU_FTR_L3CR)) return; if (cpu == 0){ diff -Nru a/arch/ppc/platforms/sandpoint.c b/arch/ppc/platforms/sandpoint.c --- a/arch/ppc/platforms/sandpoint.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/platforms/sandpoint.c 2005-03-07 14:54:18 -08:00 @@ -319,10 +319,10 @@ * We will do this now with good known values. Future versions * of DINK32 are supposed to get this correct. */ - if (cur_cpu_spec[0]->cpu_features & CPU_FTR_SPEC7450) + if (cpu_has_feature(CPU_FTR_SPEC7450)) /* 745x is different. We only want to pass along enable. */ _set_L2CR(L2CR_L2E); - else if (cur_cpu_spec[0]->cpu_features & CPU_FTR_L2CR) + else if (cpu_has_feature(CPU_FTR_L2CR)) /* All modules have 1MB of L2. We also assume that an * L2 divisor of 3 will work. */ @@ -330,7 +330,7 @@ | L2CR_L2RAM_PIPE | L2CR_L2OH_1_0 | L2CR_L2DF); #if 0 /* Untested right now. */ - if (cur_cpu_spec[0]->cpu_features & CPU_FTR_L3CR) { + if (cpu_has_feature(CPU_FTR_L3CR)) { /* Magic value. */ _set_L3CR(0x8f032000); } diff -Nru a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile --- a/arch/ppc/syslib/Makefile 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc/syslib/Makefile 2005-03-07 14:54:16 -08:00 @@ -99,4 +99,9 @@ ifeq ($(CONFIG_85xx),y) obj-$(CONFIG_PCI) += indirect_pci.o pci_auto.o endif +obj-$(CONFIG_83xx) += ipic.o ppc83xx_setup.o ppc_sys.o +ifeq ($(CONFIG_83xx),y) +obj-$(CONFIG_PCI) += indirect_pci.o pci_auto.o +endif +obj-$(CONFIG_MPC8555_CDS) += todc_time.o obj-$(CONFIG_PPC_MPC52xx) += mpc52xx_setup.o mpc52xx_pic.o diff -Nru a/arch/ppc/syslib/ipic.c b/arch/ppc/syslib/ipic.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/syslib/ipic.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,646 @@ +/* + * include/asm-ppc/ipic.c + * + * IPIC routines implementations. + * + * Copyright 2005 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "ipic.h" + +static struct ipic p_ipic; +static struct ipic * primary_ipic; + +static struct ipic_info ipic_info[] = { + [9] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_H, + .prio = IPIC_SIPRR_D, + .force = IPIC_SIFCR_H, + .bit = 24, + .prio_mask = 0, + }, + [10] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_H, + .prio = IPIC_SIPRR_D, + .force = IPIC_SIFCR_H, + .bit = 25, + .prio_mask = 1, + }, + [11] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_H, + .prio = IPIC_SIPRR_D, + .force = IPIC_SIFCR_H, + .bit = 26, + .prio_mask = 2, + }, + [14] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_H, + .prio = IPIC_SIPRR_D, + .force = IPIC_SIFCR_H, + .bit = 29, + .prio_mask = 5, + }, + [15] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_H, + .prio = IPIC_SIPRR_D, + .force = IPIC_SIFCR_H, + .bit = 30, + .prio_mask = 6, + }, + [16] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_H, + .prio = IPIC_SIPRR_D, + .force = IPIC_SIFCR_H, + .bit = 31, + .prio_mask = 7, + }, + [17] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SEMSR, + .prio = IPIC_SMPRR_A, + .force = IPIC_SEFCR, + .bit = 1, + .prio_mask = 5, + }, + [18] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SEMSR, + .prio = IPIC_SMPRR_A, + .force = IPIC_SEFCR, + .bit = 2, + .prio_mask = 6, + }, + [19] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SEMSR, + .prio = IPIC_SMPRR_A, + .force = IPIC_SEFCR, + .bit = 3, + .prio_mask = 7, + }, + [20] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SEMSR, + .prio = IPIC_SMPRR_B, + .force = IPIC_SEFCR, + .bit = 4, + .prio_mask = 4, + }, + [21] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SEMSR, + .prio = IPIC_SMPRR_B, + .force = IPIC_SEFCR, + .bit = 5, + .prio_mask = 5, + }, + [22] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SEMSR, + .prio = IPIC_SMPRR_B, + .force = IPIC_SEFCR, + .bit = 6, + .prio_mask = 6, + }, + [23] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SEMSR, + .prio = IPIC_SMPRR_B, + .force = IPIC_SEFCR, + .bit = 7, + .prio_mask = 7, + }, + [32] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_H, + .prio = IPIC_SIPRR_A, + .force = IPIC_SIFCR_H, + .bit = 0, + .prio_mask = 0, + }, + [33] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_H, + .prio = IPIC_SIPRR_A, + .force = IPIC_SIFCR_H, + .bit = 1, + .prio_mask = 1, + }, + [34] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_H, + .prio = IPIC_SIPRR_A, + .force = IPIC_SIFCR_H, + .bit = 2, + .prio_mask = 2, + }, + [35] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_H, + .prio = IPIC_SIPRR_A, + .force = IPIC_SIFCR_H, + .bit = 3, + .prio_mask = 3, + }, + [36] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_H, + .prio = IPIC_SIPRR_A, + .force = IPIC_SIFCR_H, + .bit = 4, + .prio_mask = 4, + }, + [37] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_H, + .prio = IPIC_SIPRR_A, + .force = IPIC_SIFCR_H, + .bit = 5, + .prio_mask = 5, + }, + [38] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_H, + .prio = IPIC_SIPRR_A, + .force = IPIC_SIFCR_H, + .bit = 6, + .prio_mask = 6, + }, + [39] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_H, + .prio = IPIC_SIPRR_A, + .force = IPIC_SIFCR_H, + .bit = 7, + .prio_mask = 7, + }, + [48] = { + .pend = IPIC_SEPNR, + .mask = IPIC_SEMSR, + .prio = IPIC_SMPRR_A, + .force = IPIC_SEFCR, + .bit = 0, + .prio_mask = 4, + }, + [64] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = IPIC_SMPRR_A, + .force = IPIC_SIFCR_L, + .bit = 0, + .prio_mask = 0, + }, + [65] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = IPIC_SMPRR_A, + .force = IPIC_SIFCR_L, + .bit = 1, + .prio_mask = 1, + }, + [66] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = IPIC_SMPRR_A, + .force = IPIC_SIFCR_L, + .bit = 2, + .prio_mask = 2, + }, + [67] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = IPIC_SMPRR_A, + .force = IPIC_SIFCR_L, + .bit = 3, + .prio_mask = 3, + }, + [68] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = IPIC_SMPRR_B, + .force = IPIC_SIFCR_L, + .bit = 4, + .prio_mask = 0, + }, + [69] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = IPIC_SMPRR_B, + .force = IPIC_SIFCR_L, + .bit = 5, + .prio_mask = 1, + }, + [70] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = IPIC_SMPRR_B, + .force = IPIC_SIFCR_L, + .bit = 6, + .prio_mask = 2, + }, + [71] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = IPIC_SMPRR_B, + .force = IPIC_SIFCR_L, + .bit = 7, + .prio_mask = 3, + }, + [72] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = 0, + .force = IPIC_SIFCR_L, + .bit = 8, + }, + [73] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = 0, + .force = IPIC_SIFCR_L, + .bit = 9, + }, + [74] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = 0, + .force = IPIC_SIFCR_L, + .bit = 10, + }, + [75] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = 0, + .force = IPIC_SIFCR_L, + .bit = 11, + }, + [76] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = 0, + .force = IPIC_SIFCR_L, + .bit = 12, + }, + [77] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = 0, + .force = IPIC_SIFCR_L, + .bit = 13, + }, + [78] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = 0, + .force = IPIC_SIFCR_L, + .bit = 14, + }, + [79] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = 0, + .force = IPIC_SIFCR_L, + .bit = 15, + }, + [80] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = 0, + .force = IPIC_SIFCR_L, + .bit = 16, + }, + [84] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = 0, + .force = IPIC_SIFCR_L, + .bit = 20, + }, + [85] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = 0, + .force = IPIC_SIFCR_L, + .bit = 21, + }, + [90] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = 0, + .force = IPIC_SIFCR_L, + .bit = 26, + }, + [91] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = 0, + .force = IPIC_SIFCR_L, + .bit = 27, + }, +}; + +static inline u32 ipic_read(volatile u32 __iomem *base, unsigned int reg) +{ + return in_be32(base + (reg >> 2)); +} + +static inline void ipic_write(volatile u32 __iomem *base, unsigned int reg, u32 value) +{ + out_be32(base + (reg >> 2), value); +} + +static inline struct ipic * ipic_from_irq(unsigned int irq) +{ + return primary_ipic; +} + +static void ipic_enable_irq(unsigned int irq) +{ + struct ipic *ipic = ipic_from_irq(irq); + unsigned int src = irq - ipic->irq_offset; + u32 temp; + + temp = ipic_read(ipic->regs, ipic_info[src].mask); + temp |= (1 << (31 - ipic_info[src].bit)); + ipic_write(ipic->regs, ipic_info[src].mask, temp); +} + +static void ipic_disable_irq(unsigned int irq) +{ + struct ipic *ipic = ipic_from_irq(irq); + unsigned int src = irq - ipic->irq_offset; + u32 temp; + + temp = ipic_read(ipic->regs, ipic_info[src].mask); + temp &= ~(1 << (31 - ipic_info[src].bit)); + ipic_write(ipic->regs, ipic_info[src].mask, temp); +} + +static void ipic_disable_irq_and_ack(unsigned int irq) +{ + struct ipic *ipic = ipic_from_irq(irq); + unsigned int src = irq - ipic->irq_offset; + u32 temp; + + ipic_disable_irq(irq); + + temp = ipic_read(ipic->regs, ipic_info[src].pend); + temp |= (1 << (31 - ipic_info[src].bit)); + ipic_write(ipic->regs, ipic_info[src].pend, temp); +} + +static void ipic_end_irq(unsigned int irq) +{ + if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) + ipic_enable_irq(irq); +} + +struct hw_interrupt_type ipic = { + .typename = " IPIC ", + .enable = ipic_enable_irq, + .disable = ipic_disable_irq, + .ack = ipic_disable_irq_and_ack, + .end = ipic_end_irq, +}; + +void __init ipic_init(phys_addr_t phys_addr, + unsigned int flags, + unsigned int irq_offset, + unsigned char *senses, + unsigned int senses_count) +{ + u32 i, temp = 0; + + primary_ipic = &p_ipic; + primary_ipic->regs = ioremap(phys_addr, MPC83xx_IPIC_SIZE); + + primary_ipic->irq_offset = irq_offset; + + ipic_write(primary_ipic->regs, IPIC_SICNR, 0x0); + + /* default priority scheme is grouped. If spread mode is required + * configure SICFR accordingly */ + if (flags & IPIC_SPREADMODE_GRP_A) + temp |= SICFR_IPSA; + if (flags & IPIC_SPREADMODE_GRP_D) + temp |= SICFR_IPSD; + if (flags & IPIC_SPREADMODE_MIX_A) + temp |= SICFR_MPSA; + if (flags & IPIC_SPREADMODE_MIX_B) + temp |= SICFR_MPSB; + + ipic_write(primary_ipic->regs, IPIC_SICNR, temp); + + /* handle MCP route */ + temp = 0; + if (flags & IPIC_DISABLE_MCP_OUT) + temp = SERCR_MCPR; + ipic_write(primary_ipic->regs, IPIC_SERCR, temp); + + /* handle routing of IRQ0 to MCP */ + temp = ipic_read(primary_ipic->regs, IPIC_SEMSR); + + if (flags & IPIC_IRQ0_MCP) + temp |= SEMSR_SIRQ0; + else + temp &= ~SEMSR_SIRQ0; + + ipic_write(primary_ipic->regs, IPIC_SEMSR, temp); + + for (i = 0 ; i < NR_IPIC_INTS ; i++) { + irq_desc[i+irq_offset].handler = &ipic; + irq_desc[i+irq_offset].status = IRQ_LEVEL; + } + + temp = 0; + for (i = 0 ; i < senses_count ; i++) { + if ((senses[i] & IRQ_SENSE_MASK) == IRQ_SENSE_EDGE) { + temp |= 1 << (16 - i); + if (i != 0) + irq_desc[i + irq_offset + MPC83xx_IRQ_EXT1 - 1].status = 0; + else + irq_desc[irq_offset + MPC83xx_IRQ_EXT0].status = 0; + } + } + ipic_write(primary_ipic->regs, IPIC_SECNR, temp); + + printk ("IPIC (%d IRQ sources, %d External IRQs) at %p\n", NR_IPIC_INTS, + senses_count, primary_ipic->regs); +} + +int ipic_set_priority(unsigned int irq, unsigned int priority) +{ + struct ipic *ipic = ipic_from_irq(irq); + unsigned int src = irq - ipic->irq_offset; + u32 temp; + + if (priority > 7) + return -EINVAL; + if (src > 127) + return -EINVAL; + if (ipic_info[src].prio == 0) + return -EINVAL; + + temp = ipic_read(ipic->regs, ipic_info[src].prio); + + if (priority < 4) { + temp &= ~(0x7 << (20 + (3 - priority) * 3)); + temp |= ipic_info[src].prio_mask << (20 + (3 - priority) * 3); + } else { + temp &= ~(0x7 << (4 + (7 - priority) * 3)); + temp |= ipic_info[src].prio_mask << (4 + (7 - priority) * 3); + } + + ipic_write(ipic->regs, ipic_info[src].prio, temp); + + return 0; +} + +void ipic_set_highest_priority(unsigned int irq) +{ + struct ipic *ipic = ipic_from_irq(irq); + unsigned int src = irq - ipic->irq_offset; + u32 temp; + + temp = ipic_read(ipic->regs, IPIC_SICFR); + + /* clear and set HPI */ + temp &= 0x7f000000; + temp |= (src & 0x7f) << 24; + + ipic_write(ipic->regs, IPIC_SICFR, temp); +} + +void ipic_set_default_priority(void) +{ + ipic_set_priority(MPC83xx_IRQ_TSEC1_TX, 0); + ipic_set_priority(MPC83xx_IRQ_TSEC1_RX, 1); + ipic_set_priority(MPC83xx_IRQ_TSEC1_ERROR, 2); + ipic_set_priority(MPC83xx_IRQ_TSEC2_TX, 3); + ipic_set_priority(MPC83xx_IRQ_TSEC2_RX, 4); + ipic_set_priority(MPC83xx_IRQ_TSEC2_ERROR, 5); + ipic_set_priority(MPC83xx_IRQ_USB2_DR, 6); + ipic_set_priority(MPC83xx_IRQ_USB2_MPH, 7); + + ipic_set_priority(MPC83xx_IRQ_UART1, 0); + ipic_set_priority(MPC83xx_IRQ_UART2, 1); + ipic_set_priority(MPC83xx_IRQ_SEC2, 2); + ipic_set_priority(MPC83xx_IRQ_IIC1, 5); + ipic_set_priority(MPC83xx_IRQ_IIC2, 6); + ipic_set_priority(MPC83xx_IRQ_SPI, 7); + ipic_set_priority(MPC83xx_IRQ_RTC_SEC, 0); + ipic_set_priority(MPC83xx_IRQ_PIT, 1); + ipic_set_priority(MPC83xx_IRQ_PCI1, 2); + ipic_set_priority(MPC83xx_IRQ_PCI2, 3); + ipic_set_priority(MPC83xx_IRQ_EXT0, 4); + ipic_set_priority(MPC83xx_IRQ_EXT1, 5); + ipic_set_priority(MPC83xx_IRQ_EXT2, 6); + ipic_set_priority(MPC83xx_IRQ_EXT3, 7); + ipic_set_priority(MPC83xx_IRQ_RTC_ALR, 0); + ipic_set_priority(MPC83xx_IRQ_MU, 1); + ipic_set_priority(MPC83xx_IRQ_SBA, 2); + ipic_set_priority(MPC83xx_IRQ_DMA, 3); + ipic_set_priority(MPC83xx_IRQ_EXT4, 4); + ipic_set_priority(MPC83xx_IRQ_EXT5, 5); + ipic_set_priority(MPC83xx_IRQ_EXT6, 6); + ipic_set_priority(MPC83xx_IRQ_EXT7, 7); +} + +void ipic_enable_mcp(enum ipic_mcp_irq mcp_irq) +{ + struct ipic *ipic = primary_ipic; + u32 temp; + + temp = ipic_read(ipic->regs, IPIC_SERMR); + temp |= (1 << (31 - mcp_irq)); + ipic_write(ipic->regs, IPIC_SERMR, temp); +} + +void ipic_disable_mcp(enum ipic_mcp_irq mcp_irq) +{ + struct ipic *ipic = primary_ipic; + u32 temp; + + temp = ipic_read(ipic->regs, IPIC_SERMR); + temp &= (1 << (31 - mcp_irq)); + ipic_write(ipic->regs, IPIC_SERMR, temp); +} + +u32 ipic_get_mcp_status(void) +{ + return ipic_read(primary_ipic->regs, IPIC_SERMR); +} + +void ipic_clear_mcp_status(u32 mask) +{ + ipic_write(primary_ipic->regs, IPIC_SERMR, mask); +} + +/* Return an interrupt vector or -1 if no interrupt is pending. */ +int ipic_get_irq(struct pt_regs *regs) +{ + int irq; + + irq = ipic_read(primary_ipic->regs, IPIC_SIVCR) & 0x7f; + + if (irq == 0) /* 0 --> no irq is pending */ + irq = -1; + + return irq; +} + +static struct sysdev_class ipic_sysclass = { + set_kset_name("ipic"), +}; + +static struct sys_device device_ipic = { + .id = 0, + .cls = &ipic_sysclass, +}; + +static int __init init_ipic_sysfs(void) +{ + int rc; + + if (!primary_ipic->regs) + return -ENODEV; + printk(KERN_DEBUG "Registering ipic with sysfs...\n"); + + rc = sysdev_class_register(&ipic_sysclass); + if (rc) { + printk(KERN_ERR "Failed registering ipic sys class\n"); + return -ENODEV; + } + rc = sysdev_register(&device_ipic); + if (rc) { + printk(KERN_ERR "Failed registering ipic sys device\n"); + return -ENODEV; + } + return 0; +} + +subsys_initcall(init_ipic_sysfs); diff -Nru a/arch/ppc/syslib/ipic.h b/arch/ppc/syslib/ipic.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/syslib/ipic.h 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,49 @@ +/* + * arch/ppc/kernel/ipic.h + * + * IPIC private definitions and structure. + * + * Maintainer: Kumar Gala + * + * Copyright 2005 Freescale Semiconductor, Inc + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ +#ifndef __IPIC_H__ +#define __IPIC_H__ + +#include + +#define MPC83xx_IPIC_SIZE (0x00100) + +/* System Global Interrupt Configuration Register */ +#define SICFR_IPSA 0x00010000 +#define SICFR_IPSD 0x00080000 +#define SICFR_MPSA 0x00200000 +#define SICFR_MPSB 0x00400000 + +/* System External Interrupt Mask Register */ +#define SEMSR_SIRQ0 0x00008000 + +/* System Error Control Register */ +#define SERCR_MCPR 0x00000001 + +struct ipic { + volatile u32 __iomem *regs; + unsigned int irq_offset; +}; + +struct ipic_info { + u8 pend; /* pending register offset from base */ + u8 mask; /* mask register offset from base */ + u8 prio; /* priority register offset from base */ + u8 force; /* force register offset from base */ + u8 bit; /* register bit position (as per doc) + bit mask = 1 << (31 - bit) */ + u8 prio_mask; /* priority mask value */ +}; + +#endif /* __IPIC_H__ */ diff -Nru a/arch/ppc/syslib/mv64360_pic.c b/arch/ppc/syslib/mv64360_pic.c --- a/arch/ppc/syslib/mv64360_pic.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc/syslib/mv64360_pic.c 2005-03-07 14:54:16 -08:00 @@ -64,7 +64,7 @@ /* ========================== local declarations =========================== */ struct hw_interrupt_type mv64360_pic = { - .typename = " mv64360_pic ", + .typename = " mv64360 ", .enable = mv64360_unmask_irq, .disable = mv64360_mask_irq, .ack = mv64360_mask_irq, @@ -155,9 +155,10 @@ */ int cpu_nr = smp_processor_id(); if (cpu_nr == 1) { - if (!(mv64x60_read(&bh, MV64360_IC_MAIN_CAUSE_LO) & (1 << 28))) + if (!(mv64x60_read(&bh, MV64360_IC_MAIN_CAUSE_LO) & + (1 << MV64x60_IRQ_DOORBELL))) return -1; - return 28; + return mv64360_irq_base + MV64x60_IRQ_DOORBELL; } #endif @@ -171,7 +172,7 @@ if (irq == -1) irq = -2; /* bogus interrupt, should never happen */ else { - if ((irq >= 24) && (irq < 28)) { + if ((irq >= 24) && (irq < MV64x60_IRQ_DOORBELL)) { irq_gpp = mv64x60_read(&bh, MV64x60_GPP_INTR_CAUSE); irq_gpp = __ilog2(irq_gpp & @@ -217,8 +218,9 @@ { #ifdef CONFIG_SMP /* second CPU gets only doorbell interrupts */ - if ((irq - mv64360_irq_base) == 28) { - mv64x60_set_bits(&bh, MV64360_IC_CPU1_INTR_MASK_LO, (1 << 28)); + if ((irq - mv64360_irq_base) == MV64x60_IRQ_DOORBELL) { + mv64x60_set_bits(&bh, MV64360_IC_CPU1_INTR_MASK_LO, + (1 << MV64x60_IRQ_DOORBELL)); return; } #endif @@ -257,8 +259,9 @@ mv64360_mask_irq(unsigned int irq) { #ifdef CONFIG_SMP - if ((irq - mv64360_irq_base) == 28) { - mv64x60_clr_bits(&bh, MV64360_IC_CPU1_INTR_MASK_LO, (1 << 28)); + if ((irq - mv64360_irq_base) == MV64x60_IRQ_DOORBELL) { + mv64x60_clr_bits(&bh, MV64360_IC_CPU1_INTR_MASK_LO, + (1 << MV64x60_IRQ_DOORBELL)); return; } #endif @@ -371,7 +374,7 @@ /* Clear old errors and register CPU interface error intr handler */ mv64x60_write(&bh, MV64x60_CPU_ERR_CAUSE, 0); - if ((rc = request_irq(MV64x60_IRQ_CPU_ERR, + if ((rc = request_irq(MV64x60_IRQ_CPU_ERR + mv64360_irq_base, mv64360_cpu_error_int_handler, SA_INTERRUPT, CPU_INTR_STR, 0))) printk(KERN_WARNING "Can't register cpu error handler: %d", rc); @@ -380,7 +383,7 @@ /* Clear old errors and register internal SRAM error intr handler */ mv64x60_write(&bh, MV64360_SRAM_ERR_CAUSE, 0); - if ((rc = request_irq(MV64360_IRQ_SRAM_PAR_ERR, + if ((rc = request_irq(MV64360_IRQ_SRAM_PAR_ERR + mv64360_irq_base, mv64360_sram_error_int_handler,SA_INTERRUPT,SRAM_INTR_STR, 0))) printk(KERN_WARNING "Can't register SRAM error handler: %d",rc); @@ -397,7 +400,8 @@ /* Clear old errors and register PCI 0 error intr handler */ mv64x60_write(&bh, MV64x60_PCI0_ERR_CAUSE, 0); - if ((rc = request_irq(MV64360_IRQ_PCI0, mv64360_pci_error_int_handler, + if ((rc = request_irq(MV64360_IRQ_PCI0 + mv64360_irq_base, + mv64360_pci_error_int_handler, SA_INTERRUPT, PCI0_INTR_STR, (void *)0))) printk(KERN_WARNING "Can't register pci 0 error handler: %d", rc); @@ -407,7 +411,8 @@ /* Clear old errors and register PCI 1 error intr handler */ mv64x60_write(&bh, MV64x60_PCI1_ERR_CAUSE, 0); - if ((rc = request_irq(MV64360_IRQ_PCI1, mv64360_pci_error_int_handler, + if ((rc = request_irq(MV64360_IRQ_PCI1 + mv64360_irq_base, + mv64360_pci_error_int_handler, SA_INTERRUPT, PCI1_INTR_STR, (void *)1))) printk(KERN_WARNING "Can't register pci 1 error handler: %d", rc); diff -Nru a/arch/ppc/syslib/mv64x60.c b/arch/ppc/syslib/mv64x60.c --- a/arch/ppc/syslib/mv64x60.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc/syslib/mv64x60.c 2005-03-07 14:54:16 -08:00 @@ -314,15 +314,15 @@ static struct resource mv64x60_eth_shared_resources[] = { [0] = { .name = "ethernet shared base", - .start = MV64340_ETH_SHARED_REGS, - .end = MV64340_ETH_SHARED_REGS + - MV64340_ETH_SHARED_REGS_SIZE - 1, + .start = MV643XX_ETH_SHARED_REGS, + .end = MV643XX_ETH_SHARED_REGS + + MV643XX_ETH_SHARED_REGS_SIZE - 1, .flags = IORESOURCE_MEM, }, }; static struct platform_device mv64x60_eth_shared_device = { - .name = MV64XXX_ETH_SHARED_NAME, + .name = MV643XX_ETH_SHARED_NAME, .id = 0, .num_resources = ARRAY_SIZE(mv64x60_eth_shared_resources), .resource = mv64x60_eth_shared_resources, @@ -338,10 +338,10 @@ }, }; -static struct mv64xxx_eth_platform_data eth0_pd; +static struct mv643xx_eth_platform_data eth0_pd; static struct platform_device eth0_device = { - .name = MV64XXX_ETH_NAME, + .name = MV643XX_ETH_NAME, .id = 0, .num_resources = ARRAY_SIZE(mv64x60_eth0_resources), .resource = mv64x60_eth0_resources, @@ -361,10 +361,10 @@ }, }; -static struct mv64xxx_eth_platform_data eth1_pd; +static struct mv643xx_eth_platform_data eth1_pd; static struct platform_device eth1_device = { - .name = MV64XXX_ETH_NAME, + .name = MV643XX_ETH_NAME, .id = 1, .num_resources = ARRAY_SIZE(mv64x60_eth1_resources), .resource = mv64x60_eth1_resources, @@ -384,10 +384,10 @@ }, }; -static struct mv64xxx_eth_platform_data eth2_pd; +static struct mv643xx_eth_platform_data eth2_pd; static struct platform_device eth2_device = { - .name = MV64XXX_ETH_NAME, + .name = MV643XX_ETH_NAME, .id = 2, .num_resources = ARRAY_SIZE(mv64x60_eth2_resources), .resource = mv64x60_eth2_resources, diff -Nru a/arch/ppc/syslib/ppc4xx_pic.c b/arch/ppc/syslib/ppc4xx_pic.c --- a/arch/ppc/syslib/ppc4xx_pic.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc/syslib/ppc4xx_pic.c 2005-03-07 14:54:16 -08:00 @@ -4,7 +4,7 @@ * Interrupt controller driver for PowerPC 4xx-based processors. * * Eugene Surovegin or - * Copyright (c) 2004 Zultys Technologies + * Copyright (c) 2004, 2005 Zultys Technologies * * Based on original code by * Copyright (c) 1999 Grant Erickson @@ -29,8 +29,9 @@ /* See comment in include/arch-ppc/ppc4xx_pic.h * for more info about these two variables */ -extern struct ppc4xx_uic_settings ppc4xx_core_uic_cfg[NR_UICS] __attribute__((weak)); -extern unsigned char ppc4xx_uic_ext_irq_cfg[] __attribute__((weak)); +extern struct ppc4xx_uic_settings ppc4xx_core_uic_cfg[NR_UICS] + __attribute__ ((weak)); +extern unsigned char ppc4xx_uic_ext_irq_cfg[] __attribute__ ((weak)); #define IRQ_MASK_UIC0(irq) (1 << (31 - (irq))) #define IRQ_MASK_UICx(irq) (1 << (31 - ((irq) & 0x1f))) @@ -48,6 +49,7 @@ { \ ppc_cached_irq_mask[n] &= ~IRQ_MASK_UIC##n(irq); \ mtdcr(DCRN_UIC_ER(UIC##n), ppc_cached_irq_mask[n]); \ + ACK_UIC##n##_PARENT \ } \ \ static void ppc4xx_uic##n##_ack(unsigned int irq) \ @@ -63,11 +65,11 @@ { \ unsigned int status = irq_desc[irq].status; \ u32 mask = IRQ_MASK_UIC##n(irq); \ - if (status & IRQ_LEVEL){ \ + if (status & IRQ_LEVEL) { \ mtdcr(DCRN_UIC_SR(UIC##n), mask); \ ACK_UIC##n##_PARENT \ } \ - if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS))){ \ + if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS))) { \ ppc_cached_irq_mask[n] |= mask; \ mtdcr(DCRN_UIC_ER(UIC##n), ppc_cached_irq_mask[n]); \ } \ @@ -86,7 +88,9 @@ #define ACK_UIC0_PARENT mtdcr(DCRN_UIC_SR(UICB), UICB_UIC0NC); #define ACK_UIC1_PARENT mtdcr(DCRN_UIC_SR(UICB), UICB_UIC1NC); #define ACK_UIC2_PARENT mtdcr(DCRN_UIC_SR(UICB), UICB_UIC2NC); -UIC_HANDLERS(0); UIC_HANDLERS(1); UIC_HANDLERS(2); +UIC_HANDLERS(0); +UIC_HANDLERS(1); +UIC_HANDLERS(2); static int ppc4xx_pic_get_irq(struct pt_regs *regs) { @@ -114,7 +118,8 @@ #elif NR_UICS == 2 #define ACK_UIC0_PARENT #define ACK_UIC1_PARENT mtdcr(DCRN_UIC_SR(UIC0), UIC0_UIC1NC); -UIC_HANDLERS(0); UIC_HANDLERS(1); +UIC_HANDLERS(0); +UIC_HANDLERS(1); static int ppc4xx_pic_get_irq(struct pt_regs *regs) { @@ -143,18 +148,20 @@ return uic0 ? 32 - ffs(uic0) : -1; } -static inline void ppc4xx_pic_impl_init(void){} +static inline void ppc4xx_pic_impl_init(void) +{ +} #endif static struct ppc4xx_uic_impl { struct hw_interrupt_type decl; - int base; /* Base DCR number */ + int base; /* Base DCR number */ } __uic[] = { - { .decl = DECLARE_UIC(0), .base = UIC0 }, + { .decl = DECLARE_UIC(0), .base = UIC0 }, #if NR_UICS > 1 - { .decl = DECLARE_UIC(1), .base = UIC1 }, + { .decl = DECLARE_UIC(1), .base = UIC1 }, #if NR_UICS > 2 - { .decl = DECLARE_UIC(2), .base = UIC2 }, + { .decl = DECLARE_UIC(2), .base = UIC2 }, #endif #endif }; @@ -168,9 +175,9 @@ void __init ppc4xx_pic_init(void) { int i; - unsigned char* eirqs = ppc4xx_uic_ext_irq_cfg; + unsigned char *eirqs = ppc4xx_uic_ext_irq_cfg; - for (i = 0; i < NR_UICS; ++i){ + for (i = 0; i < NR_UICS; ++i) { int base = __uic[i].base; /* Disable everything by default */ @@ -181,23 +188,23 @@ mtdcr(DCRN_UIC_CR(base), 0); /* Configure polarity and triggering */ - if (ppc4xx_core_uic_cfg){ - struct ppc4xx_uic_settings* p = ppc4xx_core_uic_cfg + i; + if (ppc4xx_core_uic_cfg) { + struct ppc4xx_uic_settings *p = ppc4xx_core_uic_cfg + i; u32 mask = p->ext_irq_mask; u32 pr = mfdcr(DCRN_UIC_PR(base)) & mask; u32 tr = mfdcr(DCRN_UIC_TR(base)) & mask; /* "Fixed" interrupts (on-chip devices) */ - pr |= p->polarity & ~mask; + pr |= p->polarity & ~mask; tr |= p->triggering & ~mask; /* Merge external IRQs settings if board port * provided them */ - if (eirqs && mask){ + if (eirqs && mask) { pr &= ~mask; tr &= ~mask; - while (mask){ + while (mask) { /* Extract current external IRQ mask */ u32 eirq_mask = 1 << __ilog2(mask); @@ -227,8 +234,8 @@ ppc4xx_pic_impl_init(); /* Attach low-level handlers */ - for (i = 0; i < (NR_UICS << 5); ++i){ - irq_desc[i].handler = &__uic[i >> 5].decl; + for (i = 0; i < (NR_UICS << 5); ++i) { + irq_desc[i].handler = &__uic[i >> 5].decl; if (is_level_sensitive(i)) irq_desc[i].status |= IRQ_LEVEL; } diff -Nru a/arch/ppc/syslib/ppc83xx_setup.c b/arch/ppc/syslib/ppc83xx_setup.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/syslib/ppc83xx_setup.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,138 @@ +/* + * arch/ppc/syslib/ppc83xx_setup.c + * + * MPC83XX common board code + * + * Maintainer: Kumar Gala + * + * Copyright 2005 Freescale Semiconductor Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +#include +#include +#include +#include +#include +#include +#include /* for linux/serial_core.h */ +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +phys_addr_t immrbar; + +/* Return the amount of memory */ +unsigned long __init +mpc83xx_find_end_of_memory(void) +{ + bd_t *binfo; + + binfo = (bd_t *) __res; + + return binfo->bi_memsize; +} + +long __init +mpc83xx_time_init(void) +{ +#define SPCR_OFFS 0x00000110 +#define SPCR_TBEN 0x00400000 + + bd_t *binfo = (bd_t *)__res; + u32 *spcr = ioremap(binfo->bi_immr_base + SPCR_OFFS, 4); + + *spcr |= SPCR_TBEN; + + iounmap(spcr); + + return 0; +} + +/* The decrementer counts at the system (internal) clock freq divided by 4 */ +void __init +mpc83xx_calibrate_decr(void) +{ + bd_t *binfo = (bd_t *) __res; + unsigned int freq, divisor; + + freq = binfo->bi_busfreq; + divisor = 4; + tb_ticks_per_jiffy = freq / HZ / divisor; + tb_to_us = mulhwu_scale_factor(freq / divisor, 1000000); +} + +#ifdef CONFIG_SERIAL_8250 +void __init +mpc83xx_early_serial_map(void) +{ +#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB) + struct uart_port serial_req; +#endif + struct plat_serial8250_port *pdata; + bd_t *binfo = (bd_t *) __res; + pdata = (struct plat_serial8250_port *) ppc_sys_get_pdata(MPC83xx_DUART); + + /* Setup serial port access */ + pdata[0].uartclk = binfo->bi_busfreq; + pdata[0].mapbase += binfo->bi_immr_base; + pdata[0].membase = ioremap(pdata[0].mapbase, 0x100); + +#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB) + memset(&serial_req, 0, sizeof (serial_req)); + serial_req.iotype = SERIAL_IO_MEM; + serial_req.mapbase = pdata[0].mapbase; + serial_req.membase = pdata[0].membase; + serial_req.regshift = 0; + + gen550_init(0, &serial_req); +#endif + + pdata[1].uartclk = binfo->bi_busfreq; + pdata[1].mapbase += binfo->bi_immr_base; + pdata[1].membase = ioremap(pdata[1].mapbase, 0x100); + +#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB) + /* Assume gen550_init() doesn't modify serial_req */ + serial_req.mapbase = pdata[1].mapbase; + serial_req.membase = pdata[1].membase; + + gen550_init(1, &serial_req); +#endif +} +#endif + +void +mpc83xx_restart(char *cmd) +{ + local_irq_disable(); + for(;;); +} + +void +mpc83xx_power_off(void) +{ + local_irq_disable(); + for(;;); +} + +void +mpc83xx_halt(void) +{ + local_irq_disable(); + for(;;); +} + +/* PCI SUPPORT DOES NOT EXIT, MODEL after ppc85xx_setup.c */ diff -Nru a/arch/ppc/syslib/ppc83xx_setup.h b/arch/ppc/syslib/ppc83xx_setup.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/syslib/ppc83xx_setup.h 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,53 @@ +/* + * arch/ppc/syslib/ppc83xx_setup.h + * + * MPC83XX common board definitions + * + * Maintainer: Kumar Gala + * + * Copyright 2005 Freescale Semiconductor Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + */ + +#ifndef __PPC_SYSLIB_PPC83XX_SETUP_H +#define __PPC_SYSLIB_PPC83XX_SETUP_H + +#include +#include +#include + +extern unsigned long mpc83xx_find_end_of_memory(void) __init; +extern long mpc83xx_time_init(void) __init; +extern void mpc83xx_calibrate_decr(void) __init; +extern void mpc83xx_early_serial_map(void) __init; +extern void mpc83xx_restart(char *cmd); +extern void mpc83xx_power_off(void); +extern void mpc83xx_halt(void); +extern void mpc83xx_setup_hose(void) __init; + +/* PCI config */ +#if 0 +#define PCI1_CFG_ADDR_OFFSET (FIXME) +#define PCI1_CFG_DATA_OFFSET (FIXME) + +#define PCI2_CFG_ADDR_OFFSET (FIXME) +#define PCI2_CFG_DATA_OFFSET (FIXME) +#endif + +/* Serial Config */ +#ifdef CONFIG_SERIAL_MANY_PORTS +#define RS_TABLE_SIZE 64 +#else +#define RS_TABLE_SIZE 2 +#endif + +#ifndef BASE_BAUD +#define BASE_BAUD 115200 +#endif + +#endif /* __PPC_SYSLIB_PPC83XX_SETUP_H */ diff -Nru a/arch/ppc/syslib/todc_time.c b/arch/ppc/syslib/todc_time.c --- a/arch/ppc/syslib/todc_time.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc/syslib/todc_time.c 2005-03-07 14:54:17 -08:00 @@ -287,6 +287,7 @@ limit = 1; switch (todc_info->rtc_type) { + case TODC_TYPE_DS1553: case TODC_TYPE_DS1557: case TODC_TYPE_DS1743: case TODC_TYPE_DS1746: /* XXXX BAD HACK -> FIX */ @@ -322,6 +323,7 @@ if (todc_info->rtc_type != TODC_TYPE_MC146818) { switch (todc_info->rtc_type) { + case TODC_TYPE_DS1553: case TODC_TYPE_DS1557: case TODC_TYPE_DS1743: case TODC_TYPE_DS1746: /* XXXX BAD HACK -> FIX */ @@ -418,6 +420,7 @@ unsigned char save_control = 0, val; switch (todc_info->rtc_type) { + case TODC_TYPE_DS1553: case TODC_TYPE_DS1557: case TODC_TYPE_DS1746: /* XXXX BAD HACK -> FIX */ case TODC_TYPE_DS1747: @@ -432,6 +435,7 @@ val = todc_read_val(addr); switch (todc_info->rtc_type) { + case TODC_TYPE_DS1553: case TODC_TYPE_DS1557: case TODC_TYPE_DS1746: /* XXXX BAD HACK -> FIX */ case TODC_TYPE_DS1747: diff -Nru a/arch/ppc/syslib/xilinx_pic.c b/arch/ppc/syslib/xilinx_pic.c --- a/arch/ppc/syslib/xilinx_pic.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/syslib/xilinx_pic.c 2005-03-07 14:54:18 -08:00 @@ -114,6 +114,14 @@ { int i; + /* + * NOTE: The assumption here is that NR_IRQS is 32 or less + * (NR_IRQS is 32 for PowerPC 405 cores by default). + */ +#if (NR_IRQS > 32) +#error NR_IRQS > 32 not supported +#endif + #if XPAR_XINTC_USE_DCR == 0 intc = ioremap(XPAR_INTC_0_BASEADDR, 32); @@ -138,6 +146,12 @@ ppc_md.get_irq = xilinx_pic_get_irq; - for (i = 0; i < NR_IRQS; ++i) + for (i = 0; i < NR_IRQS; ++i) { irq_desc[i].handler = &xilinx_intc; + + if (XPAR_INTC_0_KIND_OF_INTR & (0x00000001 << i)) + irq_desc[i].status &= ~IRQ_LEVEL; + else + irq_desc[i].status |= IRQ_LEVEL; + } } diff -Nru a/arch/ppc64/Kconfig b/arch/ppc64/Kconfig --- a/arch/ppc64/Kconfig 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/Kconfig 2005-03-07 14:54:17 -08:00 @@ -194,7 +194,10 @@ config HMT bool "Hardware multithreading" - depends on SMP && PPC_PSERIES + depends on SMP && PPC_PSERIES && BROKEN + help + This option enables hardware multithreading on RS64 cpus. + pSeries systems p620 and p660 have such a cpu type. config DISCONTIGMEM bool "Discontiguous Memory Support" @@ -313,7 +316,7 @@ config HOTPLUG_CPU bool "Support for hot-pluggable CPUs" - depends on SMP && EXPERIMENTAL && PPC_PSERIES + depends on SMP && EXPERIMENTAL && (PPC_PSERIES || PPC_PMAC) select HOTPLUG ---help--- Say Y here to be able to turn CPUs off and on. diff -Nru a/arch/ppc64/Makefile b/arch/ppc64/Makefile --- a/arch/ppc64/Makefile 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc64/Makefile 2005-03-07 14:54:16 -08:00 @@ -15,17 +15,38 @@ KERNELLOAD := 0xc000000000000000 +# Set default 32 bits cross compilers for vdso and boot wrapper +CROSS32_COMPILE ?= + +CROSS32CC := $(CROSS32_COMPILE)gcc +CROSS32AS := $(CROSS32_COMPILE)as +CROSS32LD := $(CROSS32_COMPILE)ld +CROSS32OBJCOPY := $(CROSS32_COMPILE)objcopy + +# If we have a biarch compiler, use it for 32 bits cross compile if +# CROSS32_COMPILE wasn't explicitely defined, and add proper explicit +# target type to target compilers + HAS_BIARCH := $(call cc-option-yn, -m64) ifeq ($(HAS_BIARCH),y) +ifeq ($(CROSS32_COMPILE),) +CROSS32CC := $(CC) -m32 +CROSS32AS := $(AS) -a32 +CROSS32LD := $(LD) -m elf32ppc +CROSS32OBJCOPY := $(OBJCOPY) +endif AS := $(AS) -a64 LD := $(LD) -m elf64ppc CC := $(CC) -m64 endif +export CROSS32CC CROSS32AS CROSS32LD CROSS32OBJCOPY + new_nm := $(shell if $(NM) --help 2>&1 | grep -- '--synthetic' > /dev/null; then echo y; else echo n; fi) ifeq ($(new_nm),y) NM := $(NM) --synthetic + endif CHECKFLAGS += -m64 -D__powerpc__ @@ -65,14 +86,20 @@ $(boottarget-y): vmlinux $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ -bootimage-$(CONFIG_PPC_PSERIES) := zImage -bootimage-$(CONFIG_PPC_MAPLE) := zImage +bootimage-$(CONFIG_PPC_PSERIES) := $(boot)/zImage +bootimage-$(CONFIG_PPC_PMAC) := vmlinux +bootimage-$(CONFIG_PPC_MAPLE) := $(boot)/zImage bootimage-$(CONFIG_PPC_ISERIES) := vmlinux BOOTIMAGE := $(bootimage-y) install: vmlinux $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@ -all: $(BOOTIMAGE) +defaultimage-$(CONFIG_PPC_PSERIES) := zImage +defaultimage-$(CONFIG_PPC_PMAC) := vmlinux +defaultimage-$(CONFIG_PPC_MAPLE) := zImage +defaultimage-$(CONFIG_PPC_ISERIES) := vmlinux +KBUILD_IMAGE := $(defaultimage-y) +all: $(KBUILD_IMAGE) archclean: $(Q)$(MAKE) $(clean)=$(boot) diff -Nru a/arch/ppc64/boot/Makefile b/arch/ppc64/boot/Makefile --- a/arch/ppc64/boot/Makefile 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/boot/Makefile 2005-03-07 14:54:18 -08:00 @@ -20,17 +20,11 @@ # CROSS32_COMPILE is setup as a prefix just like CROSS_COMPILE # in the toplevel makefile. -CROSS32_COMPILE ?= -#CROSS32_COMPILE = /usr/local/ppc/bin/powerpc-linux- -BOOTCC := $(CROSS32_COMPILE)gcc HOSTCC := gcc BOOTCFLAGS := $(HOSTCFLAGS) $(LINUXINCLUDE) -fno-builtin -BOOTAS := $(CROSS32_COMPILE)as BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -BOOTLD := $(CROSS32_COMPILE)ld BOOTLFLAGS := -Ttext 0x00400000 -e _start -T $(srctree)/$(src)/zImage.lds -BOOTOBJCOPY := $(CROSS32_COMPILE)objcopy OBJCOPYFLAGS := contents,alloc,load,readonly,data src-boot := crt0.S string.S prom.c main.c zlib.c imagesize.c div64.S @@ -38,10 +32,10 @@ obj-boot := $(addsuffix .o, $(basename $(src-boot))) quiet_cmd_bootcc = BOOTCC $@ - cmd_bootcc = $(BOOTCC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $< + cmd_bootcc = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $< quiet_cmd_bootas = BOOTAS $@ - cmd_bootas = $(BOOTCC) -Wp,-MD,$(depfile) $(BOOTAFLAGS) -c -o $@ $< + cmd_bootas = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTAFLAGS) -c -o $@ $< $(patsubst %.c,%.o, $(filter %.c, $(src-boot))): %.o: %.c $(call if_changed_dep,bootcc) @@ -77,15 +71,15 @@ $(obj)/vmlinux.initrd: vmlinux.strip $(obj)/addRamDisk $(obj)/ramdisk.image.gz FORCE $(call if_changed,ramdisk) -addsection = $(BOOTOBJCOPY) $(1) \ +addsection = $(CROSS32OBJCOPY) $(1) \ --add-section=.kernel:$(strip $(patsubst $(obj)/kernel-%.o,%, $(1)))=$(patsubst %.o,%.gz, $(1)) \ --set-section-flags=.kernel:$(strip $(patsubst $(obj)/kernel-%.o,%, $(1)))=$(OBJCOPYFLAGS) quiet_cmd_addnote = ADDNOTE $@ - cmd_addnote = $(BOOTLD) $(BOOTLFLAGS) -o $@ $(obj-boot) && $(obj)/addnote $@ + cmd_addnote = $(CROSS32LD) $(BOOTLFLAGS) -o $@ $(obj-boot) && $(obj)/addnote $@ quiet_cmd_piggy = PIGGY $@ - cmd_piggy = $(obj)/piggyback $(@:.o=) < $< | $(BOOTAS) -o $@ + cmd_piggy = $(obj)/piggyback $(@:.o=) < $< | $(CROSS32AS) -o $@ $(call gz-sec, $(required)): $(obj)/kernel-%.gz: % FORCE $(call if_changed,gzip) @@ -117,7 +111,7 @@ awk '{printf "unsigned long vmlinux_memsize = 0x%s;\n", substr($$1,8)}' \ >> $(obj)/imagesize.c -install: $(CONFIGURE) $(obj)/$(BOOTIMAGE) - sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" "$(obj)/$(BOOTIMAGE)" "$(INSTALL_PATH)" +install: $(CONFIGURE) $(BOOTIMAGE) + sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" "$(BOOTIMAGE)" clean-files := $(addprefix $(objtree)/, $(obj-boot) vmlinux.strip) diff -Nru a/arch/ppc64/boot/install.sh b/arch/ppc64/boot/install.sh --- a/arch/ppc64/boot/install.sh 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/boot/install.sh 2005-03-07 14:54:18 -08:00 @@ -17,6 +17,7 @@ # $2 - kernel image file # $3 - kernel map file # $4 - default install path (blank if root directory) +# $5 - kernel boot file, the zImage # # User may have a custom install script @@ -27,7 +28,7 @@ # Default install # this should work for both the pSeries zImage and the iSeries vmlinux.sm -image_name=`basename $2` +image_name=`basename $5` if [ -f $4/$image_name ]; then mv $4/$image_name $4/$image_name.old diff -Nru a/arch/ppc64/boot/main.c b/arch/ppc64/boot/main.c --- a/arch/ppc64/boot/main.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/boot/main.c 2005-03-07 14:54:18 -08:00 @@ -200,7 +200,7 @@ vmlinux.addr += (unsigned long)elf64ph->p_offset; vmlinux.size -= (unsigned long)elf64ph->p_offset; - flush_cache((void *)vmlinux.addr, vmlinux.memsize); + flush_cache((void *)vmlinux.addr, vmlinux.size); if (a1) printf("initrd head: 0x%lx\n\r", *((u32 *)initrd.addr)); diff -Nru a/arch/ppc64/configs/g5_defconfig b/arch/ppc64/configs/g5_defconfig --- a/arch/ppc64/configs/g5_defconfig 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc64/configs/g5_defconfig 2005-03-07 14:54:16 -08:00 @@ -1,11 +1,12 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-rc3 -# Thu Oct 7 15:18:38 2004 +# Linux kernel version: 2.6.11-rc3-bk6 +# Wed Feb 9 23:34:53 2005 # CONFIG_64BIT=y CONFIG_MMU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_ISA_DMA=y CONFIG_HAVE_DEC_LOCK=y CONFIG_EARLY_PRINTK=y @@ -18,6 +19,7 @@ # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y +CONFIG_LOCK_KERNEL=y # # General setup @@ -25,25 +27,26 @@ CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y -# CONFIG_POSIX_MQUEUE is not set +CONFIG_POSIX_MQUEUE=y # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=17 CONFIG_HOTPLUG=y -# CONFIG_IKCONFIG is not set +CONFIG_KOBJECT_UEVENT=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set # CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set # @@ -51,10 +54,11 @@ # CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y -# CONFIG_MODVERSIONS is not set -# CONFIG_KMOD is not set +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +CONFIG_KMOD=y CONFIG_STOP_MACHINE=y CONFIG_SYSVIPC_COMPAT=y @@ -65,6 +69,7 @@ CONFIG_PPC_MULTIPLATFORM=y # CONFIG_PPC_PSERIES is not set CONFIG_PPC_PMAC=y +# CONFIG_PPC_MAPLE is not set CONFIG_PPC=y CONFIG_PPC64=y CONFIG_PPC_OF=y @@ -75,12 +80,10 @@ CONFIG_POWER4_ONLY=y CONFIG_IOMMU_VMERGE=y CONFIG_SMP=y -CONFIG_IRQ_ALL_CPUS=y CONFIG_NR_CPUS=2 # CONFIG_SCHED_SMT is not set # CONFIG_PREEMPT is not set -# CONFIG_PPC_RTAS is not set -# CONFIG_LPARCFG is not set +CONFIG_GENERIC_HARDIRQS=y # # General setup @@ -91,12 +94,15 @@ # CONFIG_BINFMT_MISC is not set CONFIG_PCI_LEGACY_PROC=y CONFIG_PCI_NAMES=y -# CONFIG_HOTPLUG_CPU is not set # -# PCMCIA/CardBus support +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# PC-card bridges # -# CONFIG_PCMCIA is not set # # PCI Hotplug Support @@ -139,14 +145,29 @@ # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_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_SX8 is not set # CONFIG_BLK_DEV_UB is not set CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=8192 +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=65536 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_CDROM_PKTCDVD=m +CONFIG_CDROM_PKTCDVD_BUFFERS=8 +# CONFIG_CDROM_PKTCDVD_WCACHE is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set # # ATA/ATAPI/MFM/RLL support @@ -161,11 +182,10 @@ CONFIG_BLK_DEV_IDEDISK=y # CONFIG_IDEDISK_MULTI_MODE is not set CONFIG_BLK_DEV_IDECD=y -CONFIG_BLK_DEV_IDETAPE=y -CONFIG_BLK_DEV_IDEFLOPPY=y +# CONFIG_BLK_DEV_IDETAPE is not set +# CONFIG_BLK_DEV_IDEFLOPPY is not set # CONFIG_BLK_DEV_IDESCSI is not set # CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set # # IDE chipset support/bugfixes @@ -205,7 +225,6 @@ CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y CONFIG_BLK_DEV_IDEDMA_PMAC=y # CONFIG_BLK_DEV_IDE_PMAC_BLINK is not set -CONFIG_BLK_DEV_IDEDMA_PMAC_AUTO=y # CONFIG_IDE_ARM is not set CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set @@ -240,6 +259,7 @@ # CONFIG_SCSI_SPI_ATTRS=y # CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set # # SCSI low-level drivers @@ -254,6 +274,7 @@ # CONFIG_MEGARAID_NEWGEN is not set # CONFIG_MEGARAID_LEGACY is not set CONFIG_SCSI_SATA=y +# CONFIG_SCSI_SATA_AHCI is not set CONFIG_SCSI_SATA_SVW=y # CONFIG_SCSI_ATA_PIIX is not set # CONFIG_SCSI_SATA_NV is not set @@ -261,6 +282,7 @@ # CONFIG_SCSI_SATA_SX4 is not set # CONFIG_SCSI_SATA_SIL is not set # CONFIG_SCSI_SATA_SIS is not set +# CONFIG_SCSI_SATA_ULI is not set # CONFIG_SCSI_SATA_VIA is not set # CONFIG_SCSI_SATA_VITESSE is not set # CONFIG_SCSI_BUSLOGIC is not set @@ -270,12 +292,9 @@ # CONFIG_SCSI_FUTURE_DOMAIN is not set # CONFIG_SCSI_GDTH is not set # CONFIG_SCSI_IPS is not set +# CONFIG_SCSI_INITIO is not set # CONFIG_SCSI_INIA100 is not set -CONFIG_SCSI_SYM53C8XX_2=y -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set +# CONFIG_SCSI_SYM53C8XX_2 is not set # CONFIG_SCSI_IPR is not set # CONFIG_SCSI_QLOGIC_ISP is not set # CONFIG_SCSI_QLOGIC_FC is not set @@ -286,11 +305,9 @@ # CONFIG_SCSI_QLA2300 is not set # CONFIG_SCSI_QLA2322 is not set # CONFIG_SCSI_QLA6312 is not set -# CONFIG_SCSI_QLA6322 is not set # CONFIG_SCSI_DC395x is not set # CONFIG_SCSI_DC390T is not set # CONFIG_SCSI_DEBUG is not set -# CONFIG_SCSI_MAC53C94 is not set # # Multi-device support (RAID and LVM) @@ -300,15 +317,16 @@ CONFIG_MD_LINEAR=y CONFIG_MD_RAID0=y CONFIG_MD_RAID1=y -# CONFIG_MD_RAID10 is not set +CONFIG_MD_RAID10=m CONFIG_MD_RAID5=y -# CONFIG_MD_RAID6 is not set -# CONFIG_MD_MULTIPATH is not set +CONFIG_MD_RAID6=m +CONFIG_MD_MULTIPATH=m +CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=y -# CONFIG_DM_CRYPT is not set -# CONFIG_DM_SNAPSHOT is not set -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_ZERO is not set +CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_MIRROR=m +CONFIG_DM_ZERO=m # # Fusion MPT device support @@ -386,6 +404,8 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_TUNNEL=y +CONFIG_IP_TCPDIAG=m +# CONFIG_IP_TCPDIAG_IPV6 is not set # # IP: Virtual Server Configuration @@ -398,61 +418,71 @@ # # IP: Netfilter Configuration # -CONFIG_IP_NF_CONNTRACK=y -# CONFIG_IP_NF_CT_ACCT is not set -# CONFIG_IP_NF_CT_PROTO_SCTP is not set -# CONFIG_IP_NF_FTP is not set -# CONFIG_IP_NF_IRC is not set -# CONFIG_IP_NF_TFTP is not set -# CONFIG_IP_NF_AMANDA is not set -CONFIG_IP_NF_QUEUE=y -CONFIG_IP_NF_IPTABLES=y -CONFIG_IP_NF_MATCH_LIMIT=y -CONFIG_IP_NF_MATCH_IPRANGE=y -CONFIG_IP_NF_MATCH_MAC=y -CONFIG_IP_NF_MATCH_PKTTYPE=y -CONFIG_IP_NF_MATCH_MARK=y -CONFIG_IP_NF_MATCH_MULTIPORT=y -CONFIG_IP_NF_MATCH_TOS=y -CONFIG_IP_NF_MATCH_RECENT=y -CONFIG_IP_NF_MATCH_ECN=y -CONFIG_IP_NF_MATCH_DSCP=y -CONFIG_IP_NF_MATCH_AH_ESP=y -CONFIG_IP_NF_MATCH_LENGTH=y -CONFIG_IP_NF_MATCH_TTL=y -CONFIG_IP_NF_MATCH_TCPMSS=y -CONFIG_IP_NF_MATCH_HELPER=y -CONFIG_IP_NF_MATCH_STATE=y -CONFIG_IP_NF_MATCH_CONNTRACK=y -CONFIG_IP_NF_MATCH_OWNER=y -# CONFIG_IP_NF_MATCH_ADDRTYPE is not set -# CONFIG_IP_NF_MATCH_REALM is not set -# CONFIG_IP_NF_MATCH_SCTP is not set -# CONFIG_IP_NF_MATCH_COMMENT is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -CONFIG_IP_NF_TARGET_LOG=y -CONFIG_IP_NF_TARGET_ULOG=y -CONFIG_IP_NF_TARGET_TCPMSS=y -CONFIG_IP_NF_NAT=y +CONFIG_IP_NF_CONNTRACK=m +CONFIG_IP_NF_CT_ACCT=y +CONFIG_IP_NF_CONNTRACK_MARK=y +CONFIG_IP_NF_CT_PROTO_SCTP=m +CONFIG_IP_NF_FTP=m +CONFIG_IP_NF_IRC=m +CONFIG_IP_NF_TFTP=m +CONFIG_IP_NF_AMANDA=m +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_LIMIT=m +CONFIG_IP_NF_MATCH_IPRANGE=m +CONFIG_IP_NF_MATCH_MAC=m +CONFIG_IP_NF_MATCH_PKTTYPE=m +CONFIG_IP_NF_MATCH_MARK=m +CONFIG_IP_NF_MATCH_MULTIPORT=m +CONFIG_IP_NF_MATCH_TOS=m +CONFIG_IP_NF_MATCH_RECENT=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_DSCP=m +CONFIG_IP_NF_MATCH_AH_ESP=m +CONFIG_IP_NF_MATCH_LENGTH=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_MATCH_TCPMSS=m +CONFIG_IP_NF_MATCH_HELPER=m +CONFIG_IP_NF_MATCH_STATE=m +CONFIG_IP_NF_MATCH_CONNTRACK=m +CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_REALM=m +CONFIG_IP_NF_MATCH_SCTP=m +CONFIG_IP_NF_MATCH_COMMENT=m +CONFIG_IP_NF_MATCH_CONNMARK=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TARGET_TCPMSS=m +CONFIG_IP_NF_NAT=m CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_REDIRECT=y -CONFIG_IP_NF_TARGET_NETMAP=y -CONFIG_IP_NF_TARGET_SAME=y -# CONFIG_IP_NF_NAT_SNMP_BASIC is not set -CONFIG_IP_NF_MANGLE=y -CONFIG_IP_NF_TARGET_TOS=y -CONFIG_IP_NF_TARGET_ECN=y -CONFIG_IP_NF_TARGET_DSCP=y -CONFIG_IP_NF_TARGET_MARK=y -CONFIG_IP_NF_TARGET_CLASSIFY=y -# CONFIG_IP_NF_RAW is not set -CONFIG_IP_NF_ARPTABLES=y -CONFIG_IP_NF_ARPFILTER=y -CONFIG_IP_NF_ARP_MANGLE=y +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_SAME=m +CONFIG_IP_NF_NAT_SNMP_BASIC=m +CONFIG_IP_NF_NAT_IRC=m +CONFIG_IP_NF_NAT_FTP=m +CONFIG_IP_NF_NAT_TFTP=m +CONFIG_IP_NF_NAT_AMANDA=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_DSCP=m +CONFIG_IP_NF_TARGET_MARK=m +CONFIG_IP_NF_TARGET_CLASSIFY=m +CONFIG_IP_NF_TARGET_CONNMARK=m +CONFIG_IP_NF_TARGET_CLUSTERIP=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_TARGET_NOTRACK=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set +CONFIG_XFRM_USER=m # # SCTP Configuration (EXPERIMENTAL) @@ -471,13 +501,12 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set -# CONFIG_NET_CLS_ROUTE is not set +CONFIG_NET_CLS_ROUTE=y # # Network testing @@ -587,7 +616,7 @@ # Userland interfaces # CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 CONFIG_INPUT_JOYDEV=m @@ -663,7 +692,6 @@ # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set CONFIG_RAW_DRIVER=y CONFIG_MAX_RAW_DEVS=256 @@ -693,6 +721,7 @@ # CONFIG_I2C_I810 is not set # CONFIG_I2C_ISA is not set CONFIG_I2C_KEYWEST=y +# CONFIG_I2C_MPC is not set # CONFIG_I2C_NFORCE2 is not set # CONFIG_I2C_PARPORT_LIGHT is not set # CONFIG_I2C_PROSAVAGE is not set @@ -701,6 +730,7 @@ # CONFIG_I2C_SIS5595 is not set # CONFIG_I2C_SIS630 is not set # CONFIG_I2C_SIS96X is not set +# CONFIG_I2C_STUB is not set # CONFIG_I2C_VIA is not set # CONFIG_I2C_VIAPRO is not set # CONFIG_I2C_VOODOO3 is not set @@ -712,20 +742,25 @@ # CONFIG_I2C_SENSOR is not set # CONFIG_SENSORS_ADM1021 is not set # CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set # CONFIG_SENSORS_ADM1031 is not set # CONFIG_SENSORS_ASB100 is not set # CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_FSCHER is not set # CONFIG_SENSORS_GL518SM is not set # CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_LM63 is not set # CONFIG_SENSORS_LM75 is not set # CONFIG_SENSORS_LM77 is not set # CONFIG_SENSORS_LM78 is not set # CONFIG_SENSORS_LM80 is not set # CONFIG_SENSORS_LM83 is not set # CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set # CONFIG_SENSORS_LM90 is not set # CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47B397 is not set # CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_W83781D is not set @@ -768,6 +803,7 @@ # CONFIG_FB=y CONFIG_FB_MODE_HELPERS=y +CONFIG_FB_TILEBLITTING=y # CONFIG_FB_CIRRUS is not set # CONFIG_FB_PM2 is not set # CONFIG_FB_CYBER2000 is not set @@ -789,6 +825,7 @@ # CONFIG_FB_RADEON_DEBUG is not set # CONFIG_FB_ATY128 is not set # CONFIG_FB_ATY is not set +# CONFIG_FB_SAVAGE is not set # CONFIG_FB_SIS is not set # CONFIG_FB_NEOMAGIC is not set # CONFIG_FB_KYRO is not set @@ -814,6 +851,11 @@ CONFIG_LOGO_LINUX_MONO=y CONFIG_LOGO_LINUX_VGA16=y CONFIG_LOGO_LINUX_CLUT224=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_BACKLIGHT_CLASS_DEVICE=m +CONFIG_BACKLIGHT_DEVICE=y +CONFIG_LCD_CLASS_DEVICE=m +CONFIG_LCD_DEVICE=y # # Sound @@ -833,6 +875,8 @@ # CONFIG_USB_BANDWIDTH is not set # CONFIG_USB_DYNAMIC_MINORS is not set # CONFIG_USB_OTG is not set +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y # # USB Host Controller Drivers @@ -842,6 +886,7 @@ # CONFIG_USB_EHCI_ROOT_HUB_TT is not set CONFIG_USB_OHCI_HCD=y # CONFIG_USB_UHCI_HCD is not set +# CONFIG_USB_SL811_HCD is not set # # USB Device Class drivers @@ -849,9 +894,13 @@ # CONFIG_USB_BLUETOOTH_TTY is not set CONFIG_USB_ACM=m CONFIG_USB_PRINTER=y + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# CONFIG_USB_STORAGE=y # CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_RW_DETECT is not set +CONFIG_USB_STORAGE_RW_DETECT=y CONFIG_USB_STORAGE_DATAFAB=y CONFIG_USB_STORAGE_FREECOM=y CONFIG_USB_STORAGE_ISD200=y @@ -862,7 +911,7 @@ CONFIG_USB_STORAGE_JUMPSHOT=y # -# USB Human Interface Devices (HID) +# USB Input Devices # CONFIG_USB_HID=y CONFIG_USB_HIDINPUT=y @@ -885,7 +934,6 @@ # # CONFIG_USB_MDC800 is not set # CONFIG_USB_MICROTEK is not set -# CONFIG_USB_HPUSBSCSI is not set # # USB Multimedia devices @@ -897,12 +945,12 @@ # # -# USB Network adaptors +# USB Network Adapters # -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set +CONFIG_USB_CATC=m +CONFIG_USB_KAWETH=m +CONFIG_USB_PEGASUS=m +CONFIG_USB_RTL8150=m CONFIG_USB_USBNET=m # @@ -914,6 +962,7 @@ CONFIG_USB_GENESYS=y CONFIG_USB_NET1080=y CONFIG_USB_PL2301=y +CONFIG_USB_KC2190=y # # Intelligent USB Devices/Gadgets @@ -939,6 +988,7 @@ CONFIG_USB_SERIAL_GENERIC=y CONFIG_USB_SERIAL_BELKIN=m CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m +CONFIG_USB_SERIAL_CYPRESS_M8=m CONFIG_USB_SERIAL_EMPEG=m CONFIG_USB_SERIAL_FTDI_SIO=m CONFIG_USB_SERIAL_VISOR=m @@ -946,6 +996,8 @@ CONFIG_USB_SERIAL_IR=m CONFIG_USB_SERIAL_EDGEPORT=m CONFIG_USB_SERIAL_EDGEPORT_TI=m +CONFIG_USB_SERIAL_GARMIN=m +CONFIG_USB_SERIAL_IPW=m CONFIG_USB_SERIAL_KEYSPAN_PDA=m CONFIG_USB_SERIAL_KEYSPAN=m CONFIG_USB_SERIAL_KEYSPAN_MPR=y @@ -966,6 +1018,7 @@ CONFIG_USB_SERIAL_PL2303=m CONFIG_USB_SERIAL_SAFE=m CONFIG_USB_SERIAL_SAFE_PADDED=y +CONFIG_USB_SERIAL_TI=m CONFIG_USB_SERIAL_CYBERJACK=m CONFIG_USB_SERIAL_XIRCOM=m CONFIG_USB_SERIAL_OMNINET=m @@ -976,42 +1029,72 @@ # # CONFIG_USB_EMI62 is not set # CONFIG_USB_EMI26 is not set -# CONFIG_USB_TIGL is not set # CONFIG_USB_AUERSWALD is not set # CONFIG_USB_RIO500 is not set # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set # CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set +# CONFIG_USB_IDMOUSE is not set # CONFIG_USB_TEST is not set # +# USB ATM/DSL drivers +# + +# # 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 CONFIG_EXT2_FS_XATTR=y CONFIG_EXT2_FS_POSIX_ACL=y -# CONFIG_EXT2_FS_SECURITY is not set +CONFIG_EXT2_FS_SECURITY=y CONFIG_EXT3_FS=y CONFIG_EXT3_FS_XATTR=y CONFIG_EXT3_FS_POSIX_ACL=y -# CONFIG_EXT3_FS_SECURITY is not set +CONFIG_EXT3_FS_SECURITY=y CONFIG_JBD=y # CONFIG_JBD_DEBUG is not set CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set +CONFIG_REISERFS_FS=y +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +CONFIG_REISERFS_FS_XATTR=y +CONFIG_REISERFS_FS_POSIX_ACL=y +CONFIG_REISERFS_FS_SECURITY=y # CONFIG_JFS_FS is not set CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set + +# +# XFS support +# +CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_QUOTA is not set +CONFIG_XFS_SECURITY=y +CONFIG_XFS_POSIX_ACL=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=m # CONFIG_AUTOFS4_FS is not set @@ -1019,8 +1102,9 @@ # CD-ROM/DVD Filesystems # CONFIG_ISO9660_FS=y -# CONFIG_JOLIET is not set -# CONFIG_ZISOFS is not set +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_ZISOFS_FS=y CONFIG_UDF_FS=m CONFIG_UDF_NLS=y @@ -1044,6 +1128,8 @@ CONFIG_DEVPTS_FS_XATTR=y # CONFIG_DEVPTS_FS_SECURITY is not set CONFIG_TMPFS=y +CONFIG_TMPFS_XATTR=y +CONFIG_TMPFS_SECURITY=y CONFIG_HUGETLBFS=y CONFIG_HUGETLB_PAGE=y CONFIG_RAMFS=y @@ -1053,8 +1139,8 @@ # # CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set +CONFIG_HFS_FS=m +CONFIG_HFSPLUS_FS=m # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set @@ -1087,7 +1173,7 @@ CONFIG_CIFS=m # CONFIG_CIFS_STATS is not set # CONFIG_CIFS_XATTR is not set -# CONFIG_CIFS_POSIX is not set +# CONFIG_CIFS_EXPERIMENTAL is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -1117,7 +1203,7 @@ # CONFIG_NLS=y CONFIG_NLS_DEFAULT="iso8859-1" -# CONFIG_NLS_CODEPAGE_437 is not set +CONFIG_NLS_CODEPAGE_437=y # CONFIG_NLS_CODEPAGE_737 is not set # CONFIG_NLS_CODEPAGE_775 is not set # CONFIG_NLS_CODEPAGE_850 is not set @@ -1138,10 +1224,10 @@ # CONFIG_NLS_CODEPAGE_949 is not set # CONFIG_NLS_CODEPAGE_874 is not set # CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -# CONFIG_NLS_ASCII is not set -# CONFIG_NLS_ISO8859_1 is not set +CONFIG_NLS_CODEPAGE_1250=y +CONFIG_NLS_CODEPAGE_1251=y +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set # CONFIG_NLS_ISO8859_4 is not set @@ -1151,10 +1237,10 @@ # CONFIG_NLS_ISO8859_9 is not set # CONFIG_NLS_ISO8859_13 is not set # CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set +CONFIG_NLS_ISO8859_15=y # CONFIG_NLS_KOI8_R is not set # CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_UTF8 is not set +CONFIG_NLS_UTF8=y # # Profiling support @@ -1167,19 +1253,23 @@ # CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_INFO is not set +CONFIG_DEBUG_FS=y # CONFIG_DEBUG_STACKOVERFLOW is not set +# CONFIG_KPROBES is not set # CONFIG_DEBUG_STACK_USAGE is not set # CONFIG_DEBUGGER is not set # CONFIG_PPCDBG is not set CONFIG_IRQSTACKS=y -# CONFIG_SCHEDSTATS is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -1193,7 +1283,7 @@ CONFIG_CRYPTO_SHA1=m CONFIG_CRYPTO_SHA256=m CONFIG_CRYPTO_SHA512=m -# CONFIG_CRYPTO_WP512 is not set +CONFIG_CRYPTO_WP512=m CONFIG_CRYPTO_DES=y CONFIG_CRYPTO_BLOWFISH=m CONFIG_CRYPTO_TWOFISH=m @@ -1201,19 +1291,24 @@ CONFIG_CRYPTO_AES=m CONFIG_CRYPTO_CAST5=m CONFIG_CRYPTO_CAST6=m -# CONFIG_CRYPTO_TEA is not set +CONFIG_CRYPTO_TEA=m CONFIG_CRYPTO_ARC4=m -# CONFIG_CRYPTO_KHAZAD is not set +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_ANUBIS=m CONFIG_CRYPTO_DEFLATE=m CONFIG_CRYPTO_MICHAEL_MIC=m -# CONFIG_CRYPTO_CRC32C is not set +CONFIG_CRYPTO_CRC32C=m CONFIG_CRYPTO_TEST=m # +# Hardware crypto devices +# + +# # Library routines # CONFIG_CRC_CCITT=m CONFIG_CRC32=y -# CONFIG_LIBCRC32C is not set +CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=m diff -Nru a/arch/ppc64/configs/iSeries_defconfig b/arch/ppc64/configs/iSeries_defconfig --- a/arch/ppc64/configs/iSeries_defconfig 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/configs/iSeries_defconfig 2005-03-07 14:54:18 -08:00 @@ -1,9 +1,12 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.11-rc3-bk6 +# Wed Feb 9 23:34:52 2005 # CONFIG_64BIT=y CONFIG_MMU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_ISA_DMA=y CONFIG_HAVE_DEC_LOCK=y CONFIG_EARLY_PRINTK=y @@ -16,19 +19,20 @@ # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y +CONFIG_LOCK_KERNEL=y # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y CONFIG_LOG_BUF_SHIFT=17 CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y # CONFIG_EMBEDDED is not set @@ -37,12 +41,12 @@ # CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set # @@ -52,8 +56,9 @@ CONFIG_MODULE_UNLOAD=y # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y -# CONFIG_MODVERSIONS is not set -# CONFIG_KMOD is not set +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +CONFIG_KMOD=y CONFIG_STOP_MACHINE=y CONFIG_SYSVIPC_COMPAT=y @@ -61,15 +66,17 @@ # Platform support # CONFIG_PPC_ISERIES=y -# CONFIG_PPC_PSERIES is not set +# CONFIG_PPC_MULTIPLATFORM is not set CONFIG_PPC=y CONFIG_PPC64=y +CONFIG_IBMVIO=y # CONFIG_POWER4_ONLY is not set CONFIG_IOMMU_VMERGE=y CONFIG_SMP=y CONFIG_NR_CPUS=32 # CONFIG_SCHED_SMT is not set # CONFIG_PREEMPT is not set +CONFIG_GENERIC_HARDIRQS=y CONFIG_MSCHUNKS=y CONFIG_LPARCFG=y @@ -82,12 +89,15 @@ # CONFIG_BINFMT_MISC is not set CONFIG_PCI_LEGACY_PROC=y CONFIG_PCI_NAMES=y -# CONFIG_HOTPLUG_CPU is not set # -# PCMCIA/CardBus support +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# PC-card bridges # -# CONFIG_PCMCIA is not set # # PCI Hotplug Support @@ -128,13 +138,26 @@ # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_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_SX8 is not set CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=65536 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set # # ATA/ATAPI/MFM/RLL support @@ -169,6 +192,7 @@ # CONFIG_SCSI_SPI_ATTRS=y CONFIG_SCSI_FC_ATTRS=y +# CONFIG_SCSI_ISCSI_ATTRS is not set # # SCSI low-level drivers @@ -191,6 +215,7 @@ # CONFIG_SCSI_GDTH is not set # CONFIG_SCSI_IPS is not set CONFIG_SCSI_IBMVSCSI=m +# CONFIG_SCSI_INITIO is not set # CONFIG_SCSI_INIA100 is not set # CONFIG_SCSI_SYM53C8XX_2 is not set # CONFIG_SCSI_IPR is not set @@ -203,7 +228,6 @@ # CONFIG_SCSI_QLA2300 is not set # CONFIG_SCSI_QLA2322 is not set # CONFIG_SCSI_QLA6312 is not set -# CONFIG_SCSI_QLA6322 is not set # CONFIG_SCSI_DC395x is not set # CONFIG_SCSI_DC390T is not set # CONFIG_SCSI_DEBUG is not set @@ -220,6 +244,7 @@ CONFIG_MD_RAID5=y CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m +CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=y CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m @@ -271,6 +296,8 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_TUNNEL=y +CONFIG_IP_TCPDIAG=m +# CONFIG_IP_TCPDIAG_IPV6 is not set # # IP: Virtual Server Configuration @@ -284,6 +311,9 @@ # IP: Netfilter Configuration # CONFIG_IP_NF_CONNTRACK=m +CONFIG_IP_NF_CT_ACCT=y +CONFIG_IP_NF_CONNTRACK_MARK=y +CONFIG_IP_NF_CT_PROTO_SCTP=m CONFIG_IP_NF_FTP=m CONFIG_IP_NF_IRC=m CONFIG_IP_NF_TFTP=m @@ -308,8 +338,17 @@ CONFIG_IP_NF_MATCH_STATE=m CONFIG_IP_NF_MATCH_CONNTRACK=m CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_REALM=m +CONFIG_IP_NF_MATCH_SCTP=m +CONFIG_IP_NF_MATCH_COMMENT=m +CONFIG_IP_NF_MATCH_CONNMARK=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m CONFIG_IP_NF_FILTER=m CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TARGET_TCPMSS=m CONFIG_IP_NF_NAT=m CONFIG_IP_NF_NAT_NEEDED=y CONFIG_IP_NF_TARGET_MASQUERADE=m @@ -327,21 +366,13 @@ CONFIG_IP_NF_TARGET_DSCP=m CONFIG_IP_NF_TARGET_MARK=m CONFIG_IP_NF_TARGET_CLASSIFY=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m +CONFIG_IP_NF_TARGET_CONNMARK=m +CONFIG_IP_NF_TARGET_CLUSTERIP=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_TARGET_NOTRACK=m CONFIG_IP_NF_ARPTABLES=m CONFIG_IP_NF_ARPFILTER=m CONFIG_IP_NF_ARP_MANGLE=m -CONFIG_IP_NF_COMPAT_IPCHAINS=m -CONFIG_IP_NF_COMPAT_IPFWADM=m -CONFIG_IP_NF_TARGET_NOTRACK=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_REALM=m -# CONFIG_IP_NF_CT_ACCT is not set -CONFIG_IP_NF_MATCH_SCTP=m -CONFIG_IP_NF_CT_PROTO_SCTP=m CONFIG_XFRM=y CONFIG_XFRM_USER=m @@ -362,7 +393,6 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing @@ -425,19 +455,21 @@ # CONFIG_EPIC100 is not set # CONFIG_SUNDANCE is not set # CONFIG_VIA_RHINE is not set -# CONFIG_VIA_VELOCITY is not set # # Ethernet (1000 Mbit) # -# CONFIG_ACENIC is not set +CONFIG_ACENIC=m +# CONFIG_ACENIC_OMIT_TIGON_I is not set # CONFIG_DL2K is not set -# CONFIG_E1000 is not set +CONFIG_E1000=m +# CONFIG_E1000_NAPI is not set # CONFIG_NS83820 is not set # CONFIG_HAMACHI is not set # CONFIG_YELLOWFIN is not set # CONFIG_R8169 is not set # CONFIG_SK98LIN is not set +# CONFIG_VIA_VELOCITY is not set # CONFIG_TIGON3 is not set # @@ -498,7 +530,7 @@ # Userland interfaces # CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # CONFIG_INPUT_JOYDEV is not set @@ -511,11 +543,8 @@ # # CONFIG_GAMEPORT is not set CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y +# CONFIG_SERIO is not set # CONFIG_SERIO_I8042 is not set -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PCIPS2 is not set # # Input Device Drivers @@ -563,7 +592,6 @@ # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set CONFIG_RAW_DRIVER=y CONFIG_MAX_RAW_DEVS=256 @@ -606,6 +634,12 @@ # USB support # # CONFIG_USB is not set +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# # # USB Gadget Support @@ -613,16 +647,26 @@ # 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 CONFIG_EXT2_FS_XATTR=y CONFIG_EXT2_FS_POSIX_ACL=y -# CONFIG_EXT2_FS_SECURITY is not set +CONFIG_EXT2_FS_SECURITY=y CONFIG_EXT3_FS=y CONFIG_EXT3_FS_XATTR=y CONFIG_EXT3_FS_POSIX_ACL=y -# CONFIG_EXT3_FS_SECURITY is not set +CONFIG_EXT3_FS_SECURITY=y CONFIG_JBD=y # CONFIG_JBD_DEBUG is not set CONFIG_FS_MBCACHE=y @@ -631,20 +675,27 @@ # CONFIG_REISERFS_PROC_INFO is not set CONFIG_REISERFS_FS_XATTR=y CONFIG_REISERFS_FS_POSIX_ACL=y -# CONFIG_REISERFS_FS_SECURITY is not set +CONFIG_REISERFS_FS_SECURITY=y CONFIG_JFS_FS=m CONFIG_JFS_POSIX_ACL=y +CONFIG_JFS_SECURITY=y # CONFIG_JFS_DEBUG is not set # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y + +# +# XFS support +# CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y # CONFIG_XFS_RT is not set # CONFIG_XFS_QUOTA is not set -# CONFIG_XFS_SECURITY is not set +CONFIG_XFS_SECURITY=y CONFIG_XFS_POSIX_ACL=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=m # CONFIG_AUTOFS4_FS is not set @@ -652,8 +703,9 @@ # CD-ROM/DVD Filesystems # CONFIG_ISO9660_FS=y -# CONFIG_JOLIET is not set -# CONFIG_ZISOFS is not set +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_ZISOFS_FS=y CONFIG_UDF_FS=m CONFIG_UDF_NLS=y @@ -675,8 +727,10 @@ CONFIG_SYSFS=y # CONFIG_DEVFS_FS is not set CONFIG_DEVPTS_FS_XATTR=y -# CONFIG_DEVPTS_FS_SECURITY is not set +CONFIG_DEVPTS_FS_SECURITY=y CONFIG_TMPFS=y +CONFIG_TMPFS_XATTR=y +CONFIG_TMPFS_SECURITY=y # CONFIG_HUGETLBFS is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -721,6 +775,7 @@ # CONFIG_CIFS_STATS is not set CONFIG_CIFS_XATTR=y CONFIG_CIFS_POSIX=y +# CONFIG_CIFS_EXPERIMENTAL is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -795,19 +850,23 @@ # CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_INFO is not set +CONFIG_DEBUG_FS=y CONFIG_DEBUG_STACKOVERFLOW=y +# CONFIG_KPROBES is not set CONFIG_DEBUG_STACK_USAGE=y # CONFIG_DEBUGGER is not set # CONFIG_PPCDBG is not set -# CONFIG_IRQSTACKS is not set -# CONFIG_SCHEDSTATS is not set +CONFIG_IRQSTACKS=y # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -821,7 +880,7 @@ CONFIG_CRYPTO_SHA1=m CONFIG_CRYPTO_SHA256=m CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WHIRLPOOL=m +CONFIG_CRYPTO_WP512=m CONFIG_CRYPTO_DES=y CONFIG_CRYPTO_BLOWFISH=m CONFIG_CRYPTO_TWOFISH=m @@ -832,10 +891,15 @@ CONFIG_CRYPTO_TEA=m CONFIG_CRYPTO_ARC4=m CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_ANUBIS=m CONFIG_CRYPTO_DEFLATE=m CONFIG_CRYPTO_MICHAEL_MIC=m CONFIG_CRYPTO_CRC32C=m CONFIG_CRYPTO_TEST=m + +# +# Hardware crypto devices +# # # Library routines diff -Nru a/arch/ppc64/configs/maple_defconfig b/arch/ppc64/configs/maple_defconfig --- a/arch/ppc64/configs/maple_defconfig 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc64/configs/maple_defconfig 2005-03-07 14:54:16 -08:00 @@ -1,11 +1,12 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.9 -# Wed Oct 20 15:39:14 2004 +# Linux kernel version: 2.6.11-rc3-bk6 +# Wed Feb 9 23:34:53 2005 # CONFIG_64BIT=y CONFIG_MMU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_ISA_DMA=y CONFIG_HAVE_DEC_LOCK=y CONFIG_EARLY_PRINTK=y @@ -18,6 +19,7 @@ # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y +CONFIG_LOCK_KERNEL=y # # General setup @@ -25,12 +27,12 @@ CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y -# CONFIG_POSIX_MQUEUE is not set +CONFIG_POSIX_MQUEUE=y # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=17 # CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y # CONFIG_EMBEDDED is not set @@ -39,12 +41,12 @@ # CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set # @@ -52,9 +54,10 @@ # CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y -# CONFIG_MODVERSIONS is not set +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y CONFIG_KMOD=y CONFIG_STOP_MACHINE=y CONFIG_SYSVIPC_COMPAT=y @@ -77,10 +80,10 @@ CONFIG_POWER4_ONLY=y CONFIG_IOMMU_VMERGE=y CONFIG_SMP=y -# CONFIG_IRQ_ALL_CPUS is not set CONFIG_NR_CPUS=2 # CONFIG_SCHED_SMT is not set # CONFIG_PREEMPT is not set +CONFIG_GENERIC_HARDIRQS=y # # General setup @@ -91,6 +94,20 @@ # CONFIG_BINFMT_MISC is not set CONFIG_PCI_LEGACY_PROC=y CONFIG_PCI_NAMES=y + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# PC-card bridges +# + +# +# PCI Hotplug Support +# +# CONFIG_HOTPLUG_PCI is not set CONFIG_PROC_DEVICETREE=y # CONFIG_CMDLINE_BOOL is not set @@ -103,6 +120,7 @@ # CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set # CONFIG_DEBUG_DRIVER is not set # @@ -127,13 +145,26 @@ # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_UB is not set CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=8192 # CONFIG_BLK_DEV_INITRD is not set +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set # # ATA/ATAPI/MFM/RLL support @@ -151,7 +182,6 @@ # CONFIG_BLK_DEV_IDETAPE is not set # CONFIG_BLK_DEV_IDEFLOPPY is not set CONFIG_IDE_TASK_IOCTL=y -CONFIG_IDE_TASKFILE_IO=y # # IDE chipset support/bugfixes @@ -250,6 +280,8 @@ # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set # CONFIG_INET_TUNNEL is not set +CONFIG_IP_TCPDIAG=y +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -269,7 +301,6 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing @@ -330,7 +361,6 @@ # CONFIG_EPIC100 is not set # CONFIG_SUNDANCE is not set # CONFIG_VIA_RHINE is not set -# CONFIG_VIA_VELOCITY is not set # # Ethernet (1000 Mbit) @@ -344,6 +374,7 @@ # CONFIG_YELLOWFIN is not set # CONFIG_R8169 is not set # CONFIG_SK98LIN is not set +# CONFIG_VIA_VELOCITY is not set # CONFIG_TIGON3 is not set # @@ -461,7 +492,6 @@ # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set @@ -489,6 +519,7 @@ # CONFIG_I2C_I801 is not set # CONFIG_I2C_I810 is not set # CONFIG_I2C_ISA is not set +# CONFIG_I2C_MPC is not set # CONFIG_I2C_NFORCE2 is not set # CONFIG_I2C_PARPORT_LIGHT is not set # CONFIG_I2C_PROSAVAGE is not set @@ -497,6 +528,7 @@ # CONFIG_I2C_SIS5595 is not set # CONFIG_I2C_SIS630 is not set # CONFIG_I2C_SIS96X is not set +# CONFIG_I2C_STUB is not set # CONFIG_I2C_VIA is not set # CONFIG_I2C_VIAPRO is not set # CONFIG_I2C_VOODOO3 is not set @@ -508,20 +540,25 @@ # CONFIG_I2C_SENSOR is not set # CONFIG_SENSORS_ADM1021 is not set # CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set # CONFIG_SENSORS_ADM1031 is not set # CONFIG_SENSORS_ASB100 is not set # CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_FSCHER is not set # CONFIG_SENSORS_GL518SM is not set # CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_LM63 is not set # CONFIG_SENSORS_LM75 is not set # CONFIG_SENSORS_LM77 is not set # CONFIG_SENSORS_LM78 is not set # CONFIG_SENSORS_LM80 is not set # CONFIG_SENSORS_LM83 is not set # CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set # CONFIG_SENSORS_LM90 is not set # CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47B397 is not set # CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_W83781D is not set @@ -588,6 +625,8 @@ # CONFIG_USB_BANDWIDTH is not set # CONFIG_USB_DYNAMIC_MINORS is not set # CONFIG_USB_OTG is not set +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y # # USB Host Controller Drivers @@ -597,6 +636,7 @@ CONFIG_USB_EHCI_ROOT_HUB_TT=y CONFIG_USB_OHCI_HCD=y CONFIG_USB_UHCI_HCD=y +# CONFIG_USB_SL811_HCD is not set # # USB Device Class drivers @@ -604,10 +644,14 @@ # CONFIG_USB_BLUETOOTH_TTY is not set # CONFIG_USB_ACM is not set # CONFIG_USB_PRINTER is not set + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# # CONFIG_USB_STORAGE is not set # -# USB Human Interface Devices (HID) +# USB Input Devices # CONFIG_USB_HID=y CONFIG_USB_HIDINPUT=y @@ -637,7 +681,7 @@ # # -# USB Network adaptors +# USB Network Adapters # # CONFIG_USB_CATC is not set # CONFIG_USB_KAWETH is not set @@ -657,6 +701,7 @@ CONFIG_USB_SERIAL_GENERIC=y # CONFIG_USB_SERIAL_BELKIN is not set # CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set +CONFIG_USB_SERIAL_CYPRESS_M8=m # CONFIG_USB_SERIAL_EMPEG is not set # CONFIG_USB_SERIAL_FTDI_SIO is not set # CONFIG_USB_SERIAL_VISOR is not set @@ -664,6 +709,8 @@ # CONFIG_USB_SERIAL_IR is not set # CONFIG_USB_SERIAL_EDGEPORT is not set # CONFIG_USB_SERIAL_EDGEPORT_TI is not set +CONFIG_USB_SERIAL_GARMIN=m +CONFIG_USB_SERIAL_IPW=m # CONFIG_USB_SERIAL_KEYSPAN_PDA is not set CONFIG_USB_SERIAL_KEYSPAN=y CONFIG_USB_SERIAL_KEYSPAN_MPR=y @@ -683,6 +730,7 @@ # CONFIG_USB_SERIAL_MCT_U232 is not set # CONFIG_USB_SERIAL_PL2303 is not set # CONFIG_USB_SERIAL_SAFE is not set +CONFIG_USB_SERIAL_TI=m # CONFIG_USB_SERIAL_CYBERJACK is not set # CONFIG_USB_SERIAL_XIRCOM is not set # CONFIG_USB_SERIAL_OMNINET is not set @@ -693,22 +741,37 @@ # # CONFIG_USB_EMI62 is not set # CONFIG_USB_EMI26 is not set -# CONFIG_USB_TIGL is not set # CONFIG_USB_AUERSWALD is not set # CONFIG_USB_RIO500 is not set # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set # CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set +# CONFIG_USB_IDMOUSE is not set # CONFIG_USB_TEST is not set # +# USB ATM/DSL drivers +# + +# # 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 @@ -719,10 +782,15 @@ # CONFIG_JBD_DEBUG 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 # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -752,8 +820,10 @@ CONFIG_DEVPTS_FS_XATTR=y # CONFIG_DEVPTS_FS_SECURITY is not set CONFIG_TMPFS=y -# CONFIG_HUGETLBFS is not set -# CONFIG_HUGETLB_PAGE is not set +CONFIG_TMPFS_XATTR=y +CONFIG_TMPFS_SECURITY=y +CONFIG_HUGETLBFS=y +CONFIG_HUGETLB_PAGE=y CONFIG_RAMFS=y # @@ -766,7 +836,7 @@ # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set -# CONFIG_CRAMFS is not set +CONFIG_CRAMFS=y # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set # CONFIG_QNX4FS_FS is not set @@ -784,7 +854,6 @@ CONFIG_ROOT_NFS=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y CONFIG_SUNRPC_GSS=y CONFIG_RPCSEC_GSS_KRB5=y @@ -869,21 +938,25 @@ # CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHEDSTATS is not set CONFIG_DEBUG_SLAB=y CONFIG_DEBUG_SPINLOCK_SLEEP=y +# CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_INFO is not set +CONFIG_DEBUG_FS=y CONFIG_DEBUG_STACKOVERFLOW=y +# CONFIG_KPROBES is not set CONFIG_DEBUG_STACK_USAGE=y CONFIG_DEBUGGER=y CONFIG_XMON=y CONFIG_XMON_DEFAULT=y # CONFIG_PPCDBG is not set # CONFIG_IRQSTACKS is not set -# CONFIG_SCHEDSTATS is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -908,14 +981,20 @@ # CONFIG_CRYPTO_TEA is not set # CONFIG_CRYPTO_ARC4 is not set # CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_ANUBIS is not set # CONFIG_CRYPTO_DEFLATE is not set # CONFIG_CRYPTO_MICHAEL_MIC is not set # CONFIG_CRYPTO_CRC32C is not set # CONFIG_CRYPTO_TEST is not set # +# Hardware crypto devices +# + +# # Library routines # CONFIG_CRC_CCITT=y CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y diff -Nru a/arch/ppc64/configs/pSeries_defconfig b/arch/ppc64/configs/pSeries_defconfig --- a/arch/ppc64/configs/pSeries_defconfig 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/configs/pSeries_defconfig 2005-03-07 14:54:18 -08:00 @@ -1,11 +1,12 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-rc2 -# Thu Sep 23 16:45:05 2004 +# Linux kernel version: 2.6.11-rc3-bk6 +# Wed Feb 9 23:34:54 2005 # CONFIG_64BIT=y CONFIG_MMU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_ISA_DMA=y CONFIG_HAVE_DEC_LOCK=y CONFIG_EARLY_PRINTK=y @@ -18,6 +19,7 @@ # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y +CONFIG_LOCK_KERNEL=y # # General setup @@ -28,10 +30,9 @@ CONFIG_POSIX_MQUEUE=y # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y CONFIG_LOG_BUF_SHIFT=17 CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y # CONFIG_EMBEDDED is not set @@ -40,12 +41,12 @@ # CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set # @@ -55,8 +56,9 @@ CONFIG_MODULE_UNLOAD=y # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y -# CONFIG_MODVERSIONS is not set -# CONFIG_KMOD is not set +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +CONFIG_KMOD=y CONFIG_STOP_MACHINE=y CONFIG_SYSVIPC_COMPAT=y @@ -67,22 +69,25 @@ CONFIG_PPC_MULTIPLATFORM=y CONFIG_PPC_PSERIES=y # CONFIG_PPC_PMAC is not set +# CONFIG_PPC_MAPLE is not set CONFIG_PPC=y CONFIG_PPC64=y CONFIG_PPC_OF=y CONFIG_ALTIVEC=y CONFIG_PPC_SPLPAR=y +CONFIG_IBMVIO=y +# CONFIG_U3_DART is not set # CONFIG_BOOTX_TEXT is not set # CONFIG_POWER4_ONLY is not set CONFIG_IOMMU_VMERGE=y CONFIG_SMP=y -CONFIG_IRQ_ALL_CPUS=y CONFIG_NR_CPUS=128 -# CONFIG_HMT is not set CONFIG_DISCONTIGMEM=y CONFIG_NUMA=y CONFIG_SCHED_SMT=y # CONFIG_PREEMPT is not set +CONFIG_EEH=y +CONFIG_GENERIC_HARDIRQS=y CONFIG_PPC_RTAS=y CONFIG_RTAS_FLASH=m CONFIG_SCANLOG=m @@ -100,9 +105,13 @@ CONFIG_HOTPLUG_CPU=y # -# PCMCIA/CardBus support +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# PC-card bridges # -# CONFIG_PCMCIA is not set # # PCI Hotplug Support @@ -110,7 +119,6 @@ CONFIG_HOTPLUG_PCI=m # CONFIG_HOTPLUG_PCI_FAKE is not set # CONFIG_HOTPLUG_PCI_CPCI is not set -# CONFIG_HOTPLUG_PCI_PCIE is not set # CONFIG_HOTPLUG_PCI_SHPC is not set CONFIG_HOTPLUG_PCI_RPA=m CONFIG_HOTPLUG_PCI_RPA_DLPAR=m @@ -137,7 +145,14 @@ # # Parallel port support # -# CONFIG_PARPORT is not set +CONFIG_PARPORT=m +CONFIG_PARPORT_PC=m +CONFIG_PARPORT_PC_CML1=m +# CONFIG_PARPORT_SERIAL is not set +# CONFIG_PARPORT_PC_FIFO is not set +# CONFIG_PARPORT_PC_SUPERIO is not set +# CONFIG_PARPORT_OTHER is not set +# CONFIG_PARPORT_1284 is not set # # Plug and Play support @@ -147,18 +162,32 @@ # Block devices # CONFIG_BLK_DEV_FD=m +# CONFIG_PARIDE is not set # CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_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_SX8 is not set # CONFIG_BLK_DEV_UB is not set CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=65536 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set # # ATA/ATAPI/MFM/RLL support @@ -177,7 +206,6 @@ # CONFIG_BLK_DEV_IDEFLOPPY is not set # CONFIG_BLK_DEV_IDESCSI is not set # CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set # # IDE chipset support/bugfixes @@ -247,6 +275,7 @@ # CONFIG_SCSI_SPI_ATTRS=y CONFIG_SCSI_FC_ATTRS=y +CONFIG_SCSI_ISCSI_ATTRS=m # # SCSI low-level drivers @@ -269,15 +298,18 @@ # CONFIG_SCSI_GDTH is not set # CONFIG_SCSI_IPS is not set CONFIG_SCSI_IBMVSCSI=y +# CONFIG_SCSI_INITIO is not set # CONFIG_SCSI_INIA100 is not set +# CONFIG_SCSI_PPA is not set +# CONFIG_SCSI_IMM is not set CONFIG_SCSI_SYM53C8XX_2=y CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0 CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 # CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set CONFIG_SCSI_IPR=y -# CONFIG_SCSI_IPR_TRACE is not set -# CONFIG_SCSI_IPR_DUMP is not set +CONFIG_SCSI_IPR_TRACE=y +CONFIG_SCSI_IPR_DUMP=y # CONFIG_SCSI_QLOGIC_ISP is not set # CONFIG_SCSI_QLOGIC_FC is not set # CONFIG_SCSI_QLOGIC_1280 is not set @@ -287,7 +319,6 @@ CONFIG_SCSI_QLA2300=m CONFIG_SCSI_QLA2322=m CONFIG_SCSI_QLA6312=m -CONFIG_SCSI_QLA6322=m # CONFIG_SCSI_DC395x is not set # CONFIG_SCSI_DC390T is not set # CONFIG_SCSI_DEBUG is not set @@ -304,6 +335,7 @@ CONFIG_MD_RAID5=y CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m +CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=y CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m @@ -355,6 +387,8 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_TUNNEL=y +CONFIG_IP_TCPDIAG=m +# CONFIG_IP_TCPDIAG_IPV6 is not set # # IP: Virtual Server Configuration @@ -368,7 +402,8 @@ # IP: Netfilter Configuration # CONFIG_IP_NF_CONNTRACK=m -# CONFIG_IP_NF_CT_ACCT is not set +CONFIG_IP_NF_CT_ACCT=y +CONFIG_IP_NF_CONNTRACK_MARK=y CONFIG_IP_NF_CT_PROTO_SCTP=m CONFIG_IP_NF_FTP=m CONFIG_IP_NF_IRC=m @@ -397,6 +432,9 @@ CONFIG_IP_NF_MATCH_ADDRTYPE=m CONFIG_IP_NF_MATCH_REALM=m CONFIG_IP_NF_MATCH_SCTP=m +CONFIG_IP_NF_MATCH_COMMENT=m +CONFIG_IP_NF_MATCH_CONNMARK=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m CONFIG_IP_NF_FILTER=m CONFIG_IP_NF_TARGET_REJECT=m CONFIG_IP_NF_TARGET_LOG=m @@ -419,13 +457,13 @@ CONFIG_IP_NF_TARGET_DSCP=m CONFIG_IP_NF_TARGET_MARK=m CONFIG_IP_NF_TARGET_CLASSIFY=m +CONFIG_IP_NF_TARGET_CONNMARK=m +CONFIG_IP_NF_TARGET_CLUSTERIP=m CONFIG_IP_NF_RAW=m CONFIG_IP_NF_TARGET_NOTRACK=m CONFIG_IP_NF_ARPTABLES=m CONFIG_IP_NF_ARPFILTER=m CONFIG_IP_NF_ARP_MANGLE=m -CONFIG_IP_NF_COMPAT_IPCHAINS=m -CONFIG_IP_NF_COMPAT_IPFWADM=m CONFIG_XFRM=y CONFIG_XFRM_USER=m @@ -446,7 +484,6 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing @@ -512,7 +549,6 @@ # CONFIG_EPIC100 is not set # CONFIG_SUNDANCE is not set # CONFIG_VIA_RHINE is not set -# CONFIG_VIA_VELOCITY is not set # # Ethernet (1000 Mbit) @@ -527,6 +563,7 @@ # CONFIG_YELLOWFIN is not set # CONFIG_R8169 is not set # CONFIG_SK98LIN is not set +# CONFIG_VIA_VELOCITY is not set CONFIG_TIGON3=y # @@ -536,6 +573,7 @@ # CONFIG_IXGB_NAPI is not set CONFIG_S2IO=m # CONFIG_S2IO_NAPI is not set +# CONFIG_2BUFF_MODE is not set # # Token Ring devices @@ -556,6 +594,7 @@ # CONFIG_WAN is not set # CONFIG_FDDI is not set # CONFIG_HIPPI is not set +# CONFIG_PLIP is not set CONFIG_PPP=m # CONFIG_PPP_MULTILINK is not set # CONFIG_PPP_FILTER is not set @@ -588,7 +627,7 @@ # Userland interfaces # CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # CONFIG_INPUT_JOYDEV is not set @@ -605,7 +644,9 @@ CONFIG_SERIO_I8042=y # CONFIG_SERIO_SERPORT is not set # CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_PARKBD is not set # CONFIG_SERIO_PCIPS2 is not set +CONFIG_SERIO_LIBPS2=y # CONFIG_SERIO_RAW is not set # @@ -624,7 +665,7 @@ # CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_TOUCHSCREEN is not set CONFIG_INPUT_MISC=y -# CONFIG_INPUT_PCSPKR is not set +CONFIG_INPUT_PCSPKR=m # CONFIG_INPUT_UINPUT is not set # @@ -653,6 +694,9 @@ CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 +# CONFIG_PRINTER is not set +# CONFIG_PPDEV is not set +# CONFIG_TIPAR is not set CONFIG_HVC_CONSOLE=y CONFIG_HVCS=m @@ -674,7 +718,6 @@ # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set CONFIG_RAW_DRIVER=y CONFIG_MAX_RAW_DEVS=1024 @@ -703,7 +746,9 @@ # CONFIG_I2C_I801 is not set # CONFIG_I2C_I810 is not set # CONFIG_I2C_ISA is not set +# CONFIG_I2C_MPC is not set # CONFIG_I2C_NFORCE2 is not set +# CONFIG_I2C_PARPORT is not set # CONFIG_I2C_PARPORT_LIGHT is not set # CONFIG_I2C_PROSAVAGE is not set # CONFIG_I2C_SAVAGE4 is not set @@ -711,6 +756,7 @@ # CONFIG_I2C_SIS5595 is not set # CONFIG_I2C_SIS630 is not set # CONFIG_I2C_SIS96X is not set +# CONFIG_I2C_STUB is not set # CONFIG_I2C_VIA is not set # CONFIG_I2C_VIAPRO is not set # CONFIG_I2C_VOODOO3 is not set @@ -722,20 +768,25 @@ # CONFIG_I2C_SENSOR is not set # CONFIG_SENSORS_ADM1021 is not set # CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set # CONFIG_SENSORS_ADM1031 is not set # CONFIG_SENSORS_ASB100 is not set # CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_FSCHER is not set # CONFIG_SENSORS_GL518SM is not set # CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_LM63 is not set # CONFIG_SENSORS_LM75 is not set # CONFIG_SENSORS_LM77 is not set # CONFIG_SENSORS_LM78 is not set # CONFIG_SENSORS_LM80 is not set # CONFIG_SENSORS_LM83 is not set # CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set # CONFIG_SENSORS_LM90 is not set # CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47B397 is not set # CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_W83781D is not set @@ -778,6 +829,7 @@ # CONFIG_FB=y CONFIG_FB_MODE_HELPERS=y +# CONFIG_FB_TILEBLITTING is not set # CONFIG_FB_CIRRUS is not set # CONFIG_FB_PM2 is not set # CONFIG_FB_CYBER2000 is not set @@ -790,8 +842,7 @@ CONFIG_FB_MATROX=y CONFIG_FB_MATROX_MILLENIUM=y CONFIG_FB_MATROX_MYSTIQUE=y -CONFIG_FB_MATROX_G450=y -CONFIG_FB_MATROX_G100=y +CONFIG_FB_MATROX_G=y # CONFIG_FB_MATROX_I2C is not set CONFIG_FB_MATROX_MULTIHEAD=y # CONFIG_FB_RADEON_OLD is not set @@ -800,6 +851,7 @@ # CONFIG_FB_RADEON_DEBUG is not set # CONFIG_FB_ATY128 is not set # CONFIG_FB_ATY is not set +# CONFIG_FB_SAVAGE is not set # CONFIG_FB_SIS is not set # CONFIG_FB_NEOMAGIC is not set # CONFIG_FB_KYRO is not set @@ -825,6 +877,11 @@ CONFIG_LOGO_LINUX_MONO=y CONFIG_LOGO_LINUX_VGA16=y CONFIG_LOGO_LINUX_CLUT224=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_BACKLIGHT_CLASS_DEVICE=m +CONFIG_BACKLIGHT_DEVICE=y +CONFIG_LCD_CLASS_DEVICE=m +CONFIG_LCD_DEVICE=y # # Sound @@ -844,6 +901,8 @@ # CONFIG_USB_BANDWIDTH is not set # CONFIG_USB_DYNAMIC_MINORS is not set # CONFIG_USB_OTG is not set +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y # # USB Host Controller Drivers @@ -853,6 +912,7 @@ # CONFIG_USB_EHCI_ROOT_HUB_TT is not set CONFIG_USB_OHCI_HCD=y # CONFIG_USB_UHCI_HCD is not set +# CONFIG_USB_SL811_HCD is not set # # USB Device Class drivers @@ -860,6 +920,10 @@ # CONFIG_USB_BLUETOOTH_TTY is not set # CONFIG_USB_ACM is not set # CONFIG_USB_PRINTER is not set + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# CONFIG_USB_STORAGE=y # CONFIG_USB_STORAGE_DEBUG is not set # CONFIG_USB_STORAGE_RW_DETECT is not set @@ -873,7 +937,7 @@ # CONFIG_USB_STORAGE_JUMPSHOT is not set # -# USB Human Interface Devices (HID) +# USB Input Devices # CONFIG_USB_HID=y CONFIG_USB_HIDINPUT=y @@ -893,7 +957,6 @@ # # CONFIG_USB_MDC800 is not set # CONFIG_USB_MICROTEK is not set -# CONFIG_USB_HPUSBSCSI is not set # # USB Multimedia devices @@ -905,7 +968,7 @@ # # -# USB Network adaptors +# USB Network Adapters # # CONFIG_USB_CATC is not set # CONFIG_USB_KAWETH is not set @@ -916,6 +979,7 @@ # # USB port drivers # +# CONFIG_USB_USS720 is not set # # USB Serial Converter support @@ -927,32 +991,51 @@ # # CONFIG_USB_EMI62 is not set # CONFIG_USB_EMI26 is not set -# CONFIG_USB_TIGL is not set # CONFIG_USB_AUERSWALD is not set # CONFIG_USB_RIO500 is not set # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set # CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set +# CONFIG_USB_IDMOUSE is not set # CONFIG_USB_TEST is not set # +# USB ATM/DSL drivers +# + +# # USB Gadget Support # # CONFIG_USB_GADGET is not set # +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# InfiniBand support +# +CONFIG_INFINIBAND=m +CONFIG_INFINIBAND_MTHCA=m +# CONFIG_INFINIBAND_MTHCA_DEBUG is not set +CONFIG_INFINIBAND_IPOIB=m +# CONFIG_INFINIBAND_IPOIB_DEBUG is not set + +# # File systems # CONFIG_EXT2_FS=y CONFIG_EXT2_FS_XATTR=y CONFIG_EXT2_FS_POSIX_ACL=y -# CONFIG_EXT2_FS_SECURITY is not set +CONFIG_EXT2_FS_SECURITY=y CONFIG_EXT3_FS=y CONFIG_EXT3_FS_XATTR=y CONFIG_EXT3_FS_POSIX_ACL=y -# CONFIG_EXT3_FS_SECURITY is not set +CONFIG_EXT3_FS_SECURITY=y CONFIG_JBD=y # CONFIG_JBD_DEBUG is not set CONFIG_FS_MBCACHE=y @@ -961,20 +1044,27 @@ # CONFIG_REISERFS_PROC_INFO is not set CONFIG_REISERFS_FS_XATTR=y CONFIG_REISERFS_FS_POSIX_ACL=y -# CONFIG_REISERFS_FS_SECURITY is not set +CONFIG_REISERFS_FS_SECURITY=y CONFIG_JFS_FS=m CONFIG_JFS_POSIX_ACL=y +CONFIG_JFS_SECURITY=y # CONFIG_JFS_DEBUG is not set # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y + +# +# XFS support +# CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y # CONFIG_XFS_RT is not set # CONFIG_XFS_QUOTA is not set -# CONFIG_XFS_SECURITY is not set +CONFIG_XFS_SECURITY=y CONFIG_XFS_POSIX_ACL=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=m # CONFIG_AUTOFS4_FS is not set @@ -982,8 +1072,9 @@ # CD-ROM/DVD Filesystems # CONFIG_ISO9660_FS=y -# CONFIG_JOLIET is not set -# CONFIG_ZISOFS is not set +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_ZISOFS_FS=y CONFIG_UDF_FS=m CONFIG_UDF_NLS=y @@ -1005,8 +1096,10 @@ CONFIG_SYSFS=y # CONFIG_DEVFS_FS is not set CONFIG_DEVPTS_FS_XATTR=y -# CONFIG_DEVPTS_FS_SECURITY is not set +CONFIG_DEVPTS_FS_SECURITY=y CONFIG_TMPFS=y +CONFIG_TMPFS_XATTR=y +CONFIG_TMPFS_SECURITY=y CONFIG_HUGETLBFS=y CONFIG_HUGETLB_PAGE=y CONFIG_RAMFS=y @@ -1035,13 +1128,13 @@ CONFIG_NFS_V3=y CONFIG_NFS_V4=y # CONFIG_NFS_DIRECTIO is not set -CONFIG_NFSD=m +CONFIG_NFSD=y CONFIG_NFSD_V3=y CONFIG_NFSD_V4=y CONFIG_NFSD_TCP=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m +CONFIG_EXPORTFS=y CONFIG_SUNRPC=y CONFIG_SUNRPC_GSS=y CONFIG_RPCSEC_GSS_KRB5=y @@ -1051,6 +1144,7 @@ # CONFIG_CIFS_STATS is not set CONFIG_CIFS_XATTR=y CONFIG_CIFS_POSIX=y +# CONFIG_CIFS_EXPERIMENTAL is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -1116,21 +1210,25 @@ # CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_INFO is not set +CONFIG_DEBUG_FS=y CONFIG_DEBUG_STACKOVERFLOW=y +# CONFIG_KPROBES is not set CONFIG_DEBUG_STACK_USAGE=y CONFIG_DEBUGGER=y CONFIG_XMON=y CONFIG_XMON_DEFAULT=y # CONFIG_PPCDBG is not set CONFIG_IRQSTACKS=y -# CONFIG_SCHEDSTATS is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -1144,7 +1242,7 @@ CONFIG_CRYPTO_SHA1=m CONFIG_CRYPTO_SHA256=m CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WHIRLPOOL=m +CONFIG_CRYPTO_WP512=m CONFIG_CRYPTO_DES=y CONFIG_CRYPTO_BLOWFISH=m CONFIG_CRYPTO_TWOFISH=m @@ -1155,10 +1253,15 @@ CONFIG_CRYPTO_TEA=m CONFIG_CRYPTO_ARC4=m CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_ANUBIS=m CONFIG_CRYPTO_DEFLATE=m CONFIG_CRYPTO_MICHAEL_MIC=m CONFIG_CRYPTO_CRC32C=m CONFIG_CRYPTO_TEST=m + +# +# Hardware crypto devices +# # # Library routines diff -Nru a/arch/ppc64/defconfig b/arch/ppc64/defconfig --- a/arch/ppc64/defconfig 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc64/defconfig 2005-03-07 14:54:16 -08:00 @@ -1,9 +1,12 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.11-rc3-bk6 +# Wed Feb 9 23:34:51 2005 # CONFIG_64BIT=y CONFIG_MMU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_ISA_DMA=y CONFIG_HAVE_DEC_LOCK=y CONFIG_EARLY_PRINTK=y @@ -16,27 +19,35 @@ # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y -CONFIG_STANDALONE=y +CONFIG_LOCK_KERNEL=y # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y CONFIG_LOG_BUF_SHIFT=17 CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set # # Loadable module support @@ -45,28 +56,40 @@ CONFIG_MODULE_UNLOAD=y # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y -# CONFIG_MODVERSIONS is not set -# CONFIG_KMOD is not set +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +CONFIG_KMOD=y CONFIG_STOP_MACHINE=y +CONFIG_SYSVIPC_COMPAT=y # # Platform support # # CONFIG_PPC_ISERIES is not set +CONFIG_PPC_MULTIPLATFORM=y CONFIG_PPC_PSERIES=y +CONFIG_PPC_PMAC=y +CONFIG_PPC_MAPLE=y CONFIG_PPC=y CONFIG_PPC64=y CONFIG_PPC_OF=y CONFIG_ALTIVEC=y -# CONFIG_PPC_PMAC is not set -# CONFIG_BOOTX_TEXT is not set +CONFIG_PPC_SPLPAR=y +CONFIG_IBMVIO=y +CONFIG_U3_DART=y +CONFIG_MPIC_BROKEN_U3=y +CONFIG_PPC_PMAC64=y +CONFIG_BOOTX_TEXT=y # CONFIG_POWER4_ONLY is not set -# CONFIG_IOMMU_VMERGE is not set +CONFIG_IOMMU_VMERGE=y CONFIG_SMP=y -CONFIG_IRQ_ALL_CPUS=y CONFIG_NR_CPUS=32 -# CONFIG_HMT is not set -# CONFIG_DISCONTIGMEM is not set +CONFIG_DISCONTIGMEM=y +# CONFIG_NUMA is not set +# CONFIG_SCHED_SMT is not set +# CONFIG_PREEMPT is not set +CONFIG_EEH=y +CONFIG_GENERIC_HARDIRQS=y CONFIG_PPC_RTAS=y CONFIG_RTAS_FLASH=m CONFIG_SCANLOG=m @@ -78,14 +101,19 @@ CONFIG_PCI=y CONFIG_PCI_DOMAINS=y CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_MISC is not set -CONFIG_PCI_LEGACY_PROC=y -CONFIG_PCI_NAMES=y +CONFIG_BINFMT_MISC=m +# CONFIG_PCI_LEGACY_PROC is not set +# CONFIG_PCI_NAMES is not set +CONFIG_HOTPLUG_CPU=y # -# PCMCIA/CardBus support +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# PC-card bridges # -# CONFIG_PCMCIA is not set # # PCI Hotplug Support @@ -93,7 +121,6 @@ CONFIG_HOTPLUG_PCI=m # CONFIG_HOTPLUG_PCI_FAKE is not set # CONFIG_HOTPLUG_PCI_CPCI is not set -# CONFIG_HOTPLUG_PCI_PCIE is not set # CONFIG_HOTPLUG_PCI_SHPC is not set CONFIG_HOTPLUG_PCI_RPA=m CONFIG_HOTPLUG_PCI_RPA_DLPAR=m @@ -107,7 +134,9 @@ # # Generic Driver Options # -CONFIG_FW_LOADER=m +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y # CONFIG_DEBUG_DRIVER is not set # @@ -118,7 +147,14 @@ # # Parallel port support # -# CONFIG_PARPORT is not set +CONFIG_PARPORT=m +CONFIG_PARPORT_PC=m +CONFIG_PARPORT_PC_CML1=m +# CONFIG_PARPORT_SERIAL is not set +# CONFIG_PARPORT_PC_FIFO is not set +# CONFIG_PARPORT_PC_SUPERIO is not set +# CONFIG_PARPORT_OTHER is not set +# CONFIG_PARPORT_1284 is not set # # Plug and Play support @@ -128,17 +164,32 @@ # Block devices # CONFIG_BLK_DEV_FD=y +# CONFIG_PARIDE is not set # CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_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_CARMEL is not set +# CONFIG_BLK_DEV_SX8 is not set +# CONFIG_BLK_DEV_UB is not set CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=65536 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set # # ATA/ATAPI/MFM/RLL support @@ -149,15 +200,14 @@ # # Please see Documentation/ide.txt for help/info on IDE drives # +# CONFIG_BLK_DEV_IDE_SATA is not set CONFIG_BLK_DEV_IDEDISK=y # CONFIG_IDEDISK_MULTI_MODE is not set -# CONFIG_IDEDISK_STROKE is not set CONFIG_BLK_DEV_IDECD=y # CONFIG_BLK_DEV_IDETAPE is not set # CONFIG_BLK_DEV_IDEFLOPPY is not set # CONFIG_BLK_DEV_IDESCSI is not set # CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set # # IDE chipset support/bugfixes @@ -173,7 +223,6 @@ # CONFIG_BLK_DEV_IDEDMA_FORCED is not set CONFIG_IDEDMA_PCI_AUTO=y # CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_ADMA=y # CONFIG_BLK_DEV_AEC62XX is not set # CONFIG_BLK_DEV_ALI15X3 is not set CONFIG_BLK_DEV_AMD74XX=y @@ -194,6 +243,11 @@ # CONFIG_BLK_DEV_SLC90E66 is not set # CONFIG_BLK_DEV_TRM290 is not set # CONFIG_BLK_DEV_VIA82CXXX is not set +CONFIG_BLK_DEV_IDE_PMAC=y +CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y +CONFIG_BLK_DEV_IDEDMA_PMAC=y +# CONFIG_BLK_DEV_IDE_PMAC_BLINK is not set +# CONFIG_IDE_ARM is not set CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set CONFIG_IDEDMA_AUTO=y @@ -219,7 +273,6 @@ # Some SCSI devices (e.g. CD jukebox) support multiple LUNs # CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_REPORT_LUNS=y CONFIG_SCSI_CONSTANTS=y # CONFIG_SCSI_LOGGING is not set @@ -228,33 +281,52 @@ # CONFIG_SCSI_SPI_ATTRS=y CONFIG_SCSI_FC_ATTRS=y +CONFIG_SCSI_ISCSI_ATTRS=m # # SCSI low-level drivers # # CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_SCSI_3W_9XXX is not set # CONFIG_SCSI_ACARD is not set # CONFIG_SCSI_AACRAID is not set # CONFIG_SCSI_AIC7XXX is not set # CONFIG_SCSI_AIC7XXX_OLD is not set # CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_ADVANSYS is not set -# CONFIG_SCSI_MEGARAID is not set -# CONFIG_SCSI_SATA is not set +# CONFIG_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_LEGACY is not set +CONFIG_SCSI_SATA=y +# CONFIG_SCSI_SATA_AHCI is not set +CONFIG_SCSI_SATA_SVW=y +# CONFIG_SCSI_ATA_PIIX is not set +# CONFIG_SCSI_SATA_NV is not set +# CONFIG_SCSI_SATA_PROMISE is not set +# CONFIG_SCSI_SATA_SX4 is not set +# CONFIG_SCSI_SATA_SIL is not set +# CONFIG_SCSI_SATA_SIS is not set +# CONFIG_SCSI_SATA_ULI is not set +# CONFIG_SCSI_SATA_VIA is not set +# CONFIG_SCSI_SATA_VITESSE is not set # CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_CPQFCTS is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_EATA is not set # CONFIG_SCSI_EATA_PIO is not set # CONFIG_SCSI_FUTURE_DOMAIN is not set # CONFIG_SCSI_GDTH is not set # CONFIG_SCSI_IPS is not set +CONFIG_SCSI_IBMVSCSI=y +# CONFIG_SCSI_INITIO is not set # CONFIG_SCSI_INIA100 is not set +# CONFIG_SCSI_PPA is not set +# CONFIG_SCSI_IMM is not set CONFIG_SCSI_SYM53C8XX_2=y CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0 CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 # CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set +CONFIG_SCSI_IPR=y +CONFIG_SCSI_IPR_TRACE=y +CONFIG_SCSI_IPR_DUMP=y # CONFIG_SCSI_QLOGIC_ISP is not set # CONFIG_SCSI_QLOGIC_FC is not set # CONFIG_SCSI_QLOGIC_1280 is not set @@ -264,10 +336,9 @@ CONFIG_SCSI_QLA2300=m CONFIG_SCSI_QLA2322=m CONFIG_SCSI_QLA6312=m -CONFIG_SCSI_QLA6322=m # CONFIG_SCSI_DC395x is not set # CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_DEBUG is not set +CONFIG_SCSI_DEBUG=m # # Multi-device support (RAID and LVM) @@ -277,11 +348,16 @@ CONFIG_MD_LINEAR=y CONFIG_MD_RAID0=y CONFIG_MD_RAID1=y +CONFIG_MD_RAID10=y CONFIG_MD_RAID5=y -CONFIG_MD_RAID6=y -# CONFIG_MD_MULTIPATH is not set +CONFIG_MD_RAID6=m +CONFIG_MD_MULTIPATH=m +CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=y CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_MIRROR=m +CONFIG_DM_ZERO=m # # Fusion MPT device support @@ -291,15 +367,48 @@ # # IEEE 1394 (FireWire) support # -# CONFIG_IEEE1394 is not set +CONFIG_IEEE1394=y + +# +# Subsystem Options +# +# CONFIG_IEEE1394_VERBOSEDEBUG is not set +# CONFIG_IEEE1394_OUI_DB is not set +CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y +CONFIG_IEEE1394_CONFIG_ROM_IP1394=y + +# +# Device Drivers +# +# CONFIG_IEEE1394_PCILYNX is not set +CONFIG_IEEE1394_OHCI1394=y + +# +# Protocol Drivers +# +CONFIG_IEEE1394_VIDEO1394=m +CONFIG_IEEE1394_SBP2=m +# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set +CONFIG_IEEE1394_ETH1394=m +CONFIG_IEEE1394_DV1394=m +CONFIG_IEEE1394_RAWIO=y +CONFIG_IEEE1394_CMP=m +CONFIG_IEEE1394_AMDTP=m # # I2O device support # +# CONFIG_I2O is not set # # Macintosh device drivers # +CONFIG_ADB=y +CONFIG_ADB_PMU=y +# CONFIG_PMAC_PBOOK is not set +# CONFIG_PMAC_BACKLIGHT is not set +# CONFIG_INPUT_ADBHID is not set +CONFIG_THERM_PM72=y # # Networking support @@ -322,19 +431,19 @@ # CONFIG_NET_IPGRE is not set # CONFIG_IP_MROUTE is not set # CONFIG_ARPD is not set -CONFIG_INET_ECN=y CONFIG_SYN_COOKIES=y CONFIG_INET_AH=m CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m +CONFIG_INET_TUNNEL=y +# CONFIG_IP_TCPDIAG is not set +# CONFIG_IP_TCPDIAG_IPV6 is not set # # IP: Virtual Server Configuration # # CONFIG_IP_VS is not set # CONFIG_IPV6 is not set -# CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set @@ -342,6 +451,9 @@ # IP: Netfilter Configuration # CONFIG_IP_NF_CONNTRACK=m +CONFIG_IP_NF_CT_ACCT=y +CONFIG_IP_NF_CONNTRACK_MARK=y +CONFIG_IP_NF_CT_PROTO_SCTP=m CONFIG_IP_NF_FTP=m CONFIG_IP_NF_IRC=m CONFIG_IP_NF_TFTP=m @@ -366,8 +478,17 @@ CONFIG_IP_NF_MATCH_STATE=m CONFIG_IP_NF_MATCH_CONNTRACK=m CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_REALM=m +CONFIG_IP_NF_MATCH_SCTP=m +CONFIG_IP_NF_MATCH_COMMENT=m +CONFIG_IP_NF_MATCH_CONNMARK=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m CONFIG_IP_NF_FILTER=m CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TARGET_TCPMSS=m CONFIG_IP_NF_NAT=m CONFIG_IP_NF_NAT_NEEDED=y CONFIG_IP_NF_TARGET_MASQUERADE=m @@ -385,24 +506,24 @@ CONFIG_IP_NF_TARGET_DSCP=m CONFIG_IP_NF_TARGET_MARK=m CONFIG_IP_NF_TARGET_CLASSIFY=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m +CONFIG_IP_NF_TARGET_CONNMARK=m +CONFIG_IP_NF_TARGET_CLUSTERIP=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_TARGET_NOTRACK=m CONFIG_IP_NF_ARPTABLES=m CONFIG_IP_NF_ARPFILTER=m CONFIG_IP_NF_ARP_MANGLE=m -CONFIG_IP_NF_COMPAT_IPCHAINS=m -CONFIG_IP_NF_COMPAT_IPFWADM=m CONFIG_XFRM=y CONFIG_XFRM_USER=m # # SCTP Configuration (EXPERIMENTAL) # -CONFIG_IPV6_SCTP__=y # CONFIG_IP_SCTP is not set # CONFIG_ATM is not set +# CONFIG_BRIDGE is not set # CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set CONFIG_LLC=y # CONFIG_LLC2 is not set # CONFIG_IPX is not set @@ -412,36 +533,42 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +CONFIG_NET_CLS_ROUTE=y # # Network testing # # CONFIG_NET_PKTGEN is not set +CONFIG_NETPOLL=y +CONFIG_NETPOLL_RX=y +CONFIG_NETPOLL_TRAP=y +CONFIG_NET_POLL_CONTROLLER=y +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set CONFIG_NETDEVICES=y +CONFIG_DUMMY=m +CONFIG_BONDING=m +# CONFIG_EQUALIZER is not set +CONFIG_TUN=m # # ARCnet devices # # CONFIG_ARCNET is not set -CONFIG_DUMMY=m -CONFIG_BONDING=m -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m # # Ethernet (10 or 100Mbit) # CONFIG_NET_ETHERNET=y CONFIG_MII=y -# CONFIG_OAKNET is not set # CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set +CONFIG_SUNGEM=y CONFIG_NET_VENDOR_3COM=y CONFIG_VORTEX=y # CONFIG_TYPHOON is not set @@ -451,6 +578,7 @@ # # CONFIG_NET_TULIP is not set # CONFIG_HP100 is not set +CONFIG_IBMVETH=m CONFIG_NET_PCI=y CONFIG_PCNET32=y # CONFIG_AMD8111_ETH is not set @@ -483,8 +611,8 @@ # CONFIG_HAMACHI is not set # CONFIG_YELLOWFIN is not set # CONFIG_R8169 is not set -# CONFIG_SIS190 is not set # CONFIG_SK98LIN is not set +# CONFIG_VIA_VELOCITY is not set CONFIG_TIGON3=y # @@ -492,59 +620,40 @@ # CONFIG_IXGB=m # CONFIG_IXGB_NAPI is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -CONFIG_IBMVETH=m -CONFIG_PPP=m -# CONFIG_PPP_MULTILINK is not set -# CONFIG_PPP_FILTER is not set -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPPOE=m -# CONFIG_SLIP is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set +# CONFIG_S2IO is not set # # Token Ring devices # CONFIG_TR=y CONFIG_IBMOL=y -# CONFIG_IBMLS is not set # CONFIG_3C359 is not set # CONFIG_TMS380TR is not set -# CONFIG_NET_FC is not set -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=y - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set # -# IrDA (infrared) support +# Wireless LAN (non-hamradio) # -# CONFIG_IRDA is not set +# CONFIG_NET_RADIO is not set # -# Bluetooth support +# Wan interfaces # -# CONFIG_BT is not set -CONFIG_NETPOLL=y -CONFIG_NETPOLL_RX=y -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y +# CONFIG_WAN is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PLIP is not set +CONFIG_PPP=m +# CONFIG_PPP_MULTILINK is not set +# CONFIG_PPP_FILTER is not set +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPPOE=m +# CONFIG_SLIP is not set +# CONFIG_NET_FC is not set +# CONFIG_SHAPER is not set +CONFIG_NETCONSOLE=y # # ISDN subsystem @@ -565,12 +674,12 @@ # Userland interfaces # CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # CONFIG_INPUT_JOYDEV is not set # CONFIG_INPUT_TSDEV is not set -# CONFIG_INPUT_EVDEV is not set +CONFIG_INPUT_EVDEV=m # CONFIG_INPUT_EVBUG is not set # @@ -582,7 +691,10 @@ CONFIG_SERIO_I8042=y # CONFIG_SERIO_SERPORT is not set # CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_PARKBD is not set # CONFIG_SERIO_PCIPS2 is not set +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set # # Input Device Drivers @@ -590,15 +702,17 @@ CONFIG_INPUT_KEYBOARD=y CONFIG_KEYBOARD_ATKBD=y # CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set # CONFIG_KEYBOARD_XTKBD is not set # CONFIG_KEYBOARD_NEWTON is not set CONFIG_INPUT_MOUSE=y CONFIG_MOUSE_PS2=y # CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_VSXXXAA is not set # CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_TOUCHSCREEN is not set CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=y +CONFIG_INPUT_PCSPKR=m # CONFIG_INPUT_UINPUT is not set # @@ -623,16 +737,16 @@ CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y # CONFIG_SERIAL_PMACZILOG is not set +CONFIG_SERIAL_ICOM=m CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 +CONFIG_PRINTER=m +# CONFIG_LP_CONSOLE is not set +# CONFIG_PPDEV is not set +# CONFIG_TIPAR is not set CONFIG_HVC_CONSOLE=y - -# -# Mice -# -# CONFIG_BUSMOUSE is not set -# CONFIG_QIC02_TAPE is not set +CONFIG_HVCS=m # # IPMI @@ -652,7 +766,6 @@ # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set CONFIG_RAW_DRIVER=y CONFIG_MAX_RAW_DEVS=256 @@ -661,25 +774,30 @@ # I2C support # CONFIG_I2C=y -# CONFIG_I2C_CHARDEV is not set +CONFIG_I2C_CHARDEV=y # # I2C Algorithms # CONFIG_I2C_ALGOBIT=y # CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set # # I2C Hardware Bus support # # CONFIG_I2C_ALI1535 is not set +# CONFIG_I2C_ALI1563 is not set # CONFIG_I2C_ALI15X3 is not set # CONFIG_I2C_AMD756 is not set -# CONFIG_I2C_AMD8111 is not set +CONFIG_I2C_AMD8111=y # CONFIG_I2C_I801 is not set # CONFIG_I2C_I810 is not set # CONFIG_I2C_ISA is not set +CONFIG_I2C_KEYWEST=y +# CONFIG_I2C_MPC is not set # CONFIG_I2C_NFORCE2 is not set +# CONFIG_I2C_PARPORT is not set # CONFIG_I2C_PARPORT_LIGHT is not set # CONFIG_I2C_PROSAVAGE is not set # CONFIG_I2C_SAVAGE4 is not set @@ -687,33 +805,61 @@ # CONFIG_I2C_SIS5595 is not set # CONFIG_I2C_SIS630 is not set # CONFIG_I2C_SIS96X is not set +# CONFIG_I2C_STUB is not set # CONFIG_I2C_VIA is not set # CONFIG_I2C_VIAPRO is not set # CONFIG_I2C_VOODOO3 is not set +# CONFIG_I2C_PCA_ISA is not set # -# I2C Hardware Sensors Chip support +# Hardware Sensors Chip support # # CONFIG_I2C_SENSOR is not set # CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1031 is not set # CONFIG_SENSORS_ASB100 is not set -# CONFIG_SENSORS_EEPROM is not set +# CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_FSCHER is not set # CONFIG_SENSORS_GL518SM is not set # CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_LM63 is not set # CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set # CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set # CONFIG_SENSORS_LM83 is not set # CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set # CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_W83781D is not set # CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83627HF is not set + +# +# Other I2C Chip support +# +# CONFIG_SENSORS_EEPROM is not set +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_RTC8564 is not set # CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set # CONFIG_I2C_DEBUG_BUS is not set # CONFIG_I2C_DEBUG_CHIP is not set # +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# # Misc devices # @@ -731,20 +877,28 @@ # Graphics support # CONFIG_FB=y +CONFIG_FB_MODE_HELPERS=y +CONFIG_FB_TILEBLITTING=y +# CONFIG_FB_CIRRUS is not set # CONFIG_FB_PM2 is not set # CONFIG_FB_CYBER2000 is not set CONFIG_FB_OF=y +# CONFIG_FB_CONTROL is not set +# CONFIG_FB_PLATINUM is not set +# CONFIG_FB_VALKYRIE is not set # CONFIG_FB_CT65550 is not set +# CONFIG_FB_ASILIANT is not set # CONFIG_FB_IMSTT is not set -# CONFIG_FB_S3TRIO is not set # CONFIG_FB_VGA16 is not set -# CONFIG_FB_RIVA is not set +CONFIG_FB_RIVA=y +CONFIG_FB_RIVA_I2C=y +# CONFIG_FB_RIVA_DEBUG is not set CONFIG_FB_MATROX=y CONFIG_FB_MATROX_MILLENIUM=y CONFIG_FB_MATROX_MYSTIQUE=y -CONFIG_FB_MATROX_G450=y -CONFIG_FB_MATROX_G100=y -# CONFIG_FB_MATROX_I2C is not set +CONFIG_FB_MATROX_G=y +CONFIG_FB_MATROX_I2C=m +CONFIG_FB_MATROX_MAVEN=m CONFIG_FB_MATROX_MULTIHEAD=y # CONFIG_FB_RADEON_OLD is not set CONFIG_FB_RADEON=y @@ -752,6 +906,7 @@ # CONFIG_FB_RADEON_DEBUG is not set # CONFIG_FB_ATY128 is not set # CONFIG_FB_ATY is not set +# CONFIG_FB_SAVAGE is not set # CONFIG_FB_SIS is not set # CONFIG_FB_NEOMAGIC is not set # CONFIG_FB_KYRO is not set @@ -764,10 +919,8 @@ # Console display driver support # # CONFIG_VGA_CONSOLE is not set -# CONFIG_MDA_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_PCI_CONSOLE=y # CONFIG_FONTS is not set CONFIG_FONT_8x8=y CONFIG_FONT_8x16=y @@ -779,6 +932,11 @@ CONFIG_LOGO_LINUX_MONO=y CONFIG_LOGO_LINUX_VGA16=y CONFIG_LOGO_LINUX_CLUT224=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_BACKLIGHT_DEVICE=y +CONFIG_LCD_CLASS_DEVICE=y +CONFIG_LCD_DEVICE=y # # Sound @@ -797,13 +955,19 @@ CONFIG_USB_DEVICEFS=y # CONFIG_USB_BANDWIDTH is not set # CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_OTG is not set +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y # # USB Host Controller Drivers # CONFIG_USB_EHCI_HCD=y +# CONFIG_USB_EHCI_SPLIT_ISO is not set +# CONFIG_USB_EHCI_ROOT_HUB_TT is not set CONFIG_USB_OHCI_HCD=y # CONFIG_USB_UHCI_HCD is not set +# CONFIG_USB_SL811_HCD is not set # # USB Device Class drivers @@ -811,8 +975,13 @@ # CONFIG_USB_BLUETOOTH_TTY is not set # CONFIG_USB_ACM is not set # CONFIG_USB_PRINTER is not set -CONFIG_USB_STORAGE=y + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# +CONFIG_USB_STORAGE=m # CONFIG_USB_STORAGE_DEBUG is not set +CONFIG_USB_STORAGE_RW_DETECT=y # CONFIG_USB_STORAGE_DATAFAB is not set # CONFIG_USB_STORAGE_FREECOM is not set # CONFIG_USB_STORAGE_ISD200 is not set @@ -823,7 +992,7 @@ # CONFIG_USB_STORAGE_JUMPSHOT is not set # -# USB Human Interface Devices (HID) +# USB Input Devices # CONFIG_USB_HID=y CONFIG_USB_HIDINPUT=y @@ -833,14 +1002,16 @@ # CONFIG_USB_WACOM is not set # CONFIG_USB_KBTAB is not set # CONFIG_USB_POWERMATE is not set +# CONFIG_USB_MTOUCH is not set +# CONFIG_USB_EGALAX is not set # CONFIG_USB_XPAD is not set +# CONFIG_USB_ATI_REMOTE is not set # # USB Imaging devices # # CONFIG_USB_MDC800 is not set # CONFIG_USB_MICROTEK is not set -# CONFIG_USB_HPUSBSCSI is not set # # USB Multimedia devices @@ -852,17 +1023,18 @@ # # -# USB Network adaptors +# USB Network Adapters # # CONFIG_USB_CATC is not set # CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set +CONFIG_USB_PEGASUS=y # CONFIG_USB_RTL8150 is not set # CONFIG_USB_USBNET is not set # # USB port drivers # +# CONFIG_USB_USS720 is not set # # USB Serial Converter support @@ -874,50 +1046,81 @@ # # CONFIG_USB_EMI62 is not set # CONFIG_USB_EMI26 is not set -# CONFIG_USB_TIGL is not set # CONFIG_USB_AUERSWALD is not set # CONFIG_USB_RIO500 is not set # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGETKIT is not set +# CONFIG_USB_PHIDGETSERVO is not set +# CONFIG_USB_IDMOUSE is not set # CONFIG_USB_TEST is not set # +# USB ATM/DSL drivers +# + +# # USB Gadget Support # # CONFIG_USB_GADGET is not set # +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# InfiniBand support +# +CONFIG_INFINIBAND=m +CONFIG_INFINIBAND_MTHCA=m +# CONFIG_INFINIBAND_MTHCA_DEBUG is not set +CONFIG_INFINIBAND_IPOIB=m +# CONFIG_INFINIBAND_IPOIB_DEBUG is not set + +# # File systems # CONFIG_EXT2_FS=y CONFIG_EXT2_FS_XATTR=y CONFIG_EXT2_FS_POSIX_ACL=y -# CONFIG_EXT2_FS_SECURITY is not set +CONFIG_EXT2_FS_SECURITY=y CONFIG_EXT3_FS=y CONFIG_EXT3_FS_XATTR=y CONFIG_EXT3_FS_POSIX_ACL=y -# CONFIG_EXT3_FS_SECURITY is not set +CONFIG_EXT3_FS_SECURITY=y CONFIG_JBD=y # CONFIG_JBD_DEBUG is not set CONFIG_FS_MBCACHE=y CONFIG_REISERFS_FS=y # CONFIG_REISERFS_CHECK is not set # CONFIG_REISERFS_PROC_INFO is not set +CONFIG_REISERFS_FS_XATTR=y +CONFIG_REISERFS_FS_POSIX_ACL=y +CONFIG_REISERFS_FS_SECURITY=y CONFIG_JFS_FS=y CONFIG_JFS_POSIX_ACL=y +CONFIG_JFS_SECURITY=y # CONFIG_JFS_DEBUG is not set # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y + +# +# XFS support +# CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y # CONFIG_XFS_RT is not set # CONFIG_XFS_QUOTA is not set -# CONFIG_XFS_SECURITY is not set +CONFIG_XFS_SECURITY=y CONFIG_XFS_POSIX_ACL=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set -CONFIG_AUTOFS_FS=m +CONFIG_DNOTIFY=y +CONFIG_AUTOFS_FS=y # CONFIG_AUTOFS4_FS is not set # @@ -927,6 +1130,7 @@ # CONFIG_JOLIET is not set # CONFIG_ZISOFS is not set CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y # # DOS/FAT/NT Filesystems @@ -934,6 +1138,8 @@ CONFIG_FAT_FS=y CONFIG_MSDOS_FS=y CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" # CONFIG_NTFS_FS is not set # @@ -941,10 +1147,13 @@ # CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y # CONFIG_DEVFS_FS is not set CONFIG_DEVPTS_FS_XATTR=y -# CONFIG_DEVPTS_FS_SECURITY is not set +CONFIG_DEVPTS_FS_SECURITY=y CONFIG_TMPFS=y +CONFIG_TMPFS_XATTR=y +CONFIG_TMPFS_SECURITY=y CONFIG_HUGETLBFS=y CONFIG_HUGETLB_PAGE=y CONFIG_RAMFS=y @@ -954,8 +1163,8 @@ # # CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set +CONFIG_HFS_FS=m +CONFIG_HFSPLUS_FS=m # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set @@ -973,18 +1182,23 @@ CONFIG_NFS_V3=y CONFIG_NFS_V4=y # CONFIG_NFS_DIRECTIO is not set -CONFIG_NFSD=y +CONFIG_NFSD=m CONFIG_NFSD_V3=y CONFIG_NFSD_V4=y CONFIG_NFSD_TCP=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=y +CONFIG_EXPORTFS=m CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m +CONFIG_SUNRPC_GSS=y +CONFIG_RPCSEC_GSS_KRB5=y +CONFIG_RPCSEC_GSS_SPKM3=m # CONFIG_SMB_FS is not set CONFIG_CIFS=m +# CONFIG_CIFS_STATS is not set +CONFIG_CIFS_XATTR=y +CONFIG_CIFS_POSIX=y +# CONFIG_CIFS_EXPERIMENTAL is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -992,51 +1206,66 @@ # # Partition Types # -# CONFIG_PARTITION_ADVANCED is not set +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +CONFIG_MAC_PARTITION=y CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_EFI_PARTITION is not set # # Native Language Support # CONFIG_NLS=y CONFIG_NLS_DEFAULT="iso8859-1" -# CONFIG_NLS_CODEPAGE_437 is not set -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_950 is not set -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -# CONFIG_NLS_ISO8859_1 is not set -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_UTF8 is not set +CONFIG_NLS_CODEPAGE_437=m +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=m +CONFIG_NLS_ISO8859_1=m +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_NLS_UTF8=m # # Profiling support @@ -1048,19 +1277,26 @@ # Kernel hacking # CONFIG_DEBUG_KERNEL=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set +# CONFIG_DEBUG_INFO is not set +CONFIG_DEBUG_FS=y CONFIG_DEBUG_STACKOVERFLOW=y +# CONFIG_KPROBES is not set CONFIG_DEBUG_STACK_USAGE=y -# CONFIG_DEBUG_SLAB is not set -CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUGGER=y CONFIG_XMON=y -CONFIG_XMON_DEFAULT=y +# CONFIG_XMON_DEFAULT is not set # CONFIG_PPCDBG is not set -# CONFIG_DEBUG_INFO is not set +CONFIG_IRQSTACKS=y # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -1070,24 +1306,36 @@ CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_NULL=m CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_SHA1=m CONFIG_CRYPTO_SHA256=m CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_DES=m +CONFIG_CRYPTO_WP512=m +CONFIG_CRYPTO_DES=y CONFIG_CRYPTO_BLOWFISH=m CONFIG_CRYPTO_TWOFISH=m CONFIG_CRYPTO_SERPENT=m CONFIG_CRYPTO_AES=m CONFIG_CRYPTO_CAST5=m CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_TEA=m CONFIG_CRYPTO_ARC4=m +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_ANUBIS=m CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_MICHAEL_MIC=m +CONFIG_CRYPTO_CRC32C=m CONFIG_CRYPTO_TEST=m # +# Hardware crypto devices +# + +# # Library routines # +CONFIG_CRC_CCITT=m CONFIG_CRC32=y +CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=m diff -Nru a/arch/ppc64/kernel/LparData.c b/arch/ppc64/kernel/LparData.c --- a/arch/ppc64/kernel/LparData.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc64/kernel/LparData.c 2005-03-07 14:54:16 -08:00 @@ -45,7 +45,7 @@ .xSize = sizeof(struct HvReleaseData), .xVpdAreasPtrOffset = offsetof(struct naca_struct, xItVpdAreas), .xSlicNacaAddr = &naca, /* 64-bit Naca address */ - .xMsNucDataOffset = 0x6000, /* offset of LparMap within loadarea (see head.S) */ + .xMsNucDataOffset = 0x4800, /* offset of LparMap within loadarea (see head.S) */ .xTagsMode = 1, /* tags inactive */ .xAddressSize = 0, /* 64 bit */ .xNoSharedProcs = 0, /* shared processors */ @@ -224,6 +224,7 @@ }; struct msChunks msChunks; +EXPORT_SYMBOL(msChunks); /* Depending on whether this is called from iSeries or pSeries setup * code, the location of the msChunks struct may or may not have diff -Nru a/arch/ppc64/kernel/Makefile b/arch/ppc64/kernel/Makefile --- a/arch/ppc64/kernel/Makefile 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/kernel/Makefile 2005-03-07 14:54:18 -08:00 @@ -11,7 +11,8 @@ udbg.o binfmt_elf32.o sys_ppc32.o ioctl32.o \ ptrace32.o signal32.o rtc.o init_task.o \ lmb.o cputable.o cpu_setup_power4.o idle_power4.o \ - iommu.o sysfs.o + iommu.o sysfs.o vdso.o pmc.o +obj-y += vdso32/ vdso64/ obj-$(CONFIG_PPC_OF) += of_device.o diff -Nru a/arch/ppc64/kernel/align.c b/arch/ppc64/kernel/align.c --- a/arch/ppc64/kernel/align.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/kernel/align.c 2005-03-07 14:54:18 -08:00 @@ -238,7 +238,7 @@ dsisr = regs->dsisr; - if (cur_cpu_spec->cpu_features & CPU_FTR_NODSISRALIGN) { + if (cpu_has_feature(CPU_FTR_NODSISRALIGN)) { unsigned int real_instr; if (__get_user(real_instr, (unsigned int __user *)regs->nip)) return 0; diff -Nru a/arch/ppc64/kernel/asm-offsets.c b/arch/ppc64/kernel/asm-offsets.c --- a/arch/ppc64/kernel/asm-offsets.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/kernel/asm-offsets.c 2005-03-07 14:54:17 -08:00 @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -35,6 +36,8 @@ #include #include #include +#include +#include #define DEFINE(sym, val) \ asm volatile("\n->" #sym " %0 " #val : : "i" (val)) @@ -166,6 +169,25 @@ DEFINE(CPU_SPEC_PVR_VALUE, offsetof(struct cpu_spec, pvr_value)); DEFINE(CPU_SPEC_FEATURES, offsetof(struct cpu_spec, cpu_features)); DEFINE(CPU_SPEC_SETUP, offsetof(struct cpu_spec, cpu_setup)); + + /* systemcfg offsets for use by vdso */ + DEFINE(CFG_TB_ORIG_STAMP, offsetof(struct systemcfg, tb_orig_stamp)); + DEFINE(CFG_TB_TICKS_PER_SEC, offsetof(struct systemcfg, tb_ticks_per_sec)); + DEFINE(CFG_TB_TO_XS, offsetof(struct systemcfg, tb_to_xs)); + DEFINE(CFG_STAMP_XSEC, offsetof(struct systemcfg, stamp_xsec)); + DEFINE(CFG_TB_UPDATE_COUNT, offsetof(struct systemcfg, tb_update_count)); + DEFINE(CFG_TZ_MINUTEWEST, offsetof(struct systemcfg, tz_minuteswest)); + DEFINE(CFG_TZ_DSTTIME, offsetof(struct systemcfg, tz_dsttime)); + DEFINE(CFG_SYSCALL_MAP32, offsetof(struct systemcfg, syscall_map_32)); + DEFINE(CFG_SYSCALL_MAP64, offsetof(struct systemcfg, syscall_map_64)); + + /* timeval/timezone offsets for use by vdso */ + DEFINE(TVAL64_TV_SEC, offsetof(struct timeval, tv_sec)); + DEFINE(TVAL64_TV_USEC, offsetof(struct timeval, tv_usec)); + DEFINE(TVAL32_TV_SEC, offsetof(struct compat_timeval, tv_sec)); + DEFINE(TVAL32_TV_USEC, offsetof(struct compat_timeval, tv_usec)); + DEFINE(TZONE_TZ_MINWEST, offsetof(struct timezone, tz_minuteswest)); + DEFINE(TZONE_TZ_DSTTIME, offsetof(struct timezone, tz_dsttime)); return 0; } diff -Nru a/arch/ppc64/kernel/cputable.c b/arch/ppc64/kernel/cputable.c --- a/arch/ppc64/kernel/cputable.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc64/kernel/cputable.c 2005-03-07 14:54:16 -08:00 @@ -17,9 +17,12 @@ #include #include #include +#include + #include struct cpu_spec* cur_cpu_spec = NULL; +EXPORT_SYMBOL(cur_cpu_spec); /* NOTE: * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's diff -Nru a/arch/ppc64/kernel/head.S b/arch/ppc64/kernel/head.S --- a/arch/ppc64/kernel/head.S 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/kernel/head.S 2005-03-07 14:54:17 -08:00 @@ -54,7 +54,6 @@ * 0x0100 - 0x2fff : pSeries Interrupt prologs * 0x3000 - 0x3fff : Interrupt support * 0x4000 - 0x4fff : NACA - * 0x5000 - 0x5fff : SystemCfg * 0x6000 : iSeries and common interrupt prologs * 0x9000 - 0x9fff : Initial segment table */ @@ -517,16 +516,7 @@ .globl naca naca: .llong itVpdAreas -#endif - - . = SYSTEMCFG_PHYS_ADDR - .globl __start_systemcfg -__start_systemcfg: - . = (SYSTEMCFG_PHYS_ADDR + PAGE_SIZE) - .globl __end_systemcfg -__end_systemcfg: -#ifdef CONFIG_PPC_ISERIES /* * The iSeries LPAR map is at this fixed address * so that the HvReleaseData structure can address @@ -536,6 +526,8 @@ * VSID generation algorithm. See include/asm/mmu_context.h. */ + . = 0x4800 + .llong 2 /* # ESIDs to be mapped by hypervisor */ .llong 1 /* # memory ranges to be mapped by hypervisor */ .llong STAB0_PAGE /* Page # of segment table within load area */ @@ -1264,10 +1256,6 @@ addi r2,r2,0x4000 addi r2,r2,0x4000 - LOADADDR(r9,systemcfg) - SET_REG_TO_CONST(r4, SYSTEMCFG_VIRT_ADDR) - std r4,0(r9) /* set the systemcfg pointer */ - bl .iSeries_early_setup /* relocation is on at this point */ @@ -1772,7 +1760,7 @@ sc /* HvCall_setASR */ #else /* set the ASR */ - li r3,SYSTEMCFG_PHYS_ADDR /* r3 = ptr to systemcfg */ + ld r3,systemcfg@got(r2) /* r3 = ptr to systemcfg */ lwz r3,PLATFORM(r3) /* r3 = platform flags */ cmpldi r3,PLATFORM_PSERIES_LPAR bne 98f @@ -1861,12 +1849,6 @@ ori r6,r6,MSR_RI mtmsrd r6 /* RI on */ - /* setup the systemcfg pointer which is needed by *tab_initialize */ - LOADADDR(r6,systemcfg) - sub r6,r6,r26 /* addr of the variable systemcfg */ - li r27,SYSTEMCFG_PHYS_ADDR - std r27,0(r6) /* set the value of systemcfg */ - #ifdef CONFIG_HMT /* Start up the second thread on cpu 0 */ mfspr r3,PVR @@ -1941,7 +1923,7 @@ /* set the ASR */ ld r3,PACASTABREAL(r13) ori r4,r3,1 /* turn on valid bit */ - li r3,SYSTEMCFG_PHYS_ADDR /* r3 = ptr to systemcfg */ + ld r3,systemcfg@got(r2) /* r3 = ptr to systemcfg */ lwz r3,PLATFORM(r3) /* r3 = platform flags */ cmpldi r3,PLATFORM_PSERIES_LPAR bne 98f @@ -1960,7 +1942,7 @@ mtasr r4 /* set the stab location */ 99: /* Set SDR1 (hash table pointer) */ - li r3,SYSTEMCFG_PHYS_ADDR /* r3 = ptr to systemcfg */ + ld r3,systemcfg@got(r2) /* r3 = ptr to systemcfg */ lwz r3,PLATFORM(r3) /* r3 = platform flags */ /* Test if bit 0 is set (LPAR bit) */ andi. r3,r3,0x1 @@ -1997,11 +1979,6 @@ */ li r3,0 bl .do_cpu_ftr_fixups - - /* setup the systemcfg pointer */ - LOADADDR(r9,systemcfg) - SET_REG_TO_CONST(r8, SYSTEMCFG_VIRT_ADDR) - std r8,0(r9) LOADADDR(r26, boot_cpuid) lwz r26,0(r26) diff -Nru a/arch/ppc64/kernel/iSeries_setup.c b/arch/ppc64/kernel/iSeries_setup.c --- a/arch/ppc64/kernel/iSeries_setup.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/kernel/iSeries_setup.c 2005-03-07 14:54:17 -08:00 @@ -267,7 +267,7 @@ unsigned long i; unsigned long mem_blocks = 0; - if (cur_cpu_spec->cpu_features & CPU_FTR_SLB) + if (cpu_has_feature(CPU_FTR_SLB)) mem_blocks = iSeries_process_Regatta_mainstore_vpd(mb_array, max_entries); else diff -Nru a/arch/ppc64/kernel/idle.c b/arch/ppc64/kernel/idle.c --- a/arch/ppc64/kernel/idle.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/kernel/idle.c 2005-03-07 14:54:17 -08:00 @@ -293,6 +293,10 @@ power4_idle(); if (need_resched()) schedule(); + + if (cpu_is_offline(_smp_processor_id()) && + system_state == SYSTEM_RUNNING) + cpu_die(); } return 0; } diff -Nru a/arch/ppc64/kernel/irq.c b/arch/ppc64/kernel/irq.c --- a/arch/ppc64/kernel/irq.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/kernel/irq.c 2005-03-07 14:54:17 -08:00 @@ -61,6 +61,7 @@ #endif extern irq_desc_t irq_desc[NR_IRQS]; +EXPORT_SYMBOL(irq_desc); int distribute_irqs = 1; int __irq_offset_value; @@ -114,6 +115,35 @@ seq_printf(p, "BAD: %10u\n", ppc_spurious_interrupts); return 0; } + +#ifdef CONFIG_HOTPLUG_CPU +void fixup_irqs(cpumask_t map) +{ + unsigned int irq; + static int warned; + + for_each_irq(irq) { + cpumask_t mask; + + if (irq_desc[irq].status & IRQ_PER_CPU) + continue; + + cpus_and(mask, irq_affinity[irq], map); + if (any_online_cpu(mask) == NR_CPUS) { + printk("Breaking affinity for irq %i\n", irq); + mask = map; + } + if (irq_desc[irq].handler->set_affinity) + irq_desc[irq].handler->set_affinity(irq, mask); + else if (irq_desc[irq].action && !(warned++)) + printk("Cannot set affinity for irq %i\n", irq); + } + + local_irq_enable(); + mdelay(1); + local_irq_disable(); +} +#endif extern int noirqdebug; diff -Nru a/arch/ppc64/kernel/lparcfg.c b/arch/ppc64/kernel/lparcfg.c --- a/arch/ppc64/kernel/lparcfg.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc64/kernel/lparcfg.c 2005-03-07 14:54:16 -08:00 @@ -33,8 +33,9 @@ #include #include #include +#include -#define MODULE_VERS "1.5" +#define MODULE_VERS "1.6" #define MODULE_NAME "lparcfg" /* #define LPARCFG_DEBUG */ @@ -214,13 +215,20 @@ } static unsigned long get_purr(void); -/* ToDo: get sum of purr across all processors. The purr collection code - * is coming, but at this time is still problematic, so for now this - * function will return 0. - */ + +/* Track sum of all purrs across all processors. This is used to further */ +/* calculate usage values by different applications */ + static unsigned long get_purr(void) { unsigned long sum_purr = 0; + int cpu; + struct cpu_usage *cu; + + for_each_cpu(cpu) { + cu = &per_cpu(cpu_usage_array, cpu); + sum_purr += cu->current_tb; + } return sum_purr; } diff -Nru a/arch/ppc64/kernel/misc.S b/arch/ppc64/kernel/misc.S --- a/arch/ppc64/kernel/misc.S 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/kernel/misc.S 2005-03-07 14:54:18 -08:00 @@ -939,6 +939,7 @@ .llong .sys32_add_key .llong .sys32_request_key .llong .compat_sys_keyctl + .llong .compat_sys_waitid .balign 8 _GLOBAL(sys_call_table) @@ -1214,3 +1215,4 @@ .llong .sys_add_key .llong .sys_request_key /* 270 */ .llong .sys_keyctl + .llong .sys_waitid diff -Nru a/arch/ppc64/kernel/pSeries_lpar.c b/arch/ppc64/kernel/pSeries_lpar.c --- a/arch/ppc64/kernel/pSeries_lpar.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/kernel/pSeries_lpar.c 2005-03-07 14:54:18 -08:00 @@ -505,7 +505,7 @@ int i; unsigned long flags = 0; struct ppc64_tlb_batch *batch = &__get_cpu_var(ppc64_tlb_batch); - int lock_tlbie = !(cur_cpu_spec->cpu_features & CPU_FTR_LOCKLESS_TLBIE); + int lock_tlbie = !cpu_has_feature(CPU_FTR_LOCKLESS_TLBIE); if (lock_tlbie) spin_lock_irqsave(&pSeries_lpar_tlbie_lock, flags); diff -Nru a/arch/ppc64/kernel/pSeries_nvram.c b/arch/ppc64/kernel/pSeries_nvram.c --- a/arch/ppc64/kernel/pSeries_nvram.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/kernel/pSeries_nvram.c 2005-03-07 14:54:17 -08:00 @@ -11,14 +11,9 @@ * This perhaps should live in drivers/char */ -#include #include #include -#include -#include -#include -#include #include #include #include diff -Nru a/arch/ppc64/kernel/pSeries_setup.c b/arch/ppc64/kernel/pSeries_setup.c --- a/arch/ppc64/kernel/pSeries_setup.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc64/kernel/pSeries_setup.c 2005-03-07 14:54:16 -08:00 @@ -320,8 +320,9 @@ } } -static void pSeries_cpu_die(void) +static void pSeries_mach_cpu_die(void) { + idle_task_exit(); local_irq_disable(); /* Some hardware requires clearing the CPPR, while other hardware does not * it is safe either way @@ -599,7 +600,7 @@ .power_off = rtas_power_off, .halt = rtas_halt, .panic = rtas_os_term, - .cpu_die = pSeries_cpu_die, + .cpu_die = pSeries_mach_cpu_die, .get_boot_time = pSeries_get_boot_time, .get_rtc_time = pSeries_get_rtc_time, .set_rtc_time = pSeries_set_rtc_time, diff -Nru a/arch/ppc64/kernel/pacaData.c b/arch/ppc64/kernel/pacaData.c --- a/arch/ppc64/kernel/pacaData.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/kernel/pacaData.c 2005-03-07 14:54:17 -08:00 @@ -20,9 +20,14 @@ #include #include -struct systemcfg *systemcfg; +static union { + struct systemcfg data; + u8 page[PAGE_SIZE]; +} systemcfg_store __page_aligned; +struct systemcfg *systemcfg = &systemcfg_store.data; EXPORT_SYMBOL(systemcfg); + /* This symbol is provided by the linker - let it fill in the paca * field correctly */ extern unsigned long __toc_start; @@ -216,3 +221,4 @@ #endif #endif }; +EXPORT_SYMBOL(paca); diff -Nru a/arch/ppc64/kernel/pci.c b/arch/ppc64/kernel/pci.c --- a/arch/ppc64/kernel/pci.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/kernel/pci.c 2005-03-07 14:54:18 -08:00 @@ -63,7 +63,9 @@ * page is mapped and isa_io_limit prevents access to it. */ unsigned long isa_io_base; /* NULL if no ISA bus */ +EXPORT_SYMBOL(isa_io_base); unsigned long pci_io_base; +EXPORT_SYMBOL(pci_io_base); void iSeries_pcibios_init(void); @@ -300,19 +302,15 @@ EXPORT_SYMBOL(pci_domain_nr); -/* Set the name of the bus as it appears in /proc/bus/pci */ -int pci_name_bus(char *name, struct pci_bus *bus) +/* Decide whether to display the domain number in /proc */ +int pci_proc_domain(struct pci_bus *bus) { -#ifndef CONFIG_PPC_ISERIES +#ifdef CONFIG_PPC_ISERIES + return 0; +#else struct pci_controller *hose = pci_bus_to_host(bus); - - if (hose->buid) - sprintf(name, "%04x:%02x", pci_domain_nr(bus), bus->number); - else + return hose->buid; #endif - sprintf(name, "%02x", bus->number); - - return 0; } /* diff -Nru a/arch/ppc64/kernel/pmac_setup.c b/arch/ppc64/kernel/pmac_setup.c --- a/arch/ppc64/kernel/pmac_setup.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc64/kernel/pmac_setup.c 2005-03-07 14:54:16 -08:00 @@ -439,6 +439,9 @@ } struct machdep_calls __initdata pmac_md = { +#ifdef CONFIG_HOTPLUG_CPU + .cpu_die = generic_mach_cpu_die, +#endif .probe = pmac_probe, .setup_arch = pmac_setup_arch, .init_early = pmac_init_early, diff -Nru a/arch/ppc64/kernel/pmac_smp.c b/arch/ppc64/kernel/pmac_smp.c --- a/arch/ppc64/kernel/pmac_smp.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc64/kernel/pmac_smp.c 2005-03-07 14:54:16 -08:00 @@ -308,4 +308,9 @@ void __init pmac_setup_smp(void) { smp_ops = &core99_smp_ops; +#ifdef CONFIG_HOTPLUG_CPU + smp_ops->cpu_enable = generic_cpu_enable; + smp_ops->cpu_disable = generic_cpu_disable; + smp_ops->cpu_die = generic_cpu_die; +#endif } diff -Nru a/arch/ppc64/kernel/pmc.c b/arch/ppc64/kernel/pmc.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/pmc.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,64 @@ +/* + * linux/arch/ppc64/kernel/pmc.c + * + * Copyright (C) 2004 David Gibson, IBM Corporation. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#include +#include +#include + +#include +#include + +/* Ensure exceptions are disabled */ +static void dummy_perf(struct pt_regs *regs) +{ + unsigned int mmcr0 = mfspr(SPRN_MMCR0); + + mmcr0 &= ~(MMCR0_PMXE|MMCR0_PMAO); + mtspr(SPRN_MMCR0, mmcr0); +} + +static spinlock_t pmc_owner_lock = SPIN_LOCK_UNLOCKED; +static void *pmc_owner_caller; /* mostly for debugging */ +perf_irq_t perf_irq = dummy_perf; + +int reserve_pmc_hardware(perf_irq_t new_perf_irq) +{ + int err = 0; + + spin_lock(&pmc_owner_lock); + + if (pmc_owner_caller) { + printk(KERN_WARNING "reserve_pmc_hardware: " + "PMC hardware busy (reserved by caller %p)\n", + pmc_owner_caller); + err = -EBUSY; + goto out; + } + + pmc_owner_caller = __builtin_return_address(0); + perf_irq = new_perf_irq ? : dummy_perf; + + out: + spin_unlock(&pmc_owner_lock); + return err; +} + +void release_pmc_hardware(void) +{ + spin_lock(&pmc_owner_lock); + + WARN_ON(! pmc_owner_caller); + + pmc_owner_caller = NULL; + perf_irq = dummy_perf; + + spin_unlock(&pmc_owner_lock); +} diff -Nru a/arch/ppc64/kernel/ppc_ksyms.c b/arch/ppc64/kernel/ppc_ksyms.c --- a/arch/ppc64/kernel/ppc_ksyms.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc64/kernel/ppc_ksyms.c 2005-03-07 14:54:16 -08:00 @@ -8,49 +8,18 @@ */ #include #include -#include -#include -#include -#include #include -#include -#include #include -#include -#include -#include -#include -#include -#include +#include -#include -#include #include #include #include -#include -#include -#include -#include #include -#include -#include -#include -#include #include #include #include -#ifdef CONFIG_PPC_ISERIES #include -#include -#endif - -extern int do_signal(sigset_t *, struct pt_regs *); - -EXPORT_SYMBOL(do_signal); - -EXPORT_SYMBOL(isa_io_base); -EXPORT_SYMBOL(pci_io_base); EXPORT_SYMBOL(strcpy); EXPORT_SYMBOL(strncpy); @@ -65,10 +34,6 @@ EXPORT_SYMBOL(strcmp); EXPORT_SYMBOL(strncmp); -EXPORT_SYMBOL(__down_interruptible); -EXPORT_SYMBOL(__up); -EXPORT_SYMBOL(__down); - EXPORT_SYMBOL(csum_partial); EXPORT_SYMBOL(csum_partial_copy_generic); EXPORT_SYMBOL(ip_fast_csum); @@ -79,11 +44,6 @@ EXPORT_SYMBOL(__strncpy_from_user); EXPORT_SYMBOL(__strnlen_user); -EXPORT_SYMBOL(clear_user_page); - -#ifdef CONFIG_MSCHUNKS -EXPORT_SYMBOL(msChunks); -#endif EXPORT_SYMBOL(reloc_offset); #ifdef CONFIG_PPC_ISERIES @@ -107,11 +67,7 @@ EXPORT_SYMBOL(_outsw_ns); EXPORT_SYMBOL(_insl_ns); EXPORT_SYMBOL(_outsl_ns); -EXPORT_SYMBOL(ioremap); -EXPORT_SYMBOL(__ioremap); -EXPORT_SYMBOL(iounmap); -EXPORT_SYMBOL(start_thread); EXPORT_SYMBOL(kernel_thread); EXPORT_SYMBOL(giveup_fpu); @@ -119,8 +75,7 @@ EXPORT_SYMBOL(giveup_altivec); #endif EXPORT_SYMBOL(flush_icache_range); -EXPORT_SYMBOL(flush_icache_user_range); -EXPORT_SYMBOL(flush_dcache_page); + #ifdef CONFIG_SMP #ifdef CONFIG_PPC_ISERIES EXPORT_SYMBOL(local_get_flags); @@ -129,19 +84,6 @@ #endif #endif -EXPORT_SYMBOL(ppc_md); - -#ifdef CONFIG_PPC_MULTIPLATFORM -EXPORT_SYMBOL(find_devices); -EXPORT_SYMBOL(find_type_devices); -EXPORT_SYMBOL(find_compatible_devices); -EXPORT_SYMBOL(find_path_device); -EXPORT_SYMBOL(device_is_compatible); -EXPORT_SYMBOL(machine_is_compatible); -EXPORT_SYMBOL(find_all_nodes); -EXPORT_SYMBOL(get_property); -#endif - EXPORT_SYMBOL(memcpy); EXPORT_SYMBOL(memset); EXPORT_SYMBOL(memmove); @@ -150,10 +92,4 @@ EXPORT_SYMBOL(memchr); EXPORT_SYMBOL(timer_interrupt); -EXPORT_SYMBOL(irq_desc); -EXPORT_SYMBOL(get_wchan); EXPORT_SYMBOL(console_drivers); - -EXPORT_SYMBOL(tb_ticks_per_usec); -EXPORT_SYMBOL(paca); -EXPORT_SYMBOL(cur_cpu_spec); diff -Nru a/arch/ppc64/kernel/proc_ppc64.c b/arch/ppc64/kernel/proc_ppc64.c --- a/arch/ppc64/kernel/proc_ppc64.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/kernel/proc_ppc64.c 2005-03-07 14:54:17 -08:00 @@ -89,7 +89,7 @@ return 1; pde->nlink = 1; pde->data = systemcfg; - pde->size = 4096; + pde->size = PAGE_SIZE; pde->proc_fops = &page_map_fops; #ifdef CONFIG_PPC_PSERIES diff -Nru a/arch/ppc64/kernel/process.c b/arch/ppc64/kernel/process.c --- a/arch/ppc64/kernel/process.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/kernel/process.c 2005-03-07 14:54:17 -08:00 @@ -51,6 +51,7 @@ #include #include #include +#include #ifndef CONFIG_SMP struct task_struct *last_task_used_math = NULL; @@ -168,6 +169,8 @@ #endif /* CONFIG_ALTIVEC */ +DEFINE_PER_CPU(struct cpu_usage, cpu_usage_array); + struct task_struct *__switch_to(struct task_struct *prev, struct task_struct *new) { @@ -206,6 +209,21 @@ new_thread = &new->thread; old_thread = ¤t->thread; +/* Collect purr utilization data per process and per processor wise */ +/* purr is nothing but processor time base */ + +#if defined(CONFIG_PPC_PSERIES) + if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) { + struct cpu_usage *cu = &__get_cpu_var(cpu_usage_array); + long unsigned start_tb, current_tb; + start_tb = old_thread->start_tb; + cu->current_tb = current_tb = mfspr(SPRN_PURR); + old_thread->accum_tb += (current_tb - start_tb); + new_thread->start_tb = current_tb; + } +#endif + + local_irq_save(flags); last = _switch(old_thread, new_thread); @@ -388,12 +406,12 @@ kregs = (struct pt_regs *) sp; sp -= STACK_FRAME_OVERHEAD; p->thread.ksp = sp; - if (cur_cpu_spec->cpu_features & CPU_FTR_SLB) { + if (cpu_has_feature(CPU_FTR_SLB)) { unsigned long sp_vsid = get_kernel_vsid(sp); sp_vsid <<= SLB_VSID_SHIFT; sp_vsid |= SLB_VSID_KERNEL; - if (cur_cpu_spec->cpu_features & CPU_FTR_16M_PAGE) + if (cpu_has_feature(CPU_FTR_16M_PAGE)) sp_vsid |= SLB_VSID_L; p->thread.ksp_vsid = sp_vsid; @@ -469,6 +487,7 @@ current->thread.used_vr = 0; #endif /* CONFIG_ALTIVEC */ } +EXPORT_SYMBOL(start_thread); int set_fpexc_mode(struct task_struct *tsk, unsigned int val) { @@ -607,6 +626,7 @@ } while (count++ < 16); return 0; } +EXPORT_SYMBOL(get_wchan); void show_stack(struct task_struct *p, unsigned long *_sp) { diff -Nru a/arch/ppc64/kernel/prom.c b/arch/ppc64/kernel/prom.c --- a/arch/ppc64/kernel/prom.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/kernel/prom.c 2005-03-07 14:54:17 -08:00 @@ -32,6 +32,8 @@ #include #include #include +#include + #include #include #include @@ -1138,6 +1140,7 @@ *prevp = NULL; return head; } +EXPORT_SYMBOL(find_devices); /** * Construct and return a list of the device_nodes with a given type. @@ -1157,6 +1160,7 @@ *prevp = NULL; return head; } +EXPORT_SYMBOL(find_type_devices); /** * Returns all nodes linked together @@ -1174,6 +1178,7 @@ *prevp = NULL; return head; } +EXPORT_SYMBOL(find_all_nodes); /** Checks if the given "compat" string matches one of the strings in * the device's "compatible" property @@ -1197,6 +1202,7 @@ return 0; } +EXPORT_SYMBOL(device_is_compatible); /** @@ -1216,6 +1222,7 @@ } return rc; } +EXPORT_SYMBOL(machine_is_compatible); /** * Construct and return a list of the device_nodes with a given type @@ -1239,6 +1246,7 @@ *prevp = NULL; return head; } +EXPORT_SYMBOL(find_compatible_devices); /** * Find the device_node with a given full_name. @@ -1253,6 +1261,7 @@ return np; return NULL; } +EXPORT_SYMBOL(find_path_device); /******* * @@ -1872,6 +1881,7 @@ } return NULL; } +EXPORT_SYMBOL(get_property); /* * Add a property to a node diff -Nru a/arch/ppc64/kernel/prom_init.c b/arch/ppc64/kernel/prom_init.c --- a/arch/ppc64/kernel/prom_init.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/kernel/prom_init.c 2005-03-07 14:54:18 -08:00 @@ -151,7 +151,6 @@ extern void __start(unsigned long r3, unsigned long r4, unsigned long r5); -extern unsigned long reloc_offset(void); extern void enter_prom(struct prom_args *args, unsigned long entry); extern void copy_and_flush(unsigned long dest, unsigned long src, unsigned long size, unsigned long offset); @@ -679,8 +678,7 @@ * point to after it */ if (RELOC(prom_initrd_start)) { - if ((RELOC(prom_initrd_start) + RELOC(prom_initrd_end)) - > RELOC(alloc_bottom)) + if (RELOC(prom_initrd_end) > RELOC(alloc_bottom)) RELOC(alloc_bottom) = PAGE_ALIGN(RELOC(prom_initrd_end)); } diff -Nru a/arch/ppc64/kernel/semaphore.c b/arch/ppc64/kernel/semaphore.c --- a/arch/ppc64/kernel/semaphore.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc64/kernel/semaphore.c 2005-03-07 14:54:16 -08:00 @@ -18,6 +18,8 @@ #include #include +#include + #include #include #include @@ -62,6 +64,7 @@ __sem_update_count(sem, 1); wake_up(&sem->wait); } +EXPORT_SYMBOL(__up); /* * Note that when we come in to __down or __down_interruptible, @@ -99,6 +102,7 @@ */ wake_up(&sem->wait); } +EXPORT_SYMBOL(__down); int __sched __down_interruptible(struct semaphore * sem) { @@ -129,3 +133,4 @@ wake_up(&sem->wait); return retval; } +EXPORT_SYMBOL(__down_interruptible); diff -Nru a/arch/ppc64/kernel/setup.c b/arch/ppc64/kernel/setup.c --- a/arch/ppc64/kernel/setup.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/kernel/setup.c 2005-03-07 14:54:17 -08:00 @@ -129,6 +129,7 @@ /* The main machine-dep calls structure */ struct machdep_calls ppc_md; +EXPORT_SYMBOL(ppc_md); #ifdef CONFIG_MAGIC_SYSRQ unsigned long SYSRQ_KEY; @@ -315,7 +316,7 @@ maxcpus = ireg[num_addr_cell + num_size_cell]; /* Double maxcpus for processors which have SMT capability */ - if (cur_cpu_spec->cpu_features & CPU_FTR_SMT) + if (cpu_has_feature(CPU_FTR_SMT)) maxcpus *= 2; if (maxcpus > NR_CPUS) { @@ -339,7 +340,7 @@ */ for_each_cpu(cpu) { cpu_set(cpu, cpu_sibling_map[cpu]); - if (cur_cpu_spec->cpu_features & CPU_FTR_SMT) + if (cpu_has_feature(CPU_FTR_SMT)) cpu_set(cpu ^ 0x1, cpu_sibling_map[cpu]); } @@ -767,7 +768,7 @@ seq_printf(m, "unknown (%08x)", pvr); #ifdef CONFIG_ALTIVEC - if (cur_cpu_spec->cpu_features & CPU_FTR_ALTIVEC) + if (cpu_has_feature(CPU_FTR_ALTIVEC)) seq_printf(m, ", altivec supported"); #endif /* CONFIG_ALTIVEC */ @@ -990,6 +991,34 @@ } /* + * Called from setup_arch to initialize the bitmap of available + * syscalls in the systemcfg page + */ +void __init setup_syscall_map(void) +{ + unsigned int i, count64 = 0, count32 = 0; + extern unsigned long *sys_call_table; + extern unsigned long *sys_call_table32; + extern unsigned long sys_ni_syscall; + + + for (i = 0; i < __NR_syscalls; i++) { + if (sys_call_table[i] == sys_ni_syscall) + continue; + count64++; + systemcfg->syscall_map_64[i >> 5] |= 0x80000000UL >> (i & 0x1f); + } + for (i = 0; i < __NR_syscalls; i++) { + if (sys_call_table32[i] == sys_ni_syscall) + continue; + count32++; + systemcfg->syscall_map_32[i >> 5] |= 0x80000000UL >> (i & 0x1f); + } + printk(KERN_INFO "Syscall map setup, %d 32 bits and %d 64 bits syscalls\n", + count32, count64); +} + +/* * Called into from start_kernel, after lock_kernel has been called. * Initializes bootmem, which is unsed to manage page allocation until * mem_init is called. @@ -1027,6 +1056,9 @@ /* set up the bootmem stuff with available memory */ do_init_bootmem(); + /* initialize the syscall map in systemcfg */ + setup_syscall_map(); + ppc_md.setup_arch(); /* Select the correct idle loop for the platform. */ @@ -1345,9 +1377,6 @@ void cpu_die(void) { - idle_task_exit(); if (ppc_md.cpu_die) ppc_md.cpu_die(); - local_irq_disable(); - for (;;); } diff -Nru a/arch/ppc64/kernel/signal.c b/arch/ppc64/kernel/signal.c --- a/arch/ppc64/kernel/signal.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc64/kernel/signal.c 2005-03-07 14:54:16 -08:00 @@ -27,6 +27,8 @@ #include #include #include +#include + #include #include #include @@ -34,6 +36,7 @@ #include #include #include +#include #define DEBUG_SIG 0 @@ -426,10 +429,14 @@ goto badframe; /* Set up to return from userspace. */ - err |= setup_trampoline(__NR_rt_sigreturn, &frame->tramp[0]); - if (err) - goto badframe; - + if (vdso64_rt_sigtramp && current->thread.vdso_base) { + regs->link = current->thread.vdso_base + vdso64_rt_sigtramp; + } else { + err |= setup_trampoline(__NR_rt_sigreturn, &frame->tramp[0]); + if (err) + goto badframe; + regs->link = (unsigned long) &frame->tramp[0]; + } funct_desc_ptr = (func_descr_t __user *) ka->sa.sa_handler; /* Allocate a dummy caller frame for the signal handler. */ @@ -438,7 +445,6 @@ /* Set up "regs" so we "return" to the signal handler. */ err |= get_user(regs->nip, &funct_desc_ptr->entry); - regs->link = (unsigned long) &frame->tramp[0]; regs->gpr[1] = newsp; err |= get_user(regs->gpr[2], &funct_desc_ptr->toc); regs->gpr[3] = signr; @@ -566,6 +572,4 @@ return 0; } - - - +EXPORT_SYMBOL(do_signal); diff -Nru a/arch/ppc64/kernel/signal32.c b/arch/ppc64/kernel/signal32.c --- a/arch/ppc64/kernel/signal32.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/kernel/signal32.c 2005-03-07 14:54:18 -08:00 @@ -31,6 +31,7 @@ #include #include #include +#include #define DEBUG_SIG 0 @@ -656,18 +657,24 @@ /* Save user registers on the stack */ frame = &rt_sf->uc.uc_mcontext; - if (save_user_regs(regs, frame, __NR_rt_sigreturn)) - goto badframe; - if (put_user(regs->gpr[1], (unsigned long __user *)newsp)) goto badframe; + + if (vdso32_rt_sigtramp && current->thread.vdso_base) { + if (save_user_regs(regs, frame, 0)) + goto badframe; + regs->link = current->thread.vdso_base + vdso32_rt_sigtramp; + } else { + if (save_user_regs(regs, frame, __NR_rt_sigreturn)) + goto badframe; + regs->link = (unsigned long) frame->tramp; + } regs->gpr[1] = (unsigned long) newsp; regs->gpr[3] = sig; regs->gpr[4] = (unsigned long) &rt_sf->info; regs->gpr[5] = (unsigned long) &rt_sf->uc; regs->gpr[6] = (unsigned long) rt_sf; regs->nip = (unsigned long) ka->sa.sa_handler; - regs->link = (unsigned long) frame->tramp; regs->trap = 0; regs->result = 0; @@ -825,8 +832,15 @@ || __put_user(sig, &sc->signal)) goto badframe; - if (save_user_regs(regs, &frame->mctx, __NR_sigreturn)) - goto badframe; + if (vdso32_sigtramp && current->thread.vdso_base) { + if (save_user_regs(regs, &frame->mctx, 0)) + goto badframe; + regs->link = current->thread.vdso_base + vdso32_sigtramp; + } else { + if (save_user_regs(regs, &frame->mctx, __NR_sigreturn)) + goto badframe; + regs->link = (unsigned long) frame->mctx.tramp; + } if (put_user(regs->gpr[1], (unsigned long __user *)newsp)) goto badframe; @@ -834,7 +848,6 @@ regs->gpr[3] = sig; regs->gpr[4] = (unsigned long) sc; regs->nip = (unsigned long) ka->sa.sa_handler; - regs->link = (unsigned long) frame->mctx.tramp; regs->trap = 0; regs->result = 0; diff -Nru a/arch/ppc64/kernel/smp.c b/arch/ppc64/kernel/smp.c --- a/arch/ppc64/kernel/smp.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/kernel/smp.c 2005-03-07 14:54:17 -08:00 @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -383,7 +384,7 @@ * For now we leave it which means the time can be some * number of msecs off until someone does a settimeofday() */ - do_gtod.tb_orig_stamp = tb_last_stamp; + do_gtod.varp->tb_orig_stamp = tb_last_stamp; systemcfg->tb_orig_stamp = tb_last_stamp; #endif @@ -406,17 +407,96 @@ current_set[boot_cpuid] = current->thread_info; } +#ifdef CONFIG_HOTPLUG_CPU +/* State of each CPU during hotplug phases */ +DEFINE_PER_CPU(int, cpu_state) = { 0 }; + +int generic_cpu_disable(void) +{ + unsigned int cpu = smp_processor_id(); + + if (cpu == boot_cpuid) + return -EBUSY; + + systemcfg->processorCount--; + cpu_clear(cpu, cpu_online_map); + fixup_irqs(cpu_online_map); + return 0; +} + +int generic_cpu_enable(unsigned int cpu) +{ + /* Do the normal bootup if we haven't + * already bootstrapped. */ + if (system_state != SYSTEM_RUNNING) + return -ENOSYS; + + /* get the target out of it's holding state */ + per_cpu(cpu_state, cpu) = CPU_UP_PREPARE; + wmb(); + + while (!cpu_online(cpu)) + cpu_relax(); + + fixup_irqs(cpu_online_map); + /* counter the irq disable in fixup_irqs */ + local_irq_enable(); + return 0; +} + +void generic_cpu_die(unsigned int cpu) +{ + int i; + + for (i = 0; i < 100; i++) { + rmb(); + if (per_cpu(cpu_state, cpu) == CPU_DEAD) + return; + msleep(100); + } + printk(KERN_ERR "CPU%d didn't die...\n", cpu); +} + +void generic_mach_cpu_die(void) +{ + unsigned int cpu; + + local_irq_disable(); + cpu = smp_processor_id(); + printk(KERN_DEBUG "CPU%d offline\n", cpu); + __get_cpu_var(cpu_state) = CPU_DEAD; + wmb(); + while (__get_cpu_var(cpu_state) != CPU_UP_PREPARE) + cpu_relax(); + + flush_tlb_pending(); + cpu_set(cpu, cpu_online_map); + local_irq_enable(); +} +#endif + +static int __devinit cpu_enable(unsigned int cpu) +{ + if (smp_ops->cpu_enable) + return smp_ops->cpu_enable(cpu); + + return -ENOSYS; +} + int __devinit __cpu_up(unsigned int cpu) { int c; + if (!cpu_enable(cpu)) + return 0; + /* At boot, don't bother with non-present cpus -JSCHOPP */ if (system_state < SYSTEM_RUNNING && !cpu_present(cpu)) return -ENOENT; paca[cpu].default_decr = tb_ticks_per_jiffy / decr_overclock; - if (!(cur_cpu_spec->cpu_features & CPU_FTR_SLB)) { + if (!cpu_has_feature(CPU_FTR_SLB)) { void *tmp; /* maximum of 48 CPUs on machines with a segment table */ diff -Nru a/arch/ppc64/kernel/sysfs.c b/arch/ppc64/kernel/sysfs.c --- a/arch/ppc64/kernel/sysfs.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc64/kernel/sysfs.c 2005-03-07 14:54:16 -08:00 @@ -18,7 +18,7 @@ #include #include #include - +#include static DEFINE_PER_CPU(struct cpu, cpu_devices); @@ -63,7 +63,7 @@ unsigned int *val; unsigned int cpu; - if (!cur_cpu_spec->cpu_features & CPU_FTR_SMT) + if (!cpu_has_feature(CPU_FTR_SMT)) return 1; options = find_path_device("/options"); @@ -86,7 +86,7 @@ unsigned int cpu; int snooze; - if (!cur_cpu_spec->cpu_features & CPU_FTR_SMT) + if (!cpu_has_feature(CPU_FTR_SMT)) return 1; smt_snooze_cmdline = 1; @@ -167,7 +167,7 @@ * On SMT machines we have to set the run latch in the ctrl register * in order to make PMC6 spin. */ - if (cur_cpu_spec->cpu_features & CPU_FTR_SMT) { + if (cpu_has_feature(CPU_FTR_SMT)) { ctrl = mfspr(CTRLF); ctrl |= RUNLATCH; mtspr(CTRLT, ctrl); @@ -266,7 +266,7 @@ struct sys_device *s = &c->sysdev; #ifndef CONFIG_PPC_ISERIES - if (cur_cpu_spec->cpu_features & CPU_FTR_SMT) + if (cpu_has_feature(CPU_FTR_SMT)) sysdev_create_file(s, &attr_smt_snooze_delay); #endif @@ -275,7 +275,7 @@ sysdev_create_file(s, &attr_mmcr0); sysdev_create_file(s, &attr_mmcr1); - if (cur_cpu_spec->cpu_features & CPU_FTR_MMCRA) + if (cpu_has_feature(CPU_FTR_MMCRA)) sysdev_create_file(s, &attr_mmcra); sysdev_create_file(s, &attr_pmc1); @@ -285,12 +285,12 @@ sysdev_create_file(s, &attr_pmc5); sysdev_create_file(s, &attr_pmc6); - if (cur_cpu_spec->cpu_features & CPU_FTR_PMC8) { + if (cpu_has_feature(CPU_FTR_PMC8)) { sysdev_create_file(s, &attr_pmc7); sysdev_create_file(s, &attr_pmc8); } - if (cur_cpu_spec->cpu_features & CPU_FTR_SMT) + if (cpu_has_feature(CPU_FTR_SMT)) sysdev_create_file(s, &attr_purr); } @@ -303,7 +303,7 @@ BUG_ON(c->no_control); #ifndef CONFIG_PPC_ISERIES - if (cur_cpu_spec->cpu_features & CPU_FTR_SMT) + if (cpu_has_feature(CPU_FTR_SMT)) sysdev_remove_file(s, &attr_smt_snooze_delay); #endif @@ -312,7 +312,7 @@ sysdev_remove_file(s, &attr_mmcr0); sysdev_remove_file(s, &attr_mmcr1); - if (cur_cpu_spec->cpu_features & CPU_FTR_MMCRA) + if (cpu_has_feature(CPU_FTR_MMCRA)) sysdev_remove_file(s, &attr_mmcra); sysdev_remove_file(s, &attr_pmc1); @@ -322,12 +322,12 @@ sysdev_remove_file(s, &attr_pmc5); sysdev_remove_file(s, &attr_pmc6); - if (cur_cpu_spec->cpu_features & CPU_FTR_PMC8) { + if (cpu_has_feature(CPU_FTR_PMC8)) { sysdev_remove_file(s, &attr_pmc7); sysdev_remove_file(s, &attr_pmc8); } - if (cur_cpu_spec->cpu_features & CPU_FTR_SMT) + if (cpu_has_feature(CPU_FTR_SMT)) sysdev_remove_file(s, &attr_purr); } #endif /* CONFIG_HOTPLUG_CPU */ @@ -413,9 +413,7 @@ * CPU. For instance, the boot cpu might never be valid * for hotplugging. */ -#ifdef CONFIG_HOTPLUG_CPU - if (systemcfg->platform != PLATFORM_PSERIES_LPAR) -#endif + if (!ppc_md.cpu_die) c->no_control = 1; if (cpu_online(cpu) || (c->no_control == 0)) { diff -Nru a/arch/ppc64/kernel/time.c b/arch/ppc64/kernel/time.c --- a/arch/ppc64/kernel/time.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/kernel/time.c 2005-03-07 14:54:18 -08:00 @@ -85,9 +85,8 @@ unsigned long tb_ticks_per_jiffy; unsigned long tb_ticks_per_usec = 100; /* sane default */ +EXPORT_SYMBOL(tb_ticks_per_usec); unsigned long tb_ticks_per_sec; -unsigned long next_xtime_sync_tb; -unsigned long xtime_sync_interval; unsigned long tb_to_xs; unsigned tb_to_us; unsigned long processor_freq; @@ -158,8 +157,8 @@ * The conversion to microseconds at the end is done * without a divide (and in fact, without a multiply) */ - tb_ticks = tb_val - do_gtod.tb_orig_stamp; temp_varp = do_gtod.varp; + tb_ticks = tb_val - temp_varp->tb_orig_stamp; temp_tb_to_xs = temp_varp->tb_to_xs; temp_stamp_xsec = temp_varp->stamp_xsec; tb_xsec = mulhdu( tb_ticks, temp_tb_to_xs ); @@ -185,17 +184,55 @@ { struct timeval my_tv; - if (cur_tb > next_xtime_sync_tb) { - next_xtime_sync_tb = cur_tb + xtime_sync_interval; - __do_gettimeofday(&my_tv, cur_tb); - - if (xtime.tv_sec <= my_tv.tv_sec) { - xtime.tv_sec = my_tv.tv_sec; - xtime.tv_nsec = my_tv.tv_usec * 1000; - } + __do_gettimeofday(&my_tv, cur_tb); + + if (xtime.tv_sec <= my_tv.tv_sec) { + xtime.tv_sec = my_tv.tv_sec; + xtime.tv_nsec = my_tv.tv_usec * 1000; } } +/* + * When the timebase - tb_orig_stamp gets too big, we do a manipulation + * between tb_orig_stamp and stamp_xsec. The goal here is to keep the + * difference tb - tb_orig_stamp small enough to always fit inside a + * 32 bits number. This is a requirement of our fast 32 bits userland + * implementation in the vdso. If we "miss" a call to this function + * (interrupt latency, CPU locked in a spinlock, ...) and we end up + * with a too big difference, then the vdso will fallback to calling + * the syscall + */ +static __inline__ void timer_recalc_offset(unsigned long cur_tb) +{ + struct gettimeofday_vars * temp_varp; + unsigned temp_idx; + unsigned long offset, new_stamp_xsec, new_tb_orig_stamp; + + if (((cur_tb - do_gtod.varp->tb_orig_stamp) & 0x80000000u) == 0) + return; + + temp_idx = (do_gtod.var_idx == 0); + temp_varp = &do_gtod.vars[temp_idx]; + + new_tb_orig_stamp = cur_tb; + offset = new_tb_orig_stamp - do_gtod.varp->tb_orig_stamp; + new_stamp_xsec = do_gtod.varp->stamp_xsec + mulhdu(offset, do_gtod.varp->tb_to_xs); + + temp_varp->tb_to_xs = do_gtod.varp->tb_to_xs; + temp_varp->tb_orig_stamp = new_tb_orig_stamp; + temp_varp->stamp_xsec = new_stamp_xsec; + mb(); + do_gtod.varp = temp_varp; + do_gtod.var_idx = temp_idx; + + ++(systemcfg->tb_update_count); + wmb(); + systemcfg->tb_orig_stamp = new_tb_orig_stamp; + systemcfg->stamp_xsec = new_stamp_xsec; + wmb(); + ++(systemcfg->tb_update_count); +} + #ifdef CONFIG_SMP unsigned long profile_pc(struct pt_regs *regs) { @@ -311,6 +348,7 @@ if (cpu == boot_cpuid) { write_seqlock(&xtime_lock); tb_last_stamp = lpaca->next_jiffy_update_tb; + timer_recalc_offset(lpaca->next_jiffy_update_tb); do_timer(regs); timer_sync_xtime(lpaca->next_jiffy_update_tb); timer_check_rtc(); @@ -334,6 +372,14 @@ } #endif +/* collect purr register values often, for accurate calculations */ +#if defined(CONFIG_PPC_PSERIES) + if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) { + struct cpu_usage *cu = &__get_cpu_var(cpu_usage_array); + cu->current_tb = mfspr(SPRN_PURR); + } +#endif + irq_exit(); return 1; @@ -398,7 +444,9 @@ time_maxerror = NTP_PHASE_LIMIT; time_esterror = NTP_PHASE_LIMIT; - delta_xsec = mulhdu( (tb_last_stamp-do_gtod.tb_orig_stamp), do_gtod.varp->tb_to_xs ); + delta_xsec = mulhdu( (tb_last_stamp-do_gtod.varp->tb_orig_stamp), + do_gtod.varp->tb_to_xs ); + new_xsec = (new_nsec * XSEC_PER_SEC) / NSEC_PER_SEC; new_xsec += new_sec * XSEC_PER_SEC; if ( new_xsec > delta_xsec ) { @@ -411,7 +459,7 @@ * before 1970 ... eg. we booted ten days ago, and we are setting * the time to Jan 5, 1970 */ do_gtod.varp->stamp_xsec = new_xsec; - do_gtod.tb_orig_stamp = tb_last_stamp; + do_gtod.varp->tb_orig_stamp = tb_last_stamp; systemcfg->stamp_xsec = new_xsec; systemcfg->tb_orig_stamp = tb_last_stamp; } @@ -464,9 +512,9 @@ xtime.tv_sec = mktime(tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec); tb_last_stamp = get_tb(); - do_gtod.tb_orig_stamp = tb_last_stamp; do_gtod.varp = &do_gtod.vars[0]; do_gtod.var_idx = 0; + do_gtod.varp->tb_orig_stamp = tb_last_stamp; do_gtod.varp->stamp_xsec = xtime.tv_sec * XSEC_PER_SEC; do_gtod.tb_ticks_per_sec = tb_ticks_per_sec; do_gtod.varp->tb_to_xs = tb_to_xs; @@ -477,9 +525,6 @@ systemcfg->stamp_xsec = xtime.tv_sec * XSEC_PER_SEC; systemcfg->tb_to_xs = tb_to_xs; - xtime_sync_interval = tb_ticks_per_sec - (tb_ticks_per_sec/8); - next_xtime_sync_tb = tb_last_stamp + xtime_sync_interval; - time_freq = 0; xtime.tv_nsec = 0; @@ -584,12 +629,12 @@ stamp_xsec which is the time (in 1/2^20 second units) corresponding to tb_orig_stamp. This new value of stamp_xsec compensates for the change in frequency (implied by the new tb_to_xs) which guarantees that the current time remains the same */ - tb_ticks = get_tb() - do_gtod.tb_orig_stamp; + write_seqlock_irqsave( &xtime_lock, flags ); + tb_ticks = get_tb() - do_gtod.varp->tb_orig_stamp; div128_by_32( 1024*1024, 0, new_tb_ticks_per_sec, &divres ); new_tb_to_xs = divres.result_low; new_xsec = mulhdu( tb_ticks, new_tb_to_xs ); - write_seqlock_irqsave( &xtime_lock, flags ); old_xsec = mulhdu( tb_ticks, do_gtod.varp->tb_to_xs ); new_stamp_xsec = do_gtod.varp->stamp_xsec + old_xsec - new_xsec; @@ -597,16 +642,12 @@ values in do_gettimeofday. We alternate the copies and as long as a reasonable time elapses between changes, there will never be inconsistent values. ntpd has a minimum of one minute between updates */ - if (do_gtod.var_idx == 0) { - temp_varp = &do_gtod.vars[1]; - temp_idx = 1; - } - else { - temp_varp = &do_gtod.vars[0]; - temp_idx = 0; - } + temp_idx = (do_gtod.var_idx == 0); + temp_varp = &do_gtod.vars[temp_idx]; + temp_varp->tb_to_xs = new_tb_to_xs; temp_varp->stamp_xsec = new_stamp_xsec; + temp_varp->tb_orig_stamp = do_gtod.varp->tb_orig_stamp; mb(); do_gtod.varp = temp_varp; do_gtod.var_idx = temp_idx; diff -Nru a/arch/ppc64/kernel/traps.c b/arch/ppc64/kernel/traps.c --- a/arch/ppc64/kernel/traps.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/kernel/traps.c 2005-03-07 14:54:17 -08:00 @@ -41,6 +41,7 @@ #include #include #include +#include #ifdef CONFIG_DEBUGGER int (*__debugger)(struct pt_regs *regs); @@ -450,18 +451,7 @@ die("Unrecoverable VMX/Altivec Unavailable Exception", regs, SIGABRT); } -/* Ensure exceptions are disabled */ -static void dummy_perf(struct pt_regs *regs) -{ - unsigned int mmcr0 = mfspr(SPRN_MMCR0); - - mmcr0 &= ~(MMCR0_PMXE|MMCR0_PMAO); - mtspr(SPRN_MMCR0, mmcr0); -} - -void (*perf_irq)(struct pt_regs *) = dummy_perf; - -EXPORT_SYMBOL(perf_irq); +extern perf_irq_t perf_irq; void performance_monitor_exception(struct pt_regs *regs) { diff -Nru a/arch/ppc64/kernel/vdso.c b/arch/ppc64/kernel/vdso.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/vdso.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,614 @@ +/* + * linux/arch/ppc64/kernel/vdso.c + * + * Copyright (C) 2004 Benjamin Herrenschmidt, IBM Corp. + * + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#undef DEBUG + +#ifdef DEBUG +#define DBG(fmt...) printk(fmt) +#else +#define DBG(fmt...) +#endif + + +/* + * The vDSOs themselves are here + */ +extern char vdso64_start, vdso64_end; +extern char vdso32_start, vdso32_end; + +static void *vdso64_kbase = &vdso64_start; +static void *vdso32_kbase = &vdso32_start; + +unsigned int vdso64_pages; +unsigned int vdso32_pages; + +/* Signal trampolines user addresses */ + +unsigned long vdso64_rt_sigtramp; +unsigned long vdso32_sigtramp; +unsigned long vdso32_rt_sigtramp; + +/* Format of the patch table */ +struct vdso_patch_def +{ + u32 pvr_mask, pvr_value; + const char *gen_name; + const char *fix_name; +}; + +/* Table of functions to patch based on the CPU type/revision + * + * TODO: Improve by adding whole lists for each entry + */ +static struct vdso_patch_def vdso_patches[] = { + { + 0xffff0000, 0x003a0000, /* POWER5 */ + "__kernel_sync_dicache", "__kernel_sync_dicache_p5" + }, + { + 0xffff0000, 0x003b0000, /* POWER5 */ + "__kernel_sync_dicache", "__kernel_sync_dicache_p5" + }, +}; + +/* + * Some infos carried around for each of them during parsing at + * boot time. + */ +struct lib32_elfinfo +{ + Elf32_Ehdr *hdr; /* ptr to ELF */ + Elf32_Sym *dynsym; /* ptr to .dynsym section */ + unsigned long dynsymsize; /* size of .dynsym section */ + char *dynstr; /* ptr to .dynstr section */ + unsigned long text; /* offset of .text section in .so */ +}; + +struct lib64_elfinfo +{ + Elf64_Ehdr *hdr; + Elf64_Sym *dynsym; + unsigned long dynsymsize; + char *dynstr; + unsigned long text; +}; + + +#ifdef __DEBUG +static void dump_one_vdso_page(struct page *pg, struct page *upg) +{ + printk("kpg: %p (c:%d,f:%08lx)", __va(page_to_pfn(pg) << PAGE_SHIFT), + page_count(pg), + pg->flags); + if (upg/* && pg != upg*/) { + printk(" upg: %p (c:%d,f:%08lx)", __va(page_to_pfn(upg) << PAGE_SHIFT), + page_count(upg), + upg->flags); + } + printk("\n"); +} + +static void dump_vdso_pages(struct vm_area_struct * vma) +{ + int i; + + if (!vma || test_thread_flag(TIF_32BIT)) { + printk("vDSO32 @ %016lx:\n", (unsigned long)vdso32_kbase); + for (i=0; ivm_mm) ? + follow_page(vma->vm_mm, vma->vm_start + i*PAGE_SIZE, 0) + : NULL; + dump_one_vdso_page(pg, upg); + } + } + if (!vma || !test_thread_flag(TIF_32BIT)) { + printk("vDSO64 @ %016lx:\n", (unsigned long)vdso64_kbase); + for (i=0; ivm_mm) ? + follow_page(vma->vm_mm, vma->vm_start + i*PAGE_SIZE, 0) + : NULL; + dump_one_vdso_page(pg, upg); + } + } +} +#endif /* DEBUG */ + +/* + * Keep a dummy vma_close for now, it will prevent VMA merging. + */ +static void vdso_vma_close(struct vm_area_struct * vma) +{ +} + +/* + * Our nopage() function, maps in the actual vDSO kernel pages, they will + * be mapped read-only by do_no_page(), and eventually COW'ed, either + * right away for an initial write access, or by do_wp_page(). + */ +static struct page * vdso_vma_nopage(struct vm_area_struct * vma, + unsigned long address, int *type) +{ + unsigned long offset = address - vma->vm_start; + struct page *pg; + void *vbase = test_thread_flag(TIF_32BIT) ? vdso32_kbase : vdso64_kbase; + + DBG("vdso_vma_nopage(current: %s, address: %016lx, off: %lx)\n", + current->comm, address, offset); + + if (address < vma->vm_start || address > vma->vm_end) + return NOPAGE_SIGBUS; + + /* + * Last page is systemcfg, special handling here, no get_page() a + * this is a reserved page + */ + if ((vma->vm_end - address) <= PAGE_SIZE) + return virt_to_page(systemcfg); + + pg = virt_to_page(vbase + offset); + get_page(pg); + DBG(" ->page count: %d\n", page_count(pg)); + + return pg; +} + +static struct vm_operations_struct vdso_vmops = { + .close = vdso_vma_close, + .nopage = vdso_vma_nopage, +}; + +/* + * This is called from binfmt_elf, we create the special vma for the + * vDSO and insert it into the mm struct tree + */ +int arch_setup_additional_pages(struct linux_binprm *bprm, int executable_stack) +{ + struct mm_struct *mm = current->mm; + struct vm_area_struct *vma; + unsigned long vdso_pages; + unsigned long vdso_base; + + if (test_thread_flag(TIF_32BIT)) { + vdso_pages = vdso32_pages; + vdso_base = VDSO32_MBASE; + } else { + vdso_pages = vdso64_pages; + vdso_base = VDSO64_MBASE; + } + + /* vDSO has a problem and was disabled, just don't "enable" it for the + * process + */ + if (vdso_pages == 0) { + current->thread.vdso_base = 0; + return 0; + } + vma = kmem_cache_alloc(vm_area_cachep, SLAB_KERNEL); + if (vma == NULL) + return -ENOMEM; + if (security_vm_enough_memory(vdso_pages)) { + kmem_cache_free(vm_area_cachep, vma); + return -ENOMEM; + } + memset(vma, 0, sizeof(*vma)); + + /* + * pick a base address for the vDSO in process space. We have a default + * base of 1Mb on which we had a random offset up to 1Mb. + * XXX: Add possibility for a program header to specify that location + */ + current->thread.vdso_base = vdso_base; + /* + ((unsigned long)vma & 0x000ff000); */ + + vma->vm_mm = mm; + vma->vm_start = current->thread.vdso_base; + + /* + * the VMA size is one page more than the vDSO since systemcfg + * is mapped in the last one + */ + vma->vm_end = vma->vm_start + ((vdso_pages + 1) << PAGE_SHIFT); + + /* + * our vma flags don't have VM_WRITE so by default, the process isn't allowed + * to write those pages. + * gdb can break that with ptrace interface, and thus trigger COW on those + * pages but it's then your responsibility to never do that on the "data" page + * of the vDSO or you'll stop getting kernel updates and your nice userland + * gettimeofday will be totally dead. It's fine to use that for setting + * breakpoints in the vDSO code pages though + */ + vma->vm_flags = VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC; + vma->vm_flags |= mm->def_flags; + vma->vm_page_prot = protection_map[vma->vm_flags & 0x7]; + vma->vm_ops = &vdso_vmops; + + down_write(&mm->mmap_sem); + insert_vm_struct(mm, vma); + mm->total_vm += (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; + up_write(&mm->mmap_sem); + + return 0; +} + +static void * __init find_section32(Elf32_Ehdr *ehdr, const char *secname, + unsigned long *size) +{ + Elf32_Shdr *sechdrs; + unsigned int i; + char *secnames; + + /* Grab section headers and strings so we can tell who is who */ + sechdrs = (void *)ehdr + ehdr->e_shoff; + secnames = (void *)ehdr + sechdrs[ehdr->e_shstrndx].sh_offset; + + /* Find the section they want */ + for (i = 1; i < ehdr->e_shnum; i++) { + if (strcmp(secnames+sechdrs[i].sh_name, secname) == 0) { + if (size) + *size = sechdrs[i].sh_size; + return (void *)ehdr + sechdrs[i].sh_offset; + } + } + *size = 0; + return NULL; +} + +static void * __init find_section64(Elf64_Ehdr *ehdr, const char *secname, + unsigned long *size) +{ + Elf64_Shdr *sechdrs; + unsigned int i; + char *secnames; + + /* Grab section headers and strings so we can tell who is who */ + sechdrs = (void *)ehdr + ehdr->e_shoff; + secnames = (void *)ehdr + sechdrs[ehdr->e_shstrndx].sh_offset; + + /* Find the section they want */ + for (i = 1; i < ehdr->e_shnum; i++) { + if (strcmp(secnames+sechdrs[i].sh_name, secname) == 0) { + if (size) + *size = sechdrs[i].sh_size; + return (void *)ehdr + sechdrs[i].sh_offset; + } + } + if (size) + *size = 0; + return NULL; +} + +static Elf32_Sym * __init find_symbol32(struct lib32_elfinfo *lib, const char *symname) +{ + unsigned int i; + char name[32], *c; + + for (i = 0; i < (lib->dynsymsize / sizeof(Elf32_Sym)); i++) { + if (lib->dynsym[i].st_name == 0) + continue; + strlcpy(name, lib->dynstr + lib->dynsym[i].st_name, 32); + c = strchr(name, '@'); + if (c) + *c = 0; + if (strcmp(symname, name) == 0) + return &lib->dynsym[i]; + } + return NULL; +} + +static Elf64_Sym * __init find_symbol64(struct lib64_elfinfo *lib, const char *symname) +{ + unsigned int i; + char name[32], *c; + + for (i = 0; i < (lib->dynsymsize / sizeof(Elf64_Sym)); i++) { + if (lib->dynsym[i].st_name == 0) + continue; + strlcpy(name, lib->dynstr + lib->dynsym[i].st_name, 32); + c = strchr(name, '@'); + if (c) + *c = 0; + if (strcmp(symname, name) == 0) + return &lib->dynsym[i]; + } + return NULL; +} + +/* Note that we assume the section is .text and the symbol is relative to + * the library base + */ +static unsigned long __init find_function32(struct lib32_elfinfo *lib, const char *symname) +{ + Elf32_Sym *sym = find_symbol32(lib, symname); + + if (sym == NULL) { + printk(KERN_WARNING "vDSO32: function %s not found !\n", symname); + return 0; + } + return sym->st_value - VDSO32_LBASE; +} + +/* Note that we assume the section is .text and the symbol is relative to + * the library base + */ +static unsigned long __init find_function64(struct lib64_elfinfo *lib, const char *symname) +{ + Elf64_Sym *sym = find_symbol64(lib, symname); + + if (sym == NULL) { + printk(KERN_WARNING "vDSO64: function %s not found !\n", symname); + return 0; + } +#ifdef VDS64_HAS_DESCRIPTORS + return *((u64 *)(vdso64_kbase + sym->st_value - VDSO64_LBASE)) - VDSO64_LBASE; +#else + return sym->st_value - VDSO64_LBASE; +#endif +} + + +static __init int vdso_do_find_sections(struct lib32_elfinfo *v32, + struct lib64_elfinfo *v64) +{ + void *sect; + + /* + * Locate symbol tables & text section + */ + + v32->dynsym = find_section32(v32->hdr, ".dynsym", &v32->dynsymsize); + v32->dynstr = find_section32(v32->hdr, ".dynstr", NULL); + if (v32->dynsym == NULL || v32->dynstr == NULL) { + printk(KERN_ERR "vDSO32: a required symbol section was not found\n"); + return -1; + } + sect = find_section32(v32->hdr, ".text", NULL); + if (sect == NULL) { + printk(KERN_ERR "vDSO32: the .text section was not found\n"); + return -1; + } + v32->text = sect - vdso32_kbase; + + v64->dynsym = find_section64(v64->hdr, ".dynsym", &v64->dynsymsize); + v64->dynstr = find_section64(v64->hdr, ".dynstr", NULL); + if (v64->dynsym == NULL || v64->dynstr == NULL) { + printk(KERN_ERR "vDSO64: a required symbol section was not found\n"); + return -1; + } + sect = find_section64(v64->hdr, ".text", NULL); + if (sect == NULL) { + printk(KERN_ERR "vDSO64: the .text section was not found\n"); + return -1; + } + v64->text = sect - vdso64_kbase; + + return 0; +} + +static __init void vdso_setup_trampolines(struct lib32_elfinfo *v32, + struct lib64_elfinfo *v64) +{ + /* + * Find signal trampolines + */ + + vdso64_rt_sigtramp = find_function64(v64, "__kernel_sigtramp_rt64"); + vdso32_sigtramp = find_function32(v32, "__kernel_sigtramp32"); + vdso32_rt_sigtramp = find_function32(v32, "__kernel_sigtramp_rt32"); +} + +static __init int vdso_fixup_datapage(struct lib32_elfinfo *v32, + struct lib64_elfinfo *v64) +{ + Elf32_Sym *sym32; + Elf64_Sym *sym64; + + sym32 = find_symbol32(v32, "__kernel_datapage_offset"); + if (sym32 == NULL) { + printk(KERN_ERR "vDSO32: Can't find symbol __kernel_datapage_offset !\n"); + return -1; + } + *((int *)(vdso32_kbase + (sym32->st_value - VDSO32_LBASE))) = + (vdso32_pages << PAGE_SHIFT) - (sym32->st_value - VDSO32_LBASE); + + sym64 = find_symbol64(v64, "__kernel_datapage_offset"); + if (sym64 == NULL) { + printk(KERN_ERR "vDSO64: Can't find symbol __kernel_datapage_offset !\n"); + return -1; + } + *((int *)(vdso64_kbase + sym64->st_value - VDSO64_LBASE)) = + (vdso64_pages << PAGE_SHIFT) - (sym64->st_value - VDSO64_LBASE); + + return 0; +} + +static int vdso_do_func_patch32(struct lib32_elfinfo *v32, + struct lib64_elfinfo *v64, + const char *orig, const char *fix) +{ + Elf32_Sym *sym32_gen, *sym32_fix; + + sym32_gen = find_symbol32(v32, orig); + if (sym32_gen == NULL) { + printk(KERN_ERR "vDSO32: Can't find symbol %s !\n", orig); + return -1; + } + sym32_fix = find_symbol32(v32, fix); + if (sym32_fix == NULL) { + printk(KERN_ERR "vDSO32: Can't find symbol %s !\n", fix); + return -1; + } + sym32_gen->st_value = sym32_fix->st_value; + sym32_gen->st_size = sym32_fix->st_size; + sym32_gen->st_info = sym32_fix->st_info; + sym32_gen->st_other = sym32_fix->st_other; + sym32_gen->st_shndx = sym32_fix->st_shndx; + + return 0; +} + +static int vdso_do_func_patch64(struct lib32_elfinfo *v32, + struct lib64_elfinfo *v64, + const char *orig, const char *fix) +{ + Elf64_Sym *sym64_gen, *sym64_fix; + + sym64_gen = find_symbol64(v64, orig); + if (sym64_gen == NULL) { + printk(KERN_ERR "vDSO64: Can't find symbol %s !\n", orig); + return -1; + } + sym64_fix = find_symbol64(v64, fix); + if (sym64_fix == NULL) { + printk(KERN_ERR "vDSO64: Can't find symbol %s !\n", fix); + return -1; + } + sym64_gen->st_value = sym64_fix->st_value; + sym64_gen->st_size = sym64_fix->st_size; + sym64_gen->st_info = sym64_fix->st_info; + sym64_gen->st_other = sym64_fix->st_other; + sym64_gen->st_shndx = sym64_fix->st_shndx; + + return 0; +} + +static __init int vdso_fixup_alt_funcs(struct lib32_elfinfo *v32, + struct lib64_elfinfo *v64) +{ + u32 pvr; + int i; + + pvr = mfspr(SPRN_PVR); + for (i = 0; i < ARRAY_SIZE(vdso_patches); i++) { + struct vdso_patch_def *patch = &vdso_patches[i]; + int match = (pvr & patch->pvr_mask) == patch->pvr_value; + + DBG("patch %d (mask: %x, pvr: %x) : %s\n", + i, patch->pvr_mask, patch->pvr_value, match ? "match" : "skip"); + + if (!match) + continue; + + DBG("replacing %s with %s...\n", patch->gen_name, patch->fix_name); + + /* + * Patch the 32 bits and 64 bits symbols. Note that we do not patch + * the "." symbol on 64 bits. It would be easy to do, but doesn't + * seem to be necessary, patching the OPD symbol is enough. + */ + vdso_do_func_patch32(v32, v64, patch->gen_name, patch->fix_name); + vdso_do_func_patch64(v32, v64, patch->gen_name, patch->fix_name); + } + + return 0; +} + + +static __init int vdso_setup(void) +{ + struct lib32_elfinfo v32; + struct lib64_elfinfo v64; + + v32.hdr = vdso32_kbase; + v64.hdr = vdso64_kbase; + + if (vdso_do_find_sections(&v32, &v64)) + return -1; + + if (vdso_fixup_datapage(&v32, &v64)) + return -1; + + if (vdso_fixup_alt_funcs(&v32, &v64)) + return -1; + + vdso_setup_trampolines(&v32, &v64); + + return 0; +} + +void __init vdso_init(void) +{ + int i; + + vdso64_pages = (&vdso64_end - &vdso64_start) >> PAGE_SHIFT; + vdso32_pages = (&vdso32_end - &vdso32_start) >> PAGE_SHIFT; + + DBG("vdso64_kbase: %p, 0x%x pages, vdso32_kbase: %p, 0x%x pages\n", + vdso64_kbase, vdso64_pages, vdso32_kbase, vdso32_pages); + + /* + * Initialize the vDSO images in memory, that is do necessary + * fixups of vDSO symbols, locate trampolines, etc... + */ + if (vdso_setup()) { + printk(KERN_ERR "vDSO setup failure, not enabled !\n"); + /* XXX should free pages here ? */ + vdso64_pages = vdso32_pages = 0; + return; + } + + /* Make sure pages are in the correct state */ + for (i = 0; i < vdso64_pages; i++) { + struct page *pg = virt_to_page(vdso64_kbase + i*PAGE_SIZE); + ClearPageReserved(pg); + get_page(pg); + } + for (i = 0; i < vdso32_pages; i++) { + struct page *pg = virt_to_page(vdso32_kbase + i*PAGE_SIZE); + ClearPageReserved(pg); + get_page(pg); + } +} + +int in_gate_area_no_task(unsigned long addr) +{ + return 0; +} + +int in_gate_area(struct task_struct *task, unsigned long addr) +{ + return 0; +} + +struct vm_area_struct *get_gate_vma(struct task_struct *tsk) +{ + return NULL; +} + diff -Nru a/arch/ppc64/kernel/vdso32/Makefile b/arch/ppc64/kernel/vdso32/Makefile --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/vdso32/Makefile 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,36 @@ + +# List of files in the vdso, has to be asm only for now + +obj-vdso32 = sigtramp.o gettimeofday.o datapage.o cacheflush.o + +# Build rules + +targets := $(obj-vdso32) vdso32.so +obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32)) + + +EXTRA_CFLAGS := -shared -s -fno-common -fno-builtin +EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso32.so.1 +EXTRA_AFLAGS := -D__VDSO32__ -s + +obj-y += vdso32_wrapper.o +extra-y += vdso32.lds +CPPFLAGS_vdso32.lds += -P -C -U$(ARCH) + +# Force dependency (incbin is bad) +$(obj)/vdso32_wrapper.o : $(obj)/vdso32.so + +# link rule for the .so file, .lds has to be first +$(obj)/vdso32.so: $(src)/vdso32.lds $(obj-vdso32) + $(call if_changed,vdso32ld) + +# assembly rules for the .S files +$(obj-vdso32): %.o: %.S + $(call if_changed_dep,vdso32as) + +# actual build commands +quiet_cmd_vdso32ld = VDSO32L $@ + cmd_vdso32ld = $(CROSS32CC) $(c_flags) -Wl,-T $^ -o $@ +quiet_cmd_vdso32as = VDSO32A $@ + cmd_vdso32as = $(CROSS32CC) $(a_flags) -c -o $@ $< + diff -Nru a/arch/ppc64/kernel/vdso32/cacheflush.S b/arch/ppc64/kernel/vdso32/cacheflush.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/vdso32/cacheflush.S 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,65 @@ +/* + * vDSO provided cache flush routines + * + * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org), + * IBM Corp. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ +#include +#include +#include +#include +#include + + .text + +/* + * Default "generic" version of __kernel_sync_dicache. + * + * void __kernel_sync_dicache(unsigned long start, unsigned long end) + * + * Flushes the data cache & invalidate the instruction cache for the + * provided range [start, end[ + * + * Note: all CPUs supported by this kernel have a 128 bytes cache + * line size so we don't have to peek that info from the datapage + */ +V_FUNCTION_BEGIN(__kernel_sync_dicache) + .cfi_startproc + li r5,127 + andc r6,r3,r5 /* round low to line bdy */ + subf r8,r6,r4 /* compute length */ + add r8,r8,r5 /* ensure we get enough */ + srwi. r8,r8,7 /* compute line count */ + beqlr /* nothing to do? */ + mtctr r8 + mr r3,r6 +1: dcbst 0,r3 + addi r3,r3,128 + bdnz 1b + sync + mtctr r8 +1: icbi 0,r6 + addi r6,r6,128 + bdnz 1b + isync + blr + .cfi_endproc +V_FUNCTION_END(__kernel_sync_dicache) + + +/* + * POWER5 version of __kernel_sync_dicache + */ +V_FUNCTION_BEGIN(__kernel_sync_dicache_p5) + .cfi_startproc + sync + isync + blr + .cfi_endproc +V_FUNCTION_END(__kernel_sync_dicache_p5) + diff -Nru a/arch/ppc64/kernel/vdso32/datapage.S b/arch/ppc64/kernel/vdso32/datapage.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/vdso32/datapage.S 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,68 @@ +/* + * Access to the shared data page by the vDSO & syscall map + * + * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org), IBM Corp. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#include +#include +#include +#include +#include +#include + + .text +V_FUNCTION_BEGIN(__get_datapage) + .cfi_startproc + /* We don't want that exposed or overridable as we want other objects + * to be able to bl directly to here + */ + .protected __get_datapage + .hidden __get_datapage + + mflr r0 + .cfi_register lr,r0 + + bcl 20,31,1f + .global __kernel_datapage_offset; +__kernel_datapage_offset: + .long 0 +1: + mflr r3 + mtlr r0 + lwz r0,0(r3) + add r3,r0,r3 + blr + .cfi_endproc +V_FUNCTION_END(__get_datapage) + +/* + * void *__kernel_get_syscall_map(unsigned int *syscall_count) ; + * + * returns a pointer to the syscall map. the map is agnostic to the + * size of "long", unlike kernel bitops, it stores bits from top to + * bottom so that memory actually contains a linear bitmap + * check for syscall N by testing bit (0x80000000 >> (N & 0x1f)) of + * 32 bits int at N >> 5. + */ +V_FUNCTION_BEGIN(__kernel_get_syscall_map) + .cfi_startproc + mflr r12 + .cfi_register lr,r12 + + mr r4,r3 + bl __get_datapage + mtlr r12 + addi r3,r3,CFG_SYSCALL_MAP32 + cmpli cr0,r4,0 + beqlr + li r0,__NR_syscalls + stw r0,0(r4) + blr + .cfi_endproc +V_FUNCTION_END(__kernel_get_syscall_map) diff -Nru a/arch/ppc64/kernel/vdso32/gettimeofday.S b/arch/ppc64/kernel/vdso32/gettimeofday.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/vdso32/gettimeofday.S 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,139 @@ +/* + * Userland implementation of gettimeofday() for 32 bits processes in a + * ppc64 kernel for use in the vDSO + * + * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org), IBM Corp. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ +#include +#include +#include +#include +#include +#include + + .text +/* + * Exact prototype of gettimeofday + * + * int __kernel_gettimeofday(struct timeval *tv, struct timezone *tz); + * + */ +V_FUNCTION_BEGIN(__kernel_gettimeofday) + .cfi_startproc + mflr r12 + .cfi_register lr,r12 + + mr r10,r3 /* r10 saves tv */ + mr r11,r4 /* r11 saves tz */ + bl __get_datapage /* get data page */ + mr r9, r3 /* datapage ptr in r9 */ + bl __do_get_xsec /* get xsec from tb & kernel */ + bne- 2f /* out of line -> do syscall */ + + /* seconds are xsec >> 20 */ + rlwinm r5,r4,12,20,31 + rlwimi r5,r3,12,0,19 + stw r5,TVAL32_TV_SEC(r10) + + /* get remaining xsec and convert to usec. we scale + * up remaining xsec by 12 bits and get the top 32 bits + * of the multiplication + */ + rlwinm r5,r4,12,0,19 + lis r6,1000000@h + ori r6,r6,1000000@l + mulhwu r5,r5,r6 + stw r5,TVAL32_TV_USEC(r10) + + cmpli cr0,r11,0 /* check if tz is NULL */ + beq 1f + lwz r4,CFG_TZ_MINUTEWEST(r9)/* fill tz */ + lwz r5,CFG_TZ_DSTTIME(r9) + stw r4,TZONE_TZ_MINWEST(r11) + stw r5,TZONE_TZ_DSTTIME(r11) + +1: mtlr r12 + blr + +2: mr r3,r10 + mr r4,r11 + li r0,__NR_gettimeofday + sc + b 1b + .cfi_endproc +V_FUNCTION_END(__kernel_gettimeofday) + +/* + * This is the core of gettimeofday(), it returns the xsec + * value in r3 & r4 and expects the datapage ptr (non clobbered) + * in r9. clobbers r0,r4,r5,r6,r7,r8 +*/ +__do_get_xsec: + .cfi_startproc + /* Check for update count & load values. We use the low + * order 32 bits of the update count + */ +1: lwz r8,(CFG_TB_UPDATE_COUNT+4)(r9) + andi. r0,r8,1 /* pending update ? loop */ + bne- 1b + xor r0,r8,r8 /* create dependency */ + add r9,r9,r0 + + /* Load orig stamp (offset to TB) */ + lwz r5,CFG_TB_ORIG_STAMP(r9) + lwz r6,(CFG_TB_ORIG_STAMP+4)(r9) + + /* Get a stable TB value */ +2: mftbu r3 + mftbl r4 + mftbu r0 + cmpl cr0,r3,r0 + bne- 2b + + /* Substract tb orig stamp. If the high part is non-zero, we jump to the + * slow path which call the syscall. If it's ok, then we have our 32 bits + * tb_ticks value in r7 + */ + subfc r7,r6,r4 + subfe. r0,r5,r3 + bne- 3f + + /* Load scale factor & do multiplication */ + lwz r5,CFG_TB_TO_XS(r9) /* load values */ + lwz r6,(CFG_TB_TO_XS+4)(r9) + mulhwu r4,r7,r5 + mulhwu r6,r7,r6 + mullw r6,r7,r5 + addc r6,r6,r0 + + /* At this point, we have the scaled xsec value in r4 + XER:CA + * we load & add the stamp since epoch + */ + lwz r5,CFG_STAMP_XSEC(r9) + lwz r6,(CFG_STAMP_XSEC+4)(r9) + adde r4,r4,r6 + addze r3,r5 + + /* We now have our result in r3,r4. We create a fake dependency + * on that result and re-check the counter + */ + xor r0,r4,r4 + add r9,r9,r0 + lwz r0,(CFG_TB_UPDATE_COUNT+4)(r9) + cmpl cr0,r8,r0 /* check if updated */ + bne- 1b + + /* Warning ! The caller expects CR:EQ to be set to indicate a + * successful calculation (so it won't fallback to the syscall + * method). We have overriden that CR bit in the counter check, + * but fortunately, the loop exit condition _is_ CR:EQ set, so + * we can exit safely here. If you change this code, be careful + * of that side effect. + */ +3: blr + .cfi_endproc diff -Nru a/arch/ppc64/kernel/vdso32/sigtramp.S b/arch/ppc64/kernel/vdso32/sigtramp.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/vdso32/sigtramp.S 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,300 @@ +/* + * Signal trampolines for 32 bits processes in a ppc64 kernel for + * use in the vDSO + * + * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org), IBM Corp. + * Copyright (C) 2004 Alan Modra (amodra@au.ibm.com)), IBM Corp. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ +#include +#include +#include +#include +#include + + .text + +/* The nop here is a hack. The dwarf2 unwind routines subtract 1 from + the return address to get an address in the middle of the presumed + call instruction. Since we don't have a call here, we artifically + extend the range covered by the unwind info by adding a nop before + the real start. */ + nop +V_FUNCTION_BEGIN(__kernel_sigtramp32) +.Lsig_start = . - 4 + li r0,__NR_sigreturn + sc +.Lsig_end: +V_FUNCTION_END(__kernel_sigtramp32) + +.Lsigrt_start: + nop +V_FUNCTION_BEGIN(__kernel_sigtramp_rt32) + li r0,__NR_rt_sigreturn + sc +.Lsigrt_end: +V_FUNCTION_END(__kernel_sigtramp_rt32) + + .section .eh_frame,"a",@progbits + +/* Register r1 can be found at offset 4 of a pt_regs structure. + A pointer to the pt_regs is stored in memory at the old sp plus PTREGS. */ +#define cfa_save \ + .byte 0x0f; /* DW_CFA_def_cfa_expression */ \ + .uleb128 9f - 1f; /* length */ \ +1: \ + .byte 0x71; .sleb128 PTREGS; /* DW_OP_breg1 */ \ + .byte 0x06; /* DW_OP_deref */ \ + .byte 0x23; .uleb128 RSIZE; /* DW_OP_plus_uconst */ \ + .byte 0x06; /* DW_OP_deref */ \ +9: + +/* Register REGNO can be found at offset OFS of a pt_regs structure. + A pointer to the pt_regs is stored in memory at the old sp plus PTREGS. */ +#define rsave(regno, ofs) \ + .byte 0x10; /* DW_CFA_expression */ \ + .uleb128 regno; /* regno */ \ + .uleb128 9f - 1f; /* length */ \ +1: \ + .byte 0x71; .sleb128 PTREGS; /* DW_OP_breg1 */ \ + .byte 0x06; /* DW_OP_deref */ \ + .ifne ofs; \ + .byte 0x23; .uleb128 ofs; /* DW_OP_plus_uconst */ \ + .endif; \ +9: + +/* If msr bit 1<<25 is set, then VMX register REGNO is at offset REGNO*16 + of the VMX reg struct. The VMX reg struct is at offset VREGS of + the pt_regs struct. This macro is for REGNO == 0, and contains + 'subroutines' that the other macros jump to. */ +#define vsave_msr0(regno) \ + .byte 0x10; /* DW_CFA_expression */ \ + .uleb128 regno + 77; /* regno */ \ + .uleb128 9f - 1f; /* length */ \ +1: \ + .byte 0x30 + regno; /* DW_OP_lit0 */ \ +2: \ + .byte 0x40; /* DW_OP_lit16 */ \ + .byte 0x1e; /* DW_OP_mul */ \ +3: \ + .byte 0x71; .sleb128 PTREGS; /* DW_OP_breg1 */ \ + .byte 0x06; /* DW_OP_deref */ \ + .byte 0x12; /* DW_OP_dup */ \ + .byte 0x23; /* DW_OP_plus_uconst */ \ + .uleb128 33*RSIZE; /* msr offset */ \ + .byte 0x06; /* DW_OP_deref */ \ + .byte 0x0c; .long 1 << 25; /* DW_OP_const4u */ \ + .byte 0x1a; /* DW_OP_and */ \ + .byte 0x12; /* DW_OP_dup, ret 0 if bra taken */ \ + .byte 0x30; /* DW_OP_lit0 */ \ + .byte 0x29; /* DW_OP_eq */ \ + .byte 0x28; .short 0x7fff; /* DW_OP_bra to end */ \ + .byte 0x13; /* DW_OP_drop, pop the 0 */ \ + .byte 0x23; .uleb128 VREGS; /* DW_OP_plus_uconst */ \ + .byte 0x22; /* DW_OP_plus */ \ + .byte 0x2f; .short 0x7fff; /* DW_OP_skip to end */ \ +9: + +/* If msr bit 1<<25 is set, then VMX register REGNO is at offset REGNO*16 + of the VMX reg struct. REGNO is 1 thru 31. */ +#define vsave_msr1(regno) \ + .byte 0x10; /* DW_CFA_expression */ \ + .uleb128 regno + 77; /* regno */ \ + .uleb128 9f - 1f; /* length */ \ +1: \ + .byte 0x30 + regno; /* DW_OP_lit n */ \ + .byte 0x2f; .short 2b - 9f; /* DW_OP_skip */ \ +9: + +/* If msr bit 1<<25 is set, then VMX register REGNO is at offset OFS of + the VMX save block. */ +#define vsave_msr2(regno, ofs) \ + .byte 0x10; /* DW_CFA_expression */ \ + .uleb128 regno + 77; /* regno */ \ + .uleb128 9f - 1f; /* length */ \ +1: \ + .byte 0x0a; .short ofs; /* DW_OP_const2u */ \ + .byte 0x2f; .short 3b - 9f; /* DW_OP_skip */ \ +9: + +/* VMX register REGNO is at offset OFS of the VMX save area. */ +#define vsave(regno, ofs) \ + .byte 0x10; /* DW_CFA_expression */ \ + .uleb128 regno + 77; /* regno */ \ + .uleb128 9f - 1f; /* length */ \ +1: \ + .byte 0x71; .sleb128 PTREGS; /* DW_OP_breg1 */ \ + .byte 0x06; /* DW_OP_deref */ \ + .byte 0x23; .uleb128 VREGS; /* DW_OP_plus_uconst */ \ + .byte 0x23; .uleb128 ofs; /* DW_OP_plus_uconst */ \ +9: + +/* This is where the pt_regs pointer can be found on the stack. */ +#define PTREGS 64+28 + +/* Size of regs. */ +#define RSIZE 4 + +/* This is the offset of the VMX regs. */ +#define VREGS 48*RSIZE+34*8 + +/* Describe where general purpose regs are saved. */ +#define EH_FRAME_GEN \ + cfa_save; \ + rsave ( 0, 0*RSIZE); \ + rsave ( 2, 2*RSIZE); \ + rsave ( 3, 3*RSIZE); \ + rsave ( 4, 4*RSIZE); \ + rsave ( 5, 5*RSIZE); \ + rsave ( 6, 6*RSIZE); \ + rsave ( 7, 7*RSIZE); \ + rsave ( 8, 8*RSIZE); \ + rsave ( 9, 9*RSIZE); \ + rsave (10, 10*RSIZE); \ + rsave (11, 11*RSIZE); \ + rsave (12, 12*RSIZE); \ + rsave (13, 13*RSIZE); \ + rsave (14, 14*RSIZE); \ + rsave (15, 15*RSIZE); \ + rsave (16, 16*RSIZE); \ + rsave (17, 17*RSIZE); \ + rsave (18, 18*RSIZE); \ + rsave (19, 19*RSIZE); \ + rsave (20, 20*RSIZE); \ + rsave (21, 21*RSIZE); \ + rsave (22, 22*RSIZE); \ + rsave (23, 23*RSIZE); \ + rsave (24, 24*RSIZE); \ + rsave (25, 25*RSIZE); \ + rsave (26, 26*RSIZE); \ + rsave (27, 27*RSIZE); \ + rsave (28, 28*RSIZE); \ + rsave (29, 29*RSIZE); \ + rsave (30, 30*RSIZE); \ + rsave (31, 31*RSIZE); \ + rsave (67, 32*RSIZE); /* ap, used as temp for nip */ \ + rsave (65, 36*RSIZE); /* lr */ \ + rsave (70, 38*RSIZE) /* cr */ + +/* Describe where the FP regs are saved. */ +#define EH_FRAME_FP \ + rsave (32, 48*RSIZE + 0*8); \ + rsave (33, 48*RSIZE + 1*8); \ + rsave (34, 48*RSIZE + 2*8); \ + rsave (35, 48*RSIZE + 3*8); \ + rsave (36, 48*RSIZE + 4*8); \ + rsave (37, 48*RSIZE + 5*8); \ + rsave (38, 48*RSIZE + 6*8); \ + rsave (39, 48*RSIZE + 7*8); \ + rsave (40, 48*RSIZE + 8*8); \ + rsave (41, 48*RSIZE + 9*8); \ + rsave (42, 48*RSIZE + 10*8); \ + rsave (43, 48*RSIZE + 11*8); \ + rsave (44, 48*RSIZE + 12*8); \ + rsave (45, 48*RSIZE + 13*8); \ + rsave (46, 48*RSIZE + 14*8); \ + rsave (47, 48*RSIZE + 15*8); \ + rsave (48, 48*RSIZE + 16*8); \ + rsave (49, 48*RSIZE + 17*8); \ + rsave (50, 48*RSIZE + 18*8); \ + rsave (51, 48*RSIZE + 19*8); \ + rsave (52, 48*RSIZE + 20*8); \ + rsave (53, 48*RSIZE + 21*8); \ + rsave (54, 48*RSIZE + 22*8); \ + rsave (55, 48*RSIZE + 23*8); \ + rsave (56, 48*RSIZE + 24*8); \ + rsave (57, 48*RSIZE + 25*8); \ + rsave (58, 48*RSIZE + 26*8); \ + rsave (59, 48*RSIZE + 27*8); \ + rsave (60, 48*RSIZE + 28*8); \ + rsave (61, 48*RSIZE + 29*8); \ + rsave (62, 48*RSIZE + 30*8); \ + rsave (63, 48*RSIZE + 31*8) + +/* Describe where the VMX regs are saved. */ +#ifdef CONFIG_ALTIVEC +#define EH_FRAME_VMX \ + vsave_msr0 ( 0); \ + vsave_msr1 ( 1); \ + vsave_msr1 ( 2); \ + vsave_msr1 ( 3); \ + vsave_msr1 ( 4); \ + vsave_msr1 ( 5); \ + vsave_msr1 ( 6); \ + vsave_msr1 ( 7); \ + vsave_msr1 ( 8); \ + vsave_msr1 ( 9); \ + vsave_msr1 (10); \ + vsave_msr1 (11); \ + vsave_msr1 (12); \ + vsave_msr1 (13); \ + vsave_msr1 (14); \ + vsave_msr1 (15); \ + vsave_msr1 (16); \ + vsave_msr1 (17); \ + vsave_msr1 (18); \ + vsave_msr1 (19); \ + vsave_msr1 (20); \ + vsave_msr1 (21); \ + vsave_msr1 (22); \ + vsave_msr1 (23); \ + vsave_msr1 (24); \ + vsave_msr1 (25); \ + vsave_msr1 (26); \ + vsave_msr1 (27); \ + vsave_msr1 (28); \ + vsave_msr1 (29); \ + vsave_msr1 (30); \ + vsave_msr1 (31); \ + vsave_msr2 (33, 32*16+12); \ + vsave (32, 32*16) +#else +#define EH_FRAME_VMX +#endif + +.Lcie: + .long .Lcie_end - .Lcie_start +.Lcie_start: + .long 0 /* CIE ID */ + .byte 1 /* Version number */ + .string "zR" /* NUL-terminated augmentation string */ + .uleb128 4 /* Code alignment factor */ + .sleb128 -4 /* Data alignment factor */ + .byte 67 /* Return address register column, ap */ + .uleb128 1 /* Augmentation value length */ + .byte 0x1b /* DW_EH_PE_pcrel | DW_EH_PE_sdata4. */ + .byte 0x0c,1,0 /* DW_CFA_def_cfa: r1 ofs 0 */ + .balign 4 +.Lcie_end: + + .long .Lfde0_end - .Lfde0_start +.Lfde0_start: + .long .Lfde0_start - .Lcie /* CIE pointer. */ + .long .Lsig_start - . /* PC start, length */ + .long .Lsig_end - .Lsig_start + .uleb128 0 /* Augmentation */ + EH_FRAME_GEN + EH_FRAME_FP + EH_FRAME_VMX + .balign 4 +.Lfde0_end: + +/* We have a different stack layout for rt_sigreturn. */ +#undef PTREGS +#define PTREGS 64+16+128+20+28 + + .long .Lfde1_end - .Lfde1_start +.Lfde1_start: + .long .Lfde1_start - .Lcie /* CIE pointer. */ + .long .Lsigrt_start - . /* PC start, length */ + .long .Lsigrt_end - .Lsigrt_start + .uleb128 0 /* Augmentation */ + EH_FRAME_GEN + EH_FRAME_FP + EH_FRAME_VMX + .balign 4 +.Lfde1_end: diff -Nru a/arch/ppc64/kernel/vdso32/vdso32.lds.S b/arch/ppc64/kernel/vdso32/vdso32.lds.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/vdso32/vdso32.lds.S 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,111 @@ + +/* + * This is the infamous ld script for the 32 bits vdso + * library + */ +#include + +/* Default link addresses for the vDSOs */ +OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc") +OUTPUT_ARCH(powerpc:common) +ENTRY(_start) + +SECTIONS +{ + . = VDSO32_LBASE + SIZEOF_HEADERS; + .hash : { *(.hash) } :text + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } + .gnu.version : { *(.gnu.version) } + .gnu.version_d : { *(.gnu.version_d) } + .gnu.version_r : { *(.gnu.version_r) } + + . = ALIGN (16); + .text : + { + *(.text .stub .text.* .gnu.linkonce.t.*) + } + PROVIDE (__etext = .); + PROVIDE (_etext = .); + PROVIDE (etext = .); + + /* Other stuff is appended to the text segment: */ + .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } + .rodata1 : { *(.rodata1) } + + .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr + .eh_frame : { KEEP (*(.eh_frame)) } :text + .gcc_except_table : { *(.gcc_except_table) } + .fixup : { *(.fixup) } + + .got ALIGN(4) : { *(.got.plt) *(.got) } + + .dynamic : { *(.dynamic) } :text :dynamic + + _end = .; + __end = .; + PROVIDE (end = .); + + + /* Stabs debugging sections are here too + */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } + .debug 0 : { *(.debug) } + .line 0 : { *(.line) } + + .debug_srcinfo 0 : { *(.debug_srcinfo) } + .debug_sfnames 0 : { *(.debug_sfnames) } + + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + + .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_line 0 : { *(.debug_line) } + .debug_frame 0 : { *(.debug_frame) } + .debug_str 0 : { *(.debug_str) } + .debug_loc 0 : { *(.debug_loc) } + .debug_macinfo 0 : { *(.debug_macinfo) } + + .debug_weaknames 0 : { *(.debug_weaknames) } + .debug_funcnames 0 : { *(.debug_funcnames) } + .debug_typenames 0 : { *(.debug_typenames) } + .debug_varnames 0 : { *(.debug_varnames) } + + /DISCARD/ : { *(.note.GNU-stack) } + /DISCARD/ : { *(.data .data.* .gnu.linkonce.d.* .sdata*) } + /DISCARD/ : { *(.bss .sbss .dynbss .dynsbss) } +} + + +PHDRS +{ + text PT_LOAD FILEHDR PHDRS FLAGS(5); /* PF_R|PF_X */ + dynamic PT_DYNAMIC FLAGS(4); /* PF_R */ + eh_frame_hdr 0x6474e550; /* PT_GNU_EH_FRAME, but ld doesn't match the name */ +} + + +/* + * This controls what symbols we export from the DSO. + */ +VERSION +{ + VDSO_VERSION_STRING { + global: + __kernel_datapage_offset; /* Has to be there for the kernel to find it */ + __kernel_get_syscall_map; + __kernel_gettimeofday; + __kernel_sync_dicache; + __kernel_sync_dicache_p5; + __kernel_sigtramp32; + __kernel_sigtramp_rt32; + local: *; + }; +} diff -Nru a/arch/ppc64/kernel/vdso32/vdso32_wrapper.S b/arch/ppc64/kernel/vdso32/vdso32_wrapper.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/vdso32/vdso32_wrapper.S 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,13 @@ +#include +#include + + .section ".data.page_aligned" + + .globl vdso32_start, vdso32_end + .balign PAGE_SIZE +vdso32_start: + .incbin "arch/ppc64/kernel/vdso32/vdso32.so" + .balign PAGE_SIZE +vdso32_end: + + .previous diff -Nru a/arch/ppc64/kernel/vdso64/Makefile b/arch/ppc64/kernel/vdso64/Makefile --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/vdso64/Makefile 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,35 @@ +# List of files in the vdso, has to be asm only for now + +obj-vdso64 = sigtramp.o gettimeofday.o datapage.o cacheflush.o + +# Build rules + +targets := $(obj-vdso64) vdso64.so +obj-vdso64 := $(addprefix $(obj)/, $(obj-vdso64)) + +EXTRA_CFLAGS := -shared -s -fno-common -fno-builtin +EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso64.so.1 +EXTRA_AFLAGS := -D__VDSO64__ -s + +obj-y += vdso64_wrapper.o +extra-y += vdso64.lds +CPPFLAGS_vdso64.lds += -P -C -U$(ARCH) + +# Force dependency (incbin is bad) +$(obj)/vdso64_wrapper.o : $(obj)/vdso64.so + +# link rule for the .so file, .lds has to be first +$(obj)/vdso64.so: $(src)/vdso64.lds $(obj-vdso64) + $(call if_changed,vdso64ld) + +# assembly rules for the .S files +$(obj-vdso64): %.o: %.S + $(call if_changed_dep,vdso64as) + +# actual build commands +quiet_cmd_vdso64ld = VDSO64L $@ + cmd_vdso64ld = $(CC) $(c_flags) -Wl,-T $^ -o $@ +quiet_cmd_vdso64as = VDSO64A $@ + cmd_vdso64as = $(CC) $(a_flags) -c -o $@ $< + + diff -Nru a/arch/ppc64/kernel/vdso64/cacheflush.S b/arch/ppc64/kernel/vdso64/cacheflush.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/vdso64/cacheflush.S 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,64 @@ +/* + * vDSO provided cache flush routines + * + * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org), + * IBM Corp. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ +#include +#include +#include +#include +#include + + .text + +/* + * Default "generic" version of __kernel_sync_dicache. + * + * void __kernel_sync_dicache(unsigned long start, unsigned long end) + * + * Flushes the data cache & invalidate the instruction cache for the + * provided range [start, end[ + * + * Note: all CPUs supported by this kernel have a 128 bytes cache + * line size so we don't have to peek that info from the datapage + */ +V_FUNCTION_BEGIN(__kernel_sync_dicache) + .cfi_startproc + li r5,127 + andc r6,r3,r5 /* round low to line bdy */ + subf r8,r6,r4 /* compute length */ + add r8,r8,r5 /* ensure we get enough */ + srwi. r8,r8,7 /* compute line count */ + beqlr /* nothing to do? */ + mtctr r8 + mr r3,r6 +1: dcbst 0,r3 + addi r3,r3,128 + bdnz 1b + sync + mtctr r8 +1: icbi 0,r6 + addi r6,r6,128 + bdnz 1b + isync + blr + .cfi_endproc +V_FUNCTION_END(__kernel_sync_dicache) + + +/* + * POWER5 version of __kernel_sync_dicache + */ +V_FUNCTION_BEGIN(__kernel_sync_dicache_p5) + .cfi_startproc + sync + isync + blr + .cfi_endproc +V_FUNCTION_END(__kernel_sync_dicache_p5) diff -Nru a/arch/ppc64/kernel/vdso64/datapage.S b/arch/ppc64/kernel/vdso64/datapage.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/vdso64/datapage.S 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,68 @@ +/* + * Access to the shared data page by the vDSO & syscall map + * + * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org), IBM Corp. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#include +#include +#include +#include +#include +#include + + .text +V_FUNCTION_BEGIN(__get_datapage) + .cfi_startproc + /* We don't want that exposed or overridable as we want other objects + * to be able to bl directly to here + */ + .protected __get_datapage + .hidden __get_datapage + + mflr r0 + .cfi_register lr,r0 + + bcl 20,31,1f + .global __kernel_datapage_offset; +__kernel_datapage_offset: + .long 0 +1: + mflr r3 + mtlr r0 + lwz r0,0(r3) + add r3,r0,r3 + blr + .cfi_endproc +V_FUNCTION_END(__get_datapage) + +/* + * void *__kernel_get_syscall_map(unsigned int *syscall_count) ; + * + * returns a pointer to the syscall map. the map is agnostic to the + * size of "long", unlike kernel bitops, it stores bits from top to + * bottom so that memory actually contains a linear bitmap + * check for syscall N by testing bit (0x80000000 >> (N & 0x1f)) of + * 32 bits int at N >> 5. + */ +V_FUNCTION_BEGIN(__kernel_get_syscall_map) + .cfi_startproc + mflr r12 + .cfi_register lr,r12 + + mr r4,r3 + bl V_LOCAL_FUNC(__get_datapage) + mtlr r12 + addi r3,r3,CFG_SYSCALL_MAP64 + cmpli cr0,r4,0 + beqlr + li r0,__NR_syscalls + stw r0,0(r4) + blr + .cfi_endproc +V_FUNCTION_END(__kernel_get_syscall_map) diff -Nru a/arch/ppc64/kernel/vdso64/gettimeofday.S b/arch/ppc64/kernel/vdso64/gettimeofday.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/vdso64/gettimeofday.S 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,91 @@ +/* + * Userland implementation of gettimeofday() for 64 bits processes in a + * ppc64 kernel for use in the vDSO + * + * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org), + * IBM Corp. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ +#include +#include +#include +#include +#include + + .text +/* + * Exact prototype of gettimeofday + * + * int __kernel_gettimeofday(struct timeval *tv, struct timezone *tz); + * + */ +V_FUNCTION_BEGIN(__kernel_gettimeofday) + .cfi_startproc + mflr r12 + .cfi_register lr,r12 + + mr r11,r3 /* r11 holds tv */ + mr r10,r4 /* r10 holds tz */ + bl V_LOCAL_FUNC(__get_datapage) /* get data page */ + bl V_LOCAL_FUNC(__do_get_xsec) /* get xsec from tb & kernel */ + lis r7,15 /* r7 = 1000000 = USEC_PER_SEC */ + ori r7,r7,16960 + rldicl r5,r4,44,20 /* r5 = sec = xsec / XSEC_PER_SEC */ + rldicr r6,r5,20,43 /* r6 = sec * XSEC_PER_SEC */ + std r5,TVAL64_TV_SEC(r11) /* store sec in tv */ + subf r0,r6,r4 /* r0 = xsec = (xsec - r6) */ + mulld r0,r0,r7 /* usec = (xsec * USEC_PER_SEC) / XSEC_PER_SEC */ + rldicl r0,r0,44,20 + cmpldi cr0,r10,0 /* check if tz is NULL */ + std r0,TVAL64_TV_USEC(r11) /* store usec in tv */ + beq 1f + lwz r4,CFG_TZ_MINUTEWEST(r3)/* fill tz */ + lwz r5,CFG_TZ_DSTTIME(r3) + stw r4,TZONE_TZ_MINWEST(r10) + stw r5,TZONE_TZ_DSTTIME(r10) +1: mtlr r12 + li r3,0 /* always success */ + blr + .cfi_endproc +V_FUNCTION_END(__kernel_gettimeofday) + + +/* + * This is the core of gettimeofday(), it returns the xsec + * value in r4 and expects the datapage ptr (non clobbered) + * in r3. clobbers r0,r4,r5,r6,r7,r8 +*/ +V_FUNCTION_BEGIN(__do_get_xsec) + .cfi_startproc + /* check for update count & load values */ +1: ld r7,CFG_TB_UPDATE_COUNT(r3) + andi. r0,r4,1 /* pending update ? loop */ + bne- 1b + xor r0,r4,r4 /* create dependency */ + add r3,r3,r0 + + /* Get TB & offset it */ + mftb r8 + ld r9,CFG_TB_ORIG_STAMP(r3) + subf r8,r9,r8 + + /* Scale result */ + ld r5,CFG_TB_TO_XS(r3) + mulhdu r8,r8,r5 + + /* Add stamp since epoch */ + ld r6,CFG_STAMP_XSEC(r3) + add r4,r6,r8 + + xor r0,r4,r4 + add r3,r3,r0 + ld r0,CFG_TB_UPDATE_COUNT(r3) + cmpld cr0,r0,r7 /* check if updated */ + bne- 1b + blr + .cfi_endproc +V_FUNCTION_END(__do_get_xsec) diff -Nru a/arch/ppc64/kernel/vdso64/sigtramp.S b/arch/ppc64/kernel/vdso64/sigtramp.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/vdso64/sigtramp.S 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,294 @@ +/* + * Signal trampoline for 64 bits processes in a ppc64 kernel for + * use in the vDSO + * + * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org), IBM Corp. + * Copyright (C) 2004 Alan Modra (amodra@au.ibm.com)), IBM Corp. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ +#include +#include +#include +#include +#include + + .text + +/* The nop here is a hack. The dwarf2 unwind routines subtract 1 from + the return address to get an address in the middle of the presumed + call instruction. Since we don't have a call here, we artifically + extend the range covered by the unwind info by padding before the + real start. */ + nop + .balign 8 +V_FUNCTION_BEGIN(__kernel_sigtramp_rt64) +.Lsigrt_start = . - 4 + addi r1, r1, __SIGNAL_FRAMESIZE + li r0,__NR_rt_sigreturn + sc +.Lsigrt_end: +V_FUNCTION_END(__kernel_sigtramp_rt64) +/* The ".balign 8" above and the following zeros mimic the old stack + trampoline layout. The last magic value is the ucontext pointer, + chosen in such a way that older libgcc unwind code returns a zero + for a sigcontext pointer. */ + .long 0,0,0 + .quad 0,-21*8 + +/* Register r1 can be found at offset 8 of a pt_regs structure. + A pointer to the pt_regs is stored in memory at the old sp plus PTREGS. */ +#define cfa_save \ + .byte 0x0f; /* DW_CFA_def_cfa_expression */ \ + .uleb128 9f - 1f; /* length */ \ +1: \ + .byte 0x71; .sleb128 PTREGS; /* DW_OP_breg1 */ \ + .byte 0x06; /* DW_OP_deref */ \ + .byte 0x23; .uleb128 RSIZE; /* DW_OP_plus_uconst */ \ + .byte 0x06; /* DW_OP_deref */ \ +9: + +/* Register REGNO can be found at offset OFS of a pt_regs structure. + A pointer to the pt_regs is stored in memory at the old sp plus PTREGS. */ +#define rsave(regno, ofs) \ + .byte 0x10; /* DW_CFA_expression */ \ + .uleb128 regno; /* regno */ \ + .uleb128 9f - 1f; /* length */ \ +1: \ + .byte 0x71; .sleb128 PTREGS; /* DW_OP_breg1 */ \ + .byte 0x06; /* DW_OP_deref */ \ + .ifne ofs; \ + .byte 0x23; .uleb128 ofs; /* DW_OP_plus_uconst */ \ + .endif; \ +9: + +/* If msr bit 1<<25 is set, then VMX register REGNO is at offset REGNO*16 + of the VMX reg struct. A pointer to the VMX reg struct is at VREGS in + the pt_regs struct. This macro is for REGNO == 0, and contains + 'subroutines' that the other macros jump to. */ +#define vsave_msr0(regno) \ + .byte 0x10; /* DW_CFA_expression */ \ + .uleb128 regno + 77; /* regno */ \ + .uleb128 9f - 1f; /* length */ \ +1: \ + .byte 0x30 + regno; /* DW_OP_lit0 */ \ +2: \ + .byte 0x40; /* DW_OP_lit16 */ \ + .byte 0x1e; /* DW_OP_mul */ \ +3: \ + .byte 0x71; .sleb128 PTREGS; /* DW_OP_breg1 */ \ + .byte 0x06; /* DW_OP_deref */ \ + .byte 0x12; /* DW_OP_dup */ \ + .byte 0x23; /* DW_OP_plus_uconst */ \ + .uleb128 33*RSIZE; /* msr offset */ \ + .byte 0x06; /* DW_OP_deref */ \ + .byte 0x0c; .long 1 << 25; /* DW_OP_const4u */ \ + .byte 0x1a; /* DW_OP_and */ \ + .byte 0x12; /* DW_OP_dup, ret 0 if bra taken */ \ + .byte 0x30; /* DW_OP_lit0 */ \ + .byte 0x29; /* DW_OP_eq */ \ + .byte 0x28; .short 0x7fff; /* DW_OP_bra to end */ \ + .byte 0x13; /* DW_OP_drop, pop the 0 */ \ + .byte 0x23; .uleb128 VREGS; /* DW_OP_plus_uconst */ \ + .byte 0x06; /* DW_OP_deref */ \ + .byte 0x22; /* DW_OP_plus */ \ + .byte 0x2f; .short 0x7fff; /* DW_OP_skip to end */ \ +9: + +/* If msr bit 1<<25 is set, then VMX register REGNO is at offset REGNO*16 + of the VMX reg struct. REGNO is 1 thru 31. */ +#define vsave_msr1(regno) \ + .byte 0x10; /* DW_CFA_expression */ \ + .uleb128 regno + 77; /* regno */ \ + .uleb128 9f - 1f; /* length */ \ +1: \ + .byte 0x30 + regno; /* DW_OP_lit n */ \ + .byte 0x2f; .short 2b - 9f; /* DW_OP_skip */ \ +9: + +/* If msr bit 1<<25 is set, then VMX register REGNO is at offset OFS of + the VMX save block. */ +#define vsave_msr2(regno, ofs) \ + .byte 0x10; /* DW_CFA_expression */ \ + .uleb128 regno + 77; /* regno */ \ + .uleb128 9f - 1f; /* length */ \ +1: \ + .byte 0x0a; .short ofs; /* DW_OP_const2u */ \ + .byte 0x2f; .short 3b - 9f; /* DW_OP_skip */ \ +9: + +/* VMX register REGNO is at offset OFS of the VMX save area. */ +#define vsave(regno, ofs) \ + .byte 0x10; /* DW_CFA_expression */ \ + .uleb128 regno + 77; /* regno */ \ + .uleb128 9f - 1f; /* length */ \ +1: \ + .byte 0x71; .sleb128 PTREGS; /* DW_OP_breg1 */ \ + .byte 0x06; /* DW_OP_deref */ \ + .byte 0x23; .uleb128 VREGS; /* DW_OP_plus_uconst */ \ + .byte 0x06; /* DW_OP_deref */ \ + .byte 0x23; .uleb128 ofs; /* DW_OP_plus_uconst */ \ +9: + +/* This is where the pt_regs pointer can be found on the stack. */ +#define PTREGS 128+168+56 + +/* Size of regs. */ +#define RSIZE 8 + +/* This is the offset of the VMX reg pointer. */ +#define VREGS 48*RSIZE+33*8 + +/* Describe where general purpose regs are saved. */ +#define EH_FRAME_GEN \ + cfa_save; \ + rsave ( 0, 0*RSIZE); \ + rsave ( 2, 2*RSIZE); \ + rsave ( 3, 3*RSIZE); \ + rsave ( 4, 4*RSIZE); \ + rsave ( 5, 5*RSIZE); \ + rsave ( 6, 6*RSIZE); \ + rsave ( 7, 7*RSIZE); \ + rsave ( 8, 8*RSIZE); \ + rsave ( 9, 9*RSIZE); \ + rsave (10, 10*RSIZE); \ + rsave (11, 11*RSIZE); \ + rsave (12, 12*RSIZE); \ + rsave (13, 13*RSIZE); \ + rsave (14, 14*RSIZE); \ + rsave (15, 15*RSIZE); \ + rsave (16, 16*RSIZE); \ + rsave (17, 17*RSIZE); \ + rsave (18, 18*RSIZE); \ + rsave (19, 19*RSIZE); \ + rsave (20, 20*RSIZE); \ + rsave (21, 21*RSIZE); \ + rsave (22, 22*RSIZE); \ + rsave (23, 23*RSIZE); \ + rsave (24, 24*RSIZE); \ + rsave (25, 25*RSIZE); \ + rsave (26, 26*RSIZE); \ + rsave (27, 27*RSIZE); \ + rsave (28, 28*RSIZE); \ + rsave (29, 29*RSIZE); \ + rsave (30, 30*RSIZE); \ + rsave (31, 31*RSIZE); \ + rsave (67, 32*RSIZE); /* ap, used as temp for nip */ \ + rsave (65, 36*RSIZE); /* lr */ \ + rsave (70, 38*RSIZE) /* cr */ + +/* Describe where the FP regs are saved. */ +#define EH_FRAME_FP \ + rsave (32, 48*RSIZE + 0*8); \ + rsave (33, 48*RSIZE + 1*8); \ + rsave (34, 48*RSIZE + 2*8); \ + rsave (35, 48*RSIZE + 3*8); \ + rsave (36, 48*RSIZE + 4*8); \ + rsave (37, 48*RSIZE + 5*8); \ + rsave (38, 48*RSIZE + 6*8); \ + rsave (39, 48*RSIZE + 7*8); \ + rsave (40, 48*RSIZE + 8*8); \ + rsave (41, 48*RSIZE + 9*8); \ + rsave (42, 48*RSIZE + 10*8); \ + rsave (43, 48*RSIZE + 11*8); \ + rsave (44, 48*RSIZE + 12*8); \ + rsave (45, 48*RSIZE + 13*8); \ + rsave (46, 48*RSIZE + 14*8); \ + rsave (47, 48*RSIZE + 15*8); \ + rsave (48, 48*RSIZE + 16*8); \ + rsave (49, 48*RSIZE + 17*8); \ + rsave (50, 48*RSIZE + 18*8); \ + rsave (51, 48*RSIZE + 19*8); \ + rsave (52, 48*RSIZE + 20*8); \ + rsave (53, 48*RSIZE + 21*8); \ + rsave (54, 48*RSIZE + 22*8); \ + rsave (55, 48*RSIZE + 23*8); \ + rsave (56, 48*RSIZE + 24*8); \ + rsave (57, 48*RSIZE + 25*8); \ + rsave (58, 48*RSIZE + 26*8); \ + rsave (59, 48*RSIZE + 27*8); \ + rsave (60, 48*RSIZE + 28*8); \ + rsave (61, 48*RSIZE + 29*8); \ + rsave (62, 48*RSIZE + 30*8); \ + rsave (63, 48*RSIZE + 31*8) + +/* Describe where the VMX regs are saved. */ +#ifdef CONFIG_ALTIVEC +#define EH_FRAME_VMX \ + vsave_msr0 ( 0); \ + vsave_msr1 ( 1); \ + vsave_msr1 ( 2); \ + vsave_msr1 ( 3); \ + vsave_msr1 ( 4); \ + vsave_msr1 ( 5); \ + vsave_msr1 ( 6); \ + vsave_msr1 ( 7); \ + vsave_msr1 ( 8); \ + vsave_msr1 ( 9); \ + vsave_msr1 (10); \ + vsave_msr1 (11); \ + vsave_msr1 (12); \ + vsave_msr1 (13); \ + vsave_msr1 (14); \ + vsave_msr1 (15); \ + vsave_msr1 (16); \ + vsave_msr1 (17); \ + vsave_msr1 (18); \ + vsave_msr1 (19); \ + vsave_msr1 (20); \ + vsave_msr1 (21); \ + vsave_msr1 (22); \ + vsave_msr1 (23); \ + vsave_msr1 (24); \ + vsave_msr1 (25); \ + vsave_msr1 (26); \ + vsave_msr1 (27); \ + vsave_msr1 (28); \ + vsave_msr1 (29); \ + vsave_msr1 (30); \ + vsave_msr1 (31); \ + vsave_msr2 (33, 32*16+12); \ + vsave (32, 33*16) +#else +#define EH_FRAME_VMX +#endif + + .section .eh_frame,"a",@progbits +.Lcie: + .long .Lcie_end - .Lcie_start +.Lcie_start: + .long 0 /* CIE ID */ + .byte 1 /* Version number */ + .string "zR" /* NUL-terminated augmentation string */ + .uleb128 4 /* Code alignment factor */ + .sleb128 -8 /* Data alignment factor */ + .byte 67 /* Return address register column, ap */ + .uleb128 1 /* Augmentation value length */ + .byte 0x14 /* DW_EH_PE_pcrel | DW_EH_PE_udata8. */ + .byte 0x0c,1,0 /* DW_CFA_def_cfa: r1 ofs 0 */ + .balign 8 +.Lcie_end: + + .long .Lfde0_end - .Lfde0_start +.Lfde0_start: + .long .Lfde0_start - .Lcie /* CIE pointer. */ + .quad .Lsigrt_start - . /* PC start, length */ + .quad .Lsigrt_end - .Lsigrt_start + .uleb128 0 /* Augmentation */ + EH_FRAME_GEN + EH_FRAME_FP + EH_FRAME_VMX +# Do we really need to describe the frame at this point? ie. will +# we ever have some call chain that returns somewhere past the addi? +# I don't think so, since gcc doesn't support async signals. +# .byte 0x41 /* DW_CFA_advance_loc 1*4 */ +#undef PTREGS +#define PTREGS 168+56 +# EH_FRAME_GEN +# EH_FRAME_FP +# EH_FRAME_VMX + .balign 8 +.Lfde0_end: diff -Nru a/arch/ppc64/kernel/vdso64/vdso64.lds.S b/arch/ppc64/kernel/vdso64/vdso64.lds.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/vdso64/vdso64.lds.S 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,110 @@ +/* + * This is the infamous ld script for the 64 bits vdso + * library + */ +#include + +OUTPUT_FORMAT("elf64-powerpc", "elf64-powerpc", "elf64-powerpc") +OUTPUT_ARCH(powerpc:common64) +ENTRY(_start) + +SECTIONS +{ + . = VDSO64_LBASE + SIZEOF_HEADERS; + .hash : { *(.hash) } :text + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } + .gnu.version : { *(.gnu.version) } + .gnu.version_d : { *(.gnu.version_d) } + .gnu.version_r : { *(.gnu.version_r) } + + . = ALIGN (16); + .text : + { + *(.text .stub .text.* .gnu.linkonce.t.*) + *(.sfpr .glink) + } + PROVIDE (__etext = .); + PROVIDE (_etext = .); + PROVIDE (etext = .); + + /* Other stuff is appended to the text segment: */ + .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } + .rodata1 : { *(.rodata1) } + .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr + .eh_frame : { KEEP (*(.eh_frame)) } :text + .gcc_except_table : { *(.gcc_except_table) } + + .opd ALIGN(8) : { KEEP (*(.opd)) } + .got ALIGN(8) : { *(.got .toc) } + .rela.dyn ALIGN(8) : { *(.rela.dyn) } + + .dynamic : { *(.dynamic) } :text :dynamic + + _end = .; + PROVIDE (end = .); + + /* Stabs debugging sections are here too + */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } + /* DWARF debug sectio/ns. + Symbols in the DWARF debugging sections are relative to the beginning + of the section so we begin them at 0. */ + /* DWARF 1 */ + .debug 0 : { *(.debug) } + .line 0 : { *(.line) } + /* GNU DWARF 1 extensions */ + .debug_srcinfo 0 : { *(.debug_srcinfo) } + .debug_sfnames 0 : { *(.debug_sfnames) } + /* DWARF 1.1 and DWARF 2 */ + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + /* DWARF 2 */ + .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_line 0 : { *(.debug_line) } + .debug_frame 0 : { *(.debug_frame) } + .debug_str 0 : { *(.debug_str) } + .debug_loc 0 : { *(.debug_loc) } + .debug_macinfo 0 : { *(.debug_macinfo) } + /* SGI/MIPS DWARF 2 extensions */ + .debug_weaknames 0 : { *(.debug_weaknames) } + .debug_funcnames 0 : { *(.debug_funcnames) } + .debug_typenames 0 : { *(.debug_typenames) } + .debug_varnames 0 : { *(.debug_varnames) } + + /DISCARD/ : { *(.note.GNU-stack) } + /DISCARD/ : { *(.branch_lt) } + /DISCARD/ : { *(.data .data.* .gnu.linkonce.d.*) } + /DISCARD/ : { *(.bss .sbss .dynbss .dynsbss) } +} + +PHDRS +{ + text PT_LOAD FILEHDR PHDRS FLAGS(5); /* PF_R|PF_X */ + dynamic PT_DYNAMIC FLAGS(4); /* PF_R */ + eh_frame_hdr 0x6474e550; /* PT_GNU_EH_FRAME, but ld doesn't match the name */ +} + +/* + * This controls what symbols we export from the DSO. + */ +VERSION +{ + VDSO_VERSION_STRING { + global: + __kernel_datapage_offset; /* Has to be there for the kernel to find it */ + __kernel_get_syscall_map; + __kernel_gettimeofday; + __kernel_sync_dicache; + __kernel_sync_dicache_p5; + __kernel_sigtramp_rt64; + local: *; + }; +} diff -Nru a/arch/ppc64/kernel/vdso64/vdso64_wrapper.S b/arch/ppc64/kernel/vdso64/vdso64_wrapper.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/vdso64/vdso64_wrapper.S 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,13 @@ +#include +#include + + .section ".data.page_aligned" + + .globl vdso64_start, vdso64_end + .balign PAGE_SIZE +vdso64_start: + .incbin "arch/ppc64/kernel/vdso64/vdso64.so" + .balign PAGE_SIZE +vdso64_end: + + .previous diff -Nru a/arch/ppc64/mm/hash_native.c b/arch/ppc64/mm/hash_native.c --- a/arch/ppc64/mm/hash_native.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc64/mm/hash_native.c 2005-03-07 14:54:16 -08:00 @@ -217,10 +217,10 @@ } /* Ensure it is out of the tlb too */ - if ((cur_cpu_spec->cpu_features & CPU_FTR_TLBIEL) && !large && local) { + if (cpu_has_feature(CPU_FTR_TLBIEL) && !large && local) { tlbiel(va); } else { - int lock_tlbie = !(cur_cpu_spec->cpu_features & CPU_FTR_LOCKLESS_TLBIE); + int lock_tlbie = !cpu_has_feature(CPU_FTR_LOCKLESS_TLBIE); if (lock_tlbie) spin_lock(&native_tlbie_lock); @@ -245,7 +245,7 @@ unsigned long vsid, va, vpn, flags = 0; long slot; HPTE *hptep; - int lock_tlbie = !(cur_cpu_spec->cpu_features & CPU_FTR_LOCKLESS_TLBIE); + int lock_tlbie = !cpu_has_feature(CPU_FTR_LOCKLESS_TLBIE); vsid = get_kernel_vsid(ea); va = (vsid << 28) | (ea & 0x0fffffff); @@ -273,7 +273,7 @@ Hpte_dword0 dw0; unsigned long avpn = va >> 23; unsigned long flags; - int lock_tlbie = !(cur_cpu_spec->cpu_features & CPU_FTR_LOCKLESS_TLBIE); + int lock_tlbie = !cpu_has_feature(CPU_FTR_LOCKLESS_TLBIE); if (large) avpn &= ~0x1UL; @@ -292,7 +292,7 @@ } /* Invalidate the tlb */ - if ((cur_cpu_spec->cpu_features & CPU_FTR_TLBIEL) && !large && local) { + if (cpu_has_feature(CPU_FTR_TLBIEL) && !large && local) { tlbiel(va); } else { if (lock_tlbie) @@ -360,7 +360,7 @@ j++; } - if ((cur_cpu_spec->cpu_features & CPU_FTR_TLBIEL) && !large && local) { + if (cpu_has_feature(CPU_FTR_TLBIEL) && !large && local) { asm volatile("ptesync":::"memory"); for (i = 0; i < j; i++) @@ -368,7 +368,7 @@ asm volatile("ptesync":::"memory"); } else { - int lock_tlbie = !(cur_cpu_spec->cpu_features & CPU_FTR_LOCKLESS_TLBIE); + int lock_tlbie = !cpu_has_feature(CPU_FTR_LOCKLESS_TLBIE); if (lock_tlbie) spin_lock(&native_tlbie_lock); diff -Nru a/arch/ppc64/mm/hash_utils.c b/arch/ppc64/mm/hash_utils.c --- a/arch/ppc64/mm/hash_utils.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/mm/hash_utils.c 2005-03-07 14:54:17 -08:00 @@ -190,7 +190,7 @@ * _NOT_ map it to avoid cache paradoxes as it's remapped non * cacheable later on */ - if (cur_cpu_spec->cpu_features & CPU_FTR_16M_PAGE) + if (cpu_has_feature(CPU_FTR_16M_PAGE)) use_largepages = 1; /* create bolted the linear mapping in the hash table */ diff -Nru a/arch/ppc64/mm/hugetlbpage.c b/arch/ppc64/mm/hugetlbpage.c --- a/arch/ppc64/mm/hugetlbpage.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/mm/hugetlbpage.c 2005-03-07 14:54:17 -08:00 @@ -149,7 +149,8 @@ } static void set_huge_pte(struct mm_struct *mm, struct vm_area_struct *vma, - struct page *page, pte_t *ptep, int write_access) + unsigned long addr, struct page *page, + pte_t *ptep, int write_access) { pte_t entry; @@ -163,7 +164,7 @@ entry = pte_mkyoung(entry); entry = pte_mkhuge(entry); - set_pte(ptep, entry); + set_pte_at(mm, addr, ptep, entry); } /* @@ -316,7 +317,7 @@ ptepage = pte_page(entry); get_page(ptepage); dst->rss += (HPAGE_SIZE / PAGE_SIZE); - set_pte(dst_pte, entry); + set_pte_at(dst, addr, dst_pte, entry); addr += HPAGE_SIZE; } @@ -421,7 +422,7 @@ pte = *ptep; page = pte_page(pte); - pte_clear(ptep); + pte_clear(mm, addr, ptep); put_page(page); } @@ -486,7 +487,7 @@ goto out; } } - set_huge_pte(mm, vma, page, pte, vma->vm_flags & VM_WRITE); + set_huge_pte(mm, vma, addr, page, pte, vma->vm_flags & VM_WRITE); } out: spin_unlock(&mm->page_table_lock); @@ -709,7 +710,7 @@ if (len & ~HPAGE_MASK) return -EINVAL; - if (!(cur_cpu_spec->cpu_features & CPU_FTR_16M_PAGE)) + if (!cpu_has_feature(CPU_FTR_16M_PAGE)) return -EINVAL; if (test_thread_flag(TIF_32BIT)) { diff -Nru a/arch/ppc64/mm/init.c b/arch/ppc64/mm/init.c --- a/arch/ppc64/mm/init.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/mm/init.c 2005-03-07 14:54:17 -08:00 @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -62,6 +63,7 @@ #include #include #include +#include int mem_init_done; unsigned long ioremap_bot = IMALLOC_BASE; @@ -153,7 +155,7 @@ ptep = pte_alloc_kernel(&ioremap_mm, pmdp, ea); pa = abs_to_phys(pa); - set_pte(ptep, pfn_pte(pa >> PAGE_SHIFT, __pgprot(flags))); + set_pte_at(&ioremap_mm, ea, ptep, pfn_pte(pa >> PAGE_SHIFT, __pgprot(flags))); spin_unlock(&ioremap_mm.page_table_lock); } else { unsigned long va, vpn, hash, hpteg; @@ -305,7 +307,7 @@ do { pte_t page; - page = ptep_get_and_clear(pte); + page = ptep_get_and_clear(&ioremap_mm, address, pte); address += PAGE_SIZE; pte++; if (pte_none(page)) @@ -441,6 +443,10 @@ #endif +EXPORT_SYMBOL(ioremap); +EXPORT_SYMBOL(__ioremap); +EXPORT_SYMBOL(iounmap); + void free_initmem(void) { unsigned long addr; @@ -743,6 +749,8 @@ #ifdef CONFIG_PPC_ISERIES iommu_vio_init(); #endif + /* Initialize the vDSO */ + vdso_init(); } /* @@ -752,18 +760,19 @@ */ void flush_dcache_page(struct page *page) { - if (cur_cpu_spec->cpu_features & CPU_FTR_COHERENT_ICACHE) + if (cpu_has_feature(CPU_FTR_COHERENT_ICACHE)) return; /* avoid an atomic op if possible */ if (test_bit(PG_arch_1, &page->flags)) clear_bit(PG_arch_1, &page->flags); } +EXPORT_SYMBOL(flush_dcache_page); void clear_user_page(void *page, unsigned long vaddr, struct page *pg) { clear_page(page); - if (cur_cpu_spec->cpu_features & CPU_FTR_COHERENT_ICACHE) + if (cpu_has_feature(CPU_FTR_COHERENT_ICACHE)) return; /* * We shouldnt have to do this, but some versions of glibc @@ -775,6 +784,7 @@ if (test_bit(PG_arch_1, &pg->flags)) clear_bit(PG_arch_1, &pg->flags); } +EXPORT_SYMBOL(clear_user_page); void copy_user_page(void *vto, void *vfrom, unsigned long vaddr, struct page *pg) @@ -796,7 +806,7 @@ return; #endif - if (cur_cpu_spec->cpu_features & CPU_FTR_COHERENT_ICACHE) + if (cpu_has_feature(CPU_FTR_COHERENT_ICACHE)) return; /* avoid an atomic op if possible */ @@ -812,6 +822,7 @@ maddr = (unsigned long)page_address(page) + (addr & ~PAGE_MASK); flush_icache_range(maddr, maddr + len); } +EXPORT_SYMBOL(flush_icache_user_range); /* * This is called at the end of handling a user page fault, when the @@ -832,8 +843,8 @@ unsigned long flags; /* handle i-cache coherency */ - if (!(cur_cpu_spec->cpu_features & CPU_FTR_COHERENT_ICACHE) && - !(cur_cpu_spec->cpu_features & CPU_FTR_NOEXECUTE)) { + if (!cpu_has_feature(CPU_FTR_COHERENT_ICACHE) && + !cpu_has_feature(CPU_FTR_NOEXECUTE)) { unsigned long pfn = pte_pfn(pte); if (pfn_valid(pfn)) { struct page *page = pfn_to_page(pfn); diff -Nru a/arch/ppc64/mm/slb.c b/arch/ppc64/mm/slb.c --- a/arch/ppc64/mm/slb.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/mm/slb.c 2005-03-07 14:54:17 -08:00 @@ -51,7 +51,7 @@ WARN_ON(!irqs_disabled()); - if (cur_cpu_spec->cpu_features & CPU_FTR_16M_PAGE) + if (cpu_has_feature(CPU_FTR_16M_PAGE)) ksp_flags |= SLB_VSID_L; ksp_esid_data = mk_esid_data(get_paca()->kstack, 2); @@ -139,7 +139,7 @@ unsigned long flags = SLB_VSID_KERNEL; /* Invalidate the entire SLB (even slot 0) & all the ERATS */ - if (cur_cpu_spec->cpu_features & CPU_FTR_16M_PAGE) + if (cpu_has_feature(CPU_FTR_16M_PAGE)) flags |= SLB_VSID_L; asm volatile("isync":::"memory"); diff -Nru a/arch/ppc64/mm/stab.c b/arch/ppc64/mm/stab.c --- a/arch/ppc64/mm/stab.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/mm/stab.c 2005-03-07 14:54:18 -08:00 @@ -227,7 +227,7 @@ { unsigned long vsid = get_kernel_vsid(KERNELBASE); - if (cur_cpu_spec->cpu_features & CPU_FTR_SLB) { + if (cpu_has_feature(CPU_FTR_SLB)) { slb_initialize(); } else { asm volatile("isync; slbia; isync":::"memory"); diff -Nru a/arch/ppc64/mm/tlb.c b/arch/ppc64/mm/tlb.c --- a/arch/ppc64/mm/tlb.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/mm/tlb.c 2005-03-07 14:54:17 -08:00 @@ -74,23 +74,12 @@ * change the existing HPTE to read-only rather than removing it * (if we remove it we should clear the _PTE_HPTEFLAGS bits). */ -void hpte_update(pte_t *ptep, unsigned long pte, int wrprot) +void hpte_update(struct mm_struct *mm, unsigned long addr, + unsigned long pte, int wrprot) { - struct page *ptepage; - struct mm_struct *mm; - unsigned long addr; int i; unsigned long context = 0; struct ppc64_tlb_batch *batch = &__get_cpu_var(ppc64_tlb_batch); - - ptepage = virt_to_page(ptep); - mm = (struct mm_struct *) ptepage->mapping; - addr = ptepage->index; - if (pte_huge(pte)) - addr += ((unsigned long)ptep & ~PAGE_MASK) - / sizeof(*ptep) * HPAGE_SIZE; - else - addr += ((unsigned long)ptep & ~PAGE_MASK) * PTRS_PER_PTE; if (REGION_ID(addr) == USER_REGION_ID) context = mm->context.id; diff -Nru a/arch/ppc64/oprofile/common.c b/arch/ppc64/oprofile/common.c --- a/arch/ppc64/oprofile/common.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/oprofile/common.c 2005-03-07 14:54:18 -08:00 @@ -15,6 +15,7 @@ #include #include #include +#include #include "op_impl.h" @@ -22,9 +23,6 @@ extern struct op_ppc64_model op_model_power4; static struct op_ppc64_model *model; -extern void (*perf_irq)(struct pt_regs *); -static void (*save_perf_irq)(struct pt_regs *); - static struct op_counter_config ctr[OP_MAX_COUNTER]; static struct op_system_config sys; @@ -35,11 +33,12 @@ static int op_ppc64_setup(void) { - /* Install our interrupt handler into the existing hook. */ - save_perf_irq = perf_irq; - perf_irq = op_handle_interrupt; + int err; - mb(); + /* Grab the hardware */ + err = reserve_pmc_hardware(op_handle_interrupt); + if (err) + return err; /* Pre-compute the values to stuff in the hardware registers. */ model->reg_setup(ctr, &sys, model->num_counters); @@ -52,10 +51,7 @@ static void op_ppc64_shutdown(void) { - mb(); - - /* Remove our interrupt handler. We may be removing this module. */ - perf_irq = save_perf_irq; + release_pmc_hardware(); } static void op_ppc64_cpu_start(void *dummy) diff -Nru a/arch/ppc64/oprofile/op_model_power4.c b/arch/ppc64/oprofile/op_model_power4.c --- a/arch/ppc64/oprofile/op_model_power4.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/oprofile/op_model_power4.c 2005-03-07 14:54:17 -08:00 @@ -54,7 +54,7 @@ * * It has been verified to work on POWER5 so we enable it there. */ - if (cur_cpu_spec->cpu_features & CPU_FTR_MMCRA_SIHV) + if (cpu_has_feature(CPU_FTR_MMCRA_SIHV)) mmcra_has_sihv = 1; /* diff -Nru a/arch/ppc64/oprofile/op_model_rs64.c b/arch/ppc64/oprofile/op_model_rs64.c --- a/arch/ppc64/oprofile/op_model_rs64.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/oprofile/op_model_rs64.c 2005-03-07 14:54:18 -08:00 @@ -114,7 +114,7 @@ /* reset MMCR1, MMCRA */ mtspr(SPRN_MMCR1, 0); - if (cur_cpu_spec->cpu_features & CPU_FTR_MMCRA) + if (cpu_has_feature(CPU_FTR_MMCRA)) mtspr(SPRN_MMCRA, 0); mmcr0 |= MMCR0_FCM1|MMCR0_PMXE|MMCR0_FCECE; diff -Nru a/arch/ppc64/xmon/xmon.c b/arch/ppc64/xmon/xmon.c --- a/arch/ppc64/xmon/xmon.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/xmon/xmon.c 2005-03-07 14:54:18 -08:00 @@ -725,7 +725,7 @@ { if (dabr.enabled) set_controlled_dabr(dabr.address | (dabr.enabled & 7)); - if (iabr && (cur_cpu_spec->cpu_features & CPU_FTR_IABR)) + if (iabr && cpu_has_feature(CPU_FTR_IABR)) set_iabr(iabr->address | (iabr->enabled & (BP_IABR|BP_IABR_TE))); } @@ -753,7 +753,7 @@ static void remove_cpu_bpts(void) { set_controlled_dabr(0); - if ((cur_cpu_spec->cpu_features & CPU_FTR_IABR)) + if (cpu_has_feature(CPU_FTR_IABR)) set_iabr(0); } @@ -1100,7 +1100,7 @@ break; case 'i': /* bi - hardware instr breakpoint */ - if (!(cur_cpu_spec->cpu_features & CPU_FTR_IABR)) { + if (!cpu_has_feature(CPU_FTR_IABR)) { printf("Hardware instruction breakpoint " "not supported on this cpu\n"); break; @@ -2498,7 +2498,7 @@ void dump_segments(void) { - if (cur_cpu_spec->cpu_features & CPU_FTR_SLB) + if (cpu_has_feature(CPU_FTR_SLB)) dump_slb(); else dump_stab(); diff -Nru a/arch/s390/mm/init.c b/arch/s390/mm/init.c --- a/arch/s390/mm/init.c 2005-03-07 14:54:17 -08:00 +++ b/arch/s390/mm/init.c 2005-03-07 14:54:17 -08:00 @@ -145,7 +145,7 @@ for (tmp = 0 ; tmp < PTRS_PER_PTE ; tmp++,pg_table++) { pte = pfn_pte(pfn, PAGE_KERNEL); if (pfn >= max_low_pfn) - pte_clear(&pte); + pte_clear(&init_mm, 0, &pte); set_pte(pg_table, pte); pfn++; } @@ -229,7 +229,7 @@ for (k = 0 ; k < PTRS_PER_PTE ; k++,pt_dir++) { pte = pfn_pte(pfn, PAGE_KERNEL); if (pfn >= max_low_pfn) { - pte_clear(&pte); + pte_clear(&init_mm, 0, &pte); continue; } set_pte(pt_dir, pte); diff -Nru a/arch/sh/drivers/pci/fixups-sh03.c b/arch/sh/drivers/pci/fixups-sh03.c --- a/arch/sh/drivers/pci/fixups-sh03.c 2005-03-07 14:54:16 -08:00 +++ b/arch/sh/drivers/pci/fixups-sh03.c 2005-03-07 14:54:16 -08:00 @@ -46,11 +46,11 @@ /* now lookup the actual IRQ on a platform specific basis (pci-'platform'.c) */ irq = pcibios_map_platform_irq(slot, pin, dev); if( irq < 0 ) { - pr_debug("PCI: Error mapping IRQ on device %s\n", dev->slot_name); + pr_debug("PCI: Error mapping IRQ on device %s\n", pci_name(dev)); return irq; } - pr_debug("Setting IRQ for slot %s to %d\n", dev->slot_name, irq); + pr_debug("Setting IRQ for slot %s to %d\n", pci_name(dev), irq); return irq; } diff -Nru a/arch/sh/drivers/pci/pci-sh7751.c b/arch/sh/drivers/pci/pci-sh7751.c --- a/arch/sh/drivers/pci/pci-sh7751.c 2005-03-07 14:54:17 -08:00 +++ b/arch/sh/drivers/pci/pci-sh7751.c 2005-03-07 14:54:17 -08:00 @@ -169,7 +169,7 @@ */ if ((d->class >> 8) != PCI_CLASS_STORAGE_IDE) return; - pr_debug("PCI: IDE base address fixup for %s\n", d->slot_name); + pr_debug("PCI: IDE base address fixup for %s\n", pci_name(d)); for(i=0; i<4; i++) { struct resource *r = &d->resource[i]; if ((r->start & ~0x80) == 0x374) { @@ -401,11 +401,11 @@ /* now lookup the actual IRQ on a platform specific basis (pci-'platform'.c) */ irq = pcibios_map_platform_irq(slot,pin); if( irq < 0 ) { - pr_debug("PCI: Error mapping IRQ on device %s\n", dev->slot_name); + pr_debug("PCI: Error mapping IRQ on device %s\n", pci_name(dev)); return irq; } - - pr_debug("Setting IRQ for slot %s to %d\n", dev->slot_name, irq); + + pr_debug("Setting IRQ for slot %s to %d\n", pci_name(dev), irq); return irq; } diff -Nru a/arch/sh/drivers/pci/pci-st40.c b/arch/sh/drivers/pci/pci-st40.c --- a/arch/sh/drivers/pci/pci-st40.c 2005-03-07 14:54:17 -08:00 +++ b/arch/sh/drivers/pci/pci-st40.c 2005-03-07 14:54:17 -08:00 @@ -246,7 +246,7 @@ */ if ((d->class >> 8) != PCI_CLASS_STORAGE_IDE) return; - printk("PCI: IDE base address fixup for %s\n", d->slot_name); + printk("PCI: IDE base address fixup for %s\n", pci_name(d)); for(i=0; i<4; i++) { struct resource *r = &d->resource[i]; if ((r->start & ~0x80) == 0x374) { diff -Nru a/arch/sh/mm/cache-sh4.c b/arch/sh/mm/cache-sh4.c --- a/arch/sh/mm/cache-sh4.c 2005-03-07 14:54:16 -08:00 +++ b/arch/sh/mm/cache-sh4.c 2005-03-07 14:54:16 -08:00 @@ -258,10 +258,16 @@ flush_cache_all(); } -static void __flush_cache_page(struct vm_area_struct *vma, - unsigned long address, - unsigned long phys) +/* + * Write back and invalidate I/D-caches for the page. + * + * ADDR: Virtual Address (U0 address) + * PFN: Physical page number + */ +void flush_cache_page(struct vm_area_struct *vma, unsigned long address, unsigned long pfn) { + unsigned long phys = pfn << PAGE_SHIFT; + /* We only need to flush D-cache when we have alias */ if ((address^phys) & CACHE_ALIAS) { /* Loop 4K of the D-cache */ @@ -342,32 +348,6 @@ } /* - * Write back and invalidate I/D-caches for the page. - * - * ADDR: Virtual Address (U0 address) - */ -void flush_cache_page(struct vm_area_struct *vma, unsigned long address) -{ - pgd_t *dir; - pmd_t *pmd; - pte_t *pte; - pte_t entry; - unsigned long phys; - - dir = pgd_offset(vma->vm_mm, address); - pmd = pmd_offset(dir, address); - if (pmd_none(*pmd) || pmd_bad(*pmd)) - return; - pte = pte_offset_kernel(pmd, address); - entry = *pte; - if (!(pte_val(entry) & _PAGE_PRESENT)) - return; - - phys = pte_val(entry)&PTE_PHYS_MASK; - __flush_cache_page(vma, address, phys); -} - -/* * flush_icache_user_range * @vma: VMA of the process * @page: page @@ -377,6 +357,6 @@ void flush_icache_user_range(struct vm_area_struct *vma, struct page *page, unsigned long addr, int len) { - __flush_cache_page(vma, addr, PHYSADDR(page_address(page))); + flush_cache_page(vma, addr, page_to_pfn(page)); } diff -Nru a/arch/sh/mm/cache-sh7705.c b/arch/sh/mm/cache-sh7705.c --- a/arch/sh/mm/cache-sh7705.c 2005-03-07 14:54:16 -08:00 +++ b/arch/sh/mm/cache-sh7705.c 2005-03-07 14:54:16 -08:00 @@ -186,25 +186,9 @@ * * ADDRESS: Virtual Address (U0 address) */ -void flush_cache_page(struct vm_area_struct *vma, unsigned long address) +void flush_cache_page(struct vm_area_struct *vma, unsigned long address, unsigned long pfn) { - pgd_t *dir; - pmd_t *pmd; - pte_t *pte; - pte_t entry; - unsigned long phys; - - dir = pgd_offset(vma->vm_mm, address); - pmd = pmd_offset(dir, address); - if (pmd_none(*pmd) || pmd_bad(*pmd)) - return; - pte = pte_offset(pmd, address); - entry = *pte; - if (pte_none(entry) || !pte_present(entry)) - return; - - phys = pte_val(entry)&PTE_PHYS_MASK; - __flush_dcache_page(phys); + __flush_dcache_page(pfn << PAGE_SHIFT); } /* diff -Nru a/arch/sh/mm/hugetlbpage.c b/arch/sh/mm/hugetlbpage.c --- a/arch/sh/mm/hugetlbpage.c 2005-03-07 14:54:17 -08:00 +++ b/arch/sh/mm/hugetlbpage.c 2005-03-07 14:54:17 -08:00 @@ -202,7 +202,7 @@ page = pte_page(*pte); put_page(page); for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { - pte_clear(pte); + pte_clear(mm, address+(i*PAGE_SIZE), pte); pte++; } } diff -Nru a/arch/sh/mm/pg-sh4.c b/arch/sh/mm/pg-sh4.c --- a/arch/sh/mm/pg-sh4.c 2005-03-07 14:54:16 -08:00 +++ b/arch/sh/mm/pg-sh4.c 2005-03-07 14:54:16 -08:00 @@ -56,7 +56,7 @@ local_irq_restore(flags); update_mmu_cache(NULL, p3_addr, entry); __clear_user_page((void *)p3_addr, to); - pte_clear(pte); + pte_clear(&init_mm, p3_addr, pte); up(&p3map_sem[(address & CACHE_ALIAS)>>12]); } } @@ -95,7 +95,7 @@ local_irq_restore(flags); update_mmu_cache(NULL, p3_addr, entry); __copy_user_page((void *)p3_addr, from, to); - pte_clear(pte); + pte_clear(&init_mm, p3_addr, pte); up(&p3map_sem[(address & CACHE_ALIAS)>>12]); } } @@ -103,11 +103,11 @@ /* * For SH-4, we have our own implementation for ptep_get_and_clear */ -inline pte_t ptep_get_and_clear(pte_t *ptep) +inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) { pte_t pte = *ptep; - pte_clear(ptep); + pte_clear(mm, addr, ptep); if (!pte_not_present(pte)) { unsigned long pfn = pte_pfn(pte); if (pfn_valid(pfn)) { diff -Nru a/arch/sh/mm/pg-sh7705.c b/arch/sh/mm/pg-sh7705.c --- a/arch/sh/mm/pg-sh7705.c 2005-03-07 14:54:17 -08:00 +++ b/arch/sh/mm/pg-sh7705.c 2005-03-07 14:54:17 -08:00 @@ -117,11 +117,11 @@ * For SH7705, we have our own implementation for ptep_get_and_clear * Copied from pg-sh4.c */ -inline pte_t ptep_get_and_clear(pte_t *ptep) +inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) { pte_t pte = *ptep; - pte_clear(ptep); + pte_clear(mm, addr, ptep); if (!pte_not_present(pte)) { unsigned long pfn = pte_pfn(pte); if (pfn_valid(pfn)) { diff -Nru a/arch/sh64/kernel/pci_sh5.c b/arch/sh64/kernel/pci_sh5.c --- a/arch/sh64/kernel/pci_sh5.c 2005-03-07 14:54:18 -08:00 +++ b/arch/sh64/kernel/pci_sh5.c 2005-03-07 14:54:18 -08:00 @@ -39,7 +39,7 @@ */ if ((d->class >> 8) != PCI_CLASS_STORAGE_IDE) return; - printk("PCI: IDE base address fixup for %s\n", d->slot_name); + printk("PCI: IDE base address fixup for %s\n", pci_name(d)); for(i=0; i<4; i++) { struct resource *r = &d->resource[i]; if ((r->start & ~0x80) == 0x374) { diff -Nru a/arch/sh64/kernel/pcibios.c b/arch/sh64/kernel/pcibios.c --- a/arch/sh64/kernel/pcibios.c 2005-03-07 14:54:17 -08:00 +++ b/arch/sh64/kernel/pcibios.c 2005-03-07 14:54:17 -08:00 @@ -57,7 +57,7 @@ pci_read_config_dword(dev, reg, &check); if ((new ^ check) & ((new & PCI_BASE_ADDRESS_SPACE_IO) ? PCI_BASE_ADDRESS_IO_MASK : PCI_BASE_ADDRESS_MEM_MASK)) { printk(KERN_ERR "PCI: Error while updating region " - "%s/%d (%08x != %08x)\n", dev->slot_name, resource, + "%s/%d (%08x != %08x)\n", pci_name(dev), resource, new, check); } } @@ -125,7 +125,7 @@ continue; r = &dev->resource[idx]; if (!r->start && r->end) { - printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", dev->slot_name); + printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", pci_name(dev)); return -EINVAL; } if (r->flags & IORESOURCE_IO) diff -Nru a/arch/sh64/mm/cache.c b/arch/sh64/mm/cache.c --- a/arch/sh64/mm/cache.c 2005-03-07 14:54:18 -08:00 +++ b/arch/sh64/mm/cache.c 2005-03-07 14:54:18 -08:00 @@ -573,31 +573,6 @@ } } -static void sh64_dcache_purge_virt_page(struct mm_struct *mm, unsigned long eaddr) -{ - unsigned long phys; - pgd_t *pgd; - pmd_t *pmd; - pte_t *pte; - pte_t entry; - - pgd = pgd_offset(mm, eaddr); - pmd = pmd_offset(pgd, eaddr); - - if (pmd_none(*pmd) || pmd_bad(*pmd)) - return; - - pte = pte_offset_kernel(pmd, eaddr); - entry = *pte; - - if (pte_none(entry) || !pte_present(entry)) - return; - - phys = pte_val(entry) & PAGE_MASK; - - sh64_dcache_purge_phy_page(phys); -} - static void sh64_dcache_purge_user_page(struct mm_struct *mm, unsigned long eaddr) { pgd_t *pgd; @@ -904,7 +879,7 @@ /****************************************************************************/ -void flush_cache_page(struct vm_area_struct *vma, unsigned long eaddr) +void flush_cache_page(struct vm_area_struct *vma, unsigned long eaddr, unsigned long pfn) { /* Invalidate any entries in either cache for the vma within the user address space vma->vm_mm for the page starting at virtual address @@ -915,7 +890,7 @@ Note(1), this is called with mm->page_table_lock held. */ - sh64_dcache_purge_virt_page(vma->vm_mm, eaddr); + sh64_dcache_purge_phy_page(pfn << PAGE_SHIFT); if (vma->vm_flags & VM_EXEC) { sh64_icache_inv_user_page(vma, eaddr); diff -Nru a/arch/sh64/mm/hugetlbpage.c b/arch/sh64/mm/hugetlbpage.c --- a/arch/sh64/mm/hugetlbpage.c 2005-03-07 14:54:16 -08:00 +++ b/arch/sh64/mm/hugetlbpage.c 2005-03-07 14:54:16 -08:00 @@ -202,7 +202,7 @@ page = pte_page(*pte); put_page(page); for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { - pte_clear(pte); + pte_clear(mm, address+(i*PAGE_SIZE), pte); pte++; } } diff -Nru a/arch/sh64/mm/ioremap.c b/arch/sh64/mm/ioremap.c --- a/arch/sh64/mm/ioremap.c 2005-03-07 14:54:17 -08:00 +++ b/arch/sh64/mm/ioremap.c 2005-03-07 14:54:17 -08:00 @@ -400,7 +400,7 @@ return; clear_page((void *)ptep); - pte_clear(ptep); + pte_clear(&init_mm, vaddr, ptep); } unsigned long onchip_remap(unsigned long phys, unsigned long size, const char *name) diff -Nru a/arch/sparc/mm/generic.c b/arch/sparc/mm/generic.c --- a/arch/sparc/mm/generic.c 2005-03-07 14:54:18 -08:00 +++ b/arch/sparc/mm/generic.c 2005-03-07 14:54:18 -08:00 @@ -47,7 +47,7 @@ * They use a pgprot that sets PAGE_IO and does not check the * mem_map table as this is independent of normal memory. */ -static inline void io_remap_pte_range(pte_t * pte, unsigned long address, unsigned long size, +static inline void io_remap_pte_range(struct mm_struct *mm, pte_t * pte, unsigned long address, unsigned long size, unsigned long offset, pgprot_t prot, int space) { unsigned long end; @@ -58,7 +58,7 @@ end = PMD_SIZE; do { pte_t oldpage = *pte; - pte_clear(pte); + pte_clear(mm, address, pte); set_pte(pte, mk_pte_io(offset, prot, space)); forget_pte(oldpage); address += PAGE_SIZE; @@ -67,7 +67,7 @@ } while (address < end); } -static inline int io_remap_pmd_range(pmd_t * pmd, unsigned long address, unsigned long size, +static inline int io_remap_pmd_range(struct mm_struct *mm, pmd_t * pmd, unsigned long address, unsigned long size, unsigned long offset, pgprot_t prot, int space) { unsigned long end; @@ -78,10 +78,10 @@ end = PGDIR_SIZE; offset -= address; do { - pte_t * pte = pte_alloc_map(current->mm, pmd, address); + pte_t * pte = pte_alloc_map(mm, pmd, address); if (!pte) return -ENOMEM; - io_remap_pte_range(pte, address, end - address, address + offset, prot, space); + io_remap_pte_range(mm, pte, address, end - address, address + offset, prot, space); address = (address + PMD_SIZE) & PMD_MASK; pmd++; } while (address < end); @@ -107,7 +107,7 @@ error = -ENOMEM; if (!pmd) break; - error = io_remap_pmd_range(pmd, from, end - from, offset + from, prot, space); + error = io_remap_pmd_range(mm, pmd, from, end - from, offset + from, prot, space); if (error) break; from = (from + PGDIR_SIZE) & PGDIR_MASK; diff -Nru a/arch/sparc/mm/highmem.c b/arch/sparc/mm/highmem.c --- a/arch/sparc/mm/highmem.c 2005-03-07 14:54:16 -08:00 +++ b/arch/sparc/mm/highmem.c 2005-03-07 14:54:16 -08:00 @@ -88,7 +88,7 @@ * force other mappings to Oops if they'll try to access * this pte without first remap it */ - pte_clear(kmap_pte-idx); + pte_clear(&init_mm, vaddr, kmap_pte-idx); /* XXX Fix - Anton */ #if 0 __flush_tlb_one(vaddr); diff -Nru a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c --- a/arch/sparc/mm/srmmu.c 2005-03-07 14:54:17 -08:00 +++ b/arch/sparc/mm/srmmu.c 2005-03-07 14:54:17 -08:00 @@ -1003,8 +1003,7 @@ extern void viking_flush_cache_mm(struct mm_struct *mm); extern void viking_flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end); -extern void viking_flush_cache_page(struct vm_area_struct *vma, - unsigned long page); +extern void viking_flush_cache_page(struct vm_area_struct *vma, unsigned long page); extern void viking_flush_page_to_ram(unsigned long page); extern void viking_flush_page_for_dma(unsigned long page); extern void viking_flush_sig_insns(struct mm_struct *mm, unsigned long addr); diff -Nru a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c --- a/arch/sparc64/kernel/pci.c 2005-03-07 14:54:16 -08:00 +++ b/arch/sparc64/kernel/pci.c 2005-03-07 14:54:16 -08:00 @@ -794,12 +794,6 @@ } EXPORT_SYMBOL(pci_domain_nr); -int pci_name_bus(char *name, struct pci_bus *bus) -{ - sprintf(name, "%04x:%02x", pci_domain_nr(bus), bus->number); - return 0; -} - int pcibios_prep_mwi(struct pci_dev *dev) { /* We set correct PCI_CACHE_LINE_SIZE register values for every diff -Nru a/arch/sparc64/kernel/pci_schizo.c b/arch/sparc64/kernel/pci_schizo.c --- a/arch/sparc64/kernel/pci_schizo.c 2005-03-07 14:54:17 -08:00 +++ b/arch/sparc64/kernel/pci_schizo.c 2005-03-07 14:54:17 -08:00 @@ -326,9 +326,9 @@ return ret; } -static unsigned int __init schizo_irq_build(struct pci_pbm_info *pbm, - struct pci_dev *pdev, - unsigned int ino) +static unsigned int schizo_irq_build(struct pci_pbm_info *pbm, + struct pci_dev *pdev, + unsigned int ino) { struct ino_bucket *bucket; unsigned long imap, iclr; @@ -382,19 +382,57 @@ static unsigned long stc_tag_buf[16]; static unsigned long stc_line_buf[16]; -/* These offsets look weird because I keep in pbm->controller_regs - * the second PROM register property minus 0x10000 which is the - * base of the Safari and UPA64S registers of SCHIZO. - */ -#define SCHIZO_PBM_A_REGS_OFF (0x600000UL - 0x400000UL) -#define SCHIZO_PBM_B_REGS_OFF (0x700000UL - 0x400000UL) +#define SCHIZO_UE_INO 0x30 /* Uncorrectable ECC error */ +#define SCHIZO_CE_INO 0x31 /* Correctable ECC error */ +#define SCHIZO_PCIERR_A_INO 0x32 /* PBM A PCI bus error */ +#define SCHIZO_PCIERR_B_INO 0x33 /* PBM B PCI bus error */ +#define SCHIZO_SERR_INO 0x34 /* Safari interface error */ -static void schizo_clear_other_err_intr(int irq) +struct pci_pbm_info *pbm_for_ino(struct pci_controller_info *p, u32 ino) { - struct ino_bucket *bucket = __bucket(irq); - unsigned long iclr = bucket->iclr; + ino &= IMAP_INO; + if (p->pbm_A.ino_bitmap & (1UL << ino)) + return &p->pbm_A; + if (p->pbm_B.ino_bitmap & (1UL << ino)) + return &p->pbm_B; + + printk("PCI%d: No ino_bitmap entry for ino[%x], bitmaps " + "PBM_A[%016lx] PBM_B[%016lx]", + p->index, ino, + p->pbm_A.ino_bitmap, + p->pbm_B.ino_bitmap); + printk("PCI%d: Using PBM_A, report this problem immediately.\n", + p->index); + + return &p->pbm_A; +} + +static void schizo_clear_other_err_intr(struct pci_controller_info *p, int irq) +{ + struct pci_pbm_info *pbm; + struct ino_bucket *bucket; + unsigned long iclr; + + /* Do not clear the interrupt for the other PCI bus. + * + * This "ACK both PBM IRQs" only needs to be performed + * for chip-wide error interrupts. + */ + if ((irq & IMAP_INO) == SCHIZO_PCIERR_A_INO || + (irq & IMAP_INO) == SCHIZO_PCIERR_B_INO) + return; + + pbm = pbm_for_ino(p, irq); + if (pbm == &p->pbm_A) + pbm = &p->pbm_B; + else + pbm = &p->pbm_A; + + irq = schizo_irq_build(pbm, NULL, + (pbm->portid << 6) | (irq & IMAP_INO)); + bucket = __bucket(irq); + iclr = bucket->iclr; - iclr += (SCHIZO_PBM_B_REGS_OFF - SCHIZO_PBM_A_REGS_OFF); upa_writel(ICLR_IDLE, iclr); } @@ -728,7 +766,7 @@ /* Interrogate IOMMU for error status. */ schizo_check_iommu_error(p, UE_ERR); - schizo_clear_other_err_intr(irq); + schizo_clear_other_err_intr(p, irq); return IRQ_HANDLED; } @@ -819,7 +857,7 @@ printk("(none)"); printk("]\n"); - schizo_clear_other_err_intr(irq); + schizo_clear_other_err_intr(p, irq); return IRQ_HANDLED; } @@ -856,9 +894,9 @@ #define SCHIZO_PCICTRL_SBH_ERR (1UL << 35UL) /* Safari */ #define SCHIZO_PCICTRL_SERR (1UL << 34UL) /* Safari/Tomatillo */ #define SCHIZO_PCICTRL_PCISPD (1UL << 33UL) /* Safari */ -#define SCHIZO_PCICTRL_MRM_PREF (1UL << 28UL) /* Tomatillo */ -#define SCHIZO_PCICTRL_RDO_PREF (1UL << 27UL) /* Tomatillo */ -#define SCHIZO_PCICTRL_RDL_PREF (1UL << 26UL) /* Tomatillo */ +#define SCHIZO_PCICTRL_MRM_PREF (1UL << 30UL) /* Tomatillo */ +#define SCHIZO_PCICTRL_RDO_PREF (1UL << 29UL) /* Tomatillo */ +#define SCHIZO_PCICTRL_RDL_PREF (1UL << 28UL) /* Tomatillo */ #define SCHIZO_PCICTRL_PTO (3UL << 24UL) /* Safari/Tomatillo */ #define SCHIZO_PCICTRL_PTO_SHIFT 24UL #define SCHIZO_PCICTRL_TRWSW (7UL << 21UL) /* Tomatillo */ @@ -1040,7 +1078,7 @@ if (error_bits & (SCHIZO_PCIAFSR_PPERR | SCHIZO_PCIAFSR_SPERR)) pci_scan_for_parity_error(p, pbm, pbm->pci_bus); - schizo_clear_other_err_intr(irq); + schizo_clear_other_err_intr(p, irq); return IRQ_HANDLED; } @@ -1097,7 +1135,7 @@ printk("PCI%d: Unexpected Safari/JBUS error interrupt, errlog[%016lx]\n", p->index, errlog); - schizo_clear_other_err_intr(irq); + schizo_clear_other_err_intr(p, irq); return IRQ_HANDLED; } @@ -1105,7 +1143,7 @@ p->index); schizo_check_iommu_error(p, SAFARI_ERR); - schizo_clear_other_err_intr(irq); + schizo_clear_other_err_intr(p, irq); return IRQ_HANDLED; } @@ -1120,26 +1158,6 @@ #define SCHIZO_SAFARI_IRQCTRL 0x10010UL #define SCHIZO_SAFIRQCTRL_EN 0x8000000000000000UL -#define SCHIZO_UE_INO 0x30 /* Uncorrectable ECC error */ -#define SCHIZO_CE_INO 0x31 /* Correctable ECC error */ -#define SCHIZO_PCIERR_A_INO 0x32 /* PBM A PCI bus error */ -#define SCHIZO_PCIERR_B_INO 0x33 /* PBM B PCI bus error */ -#define SCHIZO_SERR_INO 0x34 /* Safari interface error */ - -struct pci_pbm_info *pbm_for_ino(struct pci_controller_info *p, u32 ino) -{ - ino &= IMAP_INO; - if (p->pbm_A.ino_bitmap & (1UL << ino)) - return &p->pbm_A; - if (p->pbm_B.ino_bitmap & (1UL << ino)) - return &p->pbm_B; - prom_printf("TOMATILLO%d: No entry in ino bitmap for %d\n", - p->index, ino); - prom_halt(); - /* NOTREACHED */ - return NULL; -} - /* How the Tomatillo IRQs are routed around is pure guesswork here. * * All the Tomatillo devices I see in prtconf dumps seem to have only @@ -1887,7 +1905,7 @@ tmp &= ~SCHIZO_PCICTRL_PTO; if (pbm->chip_type == PBM_CHIP_TYPE_TOMATILLO && - pbm->chip_version == 0x2) + pbm->chip_version >= 0x2) tmp |= 0x3UL << SCHIZO_PCICTRL_PTO_SHIFT; else tmp |= 0x1UL << SCHIZO_PCICTRL_PTO_SHIFT; @@ -1895,8 +1913,16 @@ if (!prom_getbool(pbm->prom_node, "no-bus-parking")) tmp |= SCHIZO_PCICTRL_PARK; + if (pbm->chip_type == PBM_CHIP_TYPE_TOMATILLO && + pbm->chip_version <= 0x1) + tmp |= (1UL << 61); + else + tmp &= ~(1UL << 61); + if (pbm->chip_type == PBM_CHIP_TYPE_TOMATILLO) - tmp |= SCHIZO_PCICTRL_MRM_PREF; + tmp |= (SCHIZO_PCICTRL_MRM_PREF | + SCHIZO_PCICTRL_RDO_PREF | + SCHIZO_PCICTRL_RDL_PREF); schizo_write(pbm->pbm_regs + SCHIZO_PCI_CTRL, tmp); diff -Nru a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c --- a/arch/sparc64/kernel/sys_sparc32.c 2005-03-07 14:54:17 -08:00 +++ b/arch/sparc64/kernel/sys_sparc32.c 2005-03-07 14:54:17 -08:00 @@ -1121,34 +1121,3 @@ return err; } - -asmlinkage long compat_sys_waitid(u32 which, u32 pid, - struct compat_siginfo __user *uinfo, - u32 options, struct compat_rusage __user *uru) -{ - siginfo_t info; - struct rusage ru; - long ret; - mm_segment_t old_fs = get_fs(); - - memset(&info, 0, sizeof(info)); - - set_fs (KERNEL_DS); - ret = sys_waitid(which, pid, (siginfo_t __user *) &info, - options, - uru ? (struct rusage __user *) &ru : NULL); - set_fs (old_fs); - - if (ret < 0 || info.si_signo == 0) - return ret; - - if (uru) { - ret = put_compat_rusage(&ru, uru); - if (ret) - return ret; - } - - BUG_ON(info.si_code & __SI_MASK); - info.si_code |= __SI_CHLD; - return copy_siginfo_to_user32(uinfo, &info); -} diff -Nru a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c --- a/arch/sparc64/kernel/time.c 2005-03-07 14:54:17 -08:00 +++ b/arch/sparc64/kernel/time.c 2005-03-07 14:54:17 -08:00 @@ -779,6 +779,7 @@ strcmp(model, "mk48t59") && strcmp(model, "m5819") && strcmp(model, "m5819p") && + strcmp(model, "m5823") && strcmp(model, "ds1287")) { if (cbus != NULL) { prom_printf("clock_probe: Central bus lacks timer chip.\n"); @@ -838,7 +839,8 @@ if (!strcmp(model, "ds1287") || !strcmp(model, "m5819") || - !strcmp(model, "m5819p")) { + !strcmp(model, "m5819p") || + !strcmp(model, "m5823")) { ds1287_regs = edev->resource[0].start; } else { mstk48t59_regs = edev->resource[0].start; @@ -859,7 +861,8 @@ } if (!strcmp(model, "ds1287") || !strcmp(model, "m5819") || - !strcmp(model, "m5819p")) { + !strcmp(model, "m5819p") || + !strcmp(model, "m5823")) { ds1287_regs = isadev->resource.start; } else { mstk48t59_regs = isadev->resource.start; diff -Nru a/arch/sparc64/mm/generic.c b/arch/sparc64/mm/generic.c --- a/arch/sparc64/mm/generic.c 2005-03-07 14:54:18 -08:00 +++ b/arch/sparc64/mm/generic.c 2005-03-07 14:54:18 -08:00 @@ -25,8 +25,11 @@ * side-effect bit will be turned off. This is used as a * performance improvement on FFB/AFB. -DaveM */ -static inline void io_remap_pte_range(pte_t * pte, unsigned long address, unsigned long size, - unsigned long offset, pgprot_t prot, int space) +static inline void io_remap_pte_range(struct mm_struct *mm, pte_t * pte, + unsigned long address, + unsigned long size, + unsigned long offset, pgprot_t prot, + int space) { unsigned long end; @@ -67,14 +70,14 @@ pte_val(entry) &= ~(_PAGE_E); do { BUG_ON(!pte_none(*pte)); - set_pte(pte, entry); + set_pte_at(mm, address, pte, entry); address += PAGE_SIZE; pte++; } while (address < curend); } while (address < end); } -static inline int io_remap_pmd_range(pmd_t * pmd, unsigned long address, unsigned long size, +static inline int io_remap_pmd_range(struct mm_struct *mm, pmd_t * pmd, unsigned long address, unsigned long size, unsigned long offset, pgprot_t prot, int space) { unsigned long end; @@ -85,10 +88,10 @@ end = PGDIR_SIZE; offset -= address; do { - pte_t * pte = pte_alloc_map(current->mm, pmd, address); + pte_t * pte = pte_alloc_map(mm, pmd, address); if (!pte) return -ENOMEM; - io_remap_pte_range(pte, address, end - address, address + offset, prot, space); + io_remap_pte_range(mm, pte, address, end - address, address + offset, prot, space); pte_unmap(pte); address = (address + PMD_SIZE) & PMD_MASK; pmd++; @@ -96,7 +99,7 @@ return 0; } -static inline int io_remap_pud_range(pud_t * pud, unsigned long address, unsigned long size, +static inline int io_remap_pud_range(struct mm_struct *mm, pud_t * pud, unsigned long address, unsigned long size, unsigned long offset, pgprot_t prot, int space) { unsigned long end; @@ -107,10 +110,10 @@ end = PUD_SIZE; offset -= address; do { - pmd_t *pmd = pmd_alloc(current->mm, pud, address); + pmd_t *pmd = pmd_alloc(mm, pud, address); if (!pud) return -ENOMEM; - io_remap_pmd_range(pmd, address, end - address, address + offset, prot, space); + io_remap_pmd_range(mm, pmd, address, end - address, address + offset, prot, space); address = (address + PUD_SIZE) & PUD_MASK; pud++; } while (address < end); @@ -132,11 +135,11 @@ spin_lock(&mm->page_table_lock); while (from < end) { - pud_t *pud = pud_alloc(current->mm, dir, from); + pud_t *pud = pud_alloc(mm, dir, from); error = -ENOMEM; if (!pud) break; - error = io_remap_pud_range(pud, from, end - from, offset + from, prot, space); + error = io_remap_pud_range(mm, pud, from, end - from, offset + from, prot, space); if (error) break; from = (from + PGDIR_SIZE) & PGDIR_MASK; diff -Nru a/arch/sparc64/mm/hugetlbpage.c b/arch/sparc64/mm/hugetlbpage.c --- a/arch/sparc64/mm/hugetlbpage.c 2005-03-07 14:54:17 -08:00 +++ b/arch/sparc64/mm/hugetlbpage.c 2005-03-07 14:54:17 -08:00 @@ -62,6 +62,7 @@ #define mk_pte_huge(entry) do { pte_val(entry) |= _PAGE_SZHUGE; } while (0) static void set_huge_pte(struct mm_struct *mm, struct vm_area_struct *vma, + unsigned long addr, struct page *page, pte_t * page_table, int write_access) { unsigned long i; @@ -78,8 +79,9 @@ mk_pte_huge(entry); for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { - set_pte(page_table, entry); + set_pte_at(mm, addr, page_table, entry); page_table++; + addr += PAGE_SIZE; pte_val(entry) += PAGE_SIZE; } @@ -116,12 +118,12 @@ ptepage = pte_page(entry); get_page(ptepage); for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { - set_pte(dst_pte, entry); + set_pte_at(dst, addr, dst_pte, entry); pte_val(entry) += PAGE_SIZE; dst_pte++; + addr += PAGE_SIZE; } dst->rss += (HPAGE_SIZE / PAGE_SIZE); - addr += HPAGE_SIZE; } return 0; @@ -207,7 +209,7 @@ page = pte_page(*pte); put_page(page); for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { - pte_clear(pte); + pte_clear(mm, address+(i*PAGE_SIZE), pte); pte++; } } @@ -261,7 +263,7 @@ goto out; } } - set_huge_pte(mm, vma, page, pte, vma->vm_flags & VM_WRITE); + set_huge_pte(mm, vma, addr, page, pte, vma->vm_flags & VM_WRITE); } out: spin_unlock(&mm->page_table_lock); diff -Nru a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c --- a/arch/sparc64/mm/init.c 2005-03-07 14:54:16 -08:00 +++ b/arch/sparc64/mm/init.c 2005-03-07 14:54:16 -08:00 @@ -431,7 +431,8 @@ if (tlb_type == spitfire) val &= ~0x0003fe0000000000UL; - set_pte (ptep, __pte(val | _PAGE_MODIFIED)); + set_pte_at(&init_mm, vaddr, + ptep, __pte(val | _PAGE_MODIFIED)); trans[i].data += BASE_PAGE_SIZE; } } diff -Nru a/arch/sparc64/mm/tlb.c b/arch/sparc64/mm/tlb.c --- a/arch/sparc64/mm/tlb.c 2005-03-07 14:54:17 -08:00 +++ b/arch/sparc64/mm/tlb.c 2005-03-07 14:54:17 -08:00 @@ -41,24 +41,12 @@ } } -void tlb_batch_add(pte_t *ptep, pte_t orig) +void tlb_batch_add(struct mm_struct *mm, unsigned long vaddr, pte_t *ptep, pte_t orig) { struct mmu_gather *mp = &__get_cpu_var(mmu_gathers); - struct page *ptepage; - struct mm_struct *mm; - unsigned long vaddr, nr; + unsigned long nr; - ptepage = virt_to_page(ptep); - mm = (struct mm_struct *) ptepage->mapping; - - /* It is more efficient to let flush_tlb_kernel_range() - * handle these cases. - */ - if (mm == &init_mm) - return; - - vaddr = ptepage->index + - (((unsigned long)ptep & ~PAGE_MASK) * PTRS_PER_PTE); + vaddr &= PAGE_MASK; if (pte_exec(orig)) vaddr |= 0x1UL; diff -Nru a/arch/um/kernel/process_kern.c b/arch/um/kernel/process_kern.c --- a/arch/um/kernel/process_kern.c 2005-03-07 14:54:17 -08:00 +++ b/arch/um/kernel/process_kern.c 2005-03-07 14:54:17 -08:00 @@ -21,6 +21,7 @@ #include "linux/spinlock.h" #include "linux/proc_fs.h" #include "linux/ptrace.h" +#include "linux/random.h" #include "asm/unistd.h" #include "asm/mman.h" #include "asm/segment.h" @@ -478,6 +479,14 @@ return 2; } + +unsigned long arch_align_stack(unsigned long sp) +{ + if (randomize_va_space) + sp -= get_random_int() % 8192; + return sp & ~0xf; +} + /* * Overrides for Emacs so that we follow Linus's tabbing style. diff -Nru a/arch/x86_64/defconfig b/arch/x86_64/defconfig --- a/arch/x86_64/defconfig 2005-03-07 14:54:17 -08:00 +++ b/arch/x86_64/defconfig 2005-03-07 14:54:17 -08:00 @@ -672,7 +672,6 @@ # CONFIG_AGP=y CONFIG_AGP_AMD64=y -# CONFIG_AGP_INTEL_MCH is not set # CONFIG_DRM is not set # CONFIG_MWAVE is not set CONFIG_RAW_DRIVER=y diff -Nru a/arch/x86_64/ia32/ia32entry.S b/arch/x86_64/ia32/ia32entry.S --- a/arch/x86_64/ia32/ia32entry.S 2005-03-07 14:54:17 -08:00 +++ b/arch/x86_64/ia32/ia32entry.S 2005-03-07 14:54:17 -08:00 @@ -590,7 +590,7 @@ .quad compat_sys_mq_notify .quad compat_sys_mq_getsetattr .quad quiet_ni_syscall /* reserved for kexec */ - .quad sys32_waitid + .quad compat_sys_waitid .quad quiet_ni_syscall /* sys_altroot */ .quad sys_add_key .quad sys_request_key diff -Nru a/arch/x86_64/ia32/sys_ia32.c b/arch/x86_64/ia32/sys_ia32.c --- a/arch/x86_64/ia32/sys_ia32.c 2005-03-07 14:54:17 -08:00 +++ b/arch/x86_64/ia32/sys_ia32.c 2005-03-07 14:54:17 -08:00 @@ -955,32 +955,6 @@ return do_fork(clone_flags, newsp, regs, 0, parent_tid, child_tid); } -asmlinkage long sys32_waitid(int which, compat_pid_t pid, - compat_siginfo_t __user *uinfo, int options, - struct compat_rusage __user *uru) -{ - siginfo_t info; - struct rusage ru; - long ret; - mm_segment_t old_fs = get_fs(); - - info.si_signo = 0; - set_fs (KERNEL_DS); - ret = sys_waitid(which, pid, (siginfo_t __user *) &info, options, - uru ? &ru : NULL); - set_fs (old_fs); - - if (ret < 0 || info.si_signo == 0) - return ret; - - if (uru && (ret = put_compat_rusage(&ru, uru))) - return ret; - - BUG_ON(info.si_code & __SI_MASK); - info.si_code |= __SI_CHLD; - return copy_siginfo_to_user32(uinfo, &info); -} - /* * Some system calls that need sign extended arguments. This could be done by a generic wrapper. */ diff -Nru a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c --- a/arch/x86_64/kernel/pci-gart.c 2005-03-07 14:54:17 -08:00 +++ b/arch/x86_64/kernel/pci-gart.c 2005-03-07 14:54:17 -08:00 @@ -789,7 +789,7 @@ /* Add other K8 AGP bridge drivers here */ no_agp = no_agp || (agp_amd64_init() < 0) || - (agp_copy_info(&info) < 0); + (agp_copy_info(agp_bridge, &info) < 0); #endif if (swiotlb) { diff -Nru a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c --- a/arch/x86_64/kernel/process.c 2005-03-07 14:54:17 -08:00 +++ b/arch/x86_64/kernel/process.c 2005-03-07 14:54:17 -08:00 @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -748,4 +749,11 @@ elf_core_copy_regs(regs, &ptregs); return 1; +} + +unsigned long arch_align_stack(unsigned long sp) +{ + if (randomize_va_space) + sp -= get_random_int() % 8192; + return sp & ~0xf; } diff -Nru a/arch/x86_64/pci/mmconfig.c b/arch/x86_64/pci/mmconfig.c --- a/arch/x86_64/pci/mmconfig.c 2005-03-07 14:54:16 -08:00 +++ b/arch/x86_64/pci/mmconfig.c 2005-03-07 14:54:16 -08:00 @@ -17,12 +17,13 @@ /* Static virtual mapping of the MMCONFIG aperture */ char *pci_mmcfg_virt; -static inline char *pci_dev_base(int bus, int devfn) +static inline char *pci_dev_base(unsigned int bus, unsigned int devfn) { return pci_mmcfg_virt + ((bus << 20) | (devfn << 12)); } -static int pci_mmcfg_read(int seg, int bus, int devfn, int reg, int len, u32 *value) +static int pci_mmcfg_read(unsigned int seg, unsigned int bus, + unsigned int devfn, int reg, int len, u32 *value) { char *addr = pci_dev_base(bus, devfn); @@ -44,7 +45,8 @@ return 0; } -static int pci_mmcfg_write(int seg, int bus, int devfn, int reg, int len, u32 value) +static int pci_mmcfg_write(unsigned int seg, unsigned int bus, + unsigned int devfn, int reg, int len, u32 value) { char *addr = pci_dev_base(bus,devfn); diff -Nru a/crypto/Kconfig b/crypto/Kconfig --- a/crypto/Kconfig 2005-03-07 14:54:18 -08:00 +++ b/crypto/Kconfig 2005-03-07 14:54:18 -08:00 @@ -79,6 +79,19 @@ See also: +config CRYPTO_TGR192 + tristate "Tiger digest algorithms" + depends on CRYPTO + help + Tiger hash algorithm 192, 160 and 128-bit hashes + + Tiger is a hash function optimized for 64-bit processors while + still having decent performance on 32-bit processors. + Tiger was developed by Ross Anderson and Eli Biham. + + See also: + . + config CRYPTO_DES tristate "DES and Triple DES EDE cipher algorithms" depends on CRYPTO diff -Nru a/crypto/Makefile b/crypto/Makefile --- a/crypto/Makefile 2005-03-07 14:54:18 -08:00 +++ b/crypto/Makefile 2005-03-07 14:54:18 -08:00 @@ -15,6 +15,7 @@ obj-$(CONFIG_CRYPTO_SHA256) += sha256.o obj-$(CONFIG_CRYPTO_SHA512) += sha512.o obj-$(CONFIG_CRYPTO_WP512) += wp512.o +obj-$(CONFIG_CRYPTO_TGR192) += tgr192.o obj-$(CONFIG_CRYPTO_DES) += des.o obj-$(CONFIG_CRYPTO_BLOWFISH) += blowfish.o obj-$(CONFIG_CRYPTO_TWOFISH) += twofish.o diff -Nru a/crypto/tcrypt.c b/crypto/tcrypt.c --- a/crypto/tcrypt.c 2005-03-07 14:54:18 -08:00 +++ b/crypto/tcrypt.c 2005-03-07 14:54:18 -08:00 @@ -695,6 +695,9 @@ test_hash("wp512", wp512_tv_template, WP512_TEST_VECTORS); test_hash("wp384", wp384_tv_template, WP384_TEST_VECTORS); test_hash("wp256", wp256_tv_template, WP256_TEST_VECTORS); + test_hash("tgr192", tgr192_tv_template, TGR192_TEST_VECTORS); + test_hash("tgr160", tgr160_tv_template, TGR160_TEST_VECTORS); + test_hash("tgr128", tgr128_tv_template, TGR128_TEST_VECTORS); test_deflate(); test_crc32c(); #ifdef CONFIG_CRYPTO_HMAC @@ -830,6 +833,19 @@ test_cipher ("anubis", MODE_ECB, DECRYPT, anubis_dec_tv_template, ANUBIS_DEC_TEST_VECTORS); test_cipher ("anubis", MODE_CBC, ENCRYPT, anubis_cbc_enc_tv_template, ANUBIS_CBC_ENC_TEST_VECTORS); test_cipher ("anubis", MODE_CBC, DECRYPT, anubis_cbc_dec_tv_template, ANUBIS_CBC_ENC_TEST_VECTORS); + break; + + case 27: + test_hash("tgr192", tgr192_tv_template, TGR192_TEST_VECTORS); + break; + + case 28: + + test_hash("tgr160", tgr160_tv_template, TGR160_TEST_VECTORS); + break; + + case 29: + test_hash("tgr128", tgr128_tv_template, TGR128_TEST_VECTORS); break; #ifdef CONFIG_CRYPTO_HMAC diff -Nru a/crypto/tcrypt.h b/crypto/tcrypt.h --- a/crypto/tcrypt.h 2005-03-07 14:54:18 -08:00 +++ b/crypto/tcrypt.h 2005-03-07 14:54:18 -08:00 @@ -553,6 +553,137 @@ }, }; +/* + * TIGER test vectors from Tiger website + */ +#define TGR192_TEST_VECTORS 6 + +static struct hash_testvec tgr192_tv_template[] = { + { + .plaintext = "", + .psize = 0, + .digest = { 0x24, 0xf0, 0x13, 0x0c, 0x63, 0xac, 0x93, 0x32, + 0x16, 0x16, 0x6e, 0x76, 0xb1, 0xbb, 0x92, 0x5f, + 0xf3, 0x73, 0xde, 0x2d, 0x49, 0x58, 0x4e, 0x7a }, + }, { + .plaintext = "abc", + .psize = 3, + .digest = { 0xf2, 0x58, 0xc1, 0xe8, 0x84, 0x14, 0xab, 0x2a, + 0x52, 0x7a, 0xb5, 0x41, 0xff, 0xc5, 0xb8, 0xbf, + 0x93, 0x5f, 0x7b, 0x95, 0x1c, 0x13, 0x29, 0x51 }, + }, { + .plaintext = "Tiger", + .psize = 5, + .digest = { 0x9f, 0x00, 0xf5, 0x99, 0x07, 0x23, 0x00, 0xdd, + 0x27, 0x6a, 0xbb, 0x38, 0xc8, 0xeb, 0x6d, 0xec, + 0x37, 0x79, 0x0c, 0x11, 0x6f, 0x9d, 0x2b, 0xdf }, + }, { + .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-", + .psize = 64, + .digest = { 0x87, 0xfb, 0x2a, 0x90, 0x83, 0x85, 0x1c, 0xf7, + 0x47, 0x0d, 0x2c, 0xf8, 0x10, 0xe6, 0xdf, 0x9e, + 0xb5, 0x86, 0x44, 0x50, 0x34, 0xa5, 0xa3, 0x86 }, + }, { + .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789", + .psize = 64, + .digest = { 0x46, 0x7d, 0xb8, 0x08, 0x63, 0xeb, 0xce, 0x48, + 0x8d, 0xf1, 0xcd, 0x12, 0x61, 0x65, 0x5d, 0xe9, + 0x57, 0x89, 0x65, 0x65, 0x97, 0x5f, 0x91, 0x97 }, + }, { + .plaintext = "Tiger - A Fast New Hash Function, " + "by Ross Anderson and Eli Biham, " + "proceedings of Fast Software Encryption 3, " + "Cambridge, 1996.", + .psize = 125, + .digest = { 0x3d, 0x9a, 0xeb, 0x03, 0xd1, 0xbd, 0x1a, 0x63, + 0x57, 0xb2, 0x77, 0x4d, 0xfd, 0x6d, 0x5b, 0x24, + 0xdd, 0x68, 0x15, 0x1d, 0x50, 0x39, 0x74, 0xfc }, + }, +}; + +#define TGR160_TEST_VECTORS 6 + +static struct hash_testvec tgr160_tv_template[] = { + { + .plaintext = "", + .psize = 0, + .digest = { 0x24, 0xf0, 0x13, 0x0c, 0x63, 0xac, 0x93, 0x32, + 0x16, 0x16, 0x6e, 0x76, 0xb1, 0xbb, 0x92, 0x5f, + 0xf3, 0x73, 0xde, 0x2d }, + }, { + .plaintext = "abc", + .psize = 3, + .digest = { 0xf2, 0x58, 0xc1, 0xe8, 0x84, 0x14, 0xab, 0x2a, + 0x52, 0x7a, 0xb5, 0x41, 0xff, 0xc5, 0xb8, 0xbf, + 0x93, 0x5f, 0x7b, 0x95 }, + }, { + .plaintext = "Tiger", + .psize = 5, + .digest = { 0x9f, 0x00, 0xf5, 0x99, 0x07, 0x23, 0x00, 0xdd, + 0x27, 0x6a, 0xbb, 0x38, 0xc8, 0xeb, 0x6d, 0xec, + 0x37, 0x79, 0x0c, 0x11 }, + }, { + .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-", + .psize = 64, + .digest = { 0x87, 0xfb, 0x2a, 0x90, 0x83, 0x85, 0x1c, 0xf7, + 0x47, 0x0d, 0x2c, 0xf8, 0x10, 0xe6, 0xdf, 0x9e, + 0xb5, 0x86, 0x44, 0x50 }, + }, { + .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789", + .psize = 64, + .digest = { 0x46, 0x7d, 0xb8, 0x08, 0x63, 0xeb, 0xce, 0x48, + 0x8d, 0xf1, 0xcd, 0x12, 0x61, 0x65, 0x5d, 0xe9, + 0x57, 0x89, 0x65, 0x65 }, + }, { + .plaintext = "Tiger - A Fast New Hash Function, " + "by Ross Anderson and Eli Biham, " + "proceedings of Fast Software Encryption 3, " + "Cambridge, 1996.", + .psize = 125, + .digest = { 0x3d, 0x9a, 0xeb, 0x03, 0xd1, 0xbd, 0x1a, 0x63, + 0x57, 0xb2, 0x77, 0x4d, 0xfd, 0x6d, 0x5b, 0x24, + 0xdd, 0x68, 0x15, 0x1d }, + }, +}; + +#define TGR128_TEST_VECTORS 6 + +static struct hash_testvec tgr128_tv_template[] = { + { + .plaintext = "", + .psize = 0, + .digest = { 0x24, 0xf0, 0x13, 0x0c, 0x63, 0xac, 0x93, 0x32, + 0x16, 0x16, 0x6e, 0x76, 0xb1, 0xbb, 0x92, 0x5f }, + }, { + .plaintext = "abc", + .psize = 3, + .digest = { 0xf2, 0x58, 0xc1, 0xe8, 0x84, 0x14, 0xab, 0x2a, + 0x52, 0x7a, 0xb5, 0x41, 0xff, 0xc5, 0xb8, 0xbf }, + }, { + .plaintext = "Tiger", + .psize = 5, + .digest = { 0x9f, 0x00, 0xf5, 0x99, 0x07, 0x23, 0x00, 0xdd, + 0x27, 0x6a, 0xbb, 0x38, 0xc8, 0xeb, 0x6d, 0xec }, + }, { + .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-", + .psize = 64, + .digest = { 0x87, 0xfb, 0x2a, 0x90, 0x83, 0x85, 0x1c, 0xf7, + 0x47, 0x0d, 0x2c, 0xf8, 0x10, 0xe6, 0xdf, 0x9e }, + }, { + .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789", + .psize = 64, + .digest = { 0x46, 0x7d, 0xb8, 0x08, 0x63, 0xeb, 0xce, 0x48, + 0x8d, 0xf1, 0xcd, 0x12, 0x61, 0x65, 0x5d, 0xe9 }, + }, { + .plaintext = "Tiger - A Fast New Hash Function, " + "by Ross Anderson and Eli Biham, " + "proceedings of Fast Software Encryption 3, " + "Cambridge, 1996.", + .psize = 125, + .digest = { 0x3d, 0x9a, 0xeb, 0x03, 0xd1, 0xbd, 0x1a, 0x63, + 0x57, 0xb2, 0x77, 0x4d, 0xfd, 0x6d, 0x5b, 0x24 }, + }, +}; #ifdef CONFIG_CRYPTO_HMAC /* diff -Nru a/crypto/tgr192.c b/crypto/tgr192.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/crypto/tgr192.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,735 @@ +/* + * Cryptographic API. + * + * Tiger hashing Algorithm + * + * Copyright (C) 1998 Free Software Foundation, Inc. + * + * The Tiger algorithm was developed by Ross Anderson and Eli Biham. + * It was optimized for 64-bit processors while still delievering + * decent performance on 32 and 16-bit processors. + * + * This version is derived from the GnuPG implementation and the + * Tiger-Perl interface written by Rafael Sevilla + * + * Adapted for Linux Kernel Crypto by Aaron Grothe + * ajgrothe@yahoo.com, February 22, 2005 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + */ +#include +#include +#include +#include +#include + +#define TGR192_DIGEST_SIZE 24 +#define TGR160_DIGEST_SIZE 20 +#define TGR128_DIGEST_SIZE 16 + +#define TGR192_BLOCK_SIZE 64 + +struct tgr192_ctx { + u64 a, b, c; + u8 hash[64]; + int count; + u32 nblocks; +}; + +static const u64 sbox1[256] = { + 0x02aab17cf7e90c5eULL, 0xac424b03e243a8ecULL, 0x72cd5be30dd5fcd3ULL, + 0x6d019b93f6f97f3aULL, 0xcd9978ffd21f9193ULL, 0x7573a1c9708029e2ULL, + 0xb164326b922a83c3ULL, 0x46883eee04915870ULL, 0xeaace3057103ece6ULL, + 0xc54169b808a3535cULL, 0x4ce754918ddec47cULL, 0x0aa2f4dfdc0df40cULL, + 0x10b76f18a74dbefaULL, 0xc6ccb6235ad1ab6aULL, 0x13726121572fe2ffULL, + 0x1a488c6f199d921eULL, 0x4bc9f9f4da0007caULL, 0x26f5e6f6e85241c7ULL, + 0x859079dbea5947b6ULL, 0x4f1885c5c99e8c92ULL, 0xd78e761ea96f864bULL, + 0x8e36428c52b5c17dULL, 0x69cf6827373063c1ULL, 0xb607c93d9bb4c56eULL, + 0x7d820e760e76b5eaULL, 0x645c9cc6f07fdc42ULL, 0xbf38a078243342e0ULL, + 0x5f6b343c9d2e7d04ULL, 0xf2c28aeb600b0ec6ULL, 0x6c0ed85f7254bcacULL, + 0x71592281a4db4fe5ULL, 0x1967fa69ce0fed9fULL, 0xfd5293f8b96545dbULL, + 0xc879e9d7f2a7600bULL, 0x860248920193194eULL, 0xa4f9533b2d9cc0b3ULL, + 0x9053836c15957613ULL, 0xdb6dcf8afc357bf1ULL, 0x18beea7a7a370f57ULL, + 0x037117ca50b99066ULL, 0x6ab30a9774424a35ULL, 0xf4e92f02e325249bULL, + 0x7739db07061ccae1ULL, 0xd8f3b49ceca42a05ULL, 0xbd56be3f51382f73ULL, + 0x45faed5843b0bb28ULL, 0x1c813d5c11bf1f83ULL, 0x8af0e4b6d75fa169ULL, + 0x33ee18a487ad9999ULL, 0x3c26e8eab1c94410ULL, 0xb510102bc0a822f9ULL, + 0x141eef310ce6123bULL, 0xfc65b90059ddb154ULL, 0xe0158640c5e0e607ULL, + 0x884e079826c3a3cfULL, 0x930d0d9523c535fdULL, 0x35638d754e9a2b00ULL, + 0x4085fccf40469dd5ULL, 0xc4b17ad28be23a4cULL, 0xcab2f0fc6a3e6a2eULL, + 0x2860971a6b943fcdULL, 0x3dde6ee212e30446ULL, 0x6222f32ae01765aeULL, + 0x5d550bb5478308feULL, 0xa9efa98da0eda22aULL, 0xc351a71686c40da7ULL, + 0x1105586d9c867c84ULL, 0xdcffee85fda22853ULL, 0xccfbd0262c5eef76ULL, + 0xbaf294cb8990d201ULL, 0xe69464f52afad975ULL, 0x94b013afdf133e14ULL, + 0x06a7d1a32823c958ULL, 0x6f95fe5130f61119ULL, 0xd92ab34e462c06c0ULL, + 0xed7bde33887c71d2ULL, 0x79746d6e6518393eULL, 0x5ba419385d713329ULL, + 0x7c1ba6b948a97564ULL, 0x31987c197bfdac67ULL, 0xde6c23c44b053d02ULL, + 0x581c49fed002d64dULL, 0xdd474d6338261571ULL, 0xaa4546c3e473d062ULL, + 0x928fce349455f860ULL, 0x48161bbacaab94d9ULL, 0x63912430770e6f68ULL, + 0x6ec8a5e602c6641cULL, 0x87282515337ddd2bULL, 0x2cda6b42034b701bULL, + 0xb03d37c181cb096dULL, 0xe108438266c71c6fULL, 0x2b3180c7eb51b255ULL, + 0xdf92b82f96c08bbcULL, 0x5c68c8c0a632f3baULL, 0x5504cc861c3d0556ULL, + 0xabbfa4e55fb26b8fULL, 0x41848b0ab3baceb4ULL, 0xb334a273aa445d32ULL, + 0xbca696f0a85ad881ULL, 0x24f6ec65b528d56cULL, 0x0ce1512e90f4524aULL, + 0x4e9dd79d5506d35aULL, 0x258905fac6ce9779ULL, 0x2019295b3e109b33ULL, + 0xf8a9478b73a054ccULL, 0x2924f2f934417eb0ULL, 0x3993357d536d1bc4ULL, + 0x38a81ac21db6ff8bULL, 0x47c4fbf17d6016bfULL, 0x1e0faadd7667e3f5ULL, + 0x7abcff62938beb96ULL, 0xa78dad948fc179c9ULL, 0x8f1f98b72911e50dULL, + 0x61e48eae27121a91ULL, 0x4d62f7ad31859808ULL, 0xeceba345ef5ceaebULL, + 0xf5ceb25ebc9684ceULL, 0xf633e20cb7f76221ULL, 0xa32cdf06ab8293e4ULL, + 0x985a202ca5ee2ca4ULL, 0xcf0b8447cc8a8fb1ULL, 0x9f765244979859a3ULL, + 0xa8d516b1a1240017ULL, 0x0bd7ba3ebb5dc726ULL, 0xe54bca55b86adb39ULL, + 0x1d7a3afd6c478063ULL, 0x519ec608e7669eddULL, 0x0e5715a2d149aa23ULL, + 0x177d4571848ff194ULL, 0xeeb55f3241014c22ULL, 0x0f5e5ca13a6e2ec2ULL, + 0x8029927b75f5c361ULL, 0xad139fabc3d6e436ULL, 0x0d5df1a94ccf402fULL, + 0x3e8bd948bea5dfc8ULL, 0xa5a0d357bd3ff77eULL, 0xa2d12e251f74f645ULL, + 0x66fd9e525e81a082ULL, 0x2e0c90ce7f687a49ULL, 0xc2e8bcbeba973bc5ULL, + 0x000001bce509745fULL, 0x423777bbe6dab3d6ULL, 0xd1661c7eaef06eb5ULL, + 0xa1781f354daacfd8ULL, 0x2d11284a2b16affcULL, 0xf1fc4f67fa891d1fULL, + 0x73ecc25dcb920adaULL, 0xae610c22c2a12651ULL, 0x96e0a810d356b78aULL, + 0x5a9a381f2fe7870fULL, 0xd5ad62ede94e5530ULL, 0xd225e5e8368d1427ULL, + 0x65977b70c7af4631ULL, 0x99f889b2de39d74fULL, 0x233f30bf54e1d143ULL, + 0x9a9675d3d9a63c97ULL, 0x5470554ff334f9a8ULL, 0x166acb744a4f5688ULL, + 0x70c74caab2e4aeadULL, 0xf0d091646f294d12ULL, 0x57b82a89684031d1ULL, + 0xefd95a5a61be0b6bULL, 0x2fbd12e969f2f29aULL, 0x9bd37013feff9fe8ULL, + 0x3f9b0404d6085a06ULL, 0x4940c1f3166cfe15ULL, 0x09542c4dcdf3defbULL, + 0xb4c5218385cd5ce3ULL, 0xc935b7dc4462a641ULL, 0x3417f8a68ed3b63fULL, + 0xb80959295b215b40ULL, 0xf99cdaef3b8c8572ULL, 0x018c0614f8fcb95dULL, + 0x1b14accd1a3acdf3ULL, 0x84d471f200bb732dULL, 0xc1a3110e95e8da16ULL, + 0x430a7220bf1a82b8ULL, 0xb77e090d39df210eULL, 0x5ef4bd9f3cd05e9dULL, + 0x9d4ff6da7e57a444ULL, 0xda1d60e183d4a5f8ULL, 0xb287c38417998e47ULL, + 0xfe3edc121bb31886ULL, 0xc7fe3ccc980ccbefULL, 0xe46fb590189bfd03ULL, + 0x3732fd469a4c57dcULL, 0x7ef700a07cf1ad65ULL, 0x59c64468a31d8859ULL, + 0x762fb0b4d45b61f6ULL, 0x155baed099047718ULL, 0x68755e4c3d50baa6ULL, + 0xe9214e7f22d8b4dfULL, 0x2addbf532eac95f4ULL, 0x32ae3909b4bd0109ULL, + 0x834df537b08e3450ULL, 0xfa209da84220728dULL, 0x9e691d9b9efe23f7ULL, + 0x0446d288c4ae8d7fULL, 0x7b4cc524e169785bULL, 0x21d87f0135ca1385ULL, + 0xcebb400f137b8aa5ULL, 0x272e2b66580796beULL, 0x3612264125c2b0deULL, + 0x057702bdad1efbb2ULL, 0xd4babb8eacf84be9ULL, 0x91583139641bc67bULL, + 0x8bdc2de08036e024ULL, 0x603c8156f49f68edULL, 0xf7d236f7dbef5111ULL, + 0x9727c4598ad21e80ULL, 0xa08a0896670a5fd7ULL, 0xcb4a8f4309eba9cbULL, + 0x81af564b0f7036a1ULL, 0xc0b99aa778199abdULL, 0x959f1ec83fc8e952ULL, + 0x8c505077794a81b9ULL, 0x3acaaf8f056338f0ULL, 0x07b43f50627a6778ULL, + 0x4a44ab49f5eccc77ULL, 0x3bc3d6e4b679ee98ULL, 0x9cc0d4d1cf14108cULL, + 0x4406c00b206bc8a0ULL, 0x82a18854c8d72d89ULL, 0x67e366b35c3c432cULL, + 0xb923dd61102b37f2ULL, 0x56ab2779d884271dULL, 0xbe83e1b0ff1525afULL, + 0xfb7c65d4217e49a9ULL, 0x6bdbe0e76d48e7d4ULL, 0x08df828745d9179eULL, + 0x22ea6a9add53bd34ULL, 0xe36e141c5622200aULL, 0x7f805d1b8cb750eeULL, + 0xafe5c7a59f58e837ULL, 0xe27f996a4fb1c23cULL, 0xd3867dfb0775f0d0ULL, + 0xd0e673de6e88891aULL, 0x123aeb9eafb86c25ULL, 0x30f1d5d5c145b895ULL, + 0xbb434a2dee7269e7ULL, 0x78cb67ecf931fa38ULL, 0xf33b0372323bbf9cULL, + 0x52d66336fb279c74ULL, 0x505f33ac0afb4eaaULL, 0xe8a5cd99a2cce187ULL, + 0x534974801e2d30bbULL, 0x8d2d5711d5876d90ULL, 0x1f1a412891bc038eULL, + 0xd6e2e71d82e56648ULL, 0x74036c3a497732b7ULL, 0x89b67ed96361f5abULL, + 0xffed95d8f1ea02a2ULL, 0xe72b3bd61464d43dULL, 0xa6300f170bdc4820ULL, + 0xebc18760ed78a77aULL +}; + +static const u64 sbox2[256] = { + 0xe6a6be5a05a12138ULL, 0xb5a122a5b4f87c98ULL, 0x563c6089140b6990ULL, + 0x4c46cb2e391f5dd5ULL, 0xd932addbc9b79434ULL, 0x08ea70e42015aff5ULL, + 0xd765a6673e478cf1ULL, 0xc4fb757eab278d99ULL, 0xdf11c6862d6e0692ULL, + 0xddeb84f10d7f3b16ULL, 0x6f2ef604a665ea04ULL, 0x4a8e0f0ff0e0dfb3ULL, + 0xa5edeef83dbcba51ULL, 0xfc4f0a2a0ea4371eULL, 0xe83e1da85cb38429ULL, + 0xdc8ff882ba1b1ce2ULL, 0xcd45505e8353e80dULL, 0x18d19a00d4db0717ULL, + 0x34a0cfeda5f38101ULL, 0x0be77e518887caf2ULL, 0x1e341438b3c45136ULL, + 0xe05797f49089ccf9ULL, 0xffd23f9df2591d14ULL, 0x543dda228595c5cdULL, + 0x661f81fd99052a33ULL, 0x8736e641db0f7b76ULL, 0x15227725418e5307ULL, + 0xe25f7f46162eb2faULL, 0x48a8b2126c13d9feULL, 0xafdc541792e76eeaULL, + 0x03d912bfc6d1898fULL, 0x31b1aafa1b83f51bULL, 0xf1ac2796e42ab7d9ULL, + 0x40a3a7d7fcd2ebacULL, 0x1056136d0afbbcc5ULL, 0x7889e1dd9a6d0c85ULL, + 0xd33525782a7974aaULL, 0xa7e25d09078ac09bULL, 0xbd4138b3eac6edd0ULL, + 0x920abfbe71eb9e70ULL, 0xa2a5d0f54fc2625cULL, 0xc054e36b0b1290a3ULL, + 0xf6dd59ff62fe932bULL, 0x3537354511a8ac7dULL, 0xca845e9172fadcd4ULL, + 0x84f82b60329d20dcULL, 0x79c62ce1cd672f18ULL, 0x8b09a2add124642cULL, + 0xd0c1e96a19d9e726ULL, 0x5a786a9b4ba9500cULL, 0x0e020336634c43f3ULL, + 0xc17b474aeb66d822ULL, 0x6a731ae3ec9baac2ULL, 0x8226667ae0840258ULL, + 0x67d4567691caeca5ULL, 0x1d94155c4875adb5ULL, 0x6d00fd985b813fdfULL, + 0x51286efcb774cd06ULL, 0x5e8834471fa744afULL, 0xf72ca0aee761ae2eULL, + 0xbe40e4cdaee8e09aULL, 0xe9970bbb5118f665ULL, 0x726e4beb33df1964ULL, + 0x703b000729199762ULL, 0x4631d816f5ef30a7ULL, 0xb880b5b51504a6beULL, + 0x641793c37ed84b6cULL, 0x7b21ed77f6e97d96ULL, 0x776306312ef96b73ULL, + 0xae528948e86ff3f4ULL, 0x53dbd7f286a3f8f8ULL, 0x16cadce74cfc1063ULL, + 0x005c19bdfa52c6ddULL, 0x68868f5d64d46ad3ULL, 0x3a9d512ccf1e186aULL, + 0x367e62c2385660aeULL, 0xe359e7ea77dcb1d7ULL, 0x526c0773749abe6eULL, + 0x735ae5f9d09f734bULL, 0x493fc7cc8a558ba8ULL, 0xb0b9c1533041ab45ULL, + 0x321958ba470a59bdULL, 0x852db00b5f46c393ULL, 0x91209b2bd336b0e5ULL, + 0x6e604f7d659ef19fULL, 0xb99a8ae2782ccb24ULL, 0xccf52ab6c814c4c7ULL, + 0x4727d9afbe11727bULL, 0x7e950d0c0121b34dULL, 0x756f435670ad471fULL, + 0xf5add442615a6849ULL, 0x4e87e09980b9957aULL, 0x2acfa1df50aee355ULL, + 0xd898263afd2fd556ULL, 0xc8f4924dd80c8fd6ULL, 0xcf99ca3d754a173aULL, + 0xfe477bacaf91bf3cULL, 0xed5371f6d690c12dULL, 0x831a5c285e687094ULL, + 0xc5d3c90a3708a0a4ULL, 0x0f7f903717d06580ULL, 0x19f9bb13b8fdf27fULL, + 0xb1bd6f1b4d502843ULL, 0x1c761ba38fff4012ULL, 0x0d1530c4e2e21f3bULL, + 0x8943ce69a7372c8aULL, 0xe5184e11feb5ce66ULL, 0x618bdb80bd736621ULL, + 0x7d29bad68b574d0bULL, 0x81bb613e25e6fe5bULL, 0x071c9c10bc07913fULL, + 0xc7beeb7909ac2d97ULL, 0xc3e58d353bc5d757ULL, 0xeb017892f38f61e8ULL, + 0xd4effb9c9b1cc21aULL, 0x99727d26f494f7abULL, 0xa3e063a2956b3e03ULL, + 0x9d4a8b9a4aa09c30ULL, 0x3f6ab7d500090fb4ULL, 0x9cc0f2a057268ac0ULL, + 0x3dee9d2dedbf42d1ULL, 0x330f49c87960a972ULL, 0xc6b2720287421b41ULL, + 0x0ac59ec07c00369cULL, 0xef4eac49cb353425ULL, 0xf450244eef0129d8ULL, + 0x8acc46e5caf4deb6ULL, 0x2ffeab63989263f7ULL, 0x8f7cb9fe5d7a4578ULL, + 0x5bd8f7644e634635ULL, 0x427a7315bf2dc900ULL, 0x17d0c4aa2125261cULL, + 0x3992486c93518e50ULL, 0xb4cbfee0a2d7d4c3ULL, 0x7c75d6202c5ddd8dULL, + 0xdbc295d8e35b6c61ULL, 0x60b369d302032b19ULL, 0xce42685fdce44132ULL, + 0x06f3ddb9ddf65610ULL, 0x8ea4d21db5e148f0ULL, 0x20b0fce62fcd496fULL, + 0x2c1b912358b0ee31ULL, 0xb28317b818f5a308ULL, 0xa89c1e189ca6d2cfULL, + 0x0c6b18576aaadbc8ULL, 0xb65deaa91299fae3ULL, 0xfb2b794b7f1027e7ULL, + 0x04e4317f443b5bebULL, 0x4b852d325939d0a6ULL, 0xd5ae6beefb207ffcULL, + 0x309682b281c7d374ULL, 0xbae309a194c3b475ULL, 0x8cc3f97b13b49f05ULL, + 0x98a9422ff8293967ULL, 0x244b16b01076ff7cULL, 0xf8bf571c663d67eeULL, + 0x1f0d6758eee30da1ULL, 0xc9b611d97adeb9b7ULL, 0xb7afd5887b6c57a2ULL, + 0x6290ae846b984fe1ULL, 0x94df4cdeacc1a5fdULL, 0x058a5bd1c5483affULL, + 0x63166cc142ba3c37ULL, 0x8db8526eb2f76f40ULL, 0xe10880036f0d6d4eULL, + 0x9e0523c9971d311dULL, 0x45ec2824cc7cd691ULL, 0x575b8359e62382c9ULL, + 0xfa9e400dc4889995ULL, 0xd1823ecb45721568ULL, 0xdafd983b8206082fULL, + 0xaa7d29082386a8cbULL, 0x269fcd4403b87588ULL, 0x1b91f5f728bdd1e0ULL, + 0xe4669f39040201f6ULL, 0x7a1d7c218cf04adeULL, 0x65623c29d79ce5ceULL, + 0x2368449096c00bb1ULL, 0xab9bf1879da503baULL, 0xbc23ecb1a458058eULL, + 0x9a58df01bb401eccULL, 0xa070e868a85f143dULL, 0x4ff188307df2239eULL, + 0x14d565b41a641183ULL, 0xee13337452701602ULL, 0x950e3dcf3f285e09ULL, + 0x59930254b9c80953ULL, 0x3bf299408930da6dULL, 0xa955943f53691387ULL, + 0xa15edecaa9cb8784ULL, 0x29142127352be9a0ULL, 0x76f0371fff4e7afbULL, + 0x0239f450274f2228ULL, 0xbb073af01d5e868bULL, 0xbfc80571c10e96c1ULL, + 0xd267088568222e23ULL, 0x9671a3d48e80b5b0ULL, 0x55b5d38ae193bb81ULL, + 0x693ae2d0a18b04b8ULL, 0x5c48b4ecadd5335fULL, 0xfd743b194916a1caULL, + 0x2577018134be98c4ULL, 0xe77987e83c54a4adULL, 0x28e11014da33e1b9ULL, + 0x270cc59e226aa213ULL, 0x71495f756d1a5f60ULL, 0x9be853fb60afef77ULL, + 0xadc786a7f7443dbfULL, 0x0904456173b29a82ULL, 0x58bc7a66c232bd5eULL, + 0xf306558c673ac8b2ULL, 0x41f639c6b6c9772aULL, 0x216defe99fda35daULL, + 0x11640cc71c7be615ULL, 0x93c43694565c5527ULL, 0xea038e6246777839ULL, + 0xf9abf3ce5a3e2469ULL, 0x741e768d0fd312d2ULL, 0x0144b883ced652c6ULL, + 0xc20b5a5ba33f8552ULL, 0x1ae69633c3435a9dULL, 0x97a28ca4088cfdecULL, + 0x8824a43c1e96f420ULL, 0x37612fa66eeea746ULL, 0x6b4cb165f9cf0e5aULL, + 0x43aa1c06a0abfb4aULL, 0x7f4dc26ff162796bULL, 0x6cbacc8e54ed9b0fULL, + 0xa6b7ffefd2bb253eULL, 0x2e25bc95b0a29d4fULL, 0x86d6a58bdef1388cULL, + 0xded74ac576b6f054ULL, 0x8030bdbc2b45805dULL, 0x3c81af70e94d9289ULL, + 0x3eff6dda9e3100dbULL, 0xb38dc39fdfcc8847ULL, 0x123885528d17b87eULL, + 0xf2da0ed240b1b642ULL, 0x44cefadcd54bf9a9ULL, 0x1312200e433c7ee6ULL, + 0x9ffcc84f3a78c748ULL, 0xf0cd1f72248576bbULL, 0xec6974053638cfe4ULL, + 0x2ba7b67c0cec4e4cULL, 0xac2f4df3e5ce32edULL, 0xcb33d14326ea4c11ULL, + 0xa4e9044cc77e58bcULL, 0x5f513293d934fcefULL, 0x5dc9645506e55444ULL, + 0x50de418f317de40aULL, 0x388cb31a69dde259ULL, 0x2db4a83455820a86ULL, + 0x9010a91e84711ae9ULL, 0x4df7f0b7b1498371ULL, 0xd62a2eabc0977179ULL, + 0x22fac097aa8d5c0eULL +}; + +static const u64 sbox3[256] = { + 0xf49fcc2ff1daf39bULL, 0x487fd5c66ff29281ULL, 0xe8a30667fcdca83fULL, + 0x2c9b4be3d2fcce63ULL, 0xda3ff74b93fbbbc2ULL, 0x2fa165d2fe70ba66ULL, + 0xa103e279970e93d4ULL, 0xbecdec77b0e45e71ULL, 0xcfb41e723985e497ULL, + 0xb70aaa025ef75017ULL, 0xd42309f03840b8e0ULL, 0x8efc1ad035898579ULL, + 0x96c6920be2b2abc5ULL, 0x66af4163375a9172ULL, 0x2174abdcca7127fbULL, + 0xb33ccea64a72ff41ULL, 0xf04a4933083066a5ULL, 0x8d970acdd7289af5ULL, + 0x8f96e8e031c8c25eULL, 0xf3fec02276875d47ULL, 0xec7bf310056190ddULL, + 0xf5adb0aebb0f1491ULL, 0x9b50f8850fd58892ULL, 0x4975488358b74de8ULL, + 0xa3354ff691531c61ULL, 0x0702bbe481d2c6eeULL, 0x89fb24057deded98ULL, + 0xac3075138596e902ULL, 0x1d2d3580172772edULL, 0xeb738fc28e6bc30dULL, + 0x5854ef8f63044326ULL, 0x9e5c52325add3bbeULL, 0x90aa53cf325c4623ULL, + 0xc1d24d51349dd067ULL, 0x2051cfeea69ea624ULL, 0x13220f0a862e7e4fULL, + 0xce39399404e04864ULL, 0xd9c42ca47086fcb7ULL, 0x685ad2238a03e7ccULL, + 0x066484b2ab2ff1dbULL, 0xfe9d5d70efbf79ecULL, 0x5b13b9dd9c481854ULL, + 0x15f0d475ed1509adULL, 0x0bebcd060ec79851ULL, 0xd58c6791183ab7f8ULL, + 0xd1187c5052f3eee4ULL, 0xc95d1192e54e82ffULL, 0x86eea14cb9ac6ca2ULL, + 0x3485beb153677d5dULL, 0xdd191d781f8c492aULL, 0xf60866baa784ebf9ULL, + 0x518f643ba2d08c74ULL, 0x8852e956e1087c22ULL, 0xa768cb8dc410ae8dULL, + 0x38047726bfec8e1aULL, 0xa67738b4cd3b45aaULL, 0xad16691cec0dde19ULL, + 0xc6d4319380462e07ULL, 0xc5a5876d0ba61938ULL, 0x16b9fa1fa58fd840ULL, + 0x188ab1173ca74f18ULL, 0xabda2f98c99c021fULL, 0x3e0580ab134ae816ULL, + 0x5f3b05b773645abbULL, 0x2501a2be5575f2f6ULL, 0x1b2f74004e7e8ba9ULL, + 0x1cd7580371e8d953ULL, 0x7f6ed89562764e30ULL, 0xb15926ff596f003dULL, + 0x9f65293da8c5d6b9ULL, 0x6ecef04dd690f84cULL, 0x4782275fff33af88ULL, + 0xe41433083f820801ULL, 0xfd0dfe409a1af9b5ULL, 0x4325a3342cdb396bULL, + 0x8ae77e62b301b252ULL, 0xc36f9e9f6655615aULL, 0x85455a2d92d32c09ULL, + 0xf2c7dea949477485ULL, 0x63cfb4c133a39ebaULL, 0x83b040cc6ebc5462ULL, + 0x3b9454c8fdb326b0ULL, 0x56f56a9e87ffd78cULL, 0x2dc2940d99f42bc6ULL, + 0x98f7df096b096e2dULL, 0x19a6e01e3ad852bfULL, 0x42a99ccbdbd4b40bULL, + 0xa59998af45e9c559ULL, 0x366295e807d93186ULL, 0x6b48181bfaa1f773ULL, + 0x1fec57e2157a0a1dULL, 0x4667446af6201ad5ULL, 0xe615ebcacfb0f075ULL, + 0xb8f31f4f68290778ULL, 0x22713ed6ce22d11eULL, 0x3057c1a72ec3c93bULL, + 0xcb46acc37c3f1f2fULL, 0xdbb893fd02aaf50eULL, 0x331fd92e600b9fcfULL, + 0xa498f96148ea3ad6ULL, 0xa8d8426e8b6a83eaULL, 0xa089b274b7735cdcULL, + 0x87f6b3731e524a11ULL, 0x118808e5cbc96749ULL, 0x9906e4c7b19bd394ULL, + 0xafed7f7e9b24a20cULL, 0x6509eadeeb3644a7ULL, 0x6c1ef1d3e8ef0edeULL, + 0xb9c97d43e9798fb4ULL, 0xa2f2d784740c28a3ULL, 0x7b8496476197566fULL, + 0x7a5be3e6b65f069dULL, 0xf96330ed78be6f10ULL, 0xeee60de77a076a15ULL, + 0x2b4bee4aa08b9bd0ULL, 0x6a56a63ec7b8894eULL, 0x02121359ba34fef4ULL, + 0x4cbf99f8283703fcULL, 0x398071350caf30c8ULL, 0xd0a77a89f017687aULL, + 0xf1c1a9eb9e423569ULL, 0x8c7976282dee8199ULL, 0x5d1737a5dd1f7abdULL, + 0x4f53433c09a9fa80ULL, 0xfa8b0c53df7ca1d9ULL, 0x3fd9dcbc886ccb77ULL, + 0xc040917ca91b4720ULL, 0x7dd00142f9d1dcdfULL, 0x8476fc1d4f387b58ULL, + 0x23f8e7c5f3316503ULL, 0x032a2244e7e37339ULL, 0x5c87a5d750f5a74bULL, + 0x082b4cc43698992eULL, 0xdf917becb858f63cULL, 0x3270b8fc5bf86ddaULL, + 0x10ae72bb29b5dd76ULL, 0x576ac94e7700362bULL, 0x1ad112dac61efb8fULL, + 0x691bc30ec5faa427ULL, 0xff246311cc327143ULL, 0x3142368e30e53206ULL, + 0x71380e31e02ca396ULL, 0x958d5c960aad76f1ULL, 0xf8d6f430c16da536ULL, + 0xc8ffd13f1be7e1d2ULL, 0x7578ae66004ddbe1ULL, 0x05833f01067be646ULL, + 0xbb34b5ad3bfe586dULL, 0x095f34c9a12b97f0ULL, 0x247ab64525d60ca8ULL, + 0xdcdbc6f3017477d1ULL, 0x4a2e14d4decad24dULL, 0xbdb5e6d9be0a1eebULL, + 0x2a7e70f7794301abULL, 0xdef42d8a270540fdULL, 0x01078ec0a34c22c1ULL, + 0xe5de511af4c16387ULL, 0x7ebb3a52bd9a330aULL, 0x77697857aa7d6435ULL, + 0x004e831603ae4c32ULL, 0xe7a21020ad78e312ULL, 0x9d41a70c6ab420f2ULL, + 0x28e06c18ea1141e6ULL, 0xd2b28cbd984f6b28ULL, 0x26b75f6c446e9d83ULL, + 0xba47568c4d418d7fULL, 0xd80badbfe6183d8eULL, 0x0e206d7f5f166044ULL, + 0xe258a43911cbca3eULL, 0x723a1746b21dc0bcULL, 0xc7caa854f5d7cdd3ULL, + 0x7cac32883d261d9cULL, 0x7690c26423ba942cULL, 0x17e55524478042b8ULL, + 0xe0be477656a2389fULL, 0x4d289b5e67ab2da0ULL, 0x44862b9c8fbbfd31ULL, + 0xb47cc8049d141365ULL, 0x822c1b362b91c793ULL, 0x4eb14655fb13dfd8ULL, + 0x1ecbba0714e2a97bULL, 0x6143459d5cde5f14ULL, 0x53a8fbf1d5f0ac89ULL, + 0x97ea04d81c5e5b00ULL, 0x622181a8d4fdb3f3ULL, 0xe9bcd341572a1208ULL, + 0x1411258643cce58aULL, 0x9144c5fea4c6e0a4ULL, 0x0d33d06565cf620fULL, + 0x54a48d489f219ca1ULL, 0xc43e5eac6d63c821ULL, 0xa9728b3a72770dafULL, + 0xd7934e7b20df87efULL, 0xe35503b61a3e86e5ULL, 0xcae321fbc819d504ULL, + 0x129a50b3ac60bfa6ULL, 0xcd5e68ea7e9fb6c3ULL, 0xb01c90199483b1c7ULL, + 0x3de93cd5c295376cULL, 0xaed52edf2ab9ad13ULL, 0x2e60f512c0a07884ULL, + 0xbc3d86a3e36210c9ULL, 0x35269d9b163951ceULL, 0x0c7d6e2ad0cdb5faULL, + 0x59e86297d87f5733ULL, 0x298ef221898db0e7ULL, 0x55000029d1a5aa7eULL, + 0x8bc08ae1b5061b45ULL, 0xc2c31c2b6c92703aULL, 0x94cc596baf25ef42ULL, + 0x0a1d73db22540456ULL, 0x04b6a0f9d9c4179aULL, 0xeffdafa2ae3d3c60ULL, + 0xf7c8075bb49496c4ULL, 0x9cc5c7141d1cd4e3ULL, 0x78bd1638218e5534ULL, + 0xb2f11568f850246aULL, 0xedfabcfa9502bc29ULL, 0x796ce5f2da23051bULL, + 0xaae128b0dc93537cULL, 0x3a493da0ee4b29aeULL, 0xb5df6b2c416895d7ULL, + 0xfcabbd25122d7f37ULL, 0x70810b58105dc4b1ULL, 0xe10fdd37f7882a90ULL, + 0x524dcab5518a3f5cULL, 0x3c9e85878451255bULL, 0x4029828119bd34e2ULL, + 0x74a05b6f5d3ceccbULL, 0xb610021542e13ecaULL, 0x0ff979d12f59e2acULL, + 0x6037da27e4f9cc50ULL, 0x5e92975a0df1847dULL, 0xd66de190d3e623feULL, + 0x5032d6b87b568048ULL, 0x9a36b7ce8235216eULL, 0x80272a7a24f64b4aULL, + 0x93efed8b8c6916f7ULL, 0x37ddbff44cce1555ULL, 0x4b95db5d4b99bd25ULL, + 0x92d3fda169812fc0ULL, 0xfb1a4a9a90660bb6ULL, 0x730c196946a4b9b2ULL, + 0x81e289aa7f49da68ULL, 0x64669a0f83b1a05fULL, 0x27b3ff7d9644f48bULL, + 0xcc6b615c8db675b3ULL, 0x674f20b9bcebbe95ULL, 0x6f31238275655982ULL, + 0x5ae488713e45cf05ULL, 0xbf619f9954c21157ULL, 0xeabac46040a8eae9ULL, + 0x454c6fe9f2c0c1cdULL, 0x419cf6496412691cULL, 0xd3dc3bef265b0f70ULL, + 0x6d0e60f5c3578a9eULL +}; + +static const u64 sbox4[256] = { + 0x5b0e608526323c55ULL, 0x1a46c1a9fa1b59f5ULL, 0xa9e245a17c4c8ffaULL, + 0x65ca5159db2955d7ULL, 0x05db0a76ce35afc2ULL, 0x81eac77ea9113d45ULL, + 0x528ef88ab6ac0a0dULL, 0xa09ea253597be3ffULL, 0x430ddfb3ac48cd56ULL, + 0xc4b3a67af45ce46fULL, 0x4ececfd8fbe2d05eULL, 0x3ef56f10b39935f0ULL, + 0x0b22d6829cd619c6ULL, 0x17fd460a74df2069ULL, 0x6cf8cc8e8510ed40ULL, + 0xd6c824bf3a6ecaa7ULL, 0x61243d581a817049ULL, 0x048bacb6bbc163a2ULL, + 0xd9a38ac27d44cc32ULL, 0x7fddff5baaf410abULL, 0xad6d495aa804824bULL, + 0xe1a6a74f2d8c9f94ULL, 0xd4f7851235dee8e3ULL, 0xfd4b7f886540d893ULL, + 0x247c20042aa4bfdaULL, 0x096ea1c517d1327cULL, 0xd56966b4361a6685ULL, + 0x277da5c31221057dULL, 0x94d59893a43acff7ULL, 0x64f0c51ccdc02281ULL, + 0x3d33bcc4ff6189dbULL, 0xe005cb184ce66af1ULL, 0xff5ccd1d1db99beaULL, + 0xb0b854a7fe42980fULL, 0x7bd46a6a718d4b9fULL, 0xd10fa8cc22a5fd8cULL, + 0xd31484952be4bd31ULL, 0xc7fa975fcb243847ULL, 0x4886ed1e5846c407ULL, + 0x28cddb791eb70b04ULL, 0xc2b00be2f573417fULL, 0x5c9590452180f877ULL, + 0x7a6bddfff370eb00ULL, 0xce509e38d6d9d6a4ULL, 0xebeb0f00647fa702ULL, + 0x1dcc06cf76606f06ULL, 0xe4d9f28ba286ff0aULL, 0xd85a305dc918c262ULL, + 0x475b1d8732225f54ULL, 0x2d4fb51668ccb5feULL, 0xa679b9d9d72bba20ULL, + 0x53841c0d912d43a5ULL, 0x3b7eaa48bf12a4e8ULL, 0x781e0e47f22f1ddfULL, + 0xeff20ce60ab50973ULL, 0x20d261d19dffb742ULL, 0x16a12b03062a2e39ULL, + 0x1960eb2239650495ULL, 0x251c16fed50eb8b8ULL, 0x9ac0c330f826016eULL, + 0xed152665953e7671ULL, 0x02d63194a6369570ULL, 0x5074f08394b1c987ULL, + 0x70ba598c90b25ce1ULL, 0x794a15810b9742f6ULL, 0x0d5925e9fcaf8c6cULL, + 0x3067716cd868744eULL, 0x910ab077e8d7731bULL, 0x6a61bbdb5ac42f61ULL, + 0x93513efbf0851567ULL, 0xf494724b9e83e9d5ULL, 0xe887e1985c09648dULL, + 0x34b1d3c675370cfdULL, 0xdc35e433bc0d255dULL, 0xd0aab84234131be0ULL, + 0x08042a50b48b7eafULL, 0x9997c4ee44a3ab35ULL, 0x829a7b49201799d0ULL, + 0x263b8307b7c54441ULL, 0x752f95f4fd6a6ca6ULL, 0x927217402c08c6e5ULL, + 0x2a8ab754a795d9eeULL, 0xa442f7552f72943dULL, 0x2c31334e19781208ULL, + 0x4fa98d7ceaee6291ULL, 0x55c3862f665db309ULL, 0xbd0610175d53b1f3ULL, + 0x46fe6cb840413f27ULL, 0x3fe03792df0cfa59ULL, 0xcfe700372eb85e8fULL, + 0xa7be29e7adbce118ULL, 0xe544ee5cde8431ddULL, 0x8a781b1b41f1873eULL, + 0xa5c94c78a0d2f0e7ULL, 0x39412e2877b60728ULL, 0xa1265ef3afc9a62cULL, + 0xbcc2770c6a2506c5ULL, 0x3ab66dd5dce1ce12ULL, 0xe65499d04a675b37ULL, + 0x7d8f523481bfd216ULL, 0x0f6f64fcec15f389ULL, 0x74efbe618b5b13c8ULL, + 0xacdc82b714273e1dULL, 0xdd40bfe003199d17ULL, 0x37e99257e7e061f8ULL, + 0xfa52626904775aaaULL, 0x8bbbf63a463d56f9ULL, 0xf0013f1543a26e64ULL, + 0xa8307e9f879ec898ULL, 0xcc4c27a4150177ccULL, 0x1b432f2cca1d3348ULL, + 0xde1d1f8f9f6fa013ULL, 0x606602a047a7ddd6ULL, 0xd237ab64cc1cb2c7ULL, + 0x9b938e7225fcd1d3ULL, 0xec4e03708e0ff476ULL, 0xfeb2fbda3d03c12dULL, + 0xae0bced2ee43889aULL, 0x22cb8923ebfb4f43ULL, 0x69360d013cf7396dULL, + 0x855e3602d2d4e022ULL, 0x073805bad01f784cULL, 0x33e17a133852f546ULL, + 0xdf4874058ac7b638ULL, 0xba92b29c678aa14aULL, 0x0ce89fc76cfaadcdULL, + 0x5f9d4e0908339e34ULL, 0xf1afe9291f5923b9ULL, 0x6e3480f60f4a265fULL, + 0xeebf3a2ab29b841cULL, 0xe21938a88f91b4adULL, 0x57dfeff845c6d3c3ULL, + 0x2f006b0bf62caaf2ULL, 0x62f479ef6f75ee78ULL, 0x11a55ad41c8916a9ULL, + 0xf229d29084fed453ULL, 0x42f1c27b16b000e6ULL, 0x2b1f76749823c074ULL, + 0x4b76eca3c2745360ULL, 0x8c98f463b91691bdULL, 0x14bcc93cf1ade66aULL, + 0x8885213e6d458397ULL, 0x8e177df0274d4711ULL, 0xb49b73b5503f2951ULL, + 0x10168168c3f96b6bULL, 0x0e3d963b63cab0aeULL, 0x8dfc4b5655a1db14ULL, + 0xf789f1356e14de5cULL, 0x683e68af4e51dac1ULL, 0xc9a84f9d8d4b0fd9ULL, + 0x3691e03f52a0f9d1ULL, 0x5ed86e46e1878e80ULL, 0x3c711a0e99d07150ULL, + 0x5a0865b20c4e9310ULL, 0x56fbfc1fe4f0682eULL, 0xea8d5de3105edf9bULL, + 0x71abfdb12379187aULL, 0x2eb99de1bee77b9cULL, 0x21ecc0ea33cf4523ULL, + 0x59a4d7521805c7a1ULL, 0x3896f5eb56ae7c72ULL, 0xaa638f3db18f75dcULL, + 0x9f39358dabe9808eULL, 0xb7defa91c00b72acULL, 0x6b5541fd62492d92ULL, + 0x6dc6dee8f92e4d5bULL, 0x353f57abc4beea7eULL, 0x735769d6da5690ceULL, + 0x0a234aa642391484ULL, 0xf6f9508028f80d9dULL, 0xb8e319a27ab3f215ULL, + 0x31ad9c1151341a4dULL, 0x773c22a57bef5805ULL, 0x45c7561a07968633ULL, + 0xf913da9e249dbe36ULL, 0xda652d9b78a64c68ULL, 0x4c27a97f3bc334efULL, + 0x76621220e66b17f4ULL, 0x967743899acd7d0bULL, 0xf3ee5bcae0ed6782ULL, + 0x409f753600c879fcULL, 0x06d09a39b5926db6ULL, 0x6f83aeb0317ac588ULL, + 0x01e6ca4a86381f21ULL, 0x66ff3462d19f3025ULL, 0x72207c24ddfd3bfbULL, + 0x4af6b6d3e2ece2ebULL, 0x9c994dbec7ea08deULL, 0x49ace597b09a8bc4ULL, + 0xb38c4766cf0797baULL, 0x131b9373c57c2a75ULL, 0xb1822cce61931e58ULL, + 0x9d7555b909ba1c0cULL, 0x127fafdd937d11d2ULL, 0x29da3badc66d92e4ULL, + 0xa2c1d57154c2ecbcULL, 0x58c5134d82f6fe24ULL, 0x1c3ae3515b62274fULL, + 0xe907c82e01cb8126ULL, 0xf8ed091913e37fcbULL, 0x3249d8f9c80046c9ULL, + 0x80cf9bede388fb63ULL, 0x1881539a116cf19eULL, 0x5103f3f76bd52457ULL, + 0x15b7e6f5ae47f7a8ULL, 0xdbd7c6ded47e9ccfULL, 0x44e55c410228bb1aULL, + 0xb647d4255edb4e99ULL, 0x5d11882bb8aafc30ULL, 0xf5098bbb29d3212aULL, + 0x8fb5ea14e90296b3ULL, 0x677b942157dd025aULL, 0xfb58e7c0a390acb5ULL, + 0x89d3674c83bd4a01ULL, 0x9e2da4df4bf3b93bULL, 0xfcc41e328cab4829ULL, + 0x03f38c96ba582c52ULL, 0xcad1bdbd7fd85db2ULL, 0xbbb442c16082ae83ULL, + 0xb95fe86ba5da9ab0ULL, 0xb22e04673771a93fULL, 0x845358c9493152d8ULL, + 0xbe2a488697b4541eULL, 0x95a2dc2dd38e6966ULL, 0xc02c11ac923c852bULL, + 0x2388b1990df2a87bULL, 0x7c8008fa1b4f37beULL, 0x1f70d0c84d54e503ULL, + 0x5490adec7ece57d4ULL, 0x002b3c27d9063a3aULL, 0x7eaea3848030a2bfULL, + 0xc602326ded2003c0ULL, 0x83a7287d69a94086ULL, 0xc57a5fcb30f57a8aULL, + 0xb56844e479ebe779ULL, 0xa373b40f05dcbce9ULL, 0xd71a786e88570ee2ULL, + 0x879cbacdbde8f6a0ULL, 0x976ad1bcc164a32fULL, 0xab21e25e9666d78bULL, + 0x901063aae5e5c33cULL, 0x9818b34448698d90ULL, 0xe36487ae3e1e8abbULL, + 0xafbdf931893bdcb4ULL, 0x6345a0dc5fbbd519ULL, 0x8628fe269b9465caULL, + 0x1e5d01603f9c51ecULL, 0x4de44006a15049b7ULL, 0xbf6c70e5f776cbb1ULL, + 0x411218f2ef552bedULL, 0xcb0c0708705a36a3ULL, 0xe74d14754f986044ULL, + 0xcd56d9430ea8280eULL, 0xc12591d7535f5065ULL, 0xc83223f1720aef96ULL, + 0xc3a0396f7363a51fULL +}; + + +static void tgr192_round(u64 * ra, u64 * rb, u64 * rc, u64 x, int mul) +{ + u64 a = *ra; + u64 b = *rb; + u64 c = *rc; + + c ^= x; + a -= sbox1[c & 0xff] ^ sbox2[(c >> 16) & 0xff] + ^ sbox3[(c >> 32) & 0xff] ^ sbox4[(c >> 48) & 0xff]; + b += sbox4[(c >> 8) & 0xff] ^ sbox3[(c >> 24) & 0xff] + ^ sbox2[(c >> 40) & 0xff] ^ sbox1[(c >> 56) & 0xff]; + b *= mul; + + *ra = a; + *rb = b; + *rc = c; +} + + +static void tgr192_pass(u64 * ra, u64 * rb, u64 * rc, u64 * x, int mul) +{ + u64 a = *ra; + u64 b = *rb; + u64 c = *rc; + + tgr192_round(&a, &b, &c, x[0], mul); + tgr192_round(&b, &c, &a, x[1], mul); + tgr192_round(&c, &a, &b, x[2], mul); + tgr192_round(&a, &b, &c, x[3], mul); + tgr192_round(&b, &c, &a, x[4], mul); + tgr192_round(&c, &a, &b, x[5], mul); + tgr192_round(&a, &b, &c, x[6], mul); + tgr192_round(&b, &c, &a, x[7], mul); + + *ra = a; + *rb = b; + *rc = c; +} + + +static void tgr192_key_schedule(u64 * x) +{ + x[0] -= x[7] ^ 0xa5a5a5a5a5a5a5a5ULL; + x[1] ^= x[0]; + x[2] += x[1]; + x[3] -= x[2] ^ ((~x[1]) << 19); + x[4] ^= x[3]; + x[5] += x[4]; + x[6] -= x[5] ^ ((~x[4]) >> 23); + x[7] ^= x[6]; + x[0] += x[7]; + x[1] -= x[0] ^ ((~x[7]) << 19); + x[2] ^= x[1]; + x[3] += x[2]; + x[4] -= x[3] ^ ((~x[2]) >> 23); + x[5] ^= x[4]; + x[6] += x[5]; + x[7] -= x[6] ^ 0x0123456789abcdefULL; +} + + +/**************** + * Transform the message DATA which consists of 512 bytes (8 words) + */ + +static void tgr192_transform(struct tgr192_ctx *tctx, const u8 * data) +{ + u64 a, b, c, aa, bb, cc; + u64 x[8]; + int i; + const u8 *ptr = data; + + for (i = 0; i < 8; i++, ptr += 8) { + x[i] = (((u64)ptr[7] ) << 56) ^ + (((u64)ptr[6] & 0xffL) << 48) ^ + (((u64)ptr[5] & 0xffL) << 40) ^ + (((u64)ptr[4] & 0xffL) << 32) ^ + (((u64)ptr[3] & 0xffL) << 24) ^ + (((u64)ptr[2] & 0xffL) << 16) ^ + (((u64)ptr[1] & 0xffL) << 8) ^ + (((u64)ptr[0] & 0xffL) ); + } + + /* save */ + a = aa = tctx->a; + b = bb = tctx->b; + c = cc = tctx->c; + + tgr192_pass(&a, &b, &c, x, 5); + tgr192_key_schedule(x); + tgr192_pass(&c, &a, &b, x, 7); + tgr192_key_schedule(x); + tgr192_pass(&b, &c, &a, x, 9); + + + /* feedforward */ + a ^= aa; + b -= bb; + c += cc; + /* store */ + tctx->a = a; + tctx->b = b; + tctx->c = c; +} + +static void tgr192_init(void *ctx) +{ + struct tgr192_ctx *tctx = ctx; + + memset (tctx->hash, 0, 64); + tctx->a = 0x0123456789abcdefULL; + tctx->b = 0xfedcba9876543210ULL; + tctx->c = 0xf096a5b4c3b2e187ULL; + tctx->nblocks = 0; + tctx->count = 0; +} + + +/* Update the message digest with the contents + * of INBUF with length INLEN. */ +static void tgr192_update(void *ctx, const u8 * inbuf, unsigned int len) +{ + struct tgr192_ctx *tctx = ctx; + + if (tctx->count == 64) { /* flush the buffer */ + tgr192_transform(tctx, tctx->hash); + tctx->count = 0; + tctx->nblocks++; + } + if (!inbuf) { + return; + } + if (tctx->count) { + for (; len && tctx->count < 64; len--) { + tctx->hash[tctx->count++] = *inbuf++; + } + tgr192_update(tctx, NULL, 0); + if (!len) { + return; + } + + } + + while (len >= 64) { + tgr192_transform(tctx, inbuf); + tctx->count = 0; + tctx->nblocks++; + len -= 64; + inbuf += 64; + } + for (; len && tctx->count < 64; len--) { + tctx->hash[tctx->count++] = *inbuf++; + } +} + + + +/* The routine terminates the computation */ +static void tgr192_final(void *ctx, u8 * out) +{ + struct tgr192_ctx *tctx = ctx; + u32 t, msb, lsb; + u8 *p; + int i, j; + + tgr192_update(tctx, NULL, 0); /* flush */ ; + + msb = 0; + t = tctx->nblocks; + if ((lsb = t << 6) < t) { /* multiply by 64 to make a byte count */ + msb++; + } + msb += t >> 26; + t = lsb; + if ((lsb = t + tctx->count) < t) { /* add the count */ + msb++; + } + t = lsb; + if ((lsb = t << 3) < t) { /* multiply by 8 to make a bit count */ + msb++; + } + msb += t >> 29; + + if (tctx->count < 56) { /* enough room */ + tctx->hash[tctx->count++] = 0x01; /* pad */ + while (tctx->count < 56) { + tctx->hash[tctx->count++] = 0; /* pad */ + } + } else { /* need one extra block */ + tctx->hash[tctx->count++] = 0x01; /* pad character */ + while (tctx->count < 64) { + tctx->hash[tctx->count++] = 0; + } + tgr192_update(tctx, NULL, 0); /* flush */ ; + memset(tctx->hash, 0, 56); /* fill next block with zeroes */ + } + /* append the 64 bit count */ + tctx->hash[56] = lsb; + tctx->hash[57] = lsb >> 8; + tctx->hash[58] = lsb >> 16; + tctx->hash[59] = lsb >> 24; + tctx->hash[60] = msb; + tctx->hash[61] = msb >> 8; + tctx->hash[62] = msb >> 16; + tctx->hash[63] = msb >> 24; + tgr192_transform(tctx, tctx->hash); + + p = tctx->hash; + *p++ = tctx->a >> 56; *p++ = tctx->a >> 48; *p++ = tctx->a >> 40; + *p++ = tctx->a >> 32; *p++ = tctx->a >> 24; *p++ = tctx->a >> 16; + *p++ = tctx->a >> 8; *p++ = tctx->a;\ + *p++ = tctx->b >> 56; *p++ = tctx->b >> 48; *p++ = tctx->b >> 40; + *p++ = tctx->b >> 32; *p++ = tctx->b >> 24; *p++ = tctx->b >> 16; + *p++ = tctx->b >> 8; *p++ = tctx->b; + *p++ = tctx->c >> 56; *p++ = tctx->c >> 48; *p++ = tctx->c >> 40; + *p++ = tctx->c >> 32; *p++ = tctx->c >> 24; *p++ = tctx->c >> 16; + *p++ = tctx->c >> 8; *p++ = tctx->c; + + + /* unpack the hash */ + j = 7; + for (i = 0; i < 8; i++) { + out[j--] = (tctx->a >> 8 * i) & 0xff; + } + j = 15; + for (i = 0; i < 8; i++) { + out[j--] = (tctx->b >> 8 * i) & 0xff; + } + j = 23; + for (i = 0; i < 8; i++) { + out[j--] = (tctx->c >> 8 * i) & 0xff; + } +} + +static void tgr160_final(void *ctx, u8 * out) +{ + struct tgr192_ctx *wctx = ctx; + u8 D[64]; + + tgr192_final(wctx, D); + memcpy(out, D, TGR160_DIGEST_SIZE); + memset(D, 0, TGR192_DIGEST_SIZE); +} + +static void tgr128_final(void *ctx, u8 * out) +{ + struct tgr192_ctx *wctx = ctx; + u8 D[64]; + + tgr192_final(wctx, D); + memcpy(out, D, TGR128_DIGEST_SIZE); + memset(D, 0, TGR192_DIGEST_SIZE); +} + +static struct crypto_alg tgr192 = { + .cra_name = "tgr192", + .cra_flags = CRYPTO_ALG_TYPE_DIGEST, + .cra_blocksize = TGR192_BLOCK_SIZE, + .cra_ctxsize = sizeof(struct tgr192_ctx), + .cra_module = THIS_MODULE, + .cra_list = LIST_HEAD_INIT(tgr192.cra_list), + .cra_u = {.digest = { + .dia_digestsize = TGR192_DIGEST_SIZE, + .dia_init = tgr192_init, + .dia_update = tgr192_update, + .dia_final = tgr192_final}} +}; + +static struct crypto_alg tgr160 = { + .cra_name = "tgr160", + .cra_flags = CRYPTO_ALG_TYPE_DIGEST, + .cra_blocksize = TGR192_BLOCK_SIZE, + .cra_ctxsize = sizeof(struct tgr192_ctx), + .cra_module = THIS_MODULE, + .cra_list = LIST_HEAD_INIT(tgr160.cra_list), + .cra_u = {.digest = { + .dia_digestsize = TGR160_DIGEST_SIZE, + .dia_init = tgr192_init, + .dia_update = tgr192_update, + .dia_final = tgr160_final}} +}; + +static struct crypto_alg tgr128 = { + .cra_name = "tgr128", + .cra_flags = CRYPTO_ALG_TYPE_DIGEST, + .cra_blocksize = TGR192_BLOCK_SIZE, + .cra_ctxsize = sizeof(struct tgr192_ctx), + .cra_module = THIS_MODULE, + .cra_list = LIST_HEAD_INIT(tgr128.cra_list), + .cra_u = {.digest = { + .dia_digestsize = TGR128_DIGEST_SIZE, + .dia_init = tgr192_init, + .dia_update = tgr192_update, + .dia_final = tgr128_final}} +}; + +static int __init init(void) +{ + int ret = 0; + + ret = crypto_register_alg(&tgr192); + + if (ret < 0) { + goto out; + } + + ret = crypto_register_alg(&tgr160); + if (ret < 0) { + crypto_unregister_alg(&tgr192); + goto out; + } + + ret = crypto_register_alg(&tgr128); + if (ret < 0) { + crypto_unregister_alg(&tgr192); + crypto_unregister_alg(&tgr160); + } + out: + return ret; +} + +static void __exit fini(void) +{ + crypto_unregister_alg(&tgr192); + crypto_unregister_alg(&tgr160); + crypto_unregister_alg(&tgr128); +} + +MODULE_ALIAS("tgr160"); +MODULE_ALIAS("tgr128"); + +module_init(init); +module_exit(fini); + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("Tiger Message Digest Algorithm"); diff -Nru a/drivers/acorn/char/i2c.c b/drivers/acorn/char/i2c.c --- a/drivers/acorn/char/i2c.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/acorn/char/i2c.c 2005-03-07 14:54:18 -08:00 @@ -313,7 +313,7 @@ static int ioc_client_reg(struct i2c_client *client) { - if (client->id == I2C_DRIVERID_PCF8583 && + if (client->driver->id == I2C_DRIVERID_PCF8583 && client->addr == 0x50) { struct rtc_tm rtctm; unsigned int year; diff -Nru a/drivers/acorn/char/pcf8583.c b/drivers/acorn/char/pcf8583.c --- a/drivers/acorn/char/pcf8583.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/acorn/char/pcf8583.c 2005-03-07 14:54:18 -08:00 @@ -51,7 +51,6 @@ return -ENOMEM; memset(c, 0, sizeof(*c)); - c->id = pcf8583_driver.id; c->addr = addr; c->adapter = adap; c->driver = &pcf8583_driver; diff -Nru a/drivers/atm/atmtcp.c b/drivers/atm/atmtcp.c --- a/drivers/atm/atmtcp.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/atm/atmtcp.c 2005-03-07 14:54:17 -08:00 @@ -67,7 +67,7 @@ *(struct atm_vcc **) &new_msg->vcc = vcc; old_test = test_bit(flag,&vcc->flags); out_vcc->push(out_vcc,skb); - add_wait_queue(vcc->sk->sk_sleep, &wait); + add_wait_queue(sk_atm(vcc)->sk_sleep, &wait); while (test_bit(flag,&vcc->flags) == old_test) { mb(); out_vcc = PRIV(vcc->dev) ? PRIV(vcc->dev)->vcc : NULL; @@ -79,7 +79,7 @@ schedule(); } set_current_state(TASK_RUNNING); - remove_wait_queue(vcc->sk->sk_sleep, &wait); + remove_wait_queue(sk_atm(vcc)->sk_sleep, &wait); return error; } @@ -91,7 +91,7 @@ vcc->vpi = msg->addr.sap_addr.vpi; vcc->vci = msg->addr.sap_addr.vci; vcc->qos = msg->qos; - vcc->sk->sk_err = -msg->result; + sk_atm(vcc)->sk_err = -msg->result; switch (msg->type) { case ATMTCP_CTRL_OPEN: change_bit(ATM_VF_READY,&vcc->flags); @@ -104,7 +104,7 @@ msg->type); return -EINVAL; } - wake_up(vcc->sk->sk_sleep); + wake_up(sk_atm(vcc)->sk_sleep); return 0; } @@ -135,7 +135,7 @@ clear_bit(ATM_VF_READY,&vcc->flags); /* just in case ... */ error = atmtcp_send_control(vcc,ATMTCP_CTRL_OPEN,&msg,ATM_VF_READY); if (error) return error; - return -vcc->sk->sk_err; + return -sk_atm(vcc)->sk_err; } @@ -267,7 +267,7 @@ walk = atm_sk(s); if (walk->dev != atmtcp_dev) continue; - wake_up(walk->sk->sk_sleep); + wake_up(s->sk_sleep); } } read_unlock(&vcc_sklist_lock); @@ -417,7 +417,7 @@ } PRIV(dev)->vcc = vcc; vcc->dev = &atmtcp_control_dev; - vcc_insert_socket(vcc->sk); + vcc_insert_socket(sk_atm(vcc)); set_bit(ATM_VF_META,&vcc->flags); set_bit(ATM_VF_READY,&vcc->flags); vcc->dev_data = dev; diff -Nru a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c --- a/drivers/atm/fore200e.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/atm/fore200e.c 2005-03-07 14:54:18 -08:00 @@ -1027,7 +1027,7 @@ /* when a vcc is closed, some PDUs may be still pending in the tx queue. if the same vcc is immediately re-opened, those pending PDUs must not be popped after the completion of their emission, as they refer - to the prior incarnation of that vcc. otherwise, vcc->sk->sk_wmem_alloc + to the prior incarnation of that vcc. otherwise, sk_atm(vcc)->sk_wmem_alloc would be decremented by the size of the (unrelated) skb, possibly leading to a negative sk->sk_wmem_alloc count, ultimately freezing the vcc. we thus bind the tx entry to the current incarnation of the vcc @@ -1054,8 +1054,8 @@ } #if 1 /* race fixed by the above incarnation mechanism, but... */ - if (atomic_read(&vcc->sk->sk_wmem_alloc) < 0) { - atomic_set(&vcc->sk->sk_wmem_alloc, 0); + if (atomic_read(&sk_atm(vcc)->sk_wmem_alloc) < 0) { + atomic_set(&sk_atm(vcc)->sk_wmem_alloc, 0); } #endif /* check error condition */ @@ -1258,12 +1258,12 @@ return -ENOMEM; } - ASSERT(atomic_read(&vcc->sk->sk_wmem_alloc) >= 0); + ASSERT(atomic_read(&sk_atm(vcc)->sk_wmem_alloc) >= 0); vcc->push(vcc, skb); atomic_inc(&vcc->stats->rx); - ASSERT(atomic_read(&vcc->sk->sk_wmem_alloc) >= 0); + ASSERT(atomic_read(&sk_atm(vcc)->sk_wmem_alloc) >= 0); return 0; } @@ -1700,7 +1700,7 @@ unsigned long flags; ASSERT(vcc); - ASSERT(atomic_read(&vcc->sk->sk_wmem_alloc) >= 0); + ASSERT(atomic_read(&sk_atm(vcc)->sk_wmem_alloc) >= 0); ASSERT(fore200e); ASSERT(fore200e_vcc); diff -Nru a/drivers/atm/he.c b/drivers/atm/he.c --- a/drivers/atm/he.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/atm/he.c 2005-03-07 14:54:16 -08:00 @@ -2610,7 +2610,7 @@ * TBRQ, the host issues the close command to the adapter. */ - while (((tx_inuse = atomic_read(&vcc->sk->sk_wmem_alloc)) > 0) && + while (((tx_inuse = atomic_read(&sk_atm(vcc)->sk_wmem_alloc)) > 0) && (retry < MAX_RETRY)) { msleep(sleep); if (sleep < 250) diff -Nru a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c --- a/drivers/atm/idt77252.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/atm/idt77252.c 2005-03-07 14:54:17 -08:00 @@ -727,10 +727,11 @@ spin_lock_irqsave(&vc->lock, flags); if (vc->estimator) { struct atm_vcc *vcc = vc->tx_vcc; + struct sock *sk = sk_atm(vcc); vc->estimator->cells += (skb->len + 47) / 48; - if (atomic_read(&vcc->sk->sk_wmem_alloc) > - (vcc->sk->sk_sndbuf >> 1)) { + if (atomic_read(&sk->sk_wmem_alloc) > + (sk->sk_sndbuf >> 1)) { u32 cps = vc->estimator->maxcps; vc->estimator->cps = cps; @@ -1325,7 +1326,7 @@ goto drop; } - if ((vcc->sk != NULL) && !atm_charge(vcc, sb->truesize)) { + if (!atm_charge(vcc, sb->truesize)) { RXPRINTK("%s: atm_charge() dropped AAL0 packets.\n", card->name); dev_kfree_skb(sb); @@ -2029,7 +2030,7 @@ atomic_inc(&vcc->stats->tx_err); return -ENOMEM; } - atomic_add(skb->truesize, &vcc->sk->sk_wmem_alloc); + atomic_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc); memcpy(skb_put(skb, 52), cell, 52); diff -Nru a/drivers/atm/iphase.c b/drivers/atm/iphase.c --- a/drivers/atm/iphase.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/atm/iphase.c 2005-03-07 14:54:18 -08:00 @@ -1778,16 +1778,18 @@ if (ia_vcc->pcr < iadev->rate_limit) skb_queue_head_init (&ia_vcc->txing_skb); if (ia_vcc->pcr < iadev->rate_limit) { - if (vcc->qos.txtp.max_sdu != 0) { + struct sock *sk = sk_atm(vcc); + + if (vcc->qos.txtp.max_sdu != 0) { if (ia_vcc->pcr > 60000) - vcc->sk->sk_sndbuf = vcc->qos.txtp.max_sdu * 5; + sk->sk_sndbuf = vcc->qos.txtp.max_sdu * 5; else if (ia_vcc->pcr > 2000) - vcc->sk->sk_sndbuf = vcc->qos.txtp.max_sdu * 4; + sk->sk_sndbuf = vcc->qos.txtp.max_sdu * 4; else - vcc->sk->sk_sndbuf = vcc->qos.txtp.max_sdu * 3; + sk->sk_sndbuf = vcc->qos.txtp.max_sdu * 3; } else - vcc->sk->sk_sndbuf = 24576; + sk->sk_sndbuf = 24576; } vc = (struct main_vc *)iadev->MAIN_VC_TABLE_ADDR; diff -Nru a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c --- a/drivers/block/aoe/aoeblk.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/block/aoe/aoeblk.c 2005-03-07 14:54:16 -08:00 @@ -28,7 +28,8 @@ { struct aoedev *d = disk->private_data; - return snprintf(page, PAGE_SIZE, "%012llx\n", mac_addr(d->addr)); + return snprintf(page, PAGE_SIZE, "%012llx\n", + (unsigned long long)mac_addr(d->addr)); } static ssize_t aoedisk_show_netif(struct gendisk * disk, char *page) { @@ -241,7 +242,8 @@ aoedisk_add_sysfs(d); printk(KERN_INFO "aoe: %012llx e%lu.%lu v%04x has %llu " - "sectors\n", mac_addr(d->addr), d->aoemajor, d->aoeminor, + "sectors\n", (unsigned long long)mac_addr(d->addr), + d->aoemajor, d->aoeminor, d->fw_ver, (long long)d->ssize); } diff -Nru a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c --- a/drivers/bluetooth/bluecard_cs.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/bluetooth/bluecard_cs.c 2005-03-07 14:54:17 -08:00 @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -289,8 +290,9 @@ clear_bit(ready_bit, &(info->tx_state)); if (skb->pkt_type & 0x80) { + DECLARE_WAIT_QUEUE_HEAD(wq); + DEFINE_WAIT(wait); - wait_queue_head_t wait; unsigned char baud_reg; switch (skb->pkt_type) { @@ -311,8 +313,9 @@ } /* Wait until the command reaches the baseband */ - init_waitqueue_head(&wait); - interruptible_sleep_on_timeout(&wait, HZ / 10); + prepare_to_wait(&wq, &wait, TASK_INTERRUPTIBLE); + schedule_timeout(HZ/10); + finish_wait(&wq, &wait); /* Set baud on baseband */ info->ctrl_reg &= ~0x03; @@ -324,8 +327,9 @@ outb(info->ctrl_reg, iobase + REG_CONTROL); /* Wait before the next HCI packet can be send */ - interruptible_sleep_on_timeout(&wait, HZ); - + prepare_to_wait(&wq, &wait, TASK_INTERRUPTIBLE); + schedule_timeout(HZ); + finish_wait(&wq, &wait); } if (len == skb->len) { diff -Nru a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c --- a/drivers/bluetooth/hci_usb.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/bluetooth/hci_usb.c 2005-03-07 14:54:18 -08:00 @@ -888,7 +888,7 @@ isoc_ifnum = 1; #ifdef CONFIG_BT_HCIUSB_SCO - if (isoc && !(id->driver_info & HCI_BROKEN_ISOC)) + if (isoc && !(id->driver_info & (HCI_BROKEN_ISOC | HCI_SNIFFER))) isoc_iface = usb_ifnum_to_if(udev, isoc_ifnum); if (isoc_iface) { diff -Nru a/drivers/char/Kconfig b/drivers/char/Kconfig --- a/drivers/char/Kconfig 2005-03-07 14:54:16 -08:00 +++ b/drivers/char/Kconfig 2005-03-07 14:54:16 -08:00 @@ -839,6 +839,10 @@ To compile this driver as a module, choose M here: the module will be called sonypi. +config TANBAC_TB0219 + tristate "TANBAC TB0219 base board support" + depends TANBAC_TB0229 + menu "Ftape, the floppy tape device driver" diff -Nru a/drivers/char/Makefile b/drivers/char/Makefile --- a/drivers/char/Makefile 2005-03-07 14:54:18 -08:00 +++ b/drivers/char/Makefile 2005-03-07 14:54:18 -08:00 @@ -80,6 +80,7 @@ obj-$(CONFIG_NWBUTTON) += nwbutton.o obj-$(CONFIG_NWFLASH) += nwflash.o obj-$(CONFIG_SCx200_GPIO) += scx200_gpio.o +obj-$(CONFIG_TANBAC_TB0219) += tb0219.o obj-$(CONFIG_WATCHDOG) += watchdog/ obj-$(CONFIG_MWAVE) += mwave/ diff -Nru a/drivers/char/agp/Kconfig b/drivers/char/agp/Kconfig --- a/drivers/char/agp/Kconfig 2005-03-07 14:54:17 -08:00 +++ b/drivers/char/agp/Kconfig 2005-03-07 14:54:17 -08:00 @@ -89,16 +89,6 @@ use GLX or DRI, or if you have any Intel integrated graphics chipsets. If unsure, say Y. -config AGP_INTEL_MCH - tristate "Intel i865 chipset support" - depends on AGP && X86 - help - This option gives you AGP support for the GLX component of XFree86 4.x - on Intel chipsets that support Intel EM64T processors. - - You should say Y here if you use XFree86 3.3.6 or 4.x and want to - use GLX or DRI. If unsure, say Y. - config AGP_NVIDIA tristate "NVIDIA nForce/nForce2 chipset support" depends on AGP && X86 && !X86_64 diff -Nru a/drivers/char/agp/Makefile b/drivers/char/agp/Makefile --- a/drivers/char/agp/Makefile 2005-03-07 14:54:16 -08:00 +++ b/drivers/char/agp/Makefile 2005-03-07 14:54:16 -08:00 @@ -9,7 +9,6 @@ obj-$(CONFIG_AGP_EFFICEON) += efficeon-agp.o obj-$(CONFIG_AGP_HP_ZX1) += hp-agp.o obj-$(CONFIG_AGP_I460) += i460-agp.o -obj-$(CONFIG_AGP_INTEL_MCH) += intel-mch-agp.o obj-$(CONFIG_AGP_INTEL) += intel-agp.o obj-$(CONFIG_AGP_NVIDIA) += nvidia-agp.o obj-$(CONFIG_AGP_SIS) += sis-agp.o diff -Nru a/drivers/char/agp/agp.h b/drivers/char/agp/agp.h --- a/drivers/char/agp/agp.h 2005-03-07 14:54:17 -08:00 +++ b/drivers/char/agp/agp.h 2005-03-07 14:54:17 -08:00 @@ -1,5 +1,6 @@ /* * AGPGART + * Copyright (C) 2004 Silicon Graphics, Inc. * Copyright (C) 2002-2004 Dave Jones * Copyright (C) 1999 Jeff Hartmann * Copyright (C) 1999 Precision Insight, Inc. @@ -100,18 +101,19 @@ struct gatt_mask *masks; int (*fetch_size)(void); int (*configure)(void); - void (*agp_enable)(u32); + void (*agp_enable)(struct agp_bridge_data *, u32); void (*cleanup)(void); void (*tlb_flush)(struct agp_memory *); - unsigned long (*mask_memory)(unsigned long, int); + unsigned long (*mask_memory)(struct agp_bridge_data *, + unsigned long, int); void (*cache_flush)(void); - int (*create_gatt_table)(void); - int (*free_gatt_table)(void); + int (*create_gatt_table)(struct agp_bridge_data *); + int (*free_gatt_table)(struct agp_bridge_data *); int (*insert_memory)(struct agp_memory *, off_t, int); int (*remove_memory)(struct agp_memory *, off_t, int); struct agp_memory *(*alloc_by_type) (size_t, int); void (*free_by_type)(struct agp_memory *); - void *(*agp_alloc_page)(void); + void *(*agp_alloc_page)(struct agp_bridge_data *); void (*agp_destroy_page)(void *); }; @@ -137,8 +139,10 @@ int max_memory_agp; /* in number of pages */ int aperture_size_idx; int capndx; + int flags; char major_version; char minor_version; + struct list_head list; }; #define KB(x) ((x) * 1024) @@ -243,24 +247,26 @@ void agp_frontend_cleanup(void); /* Generic routines. */ -void agp_generic_enable(u32 mode); -int agp_generic_create_gatt_table(void); -int agp_generic_free_gatt_table(void); +void agp_generic_enable(struct agp_bridge_data *bridge, u32 mode); +int agp_generic_create_gatt_table(struct agp_bridge_data *bridge); +int agp_generic_free_gatt_table(struct agp_bridge_data *bridge); struct agp_memory *agp_create_memory(int scratch_pages); int agp_generic_insert_memory(struct agp_memory *mem, off_t pg_start, int type); int agp_generic_remove_memory(struct agp_memory *mem, off_t pg_start, int type); struct agp_memory *agp_generic_alloc_by_type(size_t page_count, int type); void agp_generic_free_by_type(struct agp_memory *curr); -void *agp_generic_alloc_page(void); +void *agp_generic_alloc_page(struct agp_bridge_data *bridge); void agp_generic_destroy_page(void *addr); void agp_free_key(int key); int agp_num_entries(void); -u32 agp_collect_device_status(u32 mode, u32 command); +u32 agp_collect_device_status(struct agp_bridge_data *bridge, u32 mode, u32 command); void agp_device_command(u32 command, int agp_v3); int agp_3_5_enable(struct agp_bridge_data *bridge); void global_cache_flush(void); void get_agp_version(struct agp_bridge_data *bridge); -unsigned long agp_generic_mask_memory(unsigned long addr, int type); +unsigned long agp_generic_mask_memory(struct agp_bridge_data *bridge, + unsigned long addr, int type); +struct agp_bridge_data *agp_generic_find_bridge(struct pci_dev *pdev); /* generic routines for agp>=3 */ int agp3_generic_fetch_size(void); @@ -314,5 +320,12 @@ #define AGPCTRL_APERENB (1<<8) #define AGPCTRL_GTLBEN (1<<7) + +#define AGP2_RESERVED_MASK 0x00fffcc8 +#define AGP3_RESERVED_MASK 0x00ff00cc + +#define AGP_ERRATA_FASTWRITES 1<<0 +#define AGP_ERRATA_SBA 1<<1 +#define AGP_ERRATA_1X 1<<2 #endif /* _AGP_BACKEND_PRIV_H */ diff -Nru a/drivers/char/agp/ali-agp.c b/drivers/char/agp/ali-agp.c --- a/drivers/char/agp/ali-agp.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/char/agp/ali-agp.c 2005-03-07 14:54:17 -08:00 @@ -139,9 +139,9 @@ } } -static void *m1541_alloc_page(void) +static void *m1541_alloc_page(struct agp_bridge_data *bridge) { - void *addr = agp_generic_alloc_page(); + void *addr = agp_generic_alloc_page(agp_bridge); u32 temp; if (!addr) @@ -398,7 +398,7 @@ { if (agp_off) return -EINVAL; - return pci_module_init(&agp_ali_pci_driver); + return pci_register_driver(&agp_ali_pci_driver); } static void __exit agp_ali_cleanup(void) diff -Nru a/drivers/char/agp/alpha-agp.c b/drivers/char/agp/alpha-agp.c --- a/drivers/char/agp/alpha-agp.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/char/agp/alpha-agp.c 2005-03-07 14:54:17 -08:00 @@ -76,11 +76,12 @@ alpha_mv.mv_pci_tbi(agp->hose, 0, -1); } -static void alpha_core_agp_enable(u32 mode) +static void alpha_core_agp_enable(struct agp_bridge_data *bridge, u32 mode) { - alpha_agp_info *agp = agp_bridge->dev_private_data; + alpha_agp_info *agp = bridge->dev_private_data; - agp->mode.lw = agp_collect_device_status(mode, agp->capability.lw); + agp->mode.lw = agp_collect_device_status(bridge, mode, + agp->capability.lw); agp->mode.bits.enable = 1; agp->ops->configure(agp); diff -Nru a/drivers/char/agp/amd-k7-agp.c b/drivers/char/agp/amd-k7-agp.c --- a/drivers/char/agp/amd-k7-agp.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/char/agp/amd-k7-agp.c 2005-03-07 14:54:18 -08:00 @@ -132,7 +132,7 @@ #define GET_GATT(addr) (amd_irongate_private.gatt_pages[\ GET_PAGE_DIR_IDX(addr)]->remapped) -static int amd_create_gatt_table(void) +static int amd_create_gatt_table(struct agp_bridge_data *bridge) { struct aper_size_info_lvl2 *value; struct amd_page_map page_dir; @@ -175,7 +175,7 @@ return 0; } -static int amd_free_gatt_table(void) +static int amd_free_gatt_table(struct agp_bridge_data *bridge) { struct amd_page_map page_dir; @@ -314,7 +314,8 @@ for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { addr = (j * PAGE_SIZE) + agp_bridge->gart_bus_addr; cur_gatt = GET_GATT(addr); - writel(agp_generic_mask_memory(mem->memory[i], mem->type), cur_gatt+GET_GATT_OFF(addr)); + writel(agp_generic_mask_memory(agp_bridge, + mem->memory[i], mem->type), cur_gatt+GET_GATT_OFF(addr)); readl(cur_gatt+GET_GATT_OFF(addr)); /* PCI Posting. */ } amd_irongate_tlbflush(mem); @@ -421,6 +422,53 @@ bridge->dev = pdev; bridge->capndx = cap_ptr; + /* 751 Errata (22564_B-1.PDF) + erratum 20: strobe glitch with Nvidia NV10 GeForce cards. + system controller may experience noise due to strong drive strengths + */ + if (agp_bridge->dev->device == PCI_DEVICE_ID_AMD_FE_GATE_7006) { + u8 cap_ptr=0; + struct pci_dev *gfxcard=NULL; + while (!cap_ptr) { + gfxcard = pci_get_class(PCI_CLASS_DISPLAY_VGA<<8, gfxcard); + if (!gfxcard) { + printk (KERN_INFO PFX "Couldn't find an AGP VGA controller.\n"); + return -ENODEV; + } + cap_ptr = pci_find_capability(gfxcard, PCI_CAP_ID_AGP); + if (!cap_ptr) { + pci_dev_put(gfxcard); + continue; + } + } + + /* With so many variants of NVidia cards, it's simpler just + to blacklist them all, and then whitelist them as needed + (if necessary at all). */ + if (gfxcard->vendor == PCI_VENDOR_ID_NVIDIA) { + agp_bridge->flags |= AGP_ERRATA_1X; + printk (KERN_INFO PFX "AMD 751 chipset with NVidia GeForce detected. Forcing to 1X due to errata.\n"); + } + pci_dev_put(gfxcard); + } + + /* 761 Errata (23613_F.pdf) + * Revisions B0/B1 were a disaster. + * erratum 44: SYSCLK/AGPCLK skew causes 2X failures -- Force mode to 1X + * erratum 45: Timing problem prevents fast writes -- Disable fast write. + * erratum 46: Setup violation on AGP SBA pins - Disable side band addressing. + * With this lot disabled, we should prevent lockups. */ + if (agp_bridge->dev->device == PCI_DEVICE_ID_AMD_FE_GATE_700E) { + u8 revision=0; + pci_read_config_byte(pdev, PCI_REVISION_ID, &revision); + if (revision == 0x10 || revision == 0x11) { + agp_bridge->flags = AGP_ERRATA_FASTWRITES; + agp_bridge->flags |= AGP_ERRATA_SBA; + agp_bridge->flags |= AGP_ERRATA_1X; + printk (KERN_INFO PFX "AMD 761 chipset with errata detected - disabling AGP fast writes & SBA and forcing to 1X.\n"); + } + } + /* Fill in the mode register */ pci_read_config_dword(pdev, bridge->capndx+PCI_AGP_STATUS, @@ -480,7 +528,7 @@ { if (agp_off) return -EINVAL; - return pci_module_init(&agp_amdk7_pci_driver); + return pci_register_driver(&agp_amdk7_pci_driver); } static void __exit agp_amdk7_cleanup(void) diff -Nru a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c --- a/drivers/char/agp/amd64-agp.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/char/agp/amd64-agp.c 2005-03-07 14:54:17 -08:00 @@ -106,7 +106,8 @@ } for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { - tmp = agp_bridge->driver->mask_memory(mem->memory[i], mem->type); + tmp = agp_bridge->driver->mask_memory(agp_bridge, + mem->memory[i], mem->type); BUG_ON(tmp & 0xffffff0000000ffcULL); pte = (tmp & 0x000000ff00000000ULL) >> 28; @@ -709,7 +710,7 @@ if (agp_off) return -EINVAL; - if (pci_module_init(&agp_amd64_pci_driver) > 0) { + if (pci_register_driver(&agp_amd64_pci_driver) > 0) { struct pci_dev *dev; if (!agp_try_unsupported && !agp_try_unsupported_boot) { printk(KERN_INFO PFX "No supported AGP bridge found.\n"); diff -Nru a/drivers/char/agp/ati-agp.c b/drivers/char/agp/ati-agp.c --- a/drivers/char/agp/ati-agp.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/char/agp/ati-agp.c 2005-03-07 14:54:17 -08:00 @@ -291,7 +291,8 @@ for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { addr = (j * PAGE_SIZE) + agp_bridge->gart_bus_addr; cur_gatt = GET_GATT(addr); - writel(agp_bridge->driver->mask_memory(mem->memory[i], mem->type), cur_gatt+GET_GATT_OFF(addr)); + writel(agp_bridge->driver->mask_memory(agp_bridge, + mem->memory[i], mem->type), cur_gatt+GET_GATT_OFF(addr)); readl(cur_gatt+GET_GATT_OFF(addr)); /* PCI Posting. */ } agp_bridge->driver->tlb_flush(mem); @@ -319,7 +320,7 @@ return 0; } -static int ati_create_gatt_table(void) +static int ati_create_gatt_table(struct agp_bridge_data *bridge) { struct aper_size_info_lvl2 *value; ati_page_map page_dir; @@ -380,7 +381,7 @@ return 0; } -static int ati_free_gatt_table(void) +static int ati_free_gatt_table(struct agp_bridge_data *bridge) { ati_page_map page_dir; @@ -531,7 +532,7 @@ { if (agp_off) return -EINVAL; - return pci_module_init(&agp_ati_pci_driver); + return pci_register_driver(&agp_ati_pci_driver); } static void __exit agp_ati_cleanup(void) diff -Nru a/drivers/char/agp/backend.c b/drivers/char/agp/backend.c --- a/drivers/char/agp/backend.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/char/agp/backend.c 2005-03-07 14:54:17 -08:00 @@ -1,5 +1,6 @@ /* * AGPGART driver backend routines. + * Copyright (C) 2004 Silicon Graphics, Inc. * Copyright (C) 2002-2003 Dave Jones. * Copyright (C) 1999 Jeff Hartmann. * Copyright (C) 1999 Precision Insight, Inc. @@ -18,12 +19,12 @@ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * JEFF HARTMANN, DAVE JONES, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE + * JEFF HARTMANN, DAVE JONES, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * TODO: + * TODO: * - Allocate more than order 0 pages to avoid too much linear map splitting. */ #include @@ -42,34 +43,38 @@ * fix some real stupidity. It's only by chance we can bump * past 0.99 at all due to some boolean logic error. */ #define AGPGART_VERSION_MAJOR 0 -#define AGPGART_VERSION_MINOR 100 +#define AGPGART_VERSION_MINOR 101 static struct agp_version agp_current_version = { .major = AGPGART_VERSION_MAJOR, .minor = AGPGART_VERSION_MINOR, }; -static int agp_count=0; +struct agp_bridge_data *(*agp_find_bridge)(struct pci_dev *) = + &agp_generic_find_bridge; -struct agp_bridge_data agp_bridge_dummy = { .type = NOT_SUPPORTED }; -struct agp_bridge_data *agp_bridge = &agp_bridge_dummy; +struct agp_bridge_data *agp_bridge; +LIST_HEAD(agp_bridges); EXPORT_SYMBOL(agp_bridge); - +EXPORT_SYMBOL(agp_bridges); /** - * agp_backend_acquire - attempt to acquire the agp backend. + * agp_backend_acquire - attempt to acquire an agp backend. * - * returns -EBUSY if agp is in use, - * returns 0 if the caller owns the agp backend */ -int agp_backend_acquire(void) +struct agp_bridge_data *agp_backend_acquire(struct pci_dev *pdev) { - if (agp_bridge->type == NOT_SUPPORTED) - return -EINVAL; - if (atomic_read(&agp_bridge->agp_in_use)) - return -EBUSY; - atomic_inc(&agp_bridge->agp_in_use); - return 0; + struct agp_bridge_data *bridge; + + bridge = agp_find_bridge(pdev); + + if (!bridge) + return NULL; + + if (atomic_read(&bridge->agp_in_use)) + return NULL; + atomic_inc(&bridge->agp_in_use); + return bridge; } EXPORT_SYMBOL(agp_backend_acquire); @@ -82,10 +87,11 @@ * * (Ensure that all memory it bound is unbound.) */ -void agp_backend_release(void) +void agp_backend_release(struct agp_bridge_data *bridge) { - if (agp_bridge->type != NOT_SUPPORTED) - atomic_dec(&agp_bridge->agp_in_use); + + if (bridge) + atomic_dec(&bridge->agp_in_use); } EXPORT_SYMBOL(agp_backend_release); @@ -121,7 +127,6 @@ (maxes_table[index].agp - maxes_table[index - 1].agp)) / (maxes_table[index].mem - maxes_table[index - 1].mem); - printk(KERN_INFO PFX "Maximum main memory to use for agp memory: %ldM\n", result); result = result << (20 - PAGE_SHIFT); return result; } @@ -135,7 +140,7 @@ bridge->version = &agp_current_version; if (bridge->driver->needs_scratch_page) { - void *addr = bridge->driver->agp_alloc_page(); + void *addr = bridge->driver->agp_alloc_page(bridge); if (!addr) { printk(KERN_ERR PFX "unable to get memory for scratch page.\n"); @@ -144,7 +149,7 @@ bridge->scratch_page_real = virt_to_phys(addr); bridge->scratch_page = - bridge->driver->mask_memory(bridge->scratch_page_real, 0); + bridge->driver->mask_memory(bridge, bridge->scratch_page_real, 0); } size_value = bridge->driver->fetch_size(); @@ -153,14 +158,14 @@ rc = -EINVAL; goto err_out; } - if (bridge->driver->create_gatt_table()) { + if (bridge->driver->create_gatt_table(bridge)) { printk(KERN_ERR PFX "unable to get memory for graphics translation table.\n"); rc = -ENOMEM; goto err_out; } got_gatt = 1; - + bridge->key_list = vmalloc(PAGE_SIZE * 4); if (bridge->key_list == NULL) { printk(KERN_ERR PFX "error allocating memory for key lists.\n"); @@ -168,7 +173,7 @@ goto err_out; } got_keylist = 1; - + /* FIXME vmalloc'd memory not guaranteed contiguous */ memset(bridge->key_list, 0, PAGE_SIZE * 4); @@ -178,9 +183,6 @@ goto err_out; } - printk(KERN_INFO PFX "AGP aperture is %dM @ 0x%lx\n", - size_value, bridge->gart_bus_addr); - return 0; err_out: @@ -188,7 +190,7 @@ bridge->driver->agp_destroy_page( phys_to_virt(bridge->scratch_page_real)); if (got_gatt) - bridge->driver->free_gatt_table(); + bridge->driver->free_gatt_table(bridge); if (got_keylist) { vfree(bridge->key_list); bridge->key_list = NULL; @@ -202,7 +204,7 @@ if (bridge->driver->cleanup) bridge->driver->cleanup(); if (bridge->driver->free_gatt_table) - bridge->driver->free_gatt_table(); + bridge->driver->free_gatt_table(bridge); if (bridge->key_list) { vfree(bridge->key_list); bridge->key_list = NULL; @@ -214,16 +216,35 @@ phys_to_virt(bridge->scratch_page_real)); } -/* XXX Kludge alert: agpgart isn't ready for multiple bridges yet */ +/* When we remove the global variable agp_bridge from all drivers + * then agp_alloc_bridge and agp_generic_find_bridge need to be updated + */ + struct agp_bridge_data *agp_alloc_bridge(void) { - return agp_bridge; + struct agp_bridge_data *bridge = kmalloc(sizeof(*bridge), GFP_KERNEL); + + if (!bridge) + return NULL; + + memset(bridge, 0, sizeof(*bridge)); + atomic_set(&bridge->agp_in_use, 0); + atomic_set(&bridge->current_memory_agp, 0); + + if (list_empty(&agp_bridges)) + agp_bridge = bridge; + + return bridge; } EXPORT_SYMBOL(agp_alloc_bridge); void agp_put_bridge(struct agp_bridge_data *bridge) { + kfree(bridge); + + if (list_empty(&agp_bridges)) + agp_bridge = NULL; } EXPORT_SYMBOL(agp_put_bridge); @@ -240,40 +261,38 @@ return -EINVAL; } - if (agp_count) { - printk (KERN_INFO PFX - "Only one agpgart device currently supported.\n"); - return -ENODEV; - } - /* Grab reference on the chipset driver. */ if (!try_module_get(bridge->driver->owner)) { printk (KERN_INFO PFX "Couldn't lock chipset driver.\n"); return -EINVAL; } - bridge->type = SUPPORTED; - - error = agp_backend_initialize(agp_bridge); + error = agp_backend_initialize(bridge); if (error) { printk (KERN_INFO PFX "agp_backend_initialize() failed.\n"); goto err_out; } - error = agp_frontend_initialize(); - if (error) { - printk (KERN_INFO PFX "agp_frontend_initialize() failed.\n"); - goto frontend_err; + if (list_empty(&agp_bridges)) { + error = agp_frontend_initialize(); + if (error) { + printk (KERN_INFO PFX "agp_frontend_initialize() failed.\n"); + goto frontend_err; + } + + printk(KERN_INFO PFX "AGP aperture is %dM @ 0x%lx\n", + bridge->driver->fetch_size(), bridge->gart_bus_addr); + } - agp_count++; + list_add(&bridge->list, &agp_bridges); return 0; frontend_err: - agp_backend_cleanup(agp_bridge); + agp_backend_cleanup(bridge); err_out: - bridge->type = NOT_SUPPORTED; module_put(bridge->driver->owner); + agp_put_bridge(bridge); return error; } EXPORT_SYMBOL_GPL(agp_add_bridge); @@ -281,10 +300,10 @@ void agp_remove_bridge(struct agp_bridge_data *bridge) { - bridge->type = NOT_SUPPORTED; - agp_frontend_cleanup(); agp_backend_cleanup(bridge); - agp_count--; + list_del(&bridge->list); + if (list_empty(&agp_bridges)) + agp_frontend_cleanup(); module_put(bridge->driver->owner); } EXPORT_SYMBOL_GPL(agp_remove_bridge); diff -Nru a/drivers/char/agp/efficeon-agp.c b/drivers/char/agp/efficeon-agp.c --- a/drivers/char/agp/efficeon-agp.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/char/agp/efficeon-agp.c 2005-03-07 14:54:16 -08:00 @@ -148,7 +148,7 @@ return 0; } -static int efficeon_free_gatt_table(void) +static int efficeon_free_gatt_table(struct agp_bridge_data *bridge) { int index, freed = 0; @@ -183,7 +183,7 @@ #define GET_GATT(addr) (efficeon_private.gatt_pages[\ GET_PAGE_DIR_IDX(addr)]->remapped) -static int efficeon_create_gatt_table(void) +static int efficeon_create_gatt_table(struct agp_bridge_data *bridge) { int index; const int pati = EFFICEON_PATI; @@ -209,7 +209,7 @@ page = get_zeroed_page(GFP_KERNEL); if (!page) { - efficeon_free_gatt_table(); + efficeon_free_gatt_table(agp_bridge); return -ENOMEM; } SetPageReserved(virt_to_page((char *)page)); @@ -448,7 +448,7 @@ return 0; agp_initialised=1; - return pci_module_init(&agp_efficeon_pci_driver); + return pci_register_driver(&agp_efficeon_pci_driver); } static void __exit agp_efficeon_cleanup(void) diff -Nru a/drivers/char/agp/frontend.c b/drivers/char/agp/frontend.c --- a/drivers/char/agp/frontend.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/char/agp/frontend.c 2005-03-07 14:54:16 -08:00 @@ -1,5 +1,6 @@ /* * AGPGART driver frontend + * Copyright (C) 2004 Silicon Graphics, Inc. * Copyright (C) 2002-2003 Dave Jones * Copyright (C) 1999 Jeff Hartmann * Copyright (C) 1999 Precision Insight, Inc. @@ -18,9 +19,9 @@ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * JEFF HARTMANN, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE + * JEFF HARTMANN, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ @@ -152,8 +153,8 @@ /* Originally taken from linux/mm/mmap.c from the array * protection_map. - * The original really should be exported to modules, or - * some routine which does the conversion for you + * The original really should be exported to modules, or + * some routine which does the conversion for you */ static const pgprot_t my_protect_map[16] = @@ -285,8 +286,8 @@ /* End - File flag list routines */ -/* - * Wrappers for agp_free_memory & agp_allocate_memory +/* + * Wrappers for agp_free_memory & agp_allocate_memory * These make sure that internal lists are kept updated. */ static void agp_free_memory_wrap(struct agp_memory *memory) @@ -299,7 +300,7 @@ { struct agp_memory *memory; - memory = agp_allocate_memory(pg_count, type); + memory = agp_allocate_memory(agp_bridge, pg_count, type); if (memory == NULL) return NULL; @@ -420,7 +421,7 @@ if (agp_fe.current_controller == controller) { agp_fe.current_controller = NULL; agp_fe.backend_acquired = FALSE; - agp_backend_release(); + agp_backend_release(agp_bridge); } kfree(controller); return 0; @@ -468,10 +469,10 @@ agp_fe.current_controller = NULL; agp_fe.used_by_controller = FALSE; - agp_backend_release(); + agp_backend_release(agp_bridge); } -/* +/* * Routines for managing client lists - * These routines are for managing the list of auth'ed clients. */ @@ -605,7 +606,7 @@ if (!(test_bit(AGP_FF_IS_VALID, &priv->access_flags))) goto out_eperm; - agp_copy_info(&kerninfo); + agp_copy_info(agp_bridge, &kerninfo); size = vma->vm_end - vma->vm_start; current_size = kerninfo.aper_size; current_size = current_size * 0x100000; @@ -757,7 +758,7 @@ struct agp_info userinfo; struct agp_kern_info kerninfo; - agp_copy_info(&kerninfo); + agp_copy_info(agp_bridge, &kerninfo); userinfo.version.major = kerninfo.version.major; userinfo.version.minor = kerninfo.version.minor; @@ -777,7 +778,6 @@ static int agpioc_acquire_wrap(struct agp_file_private *priv) { - int ret; struct agp_controller *controller; DBG(""); @@ -788,11 +788,15 @@ if (agp_fe.current_controller != NULL) return -EBUSY; - ret = agp_backend_acquire(); - if (ret == 0) - agp_fe.backend_acquired = TRUE; - else - return ret; + if(!agp_bridge) + return -ENODEV; + + if (atomic_read(&agp_bridge->agp_in_use)) + return -EBUSY; + + atomic_inc(&agp_bridge->agp_in_use); + + agp_fe.backend_acquired = TRUE; controller = agp_find_controller_by_pid(priv->my_pid); @@ -803,7 +807,7 @@ if (controller == NULL) { agp_fe.backend_acquired = FALSE; - agp_backend_release(); + agp_backend_release(agp_bridge); return -ENOMEM; } agp_insert_controller(controller); @@ -830,7 +834,7 @@ if (copy_from_user(&mode, arg, sizeof(struct agp_setup))) return -EFAULT; - agp_enable(mode.agp_mode); + agp_enable(agp_bridge, mode.agp_mode); return 0; } @@ -993,24 +997,24 @@ if ((agp_fe.current_controller == NULL) && (cmd != AGPIOC_ACQUIRE)) { ret_val = -EINVAL; - goto ioctl_out; + goto ioctl_out; } if ((agp_fe.backend_acquired != TRUE) && (cmd != AGPIOC_ACQUIRE)) { ret_val = -EBUSY; - goto ioctl_out; + goto ioctl_out; } if (cmd != AGPIOC_ACQUIRE) { if (!(test_bit(AGP_FF_IS_CONTROLLER, &curr_priv->access_flags))) { ret_val = -EPERM; - goto ioctl_out; + goto ioctl_out; } /* Use the original pid of the controller, * in case it's threaded */ if (agp_fe.current_controller->pid != curr_priv->my_pid) { ret_val = -EBUSY; - goto ioctl_out; + goto ioctl_out; } } @@ -1022,35 +1026,35 @@ case AGPIOC_ACQUIRE: ret_val = agpioc_acquire_wrap(curr_priv); break; - + case AGPIOC_RELEASE: ret_val = agpioc_release_wrap(curr_priv); break; - + case AGPIOC_SETUP: ret_val = agpioc_setup_wrap(curr_priv, (void __user *) arg); break; - + case AGPIOC_RESERVE: ret_val = agpioc_reserve_wrap(curr_priv, (void __user *) arg); break; - + case AGPIOC_PROTECT: ret_val = agpioc_protect_wrap(curr_priv); break; - + case AGPIOC_ALLOCATE: ret_val = agpioc_allocate_wrap(curr_priv, (void __user *) arg); break; - + case AGPIOC_DEALLOCATE: ret_val = agpioc_deallocate_wrap(curr_priv, (int) arg); break; - + case AGPIOC_BIND: ret_val = agpioc_bind_wrap(curr_priv, (void __user *) arg); break; - + case AGPIOC_UNBIND: ret_val = agpioc_unbind_wrap(curr_priv, (void __user *) arg); break; diff -Nru a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c --- a/drivers/char/agp/generic.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/char/agp/generic.c 2005-03-07 14:54:16 -08:00 @@ -1,6 +1,7 @@ /* * AGPGART driver. - * Copyright (C) 2002-2004 Dave Jones. + * Copyright (C) 2004 Silicon Graphics, Inc. + * Copyright (C) 2002-2005 Dave Jones. * Copyright (C) 1999 Jeff Hartmann. * Copyright (C) 1999 Precision Insight, Inc. * Copyright (C) 1999 Xi Graphics, Inc. @@ -139,19 +140,19 @@ { size_t i; - if ((agp_bridge->type == NOT_SUPPORTED) || (curr == NULL)) + if (curr == NULL) return; if (curr->is_bound == TRUE) agp_unbind_memory(curr); if (curr->type != 0) { - agp_bridge->driver->free_by_type(curr); + curr->bridge->driver->free_by_type(curr); return; } if (curr->page_count != 0) { for (i = 0; i < curr->page_count; i++) { - agp_bridge->driver->agp_destroy_page(phys_to_virt(curr->memory[i])); + curr->bridge->driver->agp_destroy_page(phys_to_virt(curr->memory[i])); } } agp_free_key(curr->key); @@ -173,20 +174,23 @@ * * It returns NULL whenever memory is unavailable. */ -struct agp_memory *agp_allocate_memory(size_t page_count, u32 type) +struct agp_memory *agp_allocate_memory(struct agp_bridge_data *bridge, + size_t page_count, u32 type) { int scratch_pages; struct agp_memory *new; size_t i; - if (agp_bridge->type == NOT_SUPPORTED) + if (!bridge) return NULL; - if ((atomic_read(&agp_bridge->current_memory_agp) + page_count) > agp_bridge->max_memory_agp) + if ((atomic_read(&bridge->current_memory_agp) + page_count) > bridge->max_memory_agp) return NULL; if (type != 0) { - new = agp_bridge->driver->alloc_by_type(page_count, type); + new = bridge->driver->alloc_by_type(page_count, type); + if (new) + new->bridge = bridge; return new; } @@ -198,7 +202,7 @@ return NULL; for (i = 0; i < page_count; i++) { - void *addr = agp_bridge->driver->agp_alloc_page(); + void *addr = bridge->driver->agp_alloc_page(bridge); if (addr == NULL) { agp_free_memory(new); @@ -207,6 +211,7 @@ new->memory[i] = virt_to_phys(addr); new->page_count++; } + new->bridge = bridge; flush_agp_mappings(); @@ -289,6 +294,19 @@ EXPORT_SYMBOL_GPL(agp_num_entries); +static int check_bridge_mode(struct pci_dev *dev) +{ + u32 agp3; + u8 cap_ptr; + + cap_ptr = pci_find_capability(dev, PCI_CAP_ID_AGP); + pci_read_config_dword(dev, cap_ptr+AGPSTAT, &agp3); + if (agp3 & AGPSTAT_MODE_3_0) + return 1; + return 0; +} + + /** * agp_copy_info - copy bridge state information * @@ -297,35 +315,36 @@ * This function copies information about the agp bridge device and the state of * the agp backend into an agp_kern_info pointer. */ -int agp_copy_info(struct agp_kern_info *info) +int agp_copy_info(struct agp_bridge_data *bridge, struct agp_kern_info *info) { memset(info, 0, sizeof(struct agp_kern_info)); - if (!agp_bridge || agp_bridge->type == NOT_SUPPORTED || - !agp_bridge->version) { + if (!bridge) { info->chipset = NOT_SUPPORTED; return -EIO; } - info->version.major = agp_bridge->version->major; - info->version.minor = agp_bridge->version->minor; - info->chipset = agp_bridge->type; - info->device = agp_bridge->dev; - info->mode = agp_bridge->mode; - info->aper_base = agp_bridge->gart_bus_addr; + info->version.major = bridge->version->major; + info->version.minor = bridge->version->minor; + info->chipset = SUPPORTED; + info->device = bridge->dev; + if (check_bridge_mode(bridge->dev)) + info->mode = bridge->mode & ~AGP3_RESERVED_MASK; + else + info->mode = bridge->mode & ~AGP2_RESERVED_MASK; + info->mode = bridge->mode; + info->aper_base = bridge->gart_bus_addr; info->aper_size = agp_return_size(); - info->max_memory = agp_bridge->max_memory_agp; - info->current_memory = atomic_read(&agp_bridge->current_memory_agp); - info->cant_use_aperture = agp_bridge->driver->cant_use_aperture; - info->vm_ops = agp_bridge->vm_ops; + info->max_memory = bridge->max_memory_agp; + info->current_memory = atomic_read(&bridge->current_memory_agp); + info->cant_use_aperture = bridge->driver->cant_use_aperture; + info->vm_ops = bridge->vm_ops; info->page_mask = ~0UL; return 0; } EXPORT_SYMBOL(agp_copy_info); - /* End - Routine to copy over information structure */ - /* * Routines for handling swapping of agp_memory into the GATT - * These routines take agp_memory and insert them into the GATT. @@ -345,7 +364,7 @@ { int ret_val; - if ((agp_bridge->type == NOT_SUPPORTED) || (curr == NULL)) + if (curr == NULL) return -EINVAL; if (curr->is_bound == TRUE) { @@ -353,10 +372,10 @@ return -EINVAL; } if (curr->is_flushed == FALSE) { - agp_bridge->driver->cache_flush(); + curr->bridge->driver->cache_flush(); curr->is_flushed = TRUE; } - ret_val = agp_bridge->driver->insert_memory(curr, pg_start, curr->type); + ret_val = curr->bridge->driver->insert_memory(curr, pg_start, curr->type); if (ret_val != 0) return ret_val; @@ -380,7 +399,7 @@ { int ret_val; - if ((agp_bridge->type == NOT_SUPPORTED) || (curr == NULL)) + if (curr == NULL) return -EINVAL; if (curr->is_bound != TRUE) { @@ -388,7 +407,7 @@ return -EINVAL; } - ret_val = agp_bridge->driver->remove_memory(curr, curr->pg_start, curr->type); + ret_val = curr->bridge->driver->remove_memory(curr, curr->pg_start, curr->type); if (ret_val != 0) return ret_val; @@ -403,71 +422,137 @@ /* Generic Agp routines - Start */ -static void agp_v2_parse_one(u32 *mode, u32 *cmd, u32 *tmp) +static void agp_v2_parse_one(u32 *requested_mode, u32 *bridge_agpstat, u32 *vga_agpstat) { + u32 tmp; + + if (*requested_mode & AGP2_RESERVED_MASK) { + printk (KERN_INFO PFX "reserved bits set in mode 0x%x. Fixed.\n", *requested_mode); + *requested_mode &= ~AGP2_RESERVED_MASK; + } + + /* Check the speed bits make sense. Only one should be set. */ + tmp = *requested_mode & 7; + switch (tmp) { + case 0: + printk (KERN_INFO PFX "%s tried to set rate=x0. Setting to x1 mode.\n", current->comm); + *requested_mode |= AGPSTAT2_1X; + break; + case 1: + case 2: + break; + case 3: + *requested_mode &= ~(AGPSTAT2_1X); /* rate=2 */ + break; + case 4: + break; + case 5: + case 6: + case 7: + *requested_mode &= ~(AGPSTAT2_1X|AGPSTAT2_2X); /* rate=4*/ + break; + } + /* disable SBA if it's not supported */ - if (!((*cmd & AGPSTAT_SBA) && (*tmp & AGPSTAT_SBA) && (*mode & AGPSTAT_SBA))) - *cmd &= ~AGPSTAT_SBA; + if (!((*bridge_agpstat & AGPSTAT_SBA) && (*vga_agpstat & AGPSTAT_SBA) && (*requested_mode & AGPSTAT_SBA))) + *bridge_agpstat &= ~AGPSTAT_SBA; - /* Set speed */ - if (!((*cmd & AGPSTAT2_4X) && (*tmp & AGPSTAT2_4X) && (*mode & AGPSTAT2_4X))) - *cmd &= ~AGPSTAT2_4X; + /* Set rate */ + if (!((*bridge_agpstat & AGPSTAT2_4X) && (*vga_agpstat & AGPSTAT2_4X) && (*requested_mode & AGPSTAT2_4X))) + *bridge_agpstat &= ~AGPSTAT2_4X; - if (!((*cmd & AGPSTAT2_2X) && (*tmp & AGPSTAT2_2X) && (*mode & AGPSTAT2_2X))) - *cmd &= ~AGPSTAT2_2X; + if (!((*bridge_agpstat & AGPSTAT2_2X) && (*vga_agpstat & AGPSTAT2_2X) && (*requested_mode & AGPSTAT2_2X))) + *bridge_agpstat &= ~AGPSTAT2_2X; - if (!((*cmd & AGPSTAT2_1X) && (*tmp & AGPSTAT2_1X) && (*mode & AGPSTAT2_1X))) - *cmd &= ~AGPSTAT2_1X; + if (!((*bridge_agpstat & AGPSTAT2_1X) && (*vga_agpstat & AGPSTAT2_1X) && (*requested_mode & AGPSTAT2_1X))) + *bridge_agpstat &= ~AGPSTAT2_1X; /* Now we know what mode it should be, clear out the unwanted bits. */ - if (*cmd & AGPSTAT2_4X) - *cmd &= ~(AGPSTAT2_1X | AGPSTAT2_2X); /* 4X */ + if (*bridge_agpstat & AGPSTAT2_4X) + *bridge_agpstat &= ~(AGPSTAT2_1X | AGPSTAT2_2X); /* 4X */ + + if (*bridge_agpstat & AGPSTAT2_2X) + *bridge_agpstat &= ~(AGPSTAT2_1X | AGPSTAT2_4X); /* 2X */ + + if (*bridge_agpstat & AGPSTAT2_1X) + *bridge_agpstat &= ~(AGPSTAT2_2X | AGPSTAT2_4X); /* 1X */ + + /* Apply any errata. */ + if (agp_bridge->flags & AGP_ERRATA_FASTWRITES) + *bridge_agpstat &= ~AGPSTAT_FW; - if (*cmd & AGPSTAT2_2X) - *cmd &= ~(AGPSTAT2_1X | AGPSTAT2_4X); /* 2X */ + if (agp_bridge->flags & AGP_ERRATA_SBA) + *bridge_agpstat &= ~AGPSTAT_SBA; - if (*cmd & AGPSTAT2_1X) - *cmd &= ~(AGPSTAT2_2X | AGPSTAT2_4X); /* 1X */ + if (agp_bridge->flags & AGP_ERRATA_1X) { + *bridge_agpstat &= ~(AGPSTAT2_2X | AGPSTAT2_4X); + *bridge_agpstat |= AGPSTAT2_1X; + } + + /* If we've dropped down to 1X, disable fast writes. */ + if (*bridge_agpstat & AGPSTAT2_1X) + *bridge_agpstat &= ~AGPSTAT_FW; } /* - * mode = requested mode. - * cmd = PCI_AGP_STATUS from agp bridge. - * tmp = PCI_AGP_STATUS from graphic card. + * requested_mode = Mode requested by (typically) X. + * bridge_agpstat = PCI_AGP_STATUS from agp bridge. + * vga_agpstat = PCI_AGP_STATUS from graphic card. */ -static void agp_v3_parse_one(u32 *mode, u32 *cmd, u32 *tmp) +static void agp_v3_parse_one(u32 *requested_mode, u32 *bridge_agpstat, u32 *vga_agpstat) { - u32 origcmd=*cmd, origtmp=*tmp; + u32 origbridge=*bridge_agpstat, origvga=*vga_agpstat; + u32 tmp; + + if (*requested_mode & AGP3_RESERVED_MASK) { + printk (KERN_INFO PFX "reserved bits set in mode 0x%x. Fixed.\n", *requested_mode); + *requested_mode &= ~AGP3_RESERVED_MASK; + } + + /* Check the speed bits make sense. */ + tmp = *requested_mode & 7; + if (tmp == 0) { + printk (KERN_INFO PFX "%s tried to set rate=x0. Setting to AGP3 x4 mode.\n", current->comm); + *requested_mode |= AGPSTAT3_4X; + } + if (tmp == 3) { + printk (KERN_INFO PFX "%s tried to set rate=x3. Setting to AGP3 x4 mode.\n", current->comm); + *requested_mode |= AGPSTAT3_4X; + } + if (tmp >3) { + printk (KERN_INFO PFX "%s tried to set rate=x%d. Setting to AGP3 x8 mode.\n", current->comm, tmp); + *requested_mode |= AGPSTAT3_8X; + } /* ARQSZ - Set the value to the maximum one. * Don't allow the mode register to override values. */ - *cmd = ((*cmd & ~AGPSTAT_ARQSZ) | - max_t(u32,(*cmd & AGPSTAT_ARQSZ),(*tmp & AGPSTAT_ARQSZ))); + *bridge_agpstat = ((*bridge_agpstat & ~AGPSTAT_ARQSZ) | + max_t(u32,(*bridge_agpstat & AGPSTAT_ARQSZ),(*vga_agpstat & AGPSTAT_ARQSZ))); /* Calibration cycle. * Don't allow the mode register to override values. */ - *cmd = ((*cmd & ~AGPSTAT_CAL_MASK) | - min_t(u32,(*cmd & AGPSTAT_CAL_MASK),(*tmp & AGPSTAT_CAL_MASK))); + *bridge_agpstat = ((*bridge_agpstat & ~AGPSTAT_CAL_MASK) | + min_t(u32,(*bridge_agpstat & AGPSTAT_CAL_MASK),(*vga_agpstat & AGPSTAT_CAL_MASK))); /* SBA *must* be supported for AGP v3 */ - *cmd |= AGPSTAT_SBA; + *bridge_agpstat |= AGPSTAT_SBA; /* * Set speed. * Check for invalid speeds. This can happen when applications * written before the AGP 3.0 standard pass AGP2.x modes to AGP3 hardware */ - if (*mode & AGPSTAT_MODE_3_0) { + if (*requested_mode & AGPSTAT_MODE_3_0) { /* - * Caller hasn't a clue what its doing. We are in 3.0 mode, + * Caller hasn't a clue what it is doing. Bridge is in 3.0 mode, * have been passed a 3.0 mode, but with 2.x speed bits set. * AGP2.x 4x -> AGP3.0 4x. */ - if (*mode & AGPSTAT2_4X) { + if (*requested_mode & AGPSTAT2_4X) { printk (KERN_INFO PFX "%s passes broken AGP3 flags (%x). Fixed.\n", - current->comm, *mode); - *mode &= ~AGPSTAT2_4X; - *mode |= AGPSTAT3_4X; + current->comm, *requested_mode); + *requested_mode &= ~AGPSTAT2_4X; + *requested_mode |= AGPSTAT3_4X; } } else { /* @@ -476,27 +561,27 @@ * Convert AGP 1x,2x,4x -> AGP 3.0 4x. */ printk (KERN_INFO PFX "%s passes broken AGP2 flags (%x) in AGP3 mode. Fixed.\n", - current->comm, *mode); - *mode &= ~(AGPSTAT2_4X | AGPSTAT2_2X | AGPSTAT2_1X); - *mode |= AGPSTAT3_4X; + current->comm, *requested_mode); + *requested_mode &= ~(AGPSTAT2_4X | AGPSTAT2_2X | AGPSTAT2_1X); + *requested_mode |= AGPSTAT3_4X; } - if (*mode & AGPSTAT3_8X) { - if (!(*cmd & AGPSTAT3_8X)) { - *cmd &= ~(AGPSTAT3_8X | AGPSTAT3_RSVD); - *cmd |= AGPSTAT3_4X; + if (*requested_mode & AGPSTAT3_8X) { + if (!(*bridge_agpstat & AGPSTAT3_8X)) { + *bridge_agpstat &= ~(AGPSTAT3_8X | AGPSTAT3_RSVD); + *bridge_agpstat |= AGPSTAT3_4X; printk ("%s requested AGPx8 but bridge not capable.\n", current->comm); return; } - if (!(*tmp & AGPSTAT3_8X)) { - *cmd &= ~(AGPSTAT3_8X | AGPSTAT3_RSVD); - *cmd |= AGPSTAT3_4X; + if (!(*vga_agpstat & AGPSTAT3_8X)) { + *bridge_agpstat &= ~(AGPSTAT3_8X | AGPSTAT3_RSVD); + *bridge_agpstat |= AGPSTAT3_4X; printk ("%s requested AGPx8 but graphic card not capable.\n", current->comm); return; } /* All set, bridge & device can do AGP x8*/ - *cmd &= ~(AGPSTAT3_4X | AGPSTAT3_RSVD); - return; + *bridge_agpstat &= ~(AGPSTAT3_4X | AGPSTAT3_RSVD); + goto done; } else { @@ -505,71 +590,105 @@ * If the hardware can't do x4, we're up shit creek, and never * should have got this far. */ - *cmd &= ~(AGPSTAT3_8X | AGPSTAT3_RSVD); - if ((*cmd & AGPSTAT3_4X) && (*tmp & AGPSTAT3_4X)) - *cmd |= AGPSTAT3_4X; + *bridge_agpstat &= ~(AGPSTAT3_8X | AGPSTAT3_RSVD); + if ((*bridge_agpstat & AGPSTAT3_4X) && (*vga_agpstat & AGPSTAT3_4X)) + *bridge_agpstat |= AGPSTAT3_4X; else { printk (KERN_INFO PFX "Badness. Don't know which AGP mode to set. " - "[cmd:%x tmp:%x fell back to:- cmd:%x tmp:%x]\n", - origcmd, origtmp, *cmd, *tmp); - if (!(*cmd & AGPSTAT3_4X)) + "[bridge_agpstat:%x vga_agpstat:%x fell back to:- bridge_agpstat:%x vga_agpstat:%x]\n", + origbridge, origvga, *bridge_agpstat, *vga_agpstat); + if (!(*bridge_agpstat & AGPSTAT3_4X)) printk (KERN_INFO PFX "Bridge couldn't do AGP x4.\n"); - if (!(*tmp & AGPSTAT3_4X)) + if (!(*vga_agpstat & AGPSTAT3_4X)) printk (KERN_INFO PFX "Graphic card couldn't do AGP x4.\n"); + return; } } + +done: + /* Apply any errata. */ + if (agp_bridge->flags & AGP_ERRATA_FASTWRITES) + *bridge_agpstat &= ~AGPSTAT_FW; + + if (agp_bridge->flags & AGP_ERRATA_SBA) + *bridge_agpstat &= ~AGPSTAT_SBA; + + if (agp_bridge->flags & AGP_ERRATA_1X) { + *bridge_agpstat &= ~(AGPSTAT2_2X | AGPSTAT2_4X); + *bridge_agpstat |= AGPSTAT2_1X; + } } -//FIXME: This doesn't smell right. -//We need a function we pass an agp_device to. -u32 agp_collect_device_status(u32 mode, u32 cmd) + +/** + * agp_collect_device_status - determine correct agp_cmd from various agp_stat's + * @bridge: an agp_bridge_data struct allocated for the AGP host bridge. + * @requested_mode: requested agp_stat from userspace (Typically from X) + * @bridge_agpstat: current agp_stat from AGP bridge. + * + * This function will hunt for an AGP graphics card, and try to match + * the requested mode to the capabilities of both the bridge and the card. + */ +u32 agp_collect_device_status(struct agp_bridge_data *bridge, u32 requested_mode, u32 bridge_agpstat) { struct pci_dev *device = NULL; - u8 cap_ptr; - u32 tmp; - u32 agp3; + u8 cap_ptr = 0; + u32 vga_agpstat; - for_each_pci_dev(device) { + while (!cap_ptr) { + device = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, device); + if (!device) { + printk (KERN_INFO PFX "Couldn't find an AGP VGA controller.\n"); + return 0; + } cap_ptr = pci_find_capability(device, PCI_CAP_ID_AGP); - if (!cap_ptr) + if (!cap_ptr) { + pci_dev_put(device); + continue; + } + if ((device->bus->self->vendor != bridge->dev->vendor) && + (device->bus->self->device != bridge->dev->device)) { + pci_dev_put(device); + cap_ptr = 0; continue; - - //FIXME: We should probably skip anything here that - // isn't an AGP graphic card. - /* - * Ok, here we have a AGP device. Disable impossible - * settings, and adjust the readqueue to the minimum. - */ - pci_read_config_dword(device, cap_ptr+PCI_AGP_STATUS, &tmp); - - /* adjust RQ depth */ - cmd = ((cmd & ~AGPSTAT_RQ_DEPTH) | - min_t(u32, (mode & AGPSTAT_RQ_DEPTH), - min_t(u32, (cmd & AGPSTAT_RQ_DEPTH), (tmp & AGPSTAT_RQ_DEPTH)))); - - /* disable FW if it's not supported */ - if (!((cmd & AGPSTAT_FW) && (tmp & AGPSTAT_FW) && (mode & AGPSTAT_FW))) - cmd &= ~AGPSTAT_FW; - - /* Check to see if we are operating in 3.0 mode */ - pci_read_config_dword(device, cap_ptr+AGPSTAT, &agp3); - if (agp3 & AGPSTAT_MODE_3_0) { - agp_v3_parse_one(&mode, &cmd, &tmp); - } else { - agp_v2_parse_one(&mode, &cmd, &tmp); } } - return cmd; + + /* + * Ok, here we have a AGP device. Disable impossible + * settings, and adjust the readqueue to the minimum. + */ + pci_read_config_dword(device, cap_ptr+PCI_AGP_STATUS, &vga_agpstat); + + /* adjust RQ depth */ + bridge_agpstat = ((bridge_agpstat & ~AGPSTAT_RQ_DEPTH) | + min_t(u32, (requested_mode & AGPSTAT_RQ_DEPTH), + min_t(u32, (bridge_agpstat & AGPSTAT_RQ_DEPTH), (vga_agpstat & AGPSTAT_RQ_DEPTH)))); + + /* disable FW if it's not supported */ + if (!((bridge_agpstat & AGPSTAT_FW) && + (vga_agpstat & AGPSTAT_FW) && + (requested_mode & AGPSTAT_FW))) + bridge_agpstat &= ~AGPSTAT_FW; + + /* Check to see if we are operating in 3.0 mode */ + if (check_bridge_mode(agp_bridge->dev)) + agp_v3_parse_one(&requested_mode, &bridge_agpstat, &vga_agpstat); + else + agp_v2_parse_one(&requested_mode, &bridge_agpstat, &vga_agpstat); + + pci_dev_put(device); + return bridge_agpstat; } EXPORT_SYMBOL(agp_collect_device_status); -void agp_device_command(u32 command, int agp_v3) +void agp_device_command(u32 bridge_agpstat, int agp_v3) { struct pci_dev *device = NULL; int mode; - mode = command & 0x7; + mode = bridge_agpstat & 0x7; if (agp_v3) mode *= 4; @@ -580,7 +699,7 @@ printk(KERN_INFO PFX "Putting AGP V%d device at %s into %dx mode\n", agp_v3 ? 3 : 2, pci_name(device), mode); - pci_write_config_dword(device, agp + PCI_AGP_COMMAND, command); + pci_write_config_dword(device, agp + PCI_AGP_COMMAND, bridge_agpstat); } } EXPORT_SYMBOL(agp_device_command); @@ -591,52 +710,53 @@ u32 ncapid; /* Exit early if already set by errata workarounds. */ - if (agp_bridge->major_version != 0) + if (bridge->major_version != 0) return; - pci_read_config_dword(agp_bridge->dev, agp_bridge->capndx, &ncapid); - agp_bridge->major_version = (ncapid >> AGP_MAJOR_VERSION_SHIFT) & 0xf; - agp_bridge->minor_version = (ncapid >> AGP_MINOR_VERSION_SHIFT) & 0xf; + pci_read_config_dword(bridge->dev, bridge->capndx, &ncapid); + bridge->major_version = (ncapid >> AGP_MAJOR_VERSION_SHIFT) & 0xf; + bridge->minor_version = (ncapid >> AGP_MINOR_VERSION_SHIFT) & 0xf; } EXPORT_SYMBOL(get_agp_version); -void agp_generic_enable(u32 mode) +void agp_generic_enable(struct agp_bridge_data *bridge, u32 requested_mode) { - u32 command, temp; - u32 agp3; + u32 bridge_agpstat, temp; get_agp_version(agp_bridge); printk(KERN_INFO PFX "Found an AGP %d.%d compliant device at %s.\n", agp_bridge->major_version, agp_bridge->minor_version, - agp_bridge->dev->slot_name); + pci_name(agp_bridge->dev)); pci_read_config_dword(agp_bridge->dev, - agp_bridge->capndx + PCI_AGP_STATUS, &command); + agp_bridge->capndx + PCI_AGP_STATUS, &bridge_agpstat); + + bridge_agpstat = agp_collect_device_status(agp_bridge, requested_mode, bridge_agpstat); + if (bridge_agpstat == 0) + /* Something bad happened. FIXME: Return error code? */ + return; - command = agp_collect_device_status(mode, command); - command |= AGPSTAT_AGP_ENABLE; + bridge_agpstat |= AGPSTAT_AGP_ENABLE; /* Do AGP version specific frobbing. */ - if(agp_bridge->major_version >= 3) { - pci_read_config_dword(agp_bridge->dev, - agp_bridge->capndx+AGPSTAT, &agp3); - - /* Check to see if we are operating in 3.0 mode */ - if (agp3 & AGPSTAT_MODE_3_0) { + if (bridge->major_version >= 3) { + if (check_bridge_mode(bridge->dev)) { /* If we have 3.5, we can do the isoch stuff. */ - if (agp_bridge->minor_version >= 5) - agp_3_5_enable(agp_bridge); - agp_device_command(command, TRUE); + if (bridge->minor_version >= 5) + agp_3_5_enable(bridge); + agp_device_command(bridge_agpstat, TRUE); return; } else { /* Disable calibration cycle in RX91<1> when not in AGP3.0 mode of operation.*/ - command &= ~(7<<10) ; - pci_read_config_dword(agp_bridge->dev, agp_bridge->capndx+AGPCTRL, &temp); + bridge_agpstat &= ~(7<<10) ; + pci_read_config_dword(bridge->dev, + bridge->capndx+AGPCTRL, &temp); temp |= (1<<9); - pci_write_config_dword(agp_bridge->dev, agp_bridge->capndx+AGPCTRL, temp); + pci_write_config_dword(bridge->dev, + bridge->capndx+AGPCTRL, temp); printk (KERN_INFO PFX "Device is in legacy mode," " falling back to 2.x\n"); @@ -644,12 +764,12 @@ } /* AGP v<3 */ - agp_device_command(command, FALSE); + agp_device_command(bridge_agpstat, FALSE); } EXPORT_SYMBOL(agp_generic_enable); -int agp_generic_create_gatt_table(void) +int agp_generic_create_gatt_table(struct agp_bridge_data *bridge) { char *table; char *table_end; @@ -661,17 +781,17 @@ struct page *page; /* The generic routines can't handle 2 level gatt's */ - if (agp_bridge->driver->size_type == LVL2_APER_SIZE) + if (bridge->driver->size_type == LVL2_APER_SIZE) return -EINVAL; table = NULL; - i = agp_bridge->aperture_size_idx; - temp = agp_bridge->current_size; + i = bridge->aperture_size_idx; + temp = bridge->current_size; size = page_order = num_entries = 0; - if (agp_bridge->driver->size_type != FIXED_APER_SIZE) { + if (bridge->driver->size_type != FIXED_APER_SIZE) { do { - switch (agp_bridge->driver->size_type) { + switch (bridge->driver->size_type) { case U8_APER_SIZE: size = A_SIZE_8(temp)->size; page_order = @@ -702,29 +822,29 @@ if (table == NULL) { i++; - switch (agp_bridge->driver->size_type) { + switch (bridge->driver->size_type) { case U8_APER_SIZE: - agp_bridge->current_size = A_IDX8(agp_bridge); + bridge->current_size = A_IDX8(bridge); break; case U16_APER_SIZE: - agp_bridge->current_size = A_IDX16(agp_bridge); + bridge->current_size = A_IDX16(bridge); break; case U32_APER_SIZE: - agp_bridge->current_size = A_IDX32(agp_bridge); + bridge->current_size = A_IDX32(bridge); break; /* This case will never really happen. */ case FIXED_APER_SIZE: case LVL2_APER_SIZE: default: - agp_bridge->current_size = - agp_bridge->current_size; + bridge->current_size = + bridge->current_size; break; } - temp = agp_bridge->current_size; + temp = bridge->current_size; } else { - agp_bridge->aperture_size_idx = i; + bridge->aperture_size_idx = i; } - } while (!table && (i < agp_bridge->driver->num_aperture_sizes)); + } while (!table && (i < bridge->driver->num_aperture_sizes)); } else { size = ((struct aper_size_info_fixed *) temp)->size; page_order = ((struct aper_size_info_fixed *) temp)->page_order; @@ -740,15 +860,15 @@ for (page = virt_to_page(table); page <= virt_to_page(table_end); page++) SetPageReserved(page); - agp_bridge->gatt_table_real = (u32 *) table; + bridge->gatt_table_real = (u32 *) table; agp_gatt_table = (void *)table; - agp_bridge->driver->cache_flush(); - agp_bridge->gatt_table = ioremap_nocache(virt_to_phys(table), + bridge->driver->cache_flush(); + bridge->gatt_table = ioremap_nocache(virt_to_phys(table), (PAGE_SIZE * (1 << page_order))); - agp_bridge->driver->cache_flush(); + bridge->driver->cache_flush(); - if (agp_bridge->gatt_table == NULL) { + if (bridge->gatt_table == NULL) { for (page = virt_to_page(table); page <= virt_to_page(table_end); page++) ClearPageReserved(page); @@ -756,28 +876,28 @@ return -ENOMEM; } - agp_bridge->gatt_bus_addr = virt_to_phys(agp_bridge->gatt_table_real); + bridge->gatt_bus_addr = virt_to_phys(bridge->gatt_table_real); /* AK: bogus, should encode addresses > 4GB */ for (i = 0; i < num_entries; i++) { - writel(agp_bridge->scratch_page, agp_bridge->gatt_table+i); - readl(agp_bridge->gatt_table+i); /* PCI Posting. */ + writel(bridge->scratch_page, bridge->gatt_table+i); + readl(bridge->gatt_table+i); /* PCI Posting. */ } return 0; } EXPORT_SYMBOL(agp_generic_create_gatt_table); -int agp_generic_free_gatt_table(void) +int agp_generic_free_gatt_table(struct agp_bridge_data *bridge) { int page_order; char *table, *table_end; void *temp; struct page *page; - temp = agp_bridge->current_size; + temp = bridge->current_size; - switch (agp_bridge->driver->size_type) { + switch (bridge->driver->size_type) { case U8_APER_SIZE: page_order = A_SIZE_8(temp)->page_order; break; @@ -803,19 +923,19 @@ * called, then all agp memory is deallocated and removed * from the table. */ - iounmap(agp_bridge->gatt_table); - table = (char *) agp_bridge->gatt_table_real; + iounmap(bridge->gatt_table); + table = (char *) bridge->gatt_table_real; table_end = table + ((PAGE_SIZE * (1 << page_order)) - 1); for (page = virt_to_page(table); page <= virt_to_page(table_end); page++) ClearPageReserved(page); - free_pages((unsigned long) agp_bridge->gatt_table_real, page_order); + free_pages((unsigned long) bridge->gatt_table_real, page_order); agp_gatt_table = NULL; - agp_bridge->gatt_table = NULL; - agp_bridge->gatt_table_real = NULL; - agp_bridge->gatt_bus_addr = 0; + bridge->gatt_table = NULL; + bridge->gatt_table_real = NULL; + bridge->gatt_bus_addr = 0; return 0; } @@ -828,10 +948,15 @@ size_t i; off_t j; void *temp; + struct agp_bridge_data *bridge; - temp = agp_bridge->current_size; + bridge = mem->bridge; + if (!bridge) + return -EINVAL; - switch (agp_bridge->driver->size_type) { + temp = bridge->current_size; + + switch (bridge->driver->size_type) { case U8_APER_SIZE: num_entries = A_SIZE_8(temp)->num_entries; break; @@ -868,22 +993,22 @@ j = pg_start; while (j < (pg_start + mem->page_count)) { - if (!PGE_EMPTY(agp_bridge, readl(agp_bridge->gatt_table+j))) + if (!PGE_EMPTY(bridge, readl(bridge->gatt_table+j))) return -EBUSY; j++; } if (mem->is_flushed == FALSE) { - agp_bridge->driver->cache_flush(); + bridge->driver->cache_flush(); mem->is_flushed = TRUE; } for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { - writel(agp_bridge->driver->mask_memory(mem->memory[i], mem->type), agp_bridge->gatt_table+j); - readl(agp_bridge->gatt_table+j); /* PCI Posting. */ + writel(bridge->driver->mask_memory(bridge, mem->memory[i], mem->type), bridge->gatt_table+j); + readl(bridge->gatt_table+j); /* PCI Posting. */ } - agp_bridge->driver->tlb_flush(mem); + bridge->driver->tlb_flush(mem); return 0; } EXPORT_SYMBOL(agp_generic_insert_memory); @@ -892,6 +1017,11 @@ int agp_generic_remove_memory(struct agp_memory *mem, off_t pg_start, int type) { size_t i; + struct agp_bridge_data *bridge; + + bridge = mem->bridge; + if (!bridge) + return -EINVAL; if (type != 0 || mem->type != 0) { /* The generic routines know nothing of memory types */ @@ -900,12 +1030,12 @@ /* AK: bogus, should encode addresses > 4GB */ for (i = pg_start; i < (mem->page_count + pg_start); i++) { - writel(agp_bridge->scratch_page, agp_bridge->gatt_table+i); - readl(agp_bridge->gatt_table+i); /* PCI Posting. */ + writel(bridge->scratch_page, bridge->gatt_table+i); + readl(bridge->gatt_table+i); /* PCI Posting. */ } global_cache_flush(); - agp_bridge->driver->tlb_flush(mem); + bridge->driver->tlb_flush(mem); return 0; } EXPORT_SYMBOL(agp_generic_remove_memory); @@ -920,9 +1050,7 @@ void agp_generic_free_by_type(struct agp_memory *curr) { - if (curr->memory != NULL) - vfree(curr->memory); - + vfree(curr->memory); agp_free_key(curr->key); kfree(curr); } @@ -936,7 +1064,7 @@ * against a maximum value. */ -void *agp_generic_alloc_page(void) +void *agp_generic_alloc_page(struct agp_bridge_data *bridge) { struct page * page; @@ -978,14 +1106,25 @@ * * @mode: agp mode register value to configure with. */ -void agp_enable(u32 mode) +void agp_enable(struct agp_bridge_data *bridge, u32 mode) { - if (agp_bridge->type == NOT_SUPPORTED) + if (!bridge) return; - agp_bridge->driver->agp_enable(mode); + bridge->driver->agp_enable(bridge, mode); } EXPORT_SYMBOL(agp_enable); +/* When we remove the global variable agp_bridge from all drivers + * then agp_alloc_bridge and agp_generic_find_bridge need to be updated + */ + +struct agp_bridge_data *agp_generic_find_bridge(struct pci_dev *pdev) +{ + if (list_empty(&agp_bridges)) + return NULL; + + return agp_bridge; +} static void ipi_handler(void *null) { @@ -999,11 +1138,12 @@ } EXPORT_SYMBOL(global_cache_flush); -unsigned long agp_generic_mask_memory(unsigned long addr, int type) +unsigned long agp_generic_mask_memory(struct agp_bridge_data *bridge, + unsigned long addr, int type) { /* memory type is ignored in the generic routine */ - if (agp_bridge->driver->masks) - return addr | agp_bridge->driver->masks[0].mask; + if (bridge->driver->masks) + return addr | bridge->driver->masks[0].mask; else return addr; } diff -Nru a/drivers/char/agp/hp-agp.c b/drivers/char/agp/hp-agp.c --- a/drivers/char/agp/hp-agp.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/char/agp/hp-agp.c 2005-03-07 14:54:18 -08:00 @@ -289,7 +289,7 @@ } static int -hp_zx1_create_gatt_table (void) +hp_zx1_create_gatt_table (struct agp_bridge_data *bridge) { struct _hp_private *hp = &hp_private; int i; @@ -317,7 +317,7 @@ } static int -hp_zx1_free_gatt_table (void) +hp_zx1_free_gatt_table (struct agp_bridge_data *bridge) { struct _hp_private *hp = &hp_private; @@ -367,7 +367,9 @@ for (k = 0; k < hp->io_pages_per_kpage; k++, j++, paddr += hp->io_page_size) { - hp->gatt[j] = agp_bridge->driver->mask_memory(paddr, type); + hp->gatt[j] = + agp_bridge->driver->mask_memory(agp_bridge, + paddr, type); } } @@ -396,19 +398,20 @@ } static unsigned long -hp_zx1_mask_memory (unsigned long addr, int type) +hp_zx1_mask_memory (struct agp_bridge_data *bridge, + unsigned long addr, int type) { return HP_ZX1_PDIR_VALID_BIT | addr; } static void -hp_zx1_enable (u32 mode) +hp_zx1_enable (struct agp_bridge_data *bridge, u32 mode) { struct _hp_private *hp = &hp_private; u32 command; command = readl(hp->lba_regs+hp->lba_cap_offset+PCI_AGP_STATUS); - command = agp_collect_device_status(mode, command); + command = agp_collect_device_status(bridge, mode, command); command |= 0x00000100; writel(command, hp->lba_regs+hp->lba_cap_offset+PCI_AGP_COMMAND); diff -Nru a/drivers/char/agp/i460-agp.c b/drivers/char/agp/i460-agp.c --- a/drivers/char/agp/i460-agp.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/char/agp/i460-agp.c 2005-03-07 14:54:17 -08:00 @@ -233,7 +233,7 @@ return 0; } -static int i460_create_gatt_table (void) +static int i460_create_gatt_table (struct agp_bridge_data *bridge) { int page_order, num_entries, i; void *temp; @@ -258,7 +258,7 @@ return 0; } -static int i460_free_gatt_table (void) +static int i460_free_gatt_table (struct agp_bridge_data *bridge) { int num_entries, i; void *temp; @@ -314,7 +314,8 @@ for (i = 0, j = io_pg_start; i < mem->page_count; i++) { paddr = mem->memory[i]; for (k = 0; k < I460_IOPAGES_PER_KPAGE; k++, j++, paddr += io_page_size) - WR_GATT(j, agp_bridge->driver->mask_memory(paddr, mem->type)); + WR_GATT(j, agp_bridge->driver->mask_memory(agp_bridge, + paddr, mem->type)); } WR_FLUSH_GATT(j - 1); return 0; @@ -427,7 +428,8 @@ if (i460_alloc_large_page(lp) < 0) return -ENOMEM; pg = lp - i460.lp_desc; - WR_GATT(pg, agp_bridge->driver->mask_memory(lp->paddr, 0)); + WR_GATT(pg, agp_bridge->driver->mask_memory(agp_bridge, + lp->paddr, 0)); WR_FLUSH_GATT(pg); } @@ -508,12 +510,12 @@ * Let's just hope nobody counts on the allocated AGP memory being there before bind time * (I don't think current drivers do)... */ -static void *i460_alloc_page (void) +static void *i460_alloc_page (struct agp_bridge_data *bridge) { void *page; if (I460_IO_PAGE_SHIFT <= PAGE_SHIFT) - page = agp_generic_alloc_page(); + page = agp_generic_alloc_page(agp_bridge); else /* Returning NULL would cause problems */ /* AK: really dubious code. */ @@ -529,10 +531,11 @@ #endif /* I460_LARGE_IO_PAGES */ -static unsigned long i460_mask_memory (unsigned long addr, int type) +static unsigned long i460_mask_memory (struct agp_bridge_data *bridge, + unsigned long addr, int type) { /* Make sure the returned address is a valid GATT entry */ - return agp_bridge->driver->masks[0].mask + return bridge->driver->masks[0].mask | (((addr & ~((1 << I460_IO_PAGE_SHIFT) - 1)) & 0xffffff000) >> 12); } @@ -624,7 +627,7 @@ { if (agp_off) return -EINVAL; - return pci_module_init(&agp_intel_i460_pci_driver); + return pci_register_driver(&agp_intel_i460_pci_driver); } static void __exit agp_intel_i460_cleanup(void) diff -Nru a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c --- a/drivers/char/agp/intel-agp.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/char/agp/intel-agp.c 2005-03-07 14:54:17 -08:00 @@ -150,7 +150,7 @@ return; } -static void intel_i810_agp_enable(u32 mode) +static void intel_i810_agp_enable(struct agp_bridge_data *bridge, u32 mode) { return; } @@ -229,8 +229,9 @@ insert: global_cache_flush(); for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { - writel(agp_bridge->driver->mask_memory(mem->memory[i], mem->type), - intel_i810_private.registers+I810_PTE_BASE+(j*4)); + writel(agp_bridge->driver->mask_memory(agp_bridge, + mem->memory[i], mem->type), + intel_i810_private.registers+I810_PTE_BASE+(j*4)); readl(intel_i810_private.registers+I810_PTE_BASE+(j*4)); /* PCI Posting. */ } global_cache_flush(); @@ -268,7 +269,7 @@ return NULL; switch (pg_count) { - case 1: addr = agp_bridge->driver->agp_alloc_page(); + case 1: addr = agp_bridge->driver->agp_alloc_page(agp_bridge); break; case 4: /* kludge to get 4 physical pages for ARGB cursor */ @@ -337,10 +338,11 @@ kfree(curr); } -static unsigned long intel_i810_mask_memory(unsigned long addr, int type) +static unsigned long intel_i810_mask_memory(struct agp_bridge_data *bridge, + unsigned long addr, int type) { /* Type checking must be done elsewhere */ - return addr | agp_bridge->driver->masks[type].mask; + return addr | bridge->driver->masks[type].mask; } static struct aper_size_info_fixed intel_i830_sizes[] = @@ -447,7 +449,7 @@ /* The intel i830 automatically initializes the agp aperture during POST. * Use the memory already set aside for in the GTT. */ -static int intel_i830_create_gatt_table(void) +static int intel_i830_create_gatt_table(struct agp_bridge_data *bridge) { int page_order; struct aper_size_info_fixed *size; @@ -482,7 +484,7 @@ /* Return the gatt table to a sane state. Use the top of stolen * memory for the GTT. */ -static int intel_i830_free_gatt_table(void) +static int intel_i830_free_gatt_table(struct agp_bridge_data *bridge) { return 0; } @@ -582,8 +584,9 @@ global_cache_flush(); /* FIXME: Necessary ?*/ for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { - writel(agp_bridge->driver->mask_memory(mem->memory[i], mem->type), - intel_i830_private.registers+I810_PTE_BASE+(j*4)); + writel(agp_bridge->driver->mask_memory(agp_bridge, + mem->memory[i], mem->type), + intel_i830_private.registers+I810_PTE_BASE+(j*4)); readl(intel_i830_private.registers+I810_PTE_BASE+(j*4)); /* PCI Posting. */ } @@ -691,7 +694,8 @@ global_cache_flush(); for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { - writel(agp_bridge->driver->mask_memory(mem->memory[i], mem->type), intel_i830_private.gtt+j); + writel(agp_bridge->driver->mask_memory(agp_bridge, + mem->memory[i], mem->type), intel_i830_private.gtt+j); readl(intel_i830_private.gtt+j); /* PCI Posting. */ } @@ -743,7 +747,7 @@ /* The intel i915 automatically initializes the agp aperture during POST. * Use the memory already set aside for in the GTT. */ -static int intel_i915_create_gatt_table(void) +static int intel_i915_create_gatt_table(struct agp_bridge_data *bridge) { int page_order; struct aper_size_info_fixed *size; @@ -1758,6 +1762,8 @@ intel_i915_configure(); else if (bridge->driver == &intel_830_driver) intel_i830_configure(); + else if (bridge->driver == &intel_810_driver) + intel_i810_configure(); return 0; } @@ -1810,7 +1816,9 @@ static int __init agp_intel_init(void) { - return pci_module_init(&agp_intel_pci_driver); + if (agp_off) + return -EINVAL; + return pci_register_driver(&agp_intel_pci_driver); } static void __exit agp_intel_cleanup(void) diff -Nru a/drivers/char/agp/intel-mch-agp.c b/drivers/char/agp/intel-mch-agp.c --- a/drivers/char/agp/intel-mch-agp.c 2005-03-07 14:54:16 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,643 +0,0 @@ -/* - * Intel MCH AGPGART routines. - */ - -#include -#include -#include -#include -#include "agp.h" - - -#define AGP_DCACHE_MEMORY 1 -#define AGP_PHYS_MEMORY 2 - -static struct gatt_mask intel_i810_masks[] = -{ - {.mask = I810_PTE_VALID, .type = 0}, - {.mask = (I810_PTE_VALID | I810_PTE_LOCAL), .type = AGP_DCACHE_MEMORY}, - {.mask = I810_PTE_VALID, .type = 0} -}; - -static void intel_i810_tlbflush(struct agp_memory *mem) -{ - return; -} - -static void intel_i810_agp_enable(u32 mode) -{ - return; -} - - -/* - * The i810/i830 requires a physical address to program its mouse - * pointer into hardware. - * However the Xserver still writes to it through the agp aperture. - */ -static struct agp_memory *alloc_agpphysmem_i8xx(size_t pg_count, int type) -{ - struct agp_memory *new; - void *addr; - - if (pg_count != 1) - return NULL; - - addr = agp_bridge->driver->agp_alloc_page(); - if (addr == NULL) - return NULL; - - new = agp_create_memory(1); - if (new == NULL) - return NULL; - - new->memory[0] = virt_to_phys(addr); - new->page_count = 1; - new->num_scratch_pages = 1; - new->type = AGP_PHYS_MEMORY; - new->physical = new->memory[0]; - return new; -} - -static void intel_i810_free_by_type(struct agp_memory *curr) -{ - agp_free_key(curr->key); - if(curr->type == AGP_PHYS_MEMORY) { - agp_bridge->driver->agp_destroy_page(phys_to_virt(curr->memory[0])); - vfree(curr->memory); - } - kfree(curr); -} - -static unsigned long intel_i810_mask_memory(unsigned long addr, int type) -{ - /* Type checking must be done elsewhere */ - return addr | agp_bridge->driver->masks[type].mask; -} - -static struct aper_size_info_fixed intel_i830_sizes[] = -{ - {128, 32768, 5}, - /* The 64M mode still requires a 128k gatt */ - {64, 16384, 5} -}; - -static struct _intel_i830_private { - struct pci_dev *i830_dev; /* device one */ - volatile u8 __iomem *registers; - int gtt_entries; -} intel_i830_private; - -static void intel_i830_init_gtt_entries(void) -{ - u16 gmch_ctrl; - int gtt_entries; - u8 rdct; - int local = 0; - static const int ddt[4] = { 0, 16, 32, 64 }; - - pci_read_config_word(agp_bridge->dev,I830_GMCH_CTRL,&gmch_ctrl); - - if (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82830_HB || - agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82845G_HB) { - switch (gmch_ctrl & I830_GMCH_GMS_MASK) { - case I830_GMCH_GMS_STOLEN_512: - gtt_entries = KB(512) - KB(132); - break; - case I830_GMCH_GMS_STOLEN_1024: - gtt_entries = MB(1) - KB(132); - break; - case I830_GMCH_GMS_STOLEN_8192: - gtt_entries = MB(8) - KB(132); - break; - case I830_GMCH_GMS_LOCAL: - rdct = readb(intel_i830_private.registers+I830_RDRAM_CHANNEL_TYPE); - gtt_entries = (I830_RDRAM_ND(rdct) + 1) * - MB(ddt[I830_RDRAM_DDT(rdct)]); - local = 1; - break; - default: - gtt_entries = 0; - break; - } - } else { - switch (gmch_ctrl & I830_GMCH_GMS_MASK) { - case I855_GMCH_GMS_STOLEN_1M: - gtt_entries = MB(1) - KB(132); - break; - case I855_GMCH_GMS_STOLEN_4M: - gtt_entries = MB(4) - KB(132); - break; - case I855_GMCH_GMS_STOLEN_8M: - gtt_entries = MB(8) - KB(132); - break; - case I855_GMCH_GMS_STOLEN_16M: - gtt_entries = MB(16) - KB(132); - break; - case I855_GMCH_GMS_STOLEN_32M: - gtt_entries = MB(32) - KB(132); - break; - default: - gtt_entries = 0; - break; - } - } - if (gtt_entries > 0) - printk(KERN_INFO PFX "Detected %dK %s memory.\n", - gtt_entries / KB(1), local ? "local" : "stolen"); - else - printk(KERN_INFO PFX - "No pre-allocated video memory detected.\n"); - gtt_entries /= KB(4); - - intel_i830_private.gtt_entries = gtt_entries; -} - -/* The intel i830 automatically initializes the agp aperture during POST. - * Use the memory already set aside for in the GTT. - */ -static int intel_i830_create_gatt_table(void) -{ - int page_order; - struct aper_size_info_fixed *size; - int num_entries; - u32 temp; - - size = agp_bridge->current_size; - page_order = size->page_order; - num_entries = size->num_entries; - agp_bridge->gatt_table_real = NULL; - - pci_read_config_dword(intel_i830_private.i830_dev,I810_MMADDR,&temp); - temp &= 0xfff80000; - - intel_i830_private.registers = (volatile u8 __iomem*) ioremap(temp,128 * 4096); - if (!intel_i830_private.registers) - return -ENOMEM; - - temp = readl(intel_i830_private.registers+I810_PGETBL_CTL) & 0xfffff000; - global_cache_flush(); /* FIXME: ?? */ - - /* we have to call this as early as possible after the MMIO base address is known */ - intel_i830_init_gtt_entries(); - - agp_bridge->gatt_table = NULL; - - agp_bridge->gatt_bus_addr = temp; - - return 0; -} - -/* Return the gatt table to a sane state. Use the top of stolen - * memory for the GTT. - */ -static int intel_i830_free_gatt_table(void) -{ - return 0; -} - -static int intel_i830_fetch_size(void) -{ - u16 gmch_ctrl; - struct aper_size_info_fixed *values; - - values = A_SIZE_FIX(agp_bridge->driver->aperture_sizes); - - if (agp_bridge->dev->device != PCI_DEVICE_ID_INTEL_82830_HB && - agp_bridge->dev->device != PCI_DEVICE_ID_INTEL_82845G_HB) { - /* 855GM/852GM/865G has 128MB aperture size */ - agp_bridge->previous_size = agp_bridge->current_size = (void *) values; - agp_bridge->aperture_size_idx = 0; - return values[0].size; - } - - pci_read_config_word(agp_bridge->dev,I830_GMCH_CTRL,&gmch_ctrl); - - if ((gmch_ctrl & I830_GMCH_MEM_MASK) == I830_GMCH_MEM_128M) { - agp_bridge->previous_size = agp_bridge->current_size = (void *) values; - agp_bridge->aperture_size_idx = 0; - return values[0].size; - } else { - agp_bridge->previous_size = agp_bridge->current_size = (void *) values; - agp_bridge->aperture_size_idx = 1; - return values[1].size; - } - - return 0; -} - -static int intel_i830_configure(void) -{ - struct aper_size_info_fixed *current_size; - u32 temp; - u16 gmch_ctrl; - int i; - - current_size = A_SIZE_FIX(agp_bridge->current_size); - - pci_read_config_dword(intel_i830_private.i830_dev,I810_GMADDR,&temp); - agp_bridge->gart_bus_addr = (temp & PCI_BASE_ADDRESS_MEM_MASK); - - pci_read_config_word(agp_bridge->dev,I830_GMCH_CTRL,&gmch_ctrl); - gmch_ctrl |= I830_GMCH_ENABLED; - pci_write_config_word(agp_bridge->dev,I830_GMCH_CTRL,gmch_ctrl); - - writel(agp_bridge->gatt_bus_addr|I810_PGETBL_ENABLED, intel_i830_private.registers+I810_PGETBL_CTL); - readl(intel_i830_private.registers+I810_PGETBL_CTL); /* PCI Posting. */ - - if (agp_bridge->driver->needs_scratch_page) { - for (i = intel_i830_private.gtt_entries; i < current_size->num_entries; i++) { - writel(agp_bridge->scratch_page, intel_i830_private.registers+I810_PTE_BASE+(i*4)); - readl(intel_i830_private.registers+I810_PTE_BASE+(i*4)); /* PCI Posting. */ - } - } - global_cache_flush(); - return 0; -} - -static void intel_i830_cleanup(void) -{ - iounmap((void __iomem *) intel_i830_private.registers); -} - -static int intel_i830_insert_entries(struct agp_memory *mem,off_t pg_start, - int type) -{ - int i,j,num_entries; - void *temp; - - temp = agp_bridge->current_size; - num_entries = A_SIZE_FIX(temp)->num_entries; - - if (pg_start < intel_i830_private.gtt_entries) { - printk (KERN_DEBUG PFX "pg_start == 0x%.8lx,intel_i830_private.gtt_entries == 0x%.8x\n", - pg_start,intel_i830_private.gtt_entries); - - printk (KERN_INFO PFX "Trying to insert into local/stolen memory\n"); - return -EINVAL; - } - - if ((pg_start + mem->page_count) > num_entries) - return -EINVAL; - - /* The i830 can't check the GTT for entries since its read only, - * depend on the caller to make the correct offset decisions. - */ - - if ((type != 0 && type != AGP_PHYS_MEMORY) || - (mem->type != 0 && mem->type != AGP_PHYS_MEMORY)) - return -EINVAL; - - global_cache_flush(); /* FIXME: ?? */ - - for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { - writel(agp_bridge->driver->mask_memory(mem->memory[i], mem->type), - intel_i830_private.registers+I810_PTE_BASE+(j*4)); - readl(intel_i830_private.registers+I810_PTE_BASE+(j*4)); /* PCI Posting. */ - } - - global_cache_flush(); - - agp_bridge->driver->tlb_flush(mem); - - return 0; -} - -static int intel_i830_remove_entries(struct agp_memory *mem,off_t pg_start, - int type) -{ - int i; - - global_cache_flush(); - - if (pg_start < intel_i830_private.gtt_entries) { - printk (KERN_INFO PFX "Trying to disable local/stolen memory\n"); - return -EINVAL; - } - - for (i = pg_start; i < (mem->page_count + pg_start); i++) { - writel(agp_bridge->scratch_page, intel_i830_private.registers+I810_PTE_BASE+(i*4)); - readl(intel_i830_private.registers+I810_PTE_BASE+(i*4)); /* PCI Posting. */ - } - - global_cache_flush(); - agp_bridge->driver->tlb_flush(mem); - return 0; -} - -static struct agp_memory *intel_i830_alloc_by_type(size_t pg_count,int type) -{ - if (type == AGP_PHYS_MEMORY) - return alloc_agpphysmem_i8xx(pg_count, type); - - /* always return NULL for other allocation types for now */ - return NULL; -} - -static int intel_8xx_fetch_size(void) -{ - u8 temp; - int i; - struct aper_size_info_8 *values; - - pci_read_config_byte(agp_bridge->dev, INTEL_APSIZE, &temp); - - values = A_SIZE_8(agp_bridge->driver->aperture_sizes); - - for (i = 0; i < agp_bridge->driver->num_aperture_sizes; i++) { - if (temp == values[i].size_value) { - agp_bridge->previous_size = - agp_bridge->current_size = (void *) (values + i); - agp_bridge->aperture_size_idx = i; - return values[i].size; - } - } - return 0; -} - -static void intel_8xx_tlbflush(struct agp_memory *mem) -{ - u32 temp; - pci_read_config_dword(agp_bridge->dev, INTEL_AGPCTRL, &temp); - pci_write_config_dword(agp_bridge->dev, INTEL_AGPCTRL, temp & ~(1 << 7)); - pci_read_config_dword(agp_bridge->dev, INTEL_AGPCTRL, &temp); - pci_write_config_dword(agp_bridge->dev, INTEL_AGPCTRL, temp | (1 << 7)); -} - -static void intel_8xx_cleanup(void) -{ - u16 temp; - struct aper_size_info_8 *previous_size; - - previous_size = A_SIZE_8(agp_bridge->previous_size); - pci_read_config_word(agp_bridge->dev, INTEL_NBXCFG, &temp); - pci_write_config_word(agp_bridge->dev, INTEL_NBXCFG, temp & ~(1 << 9)); - pci_write_config_byte(agp_bridge->dev, INTEL_APSIZE, previous_size->size_value); -} - -static int intel_845_configure(void) -{ - u32 temp; - u8 temp2; - struct aper_size_info_8 *current_size; - - current_size = A_SIZE_8(agp_bridge->current_size); - - /* aperture size */ - pci_write_config_byte(agp_bridge->dev, INTEL_APSIZE, current_size->size_value); - - /* address to map to */ - pci_read_config_dword(agp_bridge->dev, AGP_APBASE, &temp); - agp_bridge->gart_bus_addr = (temp & PCI_BASE_ADDRESS_MEM_MASK); - - /* attbase - aperture base */ - pci_write_config_dword(agp_bridge->dev, INTEL_ATTBASE, agp_bridge->gatt_bus_addr); - - /* agpctrl */ - pci_write_config_dword(agp_bridge->dev, INTEL_AGPCTRL, 0x0000); - - /* agpm */ - pci_read_config_byte(agp_bridge->dev, INTEL_I845_AGPM, &temp2); - pci_write_config_byte(agp_bridge->dev, INTEL_I845_AGPM, temp2 | (1 << 1)); - /* clear any possible error conditions */ - pci_write_config_word(agp_bridge->dev, INTEL_I845_ERRSTS, 0x001c); - return 0; -} - - -/* Setup function */ -static struct gatt_mask intel_generic_masks[] = -{ - {.mask = 0x00000017, .type = 0} -}; - -static struct aper_size_info_8 intel_8xx_sizes[7] = -{ - {256, 65536, 6, 0}, - {128, 32768, 5, 32}, - {64, 16384, 4, 48}, - {32, 8192, 3, 56}, - {16, 4096, 2, 60}, - {8, 2048, 1, 62}, - {4, 1024, 0, 63} -}; - -static struct agp_bridge_driver intel_830_driver = { - .owner = THIS_MODULE, - .aperture_sizes = intel_i830_sizes, - .size_type = FIXED_APER_SIZE, - .num_aperture_sizes = 2, - .needs_scratch_page = TRUE, - .configure = intel_i830_configure, - .fetch_size = intel_i830_fetch_size, - .cleanup = intel_i830_cleanup, - .tlb_flush = intel_i810_tlbflush, - .mask_memory = intel_i810_mask_memory, - .masks = intel_i810_masks, - .agp_enable = intel_i810_agp_enable, - .cache_flush = global_cache_flush, - .create_gatt_table = intel_i830_create_gatt_table, - .free_gatt_table = intel_i830_free_gatt_table, - .insert_memory = intel_i830_insert_entries, - .remove_memory = intel_i830_remove_entries, - .alloc_by_type = intel_i830_alloc_by_type, - .free_by_type = intel_i810_free_by_type, - .agp_alloc_page = agp_generic_alloc_page, - .agp_destroy_page = agp_generic_destroy_page, -}; - -static struct agp_bridge_driver intel_845_driver = { - .owner = THIS_MODULE, - .aperture_sizes = intel_8xx_sizes, - .size_type = U8_APER_SIZE, - .num_aperture_sizes = 7, - .configure = intel_845_configure, - .fetch_size = intel_8xx_fetch_size, - .cleanup = intel_8xx_cleanup, - .tlb_flush = intel_8xx_tlbflush, - .mask_memory = agp_generic_mask_memory, - .masks = intel_generic_masks, - .agp_enable = agp_generic_enable, - .cache_flush = global_cache_flush, - .create_gatt_table = agp_generic_create_gatt_table, - .free_gatt_table = agp_generic_free_gatt_table, - .insert_memory = agp_generic_insert_memory, - .remove_memory = agp_generic_remove_memory, - .alloc_by_type = agp_generic_alloc_by_type, - .free_by_type = agp_generic_free_by_type, - .agp_alloc_page = agp_generic_alloc_page, - .agp_destroy_page = agp_generic_destroy_page, -}; - - -static int find_i830(u16 device) -{ - struct pci_dev *i830_dev; - - i830_dev = pci_get_device(PCI_VENDOR_ID_INTEL, device, NULL); - if (i830_dev && PCI_FUNC(i830_dev->devfn) != 0) { - i830_dev = pci_get_device(PCI_VENDOR_ID_INTEL, - device, i830_dev); - } - - if (!i830_dev) - return 0; - - intel_i830_private.i830_dev = i830_dev; - return 1; -} - -static int __devinit agp_intelmch_probe(struct pci_dev *pdev, - const struct pci_device_id *ent) -{ - struct agp_bridge_data *bridge; - struct resource *r; - char *name = "(unknown)"; - u8 cap_ptr = 0; - - cap_ptr = pci_find_capability(pdev, PCI_CAP_ID_AGP); - if (!cap_ptr) - return -ENODEV; - - bridge = agp_alloc_bridge(); - if (!bridge) - return -ENOMEM; - - switch (pdev->device) { - case PCI_DEVICE_ID_INTEL_82865_HB: - if (find_i830(PCI_DEVICE_ID_INTEL_82865_IG)) { - bridge->driver = &intel_830_driver; - } else { - bridge->driver = &intel_845_driver; - } - name = "865"; - break; - case PCI_DEVICE_ID_INTEL_82875_HB: - bridge->driver = &intel_845_driver; - name = "i875"; - break; - - default: - printk(KERN_ERR PFX "Unsupported Intel chipset (device id: %04x)\n", - pdev->device); - return -ENODEV; - }; - - bridge->dev = pdev; - bridge->capndx = cap_ptr; - - if (bridge->driver == &intel_830_driver) - bridge->dev_private_data = &intel_i830_private; - - printk(KERN_INFO PFX "Detected an Intel %s Chipset.\n", name); - - /* - * The following fixes the case where the BIOS has "forgotten" to - * provide an address range for the GART. - * 20030610 - hamish@zot.org - */ - r = &pdev->resource[0]; - if (!r->start && r->end) { - if(pci_assign_resource(pdev, 0)) { - printk(KERN_ERR PFX "could not assign resource 0\n"); - return -ENODEV; - } - } - - /* - * If the device has not been properly setup, the following will catch - * the problem and should stop the system from crashing. - * 20030610 - hamish@zot.org - */ - if (pci_enable_device(pdev)) { - printk(KERN_ERR PFX "Unable to Enable PCI device\n"); - return -ENODEV; - } - - /* Fill in the mode register */ - if (cap_ptr) { - pci_read_config_dword(pdev, - bridge->capndx+PCI_AGP_STATUS, - &bridge->mode); - } - - pci_set_drvdata(pdev, bridge); - return agp_add_bridge(bridge); -} - -static void __devexit agp_intelmch_remove(struct pci_dev *pdev) -{ - struct agp_bridge_data *bridge = pci_get_drvdata(pdev); - - agp_remove_bridge(bridge); - if (intel_i830_private.i830_dev) - pci_dev_put(intel_i830_private.i830_dev); - agp_put_bridge(bridge); -} - -static int agp_intelmch_resume(struct pci_dev *pdev) -{ - struct agp_bridge_data *bridge = pci_get_drvdata(pdev); - - pci_restore_state(pdev); - - if (bridge->driver == &intel_845_driver) - intel_845_configure(); - - return 0; -} - -static struct pci_device_id agp_intelmch_pci_table[] = { - { - .class = (PCI_CLASS_BRIDGE_HOST << 8), - .class_mask = ~0, - .vendor = PCI_VENDOR_ID_INTEL, - .device = PCI_DEVICE_ID_INTEL_82865_HB, - .subvendor = PCI_ANY_ID, - .subdevice = PCI_ANY_ID, - }, - { - .class = (PCI_CLASS_BRIDGE_HOST << 8), - .class_mask = ~0, - .vendor = PCI_VENDOR_ID_INTEL, - .device = PCI_DEVICE_ID_INTEL_82875_HB, - .subvendor = PCI_ANY_ID, - .subdevice = PCI_ANY_ID, - }, - { } -}; - -MODULE_DEVICE_TABLE(pci, agp_intelmch_pci_table); - -static struct pci_driver agp_intelmch_pci_driver = { - .name = "agpgart-intel-mch", - .id_table = agp_intelmch_pci_table, - .probe = agp_intelmch_probe, - .remove = agp_intelmch_remove, - .resume = agp_intelmch_resume, -}; - -/* intel_agp_init() must not be declared static for explicit - early initialization to work (ie i810fb) */ -int __init agp_intelmch_init(void) -{ - static int agp_initialised=0; - - if (agp_initialised == 1) - return 0; - agp_initialised=1; - - return pci_module_init(&agp_intelmch_pci_driver); -} - -static void __exit agp_intelmch_cleanup(void) -{ - pci_unregister_driver(&agp_intelmch_pci_driver); -} - -module_init(agp_intelmch_init); -module_exit(agp_intelmch_cleanup); - -MODULE_AUTHOR("Dave Jones "); -MODULE_LICENSE("GPL"); - diff -Nru a/drivers/char/agp/nvidia-agp.c b/drivers/char/agp/nvidia-agp.c --- a/drivers/char/agp/nvidia-agp.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/char/agp/nvidia-agp.c 2005-03-07 14:54:16 -08:00 @@ -215,7 +215,8 @@ mem->is_flushed = TRUE; } for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { - writel(agp_bridge->driver->mask_memory(mem->memory[i], mem->type), + writel(agp_bridge->driver->mask_memory(agp_bridge, + mem->memory[i], mem->type), agp_bridge->gatt_table+nvidia_private.pg_offset+j); readl(agp_bridge->gatt_table+nvidia_private.pg_offset+j); /* PCI Posting. */ } @@ -407,7 +408,7 @@ { if (agp_off) return -EINVAL; - return pci_module_init(&agp_nvidia_pci_driver); + return pci_register_driver(&agp_nvidia_pci_driver); } static void __exit agp_nvidia_cleanup(void) diff -Nru a/drivers/char/agp/sis-agp.c b/drivers/char/agp/sis-agp.c --- a/drivers/char/agp/sis-agp.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/char/agp/sis-agp.c 2005-03-07 14:54:16 -08:00 @@ -1,5 +1,5 @@ /* - * SiS AGPGART routines. + * SiS AGPGART routines. */ #include @@ -70,7 +70,7 @@ (previous_size->size_value & ~(0x03))); } -static void sis_delayed_enable(u32 mode) +static void sis_delayed_enable(struct agp_bridge_data *bridge, u32 mode) { struct pci_dev *device = NULL; u32 command; @@ -79,10 +79,10 @@ printk(KERN_INFO PFX "Found an AGP %d.%d compliant device at %s.\n", agp_bridge->major_version, agp_bridge->minor_version, - agp_bridge->dev->slot_name); + pci_name(agp_bridge->dev)); pci_read_config_dword(agp_bridge->dev, agp_bridge->capndx + PCI_AGP_STATUS, &command); - command = agp_collect_device_status(mode, command); + command = agp_collect_device_status(bridge, mode, command); command |= AGPSTAT_AGP_ENABLE; rate = (command & 0x7) << 2; @@ -99,9 +99,9 @@ /* * Weird: on some sis chipsets any rate change in the target * command register triggers a 5ms screwup during which the master - * cannot be configured + * cannot be configured */ - if (device->device == agp_bridge->dev->device) { + if (device->device == bridge->dev->device) { printk(KERN_INFO PFX "SiS delay workaround: giving bridge time to recover.\n"); msleep(10); } @@ -342,7 +342,7 @@ { if (agp_off) return -EINVAL; - return pci_module_init(&agp_sis_pci_driver); + return pci_register_driver(&agp_sis_pci_driver); } static void __exit agp_sis_cleanup(void) diff -Nru a/drivers/char/agp/sworks-agp.c b/drivers/char/agp/sworks-agp.c --- a/drivers/char/agp/sworks-agp.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/char/agp/sworks-agp.c 2005-03-07 14:54:18 -08:00 @@ -141,7 +141,7 @@ #define GET_GATT_OFF(addr) ((addr & 0x003ff000) >> 12) #endif -static int serverworks_create_gatt_table(void) +static int serverworks_create_gatt_table(struct agp_bridge_data *bridge) { struct aper_size_info_lvl2 *value; struct serverworks_page_map page_dir; @@ -192,7 +192,7 @@ return 0; } -static int serverworks_free_gatt_table(void) +static int serverworks_free_gatt_table(struct agp_bridge_data *bridge) { struct serverworks_page_map page_dir; @@ -341,7 +341,7 @@ for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { addr = (j * PAGE_SIZE) + agp_bridge->gart_bus_addr; cur_gatt = SVRWRKS_GET_GATT(addr); - writel(agp_bridge->driver->mask_memory(mem->memory[i], mem->type), cur_gatt+GET_GATT_OFF(addr)); + writel(agp_bridge->driver->mask_memory(agp_bridge, mem->memory[i], mem->type), cur_gatt+GET_GATT_OFF(addr)); } serverworks_tlbflush(mem); return 0; @@ -387,15 +387,15 @@ {32, 8192, 0xfe000000} }; -static void serverworks_agp_enable(u32 mode) +static void serverworks_agp_enable(struct agp_bridge_data *bridge, u32 mode) { u32 command; pci_read_config_dword(serverworks_private.svrwrks_dev, - agp_bridge->capndx + PCI_AGP_STATUS, + bridge->capndx + PCI_AGP_STATUS, &command); - command = agp_collect_device_status(mode, command); + command = agp_collect_device_status(bridge, mode, command); command &= ~0x10; /* disable FW */ command &= ~0x08; @@ -403,7 +403,7 @@ command |= 0x100; pci_write_config_dword(serverworks_private.svrwrks_dev, - agp_bridge->capndx + PCI_AGP_COMMAND, + bridge->capndx + PCI_AGP_COMMAND, command); agp_device_command(command, 0); @@ -541,7 +541,7 @@ { if (agp_off) return -EINVAL; - return pci_module_init(&agp_serverworks_pci_driver); + return pci_register_driver(&agp_serverworks_pci_driver); } static void __exit agp_serverworks_cleanup(void) diff -Nru a/drivers/char/agp/uninorth-agp.c b/drivers/char/agp/uninorth-agp.c --- a/drivers/char/agp/uninorth-agp.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/char/agp/uninorth-agp.c 2005-03-07 14:54:17 -08:00 @@ -124,27 +124,27 @@ return 0; } -static void uninorth_agp_enable(u32 mode) +static void uninorth_agp_enable(struct agp_bridge_data *bridge, u32 mode) { u32 command, scratch; int timeout; - pci_read_config_dword(agp_bridge->dev, - agp_bridge->capndx + PCI_AGP_STATUS, + pci_read_config_dword(bridge->dev, + bridge->capndx + PCI_AGP_STATUS, &command); - command = agp_collect_device_status(mode, command); + command = agp_collect_device_status(bridge, mode, command); command |= 0x100; uninorth_tlbflush(NULL); timeout = 0; do { - pci_write_config_dword(agp_bridge->dev, - agp_bridge->capndx + PCI_AGP_COMMAND, + pci_write_config_dword(bridge->dev, + bridge->capndx + PCI_AGP_COMMAND, command); - pci_read_config_dword(agp_bridge->dev, - agp_bridge->capndx + PCI_AGP_COMMAND, + pci_read_config_dword(bridge->dev, + bridge->capndx + PCI_AGP_COMMAND, &scratch); } while ((scratch & 0x100) == 0 && ++timeout < 1000); if ((scratch & 0x100) == 0) @@ -155,7 +155,7 @@ uninorth_tlbflush(NULL); } -static int uninorth_create_gatt_table(void) +static int uninorth_create_gatt_table(struct agp_bridge_data *bridge) { char *table; char *table_end; @@ -212,7 +212,7 @@ return 0; } -static int uninorth_free_gatt_table(void) +static int uninorth_free_gatt_table(struct agp_bridge_data *bridge) { int page_order; char *table, *table_end; @@ -375,7 +375,7 @@ { if (agp_off) return -EINVAL; - return pci_module_init(&agp_uninorth_pci_driver); + return pci_register_driver(&agp_uninorth_pci_driver); } static void __exit agp_uninorth_cleanup(void) diff -Nru a/drivers/char/agp/via-agp.c b/drivers/char/agp/via-agp.c --- a/drivers/char/agp/via-agp.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/char/agp/via-agp.c 2005-03-07 14:54:18 -08:00 @@ -1,5 +1,5 @@ /* - * VIA AGPGART routines. + * VIA AGPGART routines. */ #include @@ -36,6 +36,7 @@ return values[i].size; } } + printk(KERN_ERR PFX "Unknown aperture size from AGP bridge (0x%x)\n", temp); return 0; } @@ -78,12 +79,19 @@ static void via_tlbflush(struct agp_memory *mem) { - pci_write_config_dword(agp_bridge->dev, VIA_GARTCTRL, 0x0000008f); - pci_write_config_dword(agp_bridge->dev, VIA_GARTCTRL, 0x0000000f); + u32 temp; + + pci_read_config_dword(agp_bridge->dev, VIA_GARTCTRL, &temp); + temp |= (1<<7); + temp &= ~0x7f; + pci_write_config_dword(agp_bridge->dev, VIA_GARTCTRL, temp); + temp &= ~(1<<7); + temp &= ~0x7f; + pci_write_config_dword(agp_bridge->dev, VIA_GARTCTRL, temp); } -static struct aper_size_info_8 via_generic_sizes[7] = +static struct aper_size_info_8 via_generic_sizes[9] = { {256, 65536, 6, 0}, {128, 32768, 5, 128}, @@ -91,7 +99,9 @@ {32, 8192, 3, 224}, {16, 4096, 2, 240}, {8, 2048, 1, 248}, - {4, 1024, 0, 252} + {4, 1024, 0, 252}, + {2, 512, 0, 254}, + {1, 256, 0, 255} }; @@ -121,7 +131,7 @@ { u32 temp; struct aper_size_info_16 *current_size; - + current_size = A_SIZE_16(agp_bridge->current_size); /* address to map too */ @@ -132,13 +142,13 @@ pci_write_config_dword(agp_bridge->dev, VIA_AGP3_ATTBASE, agp_bridge->gatt_bus_addr & 0xfffff000); - /* 1. Enable GTLB in RX90<7>, all AGP aperture access needs to fetch + /* 1. Enable GTLB in RX90<7>, all AGP aperture access needs to fetch * translation table first. * 2. Enable AGP aperture in RX91<0>. This bit controls the enabling of the * graphics AGP aperture for the AGP3.0 port. */ pci_read_config_dword(agp_bridge->dev, VIA_AGP3_GARTCTRL, &temp); - pci_write_config_dword(agp_bridge->dev, VIA_AGP3_GARTCTRL, temp | (3<<7)); + pci_write_config_dword(agp_bridge->dev, VIA_AGP3_GARTCTRL, temp | (3<<7)); return 0; } @@ -189,7 +199,7 @@ .owner = THIS_MODULE, .aperture_sizes = via_generic_sizes, .size_type = U8_APER_SIZE, - .num_aperture_sizes = 7, + .num_aperture_sizes = 9, .configure = via_configure, .fetch_size = via_fetch_size, .cleanup = via_cleanup, @@ -525,7 +535,7 @@ { if (agp_off) return -EINVAL; - return pci_module_init(&agp_via_pci_driver); + return pci_register_driver(&agp_via_pci_driver); } static void __exit agp_via_cleanup(void) diff -Nru a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h --- a/drivers/char/drm/drmP.h 2005-03-07 14:54:17 -08:00 +++ b/drivers/char/drm/drmP.h 2005-03-07 14:54:17 -08:00 @@ -497,6 +497,7 @@ DRM_AGP_KERN agp_info; /**< AGP device information */ drm_agp_mem_t *memory; /**< memory entries */ unsigned long mode; /**< AGP mode */ + struct agp_bridge_data *bridge; int enabled; /**< whether the AGP bus as been enabled */ int acquired; /**< whether the AGP device has been acquired */ unsigned long base; @@ -807,7 +808,7 @@ drm_device_t *dev); extern void drm_ioremapfree(void *pt, unsigned long size, drm_device_t *dev); -extern DRM_AGP_MEM *drm_alloc_agp(int pages, u32 type); +extern DRM_AGP_MEM *drm_alloc_agp(struct agp_bridge_data *bridge, int pages, u32 type); extern int drm_free_agp(DRM_AGP_MEM *handle, int pages); extern int drm_bind_agp(DRM_AGP_MEM *handle, unsigned int start); extern int drm_unbind_agp(DRM_AGP_MEM *handle); @@ -930,10 +931,10 @@ extern void drm_vbl_send_signals( drm_device_t *dev ); /* AGP/GART support (drm_agpsupport.h) */ -extern drm_agp_head_t *drm_agp_init(void); +extern drm_agp_head_t *drm_agp_init(drm_device_t *dev); extern int drm_agp_acquire(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); -extern void drm_agp_do_release(void); +extern void drm_agp_do_release(drm_device_t *dev); extern int drm_agp_release(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); extern int drm_agp_enable(struct inode *inode, struct file *filp, @@ -948,7 +949,7 @@ unsigned int cmd, unsigned long arg); extern int drm_agp_bind(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); -extern DRM_AGP_MEM *drm_agp_allocate_memory(size_t pages, u32 type); +extern DRM_AGP_MEM *drm_agp_allocate_memory(struct agp_bridge_data *bridge, size_t pages, u32 type); extern int drm_agp_free_memory(DRM_AGP_MEM *handle); extern int drm_agp_bind_memory(DRM_AGP_MEM *handle, off_t start); extern int drm_agp_unbind_memory(DRM_AGP_MEM *handle); diff -Nru a/drivers/char/drm/drm_agpsupport.c b/drivers/char/drm/drm_agpsupport.c --- a/drivers/char/drm/drm_agpsupport.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/char/drm/drm_agpsupport.c 2005-03-07 14:54:16 -08:00 @@ -92,14 +92,13 @@ { drm_file_t *priv = filp->private_data; drm_device_t *dev = priv->dev; - int retcode; if (!dev->agp) return -ENODEV; if (dev->agp->acquired) return -EBUSY; - if ((retcode = agp_backend_acquire())) - return retcode; + if (!(dev->agp->bridge = agp_backend_acquire(dev->pdev))) + return -ENODEV; dev->agp->acquired = 1; return 0; } @@ -123,7 +122,7 @@ if (!dev->agp || !dev->agp->acquired) return -EINVAL; - agp_backend_release(); + agp_backend_release(dev->agp->bridge); dev->agp->acquired = 0; return 0; @@ -134,9 +133,9 @@ * * Calls agp_backend_release(). */ -void drm_agp_do_release(void) +void drm_agp_do_release(drm_device_t *dev) { - agp_backend_release(); + agp_backend_release(dev->agp->bridge); } /** @@ -165,7 +164,7 @@ return -EFAULT; dev->agp->mode = mode.mode; - agp_enable(mode.mode); + agp_enable(dev->agp->bridge, mode.mode); dev->agp->base = dev->agp->agp_info.aper_base; dev->agp->enabled = 1; return 0; @@ -207,7 +206,7 @@ pages = (request.size + PAGE_SIZE - 1) / PAGE_SIZE; type = (u32) request.type; - if (!(memory = drm_alloc_agp(pages, type))) { + if (!(memory = drm_alloc_agp(dev->agp->bridge, pages, type))) { drm_free(entry, sizeof(*entry), DRM_MEM_AGPLISTS); return -ENOMEM; } @@ -381,14 +380,19 @@ * \return pointer to a drm_agp_head structure. * */ -drm_agp_head_t *drm_agp_init(void) +drm_agp_head_t *drm_agp_init(drm_device_t *dev) { drm_agp_head_t *head = NULL; if (!(head = drm_alloc(sizeof(*head), DRM_MEM_AGPLISTS))) return NULL; memset((void *)head, 0, sizeof(*head)); - agp_copy_info(&head->agp_info); + if (!(head->bridge = agp_backend_acquire(dev->pdev))) { + drm_free(head, sizeof(*head), DRM_MEM_AGPLISTS); + return NULL; + } + agp_copy_info(head->bridge, &head->agp_info); + agp_backend_release(head->bridge); if (head->agp_info.chipset == NOT_SUPPORTED) { drm_free(head, sizeof(*head), DRM_MEM_AGPLISTS); return NULL; @@ -406,9 +410,9 @@ } /** Calls agp_allocate_memory() */ -DRM_AGP_MEM *drm_agp_allocate_memory(size_t pages, u32 type) +DRM_AGP_MEM *drm_agp_allocate_memory(struct agp_bridge_data *bridge, size_t pages, u32 type) { - return agp_allocate_memory(pages, type); + return agp_allocate_memory(bridge, pages, type); } /** Calls agp_free_memory() */ diff -Nru a/drivers/char/drm/drm_drv.c b/drivers/char/drm/drm_drv.c --- a/drivers/char/drm/drm_drv.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/char/drm/drm_drv.c 2005-03-07 14:54:18 -08:00 @@ -185,7 +185,7 @@ } dev->agp->memory = NULL; - if ( dev->agp->acquired ) drm_agp_do_release(); + if ( dev->agp->acquired ) drm_agp_do_release(dev); dev->agp->acquired = 0; dev->agp->enabled = 0; diff -Nru a/drivers/char/drm/drm_memory.c b/drivers/char/drm/drm_memory.c --- a/drivers/char/drm/drm_memory.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/char/drm/drm_memory.c 2005-03-07 14:54:17 -08:00 @@ -155,9 +155,9 @@ #if __OS_HAS_AGP /** Wrapper around agp_allocate_memory() */ -DRM_AGP_MEM *drm_alloc_agp(int pages, u32 type) +DRM_AGP_MEM *drm_alloc_agp(struct agp_bridge_data *bridge, int pages, u32 type) { - return drm_agp_allocate_memory(pages, type); + return drm_agp_allocate_memory(bridge, pages, type); } /** Wrapper around agp_free_memory() */ diff -Nru a/drivers/char/drm/drm_stub.c b/drivers/char/drm/drm_stub.c --- a/drivers/char/drm/drm_stub.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/char/drm/drm_stub.c 2005-03-07 14:54:18 -08:00 @@ -91,7 +91,7 @@ goto error_out_unreg; if (drm_core_has_AGP(dev)) { - dev->agp = drm_agp_init(); + dev->agp = drm_agp_init(dev); if (drm_core_check_feature(dev, DRIVER_REQUIRE_AGP) && (dev->agp == NULL)) { DRM_ERROR( "Cannot initialize the agpgart module.\n" ); retcode = -EINVAL; diff -Nru a/drivers/char/random.c b/drivers/char/random.c --- a/drivers/char/random.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/char/random.c 2005-03-07 14:54:16 -08:00 @@ -1965,7 +1965,6 @@ * ********************************************************************/ -#ifdef CONFIG_INET /* * TCP initial sequence number picking. This uses the random number * generator to pick an initial secret value. This value is hashed @@ -2202,6 +2201,31 @@ EXPORT_SYMBOL(secure_tcpv6_sequence_number); #endif +/* The code below is shamelessly stolen from secure_tcp_sequence_number(). + * All blames to Andrey V. Savochkin . + */ +__u32 secure_ip_id(__u32 daddr) +{ + struct keydata *keyptr; + __u32 hash[4]; + + keyptr = get_keyptr(); + + /* + * Pick a unique starting offset for each IP destination. + * The dest ip address is placed in the starting vector, + * which is then hashed with random data. + */ + hash[0] = daddr; + hash[1] = keyptr->secret[9]; + hash[2] = keyptr->secret[10]; + hash[3] = keyptr->secret[11]; + + return halfMD4Transform(hash, keyptr->secret); +} + +#ifdef CONFIG_INET + __u32 secure_tcp_sequence_number(__u32 saddr, __u32 daddr, __u16 sport, __u16 dport) { @@ -2242,28 +2266,7 @@ EXPORT_SYMBOL(secure_tcp_sequence_number); -/* The code below is shamelessly stolen from secure_tcp_sequence_number(). - * All blames to Andrey V. Savochkin . - */ -__u32 secure_ip_id(__u32 daddr) -{ - struct keydata *keyptr; - __u32 hash[4]; - keyptr = get_keyptr(); - - /* - * Pick a unique starting offset for each IP destination. - * The dest ip address is placed in the starting vector, - * which is then hashed with random data. - */ - hash[0] = daddr; - hash[1] = keyptr->secret[9]; - hash[2] = keyptr->secret[10]; - hash[3] = keyptr->secret[11]; - - return halfMD4Transform(hash, keyptr->secret); -} /* Generate secure starting point for ephemeral TCP port search */ u32 secure_tcp_port_ephemeral(__u32 saddr, __u32 daddr, __u16 dport) @@ -2283,6 +2286,21 @@ return halfMD4Transform(hash, keyptr->secret); } +#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) +u32 secure_tcpv6_port_ephemeral(const __u32 *saddr, const __u32 *daddr, __u16 dport) +{ + struct keydata *keyptr = get_keyptr(); + u32 hash[12]; + + memcpy(hash, saddr, 16); + hash[4] = dport; + memcpy(&hash[5],keyptr->secret,sizeof(__u32) * 7); + + return twothirdsMD4Transform(daddr, hash); +} +EXPORT_SYMBOL(secure_tcpv6_port_ephemeral); +#endif + #ifdef CONFIG_SYN_COOKIES /* * Secure SYN cookie computation. This is the algorithm worked out by @@ -2383,3 +2401,40 @@ } #endif #endif /* CONFIG_INET */ + + +/* + * Get a random word for internal kernel use only. Similar to urandom but + * with the goal of minimal entropy pool depletion. As a result, the random + * value is not cryptographically secure but for several uses the cost of + * depleting entropy is too high + */ +unsigned int get_random_int(void) +{ + /* + * Use IP's RNG. It suits our purpose perfectly: it re-keys itself + * every second, from the entropy pool (and thus creates a limited + * drain on it), and uses halfMD4Transform within the second. We + * also mix it with jiffies and the PID: + */ + return secure_ip_id(current->pid + jiffies); +} + +/* + * randomize_range() returns a start address such that + * + * [...... .....] + * start end + * + * a with size "len" starting at the return value is inside in the + * area defined by [start, end], but is otherwise randomized. + */ +unsigned long +randomize_range(unsigned long start, unsigned long end, unsigned long len) +{ + unsigned long range = end - len - start; + + if (end <= start + len) + return 0; + return PAGE_ALIGN(get_random_int() % range + start); +} diff -Nru a/drivers/char/stallion.c b/drivers/char/stallion.c --- a/drivers/char/stallion.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/char/stallion.c 2005-03-07 14:54:17 -08:00 @@ -174,14 +174,6 @@ */ static char stl_unwanted[SC26198_RXFIFOSIZE]; -/* - * Keep track of what interrupts we have requested for us. - * We don't need to request an interrupt twice if it is being - * shared with another Stallion board. - */ -static int stl_gotintrs[STL_MAXBRDS]; -static int stl_numintrs; - /*****************************************************************************/ static stlbrd_t *stl_brds[STL_MAXBRDS]; @@ -504,7 +496,6 @@ static int stl_brdinit(stlbrd_t *brdp); static int stl_initports(stlbrd_t *brdp, stlpanel_t *panelp); -static int stl_mapirq(int irq, char *name); static int stl_getserial(stlport_t *portp, struct serial_struct __user *sp); static int stl_setserial(stlport_t *portp, struct serial_struct __user *sp); static int stl_getbrdstats(combrd_t __user *bp); @@ -513,11 +504,11 @@ static int stl_getportstruct(stlport_t __user *arg); static int stl_getbrdstruct(stlbrd_t __user *arg); static int stl_waitcarrier(stlport_t *portp, struct file *filp); -static void stl_eiointr(stlbrd_t *brdp); -static void stl_echatintr(stlbrd_t *brdp); -static void stl_echmcaintr(stlbrd_t *brdp); -static void stl_echpciintr(stlbrd_t *brdp); -static void stl_echpci64intr(stlbrd_t *brdp); +static int stl_eiointr(stlbrd_t *brdp); +static int stl_echatintr(stlbrd_t *brdp); +static int stl_echmcaintr(stlbrd_t *brdp); +static int stl_echpciintr(stlbrd_t *brdp); +static int stl_echpci64intr(stlbrd_t *brdp); static void stl_offintr(void *private); static void *stl_memalloc(int len); static stlbrd_t *stl_allocbrd(void); @@ -807,6 +798,9 @@ for (i = 0; (i < stl_nrbrds); i++) { if ((brdp = stl_brds[i]) == (stlbrd_t *) NULL) continue; + + free_irq(brdp->irq, brdp); + for (j = 0; (j < STL_MAXPANELS); j++) { panelp = brdp->panels[j]; if (panelp == (stlpanel_t *) NULL) @@ -832,9 +826,6 @@ stl_brds[i] = (stlbrd_t *) NULL; } - for (i = 0; (i < stl_numintrs); i++) - free_irq(stl_gotintrs[i], NULL); - restore_flags(flags); } @@ -1992,23 +1983,14 @@ static irqreturn_t stl_intr(int irq, void *dev_id, struct pt_regs *regs) { - stlbrd_t *brdp; - int i; - int handled = 0; + stlbrd_t *brdp = (stlbrd_t *) dev_id; #ifdef DEBUG - printk("stl_intr(irq=%d,regs=%x)\n", irq, (int) regs); + printk("stl_intr(brdp=%x,irq=%d,regs=%x)\n", (int) brdp, irq, + (int) regs); #endif - for (i = 0; (i < stl_nrbrds); i++) { - if ((brdp = stl_brds[i]) == (stlbrd_t *) NULL) - continue; - if (brdp->state == 0) - continue; - handled = 1; - (* brdp->isr)(brdp); - } - return IRQ_RETVAL(handled); + return IRQ_RETVAL((* brdp->isr)(brdp)); } /*****************************************************************************/ @@ -2017,15 +1999,19 @@ * Interrupt service routine for EasyIO board types. */ -static void stl_eiointr(stlbrd_t *brdp) +static int stl_eiointr(stlbrd_t *brdp) { stlpanel_t *panelp; unsigned int iobase; + int handled = 0; panelp = brdp->panels[0]; iobase = panelp->iobase; - while (inb(brdp->iostatus) & EIO_INTRPEND) + while (inb(brdp->iostatus) & EIO_INTRPEND) { + handled = 1; (* panelp->isr)(panelp, iobase); + } + return handled; } /*****************************************************************************/ @@ -2034,15 +2020,17 @@ * Interrupt service routine for ECH-AT board types. */ -static void stl_echatintr(stlbrd_t *brdp) +static int stl_echatintr(stlbrd_t *brdp) { stlpanel_t *panelp; unsigned int ioaddr; int bnknr; + int handled = 0; outb((brdp->ioctrlval | ECH_BRDENABLE), brdp->ioctrl); while (inb(brdp->iostatus) & ECH_INTRPEND) { + handled = 1; for (bnknr = 0; (bnknr < brdp->nrbnks); bnknr++) { ioaddr = brdp->bnkstataddr[bnknr]; if (inb(ioaddr) & ECH_PNLINTRPEND) { @@ -2053,6 +2041,8 @@ } outb((brdp->ioctrlval | ECH_BRDDISABLE), brdp->ioctrl); + + return handled; } /*****************************************************************************/ @@ -2061,13 +2051,15 @@ * Interrupt service routine for ECH-MCA board types. */ -static void stl_echmcaintr(stlbrd_t *brdp) +static int stl_echmcaintr(stlbrd_t *brdp) { stlpanel_t *panelp; unsigned int ioaddr; int bnknr; + int handled = 0; while (inb(brdp->iostatus) & ECH_INTRPEND) { + handled = 1; for (bnknr = 0; (bnknr < brdp->nrbnks); bnknr++) { ioaddr = brdp->bnkstataddr[bnknr]; if (inb(ioaddr) & ECH_PNLINTRPEND) { @@ -2076,6 +2068,7 @@ } } } + return handled; } /*****************************************************************************/ @@ -2084,11 +2077,12 @@ * Interrupt service routine for ECH-PCI board types. */ -static void stl_echpciintr(stlbrd_t *brdp) +static int stl_echpciintr(stlbrd_t *brdp) { stlpanel_t *panelp; unsigned int ioaddr; int bnknr, recheck; + int handled = 0; while (1) { recheck = 0; @@ -2099,11 +2093,13 @@ panelp = brdp->bnk2panel[bnknr]; (* panelp->isr)(panelp, (ioaddr & 0xfffc)); recheck++; + handled = 1; } } if (! recheck) break; } + return handled; } /*****************************************************************************/ @@ -2112,13 +2108,15 @@ * Interrupt service routine for ECH-8/64-PCI board types. */ -static void stl_echpci64intr(stlbrd_t *brdp) +static int stl_echpci64intr(stlbrd_t *brdp) { stlpanel_t *panelp; unsigned int ioaddr; int bnknr; + int handled = 0; while (inb(brdp->ioctrl) & 0x1) { + handled = 1; for (bnknr = 0; (bnknr < brdp->nrbnks); bnknr++) { ioaddr = brdp->bnkstataddr[bnknr]; if (inb(ioaddr) & ECH_PNLINTRPEND) { @@ -2127,6 +2125,8 @@ } } } + + return handled; } /*****************************************************************************/ @@ -2174,39 +2174,6 @@ /*****************************************************************************/ /* - * Map in interrupt vector to this driver. Check that we don't - * already have this vector mapped, we might be sharing this - * interrupt across multiple boards. - */ - -static int __init stl_mapirq(int irq, char *name) -{ - int rc, i; - -#ifdef DEBUG - printk("stl_mapirq(irq=%d,name=%s)\n", irq, name); -#endif - - rc = 0; - for (i = 0; (i < stl_numintrs); i++) { - if (stl_gotintrs[i] == irq) - break; - } - if (i >= stl_numintrs) { - if (request_irq(irq, stl_intr, SA_SHIRQ, name, NULL) != 0) { - printk("STALLION: failed to register interrupt " - "routine for %s irq=%d\n", name, irq); - rc = -ENODEV; - } else { - stl_gotintrs[stl_numintrs++] = irq; - } - } - return(rc); -} - -/*****************************************************************************/ - -/* * Initialize all the ports on a panel. */ @@ -2389,7 +2356,13 @@ brdp->nrpanels = 1; brdp->state |= BRD_FOUND; brdp->hwid = status; - rc = stl_mapirq(brdp->irq, name); + if (request_irq(brdp->irq, stl_intr, SA_SHIRQ, name, brdp) != 0) { + printk("STALLION: failed to register interrupt " + "routine for %s irq=%d\n", name, brdp->irq); + rc = -ENODEV; + } else { + rc = 0; + } return(rc); } @@ -2594,7 +2567,14 @@ outb((brdp->ioctrlval | ECH_BRDDISABLE), brdp->ioctrl); brdp->state |= BRD_FOUND; - i = stl_mapirq(brdp->irq, name); + if (request_irq(brdp->irq, stl_intr, SA_SHIRQ, name, brdp) != 0) { + printk("STALLION: failed to register interrupt " + "routine for %s irq=%d\n", name, brdp->irq); + i = -ENODEV; + } else { + i = 0; + } + return(i); } diff -Nru a/drivers/char/tb0219.c b/drivers/char/tb0219.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/char/tb0219.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,347 @@ +/* + * Driver for TANBAC TB0219 base board. + * + * Copyright (C) 2005 Yoichi Yuasa + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include +#include +#include +#include + +#include +#include + +MODULE_AUTHOR("Yoichi Yuasa "); +MODULE_DESCRIPTION("TANBAC TB0219 base board driver"); +MODULE_LICENSE("GPL"); + +static int major; /* default is dynamic major device number */ +module_param(major, int, 0); +MODULE_PARM_DESC(major, "Major device number"); + +static void (*old_machine_restart)(char *command); +static void __iomem *tb0219_base; +static spinlock_t tb0219_lock; + +#define tb0219_read(offset) readw(tb0219_base + (offset)) +#define tb0219_write(offset, value) writew((value), tb0219_base + (offset)) + +#define TB0219_START 0x0a000000UL +#define TB0219_SIZE 0x20UL + +#define TB0219_LED 0x00 +#define TB0219_GPIO_INPUT 0x02 +#define TB0219_GPIO_OUTPUT 0x04 +#define TB0219_DIP_SWITCH 0x06 +#define TB0219_MISC 0x08 +#define TB0219_RESET 0x0e +#define TB0219_PCI_SLOT1_IRQ_STATUS 0x10 +#define TB0219_PCI_SLOT2_IRQ_STATUS 0x12 +#define TB0219_PCI_SLOT3_IRQ_STATUS 0x14 + +typedef enum { + TYPE_LED, + TYPE_GPIO_OUTPUT, +} tb0219_type_t; + +/* + * Minor device number + * 0 = 7 segment LED + * + * 16 = GPIO IN 0 + * 17 = GPIO IN 1 + * 18 = GPIO IN 2 + * 19 = GPIO IN 3 + * 20 = GPIO IN 4 + * 21 = GPIO IN 5 + * 22 = GPIO IN 6 + * 23 = GPIO IN 7 + * + * 32 = GPIO OUT 0 + * 33 = GPIO OUT 1 + * 34 = GPIO OUT 2 + * 35 = GPIO OUT 3 + * 36 = GPIO OUT 4 + * 37 = GPIO OUT 5 + * 38 = GPIO OUT 6 + * 39 = GPIO OUT 7 + * + * 48 = DIP switch 1 + * 49 = DIP switch 2 + * 50 = DIP switch 3 + * 51 = DIP switch 4 + * 52 = DIP switch 5 + * 53 = DIP switch 6 + * 54 = DIP switch 7 + * 55 = DIP switch 8 + */ + +static inline char get_led(void) +{ + return (char)tb0219_read(TB0219_LED); +} + +static inline char get_gpio_input_pin(unsigned int pin) +{ + uint16_t values; + + values = tb0219_read(TB0219_GPIO_INPUT); + if (values & (1 << pin)) + return '1'; + + return '0'; +} + +static inline char get_gpio_output_pin(unsigned int pin) +{ + uint16_t values; + + values = tb0219_read(TB0219_GPIO_OUTPUT); + if (values & (1 << pin)) + return '1'; + + return '0'; +} + +static inline char get_dip_switch(unsigned int pin) +{ + uint16_t values; + + values = tb0219_read(TB0219_DIP_SWITCH); + if (values & (1 << pin)) + return '1'; + + return '0'; +} + +static inline int set_led(char command) +{ + tb0219_write(TB0219_LED, command); + + return 0; +} + +static inline int set_gpio_output_pin(unsigned int pin, char command) +{ + unsigned long flags; + uint16_t value; + + if (command != '0' && command != '1') + return -EINVAL; + + spin_lock_irqsave(&tb0219_lock, flags); + value = tb0219_read(TB0219_GPIO_OUTPUT); + if (command == '0') + value &= ~(1 << pin); + else + value |= 1 << pin; + tb0219_write(TB0219_GPIO_OUTPUT, value); + spin_unlock_irqrestore(&tb0219_lock, flags); + + return 0; + +} + +static ssize_t tanbac_tb0219_read(struct file *file, char __user *buf, size_t len, + loff_t *ppos) +{ + unsigned int minor; + char value; + + minor = iminor(file->f_dentry->d_inode); + switch (minor) { + case 0: + value = get_led(); + break; + case 16 ... 23: + value = get_gpio_input_pin(minor - 16); + break; + case 32 ... 39: + value = get_gpio_output_pin(minor - 32); + break; + case 48 ... 55: + value = get_dip_switch(minor - 48); + break; + default: + return -EBADF; + } + + if (len <= 0) + return -EFAULT; + + if (put_user(value, buf)) + return -EFAULT; + + return 1; +} + +static ssize_t tanbac_tb0219_write(struct file *file, const char __user *data, + size_t len, loff_t *ppos) +{ + unsigned int minor; + tb0219_type_t type; + size_t i; + int retval = 0; + char c; + + minor = iminor(file->f_dentry->d_inode); + switch (minor) { + case 0: + type = TYPE_LED; + break; + case 32 ... 39: + type = TYPE_GPIO_OUTPUT; + break; + default: + return -EBADF; + } + + for (i = 0; i < len; i++) { + if (get_user(c, data + i)) + return -EFAULT; + + switch (type) { + case TYPE_LED: + retval = set_led(c); + break; + case TYPE_GPIO_OUTPUT: + retval = set_gpio_output_pin(minor - 32, c); + break; + } + + if (retval < 0) + break; + } + + return i; +} + +static int tanbac_tb0219_open(struct inode *inode, struct file *file) +{ + unsigned int minor; + + minor = iminor(inode); + switch (minor) { + case 0: + case 16 ... 23: + case 32 ... 39: + case 48 ... 55: + return nonseekable_open(inode, file); + default: + break; + } + + return -EBADF; +} + +static int tanbac_tb0219_release(struct inode *inode, struct file *file) +{ + return 0; +} + +static struct file_operations tb0219_fops = { + .owner = THIS_MODULE, + .read = tanbac_tb0219_read, + .write = tanbac_tb0219_write, + .open = tanbac_tb0219_open, + .release = tanbac_tb0219_release, +}; + +static void tb0219_restart(char *command) +{ + tb0219_write(TB0219_RESET, 0); +} + +static int tb0219_probe(struct device *dev) +{ + int retval; + + if (request_mem_region(TB0219_START, TB0219_SIZE, "TB0219") == NULL) + return -EBUSY; + + tb0219_base = ioremap(TB0219_START, TB0219_SIZE); + if (tb0219_base == NULL) { + release_mem_region(TB0219_START, TB0219_SIZE); + return -ENOMEM; + } + + retval = register_chrdev(major, "TB0219", &tb0219_fops); + if (retval < 0) { + iounmap(tb0219_base); + tb0219_base = NULL; + release_mem_region(TB0219_START, TB0219_SIZE); + return retval; + } + + spin_lock_init(&tb0219_lock); + + old_machine_restart = _machine_restart; + _machine_restart = tb0219_restart; + + if (major == 0) { + major = retval; + printk(KERN_INFO "TB0219: major number %d\n", major); + } + + return 0; +} + +static int tb0219_remove(struct device *dev) +{ + _machine_restart = old_machine_restart; + + iounmap(tb0219_base); + tb0219_base = NULL; + + release_mem_region(TB0219_START, TB0219_SIZE); + + return 0; +} + +static struct platform_device *tb0219_platform_device; + +static struct device_driver tb0219_device_driver = { + .name = "TB0219", + .bus = &platform_bus_type, + .probe = tb0219_probe, + .remove = tb0219_remove, +}; + +static int __devinit tanbac_tb0219_init(void) +{ + int retval; + + tb0219_platform_device = platform_device_register_simple("TB0219", -1, NULL, 0); + if (IS_ERR(tb0219_platform_device)) + return PTR_ERR(tb0219_platform_device); + + retval = driver_register(&tb0219_device_driver); + if (retval < 0) + platform_device_unregister(tb0219_platform_device); + + return retval; +} + +static void __devexit tanbac_tb0219_exit(void) +{ + driver_unregister(&tb0219_device_driver); + + platform_device_unregister(tb0219_platform_device); +} + +module_init(tanbac_tb0219_init); +module_exit(tanbac_tb0219_exit); diff -Nru a/drivers/char/watchdog/sa1100_wdt.c b/drivers/char/watchdog/sa1100_wdt.c --- a/drivers/char/watchdog/sa1100_wdt.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/char/watchdog/sa1100_wdt.c 2005-03-07 14:54:17 -08:00 @@ -35,7 +35,7 @@ #include #include -#define OSCR_FREQ 3686400 +#define OSCR_FREQ CLOCK_TICK_RATE #define SA1100_CLOSE_MAGIC (0x5afc4453) static unsigned long sa1100wdt_users; diff -Nru a/drivers/i2c/algos/i2c-algo-ite.c b/drivers/i2c/algos/i2c-algo-ite.c --- a/drivers/i2c/algos/i2c-algo-ite.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/algos/i2c-algo-ite.c 2005-03-07 14:54:18 -08:00 @@ -490,7 +490,7 @@ * condition. */ #if 0 -static int iic_combined_transaction(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[], int num) +static int iic_combined_transaction(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num) { int i; struct i2c_msg *pmsg; @@ -600,7 +600,7 @@ * verify that the bus is not busy or in some unknown state. */ static int iic_xfer(struct i2c_adapter *i2c_adap, - struct i2c_msg msgs[], + struct i2c_msg *msgs, int num) { struct i2c_algo_iic_data *adap = i2c_adap->algo_data; diff -Nru a/drivers/i2c/algos/i2c-algo-pca.c b/drivers/i2c/algos/i2c-algo-pca.c --- a/drivers/i2c/algos/i2c-algo-pca.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/algos/i2c-algo-pca.c 2005-03-07 14:54:17 -08:00 @@ -178,7 +178,7 @@ } static int pca_xfer(struct i2c_adapter *i2c_adap, - struct i2c_msg msgs[], + struct i2c_msg *msgs, int num) { struct i2c_algo_pca_data *adap = i2c_adap->algo_data; @@ -186,6 +186,7 @@ int curmsg; int numbytes = 0; int state; + int ret; state = pca_status(adap); if ( state != 0xF8 ) { @@ -218,6 +219,7 @@ } curmsg = 0; + ret = -EREMOTEIO; while (curmsg < num) { state = pca_status(adap); @@ -251,7 +253,7 @@ case 0x20: /* SLA+W has been transmitted; NOT ACK has been received */ DEB2("NOT ACK received after SLA+W\n"); pca_stop(adap); - return -EREMOTEIO; + goto out; case 0x40: /* SLA+R has been transmitted; ACK has been received */ pca_rx_ack(adap, msg->len > 1); @@ -263,7 +265,7 @@ numbytes++; pca_rx_ack(adap, numbytes < msg->len - 1); break; - } + } curmsg++; numbytes = 0; if (curmsg == num) pca_stop(adap); @@ -274,15 +276,15 @@ case 0x48: /* SLA+R has been transmitted; NOT ACK has been received */ DEB2("NOT ACK received after SLA+R\n"); pca_stop(adap); - return -EREMOTEIO; + goto out; case 0x30: /* Data byte in I2CDAT has been transmitted; NOT ACK has been received */ DEB2("NOT ACK received after data byte\n"); - return -EREMOTEIO; + goto out; case 0x38: /* Arbitration lost during SLA+W, SLA+R or data bytes */ DEB2("Arbitration lost\n"); - return -EREMOTEIO; + goto out; case 0x58: /* Data byte has been received; NOT ACK has been returned */ if ( numbytes == msg->len - 1 ) { @@ -297,21 +299,21 @@ "Not final byte. numbytes %d. len %d\n", numbytes, msg->len); pca_stop(adap); - return -EREMOTEIO; + goto out; } break; case 0x70: /* Bus error - SDA stuck low */ DEB2("BUS ERROR - SDA Stuck low\n"); pca_reset(adap); - return -EREMOTEIO; + goto out; case 0x90: /* Bus error - SCL stuck low */ DEB2("BUS ERROR - SCL Stuck low\n"); pca_reset(adap); - return -EREMOTEIO; + goto out; case 0x00: /* Bus error during master or slave mode due to illegal START or STOP condition */ DEB2("BUS ERROR - Illegal START or STOP\n"); pca_reset(adap); - return -EREMOTEIO; + goto out; default: printk(KERN_ERR DRIVER ": unhandled SIO state 0x%02x\n", state); break; @@ -319,11 +321,13 @@ } - DEB1(KERN_CRIT "}}} transfered %d messages. " + ret = curmsg; + out: + DEB1(KERN_CRIT "}}} transfered %d/%d messages. " "status is %#04x. control is %#04x\n", - num, pca_status(adap), + curmsg, num, pca_status(adap), pca_get_con(adap)); - return curmsg; + return ret; } static u32 pca_func(struct i2c_adapter *adap) diff -Nru a/drivers/i2c/algos/i2c-algo-pcf.c b/drivers/i2c/algos/i2c-algo-pcf.c --- a/drivers/i2c/algos/i2c-algo-pcf.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/algos/i2c-algo-pcf.c 2005-03-07 14:54:17 -08:00 @@ -332,7 +332,7 @@ } static int pcf_xfer(struct i2c_adapter *i2c_adap, - struct i2c_msg msgs[], + struct i2c_msg *msgs, int num) { struct i2c_algo_pcf_data *adap = i2c_adap->algo_data; diff -Nru a/drivers/i2c/algos/i2c-algo-sgi.c b/drivers/i2c/algos/i2c-algo-sgi.c --- a/drivers/i2c/algos/i2c-algo-sgi.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/algos/i2c-algo-sgi.c 2005-03-07 14:54:16 -08:00 @@ -131,7 +131,7 @@ return 0; } -static int sgi_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[], +static int sgi_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num) { struct i2c_algo_sgi_data *adap = i2c_adap->algo_data; diff -Nru a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig --- a/drivers/i2c/busses/Kconfig 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/busses/Kconfig 2005-03-07 14:54:18 -08:00 @@ -287,7 +287,7 @@ config I2C_PIIX4 tristate "Intel PIIX4" - depends on I2C && PCI && EXPERIMENTAL && !64BIT + depends on I2C && PCI && EXPERIMENTAL help If you say yes to this option, support will be included for the Intel PIIX4 family of mainboard I2C interfaces. Specifically, the following @@ -485,5 +485,15 @@ This driver can also be built as a module. If so, the module will be called i2c-pca-isa. + +config I2C_MV64XXX + tristate "Marvell mv64xxx I2C Controller" + depends on I2C && MV64X60 && EXPERIMENTAL + help + If you say yes to this option, support will be included for the + built-in I2C interface on the Marvell 64xxx line of host bridges. + + This driver can also be built as a module. If so, the module + will be called i2c-mv64xxx. endmenu diff -Nru a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile --- a/drivers/i2c/busses/Makefile 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/busses/Makefile 2005-03-07 14:54:18 -08:00 @@ -21,6 +21,7 @@ obj-$(CONFIG_I2C_IXP4XX) += i2c-ixp4xx.o obj-$(CONFIG_I2C_KEYWEST) += i2c-keywest.o obj-$(CONFIG_I2C_MPC) += i2c-mpc.o +obj-$(CONFIG_I2C_MV64XXX) += i2c-mv64xxx.o obj-$(CONFIG_I2C_NFORCE2) += i2c-nforce2.o obj-$(CONFIG_I2C_PARPORT) += i2c-parport.o obj-$(CONFIG_I2C_PARPORT_LIGHT) += i2c-parport-light.o diff -Nru a/drivers/i2c/busses/i2c-au1550.c b/drivers/i2c/busses/i2c-au1550.c --- a/drivers/i2c/busses/i2c-au1550.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/busses/i2c-au1550.c 2005-03-07 14:54:18 -08:00 @@ -253,7 +253,7 @@ } static int -au1550_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[], int num) +au1550_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num) { struct i2c_au1550_data *adap = i2c_adap->algo_data; struct i2c_msg *p; diff -Nru a/drivers/i2c/busses/i2c-elektor.c b/drivers/i2c/busses/i2c-elektor.c --- a/drivers/i2c/busses/i2c-elektor.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/busses/i2c-elektor.c 2005-03-07 14:54:16 -08:00 @@ -183,6 +183,7 @@ static struct i2c_adapter pcf_isa_ops = { .owner = THIS_MODULE, + .class = I2C_CLASS_HWMON, .id = I2C_HW_P_ELEK, .algo_data = &pcf_isa_data, .name = "PCF8584 ISA adapter", diff -Nru a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c --- a/drivers/i2c/busses/i2c-ibm_iic.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/busses/i2c-ibm_iic.c 2005-03-07 14:54:17 -08:00 @@ -549,7 +549,7 @@ * Generic master transfer entrypoint. * Returns the number of processed messages or error (<0) */ -static int iic_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) +static int iic_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) { struct ibm_iic_private* dev = (struct ibm_iic_private*)(i2c_get_adapdata(adap)); volatile struct iic_regs __iomem *iic = dev->vaddr; diff -Nru a/drivers/i2c/busses/i2c-iop3xx.c b/drivers/i2c/busses/i2c-iop3xx.c --- a/drivers/i2c/busses/i2c-iop3xx.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/busses/i2c-iop3xx.c 2005-03-07 14:54:17 -08:00 @@ -361,7 +361,7 @@ * master_xfer() - main read/write entry */ static int -iop3xx_i2c_master_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[], +iop3xx_i2c_master_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num) { struct i2c_algo_iop3xx_data *iop3xx_adap = i2c_adap->algo_data; diff -Nru a/drivers/i2c/busses/i2c-ixp4xx.c b/drivers/i2c/busses/i2c-ixp4xx.c --- a/drivers/i2c/busses/i2c-ixp4xx.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/busses/i2c-ixp4xx.c 2005-03-07 14:54:17 -08:00 @@ -133,8 +133,8 @@ drv_data->algo_data.mdelay = 10; drv_data->algo_data.timeout = 100; - drv_data->adapter.id = I2C_HW_B_IXP4XX, - drv_data->adapter.algo_data = &drv_data->algo_data, + drv_data->adapter.id = I2C_HW_B_IXP4XX; + drv_data->adapter.algo_data = &drv_data->algo_data; drv_data->adapter.dev.parent = &plat_dev->dev; diff -Nru a/drivers/i2c/busses/i2c-keywest.c b/drivers/i2c/busses/i2c-keywest.c --- a/drivers/i2c/busses/i2c-keywest.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/busses/i2c-keywest.c 2005-03-07 14:54:17 -08:00 @@ -399,7 +399,7 @@ */ static int keywest_xfer( struct i2c_adapter *adap, - struct i2c_msg msgs[], + struct i2c_msg *msgs, int num) { struct keywest_chan* chan = i2c_get_adapdata(adap); diff -Nru a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c --- a/drivers/i2c/busses/i2c-mpc.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/busses/i2c-mpc.c 2005-03-07 14:54:17 -08:00 @@ -233,7 +233,7 @@ return length; } -static int mpc_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) +static int mpc_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) { struct i2c_msg *pmsg; int i; diff -Nru a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/i2c/busses/i2c-mv64xxx.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,596 @@ +/* + * drivers/i2c/busses/i2c-mv64xxx.c + * + * Driver for the i2c controller on the Marvell line of host bridges for MIPS + * and PPC (e.g, gt642[46]0, mv643[46]0, mv644[46]0). + * + * Author: Mark A. Greer + * + * 2005 (c) MontaVista, Software, Inc. This file is licensed under + * the terms of the GNU General Public License version 2. This program + * is licensed "as is" without any warranty of any kind, whether express + * or implied. + */ +#include +#include +#include +#include +#include +#include +#include + +/* Register defines */ +#define MV64XXX_I2C_REG_SLAVE_ADDR 0x00 +#define MV64XXX_I2C_REG_DATA 0x04 +#define MV64XXX_I2C_REG_CONTROL 0x08 +#define MV64XXX_I2C_REG_STATUS 0x0c +#define MV64XXX_I2C_REG_BAUD 0x0c +#define MV64XXX_I2C_REG_EXT_SLAVE_ADDR 0x10 +#define MV64XXX_I2C_REG_SOFT_RESET 0x1c + +#define MV64XXX_I2C_REG_CONTROL_ACK 0x00000004 +#define MV64XXX_I2C_REG_CONTROL_IFLG 0x00000008 +#define MV64XXX_I2C_REG_CONTROL_STOP 0x00000010 +#define MV64XXX_I2C_REG_CONTROL_START 0x00000020 +#define MV64XXX_I2C_REG_CONTROL_TWSIEN 0x00000040 +#define MV64XXX_I2C_REG_CONTROL_INTEN 0x00000080 + +/* Ctlr status values */ +#define MV64XXX_I2C_STATUS_BUS_ERR 0x00 +#define MV64XXX_I2C_STATUS_MAST_START 0x08 +#define MV64XXX_I2C_STATUS_MAST_REPEAT_START 0x10 +#define MV64XXX_I2C_STATUS_MAST_WR_ADDR_ACK 0x18 +#define MV64XXX_I2C_STATUS_MAST_WR_ADDR_NO_ACK 0x20 +#define MV64XXX_I2C_STATUS_MAST_WR_ACK 0x28 +#define MV64XXX_I2C_STATUS_MAST_WR_NO_ACK 0x30 +#define MV64XXX_I2C_STATUS_MAST_LOST_ARB 0x38 +#define MV64XXX_I2C_STATUS_MAST_RD_ADDR_ACK 0x40 +#define MV64XXX_I2C_STATUS_MAST_RD_ADDR_NO_ACK 0x48 +#define MV64XXX_I2C_STATUS_MAST_RD_DATA_ACK 0x50 +#define MV64XXX_I2C_STATUS_MAST_RD_DATA_NO_ACK 0x58 +#define MV64XXX_I2C_STATUS_MAST_WR_ADDR_2_ACK 0xd0 +#define MV64XXX_I2C_STATUS_MAST_WR_ADDR_2_NO_ACK 0xd8 +#define MV64XXX_I2C_STATUS_MAST_RD_ADDR_2_ACK 0xe0 +#define MV64XXX_I2C_STATUS_MAST_RD_ADDR_2_NO_ACK 0xe8 +#define MV64XXX_I2C_STATUS_NO_STATUS 0xf8 + +/* Driver states */ +enum { + MV64XXX_I2C_STATE_INVALID, + MV64XXX_I2C_STATE_IDLE, + MV64XXX_I2C_STATE_WAITING_FOR_START_COND, + MV64XXX_I2C_STATE_WAITING_FOR_ADDR_1_ACK, + MV64XXX_I2C_STATE_WAITING_FOR_ADDR_2_ACK, + MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_ACK, + MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_DATA, + MV64XXX_I2C_STATE_ABORTING, +}; + +/* Driver actions */ +enum { + MV64XXX_I2C_ACTION_INVALID, + MV64XXX_I2C_ACTION_CONTINUE, + MV64XXX_I2C_ACTION_SEND_START, + MV64XXX_I2C_ACTION_SEND_ADDR_1, + MV64XXX_I2C_ACTION_SEND_ADDR_2, + MV64XXX_I2C_ACTION_SEND_DATA, + MV64XXX_I2C_ACTION_RCV_DATA, + MV64XXX_I2C_ACTION_RCV_DATA_STOP, + MV64XXX_I2C_ACTION_SEND_STOP, +}; + +struct mv64xxx_i2c_data { + int irq; + u32 state; + u32 action; + u32 cntl_bits; + void __iomem *reg_base; + u32 reg_base_p; + u32 addr1; + u32 addr2; + u32 bytes_left; + u32 byte_posn; + u32 block; + int rc; + u32 freq_m; + u32 freq_n; + wait_queue_head_t waitq; + spinlock_t lock; + struct i2c_msg *msg; + struct i2c_adapter adapter; +}; + +/* + ***************************************************************************** + * + * Finite State Machine & Interrupt Routines + * + ***************************************************************************** + */ +static void +mv64xxx_i2c_fsm(struct mv64xxx_i2c_data *drv_data, u32 status) +{ + /* + * If state is idle, then this is likely the remnants of an old + * operation that driver has given up on or the user has killed. + * If so, issue the stop condition and go to idle. + */ + if (drv_data->state == MV64XXX_I2C_STATE_IDLE) { + drv_data->action = MV64XXX_I2C_ACTION_SEND_STOP; + return; + } + + if (drv_data->state == MV64XXX_I2C_STATE_ABORTING) { + drv_data->action = MV64XXX_I2C_ACTION_SEND_STOP; + drv_data->state = MV64XXX_I2C_STATE_IDLE; + return; + } + + /* The status from the ctlr [mostly] tells us what to do next */ + switch (status) { + /* Start condition interrupt */ + case MV64XXX_I2C_STATUS_MAST_START: /* 0x08 */ + case MV64XXX_I2C_STATUS_MAST_REPEAT_START: /* 0x10 */ + drv_data->action = MV64XXX_I2C_ACTION_SEND_ADDR_1; + drv_data->state = MV64XXX_I2C_STATE_WAITING_FOR_ADDR_1_ACK; + break; + + /* Performing a write */ + case MV64XXX_I2C_STATUS_MAST_WR_ADDR_ACK: /* 0x18 */ + if (drv_data->msg->flags & I2C_M_TEN) { + drv_data->action = MV64XXX_I2C_ACTION_SEND_ADDR_2; + drv_data->state = + MV64XXX_I2C_STATE_WAITING_FOR_ADDR_2_ACK; + break; + } + /* FALLTHRU */ + case MV64XXX_I2C_STATUS_MAST_WR_ADDR_2_ACK: /* 0xd0 */ + case MV64XXX_I2C_STATUS_MAST_WR_ACK: /* 0x28 */ + if (drv_data->bytes_left > 0) { + drv_data->action = MV64XXX_I2C_ACTION_SEND_DATA; + drv_data->state = + MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_ACK; + drv_data->bytes_left--; + } else { + drv_data->action = MV64XXX_I2C_ACTION_SEND_STOP; + drv_data->state = MV64XXX_I2C_STATE_IDLE; + } + break; + + /* Performing a read */ + case MV64XXX_I2C_STATUS_MAST_RD_ADDR_ACK: /* 40 */ + if (drv_data->msg->flags & I2C_M_TEN) { + drv_data->action = MV64XXX_I2C_ACTION_SEND_ADDR_2; + drv_data->state = + MV64XXX_I2C_STATE_WAITING_FOR_ADDR_2_ACK; + break; + } + /* FALLTHRU */ + case MV64XXX_I2C_STATUS_MAST_RD_ADDR_2_ACK: /* 0xe0 */ + if (drv_data->bytes_left == 0) { + drv_data->action = MV64XXX_I2C_ACTION_SEND_STOP; + drv_data->state = MV64XXX_I2C_STATE_IDLE; + break; + } + /* FALLTHRU */ + case MV64XXX_I2C_STATUS_MAST_RD_DATA_ACK: /* 0x50 */ + if (status != MV64XXX_I2C_STATUS_MAST_RD_DATA_ACK) + drv_data->action = MV64XXX_I2C_ACTION_CONTINUE; + else { + drv_data->action = MV64XXX_I2C_ACTION_RCV_DATA; + drv_data->bytes_left--; + } + drv_data->state = MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_DATA; + + if (drv_data->bytes_left == 1) + drv_data->cntl_bits &= ~MV64XXX_I2C_REG_CONTROL_ACK; + break; + + case MV64XXX_I2C_STATUS_MAST_RD_DATA_NO_ACK: /* 0x58 */ + drv_data->action = MV64XXX_I2C_ACTION_RCV_DATA_STOP; + drv_data->state = MV64XXX_I2C_STATE_IDLE; + break; + + case MV64XXX_I2C_STATUS_MAST_WR_ADDR_NO_ACK: /* 0x20 */ + case MV64XXX_I2C_STATUS_MAST_WR_NO_ACK: /* 30 */ + case MV64XXX_I2C_STATUS_MAST_RD_ADDR_NO_ACK: /* 48 */ + /* Doesn't seem to be a device at other end */ + drv_data->action = MV64XXX_I2C_ACTION_SEND_STOP; + drv_data->state = MV64XXX_I2C_STATE_IDLE; + drv_data->rc = -ENODEV; + break; + + default: + dev_err(&drv_data->adapter.dev, + "mv64xxx_i2c_fsm: Ctlr Error -- state: 0x%x, " + "status: 0x%x, addr: 0x%x, flags: 0x%x\n", + drv_data->state, status, drv_data->msg->addr, + drv_data->msg->flags); + drv_data->action = MV64XXX_I2C_ACTION_SEND_STOP; + drv_data->state = MV64XXX_I2C_STATE_IDLE; + drv_data->rc = -EIO; + } +} + +static void +mv64xxx_i2c_do_action(struct mv64xxx_i2c_data *drv_data) +{ + switch(drv_data->action) { + case MV64XXX_I2C_ACTION_CONTINUE: + writel(drv_data->cntl_bits, + drv_data->reg_base + MV64XXX_I2C_REG_CONTROL); + break; + + case MV64XXX_I2C_ACTION_SEND_START: + writel(drv_data->cntl_bits | MV64XXX_I2C_REG_CONTROL_START, + drv_data->reg_base + MV64XXX_I2C_REG_CONTROL); + break; + + case MV64XXX_I2C_ACTION_SEND_ADDR_1: + writel(drv_data->addr1, + drv_data->reg_base + MV64XXX_I2C_REG_DATA); + writel(drv_data->cntl_bits, + drv_data->reg_base + MV64XXX_I2C_REG_CONTROL); + break; + + case MV64XXX_I2C_ACTION_SEND_ADDR_2: + writel(drv_data->addr2, + drv_data->reg_base + MV64XXX_I2C_REG_DATA); + writel(drv_data->cntl_bits, + drv_data->reg_base + MV64XXX_I2C_REG_CONTROL); + break; + + case MV64XXX_I2C_ACTION_SEND_DATA: + writel(drv_data->msg->buf[drv_data->byte_posn++], + drv_data->reg_base + MV64XXX_I2C_REG_DATA); + writel(drv_data->cntl_bits, + drv_data->reg_base + MV64XXX_I2C_REG_CONTROL); + break; + + case MV64XXX_I2C_ACTION_RCV_DATA: + drv_data->msg->buf[drv_data->byte_posn++] = + readl(drv_data->reg_base + MV64XXX_I2C_REG_DATA); + writel(drv_data->cntl_bits, + drv_data->reg_base + MV64XXX_I2C_REG_CONTROL); + break; + + case MV64XXX_I2C_ACTION_RCV_DATA_STOP: + drv_data->msg->buf[drv_data->byte_posn++] = + readl(drv_data->reg_base + MV64XXX_I2C_REG_DATA); + drv_data->cntl_bits &= ~MV64XXX_I2C_REG_CONTROL_INTEN; + writel(drv_data->cntl_bits | MV64XXX_I2C_REG_CONTROL_STOP, + drv_data->reg_base + MV64XXX_I2C_REG_CONTROL); + drv_data->block = 0; + wake_up_interruptible(&drv_data->waitq); + break; + + case MV64XXX_I2C_ACTION_INVALID: + default: + dev_err(&drv_data->adapter.dev, + "mv64xxx_i2c_do_action: Invalid action: %d\n", + drv_data->action); + drv_data->rc = -EIO; + /* FALLTHRU */ + case MV64XXX_I2C_ACTION_SEND_STOP: + drv_data->cntl_bits &= ~MV64XXX_I2C_REG_CONTROL_INTEN; + writel(drv_data->cntl_bits | MV64XXX_I2C_REG_CONTROL_STOP, + drv_data->reg_base + MV64XXX_I2C_REG_CONTROL); + drv_data->block = 0; + wake_up_interruptible(&drv_data->waitq); + break; + } +} + +static int +mv64xxx_i2c_intr(int irq, void *dev_id, struct pt_regs *regs) +{ + struct mv64xxx_i2c_data *drv_data = dev_id; + unsigned long flags; + u32 status; + int rc = IRQ_NONE; + + spin_lock_irqsave(&drv_data->lock, flags); + while (readl(drv_data->reg_base + MV64XXX_I2C_REG_CONTROL) & + MV64XXX_I2C_REG_CONTROL_IFLG) { + status = readl(drv_data->reg_base + MV64XXX_I2C_REG_STATUS); + mv64xxx_i2c_fsm(drv_data, status); + mv64xxx_i2c_do_action(drv_data); + rc = IRQ_HANDLED; + } + spin_unlock_irqrestore(&drv_data->lock, flags); + + return rc; +} + +/* + ***************************************************************************** + * + * I2C Msg Execution Routines + * + ***************************************************************************** + */ +static void +mv64xxx_i2c_prepare_for_io(struct mv64xxx_i2c_data *drv_data, + struct i2c_msg *msg) +{ + u32 dir = 0; + + drv_data->msg = msg; + drv_data->byte_posn = 0; + drv_data->bytes_left = msg->len; + drv_data->rc = 0; + drv_data->cntl_bits = MV64XXX_I2C_REG_CONTROL_ACK | + MV64XXX_I2C_REG_CONTROL_INTEN | MV64XXX_I2C_REG_CONTROL_TWSIEN; + + if (msg->flags & I2C_M_RD) + dir = 1; + + if (msg->flags & I2C_M_REV_DIR_ADDR) + dir ^= 1; + + if (msg->flags & I2C_M_TEN) { + drv_data->addr1 = 0xf0 | (((u32)msg->addr & 0x300) >> 7) | dir; + drv_data->addr2 = (u32)msg->addr & 0xff; + } else { + drv_data->addr1 = ((u32)msg->addr & 0x7f) << 1 | dir; + drv_data->addr2 = 0; + } +} + +static void +mv64xxx_i2c_wait_for_completion(struct mv64xxx_i2c_data *drv_data) +{ + long time_left; + unsigned long flags; + char abort = 0; + + time_left = wait_event_interruptible_timeout(drv_data->waitq, + !drv_data->block, msecs_to_jiffies(drv_data->adapter.timeout)); + + spin_lock_irqsave(&drv_data->lock, flags); + if (!time_left) { /* Timed out */ + drv_data->rc = -ETIMEDOUT; + abort = 1; + } else if (time_left < 0) { /* Interrupted/Error */ + drv_data->rc = time_left; /* errno value */ + abort = 1; + } + + if (abort && drv_data->block) { + drv_data->state = MV64XXX_I2C_STATE_ABORTING; + spin_unlock_irqrestore(&drv_data->lock, flags); + + time_left = wait_event_timeout(drv_data->waitq, + !drv_data->block, + msecs_to_jiffies(drv_data->adapter.timeout)); + + if (time_left <= 0) { + drv_data->state = MV64XXX_I2C_STATE_IDLE; + dev_err(&drv_data->adapter.dev, + "mv64xxx: I2C bus locked\n"); + } + } else + spin_unlock_irqrestore(&drv_data->lock, flags); +} + +static int +mv64xxx_i2c_execute_msg(struct mv64xxx_i2c_data *drv_data, struct i2c_msg *msg) +{ + unsigned long flags; + + spin_lock_irqsave(&drv_data->lock, flags); + mv64xxx_i2c_prepare_for_io(drv_data, msg); + + if (unlikely(msg->flags & I2C_M_NOSTART)) { /* Skip start/addr phases */ + if (drv_data->msg->flags & I2C_M_RD) { + /* No action to do, wait for slave to send a byte */ + drv_data->action = MV64XXX_I2C_ACTION_CONTINUE; + drv_data->state = + MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_DATA; + } else { + drv_data->action = MV64XXX_I2C_ACTION_SEND_DATA; + drv_data->state = + MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_ACK; + drv_data->bytes_left--; + } + } else { + drv_data->action = MV64XXX_I2C_ACTION_SEND_START; + drv_data->state = MV64XXX_I2C_STATE_WAITING_FOR_START_COND; + } + + drv_data->block = 1; + mv64xxx_i2c_do_action(drv_data); + spin_unlock_irqrestore(&drv_data->lock, flags); + + mv64xxx_i2c_wait_for_completion(drv_data); + return drv_data->rc; +} + +/* + ***************************************************************************** + * + * I2C Core Support Routines (Interface to higher level I2C code) + * + ***************************************************************************** + */ +static u32 +mv64xxx_i2c_functionality(struct i2c_adapter *adap) +{ + return I2C_FUNC_I2C | I2C_FUNC_10BIT_ADDR | I2C_FUNC_SMBUS_EMUL; +} + +static int +mv64xxx_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) +{ + struct mv64xxx_i2c_data *drv_data = i2c_get_adapdata(adap); + int i, rc = 0; + + for (i=0; ireg_base + MV64XXX_I2C_REG_SOFT_RESET); + writel((((drv_data->freq_m & 0xf) << 3) | (drv_data->freq_n & 0x7)), + drv_data->reg_base + MV64XXX_I2C_REG_BAUD); + writel(0, drv_data->reg_base + MV64XXX_I2C_REG_SLAVE_ADDR); + writel(0, drv_data->reg_base + MV64XXX_I2C_REG_EXT_SLAVE_ADDR); + writel(MV64XXX_I2C_REG_CONTROL_TWSIEN | MV64XXX_I2C_REG_CONTROL_STOP, + drv_data->reg_base + MV64XXX_I2C_REG_CONTROL); + drv_data->state = MV64XXX_I2C_STATE_IDLE; +} + +static int __devinit +mv64xxx_i2c_map_regs(struct platform_device *pd, + struct mv64xxx_i2c_data *drv_data) +{ + struct resource *r; + + if ((r = platform_get_resource(pd, IORESOURCE_MEM, 0)) && + request_mem_region(r->start, MV64XXX_I2C_REG_BLOCK_SIZE, + drv_data->adapter.name)) { + + drv_data->reg_base = ioremap(r->start, + MV64XXX_I2C_REG_BLOCK_SIZE); + drv_data->reg_base_p = r->start; + } else + return -ENOMEM; + + return 0; +} + +static void __devexit +mv64xxx_i2c_unmap_regs(struct mv64xxx_i2c_data *drv_data) +{ + if (drv_data->reg_base) { + iounmap(drv_data->reg_base); + release_mem_region(drv_data->reg_base_p, + MV64XXX_I2C_REG_BLOCK_SIZE); + } + + drv_data->reg_base = NULL; + drv_data->reg_base_p = 0; +} + +static int __devinit +mv64xxx_i2c_probe(struct device *dev) +{ + struct platform_device *pd = to_platform_device(dev); + struct mv64xxx_i2c_data *drv_data; + struct mv64xxx_i2c_pdata *pdata = dev->platform_data; + int rc; + + if ((pd->id != 0) || !pdata) + return -ENODEV; + + drv_data = kmalloc(sizeof(struct mv64xxx_i2c_data), GFP_KERNEL); + + if (!drv_data) + return -ENOMEM; + + memset(drv_data, 0, sizeof(struct mv64xxx_i2c_data)); + + if (mv64xxx_i2c_map_regs(pd, drv_data)) { + rc = -ENODEV; + goto exit_kfree; + } + + strncpy(drv_data->adapter.name, MV64XXX_I2C_CTLR_NAME " adapter", + I2C_NAME_SIZE); + + init_waitqueue_head(&drv_data->waitq); + spin_lock_init(&drv_data->lock); + + drv_data->freq_m = pdata->freq_m; + drv_data->freq_n = pdata->freq_n; + drv_data->irq = platform_get_irq(pd, 0); + drv_data->adapter.id = I2C_ALGO_MV64XXX | I2C_HW_MV64XXX; + drv_data->adapter.algo = &mv64xxx_i2c_algo; + drv_data->adapter.timeout = pdata->timeout; + drv_data->adapter.retries = pdata->retries; + dev_set_drvdata(dev, drv_data); + i2c_set_adapdata(&drv_data->adapter, drv_data); + + if (request_irq(drv_data->irq, mv64xxx_i2c_intr, 0, + MV64XXX_I2C_CTLR_NAME, drv_data)) { + + dev_err(dev, "mv64xxx: Can't register intr handler " + "irq: %d\n", drv_data->irq); + rc = -EINVAL; + goto exit_unmap_regs; + } else if ((rc = i2c_add_adapter(&drv_data->adapter)) != 0) { + dev_err(dev, "mv64xxx: Can't add i2c adapter, rc: %d\n", -rc); + goto exit_free_irq; + } + + mv64xxx_i2c_hw_init(drv_data); + + return 0; + + exit_free_irq: + free_irq(drv_data->irq, drv_data); + exit_unmap_regs: + mv64xxx_i2c_unmap_regs(drv_data); + exit_kfree: + kfree(drv_data); + return rc; +} + +static int __devexit +mv64xxx_i2c_remove(struct device *dev) +{ + struct mv64xxx_i2c_data *drv_data = dev_get_drvdata(dev); + int rc; + + rc = i2c_del_adapter(&drv_data->adapter); + free_irq(drv_data->irq, drv_data); + mv64xxx_i2c_unmap_regs(drv_data); + kfree(drv_data); + + return rc; +} + +static struct device_driver mv64xxx_i2c_driver = { + .name = MV64XXX_I2C_CTLR_NAME, + .bus = &platform_bus_type, + .probe = mv64xxx_i2c_probe, + .remove = mv64xxx_i2c_remove, +}; + +static int __init +mv64xxx_i2c_init(void) +{ + return driver_register(&mv64xxx_i2c_driver); +} + +static void __exit +mv64xxx_i2c_exit(void) +{ + driver_unregister(&mv64xxx_i2c_driver); +} + +module_init(mv64xxx_i2c_init); +module_exit(mv64xxx_i2c_exit); + +MODULE_AUTHOR("Mark A. Greer "); +MODULE_DESCRIPTION("Marvell mv64xxx host bridge i2c ctlr driver"); +MODULE_LICENSE("GPL"); diff -Nru a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c --- a/drivers/i2c/busses/i2c-nforce2.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/busses/i2c-nforce2.c 2005-03-07 14:54:16 -08:00 @@ -29,9 +29,10 @@ nForce2 Ultra 400 MCP 0084 nForce3 Pro150 MCP 00D4 nForce3 250Gb MCP 00E4 + nForce4 MCP 0052 - This driver supports the 2 SMBuses that are included in the MCP2 of the - nForce2 chipset. + This driver supports the 2 SMBuses that are included in the MCP of the + nForce2/3/4 chipsets. */ /* Note: we assume there can only be one nForce2, with two SMBus interfaces */ @@ -295,6 +296,7 @@ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2S_SMBUS) }, { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS) }, { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_SMBUS) }, + { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE4_SMBUS) }, { 0 } }; diff -Nru a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c --- a/drivers/i2c/busses/i2c-s3c2410.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/busses/i2c-s3c2410.c 2005-03-07 14:54:16 -08:00 @@ -483,7 +483,7 @@ * this starts an i2c transfer */ -static int s3c24xx_i2c_doxfer(struct s3c24xx_i2c *i2c, struct i2c_msg msgs[], int num) +static int s3c24xx_i2c_doxfer(struct s3c24xx_i2c *i2c, struct i2c_msg *msgs, int num) { unsigned long timeout; int ret; @@ -534,7 +534,7 @@ */ static int s3c24xx_i2c_xfer(struct i2c_adapter *adap, - struct i2c_msg msgs[], int num) + struct i2c_msg *msgs, int num) { struct s3c24xx_i2c *i2c = (struct s3c24xx_i2c *)adap->algo_data; int retry; @@ -569,6 +569,7 @@ .name = "s3c2410-i2c", .algo = &s3c24xx_i2c_algorithm, .retries = 2, + .class = I2C_CLASS_HWMON, }, }; diff -Nru a/drivers/i2c/chips/Kconfig b/drivers/i2c/chips/Kconfig --- a/drivers/i2c/chips/Kconfig 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/chips/Kconfig 2005-03-07 14:54:17 -08:00 @@ -63,7 +63,7 @@ will be called asb100. config SENSORS_DS1621 - tristate "Dallas Semiconductor DS1621 and DS1625" + tristate "Dallas Semiconductor DS1621 and DS1625" depends on I2C && EXPERIMENTAL select I2C_SENSOR help @@ -84,6 +84,17 @@ This driver can also be built as a module. If so, the module will be called fscher. +config SENSORS_FSCPOS + tristate "FSC Poseidon" + depends on I2C && EXPERIMENTAL + select I2C_SENSOR + help + If you say yes here you get support for Fujitsu Siemens + Computers Poseidon sensor chips. + + This driver can also be built as a module. If so, the module + will be called fscpos. + config SENSORS_GL518SM tristate "Genesys Logic GL518SM" depends on I2C && EXPERIMENTAL @@ -95,6 +106,17 @@ This driver can also be built as a module. If so, the module will be called gl518sm. +config SENSORS_GL520SM + tristate "Genesys Logic GL520SM" + depends on I2C && EXPERIMENTAL + select I2C_SENSOR + help + If you say yes here you get support for Genesys Logic GL520SM + sensor chips. + + This driver can also be built as a module. If so, the module + will be called gl520sm. + config SENSORS_IT87 tristate "ITE IT87xx and compatibles" depends on I2C && EXPERIMENTAL @@ -251,6 +273,18 @@ This driver can also be built as a module. If so, the module will be called smsc47b397. +config SENSORS_SIS5595 + tristate "Silicon Integrated Systems Corp. SiS5595" + depends on I2C && PCI && EXPERIMENTAL + select I2C_SENSOR + select I2C_ISA + help + If you say yes here you get support for the integrated sensors in + SiS5595 South Bridges. + + This driver can also be built as a module. If so, the module + will be called sis5595. + config SENSORS_SMSC47M1 tristate "SMSC LPC47M10x and compatibles" depends on I2C && EXPERIMENTAL @@ -304,6 +338,7 @@ tristate "Winbond W83627HF, W83627THF, W83637HF, W83697HF" depends on I2C && EXPERIMENTAL select I2C_SENSOR + select I2C_ISA help If you say yes here you get support for the Winbond W836X7 series of sensor chips: the W83627HF, W83627THF, W83637HF, and the W83697HF @@ -370,5 +405,14 @@ This driver can also be built as a module. If so, the module will be called isp1301_omap. + +config SENSORS_M41T00 + tristate "ST M41T00 RTC chip" + depends on I2C && PPC32 + help + If you say yes here you get support for the ST M41T00 RTC chip. + + This driver can also be built as a module. If so, the module + will be called m41t00. endmenu diff -Nru a/drivers/i2c/chips/Makefile b/drivers/i2c/chips/Makefile --- a/drivers/i2c/chips/Makefile 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/chips/Makefile 2005-03-07 14:54:18 -08:00 @@ -14,7 +14,9 @@ obj-$(CONFIG_SENSORS_DS1621) += ds1621.o obj-$(CONFIG_SENSORS_EEPROM) += eeprom.o obj-$(CONFIG_SENSORS_FSCHER) += fscher.o +obj-$(CONFIG_SENSORS_FSCPOS) += fscpos.o obj-$(CONFIG_SENSORS_GL518SM) += gl518sm.o +obj-$(CONFIG_SENSORS_GL520SM) += gl520sm.o obj-$(CONFIG_SENSORS_IT87) += it87.o obj-$(CONFIG_SENSORS_LM63) += lm63.o obj-$(CONFIG_SENSORS_LM75) += lm75.o @@ -26,10 +28,12 @@ obj-$(CONFIG_SENSORS_LM87) += lm87.o obj-$(CONFIG_SENSORS_LM90) += lm90.o obj-$(CONFIG_SENSORS_MAX1619) += max1619.o +obj-$(CONFIG_SENSORS_M41T00) += m41t00.o obj-$(CONFIG_SENSORS_PC87360) += pc87360.o obj-$(CONFIG_SENSORS_PCF8574) += pcf8574.o obj-$(CONFIG_SENSORS_PCF8591) += pcf8591.o obj-$(CONFIG_SENSORS_RTC8564) += rtc8564.o +obj-$(CONFIG_SENSORS_SIS5595) += sis5595.o obj-$(CONFIG_SENSORS_SMSC47B397)+= smsc47b397.o obj-$(CONFIG_SENSORS_SMSC47M1) += smsc47m1.o obj-$(CONFIG_SENSORS_VIA686A) += via686a.o diff -Nru a/drivers/i2c/chips/adm1021.c b/drivers/i2c/chips/adm1021.c --- a/drivers/i2c/chips/adm1021.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/chips/adm1021.c 2005-03-07 14:54:16 -08:00 @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -147,8 +148,6 @@ .detach_client = adm1021_detach_client, }; -static int adm1021_id; - #define show(value) \ static ssize_t show_##value(struct device *dev, char *buf) \ { \ @@ -299,8 +298,6 @@ /* Fill in the remaining client fields and put it into the global list */ strlcpy(new_client->name, type_name, I2C_NAME_SIZE); data->type = kind; - - new_client->id = adm1021_id++; data->valid = 0; init_MUTEX(&data->update_lock); @@ -373,8 +370,8 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ + HZ / 2) || - (jiffies < data->last_updated) || !data->valid) { + if (time_after(jiffies, data->last_updated + HZ + HZ / 2) + || !data->valid) { dev_dbg(&client->dev, "Starting adm1021 update\n"); data->temp_input = adm1021_read_value(client, ADM1021_REG_TEMP); diff -Nru a/drivers/i2c/chips/adm1025.c b/drivers/i2c/chips/adm1025.c --- a/drivers/i2c/chips/adm1025.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/chips/adm1025.c 2005-03-07 14:54:16 -08:00 @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -148,12 +149,6 @@ }; /* - * Internal variables - */ - -static int adm1025_id; - -/* * Sysfs stuff */ @@ -397,7 +392,6 @@ /* We can fill in the remaining client fields */ strlcpy(new_client->name, name, I2C_NAME_SIZE); - new_client->id = adm1025_id++; data->valid = 0; init_MUTEX(&data->update_lock); @@ -512,9 +506,7 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ * 2) || - (jiffies < data->last_updated) || - !data->valid) { + if (time_after(jiffies, data->last_updated + HZ * 2) || !data->valid) { int i; dev_dbg(&client->dev, "Updating data.\n"); diff -Nru a/drivers/i2c/chips/adm1026.c b/drivers/i2c/chips/adm1026.c --- a/drivers/i2c/chips/adm1026.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/chips/adm1026.c 2005-03-07 14:54:16 -08:00 @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -313,8 +314,6 @@ .detach_client = adm1026_detach_client, }; -static int adm1026_id; - int adm1026_attach_adapter(struct i2c_adapter *adapter) { if (!(adapter->class & I2C_CLASS_HWMON)) { @@ -363,49 +362,47 @@ int value, i; struct adm1026_data *data = i2c_get_clientdata(client); - dev_dbg(&client->dev,"(%d): Initializing device\n", client->id); + dev_dbg(&client->dev, "Initializing device\n"); /* Read chip config */ data->config1 = adm1026_read_value(client, ADM1026_REG_CONFIG1); data->config2 = adm1026_read_value(client, ADM1026_REG_CONFIG2); data->config3 = adm1026_read_value(client, ADM1026_REG_CONFIG3); /* Inform user of chip config */ - dev_dbg(&client->dev, "(%d): ADM1026_REG_CONFIG1 is: 0x%02x\n", - client->id, data->config1); + dev_dbg(&client->dev, "ADM1026_REG_CONFIG1 is: 0x%02x\n", + data->config1); if ((data->config1 & CFG1_MONITOR) == 0) { - dev_dbg(&client->dev, "(%d): Monitoring not currently " - "enabled.\n", client->id); + dev_dbg(&client->dev, "Monitoring not currently " + "enabled.\n"); } if (data->config1 & CFG1_INT_ENABLE) { - dev_dbg(&client->dev, "(%d): SMBALERT interrupts are " - "enabled.\n", client->id); + dev_dbg(&client->dev, "SMBALERT interrupts are " + "enabled.\n"); } if (data->config1 & CFG1_AIN8_9) { - dev_dbg(&client->dev, "(%d): in8 and in9 enabled. " - "temp3 disabled.\n", client->id); + dev_dbg(&client->dev, "in8 and in9 enabled. " + "temp3 disabled.\n"); } else { - dev_dbg(&client->dev, "(%d): temp3 enabled. in8 and " - "in9 disabled.\n", client->id); + dev_dbg(&client->dev, "temp3 enabled. in8 and " + "in9 disabled.\n"); } if (data->config1 & CFG1_THERM_HOT) { - dev_dbg(&client->dev, "(%d): Automatic THERM, PWM, " - "and temp limits enabled.\n", client->id); + dev_dbg(&client->dev, "Automatic THERM, PWM, " + "and temp limits enabled.\n"); } value = data->config3; if (data->config3 & CFG3_GPIO16_ENABLE) { - dev_dbg(&client->dev, "(%d): GPIO16 enabled. THERM" - "pin disabled.\n", client->id); + dev_dbg(&client->dev, "GPIO16 enabled. THERM" + "pin disabled.\n"); } else { - dev_dbg(&client->dev, "(%d): THERM pin enabled. " - "GPIO16 disabled.\n", client->id); + dev_dbg(&client->dev, "THERM pin enabled. " + "GPIO16 disabled.\n"); } if (data->config3 & CFG3_VREF_250) { - dev_dbg(&client->dev, "(%d): Vref is 2.50 Volts.\n", - client->id); + dev_dbg(&client->dev, "Vref is 2.50 Volts.\n"); } else { - dev_dbg(&client->dev, "(%d): Vref is 1.82 Volts.\n", - client->id); + dev_dbg(&client->dev, "Vref is 1.82 Volts.\n"); } /* Read and pick apart the existing GPIO configuration */ value = 0; @@ -423,12 +420,11 @@ adm1026_print_gpio(client); /* If the user asks us to reprogram the GPIO config, then - * do it now. But only if this is the first ADM1026. + * do it now. */ - if (client->id == 0 - && (gpio_input[0] != -1 || gpio_output[0] != -1 + if (gpio_input[0] != -1 || gpio_output[0] != -1 || gpio_inverted[0] != -1 || gpio_normal[0] != -1 - || gpio_fan[0] != -1)) { + || gpio_fan[0] != -1) { adm1026_fixup_gpio(client); } @@ -448,8 +444,7 @@ value = adm1026_read_value(client, ADM1026_REG_CONFIG1); /* Set MONITOR, clear interrupt acknowledge and s/w reset */ value = (value | CFG1_MONITOR) & (~CFG1_INT_CLEAR & ~CFG1_RESET); - dev_dbg(&client->dev, "(%d): Setting CONFIG to: 0x%02x\n", - client->id, value); + dev_dbg(&client->dev, "Setting CONFIG to: 0x%02x\n", value); data->config1 = value; adm1026_write_value(client, ADM1026_REG_CONFIG1, value); @@ -467,31 +462,30 @@ struct adm1026_data *data = i2c_get_clientdata(client); int i; - dev_dbg(&client->dev, "(%d): GPIO config is:", client->id); + dev_dbg(&client->dev, "GPIO config is:"); for (i = 0;i <= 7;++i) { if (data->config2 & (1 << i)) { - dev_dbg(&client->dev, "\t(%d): %sGP%s%d\n", client->id, + dev_dbg(&client->dev, "\t%sGP%s%d\n", data->gpio_config[i] & 0x02 ? "" : "!", data->gpio_config[i] & 0x01 ? "OUT" : "IN", i); } else { - dev_dbg(&client->dev, "\t(%d): FAN%d\n", - client->id, i); + dev_dbg(&client->dev, "\tFAN%d\n", i); } } for (i = 8;i <= 15;++i) { - dev_dbg(&client->dev, "\t(%d): %sGP%s%d\n", client->id, + dev_dbg(&client->dev, "\t%sGP%s%d\n", data->gpio_config[i] & 0x02 ? "" : "!", data->gpio_config[i] & 0x01 ? "OUT" : "IN", i); } if (data->config3 & CFG3_GPIO16_ENABLE) { - dev_dbg(&client->dev, "\t(%d): %sGP%s16\n", client->id, + dev_dbg(&client->dev, "\t%sGP%s16\n", data->gpio_config[16] & 0x02 ? "" : "!", data->gpio_config[16] & 0x01 ? "OUT" : "IN"); } else { /* GPIO16 is THERM */ - dev_dbg(&client->dev, "\t(%d): THERM\n", client->id); + dev_dbg(&client->dev, "\tTHERM\n"); } } @@ -580,10 +574,9 @@ down(&data->update_lock); if (!data->valid - || (jiffies - data->last_reading > ADM1026_DATA_INTERVAL)) { + || time_after(jiffies, data->last_reading + ADM1026_DATA_INTERVAL)) { /* Things that change quickly */ - dev_dbg(&client->dev,"(%d): Reading sensor values\n", - client->id); + dev_dbg(&client->dev,"Reading sensor values\n"); for (i = 0;i <= 16;++i) { data->in[i] = adm1026_read_value(client, ADM1026_REG_IN[i]); @@ -628,11 +621,10 @@ data->last_reading = jiffies; }; /* last_reading */ - if (!data->valid || (jiffies - data->last_config > - ADM1026_CONFIG_INTERVAL)) { + if (!data->valid || + time_after(jiffies, data->last_config + ADM1026_CONFIG_INTERVAL)) { /* Things that don't change often */ - dev_dbg(&client->dev, "(%d): Reading config values\n", - client->id); + dev_dbg(&client->dev, "Reading config values\n"); for (i = 0;i <= 16;++i) { data->in_min[i] = adm1026_read_value(client, ADM1026_REG_IN_MIN[i]); @@ -712,8 +704,7 @@ data->last_config = jiffies; }; /* last_config */ - dev_dbg(&client->dev, "(%d): Setting VID from GPIO11-15.\n", - client->id); + dev_dbg(&client->dev, "Setting VID from GPIO11-15.\n"); data->vid = (data->gpio >> 11) & 0x1f; data->valid = 1; up(&data->update_lock); @@ -1608,15 +1599,9 @@ strlcpy(new_client->name, type_name, I2C_NAME_SIZE); /* Fill in the remaining client fields */ - new_client->id = adm1026_id++; data->type = kind; data->valid = 0; init_MUTEX(&data->update_lock); - - dev_dbg(&new_client->dev, "(%d): Assigning ID %d to %s at %d,0x%02x\n", - new_client->id, new_client->id, new_client->name, - i2c_adapter_id(new_client->adapter), - new_client->addr); /* Tell the I2C layer a new client has arrived */ if ((err = i2c_attach_client(new_client))) diff -Nru a/drivers/i2c/chips/adm1031.c b/drivers/i2c/chips/adm1031.c --- a/drivers/i2c/chips/adm1031.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/chips/adm1031.c 2005-03-07 14:54:17 -08:00 @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -110,8 +111,6 @@ .detach_client = adm1031_detach_client, }; -static int adm1031_id; - static inline u8 adm1031_read_value(struct i2c_client *client, u8 reg) { return i2c_smbus_read_byte_data(client, reg); @@ -781,8 +780,6 @@ data->chip_type = kind; strlcpy(new_client->name, name, I2C_NAME_SIZE); - - new_client->id = adm1031_id++; data->valid = 0; init_MUTEX(&data->update_lock); @@ -888,8 +885,8 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ + HZ / 2) || - (jiffies < data->last_updated) || !data->valid) { + if (time_after(jiffies, data->last_updated + HZ + HZ / 2) + || !data->valid) { dev_dbg(&client->dev, "Starting adm1031 update\n"); for (chan = 0; diff -Nru a/drivers/i2c/chips/asb100.c b/drivers/i2c/chips/asb100.c --- a/drivers/i2c/chips/asb100.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/chips/asb100.c 2005-03-07 14:54:17 -08:00 @@ -36,17 +36,12 @@ asb100 7 3 1 4 0x31 0x0694 yes no */ -#include #include #include -#include -#include #include #include #include #include -#include -#include #include "lm75.h" /* @@ -970,8 +965,8 @@ down(&data->update_lock); - if (time_after(jiffies - data->last_updated, (unsigned long)(HZ+HZ/2)) - || time_before(jiffies, data->last_updated) || !data->valid) { + if (time_after(jiffies, data->last_updated + HZ + HZ / 2) + || !data->valid) { dev_dbg(&client->dev, "starting device update...\n"); diff -Nru a/drivers/i2c/chips/ds1621.c b/drivers/i2c/chips/ds1621.c --- a/drivers/i2c/chips/ds1621.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/chips/ds1621.c 2005-03-07 14:54:18 -08:00 @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include "lm75.h" @@ -95,8 +96,6 @@ .detach_client = ds1621_detach_client, }; -static int ds1621_id; - /* All registers are word-sized, except for the configuration register. DS1621 uses a high-byte first convention, which is exactly opposite to the usual practice. */ @@ -236,8 +235,6 @@ /* Fill in remaining client fields and put it into the global list */ strlcpy(new_client->name, "ds1621", I2C_NAME_SIZE); - - new_client->id = ds1621_id++; data->valid = 0; init_MUTEX(&data->update_lock); @@ -288,8 +285,8 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ + HZ / 2) || - (jiffies < data->last_updated) || !data->valid) { + if (time_after(jiffies, data->last_updated + HZ + HZ / 2) + || !data->valid) { dev_dbg(&client->dev, "Starting ds1621 update\n"); diff -Nru a/drivers/i2c/chips/eeprom.c b/drivers/i2c/chips/eeprom.c --- a/drivers/i2c/chips/eeprom.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/chips/eeprom.c 2005-03-07 14:54:16 -08:00 @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -86,8 +87,7 @@ down(&data->update_lock); if (!(data->valid & (1 << slice)) || - (jiffies - data->last_updated[slice] > 300 * HZ) || - (jiffies < data->last_updated[slice])) { + time_after(jiffies, data->last_updated[slice] + 300 * HZ)) { dev_dbg(&client->dev, "Starting eeprom update, slice %u\n", slice); if (i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_READ_I2C_BLOCK)) { diff -Nru a/drivers/i2c/chips/fscher.c b/drivers/i2c/chips/fscher.c --- a/drivers/i2c/chips/fscher.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/chips/fscher.c 2005-03-07 14:54:17 -08:00 @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -151,12 +152,6 @@ }; /* - * Internal variables - */ - -static int fscher_id; - -/* * Sysfs stuff */ @@ -337,7 +332,6 @@ /* Fill in the remaining client fields and put it into the * global list */ strlcpy(new_client->name, "fscher", I2C_NAME_SIZE); - new_client->id = fscher_id++; data->valid = 0; init_MUTEX(&data->update_lock); @@ -418,8 +412,7 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > 2 * HZ) || - (jiffies < data->last_updated) || !data->valid) { + if (time_after(jiffies, data->last_updated + 2 * HZ) || !data->valid) { dev_dbg(&client->dev, "Starting fscher update\n"); diff -Nru a/drivers/i2c/chips/fscpos.c b/drivers/i2c/chips/fscpos.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/i2c/chips/fscpos.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,631 @@ +/* + fscpos.c - Kernel module for hardware monitoring with FSC Poseidon chips + Copyright (C) 2004, 2005 Stefan Ott + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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. +*/ + +/* + fujitsu siemens poseidon chip, + module based on the old fscpos module by Hermann Jung and + the fscher module by Reinhard Nissl + + original module based on lm80.c + Copyright (C) 1998, 1999 Frodo Looijaard + and Philip Edelbrock + + Thanks to Jean Delvare for reviewing my code and suggesting a lot of + improvements. +*/ + +#include +#include +#include +#include +#include + +/* + * Addresses to scan + */ +static unsigned short normal_i2c[] = { 0x73, I2C_CLIENT_END }; +static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END }; + +/* + * Insmod parameters + */ +SENSORS_INSMOD_1(fscpos); + +/* + * The FSCPOS registers + */ + +/* chip identification */ +#define FSCPOS_REG_IDENT_0 0x00 +#define FSCPOS_REG_IDENT_1 0x01 +#define FSCPOS_REG_IDENT_2 0x02 +#define FSCPOS_REG_REVISION 0x03 + +/* global control and status */ +#define FSCPOS_REG_EVENT_STATE 0x04 +#define FSCPOS_REG_CONTROL 0x05 + +/* watchdog */ +#define FSCPOS_REG_WDOG_PRESET 0x28 +#define FSCPOS_REG_WDOG_STATE 0x23 +#define FSCPOS_REG_WDOG_CONTROL 0x21 + +/* voltages */ +#define FSCPOS_REG_VOLT_12 0x45 +#define FSCPOS_REG_VOLT_5 0x42 +#define FSCPOS_REG_VOLT_BATT 0x48 + +/* fans - the chip does not support minimum speed for fan2 */ +static u8 FSCPOS_REG_PWM[] = { 0x55, 0x65 }; +static u8 FSCPOS_REG_FAN_ACT[] = { 0x0e, 0x6b, 0xab }; +static u8 FSCPOS_REG_FAN_STATE[] = { 0x0d, 0x62, 0xa2 }; +static u8 FSCPOS_REG_FAN_RIPPLE[] = { 0x0f, 0x6f, 0xaf }; + +/* temperatures */ +static u8 FSCPOS_REG_TEMP_ACT[] = { 0x64, 0x32, 0x35 }; +static u8 FSCPOS_REG_TEMP_STATE[] = { 0x71, 0x81, 0x91 }; + +/* + * Functions declaration + */ +static int fscpos_attach_adapter(struct i2c_adapter *adapter); +static int fscpos_detect(struct i2c_adapter *adapter, int address, int kind); +static int fscpos_detach_client(struct i2c_client *client); + +static int fscpos_read_value(struct i2c_client *client, u8 register); +static int fscpos_write_value(struct i2c_client *client, u8 register, u8 value); +static struct fscpos_data *fscpos_update_device(struct device *dev); +static void fscpos_init_client(struct i2c_client *client); + +static void reset_fan_alarm(struct i2c_client *client, int nr); + +/* + * Driver data (common to all clients) + */ +static struct i2c_driver fscpos_driver = { + .owner = THIS_MODULE, + .name = "fscpos", + .id = I2C_DRIVERID_FSCPOS, + .flags = I2C_DF_NOTIFY, + .attach_adapter = fscpos_attach_adapter, + .detach_client = fscpos_detach_client, +}; + +/* + * Client data (each client gets its own) + */ +struct fscpos_data { + struct i2c_client client; + struct semaphore update_lock; + char valid; /* 0 until following fields are valid */ + unsigned long last_updated; /* In jiffies */ + + /* register values */ + u8 revision; /* revision of chip */ + u8 global_event; /* global event status */ + u8 global_control; /* global control register */ + u8 wdog_control; /* watchdog control */ + u8 wdog_state; /* watchdog status */ + u8 wdog_preset; /* watchdog preset */ + u8 volt[3]; /* 12, 5, battery current */ + u8 temp_act[3]; /* temperature */ + u8 temp_status[3]; /* status of sensor */ + u8 fan_act[3]; /* fans revolutions per second */ + u8 fan_status[3]; /* fan status */ + u8 pwm[2]; /* fan min value for rps */ + u8 fan_ripple[3]; /* divider for rps */ +}; + +/* Temperature */ +#define TEMP_FROM_REG(val) (((val) - 128) * 1000) + +static ssize_t show_temp_input(struct fscpos_data *data, char *buf, int nr) +{ + return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_act[nr - 1])); +} + +static ssize_t show_temp_status(struct fscpos_data *data, char *buf, int nr) +{ + /* bits 2..7 reserved => mask with 0x03 */ + return sprintf(buf, "%u\n", data->temp_status[nr - 1] & 0x03); +} + +static ssize_t show_temp_reset(struct fscpos_data *data, char *buf, int nr) +{ + return sprintf(buf, "1\n"); +} + +static ssize_t set_temp_reset(struct i2c_client *client, struct fscpos_data + *data, const char *buf, size_t count, int nr, int reg) +{ + unsigned long v = simple_strtoul(buf, NULL, 10); + if (v != 1) { + dev_err(&client->dev, "temp_reset value %ld not supported. " + "Use 1 to reset the alarm!\n", v); + return -EINVAL; + } + + dev_info(&client->dev, "You used the temp_reset feature which has not " + "been proplerly tested. Please report your " + "experience to the module author.\n"); + + /* Supported value: 2 (clears the status) */ + fscpos_write_value(client, FSCPOS_REG_TEMP_STATE[nr], 2); + return count; +} + +/* Fans */ +#define RPM_FROM_REG(val) ((val) * 60) + +static ssize_t show_fan_status(struct fscpos_data *data, char *buf, int nr) +{ + /* bits 0..1, 3..7 reserved => mask with 0x04 */ + return sprintf(buf, "%u\n", data->fan_status[nr - 1] & 0x04); +} + +static ssize_t show_fan_input(struct fscpos_data *data, char *buf, int nr) +{ + return sprintf(buf, "%u\n", RPM_FROM_REG(data->fan_act[nr - 1])); +} + +static ssize_t show_fan_ripple(struct fscpos_data *data, char *buf, int nr) +{ + /* bits 2..7 reserved => mask with 0x03 */ + return sprintf(buf, "%u\n", data->fan_ripple[nr - 1] & 0x03); +} + +static ssize_t set_fan_ripple(struct i2c_client *client, struct fscpos_data + *data, const char *buf, size_t count, int nr, int reg) +{ + /* supported values: 2, 4, 8 */ + unsigned long v = simple_strtoul(buf, NULL, 10); + + switch (v) { + case 2: v = 1; break; + case 4: v = 2; break; + case 8: v = 3; break; + default: + dev_err(&client->dev, "fan_ripple value %ld not supported. " + "Must be one of 2, 4 or 8!\n", v); + return -EINVAL; + } + + /* bits 2..7 reserved => mask with 0x03 */ + data->fan_ripple[nr - 1] &= ~0x03; + data->fan_ripple[nr - 1] |= v; + + fscpos_write_value(client, reg, data->fan_ripple[nr - 1]); + return count; +} + +static ssize_t show_pwm(struct fscpos_data *data, char *buf, int nr) +{ + return sprintf(buf, "%u\n", data->pwm[nr - 1]); +} + +static ssize_t set_pwm(struct i2c_client *client, struct fscpos_data *data, + const char *buf, size_t count, int nr, int reg) +{ + unsigned long v = simple_strtoul(buf, NULL, 10); + + /* Range: 0..255 */ + if (v < 0) v = 0; + if (v > 255) v = 255; + + data->pwm[nr - 1] = v; + fscpos_write_value(client, reg, data->pwm[nr - 1]); + return count; +} + +static void reset_fan_alarm(struct i2c_client *client, int nr) +{ + fscpos_write_value(client, FSCPOS_REG_FAN_STATE[nr], 4); +} + +/* Volts */ +#define VOLT_FROM_REG(val, mult) ((val) * (mult) / 255) + +static ssize_t show_volt_12(struct device *dev, char *buf) +{ + struct fscpos_data *data = fscpos_update_device(dev); + return sprintf(buf, "%u\n", VOLT_FROM_REG(data->volt[0], 14200)); +} + +static ssize_t show_volt_5(struct device *dev, char *buf) +{ + struct fscpos_data *data = fscpos_update_device(dev); + return sprintf(buf, "%u\n", VOLT_FROM_REG(data->volt[1], 6600)); +} + +static ssize_t show_volt_batt(struct device *dev, char *buf) +{ + struct fscpos_data *data = fscpos_update_device(dev); + return sprintf(buf, "%u\n", VOLT_FROM_REG(data->volt[2], 3300)); +} + +/* Watchdog */ +static ssize_t show_wdog_control(struct fscpos_data *data, char *buf) +{ + /* bits 0..3 reserved, bit 6 write only => mask with 0xb0 */ + return sprintf(buf, "%u\n", data->wdog_control & 0xb0); +} + +static ssize_t set_wdog_control(struct i2c_client *client, struct fscpos_data + *data, const char *buf, size_t count, int reg) +{ + /* bits 0..3 reserved => mask with 0xf0 */ + unsigned long v = simple_strtoul(buf, NULL, 10) & 0xf0; + data->wdog_control &= ~0xf0; + data->wdog_control |= v; + + fscpos_write_value(client, reg, data->wdog_control); + return count; +} + +static ssize_t show_wdog_state(struct fscpos_data *data, char *buf) +{ + /* bits 0, 2..7 reserved => mask with 0x02 */ + return sprintf(buf, "%u\n", data->wdog_state & 0x02); +} + +static ssize_t set_wdog_state(struct i2c_client *client, struct fscpos_data + *data, const char *buf, size_t count, int reg) +{ + unsigned long v = simple_strtoul(buf, NULL, 10) & 0x02; + + /* Valid values: 2 (clear) */ + if (v != 2) { + dev_err(&client->dev, "wdog_state value %ld not supported. " + "Must be 2 to clear the state!\n", v); + return -EINVAL; + } + + data->wdog_state &= ~v; + + fscpos_write_value(client, reg, v); + return count; +} + +static ssize_t show_wdog_preset(struct fscpos_data *data, char *buf) +{ + return sprintf(buf, "%u\n", data->wdog_preset); +} + +static ssize_t set_wdog_preset(struct i2c_client *client, struct fscpos_data + *data, const char *buf, size_t count, int reg) +{ + data->wdog_preset = simple_strtoul(buf, NULL, 10) & 0xff; + + fscpos_write_value(client, reg, data->wdog_preset); + return count; +} + +/* Event */ +static ssize_t show_event(struct device *dev, char *buf) +{ + /* bits 5..7 reserved => mask with 0x1f */ + struct fscpos_data *data = fscpos_update_device(dev); + return sprintf(buf, "%u\n", data->global_event & 0x9b); +} + +/* + * Sysfs stuff + */ +#define create_getter(kind, sub) \ + static ssize_t sysfs_show_##kind##sub(struct device *dev, char *buf) \ + { \ + struct fscpos_data *data = fscpos_update_device(dev); \ + return show_##kind##sub(data, buf); \ + } + +#define create_getter_n(kind, offset, sub) \ + static ssize_t sysfs_show_##kind##offset##sub(struct device *dev, char\ + *buf) \ + { \ + struct fscpos_data *data = fscpos_update_device(dev); \ + return show_##kind##sub(data, buf, offset); \ + } + +#define create_setter(kind, sub, reg) \ + static ssize_t sysfs_set_##kind##sub (struct device *dev, const char \ + *buf, size_t count) \ + { \ + struct i2c_client *client = to_i2c_client(dev); \ + struct fscpos_data *data = i2c_get_clientdata(client); \ + return set_##kind##sub(client, data, buf, count, reg); \ + } + +#define create_setter_n(kind, offset, sub, reg) \ + static ssize_t sysfs_set_##kind##offset##sub (struct device *dev, \ + const char *buf, size_t count) \ + { \ + struct i2c_client *client = to_i2c_client(dev); \ + struct fscpos_data *data = i2c_get_clientdata(client); \ + return set_##kind##sub(client, data, buf, count, offset, reg);\ + } + +#define create_sysfs_device_ro(kind, sub, offset) \ + static DEVICE_ATTR(kind##offset##sub, S_IRUGO, \ + sysfs_show_##kind##offset##sub, NULL); + +#define create_sysfs_device_rw(kind, sub, offset) \ + static DEVICE_ATTR(kind##offset##sub, S_IRUGO | S_IWUSR, \ + sysfs_show_##kind##offset##sub, sysfs_set_##kind##offset##sub); + +#define sysfs_ro_n(kind, sub, offset) \ + create_getter_n(kind, offset, sub); \ + create_sysfs_device_ro(kind, sub, offset); + +#define sysfs_rw_n(kind, sub, offset, reg) \ + create_getter_n(kind, offset, sub); \ + create_setter_n(kind, offset, sub, reg); \ + create_sysfs_device_rw(kind, sub, offset); + +#define sysfs_rw(kind, sub, reg) \ + create_getter(kind, sub); \ + create_setter(kind, sub, reg); \ + create_sysfs_device_rw(kind, sub,); + +#define sysfs_fan_with_min(offset, reg_status, reg_ripple, reg_min) \ + sysfs_fan(offset, reg_status, reg_ripple); \ + sysfs_rw_n(pwm,, offset, reg_min); + +#define sysfs_fan(offset, reg_status, reg_ripple) \ + sysfs_ro_n(fan, _input, offset); \ + sysfs_ro_n(fan, _status, offset); \ + sysfs_rw_n(fan, _ripple, offset, reg_ripple); + +#define sysfs_temp(offset, reg_status) \ + sysfs_ro_n(temp, _input, offset); \ + sysfs_ro_n(temp, _status, offset); \ + sysfs_rw_n(temp, _reset, offset, reg_status); + +#define sysfs_watchdog(reg_wdog_preset, reg_wdog_state, reg_wdog_control) \ + sysfs_rw(wdog, _control, reg_wdog_control); \ + sysfs_rw(wdog, _preset, reg_wdog_preset); \ + sysfs_rw(wdog, _state, reg_wdog_state); + +sysfs_fan_with_min(1, FSCPOS_REG_FAN_STATE[0], FSCPOS_REG_FAN_RIPPLE[0], + FSCPOS_REG_PWM[0]); +sysfs_fan_with_min(2, FSCPOS_REG_FAN_STATE[1], FSCPOS_REG_FAN_RIPPLE[1], + FSCPOS_REG_PWM[1]); +sysfs_fan(3, FSCPOS_REG_FAN_STATE[2], FSCPOS_REG_FAN_RIPPLE[2]); + +sysfs_temp(1, FSCPOS_REG_TEMP_STATE[0]); +sysfs_temp(2, FSCPOS_REG_TEMP_STATE[1]); +sysfs_temp(3, FSCPOS_REG_TEMP_STATE[2]); + +sysfs_watchdog(FSCPOS_REG_WDOG_PRESET, FSCPOS_REG_WDOG_STATE, + FSCPOS_REG_WDOG_CONTROL); + +static DEVICE_ATTR(event, S_IRUGO, show_event, NULL); +static DEVICE_ATTR(in0_input, S_IRUGO, show_volt_12, NULL); +static DEVICE_ATTR(in1_input, S_IRUGO, show_volt_5, NULL); +static DEVICE_ATTR(in2_input, S_IRUGO, show_volt_batt, NULL); + +static int fscpos_attach_adapter(struct i2c_adapter *adapter) +{ + if (!(adapter->class & I2C_CLASS_HWMON)) + return 0; + return i2c_detect(adapter, &addr_data, fscpos_detect); +} + +int fscpos_detect(struct i2c_adapter *adapter, int address, int kind) +{ + struct i2c_client *new_client; + struct fscpos_data *data; + int err = 0; + + if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) + goto exit; + + /* + * OK. For now, we presume we have a valid client. We now create the + * client structure, even though we cannot fill it completely yet. + * But it allows us to access fscpos_{read,write}_value. + */ + + if (!(data = kmalloc(sizeof(struct fscpos_data), GFP_KERNEL))) { + err = -ENOMEM; + goto exit; + } + memset(data, 0, sizeof(struct fscpos_data)); + + new_client = &data->client; + i2c_set_clientdata(new_client, data); + new_client->addr = address; + new_client->adapter = adapter; + new_client->driver = &fscpos_driver; + new_client->flags = 0; + + /* Do the remaining detection unless force or force_fscpos parameter */ + if (kind < 0) { + if ((fscpos_read_value(new_client, FSCPOS_REG_IDENT_0) + != 0x50) /* 'P' */ + || (fscpos_read_value(new_client, FSCPOS_REG_IDENT_1) + != 0x45) /* 'E' */ + || (fscpos_read_value(new_client, FSCPOS_REG_IDENT_2) + != 0x47))/* 'G' */ + { + dev_dbg(&new_client->dev, "fscpos detection failed\n"); + goto exit_free; + } + } + + /* Fill in the remaining client fields and put it in the global list */ + strlcpy(new_client->name, "fscpos", I2C_NAME_SIZE); + + data->valid = 0; + init_MUTEX(&data->update_lock); + + /* Tell the I2C layer a new client has arrived */ + if ((err = i2c_attach_client(new_client))) + goto exit_free; + + /* Inizialize the fscpos chip */ + fscpos_init_client(new_client); + + /* Announce that the chip was found */ + dev_info(&new_client->dev, "Found fscpos chip, rev %u\n", data->revision); + + /* Register sysfs hooks */ + device_create_file(&new_client->dev, &dev_attr_event); + device_create_file(&new_client->dev, &dev_attr_in0_input); + device_create_file(&new_client->dev, &dev_attr_in1_input); + device_create_file(&new_client->dev, &dev_attr_in2_input); + device_create_file(&new_client->dev, &dev_attr_wdog_control); + device_create_file(&new_client->dev, &dev_attr_wdog_preset); + device_create_file(&new_client->dev, &dev_attr_wdog_state); + device_create_file(&new_client->dev, &dev_attr_temp1_input); + device_create_file(&new_client->dev, &dev_attr_temp1_status); + device_create_file(&new_client->dev, &dev_attr_temp1_reset); + device_create_file(&new_client->dev, &dev_attr_temp2_input); + device_create_file(&new_client->dev, &dev_attr_temp2_status); + device_create_file(&new_client->dev, &dev_attr_temp2_reset); + device_create_file(&new_client->dev, &dev_attr_temp3_input); + device_create_file(&new_client->dev, &dev_attr_temp3_status); + device_create_file(&new_client->dev, &dev_attr_temp3_reset); + device_create_file(&new_client->dev, &dev_attr_fan1_input); + device_create_file(&new_client->dev, &dev_attr_fan1_status); + device_create_file(&new_client->dev, &dev_attr_fan1_ripple); + device_create_file(&new_client->dev, &dev_attr_pwm1); + device_create_file(&new_client->dev, &dev_attr_fan2_input); + device_create_file(&new_client->dev, &dev_attr_fan2_status); + device_create_file(&new_client->dev, &dev_attr_fan2_ripple); + device_create_file(&new_client->dev, &dev_attr_pwm2); + device_create_file(&new_client->dev, &dev_attr_fan3_input); + device_create_file(&new_client->dev, &dev_attr_fan3_status); + device_create_file(&new_client->dev, &dev_attr_fan3_ripple); + + return 0; + +exit_free: + kfree(data); +exit: + return err; +} + +static int fscpos_detach_client(struct i2c_client *client) +{ + int err; + + if ((err = i2c_detach_client(client))) { + dev_err(&client->dev, "Client deregistration failed, client" + " not detached.\n"); + return err; + } + kfree(i2c_get_clientdata(client)); + return 0; +} + +static int fscpos_read_value(struct i2c_client *client, u8 reg) +{ + dev_dbg(&client->dev, "Read reg 0x%02x\n", reg); + return i2c_smbus_read_byte_data(client, reg); +} + +static int fscpos_write_value(struct i2c_client *client, u8 reg, u8 value) +{ + dev_dbg(&client->dev, "Write reg 0x%02x, val 0x%02x\n", reg, value); + return i2c_smbus_write_byte_data(client, reg, value); +} + +/* Called when we have found a new FSCPOS chip */ +static void fscpos_init_client(struct i2c_client *client) +{ + struct fscpos_data *data = i2c_get_clientdata(client); + + /* read revision from chip */ + data->revision = fscpos_read_value(client, FSCPOS_REG_REVISION); +} + +static struct fscpos_data *fscpos_update_device(struct device *dev) +{ + struct i2c_client *client = to_i2c_client(dev); + struct fscpos_data *data = i2c_get_clientdata(client); + + down(&data->update_lock); + + if ((jiffies - data->last_updated > 2 * HZ) || + (jiffies < data->last_updated) || !data->valid) { + int i; + + dev_dbg(&client->dev, "Starting fscpos update\n"); + + for (i = 0; i < 3; i++) { + data->temp_act[i] = fscpos_read_value(client, + FSCPOS_REG_TEMP_ACT[i]); + data->temp_status[i] = fscpos_read_value(client, + FSCPOS_REG_TEMP_STATE[i]); + data->fan_act[i] = fscpos_read_value(client, + FSCPOS_REG_FAN_ACT[i]); + data->fan_status[i] = fscpos_read_value(client, + FSCPOS_REG_FAN_STATE[i]); + data->fan_ripple[i] = fscpos_read_value(client, + FSCPOS_REG_FAN_RIPPLE[i]); + if (i < 2) { + /* fan2_min is not supported by the chip */ + data->pwm[i] = fscpos_read_value(client, + FSCPOS_REG_PWM[i]); + } + /* reset fan status if speed is back to > 0 */ + if (data->fan_status[i] != 0 && data->fan_act[i] > 0) { + reset_fan_alarm(client, i); + } + } + + data->volt[0] = fscpos_read_value(client, FSCPOS_REG_VOLT_12); + data->volt[1] = fscpos_read_value(client, FSCPOS_REG_VOLT_5); + data->volt[2] = fscpos_read_value(client, FSCPOS_REG_VOLT_BATT); + + data->wdog_preset = fscpos_read_value(client, + FSCPOS_REG_WDOG_PRESET); + data->wdog_state = fscpos_read_value(client, + FSCPOS_REG_WDOG_STATE); + data->wdog_control = fscpos_read_value(client, + FSCPOS_REG_WDOG_CONTROL); + + data->global_event = fscpos_read_value(client, + FSCPOS_REG_EVENT_STATE); + + data->last_updated = jiffies; + data->valid = 1; + } + up(&data->update_lock); + return data; +} + +static int __init sm_fscpos_init(void) +{ + return i2c_add_driver(&fscpos_driver); +} + +static void __exit sm_fscpos_exit(void) +{ + i2c_del_driver(&fscpos_driver); +} + +MODULE_AUTHOR("Stefan Ott based on work from Hermann Jung " + ", Frodo Looijaard " + " and Philip Edelbrock "); +MODULE_DESCRIPTION("fujitsu siemens poseidon chip driver"); +MODULE_LICENSE("GPL"); + +module_init(sm_fscpos_init); +module_exit(sm_fscpos_exit); diff -Nru a/drivers/i2c/chips/gl518sm.c b/drivers/i2c/chips/gl518sm.c --- a/drivers/i2c/chips/gl518sm.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/chips/gl518sm.c 2005-03-07 14:54:18 -08:00 @@ -40,6 +40,7 @@ #include #include #include +#include #include #include @@ -159,12 +160,6 @@ }; /* - * Internal variables - */ - -static int gl518_id; - -/* * Sysfs stuff */ @@ -396,7 +391,6 @@ /* Fill in the remaining client fields */ strlcpy(new_client->name, "gl518sm", I2C_NAME_SIZE); - new_client->id = gl518_id++; data->type = kind; data->valid = 0; init_MUTEX(&data->update_lock); @@ -512,8 +506,8 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ + HZ / 2) || - (jiffies < data->last_updated) || !data->valid) { + if (time_after(jiffies, data->last_updated + HZ + HZ / 2) + || !data->valid) { dev_dbg(&client->dev, "Starting gl518 update\n"); data->alarms = gl518_read_value(client, GL518_REG_INT); diff -Nru a/drivers/i2c/chips/gl520sm.c b/drivers/i2c/chips/gl520sm.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/i2c/chips/gl520sm.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,754 @@ +/* + gl520sm.c - Part of lm_sensors, Linux kernel modules for hardware + monitoring + Copyright (c) 1998, 1999 Frodo Looijaard , + Kyösti Mälkki + Copyright (c) 2005 Maarten Deprez + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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. + +*/ + +#include +#include +#include +#include +#include +#include + +/* Type of the extra sensor */ +static unsigned short extra_sensor_type; +module_param(extra_sensor_type, ushort, 0); +MODULE_PARM_DESC(extra_sensor_type, "Type of extra sensor (0=autodetect, 1=temperature, 2=voltage)"); + +/* Addresses to scan */ +static unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END }; +static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END }; + +/* Insmod parameters */ +SENSORS_INSMOD_1(gl520sm); + +/* Many GL520 constants specified below +One of the inputs can be configured as either temp or voltage. +That's why _TEMP2 and _IN4 access the same register +*/ + +/* The GL520 registers */ +#define GL520_REG_CHIP_ID 0x00 +#define GL520_REG_REVISION 0x01 +#define GL520_REG_CONF 0x03 +#define GL520_REG_MASK 0x11 + +#define GL520_REG_VID_INPUT 0x02 + +#define GL520_REG_IN0_INPUT 0x15 +#define GL520_REG_IN0_LIMIT 0x0c +#define GL520_REG_IN0_MIN GL520_REG_IN0_LIMIT +#define GL520_REG_IN0_MAX GL520_REG_IN0_LIMIT + +#define GL520_REG_IN1_INPUT 0x14 +#define GL520_REG_IN1_LIMIT 0x09 +#define GL520_REG_IN1_MIN GL520_REG_IN1_LIMIT +#define GL520_REG_IN1_MAX GL520_REG_IN1_LIMIT + +#define GL520_REG_IN2_INPUT 0x13 +#define GL520_REG_IN2_LIMIT 0x0a +#define GL520_REG_IN2_MIN GL520_REG_IN2_LIMIT +#define GL520_REG_IN2_MAX GL520_REG_IN2_LIMIT + +#define GL520_REG_IN3_INPUT 0x0d +#define GL520_REG_IN3_LIMIT 0x0b +#define GL520_REG_IN3_MIN GL520_REG_IN3_LIMIT +#define GL520_REG_IN3_MAX GL520_REG_IN3_LIMIT + +#define GL520_REG_IN4_INPUT 0x0e +#define GL520_REG_IN4_MAX 0x17 +#define GL520_REG_IN4_MIN 0x18 + +#define GL520_REG_TEMP1_INPUT 0x04 +#define GL520_REG_TEMP1_MAX 0x05 +#define GL520_REG_TEMP1_MAX_HYST 0x06 + +#define GL520_REG_TEMP2_INPUT 0x0e +#define GL520_REG_TEMP2_MAX 0x17 +#define GL520_REG_TEMP2_MAX_HYST 0x18 + +#define GL520_REG_FAN_INPUT 0x07 +#define GL520_REG_FAN_MIN 0x08 +#define GL520_REG_FAN_DIV 0x0f +#define GL520_REG_FAN_OFF GL520_REG_FAN_DIV + +#define GL520_REG_ALARMS 0x12 +#define GL520_REG_BEEP_MASK 0x10 +#define GL520_REG_BEEP_ENABLE GL520_REG_CONF + +/* + * Function declarations + */ + +static int gl520_attach_adapter(struct i2c_adapter *adapter); +static int gl520_detect(struct i2c_adapter *adapter, int address, int kind); +static void gl520_init_client(struct i2c_client *client); +static int gl520_detach_client(struct i2c_client *client); +static int gl520_read_value(struct i2c_client *client, u8 reg); +static int gl520_write_value(struct i2c_client *client, u8 reg, u16 value); +static struct gl520_data *gl520_update_device(struct device *dev); + +/* Driver data */ +static struct i2c_driver gl520_driver = { + .owner = THIS_MODULE, + .name = "gl520sm", + .id = I2C_DRIVERID_GL520, + .flags = I2C_DF_NOTIFY, + .attach_adapter = gl520_attach_adapter, + .detach_client = gl520_detach_client, +}; + +/* Client data */ +struct gl520_data { + struct i2c_client client; + struct semaphore update_lock; + char valid; /* zero until the following fields are valid */ + unsigned long last_updated; /* in jiffies */ + + u8 vid; + u8 vrm; + u8 in_input[5]; /* [0] = VVD */ + u8 in_min[5]; /* [0] = VDD */ + u8 in_max[5]; /* [0] = VDD */ + u8 fan_input[2]; + u8 fan_min[2]; + u8 fan_div[2]; + u8 fan_off; + u8 temp_input[2]; + u8 temp_max[2]; + u8 temp_max_hyst[2]; + u8 alarms; + u8 beep_enable; + u8 beep_mask; + u8 alarm_mask; + u8 two_temps; +}; + +/* + * Sysfs stuff + */ + +#define sysfs_r(type, n, item, reg) \ +static ssize_t get_##type##item (struct gl520_data *, char *, int); \ +static ssize_t get_##type##n##item (struct device *, char *); \ +static ssize_t get_##type##n##item (struct device *dev, char *buf) \ +{ \ + struct gl520_data *data = gl520_update_device(dev); \ + return get_##type##item(data, buf, (n)); \ +} + +#define sysfs_w(type, n, item, reg) \ +static ssize_t set_##type##item (struct i2c_client *, struct gl520_data *, const char *, size_t, int, int); \ +static ssize_t set_##type##n##item (struct device *, const char *, size_t); \ +static ssize_t set_##type##n##item (struct device *dev, const char *buf, size_t count) \ +{ \ + struct i2c_client *client = to_i2c_client(dev); \ + struct gl520_data *data = i2c_get_clientdata(client); \ + return set_##type##item(client, data, buf, count, (n), reg); \ +} + +#define sysfs_rw_n(type, n, item, reg) \ +sysfs_r(type, n, item, reg) \ +sysfs_w(type, n, item, reg) \ +static DEVICE_ATTR(type##n##item, S_IRUGO | S_IWUSR, get_##type##n##item, set_##type##n##item); + +#define sysfs_ro_n(type, n, item, reg) \ +sysfs_r(type, n, item, reg) \ +static DEVICE_ATTR(type##n##item, S_IRUGO, get_##type##n##item, NULL); + +#define sysfs_rw(type, item, reg) \ +sysfs_r(type, 0, item, reg) \ +sysfs_w(type, 0, item, reg) \ +static DEVICE_ATTR(type##item, S_IRUGO | S_IWUSR, get_##type##0##item, set_##type##0##item); + +#define sysfs_ro(type, item, reg) \ +sysfs_r(type, 0, item, reg) \ +static DEVICE_ATTR(type##item, S_IRUGO, get_##type##0##item, NULL); + + +#define sysfs_vid(n) \ +sysfs_ro_n(cpu, n, _vid, GL520_REG_VID_INPUT) + +#define device_create_file_vid(client, n) \ +device_create_file(&client->dev, &dev_attr_cpu##n##_vid) + +#define sysfs_in(n) \ +sysfs_ro_n(in, n, _input, GL520_REG_IN##n##INPUT) \ +sysfs_rw_n(in, n, _min, GL520_REG_IN##n##_MIN) \ +sysfs_rw_n(in, n, _max, GL520_REG_IN##n##_MAX) \ + +#define device_create_file_in(client, n) \ +({device_create_file(&client->dev, &dev_attr_in##n##_input); \ +device_create_file(&client->dev, &dev_attr_in##n##_min); \ +device_create_file(&client->dev, &dev_attr_in##n##_max);}) + +#define sysfs_fan(n) \ +sysfs_ro_n(fan, n, _input, GL520_REG_FAN_INPUT) \ +sysfs_rw_n(fan, n, _min, GL520_REG_FAN_MIN) \ +sysfs_rw_n(fan, n, _div, GL520_REG_FAN_DIV) + +#define device_create_file_fan(client, n) \ +({device_create_file(&client->dev, &dev_attr_fan##n##_input); \ +device_create_file(&client->dev, &dev_attr_fan##n##_min); \ +device_create_file(&client->dev, &dev_attr_fan##n##_div);}) + +#define sysfs_fan_off(n) \ +sysfs_rw_n(fan, n, _off, GL520_REG_FAN_OFF) \ + +#define device_create_file_fan_off(client, n) \ +device_create_file(&client->dev, &dev_attr_fan##n##_off) + +#define sysfs_temp(n) \ +sysfs_ro_n(temp, n, _input, GL520_REG_TEMP##n##_INPUT) \ +sysfs_rw_n(temp, n, _max, GL520_REG_TEMP##n##_MAX) \ +sysfs_rw_n(temp, n, _max_hyst, GL520_REG_TEMP##n##_MAX_HYST) + +#define device_create_file_temp(client, n) \ +({device_create_file(&client->dev, &dev_attr_temp##n##_input); \ +device_create_file(&client->dev, &dev_attr_temp##n##_max); \ +device_create_file(&client->dev, &dev_attr_temp##n##_max_hyst);}) + +#define sysfs_alarms() \ +sysfs_ro(alarms, , GL520_REG_ALARMS) \ +sysfs_rw(beep_enable, , GL520_REG_BEEP_ENABLE) \ +sysfs_rw(beep_mask, , GL520_REG_BEEP_MASK) + +#define device_create_file_alarms(client) \ +({device_create_file(&client->dev, &dev_attr_alarms); \ +device_create_file(&client->dev, &dev_attr_beep_enable); \ +device_create_file(&client->dev, &dev_attr_beep_mask);}) + + +sysfs_vid(0) + +sysfs_in(0) +sysfs_in(1) +sysfs_in(2) +sysfs_in(3) +sysfs_in(4) + +sysfs_fan(1) +sysfs_fan(2) +sysfs_fan_off(1) + +sysfs_temp(1) +sysfs_temp(2) + +sysfs_alarms() + + +static ssize_t get_cpu_vid(struct gl520_data *data, char *buf, int n) +{ + return sprintf(buf, "%u\n", vid_from_reg(data->vid, data->vrm)); +} + +#define VDD_FROM_REG(val) (((val)*95+2)/4) +#define VDD_TO_REG(val) (SENSORS_LIMIT((((val)*4+47)/95),0,255)) + +#define IN_FROM_REG(val) ((val)*19) +#define IN_TO_REG(val) (SENSORS_LIMIT((((val)+9)/19),0,255)) + +static ssize_t get_in_input(struct gl520_data *data, char *buf, int n) +{ + u8 r = data->in_input[n]; + + if (n == 0) + return sprintf(buf, "%d\n", VDD_FROM_REG(r)); + else + return sprintf(buf, "%d\n", IN_FROM_REG(r)); +} + +static ssize_t get_in_min(struct gl520_data *data, char *buf, int n) +{ + u8 r = data->in_min[n]; + + if (n == 0) + return sprintf(buf, "%d\n", VDD_FROM_REG(r)); + else + return sprintf(buf, "%d\n", IN_FROM_REG(r)); +} + +static ssize_t get_in_max(struct gl520_data *data, char *buf, int n) +{ + u8 r = data->in_max[n]; + + if (n == 0) + return sprintf(buf, "%d\n", VDD_FROM_REG(r)); + else + return sprintf(buf, "%d\n", IN_FROM_REG(r)); +} + +static ssize_t set_in_min(struct i2c_client *client, struct gl520_data *data, const char *buf, size_t count, int n, int reg) +{ + long v = simple_strtol(buf, NULL, 10); + u8 r; + + if (n == 0) + r = VDD_TO_REG(v); + else + r = IN_TO_REG(v); + + data->in_min[n] = r; + + if (n < 4) + gl520_write_value(client, reg, (gl520_read_value(client, reg) & ~0xff) | r); + else + gl520_write_value(client, reg, r); + + return count; +} + +static ssize_t set_in_max(struct i2c_client *client, struct gl520_data *data, const char *buf, size_t count, int n, int reg) +{ + long v = simple_strtol(buf, NULL, 10); + u8 r; + + if (n == 0) + r = VDD_TO_REG(v); + else + r = IN_TO_REG(v); + + data->in_max[n] = r; + + if (n < 4) + gl520_write_value(client, reg, (gl520_read_value(client, reg) & ~0xff00) | (r << 8)); + else + gl520_write_value(client, reg, r); + + return count; +} + +#define DIV_FROM_REG(val) (1 << (val)) +#define FAN_FROM_REG(val,div) ((val)==0 ? 0 : (480000/((val) << (div)))) +#define FAN_TO_REG(val,div) ((val)<=0?0:SENSORS_LIMIT((480000 + ((val) << ((div)-1))) / ((val) << (div)), 1, 255)); + +static ssize_t get_fan_input(struct gl520_data *data, char *buf, int n) +{ + return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan_input[n - 1], data->fan_div[n - 1])); +} + +static ssize_t get_fan_min(struct gl520_data *data, char *buf, int n) +{ + return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan_min[n - 1], data->fan_div[n - 1])); +} + +static ssize_t get_fan_div(struct gl520_data *data, char *buf, int n) +{ + return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[n - 1])); +} + +static ssize_t get_fan_off(struct gl520_data *data, char *buf, int n) +{ + return sprintf(buf, "%d\n", data->fan_off); +} + +static ssize_t set_fan_min(struct i2c_client *client, struct gl520_data *data, const char *buf, size_t count, int n, int reg) +{ + unsigned long v = simple_strtoul(buf, NULL, 10); + u8 r = FAN_TO_REG(v, data->fan_div[n - 1]); + + data->fan_min[n - 1] = r; + + if (n == 1) + gl520_write_value(client, reg, (gl520_read_value(client, reg) & ~0xff00) | (r << 8)); + else + gl520_write_value(client, reg, (gl520_read_value(client, reg) & ~0xff) | r); + + data->beep_mask = gl520_read_value(client, GL520_REG_BEEP_MASK); + if (data->fan_min[n - 1] == 0) + data->alarm_mask &= (n == 1) ? ~0x20 : ~0x40; + else + data->alarm_mask |= (n == 1) ? 0x20 : 0x40; + data->beep_mask &= data->alarm_mask; + gl520_write_value(client, GL520_REG_BEEP_MASK, data->beep_mask); + + return count; +} + +static ssize_t set_fan_div(struct i2c_client *client, struct gl520_data *data, const char *buf, size_t count, int n, int reg) +{ + unsigned long v = simple_strtoul(buf, NULL, 10); + u8 r; + + switch (v) { + case 1: r = 0; break; + case 2: r = 1; break; + case 4: r = 2; break; + case 8: r = 3; break; + default: + dev_err(&client->dev, "fan_div value %ld not supported. Choose one of 1, 2, 4 or 8!\n", v); + return -EINVAL; + } + + data->fan_div[n - 1] = r; + + if (n == 1) + gl520_write_value(client, reg, (gl520_read_value(client, reg) & ~0xc0) | (r << 6)); + else + gl520_write_value(client, reg, (gl520_read_value(client, reg) & ~0x30) | (r << 4)); + + return count; +} + +static ssize_t set_fan_off(struct i2c_client *client, struct gl520_data *data, const char *buf, size_t count, int n, int reg) +{ + u8 r = simple_strtoul(buf, NULL, 10)?1:0; + + data->fan_off = r; + gl520_write_value(client, reg, (gl520_read_value(client, reg) & ~0x0c) | (r << 2)); + + return count; +} + +#define TEMP_FROM_REG(val) (((val) - 130) * 1000) +#define TEMP_TO_REG(val) (SENSORS_LIMIT(((((val)<0?(val)-500:(val)+500) / 1000)+130),0,255)) + +static ssize_t get_temp_input(struct gl520_data *data, char *buf, int n) +{ + return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_input[n - 1])); +} + +static ssize_t get_temp_max(struct gl520_data *data, char *buf, int n) +{ + return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_max[n - 1])); +} + +static ssize_t get_temp_max_hyst(struct gl520_data *data, char *buf, int n) +{ + return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_max_hyst[n - 1])); +} + +static ssize_t set_temp_max(struct i2c_client *client, struct gl520_data *data, const char *buf, size_t count, int n, int reg) +{ + long v = simple_strtol(buf, NULL, 10); + u8 r = TEMP_TO_REG(v); + + data->temp_max[n - 1] = r; + gl520_write_value(client, reg, r); + + return count; +} + +static ssize_t set_temp_max_hyst(struct i2c_client *client, struct gl520_data *data, const char *buf, size_t count, int n, int reg) +{ + long v = simple_strtol(buf, NULL, 10); + u8 r = TEMP_TO_REG(v); + + data->temp_max_hyst[n - 1] = r; + gl520_write_value(client, reg, r); + + return count; +} + +static ssize_t get_alarms(struct gl520_data *data, char *buf, int n) +{ + return sprintf(buf, "%d\n", data->alarms); +} + +static ssize_t get_beep_enable(struct gl520_data *data, char *buf, int n) +{ + return sprintf(buf, "%d\n", data->beep_enable); +} + +static ssize_t get_beep_mask(struct gl520_data *data, char *buf, int n) +{ + return sprintf(buf, "%d\n", data->beep_mask); +} + +static ssize_t set_beep_enable(struct i2c_client *client, struct gl520_data *data, const char *buf, size_t count, int n, int reg) +{ + u8 r = simple_strtoul(buf, NULL, 10)?0:1; + + data->beep_enable = !r; + gl520_write_value(client, reg, (gl520_read_value(client, reg) & ~0x04) | (r << 2)); + + return count; +} + +static ssize_t set_beep_mask(struct i2c_client *client, struct gl520_data *data, const char *buf, size_t count, int n, int reg) +{ + u8 r = simple_strtoul(buf, NULL, 10) & data->alarm_mask; + + data->beep_mask = r; + gl520_write_value(client, reg, r); + + return count; +} + + +/* + * Real code + */ + +static int gl520_attach_adapter(struct i2c_adapter *adapter) +{ + if (!(adapter->class & I2C_CLASS_HWMON)) + return 0; + return i2c_detect(adapter, &addr_data, gl520_detect); +} + +static int gl520_detect(struct i2c_adapter *adapter, int address, int kind) +{ + struct i2c_client *new_client; + struct gl520_data *data; + int err = 0; + + if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA | + I2C_FUNC_SMBUS_WORD_DATA)) + goto exit; + + /* OK. For now, we presume we have a valid client. We now create the + client structure, even though we cannot fill it completely yet. + But it allows us to access gl520_{read,write}_value. */ + + if (!(data = kmalloc(sizeof(struct gl520_data), GFP_KERNEL))) { + err = -ENOMEM; + goto exit; + } + memset(data, 0, sizeof(struct gl520_data)); + + new_client = &data->client; + i2c_set_clientdata(new_client, data); + new_client->addr = address; + new_client->adapter = adapter; + new_client->driver = &gl520_driver; + new_client->flags = 0; + + /* Determine the chip type. */ + if (kind < 0) { + if ((gl520_read_value(new_client, GL520_REG_CHIP_ID) != 0x20) || + ((gl520_read_value(new_client, GL520_REG_REVISION) & 0x7f) != 0x00) || + ((gl520_read_value(new_client, GL520_REG_CONF) & 0x80) != 0x00)) { + dev_dbg(&new_client->dev, "Unknown chip type, skipping\n"); + goto exit_free; + } + } + + /* Fill in the remaining client fields */ + strlcpy(new_client->name, "gl520sm", I2C_NAME_SIZE); + data->valid = 0; + init_MUTEX(&data->update_lock); + + /* Tell the I2C layer a new client has arrived */ + if ((err = i2c_attach_client(new_client))) + goto exit_free; + + /* Initialize the GL520SM chip */ + gl520_init_client(new_client); + + /* Register sysfs hooks */ + device_create_file_vid(new_client, 0); + + device_create_file_in(new_client, 0); + device_create_file_in(new_client, 1); + device_create_file_in(new_client, 2); + device_create_file_in(new_client, 3); + if (!data->two_temps) + device_create_file_in(new_client, 4); + + device_create_file_fan(new_client, 1); + device_create_file_fan(new_client, 2); + device_create_file_fan_off(new_client, 1); + + device_create_file_temp(new_client, 1); + if (data->two_temps) + device_create_file_temp(new_client, 2); + + device_create_file_alarms(new_client); + + return 0; + +exit_free: + kfree(data); +exit: + return err; +} + + +/* Called when we have found a new GL520SM. */ +static void gl520_init_client(struct i2c_client *client) +{ + struct gl520_data *data = i2c_get_clientdata(client); + u8 oldconf, conf; + + conf = oldconf = gl520_read_value(client, GL520_REG_CONF); + + data->alarm_mask = 0xff; + data->vrm = i2c_which_vrm(); + + if (extra_sensor_type == 1) + conf &= ~0x10; + else if (extra_sensor_type == 2) + conf |= 0x10; + data->two_temps = !(conf & 0x10); + + /* If IRQ# is disabled, we can safely force comparator mode */ + if (!(conf & 0x20)) + conf &= 0xf7; + + /* Enable monitoring if needed */ + conf |= 0x40; + + if (conf != oldconf) + gl520_write_value(client, GL520_REG_CONF, conf); + + gl520_update_device(&(client->dev)); + + if (data->fan_min[0] == 0) + data->alarm_mask &= ~0x20; + if (data->fan_min[1] == 0) + data->alarm_mask &= ~0x40; + + data->beep_mask &= data->alarm_mask; + gl520_write_value(client, GL520_REG_BEEP_MASK, data->beep_mask); +} + +static int gl520_detach_client(struct i2c_client *client) +{ + int err; + + if ((err = i2c_detach_client(client))) { + dev_err(&client->dev, "Client deregistration failed, " + "client not detached.\n"); + return err; + } + + kfree(i2c_get_clientdata(client)); + return 0; +} + + +/* Registers 0x07 to 0x0c are word-sized, others are byte-sized + GL520 uses a high-byte first convention */ +static int gl520_read_value(struct i2c_client *client, u8 reg) +{ + if ((reg >= 0x07) && (reg <= 0x0c)) + return swab16(i2c_smbus_read_word_data(client, reg)); + else + return i2c_smbus_read_byte_data(client, reg); +} + +static int gl520_write_value(struct i2c_client *client, u8 reg, u16 value) +{ + if ((reg >= 0x07) && (reg <= 0x0c)) + return i2c_smbus_write_word_data(client, reg, swab16(value)); + else + return i2c_smbus_write_byte_data(client, reg, value); +} + + +static struct gl520_data *gl520_update_device(struct device *dev) +{ + struct i2c_client *client = to_i2c_client(dev); + struct gl520_data *data = i2c_get_clientdata(client); + int val; + + down(&data->update_lock); + + if ((jiffies - data->last_updated > 2 * HZ) || + (jiffies < data->last_updated) || !data->valid) { + + dev_dbg(&client->dev, "Starting gl520sm update\n"); + + data->alarms = gl520_read_value(client, GL520_REG_ALARMS); + data->beep_mask = gl520_read_value(client, GL520_REG_BEEP_MASK); + data->vid = gl520_read_value(client, GL520_REG_VID_INPUT) & 0x1f; + + val = gl520_read_value(client, GL520_REG_IN0_LIMIT); + data->in_min[0] = val & 0xff; + data->in_max[0] = (val >> 8) & 0xff; + val = gl520_read_value(client, GL520_REG_IN1_LIMIT); + data->in_min[1] = val & 0xff; + data->in_max[1] = (val >> 8) & 0xff; + val = gl520_read_value(client, GL520_REG_IN2_LIMIT); + data->in_min[2] = val & 0xff; + data->in_max[2] = (val >> 8) & 0xff; + val = gl520_read_value(client, GL520_REG_IN3_LIMIT); + data->in_min[3] = val & 0xff; + data->in_max[3] = (val >> 8) & 0xff; + + val = gl520_read_value(client, GL520_REG_FAN_INPUT); + data->fan_input[0] = (val >> 8) & 0xff; + data->fan_input[1] = val & 0xff; + + val = gl520_read_value(client, GL520_REG_FAN_MIN); + data->fan_min[0] = (val >> 8) & 0xff; + data->fan_min[1] = val & 0xff; + + data->temp_input[0] = gl520_read_value(client, GL520_REG_TEMP1_INPUT); + data->temp_max[0] = gl520_read_value(client, GL520_REG_TEMP1_MAX); + data->temp_max_hyst[0] = gl520_read_value(client, GL520_REG_TEMP1_MAX_HYST); + + val = gl520_read_value(client, GL520_REG_FAN_DIV); + data->fan_div[0] = (val >> 6) & 0x03; + data->fan_div[1] = (val >> 4) & 0x03; + data->fan_off = (val >> 2) & 0x01; + + data->alarms &= data->alarm_mask; + + val = gl520_read_value(client, GL520_REG_CONF); + data->beep_enable = !((val >> 2) & 1); + + data->in_input[0] = gl520_read_value(client, GL520_REG_IN0_INPUT); + data->in_input[1] = gl520_read_value(client, GL520_REG_IN1_INPUT); + data->in_input[2] = gl520_read_value(client, GL520_REG_IN2_INPUT); + data->in_input[3] = gl520_read_value(client, GL520_REG_IN3_INPUT); + + /* Temp1 and Vin4 are the same input */ + if (data->two_temps) { + data->temp_input[1] = gl520_read_value(client, GL520_REG_TEMP2_INPUT); + data->temp_max[1] = gl520_read_value(client, GL520_REG_TEMP2_MAX); + data->temp_max_hyst[1] = gl520_read_value(client, GL520_REG_TEMP2_MAX_HYST); + } else { + data->in_input[4] = gl520_read_value(client, GL520_REG_IN4_INPUT); + data->in_min[4] = gl520_read_value(client, GL520_REG_IN4_MIN); + data->in_max[4] = gl520_read_value(client, GL520_REG_IN4_MAX); + } + + data->last_updated = jiffies; + data->valid = 1; + } + + up(&data->update_lock); + + return data; +} + + +static int __init sensors_gl520sm_init(void) +{ + return i2c_add_driver(&gl520_driver); +} + +static void __exit sensors_gl520sm_exit(void) +{ + i2c_del_driver(&gl520_driver); +} + + +MODULE_AUTHOR("Frodo Looijaard , " + "Kyösti Mälkki , " + "Maarten Deprez "); +MODULE_DESCRIPTION("GL520SM driver"); +MODULE_LICENSE("GPL"); + +module_init(sensors_gl520sm_init); +module_exit(sensors_gl520sm_exit); diff -Nru a/drivers/i2c/chips/isp1301_omap.c b/drivers/i2c/chips/isp1301_omap.c --- a/drivers/i2c/chips/isp1301_omap.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/chips/isp1301_omap.c 2005-03-07 14:54:18 -08:00 @@ -1503,7 +1503,6 @@ isp->client.addr = address; i2c_set_clientdata(&isp->client, isp); isp->client.adapter = bus; - isp->client.id = 1301; isp->client.driver = &isp1301_driver; strlcpy(isp->client.name, DRIVER_NAME, I2C_NAME_SIZE); i2c = &isp->client; diff -Nru a/drivers/i2c/chips/it87.c b/drivers/i2c/chips/it87.c --- a/drivers/i2c/chips/it87.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/chips/it87.c 2005-03-07 14:54:17 -08:00 @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -104,6 +105,9 @@ /* Update battery voltage after every reading if true */ static int update_vbat; +/* Not all BIOSes properly configure the PWM registers */ +static int fix_pwm_polarity; + /* Chip Type */ static u16 chip_type; @@ -224,6 +228,7 @@ static int it87_write_value(struct i2c_client *client, u8 register, u8 value); static struct it87_data *it87_update_device(struct device *dev); +static int it87_check_pwm(struct i2c_client *client); static void it87_init_client(struct i2c_client *client, struct it87_data *data); @@ -718,7 +723,6 @@ const char *name = ""; int is_isa = i2c_is_isa_adapter(adapter); int enable_pwm_interface; - int tmp; if (!is_isa && !i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) @@ -822,20 +826,12 @@ if ((err = i2c_attach_client(new_client))) goto ERROR2; + /* Check PWM configuration */ + enable_pwm_interface = it87_check_pwm(new_client); + /* Initialize the IT87 chip */ it87_init_client(new_client, data); - /* Some BIOSes fail to correctly configure the IT87 fans. All fans off - * and polarity set to active low is sign that this is the case so we - * disable pwm control to protect the user. */ - enable_pwm_interface = 1; - tmp = it87_read_value(new_client, IT87_REG_FAN_CTL); - if ((tmp & 0x87) == 0) { - enable_pwm_interface = 0; - dev_info(&new_client->dev, - "detected broken BIOS defaults, disabling pwm interface"); - } - /* Register sysfs hooks */ device_create_file(&new_client->dev, &dev_attr_in0_input); device_create_file(&new_client->dev, &dev_attr_in1_input); @@ -966,6 +962,56 @@ return i2c_smbus_write_byte_data(client, reg, value); } +/* Return 1 if and only if the PWM interface is safe to use */ +static int it87_check_pwm(struct i2c_client *client) +{ + /* Some BIOSes fail to correctly configure the IT87 fans. All fans off + * and polarity set to active low is sign that this is the case so we + * disable pwm control to protect the user. */ + int tmp = it87_read_value(client, IT87_REG_FAN_CTL); + if ((tmp & 0x87) == 0) { + if (fix_pwm_polarity) { + /* The user asks us to attempt a chip reconfiguration. + * This means switching to active high polarity and + * inverting all fan speed values. */ + int i; + u8 pwm[3]; + + for (i = 0; i < 3; i++) + pwm[i] = it87_read_value(client, + IT87_REG_PWM(i)); + + /* If any fan is in automatic pwm mode, the polarity + * might be correct, as suspicious as it seems, so we + * better don't change anything (but still disable the + * PWM interface). */ + if (!((pwm[0] | pwm[1] | pwm[2]) & 0x80)) { + dev_info(&client->dev, "Reconfiguring PWM to " + "active high polarity\n"); + it87_write_value(client, IT87_REG_FAN_CTL, + tmp | 0x87); + for (i = 0; i < 3; i++) + it87_write_value(client, + IT87_REG_PWM(i), + 0x7f & ~pwm[i]); + return 1; + } + + dev_info(&client->dev, "PWM configuration is " + "too broken to be fixed\n"); + } + + dev_info(&client->dev, "Detected broken BIOS " + "defaults, disabling PWM interface\n"); + return 0; + } else if (fix_pwm_polarity) { + dev_info(&client->dev, "PWM configuration looks " + "sane, won't touch\n"); + } + + return 1; +} + /* Called when we have found a new IT87. */ static void it87_init_client(struct i2c_client *client, struct it87_data *data) { @@ -1038,8 +1084,8 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ + HZ / 2) || - (jiffies < data->last_updated) || !data->valid) { + if (time_after(jiffies, data->last_updated + HZ + HZ / 2) + || !data->valid) { if (update_vbat) { /* Cleared after each update, so reenable. Value @@ -1126,6 +1172,8 @@ MODULE_DESCRIPTION("IT8705F, IT8712F, Sis950 driver"); module_param(update_vbat, bool, 0); MODULE_PARM_DESC(update_vbat, "Update vbat if set else return powerup value"); +module_param(fix_pwm_polarity, bool, 0); +MODULE_PARM_DESC(fix_pwm_polarity, "Force PWM polarity to active high (DANGEROUS)"); MODULE_LICENSE("GPL"); module_init(sm_it87_init); diff -Nru a/drivers/i2c/chips/lm63.c b/drivers/i2c/chips/lm63.c --- a/drivers/i2c/chips/lm63.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/chips/lm63.c 2005-03-07 14:54:18 -08:00 @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -492,9 +493,7 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ) || - (jiffies < data->last_updated) || - !data->valid) { + if (time_after(jiffies, data->last_updated + HZ) || !data->valid) { if (data->config & 0x04) { /* tachometer enabled */ /* order matters for fan1_input */ data->fan1_input = i2c_smbus_read_byte_data(client, diff -Nru a/drivers/i2c/chips/lm75.c b/drivers/i2c/chips/lm75.c --- a/drivers/i2c/chips/lm75.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/chips/lm75.c 2005-03-07 14:54:18 -08:00 @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include "lm75.h" @@ -73,8 +74,6 @@ .detach_client = lm75_detach_client, }; -static int lm75_id; - #define show(value) \ static ssize_t show_##value(struct device *dev, char *buf) \ { \ @@ -196,8 +195,6 @@ /* Fill in the remaining client fields and put it into the global list */ strlcpy(new_client->name, name, I2C_NAME_SIZE); - - new_client->id = lm75_id++; data->valid = 0; init_MUTEX(&data->update_lock); @@ -263,8 +260,8 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ + HZ / 2) || - (jiffies < data->last_updated) || !data->valid) { + if (time_after(jiffies, data->last_updated + HZ + HZ / 2) + || !data->valid) { dev_dbg(&client->dev, "Starting lm75 update\n"); data->temp_input = lm75_read_value(client, LM75_REG_TEMP); diff -Nru a/drivers/i2c/chips/lm77.c b/drivers/i2c/chips/lm77.c --- a/drivers/i2c/chips/lm77.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/chips/lm77.c 2005-03-07 14:54:18 -08:00 @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -81,8 +82,6 @@ .detach_client = lm77_detach_client, }; -static int lm77_id; - /* straight from the datasheet */ #define LM77_TEMP_MIN (-55000) #define LM77_TEMP_MAX 125000 @@ -295,8 +294,6 @@ /* Fill in the remaining client fields and put it into the global list */ strlcpy(new_client->name, name, I2C_NAME_SIZE); - - new_client->id = lm77_id++; data->valid = 0; init_MUTEX(&data->update_lock); @@ -364,8 +361,8 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ + HZ / 2) || - (jiffies < data->last_updated) || !data->valid) { + if (time_after(jiffies, data->last_updated + HZ + HZ / 2) + || !data->valid) { dev_dbg(&client->dev, "Starting lm77 update\n"); data->temp_input = LM77_TEMP_FROM_REG(lm77_read_value(client, diff -Nru a/drivers/i2c/chips/lm78.c b/drivers/i2c/chips/lm78.c --- a/drivers/i2c/chips/lm78.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/chips/lm78.c 2005-03-07 14:54:18 -08:00 @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -81,9 +82,8 @@ static inline u8 FAN_TO_REG(long rpm, int div) { - if (rpm == 0) + if (rpm <= 0) return 255; - rpm = SENSORS_LIMIT(rpm, 1, 1000000); return SENSORS_LIMIT((1350000 + rpm * div / 2) / (rpm * div), 1, 254); } @@ -94,15 +94,15 @@ /* TEMP: mC (-128C to +127C) REG: 1C/bit, two's complement */ -static inline u8 TEMP_TO_REG(int val) +static inline s8 TEMP_TO_REG(int val) { int nval = SENSORS_LIMIT(val, -128000, 127000) ; - return nval<0 ? (nval-500)/1000+0x100 : (nval+500)/1000; + return nval<0 ? (nval-500)/1000 : (nval+500)/1000; } -static inline int TEMP_FROM_REG(u8 val) +static inline int TEMP_FROM_REG(s8 val) { - return (val>=0x80 ? val-0x100 : val) * 1000; + return val * 1000; } /* VID: mV @@ -112,16 +112,6 @@ return val==0x1f ? 0 : val>=0x10 ? 5100-val*100 : 2050-val*50; } -/* ALARMS: chip-specific bitmask - REG: (same) */ -#define ALARMS_FROM_REG(val) (val) - -/* FAN DIV: 1, 2, 4, or 8 (defaults to 2) - REG: 0, 1, 2, or 3 (respectively) (defaults to 1) */ -static inline u8 DIV_TO_REG(int val) -{ - return val==8 ? 3 : val==4 ? 2 : val==1 ? 0 : 1; -} #define DIV_FROM_REG(val) (1 << (val)) /* There are some complications in a module like this. First off, LM78 chips @@ -157,9 +147,9 @@ u8 in_min[7]; /* Register value */ u8 fan[3]; /* Register value */ u8 fan_min[3]; /* Register value */ - u8 temp; /* Register value */ - u8 temp_over; /* Register value */ - u8 temp_hyst; /* Register value */ + s8 temp; /* Register value */ + s8 temp_over; /* Register value */ + s8 temp_hyst; /* Register value */ u8 fan_div[3]; /* Register encoding, shifted right */ u8 vid; /* Register encoding, combined */ u16 alarms; /* Register encoding, combined */ @@ -357,7 +347,17 @@ DIV_FROM_REG(data->fan_div[nr])); unsigned long val = simple_strtoul(buf, NULL, 10); int reg = lm78_read_value(client, LM78_REG_VID_FANDIV); - data->fan_div[nr] = DIV_TO_REG(val); + switch (val) { + case 1: data->fan_div[nr] = 0; break; + case 2: data->fan_div[nr] = 1; break; + case 4: data->fan_div[nr] = 2; break; + case 8: data->fan_div[nr] = 3; break; + default: + dev_err(&client->dev, "fan_div value %ld not " + "supported. Choose one of 1, 2, 4 or 8!\n", val); + return -EINVAL; + } + switch (nr) { case 0: reg = (reg & 0xcf) | (data->fan_div[nr] << 4); @@ -430,7 +430,7 @@ static ssize_t show_alarms(struct device *dev, char *buf) { struct lm78_data *data = lm78_update_device(dev); - return sprintf(buf, "%d\n", ALARMS_FROM_REG(data->alarms)); + return sprintf(buf, "%u\n", data->alarms); } static DEVICE_ATTR(alarms, S_IRUGO, show_alarms, NULL); @@ -633,17 +633,15 @@ { int err; - /* release ISA region first */ - if(i2c_is_isa_client(client)) - release_region(client->addr, LM78_EXTENT); - - /* now it's safe to scrap the rest */ if ((err = i2c_detach_client(client))) { dev_err(&client->dev, "Client deregistration failed, client not detached.\n"); return err; } + if(i2c_is_isa_client(client)) + release_region(client->addr, LM78_EXTENT); + kfree(i2c_get_clientdata(client)); return 0; @@ -653,9 +651,7 @@ We don't want to lock the whole ISA bus, so we lock each client separately. We ignore the LM78 BUSY flag at this moment - it could lead to deadlocks, - would slow down the LM78 access and should not be necessary. - There are some ugly typecasts here, but the good new is - they should - nowhere else be necessary! */ + would slow down the LM78 access and should not be necessary. */ static int lm78_read_value(struct i2c_client *client, u8 reg) { int res; @@ -709,8 +705,8 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ + HZ / 2) || - (jiffies < data->last_updated) || !data->valid) { + if (time_after(jiffies, data->last_updated + HZ + HZ / 2) + || !data->valid) { dev_dbg(&client->dev, "Starting lm78 update\n"); diff -Nru a/drivers/i2c/chips/lm80.c b/drivers/i2c/chips/lm80.c --- a/drivers/i2c/chips/lm80.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/chips/lm80.c 2005-03-07 14:54:16 -08:00 @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -99,10 +100,7 @@ #define TEMP_LIMIT_TO_REG(val) SENSORS_LIMIT((val)<0?\ ((val)-500)/1000:((val)+500)/1000,0,255) -#define ALARMS_FROM_REG(val) (val) - #define DIV_FROM_REG(val) (1 << (val)) -#define DIV_TO_REG(val) ((val)==8?3:(val)==4?2:(val)==1?0:1) /* * Client data (each client gets its own) @@ -141,12 +139,6 @@ static int lm80_write_value(struct i2c_client *client, u8 reg, u8 value); /* - * Internal variables - */ - -static int lm80_id; - -/* * Driver data (common to all clients) */ @@ -269,7 +261,17 @@ DIV_FROM_REG(data->fan_div[nr])); val = simple_strtoul(buf, NULL, 10); - data->fan_div[nr] = DIV_TO_REG(val); + + switch (val) { + case 1: data->fan_div[nr] = 0; break; + case 2: data->fan_div[nr] = 1; break; + case 4: data->fan_div[nr] = 2; break; + case 8: data->fan_div[nr] = 3; break; + default: + dev_err(&client->dev, "fan_div value %ld not " + "supported. Choose one of 1, 2, 4 or 8!\n", val); + return -EINVAL; + } reg = (lm80_read_value(client, LM80_REG_FANDIV) & ~(3 << (2 * (nr + 1)))) | (data->fan_div[nr] << (2 * (nr + 1))); @@ -327,7 +329,7 @@ static ssize_t show_alarms(struct device *dev, char *buf) { struct lm80_data *data = lm80_update_device(dev); - return sprintf(buf, "%d\n", ALARMS_FROM_REG(data->alarms)); + return sprintf(buf, "%u\n", data->alarms); } static DEVICE_ATTR(in0_min, S_IWUSR | S_IRUGO, show_in_min0, set_in_min0); @@ -425,8 +427,6 @@ /* Fill in the remaining client fields and put it into the global list */ strlcpy(new_client->name, name, I2C_NAME_SIZE); - - new_client->id = lm80_id++; data->valid = 0; init_MUTEX(&data->update_lock); @@ -530,9 +530,7 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > 2 * HZ) || - (jiffies < data->last_updated) || !data->valid) { - + if (time_after(jiffies, data->last_updated + 2 * HZ) || !data->valid) { dev_dbg(&client->dev, "Starting lm80 update\n"); for (i = 0; i <= 6; i++) { data->in[i] = diff -Nru a/drivers/i2c/chips/lm83.c b/drivers/i2c/chips/lm83.c --- a/drivers/i2c/chips/lm83.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/chips/lm83.c 2005-03-07 14:54:17 -08:00 @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -150,12 +151,6 @@ }; /* - * Internal variables - */ - -static int lm83_id; - -/* * Sysfs stuff */ @@ -312,7 +307,6 @@ /* We can fill in the remaining client fields */ strlcpy(new_client->name, name, I2C_NAME_SIZE); - new_client->id = lm83_id++; data->valid = 0; init_MUTEX(&data->update_lock); @@ -369,9 +363,7 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ * 2) || - (jiffies < data->last_updated) || - !data->valid) { + if (time_after(jiffies, data->last_updated + HZ * 2) || !data->valid) { int nr; dev_dbg(&client->dev, "Updating lm83 data.\n"); diff -Nru a/drivers/i2c/chips/lm85.c b/drivers/i2c/chips/lm85.c --- a/drivers/i2c/chips/lm85.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/chips/lm85.c 2005-03-07 14:54:16 -08:00 @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -389,9 +390,6 @@ .detach_client = lm85_detach_client, }; -/* Unique ID assigned to each LM85 detected */ -static int lm85_id; - /* 4 Fans */ static ssize_t show_fan(struct device *dev, char *buf, int nr) @@ -1148,16 +1146,10 @@ strlcpy(new_client->name, type_name, I2C_NAME_SIZE); /* Fill in the remaining client fields */ - new_client->id = lm85_id++; data->type = kind; data->valid = 0; init_MUTEX(&data->update_lock); - dev_dbg(&adapter->dev, "Assigning ID %d to %s at %d,0x%02x\n", - new_client->id, new_client->name, - i2c_adapter_id(new_client->adapter), - new_client->addr); - /* Tell the I2C layer a new client has arrived */ if ((err = i2c_attach_client(new_client))) goto ERROR1; @@ -1363,7 +1355,7 @@ down(&data->update_lock); if ( !data->valid || - (jiffies - data->last_reading > LM85_DATA_INTERVAL ) ) { + time_after(jiffies, data->last_reading + LM85_DATA_INTERVAL) ) { /* Things that change quickly */ dev_dbg(&client->dev, "Reading sensor values\n"); @@ -1417,7 +1409,7 @@ }; /* last_reading */ if ( !data->valid || - (jiffies - data->last_config > LM85_CONFIG_INTERVAL) ) { + time_after(jiffies, data->last_config + LM85_CONFIG_INTERVAL) ) { /* Things that don't change often */ dev_dbg(&client->dev, "Reading config values\n"); diff -Nru a/drivers/i2c/chips/lm87.c b/drivers/i2c/chips/lm87.c --- a/drivers/i2c/chips/lm87.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/chips/lm87.c 2005-03-07 14:54:18 -08:00 @@ -56,6 +56,7 @@ #include #include #include +#include #include #include #include @@ -203,12 +204,6 @@ }; /* - * Internal variables - */ - -static int lm87_id; - -/* * Sysfs stuff */ @@ -569,7 +564,6 @@ /* We can fill in the remaining client fields */ strlcpy(new_client->name, "lm87", I2C_NAME_SIZE); - new_client->id = lm87_id++; data->valid = 0; init_MUTEX(&data->update_lock); @@ -720,9 +714,7 @@ down(&data->update_lock); - if (jiffies - data->last_updated > HZ - || jiffies < data->last_updated - || !data->valid) { + if (time_after(jiffies, data->last_updated + HZ) || !data->valid) { int i, j; dev_dbg(&client->dev, "Updating data.\n"); diff -Nru a/drivers/i2c/chips/lm90.c b/drivers/i2c/chips/lm90.c --- a/drivers/i2c/chips/lm90.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/chips/lm90.c 2005-03-07 14:54:16 -08:00 @@ -66,6 +66,7 @@ #include #include #include +#include #include #include @@ -190,12 +191,6 @@ }; /* - * Internal variables - */ - -static int lm90_id; - -/* * Sysfs stuff */ @@ -427,7 +422,6 @@ /* We can fill in the remaining client fields */ strlcpy(new_client->name, name, I2C_NAME_SIZE); - new_client->id = lm90_id++; data->valid = 0; init_MUTEX(&data->update_lock); @@ -495,9 +489,7 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ * 2) || - (jiffies < data->last_updated) || - !data->valid) { + if (time_after(jiffies, data->last_updated + HZ * 2) || !data->valid) { u8 oldh, newh; dev_dbg(&client->dev, "Updating lm90 data.\n"); diff -Nru a/drivers/i2c/chips/m41t00.c b/drivers/i2c/chips/m41t00.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/i2c/chips/m41t00.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,247 @@ +/* + * drivers/i2c/chips/m41t00.c + * + * I2C client/driver for the ST M41T00 Real-Time Clock chip. + * + * Author: Mark A. Greer + * + * 2005 (c) MontaVista Software, Inc. This file is licensed under + * the terms of the GNU General Public License version 2. This program + * is licensed "as is" without any warranty of any kind, whether express + * or implied. + */ +/* + * This i2c client/driver wedges between the drivers/char/genrtc.c RTC + * interface and the SMBus interface of the i2c subsystem. + * It would be more efficient to use i2c msgs/i2c_transfer directly but, as + * recommened in .../Documentation/i2c/writing-clients section + * "Sending and receiving", using SMBus level communication is preferred. + */ + +#include +#include +#include +#include +#include +#include + +#include +#include + +#define M41T00_DRV_NAME "m41t00" + +static DECLARE_MUTEX(m41t00_mutex); + +static struct i2c_driver m41t00_driver; +static struct i2c_client *save_client; + +static unsigned short ignore[] = { I2C_CLIENT_END }; +static unsigned short normal_addr[] = { 0x68, I2C_CLIENT_END }; + +static struct i2c_client_address_data addr_data = { + .normal_i2c = normal_addr, + .normal_i2c_range = ignore, + .probe = ignore, + .probe_range = ignore, + .ignore = ignore, + .ignore_range = ignore, + .force = ignore, +}; + +ulong +m41t00_get_rtc_time(void) +{ + s32 sec, min, hour, day, mon, year; + s32 sec1, min1, hour1, day1, mon1, year1; + ulong limit = 10; + + sec = min = hour = day = mon = year = 0; + sec1 = min1 = hour1 = day1 = mon1 = year1 = 0; + + down(&m41t00_mutex); + do { + if (((sec = i2c_smbus_read_byte_data(save_client, 0)) >= 0) + && ((min = i2c_smbus_read_byte_data(save_client, 1)) + >= 0) + && ((hour = i2c_smbus_read_byte_data(save_client, 2)) + >= 0) + && ((day = i2c_smbus_read_byte_data(save_client, 4)) + >= 0) + && ((mon = i2c_smbus_read_byte_data(save_client, 5)) + >= 0) + && ((year = i2c_smbus_read_byte_data(save_client, 6)) + >= 0) + && ((sec == sec1) && (min == min1) && (hour == hour1) + && (day == day1) && (mon == mon1) + && (year == year1))) + + break; + + sec1 = sec; + min1 = min; + hour1 = hour; + day1 = day; + mon1 = mon; + year1 = year; + } while (--limit > 0); + up(&m41t00_mutex); + + if (limit == 0) { + dev_warn(&save_client->dev, + "m41t00: can't read rtc chip\n"); + sec = min = hour = day = mon = year = 0; + } + + sec &= 0x7f; + min &= 0x7f; + hour &= 0x3f; + day &= 0x3f; + mon &= 0x1f; + year &= 0xff; + + BCD_TO_BIN(sec); + BCD_TO_BIN(min); + BCD_TO_BIN(hour); + BCD_TO_BIN(day); + BCD_TO_BIN(mon); + BCD_TO_BIN(year); + + year += 1900; + if (year < 1970) + year += 100; + + return mktime(year, mon, day, hour, min, sec); +} + +static void +m41t00_set_tlet(ulong arg) +{ + struct rtc_time tm; + ulong nowtime = *(ulong *)arg; + + to_tm(nowtime, &tm); + tm.tm_year = (tm.tm_year - 1900) % 100; + + BIN_TO_BCD(tm.tm_sec); + BIN_TO_BCD(tm.tm_min); + BIN_TO_BCD(tm.tm_hour); + BIN_TO_BCD(tm.tm_mon); + BIN_TO_BCD(tm.tm_mday); + BIN_TO_BCD(tm.tm_year); + + down(&m41t00_mutex); + if ((i2c_smbus_write_byte_data(save_client, 0, tm.tm_sec & 0x7f) < 0) + || (i2c_smbus_write_byte_data(save_client, 1, tm.tm_min & 0x7f) + < 0) + || (i2c_smbus_write_byte_data(save_client, 2, tm.tm_hour & 0x7f) + < 0) + || (i2c_smbus_write_byte_data(save_client, 4, tm.tm_mday & 0x7f) + < 0) + || (i2c_smbus_write_byte_data(save_client, 5, tm.tm_mon & 0x7f) + < 0) + || (i2c_smbus_write_byte_data(save_client, 6, tm.tm_year & 0x7f) + < 0)) + + dev_warn(&save_client->dev,"m41t00: can't write to rtc chip\n"); + + up(&m41t00_mutex); + return; +} + +ulong new_time; + +DECLARE_TASKLET_DISABLED(m41t00_tasklet, m41t00_set_tlet, (ulong)&new_time); + +int +m41t00_set_rtc_time(ulong nowtime) +{ + new_time = nowtime; + + if (in_interrupt()) + tasklet_schedule(&m41t00_tasklet); + else + m41t00_set_tlet((ulong)&new_time); + + return 0; +} + +/* + ***************************************************************************** + * + * Driver Interface + * + ***************************************************************************** + */ +static int +m41t00_probe(struct i2c_adapter *adap, int addr, int kind) +{ + struct i2c_client *client; + int rc; + + client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); + if (!client) + return -ENOMEM; + + memset(client, 0, sizeof(struct i2c_client)); + strncpy(client->name, M41T00_DRV_NAME, I2C_NAME_SIZE); + client->id = m41t00_driver.id; + client->flags = I2C_DF_NOTIFY; + client->addr = addr; + client->adapter = adap; + client->driver = &m41t00_driver; + + if ((rc = i2c_attach_client(client)) != 0) { + kfree(client); + return rc; + } + + save_client = client; + return 0; +} + +static int +m41t00_attach(struct i2c_adapter *adap) +{ + return i2c_probe(adap, &addr_data, m41t00_probe); +} + +static int +m41t00_detach(struct i2c_client *client) +{ + int rc; + + if ((rc = i2c_detach_client(client)) == 0) { + kfree(i2c_get_clientdata(client)); + tasklet_kill(&m41t00_tasklet); + } + return rc; +} + +static struct i2c_driver m41t00_driver = { + .owner = THIS_MODULE, + .name = M41T00_DRV_NAME, + .id = I2C_DRIVERID_STM41T00, + .flags = I2C_DF_NOTIFY, + .attach_adapter = m41t00_attach, + .detach_client = m41t00_detach, +}; + +static int __init +m41t00_init(void) +{ + return i2c_add_driver(&m41t00_driver); +} + +static void __exit +m41t00_exit(void) +{ + i2c_del_driver(&m41t00_driver); + return; +} + +module_init(m41t00_init); +module_exit(m41t00_exit); + +MODULE_AUTHOR("Mark A. Greer "); +MODULE_DESCRIPTION("ST Microelectronics M41T00 RTC I2C Client Driver"); +MODULE_LICENSE("GPL"); diff -Nru a/drivers/i2c/chips/max1619.c b/drivers/i2c/chips/max1619.c --- a/drivers/i2c/chips/max1619.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/chips/max1619.c 2005-03-07 14:54:18 -08:00 @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -117,12 +118,6 @@ }; /* - * Internal variables - */ - -static int max1619_id; - -/* * Sysfs stuff */ @@ -267,7 +262,6 @@ /* We can fill in the remaining client fields */ strlcpy(new_client->name, name, I2C_NAME_SIZE); - new_client->id = max1619_id++; data->valid = 0; init_MUTEX(&data->update_lock); @@ -331,10 +325,7 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ * 2) || - (jiffies < data->last_updated) || - !data->valid) { - + if (time_after(jiffies, data->last_updated + HZ * 2) || !data->valid) { dev_dbg(&client->dev, "Updating max1619 data.\n"); data->temp_input1 = i2c_smbus_read_byte_data(client, MAX1619_REG_R_LOCAL_TEMP); diff -Nru a/drivers/i2c/chips/pc87360.c b/drivers/i2c/chips/pc87360.c --- a/drivers/i2c/chips/pc87360.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/chips/pc87360.c 2005-03-07 14:54:16 -08:00 @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -1174,8 +1175,7 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ * 2) - || (jiffies < data->last_updated) || !data->valid) { + if (time_after(jiffies, data->last_updated + HZ * 2) || !data->valid) { dev_dbg(&client->dev, "Data update\n"); /* Fans */ diff -Nru a/drivers/i2c/chips/pcf8574.c b/drivers/i2c/chips/pcf8574.c --- a/drivers/i2c/chips/pcf8574.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/chips/pcf8574.c 2005-03-07 14:54:16 -08:00 @@ -77,8 +77,6 @@ .detach_client = pcf8574_detach_client, }; -static int pcf8574_id; - /* following are the sysfs callback functions */ static ssize_t show_read(struct device *dev, char *buf) { @@ -159,8 +157,6 @@ /* Fill in the remaining client fields and put it into the global list */ strlcpy(new_client->name, client_name, I2C_NAME_SIZE); - - new_client->id = pcf8574_id++; init_MUTEX(&data->update_lock); /* Tell the I2C layer a new client has arrived */ diff -Nru a/drivers/i2c/chips/pcf8591.c b/drivers/i2c/chips/pcf8591.c --- a/drivers/i2c/chips/pcf8591.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/chips/pcf8591.c 2005-03-07 14:54:18 -08:00 @@ -98,8 +98,6 @@ .detach_client = pcf8591_detach_client, }; -static int pcf8591_id; - /* following are the sysfs callback functions */ #define show_in_channel(channel) \ static ssize_t show_in##channel##_input(struct device *dev, char *buf) \ @@ -201,8 +199,6 @@ /* Fill in the remaining client fields and put it into the global list */ strlcpy(new_client->name, "pcf8591", I2C_NAME_SIZE); - - new_client->id = pcf8591_id++; init_MUTEX(&data->update_lock); /* Tell the I2C layer a new client has arrived */ diff -Nru a/drivers/i2c/chips/rtc8564.c b/drivers/i2c/chips/rtc8564.c --- a/drivers/i2c/chips/rtc8564.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/chips/rtc8564.c 2005-03-07 14:54:16 -08:00 @@ -89,7 +89,7 @@ _DBG(1, "client=%p, adr=%d, buf=%p, len=%d", client, adr, buf, len); - if (!buf || !client) { + if (!buf) { ret = -EINVAL; goto done; } @@ -111,7 +111,7 @@ struct i2c_msg wr; int i; - if (!client || !data || len > 15) { + if (!data || len > 15) { ret = -EINVAL; goto done; } @@ -163,14 +163,12 @@ strlcpy(new_client->name, "RTC8564", I2C_NAME_SIZE); i2c_set_clientdata(new_client, d); - new_client->id = rtc8564_driver.id; new_client->flags = I2C_CLIENT_ALLOW_USE | I2C_DF_NOTIFY; new_client->addr = addr; new_client->adapter = adap; new_client->driver = &rtc8564_driver; _DBG(1, "client=%p", new_client); - _DBG(1, "client.id=%d", new_client->id); /* init ctrl1 reg */ data[0] = 0; @@ -222,7 +220,7 @@ _DBG(1, "client=%p, dt=%p", client, dt); - if (!dt || !client) + if (!dt) return -EINVAL; memset(buf, 0, sizeof(buf)); @@ -256,7 +254,7 @@ _DBG(1, "client=%p, dt=%p", client, dt); - if (!dt || !client) + if (!dt) return -EINVAL; _DBGRTCTM(2, *dt); @@ -295,7 +293,7 @@ { struct rtc8564_data *data = i2c_get_clientdata(client); - if (!ctrl || !client) + if (!ctrl) return -1; *ctrl = data->ctrl; @@ -307,7 +305,7 @@ struct rtc8564_data *data = i2c_get_clientdata(client); unsigned char buf[2]; - if (!ctrl || !client) + if (!ctrl) return -1; buf[0] = *ctrl & 0xff; @@ -320,7 +318,7 @@ static int rtc8564_read_mem(struct i2c_client *client, struct mem *mem) { - if (!mem || !client) + if (!mem) return -EINVAL; return rtc8564_read(client, mem->loc, mem->data, mem->nr); @@ -329,7 +327,7 @@ static int rtc8564_write_mem(struct i2c_client *client, struct mem *mem) { - if (!mem || !client) + if (!mem) return -EINVAL; return rtc8564_write(client, mem->loc, mem->data, mem->nr); diff -Nru a/drivers/i2c/chips/sis5595.c b/drivers/i2c/chips/sis5595.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/i2c/chips/sis5595.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,794 @@ +/* + sis5595.c - Part of lm_sensors, Linux kernel modules + for hardware monitoring + + Copyright (C) 1998 - 2001 Frodo Looijaard , + Kyösti Mälkki , and + Mark D. Studebaker + Ported to Linux 2.6 by Aurelien Jarno with + the help of Jean Delvare + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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. +*/ + +/* + SiS southbridge has a LM78-like chip integrated on the same IC. + This driver is a customized copy of lm78.c + + Supports following revisions: + Version PCI ID PCI Revision + 1 1039/0008 AF or less + 2 1039/0008 B0 or greater + + Note: these chips contain a 0008 device which is incompatible with the + 5595. We recognize these by the presence of the listed + "blacklist" PCI ID and refuse to load. + + NOT SUPPORTED PCI ID BLACKLIST PCI ID + 540 0008 0540 + 550 0008 0550 + 5513 0008 5511 + 5581 0008 5597 + 5582 0008 5597 + 5597 0008 5597 + 5598 0008 5597/5598 + 630 0008 0630 + 645 0008 0645 + 730 0008 0730 + 735 0008 0735 +*/ + +#include +#include +#include +#include +#include +#include +#include +#include + + +/* If force_addr is set to anything different from 0, we forcibly enable + the device at the given address. */ +static u16 force_addr; +module_param(force_addr, ushort, 0); +MODULE_PARM_DESC(force_addr, + "Initialize the base address of the sensors"); + +/* Addresses to scan. + Note that we can't determine the ISA address until we have initialized + our module */ +static unsigned short normal_i2c[] = { I2C_CLIENT_END }; +static unsigned int normal_isa[] = { 0x0000, I2C_CLIENT_ISA_END }; + +/* Insmod parameters */ +SENSORS_INSMOD_1(sis5595); + +/* Many SIS5595 constants specified below */ + +/* Length of ISA address segment */ +#define SIS5595_EXTENT 8 +/* PCI Config Registers */ +#define SIS5595_REVISION_REG 0x08 +#define SIS5595_BASE_REG 0x68 +#define SIS5595_PIN_REG 0x7A +#define SIS5595_ENABLE_REG 0x7B + +/* Where are the ISA address/data registers relative to the base address */ +#define SIS5595_ADDR_REG_OFFSET 5 +#define SIS5595_DATA_REG_OFFSET 6 + +/* The SIS5595 registers */ +#define SIS5595_REG_IN_MAX(nr) (0x2b + (nr) * 2) +#define SIS5595_REG_IN_MIN(nr) (0x2c + (nr) * 2) +#define SIS5595_REG_IN(nr) (0x20 + (nr)) + +#define SIS5595_REG_FAN_MIN(nr) (0x3b + (nr)) +#define SIS5595_REG_FAN(nr) (0x28 + (nr)) + +/* On the first version of the chip, the temp registers are separate. + On the second version, + TEMP pin is shared with IN4, configured in PCI register 0x7A. + The registers are the same as well. + OVER and HYST are really MAX and MIN. */ + +#define REV2MIN 0xb0 +#define SIS5595_REG_TEMP (( data->revision) >= REV2MIN) ? \ + SIS5595_REG_IN(4) : 0x27 +#define SIS5595_REG_TEMP_OVER (( data->revision) >= REV2MIN) ? \ + SIS5595_REG_IN_MAX(4) : 0x39 +#define SIS5595_REG_TEMP_HYST (( data->revision) >= REV2MIN) ? \ + SIS5595_REG_IN_MIN(4) : 0x3a + +#define SIS5595_REG_CONFIG 0x40 +#define SIS5595_REG_ALARM1 0x41 +#define SIS5595_REG_ALARM2 0x42 +#define SIS5595_REG_FANDIV 0x47 + +/* Conversions. Limit checking is only done on the TO_REG + variants. */ + +/* IN: mV, (0V to 4.08V) + REG: 16mV/bit */ +static inline u8 IN_TO_REG(unsigned long val) +{ + unsigned long nval = SENSORS_LIMIT(val, 0, 4080); + return (nval + 8) / 16; +} +#define IN_FROM_REG(val) ((val) * 16) + +static inline u8 FAN_TO_REG(long rpm, int div) +{ + if (rpm <= 0) + return 255; + return SENSORS_LIMIT((1350000 + rpm * div / 2) / (rpm * div), 1, 254); +} + +static inline int FAN_FROM_REG(u8 val, int div) +{ + return val==0 ? -1 : val==255 ? 0 : 1350000/(val*div); +} + +/* TEMP: mC (-54.12C to +157.53C) + REG: 0.83C/bit + 52.12, two's complement */ +static inline int TEMP_FROM_REG(s8 val) +{ + return val * 830 + 52120; +} +static inline s8 TEMP_TO_REG(int val) +{ + int nval = SENSORS_LIMIT(val, -54120, 157530) ; + return nval<0 ? (nval-5212-415)/830 : (nval-5212+415)/830; +} + +/* FAN DIV: 1, 2, 4, or 8 (defaults to 2) + REG: 0, 1, 2, or 3 (respectively) (defaults to 1) */ +static inline u8 DIV_TO_REG(int val) +{ + return val==8 ? 3 : val==4 ? 2 : val==1 ? 0 : 1; +} +#define DIV_FROM_REG(val) (1 << (val)) + +/* For the SIS5595, we need to keep some data in memory. That + data is pointed to by sis5595_list[NR]->data. The structure itself is + dynamically allocated, at the time when the new sis5595 client is + allocated. */ +struct sis5595_data { + struct i2c_client client; + struct semaphore lock; + + struct semaphore update_lock; + char valid; /* !=0 if following fields are valid */ + unsigned long last_updated; /* In jiffies */ + char maxins; /* == 3 if temp enabled, otherwise == 4 */ + u8 revision; /* Reg. value */ + + u8 in[5]; /* Register value */ + u8 in_max[5]; /* Register value */ + u8 in_min[5]; /* Register value */ + u8 fan[2]; /* Register value */ + u8 fan_min[2]; /* Register value */ + s8 temp; /* Register value */ + s8 temp_over; /* Register value */ + s8 temp_hyst; /* Register value */ + u8 fan_div[2]; /* Register encoding, shifted right */ + u16 alarms; /* Register encoding, combined */ +}; + +static struct pci_dev *s_bridge; /* pointer to the (only) sis5595 */ + +static int sis5595_attach_adapter(struct i2c_adapter *adapter); +static int sis5595_detect(struct i2c_adapter *adapter, int address, int kind); +static int sis5595_detach_client(struct i2c_client *client); + +static int sis5595_read_value(struct i2c_client *client, u8 register); +static int sis5595_write_value(struct i2c_client *client, u8 register, u8 value); +static struct sis5595_data *sis5595_update_device(struct device *dev); +static void sis5595_init_client(struct i2c_client *client); + +static struct i2c_driver sis5595_driver = { + .owner = THIS_MODULE, + .name = "sis5595", + .id = I2C_DRIVERID_SIS5595, + .flags = I2C_DF_NOTIFY, + .attach_adapter = sis5595_attach_adapter, + .detach_client = sis5595_detach_client, +}; + +/* 4 Voltages */ +static ssize_t show_in(struct device *dev, char *buf, int nr) +{ + struct sis5595_data *data = sis5595_update_device(dev); + return sprintf(buf, "%d\n", IN_FROM_REG(data->in[nr])); +} + +static ssize_t show_in_min(struct device *dev, char *buf, int nr) +{ + struct sis5595_data *data = sis5595_update_device(dev); + return sprintf(buf, "%d\n", IN_FROM_REG(data->in_min[nr])); +} + +static ssize_t show_in_max(struct device *dev, char *buf, int nr) +{ + struct sis5595_data *data = sis5595_update_device(dev); + return sprintf(buf, "%d\n", IN_FROM_REG(data->in_max[nr])); +} + +static ssize_t set_in_min(struct device *dev, const char *buf, + size_t count, int nr) +{ + struct i2c_client *client = to_i2c_client(dev); + struct sis5595_data *data = i2c_get_clientdata(client); + unsigned long val = simple_strtoul(buf, NULL, 10); + data->in_min[nr] = IN_TO_REG(val); + sis5595_write_value(client, SIS5595_REG_IN_MIN(nr), data->in_min[nr]); + return count; +} + +static ssize_t set_in_max(struct device *dev, const char *buf, + size_t count, int nr) +{ + struct i2c_client *client = to_i2c_client(dev); + struct sis5595_data *data = i2c_get_clientdata(client); + unsigned long val = simple_strtoul(buf, NULL, 10); + data->in_max[nr] = IN_TO_REG(val); + sis5595_write_value(client, SIS5595_REG_IN_MAX(nr), data->in_max[nr]); + return count; +} + +#define show_in_offset(offset) \ +static ssize_t \ + show_in##offset (struct device *dev, char *buf) \ +{ \ + return show_in(dev, buf, offset); \ +} \ +static DEVICE_ATTR(in##offset##_input, S_IRUGO, \ + show_in##offset, NULL); \ +static ssize_t \ + show_in##offset##_min (struct device *dev, char *buf) \ +{ \ + return show_in_min(dev, buf, offset); \ +} \ +static ssize_t \ + show_in##offset##_max (struct device *dev, char *buf) \ +{ \ + return show_in_max(dev, buf, offset); \ +} \ +static ssize_t set_in##offset##_min (struct device *dev, \ + const char *buf, size_t count) \ +{ \ + return set_in_min(dev, buf, count, offset); \ +} \ +static ssize_t set_in##offset##_max (struct device *dev, \ + const char *buf, size_t count) \ +{ \ + return set_in_max(dev, buf, count, offset); \ +} \ +static DEVICE_ATTR(in##offset##_min, S_IRUGO | S_IWUSR, \ + show_in##offset##_min, set_in##offset##_min); \ +static DEVICE_ATTR(in##offset##_max, S_IRUGO | S_IWUSR, \ + show_in##offset##_max, set_in##offset##_max); + +show_in_offset(0); +show_in_offset(1); +show_in_offset(2); +show_in_offset(3); +show_in_offset(4); + +/* Temperature */ +static ssize_t show_temp(struct device *dev, char *buf) +{ + struct sis5595_data *data = sis5595_update_device(dev); + return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp)); +} + +static ssize_t show_temp_over(struct device *dev, char *buf) +{ + struct sis5595_data *data = sis5595_update_device(dev); + return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_over)); +} + +static ssize_t set_temp_over(struct device *dev, const char *buf, size_t count) +{ + struct i2c_client *client = to_i2c_client(dev); + struct sis5595_data *data = i2c_get_clientdata(client); + long val = simple_strtol(buf, NULL, 10); + data->temp_over = TEMP_TO_REG(val); + sis5595_write_value(client, SIS5595_REG_TEMP_OVER, data->temp_over); + return count; +} + +static ssize_t show_temp_hyst(struct device *dev, char *buf) +{ + struct sis5595_data *data = sis5595_update_device(dev); + return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_hyst)); +} + +static ssize_t set_temp_hyst(struct device *dev, const char *buf, size_t count) +{ + struct i2c_client *client = to_i2c_client(dev); + struct sis5595_data *data = i2c_get_clientdata(client); + long val = simple_strtol(buf, NULL, 10); + data->temp_hyst = TEMP_TO_REG(val); + sis5595_write_value(client, SIS5595_REG_TEMP_HYST, data->temp_hyst); + return count; +} + +static DEVICE_ATTR(temp1_input, S_IRUGO, show_temp, NULL); +static DEVICE_ATTR(temp1_max, S_IRUGO | S_IWUSR, + show_temp_over, set_temp_over); +static DEVICE_ATTR(temp1_max_hyst, S_IRUGO | S_IWUSR, + show_temp_hyst, set_temp_hyst); + +/* 2 Fans */ +static ssize_t show_fan(struct device *dev, char *buf, int nr) +{ + struct sis5595_data *data = sis5595_update_device(dev); + return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan[nr], + DIV_FROM_REG(data->fan_div[nr])) ); +} + +static ssize_t show_fan_min(struct device *dev, char *buf, int nr) +{ + struct sis5595_data *data = sis5595_update_device(dev); + return sprintf(buf,"%d\n", FAN_FROM_REG(data->fan_min[nr], + DIV_FROM_REG(data->fan_div[nr])) ); +} + +static ssize_t set_fan_min(struct device *dev, const char *buf, + size_t count, int nr) +{ + struct i2c_client *client = to_i2c_client(dev); + struct sis5595_data *data = i2c_get_clientdata(client); + unsigned long val = simple_strtoul(buf, NULL, 10); + data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); + sis5595_write_value(client, SIS5595_REG_FAN_MIN(nr), data->fan_min[nr]); + return count; +} + +static ssize_t show_fan_div(struct device *dev, char *buf, int nr) +{ + struct sis5595_data *data = sis5595_update_device(dev); + return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr]) ); +} + +/* Note: we save and restore the fan minimum here, because its value is + determined in part by the fan divisor. This follows the principle of + least suprise; the user doesn't expect the fan minimum to change just + because the divisor changed. */ +static ssize_t set_fan_div(struct device *dev, const char *buf, + size_t count, int nr) +{ + struct i2c_client *client = to_i2c_client(dev); + struct sis5595_data *data = i2c_get_clientdata(client); + unsigned long min = FAN_FROM_REG(data->fan_min[nr], + DIV_FROM_REG(data->fan_div[nr])); + unsigned long val = simple_strtoul(buf, NULL, 10); + int reg = sis5595_read_value(client, SIS5595_REG_FANDIV); + switch (val) { + case 1: data->fan_div[nr] = 0; break; + case 2: data->fan_div[nr] = 1; break; + case 4: data->fan_div[nr] = 2; break; + case 8: data->fan_div[nr] = 3; break; + default: + dev_err(&client->dev, "fan_div value %ld not " + "supported. Choose one of 1, 2, 4 or 8!\n", val); + return -EINVAL; + } + + switch (nr) { + case 0: + reg = (reg & 0xcf) | (data->fan_div[nr] << 4); + break; + case 1: + reg = (reg & 0x3f) | (data->fan_div[nr] << 6); + break; + } + sis5595_write_value(client, SIS5595_REG_FANDIV, reg); + data->fan_min[nr] = + FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); + sis5595_write_value(client, SIS5595_REG_FAN_MIN(nr), data->fan_min[nr]); + return count; +} + +#define show_fan_offset(offset) \ +static ssize_t show_fan_##offset (struct device *dev, char *buf) \ +{ \ + return show_fan(dev, buf, offset - 1); \ +} \ +static ssize_t show_fan_##offset##_min (struct device *dev, char *buf) \ +{ \ + return show_fan_min(dev, buf, offset - 1); \ +} \ +static ssize_t show_fan_##offset##_div (struct device *dev, char *buf) \ +{ \ + return show_fan_div(dev, buf, offset - 1); \ +} \ +static ssize_t set_fan_##offset##_min (struct device *dev, \ + const char *buf, size_t count) \ +{ \ + return set_fan_min(dev, buf, count, offset - 1); \ +} \ +static DEVICE_ATTR(fan##offset##_input, S_IRUGO, show_fan_##offset, NULL);\ +static DEVICE_ATTR(fan##offset##_min, S_IRUGO | S_IWUSR, \ + show_fan_##offset##_min, set_fan_##offset##_min); + +show_fan_offset(1); +show_fan_offset(2); + +static ssize_t set_fan_1_div(struct device *dev, const char *buf, + size_t count) +{ + return set_fan_div(dev, buf, count, 0) ; +} + +static ssize_t set_fan_2_div(struct device *dev, const char *buf, + size_t count) +{ + return set_fan_div(dev, buf, count, 1) ; +} +static DEVICE_ATTR(fan1_div, S_IRUGO | S_IWUSR, + show_fan_1_div, set_fan_1_div); +static DEVICE_ATTR(fan2_div, S_IRUGO | S_IWUSR, + show_fan_2_div, set_fan_2_div); + +/* Alarms */ +static ssize_t show_alarms(struct device *dev, char *buf) +{ + struct sis5595_data *data = sis5595_update_device(dev); + return sprintf(buf, "%d\n", data->alarms); +} +static DEVICE_ATTR(alarms, S_IRUGO, show_alarms, NULL); + +/* This is called when the module is loaded */ +static int sis5595_attach_adapter(struct i2c_adapter *adapter) +{ + if (!(adapter->class & I2C_CLASS_HWMON)) + return 0; + return i2c_detect(adapter, &addr_data, sis5595_detect); +} + +int sis5595_detect(struct i2c_adapter *adapter, int address, int kind) +{ + int err = 0; + int i; + struct i2c_client *new_client; + struct sis5595_data *data; + char val; + u16 a; + + /* Make sure we are probing the ISA bus!! */ + if (!i2c_is_isa_adapter(adapter)) + goto exit; + + if (force_addr) + address = force_addr & ~(SIS5595_EXTENT - 1); + /* Reserve the ISA region */ + if (!request_region(address, SIS5595_EXTENT, sis5595_driver.name)) { + err = -EBUSY; + goto exit; + } + if (force_addr) { + dev_warn(&adapter->dev, "forcing ISA address 0x%04X\n", address); + if (PCIBIOS_SUCCESSFUL != + pci_write_config_word(s_bridge, SIS5595_BASE_REG, address)) + goto exit_release; + if (PCIBIOS_SUCCESSFUL != + pci_read_config_word(s_bridge, SIS5595_BASE_REG, &a)) + goto exit_release; + if ((a & ~(SIS5595_EXTENT - 1)) != address) + /* doesn't work for some chips? */ + goto exit_release; + } + + if (PCIBIOS_SUCCESSFUL != + pci_read_config_byte(s_bridge, SIS5595_ENABLE_REG, &val)) { + goto exit_release; + } + if ((val & 0x80) == 0) { + if (PCIBIOS_SUCCESSFUL != + pci_write_config_byte(s_bridge, SIS5595_ENABLE_REG, + val | 0x80)) + goto exit_release; + if (PCIBIOS_SUCCESSFUL != + pci_read_config_byte(s_bridge, SIS5595_ENABLE_REG, &val)) + goto exit_release; + if ((val & 0x80) == 0) + /* doesn't work for some chips! */ + goto exit_release; + } + + if (!(data = kmalloc(sizeof(struct sis5595_data), GFP_KERNEL))) { + err = -ENOMEM; + goto exit_release; + } + memset(data, 0, sizeof(struct sis5595_data)); + + new_client = &data->client; + new_client->addr = address; + init_MUTEX(&data->lock); + i2c_set_clientdata(new_client, data); + new_client->adapter = adapter; + new_client->driver = &sis5595_driver; + new_client->flags = 0; + + /* Check revision and pin registers to determine whether 4 or 5 voltages */ + pci_read_config_byte(s_bridge, SIS5595_REVISION_REG, &(data->revision)); + /* 4 voltages, 1 temp */ + data->maxins = 3; + if (data->revision >= REV2MIN) { + pci_read_config_byte(s_bridge, SIS5595_PIN_REG, &val); + if (!(val & 0x80)) + /* 5 voltages, no temps */ + data->maxins = 4; + } + + /* Fill in the remaining client fields and put it into the global list */ + strlcpy(new_client->name, "sis5595", I2C_NAME_SIZE); + + data->valid = 0; + init_MUTEX(&data->update_lock); + + /* Tell the I2C layer a new client has arrived */ + if ((err = i2c_attach_client(new_client))) + goto exit_free; + + /* Initialize the SIS5595 chip */ + sis5595_init_client(new_client); + + /* A few vars need to be filled upon startup */ + for (i = 0; i < 2; i++) { + data->fan_min[i] = sis5595_read_value(new_client, + SIS5595_REG_FAN_MIN(i)); + } + + /* Register sysfs hooks */ + device_create_file(&new_client->dev, &dev_attr_in0_input); + device_create_file(&new_client->dev, &dev_attr_in0_min); + device_create_file(&new_client->dev, &dev_attr_in0_max); + device_create_file(&new_client->dev, &dev_attr_in1_input); + device_create_file(&new_client->dev, &dev_attr_in1_min); + device_create_file(&new_client->dev, &dev_attr_in1_max); + device_create_file(&new_client->dev, &dev_attr_in2_input); + device_create_file(&new_client->dev, &dev_attr_in2_min); + device_create_file(&new_client->dev, &dev_attr_in2_max); + device_create_file(&new_client->dev, &dev_attr_in3_input); + device_create_file(&new_client->dev, &dev_attr_in3_min); + device_create_file(&new_client->dev, &dev_attr_in3_max); + if (data->maxins == 4) { + device_create_file(&new_client->dev, &dev_attr_in4_input); + device_create_file(&new_client->dev, &dev_attr_in4_min); + device_create_file(&new_client->dev, &dev_attr_in4_max); + } + device_create_file(&new_client->dev, &dev_attr_fan1_input); + device_create_file(&new_client->dev, &dev_attr_fan1_min); + device_create_file(&new_client->dev, &dev_attr_fan1_div); + device_create_file(&new_client->dev, &dev_attr_fan2_input); + device_create_file(&new_client->dev, &dev_attr_fan2_min); + device_create_file(&new_client->dev, &dev_attr_fan2_div); + device_create_file(&new_client->dev, &dev_attr_alarms); + if (data->maxins == 3) { + device_create_file(&new_client->dev, &dev_attr_temp1_input); + device_create_file(&new_client->dev, &dev_attr_temp1_max); + device_create_file(&new_client->dev, &dev_attr_temp1_max_hyst); + } + return 0; + +exit_free: + kfree(data); +exit_release: + release_region(address, SIS5595_EXTENT); +exit: + return err; +} + +static int sis5595_detach_client(struct i2c_client *client) +{ + int err; + + if ((err = i2c_detach_client(client))) { + dev_err(&client->dev, + "Client deregistration failed, client not detached.\n"); + return err; + } + + if (i2c_is_isa_client(client)) + release_region(client->addr, SIS5595_EXTENT); + + kfree(i2c_get_clientdata(client)); + + return 0; +} + + +/* ISA access must be locked explicitly. */ +static int sis5595_read_value(struct i2c_client *client, u8 reg) +{ + int res; + + struct sis5595_data *data = i2c_get_clientdata(client); + down(&data->lock); + outb_p(reg, client->addr + SIS5595_ADDR_REG_OFFSET); + res = inb_p(client->addr + SIS5595_DATA_REG_OFFSET); + up(&data->lock); + return res; +} + +static int sis5595_write_value(struct i2c_client *client, u8 reg, u8 value) +{ + struct sis5595_data *data = i2c_get_clientdata(client); + down(&data->lock); + outb_p(reg, client->addr + SIS5595_ADDR_REG_OFFSET); + outb_p(value, client->addr + SIS5595_DATA_REG_OFFSET); + up(&data->lock); + return 0; +} + +/* Called when we have found a new SIS5595. */ +static void sis5595_init_client(struct i2c_client *client) +{ + u8 config = sis5595_read_value(client, SIS5595_REG_CONFIG); + if (!(config & 0x01)) + sis5595_write_value(client, SIS5595_REG_CONFIG, + (config & 0xf7) | 0x01); +} + +static struct sis5595_data *sis5595_update_device(struct device *dev) +{ + struct i2c_client *client = to_i2c_client(dev); + struct sis5595_data *data = i2c_get_clientdata(client); + int i; + + down(&data->update_lock); + + if (time_after(jiffies, data->last_updated + HZ + HZ / 2) + || !data->valid) { + + for (i = 0; i <= data->maxins; i++) { + data->in[i] = + sis5595_read_value(client, SIS5595_REG_IN(i)); + data->in_min[i] = + sis5595_read_value(client, + SIS5595_REG_IN_MIN(i)); + data->in_max[i] = + sis5595_read_value(client, + SIS5595_REG_IN_MAX(i)); + } + for (i = 0; i < 2; i++) { + data->fan[i] = + sis5595_read_value(client, SIS5595_REG_FAN(i)); + data->fan_min[i] = + sis5595_read_value(client, + SIS5595_REG_FAN_MIN(i)); + } + if (data->maxins == 3) { + data->temp = + sis5595_read_value(client, SIS5595_REG_TEMP); + data->temp_over = + sis5595_read_value(client, SIS5595_REG_TEMP_OVER); + data->temp_hyst = + sis5595_read_value(client, SIS5595_REG_TEMP_HYST); + } + i = sis5595_read_value(client, SIS5595_REG_FANDIV); + data->fan_div[0] = (i >> 4) & 0x03; + data->fan_div[1] = i >> 6; + data->alarms = + sis5595_read_value(client, SIS5595_REG_ALARM1) | + (sis5595_read_value(client, SIS5595_REG_ALARM2) << 8); + data->last_updated = jiffies; + data->valid = 1; + } + + up(&data->update_lock); + + return data; +} + +static struct pci_device_id sis5595_pci_ids[] = { + { PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503) }, + { 0, } +}; + +MODULE_DEVICE_TABLE(pci, sis5595_pci_ids); + +static int blacklist[] __devinitdata = { + PCI_DEVICE_ID_SI_540, + PCI_DEVICE_ID_SI_550, + PCI_DEVICE_ID_SI_630, + PCI_DEVICE_ID_SI_645, + PCI_DEVICE_ID_SI_730, + PCI_DEVICE_ID_SI_735, + PCI_DEVICE_ID_SI_5511, /* 5513 chip has the 0008 device but + that ID shows up in other chips so we + use the 5511 ID for recognition */ + PCI_DEVICE_ID_SI_5597, + PCI_DEVICE_ID_SI_5598, + 0 }; + +static int __devinit sis5595_pci_probe(struct pci_dev *dev, + const struct pci_device_id *id) +{ + u16 val; + int *i; + int addr = 0; + + for (i = blacklist; *i != 0; i++) { + struct pci_dev *dev; + dev = pci_get_device(PCI_VENDOR_ID_SI, *i, NULL); + if (dev) { + dev_err(&dev->dev, "Looked for SIS5595 but found unsupported device %.4x\n", *i); + pci_dev_put(dev); + return -ENODEV; + } + } + + if (PCIBIOS_SUCCESSFUL != + pci_read_config_word(dev, SIS5595_BASE_REG, &val)) + return -ENODEV; + + addr = val & ~(SIS5595_EXTENT - 1); + if (addr == 0 && force_addr == 0) { + dev_err(&dev->dev, "Base address not set - upgrade BIOS or use force_addr=0xaddr\n"); + return -ENODEV; + } + if (force_addr) + addr = force_addr; /* so detect will get called */ + + if (!addr) { + dev_err(&dev->dev,"No SiS 5595 sensors found.\n"); + return -ENODEV; + } + normal_isa[0] = addr; + + s_bridge = pci_dev_get(dev); + if (i2c_add_driver(&sis5595_driver)) { + pci_dev_put(s_bridge); + s_bridge = NULL; + } + + /* Always return failure here. This is to allow other drivers to bind + * to this pci device. We don't really want to have control over the + * pci device, we only wanted to read as few register values from it. + */ + return -ENODEV; +} + +static struct pci_driver sis5595_pci_driver = { + .name = "sis5595", + .id_table = sis5595_pci_ids, + .probe = sis5595_pci_probe, +}; + +static int __init sm_sis5595_init(void) +{ + return pci_register_driver(&sis5595_pci_driver); +} + +static void __exit sm_sis5595_exit(void) +{ + pci_unregister_driver(&sis5595_pci_driver); + if (s_bridge != NULL) { + i2c_del_driver(&sis5595_driver); + pci_dev_put(s_bridge); + s_bridge = NULL; + } +} + +MODULE_AUTHOR("Aurelien Jarno "); +MODULE_DESCRIPTION("SiS 5595 Sensor device"); +MODULE_LICENSE("GPL"); + +module_init(sm_sis5595_init); +module_exit(sm_sis5595_exit); diff -Nru a/drivers/i2c/chips/smsc47b397.c b/drivers/i2c/chips/smsc47b397.c --- a/drivers/i2c/chips/smsc47b397.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/chips/smsc47b397.c 2005-03-07 14:54:18 -08:00 @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -130,9 +131,7 @@ down(&data->update_lock); - if (time_after(jiffies - data->last_updated, (unsigned long)HZ) - || time_before(jiffies, data->last_updated) || !data->valid) { - + if (time_after(jiffies, data->last_updated + HZ) || !data->valid) { dev_dbg(&client->dev, "starting device update...\n"); /* 4 temperature inputs, 4 fan inputs */ diff -Nru a/drivers/i2c/chips/smsc47m1.c b/drivers/i2c/chips/smsc47m1.c --- a/drivers/i2c/chips/smsc47m1.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/chips/smsc47m1.c 2005-03-07 14:54:16 -08:00 @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -108,7 +109,6 @@ struct smsc47m1_data { struct i2c_client client; struct semaphore lock; - int sysctl_id; struct semaphore update_lock; unsigned long last_updated; /* In jiffies */ @@ -133,8 +133,6 @@ int init); -static int smsc47m1_id; - static struct i2c_driver smsc47m1_driver = { .owner = THIS_MODULE, .name = "smsc47m1", @@ -420,8 +418,6 @@ new_client->flags = 0; strlcpy(new_client->name, "smsc47m1", I2C_NAME_SIZE); - - new_client->id = smsc47m1_id++; init_MUTEX(&data->update_lock); /* If no function is properly configured, there's no point in @@ -532,8 +528,7 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ + HZ / 2) || - (jiffies < data->last_updated) || init) { + if (time_after(jiffies, data->last_updated + HZ + HZ / 2) || init) { int i; for (i = 0; i < 2; i++) { diff -Nru a/drivers/i2c/chips/via686a.c b/drivers/i2c/chips/via686a.c --- a/drivers/i2c/chips/via686a.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/chips/via686a.c 2005-03-07 14:54:16 -08:00 @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -726,9 +727,8 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ + HZ / 2) || - (jiffies < data->last_updated) || !data->valid) { - + if (time_after(jiffies, data->last_updated + HZ + HZ / 2) + || !data->valid) { for (i = 0; i <= 4; i++) { data->in[i] = via686a_read_value(client, VIA686A_REG_IN(i)); diff -Nru a/drivers/i2c/chips/w83627hf.c b/drivers/i2c/chips/w83627hf.c --- a/drivers/i2c/chips/w83627hf.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/chips/w83627hf.c 2005-03-07 14:54:17 -08:00 @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -1321,6 +1322,27 @@ data->pwmenable[2] = 1; if(init) { + /* Enable temp2 */ + tmp = w83627hf_read_value(client, W83781D_REG_TEMP2_CONFIG); + if (tmp & 0x01) { + dev_warn(&client->dev, "Enabling temp2, readings " + "might not make sense\n"); + w83627hf_write_value(client, W83781D_REG_TEMP2_CONFIG, + tmp & 0xfe); + } + + /* Enable temp3 */ + if (type != w83697hf) { + tmp = w83627hf_read_value(client, + W83781D_REG_TEMP3_CONFIG); + if (tmp & 0x01) { + dev_warn(&client->dev, "Enabling temp3, " + "readings might not make sense\n"); + w83627hf_write_value(client, + W83781D_REG_TEMP3_CONFIG, tmp & 0xfe); + } + } + if (type == w83627hf) { /* enable PWM2 control (can't hurt since PWM reg should have been reset to 0xff) */ @@ -1350,8 +1372,8 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ + HZ / 2) || - (jiffies < data->last_updated) || !data->valid) { + if (time_after(jiffies, data->last_updated + HZ + HZ / 2) + || !data->valid) { for (i = 0; i <= 8; i++) { /* skip missing sensors */ if (((data->type == w83697hf) && (i == 1)) || diff -Nru a/drivers/i2c/chips/w83781d.c b/drivers/i2c/chips/w83781d.c --- a/drivers/i2c/chips/w83781d.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/chips/w83781d.c 2005-03-07 14:54:16 -08:00 @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -1562,11 +1563,28 @@ } #endif /* W83781D_RT */ - if (init) { + if (init && type != as99127f) { + /* Enable temp2 */ + tmp = w83781d_read_value(client, W83781D_REG_TEMP2_CONFIG); + if (tmp & 0x01) { + dev_warn(&client->dev, "Enabling temp2, readings " + "might not make sense\n"); + w83781d_write_value(client, W83781D_REG_TEMP2_CONFIG, + tmp & 0xfe); + } + + /* Enable temp3 */ if (type != w83783s && type != w83697hf) { - w83781d_write_value(client, W83781D_REG_TEMP3_CONFIG, - 0x00); + tmp = w83781d_read_value(client, + W83781D_REG_TEMP3_CONFIG); + if (tmp & 0x01) { + dev_warn(&client->dev, "Enabling temp3, " + "readings might not make sense\n"); + w83781d_write_value(client, + W83781D_REG_TEMP3_CONFIG, tmp & 0xfe); + } } + if (type != w83781d) { /* enable comparator mode for temp2 and temp3 so alarm indication will work correctly */ @@ -1592,9 +1610,8 @@ down(&data->update_lock); - if (time_after - (jiffies - data->last_updated, (unsigned long) (HZ + HZ / 2)) - || time_before(jiffies, data->last_updated) || !data->valid) { + if (time_after(jiffies, data->last_updated + HZ + HZ / 2) + || !data->valid) { dev_dbg(dev, "Starting device update\n"); for (i = 0; i <= 8; i++) { diff -Nru a/drivers/i2c/chips/w83l785ts.c b/drivers/i2c/chips/w83l785ts.c --- a/drivers/i2c/chips/w83l785ts.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/chips/w83l785ts.c 2005-03-07 14:54:16 -08:00 @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -114,12 +115,6 @@ }; /* - * Internal variables - */ - -static int w83l785ts_id = 0; - -/* * Sysfs stuff */ @@ -229,7 +224,6 @@ /* We can fill in the remaining client fields. */ strlcpy(new_client->name, "w83l785ts", I2C_NAME_SIZE); - new_client->id = w83l785ts_id++; data->valid = 0; init_MUTEX(&data->update_lock); @@ -301,9 +295,7 @@ down(&data->update_lock); - if (!data->valid - || (jiffies - data->last_updated > HZ * 2) - || (jiffies < data->last_updated)) { + if (!data->valid || time_after(jiffies, data->last_updated + HZ * 2)) { dev_dbg(&client->dev, "Updating w83l785ts data.\n"); data->temp = w83l785ts_read_value(client, W83L785TS_REG_TEMP, data->temp); diff -Nru a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c --- a/drivers/i2c/i2c-core.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/i2c-core.c 2005-03-07 14:54:16 -08:00 @@ -38,12 +38,43 @@ static DECLARE_MUTEX(core_lists); static DEFINE_IDR(i2c_adapter_idr); -int i2c_device_probe(struct device *dev) +/* match always succeeds, as we want the probe() to tell if we really accept this match */ +static int i2c_device_match(struct device *dev, struct device_driver *drv) +{ + return 1; +} + +static int i2c_bus_suspend(struct device * dev, pm_message_t state) +{ + int rc = 0; + + if (dev->driver && dev->driver->suspend) + rc = dev->driver->suspend(dev,state,0); + return rc; +} + +static int i2c_bus_resume(struct device * dev) +{ + int rc = 0; + + if (dev->driver && dev->driver->resume) + rc = dev->driver->resume(dev,0); + return rc; +} + +static struct bus_type i2c_bus_type = { + .name = "i2c", + .match = i2c_device_match, + .suspend = i2c_bus_suspend, + .resume = i2c_bus_resume, +}; + +static int i2c_device_probe(struct device *dev) { return -ENODEV; } -int i2c_device_remove(struct device *dev) +static int i2c_device_remove(struct device *dev) { return 0; } @@ -523,38 +554,6 @@ up(&adap->clist_lock); } - -/* match always succeeds, as we want the probe() to tell if we really accept this match */ -static int i2c_device_match(struct device *dev, struct device_driver *drv) -{ - return 1; -} - -static int i2c_bus_suspend(struct device * dev, u32 state) -{ - int rc = 0; - - if (dev->driver && dev->driver->suspend) - rc = dev->driver->suspend(dev,state,0); - return rc; -} - -static int i2c_bus_resume(struct device * dev) -{ - int rc = 0; - - if (dev->driver && dev->driver->resume) - rc = dev->driver->resume(dev,0); - return rc; -} - -struct bus_type i2c_bus_type = { - .name = "i2c", - .match = i2c_device_match, - .suspend = i2c_bus_suspend, - .resume = i2c_bus_resume, -}; - static int __init i2c_init(void) { int retval; @@ -583,7 +582,7 @@ * ---------------------------------------------------- */ -int i2c_transfer(struct i2c_adapter * adap, struct i2c_msg msgs[],int num) +int i2c_transfer(struct i2c_adapter * adap, struct i2c_msg *msgs, int num) { int ret; @@ -860,7 +859,7 @@ /* CRC over count bytes in the first array plus the bytes in the rest array if it is non-null. rest[0] is the (length of rest) - 1 and is included. */ -u8 i2c_smbus_partial_pec(u8 crc, int count, u8 *first, u8 *rest) +static u8 i2c_smbus_partial_pec(u8 crc, int count, u8 *first, u8 *rest) { int i; @@ -872,7 +871,7 @@ return crc; } -u8 i2c_smbus_pec(int count, u8 *first, u8 *rest) +static u8 i2c_smbus_pec(int count, u8 *first, u8 *rest) { return i2c_smbus_partial_pec(0, count, first, rest); } @@ -880,8 +879,8 @@ /* Returns new "size" (transaction type) Note that we convert byte to byte_data and byte_data to word_data rather than invent new xxx_PEC transactions. */ -int i2c_smbus_add_pec(u16 addr, u8 command, int size, - union i2c_smbus_data *data) +static int i2c_smbus_add_pec(u16 addr, u8 command, int size, + union i2c_smbus_data *data) { u8 buf[3]; @@ -910,8 +909,8 @@ return size; } -int i2c_smbus_check_pec(u16 addr, u8 command, int size, u8 partial, - union i2c_smbus_data *data) +static int i2c_smbus_check_pec(u16 addr, u8 command, int size, u8 partial, + union i2c_smbus_data *data) { u8 buf[3], rpec, cpec; diff -Nru a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c --- a/drivers/i2c/i2c-dev.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/i2c-dev.c 2005-03-07 14:54:17 -08:00 @@ -55,7 +55,7 @@ static struct i2c_dev *i2c_dev_array[I2C_MINORS]; static DEFINE_SPINLOCK(i2c_dev_array_lock); -struct i2c_dev *i2c_dev_get_by_minor(unsigned index) +static struct i2c_dev *i2c_dev_get_by_minor(unsigned index) { struct i2c_dev *i2c_dev; @@ -65,7 +65,7 @@ return i2c_dev; } -struct i2c_dev *i2c_dev_get_by_adapter(struct i2c_adapter *adap) +static struct i2c_dev *i2c_dev_get_by_adapter(struct i2c_adapter *adap) { struct i2c_dev *i2c_dev = NULL; @@ -173,8 +173,8 @@ return ret; } -int i2cdev_ioctl (struct inode *inode, struct file *file, unsigned int cmd, - unsigned long arg) +static int i2cdev_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) { struct i2c_client *client = (struct i2c_client *)file->private_data; struct i2c_rdwr_ioctl_data rdwr_arg; @@ -507,7 +507,6 @@ static struct i2c_client i2cdev_client_template = { .name = "I2C /dev entry", - .id = 1, .addr = -1, .driver = &i2cdev_driver, }; diff -Nru a/drivers/i2c/i2c-sensor-detect.c b/drivers/i2c/i2c-sensor-detect.c --- a/drivers/i2c/i2c-sensor-detect.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/i2c-sensor-detect.c 2005-03-07 14:54:17 -08:00 @@ -19,17 +19,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include -#include -#include -#include -#include -#include #include #include -#include static unsigned short empty[] = {I2C_CLIENT_END}; static unsigned int empty_isa[] = {I2C_CLIENT_ISA_END}; diff -Nru a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c --- a/drivers/ide/arm/icside.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/ide/arm/icside.c 2005-03-07 14:54:17 -08:00 @@ -713,7 +713,7 @@ icside_probe(struct expansion_card *ec, const struct ecard_id *id) { struct icside_state *state; - void *idmem; + void __iomem *idmem; int ret; ret = ecard_request_resources(ec); diff -Nru a/drivers/ide/arm/rapide.c b/drivers/ide/arm/rapide.c --- a/drivers/ide/arm/rapide.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/ide/arm/rapide.c 2005-03-07 14:54:18 -08:00 @@ -17,7 +17,7 @@ * Something like this really should be in generic code, but isn't. */ static ide_hwif_t * -rapide_locate_hwif(void __iomem *base, void *ctrl, unsigned int sz, int irq) +rapide_locate_hwif(void __iomem *base, void __iomem *ctrl, unsigned int sz, int irq) { unsigned long port = (unsigned long)base; ide_hwif_t *hwif; diff -Nru a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c --- a/drivers/ide/pci/sgiioc4.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/ide/pci/sgiioc4.c 2005-03-07 14:54:17 -08:00 @@ -688,7 +688,7 @@ if (ret < 0) { printk(KERN_ERR "Failed to enable device %s at slot %s\n", - d->name, dev->slot_name); + d->name, pci_name(dev)); goto out; } pci_set_master(dev); @@ -696,11 +696,11 @@ pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev); class_rev &= 0xff; printk(KERN_INFO "%s: IDE controller at PCI slot %s, revision %d\n", - d->name, dev->slot_name, class_rev); + d->name, pci_name(dev), class_rev); if (class_rev < IOC4_SUPPORTED_FIRMWARE_REV) { printk(KERN_ERR "Skipping %s IDE controller in slot %s: " "firmware is obsolete - please upgrade to revision" - "46 or higher\n", d->name, dev->slot_name); + "46 or higher\n", d->name, pci_name(dev)); ret = -EAGAIN; goto out; } diff -Nru a/drivers/ieee1394/Kconfig b/drivers/ieee1394/Kconfig --- a/drivers/ieee1394/Kconfig 2005-03-07 14:54:16 -08:00 +++ b/drivers/ieee1394/Kconfig 2005-03-07 14:54:16 -08:00 @@ -5,6 +5,7 @@ config IEEE1394 tristate "IEEE 1394 (FireWire) support" depends on PCI || BROKEN + select NET help IEEE 1394 describes a high performance serial bus, which is also known as FireWire(tm) or i.Link(tm) and is used for connecting all diff -Nru a/drivers/ieee1394/amdtp.c b/drivers/ieee1394/amdtp.c --- a/drivers/ieee1394/amdtp.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/ieee1394/amdtp.c 2005-03-07 14:54:17 -08:00 @@ -286,7 +286,7 @@ #define OHCI1394_CONTEXT_DEAD 0x00000800 #define OHCI1394_CONTEXT_ACTIVE 0x00000400 -void ohci1394_start_it_ctx(struct ti_ohci *ohci, int ctx, +static void ohci1394_start_it_ctx(struct ti_ohci *ohci, int ctx, dma_addr_t first_cmd, int z, int cycle_match) { reg_write(ohci, OHCI1394_IsoXmitIntMaskSet, 1 << ctx); @@ -298,13 +298,13 @@ OHCI1394_CONTEXT_RUN); } -void ohci1394_wake_it_ctx(struct ti_ohci *ohci, int ctx) +static void ohci1394_wake_it_ctx(struct ti_ohci *ohci, int ctx) { reg_write(ohci, OHCI1394_IsoXmitContextControlSet + ctx * 16, OHCI1394_CONTEXT_WAKE); } -void ohci1394_stop_it_ctx(struct ti_ohci *ohci, int ctx, int synchronous) +static void ohci1394_stop_it_ctx(struct ti_ohci *ohci, int ctx, int synchronous) { u32 control; int wait; @@ -530,7 +530,7 @@ return frac->integer + (frac->numerator > 0 ? 1 : 0); } -void packet_initialize(struct packet *p, struct packet *next) +static void packet_initialize(struct packet *p, struct packet *next) { /* Here we initialize the dma descriptor block for * transferring one iso packet. We use two descriptors per @@ -559,7 +559,7 @@ p->db->payload_desc.status = 0; } -struct packet_list *packet_list_alloc(struct stream *s) +static struct packet_list *packet_list_alloc(struct stream *s) { int i; struct packet_list *pl; @@ -588,7 +588,7 @@ return pl; } -void packet_list_free(struct packet_list *pl, struct stream *s) +static void packet_list_free(struct packet_list *pl, struct stream *s) { int i; @@ -1010,7 +1010,7 @@ return 0; } -struct stream *stream_alloc(struct amdtp_host *host) +static struct stream *stream_alloc(struct amdtp_host *host) { struct stream *s; unsigned long flags; @@ -1062,7 +1062,7 @@ return s; } -void stream_free(struct stream *s) +static void stream_free(struct stream *s) { unsigned long flags; diff -Nru a/drivers/ieee1394/config_roms.c b/drivers/ieee1394/config_roms.c --- a/drivers/ieee1394/config_roms.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/ieee1394/config_roms.c 2005-03-07 14:54:16 -08:00 @@ -67,8 +67,8 @@ ret = csr1212_associate_keyval(vend_id, text); csr1212_release_keyval(text); ret |= csr1212_attach_keyval_to_directory(root, vend_id); + csr1212_release_keyval(vend_id); if (ret != CSR1212_SUCCESS) { - csr1212_release_keyval(vend_id); csr1212_destroy_csr(host->csr.rom); return -ENOMEM; } diff -Nru a/drivers/ieee1394/csr1212.c b/drivers/ieee1394/csr1212.c --- a/drivers/ieee1394/csr1212.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/ieee1394/csr1212.c 2005-03-07 14:54:17 -08:00 @@ -87,7 +87,8 @@ static inline void free_keyval(struct csr1212_keyval *kv) { - if (kv->key.type == CSR1212_KV_TYPE_LEAF) + if ((kv->key.type == CSR1212_KV_TYPE_LEAF) && + (kv->key.id != CSR1212_KV_ID_EXTENDED_ROM)) CSR1212_FREE(kv->value.leaf.data); CSR1212_FREE(kv); @@ -155,7 +156,7 @@ { struct csr1212_keyval *kv; - for (kv = kv_list; kv != NULL; kv = kv->next) { + for (kv = kv_list->next; kv && (kv != kv_list); kv = kv->next) { if (kv->offset == offset) return kv; } @@ -181,9 +182,9 @@ return NULL; } - /* The keyval key id is not used for the root node, but a valid key id - * that can be used for a directory needs to be passed to - * csr1212_new_directory(). */ + /* The keyval key id is not used for the root node, but a valid key id + * that can be used for a directory needs to be passed to + * csr1212_new_directory(). */ csr->root_kv = csr1212_new_directory(CSR1212_KV_ID_VENDOR); if (!csr->root_kv) { CSR1212_FREE(csr->cache_head); @@ -709,7 +710,7 @@ tail->next = k->value.directory.dentries_head; k->value.directory.dentries_head->prev = tail; tail = k->value.directory.dentries_tail; - } + } } free_keyval(k); k = a; @@ -796,7 +797,8 @@ return CSR1212_ENOMEM; } cache->ext_rom->offset = csr_addr - CSR1212_REGISTER_SPACE_BASE; - cache->ext_rom->value.leaf.len = 0; + cache->ext_rom->value.leaf.len = -1; + cache->ext_rom->value.leaf.data = cache->data; /* Add cache to tail of cache list */ cache->prev = csr->cache_tail; @@ -864,20 +866,20 @@ default: case CSR1212_KV_TYPE_IMMEDIATE: case CSR1212_KV_TYPE_CSR_OFFSET: - continue; + break; case CSR1212_KV_TYPE_LEAF: case CSR1212_KV_TYPE_DIRECTORY: /* Remove from list */ - if (dkv->prev) + if (dkv->prev && (dkv->prev->next == dkv)) dkv->prev->next = dkv->next; - if (dkv->next) + if (dkv->next && (dkv->next->prev == dkv)) dkv->next->prev = dkv->prev; - if (dkv == *layout_tail) - *layout_tail = dkv->prev; + //if (dkv == *layout_tail) + // *layout_tail = dkv->prev; /* Special case: Extended ROM leafs */ if (dkv->key.id == CSR1212_KV_ID_EXTENDED_ROM) { - dkv->value.leaf.len = 0; /* initialize to zero */ + dkv->value.leaf.len = -1; /* Don't add Extended ROM leafs in the layout list, * they are handled differently. */ break; @@ -919,8 +921,8 @@ } struct csr1212_keyval *csr1212_generate_positions(struct csr1212_csr_rom_cache *cache, - struct csr1212_keyval *start_kv, - int start_pos) + struct csr1212_keyval *start_kv, + int start_pos) { struct csr1212_keyval *kv = start_kv; struct csr1212_keyval *okv = start_kv; @@ -930,7 +932,10 @@ cache->layout_head = kv; while(kv && pos < cache->size) { - kv->offset = cache->offset + pos; + /* Special case: Extended ROM leafs */ + if (kv->key.id != CSR1212_KV_ID_EXTENDED_ROM) { + kv->offset = cache->offset + pos; + } switch(kv->key.type) { case CSR1212_KV_TYPE_LEAF: @@ -1090,6 +1095,9 @@ bi->crc_length = bi->length; bi->crc = csr1212_crc16(bi->data, bi->crc_length); + csr->root_kv->next = NULL; + csr->root_kv->prev = NULL; + agg_size = csr1212_generate_layout_order(csr->root_kv); init_offset = csr->bus_info_len; @@ -1158,6 +1166,17 @@ /* Copy the data into the cache buffer */ csr1212_fill_cache(cache); + + if (cache != csr->cache_head) { + /* Set the length and CRC of the extended ROM. */ + struct csr1212_keyval_img *kvi = + (struct csr1212_keyval_img*)cache->data; + + kvi->length = CSR1212_CPU_TO_BE16(bytes_to_quads(cache->len) - 1); + kvi->crc = csr1212_crc16(kvi->data, + bytes_to_quads(cache->len) - 1); + + } } return CSR1212_SUCCESS; @@ -1174,11 +1193,6 @@ &cache->data[bytes_to_quads(offset - cache->offset)], len); return CSR1212_SUCCESS; - } else if (((offset < cache->offset) && - ((offset + len) >= cache->offset)) || - ((offset >= cache->offset) && - ((offset + len) > (cache->offset + cache->size)))) { - return CSR1212_EINVAL; } } return CSR1212_ENOENT; @@ -1227,8 +1241,8 @@ return CSR1212_EINVAL; #if 0 - /* Apparently there are too many differnt wrong implementations of the - * CRC algorithm that verifying them is moot. */ + /* Apparently there are too many differnt wrong implementations of the + * CRC algorithm that verifying them is moot. */ if ((csr1212_crc16(bi->data, bi->crc_length) != bi->crc) && (csr1212_msft_crc16(bi->data, bi->crc_length) != bi->crc)) return CSR1212_EINVAL; @@ -1249,10 +1263,9 @@ return CSR1212_SUCCESS; } -static inline int csr1212_parse_dir_entry(struct csr1212_keyval *dir, - csr1212_quad_t ki, - u_int32_t kv_pos, - struct csr1212_csr_rom_cache *cache) +static int csr1212_parse_dir_entry(struct csr1212_keyval *dir, + csr1212_quad_t ki, + u_int32_t kv_pos) { int ret = CSR1212_SUCCESS; struct csr1212_keyval *k = NULL; @@ -1291,7 +1304,7 @@ goto fail; } - k = csr1212_find_keyval_offset(cache->layout_head, offset); + k = csr1212_find_keyval_offset(dir, offset); if (k) break; /* Found it. */ @@ -1309,11 +1322,10 @@ k->valid = 0; /* Contents not read yet so it's not valid. */ k->offset = offset; - k->prev = cache->layout_tail; - k->next = NULL; - if (cache->layout_tail) - cache->layout_tail->next = k; - cache->layout_tail = k; + k->prev = dir; + k->next = dir->next; + dir->next->prev = k; + dir->next = k; } ret = csr1212_attach_keyval_to_directory(dir, k); @@ -1325,6 +1337,7 @@ return ret; } + int csr1212_parse_keyval(struct csr1212_keyval *kv, struct csr1212_csr_rom_cache *cache) { @@ -1338,8 +1351,8 @@ kvi_len = CSR1212_BE16_TO_CPU(kvi->length); #if 0 - /* Apparently there are too many differnt wrong implementations of the - * CRC algorithm that verifying them is moot. */ + /* Apparently there are too many differnt wrong implementations of the + * CRC algorithm that verifying them is moot. */ if ((csr1212_crc16(kvi->data, kvi_len) != kvi->crc) && (csr1212_msft_crc16(kvi->data, kvi_len) != kvi->crc)) { ret = CSR1212_EINVAL; @@ -1353,22 +1366,19 @@ csr1212_quad_t ki = kvi->data[i]; /* Some devices put null entries in their unit - * directories. If we come across such and entry, + * directories. If we come across such an entry, * then skip it. */ if (ki == 0x0) continue; ret = csr1212_parse_dir_entry(kv, ki, (kv->offset + - quads_to_bytes(i + 1)), - cache); + quads_to_bytes(i + 1))); } kv->value.directory.len = kvi_len; break; case CSR1212_KV_TYPE_LEAF: - if (kv->key.id == CSR1212_KV_ID_EXTENDED_ROM) { - kv->value.leaf.data = cache->data; - } else { + if (kv->key.id != CSR1212_KV_ID_EXTENDED_ROM) { kv->value.leaf.data = CSR1212_MALLOC(quads_to_bytes(kvi_len)); if (!kv->value.leaf.data) { @@ -1399,7 +1409,6 @@ u_int32_t *cache_ptr; u_int16_t kv_len = 0; - if (!csr || !kv) return CSR1212_EINVAL; @@ -1413,7 +1422,7 @@ if (!cache) { csr1212_quad_t q; - struct csr1212_csr_rom_cache *nc; + u_int32_t cache_size; /* Only create a new cache for Extended ROM leaves. */ if (kv->key.id != CSR1212_KV_ID_EXTENDED_ROM) @@ -1425,12 +1434,20 @@ return CSR1212_EIO; } - kv->value.leaf.len = quads_to_bytes(CSR1212_BE32_TO_CPU(q)>>16); + kv->value.leaf.len = CSR1212_BE32_TO_CPU(q) >> 16; + + cache_size = (quads_to_bytes(kv->value.leaf.len + 1) + + (csr->max_rom - 1)) & ~(csr->max_rom - 1); - nc = csr1212_rom_cache_malloc(kv->offset, kv->value.leaf.len); - cache->next = nc; - nc->prev = cache; - csr->cache_tail = nc; + cache = csr1212_rom_cache_malloc(kv->offset, cache_size); + if (!cache) + return CSR1212_ENOMEM; + + kv->value.leaf.data = &cache->data[1]; + csr->cache_tail->next = cache; + cache->prev = csr->cache_tail; + cache->next = NULL; + csr->cache_tail = cache; cache->filled_head = CSR1212_MALLOC(sizeof(struct csr1212_cache_region)); if (!cache->filled_head) { @@ -1443,6 +1460,10 @@ cache->filled_head->next = NULL; cache->filled_head->prev = NULL; cache->data[0] = q; + + /* Don't read the entire extended ROM now. Pieces of it will + * be read when entries inside it are read. */ + return csr1212_parse_keyval(kv, cache); } cache_index = kv->offset - cache->offset; @@ -1548,6 +1569,7 @@ int csr1212_parse_csr(struct csr1212_csr *csr) { static const int mr_map[] = { 4, 64, 1024, 0 }; + struct csr1212_dentry *dentry; int ret; if (!csr || !csr->ops->bus_read) @@ -1570,7 +1592,21 @@ csr->bus_info_len; csr->root_kv->valid = 0; + csr->root_kv->next = csr->root_kv; + csr->root_kv->prev = csr->root_kv; csr1212_get_keyval(csr, csr->root_kv); + + /* Scan through the Root directory finding all extended ROM regions + * and make cache regions for them */ + for (dentry = csr->root_kv->value.directory.dentries_head; + dentry; dentry = dentry->next) { + if (dentry->kv->key.id == CSR1212_KV_ID_EXTENDED_ROM) { + csr1212_get_keyval(csr, dentry->kv); + + if (ret != CSR1212_SUCCESS) + return ret; + } + } return CSR1212_SUCCESS; } diff -Nru a/drivers/ieee1394/dma.c b/drivers/ieee1394/dma.c --- a/drivers/ieee1394/dma.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/ieee1394/dma.c 2005-03-07 14:54:17 -08:00 @@ -127,16 +127,12 @@ dma->dev = NULL; } - if (dma->sglist) { - vfree(dma->sglist); - dma->sglist = NULL; - } + vfree(dma->sglist); + dma->sglist = NULL; - if (dma->kvirt) { - vfree(dma->kvirt); - dma->kvirt = NULL; - dma->n_pages = 0; - } + vfree(dma->kvirt); + dma->kvirt = NULL; + dma->n_pages = 0; } /* find the scatterlist index and remaining offset corresponding to a diff -Nru a/drivers/ieee1394/dv1394.c b/drivers/ieee1394/dv1394.c --- a/drivers/ieee1394/dv1394.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/ieee1394/dv1394.c 2005-03-07 14:54:17 -08:00 @@ -1277,7 +1277,7 @@ error-prone code in dv1394. */ -int dv1394_mmap(struct file *file, struct vm_area_struct *vma) +static int dv1394_mmap(struct file *file, struct vm_area_struct *vma) { struct video_card *video = file_to_video_card(file); int retval = -EINVAL; @@ -2343,6 +2343,8 @@ dv1394_un_init(video); } while (video != NULL); + class_simple_device_remove(MKDEV( + IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2))); devfs_remove("ieee1394/dv/host%d/NTSC", id); devfs_remove("ieee1394/dv/host%d/PAL", id); devfs_remove("ieee1394/dv/host%d", id); @@ -2359,6 +2361,9 @@ ohci = (struct ti_ohci *)host->hostdata; + class_simple_device_add(hpsb_protocol_class, MKDEV( + IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2)), + NULL, "dv1394-%d", id); devfs_mk_dir("ieee1394/dv/host%d", id); devfs_mk_dir("ieee1394/dv/host%d/NTSC", id); devfs_mk_dir("ieee1394/dv/host%d/PAL", id); diff -Nru a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c --- a/drivers/ieee1394/eth1394.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/ieee1394/eth1394.c 2005-03-07 14:54:17 -08:00 @@ -89,7 +89,7 @@ #define TRACE() printk(KERN_ERR "%s:%s[%d] ---- TRACE\n", driver_name, __FUNCTION__, __LINE__) static char version[] __devinitdata = - "$Rev: 1224 $ Ben Collins "; + "$Rev: 1247 $ Ben Collins "; struct fragment_info { struct list_head list; @@ -165,8 +165,7 @@ /* The max_partial_datagrams parameter is the maximum number of fragmented * datagrams per node that eth1394 will keep in memory. Providing an upper * bound allows us to limit the amount of memory that partial datagrams - * consume in the event that some partial datagrams are never completed. This - * should probably change to a sysctl item or the like if possible. + * consume in the event that some partial datagrams are never completed. */ static int max_partial_datagrams = 25; module_param(max_partial_datagrams, int, S_IRUGO | S_IWUSR); @@ -186,7 +185,7 @@ unsigned char * haddr); static int ether1394_mac_addr(struct net_device *dev, void *p); -static inline void purge_partial_datagram(struct list_head *old); +static void purge_partial_datagram(struct list_head *old); static int ether1394_tx(struct sk_buff *skb, struct net_device *dev); static void ether1394_iso(struct hpsb_iso *iso); @@ -289,7 +288,7 @@ return 0; } -static inline void purge_partial_datagram(struct list_head *old) +static void purge_partial_datagram(struct list_head *old) { struct partial_datagram *pd = list_entry(old, struct partial_datagram, list); struct list_head *lh, *n; @@ -449,7 +448,7 @@ if (!node_info) { kfree(node); return -ENOMEM; - } + } spin_lock_init(&node_info->pdg.lock); INIT_LIST_HEAD(&node_info->pdg.list); @@ -1187,7 +1186,7 @@ lh = find_partial_datagram(pdgl, dgl); if (lh == NULL) { - if (pdg->sz == max_partial_datagrams) { + while (pdg->sz >= max_partial_datagrams) { /* remove the oldest */ purge_partial_datagram(pdgl->prev); pdg->sz--; @@ -1583,7 +1582,7 @@ struct sk_buff *skb = ptask->skb; struct net_device *dev = skb->dev; struct eth1394_priv *priv = netdev_priv(dev); - unsigned long flags; + unsigned long flags; /* Statistics */ spin_lock_irqsave(&priv->lock, flags); @@ -1771,7 +1770,7 @@ static void ether1394_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) { strcpy (info->driver, driver_name); - strcpy (info->version, "$Rev: 1224 $"); + strcpy (info->version, "$Rev: 1247 $"); /* FIXME XXX provide sane businfo */ strcpy (info->bus_info, "ieee1394"); } diff -Nru a/drivers/ieee1394/highlevel.c b/drivers/ieee1394/highlevel.c --- a/drivers/ieee1394/highlevel.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/ieee1394/highlevel.c 2005-03-07 14:54:18 -08:00 @@ -173,18 +173,6 @@ } -unsigned long hpsb_get_hostinfo_key(struct hpsb_highlevel *hl, struct hpsb_host *host) -{ - struct hl_host_info *hi; - - hi = hl_get_hostinfo(hl, host); - if (hi) - return hi->key; - - return 0; -} - - void *hpsb_get_hostinfo_bykey(struct hpsb_highlevel *hl, unsigned long key) { struct hl_host_info *hi; @@ -206,26 +194,6 @@ } -struct hpsb_host *hpsb_get_host_bykey(struct hpsb_highlevel *hl, unsigned long key) -{ - struct hl_host_info *hi; - struct hpsb_host *host = NULL; - - if (!hl) - return NULL; - - read_lock(&hl->host_info_lock); - list_for_each_entry(hi, &hl->host_info_list, list) { - if (hi->key == key) { - host = hi->host; - break; - } - } - read_unlock(&hl->host_info_lock); - - return host; -} - static int highlevel_for_each_host_reg(struct hpsb_host *host, void *__data) { struct hpsb_highlevel *hl = __data; @@ -416,7 +384,7 @@ } as = (struct hpsb_address_serve *) - kmalloc(sizeof(struct hpsb_address_serve), GFP_KERNEL); + kmalloc(sizeof(struct hpsb_address_serve), GFP_ATOMIC); if (as == NULL) { return 0; } diff -Nru a/drivers/ieee1394/ieee1394.h b/drivers/ieee1394/ieee1394.h --- a/drivers/ieee1394/ieee1394.h 2005-03-07 14:54:16 -08:00 +++ b/drivers/ieee1394/ieee1394.h 2005-03-07 14:54:16 -08:00 @@ -77,6 +77,30 @@ #define SELFID_PORT_NONE 0x0 +/* 1394a PHY bitmasks */ +#define PHY_00_PHYSICAL_ID 0xFC +#define PHY_00_R 0x02 /* Root */ +#define PHY_00_PS 0x01 /* Power Status*/ +#define PHY_01_RHB 0x80 /* Root Hold-Off */ +#define PHY_01_IBR 0x80 /* Initiate Bus Reset */ +#define PHY_01_GAP_COUNT 0x3F +#define PHY_02_EXTENDED 0xE0 /* 0x7 for 1394a-compliant PHY */ +#define PHY_02_TOTAL_PORTS 0x1F +#define PHY_03_MAX_SPEED 0xE0 +#define PHY_03_DELAY 0x0F +#define PHY_04_LCTRL 0x80 /* Link Active Report Control */ +#define PHY_04_CONTENDER 0x40 +#define PHY_04_JITTER 0x38 +#define PHY_04_PWR_CLASS 0x07 /* Power Class */ +#define PHY_05_WATCHDOG 0x80 +#define PHY_05_ISBR 0x40 /* Initiate Short Bus Reset */ +#define PHY_05_LOOP 0x20 /* Loop Detect */ +#define PHY_05_PWR_FAIL 0x10 /* Cable Power Failure Detect */ +#define PHY_05_TIMEOUT 0x08 /* Arbitration State Machine Timeout */ +#define PHY_05_PORT_EVENT 0x04 /* Port Event Detect */ +#define PHY_05_ENAB_ACCEL 0x02 /* Enable Arbitration Acceleration */ +#define PHY_05_ENAB_MULTI 0x01 /* Ena. Multispeed Packet Concatenation */ + #include #ifdef __BIG_ENDIAN_BITFIELD diff -Nru a/drivers/ieee1394/ieee1394_core.c b/drivers/ieee1394/ieee1394_core.c --- a/drivers/ieee1394/ieee1394_core.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/ieee1394/ieee1394_core.c 2005-03-07 14:54:16 -08:00 @@ -56,11 +56,18 @@ module_param(disable_nodemgr, int, 0444); MODULE_PARM_DESC(disable_nodemgr, "Disable nodemgr functionality."); +/* Disable Isochronous Resource Manager functionality */ +int hpsb_disable_irm = 0; +module_param_named(disable_irm, hpsb_disable_irm, bool, 0); +MODULE_PARM_DESC(disable_irm, + "Disable Isochronous Resource Manager functionality."); + /* We are GPL, so treat us special */ MODULE_LICENSE("GPL"); /* Some globals used */ const char *hpsb_speedto_str[] = { "S100", "S200", "S400", "S800", "S1600", "S3200" }; +struct class_simple *hpsb_protocol_class; #ifdef CONFIG_IEEE1394_VERBOSEDEBUG static void dump_packet(const char *text, quadlet_t *data, int size) @@ -79,6 +86,7 @@ #define dump_packet(x,y,z) #endif +static void abort_requests(struct hpsb_host *host); static void queue_packet_complete(struct hpsb_packet *packet); @@ -512,6 +520,7 @@ if (!packet->no_waiter || packet->expect_response) { atomic_inc(&packet->refcnt); + packet->sendtime = jiffies; skb_queue_tail(&host->pending_packet_queue, packet->skb); } @@ -939,7 +948,7 @@ } -void abort_requests(struct hpsb_host *host) +static void abort_requests(struct hpsb_host *host) { struct hpsb_packet *packet; struct sk_buff *skb; @@ -1002,7 +1011,7 @@ * the stack. */ static int khpsbpkt_pid = -1, khpsbpkt_kill; static DECLARE_COMPLETION(khpsbpkt_complete); -struct sk_buff_head hpsbpkt_queue; +static struct sk_buff_head hpsbpkt_queue; static DECLARE_MUTEX_LOCKED(khpsbpkt_sig); @@ -1030,15 +1039,19 @@ daemonize("khpsbpkt"); - while (!down_interruptible(&khpsbpkt_sig)) { - if (khpsbpkt_kill) + while (1) { + if (down_interruptible(&khpsbpkt_sig)) { + if (current->flags & PF_FREEZE) { + refrigerator(0); + continue; + } + printk("khpsbpkt: received unexpected signal?!\n" ); break; - - if (current->flags & PF_FREEZE) { - refrigerator(0); - continue; } + if (khpsbpkt_kill) + break; + while ((skb = skb_dequeue(&hpsbpkt_queue)) != NULL) { packet = (struct hpsb_packet *)skb->data; @@ -1054,7 +1067,6 @@ complete_and_exit(&khpsbpkt_complete, 0); } - static int __init ieee1394_init(void) { int i, ret; @@ -1109,18 +1121,33 @@ if (ret < 0) goto release_all_bus; + hpsb_protocol_class = class_simple_create(THIS_MODULE, "ieee1394_protocol"); + if (IS_ERR(hpsb_protocol_class)) { + ret = PTR_ERR(hpsb_protocol_class); + goto release_class_host; + } + ret = init_csr(); if (ret) { HPSB_INFO("init csr failed"); ret = -ENOMEM; - goto release_class; + goto release_class_protocol; } if (disable_nodemgr) { - HPSB_INFO("nodemgr functionality disabled"); + HPSB_INFO("nodemgr and IRM functionality disabled"); + /* We shouldn't contend for IRM with nodemgr disabled, since + nodemgr implements functionality required of ieee1394a-2000 + IRMs */ + hpsb_disable_irm = 1; + return 0; } + if (hpsb_disable_irm) { + HPSB_INFO("IRM functionality disabled"); + } + ret = init_ieee1394_nodemgr(); if (ret < 0) { HPSB_INFO("init nodemgr failed"); @@ -1131,7 +1158,9 @@ cleanup_csr: cleanup_csr(); -release_class: +release_class_protocol: + class_simple_destroy(hpsb_protocol_class); +release_class_host: class_unregister(&hpsb_host_class); release_all_bus: for (i = 0; fw_bus_attrs[i]; i++) @@ -1160,6 +1189,7 @@ cleanup_csr(); + class_simple_destroy(hpsb_protocol_class); class_unregister(&hpsb_host_class); for (i = 0; fw_bus_attrs[i]; i++) bus_remove_file(&ieee1394_bus_type, fw_bus_attrs[i]); @@ -1191,6 +1221,7 @@ /** ieee1394_core.c **/ EXPORT_SYMBOL(hpsb_speedto_str); +EXPORT_SYMBOL(hpsb_protocol_class); EXPORT_SYMBOL(hpsb_set_packet_complete_task); EXPORT_SYMBOL(hpsb_alloc_packet); EXPORT_SYMBOL(hpsb_free_packet); @@ -1203,6 +1234,7 @@ EXPORT_SYMBOL(hpsb_selfid_complete); EXPORT_SYMBOL(hpsb_packet_sent); EXPORT_SYMBOL(hpsb_packet_received); +EXPORT_SYMBOL_GPL(hpsb_disable_irm); /** ieee1394_transactions.c **/ EXPORT_SYMBOL(hpsb_get_tlabel); @@ -1217,8 +1249,6 @@ EXPORT_SYMBOL(hpsb_read); EXPORT_SYMBOL(hpsb_write); EXPORT_SYMBOL(hpsb_lock); -EXPORT_SYMBOL(hpsb_lock64); -EXPORT_SYMBOL(hpsb_send_gasp); EXPORT_SYMBOL(hpsb_packet_success); /** highlevel.c **/ @@ -1230,28 +1260,18 @@ EXPORT_SYMBOL(hpsb_listen_channel); EXPORT_SYMBOL(hpsb_unlisten_channel); EXPORT_SYMBOL(hpsb_get_hostinfo); -EXPORT_SYMBOL(hpsb_get_host_bykey); EXPORT_SYMBOL(hpsb_create_hostinfo); EXPORT_SYMBOL(hpsb_destroy_hostinfo); EXPORT_SYMBOL(hpsb_set_hostinfo_key); -EXPORT_SYMBOL(hpsb_get_hostinfo_key); EXPORT_SYMBOL(hpsb_get_hostinfo_bykey); EXPORT_SYMBOL(hpsb_set_hostinfo); -EXPORT_SYMBOL(highlevel_read); -EXPORT_SYMBOL(highlevel_write); -EXPORT_SYMBOL(highlevel_lock); -EXPORT_SYMBOL(highlevel_lock64); EXPORT_SYMBOL(highlevel_add_host); EXPORT_SYMBOL(highlevel_remove_host); EXPORT_SYMBOL(highlevel_host_reset); /** nodemgr.c **/ -EXPORT_SYMBOL(hpsb_guid_get_entry); -EXPORT_SYMBOL(hpsb_nodeid_get_entry); EXPORT_SYMBOL(hpsb_node_fill_packet); -EXPORT_SYMBOL(hpsb_node_read); EXPORT_SYMBOL(hpsb_node_write); -EXPORT_SYMBOL(hpsb_node_lock); EXPORT_SYMBOL(hpsb_register_protocol); EXPORT_SYMBOL(hpsb_unregister_protocol); EXPORT_SYMBOL(ieee1394_bus_type); @@ -1295,27 +1315,14 @@ EXPORT_SYMBOL(csr1212_create_csr); EXPORT_SYMBOL(csr1212_init_local_csr); EXPORT_SYMBOL(csr1212_new_immediate); -EXPORT_SYMBOL(csr1212_new_leaf); -EXPORT_SYMBOL(csr1212_new_csr_offset); EXPORT_SYMBOL(csr1212_new_directory); EXPORT_SYMBOL(csr1212_associate_keyval); EXPORT_SYMBOL(csr1212_attach_keyval_to_directory); -EXPORT_SYMBOL(csr1212_new_extended_immediate); -EXPORT_SYMBOL(csr1212_new_extended_leaf); -EXPORT_SYMBOL(csr1212_new_descriptor_leaf); -EXPORT_SYMBOL(csr1212_new_textual_descriptor_leaf); EXPORT_SYMBOL(csr1212_new_string_descriptor_leaf); -EXPORT_SYMBOL(csr1212_new_icon_descriptor_leaf); -EXPORT_SYMBOL(csr1212_new_modifiable_descriptor_leaf); -EXPORT_SYMBOL(csr1212_new_keyword_leaf); EXPORT_SYMBOL(csr1212_detach_keyval_from_directory); -EXPORT_SYMBOL(csr1212_disassociate_keyval); EXPORT_SYMBOL(csr1212_release_keyval); EXPORT_SYMBOL(csr1212_destroy_csr); EXPORT_SYMBOL(csr1212_read); -EXPORT_SYMBOL(csr1212_generate_positions); -EXPORT_SYMBOL(csr1212_generate_layout_order); -EXPORT_SYMBOL(csr1212_fill_cache); EXPORT_SYMBOL(csr1212_generate_csr_image); EXPORT_SYMBOL(csr1212_parse_keyval); EXPORT_SYMBOL(csr1212_parse_csr); diff -Nru a/drivers/ieee1394/ieee1394_core.h b/drivers/ieee1394/ieee1394_core.h --- a/drivers/ieee1394/ieee1394_core.h 2005-03-07 14:54:16 -08:00 +++ b/drivers/ieee1394/ieee1394_core.h 2005-03-07 14:54:16 -08:00 @@ -89,7 +89,6 @@ } void abort_timedouts(unsigned long __opaque); -void abort_requests(struct hpsb_host *host); struct hpsb_packet *hpsb_alloc_packet(size_t data_size); void hpsb_free_packet(struct hpsb_packet *packet); @@ -219,9 +218,11 @@ return file->f_dentry->d_inode->i_cindex; } +extern int hpsb_disable_irm; /* Our sysfs bus entry */ extern struct bus_type ieee1394_bus_type; extern struct class hpsb_host_class; +extern struct class_simple *hpsb_protocol_class; #endif /* _IEEE1394_CORE_H */ diff -Nru a/drivers/ieee1394/ieee1394_transactions.c b/drivers/ieee1394/ieee1394_transactions.c --- a/drivers/ieee1394/ieee1394_transactions.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/ieee1394/ieee1394_transactions.c 2005-03-07 14:54:16 -08:00 @@ -566,34 +566,6 @@ return retval; } -int hpsb_lock64(struct hpsb_host *host, nodeid_t node, unsigned int generation, - u64 addr, int extcode, octlet_t *data, octlet_t arg) -{ - struct hpsb_packet *packet; - int retval = 0; - - BUG_ON(in_interrupt()); // We can't be called in an interrupt, yet - - packet = hpsb_make_lock64packet(host, node, addr, extcode, data, arg); - if (!packet) - return -ENOMEM; - - packet->generation = generation; - retval = hpsb_send_packet_and_wait(packet); - if (retval < 0) - goto hpsb_lock64_fail; - - retval = hpsb_packet_success(packet); - - if (retval == 0) - *data = (u64)packet->data[1] << 32 | packet->data[0]; - -hpsb_lock64_fail: - hpsb_free_tlabel(packet); - hpsb_free_packet(packet); - - return retval; -} int hpsb_send_gasp(struct hpsb_host *host, int channel, unsigned int generation, quadlet_t *buffer, size_t length, u32 specifier_id, diff -Nru a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c --- a/drivers/ieee1394/nodemgr.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/ieee1394/nodemgr.c 2005-03-07 14:54:17 -08:00 @@ -23,6 +23,7 @@ #include "ieee1394_types.h" #include "ieee1394.h" +#include "ieee1394_core.h" #include "hosts.h" #include "ieee1394_transactions.h" #include "highlevel.h" @@ -146,7 +147,7 @@ put_device(&container_of((class_dev), struct node_entry, class_dev)->device); } -struct class nodemgr_ne_class = { +static struct class nodemgr_ne_class = { .name = "ieee1394_node", .release = ne_cls_release, }; @@ -158,7 +159,7 @@ /* The name here is only so that unit directory hotplug works with old * style hotplug, which only ever did unit directories anyway. */ -struct class nodemgr_ud_class = { +static struct class nodemgr_ud_class = { .name = "ieee1394", .release = ud_cls_release, .hotplug = nodemgr_hotplug, @@ -831,6 +832,31 @@ } +static void nodemgr_register_device(struct node_entry *ne, + struct unit_directory *ud, struct device *parent) +{ + memcpy(&ud->device, &nodemgr_dev_template_ud, + sizeof(ud->device)); + + ud->device.parent = parent; + + snprintf(ud->device.bus_id, BUS_ID_SIZE, "%s-%u", + ne->device.bus_id, ud->id); + + ud->class_dev.dev = &ud->device; + ud->class_dev.class = &nodemgr_ud_class; + snprintf(ud->class_dev.class_id, BUS_ID_SIZE, "%s-%u", + ne->device.bus_id, ud->id); + + device_register(&ud->device); + class_device_register(&ud->class_dev); + get_device(&ud->device); + + if (ud->vendor_oui) + device_create_file(&ud->device, &dev_attr_ud_vendor_oui); + nodemgr_create_ud_dev_files(ud); +} + /* This implementation currently only scans the config rom and its * immediate unit directories looking for software_id and @@ -840,7 +866,7 @@ unsigned int *id, struct unit_directory *parent) { struct unit_directory *ud; - struct unit_directory *ud_temp = NULL; + struct unit_directory *ud_child = NULL; struct csr1212_dentry *dentry; struct csr1212_keyval *kv; u8 last_key_id = 0; @@ -907,42 +933,61 @@ break; case CSR1212_KV_ID_DEPENDENT_INFO: - if (kv->key.type == CSR1212_KV_TYPE_DIRECTORY) { + /* Logical Unit Number */ + if (kv->key.type == CSR1212_KV_TYPE_IMMEDIATE) { + if (ud->flags & UNIT_DIRECTORY_HAS_LUN) { + ud_child = kmalloc(sizeof(struct unit_directory), GFP_KERNEL); + if (!ud_child) + goto unit_directory_error; + memcpy(ud_child, ud, sizeof(struct unit_directory)); + nodemgr_register_device(ne, ud_child, &ne->device); + ud_child = NULL; + + ud->id = (*id)++; + } + ud->lun = kv->value.immediate; + ud->flags |= UNIT_DIRECTORY_HAS_LUN; + + /* Logical Unit Directory */ + } else if (kv->key.type == CSR1212_KV_TYPE_DIRECTORY) { /* This should really be done in SBP2 as this is - * doing SBP2 specific parsing. */ + * doing SBP2 specific parsing. + */ + + /* first register the parent unit */ ud->flags |= UNIT_DIRECTORY_HAS_LUN_DIRECTORY; - ud_temp = nodemgr_process_unit_directory(hi, ne, kv, id, - parent); + if (ud->device.bus != &ieee1394_bus_type) + nodemgr_register_device(ne, ud, &ne->device); + + /* process the child unit */ + ud_child = nodemgr_process_unit_directory(hi, ne, kv, id, ud); - if (ud_temp == NULL) + if (ud_child == NULL) break; - - /* inherit unspecified values */ - if ((ud->flags & UNIT_DIRECTORY_VENDOR_ID) && - !(ud_temp->flags & UNIT_DIRECTORY_VENDOR_ID)) - { - ud_temp->flags |= UNIT_DIRECTORY_VENDOR_ID; - ud_temp->vendor_id = ud->vendor_id; - ud_temp->vendor_oui = ud->vendor_oui; - } + + /* inherit unspecified values so hotplug picks it up */ if ((ud->flags & UNIT_DIRECTORY_MODEL_ID) && - !(ud_temp->flags & UNIT_DIRECTORY_MODEL_ID)) + !(ud_child->flags & UNIT_DIRECTORY_MODEL_ID)) { - ud_temp->flags |= UNIT_DIRECTORY_MODEL_ID; - ud_temp->model_id = ud->model_id; + ud_child->flags |= UNIT_DIRECTORY_MODEL_ID; + ud_child->model_id = ud->model_id; } if ((ud->flags & UNIT_DIRECTORY_SPECIFIER_ID) && - !(ud_temp->flags & UNIT_DIRECTORY_SPECIFIER_ID)) + !(ud_child->flags & UNIT_DIRECTORY_SPECIFIER_ID)) { - ud_temp->flags |= UNIT_DIRECTORY_SPECIFIER_ID; - ud_temp->specifier_id = ud->specifier_id; + ud_child->flags |= UNIT_DIRECTORY_SPECIFIER_ID; + ud_child->specifier_id = ud->specifier_id; } if ((ud->flags & UNIT_DIRECTORY_VERSION) && - !(ud_temp->flags & UNIT_DIRECTORY_VERSION)) + !(ud_child->flags & UNIT_DIRECTORY_VERSION)) { - ud_temp->flags |= UNIT_DIRECTORY_VERSION; - ud_temp->version = ud->version; + ud_child->flags |= UNIT_DIRECTORY_VERSION; + ud_child->version = ud->version; } + + /* register the child unit */ + ud_child->flags |= UNIT_DIRECTORY_LUN_DIRECTORY; + nodemgr_register_device(ne, ud_child, &ud->device); } break; @@ -952,31 +997,10 @@ } last_key_id = kv->key.id; } - - memcpy(&ud->device, &nodemgr_dev_template_ud, - sizeof(ud->device)); - - if (parent) { - ud->flags |= UNIT_DIRECTORY_LUN_DIRECTORY; - ud->device.parent = &parent->device; - } else - ud->device.parent = &ne->device; - - snprintf(ud->device.bus_id, BUS_ID_SIZE, "%s-%u", - ne->device.bus_id, ud->id); - - ud->class_dev.dev = &ud->device; - ud->class_dev.class = &nodemgr_ud_class; - snprintf(ud->class_dev.class_id, BUS_ID_SIZE, "%s-%u", - ne->device.bus_id, ud->id); - - device_register(&ud->device); - class_device_register(&ud->class_dev); - get_device(&ud->device); - - if (ud->vendor_oui) - device_create_file(&ud->device, &dev_attr_ud_vendor_oui); - nodemgr_create_ud_dev_files(ud); + + /* do not process child units here and only if not already registered */ + if (!parent && ud->device.bus != &ieee1394_bus_type) + nodemgr_register_device(ne, ud, &ne->device); return ud; @@ -1141,6 +1165,13 @@ /* Mark the node as new, so it gets re-probed */ ne->needs_probe = 1; + } else { + /* old cache is valid, so update its generation */ + struct nodemgr_csr_info *ci = ne->csr->private; + ci->generation = generation; + /* free the partially filled now unneeded new cache */ + kfree(csr->private); + csr1212_destroy_csr(csr); } if (ne->in_limbo) @@ -1431,7 +1462,7 @@ quadlet_t bc; int status; - if (host->is_irm) + if (hpsb_disable_irm || host->is_irm) return 1; status = hpsb_read(host, LOCAL_BUS | (host->irm_id), @@ -1553,29 +1584,6 @@ complete_and_exit(&hi->exited, 0); } -struct node_entry *hpsb_guid_get_entry(u64 guid) -{ - struct node_entry *ne; - - down(&nodemgr_serialize); - ne = find_entry_by_guid(guid); - up(&nodemgr_serialize); - - return ne; -} - -struct node_entry *hpsb_nodeid_get_entry(struct hpsb_host *host, nodeid_t nodeid) -{ - struct node_entry *ne; - - down(&nodemgr_serialize); - ne = find_entry_by_nodeid(host, nodeid); - up(&nodemgr_serialize); - - return ne; -} - - int nodemgr_for_each_host(void *__data, int (*cb)(struct hpsb_host *, void *)) { struct class *class = &hpsb_host_class; @@ -1618,16 +1626,6 @@ pkt->node_id = ne->nodeid; } -int hpsb_node_read(struct node_entry *ne, u64 addr, - quadlet_t *buffer, size_t length) -{ - unsigned int generation = ne->generation; - - barrier(); - return hpsb_read(ne->host, ne->nodeid, generation, - addr, buffer, length); -} - int hpsb_node_write(struct node_entry *ne, u64 addr, quadlet_t *buffer, size_t length) { @@ -1636,16 +1634,6 @@ barrier(); return hpsb_write(ne->host, ne->nodeid, generation, addr, buffer, length); -} - -int hpsb_node_lock(struct node_entry *ne, u64 addr, - int extcode, quadlet_t *data, quadlet_t arg) -{ - unsigned int generation = ne->generation; - - barrier(); - return hpsb_lock(ne->host, ne->nodeid, generation, - addr, extcode, data, arg); } static void nodemgr_add_host(struct hpsb_host *host) diff -Nru a/drivers/ieee1394/nodemgr.h b/drivers/ieee1394/nodemgr.h --- a/drivers/ieee1394/nodemgr.h 2005-03-07 14:54:17 -08:00 +++ b/drivers/ieee1394/nodemgr.h 2005-03-07 14:54:17 -08:00 @@ -51,6 +51,7 @@ #define UNIT_DIRECTORY_VERSION 0x08 #define UNIT_DIRECTORY_HAS_LUN_DIRECTORY 0x10 #define UNIT_DIRECTORY_LUN_DIRECTORY 0x20 +#define UNIT_DIRECTORY_HAS_LUN 0x40 /* * A unit directory corresponds to a protocol supported by the @@ -82,6 +83,7 @@ struct class_device class_dev; struct csr1212_keyval *ud_kv; + u32 lun; /* logical unit number immediate value */ }; struct node_entry { diff -Nru a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c --- a/drivers/ieee1394/ohci1394.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/ieee1394/ohci1394.c 2005-03-07 14:54:18 -08:00 @@ -162,7 +162,7 @@ printk(level "%s: fw-host%d: " fmt "\n" , OHCI1394_DRIVER_NAME, ohci->host->id , ## args) static char version[] __devinitdata = - "$Rev: 1223 $ Ben Collins "; + "$Rev: 1250 $ Ben Collins "; /* Module Parameters */ static int phys_dma = 1; @@ -482,7 +482,9 @@ /* Put some defaults to these undefined bus options */ buf = reg_read(ohci, OHCI1394_BusOptions); - buf |= 0xE0000000; /* Enable IRMC, CMC and ISC */ + buf |= 0x60000000; /* Enable CMC and ISC */ + if (!hpsb_disable_irm) + buf |= 0x80000000; /* Enable IRMC */ buf &= ~0x00ff0000; /* XXX: Set cyc_clk_acc to zero for now */ buf &= ~0x18000000; /* Disable PMC and BMC */ reg_write(ohci, OHCI1394_BusOptions, buf); @@ -497,10 +499,12 @@ reg_write(ohci, OHCI1394_LinkControlClear, 0xffffffff); /* Enable cycle timer and cycle master and set the IRM - * contender bit in our self ID packets. */ - reg_write(ohci, OHCI1394_LinkControlSet, OHCI1394_LinkControl_CycleTimerEnable | + * contender bit in our self ID packets if appropriate. */ + reg_write(ohci, OHCI1394_LinkControlSet, + OHCI1394_LinkControl_CycleTimerEnable | OHCI1394_LinkControl_CycleMaster); - set_phy_reg_mask(ohci, 4, 0xc0); + set_phy_reg_mask(ohci, 4, PHY_04_LCTRL | + (hpsb_disable_irm ? 0 : PHY_04_CONTENDER)); /* Set up self-id dma buffer */ reg_write(ohci, OHCI1394_SelfIDBuffer, ohci->selfid_buf_bus); @@ -515,12 +519,6 @@ /* Now get our max packet size */ ohci->max_packet_size = 1<<(((reg_read(ohci, OHCI1394_BusOptions)>>12)&0xf)+1); - - if (ohci->max_packet_size < 512) { - HPSB_ERR("warning: Invalid max packet size of %d, setting to 512", - ohci->max_packet_size); - ohci->max_packet_size = 512; - } /* Don't accept phy packets into AR request context */ reg_write(ohci, OHCI1394_LinkControlClear, 0x00000400); @@ -2545,6 +2543,10 @@ idx = (idx + d->num_desc - 1 ) % d->num_desc; d->prg_cpu[idx]->branchAddress |= le32_to_cpu(0x00000001); + /* To avoid a race, ensure 1394 interface hardware sees the inserted + * context program descriptors before it sees the wakeup bit set. */ + wmb(); + /* wake up the dma context if necessary */ if (!(reg_read(ohci, d->ctrlSet) & 0x400)) { PRINT(KERN_INFO, diff -Nru a/drivers/ieee1394/pcilynx.c b/drivers/ieee1394/pcilynx.c --- a/drivers/ieee1394/pcilynx.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/ieee1394/pcilynx.c 2005-03-07 14:54:16 -08:00 @@ -384,7 +384,8 @@ lsid = 0x80400000 | ((phyreg[0] & 0xfc) << 22); lsid |= (phyreg[1] & 0x3f) << 16; /* gap count */ lsid |= (phyreg[2] & 0xc0) << 8; /* max speed */ - lsid |= (phyreg[6] & 0x01) << 11; /* contender (phy dependent) */ + if (!hpsb_disable_irm) + lsid |= (phyreg[6] & 0x01) << 11; /* contender (phy dependent) */ /* lsid |= 1 << 11; *//* set contender (hack) */ lsid |= (phyreg[6] & 0x10) >> 3; /* initiated reset */ @@ -500,7 +501,7 @@ pcl.async_error_next = PCL_NEXT_INVALID; pcl.pcl_status = 0; pcl.buffer[0].control = packet->speed_code << 14 | packet->header_size; -#ifdef __BIG_ENDIAN +#ifndef __BIG_ENDIAN pcl.buffer[0].control |= PCL_BIGENDIAN; #endif pcl.buffer[0].pointer = d->header_dma; @@ -1521,10 +1522,6 @@ int i; int error; - /* needed for i2c communication with serial eeprom */ - struct i2c_adapter i2c_adapter; - struct i2c_algo_bit_data i2c_adapter_data; - error = -ENXIO; if (pci_set_dma_mask(dev, 0xffffffff)) @@ -1697,7 +1694,7 @@ pcl.async_error_next = PCL_NEXT_INVALID; pcl.buffer[0].control = PCL_CMD_RCV | 16; -#ifdef __BIG_ENDIAN +#ifndef __BIG_ENDIAN pcl.buffer[0].control |= PCL_BIGENDIAN; #endif pcl.buffer[1].control = PCL_LAST_BUFF | 4080; @@ -1779,26 +1776,40 @@ | LINK_CONTROL_TX_ASYNC_EN | LINK_CONTROL_RX_ASYNC_EN | LINK_CONTROL_RESET_TX | LINK_CONTROL_RESET_RX); - if (!lynx->phyic.reg_1394a) { - /* attempt to enable contender bit -FIXME- would this work - * elsewhere? */ - reg_set_bits(lynx, GPIO_CTRL_A, 0x1); - reg_write(lynx, GPIO_DATA_BASE + 0x3c, 0x1); - } else { - /* set the contender and LCtrl bit in the extended PHY register - * set. (Should check that bis 0,1,2 (=0xE0) is set - * in register 2?) - */ - i = get_phy_reg(lynx, 4); - if (i != -1) set_phy_reg(lynx, 4, i | 0xc0); - } - - + if (!lynx->phyic.reg_1394a) { + if (!hpsb_disable_irm) { + /* attempt to enable contender bit -FIXME- would this + * work elsewhere? */ + reg_set_bits(lynx, GPIO_CTRL_A, 0x1); + reg_write(lynx, GPIO_DATA_BASE + 0x3c, 0x1); + } + } else { + /* set the contender (if appropriate) and LCtrl bit in the + * extended PHY register set. (Should check that PHY_02_EXTENDED + * is set in register 2?) + */ + i = get_phy_reg(lynx, 4); + i |= PHY_04_LCTRL; + if (hpsb_disable_irm) + i &= !PHY_04_CONTENDER; + else + i |= PHY_04_CONTENDER; + if (i != -1) set_phy_reg(lynx, 4, i); + } + if (!skip_eeprom) { - i2c_adapter = bit_ops; + /* needed for i2c communication with serial eeprom */ + struct i2c_adapter *i2c_ad; + struct i2c_algo_bit_data i2c_adapter_data; + + error = -ENOMEM; + i2c_ad = kmalloc(sizeof(struct i2c_adapter), SLAB_KERNEL); + if (!i2c_ad) FAIL("failed to allocate I2C adapter memory"); + + memcpy(i2c_ad, &bit_ops, sizeof(struct i2c_adapter)); i2c_adapter_data = bit_data; - i2c_adapter.algo_data = &i2c_adapter_data; + i2c_ad->algo_data = &i2c_adapter_data; i2c_adapter_data.data = lynx; PRINTD(KERN_DEBUG, lynx->id,"original eeprom control: %d", @@ -1808,8 +1819,9 @@ lynx->i2c_driven_state = 0x00000070; reg_write(lynx, SERIAL_EEPROM_CONTROL, lynx->i2c_driven_state); - if (i2c_bit_add_bus(&i2c_adapter) < 0) + if (i2c_bit_add_bus(i2c_ad) < 0) { + kfree(i2c_ad); error = -ENXIO; FAIL("unable to register i2c"); } @@ -1825,13 +1837,13 @@ #ifdef CONFIG_IEEE1394_VERBOSEDEBUG union i2c_smbus_data data; - if (i2c_smbus_xfer(&i2c_adapter, 80, 0, I2C_SMBUS_WRITE, 0, I2C_SMBUS_BYTE,NULL)) + if (i2c_smbus_xfer(i2c_ad, 80, 0, I2C_SMBUS_WRITE, 0, I2C_SMBUS_BYTE,NULL)) PRINT(KERN_ERR, lynx->id,"eeprom read start has failed"); else { u16 addr; for (addr=0x00; addr < 0x100; addr++) { - if (i2c_smbus_xfer(&i2c_adapter, 80, 0, I2C_SMBUS_READ, 0, I2C_SMBUS_BYTE,& data)) { + if (i2c_smbus_xfer(i2c_ad, 80, 0, I2C_SMBUS_READ, 0, I2C_SMBUS_BYTE,& data)) { PRINT(KERN_ERR, lynx->id, "unable to read i2c %x", addr); break; } @@ -1843,7 +1855,7 @@ /* we use i2c_transfer, because i2c_smbus_read_block_data does not work properly and we do it more efficiently in one transaction rather then using several reads */ - if (i2c_transfer(&i2c_adapter, msg, 2) < 0) { + if (i2c_transfer(i2c_ad, msg, 2) < 0) { PRINT(KERN_ERR, lynx->id, "unable to read bus info block from i2c"); } else { int i; @@ -1863,13 +1875,15 @@ { PRINT(KERN_DEBUG, lynx->id, "read a valid bus info block from"); } else { + kfree(i2c_ad); error = -ENXIO; FAIL("read something from serial eeprom, but it does not seem to be a valid bus info block"); } } - i2c_bit_del_bus(&i2c_adapter); + i2c_bit_del_bus(i2c_ad); + kfree(i2c_ad); } } diff -Nru a/drivers/ieee1394/raw1394.c b/drivers/ieee1394/raw1394.c --- a/drivers/ieee1394/raw1394.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/ieee1394/raw1394.c 2005-03-07 14:54:16 -08:00 @@ -75,58 +75,60 @@ static atomic_t internal_generation = ATOMIC_INIT(0); static atomic_t iso_buffer_size; -static const int iso_buffer_max = 4 * 1024 * 1024; /* 4 MB */ +static const int iso_buffer_max = 4 * 1024 * 1024; /* 4 MB */ static struct hpsb_highlevel raw1394_highlevel; -static int arm_read (struct hpsb_host *host, int nodeid, quadlet_t *buffer, - u64 addr, size_t length, u16 flags); -static int arm_write (struct hpsb_host *host, int nodeid, int destid, - quadlet_t *data, u64 addr, size_t length, u16 flags); -static int arm_lock (struct hpsb_host *host, int nodeid, quadlet_t *store, - u64 addr, quadlet_t data, quadlet_t arg, int ext_tcode, u16 flags); -static int arm_lock64 (struct hpsb_host *host, int nodeid, octlet_t *store, - u64 addr, octlet_t data, octlet_t arg, int ext_tcode, u16 flags); +static int arm_read(struct hpsb_host *host, int nodeid, quadlet_t * buffer, + u64 addr, size_t length, u16 flags); +static int arm_write(struct hpsb_host *host, int nodeid, int destid, + quadlet_t * data, u64 addr, size_t length, u16 flags); +static int arm_lock(struct hpsb_host *host, int nodeid, quadlet_t * store, + u64 addr, quadlet_t data, quadlet_t arg, int ext_tcode, + u16 flags); +static int arm_lock64(struct hpsb_host *host, int nodeid, octlet_t * store, + u64 addr, octlet_t data, octlet_t arg, int ext_tcode, + u16 flags); static struct hpsb_address_ops arm_ops = { - .read = arm_read, - .write = arm_write, - .lock = arm_lock, - .lock64 = arm_lock64, + .read = arm_read, + .write = arm_write, + .lock = arm_lock, + .lock64 = arm_lock64, }; static void queue_complete_cb(struct pending_request *req); static struct pending_request *__alloc_pending_request(int flags) { - struct pending_request *req; + struct pending_request *req; - req = (struct pending_request *)kmalloc(sizeof(struct pending_request), - flags); - if (req != NULL) { - memset(req, 0, sizeof(struct pending_request)); - INIT_LIST_HEAD(&req->list); - } + req = (struct pending_request *)kmalloc(sizeof(struct pending_request), + flags); + if (req != NULL) { + memset(req, 0, sizeof(struct pending_request)); + INIT_LIST_HEAD(&req->list); + } - return req; + return req; } static inline struct pending_request *alloc_pending_request(void) { - return __alloc_pending_request(SLAB_KERNEL); + return __alloc_pending_request(SLAB_KERNEL); } static void free_pending_request(struct pending_request *req) { - if (req->ibs) { - if (atomic_dec_and_test(&req->ibs->refcount)) { - atomic_sub(req->ibs->data_size, &iso_buffer_size); - kfree(req->ibs); - } - } else if (req->free_data) { - kfree(req->data); - } - hpsb_free_packet(req->packet); - kfree(req); + if (req->ibs) { + if (atomic_dec_and_test(&req->ibs->refcount)) { + atomic_sub(req->ibs->data_size, &iso_buffer_size); + kfree(req->ibs); + } + } else if (req->free_data) { + kfree(req->data); + } + hpsb_free_packet(req->packet); + kfree(req); } /* fi->reqlists_lock must be taken */ @@ -134,494 +136,505 @@ { struct file_info *fi = req->file_info; list_del(&req->list); - list_add_tail(&req->list, &fi->req_complete); + list_add_tail(&req->list, &fi->req_complete); up(&fi->complete_sem); - wake_up_interruptible(&fi->poll_wait_complete); + wake_up_interruptible(&fi->poll_wait_complete); } static void queue_complete_req(struct pending_request *req) { - unsigned long flags; - struct file_info *fi = req->file_info; + unsigned long flags; + struct file_info *fi = req->file_info; - spin_lock_irqsave(&fi->reqlists_lock, flags); + spin_lock_irqsave(&fi->reqlists_lock, flags); __queue_complete_req(req); - spin_unlock_irqrestore(&fi->reqlists_lock, flags); + spin_unlock_irqrestore(&fi->reqlists_lock, flags); } static void queue_complete_cb(struct pending_request *req) { - struct hpsb_packet *packet = req->packet; - int rcode = (packet->header[1] >> 12) & 0xf; + struct hpsb_packet *packet = req->packet; + int rcode = (packet->header[1] >> 12) & 0xf; - switch (packet->ack_code) { - case ACKX_NONE: - case ACKX_SEND_ERROR: - req->req.error = RAW1394_ERROR_SEND_ERROR; - break; - case ACKX_ABORTED: - req->req.error = RAW1394_ERROR_ABORTED; - break; - case ACKX_TIMEOUT: - req->req.error = RAW1394_ERROR_TIMEOUT; - break; - default: - req->req.error = (packet->ack_code << 16) | rcode; - break; - } - - if (!((packet->ack_code == ACK_PENDING) && (rcode == RCODE_COMPLETE))) { - req->req.length = 0; - } + switch (packet->ack_code) { + case ACKX_NONE: + case ACKX_SEND_ERROR: + req->req.error = RAW1394_ERROR_SEND_ERROR; + break; + case ACKX_ABORTED: + req->req.error = RAW1394_ERROR_ABORTED; + break; + case ACKX_TIMEOUT: + req->req.error = RAW1394_ERROR_TIMEOUT; + break; + default: + req->req.error = (packet->ack_code << 16) | rcode; + break; + } + + if (!((packet->ack_code == ACK_PENDING) && (rcode == RCODE_COMPLETE))) { + req->req.length = 0; + } - if ((req->req.type == RAW1394_REQ_ASYNC_READ) || + if ((req->req.type == RAW1394_REQ_ASYNC_READ) || (req->req.type == RAW1394_REQ_ASYNC_WRITE) || (req->req.type == RAW1394_REQ_ASYNC_STREAM) || (req->req.type == RAW1394_REQ_LOCK) || (req->req.type == RAW1394_REQ_LOCK64)) - hpsb_free_tlabel(packet); + hpsb_free_tlabel(packet); - queue_complete_req(req); + queue_complete_req(req); } - static void add_host(struct hpsb_host *host) { - struct host_info *hi; - unsigned long flags; + struct host_info *hi; + unsigned long flags; - hi = (struct host_info *)kmalloc(sizeof(struct host_info), GFP_KERNEL); + hi = (struct host_info *)kmalloc(sizeof(struct host_info), GFP_KERNEL); - if (hi != NULL) { - INIT_LIST_HEAD(&hi->list); - hi->host = host; - INIT_LIST_HEAD(&hi->file_info_list); - - spin_lock_irqsave(&host_info_lock, flags); - list_add_tail(&hi->list, &host_info_list); - host_count++; - spin_unlock_irqrestore(&host_info_lock, flags); - } + if (hi != NULL) { + INIT_LIST_HEAD(&hi->list); + hi->host = host; + INIT_LIST_HEAD(&hi->file_info_list); + + spin_lock_irqsave(&host_info_lock, flags); + list_add_tail(&hi->list, &host_info_list); + host_count++; + spin_unlock_irqrestore(&host_info_lock, flags); + } - atomic_inc(&internal_generation); + atomic_inc(&internal_generation); } - static struct host_info *find_host_info(struct hpsb_host *host) { - struct host_info *hi; + struct host_info *hi; - list_for_each_entry(hi, &host_info_list, list) - if (hi->host == host) - return hi; + list_for_each_entry(hi, &host_info_list, list) + if (hi->host == host) + return hi; - return NULL; + return NULL; } static void remove_host(struct hpsb_host *host) { - struct host_info *hi; - unsigned long flags; + struct host_info *hi; + unsigned long flags; + + spin_lock_irqsave(&host_info_lock, flags); + hi = find_host_info(host); - spin_lock_irqsave(&host_info_lock, flags); - hi = find_host_info(host); + if (hi != NULL) { + list_del(&hi->list); + host_count--; + /* + FIXME: address ranges should be removed + and fileinfo states should be initialized + (including setting generation to + internal-generation ...) + */ + } + spin_unlock_irqrestore(&host_info_lock, flags); - if (hi != NULL) { - list_del(&hi->list); - host_count--; - /* - FIXME: address ranges should be removed - and fileinfo states should be initialized - (including setting generation to - internal-generation ...) - */ - } - spin_unlock_irqrestore(&host_info_lock, flags); - - if (hi == NULL) { - printk(KERN_ERR "raw1394: attempt to remove unknown host " - "0x%p\n", host); - return; - } + if (hi == NULL) { + printk(KERN_ERR "raw1394: attempt to remove unknown host " + "0x%p\n", host); + return; + } - kfree(hi); + kfree(hi); - atomic_inc(&internal_generation); + atomic_inc(&internal_generation); } static void host_reset(struct hpsb_host *host) { - unsigned long flags; - struct host_info *hi; - struct file_info *fi; - struct pending_request *req; - - spin_lock_irqsave(&host_info_lock, flags); - hi = find_host_info(host); - - if (hi != NULL) { - list_for_each_entry(fi, &hi->file_info_list, list) { - if (fi->notification == RAW1394_NOTIFY_ON) { - req = __alloc_pending_request(SLAB_ATOMIC); - - if (req != NULL) { - req->file_info = fi; - req->req.type = RAW1394_REQ_BUS_RESET; - req->req.generation = get_hpsb_generation(host); - req->req.misc = (host->node_id << 16) - | host->node_count; - if (fi->protocol_version > 3) { - req->req.misc |= (NODEID_TO_NODE(host->irm_id) - << 8); - } - - queue_complete_req(req); - } - } - } - } - spin_unlock_irqrestore(&host_info_lock, flags); -} - -static void iso_receive(struct hpsb_host *host, int channel, quadlet_t *data, - size_t length) -{ - unsigned long flags; - struct host_info *hi; - struct file_info *fi; - struct pending_request *req, *req_next; - struct iso_block_store *ibs = NULL; - LIST_HEAD(reqs); - - if ((atomic_read(&iso_buffer_size) + length) > iso_buffer_max) { - HPSB_INFO("dropped iso packet"); - return; - } + unsigned long flags; + struct host_info *hi; + struct file_info *fi; + struct pending_request *req; + + spin_lock_irqsave(&host_info_lock, flags); + hi = find_host_info(host); + + if (hi != NULL) { + list_for_each_entry(fi, &hi->file_info_list, list) { + if (fi->notification == RAW1394_NOTIFY_ON) { + req = __alloc_pending_request(SLAB_ATOMIC); + + if (req != NULL) { + req->file_info = fi; + req->req.type = RAW1394_REQ_BUS_RESET; + req->req.generation = + get_hpsb_generation(host); + req->req.misc = (host->node_id << 16) + | host->node_count; + if (fi->protocol_version > 3) { + req->req.misc |= + (NODEID_TO_NODE + (host->irm_id) + << 8); + } + + queue_complete_req(req); + } + } + } + } + spin_unlock_irqrestore(&host_info_lock, flags); +} + +static void iso_receive(struct hpsb_host *host, int channel, quadlet_t * data, + size_t length) +{ + unsigned long flags; + struct host_info *hi; + struct file_info *fi; + struct pending_request *req, *req_next; + struct iso_block_store *ibs = NULL; + LIST_HEAD(reqs); + + if ((atomic_read(&iso_buffer_size) + length) > iso_buffer_max) { + HPSB_INFO("dropped iso packet"); + return; + } - spin_lock_irqsave(&host_info_lock, flags); - hi = find_host_info(host); + spin_lock_irqsave(&host_info_lock, flags); + hi = find_host_info(host); - if (hi != NULL) { + if (hi != NULL) { list_for_each_entry(fi, &hi->file_info_list, list) { - if (!(fi->listen_channels & (1ULL << channel))) - continue; + if (!(fi->listen_channels & (1ULL << channel))) + continue; + + req = __alloc_pending_request(SLAB_ATOMIC); + if (!req) + break; + + if (!ibs) { + ibs = kmalloc(sizeof(struct iso_block_store) + + length, SLAB_ATOMIC); + if (!ibs) { + kfree(req); + break; + } + + atomic_add(length, &iso_buffer_size); + atomic_set(&ibs->refcount, 0); + ibs->data_size = length; + memcpy(ibs->data, data, length); + } + + atomic_inc(&ibs->refcount); - req = __alloc_pending_request(SLAB_ATOMIC); - if (!req) break; + req->file_info = fi; + req->ibs = ibs; + req->data = ibs->data; + req->req.type = RAW1394_REQ_ISO_RECEIVE; + req->req.generation = get_hpsb_generation(host); + req->req.misc = 0; + req->req.recvb = ptr2int(fi->iso_buffer); + req->req.length = min(length, fi->iso_buffer_length); - if (!ibs) { - ibs = kmalloc(sizeof(struct iso_block_store) - + length, SLAB_ATOMIC); - if (!ibs) { - kfree(req); - break; - } - - atomic_add(length, &iso_buffer_size); - atomic_set(&ibs->refcount, 0); - ibs->data_size = length; - memcpy(ibs->data, data, length); - } - - atomic_inc(&ibs->refcount); - - req->file_info = fi; - req->ibs = ibs; - req->data = ibs->data; - req->req.type = RAW1394_REQ_ISO_RECEIVE; - req->req.generation = get_hpsb_generation(host); - req->req.misc = 0; - req->req.recvb = ptr2int(fi->iso_buffer); - req->req.length = min(length, fi->iso_buffer_length); - - list_add_tail(&req->list, &reqs); - } - } - spin_unlock_irqrestore(&host_info_lock, flags); + list_add_tail(&req->list, &reqs); + } + } + spin_unlock_irqrestore(&host_info_lock, flags); list_for_each_entry_safe(req, req_next, &reqs, list) - queue_complete_req(req); + queue_complete_req(req); } static void fcp_request(struct hpsb_host *host, int nodeid, int direction, - int cts, u8 *data, size_t length) + int cts, u8 * data, size_t length) { - unsigned long flags; - struct host_info *hi; - struct file_info *fi; - struct pending_request *req, *req_next; - struct iso_block_store *ibs = NULL; - LIST_HEAD(reqs); - - if ((atomic_read(&iso_buffer_size) + length) > iso_buffer_max) { - HPSB_INFO("dropped fcp request"); - return; - } + unsigned long flags; + struct host_info *hi; + struct file_info *fi; + struct pending_request *req, *req_next; + struct iso_block_store *ibs = NULL; + LIST_HEAD(reqs); + + if ((atomic_read(&iso_buffer_size) + length) > iso_buffer_max) { + HPSB_INFO("dropped fcp request"); + return; + } - spin_lock_irqsave(&host_info_lock, flags); - hi = find_host_info(host); + spin_lock_irqsave(&host_info_lock, flags); + hi = find_host_info(host); - if (hi != NULL) { + if (hi != NULL) { list_for_each_entry(fi, &hi->file_info_list, list) { - if (!fi->fcp_buffer) - continue; + if (!fi->fcp_buffer) + continue; - req = __alloc_pending_request(SLAB_ATOMIC); - if (!req) break; + req = __alloc_pending_request(SLAB_ATOMIC); + if (!req) + break; + + if (!ibs) { + ibs = kmalloc(sizeof(struct iso_block_store) + + length, SLAB_ATOMIC); + if (!ibs) { + kfree(req); + break; + } + + atomic_add(length, &iso_buffer_size); + atomic_set(&ibs->refcount, 0); + ibs->data_size = length; + memcpy(ibs->data, data, length); + } - if (!ibs) { - ibs = kmalloc(sizeof(struct iso_block_store) - + length, SLAB_ATOMIC); - if (!ibs) { - kfree(req); - break; - } - - atomic_add(length, &iso_buffer_size); - atomic_set(&ibs->refcount, 0); - ibs->data_size = length; - memcpy(ibs->data, data, length); - } - - atomic_inc(&ibs->refcount); - - req->file_info = fi; - req->ibs = ibs; - req->data = ibs->data; - req->req.type = RAW1394_REQ_FCP_REQUEST; - req->req.generation = get_hpsb_generation(host); - req->req.misc = nodeid | (direction << 16); - req->req.recvb = ptr2int(fi->fcp_buffer); - req->req.length = length; - - list_add_tail(&req->list, &reqs); - } - } - spin_unlock_irqrestore(&host_info_lock, flags); + atomic_inc(&ibs->refcount); + + req->file_info = fi; + req->ibs = ibs; + req->data = ibs->data; + req->req.type = RAW1394_REQ_FCP_REQUEST; + req->req.generation = get_hpsb_generation(host); + req->req.misc = nodeid | (direction << 16); + req->req.recvb = ptr2int(fi->fcp_buffer); + req->req.length = length; + + list_add_tail(&req->list, &reqs); + } + } + spin_unlock_irqrestore(&host_info_lock, flags); list_for_each_entry_safe(req, req_next, &reqs, list) - queue_complete_req(req); + queue_complete_req(req); } - -static ssize_t raw1394_read(struct file *file, char __user *buffer, size_t count, - loff_t *offset_is_ignored) +static ssize_t raw1394_read(struct file *file, char __user * buffer, + size_t count, loff_t * offset_is_ignored) { - struct file_info *fi = (struct file_info *)file->private_data; - struct list_head *lh; - struct pending_request *req; - - if (count != sizeof(struct raw1394_request)) { - return -EINVAL; - } - - if (!access_ok(VERIFY_WRITE, buffer, count)) { - return -EFAULT; - } - - if (file->f_flags & O_NONBLOCK) { - if (down_trylock(&fi->complete_sem)) { - return -EAGAIN; - } - } else { - if (down_interruptible(&fi->complete_sem)) { - return -ERESTARTSYS; - } - } - - spin_lock_irq(&fi->reqlists_lock); - lh = fi->req_complete.next; - list_del(lh); - spin_unlock_irq(&fi->reqlists_lock); - - req = list_entry(lh, struct pending_request, list); - - if (req->req.length) { - if (copy_to_user(int2ptr(req->req.recvb), req->data, - req->req.length)) { - req->req.error = RAW1394_ERROR_MEMFAULT; - } - } - __copy_to_user(buffer, &req->req, sizeof(req->req)); + struct file_info *fi = (struct file_info *)file->private_data; + struct list_head *lh; + struct pending_request *req; + ssize_t ret; - free_pending_request(req); - return sizeof(struct raw1394_request); -} + if (count != sizeof(struct raw1394_request)) { + return -EINVAL; + } + if (!access_ok(VERIFY_WRITE, buffer, count)) { + return -EFAULT; + } + + if (file->f_flags & O_NONBLOCK) { + if (down_trylock(&fi->complete_sem)) { + return -EAGAIN; + } + } else { + if (down_interruptible(&fi->complete_sem)) { + return -ERESTARTSYS; + } + } + + spin_lock_irq(&fi->reqlists_lock); + lh = fi->req_complete.next; + list_del(lh); + spin_unlock_irq(&fi->reqlists_lock); + + req = list_entry(lh, struct pending_request, list); + + if (req->req.length) { + if (copy_to_user(int2ptr(req->req.recvb), req->data, + req->req.length)) { + req->req.error = RAW1394_ERROR_MEMFAULT; + } + } + if (copy_to_user(buffer, &req->req, sizeof(req->req))) { + ret = -EFAULT; + goto out; + } + + ret = (ssize_t) sizeof(struct raw1394_request); + out: + free_pending_request(req); + return ret; +} static int state_opened(struct file_info *fi, struct pending_request *req) { - if (req->req.type == RAW1394_REQ_INITIALIZE) { - switch (req->req.misc) { - case RAW1394_KERNELAPI_VERSION: - case 3: - fi->state = initialized; - fi->protocol_version = req->req.misc; - req->req.error = RAW1394_ERROR_NONE; - req->req.generation = atomic_read(&internal_generation); - break; - - default: - req->req.error = RAW1394_ERROR_COMPAT; - req->req.misc = RAW1394_KERNELAPI_VERSION; - } - } else { - req->req.error = RAW1394_ERROR_STATE_ORDER; - } - - req->req.length = 0; - queue_complete_req(req); - return sizeof(struct raw1394_request); + if (req->req.type == RAW1394_REQ_INITIALIZE) { + switch (req->req.misc) { + case RAW1394_KERNELAPI_VERSION: + case 3: + fi->state = initialized; + fi->protocol_version = req->req.misc; + req->req.error = RAW1394_ERROR_NONE; + req->req.generation = atomic_read(&internal_generation); + break; + + default: + req->req.error = RAW1394_ERROR_COMPAT; + req->req.misc = RAW1394_KERNELAPI_VERSION; + } + } else { + req->req.error = RAW1394_ERROR_STATE_ORDER; + } + + req->req.length = 0; + queue_complete_req(req); + return sizeof(struct raw1394_request); } static int state_initialized(struct file_info *fi, struct pending_request *req) { - struct host_info *hi; - struct raw1394_khost_list *khl; + struct host_info *hi; + struct raw1394_khost_list *khl; + + if (req->req.generation != atomic_read(&internal_generation)) { + req->req.error = RAW1394_ERROR_GENERATION; + req->req.generation = atomic_read(&internal_generation); + req->req.length = 0; + queue_complete_req(req); + return sizeof(struct raw1394_request); + } + + switch (req->req.type) { + case RAW1394_REQ_LIST_CARDS: + spin_lock_irq(&host_info_lock); + khl = kmalloc(sizeof(struct raw1394_khost_list) * host_count, + SLAB_ATOMIC); + + if (khl != NULL) { + req->req.misc = host_count; + req->data = (quadlet_t *) khl; - if (req->req.generation != atomic_read(&internal_generation)) { - req->req.error = RAW1394_ERROR_GENERATION; - req->req.generation = atomic_read(&internal_generation); - req->req.length = 0; - queue_complete_req(req); - return sizeof(struct raw1394_request); - } - - switch (req->req.type) { - case RAW1394_REQ_LIST_CARDS: - spin_lock_irq(&host_info_lock); - khl = kmalloc(sizeof(struct raw1394_khost_list) * host_count, - SLAB_ATOMIC); - - if (khl != NULL) { - req->req.misc = host_count; - req->data = (quadlet_t *)khl; - - list_for_each_entry(hi, &host_info_list, list) { - khl->nodes = hi->host->node_count; - strcpy(khl->name, hi->host->driver->name); - khl++; - } - } - spin_unlock_irq(&host_info_lock); - - if (khl != NULL) { - req->req.error = RAW1394_ERROR_NONE; - req->req.length = min(req->req.length, - (u32)(sizeof(struct raw1394_khost_list) - * req->req.misc)); - req->free_data = 1; - } else { - return -ENOMEM; - } - break; - - case RAW1394_REQ_SET_CARD: - spin_lock_irq(&host_info_lock); - if (req->req.misc < host_count) { + list_for_each_entry(hi, &host_info_list, list) { + khl->nodes = hi->host->node_count; + strcpy(khl->name, hi->host->driver->name); + khl++; + } + } + spin_unlock_irq(&host_info_lock); + + if (khl != NULL) { + req->req.error = RAW1394_ERROR_NONE; + req->req.length = min(req->req.length, + (u32) (sizeof + (struct raw1394_khost_list) + * req->req.misc)); + req->free_data = 1; + } else { + return -ENOMEM; + } + break; + + case RAW1394_REQ_SET_CARD: + spin_lock_irq(&host_info_lock); + if (req->req.misc < host_count) { list_for_each_entry(hi, &host_info_list, list) { if (!req->req.misc--) break; } - get_device(&hi->host->device); // XXX Need to handle failure case - list_add_tail(&fi->list, &hi->file_info_list); - fi->host = hi->host; - fi->state = connected; - - req->req.error = RAW1394_ERROR_NONE; - req->req.generation = get_hpsb_generation(fi->host); - req->req.misc = (fi->host->node_id << 16) - | fi->host->node_count; - if (fi->protocol_version > 3) { - req->req.misc |= NODEID_TO_NODE(fi->host->irm_id) << 8; - } - } else { - req->req.error = RAW1394_ERROR_INVALID_ARG; - } + get_device(&hi->host->device); // XXX Need to handle failure case + list_add_tail(&fi->list, &hi->file_info_list); + fi->host = hi->host; + fi->state = connected; + + req->req.error = RAW1394_ERROR_NONE; + req->req.generation = get_hpsb_generation(fi->host); + req->req.misc = (fi->host->node_id << 16) + | fi->host->node_count; + if (fi->protocol_version > 3) { + req->req.misc |= + NODEID_TO_NODE(fi->host->irm_id) << 8; + } + } else { + req->req.error = RAW1394_ERROR_INVALID_ARG; + } spin_unlock_irq(&host_info_lock); - req->req.length = 0; - break; + req->req.length = 0; + break; - default: - req->req.error = RAW1394_ERROR_STATE_ORDER; - req->req.length = 0; - break; - } + default: + req->req.error = RAW1394_ERROR_STATE_ORDER; + req->req.length = 0; + break; + } - queue_complete_req(req); - return sizeof(struct raw1394_request); + queue_complete_req(req); + return sizeof(struct raw1394_request); } static void handle_iso_listen(struct file_info *fi, struct pending_request *req) { - int channel = req->req.misc; + int channel = req->req.misc; - spin_lock_irq(&host_info_lock); - if ((channel > 63) || (channel < -64)) { - req->req.error = RAW1394_ERROR_INVALID_ARG; - } else if (channel >= 0) { - /* allocate channel req.misc */ - if (fi->listen_channels & (1ULL << channel)) { - req->req.error = RAW1394_ERROR_ALREADY; - } else { - if (hpsb_listen_channel(&raw1394_highlevel, fi->host, channel)) { + spin_lock_irq(&host_info_lock); + if ((channel > 63) || (channel < -64)) { + req->req.error = RAW1394_ERROR_INVALID_ARG; + } else if (channel >= 0) { + /* allocate channel req.misc */ + if (fi->listen_channels & (1ULL << channel)) { + req->req.error = RAW1394_ERROR_ALREADY; + } else { + if (hpsb_listen_channel + (&raw1394_highlevel, fi->host, channel)) { req->req.error = RAW1394_ERROR_ALREADY; } else { fi->listen_channels |= 1ULL << channel; fi->iso_buffer = int2ptr(req->req.recvb); fi->iso_buffer_length = req->req.length; } - } - } else { - /* deallocate channel (one's complement neg) req.misc */ - channel = ~channel; - - if (fi->listen_channels & (1ULL << channel)) { - hpsb_unlisten_channel(&raw1394_highlevel, fi->host, channel); - fi->listen_channels &= ~(1ULL << channel); - } else { - req->req.error = RAW1394_ERROR_INVALID_ARG; - } - } - - req->req.length = 0; - queue_complete_req(req); - spin_unlock_irq(&host_info_lock); + } + } else { + /* deallocate channel (one's complement neg) req.misc */ + channel = ~channel; + + if (fi->listen_channels & (1ULL << channel)) { + hpsb_unlisten_channel(&raw1394_highlevel, fi->host, + channel); + fi->listen_channels &= ~(1ULL << channel); + } else { + req->req.error = RAW1394_ERROR_INVALID_ARG; + } + } + + req->req.length = 0; + queue_complete_req(req); + spin_unlock_irq(&host_info_lock); } static void handle_fcp_listen(struct file_info *fi, struct pending_request *req) { - if (req->req.misc) { - if (fi->fcp_buffer) { - req->req.error = RAW1394_ERROR_ALREADY; - } else { - fi->fcp_buffer = int2ptr(req->req.recvb); - } - } else { - if (!fi->fcp_buffer) { - req->req.error = RAW1394_ERROR_ALREADY; - } else { - fi->fcp_buffer = NULL; - } - } + if (req->req.misc) { + if (fi->fcp_buffer) { + req->req.error = RAW1394_ERROR_ALREADY; + } else { + fi->fcp_buffer = int2ptr(req->req.recvb); + } + } else { + if (!fi->fcp_buffer) { + req->req.error = RAW1394_ERROR_ALREADY; + } else { + fi->fcp_buffer = NULL; + } + } - req->req.length = 0; - queue_complete_req(req); + req->req.length = 0; + queue_complete_req(req); } - static int handle_async_request(struct file_info *fi, - struct pending_request *req, int node) + struct pending_request *req, int node) { - struct hpsb_packet *packet = NULL; - u64 addr = req->req.address & 0xffffffffffffULL; + struct hpsb_packet *packet = NULL; + u64 addr = req->req.address & 0xffffffffffffULL; - switch (req->req.type) { - case RAW1394_REQ_ASYNC_READ: + switch (req->req.type) { + case RAW1394_REQ_ASYNC_READ: DBGMSG("read_request called"); - packet = hpsb_make_readpacket(fi->host, node, addr, req->req.length); + packet = + hpsb_make_readpacket(fi->host, node, addr, req->req.length); if (!packet) return -ENOMEM; @@ -631,7 +644,7 @@ else req->data = packet->data; - break; + break; case RAW1394_REQ_ASYNC_WRITE: DBGMSG("write_request called"); @@ -642,1105 +655,1207 @@ return -ENOMEM; if (req->req.length == 4) { - if (copy_from_user(&packet->header[3], int2ptr(req->req.sendb), - req->req.length)) + if (copy_from_user + (&packet->header[3], int2ptr(req->req.sendb), + req->req.length)) req->req.error = RAW1394_ERROR_MEMFAULT; } else { - if (copy_from_user(packet->data, int2ptr(req->req.sendb), - req->req.length)) + if (copy_from_user + (packet->data, int2ptr(req->req.sendb), + req->req.length)) req->req.error = RAW1394_ERROR_MEMFAULT; } req->req.length = 0; - break; + break; case RAW1394_REQ_ASYNC_STREAM: DBGMSG("stream_request called"); - packet = hpsb_make_streampacket(fi->host, NULL, req->req.length, node & 0x3f/*channel*/, - (req->req.misc >> 16) & 0x3, req->req.misc & 0xf); + packet = + hpsb_make_streampacket(fi->host, NULL, req->req.length, + node & 0x3f /*channel */ , + (req->req.misc >> 16) & 0x3, + req->req.misc & 0xf); if (!packet) return -ENOMEM; if (copy_from_user(packet->data, int2ptr(req->req.sendb), - req->req.length)) + req->req.length)) req->req.error = RAW1394_ERROR_MEMFAULT; req->req.length = 0; break; - case RAW1394_REQ_LOCK: - DBGMSG("lock_request called"); - if ((req->req.misc == EXTCODE_FETCH_ADD) - || (req->req.misc == EXTCODE_LITTLE_ADD)) { - if (req->req.length != 4) { - req->req.error = RAW1394_ERROR_INVALID_ARG; - break; - } - } else { - if (req->req.length != 8) { - req->req.error = RAW1394_ERROR_INVALID_ARG; - break; - } - } - - packet = hpsb_make_lockpacket(fi->host, node, addr, - req->req.misc, NULL, 0); - if (!packet) return -ENOMEM; - - if (copy_from_user(packet->data, int2ptr(req->req.sendb), - req->req.length)) { - req->req.error = RAW1394_ERROR_MEMFAULT; - break; - } - - req->data = packet->data; - req->req.length = 4; - break; - - case RAW1394_REQ_LOCK64: - DBGMSG("lock64_request called"); - if ((req->req.misc == EXTCODE_FETCH_ADD) - || (req->req.misc == EXTCODE_LITTLE_ADD)) { - if (req->req.length != 8) { - req->req.error = RAW1394_ERROR_INVALID_ARG; - break; - } - } else { - if (req->req.length != 16) { - req->req.error = RAW1394_ERROR_INVALID_ARG; - break; - } - } - packet = hpsb_make_lock64packet(fi->host, node, addr, - req->req.misc, NULL, 0); - if (!packet) return -ENOMEM; - - if (copy_from_user(packet->data, int2ptr(req->req.sendb), - req->req.length)) { - req->req.error = RAW1394_ERROR_MEMFAULT; - break; - } - - req->data = packet->data; - req->req.length = 8; - break; - - default: - req->req.error = RAW1394_ERROR_STATE_ORDER; - } - - req->packet = packet; - - if (req->req.error) { - req->req.length = 0; - queue_complete_req(req); - return sizeof(struct raw1394_request); - } - - hpsb_set_packet_complete_task(packet, (void(*)(void*))queue_complete_cb, req); - - spin_lock_irq(&fi->reqlists_lock); - list_add_tail(&req->list, &fi->req_pending); - spin_unlock_irq(&fi->reqlists_lock); + case RAW1394_REQ_LOCK: + DBGMSG("lock_request called"); + if ((req->req.misc == EXTCODE_FETCH_ADD) + || (req->req.misc == EXTCODE_LITTLE_ADD)) { + if (req->req.length != 4) { + req->req.error = RAW1394_ERROR_INVALID_ARG; + break; + } + } else { + if (req->req.length != 8) { + req->req.error = RAW1394_ERROR_INVALID_ARG; + break; + } + } + + packet = hpsb_make_lockpacket(fi->host, node, addr, + req->req.misc, NULL, 0); + if (!packet) + return -ENOMEM; + + if (copy_from_user(packet->data, int2ptr(req->req.sendb), + req->req.length)) { + req->req.error = RAW1394_ERROR_MEMFAULT; + break; + } + + req->data = packet->data; + req->req.length = 4; + break; + + case RAW1394_REQ_LOCK64: + DBGMSG("lock64_request called"); + if ((req->req.misc == EXTCODE_FETCH_ADD) + || (req->req.misc == EXTCODE_LITTLE_ADD)) { + if (req->req.length != 8) { + req->req.error = RAW1394_ERROR_INVALID_ARG; + break; + } + } else { + if (req->req.length != 16) { + req->req.error = RAW1394_ERROR_INVALID_ARG; + break; + } + } + packet = hpsb_make_lock64packet(fi->host, node, addr, + req->req.misc, NULL, 0); + if (!packet) + return -ENOMEM; + + if (copy_from_user(packet->data, int2ptr(req->req.sendb), + req->req.length)) { + req->req.error = RAW1394_ERROR_MEMFAULT; + break; + } + + req->data = packet->data; + req->req.length = 8; + break; + + default: + req->req.error = RAW1394_ERROR_STATE_ORDER; + } + + req->packet = packet; + + if (req->req.error) { + req->req.length = 0; + queue_complete_req(req); + return sizeof(struct raw1394_request); + } + + hpsb_set_packet_complete_task(packet, + (void (*)(void *))queue_complete_cb, req); + + spin_lock_irq(&fi->reqlists_lock); + list_add_tail(&req->list, &fi->req_pending); + spin_unlock_irq(&fi->reqlists_lock); packet->generation = req->req.generation; - if (hpsb_send_packet(packet) < 0) { - req->req.error = RAW1394_ERROR_SEND_ERROR; - req->req.length = 0; - hpsb_free_tlabel(packet); - queue_complete_req(req); - } - return sizeof(struct raw1394_request); + if (hpsb_send_packet(packet) < 0) { + req->req.error = RAW1394_ERROR_SEND_ERROR; + req->req.length = 0; + hpsb_free_tlabel(packet); + queue_complete_req(req); + } + return sizeof(struct raw1394_request); } static int handle_iso_send(struct file_info *fi, struct pending_request *req, - int channel) + int channel) { - struct hpsb_packet *packet; + struct hpsb_packet *packet; packet = hpsb_make_isopacket(fi->host, req->req.length, channel & 0x3f, - (req->req.misc >> 16) & 0x3, req->req.misc & 0xf); + (req->req.misc >> 16) & 0x3, + req->req.misc & 0xf); if (!packet) return -ENOMEM; - packet->speed_code = req->req.address & 0x3; + packet->speed_code = req->req.address & 0x3; req->packet = packet; - if (copy_from_user(packet->data, int2ptr(req->req.sendb), - req->req.length)) { - req->req.error = RAW1394_ERROR_MEMFAULT; - req->req.length = 0; - queue_complete_req(req); - return sizeof(struct raw1394_request); - } - - req->req.length = 0; - hpsb_set_packet_complete_task(packet, (void (*)(void*))queue_complete_req, req); - - spin_lock_irq(&fi->reqlists_lock); - list_add_tail(&req->list, &fi->req_pending); - spin_unlock_irq(&fi->reqlists_lock); + if (copy_from_user(packet->data, int2ptr(req->req.sendb), + req->req.length)) { + req->req.error = RAW1394_ERROR_MEMFAULT; + req->req.length = 0; + queue_complete_req(req); + return sizeof(struct raw1394_request); + } + + req->req.length = 0; + hpsb_set_packet_complete_task(packet, + (void (*)(void *))queue_complete_req, + req); + + spin_lock_irq(&fi->reqlists_lock); + list_add_tail(&req->list, &fi->req_pending); + spin_unlock_irq(&fi->reqlists_lock); /* Update the generation of the packet just before sending. */ packet->generation = req->req.generation; - if (hpsb_send_packet(packet) < 0) { - req->req.error = RAW1394_ERROR_SEND_ERROR; - queue_complete_req(req); - } + if (hpsb_send_packet(packet) < 0) { + req->req.error = RAW1394_ERROR_SEND_ERROR; + queue_complete_req(req); + } - return sizeof(struct raw1394_request); + return sizeof(struct raw1394_request); } static int handle_async_send(struct file_info *fi, struct pending_request *req) { - struct hpsb_packet *packet; - int header_length = req->req.misc & 0xffff; - int expect_response = req->req.misc >> 16; - - if ((header_length > req->req.length) || - (header_length < 12)) { - req->req.error = RAW1394_ERROR_INVALID_ARG; - req->req.length = 0; - queue_complete_req(req); - return sizeof(struct raw1394_request); - } - - packet = hpsb_alloc_packet(req->req.length-header_length); - req->packet = packet; - if (!packet) return -ENOMEM; - - if (copy_from_user(packet->header, int2ptr(req->req.sendb), - header_length)) { - req->req.error = RAW1394_ERROR_MEMFAULT; - req->req.length = 0; - queue_complete_req(req); - return sizeof(struct raw1394_request); - } - - if (copy_from_user(packet->data, int2ptr(req->req.sendb) + header_length, - packet->data_size)) { - req->req.error = RAW1394_ERROR_MEMFAULT; - req->req.length = 0; - queue_complete_req(req); - return sizeof(struct raw1394_request); - } - - packet->type = hpsb_async; - packet->node_id = packet->header[0] >> 16; - packet->tcode = (packet->header[0] >> 4) & 0xf; - packet->tlabel = (packet->header[0] >> 10) &0x3f; - packet->host = fi->host; - packet->expect_response = expect_response; - packet->header_size=header_length; - packet->data_size=req->req.length-header_length; - - req->req.length = 0; - hpsb_set_packet_complete_task(packet, (void(*)(void*))queue_complete_cb, req); - - spin_lock_irq(&fi->reqlists_lock); - list_add_tail(&req->list, &fi->req_pending); - spin_unlock_irq(&fi->reqlists_lock); - - /* Update the generation of the packet just before sending. */ - packet->generation = req->req.generation; - - if (hpsb_send_packet(packet) < 0) { - req->req.error = RAW1394_ERROR_SEND_ERROR; - queue_complete_req(req); - } - - return sizeof(struct raw1394_request); -} - -static int arm_read (struct hpsb_host *host, int nodeid, quadlet_t *buffer, - u64 addr, size_t length, u16 flags) -{ - struct pending_request *req; - struct host_info *hi; - struct file_info *fi = NULL; - struct list_head *entry; - struct arm_addr *arm_addr = NULL; - struct arm_request *arm_req = NULL; - struct arm_response *arm_resp = NULL; - int found=0, size=0, rcode=-1; - struct arm_request_response *arm_req_resp = NULL; - - DBGMSG("arm_read called by node: %X" - "addr: %4.4x %8.8x length: %Zu", nodeid, - (u16) ((addr >>32) & 0xFFFF), (u32) (addr & 0xFFFFFFFF), - length); - spin_lock(&host_info_lock); - hi = find_host_info(host); /* search address-entry */ - if (hi != NULL) { - list_for_each_entry(fi, &hi->file_info_list, list) { - entry = fi->addr_list.next; - while (entry != &(fi->addr_list)) { - arm_addr = list_entry(entry, struct arm_addr, addr_list); - if (((arm_addr->start) <= (addr)) && - ((arm_addr->end) >= (addr+length))) { - found = 1; - break; - } - entry = entry->next; - } - if (found) { - break; - } - } - } - rcode = -1; - if (!found) { - printk(KERN_ERR "raw1394: arm_read FAILED addr_entry not found" - " -> rcode_address_error\n"); - spin_unlock(&host_info_lock); - return (RCODE_ADDRESS_ERROR); - } else { - DBGMSG("arm_read addr_entry FOUND"); - } - if (arm_addr->rec_length < length) { - DBGMSG("arm_read blocklength too big -> rcode_data_error"); - rcode = RCODE_DATA_ERROR; /* hardware error, data is unavailable */ - } - if (rcode == -1) { - if (arm_addr->access_rights & ARM_READ) { - if (!(arm_addr->client_transactions & ARM_READ)) { - memcpy(buffer,(arm_addr->addr_space_buffer)+(addr-(arm_addr->start)), - length); - DBGMSG("arm_read -> (rcode_complete)"); - rcode = RCODE_COMPLETE; - } - } else { - rcode = RCODE_TYPE_ERROR; /* function not allowed */ - DBGMSG("arm_read -> rcode_type_error (access denied)"); - } - } - if (arm_addr->notification_options & ARM_READ) { - DBGMSG("arm_read -> entering notification-section"); - req = __alloc_pending_request(SLAB_ATOMIC); - if (!req) { - DBGMSG("arm_read -> rcode_conflict_error"); - spin_unlock(&host_info_lock); - return(RCODE_CONFLICT_ERROR); /* A resource conflict was detected. - The request may be retried */ - } - if (rcode == RCODE_COMPLETE) { - size = sizeof(struct arm_request)+sizeof(struct arm_response) + - length * sizeof(byte_t) + - sizeof (struct arm_request_response); - } else { - size = sizeof(struct arm_request)+sizeof(struct arm_response) + - sizeof (struct arm_request_response); - } - req->data = kmalloc(size, SLAB_ATOMIC); - if (!(req->data)) { - free_pending_request(req); - DBGMSG("arm_read -> rcode_conflict_error"); - spin_unlock(&host_info_lock); - return(RCODE_CONFLICT_ERROR); /* A resource conflict was detected. - The request may be retried */ - } - req->free_data=1; - req->file_info = fi; - req->req.type = RAW1394_REQ_ARM; - req->req.generation = get_hpsb_generation(host); - req->req.misc = ( ((length << 16) & (0xFFFF0000)) | (ARM_READ & 0xFF)); - req->req.tag = arm_addr->arm_tag; - req->req.recvb = arm_addr->recvb; - req->req.length = size; - arm_req_resp = (struct arm_request_response *) (req->data); - arm_req = (struct arm_request *) ((byte_t *)(req->data) + - (sizeof (struct arm_request_response))); - arm_resp = (struct arm_response *) ((byte_t *)(arm_req) + - (sizeof(struct arm_request))); - arm_req->buffer = NULL; - arm_resp->buffer = NULL; - if (rcode == RCODE_COMPLETE) { - byte_t *buf = (byte_t *)arm_resp + sizeof(struct arm_response); - memcpy (buf, - (arm_addr->addr_space_buffer)+(addr-(arm_addr->start)), - length); - arm_resp->buffer = int2ptr((arm_addr->recvb) + - sizeof (struct arm_request_response) + - sizeof (struct arm_request) + - sizeof (struct arm_response)); - } - arm_resp->buffer_length = (rcode == RCODE_COMPLETE) ? length : 0; - arm_resp->response_code = rcode; - arm_req->buffer_length = 0; - arm_req->generation = req->req.generation; - arm_req->extended_transaction_code = 0; - arm_req->destination_offset = addr; - arm_req->source_nodeid = nodeid; - arm_req->destination_nodeid = host->node_id; - arm_req->tlabel = (flags >> 10) & 0x3f; - arm_req->tcode = (flags >> 4) & 0x0f; - arm_req_resp->request = int2ptr((arm_addr->recvb) + - sizeof (struct arm_request_response)); - arm_req_resp->response = int2ptr((arm_addr->recvb) + - sizeof (struct arm_request_response) + - sizeof (struct arm_request)); - queue_complete_req(req); - } - spin_unlock(&host_info_lock); - return(rcode); -} - -static int arm_write (struct hpsb_host *host, int nodeid, int destid, - quadlet_t *data, u64 addr, size_t length, u16 flags) -{ - struct pending_request *req; - struct host_info *hi; - struct file_info *fi = NULL; - struct list_head *entry; - struct arm_addr *arm_addr = NULL; - struct arm_request *arm_req = NULL; - struct arm_response *arm_resp = NULL; - int found=0, size=0, rcode=-1, length_conflict=0; - struct arm_request_response *arm_req_resp = NULL; - - DBGMSG("arm_write called by node: %X" - "addr: %4.4x %8.8x length: %Zu", nodeid, - (u16) ((addr >>32) & 0xFFFF), (u32) (addr & 0xFFFFFFFF), - length); - spin_lock(&host_info_lock); - hi = find_host_info(host); /* search address-entry */ - if (hi != NULL) { - list_for_each_entry(fi, &hi->file_info_list, list) { - entry = fi->addr_list.next; - while (entry != &(fi->addr_list)) { - arm_addr = list_entry(entry, struct arm_addr, addr_list); - if (((arm_addr->start) <= (addr)) && - ((arm_addr->end) >= (addr+length))) { - found = 1; - break; - } - entry = entry->next; - } - if (found) { - break; - } - } - } - rcode = -1; - if (!found) { - printk(KERN_ERR "raw1394: arm_write FAILED addr_entry not found" - " -> rcode_address_error\n"); - spin_unlock(&host_info_lock); - return (RCODE_ADDRESS_ERROR); - } else { - DBGMSG("arm_write addr_entry FOUND"); - } - if (arm_addr->rec_length < length) { - DBGMSG("arm_write blocklength too big -> rcode_data_error"); - length_conflict = 1; - rcode = RCODE_DATA_ERROR; /* hardware error, data is unavailable */ - } - if (rcode == -1) { - if (arm_addr->access_rights & ARM_WRITE) { - if (!(arm_addr->client_transactions & ARM_WRITE)) { - memcpy((arm_addr->addr_space_buffer)+(addr-(arm_addr->start)), - data, length); - DBGMSG("arm_write -> (rcode_complete)"); - rcode = RCODE_COMPLETE; - } - } else { - rcode = RCODE_TYPE_ERROR; /* function not allowed */ - DBGMSG("arm_write -> rcode_type_error (access denied)"); - } - } - if (arm_addr->notification_options & ARM_WRITE) { - DBGMSG("arm_write -> entering notification-section"); - req = __alloc_pending_request(SLAB_ATOMIC); - if (!req) { - DBGMSG("arm_write -> rcode_conflict_error"); - spin_unlock(&host_info_lock); - return(RCODE_CONFLICT_ERROR); /* A resource conflict was detected. - The request my be retried */ - } - size = sizeof(struct arm_request)+sizeof(struct arm_response) + - (length) * sizeof(byte_t) + - sizeof (struct arm_request_response); - req->data = kmalloc(size, SLAB_ATOMIC); - if (!(req->data)) { - free_pending_request(req); - DBGMSG("arm_write -> rcode_conflict_error"); - spin_unlock(&host_info_lock); - return(RCODE_CONFLICT_ERROR); /* A resource conflict was detected. - The request may be retried */ - } - req->free_data=1; - req->file_info = fi; - req->req.type = RAW1394_REQ_ARM; - req->req.generation = get_hpsb_generation(host); - req->req.misc = ( ((length << 16) & (0xFFFF0000)) | (ARM_WRITE & 0xFF)); - req->req.tag = arm_addr->arm_tag; - req->req.recvb = arm_addr->recvb; - req->req.length = size; - arm_req_resp = (struct arm_request_response *) (req->data); - arm_req = (struct arm_request *) ((byte_t *)(req->data) + - (sizeof (struct arm_request_response))); - arm_resp = (struct arm_response *) ((byte_t *)(arm_req) + - (sizeof(struct arm_request))); - arm_resp->buffer = NULL; - memcpy ((byte_t *)arm_resp + sizeof(struct arm_response), - data, length); - arm_req->buffer = int2ptr((arm_addr->recvb) + - sizeof (struct arm_request_response) + - sizeof (struct arm_request) + - sizeof (struct arm_response)); - arm_req->buffer_length = length; - arm_req->generation = req->req.generation; - arm_req->extended_transaction_code = 0; - arm_req->destination_offset = addr; - arm_req->source_nodeid = nodeid; - arm_req->destination_nodeid = destid; - arm_req->tlabel = (flags >> 10) & 0x3f; - arm_req->tcode = (flags >> 4) & 0x0f; - arm_resp->buffer_length = 0; - arm_resp->response_code = rcode; - arm_req_resp->request = int2ptr((arm_addr->recvb) + - sizeof (struct arm_request_response)); - arm_req_resp->response = int2ptr((arm_addr->recvb) + - sizeof (struct arm_request_response) + - sizeof (struct arm_request)); - queue_complete_req(req); - } - spin_unlock(&host_info_lock); - return(rcode); -} - -static int arm_lock (struct hpsb_host *host, int nodeid, quadlet_t *store, - u64 addr, quadlet_t data, quadlet_t arg, int ext_tcode, u16 flags) -{ - struct pending_request *req; - struct host_info *hi; - struct file_info *fi = NULL; - struct list_head *entry; - struct arm_addr *arm_addr = NULL; - struct arm_request *arm_req = NULL; - struct arm_response *arm_resp = NULL; - int found=0, size=0, rcode=-1; - quadlet_t old, new; - struct arm_request_response *arm_req_resp = NULL; - - if (((ext_tcode & 0xFF) == EXTCODE_FETCH_ADD) || - ((ext_tcode & 0xFF) == EXTCODE_LITTLE_ADD)) { - DBGMSG("arm_lock called by node: %X " - "addr: %4.4x %8.8x extcode: %2.2X data: %8.8X", - nodeid, (u16) ((addr >>32) & 0xFFFF), (u32) (addr & 0xFFFFFFFF), - ext_tcode & 0xFF , be32_to_cpu(data)); - } else { - DBGMSG("arm_lock called by node: %X " - "addr: %4.4x %8.8x extcode: %2.2X data: %8.8X arg: %8.8X", - nodeid, (u16) ((addr >>32) & 0xFFFF), (u32) (addr & 0xFFFFFFFF), - ext_tcode & 0xFF , be32_to_cpu(data), be32_to_cpu(arg)); - } - spin_lock(&host_info_lock); - hi = find_host_info(host); /* search address-entry */ - if (hi != NULL) { - list_for_each_entry(fi, &hi->file_info_list, list) { - entry = fi->addr_list.next; - while (entry != &(fi->addr_list)) { - arm_addr = list_entry(entry, struct arm_addr, addr_list); - if (((arm_addr->start) <= (addr)) && - ((arm_addr->end) >= (addr+sizeof(*store)))) { - found = 1; - break; - } - entry = entry->next; - } - if (found) { - break; - } - } - } - rcode = -1; - if (!found) { - printk(KERN_ERR "raw1394: arm_lock FAILED addr_entry not found" - " -> rcode_address_error\n"); - spin_unlock(&host_info_lock); - return (RCODE_ADDRESS_ERROR); - } else { - DBGMSG("arm_lock addr_entry FOUND"); - } - if (rcode == -1) { - if (arm_addr->access_rights & ARM_LOCK) { - if (!(arm_addr->client_transactions & ARM_LOCK)) { - memcpy(&old,(arm_addr->addr_space_buffer)+(addr-(arm_addr->start)), - sizeof(old)); - switch (ext_tcode) { - case (EXTCODE_MASK_SWAP): - new = data | (old & ~arg); - break; - case (EXTCODE_COMPARE_SWAP): - if (old == arg) { - new = data; - } else { - new = old; - } - break; - case (EXTCODE_FETCH_ADD): - new = cpu_to_be32(be32_to_cpu(data) + be32_to_cpu(old)); - break; - case (EXTCODE_LITTLE_ADD): - new = cpu_to_le32(le32_to_cpu(data) + le32_to_cpu(old)); - break; - case (EXTCODE_BOUNDED_ADD): - if (old != arg) { - new = cpu_to_be32(be32_to_cpu(data) + - be32_to_cpu(old)); - } else { - new = old; - } - break; - case (EXTCODE_WRAP_ADD): - if (old != arg) { - new = cpu_to_be32(be32_to_cpu(data) + - be32_to_cpu(old)); - } else { - new = data; - } - break; - default: - rcode = RCODE_TYPE_ERROR; /* function not allowed */ - printk(KERN_ERR "raw1394: arm_lock FAILED " - "ext_tcode not allowed -> rcode_type_error\n"); - break; - } /*switch*/ - if (rcode == -1) { - DBGMSG("arm_lock -> (rcode_complete)"); - rcode = RCODE_COMPLETE; - memcpy (store, &old, sizeof(*store)); - memcpy ((arm_addr->addr_space_buffer)+ - (addr-(arm_addr->start)), - &new, sizeof(*store)); - } - } - } else { - rcode = RCODE_TYPE_ERROR; /* function not allowed */ - DBGMSG("arm_lock -> rcode_type_error (access denied)"); - } - } - if (arm_addr->notification_options & ARM_LOCK) { + struct hpsb_packet *packet; + int header_length = req->req.misc & 0xffff; + int expect_response = req->req.misc >> 16; + + if ((header_length > req->req.length) || (header_length < 12)) { + req->req.error = RAW1394_ERROR_INVALID_ARG; + req->req.length = 0; + queue_complete_req(req); + return sizeof(struct raw1394_request); + } + + packet = hpsb_alloc_packet(req->req.length - header_length); + req->packet = packet; + if (!packet) + return -ENOMEM; + + if (copy_from_user(packet->header, int2ptr(req->req.sendb), + header_length)) { + req->req.error = RAW1394_ERROR_MEMFAULT; + req->req.length = 0; + queue_complete_req(req); + return sizeof(struct raw1394_request); + } + + if (copy_from_user + (packet->data, int2ptr(req->req.sendb) + header_length, + packet->data_size)) { + req->req.error = RAW1394_ERROR_MEMFAULT; + req->req.length = 0; + queue_complete_req(req); + return sizeof(struct raw1394_request); + } + + packet->type = hpsb_async; + packet->node_id = packet->header[0] >> 16; + packet->tcode = (packet->header[0] >> 4) & 0xf; + packet->tlabel = (packet->header[0] >> 10) & 0x3f; + packet->host = fi->host; + packet->expect_response = expect_response; + packet->header_size = header_length; + packet->data_size = req->req.length - header_length; + + req->req.length = 0; + hpsb_set_packet_complete_task(packet, + (void (*)(void *))queue_complete_cb, req); + + spin_lock_irq(&fi->reqlists_lock); + list_add_tail(&req->list, &fi->req_pending); + spin_unlock_irq(&fi->reqlists_lock); + + /* Update the generation of the packet just before sending. */ + packet->generation = req->req.generation; + + if (hpsb_send_packet(packet) < 0) { + req->req.error = RAW1394_ERROR_SEND_ERROR; + queue_complete_req(req); + } + + return sizeof(struct raw1394_request); +} + +static int arm_read(struct hpsb_host *host, int nodeid, quadlet_t * buffer, + u64 addr, size_t length, u16 flags) +{ + struct pending_request *req; + struct host_info *hi; + struct file_info *fi = NULL; + struct list_head *entry; + struct arm_addr *arm_addr = NULL; + struct arm_request *arm_req = NULL; + struct arm_response *arm_resp = NULL; + int found = 0, size = 0, rcode = -1; + struct arm_request_response *arm_req_resp = NULL; + + DBGMSG("arm_read called by node: %X" + "addr: %4.4x %8.8x length: %Zu", nodeid, + (u16) ((addr >> 32) & 0xFFFF), (u32) (addr & 0xFFFFFFFF), + length); + spin_lock(&host_info_lock); + hi = find_host_info(host); /* search address-entry */ + if (hi != NULL) { + list_for_each_entry(fi, &hi->file_info_list, list) { + entry = fi->addr_list.next; + while (entry != &(fi->addr_list)) { + arm_addr = + list_entry(entry, struct arm_addr, + addr_list); + if (((arm_addr->start) <= (addr)) + && ((arm_addr->end) >= (addr + length))) { + found = 1; + break; + } + entry = entry->next; + } + if (found) { + break; + } + } + } + rcode = -1; + if (!found) { + printk(KERN_ERR "raw1394: arm_read FAILED addr_entry not found" + " -> rcode_address_error\n"); + spin_unlock(&host_info_lock); + return (RCODE_ADDRESS_ERROR); + } else { + DBGMSG("arm_read addr_entry FOUND"); + } + if (arm_addr->rec_length < length) { + DBGMSG("arm_read blocklength too big -> rcode_data_error"); + rcode = RCODE_DATA_ERROR; /* hardware error, data is unavailable */ + } + if (rcode == -1) { + if (arm_addr->access_rights & ARM_READ) { + if (!(arm_addr->client_transactions & ARM_READ)) { + memcpy(buffer, + (arm_addr->addr_space_buffer) + (addr - + (arm_addr-> + start)), + length); + DBGMSG("arm_read -> (rcode_complete)"); + rcode = RCODE_COMPLETE; + } + } else { + rcode = RCODE_TYPE_ERROR; /* function not allowed */ + DBGMSG("arm_read -> rcode_type_error (access denied)"); + } + } + if (arm_addr->notification_options & ARM_READ) { + DBGMSG("arm_read -> entering notification-section"); + req = __alloc_pending_request(SLAB_ATOMIC); + if (!req) { + DBGMSG("arm_read -> rcode_conflict_error"); + spin_unlock(&host_info_lock); + return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. + The request may be retried */ + } + if (rcode == RCODE_COMPLETE) { + size = + sizeof(struct arm_request) + + sizeof(struct arm_response) + + length * sizeof(byte_t) + + sizeof(struct arm_request_response); + } else { + size = + sizeof(struct arm_request) + + sizeof(struct arm_response) + + sizeof(struct arm_request_response); + } + req->data = kmalloc(size, SLAB_ATOMIC); + if (!(req->data)) { + free_pending_request(req); + DBGMSG("arm_read -> rcode_conflict_error"); + spin_unlock(&host_info_lock); + return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. + The request may be retried */ + } + req->free_data = 1; + req->file_info = fi; + req->req.type = RAW1394_REQ_ARM; + req->req.generation = get_hpsb_generation(host); + req->req.misc = + (((length << 16) & (0xFFFF0000)) | (ARM_READ & 0xFF)); + req->req.tag = arm_addr->arm_tag; + req->req.recvb = arm_addr->recvb; + req->req.length = size; + arm_req_resp = (struct arm_request_response *)(req->data); + arm_req = (struct arm_request *)((byte_t *) (req->data) + + (sizeof + (struct + arm_request_response))); + arm_resp = + (struct arm_response *)((byte_t *) (arm_req) + + (sizeof(struct arm_request))); + arm_req->buffer = NULL; + arm_resp->buffer = NULL; + if (rcode == RCODE_COMPLETE) { + byte_t *buf = + (byte_t *) arm_resp + sizeof(struct arm_response); + memcpy(buf, + (arm_addr->addr_space_buffer) + (addr - + (arm_addr-> + start)), + length); + arm_resp->buffer = + int2ptr((arm_addr->recvb) + + sizeof(struct arm_request_response) + + sizeof(struct arm_request) + + sizeof(struct arm_response)); + } + arm_resp->buffer_length = + (rcode == RCODE_COMPLETE) ? length : 0; + arm_resp->response_code = rcode; + arm_req->buffer_length = 0; + arm_req->generation = req->req.generation; + arm_req->extended_transaction_code = 0; + arm_req->destination_offset = addr; + arm_req->source_nodeid = nodeid; + arm_req->destination_nodeid = host->node_id; + arm_req->tlabel = (flags >> 10) & 0x3f; + arm_req->tcode = (flags >> 4) & 0x0f; + arm_req_resp->request = int2ptr((arm_addr->recvb) + + sizeof(struct + arm_request_response)); + arm_req_resp->response = + int2ptr((arm_addr->recvb) + + sizeof(struct arm_request_response) + + sizeof(struct arm_request)); + queue_complete_req(req); + } + spin_unlock(&host_info_lock); + return (rcode); +} + +static int arm_write(struct hpsb_host *host, int nodeid, int destid, + quadlet_t * data, u64 addr, size_t length, u16 flags) +{ + struct pending_request *req; + struct host_info *hi; + struct file_info *fi = NULL; + struct list_head *entry; + struct arm_addr *arm_addr = NULL; + struct arm_request *arm_req = NULL; + struct arm_response *arm_resp = NULL; + int found = 0, size = 0, rcode = -1, length_conflict = 0; + struct arm_request_response *arm_req_resp = NULL; + + DBGMSG("arm_write called by node: %X" + "addr: %4.4x %8.8x length: %Zu", nodeid, + (u16) ((addr >> 32) & 0xFFFF), (u32) (addr & 0xFFFFFFFF), + length); + spin_lock(&host_info_lock); + hi = find_host_info(host); /* search address-entry */ + if (hi != NULL) { + list_for_each_entry(fi, &hi->file_info_list, list) { + entry = fi->addr_list.next; + while (entry != &(fi->addr_list)) { + arm_addr = + list_entry(entry, struct arm_addr, + addr_list); + if (((arm_addr->start) <= (addr)) + && ((arm_addr->end) >= (addr + length))) { + found = 1; + break; + } + entry = entry->next; + } + if (found) { + break; + } + } + } + rcode = -1; + if (!found) { + printk(KERN_ERR "raw1394: arm_write FAILED addr_entry not found" + " -> rcode_address_error\n"); + spin_unlock(&host_info_lock); + return (RCODE_ADDRESS_ERROR); + } else { + DBGMSG("arm_write addr_entry FOUND"); + } + if (arm_addr->rec_length < length) { + DBGMSG("arm_write blocklength too big -> rcode_data_error"); + length_conflict = 1; + rcode = RCODE_DATA_ERROR; /* hardware error, data is unavailable */ + } + if (rcode == -1) { + if (arm_addr->access_rights & ARM_WRITE) { + if (!(arm_addr->client_transactions & ARM_WRITE)) { + memcpy((arm_addr->addr_space_buffer) + + (addr - (arm_addr->start)), data, + length); + DBGMSG("arm_write -> (rcode_complete)"); + rcode = RCODE_COMPLETE; + } + } else { + rcode = RCODE_TYPE_ERROR; /* function not allowed */ + DBGMSG("arm_write -> rcode_type_error (access denied)"); + } + } + if (arm_addr->notification_options & ARM_WRITE) { + DBGMSG("arm_write -> entering notification-section"); + req = __alloc_pending_request(SLAB_ATOMIC); + if (!req) { + DBGMSG("arm_write -> rcode_conflict_error"); + spin_unlock(&host_info_lock); + return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. + The request my be retried */ + } + size = + sizeof(struct arm_request) + sizeof(struct arm_response) + + (length) * sizeof(byte_t) + + sizeof(struct arm_request_response); + req->data = kmalloc(size, SLAB_ATOMIC); + if (!(req->data)) { + free_pending_request(req); + DBGMSG("arm_write -> rcode_conflict_error"); + spin_unlock(&host_info_lock); + return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. + The request may be retried */ + } + req->free_data = 1; + req->file_info = fi; + req->req.type = RAW1394_REQ_ARM; + req->req.generation = get_hpsb_generation(host); + req->req.misc = + (((length << 16) & (0xFFFF0000)) | (ARM_WRITE & 0xFF)); + req->req.tag = arm_addr->arm_tag; + req->req.recvb = arm_addr->recvb; + req->req.length = size; + arm_req_resp = (struct arm_request_response *)(req->data); + arm_req = (struct arm_request *)((byte_t *) (req->data) + + (sizeof + (struct + arm_request_response))); + arm_resp = + (struct arm_response *)((byte_t *) (arm_req) + + (sizeof(struct arm_request))); + arm_resp->buffer = NULL; + memcpy((byte_t *) arm_resp + sizeof(struct arm_response), + data, length); + arm_req->buffer = int2ptr((arm_addr->recvb) + + sizeof(struct arm_request_response) + + sizeof(struct arm_request) + + sizeof(struct arm_response)); + arm_req->buffer_length = length; + arm_req->generation = req->req.generation; + arm_req->extended_transaction_code = 0; + arm_req->destination_offset = addr; + arm_req->source_nodeid = nodeid; + arm_req->destination_nodeid = destid; + arm_req->tlabel = (flags >> 10) & 0x3f; + arm_req->tcode = (flags >> 4) & 0x0f; + arm_resp->buffer_length = 0; + arm_resp->response_code = rcode; + arm_req_resp->request = int2ptr((arm_addr->recvb) + + sizeof(struct + arm_request_response)); + arm_req_resp->response = + int2ptr((arm_addr->recvb) + + sizeof(struct arm_request_response) + + sizeof(struct arm_request)); + queue_complete_req(req); + } + spin_unlock(&host_info_lock); + return (rcode); +} + +static int arm_lock(struct hpsb_host *host, int nodeid, quadlet_t * store, + u64 addr, quadlet_t data, quadlet_t arg, int ext_tcode, + u16 flags) +{ + struct pending_request *req; + struct host_info *hi; + struct file_info *fi = NULL; + struct list_head *entry; + struct arm_addr *arm_addr = NULL; + struct arm_request *arm_req = NULL; + struct arm_response *arm_resp = NULL; + int found = 0, size = 0, rcode = -1; + quadlet_t old, new; + struct arm_request_response *arm_req_resp = NULL; + + if (((ext_tcode & 0xFF) == EXTCODE_FETCH_ADD) || + ((ext_tcode & 0xFF) == EXTCODE_LITTLE_ADD)) { + DBGMSG("arm_lock called by node: %X " + "addr: %4.4x %8.8x extcode: %2.2X data: %8.8X", + nodeid, (u16) ((addr >> 32) & 0xFFFF), + (u32) (addr & 0xFFFFFFFF), ext_tcode & 0xFF, + be32_to_cpu(data)); + } else { + DBGMSG("arm_lock called by node: %X " + "addr: %4.4x %8.8x extcode: %2.2X data: %8.8X arg: %8.8X", + nodeid, (u16) ((addr >> 32) & 0xFFFF), + (u32) (addr & 0xFFFFFFFF), ext_tcode & 0xFF, + be32_to_cpu(data), be32_to_cpu(arg)); + } + spin_lock(&host_info_lock); + hi = find_host_info(host); /* search address-entry */ + if (hi != NULL) { + list_for_each_entry(fi, &hi->file_info_list, list) { + entry = fi->addr_list.next; + while (entry != &(fi->addr_list)) { + arm_addr = + list_entry(entry, struct arm_addr, + addr_list); + if (((arm_addr->start) <= (addr)) + && ((arm_addr->end) >= + (addr + sizeof(*store)))) { + found = 1; + break; + } + entry = entry->next; + } + if (found) { + break; + } + } + } + rcode = -1; + if (!found) { + printk(KERN_ERR "raw1394: arm_lock FAILED addr_entry not found" + " -> rcode_address_error\n"); + spin_unlock(&host_info_lock); + return (RCODE_ADDRESS_ERROR); + } else { + DBGMSG("arm_lock addr_entry FOUND"); + } + if (rcode == -1) { + if (arm_addr->access_rights & ARM_LOCK) { + if (!(arm_addr->client_transactions & ARM_LOCK)) { + memcpy(&old, + (arm_addr->addr_space_buffer) + (addr - + (arm_addr-> + start)), + sizeof(old)); + switch (ext_tcode) { + case (EXTCODE_MASK_SWAP): + new = data | (old & ~arg); + break; + case (EXTCODE_COMPARE_SWAP): + if (old == arg) { + new = data; + } else { + new = old; + } + break; + case (EXTCODE_FETCH_ADD): + new = + cpu_to_be32(be32_to_cpu(data) + + be32_to_cpu(old)); + break; + case (EXTCODE_LITTLE_ADD): + new = + cpu_to_le32(le32_to_cpu(data) + + le32_to_cpu(old)); + break; + case (EXTCODE_BOUNDED_ADD): + if (old != arg) { + new = + cpu_to_be32(be32_to_cpu + (data) + + be32_to_cpu + (old)); + } else { + new = old; + } + break; + case (EXTCODE_WRAP_ADD): + if (old != arg) { + new = + cpu_to_be32(be32_to_cpu + (data) + + be32_to_cpu + (old)); + } else { + new = data; + } + break; + default: + rcode = RCODE_TYPE_ERROR; /* function not allowed */ + printk(KERN_ERR + "raw1394: arm_lock FAILED " + "ext_tcode not allowed -> rcode_type_error\n"); + break; + } /*switch */ + if (rcode == -1) { + DBGMSG("arm_lock -> (rcode_complete)"); + rcode = RCODE_COMPLETE; + memcpy(store, &old, sizeof(*store)); + memcpy((arm_addr->addr_space_buffer) + + (addr - (arm_addr->start)), + &new, sizeof(*store)); + } + } + } else { + rcode = RCODE_TYPE_ERROR; /* function not allowed */ + DBGMSG("arm_lock -> rcode_type_error (access denied)"); + } + } + if (arm_addr->notification_options & ARM_LOCK) { byte_t *buf1, *buf2; - DBGMSG("arm_lock -> entering notification-section"); - req = __alloc_pending_request(SLAB_ATOMIC); - if (!req) { - DBGMSG("arm_lock -> rcode_conflict_error"); - spin_unlock(&host_info_lock); - return(RCODE_CONFLICT_ERROR); /* A resource conflict was detected. - The request may be retried */ - } - size = sizeof(struct arm_request)+sizeof(struct arm_response) + - 3 * sizeof(*store) + - sizeof (struct arm_request_response); /* maximum */ - req->data = kmalloc(size, SLAB_ATOMIC); - if (!(req->data)) { - free_pending_request(req); - DBGMSG("arm_lock -> rcode_conflict_error"); - spin_unlock(&host_info_lock); - return(RCODE_CONFLICT_ERROR); /* A resource conflict was detected. - The request may be retried */ - } - req->free_data=1; - arm_req_resp = (struct arm_request_response *) (req->data); - arm_req = (struct arm_request *) ((byte_t *)(req->data) + - (sizeof (struct arm_request_response))); - arm_resp = (struct arm_response *) ((byte_t *)(arm_req) + - (sizeof(struct arm_request))); - buf1 = (byte_t *)arm_resp + sizeof(struct arm_response); + DBGMSG("arm_lock -> entering notification-section"); + req = __alloc_pending_request(SLAB_ATOMIC); + if (!req) { + DBGMSG("arm_lock -> rcode_conflict_error"); + spin_unlock(&host_info_lock); + return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. + The request may be retried */ + } + size = sizeof(struct arm_request) + sizeof(struct arm_response) + 3 * sizeof(*store) + sizeof(struct arm_request_response); /* maximum */ + req->data = kmalloc(size, SLAB_ATOMIC); + if (!(req->data)) { + free_pending_request(req); + DBGMSG("arm_lock -> rcode_conflict_error"); + spin_unlock(&host_info_lock); + return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. + The request may be retried */ + } + req->free_data = 1; + arm_req_resp = (struct arm_request_response *)(req->data); + arm_req = (struct arm_request *)((byte_t *) (req->data) + + (sizeof + (struct + arm_request_response))); + arm_resp = + (struct arm_response *)((byte_t *) (arm_req) + + (sizeof(struct arm_request))); + buf1 = (byte_t *) arm_resp + sizeof(struct arm_response); buf2 = buf1 + 2 * sizeof(*store); - if ((ext_tcode == EXTCODE_FETCH_ADD) || - (ext_tcode == EXTCODE_LITTLE_ADD)) { - arm_req->buffer_length = sizeof(*store); - memcpy (buf1, &data, sizeof(*store)); - - } else { - arm_req->buffer_length = 2 * sizeof(*store); - memcpy (buf1, &arg, sizeof(*store)); - memcpy (buf1 + sizeof(*store), &data, sizeof(*store)); - } - if (rcode == RCODE_COMPLETE) { - arm_resp->buffer_length = sizeof(*store); - memcpy (buf2, &old, sizeof(*store)); - } else { - arm_resp->buffer_length = 0; - } - req->file_info = fi; - req->req.type = RAW1394_REQ_ARM; - req->req.generation = get_hpsb_generation(host); - req->req.misc = ( (((sizeof(*store)) << 16) & (0xFFFF0000)) | - (ARM_LOCK & 0xFF)); - req->req.tag = arm_addr->arm_tag; - req->req.recvb = arm_addr->recvb; - req->req.length = size; - arm_req->generation = req->req.generation; - arm_req->extended_transaction_code = ext_tcode; - arm_req->destination_offset = addr; - arm_req->source_nodeid = nodeid; - arm_req->destination_nodeid = host->node_id; - arm_req->tlabel = (flags >> 10) & 0x3f; - arm_req->tcode = (flags >> 4) & 0x0f; - arm_resp->response_code = rcode; - arm_req_resp->request = int2ptr((arm_addr->recvb) + - sizeof (struct arm_request_response)); - arm_req_resp->response = int2ptr((arm_addr->recvb) + - sizeof (struct arm_request_response) + - sizeof (struct arm_request)); - arm_req->buffer = int2ptr((arm_addr->recvb) + - sizeof (struct arm_request_response) + - sizeof (struct arm_request) + - sizeof (struct arm_response)); - arm_resp->buffer = int2ptr((arm_addr->recvb) + - sizeof (struct arm_request_response) + - sizeof (struct arm_request) + - sizeof (struct arm_response) + - 2* sizeof (*store)); - queue_complete_req(req); - } - spin_unlock(&host_info_lock); - return(rcode); -} - -static int arm_lock64 (struct hpsb_host *host, int nodeid, octlet_t *store, - u64 addr, octlet_t data, octlet_t arg, int ext_tcode, u16 flags) -{ - struct pending_request *req; - struct host_info *hi; - struct file_info *fi = NULL; - struct list_head *entry; - struct arm_addr *arm_addr = NULL; - struct arm_request *arm_req = NULL; - struct arm_response *arm_resp = NULL; - int found=0, size=0, rcode=-1; - octlet_t old, new; - struct arm_request_response *arm_req_resp = NULL; - - if (((ext_tcode & 0xFF) == EXTCODE_FETCH_ADD) || - ((ext_tcode & 0xFF) == EXTCODE_LITTLE_ADD)) { - DBGMSG("arm_lock64 called by node: %X " - "addr: %4.4x %8.8x extcode: %2.2X data: %8.8X %8.8X ", - nodeid, (u16) ((addr >>32) & 0xFFFF), - (u32) (addr & 0xFFFFFFFF), - ext_tcode & 0xFF , - (u32) ((be64_to_cpu(data) >> 32) & 0xFFFFFFFF), - (u32) (be64_to_cpu(data) & 0xFFFFFFFF)); - } else { - DBGMSG("arm_lock64 called by node: %X " - "addr: %4.4x %8.8x extcode: %2.2X data: %8.8X %8.8X arg: " - "%8.8X %8.8X ", - nodeid, (u16) ((addr >>32) & 0xFFFF), - (u32) (addr & 0xFFFFFFFF), - ext_tcode & 0xFF , - (u32) ((be64_to_cpu(data) >> 32) & 0xFFFFFFFF), - (u32) (be64_to_cpu(data) & 0xFFFFFFFF), - (u32) ((be64_to_cpu(arg) >> 32) & 0xFFFFFFFF), - (u32) (be64_to_cpu(arg) & 0xFFFFFFFF)); - } - spin_lock(&host_info_lock); - hi = find_host_info(host); /* search addressentry in file_info's for host */ - if (hi != NULL) { - list_for_each_entry(fi, &hi->file_info_list, list) { - entry = fi->addr_list.next; - while (entry != &(fi->addr_list)) { - arm_addr = list_entry(entry, struct arm_addr, addr_list); - if (((arm_addr->start) <= (addr)) && - ((arm_addr->end) >= (addr+sizeof(*store)))) { - found = 1; - break; - } - entry = entry->next; - } - if (found) { - break; - } - } - } - rcode = -1; - if (!found) { - printk(KERN_ERR "raw1394: arm_lock64 FAILED addr_entry not found" - " -> rcode_address_error\n"); - spin_unlock(&host_info_lock); - return (RCODE_ADDRESS_ERROR); - } else { - DBGMSG("arm_lock64 addr_entry FOUND"); - } - if (rcode == -1) { - if (arm_addr->access_rights & ARM_LOCK) { - if (!(arm_addr->client_transactions & ARM_LOCK)) { - memcpy(&old,(arm_addr->addr_space_buffer)+(addr-(arm_addr->start)), - sizeof(old)); - switch (ext_tcode) { - case (EXTCODE_MASK_SWAP): - new = data | (old & ~arg); - break; - case (EXTCODE_COMPARE_SWAP): - if (old == arg) { - new = data; - } else { - new = old; - } - break; - case (EXTCODE_FETCH_ADD): - new = cpu_to_be64(be64_to_cpu(data) + be64_to_cpu(old)); - break; - case (EXTCODE_LITTLE_ADD): - new = cpu_to_le64(le64_to_cpu(data) + le64_to_cpu(old)); - break; - case (EXTCODE_BOUNDED_ADD): - if (old != arg) { - new = cpu_to_be64(be64_to_cpu(data) + - be64_to_cpu(old)); - } else { - new = old; - } - break; - case (EXTCODE_WRAP_ADD): - if (old != arg) { - new = cpu_to_be64(be64_to_cpu(data) + - be64_to_cpu(old)); - } else { - new = data; - } - break; - default: - printk(KERN_ERR "raw1394: arm_lock64 FAILED " - "ext_tcode not allowed -> rcode_type_error\n"); - rcode = RCODE_TYPE_ERROR; /* function not allowed */ - break; - } /*switch*/ - if (rcode == -1) { - DBGMSG("arm_lock64 -> (rcode_complete)"); - rcode = RCODE_COMPLETE; - memcpy (store, &old, sizeof(*store)); - memcpy ((arm_addr->addr_space_buffer)+ - (addr-(arm_addr->start)), - &new, sizeof(*store)); - } - } - } else { - rcode = RCODE_TYPE_ERROR; /* function not allowed */ - DBGMSG("arm_lock64 -> rcode_type_error (access denied)"); - } - } - if (arm_addr->notification_options & ARM_LOCK) { + if ((ext_tcode == EXTCODE_FETCH_ADD) || + (ext_tcode == EXTCODE_LITTLE_ADD)) { + arm_req->buffer_length = sizeof(*store); + memcpy(buf1, &data, sizeof(*store)); + + } else { + arm_req->buffer_length = 2 * sizeof(*store); + memcpy(buf1, &arg, sizeof(*store)); + memcpy(buf1 + sizeof(*store), &data, sizeof(*store)); + } + if (rcode == RCODE_COMPLETE) { + arm_resp->buffer_length = sizeof(*store); + memcpy(buf2, &old, sizeof(*store)); + } else { + arm_resp->buffer_length = 0; + } + req->file_info = fi; + req->req.type = RAW1394_REQ_ARM; + req->req.generation = get_hpsb_generation(host); + req->req.misc = ((((sizeof(*store)) << 16) & (0xFFFF0000)) | + (ARM_LOCK & 0xFF)); + req->req.tag = arm_addr->arm_tag; + req->req.recvb = arm_addr->recvb; + req->req.length = size; + arm_req->generation = req->req.generation; + arm_req->extended_transaction_code = ext_tcode; + arm_req->destination_offset = addr; + arm_req->source_nodeid = nodeid; + arm_req->destination_nodeid = host->node_id; + arm_req->tlabel = (flags >> 10) & 0x3f; + arm_req->tcode = (flags >> 4) & 0x0f; + arm_resp->response_code = rcode; + arm_req_resp->request = int2ptr((arm_addr->recvb) + + sizeof(struct + arm_request_response)); + arm_req_resp->response = + int2ptr((arm_addr->recvb) + + sizeof(struct arm_request_response) + + sizeof(struct arm_request)); + arm_req->buffer = + int2ptr((arm_addr->recvb) + + sizeof(struct arm_request_response) + + sizeof(struct arm_request) + + sizeof(struct arm_response)); + arm_resp->buffer = + int2ptr((arm_addr->recvb) + + sizeof(struct arm_request_response) + + sizeof(struct arm_request) + + sizeof(struct arm_response) + 2 * sizeof(*store)); + queue_complete_req(req); + } + spin_unlock(&host_info_lock); + return (rcode); +} + +static int arm_lock64(struct hpsb_host *host, int nodeid, octlet_t * store, + u64 addr, octlet_t data, octlet_t arg, int ext_tcode, + u16 flags) +{ + struct pending_request *req; + struct host_info *hi; + struct file_info *fi = NULL; + struct list_head *entry; + struct arm_addr *arm_addr = NULL; + struct arm_request *arm_req = NULL; + struct arm_response *arm_resp = NULL; + int found = 0, size = 0, rcode = -1; + octlet_t old, new; + struct arm_request_response *arm_req_resp = NULL; + + if (((ext_tcode & 0xFF) == EXTCODE_FETCH_ADD) || + ((ext_tcode & 0xFF) == EXTCODE_LITTLE_ADD)) { + DBGMSG("arm_lock64 called by node: %X " + "addr: %4.4x %8.8x extcode: %2.2X data: %8.8X %8.8X ", + nodeid, (u16) ((addr >> 32) & 0xFFFF), + (u32) (addr & 0xFFFFFFFF), + ext_tcode & 0xFF, + (u32) ((be64_to_cpu(data) >> 32) & 0xFFFFFFFF), + (u32) (be64_to_cpu(data) & 0xFFFFFFFF)); + } else { + DBGMSG("arm_lock64 called by node: %X " + "addr: %4.4x %8.8x extcode: %2.2X data: %8.8X %8.8X arg: " + "%8.8X %8.8X ", + nodeid, (u16) ((addr >> 32) & 0xFFFF), + (u32) (addr & 0xFFFFFFFF), + ext_tcode & 0xFF, + (u32) ((be64_to_cpu(data) >> 32) & 0xFFFFFFFF), + (u32) (be64_to_cpu(data) & 0xFFFFFFFF), + (u32) ((be64_to_cpu(arg) >> 32) & 0xFFFFFFFF), + (u32) (be64_to_cpu(arg) & 0xFFFFFFFF)); + } + spin_lock(&host_info_lock); + hi = find_host_info(host); /* search addressentry in file_info's for host */ + if (hi != NULL) { + list_for_each_entry(fi, &hi->file_info_list, list) { + entry = fi->addr_list.next; + while (entry != &(fi->addr_list)) { + arm_addr = + list_entry(entry, struct arm_addr, + addr_list); + if (((arm_addr->start) <= (addr)) + && ((arm_addr->end) >= + (addr + sizeof(*store)))) { + found = 1; + break; + } + entry = entry->next; + } + if (found) { + break; + } + } + } + rcode = -1; + if (!found) { + printk(KERN_ERR + "raw1394: arm_lock64 FAILED addr_entry not found" + " -> rcode_address_error\n"); + spin_unlock(&host_info_lock); + return (RCODE_ADDRESS_ERROR); + } else { + DBGMSG("arm_lock64 addr_entry FOUND"); + } + if (rcode == -1) { + if (arm_addr->access_rights & ARM_LOCK) { + if (!(arm_addr->client_transactions & ARM_LOCK)) { + memcpy(&old, + (arm_addr->addr_space_buffer) + (addr - + (arm_addr-> + start)), + sizeof(old)); + switch (ext_tcode) { + case (EXTCODE_MASK_SWAP): + new = data | (old & ~arg); + break; + case (EXTCODE_COMPARE_SWAP): + if (old == arg) { + new = data; + } else { + new = old; + } + break; + case (EXTCODE_FETCH_ADD): + new = + cpu_to_be64(be64_to_cpu(data) + + be64_to_cpu(old)); + break; + case (EXTCODE_LITTLE_ADD): + new = + cpu_to_le64(le64_to_cpu(data) + + le64_to_cpu(old)); + break; + case (EXTCODE_BOUNDED_ADD): + if (old != arg) { + new = + cpu_to_be64(be64_to_cpu + (data) + + be64_to_cpu + (old)); + } else { + new = old; + } + break; + case (EXTCODE_WRAP_ADD): + if (old != arg) { + new = + cpu_to_be64(be64_to_cpu + (data) + + be64_to_cpu + (old)); + } else { + new = data; + } + break; + default: + printk(KERN_ERR + "raw1394: arm_lock64 FAILED " + "ext_tcode not allowed -> rcode_type_error\n"); + rcode = RCODE_TYPE_ERROR; /* function not allowed */ + break; + } /*switch */ + if (rcode == -1) { + DBGMSG + ("arm_lock64 -> (rcode_complete)"); + rcode = RCODE_COMPLETE; + memcpy(store, &old, sizeof(*store)); + memcpy((arm_addr->addr_space_buffer) + + (addr - (arm_addr->start)), + &new, sizeof(*store)); + } + } + } else { + rcode = RCODE_TYPE_ERROR; /* function not allowed */ + DBGMSG + ("arm_lock64 -> rcode_type_error (access denied)"); + } + } + if (arm_addr->notification_options & ARM_LOCK) { byte_t *buf1, *buf2; - DBGMSG("arm_lock64 -> entering notification-section"); - req = __alloc_pending_request(SLAB_ATOMIC); - if (!req) { - spin_unlock(&host_info_lock); - DBGMSG("arm_lock64 -> rcode_conflict_error"); - return(RCODE_CONFLICT_ERROR); /* A resource conflict was detected. - The request may be retried */ - } - size = sizeof(struct arm_request)+sizeof(struct arm_response) + - 3 * sizeof(*store) + - sizeof (struct arm_request_response); /* maximum */ - req->data = kmalloc(size, SLAB_ATOMIC); - if (!(req->data)) { - free_pending_request(req); - spin_unlock(&host_info_lock); - DBGMSG("arm_lock64 -> rcode_conflict_error"); - return(RCODE_CONFLICT_ERROR); /* A resource conflict was detected. - The request may be retried */ - } - req->free_data=1; - arm_req_resp = (struct arm_request_response *) (req->data); - arm_req = (struct arm_request *) ((byte_t *)(req->data) + - (sizeof (struct arm_request_response))); - arm_resp = (struct arm_response *) ((byte_t *)(arm_req) + - (sizeof(struct arm_request))); - buf1 = (byte_t *)arm_resp + sizeof(struct arm_response); - buf2 = buf1 + 2 * sizeof(*store); - if ((ext_tcode == EXTCODE_FETCH_ADD) || - (ext_tcode == EXTCODE_LITTLE_ADD)) { - arm_req->buffer_length = sizeof(*store); - memcpy (buf1, &data, sizeof(*store)); - - } else { - arm_req->buffer_length = 2 * sizeof(*store); - memcpy (buf1, &arg, sizeof(*store)); - memcpy (buf1 + sizeof(*store), &data, sizeof(*store)); - } - if (rcode == RCODE_COMPLETE) { - arm_resp->buffer_length = sizeof(*store); - memcpy (buf2, &old, sizeof(*store)); - } else { - arm_resp->buffer_length = 0; - } - req->file_info = fi; - req->req.type = RAW1394_REQ_ARM; - req->req.generation = get_hpsb_generation(host); - req->req.misc = ( (((sizeof(*store)) << 16) & (0xFFFF0000)) | - (ARM_LOCK & 0xFF)); - req->req.tag = arm_addr->arm_tag; - req->req.recvb = arm_addr->recvb; - req->req.length = size; - arm_req->generation = req->req.generation; - arm_req->extended_transaction_code = ext_tcode; - arm_req->destination_offset = addr; - arm_req->source_nodeid = nodeid; - arm_req->destination_nodeid = host->node_id; - arm_req->tlabel = (flags >> 10) & 0x3f; - arm_req->tcode = (flags >> 4) & 0x0f; - arm_resp->response_code = rcode; - arm_req_resp->request = int2ptr((arm_addr->recvb) + - sizeof (struct arm_request_response)); - arm_req_resp->response = int2ptr((arm_addr->recvb) + - sizeof (struct arm_request_response) + - sizeof (struct arm_request)); - arm_req->buffer = int2ptr((arm_addr->recvb) + - sizeof (struct arm_request_response) + - sizeof (struct arm_request) + - sizeof (struct arm_response)); - arm_resp->buffer = int2ptr((arm_addr->recvb) + - sizeof (struct arm_request_response) + - sizeof (struct arm_request) + - sizeof (struct arm_response) + - 2* sizeof (*store)); - queue_complete_req(req); - } - spin_unlock(&host_info_lock); - return(rcode); + DBGMSG("arm_lock64 -> entering notification-section"); + req = __alloc_pending_request(SLAB_ATOMIC); + if (!req) { + spin_unlock(&host_info_lock); + DBGMSG("arm_lock64 -> rcode_conflict_error"); + return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. + The request may be retried */ + } + size = sizeof(struct arm_request) + sizeof(struct arm_response) + 3 * sizeof(*store) + sizeof(struct arm_request_response); /* maximum */ + req->data = kmalloc(size, SLAB_ATOMIC); + if (!(req->data)) { + free_pending_request(req); + spin_unlock(&host_info_lock); + DBGMSG("arm_lock64 -> rcode_conflict_error"); + return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. + The request may be retried */ + } + req->free_data = 1; + arm_req_resp = (struct arm_request_response *)(req->data); + arm_req = (struct arm_request *)((byte_t *) (req->data) + + (sizeof + (struct + arm_request_response))); + arm_resp = + (struct arm_response *)((byte_t *) (arm_req) + + (sizeof(struct arm_request))); + buf1 = (byte_t *) arm_resp + sizeof(struct arm_response); + buf2 = buf1 + 2 * sizeof(*store); + if ((ext_tcode == EXTCODE_FETCH_ADD) || + (ext_tcode == EXTCODE_LITTLE_ADD)) { + arm_req->buffer_length = sizeof(*store); + memcpy(buf1, &data, sizeof(*store)); + + } else { + arm_req->buffer_length = 2 * sizeof(*store); + memcpy(buf1, &arg, sizeof(*store)); + memcpy(buf1 + sizeof(*store), &data, sizeof(*store)); + } + if (rcode == RCODE_COMPLETE) { + arm_resp->buffer_length = sizeof(*store); + memcpy(buf2, &old, sizeof(*store)); + } else { + arm_resp->buffer_length = 0; + } + req->file_info = fi; + req->req.type = RAW1394_REQ_ARM; + req->req.generation = get_hpsb_generation(host); + req->req.misc = ((((sizeof(*store)) << 16) & (0xFFFF0000)) | + (ARM_LOCK & 0xFF)); + req->req.tag = arm_addr->arm_tag; + req->req.recvb = arm_addr->recvb; + req->req.length = size; + arm_req->generation = req->req.generation; + arm_req->extended_transaction_code = ext_tcode; + arm_req->destination_offset = addr; + arm_req->source_nodeid = nodeid; + arm_req->destination_nodeid = host->node_id; + arm_req->tlabel = (flags >> 10) & 0x3f; + arm_req->tcode = (flags >> 4) & 0x0f; + arm_resp->response_code = rcode; + arm_req_resp->request = int2ptr((arm_addr->recvb) + + sizeof(struct + arm_request_response)); + arm_req_resp->response = + int2ptr((arm_addr->recvb) + + sizeof(struct arm_request_response) + + sizeof(struct arm_request)); + arm_req->buffer = + int2ptr((arm_addr->recvb) + + sizeof(struct arm_request_response) + + sizeof(struct arm_request) + + sizeof(struct arm_response)); + arm_resp->buffer = + int2ptr((arm_addr->recvb) + + sizeof(struct arm_request_response) + + sizeof(struct arm_request) + + sizeof(struct arm_response) + 2 * sizeof(*store)); + queue_complete_req(req); + } + spin_unlock(&host_info_lock); + return (rcode); } static int arm_register(struct file_info *fi, struct pending_request *req) { - int retval; - struct arm_addr *addr; - struct host_info *hi; - struct file_info *fi_hlp = NULL; - struct list_head *entry; - struct arm_addr *arm_addr = NULL; - int same_host, another_host; - unsigned long flags; - - DBGMSG("arm_register called " - "addr(Offset): %8.8x %8.8x length: %u " - "rights: %2.2X notify: %2.2X " - "max_blk_len: %4.4X", - (u32) ((req->req.address >>32) & 0xFFFF), - (u32) (req->req.address & 0xFFFFFFFF), - req->req.length, ((req->req.misc >> 8) & 0xFF), - (req->req.misc & 0xFF),((req->req.misc >> 16) & 0xFFFF)); - /* check addressrange */ - if ((((req->req.address) & ~(0xFFFFFFFFFFFFULL)) != 0) || - (((req->req.address + req->req.length) & ~(0xFFFFFFFFFFFFULL)) != 0)) { - req->req.length = 0; - return (-EINVAL); - } - /* addr-list-entry for fileinfo */ - addr = (struct arm_addr *)kmalloc(sizeof(struct arm_addr), SLAB_KERNEL); - if (!addr) { - req->req.length = 0; - return (-ENOMEM); - } - /* allocation of addr_space_buffer */ - addr->addr_space_buffer = (u8 *)vmalloc(req->req.length); - if (!(addr->addr_space_buffer)) { - kfree(addr); - req->req.length = 0; - return (-ENOMEM); - } - /* initialization of addr_space_buffer */ - if ((req->req.sendb)== (unsigned long)NULL) { - /* init: set 0 */ - memset(addr->addr_space_buffer, 0,req->req.length); - } else { - /* init: user -> kernel */ - if (copy_from_user(addr->addr_space_buffer,int2ptr(req->req.sendb), - req->req.length)) { - vfree(addr->addr_space_buffer); - kfree(addr); - return (-EFAULT); - } - } - INIT_LIST_HEAD(&addr->addr_list); - addr->arm_tag = req->req.tag; - addr->start = req->req.address; - addr->end = req->req.address + req->req.length; - addr->access_rights = (u8) (req->req.misc & 0x0F); - addr->notification_options = (u8) ((req->req.misc >> 4) & 0x0F); - addr->client_transactions = (u8) ((req->req.misc >> 8) & 0x0F); - addr->access_rights |= addr->client_transactions; - addr->notification_options |= addr->client_transactions; - addr->recvb = req->req.recvb; - addr->rec_length = (u16) ((req->req.misc >> 16) & 0xFFFF); - spin_lock_irqsave(&host_info_lock, flags); - hi = find_host_info(fi->host); - same_host = 0; - another_host = 0; - /* same host with address-entry containing same addressrange ? */ - list_for_each_entry(fi_hlp, &hi->file_info_list, list) { - entry = fi_hlp->addr_list.next; - while (entry != &(fi_hlp->addr_list)) { - arm_addr = list_entry(entry, struct arm_addr, addr_list); - if ( (arm_addr->start == addr->start) && - (arm_addr->end == addr->end)) { - DBGMSG("same host ownes same " - "addressrange -> EALREADY"); - same_host = 1; - break; - } - entry = entry->next; - } - if (same_host) { - break; - } - } - if (same_host) { - /* addressrange occupied by same host */ - vfree(addr->addr_space_buffer); - kfree(addr); - spin_unlock_irqrestore(&host_info_lock, flags); - return (-EALREADY); - } - /* another host with valid address-entry containing same addressrange */ - list_for_each_entry(hi, &host_info_list, list) { - if (hi->host != fi->host) { - list_for_each_entry(fi_hlp, &hi->file_info_list, list) { - entry = fi_hlp->addr_list.next; - while (entry != &(fi_hlp->addr_list)) { - arm_addr = list_entry(entry, struct arm_addr, addr_list); - if ( (arm_addr->start == addr->start) && - (arm_addr->end == addr->end)) { - DBGMSG("another host ownes same " - "addressrange"); - another_host = 1; - break; - } - entry = entry->next; - } - if (another_host) { - break; - } - } - } - } - if (another_host) { - DBGMSG("another hosts entry is valid -> SUCCESS"); - if (copy_to_user(int2ptr(req->req.recvb), - &addr->start,sizeof(u64))) { - printk(KERN_ERR "raw1394: arm_register failed " - " address-range-entry is invalid -> EFAULT !!!\n"); - vfree(addr->addr_space_buffer); - kfree(addr); - spin_unlock_irqrestore(&host_info_lock, flags); - return (-EFAULT); - } - free_pending_request(req); /* immediate success or fail */ - /* INSERT ENTRY */ - list_add_tail(&addr->addr_list, &fi->addr_list); - spin_unlock_irqrestore(&host_info_lock, flags); - return sizeof(struct raw1394_request); - } - retval = hpsb_register_addrspace(&raw1394_highlevel, fi->host, &arm_ops, req->req.address, - req->req.address + req->req.length); - if (retval) { - /* INSERT ENTRY */ - list_add_tail(&addr->addr_list, &fi->addr_list); - } else { - DBGMSG("arm_register failed errno: %d \n",retval); - vfree(addr->addr_space_buffer); - kfree(addr); - spin_unlock_irqrestore(&host_info_lock, flags); - return (-EALREADY); - } - spin_unlock_irqrestore(&host_info_lock, flags); - free_pending_request(req); /* immediate success or fail */ - return sizeof(struct raw1394_request); + int retval; + struct arm_addr *addr; + struct host_info *hi; + struct file_info *fi_hlp = NULL; + struct list_head *entry; + struct arm_addr *arm_addr = NULL; + int same_host, another_host; + unsigned long flags; + + DBGMSG("arm_register called " + "addr(Offset): %8.8x %8.8x length: %u " + "rights: %2.2X notify: %2.2X " + "max_blk_len: %4.4X", + (u32) ((req->req.address >> 32) & 0xFFFF), + (u32) (req->req.address & 0xFFFFFFFF), + req->req.length, ((req->req.misc >> 8) & 0xFF), + (req->req.misc & 0xFF), ((req->req.misc >> 16) & 0xFFFF)); + /* check addressrange */ + if ((((req->req.address) & ~(0xFFFFFFFFFFFFULL)) != 0) || + (((req->req.address + req->req.length) & ~(0xFFFFFFFFFFFFULL)) != + 0)) { + req->req.length = 0; + return (-EINVAL); + } + /* addr-list-entry for fileinfo */ + addr = (struct arm_addr *)kmalloc(sizeof(struct arm_addr), SLAB_KERNEL); + if (!addr) { + req->req.length = 0; + return (-ENOMEM); + } + /* allocation of addr_space_buffer */ + addr->addr_space_buffer = (u8 *) vmalloc(req->req.length); + if (!(addr->addr_space_buffer)) { + kfree(addr); + req->req.length = 0; + return (-ENOMEM); + } + /* initialization of addr_space_buffer */ + if ((req->req.sendb) == (unsigned long)NULL) { + /* init: set 0 */ + memset(addr->addr_space_buffer, 0, req->req.length); + } else { + /* init: user -> kernel */ + if (copy_from_user + (addr->addr_space_buffer, int2ptr(req->req.sendb), + req->req.length)) { + vfree(addr->addr_space_buffer); + kfree(addr); + return (-EFAULT); + } + } + INIT_LIST_HEAD(&addr->addr_list); + addr->arm_tag = req->req.tag; + addr->start = req->req.address; + addr->end = req->req.address + req->req.length; + addr->access_rights = (u8) (req->req.misc & 0x0F); + addr->notification_options = (u8) ((req->req.misc >> 4) & 0x0F); + addr->client_transactions = (u8) ((req->req.misc >> 8) & 0x0F); + addr->access_rights |= addr->client_transactions; + addr->notification_options |= addr->client_transactions; + addr->recvb = req->req.recvb; + addr->rec_length = (u16) ((req->req.misc >> 16) & 0xFFFF); + spin_lock_irqsave(&host_info_lock, flags); + hi = find_host_info(fi->host); + same_host = 0; + another_host = 0; + /* same host with address-entry containing same addressrange ? */ + list_for_each_entry(fi_hlp, &hi->file_info_list, list) { + entry = fi_hlp->addr_list.next; + while (entry != &(fi_hlp->addr_list)) { + arm_addr = + list_entry(entry, struct arm_addr, addr_list); + if ((arm_addr->start == addr->start) + && (arm_addr->end == addr->end)) { + DBGMSG("same host ownes same " + "addressrange -> EALREADY"); + same_host = 1; + break; + } + entry = entry->next; + } + if (same_host) { + break; + } + } + if (same_host) { + /* addressrange occupied by same host */ + vfree(addr->addr_space_buffer); + kfree(addr); + spin_unlock_irqrestore(&host_info_lock, flags); + return (-EALREADY); + } + /* another host with valid address-entry containing same addressrange */ + list_for_each_entry(hi, &host_info_list, list) { + if (hi->host != fi->host) { + list_for_each_entry(fi_hlp, &hi->file_info_list, list) { + entry = fi_hlp->addr_list.next; + while (entry != &(fi_hlp->addr_list)) { + arm_addr = + list_entry(entry, struct arm_addr, + addr_list); + if ((arm_addr->start == addr->start) + && (arm_addr->end == addr->end)) { + DBGMSG + ("another host ownes same " + "addressrange"); + another_host = 1; + break; + } + entry = entry->next; + } + if (another_host) { + break; + } + } + } + } + if (another_host) { + DBGMSG("another hosts entry is valid -> SUCCESS"); + if (copy_to_user(int2ptr(req->req.recvb), + &addr->start, sizeof(u64))) { + printk(KERN_ERR "raw1394: arm_register failed " + " address-range-entry is invalid -> EFAULT !!!\n"); + vfree(addr->addr_space_buffer); + kfree(addr); + spin_unlock_irqrestore(&host_info_lock, flags); + return (-EFAULT); + } + free_pending_request(req); /* immediate success or fail */ + /* INSERT ENTRY */ + list_add_tail(&addr->addr_list, &fi->addr_list); + spin_unlock_irqrestore(&host_info_lock, flags); + return sizeof(struct raw1394_request); + } + retval = + hpsb_register_addrspace(&raw1394_highlevel, fi->host, &arm_ops, + req->req.address, + req->req.address + req->req.length); + if (retval) { + /* INSERT ENTRY */ + list_add_tail(&addr->addr_list, &fi->addr_list); + } else { + DBGMSG("arm_register failed errno: %d \n", retval); + vfree(addr->addr_space_buffer); + kfree(addr); + spin_unlock_irqrestore(&host_info_lock, flags); + return (-EALREADY); + } + spin_unlock_irqrestore(&host_info_lock, flags); + free_pending_request(req); /* immediate success or fail */ + return sizeof(struct raw1394_request); } static int arm_unregister(struct file_info *fi, struct pending_request *req) { - int found = 0; - int retval = 0; - struct list_head *entry; - struct arm_addr *addr = NULL; - struct host_info *hi; - struct file_info *fi_hlp = NULL; - struct arm_addr *arm_addr = NULL; - int another_host; - unsigned long flags; - - DBGMSG("arm_Unregister called addr(Offset): " - "%8.8x %8.8x", - (u32) ((req->req.address >>32) & 0xFFFF), - (u32) (req->req.address & 0xFFFFFFFF)); - spin_lock_irqsave(&host_info_lock, flags); - /* get addr */ - entry = fi->addr_list.next; - while (entry != &(fi->addr_list)) { - addr = list_entry(entry, struct arm_addr, addr_list); - if (addr->start == req->req.address) { - found = 1; - break; - } - entry = entry->next; - } - if (!found) { - DBGMSG("arm_Unregister addr not found"); - spin_unlock_irqrestore(&host_info_lock, flags); - return (-EINVAL); - } - DBGMSG("arm_Unregister addr found"); - another_host = 0; - /* another host with valid address-entry containing - same addressrange */ - list_for_each_entry(hi, &host_info_list, list) { - if (hi->host != fi->host) { - list_for_each_entry(fi_hlp, &hi->file_info_list, list) { - entry = fi_hlp->addr_list.next; - while (entry != &(fi_hlp->addr_list)) { - arm_addr = list_entry(entry, - struct arm_addr, addr_list); - if (arm_addr->start == - addr->start) { - DBGMSG("another host ownes " - "same addressrange"); - another_host = 1; - break; - } - entry = entry->next; - } - if (another_host) { - break; - } - } - } - } - if (another_host) { - DBGMSG("delete entry from list -> success"); - list_del(&addr->addr_list); - vfree(addr->addr_space_buffer); - kfree(addr); - free_pending_request(req); /* immediate success or fail */ - spin_unlock_irqrestore(&host_info_lock, flags); - return sizeof(struct raw1394_request); - } - retval = hpsb_unregister_addrspace(&raw1394_highlevel, fi->host, addr->start); - if (!retval) { - printk(KERN_ERR "raw1394: arm_Unregister failed -> EINVAL\n"); - spin_unlock_irqrestore(&host_info_lock, flags); - return (-EINVAL); - } - DBGMSG("delete entry from list -> success"); - list_del(&addr->addr_list); - spin_unlock_irqrestore(&host_info_lock, flags); - vfree(addr->addr_space_buffer); - kfree(addr); - free_pending_request(req); /* immediate success or fail */ - return sizeof(struct raw1394_request); + int found = 0; + int retval = 0; + struct list_head *entry; + struct arm_addr *addr = NULL; + struct host_info *hi; + struct file_info *fi_hlp = NULL; + struct arm_addr *arm_addr = NULL; + int another_host; + unsigned long flags; + + DBGMSG("arm_Unregister called addr(Offset): " + "%8.8x %8.8x", + (u32) ((req->req.address >> 32) & 0xFFFF), + (u32) (req->req.address & 0xFFFFFFFF)); + spin_lock_irqsave(&host_info_lock, flags); + /* get addr */ + entry = fi->addr_list.next; + while (entry != &(fi->addr_list)) { + addr = list_entry(entry, struct arm_addr, addr_list); + if (addr->start == req->req.address) { + found = 1; + break; + } + entry = entry->next; + } + if (!found) { + DBGMSG("arm_Unregister addr not found"); + spin_unlock_irqrestore(&host_info_lock, flags); + return (-EINVAL); + } + DBGMSG("arm_Unregister addr found"); + another_host = 0; + /* another host with valid address-entry containing + same addressrange */ + list_for_each_entry(hi, &host_info_list, list) { + if (hi->host != fi->host) { + list_for_each_entry(fi_hlp, &hi->file_info_list, list) { + entry = fi_hlp->addr_list.next; + while (entry != &(fi_hlp->addr_list)) { + arm_addr = list_entry(entry, + struct arm_addr, + addr_list); + if (arm_addr->start == addr->start) { + DBGMSG("another host ownes " + "same addressrange"); + another_host = 1; + break; + } + entry = entry->next; + } + if (another_host) { + break; + } + } + } + } + if (another_host) { + DBGMSG("delete entry from list -> success"); + list_del(&addr->addr_list); + vfree(addr->addr_space_buffer); + kfree(addr); + free_pending_request(req); /* immediate success or fail */ + spin_unlock_irqrestore(&host_info_lock, flags); + return sizeof(struct raw1394_request); + } + retval = + hpsb_unregister_addrspace(&raw1394_highlevel, fi->host, + addr->start); + if (!retval) { + printk(KERN_ERR "raw1394: arm_Unregister failed -> EINVAL\n"); + spin_unlock_irqrestore(&host_info_lock, flags); + return (-EINVAL); + } + DBGMSG("delete entry from list -> success"); + list_del(&addr->addr_list); + spin_unlock_irqrestore(&host_info_lock, flags); + vfree(addr->addr_space_buffer); + kfree(addr); + free_pending_request(req); /* immediate success or fail */ + return sizeof(struct raw1394_request); } /* Copy data from ARM buffer(s) to user buffer. */ static int arm_get_buf(struct file_info *fi, struct pending_request *req) { - struct arm_addr *arm_addr = NULL; + struct arm_addr *arm_addr = NULL; unsigned long flags; unsigned long offset; @@ -1749,8 +1864,7 @@ DBGMSG("arm_get_buf " "addr(Offset): %04X %08X length: %u", (u32) ((req->req.address >> 32) & 0xFFFF), - (u32) (req->req.address & 0xFFFFFFFF), - (u32) req->req.length); + (u32) (req->req.address & 0xFFFFFFFF), (u32) req->req.length); spin_lock_irqsave(&host_info_lock, flags); entry = fi->addr_list.next; @@ -1761,13 +1875,18 @@ if (req->req.address + req->req.length <= arm_addr->end) { offset = req->req.address - arm_addr->start; - DBGMSG("arm_get_buf copy_to_user( %08X, %p, %u )", - (u32) req->req.recvb, - arm_addr->addr_space_buffer+offset, - (u32) req->req.length); - - if (copy_to_user(int2ptr(req->req.recvb), arm_addr->addr_space_buffer+offset, req->req.length)) { - spin_unlock_irqrestore(&host_info_lock, flags); + DBGMSG + ("arm_get_buf copy_to_user( %08X, %p, %u )", + (u32) req->req.recvb, + arm_addr->addr_space_buffer + offset, + (u32) req->req.length); + + if (copy_to_user + (int2ptr(req->req.recvb), + arm_addr->addr_space_buffer + offset, + req->req.length)) { + spin_unlock_irqrestore(&host_info_lock, + flags); return (-EFAULT); } @@ -1789,11 +1908,10 @@ return (-EINVAL); } - /* Copy data from user buffer to ARM buffer(s). */ static int arm_set_buf(struct file_info *fi, struct pending_request *req) { - struct arm_addr *arm_addr = NULL; + struct arm_addr *arm_addr = NULL; unsigned long flags; unsigned long offset; @@ -1802,9 +1920,7 @@ DBGMSG("arm_set_buf " "addr(Offset): %04X %08X length: %u", (u32) ((req->req.address >> 32) & 0xFFFF), - (u32) (req->req.address & 0xFFFFFFFF), - (u32) req->req.length); - + (u32) (req->req.address & 0xFFFFFFFF), (u32) req->req.length); spin_lock_irqsave(&host_info_lock, flags); entry = fi->addr_list.next; @@ -1815,18 +1931,23 @@ if (req->req.address + req->req.length <= arm_addr->end) { offset = req->req.address - arm_addr->start; - DBGMSG("arm_set_buf copy_from_user( %p, %08X, %u )", - arm_addr->addr_space_buffer+offset, - (u32) req->req.sendb, - (u32) req->req.length); - - if (copy_from_user(arm_addr->addr_space_buffer+offset, int2ptr(req->req.sendb), req->req.length)) { - spin_unlock_irqrestore(&host_info_lock, flags); + DBGMSG + ("arm_set_buf copy_from_user( %p, %08X, %u )", + arm_addr->addr_space_buffer + offset, + (u32) req->req.sendb, + (u32) req->req.length); + + if (copy_from_user + (arm_addr->addr_space_buffer + offset, + int2ptr(req->req.sendb), + req->req.length)) { + spin_unlock_irqrestore(&host_info_lock, + flags); return (-EFAULT); } spin_unlock_irqrestore(&host_info_lock, flags); - free_pending_request(req); /* we have to free the request, because we queue no response, and therefore nobody will free it */ + free_pending_request(req); /* we have to free the request, because we queue no response, and therefore nobody will free it */ return sizeof(struct raw1394_request); } else { DBGMSG("arm_set_buf request exceeded mapping"); @@ -1842,96 +1963,100 @@ static int reset_notification(struct file_info *fi, struct pending_request *req) { - DBGMSG("reset_notification called - switch %s ", - (req->req.misc == RAW1394_NOTIFY_OFF)?"OFF":"ON"); - if ((req->req.misc == RAW1394_NOTIFY_OFF) || - (req->req.misc == RAW1394_NOTIFY_ON)) { - fi->notification=(u8)req->req.misc; - free_pending_request(req); /* we have to free the request, because we queue no response, and therefore nobody will free it */ - return sizeof(struct raw1394_request); - } - /* error EINVAL (22) invalid argument */ - return (-EINVAL); + DBGMSG("reset_notification called - switch %s ", + (req->req.misc == RAW1394_NOTIFY_OFF) ? "OFF" : "ON"); + if ((req->req.misc == RAW1394_NOTIFY_OFF) || + (req->req.misc == RAW1394_NOTIFY_ON)) { + fi->notification = (u8) req->req.misc; + free_pending_request(req); /* we have to free the request, because we queue no response, and therefore nobody will free it */ + return sizeof(struct raw1394_request); + } + /* error EINVAL (22) invalid argument */ + return (-EINVAL); } static int write_phypacket(struct file_info *fi, struct pending_request *req) { - struct hpsb_packet *packet = NULL; - int retval=0; - quadlet_t data; - - data = be32_to_cpu((u32)req->req.sendb); - DBGMSG("write_phypacket called - quadlet 0x%8.8x ",data); - packet = hpsb_make_phypacket (fi->host, data); - if (!packet) return -ENOMEM; - req->req.length=0; - req->packet=packet; - hpsb_set_packet_complete_task(packet, (void(*)(void*))queue_complete_cb, req); - spin_lock_irq(&fi->reqlists_lock); - list_add_tail(&req->list, &fi->req_pending); - spin_unlock_irq(&fi->reqlists_lock); - packet->generation = req->req.generation; - retval = hpsb_send_packet(packet); - DBGMSG("write_phypacket send_packet called => retval: %d ", retval); - if (retval < 0) { - req->req.error = RAW1394_ERROR_SEND_ERROR; - req->req.length = 0; - queue_complete_req(req); - } - return sizeof(struct raw1394_request); + struct hpsb_packet *packet = NULL; + int retval = 0; + quadlet_t data; + + data = be32_to_cpu((u32) req->req.sendb); + DBGMSG("write_phypacket called - quadlet 0x%8.8x ", data); + packet = hpsb_make_phypacket(fi->host, data); + if (!packet) + return -ENOMEM; + req->req.length = 0; + req->packet = packet; + hpsb_set_packet_complete_task(packet, + (void (*)(void *))queue_complete_cb, req); + spin_lock_irq(&fi->reqlists_lock); + list_add_tail(&req->list, &fi->req_pending); + spin_unlock_irq(&fi->reqlists_lock); + packet->generation = req->req.generation; + retval = hpsb_send_packet(packet); + DBGMSG("write_phypacket send_packet called => retval: %d ", retval); + if (retval < 0) { + req->req.error = RAW1394_ERROR_SEND_ERROR; + req->req.length = 0; + queue_complete_req(req); + } + return sizeof(struct raw1394_request); } static int get_config_rom(struct file_info *fi, struct pending_request *req) { - int ret=sizeof(struct raw1394_request); - quadlet_t *data = kmalloc(req->req.length, SLAB_KERNEL); - int status; - - if (!data) return -ENOMEM; - - status = csr1212_read(fi->host->csr.rom, CSR1212_CONFIG_ROM_SPACE_OFFSET, - data, req->req.length); - if (copy_to_user(int2ptr(req->req.recvb), data, - req->req.length)) - ret = -EFAULT; - if (copy_to_user(int2ptr(req->req.tag), &fi->host->csr.rom->cache_head->len, - sizeof(fi->host->csr.rom->cache_head->len))) - ret = -EFAULT; + int ret = sizeof(struct raw1394_request); + quadlet_t *data = kmalloc(req->req.length, SLAB_KERNEL); + int status; + + if (!data) + return -ENOMEM; + + status = + csr1212_read(fi->host->csr.rom, CSR1212_CONFIG_ROM_SPACE_OFFSET, + data, req->req.length); + if (copy_to_user(int2ptr(req->req.recvb), data, req->req.length)) + ret = -EFAULT; + if (copy_to_user + (int2ptr(req->req.tag), &fi->host->csr.rom->cache_head->len, + sizeof(fi->host->csr.rom->cache_head->len))) + ret = -EFAULT; if (copy_to_user(int2ptr(req->req.address), &fi->host->csr.generation, sizeof(fi->host->csr.generation))) - ret = -EFAULT; - if (copy_to_user(int2ptr(req->req.sendb), &status, - sizeof(status))) - ret = -EFAULT; - kfree(data); - if (ret >= 0) { - free_pending_request(req); /* we have to free the request, because we queue no response, and therefore nobody will free it */ - } - return ret; + ret = -EFAULT; + if (copy_to_user(int2ptr(req->req.sendb), &status, sizeof(status))) + ret = -EFAULT; + kfree(data); + if (ret >= 0) { + free_pending_request(req); /* we have to free the request, because we queue no response, and therefore nobody will free it */ + } + return ret; } static int update_config_rom(struct file_info *fi, struct pending_request *req) { - int ret=sizeof(struct raw1394_request); - quadlet_t *data = kmalloc(req->req.length, SLAB_KERNEL); - if (!data) return -ENOMEM; - if (copy_from_user(data,int2ptr(req->req.sendb), - req->req.length)) { - ret= -EFAULT; - } else { - int status = hpsb_update_config_rom(fi->host, - data, req->req.length, - (unsigned char) req->req.misc); - if (copy_to_user(int2ptr(req->req.recvb), - &status, sizeof(status))) - ret = -ENOMEM; - } - kfree(data); - if (ret >= 0) { - free_pending_request(req); /* we have to free the request, because we queue no response, and therefore nobody will free it */ + int ret = sizeof(struct raw1394_request); + quadlet_t *data = kmalloc(req->req.length, SLAB_KERNEL); + if (!data) + return -ENOMEM; + if (copy_from_user(data, int2ptr(req->req.sendb), req->req.length)) { + ret = -EFAULT; + } else { + int status = hpsb_update_config_rom(fi->host, + data, req->req.length, + (unsigned char)req->req. + misc); + if (copy_to_user + (int2ptr(req->req.recvb), &status, sizeof(status))) + ret = -ENOMEM; + } + kfree(data); + if (ret >= 0) { + free_pending_request(req); /* we have to free the request, because we queue no response, and therefore nobody will free it */ fi->cfgrom_upd = 1; - } - return ret; + } + return ret; } static int modify_config_rom(struct file_info *fi, struct pending_request *req) @@ -1943,23 +2068,32 @@ int ret = 0; if (req->req.misc == ~0) { - if (req->req.length == 0) return -EINVAL; + if (req->req.length == 0) + return -EINVAL; /* Find an unused slot */ - for (dr = 0; dr < RAW1394_MAX_USER_CSR_DIRS && fi->csr1212_dirs[dr]; dr++); + for (dr = 0; + dr < RAW1394_MAX_USER_CSR_DIRS && fi->csr1212_dirs[dr]; + dr++) ; - if (dr == RAW1394_MAX_USER_CSR_DIRS) return -ENOMEM; + if (dr == RAW1394_MAX_USER_CSR_DIRS) + return -ENOMEM; - fi->csr1212_dirs[dr] = csr1212_new_directory(CSR1212_KV_ID_VENDOR); - if (!fi->csr1212_dirs[dr]) return -ENOMEM; + fi->csr1212_dirs[dr] = + csr1212_new_directory(CSR1212_KV_ID_VENDOR); + if (!fi->csr1212_dirs[dr]) + return -ENOMEM; } else { dr = req->req.misc; - if (!fi->csr1212_dirs[dr]) return -EINVAL; + if (!fi->csr1212_dirs[dr]) + return -EINVAL; /* Delete old stuff */ - for (dentry = fi->csr1212_dirs[dr]->value.directory.dentries_head; + for (dentry = + fi->csr1212_dirs[dr]->value.directory.dentries_head; dentry; dentry = dentry->next) { - csr1212_detach_keyval_from_directory(fi->host->csr.rom->root_kv, + csr1212_detach_keyval_from_directory(fi->host->csr.rom-> + root_kv, dentry->kv); } @@ -1980,7 +2114,8 @@ return -ENOMEM; } - cache->filled_head = kmalloc(sizeof(struct csr1212_cache_region), GFP_KERNEL); + cache->filled_head = + kmalloc(sizeof(struct csr1212_cache_region), GFP_KERNEL); if (!cache->filled_head) { csr1212_release_keyval(fi->csr1212_dirs[dr]); fi->csr1212_dirs[dr] = NULL; @@ -1994,11 +2129,11 @@ csr1212_release_keyval(fi->csr1212_dirs[dr]); fi->csr1212_dirs[dr] = NULL; CSR1212_FREE(cache); - ret= -EFAULT; + ret = -EFAULT; } else { cache->len = req->req.length; cache->filled_head->offset_start = 0; - cache->filled_head->offset_end = cache->size -1; + cache->filled_head->offset_end = cache->size - 1; cache->layout_head = cache->layout_tail = fi->csr1212_dirs[dr]; @@ -2010,17 +2145,20 @@ } /* attach top level items to the root directory */ - for (dentry = fi->csr1212_dirs[dr]->value.directory.dentries_head; + for (dentry = + fi->csr1212_dirs[dr]->value.directory.dentries_head; ret == CSR1212_SUCCESS && dentry; dentry = dentry->next) { - ret = csr1212_attach_keyval_to_directory(fi->host->csr.rom->root_kv, - dentry->kv); + ret = + csr1212_attach_keyval_to_directory(fi->host->csr. + rom->root_kv, + dentry->kv); } if (ret == CSR1212_SUCCESS) { ret = hpsb_update_config_rom_image(fi->host); if (ret >= 0 && copy_to_user(int2ptr(req->req.recvb), - &dr, sizeof(dr))) { + &dr, sizeof(dr))) { ret = -ENOMEM; } } @@ -2034,9 +2172,11 @@ free_pending_request(req); return sizeof(struct raw1394_request); } else { - for (dentry = fi->csr1212_dirs[dr]->value.directory.dentries_head; + for (dentry = + fi->csr1212_dirs[dr]->value.directory.dentries_head; dentry; dentry = dentry->next) { - csr1212_detach_keyval_from_directory(fi->host->csr.rom->root_kv, + csr1212_detach_keyval_from_directory(fi->host->csr.rom-> + root_kv, dentry->kv); } csr1212_release_keyval(fi->csr1212_dirs[dr]); @@ -2047,133 +2187,132 @@ static int state_connected(struct file_info *fi, struct pending_request *req) { - int node = req->req.address >> 48; + int node = req->req.address >> 48; + + req->req.error = RAW1394_ERROR_NONE; - req->req.error = RAW1394_ERROR_NONE; + switch (req->req.type) { - switch (req->req.type) { + case RAW1394_REQ_ECHO: + queue_complete_req(req); + return sizeof(struct raw1394_request); + + case RAW1394_REQ_ISO_SEND: + return handle_iso_send(fi, req, node); + + case RAW1394_REQ_ARM_REGISTER: + return arm_register(fi, req); + + case RAW1394_REQ_ARM_UNREGISTER: + return arm_unregister(fi, req); + + case RAW1394_REQ_ARM_SET_BUF: + return arm_set_buf(fi, req); - case RAW1394_REQ_ECHO: - queue_complete_req(req); - return sizeof(struct raw1394_request); - - case RAW1394_REQ_ISO_SEND: - return handle_iso_send(fi, req, node); - - case RAW1394_REQ_ARM_REGISTER: - return arm_register(fi, req); - - case RAW1394_REQ_ARM_UNREGISTER: - return arm_unregister(fi, req); - - case RAW1394_REQ_ARM_SET_BUF: - return arm_set_buf(fi, req); - - case RAW1394_REQ_ARM_GET_BUF: - return arm_get_buf(fi, req); - - case RAW1394_REQ_RESET_NOTIFY: - return reset_notification(fi, req); - - case RAW1394_REQ_ISO_LISTEN: - handle_iso_listen(fi, req); - return sizeof(struct raw1394_request); - - case RAW1394_REQ_FCP_LISTEN: - handle_fcp_listen(fi, req); - return sizeof(struct raw1394_request); - - case RAW1394_REQ_RESET_BUS: - if (req->req.misc == RAW1394_LONG_RESET) { - DBGMSG("busreset called (type: LONG)"); - hpsb_reset_bus(fi->host, LONG_RESET); - free_pending_request(req); /* we have to free the request, because we queue no response, and therefore nobody will free it */ - return sizeof(struct raw1394_request); - } - if (req->req.misc == RAW1394_SHORT_RESET) { - DBGMSG("busreset called (type: SHORT)"); - hpsb_reset_bus(fi->host, SHORT_RESET); - free_pending_request(req); /* we have to free the request, because we queue no response, and therefore nobody will free it */ - return sizeof(struct raw1394_request); - } - /* error EINVAL (22) invalid argument */ - return (-EINVAL); - case RAW1394_REQ_GET_ROM: - return get_config_rom(fi, req); + case RAW1394_REQ_ARM_GET_BUF: + return arm_get_buf(fi, req); - case RAW1394_REQ_UPDATE_ROM: - return update_config_rom(fi, req); + case RAW1394_REQ_RESET_NOTIFY: + return reset_notification(fi, req); + + case RAW1394_REQ_ISO_LISTEN: + handle_iso_listen(fi, req); + return sizeof(struct raw1394_request); + + case RAW1394_REQ_FCP_LISTEN: + handle_fcp_listen(fi, req); + return sizeof(struct raw1394_request); + + case RAW1394_REQ_RESET_BUS: + if (req->req.misc == RAW1394_LONG_RESET) { + DBGMSG("busreset called (type: LONG)"); + hpsb_reset_bus(fi->host, LONG_RESET); + free_pending_request(req); /* we have to free the request, because we queue no response, and therefore nobody will free it */ + return sizeof(struct raw1394_request); + } + if (req->req.misc == RAW1394_SHORT_RESET) { + DBGMSG("busreset called (type: SHORT)"); + hpsb_reset_bus(fi->host, SHORT_RESET); + free_pending_request(req); /* we have to free the request, because we queue no response, and therefore nobody will free it */ + return sizeof(struct raw1394_request); + } + /* error EINVAL (22) invalid argument */ + return (-EINVAL); + case RAW1394_REQ_GET_ROM: + return get_config_rom(fi, req); + + case RAW1394_REQ_UPDATE_ROM: + return update_config_rom(fi, req); case RAW1394_REQ_MODIFY_ROM: return modify_config_rom(fi, req); - } + } - if (req->req.generation != get_hpsb_generation(fi->host)) { - req->req.error = RAW1394_ERROR_GENERATION; - req->req.generation = get_hpsb_generation(fi->host); - req->req.length = 0; - queue_complete_req(req); - return sizeof(struct raw1394_request); - } - - switch (req->req.type) { - case RAW1394_REQ_PHYPACKET: - return write_phypacket(fi, req); - case RAW1394_REQ_ASYNC_SEND: - return handle_async_send(fi, req); - } - - if (req->req.length == 0) { - req->req.error = RAW1394_ERROR_INVALID_ARG; - queue_complete_req(req); - return sizeof(struct raw1394_request); - } - - return handle_async_request(fi, req, node); -} - - -static ssize_t raw1394_write(struct file *file, const char __user *buffer, size_t count, - loff_t *offset_is_ignored) -{ - struct file_info *fi = (struct file_info *)file->private_data; - struct pending_request *req; - ssize_t retval = 0; - - if (count != sizeof(struct raw1394_request)) { - return -EINVAL; - } - - req = alloc_pending_request(); - if (req == NULL) { - return -ENOMEM; - } - req->file_info = fi; - - if (copy_from_user(&req->req, buffer, sizeof(struct raw1394_request))) { - free_pending_request(req); - return -EFAULT; - } - - switch (fi->state) { - case opened: - retval = state_opened(fi, req); - break; - - case initialized: - retval = state_initialized(fi, req); - break; - - case connected: - retval = state_connected(fi, req); - break; - } - - if (retval < 0) { - free_pending_request(req); - } + if (req->req.generation != get_hpsb_generation(fi->host)) { + req->req.error = RAW1394_ERROR_GENERATION; + req->req.generation = get_hpsb_generation(fi->host); + req->req.length = 0; + queue_complete_req(req); + return sizeof(struct raw1394_request); + } + + switch (req->req.type) { + case RAW1394_REQ_PHYPACKET: + return write_phypacket(fi, req); + case RAW1394_REQ_ASYNC_SEND: + return handle_async_send(fi, req); + } - return retval; + if (req->req.length == 0) { + req->req.error = RAW1394_ERROR_INVALID_ARG; + queue_complete_req(req); + return sizeof(struct raw1394_request); + } + + return handle_async_request(fi, req, node); +} + +static ssize_t raw1394_write(struct file *file, const char __user * buffer, + size_t count, loff_t * offset_is_ignored) +{ + struct file_info *fi = (struct file_info *)file->private_data; + struct pending_request *req; + ssize_t retval = 0; + + if (count != sizeof(struct raw1394_request)) { + return -EINVAL; + } + + req = alloc_pending_request(); + if (req == NULL) { + return -ENOMEM; + } + req->file_info = fi; + + if (copy_from_user(&req->req, buffer, sizeof(struct raw1394_request))) { + free_pending_request(req); + return -EFAULT; + } + + switch (fi->state) { + case opened: + retval = state_opened(fi, req); + break; + + case initialized: + retval = state_initialized(fi, req); + break; + + case connected: + retval = state_connected(fi, req); + break; + } + + if (retval < 0) { + free_pending_request(req); + } + + return retval; } /* rawiso operations */ @@ -2185,8 +2324,8 @@ struct pending_request *req; list_for_each_entry(req, &fi->req_complete, list) - if (req->req.type == RAW1394_REQ_RAWISO_ACTIVITY) - return 1; + if (req->req.type == RAW1394_REQ_RAWISO_ACTIVITY) + return 1; return 0; } @@ -2200,7 +2339,8 @@ /* only one ISO activity event may be in the queue */ if (!__rawiso_event_in_queue(fi)) { - struct pending_request *req = __alloc_pending_request(SLAB_ATOMIC); + struct pending_request *req = + __alloc_pending_request(SLAB_ATOMIC); if (req) { req->file_info = fi; @@ -2220,11 +2360,11 @@ static void rawiso_activity_cb(struct hpsb_iso *iso) { unsigned long flags; - struct host_info *hi; + struct host_info *hi; struct file_info *fi; - spin_lock_irqsave(&host_info_lock, flags); - hi = find_host_info(iso->host); + spin_lock_irqsave(&host_info_lock, flags); + hi = find_host_info(iso->host); if (hi != NULL) { list_for_each_entry(fi, &hi->file_info_list, list) { @@ -2237,7 +2377,8 @@ } /* helper function - gather all the kernel iso status bits for returning to user-space */ -static void raw1394_iso_fill_status(struct hpsb_iso *iso, struct raw1394_iso_status *stat) +static void raw1394_iso_fill_status(struct hpsb_iso *iso, + struct raw1394_iso_status *stat) { stat->config.data_buf_size = iso->buf_size; stat->config.buf_packets = iso->buf_packets; @@ -2249,7 +2390,7 @@ stat->xmit_cycle = iso->xmit_cycle; } -static int raw1394_iso_xmit_init(struct file_info *fi, void __user *uaddr) +static int raw1394_iso_xmit_init(struct file_info *fi, void __user * uaddr) { struct raw1394_iso_status stat; @@ -2281,7 +2422,7 @@ return 0; } -static int raw1394_iso_recv_init(struct file_info *fi, void __user *uaddr) +static int raw1394_iso_recv_init(struct file_info *fi, void __user * uaddr) { struct raw1394_iso_status stat; @@ -2295,7 +2436,7 @@ stat.config.data_buf_size, stat.config.buf_packets, stat.config.channel, - stat.config.dma_mode, + stat.config.dma_mode, stat.config.irq_interval, rawiso_activity_cb); if (!fi->iso_handle) @@ -2309,7 +2450,7 @@ return 0; } -static int raw1394_iso_get_status(struct file_info *fi, void __user *uaddr) +static int raw1394_iso_get_status(struct file_info *fi, void __user * uaddr) { struct raw1394_iso_status stat; struct hpsb_iso *iso = fi->iso_handle; @@ -2325,7 +2466,7 @@ } /* copy N packet_infos out of the ringbuffer into user-supplied array */ -static int raw1394_iso_recv_packets(struct file_info *fi, void __user *uaddr) +static int raw1394_iso_recv_packets(struct file_info *fi, void __user * uaddr) { struct raw1394_iso_packets upackets; unsigned int packet = fi->iso_handle->first_packet; @@ -2339,14 +2480,15 @@ /* ensure user-supplied buffer is accessible and big enough */ if (verify_area(VERIFY_WRITE, upackets.infos, - upackets.n_packets * sizeof(struct raw1394_iso_packet_info))) + upackets.n_packets * + sizeof(struct raw1394_iso_packet_info))) return -EFAULT; /* copy the packet_infos out */ for (i = 0; i < upackets.n_packets; i++) { if (__copy_to_user(&upackets.infos[i], - &fi->iso_handle->infos[packet], - sizeof(struct raw1394_iso_packet_info))) + &fi->iso_handle->infos[packet], + sizeof(struct raw1394_iso_packet_info))) return -EFAULT; packet = (packet + 1) % fi->iso_handle->buf_packets; @@ -2356,7 +2498,7 @@ } /* copy N packet_infos from user to ringbuffer, and queue them for transmission */ -static int raw1394_iso_send_packets(struct file_info *fi, void __user *uaddr) +static int raw1394_iso_send_packets(struct file_info *fi, void __user * uaddr) { struct raw1394_iso_packets upackets; int i, rv; @@ -2369,7 +2511,8 @@ /* ensure user-supplied buffer is accessible and big enough */ if (verify_area(VERIFY_READ, upackets.infos, - upackets.n_packets * sizeof(struct raw1394_iso_packet_info))) + upackets.n_packets * + sizeof(struct raw1394_iso_packet_info))) return -EFAULT; /* copy the infos structs in and queue the packets */ @@ -2377,7 +2520,7 @@ struct raw1394_iso_packet_info info; if (__copy_from_user(&info, &upackets.infos[i], - sizeof(struct raw1394_iso_packet_info))) + sizeof(struct raw1394_iso_packet_info))) return -EFAULT; rv = hpsb_iso_xmit_queue_packet(fi->iso_handle, info.offset, @@ -2410,14 +2553,15 @@ } /* ioctl is only used for rawiso operations */ -static int raw1394_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) +static int raw1394_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) { struct file_info *fi = file->private_data; void __user *argp = (void __user *)arg; - switch(fi->iso_state) { + switch (fi->iso_state) { case RAW1394_ISO_INACTIVE: - switch(cmd) { + switch (cmd) { case RAW1394_IOC_ISO_XMIT_INIT: return raw1394_iso_xmit_init(fi, argp); case RAW1394_IOC_ISO_RECV_INIT: @@ -2427,34 +2571,42 @@ } break; case RAW1394_ISO_RECV: - switch(cmd) { - case RAW1394_IOC_ISO_RECV_START: { - /* copy args from user-space */ - int args[3]; - if (copy_from_user(&args[0], argp, sizeof(args))) - return -EFAULT; - return hpsb_iso_recv_start(fi->iso_handle, args[0], args[1], args[2]); - } + switch (cmd) { + case RAW1394_IOC_ISO_RECV_START:{ + /* copy args from user-space */ + int args[3]; + if (copy_from_user + (&args[0], argp, sizeof(args))) + return -EFAULT; + return hpsb_iso_recv_start(fi->iso_handle, + args[0], args[1], + args[2]); + } case RAW1394_IOC_ISO_XMIT_RECV_STOP: hpsb_iso_stop(fi->iso_handle); return 0; case RAW1394_IOC_ISO_RECV_LISTEN_CHANNEL: - return hpsb_iso_recv_listen_channel(fi->iso_handle, arg); + return hpsb_iso_recv_listen_channel(fi->iso_handle, + arg); case RAW1394_IOC_ISO_RECV_UNLISTEN_CHANNEL: - return hpsb_iso_recv_unlisten_channel(fi->iso_handle, arg); - case RAW1394_IOC_ISO_RECV_SET_CHANNEL_MASK: { - /* copy the u64 from user-space */ - u64 mask; - if (copy_from_user(&mask, argp, sizeof(mask))) - return -EFAULT; - return hpsb_iso_recv_set_channel_mask(fi->iso_handle, mask); - } + return hpsb_iso_recv_unlisten_channel(fi->iso_handle, + arg); + case RAW1394_IOC_ISO_RECV_SET_CHANNEL_MASK:{ + /* copy the u64 from user-space */ + u64 mask; + if (copy_from_user(&mask, argp, sizeof(mask))) + return -EFAULT; + return hpsb_iso_recv_set_channel_mask(fi-> + iso_handle, + mask); + } case RAW1394_IOC_ISO_GET_STATUS: return raw1394_iso_get_status(fi, argp); case RAW1394_IOC_ISO_RECV_PACKETS: return raw1394_iso_recv_packets(fi, argp); case RAW1394_IOC_ISO_RECV_RELEASE_PACKETS: - return hpsb_iso_recv_release_packets(fi->iso_handle, arg); + return hpsb_iso_recv_release_packets(fi->iso_handle, + arg); case RAW1394_IOC_ISO_RECV_FLUSH: return hpsb_iso_recv_flush(fi->iso_handle); case RAW1394_IOC_ISO_SHUTDOWN: @@ -2466,14 +2618,16 @@ } break; case RAW1394_ISO_XMIT: - switch(cmd) { - case RAW1394_IOC_ISO_XMIT_START: { - /* copy two ints from user-space */ - int args[2]; - if (copy_from_user(&args[0], argp, sizeof(args))) - return -EFAULT; - return hpsb_iso_xmit_start(fi->iso_handle, args[0], args[1]); - } + switch (cmd) { + case RAW1394_IOC_ISO_XMIT_START:{ + /* copy two ints from user-space */ + int args[2]; + if (copy_from_user + (&args[0], argp, sizeof(args))) + return -EFAULT; + return hpsb_iso_xmit_start(fi->iso_handle, + args[0], args[1]); + } case RAW1394_IOC_ISO_XMIT_SYNC: return hpsb_iso_xmit_sync(fi->iso_handle); case RAW1394_IOC_ISO_XMIT_RECV_STOP: @@ -2498,270 +2652,303 @@ return -EINVAL; } -static unsigned int raw1394_poll(struct file *file, poll_table *pt) +static unsigned int raw1394_poll(struct file *file, poll_table * pt) { - struct file_info *fi = file->private_data; - unsigned int mask = POLLOUT | POLLWRNORM; + struct file_info *fi = file->private_data; + unsigned int mask = POLLOUT | POLLWRNORM; - poll_wait(file, &fi->poll_wait_complete, pt); + poll_wait(file, &fi->poll_wait_complete, pt); - spin_lock_irq(&fi->reqlists_lock); - if (!list_empty(&fi->req_complete)) { - mask |= POLLIN | POLLRDNORM; - } - spin_unlock_irq(&fi->reqlists_lock); + spin_lock_irq(&fi->reqlists_lock); + if (!list_empty(&fi->req_complete)) { + mask |= POLLIN | POLLRDNORM; + } + spin_unlock_irq(&fi->reqlists_lock); - return mask; + return mask; } static int raw1394_open(struct inode *inode, struct file *file) { - struct file_info *fi; + struct file_info *fi; + + fi = kmalloc(sizeof(struct file_info), SLAB_KERNEL); + if (fi == NULL) + return -ENOMEM; + + memset(fi, 0, sizeof(struct file_info)); + fi->notification = (u8) RAW1394_NOTIFY_ON; /* busreset notification */ - fi = kmalloc(sizeof(struct file_info), SLAB_KERNEL); - if (fi == NULL) - return -ENOMEM; - - memset(fi, 0, sizeof(struct file_info)); - fi->notification = (u8) RAW1394_NOTIFY_ON; /* busreset notification */ - - INIT_LIST_HEAD(&fi->list); - fi->state = opened; - INIT_LIST_HEAD(&fi->req_pending); - INIT_LIST_HEAD(&fi->req_complete); - sema_init(&fi->complete_sem, 0); - spin_lock_init(&fi->reqlists_lock); - init_waitqueue_head(&fi->poll_wait_complete); - INIT_LIST_HEAD(&fi->addr_list); + INIT_LIST_HEAD(&fi->list); + fi->state = opened; + INIT_LIST_HEAD(&fi->req_pending); + INIT_LIST_HEAD(&fi->req_complete); + sema_init(&fi->complete_sem, 0); + spin_lock_init(&fi->reqlists_lock); + init_waitqueue_head(&fi->poll_wait_complete); + INIT_LIST_HEAD(&fi->addr_list); - file->private_data = fi; + file->private_data = fi; - return 0; + return 0; } static int raw1394_release(struct inode *inode, struct file *file) { - struct file_info *fi = file->private_data; - struct list_head *lh; - struct pending_request *req; - int done = 0, i, fail = 0; - int retval = 0; - struct list_head *entry; - struct arm_addr *addr = NULL; - struct host_info *hi; - struct file_info *fi_hlp = NULL; - struct arm_addr *arm_addr = NULL; - int another_host; + struct file_info *fi = file->private_data; + struct list_head *lh; + struct pending_request *req; + int done = 0, i, fail = 0; + int retval = 0; + struct list_head *entry; + struct arm_addr *addr = NULL; + struct host_info *hi; + struct file_info *fi_hlp = NULL; + struct arm_addr *arm_addr = NULL; + int another_host; int csr_mod = 0; if (fi->iso_state != RAW1394_ISO_INACTIVE) raw1394_iso_shutdown(fi); - for (i = 0; i < 64; i++) { - if (fi->listen_channels & (1ULL << i)) { - hpsb_unlisten_channel(&raw1394_highlevel, fi->host, i); - } - } - - spin_lock_irq(&host_info_lock); - fi->listen_channels = 0; - spin_unlock_irq(&host_info_lock); - - fail = 0; - /* set address-entries invalid */ - spin_lock_irq(&host_info_lock); - - while (!list_empty(&fi->addr_list)) { - another_host = 0; - lh = fi->addr_list.next; - addr = list_entry(lh, struct arm_addr, addr_list); - /* another host with valid address-entry containing - same addressrange? */ - list_for_each_entry(hi, &host_info_list, list) { - if (hi->host != fi->host) { - list_for_each_entry(fi_hlp, &hi->file_info_list, list) { - entry = fi_hlp->addr_list.next; - while (entry != &(fi_hlp->addr_list)) { - arm_addr = list_entry(entry, - struct arm_addr, addr_list); - if (arm_addr->start == - addr->start) { - DBGMSG("raw1394_release: " - "another host ownes " - "same addressrange"); - another_host = 1; - break; - } - entry = entry->next; - } - if (another_host) { - break; - } - } - } - } - if (!another_host) { - DBGMSG("raw1394_release: call hpsb_arm_unregister"); - retval = hpsb_unregister_addrspace(&raw1394_highlevel, fi->host, addr->start); - if (!retval) { - ++fail; - printk(KERN_ERR "raw1394_release arm_Unregister failed\n"); - } - } - DBGMSG("raw1394_release: delete addr_entry from list"); - list_del(&addr->addr_list); - vfree(addr->addr_space_buffer); - kfree(addr); - } /* while */ - spin_unlock_irq(&host_info_lock); - if (fail > 0) { - printk(KERN_ERR "raw1394: during addr_list-release " - "error(s) occurred \n"); - } - - while (!done) { - spin_lock_irq(&fi->reqlists_lock); - - while (!list_empty(&fi->req_complete)) { - lh = fi->req_complete.next; - list_del(lh); - - req = list_entry(lh, struct pending_request, list); - - free_pending_request(req); - } + for (i = 0; i < 64; i++) { + if (fi->listen_channels & (1ULL << i)) { + hpsb_unlisten_channel(&raw1394_highlevel, fi->host, i); + } + } + + spin_lock_irq(&host_info_lock); + fi->listen_channels = 0; + spin_unlock_irq(&host_info_lock); + + fail = 0; + /* set address-entries invalid */ + spin_lock_irq(&host_info_lock); + + while (!list_empty(&fi->addr_list)) { + another_host = 0; + lh = fi->addr_list.next; + addr = list_entry(lh, struct arm_addr, addr_list); + /* another host with valid address-entry containing + same addressrange? */ + list_for_each_entry(hi, &host_info_list, list) { + if (hi->host != fi->host) { + list_for_each_entry(fi_hlp, &hi->file_info_list, + list) { + entry = fi_hlp->addr_list.next; + while (entry != &(fi_hlp->addr_list)) { + arm_addr = list_entry(entry, struct + arm_addr, + addr_list); + if (arm_addr->start == + addr->start) { + DBGMSG + ("raw1394_release: " + "another host ownes " + "same addressrange"); + another_host = 1; + break; + } + entry = entry->next; + } + if (another_host) { + break; + } + } + } + } + if (!another_host) { + DBGMSG("raw1394_release: call hpsb_arm_unregister"); + retval = + hpsb_unregister_addrspace(&raw1394_highlevel, + fi->host, addr->start); + if (!retval) { + ++fail; + printk(KERN_ERR + "raw1394_release arm_Unregister failed\n"); + } + } + DBGMSG("raw1394_release: delete addr_entry from list"); + list_del(&addr->addr_list); + vfree(addr->addr_space_buffer); + kfree(addr); + } /* while */ + spin_unlock_irq(&host_info_lock); + if (fail > 0) { + printk(KERN_ERR "raw1394: during addr_list-release " + "error(s) occurred \n"); + } + + while (!done) { + spin_lock_irq(&fi->reqlists_lock); + + while (!list_empty(&fi->req_complete)) { + lh = fi->req_complete.next; + list_del(lh); + + req = list_entry(lh, struct pending_request, list); - if (list_empty(&fi->req_pending)) done = 1; + free_pending_request(req); + } - spin_unlock_irq(&fi->reqlists_lock); + if (list_empty(&fi->req_pending)) + done = 1; - if (!done) down_interruptible(&fi->complete_sem); - } + spin_unlock_irq(&fi->reqlists_lock); + + if (!done) + down_interruptible(&fi->complete_sem); + } /* Remove any sub-trees left by user space programs */ for (i = 0; i < RAW1394_MAX_USER_CSR_DIRS; i++) { struct csr1212_dentry *dentry; - if (!fi->csr1212_dirs[i]) continue; - for (dentry = fi->csr1212_dirs[i]->value.directory.dentries_head; - dentry; dentry = dentry->next) { - csr1212_detach_keyval_from_directory(fi->host->csr.rom->root_kv, dentry->kv); + if (!fi->csr1212_dirs[i]) + continue; + for (dentry = + fi->csr1212_dirs[i]->value.directory.dentries_head; dentry; + dentry = dentry->next) { + csr1212_detach_keyval_from_directory(fi->host->csr.rom-> + root_kv, + dentry->kv); } csr1212_release_keyval(fi->csr1212_dirs[i]); fi->csr1212_dirs[i] = NULL; csr_mod = 1; } - if ((csr_mod || fi->cfgrom_upd) && hpsb_update_config_rom_image(fi->host) < 0) - HPSB_ERR("Failed to generate Configuration ROM image for host %d", fi->host->id); - - if (fi->state == connected) { - spin_lock_irq(&host_info_lock); - list_del(&fi->list); - spin_unlock_irq(&host_info_lock); + if ((csr_mod || fi->cfgrom_upd) + && hpsb_update_config_rom_image(fi->host) < 0) + HPSB_ERR + ("Failed to generate Configuration ROM image for host %d", + fi->host->id); + + if (fi->state == connected) { + spin_lock_irq(&host_info_lock); + list_del(&fi->list); + spin_unlock_irq(&host_info_lock); put_device(&fi->host->device); - } + } - kfree(fi); + kfree(fi); - return 0; + return 0; } - /*** HOTPLUG STUFF **********************************************************/ /* * Export information about protocols/devices supported by this driver. */ static struct ieee1394_device_id raw1394_id_table[] = { { - .match_flags = IEEE1394_MATCH_SPECIFIER_ID | IEEE1394_MATCH_VERSION, - .specifier_id = AVC_UNIT_SPEC_ID_ENTRY & 0xffffff, - .version = AVC_SW_VERSION_ENTRY & 0xffffff - }, + .match_flags = IEEE1394_MATCH_SPECIFIER_ID | IEEE1394_MATCH_VERSION, + .specifier_id = AVC_UNIT_SPEC_ID_ENTRY & 0xffffff, + .version = AVC_SW_VERSION_ENTRY & 0xffffff}, + { + .match_flags = IEEE1394_MATCH_SPECIFIER_ID | IEEE1394_MATCH_VERSION, + .specifier_id = CAMERA_UNIT_SPEC_ID_ENTRY & 0xffffff, + .version = CAMERA_SW_VERSION_ENTRY & 0xffffff}, { - .match_flags = IEEE1394_MATCH_SPECIFIER_ID | IEEE1394_MATCH_VERSION, - .specifier_id = CAMERA_UNIT_SPEC_ID_ENTRY & 0xffffff, - .version = CAMERA_SW_VERSION_ENTRY & 0xffffff - }, - { } + .match_flags = IEEE1394_MATCH_SPECIFIER_ID | IEEE1394_MATCH_VERSION, + .specifier_id = CAMERA_UNIT_SPEC_ID_ENTRY & 0xffffff, + .version = (CAMERA_SW_VERSION_ENTRY + 1) & 0xffffff}, + { + .match_flags = IEEE1394_MATCH_SPECIFIER_ID | IEEE1394_MATCH_VERSION, + .specifier_id = CAMERA_UNIT_SPEC_ID_ENTRY & 0xffffff, + .version = (CAMERA_SW_VERSION_ENTRY + 2) & 0xffffff}, + {} }; MODULE_DEVICE_TABLE(ieee1394, raw1394_id_table); static struct hpsb_protocol_driver raw1394_driver = { - .name = "raw1394 Driver", - .id_table = raw1394_id_table, - .driver = { - .name = "raw1394", - .bus = &ieee1394_bus_type, - }, + .name = "raw1394 Driver", + .id_table = raw1394_id_table, + .driver = { + .name = "raw1394", + .bus = &ieee1394_bus_type, + }, }; - /******************************************************************************/ - static struct hpsb_highlevel raw1394_highlevel = { - .name = RAW1394_DEVICE_NAME, - .add_host = add_host, - .remove_host = remove_host, - .host_reset = host_reset, - .iso_receive = iso_receive, - .fcp_request = fcp_request, + .name = RAW1394_DEVICE_NAME, + .add_host = add_host, + .remove_host = remove_host, + .host_reset = host_reset, + .iso_receive = iso_receive, + .fcp_request = fcp_request, }; static struct cdev raw1394_cdev; static struct file_operations raw1394_fops = { - .owner = THIS_MODULE, - .read = raw1394_read, - .write = raw1394_write, - .mmap = raw1394_mmap, - .ioctl = raw1394_ioctl, - .poll = raw1394_poll, - .open = raw1394_open, - .release = raw1394_release, + .owner = THIS_MODULE, + .read = raw1394_read, + .write = raw1394_write, + .mmap = raw1394_mmap, + .ioctl = raw1394_ioctl, + .poll = raw1394_poll, + .open = raw1394_open, + .release = raw1394_release, }; static int __init init_raw1394(void) { - int ret; + int ret = 0; hpsb_register_highlevel(&raw1394_highlevel); - devfs_mk_cdev(MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16), - S_IFCHR | S_IRUSR | S_IWUSR, RAW1394_DEVICE_NAME); + if (IS_ERR(class_simple_device_add(hpsb_protocol_class, MKDEV( + IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16), + NULL, RAW1394_DEVICE_NAME))) { + ret = -EFAULT; + goto out_unreg; + } + + devfs_mk_cdev(MKDEV( + IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16), + S_IFCHR | S_IRUSR | S_IWUSR, RAW1394_DEVICE_NAME); cdev_init(&raw1394_cdev, &raw1394_fops); raw1394_cdev.owner = THIS_MODULE; kobject_set_name(&raw1394_cdev.kobj, RAW1394_DEVICE_NAME); ret = cdev_add(&raw1394_cdev, IEEE1394_RAW1394_DEV, 1); if (ret) { - HPSB_ERR("raw1394 failed to register minor device block"); - devfs_remove(RAW1394_DEVICE_NAME); - hpsb_unregister_highlevel(&raw1394_highlevel); - return ret; - } + HPSB_ERR("raw1394 failed to register minor device block"); + goto out_dev; + } - HPSB_INFO("raw1394: /dev/%s device initialized", RAW1394_DEVICE_NAME); + HPSB_INFO("raw1394: /dev/%s device initialized", RAW1394_DEVICE_NAME); ret = hpsb_register_protocol(&raw1394_driver); if (ret) { HPSB_ERR("raw1394: failed to register protocol"); cdev_del(&raw1394_cdev); - devfs_remove(RAW1394_DEVICE_NAME); - hpsb_unregister_highlevel(&raw1394_highlevel); - return ret; + goto out_dev; } - return 0; + goto out; + +out_dev: + devfs_remove(RAW1394_DEVICE_NAME); + class_simple_device_remove(MKDEV( + IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16)); +out_unreg: + hpsb_unregister_highlevel(&raw1394_highlevel); +out: + return ret; } static void __exit cleanup_raw1394(void) { + class_simple_device_remove(MKDEV( + IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16)); hpsb_unregister_protocol(&raw1394_driver); cdev_del(&raw1394_cdev); - devfs_remove(RAW1394_DEVICE_NAME); - hpsb_unregister_highlevel(&raw1394_highlevel); + devfs_remove(RAW1394_DEVICE_NAME); + hpsb_unregister_highlevel(&raw1394_highlevel); } module_init(init_raw1394); diff -Nru a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c --- a/drivers/ieee1394/sbp2.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/ieee1394/sbp2.c 2005-03-07 14:54:16 -08:00 @@ -64,7 +64,10 @@ #include #include -#include "../scsi/scsi.h" +#include +#include +#include +#include #include #include "csr1212.h" @@ -224,12 +227,12 @@ u32 status); static void sbp2scsi_complete_command(struct scsi_id_instance_data *scsi_id, - u32 scsi_status, Scsi_Cmnd *SCpnt, - void (*done)(Scsi_Cmnd *)); + u32 scsi_status, struct scsi_cmnd *SCpnt, + void (*done)(struct scsi_cmnd *)); -static Scsi_Host_Template scsi_driver_template; +static struct scsi_host_template scsi_driver_template; -const u8 sbp2_speedto_max_payload[] = { 0x7, 0x8, 0x9, 0xA, 0xB, 0xC }; +static const u8 sbp2_speedto_max_payload[] = { 0x7, 0x8, 0x9, 0xA, 0xB, 0xC }; static void sbp2_host_reset(struct hpsb_host *host); @@ -373,7 +376,7 @@ /* This is much like hpsb_node_write(), except it ignores the response * subaction and returns immediately. Can be used from interrupts. */ -int sbp2util_node_write_no_wait(struct node_entry *ne, u64 addr, +static int sbp2util_node_write_no_wait(struct node_entry *ne, u64 addr, quadlet_t *buffer, size_t length) { struct hpsb_packet *packet; @@ -520,8 +523,8 @@ */ static struct sbp2_command_info *sbp2util_allocate_command_orb( struct scsi_id_instance_data *scsi_id, - Scsi_Cmnd *Current_SCpnt, - void (*Current_done)(Scsi_Cmnd *)) + struct scsi_cmnd *Current_SCpnt, + void (*Current_done)(struct scsi_cmnd *)) { struct list_head *lh; struct sbp2_command_info *command = NULL; @@ -1521,8 +1524,9 @@ SBP2_DEBUG("sbp2_management_agent_addr = %x", (unsigned int) management_agent_addr); - } else + } else if (kv->key.type == CSR1212_KV_TYPE_IMMEDIATE) { scsi_id->sbp2_device_type_and_lun = kv->value.immediate; + } break; case SBP2_COMMAND_SET_SPEC_ID_KEY: @@ -1613,6 +1617,8 @@ scsi_id->sbp2_unit_characteristics = unit_characteristics; scsi_id->sbp2_firmware_revision = firmware_revision; scsi_id->workarounds = workarounds; + if (ud->flags & UNIT_DIRECTORY_HAS_LUN) + scsi_id->sbp2_device_type_and_lun = ud->lun; } } @@ -1700,14 +1706,14 @@ unsigned int scsi_use_sg, unsigned int scsi_request_bufflen, void *scsi_request_buffer, - unsigned char scsi_dir) + enum dma_data_direction dma_dir) + { struct sbp2scsi_host_info *hi = scsi_id->hi; struct scatterlist *sgpnt = (struct scatterlist *) scsi_request_buffer; struct sbp2_command_orb *command_orb = &command->command_orb; struct sbp2_unrestricted_page_table *scatter_gather_element = &command->scatter_gather_element[0]; - int dma_dir = scsi_to_pci_dma_dir (scsi_dir); u32 sg_count, sg_len, orb_direction; dma_addr_t sg_addr; int i; @@ -1730,22 +1736,22 @@ * Get the direction of the transfer. If the direction is unknown, then use our * goofy table as a back-up. */ - switch (scsi_dir) { - case SCSI_DATA_NONE: + switch (dma_dir) { + case DMA_NONE: orb_direction = ORB_DIRECTION_NO_DATA_TRANSFER; break; - case SCSI_DATA_WRITE: + case DMA_TO_DEVICE: orb_direction = ORB_DIRECTION_WRITE_TO_MEDIA; break; - case SCSI_DATA_READ: + case DMA_FROM_DEVICE: orb_direction = ORB_DIRECTION_READ_FROM_MEDIA; break; - case SCSI_DATA_UNKNOWN: + case DMA_BIDIRECTIONAL: default: SBP2_ERR("SCSI data transfer direction not specified. " "Update the SBP2 direction table in sbp2.h if " "necessary for your application"); - print_command (scsi_cmd); + __scsi_print_command(scsi_cmd); orb_direction = sbp2scsi_direction_table[*scsi_cmd]; break; } @@ -2031,7 +2037,8 @@ * This function is called in order to begin a regular SBP-2 command. */ static int sbp2_send_command(struct scsi_id_instance_data *scsi_id, - Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) + struct scsi_cmnd *SCpnt, + void (*done)(struct scsi_cmnd *)) { unchar *cmd = (unchar *) SCpnt->cmnd; unsigned int request_bufflen = SCpnt->request_bufflen; @@ -2040,7 +2047,7 @@ SBP2_DEBUG("sbp2_send_command"); #if (CONFIG_IEEE1394_SBP2_DEBUG >= 2) || defined(CONFIG_IEEE1394_SBP2_PACKET_DUMP) printk("[scsi command]\n "); - print_command (cmd); + scsi_print_command(SCpnt); #endif SBP2_DEBUG("SCSI transfer size = %x", request_bufflen); SBP2_DEBUG("SCSI s/g elements = %x", (unsigned int)SCpnt->use_sg); @@ -2233,7 +2240,7 @@ * response data translations for the SCSI stack */ static void sbp2_check_sbp2_response(struct scsi_id_instance_data *scsi_id, - Scsi_Cmnd *SCpnt) + struct scsi_cmnd *SCpnt) { u8 *scsi_buf = SCpnt->request_buffer; u8 device_type = SBP2_DEVICE_TYPE (scsi_id->sbp2_device_type_and_lun); @@ -2312,7 +2319,7 @@ struct sbp2scsi_host_info *hi; struct scsi_id_instance_data *scsi_id = NULL, *scsi_id_tmp; u32 id; - Scsi_Cmnd *SCpnt = NULL; + struct scsi_cmnd *SCpnt = NULL; u32 scsi_status = SBP2_SCSI_STATUS_GOOD; struct sbp2_command_info *command; @@ -2454,7 +2461,8 @@ * This routine is the main request entry routine for doing I/O. It is * called from the scsi stack directly. */ -static int sbp2scsi_queuecommand (Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) +static int sbp2scsi_queuecommand(struct scsi_cmnd *SCpnt, + void (*done)(struct scsi_cmnd *)) { struct scsi_id_instance_data *scsi_id = (struct scsi_id_instance_data *)SCpnt->device->host->hostdata[0]; @@ -2550,9 +2558,8 @@ PCI_DMA_BIDIRECTIONAL); sbp2util_mark_command_completed(scsi_id, command); if (command->Current_SCpnt) { - void (*done)(Scsi_Cmnd *) = command->Current_done; command->Current_SCpnt->result = status << 16; - done (command->Current_SCpnt); + command->Current_done(command->Current_SCpnt); } } @@ -2565,8 +2572,8 @@ * This can be called in interrupt context. */ static void sbp2scsi_complete_command(struct scsi_id_instance_data *scsi_id, - u32 scsi_status, Scsi_Cmnd *SCpnt, - void (*done)(Scsi_Cmnd *)) + u32 scsi_status, struct scsi_cmnd *SCpnt, + void (*done)(struct scsi_cmnd *)) { unsigned long flags; @@ -2611,8 +2618,8 @@ * Debug stuff */ #if CONFIG_IEEE1394_SBP2_DEBUG >= 1 - print_command (SCpnt->cmnd); - print_sense("bh", SCpnt); + scsi_print_command(SCpnt); + scsi_print_sense("bh", SCpnt); #endif break; @@ -2620,7 +2627,7 @@ case SBP2_SCSI_STATUS_SELECTION_TIMEOUT: SBP2_ERR("SBP2_SCSI_STATUS_SELECTION_TIMEOUT"); SCpnt->result = DID_NO_CONNECT << 16; - print_command (SCpnt->cmnd); + scsi_print_command(SCpnt); break; case SBP2_SCSI_STATUS_CONDITION_MET: @@ -2628,7 +2635,7 @@ case SBP2_SCSI_STATUS_COMMAND_TERMINATED: SBP2_ERR("Bad SCSI status = %x", scsi_status); SCpnt->result = DID_ERROR << 16; - print_command (SCpnt->cmnd); + scsi_print_command(SCpnt); break; default: @@ -2688,7 +2695,7 @@ * Called by scsi stack when something has really gone wrong. Usually * called when a command has timed-out for some reason. */ -static int sbp2scsi_abort (Scsi_Cmnd *SCpnt) +static int sbp2scsi_abort(struct scsi_cmnd *SCpnt) { struct scsi_id_instance_data *scsi_id = (struct scsi_id_instance_data *)SCpnt->device->host->hostdata[0]; @@ -2696,7 +2703,7 @@ struct sbp2_command_info *command; SBP2_ERR("aborting sbp2 command"); - print_command (SCpnt->cmnd); + scsi_print_command(SCpnt); if (scsi_id) { @@ -2717,9 +2724,8 @@ PCI_DMA_BIDIRECTIONAL); sbp2util_mark_command_completed(scsi_id, command); if (command->Current_SCpnt) { - void (*done)(Scsi_Cmnd *) = command->Current_done; command->Current_SCpnt->result = DID_ABORT << 16; - done (command->Current_SCpnt); + command->Current_done(command->Current_SCpnt); } } @@ -2736,7 +2742,7 @@ /* * Called by scsi stack when something has really gone wrong. */ -static int sbp2scsi_reset (Scsi_Cmnd *SCpnt) +static int sbp2scsi_reset(struct scsi_cmnd *SCpnt) { struct scsi_id_instance_data *scsi_id = (struct scsi_id_instance_data *)SCpnt->device->host->hostdata[0]; @@ -2789,7 +2795,7 @@ MODULE_LICENSE("GPL"); /* SCSI host template */ -static Scsi_Host_Template scsi_driver_template = { +static struct scsi_host_template scsi_driver_template = { .module = THIS_MODULE, .name = "SBP-2 IEEE-1394", .proc_name = SBP2_DEVICE_NAME, diff -Nru a/drivers/ieee1394/sbp2.h b/drivers/ieee1394/sbp2.h --- a/drivers/ieee1394/sbp2.h 2005-03-07 14:54:16 -08:00 +++ b/drivers/ieee1394/sbp2.h 2005-03-07 14:54:16 -08:00 @@ -324,8 +324,8 @@ struct list_head list; struct sbp2_command_orb command_orb ____cacheline_aligned; dma_addr_t command_orb_dma ____cacheline_aligned; - Scsi_Cmnd *Current_SCpnt; - void (*Current_done)(Scsi_Cmnd *); + struct scsi_cmnd *Current_SCpnt; + void (*Current_done)(struct scsi_cmnd *); /* Also need s/g structure for each sbp2 command */ struct sbp2_unrestricted_page_table scatter_gather_element[SG_ALL] ____cacheline_aligned; @@ -434,8 +434,8 @@ static struct sbp2_command_info *sbp2util_find_command_for_orb(struct scsi_id_instance_data *scsi_id, dma_addr_t orb); static struct sbp2_command_info *sbp2util_find_command_for_SCpnt(struct scsi_id_instance_data *scsi_id, void *SCpnt); static struct sbp2_command_info *sbp2util_allocate_command_orb(struct scsi_id_instance_data *scsi_id, - Scsi_Cmnd *Current_SCpnt, - void (*Current_done)(Scsi_Cmnd *)); + struct scsi_cmnd *Current_SCpnt, + void (*Current_done)(struct scsi_cmnd *)); static void sbp2util_mark_command_completed(struct scsi_id_instance_data *scsi_id, struct sbp2_command_info *command); @@ -466,14 +466,16 @@ unsigned int scsi_use_sg, unsigned int scsi_request_bufflen, void *scsi_request_buffer, - unsigned char scsi_dir); + enum dma_data_direction dma_dir); static int sbp2_link_orb_command(struct scsi_id_instance_data *scsi_id, struct sbp2_command_info *command); static int sbp2_send_command(struct scsi_id_instance_data *scsi_id, - Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)); + struct scsi_cmnd *SCpnt, + void (*done)(struct scsi_cmnd *)); static unsigned int sbp2_status_to_sense_data(unchar *sbp2_status, unchar *sense_data); static void sbp2_check_sbp2_command(struct scsi_id_instance_data *scsi_id, unchar *cmd); -static void sbp2_check_sbp2_response(struct scsi_id_instance_data *scsi_id, Scsi_Cmnd *SCpnt); +static void sbp2_check_sbp2_response(struct scsi_id_instance_data *scsi_id, + struct scsi_cmnd *SCpnt); static void sbp2_parse_unit_directory(struct scsi_id_instance_data *scsi_id, struct unit_directory *ud); static int sbp2_set_busy_timeout(struct scsi_id_instance_data *scsi_id); diff -Nru a/drivers/ieee1394/video1394.c b/drivers/ieee1394/video1394.c --- a/drivers/ieee1394/video1394.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/ieee1394/video1394.c 2005-03-07 14:54:16 -08:00 @@ -16,14 +16,25 @@ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * NOTES: + * + * jds -- add private data to file to keep track of iso contexts associated + * with each open -- so release won't kill all iso transfers. + * + * Damien Douxchamps: Fix failure when the number of DMA pages per frame is + * one. + * + * ioctl return codes: + * EFAULT is only for invalid address for the argp + * EINVAL for out of range values + * EBUSY when trying to use an already used resource + * ESRCH when trying to free/stop a not used resource + * EAGAIN for resource allocation failure that could perhaps succeed later + * ENOTTY for unsupported ioctl request + * */ -/* jds -- add private data to file to keep track of iso contexts associated - with each open -- so release won't kill all iso transfers */ - -/* Damien Douxchamps: Fix failure when the number of DMA pages per frame is - one */ - #include #include #include @@ -146,8 +157,8 @@ #define PRINT(level, card, fmt, args...) \ printk(level "video1394_%d: " fmt "\n" , card , ## args) -void wakeup_dma_ir_ctx(unsigned long l); -void wakeup_dma_it_ctx(unsigned long l); +static void wakeup_dma_ir_ctx(unsigned long l); +static void wakeup_dma_it_ctx(unsigned long l); static struct hpsb_highlevel video1394_highlevel; @@ -487,7 +498,7 @@ return NULL; } -void wakeup_dma_ir_ctx(unsigned long l) +static void wakeup_dma_ir_ctx(unsigned long l) { struct dma_iso_ctx *d = (struct dma_iso_ctx *) l; int i; @@ -560,7 +571,7 @@ #endif } -void wakeup_dma_it_ctx(unsigned long l) +static void wakeup_dma_it_ctx(unsigned long l) { struct dma_iso_ctx *d = (struct dma_iso_ctx *) l; struct ti_ohci *ohci = d->ohci; @@ -723,7 +734,12 @@ /* if channel < 0, find lowest available one */ if (v.channel < 0) { mask = (u64)0x1; - for (i=0; ihost->id, + "No free channel found"); + return EAGAIN; + } if (!(ohci->ISO_channel_usage & mask)) { v.channel = i; PRINT(KERN_INFO, ohci->host->id, "Found free channel %d", i); @@ -731,42 +747,40 @@ } mask = mask << 1; } - } - - if (v.channel<0 || v.channel>(ISO_CHANNELS-1)) { + } else if (v.channel >= ISO_CHANNELS) { PRINT(KERN_ERR, ohci->host->id, "Iso channel %d out of bounds", v.channel); - return -EFAULT; + return -EINVAL; + } else { + mask = (u64)0x1<>32),(u32)(mask&0xffffffff), - (u32)(ohci->ISO_channel_usage>>32), - (u32)(ohci->ISO_channel_usage&0xffffffff)); + PRINT(KERN_INFO, ohci->host->id, "mask: %08X%08X usage: %08X%08X\n", + (u32)(mask>>32),(u32)(mask&0xffffffff), + (u32)(ohci->ISO_channel_usage>>32), + (u32)(ohci->ISO_channel_usage&0xffffffff)); if (ohci->ISO_channel_usage & mask) { PRINT(KERN_ERR, ohci->host->id, "Channel %d is already taken", v.channel); - return -EFAULT; + return -EBUSY; } - ohci->ISO_channel_usage |= mask; if (v.buf_size == 0 || v.buf_size > VIDEO1394_MAX_SIZE) { PRINT(KERN_ERR, ohci->host->id, "Invalid %d length buffer requested",v.buf_size); - return -EFAULT; + return -EINVAL; } if (v.nb_buffers == 0 || v.nb_buffers > VIDEO1394_MAX_SIZE) { PRINT(KERN_ERR, ohci->host->id, "Invalid %d buffers requested",v.nb_buffers); - return -EFAULT; + return -EINVAL; } if (v.nb_buffers * v.buf_size > VIDEO1394_MAX_SIZE) { PRINT(KERN_ERR, ohci->host->id, "%d buffers of size %d bytes is too big", v.nb_buffers, v.buf_size); - return -EFAULT; + return -EINVAL; } if (cmd == VIDEO1394_IOC_LISTEN_CHANNEL) { @@ -777,7 +791,7 @@ if (d == NULL) { PRINT(KERN_ERR, ohci->host->id, "Couldn't allocate ir context"); - return -EFAULT; + return -EAGAIN; } initialize_dma_ir_ctx(d, v.sync_tag, v.flags); @@ -798,7 +812,7 @@ if (d == NULL) { PRINT(KERN_ERR, ohci->host->id, "Couldn't allocate it context"); - return -EFAULT; + return -EAGAIN; } initialize_dma_it_ctx(d, v.sync_tag, v.syt_offset, v.flags); @@ -814,8 +828,12 @@ v.channel); } - if (copy_to_user(argp, &v, sizeof(v))) + if (copy_to_user((void *)arg, &v, sizeof(v))) { + /* FIXME : free allocated dma resources */ return -EFAULT; + } + + ohci->ISO_channel_usage |= mask; return 0; } @@ -829,16 +847,16 @@ if (copy_from_user(&channel, argp, sizeof(int))) return -EFAULT; - if (channel<0 || channel>(ISO_CHANNELS-1)) { + if (channel < 0 || channel >= ISO_CHANNELS) { PRINT(KERN_ERR, ohci->host->id, "Iso channel %d out of bound", channel); - return -EFAULT; + return -EINVAL; } mask = (u64)0x1<ISO_channel_usage & mask)) { PRINT(KERN_ERR, ohci->host->id, "Channel %d is not being used", channel); - return -EFAULT; + return -ESRCH; } /* Mark this channel as unused */ @@ -849,7 +867,7 @@ else d = find_ctx(&ctx->context_list, OHCI_ISO_TRANSMIT, channel); - if (d == NULL) return -EFAULT; + if (d == NULL) return -ESRCH; PRINT(KERN_INFO, ohci->host->id, "Iso context %d " "stop talking on channel %d", d->ctx, channel); free_dma_iso_ctx(d); @@ -870,7 +888,7 @@ if ((v.buffer<0) || (v.buffer>d->num_desc)) { PRINT(KERN_ERR, ohci->host->id, "Buffer %d out of range",v.buffer); - return -EFAULT; + return -EINVAL; } spin_lock_irqsave(&d->lock,flags); @@ -879,7 +897,7 @@ PRINT(KERN_ERR, ohci->host->id, "Buffer %d is already used",v.buffer); spin_unlock_irqrestore(&d->lock,flags); - return -EFAULT; + return -EBUSY; } d->buffer_status[v.buffer]=VIDEO1394_BUFFER_QUEUED; @@ -933,7 +951,7 @@ if ((v.buffer<0) || (v.buffer>d->num_desc)) { PRINT(KERN_ERR, ohci->host->id, "Buffer %d out of range",v.buffer); - return -EFAULT; + return -EINVAL; } /* @@ -976,7 +994,7 @@ PRINT(KERN_ERR, ohci->host->id, "Buffer %d is not queued",v.buffer); spin_unlock_irqrestore(&d->lock, flags); - return -EFAULT; + return -ESRCH; } /* set time of buffer */ @@ -1015,7 +1033,7 @@ if ((v.buffer<0) || (v.buffer>d->num_desc)) { PRINT(KERN_ERR, ohci->host->id, "Buffer %d out of range",v.buffer); - return -EFAULT; + return -EINVAL; } if (d->flags & VIDEO1394_VARIABLE_PACKET_SIZE) { @@ -1044,7 +1062,7 @@ spin_unlock_irqrestore(&d->lock,flags); if (psizes) kfree(psizes); - return -EFAULT; + return -EBUSY; } if (d->flags & VIDEO1394_VARIABLE_PACKET_SIZE) { @@ -1118,7 +1136,7 @@ if ((v.buffer<0) || (v.buffer>d->num_desc)) { PRINT(KERN_ERR, ohci->host->id, "Buffer %d out of range",v.buffer); - return -EFAULT; + return -EINVAL; } switch(d->buffer_status[v.buffer]) { @@ -1144,11 +1162,11 @@ default: PRINT(KERN_ERR, ohci->host->id, "Buffer %d is not queued",v.buffer); - return -EFAULT; + return -ESRCH; } } default: - return -EINVAL; + return -ENOTTY; } } @@ -1170,7 +1188,7 @@ * But e.g. pte_alloc() does not work in modules ... :-( */ -int video1394_mmap(struct file *file, struct vm_area_struct *vma) +static int video1394_mmap(struct file *file, struct vm_area_struct *vma) { struct file_ctx *ctx = (struct file_ctx *)file->private_data; int res = -EINVAL; @@ -1269,6 +1287,16 @@ .specifier_id = CAMERA_UNIT_SPEC_ID_ENTRY & 0xffffff, .version = CAMERA_SW_VERSION_ENTRY & 0xffffff }, + { + .match_flags = IEEE1394_MATCH_SPECIFIER_ID | IEEE1394_MATCH_VERSION, + .specifier_id = CAMERA_UNIT_SPEC_ID_ENTRY & 0xffffff, + .version = (CAMERA_SW_VERSION_ENTRY + 1) & 0xffffff + }, + { + .match_flags = IEEE1394_MATCH_SPECIFIER_ID | IEEE1394_MATCH_VERSION, + .specifier_id = CAMERA_UNIT_SPEC_ID_ENTRY & 0xffffff, + .version = (CAMERA_SW_VERSION_ENTRY + 2) & 0xffffff + }, { } }; @@ -1304,6 +1332,9 @@ hpsb_set_hostinfo_key(&video1394_highlevel, host, ohci->host->id); minor = IEEE1394_MINOR_BLOCK_VIDEO1394 * 16 + ohci->host->id; + class_simple_device_add(hpsb_protocol_class, MKDEV( + IEEE1394_MAJOR, minor), + NULL, "%s-%d", VIDEO1394_DRIVER_NAME, ohci->host->id); devfs_mk_cdev(MKDEV(IEEE1394_MAJOR, minor), S_IFCHR | S_IRUSR | S_IWUSR, "%s/%d", VIDEO1394_DRIVER_NAME, ohci->host->id); @@ -1314,9 +1345,12 @@ { struct ti_ohci *ohci = hpsb_get_hostinfo(&video1394_highlevel, host); - if (ohci) + if (ohci) { + class_simple_device_remove(MKDEV(IEEE1394_MAJOR, + IEEE1394_MINOR_BLOCK_VIDEO1394 * 16 + ohci->host->id)); devfs_remove("%s/%d", VIDEO1394_DRIVER_NAME, ohci->host->id); - + } + return; } diff -Nru a/drivers/infiniband/core/agent.c b/drivers/infiniband/core/agent.c --- a/drivers/infiniband/core/agent.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/infiniband/core/agent.c 2005-03-07 14:54:17 -08:00 @@ -45,14 +45,11 @@ #include "smi.h" #include "agent_priv.h" #include "mad_priv.h" - +#include "agent.h" spinlock_t ib_agent_port_list_lock; static LIST_HEAD(ib_agent_port_list); -extern kmem_cache_t *ib_mad_cache; - - /* * Caller must hold ib_agent_port_list_lock */ @@ -66,14 +63,13 @@ if (device) { list_for_each_entry(entry, &ib_agent_port_list, port_list) { - if (entry->dr_smp_agent->device == device && + if (entry->smp_agent->device == device && entry->port_num == port_num) return entry; } } else { list_for_each_entry(entry, &ib_agent_port_list, port_list) { - if ((entry->dr_smp_agent == mad_agent) || - (entry->lr_smp_agent == mad_agent) || + if ((entry->smp_agent == mad_agent) || (entry->perf_mgmt_agent == mad_agent)) return entry; } @@ -111,7 +107,7 @@ return 1; } - return smi_check_local_smp(port_priv->dr_smp_agent, smp); + return smi_check_local_smp(port_priv->smp_agent, smp); } static int agent_mad_send(struct ib_mad_agent *mad_agent, @@ -231,10 +227,8 @@ /* Get mad agent based on mgmt_class in MAD */ switch (mad->mad.mad.mad_hdr.mgmt_class) { case IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE: - mad_agent = port_priv->dr_smp_agent; - break; case IB_MGMT_CLASS_SUBN_LID_ROUTED: - mad_agent = port_priv->lr_smp_agent; + mad_agent = port_priv->smp_agent; break; case IB_MGMT_CLASS_PERF_MGMT: mad_agent = port_priv->perf_mgmt_agent; @@ -284,7 +278,6 @@ { int ret; struct ib_agent_port_private *port_priv; - struct ib_mad_reg_req reg_req; unsigned long flags; /* First, check if port already open for SMI */ @@ -308,35 +301,19 @@ spin_lock_init(&port_priv->send_list_lock); INIT_LIST_HEAD(&port_priv->send_posted_list); - /* Obtain MAD agent for directed route SM class */ - reg_req.mgmt_class = IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE; - reg_req.mgmt_class_version = 1; - - port_priv->dr_smp_agent = ib_register_mad_agent(device, port_num, - IB_QPT_SMI, - NULL, 0, - &agent_send_handler, - NULL, NULL); + /* Obtain send only MAD agent for SM class (SMI QP) */ + port_priv->smp_agent = ib_register_mad_agent(device, port_num, + IB_QPT_SMI, + NULL, 0, + &agent_send_handler, + NULL, NULL); - if (IS_ERR(port_priv->dr_smp_agent)) { - ret = PTR_ERR(port_priv->dr_smp_agent); + if (IS_ERR(port_priv->smp_agent)) { + ret = PTR_ERR(port_priv->smp_agent); goto error2; } - /* Obtain MAD agent for LID routed SM class */ - reg_req.mgmt_class = IB_MGMT_CLASS_SUBN_LID_ROUTED; - port_priv->lr_smp_agent = ib_register_mad_agent(device, port_num, - IB_QPT_SMI, - NULL, 0, - &agent_send_handler, - NULL, NULL); - if (IS_ERR(port_priv->lr_smp_agent)) { - ret = PTR_ERR(port_priv->lr_smp_agent); - goto error3; - } - - /* Obtain MAD agent for PerfMgmt class */ - reg_req.mgmt_class = IB_MGMT_CLASS_PERF_MGMT; + /* Obtain send only MAD agent for PerfMgmt class (GSI QP) */ port_priv->perf_mgmt_agent = ib_register_mad_agent(device, port_num, IB_QPT_GSI, NULL, 0, @@ -344,15 +321,15 @@ NULL, NULL); if (IS_ERR(port_priv->perf_mgmt_agent)) { ret = PTR_ERR(port_priv->perf_mgmt_agent); - goto error4; + goto error3; } - port_priv->mr = ib_get_dma_mr(port_priv->dr_smp_agent->qp->pd, + port_priv->mr = ib_get_dma_mr(port_priv->smp_agent->qp->pd, IB_ACCESS_LOCAL_WRITE); if (IS_ERR(port_priv->mr)) { printk(KERN_ERR SPFX "Couldn't get DMA MR\n"); ret = PTR_ERR(port_priv->mr); - goto error5; + goto error4; } spin_lock_irqsave(&ib_agent_port_list_lock, flags); @@ -361,12 +338,10 @@ return 0; -error5: - ib_unregister_mad_agent(port_priv->perf_mgmt_agent); error4: - ib_unregister_mad_agent(port_priv->lr_smp_agent); + ib_unregister_mad_agent(port_priv->perf_mgmt_agent); error3: - ib_unregister_mad_agent(port_priv->dr_smp_agent); + ib_unregister_mad_agent(port_priv->smp_agent); error2: kfree(port_priv); error1: @@ -391,8 +366,7 @@ ib_dereg_mr(port_priv->mr); ib_unregister_mad_agent(port_priv->perf_mgmt_agent); - ib_unregister_mad_agent(port_priv->lr_smp_agent); - ib_unregister_mad_agent(port_priv->dr_smp_agent); + ib_unregister_mad_agent(port_priv->smp_agent); kfree(port_priv); return 0; diff -Nru a/drivers/infiniband/core/agent_priv.h b/drivers/infiniband/core/agent_priv.h --- a/drivers/infiniband/core/agent_priv.h 2005-03-07 14:54:18 -08:00 +++ b/drivers/infiniband/core/agent_priv.h 2005-03-07 14:54:18 -08:00 @@ -55,8 +55,7 @@ struct list_head send_posted_list; spinlock_t send_list_lock; int port_num; - struct ib_mad_agent *dr_smp_agent; /* DR SM class */ - struct ib_mad_agent *lr_smp_agent; /* LR SM class */ + struct ib_mad_agent *smp_agent; /* SM class */ struct ib_mad_agent *perf_mgmt_agent; /* PerfMgmt class */ struct ib_mr *mr; }; diff -Nru a/drivers/infiniband/core/cache.c b/drivers/infiniband/core/cache.c --- a/drivers/infiniband/core/cache.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/infiniband/core/cache.c 2005-03-07 14:54:17 -08:00 @@ -37,6 +37,8 @@ #include #include +#include + #include "core_priv.h" struct ib_pkey_cache { @@ -112,7 +114,7 @@ cache = device->cache.gid_cache[p]; for (i = 0; i < cache->table_len; ++i) { if (!memcmp(gid, &cache->table[i], sizeof *gid)) { - *port_num = p; + *port_num = p + start_port(device); if (index) *index = i; ret = 0; diff -Nru a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c --- a/drivers/infiniband/core/mad.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/infiniband/core/mad.c 2005-03-07 14:54:18 -08:00 @@ -41,7 +41,6 @@ #include "smi.h" #include "agent.h" - MODULE_LICENSE("Dual BSD/GPL"); MODULE_DESCRIPTION("kernel IB MAD API"); MODULE_AUTHOR("Hal Rosenstock"); @@ -69,6 +68,7 @@ static void ib_mad_complete_send_wr(struct ib_mad_send_wr_private *mad_send_wr, struct ib_mad_send_wc *mad_send_wc); static void timeout_sends(void *data); +static void cancel_sends(void *data); static void local_completions(void *data); static int solicited_mad(struct ib_mad *mad); static int add_nonoui_reg_req(struct ib_mad_reg_req *mad_reg_req, @@ -342,6 +342,8 @@ INIT_LIST_HEAD(&mad_agent_priv->local_list); INIT_WORK(&mad_agent_priv->local_work, local_completions, mad_agent_priv); + INIT_LIST_HEAD(&mad_agent_priv->canceled_list); + INIT_WORK(&mad_agent_priv->canceled_work, cancel_sends, mad_agent_priv); atomic_set(&mad_agent_priv->refcount, 1); init_waitqueue_head(&mad_agent_priv->wait); @@ -490,6 +492,7 @@ cancel_mads(mad_agent_priv); port_priv = mad_agent_priv->qp_info->port_priv; + cancel_delayed_work(&mad_agent_priv->timed_work); flush_workqueue(port_priv->wq); @@ -1266,12 +1269,12 @@ } port_priv = agent_priv->qp_info->port_priv; + mgmt_class = convert_mgmt_class(agent_priv->reg_req->mgmt_class); class = port_priv->version[ agent_priv->reg_req->mgmt_class_version].class; if (!class) goto vendor_check; - mgmt_class = convert_mgmt_class(agent_priv->reg_req->mgmt_class); method = class->method_table[mgmt_class]; if (method) { /* Remove any methods for this mad agent */ @@ -1293,16 +1296,21 @@ } vendor_check: + if (!is_vendor_class(mgmt_class)) + goto out; + + /* normalize mgmt_class to vendor range 2 */ + mgmt_class = vendor_class_index(agent_priv->reg_req->mgmt_class); vendor = port_priv->version[ agent_priv->reg_req->mgmt_class_version].vendor; + if (!vendor) goto out; - mgmt_class = vendor_class_index(agent_priv->reg_req->mgmt_class); vendor_class = vendor->vendor_class[mgmt_class]; if (vendor_class) { index = find_vendor_oui(vendor_class, agent_priv->reg_req->oui); - if (index == -1) + if (index < 0) goto out; method = vendor_class->method_table[index]; if (method) { @@ -1999,12 +2007,44 @@ return NULL; } +void cancel_sends(void *data) +{ + struct ib_mad_agent_private *mad_agent_priv; + struct ib_mad_send_wr_private *mad_send_wr; + struct ib_mad_send_wc mad_send_wc; + unsigned long flags; + + mad_agent_priv = data; + + mad_send_wc.status = IB_WC_WR_FLUSH_ERR; + mad_send_wc.vendor_err = 0; + + spin_lock_irqsave(&mad_agent_priv->lock, flags); + while (!list_empty(&mad_agent_priv->canceled_list)) { + mad_send_wr = list_entry(mad_agent_priv->canceled_list.next, + struct ib_mad_send_wr_private, + agent_list); + + list_del(&mad_send_wr->agent_list); + spin_unlock_irqrestore(&mad_agent_priv->lock, flags); + + mad_send_wc.wr_id = mad_send_wr->wr_id; + mad_agent_priv->agent.send_handler(&mad_agent_priv->agent, + &mad_send_wc); + + kfree(mad_send_wr); + if (atomic_dec_and_test(&mad_agent_priv->refcount)) + wake_up(&mad_agent_priv->wait); + spin_lock_irqsave(&mad_agent_priv->lock, flags); + } + spin_unlock_irqrestore(&mad_agent_priv->lock, flags); +} + void ib_cancel_mad(struct ib_mad_agent *mad_agent, u64 wr_id) { struct ib_mad_agent_private *mad_agent_priv; struct ib_mad_send_wr_private *mad_send_wr; - struct ib_mad_send_wc mad_send_wc; unsigned long flags; mad_agent_priv = container_of(mad_agent, struct ib_mad_agent_private, @@ -2026,19 +2066,12 @@ } list_del(&mad_send_wr->agent_list); + list_add_tail(&mad_send_wr->agent_list, &mad_agent_priv->canceled_list); adjust_timeout(mad_agent_priv); spin_unlock_irqrestore(&mad_agent_priv->lock, flags); - mad_send_wc.status = IB_WC_WR_FLUSH_ERR; - mad_send_wc.vendor_err = 0; - mad_send_wc.wr_id = mad_send_wr->wr_id; - mad_agent_priv->agent.send_handler(&mad_agent_priv->agent, - &mad_send_wc); - - kfree(mad_send_wr); - if (atomic_dec_and_test(&mad_agent_priv->refcount)) - wake_up(&mad_agent_priv->wait); - + queue_work(mad_agent_priv->qp_info->port_priv->wq, + &mad_agent_priv->canceled_work); out: return; } @@ -2186,7 +2219,6 @@ recv_wr.next = NULL; recv_wr.sg_list = &sg_list; recv_wr.num_sge = 1; - recv_wr.recv_flags = IB_RECV_SIGNALED; do { /* Allocate and map receive buffer */ @@ -2381,7 +2413,6 @@ qp_init_attr.send_cq = qp_info->port_priv->cq; qp_init_attr.recv_cq = qp_info->port_priv->cq; qp_init_attr.sq_sig_type = IB_SIGNAL_ALL_WR; - qp_init_attr.rq_sig_type = IB_SIGNAL_ALL_WR; qp_init_attr.cap.max_send_wr = IB_MAD_QP_SEND_SIZE; qp_init_attr.cap.max_recv_wr = IB_MAD_QP_RECV_SIZE; qp_init_attr.cap.max_send_sge = IB_MAD_SEND_REQ_MAX_SG; diff -Nru a/drivers/infiniband/core/mad_priv.h b/drivers/infiniband/core/mad_priv.h --- a/drivers/infiniband/core/mad_priv.h 2005-03-07 14:54:18 -08:00 +++ b/drivers/infiniband/core/mad_priv.h 2005-03-07 14:54:18 -08:00 @@ -58,8 +58,8 @@ #define MAX_MGMT_CLASS 80 #define MAX_MGMT_VERSION 8 #define MAX_MGMT_OUI 8 -#define MAX_MGMT_VENDOR_RANGE2 IB_MGMT_CLASS_VENDOR_RANGE2_END - \ - IB_MGMT_CLASS_VENDOR_RANGE2_START + 1 +#define MAX_MGMT_VENDOR_RANGE2 (IB_MGMT_CLASS_VENDOR_RANGE2_END - \ + IB_MGMT_CLASS_VENDOR_RANGE2_START + 1) struct ib_mad_list_head { struct list_head list; @@ -95,6 +95,8 @@ unsigned long timeout; struct list_head local_list; struct work_struct local_work; + struct list_head canceled_list; + struct work_struct canceled_work; atomic_t refcount; wait_queue_head_t wait; @@ -191,5 +193,7 @@ struct work_struct work; struct ib_mad_qp_info qp_info[IB_MAD_QPS_CORE]; }; + +extern kmem_cache_t *ib_mad_cache; #endif /* __IB_MAD_PRIV_H__ */ diff -Nru a/drivers/infiniband/core/smi.c b/drivers/infiniband/core/smi.c --- a/drivers/infiniband/core/smi.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/infiniband/core/smi.c 2005-03-07 14:54:17 -08:00 @@ -37,7 +37,7 @@ */ #include - +#include "smi.h" /* * Fixup a directed route SMP for sending diff -Nru a/drivers/infiniband/hw/mthca/Makefile b/drivers/infiniband/hw/mthca/Makefile --- a/drivers/infiniband/hw/mthca/Makefile 2005-03-07 14:54:17 -08:00 +++ b/drivers/infiniband/hw/mthca/Makefile 2005-03-07 14:54:17 -08:00 @@ -9,4 +9,4 @@ ib_mthca-y := mthca_main.o mthca_cmd.o mthca_profile.o mthca_reset.o \ mthca_allocator.o mthca_eq.o mthca_pd.o mthca_cq.o \ mthca_mr.o mthca_qp.o mthca_av.o mthca_mcg.o mthca_mad.o \ - mthca_provider.o mthca_memfree.o + mthca_provider.o mthca_memfree.o mthca_uar.o diff -Nru a/drivers/infiniband/hw/mthca/mthca_av.c b/drivers/infiniband/hw/mthca/mthca_av.c --- a/drivers/infiniband/hw/mthca/mthca_av.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_av.c 2005-03-07 14:54:18 -08:00 @@ -60,27 +60,34 @@ u32 index = -1; struct mthca_av *av = NULL; - ah->on_hca = 0; + ah->type = MTHCA_AH_PCI_POOL; - if (!atomic_read(&pd->sqp_count) && - !(dev->mthca_flags & MTHCA_FLAG_DDR_HIDDEN)) { + if (dev->hca_type == ARBEL_NATIVE) { + ah->av = kmalloc(sizeof *ah->av, GFP_KERNEL); + if (!ah->av) + return -ENOMEM; + + ah->type = MTHCA_AH_KMALLOC; + av = ah->av; + } else if (!atomic_read(&pd->sqp_count) && + !(dev->mthca_flags & MTHCA_FLAG_DDR_HIDDEN)) { index = mthca_alloc(&dev->av_table.alloc); /* fall back to allocate in host memory */ if (index == -1) - goto host_alloc; + goto on_hca_fail; av = kmalloc(sizeof *av, GFP_KERNEL); if (!av) - goto host_alloc; + goto on_hca_fail; - ah->on_hca = 1; + ah->type = MTHCA_AH_ON_HCA; ah->avdma = dev->av_table.ddr_av_base + index * MTHCA_AV_SIZE; } - host_alloc: - if (!ah->on_hca) { +on_hca_fail: + if (ah->type == MTHCA_AH_PCI_POOL) { ah->av = pci_pool_alloc(dev->av_table.pool, SLAB_KERNEL, &ah->avdma); if (!ah->av) @@ -123,7 +130,7 @@ j * 4, be32_to_cpu(((u32 *) av)[j])); } - if (ah->on_hca) { + if (ah->type == MTHCA_AH_ON_HCA) { memcpy_toio(dev->av_table.av_map + index * MTHCA_AV_SIZE, av, MTHCA_AV_SIZE); kfree(av); @@ -134,12 +141,21 @@ int mthca_destroy_ah(struct mthca_dev *dev, struct mthca_ah *ah) { - if (ah->on_hca) + switch (ah->type) { + case MTHCA_AH_ON_HCA: mthca_free(&dev->av_table.alloc, (ah->avdma - dev->av_table.ddr_av_base) / MTHCA_AV_SIZE); - else + break; + + case MTHCA_AH_PCI_POOL: pci_pool_free(dev->av_table.pool, ah->av, ah->avdma); + break; + + case MTHCA_AH_KMALLOC: + kfree(ah->av); + break; + } return 0; } @@ -147,7 +163,7 @@ int mthca_read_ah(struct mthca_dev *dev, struct mthca_ah *ah, struct ib_ud_header *header) { - if (ah->on_hca) + if (ah->type == MTHCA_AH_ON_HCA) return -EINVAL; header->lrh.service_level = be32_to_cpu(ah->av->sl_tclass_flowlabel) >> 28; @@ -176,6 +192,9 @@ { int err; + if (dev->hca_type == ARBEL_NATIVE) + return 0; + err = mthca_alloc_init(&dev->av_table.alloc, dev->av_table.num_ddr_avs, dev->av_table.num_ddr_avs - 1, @@ -212,6 +231,9 @@ void __devexit mthca_cleanup_av_table(struct mthca_dev *dev) { + if (dev->hca_type == ARBEL_NATIVE) + return; + if (dev->av_table.av_map) iounmap(dev->av_table.av_map); pci_pool_destroy(dev->av_table.pool); diff -Nru a/drivers/infiniband/hw/mthca/mthca_cmd.c b/drivers/infiniband/hw/mthca/mthca_cmd.c --- a/drivers/infiniband/hw/mthca/mthca_cmd.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_cmd.c 2005-03-07 14:54:17 -08:00 @@ -1290,7 +1290,7 @@ return -ENOMEM; inbox[0] = cpu_to_be64(virt); - inbox[1] = cpu_to_be64(dma_addr | (PAGE_SHIFT - 12)); + inbox[1] = cpu_to_be64(dma_addr); err = mthca_cmd(dev, indma, 1, 0, CMD_MAP_ICM, CMD_TIME_CLASS_B, status); @@ -1305,6 +1305,9 @@ int mthca_UNMAP_ICM(struct mthca_dev *dev, u64 virt, u32 page_count, u8 *status) { + mthca_dbg(dev, "Unmapping %d pages at %llx from ICM.\n", + page_count, (unsigned long long) virt); + return mthca_cmd(dev, virt, page_count, 0, CMD_UNMAP_ICM, CMD_TIME_CLASS_B, status); } @@ -1538,10 +1541,10 @@ if (0) { int i; mthca_dbg(dev, "Dumping QP context:\n"); - printk(" %08x\n", be32_to_cpup(qp_context)); + printk(" opt param mask: %08x\n", be32_to_cpup(qp_context)); for (i = 0; i < 0x100 / 4; ++i) { if (i % 8 == 0) - printk("[%02x] ", i * 4); + printk(" [%02x] ", i * 4); printk(" %08x", be32_to_cpu(((u32 *) qp_context)[i + 2])); if ((i + 1) % 8 == 0) printk("\n"); diff -Nru a/drivers/infiniband/hw/mthca/mthca_cmd.h b/drivers/infiniband/hw/mthca/mthca_cmd.h --- a/drivers/infiniband/hw/mthca/mthca_cmd.h 2005-03-07 14:54:16 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_cmd.h 2005-03-07 14:54:16 -08:00 @@ -95,7 +95,21 @@ }; enum { - DEV_LIM_FLAG_SRQ = 1 << 6 + DEV_LIM_FLAG_RC = 1 << 0, + DEV_LIM_FLAG_UC = 1 << 1, + DEV_LIM_FLAG_UD = 1 << 2, + DEV_LIM_FLAG_RD = 1 << 3, + DEV_LIM_FLAG_RAW_IPV6 = 1 << 4, + DEV_LIM_FLAG_RAW_ETHER = 1 << 5, + DEV_LIM_FLAG_SRQ = 1 << 6, + DEV_LIM_FLAG_BAD_PKEY_CNTR = 1 << 8, + DEV_LIM_FLAG_BAD_QKEY_CNTR = 1 << 9, + DEV_LIM_FLAG_MW = 1 << 16, + DEV_LIM_FLAG_AUTO_PATH_MIG = 1 << 17, + DEV_LIM_FLAG_ATOMIC = 1 << 18, + DEV_LIM_FLAG_RAW_MULTI = 1 << 19, + DEV_LIM_FLAG_UD_AV_PORT_ENFORCE = 1 << 20, + DEV_LIM_FLAG_UD_MULTI = 1 << 21, }; struct mthca_dev_lim { diff -Nru a/drivers/infiniband/hw/mthca/mthca_config_reg.h b/drivers/infiniband/hw/mthca/mthca_config_reg.h --- a/drivers/infiniband/hw/mthca/mthca_config_reg.h 2005-03-07 14:54:17 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_config_reg.h 2005-03-07 14:54:17 -08:00 @@ -46,5 +46,6 @@ #define MTHCA_MAP_ECR_SIZE (MTHCA_ECR_SIZE + MTHCA_ECR_CLR_SIZE) #define MTHCA_CLR_INT_BASE 0xf00d8 #define MTHCA_CLR_INT_SIZE 0x00008 +#define MTHCA_EQ_SET_CI_SIZE (8 * 32) #endif /* MTHCA_CONFIG_REG_H */ diff -Nru a/drivers/infiniband/hw/mthca/mthca_cq.c b/drivers/infiniband/hw/mthca/mthca_cq.c --- a/drivers/infiniband/hw/mthca/mthca_cq.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_cq.c 2005-03-07 14:54:16 -08:00 @@ -33,11 +33,13 @@ */ #include +#include #include #include "mthca_dev.h" #include "mthca_cmd.h" +#include "mthca_memfree.h" enum { MTHCA_MAX_DIRECT_CQ_SIZE = 4 * PAGE_SIZE @@ -54,7 +56,7 @@ u32 flags; u64 start; u32 logsize_usrpage; - u32 error_eqn; + u32 error_eqn; /* Tavor only */ u32 comp_eqn; u32 pd; u32 lkey; @@ -63,7 +65,9 @@ u32 consumer_index; u32 producer_index; u32 cqn; - u32 reserved[3]; + u32 ci_db; /* Arbel only */ + u32 state_db; /* Arbel only */ + u32 reserved; } __attribute__((packed)); #define MTHCA_CQ_STATUS_OK ( 0 << 28) @@ -132,11 +136,15 @@ #define MTHCA_CQ_ENTRY_OWNER_SW (0 << 7) #define MTHCA_CQ_ENTRY_OWNER_HW (1 << 7) -#define MTHCA_CQ_DB_INC_CI (1 << 24) -#define MTHCA_CQ_DB_REQ_NOT (2 << 24) -#define MTHCA_CQ_DB_REQ_NOT_SOL (3 << 24) -#define MTHCA_CQ_DB_SET_CI (4 << 24) -#define MTHCA_CQ_DB_REQ_NOT_MULT (5 << 24) +#define MTHCA_TAVOR_CQ_DB_INC_CI (1 << 24) +#define MTHCA_TAVOR_CQ_DB_REQ_NOT (2 << 24) +#define MTHCA_TAVOR_CQ_DB_REQ_NOT_SOL (3 << 24) +#define MTHCA_TAVOR_CQ_DB_SET_CI (4 << 24) +#define MTHCA_TAVOR_CQ_DB_REQ_NOT_MULT (5 << 24) + +#define MTHCA_ARBEL_CQ_DB_REQ_NOT_SOL (1 << 24) +#define MTHCA_ARBEL_CQ_DB_REQ_NOT (2 << 24) +#define MTHCA_ARBEL_CQ_DB_REQ_NOT_MULT (3 << 24) static inline struct mthca_cqe *get_cqe(struct mthca_cq *cq, int entry) { @@ -147,54 +155,58 @@ + (entry * MTHCA_CQ_ENTRY_SIZE) % PAGE_SIZE; } -static inline int cqe_sw(struct mthca_cq *cq, int i) +static inline struct mthca_cqe *cqe_sw(struct mthca_cq *cq, int i) { - return !(MTHCA_CQ_ENTRY_OWNER_HW & - get_cqe(cq, i)->owner); + struct mthca_cqe *cqe = get_cqe(cq, i); + return MTHCA_CQ_ENTRY_OWNER_HW & cqe->owner ? NULL : cqe; } -static inline int next_cqe_sw(struct mthca_cq *cq) +static inline struct mthca_cqe *next_cqe_sw(struct mthca_cq *cq) { - return cqe_sw(cq, cq->cons_index); + return cqe_sw(cq, cq->cons_index & cq->ibcq.cqe); } -static inline void set_cqe_hw(struct mthca_cq *cq, int entry) +static inline void set_cqe_hw(struct mthca_cqe *cqe) { - get_cqe(cq, entry)->owner = MTHCA_CQ_ENTRY_OWNER_HW; + cqe->owner = MTHCA_CQ_ENTRY_OWNER_HW; } -static inline void inc_cons_index(struct mthca_dev *dev, struct mthca_cq *cq, - int nent) +/* + * incr is ignored in native Arbel (mem-free) mode, so cq->cons_index + * should be correct before calling update_cons_index(). + */ +static inline void update_cons_index(struct mthca_dev *dev, struct mthca_cq *cq, + int incr) { u32 doorbell[2]; - doorbell[0] = cpu_to_be32(MTHCA_CQ_DB_INC_CI | cq->cqn); - doorbell[1] = cpu_to_be32(nent - 1); + if (dev->hca_type == ARBEL_NATIVE) { + *cq->set_ci_db = cpu_to_be32(cq->cons_index); + wmb(); + } else { + doorbell[0] = cpu_to_be32(MTHCA_TAVOR_CQ_DB_INC_CI | cq->cqn); + doorbell[1] = cpu_to_be32(incr - 1); - mthca_write64(doorbell, - dev->kar + MTHCA_CQ_DOORBELL, - MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); + mthca_write64(doorbell, + dev->kar + MTHCA_CQ_DOORBELL, + MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); + } } void mthca_cq_event(struct mthca_dev *dev, u32 cqn) { struct mthca_cq *cq; - spin_lock(&dev->cq_table.lock); cq = mthca_array_get(&dev->cq_table.cq, cqn & (dev->limits.num_cqs - 1)); - if (cq) - atomic_inc(&cq->refcount); - spin_unlock(&dev->cq_table.lock); if (!cq) { mthca_warn(dev, "Completion event for bogus CQ %08x\n", cqn); return; } - cq->ibcq.comp_handler(&cq->ibcq, cq->ibcq.cq_context); + ++cq->arm_sn; - if (atomic_dec_and_test(&cq->refcount)) - wake_up(&cq->wait); + cq->ibcq.comp_handler(&cq->ibcq, cq->ibcq.cq_context); } void mthca_cq_clean(struct mthca_dev *dev, u32 cqn, u32 qpn) @@ -250,8 +262,8 @@ if (nfreed) { wmb(); - inc_cons_index(dev, cq, nfreed); - cq->cons_index = (cq->cons_index + nfreed) & cq->ibcq.cqe; + cq->cons_index += nfreed; + update_cons_index(dev, cq, nfreed); } spin_unlock_irq(&cq->lock); @@ -344,7 +356,7 @@ break; } - err = mthca_free_err_wqe(qp, is_send, wqe_index, &dbd, &new_wqe); + err = mthca_free_err_wqe(dev, qp, is_send, wqe_index, &dbd, &new_wqe); if (err) return err; @@ -383,12 +395,13 @@ struct mthca_wq *wq; struct mthca_cqe *cqe; int wqe_index; - int is_error = 0; + int is_error; int is_send; int free_cqe = 1; int err = 0; - if (!next_cqe_sw(cq)) + cqe = next_cqe_sw(cq); + if (!cqe) return -EAGAIN; /* @@ -397,8 +410,6 @@ */ rmb(); - cqe = get_cqe(cq, cq->cons_index); - if (0) { mthca_dbg(dev, "%x/%d: CQE -> QPN %06x, WQE @ %08x\n", cq->cqn, cq->cons_index, be32_to_cpu(cqe->my_qpn), @@ -407,39 +418,25 @@ dump_cqe(cqe); } - if ((cqe->opcode & MTHCA_ERROR_CQE_OPCODE_MASK) == - MTHCA_ERROR_CQE_OPCODE_MASK) { - is_error = 1; - is_send = cqe->opcode & 1; - } else - is_send = cqe->is_send & 0x80; + is_error = (cqe->opcode & MTHCA_ERROR_CQE_OPCODE_MASK) == + MTHCA_ERROR_CQE_OPCODE_MASK; + is_send = is_error ? cqe->opcode & 0x01 : cqe->is_send & 0x80; if (!*cur_qp || be32_to_cpu(cqe->my_qpn) != (*cur_qp)->qpn) { - if (*cur_qp) { - if (*freed) { - wmb(); - inc_cons_index(dev, cq, *freed); - *freed = 0; - } - spin_unlock(&(*cur_qp)->lock); - } - - spin_lock(&dev->qp_table.lock); + /* + * We do not have to take the QP table lock here, + * because CQs will be locked while QPs are removed + * from the table. + */ *cur_qp = mthca_array_get(&dev->qp_table.qp, be32_to_cpu(cqe->my_qpn) & (dev->limits.num_qps - 1)); - if (*cur_qp) - atomic_inc(&(*cur_qp)->refcount); - spin_unlock(&dev->qp_table.lock); - if (!*cur_qp) { mthca_warn(dev, "CQ entry for unknown QP %06x\n", be32_to_cpu(cqe->my_qpn) & 0xffffff); err = -EINVAL; goto out; } - - spin_lock(&(*cur_qp)->lock); } entry->qp_num = (*cur_qp)->qpn; @@ -457,9 +454,9 @@ } if (wq->last_comp < wqe_index) - wq->cur -= wqe_index - wq->last_comp; + wq->tail += wqe_index - wq->last_comp; else - wq->cur -= wq->max - wq->last_comp + wqe_index; + wq->tail += wqe_index + wq->max - wq->last_comp; wq->last_comp = wqe_index; @@ -509,10 +506,10 @@ entry->status = IB_WC_SUCCESS; out: - if (free_cqe) { - set_cqe_hw(cq, cq->cons_index); + if (likely(free_cqe)) { + set_cqe_hw(cqe); ++(*freed); - cq->cons_index = (cq->cons_index + 1) & cq->ibcq.cqe; + ++cq->cons_index; } return err; @@ -540,63 +537,101 @@ if (freed) { wmb(); - inc_cons_index(dev, cq, freed); + update_cons_index(dev, cq, freed); } - if (qp) { - spin_unlock(&qp->lock); - if (atomic_dec_and_test(&qp->refcount)) - wake_up(&qp->wait); - } - - spin_unlock_irqrestore(&cq->lock, flags); return err == 0 || err == -EAGAIN ? npolled : err; } -void mthca_arm_cq(struct mthca_dev *dev, struct mthca_cq *cq, - int solicited) +int mthca_tavor_arm_cq(struct ib_cq *cq, enum ib_cq_notify notify) { u32 doorbell[2]; - doorbell[0] = cpu_to_be32((solicited ? - MTHCA_CQ_DB_REQ_NOT_SOL : - MTHCA_CQ_DB_REQ_NOT) | - cq->cqn); + doorbell[0] = cpu_to_be32((notify == IB_CQ_SOLICITED ? + MTHCA_TAVOR_CQ_DB_REQ_NOT_SOL : + MTHCA_TAVOR_CQ_DB_REQ_NOT) | + to_mcq(cq)->cqn); doorbell[1] = 0xffffffff; mthca_write64(doorbell, - dev->kar + MTHCA_CQ_DOORBELL, - MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); + to_mdev(cq->device)->kar + MTHCA_CQ_DOORBELL, + MTHCA_GET_DOORBELL_LOCK(&to_mdev(cq->device)->doorbell_lock)); + + return 0; } -int mthca_init_cq(struct mthca_dev *dev, int nent, - struct mthca_cq *cq) +int mthca_arbel_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify notify) +{ + struct mthca_cq *cq = to_mcq(ibcq); + u32 doorbell[2]; + u32 sn; + u32 ci; + + sn = cq->arm_sn & 3; + ci = cpu_to_be32(cq->cons_index); + + doorbell[0] = ci; + doorbell[1] = cpu_to_be32((cq->cqn << 8) | (2 << 5) | (sn << 3) | + (notify == IB_CQ_SOLICITED ? 1 : 2)); + + mthca_write_db_rec(doorbell, cq->arm_db); + + /* + * Make sure that the doorbell record in host memory is + * written before ringing the doorbell via PCI MMIO. + */ + wmb(); + + doorbell[0] = cpu_to_be32((sn << 28) | + (notify == IB_CQ_SOLICITED ? + MTHCA_ARBEL_CQ_DB_REQ_NOT_SOL : + MTHCA_ARBEL_CQ_DB_REQ_NOT) | + cq->cqn); + doorbell[1] = ci; + + mthca_write64(doorbell, + to_mdev(ibcq->device)->kar + MTHCA_CQ_DOORBELL, + MTHCA_GET_DOORBELL_LOCK(&to_mdev(ibcq->device)->doorbell_lock)); + + return 0; +} + +static void mthca_free_cq_buf(struct mthca_dev *dev, struct mthca_cq *cq) { - int size = nent * MTHCA_CQ_ENTRY_SIZE; - dma_addr_t t; - void *mailbox = NULL; - int npages, shift; - u64 *dma_list = NULL; - struct mthca_cq_context *cq_context; - int err = -ENOMEM; - u8 status; int i; + int size; - might_sleep(); + if (cq->is_direct) + pci_free_consistent(dev->pdev, + (cq->ibcq.cqe + 1) * MTHCA_CQ_ENTRY_SIZE, + cq->queue.direct.buf, + pci_unmap_addr(&cq->queue.direct, + mapping)); + else { + size = (cq->ibcq.cqe + 1) * MTHCA_CQ_ENTRY_SIZE; + for (i = 0; i < (size + PAGE_SIZE - 1) / PAGE_SIZE; ++i) + if (cq->queue.page_list[i].buf) + pci_free_consistent(dev->pdev, PAGE_SIZE, + cq->queue.page_list[i].buf, + pci_unmap_addr(&cq->queue.page_list[i], + mapping)); - mailbox = kmalloc(sizeof (struct mthca_cq_context) + MTHCA_CMD_MAILBOX_EXTRA, - GFP_KERNEL); - if (!mailbox) - goto err_out; + kfree(cq->queue.page_list); + } +} - cq_context = MAILBOX_ALIGN(mailbox); +static int mthca_alloc_cq_buf(struct mthca_dev *dev, int size, + struct mthca_cq *cq) +{ + int err = -ENOMEM; + int npages, shift; + u64 *dma_list = NULL; + dma_addr_t t; + int i; if (size <= MTHCA_MAX_DIRECT_CQ_SIZE) { - if (0) - mthca_dbg(dev, "Creating direct CQ of size %d\n", size); - cq->is_direct = 1; npages = 1; shift = get_order(size) + PAGE_SHIFT; @@ -604,7 +639,7 @@ cq->queue.direct.buf = pci_alloc_consistent(dev->pdev, size, &t); if (!cq->queue.direct.buf) - goto err_out; + return -ENOMEM; pci_unmap_addr_set(&cq->queue.direct, mapping, t); @@ -617,7 +652,7 @@ dma_list = kmalloc(npages * sizeof *dma_list, GFP_KERNEL); if (!dma_list) - goto err_out_free; + goto err_free; for (i = 0; i < npages; ++i) dma_list[i] = t + i * (1 << shift); @@ -626,12 +661,9 @@ npages = (size + PAGE_SIZE - 1) / PAGE_SIZE; shift = PAGE_SHIFT; - if (0) - mthca_dbg(dev, "Creating indirect CQ with %d pages\n", npages); - dma_list = kmalloc(npages * sizeof *dma_list, GFP_KERNEL); if (!dma_list) - goto err_out; + return -ENOMEM; cq->queue.page_list = kmalloc(npages * sizeof *cq->queue.page_list, GFP_KERNEL); @@ -645,7 +677,7 @@ cq->queue.page_list[i].buf = pci_alloc_consistent(dev->pdev, PAGE_SIZE, &t); if (!cq->queue.page_list[i].buf) - goto err_out_free; + goto err_free; dma_list[i] = t; pci_unmap_addr_set(&cq->queue.page_list[i], mapping, t); @@ -654,13 +686,6 @@ } } - for (i = 0; i < nent; ++i) - set_cqe_hw(cq, i); - - cq->cqn = mthca_alloc(&dev->cq_table.alloc); - if (cq->cqn == -1) - goto err_out_free; - err = mthca_mr_alloc_phys(dev, dev->driver_pd.pd_num, dma_list, shift, npages, 0, size, @@ -668,7 +693,72 @@ MTHCA_MPT_FLAG_LOCAL_READ, &cq->mr); if (err) - goto err_out_free_cq; + goto err_free; + + kfree(dma_list); + + return 0; + +err_free: + mthca_free_cq_buf(dev, cq); + +err_out: + kfree(dma_list); + + return err; +} + +int mthca_init_cq(struct mthca_dev *dev, int nent, + struct mthca_cq *cq) +{ + int size = nent * MTHCA_CQ_ENTRY_SIZE; + void *mailbox = NULL; + struct mthca_cq_context *cq_context; + int err = -ENOMEM; + u8 status; + int i; + + might_sleep(); + + cq->ibcq.cqe = nent - 1; + + cq->cqn = mthca_alloc(&dev->cq_table.alloc); + if (cq->cqn == -1) + return -ENOMEM; + + if (dev->hca_type == ARBEL_NATIVE) { + cq->arm_sn = 1; + + err = mthca_table_get(dev, dev->cq_table.table, cq->cqn); + if (err) + goto err_out; + + err = -ENOMEM; + + cq->set_ci_db_index = mthca_alloc_db(dev, MTHCA_DB_TYPE_CQ_SET_CI, + cq->cqn, &cq->set_ci_db); + if (cq->set_ci_db_index < 0) + goto err_out_icm; + + cq->arm_db_index = mthca_alloc_db(dev, MTHCA_DB_TYPE_CQ_ARM, + cq->cqn, &cq->arm_db); + if (cq->arm_db_index < 0) + goto err_out_ci; + } + + mailbox = kmalloc(sizeof (struct mthca_cq_context) + MTHCA_CMD_MAILBOX_EXTRA, + GFP_KERNEL); + if (!mailbox) + goto err_out_mailbox; + + cq_context = MAILBOX_ALIGN(mailbox); + + err = mthca_alloc_cq_buf(dev, size, cq); + if (err) + goto err_out_mailbox; + + for (i = 0; i < nent; ++i) + set_cqe_hw(get_cqe(cq, i)); spin_lock_init(&cq->lock); atomic_set(&cq->refcount, 1); @@ -680,13 +770,18 @@ MTHCA_CQ_FLAG_TR); cq_context->start = cpu_to_be64(0); cq_context->logsize_usrpage = cpu_to_be32((ffs(nent) - 1) << 24 | - MTHCA_KAR_PAGE); + dev->driver_uar.index); cq_context->error_eqn = cpu_to_be32(dev->eq_table.eq[MTHCA_EQ_ASYNC].eqn); cq_context->comp_eqn = cpu_to_be32(dev->eq_table.eq[MTHCA_EQ_COMP].eqn); cq_context->pd = cpu_to_be32(dev->driver_pd.pd_num); cq_context->lkey = cpu_to_be32(cq->mr.ibmr.lkey); cq_context->cqn = cpu_to_be32(cq->cqn); + if (dev->hca_type == ARBEL_NATIVE) { + cq_context->ci_db = cpu_to_be32(cq->set_ci_db_index); + cq_context->state_db = cpu_to_be32(cq->arm_db_index); + } + err = mthca_SW2HW_CQ(dev, cq_context, cq->cqn, &status); if (err) { mthca_warn(dev, "SW2HW_CQ failed (%d)\n", err); @@ -711,36 +806,27 @@ cq->cons_index = 0; - kfree(dma_list); kfree(mailbox); return 0; - err_out_free_mr: +err_out_free_mr: mthca_free_mr(dev, &cq->mr); + mthca_free_cq_buf(dev, cq); - err_out_free_cq: - mthca_free(&dev->cq_table.alloc, cq->cqn); +err_out_mailbox: + kfree(mailbox); - err_out_free: - if (cq->is_direct) - pci_free_consistent(dev->pdev, size, - cq->queue.direct.buf, - pci_unmap_addr(&cq->queue.direct, mapping)); - else { - for (i = 0; i < npages; ++i) - if (cq->queue.page_list[i].buf) - pci_free_consistent(dev->pdev, PAGE_SIZE, - cq->queue.page_list[i].buf, - pci_unmap_addr(&cq->queue.page_list[i], - mapping)); + mthca_free_db(dev, MTHCA_DB_TYPE_CQ_ARM, cq->arm_db_index); - kfree(cq->queue.page_list); - } +err_out_ci: + mthca_free_db(dev, MTHCA_DB_TYPE_CQ_SET_CI, cq->set_ci_db_index); - err_out: - kfree(dma_list); - kfree(mailbox); +err_out_icm: + mthca_table_put(dev, dev->cq_table.table, cq->cqn); + +err_out: + mthca_free(&dev->cq_table.alloc, cq->cqn); return err; } @@ -773,7 +859,7 @@ int j; printk(KERN_ERR "context for CQN %x (cons index %x, next sw %d)\n", - cq->cqn, cq->cons_index, next_cqe_sw(cq)); + cq->cqn, cq->cons_index, !!next_cqe_sw(cq)); for (j = 0; j < 16; ++j) printk(KERN_ERR "[%2x] %08x\n", j * 4, be32_to_cpu(ctx[j])); } @@ -783,30 +869,21 @@ cq->cqn & (dev->limits.num_cqs - 1)); spin_unlock_irq(&dev->cq_table.lock); + if (dev->mthca_flags & MTHCA_FLAG_MSI_X) + synchronize_irq(dev->eq_table.eq[MTHCA_EQ_COMP].msi_x_vector); + else + synchronize_irq(dev->pdev->irq); + atomic_dec(&cq->refcount); wait_event(cq->wait, !atomic_read(&cq->refcount)); mthca_free_mr(dev, &cq->mr); + mthca_free_cq_buf(dev, cq); - if (cq->is_direct) - pci_free_consistent(dev->pdev, - (cq->ibcq.cqe + 1) * MTHCA_CQ_ENTRY_SIZE, - cq->queue.direct.buf, - pci_unmap_addr(&cq->queue.direct, - mapping)); - else { - int i; - - for (i = 0; - i < ((cq->ibcq.cqe + 1) * MTHCA_CQ_ENTRY_SIZE + PAGE_SIZE - 1) / - PAGE_SIZE; - ++i) - pci_free_consistent(dev->pdev, PAGE_SIZE, - cq->queue.page_list[i].buf, - pci_unmap_addr(&cq->queue.page_list[i], - mapping)); - - kfree(cq->queue.page_list); + if (dev->hca_type == ARBEL_NATIVE) { + mthca_free_db(dev, MTHCA_DB_TYPE_CQ_ARM, cq->arm_db_index); + mthca_free_db(dev, MTHCA_DB_TYPE_CQ_SET_CI, cq->set_ci_db_index); + mthca_table_put(dev, dev->cq_table.table, cq->cqn); } mthca_free(&dev->cq_table.alloc, cq->cqn); diff -Nru a/drivers/infiniband/hw/mthca/mthca_dev.h b/drivers/infiniband/hw/mthca/mthca_dev.h --- a/drivers/infiniband/hw/mthca/mthca_dev.h 2005-03-07 14:54:16 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_dev.h 2005-03-07 14:54:16 -08:00 @@ -65,7 +65,6 @@ }; enum { - MTHCA_KAR_PAGE = 1, MTHCA_MAX_PORTS = 2 }; @@ -108,6 +107,7 @@ int gid_table_len; int pkey_table_len; int local_ca_ack_delay; + int num_uars; int max_sg; int num_qps; int reserved_qps; @@ -148,6 +148,12 @@ } *page_list; }; +struct mthca_uar_table { + struct mthca_alloc alloc; + u64 uarc_base; + int uarc_size; +}; + struct mthca_pd_table { struct mthca_alloc alloc; }; @@ -165,6 +171,7 @@ struct mthca_alloc alloc; void __iomem *clr_int; u32 clr_mask; + u32 arm_mask; struct mthca_eq eq[MTHCA_NUM_EQ]; u64 icm_virt; struct page *icm_page; @@ -200,8 +207,9 @@ }; struct mthca_mcg_table { - struct semaphore sem; - struct mthca_alloc alloc; + struct semaphore sem; + struct mthca_alloc alloc; + struct mthca_icm_table *table; }; struct mthca_dev { @@ -210,6 +218,7 @@ int hca_type; unsigned long mthca_flags; + unsigned long device_cap_flags; u32 rev_id; @@ -237,13 +246,22 @@ struct semaphore cap_mask_mutex; void __iomem *hcr; - void __iomem *ecr_base; - void __iomem *clr_base; void __iomem *kar; + void __iomem *clr_base; + union { + struct { + void __iomem *ecr_base; + } tavor; + struct { + void __iomem *eq_arm; + void __iomem *eq_set_ci_base; + } arbel; + } eq_regs; struct mthca_cmd cmd; struct mthca_limits limits; + struct mthca_uar_table uar_table; struct mthca_pd_table pd_table; struct mthca_mr_table mr_table; struct mthca_eq_table eq_table; @@ -252,8 +270,10 @@ struct mthca_av_table av_table; struct mthca_mcg_table mcg_table; - struct mthca_pd driver_pd; - struct mthca_mr driver_mr; + struct mthca_uar driver_uar; + struct mthca_db_table *db_tab; + struct mthca_pd driver_pd; + struct mthca_mr driver_mr; struct ib_mad_agent *send_agent[MTHCA_MAX_PORTS][2]; struct ib_ah *sm_ah[MTHCA_MAX_PORTS]; @@ -310,6 +330,7 @@ int mthca_array_init(struct mthca_array *array, int nent); void mthca_array_cleanup(struct mthca_array *array, int nent); +int mthca_init_uar_table(struct mthca_dev *dev); int mthca_init_pd_table(struct mthca_dev *dev); int mthca_init_mr_table(struct mthca_dev *dev); int mthca_init_eq_table(struct mthca_dev *dev); @@ -318,6 +339,7 @@ int mthca_init_av_table(struct mthca_dev *dev); int mthca_init_mcg_table(struct mthca_dev *dev); +void mthca_cleanup_uar_table(struct mthca_dev *dev); void mthca_cleanup_pd_table(struct mthca_dev *dev); void mthca_cleanup_mr_table(struct mthca_dev *dev); void mthca_cleanup_eq_table(struct mthca_dev *dev); @@ -329,6 +351,9 @@ int mthca_register_device(struct mthca_dev *dev); void mthca_unregister_device(struct mthca_dev *dev); +int mthca_uar_alloc(struct mthca_dev *dev, struct mthca_uar *uar); +void mthca_uar_free(struct mthca_dev *dev, struct mthca_uar *uar); + int mthca_pd_alloc(struct mthca_dev *dev, struct mthca_pd *pd); void mthca_pd_free(struct mthca_dev *dev, struct mthca_pd *pd); @@ -345,8 +370,8 @@ int mthca_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *entry); -void mthca_arm_cq(struct mthca_dev *dev, struct mthca_cq *cq, - int solicited); +int mthca_tavor_arm_cq(struct ib_cq *cq, enum ib_cq_notify notify); +int mthca_arbel_arm_cq(struct ib_cq *cq, enum ib_cq_notify notify); int mthca_init_cq(struct mthca_dev *dev, int nent, struct mthca_cq *cq); void mthca_free_cq(struct mthca_dev *dev, @@ -357,11 +382,15 @@ void mthca_qp_event(struct mthca_dev *dev, u32 qpn, enum ib_event_type event_type); int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask); -int mthca_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, - struct ib_send_wr **bad_wr); -int mthca_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr, - struct ib_recv_wr **bad_wr); -int mthca_free_err_wqe(struct mthca_qp *qp, int is_send, +int mthca_tavor_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, + struct ib_send_wr **bad_wr); +int mthca_tavor_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr, + struct ib_recv_wr **bad_wr); +int mthca_arbel_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, + struct ib_send_wr **bad_wr); +int mthca_arbel_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr, + struct ib_recv_wr **bad_wr); +int mthca_free_err_wqe(struct mthca_dev *dev, struct mthca_qp *qp, int is_send, int index, int *dbd, u32 *new_wqe); int mthca_alloc_qp(struct mthca_dev *dev, struct mthca_pd *pd, @@ -369,14 +398,12 @@ struct mthca_cq *recv_cq, enum ib_qp_type type, enum ib_sig_type send_policy, - enum ib_sig_type recv_policy, struct mthca_qp *qp); int mthca_alloc_sqp(struct mthca_dev *dev, struct mthca_pd *pd, struct mthca_cq *send_cq, struct mthca_cq *recv_cq, enum ib_sig_type send_policy, - enum ib_sig_type recv_policy, int qpn, int port, struct mthca_sqp *sqp); diff -Nru a/drivers/infiniband/hw/mthca/mthca_doorbell.h b/drivers/infiniband/hw/mthca/mthca_doorbell.h --- a/drivers/infiniband/hw/mthca/mthca_doorbell.h 2005-03-07 14:54:17 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_doorbell.h 2005-03-07 14:54:17 -08:00 @@ -57,6 +57,11 @@ __raw_writeq(*(u64 *) val, dest); } +static inline void mthca_write_db_rec(u32 val[2], u32 *db) +{ + *(u64 *) db = *(u64 *) val; +} + #else /* @@ -78,6 +83,13 @@ __raw_writel(val[0], dest); __raw_writel(val[1], dest + 4); spin_unlock_irqrestore(doorbell_lock, flags); +} + +static inline void mthca_write_db_rec(u32 val[2], u32 *db) +{ + db[0] = val[0]; + wmb(); + db[1] = val[1]; } #endif diff -Nru a/drivers/infiniband/hw/mthca/mthca_eq.c b/drivers/infiniband/hw/mthca/mthca_eq.c --- a/drivers/infiniband/hw/mthca/mthca_eq.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_eq.c 2005-03-07 14:54:17 -08:00 @@ -54,10 +54,10 @@ u32 flags; u64 start; u32 logsize_usrpage; - u32 pd; + u32 tavor_pd; /* reserved for Arbel */ u8 reserved1[3]; u8 intr; - u32 lost_count; + u32 arbel_pd; /* lost_count for Tavor */ u32 lkey; u32 reserved2[2]; u32 consumer_index; @@ -75,6 +75,7 @@ #define MTHCA_EQ_STATE_ARMED ( 1 << 8) #define MTHCA_EQ_STATE_FIRED ( 2 << 8) #define MTHCA_EQ_STATE_ALWAYS_ARMED ( 3 << 8) +#define MTHCA_EQ_STATE_ARBEL ( 8 << 8) enum { MTHCA_EVENT_TYPE_COMP = 0x00, @@ -164,19 +165,46 @@ MTHCA_ASYNC_EVENT_MASK; } -static inline void set_eq_ci(struct mthca_dev *dev, struct mthca_eq *eq, u32 ci) +static inline void tavor_set_eq_ci(struct mthca_dev *dev, struct mthca_eq *eq, u32 ci) { u32 doorbell[2]; doorbell[0] = cpu_to_be32(MTHCA_EQ_DB_SET_CI | eq->eqn); doorbell[1] = cpu_to_be32(ci & (eq->nent - 1)); + /* + * This barrier makes sure that all updates to ownership bits + * done by set_eqe_hw() hit memory before the consumer index + * is updated. set_eq_ci() allows the HCA to possibly write + * more EQ entries, and we want to avoid the exceedingly + * unlikely possibility of the HCA writing an entry and then + * having set_eqe_hw() overwrite the owner field. + */ + wmb(); mthca_write64(doorbell, dev->kar + MTHCA_EQ_DOORBELL, MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); } -static inline void eq_req_not(struct mthca_dev *dev, int eqn) +static inline void arbel_set_eq_ci(struct mthca_dev *dev, struct mthca_eq *eq, u32 ci) +{ + /* See comment in tavor_set_eq_ci() above. */ + wmb(); + __raw_writel(cpu_to_be32(ci), dev->eq_regs.arbel.eq_set_ci_base + + eq->eqn * 8); + /* We still want ordering, just not swabbing, so add a barrier */ + mb(); +} + +static inline void set_eq_ci(struct mthca_dev *dev, struct mthca_eq *eq, u32 ci) +{ + if (dev->hca_type == ARBEL_NATIVE) + arbel_set_eq_ci(dev, eq, ci); + else + tavor_set_eq_ci(dev, eq, ci); +} + +static inline void tavor_eq_req_not(struct mthca_dev *dev, int eqn) { u32 doorbell[2]; @@ -188,16 +216,23 @@ MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); } +static inline void arbel_eq_req_not(struct mthca_dev *dev, u32 eqn_mask) +{ + writel(eqn_mask, dev->eq_regs.arbel.eq_arm); +} + static inline void disarm_cq(struct mthca_dev *dev, int eqn, int cqn) { - u32 doorbell[2]; + if (dev->hca_type != ARBEL_NATIVE) { + u32 doorbell[2]; - doorbell[0] = cpu_to_be32(MTHCA_EQ_DB_DISARM_CQ | eqn); - doorbell[1] = cpu_to_be32(cqn); + doorbell[0] = cpu_to_be32(MTHCA_EQ_DB_DISARM_CQ | eqn); + doorbell[1] = cpu_to_be32(cqn); - mthca_write64(doorbell, - dev->kar + MTHCA_EQ_DOORBELL, - MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); + mthca_write64(doorbell, + dev->kar + MTHCA_EQ_DOORBELL, + MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); + } } static inline struct mthca_eqe *get_eqe(struct mthca_eq *eq, u32 entry) @@ -232,7 +267,7 @@ ib_dispatch_event(&record); } -static void mthca_eq_int(struct mthca_dev *dev, struct mthca_eq *eq) +static int mthca_eq_int(struct mthca_dev *dev, struct mthca_eq *eq) { struct mthca_eqe *eqe; int disarm_cqn; @@ -333,60 +368,93 @@ ++eq->cons_index; eqes_found = 1; - if (set_ci) { - wmb(); /* see comment below */ + if (unlikely(set_ci)) { + /* + * Conditional on hca_type is OK here because + * this is a rare case, not the fast path. + */ set_eq_ci(dev, eq, eq->cons_index); set_ci = 0; } } /* - * This barrier makes sure that all updates to - * ownership bits done by set_eqe_hw() hit memory - * before the consumer index is updated. set_eq_ci() - * allows the HCA to possibly write more EQ entries, - * and we want to avoid the exceedingly unlikely - * possibility of the HCA writing an entry and then - * having set_eqe_hw() overwrite the owner field. + * Rely on caller to set consumer index so that we don't have + * to test hca_type in our interrupt handling fast path. */ - if (likely(eqes_found)) { - wmb(); - set_eq_ci(dev, eq, eq->cons_index); - } - eq_req_not(dev, eq->eqn); + return eqes_found; } -static irqreturn_t mthca_interrupt(int irq, void *dev_ptr, struct pt_regs *regs) +static irqreturn_t mthca_tavor_interrupt(int irq, void *dev_ptr, struct pt_regs *regs) { struct mthca_dev *dev = dev_ptr; u32 ecr; - int work = 0; int i; if (dev->eq_table.clr_mask) writel(dev->eq_table.clr_mask, dev->eq_table.clr_int); - if ((ecr = readl(dev->ecr_base + 4)) != 0) { - work = 1; - - writel(ecr, dev->ecr_base + + ecr = readl(dev->eq_regs.tavor.ecr_base + 4); + if (ecr) { + writel(ecr, dev->eq_regs.tavor.ecr_base + MTHCA_ECR_CLR_BASE - MTHCA_ECR_BASE + 4); for (i = 0; i < MTHCA_NUM_EQ; ++i) - if (ecr & dev->eq_table.eq[i].ecr_mask) - mthca_eq_int(dev, &dev->eq_table.eq[i]); + if (ecr & dev->eq_table.eq[i].eqn_mask && + mthca_eq_int(dev, &dev->eq_table.eq[i])) { + tavor_set_eq_ci(dev, &dev->eq_table.eq[i], + dev->eq_table.eq[i].cons_index); + tavor_eq_req_not(dev, dev->eq_table.eq[i].eqn); + } } - return IRQ_RETVAL(work); + return IRQ_RETVAL(ecr); } -static irqreturn_t mthca_msi_x_interrupt(int irq, void *eq_ptr, +static irqreturn_t mthca_tavor_msi_x_interrupt(int irq, void *eq_ptr, struct pt_regs *regs) { struct mthca_eq *eq = eq_ptr; struct mthca_dev *dev = eq->dev; mthca_eq_int(dev, eq); + tavor_set_eq_ci(dev, eq, eq->cons_index); + tavor_eq_req_not(dev, eq->eqn); + + /* MSI-X vectors always belong to us */ + return IRQ_HANDLED; +} + +static irqreturn_t mthca_arbel_interrupt(int irq, void *dev_ptr, struct pt_regs *regs) +{ + struct mthca_dev *dev = dev_ptr; + int work = 0; + int i; + + if (dev->eq_table.clr_mask) + writel(dev->eq_table.clr_mask, dev->eq_table.clr_int); + + for (i = 0; i < MTHCA_NUM_EQ; ++i) + if (mthca_eq_int(dev, &dev->eq_table.eq[i])) { + work = 1; + arbel_set_eq_ci(dev, &dev->eq_table.eq[i], + dev->eq_table.eq[i].cons_index); + } + + arbel_eq_req_not(dev, dev->eq_table.arm_mask); + + return IRQ_RETVAL(work); +} + +static irqreturn_t mthca_arbel_msi_x_interrupt(int irq, void *eq_ptr, + struct pt_regs *regs) +{ + struct mthca_eq *eq = eq_ptr; + struct mthca_dev *dev = eq->dev; + + mthca_eq_int(dev, eq); + arbel_set_eq_ci(dev, eq, eq->cons_index); + arbel_eq_req_not(dev, eq->eqn_mask); /* MSI-X vectors always belong to us */ return IRQ_HANDLED; @@ -467,10 +535,16 @@ MTHCA_EQ_OWNER_HW | MTHCA_EQ_STATE_ARMED | MTHCA_EQ_FLAG_TR); - eq_context->start = cpu_to_be64(0); - eq_context->logsize_usrpage = cpu_to_be32((ffs(nent) - 1) << 24 | - MTHCA_KAR_PAGE); - eq_context->pd = cpu_to_be32(dev->driver_pd.pd_num); + if (dev->hca_type == ARBEL_NATIVE) + eq_context->flags |= cpu_to_be32(MTHCA_EQ_STATE_ARBEL); + + eq_context->logsize_usrpage = cpu_to_be32((ffs(nent) - 1) << 24); + if (dev->hca_type == ARBEL_NATIVE) { + eq_context->arbel_pd = cpu_to_be32(dev->driver_pd.pd_num); + } else { + eq_context->logsize_usrpage |= cpu_to_be32(dev->driver_uar.index); + eq_context->tavor_pd = cpu_to_be32(dev->driver_pd.pd_num); + } eq_context->intr = intr; eq_context->lkey = cpu_to_be32(eq->mr.ibmr.lkey); @@ -489,10 +563,10 @@ kfree(dma_list); kfree(mailbox); - eq->ecr_mask = swab32(1 << eq->eqn); + eq->eqn_mask = swab32(1 << eq->eqn); eq->cons_index = 0; - eq_req_not(dev, eq->eqn); + dev->eq_table.arm_mask |= eq->eqn_mask; mthca_dbg(dev, "Allocated EQ %d with %d entries\n", eq->eqn, nent); @@ -544,6 +618,8 @@ mthca_warn(dev, "HW2SW_EQ returned status 0x%02x\n", status); + dev->eq_table.arm_mask &= ~eq->eqn_mask; + if (0) { mthca_dbg(dev, "Dumping EQ context %02x:\n", eq->eqn); for (i = 0; i < sizeof (struct mthca_eq_context) / 4; ++i) { @@ -555,7 +631,6 @@ } } - mthca_free_mr(dev, &eq->mr); for (i = 0; i < npages; ++i) pci_free_consistent(dev->pdev, PAGE_SIZE, @@ -578,6 +653,129 @@ dev->eq_table.eq + i); } +static int __devinit mthca_map_reg(struct mthca_dev *dev, + unsigned long offset, unsigned long size, + void __iomem **map) +{ + unsigned long base = pci_resource_start(dev->pdev, 0); + + if (!request_mem_region(base + offset, size, DRV_NAME)) + return -EBUSY; + + *map = ioremap(base + offset, size); + if (!*map) { + release_mem_region(base + offset, size); + return -ENOMEM; + } + + return 0; +} + +static void mthca_unmap_reg(struct mthca_dev *dev, unsigned long offset, + unsigned long size, void __iomem *map) +{ + unsigned long base = pci_resource_start(dev->pdev, 0); + + release_mem_region(base + offset, size); + iounmap(map); +} + +static int __devinit mthca_map_eq_regs(struct mthca_dev *dev) +{ + unsigned long mthca_base; + + mthca_base = pci_resource_start(dev->pdev, 0); + + if (dev->hca_type == ARBEL_NATIVE) { + /* + * We assume that the EQ arm and EQ set CI registers + * fall within the first BAR. We can't trust the + * values firmware gives us, since those addresses are + * valid on the HCA's side of the PCI bus but not + * necessarily the host side. + */ + if (mthca_map_reg(dev, (pci_resource_len(dev->pdev, 0) - 1) & + dev->fw.arbel.clr_int_base, MTHCA_CLR_INT_SIZE, + &dev->clr_base)) { + mthca_err(dev, "Couldn't map interrupt clear register, " + "aborting.\n"); + return -ENOMEM; + } + + /* + * Add 4 because we limit ourselves to EQs 0 ... 31, + * so we only need the low word of the register. + */ + if (mthca_map_reg(dev, ((pci_resource_len(dev->pdev, 0) - 1) & + dev->fw.arbel.eq_arm_base) + 4, 4, + &dev->eq_regs.arbel.eq_arm)) { + mthca_err(dev, "Couldn't map interrupt clear register, " + "aborting.\n"); + mthca_unmap_reg(dev, (pci_resource_len(dev->pdev, 0) - 1) & + dev->fw.arbel.clr_int_base, MTHCA_CLR_INT_SIZE, + dev->clr_base); + return -ENOMEM; + } + + if (mthca_map_reg(dev, (pci_resource_len(dev->pdev, 0) - 1) & + dev->fw.arbel.eq_set_ci_base, + MTHCA_EQ_SET_CI_SIZE, + &dev->eq_regs.arbel.eq_set_ci_base)) { + mthca_err(dev, "Couldn't map interrupt clear register, " + "aborting.\n"); + mthca_unmap_reg(dev, ((pci_resource_len(dev->pdev, 0) - 1) & + dev->fw.arbel.eq_arm_base) + 4, 4, + dev->eq_regs.arbel.eq_arm); + mthca_unmap_reg(dev, (pci_resource_len(dev->pdev, 0) - 1) & + dev->fw.arbel.clr_int_base, MTHCA_CLR_INT_SIZE, + dev->clr_base); + return -ENOMEM; + } + } else { + if (mthca_map_reg(dev, MTHCA_CLR_INT_BASE, MTHCA_CLR_INT_SIZE, + &dev->clr_base)) { + mthca_err(dev, "Couldn't map interrupt clear register, " + "aborting.\n"); + return -ENOMEM; + } + + if (mthca_map_reg(dev, MTHCA_ECR_BASE, + MTHCA_ECR_SIZE + MTHCA_ECR_CLR_SIZE, + &dev->eq_regs.tavor.ecr_base)) { + mthca_err(dev, "Couldn't map ecr register, " + "aborting.\n"); + mthca_unmap_reg(dev, MTHCA_CLR_INT_BASE, MTHCA_CLR_INT_SIZE, + dev->clr_base); + return -ENOMEM; + } + } + + return 0; + +} + +static void __devexit mthca_unmap_eq_regs(struct mthca_dev *dev) +{ + if (dev->hca_type == ARBEL_NATIVE) { + mthca_unmap_reg(dev, (pci_resource_len(dev->pdev, 0) - 1) & + dev->fw.arbel.eq_set_ci_base, + MTHCA_EQ_SET_CI_SIZE, + dev->eq_regs.arbel.eq_set_ci_base); + mthca_unmap_reg(dev, ((pci_resource_len(dev->pdev, 0) - 1) & + dev->fw.arbel.eq_arm_base) + 4, 4, + dev->eq_regs.arbel.eq_arm); + mthca_unmap_reg(dev, (pci_resource_len(dev->pdev, 0) - 1) & + dev->fw.arbel.clr_int_base, MTHCA_CLR_INT_SIZE, + dev->clr_base); + } else { + mthca_unmap_reg(dev, MTHCA_ECR_BASE, + MTHCA_ECR_SIZE + MTHCA_ECR_CLR_SIZE, + dev->eq_regs.tavor.ecr_base); + mthca_unmap_reg(dev, MTHCA_CLR_INT_BASE, MTHCA_CLR_INT_SIZE, + dev->clr_base); + } +} + int __devinit mthca_map_eq_icm(struct mthca_dev *dev, u64 icm_virt) { int ret; @@ -636,6 +834,10 @@ if (err) return err; + err = mthca_map_eq_regs(dev); + if (err) + goto err_out_free; + if (dev->mthca_flags & MTHCA_FLAG_MSI || dev->mthca_flags & MTHCA_FLAG_MSI_X) { dev->eq_table.clr_mask = 0; @@ -646,6 +848,8 @@ (dev->eq_table.inta_pin < 31 ? 4 : 0); } + dev->eq_table.arm_mask = 0; + intr = (dev->mthca_flags & MTHCA_FLAG_MSI) ? 128 : dev->eq_table.inta_pin; @@ -653,7 +857,7 @@ (dev->mthca_flags & MTHCA_FLAG_MSI_X) ? 128 : intr, &dev->eq_table.eq[MTHCA_EQ_COMP]); if (err) - goto err_out_free; + goto err_out_unmap; err = mthca_create_eq(dev, MTHCA_NUM_ASYNC_EQE, (dev->mthca_flags & MTHCA_FLAG_MSI_X) ? 129 : intr, @@ -676,15 +880,20 @@ for (i = 0; i < MTHCA_NUM_EQ; ++i) { err = request_irq(dev->eq_table.eq[i].msi_x_vector, - mthca_msi_x_interrupt, 0, - eq_name[i], dev->eq_table.eq + i); + dev->hca_type == ARBEL_NATIVE ? + mthca_arbel_msi_x_interrupt : + mthca_tavor_msi_x_interrupt, + 0, eq_name[i], dev->eq_table.eq + i); if (err) goto err_out_cmd; dev->eq_table.eq[i].have_irq = 1; } } else { - err = request_irq(dev->pdev->irq, mthca_interrupt, SA_SHIRQ, - DRV_NAME, dev); + err = request_irq(dev->pdev->irq, + dev->hca_type == ARBEL_NATIVE ? + mthca_arbel_interrupt : + mthca_tavor_interrupt, + SA_SHIRQ, DRV_NAME, dev); if (err) goto err_out_cmd; dev->eq_table.have_irq = 1; @@ -708,6 +917,12 @@ mthca_warn(dev, "MAP_EQ for cmd EQ %d returned status 0x%02x\n", dev->eq_table.eq[MTHCA_EQ_CMD].eqn, status); + for (i = 0; i < MTHCA_EQ_CMD; ++i) + if (dev->hca_type == ARBEL_NATIVE) + arbel_eq_req_not(dev, dev->eq_table.eq[i].eqn_mask); + else + tavor_eq_req_not(dev, dev->eq_table.eq[i].eqn); + return 0; err_out_cmd: @@ -720,6 +935,9 @@ err_out_comp: mthca_free_eq(dev, &dev->eq_table.eq[MTHCA_EQ_COMP]); +err_out_unmap: + mthca_unmap_eq_regs(dev); + err_out_free: mthca_alloc_cleanup(&dev->eq_table.alloc); return err; @@ -739,6 +957,8 @@ for (i = 0; i < MTHCA_NUM_EQ; ++i) mthca_free_eq(dev, &dev->eq_table.eq[i]); + + mthca_unmap_eq_regs(dev); mthca_alloc_cleanup(&dev->eq_table.alloc); } diff -Nru a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c --- a/drivers/infiniband/hw/mthca/mthca_main.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_main.c 2005-03-07 14:54:17 -08:00 @@ -171,6 +171,33 @@ mdev->limits.reserved_uars = dev_lim->reserved_uars; mdev->limits.reserved_pds = dev_lim->reserved_pds; + /* IB_DEVICE_RESIZE_MAX_WR not supported by driver. + May be doable since hardware supports it for SRQ. + + IB_DEVICE_N_NOTIFY_CQ is supported by hardware but not by driver. + + IB_DEVICE_SRQ_RESIZE is supported by hardware but SRQ is not + supported by driver. */ + mdev->device_cap_flags = IB_DEVICE_CHANGE_PHY_PORT | + IB_DEVICE_PORT_ACTIVE_EVENT | + IB_DEVICE_SYS_IMAGE_GUID | + IB_DEVICE_RC_RNR_NAK_GEN; + + if (dev_lim->flags & DEV_LIM_FLAG_BAD_PKEY_CNTR) + mdev->device_cap_flags |= IB_DEVICE_BAD_PKEY_CNTR; + + if (dev_lim->flags & DEV_LIM_FLAG_BAD_QKEY_CNTR) + mdev->device_cap_flags |= IB_DEVICE_BAD_QKEY_CNTR; + + if (dev_lim->flags & DEV_LIM_FLAG_RAW_MULTI) + mdev->device_cap_flags |= IB_DEVICE_RAW_MULTI; + + if (dev_lim->flags & DEV_LIM_FLAG_AUTO_PATH_MIG) + mdev->device_cap_flags |= IB_DEVICE_AUTO_PATH_MIG; + + if (dev_lim->flags & DEV_LIM_FLAG_UD_AV_PORT_ENFORCE) + mdev->device_cap_flags |= IB_DEVICE_UD_AV_PORT_ENFORCE; + if (dev_lim->flags & DEV_LIM_FLAG_SRQ) mdev->mthca_flags |= MTHCA_FLAG_SRQ; @@ -363,10 +390,9 @@ } mdev->mr_table.mtt_table = mthca_alloc_icm_table(mdev, init_hca->mtt_base, - mdev->limits.num_mtt_segs * init_hca->mtt_seg_sz, - mdev->limits.reserved_mtts * - init_hca->mtt_seg_sz, 1); + mdev->limits.num_mtt_segs, + mdev->limits.reserved_mtts, 1); if (!mdev->mr_table.mtt_table) { mthca_err(mdev, "Failed to map MTT context memory, aborting.\n"); err = -ENOMEM; @@ -374,10 +400,9 @@ } mdev->mr_table.mpt_table = mthca_alloc_icm_table(mdev, init_hca->mpt_base, - mdev->limits.num_mpts * dev_lim->mpt_entry_sz, - mdev->limits.reserved_mrws * - dev_lim->mpt_entry_sz, 1); + mdev->limits.num_mpts, + mdev->limits.reserved_mrws, 1); if (!mdev->mr_table.mpt_table) { mthca_err(mdev, "Failed to map MPT context memory, aborting.\n"); err = -ENOMEM; @@ -385,10 +410,9 @@ } mdev->qp_table.qp_table = mthca_alloc_icm_table(mdev, init_hca->qpc_base, - mdev->limits.num_qps * dev_lim->qpc_entry_sz, - mdev->limits.reserved_qps * - dev_lim->qpc_entry_sz, 1); + mdev->limits.num_qps, + mdev->limits.reserved_qps, 0); if (!mdev->qp_table.qp_table) { mthca_err(mdev, "Failed to map QP context memory, aborting.\n"); err = -ENOMEM; @@ -396,10 +420,9 @@ } mdev->qp_table.eqp_table = mthca_alloc_icm_table(mdev, init_hca->eqpc_base, - mdev->limits.num_qps * dev_lim->eqpc_entry_sz, - mdev->limits.reserved_qps * - dev_lim->eqpc_entry_sz, 1); + mdev->limits.num_qps, + mdev->limits.reserved_qps, 0); if (!mdev->qp_table.eqp_table) { mthca_err(mdev, "Failed to map EQP context memory, aborting.\n"); err = -ENOMEM; @@ -407,18 +430,38 @@ } mdev->cq_table.table = mthca_alloc_icm_table(mdev, init_hca->cqc_base, - mdev->limits.num_cqs * dev_lim->cqc_entry_sz, - mdev->limits.reserved_cqs * - dev_lim->cqc_entry_sz, 1); + mdev->limits.num_cqs, + mdev->limits.reserved_cqs, 0); if (!mdev->cq_table.table) { mthca_err(mdev, "Failed to map CQ context memory, aborting.\n"); err = -ENOMEM; goto err_unmap_eqp; } + /* + * It's not strictly required, but for simplicity just map the + * whole multicast group table now. The table isn't very big + * and it's a lot easier than trying to track ref counts. + */ + mdev->mcg_table.table = mthca_alloc_icm_table(mdev, init_hca->mc_base, + MTHCA_MGM_ENTRY_SIZE, + mdev->limits.num_mgms + + mdev->limits.num_amgms, + mdev->limits.num_mgms + + mdev->limits.num_amgms, + 0); + if (!mdev->mcg_table.table) { + mthca_err(mdev, "Failed to map MCG context memory, aborting.\n"); + err = -ENOMEM; + goto err_unmap_cq; + } + return 0; +err_unmap_cq: + mthca_free_icm_table(mdev, mdev->cq_table.table); + err_unmap_eqp: mthca_free_icm_table(mdev, mdev->qp_table.eqp_table); @@ -570,11 +613,33 @@ MTHCA_INIT_DOORBELL_LOCK(&dev->doorbell_lock); + err = mthca_init_uar_table(dev); + if (err) { + mthca_err(dev, "Failed to initialize " + "user access region table, aborting.\n"); + return err; + } + + err = mthca_uar_alloc(dev, &dev->driver_uar); + if (err) { + mthca_err(dev, "Failed to allocate driver access region, " + "aborting.\n"); + goto err_uar_table_free; + } + + dev->kar = ioremap(dev->driver_uar.pfn << PAGE_SHIFT, PAGE_SIZE); + if (!dev->kar) { + mthca_err(dev, "Couldn't map kernel access region, " + "aborting.\n"); + err = -ENOMEM; + goto err_uar_free; + } + err = mthca_init_pd_table(dev); if (err) { mthca_err(dev, "Failed to initialize " "protection domain table, aborting.\n"); - return err; + goto err_kar_unmap; } err = mthca_init_mr_table(dev); @@ -591,13 +656,6 @@ goto err_mr_table_free; } - if (dev->hca_type == ARBEL_NATIVE) { - mthca_warn(dev, "Sorry, native MT25208 mode support is not done, " - "aborting.\n"); - err = -ENODEV; - goto err_pd_free; - } - err = mthca_init_eq_table(dev); if (err) { mthca_err(dev, "Failed to initialize " @@ -621,8 +679,9 @@ mthca_err(dev, "BIOS or ACPI interrupt routing problem?\n"); goto err_cmd_poll; - } else - mthca_dbg(dev, "NOP command IRQ test passed\n"); + } + + mthca_dbg(dev, "NOP command IRQ test passed\n"); err = mthca_init_cq_table(dev); if (err) { @@ -677,6 +736,15 @@ err_pd_table_free: mthca_cleanup_pd_table(dev); + +err_kar_unmap: + iounmap(dev->kar); + +err_uar_free: + mthca_uar_free(dev, &dev->driver_uar); + +err_uar_table_free: + mthca_cleanup_uar_table(dev); return err; } @@ -686,37 +754,18 @@ int err; /* - * We request our first BAR in two chunks, since the MSI-X - * vector table is right in the middle. + * We can't just use pci_request_regions() because the MSI-X + * table is right in the middle of the first BAR. If we did + * pci_request_region and grab all of the first BAR, then + * setting up MSI-X would fail, since the PCI core wants to do + * request_mem_region on the MSI-X vector table. * - * This is why we can't just use pci_request_regions() -- if - * we did then setting up MSI-X would fail, since the PCI core - * wants to do request_mem_region on the MSI-X vector table. + * So just request what we need right now, and request any + * other regions we need when setting up EQs. */ - if (!request_mem_region(pci_resource_start(pdev, 0) + - MTHCA_HCR_BASE, - MTHCA_HCR_SIZE, - DRV_NAME)) { - err = -EBUSY; - goto err_hcr_failed; - } - - if (!request_mem_region(pci_resource_start(pdev, 0) + - MTHCA_ECR_BASE, - MTHCA_MAP_ECR_SIZE, - DRV_NAME)) { - err = -EBUSY; - goto err_ecr_failed; - } - - if (!request_mem_region(pci_resource_start(pdev, 0) + - MTHCA_CLR_INT_BASE, - MTHCA_CLR_INT_SIZE, - DRV_NAME)) { - err = -EBUSY; - goto err_int_failed; - } - + if (!request_mem_region(pci_resource_start(pdev, 0) + MTHCA_HCR_BASE, + MTHCA_HCR_SIZE, DRV_NAME)) + return -EBUSY; err = pci_request_region(pdev, 2, DRV_NAME); if (err) @@ -731,24 +780,11 @@ return 0; err_bar4_failed: - pci_release_region(pdev, 2); -err_bar2_failed: - - release_mem_region(pci_resource_start(pdev, 0) + - MTHCA_CLR_INT_BASE, - MTHCA_CLR_INT_SIZE); -err_int_failed: - - release_mem_region(pci_resource_start(pdev, 0) + - MTHCA_ECR_BASE, - MTHCA_MAP_ECR_SIZE); -err_ecr_failed: - release_mem_region(pci_resource_start(pdev, 0) + - MTHCA_HCR_BASE, +err_bar2_failed: + release_mem_region(pci_resource_start(pdev, 0) + MTHCA_HCR_BASE, MTHCA_HCR_SIZE); -err_hcr_failed: return err; } @@ -761,16 +797,7 @@ pci_release_region(pdev, 2); - release_mem_region(pci_resource_start(pdev, 0) + - MTHCA_CLR_INT_BASE, - MTHCA_CLR_INT_SIZE); - - release_mem_region(pci_resource_start(pdev, 0) + - MTHCA_ECR_BASE, - MTHCA_MAP_ECR_SIZE); - - release_mem_region(pci_resource_start(pdev, 0) + - MTHCA_HCR_BASE, + release_mem_region(pci_resource_start(pdev, 0) + MTHCA_HCR_BASE, MTHCA_HCR_SIZE); } @@ -828,9 +855,9 @@ const struct pci_device_id *id) { static int mthca_version_printed = 0; + static int mthca_memfree_warned = 0; int ddr_hidden = 0; int err; - unsigned long mthca_base; struct mthca_dev *mdev; if (!mthca_version_printed) { @@ -908,6 +935,10 @@ mdev->pdev = pdev; mdev->hca_type = id->driver_data; + if (mdev->hca_type == ARBEL_NATIVE && !mthca_memfree_warned++) + mthca_warn(mdev, "Warning: native MT25208 mode support is incomplete. " + "Your HCA may not work properly.\n"); + if (ddr_hidden) mdev->mthca_flags |= MTHCA_FLAG_DDR_HIDDEN; @@ -932,8 +963,7 @@ sema_init(&mdev->cmd.poll_sem, 1); mdev->cmd.use_events = 0; - mthca_base = pci_resource_start(pdev, 0); - mdev->hcr = ioremap(mthca_base + MTHCA_HCR_BASE, MTHCA_HCR_SIZE); + mdev->hcr = ioremap(pci_resource_start(pdev, 0) + MTHCA_HCR_BASE, MTHCA_HCR_SIZE); if (!mdev->hcr) { mthca_err(mdev, "Couldn't map command register, " "aborting.\n"); @@ -941,40 +971,13 @@ goto err_free_dev; } - mdev->clr_base = ioremap(mthca_base + MTHCA_CLR_INT_BASE, - MTHCA_CLR_INT_SIZE); - if (!mdev->clr_base) { - mthca_err(mdev, "Couldn't map interrupt clear register, " - "aborting.\n"); - err = -ENOMEM; - goto err_iounmap; - } - - mdev->ecr_base = ioremap(mthca_base + MTHCA_ECR_BASE, - MTHCA_ECR_SIZE + MTHCA_ECR_CLR_SIZE); - if (!mdev->ecr_base) { - mthca_err(mdev, "Couldn't map ecr register, " - "aborting.\n"); - err = -ENOMEM; - goto err_iounmap_clr; - } - - mthca_base = pci_resource_start(pdev, 2); - mdev->kar = ioremap(mthca_base + PAGE_SIZE * MTHCA_KAR_PAGE, PAGE_SIZE); - if (!mdev->kar) { - mthca_err(mdev, "Couldn't map kernel access region, " - "aborting.\n"); - err = -ENOMEM; - goto err_iounmap_ecr; - } - err = mthca_tune_pci(mdev); if (err) - goto err_iounmap_kar; + goto err_iounmap; err = mthca_init_hca(mdev); if (err) - goto err_iounmap_kar; + goto err_iounmap; err = mthca_setup_hca(mdev); if (err) @@ -1007,19 +1010,11 @@ mthca_cleanup_mr_table(mdev); mthca_cleanup_pd_table(mdev); + mthca_cleanup_uar_table(mdev); err_close: mthca_close_hca(mdev); -err_iounmap_kar: - iounmap(mdev->kar); - -err_iounmap_ecr: - iounmap(mdev->ecr_base); - -err_iounmap_clr: - iounmap(mdev->clr_base); - err_iounmap: iounmap(mdev->hcr); @@ -1065,11 +1060,13 @@ mthca_cleanup_mr_table(mdev); mthca_cleanup_pd_table(mdev); + iounmap(mdev->kar); + mthca_uar_free(mdev, &mdev->driver_uar); + mthca_cleanup_uar_table(mdev); + mthca_close_hca(mdev); iounmap(mdev->hcr); - iounmap(mdev->ecr_base); - iounmap(mdev->clr_base); if (mdev->mthca_flags & MTHCA_FLAG_MSI_X) pci_disable_msix(pdev); diff -Nru a/drivers/infiniband/hw/mthca/mthca_memfree.c b/drivers/infiniband/hw/mthca/mthca_memfree.c --- a/drivers/infiniband/hw/mthca/mthca_memfree.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_memfree.c 2005-03-07 14:54:16 -08:00 @@ -79,6 +79,7 @@ if (!icm) return icm; + icm->refcount = 0; INIT_LIST_HEAD(&icm->chunk_list); cur_order = get_order(MTHCA_ICM_ALLOC_SIZE); @@ -138,9 +139,62 @@ return NULL; } +int mthca_table_get(struct mthca_dev *dev, struct mthca_icm_table *table, int obj) +{ + int i = (obj & (table->num_obj - 1)) * table->obj_size / MTHCA_TABLE_CHUNK_SIZE; + int ret = 0; + u8 status; + + down(&table->mutex); + + if (table->icm[i]) { + ++table->icm[i]->refcount; + goto out; + } + + table->icm[i] = mthca_alloc_icm(dev, MTHCA_TABLE_CHUNK_SIZE >> PAGE_SHIFT, + (table->lowmem ? GFP_KERNEL : GFP_HIGHUSER) | + __GFP_NOWARN); + if (!table->icm[i]) { + ret = -ENOMEM; + goto out; + } + + if (mthca_MAP_ICM(dev, table->icm[i], table->virt + i * MTHCA_TABLE_CHUNK_SIZE, + &status) || status) { + mthca_free_icm(dev, table->icm[i]); + table->icm[i] = NULL; + ret = -ENOMEM; + goto out; + } + + ++table->icm[i]->refcount; + +out: + up(&table->mutex); + return ret; +} + +void mthca_table_put(struct mthca_dev *dev, struct mthca_icm_table *table, int obj) +{ + int i = (obj & (table->num_obj - 1)) * table->obj_size / MTHCA_TABLE_CHUNK_SIZE; + u8 status; + + down(&table->mutex); + + if (--table->icm[i]->refcount == 0) { + mthca_UNMAP_ICM(dev, table->virt + i * MTHCA_TABLE_CHUNK_SIZE, + MTHCA_TABLE_CHUNK_SIZE >> 12, &status); + mthca_free_icm(dev, table->icm[i]); + table->icm[i] = NULL; + } + + up(&table->mutex); +} + struct mthca_icm_table *mthca_alloc_icm_table(struct mthca_dev *dev, - u64 virt, unsigned size, - unsigned reserved, + u64 virt, int obj_size, + int nobj, int reserved, int use_lowmem) { struct mthca_icm_table *table; @@ -148,20 +202,23 @@ int i; u8 status; - num_icm = size / MTHCA_TABLE_CHUNK_SIZE; + num_icm = obj_size * nobj / MTHCA_TABLE_CHUNK_SIZE; table = kmalloc(sizeof *table + num_icm * sizeof *table->icm, GFP_KERNEL); if (!table) return NULL; - table->virt = virt; - table->num_icm = num_icm; - init_MUTEX(&table->sem); + table->virt = virt; + table->num_icm = num_icm; + table->num_obj = nobj; + table->obj_size = obj_size; + table->lowmem = use_lowmem; + init_MUTEX(&table->mutex); for (i = 0; i < num_icm; ++i) table->icm[i] = NULL; - for (i = 0; i < (reserved + MTHCA_TABLE_CHUNK_SIZE - 1) / MTHCA_TABLE_CHUNK_SIZE; ++i) { + for (i = 0; i * MTHCA_TABLE_CHUNK_SIZE < reserved * obj_size; ++i) { table->icm[i] = mthca_alloc_icm(dev, MTHCA_TABLE_CHUNK_SIZE >> PAGE_SHIFT, (use_lowmem ? GFP_KERNEL : GFP_HIGHUSER) | __GFP_NOWARN); @@ -173,6 +230,12 @@ table->icm[i] = NULL; goto err; } + + /* + * Add a reference to this ICM chunk so that it never + * gets freed (since it contains reserved firmware objects). + */ + ++table->icm[i]->refcount; } return table; @@ -203,4 +266,200 @@ } kfree(table); +} + +static u64 mthca_uarc_virt(struct mthca_dev *dev, int page) +{ + return dev->uar_table.uarc_base + + dev->driver_uar.index * dev->uar_table.uarc_size + + page * 4096; +} + +int mthca_alloc_db(struct mthca_dev *dev, int type, u32 qn, u32 **db) +{ + int group; + int start, end, dir; + int i, j; + struct mthca_db_page *page; + int ret = 0; + u8 status; + + down(&dev->db_tab->mutex); + + switch (type) { + case MTHCA_DB_TYPE_CQ_ARM: + case MTHCA_DB_TYPE_SQ: + group = 0; + start = 0; + end = dev->db_tab->max_group1; + dir = 1; + break; + + case MTHCA_DB_TYPE_CQ_SET_CI: + case MTHCA_DB_TYPE_RQ: + case MTHCA_DB_TYPE_SRQ: + group = 1; + start = dev->db_tab->npages - 1; + end = dev->db_tab->min_group2; + dir = -1; + break; + + default: + return -1; + } + + for (i = start; i != end; i += dir) + if (dev->db_tab->page[i].db_rec && + !bitmap_full(dev->db_tab->page[i].used, + MTHCA_DB_REC_PER_PAGE)) { + page = dev->db_tab->page + i; + goto found; + } + + if (dev->db_tab->max_group1 >= dev->db_tab->min_group2 - 1) { + ret = -ENOMEM; + goto out; + } + + page = dev->db_tab->page + end; + page->db_rec = dma_alloc_coherent(&dev->pdev->dev, 4096, + &page->mapping, GFP_KERNEL); + if (!page->db_rec) { + ret = -ENOMEM; + goto out; + } + memset(page->db_rec, 0, 4096); + + ret = mthca_MAP_ICM_page(dev, page->mapping, mthca_uarc_virt(dev, i), &status); + if (!ret && status) + ret = -EINVAL; + if (ret) { + dma_free_coherent(&dev->pdev->dev, 4096, + page->db_rec, page->mapping); + goto out; + } + + bitmap_zero(page->used, MTHCA_DB_REC_PER_PAGE); + if (group == 0) + ++dev->db_tab->max_group1; + else + --dev->db_tab->min_group2; + +found: + j = find_first_zero_bit(page->used, MTHCA_DB_REC_PER_PAGE); + set_bit(j, page->used); + + if (group == 1) + j = MTHCA_DB_REC_PER_PAGE - 1 - j; + + ret = i * MTHCA_DB_REC_PER_PAGE + j; + + page->db_rec[j] = cpu_to_be64((qn << 8) | (type << 5)); + + *db = (u32 *) &page->db_rec[j]; + +out: + up(&dev->db_tab->mutex); + + return ret; +} + +void mthca_free_db(struct mthca_dev *dev, int type, int db_index) +{ + int i, j; + struct mthca_db_page *page; + u8 status; + + i = db_index / MTHCA_DB_REC_PER_PAGE; + j = db_index % MTHCA_DB_REC_PER_PAGE; + + page = dev->db_tab->page + i; + + down(&dev->db_tab->mutex); + + page->db_rec[j] = 0; + if (i >= dev->db_tab->min_group2) + j = MTHCA_DB_REC_PER_PAGE - 1 - j; + clear_bit(j, page->used); + + if (bitmap_empty(page->used, MTHCA_DB_REC_PER_PAGE) && + i >= dev->db_tab->max_group1 - 1) { + mthca_UNMAP_ICM(dev, mthca_uarc_virt(dev, i), 1, &status); + + dma_free_coherent(&dev->pdev->dev, 4096, + page->db_rec, page->mapping); + page->db_rec = NULL; + + if (i == dev->db_tab->max_group1) { + --dev->db_tab->max_group1; + /* XXX may be able to unmap more pages now */ + } + if (i == dev->db_tab->min_group2) + ++dev->db_tab->min_group2; + } + + up(&dev->db_tab->mutex); +} + +int mthca_init_db_tab(struct mthca_dev *dev) +{ + int i; + + if (dev->hca_type != ARBEL_NATIVE) + return 0; + + dev->db_tab = kmalloc(sizeof *dev->db_tab, GFP_KERNEL); + if (!dev->db_tab) + return -ENOMEM; + + init_MUTEX(&dev->db_tab->mutex); + + dev->db_tab->npages = dev->uar_table.uarc_size / PAGE_SIZE; + dev->db_tab->max_group1 = 0; + dev->db_tab->min_group2 = dev->db_tab->npages - 1; + + dev->db_tab->page = kmalloc(dev->db_tab->npages * + sizeof *dev->db_tab->page, + GFP_KERNEL); + if (!dev->db_tab->page) { + kfree(dev->db_tab); + return -ENOMEM; + } + + for (i = 0; i < dev->db_tab->npages; ++i) + dev->db_tab->page[i].db_rec = NULL; + + return 0; +} + +void mthca_cleanup_db_tab(struct mthca_dev *dev) +{ + int i; + u8 status; + + if (dev->hca_type != ARBEL_NATIVE) + return; + + /* + * Because we don't always free our UARC pages when they + * become empty to make mthca_free_db() simpler we need to + * make a sweep through the doorbell pages and free any + * leftover pages now. + */ + for (i = 0; i < dev->db_tab->npages; ++i) { + if (!dev->db_tab->page[i].db_rec) + continue; + + if (!bitmap_empty(dev->db_tab->page[i].used, MTHCA_DB_REC_PER_PAGE)) + mthca_warn(dev, "Kernel UARC page %d not empty\n", i); + + mthca_UNMAP_ICM(dev, mthca_uarc_virt(dev, i), 1, &status); + + dma_free_coherent(&dev->pdev->dev, 4096, + dev->db_tab->page[i].db_rec, + dev->db_tab->page[i].mapping); + } + + kfree(dev->db_tab->page); + kfree(dev->db_tab); } diff -Nru a/drivers/infiniband/hw/mthca/mthca_memfree.h b/drivers/infiniband/hw/mthca/mthca_memfree.h --- a/drivers/infiniband/hw/mthca/mthca_memfree.h 2005-03-07 14:54:17 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_memfree.h 2005-03-07 14:54:17 -08:00 @@ -53,12 +53,16 @@ struct mthca_icm { struct list_head chunk_list; + int refcount; }; struct mthca_icm_table { u64 virt; int num_icm; - struct semaphore sem; + int num_obj; + int obj_size; + int lowmem; + struct semaphore mutex; struct mthca_icm *icm[0]; }; @@ -75,10 +79,12 @@ void mthca_free_icm(struct mthca_dev *dev, struct mthca_icm *icm); struct mthca_icm_table *mthca_alloc_icm_table(struct mthca_dev *dev, - u64 virt, unsigned size, - unsigned reserved, + u64 virt, int obj_size, + int nobj, int reserved, int use_lowmem); void mthca_free_icm_table(struct mthca_dev *dev, struct mthca_icm_table *table); +int mthca_table_get(struct mthca_dev *dev, struct mthca_icm_table *table, int obj); +void mthca_table_put(struct mthca_dev *dev, struct mthca_icm_table *table, int obj); static inline void mthca_icm_first(struct mthca_icm *icm, struct mthca_icm_iter *iter) @@ -118,5 +124,38 @@ { return sg_dma_len(&iter->chunk->mem[iter->page_idx]); } + +enum { + MTHCA_DB_REC_PER_PAGE = 4096 / 8 +}; + +struct mthca_db_page { + DECLARE_BITMAP(used, MTHCA_DB_REC_PER_PAGE); + u64 *db_rec; + dma_addr_t mapping; +}; + +struct mthca_db_table { + int npages; + int max_group1; + int min_group2; + struct mthca_db_page *page; + struct semaphore mutex; +}; + +enum { + MTHCA_DB_TYPE_INVALID = 0x0, + MTHCA_DB_TYPE_CQ_SET_CI = 0x1, + MTHCA_DB_TYPE_CQ_ARM = 0x2, + MTHCA_DB_TYPE_SQ = 0x3, + MTHCA_DB_TYPE_RQ = 0x4, + MTHCA_DB_TYPE_SRQ = 0x5, + MTHCA_DB_TYPE_GROUP_SEP = 0x7 +}; + +int mthca_init_db_tab(struct mthca_dev *dev); +void mthca_cleanup_db_tab(struct mthca_dev *dev); +int mthca_alloc_db(struct mthca_dev *dev, int type, u32 qn, u32 **db); +void mthca_free_db(struct mthca_dev *dev, int type, int db_index); #endif /* MTHCA_MEMFREE_H */ diff -Nru a/drivers/infiniband/hw/mthca/mthca_mr.c b/drivers/infiniband/hw/mthca/mthca_mr.c --- a/drivers/infiniband/hw/mthca/mthca_mr.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_mr.c 2005-03-07 14:54:18 -08:00 @@ -53,7 +53,8 @@ u32 window_count; u32 window_count_limit; u64 mtt_seg; - u32 reserved[3]; + u32 mtt_sz; /* Arbel only */ + u32 reserved[2]; } __attribute__((packed)); #define MTHCA_MPT_FLAG_SW_OWNS (0xfUL << 28) @@ -121,21 +122,38 @@ spin_unlock(&dev->mr_table.mpt_alloc.lock); } +static inline u32 hw_index_to_key(struct mthca_dev *dev, u32 ind) +{ + if (dev->hca_type == ARBEL_NATIVE) + return (ind >> 24) | (ind << 8); + else + return ind; +} + +static inline u32 key_to_hw_index(struct mthca_dev *dev, u32 key) +{ + if (dev->hca_type == ARBEL_NATIVE) + return (key << 24) | (key >> 8); + else + return key; +} + int mthca_mr_alloc_notrans(struct mthca_dev *dev, u32 pd, u32 access, struct mthca_mr *mr) { void *mailbox; struct mthca_mpt_entry *mpt_entry; + u32 key; int err; u8 status; might_sleep(); mr->order = -1; - mr->ibmr.lkey = mthca_alloc(&dev->mr_table.mpt_alloc); - if (mr->ibmr.lkey == -1) + key = mthca_alloc(&dev->mr_table.mpt_alloc); + if (key == -1) return -ENOMEM; - mr->ibmr.rkey = mr->ibmr.lkey; + mr->ibmr.rkey = mr->ibmr.lkey = hw_index_to_key(dev, key); mailbox = kmalloc(sizeof *mpt_entry + MTHCA_CMD_MAILBOX_EXTRA, GFP_KERNEL); @@ -151,7 +169,7 @@ MTHCA_MPT_FLAG_REGION | access); mpt_entry->page_size = 0; - mpt_entry->key = cpu_to_be32(mr->ibmr.lkey); + mpt_entry->key = cpu_to_be32(key); mpt_entry->pd = cpu_to_be32(pd); mpt_entry->start = 0; mpt_entry->length = ~0ULL; @@ -160,7 +178,7 @@ sizeof *mpt_entry - offsetof(struct mthca_mpt_entry, lkey)); err = mthca_SW2HW_MPT(dev, mpt_entry, - mr->ibmr.lkey & (dev->limits.num_mpts - 1), + key & (dev->limits.num_mpts - 1), &status); if (err) mthca_warn(dev, "SW2HW_MPT failed (%d)\n", err); @@ -182,6 +200,7 @@ void *mailbox; u64 *mtt_entry; struct mthca_mpt_entry *mpt_entry; + u32 key; int err = -ENOMEM; u8 status; int i; @@ -189,10 +208,10 @@ might_sleep(); WARN_ON(buffer_size_shift >= 32); - mr->ibmr.lkey = mthca_alloc(&dev->mr_table.mpt_alloc); - if (mr->ibmr.lkey == -1) + key = mthca_alloc(&dev->mr_table.mpt_alloc); + if (key == -1) return -ENOMEM; - mr->ibmr.rkey = mr->ibmr.lkey; + mr->ibmr.rkey = mr->ibmr.lkey = hw_index_to_key(dev, key); for (i = dev->limits.mtt_seg_size / 8, mr->order = 0; i < list_len; @@ -254,7 +273,7 @@ access); mpt_entry->page_size = cpu_to_be32(buffer_size_shift - 12); - mpt_entry->key = cpu_to_be32(mr->ibmr.lkey); + mpt_entry->key = cpu_to_be32(key); mpt_entry->pd = cpu_to_be32(pd); mpt_entry->start = cpu_to_be64(iova); mpt_entry->length = cpu_to_be64(total_size); @@ -275,7 +294,7 @@ } err = mthca_SW2HW_MPT(dev, mpt_entry, - mr->ibmr.lkey & (dev->limits.num_mpts - 1), + key & (dev->limits.num_mpts - 1), &status); if (err) mthca_warn(dev, "SW2HW_MPT failed (%d)\n", err); @@ -307,7 +326,8 @@ might_sleep(); err = mthca_HW2SW_MPT(dev, NULL, - mr->ibmr.lkey & (dev->limits.num_mpts - 1), + key_to_hw_index(dev, mr->ibmr.lkey) & + (dev->limits.num_mpts - 1), &status); if (err) mthca_warn(dev, "HW2SW_MPT failed (%d)\n", err); @@ -318,7 +338,7 @@ if (mr->order >= 0) mthca_free_mtt(dev, mr->first_seg, mr->order); - mthca_free(&dev->mr_table.mpt_alloc, mr->ibmr.lkey); + mthca_free(&dev->mr_table.mpt_alloc, key_to_hw_index(dev, mr->ibmr.lkey)); } int __devinit mthca_init_mr_table(struct mthca_dev *dev) diff -Nru a/drivers/infiniband/hw/mthca/mthca_profile.c b/drivers/infiniband/hw/mthca/mthca_profile.c --- a/drivers/infiniband/hw/mthca/mthca_profile.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_profile.c 2005-03-07 14:54:18 -08:00 @@ -236,15 +236,20 @@ init_hca->mtt_seg_sz = ffs(dev_lim->mtt_seg_sz) - 7; break; case MTHCA_RES_UAR: + dev->limits.num_uars = profile[i].num; init_hca->uar_scratch_base = profile[i].start; break; case MTHCA_RES_UDAV: dev->av_table.ddr_av_base = profile[i].start; dev->av_table.num_ddr_avs = profile[i].num; + break; case MTHCA_RES_UARC: - init_hca->uarc_base = profile[i].start; - init_hca->log_uarc_sz = ffs(request->uarc_size) - 13; - init_hca->log_uar_sz = ffs(request->num_uar) - 1; + dev->uar_table.uarc_size = request->uarc_size; + dev->uar_table.uarc_base = profile[i].start; + init_hca->uarc_base = profile[i].start; + init_hca->log_uarc_sz = ffs(request->uarc_size) - 13; + init_hca->log_uar_sz = ffs(request->num_uar) - 1; + break; default: break; } diff -Nru a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c --- a/drivers/infiniband/hw/mthca/mthca_provider.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_provider.c 2005-03-07 14:54:18 -08:00 @@ -43,6 +43,8 @@ struct ib_smp *in_mad = NULL; struct ib_smp *out_mad = NULL; int err = -ENOMEM; + struct mthca_dev* mdev = to_mdev(ibdev); + u8 status; in_mad = kmalloc(sizeof *in_mad, GFP_KERNEL); @@ -50,7 +52,7 @@ if (!in_mad || !out_mad) goto out; - props->fw_ver = to_mdev(ibdev)->fw_ver; + props->fw_ver = mdev->fw_ver; memset(in_mad, 0, sizeof *in_mad); in_mad->base_version = 1; @@ -59,7 +61,7 @@ in_mad->method = IB_MGMT_METHOD_GET; in_mad->attr_id = IB_SMP_ATTR_NODE_INFO; - err = mthca_MAD_IFC(to_mdev(ibdev), 1, 1, + err = mthca_MAD_IFC(mdev, 1, 1, 1, NULL, NULL, in_mad, out_mad, &status); if (err) @@ -69,10 +71,11 @@ goto out; } - props->vendor_id = be32_to_cpup((u32 *) (out_mad->data + 36)) & + props->device_cap_flags = mdev->device_cap_flags; + props->vendor_id = be32_to_cpup((u32 *) (out_mad->data + 36)) & 0xffffff; - props->vendor_part_id = be16_to_cpup((u16 *) (out_mad->data + 30)); - props->hw_ver = be16_to_cpup((u16 *) (out_mad->data + 32)); + props->vendor_part_id = be16_to_cpup((u16 *) (out_mad->data + 30)); + props->hw_ver = be16_to_cpup((u16 *) (out_mad->data + 32)); memcpy(&props->sys_image_guid, out_mad->data + 4, 8); memcpy(&props->node_guid, out_mad->data + 12, 8); @@ -343,7 +346,7 @@ to_mcq(init_attr->send_cq), to_mcq(init_attr->recv_cq), init_attr->qp_type, init_attr->sq_sig_type, - init_attr->rq_sig_type, qp); + qp); qp->ibqp.qp_num = qp->qpn; break; } @@ -364,7 +367,7 @@ err = mthca_alloc_sqp(to_mdev(pd->device), to_mpd(pd), to_mcq(init_attr->send_cq), to_mcq(init_attr->recv_cq), - init_attr->sq_sig_type, init_attr->rq_sig_type, + init_attr->sq_sig_type, qp->ibqp.qp_num, init_attr->port_num, to_msqp(qp)); break; @@ -408,8 +411,7 @@ if (err) { kfree(cq); cq = ERR_PTR(err); - } else - cq->ibcq.cqe = nent - 1; + } return &cq->ibcq; } @@ -422,13 +424,6 @@ return 0; } -static int mthca_req_notify_cq(struct ib_cq *cq, enum ib_cq_notify notify) -{ - mthca_arm_cq(to_mdev(cq->device), to_mcq(cq), - notify == IB_CQ_SOLICITED); - return 0; -} - static inline u32 convert_access(int acc) { return (acc & IB_ACCESS_REMOTE_ATOMIC ? MTHCA_MPT_FLAG_ATOMIC : 0) | @@ -621,18 +616,25 @@ dev->ib_dev.create_qp = mthca_create_qp; dev->ib_dev.modify_qp = mthca_modify_qp; dev->ib_dev.destroy_qp = mthca_destroy_qp; - dev->ib_dev.post_send = mthca_post_send; - dev->ib_dev.post_recv = mthca_post_receive; dev->ib_dev.create_cq = mthca_create_cq; dev->ib_dev.destroy_cq = mthca_destroy_cq; dev->ib_dev.poll_cq = mthca_poll_cq; - dev->ib_dev.req_notify_cq = mthca_req_notify_cq; dev->ib_dev.get_dma_mr = mthca_get_dma_mr; dev->ib_dev.reg_phys_mr = mthca_reg_phys_mr; dev->ib_dev.dereg_mr = mthca_dereg_mr; dev->ib_dev.attach_mcast = mthca_multicast_attach; dev->ib_dev.detach_mcast = mthca_multicast_detach; dev->ib_dev.process_mad = mthca_process_mad; + + if (dev->hca_type == ARBEL_NATIVE) { + dev->ib_dev.req_notify_cq = mthca_arbel_arm_cq; + dev->ib_dev.post_send = mthca_arbel_post_send; + dev->ib_dev.post_recv = mthca_arbel_post_receive; + } else { + dev->ib_dev.req_notify_cq = mthca_tavor_arm_cq; + dev->ib_dev.post_send = mthca_tavor_post_send; + dev->ib_dev.post_recv = mthca_tavor_post_receive; + } init_MUTEX(&dev->cap_mask_mutex); diff -Nru a/drivers/infiniband/hw/mthca/mthca_provider.h b/drivers/infiniband/hw/mthca/mthca_provider.h --- a/drivers/infiniband/hw/mthca/mthca_provider.h 2005-03-07 14:54:17 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_provider.h 2005-03-07 14:54:17 -08:00 @@ -49,6 +49,11 @@ DECLARE_PCI_UNMAP_ADDR(mapping) }; +struct mthca_uar { + unsigned long pfn; + int index; +}; + struct mthca_mr { struct ib_mr ibmr; int order; @@ -65,7 +70,7 @@ struct mthca_eq { struct mthca_dev *dev; int eqn; - u32 ecr_mask; + u32 eqn_mask; u32 cons_index; u16 msi_x_vector; u16 msi_x_entry; @@ -77,12 +82,18 @@ struct mthca_av; +enum mthca_ah_type { + MTHCA_AH_ON_HCA, + MTHCA_AH_PCI_POOL, + MTHCA_AH_KMALLOC +}; + struct mthca_ah { - struct ib_ah ibah; - int on_hca; - u32 key; - struct mthca_av *av; - dma_addr_t avdma; + struct ib_ah ibah; + enum mthca_ah_type type; + u32 key; + struct mthca_av *av; + dma_addr_t avdma; }; /* @@ -136,8 +147,16 @@ spinlock_t lock; atomic_t refcount; int cqn; - int cons_index; + u32 cons_index; int is_direct; + + /* Next fields are Arbel only */ + int set_ci_db_index; + u32 *set_ci_db; + int arm_db_index; + u32 *arm_db; + int arm_sn; + union { struct mthca_buf_list direct; struct mthca_buf_list *page_list; @@ -147,19 +166,22 @@ }; struct mthca_wq { - int max; - int cur; - int next; - int last_comp; - void *last; - int max_gs; - int wqe_shift; - enum ib_sig_type policy; + spinlock_t lock; + int max; + unsigned next_ind; + unsigned last_comp; + unsigned head; + unsigned tail; + void *last; + int max_gs; + int wqe_shift; + + int db_index; /* Arbel only */ + u32 *db; }; struct mthca_qp { struct ib_qp ibqp; - spinlock_t lock; atomic_t refcount; u32 qpn; int is_direct; @@ -172,6 +194,7 @@ struct mthca_wq rq; struct mthca_wq sq; + enum ib_sig_type sq_policy; int send_wqe_offset; u64 *wrid; diff -Nru a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c --- a/drivers/infiniband/hw/mthca/mthca_qp.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_qp.c 2005-03-07 14:54:16 -08:00 @@ -40,6 +40,7 @@ #include "mthca_dev.h" #include "mthca_cmd.h" +#include "mthca_memfree.h" enum { MTHCA_MAX_DIRECT_QP_SIZE = 4 * PAGE_SIZE, @@ -105,8 +106,11 @@ struct mthca_qp_context { u32 flags; - u32 sched_queue; - u32 mtu_msgmax; + u32 tavor_sched_queue; /* Reserved on Arbel */ + u8 mtu_msgmax; + u8 rq_size_stride; /* Reserved on Tavor */ + u8 sq_size_stride; /* Reserved on Tavor */ + u8 rlkey_arbel_sched_queue; /* Reserved on Tavor */ u32 usr_page; u32 local_qpn; u32 remote_qpn; @@ -121,18 +125,22 @@ u32 reserved2; u32 next_send_psn; u32 cqn_snd; - u32 next_snd_wqe[2]; + u32 snd_wqe_base_l; /* Next send WQE on Tavor */ + u32 snd_db_index; /* (debugging only entries) */ u32 last_acked_psn; u32 ssn; u32 params2; u32 rnr_nextrecvpsn; u32 ra_buff_indx; u32 cqn_rcv; - u32 next_rcv_wqe[2]; + u32 rcv_wqe_base_l; /* Next recv WQE on Tavor */ + u32 rcv_db_index; /* (debugging only entries) */ u32 qkey; u32 srqn; u32 rmsn; - u32 reserved3[19]; + u16 rq_wqe_counter; /* reserved on Tavor */ + u16 sq_wqe_counter; /* reserved on Tavor */ + u32 reserved3[18]; } __attribute__((packed)); struct mthca_qp_param { @@ -193,7 +201,7 @@ u32 imm; /* immediate data */ }; -struct mthca_ud_seg { +struct mthca_tavor_ud_seg { u32 reserved1; u32 lkey; u64 av_addr; @@ -203,6 +211,13 @@ u32 reserved3[2]; }; +struct mthca_arbel_ud_seg { + u32 av[8]; + u32 dqpn; + u32 qkey; + u32 reserved[2]; +}; + struct mthca_bind_seg { u32 flags; /* [31] Atomic [30] rem write [29] rem read */ u32 reserved; @@ -238,6 +253,16 @@ u16 vcrc; }; +static const u8 mthca_opcode[] = { + [IB_WR_SEND] = MTHCA_OPCODE_SEND, + [IB_WR_SEND_WITH_IMM] = MTHCA_OPCODE_SEND_IMM, + [IB_WR_RDMA_WRITE] = MTHCA_OPCODE_RDMA_WRITE, + [IB_WR_RDMA_WRITE_WITH_IMM] = MTHCA_OPCODE_RDMA_WRITE_IMM, + [IB_WR_RDMA_READ] = MTHCA_OPCODE_RDMA_READ, + [IB_WR_ATOMIC_CMP_AND_SWP] = MTHCA_OPCODE_ATOMIC_CS, + [IB_WR_ATOMIC_FETCH_AND_ADD] = MTHCA_OPCODE_ATOMIC_FA, +}; + static int is_sqp(struct mthca_dev *dev, struct mthca_qp *qp) { return qp->qpn >= dev->qp_table.sqp_start && @@ -552,9 +577,11 @@ else cur_state = attr->cur_qp_state; } else { - spin_lock_irq(&qp->lock); + spin_lock_irq(&qp->sq.lock); + spin_lock(&qp->rq.lock); cur_state = qp->state; - spin_unlock_irq(&qp->lock); + spin_unlock(&qp->rq.lock); + spin_unlock_irq(&qp->sq.lock); } if (attr_mask & IB_QP_STATE) { @@ -617,15 +644,24 @@ break; } } - /* leave sched_queue as 0 */ + + /* leave tavor_sched_queue as 0 */ + if (qp->transport == MLX || qp->transport == UD) - qp_context->mtu_msgmax = cpu_to_be32((IB_MTU_2048 << 29) | - (11 << 24)); - else if (attr_mask & IB_QP_PATH_MTU) { - qp_context->mtu_msgmax = cpu_to_be32((attr->path_mtu << 29) | - (31 << 24)); + qp_context->mtu_msgmax = (IB_MTU_2048 << 5) | 11; + else if (attr_mask & IB_QP_PATH_MTU) + qp_context->mtu_msgmax = (attr->path_mtu << 5) | 31; + + if (dev->hca_type == ARBEL_NATIVE) { + qp_context->rq_size_stride = + ((ffs(qp->rq.max) - 1) << 3) | (qp->rq.wqe_shift - 4); + qp_context->sq_size_stride = + ((ffs(qp->sq.max) - 1) << 3) | (qp->sq.wqe_shift - 4); } - qp_context->usr_page = cpu_to_be32(MTHCA_KAR_PAGE); + + /* leave arbel_sched_queue as 0 */ + + qp_context->usr_page = cpu_to_be32(dev->driver_uar.index); qp_context->local_qpn = cpu_to_be32(qp->qpn); if (attr_mask & IB_QP_DEST_QPN) { qp_context->remote_qpn = cpu_to_be32(attr->dest_qp_num); @@ -690,7 +726,7 @@ MTHCA_QP_BIT_SRE | MTHCA_QP_BIT_SWE | MTHCA_QP_BIT_SAE); - if (qp->sq.policy == IB_SIGNAL_ALL_WR) + if (qp->sq_policy == IB_SIGNAL_ALL_WR) qp_context->params1 |= cpu_to_be32(MTHCA_QP_BIT_SSC); if (attr_mask & IB_QP_RETRY_CNT) { qp_context->params1 |= cpu_to_be32(attr->retry_cnt << 16); @@ -708,6 +744,11 @@ qp_context->next_send_psn = cpu_to_be32(attr->sq_psn); qp_context->cqn_snd = cpu_to_be32(to_mcq(ibqp->send_cq)->cqn); + if (dev->hca_type == ARBEL_NATIVE) { + qp_context->snd_wqe_base_l = cpu_to_be32(qp->send_wqe_offset); + qp_context->snd_db_index = cpu_to_be32(qp->sq.db_index); + } + if (attr_mask & IB_QP_ACCESS_FLAGS) { /* * Only enable RDMA/atomics if we have responder @@ -778,8 +819,8 @@ qp->resp_depth = attr->max_rd_atomic; } - if (qp->rq.policy == IB_SIGNAL_ALL_WR) - qp_context->params2 |= cpu_to_be32(MTHCA_QP_BIT_RSC); + qp_context->params2 |= cpu_to_be32(MTHCA_QP_BIT_RSC); + if (attr_mask & IB_QP_MIN_RNR_TIMER) { qp_context->rnr_nextrecvpsn |= cpu_to_be32(attr->min_rnr_timer << 24); qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_RNR_TIMEOUT); @@ -787,12 +828,16 @@ if (attr_mask & IB_QP_RQ_PSN) qp_context->rnr_nextrecvpsn |= cpu_to_be32(attr->rq_psn); - qp_context->ra_buff_indx = dev->qp_table.rdb_base + - ((qp->qpn & (dev->limits.num_qps - 1)) * MTHCA_RDB_ENTRY_SIZE << - dev->qp_table.rdb_shift); + qp_context->ra_buff_indx = + cpu_to_be32(dev->qp_table.rdb_base + + ((qp->qpn & (dev->limits.num_qps - 1)) * MTHCA_RDB_ENTRY_SIZE << + dev->qp_table.rdb_shift)); qp_context->cqn_rcv = cpu_to_be32(to_mcq(ibqp->recv_cq)->cqn); + if (dev->hca_type == ARBEL_NATIVE) + qp_context->rcv_db_index = cpu_to_be32(qp->rq.db_index); + if (attr_mask & IB_QP_QKEY) { qp_context->qkey = cpu_to_be32(attr->qkey); qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_Q_KEY); @@ -860,12 +905,20 @@ size = sizeof (struct mthca_next_seg) + qp->sq.max_gs * sizeof (struct mthca_data_seg); - if (qp->transport == MLX) + switch (qp->transport) { + case MLX: size += 2 * sizeof (struct mthca_data_seg); - else if (qp->transport == UD) - size += sizeof (struct mthca_ud_seg); - else /* bind seg is as big as atomic + raddr segs */ + break; + case UD: + if (dev->hca_type == ARBEL_NATIVE) + size += sizeof (struct mthca_arbel_ud_seg); + else + size += sizeof (struct mthca_tavor_ud_seg); + break; + default: + /* bind seg is as big as atomic + raddr segs */ size += sizeof (struct mthca_bind_seg); + } for (qp->sq.wqe_shift = 6; 1 << qp->sq.wqe_shift < size; qp->sq.wqe_shift++) @@ -942,7 +995,6 @@ err = mthca_mr_alloc_phys(dev, pd->pd_num, dma_list, shift, npages, 0, size, - MTHCA_MPT_FLAG_LOCAL_WRITE | MTHCA_MPT_FLAG_LOCAL_READ, &qp->mr); if (err) @@ -972,34 +1024,134 @@ return err; } +static int mthca_alloc_memfree(struct mthca_dev *dev, + struct mthca_qp *qp) +{ + int ret = 0; + + if (dev->hca_type == ARBEL_NATIVE) { + ret = mthca_table_get(dev, dev->qp_table.qp_table, qp->qpn); + if (ret) + return ret; + + ret = mthca_table_get(dev, dev->qp_table.eqp_table, qp->qpn); + if (ret) + goto err_qpc; + + qp->rq.db_index = mthca_alloc_db(dev, MTHCA_DB_TYPE_RQ, + qp->qpn, &qp->rq.db); + if (qp->rq.db_index < 0) { + ret = -ENOMEM; + goto err_eqpc; + } + + qp->sq.db_index = mthca_alloc_db(dev, MTHCA_DB_TYPE_SQ, + qp->qpn, &qp->sq.db); + if (qp->sq.db_index < 0) { + ret = -ENOMEM; + goto err_rq_db; + } + } + + return 0; + +err_rq_db: + mthca_free_db(dev, MTHCA_DB_TYPE_RQ, qp->rq.db_index); + +err_eqpc: + mthca_table_put(dev, dev->qp_table.eqp_table, qp->qpn); + +err_qpc: + mthca_table_put(dev, dev->qp_table.qp_table, qp->qpn); + + return ret; +} + +static void mthca_free_memfree(struct mthca_dev *dev, + struct mthca_qp *qp) +{ + if (dev->hca_type == ARBEL_NATIVE) { + mthca_free_db(dev, MTHCA_DB_TYPE_SQ, qp->sq.db_index); + mthca_free_db(dev, MTHCA_DB_TYPE_RQ, qp->rq.db_index); + mthca_table_put(dev, dev->qp_table.eqp_table, qp->qpn); + mthca_table_put(dev, dev->qp_table.qp_table, qp->qpn); + } +} + +static void mthca_wq_init(struct mthca_wq* wq) +{ + spin_lock_init(&wq->lock); + wq->next_ind = 0; + wq->last_comp = wq->max - 1; + wq->head = 0; + wq->tail = 0; + wq->last = NULL; +} + static int mthca_alloc_qp_common(struct mthca_dev *dev, struct mthca_pd *pd, struct mthca_cq *send_cq, struct mthca_cq *recv_cq, enum ib_sig_type send_policy, - enum ib_sig_type recv_policy, struct mthca_qp *qp) { - int err; + struct mthca_next_seg *wqe; + int ret; + int i; - spin_lock_init(&qp->lock); atomic_set(&qp->refcount, 1); qp->state = IB_QPS_RESET; qp->atomic_rd_en = 0; qp->resp_depth = 0; - qp->sq.policy = send_policy; - qp->rq.policy = recv_policy; - qp->rq.cur = 0; - qp->sq.cur = 0; - qp->rq.next = 0; - qp->sq.next = 0; - qp->rq.last_comp = qp->rq.max - 1; - qp->sq.last_comp = qp->sq.max - 1; - qp->rq.last = NULL; - qp->sq.last = NULL; + qp->sq_policy = send_policy; + mthca_wq_init(&qp->sq); + mthca_wq_init(&qp->rq); + + ret = mthca_alloc_memfree(dev, qp); + if (ret) + return ret; + + ret = mthca_alloc_wqe_buf(dev, pd, qp); + if (ret) { + mthca_free_memfree(dev, qp); + return ret; + } + + if (dev->hca_type == ARBEL_NATIVE) { + for (i = 0; i < qp->rq.max; ++i) { + wqe = get_recv_wqe(qp, i); + wqe->nda_op = cpu_to_be32(((i + 1) & (qp->rq.max - 1)) << + qp->rq.wqe_shift); + wqe->ee_nds = cpu_to_be32(1 << (qp->rq.wqe_shift - 4)); + } + + for (i = 0; i < qp->sq.max; ++i) { + wqe = get_send_wqe(qp, i); + wqe->nda_op = cpu_to_be32((((i + 1) & (qp->sq.max - 1)) << + qp->sq.wqe_shift) + + qp->send_wqe_offset); + } + } - err = mthca_alloc_wqe_buf(dev, pd, qp); - return err; + return 0; +} + +static void mthca_align_qp_size(struct mthca_dev *dev, struct mthca_qp *qp) +{ + int i; + + if (dev->hca_type != ARBEL_NATIVE) + return; + + for (i = 0; 1 << i < qp->rq.max; ++i) + ; /* nothing */ + + qp->rq.max = 1 << i; + + for (i = 0; 1 << i < qp->sq.max; ++i) + ; /* nothing */ + + qp->sq.max = 1 << i; } int mthca_alloc_qp(struct mthca_dev *dev, @@ -1008,11 +1160,12 @@ struct mthca_cq *recv_cq, enum ib_qp_type type, enum ib_sig_type send_policy, - enum ib_sig_type recv_policy, struct mthca_qp *qp) { int err; + mthca_align_qp_size(dev, qp); + switch (type) { case IB_QPT_RC: qp->transport = RC; break; case IB_QPT_UC: qp->transport = UC; break; @@ -1025,7 +1178,7 @@ return -ENOMEM; err = mthca_alloc_qp_common(dev, pd, send_cq, recv_cq, - send_policy, recv_policy, qp); + send_policy, qp); if (err) { mthca_free(&dev->qp_table.alloc, qp->qpn); return err; @@ -1044,7 +1197,6 @@ struct mthca_cq *send_cq, struct mthca_cq *recv_cq, enum ib_sig_type send_policy, - enum ib_sig_type recv_policy, int qpn, int port, struct mthca_sqp *sqp) @@ -1052,6 +1204,8 @@ int err = 0; u32 mqpn = qpn * 2 + dev->qp_table.sqp_start + port - 1; + mthca_align_qp_size(dev, &sqp->qp); + sqp->header_buf_size = sqp->qp.sq.max * MTHCA_UD_HEADER_SIZE; sqp->header_buf = dma_alloc_coherent(&dev->pdev->dev, sqp->header_buf_size, &sqp->header_dma, GFP_KERNEL); @@ -1073,8 +1227,7 @@ sqp->qp.transport = MLX; err = mthca_alloc_qp_common(dev, pd, send_cq, recv_cq, - send_policy, recv_policy, - &sqp->qp); + send_policy, &sqp->qp); if (err) goto err_out_free; @@ -1083,9 +1236,21 @@ return 0; err_out_free: - spin_lock_irq(&dev->qp_table.lock); + /* + * Lock CQs here, so that CQ polling code can do QP lookup + * without taking a lock. + */ + spin_lock_irq(&send_cq->lock); + if (send_cq != recv_cq) + spin_lock(&recv_cq->lock); + + spin_lock(&dev->qp_table.lock); mthca_array_clear(&dev->qp_table.qp, mqpn); - spin_unlock_irq(&dev->qp_table.lock); + spin_unlock(&dev->qp_table.lock); + + if (send_cq != recv_cq) + spin_unlock(&recv_cq->lock); + spin_unlock_irq(&send_cq->lock); err_out: dma_free_coherent(&dev->pdev->dev, sqp->header_buf_size, @@ -1100,11 +1265,28 @@ u8 status; int size; int i; + struct mthca_cq *send_cq; + struct mthca_cq *recv_cq; - spin_lock_irq(&dev->qp_table.lock); + send_cq = to_mcq(qp->ibqp.send_cq); + recv_cq = to_mcq(qp->ibqp.recv_cq); + + /* + * Lock CQs here, so that CQ polling code can do QP lookup + * without taking a lock. + */ + spin_lock_irq(&send_cq->lock); + if (send_cq != recv_cq) + spin_lock(&recv_cq->lock); + + spin_lock(&dev->qp_table.lock); mthca_array_clear(&dev->qp_table.qp, qp->qpn & (dev->limits.num_qps - 1)); - spin_unlock_irq(&dev->qp_table.lock); + spin_unlock(&dev->qp_table.lock); + + if (send_cq != recv_cq) + spin_unlock(&recv_cq->lock); + spin_unlock_irq(&send_cq->lock); atomic_dec(&qp->refcount); wait_event(qp->wait, !atomic_read(&qp->refcount)); @@ -1136,14 +1318,15 @@ kfree(qp->wrid); + mthca_free_memfree(dev, qp); + if (is_sqp(dev, qp)) { atomic_dec(&(to_mpd(qp->ibqp.pd)->sqp_count)); dma_free_coherent(&dev->pdev->dev, to_msqp(qp)->header_buf_size, to_msqp(qp)->header_buf, to_msqp(qp)->header_dma); - } - else + } else mthca_free(&dev->qp_table.alloc, qp->qpn); } @@ -1216,8 +1399,26 @@ return 0; } -int mthca_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, - struct ib_send_wr **bad_wr) +static inline int mthca_wq_overflow(struct mthca_wq *wq, int nreq, + struct ib_cq *ib_cq) +{ + unsigned cur; + struct mthca_cq *cq; + + cur = wq->head - wq->tail; + if (likely(cur + nreq < wq->max)) + return 0; + + cq = to_mcq(ib_cq); + spin_lock(&cq->lock); + cur = wq->head - wq->tail; + spin_unlock(&cq->lock); + + return cur + nreq >= wq->max; +} + +int mthca_tavor_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, + struct ib_send_wr **bad_wr) { struct mthca_dev *dev = to_mdev(ibqp->device); struct mthca_qp *qp = to_mqp(ibqp); @@ -1233,26 +1434,18 @@ int ind; u8 op0 = 0; - static const u8 opcode[] = { - [IB_WR_SEND] = MTHCA_OPCODE_SEND, - [IB_WR_SEND_WITH_IMM] = MTHCA_OPCODE_SEND_IMM, - [IB_WR_RDMA_WRITE] = MTHCA_OPCODE_RDMA_WRITE, - [IB_WR_RDMA_WRITE_WITH_IMM] = MTHCA_OPCODE_RDMA_WRITE_IMM, - [IB_WR_RDMA_READ] = MTHCA_OPCODE_RDMA_READ, - [IB_WR_ATOMIC_CMP_AND_SWP] = MTHCA_OPCODE_ATOMIC_CS, - [IB_WR_ATOMIC_FETCH_AND_ADD] = MTHCA_OPCODE_ATOMIC_FA, - }; - - spin_lock_irqsave(&qp->lock, flags); + spin_lock_irqsave(&qp->sq.lock, flags); /* XXX check that state is OK to post send */ - ind = qp->sq.next; + ind = qp->sq.next_ind; for (nreq = 0; wr; ++nreq, wr = wr->next) { - if (qp->sq.cur + nreq >= qp->sq.max) { - mthca_err(dev, "SQ full (%d posted, %d max, %d nreq)\n", - qp->sq.cur, qp->sq.max, nreq); + if (mthca_wq_overflow(&qp->sq, nreq, qp->ibqp.send_cq)) { + mthca_err(dev, "SQ %06x full (%u head, %u tail," + " %d max, %d nreq)\n", qp->qpn, + qp->sq.head, qp->sq.tail, + qp->sq.max, nreq); err = -ENOMEM; *bad_wr = wr; goto out; @@ -1326,17 +1519,17 @@ break; case UD: - ((struct mthca_ud_seg *) wqe)->lkey = + ((struct mthca_tavor_ud_seg *) wqe)->lkey = cpu_to_be32(to_mah(wr->wr.ud.ah)->key); - ((struct mthca_ud_seg *) wqe)->av_addr = + ((struct mthca_tavor_ud_seg *) wqe)->av_addr = cpu_to_be64(to_mah(wr->wr.ud.ah)->avdma); - ((struct mthca_ud_seg *) wqe)->dqpn = + ((struct mthca_tavor_ud_seg *) wqe)->dqpn = cpu_to_be32(wr->wr.ud.remote_qpn); - ((struct mthca_ud_seg *) wqe)->qkey = + ((struct mthca_tavor_ud_seg *) wqe)->qkey = cpu_to_be32(wr->wr.ud.remote_qkey); - wqe += sizeof (struct mthca_ud_seg); - size += sizeof (struct mthca_ud_seg) / 16; + wqe += sizeof (struct mthca_tavor_ud_seg); + size += sizeof (struct mthca_tavor_ud_seg) / 16; break; case MLX: @@ -1381,7 +1574,7 @@ qp->wrid[ind + qp->rq.max] = wr->wr_id; - if (wr->opcode >= ARRAY_SIZE(opcode)) { + if (wr->opcode >= ARRAY_SIZE(mthca_opcode)) { mthca_err(dev, "opcode invalid\n"); err = -EINVAL; *bad_wr = wr; @@ -1392,15 +1585,15 @@ ((struct mthca_next_seg *) prev_wqe)->nda_op = cpu_to_be32(((ind << qp->sq.wqe_shift) + qp->send_wqe_offset) | - opcode[wr->opcode]); - smp_wmb(); + mthca_opcode[wr->opcode]); + wmb(); ((struct mthca_next_seg *) prev_wqe)->ee_nds = cpu_to_be32((size0 ? 0 : MTHCA_NEXT_DBD) | size); } if (!size0) { size0 = size; - op0 = opcode[wr->opcode]; + op0 = mthca_opcode[wr->opcode]; } ++ind; @@ -1409,10 +1602,10 @@ } out: - if (nreq) { + if (likely(nreq)) { u32 doorbell[2]; - doorbell[0] = cpu_to_be32(((qp->sq.next << qp->sq.wqe_shift) + + doorbell[0] = cpu_to_be32(((qp->sq.next_ind << qp->sq.wqe_shift) + qp->send_wqe_offset) | f0 | op0); doorbell[1] = cpu_to_be32((qp->qpn << 8) | size0); @@ -1423,15 +1616,15 @@ MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); } - qp->sq.cur += nreq; - qp->sq.next = ind; + qp->sq.next_ind = ind; + qp->sq.head += nreq; - spin_unlock_irqrestore(&qp->lock, flags); + spin_unlock_irqrestore(&qp->sq.lock, flags); return err; } -int mthca_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr, - struct ib_recv_wr **bad_wr) +int mthca_tavor_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr, + struct ib_recv_wr **bad_wr) { struct mthca_dev *dev = to_mdev(ibqp->device); struct mthca_qp *qp = to_mqp(ibqp); @@ -1445,15 +1638,18 @@ void *wqe; void *prev_wqe; - spin_lock_irqsave(&qp->lock, flags); + spin_lock_irqsave(&qp->rq.lock, flags); /* XXX check that state is OK to post receive */ - ind = qp->rq.next; + ind = qp->rq.next_ind; for (nreq = 0; wr; ++nreq, wr = wr->next) { - if (qp->rq.cur + nreq >= qp->rq.max) { - mthca_err(dev, "RQ %06x full\n", qp->qpn); + if (mthca_wq_overflow(&qp->rq, nreq, qp->ibqp.recv_cq)) { + mthca_err(dev, "RQ %06x full (%u head, %u tail," + " %d max, %d nreq)\n", qp->qpn, + qp->rq.head, qp->rq.tail, + qp->rq.max, nreq); err = -ENOMEM; *bad_wr = wr; goto out; @@ -1466,14 +1662,12 @@ ((struct mthca_next_seg *) wqe)->nda_op = 0; ((struct mthca_next_seg *) wqe)->ee_nds = cpu_to_be32(MTHCA_NEXT_DBD); - ((struct mthca_next_seg *) wqe)->flags = - (wr->recv_flags & IB_RECV_SIGNALED) ? - cpu_to_be32(MTHCA_NEXT_CQ_UPDATE) : 0; + ((struct mthca_next_seg *) wqe)->flags = 0; wqe += sizeof (struct mthca_next_seg); size = sizeof (struct mthca_next_seg) / 16; - if (wr->num_sge > qp->rq.max_gs) { + if (unlikely(wr->num_sge > qp->rq.max_gs)) { err = -EINVAL; *bad_wr = wr; goto out; @@ -1492,10 +1686,10 @@ qp->wrid[ind] = wr->wr_id; - if (prev_wqe) { + if (likely(prev_wqe)) { ((struct mthca_next_seg *) prev_wqe)->nda_op = cpu_to_be32((ind << qp->rq.wqe_shift) | 1); - smp_wmb(); + wmb(); ((struct mthca_next_seg *) prev_wqe)->ee_nds = cpu_to_be32(MTHCA_NEXT_DBD | size); } @@ -1509,10 +1703,10 @@ } out: - if (nreq) { + if (likely(nreq)) { u32 doorbell[2]; - doorbell[0] = cpu_to_be32((qp->rq.next << qp->rq.wqe_shift) | size0); + doorbell[0] = cpu_to_be32((qp->rq.next_ind << qp->rq.wqe_shift) | size0); doorbell[1] = cpu_to_be32((qp->qpn << 8) | nreq); wmb(); @@ -1522,14 +1716,258 @@ MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); } - qp->rq.cur += nreq; - qp->rq.next = ind; + qp->rq.next_ind = ind; + qp->rq.head += nreq; + + spin_unlock_irqrestore(&qp->rq.lock, flags); + return err; +} + +int mthca_arbel_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, + struct ib_send_wr **bad_wr) +{ + struct mthca_dev *dev = to_mdev(ibqp->device); + struct mthca_qp *qp = to_mqp(ibqp); + void *wqe; + void *prev_wqe; + unsigned long flags; + int err = 0; + int nreq; + int i; + int size; + int size0 = 0; + u32 f0 = 0; + int ind; + u8 op0 = 0; + + spin_lock_irqsave(&qp->sq.lock, flags); + + /* XXX check that state is OK to post send */ + + ind = qp->sq.head & (qp->sq.max - 1); + + for (nreq = 0; wr; ++nreq, wr = wr->next) { + if (mthca_wq_overflow(&qp->sq, nreq, qp->ibqp.send_cq)) { + mthca_err(dev, "SQ %06x full (%u head, %u tail," + " %d max, %d nreq)\n", qp->qpn, + qp->sq.head, qp->sq.tail, + qp->sq.max, nreq); + err = -ENOMEM; + *bad_wr = wr; + goto out; + } + + wqe = get_send_wqe(qp, ind); + prev_wqe = qp->sq.last; + qp->sq.last = wqe; + + ((struct mthca_next_seg *) wqe)->flags = + ((wr->send_flags & IB_SEND_SIGNALED) ? + cpu_to_be32(MTHCA_NEXT_CQ_UPDATE) : 0) | + ((wr->send_flags & IB_SEND_SOLICITED) ? + cpu_to_be32(MTHCA_NEXT_SOLICIT) : 0) | + cpu_to_be32(1); + if (wr->opcode == IB_WR_SEND_WITH_IMM || + wr->opcode == IB_WR_RDMA_WRITE_WITH_IMM) + ((struct mthca_next_seg *) wqe)->flags = wr->imm_data; + + wqe += sizeof (struct mthca_next_seg); + size = sizeof (struct mthca_next_seg) / 16; + + switch (qp->transport) { + case UD: + memcpy(((struct mthca_arbel_ud_seg *) wqe)->av, + to_mah(wr->wr.ud.ah)->av, MTHCA_AV_SIZE); + ((struct mthca_arbel_ud_seg *) wqe)->dqpn = + cpu_to_be32(wr->wr.ud.remote_qpn); + ((struct mthca_arbel_ud_seg *) wqe)->qkey = + cpu_to_be32(wr->wr.ud.remote_qkey); + + wqe += sizeof (struct mthca_arbel_ud_seg); + size += sizeof (struct mthca_arbel_ud_seg) / 16; + break; + + case MLX: + err = build_mlx_header(dev, to_msqp(qp), ind, wr, + wqe - sizeof (struct mthca_next_seg), + wqe); + if (err) { + *bad_wr = wr; + goto out; + } + wqe += sizeof (struct mthca_data_seg); + size += sizeof (struct mthca_data_seg) / 16; + break; + } + + if (wr->num_sge > qp->sq.max_gs) { + mthca_err(dev, "too many gathers\n"); + err = -EINVAL; + *bad_wr = wr; + goto out; + } + + for (i = 0; i < wr->num_sge; ++i) { + ((struct mthca_data_seg *) wqe)->byte_count = + cpu_to_be32(wr->sg_list[i].length); + ((struct mthca_data_seg *) wqe)->lkey = + cpu_to_be32(wr->sg_list[i].lkey); + ((struct mthca_data_seg *) wqe)->addr = + cpu_to_be64(wr->sg_list[i].addr); + wqe += sizeof (struct mthca_data_seg); + size += sizeof (struct mthca_data_seg) / 16; + } + + /* Add one more inline data segment for ICRC */ + if (qp->transport == MLX) { + ((struct mthca_data_seg *) wqe)->byte_count = + cpu_to_be32((1 << 31) | 4); + ((u32 *) wqe)[1] = 0; + wqe += sizeof (struct mthca_data_seg); + size += sizeof (struct mthca_data_seg) / 16; + } + + qp->wrid[ind + qp->rq.max] = wr->wr_id; + + if (wr->opcode >= ARRAY_SIZE(mthca_opcode)) { + mthca_err(dev, "opcode invalid\n"); + err = -EINVAL; + *bad_wr = wr; + goto out; + } + + if (likely(prev_wqe)) { + ((struct mthca_next_seg *) prev_wqe)->nda_op = + cpu_to_be32(((ind << qp->sq.wqe_shift) + + qp->send_wqe_offset) | + mthca_opcode[wr->opcode]); + wmb(); + ((struct mthca_next_seg *) prev_wqe)->ee_nds = + cpu_to_be32(MTHCA_NEXT_DBD | size); + } + + if (!size0) { + size0 = size; + op0 = mthca_opcode[wr->opcode]; + } + + ++ind; + if (unlikely(ind >= qp->sq.max)) + ind -= qp->sq.max; + } + +out: + if (likely(nreq)) { + u32 doorbell[2]; + + doorbell[0] = cpu_to_be32((nreq << 24) | + ((qp->sq.head & 0xffff) << 8) | + f0 | op0); + doorbell[1] = cpu_to_be32((qp->qpn << 8) | size0); + + qp->sq.head += nreq; + + /* + * Make sure that descriptors are written before + * doorbell record. + */ + wmb(); + *qp->sq.db = cpu_to_be32(qp->sq.head & 0xffff); + + /* + * Make sure doorbell record is written before we + * write MMIO send doorbell. + */ + wmb(); + mthca_write64(doorbell, + dev->kar + MTHCA_SEND_DOORBELL, + MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); + } + + spin_unlock_irqrestore(&qp->sq.lock, flags); + return err; +} + +int mthca_arbel_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr, + struct ib_recv_wr **bad_wr) +{ + struct mthca_dev *dev = to_mdev(ibqp->device); + struct mthca_qp *qp = to_mqp(ibqp); + unsigned long flags; + int err = 0; + int nreq; + int ind; + int i; + void *wqe; + + spin_lock_irqsave(&qp->rq.lock, flags); + + /* XXX check that state is OK to post receive */ + + ind = qp->rq.head & (qp->rq.max - 1); - spin_unlock_irqrestore(&qp->lock, flags); + for (nreq = 0; wr; ++nreq, wr = wr->next) { + if (mthca_wq_overflow(&qp->rq, nreq, qp->ibqp.recv_cq)) { + mthca_err(dev, "RQ %06x full (%u head, %u tail," + " %d max, %d nreq)\n", qp->qpn, + qp->rq.head, qp->rq.tail, + qp->rq.max, nreq); + err = -ENOMEM; + *bad_wr = wr; + goto out; + } + + wqe = get_recv_wqe(qp, ind); + + ((struct mthca_next_seg *) wqe)->flags = 0; + + wqe += sizeof (struct mthca_next_seg); + + if (unlikely(wr->num_sge > qp->rq.max_gs)) { + err = -EINVAL; + *bad_wr = wr; + goto out; + } + + for (i = 0; i < wr->num_sge; ++i) { + ((struct mthca_data_seg *) wqe)->byte_count = + cpu_to_be32(wr->sg_list[i].length); + ((struct mthca_data_seg *) wqe)->lkey = + cpu_to_be32(wr->sg_list[i].lkey); + ((struct mthca_data_seg *) wqe)->addr = + cpu_to_be64(wr->sg_list[i].addr); + wqe += sizeof (struct mthca_data_seg); + } + + if (i < qp->rq.max_gs) { + ((struct mthca_data_seg *) wqe)->byte_count = 0; + ((struct mthca_data_seg *) wqe)->lkey = cpu_to_be32(0x100); + ((struct mthca_data_seg *) wqe)->addr = 0; + } + + qp->wrid[ind] = wr->wr_id; + + ++ind; + if (unlikely(ind >= qp->rq.max)) + ind -= qp->rq.max; + } +out: + if (likely(nreq)) { + qp->rq.head += nreq; + + /* + * Make sure that descriptors are written before + * doorbell record. + */ + wmb(); + *qp->rq.db = cpu_to_be32(qp->rq.head & 0xffff); + } + + spin_unlock_irqrestore(&qp->rq.lock, flags); return err; } -int mthca_free_err_wqe(struct mthca_qp *qp, int is_send, +int mthca_free_err_wqe(struct mthca_dev *dev, struct mthca_qp *qp, int is_send, int index, int *dbd, u32 *new_wqe) { struct mthca_next_seg *next; @@ -1539,7 +1977,10 @@ else next = get_recv_wqe(qp, index); - *dbd = !!(next->ee_nds & cpu_to_be32(MTHCA_NEXT_DBD)); + if (dev->hca_type == ARBEL_NATIVE) + *dbd = 1; + else + *dbd = !!(next->ee_nds & cpu_to_be32(MTHCA_NEXT_DBD)); if (next->ee_nds & cpu_to_be32(0x3f)) *new_wqe = (next->nda_op & cpu_to_be32(~0x3f)) | (next->ee_nds & cpu_to_be32(0x3f)); diff -Nru a/drivers/infiniband/hw/mthca/mthca_reset.c b/drivers/infiniband/hw/mthca/mthca_reset.c --- a/drivers/infiniband/hw/mthca/mthca_reset.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_reset.c 2005-03-07 14:54:16 -08:00 @@ -50,7 +50,7 @@ struct pci_dev *bridge = NULL; #define MTHCA_RESET_OFFSET 0xf0010 -#define MTHCA_RESET_VALUE cpu_to_be32(1) +#define MTHCA_RESET_VALUE swab32(1) /* * Reset the chip. This is somewhat ugly because we have to diff -Nru a/drivers/infiniband/hw/mthca/mthca_uar.c b/drivers/infiniband/hw/mthca/mthca_uar.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/infiniband/hw/mthca/mthca_uar.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2005 Topspin Communications. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU + * General Public License (GPL) Version 2, available from the file + * COPYING in the main directory of this source tree, or the + * OpenIB.org BSD license below: + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * $Id$ + */ + +#include "mthca_dev.h" +#include "mthca_memfree.h" + +int mthca_uar_alloc(struct mthca_dev *dev, struct mthca_uar *uar) +{ + uar->index = mthca_alloc(&dev->uar_table.alloc); + if (uar->index == -1) + return -ENOMEM; + + uar->pfn = (pci_resource_start(dev->pdev, 2) >> PAGE_SHIFT) + uar->index; + + return 0; +} + +void mthca_uar_free(struct mthca_dev *dev, struct mthca_uar *uar) +{ + mthca_free(&dev->uar_table.alloc, uar->index); +} + +int mthca_init_uar_table(struct mthca_dev *dev) +{ + int ret; + + ret = mthca_alloc_init(&dev->uar_table.alloc, + dev->limits.num_uars, + dev->limits.num_uars - 1, + dev->limits.reserved_uars); + if (ret) + return ret; + + ret = mthca_init_db_tab(dev); + if (ret) + mthca_alloc_cleanup(&dev->uar_table.alloc); + + return ret; +} + +void mthca_cleanup_uar_table(struct mthca_dev *dev) +{ + mthca_cleanup_db_tab(dev); + + /* XXX check if any UARs are still allocated? */ + mthca_alloc_cleanup(&dev->uar_table.alloc); +} diff -Nru a/drivers/infiniband/include/ib_verbs.h b/drivers/infiniband/include/ib_verbs.h --- a/drivers/infiniband/include/ib_verbs.h 2005-03-07 14:54:16 -08:00 +++ b/drivers/infiniband/include/ib_verbs.h 2005-03-07 14:54:16 -08:00 @@ -73,7 +73,6 @@ IB_DEVICE_RC_RNR_NAK_GEN = (1<<12), IB_DEVICE_SRQ_RESIZE = (1<<13), IB_DEVICE_N_NOTIFY_CQ = (1<<14), - IB_DEVICE_RQ_SIG_TYPE = (1<<15) }; enum ib_atomic_cap { @@ -408,7 +407,6 @@ struct ib_srq *srq; struct ib_qp_cap cap; enum ib_sig_type sq_sig_type; - enum ib_sig_type rq_sig_type; enum ib_qp_type qp_type; u8 port_num; /* special QP types only */ }; @@ -533,10 +531,6 @@ IB_SEND_INLINE = (1<<3) }; -enum ib_recv_flags { - IB_RECV_SIGNALED = 1 -}; - struct ib_sge { u64 addr; u32 length; @@ -579,7 +573,6 @@ u64 wr_id; struct ib_sge *sg_list; int num_sge; - int recv_flags; }; enum ib_access_flags { diff -Nru a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h --- a/drivers/infiniband/ulp/ipoib/ipoib.h 2005-03-07 14:54:16 -08:00 +++ b/drivers/infiniband/ulp/ipoib/ipoib.h 2005-03-07 14:54:16 -08:00 @@ -308,11 +308,11 @@ #ifdef CONFIG_INFINIBAND_IPOIB_DEBUG -extern int debug_level; +extern int ipoib_debug_level; #define ipoib_dbg(priv, format, arg...) \ do { \ - if (debug_level > 0) \ + if (ipoib_debug_level > 0) \ ipoib_printk(KERN_DEBUG, priv, format , ## arg); \ } while (0) #define ipoib_dbg_mcast(priv, format, arg...) \ diff -Nru a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c --- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c 2005-03-07 14:54:18 -08:00 @@ -40,7 +40,7 @@ #include "ipoib.h" #ifdef CONFIG_INFINIBAND_IPOIB_DEBUG_DATA -int data_debug_level; +static int data_debug_level; module_param(data_debug_level, int, 0644); MODULE_PARM_DESC(data_debug_level, @@ -105,7 +105,6 @@ .wr_id = wr_id | IPOIB_OP_RECV, .sg_list = &list, .num_sge = 1, - .recv_flags = IB_RECV_SIGNALED }; struct ib_recv_wr *bad_wr; @@ -137,6 +136,9 @@ if (ret) { ipoib_warn(priv, "ipoib_ib_receive failed for buf %d (%d)\n", id, ret); + dma_unmap_single(priv->ca->dma_device, addr, + IPOIB_BUF_SIZE, DMA_FROM_DEVICE); + dev_kfree_skb_any(skb); priv->rx_ring[id].skb = NULL; } diff -Nru a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c 2005-03-07 14:54:17 -08:00 @@ -51,9 +51,9 @@ MODULE_LICENSE("Dual BSD/GPL"); #ifdef CONFIG_INFINIBAND_IPOIB_DEBUG -int debug_level; +int ipoib_debug_level; -module_param(debug_level, int, 0644); +module_param_named(debug_level, ipoib_debug_level, int, 0644); MODULE_PARM_DESC(debug_level, "Enable debug tracing if > 0"); #endif @@ -215,16 +215,25 @@ return 0; } -static void __path_free(struct net_device *dev, struct ipoib_path *path) +static void path_free(struct net_device *dev, struct ipoib_path *path) { struct ipoib_dev_priv *priv = netdev_priv(dev); struct ipoib_neigh *neigh, *tn; struct sk_buff *skb; + unsigned long flags; while ((skb = __skb_dequeue(&path->queue))) dev_kfree_skb_irq(skb); + spin_lock_irqsave(&priv->lock, flags); + list_for_each_entry_safe(neigh, tn, &path->neigh_list, list) { + /* + * It's safe to call ipoib_put_ah() inside priv->lock + * here, because we know that path->ah will always + * hold one more reference, so ipoib_put_ah() will + * never do more than decrement the ref count. + */ if (neigh->ah) ipoib_put_ah(neigh->ah); *to_ipoib_neigh(neigh->neighbour) = NULL; @@ -232,11 +241,11 @@ kfree(neigh); } + spin_unlock_irqrestore(&priv->lock, flags); + if (path->ah) ipoib_put_ah(path->ah); - rb_erase(&path->rb_node, &priv->path_tree); - list_del(&path->list); kfree(path); } @@ -248,15 +257,20 @@ unsigned long flags; spin_lock_irqsave(&priv->lock, flags); + list_splice(&priv->path_list, &remove_list); INIT_LIST_HEAD(&priv->path_list); + + list_for_each_entry(path, &remove_list, list) + rb_erase(&path->rb_node, &priv->path_tree); + spin_unlock_irqrestore(&priv->lock, flags); list_for_each_entry_safe(path, tp, &remove_list, list) { if (path->query) ib_sa_cancel_query(path->query_id, path->query); wait_for_completion(&path->done); - __path_free(dev, path); + path_free(dev, path); } } @@ -346,8 +360,9 @@ if (!path) return NULL; - path->dev = dev; + path->dev = dev; path->pathrec.dlid = 0; + path->ah = NULL; skb_queue_head_init(&path->queue); @@ -360,8 +375,6 @@ path->pathrec.pkey = cpu_to_be16(priv->pkey); path->pathrec.numb_path = 1; - __path_add(dev, path); - return path; } @@ -421,6 +434,8 @@ (union ib_gid *) (skb->dst->neighbour->ha + 4)); if (!path) goto err; + + __path_add(dev, path); } list_add_tail(&neigh->list, &path->neigh_list); @@ -450,8 +465,8 @@ err: *to_ipoib_neigh(skb->dst->neighbour) = NULL; list_del(&neigh->list); - kfree(neigh); neigh->neighbour->ops->destructor = NULL; + kfree(neigh); ++priv->stats.tx_dropped; dev_kfree_skb_any(skb); @@ -496,8 +511,12 @@ skb_push(skb, sizeof *phdr); __skb_queue_tail(&path->queue, skb); - if (path_rec_start(dev, path)) - __path_free(dev, path); + if (path_rec_start(dev, path)) { + spin_unlock(&priv->lock); + path_free(dev, path); + return; + } else + __path_add(dev, path); } else { ++priv->stats.tx_dropped; dev_kfree_skb_any(skb); @@ -657,9 +676,10 @@ static void ipoib_neigh_destructor(struct neighbour *n) { - struct ipoib_neigh *neigh = *to_ipoib_neigh(n); + struct ipoib_neigh *neigh; struct ipoib_dev_priv *priv = netdev_priv(n->dev); unsigned long flags; + struct ipoib_ah *ah = NULL; ipoib_dbg(priv, "neigh_destructor for %06x " IPOIB_GID_FMT "\n", @@ -668,15 +688,19 @@ spin_lock_irqsave(&priv->lock, flags); + neigh = *to_ipoib_neigh(n); if (neigh) { if (neigh->ah) - ipoib_put_ah(neigh->ah); + ah = neigh->ah; list_del(&neigh->list); *to_ipoib_neigh(n) = NULL; kfree(neigh); } spin_unlock_irqrestore(&priv->lock, flags); + + if (ah) + ipoib_put_ah(ah); } static int ipoib_neigh_setup(struct neighbour *neigh) diff -Nru a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c 2005-03-07 14:54:18 -08:00 @@ -93,6 +93,8 @@ struct ipoib_dev_priv *priv = netdev_priv(dev); struct ipoib_neigh *neigh, *tmp; unsigned long flags; + LIST_HEAD(ah_list); + struct ipoib_ah *ah, *tah; ipoib_dbg_mcast(netdev_priv(dev), "deleting multicast group " IPOIB_GID_FMT "\n", @@ -101,7 +103,8 @@ spin_lock_irqsave(&priv->lock, flags); list_for_each_entry_safe(neigh, tmp, &mcast->neigh_list, list) { - ipoib_put_ah(neigh->ah); + if (neigh->ah) + list_add_tail(&neigh->ah->list, &ah_list); *to_ipoib_neigh(neigh->neighbour) = NULL; neigh->neighbour->ops->destructor = NULL; kfree(neigh); @@ -109,6 +112,9 @@ spin_unlock_irqrestore(&priv->lock, flags); + list_for_each_entry_safe(ah, tah, &ah_list, list) + ipoib_put_ah(ah); + if (mcast->ah) ipoib_put_ah(mcast->ah); @@ -790,7 +796,7 @@ spin_unlock_irqrestore(&priv->lock, flags); - list_for_each_entry(mcast, &remove_list, list) { + list_for_each_entry_safe(mcast, tmcast, &remove_list, list) { ipoib_mcast_leave(dev, mcast); ipoib_mcast_free(mcast); } @@ -902,7 +908,7 @@ spin_unlock_irqrestore(&priv->lock, flags); /* We have to cancel outside of the spinlock */ - list_for_each_entry(mcast, &remove_list, list) { + list_for_each_entry_safe(mcast, tmcast, &remove_list, list) { ipoib_mcast_leave(mcast->dev, mcast); ipoib_mcast_free(mcast); } diff -Nru a/drivers/infiniband/ulp/ipoib/ipoib_verbs.c b/drivers/infiniband/ulp/ipoib/ipoib_verbs.c --- a/drivers/infiniband/ulp/ipoib/ipoib_verbs.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/infiniband/ulp/ipoib/ipoib_verbs.c 2005-03-07 14:54:17 -08:00 @@ -165,7 +165,6 @@ .max_recv_sge = 1 }, .sq_sig_type = IB_SIGNAL_ALL_WR, - .rq_sig_type = IB_SIGNAL_ALL_WR, .qp_type = IB_QPT_UD }; diff -Nru a/drivers/isdn/hisax/hisax_fcpcipnp.c b/drivers/isdn/hisax/hisax_fcpcipnp.c --- a/drivers/isdn/hisax/hisax_fcpcipnp.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/isdn/hisax/hisax_fcpcipnp.c 2005-03-07 14:54:17 -08:00 @@ -902,7 +902,7 @@ adapter->irq = pdev->irq; printk(KERN_INFO "hisax_fcpcipnp: found adapter %s at %s\n", - (char *) ent->driver_data, pdev->slot_name); + (char *) ent->driver_data, pci_name(pdev)); retval = fcpcipnp_setup(adapter); if (retval) diff -Nru a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c --- a/drivers/macintosh/therm_windtunnel.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/macintosh/therm_windtunnel.c 2005-03-07 14:54:17 -08:00 @@ -47,8 +47,6 @@ #define LOG_TEMP 0 /* continously log temperature */ #define I2C_DRIVERID_G4FAN 0x9001 /* fixme */ -#define THERMOSTAT_CLIENT_ID 1 -#define FAN_CLIENT_ID 2 static int do_probe( struct i2c_adapter *adapter, int addr, int kind); @@ -372,7 +370,6 @@ goto out; printk("ADM1030 fan controller [@%02x]\n", cl->addr ); - cl->id = FAN_CLIENT_ID; strlcpy( cl->name, "ADM1030 fan controller", sizeof(cl->name) ); if( !i2c_attach_client(cl) ) @@ -412,7 +409,6 @@ x.overheat_temp = os_temp; x.overheat_hyst = hyst_temp; - cl->id = THERMOSTAT_CLIENT_ID; strlcpy( cl->name, "DS1775 thermostat", sizeof(cl->name) ); if( !i2c_attach_client(cl) ) diff -Nru a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c --- a/drivers/macintosh/via-pmu.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/macintosh/via-pmu.c 2005-03-07 14:54:18 -08:00 @@ -2389,7 +2389,7 @@ enable_kernel_fp(); #ifdef CONFIG_ALTIVEC - if (cur_cpu_spec[0]->cpu_features & CPU_FTR_ALTIVEC) + if (cpu_has_feature(CPU_FTR_ALTIVEC)) enable_kernel_altivec(); #endif /* CONFIG_ALTIVEC */ diff -Nru a/drivers/md/raid6altivec.uc b/drivers/md/raid6altivec.uc --- a/drivers/md/raid6altivec.uc 2005-03-07 14:54:18 -08:00 +++ b/drivers/md/raid6altivec.uc 2005-03-07 14:54:18 -08:00 @@ -108,7 +108,7 @@ int raid6_have_altivec(void) { /* This assumes either all CPUs have Altivec or none does */ - return cur_cpu_spec->cpu_features & CPU_FTR_ALTIVEC; + return cpu_has_feature(CPU_FTR_ALTIVEC): } #endif diff -Nru a/drivers/media/common/saa7146_i2c.c b/drivers/media/common/saa7146_i2c.c --- a/drivers/media/common/saa7146_i2c.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/media/common/saa7146_i2c.c 2005-03-07 14:54:18 -08:00 @@ -25,7 +25,7 @@ sent through the saa7146. have a look at the specifications p. 122 ff to understand this. it returns the number of u32s to send, or -1 in case of an error. */ -static int saa7146_i2c_msg_prepare(const struct i2c_msg m[], int num, u32 *op) +static int saa7146_i2c_msg_prepare(const struct i2c_msg *m, int num, u32 *op) { int h1, h2; int i, j, addr; @@ -89,7 +89,7 @@ which bytes were read through the adapter and write them back to the corresponding i2c-message. but instead, we simply write back all bytes. fixme: this could be improved. */ -static int saa7146_i2c_msg_cleanup(const struct i2c_msg m[], int num, u32 *op) +static int saa7146_i2c_msg_cleanup(const struct i2c_msg *m, int num, u32 *op) { int i, j; int op_count = 0; @@ -272,7 +272,7 @@ return 0; } -int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg msgs[], int num, int retries) +int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *msgs, int num, int retries) { int i = 0, count = 0; u32* buffer = dev->d_i2c.cpu_addr; @@ -372,7 +372,7 @@ } /* utility functions */ -static int saa7146_i2c_xfer(struct i2c_adapter* adapter, struct i2c_msg msg[], int num) +static int saa7146_i2c_xfer(struct i2c_adapter* adapter, struct i2c_msg *msg, int num) { struct saa7146_dev* dev = i2c_get_adapdata(adapter); diff -Nru a/drivers/media/common/saa7146_video.c b/drivers/media/common/saa7146_video.c --- a/drivers/media/common/saa7146_video.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/media/common/saa7146_video.c 2005-03-07 14:54:17 -08:00 @@ -889,7 +889,7 @@ strcpy(cap->driver, "saa7146 v4l2"); strlcpy(cap->card, dev->ext->name, sizeof(cap->card)); - sprintf(cap->bus_info,"PCI:%s",dev->pci->slot_name); + sprintf(cap->bus_info,"PCI:%s", pci_name(dev->pci)); cap->version = SAA7146_VERSION_CODE; cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | diff -Nru a/drivers/media/dvb/b2c2/skystar2.c b/drivers/media/dvb/b2c2/skystar2.c --- a/drivers/media/dvb/b2c2/skystar2.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/media/dvb/b2c2/skystar2.c 2005-03-07 14:54:18 -08:00 @@ -293,7 +293,7 @@ return buf - start; } -static int master_xfer(struct i2c_adapter* adapter, struct i2c_msg msgs[], int num) +static int master_xfer(struct i2c_adapter* adapter, struct i2c_msg *msgs, int num) { struct adapter *tmp = i2c_get_adapdata(adapter); int i, ret = 0; diff -Nru a/drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c b/drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c --- a/drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c 2005-03-07 14:54:17 -08:00 @@ -38,7 +38,7 @@ /* * I2C master xfer function */ -static int dibusb_i2c_xfer(struct i2c_adapter *adap,struct i2c_msg msg[],int num) +static int dibusb_i2c_xfer(struct i2c_adapter *adap,struct i2c_msg *msg,int num) { struct usb_dibusb *dib = i2c_get_adapdata(adap); int i; diff -Nru a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c --- a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c 2005-03-07 14:54:18 -08:00 @@ -252,7 +252,7 @@ return rcv_len; } -static int master_xfer(struct i2c_adapter* adapter, struct i2c_msg msg[], int num) +static int master_xfer(struct i2c_adapter* adapter, struct i2c_msg *msg, int num) { struct ttusb *ttusb = i2c_get_adapdata(adapter); int i = 0; diff -Nru a/drivers/media/video/adv7170.c b/drivers/media/video/adv7170.c --- a/drivers/media/video/adv7170.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/media/video/adv7170.c 2005-03-07 14:54:18 -08:00 @@ -402,7 +402,6 @@ .force = force }; -static int adv7170_i2c_id = 0; static struct i2c_driver i2c_driver_adv7170; static int @@ -432,7 +431,6 @@ client->adapter = adapter; client->driver = &i2c_driver_adv7170; client->flags = I2C_CLIENT_ALLOW_USE; - client->id = adv7170_i2c_id++; if ((client->addr == I2C_ADV7170 >> 1) || (client->addr == (I2C_ADV7170 >> 1) + 1)) { dname = adv7170_name; @@ -444,8 +442,7 @@ kfree(client); return 0; } - snprintf(I2C_NAME(client), sizeof(I2C_NAME(client)) - 1, - "%s[%d]", dname, client->id); + strlcpy(I2C_NAME(client), dname, sizeof(I2C_NAME(client))); encoder = kmalloc(sizeof(struct adv7170), GFP_KERNEL); if (encoder == NULL) { diff -Nru a/drivers/media/video/adv7175.c b/drivers/media/video/adv7175.c --- a/drivers/media/video/adv7175.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/media/video/adv7175.c 2005-03-07 14:54:18 -08:00 @@ -452,7 +452,6 @@ .force = force }; -static int adv7175_i2c_id = 0; static struct i2c_driver i2c_driver_adv7175; static int @@ -482,7 +481,6 @@ client->adapter = adapter; client->driver = &i2c_driver_adv7175; client->flags = I2C_CLIENT_ALLOW_USE; - client->id = adv7175_i2c_id++; if ((client->addr == I2C_ADV7175 >> 1) || (client->addr == (I2C_ADV7175 >> 1) + 1)) { dname = adv7175_name; @@ -494,8 +492,7 @@ kfree(client); return 0; } - snprintf(I2C_NAME(client), sizeof(I2C_NAME(client)) - 1, - "%s[%d]", dname, client->id); + strlcpy(I2C_NAME(client), dname, sizeof(I2C_NAME(client))); encoder = kmalloc(sizeof(struct adv7175), GFP_KERNEL); if (encoder == NULL) { diff -Nru a/drivers/media/video/bt819.c b/drivers/media/video/bt819.c --- a/drivers/media/video/bt819.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/media/video/bt819.c 2005-03-07 14:54:16 -08:00 @@ -517,7 +517,6 @@ .force = force }; -static int bt819_i2c_id = 0; static struct i2c_driver i2c_driver_bt819; static int @@ -546,7 +545,6 @@ client->adapter = adapter; client->driver = &i2c_driver_bt819; client->flags = I2C_CLIENT_ALLOW_USE; - client->id = bt819_i2c_id++; decoder = kmalloc(sizeof(struct bt819), GFP_KERNEL); if (decoder == NULL) { @@ -568,16 +566,13 @@ id = bt819_read(client, 0x17); switch (id & 0xf0) { case 0x70: - snprintf(I2C_NAME(client), sizeof(I2C_NAME(client)) - 1, - "bt819a[%d]", client->id); + strlcpy(I2C_NAME(client), "bt819a", sizeof(I2C_NAME(client))); break; case 0x60: - snprintf(I2C_NAME(client), sizeof(I2C_NAME(client)) - 1, - "bt817a[%d]", client->id); + strlcpy(I2C_NAME(client), "bt817a", sizeof(I2C_NAME(client))); break; case 0x20: - snprintf(I2C_NAME(client), sizeof(I2C_NAME(client)) - 1, - "bt815a[%d]", client->id); + strlcpy(I2C_NAME(client), "bt815a", sizeof(I2C_NAME(client))); break; default: dprintk(1, diff -Nru a/drivers/media/video/bt856.c b/drivers/media/video/bt856.c --- a/drivers/media/video/bt856.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/media/video/bt856.c 2005-03-07 14:54:16 -08:00 @@ -306,7 +306,6 @@ .force = force }; -static int bt856_i2c_id = 0; static struct i2c_driver i2c_driver_bt856; static int @@ -335,9 +334,7 @@ client->adapter = adapter; client->driver = &i2c_driver_bt856; client->flags = I2C_CLIENT_ALLOW_USE; - client->id = bt856_i2c_id++; - snprintf(I2C_NAME(client), sizeof(I2C_NAME(client)) - 1, - "bt856[%d]", client->id); + strlcpy(I2C_NAME(client), "bt856", sizeof(I2C_NAME(client))); encoder = kmalloc(sizeof(struct bt856), GFP_KERNEL); if (encoder == NULL) { diff -Nru a/drivers/media/video/bttv-i2c.c b/drivers/media/video/bttv-i2c.c --- a/drivers/media/video/bttv-i2c.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/media/video/bttv-i2c.c 2005-03-07 14:54:16 -08:00 @@ -245,7 +245,7 @@ return retval; } -static int bttv_i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[], int num) +static int bttv_i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num) { struct bttv *btv = i2c_get_adapdata(i2c_adap); int retval = 0; @@ -330,7 +330,6 @@ static struct i2c_client bttv_i2c_client_template = { I2C_DEVNAME("bttv internal"), - .id = -1, }; diff -Nru a/drivers/media/video/cx88/cx88-i2c.c b/drivers/media/video/cx88/cx88-i2c.c --- a/drivers/media/video/cx88/cx88-i2c.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/media/video/cx88/cx88-i2c.c 2005-03-07 14:54:16 -08:00 @@ -141,7 +141,6 @@ static struct i2c_client cx8800_i2c_client_template = { I2C_DEVNAME("cx88xx internal"), - .id = -1, }; static char *i2c_devs[128] = { diff -Nru a/drivers/media/video/meye.c b/drivers/media/video/meye.c --- a/drivers/media/video/meye.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/media/video/meye.c 2005-03-07 14:54:17 -08:00 @@ -1154,7 +1154,7 @@ memset(cap, 0, sizeof(*cap)); strcpy(cap->driver, "meye"); strcpy(cap->card, "meye"); - sprintf(cap->bus_info, "PCI:%s", meye.mchip_dev->slot_name); + sprintf(cap->bus_info, "PCI:%s", pci_name(meye.mchip_dev)); cap->version = (MEYE_DRIVER_MAJORVERSION << 8) + MEYE_DRIVER_MINORVERSION; cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | diff -Nru a/drivers/media/video/ovcamchip/ovcamchip_core.c b/drivers/media/video/ovcamchip/ovcamchip_core.c --- a/drivers/media/video/ovcamchip/ovcamchip_core.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/media/video/ovcamchip/ovcamchip_core.c 2005-03-07 14:54:18 -08:00 @@ -422,7 +422,6 @@ static struct i2c_client client_template = { I2C_DEVNAME("(unset)"), - .id = -1, .driver = &driver, }; diff -Nru a/drivers/media/video/saa5246a.c b/drivers/media/video/saa5246a.c --- a/drivers/media/video/saa5246a.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/media/video/saa5246a.c 2005-03-07 14:54:17 -08:00 @@ -185,7 +185,6 @@ }; static struct i2c_client client_template = { - .id = -1, .driver = &i2c_driver_videotext, .name = "(unset)", }; diff -Nru a/drivers/media/video/saa5249.c b/drivers/media/video/saa5249.c --- a/drivers/media/video/saa5249.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/media/video/saa5249.c 2005-03-07 14:54:17 -08:00 @@ -258,7 +258,6 @@ }; static struct i2c_client client_template = { - .id = -1, .driver = &i2c_driver_videotext, .name = "(unset)", }; diff -Nru a/drivers/media/video/saa7110.c b/drivers/media/video/saa7110.c --- a/drivers/media/video/saa7110.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/media/video/saa7110.c 2005-03-07 14:54:16 -08:00 @@ -476,7 +476,6 @@ .force = force }; -static int saa7110_i2c_id = 0; static struct i2c_driver i2c_driver_saa7110; static int @@ -507,9 +506,7 @@ client->adapter = adapter; client->driver = &i2c_driver_saa7110; client->flags = I2C_CLIENT_ALLOW_USE; - client->id = saa7110_i2c_id++; - snprintf(I2C_NAME(client), sizeof(I2C_NAME(client)) - 1, - "saa7110[%d]", client->id); + strlcpy(I2C_NAME(client), "saa7110", sizeof(I2C_NAME(client))); decoder = kmalloc(sizeof(struct saa7110), GFP_KERNEL); if (decoder == 0) { diff -Nru a/drivers/media/video/saa7111.c b/drivers/media/video/saa7111.c --- a/drivers/media/video/saa7111.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/media/video/saa7111.c 2005-03-07 14:54:18 -08:00 @@ -500,7 +500,6 @@ .force = force }; -static int saa7111_i2c_id = 0; static struct i2c_driver i2c_driver_saa7111; static int @@ -530,9 +529,7 @@ client->adapter = adapter; client->driver = &i2c_driver_saa7111; client->flags = I2C_CLIENT_ALLOW_USE; - client->id = saa7111_i2c_id++; - snprintf(I2C_NAME(client), sizeof(I2C_NAME(client)) - 1, - "saa7111[%d]", client->id); + strlcpy(I2C_NAME(client), "saa7111", sizeof(I2C_NAME(client))); decoder = kmalloc(sizeof(struct saa7111), GFP_KERNEL); if (decoder == NULL) { diff -Nru a/drivers/media/video/saa7114.c b/drivers/media/video/saa7114.c --- a/drivers/media/video/saa7114.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/media/video/saa7114.c 2005-03-07 14:54:18 -08:00 @@ -838,7 +838,6 @@ .force = force }; -static int saa7114_i2c_id = 0; static struct i2c_driver i2c_driver_saa7114; static int @@ -871,9 +870,7 @@ client->adapter = adapter; client->driver = &i2c_driver_saa7114; client->flags = I2C_CLIENT_ALLOW_USE; - client->id = saa7114_i2c_id++; - snprintf(I2C_NAME(client), sizeof(I2C_NAME(client)) - 1, - "saa7114[%d]", client->id); + strlcpy(I2C_NAME(client), "saa7114", sizeof(I2C_NAME(client))); decoder = kmalloc(sizeof(struct saa7114), GFP_KERNEL); if (decoder == NULL) { diff -Nru a/drivers/media/video/saa7134/saa7134-i2c.c b/drivers/media/video/saa7134/saa7134-i2c.c --- a/drivers/media/video/saa7134/saa7134-i2c.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/media/video/saa7134/saa7134-i2c.c 2005-03-07 14:54:16 -08:00 @@ -236,7 +236,7 @@ } static int saa7134_i2c_xfer(struct i2c_adapter *i2c_adap, - struct i2c_msg msgs[], int num) + struct i2c_msg *msgs, int num) { struct saa7134_dev *dev = i2c_adap->algo_data; enum i2c_status status; @@ -362,7 +362,6 @@ static struct i2c_client saa7134_client_template = { I2C_DEVNAME("saa7134 internal"), - .id = -1, }; /* ----------------------------------------------------------- */ diff -Nru a/drivers/media/video/saa7185.c b/drivers/media/video/saa7185.c --- a/drivers/media/video/saa7185.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/media/video/saa7185.c 2005-03-07 14:54:18 -08:00 @@ -398,7 +398,6 @@ .force = force }; -static int saa7185_i2c_id = 0; static struct i2c_driver i2c_driver_saa7185; static int @@ -427,9 +426,7 @@ client->adapter = adapter; client->driver = &i2c_driver_saa7185; client->flags = I2C_CLIENT_ALLOW_USE; - client->id = saa7185_i2c_id++; - snprintf(I2C_NAME(client), sizeof(I2C_NAME(client)) - 1, - "saa7185[%d]", client->id); + strlcpy(I2C_NAME(client), "saa7185", sizeof(I2C_NAME(client))); encoder = kmalloc(sizeof(struct saa7185), GFP_KERNEL); if (encoder == NULL) { diff -Nru a/drivers/media/video/tda7432.c b/drivers/media/video/tda7432.c --- a/drivers/media/video/tda7432.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/media/video/tda7432.c 2005-03-07 14:54:17 -08:00 @@ -528,7 +528,6 @@ static struct i2c_client client_template = { I2C_DEVNAME("tda7432"), - .id = -1, .driver = &driver, }; diff -Nru a/drivers/media/video/tda9840.c b/drivers/media/video/tda9840.c --- a/drivers/media/video/tda9840.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/media/video/tda9840.c 2005-03-07 14:54:17 -08:00 @@ -51,9 +51,6 @@ static struct i2c_driver driver; static struct i2c_client client_template; -/* unique ID allocation */ -static int tda9840_id = 0; - static int command(struct i2c_client *client, unsigned int cmd, void *arg) { int result; @@ -179,7 +176,6 @@ /* fill client structure */ memcpy(client, &client_template, sizeof(struct i2c_client)); - client->id = tda9840_id++; client->addr = address; client->adapter = adapter; diff -Nru a/drivers/media/video/tda9875.c b/drivers/media/video/tda9875.c --- a/drivers/media/video/tda9875.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/media/video/tda9875.c 2005-03-07 14:54:17 -08:00 @@ -399,7 +399,6 @@ static struct i2c_client client_template = { I2C_DEVNAME("tda9875"), - .id = -1, .driver = &driver, }; diff -Nru a/drivers/media/video/tea6415c.c b/drivers/media/video/tea6415c.c --- a/drivers/media/video/tea6415c.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/media/video/tea6415c.c 2005-03-07 14:54:17 -08:00 @@ -51,9 +51,6 @@ static struct i2c_driver driver; static struct i2c_client client_template; -/* unique ID allocation */ -static int tea6415c_id = 0; - /* this function is called by i2c_probe */ static int detect(struct i2c_adapter *adapter, int address, int kind) { @@ -73,7 +70,6 @@ /* fill client structure */ memcpy(client, &client_template, sizeof(struct i2c_client)); - client->id = tea6415c_id++; client->addr = address; client->adapter = adapter; diff -Nru a/drivers/media/video/tea6420.c b/drivers/media/video/tea6420.c --- a/drivers/media/video/tea6420.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/media/video/tea6420.c 2005-03-07 14:54:17 -08:00 @@ -48,9 +48,6 @@ static struct i2c_driver driver; static struct i2c_client client_template; -/* unique ID allocation */ -static int tea6420_id = 0; - /* make a connection between the input 'i' and the output 'o' with gain 'g' for the tea6420-client 'client' (note: i = 6 means 'mute') */ static int tea6420_switch(struct i2c_client *client, int i, int o, int g) @@ -111,7 +108,6 @@ /* fill client structure */ memcpy(client, &client_template, sizeof(struct i2c_client)); - client->id = tea6420_id++; client->addr = address; client->adapter = adapter; diff -Nru a/drivers/media/video/tuner-3036.c b/drivers/media/video/tuner-3036.c --- a/drivers/media/video/tuner-3036.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/media/video/tuner-3036.c 2005-03-07 14:54:17 -08:00 @@ -192,7 +192,6 @@ static struct i2c_client client_template = { - .id = -1, .driver = &i2c_driver_tuner, .name = "SAB3036", }; diff -Nru a/drivers/media/video/vpx3220.c b/drivers/media/video/vpx3220.c --- a/drivers/media/video/vpx3220.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/media/video/vpx3220.c 2005-03-07 14:54:17 -08:00 @@ -587,7 +587,6 @@ .force = force }; -static int vpx3220_i2c_id = 0; static struct i2c_driver vpx3220_i2c_driver; static int @@ -634,7 +633,6 @@ client->adapter = adapter; client->driver = &vpx3220_i2c_driver; client->flags = I2C_CLIENT_ALLOW_USE; - client->id = vpx3220_i2c_id++; /* Check for manufacture ID and part number */ if (kind < 0) { @@ -655,16 +653,16 @@ vpx3220_read(client, 0x01); switch (pn) { case 0x4680: - snprintf(I2C_NAME(client), sizeof(I2C_NAME(client)) - 1, - "vpx3220a[%d]", client->id); + strlcpy(I2C_NAME(client), "vpx3220a", + sizeof(I2C_NAME(client))); break; case 0x4260: - snprintf(I2C_NAME(client), sizeof(I2C_NAME(client)) - 1, - "vpx3216b[%d]", client->id); + strlcpy(I2C_NAME(client), "vpx3216b", + sizeof(I2C_NAME(client))); break; case 0x4280: - snprintf(I2C_NAME(client), sizeof(I2C_NAME(client)) - 1, - "vpx3214c[%d]", client->id); + strlcpy(I2C_NAME(client), "vpx3214c", + sizeof(I2C_NAME(client))); break; default: dprintk(1, @@ -675,9 +673,8 @@ return 0; } } else { - snprintf(I2C_NAME(client), sizeof(I2C_NAME(client)) - 1, - "forced vpx32xx[%d]", - client->id); + strlcpy(I2C_NAME(client), "forced vpx32xx", + sizeof(I2C_NAME(client))); } decoder = kmalloc(sizeof(struct vpx3220), GFP_KERNEL); diff -Nru a/drivers/media/video/zoran_driver.c b/drivers/media/video/zoran_driver.c --- a/drivers/media/video/zoran_driver.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/media/video/zoran_driver.c 2005-03-07 14:54:17 -08:00 @@ -2694,7 +2694,7 @@ strncpy(cap->card, ZR_DEVNAME(zr), sizeof(cap->card)); strncpy(cap->driver, "zoran", sizeof(cap->driver)); snprintf(cap->bus_info, sizeof(cap->bus_info), "PCI:%s", - zr->pci_dev->slot_name); + pci_name(zr->pci_dev)); cap->version = KERNEL_VERSION(MAJOR_VERSION, MINOR_VERSION, RELEASE_VERSION); diff -Nru a/drivers/mmc/mmc_sysfs.c b/drivers/mmc/mmc_sysfs.c --- a/drivers/mmc/mmc_sysfs.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/mmc/mmc_sysfs.c 2005-03-07 14:54:17 -08:00 @@ -21,6 +21,41 @@ #define dev_to_mmc_card(d) container_of(d, struct mmc_card, dev) #define to_mmc_driver(d) container_of(d, struct mmc_driver, drv) +#define MMC_ATTR(name, fmt, args...) \ +static ssize_t mmc_##name##_show (struct device *dev, char *buf) \ +{ \ + struct mmc_card *card = dev_to_mmc_card(dev); \ + return sprintf(buf, fmt, args); \ +} + +MMC_ATTR(cid, "%08x%08x%08x%08x\n", card->raw_cid[0], card->raw_cid[1], + card->raw_cid[2], card->raw_cid[3]); +MMC_ATTR(csd, "%08x%08x%08x%08x\n", card->raw_csd[0], card->raw_csd[1], + card->raw_csd[2], card->raw_csd[3]); +MMC_ATTR(date, "%02d/%04d\n", card->cid.month, card->cid.year); +MMC_ATTR(fwrev, "0x%x\n", card->cid.fwrev); +MMC_ATTR(hwrev, "0x%x\n", card->cid.hwrev); +MMC_ATTR(manfid, "0x%06x\n", card->cid.manfid); +MMC_ATTR(name, "%s\n", card->cid.prod_name); +MMC_ATTR(oemid, "0x%04x\n", card->cid.oemid); +MMC_ATTR(serial, "0x%08x\n", card->cid.serial); + +#define MMC_ATTR_RO(name) __ATTR(name, S_IRUGO, mmc_##name##_show, NULL) + +static struct device_attribute mmc_dev_attrs[] = { + MMC_ATTR_RO(cid), + MMC_ATTR_RO(csd), + MMC_ATTR_RO(date), + MMC_ATTR_RO(fwrev), + MMC_ATTR_RO(hwrev), + MMC_ATTR_RO(manfid), + MMC_ATTR_RO(name), + MMC_ATTR_RO(oemid), + MMC_ATTR_RO(serial), + __ATTR_NULL +}; + + static void mmc_release_card(struct device *dev) { struct mmc_card *card = dev_to_mmc_card(dev); @@ -98,6 +133,7 @@ static struct bus_type mmc_bus_type = { .name = "mmc", + .dev_attrs = mmc_dev_attrs, .match = mmc_bus_match, .hotplug = mmc_bus_hotplug, .suspend = mmc_bus_suspend, @@ -151,38 +187,6 @@ EXPORT_SYMBOL(mmc_unregister_driver); -#define MMC_ATTR(name, fmt, args...) \ -static ssize_t mmc_dev_show_##name (struct device *dev, char *buf) \ -{ \ - struct mmc_card *card = dev_to_mmc_card(dev); \ - return sprintf(buf, fmt, args); \ -} \ -static DEVICE_ATTR(name, S_IRUGO, mmc_dev_show_##name, NULL) - -MMC_ATTR(cid, "%08x%08x%08x%08x\n", card->raw_cid[0], card->raw_cid[1], - card->raw_cid[2], card->raw_cid[3]); -MMC_ATTR(csd, "%08x%08x%08x%08x\n", card->raw_csd[0], card->raw_csd[1], - card->raw_csd[2], card->raw_csd[3]); -MMC_ATTR(date, "%02d/%04d\n", card->cid.month, card->cid.year); -MMC_ATTR(fwrev, "0x%x\n", card->cid.fwrev); -MMC_ATTR(hwrev, "0x%x\n", card->cid.hwrev); -MMC_ATTR(manfid, "0x%06x\n", card->cid.manfid); -MMC_ATTR(name, "%s\n", card->cid.prod_name); -MMC_ATTR(oemid, "0x%04x\n", card->cid.oemid); -MMC_ATTR(serial, "0x%08x\n", card->cid.serial); - -static struct device_attribute *mmc_dev_attributes[] = { - &dev_attr_cid, - &dev_attr_csd, - &dev_attr_date, - &dev_attr_fwrev, - &dev_attr_hwrev, - &dev_attr_manfid, - &dev_attr_name, - &dev_attr_oemid, - &dev_attr_serial, -}; - /* * Internal function. Initialise a MMC card structure. */ @@ -201,17 +205,10 @@ */ int mmc_register_card(struct mmc_card *card) { - int ret, i; - snprintf(card->dev.bus_id, sizeof(card->dev.bus_id), "%s:%04x", card->host->host_name, card->rca); - ret = device_add(&card->dev); - if (ret == 0) - for (i = 0; i < ARRAY_SIZE(mmc_dev_attributes); i++) - device_create_file(&card->dev, mmc_dev_attributes[i]); - - return ret; + return device_add(&card->dev); } /* diff -Nru a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c --- a/drivers/mtd/devices/block2mtd.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/mtd/devices/block2mtd.c 2005-03-07 14:54:16 -08:00 @@ -59,7 +59,7 @@ end_index = ((isize - 1) >> PAGE_CACHE_SHIFT); - spin_lock_irq(&mapping->tree_lock); + read_lock_irq(&mapping->tree_lock); for (i = 0; i < PAGE_READAHEAD; i++) { pagei = index + i; if (pagei > end_index) { @@ -71,16 +71,16 @@ break; if (page) continue; - spin_unlock_irq(&mapping->tree_lock); + read_unlock_irq(&mapping->tree_lock); page = page_cache_alloc_cold(mapping); - spin_lock_irq(&mapping->tree_lock); + read_lock_irq(&mapping->tree_lock); if (!page) break; page->index = pagei; list_add(&page->lru, &page_pool); ret++; } - spin_unlock_irq(&mapping->tree_lock); + read_unlock_irq(&mapping->tree_lock); if (ret) read_cache_pages(mapping, &page_pool, filler, NULL); } diff -Nru a/drivers/net/3c59x.c b/drivers/net/3c59x.c --- a/drivers/net/3c59x.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/3c59x.c 2005-03-07 14:54:16 -08:00 @@ -964,7 +964,7 @@ #ifdef CONFIG_PM -static int vortex_suspend (struct pci_dev *pdev, u32 state) +static int vortex_suspend (struct pci_dev *pdev, pm_message_t state) { struct net_device *dev = pci_get_drvdata(pdev); diff -Nru a/drivers/net/8139too.c b/drivers/net/8139too.c --- a/drivers/net/8139too.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/8139too.c 2005-03-07 14:54:16 -08:00 @@ -389,8 +389,14 @@ /* Bits in TxConfig. */ enum tx_config_bits { - TxIFG1 = (1 << 25), /* Interframe Gap Time */ - TxIFG0 = (1 << 24), /* Enabling these bits violates IEEE 802.3 */ + + /* Interframe Gap Time. Only TxIFG96 doesn't violate IEEE 802.3 */ + TxIFGShift = 24, + TxIFG84 = (0 << TxIFGShift), /* 8.4us / 840ns (10 / 100Mbps) */ + TxIFG88 = (1 << TxIFGShift), /* 8.8us / 880ns (10 / 100Mbps) */ + TxIFG92 = (2 << TxIFGShift), /* 9.2us / 920ns (10 / 100Mbps) */ + TxIFG96 = (3 << TxIFGShift), /* 9.6us / 960ns (10 / 100Mbps) */ + TxLoopBack = (1 << 18) | (1 << 17), /* enable loopback test mode */ TxCRC = (1 << 16), /* DISABLE appending CRC to end of Tx packets */ TxClearAbt = (1 << 0), /* Clear abort (WO) */ @@ -723,17 +729,14 @@ #endif static const unsigned int rtl8139_tx_config = - (TX_DMA_BURST << TxDMAShift) | (TX_RETRY << TxRetryShift); + TxIFG96 | (TX_DMA_BURST << TxDMAShift) | (TX_RETRY << TxRetryShift); static void __rtl8139_cleanup_dev (struct net_device *dev) { - struct rtl8139_private *tp; + struct rtl8139_private *tp = netdev_priv(dev); struct pci_dev *pdev; assert (dev != NULL); - assert (dev->priv != NULL); - - tp = dev->priv; assert (tp->pci_dev != NULL); pdev = tp->pci_dev; @@ -746,7 +749,7 @@ pci_release_regions (pdev); free_netdev(dev); - + pci_disable_device(pdev); pci_set_drvdata (pdev, NULL); } @@ -785,7 +788,7 @@ *dev_out = NULL; - /* dev and dev->priv zeroed in alloc_etherdev */ + /* dev and priv zeroed in alloc_etherdev */ dev = alloc_etherdev (sizeof (*tp)); if (dev == NULL) { printk (KERN_ERR PFX "%s: Unable to alloc new net device\n", pci_name(pdev)); @@ -794,7 +797,7 @@ SET_MODULE_OWNER(dev); SET_NETDEV_DEV(dev, &pdev->dev); - tp = dev->priv; + tp = netdev_priv(dev); tp->pci_dev = pdev; /* enable device (incl. PCI PM wakeup and hotplug setup) */ @@ -976,8 +979,8 @@ return i; assert (dev != NULL); - tp = dev->priv; - assert (tp != NULL); + tp = netdev_priv(dev); + ioaddr = tp->mmio_addr; assert (ioaddr != NULL); @@ -1010,8 +1013,8 @@ dev->irq = pdev->irq; - /* dev->priv/tp zeroed and aligned in alloc_etherdev */ - tp = dev->priv; + /* tp zeroed and aligned in alloc_etherdev */ + tp = netdev_priv(dev); /* note: tp->chipset set in rtl8139_init_board */ tp->drv_flags = board_info[ent->driver_data].hw_flags; @@ -1116,11 +1119,8 @@ static void __devexit rtl8139_remove_one (struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata (pdev); - struct rtl8139_private *np; assert (dev != NULL); - np = dev->priv; - assert (np != NULL); unregister_netdev (dev); @@ -1234,7 +1234,7 @@ static int mdio_read (struct net_device *dev, int phy_id, int location) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); int retval = 0; #ifdef CONFIG_8139TOO_8129 void *mdio_addr = tp->mmio_addr + Config4; @@ -1276,7 +1276,7 @@ static void mdio_write (struct net_device *dev, int phy_id, int location, int value) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); #ifdef CONFIG_8139TOO_8129 void *mdio_addr = tp->mmio_addr + Config4; int mii_cmd = (0x5002 << 16) | (phy_id << 23) | (location << 18) | value; @@ -1319,7 +1319,7 @@ static int rtl8139_open (struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); int retval; void *ioaddr = tp->mmio_addr; @@ -1367,7 +1367,7 @@ static void rtl_check_media (struct net_device *dev, unsigned int init_media) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); if (tp->phys[0] >= 0) { mii_check_media(&tp->mii, netif_msg_link(tp), init_media); @@ -1377,7 +1377,7 @@ /* Start the hardware at open or resume. */ static void rtl8139_hw_start (struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; u32 i; u8 tmp; @@ -1399,8 +1399,6 @@ tp->rx_config = rtl8139_rx_config | AcceptBroadcast | AcceptMyPhys; RTL_W32 (RxConfig, tp->rx_config); - - /* Check this value: the documentation for IFG contradicts ifself. */ RTL_W32 (TxConfig, rtl8139_tx_config); tp->cur_rx = 0; @@ -1446,7 +1444,7 @@ /* Initialize the Rx and Tx rings, along with various 'dev' bits. */ static void rtl8139_init_ring (struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); int i; tp->cur_rx = 0; @@ -1613,7 +1611,7 @@ static int rtl8139_thread (void *data) { struct net_device *dev = data; - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); unsigned long timeout; daemonize("%s", dev->name); @@ -1645,7 +1643,7 @@ static void rtl8139_start_thread(struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); tp->thr_pid = -1; tp->twistie = 0; @@ -1673,7 +1671,7 @@ static void rtl8139_tx_timeout (struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; int i; u8 tmp8; @@ -1718,7 +1716,7 @@ static int rtl8139_start_xmit (struct sk_buff *skb, struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; unsigned int entry; unsigned int len = skb->len; @@ -1766,7 +1764,6 @@ unsigned long dirty_tx, tx_left; assert (dev != NULL); - assert (tp != NULL); assert (ioaddr != NULL); dirty_tx = tp->dirty_tx; @@ -2125,7 +2122,7 @@ static int rtl8139_poll(struct net_device *dev, int *budget) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; int orig_budget = min(*budget, dev->quota); int done = 1; @@ -2163,7 +2160,7 @@ struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_instance; - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; u16 status, ackstat; int link_changed = 0; /* avoid bogus "uninit" warning */ @@ -2239,7 +2236,7 @@ static int rtl8139_close (struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; int ret = 0; unsigned long flags; @@ -2302,7 +2299,7 @@ other threads or interrupts aren't messing with the 8139. */ static void rtl8139_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); void *ioaddr = np->mmio_addr; spin_lock_irq(&np->lock); @@ -2336,7 +2333,7 @@ aren't messing with the 8139. */ static int rtl8139_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); void *ioaddr = np->mmio_addr; u32 support; u8 cfg3, cfg5; @@ -2376,7 +2373,7 @@ static void rtl8139_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); strcpy(info->driver, DRV_NAME); strcpy(info->version, DRV_VERSION); strcpy(info->bus_info, pci_name(np->pci_dev)); @@ -2385,7 +2382,7 @@ static int rtl8139_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); spin_lock_irq(&np->lock); mii_ethtool_gset(&np->mii, cmd); spin_unlock_irq(&np->lock); @@ -2394,7 +2391,7 @@ static int rtl8139_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); int rc; spin_lock_irq(&np->lock); rc = mii_ethtool_sset(&np->mii, cmd); @@ -2404,25 +2401,25 @@ static int rtl8139_nway_reset(struct net_device *dev) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); return mii_nway_restart(&np->mii); } static u32 rtl8139_get_link(struct net_device *dev) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); return mii_link_ok(&np->mii); } static u32 rtl8139_get_msglevel(struct net_device *dev) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); return np->msg_enable; } static void rtl8139_set_msglevel(struct net_device *dev, u32 datum) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); np->msg_enable = datum; } @@ -2433,13 +2430,13 @@ #else static int rtl8139_get_regs_len(struct net_device *dev) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); return np->regs_len; } static void rtl8139_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *regbuf) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); regs->version = RTL_REGS_VER; @@ -2456,7 +2453,7 @@ static void rtl8139_get_ethtool_stats(struct net_device *dev, struct ethtool_stats *stats, u64 *data) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); data[0] = np->xstats.early_rx; data[1] = np->xstats.tx_buf_mapped; @@ -2488,7 +2485,7 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); int rc; if (!netif_running(dev)) @@ -2504,7 +2501,7 @@ static struct net_device_stats *rtl8139_get_stats (struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; unsigned long flags; @@ -2523,7 +2520,7 @@ static void __set_rx_mode (struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; u32 mc_filter[2]; /* Multicast hash filter */ int i, rx_mode; @@ -2572,7 +2569,7 @@ static void rtl8139_set_rx_mode (struct net_device *dev) { unsigned long flags; - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); spin_lock_irqsave (&tp->lock, flags); __set_rx_mode(dev); @@ -2581,10 +2578,10 @@ #ifdef CONFIG_PM -static int rtl8139_suspend (struct pci_dev *pdev, u32 state) +static int rtl8139_suspend (struct pci_dev *pdev, pm_message_t state) { struct net_device *dev = pci_get_drvdata (pdev); - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; unsigned long flags; diff -Nru a/drivers/net/Kconfig b/drivers/net/Kconfig --- a/drivers/net/Kconfig 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/Kconfig 2005-03-07 14:54:18 -08:00 @@ -47,16 +47,13 @@ ---help--- Say 'Y' or 'M' if you wish to be able to 'bond' multiple Ethernet Channels together. This is called 'Etherchannel' by Cisco, - 'Trunking' by Sun, and 'Bonding' in Linux. + 'Trunking' by Sun, 802.3ad by the IEEE, and 'Bonding' in Linux. - If you have two Ethernet connections to some other computer, you can - make them behave like one double speed connection using this driver. - Naturally, this has to be supported at the other end as well, either - with a similar Bonding Linux driver, a Cisco 5500 switch or a - SunTrunking SunSoft driver. + The driver supports multiple bonding modes to allow for both high + perfomance and high availability operation. - This is similar to the EQL driver, but it merges Ethernet segments - instead of serial lines. + Refer to for more + information. To compile this driver as a module, choose M here: the module will be called bonding. @@ -445,7 +442,7 @@ config MIPS_JAZZ_SONIC tristate "MIPS JAZZ onboard SONIC Ethernet support" - depends on NET_ETHERNET && MIPS_JAZZ + depends on NET_ETHERNET && MACH_JAZZ help This is the driver for the onboard card of MIPS Magnum 4000, Acer PICA, Olivetti M700-10 and a few other identical OEM systems. @@ -470,7 +467,7 @@ config SGI_IOC3_ETH bool "SGI IOC3 Ethernet" - depends on NET_ETHERNET && SGI_IP27 + depends on NET_ETHERNET && PCI && SGI_IP27 select CRC32 select MII help @@ -819,7 +816,7 @@ tristate "SMC 91C9x/91C1xxx support" select CRC32 select MII - depends on NET_ETHERNET && (ARM || REDWOOD_5 || REDWOOD_6 || M32R) + depends on NET_ETHERNET && (ARM || REDWOOD_5 || REDWOOD_6 || M32R || SUPERH) help This is a driver for SMC's 91x series of Ethernet chipsets, including the SMC91C94 and the SMC91C111. Say Y if you want it @@ -1428,23 +1425,6 @@ . The module will be called e100. -config E100_NAPI - bool "Use Rx Polling (NAPI)" - depends on E100 - help - NAPI is a new driver API designed to reduce CPU and interrupt load - when the driver is receiving lots of packets from the card. It is - still somewhat experimental and thus not yet enabled by default. - - If your estimated Rx load is 10kpps or more, or if the card will be - deployed on potentially unfriendly networks (e.g. in a firewall), - then say Y here. - - See for more - information. - - If in doubt, say N. - config LNE390 tristate "Mylex EISA LNE390A/B support (EXPERIMENTAL)" depends on NET_PCI && EISA && EXPERIMENTAL @@ -1780,14 +1760,6 @@ DEC (now Compaq) based on the AMD Lance chipset, including the DEPCA series. (This chipset is better known via the NE2100 cards.) -config BAGETLANCE - tristate "Baget AMD LANCE support" - depends on NET_ETHERNET && BAGET_MIPS - help - Say Y to enable kernel support for AMD Lance Ethernet cards on the - MIPS-32-based Baget embedded system. This chipset is better known - via the NE2100 cards. - config 68360_ENET bool "Motorola 68360 ethernet controller" depends on M68360 @@ -2083,7 +2055,7 @@ config GIANFAR tristate "Gianfar Ethernet" - depends on 85xx + depends on 85xx || 83xx help This driver supports the Gigabit TSEC on the MPC85xx family of chips, and the FEC on the 8540 @@ -2094,7 +2066,7 @@ config MV643XX_ETH tristate "MV-643XX Ethernet support" - depends on MOMENCO_OCELOT_C || MOMENCO_JAGUAR_ATX + depends on MOMENCO_OCELOT_C || MOMENCO_JAGUAR_ATX || MOMENCO_OCELOT_3 help This driver supports the gigabit Ethernet on the Marvell MV643XX chipset which is used in the Momenco Ocelot C and Jaguar ATX. diff -Nru a/drivers/net/Makefile b/drivers/net/Makefile --- a/drivers/net/Makefile 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/Makefile 2005-03-07 14:54:16 -08:00 @@ -162,7 +162,6 @@ obj-$(CONFIG_MIPS_GT96100ETH) += gt96100eth.o obj-$(CONFIG_MIPS_AU1X00_ENET) += au1000_eth.o obj-$(CONFIG_SGI_IOC3_ETH) += ioc3-eth.o -obj-$(CONFIG_BAGETLANCE) += bagetlance.o obj-$(CONFIG_DECLANCE) += declance.o obj-$(CONFIG_ATARILANCE) += atarilance.o obj-$(CONFIG_ATARI_BIONET) += atari_bionet.o diff -Nru a/drivers/net/Space.c b/drivers/net/Space.c --- a/drivers/net/Space.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/Space.c 2005-03-07 14:54:16 -08:00 @@ -302,16 +302,6 @@ {NULL, 0}, }; -static struct devprobe2 mips_probes[] __initdata = { -#ifdef CONFIG_MIPS_JAZZ_SONIC - {sonic_probe, 0}, -#endif -#ifdef CONFIG_BAGETLANCE /* Lance-based Baget ethernet boards */ - {bagetlance_probe, 0}, -#endif - {NULL, 0}, -}; - /* * Unified ethernet device probe, segmented per architecture and * per bus interface. This drives the legacy devices only for now. @@ -325,7 +315,6 @@ return; (void)( probe_list2(unit, m68k_probes, base_addr == 0) && - probe_list2(unit, mips_probes, base_addr == 0) && probe_list2(unit, eisa_probes, base_addr == 0) && probe_list2(unit, mca_probes, base_addr == 0) && probe_list2(unit, isa_probes, base_addr == 0) && diff -Nru a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c --- a/drivers/net/amd8111e.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/amd8111e.c 2005-03-07 14:54:18 -08:00 @@ -1381,6 +1381,8 @@ if(amd8111e_restart(dev)){ spin_unlock_irq(&lp->lock); + if (dev->irq) + free_irq(dev->irq, dev); return -ENOMEM; } /* Start ipg timer */ @@ -1797,7 +1799,7 @@ if(!err) netif_wake_queue(dev); } -static int amd8111e_suspend(struct pci_dev *pci_dev, u32 state) +static int amd8111e_suspend(struct pci_dev *pci_dev, pm_message_t state) { struct net_device *dev = pci_get_drvdata(pci_dev); struct amd8111e_priv *lp = netdev_priv(dev); diff -Nru a/drivers/net/arm/ether1.c b/drivers/net/arm/ether1.c --- a/drivers/net/arm/ether1.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/arm/ether1.c 2005-03-07 14:54:18 -08:00 @@ -86,8 +86,8 @@ #define DISABLEIRQS 1 #define NORMALIRQS 0 -#define ether1_inw(dev, addr, type, offset, svflgs) ether1_inw_p (dev, addr + (int)(&((type *)0)->offset), svflgs) -#define ether1_outw(dev, val, addr, type, offset, svflgs) ether1_outw_p (dev, val, addr + (int)(&((type *)0)->offset), svflgs) +#define ether1_readw(dev, addr, type, offset, svflgs) ether1_inw_p (dev, addr + (int)(&((type *)0)->offset), svflgs) +#define ether1_writew(dev, val, addr, type, offset, svflgs) ether1_outw_p (dev, val, addr + (int)(&((type *)0)->offset), svflgs) static inline unsigned short ether1_inw_p (struct net_device *dev, int addr, int svflgs) @@ -98,8 +98,8 @@ if (svflgs) local_irq_save (flags); - outb (addr >> 12, REG_PAGE); - ret = inw (ETHER1_RAM + ((addr & 4095) >> 1)); + writeb(addr >> 12, REG_PAGE); + ret = readw(ETHER1_RAM + ((addr & 4095) << 1)); if (svflgs) local_irq_restore (flags); return ret; @@ -113,8 +113,8 @@ if (svflgs) local_irq_save (flags); - outb (addr >> 12, REG_PAGE); - outw (val, ETHER1_RAM + ((addr & 4095) >> 1)); + writeb(addr >> 12, REG_PAGE); + writew(val, ETHER1_RAM + ((addr & 4095) << 1)); if (svflgs) local_irq_restore (flags); } @@ -131,11 +131,12 @@ static void ether1_writebuffer (struct net_device *dev, void *data, unsigned int start, unsigned int length) { - unsigned int page, thislen, offset, addr; + unsigned int page, thislen, offset; + void __iomem *addr; offset = start & 4095; page = start >> 12; - addr = ioaddr(ETHER1_RAM + (offset >> 1)); + addr = ETHER1_RAM + (offset << 1); if (offset + length > 4096) thislen = 4096 - offset; @@ -145,7 +146,7 @@ do { int used; - outb(page, REG_PAGE); + writeb(page, REG_PAGE); length -= thislen; __asm__ __volatile__( @@ -181,7 +182,7 @@ : "=&r" (used), "=&r" (data) : "r" (addr), "r" (thislen), "1" (data)); - addr = ioaddr(ETHER1_RAM); + addr = ETHER1_RAM; thislen = length; if (thislen > 4096) @@ -193,11 +194,12 @@ static void ether1_readbuffer (struct net_device *dev, void *data, unsigned int start, unsigned int length) { - unsigned int page, thislen, offset, addr; + unsigned int page, thislen, offset; + void __iomem *addr; offset = start & 4095; page = start >> 12; - addr = ioaddr(ETHER1_RAM + (offset >> 1)); + addr = ETHER1_RAM + (offset << 1); if (offset + length > 4096) thislen = 4096 - offset; @@ -207,7 +209,7 @@ do { int used; - outb(page, REG_PAGE); + writeb(page, REG_PAGE); length -= thislen; __asm__ __volatile__( @@ -243,7 +245,7 @@ : "=&r" (used), "=&r" (data) : "r" (addr), "r" (thislen), "1" (data)); - addr = ioaddr(ETHER1_RAM); + addr = ETHER1_RAM; thislen = length; if (thislen > 4096) @@ -302,7 +304,7 @@ static int ether1_reset (struct net_device *dev) { - outb (CTRL_RST|CTRL_ACK, REG_CONTROL); + writeb(CTRL_RST|CTRL_ACK, REG_CONTROL); return BUS_16; } @@ -447,12 +449,11 @@ static int ether1_init_for_open (struct net_device *dev) { - struct ether1_priv *priv = netdev_priv(dev); int i, status, addr, next, next2; int failures = 0; unsigned long timeout; - outb (CTRL_RST|CTRL_ACK, REG_CONTROL); + writeb(CTRL_RST|CTRL_ACK, REG_CONTROL); for (i = 0; i < 6; i++) init_sa.sa_addr[i] = dev->dev_addr[i]; @@ -467,7 +468,7 @@ ether1_writebuffer (dev, &init_tdr, TDR_ADDR, TDR_SIZE); ether1_writebuffer (dev, &init_nop, NOP_ADDR, NOP_SIZE); - if (ether1_inw (dev, CFG_ADDR, cfg_t, cfg_command, NORMALIRQS) != CMD_CONFIG) { + if (ether1_readw(dev, CFG_ADDR, cfg_t, cfg_command, NORMALIRQS) != CMD_CONFIG) { printk (KERN_ERR "%s: detected either RAM fault or compiler bug\n", dev->name); return 1; @@ -487,7 +488,7 @@ if (next2 >= RX_AREA_END) { next = RX_AREA_START; init_rfd.rfd_command = RFD_CMDEL | RFD_CMDSUSPEND; - priv->rx_tail = addr; + priv(dev)->rx_tail = addr; } else init_rfd.rfd_command = 0; if (addr == RX_AREA_START) @@ -503,21 +504,21 @@ addr = next; } while (next2 < RX_AREA_END); - priv->tx_link = NOP_ADDR; - priv->tx_head = NOP_ADDR + NOP_SIZE; - priv->tx_tail = TDR_ADDR; - priv->rx_head = RX_AREA_START; + priv(dev)->tx_link = NOP_ADDR; + priv(dev)->tx_head = NOP_ADDR + NOP_SIZE; + priv(dev)->tx_tail = TDR_ADDR; + priv(dev)->rx_head = RX_AREA_START; /* release reset & give 586 a prod */ - priv->resetting = 1; - priv->initialising = 1; - outb (CTRL_RST, REG_CONTROL); - outb (0, REG_CONTROL); - outb (CTRL_CA, REG_CONTROL); + priv(dev)->resetting = 1; + priv(dev)->initialising = 1; + writeb(CTRL_RST, REG_CONTROL); + writeb(0, REG_CONTROL); + writeb(CTRL_CA, REG_CONTROL); /* 586 should now unset iscp.busy */ timeout = jiffies + HZ/2; - while (ether1_inw (dev, ISCP_ADDR, iscp_t, iscp_busy, DISABLEIRQS) == 1) { + while (ether1_readw(dev, ISCP_ADDR, iscp_t, iscp_busy, DISABLEIRQS) == 1) { if (time_after(jiffies, timeout)) { printk (KERN_WARNING "%s: can't initialise 82586: iscp is busy\n", dev->name); return 1; @@ -526,7 +527,7 @@ /* check status of commands that we issued */ timeout += HZ/10; - while (((status = ether1_inw (dev, CFG_ADDR, cfg_t, cfg_status, DISABLEIRQS)) + while (((status = ether1_readw(dev, CFG_ADDR, cfg_t, cfg_status, DISABLEIRQS)) & STAT_COMPLETE) == 0) { if (time_after(jiffies, timeout)) break; @@ -535,15 +536,15 @@ if ((status & (STAT_COMPLETE | STAT_OK)) != (STAT_COMPLETE | STAT_OK)) { printk (KERN_WARNING "%s: can't initialise 82586: config status %04X\n", dev->name, status); printk (KERN_DEBUG "%s: SCB=[STS=%04X CMD=%04X CBL=%04X RFA=%04X]\n", dev->name, - ether1_inw (dev, SCB_ADDR, scb_t, scb_status, NORMALIRQS), - ether1_inw (dev, SCB_ADDR, scb_t, scb_command, NORMALIRQS), - ether1_inw (dev, SCB_ADDR, scb_t, scb_cbl_offset, NORMALIRQS), - ether1_inw (dev, SCB_ADDR, scb_t, scb_rfa_offset, NORMALIRQS)); + ether1_readw(dev, SCB_ADDR, scb_t, scb_status, NORMALIRQS), + ether1_readw(dev, SCB_ADDR, scb_t, scb_command, NORMALIRQS), + ether1_readw(dev, SCB_ADDR, scb_t, scb_cbl_offset, NORMALIRQS), + ether1_readw(dev, SCB_ADDR, scb_t, scb_rfa_offset, NORMALIRQS)); failures += 1; } timeout += HZ/10; - while (((status = ether1_inw (dev, SA_ADDR, sa_t, sa_status, DISABLEIRQS)) + while (((status = ether1_readw(dev, SA_ADDR, sa_t, sa_status, DISABLEIRQS)) & STAT_COMPLETE) == 0) { if (time_after(jiffies, timeout)) break; @@ -552,15 +553,15 @@ if ((status & (STAT_COMPLETE | STAT_OK)) != (STAT_COMPLETE | STAT_OK)) { printk (KERN_WARNING "%s: can't initialise 82586: set address status %04X\n", dev->name, status); printk (KERN_DEBUG "%s: SCB=[STS=%04X CMD=%04X CBL=%04X RFA=%04X]\n", dev->name, - ether1_inw (dev, SCB_ADDR, scb_t, scb_status, NORMALIRQS), - ether1_inw (dev, SCB_ADDR, scb_t, scb_command, NORMALIRQS), - ether1_inw (dev, SCB_ADDR, scb_t, scb_cbl_offset, NORMALIRQS), - ether1_inw (dev, SCB_ADDR, scb_t, scb_rfa_offset, NORMALIRQS)); + ether1_readw(dev, SCB_ADDR, scb_t, scb_status, NORMALIRQS), + ether1_readw(dev, SCB_ADDR, scb_t, scb_command, NORMALIRQS), + ether1_readw(dev, SCB_ADDR, scb_t, scb_cbl_offset, NORMALIRQS), + ether1_readw(dev, SCB_ADDR, scb_t, scb_rfa_offset, NORMALIRQS)); failures += 1; } timeout += HZ/10; - while (((status = ether1_inw (dev, MC_ADDR, mc_t, mc_status, DISABLEIRQS)) + while (((status = ether1_readw(dev, MC_ADDR, mc_t, mc_status, DISABLEIRQS)) & STAT_COMPLETE) == 0) { if (time_after(jiffies, timeout)) break; @@ -569,15 +570,15 @@ if ((status & (STAT_COMPLETE | STAT_OK)) != (STAT_COMPLETE | STAT_OK)) { printk (KERN_WARNING "%s: can't initialise 82586: set multicast status %04X\n", dev->name, status); printk (KERN_DEBUG "%s: SCB=[STS=%04X CMD=%04X CBL=%04X RFA=%04X]\n", dev->name, - ether1_inw (dev, SCB_ADDR, scb_t, scb_status, NORMALIRQS), - ether1_inw (dev, SCB_ADDR, scb_t, scb_command, NORMALIRQS), - ether1_inw (dev, SCB_ADDR, scb_t, scb_cbl_offset, NORMALIRQS), - ether1_inw (dev, SCB_ADDR, scb_t, scb_rfa_offset, NORMALIRQS)); + ether1_readw(dev, SCB_ADDR, scb_t, scb_status, NORMALIRQS), + ether1_readw(dev, SCB_ADDR, scb_t, scb_command, NORMALIRQS), + ether1_readw(dev, SCB_ADDR, scb_t, scb_cbl_offset, NORMALIRQS), + ether1_readw(dev, SCB_ADDR, scb_t, scb_rfa_offset, NORMALIRQS)); failures += 1; } timeout += HZ; - while (((status = ether1_inw (dev, TDR_ADDR, tdr_t, tdr_status, DISABLEIRQS)) + while (((status = ether1_readw(dev, TDR_ADDR, tdr_t, tdr_status, DISABLEIRQS)) & STAT_COMPLETE) == 0) { if (time_after(jiffies, timeout)) break; @@ -586,12 +587,12 @@ if ((status & (STAT_COMPLETE | STAT_OK)) != (STAT_COMPLETE | STAT_OK)) { printk (KERN_WARNING "%s: can't tdr (ignored)\n", dev->name); printk (KERN_DEBUG "%s: SCB=[STS=%04X CMD=%04X CBL=%04X RFA=%04X]\n", dev->name, - ether1_inw (dev, SCB_ADDR, scb_t, scb_status, NORMALIRQS), - ether1_inw (dev, SCB_ADDR, scb_t, scb_command, NORMALIRQS), - ether1_inw (dev, SCB_ADDR, scb_t, scb_cbl_offset, NORMALIRQS), - ether1_inw (dev, SCB_ADDR, scb_t, scb_rfa_offset, NORMALIRQS)); + ether1_readw(dev, SCB_ADDR, scb_t, scb_status, NORMALIRQS), + ether1_readw(dev, SCB_ADDR, scb_t, scb_command, NORMALIRQS), + ether1_readw(dev, SCB_ADDR, scb_t, scb_cbl_offset, NORMALIRQS), + ether1_readw(dev, SCB_ADDR, scb_t, scb_rfa_offset, NORMALIRQS)); } else { - status = ether1_inw (dev, TDR_ADDR, tdr_t, tdr_result, DISABLEIRQS); + status = ether1_readw(dev, TDR_ADDR, tdr_t, tdr_result, DISABLEIRQS); if (status & TDR_XCVRPROB) printk (KERN_WARNING "%s: i/f failed tdr: transceiver problem\n", dev->name); else if ((status & (TDR_SHORT|TDR_OPEN)) && (status & TDR_TIME)) { @@ -616,24 +617,23 @@ static int ether1_txalloc (struct net_device *dev, int size) { - struct ether1_priv *priv = netdev_priv(dev); int start, tail; size = (size + 1) & ~1; - tail = priv->tx_tail; + tail = priv(dev)->tx_tail; - if (priv->tx_head + size > TX_AREA_END) { - if (tail > priv->tx_head) + if (priv(dev)->tx_head + size > TX_AREA_END) { + if (tail > priv(dev)->tx_head) return -1; start = TX_AREA_START; if (start + size > tail) return -1; - priv->tx_head = start + size; + priv(dev)->tx_head = start + size; } else { - if (priv->tx_head < tail && (priv->tx_head + size) > tail) + if (priv(dev)->tx_head < tail && (priv(dev)->tx_head + size) > tail) return -1; - start = priv->tx_head; - priv->tx_head += size; + start = priv(dev)->tx_head; + priv(dev)->tx_head += size; } return start; @@ -642,8 +642,6 @@ static int ether1_open (struct net_device *dev) { - struct ether1_priv *priv = netdev_priv(dev); - if (!is_valid_ether_addr(dev->dev_addr)) { printk(KERN_WARNING "%s: invalid ethernet MAC address\n", dev->name); @@ -653,7 +651,7 @@ if (request_irq(dev->irq, ether1_interrupt, 0, "ether1", dev)) return -EAGAIN; - memset (&priv->stats, 0, sizeof (struct net_device_stats)); + memset (&priv(dev)->stats, 0, sizeof (struct net_device_stats)); if (ether1_init_for_open (dev)) { free_irq (dev->irq, dev); @@ -668,8 +666,6 @@ static void ether1_timeout(struct net_device *dev) { - struct ether1_priv *priv = netdev_priv(dev); - printk(KERN_WARNING "%s: transmit timeout, network cable problem?\n", dev->name); printk(KERN_WARNING "%s: resetting device\n", dev->name); @@ -679,21 +675,20 @@ if (ether1_init_for_open (dev)) printk (KERN_ERR "%s: unable to restart interface\n", dev->name); - priv->stats.tx_errors++; + priv(dev)->stats.tx_errors++; netif_wake_queue(dev); } static int ether1_sendpacket (struct sk_buff *skb, struct net_device *dev) { - struct ether1_priv *priv = netdev_priv(dev); int tmp, tst, nopaddr, txaddr, tbdaddr, dataddr; unsigned long flags; tx_t tx; tbd_t tbd; nop_t nop; - if (priv->restart) { + if (priv(dev)->restart) { printk(KERN_WARNING "%s: resetting device\n", dev->name); ether1_reset(dev); @@ -701,7 +696,7 @@ if (ether1_init_for_open(dev)) printk(KERN_ERR "%s: unable to restart interface\n", dev->name); else - priv->restart = 0; + priv(dev)->restart = 0; } if (skb->len < ETH_ZLEN) { @@ -735,11 +730,11 @@ ether1_writebuffer (dev, &tbd, tbdaddr, TBD_SIZE); ether1_writebuffer (dev, skb->data, dataddr, skb->len); ether1_writebuffer (dev, &nop, nopaddr, NOP_SIZE); - tmp = priv->tx_link; - priv->tx_link = nopaddr; + tmp = priv(dev)->tx_link; + priv(dev)->tx_link = nopaddr; /* now reset the previous nop pointer */ - ether1_outw (dev, txaddr, tmp, nop_t, nop_link, NORMALIRQS); + ether1_writew(dev, txaddr, tmp, nop_t, nop_link, NORMALIRQS); local_irq_restore(flags); @@ -747,9 +742,9 @@ dev->trans_start = jiffies; /* check to see if we have room for a full sized ether frame */ - tmp = priv->tx_head; + tmp = priv(dev)->tx_head; tst = ether1_txalloc (dev, TX_SIZE + TBD_SIZE + NOP_SIZE + ETH_FRAME_LEN); - priv->tx_head = tmp; + priv(dev)->tx_head = tmp; dev_kfree_skb (skb); if (tst == -1) @@ -762,11 +757,10 @@ static void ether1_xmit_done (struct net_device *dev) { - struct ether1_priv *priv = netdev_priv(dev); nop_t nop; int caddr, tst; - caddr = priv->tx_tail; + caddr = priv(dev)->tx_tail; again: ether1_readbuffer (dev, &nop, caddr, NOP_SIZE); @@ -774,21 +768,21 @@ switch (nop.nop_command & CMD_MASK) { case CMD_TDR: /* special case */ - if (ether1_inw (dev, SCB_ADDR, scb_t, scb_cbl_offset, NORMALIRQS) + if (ether1_readw(dev, SCB_ADDR, scb_t, scb_cbl_offset, NORMALIRQS) != (unsigned short)I82586_NULL) { - ether1_outw(dev, SCB_CMDCUCSTART | SCB_CMDRXSTART, SCB_ADDR, scb_t, + ether1_writew(dev, SCB_CMDCUCSTART | SCB_CMDRXSTART, SCB_ADDR, scb_t, scb_command, NORMALIRQS); - outb (CTRL_CA, REG_CONTROL); + writeb(CTRL_CA, REG_CONTROL); } - priv->tx_tail = NOP_ADDR; + priv(dev)->tx_tail = NOP_ADDR; return; case CMD_NOP: if (nop.nop_link == caddr) { - if (priv->initialising == 0) + if (priv(dev)->initialising == 0) printk (KERN_WARNING "%s: strange command complete with no tx command!\n", dev->name); else - priv->initialising = 0; + priv(dev)->initialising = 0; return; } if (caddr == nop.nop_link) @@ -800,33 +794,33 @@ if (nop.nop_status & STAT_COMPLETE) break; printk (KERN_ERR "%s: strange command complete without completed command\n", dev->name); - priv->restart = 1; + priv(dev)->restart = 1; return; default: printk (KERN_WARNING "%s: strange command %d complete! (offset %04X)", dev->name, nop.nop_command & CMD_MASK, caddr); - priv->restart = 1; + priv(dev)->restart = 1; return; } while (nop.nop_status & STAT_COMPLETE) { if (nop.nop_status & STAT_OK) { - priv->stats.tx_packets ++; - priv->stats.collisions += (nop.nop_status & STAT_COLLISIONS); + priv(dev)->stats.tx_packets ++; + priv(dev)->stats.collisions += (nop.nop_status & STAT_COLLISIONS); } else { - priv->stats.tx_errors ++; + priv(dev)->stats.tx_errors ++; if (nop.nop_status & STAT_COLLAFTERTX) - priv->stats.collisions ++; + priv(dev)->stats.collisions ++; if (nop.nop_status & STAT_NOCARRIER) - priv->stats.tx_carrier_errors ++; + priv(dev)->stats.tx_carrier_errors ++; if (nop.nop_status & STAT_TXLOSTCTS) printk (KERN_WARNING "%s: cts lost\n", dev->name); if (nop.nop_status & STAT_TXSLOWDMA) - priv->stats.tx_fifo_errors ++; + priv(dev)->stats.tx_fifo_errors ++; if (nop.nop_status & STAT_COLLEXCESSIVE) - priv->stats.collisions += 16; + priv(dev)->stats.collisions += 16; } if (nop.nop_link == caddr) { @@ -851,11 +845,11 @@ break; } } - priv->tx_tail = caddr; + priv(dev)->tx_tail = caddr; - caddr = priv->tx_head; + caddr = priv(dev)->tx_head; tst = ether1_txalloc (dev, TX_SIZE + TBD_SIZE + NOP_SIZE + ETH_FRAME_LEN); - priv->tx_head = caddr; + priv(dev)->tx_head = caddr; if (tst != -1) netif_wake_queue(dev); } @@ -863,17 +857,16 @@ static void ether1_recv_done (struct net_device *dev) { - struct ether1_priv *priv = netdev_priv(dev); int status; int nexttail, rbdaddr; rbd_t rbd; do { - status = ether1_inw (dev, priv->rx_head, rfd_t, rfd_status, NORMALIRQS); + status = ether1_readw(dev, priv(dev)->rx_head, rfd_t, rfd_status, NORMALIRQS); if ((status & RFD_COMPLETE) == 0) break; - rbdaddr = ether1_inw (dev, priv->rx_head, rfd_t, rfd_rbdoffset, NORMALIRQS); + rbdaddr = ether1_readw(dev, priv(dev)->rx_head, rfd_t, rfd_rbdoffset, NORMALIRQS); ether1_readbuffer (dev, &rbd, rbdaddr, RBD_SIZE); if ((rbd.rbd_status & (RBD_EOF | RBD_ACNTVALID)) == (RBD_EOF | RBD_ACNTVALID)) { @@ -891,27 +884,27 @@ skb->protocol = eth_type_trans (skb, dev); netif_rx (skb); - priv->stats.rx_packets ++; + priv(dev)->stats.rx_packets ++; } else - priv->stats.rx_dropped ++; + priv(dev)->stats.rx_dropped ++; } else { printk(KERN_WARNING "%s: %s\n", dev->name, (rbd.rbd_status & RBD_EOF) ? "oversized packet" : "acnt not valid"); - priv->stats.rx_dropped ++; + priv(dev)->stats.rx_dropped ++; } - nexttail = ether1_inw (dev, priv->rx_tail, rfd_t, rfd_link, NORMALIRQS); + nexttail = ether1_readw(dev, priv(dev)->rx_tail, rfd_t, rfd_link, NORMALIRQS); /* nexttail should be rx_head */ - if (nexttail != priv->rx_head) + if (nexttail != priv(dev)->rx_head) printk(KERN_ERR "%s: receiver buffer chaining error (%04X != %04X)\n", - dev->name, nexttail, priv->rx_head); - ether1_outw (dev, RFD_CMDEL | RFD_CMDSUSPEND, nexttail, rfd_t, rfd_command, NORMALIRQS); - ether1_outw (dev, 0, priv->rx_tail, rfd_t, rfd_command, NORMALIRQS); - ether1_outw (dev, 0, priv->rx_tail, rfd_t, rfd_status, NORMALIRQS); - ether1_outw (dev, 0, priv->rx_tail, rfd_t, rfd_rbdoffset, NORMALIRQS); + dev->name, nexttail, priv(dev)->rx_head); + ether1_writew(dev, RFD_CMDEL | RFD_CMDSUSPEND, nexttail, rfd_t, rfd_command, NORMALIRQS); + ether1_writew(dev, 0, priv(dev)->rx_tail, rfd_t, rfd_command, NORMALIRQS); + ether1_writew(dev, 0, priv(dev)->rx_tail, rfd_t, rfd_status, NORMALIRQS); + ether1_writew(dev, 0, priv(dev)->rx_tail, rfd_t, rfd_rbdoffset, NORMALIRQS); - priv->rx_tail = nexttail; - priv->rx_head = ether1_inw (dev, priv->rx_head, rfd_t, rfd_link, NORMALIRQS); + priv(dev)->rx_tail = nexttail; + priv(dev)->rx_head = ether1_readw(dev, priv(dev)->rx_head, rfd_t, rfd_link, NORMALIRQS); } while (1); } @@ -919,48 +912,47 @@ ether1_interrupt (int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *)dev_id; - struct ether1_priv *priv = netdev_priv(dev); int status; - status = ether1_inw (dev, SCB_ADDR, scb_t, scb_status, NORMALIRQS); + status = ether1_readw(dev, SCB_ADDR, scb_t, scb_status, NORMALIRQS); if (status) { - ether1_outw(dev, status & (SCB_STRNR | SCB_STCNA | SCB_STFR | SCB_STCX), + ether1_writew(dev, status & (SCB_STRNR | SCB_STCNA | SCB_STFR | SCB_STCX), SCB_ADDR, scb_t, scb_command, NORMALIRQS); - outb (CTRL_CA | CTRL_ACK, REG_CONTROL); + writeb(CTRL_CA | CTRL_ACK, REG_CONTROL); if (status & SCB_STCX) { ether1_xmit_done (dev); } if (status & SCB_STCNA) { - if (priv->resetting == 0) + if (priv(dev)->resetting == 0) printk (KERN_WARNING "%s: CU went not ready ???\n", dev->name); else - priv->resetting += 1; - if (ether1_inw (dev, SCB_ADDR, scb_t, scb_cbl_offset, NORMALIRQS) + priv(dev)->resetting += 1; + if (ether1_readw(dev, SCB_ADDR, scb_t, scb_cbl_offset, NORMALIRQS) != (unsigned short)I82586_NULL) { - ether1_outw (dev, SCB_CMDCUCSTART, SCB_ADDR, scb_t, scb_command, NORMALIRQS); - outb (CTRL_CA, REG_CONTROL); + ether1_writew(dev, SCB_CMDCUCSTART, SCB_ADDR, scb_t, scb_command, NORMALIRQS); + writeb(CTRL_CA, REG_CONTROL); } - if (priv->resetting == 2) - priv->resetting = 0; + if (priv(dev)->resetting == 2) + priv(dev)->resetting = 0; } if (status & SCB_STFR) { ether1_recv_done (dev); } if (status & SCB_STRNR) { - if (ether1_inw (dev, SCB_ADDR, scb_t, scb_status, NORMALIRQS) & SCB_STRXSUSP) { + if (ether1_readw(dev, SCB_ADDR, scb_t, scb_status, NORMALIRQS) & SCB_STRXSUSP) { printk (KERN_WARNING "%s: RU went not ready: RU suspended\n", dev->name); - ether1_outw (dev, SCB_CMDRXRESUME, SCB_ADDR, scb_t, scb_command, NORMALIRQS); - outb (CTRL_CA, REG_CONTROL); - priv->stats.rx_dropped ++; /* we suspended due to lack of buffer space */ + ether1_writew(dev, SCB_CMDRXRESUME, SCB_ADDR, scb_t, scb_command, NORMALIRQS); + writeb(CTRL_CA, REG_CONTROL); + priv(dev)->stats.rx_dropped ++; /* we suspended due to lack of buffer space */ } else printk(KERN_WARNING "%s: RU went not ready: %04X\n", dev->name, - ether1_inw (dev, SCB_ADDR, scb_t, scb_status, NORMALIRQS)); - printk (KERN_WARNING "RU ptr = %04X\n", ether1_inw (dev, SCB_ADDR, scb_t, scb_rfa_offset, + ether1_readw(dev, SCB_ADDR, scb_t, scb_status, NORMALIRQS)); + printk (KERN_WARNING "RU ptr = %04X\n", ether1_readw(dev, SCB_ADDR, scb_t, scb_rfa_offset, NORMALIRQS)); } } else - outb (CTRL_ACK, REG_CONTROL); + writeb(CTRL_ACK, REG_CONTROL); return IRQ_HANDLED; } @@ -978,8 +970,7 @@ static struct net_device_stats * ether1_getstats (struct net_device *dev) { - struct ether1_priv *priv = netdev_priv(dev); - return &priv->stats; + return &priv(dev)->stats; } /* @@ -1008,40 +999,42 @@ ether1_probe(struct expansion_card *ec, const struct ecard_id *id) { struct net_device *dev; - struct ether1_priv *priv; int i, ret = 0; ether1_banner(); + ret = ecard_request_resources(ec); + if (ret) + goto out; + dev = alloc_etherdev(sizeof(struct ether1_priv)); if (!dev) { ret = -ENOMEM; - goto out; + goto release; } SET_MODULE_OWNER(dev); + SET_NETDEV_DEV(dev, &ec->dev); - dev->base_addr = ecard_address(ec, ECARD_IOC, ECARD_FAST); - dev->irq = ec->irq; - - /* - * these will not fail - the nature of the bus ensures this - */ - request_region(dev->base_addr, 16, dev->name); - request_region(dev->base_addr + 0x800, 4096, dev->name); + dev->irq = ec->irq; + priv(dev)->base = ioremap(ecard_resource_start(ec, ECARD_RES_IOCFAST), + ecard_resource_len(ec, ECARD_RES_IOCFAST)); + if (!priv(dev)->base) { + ret = -ENOMEM; + goto free; + } - priv = netdev_priv(dev); - if ((priv->bus_type = ether1_reset(dev)) == 0) { + if ((priv(dev)->bus_type = ether1_reset(dev)) == 0) { ret = -ENODEV; - goto release; + goto free; } for (i = 0; i < 6; i++) - dev->dev_addr[i] = inb(IDPROM_ADDRESS + i); + dev->dev_addr[i] = readb(IDPROM_ADDRESS + (i << 2)); if (ether1_init_2(dev)) { ret = -ENODEV; - goto release; + goto free; } dev->open = ether1_open; @@ -1054,7 +1047,7 @@ ret = register_netdev(dev); if (ret) - goto release; + goto free; printk(KERN_INFO "%s: ether1 in slot %d, ", dev->name, ec->slot_no); @@ -1065,11 +1058,13 @@ ecard_set_drvdata(ec, dev); return 0; -release: - release_region(dev->base_addr, 16); - release_region(dev->base_addr + 0x800, 4096); + free: + if (priv(dev)->base) + iounmap(priv(dev)->base); free_netdev(dev); -out: + release: + ecard_release_resources(ec); + out: return ret; } @@ -1080,10 +1075,9 @@ ecard_set_drvdata(ec, NULL); unregister_netdev(dev); - - release_region(dev->base_addr, 16); - release_region(dev->base_addr + 0x800, 4096); + iounmap(priv(dev)->base); free_netdev(dev); + ecard_release_resources(ec); } static const struct ecard_id ether1_ids[] = { diff -Nru a/drivers/net/arm/ether1.h b/drivers/net/arm/ether1.h --- a/drivers/net/arm/ether1.h 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/arm/ether1.h 2005-03-07 14:54:18 -08:00 @@ -19,22 +19,25 @@ #define NET_DEBUG 0 #endif +#define priv(dev) ((struct ether1_priv *)netdev_priv(dev)) + /* Page register */ -#define REG_PAGE (dev->base_addr + 0x00) +#define REG_PAGE (priv(dev)->base + 0x0000) /* Control register */ -#define REG_CONTROL (dev->base_addr + 0x01) +#define REG_CONTROL (priv(dev)->base + 0x0004) #define CTRL_RST 0x01 #define CTRL_LOOPBACK 0x02 #define CTRL_CA 0x04 #define CTRL_ACK 0x08 -#define ETHER1_RAM (dev->base_addr + 0x800) +#define ETHER1_RAM (priv(dev)->base + 0x2000) /* HW address */ -#define IDPROM_ADDRESS (dev->base_addr + 0x09) +#define IDPROM_ADDRESS (priv(dev)->base + 0x0024) struct ether1_priv { + void __iomem *base; struct net_device_stats stats; unsigned int tx_link; unsigned int tx_head; diff -Nru a/drivers/net/arm/ether3.c b/drivers/net/arm/ether3.c --- a/drivers/net/arm/ether3.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/arm/ether3.c 2005-03-07 14:54:18 -08:00 @@ -78,8 +78,8 @@ static unsigned int net_debug = NET_DEBUG; static void ether3_setmulticastlist(struct net_device *dev); -static int ether3_rx(struct net_device *dev, struct dev_priv *priv, unsigned int maxcnt); -static void ether3_tx(struct net_device *dev, struct dev_priv *priv); +static int ether3_rx(struct net_device *dev, unsigned int maxcnt); +static void ether3_tx(struct net_device *dev); static int ether3_open (struct net_device *dev); static int ether3_sendpacket (struct sk_buff *skb, struct net_device *dev); static irqreturn_t ether3_interrupt (int irq, void *dev_id, struct pt_regs *regs); @@ -104,33 +104,32 @@ * The SEEQ8005 doesn't like us writing to its registers * too quickly. */ -static inline void ether3_outb(int v, const int r) +static inline void ether3_outb(int v, const void __iomem *r) { - outb(v, r); + writeb(v, r); udelay(1); } -static inline void ether3_outw(int v, const int r) +static inline void ether3_outw(int v, const void __iomem *r) { - outw(v, r); + writew(v, r); udelay(1); } -#define ether3_inb(r) ({ unsigned int __v = inb((r)); udelay(1); __v; }) -#define ether3_inw(r) ({ unsigned int __v = inw((r)); udelay(1); __v; }) +#define ether3_inb(r) ({ unsigned int __v = readb((r)); udelay(1); __v; }) +#define ether3_inw(r) ({ unsigned int __v = readw((r)); udelay(1); __v; }) static int ether3_setbuffer(struct net_device *dev, buffer_rw_t read, int start) { - struct dev_priv *priv = netdev_priv(dev); int timeout = 1000; - ether3_outw(priv->regs.config1 | CFG1_LOCBUFMEM, REG_CONFIG1); - ether3_outw(priv->regs.command | CMD_FIFOWRITE, REG_COMMAND); + ether3_outw(priv(dev)->regs.config1 | CFG1_LOCBUFMEM, REG_CONFIG1); + ether3_outw(priv(dev)->regs.command | CMD_FIFOWRITE, REG_COMMAND); while ((ether3_inw(REG_STATUS) & STAT_FIFOEMPTY) == 0) { if (!timeout--) { printk("%s: setbuffer broken\n", dev->name); - priv->broken = 1; + priv(dev)->broken = 1; return 1; } udelay(1); @@ -138,9 +137,9 @@ if (read == buffer_read) { ether3_outw(start, REG_DMAADDR); - ether3_outw(priv->regs.command | CMD_FIFOREAD, REG_COMMAND); + ether3_outw(priv(dev)->regs.command | CMD_FIFOREAD, REG_COMMAND); } else { - ether3_outw(priv->regs.command | CMD_FIFOWRITE, REG_COMMAND); + ether3_outw(priv(dev)->regs.command | CMD_FIFOWRITE, REG_COMMAND); ether3_outw(start, REG_DMAADDR); } return 0; @@ -150,53 +149,50 @@ * write data to the buffer memory */ #define ether3_writebuffer(dev,data,length) \ - outsw(REG_BUFWIN, (data), (length) >> 1) + writesw(REG_BUFWIN, (data), (length) >> 1) #define ether3_writeword(dev,data) \ - outw((data), REG_BUFWIN) + writew((data), REG_BUFWIN) #define ether3_writelong(dev,data) { \ - unsigned long reg_bufwin = REG_BUFWIN; \ - outw((data), reg_bufwin); \ - outw((data) >> 16, reg_bufwin); \ + void __iomem *reg_bufwin = REG_BUFWIN; \ + writew((data), reg_bufwin); \ + writew((data) >> 16, reg_bufwin); \ } /* * read data from the buffer memory */ #define ether3_readbuffer(dev,data,length) \ - insw(REG_BUFWIN, (data), (length) >> 1) + readsw(REG_BUFWIN, (data), (length) >> 1) #define ether3_readword(dev) \ - inw(REG_BUFWIN) + readw(REG_BUFWIN) #define ether3_readlong(dev) \ - inw(REG_BUFWIN) | (inw(REG_BUFWIN) << 16) + readw(REG_BUFWIN) | (readw(REG_BUFWIN) << 16) /* * Switch LED off... */ -static void -ether3_ledoff(unsigned long data) +static void ether3_ledoff(unsigned long data) { struct net_device *dev = (struct net_device *)data; - struct dev_priv *priv = netdev_priv(dev); - ether3_outw(priv->regs.config2 |= CFG2_CTRLO, REG_CONFIG2); + ether3_outw(priv(dev)->regs.config2 |= CFG2_CTRLO, REG_CONFIG2); } /* * switch LED on... */ -static inline void -ether3_ledon(struct net_device *dev, struct dev_priv *priv) +static inline void ether3_ledon(struct net_device *dev) { - del_timer(&priv->timer); - priv->timer.expires = jiffies + HZ / 50; /* leave on for 1/50th second */ - priv->timer.data = (unsigned long)dev; - priv->timer.function = ether3_ledoff; - add_timer(&priv->timer); - if (priv->regs.config2 & CFG2_CTRLO) - ether3_outw(priv->regs.config2 &= ~CFG2_CTRLO, REG_CONFIG2); + del_timer(&priv(dev)->timer); + priv(dev)->timer.expires = jiffies + HZ / 50; /* leave on for 1/50th second */ + priv(dev)->timer.data = (unsigned long)dev; + priv(dev)->timer.function = ether3_ledoff; + add_timer(&priv(dev)->timer); + if (priv(dev)->regs.config2 & CFG2_CTRLO) + ether3_outw(priv(dev)->regs.config2 &= ~CFG2_CTRLO, REG_CONFIG2); } /* @@ -277,43 +273,41 @@ /* ------------------------------------------------------------------------------- */ -static int __init -ether3_init_2(struct net_device *dev) +static int __init ether3_init_2(struct net_device *dev) { - struct dev_priv *priv = netdev_priv(dev); int i; - priv->regs.config1 = CFG1_RECVCOMPSTAT0|CFG1_DMABURST8; - priv->regs.config2 = CFG2_CTRLO|CFG2_RECVCRC|CFG2_ERRENCRC; - priv->regs.command = 0; + priv(dev)->regs.config1 = CFG1_RECVCOMPSTAT0|CFG1_DMABURST8; + priv(dev)->regs.config2 = CFG2_CTRLO|CFG2_RECVCRC|CFG2_ERRENCRC; + priv(dev)->regs.command = 0; /* * Set up our hardware address */ - ether3_outw(priv->regs.config1 | CFG1_BUFSELSTAT0, REG_CONFIG1); + ether3_outw(priv(dev)->regs.config1 | CFG1_BUFSELSTAT0, REG_CONFIG1); for (i = 0; i < 6; i++) ether3_outb(dev->dev_addr[i], REG_BUFWIN); if (dev->flags & IFF_PROMISC) - priv->regs.config1 |= CFG1_RECVPROMISC; + priv(dev)->regs.config1 |= CFG1_RECVPROMISC; else if (dev->flags & IFF_MULTICAST) - priv->regs.config1 |= CFG1_RECVSPECBRMULTI; + priv(dev)->regs.config1 |= CFG1_RECVSPECBRMULTI; else - priv->regs.config1 |= CFG1_RECVSPECBROAD; + priv(dev)->regs.config1 |= CFG1_RECVSPECBROAD; /* * There is a problem with the NQ8005 in that it occasionally loses the * last two bytes. To get round this problem, we receive the CRC as * well. That way, if we do lose the last two, then it doesn't matter. */ - ether3_outw(priv->regs.config1 | CFG1_TRANSEND, REG_CONFIG1); + ether3_outw(priv(dev)->regs.config1 | CFG1_TRANSEND, REG_CONFIG1); ether3_outw((TX_END>>8) - 1, REG_BUFWIN); - ether3_outw(priv->rx_head, REG_RECVPTR); + ether3_outw(priv(dev)->rx_head, REG_RECVPTR); ether3_outw(0, REG_TRANSMITPTR); - ether3_outw(priv->rx_head >> 8, REG_RECVEND); - ether3_outw(priv->regs.config2, REG_CONFIG2); - ether3_outw(priv->regs.config1 | CFG1_LOCBUFMEM, REG_CONFIG1); - ether3_outw(priv->regs.command, REG_COMMAND); + ether3_outw(priv(dev)->rx_head >> 8, REG_RECVEND); + ether3_outw(priv(dev)->regs.config2, REG_CONFIG2); + ether3_outw(priv(dev)->regs.config1 | CFG1_LOCBUFMEM, REG_CONFIG1); + ether3_outw(priv(dev)->regs.command, REG_COMMAND); i = ether3_ramtest(dev, 0x5A); if(i) @@ -330,41 +324,41 @@ static void ether3_init_for_open(struct net_device *dev) { - struct dev_priv *priv = netdev_priv(dev); int i; - memset(&priv->stats, 0, sizeof(struct net_device_stats)); + memset(&priv(dev)->stats, 0, sizeof(struct net_device_stats)); /* Reset the chip */ ether3_outw(CFG2_RESET, REG_CONFIG2); udelay(4); - priv->regs.command = 0; + priv(dev)->regs.command = 0; ether3_outw(CMD_RXOFF|CMD_TXOFF, REG_COMMAND); - while (ether3_inw(REG_STATUS) & (STAT_RXON|STAT_TXON)); + while (ether3_inw(REG_STATUS) & (STAT_RXON|STAT_TXON)) + barrier(); - ether3_outw(priv->regs.config1 | CFG1_BUFSELSTAT0, REG_CONFIG1); + ether3_outw(priv(dev)->regs.config1 | CFG1_BUFSELSTAT0, REG_CONFIG1); for (i = 0; i < 6; i++) ether3_outb(dev->dev_addr[i], REG_BUFWIN); - priv->tx_head = 0; - priv->tx_tail = 0; - priv->regs.config2 |= CFG2_CTRLO; - priv->rx_head = RX_START; + priv(dev)->tx_head = 0; + priv(dev)->tx_tail = 0; + priv(dev)->regs.config2 |= CFG2_CTRLO; + priv(dev)->rx_head = RX_START; - ether3_outw(priv->regs.config1 | CFG1_TRANSEND, REG_CONFIG1); + ether3_outw(priv(dev)->regs.config1 | CFG1_TRANSEND, REG_CONFIG1); ether3_outw((TX_END>>8) - 1, REG_BUFWIN); - ether3_outw(priv->rx_head, REG_RECVPTR); - ether3_outw(priv->rx_head >> 8, REG_RECVEND); + ether3_outw(priv(dev)->rx_head, REG_RECVPTR); + ether3_outw(priv(dev)->rx_head >> 8, REG_RECVEND); ether3_outw(0, REG_TRANSMITPTR); - ether3_outw(priv->regs.config2, REG_CONFIG2); - ether3_outw(priv->regs.config1 | CFG1_LOCBUFMEM, REG_CONFIG1); + ether3_outw(priv(dev)->regs.config2, REG_CONFIG2); + ether3_outw(priv(dev)->regs.config1 | CFG1_LOCBUFMEM, REG_CONFIG1); ether3_setbuffer(dev, buffer_write, 0); ether3_writelong(dev, 0); - priv->regs.command = CMD_ENINTRX | CMD_ENINTTX; - ether3_outw(priv->regs.command | CMD_RXON, REG_COMMAND); + priv(dev)->regs.command = CMD_ENINTRX | CMD_ENINTTX; + ether3_outw(priv(dev)->regs.command | CMD_RXON, REG_COMMAND); } static inline int @@ -378,10 +372,10 @@ printk(KERN_DEBUG "ether3_probe: write8 [%02X:%02X]", write_high, write_low); ether3_outb(write_low, REG_RECVPTR); - ether3_outb(write_high, REG_RECVPTR + 1); + ether3_outb(write_high, REG_RECVPTR + 4); read_low = ether3_inb(REG_RECVPTR); - read_high = ether3_inb(REG_RECVPTR + 1); + read_high = ether3_inb(REG_RECVPTR + 4); printk(", read8 [%02X:%02X]\n", read_high, read_low); @@ -434,16 +428,15 @@ static int ether3_close(struct net_device *dev) { - struct dev_priv *priv = netdev_priv(dev); - netif_stop_queue(dev); disable_irq(dev->irq); ether3_outw(CMD_RXOFF|CMD_TXOFF, REG_COMMAND); - priv->regs.command = 0; - while (ether3_inw(REG_STATUS) & (STAT_RXON|STAT_TXON)); - ether3_outb(0x80, REG_CONFIG2 + 1); + priv(dev)->regs.command = 0; + while (ether3_inw(REG_STATUS) & (STAT_RXON|STAT_TXON)) + barrier(); + ether3_outb(0x80, REG_CONFIG2 + 4); ether3_outw(0, REG_COMMAND); free_irq(dev->irq, dev); @@ -457,8 +450,7 @@ */ static struct net_device_stats *ether3_getstats(struct net_device *dev) { - struct dev_priv *priv = netdev_priv(dev); - return &priv->stats; + return &priv(dev)->stats; } /* @@ -469,28 +461,24 @@ */ static void ether3_setmulticastlist(struct net_device *dev) { - struct dev_priv *priv = netdev_priv(dev); - - priv->regs.config1 &= ~CFG1_RECVPROMISC; + priv(dev)->regs.config1 &= ~CFG1_RECVPROMISC; if (dev->flags & IFF_PROMISC) { /* promiscuous mode */ - priv->regs.config1 |= CFG1_RECVPROMISC; + priv(dev)->regs.config1 |= CFG1_RECVPROMISC; } else if (dev->flags & IFF_ALLMULTI) { - priv->regs.config1 |= CFG1_RECVSPECBRMULTI; + priv(dev)->regs.config1 |= CFG1_RECVSPECBRMULTI; } else - priv->regs.config1 |= CFG1_RECVSPECBROAD; + priv(dev)->regs.config1 |= CFG1_RECVSPECBROAD; - ether3_outw(priv->regs.config1 | CFG1_LOCBUFMEM, REG_CONFIG1); + ether3_outw(priv(dev)->regs.config1 | CFG1_LOCBUFMEM, REG_CONFIG1); } -static void -ether3_timeout(struct net_device *dev) +static void ether3_timeout(struct net_device *dev) { - struct dev_priv *priv = netdev_priv(dev); unsigned long flags; - del_timer(&priv->timer); + del_timer(&priv(dev)->timer); local_irq_save(flags); printk(KERN_ERR "%s: transmit timed out, network cable problem?\n", dev->name); @@ -499,15 +487,15 @@ printk(KERN_ERR "%s: { rpr=%04X rea=%04X tpr=%04X }\n", dev->name, ether3_inw(REG_RECVPTR), ether3_inw(REG_RECVEND), ether3_inw(REG_TRANSMITPTR)); printk(KERN_ERR "%s: tx head=%X tx tail=%X\n", dev->name, - priv->tx_head, priv->tx_tail); - ether3_setbuffer(dev, buffer_read, priv->tx_tail); + priv(dev)->tx_head, priv(dev)->tx_tail); + ether3_setbuffer(dev, buffer_read, priv(dev)->tx_tail); printk(KERN_ERR "%s: packet status = %08X\n", dev->name, ether3_readlong(dev)); local_irq_restore(flags); - priv->regs.config2 |= CFG2_CTRLO; - priv->stats.tx_errors += 1; - ether3_outw(priv->regs.config2, REG_CONFIG2); - priv->tx_head = priv->tx_tail = 0; + priv(dev)->regs.config2 |= CFG2_CTRLO; + priv(dev)->stats.tx_errors += 1; + ether3_outw(priv(dev)->regs.config2, REG_CONFIG2); + priv(dev)->tx_head = priv(dev)->tx_tail = 0; netif_wake_queue(dev); } @@ -518,14 +506,13 @@ static int ether3_sendpacket(struct sk_buff *skb, struct net_device *dev) { - struct dev_priv *priv = netdev_priv(dev); unsigned long flags; unsigned int length = ETH_ZLEN < skb->len ? skb->len : ETH_ZLEN; unsigned int ptr, next_ptr; - if (priv->broken) { + if (priv(dev)->broken) { dev_kfree_skb(skb); - priv->stats.tx_dropped ++; + priv(dev)->stats.tx_dropped ++; netif_start_queue(dev); return 0; } @@ -537,18 +524,18 @@ goto out; } - next_ptr = (priv->tx_head + 1) & 15; + next_ptr = (priv(dev)->tx_head + 1) & 15; local_irq_save(flags); - if (priv->tx_tail == next_ptr) { + if (priv(dev)->tx_tail == next_ptr) { local_irq_restore(flags); return 1; /* unable to queue */ } dev->trans_start = jiffies; - ptr = 0x600 * priv->tx_head; - priv->tx_head = next_ptr; + ptr = 0x600 * priv(dev)->tx_head; + priv(dev)->tx_head = next_ptr; next_ptr *= 0x600; #define TXHDR_FLAGS (TXHDR_TRANSMIT|TXHDR_CHAINCONTINUE|TXHDR_DATAFOLLOWS|TXHDR_ENSUCCESS) @@ -563,19 +550,19 @@ ether3_setbuffer(dev, buffer_write, ptr); ether3_writeword(dev, htons((ptr + length + 4))); ether3_writeword(dev, TXHDR_FLAGS >> 16); - ether3_ledon(dev, priv); + ether3_ledon(dev); if (!(ether3_inw(REG_STATUS) & STAT_TXON)) { ether3_outw(ptr, REG_TRANSMITPTR); - ether3_outw(priv->regs.command | CMD_TXON, REG_COMMAND); + ether3_outw(priv(dev)->regs.command | CMD_TXON, REG_COMMAND); } - next_ptr = (priv->tx_head + 1) & 15; + next_ptr = (priv(dev)->tx_head + 1) & 15; local_irq_restore(flags); dev_kfree_skb(skb); - if (priv->tx_tail == next_ptr) + if (priv(dev)->tx_tail == next_ptr) netif_stop_queue(dev); out: @@ -586,7 +573,6 @@ ether3_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *)dev_id; - struct dev_priv *priv; unsigned int status, handled = IRQ_NONE; #if NET_DEBUG > 1 @@ -594,19 +580,17 @@ printk("eth3irq: %d ", irq); #endif - priv = netdev_priv(dev); - status = ether3_inw(REG_STATUS); if (status & STAT_INTRX) { - ether3_outw(CMD_ACKINTRX | priv->regs.command, REG_COMMAND); - ether3_rx(dev, priv, 12); + ether3_outw(CMD_ACKINTRX | priv(dev)->regs.command, REG_COMMAND); + ether3_rx(dev, 12); handled = IRQ_HANDLED; } if (status & STAT_INTTX) { - ether3_outw(CMD_ACKINTTX | priv->regs.command, REG_COMMAND); - ether3_tx(dev, priv); + ether3_outw(CMD_ACKINTTX | priv(dev)->regs.command, REG_COMMAND); + ether3_tx(dev); handled = IRQ_HANDLED; } @@ -620,11 +604,11 @@ /* * If we have a good packet(s), get it/them out of the buffers. */ -static int -ether3_rx(struct net_device *dev, struct dev_priv *priv, unsigned int maxcnt) +static int ether3_rx(struct net_device *dev, unsigned int maxcnt) { - unsigned int next_ptr = priv->rx_head, received = 0; - ether3_ledon(dev, priv); + unsigned int next_ptr = priv(dev)->rx_head, received = 0; + + ether3_ledon(dev); do { unsigned int this_ptr, status; @@ -653,12 +637,12 @@ if (next_ptr < RX_START || next_ptr >= RX_END) { int i; - printk("%s: bad next pointer @%04X: ", dev->name, priv->rx_head); + printk("%s: bad next pointer @%04X: ", dev->name, priv(dev)->rx_head); printk("%02X %02X %02X %02X ", next_ptr >> 8, next_ptr & 255, status & 255, status >> 8); for (i = 2; i < 14; i++) printk("%02X ", addrs[i]); printk("\n"); - next_ptr = priv->rx_head; + next_ptr = priv(dev)->rx_head; break; } /* @@ -695,7 +679,7 @@ } else goto dropping; } else { - struct net_device_stats *stats = &priv->stats; + struct net_device_stats *stats = &priv(dev)->stats; ether3_outw(next_ptr >> 8, REG_RECVEND); if (status & RXSTAT_OVERSIZE) stats->rx_over_errors ++; if (status & RXSTAT_CRCERROR) stats->rx_crc_errors ++; @@ -707,16 +691,16 @@ while (-- maxcnt); done: - priv->stats.rx_packets += received; - priv->rx_head = next_ptr; + priv(dev)->stats.rx_packets += received; + priv(dev)->rx_head = next_ptr; /* * If rx went off line, then that means that the buffer may be full. We * have dropped at least one packet. */ if (!(ether3_inw(REG_STATUS) & STAT_RXON)) { - priv->stats.rx_dropped ++; + priv(dev)->stats.rx_dropped ++; ether3_outw(next_ptr, REG_RECVPTR); - ether3_outw(priv->regs.command | CMD_RXON, REG_COMMAND); + ether3_outw(priv(dev)->regs.command | CMD_RXON, REG_COMMAND); } return maxcnt; @@ -732,7 +716,7 @@ last_warned = jiffies; printk("%s: memory squeeze, dropping packet.\n", dev->name); } - priv->stats.rx_dropped ++; + priv(dev)->stats.rx_dropped ++; goto done; } } @@ -740,10 +724,9 @@ /* * Update stats for the transmitted packet(s) */ -static void -ether3_tx(struct net_device *dev, struct dev_priv *priv) +static void ether3_tx(struct net_device *dev) { - unsigned int tx_tail = priv->tx_tail; + unsigned int tx_tail = priv(dev)->tx_tail; int max_work = 14; do { @@ -766,18 +749,20 @@ * Update errors */ if (!(status & (TXSTAT_BABBLED | TXSTAT_16COLLISIONS))) - priv->stats.tx_packets++; + priv(dev)->stats.tx_packets++; else { - priv->stats.tx_errors ++; - if (status & TXSTAT_16COLLISIONS) priv->stats.collisions += 16; - if (status & TXSTAT_BABBLED) priv->stats.tx_fifo_errors ++; + priv(dev)->stats.tx_errors ++; + if (status & TXSTAT_16COLLISIONS) + priv(dev)->stats.collisions += 16; + if (status & TXSTAT_BABBLED) + priv(dev)->stats.tx_fifo_errors ++; } tx_tail = (tx_tail + 1) & 15; } while (--max_work); - if (priv->tx_tail != tx_tail) { - priv->tx_tail = tx_tail; + if (priv(dev)->tx_tail != tx_tail) { + priv(dev)->tx_tail = tx_tail; netif_wake_queue(dev); } } @@ -790,66 +775,48 @@ printk(KERN_INFO "%s", version); } -static const char * __init -ether3_get_dev(struct net_device *dev, struct expansion_card *ec) -{ - const char *name = "ether3"; - - dev->base_addr = ecard_address(ec, ECARD_MEMC, 0); - dev->irq = ec->irq; - - if (ec->cid.manufacturer == MANU_ANT && - ec->cid.product == PROD_ANT_ETHERB) { - dev->base_addr += 0x200; - name = "etherb"; - } - - ec->irqaddr = (volatile unsigned char *)ioaddr(dev->base_addr); - ec->irqmask = 0xf0; - - ether3_addr(dev->dev_addr, ec); - - return name; -} - static int __devinit ether3_probe(struct expansion_card *ec, const struct ecard_id *id) { + const struct ether3_data *data = id->data; struct net_device *dev; - struct dev_priv *priv; - const char *name; int i, bus_type, ret; ether3_banner(); + ret = ecard_request_resources(ec); + if (ret) + goto out; + dev = alloc_etherdev(sizeof(struct dev_priv)); if (!dev) { ret = -ENOMEM; - goto out; + goto release; } SET_MODULE_OWNER(dev); + SET_NETDEV_DEV(dev, &ec->dev); - name = ether3_get_dev(dev, ec); - if (!name) { - ret = -ENODEV; + priv(dev)->base = ioremap(ecard_resource_start(ec, ECARD_RES_MEMC), + ecard_resource_len(ec, ECARD_RES_MEMC)); + if (!priv(dev)->base) { + ret = -ENOMEM; goto free; } - /* - * this will not fail - the nature of the bus ensures this - */ - if (!request_region(dev->base_addr, 128, dev->name)) { - ret = -EBUSY; - goto free; - } + ec->irqaddr = priv(dev)->base + data->base_offset; + ec->irqmask = 0xf0; - priv = netdev_priv(dev); - init_timer(&priv->timer); + priv(dev)->seeq = priv(dev)->base + data->base_offset; + dev->irq = ec->irq; + + ether3_addr(dev->dev_addr, ec); + + init_timer(&priv(dev)->timer); /* Reset card... */ - ether3_outb(0x80, REG_CONFIG2 + 1); + ether3_outb(0x80, REG_CONFIG2 + 4); bus_type = BUS_UNKNOWN; udelay(4); @@ -869,13 +836,13 @@ case BUS_UNKNOWN: printk(KERN_ERR "%s: unable to identify bus width\n", dev->name); ret = -ENODEV; - goto failed; + goto free; case BUS_8: printk(KERN_ERR "%s: %s found, but is an unsupported " - "8-bit card\n", dev->name, name); + "8-bit card\n", dev->name, data->name); ret = -ENODEV; - goto failed; + goto free; default: break; @@ -883,7 +850,7 @@ if (ether3_init_2(dev)) { ret = -ENODEV; - goto failed; + goto free; } dev->open = ether3_open; @@ -896,20 +863,22 @@ ret = register_netdev(dev); if (ret) - goto failed; + goto free; - printk("%s: %s in slot %d, ", dev->name, name, ec->slot_no); + printk("%s: %s in slot %d, ", dev->name, data->name, ec->slot_no); for (i = 0; i < 6; i++) printk("%2.2x%c", dev->dev_addr[i], i == 5 ? '\n' : ':'); ecard_set_drvdata(ec, dev); return 0; -failed: - release_region(dev->base_addr, 128); -free: + free: + if (priv(dev)->base) + iounmap(priv(dev)->base); free_netdev(dev); -out: + release: + ecard_release_resources(ec); + out: return ret; } @@ -920,14 +889,25 @@ ecard_set_drvdata(ec, NULL); unregister_netdev(dev); - release_region(dev->base_addr, 128); + iounmap(priv(dev)->base); free_netdev(dev); + ecard_release_resources(ec); } +static struct ether3_data ether3 = { + .name = "ether3", + .base_offset = 0, +}; + +static struct ether3_data etherb = { + .name = "etherb", + .base_offset = 0x800, +}; + static const struct ecard_id ether3_ids[] = { - { MANU_ANT2, PROD_ANT_ETHER3 }, - { MANU_ANT, PROD_ANT_ETHER3 }, - { MANU_ANT, PROD_ANT_ETHERB }, + { MANU_ANT2, PROD_ANT_ETHER3, ðer3 }, + { MANU_ANT, PROD_ANT_ETHER3, ðer3 }, + { MANU_ANT, PROD_ANT_ETHERB, ðerb }, { 0xffff, 0xffff } }; diff -Nru a/drivers/net/arm/ether3.h b/drivers/net/arm/ether3.h --- a/drivers/net/arm/ether3.h 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/arm/ether3.h 2005-03-07 14:54:18 -08:00 @@ -22,8 +22,10 @@ #define NET_DEBUG 0 #endif +#define priv(dev) ((struct dev_priv *)netdev_priv(dev)) + /* Command register definitions & bits */ -#define REG_COMMAND (dev->base_addr + 0x00) +#define REG_COMMAND (priv(dev)->seeq + 0x0000) #define CMD_ENINTDMA 0x0001 #define CMD_ENINTRX 0x0002 #define CMD_ENINTTX 0x0004 @@ -42,7 +44,7 @@ #define CMD_FIFOWRITE 0x8000 /* status register */ -#define REG_STATUS (dev->base_addr + 0x00) +#define REG_STATUS (priv(dev)->seeq + 0x0000) #define STAT_ENINTSTAT 0x0001 #define STAT_ENINTRX 0x0002 #define STAT_ENINTTX 0x0004 @@ -59,7 +61,7 @@ #define STAT_FIFODIR 0x8000 /* configuration register 1 */ -#define REG_CONFIG1 (dev->base_addr + 0x10) +#define REG_CONFIG1 (priv(dev)->seeq + 0x0040) #define CFG1_BUFSELSTAT0 0x0000 #define CFG1_BUFSELSTAT1 0x0001 #define CFG1_BUFSELSTAT2 0x0002 @@ -92,7 +94,7 @@ #define CFG1_RECVCOMPSTAT5 0x2000 /* configuration register 2 */ -#define REG_CONFIG2 (dev->base_addr + 0x20) +#define REG_CONFIG2 (priv(dev)->seeq + 0x0080) #define CFG2_BYTESWAP 0x0001 #define CFG2_ERRENCRC 0x0008 #define CFG2_ERRENDRIBBLE 0x0010 @@ -106,15 +108,15 @@ #define CFG2_CTRLO 0x1000 #define CFG2_RESET 0x8000 -#define REG_RECVEND (dev->base_addr + 0x30) +#define REG_RECVEND (priv(dev)->seeq + 0x00c0) -#define REG_BUFWIN (dev->base_addr + 0x40) +#define REG_BUFWIN (priv(dev)->seeq + 0x0100) -#define REG_RECVPTR (dev->base_addr + 0x50) +#define REG_RECVPTR (priv(dev)->seeq + 0x0140) -#define REG_TRANSMITPTR (dev->base_addr + 0x60) +#define REG_TRANSMITPTR (priv(dev)->seeq + 0x0180) -#define REG_DMAADDR (dev->base_addr + 0x70) +#define REG_DMAADDR (priv(dev)->seeq + 0x01c0) /* * Cards transmit/receive headers @@ -152,6 +154,8 @@ #define MAX_TX_BUFFERED 10 struct dev_priv { + void __iomem *base; + void __iomem *seeq; struct { unsigned int command; unsigned int config1; @@ -163,6 +167,11 @@ struct net_device_stats stats; struct timer_list timer; int broken; /* 0 = ok, 1 = something went wrong */ +}; + +struct ether3_data { + const char name[8]; + unsigned long base_offset; }; #endif diff -Nru a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c --- a/drivers/net/au1000_eth.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/net/au1000_eth.c 2005-03-07 14:54:17 -08:00 @@ -1,10 +1,19 @@ /* - * Alchemy Semi Au1000 ethernet driver * - * Copyright 2001 MontaVista Software Inc. + * Alchemy Au1x00 ethernet driver + * + * Copyright 2001,2002,2003 MontaVista Software Inc. + * Copyright 2002 TimeSys Corp. + * Added ethtool/mii-tool support, + * Copyright 2004 Matt Porter + * Update: 2004 Bjoern Riemer, riemer@fokus.fraunhofer.de + * or riemer@riemer-nt.de: fixed the link beat detection with + * ioctls (SIOCGMIIPHY) * Author: MontaVista Software, Inc. * ppopov@mvista.com or source@mvista.com * + * ######################################################################## + * * This program is free software; you can distribute it and/or modify it * under the terms of the GNU General Public License (Version 2) as * published by the Free Software Foundation. @@ -17,46 +26,59 @@ * 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., * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. + * + * ######################################################################## + * + * */ -#include #include #include +#include #include #include #include #include #include +#include #include #include #include #include #include #include +#include +#include #include #include -#include -#include - #include #include #include -#include +#include +#include +#include #include "au1000_eth.h" #ifdef AU1000_ETH_DEBUG -static int au1000_debug = 10; +static int au1000_debug = 5; #else static int au1000_debug = 3; #endif +#define DRV_NAME "au1000eth" +#define DRV_VERSION "1.5" +#define DRV_AUTHOR "Pete Popov " +#define DRV_DESC "Au1xxx on-chip Ethernet driver" + +MODULE_AUTHOR(DRV_AUTHOR); +MODULE_DESCRIPTION(DRV_DESC); +MODULE_LICENSE("GPL"); + // prototypes -static void *dma_alloc(size_t, dma_addr_t *); -static void dma_free(void *, size_t); static void hard_stop(struct net_device *); static void enable_rx_tx(struct net_device *dev); -static int __init au1000_probe1(long, int, int); +static struct net_device * au1000_probe(u32 ioaddr, int irq, int port_num); static int au1000_init(struct net_device *); static int au1000_open(struct net_device *); static int au1000_close(struct net_device *); @@ -78,8 +100,7 @@ // externs extern void ack_rise_edge_irq(unsigned int); extern int get_ethernet_addr(char *ethernet_addr); -extern inline void str2eaddr(unsigned char *ea, unsigned char *str); -extern inline unsigned char str2hexnum(unsigned char c); +extern void str2eaddr(unsigned char *ea, unsigned char *str); extern char * __init prom_getcmdline(void); /* @@ -97,29 +118,6 @@ * complete immediately. */ - -/* - * Base address and interrupt of the Au1xxx ethernet macs - */ -static struct { - unsigned int port; - int irq; -} au1000_iflist[NUM_INTERFACES] = { - {AU1000_ETH0_BASE, AU1000_ETH0_IRQ}, - {AU1000_ETH1_BASE, AU1000_ETH1_IRQ} - }, - au1500_iflist[NUM_INTERFACES] = { - {AU1500_ETH0_BASE, AU1000_ETH0_IRQ}, - {AU1500_ETH1_BASE, AU1000_ETH1_IRQ} - }, - au1100_iflist[NUM_INTERFACES] = { - {AU1000_ETH0_BASE, AU1000_ETH0_IRQ}, - {0, 0} - }; - -static char version[] __devinitdata = - "au1000eth.c:1.0 ppopov@mvista.com\n"; - /* These addresses are only used if yamon doesn't tell us what * the mac address is, and the mac address is not passed on the * command line. @@ -135,18 +133,36 @@ #define cpu_to_dma32 cpu_to_be32 #define dma32_to_cpu be32_to_cpu +struct au1000_private *au_macs[NUM_ETH_INTERFACES]; /* FIXME * All of the PHY code really should be detached from the MAC * code. */ +/* Default advertise */ +#define GENMII_DEFAULT_ADVERTISE \ + ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full | \ + ADVERTISED_100baseT_Half | ADVERTISED_100baseT_Full | \ + ADVERTISED_Autoneg + +#define GENMII_DEFAULT_FEATURES \ + SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full | \ + SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full | \ + SUPPORTED_Autoneg + +static char *phy_link[] = +{ "unknown", + "10Base2", "10BaseT", + "AUI", + "100BaseT", "100BaseTX", "100BaseFX" +}; + int bcm_5201_init(struct net_device *dev, int phy_addr) { s16 data; /* Stop auto-negotiation */ - //printk("bcm_5201_init\n"); data = mdio_read(dev, phy_addr, MII_CONTROL); mdio_write(dev, phy_addr, MII_CONTROL, data & ~MII_CNTL_AUTO); @@ -161,17 +177,8 @@ data |= MII_CNTL_RST_AUTO | MII_CNTL_AUTO; mdio_write(dev, phy_addr, MII_CONTROL, data); - /* Enable TX LED instead of FDX */ - data = mdio_read(dev, phy_addr, MII_INT); - data &= ~MII_FDX_LED; - mdio_write(dev, phy_addr, MII_INT, data); - - /* Enable TX LED instead of FDX */ - data = mdio_read(dev, phy_addr, MII_INT); - data &= ~MII_FDX_LED; - mdio_write(dev, phy_addr, MII_INT, data); - - if (au1000_debug > 4) dump_mii(dev, phy_addr); + if (au1000_debug > 4) + dump_mii(dev, phy_addr); return 0; } @@ -179,7 +186,6 @@ { s16 mii_control, timeout; - //printk("bcm_5201_reset\n"); mii_control = mdio_read(dev, phy_addr, MII_CONTROL); mdio_write(dev, phy_addr, MII_CONTROL, mii_control | MII_CNTL_RESET); mdelay(1); @@ -242,12 +248,16 @@ printk("lsi_80227_init\n"); /* restart auto-negotiation */ - mdio_write(dev, phy_addr, 0, 0x3200); - + mdio_write(dev, phy_addr, MII_CONTROL, + MII_CNTL_F100 | MII_CNTL_AUTO | MII_CNTL_RST_AUTO); // | MII_CNTL_FDX); mdelay(1); /* set up LEDs to correct display */ +#ifdef CONFIG_MIPS_MTX1 + mdio_write(dev, phy_addr, 17, 0xff80); +#else mdio_write(dev, phy_addr, 17, 0xffc0); +#endif if (au1000_debug > 4) dump_mii(dev, phy_addr); @@ -294,9 +304,9 @@ mii_data = mdio_read(dev, aup->phy_addr, MII_STATUS); if (mii_data & MII_STAT_LINK) { *link = 1; - mii_data = mdio_read(dev, aup->phy_addr, MII_LSI_STAT); - if (mii_data & MII_LSI_STAT_SPD) { - if (mii_data & MII_LSI_STAT_FDX) { + mii_data = mdio_read(dev, aup->phy_addr, MII_LSI_PHY_STAT); + if (mii_data & MII_LSI_PHY_STAT_SPD) { + if (mii_data & MII_LSI_PHY_STAT_FDX) { *speed = IF_PORT_100BASEFX; dev->if_port = IF_PORT_100BASEFX; } @@ -337,12 +347,396 @@ return 0; } +int am79c874_init(struct net_device *dev, int phy_addr) +{ + s16 data; + + /* 79c874 has quit resembled bit assignments to BCM5201 */ + if (au1000_debug > 4) + printk("am79c847_init\n"); + + /* Stop auto-negotiation */ + data = mdio_read(dev, phy_addr, MII_CONTROL); + mdio_write(dev, phy_addr, MII_CONTROL, data & ~MII_CNTL_AUTO); + + /* Set advertisement to 10/100 and Half/Full duplex + * (full capabilities) */ + data = mdio_read(dev, phy_addr, MII_ANADV); + data |= MII_NWAY_TX | MII_NWAY_TX_FDX | MII_NWAY_T_FDX | MII_NWAY_T; + mdio_write(dev, phy_addr, MII_ANADV, data); + + /* Restart auto-negotiation */ + data = mdio_read(dev, phy_addr, MII_CONTROL); + data |= MII_CNTL_RST_AUTO | MII_CNTL_AUTO; + + mdio_write(dev, phy_addr, MII_CONTROL, data); + + if (au1000_debug > 4) dump_mii(dev, phy_addr); + return 0; +} + +int am79c874_reset(struct net_device *dev, int phy_addr) +{ + s16 mii_control, timeout; + + if (au1000_debug > 4) + printk("am79c874_reset\n"); + + mii_control = mdio_read(dev, phy_addr, MII_CONTROL); + mdio_write(dev, phy_addr, MII_CONTROL, mii_control | MII_CNTL_RESET); + mdelay(1); + for (timeout = 100; timeout > 0; --timeout) { + mii_control = mdio_read(dev, phy_addr, MII_CONTROL); + if ((mii_control & MII_CNTL_RESET) == 0) + break; + mdelay(1); + } + if (mii_control & MII_CNTL_RESET) { + printk(KERN_ERR "%s PHY reset timeout !\n", dev->name); + return -1; + } + return 0; +} + +int +am79c874_status(struct net_device *dev, int phy_addr, u16 *link, u16 *speed) +{ + u16 mii_data; + struct au1000_private *aup; + + // printk("am79c874_status\n"); + if (!dev) { + printk(KERN_ERR "am79c874_status error: NULL dev\n"); + return -1; + } + + aup = (struct au1000_private *) dev->priv; + mii_data = mdio_read(dev, aup->phy_addr, MII_STATUS); + + if (mii_data & MII_STAT_LINK) { + *link = 1; + mii_data = mdio_read(dev, aup->phy_addr, MII_AMD_PHY_STAT); + if (mii_data & MII_AMD_PHY_STAT_SPD) { + if (mii_data & MII_AMD_PHY_STAT_FDX) { + *speed = IF_PORT_100BASEFX; + dev->if_port = IF_PORT_100BASEFX; + } + else { + *speed = IF_PORT_100BASETX; + dev->if_port = IF_PORT_100BASETX; + } + } + else { + *speed = IF_PORT_10BASET; + dev->if_port = IF_PORT_10BASET; + } + + } + else { + *link = 0; + *speed = 0; + dev->if_port = IF_PORT_UNKNOWN; + } + return 0; +} + +int lxt971a_init(struct net_device *dev, int phy_addr) +{ + if (au1000_debug > 4) + printk("lxt971a_init\n"); + + /* restart auto-negotiation */ + mdio_write(dev, phy_addr, MII_CONTROL, + MII_CNTL_F100 | MII_CNTL_AUTO | MII_CNTL_RST_AUTO | MII_CNTL_FDX); + + /* set up LEDs to correct display */ + mdio_write(dev, phy_addr, 20, 0x0422); + + if (au1000_debug > 4) + dump_mii(dev, phy_addr); + return 0; +} + +int lxt971a_reset(struct net_device *dev, int phy_addr) +{ + s16 mii_control, timeout; + + if (au1000_debug > 4) { + printk("lxt971a_reset\n"); + dump_mii(dev, phy_addr); + } + + mii_control = mdio_read(dev, phy_addr, MII_CONTROL); + mdio_write(dev, phy_addr, MII_CONTROL, mii_control | MII_CNTL_RESET); + mdelay(1); + for (timeout = 100; timeout > 0; --timeout) { + mii_control = mdio_read(dev, phy_addr, MII_CONTROL); + if ((mii_control & MII_CNTL_RESET) == 0) + break; + mdelay(1); + } + if (mii_control & MII_CNTL_RESET) { + printk(KERN_ERR "%s PHY reset timeout !\n", dev->name); + return -1; + } + return 0; +} + +int +lxt971a_status(struct net_device *dev, int phy_addr, u16 *link, u16 *speed) +{ + u16 mii_data; + struct au1000_private *aup; + + if (!dev) { + printk(KERN_ERR "lxt971a_status error: NULL dev\n"); + return -1; + } + aup = (struct au1000_private *) dev->priv; + + mii_data = mdio_read(dev, aup->phy_addr, MII_STATUS); + if (mii_data & MII_STAT_LINK) { + *link = 1; + mii_data = mdio_read(dev, aup->phy_addr, MII_INTEL_PHY_STAT); + if (mii_data & MII_INTEL_PHY_STAT_SPD) { + if (mii_data & MII_INTEL_PHY_STAT_FDX) { + *speed = IF_PORT_100BASEFX; + dev->if_port = IF_PORT_100BASEFX; + } + else { + *speed = IF_PORT_100BASETX; + dev->if_port = IF_PORT_100BASETX; + } + } + else { + *speed = IF_PORT_10BASET; + dev->if_port = IF_PORT_10BASET; + } + + } + else { + *link = 0; + *speed = 0; + dev->if_port = IF_PORT_UNKNOWN; + } + return 0; +} + +int ks8995m_init(struct net_device *dev, int phy_addr) +{ + s16 data; + +// printk("ks8995m_init\n"); + /* Stop auto-negotiation */ + data = mdio_read(dev, phy_addr, MII_CONTROL); + mdio_write(dev, phy_addr, MII_CONTROL, data & ~MII_CNTL_AUTO); + + /* Set advertisement to 10/100 and Half/Full duplex + * (full capabilities) */ + data = mdio_read(dev, phy_addr, MII_ANADV); + data |= MII_NWAY_TX | MII_NWAY_TX_FDX | MII_NWAY_T_FDX | MII_NWAY_T; + mdio_write(dev, phy_addr, MII_ANADV, data); + + /* Restart auto-negotiation */ + data = mdio_read(dev, phy_addr, MII_CONTROL); + data |= MII_CNTL_RST_AUTO | MII_CNTL_AUTO; + mdio_write(dev, phy_addr, MII_CONTROL, data); + + if (au1000_debug > 4) dump_mii(dev, phy_addr); + + return 0; +} + +int ks8995m_reset(struct net_device *dev, int phy_addr) +{ + s16 mii_control, timeout; + +// printk("ks8995m_reset\n"); + mii_control = mdio_read(dev, phy_addr, MII_CONTROL); + mdio_write(dev, phy_addr, MII_CONTROL, mii_control | MII_CNTL_RESET); + mdelay(1); + for (timeout = 100; timeout > 0; --timeout) { + mii_control = mdio_read(dev, phy_addr, MII_CONTROL); + if ((mii_control & MII_CNTL_RESET) == 0) + break; + mdelay(1); + } + if (mii_control & MII_CNTL_RESET) { + printk(KERN_ERR "%s PHY reset timeout !\n", dev->name); + return -1; + } + return 0; +} + +int ks8995m_status(struct net_device *dev, int phy_addr, u16 *link, u16 *speed) +{ + u16 mii_data; + struct au1000_private *aup; + + if (!dev) { + printk(KERN_ERR "ks8995m_status error: NULL dev\n"); + return -1; + } + aup = (struct au1000_private *) dev->priv; + + mii_data = mdio_read(dev, aup->phy_addr, MII_STATUS); + if (mii_data & MII_STAT_LINK) { + *link = 1; + mii_data = mdio_read(dev, aup->phy_addr, MII_AUX_CNTRL); + if (mii_data & MII_AUX_100) { + if (mii_data & MII_AUX_FDX) { + *speed = IF_PORT_100BASEFX; + dev->if_port = IF_PORT_100BASEFX; + } + else { + *speed = IF_PORT_100BASETX; + dev->if_port = IF_PORT_100BASETX; + } + } + else { + *speed = IF_PORT_10BASET; + dev->if_port = IF_PORT_10BASET; + } + + } + else { + *link = 0; + *speed = 0; + dev->if_port = IF_PORT_UNKNOWN; + } + return 0; +} + +int +smsc_83C185_init (struct net_device *dev, int phy_addr) +{ + s16 data; + + if (au1000_debug > 4) + printk("smsc_83C185_init\n"); + + /* Stop auto-negotiation */ + data = mdio_read(dev, phy_addr, MII_CONTROL); + mdio_write(dev, phy_addr, MII_CONTROL, data & ~MII_CNTL_AUTO); + + /* Set advertisement to 10/100 and Half/Full duplex + * (full capabilities) */ + data = mdio_read(dev, phy_addr, MII_ANADV); + data |= MII_NWAY_TX | MII_NWAY_TX_FDX | MII_NWAY_T_FDX | MII_NWAY_T; + mdio_write(dev, phy_addr, MII_ANADV, data); + + /* Restart auto-negotiation */ + data = mdio_read(dev, phy_addr, MII_CONTROL); + data |= MII_CNTL_RST_AUTO | MII_CNTL_AUTO; + + mdio_write(dev, phy_addr, MII_CONTROL, data); + + if (au1000_debug > 4) dump_mii(dev, phy_addr); + return 0; +} + +int +smsc_83C185_reset (struct net_device *dev, int phy_addr) +{ + s16 mii_control, timeout; + + if (au1000_debug > 4) + printk("smsc_83C185_reset\n"); + + mii_control = mdio_read(dev, phy_addr, MII_CONTROL); + mdio_write(dev, phy_addr, MII_CONTROL, mii_control | MII_CNTL_RESET); + mdelay(1); + for (timeout = 100; timeout > 0; --timeout) { + mii_control = mdio_read(dev, phy_addr, MII_CONTROL); + if ((mii_control & MII_CNTL_RESET) == 0) + break; + mdelay(1); + } + if (mii_control & MII_CNTL_RESET) { + printk(KERN_ERR "%s PHY reset timeout !\n", dev->name); + return -1; + } + return 0; +} + +int +smsc_83C185_status (struct net_device *dev, int phy_addr, u16 *link, u16 *speed) +{ + u16 mii_data; + struct au1000_private *aup; + + if (!dev) { + printk(KERN_ERR "smsc_83C185_status error: NULL dev\n"); + return -1; + } + + aup = (struct au1000_private *) dev->priv; + mii_data = mdio_read(dev, aup->phy_addr, MII_STATUS); + + if (mii_data & MII_STAT_LINK) { + *link = 1; + mii_data = mdio_read(dev, aup->phy_addr, 0x1f); + if (mii_data & (1<<3)) { + if (mii_data & (1<<4)) { + *speed = IF_PORT_100BASEFX; + dev->if_port = IF_PORT_100BASEFX; + } + else { + *speed = IF_PORT_100BASETX; + dev->if_port = IF_PORT_100BASETX; + } + } + else { + *speed = IF_PORT_10BASET; + dev->if_port = IF_PORT_10BASET; + } + } + else { + *link = 0; + *speed = 0; + dev->if_port = IF_PORT_UNKNOWN; + } + return 0; +} + + +#ifdef CONFIG_MIPS_BOSPORUS +int stub_init(struct net_device *dev, int phy_addr) +{ + //printk("PHY stub_init\n"); + return 0; +} + +int stub_reset(struct net_device *dev, int phy_addr) +{ + //printk("PHY stub_reset\n"); + return 0; +} + +int +stub_status(struct net_device *dev, int phy_addr, u16 *link, u16 *speed) +{ + //printk("PHY stub_status\n"); + *link = 1; + /* hmmm, revisit */ + *speed = IF_PORT_100BASEFX; + dev->if_port = IF_PORT_100BASEFX; + return 0; +} +#endif + struct phy_ops bcm_5201_ops = { bcm_5201_init, bcm_5201_reset, bcm_5201_status, }; +struct phy_ops am79c874_ops = { + am79c874_init, + am79c874_reset, + am79c874_status, +}; + struct phy_ops am79c901_ops = { am79c901_init, am79c901_reset, @@ -355,26 +749,89 @@ lsi_80227_status, }; +struct phy_ops lxt971a_ops = { + lxt971a_init, + lxt971a_reset, + lxt971a_status, +}; + +struct phy_ops ks8995m_ops = { + ks8995m_init, + ks8995m_reset, + ks8995m_status, +}; + +struct phy_ops smsc_83C185_ops = { + smsc_83C185_init, + smsc_83C185_reset, + smsc_83C185_status, +}; + +#ifdef CONFIG_MIPS_BOSPORUS +struct phy_ops stub_ops = { + stub_init, + stub_reset, + stub_status, +}; +#endif + static struct mii_chip_info { const char * name; u16 phy_id0; u16 phy_id1; struct phy_ops *phy_ops; + int dual_phy; } mii_chip_table[] = { - {"Broadcom BCM5201 10/100 BaseT PHY", 0x0040, 0x6212, &bcm_5201_ops }, - {"AMD 79C901 HomePNA PHY", 0x0000, 0x35c8, &am79c901_ops }, - {"LSI 80227 10/100 BaseT PHY", 0x0016, 0xf840, &lsi_80227_ops }, - {"Broadcom BCM5221 10/100 BaseT PHY", 0x0040, 0x61e4, &bcm_5201_ops }, + {"Broadcom BCM5201 10/100 BaseT PHY",0x0040,0x6212, &bcm_5201_ops,0}, + {"Broadcom BCM5221 10/100 BaseT PHY",0x0040,0x61e4, &bcm_5201_ops,0}, + {"Broadcom BCM5222 10/100 BaseT PHY",0x0040,0x6322, &bcm_5201_ops,1}, + {"AMD 79C901 HomePNA PHY",0x0000,0x35c8, &am79c901_ops,0}, + {"AMD 79C874 10/100 BaseT PHY",0x0022,0x561b, &am79c874_ops,0}, + {"LSI 80227 10/100 BaseT PHY",0x0016,0xf840, &lsi_80227_ops,0}, + {"Intel LXT971A Dual Speed PHY",0x0013,0x78e2, &lxt971a_ops,0}, + {"Kendin KS8995M 10/100 BaseT PHY",0x0022,0x1450, &ks8995m_ops,0}, + {"SMSC LAN83C185 10/100 BaseT PHY",0x0007,0xc0a3, &smsc_83C185_ops,0}, +#ifdef CONFIG_MIPS_BOSPORUS + {"Stub", 0x1234, 0x5678, &stub_ops }, +#endif {0,}, }; static int mdio_read(struct net_device *dev, int phy_id, int reg) { struct au1000_private *aup = (struct au1000_private *) dev->priv; + volatile u32 *mii_control_reg; + volatile u32 *mii_data_reg; u32 timedout = 20; u32 mii_control; - while (aup->mac->mii_control & MAC_MII_BUSY) { + #ifdef CONFIG_BCM5222_DUAL_PHY + /* First time we probe, it's for the mac0 phy. + * Since we haven't determined yet that we have a dual phy, + * aup->mii->mii_control_reg won't be setup and we'll + * default to the else statement. + * By the time we probe for the mac1 phy, the mii_control_reg + * will be setup to be the address of the mac0 phy control since + * both phys are controlled through mac0. + */ + if (aup->mii && aup->mii->mii_control_reg) { + mii_control_reg = aup->mii->mii_control_reg; + mii_data_reg = aup->mii->mii_data_reg; + } + else if (au_macs[0]->mii && au_macs[0]->mii->mii_control_reg) { + /* assume both phys are controlled through mac0 */ + mii_control_reg = au_macs[0]->mii->mii_control_reg; + mii_data_reg = au_macs[0]->mii->mii_data_reg; + } + else + #endif + { + /* default control and data reg addresses */ + mii_control_reg = &aup->mac->mii_control; + mii_data_reg = &aup->mac->mii_data; + } + + while (*mii_control_reg & MAC_MII_BUSY) { mdelay(1); if (--timedout == 0) { printk(KERN_ERR "%s: read_MII busy timeout!!\n", @@ -386,10 +843,10 @@ mii_control = MAC_SET_MII_SELECT_REG(reg) | MAC_SET_MII_SELECT_PHY(phy_id) | MAC_MII_READ; - aup->mac->mii_control = mii_control; + *mii_control_reg = mii_control; timedout = 20; - while (aup->mac->mii_control & MAC_MII_BUSY) { + while (*mii_control_reg & MAC_MII_BUSY) { mdelay(1); if (--timedout == 0) { printk(KERN_ERR "%s: mdio_read busy timeout!!\n", @@ -397,16 +854,36 @@ return -1; } } - return (int)aup->mac->mii_data; + return (int)*mii_data_reg; } static void mdio_write(struct net_device *dev, int phy_id, int reg, u16 value) { struct au1000_private *aup = (struct au1000_private *) dev->priv; + volatile u32 *mii_control_reg; + volatile u32 *mii_data_reg; u32 timedout = 20; u32 mii_control; - while (aup->mac->mii_control & MAC_MII_BUSY) { + #ifdef CONFIG_BCM5222_DUAL_PHY + if (aup->mii && aup->mii->mii_control_reg) { + mii_control_reg = aup->mii->mii_control_reg; + mii_data_reg = aup->mii->mii_data_reg; + } + else if (au_macs[0]->mii && au_macs[0]->mii->mii_control_reg) { + /* assume both phys are controlled through mac0 */ + mii_control_reg = au_macs[0]->mii->mii_control_reg; + mii_data_reg = au_macs[0]->mii->mii_data_reg; + } + else + #endif + { + /* default control and data reg addresses */ + mii_control_reg = &aup->mac->mii_control; + mii_data_reg = &aup->mac->mii_data; + } + + while (*mii_control_reg & MAC_MII_BUSY) { mdelay(1); if (--timedout == 0) { printk(KERN_ERR "%s: mdio_write busy timeout!!\n", @@ -418,8 +895,8 @@ mii_control = MAC_SET_MII_SELECT_REG(reg) | MAC_SET_MII_SELECT_PHY(phy_id) | MAC_MII_WRITE; - aup->mac->mii_data = value; - aup->mac->mii_control = mii_control; + *mii_data_reg = value; + *mii_control_reg = mii_control; } @@ -437,12 +914,13 @@ } } -static int __init mii_probe (struct net_device * dev) +static int mii_probe (struct net_device * dev) { struct au1000_private *aup = (struct au1000_private *) dev->priv; int phy_addr; - - aup->mii = NULL; +#ifdef CONFIG_MIPS_BOSPORUS + int phy_found=0; +#endif /* search for total of 32 possible mii phy addresses */ for (phy_addr = 0; phy_addr < 32; phy_addr++) { @@ -450,9 +928,17 @@ u16 phy_id0, phy_id1; int i; + #ifdef CONFIG_BCM5222_DUAL_PHY + /* Mask the already found phy, try next one */ + if (au_macs[0]->mii && au_macs[0]->mii->mii_control_reg) { + if (au_macs[0]->phy_addr == phy_addr) + continue; + } + #endif + mii_status = mdio_read(dev, phy_addr, MII_STATUS); if (mii_status == 0xffff || mii_status == 0x0000) - /* the mii is not accessible, try next one */ + /* the mii is not accessable, try next one */ continue; phy_id0 = mdio_read(dev, phy_addr, MII_PHY_ID0); @@ -462,6 +948,66 @@ for (i = 0; mii_chip_table[i].phy_id1; i++) { if (phy_id0 == mii_chip_table[i].phy_id0 && phy_id1 == mii_chip_table[i].phy_id1) { + struct mii_phy * mii_phy = aup->mii; + + printk(KERN_INFO "%s: %s at phy address %d\n", + dev->name, mii_chip_table[i].name, + phy_addr); +#ifdef CONFIG_MIPS_BOSPORUS + phy_found = 1; +#endif + mii_phy->chip_info = mii_chip_table+i; + aup->phy_addr = phy_addr; + aup->want_autoneg = 1; + aup->phy_ops = mii_chip_table[i].phy_ops; + aup->phy_ops->phy_init(dev,phy_addr); + + // Check for dual-phy and then store required + // values and set indicators. We need to do + // this now since mdio_{read,write} need the + // control and data register addresses. + #ifdef CONFIG_BCM5222_DUAL_PHY + if ( mii_chip_table[i].dual_phy) { + + /* assume both phys are controlled + * through MAC0. Board specific? */ + + /* sanity check */ + if (!au_macs[0] || !au_macs[0]->mii) + return -1; + aup->mii->mii_control_reg = (u32 *) + &au_macs[0]->mac->mii_control; + aup->mii->mii_data_reg = (u32 *) + &au_macs[0]->mac->mii_data; + } + #endif + goto found; + } + } + } +found: + +#ifdef CONFIG_MIPS_BOSPORUS + /* This is a workaround for the Micrel/Kendin 5 port switch + The second MAC doesn't see a PHY connected... so we need to + trick it into thinking we have one. + + If this kernel is run on another Au1500 development board + the stub will be found as well as the actual PHY. However, + the last found PHY will be used... usually at Addr 31 (Db1500). + */ + if ( (!phy_found) ) + { + u16 phy_id0, phy_id1; + int i; + + phy_id0 = 0x1234; + phy_id1 = 0x5678; + + /* search our mii table for the current mii */ + for (i = 0; mii_chip_table[i].phy_id1; i++) { + if (phy_id0 == mii_chip_table[i].phy_id0 && + phy_id1 == mii_chip_table[i].phy_id1) { struct mii_phy * mii_phy; printk(KERN_INFO "%s: %s at phy address %d\n", @@ -471,31 +1017,39 @@ GFP_KERNEL); if (mii_phy) { mii_phy->chip_info = mii_chip_table+i; - mii_phy->phy_addr = phy_addr; + aup->phy_addr = phy_addr; mii_phy->next = aup->mii; aup->phy_ops = mii_chip_table[i].phy_ops; aup->mii = mii_phy; aup->phy_ops->phy_init(dev,phy_addr); } else { - printk(KERN_ERR "%s: out of memory\n", + printk(KERN_ERR "%s: out of memory\n", dev->name); return -1; } - /* the current mii is on our mii_info_table, - try next address */ + mii_phy->chip_info = mii_chip_table+i; + aup->phy_addr = phy_addr; + aup->phy_ops = mii_chip_table[i].phy_ops; + aup->phy_ops->phy_init(dev,phy_addr); break; } } } + if (aup->mac_id == 0) { + /* the Bosporus phy responds to addresses 0-5 but + * 5 is the correct one. + */ + aup->phy_addr = 5; + } +#endif - if (aup->mii == NULL) { - printk(KERN_ERR "%s: No MII transceivers found!\n", dev->name); + if (aup->mii->chip_info == NULL) { + printk(KERN_ERR "%s: Au1x No MII transceivers found!\n", + dev->name); return -1; } - /* use last PHY */ - aup->phy_addr = aup->mii->phy_addr; printk(KERN_INFO "%s: Using %s as default\n", dev->name, aup->mii->chip_info->name); @@ -516,7 +1070,6 @@ if (pDB) { aup->pDBfree = pDB->pnext; } - //printk("GetFreeDB: %x\n", pDB); return pDB; } @@ -528,35 +1081,6 @@ aup->pDBfree = pDB; } - -/* - DMA memory allocation, derived from pci_alloc_consistent. - However, the Au1000 data cache is coherent (when programmed - so), therefore we return KSEG0 address, not KSEG1. -*/ -static void *dma_alloc(size_t size, dma_addr_t * dma_handle) -{ - void *ret; - int gfp = GFP_ATOMIC | GFP_DMA; - - ret = (void *) __get_free_pages(gfp, get_order(size)); - - if (ret != NULL) { - memset(ret, 0, size); - *dma_handle = virt_to_bus(ret); - ret = (void *)KSEG0ADDR(ret); - } - return ret; -} - - -static void dma_free(void *vaddr, size_t size) -{ - vaddr = (void *)KSEG0ADDR(vaddr); - free_pages((unsigned long) vaddr, get_order(size)); -} - - static void enable_rx_tx(struct net_device *dev) { struct au1000_private *aup = (struct au1000_private *) dev->priv; @@ -582,6 +1106,7 @@ static void reset_mac(struct net_device *dev) { + int i; u32 flags; struct au1000_private *aup = (struct au1000_private *) dev->priv; @@ -590,13 +1115,32 @@ dev->name, (unsigned)aup); spin_lock_irqsave(&aup->lock, flags); - del_timer(&aup->timer); + if (aup->timer.function == &au1000_timer) {/* check if timer initted */ + del_timer(&aup->timer); + } + hard_stop(dev); - *aup->enable = MAC_EN_CLOCK_ENABLE; - au_sync_delay(2); - *aup->enable = 0; - au_sync_delay(2); + #ifdef CONFIG_BCM5222_DUAL_PHY + if (aup->mac_id != 0) { + #endif + /* If BCM5222, we can't leave MAC0 in reset because then + * we can't access the dual phy for ETH1 */ + *aup->enable = MAC_EN_CLOCK_ENABLE; + au_sync_delay(2); + *aup->enable = 0; + au_sync_delay(2); + #ifdef CONFIG_BCM5222_DUAL_PHY + } + #endif aup->tx_full = 0; + for (i = 0; i < NUM_RX_DMA; i++) { + /* reset control bits */ + aup->rx_dma_ring[i]->buff_stat &= ~0xf; + } + for (i = 0; i < NUM_TX_DMA; i++) { + /* reset control bits */ + aup->tx_dma_ring[i]->buff_stat &= ~0xf; + } spin_unlock_irqrestore(&aup->lock, flags); } @@ -611,93 +1155,348 @@ { int i; - for (i=0; irx_dma_ring[i] = (volatile rx_dma_t *) (rx_base + sizeof(rx_dma_t)*i); } - for (i=0; itx_dma_ring[i] = (volatile tx_dma_t *) (tx_base + sizeof(tx_dma_t)*i); } } +static struct { + int port; + u32 base_addr; + u32 macen_addr; + int irq; + struct net_device *dev; +} iflist[2]; + +static int num_ifs; + +/* + * Setup the base address and interupt of the Au1xxx ethernet macs + * based on cpu type and whether the interface is enabled in sys_pinfunc + * register. The last interface is enabled if SYS_PF_NI2 (bit 4) is 0. + */ static int __init au1000_init_module(void) { - int i; - int prid; - int base_addr, irq; + struct cpuinfo_mips *c = ¤t_cpu_data; + int ni = (int)((au_readl(SYS_PINFUNC) & (u32)(SYS_PF_NI2)) >> 4); + struct net_device *dev; + int i, found_one = 0; - prid = read_c0_prid(); - for (i=0; icputype) { +#ifdef CONFIG_SOC_AU1000 + case CPU_AU1000: + num_ifs = 2 - ni; + iflist[0].base_addr = AU1000_ETH0_BASE; + iflist[1].base_addr = AU1000_ETH1_BASE; + iflist[0].macen_addr = AU1000_MAC0_ENABLE; + iflist[1].macen_addr = AU1000_MAC1_ENABLE; + iflist[0].irq = AU1000_MAC0_DMA_INT; + iflist[1].irq = AU1000_MAC1_DMA_INT; + break; +#endif +#ifdef CONFIG_SOC_AU1100 + case CPU_AU1100: + num_ifs = 1 - ni; + iflist[0].base_addr = AU1100_ETH0_BASE; + iflist[0].macen_addr = AU1100_MAC0_ENABLE; + iflist[0].irq = AU1100_MAC0_DMA_INT; + break; +#endif +#ifdef CONFIG_SOC_AU1500 + case CPU_AU1500: + num_ifs = 2 - ni; + iflist[0].base_addr = AU1500_ETH0_BASE; + iflist[1].base_addr = AU1500_ETH1_BASE; + iflist[0].macen_addr = AU1500_MAC0_ENABLE; + iflist[1].macen_addr = AU1500_MAC1_ENABLE; + iflist[0].irq = AU1500_MAC0_DMA_INT; + iflist[1].irq = AU1500_MAC1_DMA_INT; + break; +#endif +#ifdef CONFIG_SOC_AU1550 + case CPU_AU1550: + num_ifs = 2 - ni; + iflist[0].base_addr = AU1550_ETH0_BASE; + iflist[1].base_addr = AU1550_ETH1_BASE; + iflist[0].macen_addr = AU1550_MAC0_ENABLE; + iflist[1].macen_addr = AU1550_MAC1_ENABLE; + iflist[0].irq = AU1550_MAC0_DMA_INT; + iflist[1].irq = AU1550_MAC1_DMA_INT; + break; +#endif + default: + num_ifs = 0; + } + for(i = 0; i < num_ifs; i++) { + dev = au1000_probe(iflist[i].base_addr, iflist[i].irq, i); + iflist[i].dev = dev; + if (dev) + found_one++; + } + if (!found_one) + return -ENODEV; + return 0; +} + +static int au1000_setup_aneg(struct net_device *dev, u32 advertise) +{ + struct au1000_private *aup = (struct au1000_private *)dev->priv; + u16 ctl, adv; + + /* Setup standard advertise */ + adv = mdio_read(dev, aup->phy_addr, MII_ADVERTISE); + adv &= ~(ADVERTISE_ALL | ADVERTISE_100BASE4); + if (advertise & ADVERTISED_10baseT_Half) + adv |= ADVERTISE_10HALF; + if (advertise & ADVERTISED_10baseT_Full) + adv |= ADVERTISE_10FULL; + if (advertise & ADVERTISED_100baseT_Half) + adv |= ADVERTISE_100HALF; + if (advertise & ADVERTISED_100baseT_Full) + adv |= ADVERTISE_100FULL; + mdio_write(dev, aup->phy_addr, MII_ADVERTISE, adv); + + /* Start/Restart aneg */ + ctl = mdio_read(dev, aup->phy_addr, MII_BMCR); + ctl |= (BMCR_ANENABLE | BMCR_ANRESTART); + mdio_write(dev, aup->phy_addr, MII_BMCR, ctl); + + return 0; +} + +static int au1000_setup_forced(struct net_device *dev, int speed, int fd) +{ + struct au1000_private *aup = (struct au1000_private *)dev->priv; + u16 ctl; + + ctl = mdio_read(dev, aup->phy_addr, MII_BMCR); + ctl &= ~(BMCR_FULLDPLX | BMCR_SPEED100 | BMCR_ANENABLE); + + /* First reset the PHY */ + mdio_write(dev, aup->phy_addr, MII_BMCR, ctl | BMCR_RESET); + + /* Select speed & duplex */ + switch (speed) { + case SPEED_10: + break; + case SPEED_100: + ctl |= BMCR_SPEED100; + break; + case SPEED_1000: + default: + return -EINVAL; + } + if (fd == DUPLEX_FULL) + ctl |= BMCR_FULLDPLX; + mdio_write(dev, aup->phy_addr, MII_BMCR, ctl); + + return 0; +} + + +static void +au1000_start_link(struct net_device *dev, struct ethtool_cmd *cmd) +{ + struct au1000_private *aup = (struct au1000_private *)dev->priv; + u32 advertise; + int autoneg; + int forced_speed; + int forced_duplex; + + /* Default advertise */ + advertise = GENMII_DEFAULT_ADVERTISE; + autoneg = aup->want_autoneg; + forced_speed = SPEED_100; + forced_duplex = DUPLEX_FULL; + + /* Setup link parameters */ + if (cmd) { + if (cmd->autoneg == AUTONEG_ENABLE) { + advertise = cmd->advertising; + autoneg = 1; } else { - printk(KERN_ERR "au1000 eth: unknown Processor ID\n"); - return -ENODEV; - } - // check for valid entries, au1100 only has one entry - if (base_addr && irq) { - if (au1000_probe1(base_addr, irq, i) != 0) - return -ENODEV; + autoneg = 0; + + forced_speed = cmd->speed; + forced_duplex = cmd->duplex; } } + + /* Configure PHY & start aneg */ + aup->want_autoneg = autoneg; + if (autoneg) + au1000_setup_aneg(dev, advertise); + else + au1000_setup_forced(dev, forced_speed, forced_duplex); + mod_timer(&aup->timer, jiffies + HZ); +} + +static int au1000_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) +{ + struct au1000_private *aup = (struct au1000_private *)dev->priv; + u16 link, speed; + + cmd->supported = GENMII_DEFAULT_FEATURES; + cmd->advertising = GENMII_DEFAULT_ADVERTISE; + cmd->port = PORT_MII; + cmd->transceiver = XCVR_EXTERNAL; + cmd->phy_address = aup->phy_addr; + spin_lock_irq(&aup->lock); + cmd->autoneg = aup->want_autoneg; + aup->phy_ops->phy_status(dev, aup->phy_addr, &link, &speed); + if ((speed == IF_PORT_100BASETX) || (speed == IF_PORT_100BASEFX)) + cmd->speed = SPEED_100; + else if (speed == IF_PORT_10BASET) + cmd->speed = SPEED_10; + if (link && (dev->if_port == IF_PORT_100BASEFX)) + cmd->duplex = DUPLEX_FULL; + else + cmd->duplex = DUPLEX_HALF; + spin_unlock_irq(&aup->lock); return 0; } -static int __init -au1000_probe1(long ioaddr, int irq, int port_num) +static int au1000_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) +{ + struct au1000_private *aup = (struct au1000_private *)dev->priv; + unsigned long features = GENMII_DEFAULT_FEATURES; + + if (!capable(CAP_NET_ADMIN)) + return -EPERM; + + if (cmd->autoneg != AUTONEG_ENABLE && cmd->autoneg != AUTONEG_DISABLE) + return -EINVAL; + if (cmd->autoneg == AUTONEG_ENABLE && cmd->advertising == 0) + return -EINVAL; + if (cmd->duplex != DUPLEX_HALF && cmd->duplex != DUPLEX_FULL) + return -EINVAL; + if (cmd->autoneg == AUTONEG_DISABLE) + switch (cmd->speed) { + case SPEED_10: + if (cmd->duplex == DUPLEX_HALF && + (features & SUPPORTED_10baseT_Half) == 0) + return -EINVAL; + if (cmd->duplex == DUPLEX_FULL && + (features & SUPPORTED_10baseT_Full) == 0) + return -EINVAL; + break; + case SPEED_100: + if (cmd->duplex == DUPLEX_HALF && + (features & SUPPORTED_100baseT_Half) == 0) + return -EINVAL; + if (cmd->duplex == DUPLEX_FULL && + (features & SUPPORTED_100baseT_Full) == 0) + return -EINVAL; + break; + default: + return -EINVAL; + } + else if ((features & SUPPORTED_Autoneg) == 0) + return -EINVAL; + + spin_lock_irq(&aup->lock); + au1000_start_link(dev, cmd); + spin_unlock_irq(&aup->lock); + return 0; +} + +static int au1000_nway_reset(struct net_device *dev) +{ + struct au1000_private *aup = (struct au1000_private *)dev->priv; + + if (!aup->want_autoneg) + return -EINVAL; + spin_lock_irq(&aup->lock); + au1000_start_link(dev, NULL); + spin_unlock_irq(&aup->lock); + return 0; +} + +static void +au1000_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) +{ + struct au1000_private *aup = (struct au1000_private *)dev->priv; + + strcpy(info->driver, DRV_NAME); + strcpy(info->version, DRV_VERSION); + info->fw_version[0] = '\0'; + sprintf(info->bus_info, "%s %d", DRV_NAME, aup->mac_id); + info->regdump_len = 0; +} + +static u32 au1000_get_link(struct net_device *dev) +{ + return netif_carrier_ok(dev); +} + +static struct ethtool_ops au1000_ethtool_ops = { + .get_settings = au1000_get_settings, + .set_settings = au1000_set_settings, + .get_drvinfo = au1000_get_drvinfo, + .nway_reset = au1000_nway_reset, + .get_link = au1000_get_link +}; + +static struct net_device * +au1000_probe(u32 ioaddr, int irq, int port_num) { - struct net_device *dev; static unsigned version_printed = 0; struct au1000_private *aup = NULL; - int i, retval = 0; + struct net_device *dev = NULL; db_dest_t *pDB, *pDBfree; char *pmac, *argptr; char ethaddr[6]; + int i, err; - if (!request_region(PHYSADDR(ioaddr), MAC_IOSIZE, "Au1000 ENET")) - return -ENODEV; + if (!request_mem_region(CPHYSADDR(ioaddr), MAC_IOSIZE, "Au1x00 ENET")) + return NULL; - if (version_printed++ == 0) - printk(version); - - retval = -ENOMEM; + if (version_printed++ == 0) + printk("%s version %s %s\n", DRV_NAME, DRV_VERSION, DRV_AUTHOR); dev = alloc_etherdev(sizeof(struct au1000_private)); if (!dev) { printk (KERN_ERR "au1000 eth: alloc_etherdev failed\n"); - goto out; + return NULL; } - SET_MODULE_OWNER(dev); + if ((err = register_netdev(dev))) { + printk(KERN_ERR "Au1x_eth Cannot register net device err %d\n", + err); + free_netdev(dev); + return NULL; + } - printk("%s: Au1xxx ethernet found at 0x%lx, irq %d\n", - dev->name, ioaddr, irq); + printk("%s: Au1x Ethernet found at 0x%x, irq %d\n", + dev->name, ioaddr, irq); aup = dev->priv; /* Allocate the data buffers */ - aup->vaddr = (u32)dma_alloc(MAX_BUF_SIZE * - (NUM_TX_BUFFS+NUM_RX_BUFFS), &aup->dma_addr); - if (!aup->vaddr) - goto out1; + /* Snooping works fine with eth on all au1xxx */ + aup->vaddr = (u32)dma_alloc_noncoherent(NULL, + MAX_BUF_SIZE * (NUM_TX_BUFFS+NUM_RX_BUFFS), + &aup->dma_addr, + 0); + if (!aup->vaddr) { + free_netdev(dev); + release_mem_region(CPHYSADDR(ioaddr), MAC_IOSIZE); + return NULL; + } /* aup->mac is the base address of the MAC's registers */ aup->mac = (volatile mac_reg_t *)((unsigned long)ioaddr); /* Setup some variables for quick register address access */ - switch (ioaddr) { - case AU1000_ETH0_BASE: - case AU1500_ETH0_BASE: + if (ioaddr == iflist[0].base_addr) + { /* check env variables first */ if (!get_ethernet_addr(ethaddr)) { - memcpy(au1000_mac_addr, ethaddr, sizeof(dev->dev_addr)); + memcpy(au1000_mac_addr, ethaddr, sizeof(au1000_mac_addr)); } else { /* Check command line */ argptr = prom_getcmdline(); @@ -708,38 +1507,32 @@ } else { str2eaddr(ethaddr, pmac + strlen("ethaddr=")); memcpy(au1000_mac_addr, ethaddr, - sizeof(dev->dev_addr)); + sizeof(au1000_mac_addr)); } } - if (ioaddr == AU1000_ETH0_BASE) - aup->enable = (volatile u32 *) - ((unsigned long)AU1000_MAC0_ENABLE); - else aup->enable = (volatile u32 *) - ((unsigned long)AU1500_MAC0_ENABLE); - memcpy(dev->dev_addr, au1000_mac_addr, sizeof(dev->dev_addr)); + ((unsigned long)iflist[0].macen_addr); + memcpy(dev->dev_addr, au1000_mac_addr, sizeof(au1000_mac_addr)); setup_hw_rings(aup, MAC0_RX_DMA_ADDR, MAC0_TX_DMA_ADDR); - break; - case AU1000_ETH1_BASE: - case AU1500_ETH1_BASE: - if (ioaddr == AU1000_ETH1_BASE) - aup->enable = (volatile u32 *) - ((unsigned long)AU1000_MAC1_ENABLE); + aup->mac_id = 0; + au_macs[0] = aup; + } else + if (ioaddr == iflist[1].base_addr) + { aup->enable = (volatile u32 *) - ((unsigned long)AU1500_MAC1_ENABLE); - memcpy(dev->dev_addr, au1000_mac_addr, sizeof(dev->dev_addr)); + ((unsigned long)iflist[1].macen_addr); + memcpy(dev->dev_addr, au1000_mac_addr, sizeof(au1000_mac_addr)); dev->dev_addr[4] += 0x10; setup_hw_rings(aup, MAC1_RX_DMA_ADDR, MAC1_TX_DMA_ADDR); - break; - default: + aup->mac_id = 1; + au_macs[1] = aup; + } + else + { printk(KERN_ERR "%s: bad ioaddr\n", dev->name); - break; - } - aup->phy_addr = PHY_ADDRESS; - /* bring the device out of reset, otherwise probing the mii * will hang */ *aup->enable = MAC_EN_CLOCK_ENABLE; @@ -748,15 +1541,22 @@ MAC_EN_RESET2 | MAC_EN_CLOCK_ENABLE; au_sync_delay(2); - retval = mii_probe(dev); - if (retval) - goto out2; + aup->mii = kmalloc(sizeof(struct mii_phy), GFP_KERNEL); + if (!aup->mii) { + printk(KERN_ERR "%s: out of memory\n", dev->name); + goto err_out; + } + aup->mii->mii_control_reg = 0; + aup->mii->mii_data_reg = 0; + + if (mii_probe(dev) != 0) { + goto err_out; + } - retval = -EINVAL; pDBfree = NULL; /* setup the data buffer descriptors and attach a buffer to each one */ pDB = aup->db; - for (i=0; i<(NUM_TX_BUFFS+NUM_RX_BUFFS); i++) { + for (i = 0; i < (NUM_TX_BUFFS+NUM_RX_BUFFS); i++) { pDB->pnext = pDBfree; pDBfree = pDB; pDB->vaddr = (u32 *)((unsigned)aup->vaddr + MAX_BUF_SIZE*i); @@ -765,15 +1565,19 @@ } aup->pDBfree = pDBfree; - for (i=0; irx_dma_ring[i]->buff_stat = (unsigned)pDB->dma_addr; aup->rx_db_inuse[i] = pDB; } - for (i=0; itx_dma_ring[i]->buff_stat = (unsigned)pDB->dma_addr; aup->tx_dma_ring[i]->len = 0; aup->tx_db_inuse[i] = pDB; @@ -788,6 +1592,7 @@ dev->get_stats = au1000_get_stats; dev->set_multicast_list = &set_rx_mode; dev->do_ioctl = &au1000_ioctl; + SET_ETHTOOL_OPS(dev, &au1000_ethtool_ops); dev->set_config = &au1000_set_config; dev->tx_timeout = au1000_tx_timeout; dev->watchdog_timeo = ETH_TX_TIMEOUT; @@ -798,23 +1603,32 @@ */ reset_mac(dev); - retval = register_netdev(dev); - if (retval) - goto out2; - return 0; + return dev; -out2: - dma_free(aup->vaddr, MAX_BUF_SIZE * (NUM_TX_BUFFS+NUM_RX_BUFFS)); -out1: +err_out: + /* here we should have a valid dev plus aup-> register addresses + * so we can reset the mac properly.*/ + reset_mac(dev); + if (aup->mii) + kfree(aup->mii); + for (i = 0; i < NUM_RX_DMA; i++) { + if (aup->rx_db_inuse[i]) + ReleaseDB(aup, aup->rx_db_inuse[i]); + } + for (i = 0; i < NUM_TX_DMA; i++) { + if (aup->tx_db_inuse[i]) + ReleaseDB(aup, aup->tx_db_inuse[i]); + } + dma_free_noncoherent(NULL, + MAX_BUF_SIZE * (NUM_TX_BUFFS+NUM_RX_BUFFS), + (void *)aup->vaddr, + aup->dma_addr); + unregister_netdev(dev); free_netdev(dev); -out: - release_region(PHYSADDR(ioaddr), MAC_IOSIZE); - printk(KERN_ERR "%s: au1000_probe1 failed. Returns %d\n", - dev->name, retval); - return retval; + release_mem_region(CPHYSADDR(ioaddr), MAC_IOSIZE); + return NULL; } - /* * Initialize the interface. * @@ -832,7 +1646,8 @@ u32 control; u16 link, speed; - if (au1000_debug > 4) printk("%s: au1000_init\n", dev->name); + if (au1000_debug > 4) + printk("%s: au1000_init\n", dev->name); spin_lock_irqsave(&aup->lock, flags); @@ -852,7 +1667,7 @@ aup->mac->mac_addr_low = dev->dev_addr[3]<<24 | dev->dev_addr[2]<<16 | dev->dev_addr[1]<<8 | dev->dev_addr[0]; - for (i=0; irx_dma_ring[i]->buff_stat |= RX_DMA_ENABLE; } au_sync(); @@ -865,7 +1680,13 @@ if (link && (dev->if_port == IF_PORT_100BASEFX)) { control |= MAC_FULL_DUPLEX; } + + /* fix for startup without cable */ + if (!link) + dev->flags &= ~IFF_RUNNING; + aup->mac->control = control; + aup->mac->vlan1_tag = 0x8100; /* activate vlan support */ au_sync(); spin_unlock_irqrestore(&aup->lock, flags); @@ -949,6 +1770,7 @@ return retval; } + init_timer(&aup->timer); /* used in ioctl() */ aup->timer.expires = RUN_AT((3*HZ)); aup->timer.data = (unsigned long)dev; aup->timer.function = &au1000_timer; /* timer handler */ @@ -968,22 +1790,49 @@ if (au1000_debug > 4) printk("%s: close: dev=%p\n", dev->name, dev); + reset_mac(dev); + spin_lock_irqsave(&aup->lock, flags); /* stop the device */ - if (netif_device_present(dev)) - netif_stop_queue(dev); + netif_stop_queue(dev); /* disable the interrupt */ free_irq(dev->irq, dev); spin_unlock_irqrestore(&aup->lock, flags); - reset_mac(dev); return 0; } static void __exit au1000_cleanup_module(void) { + int i, j; + struct net_device *dev; + struct au1000_private *aup; + + for (i = 0; i < num_ifs; i++) { + dev = iflist[i].dev; + if (dev) { + aup = (struct au1000_private *) dev->priv; + unregister_netdev(dev); + if (aup->mii) + kfree(aup->mii); + for (j = 0; j < NUM_RX_DMA; j++) { + if (aup->rx_db_inuse[j]) + ReleaseDB(aup, aup->rx_db_inuse[j]); + } + for (j = 0; j < NUM_TX_DMA; j++) { + if (aup->tx_db_inuse[j]) + ReleaseDB(aup, aup->tx_db_inuse[j]); + } + dma_free_noncoherent(NULL, + MAX_BUF_SIZE * (NUM_TX_BUFFS+NUM_RX_BUFFS), + (void *)aup->vaddr, + aup->dma_addr); + free_netdev(dev); + release_mem_region(CPHYSADDR(iflist[i].base_addr), MAC_IOSIZE); + } + } } @@ -1028,9 +1877,8 @@ ptxd = aup->tx_dma_ring[aup->tx_tail]; while (ptxd->buff_stat & TX_T_DONE) { - update_tx_stats(dev, ptxd->status, aup->tx_len[aup->tx_tail] & 0x3ff); + update_tx_stats(dev, ptxd->status, ptxd->len & 0x3ff); ptxd->buff_stat &= ~TX_T_DONE; - aup->tx_len[aup->tx_tail] = 0; ptxd->len = 0; au_sync(); @@ -1056,7 +1904,7 @@ db_dest_t *pDB; int i; - if (au1000_debug > 4) + if (au1000_debug > 5) printk("%s: tx: aup %x len=%d, data=%p, head %d\n", dev->name, (unsigned)aup, skb->len, skb->data, aup->tx_head); @@ -1070,8 +1918,7 @@ return 1; } else if (buff_stat & TX_T_DONE) { - update_tx_stats(dev, ptxd->status, aup->tx_len[aup->tx_head] & 0x3ff); - aup->tx_len[aup->tx_head] = 0; + update_tx_stats(dev, ptxd->status, ptxd->len & 0x3ff); ptxd->len = 0; } @@ -1082,17 +1929,15 @@ pDB = aup->tx_db_inuse[aup->tx_head]; memcpy((void *)pDB->vaddr, skb->data, skb->len); - if (skb->len < MAC_MIN_PKT_SIZE) { - for (i=skb->len; ilen < ETH_ZLEN) { + for (i=skb->len; ivaddr)[i] = 0; } - aup->tx_len[aup->tx_head] = MAC_MIN_PKT_SIZE; - ptxd->len = MAC_MIN_PKT_SIZE; + ptxd->len = ETH_ZLEN; } - else { - aup->tx_len[aup->tx_head] = skb->len; + else ptxd->len = skb->len; - } + ptxd->buff_stat = pDB->dma_addr | TX_DMA_ENABLE; au_sync(); dev_kfree_skb(skb); @@ -1137,8 +1982,9 @@ volatile rx_dma_t *prxd; u32 buff_stat, status; db_dest_t *pDB; + u32 frmlen; - if (au1000_debug > 4) + if (au1000_debug > 5) printk("%s: au1000_rx head %d\n", dev->name, aup->rx_head); prxd = aup->rx_dma_ring[aup->rx_head]; @@ -1150,7 +1996,9 @@ if (!(status & RX_ERROR)) { /* good frame */ - skb = dev_alloc_skb((status & RX_FRAME_LEN_MASK) + 2); + frmlen = (status & RX_FRAME_LEN_MASK); + frmlen -= 4; /* Remove FCS */ + skb = dev_alloc_skb(frmlen + 2); if (skb == NULL) { printk(KERN_ERR "%s: Memory squeeze, dropping packet.\n", @@ -1160,9 +2008,9 @@ } skb->dev = dev; skb_reserve(skb, 2); /* 16 byte IP header align */ - eth_copy_and_sum(skb, (unsigned char *)pDB->vaddr, - status & RX_FRAME_LEN_MASK, 0);